Files
pole-book/server/node_modules/@strapi/design-system/dist/index.mjs.map

1 line
522 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"version":3,"file":"index.mjs","sources":["../src/helpers/context.tsx","../src/helpers/objects.ts","../src/helpers/theme.ts","../src/helpers/handleResponsiveValues.ts","../src/utilities/forwardRef.ts","../src/primitives/Box/Box.tsx","../src/primitives/Flex/Flex.tsx","../src/styles/type.ts","../src/primitives/Typography/Typography.tsx","../src/components/Accordion/Accordion.tsx","../src/styles/buttons.ts","../src/utilities/VisuallyHidden/VisuallyHidden.tsx","../src/utilities/AccessibleIcon/AccessibleIcon.tsx","../src/components/Alert/utils.ts","../src/components/Alert/Alert.tsx","../src/hooks/useControllableState.ts","../src/styles/motion.ts","../src/components/Avatar/Avatar.tsx","../src/components/Badge/Badge.tsx","../src/components/BaseLink/BaseLink.tsx","../src/components/Breadcrumbs/Divider.tsx","../src/components/Breadcrumbs/Breadcrumbs.tsx","../src/components/Breadcrumbs/Crumb.tsx","../src/components/Breadcrumbs/CrumbLink.tsx","../src/helpers/strings.ts","../src/hooks/useComposeRefs.ts","../src/hooks/useIsomorphicLayoutEffect.ts","../src/hooks/useId.ts","../src/hooks/useIntersection.ts","../src/components/Button/constants.ts","../src/components/Button/utils.ts","../src/components/Button/Button.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/IconButton/IconButton.tsx","../src/components/Link/Link.tsx","../src/components/SimpleMenu/Menu.tsx","../src/components/SimpleMenu/SimpleMenu.tsx","../src/components/Breadcrumbs/CrumbSimpleMenu.tsx","../src/components/Card/CardContext.tsx","../src/components/Card/Card.tsx","../src/components/Card/CardAction.tsx","../src/components/Card/CardAsset.tsx","../src/components/Card/CardBadge.tsx","../src/components/Card/CardBody.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Card/CardCheckbox.tsx","../src/components/Card/CardContent.tsx","../src/components/Card/CardHeader.tsx","../src/components/Card/CardTimer.tsx","../src/components/Card/CardTitle.tsx","../src/helpers/keyboardKeys.ts","../src/components/CarouselInput/Carousel.tsx","../src/themes/sizes.ts","../src/themes/common-theme.ts","../src/themes/lightTheme/light-colors.ts","../src/themes/lightTheme/light-shadows.ts","../src/themes/lightTheme/index.ts","../src/themes/darkTheme/dark-colors.ts","../src/themes/darkTheme/dark-shadows.ts","../src/themes/darkTheme/index.ts","../src/themes/extendTheme.ts","../src/themes/utils.ts","../src/components/Field/Field.tsx","../src/components/CarouselInput/CarouselInput.tsx","../src/components/CarouselInput/CarouselActions.tsx","../src/components/CarouselInput/CarouselImage.tsx","../src/components/CarouselInput/CarouselSlide.tsx","../src/utilities/ScrollArea/ScrollArea.tsx","../src/components/Loader/assets/loader.svg","../src/components/Loader/Loader.tsx","../src/components/Combobox/Combobox.tsx","../src/components/Dialog/Dialog.tsx","../src/hooks/useDateFormatter.ts","../src/components/LiveRegions/constants.ts","../src/components/LiveRegions/useNotifyAT.ts","../src/components/LiveRegions/LiveRegions.tsx","../src/styles/global.ts","../src/utilities/DesignSystemProvider.tsx","../src/utilities/DismissibleLayer/index.ts","../src/utilities/Portal/Portal.tsx","../src/components/Select/SelectParts.tsx","../src/components/Select/SingleSelect.tsx","../src/components/DatePicker/DatePicker.tsx","../src/components/TimePicker/TimePicker.tsx","../src/components/DateTimePicker/DateTimePicker.tsx","../src/components/Divider/Divider.tsx","../src/components/EmptyStateLayout/EmptyStateLayout.tsx","../src/components/JSONInput/utils/decorationExtension.ts","../src/components/JSONInput/JSONInput.tsx","../src/components/LinkButton/LinkButton.tsx","../src/components/Main/Main.tsx","../src/components/Main/SkipToContent.tsx","../src/components/Modal/Modal.tsx","../src/components/NumberInput/NumberInput.tsx","../src/components/Pagination/PaginationContext.ts","../src/components/Pagination/Pagination.tsx","../src/components/Pagination/components.tsx","../src/components/Popover/Popover.tsx","../src/components/ProgressBar/ProgressBar.tsx","../src/components/Radio/Radio.tsx","../src/components/RawTable/focusFocusable.ts","../src/components/RawTable/RawTableContext.ts","../src/components/RawTable/RawTable.tsx","../src/helpers/getFocusableNodes.ts","../src/components/RawTable/RawCell.tsx","../src/components/RawTable/RawThead.tsx","../src/components/RawTable/RawTbody.tsx","../src/components/RawTable/RawTr.tsx","../src/components/Searchbar/Searchbar.tsx","../src/components/Searchbar/SearchForm.tsx","../src/components/Tag/Tag.tsx","../src/components/Select/MultiSelect.tsx","../src/components/Select/MultiSelectNested.tsx","../src/components/Status/Status.tsx","../src/components/SubNav/SubNav.tsx","../src/components/SubNav/SubNavHeader.tsx","../src/components/SubNav/SubNavLink.tsx","../src/components/SubNav/SubNavLinkSection.tsx","../src/components/SubNav/SubNavSectionLabel.tsx","../src/components/SubNav/SubNavSection.tsx","../src/components/SubNav/SubNavSections.tsx","../src/components/Switch/Switch.tsx","../src/components/Tabs/Tabs.tsx","../src/components/Table/Table.tsx","../src/components/Table/Tbody.tsx","../src/components/Table/Thead.tsx","../src/components/Table/Tr.tsx","../src/components/Table/Cell.tsx","../src/components/Table/TFooter.tsx","../src/components/TextButton/TextButton.tsx","../src/components/TextInput/TextInput.tsx","../src/components/Textarea/Textarea.tsx","../src/components/Toggle/Toggle.tsx","../src/primitives/Grid/Grid.tsx","../src/hooks/useMeasure.ts","../src/utilities/FocusTrap/FocusTrap.tsx","../src/utilities/KeyboardNavigable/KeyboardNavigable.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport const createContext = <ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType,\n) => {\n const Context = React.createContext<ContextValueType | undefined>(defaultContext);\n\n const Provider = (props: ContextValueType & { children: React.ReactNode }) => {\n const { children, ...context } = props;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n\n return <Context.Provider value={value}>{children}</Context.Provider>;\n };\n\n function useContext(consumerName: string) {\n const context = React.useContext(Context);\n\n if (context) return context;\n\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n Provider.displayName = `${rootComponentName}Provider`;\n\n return [Provider, useContext] as const;\n};\n","export function isKeyOf(o: object | [] | string, s: string | number | symbol): s is keyof typeof o {\n if (typeof o === 'string') {\n return false;\n }\n\n return s in o;\n}\n\n/**\n * @description Simple object check.\n * @export\n * @param item\n * @returns {boolean}\n */\nexport function isObject(item: any): boolean {\n return item && typeof item === 'object' && !Array.isArray(item);\n}\n","import { DefaultTheme } from 'styled-components';\n\nimport { isKeyOf } from './objects';\n\nexport function extractStyleFromTheme<TKey extends keyof DefaultTheme, TSection extends DefaultTheme[TKey]>(\n themeSection: TSection | null | undefined,\n key: string | number | symbol | undefined,\n defaultValue: any,\n): string | number {\n if (themeSection && key && isKeyOf(themeSection, key)) {\n return themeSection[key];\n }\n\n return defaultValue;\n}\n","import { DefaultTheme } from 'styled-components';\n\nimport { extractStyleFromTheme } from './theme';\n\nimport type { TransientBoxProps } from '../primitives/Box/Box';\nimport type { TransientFlexProps } from '../primitives/Flex/Flex';\nimport type { TransientTypographyProps } from '../primitives/Typography/Typography';\nimport type { DefaultThemeOrCSSProp } from '../types';\n\ntype Breakpoint = 'initial' | 'small' | 'medium' | 'large';\n\n/**\n * A property is either a responsive object, or a single\n * value that is applied as the initial value.\n */\ntype ResponsiveProperty<T> =\n | {\n [key in Breakpoint]?: T;\n }\n | T;\n\n/**\n * Currently, only margin or padding accept an array of values.\n */\ntype ResponsiveThemeProperty<T extends keyof DefaultTheme, K extends keyof React.CSSProperties> = K extends\n | 'padding'\n | 'margin'\n ? ResponsiveProperty<DefaultThemeOrCSSProp<T, K> | Array<DefaultThemeOrCSSProp<T, K>>>\n : ResponsiveProperty<DefaultThemeOrCSSProp<T, K>>;\n\n/**\n * This should ONLY ever be CSS property names, never shorthands or aliases.\n */\ntype ResponsiveProps = Omit<TransientBoxProps, 'basis' | 'grow' | 'shrink' | 'shadow'> &\n Omit<TransientFlexProps, 'direction' | 'wrap'> &\n Omit<TransientTypographyProps, 'ellipsis' | 'variant'> & {\n boxShadow?: TransientBoxProps['shadow'];\n flexBasis?: TransientBoxProps['basis'];\n flexDirection?: TransientFlexProps['direction'];\n flexGrow?: TransientBoxProps['grow'];\n flexShrink?: TransientBoxProps['shrink'];\n flexWrap?: TransientFlexProps['wrap'];\n };\n\nconst mappedCSSProps: Partial<Record<keyof ResponsiveProps, string | string[]>> = {\n padding: ['padding-block-start', 'padding-inline-end', 'padding-block-end', 'padding-inline-start'],\n paddingTop: 'padding-block-start',\n paddingRight: 'padding-inline-end',\n paddingBottom: 'padding-block-end',\n paddingLeft: 'padding-inline-start',\n margin: ['margin-block-start', 'margin-inline-end', 'margin-block-end', 'margin-inline-start'],\n marginLeft: 'margin-inline-start',\n marginRight: 'margin-inline-end',\n marginTop: 'margin-block-start',\n marginBottom: 'margin-block-end',\n borderRadius: 'border-radius',\n borderStyle: 'border-style',\n borderWidth: 'border-width',\n borderColor: 'border-color',\n fontSize: 'font-size',\n fontWeight: 'font-weight',\n lineHeight: 'line-height',\n zIndex: 'z-index',\n boxShadow: 'box-shadow',\n pointerEvents: 'pointer-events',\n textAlign: 'text-align',\n textTransform: 'text-transform',\n textDecoration: 'text-decoration',\n flexGrow: 'flex-grow',\n flexShrink: 'flex-shrink',\n flexBasis: 'flex-basis',\n minWidth: 'min-width',\n maxWidth: 'max-width',\n minHeight: 'min-height',\n maxHeight: 'max-height',\n flexDirection: 'flex-direction',\n flexWrap: 'flex-wrap',\n justifyContent: 'justify-content',\n alignItems: 'align-items',\n};\n\n/**\n * Fills the shorthand CSS properties with their corresponding logical properties\n * @param value An array of CSS values for shorthand properties\n * @returns An array of CSS values filled with logical properties\n */\n\nconst fillCssValues = (value: DefaultThemeOrCSSProp<'spaces', 'margin' | 'padding'>[]) => {\n const [top, right, bottom, left] = value;\n const rightValue = right ?? top;\n const bottomValue = bottom ?? top;\n const leftValue = left ?? rightValue;\n\n return [top, rightValue, bottomValue, leftValue] as const;\n};\n\nfunction getThemeSection(key: keyof ResponsiveProps, theme: DefaultTheme) {\n switch (key) {\n case 'gap':\n case 'padding':\n case 'margin':\n case 'paddingTop':\n case 'paddingLeft':\n case 'paddingRight':\n case 'paddingBottom':\n case 'marginTop':\n case 'marginLeft':\n case 'marginRight':\n case 'marginBottom':\n case 'left':\n case 'right':\n case 'top':\n case 'bottom':\n case 'width':\n case 'maxWidth':\n case 'minWidth':\n case 'height':\n case 'maxHeight':\n case 'minHeight':\n case 'borderRadius':\n case 'borderWidth':\n return theme.spaces;\n case 'color':\n case 'background':\n case 'borderColor':\n return theme.colors;\n case 'fontSize':\n return theme.fontSizes;\n case 'fontWeight':\n return theme.fontWeights;\n case 'lineHeight':\n return theme.lineHeights;\n case 'zIndex':\n return theme.zIndices;\n case 'boxShadow':\n return theme.shadows;\n default:\n return null;\n }\n}\n\nconst handleResponsiveValues = (values: ResponsiveProps, theme: DefaultTheme) => {\n const stylesByBreakpoint = Object.entries(values).reduce(\n (acc, curr) => {\n const [key, value] = curr as [key: keyof ResponsiveProps, value: ResponsiveProps[keyof ResponsiveProps]];\n const themeSection = getThemeSection(key, theme);\n\n const cssProperty = Object.prototype.hasOwnProperty.call(mappedCSSProps, key) ? mappedCSSProps[key] : key;\n\n if (cssProperty && (value || value === 0)) {\n // If the value is an responsive object e.g padding : { initial: 1, medium: 2, large: [3, 4] }\n if (typeof value === 'object' && !Array.isArray(value)) {\n Object.entries(value).forEach(([breakpointName, breakpointValue]) => {\n acc[breakpointName] = {\n ...acc[breakpointName],\n ...convertCssPropertiesToCssValues(cssProperty, breakpointValue, themeSection),\n };\n });\n } else {\n /**\n * If we don't pass a responsive object, we just set the value to respective prop.\n */\n acc.initial = {\n ...acc.initial,\n ...convertCssPropertiesToCssValues(cssProperty, value, themeSection),\n };\n }\n }\n\n return acc;\n },\n {\n initial: {},\n small: {},\n medium: {},\n large: {},\n },\n );\n\n /**\n * Stringify our styles.\n */\n return Object.entries(stylesByBreakpoint)\n .reduce<string[]>((acc, [key, value]) => {\n if (value && Object.keys(value).length > 0) {\n const breakpointStyles = Object.entries(value)\n .reduce<string[]>((arr, [property, value]) => {\n arr.push(`${property}: ${value};`);\n\n return arr;\n }, [])\n .join('\\n');\n\n if (key === 'initial') {\n acc.push(breakpointStyles);\n } else {\n acc.push(`${theme.breakpoints[key]}{ ${breakpointStyles} }`);\n }\n }\n\n return acc;\n }, [])\n .join('\\n');\n};\n\n/**\n * This function takes either a single CSS property or an array of CSS\n * properties & applies the provided value during the process, the value\n * is extracted from the provided themeSection if possible. If not, we assume\n * the user has provided a CSS value directly and fallback to that.\n */\nconst convertCssPropertiesToCssValues = (\n property: string | string[],\n value: DefaultThemeOrCSSProp<any, any> | Array<DefaultThemeOrCSSProp<any, any>>,\n themeSection: DefaultTheme[keyof DefaultTheme],\n) => {\n if (Array.isArray(property) && Array.isArray(value)) {\n /**\n * If the value is an array & the cssProperty is an array, map the values to respective logical props.\n * This is normally the case for padding, margin, etc. where we extract each value and turn it into a single logical prop.\n *\n * @example cssProperty = ['padding-block-start', 'padding-inline-end', 'padding-block-end', 'padding-inline-start'] and breakpointValue = [3, 4]\n *\n * so this code would become\n * ```css\n * padding-block-start: 3;\n * padding-block-end: 3;\n * padding-inline-start: 4;\n * padding-inline-end: 4;\n * ```\n */\n const shorthandValues = fillCssValues(value);\n\n return property.reduce((acc, prop, index) => {\n acc[prop] = extractStyleFromTheme(themeSection, shorthandValues[index], shorthandValues[index]);\n\n return acc;\n }, {});\n } else if (Array.isArray(property) && !Array.isArray(value)) {\n /**\n * If the value is not an array & the cssProperty is an array, map the value to respective logical props (they'd all be the same).\n *\n * @example cssProperty = ['padding-block-start', 'padding-inline-end', 'padding-block-end', 'padding-inline-start'] and breakpointValue = 1\n *\n * so this code would become\n * ```css\n * padding-inline-start: 1;\n * padding-inline-end: 1;\n * padding-block-start: 1;\n * padding-block-end: 1;\n * ```\n */\n return property.reduce((acc, prop) => {\n acc[prop] = extractStyleFromTheme(themeSection, value, value);\n\n return acc;\n }, {});\n } else if (!Array.isArray(property) && !Array.isArray(value)) {\n return {\n [property]: extractStyleFromTheme(themeSection, value, value),\n };\n } else {\n console.warn(\n \"You've passed an array of values to a property that does not support it. Please check the property and value you're passing.\",\n );\n\n return {};\n }\n};\n\nexport { handleResponsiveValues };\nexport type { ResponsiveProps, ResponsiveThemeProperty, ResponsiveProperty, Breakpoint };\n","import * as React from 'react';\n\n/**\n * A utility function to create a forwardRef component.\n * This is a workaround to allow generics to be passed\n * to forwardRef components.\n */\nconst forwardRef = React.forwardRef as <T, P = object>(\n render: (props: P, ref: React.ForwardedRef<T>) => ReturnType<React.FunctionComponent>,\n) => (props: React.PropsWithoutRef<P> & React.RefAttributes<T>) => ReturnType<React.FunctionComponent>;\n\nexport { forwardRef };\n","import * as React from 'react';\n\nimport { styled, type CSSProperties } from 'styled-components';\n\nimport {\n handleResponsiveValues,\n type ResponsiveProperty,\n type ResponsiveThemeProperty,\n} from '../../helpers/handleResponsiveValues';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef, PropsToTransientProps } from '../../types';\nimport { forwardRef } from '../../utilities/forwardRef';\n\ninterface TransientBoxProps {\n /**\n * CSS Properties\n */\n pointerEvents?: ResponsiveProperty<CSSProperties['pointerEvents']>;\n display?: ResponsiveProperty<CSSProperties['display']>;\n position?: ResponsiveProperty<CSSProperties['position']>;\n overflow?: ResponsiveProperty<CSSProperties['overflow']>;\n cursor?: ResponsiveProperty<CSSProperties['cursor']>;\n transition?: ResponsiveProperty<CSSProperties['transition']>;\n transform?: ResponsiveProperty<CSSProperties['transform']>;\n animation?: ResponsiveProperty<CSSProperties['animation']>;\n textAlign?: ResponsiveProperty<CSSProperties['textAlign']>;\n textTransform?: ResponsiveProperty<CSSProperties['textTransform']>;\n flex?: ResponsiveProperty<CSSProperties['flex']>;\n grow?: ResponsiveProperty<CSSProperties['flexGrow']>;\n basis?: ResponsiveProperty<CSSProperties['flexBasis']>;\n shrink?: ResponsiveProperty<CSSProperties['flexShrink']>;\n borderStyle?: ResponsiveProperty<CSSProperties['borderStyle']>;\n /**\n * Shorthand Responsive Properties\n */\n margin?: ResponsiveThemeProperty<'spaces', 'margin'>;\n padding?: ResponsiveThemeProperty<'spaces', 'padding'>;\n\n /**\n * Individual Responsive Properties\n */\n marginLeft?: ResponsiveThemeProperty<'spaces', 'marginLeft'>;\n marginRight?: ResponsiveThemeProperty<'spaces', 'marginRight'>;\n marginTop?: ResponsiveThemeProperty<'spaces', 'marginTop'>;\n marginBottom?: ResponsiveThemeProperty<'spaces', 'marginBottom'>;\n marginBlock?: ResponsiveThemeProperty<'spaces', 'marginBlock'>;\n marginBlockStart?: ResponsiveThemeProperty<'spaces', 'marginBlockStart'>;\n marginBlockEnd?: ResponsiveThemeProperty<'spaces', 'marginBlockEnd'>;\n marginInline?: ResponsiveThemeProperty<'spaces', 'marginInline'>;\n marginInlineStart?: ResponsiveThemeProperty<'spaces', 'marginInlineStart'>;\n marginInlineEnd?: ResponsiveThemeProperty<'spaces', 'marginInlineEnd'>;\n paddingLeft?: ResponsiveThemeProperty<'spaces', 'paddingLeft'>;\n paddingRight?: ResponsiveThemeProperty<'spaces', 'paddingRight'>;\n paddingTop?: ResponsiveThemeProperty<'spaces', 'paddingTop'>;\n paddingBottom?: ResponsiveThemeProperty<'spaces', 'paddingBottom'>;\n paddingBlock?: ResponsiveThemeProperty<'spaces', 'paddingBlock'>;\n paddingBlockStart?: ResponsiveThemeProperty<'spaces', 'paddingBlockStart'>;\n paddingBlockEnd?: ResponsiveThemeProperty<'spaces', 'paddingBlockEnd'>;\n paddingInline?: ResponsiveThemeProperty<'spaces', 'paddingInline'>;\n paddingInlineStart?: ResponsiveThemeProperty<'spaces', 'paddingInlineStart'>;\n paddingInlineEnd?: ResponsiveThemeProperty<'spaces', 'paddingInlineEnd'>;\n borderRadius?: ResponsiveThemeProperty<'spaces', 'borderRadius'>;\n borderWidth?: ResponsiveThemeProperty<'spaces', 'borderWidth'>;\n top?: ResponsiveThemeProperty<'spaces', 'top'>;\n left?: ResponsiveThemeProperty<'spaces', 'left'>;\n bottom?: ResponsiveThemeProperty<'spaces', 'bottom'>;\n right?: ResponsiveThemeProperty<'spaces', 'right'>;\n width?: ResponsiveThemeProperty<'spaces', 'width'>;\n height?: ResponsiveThemeProperty<'spaces', 'height'>;\n maxWidth?: ResponsiveThemeProperty<'spaces', 'maxWidth'>;\n minWidth?: ResponsiveThemeProperty<'spaces', 'minWidth'>;\n maxHeight?: ResponsiveThemeProperty<'spaces', 'maxHeight'>;\n minHeight?: ResponsiveThemeProperty<'spaces', 'minHeight'>;\n /**\n * Theme Properties\n */\n borderColor?: ResponsiveThemeProperty<'colors', 'borderColor'>;\n color?: ResponsiveThemeProperty<'colors', 'color'>;\n background?: ResponsiveThemeProperty<'colors', 'background'>;\n shadow?: ResponsiveThemeProperty<'shadows', 'boxShadow'>;\n fontSize?: ResponsiveThemeProperty<'fontSizes', 'fontSize'>;\n fontWeight?: ResponsiveThemeProperty<'fontWeights', 'fontWeight'>;\n lineHeight?: ResponsiveThemeProperty<'lineHeights', 'lineHeight'>;\n zIndex?: ResponsiveThemeProperty<'zIndices', 'zIndex'>;\n hasRadius?: boolean;\n}\n\ntype BoxProps<C extends React.ElementType = 'div'> = PolymorphicComponentPropsWithRef<\n C,\n TransientBoxProps & {\n children?: React.ReactNode;\n }\n>;\n\nconst Box = forwardRef(<C extends React.ElementType = 'div'>(props: BoxProps<C>, ref: PolymorphicRef<C>) => {\n const {\n background,\n basis,\n borderColor,\n color,\n flex,\n fontSize,\n grow,\n hasRadius,\n padding,\n paddingBottom,\n paddingLeft,\n paddingRight,\n paddingTop,\n margin,\n marginLeft,\n marginBottom,\n marginRight,\n marginTop,\n shadow,\n shrink,\n lineHeight,\n fontWeight,\n width,\n minWidth,\n maxWidth,\n height,\n minHeight,\n maxHeight,\n top,\n left,\n bottom,\n right,\n borderRadius,\n borderStyle,\n borderWidth,\n tag,\n pointerEvents,\n display,\n position,\n zIndex,\n overflow,\n cursor,\n transition,\n transform,\n animation,\n textAlign,\n textTransform,\n ...rest\n } = props;\n\n const AsComponent = tag || 'div';\n\n const mappedProps: PropsToTransientProps<TransientBoxProps> = {\n $background: background,\n $basis: basis,\n $borderColor: borderColor,\n $color: color,\n $flex: flex,\n $fontSize: fontSize,\n $grow: grow,\n $hasRadius: hasRadius,\n $padding: padding,\n $paddingBottom: paddingBottom,\n $paddingLeft: paddingLeft,\n $paddingRight: paddingRight,\n $paddingTop: paddingTop,\n $margin: margin,\n $marginLeft: marginLeft,\n $marginBottom: marginBottom,\n $marginRight: marginRight,\n $marginTop: marginTop,\n $shadow: shadow,\n $shrink: shrink,\n $lineHeight: lineHeight,\n $fontWeight: fontWeight,\n $width: width,\n $minWidth: minWidth,\n $maxWidth: maxWidth,\n $height: height,\n $minHeight: minHeight,\n $maxHeight: maxHeight,\n $top: top,\n $left: left,\n $bottom: bottom,\n $right: right,\n $borderRadius: borderRadius,\n $borderStyle: borderStyle,\n $borderWidth: borderWidth,\n $pointerEvents: pointerEvents,\n $display: display,\n $position: position,\n $zIndex: zIndex,\n $overflow: overflow,\n $cursor: cursor,\n $transition: transition,\n $transform: transform,\n $animation: animation,\n $textAlign: textAlign,\n $textTransform: textTransform,\n };\n\n return <StyledBox as={AsComponent} ref={ref} {...mappedProps} {...rest} />;\n}) as BoxComponent;\n\nconst StyledBox = styled.div<PropsToTransientProps<TransientBoxProps>>`\n ${({ theme, ...props }) => {\n return handleResponsiveValues(\n {\n padding: props.$padding,\n paddingTop: props.$paddingTop,\n paddingBottom: props.$paddingBottom,\n paddingLeft: props.$paddingLeft,\n paddingRight: props.$paddingRight,\n margin: props.$margin,\n marginTop: props.$marginTop,\n marginBottom: props.$marginBottom,\n marginLeft: props.$marginLeft,\n marginRight: props.$marginRight,\n top: props.$top,\n left: props.$left,\n bottom: props.$bottom,\n right: props.$right,\n width: props.$width,\n minWidth: props.$minWidth,\n maxWidth: props.$maxWidth,\n height: props.$height,\n minHeight: props.$minHeight,\n maxHeight: props.$maxHeight,\n color: props.$color,\n background: props.$background,\n fontSize: props.$fontSize,\n fontWeight: props.$fontWeight,\n lineHeight: props.$lineHeight,\n borderRadius: props.$hasRadius ? theme.borderRadius : props.$borderRadius,\n borderStyle: props.$borderColor && !props.$borderStyle ? 'solid' : props.$borderStyle,\n borderWidth: props.$borderColor && !props.$borderWidth ? '1px' : props.$borderWidth,\n borderColor: props.$borderColor,\n zIndex: props.$zIndex,\n boxShadow: props.$shadow,\n display: props.$display,\n pointerEvents: props.$pointerEvents,\n cursor: props.$cursor,\n textAlign: props.$textAlign,\n textTransform: props.$textTransform,\n transition: props.$transition,\n transform: props.$transform,\n animation: props.$animation,\n position: props.$position,\n overflow: props.$overflow,\n flex: props.$flex,\n flexShrink: props.$shrink,\n flexGrow: props.$grow,\n flexBasis: props.$basis,\n },\n theme,\n );\n }};\n`;\n\ntype BoxComponent<C extends React.ElementType = 'div'> = <T extends React.ElementType = C>(\n props: BoxProps<T>,\n) => JSX.Element;\n\nexport { Box };\nexport type { BoxComponent, BoxProps, TransientBoxProps };\n","import * as React from 'react';\n\nimport { styled, type CSSProperties } from 'styled-components';\n\nimport {\n handleResponsiveValues,\n type ResponsiveProperty,\n type ResponsiveThemeProperty,\n} from '../../helpers/handleResponsiveValues';\nimport { PolymorphicRef, PropsToTransientProps } from '../../types';\nimport { forwardRef } from '../../utilities/forwardRef';\nimport { Box, BoxComponent, BoxProps } from '../Box';\n\ninterface TransientFlexProps {\n alignItems?: ResponsiveProperty<CSSProperties['alignItems']>;\n justifyContent?: ResponsiveProperty<CSSProperties['justifyContent']>;\n wrap?: ResponsiveProperty<CSSProperties['flexWrap']>;\n direction?: ResponsiveProperty<CSSProperties['flexDirection']>;\n gap?: ResponsiveThemeProperty<'spaces', 'gap'>;\n inline?: boolean;\n}\n\ntype FlexProps<C extends React.ElementType = 'div'> = BoxProps<C> & TransientFlexProps;\n\nconst Flex = forwardRef(<C extends React.ElementType = 'div'>(props: FlexProps<C>, ref: PolymorphicRef<C>) => {\n const { className, alignItems, direction, inline, gap, justifyContent, wrap, ...rest } = props;\n const mappedProps = {\n $alignItems: alignItems,\n $direction: direction,\n $gap: gap,\n $justifyContent: justifyContent,\n $wrap: wrap,\n $inline: inline,\n };\n\n // @ts-expect-error fix: Type 'symbol' is not assignable to type `gap?: ResponsiveThemeProperty<'spaces', 'gap'>`;\n return <StyledFlex className={className} ref={ref} {...mappedProps} {...rest} />;\n});\n\ntype FlexComponent<C extends React.ElementType = 'div'> = typeof Flex<C>;\n\nconst StyledFlex = styled<BoxComponent>(Box)<PropsToTransientProps<TransientFlexProps>>`\n ${({ theme, $display = 'flex', $alignItems = 'center', $direction = 'row', ...props }) =>\n handleResponsiveValues(\n {\n gap: props.$gap,\n alignItems: $alignItems,\n justifyContent: props.$justifyContent,\n flexWrap: props.$wrap,\n flexDirection: $direction,\n display: props.$inline ? 'inline-flex' : $display,\n },\n theme,\n )};\n`;\n\nexport { Flex };\nexport type { FlexComponent, FlexProps, TransientFlexProps };\n","import { DefaultTheme, css } from 'styled-components';\n\n/* -------------------------------------------------------------------------------------------------\n * Text Variants\n * -----------------------------------------------------------------------------------------------*/\n\nconst ALPHA = 'alpha';\nconst BETA = 'beta';\nconst DELTA = 'delta';\nconst EPSILON = 'epsilon';\nconst OMEGA = 'omega';\nconst PI = 'pi';\nconst SIGMA = 'sigma';\n\nconst TEXT_VARIANTS = [ALPHA, BETA, DELTA, EPSILON, OMEGA, PI, SIGMA] as const;\n\n/* -------------------------------------------------------------------------------------------------\n * Ellipsis Style\n * -----------------------------------------------------------------------------------------------*/\n\nconst ellipsis = css`\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Variant Style\n * -----------------------------------------------------------------------------------------------*/\n\ninterface VariantProps {\n $variant?: (typeof TEXT_VARIANTS)[number];\n theme: DefaultTheme;\n}\n\nconst variant = ({ $variant = OMEGA, theme }: VariantProps) => {\n switch ($variant) {\n case ALPHA: {\n return `\n font-weight: ${theme.fontWeights.bold};\n font-size: ${theme.fontSizes[5]};\n line-height: ${theme.lineHeights[2]};\n `;\n }\n case BETA: {\n return `\n font-weight: ${theme.fontWeights.bold};\n font-size: ${theme.fontSizes[4]};\n line-height: ${theme.lineHeights[1]};\n `;\n }\n case DELTA: {\n return `\n font-weight: ${theme.fontWeights.semiBold};\n font-size: ${theme.fontSizes[3]};\n line-height: ${theme.lineHeights[2]};\n `;\n }\n case EPSILON: {\n return `\n font-size: ${theme.fontSizes[3]};\n line-height: ${theme.lineHeights[6]};\n `;\n }\n case OMEGA: {\n return `\n font-size: ${theme.fontSizes[2]};\n line-height: ${theme.lineHeights[4]};\n `;\n }\n case PI: {\n return `\n font-size: ${theme.fontSizes[1]};\n line-height: ${theme.lineHeights[3]};\n `;\n }\n case SIGMA: {\n return `\n font-weight: ${theme.fontWeights.bold};\n font-size: ${theme.fontSizes[0]};\n line-height: ${theme.lineHeights[5]};\n text-transform: uppercase;\n `;\n }\n default: {\n return `\n font-size: ${theme.fontSizes[2]};\n `;\n }\n }\n};\n\nexport { TEXT_VARIANTS, ellipsis, variant };\nexport type { VariantProps };\n","import * as React from 'react';\n\nimport { styled, type CSSProperties } from 'styled-components';\n\nimport {\n handleResponsiveValues,\n type ResponsiveProperty,\n type ResponsiveThemeProperty,\n} from '../../helpers/handleResponsiveValues';\nimport { ellipsis, variant, type TEXT_VARIANTS } from '../../styles/type';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef, PropsToTransientProps } from '../../types';\nimport { forwardRef } from '../../utilities/forwardRef';\nimport { Box, BoxComponent, BoxProps } from '../Box';\n\ninterface TransientTypographyProps {\n ellipsis?: boolean;\n textColor?: ResponsiveThemeProperty<'colors', 'color'>;\n textDecoration?: ResponsiveProperty<CSSProperties['textDecoration']>;\n variant?: (typeof TEXT_VARIANTS)[number];\n}\n\ntype TypographyProps<C extends React.ElementType = 'span'> = Omit<BoxProps<C>, 'ref'> & TransientTypographyProps;\n\nconst Typography = forwardRef(\n <C extends React.ElementType = 'span'>(props: TypographyProps<C>, ref: PolymorphicRef<C>) => {\n const {\n ellipsis,\n textColor = 'currentcolor',\n textDecoration,\n textTransform,\n variant,\n lineHeight,\n fontWeight,\n fontSize,\n ...rest\n } = props;\n\n const mappedProps = {\n $ellipsis: ellipsis,\n $textColor: textColor,\n $textDecoration: textDecoration,\n $textTransform: textTransform,\n $variant: variant,\n $lineHeight: lineHeight,\n $fontWeight: fontWeight,\n $fontSize: fontSize,\n };\n\n return <StyledTypography ref={ref} tag=\"span\" {...mappedProps} {...rest} />;\n },\n) as TypographyComponent;\n\ntype TypographyComponent<C extends React.ElementType = 'span'> = <T extends React.ElementType = C>(\n props: PolymorphicComponentPropsWithRef<T, TypographyProps<T>>,\n) => JSX.Element;\n\nconst StyledTypography = styled<BoxComponent<'span'>>(Box)<PropsToTransientProps<TransientTypographyProps>>`\n ${variant}\n ${({ $ellipsis }) => ($ellipsis ? ellipsis : '')}\n\n ${({ theme, ...props }) => {\n return handleResponsiveValues(\n {\n color: props.$textColor,\n textDecoration: props.$textDecoration,\n textTransform: props.$textTransform,\n lineHeight: props.$lineHeight,\n fontWeight: props.$fontWeight,\n fontSize: props.$fontSize,\n },\n theme,\n );\n }}\n`;\n\nexport { Typography };\nexport type { TypographyProps, TypographyComponent, TransientTypographyProps };\n","import * as React from 'react';\n\nimport * as RadixAccordion from '@radix-ui/react-accordion';\nimport { CaretDown } from '@strapi/icons';\nimport { css, keyframes, styled } from 'styled-components';\n\nimport { createContext } from '../../helpers/context';\nimport { Box, BoxComponent } from '../../primitives/Box';\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\n\ntype Size = 'S' | 'M';\ntype Variant = 'primary' | 'secondary';\n\n/* -------------------------------------------------------------------------------------------------\n * Root\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ContextValue {\n /**\n * @default \"S\"\n */\n size: Size;\n}\n\nconst [AccordionProvider, useAccordion] = createContext<ContextValue>('Accordion');\n\ntype Element = HTMLDivElement;\n\ntype Props = Omit<RadixAccordion.AccordionSingleProps, 'type'> & Partial<ContextValue>;\n\nconst Root = React.forwardRef<Element, Props>(({ children, size = 'S', ...props }, forwardedRef) => {\n return (\n <AccordionRoot ref={forwardedRef} $size={size} collapsible {...props} type=\"single\">\n <AccordionProvider size={size}>{children}</AccordionProvider>\n </AccordionRoot>\n );\n});\n\nconst AccordionRoot = styled(RadixAccordion.Root)<{ $size: Size }>`\n background-color: ${(props) => props.theme.colors.neutral0};\n\n ${(props) => {\n if (props.$size === 'S') {\n return css`\n border-radius: ${(props) => props.theme.borderRadius};\n border: solid 1px ${(props) => props.theme.colors.neutral200};\n `;\n } else {\n return css``;\n }\n }}\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Item\n * -----------------------------------------------------------------------------------------------*/\n\ntype ItemElement = HTMLDivElement;\n\ninterface ItemProps extends RadixAccordion.AccordionItemProps {}\n\nconst Item = React.forwardRef<ItemElement, ItemProps>((props, forwardedRef) => {\n const { size } = useAccordion('Item');\n\n return <AccordionItem $size={size} data-size={size} ref={forwardedRef} {...props} />;\n});\n\nconst AccordionItem = styled(RadixAccordion.Item)<{ $size: Size; $disabled?: boolean }>`\n overflow: hidden;\n margin: 1px 0;\n\n &:first-child {\n border-top-left-radius: 0.3rem;\n border-top-right-radius: 0.3rem;\n margin-top: 0;\n }\n\n &:last-child {\n border-bottom-left-radius: 0.3rem;\n border-bottom-right-radius: 0.3rem;\n margin-bottom: 0;\n }\n\n &[data-size='S'] {\n & + & {\n border-top: solid 1px ${(props) => props.theme.colors.neutral200};\n }\n }\n\n &[data-state='open'] {\n box-shadow: 0 0 0 1px ${(props) => props.theme.colors.primary600};\n }\n\n &:not([data-disabled]):hover {\n box-shadow: 0 0 0 1px ${(props) => props.theme.colors.primary600};\n }\n\n /* This applies our desired focus effect correctly. */\n &:focus-within {\n position: relative;\n z-index: 1;\n box-shadow: 0 0 0 1px ${(props) => props.theme.colors.primary600};\n }\n\n @media (prefers-reduced-motion: no-preference) {\n transition: box-shadow ${(props) => props.theme.motion.timings['120']}\n ${(props) => props.theme.motion.easings.easeOutQuad};\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Trigger\n * -----------------------------------------------------------------------------------------------*/\n\ntype TriggerElement = HTMLButtonElement;\n\ninterface TriggerProps extends Omit<RadixAccordion.AccordionTriggerProps, 'asChild'> {\n /**\n * @default \"left\"\n */\n caretPosition?: 'left' | 'right';\n description?: string;\n icon?: React.ElementType<React.SVGProps<SVGSVGElement>>;\n iconProps?: React.SVGProps<SVGSVGElement>;\n}\n\nconst Trigger = React.forwardRef<TriggerElement, TriggerProps>(\n ({ caretPosition = 'left', description, icon: Icon, iconProps, children, ...restProps }, forwardedRef) => {\n const { size } = useAccordion('Trigger');\n\n return (\n <AccordionTrigger $caretPosition={caretPosition} $size={size} ref={forwardedRef} {...restProps}>\n {caretPosition === 'left' ? (\n <TriggerIcon $size={size}>\n <CaretDown width={size === 'S' ? '1.2rem' : '1.6rem'} height={size === 'S' ? '1.2rem' : '1.6rem'} />\n </TriggerIcon>\n ) : null}\n <Flex tag=\"span\" gap={2} overflow=\"hidden\">\n {Icon && size === 'S' ? (\n <IconBox>\n <Icon {...iconProps} />\n </IconBox>\n ) : null}\n <Flex alignItems=\"flex-start\" direction=\"column\" tag=\"span\" ref={forwardedRef} overflow=\"hidden\">\n <Typography\n fontWeight={size === 'S' ? 'bold' : undefined}\n ellipsis\n variant={size === 'M' ? 'delta' : undefined}\n textAlign=\"left\"\n width=\"100%\"\n >\n {children}\n </Typography>\n {description && size === 'M' ? <Typography textAlign=\"left\">{description}</Typography> : null}\n </Flex>\n </Flex>\n {caretPosition === 'right' ? (\n <TriggerIcon $size={size}>\n <CaretDown width={size === 'S' ? '1.2rem' : '1.6rem'} height={size === 'S' ? '1.2rem' : '1.6rem'} />\n </TriggerIcon>\n ) : null}\n </AccordionTrigger>\n );\n },\n);\n\nconst IconBox = styled<BoxComponent<'span'>>(Box)`\n color: ${(props) => props.theme.colors.neutral500};\n display: flex;\n\n @media (prefers-reduced-motion: no-preference) {\n transition: ${(props) => props.theme.transitions.color};\n }\n`;\n\nconst TriggerIcon = styled<FlexComponent<'span'>>(Flex).attrs((props) => ({\n ...props,\n tag: 'span',\n}))<{ $size: Size }>`\n background-color: ${(props) => props.theme.colors.neutral200};\n width: ${(props) => (props.$size === 'S' ? '2.4rem' : '3.2rem')};\n height: ${(props) => (props.$size === 'S' ? '2.4rem' : '3.2rem')};\n flex: ${(props) => (props.$size === 'S' ? '0 0 2.4rem' : '0 0 3.2rem')};\n border-radius: 50%;\n justify-content: center;\n\n @media (prefers-reduced-motion: no-preference) {\n transition:\n transform ${(props) => props.theme.motion.timings['200']} ${(props) => props.theme.motion.easings.authenticMotion},\n ${(props) => props.theme.transitions.backgroundColor};\n }\n`;\n\nconst AccordionTrigger = styled(RadixAccordion.Trigger)<{ $caretPosition: TriggerProps['caretPosition']; $size: Size }>`\n display: flex;\n align-items: center;\n justify-content: ${(props) => (props.$caretPosition === 'left' ? 'flex-start' : 'space-between')};\n width: 100%;\n gap: ${(props) => props.theme.spaces[4]};\n padding-inline: ${(props) => (props.$size === 'S' ? props.theme.spaces[4] : props.theme.spaces[6])};\n padding-block: ${(props) => (props.$size === 'S' ? props.theme.spaces[3] : props.theme.spaces[6])};\n cursor: pointer;\n color: ${(props) => props.theme.colors.neutral800};\n overflow: hidden;\n\n &[data-disabled] {\n cursor: default;\n color: ${(props) => props.theme.colors.neutral600};\n }\n\n &[data-state='open'] > ${TriggerIcon} {\n transform: rotate(180deg);\n }\n\n /* we remove the default focus because the entire item should have the focus style and the default would be hidden. */\n &:focus-visible {\n outline: none;\n }\n\n @media (prefers-reduced-motion: no-preference) {\n transition: ${(props) => props.theme.transitions.color};\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Actions\n * -----------------------------------------------------------------------------------------------*/\n\ntype ActionsElement = HTMLSpanElement;\n\ninterface ActionsProps extends FlexProps<'span'> {}\n\nconst Actions = React.forwardRef<ActionsElement, ActionsProps>((props, forwardedRef) => {\n const { size } = useAccordion('Trigger');\n\n return <ActionWrapper $size={size} {...props} ref={forwardedRef} />;\n});\n\nconst ActionWrapper = styled<FlexComponent<'span'>>(Flex).attrs((props) => ({\n ...props,\n tag: 'span',\n}))<{ $size: Size }>`\n padding-inline: ${(props) => (props.$size === 'S' ? props.theme.spaces[2] : props.theme.spaces[6])};\n padding-block: ${(props) => (props.$size === 'S' ? props.theme.spaces[2] : props.theme.spaces[6])};\n\n // Remove default IconButton styles so there are no backgrounds or borders.\n & > button {\n border: none;\n background: none;\n color: ${(props) => props.theme.colors.neutral600};\n\n @media (prefers-reduced-motion: no-preference) {\n transition: ${(props) => props.theme.transitions.color};\n }\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Header\n * -----------------------------------------------------------------------------------------------*/\n\ntype HeaderElement = HTMLHeadingElement;\n\ninterface HeaderProps extends Omit<RadixAccordion.AccordionHeaderProps, 'asChild'> {\n /**\n * @default \"primary\"\n */\n variant?: Variant;\n}\n\nconst Header = React.forwardRef<HeaderElement, HeaderProps>(({ variant = 'primary', ...props }, forwardedRef) => {\n return <AccordionHeader $variant={variant} ref={forwardedRef} {...props} />;\n});\n\nconst AccordionHeader = styled(RadixAccordion.Header)<{ $variant: Variant }>`\n display: flex;\n align-items: center;\n background-color: ${(props) =>\n props.$variant === 'primary' ? props.theme.colors.neutral0 : props.theme.colors.neutral100};\n\n &[data-disabled] {\n background-color: ${(props) => props.theme.colors.neutral150};\n }\n\n &:not([data-disabled]) {\n &:hover,\n &[data-state='open'] {\n background-color: ${(props) => props.theme.colors.primary100};\n\n & > ${AccordionTrigger} {\n color: ${(props) => props.theme.colors.primary600};\n\n & ${IconBox} {\n color: ${(props) => props.theme.colors.primary600};\n }\n\n & ${TriggerIcon} {\n background-color: ${(props) => props.theme.colors.primary200};\n }\n }\n\n & > ${ActionWrapper} > button {\n color: ${(props) => props.theme.colors.primary600};\n }\n }\n }\n\n @media (prefers-reduced-motion: no-preference) {\n transition: ${(props) => props.theme.transitions.backgroundColor};\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Content\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContentElement = HTMLDivElement;\n\ninterface ContentProps extends RadixAccordion.AccordionContentProps {}\n\nconst Content = React.forwardRef<ContentElement, ContentProps>((props, forwardedRef) => {\n return <AccordionContent ref={forwardedRef} {...props} />;\n});\n\nconst slideDown = keyframes`\n from {\n height: 0;\n }\n to {\n height: var(--radix-accordion-content-height);\n }\n`;\n\nconst slideUp = keyframes`\n from {\n height: var(--radix-accordion-content-height);\n }\n to {\n height: 0;\n }\n`;\n\nconst AccordionContent = styled(RadixAccordion.Content)`\n overflow: hidden;\n\n @media (prefers-reduced-motion: no-preference) {\n &[data-state='open'] {\n animation: ${slideDown} ${(props) => props.theme.motion.timings['320']}\n ${(props) => props.theme.motion.easings.authenticMotion};\n }\n\n &[data-state='closed'] {\n animation: ${slideUp} ${(props) => props.theme.motion.timings['320']}\n ${(props) => props.theme.motion.easings.authenticMotion};\n }\n }\n`;\n\nexport { Root, Item, Header, Trigger, Actions, Content };\nexport type {\n ContextValue,\n Element,\n Props,\n ItemElement,\n ItemProps,\n HeaderElement,\n HeaderProps,\n TriggerElement,\n TriggerProps,\n ActionsElement,\n ActionsProps,\n ContentElement,\n ContentProps,\n Size,\n Variant,\n};\n","import { css } from 'styled-components';\n\nconst focus = css`\n position: relative;\n outline: none;\n\n &:after {\n transition-property: all;\n transition-duration: 0.2s;\n border-radius: 8px;\n content: '';\n position: absolute;\n top: -4px;\n bottom: -4px;\n left: -4px;\n right: -4px;\n border: 2px solid transparent;\n }\n\n &:focus-visible {\n outline: none;\n\n &:after {\n border-radius: 8px;\n content: '';\n position: absolute;\n top: -5px;\n bottom: -5px;\n left: -5px;\n right: -5px;\n border: 2px solid ${(props) => props.theme.colors.primary600};\n }\n }\n`;\n\nexport { focus };\n","import { styled } from 'styled-components';\n\nimport { PolymorphicComponentProps } from '../../types';\n\ntype VisuallyHiddenProps<C extends React.ElementType = 'span'> = PolymorphicComponentProps<\n C,\n { children?: React.ReactNode }\n>;\n\nconst VisuallyHidden = <C extends React.ElementType = 'span'>({ tag, ...props }: VisuallyHiddenProps<C>) => {\n const AsComponent = tag || 'span';\n\n return <Span {...props} as={AsComponent} />;\n};\n\nconst Span = styled.span`\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n`;\n\nexport { VisuallyHidden };\n","import * as React from 'react';\n\nimport { VisuallyHidden } from '../VisuallyHidden';\n\ninterface AccessibleIconProps {\n children?: React.ReactNode;\n /**\n * The accessible label for the icon. This label will be visually hidden but announced to screen\n * reader users, similar to `alt` text for `img` tags.\n */\n label: string;\n}\n\nconst AccessibleIcon: React.FC<AccessibleIconProps> = ({ children, label }) => {\n const child = React.Children.only(children);\n\n return (\n <>\n {React.cloneElement(child as React.ReactElement, {\n // accessibility\n 'aria-hidden': 'true',\n focusable: 'false', // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable\n })}\n <VisuallyHidden>{label}</VisuallyHidden>\n </>\n );\n};\n\nAccessibleIcon.displayName = 'AccessibleIcon';\n\nexport { AccessibleIcon };\nexport type { AccessibleIconProps };\n","import { DefaultTheme } from 'styled-components';\n\nimport type { AlertVariant } from './Alert';\n\ninterface StyledProps {\n theme: DefaultTheme;\n $variant: AlertVariant;\n}\n\nexport const handleBackgroundColor = (variant: AlertVariant): keyof DefaultTheme['colors'] => {\n switch (variant) {\n case 'danger':\n return 'danger100';\n case 'success':\n return 'success100';\n case 'warning':\n return 'warning100';\n default:\n return 'primary100';\n }\n};\n\n// border-color is always 1 shade darker than background-color\nexport const handleBorderColor = (variant: AlertVariant): keyof DefaultTheme['colors'] => {\n return handleBackgroundColor(variant).replace('100', '200') as keyof DefaultTheme['colors'];\n};\n\nexport const handleIconColor = ({ theme, $variant }: StyledProps) => {\n if ($variant === 'danger') {\n return theme.colors.danger700;\n }\n\n if ($variant === 'success') {\n return theme.colors.success700;\n }\n\n if ($variant === 'warning') {\n return theme.colors.warning700;\n }\n\n return theme.colors.primary700;\n};\n","import * as React from 'react';\n\nimport { Information, CheckCircle, WarningCircle, Cross } from '@strapi/icons';\nimport { styled } from 'styled-components';\n\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\nimport { Flex, FlexComponent } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { focus } from '../../styles/buttons';\nimport { AccessibleIcon } from '../../utilities/AccessibleIcon';\n\nimport { handleBackgroundColor, handleBorderColor, handleIconColor } from './utils';\n\nconst CloseButton = styled<BoxComponent<'button'>>(Box)`\n ${focus};\n`;\n\nconst AlertIconWrapper = styled<FlexComponent>(Flex)<{ $variant: AlertVariant }>`\n svg {\n height: 100%;\n width: 100%;\n\n path {\n fill: ${handleIconColor};\n }\n }\n`;\n\ninterface AlertIconProps extends React.SVGProps<SVGSVGElement> {\n variant: AlertVariant;\n}\n\nconst AlertIcon = ({ variant, ...props }: AlertIconProps) => {\n if (variant === 'success') {\n return <CheckCircle {...props} />;\n }\n\n if (variant === 'danger' || variant === 'warning') {\n return <WarningCircle {...props} />;\n }\n\n return <Information {...props} />;\n};\n\nconst ActionBox = styled<BoxComponent>(Box)<{ $variant: AlertVariant }>`\n & a > span {\n color: ${handleIconColor};\n }\n\n svg path {\n fill: ${handleIconColor};\n }\n`;\n\nexport type AlertVariant = 'success' | 'danger' | 'default' | 'warning';\n\nexport interface AlertProps extends BoxProps {\n /**\n * Render a React element below the body of an `Alert` (Mainly used to render a Link).\n */\n action?: React.ReactNode;\n /**\n * The body of the `Alert` (Will be rendered under the `Alert` title).\n */\n children: React.ReactNode;\n /**\n * Accessible label for the close icon button.\n */\n closeLabel: string;\n /**\n * The callback invoked when click on the close icon button.\n */\n onClose?: () => void;\n /**\n * The title of the `Alert`.\n */\n title?: string;\n /**\n * Changes the element, as which a component will render (similar to styled-components).\n */\n titleAs?: React.ElementType;\n /**\n * `Alert` color variant.\n */\n variant?: AlertVariant;\n}\n\nexport const Alert = ({\n title,\n children,\n variant = 'default',\n onClose,\n closeLabel,\n titleAs = 'p',\n action,\n ...props\n}: AlertProps) => {\n return (\n <Flex\n alignItems=\"flex-start\"\n background={handleBackgroundColor(variant)}\n borderColor={handleBorderColor(variant)}\n shadow=\"filterShadow\"\n gap={3}\n hasRadius\n padding={5}\n paddingRight={6}\n {...props}\n >\n <AlertIconWrapper height=\"2rem\" shrink={0} $variant={variant} width=\"2rem\">\n <AlertIcon aria-hidden variant={variant} />\n </AlertIconWrapper>\n\n <Flex\n alignItems=\"start\"\n gap={action ? 2 : 1}\n wrap=\"wrap\"\n role={variant === 'danger' ? 'alert' : 'status'}\n width=\"100%\"\n >\n {title && (\n <Typography fontWeight=\"bold\" textColor=\"neutral800\" tag={titleAs}>\n {title}\n </Typography>\n )}\n\n <Typography tag=\"p\" textColor=\"neutral800\">\n {children}\n </Typography>\n\n {action && <ActionBox $variant={variant}>{action}</ActionBox>}\n </Flex>\n\n <CloseButton\n tag=\"button\"\n background=\"transparent\"\n borderColor={undefined}\n height=\"1.6rem\"\n width=\"1.6rem\"\n marginTop={1}\n onClick={onClose}\n color=\"neutral700\"\n >\n <AccessibleIcon label={closeLabel}>\n <Cross />\n </AccessibleIcon>\n </CloseButton>\n </Flex>\n );\n};\n","import * as React from 'react';\n\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\n\ntype UseControllableStateParams<T> = {\n prop?: T | undefined;\n defaultProp?: T | undefined;\n onChange?: (state: T) => void;\n};\n\ntype SetStateFn<T> = (prevState?: T) => T;\n\nfunction useControllableState<T>({ prop, defaultProp, onChange = () => {} }: UseControllableStateParams<T>) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== undefined;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n\n const setValue: React.Dispatch<React.SetStateAction<T | undefined>> = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue as SetStateFn<T>;\n const value = typeof nextValue === 'function' ? setter(prop) : nextValue;\n if (value !== prop) handleChange(value as T);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange],\n );\n\n return [value, setValue] as const;\n}\n\nfunction useUncontrolledState<T>({ defaultProp, onChange }: Omit<UseControllableStateParams<T>, 'prop'>) {\n const uncontrolledState = React.useState<T | undefined>(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React.useRef(value);\n const handleChange = useCallbackRef(onChange);\n\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value as T);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n\n return uncontrolledState;\n}\n\nexport { useControllableState, useUncontrolledState as _internaluseUncontrolledState };\n","import { keyframes } from 'styled-components';\n\nconst EASINGS = {\n easeInSine: 'cubic-bezier(0.47, 0, 0.745, 0.715)',\n easeOutSine: 'cubic-bezier(0.39, 0.575, 0.565, 1)',\n easeInOutSine: 'cubic-bezier(0.39, 0.575, 0.565, 1)',\n\n easeInQuad: 'cubic-bezier(0.55, 0.085, 0.68, 0.53)',\n easeOutQuad: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',\n easeInOutQuad: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',\n\n easeInCubic: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',\n easeOutCubic: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n easeInOutCubic: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n\n easeInQuart: 'cubic-bezier(0.895, 0.03, 0.685, 0.22)',\n easeOutQuart: 'cubic-bezier(0.165, 0.84, 0.44, 1)',\n easeInOutQuart: 'cubic-bezier(0.165, 0.84, 0.44, 1)',\n\n easeInQuint: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',\n easeOutQuint: 'cubic-bezier(0.23, 1, 0.32, 1)',\n easeInOutQuint: 'cubic-bezier(0.23, 1, 0.32, 1)',\n\n easeInExpo: 'cubic-bezier(0.95, 0.05, 0.795, 0.035)',\n easeOutExpo: 'cubic-bezier(0.19, 1, 0.22, 1)',\n easeInOutExpo: 'cubic-bezier(0.19, 1, 0.22, 1)',\n\n easeInCirc: 'cubic-bezier(0.6, 0.04, 0.98, 0.335)',\n easeOutCirc: 'cubic-bezier(0.075, 0.82, 0.165, 1)',\n easeInOutCirc: 'cubic-bezier(0.075, 0.82, 0.165, 1)',\n\n easeInBack: 'cubic-bezier(0.6, -0.28, 0.735, 0.045)',\n easeOutBack: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',\n easeInOutBack: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',\n\n easeInOutFast: 'cubic-bezier(1,0,0,1)',\n\n authenticMotion: 'cubic-bezier(.4,0,.2,1)',\n};\n\nconst TIMINGS = {\n '320': '320ms',\n '200': '200ms',\n '120': '120ms',\n};\n\n/**\n * A collection of common transitions attached to the theme to be used.\n */\nconst TRANSITIONS = {\n color: `color ${TIMINGS['120']} ${EASINGS.easeOutQuad}`,\n backgroundColor: `background-color ${TIMINGS['120']} ${EASINGS.easeOutQuad}`,\n};\n\nconst ANIMATIONS = {\n overlayFadeIn: keyframes`\n from {\n opacity: 0;\n }\n to {\n opacity: 0.2;\n }\n `,\n modalPopIn: keyframes`\n from {\n transform:translate(-50%, -50%) scale(0.8);\n opacity: 0;\n }\n to {\n transform: translate(-50%, -50%) scale(1);\n opacity: 1;\n }\n `,\n modalPopOut: keyframes`\n from {\n transform: translate(-50%, -50%) scale(1);\n opacity: 1;\n }\n to {\n transform:translate(-50%, -50%) scale(0.8);\n opacity: 0;\n }\n `,\n popIn: keyframes`\n from {\n transform: scale(0.8);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n `,\n popOut: keyframes`\n from {\n transform: scale(1);\n opacity: 1;\n }\n to {\n transform: scale(0.8);\n opacity: 0;\n }\n `,\n slideDownIn: keyframes`\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n `,\n slideDownOut: keyframes`\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(-10px);\n }\n `,\n slideUpIn: keyframes`\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n `,\n slideUpOut: keyframes`\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(10px);\n }\n `,\n fadeIn: keyframes`\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n `,\n fadeOut: keyframes`\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n `,\n};\n\nexport { ANIMATIONS, EASINGS, TRANSITIONS, TIMINGS };\n","import * as React from 'react';\n\nimport * as Avatar from '@radix-ui/react-avatar';\nimport * as Tooltip from '@radix-ui/react-tooltip';\nimport { css, styled } from 'styled-components';\n\nimport { useControllableState } from '../../hooks/useControllableState';\nimport { Box, BoxComponent } from '../../primitives/Box';\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { ANIMATIONS } from '../../styles/motion';\n\n/* -------------------------------------------------------------------------------------------------\n * Item\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * The size of the avatar in pixels.\n */\nconst SIZE = 32;\n/**\n * The scale of the preview image relative to the avatar.\n */\nconst PREVIEW_SCALE = 2;\n\ntype ItemElement = HTMLSpanElement;\n\ninterface ItemProps extends Avatar.AvatarProps, Pick<Avatar.AvatarImageProps, 'onLoadingStatusChange' | 'src' | 'alt'> {\n /**\n * @default 600\n * @description Useful for delaying rendering so it only\n * appears for those with slower connections.\n */\n delayMs?: Avatar.AvatarFallbackProps['delayMs'];\n fallback: React.ReactNode;\n /**\n * @default false\n * @description Useful for showing a preview of the image\n * on hover in a tooltip.\n */\n preview?: boolean;\n}\n\nconst Item = React.forwardRef<ItemElement, ItemProps>(\n ({ onLoadingStatusChange, delayMs = 600, src, alt, fallback, preview = false, ...restProps }, forwardedRef) => {\n const [loadingStatus, setLoadingStatus] = useControllableState({\n onChange: onLoadingStatusChange,\n });\n const [tooltipOpen, setTooltipOpen] = React.useState(false);\n\n const hasPreview = preview && loadingStatus === 'loaded';\n\n const handleTooltipOpen = (isOpen: boolean) => {\n if (hasPreview) {\n setTooltipOpen(isOpen);\n }\n };\n\n return (\n <Tooltip.Root onOpenChange={handleTooltipOpen}>\n <Tooltip.Trigger asChild>\n <AvatarRoot ref={forwardedRef} {...restProps}>\n {hasPreview ? (\n <AvatarOverlay\n width=\"100%\"\n height=\"100%\"\n position=\"absolute\"\n background=\"neutral0\"\n zIndex=\"overlay\"\n style={{ opacity: tooltipOpen ? 0.4 : 0 }}\n />\n ) : null}\n <AvatarImage src={src} alt={alt} onLoadingStatusChange={setLoadingStatus} />\n <Avatar.Fallback delayMs={delayMs}>\n <Typography fontWeight=\"bold\" textTransform=\"uppercase\">\n {fallback}\n </Typography>\n </Avatar.Fallback>\n </AvatarRoot>\n </Tooltip.Trigger>\n {hasPreview ? (\n <Tooltip.Portal>\n <PreviewContent side=\"top\" sideOffset={4}>\n <PreviewImg src={src} alt={alt} />\n </PreviewContent>\n </Tooltip.Portal>\n ) : null}\n </Tooltip.Root>\n );\n },\n);\n\nconst avatarStyles = css`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n overflow: hidden;\n user-select: none;\n overflow: hidden;\n border-radius: 50%;\n`;\n\nconst imgStyles = css`\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n`;\n\nconst AvatarRoot = styled(Avatar.Root)`\n position: relative;\n z-index: 0;\n ${avatarStyles}\n width: ${SIZE / 10}rem;\n height: ${SIZE / 10}rem;\n /* TODO: we should get the user email & hash it to turn it into a hex-value so different emails can consistently get a different background */\n background-color: ${(p) => p.theme.colors.primary600};\n color: ${(p) => p.theme.colors.neutral0};\n`;\n\nconst AvatarOverlay = styled<BoxComponent>(Box)`\n @media (prefers-reduced-motion: no-preference) {\n transition: opacity ${(props) => props.theme.motion.timings['200']}\n ${(props) => props.theme.motion.easings.authenticMotion};\n }\n`;\n\nconst AvatarImage = styled(Avatar.Image)`\n ${imgStyles}\n`;\n\nconst PreviewContent = styled(Tooltip.Content)`\n ${avatarStyles}\n width: ${(SIZE * PREVIEW_SCALE) / 10}rem;\n height: ${(SIZE * PREVIEW_SCALE) / 10}rem;\n\n @media (prefers-reduced-motion: no-preference) {\n animation: ${ANIMATIONS.fadeIn} ${(props) => props.theme.motion.timings['200']}\n ${(props) => props.theme.motion.easings.authenticMotion};\n }\n`;\n\nconst PreviewImg = styled.img`\n ${imgStyles}\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Group\n * -----------------------------------------------------------------------------------------------*/\n\ntype GroupElement = HTMLDivElement;\n\ninterface GroupProps extends Omit<FlexProps, 'tag'> {}\n\nconst Group = React.forwardRef<GroupElement, GroupProps>((props, forwarededRef) => {\n return <GroupFlex {...props} ref={forwarededRef} tag=\"div\" />;\n});\n\nconst GroupFlex = styled<FlexComponent>(Flex)`\n & > ${AvatarRoot} + ${AvatarRoot} {\n margin-left: -${SIZE / 10 / 2}rem;\n }\n`;\n\nexport { Item, Group };\nexport type { ItemElement, ItemProps, GroupElement, GroupProps };\n","import { css, styled } from 'styled-components';\n\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { DefaultThemeOrCSSProp } from '../../types';\n\ntype BadgeSize = 'S' | 'M';\n\ninterface BadgeProps extends FlexProps {\n /**\n * If `true`, it changes the `backgroundColor` to `primary200` and the `textColor` to `primary600`\n */\n active?: boolean;\n backgroundColor?: DefaultThemeOrCSSProp<'colors', 'background'>;\n /**\n * @default 'M'\n */\n size?: BadgeSize;\n textColor?: DefaultThemeOrCSSProp<'colors', 'color'>;\n}\n\nconst Badge = ({\n active = false,\n size = 'M',\n textColor = 'neutral600',\n backgroundColor = 'neutral150',\n children,\n minWidth = 5,\n ...props\n}: BadgeProps) => {\n const paddingX = size === 'S' ? 1 : 2;\n\n return (\n <Base\n inline\n alignItems=\"center\"\n justifyContent=\"center\"\n minWidth={minWidth}\n paddingLeft={paddingX}\n paddingRight={paddingX}\n background={active ? 'primary200' : backgroundColor}\n $size={size}\n {...props}\n >\n <Typography variant=\"sigma\" textColor={active ? 'primary600' : textColor} lineHeight=\"1rem\">\n {children}\n </Typography>\n </Base>\n );\n};\n\nconst Base = styled<FlexComponent>(Flex)<{ $size: BadgeSize }>`\n border-radius: ${({ theme, $size }) => ($size === 'S' ? '2px' : theme.borderRadius)};\n ${({ $size, theme }) => {\n if ($size === 'S') {\n return css`\n padding-block: 0.3rem;\n padding-inline ${theme.spaces[1]}\n `;\n }\n\n return css`\n padding-block: 0.7rem;\n padding-inline ${theme.spaces[2]}\n `;\n }};\n`;\n\nexport { Badge };\nexport type { BadgeProps, BadgeSize };\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\nimport { forwardRef } from '../../utilities/forwardRef';\n\ntype BaseLinkProps<C extends React.ElementType = 'a'> = BoxProps<C> & {\n disabled?: boolean;\n isExternal?: boolean;\n};\n\nconst BaseLinkImpl = forwardRef<HTMLAnchorElement, BaseLinkProps>(\n ({ href, disabled = false, isExternal = false, ...props }, ref) => {\n return (\n <BaseLink\n tag=\"a\"\n ref={ref}\n target={isExternal ? '_blank' : undefined}\n rel={isExternal ? 'noreferrer noopener' : undefined}\n href={href}\n tabIndex={disabled ? -1 : undefined}\n aria-disabled={disabled}\n pointerEvents={disabled ? 'none' : undefined}\n cursor={disabled ? undefined : 'pointer'}\n {...props}\n />\n );\n },\n);\n\nconst BaseLink = styled<BoxComponent<'a'>>(Box)`\n text-decoration: none;\n\n &:visited {\n color: inherit;\n }\n`;\n\ntype BaseLinkComponent<C extends React.ElementType = 'a'> = (props: BaseLinkProps<C>) => React.ReactNode;\n\nexport { BaseLinkImpl as BaseLink };\nexport type { BaseLinkProps, BaseLinkComponent };\n","import * as React from 'react';\n\nimport { Box } from '../../primitives/Box';\nimport { Typography } from '../../primitives/Typography';\n\nexport const Divider = () => {\n return (\n <Box aria-hidden paddingLeft={1} paddingRight={1}>\n <Typography variant=\"pi\" textColor=\"neutral500\">\n /\n </Typography>\n </Box>\n );\n};\n\nDivider.displayName = 'Divider';\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Box } from '../../primitives/Box';\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\n\nimport { Divider } from './Divider';\n\nconst AlignedList = styled<FlexComponent<'ol'>>(Flex)`\n // CrumbLinks do have padding-x, because they need to have a\n // interaction effect, which mis-aligns the breadcrumbs on the left.\n // This normalizes the behavior by moving the first item to left by\n // the same amount it has inner padding\n & > *:first-child {\n margin-left: ${({ theme }) => `calc(-1*${theme.spaces[2]})`};\n }\n`;\n\nexport interface BreadcrumbsProps extends FlexProps {\n label?: string;\n}\n\nexport const Breadcrumbs = React.forwardRef<HTMLDivElement, BreadcrumbsProps>(\n ({ label, children, ...props }, forwardedRef) => {\n const childrenArray = React.Children.toArray(children);\n\n return (\n <Box aria-label={label} tag=\"nav\" {...props} ref={forwardedRef}>\n <AlignedList tag=\"ol\">\n {React.Children.map(childrenArray, (child, index) => {\n const shouldDisplayDivider = childrenArray.length > 1 && index + 1 < childrenArray.length;\n\n return (\n <Flex inline tag=\"li\">\n {child}\n {shouldDisplayDivider && <Divider />}\n </Flex>\n );\n })}\n </AlignedList>\n </Box>\n );\n },\n);\n\nBreadcrumbs.displayName = 'Breadcrumbs';\n","import * as React from 'react';\n\nimport { Box } from '../../primitives/Box';\nimport { Typography, TypographyProps } from '../../primitives/Typography';\n\nexport interface CrumbProps extends TypographyProps {\n isCurrent?: boolean;\n}\n\nexport const Crumb = React.forwardRef<HTMLDivElement, CrumbProps>(\n ({ children, isCurrent = false, ...props }, forwardedRef) => (\n <Box paddingLeft={2} paddingRight={2} paddingTop={1} paddingBottom={1} ref={forwardedRef}>\n <Typography\n variant=\"pi\"\n textColor=\"neutral800\"\n fontWeight={isCurrent ? 'bold' : 'regular'}\n aria-current={isCurrent}\n {...props}\n >\n {children}\n </Typography>\n </Box>\n ),\n);\n\nCrumb.displayName = 'Crumb';\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { BaseLink, BaseLinkProps } from '../BaseLink';\n\nconst StyledLink = styled(BaseLink)`\n border-radius: ${({ theme }) => theme.borderRadius};\n color: ${({ theme }) => theme.colors.neutral600};\n font-size: ${({ theme }) => theme.fontSizes[1]};\n line-height: ${({ theme }) => theme.lineHeights[4]};\n padding: ${({ theme }) => `${theme.spaces[1]} ${theme.spaces[2]}`};\n text-decoration: none;\n\n :hover,\n :focus {\n background-color: ${({ theme }) => theme.colors.neutral200};\n color: ${({ theme }) => theme.colors.neutral700};\n }\n`;\n\nexport const CrumbLink = React.forwardRef<HTMLAnchorElement, BaseLinkProps>(({ children, ...props }, forwardedRef) => (\n <StyledLink ref={forwardedRef} {...props}>\n {children}\n </StyledLink>\n));\n\nCrumbLink.displayName = 'CrumbLink';\n","export const stripReactIdOfColon = (str: string): string => str.replaceAll(':', '');\n","import * as React from 'react';\n\ntype PossibleRef<T> = React.Ref<T> | undefined;\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */\nfunction setRef<T>(ref: PossibleRef<T>, value: T) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref !== null && ref !== undefined) {\n (ref as React.MutableRefObject<T>).current = value;\n }\n}\n\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */\nfunction composeRefs<T>(...refs: PossibleRef<T>[]) {\n return (node: T) => refs.forEach((ref) => setRef(ref, node));\n}\n\n/**\n * Takes multiple React like refs either React.Ref or a callback:\n * (node: T) => void and returns a single function that can be\n * passed to a React component as a ref.\n *\n * Example:\n * ```tsx\n * import { useComposedRefs } from '../hooks/useComposedRefs';\n *\n * const Component = React.forwardRef<HTMLInputElement, ComponentProps>((props, forwardedRef) => {\n * const ref = useComposedRefs(internalRef, forwardedRef);\n *\n * React.useEffect(() => {\n * ref.current.focus();\n * }, [ref]);\n *\n * return <input ref={ref} />\n * }\n * ```\n */\nfunction useComposedRefs<T>(...refs: PossibleRef<T>[]) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs);\n}\n\nexport { composeRefs, useComposedRefs };\n","import { useEffect, useLayoutEffect } from 'react';\n\n// For server-side rendering: https://github.com/react-spring/zustand/pull/34\n// Deno support: https://github.com/pmndrs/zustand/issues/347\n\nexport const isSSR = () =>\n typeof window === 'undefined' || !window.navigator || /ServerSideRendering|^Deno\\//.test(window.navigator.userAgent);\n\n/**\n * Use this to read layout from the DOM and synchronously\n * re-render if the isSSR returns true. Updates scheduled\n * inside `useIsomorphicLayoutEffect` will be flushed\n * synchronously in the browser, before the browser has\n * a chance to paint.\n */\nconst useIsomorphicLayoutEffect = isSSR() ? useEffect : useLayoutEffect;\n\nexport { useIsomorphicLayoutEffect };\n","import * as React from 'react';\n\nimport { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect';\n\n// Inspired by radix-ui useId hook https://github.com/radix-ui/primitives/blob/main/packages/react/id/src/id.tsx\n// We `toString()` to prevent bundlers from trying to `import { useId } from 'react';`\nconst useReactId = (React as any)['useId'.toString()] || (() => undefined);\nlet count = 0;\n\nexport const useId = (initialId?: string | number | undefined): string => {\n const [id, setId] = React.useState(useReactId());\n\n // React versions older than 18 will have client-side ids only.\n useIsomorphicLayoutEffect(() => {\n if (!initialId) setId((reactId) => reactId ?? String(count++));\n }, [initialId]);\n\n return initialId?.toString() ?? (id || '');\n};\n","import * as React from 'react';\n\nimport { useCallbackRef } from '@strapi/ui-primitives';\n\ninterface UseIntersectionOptions {\n selectorToWatch: string;\n skipWhen?: boolean;\n}\n\n/**\n * TODO: refactor this before v2 stable.\n */\n\nexport const useIntersection = (\n scrollableAreaRef: React.MutableRefObject<HTMLElement | null>,\n callback: (entry: IntersectionObserverEntry) => void,\n { selectorToWatch, skipWhen = false }: UseIntersectionOptions,\n) => {\n const handleIntersection = useCallbackRef(callback);\n\n React.useEffect(() => {\n if (skipWhen || !scrollableAreaRef.current) return;\n\n const options = {\n root: scrollableAreaRef.current,\n rootMargin: '0px',\n };\n\n const onEnterZone: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting && scrollableAreaRef.current) {\n if (scrollableAreaRef.current.scrollHeight > scrollableAreaRef.current.clientHeight) {\n handleIntersection(entry);\n }\n }\n });\n };\n\n const observer = new IntersectionObserver(onEnterZone, options);\n /**\n * @note We need to escape the selector because we use `React.useId` to generate our ids an\n * they contain `:` which is not a valid selector because it's part of the CSS spec\n */\n const target = scrollableAreaRef.current.querySelector(selectorToWatch);\n\n if (target) {\n observer.observe(target);\n }\n\n return () => {\n observer.disconnect();\n };\n }, [skipWhen, handleIntersection, selectorToWatch, scrollableAreaRef]);\n};\n","export const SUCCESS_LIGHT = 'success-light';\nexport const DANGER_LIGHT = 'danger-light';\nexport const DEFAULT = 'default';\nexport const TERTIARY = 'tertiary';\nexport const SECONDARY = 'secondary';\nexport const DANGER = 'danger';\nexport const SUCCESS = 'success';\nexport const GHOST = 'ghost';\n\nexport const LIGHT_VARIANTS = [SUCCESS_LIGHT, DANGER_LIGHT] as const;\nexport const VARIANTS = [DEFAULT, TERTIARY, SECONDARY, DANGER, SUCCESS, GHOST, ...LIGHT_VARIANTS] as const;\nexport const BUTTON_SIZES = ['XS', 'S', 'M', 'L'] as const;\n\nexport type ButtonVariant = (typeof VARIANTS)[number];\nexport type ButtonSize = (typeof BUTTON_SIZES)[number];\n","import { DefaultTheme, css } from 'styled-components';\n\nimport {\n LIGHT_VARIANTS,\n VARIANTS,\n SECONDARY,\n TERTIARY,\n DEFAULT,\n GHOST,\n DANGER,\n SUCCESS,\n DANGER_LIGHT,\n SUCCESS_LIGHT,\n type ButtonVariant,\n} from './constants';\n\nexport const getVariantColorName = (variant: ButtonVariant): 'success' | 'danger' | 'neutral' | 'primary' => {\n if (variant === SUCCESS_LIGHT || variant === DANGER_LIGHT) {\n return `${variant.substring(0, variant.lastIndexOf('-'))}` as 'success' | 'danger';\n }\n if (variant === TERTIARY) {\n return 'neutral';\n }\n if (variant === DEFAULT || variant === SECONDARY || VARIANTS.every((vari) => vari !== variant)) {\n return 'primary';\n }\n\n // @ts-expect-error ghost is a variant, but ghostXXX is not any color...\n return `${variant}`;\n};\n\nexport const getDisabledStyle = ({ theme }: { theme: DefaultTheme }) => {\n return css`\n border: 1px solid ${theme.colors.neutral200};\n background: ${theme.colors.neutral150};\n color: ${theme.colors.neutral600};\n cursor: default;\n `;\n};\n\nexport const getHoverStyle = ({ theme, $variant }: { theme: DefaultTheme; $variant: ButtonVariant }) => {\n if ([...LIGHT_VARIANTS, SECONDARY].includes($variant)) {\n return css`\n background-color: ${theme.colors.neutral0};\n `;\n }\n if ($variant === TERTIARY) {\n return css`\n background-color: ${theme.colors.neutral100};\n `;\n }\n\n if ($variant === GHOST) {\n return css`\n background-color: ${theme.colors.neutral100};\n `;\n }\n\n if ($variant === DEFAULT) {\n return css`\n border: 1px solid ${theme.colors.buttonPrimary500};\n background: ${theme.colors.buttonPrimary500};\n `;\n }\n\n return css`\n border: 1px solid ${theme.colors[`${getVariantColorName($variant)}500`]};\n background: ${theme.colors[`${getVariantColorName($variant)}500`]};\n `;\n};\n\nexport const getActiveStyle = ({ theme, $variant }: { theme: DefaultTheme; $variant: ButtonVariant }) => {\n if ([...LIGHT_VARIANTS, SECONDARY].includes($variant)) {\n return css`\n background-color: ${theme.colors.neutral0};\n border: 1px solid ${theme.colors[`${getVariantColorName($variant)}600`]};\n color: ${theme.colors[`${getVariantColorName($variant)}600`]};\n `;\n }\n if ($variant === TERTIARY || $variant === GHOST) {\n return css`\n background-color: ${theme.colors.neutral150};\n `;\n }\n\n return css`\n border: 1px solid ${theme.colors[`${getVariantColorName($variant)}600`]};\n background: ${theme.colors[`${getVariantColorName($variant)}600`]};\n `;\n};\n\nexport const getVariantStyle = ({ theme, $variant }: { theme: DefaultTheme; $variant: ButtonVariant }) => {\n switch ($variant) {\n case DANGER_LIGHT:\n case SUCCESS_LIGHT:\n case SECONDARY: {\n return css`\n border: 1px solid ${theme.colors[`${getVariantColorName($variant)}200`]};\n background: ${theme.colors[`${getVariantColorName($variant)}100`]};\n color: ${theme.colors[`${getVariantColorName($variant)}700`]};\n `;\n }\n case TERTIARY: {\n return css`\n border: 1px solid ${theme.colors.neutral200};\n background: ${theme.colors.neutral0};\n color: ${theme.colors.neutral800};\n `;\n }\n case GHOST: {\n return css`\n border: 1px solid transparent;\n background: transparent;\n color: ${theme.colors.neutral800};\n\n svg {\n fill: ${theme.colors.neutral500};\n }\n `;\n }\n case SUCCESS:\n case DANGER: {\n return css`\n border: 1px solid ${theme.colors[`${getVariantColorName($variant)}600`]};\n background: ${theme.colors[`${getVariantColorName($variant)}600`]};\n color: ${theme.colors.neutral0};\n `;\n }\n default: {\n return css`\n border: 1px solid ${theme.colors.buttonPrimary600};\n background: ${theme.colors.buttonPrimary600};\n color: ${theme.colors.buttonNeutral0};\n `;\n }\n }\n};\n","import * as React from 'react';\n\nimport { Loader } from '@strapi/icons';\nimport { styled, keyframes } from 'styled-components';\n\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { PolymorphicRef, PropsToTransientProps } from '../../types';\nimport { forwardRef } from '../../utilities/forwardRef';\n\nimport { BUTTON_SIZES, ButtonVariant, ButtonSize, DEFAULT } from './constants';\nimport { getDisabledStyle, getHoverStyle, getActiveStyle, getVariantStyle } from './utils';\n\ntype ButtonProps<C extends React.ElementType = 'button'> = FlexProps<C> & {\n disabled?: boolean;\n endIcon?: React.ReactNode;\n fullWidth?: boolean;\n loading?: boolean;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n size?: ButtonSize;\n startIcon?: React.ReactNode;\n variant?: ButtonVariant;\n};\n\nconst Button = forwardRef(\n <C extends React.ElementType = 'button'>(\n {\n variant = DEFAULT,\n startIcon,\n endIcon,\n disabled = false,\n children,\n onClick,\n size = BUTTON_SIZES[1],\n loading = false,\n fullWidth = false,\n ...props\n }: ButtonProps<C>,\n ref: PolymorphicRef<C>,\n ) => {\n const isDisabled = disabled || loading;\n\n const handleClick: React.MouseEventHandler<HTMLButtonElement> = (e) => {\n if (!isDisabled && onClick) {\n onClick(e);\n }\n };\n\n return (\n <ButtonWrapper\n ref={ref}\n aria-disabled={isDisabled}\n disabled={isDisabled}\n $size={size}\n $variant={variant}\n tag=\"button\"\n onClick={handleClick}\n hasRadius\n gap={2}\n inline\n alignItems=\"center\"\n justifyContent=\"center\"\n width={fullWidth ? '100%' : undefined}\n paddingLeft={4}\n paddingRight={4}\n cursor=\"pointer\"\n {...props}\n >\n {(startIcon || loading) && (\n <Flex tag=\"span\" aria-hidden>\n {loading ? <LoaderAnimated /> : startIcon}\n </Flex>\n )}\n\n <Typography variant={size === 'S' ? 'pi' : undefined} fontWeight=\"bold\">\n {children}\n </Typography>\n\n {endIcon && (\n <Flex tag=\"span\" aria-hidden>\n {endIcon}\n </Flex>\n )}\n </ButtonWrapper>\n );\n },\n);\n\ntype ButtonComponent<C extends React.ElementType = 'button'> = (props: ButtonProps<C>) => React.ReactNode;\n\nconst rotation = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n`;\n\nconst LoaderAnimated = styled(Loader)`\n animation: ${rotation} 2s infinite linear;\n will-change: transform;\n`;\n\ntype ButtonWrapperProps = PropsToTransientProps<Required<Pick<ButtonProps, 'size' | 'variant'>>>;\n\nconst ButtonWrapper = styled<FlexComponent<'button'>>(Flex)<ButtonWrapperProps>`\n height: ${({ theme, $size }) => theme.sizes.button[$size]};\n text-decoration: none;\n ${getVariantStyle}\n\n &:hover {\n ${getHoverStyle}\n }\n\n &:active {\n ${getActiveStyle}\n }\n\n &[aria-disabled='true'] {\n ${getDisabledStyle}\n }\n\n @media (prefers-reduced-motion: no-preference) {\n transition:\n ${(props) => props.theme.transitions.backgroundColor},\n ${(props) => props.theme.transitions.color},\n border-color ${(props) => props.theme.motion.timings['200']} ${(props) => props.theme.motion.easings.easeOutQuad};\n }\n`;\n\nexport { Button };\nexport type { ButtonComponent, ButtonProps };\n","import * as React from 'react';\n\nimport * as Tooltip from '@radix-ui/react-tooltip';\nimport { styled } from 'styled-components';\n\nimport { Typography } from '../../primitives/Typography';\nimport { ANIMATIONS } from '../../styles/motion';\n\ntype TooltipElement = HTMLDivElement;\n\ninterface TooltipProps extends Tooltip.TooltipContentProps {\n children?: React.ReactNode;\n defaultOpen?: boolean;\n /**\n * The duration from when the pointer enters the trigger until the tooltip gets opened. This will\n * override the prop with the same name passed to Provider.\n * @default 500\n */\n delayDuration?: number;\n /**\n * @deprecated Use `label` instead.\n */\n description?: string;\n /**\n * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.\n * @default false\n */\n disableHoverableContent?: boolean;\n label?: React.ReactNode;\n onOpenChange?: (open: boolean) => void;\n open?: boolean;\n}\n\nconst TooltipImpl = React.forwardRef<TooltipElement, TooltipProps>(\n (\n {\n children,\n description,\n label,\n defaultOpen,\n open,\n onOpenChange,\n delayDuration = 500,\n disableHoverableContent,\n ...restProps\n },\n forwardedRef,\n ) => {\n if (!label && !description) return children;\n\n return (\n <Tooltip.Root\n defaultOpen={defaultOpen}\n open={open}\n onOpenChange={onOpenChange}\n delayDuration={delayDuration}\n disableHoverableContent={disableHoverableContent}\n >\n <Tooltip.Trigger asChild>{children}</Tooltip.Trigger>\n <Tooltip.Portal>\n <TooltipContent ref={forwardedRef} sideOffset={8} {...restProps}>\n <Typography variant=\"pi\" fontWeight=\"bold\">\n {label || description}\n </Typography>\n </TooltipContent>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n },\n);\n\nconst TooltipContent = styled(Tooltip.Content)`\n background-color: ${(props) => props.theme.colors.neutral900};\n color: ${(props) => props.theme.colors.neutral0};\n padding-inline: ${(props) => props.theme.spaces[2]};\n padding-block: ${(props) => props.theme.spaces[2]};\n border-radius: ${(props) => props.theme.borderRadius};\n z-index: ${(props) => props.theme.zIndices.tooltip};\n will-change: opacity;\n transform-origin: var(--radix-tooltip-content-transform-origin);\n\n @media (prefers-reduced-motion: no-preference) {\n animation: ${ANIMATIONS.fadeIn} ${(props) => props.theme.motion.timings['200']}\n ${(props) => props.theme.motion.easings.authenticMotion};\n }\n`;\n\nexport { TooltipImpl as Tooltip };\nexport type { TooltipProps, TooltipElement };\n","import * as React from 'react';\n\nimport { css, styled } from 'styled-components';\n\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { PolymorphicRef, PropsToTransientProps } from '../../types';\nimport { AccessibleIcon } from '../../utilities/AccessibleIcon';\nimport { forwardRef } from '../../utilities/forwardRef';\nimport { ButtonProps } from '../Button';\nimport { getActiveStyle, getDisabledStyle, getHoverStyle, getVariantStyle } from '../Button/utils';\nimport { Tooltip } from '../Tooltip';\n\ntype IconButtonProps<C extends React.ElementType = 'button'> = FlexProps<C> &\n Pick<ButtonProps, 'size' | 'variant'> & {\n children: React.ReactNode;\n disabled?: boolean;\n /**\n * This isn't visually rendered, but required for accessibility.\n */\n label: string;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n /**\n * @default true\n */\n withTooltip?: boolean;\n };\n\nconst IconButton = forwardRef(\n <C extends React.ElementType = 'button'>(\n {\n label,\n background,\n children,\n disabled = false,\n onClick,\n size = 'S',\n variant = 'tertiary',\n withTooltip = true,\n ...restProps\n }: IconButtonProps<C>,\n ref: PolymorphicRef<C>,\n ) => {\n const handleClick: React.MouseEventHandler<HTMLButtonElement> = (e) => {\n if (!disabled && onClick) {\n onClick(e);\n }\n };\n\n const component = (\n <IconButtonWrapper\n aria-disabled={disabled}\n background={disabled ? 'neutral150' : background}\n tag=\"button\"\n display=\"inline-flex\"\n justifyContent=\"center\"\n hasRadius\n cursor=\"pointer\"\n {...restProps}\n ref={ref}\n $size={size}\n onClick={handleClick}\n $variant={variant}\n >\n <AccessibleIcon label={label}>{children}</AccessibleIcon>\n </IconButtonWrapper>\n );\n\n return withTooltip ? <Tooltip label={label}>{component}</Tooltip> : component;\n },\n);\n\ntype IconButtonComponent<C extends React.ElementType = 'button'> = (props: IconButtonProps<C>) => React.ReactNode;\n\ntype IconButtonWrapperProps = PropsToTransientProps<Required<Pick<IconButtonProps, 'size' | 'variant'>>>;\n\nconst IconButtonWrapper = styled<FlexComponent<'button'>>(Flex)<IconButtonWrapperProps>`\n text-decoration: none;\n\n ${(props) => {\n // NOTE! the border adds `1px` on each edge, so the padding accounts for this.\n switch (props.$size) {\n case 'XS': {\n return css`\n padding-block: 0.25rem;\n padding-inline: 0.25rem;\n `;\n }\n case 'S': {\n return css`\n padding-block: 0.7rem;\n padding-inline: 0.7rem;\n `;\n }\n case 'M': {\n return css`\n padding-block: 0.9rem;\n padding-inline: 0.9rem;\n `;\n }\n case 'L': {\n return css`\n padding-block: 1.1rem;\n padding-inline: 1.1rem;\n `;\n }\n }\n }}\n ${getVariantStyle}\n ${(props) =>\n props.$variant === 'tertiary'\n ? css`\n color: ${props.theme.colors.neutral500};\n `\n : ''}\n\n &:hover {\n ${getHoverStyle}\n ${(props) =>\n props.$variant === 'tertiary'\n ? css`\n color: ${props.theme.colors.neutral600};\n `\n : ''}\n }\n\n &:active {\n ${getActiveStyle}\n }\n\n &[aria-disabled='true'] {\n ${getDisabledStyle}\n }\n\n @media (prefers-reduced-motion: no-preference) {\n transition:\n ${(props) => props.theme.transitions.backgroundColor},\n ${(props) => props.theme.transitions.color},\n border-color ${(props) => props.theme.motion.timings['200']} ${(props) => props.theme.motion.easings.easeOutQuad};\n }\n`;\n\nconst IconButtonGroup = styled<FlexComponent>(Flex)`\n & ${IconButtonWrapper}:first-child {\n border-radius: ${({ theme }) => `${theme.borderRadius} 0 0 ${theme.borderRadius}`};\n }\n\n & ${IconButtonWrapper}:last-child {\n border-radius: ${({ theme }) => `0 ${theme.borderRadius} ${theme.borderRadius} 0`};\n }\n\n & ${IconButtonWrapper} {\n border-radius: 0;\n\n & + ${IconButtonWrapper} {\n border-left: none;\n }\n }\n`;\n\nexport { IconButton, IconButtonGroup };\nexport type { IconButtonProps, IconButtonComponent };\n","import * as React from 'react';\n\nimport { ExternalLink } from '@strapi/icons';\nimport { styled } from 'styled-components';\n\nimport { Typography } from '../../primitives/Typography';\nimport { focus } from '../../styles/buttons';\nimport { PolymorphicRef } from '../../types';\nimport { forwardRef } from '../../utilities/forwardRef';\nimport { BaseLink, BaseLinkComponent, BaseLinkProps } from '../BaseLink';\n\ntype LinkProps<C extends React.ElementType = 'a'> = BaseLinkProps<C> & {\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n /**\n * @default false\n */\n isExternal?: boolean;\n};\n\nconst Link = forwardRef(\n <C extends React.ElementType = 'a'>(\n { children, href, disabled = false, startIcon, endIcon, isExternal = false, ...props }: LinkProps<C>,\n ref: PolymorphicRef<C>,\n ) => {\n return (\n <LinkWrapper ref={ref} href={href} disabled={disabled} isExternal={isExternal} {...props}>\n {startIcon}\n <Typography textColor={disabled ? 'neutral600' : 'primary600'}>{children}</Typography>\n {endIcon}\n {href && !endIcon && isExternal && <ExternalLink />}\n </LinkWrapper>\n );\n },\n);\n\ntype LinkComponent<C extends React.ElementType = 'a'> = (props: LinkProps<C>) => React.ReactNode;\n\nconst LinkWrapper = styled<BaseLinkComponent>(BaseLink)`\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n gap: ${({ theme }) => theme.spaces[2]};\n pointer-events: ${({ disabled }) => (disabled ? 'none' : undefined)};\n\n svg {\n font-size: 1rem;\n\n path {\n fill: ${({ disabled, theme }) => (disabled ? theme.colors.neutral600 : theme.colors.primary600)};\n }\n }\n\n &:hover {\n & > span {\n color: ${({ theme }) => theme.colors.primary500};\n }\n\n svg path {\n fill: ${({ theme }) => theme.colors.primary500};\n }\n }\n\n &:active {\n color: ${({ theme }) => theme.colors.primary700};\n }\n\n ${focus};\n`;\n\nexport { Link };\nexport type { LinkProps, LinkComponent };\n","import * as React from 'react';\n\nimport * as DropdownMenu from '@radix-ui/react-dropdown-menu';\nimport { CaretDown, ChevronRight } from '@strapi/icons';\nimport { styled, css, type DefaultTheme } from 'styled-components';\n\nimport { extractStyleFromTheme } from '../../helpers/theme';\nimport { Box, BoxProps } from '../../primitives/Box';\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { Typography, TypographyComponent, TypographyProps } from '../../primitives/Typography';\nimport { ANIMATIONS } from '../../styles/motion';\nimport { BaseLink } from '../BaseLink';\nimport { Button, ButtonProps } from '../Button';\nimport { IconButton } from '../IconButton';\nimport { Link, LinkProps } from '../Link';\n\n/* -------------------------------------------------------------------------------------------------\n * MenuRoot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface RootProps extends DropdownMenu.DropdownMenuProps {}\n\nconst MenuRoot = DropdownMenu.Root;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\ntype TriggerPropsBase = Omit<ButtonProps, 'tag'> & {\n endIcon?: React.ReactNode;\n label?: React.ReactNode | string;\n};\n\ntype TriggerPropsWithButton = TriggerPropsBase & {\n tag?: typeof Button;\n icon?: React.ReactNode;\n};\n\ntype TriggerPropsWithIconButton = TriggerPropsBase & {\n tag: typeof IconButton;\n icon: React.ReactNode;\n};\n\ntype TriggerProps = TriggerPropsWithButton | TriggerPropsWithIconButton;\n\nconst MenuTrigger = React.forwardRef<HTMLButtonElement, TriggerProps>(\n ({ label, endIcon = <CaretDown width=\"1.2rem\" height=\"1.2rem\" aria-hidden />, tag = Button, icon, ...rest }, ref) => {\n const props: ButtonProps = {\n ...rest,\n ref,\n type: 'button',\n };\n\n return (\n <DropdownMenu.Trigger asChild disabled={props.disabled}>\n {tag === IconButton ? (\n <IconButton label={label as string} variant=\"tertiary\" {...props}>\n {icon}\n </IconButton>\n ) : (\n <Button endIcon={endIcon} variant=\"ghost\" {...props} />\n )}\n </DropdownMenu.Trigger>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuContent\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContentProps = FlexProps<'div'> &\n Pick<DropdownMenu.DropdownMenuContentProps, 'onCloseAutoFocus'> & {\n intersectionId?: string;\n popoverPlacement?: `${NonNullable<DropdownMenu.DropdownMenuContentProps['side']>}-${NonNullable<DropdownMenu.DropdownMenuContentProps['align']>}`;\n };\n\nconst MenuContent = React.forwardRef<HTMLDivElement, ContentProps>(\n ({ children, intersectionId, onCloseAutoFocus, popoverPlacement = 'bottom-start', ...props }, ref) => {\n const [side, align] = popoverPlacement.split('-') as [\n DropdownMenu.DropdownMenuContentProps['side'],\n DropdownMenu.DropdownMenuContentProps['align'],\n ];\n\n return (\n <DropdownMenu.Portal>\n <DropdownMenuContent align={align} side={side} loop onCloseAutoFocus={onCloseAutoFocus} asChild>\n <Viewport\n ref={ref}\n direction=\"column\"\n borderColor=\"neutral150\"\n hasRadius\n background=\"neutral0\"\n shadow=\"filterShadow\"\n maxHeight=\"15rem\"\n padding={1}\n marginTop={1}\n marginBottom={1}\n alignItems=\"flex-start\"\n position=\"relative\"\n overflow=\"auto\"\n {...props}\n >\n {children}\n <Box id={intersectionId} width=\"100%\" height=\"1px\" />\n </Viewport>\n </DropdownMenuContent>\n </DropdownMenu.Portal>\n );\n },\n);\n\nconst Viewport = styled<FlexComponent>(Flex)`\n scrollbar-width: none;\n -ms-overflow-style: none;\n -webkit-overflow-scrolling: touch;\n z-index: ${(props) => props.theme.zIndices.popover};\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nconst DropdownMenuContent = styled(DropdownMenu.Content)`\n @media (prefers-reduced-motion: no-preference) {\n animation-duration: ${(props) => props.theme.motion.timings['200']};\n\n &[data-state='open'] {\n animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};\n\n &[data-side='top'] {\n animation-name: ${ANIMATIONS.slideUpIn};\n }\n\n &[data-side='bottom'] {\n animation-name: ${ANIMATIONS.slideDownIn};\n }\n }\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuItem\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ItemSharedProps extends Pick<DropdownMenu.MenuItemProps, 'disabled' | 'onSelect'> {\n children?: React.ReactNode;\n isExternal?: boolean;\n isFocused?: boolean;\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n}\n\ninterface ItemExternalLinkProps extends ItemSharedProps, Omit<LinkProps, 'onSelect'> {\n as?: never;\n isLink?: false;\n isExternal?: true;\n}\n\ntype ItemInternalLinkProps<TComponent extends React.ComponentType = typeof BaseLink> = ItemSharedProps &\n React.ComponentPropsWithoutRef<TComponent> & {\n as?: TComponent;\n isLink?: true;\n isExternal?: false;\n };\n\ninterface ItemButtonProps extends ItemSharedProps, Omit<BoxProps<'button'>, 'onSelect'> {\n as?: never;\n isLink?: false;\n isExternal?: false;\n}\n\ntype ItemProps<TComponent extends React.ComponentType = typeof BaseLink> =\n | ItemButtonProps\n | ItemInternalLinkProps<TComponent>\n | ItemExternalLinkProps;\n\nconst MenuItem = ({ onSelect, disabled = false, isLink, startIcon, endIcon, isExternal, ...props }: ItemProps) => {\n return (\n <DropdownMenu.Item asChild onSelect={onSelect} disabled={disabled}>\n {isLink || isExternal ? (\n <OptionLink\n color=\"neutral800\"\n startIcon={startIcon}\n endIcon={endIcon}\n {...props}\n isExternal={isExternal ?? false}\n >\n <Typography>{props.children}</Typography>\n </OptionLink>\n ) : (\n <OptionButton\n cursor=\"pointer\"\n color=\"neutral800\"\n background=\"transparent\"\n borderStyle=\"none\"\n gap={2}\n {...props}\n >\n {startIcon && (\n <Flex tag=\"span\" aria-hidden>\n {startIcon}\n </Flex>\n )}\n\n <Typography grow={1}>{props.children}</Typography>\n\n {endIcon && (\n <Flex tag=\"span\" aria-hidden>\n {endIcon}\n </Flex>\n )}\n </OptionButton>\n )}\n </DropdownMenu.Item>\n );\n};\n\nconst getOptionStyle = ({ theme }: { theme: DefaultTheme }) => css`\n text-align: left;\n width: 100%;\n border-radius: ${theme.borderRadius};\n padding: ${theme.spaces[2]} ${theme.spaces[4]};\n\n &[aria-disabled='true'] {\n cursor: not-allowed;\n color: ${theme.colors.neutral500};\n }\n\n &[data-highlighted] {\n background-color: ${theme.colors.primary100};\n }\n\n &:focus-visible {\n outline: none;\n\n &:after {\n content: none;\n }\n }\n`;\n\nconst OptionButton = styled<FlexComponent<'button' | 'a'>>(Flex)`\n ${getOptionStyle}\n`;\n\nconst OptionLink = styled(Link)`\n /* We include this here again because typically when people use OptionLink they provide an as prop which cancels the Box props */\n color: ${({ theme, color }) => extractStyleFromTheme(theme.colors, color, undefined)};\n text-decoration: none;\n\n &:hover {\n color: unset;\n }\n\n /* TODO: do we need this? */\n svg > path,\n &:focus-visible svg > path {\n fill: currentColor;\n }\n\n ${getOptionStyle}\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SeparatorProps extends DropdownMenu.DropdownMenuSeparatorProps {}\n\nconst StyledSeparator = styled(Box)`\n /* Negative horizontal margin to compensate Menu.Content's padding */\n margin: ${({ theme }) => theme.spaces[1]} -${({ theme }) => theme.spaces[1]};\n width: calc(100% + ${({ theme }) => theme.spaces[2]});\n /* Hide separator if there's nothing above in the menu */\n &:first-child {\n display: none;\n }\n`;\n\nconst MenuSeparator = React.forwardRef<HTMLDivElement, SeparatorProps>((props: SeparatorProps, ref) => (\n <DropdownMenu.Separator {...props} asChild>\n <StyledSeparator height=\"1px\" shrink={0} background=\"neutral150\" ref={ref} />\n </DropdownMenu.Separator>\n));\n\n/* -------------------------------------------------------------------------------------------------\n * MenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\ninterface LabelProps extends TypographyProps {}\n\nconst MenuLabel = React.forwardRef<HTMLSpanElement, LabelProps>((props, ref) => (\n <DropdownMenu.Label asChild>\n <StyledLabel ref={ref} variant=\"sigma\" textColor=\"neutral600\" {...props} />\n </DropdownMenu.Label>\n));\n\nconst StyledLabel = styled<TypographyComponent>(Typography)`\n padding: ${({ theme }) => theme.spaces[2]} ${({ theme }) => theme.spaces[4]};\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSubRoot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SubRootProps extends DropdownMenu.DropdownMenuSubProps {}\n\nconst MenuSubRoot = DropdownMenu.Sub;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SubTriggerProps extends BoxProps<'button'> {}\n\nconst MenuSubTrigger = React.forwardRef<HTMLButtonElement, SubTriggerProps>(({ disabled = false, ...props }, ref) => {\n return (\n <DropdownMenu.SubTrigger asChild disabled={disabled}>\n <SubmenuTrigger\n ref={ref}\n color=\"neutral800\"\n tag=\"button\"\n type=\"button\"\n background=\"transparent\"\n borderStyle=\"none\"\n gap={5}\n {...props}\n >\n <Typography>{props.children}</Typography>\n <ChevronRight fill=\"neutral500\" height=\"1.2rem\" width=\"1.2rem\" />\n </SubmenuTrigger>\n </DropdownMenu.SubTrigger>\n );\n});\n\nconst SubmenuTrigger = styled(OptionButton)`\n &[data-state='open'] {\n background-color: ${({ theme }) => theme.colors.primary100};\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SubContentProps extends FlexProps<'div'> {}\n\nconst MenuSubContent = React.forwardRef<HTMLDivElement, SubContentProps>((props, ref) => {\n return (\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent sideOffset={8} asChild>\n <Viewport\n ref={ref}\n direction=\"column\"\n borderStyle=\"solid\"\n borderWidth=\"1px\"\n borderColor=\"neutral150\"\n hasRadius\n background=\"neutral0\"\n shadow=\"filterShadow\"\n maxHeight=\"15rem\"\n padding={1}\n alignItems=\"flex-start\"\n overflow=\"auto\"\n {...props}\n />\n </DropdownMenu.SubContent>\n </DropdownMenu.Portal>\n );\n});\n\nconst Root = MenuRoot;\nconst Trigger = MenuTrigger;\nconst Content = MenuContent;\nconst Item = MenuItem;\nconst Separator = MenuSeparator;\nconst Label = MenuLabel;\nconst SubRoot = MenuSubRoot;\nconst SubTrigger = MenuSubTrigger;\nconst SubContent = MenuSubContent;\n\nexport { Root, Trigger, Content, Item, Separator, Label, SubRoot, SubTrigger, SubContent };\nexport type {\n TriggerProps,\n ContentProps,\n ItemProps,\n RootProps,\n SubRootProps,\n SubTriggerProps,\n SubContentProps,\n LabelProps,\n};\n","import * as React from 'react';\n\nimport { stripReactIdOfColon } from '../../helpers/strings';\nimport { useComposedRefs } from '../../hooks/useComposeRefs';\nimport { useId } from '../../hooks/useId';\nimport { useIntersection } from '../../hooks/useIntersection';\n\nimport * as Menu from './Menu';\n\n/* -------------------------------------------------------------------------------------------------\n * SimpleMenu\n * -----------------------------------------------------------------------------------------------*/\n\ntype SimpleMenuProps = Menu.TriggerProps &\n Pick<Menu.ContentProps, 'popoverPlacement' | 'intersectionId'> & {\n children?: React.ReactNode;\n onOpen?: () => void;\n onClose?: () => void;\n /**\n * Callback function to be called when the popover reaches the end of the scrollable content\n */\n onReachEnd?: (entry: IntersectionObserverEntry) => void;\n };\n\nconst SimpleMenu = React.forwardRef<HTMLButtonElement, SimpleMenuProps>(\n ({ children, onOpen, onClose, popoverPlacement, onReachEnd, ...props }, forwardedRef) => {\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const composedRef = useComposedRefs(forwardedRef, triggerRef);\n /**\n * Used for the intersection observer\n */\n const contentRef = React.useRef<HTMLDivElement>(null);\n\n const [internalIsOpen, setInternalIsOpen] = React.useState(false);\n\n const handleReachEnd = (entry: IntersectionObserverEntry) => {\n if (onReachEnd) {\n onReachEnd(entry);\n }\n };\n\n const handleOpenChange = (isOpen: boolean) => {\n if (isOpen && typeof onOpen === 'function') {\n onOpen();\n } else if (!isOpen && typeof onClose === 'function') {\n onClose();\n }\n\n setInternalIsOpen(isOpen);\n };\n\n const generatedId = useId();\n const intersectionId = `intersection-${stripReactIdOfColon(generatedId)}`;\n\n useIntersection(contentRef, handleReachEnd, {\n selectorToWatch: `#${intersectionId}`,\n /**\n * We need to know when the select is open because only then will viewportRef\n * not be null. Because it uses a portal that (sensibly) is not mounted 24/7.\n */\n skipWhen: !internalIsOpen,\n });\n\n return (\n <Menu.Root onOpenChange={handleOpenChange}>\n <Menu.Trigger ref={composedRef} {...props}>\n {props.label}\n </Menu.Trigger>\n <Menu.Content ref={contentRef} intersectionId={intersectionId} popoverPlacement={popoverPlacement}>\n {children}\n </Menu.Content>\n </Menu.Root>\n );\n },\n);\n\nconst MenuItem = Menu.Item;\ntype MenuItemProps = Menu.ItemProps;\n\nexport { SimpleMenu, MenuItem, Menu };\nexport type { SimpleMenuProps, MenuItemProps };\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { SimpleMenu, type SimpleMenuProps } from '../SimpleMenu';\n\nconst StyledButton = styled(SimpleMenu)`\n padding: ${({ theme }) => `${theme.spaces[1]} ${theme.spaces[2]}`};\n height: unset;\n\n :hover,\n :focus {\n background-color: ${({ theme }) => theme.colors.neutral200};\n }\n`;\n\nexport type CrumbSimpleMenuProps = SimpleMenuProps & {\n 'aria-label': string;\n icon?: React.ReactElement;\n endIcon?: React.ReactNode;\n};\n\nexport const CrumbSimpleMenu = React.forwardRef<HTMLButtonElement, CrumbSimpleMenuProps>(\n ({ children, ...props }, forwardedRef) => (\n <StyledButton ref={forwardedRef} endIcon={null} size=\"S\" {...props}>\n {children}\n </StyledButton>\n ),\n);\n\nCrumbSimpleMenu.displayName = 'CrumbSimpleMenu';\n","import * as React from 'react';\n\nexport const CardContext = React.createContext({ id: '' });\n\nexport const useCard = () => React.useContext(CardContext);\n","import * as React from 'react';\n\nimport { useId } from '../../hooks/useId';\nimport { Box, BoxProps } from '../../primitives/Box';\n\nimport { CardContext } from './CardContext';\n\nexport interface CardProps extends BoxProps {\n id?: string;\n}\n\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(({ id, ...props }, forwardedRef) => {\n const generatedId = useId(id);\n\n const context = React.useMemo(() => ({ id: generatedId }), [generatedId]);\n\n return (\n <CardContext.Provider value={context}>\n <Box\n ref={forwardedRef}\n id={id}\n tabIndex={0}\n hasRadius\n background=\"neutral0\"\n borderStyle=\"solid\"\n borderWidth=\"1px\"\n borderColor=\"neutral150\"\n shadow=\"tableShadow\"\n tag=\"article\"\n aria-labelledby={`${generatedId}-title`}\n {...props}\n />\n </CardContext.Provider>\n );\n});\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { PropsToTransientProps } from '../../types';\n\ntype CardActionPosition = 'end' | 'start';\n\ntype CardActionProps = Omit<FlexProps<'div'>, 'direction' | 'gap' | 'position'> & {\n position: CardActionPosition;\n};\n\nconst CardActionImpl = React.forwardRef<HTMLDivElement, CardActionProps>(({ position, ...restProps }, forwardedRef) => {\n return <CardAction ref={forwardedRef} $position={position} {...restProps} direction=\"row\" gap={2} />;\n});\n\nconst CardAction = styled<FlexComponent>(Flex)<PropsToTransientProps<CardActionProps>>`\n position: absolute;\n top: ${({ theme }) => theme.spaces[3]};\n right: ${({ $position, theme }) => {\n if ($position === 'end') {\n return theme.spaces[3];\n }\n\n return undefined;\n }};\n left: ${({ $position, theme }) => {\n if ($position === 'start') {\n return theme.spaces[3];\n }\n\n return undefined;\n }};\n`;\n\nexport { CardActionImpl as CardAction };\nexport type { CardActionProps, CardActionPosition };\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\ntype CardAssetSize = 'S' | 'M';\n\ninterface CardAssetProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n /**\n * @default 'M'\n */\n size?: CardAssetSize;\n children?: React.ReactNode;\n}\n\nconst CardAsset = ({ size = 'M', children, ...props }: CardAssetProps) => {\n return (\n <CardAssetWrapper $size={size}>{children ? children : <CardAssetImg {...props} aria-hidden />}</CardAssetWrapper>\n );\n};\n\nconst CardAssetImg = styled.img`\n // inline flows is based on typography and displays an extra white space below the image\n // switch to block is required in order to make the img stick the bottom of the container\n // addition infos: https://stackoverflow.com/questions/5804256/image-inside-div-has-extra-space-below-the-image\n margin: 0;\n padding: 0;\n max-height: 100%;\n max-width: 100%;\n object-fit: contain;\n`;\n\nconst CardAssetWrapper = styled.div<{ $size: CardAssetSize }>`\n display: flex;\n justify-content: center;\n height: ${({ $size }) => ($size === 'S' ? '8.8rem' : '16.4rem')};\n width: 100%;\n background: repeating-conic-gradient(${({ theme }) => theme.colors.neutral100} 0% 25%, transparent 0% 50%) 50% / 20px\n 20px;\n border-top-left-radius: ${({ theme }) => theme.borderRadius};\n border-top-right-radius: ${({ theme }) => theme.borderRadius};\n`;\n\nexport { CardAsset };\nexport type { CardAssetProps, CardAssetSize };\n","import { styled } from 'styled-components';\n\nimport { Badge, BadgeProps } from '../Badge';\n\nconst CardBadgeWrapper = styled.div`\n margin-left: auto;\n flex-shrink: 0;\n`;\n\nconst BadgePosition = styled(Badge)`\n margin-left: ${({ theme }) => theme.spaces[1]};\n`;\n\nexport type CardBadgeProps = BadgeProps;\n\nexport const CardBadge = (props: CardBadgeProps) => (\n <CardBadgeWrapper>\n <BadgePosition {...props} />\n </CardBadgeWrapper>\n);\n","import { Box } from '../../primitives/Box';\nimport { Flex, FlexProps } from '../../primitives/Flex';\n\nexport type CardBodyProps = FlexProps;\n\nexport const CardBody = (props: CardBodyProps) => {\n return (\n <Box paddingLeft={3} paddingRight={3} paddingTop={2} paddingBottom={2}>\n <Flex {...props} alignItems=\"flex-start\" />\n </Box>\n );\n};\n","import * as React from 'react';\n\nimport * as Checkbox from '@radix-ui/react-checkbox';\nimport { Minus } from '@strapi/icons';\nimport { styled, useTheme } from 'styled-components';\n\nimport { useComposedRefs } from '../../hooks/useComposeRefs';\nimport { useControllableState } from '../../hooks/useControllableState';\nimport { useId } from '../../hooks/useId';\nimport { Box, BoxProps } from '../../primitives/Box';\nimport { Flex } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\n\n/* -------------------------------------------------------------------------------------------------\n * CheckIcon\n * -----------------------------------------------------------------------------------------------*/\n\nconst CheckIcon = ({ fill, ...props }: BoxProps<'svg'>) => {\n const { colors } = useTheme();\n\n return (\n <Box\n tag=\"svg\"\n viewBox=\"0 0 32 32\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill={fill ? colors[fill] : undefined}\n {...props}\n >\n <path d=\"M29.0613 10.0613L13.0613 26.0613C12.9219 26.2011 12.7563 26.3121 12.574 26.3878C12.3917 26.4635 12.1962 26.5024 11.9988 26.5024C11.8013 26.5024 11.6059 26.4635 11.4235 26.3878C11.2412 26.3121 11.0756 26.2011 10.9363 26.0613L3.93626 19.0613C3.79673 18.9217 3.68605 18.7561 3.61053 18.5738C3.53502 18.3915 3.49615 18.1961 3.49615 17.9988C3.49615 17.8014 3.53502 17.606 3.61053 17.4237C3.68605 17.2414 3.79673 17.0758 3.93626 16.9363C4.07579 16.7967 4.24143 16.686 4.42374 16.6105C4.60604 16.535 4.80143 16.4962 4.99876 16.4962C5.19608 16.4962 5.39147 16.535 5.57378 16.6105C5.75608 16.686 5.92173 16.7967 6.06126 16.9363L12 22.875L26.9388 7.93876C27.2205 7.65697 27.6027 7.49866 28.0013 7.49866C28.3998 7.49866 28.782 7.65697 29.0638 7.93876C29.3455 8.22055 29.5039 8.60274 29.5039 9.00126C29.5039 9.39977 29.3455 9.78197 29.0638 10.0638L29.0613 10.0613Z\" />\n </Box>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxEl\n * -----------------------------------------------------------------------------------------------*/\n\ninterface CheckboxElProps extends Checkbox.CheckboxProps {}\n\ntype CheckboxElement = HTMLButtonElement;\n\nconst CheckboxEl = React.forwardRef<CheckboxElement, CheckboxElProps>(\n ({ defaultChecked, checked: checkedProp, onCheckedChange, ...props }, forwardedRef) => {\n const checkboxRef = React.useRef<CheckboxElement>(null!);\n const [checked, setChecked] = useControllableState({\n defaultProp: defaultChecked,\n prop: checkedProp,\n onChange: onCheckedChange,\n });\n\n const composedRefs = useComposedRefs(checkboxRef, forwardedRef);\n\n return (\n <CheckboxRoot ref={composedRefs} checked={checked} onCheckedChange={setChecked} {...props}>\n <CheckboxIndicator forceMount>\n {checked === true ? <CheckIcon width=\"1.6rem\" fill=\"neutral0\" /> : null}\n {checked === 'indeterminate' ? <Minus fill=\"neutral0\" /> : null}\n </CheckboxIndicator>\n </CheckboxRoot>\n );\n },\n);\n\nconst CheckboxRoot = styled(Checkbox.Root)`\n background: ${(props) => props.theme.colors.neutral0};\n width: 2rem;\n height: 2rem;\n border-radius: ${(props) => props.theme.borderRadius};\n border: 1px solid ${(props) => props.theme.colors.neutral300};\n position: relative;\n z-index: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n // this ensures the checkbox is always a square even in flex-containers.\n flex: 0 0 2rem;\n\n &[data-state='checked'],\n &[data-state='indeterminate'] {\n border: 1px solid ${(props) => props.theme.colors.primary600};\n background-color: ${(props) => props.theme.colors.primary600};\n }\n\n &[data-disabled] {\n background-color: ${(props) => props.theme.colors.neutral200};\n }\n\n /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n z-index: -1;\n min-width: 44px;\n min-height: 44px;\n }\n`;\n\nconst CheckboxIndicator = styled(Checkbox.Indicator)`\n display: inline-flex;\n pointer-events: auto !important;\n width: 100%;\n height: 100%;\n cursor: pointer;\n justify-content: center;\n align-items: center;\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Checkbox\n * -----------------------------------------------------------------------------------------------*/\n\ninterface CheckboxProps extends CheckboxElProps {}\n\nconst CheckboxImpl = React.forwardRef<CheckboxElement, CheckboxProps>(({ children, ...restProps }, forwardedRef) => {\n const labelId = useId(restProps.id);\n\n if (!children) {\n return <CheckboxEl ref={forwardedRef} {...restProps} />;\n }\n\n return (\n <Flex gap={2}>\n <CheckboxEl id={labelId} {...restProps} />\n <Typography tag=\"label\" textColor=\"neutral800\" htmlFor={labelId}>\n {children}\n </Typography>\n </Flex>\n );\n});\n\nexport { CheckboxImpl as Checkbox };\nexport type { CheckboxProps, CheckboxElProps, CheckboxElement };\n","import * as React from 'react';\n\nimport { Checkbox, CheckboxProps } from '../Checkbox';\n\nimport { CardAction } from './CardAction';\nimport { useCard } from './CardContext';\n\ninterface CardCheckboxProps extends CheckboxProps {}\n\nconst CardCheckbox = React.forwardRef<HTMLButtonElement, CardCheckboxProps>((props, forwardedRef) => {\n const { id } = useCard();\n\n return (\n <CardAction position=\"start\">\n <Checkbox aria-labelledby={`${id}-title`} {...props} ref={forwardedRef} />\n </CardAction>\n );\n});\n\nexport { CardCheckbox };\nexport type { CardCheckboxProps };\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\n\nconst BreakBox = styled<BoxComponent>(Box)`\n word-break: break-all;\n`;\n\nexport interface CardContentProps extends BoxProps {\n children: React.ReactNode;\n}\n\nexport const CardContent = ({ children, ...props }: CardContentProps) => {\n return <BreakBox {...props}>{children}</BreakBox>;\n};\n","import { styled } from 'styled-components';\n\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\n\nconst CardHeaderWrapper = styled<FlexComponent>(Flex)`\n border-bottom: 1px solid ${({ theme }) => theme.colors.neutral150};\n`;\n\nexport type CardHeaderProps = FlexProps;\n\nexport const CardHeader = (props: CardHeaderProps) => {\n return <CardHeaderWrapper position=\"relative\" justifyContent=\"center\" {...props} />;\n};\n","import * as React from 'react';\n\nimport { Box, BoxProps } from '../../primitives/Box';\nimport { Typography } from '../../primitives/Typography';\n\nexport interface CardTimerProps extends BoxProps {\n children: React.ReactNode;\n}\n\nexport const CardTimer = ({ children, ...props }: CardTimerProps) => (\n <Box\n tag=\"time\"\n background=\"neutral800\"\n bottom={1}\n right={1}\n color=\"neutral0\"\n hasRadius\n position=\"absolute\"\n padding={1}\n {...props}\n >\n <Typography variant=\"pi\" textColor=\"neutral0\">\n {children}\n </Typography>\n </Box>\n);\n","import { Typography, TypographyProps } from '../../primitives/Typography';\n\nimport { useCard } from './CardContext';\n\nexport type CardTitleProps = TypographyProps;\n\nexport const CardTitle = (props: CardTitleProps) => {\n const { id } = useCard();\n\n return <Typography variant=\"pi\" id={`${id}-title`} textColor=\"neutral800\" fontWeight=\"bold\" tag=\"div\" {...props} />;\n};\n\nexport type CardSubtitleProps = Omit<TypographyProps<'div'>, 'textColor' | 'as'>;\n\nexport const CardSubtitle = (props: CardSubtitleProps) => {\n return <Typography variant=\"pi\" {...props} textColor=\"neutral600\" tag=\"div\" />;\n};\n","export const KeyboardKeys = {\n DOWN: 'ArrowDown',\n UP: 'ArrowUp',\n RIGHT: 'ArrowRight',\n LEFT: 'ArrowLeft',\n ESCAPE: 'Escape',\n ENTER: 'Enter',\n SPACE: ' ',\n TAB: 'Tab',\n END: 'End',\n HOME: 'Home',\n DELETE: 'Delete',\n PAGE_UP: 'PageUp',\n PAGE_DOWN: 'PageDown',\n BACKSPACE: 'Backspace',\n CLEAR: 'Clear',\n};\n","import * as React from 'react';\n\nimport { ChevronRight, ChevronLeft } from '@strapi/icons';\nimport { styled } from 'styled-components';\n\nimport { KeyboardKeys } from '../../helpers/keyboardKeys';\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\nimport { Flex, FlexComponent } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { AccessibleIcon } from '../../utilities/AccessibleIcon';\nimport { Tooltip } from '../Tooltip';\n\nexport interface CarouselProps extends BoxProps {\n actions?: React.ReactNode;\n children: React.ReactNode;\n label: string;\n nextLabel: string;\n onNext?: () => void;\n onPrevious?: () => void;\n previousLabel: string;\n secondaryLabel?: string;\n selectedSlide: number;\n}\n\nconst CarouselGrid = styled<BoxComponent<'section'>>(Box)`\n grid-template-columns: auto 1fr auto;\n grid-template-areas: 'startAction slides endAction';\n`;\n\nconst CarouselSlides = styled<FlexComponent>(Flex)`\n grid-area: slides;\n`;\n\nconst CarouselAction = styled<BoxComponent<'button'>>(Box)<{ $area: string }>`\n grid-area: ${({ $area }) => $area};\n\n &:focus svg path,\n &:hover svg path {\n fill: ${({ theme }) => theme.colors.neutral900};\n }\n`;\n\nexport type CarouselElement = HTMLDivElement;\n\nexport const Carousel = React.forwardRef<CarouselElement, CarouselProps>(\n (\n { actions, children, label, nextLabel, onNext, onPrevious, previousLabel, secondaryLabel, selectedSlide, ...props },\n forwardedRef,\n ) => {\n const prevActionRef = React.useRef<HTMLButtonElement>(null);\n const nextActionRef = React.useRef<HTMLButtonElement>(null);\n\n const childrenArray = React.Children.map(children, (node, index) =>\n React.cloneElement(node as React.ReactElement, { selected: index === selectedSlide }),\n );\n\n const handleKeyDown = (event) => {\n switch (event.key) {\n case KeyboardKeys.RIGHT: {\n event.preventDefault();\n\n if (nextActionRef?.current) {\n nextActionRef.current.focus();\n }\n\n if (onNext) {\n onNext();\n }\n\n break;\n }\n\n case KeyboardKeys.LEFT: {\n event.preventDefault();\n\n if (prevActionRef?.current) {\n prevActionRef.current.focus();\n }\n\n if (onPrevious) {\n onPrevious();\n }\n break;\n }\n\n default:\n break;\n }\n };\n\n return (\n <Box ref={forwardedRef} {...props} onKeyDown={handleKeyDown}>\n <Box padding={2} borderColor=\"neutral200\" hasRadius background=\"neutral100\">\n <CarouselGrid\n tag=\"section\"\n aria-roledescription=\"carousel\"\n aria-label={label}\n display=\"grid\"\n position=\"relative\"\n >\n {childrenArray && childrenArray.length > 1 && (\n <>\n <CarouselAction tag=\"button\" onClick={onPrevious} $area=\"startAction\" ref={prevActionRef} type=\"button\">\n <AccessibleIcon label={previousLabel}>\n <ChevronLeft width=\"1.6rem\" height=\"1.6rem\" fill=\"neutral600\" />\n </AccessibleIcon>\n </CarouselAction>\n\n <CarouselAction tag=\"button\" onClick={onNext} $area=\"endAction\" ref={nextActionRef} type=\"button\">\n <AccessibleIcon label={nextLabel}>\n <ChevronRight width=\"1.6rem\" height=\"1.6rem\" fill=\"neutral600\" />\n </AccessibleIcon>\n </CarouselAction>\n </>\n )}\n\n <CarouselSlides aria-live=\"polite\" paddingLeft={2} paddingRight={2} width=\"100%\" overflow=\"hidden\">\n {childrenArray}\n </CarouselSlides>\n {actions}\n </CarouselGrid>\n\n {secondaryLabel && (\n <Box paddingTop={2} paddingLeft={4} paddingRight={4}>\n <Tooltip label={secondaryLabel}>\n <Flex justifyContent=\"center\">\n <Typography variant=\"pi\" textColor=\"neutral600\" ellipsis>\n {secondaryLabel}\n </Typography>\n </Flex>\n </Tooltip>\n </Box>\n )}\n </Box>\n </Box>\n );\n },\n);\n","export interface Sizes {\n accordions: {\n S: string;\n M: string;\n };\n button: {\n S: string;\n M: string;\n L: string;\n };\n}\nexport const sizes: Sizes = {\n accordions: {\n S: `4.8rem`,\n M: `8.8rem`,\n },\n button: {\n S: `3.2rem`,\n M: `3.6rem`,\n L: `4rem`,\n },\n};\n","import { EASINGS, TIMINGS, TRANSITIONS } from '../styles/motion';\n\nimport { Sizes, sizes } from './sizes';\n\ntype Breakpoint = `@media(min-width: ${number}px)`;\n\nexport interface CommonTheme {\n sizes: Sizes;\n zIndices: {\n navigation: 100;\n overlay: 300;\n modal: 310;\n dialog: 320;\n popover: 500;\n notification: 700;\n tooltip: 1000;\n };\n spaces: ['0px', '4px', '8px', '12px', '16px', '20px', '24px', '32px', '40px', '48px', '56px', '64px'];\n breakpoints: {\n initial: Breakpoint;\n small: Breakpoint;\n medium: Breakpoint;\n large: Breakpoint;\n };\n borderRadius: '4px';\n fontSizes: [string, string, string, string, string, string];\n lineHeights: [1.14, 1.22, 1.25, 1.33, 1.43, 1.45, 1.5];\n fontWeights: {\n regular: 400;\n semiBold: 500;\n bold: 600;\n };\n motion: {\n easings: typeof EASINGS;\n timings: typeof TIMINGS;\n };\n transitions: typeof TRANSITIONS;\n}\n\nexport const commonTheme: CommonTheme = {\n sizes,\n zIndices: {\n navigation: 100,\n overlay: 300,\n modal: 310,\n dialog: 320,\n popover: 500,\n notification: 700,\n tooltip: 1000,\n },\n spaces: ['0px', '4px', '8px', '12px', '16px', '20px', '24px', '32px', '40px', '48px', '56px', '64px'],\n borderRadius: '4px',\n breakpoints: {\n initial: '@media(min-width: 0px)',\n small: '@media(min-width: 520px)',\n medium: '@media(min-width: 768px)',\n large: '@media(min-width: 1080px)',\n },\n fontSizes: [`1.1rem`, `1.2rem`, `1.4rem`, '1.6rem', `1.8rem`, `3.2rem`],\n lineHeights: [1.14, 1.22, 1.25, 1.33, 1.43, 1.45, 1.5],\n fontWeights: {\n regular: 400,\n semiBold: 500,\n bold: 600,\n },\n transitions: TRANSITIONS,\n motion: {\n easings: EASINGS,\n timings: TIMINGS,\n },\n};\n","import { Colors } from '../colors';\n\nexport const lightColorTokenObject: { color: Colors } = {\n color: {\n alternative100: '#f6ecfc',\n alternative200: '#e0c1f4',\n alternative500: '#ac73e6',\n alternative600: '#9736e8',\n alternative700: '#8312d1',\n buttonNeutral0: '#ffffff',\n buttonPrimary500: '#7b79ff',\n buttonPrimary600: '#4945ff',\n danger100: '#fcecea',\n danger200: '#f5c0b8',\n danger500: '#ee5e52',\n danger600: '#d02b20',\n danger700: '#b72b1a',\n neutral0: '#ffffff',\n neutral100: '#f6f6f9',\n neutral1000: '#181826',\n neutral150: '#eaeaef',\n neutral200: '#dcdce4',\n neutral300: '#c0c0cf',\n neutral400: '#a5a5ba',\n neutral500: '#8e8ea9',\n neutral600: '#666687',\n neutral700: '#4a4a6a',\n neutral800: '#32324d',\n neutral900: '#212134',\n primary100: '#f0f0ff',\n primary200: '#d9d8ff',\n primary500: '#7b79ff',\n primary600: '#4945ff',\n primary700: '#271fe0',\n secondary100: '#eaf5ff',\n secondary200: '#b8e1ff',\n secondary500: '#66b7f1',\n secondary600: '#0c75af',\n secondary700: '#006096',\n success100: '#eafbe7',\n success200: '#c6f0c2',\n success500: '#5cb176',\n success600: '#328048',\n success700: '#2f6846',\n warning100: '#fdf4dc',\n warning200: '#fae7b9',\n warning500: '#f29d41',\n warning600: '#d9822f',\n warning700: '#be5d01',\n },\n};\n","import { Shadows } from '../colors';\n\nexport const lightShadowTokenObject: { shadow: Shadows } = {\n shadow: {\n filterShadow: '0px 1px 4px rgba(33, 33, 52, 0.1)',\n focus:\n 'inset 2px 0px 0px rgb(39, 31, 224), inset 0px 2px 0px rgb(39, 31, 224), inset -2px 0px 0px rgb(39, 31, 224), inset 0px -2px 0px rgb(39, 31, 224)',\n focusShadow: '0px 0px 6px rgba(76, 191, 255, 0.75)',\n popupShadow: '0px 2px 15px rgba(33, 33, 52, 0.1)',\n tableShadow: '0px 1px 4px rgba(33, 33, 52, 0.1)',\n },\n};\n","import { DefaultTheme } from 'styled-components';\n\nimport { commonTheme } from '../common-theme';\n\nimport { lightColorTokenObject } from './light-colors';\nimport { lightShadowTokenObject } from './light-shadows';\n\nexport const lightTheme: DefaultTheme = {\n colors: lightColorTokenObject.color,\n shadows: lightShadowTokenObject.shadow,\n ...commonTheme,\n};\n","import { Colors } from '../colors';\n\nexport const darkColorTokenObject: { color: Colors } = {\n color: {\n alternative100: '#181826',\n alternative200: '#4a4a6a',\n alternative500: '#ac73e6',\n alternative600: '#ac73e6',\n alternative700: '#e0c1f4',\n buttonNeutral0: '#ffffff',\n buttonPrimary500: '#7b79ff',\n buttonPrimary600: '#4945ff',\n danger100: '#181826',\n danger200: '#4a4a6a',\n danger500: '#ee5e52',\n danger600: '#ee5e52',\n danger700: '#ee5e52',\n neutral0: '#212134',\n neutral100: '#181826',\n neutral1000: '#ffffff',\n neutral150: '#32324d',\n neutral200: '#4a4a6a',\n neutral300: '#666687',\n neutral400: '#a5a5ba',\n neutral500: '#c0c0cf',\n neutral600: '#a5a5ba',\n neutral700: '#eaeaef',\n neutral800: '#ffffff',\n neutral900: '#ffffff',\n primary100: '#181826',\n primary200: '#4a4a6a',\n primary500: '#4945ff',\n primary600: '#7b79ff',\n primary700: '#7b79ff',\n secondary100: '#181826',\n secondary200: '#4a4a6a',\n secondary500: '#66b7f1',\n secondary600: '#66b7f1',\n secondary700: '#b8e1ff',\n success100: '#181826',\n success200: '#4a4a6a',\n success500: '#5cb176',\n success600: '#5cb176',\n success700: '#c6f0c2',\n warning100: '#181826',\n warning200: '#4a4a6a',\n warning500: '#f29d41',\n warning600: '#f29d41',\n warning700: '#fae7b9',\n },\n};\n","import { Shadows } from '../colors';\n\nexport const darkShadowTokenObject: { shadow: Shadows } = {\n shadow: {\n filterShadow: '1px 1px 10px rgba(3, 3, 5, 0.35)',\n focus:\n 'inset 2px 0px 0px rgb(39, 31, 224), inset 0px 2px 0px rgb(39, 31, 224), inset -2px 0px 0px rgb(39, 31, 224), inset 0px -2px 0px rgb(39, 31, 224)',\n focusShadow: '0px 0px 6px rgba(76, 191, 255, 0.75)',\n popupShadow: '1px 1px 10px rgba(3, 3, 5, 0.35)',\n tableShadow: '1px 1px 10px rgba(3, 3, 5, 0.2)',\n },\n};\n","import { DefaultTheme } from 'styled-components';\n\nimport { commonTheme } from '../common-theme';\n\nimport { darkColorTokenObject } from './dark-colors';\nimport { darkShadowTokenObject } from './dark-shadows';\n\nexport const darkTheme: DefaultTheme = {\n colors: darkColorTokenObject.color,\n shadows: darkShadowTokenObject.shadow,\n ...commonTheme,\n};\n","import { cloneDeep, assignWith, merge } from 'lodash';\nimport { DefaultTheme } from 'styled-components';\n\nimport { isObject } from '../helpers/objects';\n\nimport { lightTheme } from './lightTheme';\n\nconst generateError = (customMessage: string) => `\n${customMessage}\n\nThe following is an example:\n\n\nimport { lightTheme, extendTheme } from '@strapi/design-system';\n\nconst myCustomTheme = extendTheme(lightTheme, {\n ${Object.keys(lightTheme)\n .map((key) => `${key}: /* put the overrides for the ${key} key */,`)\n .join('\\n')}\n})\n`;\n\nexport const extendTheme = (theme: DefaultTheme | null, overrides: object | null) => {\n if (!isObject(theme)) {\n const error = generateError(\n 'The first argument should be an object and corresponds to the theme you want to extend.',\n );\n\n throw new Error(error);\n }\n\n if (!isObject(overrides)) {\n const error = generateError(\n 'The second argument should be an object and corresponds to the keys of the theme you want to override.',\n );\n\n throw new Error(error);\n }\n\n function customizer(objValue, srcValue) {\n if (Array.isArray(objValue)) {\n return srcValue;\n }\n\n if (isObject(objValue) && isObject(srcValue)) {\n return merge(objValue, srcValue);\n }\n\n return undefined;\n }\n\n const masterTheme = cloneDeep(theme ?? {});\n const masterOverrides = cloneDeep(overrides ?? {});\n\n assignWith(masterTheme, masterOverrides, customizer);\n\n return masterTheme;\n};\n","import { css, DefaultTheme, IStyledComponent } from 'styled-components';\n\nexport const getThemeSize = <TType extends keyof DefaultTheme['sizes']>(type: TType) => {\n return ({ theme, size }: { theme: DefaultTheme; size: keyof DefaultTheme['sizes'][TType] }) =>\n theme.sizes[type][size];\n};\n\nexport const inputFocusStyle =\n (rootElement: IStyledComponent<'web'> | string = '&') =>\n ({ theme, $hasError = false }: { theme: DefaultTheme; $hasError?: boolean }) => css`\n outline: none;\n box-shadow: none;\n transition-property: border-color, box-shadow, fill;\n transition-duration: 0.2s;\n\n ${rootElement}:focus-within {\n border: 1px solid ${$hasError ? theme.colors.danger600 : theme.colors.primary600};\n box-shadow: ${$hasError ? theme.colors.danger600 : theme.colors.primary600} 0px 0px 0px 2px;\n }\n `;\n","import * as React from 'react';\n\nimport { css, styled } from 'styled-components';\n\nimport { createContext } from '../../helpers/context';\nimport { useComposedRefs } from '../../hooks/useComposeRefs';\nimport { useId } from '../../hooks/useId';\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { Typography, TypographyProps } from '../../primitives/Typography';\nimport { inputFocusStyle } from '../../themes';\nimport { AccessibleIcon } from '../../utilities/AccessibleIcon';\n\n/* -------------------------------------------------------------------------------------------------\n * Root\n * -----------------------------------------------------------------------------------------------*/\n\ninterface FieldContextValue {\n /**\n * @default false\n */\n error?: string | boolean;\n /**\n * @default null\n */\n hint?: React.ReactNode;\n id?: string;\n labelNode?: HTMLLabelElement;\n name?: string;\n /**\n * @default false\n */\n required?: boolean;\n setLabelNode?: (node: HTMLLabelElement) => void;\n}\n\nconst [FieldProvider, useField] = createContext<FieldContextValue>('Field', {});\n\ninterface RootProps extends FlexProps, Omit<Partial<FieldContextValue>, 'labelNode' | 'setLabelNode'> {\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLDivElement, RootProps>(\n ({ children, name, error = false, hint, id, required = false, ...props }, ref) => {\n const generatedId = useId(id);\n const [labelNode, setLabelNode] = React.useState<HTMLLabelElement>();\n\n return (\n <FieldProvider\n name={name}\n id={generatedId}\n error={error}\n hint={hint}\n required={required}\n labelNode={labelNode}\n setLabelNode={setLabelNode}\n >\n <Flex direction=\"column\" alignItems=\"stretch\" gap={1} ref={ref} {...props}>\n {children}\n </Flex>\n </FieldProvider>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * Label\n * -----------------------------------------------------------------------------------------------*/\n\ninterface LabelProps extends Omit<TypographyProps<'label'>, 'tag' | 'htmlFor'> {\n action?: React.ReactNode;\n}\n\nconst Label = React.forwardRef<HTMLLabelElement, LabelProps>(({ children, action, ...props }, ref) => {\n const { id, required, setLabelNode } = useField('Label');\n\n const composedRefs = useComposedRefs(ref, setLabelNode);\n\n if (!children) {\n return null;\n }\n\n return (\n <TypographyLabel\n ref={composedRefs}\n variant=\"pi\"\n textColor=\"neutral800\"\n fontWeight=\"bold\"\n {...props}\n id={`${id}-label`}\n htmlFor={id}\n tag=\"label\"\n ellipsis\n >\n {children}\n {required && (\n <Typography aria-hidden lineHeight=\"1em\" textColor=\"danger600\">\n *\n </Typography>\n )}\n {action && <LabelAction marginLeft={1}>{action}</LabelAction>}\n </TypographyLabel>\n );\n});\n\nconst TypographyLabel = styled(Typography)`\n display: flex;\n`;\n\nconst LabelAction = styled<FlexComponent>(Flex)`\n line-height: 0;\n color: ${({ theme }) => theme.colors.neutral500};\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Input\n * -----------------------------------------------------------------------------------------------*/\n\ninterface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n disabled?: boolean;\n endAction?: React.ReactNode;\n /**\n * If you're not using this in the FieldProvider\n * you can provide the error state manually\n */\n hasError?: boolean;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * @default \"M\"\n */\n size?: 'S' | 'M';\n startAction?: React.ReactNode;\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n (\n {\n endAction,\n startAction,\n disabled = false,\n onChange,\n hasError: hasErrorProp,\n required: requiredProp,\n className,\n size = 'M',\n ...props\n },\n ref,\n ) => {\n const { id, error, hint, name, required } = useField('Input');\n\n let ariaDescription: string | undefined;\n\n if (error) {\n ariaDescription = `${id}-error`;\n } else if (hint) {\n ariaDescription = `${id}-hint`;\n }\n\n const hasError = Boolean(error);\n const endActionRef = React.useRef<HTMLDivElement>(null);\n const inputElementRef = React.useRef<HTMLInputElement>(null);\n const inputRef = useComposedRefs(inputElementRef, ref);\n\n const handleChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n if (!disabled && onChange) {\n onChange(e);\n }\n };\n\n React.useLayoutEffect(() => {\n if (endActionRef.current && inputElementRef.current) {\n const endActionWidth = endActionRef.current.offsetWidth;\n const inputElement = inputElementRef.current;\n if (inputElement) {\n const inputPadding = endActionWidth + 8 + 16; // adjust padding 8px gap + 16px right padding\n inputElement.style.paddingRight = `${inputPadding}px`;\n }\n }\n }, [endAction]);\n\n return (\n <InputWrapper\n gap={2}\n justifyContent=\"space-between\"\n $hasError={hasError || hasErrorProp}\n $disabled={disabled}\n $size={size}\n $hasLeftAction={Boolean(startAction)}\n $hasRightAction={Boolean(endAction)}\n className={className}\n >\n {startAction}\n <InputElement\n id={id}\n name={name}\n ref={inputRef}\n $size={size}\n aria-describedby={ariaDescription}\n aria-invalid={hasError || hasErrorProp}\n aria-disabled={disabled}\n disabled={disabled}\n data-disabled={disabled ? '' : undefined}\n onChange={handleChange}\n aria-required={required || requiredProp}\n $hasLeftAction={Boolean(startAction)}\n $hasRightAction={Boolean(endAction)}\n {...props}\n />\n {endAction && <EndAction ref={endActionRef}>{endAction}</EndAction>}\n </InputWrapper>\n );\n },\n);\n\nconst InputElement = styled.input<{\n $size: InputProps['size'];\n $hasLeftAction: boolean;\n $hasRightAction: boolean;\n}>`\n border: none;\n border-radius: ${({ theme }) => theme.borderRadius};\n cursor: ${(props) => (props['aria-disabled'] ? 'not-allowed' : undefined)};\n\n color: ${({ theme }) => theme.colors.neutral800};\n font-weight: 400;\n font-size: ${(props) => props.theme.fontSizes[2]};\n line-height: 2.2rem;\n display: block;\n width: 100%;\n background: inherit;\n\n ::placeholder {\n color: ${({ theme }) => theme.colors.neutral500};\n opacity: 1;\n }\n\n &[aria-disabled='true'] {\n color: inherit;\n }\n\n //focus managed by InputWrapper\n &:focus {\n outline: none;\n box-shadow: none;\n }\n\n ${(props) => {\n switch (props.$size) {\n case 'S':\n return css`\n padding-inline-start: ${props.$hasLeftAction ? 0 : props.theme.spaces[4]};\n padding-inline-end: ${props.$hasRightAction ? 0 : props.theme.spaces[4]};\n padding-block: ${props.theme.spaces[1]};\n `;\n default:\n return css`\n padding-inline-start: ${props.$hasLeftAction ? 0 : props.theme.spaces[4]};\n padding-inline-end: ${props.$hasRightAction ? 0 : props.theme.spaces[4]};\n padding-block: ${props.theme.spaces[2]};\n `;\n }\n }}\n`;\n\nconst EndAction = styled(Flex)`\n position: absolute;\n right: ${({ theme }) => theme.spaces[4]};\n top: 50%;\n transform: translateY(-50%);\n`;\n\nconst InputWrapper = styled<FlexComponent>(Flex)<{\n $disabled?: boolean;\n $hasError?: boolean;\n $size: InputProps['size'];\n $hasLeftAction: boolean;\n $hasRightAction: boolean;\n}>`\n border: 1px solid ${({ theme, $hasError }) => ($hasError ? theme.colors.danger600 : theme.colors.neutral200)};\n border-radius: ${({ theme }) => theme.borderRadius};\n background: ${({ theme }) => theme.colors.neutral0};\n padding-inline-start: ${({ $hasLeftAction, theme }) => ($hasLeftAction ? theme.spaces[4] : 0)};\n position: relative;\n\n ${inputFocusStyle()}\n ${({ theme, $disabled }) =>\n $disabled\n ? css`\n color: ${theme.colors.neutral600};\n background: ${theme.colors.neutral150};\n `\n : undefined};\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Hint\n * -----------------------------------------------------------------------------------------------*/\n\nconst Hint = () => {\n const { id, hint, error } = useField('Hint');\n\n if (!hint || error) {\n return null;\n }\n\n return (\n <Typography variant=\"pi\" tag=\"p\" id={`${id}-hint`} textColor=\"neutral600\">\n {hint}\n </Typography>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Error\n * -----------------------------------------------------------------------------------------------*/\n\nconst Error = () => {\n const { id, error } = useField('Error');\n\n if (!error || typeof error !== 'string') {\n return null;\n }\n\n return (\n <Typography variant=\"pi\" tag=\"p\" id={`${id}-error`} textColor=\"danger600\" data-strapi-field-error>\n {error}\n </Typography>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Action\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ActionProps extends Omit<FlexProps<'button'>, 'tag' | 'type'> {\n label: string;\n children: React.ReactNode;\n}\n\nconst Action = React.forwardRef<HTMLButtonElement, ActionProps>(({ label, children, ...props }, ref) => (\n <FieldActionWrapper\n justifyContent=\"unset\"\n background=\"transparent\"\n borderStyle=\"none\"\n {...props}\n type=\"button\"\n tag=\"button\"\n ref={ref}\n >\n <AccessibleIcon label={label}>{children}</AccessibleIcon>\n </FieldActionWrapper>\n));\n\nconst FieldActionWrapper = styled<FlexComponent<'button'>>(Flex)`\n font-size: 1.6rem;\n padding: 0;\n`;\n\ntype Props = RootProps;\n\nexport { Root, Label, Input, Hint, Error, Action, useField };\nexport type { Props, LabelProps, InputProps, ActionProps };\n","import * as React from 'react';\n\nimport { useId } from '../../hooks/useId';\nimport { Flex } from '../../primitives/Flex';\nimport { Field } from '../Field';\n\nimport { Carousel, CarouselElement, CarouselProps } from './Carousel';\n\nexport interface CarouselInputProps extends CarouselProps, Pick<Field.Props, 'hint' | 'error' | 'required'> {\n actions?: React.ReactNode;\n children: React.ReactNode;\n labelAction?: Field.LabelProps['action'];\n}\n\nexport const CarouselInput = React.forwardRef<CarouselElement, CarouselInputProps>(\n (\n {\n actions,\n children,\n error,\n hint,\n label,\n labelAction,\n nextLabel,\n onNext,\n onPrevious,\n previousLabel,\n required,\n secondaryLabel,\n selectedSlide,\n id,\n ...props\n },\n forwardedRef,\n ) => {\n const generatedId = useId(id);\n\n return (\n <Field.Root hint={hint} error={error} id={generatedId} required={required}>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={1}>\n {label && <Field.Label action={labelAction}>{label}</Field.Label>}\n <Carousel\n ref={forwardedRef}\n actions={actions}\n label={label}\n nextLabel={nextLabel}\n onNext={onNext}\n onPrevious={onPrevious}\n previousLabel={previousLabel}\n secondaryLabel={secondaryLabel}\n selectedSlide={selectedSlide}\n id={generatedId}\n {...props}\n >\n {children}\n </Carousel>\n <Field.Hint />\n <Field.Error />\n </Flex>\n </Field.Root>\n );\n },\n);\n","import { Flex, FlexProps } from '../../primitives/Flex';\n\nexport interface CarouselActionsProps extends FlexProps {\n horizontal?: boolean;\n}\n\nexport const CarouselActions = ({ horizontal = true, ...props }: CarouselActionsProps) => (\n <Flex\n justifyContent=\"center\"\n direction={horizontal ? 'row' : 'column'}\n alignItems={horizontal ? 'center' : 'stretch'}\n position=\"absolute\"\n width=\"100%\"\n bottom={1}\n gap={1}\n {...props}\n />\n);\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\nimport { ellipsis } from '../../styles/type';\nimport { Tooltip } from '../Tooltip';\n\nexport interface CarouselImageProps extends BoxProps<'img'> {\n alt: string;\n src: string;\n}\n\nconst StyledImage = styled<BoxComponent<'img'>>(Box)`\n ${ellipsis}\n`;\n\nexport const CarouselImage = (props: CarouselImageProps) => {\n const [isError, setIsError] = React.useState(false);\n\n const handleImageError = () => {\n setIsError(true);\n };\n\n if (isError) {\n return (\n <Tooltip label={props.alt ?? ''}>\n <StyledImage tag=\"img\" height=\"100%\" maxWidth=\"100%\" {...props} />\n </Tooltip>\n );\n }\n\n return <StyledImage tag=\"img\" height=\"100%\" maxWidth=\"100%\" {...props} onError={handleImageError} />;\n};\n","import { Flex, FlexProps } from '../../primitives/Flex';\n\nexport interface CarouselSlideProps extends FlexProps {\n children: React.ReactNode;\n label: string;\n selected?: boolean;\n}\n\nexport const CarouselSlide = ({ label, children, selected = false, ...props }: CarouselSlideProps) => (\n <Flex\n alignItems=\"center\"\n display={selected ? 'flex' : 'none'}\n role=\"group\"\n aria-roledescription=\"slide\"\n aria-label={label}\n justifyContent=\"center\"\n height=\"124px\"\n width=\"100%\"\n {...props}\n >\n {children}\n </Flex>\n);\n","import * as React from 'react';\n\nimport * as ScrollArea from '@radix-ui/react-scroll-area';\nimport { styled } from 'styled-components';\n\ntype ScrollAreaElement = HTMLDivElement;\ntype ScrollAreaViewportElement = HTMLDivElement;\n\ninterface ScrollAreaProps extends Omit<ScrollArea.ScrollAreaProps, 'asChild'> {\n /**\n * @description This ref is attatched specifically to the viewport,\n * not the container of the viewport & scrollbars.\n */\n viewportRef?: React.Ref<ScrollAreaViewportElement>;\n}\n\nconst ScrollAreaImpl = React.forwardRef<ScrollAreaElement, ScrollAreaProps>(\n ({ children, viewportRef, ...restProps }, forwardedRef) => {\n return (\n <ScrollAreaRoot ref={forwardedRef} {...restProps}>\n <ScrollAreaViewport ref={viewportRef}>{children}</ScrollAreaViewport>\n <Scrollbar orientation=\"vertical\">\n <Thumb />\n </Scrollbar>\n <Scrollbar orientation=\"horizontal\">\n <Thumb />\n </Scrollbar>\n </ScrollAreaRoot>\n );\n },\n);\n\nconst ScrollAreaRoot = styled(ScrollArea.Root)`\n width: 100%;\n height: 100%;\n overflow: hidden;\n display: flex;\n`;\n\nconst ScrollAreaViewport = styled(ScrollArea.Viewport)`\n min-width: 100%;\n`;\n\nconst Scrollbar = styled(ScrollArea.Scrollbar)`\n display: flex;\n /* ensures no selection */\n user-select: none;\n /* disable browser handling of all panning and zooming gestures on touch devices */\n touch-action: none;\n\n &[data-orientation='vertical'] {\n width: 0.4rem;\n margin: 0.4rem;\n }\n\n &[data-orientation='horizontal'] {\n flex-direction: column;\n height: 0.4rem;\n margin: 0.4rem;\n }\n`;\n\nconst Thumb = styled(ScrollArea.Thumb)`\n position: relative;\n flex: 1;\n background-color: ${(props) => props.theme.colors.neutral150};\n border-radius: 0.4rem;\n\n /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n min-width: 44px;\n min-height: 44px;\n }\n`;\n\nexport { ScrollAreaImpl as ScrollArea };\nexport type { ScrollAreaProps, ScrollAreaElement, ScrollAreaViewportElement };\n","export default \"data:image/svg+xml,%3csvg%20width='63'%20height='63'%20viewBox='0%200%2063%2063'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.5563%2011.9816C39.484%2010.3071%2035.8575%209.29097%2032.3354%209.13521C28.6443%208.92888%2024.8295%209.72318%2021.3336%2011.4129C20.9123%2011.5901%2020.5376%2011.8101%2020.1722%2012.0249L20.0108%2012.1179C19.8774%2012.1951%2019.7441%2012.2724%2019.608%2012.3536C19.3253%2012.5146%2019.0492%2012.6744%2018.7544%2012.8792C18.5463%2013.0329%2018.3395%2013.1759%2018.1301%2013.323C17.5658%2013.7208%2016.9868%2014.1317%2016.4983%2014.5979C14.8476%2015.9524%2013.5571%2017.6075%2012.6071%2018.9214C10.4365%2022.1566%209.08622%2025.9567%208.80702%2029.6143L8.7764%2030.1588C8.73328%2030.9196%208.68476%2031.7057%208.75353%2032.4555C8.76648%2032.6084%208.7661%2032.7638%208.77506%2032.914C8.78895%2033.229%208.80152%2033.5373%208.846%2033.8672L9.07396%2035.4221C9.09756%2035.5764%209.1198%2035.7413%209.1633%2035.9263L9.65919%2037.9272L10.138%2039.2823C10.2729%2039.6673%2010.4158%2040.0751%2010.6%2040.43C12.0292%2043.637%2014.1425%2046.4578%2016.7063%2048.585C19.0508%2050.5296%2021.824%2052.0023%2024.7491%2052.8452L26.2371%2053.2376C26.3781%2053.2693%2026.4926%2053.2889%2026.6031%2053.3058L26.7775%2053.3311C27.0052%2053.3636%2027.2195%2053.3986%2027.4445%2053.435C27.8598%2053.5076%2028.2672%2053.5748%2028.7079%2053.6183L30.5641%2053.7229C30.9516%2053.7249%2031.3352%2053.7068%2031.7081%2053.6874C31.9039%2053.681%2032.0984%2053.6681%2032.3288%2053.662C34.5253%2053.4772%2036.5106%2053.0634%2038.0516%2052.4652C38.1769%2052.4171%2038.3008%2052.3796%2038.4234%2052.3355C38.6727%2052.2499%2038.9259%2052.167%2039.1432%2052.0599L40.8591%2051.2626L42.5702%2050.266C42.9009%2050.0682%2043.0205%2049.6414%2042.8282%2049.2984C42.632%2048.9526%2042.2034%2048.8308%2041.8634%2049.0166L40.1792%2049.9218L38.4995%2050.6224C38.3169%2050.6953%2038.121%2050.7534%2037.9224%2050.8155C37.7838%2050.8489%2037.6518%2050.8983%2037.5012%2050.9408C36.0711%2051.435%2034.2445%2051.7425%2032.244%2051.8346C32.0442%2051.8383%2031.8471%2051.8379%2031.654%2051.8403C31.3051%2051.8414%2030.9602%2051.8451%2030.6392%2051.8305L28.9177%2051.6725C28.5476%2051.619%2028.1695%2051.5427%2027.7848%2051.4678C27.5639%2051.4167%2027.3376%2051.3737%2027.1299%2051.3374L26.9529%2051.2987C26.8704%2051.2834%2026.7772%2051.2667%2026.7333%2051.2543L25.3466%2050.8322C22.7651%2049.9789%2020.33%2048.5729%2018.2942%2046.7557C16.1056%2044.7951%2014.3339%2042.2335%2013.1742%2039.3582C12.0276%2036.6013%2011.5988%2033.2792%2011.9716%2030.0076C12.3145%2027.0213%2013.3948%2024.1635%2015.1858%2021.5083C15.3034%2021.3339%2015.421%2021.1596%2015.5212%2021.0196C16.4309%2019.8688%2017.5408%2018.5589%2018.9483%2017.496C19.3367%2017.1525%2019.7862%2016.856%2020.2611%2016.5478C20.4878%2016.4009%2020.7079%2016.2553%2020.8907%2016.1306C21.0974%2016.0048%2021.3188%2015.8831%2021.5348%2015.7694C21.6761%2015.6975%2021.8162%2015.619%2021.9388%2015.5576L22.1002%2015.4646C22.4002%2015.3037%2022.6749%2015.1546%2022.9908%2015.039L24.1186%2014.5715C24.3399%2014.4844%2024.5718%2014.4159%2024.7997%2014.3447C24.953%2014.2982%2025.0982%2014.2635%2025.2635%2014.2078C25.786%2014.0182%2026.3283%2013.9112%2026.9105%2013.7965C27.117%2013.7571%2027.3302%2013.7163%2027.5608%2013.6585C27.7553%2013.611%2027.9737%2013.5969%2028.2082%2013.5762C28.364%2013.5603%2028.5172%2013.5483%2028.6318%2013.5333C28.7876%2013.5173%2028.9342%2013.5066%2029.0927%2013.4867C29.3285%2013.4555%2029.5456%2013.4347%2029.7494%2013.4337C30.0237%2013.44%2030.2994%2013.4357%2030.5777%2013.4274C31.0811%2013.421%2031.5579%2013.4197%2032.0318%2013.4914C34.9664%2013.7352%2037.7144%2014.6085%2040.2052%2016.0868C42.3489%2017.3655%2044.2716%2019.1525%2045.7607%2021.264C47.0255%2023.0628%2047.9756%2025.0528%2048.4928%2027.0393C48.572%2027.3176%2048.6299%2027.5931%2048.6839%2027.8659C48.7154%2028.0428%2048.7563%2028.2145%2048.7892%2028.3636C48.8037%2028.4541%2048.8208%2028.5406%2048.8445%2028.6258C48.8749%2028.7443%2048.8986%2028.864%2048.9116%2028.9651L48.9793%2029.6047C48.9922%2029.7748%2049.0132%2029.9331%2049.0301%2030.0887C49.0668%2030.3268%2049.0889%2030.5608%2049.0964%2030.7561L49.1083%2031.9001C49.1312%2032.3307%2049.089%2032.7116%2049.0522%2033.0673C49.0384%2033.2598%2049.0126%2033.4443%2049.0123%2033.5824C48.9961%2033.6926%2048.9918%2033.7935%2048.9836%2033.8917C48.9753%2034.0072%2048.9724%2034.1148%2048.9414%2034.2554L48.5449%2036.3059C48.3134%2037.8623%2049.3793%2039.3365%2050.9488%2039.5822C52.0417%2039.7601%2053.1536%2039.2819%2053.7711%2038.3664C54.0063%2038.0176%2054.1604%2037.6257%2054.2227%2037.2064L54.5217%2035.2574C54.5514%2035.0756%2054.572%2034.83%2054.5846%2034.5791L54.6028%2034.2338C54.6098%2034.0598%2054.6223%2033.8779%2054.6347%2033.6788C54.6734%2033.1052%2054.7163%2032.4479%2054.6619%2031.8058L54.5867%2030.4289C54.5622%2030.0952%2054.5097%2029.76%2054.4559%2029.4181C54.431%2029.2572%2054.4048%2029.0896%2054.3826%2028.9074L54.2687%2028.104C54.2332%2027.9244%2054.1804%2027.7273%2054.1329%2027.5396L54.0643%2027.2454C54.0195%2027.071%2053.9773%2026.8927%2053.9338%2026.7076C53.8455%2026.3309%2053.7479%2025.9422%2053.613%2025.5571C52.84%2023.0292%2051.5383%2020.5194%2049.8338%2018.2799C47.8544%2015.682%2045.3333%2013.5087%2042.5563%2011.9816Z'%20fill='%234945FF'/%3e%3c/svg%3e\"","import * as React from 'react';\n\nimport { styled, keyframes } from 'styled-components';\n\nimport { PropsToTransientProps } from '../../types';\nimport { VisuallyHidden } from '../../utilities/VisuallyHidden';\n\nimport loaderSvg from './assets/loader.svg';\n\ninterface LoaderProps extends React.HTMLAttributes<HTMLDivElement> {\n small?: boolean;\n}\n\nexport const Loader = React.forwardRef<HTMLDivElement, LoaderProps>(({ children, small = false, ...props }, ref) => {\n return (\n <div role=\"alert\" aria-live=\"assertive\" ref={ref} {...props}>\n <VisuallyHidden>{children}</VisuallyHidden>\n <LoaderImg src={loaderSvg} aria-hidden $small={small} />\n </div>\n );\n});\n\nconst rotation = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n`;\n\nconst LoaderImg = styled.img<PropsToTransientProps<Required<Pick<LoaderProps, 'small'>>>>`\n animation: ${rotation} 1s infinite linear;\n will-change: transform;\n ${({ $small, theme }) => $small && `width: ${theme.spaces[6]}; height: ${theme.spaces[6]};`}\n`;\n","import * as React from 'react';\n\nimport { CaretDown, Cross } from '@strapi/icons';\nimport { Combobox as ComboboxPrimitive } from '@strapi/ui-primitives';\nimport { css, styled } from 'styled-components';\n\nimport { stripReactIdOfColon } from '../../helpers/strings';\nimport { useComposedRefs } from '../../hooks/useComposeRefs';\nimport { useControllableState } from '../../hooks/useControllableState';\nimport { useId } from '../../hooks/useId';\nimport { useIntersection } from '../../hooks/useIntersection';\nimport { Box } from '../../primitives/Box';\nimport { Flex } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { ANIMATIONS } from '../../styles/motion';\nimport { inputFocusStyle } from '../../themes';\nimport { ScrollArea } from '../../utilities/ScrollArea';\nimport { Field, useField } from '../Field';\nimport { IconButton } from '../IconButton';\nimport { Loader } from '../Loader';\n\n/* -------------------------------------------------------------------------------------------------\n * ComboboxInput\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ComboboxProps\n extends Pick<\n ComboboxPrimitive.RootProps,\n | 'allowCustomValue'\n | 'autocomplete'\n | 'children'\n | 'disabled'\n | 'defaultTextValue'\n | 'defaultOpen'\n | 'defaultFilterValue'\n | 'filterValue'\n | 'isPrintableCharacter'\n | 'open'\n | 'onOpenChange'\n | 'onFilterValueChange'\n | 'onTextValueChange'\n | 'required'\n | 'textValue'\n | 'value'\n >,\n Pick<Field.InputProps, 'hasError' | 'name' | 'id'>,\n Omit<ComboboxPrimitive.TextInputProps, 'required' | 'disabled' | 'value' | 'onChange' | 'size'> {\n clearLabel?: string;\n creatable?: boolean | 'visible';\n createMessage?: (value: string) => string;\n creatableStartIcon?: React.ReactNode;\n hasMoreItems?: boolean;\n loading?: boolean;\n loadingMessage?: string;\n noOptionsMessage?: (value: string) => string;\n onChange?: ComboboxPrimitive.RootProps['onValueChange'];\n onClear?: React.MouseEventHandler<HTMLButtonElement | HTMLDivElement>;\n onCreateOption?: (value?: string) => void;\n onLoadMore?: (entry: IntersectionObserverEntry) => void;\n onInputChange?: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * @default \"M\"\n */\n size?: 'S' | 'M';\n startIcon?: React.ReactNode;\n}\n\ntype ComboboxInputElement = HTMLInputElement;\n\nconst Combobox = React.forwardRef<ComboboxInputElement, ComboboxProps>(\n (\n {\n allowCustomValue,\n autocomplete,\n children,\n className,\n clearLabel = 'Clear',\n creatable = false,\n creatableStartIcon,\n createMessage = (value) => `Create \"${value}\"`,\n defaultFilterValue,\n defaultTextValue,\n defaultOpen = false,\n open,\n onOpenChange,\n disabled = false,\n hasError: hasErrorProp,\n id: idProp,\n filterValue,\n hasMoreItems = false,\n isPrintableCharacter,\n loading = false,\n loadingMessage = 'Loading content...',\n name: nameProp,\n noOptionsMessage = () => 'No results found',\n onChange,\n onClear,\n onCreateOption,\n onFilterValueChange,\n onInputChange,\n onTextValueChange,\n onLoadMore,\n placeholder = 'Select or enter a value',\n required: requiredProp = false,\n size = 'M',\n startIcon,\n textValue,\n value,\n ...restProps\n },\n forwardedRef,\n ) => {\n const [internalIsOpen, setInternalIsOpen] = useControllableState({\n prop: open,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n const [internalTextValue, setInternalTextValue] = useControllableState({\n prop: textValue,\n defaultProp: allowCustomValue && !defaultTextValue ? value : defaultTextValue,\n onChange: onTextValueChange,\n });\n const [internalFilterValue, setInternalFilterValue] = useControllableState({\n prop: filterValue,\n defaultProp: defaultFilterValue,\n onChange: onFilterValueChange,\n });\n\n /**\n * Used for the intersection observer\n */\n const viewportRef = React.useRef<HTMLDivElement>(null);\n const triggerRef = React.useRef<HTMLInputElement>(null!);\n\n const composedTriggerRefs = useComposedRefs(triggerRef, forwardedRef);\n\n const clearRef = React.useRef(null);\n\n const handleClearClick: React.MouseEventHandler<HTMLButtonElement> & React.MouseEventHandler<HTMLDivElement> = (\n e: React.MouseEvent<HTMLButtonElement> | React.MouseEvent<HTMLDivElement>,\n ) => {\n if (onClear && !disabled) {\n setInternalTextValue('');\n setInternalFilterValue('');\n onClear(e);\n triggerRef.current.focus();\n }\n };\n\n const handleOpenChange: ComboboxPrimitive.RootProps['onOpenChange'] = (open) => {\n setInternalIsOpen(open);\n };\n\n const handleTextValueChange: ComboboxPrimitive.RootProps['onTextValueChange'] = (textValue) => {\n setInternalTextValue(textValue);\n };\n\n const handleFilterValueChange: ComboboxPrimitive.RootProps['onFilterValueChange'] = (filterValue) => {\n setInternalFilterValue(filterValue);\n };\n\n const handleInputChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n if (onInputChange) {\n onInputChange(e);\n }\n };\n\n const handleChange: ComboboxPrimitive.RootProps['onValueChange'] = (value) => {\n if (onChange) {\n onChange(value);\n }\n };\n\n const handleReachEnd = (entry: IntersectionObserverEntry) => {\n if (onLoadMore && hasMoreItems && !loading) {\n onLoadMore(entry);\n }\n };\n\n const handleCreateItemClick = () => {\n if (onCreateOption && internalTextValue && creatable !== 'visible') {\n onCreateOption(internalTextValue);\n } else if (onCreateOption && creatable === 'visible') {\n onCreateOption();\n setInternalIsOpen(false);\n }\n };\n\n const generatedIntersectionId = useId();\n const intersectionId = `intersection-${stripReactIdOfColon(generatedIntersectionId)}`;\n\n useIntersection(viewportRef, handleReachEnd, {\n selectorToWatch: `#${intersectionId}`,\n /**\n * We need to know when the select is open because only then will viewportRef\n * not be null. Because it uses a portal that (sensibly) is not mounted 24/7.\n */\n skipWhen: !internalIsOpen,\n });\n\n const { error, ...field } = useField('Combobox');\n const hasError = Boolean(error) || hasErrorProp;\n const id = field.id ?? idProp;\n const name = field.name ?? nameProp;\n const required = field.required || requiredProp;\n\n let ariaDescription: string | undefined;\n if (error) {\n ariaDescription = `${id}-error`;\n } else if (field.hint) {\n ariaDescription = `${id}-hint`;\n }\n\n return (\n <ComboboxPrimitive.Root\n autocomplete={autocomplete || (creatable === true ? 'list' : 'both')}\n onOpenChange={handleOpenChange}\n open={internalIsOpen}\n onTextValueChange={handleTextValueChange}\n textValue={internalTextValue}\n allowCustomValue={!!creatable || allowCustomValue}\n disabled={disabled}\n required={required}\n value={value}\n onValueChange={handleChange}\n filterValue={internalFilterValue}\n onFilterValueChange={handleFilterValueChange}\n isPrintableCharacter={isPrintableCharacter}\n visible={creatable === 'visible'}\n >\n <Trigger $hasError={hasError} $size={size} className={className}>\n <Flex flex=\"1\" tag=\"span\" gap={3}>\n {startIcon ? (\n <Flex flex=\"0 0 1.6rem\" tag=\"span\" aria-hidden>\n {startIcon}\n </Flex>\n ) : null}\n <TextInput\n placeholder={placeholder}\n id={id}\n aria-invalid={Boolean(error)}\n onChange={handleInputChange}\n ref={composedTriggerRefs}\n name={name}\n aria-describedby={ariaDescription}\n {...restProps}\n />\n </Flex>\n <Flex tag=\"span\" gap={3}>\n {internalTextValue && onClear ? (\n <IconButton\n size=\"XS\"\n variant=\"ghost\"\n onClick={handleClearClick}\n aria-disabled={disabled}\n aria-label={clearLabel}\n label={clearLabel}\n ref={clearRef}\n >\n <Cross />\n </IconButton>\n ) : null}\n <DownIcon>\n <CaretDown fill=\"neutral500\" />\n </DownIcon>\n </Flex>\n </Trigger>\n <ComboboxPrimitive.Portal>\n <Content sideOffset={4}>\n <ComboboxPrimitive.Viewport ref={viewportRef}>\n <ScrollAreaCombobox>\n {children}\n {creatable !== true && !loading ? (\n <ComboboxPrimitive.NoValueFound asChild>\n <OptionBox $hasHover={false}>\n <Typography>{noOptionsMessage(internalTextValue ?? '')}</Typography>\n </OptionBox>\n </ComboboxPrimitive.NoValueFound>\n ) : null}\n {loading ? (\n <Flex justifyContent=\"center\" alignItems=\"center\" paddingTop={2} paddingBottom={2}>\n <Loader small>{loadingMessage}</Loader>\n </Flex>\n ) : null}\n <Box id={intersectionId} width=\"100%\" height=\"1px\" />\n </ScrollAreaCombobox>\n {creatable ? (\n <ComboboxCreateItem onPointerUp={handleCreateItemClick} onClick={handleCreateItemClick} asChild>\n <OptionBox>\n <Flex gap={2}>\n {creatableStartIcon && (\n <Box tag=\"span\" aria-hidden display={'inline-flex'}>\n {creatableStartIcon}\n </Box>\n )}\n <Typography>{createMessage(internalTextValue ?? '')}</Typography>\n </Flex>\n </OptionBox>\n </ComboboxCreateItem>\n ) : null}\n </ComboboxPrimitive.Viewport>\n </Content>\n </ComboboxPrimitive.Portal>\n </ComboboxPrimitive.Root>\n );\n },\n);\n\nconst Trigger = styled(ComboboxPrimitive.Trigger)<{\n $hasError?: boolean;\n $size: ComboboxProps['size'];\n}>`\n position: relative;\n border: 1px solid ${({ theme, $hasError }) => ($hasError ? theme.colors.danger600 : theme.colors.neutral200)};\n border-radius: ${({ theme }) => theme.borderRadius};\n background: ${({ theme }) => theme.colors.neutral0};\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ${({ theme }) => theme.spaces[4]};\n\n ${(props) => {\n switch (props.$size) {\n case 'S':\n return css`\n padding-inline-start: ${({ theme }) => theme.spaces[4]};\n padding-inline-end: ${({ theme }) => theme.spaces[3]};\n padding-block: ${({ theme }) => theme.spaces[1]};\n `;\n default:\n return css`\n padding-inline-start: ${({ theme }) => theme.spaces[4]};\n padding-inline-end: ${({ theme }) => theme.spaces[3]};\n padding-block: ${({ theme }) => theme.spaces[2]};\n `;\n }\n }}\n\n &[data-disabled] {\n color: ${({ theme }) => theme.colors.neutral600};\n background: ${({ theme }) => theme.colors.neutral150};\n cursor: not-allowed;\n }\n\n /* Required to ensure the below inputFocusStyles are adhered too */\n &:focus-visible {\n outline: none;\n }\n\n ${({ theme, $hasError }) => inputFocusStyle()({ theme, $hasError })};\n`;\n\nconst TextInput = styled(ComboboxPrimitive.TextInput)`\n width: 100%;\n font-size: 1.4rem;\n line-height: 2.2rem;\n color: ${({ theme }) => theme.colors.neutral800};\n padding: 0;\n border: none;\n background-color: transparent;\n\n &:focus-visible {\n outline: none;\n }\n\n &[aria-disabled='true'] {\n cursor: inherit;\n }\n`;\n\nconst DownIcon = styled(ComboboxPrimitive.Icon)`\n border: none;\n background: transparent;\n padding: 0;\n color: ${({ theme }) => theme.colors.neutral600};\n display: flex;\n\n &[aria-disabled='true'] {\n cursor: inherit;\n }\n`;\n\nconst Content = styled(ComboboxPrimitive.Content)`\n background: ${({ theme }) => theme.colors.neutral0};\n box-shadow: ${({ theme }) => theme.shadows.filterShadow};\n border: 1px solid ${({ theme }) => theme.colors.neutral150};\n border-radius: ${({ theme }) => theme.borderRadius};\n width: var(--radix-combobox-trigger-width);\n /* This is from the design-system figma file. */\n max-height: 15rem;\n z-index: ${({ theme }) => theme.zIndices.popover};\n\n &:focus-visible {\n outline: ${({ theme }) => `2px solid ${theme.colors.primary600}`};\n outline-offset: 2px;\n }\n\n @media (prefers-reduced-motion: no-preference) {\n animation-duration: ${(props) => props.theme.motion.timings['200']};\n\n /* The select can't animate out yet, watch https://github.com/radix-ui/primitives/issues/1893, or take a look and solve it yourself. */\n &[data-state='open'] {\n animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};\n\n &[data-side='top'] {\n animation-name: ${ANIMATIONS.slideUpIn};\n }\n\n &[data-side='bottom'] {\n animation-name: ${ANIMATIONS.slideDownIn};\n }\n }\n }\n`;\n\nconst ComboboxCreateItem = styled(ComboboxPrimitive.CreateItem)`\n && {\n border-top: 1px solid ${({ theme }) => theme.colors.neutral150};\n background: ${({ theme }) => theme.colors.neutral0};\n cursor: pointer;\n padding: ${({ theme }) => theme.spaces[1]};\n position: sticky;\n bottom: 0;\n left: 0;\n }\n &&:hover,\n &&[data-highlighted] {\n background-color: transparent;\n }\n && > div {\n padding: ${({ theme }) => theme.spaces[2]} ${({ theme }) => theme.spaces[4]};\n }\n && > div:hover,\n &&[data-highlighted] > div {\n background-color: ${({ theme }) => theme.colors.primary100};\n }\n`;\n\nconst ScrollAreaCombobox = styled(ScrollArea)`\n padding: ${({ theme }) => theme.spaces[1]};\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * ComboboxOption\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ComboboxOptionProps extends ComboboxPrimitive.ItemProps {\n children: React.ReactNode;\n}\n\nconst Option = React.forwardRef<HTMLDivElement, ComboboxOptionProps>(\n ({ children, value, disabled, textValue, ...props }, ref) => {\n return (\n <ComboboxPrimitive.ComboboxItem asChild value={value} disabled={disabled} textValue={textValue}>\n <OptionBox ref={ref} {...props}>\n <ComboboxPrimitive.ItemText asChild>\n <Typography>{children}</Typography>\n </ComboboxPrimitive.ItemText>\n </OptionBox>\n </ComboboxPrimitive.ComboboxItem>\n );\n },\n);\n\nconst OptionBox = styled.div<{ $hasHover?: boolean }>`\n width: 100%;\n border: none;\n text-align: left;\n outline-offset: -3px;\n padding: ${({ theme }) => theme.spaces[2]} ${({ theme }) => theme.spaces[4]};\n background-color: ${({ theme }) => theme.colors.neutral0};\n border-radius: ${({ theme }) => theme.borderRadius};\n user-select: none;\n\n &[data-state='checked'] {\n background-color: ${({ theme }) => theme.colors.primary100};\n color: ${({ theme }) => theme.colors.primary600};\n font-weight: bold;\n }\n\n &:hover,\n &[data-highlighted] {\n outline: none;\n background-color: ${({ theme, $hasHover = true }) => ($hasHover ? theme.colors.primary100 : theme.colors.neutral0)};\n }\n\n &[data-highlighted] {\n color: ${({ theme }) => theme.colors.primary600};\n font-weight: bold;\n }\n`;\n\nexport { Combobox, Option as ComboboxOption };\nexport type { ComboboxInputElement, ComboboxOptionProps, ComboboxProps };\n","import * as React from 'react';\n\nimport * as AlertDialog from '@radix-ui/react-alert-dialog';\nimport { styled } from 'styled-components';\n\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { Typography, TypographyComponent, TypographyProps } from '../../primitives/Typography';\nimport { ANIMATIONS } from '../../styles/motion';\n\n/* -------------------------------------------------------------------------------------------------\n * Root\n * -----------------------------------------------------------------------------------------------*/\n\ninterface Props extends AlertDialog.AlertDialogProps {}\n\nconst Root = AlertDialog.Root;\n\n/* -------------------------------------------------------------------------------------------------\n * Trigger\n * -----------------------------------------------------------------------------------------------*/\n\ntype TriggerElement = HTMLButtonElement;\n\ninterface TriggerProps extends Omit<AlertDialog.AlertDialogTriggerProps, 'asChild'> {}\n\nconst Trigger = React.forwardRef<TriggerElement, TriggerProps>((props, forwardedRef) => {\n return <AlertDialog.Trigger {...props} asChild ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Content\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContentElement = HTMLDivElement;\n\ninterface ContentProps extends AlertDialog.AlertDialogContentProps {}\n\nconst Content = React.forwardRef<ContentElement, ContentProps>((props, forwardedRef) => {\n return (\n <AlertDialog.Portal>\n <Overlay />\n <ContentImpl ref={forwardedRef} {...props} />\n </AlertDialog.Portal>\n );\n});\n\nconst Overlay = styled(AlertDialog.Overlay)`\n background-color: ${(props) => props.theme.colors.neutral800};\n position: fixed;\n inset: 0;\n z-index: ${(props) => props.theme.zIndices.overlay};\n opacity: 0.2;\n\n @media (prefers-reduced-motion: no-preference) {\n animation: ${ANIMATIONS.overlayFadeIn} ${(props) => props.theme.motion.timings['200']}\n ${(props) => props.theme.motion.easings.authenticMotion};\n }\n`;\n\nconst ContentImpl = styled(AlertDialog.Content)`\n max-width: 42rem;\n height: min-content;\n width: 100%;\n overflow: hidden;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n border-radius: ${(props) => props.theme.borderRadius};\n background-color: ${(props) => props.theme.colors.neutral0};\n box-shadow: ${(props) => props.theme.shadows.popupShadow};\n z-index: ${(props) => props.theme.zIndices.modal};\n\n @media (prefers-reduced-motion: no-preference) {\n &[data-state='open'] {\n animation-duration: ${(props) => props.theme.motion.timings['200']};\n animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};\n animation-name: ${ANIMATIONS.modalPopIn};\n }\n\n &[data-state='closed'] {\n animation-duration: ${(props) => props.theme.motion.timings['120']};\n animation-timing-function: ${(props) => props.theme.motion.easings.easeOutQuad};\n animation-name: ${ANIMATIONS.modalPopOut};\n }\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Header\n * -----------------------------------------------------------------------------------------------*/\n\ntype HeaderElement = HTMLHeadingElement;\n\ninterface HeaderProps extends TypographyProps<'h2'> {}\n\nconst Header = React.forwardRef<HeaderElement, HeaderProps>(({ children, ...restProps }, forwardedRef) => {\n return (\n <AlertDialog.Title asChild>\n {/* @ts-expect-error fix: Type 'OtherIndividualResponsiveProperty<\"color\">' is not assignable to type 'string | undefined'.*/}\n <Title<'h2'> tag=\"h2\" variant=\"beta\" ref={forwardedRef} padding={6} fontWeight=\"bold\" {...restProps}>\n {children}\n </Title>\n </AlertDialog.Title>\n );\n});\n\nconst Title = styled<TypographyComponent<'h2'>>(Typography)`\n display: flex;\n justify-content: center;\n border-bottom: solid 1px ${(props) => props.theme.colors.neutral150};\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Body\n * -----------------------------------------------------------------------------------------------*/\n\ntype BodyElement = HTMLDivElement;\n\ninterface BodyProps extends Omit<FlexProps<'div'>, 'tag'> {\n /**\n * @description optional icon to display, only rendered if\n * children is a string. If provided, it is given the height\n * & width of 24px.\n */\n icon?: React.ReactElement;\n}\n\nconst Body = React.forwardRef<BodyElement, BodyProps>(({ children, icon, ...restProps }, forwardedRef) => {\n return (\n <Flex\n ref={forwardedRef}\n gap={2}\n direction=\"column\"\n paddingTop={8}\n paddingBottom={8}\n paddingLeft={6}\n paddingRight={6}\n {...restProps}\n >\n {typeof children === 'string' ? (\n <>\n {icon\n ? React.cloneElement(icon, {\n width: 24,\n height: 24,\n })\n : null}\n <Description>{children}</Description>\n </>\n ) : (\n children\n )}\n </Flex>\n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Description\n * -----------------------------------------------------------------------------------------------*/\n\ntype DescriptionElement = HTMLParagraphElement;\n\ninterface DescriptionProps extends Omit<TypographyProps<'p'>, 'tag'> {}\n\nconst Description = React.forwardRef<DescriptionElement, DescriptionProps>((props, forwardedRef) => {\n return (\n <AlertDialog.Description asChild>\n <Typography ref={forwardedRef} variant=\"omega\" {...props} tag=\"p\"></Typography>\n </AlertDialog.Description>\n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Footer\n * -----------------------------------------------------------------------------------------------*/\n\ntype FooterElement = HTMLDivElement;\n\ninterface FooterProps extends Omit<FlexProps<'footer'>, 'tag'> {}\n\nconst Footer = React.forwardRef<FooterElement, FooterProps>((props, forwardedRef) => {\n return <Foot ref={forwardedRef} gap={2} padding={4} justifyContent=\"space-between\" {...props} tag=\"footer\" />;\n});\n\nconst Foot = styled<FlexComponent<'footer'>>(Flex)`\n border-top: solid 1px ${(props) => props.theme.colors.neutral150};\n flex: 1;\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Cancel\n * -----------------------------------------------------------------------------------------------*/\n\ntype CancelElement = HTMLButtonElement;\n\ninterface CancelProps extends Omit<AlertDialog.AlertDialogCancelProps, 'asChild'> {}\n\nconst Cancel = React.forwardRef<CancelElement, CancelProps>((props, forwardedRef) => {\n return <AlertDialog.Cancel {...props} asChild ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Action\n * -----------------------------------------------------------------------------------------------*/\n\ntype ActionElement = HTMLButtonElement;\n\ninterface ActionProps extends Omit<AlertDialog.AlertDialogActionProps, 'asChild'> {}\n\nconst Action = React.forwardRef<ActionElement, ActionProps>((props, forwardedRef) => {\n return <AlertDialog.Action {...props} asChild ref={forwardedRef} />;\n});\n\nexport { Root, Trigger, Content, Header, Body, Description, Footer, Cancel, Action };\nexport type {\n Props,\n TriggerElement,\n TriggerProps,\n ContentElement,\n ContentProps,\n HeaderElement,\n HeaderProps,\n BodyElement,\n BodyProps,\n DescriptionElement,\n DescriptionProps,\n FooterElement,\n FooterProps,\n CancelElement,\n CancelProps,\n ActionElement,\n ActionProps,\n};\n","import * as React from 'react';\n\nimport { DateFormatter } from '@internationalized/date';\n\nexport interface DateFormatterOptions extends Intl.DateTimeFormatOptions {\n calendar?: string;\n}\n\n/**\n * This hook wraps the `DateFormatter` from `@internationalized/date`. Which essentially is\n * an extension of the `Intl.DateTimeFormat` API with some additional features.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * for more information.\n *\n * @returns a memoized DateFormatter instance\n *\n * @example\n * ```tsx\n * const MyComponent = () => {\n * const monthFormatter = useDateFormatter(locale, { month: 'long' });\n * const months: string[] = React.useMemo(\n * () => [...Array(12).keys()].map((m) => monthFormatter.format(new Date(Date.UTC(2023, m)))),\n * [monthFormatter],\n * );\n *\n * // assuming the locale is `en-GB` this will render `Janyary` to `December`.\n * return months.map((month) => <p key={month}>{month}</p>)\n * }\n * ```\n */\nexport function useDateFormatter(locale: string, options?: DateFormatterOptions): DateFormatter {\n // Reuse last options object if it is shallowly equal, which allows the useMemo result to also be reused.\n const lastOptions = React.useRef<DateFormatterOptions | null>(null);\n\n if (options && lastOptions.current && isEqual(options, lastOptions.current)) {\n options = lastOptions.current;\n }\n\n lastOptions.current = options ?? null;\n\n return React.useMemo(() => new DateFormatter(locale, options), [locale, options]);\n}\n\nfunction isEqual(a: DateFormatterOptions, b: DateFormatterOptions) {\n if (a === b) {\n return true;\n }\n\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n\n // eslint-disable-next-line no-restricted-syntax\n for (const key of aKeys) {\n if (b[key] !== a[key]) {\n return false;\n }\n }\n\n return true;\n}\n","export const LiveRegionIds = {\n Log: 'live-region-log',\n Status: 'live-region-status',\n Alert: 'live-region-alert',\n};\n","import * as React from 'react';\n\nimport { LiveRegionIds } from './constants';\n\nconst notifyLog = (message: string) => {\n const logEl = document.querySelector<HTMLElement>(`#${LiveRegionIds.Log}`);\n\n if (logEl) {\n logEl.innerText = message;\n }\n};\n\nconst notifyStatus = (message: string) => {\n const statusEl = document.querySelector<HTMLElement>(`#${LiveRegionIds.Status}`);\n\n if (statusEl) {\n statusEl.innerText = message;\n }\n};\n\nconst notifyAlert = (message: string) => {\n const alertEl = document.querySelector<HTMLElement>(`#${LiveRegionIds.Alert}`);\n\n if (alertEl) {\n alertEl.innerText = message;\n }\n};\n\nexport const useNotifyAT = () => {\n React.useEffect(() => {\n return () => {\n notifyLog('');\n notifyAlert('');\n notifyStatus('');\n };\n }, []);\n\n return { notifyLog, notifyAlert, notifyStatus };\n};\n","import { VisuallyHidden } from '../../utilities/VisuallyHidden';\n\nimport { LiveRegionIds } from './constants';\n\nexport const LiveRegions = () => {\n return (\n <VisuallyHidden>\n <p role=\"log\" aria-live=\"polite\" id={LiveRegionIds.Log} aria-relevant=\"all\" />\n <p role=\"status\" aria-live=\"polite\" id={LiveRegionIds.Status} aria-relevant=\"all\" />\n <p role=\"alert\" aria-live=\"assertive\" id={LiveRegionIds.Alert} aria-relevant=\"all\" />\n </VisuallyHidden>\n );\n};\n","import { createGlobalStyle, css } from 'styled-components';\n\nconst GlobalStyle = createGlobalStyle`\n${css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n * {\n margin: 0;\n }\n\n html {\n /* Sets 1rem === 10px */\n font-size: 62.5%;\n }\n\n body {\n height: 100%;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',\n 'Helvetica Neue', sans-serif;\n color: ${({ theme }) => theme.colors.neutral800};\n line-height: 1.5;\n -webkit-font-smoothing: antialiased;\n }\n\n img,\n picture,\n video,\n canvas {\n display: block;\n max-width: 100%;\n }\n\n input,\n button,\n textarea,\n select {\n padding: 0;\n font: inherit;\n }\n\n button {\n border: unset;\n background: unset;\n padding: unset;\n margin: unset;\n }\n\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n overflow-wrap: break-word;\n font: unset;\n }\n\n #root {\n isolation: isolate;\n }\n\n ol,\n ul {\n list-style: none;\n padding: unset;\n margin: unset;\n }\n\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n *:focus-visible {\n outline: 2px solid ${({ theme }) => theme.colors.primary600};\n outline-offset: 2px;\n }\n\n *:has(> :disabled:not(button)) {\n cursor: not-allowed !important;\n }\n\n [aria-disabled='true']:not(button) {\n cursor: not-allowed !important;\n }\n\n /* Focusing the button with a mouse, touch, or stylus will show a subtle drop shadow. */\n *:focus:not(:focus-visible) {\n outline: none;\n }\n\n .lock-body-scroll {\n height: 100vh;\n overflow-y: hidden;\n }\n`}\n`;\n\nexport { GlobalStyle };\n","import { Provider as TooltipProvider, TooltipProviderProps } from '@radix-ui/react-tooltip';\nimport { DefaultTheme, ThemeProvider } from 'styled-components';\n\nimport { LiveRegions } from '../components/LiveRegions';\nimport { createContext } from '../helpers/context';\nimport { useIsomorphicLayoutEffect } from '../hooks/useIsomorphicLayoutEffect';\nimport { GlobalStyle } from '../styles/global';\nimport { lightTheme } from '../themes';\n\nconst DEFAULT_LOCALE = 'en-EN';\n\nconst getDefaultLocale = () => {\n if (typeof navigator === 'undefined') {\n return DEFAULT_LOCALE;\n }\n\n if (navigator.language) {\n return navigator.language;\n }\n\n return DEFAULT_LOCALE;\n};\n\ninterface DesignSystemContextValue {\n locale: string;\n}\n\nconst [Provider, useDesignSystem] = createContext<DesignSystemContextValue>('StrapiDesignSystem', {\n locale: getDefaultLocale(),\n});\n\ninterface DesignSystemProviderProps extends Partial<DesignSystemContextValue> {\n children?: React.ReactNode;\n theme?: DefaultTheme;\n tooltipConfig?: Omit<TooltipProviderProps, 'children'>;\n}\n\nconst DesignSystemProvider = ({\n children,\n locale = getDefaultLocale(),\n theme = lightTheme,\n tooltipConfig,\n}: DesignSystemProviderProps) => {\n useIsomorphicLayoutEffect(() => {\n /**\n * Switching themes should not trigger transitions and animations on elements.\n * The following code will remove all transitions and animations when the theme changes.\n */\n const css = document.createElement('style');\n css.type = 'text/css';\n css.appendChild(\n document.createTextNode(`\n * {\n -webkit-transition: none !important;\n -moz-transition: none !important;\n -o-transition: none !important;\n -ms-transition: none !important;\n transition: none !important;\n animation: none !important;\n }\n `),\n );\n document.head.appendChild(css);\n\n const _ = window.getComputedStyle(css).opacity;\n document.head.removeChild(css);\n }, [theme]);\n\n return (\n <Provider locale={locale}>\n <ThemeProvider theme={theme}>\n <TooltipProvider {...tooltipConfig}>{children}</TooltipProvider>\n <LiveRegions />\n <GlobalStyle />\n </ThemeProvider>\n </Provider>\n );\n};\n\nexport { useDesignSystem, DesignSystemProvider };\nexport type { DesignSystemProviderProps, DesignSystemContextValue };\n","import * as DismissibleLayerPrimitive from '@radix-ui/react-dismissable-layer';\n\nexport const DismissibleLayer = DismissibleLayerPrimitive.Root;\n\nexport type DismissibleLayerProps = DismissibleLayerPrimitive.DismissableLayerProps;\n","import * as React from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport { Box, BoxProps } from '../../primitives/Box';\n\ntype PortalElement = HTMLDivElement;\n\ninterface PortalProps extends BoxProps<'div'> {\n /**\n * An optional container where the portaled content should be appended.\n */\n container?: HTMLElement | null;\n}\n\nconst Portal = React.forwardRef<PortalElement, PortalProps>(\n ({ container = globalThis?.document?.body, ...portalProps }, forwardedRef) => {\n return container ? createPortal(<Box ref={forwardedRef} {...portalProps} />, container) : null;\n },\n);\n\nPortal.displayName = 'Portal';\n\nexport { Portal };\nexport type { PortalProps, PortalElement };\n","import * as React from 'react';\n\nimport { CaretDown, Cross } from '@strapi/icons';\nimport { Select } from '@strapi/ui-primitives';\nimport { styled, css } from 'styled-components';\n\nimport { useComposedRefs } from '../../hooks/useComposeRefs';\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\nimport { Flex, FlexComponent } from '../../primitives/Flex';\nimport { Typography, TypographyComponent, TypographyProps } from '../../primitives/Typography';\nimport { ANIMATIONS } from '../../styles/motion';\nimport { inputFocusStyle } from '../../themes';\nimport { ScrollArea } from '../../utilities/ScrollArea';\nimport { Field, useField } from '../Field';\n\n/* -------------------------------------------------------------------------------------------------\n * SelectTrigger\n * -----------------------------------------------------------------------------------------------*/\n\ntype TriggerSize = 'S' | 'M';\n\ninterface TriggerProps extends BoxProps<'div'>, Pick<Field.InputProps, 'name' | 'id'> {\n /**\n * @default \"Clear\"\n */\n clearLabel?: string;\n disabled?: boolean;\n hasError?: boolean;\n onClear?: (e: React.MouseEvent<HTMLButtonElement | HTMLDivElement>) => void;\n /**\n * @default \"M\"\n */\n size?: TriggerSize;\n startIcon?: React.ReactElement;\n withTags?: boolean;\n}\n\nconst SelectTrigger = React.forwardRef<HTMLDivElement, TriggerProps>(\n (\n { onClear, clearLabel = 'Clear', startIcon, disabled, hasError, children, id, size = 'M', withTags, ...restProps },\n ref,\n ) => {\n const triggerRef = React.useRef<HTMLSpanElement>(null!);\n\n const handleClearClick = (e: React.MouseEvent<HTMLButtonElement | HTMLDivElement>) => {\n if (onClear && !disabled) {\n onClear(e);\n triggerRef.current.focus();\n }\n };\n\n const { labelNode } = useField('SelectTrigger');\n\n const composedRefs = useComposedRefs(triggerRef, ref);\n\n return (\n <Select.Trigger asChild>\n <StyledTrigger\n aria-disabled={disabled}\n $hasError={hasError}\n ref={composedRefs}\n alignItems=\"center\"\n justifyContent=\"space-between\"\n position=\"relative\"\n overflow=\"hidden\"\n hasRadius\n background={disabled ? 'neutral150' : 'neutral0'}\n gap={4}\n cursor=\"default\"\n aria-labelledby={labelNode ? `${id}-label` : undefined}\n $size={size}\n $withTags={withTags}\n {...restProps}\n >\n <Flex flex=\"1\" tag=\"span\" gap={3}>\n {/* TODO: make this composable in v2 <Select.Icon /> */}\n {startIcon && (\n <Flex tag=\"span\" aria-hidden>\n {startIcon}\n </Flex>\n )}\n {children}\n </Flex>\n <Flex tag=\"span\" gap={3}>\n {onClear ? (\n <IconBox\n tag=\"button\"\n hasRadius\n background=\"transparent\"\n role=\"button\"\n tabIndex={0}\n onClick={handleClearClick}\n aria-disabled={disabled}\n aria-label={clearLabel}\n title={clearLabel}\n cursor=\"pointer\"\n >\n <Cross />\n </IconBox>\n ) : null}\n <DownIcon>\n <CaretDown />\n </DownIcon>\n </Flex>\n </StyledTrigger>\n </Select.Trigger>\n );\n },\n);\n\nconst IconBox = styled<BoxComponent<'button'>>(Box)`\n border: none;\n display: flex;\n\n svg {\n height: 1.1rem;\n width: 1.1rem;\n }\n\n svg path {\n fill: ${({ theme }) => theme.colors.neutral500};\n }\n`;\n\nconst StyledTrigger = styled<FlexComponent>(Flex)<{\n $hasError?: boolean;\n $size: TriggerSize;\n $withTags?: boolean;\n}>`\n border: 1px solid ${({ theme, $hasError }) => ($hasError ? theme.colors.danger600 : theme.colors.neutral200)};\n ${(props) => {\n switch (props.$size) {\n case 'S':\n return css`\n padding-block: ${props.theme.spaces[1]};\n padding-inline-start: ${props.$withTags ? props.theme.spaces[1] : props.theme.spaces[4]};\n padding-inline-end: ${props.theme.spaces[3]};\n `;\n default:\n return css`\n padding-block: ${props.$withTags ? '0.3rem' : props.theme.spaces[2]};\n padding-inline-start: ${props.$withTags ? props.theme.spaces[1] : props.theme.spaces[4]};\n padding-inline-end: ${props.theme.spaces[3]};\n `;\n }\n }}\n cursor: pointer;\n\n &[aria-disabled='true'] {\n color: ${(props) => props.theme.colors.neutral500};\n }\n\n /* Required to ensure the below inputFocusStyles are adhered too */\n &:focus-visible {\n outline: none;\n }\n\n ${({ theme, $hasError }) => inputFocusStyle()({ theme, $hasError })};\n`;\n\nconst DownIcon = styled(Select.Icon)`\n display: flex;\n & > svg {\n fill: ${({ theme }) => theme.colors.neutral500};\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectValue\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ValueProps\n extends Omit<TypographyProps, 'children' | 'placeholder'>,\n Pick<Select.SelectValueProps, 'placeholder' | 'children'> {\n asChild?: boolean;\n}\n\nconst SelectValue = React.forwardRef<HTMLSpanElement, ValueProps>(({ children, placeholder, ...restProps }, ref) => (\n <ValueType ref={ref} ellipsis {...restProps}>\n <StyledValue placeholder={placeholder}>{children}</StyledValue>\n </ValueType>\n));\n\nconst ValueType = styled<TypographyComponent>(Typography)`\n flex: 1;\n font-size: 1.4rem;\n line-height: 2.2rem;\n`;\n\nconst StyledValue = styled(Select.Value)`\n display: flex;\n gap: ${({ theme }) => theme.spaces[1]};\n flex-wrap: wrap;\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SelectContent = React.forwardRef<HTMLDivElement, ContentProps>((props, ref) => {\n return (\n <StyledContent ref={ref} {...props}>\n <ScrollArea>{props.children}</ScrollArea>\n </StyledContent>\n );\n});\n\nconst StyledContent = styled(Select.Content)`\n background: ${({ theme }) => theme.colors.neutral0};\n box-shadow: ${({ theme }) => theme.shadows.filterShadow};\n border: 1px solid ${({ theme }) => theme.colors.neutral150};\n border-radius: ${({ theme }) => theme.borderRadius};\n min-width: var(--radix-select-trigger-width);\n max-height: 15.6rem;\n z-index: ${({ theme }) => theme.zIndices.popover};\n\n @media (prefers-reduced-motion: no-preference) {\n animation-duration: ${(props) => props.theme.motion.timings['200']};\n\n /* The select can't animate out yet, watch https://github.com/radix-ui/primitives/issues/1893, or take a look and solve it yourself. */\n &[data-state='open'] {\n animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};\n\n &[data-side='top'] {\n animation-name: ${ANIMATIONS.slideUpIn};\n }\n\n &[data-side='bottom'] {\n animation-name: ${ANIMATIONS.slideDownIn};\n }\n }\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectViewport\n * -----------------------------------------------------------------------------------------------*/\n\nconst SelectViewport = styled(Select.Viewport)`\n padding: ${({ theme }) => theme.spaces[1]};\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItem\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ItemProps extends Select.SelectItemProps {}\n\nconst SelectItem = React.forwardRef<HTMLDivElement, ItemProps>((props, ref) => (\n <StyledSelectItem ref={ref} {...props} />\n));\n\nconst itemStyles = css`\n width: 100%;\n border: none;\n text-align: left;\n outline-offset: -3px;\n border-radius: ${(props) => props.theme.borderRadius};\n padding: ${(props) => `${props.theme.spaces[2]} ${props.theme.spaces[4]}`};\n padding-left: ${({ theme }) => theme.spaces[4]};\n background-color: ${({ theme }) => theme.colors.neutral0};\n display: flex;\n align-items: center;\n gap: ${({ theme }) => theme.spaces[2]};\n white-space: nowrap;\n user-select: none;\n color: ${({ theme }) => theme.colors.neutral800};\n\n &:focus-visible {\n outline: none;\n background-color: ${({ theme }) => theme.colors.primary100};\n cursor: pointer;\n }\n`;\n\nconst StyledSelectItem = styled(Select.Item)`\n ${itemStyles}\n\n &:hover {\n background-color: ${({ theme }) => theme.colors.primary100};\n cursor: pointer;\n }\n\n &[data-state='checked'] {\n font-weight: bold;\n color: ${({ theme }) => theme.colors.primary600};\n font-weight: bold;\n }\n`;\n\nconst Root = Select.Root;\nconst Trigger = SelectTrigger;\nconst Value = SelectValue;\nconst Portal = Select.Portal;\nconst Content = SelectContent;\nconst Viewport = SelectViewport;\nconst Item = SelectItem;\nconst ItemIndicator = Select.ItemIndicator;\nconst ItemText = Select.ItemText;\nconst Group = Select.Group;\n\ntype SelectProps = Select.SelectProps;\ntype SingleSelectProps = Select.SingleSelectProps;\ntype MultiSelectProps = Select.MultiSelectProps;\ntype PortalProps = Select.SelectPortalProps;\ntype ContentProps = Select.SelectContentProps;\ntype ViewportProps = Select.SelectViewportProps;\ntype ItemIndicatorProps = Select.SelectItemIndicatorProps;\ntype ItemTextProps = Select.SelectItemTextProps;\ntype GroupProps = Select.SelectGroupProps;\ntype ValueRenderFn = Select.SelectValueRenderFn;\n\nexport { Root, Trigger, Value, Portal, Content, Viewport, Item, ItemIndicator, ItemText, Group };\nexport type {\n SingleSelectProps,\n MultiSelectProps,\n SelectProps,\n TriggerProps,\n ValueProps,\n ValueRenderFn,\n PortalProps,\n ContentProps,\n ViewportProps,\n ItemProps,\n ItemIndicatorProps,\n ItemTextProps,\n GroupProps,\n};\n","import * as React from 'react';\n\nimport { stripReactIdOfColon } from '../../helpers/strings';\nimport { useId } from '../../hooks/useId';\nimport { useIntersection } from '../../hooks/useIntersection';\nimport { Box } from '../../primitives/Box';\nimport { Flex } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { useField } from '../Field';\n\nimport * as SelectParts from './SelectParts';\n\ntype SingleSelectPropsWithoutLabel = Omit<SelectParts.SingleSelectProps, 'value'> &\n Pick<SelectParts.ContentProps, 'onCloseAutoFocus'> &\n Pick<SelectParts.TriggerProps, 'clearLabel' | 'onClear' | 'startIcon' | 'name' | 'id' | 'hasError' | 'size'> &\n Pick<SelectParts.ValueProps, 'placeholder'> & {\n /**\n * @default (value) => value.toString()\n */\n customizeContent?(value?: string | number): string;\n onChange?: (value: string | number) => void;\n onReachEnd?: (entry: IntersectionObserverEntry) => void;\n value?: string | number | null;\n };\n\nexport type SingleSelectProps = SingleSelectPropsWithoutLabel & { 'aria-label'?: string; 'aria-describedby'?: string };\n\nexport type SingleSelectElement = HTMLDivElement;\n\nexport const SingleSelect = React.forwardRef<SingleSelectElement, SingleSelectProps>(\n (\n {\n children,\n clearLabel = 'Clear',\n customizeContent,\n disabled,\n hasError: hasErrorProp,\n id: idProp,\n name: nameProp,\n onChange,\n onClear,\n onCloseAutoFocus,\n onReachEnd,\n placeholder,\n required: requiredProp,\n size,\n startIcon,\n value: passedValue,\n ...restProps\n },\n forwardedRef,\n ) => {\n /**\n * These values are drawn out from the internals of the Radix component\n * We can then use them to react to visual changes for the component\n */\n const [internalValue, setInternalValue] = React.useState<string>();\n const [internalIsOpen, setInternalIsOpen] = React.useState(false);\n\n const handleOpenChange: SelectParts.SelectProps['onOpenChange'] = (open) => {\n setInternalIsOpen(open);\n };\n\n const handleOnClear = (e) => {\n if (onClear) {\n onClear(e);\n }\n\n if (!onChange) {\n setInternalValue('');\n }\n };\n\n const handleValueChange = (value: string) => {\n /**\n * If it's being externally managed then we shouldn't\n * both setting our copy of the internal value.\n */\n if (onChange) {\n const shouldBeNumber = typeof passedValue === 'number';\n onChange(shouldBeNumber ? Number(value) : value);\n } else {\n setInternalValue(value);\n }\n };\n\n const viewportRef = React.useRef<HTMLDivElement>(null);\n const generatedIntersectionId = useId();\n const intersectionId = `intersection-${stripReactIdOfColon(generatedIntersectionId)}`;\n\n const handleReachEnd = (entry: IntersectionObserverEntry) => {\n if (onReachEnd) {\n onReachEnd(entry);\n }\n };\n\n useIntersection(viewportRef, handleReachEnd, {\n selectorToWatch: `#${intersectionId}`,\n /**\n * We need to know when the select is open because only then will viewportRef\n * not be null. Because it uses a portal that (sensibly) is not mounted 24/7.\n */\n skipWhen: !internalIsOpen,\n });\n\n const { error, required, ...field } = useField('SingleSelect');\n const hasError = Boolean(error) || hasErrorProp;\n const id = field.id ?? idProp;\n const name = field.name ?? nameProp;\n let ariaDescription: string | undefined;\n if (error) {\n ariaDescription = `${id}-error`;\n } else if (field.hint) {\n ariaDescription = `${id}-hint`;\n }\n\n const value =\n (typeof passedValue !== 'undefined' && passedValue !== null ? passedValue.toString() : internalValue) ?? '';\n\n return (\n <SelectParts.Root\n onOpenChange={handleOpenChange}\n disabled={disabled}\n required={required ?? requiredProp}\n onValueChange={handleValueChange}\n value={value}\n {...restProps}\n >\n <SelectParts.Trigger\n ref={forwardedRef}\n id={id}\n name={name}\n startIcon={startIcon}\n hasError={hasError}\n disabled={disabled}\n clearLabel={clearLabel}\n onClear={value && onClear ? handleOnClear : undefined}\n aria-label={restProps['aria-label']}\n aria-describedby={ariaDescription ?? restProps['aria-describedby']}\n size={size}\n >\n <SelectParts.Value placeholder={placeholder} textColor={value ? 'neutral800' : 'neutral600'}>\n {value && customizeContent ? customizeContent(value) : undefined}\n </SelectParts.Value>\n </SelectParts.Trigger>\n <SelectParts.Portal>\n <SelectParts.Content position=\"popper\" sideOffset={4} onCloseAutoFocus={onCloseAutoFocus}>\n <SelectParts.Viewport ref={viewportRef}>\n {children}\n <Box id={intersectionId} width=\"100%\" height=\"1px\" />\n </SelectParts.Viewport>\n </SelectParts.Content>\n </SelectParts.Portal>\n </SelectParts.Root>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * SingleSelectOption\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface SingleSelectOptionProps extends Omit<SelectParts.ItemProps, 'value'> {\n startIcon?: React.ReactNode;\n value: string | number;\n}\n\nexport const SingleSelectOption = React.forwardRef<HTMLDivElement, SingleSelectOptionProps>(\n ({ value, startIcon, children, ...restProps }, ref) => {\n return (\n <SelectParts.Item ref={ref} value={value.toString()} {...restProps}>\n {startIcon && (\n <Flex tag=\"span\" aria-hidden>\n {startIcon}\n </Flex>\n )}\n {/* @TODO: Probably we should refactor this to allow composable option building */}\n <Typography lineHeight=\"20px\" width=\"100%\">\n <SelectParts.ItemText>{children}</SelectParts.ItemText>\n </Typography>\n </SelectParts.Item>\n );\n },\n);\n","/* eslint-disable react/no-unused-prop-types */\nimport * as React from 'react';\n\nimport { useFloating, flip, shift, offset, autoUpdate } from '@floating-ui/react-dom';\nimport {\n startOfWeek,\n today,\n getDayOfWeek,\n isSameDay,\n startOfMonth,\n toCalendarDate,\n CalendarDate,\n endOfMonth,\n minDate as minDateFn,\n maxDate as maxDateFn,\n parseAbsolute,\n getLocalTimeZone,\n} from '@internationalized/date';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { Calendar, Cross } from '@strapi/icons';\nimport { composeEventHandlers } from '@strapi/ui-primitives';\nimport { createPortal } from 'react-dom';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { css, styled, type DefaultTheme } from 'styled-components';\n\nimport { createContext } from '../../helpers/context';\nimport { useComposedRefs } from '../../hooks/useComposeRefs';\nimport { useControllableState } from '../../hooks/useControllableState';\nimport { useDateFormatter } from '../../hooks/useDateFormatter';\nimport { useId } from '../../hooks/useId';\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect';\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { ANIMATIONS } from '../../styles/motion';\nimport { inputFocusStyle } from '../../themes';\nimport { useDesignSystem } from '../../utilities/DesignSystemProvider';\nimport { DismissibleLayer, DismissibleLayerProps } from '../../utilities/DismissibleLayer';\nimport { Portal } from '../../utilities/Portal';\nimport { Field, useField } from '../Field';\nimport { IconButton } from '../IconButton';\nimport { SingleSelect, SingleSelectOption } from '../Select/SingleSelect';\n\nconst DEFAULT_PAST_RANGE = 200;\nconst DEFAULT_FUTURE_RANGE = 15;\n\n/* -------------------------------------------------------------------------------------------------\n * DatePicker\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DatePickerContextValue {\n calendarDate: CalendarDate;\n content: DatePickerContentElement | null;\n contentId: string;\n disabled: boolean;\n locale: string;\n /*\n * Minimum year, that can be selected through the year select\n */\n minDate: CalendarDate;\n /*\n * Maximum year, that can be selected through the year select\n */\n maxDate: CalendarDate;\n open: boolean;\n onCalendarDateChange: (date: CalendarDate) => void;\n onContentChange: (content: DatePickerContentElement | null) => void;\n onOpenChange: (isOpen: boolean) => void;\n onTextInputChange: (textInput: DatePickerTextInputElement | null) => void;\n onTextValueChange: (textValue: string) => void;\n onTriggerChange: (trigger: DatePickerTriggerElement | null) => void;\n onValueChange: (value: CalendarDate | undefined) => void;\n required: boolean;\n textInput: DatePickerTextInputElement | null;\n textValue?: string;\n timeZone: string;\n trigger: DatePickerTriggerElement | null;\n value?: CalendarDate;\n}\n\nconst [DatePickerProvider, useDatePickerContext] = createContext<DatePickerContextValue>('DatePicker');\n\ninterface DatePickerProps\n extends Pick<Partial<DatePickerContextValue>, 'disabled' | 'locale'>,\n Pick<CalendarProps, 'monthSelectLabel' | 'yearSelectLabel'>,\n Omit<TextInputProps, 'onChange' | 'value' | 'ref' | 'size'> {\n calendarLabel?: string;\n className?: string;\n /*\n * Minimum year, that can be selected through the year select\n */\n minDate?: Date;\n /*\n * Maximum year, that can be selected through the year select\n */\n maxDate?: Date;\n /**\n * @default Now\n */\n initialDate?: Date;\n /**\n * onChange function, passed from a parent component, it takes the actual date value and it is used inside the different handlers related to the change event for the DatePicker and the TimePicker and also the clear event for the TimePicker\n */\n onChange?: (date: Date | undefined) => void;\n onClear?: (e: React.MouseEvent<HTMLButtonElement> | React.MouseEvent<HTMLDivElement>) => void;\n clearLabel?: string;\n /**\n * @default\n */\n size?: 'S' | 'M';\n value?: Date;\n}\n\nconst DatePicker = React.forwardRef<DatePickerTextInputElement, DatePickerProps>(\n (\n {\n /**\n * DatePickerCalendar props\n */\n calendarLabel,\n className,\n initialDate,\n locale: defaultLocale,\n maxDate,\n minDate,\n monthSelectLabel = 'Month',\n onChange,\n value: valueProp,\n yearSelectLabel = 'Year',\n /**\n * Combobox props\n */\n hasError: hasErrorProp,\n id: idProp,\n name: nameProp,\n disabled = false,\n required: requiredProp = false,\n onClear,\n clearLabel = 'Clear',\n size = 'M',\n ...restProps\n },\n ref,\n ) => {\n const timeZone = getLocalTimeZone();\n\n const designContext = useDesignSystem('DatePicker');\n\n const locale = defaultLocale ?? designContext.locale;\n\n const formatter = useDateFormatter(locale, {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n });\n\n const [open, setOpen] = React.useState(false);\n const [trigger, setTrigger] = React.useState<DatePickerTriggerElement | null>(null);\n const [textInput, setTextInput] = React.useState<DatePickerTextInputElement | null>(null);\n const [content, setContent] = React.useState<DatePickerContentElement | null>(null);\n const [textValue, setTextValue] = React.useState<string | undefined>();\n\n const [value, setValue] = useControllableState<CalendarDate | undefined>({\n defaultProp: initialDate ? convertUTCDateToCalendarDate(initialDate) : undefined,\n prop: valueProp ? convertUTCDateToCalendarDate(valueProp) : undefined,\n onChange(date) {\n if (onChange) {\n onChange(date?.toDate(timeZone));\n }\n },\n });\n\n const [actualMinDate, actualMaxDate] = React.useMemo(() => {\n const now = initialDate ? convertUTCDateToCalendarDate(initialDate) : today('UTC');\n const actualMinDate = minDate\n ? convertUTCDateToCalendarDate(minDate)\n : now.set({ day: 1, month: 1, year: now.year - DEFAULT_PAST_RANGE });\n\n let actualMaxDate = maxDate\n ? convertUTCDateToCalendarDate(maxDate)\n : now.set({ day: 31, month: 12, year: now.year + DEFAULT_FUTURE_RANGE });\n\n if (actualMaxDate.compare(actualMinDate) < 0) {\n actualMaxDate = actualMinDate.set({ day: 31, month: 12, year: actualMinDate.year + DEFAULT_FUTURE_RANGE });\n }\n\n return [actualMinDate, actualMaxDate];\n }, [minDate, maxDate, initialDate]);\n\n /**\n * Setting the initial calendar state based on priority.\n */\n const [calendarDate, setCalendarDate] = React.useState<CalendarDate>(\n makeInitialCalendarDate({\n currentValue: value,\n minDate: actualMinDate,\n maxDate: actualMaxDate,\n }),\n );\n\n const contentId = useId();\n\n const clearRef = React.useRef(null);\n\n const handleClearClick: React.MouseEventHandler<HTMLButtonElement> & React.MouseEventHandler<HTMLDivElement> = (\n e: React.MouseEvent<HTMLButtonElement> | React.MouseEvent<HTMLDivElement>,\n ) => {\n if (onClear && !disabled) {\n setTextValue('');\n setValue(undefined);\n\n onClear(e);\n textInput?.focus();\n }\n };\n\n const handleOpenChange = React.useCallback(\n (nextOpen: boolean) => {\n if (nextOpen && value) {\n setCalendarDate(value);\n }\n\n setOpen(nextOpen);\n },\n [value],\n );\n\n useIsomorphicLayoutEffect(() => {\n if (valueProp) {\n const date = convertUTCDateToCalendarDate(valueProp);\n setTextValue(formatter.format(date.toDate(timeZone)));\n setCalendarDate(date);\n } else {\n setTextValue('');\n }\n }, [valueProp, formatter, timeZone]);\n\n useIsomorphicLayoutEffect(() => {\n if (initialDate && textValue === undefined) {\n const date = convertUTCDateToCalendarDate(initialDate);\n setTextValue(formatter.format(date.toDate(timeZone)));\n }\n }, [initialDate, textValue, formatter, timeZone]);\n\n const { error, ...field } = useField('Combobox');\n const hasError = Boolean(error) || hasErrorProp;\n const id = field.id ?? idProp;\n const name = field.name ?? nameProp;\n const required = field.required || requiredProp;\n\n let ariaDescription: string | undefined;\n if (error) {\n ariaDescription = `${id}-error`;\n } else if (field.hint) {\n ariaDescription = `${id}-hint`;\n }\n\n return (\n <DatePickerProvider\n calendarDate={calendarDate}\n content={content}\n contentId={contentId}\n disabled={disabled}\n locale={locale}\n minDate={actualMinDate}\n maxDate={actualMaxDate}\n open={open}\n onCalendarDateChange={setCalendarDate}\n onContentChange={setContent}\n onOpenChange={handleOpenChange}\n onTextInputChange={setTextInput}\n onTextValueChange={setTextValue}\n onTriggerChange={setTrigger}\n onValueChange={setValue}\n required={required}\n textInput={textInput}\n textValue={textValue}\n timeZone={timeZone}\n trigger={trigger}\n value={value}\n >\n <DatePickerTrigger className={className} hasError={hasError} size={size}>\n <Calendar fill=\"neutral500\" aria-hidden />\n <DatePickerTextInput ref={ref} aria-describedby={ariaDescription} id={id} name={name} {...restProps} />\n {textValue && onClear ? (\n <IconButton\n size=\"XS\"\n variant=\"ghost\"\n onClick={handleClearClick}\n aria-disabled={disabled}\n aria-label={clearLabel}\n label={clearLabel}\n ref={clearRef}\n >\n <Cross />\n </IconButton>\n ) : null}\n </DatePickerTrigger>\n <Portal>\n <DatePickerContent label={calendarLabel}>\n <DatePickerCalendar monthSelectLabel={monthSelectLabel} yearSelectLabel={yearSelectLabel} />\n </DatePickerContent>\n </Portal>\n </DatePickerProvider>\n );\n },\n);\n\nconst isPrintableCharacter = (str: string): boolean => {\n return Boolean(str.match(/^[^a-zA-Z]*$/));\n};\n\nconst makeInitialCalendarDate: (args: {\n currentValue?: CalendarDate;\n minDate: CalendarDate;\n maxDate: CalendarDate;\n}) => CalendarDate = ({ currentValue, minDate, maxDate }) => {\n const now = today('UTC');\n\n if (currentValue) {\n return currentValue;\n }\n\n if (minDateFn(minDate, now) === minDate && maxDateFn(maxDate, now) === maxDate) {\n return now;\n }\n\n if (minDateFn(minDate, now) === now) {\n return minDate;\n }\n\n if (maxDateFn(maxDate, now) === now) {\n return maxDate;\n }\n\n return now;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DatePickerTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst DATE_PICKER_TRIGGER_NAME = 'DatePickerTrigger';\n\ntype DatePickerTriggerElement = HTMLDivElement;\n\ninterface TriggerProps extends FlexProps {\n hasError?: boolean;\n size?: DatePickerProps['size'];\n}\n\nconst DatePickerTrigger = React.forwardRef<DatePickerTriggerElement, TriggerProps>(\n ({ hasError, size, ...restProps }, forwardedRef) => {\n const context = useDatePickerContext(DATE_PICKER_TRIGGER_NAME);\n\n const composedRefs = useComposedRefs(forwardedRef, (node) => context.onTriggerChange(node));\n\n const handleOpenChange = () => {\n if (!context.disabled) {\n context.onOpenChange(true);\n }\n };\n\n return (\n <FocusScope\n asChild\n // we make sure we're not trapping once it's been closed\n // (closed !== unmounted when animating out)\n trapped={context.open}\n onMountAutoFocus={(event) => {\n // we prevent open autofocus because we manually focus the selected item\n event.preventDefault();\n }}\n onUnmountAutoFocus={(event) => {\n /**\n * In firefox there's a some kind of selection happening after\n * unmounting all of this, so we make sure we clear that.\n */\n document.getSelection()?.empty();\n event.preventDefault();\n }}\n >\n <TriggerElement\n ref={composedRefs}\n $hasError={hasError}\n $size={size}\n {...restProps}\n hasRadius\n gap={3}\n overflow=\"hidden\"\n background={context.disabled ? 'neutral150' : 'neutral0'}\n onClick={composeEventHandlers(restProps.onClick, () => {\n // Whilst browsers generally have no issue focusing the trigger when clicking\n // on a label, Safari seems to struggle with the fact that there's no `onClick`.\n // We force `focus` in this case. Note: this doesn't create any other side-effect\n // because we are preventing default in `onPointerDown` so effectively\n // this only runs for a label \"click\"\n context.textInput?.focus();\n })}\n onPointerDown={composeEventHandlers(restProps.onPointerDown, (event) => {\n // prevent implicit pointer capture\n // https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture\n const target = event.target as HTMLElement;\n\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n }\n\n /**\n * This has been added to allow events inside the trigger to be easily fired\n * e.g. the clear button or removing a tag\n */\n const buttonTarg = target.closest('button') ?? target.closest('div');\n\n if (buttonTarg !== event.currentTarget) {\n return;\n }\n\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (event.button === 0 && event.ctrlKey === false) {\n handleOpenChange();\n /**\n * Firefox had issues focussing the input correctly.\n */\n context.textInput?.focus();\n }\n })}\n />\n </FocusScope>\n );\n },\n);\n\nconst TriggerElement = styled<FlexComponent>(Flex)<{ $hasError?: boolean; $size: TriggerProps['size'] }>`\n border: 1px solid ${({ theme, $hasError }) => ($hasError ? theme.colors.danger600 : theme.colors.neutral200)};\n ${(props) => {\n switch (props.$size) {\n case 'S':\n return css`\n padding-block: ${props.theme.spaces[1]};\n padding-inline: ${props.theme.spaces[3]};\n `;\n default:\n return css`\n padding-block: ${props.theme.spaces[2]};\n padding-inline: ${props.theme.spaces[3]};\n `;\n }\n }}\n\n & > svg {\n flex: 1 0 auto;\n }\n\n &[data-disabled] {\n color: ${({ theme }) => theme.colors.neutral600};\n background: ${({ theme }) => theme.colors.neutral150};\n cursor: not-allowed;\n }\n\n /* Required to ensure the below inputFocusStyles are adhered too */\n &:focus-visible {\n outline: none;\n }\n\n ${({ theme, $hasError }) => inputFocusStyle()({ theme, $hasError })};\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * DatePickerTextInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst DATE_PICKER_TEXT_INPUT_NAME = 'DatePickerTextInput';\n\ntype DatePickerTextInputElement = HTMLInputElement;\n\ninterface TextInputProps extends React.ComponentPropsWithRef<'input'>, Pick<Field.InputProps, 'hasError'> {}\n\nconst DatePickerTextInput = React.forwardRef<DatePickerTextInputElement, TextInputProps>(\n ({ placeholder, ...props }, forwardedRef) => {\n const context = useDatePickerContext(DATE_PICKER_TEXT_INPUT_NAME);\n\n const { onTextValueChange, textValue, onTextInputChange, onOpenChange, disabled, locale } = context;\n\n const composedRefs = useComposedRefs(forwardedRef, (node) => onTextInputChange(node));\n\n const handleOpenChange = () => {\n if (!disabled) {\n onOpenChange(true);\n }\n };\n\n const formatter = useDateFormatter(locale, {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n });\n\n const [dateFormatPlaceholder, separator, dateStructure] = React.useMemo(() => {\n const parts = formatter.formatToParts(new Date());\n\n const dateStructure = parts.filter(\n (part) => part.type === 'year' || part.type === 'month' || part.type === 'day',\n );\n\n const placeholder = dateStructure.map((part) => {\n switch (part.type) {\n case 'day':\n return 'DD';\n case 'month':\n return 'MM';\n case 'year':\n return 'YYYY';\n default:\n return '';\n }\n });\n\n const separator = parts.find((part) => part.type === 'literal')?.value ?? '';\n\n return [placeholder, separator, dateStructure];\n }, [formatter]);\n\n /**\n * the `pattern` prop of an input cannot be a regex it must be a string without the `/` delimiters.\n * Therefore, we manually escape the separator and `d` character.\n */\n const inputPattern = dateFormatPlaceholder.map((part) => `\\\\d{${part.length}}`).join(`\\\\${separator}`);\n\n return (\n <Input\n role=\"combobox\"\n type=\"text\"\n inputMode=\"numeric\"\n ref={composedRefs}\n aria-autocomplete=\"none\"\n aria-controls={context.contentId}\n aria-disabled={context.disabled}\n aria-expanded={context.open}\n aria-required={context.required}\n aria-haspopup=\"dialog\"\n data-state={context.open ? 'open' : 'closed'}\n disabled={disabled}\n data-disabled={disabled ? '' : undefined}\n pattern={inputPattern}\n placeholder={placeholder ?? dateFormatPlaceholder.join(separator)}\n {...props}\n value={textValue ?? ''}\n onBlur={composeEventHandlers(props.onBlur, () => {\n if (!context.textValue) {\n context.onValueChange(undefined);\n\n return;\n }\n\n context.onTextValueChange(formatter.format(context.calendarDate.toDate(context.timeZone)));\n context.onValueChange(context.calendarDate);\n })}\n onChange={composeEventHandlers(props.onChange, (event) => {\n if (isPrintableCharacter(event.target.value)) {\n const inputByPart = event.target.value.split(separator);\n\n /**\n * by using the dateStructure to understand the localised order we split and organise the event.target.value\n * to DD MM YYYY and return as an array.\n */\n const [day, month, year] = dateStructure\n .map((part, index) => {\n const value = inputByPart[index];\n\n return {\n ...part,\n value,\n };\n })\n /**\n * TODO: This could probably be better done?\n */\n .sort((a, b) => {\n if (a.type === 'year') {\n return 1;\n }\n\n if (b.type === 'year') {\n return -1;\n }\n\n if (a.type === 'month') {\n return 1;\n }\n\n if (b.type === 'month') {\n return -1;\n }\n\n return 0;\n })\n .map((part) => part.value);\n\n const currentYear = context.calendarDate.year;\n\n /**\n * If a user types 2 for the year then the year should be the current year with the last number as what they typed.\n * This applies for if they've typed two numbers but not three or four numbers.\n */\n let newYear = context.calendarDate.year;\n\n if (year) {\n /**\n * ensure the year is _at least_ 2 digits long so if the year\n * is 2023 and you type 9 the year becomes 2009 instead of 2029,\n * this is much similar to how other DatePickers work and makes more sense.\n */\n const normalizedYear = year.length === 1 ? `0${year}` : year;\n\n /**\n * The year we set to _must_ be 4 digits long.\n */\n newYear =\n year.length < 3\n ? Number(`${currentYear}`.slice(0, 4 - normalizedYear.length) + normalizedYear)\n : Number(normalizedYear);\n }\n\n /**\n * If you type a value like `94` and that's above the maxDate e.g. 2040 then\n * we assume you would have meant 1994 and correct the date. Again, this is\n * similar to how other DatePickers work.\n *\n * Note we only do this if the typed value is less than 3 digits long.\n */\n if (year && year.length < 3 && newYear > context.maxDate.year) {\n newYear -= 100;\n }\n\n const newDateWithYear = context.calendarDate.set({ year: newYear });\n\n const maxMonthNumber = newDateWithYear.calendar.getMonthsInYear(newDateWithYear);\n\n const newDateWithMonthAndYear = newDateWithYear.set({\n month: month && Number(month) <= maxMonthNumber ? Number(month) : undefined,\n });\n\n const maxDayNumber = newDateWithMonthAndYear.calendar.getDaysInMonth(newDateWithMonthAndYear);\n\n const newDateWithDayMonthAndYear = newDateWithMonthAndYear.set({\n day: day && Number(day) <= maxDayNumber ? Number(day) : undefined,\n });\n\n context.onCalendarDateChange(constrainValue(newDateWithDayMonthAndYear, context.minDate, context.maxDate));\n\n context.onTextValueChange(event.target.value);\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (!context.open && (isPrintableCharacter(event.key) || ['ArrowDown', 'Backspace'].includes(event.key))) {\n handleOpenChange();\n } else if (['Tab'].includes(event.key) && context.open) {\n event.preventDefault();\n } else if (['Escape'].includes(event.key)) {\n if (context.open) {\n context.onOpenChange(false);\n } else {\n context.onValueChange(undefined);\n context.onTextValueChange('');\n }\n event.preventDefault();\n } else if (context.open && ['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {\n event.preventDefault();\n\n switch (event.key) {\n case 'ArrowDown': {\n const nextDate = context.calendarDate.add({ weeks: 1 });\n\n if (context.maxDate && nextDate.compare(context.maxDate) > 0) {\n return;\n }\n\n context.onCalendarDateChange(nextDate);\n\n return;\n }\n case 'ArrowRight': {\n const nextDate = context.calendarDate.add({ days: 1 });\n\n if (context.maxDate && nextDate.compare(context.maxDate) > 0) {\n return;\n }\n\n context.onCalendarDateChange(nextDate);\n\n return;\n }\n case 'ArrowUp': {\n const nextDate = context.calendarDate.subtract({ weeks: 1 });\n\n if (context.minDate && nextDate.compare(context.minDate) < 0) {\n return;\n }\n\n context.onCalendarDateChange(nextDate);\n\n return;\n }\n case 'ArrowLeft': {\n const nextDate = context.calendarDate.subtract({ days: 1 });\n\n if (context.minDate && nextDate.compare(context.minDate) < 0) {\n return;\n }\n\n context.onCalendarDateChange(nextDate);\n }\n // eslint-disable-next-line no-fallthrough\n default:\n break;\n }\n } else if (context.open && ['Enter'].includes(event.key)) {\n event.preventDefault();\n onTextValueChange(formatter.format(context.calendarDate.toDate(context.timeZone)));\n context.onValueChange(context.calendarDate);\n context.onOpenChange(false);\n }\n })}\n />\n );\n },\n);\n\nfunction constrainValue(date: CalendarDate, minValue: CalendarDate, maxValue: CalendarDate) {\n if (minValue) {\n date = maxDateFn(date, minValue);\n }\n\n if (maxValue) {\n date = minDateFn(date, maxValue);\n }\n\n return date;\n}\n\nconst Input = styled.input`\n width: 100%;\n font-size: 1.4rem;\n line-height: 2.2rem;\n color: ${({ theme }) => theme.colors.neutral800};\n border: none;\n background-color: transparent;\n\n &:focus-visible {\n outline: none;\n }\n\n &[aria-disabled='true'] {\n cursor: inherit;\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * DatePickerContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DatePickerContent';\n\ninterface ContentProps extends ContentImplProps {}\n\ntype DatePickerContentElement = DatePickerContentImplElement;\n\nconst DatePickerContent = React.forwardRef<DatePickerContentElement, ContentProps>((props, forwardedRef) => {\n const [fragment, setFragment] = React.useState<DocumentFragment>();\n const context = useDatePickerContext(CONTENT_NAME);\n\n // setting the fragment in `useLayoutEffect` as `DocumentFragment` doesn't exist on the server\n useIsomorphicLayoutEffect(() => {\n setFragment(new DocumentFragment());\n }, []);\n\n if (!context.open) {\n const frag = fragment as Element | undefined;\n\n return frag ? createPortal(<div>{props.children}</div>, frag) : null;\n }\n\n return <DatePickerContentImpl {...props} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * DatePickerContentImpl\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_IMPL_NAME = 'DatePickerContent';\n\ninterface ContentImplProps extends DismissibleLayerProps {\n /**\n * @default 'Choose date'\n */\n label?: string;\n}\n\ntype DatePickerContentImplElement = HTMLDivElement;\n\nconst DatePickerContentImpl = React.forwardRef<DatePickerContentImplElement, ContentImplProps>(\n (props, forwardedRef) => {\n const { label = 'Choose date', ...restProps } = props;\n const { onOpenChange, ...context } = useDatePickerContext(CONTENT_IMPL_NAME);\n\n const { x, y, refs, strategy, placement } = useFloating({\n strategy: 'fixed',\n placement: 'bottom-start',\n middleware: [\n offset({\n mainAxis: 4,\n }),\n shift(),\n flip(),\n ],\n elements: {\n reference: context.trigger,\n },\n whileElementsMounted: autoUpdate,\n });\n\n React.useEffect(() => {\n const close = () => {\n onOpenChange(false);\n };\n window.addEventListener('blur', close);\n window.addEventListener('resize', close);\n\n return () => {\n window.removeEventListener('blur', close);\n window.removeEventListener('resize', close);\n };\n }, [onOpenChange]);\n\n const composedRefs = useComposedRefs<DatePickerContentImplElement>(\n forwardedRef,\n (node) => context.onContentChange(node),\n refs.setFloating,\n );\n\n useFocusGuards();\n\n return (\n <RemoveScroll allowPinchZoom>\n <DismissibleLayer\n asChild\n // When focus is trapped, a focusout event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={(event) => {\n event.preventDefault();\n }}\n onDismiss={() => {\n onOpenChange(false);\n }}\n >\n <ContentElement\n ref={composedRefs}\n data-state={context.open ? 'open' : 'closed'}\n data-side={placement.includes('top') ? 'top' : 'bottom'}\n onContextMenu={(event) => event.preventDefault()}\n id={context.contentId}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={label}\n style={{\n left: x,\n top: y,\n position: strategy,\n }}\n hasRadius\n background=\"neutral0\"\n padding={1}\n {...restProps}\n />\n </DismissibleLayer>\n </RemoveScroll>\n );\n },\n);\n\nconst ContentElement = styled<BoxComponent>(Box)`\n box-shadow: ${({ theme }) => theme.shadows.filterShadow};\n z-index: ${({ theme }) => theme.zIndices.popover};\n border: 1px solid ${({ theme }) => theme.colors.neutral150};\n\n @media (prefers-reduced-motion: no-preference) {\n animation-duration: ${(props) => props.theme.motion.timings['200']};\n\n &[data-state='open'] {\n animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};\n\n &[data-side='top'] {\n animation-name: ${ANIMATIONS.slideUpIn};\n }\n\n &[data-side='bottom'] {\n animation-name: ${ANIMATIONS.slideDownIn};\n }\n }\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * DatePickerCalendar\n * -----------------------------------------------------------------------------------------------*/\n\nconst DATE_PICKER_CALENDAR_NAME = 'DatePickerCalendar';\n\ninterface CalendarProps extends FlexProps<'div'> {\n monthSelectLabel?: string;\n yearSelectLabel?: string;\n}\n\nconst DatePickerCalendar = React.forwardRef<HTMLDivElement, CalendarProps>(\n ({ monthSelectLabel, yearSelectLabel, ...restProps }, ref) => {\n const { locale, timeZone, minDate, maxDate, calendarDate, onCalendarDateChange } =\n useDatePickerContext(DATE_PICKER_CALENDAR_NAME);\n const startDate = startOfMonth(calendarDate);\n\n const years: string[] = React.useMemo(() => {\n const minYear = minDate.year;\n const maxYear = maxDate.year;\n\n return [...Array(maxYear - minYear + 1).keys()].map((y) => (minYear + y).toString());\n }, [minDate, maxDate]);\n\n const monthFormatter = useDateFormatter(locale, { month: 'long' });\n const months: string[] = React.useMemo(\n () =>\n [...Array(calendarDate.calendar.getMonthsInYear(calendarDate)).keys()].map((m) =>\n monthFormatter.format(calendarDate.set({ month: m + 1 }).toDate(timeZone)),\n ),\n [calendarDate, monthFormatter, timeZone],\n );\n\n const dayFormatter = useDateFormatter(locale, { weekday: 'short' });\n /**\n * These are the strings of our days of the week\n * e.g. `Mon`, `Tue`, `Wed`, etc.\n */\n const weekDays = React.useMemo(() => {\n const weekStart = startOfWeek(today(timeZone), locale);\n\n return [...new Array(7).keys()].map((index) => {\n const date = weekStart.add({ days: index });\n const dateDay = date.toDate(timeZone);\n\n return dayFormatter.format(dateDay);\n });\n }, [timeZone, locale, dayFormatter]);\n\n const handleMonthChange = (month: string | number) => {\n if (typeof month === 'number') {\n /**\n * This just to make TS happy, we're not going to get a\n * number because we only use strings as options\n */\n return;\n }\n\n const updatedDate = calendarDate.set({ month: months.indexOf(month) + 1 });\n onCalendarDateChange(updatedDate);\n };\n\n const handleYearChange = (year: string | number) => {\n if (typeof year === 'number') {\n /**\n * This just to make TS happy, we're not going to get a\n * number because we only use strings as options\n */\n return;\n }\n\n const updatedDate = calendarDate.set({ year: parseInt(year, 10) });\n onCalendarDateChange(updatedDate);\n };\n\n const getDatesInWeek = makeGetDatesInWeek(startDate, locale);\n\n return (\n <Flex ref={ref} direction=\"column\" alignItems=\"stretch\" padding={4} {...restProps}>\n <ToolbarFlex justifyContent=\"flex-start\" paddingBottom={4} paddingLeft={2} paddingRight={2} gap={2}>\n {/* these are wrapped in their own Field root so they don't get confused with the potential wrapper of the combobox */}\n <Field.Root>\n <SingleSelect\n aria-label={monthSelectLabel}\n value={months[calendarDate.month - 1]}\n onChange={handleMonthChange}\n >\n {months.map((month) => (\n <SingleSelectOption key={month} value={month}>\n {month}\n </SingleSelectOption>\n ))}\n </SingleSelect>\n </Field.Root>\n <Field.Root>\n <SingleSelect value={calendarDate.year.toString()} aria-label={yearSelectLabel} onChange={handleYearChange}>\n {years.map((year) => (\n <SingleSelectOption key={year} value={year}>\n {year}\n </SingleSelectOption>\n ))}\n </SingleSelect>\n </Field.Root>\n </ToolbarFlex>\n <table role=\"grid\">\n <thead aria-hidden>\n <tr aria-rowindex={0}>\n {weekDays.map((day, index) => (\n <DatePickerHeaderCell aria-colindex={index} key={day}>\n {day}\n </DatePickerHeaderCell>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(6).keys()].map((weekIndex) => (\n <tr aria-rowindex={weekIndex + 2} key={weekIndex}>\n {getDatesInWeek(weekIndex).map((date, index) =>\n date ? (\n <DatePickerCalendarCell\n key={date.toString()}\n aria-colindex={index + 1}\n date={date}\n startDate={startDate}\n disabled={minDate.compare(date) > 0 || date.compare(maxDate) > 0}\n />\n ) : (\n <Cell key={index + 1} aria-colindex={index + 1} />\n ),\n )}\n </tr>\n ))}\n </tbody>\n </table>\n </Flex>\n );\n },\n);\n\nconst makeGetDatesInWeek = (from: CalendarDate, locale: string) => (weekIndex: number) => {\n let date = from.add({ weeks: weekIndex });\n const dates: Array<CalendarDate | null> = [];\n\n date = startOfWeek(date, locale);\n\n /**\n * startOfWeek will clamp dates within the calendar system's valid range, which may\n * start in the middle of a week. In this case, add null placeholders.\n */\n const dayOfWeek = getDayOfWeek(date, locale);\n for (let i = 0; i < dayOfWeek; i++) {\n dates.push(null);\n }\n\n while (dates.length < 7) {\n dates.push(date);\n const nextDate = date.add({ days: 1 });\n\n if (isSameDay(date, nextDate)) {\n /**\n * If the next day is the same, we have hit the end of the calendar system.\n */\n break;\n }\n\n date = nextDate;\n }\n\n /**\n * Add null placeholders if at the end of the calendar system.\n */\n while (dates.length < 7) {\n dates.push(null);\n }\n\n return dates;\n};\n\nconst ToolbarFlex = styled<FlexComponent>(Flex)`\n div[role='combobox'] {\n border: 1px solid transparent;\n background: transparent;\n font-weight: ${(props) => props.theme.fontWeights.bold};\n\n svg {\n fill: ${({ theme }) => theme.colors.neutral500};\n }\n\n &:hover {\n background-color: ${({ theme }) => theme.colors.neutral100};\n }\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * DatePickerHeaderCell\n * -----------------------------------------------------------------------------------------------*/\n\ninterface HeaderCellProps extends Omit<BoxProps<'td'>, 'children'> {\n children: string;\n}\n\nconst DatePickerHeaderCell = React.forwardRef<HTMLTableCellElement, HeaderCellProps>(\n ({ children, ...props }, forwardedRef) => {\n return (\n <Th tag=\"th\" role=\"gridcell\" ref={forwardedRef} {...props} height=\"2.4rem\" width=\"3.2rem\">\n <Typography variant=\"pi\" fontWeight=\"bold\" color=\"neutral800\">\n {children.slice(0, 2)}\n </Typography>\n </Th>\n );\n },\n);\n\nconst Th = styled<BoxComponent<'th' | 'td'>>(Box)`\n border-radius: ${({ theme }) => theme.borderRadius};\n text-transform: capitalize;\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * DatePickerCalendarCell\n * -----------------------------------------------------------------------------------------------*/\n\nconst DATE_PICKER_CALEDNAR_CELL_NAME = 'DatePickerCalendarCell';\n\ntype DatePickerCalendarCellElement = HTMLTableCellElement;\n\ninterface CalendarCellProps extends BoxProps<'td'> {\n date: CalendarDate;\n startDate: CalendarDate;\n disabled: boolean;\n}\n\nconst DatePickerCalendarCell = React.forwardRef<DatePickerCalendarCellElement, CalendarCellProps>(\n ({ date, startDate, disabled, ...props }, forwardedRef) => {\n const { timeZone, locale, calendarDate, onValueChange, onOpenChange, onTextValueChange, onCalendarDateChange } =\n useDatePickerContext(DATE_PICKER_CALEDNAR_CELL_NAME);\n\n const isSelected = isSameDay(calendarDate, date);\n\n const dateFormatter = useDateFormatter(locale, {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n });\n\n const label = React.useMemo(() => dateFormatter.format(date.toDate(timeZone)), [dateFormatter, date, timeZone]);\n\n const cellDateFormatter = useDateFormatter(locale, {\n day: 'numeric',\n calendar: date.calendar.identifier,\n });\n\n const formattedDate = React.useMemo(\n () => cellDateFormatter.formatToParts(date.toDate(timeZone)).find((part) => part.type === 'day')!.value,\n [cellDateFormatter, date, timeZone],\n );\n\n const textValueFormatter = useDateFormatter(locale, {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n });\n\n const endDate = endOfMonth(startDate);\n const isOutsideVisibleRange = date.compare(startDate) < 0 || date.compare(endDate) > 0;\n\n let textColor: keyof DefaultTheme['colors'] = 'neutral900';\n\n if (isSelected) {\n textColor = 'primary600';\n } else if (isOutsideVisibleRange) {\n textColor = 'neutral600';\n }\n\n return (\n <Cell\n tag=\"td\"\n role=\"gridcell\"\n ref={forwardedRef}\n aria-selected={isSelected}\n {...props}\n hasRadius\n aria-label={label}\n tabIndex={isSelected ? 0 : -1}\n background={isSelected ? 'primary100' : 'neutral0'}\n cursor=\"pointer\"\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n event.preventDefault();\n onCalendarDateChange(date);\n onValueChange(date);\n onTextValueChange(textValueFormatter.format(date.toDate(timeZone)));\n onOpenChange(false);\n })}\n aria-disabled={disabled}\n >\n <Typography variant=\"pi\" textColor={textColor}>\n {formattedDate}\n </Typography>\n </Cell>\n );\n },\n);\n\nconst Cell = styled<BoxComponent<'th' | 'td'>>(Box)`\n text-align: center;\n padding: 0.7rem;\n // Trick to prevent the outline from overflowing because of the general outline-offset\n outline-offset: -2px !important;\n &[aria-disabled='true'] {\n pointer-events: none;\n opacity: 0.5;\n }\n\n &[aria-disabled='false'] {\n &:hover {\n background: ${({ theme }) => theme.colors.primary100};\n color: ${({ theme }) => theme.colors.primary600};\n }\n }\n`;\n\nconst convertUTCDateToCalendarDate = (date: Date): CalendarDate => {\n const utcDateString = date.toISOString();\n const zonedDateTime = parseAbsolute(utcDateString, 'UTC');\n\n /**\n * ZonedDateTime can't have weeks added,\n * see https://github.com/adobe/react-spectrum/issues/3667\n */\n return toCalendarDate(zonedDateTime);\n};\n\ntype DatePickerElement = DatePickerTextInputElement;\n\nexport { DatePicker };\nexport type { DatePickerProps, DatePickerElement };\n","import * as React from 'react';\n\nimport { Clock } from '@strapi/icons';\n\nimport { useControllableState } from '../../hooks/useControllableState';\nimport { useDateFormatter } from '../../hooks/useDateFormatter';\nimport { useDesignSystem } from '../../utilities/DesignSystemProvider';\nimport { Combobox, ComboboxProps, ComboboxInputElement, ComboboxOption } from '../Combobox/Combobox';\n\nconst isNotAlphabeticalCharacter = (str: string): boolean => {\n return Boolean(str.match(/^[^a-zA-Z]*$/));\n};\n\nfunction escapeForRegex(str = '') {\n // Escape anything that could be special in a regex\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/* -------------------------------------------------------------------------------------------------\n * TimePicker\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface TimePickerProps\n extends Omit<\n ComboboxProps,\n | 'children'\n | 'autocomplete'\n | 'startIcon'\n | 'placeholder'\n | 'allowCustomValue'\n | 'onFilterValueChange'\n | 'filterValue'\n | 'value'\n | 'defaultValue'\n | 'defaultTextValue'\n | 'textValue'\n | 'onTextValueChange'\n > {\n /**\n * @default 15\n */\n step?: number;\n value?: string;\n defaultValue?: string;\n}\n\nexport const TimePicker = React.forwardRef<ComboboxInputElement, TimePickerProps>(\n ({ step = 15, value: valueProp, defaultValue, onChange, ...restProps }, forwardedRef) => {\n const context = useDesignSystem('TimePicker');\n\n const [textValue, setTextValue] = React.useState<string | undefined>('');\n\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange,\n });\n\n const formatter = useDateFormatter(context.locale, {\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n });\n\n const separator = React.useMemo(() => {\n const parts = formatter.formatToParts(new Date());\n const { value: separator } = parts.find((part) => part.type === 'literal')!;\n\n return separator;\n }, [formatter]);\n\n const timeOptions = React.useMemo(() => {\n const stepCount = 60 / step;\n\n return [...Array(24).keys()].flatMap((hour) =>\n [...Array(stepCount).keys()].map((minuteStep) => formatter.format(new Date(0, 0, 0, hour, minuteStep * step))),\n );\n }, [step, formatter]);\n\n const handleTextValueChange = (string?: string) => {\n if (!string || isNotAlphabeticalCharacter(string)) {\n setTextValue(string);\n }\n };\n\n const createNewTimeValue = (value: string) => {\n const [hours, minutes] = value.split(separator);\n\n if (!hours && !minutes) return undefined;\n\n const hoursAsNumber = Number(hours ?? '0');\n const minutesAsNumber = Number(minutes ?? '0');\n\n if (hoursAsNumber > 23 || minutesAsNumber > 59) return undefined;\n\n return formatter.format(new Date(0, 0, 0, hoursAsNumber, minutesAsNumber));\n };\n\n const handleBlur: React.FocusEventHandler<HTMLInputElement> = (event) => {\n const newValue = createNewTimeValue(event.target.value);\n\n if (newValue) {\n setTextValue(newValue);\n setValue(newValue);\n } else {\n setTextValue(value);\n }\n };\n\n const handleChange = (changedValue?: string) => {\n if (typeof changedValue !== 'undefined') {\n const newValue = createNewTimeValue(changedValue);\n\n setValue(newValue);\n } else {\n setValue(changedValue);\n }\n };\n\n /**\n * Because we allow values that aren't necessarily in the list & we control the text value, we need to\n * update the text value when the value changes to keep the two in sync.\n */\n React.useEffect(() => {\n const actualValue = typeof valueProp === 'undefined' ? '' : valueProp;\n\n if (isNotAlphabeticalCharacter(actualValue)) {\n setTextValue(actualValue);\n }\n }, [valueProp, setTextValue]);\n\n const escapedSeparator = escapeForRegex(separator);\n const pattern = `\\\\d{2}${escapedSeparator}\\\\d{2}`;\n\n return (\n <Combobox\n {...restProps}\n ref={forwardedRef}\n value={value}\n onChange={handleChange}\n isPrintableCharacter={isNotAlphabeticalCharacter}\n allowCustomValue\n placeholder={`--${separator}--`}\n autocomplete=\"none\"\n startIcon={<Clock fill=\"neutral500\" />}\n inputMode=\"numeric\"\n pattern={pattern}\n textValue={textValue}\n onTextValueChange={handleTextValueChange}\n onBlur={handleBlur}\n >\n {timeOptions.map((time) => (\n <ComboboxOption key={time} value={time}>\n {time}\n </ComboboxOption>\n ))}\n </Combobox>\n );\n },\n);\n","import * as React from 'react';\n\nimport { CalendarDateTime, parseAbsoluteToLocal, toCalendarDateTime, getLocalTimeZone } from '@internationalized/date';\nimport { styled } from 'styled-components';\n\nimport { useComposedRefs } from '../../hooks/useComposeRefs';\nimport { useControllableState } from '../../hooks/useControllableState';\nimport { useDateFormatter } from '../../hooks/useDateFormatter';\nimport { Flex } from '../../primitives/Flex';\nimport { useDesignSystem } from '../../utilities/DesignSystemProvider';\nimport { DatePicker as DatePickerInput, DatePickerProps, DatePickerElement } from '../DatePicker/DatePicker';\nimport { Field, useField } from '../Field';\nimport { TimePicker as BaseTimePicker, TimePickerProps } from '../TimePicker';\n\nconst DatePicker = styled(DatePickerInput)`\n flex: 1 1 70%;\n min-width: 120px;\n`;\n\nconst TimePicker = styled(BaseTimePicker)`\n flex: 1 1 30%;\n min-width: 140px;\n`;\n\nexport interface DateTimePickerProps\n extends Omit<DatePickerProps, 'step' | 'onChange' | 'value'>,\n Pick<TimePickerProps, 'step'> {\n /**\n * Label for the DatePicker field\n * @default \"Date\"\n */\n dateLabel?: string;\n /**\n * Label for the TimePicker field\n * @default \"Time\"\n */\n timeLabel?: string;\n onChange?: (date: Date | undefined) => void;\n /**\n * Value. The Date passed as value\n */\n value?: Date | null;\n}\n\nexport const DateTimePicker = React.forwardRef<DatePickerElement, DateTimePickerProps>(\n (\n {\n clearLabel = 'clear',\n dateLabel = 'Choose date',\n timeLabel = 'Choose time',\n disabled = false,\n hasError: hasErrorProp,\n onChange,\n onClear,\n required = false,\n step,\n value,\n initialDate,\n size,\n ...props\n },\n forwardedRef,\n ) => {\n const DatePickerElement = React.useRef<HTMLInputElement>(null!);\n\n const [dateValue, setDateValue] = useControllableState<CalendarDateTime | undefined>({\n defaultProp: initialDate ? convertUTCDateToCalendarDateTime(initialDate, false) : undefined,\n prop: value ? convertUTCDateToCalendarDateTime(value, false) : value ?? undefined,\n onChange(date) {\n if (onChange) {\n onChange(date?.toDate(getLocalTimeZone()));\n }\n },\n });\n\n const context = useDesignSystem('DateTimePicker');\n\n const timeFormatter = useDateFormatter(context.locale, {\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n });\n\n const timeValue = dateValue ? timeFormatter.format(dateValue.toDate(getLocalTimeZone())) : '';\n\n // React.useEffect(() => {\n // setTimeTextValue((s) => (s === timeValue ? s : timeValue));\n // }, [timeValue]);\n\n const handleDateChange = (date: Date | undefined) => {\n let newDate = date ? convertUTCDateToCalendarDateTime(date) : undefined;\n\n /**\n * If the date hasn't changed, don't do anything.\n */\n if (newDate && dateValue && newDate.compare(dateValue) === 0) {\n return;\n }\n\n if (timeValue && newDate) {\n const [hours, minutes] = timeValue.split(':');\n newDate = newDate.set({ hour: parseInt(hours, 10), minute: parseInt(minutes, 10) });\n }\n\n setDateValue(newDate);\n };\n\n const handleTimeChange = (time?: string) => {\n if (!time) {\n return;\n }\n\n const [hours, minutes] = time.split(':');\n const dateToSet = dateValue\n ? dateValue.set({ hour: parseInt(hours, 10), minute: parseInt(minutes, 10) })\n : convertUTCDateToCalendarDateTime(new Date()).set({\n hour: parseInt(hours, 10),\n minute: parseInt(minutes, 10),\n });\n\n setDateValue(dateToSet);\n };\n\n const handleDateClear: DatePickerProps['onClear'] = (e) => {\n setDateValue(undefined);\n // setTimeTextValue('');\n\n if (onClear) {\n onClear(e);\n }\n };\n\n const handleTimeClear = () => {\n const newDate = dateValue ? dateValue.set({ hour: 0, minute: 0 }) : convertUTCDateToCalendarDateTime(new Date());\n\n setDateValue(newDate);\n // setTimeTextValue('');\n };\n\n const composedRefs = useComposedRefs(DatePickerElement, forwardedRef);\n\n const { error, id, labelNode } = useField('DateTimePicker');\n\n const hasError = Boolean(error) || hasErrorProp;\n\n return (\n <Flex aria-labelledby={labelNode ? `${id}-label` : undefined} role=\"group\" flex=\"1\" gap={1}>\n <Field.Root>\n <DatePicker\n {...props}\n size={size}\n value={dateValue?.toDate('UTC')}\n onChange={handleDateChange}\n required={required}\n onClear={onClear ? handleDateClear : undefined}\n clearLabel={`${clearLabel} date`}\n disabled={disabled}\n ref={composedRefs}\n aria-label={dateLabel}\n />\n </Field.Root>\n <Field.Root>\n <TimePicker\n size={size}\n hasError={hasError}\n value={timeValue}\n onChange={handleTimeChange}\n onClear={onClear && timeValue !== undefined && timeValue !== '00:00' ? handleTimeClear : undefined}\n clearLabel={`${clearLabel} time`}\n required={required}\n disabled={disabled}\n step={step}\n aria-label={timeLabel}\n />\n </Field.Root>\n </Flex>\n );\n },\n);\n\nexport const convertUTCDateToCalendarDateTime = (date: Date, resetTime = true): CalendarDateTime => {\n const utcDateString = date.toISOString();\n let zonedDateTime = parseAbsoluteToLocal(utcDateString);\n\n if (resetTime) {\n zonedDateTime = zonedDateTime.set({ hour: 0, minute: 0 });\n }\n\n /**\n * ZonedDateTime can't have weeks added,\n * see https://github.com/adobe/react-spectrum/issues/3667\n */\n return toCalendarDateTime(zonedDateTime);\n};\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\nimport { PropsToTransientProps } from '../../types';\n\ntype DividerElement = HTMLDivElement;\n\ninterface DividerProps extends Omit<BoxProps<'div'>, 'tag'> {}\n\nconst Divider = React.forwardRef<DividerElement, DividerProps>((props, forwardedRef) => {\n return (\n <DividerImpl\n ref={forwardedRef}\n background=\"neutral150\"\n {...props}\n data-orientation=\"horizontal\"\n role=\"separator\"\n tag=\"div\"\n />\n );\n});\n\nconst DividerImpl = styled<BoxComponent<'div'>>(Box)<PropsToTransientProps<DividerProps>>`\n height: 1px;\n border: none;\n /* If contained in a Flex parent we want to prevent the Divider to shink */\n flex-shrink: 0;\n`;\n\nexport { Divider };\nexport type { DividerElement, DividerProps };\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Box, BoxComponent } from '../../primitives/Box';\nimport { Flex, FlexProps } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\n\nexport interface EmptyStateLayoutProps extends Pick<FlexProps, 'hasRadius' | 'shadow'> {\n action?: React.ReactNode;\n content: string;\n icon?: React.ReactNode;\n}\n\nconst EmptyStateIconWrapper = styled<BoxComponent>(Box)`\n svg {\n height: 8.8rem;\n }\n`;\n\nexport const EmptyStateLayout = React.forwardRef<HTMLDivElement, EmptyStateLayoutProps>(\n ({ icon, content, action, hasRadius = true, shadow = 'tableShadow' }: EmptyStateLayoutProps, forwardedRef) => {\n return (\n <Flex\n ref={forwardedRef}\n alignItems=\"center\"\n direction=\"column\"\n padding={11}\n background=\"neutral0\"\n hasRadius={hasRadius}\n shadow={shadow}\n >\n {icon ? (\n <EmptyStateIconWrapper paddingBottom={6} aria-hidden>\n {icon}\n </EmptyStateIconWrapper>\n ) : null}\n\n <Box paddingBottom={4}>\n <Typography variant=\"delta\" tag=\"p\" textAlign=\"center\" textColor=\"neutral600\">\n {content}\n </Typography>\n </Box>\n\n {action}\n </Flex>\n );\n },\n);\n","import { StateField, StateEffect, type Range } from '@codemirror/state';\nimport { EditorView, Decoration } from '@codemirror/view';\n\n// Effects can be attached to transactions to communicate with the extension\nconst addMarks = StateEffect.define<Range<Decoration>[]>();\nconst filterMarks = StateEffect.define<(_from: number, _to: number, _value: Decoration) => boolean>();\n\nconst lineHighlightMark = Decoration.mark({\n attributes: { style: 'background-color: yellow; color: black' },\n});\n\nconst markField = StateField.define({\n // Start with an empty set of decorations\n create() {\n return Decoration.none;\n },\n // This is called whenever the editor updates it computes the new set\n update(value, transaction) {\n // Move the decorations to account for document changes\n value = value.map(transaction.changes);\n transaction.effects.forEach((effect) => {\n if (effect.is(addMarks)) {\n value = value.update({\n add: effect.value,\n sort: true,\n });\n } else if (effect.is(filterMarks)) {\n value = value.update({ filter: effect.value });\n }\n });\n\n return value;\n },\n // Indicate that this field provides a set of decorations\n provide: (f) => EditorView.decorations.from(f),\n});\n\nexport { addMarks, filterMarks, lineHighlightMark, markField };\n","import * as React from 'react';\n\nimport { jsonParseLinter, json } from '@codemirror/lang-json';\nimport { useCodeMirror, ReactCodeMirrorRef, ReactCodeMirrorProps } from '@uiw/react-codemirror';\nimport { styled } from 'styled-components';\n\nimport { useComposedRefs } from '../../hooks/useComposeRefs';\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { inputFocusStyle } from '../../themes';\nimport { Field, useField } from '../Field';\n\nimport { markField, addMarks, filterMarks, lineHighlightMark } from './utils/decorationExtension';\n\nimport type { ViewUpdate } from '@codemirror/view';\n\ninterface JSONInputProps extends Omit<FlexProps, 'onChange'>, Pick<Field.InputProps, 'hasError' | 'required' | 'id'> {\n value?: string;\n disabled?: boolean;\n onChange?: (value: string) => void;\n}\n\ninterface JSONInputRef extends Partial<HTMLElement> {\n focus(): void;\n}\n\nconst JSONInput = React.forwardRef<JSONInputRef, JSONInputProps>(\n (\n {\n hasError: hasErrorProp,\n required: requiredProp,\n id: idProp,\n value = '',\n disabled = false,\n onChange = () => null,\n ...boxProps\n },\n forwardedRef,\n ) => {\n const editor = React.useRef<ReactCodeMirrorRef['editor']>();\n const editorState = React.useRef<ReactCodeMirrorRef['state']>();\n const editorView = React.useRef<ReactCodeMirrorRef['view']>();\n\n const { error, ...field } = useField('JsonInput');\n const hasError = Boolean(error) || hasErrorProp;\n const id = field.id ?? idProp;\n const required = field.required || requiredProp;\n\n let ariaDescription: string | undefined;\n if (error) {\n ariaDescription = `${id}-error`;\n } else if (field.hint) {\n ariaDescription = `${id}-hint`;\n }\n\n /**\n * Determines the line to highlight when lintJSON finds an error via jsonParseLinter()\n */\n const highglightErrorAtLine = (lineNumber: number) => {\n const doc = editorState.current?.doc;\n\n if (doc) {\n const { text, to: lineEnd } = doc.line(lineNumber);\n\n const lineStart = lineEnd - text.trimStart().length;\n\n if (lineEnd > lineStart) {\n editorView.current?.dispatch({\n effects: addMarks.of([lineHighlightMark.range(lineStart, lineEnd)]),\n });\n }\n }\n };\n\n const clearErrorHighlight = () => {\n const doc = editorState.current?.doc;\n\n if (doc) {\n const docEnd = doc.length || 0;\n\n editorView.current?.dispatch({\n effects: filterMarks.of((from, to) => to <= 0 || from >= docEnd),\n });\n }\n };\n /**\n * Checks code editor for valid json input and then highlights any errors\n */\n const lintJSON = ({ state, view }: Pick<ViewUpdate, 'state' | 'view'>) => {\n editorView.current = view;\n editorState.current = state;\n\n clearErrorHighlight();\n // Function calls json.parse and returns error message + position\n const lintJSONForErrrors = jsonParseLinter();\n const lintErrors = lintJSONForErrrors(view);\n\n if (lintErrors.length) {\n highglightErrorAtLine(state.doc.lineAt(lintErrors[0].from).number);\n }\n };\n\n const onCodeMirrorChange: ReactCodeMirrorProps['onChange'] = (currentValue, viewUpdate) => {\n lintJSON(viewUpdate);\n // Call the parent's onChange handler\n onChange(currentValue);\n };\n\n const onCreateEditor: ReactCodeMirrorProps['onCreateEditor'] = (view, state) => {\n editorView.current = view;\n editorState.current = state;\n // Lint the JSON in case the initial value is invalid\n lintJSON({ view, state });\n };\n\n const { setContainer, view } = useCodeMirror({\n value,\n onCreateEditor,\n container: editor.current,\n editable: !disabled,\n extensions: [json(), markField],\n onChange: onCodeMirrorChange,\n theme: 'dark',\n basicSetup: {\n lineNumbers: true,\n bracketMatching: true,\n closeBrackets: true,\n indentOnInput: true,\n syntaxHighlighting: true,\n highlightSelectionMatches: true,\n tabSize: 2,\n },\n });\n\n const composedRefs = useComposedRefs(editor, setContainer);\n\n React.useImperativeHandle(\n forwardedRef,\n () => ({\n ...view?.dom,\n focus() {\n if (view) {\n view.focus();\n }\n },\n scrollIntoView(args?: boolean | ScrollIntoViewOptions) {\n if (view) {\n view.dom.scrollIntoView(args);\n }\n },\n }),\n [view],\n );\n\n return (\n <JSONInputContainer\n ref={composedRefs}\n $disabled={disabled}\n $hasError={hasError}\n alignItems=\"stretch\"\n fontSize={2}\n hasRadius\n aria-required={required}\n id={id}\n aria-describedby={ariaDescription}\n {...boxProps}\n />\n );\n },\n);\n\nconst JSONInputContainer = styled<FlexComponent>(Flex)<{ $hasError?: boolean; $disabled?: boolean }>`\n line-height: ${({ theme }) => theme.lineHeights[2]};\n\n .cm-editor {\n /** \n * Hard coded since the color is the same between themes,\n * theme.colors.neutral800 changes between themes \n */\n background-color: #32324d;\n width: 100%;\n outline: none;\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'text')};\n }\n\n .cm-scroller {\n border: 1px solid ${({ theme, $hasError }) => ($hasError ? theme.colors.danger600 : theme.colors.neutral200)};\n /* inputFocusStyle will receive hasError prop */\n ${inputFocusStyle()}\n }\n\n .cm-editor,\n .cm-scroller {\n border-radius: ${({ theme }) => theme.borderRadius};\n }\n\n .cm-gutters,\n .cm-activeLineGutter {\n /** \n * Hard coded since the color is the same between themes,\n * theme.colors.neutral700 changes between themes \n */\n background-color: #4a4a6a;\n }\n`;\n\nexport { JSONInput };\nexport type { JSONInputProps, JSONInputRef };\n","import * as React from 'react';\n\nimport { PolymorphicRef } from '../../types';\nimport { forwardRef } from '../../utilities/forwardRef';\nimport { BaseLink } from '../BaseLink';\nimport { Button, ButtonProps } from '../Button';\n\ntype LinkButtonProps<C extends React.ElementType = typeof BaseLink> = ButtonProps<C>;\n\nconst LinkButton = forwardRef(\n <C extends React.ElementType = typeof BaseLink>(\n { disabled, ...restProps }: LinkButtonProps<C>,\n ref: PolymorphicRef<C>,\n ) => {\n return (\n <Button<typeof BaseLink>\n ref={ref}\n tag={BaseLink}\n tabIndex={disabled ? -1 : undefined}\n disabled={disabled}\n {...restProps}\n />\n );\n },\n);\n\ntype LinkButtonComponent<C extends React.ElementType = 'a'> = (props: LinkButtonProps<C>) => React.ReactNode;\n\nexport { LinkButton };\nexport type { LinkButtonProps, LinkButtonComponent };\n","import { styled } from 'styled-components';\n\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\n\nexport interface MainProps extends BoxProps<'main'> {\n labelledBy?: string | undefined;\n}\n\nconst MainWrapper = styled<BoxComponent<'main'>>(Box)`\n // To prevent global outline on focus visible to force an outline when Main is focused\n &:focus-visible {\n outline: none;\n }\n`;\n\nexport const Main = ({ labelledBy = 'main-content-title', ...props }: MainProps) => {\n return <MainWrapper aria-labelledby={labelledBy} tag=\"main\" id=\"main-content\" tabIndex={-1} {...props} />;\n};\n","import { styled } from 'styled-components';\n\nimport { Box, BoxComponent } from '../../primitives/Box';\n\nexport interface SkipToContentProps {\n children?: React.ReactNode;\n}\n\nconst AnchorBox = styled<BoxComponent<'a'>>(Box)`\n text-decoration: none;\n\n &:focus {\n left: ${({ theme }) => theme.spaces[3]};\n top: ${({ theme }) => theme.spaces[3]};\n }\n`;\n\nexport const SkipToContent = ({ children }: SkipToContentProps) => {\n return (\n <AnchorBox\n tag=\"a\"\n href=\"#main-content\"\n background=\"primary600\"\n color=\"neutral0\"\n left=\"-100%\"\n padding={3}\n position=\"absolute\"\n top=\"-100%\"\n hasRadius\n zIndex={9999}\n >\n {children}\n </AnchorBox>\n );\n};\n","import * as React from 'react';\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { Cross } from '@strapi/icons';\nimport { styled } from 'styled-components';\n\nimport { Flex, type FlexComponent, type FlexProps } from '../../primitives/Flex';\nimport { Typography, TypographyProps } from '../../primitives/Typography';\nimport { ANIMATIONS } from '../../styles/motion';\nimport { ScrollArea, ScrollAreaProps } from '../../utilities/ScrollArea';\nimport { IconButton } from '../IconButton';\n\n/* -------------------------------------------------------------------------------------------------\n * Root\n * -----------------------------------------------------------------------------------------------*/\n\ninterface Props extends Dialog.DialogProps {}\n\nconst Root = Dialog.Root;\n\n/* -------------------------------------------------------------------------------------------------\n * Trigger\n * -----------------------------------------------------------------------------------------------*/\n\ntype TriggerElement = HTMLButtonElement;\n\ninterface TriggerProps extends Omit<Dialog.DialogTriggerProps, 'asChild'> {}\n\nconst Trigger = React.forwardRef<TriggerElement, TriggerProps>((props, forwardedRef) => {\n return <Dialog.Trigger {...props} asChild ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Content\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContentElement = HTMLDivElement;\n\ninterface ContentProps extends Dialog.DialogContentProps {}\n\nconst Content = React.forwardRef<ContentElement, ContentProps>((props, forwardedRef) => {\n return (\n <Dialog.Portal>\n <Overlay />\n <ContentImpl ref={forwardedRef} {...props} />\n </Dialog.Portal>\n );\n});\n\nconst Overlay = styled(Dialog.Overlay)`\n background-color: ${(props) => props.theme.colors.neutral800};\n position: fixed;\n inset: 0;\n z-index: ${(props) => props.theme.zIndices.overlay};\n opacity: 0.2;\n will-change: opacity;\n\n @media (prefers-reduced-motion: no-preference) {\n animation: ${ANIMATIONS.overlayFadeIn} ${(props) => props.theme.motion.timings['200']}\n ${(props) => props.theme.motion.easings.authenticMotion};\n }\n`;\n\nconst ContentImpl = styled(Dialog.Content)`\n max-width: 83rem;\n max-height: 90vh;\n height: auto;\n width: 60%;\n overflow: hidden;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n border-radius: ${(props) => props.theme.borderRadius};\n background-color: ${(props) => props.theme.colors.neutral0};\n box-shadow: ${(props) => props.theme.shadows.popupShadow};\n z-index: ${(props) => props.theme.zIndices.modal};\n\n @media (prefers-reduced-motion: no-preference) {\n &[data-state='open'] {\n animation-duration: ${(props) => props.theme.motion.timings['200']};\n animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};\n animation-name: ${ANIMATIONS.modalPopIn};\n }\n\n &[data-state='closed'] {\n animation-duration: ${(props) => props.theme.motion.timings['120']};\n animation-timing-function: ${(props) => props.theme.motion.easings.easeOutQuad};\n animation-name: ${ANIMATIONS.modalPopOut};\n }\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Close\n * -----------------------------------------------------------------------------------------------*/\n\ntype CloseElement = HTMLButtonElement;\n\ninterface CloseProps extends Omit<Dialog.DialogCloseProps, 'asChild'> {}\n\nconst Close = React.forwardRef<CloseElement, CloseProps>((props, forwardedRef) => {\n return <Dialog.Close {...props} asChild ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Header\n * -----------------------------------------------------------------------------------------------*/\n\ntype HeaderElement = HTMLDivElement;\n\ninterface HeaderProps extends Omit<FlexProps<'header'>, 'tag'> {\n /**\n * @default 'Close modal'\n * @description The label for the close button,\n * useful if you want the button to be translated\n * to other languages.\n */\n closeLabel?: string;\n}\n\nconst Header = React.forwardRef<HeaderElement, HeaderProps>(\n ({ children, closeLabel = 'Close modal', ...restProps }, forwardedRef) => {\n return (\n <Head\n ref={forwardedRef}\n padding={4}\n paddingLeft={5}\n paddingRight={5}\n background=\"neutral100\"\n justifyContent=\"space-between\"\n {...restProps}\n tag=\"header\"\n >\n {children}\n <Close>\n <IconButton withTooltip={false} label={closeLabel}>\n <Cross />\n </IconButton>\n </Close>\n </Head>\n );\n },\n);\n\nconst Head = styled<FlexComponent<'header'>>(Flex)`\n border-bottom: solid 1px ${(props) => props.theme.colors.neutral150};\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Title\n * -----------------------------------------------------------------------------------------------*/\n\ntype TitleElement = HTMLHeadingElement;\n\ninterface TitleProps extends TypographyProps<'h2'> {}\n\nconst Title = React.forwardRef<TitleElement, TitleProps>((props, forwardedRef) => {\n return (\n <Dialog.Title asChild>\n <Typography tag=\"h2\" variant=\"omega\" fontWeight=\"bold\" ref={forwardedRef} {...props} />\n </Dialog.Title>\n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Body\n * -----------------------------------------------------------------------------------------------*/\n\ntype BodyElement = HTMLDivElement;\n\ninterface BodyProps extends ScrollAreaProps {}\n\nconst Body = React.forwardRef<BodyElement, BodyProps>(({ children, ...restProps }, forwardedRef) => {\n return (\n <BodyScroll ref={forwardedRef} {...restProps}>\n {children}\n </BodyScroll>\n );\n});\n\nconst BodyScroll = styled(ScrollArea)`\n padding-inline: ${(props) => props.theme.spaces[8]};\n\n & > div {\n padding-block: ${(props) => props.theme.spaces[8]};\n\n & > div {\n // the scroll area component applies a display: table to the child, which we don't want.\n display: block !important;\n }\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Footer\n * -----------------------------------------------------------------------------------------------*/\n\ntype FooterElement = HTMLDivElement;\n\ninterface FooterProps extends Omit<FlexProps<'footer'>, 'tag'> {}\n\nconst Footer = React.forwardRef<FooterElement, FooterProps>((props, forwardedRef) => {\n return (\n <Foot\n ref={forwardedRef}\n padding={4}\n paddingLeft={5}\n paddingRight={5}\n background=\"neutral100\"\n justifyContent=\"space-between\"\n {...props}\n tag=\"footer\"\n />\n );\n});\n\nconst Foot = styled<FlexComponent<'footer'>>(Flex)`\n border-top: solid 1px ${(props) => props.theme.colors.neutral150};\n flex: 1;\n`;\n\nexport { Root, Trigger, Close, Content, Header, Title, Body, Footer };\nexport type {\n Props,\n TriggerElement,\n TriggerProps,\n CloseElement,\n CloseProps,\n ContentProps,\n ContentElement,\n HeaderElement,\n HeaderProps,\n TitleElement,\n TitleProps,\n BodyElement,\n BodyProps,\n FooterElement,\n FooterProps,\n};\n","/* eslint-disable no-restricted-globals */\nimport * as React from 'react';\n\nimport { NumberFormatter, NumberParser } from '@internationalized/number';\nimport { CaretDown } from '@strapi/icons';\nimport { useCallbackRef } from '@strapi/ui-primitives';\nimport { styled } from 'styled-components';\n\nimport { KeyboardKeys } from '../../helpers/keyboardKeys';\nimport { _internaluseUncontrolledState } from '../../hooks/useControllableState';\nimport { Flex } from '../../primitives/Flex';\nimport { useDesignSystem } from '../../utilities/DesignSystemProvider';\nimport { Field } from '../Field';\n\ninterface NumberInputProps extends Omit<Field.InputProps, 'onChange' | 'value'> {\n onValueChange: (value: number | undefined) => void;\n locale?: string;\n value?: number;\n step?: number;\n}\n\nconst INITIAL_VALUE = '';\n\nconst NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n ({ startAction, locale: defaultLocale, onValueChange, value, step = 1, disabled = false, ...props }, ref) => {\n const designContext = useDesignSystem('NumberInput');\n const locale = defaultLocale || designContext.locale;\n const numberParserRef = React.useRef(new NumberParser(locale, { style: 'decimal' }));\n const numberFormaterRef = React.useRef(new NumberFormatter(locale, { maximumFractionDigits: 20 }));\n\n const [inputValue, setInputValue] = useControllableState({\n prop(currentInputValue) {\n const stringifiedValue = String(value);\n\n /**\n * This basically accounts for when someone wants to:\n * 1. clear the input\n * 2. use a minus value\n * 3. use a decimal value\n *\n * And always give it a string\n */\n return isNaN(Number(stringifiedValue)) || (stringifiedValue !== currentInputValue && currentInputValue !== '')\n ? currentInputValue\n : numberFormaterRef.current.format(Number(value));\n },\n defaultProp: INITIAL_VALUE,\n onChange(value) {\n /**\n * always return a\n */\n const parsedValue = numberParserRef.current.parse(value ?? '');\n onValueChange(isNaN(parsedValue) ? undefined : parsedValue);\n },\n });\n\n /**\n * Value will either be a number or a string,\n * if the former then it'll be converted to a string.\n */\n const formatNumberAndSetInput = (value: string | number | undefined) => {\n setInputValue(String(value));\n };\n\n const handelInputChange: React.ChangeEventHandler<HTMLInputElement> = ({ target: { value } }) => {\n if (numberParserRef.current.isValidPartialNumber(value)) {\n formatNumberAndSetInput(value);\n }\n };\n\n /**\n * Convert step to string to get accurate decimal place\n * then round the parsed value accordingly\n */\n const getDecimalPlaces = (step: number): number => {\n const stepString = step.toString();\n if (!stepString.includes('.')) return 0;\n return stepString.split('.')[1].length;\n };\n\n const decimalPlaces = getDecimalPlaces(step);\n\n const increment = () => {\n if (!inputValue) {\n formatNumberAndSetInput(step);\n\n return;\n }\n\n const parsedValue = numberParserRef.current.parse(inputValue);\n const newValue = isNaN(parsedValue) ? step : parsedValue + step;\n const roundedValue = parseFloat(newValue.toFixed(decimalPlaces));\n\n formatNumberAndSetInput(numberFormaterRef.current.format(roundedValue));\n };\n\n const decrement = () => {\n if (!inputValue) {\n formatNumberAndSetInput(-step);\n\n return;\n }\n\n const parsedValue = numberParserRef.current.parse(inputValue);\n const newValue = isNaN(parsedValue) ? -step : parsedValue - step;\n const roundedValue = parseFloat(newValue.toFixed(decimalPlaces));\n\n formatNumberAndSetInput(numberFormaterRef.current.format(roundedValue));\n };\n\n const handleKeyDown = (e) => {\n if (disabled) return;\n\n switch (e.key) {\n case KeyboardKeys.DOWN: {\n e.preventDefault();\n decrement();\n break;\n }\n\n case KeyboardKeys.UP: {\n e.preventDefault();\n increment();\n break;\n }\n\n default:\n break;\n }\n };\n\n /**\n * Only format on blur as vanity because otherwise it breaks when a user\n * wants to include a minus or decimal value.\n */\n const handleBlur = () => {\n if (inputValue) {\n const parsedValue = numberParserRef.current.parse(inputValue);\n const formattedValue = isNaN(parsedValue) ? '' : numberFormaterRef.current.format(parsedValue);\n formatNumberAndSetInput(formattedValue);\n }\n };\n\n return (\n <Field.Input\n ref={ref}\n startAction={startAction}\n disabled={disabled}\n type=\"text\"\n inputMode=\"decimal\"\n onChange={handelInputChange}\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n value={inputValue}\n endAction={\n <Flex direction=\"column\">\n <ArrowButton\n disabled={disabled}\n aria-hidden\n $reverse\n onClick={increment}\n tabIndex={-1}\n type=\"button\"\n data-testid=\"ArrowUp\"\n >\n <CaretDown fill=\"neutral500\" />\n </ArrowButton>\n <ArrowButton\n disabled={disabled}\n aria-hidden\n onClick={decrement}\n tabIndex={-1}\n type=\"button\"\n data-testid=\"ArrowDown\"\n >\n <CaretDown fill=\"neutral500\" />\n </ArrowButton>\n </Flex>\n }\n {...props}\n />\n );\n },\n);\n\nconst ArrowButton = styled.button<{ $reverse?: boolean }>`\n display: flex;\n justify-content: center;\n align-items: center;\n transform: translateY(${({ $reverse }) => ($reverse ? `-2px` : `2px`)});\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : undefined)};\n height: 1.1rem;\n\n svg {\n width: 1.2rem;\n transform: ${({ $reverse }) => ($reverse ? 'rotateX(180deg)' : undefined)};\n }\n`;\n\ninterface UseControllableStateParams<TProp> {\n prop?: TProp | undefined | ((state?: TProp | undefined) => TProp | undefined);\n defaultProp?: TProp | undefined;\n onChange?: (state?: TProp) => void;\n}\n\ntype SetStateFn<TState> = (prevState: TState) => TState;\n\nfunction useControllableState<TProp>({\n prop,\n defaultProp,\n onChange = () => {},\n}: UseControllableStateParams<TProp>): [\n TProp | undefined,\n (nextState: TProp | undefined | SetStateFn<TProp | undefined>) => void,\n] {\n const [uncontrolledProp, setUncontrolledProp] = _internaluseUncontrolledState({\n defaultProp,\n onChange,\n });\n const isControlled = prop !== undefined;\n const propValue: TProp | undefined = prop instanceof Function ? prop(uncontrolledProp) : prop;\n const value = isControlled ? propValue : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value = typeof nextValue === 'function' ? setter(propValue) : nextValue;\n\n if (value !== propValue) {\n handleChange(value);\n setUncontrolledProp(nextValue);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, propValue, setUncontrolledProp, handleChange],\n );\n\n return [value, setValue];\n}\n\nexport { NumberInput };\nexport type { NumberInputProps };\n","import * as React from 'react';\n\nexport interface PaginationContextValue {\n activePage: number;\n pageCount: number;\n}\n\nexport const PaginationContext = React.createContext<PaginationContextValue>({ activePage: 1, pageCount: 1 });\nexport const usePagination = () => React.useContext(PaginationContext);\n","import * as React from 'react';\n\nimport { Box } from '../../primitives/Box';\nimport { Flex } from '../../primitives/Flex';\n\nimport { PaginationContext } from './PaginationContext';\n\nexport interface PaginationProps {\n activePage: number;\n children: React.ReactNode;\n label?: string;\n pageCount: number;\n}\n\nexport const Pagination = ({ children, label = 'Pagination', activePage, pageCount }: PaginationProps) => {\n const context = React.useMemo(() => ({ activePage, pageCount }), [activePage, pageCount]);\n\n return (\n <PaginationContext.Provider value={context}>\n <Box aria-label={label} tag=\"nav\">\n <Flex tag=\"ol\" gap={1}>\n {React.Children.map(children, (child, index) => {\n // eslint-disable-next-line react/no-array-index-key\n return <li key={index}>{child}</li>;\n })}\n </Flex>\n </Box>\n </PaginationContext.Provider>\n );\n};\n","import * as React from 'react';\n\nimport { ChevronLeft, ChevronRight } from '@strapi/icons';\nimport { styled } from 'styled-components';\n\nimport { Box, BoxProps } from '../../primitives/Box';\nimport { Typography } from '../../primitives/Typography';\nimport { focus } from '../../styles/buttons';\nimport { PolymorphicRef } from '../../types';\nimport { forwardRef } from '../../utilities/forwardRef';\nimport { VisuallyHidden } from '../../utilities/VisuallyHidden';\nimport { BaseLink, BaseLinkComponent, BaseLinkProps } from '../BaseLink';\n\nimport { usePagination } from './PaginationContext';\n\n/* -------------------------------------------------------------------------------------------------\n * Next/Prev/Links\n * -----------------------------------------------------------------------------------------------*/\n\ntype PaginationLinkProps<C extends React.ElementType = 'a'> = BaseLinkProps<C>;\n\nconst PreviousLink = forwardRef(\n <C extends React.ElementType = 'a'>({ children, ...props }: PaginationLinkProps<C>, ref: PolymorphicRef<C>) => {\n const { activePage } = usePagination();\n\n const disabled = activePage === 1;\n\n return (\n <ActionLinkWrapper ref={ref} aria-disabled={disabled} tabIndex={disabled ? -1 : undefined} {...props}>\n <VisuallyHidden>{children}</VisuallyHidden>\n <ChevronLeft aria-hidden />\n </ActionLinkWrapper>\n );\n },\n);\n\ntype PreviousLinkComponent<C extends React.ElementType = 'a'> = (props: PaginationLinkProps<C>) => React.ReactNode;\n\nconst NextLink = forwardRef(\n <C extends React.ElementType = 'a'>({ children, ...props }: PaginationLinkProps<C>, ref: PolymorphicRef<C>) => {\n const { activePage, pageCount } = usePagination();\n\n const disabled = activePage === pageCount;\n\n return (\n <ActionLinkWrapper ref={ref} aria-disabled={disabled} tabIndex={disabled ? -1 : undefined} {...props}>\n <VisuallyHidden>{children}</VisuallyHidden>\n <ChevronRight aria-hidden />\n </ActionLinkWrapper>\n );\n },\n);\n\ntype NextLinkComponent<C extends React.ElementType = 'a'> = (props: PaginationLinkProps<C>) => React.ReactNode;\n\nconst LinkWrapper = styled<BaseLinkComponent>(BaseLink)<{ $active?: boolean }>`\n padding: ${({ theme }) => theme.spaces[3]};\n border-radius: ${({ theme }) => theme.borderRadius};\n box-shadow: ${({ $active, theme }) => ($active ? theme.shadows.filterShadow : undefined)};\n text-decoration: none;\n display: flex;\n\n ${focus}\n`;\n\nconst ActionLinkWrapper = styled(LinkWrapper)`\n font-size: 1.1rem;\n\n svg path {\n fill: ${(p) => (p['aria-disabled'] ? p.theme.colors.neutral300 : p.theme.colors.neutral600)};\n }\n\n &:focus,\n &:hover {\n svg path {\n fill: ${(p) => (p['aria-disabled'] ? p.theme.colors.neutral300 : p.theme.colors.neutral700)};\n }\n }\n\n ${(p) =>\n p['aria-disabled']\n ? `\n pointer-events: none;\n `\n : undefined}\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * PageLink\n * -----------------------------------------------------------------------------------------------*/\n\ntype PaginationPageLinkProps<C extends React.ElementType = 'a'> = PaginationLinkProps<C> & {\n number: number;\n};\n\nconst PageLink = forwardRef(\n <C extends React.ElementType = 'a'>(\n { number, children, ...props }: PaginationPageLinkProps<C>,\n ref: PolymorphicRef<C>,\n ) => {\n const { activePage } = usePagination();\n\n const isActive = activePage === number;\n\n return (\n <PageLinkWrapper ref={ref} {...props} aria-current={isActive} $active={isActive}>\n <VisuallyHidden>{children}</VisuallyHidden>\n <Typography aria-hidden fontWeight={isActive ? 'bold' : undefined} lineHeight=\"revert\" variant=\"pi\">\n {number}\n </Typography>\n </PageLinkWrapper>\n );\n },\n);\n\ntype PageLinkComponent<C extends React.ElementType = 'a'> = (props: PaginationPageLinkProps<C>) => React.ReactNode;\n\nconst PageLinkWrapper = styled(LinkWrapper)<{ $active?: boolean }>`\n color: ${({ theme, $active }) => ($active ? theme.colors.primary700 : theme.colors.neutral800)};\n background: ${({ theme, $active }) => ($active ? theme.colors.neutral0 : undefined)};\n\n &:hover {\n box-shadow: ${({ theme }) => theme.shadows.filterShadow};\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Dots\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DotsProps extends BoxProps {}\n\nconst Dots = ({ children, ...props }: DotsProps) => (\n <Box {...props}>\n <VisuallyHidden>{children}</VisuallyHidden>\n <Typography aria-hidden lineHeight=\"revert\" textColor=\"neutral800\" variant=\"pi\">\n …\n </Typography>\n </Box>\n);\n\nexport { Dots, NextLink, PageLink, PreviousLink };\nexport type {\n PaginationLinkProps,\n PaginationPageLinkProps,\n DotsProps,\n PageLinkComponent,\n PreviousLinkComponent,\n NextLinkComponent,\n};\n","import * as React from 'react';\n\nimport * as Popover from '@radix-ui/react-popover';\nimport { styled } from 'styled-components';\n\nimport { stripReactIdOfColon } from '../../helpers/strings';\nimport { useComposedRefs } from '../../hooks/useComposeRefs';\nimport { useId } from '../../hooks/useId';\nimport { useIntersection } from '../../hooks/useIntersection';\nimport { Box } from '../../primitives/Box';\nimport { ANIMATIONS } from '../../styles/motion';\nimport { ScrollArea, ScrollAreaProps } from '../../utilities/ScrollArea';\n\n/* -------------------------------------------------------------------------------------------------\n * Root\n * -----------------------------------------------------------------------------------------------*/\n\ninterface Props extends Popover.PopoverProps {}\n\nconst Root = Popover.Root;\n\n/* -------------------------------------------------------------------------------------------------\n * Trigger\n * -----------------------------------------------------------------------------------------------*/\n\ntype TriggerElement = HTMLButtonElement;\n\ninterface TriggerProps extends Omit<Popover.PopoverTriggerProps, 'asChild'> {}\n\nconst Trigger = React.forwardRef<TriggerElement, TriggerProps>((props, forwardedRef) => {\n return <Popover.Trigger {...props} asChild ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Content\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContentElement = HTMLDivElement;\n\ninterface ContentProps extends Popover.PopoverContentProps {}\n\nconst Content = React.forwardRef<ContentElement, ContentProps>((props, forwardedRef) => {\n return (\n <Popover.Portal>\n <PopoverContent sideOffset={4} side=\"bottom\" align=\"start\" {...props} ref={forwardedRef} />\n </Popover.Portal>\n );\n});\n\nconst PopoverContent = styled(Popover.Content)`\n box-shadow: ${({ theme }) => theme.shadows.filterShadow};\n z-index: ${({ theme }) => theme.zIndices.popover};\n background-color: ${(props) => props.theme.colors.neutral0};\n border: 1px solid ${({ theme }) => theme.colors.neutral150};\n border-radius: ${({ theme }) => theme.borderRadius};\n\n @media (prefers-reduced-motion: no-preference) {\n animation-duration: ${(props) => props.theme.motion.timings['200']};\n\n &[data-state='open'] {\n animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};\n\n &[data-side='top'] {\n animation-name: ${ANIMATIONS.slideUpIn};\n }\n\n &[data-side='bottom'] {\n animation-name: ${ANIMATIONS.slideDownIn};\n }\n }\n\n &[data-state='closed'] {\n animation-timing-function: ${(props) => props.theme.motion.easings.easeOutQuad};\n\n &[data-side='top'] {\n animation-name: ${ANIMATIONS.slideUpOut};\n }\n\n &[data-side='bottom'] {\n animation-name: ${ANIMATIONS.slideDownOut};\n }\n }\n }\n`;\n\ninterface ScrollAreaImplProps extends ScrollAreaProps {\n intersectionId?: string;\n onReachEnd?: (entry: IntersectionObserverEntry) => void;\n}\n\nconst ScrollAreaImpl = React.forwardRef<HTMLDivElement, ScrollAreaImplProps>(\n ({ children, intersectionId, onReachEnd, ...props }, forwardedRef) => {\n const popoverRef = React.useRef<HTMLDivElement>(null!);\n const composedRef = useComposedRefs(popoverRef, forwardedRef);\n\n const generatedIntersectionId = useId();\n useIntersection(popoverRef, onReachEnd ?? (() => {}), {\n selectorToWatch: `#${stripReactIdOfColon(generatedIntersectionId)}`,\n skipWhen: !intersectionId || !onReachEnd,\n });\n\n return (\n <PopoverScrollArea ref={composedRef} {...props}>\n {children}\n {intersectionId && onReachEnd && (\n <Box id={stripReactIdOfColon(generatedIntersectionId)} width=\"100%\" height=\"1px\" />\n )}\n </PopoverScrollArea>\n );\n },\n);\n\nconst PopoverScrollArea = styled(ScrollArea)`\n height: 20rem;\n`;\n\nexport { Root, Trigger, Content, ScrollAreaImpl as ScrollArea };\nexport type {\n Props,\n TriggerElement,\n TriggerProps,\n ContentProps,\n ContentElement,\n ScrollAreaImplProps as ScrollAreaProps,\n};\n","import * as React from 'react';\n\nimport * as Progress from '@radix-ui/react-progress';\nimport { styled } from 'styled-components';\n\ntype Size = 'S' | 'M';\n\ninterface ProgressBarProps extends Omit<Progress.ProgressProps, 'children'> {\n size?: Size;\n}\n\nconst ProgressBar = React.forwardRef<HTMLDivElement, ProgressBarProps>(\n ({ size = 'M', value, ...restProps }, forwardedRef) => {\n return (\n <ProgressRoot ref={forwardedRef} $size={size} {...restProps}>\n <ProgressIndicator style={{ transform: `translate3D(-${100 - (value ?? 0)}%, 0, 0)` }} />\n </ProgressRoot>\n );\n },\n);\n\nconst ProgressRoot = styled(Progress.Root)<{ $size: Size }>`\n position: relative;\n overflow: hidden;\n width: ${(props) => (props.$size === 'S' ? '7.8rem' : '10.2rem')};\n height: ${(props) => (props.$size === 'S' ? '0.4rem' : '0.8rem')};\n background-color: ${(props) => props.theme.colors.neutral600};\n border-radius: ${(props) => props.theme.borderRadius};\n\n /* Fix overflow clipping in Safari */\n /* https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0 */\n transform: translateZ(0);\n`;\n\nconst ProgressIndicator = styled(Progress.Indicator)`\n background-color: ${({ theme }) => theme.colors.neutral0};\n border-radius: ${({ theme }) => theme.borderRadius};\n width: 100%;\n height: 100%;\n\n @media (prefers-reduced-motion: no-preference) {\n transition: transform ${(props) => props.theme.motion.timings['320']}\n ${(props) => props.theme.motion.easings.authenticMotion};\n }\n`;\n\nexport { ProgressBar };\nexport type { ProgressBarProps, Size as ProgressBarSize };\n","import * as React from 'react';\n\nimport * as RadioGroup from '@radix-ui/react-radio-group';\nimport { styled } from 'styled-components';\n\nimport { useId } from '../../hooks/useId';\nimport { Flex } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { ANIMATIONS } from '../../styles/motion';\n\n/* -------------------------------------------------------------------------------------------------\n * Group\n * -----------------------------------------------------------------------------------------------*/\n\ntype GroupElement = HTMLDivElement;\n\ninterface GroupProps extends RadioGroup.RadioGroupProps {}\n\nconst Group = React.forwardRef<GroupElement, GroupProps>((props, forwardedRef) => {\n return <RadioGroupRoot ref={forwardedRef} {...props} />;\n});\n\nconst RadioGroupRoot = styled(RadioGroup.Root)`\n display: flex;\n flex-direction: column;\n gap: ${(props) => props.theme.spaces[3]};\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Item\n * -----------------------------------------------------------------------------------------------*/\n\ntype ItemElement = HTMLButtonElement;\n\ninterface ItemProps extends RadioGroup.RadioGroupItemProps {}\n\nconst Item = React.forwardRef<ItemElement, ItemProps>(({ children, id: idProp, ...restProps }, forwardedRef) => {\n const id = useId(idProp);\n\n return (\n <Flex gap={2}>\n <RadioGroupItem id={id} ref={forwardedRef} {...restProps}>\n <RadioGroupIndicator />\n </RadioGroupItem>\n <Typography tag=\"label\" htmlFor={id}>\n {children}\n </Typography>\n </Flex>\n );\n});\n\nconst RadioGroupItem = styled(RadioGroup.Item)`\n background: ${(props) => props.theme.colors.neutral0};\n width: 2rem;\n height: 2rem;\n flex: 0 0 2rem;\n border-radius: 50%;\n border: 1px solid ${(props) => props.theme.colors.neutral300};\n position: relative;\n cursor: pointer;\n z-index: 0;\n\n @media (prefers-reduced-motion: no-preference) {\n transition: border-color ${(props) => props.theme.motion.timings['120']}\n ${(props) => props.theme.motion.easings.easeOutQuad};\n }\n\n &[data-state='checked'] {\n border: 1px solid ${(props) => props.theme.colors.primary600};\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n background-color: ${(props) => props.theme.colors.neutral200};\n }\n\n /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n min-width: 44px;\n min-height: 44px;\n }\n`;\n\nconst RadioGroupIndicator = styled(RadioGroup.Indicator)`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n position: relative;\n\n &[data-state='checked'] {\n @media (prefers-reduced-motion: no-preference) {\n animation: ${ANIMATIONS.popIn} ${(props) => props.theme.motion.timings['200']};\n }\n }\n\n &::after {\n content: '';\n display: block;\n width: 1rem;\n height: 1rem;\n border-radius: 50%;\n background: ${(props) => props.theme.colors.primary600};\n }\n`;\n\nexport { Group, Item };\nexport type { GroupElement, GroupProps, ItemElement, ItemProps };\n","export const focusFocusable = (node) => {\n const nextNode = node.querySelector('[tabindex=\"0\"]');\n\n if (nextNode) {\n nextNode.focus();\n }\n};\n","import * as React from 'react';\n\nexport interface RawTableContextValue {\n rowIndex: number;\n colIndex: number;\n setTableValues: ({ rowIndex, colIndex }: { rowIndex: number; colIndex: number }) => void;\n}\n\nexport const RawTableContext = React.createContext<RawTableContextValue>({\n rowIndex: 0,\n colIndex: 0,\n setTableValues() {\n throw new Error('setTableValues must be initialized via the RawTableContext.Provider');\n },\n});\nexport const useTable = () => React.useContext(RawTableContext);\n","import * as React from 'react';\n\nimport { KeyboardKeys } from '../../helpers/keyboardKeys';\nimport { useComposedRefs } from '../../hooks/useComposeRefs';\n\nimport { focusFocusable } from './focusFocusable';\nimport { RawTableContext } from './RawTableContext';\n\nexport interface RawTableProps extends React.TableHTMLAttributes<HTMLTableElement> {\n colCount: number;\n initialCol?: number;\n initialRow?: number;\n jumpStep?: number;\n rowCount: number;\n}\n\nexport const RawTable = React.forwardRef<HTMLTableElement, RawTableProps>(\n ({ colCount, rowCount, jumpStep = 3, initialCol = 0, initialRow = 0, ...props }, forwardedRef) => {\n const tableRef = React.useRef<HTMLTableElement>(null);\n const mountedRef = React.useRef(false);\n const composedRef = useComposedRefs(tableRef, forwardedRef);\n /**\n * Rows will always have n+1 line because of the <tr><th></th></tr> elements\n */\n const [rowIndex, setRowIndex] = React.useState(initialRow);\n const [colIndex, setColIndex] = React.useState(initialCol);\n\n const setTableValues = React.useCallback(({ colIndex, rowIndex }) => {\n setColIndex(colIndex);\n setRowIndex(rowIndex);\n }, []);\n\n React.useEffect(() => {\n if (mountedRef.current) {\n focusFocusable(tableRef.current);\n }\n\n if (!mountedRef.current) {\n mountedRef.current = true;\n }\n }, [colIndex, rowIndex]);\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLTableElement>) => {\n switch (e.key) {\n case KeyboardKeys.RIGHT: {\n e.preventDefault();\n setColIndex((prevColIndex) => (prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex));\n\n break;\n }\n\n case KeyboardKeys.LEFT: {\n e.preventDefault();\n setColIndex((prevColIndex) => (prevColIndex > 0 ? prevColIndex - 1 : prevColIndex));\n\n break;\n }\n\n case KeyboardKeys.UP: {\n e.preventDefault();\n setRowIndex((prevRowIndex) => (prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex));\n\n break;\n }\n\n case KeyboardKeys.DOWN: {\n e.preventDefault();\n setRowIndex((prevRowIndex) => (prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex));\n\n break;\n }\n\n case KeyboardKeys.HOME: {\n e.preventDefault();\n\n if (e.ctrlKey) {\n setRowIndex(0);\n }\n\n setColIndex(0);\n\n break;\n }\n\n case KeyboardKeys.END: {\n e.preventDefault();\n\n if (e.ctrlKey) {\n setRowIndex(rowCount - 1);\n }\n\n setColIndex(colCount - 1);\n\n break;\n }\n\n case KeyboardKeys.PAGE_DOWN: {\n e.preventDefault();\n\n setRowIndex((prevRowIndex) => (prevRowIndex + jumpStep < rowCount ? prevRowIndex + jumpStep : rowCount - 1));\n\n break;\n }\n\n case KeyboardKeys.PAGE_UP: {\n e.preventDefault();\n\n setRowIndex((prevRowIndex) => (prevRowIndex - jumpStep > 0 ? prevRowIndex - jumpStep : 0));\n\n break;\n }\n\n default:\n break;\n }\n };\n\n const context = React.useMemo(() => ({ rowIndex, colIndex, setTableValues }), [colIndex, rowIndex, setTableValues]);\n\n return (\n <RawTableContext.Provider value={context}>\n <table\n role=\"grid\"\n ref={composedRef}\n aria-rowcount={rowCount}\n aria-colcount={colCount}\n onKeyDown={handleKeyDown}\n {...props}\n />\n </RawTableContext.Provider>\n );\n },\n);\n","/**\n * Sometimes, we want to retrieve the elements with tabindex=-1, and sometime we don't\n * The includeNegativeTabIndex aims to provide this capability\n *\n */\nexport const getFocusableNodes = (node: HTMLElement, includeNegativeTabIndex?: boolean): HTMLElement[] => {\n const nodes = [\n ...node.querySelectorAll<HTMLElement>(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])',\n ),\n ];\n const focusables = nodes.filter((node) => {\n if (node.hasAttribute('disabled')) return false;\n\n if (includeNegativeTabIndex) return true;\n\n return node.getAttribute('tabindex') !== '-1';\n });\n\n return focusables;\n};\n\n/**\n * This function filters an array of HTMLElements and returns any of them that have internal keyboard navigation such as input type=\"text\"\n */\nexport const getFocusableNodesWithKeyboardNav = (nodes: HTMLElement[]) => {\n return nodes.filter((node) => {\n if (node.tagName === 'INPUT') {\n return (node as HTMLInputElement).type !== 'checkbox' && (node as HTMLInputElement).type !== 'radio';\n }\n\n return false;\n });\n};\n","import * as React from 'react';\n\nimport { getFocusableNodes, getFocusableNodesWithKeyboardNav } from '../../helpers/getFocusableNodes';\nimport { KeyboardKeys } from '../../helpers/keyboardKeys';\nimport { useComposedRefs } from '../../hooks/useComposeRefs';\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect';\nimport { Box, BoxProps } from '../../primitives/Box';\n\nimport { useTable } from './RawTableContext';\n\n/* -------------------------------------------------------------------------------------------------\n * RawTd\n * -----------------------------------------------------------------------------------------------*/\n\ninterface RawTdProps extends BoxProps<'td' | 'th'> {\n 'aria-colindex'?: number;\n children?: React.ReactNode;\n coords?: {\n col: number;\n row: number;\n };\n}\n\nconst RawTd = React.forwardRef<HTMLTableCellElement, RawTdProps>(\n ({ coords = { col: 0, row: 0 }, tag = 'td', ...props }, forwardedRef) => {\n const tdRef = React.useRef<HTMLTableCellElement>(null!);\n const composedRef = useComposedRefs(forwardedRef, tdRef);\n const { rowIndex, colIndex, setTableValues } = useTable();\n const [isActive, setIsActive] = React.useState(false);\n\n const handleKeyDown: React.KeyboardEventHandler<HTMLTableCellElement> = (e) => {\n const focusableNodes = getFocusableNodes(tdRef.current, true);\n\n /**\n * If the cell does not have focusable children or if it has focusable children\n * without keyboard navigation, we should not run the handler.\n */\n if (\n focusableNodes.length === 0 ||\n (focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0)\n ) {\n return;\n /**\n * This allows cells that **only** have buttons in them to still be\n * navigable with the keyboard arrow keys (left / right) as if they were grid cells.\n *\n * If there are nextNodes (next child node) then we stop the table's keyboard navigation\n * handlers from happening.\n */\n }\n if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== 'BUTTON')) {\n e.preventDefault();\n const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);\n\n if (e.key === KeyboardKeys.RIGHT) {\n const nextNode = focusableNodes[focussedButtonIndex + 1];\n\n if (nextNode) {\n e.stopPropagation();\n nextNode.focus();\n }\n } else if (e.key === KeyboardKeys.LEFT) {\n const nextNode = focusableNodes[focussedButtonIndex - 1];\n\n if (nextNode) {\n e.stopPropagation();\n nextNode.focus();\n }\n }\n\n return;\n }\n\n const isEnterKey = e.key === KeyboardKeys.ENTER;\n\n if (isEnterKey && !isActive) {\n setIsActive(true);\n /**\n * Cells should be \"escapeable\" with the escape key or enter key\n */\n } else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {\n /**\n * It's expected behaviour that the cell can't be escaped with `enter` if\n * the element that is focussed is an anchor tag.\n */\n if (isEnterKey && document.activeElement?.tagName === 'A') {\n return;\n }\n\n setIsActive(false);\n tdRef.current.focus();\n } else if (isActive) {\n /**\n * This stops the table navigation from working\n */\n e.stopPropagation();\n }\n };\n\n const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;\n\n /**\n * Handles tabindex of the rendered cell element\n */\n useIsomorphicLayoutEffect(() => {\n const focusableNodes = getFocusableNodes(tdRef.current, true);\n\n /**\n * We should focus the cell if there are no focussable children inside\n * If there is only one focusable child and it has it's own keyboard navigation\n * Or if there is more than one focusable child unless those children\n * are exclusively buttons.\n */\n if (\n focusableNodes.length === 0 ||\n (focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0) ||\n (focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== 'BUTTON')))\n ) {\n tdRef.current.setAttribute('tabIndex', !isActive && isFocused ? '0' : '-1');\n\n focusableNodes.forEach((node, index) => {\n node.setAttribute('tabIndex', isActive ? '0' : '-1');\n\n /**\n * When a cell is active we want to focus the\n * first focusable element simulating a focus trap\n */\n if (isActive && index === 0) {\n node.focus();\n }\n });\n } else {\n focusableNodes.forEach((node) => {\n node.setAttribute('tabIndex', isFocused ? '0' : '-1');\n });\n }\n }, [isActive, isFocused]);\n\n const handleFocusableNodeFocus = React.useCallback(() => {\n const focusableNodes = getFocusableNodes(tdRef.current, true);\n\n /**\n * If there's 1 or more focusable children and at least one has keyboard navigation\n * or the children are exclusively button elements the cell should be using the \"active\" system\n */\n if (\n focusableNodes.length >= 1 &&\n (getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 ||\n !focusableNodes.find((node) => node.tagName !== 'BUTTON'))\n ) {\n setIsActive(true);\n }\n /**\n * This function is wrapped in `useCallback` so we can safely\n * assume that the reference will not change\n */\n setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });\n }, [coords, setTableValues]);\n\n /**\n * This handles the case where you click on a focusable\n * node that has it's own keyboard nav (e.g. Input)\n */\n useIsomorphicLayoutEffect(() => {\n const cell = tdRef.current;\n const focusableNodes = getFocusableNodes(cell, true);\n\n focusableNodes.forEach((node) => {\n node.addEventListener('focus', handleFocusableNodeFocus);\n });\n\n return () => {\n const focusableNodes = getFocusableNodes(cell, true);\n focusableNodes.forEach((node) => {\n node.removeEventListener('focus', handleFocusableNodeFocus);\n });\n };\n }, [handleFocusableNodeFocus]);\n\n return <Box role=\"gridcell\" tag={tag} ref={composedRef} onKeyDown={handleKeyDown} {...props} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * RawTh\n * -----------------------------------------------------------------------------------------------*/\n\ntype RawThProps = Omit<RawTdProps, 'as'>;\n\nconst RawTh = (props: RawThProps) => <RawTd {...props} tag=\"th\" />;\n\nexport { RawTd, RawTh };\nexport type { RawTdProps, RawThProps };\n","import * as React from 'react';\n\nexport interface RawTheadProps extends React.TableHTMLAttributes<HTMLTableSectionElement> {\n children: React.ReactNode;\n}\n\nexport const RawThead = ({ children, ...props }: RawTheadProps) => {\n /**\n * aria-rowindex is 1-based: we have to start from 1\n */\n const childrenClone = React.Children.toArray(children).map((child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child as React.ReactElement, { 'aria-rowindex': 1 });\n }\n\n return child;\n });\n\n return <thead {...props}>{childrenClone}</thead>;\n};\n","import * as React from 'react';\n\nexport interface RawTbodyProps extends React.TableHTMLAttributes<HTMLTableSectionElement> {\n children: React.ReactNode;\n}\n\nexport const RawTbody = ({ children, ...props }: RawTbodyProps) => {\n /**\n * aria-rowindex is 1-based: we have to start from 1\n * since the <tr><th></th></tr> elements count as 1 row, we have to increment the index by 2 (because of the base 1 AND the th)\n */\n const childrenClone = React.Children.toArray(children).map((child, index) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child as React.ReactElement, { 'aria-rowindex': index + 2 });\n }\n\n return child;\n });\n\n return <tbody {...props}>{childrenClone}</tbody>;\n};\n","import * as React from 'react';\n\nimport { Box, BoxProps } from '../../primitives/Box';\n\nexport interface RawTrProps extends BoxProps<'tr'> {\n 'aria-rowindex'?: number;\n}\n\nexport const RawTr = ({ children, ...props }: RawTrProps) => {\n const childrenClone = React.Children.toArray(children).map((child, index) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child as React.ReactElement, {\n 'aria-colindex': index + 1,\n coords: { col: index + 1, row: props['aria-rowindex'] },\n });\n }\n\n return child;\n });\n\n return (\n <Box tag=\"tr\" {...props}>\n {childrenClone}\n </Box>\n );\n};\n","import * as React from 'react';\n\nimport { Search, Cross } from '@strapi/icons';\nimport { styled } from 'styled-components';\n\nimport { composeRefs } from '../../hooks/useComposeRefs';\nimport { inputFocusStyle } from '../../themes/utils';\nimport { VisuallyHidden } from '../../utilities/VisuallyHidden';\nimport { Field } from '../Field';\nimport { IconButton } from '../IconButton';\n\nconst CloseIcon = styled(Cross)`\n font-size: 0.5rem;\n path {\n fill: ${({ theme }) => theme.colors.neutral500};\n }\n`;\n\nconst SearchIcon = styled(Search)`\n font-size: 1rem;\n path {\n fill: ${({ theme }) => theme.colors.neutral500};\n }\n`;\n\nconst SearchbarWrapper = styled.div`\n border-radius: ${({ theme }) => theme.borderRadius};\n border: 1px solid ${({ theme }) => theme.colors.neutral150}\n\n &:focus-within {\n ${SearchIcon} {\n fill: ${({ theme }) => theme.colors.primary600};\n }\n }\n`;\n\nconst SearchbarInput = styled(Field.Input)`\n border: 1px solid ${({ theme }) => theme.colors.neutral150}\n height: 16px;\n padding: 0 0 0 8px;\n color: ${({ theme }) => theme.colors.neutral800};\n\n &::placeholder {\n color: ${({ theme }) => theme.colors.neutral500};\n }\n\n &:hover {\n button {\n cursor: pointer;\n }\n }\n\n ${inputFocusStyle()}\n`;\n\nexport interface SearchbarProps extends Field.InputProps {\n children: React.ReactNode;\n name: string;\n value?: string;\n onClear: React.MouseEventHandler<any>;\n clearLabel: string;\n}\n\nexport const Searchbar = React.forwardRef<HTMLInputElement, SearchbarProps>(\n ({ name, children, value = '', onClear, clearLabel = 'Clear', ...props }, ref) => {\n const inputRef = React.useRef<HTMLInputElement>(null!);\n const isCompleting = value.length > 0;\n\n const handleClear = (e) => {\n onClear(e);\n inputRef.current.focus();\n };\n\n const actualRef = composeRefs(ref, inputRef);\n\n return (\n <SearchbarWrapper>\n <Field.Root name={name}>\n <VisuallyHidden>\n <Field.Label>{children}</Field.Label>\n </VisuallyHidden>\n\n <SearchbarInput\n size=\"S\"\n ref={actualRef}\n value={value}\n startAction={<SearchIcon aria-hidden />}\n endAction={\n isCompleting ? (\n <IconButton\n onClick={handleClear}\n onMouseDown={(e) => {\n e.preventDefault();\n }}\n label={clearLabel}\n size=\"XS\"\n variant=\"ghost\"\n type=\"button\"\n >\n <CloseIcon />\n </IconButton>\n ) : undefined\n }\n {...props}\n />\n </Field.Root>\n </SearchbarWrapper>\n );\n },\n);\n","import * as React from 'react';\n\nexport type SearchFormProps = Omit<React.FormHTMLAttributes<HTMLFormElement>, 'role'>;\n\nexport const SearchForm = (props: SearchFormProps): JSX.Element => <form {...props} role=\"search\" />;\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Box, type BoxComponent } from '../../primitives/Box';\nimport { Flex, FlexProps } from '../../primitives/Flex';\nimport { Typography, TypographyComponent } from '../../primitives/Typography';\n\nconst ButtonBox = styled<BoxComponent<'button'>>(Box)<{ $iconAction: boolean }>`\n display: inline-flex;\n border: none;\n\n & > svg {\n height: 1.2rem;\n width: 1.2rem;\n }\n\n & > svg path {\n fill: ${({ theme, ...p }) => (p['aria-disabled'] ? theme.colors.neutral600 : theme.colors.primary600)};\n }\n\n &:hover {\n cursor: ${({ $iconAction }) => ($iconAction ? 'pointer' : 'initial')};\n }\n`;\n\nexport interface TagProps extends Omit<FlexProps, 'onClick'> {\n icon: React.ReactNode;\n label?: string;\n disabled?: boolean;\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\n}\n\nexport const Tag = ({ children, icon, label, disabled = false, onClick, ...props }: TagProps) => {\n const handleClick: React.MouseEventHandler<HTMLButtonElement> = (e) => {\n if (disabled || !onClick) return;\n onClick(e);\n };\n\n return (\n <Flex\n inline\n background={disabled ? 'neutral200' : 'primary100'}\n color={disabled ? 'neutral700' : 'primary600'}\n paddingLeft={3}\n paddingRight={1}\n borderColor={disabled ? 'neutral300' : 'primary200'}\n hasRadius\n height=\"3.2rem\"\n {...props}\n >\n <TagText $disabled={disabled} variant=\"pi\" fontWeight=\"bold\">\n {children}\n </TagText>\n <ButtonBox\n tag=\"button\"\n disabled={disabled}\n aria-disabled={disabled}\n aria-label={label}\n padding={2}\n onClick={handleClick}\n $iconAction={!!onClick}\n >\n {icon}\n </ButtonBox>\n </Flex>\n );\n};\n\nconst TagText = styled<TypographyComponent>(Typography)<{ $disabled: boolean }>`\n color: inherit;\n border-right: 1px solid ${({ theme, $disabled }) => ($disabled ? theme.colors.neutral300 : theme.colors.primary200)};\n padding-right: ${({ theme }) => theme.spaces[2]};\n`;\n","/* eslint-disable no-nested-ternary */\nimport * as React from 'react';\n\nimport { Cross } from '@strapi/icons';\n\nimport { stripReactIdOfColon } from '../../helpers/strings';\nimport { useId } from '../../hooks/useId';\nimport { useIntersection } from '../../hooks/useIntersection';\nimport { Box } from '../../primitives/Box';\nimport { Typography } from '../../primitives/Typography';\nimport { Checkbox } from '../Checkbox';\nimport { useField } from '../Field';\nimport { Tag } from '../Tag';\n\nimport * as SelectParts from './SelectParts';\n\ntype MultiSelectPropsWithoutLabel = Omit<SelectParts.MultiSelectProps, 'value' | 'multi'> &\n Pick<SelectParts.ContentProps, 'onCloseAutoFocus'> &\n Pick<SelectParts.TriggerProps, 'clearLabel' | 'onClear' | 'startIcon' | 'hasError' | 'id' | 'name' | 'size'> &\n Pick<SelectParts.ValueProps, 'placeholder'> & {\n /**\n * @default (value) => value.join(',')\n */\n customizeContent?(value?: string[]): string;\n onChange?: (value: string[]) => void;\n onReachEnd?: (entry: IntersectionObserverEntry) => void;\n value?: string[] | null;\n withTags?: boolean;\n };\n\nexport type MultiSelectProps = MultiSelectPropsWithoutLabel & { 'aria-label'?: string; 'aria-describedby'?: string };\n\nexport const MultiSelect = React.forwardRef<HTMLDivElement, MultiSelectProps>(\n (\n {\n children,\n clearLabel = 'Clear',\n customizeContent,\n disabled,\n hasError: hasErrorProp,\n id: idProp,\n name: nameProp,\n onChange,\n onClear,\n onCloseAutoFocus,\n onReachEnd,\n placeholder,\n required: requiredProp,\n size,\n startIcon,\n value: passedValue,\n withTags,\n ...restProps\n },\n forwardedRef,\n ) => {\n /**\n * Used for the intersection observer\n */\n const viewportRef = React.useRef<HTMLDivElement>(null);\n\n /**\n * These values are drawn out from the internals of the Radix component\n * We can then use them to react to visual changes for the component\n */\n const [internalValue, setInternalValue] = React.useState<string[]>();\n const [internalIsOpen, setInternalIsOpen] = React.useState(false);\n\n const handleValueChange = (value: string[]) => {\n /**\n * If it's being externally managed then we shouldn't\n * both setting our copy of the internal value.\n */\n if (onChange) {\n onChange(value);\n } else {\n setInternalValue(value);\n }\n };\n\n const handleTagClick = (value: string) => () => {\n const newValue = Array.isArray(passedValue)\n ? passedValue.filter((val) => val !== value)\n : (internalValue ?? []).filter((val) => val !== value);\n\n if (onChange) {\n onChange(newValue);\n } else {\n setInternalValue(newValue);\n }\n };\n\n const handleOpenChange: SelectParts.SelectProps['onOpenChange'] = (open) => {\n setInternalIsOpen(open);\n };\n\n const generatedIntersectionId = useId();\n const intersectionId = `intersection-${stripReactIdOfColon(generatedIntersectionId)}`;\n\n const handleReachEnd = (entry: IntersectionObserverEntry) => {\n if (onReachEnd) {\n onReachEnd(entry);\n }\n };\n\n useIntersection(viewportRef, handleReachEnd, {\n selectorToWatch: `#${intersectionId}`,\n /**\n * We need to know when the select is open because only then will viewportRef\n * not be null. Because it uses a portal that (sensibly) is not mounted 24/7.\n */\n skipWhen: !internalIsOpen,\n });\n\n const value = typeof passedValue !== 'undefined' && passedValue !== null ? passedValue : internalValue;\n\n const renderTags: SelectParts.ValueRenderFn = (arg?: { value?: string; textValue?: string } | string) => {\n if (arg && typeof arg === 'object' && arg.value) {\n return (\n <Tag\n tabIndex={-1}\n key={arg.value}\n disabled={disabled}\n icon={<Cross width={`${14 / 16}rem`} height={`${14 / 16}rem`} />}\n onClick={handleTagClick(arg.value)}\n >\n {arg.textValue}\n </Tag>\n );\n }\n\n return null;\n };\n\n const { error, ...field } = useField('MultiSelect');\n const hasError = Boolean(error) || hasErrorProp;\n const id = field.id ?? idProp;\n const name = field.name ?? nameProp;\n const required = field.required ?? requiredProp;\n let ariaDescription: string | undefined;\n if (error) {\n ariaDescription = `${id}-error`;\n } else if (field.hint) {\n ariaDescription = `${id}-hint`;\n }\n\n return (\n <SelectParts.Root\n onOpenChange={handleOpenChange}\n disabled={disabled}\n required={required}\n onValueChange={handleValueChange}\n value={value}\n {...restProps}\n multi\n >\n <SelectParts.Trigger\n ref={forwardedRef}\n id={id}\n name={name}\n aria-label={restProps['aria-label']}\n aria-describedby={ariaDescription ?? restProps['aria-describedby']}\n startIcon={startIcon}\n hasError={hasError}\n disabled={disabled}\n clearLabel={clearLabel}\n onClear={value?.length ? onClear : undefined}\n withTags={Boolean(withTags && (value?.length ?? 0 > 0))}\n size={size}\n >\n <SelectParts.Value placeholder={placeholder} textColor={value?.length ? 'neutral800' : 'neutral600'}>\n {value?.length\n ? withTags\n ? renderTags\n : customizeContent\n ? customizeContent(value)\n : undefined\n : undefined}\n </SelectParts.Value>\n </SelectParts.Trigger>\n <SelectParts.Portal>\n <SelectParts.Content position=\"popper\" sideOffset={4} onCloseAutoFocus={onCloseAutoFocus}>\n <SelectParts.Viewport ref={viewportRef}>\n {children}\n <Box id={intersectionId} width=\"100%\" height=\"1px\" />\n </SelectParts.Viewport>\n </SelectParts.Content>\n </SelectParts.Portal>\n </SelectParts.Root>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MultiSelectOption\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface MultiSelectOptionProps extends Omit<SelectParts.ItemProps, 'value'> {\n startIcon?: React.ReactNode;\n value: string | number;\n}\n\nexport const MultiSelectOption = React.forwardRef<HTMLDivElement, MultiSelectOptionProps>(\n ({ value, children, startIcon, ...restProps }, ref) => {\n return (\n <SelectParts.Item ref={ref} value={value.toString()} {...restProps}>\n {startIcon && (\n <Box tag=\"span\" aria-hidden>\n {startIcon}\n </Box>\n )}\n <SelectParts.ItemIndicator>\n {({ isSelected, isIntermediate }) => <Checkbox checked={isIntermediate ? 'indeterminate' : isSelected} />}\n </SelectParts.ItemIndicator>\n <Typography>\n <SelectParts.ItemText>{children}</SelectParts.ItemText>\n </Typography>\n </SelectParts.Item>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MultiSelectGroup\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface MultiSelectGroupProps extends Pick<MultiSelectOptionProps, 'startIcon'> {\n children: React.ReactNode;\n label: string;\n values?: string[];\n}\n\nexport const MultiSelectGroup = React.forwardRef<HTMLDivElement, MultiSelectGroupProps>(\n ({ children, label, startIcon, values = [], ...restProps }, ref) => {\n return (\n <SelectParts.Group ref={ref}>\n <SelectParts.Item value={values} {...restProps}>\n {startIcon && (\n <Box tag=\"span\" aria-hidden>\n {startIcon}\n </Box>\n )}\n <SelectParts.ItemIndicator>\n {({ isSelected, isIntermediate }) => <Checkbox checked={isIntermediate ? 'indeterminate' : isSelected} />}\n </SelectParts.ItemIndicator>\n <Typography>{label}</Typography>\n </SelectParts.Item>\n {children}\n </SelectParts.Group>\n );\n },\n);\n","import { styled } from 'styled-components';\n\nimport {\n MultiSelect,\n MultiSelectGroup,\n MultiSelectGroupProps,\n MultiSelectOption,\n MultiSelectOptionProps,\n MultiSelectProps,\n} from './MultiSelect';\n\ninterface MulitSelectNestedOption extends Omit<MultiSelectOptionProps, 'children' | 'value'> {\n value: string | number;\n label: string;\n}\n\ninterface MulitSelectNestedGroup extends Omit<MultiSelectGroupProps, 'children'> {\n children: Array<MulitSelectNestedOption>;\n}\n\ntype MultiSelectNestedProps = MultiSelectProps & {\n options: Array<MulitSelectNestedOption | MulitSelectNestedGroup>;\n};\n\nconst MultiSelectNested = ({ options, ...props }: MultiSelectNestedProps) => {\n return (\n <MultiSelect {...props}>\n {options.map((opt) => {\n if ('children' in opt) {\n return (\n <MultiSelectGroup\n key={opt.label}\n label={opt.label}\n values={opt.children.map((child) => child.value.toString())}\n >\n {opt.children.map((child) => (\n <NestedOption key={child.value} value={child.value}>\n {child.label}\n </NestedOption>\n ))}\n </MultiSelectGroup>\n );\n }\n\n return (\n <MultiSelectOption key={opt.value} value={opt.value}>\n {opt.label}\n </MultiSelectOption>\n );\n })}\n </MultiSelect>\n );\n};\n\nconst NestedOption = styled(MultiSelectOption)`\n padding-left: ${({ theme }) => theme.spaces[7]};\n`;\n\nexport { MultiSelectNested };\nexport type { MultiSelectNestedProps, MulitSelectNestedOption, MulitSelectNestedGroup };\n","import * as React from 'react';\n\nimport { DefaultTheme } from 'styled-components';\n\nimport { Box, BoxProps } from '../../primitives/Box';\n\ntype StatusVariant = 'alternative' | 'danger' | 'neutral' | 'primary' | 'secondary' | 'success' | 'warning';\ntype StatusSize = 'XS' | 'S' | 'M';\n\ninterface StatusProps extends BoxProps {\n variant?: StatusVariant;\n size?: StatusSize;\n children: React.ReactNode;\n}\n\nconst getPadding = (size: StatusSize): { paddingX: BoxProps['paddingTop']; paddingY: BoxProps['paddingLeft'] } => {\n if (size === 'XS') {\n return { paddingX: '0.6rem', paddingY: '0.2rem' };\n }\n\n if (size === 'S') {\n return { paddingX: 2, paddingY: 1 };\n }\n\n // Size M\n return { paddingX: 5, paddingY: 4 };\n};\n\nconst Status = ({ variant = 'primary', size = 'M', children, ...props }: StatusProps) => {\n const backgroundColor = `${variant}100` satisfies keyof DefaultTheme['colors'];\n const borderColor = `${variant}200` satisfies keyof DefaultTheme['colors'];\n const textColor = `${variant}600` satisfies keyof DefaultTheme['colors'];\n\n const { paddingX, paddingY } = getPadding(size);\n\n return (\n <Box\n borderColor={borderColor}\n color={textColor}\n background={backgroundColor}\n hasRadius\n paddingTop={paddingY}\n paddingBottom={paddingY}\n paddingLeft={paddingX}\n paddingRight={paddingX}\n {...props}\n >\n {children}\n </Box>\n );\n};\n\nexport { Status };\nexport type { StatusProps, StatusSize, StatusVariant };\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\n\nconst SUBNAV_WIDTH = `23.2rem`;\n\ninterface SubNavProps extends Omit<BoxProps<'nav'>, 'tag'> {}\n\nconst SubNav = React.forwardRef<HTMLDivElement, SubNavProps>(({ ...props }, ref) => {\n return <SubNavWrapper ref={ref} {...props} tag=\"nav\" />;\n});\n\nconst SubNavWrapper = styled<BoxComponent<'nav'>>(Box)`\n width: ${SUBNAV_WIDTH};\n background: ${({ theme }) => theme.colors.neutral100};\n position: sticky;\n top: 0;\n height: 100vh;\n overflow-y: auto;\n border-right: 1px solid ${({ theme }) => theme.colors.neutral200};\n z-index: 1;\n`;\n\nexport { SubNav };\nexport type { SubNavProps };\n","import * as React from 'react';\n\nimport { Search } from '@strapi/icons';\nimport { usePrev } from '@strapi/ui-primitives';\nimport { styled } from 'styled-components';\n\nimport { KeyboardKeys } from '../../helpers/keyboardKeys';\nimport { useId } from '../../hooks/useId';\nimport { Box } from '../../primitives/Box';\nimport { Flex } from '../../primitives/Flex';\nimport { Typography, TypographyProps } from '../../primitives/Typography';\nimport { Divider } from '../Divider';\nimport { IconButton } from '../IconButton';\nimport { Searchbar, SearchbarProps, SearchForm } from '../Searchbar';\n\nconst CustomDivider = styled(Divider)`\n width: 2.4rem;\n background-color: ${({ theme }) => theme.colors.neutral200};\n`;\n\nexport interface SubNavHeaderProps\n extends Pick<TypographyProps<'h2'>, 'tag'>,\n Partial<Pick<SearchbarProps, 'onClear' | 'onChange' | 'onSubmit' | 'placeholder'>> {\n id?: string;\n label: string;\n searchLabel?: string;\n searchable?: boolean;\n value?: string;\n}\n\nexport const SubNavHeader = ({\n tag = 'h2',\n label,\n searchLabel = '',\n searchable = false,\n onChange = () => {},\n value = '',\n onClear = () => {},\n onSubmit = () => {},\n id,\n placeholder,\n}: SubNavHeaderProps) => {\n const [isSearchOpen, setSearchOpen] = React.useState(false);\n const previousSearchOpenValue = usePrev(isSearchOpen);\n const clearButtonId = useId(id);\n const searchRef = React.useRef<HTMLInputElement>(undefined!);\n const searchButtonRef = React.useRef<HTMLButtonElement>(undefined!);\n\n React.useEffect(() => {\n if (isSearchOpen && searchRef.current) {\n searchRef.current.focus();\n }\n if (previousSearchOpenValue && !isSearchOpen && searchButtonRef.current) {\n searchButtonRef.current.focus();\n }\n }, [isSearchOpen, previousSearchOpenValue]);\n\n const toggleSearch = () => {\n setSearchOpen((isOpen) => !isOpen);\n };\n\n const handleClear: SearchbarProps['onClear'] = (e) => {\n onClear(e);\n searchRef.current.focus();\n };\n\n const handleBlur: SearchbarProps['onBlur'] = (e) => {\n if (e.relatedTarget?.id !== clearButtonId) {\n setSearchOpen(false);\n }\n };\n\n const handleKeyDown: SearchbarProps['onKeyDown'] = (e) => {\n if (e.key === KeyboardKeys.ESCAPE) {\n setSearchOpen(false);\n }\n };\n\n if (isSearchOpen) {\n return (\n <Box paddingLeft={4} paddingTop={5} paddingBottom={2} paddingRight={4}>\n <SearchForm>\n <Searchbar\n name=\"searchbar\"\n value={value}\n onChange={onChange}\n placeholder={placeholder}\n onKeyDown={handleKeyDown}\n ref={searchRef}\n onBlur={handleBlur}\n onClear={handleClear}\n onSubmit={onSubmit}\n clearLabel=\"Clear\"\n >\n {searchLabel}\n </Searchbar>\n </SearchForm>\n <Box paddingLeft={2} paddingTop={4}>\n <CustomDivider />\n </Box>\n </Box>\n );\n }\n\n return (\n <Flex direction=\"column\" alignItems=\"flex-start\" paddingLeft={6} paddingTop={6} paddingBottom={2} paddingRight={4}>\n <Flex justifyContent=\"space-between\" alignItems=\"flex-start\" width=\"100%\" gap={2}>\n <Typography variant=\"beta\" tag={tag}>\n {label}\n </Typography>\n {searchable && (\n <IconButton ref={searchButtonRef} onClick={toggleSearch} label={searchLabel}>\n <Search />\n </IconButton>\n )}\n </Flex>\n <Box paddingTop={4}>\n <CustomDivider />\n </Box>\n </Flex>\n );\n};\n","import * as React from 'react';\n\nimport { styled, css } from 'styled-components';\n\nimport { Flex } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { PolymorphicRef } from '../../types';\nimport { forwardRef } from '../../utilities/forwardRef';\nimport { BaseLink, BaseLinkProps, BaseLinkComponent } from '../BaseLink';\n\ntype SubNavLinkProps<C extends React.ElementType> = BaseLinkProps<C> & {\n active?: boolean;\n children: React.ReactNode;\n icon?: React.ReactNode;\n isSubSectionChild?: boolean;\n withBullet?: boolean;\n};\n\nconst SubNavLink = forwardRef(\n <C extends React.ElementType = 'a'>(\n { active, children, icon = null, withBullet = false, isSubSectionChild = false, ...props }: SubNavLinkProps<C>,\n ref: PolymorphicRef<C>,\n ) => {\n return (\n <SubNavLinkWrapper\n background=\"neutral100\"\n paddingLeft={isSubSectionChild ? 9 : 7}\n paddingBottom={2}\n paddingTop={2}\n ref={ref}\n {...props}\n >\n <Flex>\n {icon ? <IconWrapper>{icon}</IconWrapper> : <CustomBullet $active={active} />}\n <Typography paddingLeft={2}>{children}</Typography>\n </Flex>\n {withBullet && (\n <Flex paddingRight={4}>\n <CustomBullet $active />\n </Flex>\n )}\n </SubNavLinkWrapper>\n );\n },\n);\n\ntype SubNavLinkComponent<C extends React.ElementType> = (props: SubNavLinkProps<C>) => React.ReactNode;\n\nconst CustomBullet = styled.span<{ $active?: boolean }>`\n width: 0.4rem;\n height: 0.4rem;\n background-color: ${({ theme, $active }) => ($active ? theme.colors.primary600 : theme.colors.neutral600)};\n border-radius: 50%;\n`;\n\nconst SubNavLinkWrapper = styled<BaseLinkComponent>(BaseLink)`\n display: flex;\n align-items: center;\n justify-content: space-between;\n text-decoration: none;\n color: ${({ theme }) => theme.colors.neutral800};\n svg > * {\n fill: ${({ theme }) => theme.colors.neutral600};\n }\n\n &.active {\n ${({ theme }) => {\n return css`\n background-color: ${theme.colors.primary100};\n border-right: 2px solid ${theme.colors.primary600};\n color: ${theme.colors.primary700};\n font-weight: 500;\n `;\n }}\n\n ${CustomBullet} {\n background-color: ${({ theme }) => theme.colors.primary600};\n }\n }\n\n &:focus-visible {\n outline-offset: -2px;\n }\n`;\n\nconst IconWrapper = styled.div`\n svg {\n height: 1.6rem;\n width: 1.6rem;\n }\n`;\n\nexport { SubNavLink };\nexport type { SubNavLinkProps, SubNavLinkComponent };\n","import * as React from 'react';\n\nimport { CaretDown } from '@strapi/icons';\nimport { styled } from 'styled-components';\n\nimport { useId } from '../../hooks/useId';\nimport { Box } from '../../primitives/Box';\nimport { Flex } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\n\nconst SubNavLinkSectionButton = styled.button`\n border: none;\n padding: 0;\n background: transparent;\n display: flex;\n align-items: center;\n`;\nexport interface SubNavLinkSectionProps {\n children: React.ReactNode;\n id?: string;\n label: string;\n}\n\nexport const SubNavLinkSection = ({ label, children, id }: SubNavLinkSectionProps) => {\n const [isOpen, setOpenLinks] = React.useState(true);\n const listId = useId(id);\n\n const handleClick = () => {\n setOpenLinks((prev) => !prev);\n };\n\n return (\n <Box>\n <Box paddingLeft={7} paddingTop={2} paddingBottom={2} paddingRight={4}>\n <Flex justifyContent=\"space-between\">\n <SubNavLinkSectionButton onClick={handleClick} aria-expanded={isOpen} aria-controls={listId}>\n <CaretDown\n width=\"1.2rem\"\n height=\"1.2rem\"\n aria-hidden\n fill=\"neutral700\"\n style={{ transform: `rotateX(${isOpen ? '0deg' : '180deg'})` }}\n />\n <Box paddingLeft={2}>\n <Typography tag=\"span\" fontWeight=\"semiBold\" textColor=\"neutral800\">\n {label}\n </Typography>\n </Box>\n </SubNavLinkSectionButton>\n </Flex>\n </Box>\n {isOpen && (\n <ul id={listId}>\n {React.Children.map(children, (child, index) => {\n // eslint-disable-next-line react/no-array-index-key\n return <li key={index}>{child}</li>;\n })}\n </ul>\n )}\n </Box>\n );\n};\n","import * as React from 'react';\n\nimport { CaretDown } from '@strapi/icons';\n\nimport { Box } from '../../primitives/Box';\nimport { Flex } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\n\ninterface SubNavSectionLabelProps {\n ariaControls?: string;\n ariaExpanded?: boolean;\n collapsable?: boolean;\n label: string;\n onClick: React.MouseEventHandler<HTMLButtonElement> & React.MouseEventHandler<HTMLDivElement>;\n}\n\nconst SubNavSectionLabel = ({\n collapsable = false,\n label,\n onClick = () => {},\n ariaExpanded,\n ariaControls,\n}: SubNavSectionLabelProps) => {\n if (collapsable) {\n return (\n <Flex\n tag=\"button\"\n onClick={onClick}\n aria-expanded={ariaExpanded}\n aria-controls={ariaControls}\n textAlign=\"left\"\n alignItems=\"center\"\n >\n <Box paddingRight={1}>\n <Typography variant=\"sigma\" textColor=\"neutral600\">\n {label}\n </Typography>\n </Box>\n {collapsable && (\n <CaretDown\n width=\"1.2rem\"\n aria-hidden\n fill=\"neutral500\"\n style={{ transform: ariaExpanded ? 'rotateX(0deg)' : 'rotateX(180deg)' }}\n />\n )}\n </Flex>\n );\n }\n\n return (\n <Flex>\n <Box paddingRight={1}>\n <Typography variant=\"sigma\" textColor=\"neutral600\">\n {label}\n </Typography>\n </Box>\n </Flex>\n );\n};\n\nexport { SubNavSectionLabel };\nexport type { SubNavSectionLabelProps };\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { useId } from '../../hooks/useId';\nimport { Box, BoxComponent } from '../../primitives/Box';\nimport { Flex } from '../../primitives/Flex';\nimport { Badge } from '../Badge';\n\nimport { SubNavSectionLabel } from './SubNavSectionLabel';\n\nconst SubNavSectionWrapper = styled<BoxComponent>(Box)`\n & > svg {\n height: 0.4rem;\n fill: ${({ theme }) => theme.colors.neutral500};\n }\n`;\n\nexport interface SubNavSectionProps {\n badgeLabel?: string;\n children: React.ReactNode;\n collapsable?: boolean;\n id?: string;\n label: string;\n}\n\nexport const SubNavSection = ({ collapsable = false, label, badgeLabel, children, id }: SubNavSectionProps) => {\n const [isOpen, setOpenLinks] = React.useState(true);\n const listId = useId(id);\n\n const handleClick = () => {\n setOpenLinks((prev) => !prev);\n };\n\n return (\n <Flex direction=\"column\" alignItems=\"stretch\" gap={1}>\n <SubNavSectionWrapper paddingLeft={6} paddingTop={2} paddingBottom={2} paddingRight={4}>\n <Box position=\"relative\" paddingRight={badgeLabel ? 6 : 0}>\n <SubNavSectionLabel\n onClick={handleClick}\n ariaExpanded={isOpen}\n ariaControls={listId}\n collapsable={collapsable}\n label={label}\n />\n {badgeLabel && (\n <Badge\n backgroundColor=\"neutral150\"\n textColor=\"neutral600\"\n position=\"absolute\"\n right={0}\n top=\"50%\"\n transform=\"translateY(-50%)\"\n >\n {badgeLabel}\n </Badge>\n )}\n </Box>\n </SubNavSectionWrapper>\n {(!collapsable || isOpen) && (\n <ol id={listId}>\n {React.Children.map(children, (child, index) => {\n // eslint-disable-next-line react/no-array-index-key\n return <li key={index}>{child}</li>;\n })}\n </ol>\n )}\n </Flex>\n );\n};\n","import * as React from 'react';\n\nimport { Box } from '../../primitives/Box';\nimport { Flex, FlexProps } from '../../primitives/Flex';\n\nexport interface SubNavSectionsProps extends FlexProps<'ol'> {\n children: React.ReactNode;\n spacing?: number;\n horizontal?: boolean;\n}\n\nexport const SubNavSections = ({ children, spacing = 2, horizontal = false, ...props }: SubNavSectionsProps) => {\n return (\n <Box paddingTop={2} paddingBottom={4}>\n <Flex\n tag=\"ol\"\n gap={spacing}\n direction={horizontal ? 'row' : 'column'}\n alignItems={horizontal ? 'center' : 'stretch'}\n {...props}\n >\n {React.Children.map(children, (child, index) => {\n /* eslint-disable react/no-array-index-key */\n return <li key={index}>{child}</li>;\n })}\n </Flex>\n </Box>\n );\n};\n","import * as React from 'react';\n\nimport * as Switch from '@radix-ui/react-switch';\nimport { composeEventHandlers } from '@strapi/ui-primitives';\nimport { styled } from 'styled-components';\n\nimport { useControllableState } from '../../hooks/useControllableState';\nimport { Flex } from '../../primitives/Flex';\nimport { Typography, TypographyComponent } from '../../primitives/Typography';\n\ninterface SwitchProps extends Omit<Switch.SwitchProps, 'children'> {\n onLabel?: string;\n offLabel?: string;\n visibleLabels?: boolean;\n}\n\nconst SwitchImpl = React.forwardRef<HTMLButtonElement, SwitchProps>(\n (\n {\n visibleLabels,\n onLabel = 'On',\n offLabel = 'Off',\n onCheckedChange: onCheckedChangeProp,\n checked: checkedProp,\n defaultChecked,\n disabled,\n ...restProps\n },\n forwardedRef,\n ) => {\n const [internalChecked, setInternalChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked,\n });\n\n const handleCheckChange: SwitchProps['onCheckedChange'] = (checked) => {\n setInternalChecked(checked);\n };\n\n return (\n <Flex gap={3}>\n <SwitchRoot\n ref={forwardedRef}\n onCheckedChange={composeEventHandlers(onCheckedChangeProp, handleCheckChange)}\n checked={internalChecked}\n disabled={disabled}\n {...restProps}\n >\n <SwitchThumb />\n </SwitchRoot>\n {visibleLabels ? (\n <LabelTypography aria-hidden data-disabled={disabled} data-state={internalChecked ? 'checked' : 'unchecked'}>\n {internalChecked ? onLabel : offLabel}\n </LabelTypography>\n ) : null}\n </Flex>\n );\n },\n);\n\nconst SwitchRoot = styled(Switch.Root)`\n width: 4rem;\n height: 2.4rem;\n border-radius: 1.2rem;\n background-color: ${({ theme }) => theme.colors.danger500};\n\n &[data-state='checked'] {\n background-color: ${({ theme }) => theme.colors.success500};\n }\n\n &[data-disabled] {\n background-color: ${({ theme }) => theme.colors.neutral300};\n }\n\n @media (prefers-reduced-motion: no-preference) {\n transition: ${(props) => props.theme.transitions.backgroundColor};\n }\n`;\n\nconst SwitchThumb = styled(Switch.Thumb)`\n display: block;\n height: 1.6rem;\n width: 1.6rem;\n border-radius: 50%;\n background-color: ${({ theme }) => theme.colors.neutral0};\n transform: translateX(4px);\n\n &[data-state='checked'] {\n transform: translateX(20px);\n }\n\n @media (prefers-reduced-motion: no-preference) {\n transition: transform ${(props) => props.theme.motion.timings['120']}\n ${(props) => props.theme.motion.easings.authenticMotion};\n }\n`;\n\nconst LabelTypography = styled<TypographyComponent>(Typography)`\n color: ${(props) => props.theme.colors.danger600};\n\n &[data-state='checked'] {\n color: ${(props) => props.theme.colors.success600};\n }\n\n &[data-disabled='true'] {\n color: ${({ theme }) => theme.colors.neutral500};\n }\n`;\n\nexport { SwitchImpl as Switch };\nexport type { SwitchProps };\n","import * as React from 'react';\n\nimport * as Tabs from '@radix-ui/react-tabs';\nimport { css, styled } from 'styled-components';\n\nimport { createContext } from '../../helpers/context';\nimport { Typography, TypographyComponent } from '../../primitives/Typography';\n\n/* -------------------------------------------------------------------------------------------------\n * Root\n * -----------------------------------------------------------------------------------------------*/\n\ntype Variant = 'regular' | 'simple';\n\ninterface ContextValue {\n /**\n * @default false\n * @description This will disable all tabs, you can pass\n * this attribute to individual triggers to disable them.\n * If you provide a string, it should be the value of a trigger.\n */\n disabled: boolean | string;\n /**\n * @description This will show an error state on the tab\n * that matches the value provided.\n */\n hasError?: string;\n /**\n * @default 'regular'\n */\n variant: Variant;\n}\n\nconst [TabsProvider, useTabs] = createContext<ContextValue>('Tabs');\n\ntype Element = HTMLDivElement;\n\ninterface Props extends Tabs.TabsProps, Partial<ContextValue> {}\n\nconst Root = React.forwardRef<Element, Props>(\n ({ disabled = false, variant = 'regular', hasError, ...props }, forwardedRef) => {\n return (\n <TabsProvider disabled={disabled} hasError={hasError} variant={variant}>\n <TabsRoot ref={forwardedRef} {...props} />\n </TabsProvider>\n );\n },\n);\n\nconst TabsRoot = styled(Tabs.Root)`\n width: 100%;\n position: relative;\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * List\n * -----------------------------------------------------------------------------------------------*/\n\ntype ListElement = HTMLDivElement;\n\ninterface ListProps extends Tabs.TabsListProps {}\n\nconst List = React.forwardRef<ListElement, ListProps>((props, forwardedRef) => {\n const { variant } = useTabs('List');\n return <TabsList ref={forwardedRef} {...props} $variant={variant} />;\n});\n\nconst TabsList = styled(Tabs.List)<{ $variant: Variant }>`\n display: flex;\n align-items: ${(props) => (props.$variant === 'regular' ? 'flex-end' : 'unset')};\n position: relative;\n z-index: 0;\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Trigger\n * -----------------------------------------------------------------------------------------------*/\n\ntype TriggerElement = HTMLButtonElement;\n\ninterface TriggerProps extends Tabs.TabsTriggerProps {}\n\nconst Trigger = React.forwardRef<TriggerElement, TriggerProps>(\n ({ children, disabled: disabledProp, ...props }, forwardedRef) => {\n const { disabled: disabledContext, variant, hasError } = useTabs('Trigger');\n\n const isDisabled = disabledContext === true || disabledContext === props.value || disabledProp;\n const isErrored = hasError === props.value;\n\n return (\n <TabsTrigger ref={forwardedRef} {...props} $hasError={isErrored} $variant={variant} disabled={isDisabled}>\n <TriggerTypography fontWeight=\"bold\" variant={variant === 'simple' ? 'sigma' : undefined}>\n {children}\n </TriggerTypography>\n {variant === 'simple' ? <TabBar /> : null}\n </TabsTrigger>\n );\n },\n);\n\n/**\n * TODO: do we want to implement a moving tab indicator?\n * This can be done by keeping hold of the active tab's position & dimensions\n * setting that as the default state of the indicator, and then updating it with\n * the new active tab. Probably need to internally control the state.\n */\nconst TabBar = styled.span`\n display: block;\n width: 100%;\n background-color: currentColor;\n position: absolute;\n bottom: 0;\n left: 0;\n opacity: 0;\n height: 0.2rem;\n`;\n\nconst TriggerTypography = styled<TypographyComponent>(Typography)``;\n\nconst TabsTrigger = styled(Tabs.Trigger)<{ $hasError?: boolean; $variant: Variant }>`\n position: relative;\n color: ${(props) => (props.$hasError ? props.theme.colors.danger600 : props.theme.colors.neutral600)};\n cursor: pointer;\n z-index: 0;\n\n ${(props) => {\n if (props.$variant === 'simple') {\n return css`\n padding-block: ${(props) => props.theme.spaces[4]};\n padding-inline: ${(props) => props.theme.spaces[4]};\n\n & > ${TriggerTypography} {\n line-height: 1.2rem;\n }\n\n &[data-state='active'] {\n color: ${props.$hasError ? props.theme.colors.danger600 : props.theme.colors.primary700};\n\n & > ${TabBar} {\n opacity: 1;\n }\n }\n `;\n } else {\n return css`\n padding-block: ${(props) => props.theme.spaces[3]};\n padding-inline: ${(props) => props.theme.spaces[3]};\n flex: 1;\n background-color: ${(props) => props.theme.colors.neutral100};\n border-bottom: solid 1px ${(props) => props.theme.colors.neutral150};\n\n &:not([data-state='active']) + &:not([data-state='active']) {\n border-left: solid 1px ${(props) => props.theme.colors.neutral150};\n }\n\n &[data-state='active'] {\n padding-block: ${(props) => props.theme.spaces[4]};\n padding-inline: ${(props) => props.theme.spaces[4]};\n color: ${props.$hasError ? props.theme.colors.danger600 : props.theme.colors.primary700};\n border-top-right-radius: ${(props) => props.theme.borderRadius};\n border-top-left-radius: ${(props) => props.theme.borderRadius};\n background-color: ${(props) => props.theme.colors.neutral0};\n border-bottom: solid 1px ${(props) => props.theme.colors.neutral0};\n box-shadow: ${props.theme.shadows.tableShadow};\n z-index: 1;\n }\n `;\n }\n }}\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${(props) => props.theme.colors.neutral400};\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Content\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContentElement = HTMLDivElement;\n\ninterface ContentProps extends Tabs.TabsContentProps {}\n\nconst Content = React.forwardRef<ContentElement, ContentProps>((props, forwardedRef) => {\n const { variant } = useTabs('Content');\n\n return <TabsContent $variant={variant} ref={forwardedRef} {...props} />;\n});\n\nconst TabsContent = styled(Tabs.Content)<{ $variant: Props['variant'] }>`\n ${(props) => {\n if (props.$variant === 'simple') {\n return css``;\n } else {\n return css`\n position: relative;\n z-index: 1;\n background-color: ${(props) => props.theme.colors.neutral0};\n `;\n }\n }}\n`;\n\nexport { Root, List, Trigger, Content };\nexport type { Props, Element, ListProps, ListElement, TriggerProps, TriggerElement, ContentProps, ContentElement };\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Box, BoxComponent } from '../../primitives/Box';\nimport { RawTable, RawTableProps } from '../RawTable/RawTable';\n\nconst TableContainer = styled<BoxComponent>(Box)`\n overflow: hidden;\n border: 1px solid ${({ theme }) => theme.colors.neutral150};\n`;\n\nconst TableWrapper = styled(RawTable)`\n width: 100%;\n white-space: nowrap;\n`;\n\nexport type Overflowing = 'both' | 'left' | 'right';\n\nconst TableBox = styled<BoxComponent>(Box)<{ $overflowing?: Overflowing }>`\n &:before {\n // TODO: make sure to add a token for this weird stuff\n background: linear-gradient(90deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);\n opacity: 0.2;\n position: absolute;\n height: 100%;\n content: ${({ $overflowing }) => ($overflowing === 'both' || $overflowing === 'left' ? \"''\" : undefined)};\n box-shadow: ${({ theme }) => theme.shadows.tableShadow};\n width: ${({ theme }) => theme.spaces[2]};\n left: 0;\n }\n\n &:after {\n // TODO: make sure to add a token for this weird stuff\n background: linear-gradient(270deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);\n opacity: 0.2;\n position: absolute;\n height: 100%;\n content: ${({ $overflowing }) => ($overflowing === 'both' || $overflowing === 'right' ? \"''\" : undefined)};\n box-shadow: ${({ theme }) => theme.shadows.tableShadow};\n width: ${({ theme }) => theme.spaces[2]};\n right: 0;\n top: 0;\n }\n`;\n\nconst ScrollContainer = styled<BoxComponent>(Box)`\n overflow-x: auto;\n`;\n\nexport interface TableProps extends RawTableProps {\n footer?: React.ReactNode;\n}\n\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(({ footer, ...props }, forwardedRef) => {\n const tableRef = React.useRef<HTMLDivElement>(null!);\n const [overflowing, setOverflowing] = React.useState<Overflowing>();\n\n const handleScroll = (e) => {\n const maxScrollLeft = e.target.scrollWidth - e.target.clientWidth;\n\n if (e.target.scrollLeft === 0) {\n setOverflowing('right');\n\n return;\n }\n\n if (e.target.scrollLeft === maxScrollLeft) {\n setOverflowing('left');\n\n return;\n }\n\n if (e.target.scrollLeft > 0) {\n setOverflowing('both');\n }\n };\n\n React.useEffect(() => {\n if (tableRef.current.scrollWidth > tableRef.current.clientWidth) {\n setOverflowing('right');\n }\n }, []);\n\n return (\n <TableContainer shadow=\"tableShadow\" hasRadius background=\"neutral0\">\n <TableBox $overflowing={overflowing} position=\"relative\">\n <ScrollContainer ref={tableRef} onScroll={handleScroll} paddingLeft={6} paddingRight={6}>\n <TableWrapper ref={forwardedRef} {...props} />\n </ScrollContainer>\n </TableBox>\n {footer}\n </TableContainer>\n );\n});\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { RawTbody, RawTbodyProps } from '../RawTable/RawTbody';\n\nconst TbodyWrapper = styled(RawTbody)`\n & tr:last-of-type {\n border-bottom: none;\n }\n`;\n\nexport const Tbody = ({ children, ...props }: RawTbodyProps) => {\n return <TbodyWrapper {...props}>{children}</TbodyWrapper>;\n};\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { RawThead, RawTheadProps } from '../RawTable/RawThead';\n\nconst TheadWrapper = styled(RawThead)`\n border-bottom: 1px solid ${({ theme }) => theme.colors.neutral150};\n`;\n\nexport const Thead = ({ children, ...props }: RawTheadProps) => {\n return <TheadWrapper {...props}>{children}</TheadWrapper>;\n};\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { RawTr, RawTrProps } from '../RawTable/RawTr';\n\nconst TrWrapper = styled(RawTr)`\n border-bottom: 1px solid ${({ theme }) => theme.colors.neutral150};\n\n & td,\n & th {\n padding: ${({ theme }) => theme.spaces[4]};\n }\n\n & td:first-of-type,\n & th:first-of-type {\n padding: 0 ${({ theme }) => theme.spaces[1]};\n }\n\n // Resetting padding values and fixing a height\n th {\n padding-top: 0;\n padding-bottom: 0;\n height: 5.6rem;\n }\n`;\n\nexport const Tr = (props: RawTrProps) => {\n return <TrWrapper {...props} />;\n};\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Flex } from '../../primitives/Flex';\nimport { RawTh, RawTd, RawTdProps } from '../RawTable/RawCell';\n\nconst CellWrapper = styled(RawTd)`\n vertical-align: middle;\n text-align: left;\n outline-offset: -4px;\n\n /**\n * Hack to make sure the checkbox looks aligned\n */\n input {\n vertical-align: sub;\n }\n`;\n\nexport interface ThProps extends RawTdProps {\n children: React.ReactNode;\n /**\n * @deprecated just pass everything as children.\n */\n action?: React.ReactNode;\n}\n\nexport const Th = React.forwardRef<HTMLTableCellElement, ThProps>(({ children, action, ...props }, forwardedRef) => {\n return (\n <CellWrapper color=\"neutral600\" as={RawTh} ref={forwardedRef} {...props}>\n <Flex>\n {children}\n {action}\n </Flex>\n </CellWrapper>\n );\n});\n\nexport const Td = React.forwardRef<HTMLTableCellElement, RawTdProps>(({ children, ...props }, forwardedRef) => {\n return (\n <CellWrapper color=\"neutral800\" ref={forwardedRef} {...props}>\n {children}\n </CellWrapper>\n );\n});\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\nimport { Flex } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { Divider } from '../Divider';\n\nconst IconBox = styled<BoxComponent>(Box)`\n height: 2.4rem;\n width: 2.4rem;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n\n svg {\n height: 1rem;\n width: 1rem;\n }\n\n svg path {\n fill: ${({ theme }) => theme.colors.primary600};\n }\n`;\n\n// TODO: remove when the reset css button is merged\nconst ButtonBox = styled<BoxComponent<'button'>>(Box)`\n border-radius: 0 0 ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius};\n display: block;\n width: 100%;\n border: none;\n`;\n\nexport interface TFooterProps extends BoxProps<'button'> {\n children: React.ReactNode;\n icon: React.ReactNode;\n}\n\nexport const TFooter = ({ children, icon, ...props }: TFooterProps) => {\n return (\n <div>\n <Divider />\n <ButtonBox tag=\"button\" background=\"primary100\" padding={5} {...props}>\n <Flex>\n <IconBox aria-hidden background=\"primary200\">\n {icon}\n </IconBox>\n <Box paddingLeft={3}>\n <Typography variant=\"pi\" fontWeight=\"bold\" textColor=\"primary600\">\n {children}\n </Typography>\n </Box>\n </Flex>\n </ButtonBox>\n </div>\n );\n};\n","import * as React from 'react';\n\nimport { Loader } from '@strapi/icons';\nimport { styled, keyframes } from 'styled-components';\n\nimport { Flex, FlexComponent, FlexProps } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { focus } from '../../styles/buttons';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '../../types';\nimport { forwardRef } from '../../utilities/forwardRef';\n\ntype TextButtonProps<C extends React.ElementType = 'button'> = FlexProps<C> & {\n disabled?: boolean;\n endIcon?: React.ReactNode;\n loading?: boolean;\n startIcon?: React.ReactNode;\n};\n\nconst TextButton = forwardRef(\n <C extends React.ElementType = 'button'>(\n { children, startIcon, endIcon, disabled = false, loading = false, ...props }: TextButtonProps<C>,\n ref: PolymorphicRef<C>,\n ) => {\n const isDisabled = disabled || loading;\n\n return (\n <TextButtonWrapper\n ref={ref}\n disabled={isDisabled}\n aria-disabled={isDisabled}\n tag=\"button\"\n type=\"button\"\n gap={2}\n {...props}\n >\n {loading ? (\n <LoadingWrapper aria-hidden>\n <Loader />\n </LoadingWrapper>\n ) : (\n startIcon\n )}\n\n <Typography variant=\"pi\">{children}</Typography>\n\n {endIcon}\n </TextButtonWrapper>\n );\n },\n) as TextButtonComponent;\n\ntype TextButtonComponent<C extends React.ElementType = 'button'> = <T extends React.ElementType = C>(\n props: PolymorphicComponentPropsWithRef<T, TextButtonProps<T>>,\n) => JSX.Element;\nconst rotation = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n`;\n\nconst LoadingWrapper = styled.span`\n display: flex;\n animation: ${rotation} 2s infinite linear;\n will-change: transform;\n`;\n\nconst TextButtonWrapper = styled<FlexComponent<'button'>>(Flex)`\n border: none;\n background-color: transparent;\n color: ${(props) => props.theme.colors.primary600};\n cursor: pointer;\n\n &[aria-disabled='true'] {\n pointer-events: none;\n color: ${(props) => props.theme.colors.neutral600};\n }\n\n ${focus}\n`;\n\nexport { TextButton };\nexport type { TextButtonProps };\n","import * as React from 'react';\n\nimport { Field } from '../Field';\n\ninterface TextInputProps extends Field.InputProps {}\n\nconst TextInput = React.forwardRef<HTMLInputElement, TextInputProps>((props, ref) => {\n return <Field.Input ref={ref} {...props} />;\n});\n\nTextInput.displayName = 'TextInput';\n\nexport { TextInput };\nexport type { TextInputProps };\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { Box, BoxComponent, BoxProps } from '../../primitives/Box';\nimport { inputFocusStyle } from '../../themes/utils';\nimport { Field, useField } from '../Field';\n\ninterface TextareaProps\n extends Omit<BoxProps<'textarea'>, 'children'>,\n Pick<Field.InputProps, 'hasError' | 'id' | 'name' | 'required'> {\n value?: string;\n 'aria-describedby'?: string;\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ disabled, hasError: hasErrorProp, id: idProp, name: nameProp, required: requiredProp, ...props }, ref) => {\n const { error, ...field } = useField('Textarea');\n const hasError = Boolean(error) || hasErrorProp;\n const id = field.id ?? idProp;\n const name = field.name ?? nameProp;\n const required = field.required || requiredProp;\n let ariaDescription: string | undefined;\n if (error) {\n ariaDescription = `${id}-error`;\n } else if (field.hint) {\n ariaDescription = `${id}-hint`;\n }\n\n return (\n <Wrapper borderColor={hasError ? 'danger600' : 'neutral200'} $hasError={hasError} hasRadius>\n <TextareaElement\n aria-invalid={hasError}\n aria-required={required}\n tag=\"textarea\"\n background={disabled ? 'neutral150' : 'neutral0'}\n color={disabled ? 'neutral600' : 'neutral800'}\n disabled={disabled}\n fontSize={2}\n hasRadius\n ref={ref}\n lineHeight={4}\n padding={4}\n width=\"100%\"\n height=\"100%\"\n id={id}\n name={name}\n aria-describedby={ariaDescription}\n {...props}\n />\n </Wrapper>\n );\n },\n);\n\nconst Wrapper = styled<BoxComponent>(Box)<{ $hasError?: boolean }>`\n height: 10.5rem;\n ${inputFocusStyle()}\n`;\n\nconst TextareaElement = styled<BoxComponent<'textarea'>>(Box)`\n border: none;\n resize: none;\n\n ::placeholder {\n color: ${({ theme }) => theme.colors.neutral500};\n font-size: ${({ theme }) => theme.fontSizes[2]};\n color: ${({ theme }) => theme.colors.neutral500};\n opacity: 1;\n }\n\n &:focus-within {\n outline: none;\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n`;\n\nexport { Textarea };\nexport type { TextareaProps };\n","/* eslint-disable no-nested-ternary */\nimport * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { useControllableState } from '../../hooks/useControllableState';\nimport { Flex, FlexComponent } from '../../primitives/Flex';\nimport { Typography } from '../../primitives/Typography';\nimport { inputFocusStyle } from '../../themes';\nimport { Field, useField } from '../Field';\n\ninterface ToggleProps\n extends Omit<React.ComponentPropsWithoutRef<'input'>, 'name' | 'children' | 'required' | 'id' | 'size' | 'checked'>,\n Pick<Field.InputProps, 'required' | 'name' | 'id' | 'hasError'> {\n onLabel: string;\n offLabel: string;\n checked?: boolean | null;\n}\n\ntype ToggleInputElement = HTMLInputElement;\n\n/**\n * TODO: This should probably follow the switch button pattern\n * as seen https://www.w3.org/WAI/ARIA/apg/patterns/switch/examples/switch-button/\n */\nconst Toggle = React.forwardRef<ToggleInputElement, ToggleProps>(\n (\n {\n offLabel,\n onLabel,\n disabled,\n hasError: hasErrorProp,\n required: requiredProp,\n id: idProp,\n name: nameProp,\n checked: checkedProp,\n onChange,\n ...props\n },\n forwardedRef,\n ) => {\n const [checked = false, setChecked] = useControllableState<boolean | null>({\n prop: checkedProp,\n });\n\n const isFalseyChecked = checked !== null && !checked;\n\n const { error, ...field } = useField('Toggle');\n const hasError = Boolean(error) || hasErrorProp;\n const id = field.id ?? idProp;\n const name = field.name ?? nameProp;\n const required = field.required || requiredProp;\n\n let ariaDescription: string | undefined;\n if (error) {\n ariaDescription = `${id}-error`;\n } else if (field.hint) {\n ariaDescription = `${id}-hint`;\n }\n\n return (\n <ToggleWrapper\n position=\"relative\"\n hasRadius\n padding={1}\n background={disabled ? 'neutral150' : 'neutral100'}\n borderStyle=\"solid\"\n borderWidth=\"1px\"\n borderColor=\"neutral200\"\n wrap=\"wrap\"\n cursor={disabled ? 'not-allowed' : 'pointer'}\n $hasError={hasError}\n >\n <ToggleOption\n hasRadius\n flex=\"1 1 50%\"\n paddingTop={2}\n paddingBottom={2}\n paddingLeft={3}\n paddingRight={3}\n justifyContent=\"center\"\n background={disabled && isFalseyChecked ? 'neutral200' : isFalseyChecked ? 'neutral0' : 'transparent'}\n borderColor={\n disabled && isFalseyChecked\n ? 'neutral300'\n : isFalseyChecked\n ? 'neutral200'\n : disabled\n ? 'neutral150'\n : 'neutral100'\n }\n >\n <Typography\n variant=\"pi\"\n fontWeight=\"bold\"\n textTransform=\"uppercase\"\n textColor={disabled ? 'neutral700' : isFalseyChecked ? 'danger700' : 'neutral600'}\n >\n {offLabel}\n </Typography>\n </ToggleOption>\n <ToggleOption\n hasRadius\n flex=\"1 1 50%\"\n paddingLeft={3}\n paddingRight={3}\n justifyContent=\"center\"\n background={disabled && checked ? 'neutral200' : checked ? 'neutral0' : 'transparent'}\n borderColor={\n disabled && checked ? 'neutral300' : checked ? 'neutral200' : disabled ? 'neutral150' : 'neutral100'\n }\n >\n <Typography\n variant=\"pi\"\n fontWeight=\"bold\"\n textTransform=\"uppercase\"\n textColor={disabled ? 'neutral700' : checked ? 'primary600' : 'neutral600'}\n >\n {onLabel}\n </Typography>\n </ToggleOption>\n <Input\n {...props}\n id={id}\n name={name}\n ref={forwardedRef}\n onChange={(e) => {\n setChecked(e.currentTarget.checked);\n onChange?.(e);\n }}\n type=\"checkbox\"\n aria-required={required}\n disabled={disabled}\n aria-disabled={disabled}\n checked={Boolean(checked)}\n aria-describedby={ariaDescription}\n />\n </ToggleWrapper>\n );\n },\n);\n\nconst ToggleWrapper = styled<FlexComponent>(Flex)<{ $hasError?: boolean }>`\n ${inputFocusStyle()}\n`;\n\nconst ToggleOption = styled<FlexComponent>(Flex)`\n padding-block: 0.6rem;\n`;\n\nconst Input = styled.input`\n height: 100%;\n left: 0;\n opacity: 0;\n position: absolute;\n top: 0;\n z-index: 0;\n width: 100%;\n`;\n\nexport { Toggle };\nexport type { ToggleProps };\n","import * as React from 'react';\n\nimport { styled } from 'styled-components';\n\nimport { handleResponsiveValues, type ResponsiveThemeProperty } from '../../helpers/handleResponsiveValues';\nimport { PolymorphicRef, PropsToTransientProps } from '../../types';\nimport { forwardRef } from '../../utilities/forwardRef';\nimport { Box, BoxComponent, BoxProps } from '../Box';\nimport { Flex, FlexProps } from '../Flex';\n\n/* -------------------------------------------------------------------------------------------------\n * Root\n * -----------------------------------------------------------------------------------------------*/\n\ntype Element = HTMLDivElement;\n\ntype Props<C extends React.ElementType = 'div'> = BoxProps<C> & {\n gridCols?: number;\n gap?: ResponsiveThemeProperty<'spaces', 'gap'>;\n};\n\nconst Root = forwardRef(<C extends React.ElementType = 'div'>(props: Props<C>, forwardedRef: PolymorphicRef<C>) => {\n const { gap = 0, gridCols = 12, ...rest } = props;\n\n return <Wrapper ref={forwardedRef} $gap={gap} $gridCols={gridCols} {...rest} />;\n}) as Component;\n\ntype Component<C extends React.ElementType = 'div'> = <T extends React.ElementType = C>(props: Props<T>) => JSX.Element;\n\nconst Wrapper = styled<BoxComponent>(Box)<PropsToTransientProps<Required<Pick<Props, 'gridCols' | 'gap'>>>>`\n display: grid;\n grid-template-columns: repeat(${({ $gridCols }) => $gridCols}, 1fr);\n ${({ theme, $gap }) => handleResponsiveValues({ gap: $gap }, theme)}\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Item\n * -----------------------------------------------------------------------------------------------*/\n\ntype ItemElement = HTMLDivElement;\n\ntype ItemProps<C extends React.ElementType = 'div'> = FlexProps<C> & {\n col?: number;\n s?: number;\n xs?: number;\n m?: number;\n};\n\nconst ItemImpl = forwardRef(\n <C extends React.ElementType = 'div'>({ col, s, xs, m, ...props }: ItemProps<C>, forwardedRef: PolymorphicRef<C>) => (\n <Item ref={forwardedRef} $col={col} $s={s} $xs={xs} $m={m} {...props} />\n ),\n) as ItemComponent;\n\ntype ItemComponent<C extends React.ElementType = 'div'> = <T extends React.ElementType = C>(\n props: ItemProps<T>,\n) => JSX.Element;\n\nconst Item = styled(Flex)`\n grid-column: span ${({ $xs }) => $xs ?? 12};\n max-width: 100%;\n\n ${({ theme }) => theme.breakpoints.small} {\n grid-column: span ${({ $s, $xs }) => $s ?? $xs ?? 12};\n }\n\n ${({ theme }) => theme.breakpoints.medium} {\n grid-column: span ${({ $m, $s, $xs }) => $m ?? $s ?? $xs ?? 12};\n }\n\n ${({ theme }) => theme.breakpoints.large} {\n grid-column: span ${({ $col, $m, $s, $xs }) => $col ?? $m ?? $s ?? $xs ?? 12};\n }\n`;\n\nexport { Root, ItemImpl as Item };\nexport type { Props, Component, Element, ItemProps, ItemElement, ItemComponent };\n","import { useMemo, useState } from 'react';\n\nimport { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect';\n\ntype UseMeasureRect = Pick<DOMRectReadOnly, 'x' | 'y' | 'top' | 'left' | 'right' | 'bottom' | 'height' | 'width'>;\ntype UseMeasureRef<E extends Element = Element> = (element: E) => void;\ntype UseMeasureResult<E extends Element = Element> = [UseMeasureRef<E>, UseMeasureRect];\n\nconst defaultState: UseMeasureRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n};\n\nfunction useMeasure<E extends Element = Element>(): UseMeasureResult<E> {\n const [element, ref] = useState<E | null>(null);\n const [rect, setRect] = useState<UseMeasureRect>(defaultState);\n\n const observer = useMemo(\n () =>\n new ResizeObserver((entries) => {\n if (entries[0]) {\n const { x, y, width, height, top, left, bottom, right } = entries[0].contentRect;\n setRect({ x, y, width, height, top, left, bottom, right });\n }\n }),\n [],\n );\n\n useIsomorphicLayoutEffect(() => {\n if (!element) return;\n observer.observe(element);\n return () => {\n observer.disconnect();\n };\n }, [element, observer]);\n\n return [ref, rect];\n}\n\nexport { useMeasure };\nexport type { UseMeasureRect, UseMeasureRef, UseMeasureResult };\n","import * as React from 'react';\n\nimport { getFocusableNodes } from '../../helpers/getFocusableNodes';\nimport { KeyboardKeys } from '../../helpers/keyboardKeys';\n\nexport interface FocusTrapProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * A callback called on escape key. Useful to deactivate the focus trap.\n */\n onEscape?: () => void;\n /**\n * A boolean value to define whether the focus should be restored or not.\n */\n restoreFocus?: boolean;\n // Skip focusing default first element if user needs to set it manually\n skipAutoFocus?: boolean;\n}\n\nexport const FocusTrap = ({ onEscape, restoreFocus = true, skipAutoFocus = false, ...props }: FocusTrapProps) => {\n const trappedRef = React.useRef<HTMLDivElement>(null!);\n\n /**\n * Restore the focus to the previously focused element (often, it's the CTA that opened the trap)\n */\n React.useEffect(() => {\n let currentFocus: HTMLElement | null = null;\n\n if (restoreFocus) {\n currentFocus = document.activeElement as HTMLElement;\n }\n\n return () => {\n if (currentFocus) {\n currentFocus.focus();\n }\n };\n }, [restoreFocus]);\n\n /**\n * Sends the focus to the first element of the focus trap tree\n */\n React.useEffect(() => {\n if (!trappedRef.current || skipAutoFocus) return;\n\n const focusableChildren = getFocusableNodes(trappedRef.current);\n\n if (focusableChildren.length > 0) {\n const firstElement = focusableChildren[0];\n\n firstElement.focus();\n } else {\n console.warn(\n '[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one.',\n );\n }\n }, [skipAutoFocus]);\n\n const handleKeyDown: React.KeyboardEventHandler<HTMLDivElement> = (e) => {\n if (e.key === KeyboardKeys.ESCAPE && onEscape) {\n onEscape();\n\n return;\n }\n\n if (e.key !== KeyboardKeys.TAB) return;\n\n const focusableChildren = getFocusableNodes(trappedRef.current);\n\n if (focusableChildren.length > 0) {\n const firstElement = focusableChildren[0];\n const lastElement = focusableChildren[focusableChildren.length - 1];\n\n // e.shiftKey allows to verify reverse tab\n if (e.shiftKey) {\n if (firstElement === document.activeElement) {\n e.preventDefault();\n lastElement.focus();\n }\n } else if (lastElement === document.activeElement) {\n e.preventDefault();\n firstElement.focus();\n }\n }\n };\n\n return <div ref={trappedRef} onKeyDown={handleKeyDown} {...props} />;\n};\n","import * as React from 'react';\n\nimport { KeyboardKeys } from '../../helpers/keyboardKeys';\nimport { Box, BoxProps } from '../../primitives/Box';\n\nexport interface KeyboardNavigableProps extends BoxProps {\n tagName?: string;\n attributeName?: string;\n}\n\nexport const KeyboardNavigable = ({ tagName, attributeName = '', ...props }: KeyboardNavigableProps) => {\n const isValidFocusedElement = () => {\n const focused = document.activeElement;\n\n if (!focused) {\n return false;\n }\n\n if (tagName) {\n return focused.tagName.toLowerCase() === tagName;\n }\n\n return focused.hasAttribute(attributeName);\n };\n\n const queryElement = (parentEl: HTMLElement) => {\n if (tagName) {\n return parentEl.querySelectorAll(tagName);\n }\n\n return parentEl.querySelectorAll(`[${attributeName}]`);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n switch (e.key) {\n case KeyboardKeys.RIGHT:\n case KeyboardKeys.DOWN: {\n if (isValidFocusedElement()) {\n e.preventDefault();\n\n const focused = document.activeElement;\n\n const allElements = [...queryElement(e.currentTarget)] as HTMLElement[];\n const focusedIndex = allElements.findIndex((node) => node === focused);\n\n const nextIndex = focusedIndex + 1 < allElements.length ? focusedIndex + 1 : 0;\n allElements[nextIndex].focus();\n }\n break;\n }\n\n case KeyboardKeys.LEFT:\n case KeyboardKeys.UP: {\n if (isValidFocusedElement()) {\n e.preventDefault();\n\n const focused = document.activeElement;\n const allElements = [...queryElement(e.currentTarget)] as HTMLElement[];\n const focusedIndex = allElements.findIndex((node) => node === focused);\n\n const nextIndex = focusedIndex - 1 > -1 ? focusedIndex - 1 : allElements.length - 1;\n allElements[nextIndex].focus();\n }\n break;\n }\n\n case KeyboardKeys.HOME: {\n if (isValidFocusedElement()) {\n e.preventDefault();\n\n const allElements = queryElement(e.currentTarget);\n const focusElement = allElements.item(0) as HTMLElement;\n\n focusElement.focus();\n }\n\n break;\n }\n\n case KeyboardKeys.END: {\n if (isValidFocusedElement()) {\n e.preventDefault();\n\n const allElements = queryElement(e.currentTarget);\n const focusElement = allElements.item(allElements.length - 1) as HTMLElement;\n\n focusElement.focus();\n }\n\n break;\n }\n\n default:\n break;\n }\n };\n\n return <Box onKeyDown={handleKeyDown} {...props} />;\n};\n"],"names":["Provider","value","ellipsis","variant","Root","props","Item","Trigger","IconBox","Header","Content","useControllableState","Avatar","Group","Divider","BaseLink","useCallbackRef","rotation","Loader","Tooltip","LinkWrapper","Viewport","MenuItem","Label","Menu.Root","Menu.Trigger","Menu.Content","Menu.Item","CardAction","Checkbox","Input","Error","Action","Field.Root","Field.Label","Field.Hint","Field.Error","ScrollAreaImpl","isPrintableCharacter","open","textValue","filterValue","ComboboxPrimitive","TextInput","DownIcon","ScrollArea","Overlay","ContentImpl","Title","Body","Footer","Foot","css","TooltipProvider","Portal","SelectParts.Root","SelectParts.Trigger","SelectParts.Value","SelectParts.Portal","SelectParts.Content","SelectParts.Viewport","SelectParts.Item","SelectParts.ItemText","DatePicker","maxDate","minDate","actualMinDate","actualMaxDate","minDateFn","maxDateFn","dateStructure","placeholder","separator","Th","TimePicker","ComboboxOption","DatePickerInput","BaseTimePicker","DatePickerElement","view","Dialog","step","Field.Input","_internaluseUncontrolledState","Popover","colIndex","rowIndex","node","focusableNodes","ButtonBox","SelectParts.ItemIndicator","SelectParts.Group","Tabs","Wrapper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEa,MAAA,gBAAgB,CAC3B,mBACA,mBACG;AACG,QAAA,UAAU,MAAM,cAA4C,cAAc;AAE1E,QAAAA,YAAW,CAAC,UAA4D;AAC5E,UAAM,EAAE,UAAU,GAAG,QAAA,IAAY;AAG3B,UAAA,QAAQ,MAAM,QAAQ,MAAM,SAAS,OAAO,OAAO,OAAO,CAAC;AAEjE,WAAQ,oBAAA,QAAQ,UAAR,EAAiB,OAAe,SAAS,CAAA;AAAA,EAAA;AAGnD,WAAS,WAAW,cAAsB;AAClC,UAAA,UAAU,MAAM,WAAW,OAAO;AAEpC,QAAA;AAAgB,aAAA;AAEpB,QAAI,mBAAmB;AAAkB,aAAA;AAEzC,UAAM,IAAI,MAAM,KAAK,YAAY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