@atom-learning/components 10.2.0-beta.0 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","names":[],"sources":["../src/styled.tsx","../src/utilities/css-wrapper/CSSWrapper.tsx","../src/components/accordion/AccordionContent.tsx","../src/components/accordion/AccordionItem.tsx","../src/experiments/color-scheme/ColorScheme.config.ts","../src/experiments/color-scheme/ColorScheme.tsx","../src/components/icon/Icon.tsx","../src/components/accordion/AccordionTrigger.tsx","../src/components/accordion/Accordion.tsx","../src/components/tooltip/TooltipContent.tsx","../src/components/tooltip/Tooltip.tsx","../src/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.tsx","../src/utilities/uri/index.ts","../src/components/router-provider/RouterProvider.tsx","../src/components/action-icon/ActionIcon.constants.ts","../src/components/action-icon/ActionIcon.tsx","../src/components/alert-dialog/AlertDialogContent.tsx","../src/components/alert-dialog/AlertDialog.tsx","../src/utilities/hooks/useIsMountedRef.ts","../src/components/loader/Loader.tsx","../src/components/button/Button.tsx","../src/components/heading/Heading.tsx","../src/components/text/Text.tsx","../src/components/alert-dialog/alert-context/AlertDialogIcon.tsx","../src/components/alert-dialog/alert-context/AlertDialog.tsx","../src/components/alert-dialog/alert-context/reducer.ts","../src/components/alert-dialog/AlertDialog.context.tsx","../src/components/alert-dialog/Alert.ts","../src/components/avatar/Avatar.context.tsx","../src/utilities/override-styled-variant-value/overrideStyledVariantValue.ts","../src/components/avatar/AvatarIcon.tsx","../src/components/link/Link.tsx","../src/components/image/ImageCredit.tsx","../src/components/image/Image.tsx","../src/components/avatar/AvatarPlaceholder.tsx","../src/components/avatar/AvatarInitial.tsx","../src/components/avatar/AvatarImage.tsx","../src/components/avatar/Avatar.tsx","../src/utilities/hooks/useCallbackRef.ts","../src/components/badge/Badge.colorscheme.config.ts","../src/components/badge/Badge.context.tsx","../src/components/badge/BadgeIcon.tsx","../src/utilities/hooks/useResizeObserver.ts","../src/components/badge/BadgeText.tsx","../src/components/badge/Badge.tsx","../src/components/dismissible/DismissibleRoot.tsx","../src/components/dismissible/DismissibleTrigger.tsx","../src/components/dismissible/index.ts","../src/components/banner/Banner.context.tsx","../src/components/banner/Banner.tsx","../src/components/banner/banner-regular/BannerRegularButton.tsx","../src/components/banner/banner-regular/BannerRegularActions.tsx","../src/components/banner/BannerContainer.tsx","../src/components/banner/banner-regular/BannerRegularContainer.tsx","../src/components/banner/banner-regular/BannerRegularContent.tsx","../src/components/banner/banner-regular/BannerRegularDismiss.tsx","../src/components/banner/banner-regular/BannerRegularHeading.tsx","../src/components/banner/banner-regular/BannerRegularImage.tsx","../src/components/banner/banner-regular/BannerRegularText.tsx","../src/components/banner/banner-regular/BannerRegular.tsx","../src/components/banner/banner-slim/BannerSlimActions.tsx","../src/components/banner/banner-slim/BannerSlimButton.tsx","../src/components/banner/banner-slim/BannerSlimContainer.tsx","../src/components/banner/banner-slim/BannerSlimContent.tsx","../src/components/banner/banner-slim/BannerSlimDismiss.tsx","../src/components/banner/banner-slim/BannerSlimImage.tsx","../src/components/banner/banner-slim/BannerSlimText.tsx","../src/components/banner/banner-slim/BannerSlim.tsx","../src/components/carousel/CarouselArrows.tsx","../src/components/carousel/CarouselPagination.tsx","../src/components/carousel/CarouselSlider.tsx","../src/components/carousel/CarouselSlide.tsx","../src/components/carousel/Carousel.tsx","../src/components/checkbox/Checkbox.tsx","../src/components/checkbox-group/CheckboxGroupChecked.context.tsx","../src/components/checkbox-group/CheckboxGroupMounted.context.tsx","../src/components/checkbox-group/CheckboxGroupAllItem.tsx","../src/components/checkbox-group/CheckboxGroupItem.tsx","../src/components/checkbox-group/CheckboxGroupSub.tsx","../src/components/checkbox-group/CheckboxGroup.tsx","../src/components/tree/TreeListItem.tsx","../src/components/tree/TreeCollapsible.tsx","../src/components/tree/TreeList.tsx","../src/components/tree/TreeCollapsibleContent.tsx","../src/components/tree/TreeIcon.tsx","../src/components/tree/TreeText.tsx","../src/components/tree/TreeItemContent.tsx","../src/components/tree/TreeCollapsibleTrigger.tsx","../src/components/tree/TreeItem.tsx","../src/components/tree/Tree.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsible.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsibleContent.tsx","../src/components/checkbox-tree/CheckboxTreeItemContent.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsibleTrigger.tsx","../src/components/checkbox-tree/CheckboxTreeItem.tsx","../src/components/checkbox-tree/CheckboxTree.tsx","../src/components/inline-message/InlineMessage.config.ts","../src/components/inline-message/InlineMessage.tsx","../src/components/label/Label.tsx","../src/components/radio-button/RadioButton.tsx","../src/components/field-wrapper/FieldDescription.tsx","../src/components/field-wrapper/InlineFieldWrapper.tsx","../src/components/form/useFieldError.ts","../src/components/checkbox-field/CheckboxField.tsx","../src/components/chip/Chip.tsx","../src/components/chip/ChipGroup.tsx","../src/components/dismissible-group/DismissibleGroupRoot.tsx","../src/components/dismissible-group/DismissibleGroupItem.tsx","../src/components/dismissible-group/index.ts","../src/components/chip-dismissible-group/ChipDismissibleGroupItem.tsx","../src/components/chip-dismissible-group/ChipDismissibleGroupRoot.tsx","../src/components/chip-dismissible-group/index.ts","../src/components/chip-toggle-group/ChipToggleGroupItem.tsx","../src/utilities/radix-overrides/toggle-group/ToggleGroupRoot.tsx","../src/utilities/radix-overrides/toggle-group/index.ts","../src/components/chip-toggle-group/ChipToggleGroupRoot.tsx","../src/components/chip-toggle-group/index.ts","../src/components/combobox/ComboboxInput.tsx","../src/components/combobox/ComboboxList.tsx","../src/components/combobox/ComboboxOption.tsx","../src/components/combobox/ComboboxPopover.tsx","../src/components/combobox/Combobox.tsx","../src/components/field-wrapper/FieldWrapper.tsx","../src/components/form/useFormCustomContext.ts","../src/utilities/style/get-icon-size.ts","../src/components/input/Input.tsx","../src/components/password-input/PasswordInput.tsx","../src/components/password-field/PasswordField.tsx","../src/components/create-password-field/CreatePasswordField.tsx","../src/components/data-table/DataTable.types.ts","../src/components/data-table/getNewAsyncData.ts","../src/components/data-table/usePagination.ts","../src/components/data-table/useSorting.ts","../src/components/data-table/DataTable.context.tsx","../src/components/table/TableBody.tsx","../src/components/table/TableCell.tsx","../src/components/table/TableFooter.tsx","../src/components/table/TableFooterCell.tsx","../src/components/table/TableHeader.tsx","../src/components/table/TableHeaderCell.tsx","../src/components/table/TableRow.tsx","../src/components/table/useStickyColumnsCss.ts","../src/components/table/TableStickyColumnsContainer.tsx","../src/components/table/Table.tsx","../src/components/data-table/DataTableDataCell.tsx","../src/components/data-table/DataTableRowSelectionCheckbox.tsx","../src/components/data-table/DataTableRow.tsx","../src/components/data-table/DataTableBody.tsx","../src/components/divider/Divider.tsx","../src/components/data-table/DataTableMetaData.tsx","../src/components/data-table/DataTableBulkActions.tsx","../src/components/data-table/DataTableBulkActionsSelectedRowActions.tsx","../src/components/data-table/DataTableBulkActionsFloating.tsx","../src/components/empty-state/EmptyState.context.tsx","../src/components/empty-state/EmptyStateBody.tsx","../src/components/empty-state/EmptyStateImage.tsx","../src/components/empty-state/EmptyStateTitle.tsx","../src/components/empty-state/EmptyState.tsx","../src/components/data-table/DataTableEmptyState.tsx","../src/components/data-table/DataTableError.tsx","../src/components/search-input/SearchInput.tsx","../src/components/data-table/DataTableGlobalFilter.tsx","../src/components/data-table/DataTableHeaderCell.tsx","../src/components/data-table/DataTableSelectAllRowsCheckbox.tsx","../src/components/data-table/DataTableHead.tsx","../src/components/data-table/DataTableLoading.tsx","../src/components/data-table/DataTableTable.tsx","../src/components/sortable/Handle.tsx","../src/components/sortable/SortableHandle.tsx","../src/components/sortable/SortableItem.tsx","../src/components/sortable/SortableRoot.tsx","../src/components/sortable/index.ts","../src/components/data-table/drag-and-drop/DragAndDropTableRow.tsx","../src/components/data-table/drag-and-drop/DragAndDropTableBody.tsx","../src/components/data-table/drag-and-drop/DragAndDropTable.tsx","../src/components/pagination/pagination.constants.ts","../src/components/pagination/pagination.helper.ts","../src/components/pagination/Pagination.context.tsx","../src/components/pagination/usePagination.tsx","../src/components/pagination/PaginationNextButton.tsx","../src/components/pagination/PaginationPage.tsx","../src/components/popover/PopoverContent.tsx","../src/components/popover/Popover.tsx","../src/components/pagination/PaginationPopover.tsx","../src/components/pagination/PaginationPreviousButton.tsx","../src/components/pagination/PaginationItems.tsx","../src/components/pagination/Pagination.tsx","../src/components/data-table/pagination/Pagination.tsx","../src/components/data-table/DataTable.tsx","../src/components/calendar/constants.ts","../src/components/calendar/Day.tsx","../src/components/calendar/Calendar.tsx","../src/components/date-input/constants.ts","../src/components/date-input/DateInput.tsx","../src/components/date-field/DateField.tsx","../src/components/dialog/DialogActionBar.tsx","../src/components/dialog/DialogBackground.tsx","../src/components/dialog/DialogClose.tsx","../src/utilities/style/backdrop-overlay.ts","../src/components/dialog/DialogContent.tsx","../src/components/dialog/DialogFooter.tsx","../src/components/dialog/DialogHeading.tsx","../src/components/dialog/DialogNavigationBar.tsx","../src/components/dialog/DialogScrollableContent.tsx","../src/components/dialog/Dialog.tsx","../src/components/drawer/DrawerOverlay.tsx","../src/components/drawer/DrawerContent.tsx","../src/components/drawer/Drawer.context.tsx","../src/components/drawer/DrawerClose.tsx","../src/components/drawer/DrawerFooter.tsx","../src/components/drawer/DrawerHeader.tsx","../src/components/drawer/DrawerMain.tsx","../src/components/drawer/DrawerTrigger.tsx","../src/components/drawer/Drawer.tsx","../src/components/dropdown-menu/DropdownMenuContent.tsx","../src/components/dropdown-menu/DropdownMenuItem.tsx","../src/components/dropdown-menu/DropdownMenuLabel.tsx","../src/components/dropdown-menu/DropdownMenuLinkItem.tsx","../src/components/dropdown-menu/DropdownMenuSeparator.tsx","../src/components/dropdown-menu/DropdownMenuTrigger.tsx","../src/components/dropdown-menu/DropdownMenu.tsx","../src/components/file-input/FileInput.tsx","../src/components/form/Form.tsx","../src/components/input-field/InputField.tsx","../src/components/list/List.tsx","../src/components/markdown-content/components/MarkdownCode.tsx","../src/components/markdown-content/components/MarkdownEmphasis.tsx","../src/components/markdown-content/components/MarkdownHeading.tsx","../src/components/markdown-content/components/MarkdownImage.tsx","../src/components/markdown-content/components/MarkdownInlineCode.tsx","../src/components/markdown-content/components/MarkdownLink.tsx","../src/components/markdown-content/components/MarkdownList.tsx","../src/components/markdown-content/components/MarkdownListItem.tsx","../src/components/markdown-content/components/MarkdownParagraph.tsx","../src/components/markdown-content/components/MarkdownStrong.tsx","../src/components/markdown-content/components/MarkdownText.tsx","../src/components/markdown-content/components/MarkdownThematicBreak.tsx","../src/components/markdown-content/MarkdownContent.tsx","../src/components/navigation/NavigationMenu.colorscheme.config.ts","../src/components/navigation/NavigationMenu.context.tsx","../src/utilities/event/preventEvent.ts","../src/components/navigation/NavigationMenuDropdownContent.tsx","../src/components/navigation/NavigationMenu.styles.ts","../src/components/navigation/NavigationMenuDropdownTrigger.tsx","../src/components/navigation/NavigationMenuDropdown.tsx","../src/components/navigation/NavigationMenuLink.tsx","../src/components/navigation/NavigationMenuDropdownItem.tsx","../src/components/navigation/NavigationMenu.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.colorscheme.config.ts","../src/components/navigation-menu-vertical/NavigationMenuVerticalItem.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordion.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalList.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordionContent.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts","../src/components/navigation-menu-vertical/NavigationMenuVerticalIcon.tsx","../src/components/side-bar/SideBar.context.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalText.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalLink.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.tsx","../src/components/notification-badge/NotificationBadge.tsx","../src/components/number-input/NumberInputStepper.tsx","../src/components/number-input/NumberInput.tsx","../src/components/number-input-field/NumberInputField.tsx","../src/components/progress-bar/ProgressBar.tsx","../src/components/radio-button/RadioButtonGroup.tsx","../src/components/radio-button-field/RadioField.tsx","../src/components/radio-button-field/RadioButtonField.tsx","../src/components/radio-card/RadioCard.tsx","../src/components/router-provider/Router.ts","../src/components/radio-card/RadioCardGroup.tsx","../src/components/search-field/SearchField.tsx","../src/components/section-message/SectionMessage.context.tsx","../src/components/section-message/SectionMessageDescription.tsx","../src/components/section-message/SectionMessageDismiss.tsx","../src/components/section-message/SectionMessageIcon.tsx","../src/components/section-message/SectionMessageLayout.tsx","../src/components/section-message/SectionMessageTitle.tsx","../src/components/section-message/SectionMessage.tsx","../src/components/select/Select.tsx","../src/components/select-field/SelectField.tsx","../src/components/select-menu/SelectMenu.context.tsx","../src/components/select-menu/SelectMenuContent.tsx","../src/components/select-menu/SelectMenuItem.tsx","../src/components/select-menu/SelectMenuLabel.tsx","../src/components/select-menu/SelectMenuSeparator.tsx","../src/components/select-menu/SelectMenuTrigger.tsx","../src/components/select-menu/SelectMenu.tsx","../src/components/select-menu-field/SelectMenuField.tsx","../src/components/side-bar/SideBarComponents.tsx","../src/components/side-bar/SideBar.tsx","../src/components/slider/SliderSteps.tsx","../src/components/slider/SliderValue.tsx","../src/components/slider/Slider.tsx","../src/components/slider-field/SliderField.tsx","../src/components/skeleton-loader/Skeleton.tsx","../src/components/skeleton-loader/SkeletonHeading.tsx","../src/components/skeleton-loader/SkeletonButton.tsx","../src/components/tile/Tile.tsx","../src/components/skeleton-loader/SkeletonTabs.tsx","../src/components/skeleton-loader/SkeletonDoughnutChart.tsx","../src/components/skeleton-loader/SkeletonTable.tsx","../src/components/skeleton-loader/SkeletonCard.tsx","../src/components/skeleton-loader/SkeletonColumnChart.tsx","../src/components/skeleton-loader/SkeletonBarChart.tsx","../src/components/skeleton-loader/SkeletonPanelList.tsx","../src/components/skeleton-loader/SkeletonSubjectList.tsx","../src/components/skeleton-loader/index.ts","../src/components/spacer/Spacer.tsx","../src/components/stepper/Stepper.context.tsx","../src/components/stepper/StepperStepBack.tsx","../src/components/stepper/StepperStepForward.tsx","../src/components/stepper/StepperStepBullet.tsx","../src/components/stepper/StepperStepContainer.tsx","../src/components/stepper/StepperStepLabel.tsx","../src/components/stepper/types.ts","../src/components/stepper/StepperSteps.tsx","../src/components/stepper/Stepper.tsx","../src/components/switch/Switch.tsx","../src/components/tabs/TabsContent.tsx","../src/components/tabs/TabsTrigger.tsx","../src/utilities/hooks/useScrollPosition.ts","../src/utilities/hooks/useSize.ts","../src/components/tabs/TabsTriggerList.tsx","../src/components/tabs/Tabs.tsx","../src/components/textarea/Textarea.tsx","../src/components/textarea-field/TextareaField.tsx","../src/components/tile-interactive/TileInteractive.tsx","../src/components/tile-toggle-group/TileToggleGroupItem.tsx","../src/components/tile-toggle-group/TileToggleGroupRoot.tsx","../src/components/tile-toggle-group/index.ts","../src/components/toast/Toast.context.tsx","../src/components/toast/ToastCloseButton.tsx","../src/components/toast/ToastIcon.tsx","../src/components/toast/Toast.tsx","../src/components/toast/ToastProvider.tsx","../src/components/toast/index.ts","../src/components/toggle-group/ToggleGroupItem.tsx","../src/components/toggle-group/ToggleGroupButton.tsx","../src/components/toggle-group/ToggleGroupRoot.tsx","../src/components/toggle-group/index.ts","../src/utilities/hooks/useWindowScrollPosition.ts","../src/components/top-bar/TopBar.colorscheme.config.ts","../src/components/top-bar/TopBarActionIcon.tsx","../src/components/top-bar/TopBarBrand.tsx","../src/components/top-bar/TopBar.tsx","../src/components/video/Video.tsx","../src/components/keyboard-shortcut/KeyboardShortcut.tsx","../src/components/keyboard-shortcut/index.ts","../src/components/segmented-control/SegmentedControl.context.tsx","../src/components/segmented-control/SegmentedControlBadge.tsx","../src/components/segmented-control/SegmentedControlContent.tsx","../src/components/segmented-control/SegmentedControlDescription.tsx","../src/components/segmented-control/SegmentedControlHeading.tsx","../src/components/segmented-control/SegmentedControlIcon.tsx","../src/components/segmented-control/SegmentedControlItem.tsx","../src/components/segmented-control/SegmentedControlItemList.tsx","../src/components/segmented-control/SegmentedControlRoot.tsx","../src/components/segmented-control/SegmentedControl.tsx","../src/components/file-drop/FileDrop.context.ts","../src/components/file-drop/FileDrop.tsx","../src/components/file-drop/useFileDrop.ts"],"sourcesContent":["// composeRefs must propagate ref-callback cleanup returns per the React 19\n// contract — the ref composition across the library (here and in the input /\n// badge / segmented-control components) relies on cleanups firing on detach.\n// @radix-ui/react-compose-refs@1.1.x is verified to do this.\nimport { composeRefs } from '@radix-ui/react-compose-refs'\nimport clsx, { type ClassValue } from 'clsx'\nimport React, { type ElementType, type ReactElement } from 'react'\nimport { extendTailwindMerge } from 'tailwind-merge'\nimport { defaultConfig, tv } from 'tailwind-variants'\n\ndefaultConfig.twMerge = false\n\nconst ARBITRARY_NUMBER_RE = /^\\[[\\d.]+\\]$/\n\nconst isArbitraryNumber = (value: string) =>\n ARBITRARY_NUMBER_RE.test(value) || !Number.isNaN(Number(value))\n\n// Matches Radix-style state variants (e.g. `data-[state=closed]:rounded-sm`),\n// used to detect an asChild className coming from a parent component.\nconst DATA_STATE_VARIANT_RE = /^data-\\[state=[^\\]]+\\]:/\n\nconst twMerge = extendTailwindMerge<\n 'capsize' | 'capsize-before' | 'capsize-after'\n>({\n extend: {\n classGroups: {\n capsize: [{ capsize: ['none', isArbitraryNumber] }],\n 'capsize-before': [{ 'capsize-before': [isArbitraryNumber] }],\n 'capsize-after': [{ 'capsize-after': [isArbitraryNumber] }]\n },\n conflictingClassGroups: {\n capsize: ['capsize-before', 'capsize-after'],\n 'capsize-before': ['capsize'],\n 'capsize-after': ['capsize']\n }\n }\n})\n\nexport const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs))\n\ntype Breakpoint = '@initial' | '@sm' | '@md' | '@lg' | '@xl'\n\nexport const Theme = ({\n children,\n theme\n}: React.PropsWithChildren<{ theme?: Record<string, string> }>) => (\n <div className=\"contents\" style={theme}>\n {children}\n </div>\n)\n\nexport const createTheme = (config: Record<string, Record<string, string>>) =>\n Object.fromEntries(\n Object.values(config).flatMap((tokens) =>\n Object.entries(tokens).map(([token, value]) => [`--${token}`, value])\n )\n )\n\n// ---------------------------------------------------------------------------\n// Local typing for styled()\n// ---------------------------------------------------------------------------\n\n// Responsive variant prop: either a single value or a per-breakpoint map\n// Each breakpoint can have a different value from the union type V\ntype ResponsiveVariant<V extends string | number | boolean> =\n | V\n | Partial<Record<Breakpoint, V>>\n\n// Helpers to derive value type from variant config keys\ntype Keys<V> = keyof V\ntype StringKeys<V> = Extract<Keys<V>, string>\ntype NumberKeys<V> = Extract<Keys<V>, number>\n// Booleans are represented as string keys \"true\"/\"false\" in our VariantConfig,\n// so we only need to detect those in StringKeys.\ntype BooleanKeys<V> = Extract<StringKeys<V>, 'true' | 'false'>\n\ntype HasBoolLikeKeys<V> =\n BooleanKeys<V> extends never\n ? Extract<StringKeys<V>, 'true' | 'false'> extends never\n ? false\n : true\n : true\n\n// If a variant's keys are boolean-like, expose the prop as boolean.\n// If it has numeric keys, allow those numbers and their string forms.\n// Otherwise use a string union of the keys.\ntype VariantValueType<V> =\n HasBoolLikeKeys<V> extends true\n ? boolean\n : [NumberKeys<V>] extends [never]\n ? StringKeys<V>\n : NumberKeys<V> | `${NumberKeys<V>}`\n\n// Shape of the `variants` section passed to styled()\ntype VariantConfig = Record<string, Record<string | number, string | string[]>>\n\n// Options for styled() function\ntype StyledOptions = {\n enableResponsiveVariants?: boolean\n enablePolymorphism?: boolean\n}\n\n// Helper to check if responsive variants are enabled\ntype AreResponsiveVariantsEnabled<O> = O extends {\n enableResponsiveVariants: true\n}\n ? true\n : false\n\n// Props derived from a `variants` config\n// If enableResponsiveVariants is true, all variants support responsive values\n// If enableResponsiveVariants is not provided or false, variants do not support responsive values\ntype VariantProps<\n V extends VariantConfig | undefined,\n R extends boolean = false\n> = V extends VariantConfig\n ? R extends true\n ? {\n [K in keyof V]?: ResponsiveVariant<VariantValueType<V[K]>>\n }\n : {\n [K in keyof V]?: VariantValueType<V[K]>\n }\n : unknown\n\n// Typed config for our styled helper.\n// We intentionally *don't* rely on tailwind-variants' TS types here;\n// we only care about enough structure to derive props.\ntype StyledConfig<V extends VariantConfig | undefined = undefined> = {\n base?: string | string[]\n variants?: V\n compoundVariants?: Array<\n {\n class?: string | string[]\n } & (V extends VariantConfig\n ? {\n [K in keyof V]?: VariantValueType<V[K]> | VariantValueType<V[K]>[]\n }\n : Record<string, never>)\n >\n defaultVariants?: V extends VariantConfig\n ? { [K in keyof V]?: VariantValueType<V[K]> }\n : Record<string, never>\n}\n\n// Props of the default element. `as` is typed `never` so JSX usage with `as`\n// can only resolve through the generic polymorphic signature — signatures\n// built from this can never accept calls the generic one would reject.\ntype DefaultElementProps<\n TDefaultElement extends ElementType,\n OwnProps\n> = OwnProps & { as?: never } & Omit<\n React.ComponentPropsWithRef<TDefaultElement>,\n keyof OwnProps | 'as'\n >\n\n// Polymorphic component type: `as` prop narrows accepted props and ref type.\n//\n// The non-generic default-element signature appears twice on purpose. Tooling\n// that inspects call signatures disagrees on which one to read: props-table\n// generation (react-docgen-typescript) reads the FIRST, while type-level\n// inference (React.ComponentProps and friends) reads the LAST. If either\n// tool lands on the generic signature instead, TAs erases to its ElementType\n// constraint and the props collapse to `any` (docgen then also loses every\n// element-specific prop, e.g. Radix's asChild).\nexport interface PolymorphicComponent<\n TDefaultElement extends ElementType,\n OwnProps\n> {\n (\n props: DefaultElementProps<TDefaultElement, OwnProps>\n ): React.ReactElement | null\n <TAs extends ElementType = TDefaultElement>(\n props: OwnProps & { as?: TAs } & Omit<\n React.ComponentPropsWithRef<TAs>,\n keyof OwnProps | 'as'\n >\n ): React.ReactElement | null\n (\n props: DefaultElementProps<TDefaultElement, OwnProps>\n ): React.ReactElement | null\n displayName?: string\n __isStyledComponent?: boolean\n /**\n * Phantom brand (never present at runtime) that carries this component's own\n * props so a wrapping styled() can recover them via {@link BaseOwnProps}.\n * Optional so plain function casts to this interface stay assignable; nominal\n * enough that foreign polymorphic components (Reach, Radix) don't match it.\n */\n readonly __ownProps?: OwnProps\n}\n\n// Non-polymorphic component type: no `as` prop. Single concrete call\n// signature, so React.ComponentProps and react-docgen-typescript both read\n// it directly — no sandwich needed.\nexport interface StyledComponent<\n TDefaultElement extends ElementType,\n OwnProps\n> {\n (\n props: OwnProps &\n Omit<React.ComponentPropsWithRef<TDefaultElement>, keyof OwnProps | 'as'>\n ): React.ReactElement | null\n displayName?: string\n __isStyledComponent?: boolean\n}\n\ntype PolymorphicElementProps<E extends ElementType, OwnProps> = OwnProps & {\n as?: E\n} & Omit<React.ComponentPropsWithRef<E>, keyof OwnProps | 'as'>\n\n// When styled() wraps one of our own polymorphic components (rather than a host\n// string), that component's own props (variants + custom props) are part of the\n// styled component's identity and must persist regardless of `as`. Without this\n// they live only in the default element's `ComponentPropsWithRef` and get\n// dropped by the generic `as` signature, which keys element props off the `as`\n// target. Recover them via the `__ownProps` phantom brand — matching on that\n// field (rather than the call signatures) means foreign polymorphic components\n// (Reach, Radix) and host strings don't match and instead contribute `unknown`,\n// the intersection identity, so their attributes still swap with `as`.\ntype BaseOwnProps<T> = T extends { readonly __ownProps?: infer OwnProps }\n ? unknown extends OwnProps\n ? unknown\n : OwnProps\n : unknown\n\n/**\n * Extract the props a styled component accepts, optionally for a specific\n * `as` element. `React.ComponentProps<typeof Box>` only describes the default\n * element (with `as` unusable); use this to retarget or to build wrappers\n * that re-expose polymorphism:\n *\n * ```tsx\n * type AnchorBoxProps = StyledComponentProps<typeof Box, 'a'> // href, anchor ref…\n * ```\n */\nexport type StyledComponentProps<C, TAs extends ElementType = never> =\n C extends PolymorphicComponent<\n infer TDefault extends ElementType,\n infer OwnProps\n >\n ? PolymorphicElementProps<[TAs] extends [never] ? TDefault : TAs, OwnProps>\n : C extends ElementType\n ? React.ComponentPropsWithRef<[TAs] extends [never] ? C : TAs>\n : never\n\n// Function overloads for better type inference\n\n// enablePolymorphism: false — no `as` prop\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>,\n options: { enablePolymorphism: false; enableResponsiveVariants: true }\n): StyledComponent<TElement, VariantProps<V, true>>\n\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>,\n options: { enablePolymorphism: false }\n): StyledComponent<TElement, VariantProps<V, false>>\n\n// enablePolymorphism: true (default) — `as` prop available\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>,\n options: { enableResponsiveVariants: true }\n): PolymorphicComponent<\n TElement,\n VariantProps<V, true> & BaseOwnProps<TElement>\n>\n\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>\n): PolymorphicComponent<\n TElement,\n VariantProps<V, false> & BaseOwnProps<TElement>\n>\n\n// Implementation\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined,\n O extends StyledOptions | undefined = undefined\n>(el: TElement, styles: StyledConfig<V>, options?: O) {\n const variantKeys = Object.keys(styles.variants || {})\n // Membership set for the per-prop lookups in `Comp`'s render, so filtering\n // props stays O(1) per key instead of scanning `variantKeys` each time.\n const variantKeySet = new Set(variantKeys)\n const enableResponsiveVariants = options?.enableResponsiveVariants === true\n const tvFn = tv(styles as any)\n\n type ResponsiveVariantsEnabled = AreResponsiveVariantsEnabled<O>\n type VariantPropsType = VariantProps<V, ResponsiveVariantsEnabled>\n type BaseProps = React.ComponentPropsWithRef<TElement>\n // Extract variant keys to omit from BaseProps so variant props override native HTML attributes\n type VariantKeys = V extends VariantConfig ? keyof V : never\n type StyledProps = Omit<BaseProps, VariantKeys> &\n VariantPropsType & {\n as?: ElementType\n ref?: React.Ref<React.ComponentRef<TElement>>\n className?: string\n /** @internal wrapper classes passed between nested styled components */\n __wrapperClasses?: string\n }\n\n const Comp = (props: StyledProps) => {\n const { ref } = props\n const additionalStyles = enableResponsiveVariants\n ? variantKeys.flatMap((variantKey) => {\n const responsiveVariantConfig:\n | Record<Breakpoint, string | number>\n | undefined = props[variantKey]\n const variantStyles: Record<string, string | string[]> =\n styles.variants![variantKey]\n\n if (\n typeof responsiveVariantConfig === 'object' &&\n responsiveVariantConfig &&\n !Array.isArray(responsiveVariantConfig)\n ) {\n return Object.entries(responsiveVariantConfig).flatMap(\n ([key, val]) => {\n const valStr = String(val)\n const styleArr: string | string[] =\n variantStyles && variantStyles[valStr]\n\n if (styleArr && Array.isArray(styleArr)) {\n return styleArr.flatMap((cls: string) => {\n if (key === '@initial') return cls\n return `${key.replace('@', '')}:${cls}`\n })\n }\n return []\n }\n )\n }\n\n return []\n })\n : []\n\n // Filter out variant props that don't belong to this component before calling tvFn\n // This prevents tailwind-variants from processing props meant for wrapped components\n // Only pass props that are in this component's variant keys\n // For boolean variants, only include them if the value is explicitly true or false (not null/undefined)\n // Note: tailwind-variants treats null as \"no variant\" but undefined/missing as \"apply false variant\"\n // So we need to convert undefined to null for boolean variants to prevent default behavior\n const propsForTv =\n variantKeys.length > 0\n ? Object.fromEntries(\n // Single pass: skip non-variant props and normalise the rest in one\n // iteration rather than a separate filter then map.\n Object.entries(props as Record<string, unknown>).flatMap(\n ([key, value]) => {\n if (!variantKeySet.has(key)) return []\n // Check if this is a boolean variant (has both 'true' and 'false' keys)\n const variantConfig = styles.variants?.[key]\n if (\n variantConfig &&\n 'true' in variantConfig &&\n 'false' in variantConfig\n ) {\n // For boolean variants, only include if value is explicitly true or false\n // Convert undefined to null to prevent tailwind-variants from applying false variant\n if (value === true || value === false) {\n return [[key, value]]\n }\n // For null/undefined, pass null to prevent tailwind-variants from applying defaults\n // This ensures that when a boolean prop is explicitly null/undefined, no variant is applied\n return [[key, null]]\n }\n // For non-boolean variants, pass value as-is (including null/undefined)\n return [[key, value]]\n }\n )\n )\n : {}\n\n const cls = tvFn(propsForTv)\n\n const filteredProps = Object.fromEntries(\n Object.entries(props).filter(\n ([key]) =>\n !variantKeySet.has(key) && key !== 'as' && key !== '__wrapperClasses'\n )\n )\n\n const mergedClassName = clsx(cls, additionalStyles).trim()\n const propsClassName = props.className\n // Check for wrapper classes passed from a parent styled component\n const wrapperClasses = props.__wrapperClasses\n\n if (\n typeof el === 'string' ||\n typeof el === 'function' ||\n (el && typeof el === 'object')\n ) {\n const elementType = el as ElementType\n\n // If el is a host string ('div', 'span', etc.) we must not pass variant props to the DOM.\n if (typeof el === 'string') {\n const { className: _, ...restFilteredProps } = filteredProps as any\n // Merge order: wrapper classes (lowest priority) < component classes < user's className (highest priority)\n // This ensures variant classes from this component override base classes from wrapper\n // IMPORTANT: When propsClassName exists (could be from asChild), we need to ensure child's classes win\n // over parent classes, but user's className should still have highest priority.\n // Strategy: Only apply special merge when wrapperClasses exist (nested styled component scenario).\n // For regular cases (no wrapperClasses), use standard merge order so user's className has highest priority.\n const finalClassName =\n wrapperClasses && propsClassName\n ? twMerge(mergedClassName, wrapperClasses, propsClassName) // wrapper overrides base, user className wins\n : wrapperClasses\n ? twMerge(mergedClassName, wrapperClasses) // wrapper overrides base\n : propsClassName\n ? (() => {\n // When propsClassName comes from asChild (Radix), we want this component's classes to win\n // When propsClassName is a regular className prop, the user's className should win (highest priority)\n // We can detect asChild scenario by checking if propsClassName contains classes that look like they came from a parent component\n // (e.g., data attribute variants like data-[state=closed]:rounded-sm)\n // If it does, treat it as asChild and let component classes win. Otherwise, let user's className win.\n const hasDataAttributeVariants = propsClassName\n .split(' ')\n .some((cls) => DATA_STATE_VARIANT_RE.test(cls))\n\n if (hasDataAttributeVariants) {\n // This is likely from asChild - component's classes should win\n return twMerge(propsClassName, mergedClassName)\n } else {\n // Regular className prop - user's className should win (highest priority)\n return twMerge(mergedClassName, propsClassName)\n }\n })()\n : twMerge(mergedClassName) // Always merge mergedClassName to resolve conflicts within it (e.g., bg-[unset] vs bg-(--base))\n\n return React.createElement(props.as || elementType, {\n ...restFilteredProps,\n ref,\n className: finalClassName\n })\n }\n\n // If el is a function component (or other component object), pass ALL props through\n // (the wrapped component may expect variant props), but ensure className and ref are forwarded.\n // We need to pass all props (not filteredProps) because the underlying component may have its own variants\n //\n // For className merging with wrapped styled components:\n // Solution: Pass wrapper's classes via __wrapperClasses prop for styled components to merge correctly.\n // For regular function components, merge wrapper classes with our classes and pass as className.\n // This ensures:\n // - Styled components can merge: wrapper classes < wrapped component classes < user's className\n // - Regular components get merged classes directly and don't receive __wrapperClasses\n // Filter out variant props and __wrapperClasses from props passed to function components\n // This prevents them from ending up in the DOM.\n // Note: We filter out variant props that belong to THIS component. Variant props that belong to\n // the wrapped component will be passed through (they're not in variantKeys), and the wrapped\n // component will filter them if it's a styled component.\n // Note: 'as' prop is filtered from filteredProps to prevent it from going to DOM for string elements,\n // but we add it back for function components since they need it for polymorphism.\n const { className: _, ...restFilteredProps } = filteredProps as any\n const asProp = props.as // Extract 'as' prop separately\n // Note: __wrapperClasses is already filtered out in filteredProps, so restFilteredProps doesn't include it\n\n // For styled components: Pass wrapper classes via __wrapperClasses so they can merge correctly.\n // Styled components extract __wrapperClasses from props (before filteredProps) and filter it in filteredProps.\n // For regular function components: We merge wrapper classes into className, but also pass __wrapperClasses\n // which they may spread. To prevent it in DOM, we need to ensure it's filtered, but we can't control that.\n // However, styled components that wrap regular components will filter __wrapperClasses in their filteredProps.\n if (wrapperClasses) {\n // We have wrapper classes from parent - this is a nested styled component scenario\n // Merge order: wrapper classes (base) < this component's classes (variants) < user's className\n // This ensures variant classes override base classes via twMerge\n // IMPORTANT: When propsClassName exists (could be from asChild), we need to ensure this component's classes win.\n // Strategy: Merge wrapperClasses with propsClassName first, then merge with mergedClassName last.\n // This ensures: wrapperClasses < propsClassName < mergedClassName (this component's classes win)\n // This is critical when propsClassName contains parent classes from asChild merge.\n const finalClassName = propsClassName\n ? twMerge(wrapperClasses, propsClassName, mergedClassName) // This component's classes win by being merged last\n : twMerge(wrapperClasses, mergedClassName)\n\n // Check if the wrapped component is a styled component. Component\n // types can be objects, not just functions (e.g. React.memo, lazy)\n const isStyledComponent =\n (typeof elementType === 'function' ||\n typeof elementType === 'object') &&\n elementType !== null &&\n (elementType as any).__isStyledComponent === true\n\n const propsForComponent: any = {\n ...restFilteredProps, // Base props (filters THIS component's variant props, __wrapperClasses, 'as')\n ...(asProp ? { as: asProp } : {}), // Add 'as' prop back for function components (polymorphic support)\n // Note: We don't add variant props back - they're already filtered by filteredProps.\n ref\n }\n\n if (isStyledComponent) {\n // Wrapped component is a styled component - pass __wrapperClasses so variant classes win\n // IMPORTANT: When propsClassName exists (could be from asChild), it may contain both parent and child classes.\n // We should NOT merge propsClassName with mergedClassName here, because that would remove child classes.\n // Instead, pass propsClassName as-is (or merge only wrapperClasses with mergedClassName) so the child\n // can merge its own classes last. The child will merge: twMerge(__wrapperClasses, propsClassName, child's mergedClassName).\n // This ensures child's classes win by being merged last.\n // Merge wrapperClasses with mergedClassName to create the wrapper classes for the child\n const combinedWrapperClasses = twMerge(\n wrapperClasses,\n mergedClassName\n )\n propsForComponent.__wrapperClasses = combinedWrapperClasses\n propsForComponent.className = propsClassName || undefined\n } else {\n // Wrapped component is not a styled component - merge wrapper classes into className\n // and don't pass __wrapperClasses (it would end up in DOM)\n propsForComponent.className = finalClassName\n }\n return React.createElement(elementType, propsForComponent)\n } else {\n // No wrapper classes from parent - we're top-level\n // For function components: Pass __wrapperClasses so styled components can merge correctly.\n // Styled components extract __wrapperClasses from their props (before filteredProps) and filter it in filteredProps.\n // Regular function components will receive __wrapperClasses but should filter it out themselves.\n // We also merge wrapper classes into className for regular function components.\n // Note: We pass __wrapperClasses in props (not filteredProps) so styled components can access it,\n // but styled components filter it in their filteredProps so it won't go to DOM.\n // Regular function components that spread all props will pass __wrapperClasses to DOM, which is a problem.\n // But we can't distinguish them, so we rely on styled components filtering it.\n // Check if the wrapped component is a styled component\n // elementType is the component itself (e.g., Inner when Outer extends Inner)\n // Component types can be objects, not just functions, but we can still check the flag\n const isStyledComponent =\n (typeof elementType === 'function' ||\n typeof elementType === 'object') &&\n elementType !== null &&\n (elementType as any).__isStyledComponent === true\n\n const propsForComponent: any = {\n ...restFilteredProps, // Filters out __wrapperClasses, variant props, 'as'\n ...(asProp ? { as: asProp } : {}),\n ref\n }\n\n if (isStyledComponent) {\n // Styled component - pass wrapper classes via __wrapperClasses so variant classes can take precedence\n // IMPORTANT: When propsClassName exists, we need to distinguish between:\n // 1. User's className (should win - highest priority)\n // 2. className from asChild/parent component (component's classes should win)\n // We detect asChild by checking for data attribute variants (e.g., data-[state=closed]:rounded-sm)\n const hasDataAttributeVariants = propsClassName\n ? propsClassName\n .split(' ')\n .some((cls) => DATA_STATE_VARIANT_RE.test(cls))\n : false\n\n const mergedPropsAndComponent = propsClassName\n ? hasDataAttributeVariants\n ? // This is likely from asChild - component's classes should win\n twMerge(propsClassName, mergedClassName)\n : // Regular user className - user's className should win (highest priority)\n twMerge(mergedClassName, propsClassName)\n : mergedClassName\n propsForComponent.__wrapperClasses = mergedClassName\n propsForComponent.className = mergedPropsAndComponent || undefined\n } else {\n // Regular function component - merge wrapper classes into className\n // Standard merge order: component classes < user's className (highest priority)\n propsForComponent.className = twMerge(mergedClassName, propsClassName)\n }\n return React.createElement(elementType, propsForComponent)\n }\n }\n\n if (React.isValidElement(el)) {\n const element = el as ReactElement<unknown>\n // Merge existing element className, incoming filteredProps.className and our computed class\n const existingClass = (element.props as any).className\n const incomingClass = (filteredProps as any).className\n const finalClassName = cn(\n existingClass,\n incomingClass,\n mergedClassName\n ).trim()\n\n const cloneProps: any = {\n // ...element.props,\n ...filteredProps,\n as: props.as || (element.props as { as?: ElementType }).as,\n className: finalClassName\n }\n\n // Forward the ref if provided, composed with any ref the element\n // already carries — overwriting it would silently detach the original.\n if (ref) {\n const existingRef = (element.props as { ref?: React.Ref<unknown> }).ref\n cloneProps.ref = existingRef ? composeRefs(existingRef, ref) : ref\n }\n\n return React.cloneElement(element, cloneProps)\n }\n\n throw Error('Something is wrong')\n }\n\n // Mark the component as a styled component so we can detect it later\n ;(Comp as any).__isStyledComponent = true\n\n // Name the component for DevTools and error component stacks — without\n // this every styled component reads as the inner function name, \"Comp\"\n const baseName =\n typeof el === 'string'\n ? el\n : (el as any).displayName || (el as any).name || 'Component'\n Comp.displayName = baseName.startsWith('styled.')\n ? baseName\n : `styled.${baseName}`\n\n return Comp\n}\n","import * as React from 'react'\n\ntype CssWrapperProps = {\n className?: string\n children: React.ReactNode\n}\n\nexport const CSSWrapper = ({\n className,\n children\n}: CssWrapperProps): React.ReactElement<unknown> =>\n className ? (\n <div className={className}>{children}</div>\n ) : (\n // children could be multiple elements/components,\n // so we need a fragment here.\n // eslint-disable-next-line react/jsx-no-useless-fragment\n <>{children}</>\n )\n\nCSSWrapper.displayName = 'CSSWrapper'\n","import { Content } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { CSSWrapper } from '../../utilities/css-wrapper/CSSWrapper'\n\nconst StyledContent = styled(Content, {\n base: [\n 'border-none',\n 'w-full',\n 'bg-(--base-1)',\n 'overflow-hidden',\n 'data-[state=open]:rounded-b-sm',\n 'data-[state=open]:rounded-t-none',\n 'motion-safe:data-[state=open]:animate-accordion-open',\n 'motion-safe:data-[state=closed]:animate-accordion-close'\n ]\n})\n\nexport const AccordionContent = ({\n children,\n className,\n ...rest\n}: React.ComponentProps<typeof StyledContent>) => (\n <StyledContent {...rest}>\n <CSSWrapper className={className}>{children}</CSSWrapper>\n </StyledContent>\n)\n","import { Item } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const AccordionItem = styled(\n Item,\n {\n base: ['w-full', 'not-last:mb-1']\n },\n { enablePolymorphism: false }\n)\n","type ColorSchemeKeys = 'interactive' | 'base' | 'accent' | 'foreground'\n\n// ColorScheme is a partial record, but values are always strings (never undefined)\ntype ColorScheme = Partial<\n Record<`--${ColorSchemeKeys}` | `--${ColorSchemeKeys}-${string}`, string>\n>\n\ntype ColorSchemeConfig = { colorName: string; color0?: string }\n\nconst generateColors = ({\n prefix,\n colorName,\n color0 = ''\n}: {\n prefix: ColorSchemeKeys\n colorName: string\n color0?: string\n}): ColorScheme => {\n const colors: Record<string, string> = {}\n let i = 1\n if (color0) {\n colors[`--${prefix}-${i}`] = `var(--color-${color0})`\n i++\n }\n let k = 1\n for (i; i <= 11; i++) {\n colors[`--${prefix}-${i}`] = `var(--color-${colorName}-${k * 100})`\n k++\n }\n return colors as ColorScheme\n}\n\nexport const colorSchemes: Record<string, ColorScheme> = {} as Record<\n string,\n ColorScheme\n>\n\ncolorSchemes['interactive-loContrast'] = {\n '--interactive-foreground': 'var(--foreground)',\n '--interactive-1': 'var(--accent-1)',\n '--interactive-2': 'var(--accent-2)',\n '--interactive-3': 'var(--accent-3)'\n}\n\ncolorSchemes['interactive-hiContrast'] = {\n '--interactive-foreground': 'var(--foreground-7-plus)',\n '--interactive-1': 'var(--accent-9)',\n '--interactive-2': 'var(--accent-10)',\n '--interactive-3': 'var(--accent-11)'\n}\n\nconst colorNames = [\n 'primary',\n 'grey',\n 'blue',\n 'pink',\n 'purple',\n 'cyan',\n 'green',\n 'magenta',\n 'red',\n 'teal',\n 'orange',\n 'yellow',\n 'lime'\n]\n\nconst createVariants = () =>\n Object.fromEntries(\n colorNames.flatMap((c) => [\n [`${c}1`, { colorName: c, color0: 'white' }],\n [`${c}2`, { colorName: c }]\n ])\n ) as Record<string, ColorSchemeConfig>\n\nexport const bases = createVariants()\nexport const accents = bases\n;(() => {\n Object.entries(bases).forEach(\n ([name, config]: [string, ColorSchemeConfig]) => {\n const themeName = `base-${name}`\n colorSchemes[themeName] = {\n '--foreground': 'var(--color-grey-1000)',\n '--foreground-7-plus': 'var(--color-white)',\n ...generateColors({\n prefix: 'base',\n colorName: config.colorName,\n color0: config.color0\n })\n }\n }\n )\n\n Object.entries(accents).forEach(\n ([name, config]: [string, ColorSchemeConfig]) => {\n colorSchemes[`accent-${name}`] = generateColors({\n prefix: 'accent',\n colorName: config.colorName,\n color0: config.color0\n })\n }\n )\n})()\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { accents, bases, colorSchemes } from './ColorScheme.config'\n\nexport type TcolorScheme = {\n base?: keyof typeof bases\n accent?: keyof typeof accents\n interactive?: 'loContrast' | 'hiContrast'\n}\n\ntype ColorSchemeOwnProps = TcolorScheme & {\n asChild?: boolean\n ref?: React.Ref<HTMLDivElement>\n}\n\ntype ColorSchemeProps = React.HTMLAttributes<HTMLDivElement> &\n ColorSchemeOwnProps\n\n/**\n * @experimental Component has not been finalised. Further design input required. Use with caution.\n */\nexport const ColorScheme = ({\n ref,\n base = '',\n accent = '',\n interactive,\n asChild = false,\n ...rest\n}: ColorSchemeProps) => {\n const Component = asChild ? Slot : 'div'\n\n // Build style object - config ensures values are always strings (never undefined)\n const style = {\n ...(interactive && colorSchemes[`interactive-${interactive}`]),\n ...(accent && colorSchemes[`accent-${accent}`]),\n ...(base && colorSchemes[`base-${base}`])\n } as React.CSSProperties\n\n return <Component {...rest} ref={ref} style={style} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nexport const StyledIcon = styled(\n 'svg',\n {\n base: [\n 'inline-block',\n 'fill-none',\n 'shrink-0',\n 'stroke-current',\n '[stroke-linecap:round]',\n '[stroke-linejoin:round]',\n 'align-middle'\n ],\n variants: {\n size: {\n sm: ['size-4', 'stroke-[1.5]'],\n md: ['size-6', 'stroke-[1.75]'],\n lg: ['size-8', 'stroke-2']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype IconProps = Override<\n React.ComponentProps<typeof StyledIcon>,\n {\n is: React.FC<React.SVGProps<SVGSVGElement>>\n as?: never\n }\n>\n\nexport const Icon = ({ ref, is: SVG, size = 'md', ...rest }: IconProps) => (\n <StyledIcon size={size} aria-hidden=\"true\" {...rest} as={SVG} ref={ref} />\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\n\nconst RotatingIcon = styled(Icon, {\n base: [\n 'transition-transform',\n 'duration-300',\n '[[data-state=open]>&]:rotate-180',\n '[[data-state=closed]>&]:rotate-0'\n ]\n})\n\nconst StyledTrigger = styled(Trigger, {\n base: [\n 'border-none',\n 'py-3',\n 'px-4',\n 'w-full',\n 'flex',\n 'justify-between',\n 'items-center',\n 'cursor-pointer',\n 'bg-(--interactive-2)',\n 'text-(--interactive-foreground)',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--interactive-3)',\n 'not-disabled:focus-visible:bg-(--interactive-3)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--interactive-3)',\n 'data-[state=open]:rounded-b-none',\n 'data-[state=open]:rounded-t-sm',\n 'data-[state=closed]:rounded-sm'\n ],\n variants: {\n arrowPosition: {\n left: ['flex-row-reverse', 'gap-2', 'justify-end'],\n right: []\n }\n }\n})\n\nexport const AccordionTrigger = ({\n children,\n colorScheme = {},\n asChild,\n arrowPosition = 'right',\n ...rest\n}: React.ComponentProps<typeof StyledTrigger> & {\n colorScheme?: TcolorScheme\n}) => (\n <ColorScheme asChild accent=\"grey1\" interactive=\"loContrast\" {...colorScheme}>\n <StyledTrigger asChild={asChild} arrowPosition={arrowPosition} {...rest}>\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <RotatingIcon is={ChevronDown} data-testid=\"accordion-chevron\" />\n </>\n )}\n </StyledTrigger>\n </ColorScheme>\n)\n","import { Root } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { AccordionContent } from './AccordionContent'\nimport { AccordionItem } from './AccordionItem'\nimport { AccordionTrigger } from './AccordionTrigger'\n\ntype AccordionProps = React.ComponentProps<typeof Root> & {\n type: 'single' | 'multiple'\n}\n\nconst AccordionBase = ({\n ref,\n type = 'single',\n className,\n children,\n ...rest\n}: AccordionProps) => (\n // eslint-disable-next-line\n // @ts-ignore TODO: Radix has an TS error that throws a warning if you pass multiple in. Needs to be fixed by the owner\n <Root ref={ref} type={type} className={cn('w-full', className)} {...rest}>\n {children}\n </Root>\n)\n\nexport const Accordion = /* @__PURE__ */ Object.assign(AccordionBase, {\n Item: AccordionItem,\n Content: AccordionContent,\n Trigger: AccordionTrigger\n})\n","import { Arrow, Content } from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledContent = styled(Content, {\n base: [\n 'bg-grey-900',\n 'rounded-sm',\n 'shadow-sm',\n 'text-white',\n 'font-body',\n 'text-sm',\n 'leading-normal',\n 'whitespace-normal',\n 'px-3',\n 'py-2',\n 'z-10',\n 'will-change-transform',\n 'will-change-[opacity]',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=delayed-open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n size: {\n sm: ['max-w-25'],\n md: ['max-w-[250px]'],\n lg: ['max-w-100']\n }\n }\n})\n\nconst StyledArrow = styled(Arrow, {\n base: [\n 'fill-grey-900',\n 'in-data-[align=end]:mr-2',\n 'in-data-[align=start]:ml-2'\n ]\n})\n\ntype TooltipContentProps = React.ComponentProps<typeof StyledContent> &\n React.ComponentProps<typeof Content>\n\nexport const TooltipContent = ({\n children,\n side = 'top',\n sideOffset = 4,\n size = 'md',\n ...rest\n}: TooltipContentProps) => (\n <StyledContent side={side} sideOffset={sideOffset} size={size} {...rest}>\n {children}\n <StyledArrow />\n </StyledContent>\n)\n","import { Portal, Provider, Root, Trigger } from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { TooltipContent } from './TooltipContent'\n\ntype TooltipProps = React.ComponentProps<typeof Root>\n\nconst TooltipComponent = ({\n children,\n delayDuration = 350,\n ...rest\n}: TooltipProps) => (\n <Root delayDuration={delayDuration} {...rest}>\n {children}\n </Root>\n)\n\nexport const Tooltip = /* @__PURE__ */ Object.assign(TooltipComponent, {\n Content: TooltipContent,\n Trigger: Trigger,\n Portal: Portal,\n Provider: Provider\n})\n\nTooltipComponent.displayName = 'Tooltip'\n","import * as React from 'react'\n\nimport { Tooltip } from '../../components/tooltip/Tooltip'\n\nexport type OptionalTooltipWrapperProps = {\n hasTooltip?: boolean\n label?: React.ReactNode\n tooltipSide?: React.ComponentProps<typeof Tooltip.Content>['side']\n}\n\nexport const OptionalTooltipWrapper = ({\n hasTooltip,\n label,\n tooltipSide,\n children\n}: React.PropsWithChildren<OptionalTooltipWrapperProps>) => {\n if (hasTooltip) {\n return (\n <Tooltip>\n <Tooltip.Trigger\n asChild\n onFocus={(e: React.FocusEvent) => {\n // Only show the tooltip on keyboard focus, not programmatic focus\n // (e.g. when a dialog auto-focuses this element on open).\n // The browser sets :focus-visible during keyboard navigation,\n // so if it is absent we know the focus was not from the keyboard\n // and call preventDefault() to tell Radix to skip opening the tooltip.\n if (!(e.currentTarget as Element).matches(':focus-visible')) {\n e.preventDefault()\n }\n }}\n >\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content side={tooltipSide}>{label}</Tooltip.Content>\n </Tooltip>\n )\n }\n\n // children could be multiple elements/components,\n // so we need a fragment here.\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>\n}\n\nOptionalTooltipWrapper.displayName = 'OptionalTooltipWrapper'\n","// Deliberately syntactic (no window.location.origin comparison): the check\n// must give the same answer on server and client, or an SSR'd same-origin\n// absolute link renders target=\"_blank\" markup that the client would not.\n// Consumers wanting same-tab navigation should pass relative URLs.\nconst EXTERNAL_URL_RE = /^https?:\\/\\//\n\nexport const isExternalUrl = (url?: string) =>\n !!url && EXTERNAL_URL_RE.test(url)\n\nexport const getExternalAnchorProps = (url?: string) =>\n isExternalUrl(url) ? { target: '_blank', rel: 'noopener noreferrer' } : {}\n","import * as React from 'react'\n\ntype LinkComponent = React.ComponentType<\n React.AnchorHTMLAttributes<HTMLAnchorElement>\n>\n\ntype RouterContextValue = {\n link?: LinkComponent\n}\n\nconst RouterContext = React.createContext<RouterContextValue>({})\n\ntype RouterProviderProps = {\n link: LinkComponent\n children: React.ReactNode\n}\n\nexport const RouterProvider = ({ link, children }: RouterProviderProps) => {\n const value = React.useMemo<RouterContextValue>(() => ({ link }), [link])\n return (\n <RouterContext.Provider value={value}>{children}</RouterContext.Provider>\n )\n}\n\nconst isAbsoluteUrl = (url?: string) => /^https?:\\/\\//.test(url || '')\n\n// `as` is surfaced as the broad `React.ElementType` (not the narrower\n// `LinkComponent`) so it feeds straight into styled()'s polymorphic `as` prop:\n// a concrete component type makes TS infer element-specific props and reject the\n// call, whereas `ElementType` lets inference land on the polymorphic signature.\nconst EMPTY: { as?: React.ElementType } = {}\n\nexport const useRouterLinkProps = (\n href?: string,\n { reloadDocument }: { reloadDocument?: boolean } = {}\n): { as?: React.ElementType } => {\n const { link } = React.useContext(RouterContext)\n\n if (!link || !href || isAbsoluteUrl(href) || reloadDocument) {\n return EMPTY\n }\n\n return { as: link }\n}\n\nRouterProvider.displayName = 'Router.Provider'\n","export const ActionIconSizeMap = {\n xs: 'sm',\n sm: 'sm',\n md: 'md',\n lg: 'lg'\n}\n","import * as React from 'react'\nimport invariant from 'tiny-invariant'\n\nimport { styled } from '../../styled'\nimport type { OptionalTooltipWrapperProps } from '../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\nimport { OptionalTooltipWrapper } from '../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\nimport type { Override } from '../../utilities/types'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { Icon } from '../icon/Icon'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\nimport { ActionIconSizeMap } from './ActionIcon.constants'\n\nconst StyledButton = styled(\n 'button',\n {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-white',\n 'rounded-md',\n 'box-border',\n 'cursor-pointer',\n 'flex',\n 'shrink-0',\n 'justify-center',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n neutral: [\n '[--solid-base:var(--color-white)]',\n '[--solid-interact:var(--color-grey-100)]',\n '[--solid-active:var(--color-grey-200)]',\n '[--solid-text:var(--color-grey-1200)]',\n '[--base:var(--color-grey-700)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1100)]'\n ],\n primary: [\n '[--base:var(--color-primary-800)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1000)]'\n ],\n primaryDark: [\n '[--base:var(--color-primary-1000)]',\n '[--interact:var(--color-primary-1100)]',\n '[--active:var(--color-primary-1200)]'\n ],\n success: [\n '[--base:var(--color-success)]',\n '[--interact:var(--color-success-mid)]',\n '[--active:var(--color-success-dark)]'\n ],\n warning: [\n '[--base:var(--color-warning)]',\n '[--interact:var(--color-warning-mid)]',\n '[--active:var(--color-warning-dark)]'\n ],\n danger: [\n '[--base:var(--color-danger)]',\n '[--interact:var(--color-danger-mid)]',\n '[--active:var(--color-danger-dark)]'\n ],\n white: [\n '[--base:var(--color-white)]',\n '[--interact:var(--color-white)]',\n '[--active:var(--color-white)]'\n ]\n },\n appearance: {\n simple: [\n 'bg-transparent',\n 'text-(--base)',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ],\n outline: [\n 'bg-[unset]',\n 'border',\n 'border-current',\n 'text-(--base)',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ],\n solid: [\n 'bg-(--solid-base,var(--base))',\n 'text-(--solid-text,white)',\n 'not-disabled:hover:bg-(--solid-interact,var(--interact))',\n 'not-disabled:hover:text-(--solid-text,white)',\n 'not-disabled:focus:bg-(--solid-interact,var(--interact))',\n 'not-disabled:focus:text-(--solid-text,white)',\n 'not-disabled:active:bg-(--solid-active,var(--active))'\n ]\n },\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12']\n },\n isRounded: {\n true: ['rounded-full']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\ntype ActionIconProps = Override<\n React.ComponentProps<typeof StyledButton>,\n {\n as?: React.ElementType\n children: React.ReactNode\n href?: string\n label: string\n reloadDocument?: boolean\n } & Omit<OptionalTooltipWrapperProps, 'label'>\n>\n\nexport const ActionIcon = ({\n ref,\n children,\n theme = 'primary',\n appearance = 'simple',\n size = 'sm',\n label,\n href,\n disabled,\n hasTooltip = true,\n tooltipSide,\n reloadDocument,\n ...rest\n}: ActionIconProps) => {\n const INVALID_CHILDREN_MESSAGE = `A single ${Icon.name} component is permitted as a child of ActionIcon`\n\n invariant(React.Children.count(children) === 1, INVALID_CHILDREN_MESSAGE)\n\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n\n // Polymorphic props: can be either button or anchor element\n const optionalLinkProps = href\n ? ({\n as: routerLinkProps.as || 'a',\n href: disabled ? undefined : href,\n onClick: undefined,\n 'aria-disabled': !!disabled\n } as const)\n : ({ type: 'button' } as const)\n\n return (\n <OptionalTooltipWrapper\n hasTooltip={hasTooltip}\n label={label}\n tooltipSide={tooltipSide}\n >\n <StyledButton\n {...optionalLinkProps}\n {...getExternalAnchorProps(href)}\n {...rest}\n aria-label={label}\n theme={theme}\n appearance={appearance}\n size={size}\n ref={ref}\n disabled={disabled}\n >\n {React.Children.map(children, (child) => {\n // TS needs this check for any following code to access child.type\n // even with optional chaining\n if (!React.isValidElement(child)) {\n throw new Error(INVALID_CHILDREN_MESSAGE)\n }\n\n invariant(\n child.type === Icon,\n `Children of type ${child?.type} aren't permitted. Only an ${Icon.name} component is allowed in ActionIcon`\n )\n\n return React.cloneElement(\n child as React.ReactElement<React.ComponentProps<typeof Icon>>,\n {\n size: ActionIconSizeMap[size as string]\n }\n )\n })}\n </StyledButton>\n </OptionalTooltipWrapper>\n )\n}\n","import { Content, Overlay, Portal } from '@radix-ui/react-alert-dialog'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledAlertDialogOverlay = styled(Overlay, {\n base: [\n 'bg-alpha-600',\n 'top-0',\n 'right-0',\n 'bottom-0',\n 'left-0',\n 'fixed',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-fade-in',\n 'motion-safe:data-[state=closed]:animate-fade-out'\n ]\n})\nconst StyledAlertDialogContent = styled(Content, {\n base: [\n // `transform: translate()` is required for `floating-ui` to\n // correctly position elements within the Dialog component.\n // we can't use the translate property directly\n 'transform-[translate(-50%,-50%)]',\n 'bg-white',\n 'rounded-md',\n 'shadow-xl',\n 'box-border',\n 'left-1/2',\n 'max-w-[90vw]',\n 'p-8',\n 'fixed',\n 'top-1/2',\n 'focus:outline-none',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-slide-in-center',\n 'motion-safe:data-[state=closed]:animate-slide-out-center'\n ],\n variants: {\n size: {\n sm: ['w-95'],\n md: ['w-120'],\n lg: ['w-150']\n }\n }\n})\n\nexport const AlertDialogContent = ({\n size = 'sm',\n ...rest\n}: React.ComponentProps<typeof StyledAlertDialogContent>) => (\n <Portal>\n <StyledAlertDialogOverlay />\n <StyledAlertDialogContent size={size} {...rest} />\n </Portal>\n)\n","import {\n Action,\n Cancel,\n Description,\n Root,\n Title,\n Trigger\n} from '@radix-ui/react-alert-dialog'\nimport * as React from 'react'\n\nimport { AlertDialogContent } from './AlertDialogContent'\n\nexport const AlertDialog = /* @__PURE__ */ Object.assign(Root, {\n Description: Description,\n Title: Title,\n Action: Action,\n Cancel: Cancel,\n Content: AlertDialogContent,\n Trigger: Trigger\n})\n\nAlertDialog.displayName = 'AlertDialog'\n","import { useEffect, useRef } from 'react'\n\nexport const useIsMountedRef = () => {\n const isMountedRef = useRef<boolean | undefined>(undefined)\n\n useEffect(() => {\n isMountedRef.current = true\n return () => {\n isMountedRef.current = false\n }\n })\n\n return isMountedRef\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\n\nconst Dot = styled('div', {\n base: [\n 'animate-pulse',\n 'bg-current',\n 'rounded-full',\n 'animation-duration-900',\n 'nth-3:animation-delay-300',\n 'nth-4:animation-delay-600'\n ],\n variants: {\n size: {\n sm: ['size-1', 'mx-0.5'],\n md: ['size-1.5', 'mx-0.5'],\n lg: ['size-2', 'mx-[3px]']\n }\n }\n})\n\ntype LoaderProps = React.ComponentProps<'div'> & {\n message?: string\n size?: 'sm' | 'md' | 'lg'\n}\n\nexport const Loader = ({\n className,\n message = 'Loading',\n size = 'md',\n ...rest\n}: LoaderProps) => (\n <div\n className={cn('flex', 'justify-center', className)}\n role=\"alert\"\n {...rest}\n >\n <span className=\"sr-only\">{message}</span>\n <Dot size={size} />\n <Dot size={size} />\n <Dot size={size} />\n </div>\n)\n","import * as React from 'react'\n\nimport { type PolymorphicComponent, styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { Loader } from '../loader/Loader'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\n\nexport const StyledButton = styled(\n 'button',\n {\n base: [\n 'items-center',\n 'bg-[unset]',\n 'rounded-md',\n 'cursor-pointer',\n 'flex',\n 'font-body',\n 'font-semibold',\n 'justify-center',\n 'no-underline',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'whitespace-nowrap',\n 'w-max',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n primary: [\n '[--base:var(--color-primary-800)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1000)]'\n ],\n secondary: [\n '[--base:var(--color-primary-1000)]',\n '[--interact:var(--color-primary-1100)]',\n '[--active:var(--color-primary-1200)]'\n ],\n success: [\n '[--base:var(--color-success)]',\n '[--interact:var(--color-success-mid)]',\n '[--active:var(--color-success-dark)]'\n ],\n warning: [\n '[--base:var(--color-warning)]',\n '[--interact:var(--color-warning-mid)]',\n '[--active:var(--color-warning-dark)]',\n '[--text:var(--color-grey-800)]'\n ],\n danger: [\n '[--base:var(--color-danger)]',\n '[--interact:var(--color-danger-mid)]',\n '[--active:var(--color-danger-dark)]'\n ],\n neutral: [\n '[--base:white]',\n '[--interact:rgba(255,255,255,0.9)]',\n '[--active:rgba(255,255,255,0.75)]',\n '[--text:var(--color-primary-800)]'\n ]\n },\n appearance: {\n solid: [\n 'bg-(--base)',\n 'text-(--text,white)',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'not-disabled:hover:bg-(--interact)',\n 'not-disabled:hover:text-(--text,white)',\n 'not-disabled:focus:bg-(--interact)',\n 'not-disabled:focus:text-(--text,white)',\n 'not-disabled:active:bg-(--active)'\n ],\n outline: [\n 'border',\n 'border-current',\n 'text-(--base)',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'not-disabled:hover:no-underline',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:no-underline',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ]\n },\n size: {\n sm: [\n 'text-sm',\n 'leading-[1.53]',\n 'h-8',\n 'px-4',\n 'gap-2',\n '[&_svg]:size-4'\n ],\n md: [\n 'text-md',\n 'leading-normal',\n 'h-10',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-5'\n ],\n lg: [\n 'text-lg',\n 'leading-normal',\n 'h-12',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-[22px]'\n ],\n xl: [\n 'text-lg',\n 'leading-normal',\n 'h-16',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-[22px]'\n ]\n },\n isLoading: {\n true: ['cursor-not-allowed', 'opacity-60', 'pointer-events-none']\n },\n fullWidth: {\n true: ['w-full'],\n false: ['w-max']\n }\n },\n defaultVariants: {\n appearance: 'solid',\n size: 'md',\n theme: 'primary'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\n// @__PURE__ keeps this tree-shakable for consumers importing only\n// StyledButton from this module.\nconst LoaderContentsWrapper = /* @__PURE__ */ styled(\n 'span',\n {\n base: ['items-center', 'flex', 'justify-center', 'invisible'],\n variants: {\n size: {\n sm: ['gap-2'],\n md: ['gap-3'],\n lg: ['gap-3'],\n xl: ['gap-3']\n }\n },\n defaultVariants: {\n size: 'md'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst WithLoader = ({\n size,\n children\n}: React.ComponentProps<typeof LoaderContentsWrapper>) => (\n <>\n <Loader className=\"absolute\" />\n <LoaderContentsWrapper size={size}>{children}</LoaderContentsWrapper>\n </>\n)\n\ntype ButtonCustomProps = {\n children: React.ReactNode\n href?: string\n isLoading?: boolean\n reloadDocument?: boolean\n}\n\ntype ButtonProps = Override<\n React.ComponentProps<typeof StyledButton>,\n ButtonCustomProps & { as?: React.ElementType }\n>\n\n// Re-expose StyledButton's variant props merged with our own, so the public\n// polymorphic type re-checks props against whatever `as` target is passed\ntype StyledButtonOwnProps =\n typeof StyledButton extends PolymorphicComponent<\n infer _Element extends React.ElementType,\n infer OwnProps\n >\n ? OwnProps\n : never\n\ntype ButtonOwnProps = Override<StyledButtonOwnProps, ButtonCustomProps>\n\nexport const Button = (({\n ref,\n children,\n as,\n href,\n isLoading = false,\n onClick,\n disabled,\n reloadDocument,\n ...rest\n}: ButtonProps) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n\n return (\n <StyledButton\n as={as || routerLinkProps.as || (href ? 'a' : undefined)}\n {...(!disabled && !isLoading && { href, onClick })}\n isLoading={isLoading}\n type={!href ? 'button' : undefined}\n disabled={disabled}\n {...rest}\n {...getExternalAnchorProps(href)}\n ref={ref}\n >\n {isLoading ? (\n <WithLoader size={rest.size}>{children}</WithLoader>\n ) : (\n children\n )}\n </StyledButton>\n )\n}) as PolymorphicComponent<'button', ButtonOwnProps>\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nexport const Heading = styled(\n 'h2',\n {\n base: ['m-0'],\n variants: {\n size: {\n xs: ['font-body', 'text-md', 'leading-normal', 'capsize-[0.3864]'],\n sm: ['font-body', 'text-lg', 'leading-[1.14]', 'capsize-[0.2078]'],\n md: [\n 'font-display',\n 'text-xl',\n 'leading-[1.14]',\n 'tracking-[0.01em]',\n 'capsize-before-[0.2114]',\n 'capsize-after-[0.2634]'\n ],\n lg: [\n 'font-display',\n 'text-2xl',\n 'leading-[1.08]',\n 'tracking-[0.01em]',\n 'capsize-before-[0.1405]',\n 'capsize-after-[0.2405]'\n ],\n xl: [\n 'font-display',\n 'text-3xl',\n 'leading-[1.12]',\n 'capsize-before-[0.16]',\n 'capsize-after-[0.26]'\n ],\n xxl: [\n 'font-display',\n 'text-4xl',\n 'leading-none',\n 'capsize-before-[0.1]',\n 'capsize-after-[0.2]'\n ]\n },\n noCapsize: {\n true: ['capsize-none']\n },\n weight: {\n medium: ['font-medium'],\n bold: ['font-bold']\n }\n },\n defaultVariants: {\n size: 'md',\n weight: 'bold'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport type HeadingProps = Override<\n React.ComponentProps<typeof Heading>,\n {\n as?:\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | React.ComponentType\n | React.ElementType\n }\n>\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nexport const Text = styled(\n 'p',\n {\n base: ['m-0'],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]'],\n '2xl': ['text-2xl', 'leading-[1.40]', 'capsize-[0.3336]'],\n '3xl': ['text-3xl', 'leading-[1.28]', 'capsize-[0.2709]'],\n '4xl': ['text-4xl', 'leading-none', 'capsize-[0.1309]']\n },\n noCapsize: {\n true: ['capsize-none']\n },\n weight: {\n normal: ['font-normal'],\n bold: ['font-semibold']\n },\n family: {\n body: ['font-body'],\n display: ['font-display'],\n mono: ['font-mono']\n }\n },\n defaultVariants: {\n size: 'md',\n family: 'body'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport type TextProps = Override<\n React.ComponentProps<typeof Text>,\n {\n as?:\n | 'blockquote'\n | 'caption'\n | 'dd'\n | 'dt'\n | 'figcaption'\n | 'li'\n | 'p'\n | 'span'\n | 'legend'\n | React.ComponentType\n | React.ElementType\n }\n>\n","import { Danger, Info, OkCircle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Icon } from '../../icon/Icon'\n\nexport type AlertDialogTheme = 'info' | 'warning' | 'danger' | 'success'\n\nconst StyledIcon = styled(Icon, {\n base: ['self-start'],\n variants: {\n theme: {\n info: ['text-info'],\n warning: ['text-warning-mid'],\n danger: ['rotate-180', 'text-danger'],\n success: ['text-success']\n }\n }\n})\n\nconst iconMap: Record<\n AlertDialogTheme,\n React.FC<React.SVGProps<SVGSVGElement>>\n> = {\n info: Info,\n warning: Danger,\n danger: Info,\n success: OkCircle\n}\n\nexport const AlertDialogIcon = ({ theme }: { theme: AlertDialogTheme }) => (\n <StyledIcon theme={theme} is={iconMap[theme]} />\n)\n","import * as React from 'react'\n\nimport { Button } from '../../button/Button'\nimport { Heading } from '../../heading/Heading'\nimport { Text } from '../../text/Text'\nimport { AlertDialog } from '../AlertDialog'\nimport { AlertDialogIcon } from './AlertDialogIcon'\nimport type { alert } from './types'\n\ntype AlertDialogContentProps = React.ComponentProps<typeof AlertDialog> & {\n className?: string\n onClose: () => void\n} & alert\n\nexport const Alert = ({\n title,\n size,\n theme,\n description,\n onAction,\n cancelActionText,\n confirmActionText,\n onClose,\n confirmElement,\n cancelElement,\n ...rest\n}: AlertDialogContentProps) => (\n <AlertDialog defaultOpen>\n <AlertDialog.Content\n size={size}\n onEscapeKeyDown={(e) => e.preventDefault()}\n onCloseAutoFocus={onClose}\n {...rest}\n className=\"flex max-h-[90vh] flex-col gap-8\"\n >\n <div className=\"flex items-center gap-2\">\n {theme && <AlertDialogIcon theme={theme} />}\n <Heading as={AlertDialog.Title} size=\"sm\" className=\"mr-4\">\n {title}\n </Heading>\n </div>\n {description && (\n <Text as={AlertDialog.Description} className=\"flex overflow-y-auto\">\n {description}\n </Text>\n )}\n <div className=\"flex flex-wrap justify-end gap-2\">\n <AlertDialog.Cancel asChild>\n {cancelElement ||\n (cancelActionText && (\n <Button\n size=\"sm\"\n appearance=\"outline\"\n onClick={() => onAction?.(false)}\n >\n {cancelActionText}\n </Button>\n ))}\n </AlertDialog.Cancel>\n <AlertDialog.Action asChild>\n {confirmElement || (\n <Button size=\"sm\" onClick={() => onAction?.(true)}>\n {confirmActionText}\n </Button>\n )}\n </AlertDialog.Action>\n </div>\n </AlertDialog.Content>\n </AlertDialog>\n)\n","import type { alert } from './types'\n\ntype State = alert[]\ntype Action =\n | { type: 'ADD'; payload: alert }\n | { type: 'REMOVE'; payload: string }\n\nexport const initialState = []\n\n// Reducers must be pure — ids are minted by the caller (showAlert) before\n// dispatch; minted here they would diverge under StrictMode's double-invoke.\nexport const reducer = (state: State, action: Action): alert[] => {\n switch (action.type) {\n case 'ADD':\n return [...state, action.payload]\n case 'REMOVE':\n return state.filter(({ id }) => id !== action.payload)\n default:\n return state\n }\n}\n","import * as React from 'react'\n\nimport { useIsMountedRef } from '../../utilities/hooks/useIsMountedRef'\nimport { Alert } from './alert-context/AlertDialog'\nimport { initialState, reducer } from './alert-context/reducer'\nimport type { alert } from './alert-context/types'\n\ntype context = {\n showAlert: (data: alert) => void\n}\n\n// undefined default so useAlert's missing-provider guard can fire — a default\n// object would make showAlert outside a provider a silent no-op.\nconst AlertContext = React.createContext<context | undefined>(undefined)\n\nexport const AlertProvider = ({\n children\n}: React.PropsWithChildren<unknown>) => {\n const [alerts, dispatch] = React.useReducer(reducer, initialState)\n const isMountedRef = useIsMountedRef()\n\n // dispatch is stable, so the provider value never needs to change identity.\n const value = React.useMemo<context>(\n () => ({\n showAlert: (content: alert) =>\n dispatch({\n // The id is minted here, not in the reducer — reducers must stay\n // pure (StrictMode double-invokes them). crypto.randomUUID requires\n // a secure context, which consumers of this library always have.\n payload: { ...content, id: crypto.randomUUID() },\n type: 'ADD'\n })\n }),\n []\n )\n\n return (\n <AlertContext value={value}>\n {Boolean(alerts.length) && (\n <Alert\n {...alerts[0]}\n key={alerts[0].id}\n onClose={() => {\n if (isMountedRef.current)\n dispatch({\n payload: alerts[0].id,\n type: 'REMOVE'\n })\n }}\n />\n )}\n {children}\n </AlertContext>\n )\n}\n\nexport const useAlert = (): context => {\n const context = React.use(AlertContext)\n\n if (context === undefined) {\n throw new Error('useAlert must be used within a AlertProvider')\n }\n\n return context\n}\n","import { AlertProvider } from './AlertDialog.context'\n\n// The alert system's provider lives under the `Alert` name; the alert UI\n// itself is imperative (`useAlert`), so there is no root component to render.\n// This compound must live in its own module, not the components barrel — a\n// value declared in the barrel forces the root barrel's `export *` to pull the\n// whole barrel (all components) into the eager entry chunk instead of resolving\n// each export to its individual module.\nexport const Alert = { Provider: AlertProvider }\n","import * as React from 'react'\n\nexport type AvatarRootContextValue = {\n name?: string\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'\n}\n\nexport const AvatarRootContext = React.createContext<AvatarRootContextValue>({\n name: undefined,\n size: 'lg'\n})\n","/*\n * Utility function to allow for overriding responsive variants using logic provided via the `overrideFunction` argument.\n *\n * It was developed out of a design requirement to override and pass through size properties to the <Icon /> component; depending\n * on the size of its parent component. It could be used for various other props where we want to tweak the value but\n * maintain the flexibility of a stitches variant property (which allows for use either via a string or a breakpoint object)\n * Documentation on stitches responsive variants: https://stitches.dev/docs/breakpoints#responsive-variants\n *\n */\nexport const overrideStyledVariantValue = (\n prop: any,\n overrideFunction: (any) => any\n) => {\n let overrideValue\n switch (typeof prop) {\n case 'object':\n overrideValue = {}\n Object.keys(prop).forEach((breakpoint) => {\n const propAtBreakpoint = prop[breakpoint]\n overrideValue[breakpoint] = propAtBreakpoint\n ? overrideFunction(propAtBreakpoint)\n : propAtBreakpoint\n })\n break\n default:\n overrideValue = overrideFunction(prop)\n }\n\n return overrideValue\n}\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Icon } from '../icon/Icon'\nimport { AvatarRootContext } from './Avatar.context'\n\nconst toIconSize = {\n xs: 'sm',\n sm: 'sm',\n md: 'md',\n lg: 'md',\n xl: 'lg',\n xxl: 'lg'\n}\n\ntype AvatarIcon = {\n is: React.FC<React.SVGProps<SVGSVGElement>>\n}\n\nexport const AvatarIcon = ({ is }: AvatarIcon) => {\n const rootContext = React.use(AvatarRootContext)\n const { size } = rootContext\n const iconSize = overrideStyledVariantValue(size, (s) => toIconSize[s])\n\n return <Icon size={iconSize} is={is} />\n}\n","import * as React from 'react'\n\nimport { type PolymorphicComponent, styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\n\nexport const StyledLink = styled(\n 'a',\n {\n base: [\n 'bg-[unset]',\n 'text-primary-800',\n 'cursor-pointer',\n 'font-body',\n 'no-underline',\n 'focus:text-primary-900',\n 'focus:underline',\n 'hover:text-primary-900',\n 'hover:underline',\n 'active:text-primary-1000',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:after:content-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:before:content-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:text-[100%]/none'\n ],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]']\n },\n noCapsize: {\n true: ['capsize-none']\n }\n },\n defaultVariants: {\n size: 'md'\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype LinkCustomProps = {\n disabled?: boolean\n reloadDocument?: boolean\n}\n\ntype LinkProps = Override<\n React.ComponentProps<typeof StyledLink>,\n LinkCustomProps & { as?: React.ElementType }\n>\n\n// Re-expose StyledLink's variant props merged with our own, so the public\n// polymorphic type re-checks props against whatever `as` target is passed\ntype StyledLinkOwnProps =\n typeof StyledLink extends PolymorphicComponent<\n infer _Element extends React.ElementType,\n infer OwnProps\n >\n ? OwnProps\n : never\n\ntype LinkOwnProps = Override<StyledLinkOwnProps, LinkCustomProps>\n\nexport const Link = (({\n ref,\n as,\n disabled,\n href,\n reloadDocument,\n ...rest\n}: LinkProps) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n\n return (\n <StyledLink\n as={as || routerLinkProps.as || (!href ? 'button' : undefined)}\n noCapsize={!href ? true : undefined}\n href={href}\n {...(disabled && { disabled: true })}\n {...rest}\n {...getExternalAnchorProps(href)}\n ref={ref}\n />\n )\n}) as PolymorphicComponent<'a', LinkOwnProps>\n","import { Close, Info } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Link } from '../link/Link'\n\nexport type ImageCreditProps = {\n /** Creator name, shown once the credit is revealed. */\n author: string\n /** Link to the author / image source. */\n sourceUrl?: string\n /** Human-readable license name, e.g. \"CC BY 4.0\". */\n licenseName?: string\n /** Link to the license terms. */\n licenseUrl?: string\n}\n\n// Shared surface/interaction styles for the controls overlaid on the image.\nconst overlayControlClasses = [\n 'not-disabled:hover:bg-black/75',\n 'focus:outline-none',\n 'focus-visible:ring-2',\n 'focus-visible:ring-white/70'\n]\nconst overlayLinkClasses = [\n 'text-white',\n 'underline-offset-2',\n 'hover:text-white',\n 'focus:text-white',\n 'active:text-white'\n]\n\nexport const ImageCredit = ({\n author,\n sourceUrl,\n licenseName,\n licenseUrl\n}: ImageCreditProps) => {\n const [expanded, setExpanded] = React.useState(false)\n\n if (!expanded) {\n return (\n <ActionIcon\n label=\"Show image credit\"\n theme=\"white\"\n isRounded\n hasTooltip={false}\n onClick={() => setExpanded(true)}\n className={cn(\n 'absolute',\n 'right-2',\n 'bottom-2',\n 'bg-black/60',\n 'backdrop-blur-sm',\n overlayControlClasses\n )}\n >\n <Icon is={Info} />\n </ActionIcon>\n )\n }\n\n return (\n <div\n className={cn(\n 'absolute',\n 'right-2',\n 'bottom-2',\n 'flex',\n 'max-w-[calc(100%-1rem)]',\n 'items-center',\n 'gap-1',\n 'rounded-md',\n 'bg-black/60',\n 'pl-2',\n 'text-xs',\n 'text-white',\n 'backdrop-blur-sm'\n )}\n >\n {/* Author and licence sit on one line when they fit, and wrap onto\n separate rows (each kept whole) when they don't. */}\n <figcaption className=\"flex min-w-0 flex-wrap items-center gap-x-1\">\n {sourceUrl ? (\n <Link href={sourceUrl} size=\"xs\" className={cn(overlayLinkClasses)}>\n {author}\n </Link>\n ) : (\n <span>{author}</span>\n )}\n {licenseName ? (\n <span className=\"flex items-center gap-x-1\">\n <span aria-hidden=\"true\">·</span>\n {licenseUrl ? (\n <Link\n href={licenseUrl}\n size=\"xs\"\n className={cn(overlayLinkClasses)}\n >\n {licenseName}\n </Link>\n ) : (\n <span>{licenseName}</span>\n )}\n </span>\n ) : null}\n </figcaption>\n <ActionIcon\n label=\"Hide credit\"\n theme=\"white\"\n isRounded\n hasTooltip={false}\n onClick={() => setExpanded(false)}\n className={cn(overlayControlClasses)}\n >\n <Icon is={Close} />\n </ActionIcon>\n </div>\n )\n}\n\nImageCredit.displayName = 'Image.Credit'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { ImageCredit } from './ImageCredit'\n\n// default styling lifted from https://www.zachleat.com/web/fluid-images/#copy-and-paste\n// (potentially unnecessary now we've moved to Tailwind)\nexport const StyledImage = styled(\n 'img',\n {\n base: ['align-middle', 'max-w-full'],\n variants: {\n fluid: {\n true: [\n \"[[src$='.svg']]:h-auto\",\n \"[[src$='.svg']]:max-w-none\",\n \"[[src$='.svg']]:w-full\",\n '[[width]]:[[height]]:h-auto',\n '[[width]]:w-auto'\n ]\n }\n }\n },\n { enablePolymorphism: false }\n)\n\ntype ImageProps = Override<\n React.ComponentProps<typeof StyledImage>,\n { children?: React.ReactNode }\n>\n\nconst ImageComponent = ({ children, ref, ...props }: ImageProps) => {\n if (!children) {\n return <StyledImage {...props} ref={ref} />\n }\n\n return (\n <figure className=\"relative overflow-hidden\">\n <StyledImage {...props} ref={ref} />\n {children}\n </figure>\n )\n}\n\nexport const Image = /* @__PURE__ */ Object.assign(ImageComponent, {\n Credit: ImageCredit,\n displayName: 'Image'\n})\n","import { User } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const AvatarPlaceholder = () => (\n <div className=\"relative size-full\">\n <Icon is={User} className=\"size-full\" />\n </div>\n)\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Text } from '../text/Text'\nimport { AvatarRootContext } from './Avatar.context'\nimport { AvatarPlaceholder } from './AvatarPlaceholder'\n\nconst toTextSize = {\n xs: 'xs',\n sm: 'sm',\n md: 'sm',\n lg: 'md',\n xl: 'md',\n xxl: 'lg'\n}\n\nexport const AvatarInitial = () => {\n const rootContext = React.use(AvatarRootContext)\n const { name, size } = rootContext\n const textSize = overrideStyledVariantValue(size, (s) => toTextSize[s])\n\n if (!name) {\n return <AvatarPlaceholder />\n }\n\n return (\n <Text size={textSize} className=\"text-grey-800\">\n {name[0].toUpperCase()}\n </Text>\n )\n}\n","import * as React from 'react'\n\nimport { Image } from '../image/Image'\nimport { AvatarInitial } from './AvatarInitial'\n\nexport const AvatarImage = ({ src, alt }: { src: string; alt: string }) => {\n if (!src) {\n return <AvatarInitial />\n }\n\n return <Image className=\"size-full object-cover\" src={src} alt={alt} />\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport type { AvatarRootContextValue } from './Avatar.context'\nimport { AvatarRootContext } from './Avatar.context'\nimport { AvatarIcon } from './AvatarIcon'\nimport { AvatarImage } from './AvatarImage'\nimport { AvatarInitial } from './AvatarInitial'\nimport { AvatarPlaceholder } from './AvatarPlaceholder'\n\nconst avatarRootStyles = [\n 'flex',\n 'justify-center',\n 'items-center',\n 'text-grey-800',\n 'rounded-full',\n 'border-2',\n 'border-grey-200',\n 'bg-(--bg-color)',\n 'overflow-hidden'\n]\n\nconst StyledDiv = /* @__PURE__ */ styled('div', {\n base: avatarRootStyles,\n variants: {\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12'],\n xl: ['size-16'],\n xxl: ['size-24']\n },\n emphasis: {\n bold: ['border-0', '[&>p]:text-white'],\n subtle: ['border-0'],\n white: []\n }\n }\n})\n\nconst StyledButton = /* @__PURE__ */ styled('button', {\n base: [\n ...avatarRootStyles,\n 'not-disabled:active:bg-grey-200',\n 'not-disabled:active:border-primary-800',\n 'not-disabled:hover:bg-grey-100',\n 'not-disabled:hover:border-grey-800',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12'],\n xl: ['size-16'],\n xxl: ['size-24']\n },\n emphasis: {\n bold: ['border-0', '[&>p]:text-white'],\n subtle: ['border-0'],\n white: []\n }\n }\n})\n\ntype AvatarProps = React.ComponentProps<\n typeof StyledDiv | typeof StyledButton\n> & {\n name?: string\n} & (\n | {\n onClick: React.MouseEventHandler<HTMLButtonElement>\n disabled?: boolean\n }\n | { onClick?: never; disabled?: never }\n )\n\nexport { AvatarRootContext }\nexport type { AvatarRootContextValue }\n\nexport const AvatarRootProvider = ({ children, name, size }: AvatarProps) => {\n const value = React.useMemo<AvatarRootContextValue>(\n () => ({ name, size }),\n [name, size]\n )\n\n return <AvatarRootContext value={value}>{children}</AvatarRootContext>\n}\n\nconst DS_COLORS = [\n 'maroon',\n 'red',\n 'magenta',\n 'pink',\n 'purple',\n 'lapis',\n 'blue',\n 'cyan',\n 'teal',\n 'green',\n 'lime',\n 'yellow',\n 'orange'\n] as const\n\nconst getBackgroundColor = ({\n emphasis,\n name\n}: Pick<AvatarProps, 'emphasis' | 'name'>) => {\n if (emphasis === 'white' || !name) return 'white'\n const index = name.toLocaleUpperCase().charCodeAt(0) % DS_COLORS.length\n return `var(--color-${DS_COLORS[index]}-${emphasis === 'bold' ? 700 : 300})`\n}\n\nexport const AvatarRoot = ({\n children,\n size = 'lg',\n name,\n emphasis = 'white',\n disabled = false,\n onClick\n}: AvatarProps) => {\n const backgroundColor = getBackgroundColor({ emphasis, name })\n return (\n <AvatarRootProvider name={name} size={size}>\n {onClick ? (\n <StyledButton\n size={size}\n style={{\n '--bg-color': backgroundColor\n }}\n disabled={disabled}\n onClick={disabled ? undefined : onClick}\n className={cn(disabled ? 'cursor-auto' : 'cursor-pointer')}\n emphasis={emphasis}\n >\n {children}\n </StyledButton>\n ) : (\n <StyledDiv\n size={size}\n style={{\n '--bg-color': backgroundColor\n }}\n emphasis={emphasis}\n >\n {children}\n </StyledDiv>\n )}\n </AvatarRootProvider>\n )\n}\n\nexport const Avatar = /* @__PURE__ */ Object.assign(AvatarRoot, {\n Image: AvatarImage,\n Initial: AvatarInitial,\n Placeholder: AvatarPlaceholder,\n Icon: AvatarIcon\n})\n\nAvatarRoot.displayName = 'Avatar'\n","import * as React from 'react'\n\nexport const useCallbackRef: () => [\n React.RefObject<HTMLElement | null>,\n (el: HTMLElement | null) => void | (() => void)\n] = () => {\n const elRef = React.useRef<HTMLElement | null>(null)\n\n // React 19 ref-callback cleanup: the ref must be cleared on detach, or it\n // retains the unmounted DOM node — stale reads and a memory leak.\n const setElRefCallback = React.useCallback((el: HTMLElement | null) => {\n elRef.current = el\n return () => {\n elRef.current = null\n }\n }, [])\n\n return [elRef, setElRefCallback]\n}\n\nexport const useCallbackRefState: () => [\n HTMLElement | null,\n (el: HTMLElement | null) => void\n] = () => {\n const [elRef, setElRef] = React.useState<HTMLElement | null>(null)\n const hasElement = React.useRef(false)\n\n const setElRefCallback = React.useCallback((el: HTMLElement | null) => {\n // Commit the attached node to state exactly once — the first time one\n // becomes available — and never again. Under React 19 concurrent rendering\n // with heavy CPU contention, renders get interrupted and re-run, so the DOM\n // node attached via the callback ref churns: React commits and replaces the\n // node, firing this callback with a fresh identity each time. The previous\n // `prev === el ? prev : el` guard couldn't catch that — a new identity is\n // never `=== prev` — so every churn scheduled another render, which churned\n // the node again: an unbounded \"Maximum update depth exceeded\" loop.\n //\n // A one-shot setState makes the returned element reference stable and the\n // loop structurally impossible (later invocations are no-ops). All consumers\n // attach this to a single, always-mounted element, so the first node is the\n // node — there is no element swap to miss.\n //\n // NOTE: re-verified against React 19 ref-callback cleanups (2026-07): a\n // cleanup-based attach/detach setState rewrite still loops — the regression\n // test in useCallbackRef.test.tsx fails with \"Maximum update depth\n // exceeded\". Cleanups don't help when every render mints a new node.\n if (el && !hasElement.current) {\n hasElement.current = true\n setElRef(el)\n }\n }, [])\n\n return [elRef, setElRefCallback]\n}\n","/*\n\t•\tFactory for non-semantic color schemes\n*/\nconst createScheme = (c: string, overrides: Record<string, string> = {}) => ({\n '--text-subtle': `var(--color-${c}-1000)`,\n '--background-subtle': `var(--color-${c}-200)`,\n '--text-subtle-hover': `var(--color-${c}-1100)`,\n '--background-subtle-hover': `var(--color-${c}-300)`,\n '--text-bold': 'white',\n '--background-bold': `var(--color-${c}-800)`,\n '--background-bold-hover': `var(--color-${c}-900)`,\n '--text-on-white': `var(--color-${c}-800)`,\n ...overrides\n})\n\n/*\n\t•\tSemantic themes\n*/\nconst info = {\n '--text-subtle': 'var(--color-info-mid)',\n '--background-subtle': 'var(--color-info-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-info)',\n '--text-on-white': 'var(--color-info)'\n}\nconst neutral = {\n '--text-subtle': 'var(--color-grey-900)',\n '--background-subtle': 'var(--color-grey-100)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-grey-800)',\n '--text-on-white': 'var(--color-grey-800)'\n}\nconst success = {\n '--text-subtle': 'var(--color-success-mid)',\n '--background-subtle': 'var(--color-success-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-success)',\n '--text-on-white': 'var(--color-success)'\n}\nconst danger = {\n '--text-subtle': 'var(--color-danger-mid)',\n '--background-subtle': 'var(--color-danger-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-danger)',\n '--text-on-white': 'var(--color-danger)'\n}\nconst warning = {\n '--text-subtle': 'var(--color-warning-text)',\n '--background-subtle': 'var(--color-warning-light)',\n '--text-bold': 'var(--color-grey-1000)',\n '--background-bold': 'var(--color-warning)',\n '--text-on-white': 'var(--color-warning)'\n}\n\n/*\n\t•\tNon-semantic themes\n*/\nexport const badgeSemanticNames = [\n 'info',\n 'neutral',\n 'success',\n 'danger',\n 'warning'\n]\nexport const colorSchemes = {\n info,\n neutral,\n success,\n danger,\n warning,\n primary: createScheme('primary'),\n grey: createScheme('grey'),\n blue: createScheme('blue'),\n pink: createScheme('pink'),\n purple: createScheme('purple', {\n '--text-on-white': 'var(--color-purple-700)'\n }),\n cyan: createScheme('cyan'),\n green: createScheme('green'),\n magenta: createScheme('magenta'),\n red: createScheme('red', {\n '--background-subtle-hover': 'var(--color-red-400)'\n }),\n teal: createScheme('teal'),\n orange: createScheme('orange', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-orange-600)',\n '--background-bold-hover': 'var(--color-orange-700)',\n '--text-on-white': 'var(--color-orange-1000)'\n }),\n yellow: createScheme('yellow', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-yellow-500)',\n '--background-bold-hover': 'var(--color-yellow-600)',\n '--text-on-white': 'var(--color-yellow-900)'\n }),\n lime: createScheme('lime', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-lime-600)',\n '--background-bold-hover': 'var(--color-lime-700)',\n '--text-on-white': 'var(--color-lime-900)'\n }),\n lapis: createScheme('lapis', {\n '--background-bold': 'var(--color-lapis-700)',\n '--text-on-white': 'var(--color-lapis-700)'\n }),\n maroon: createScheme('maroon', {\n '--text-on-white': 'var(--color-maroon-700)'\n }),\n marsh: createScheme('marsh', { '--text-on-white': 'var(--color-marsh-700)' })\n}\n","import * as React from 'react'\n\nimport type { BadgeProps } from './Badge'\nimport type { BadgeOverflow } from './Badge.types'\n\ntype BadgeProviderProps = {\n size?: BadgeProps['size']\n overflow?: BadgeOverflow\n}\n\ntype BadgeContext = BadgeProviderProps & {\n isOverflowing?: boolean\n setIsOverflowing?: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nexport const BadgeContext = React.createContext<BadgeContext>({})\n\nexport const BadgeProvider = ({\n size,\n overflow,\n children\n}: React.PropsWithChildren<BadgeProviderProps>) => {\n const [isOverflowing, setIsOverflowing] = React.useState(false)\n\n const value = React.useMemo<BadgeContext>(\n () => ({ size, overflow, isOverflowing, setIsOverflowing }),\n [size, overflow, isOverflowing, setIsOverflowing]\n )\n return <BadgeContext value={value}>{children}</BadgeContext>\n}\n","import * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const BadgeIcon = (props: React.ComponentProps<typeof Icon>) => (\n <Icon size=\"sm\" {...props} />\n)\n","import * as React from 'react'\nimport { debounce } from 'throttle-debounce'\n\ntype UseResizeObserverOptions = {\n elements: (HTMLElement | undefined | null)[]\n onResize: (entries: ResizeObserverEntry[]) => void\n delay?: number\n}\n\ntype UseResizeObserverOutput = ResizeObserver | null\n\nconst createResizeObserver = (\n callback: (entries: ResizeObserverEntry[]) => void\n) => {\n try {\n return new ResizeObserver(callback)\n } catch {\n return null\n }\n}\n\nexport const useResizeObserver = ({\n delay = 500,\n elements,\n onResize\n}: UseResizeObserverOptions): UseResizeObserverOutput => {\n // Keep the latest `onResize` in a ref so the observer is only recreated when\n // `delay` changes. Otherwise a callback whose identity changes on render (e.g.\n // `useSize`'s `handleResize`, which depends on `element`) would recreate and\n // re-subscribe the observer, and `ResizeObserver` fires its initial callback\n // on every `observe()` — a measure → setState → re-render → re-subscribe loop\n // that surfaces as \"Maximum update depth exceeded\".\n const onResizeRef = React.useRef(onResize)\n React.useLayoutEffect(() => {\n onResizeRef.current = onResize\n })\n\n // The observer is an OS-backed resource, so it must be created inside an\n // effect — created during render it would leak whenever React discards a\n // render (StrictMode, interrupted renders). The debounced callback is\n // cancelled on cleanup so no trailing invocation fires after the observer\n // is gone.\n const [observer, setObserver] = React.useState<ResizeObserver | null>(null)\n\n React.useEffect(() => {\n const debouncedOnResize = debounce(\n delay,\n (entries: ResizeObserverEntry[]) => onResizeRef.current(entries)\n )\n const resizeObserver = createResizeObserver(debouncedOnResize)\n setObserver(resizeObserver)\n\n return () => {\n debouncedOnResize.cancel()\n resizeObserver?.disconnect()\n }\n }, [delay])\n\n React.useEffect(() => {\n if (!observer) return\n\n elements.forEach((element) => {\n if (element) observer.observe(element)\n })\n\n // `disconnect` drops every observation this effect registered in one call,\n // so the subscription can never outlive the effect (per-element `unobserve`\n // would leak any element whose ref changed between subscribe and cleanup).\n return () => observer.disconnect()\n }, [observer, elements])\n\n return observer\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { useResizeObserver } from '../../utilities/hooks/useResizeObserver'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Text } from '../text/Text'\nimport { BadgeContext } from './Badge.context'\n\n/*\n * Instead of sticking a resize observer on every `BadgeText`\n * regardless of overflow type, split the resize logic into a component.\n * Basically call the hook conditionally, only for the version with\n * the `overflow === 'ellipsis'` which needs it.\n * This saves us from initialising a resize observer for any badge which doesn't need it.\n */\nconst ObserveBadgeTextOverflow: React.FC<{ elRef: HTMLElement | null }> = ({\n elRef\n}) => {\n const { setIsOverflowing } = React.use(BadgeContext)\n\n // `elements` feeds the observe effect's dependency array, so it must keep a\n // stable identity across renders — a fresh `[elRef]` literal would re-subscribe\n // the observer every render.\n const elements = React.useMemo(() => [elRef], [elRef])\n\n useResizeObserver({\n delay: 0,\n elements,\n onResize: () => {\n if (!elRef?.scrollWidth || !elRef?.clientWidth) return\n setIsOverflowing?.(elRef.scrollWidth > elRef.clientWidth)\n }\n })\n\n return null\n}\n\nconst StyledBadgeText = styled(Text, {\n base: ['py-0.5', 'capsize-none'],\n variants: {\n overflow: {\n ellipsis: ['overflow-x-hidden', 'text-ellipsis', 'whitespace-nowrap'],\n wrap: ['whitespace-normal']\n }\n }\n})\n\ntype BadgeTextProps = React.ComponentProps<typeof StyledBadgeText>\n\nconst toTextSize = {\n xs: 'sm',\n sm: 'md',\n md: 'md'\n}\n\nexport const BadgeText = ({ children, ...rest }: BadgeTextProps) => {\n // We need the return type here. Otherwise typsecript breaks when this type is used in Badge. Do not remove unless you want to tackle that issue again.\n const { size: badgeSize, overflow } = React.use(BadgeContext)\n\n const size = overrideStyledVariantValue(badgeSize, (s) => toTextSize[s])\n\n const [elRef, setElRef] = useCallbackRefState()\n\n return (\n <>\n {overflow === 'ellipsis' && <ObserveBadgeTextOverflow elRef={elRef} />}\n <StyledBadgeText size={size} overflow={overflow} ref={setElRef} {...rest}>\n {children}\n </StyledBadgeText>\n </>\n )\n}\n","import { useComposedRefs } from '@radix-ui/react-compose-refs'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { OptionalTooltipWrapper } from '../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\nimport { Icon } from '../icon/Icon'\nimport {\n badgeSemanticNames,\n colorSchemes as badgeColorSchemes\n} from './Badge.colorscheme.config'\nimport { BadgeContext, BadgeProvider } from './Badge.context'\nimport type { BadgeOverflow } from './Badge.types'\nimport { BadgeIcon } from './BadgeIcon'\nimport { BadgeText } from './BadgeText'\n\nconst StyledBadge = styled(\n 'div',\n {\n base: [\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'min-w-0',\n 'border',\n 'border-white',\n 'font-body',\n '*:not-last:mr-1'\n ],\n variants: {\n emphasis: {\n white: ['text-(--text-on-white)', 'bg-white'],\n subtle: ['text-(--text-subtle)', 'bg-(--background-subtle)'],\n bold: ['text-(--text-bold)', 'bg-(--background-bold)']\n },\n size: {\n xs: ['px-1', 'py-0'],\n sm: ['px-1', 'py-0.5'],\n md: ['px-2', 'py-1']\n },\n isClickable: {\n true: ['cursor-pointer']\n },\n highlighted: {\n true: []\n }\n },\n compoundVariants: [\n {\n isClickable: true,\n emphasis: 'white',\n class: [\n 'hover:text-(--text-on-white)',\n 'hover:bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n isClickable: true,\n emphasis: 'subtle',\n class: [\n 'hover:bg-(--background-subtle-hover)',\n 'hover:text-(--text-subtle-hover)'\n ]\n },\n {\n isClickable: true,\n emphasis: 'bold',\n class: [\n 'hover:bg-(--background-bold-hover)',\n 'hover:text-(--text-bold)'\n ]\n },\n {\n emphasis: 'white',\n highlighted: true,\n class: [\n 'text-(--text-on-white)',\n 'bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n emphasis: 'subtle',\n highlighted: true,\n class: ['text-(--text-subtle-hover)', '(--bg-background-subtle-hover)']\n },\n {\n emphasis: 'bold',\n highlighted: true,\n class: ['text-(--text-bold)', 'bg-(--background-bold-hover)']\n }\n ]\n },\n { enableResponsiveVariants: true }\n)\n\nexport type BadgeProps = React.ComponentProps<typeof StyledBadge> & {\n theme?: keyof typeof badgeColorSchemes\n overflow?: BadgeOverflow\n}\n\ntype BadgeInnerProps = Omit<BadgeProps, 'size' | 'overflow'>\n\nconst BadgeInner = ({\n ref,\n theme = 'info',\n emphasis = 'subtle',\n children,\n style,\n ...rest\n}: BadgeInnerProps) => {\n const { size, overflow, isOverflowing } = React.use(BadgeContext)\n const [badgeElRef, setBadgeElRef] = useCallbackRefState()\n const composedBadgeRef = useComposedRefs(\n ref as React.Ref<HTMLElement>,\n setBadgeElRef\n )\n\n const label = badgeElRef?.textContent\n\n const isInfoOnly = badgeSemanticNames.includes(theme)\n\n const isClickable =\n Object.keys(rest).includes('onClick') || Object.keys(rest).includes('href')\n\n return (\n <OptionalTooltipWrapper\n hasTooltip={overflow === 'ellipsis' && isOverflowing}\n label={label}\n >\n <StyledBadge\n role=\"status\"\n emphasis={emphasis}\n size={size}\n style={{\n ...badgeColorSchemes[theme],\n ...style\n }}\n {...rest}\n ref={composedBadgeRef}\n isClickable={isClickable && !isInfoOnly}\n >\n {React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <BadgeText>{child}</BadgeText>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n return <BadgeIcon {...iconProps} />\n }\n return child\n })}\n </StyledBadge>\n </OptionalTooltipWrapper>\n )\n}\n\nconst BadgeComponent = ({\n ref,\n size = 'sm',\n overflow = 'wrap',\n ...rest\n}: BadgeProps) => (\n <BadgeProvider size={size} overflow={overflow}>\n <BadgeInner {...rest} ref={ref} />\n </BadgeProvider>\n)\n\nexport const Badge = /* @__PURE__ */ Object.assign(BadgeComponent, {\n Icon: BadgeIcon,\n Text: BadgeText\n})\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nexport interface DismissibleRootContextValue {\n disabled?: boolean\n isDismissed: boolean\n setIsDismissed: (boolean) => void\n onDismiss: () => void\n}\n\nexport const DismissibleRootContext =\n React.createContext<DismissibleRootContextValue>({\n isDismissed: false,\n setIsDismissed: () => undefined,\n onDismiss: () => undefined\n })\n\nexport interface DismissibleRootProps {\n disabled?: boolean\n dismissed?: boolean\n onDismiss?: () => void\n}\n\nexport const DismissibleRootProvider = ({\n dismissed: controlledIsDismissed,\n children,\n disabled,\n onDismiss = () => null\n}: React.PropsWithChildren<DismissibleRootProps>) => {\n const [isDismissed, setIsDismissed] = React.useState(false)\n\n const value = React.useMemo<DismissibleRootContextValue>(() => {\n const isControlled = typeof controlledIsDismissed === 'boolean'\n return {\n disabled,\n isDismissed: isControlled\n ? (controlledIsDismissed as boolean)\n : isDismissed,\n setIsDismissed: isControlled ? () => null : setIsDismissed,\n onDismiss\n }\n }, [disabled, isDismissed, onDismiss, controlledIsDismissed])\n\n return (\n <DismissibleRootContext value={value}>{children}</DismissibleRootContext>\n )\n}\n\nexport interface DismissibleRootInternalProps {\n asChild?: boolean\n}\n\nconst DismissibleRootInternal = ({\n asChild = false,\n ...rest\n}: React.PropsWithChildren<DismissibleRootInternalProps>) => {\n const rootContext = React.use(DismissibleRootContext)\n\n const { isDismissed, disabled } = rootContext\n\n if (isDismissed) return null\n\n const props = { ...(disabled && { [`data-disabled`]: '' }), ...rest }\n const Component = asChild ? Slot : 'div'\n return <Component {...props} />\n}\n\nexport const DismissibleRoot = ({\n disabled = false,\n dismissed,\n onDismiss,\n ...rest\n}: React.PropsWithChildren<\n DismissibleRootInternalProps & DismissibleRootProps\n>) => (\n <DismissibleRootProvider\n dismissed={dismissed}\n disabled={disabled}\n onDismiss={onDismiss}\n >\n <DismissibleRootInternal {...rest} />\n </DismissibleRootProvider>\n)\n\nDismissibleRoot.displayName = 'Dismissible'\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { DismissibleRootContext } from './DismissibleRoot'\n\nexport interface DismissibleTriggerProps {\n asChild?: boolean\n}\n\nconst DefaultTrigger = (props) => (\n <button type=\"button\" {...props}>\n Dismiss\n </button>\n)\n\nexport const DismissibleTrigger = ({\n asChild = false,\n ...rest\n}: React.PropsWithChildren<DismissibleTriggerProps>) => {\n const context = React.use(DismissibleRootContext)\n if (context === undefined) {\n throw new Error(\n 'Dismissible.Trigger can only be used within a Dismissible.Item'\n )\n }\n\n const { setIsDismissed, disabled, onDismiss } = context\n\n const handleDismiss = () => {\n setIsDismissed(true)\n onDismiss?.()\n }\n\n const props = {\n disabled: disabled,\n onClick: handleDismiss,\n ...rest\n }\n\n const Component = asChild ? Slot : DefaultTrigger\n return <Component {...props} />\n}\n","import { DismissibleRoot } from './DismissibleRoot'\nimport { DismissibleTrigger } from './DismissibleTrigger'\n\nexport const Dismissible = /* @__PURE__ */ Object.assign(DismissibleRoot, {\n Trigger: DismissibleTrigger\n})\n","import * as React from 'react'\n\nimport type { BannerContainerProps } from './BannerContainer'\n\ntype Breakpoint = '@initial' | '@sm' | '@md' | '@lg' | '@xl'\ntype ResponsiveSize = 'sm' | 'md' | Partial<Record<Breakpoint, 'sm' | 'md'>>\n\n// Extract size and emphasis props, preserving responsive variant types\nexport type BannerProviderProps = {\n size?: ResponsiveSize\n emphasis?: BannerContainerProps['emphasis']\n}\n\ntype BannerContextValue = BannerProviderProps & {\n hasDismiss: boolean\n setHasDismiss: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nexport const BannerContext = React.createContext<BannerContextValue>({\n emphasis: 'minimal',\n size: {\n '@initial': 'sm',\n '@md': 'md'\n },\n hasDismiss: false,\n setHasDismiss: () => null\n})\n\nexport const useBannerContext = (): BannerContextValue => {\n const context = React.use(BannerContext)\n\n if (context === undefined) {\n throw new Error('useBannerContext must be used within a BannerProvider')\n }\n\n return context\n}\n\nexport const BannerProvider = ({\n emphasis = 'minimal',\n size = {\n '@initial': 'sm',\n '@md': 'md'\n },\n children\n}: React.PropsWithChildren<BannerProviderProps>) => {\n const [hasDismiss, setHasDismiss] = React.useState(false)\n const value = React.useMemo<BannerContextValue>(\n () => ({ emphasis, size, hasDismiss, setHasDismiss }),\n [emphasis, size, hasDismiss, setHasDismiss]\n )\n return <BannerContext value={value}>{children}</BannerContext>\n}\n\nBannerProvider.displayName = 'Banner'\n","import { Dismissible } from '../dismissible'\nimport { BannerProvider } from './Banner.context'\n\nexport const Banner = /* @__PURE__ */ Object.assign(BannerProvider, {\n Dismiss: Dismissible.Trigger\n})\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '../../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport type { Override } from '../../../utilities/types'\nimport { Button } from '../../button/Button'\nimport { useBannerContext } from '../Banner.context'\n\nexport const BannerRegularButton = (\n props: Override<\n React.ComponentProps<typeof Button>,\n { as?: React.ElementType }\n >\n) => {\n const { emphasis, size } = useBannerContext()\n\n const fullWidth = overrideStyledVariantValue(size, (s) => s === 'sm')\n\n return (\n <Button\n size={size}\n fullWidth={fullWidth}\n theme={emphasis === 'bold' ? 'neutral' : 'primary'}\n {...props}\n />\n )\n}\n\nBannerRegularButton.displayName = 'BannerRegularButton'\n","import * as React from 'react'\nimport invariant from 'tiny-invariant'\n\nimport { cn } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\nimport { BannerRegularButton } from './BannerRegularButton'\n\nconst MAX_ALLOWED_CHILDREN = 2\n\nconst toGap = {\n sm: 'gap-2',\n md: 'gap-4'\n}\n\nconst toDirection = {\n sm: 'flex-col',\n md: 'flex-row'\n}\n\nexport const BannerRegularActions = ({\n children,\n className,\n ...rest\n}: React.PropsWithChildren<React.ComponentProps<'div'>>) => {\n const { size } = useBannerContext()\n\n const gap = typeof size === 'string' ? toGap[size] : 'gap-2 md:gap-4'\n\n const direction =\n typeof size === 'string' ? toDirection[size] : 'flex-col md:flex-row'\n\n invariant(\n React.Children.count(children) <= MAX_ALLOWED_CHILDREN,\n `A maximum of ${MAX_ALLOWED_CHILDREN} ${BannerRegularButton.displayName} component(s) are permitted as children of ${BannerRegularActions.displayName}`\n )\n\n return (\n <div className={cn('flex', gap, direction, className)} {...rest}>\n {React.Children.map(children, (child, index) => {\n // if child is undefined or null, React.isValidElement returns false and hence error is thrown.\n // This line will prevent that from happening\n if (child == null) return child\n\n if (!React.isValidElement(child)) {\n throw new Error(\n `Child passed to ${BannerRegularActions.displayName} is not a valid element`\n )\n }\n\n invariant(\n child.type === BannerRegularButton,\n `Children of type ${child?.type} aren't permitted. Only an ${BannerRegularButton.displayName} component is allowed in ${BannerRegularActions.displayName}`\n )\n\n const propsToInject: Partial<\n React.ComponentProps<typeof BannerRegularButton>\n > = {\n // Override button appearance - make the second button outlined\n appearance: index > 0 ? 'outline' : undefined\n }\n\n return React.cloneElement(\n child as React.ReactElement<\n React.ComponentProps<typeof BannerRegularButton>\n >,\n propsToInject\n )\n })}\n </div>\n )\n}\n\nBannerRegularActions.displayName = 'BannerRegularActions'\n","import * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { Dismissible } from '../dismissible'\nimport { useBannerContext } from './Banner.context'\n\nconst StyledBannerContainer = styled(\n 'section',\n {\n base: [\n 'flex',\n 'relative',\n 'w-full',\n 'rounded-lg',\n 'overflow-hidden',\n 'text-(--foreground)',\n '[--banner-heading-color:var(--color-foreground)]',\n '[--banner-text-color:var(--color-grey-900)]'\n ],\n variants: {\n emphasis: {\n bold: [\n '[--banner-heading-color:var(--color-foreground-7-plus)]',\n '[--banner-text-color:var(--color-grey-100)]',\n 'bg-(--base-11)',\n 'text-(--foreground-7-plus)'\n ],\n subtle: ['bg-(--base-3)'],\n minimal: ['bg-(--base-1)']\n },\n size: {\n sm: [],\n md: []\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport type BannerContainerProps = React.ComponentProps<\n typeof StyledBannerContainer\n> & {\n colorScheme?: TcolorScheme\n} & React.ComponentProps<typeof Dismissible>\n\nexport const BannerContainer = ({\n colorScheme = {},\n onDismiss,\n dismissed,\n ...rest\n}: BannerContainerProps) => {\n const { emphasis } = useBannerContext()\n\n return (\n <ColorScheme {...colorScheme} asChild>\n <Dismissible asChild onDismiss={onDismiss} dismissed={dismissed}>\n {/* Explicit role keeps the banner landmark regardless of where the\n banner is nested, which a native <header> would only expose at the\n top level. */}\n {/* eslint-disable-next-line jsx-a11y/prefer-tag-over-role */}\n <StyledBannerContainer role=\"banner\" emphasis={emphasis} {...rest} />\n </Dismissible>\n </ColorScheme>\n )\n}\n","import * as React from 'react'\n\nimport { BannerContainer } from '../BannerContainer'\n\ntype BannerRegularContainerProps = Omit<\n React.ComponentProps<typeof BannerContainer>,\n 'direction' | 'align' | 'wrap' | 'gap' | 'justify'\n>\n\nexport const BannerRegularContainer = (props: BannerRegularContainerProps) => (\n <BannerContainer {...props} />\n)\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\n\nconst Container = styled(\n 'div',\n {\n base: ['w-31/50', 'grow'],\n variants: {\n size: {\n sm: ['p-4'],\n md: ['p-6', 'pr-8']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerRegularContent = (\n props: React.ComponentProps<typeof Container>\n) => {\n const { size } = useBannerContext()\n\n return <Container size={size} {...props} />\n}\n\nBannerRegularContent.displayName = 'BannerRegularContent'\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { overrideStyledVariantValue } from '../../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { ActionIcon } from '../../action-icon/ActionIcon'\nimport { Icon } from '../../icon/Icon'\nimport { Banner } from '../Banner'\nimport { useBannerContext } from '../Banner.context'\n\nconst toActionIconSize = {\n sm: 'md',\n md: 'sm'\n}\n\nconst StyledDismiss = styled(ActionIcon, {\n base: ['z-1', 'absolute', 'top-3', 'right-3']\n})\n\ntype BannerRegularDismissProps = Omit<\n React.ComponentProps<typeof StyledDismiss>,\n 'children' | 'onClick' | 'href'\n>\n\nexport const BannerRegularDismiss = ({\n label = 'dismiss',\n ...rest\n}: BannerRegularDismissProps) => {\n const { size, setHasDismiss } = useBannerContext()\n\n React.useEffect(() => {\n setHasDismiss(true)\n return () => {\n setHasDismiss(false)\n }\n }, [setHasDismiss])\n\n const actionIconSize = overrideStyledVariantValue(\n size,\n (s) => toActionIconSize[s]\n )\n\n return (\n <Banner.Dismiss asChild>\n <StyledDismiss\n label={label}\n size={actionIconSize}\n hasTooltip={false}\n isRounded\n theme=\"neutral\"\n appearance=\"solid\"\n {...rest}\n >\n <Icon is={Close} />\n </StyledDismiss>\n </Banner.Dismiss>\n )\n}\n\nBannerRegularDismiss.displayName = 'BannerRegularDismiss'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Heading } from '../../heading/Heading'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledHeading = styled(\n Heading,\n {\n base: ['mb-4', 'text-(--banner-heading-color)'],\n variants: {\n containerSize: {\n sm: [],\n md: []\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerRegularHeading = (\n props: React.ComponentPropsWithoutRef<typeof Heading>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledHeading\n size=\"md\"\n containerSize={size}\n hasDismiss={hasDismiss}\n {...props}\n />\n )\n}\n\nBannerRegularHeading.displayName = 'BannerRegularHeading'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Image } from '../../image/Image'\nimport { useBannerContext } from '../Banner.context'\n\nconst Container = styled(\n 'div',\n {\n base: ['relative', 'overflow-hidden', 'w-19/50'],\n variants: {\n size: {\n sm: ['hidden'],\n md: ['block']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst StyledImage = styled(Image, {\n base: ['absolute', 'max-w-none', 'size-full', 'object-cover']\n})\n\nexport const BannerRegularImage = (\n props: React.ComponentPropsWithoutRef<typeof Image>\n) => {\n const { size } = useBannerContext()\n\n return (\n <Container size={size}>\n <StyledImage {...props} />\n </Container>\n )\n}\n\nBannerRegularImage.displayName = 'BannerRegularImage'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Text } from '../../text/Text'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledText = styled(\n Text,\n {\n base: ['text-(--banner-text-color)'],\n variants: {\n containerSize: {\n sm: ['mb-4'],\n md: ['mb-6']\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerRegularText = (\n props: React.ComponentPropsWithoutRef<typeof Text>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledText\n size={size}\n containerSize={size}\n hasDismiss={hasDismiss}\n {...props}\n />\n )\n}\n\nBannerRegularText.displayName = 'BannerRegularText'\n","import * as React from 'react'\n\nimport { Banner } from '../Banner'\nimport { BannerRegularActions } from './BannerRegularActions'\nimport { BannerRegularButton } from './BannerRegularButton'\nimport { BannerRegularContainer } from './BannerRegularContainer'\nimport { BannerRegularContent } from './BannerRegularContent'\nimport { BannerRegularDismiss } from './BannerRegularDismiss'\nimport { BannerRegularHeading } from './BannerRegularHeading'\nimport { BannerRegularImage } from './BannerRegularImage'\nimport { BannerRegularText } from './BannerRegularText'\n\nconst BannerRegularComponent = ({\n colorScheme,\n size,\n emphasis,\n onDismiss,\n ...rest\n}: React.ComponentProps<typeof BannerRegularContainer>) => (\n <Banner size={size} emphasis={emphasis}>\n <BannerRegularContainer\n colorScheme={colorScheme}\n onDismiss={onDismiss}\n {...rest}\n />\n </Banner>\n)\n\nexport const BannerRegular = /* @__PURE__ */ Object.assign(\n BannerRegularComponent,\n {\n Content: BannerRegularContent,\n Heading: BannerRegularHeading,\n Text: BannerRegularText,\n Actions: BannerRegularActions,\n Image: BannerRegularImage,\n Button: BannerRegularButton,\n Dismiss: BannerRegularDismiss\n }\n)\n\nBannerRegularComponent.displayName = 'BannerRegular'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledBannerSlimActions = styled(\n 'div',\n {\n base: ['flex', 'gap-4'],\n variants: {\n size: {\n sm: ['w-full'],\n md: ['w-auto']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerSlimActions = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledBannerSlimActions>) => {\n const { size } = useBannerContext()\n return (\n <StyledBannerSlimActions size={size} {...rest}>\n {children}\n </StyledBannerSlimActions>\n )\n}\n\nBannerSlimActions.displayName = 'BannerSlimActions'\n","import * as React from 'react'\n\nimport { type PolymorphicComponent, cn } from '../../../styled'\nimport { overrideStyledVariantValue } from '../../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Button } from '../../button/Button'\nimport { useBannerContext } from '../Banner.context'\n\n// Re-expose Button's own props so BannerSlim.Button stays polymorphic (keeps\n// `as`, e.g. `<BannerSlim.Button as=\"a\" href>`). Typing with\n// React.ComponentProps<typeof Button> alone would collapse to the default\n// element and drop `as` (as?: never).\ntype ButtonOwnProps =\n typeof Button extends PolymorphicComponent<infer _Element, infer OwnProps>\n ? OwnProps\n : never\n\nexport const BannerSlimButton = (({\n className,\n ...rest\n}: React.ComponentProps<typeof Button>) => {\n const { emphasis, size } = useBannerContext()\n\n const fullWidth = overrideStyledVariantValue(size, (s) => s === 'sm')\n\n return (\n <Button\n size=\"md\"\n fullWidth={fullWidth}\n theme={emphasis === 'bold' ? 'neutral' : 'primary'}\n {...rest}\n className={cn('ml-auto', className)}\n />\n )\n}) as PolymorphicComponent<'button', ButtonOwnProps>\n\nBannerSlimButton.displayName = 'BannerSlimButton'\n","import * as React from 'react'\n\nimport { styled, cn } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\nimport { BannerContainer } from '../BannerContainer'\n\nconst toDirection = {\n sm: 'flex-col',\n md: 'flex-row'\n}\n\nconst toAlign = {\n sm: 'items-start',\n md: 'items-center'\n}\n\nconst toWrap = {\n sm: 'flex-wrap',\n md: 'flex-nowrap'\n}\n\nconst StyledBannerSlimContainer = styled(\n BannerContainer,\n {\n base: ['p-4'],\n variants: {\n sizeWorkaround: {\n sm: [],\n md: ['px-6']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\ntype BannerSlimContainerProps = React.ComponentProps<\n typeof StyledBannerSlimContainer\n>\n\nexport const BannerSlimContainer = ({\n className,\n ...rest\n}: BannerSlimContainerProps) => {\n const { size } = useBannerContext()\n\n const direction =\n typeof size === 'string' ? toDirection[size] : 'flex-col md:flex-row'\n\n const align =\n typeof size === 'string' ? toAlign[size] : 'items-start md:items-center'\n\n const wrap =\n typeof size === 'string' ? toWrap[size] : 'flex-wrap md:flex-nowrap'\n\n return (\n <StyledBannerSlimContainer\n {...rest}\n sizeWorkaround={size}\n className={cn(direction, align, 'gap-4', wrap, className)}\n />\n )\n}\n\nBannerSlimContainer.displayName = 'BannerSlimContainer'\n","import { styled } from '../../../styled'\n\nexport const BannerSlimContent = styled('div', {\n base: ['w-full', 'flex', 'items-center', 'gap-4']\n})\n\nBannerSlimContent.displayName = 'BannerSlimContent'\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { ActionIcon } from '../../action-icon/ActionIcon'\nimport { Icon } from '../../icon/Icon'\nimport { Banner } from '../Banner'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledDismiss = styled(\n ActionIcon,\n {\n base: [],\n variants: {\n emphasis: {\n bold: ['text-white!']\n },\n containerSize: {\n sm: ['absolute', 'right-4', 'top-4'],\n md: ['static']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\ntype BannerSlimDismissProps = Omit<\n React.ComponentProps<typeof StyledDismiss>,\n 'children' | 'onClick' | 'href'\n>\n\nexport const BannerSlimDismiss = ({\n label = 'dismiss',\n ...rest\n}: BannerSlimDismissProps) => {\n const { size, setHasDismiss, emphasis } = useBannerContext()\n\n React.useEffect(() => {\n setHasDismiss(true)\n return () => {\n setHasDismiss(false)\n }\n }, [setHasDismiss])\n\n return (\n <Banner.Dismiss asChild>\n <StyledDismiss\n label={label}\n size=\"md\"\n hasTooltip={false}\n isRounded\n theme=\"neutral\"\n containerSize={size}\n emphasis={emphasis as BannerSlimDismissProps['emphasis']}\n {...rest}\n >\n <Icon is={Close} />\n </StyledDismiss>\n </Banner.Dismiss>\n )\n}\n\nBannerSlimDismiss.displayName = 'BannerSlimDismiss'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Image } from '../../image/Image'\nimport { useBannerContext } from '../Banner.context'\n\nconst Container = styled(\n 'div',\n {\n base: ['overflow-hidden', 'rounded-full', 'self-start', 'shrink-0'],\n variants: {\n size: {\n sm: ['size-10'],\n md: ['size-12']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst StyledImage = styled(Image, {\n base: ['max-w-none', 'size-full', 'object-cover']\n})\n\nexport const BannerSlimImage = (\n props: React.ComponentPropsWithoutRef<typeof Image>\n) => {\n const { size } = useBannerContext()\n\n return (\n <Container size={size}>\n <StyledImage {...props} />\n </Container>\n )\n}\n\nBannerSlimImage.displayName = 'BannerSlimImage'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Text } from '../../text/Text'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledText = styled(\n Text,\n {\n base: ['text-(--banner-heading-color)'],\n variants: {\n containerSize: {\n sm: [],\n md: []\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerSlimText = (\n props: React.ComponentPropsWithoutRef<typeof Text>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledText\n size=\"md\"\n weight=\"bold\"\n containerSize={size}\n hasDismiss={hasDismiss}\n noCapsize\n {...props}\n />\n )\n}\n\nBannerSlimText.displayName = 'BannerSlimText'\n","import * as React from 'react'\n\nimport { Banner } from '../Banner'\nimport { BannerContainer } from '../BannerContainer'\nimport { BannerSlimActions } from './BannerSlimActions'\nimport { BannerSlimButton } from './BannerSlimButton'\nimport { BannerSlimContainer } from './BannerSlimContainer'\nimport { BannerSlimContent } from './BannerSlimContent'\nimport { BannerSlimDismiss } from './BannerSlimDismiss'\nimport { BannerSlimImage } from './BannerSlimImage'\nimport { BannerSlimText } from './BannerSlimText'\n\nconst BannerSlimComponent = ({\n colorScheme,\n size,\n emphasis,\n onDismiss,\n ...rest\n}: React.ComponentProps<typeof Banner> &\n React.ComponentProps<typeof BannerContainer>) => (\n <Banner size={size} emphasis={emphasis}>\n <BannerSlimContainer\n colorScheme={colorScheme}\n onDismiss={onDismiss}\n {...rest}\n />\n </Banner>\n)\n\nexport const BannerSlim = /* @__PURE__ */ Object.assign(BannerSlimComponent, {\n Content: BannerSlimContent,\n Text: BannerSlimText,\n Image: BannerSlimImage,\n Button: BannerSlimButton,\n Dismiss: BannerSlimDismiss,\n Actions: BannerSlimActions\n})\n\nBannerSlimComponent.displayName = 'BannerSlim'\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useCarousel } from './Carousel'\n\nconst ArrowButton = /* @__PURE__ */ styled('button', {\n base: [\n 'items-center',\n 'text-primary-800',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'size-12',\n 'top-1/2',\n '-translate-y-1/2',\n 'transition-colors',\n 'duration-150',\n 'ease-in-out',\n 'hover:text-primary-900',\n 'active:text-primary-1000',\n 'disabled:text-grey-200',\n 'disabled:cursor-not-allowed'\n ]\n})\n\nexport const CarouselArrowPrevious = (\n props: React.ComponentProps<typeof ArrowButton>\n) => {\n const { scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <ArrowButton\n type=\"button\"\n onClick={scrollPrev}\n disabled={!canScrollPrev}\n aria-label=\"Previous slide\"\n {...props}\n >\n <Icon is={ChevronLeft} />\n </ArrowButton>\n )\n}\n\nexport const CarouselArrowNext = (\n props: React.ComponentProps<typeof ArrowButton>\n) => {\n const { scrollNext, canScrollNext } = useCarousel()\n\n return (\n <ArrowButton\n type=\"button\"\n onClick={scrollNext}\n disabled={!canScrollNext}\n aria-label=\"Next slide\"\n {...props}\n >\n <Icon is={ChevronRight} />\n </ArrowButton>\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { useCarousel } from './Carousel'\n\nconst Dot = styled('button', {\n base: [\n 'bg-grey-600',\n 'cursor-pointer',\n 'duration-100',\n 'ease-in',\n 'focus:bg-primary-900',\n 'hover:bg-primary-900',\n 'mx-1',\n 'p-1',\n 'rounded-full',\n 'size-3',\n 'transition-all',\n 'disabled:bg-primary-800',\n 'disabled:cursor-default'\n ]\n})\n\nexport const CarouselPagination = ({\n className,\n ...rest\n}: React.HTMLAttributes<HTMLDivElement>) => {\n const { scrollSnaps, selectedIndex, scrollTo } = useCarousel()\n\n const dots = Array.from({ length: scrollSnaps.length }, (_, i) => i)\n\n return (\n <div className={cn('flex', 'justify-center', className)} {...rest}>\n {dots.map((index) => (\n <Dot\n key={index}\n type=\"button\"\n onClick={() => scrollTo(index)}\n disabled={index === selectedIndex}\n aria-label=\"slide dot\"\n />\n ))}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { useCarousel } from './Carousel'\n\nexport type CarouselSlideGap = 'none' | 0 | 1 | 2 | 3 | 4\n\n// Horizontal padding applied around each slide's content, on the same\n// spacing scale as Flex/ToggleGroup's gap. 'none' renders full-bleed slides.\nexport const toSlideGapClass: Record<CarouselSlideGap, string> = {\n none: '',\n 0: 'px-0.5',\n 1: 'px-1',\n 2: 'px-2',\n 3: 'px-3',\n 4: 'px-4'\n}\n\n// Slides read the gap via context so it is configured once on the slider.\nexport const CarouselSlideGapContext = React.createContext<CarouselSlideGap>(3)\n\ntype CarouselSliderProps = {\n children?: React.ReactNode\n className?: string\n gap?: CarouselSlideGap\n overflow?: boolean\n tabIndex?: number\n}\n\nexport const CarouselSlider = ({\n children,\n className,\n gap = 3,\n overflow,\n tabIndex = 0,\n ...rest\n}: CarouselSliderProps) => {\n const { emblaRef } = useCarousel()\n\n return (\n <div\n ref={emblaRef}\n className={cn(\n 'ml-[50%]',\n '-translate-x-1/2',\n 'cursor-grab',\n overflow ? 'overflow-visible' : 'overflow-hidden',\n className\n )}\n role=\"listbox\"\n aria-live=\"polite\"\n tabIndex={tabIndex}\n {...rest}\n >\n <div className=\"flex\">\n <CarouselSlideGapContext value={gap}>\n {children}\n </CarouselSlideGapContext>\n </div>\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { useCarousel } from './Carousel'\nimport { CarouselSlideGapContext, toSlideGapClass } from './CarouselSlider'\n\nexport const CarouselSlide = ({\n children,\n className,\n index,\n ...rest\n}: React.PropsWithChildren<\n { index: number } & React.HTMLAttributes<HTMLDivElement>\n>) => {\n const { selectedIndex } = useCarousel()\n const gap = React.use(CarouselSlideGapContext)\n const isSelected = selectedIndex === index\n\n return (\n <div\n role=\"option\"\n aria-selected={isSelected}\n // min-w-0 so basis-full wins over the content's min-content size and\n // the slide never outgrows the slider viewport\n className={cn('min-w-0', 'basis-full', 'shrink-0', className)}\n {...rest}\n >\n {/* padding to create the gap between slides; gap=\"none\" for full-bleed */}\n <div\n className={cn('flex items-center justify-center', toSlideGapClass[gap])}\n >\n {children}\n </div>\n </div>\n )\n}\n","import useEmblaCarousel from 'embla-carousel-react'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { CarouselArrowNext, CarouselArrowPrevious } from './CarouselArrows'\nimport { CarouselPagination } from './CarouselPagination'\nimport { CarouselSlide } from './CarouselSlide'\nimport { CarouselSlider } from './CarouselSlider'\n\ntype EmblaApi = ReturnType<typeof useEmblaCarousel>[1]\n\ntype CarouselContextValue = {\n emblaRef: React.RefCallback<HTMLDivElement>\n emblaApi: EmblaApi\n selectedIndex: number\n scrollSnaps: number[]\n canScrollPrev: boolean\n canScrollNext: boolean\n scrollPrev: () => void\n scrollNext: () => void\n scrollTo: (index: number) => void\n}\n\nconst CarouselContext = React.createContext<CarouselContextValue | null>(null)\n\ntype CarouselProps = {\n currentSlide?: number\n}\n\nexport const CarouselComponent = ({\n children,\n currentSlide = 0,\n className,\n ...rest\n}: React.PropsWithChildren<\n CarouselProps & React.HTMLAttributes<HTMLDivElement>\n>) => {\n const [emblaRef, emblaApi] = useEmblaCarousel({\n startIndex: currentSlide,\n align: 'center'\n })\n\n const [selectedIndex, setSelectedIndex] = React.useState(currentSlide)\n const [scrollSnaps, setScrollSnaps] = React.useState<number[]>([])\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const scrollPrev = React.useCallback(() => {\n emblaApi?.scrollPrev()\n }, [emblaApi])\n\n const scrollNext = React.useCallback(() => {\n emblaApi?.scrollNext()\n }, [emblaApi])\n\n const scrollTo = React.useCallback(\n (index: number) => {\n emblaApi?.scrollTo(index)\n },\n [emblaApi]\n )\n\n const onSelect = React.useCallback(() => {\n if (!emblaApi) return\n setSelectedIndex(emblaApi.selectedScrollSnap())\n setCanScrollPrev(emblaApi.canScrollPrev())\n setCanScrollNext(emblaApi.canScrollNext())\n }, [emblaApi])\n\n const onInit = React.useCallback(() => {\n if (!emblaApi) return\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [emblaApi])\n\n React.useEffect(() => {\n if (!emblaApi) return\n\n onInit()\n onSelect()\n\n emblaApi.on('reInit', onInit)\n emblaApi.on('reInit', onSelect)\n emblaApi.on('select', onSelect)\n\n return () => {\n emblaApi.off('reInit', onInit)\n emblaApi.off('reInit', onSelect)\n emblaApi.off('select', onSelect)\n }\n }, [emblaApi, onInit, onSelect])\n\n const contextValue = React.useMemo<CarouselContextValue>(\n () => ({\n emblaRef,\n emblaApi,\n selectedIndex,\n scrollSnaps,\n canScrollPrev,\n canScrollNext,\n scrollPrev,\n scrollNext,\n scrollTo\n }),\n [\n emblaRef,\n emblaApi,\n selectedIndex,\n scrollSnaps,\n canScrollPrev,\n canScrollNext,\n scrollPrev,\n scrollNext,\n scrollTo\n ]\n )\n\n return (\n <div className={cn('relative', 'w-full', className)} {...rest}>\n <CarouselContext value={contextValue}>{children}</CarouselContext>\n </div>\n )\n}\n\nexport const useCarousel = () => {\n const context = React.use(CarouselContext)\n if (!context) {\n throw new Error('useCarousel must be used within a Carousel')\n }\n\n return {\n ...context,\n // Alias for backward compatibility\n currentSlide: context.selectedIndex\n }\n}\n\nexport const Carousel = /* @__PURE__ */ Object.assign(CarouselComponent, {\n ArrowNext: CarouselArrowNext,\n ArrowPrevious: CarouselArrowPrevious,\n Pagination: CarouselPagination,\n Slide: CarouselSlide,\n Slider: CarouselSlider\n})\n\nCarouselComponent.displayName = 'Carousel'\n","import { Minus, Ok } from '@atom-learning/icons'\nimport * as RadixCheckbox from '@radix-ui/react-checkbox'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Icon } from '../icon/Icon'\n\nconst StyledCheckbox = styled(RadixCheckbox.Root, {\n base: [\n 'appearance-none',\n 'relative',\n 'bg-transparent',\n 'border',\n 'border-grey-800',\n 'rounded-[3px]',\n 'text-white',\n 'bg-white',\n 'cursor-pointer',\n 'size-4',\n 'p-0',\n 'flex',\n 'items-center',\n 'justify-center',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'shrink-0',\n 'not-disabled:before:-inset-2',\n 'not-disabled:before:-z-1',\n 'not-disabled:before:absolute',\n 'not-disabled:before:bg-primary-300',\n \"not-disabled:before:content-['']\",\n 'not-disabled:before:duration-125',\n 'not-disabled:before:ease-in-out',\n 'not-disabled:before:opacity-0',\n 'not-disabled:before:rounded-[50%]',\n 'not-disabled:before:scale-0',\n 'not-disabled:before:transition-[opacity,scale]',\n 'not-disabled:hover:before:opacity-100',\n 'not-disabled:hover:before:scale-100',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:border-primary-800',\n 'data-[state=indeterminate]:bg-primary-800',\n 'data-[state=indeterminate]:border-primary-800',\n 'focus:-outline-offset-1',\n 'focus:outline-2',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n state: {\n error: ['border-danger']\n },\n size: {\n md: ['size-4'],\n lg: ['mt-px', 'size-6']\n }\n }\n})\n\nconst toIconSize = {\n md: 'sm',\n lg: 'sm'\n}\n\nexport const Checkbox = ({\n ref,\n size = 'md',\n checked,\n ...rest\n}: React.ComponentProps<typeof StyledCheckbox>) => {\n const iconSize = overrideStyledVariantValue(size, (s) => toIconSize[s])\n\n return (\n <div className=\"relative z-1\">\n <StyledCheckbox ref={ref} checked={checked} size={size} {...rest}>\n <div className=\"absolute -inset-3 opacity-50\" />\n <RadixCheckbox.Indicator asChild>\n <Icon\n is={checked === 'indeterminate' ? Minus : Ok}\n size={iconSize}\n className=\"stroke-3\"\n />\n </RadixCheckbox.Indicator>\n </StyledCheckbox>\n </div>\n )\n}\n","import * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from './CheckboxGroup.types'\n\ntype CheckboxGroupCheckedContextValue = {\n checked: CheckboxGroupItemValue[]\n handleItemCheckedChange: (\n newItemChecked: boolean,\n itemValue: CheckboxGroupItemValue\n ) => void\n}\n\ntype CheckboxGroupCheckedContextProps = {\n checked?: CheckboxGroupCheckedContextValue['checked']\n defaultChecked?: CheckboxGroupCheckedContextValue['checked']\n onCheckedChange?: (\n checked: CheckboxGroupCheckedContextValue['checked']\n ) => void\n}\n\nexport const CheckboxGroupCheckedContext =\n React.createContext<CheckboxGroupCheckedContextValue>({\n checked: [],\n handleItemCheckedChange: () => null\n })\n\nconst generateNewCheckedFn = (\n currentChecked: CheckboxGroupCheckedContextValue['checked']\n) => {\n return (newItemChecked, itemValue) => {\n const newCheckedSet = new Set(currentChecked)\n if (newItemChecked) {\n newCheckedSet.add(itemValue)\n } else {\n newCheckedSet.delete(itemValue)\n }\n const newChecked = [...newCheckedSet]\n return newChecked\n }\n}\n\nexport const CheckboxGroupCheckedProvider = ({\n checked: controlledChecked,\n defaultChecked = [],\n onCheckedChange,\n ...rest\n}: React.PropsWithChildren<CheckboxGroupCheckedContextProps>) => {\n const [checked, setChecked] = React.useState(defaultChecked)\n\n const handleItemControlledCheckedChange = React.useCallback(\n (newItemChecked, itemValue) => {\n if (!controlledChecked) return () => null\n const newCheckedFn = generateNewCheckedFn(controlledChecked)\n const newChecked = newCheckedFn(newItemChecked, itemValue)\n onCheckedChange?.(newChecked)\n },\n [onCheckedChange, controlledChecked]\n )\n\n const handleItemCheckedChange = React.useCallback(\n (newItemChecked, itemValue) => {\n setChecked((prevChecked) => {\n const newCheckedFn = generateNewCheckedFn(prevChecked)\n const newChecked = newCheckedFn(newItemChecked, itemValue)\n onCheckedChange?.(newChecked)\n return newChecked\n })\n },\n [onCheckedChange]\n )\n\n const value = React.useMemo<CheckboxGroupCheckedContextValue>(() => {\n const isControlled = Array.isArray(controlledChecked)\n return {\n checked: isControlled\n ? (controlledChecked as CheckboxGroupCheckedContextValue['checked']) // We're literally JUST checking it above but TS still flags it, wrongly, so casting\n : checked,\n handleItemCheckedChange: isControlled\n ? handleItemControlledCheckedChange\n : handleItemCheckedChange\n }\n }, [\n checked,\n handleItemCheckedChange,\n handleItemControlledCheckedChange,\n controlledChecked\n ])\n\n return <CheckboxGroupCheckedContext value={value} {...rest} />\n}\n","import * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from './CheckboxGroup.types'\n\ntype CheckboxGroupMountedContextValue = {\n mounted: CheckboxGroupItemValue[]\n handleItemMountedChange: (\n newItemMounted: boolean,\n itemValue: CheckboxGroupItemValue\n ) => void\n}\n\nexport const CheckboxGroupMountedContext =\n React.createContext<CheckboxGroupMountedContextValue>({\n mounted: [],\n handleItemMountedChange: () => null\n })\n\nexport const CheckboxGroupMountedProvider = (props) => {\n const { handleItemMountedChange: handleItemMountedChangeFurtherUpContext } =\n React.use(CheckboxGroupMountedContext)\n\n const [mounted, setMounted] = React.useState<CheckboxGroupItemValue[]>([])\n const handleItemMountedChange = React.useCallback(\n (newItemMounted, itemValue) => {\n handleItemMountedChangeFurtherUpContext?.(newItemMounted, itemValue)\n setMounted((prevMounted) => {\n const newMountedSet = new Set(prevMounted)\n if (newItemMounted) {\n newMountedSet.add(itemValue)\n } else {\n newMountedSet.delete(itemValue)\n }\n const newMounted = [...newMountedSet]\n return newMounted\n })\n },\n [handleItemMountedChangeFurtherUpContext]\n )\n\n const value = React.useMemo<CheckboxGroupMountedContextValue>(\n () => ({ mounted, handleItemMountedChange }),\n [mounted, handleItemMountedChange]\n )\n\n return <CheckboxGroupMountedContext value={value} {...props} />\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { CheckboxGroupCheckedContext } from './CheckboxGroupChecked.context'\nimport { CheckboxGroupMountedContext } from './CheckboxGroupMounted.context'\n\ntype CheckboxGroupAllItemProps = Omit<\n React.ComponentProps<typeof Checkbox>,\n 'checked' | 'defaultChecked'\n>\n\nexport const CheckboxGroupAllItem = ({\n onCheckedChange,\n title = 'all',\n ...rest\n}: CheckboxGroupAllItemProps) => {\n const {\n checked: checkedItems,\n handleItemCheckedChange: handleItemCheckedChangeContext\n } = React.use(CheckboxGroupCheckedContext)\n const { mounted: mountedItems } = React.use(CheckboxGroupMountedContext)\n\n const handleItemCheckedChange = (newChecked) => {\n mountedItems.forEach((value) => {\n handleItemCheckedChangeContext(newChecked, value)\n })\n onCheckedChange?.(newChecked)\n }\n\n const isAllChecked = (() => {\n if (!checkedItems.length || !mountedItems.length) return false\n\n // Set lookup keeps the every/some scans O(mounted) instead of O(mounted × checked).\n const checkedSet = new Set(checkedItems)\n\n if (mountedItems.every((mountedItem) => checkedSet.has(mountedItem)))\n return true\n\n if (mountedItems.some((mountedItem) => checkedSet.has(mountedItem)))\n return 'indeterminate'\n\n return false\n })()\n\n return (\n <Checkbox\n onCheckedChange={handleItemCheckedChange}\n checked={isAllChecked}\n title={title}\n {...rest}\n />\n )\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { CheckboxGroupCheckedContext } from './CheckboxGroupChecked.context'\nimport { CheckboxGroupMountedContext } from './CheckboxGroupMounted.context'\n\ntype CheckboxGroupItemProps = Omit<\n React.ComponentProps<typeof Checkbox>,\n 'onCheckedChange' | 'checked' | 'defaultChecked'\n> & {\n onCheckedChange?: (newChecked: boolean) => void\n}\n\nexport const CheckboxGroupItem = ({\n value,\n title,\n onCheckedChange,\n ...rest\n}: CheckboxGroupItemProps) => {\n const {\n checked: checkedItems,\n handleItemCheckedChange: handleItemCheckedChangeContext\n } = React.use(CheckboxGroupCheckedContext)\n const { handleItemMountedChange } = React.use(CheckboxGroupMountedContext)\n\n const handleItemCheckedChange = (newChecked) => {\n handleItemCheckedChangeContext(newChecked, value)\n onCheckedChange?.(newChecked)\n }\n\n React.useEffect(() => {\n handleItemMountedChange(true, value)\n return () => {\n handleItemMountedChange(false, value)\n }\n }, [handleItemMountedChange, value])\n\n return (\n <Checkbox\n onCheckedChange={handleItemCheckedChange}\n checked={checkedItems.includes(value)}\n title={title ?? String(value)}\n {...rest}\n />\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { CheckboxGroupMountedProvider } from './CheckboxGroupMounted.context'\n\ntype CheckboxGroupSubProps = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean\n}\n\nexport const CheckboxGroupSub = ({\n asChild = false,\n ...rest\n}: CheckboxGroupSubProps) => {\n const Component = asChild ? Slot : 'div'\n\n return (\n <CheckboxGroupMountedProvider>\n <Component {...rest} />\n </CheckboxGroupMountedProvider>\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from './CheckboxGroup.types'\nimport { CheckboxGroupAllItem } from './CheckboxGroupAllItem'\nimport { CheckboxGroupCheckedProvider } from './CheckboxGroupChecked.context'\nimport { CheckboxGroupItem } from './CheckboxGroupItem'\nimport { CheckboxGroupMountedProvider } from './CheckboxGroupMounted.context'\nimport { CheckboxGroupSub } from './CheckboxGroupSub'\n\ntype CheckboxGroupRootProps = Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'defaultChecked'\n> & {\n checked?: CheckboxGroupItemValue[]\n onCheckedChange?: (checked: CheckboxGroupItemValue[]) => void\n defaultChecked?: CheckboxGroupItemValue[]\n asChild?: boolean\n}\n\nconst CheckboxGroupRoot = ({\n checked,\n defaultChecked,\n onCheckedChange,\n asChild = false,\n ...rest\n}: CheckboxGroupRootProps) => {\n const Component = asChild ? Slot : 'div'\n\n return (\n <CheckboxGroupCheckedProvider\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={onCheckedChange}\n >\n <CheckboxGroupMountedProvider>\n <Component {...rest} />\n </CheckboxGroupMountedProvider>\n </CheckboxGroupCheckedProvider>\n )\n}\n\nexport const CheckboxGroup = /* @__PURE__ */ Object.assign(CheckboxGroupRoot, {\n Item: CheckboxGroupItem,\n AllItem: CheckboxGroupAllItem,\n Sub: CheckboxGroupSub\n})\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\n\ntype TreeListItemProps = React.ComponentProps<'li'>\n\nexport const TreeListItem = ({\n ref,\n className,\n ...rest\n}: TreeListItemProps) => (\n <li\n {...rest}\n ref={ref}\n role=\"treeitem\"\n className={cn(\n 'flex',\n 'items-center',\n 'gap-2',\n 'not-first:mt-0.5',\n className\n )}\n />\n)\n","import { Root } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useCallbackRef } from '../../utilities/hooks/useCallbackRef'\nimport { TreeListItem } from './TreeListItem'\n\ntype TreeCollapsibleContextValue = {\n triggerRef?: React.RefObject<HTMLElement | null>\n setTriggerRef?: (el: HTMLElement | null) => void | (() => void)\n}\nexport const TreeCollapsibleContext =\n React.createContext<TreeCollapsibleContextValue>({})\nconst TreeCollapsibleProvider = ({ children }) => {\n const [triggerRef, setTriggerRef] = useCallbackRef()\n const value = React.useMemo(\n () => ({ triggerRef, setTriggerRef }),\n [triggerRef, setTriggerRef]\n )\n return (\n <TreeCollapsibleContext value={value}>{children}</TreeCollapsibleContext>\n )\n}\n\nconst StyledCollapsibleTreeItemRoot = /* @__PURE__ */ styled(Root, {\n base: ['w-full']\n})\n\ntype TreeCollapsibleProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof StyledCollapsibleTreeItemRoot>\nexport const TreeCollapsible = ({\n ref,\n ...props\n}: TreeCollapsibleProps & {\n ref?: React.Ref<HTMLLIElement>\n}) => (\n <TreeListItem ref={ref}>\n <TreeCollapsibleProvider>\n <StyledCollapsibleTreeItemRoot {...props} />\n </TreeCollapsibleProvider>\n </TreeListItem>\n)\n","import { styled } from '../../styled'\n\nexport const TreeList = styled('ul', {\n base: ['flex', 'flex-col', 'p-0', 'm-0', 'list-none', 'w-full', '[&_&]:pl-4']\n})\n","import { Content } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { TreeCollapsibleContext } from './TreeCollapsible'\nimport { TreeList } from './TreeList'\n\ntype TreeCollapsibleContentProps = React.ComponentProps<typeof Content> &\n React.ComponentProps<typeof TreeList> & {\n ref?: React.Ref<HTMLUListElement>\n }\n\nexport const TreeCollapsibleContent = ({\n ref,\n children,\n className,\n ...rest\n}: TreeCollapsibleContentProps) => {\n const { triggerRef } = React.use(TreeCollapsibleContext)\n\n const handleOnKeydown = (e) => {\n if (!triggerRef?.current) return\n if (e.key === 'Escape') {\n e.stopPropagation()\n e.preventDefault()\n triggerRef.current.focus()\n triggerRef.current.click()\n }\n }\n\n return (\n <Content\n className={cn('data-[state=closed]:hidden', className)}\n onKeyDown={handleOnKeydown}\n {...rest}\n asChild\n >\n <TreeList ref={ref} role=\"group\">\n {children}\n </TreeList>\n </Content>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\n\nexport const TreeIcon = ({\n className,\n ...rest\n}: React.ComponentProps<typeof Icon>) => (\n <Icon\n size=\"md\"\n {...rest}\n className={cn('my-1', 'shrink-0', 'self-start', className)}\n />\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\ntype StyledTreeTextProps = React.ComponentProps<typeof Text>\n\nexport const TreeText = ({ className, ...rest }: StyledTreeTextProps) => (\n <Text\n as=\"span\"\n {...rest}\n className={cn(\n 'py-0.5',\n 'whitespace-nowrap',\n 'overflow-x-hidden',\n 'text-ellipsis',\n className\n )}\n size=\"md\"\n />\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { TreeIcon } from './TreeIcon'\nimport { TreeText } from './TreeText'\n\nconst StyledItemContent = styled('div', {\n base: [\n 'w-full',\n 'relative',\n 'min-h-8',\n 'pl-10',\n 'flex',\n 'items-center',\n 'gap-2'\n ]\n})\n\ntype TreeItemContentProps = React.ComponentProps<typeof StyledItemContent>\n\nexport const TreeItemContent = ({\n ref,\n children,\n ...rest\n}: TreeItemContentProps) => (\n <StyledItemContent ref={ref} {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <TreeText>{child}</TreeText>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n return <TreeIcon {...iconProps} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledItemContent>\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { TreeCollapsibleContext } from './TreeCollapsible'\nimport { TreeItemContent } from './TreeItemContent'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: [\n 'absolute',\n 'left-0',\n 'top-0',\n 'pointer-events-none',\n '[&_svg]:duration-300',\n '[&_svg]:transition-transform',\n '[&[data-state=closed]>svg]:-rotate-90',\n '[&[data-state=open]>svg]:rotate-0'\n ]\n})\n\ntype NavigationMenuCollapsibleTriggerProps = React.ComponentProps<\n typeof TreeItemContent\n> & {\n label: string\n}\n\nexport const TreeCollapsibleTrigger = ({\n children,\n label,\n className,\n onClick,\n ...rest\n}: NavigationMenuCollapsibleTriggerProps) => {\n const { setTriggerRef, triggerRef } = React.use(TreeCollapsibleContext)\n\n return (\n <TreeItemContent\n {...rest}\n className={cn('cursor-pointer', className)}\n onClick={(event) => {\n onClick?.(event)\n triggerRef?.current?.click()\n }}\n >\n <Trigger asChild>\n <StyledActionIcon\n size=\"sm\"\n ref={setTriggerRef}\n label={label}\n theme=\"neutral\"\n hasTooltip={false}\n onClick={(e) => e.stopPropagation()}\n >\n <Icon is={ChevronDown} />\n </StyledActionIcon>\n </Trigger>\n {children}\n </TreeItemContent>\n )\n}\n","import * as React from 'react'\n\nimport { TreeItemContent } from './TreeItemContent'\nimport { TreeListItem } from './TreeListItem'\n\ntype TreeItemProps = React.ComponentProps<typeof TreeItemContent>\n\nexport const TreeItem = ({ children, ...rest }: TreeItemProps) => (\n <TreeListItem>\n <TreeItemContent {...rest}>{children}</TreeItemContent>\n </TreeListItem>\n)\n","import * as React from 'react'\n\nimport { TreeCollapsible } from './TreeCollapsible'\nimport { TreeCollapsibleContent } from './TreeCollapsibleContent'\nimport { TreeCollapsibleTrigger } from './TreeCollapsibleTrigger'\nimport { TreeIcon } from './TreeIcon'\nimport { TreeItem } from './TreeItem'\nimport { TreeList } from './TreeList'\nimport { TreeText } from './TreeText'\n\ntype TreeProps = React.ComponentProps<typeof TreeList>\n\nexport const TreeRoot = ({ ref, children, ...rest }: TreeProps) => (\n <TreeList {...rest} ref={ref} role=\"tree\">\n {children}\n </TreeList>\n)\n\nexport const Tree = /* @__PURE__ */ Object.assign(TreeRoot, {\n Collapsible: TreeCollapsible,\n CollapsibleContent: TreeCollapsibleContent,\n CollapsibleTrigger: TreeCollapsibleTrigger,\n Item: TreeItem,\n Icon: TreeIcon,\n Text: TreeText\n})\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\n\ntype CheckboxTreeCollapsibleProps = Omit<\n React.ComponentProps<typeof Tree.Collapsible> &\n React.ComponentProps<typeof CheckboxGroup.Sub>,\n 'asChild'\n>\n\nexport const CheckboxTreeCollapsible = ({\n children,\n ...rest\n}: CheckboxTreeCollapsibleProps) => (\n <CheckboxGroup.Sub asChild>\n <Tree.Collapsible {...rest}>{children}</Tree.Collapsible>\n </CheckboxGroup.Sub>\n)\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\n\ntype CheckboxTreeCollapsibleContentProps = Omit<\n React.ComponentProps<typeof Tree.CollapsibleContent>,\n 'asChild'\n>\n\nexport const CheckboxTreeCollapsibleContent = ({\n children,\n ...rest\n}: CheckboxTreeCollapsibleContentProps) => (\n <CheckboxGroup.Sub asChild>\n <Tree.CollapsibleContent {...rest} forceMount>\n {children}\n </Tree.CollapsibleContent>\n </CheckboxGroup.Sub>\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Tree } from '../tree/Tree'\n\nconst StyledItemContent = styled('label', {\n base: ['max-w-full', 'flex', 'items-center', 'gap-2']\n})\n\ntype CheckboxTreeItemContentProps = React.ComponentProps<\n typeof StyledItemContent\n>\n\nexport const CheckboxTreeItemContent = ({\n children,\n ...rest\n}: CheckboxTreeItemContentProps) => (\n <StyledItemContent {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <Tree.Text>{child}</Tree.Text>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n return <Tree.Icon {...iconProps} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledItemContent>\n)\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeItemContent } from './CheckboxTreeItemContent'\n\ntype CheckboxGroupCollapsibleTriggerProps = Omit<\n React.ComponentProps<typeof Tree.CollapsibleTrigger> &\n React.ComponentProps<typeof CheckboxGroup.AllItem>,\n 'required' | 'asChild'\n>\n\nexport const CheckboxTreeCollapsibleTrigger = ({\n onCheckedChange,\n title,\n label,\n children,\n disabled,\n ...rest\n}: CheckboxGroupCollapsibleTriggerProps) => {\n const treeCollapsibleTriggerProps = { label }\n const checkboxAllItemProps = { onCheckedChange, title, disabled }\n return (\n <Tree.CollapsibleTrigger {...treeCollapsibleTriggerProps} {...rest}>\n <CheckboxTreeItemContent\n onClick={\n // Don't propagate click and don't open/close the collapsible when the label/checkbox are clicked\n (e) => e.stopPropagation()\n }\n >\n <CheckboxGroup.AllItem {...checkboxAllItemProps} />\n {children}\n </CheckboxTreeItemContent>\n </Tree.CollapsibleTrigger>\n )\n}\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeItemContent } from './CheckboxTreeItemContent'\n\ntype CheckboxTreeItemProps = Omit<\n React.ComponentProps<typeof Tree.Item> &\n React.ComponentProps<typeof CheckboxGroup.Item>,\n 'required' | 'asChild'\n>\n\nexport const CheckboxTreeItem = ({\n value,\n title,\n onCheckedChange,\n children,\n disabled,\n ...rest\n}: CheckboxTreeItemProps) => {\n const checkboxItemProps = { value, title, onCheckedChange, disabled }\n return (\n <Tree.Item {...rest}>\n <CheckboxTreeItemContent>\n <CheckboxGroup.Item {...checkboxItemProps} />\n {children}\n </CheckboxTreeItemContent>\n </Tree.Item>\n )\n}\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeCollapsible } from './CheckboxTreeCollapsible'\nimport { CheckboxTreeCollapsibleContent } from './CheckboxTreeCollapsibleContent'\nimport { CheckboxTreeCollapsibleTrigger } from './CheckboxTreeCollapsibleTrigger'\nimport { CheckboxTreeItem } from './CheckboxTreeItem'\n\ntype CheckboxTreeRootProps = Omit<\n React.ComponentProps<typeof CheckboxGroup> &\n React.ComponentProps<typeof Tree>,\n 'asChild'\n>\n\nexport const CheckboxTreeRoot = ({\n checked,\n defaultChecked,\n onCheckedChange,\n ...rest\n}: CheckboxTreeRootProps): React.ReactElement<unknown> => {\n const checkboxGroupProps = { checked, defaultChecked, onCheckedChange }\n return (\n <CheckboxGroup {...checkboxGroupProps} asChild>\n <Tree {...rest} />\n </CheckboxGroup>\n )\n}\n\ntype CheckboxTreeType = typeof CheckboxTreeRoot & {\n Collapsible: typeof CheckboxTreeCollapsible\n CollapsibleContent: typeof CheckboxTreeCollapsibleContent\n CollapsibleTrigger: typeof CheckboxTreeCollapsibleTrigger\n Item: typeof CheckboxTreeItem\n}\n\nexport const CheckboxTree: CheckboxTreeType = /* @__PURE__ */ Object.assign(\n CheckboxTreeRoot,\n {\n Collapsible: CheckboxTreeCollapsible,\n CollapsibleContent: CheckboxTreeCollapsibleContent,\n CollapsibleTrigger: CheckboxTreeCollapsibleTrigger,\n Item: CheckboxTreeItem\n }\n)\n","import { Danger, Error, Info, OkCircle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport type { InlineMessageTheme } from './InlineMessage.types'\n\nexport const INLINE_MESSAGE_ICONS: Record<\n InlineMessageTheme,\n React.FC<React.SVGProps<SVGSVGElement>>\n> = {\n success: OkCircle,\n warning: Danger,\n info: Info,\n neutral: Info,\n error: Error\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Text } from '../text/Text'\nimport { INLINE_MESSAGE_ICONS } from './InlineMessage.config'\nimport type { InlineMessageTheme } from './InlineMessage.types'\n\nconst InlineMessageContainer = styled('div', {\n base: ['flex'],\n variants: {\n theme: {\n success: ['text-success'],\n warning: ['[&_svg]:text-warning-dark', 'text-warning-text'],\n info: ['text-info'],\n neutral: ['text-grey-800'],\n error: ['text-danger']\n }\n }\n})\n\ntype InlineMessageProps = React.ComponentProps<\n typeof InlineMessageContainer\n> & {\n showIcon?: boolean\n size?: 'xs' | 'sm' | 'md'\n}\n\nexport const InlineMessage = ({\n className,\n showIcon = true,\n theme = 'error',\n size = 'sm',\n children,\n ...rest\n}: InlineMessageProps) => (\n <InlineMessageContainer theme={theme} className={className} {...rest}>\n {showIcon && (\n <Icon\n size=\"sm\"\n is={INLINE_MESSAGE_ICONS[theme as InlineMessageTheme]}\n className=\"mr-2\"\n />\n )}\n <Text as=\"span\" size={size} className=\"translate-y-0.5\">\n {children}\n </Text>\n </InlineMessageContainer>\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nconst StyledLabel = styled('label', {\n base: ['text-grey-900', 'font-body', 'm-0'],\n variants: {\n size: {\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]']\n },\n type: {\n block: ['block', 'font-semibold'],\n inline: ['flex', 'font-normal', 'max-w-max']\n },\n align: { start: [], center: [] },\n direction: { reverse: [], row: [] },\n appearance: { standard: [], modern: [] }\n },\n compoundVariants: [\n {\n type: 'inline',\n align: 'start',\n class: ['items-start']\n },\n {\n type: 'inline',\n align: 'center',\n class: ['items-center']\n },\n {\n type: 'inline',\n direction: 'reverse',\n class: ['flex-row-reverse']\n },\n {\n type: 'inline',\n direction: 'row',\n class: ['flex-row']\n },\n {\n type: 'block',\n appearance: 'modern',\n class: ['font-normal']\n }\n ]\n})\n\nexport type LabelProps = Override<\n React.ComponentPropsWithoutRef<typeof StyledLabel>,\n {\n as?: 'label' | 'legend'\n required?: boolean\n }\n>\n\nexport const Label = ({\n align = 'start',\n as = 'label',\n direction = 'row',\n size = 'md',\n type = 'block',\n children,\n required,\n ...rest\n}: LabelProps) => (\n <StyledLabel\n as={as}\n size={size}\n type={type}\n align={align}\n direction={direction}\n {...rest}\n >\n {children}\n {required && (\n <span className=\"text-danger ml-1 font-normal\" aria-hidden>\n *\n </span>\n )}\n </StyledLabel>\n)\n\nLabel.displayName = 'Label'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nconst StyledRadioButton = styled(\n RadioGroup.Item,\n {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-transparent',\n 'border',\n 'border-grey-800',\n 'rounded-full',\n 'text-white',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'p-0',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:border-primary-800',\n 'disabled:bg-grey-200',\n 'disabled:border-grey-800',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'disabled:data-[state=checked]:bg-grey-800',\n 'disabled:data-[state=checked]:border-grey-800'\n ],\n variants: {\n size: {\n md: ['size-4'],\n lg: ['-mt-1', 'size-6']\n }\n }\n },\n { enablePolymorphism: false, enableResponsiveVariants: true }\n)\n\nconst StyledIndicator = styled(\n RadioGroup.Indicator,\n {\n base: ['size-1.5', 'rounded-full', 'bg-current', 'absolute'],\n variants: {\n size: {\n md: ['size-1.5'],\n lg: ['size-3']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype RadioButtonProps = Override<\n React.ComponentProps<typeof StyledRadioButton>,\n {\n 'aria-label'?: string\n }\n>\n\nexport const RadioButton = ({ size, ...rest }: RadioButtonProps) => (\n <StyledRadioButton {...rest} size={size}>\n <StyledIndicator size={size} />\n </StyledRadioButton>\n)\n\nRadioButton.displayName = 'RadioButton'\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\nexport const Description = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => (\n <Text size=\"sm\" className={cn('text-grey-700', 'max-w-[80ch]', className)}>\n {children}\n </Text>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { Label } from '../label/Label'\nimport { RadioButton } from '../radio-button/RadioButton'\nimport { Description } from './FieldDescription'\n\ntype InlineFieldWrapperProps = {\n className?: string\n error?: string\n label: string\n required?: boolean\n align?: 'start' | 'center'\n direction?: 'row' | 'reverse'\n description?: string\n}\n\nexport const InlineFieldWrapper = ({\n align = 'start',\n children,\n className,\n description,\n direction = 'row',\n error,\n label,\n required\n}: React.PropsWithChildren<InlineFieldWrapperProps>) => (\n <div className={className}>\n <Label\n align={align}\n direction={direction}\n required={required}\n type=\"inline\"\n >\n {React.Children.map(children, (child: any) => (\n <div\n className={cn(\n direction === 'reverse' && 'ml-3',\n direction === 'row' && 'mr-3',\n (child?.type === Checkbox || child?.type === RadioButton) &&\n child?.props?.size !== 'lg' &&\n 'translate-y-1'\n )}\n >\n {child}\n </div>\n ))}\n {label}\n </Label>\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n {description && (\n <Description\n className={cn(\n 'mt-2',\n direction === 'reverse' && 'mr-7',\n direction === 'row' && 'ml-7'\n )}\n >\n {description}\n </Description>\n )}\n </div>\n)\n\nInlineFieldWrapper.displayName = 'InlineFieldWrapper'\n","import delve from 'dlv'\nimport { useFormContext } from 'react-hook-form'\n\n// Splits react-hook-form field paths on their `,` `[` `]` `.` separators.\nconst FIELD_PATH_SEPARATOR_RE = /[,[\\].]+?/\n\nexport const useFieldError = (fieldName: string) => {\n const { errors } = useFormContext()\n\n // in case of migration to a newer version of react-hook-form the path needs to updated to account for dynamic fields naming convention\n const fieldPath = fieldName.split(FIELD_PATH_SEPARATOR_RE).filter(Boolean)\n\n const getErrors = () => delve(errors, fieldPath)\n\n return {\n error: getErrors()?.message\n }\n}\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport type { FieldElementWrapperProps } from '../field-wrapper/FieldWrapper'\nimport { InlineFieldWrapper } from '../field-wrapper/InlineFieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\n\nenum CheckboxValue {\n ON = 'on',\n OFF = 'off'\n}\n\nexport const CheckboxField = ({\n className,\n label,\n name,\n validation,\n description,\n defaultChecked = false,\n checked,\n onCheckedChange,\n ...rest\n}: React.ComponentProps<typeof Checkbox> & FieldElementWrapperProps) => {\n const { control, setValue } = useFormContext()\n const { error } = useFieldError(name)\n const {\n field: { ref, onChange, value: innerChecked, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue: defaultChecked\n })\n\n React.useEffect(() => {\n // Sync an externally-controlled `checked` into react-hook-form without\n // marking the field dirty/touched — this isn't user input.\n if (typeof checked !== 'undefined')\n setValue(name, checked, { shouldDirty: false })\n }, [checked, name, setValue])\n\n return (\n <InlineFieldWrapper\n className={className}\n description={description}\n error={error}\n label={label}\n required={Boolean(validation?.required)}\n >\n <Checkbox\n ref={ref}\n name={innerName}\n {...rest}\n onCheckedChange={(newChecked) => {\n onChange(newChecked)\n onCheckedChange?.(newChecked)\n }}\n value={innerChecked ? CheckboxValue.ON : CheckboxValue.OFF}\n checked={innerChecked}\n {...(error && { state: 'error' })}\n />\n </InlineFieldWrapper>\n )\n}\n\nCheckboxField.displayName = 'CheckboxField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Icon } from '../icon/Icon'\n\nexport const StyledChipContent = styled('span', {\n base: [\n 'inline-flex',\n 'items-center',\n 'px-1',\n 'grow',\n 'overflow-hidden',\n 'text-ellipsis',\n 'whitespace-nowrap',\n '*:not-last:mr-1'\n ]\n})\n\nconst toIconSize = { sm: 'sm', md: 'sm', lg: 'md' }\n\nexport const ChipIcon = (props: React.ComponentProps<typeof Icon>) => {\n const rootContext = React.use(ChipRootContext)\n const { size } = rootContext\n const iconSize = overrideStyledVariantValue(size, (s) => toIconSize[s])\n return <Icon {...props} size={iconSize} />\n}\n\nconst ChipContent = ({ children, ...rest }) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n return (\n <StyledChipContent {...rest}>\n {\n childrenArray.map((child) => {\n if (!isSingleChild && typeof child === 'string')\n return (\n <span\n key={child}\n className=\"overflow-hidden text-ellipsis whitespace-nowrap\"\n >\n {child}\n </span>\n )\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n // `React.Children.toArray` already assigns each child a stable key.\n return <ChipIcon key={child.key} {...iconProps} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledChipContent>\n )\n}\n\nexport const StyledRoot = styled('div', {\n base: [\n 'flex',\n 'px-2',\n 'border',\n 'rounded-md',\n 'items-center',\n 'font-body',\n 'max-w-full',\n 'border-primary-800',\n 'text-primary-900',\n 'bg-primary-100',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n size: {\n sm: ['h-6', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['h-8', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n lg: ['h-10', 'text-md', 'leading-normal', 'capsize-[0.3864]']\n },\n appearance: {\n standard: [],\n modern: ['border-grey-900', 'text-grey-900', 'bg-grey-100']\n }\n }\n})\n\nexport type ChipRootContext = React.ComponentProps<typeof StyledRoot>\nexport type ChipRootProviderProps = ChipRootContext\n\nexport const ChipRootContext = React.createContext<ChipRootContext>({})\n\nexport const ChipRootProvider = ({ size, children }: ChipRootProviderProps) => {\n const value = React.useMemo<ChipRootContext>(() => ({ size }), [size])\n return <ChipRootContext value={value}>{children}</ChipRootContext>\n}\n\nexport type ChipRootProps = ChipRootProviderProps\n\nconst ChipRoot = ({ ref, size = 'md', ...rest }: ChipRootProps) => (\n <ChipRootProvider size={size}>\n <StyledRoot ref={ref} size={size} {...rest} />\n </ChipRootProvider>\n)\n\nexport const Chip = /* @__PURE__ */ Object.assign(ChipRoot, {\n Content: ChipContent,\n Icon: ChipIcon\n})\n","import { styled } from '../../styled'\n\nexport const ChipGroup = styled('div', {\n base: ['flex', 'flex-row', 'flex-wrap', 'gap-2']\n})\n","import * as React from 'react'\n\nexport interface DismissibleGroupContextValue {\n disabled?: boolean\n onDismiss: (value: string | number) => void\n}\nexport const DismissibleGroupContext =\n React.createContext<DismissibleGroupContextValue>({\n onDismiss: () => null\n })\n\nexport interface DismissibleGroupProps {\n disabled?: boolean\n onDismiss: (value: string | number) => void\n}\n\nexport const DismissibleGroupProvider = ({\n children,\n disabled,\n onDismiss\n}: React.PropsWithChildren<DismissibleGroupProps>) => {\n const value = React.useMemo<DismissibleGroupContextValue>(\n () => ({ disabled, onDismiss }),\n [disabled, onDismiss]\n )\n return (\n <DismissibleGroupContext value={value}>{children}</DismissibleGroupContext>\n )\n}\n\nexport interface DismissibleGroupRootProps extends DismissibleGroupProps {\n as?: React.ElementType\n ref?: React.Ref<HTMLDivElement>\n}\n\nexport const DismissibleGroupRoot = ({\n as: Component = 'div',\n disabled,\n onDismiss,\n ...rest\n}: React.PropsWithChildren<DismissibleGroupRootProps>) => (\n <DismissibleGroupProvider disabled={disabled} onDismiss={onDismiss}>\n <Component {...rest} />\n </DismissibleGroupProvider>\n)\n\nDismissibleGroupRoot.displayName = 'DismissibleGroup'\n","import * as React from 'react'\n\nimport { Dismissible } from '../dismissible'\nimport { DismissibleGroupContext } from './DismissibleGroupRoot'\n\nexport type DismissibleGroupItemProps = React.ComponentProps<\n typeof Dismissible\n> & {\n value: string | number\n disabled?: boolean\n}\n\nexport const DismissibleGroupItem = ({\n children,\n value,\n disabled: itemDisabled = false,\n ...rest\n}: React.PropsWithChildren<DismissibleGroupItemProps>) => {\n const groupContext = React.use(DismissibleGroupContext)\n if (groupContext === undefined) {\n throw new Error(\n 'DismissibleGroup.Item can only be used within a DismissibleGroup'\n )\n }\n const { onDismiss, disabled: groupDisabled } = groupContext\n return (\n <Dismissible\n disabled={groupDisabled || itemDisabled}\n {...rest}\n onDismiss={() => onDismiss(value)}\n >\n {children}\n </Dismissible>\n )\n}\n","import { DismissibleTrigger } from '../dismissible/DismissibleTrigger'\nimport { DismissibleGroupItem } from './DismissibleGroupItem'\nimport { DismissibleGroupRoot } from './DismissibleGroupRoot'\n\nexport const DismissibleGroup = /* @__PURE__ */ Object.assign(\n DismissibleGroupRoot,\n {\n Item: DismissibleGroupItem,\n Trigger: DismissibleTrigger\n }\n)\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Chip } from '../chip/Chip'\nimport { DismissibleGroup } from '../dismissible-group'\nimport { Icon } from '../icon/Icon'\n\nconst StyledChipDismissibleGroupItem = styled(Chip, {\n base: ['flex', 'px-1']\n})\n\nexport type ChipDismissibleGroupItem = React.ComponentProps<\n typeof DismissibleGroup.Item\n> &\n React.ComponentProps<typeof StyledChipDismissibleGroupItem> & {\n dismissActionLabel: string\n }\n\nexport const ChipDismissibleGroupItem = ({\n size = 'md',\n children,\n dismissActionLabel = 'Dismiss',\n ...rest\n}: ChipDismissibleGroupItem) => (\n <DismissibleGroup.Item asChild {...rest}>\n <StyledChipDismissibleGroupItem size={size}>\n <Chip.Content>{children}</Chip.Content>\n <DismissibleGroup.Trigger asChild>\n <ActionIcon\n label={dismissActionLabel}\n size={size === 'sm' ? 'xs' : 'sm'}\n className=\"text-grey-600\"\n >\n <Icon is={Close} />\n </ActionIcon>\n </DismissibleGroup.Trigger>\n </StyledChipDismissibleGroupItem>\n </DismissibleGroup.Item>\n)\n","import * as React from 'react'\n\nimport { ChipGroup } from '../chip/ChipGroup'\nimport { DismissibleGroup } from '../dismissible-group'\n\ntype ChipDismissibleGroupRootProps = React.ComponentProps<typeof ChipGroup> &\n React.ComponentProps<typeof DismissibleGroup>\n\nexport const ChipDismissibleGroupRoot = ({\n ref,\n ...props\n}: ChipDismissibleGroupRootProps) => {\n return <ChipGroup as={DismissibleGroup} ref={ref} {...props} />\n}\n","import { ChipDismissibleGroupItem } from './ChipDismissibleGroupItem'\nimport { ChipDismissibleGroupRoot } from './ChipDismissibleGroupRoot'\n\ntype ChipDismissibleGroup = typeof ChipDismissibleGroupRoot & {\n Item: typeof ChipDismissibleGroupItem\n}\n\nexport const ChipDismissibleGroup =\n ChipDismissibleGroupRoot as ChipDismissibleGroup\nChipDismissibleGroup.Item = ChipDismissibleGroupItem\n","import { Ok } from '@atom-learning/icons'\nimport * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Chip } from '../chip/Chip'\nimport { Icon } from '../icon/Icon'\n\nconst StyledChipToggleIcon = styled(Icon, {\n base: ['hidden']\n})\n\nconst StyledChipToggleGroupItem = styled(Chip, {\n base: [\n 'flex',\n 'not-disabled:cursor-pointer',\n 'not-disabled:data-[state=on]:hover:bg-white',\n 'not-disabled:data-[state=on]:hover:text-primary-1000',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-grey-200',\n 'not-disabled:hover:border-current',\n 'not-disabled:hover:text-grey-1000',\n 'data-[state=off]:bg-white',\n 'data-[state=off]:border-grey-600',\n 'data-[state=off]:text-grey-800',\n 'data-[state=on]:[&_svg]:block'\n ],\n variants: {\n appearance: {\n standard: [],\n modern: [\n 'data-[state=off]:bg-grey-100',\n 'data-[state=off]:border-transparent',\n 'data-[state=on]:border-grey-900',\n 'data-[state=on]:text-grey-900',\n 'data-[state=on]:bg-white',\n 'data-[state=on]:font-bold'\n ]\n }\n }\n})\n\ntype ChipToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> &\n React.ComponentProps<typeof StyledChipToggleGroupItem>\n\nexport const ChipToggleGroupItem = ({\n size = 'md',\n appearance,\n children,\n ...rest\n}: ChipToggleGroupItem) => (\n <ToggleGroup.Item {...rest} asChild>\n <StyledChipToggleGroupItem as=\"button\" appearance={appearance}>\n <StyledChipToggleIcon is={Ok} size={size === 'lg' ? 'md' : 'sm'} />\n <Chip.Content>{children}</Chip.Content>\n </StyledChipToggleGroupItem>\n </ToggleGroup.Item>\n)\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\ntype RootType = {\n disableDeselect?: boolean\n}\n\ntype ToggleGroupRootProps = React.ComponentProps<typeof ToggleGroup.Root> &\n RootType\n\nexport const ToggleGroupRoot = ({\n ref,\n disableDeselect = false,\n onValueChange,\n defaultValue,\n ...rest\n}: ToggleGroupRootProps) => {\n const [internalValue, setInternalValue] =\n React.useState<ToggleGroupRootProps['value']>(defaultValue)\n const handleValueChange: ToggleGroupRootProps['onValueChange'] = (\n newValue\n ) => {\n if (disableDeselect && (newValue === '' || newValue?.length === 0)) return\n setInternalValue(newValue)\n onValueChange?.(newValue)\n }\n\n return (\n // eslint-disable-next-line\n // @ts-ignore Radix types complain on properties depending on whether `type=\"single\"` or `\"multiple\"`. Works correctly so muting.\n <ToggleGroup.Root\n ref={ref}\n onValueChange={handleValueChange}\n value={internalValue}\n {...rest}\n />\n )\n}\n","import { ToggleGroupRoot } from './ToggleGroupRoot'\n\nexport const ToggleGroup = {\n Root: ToggleGroupRoot\n}\n","import * as React from 'react'\n\nimport { ToggleGroup } from '../../utilities/radix-overrides/toggle-group'\nimport { ChipGroup } from '../chip/ChipGroup'\n\ntype ChipToggleGroupRootProps = React.ComponentProps<typeof ChipGroup> &\n React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const ChipToggleGroupRoot = ({\n ref,\n ...props\n}: ChipToggleGroupRootProps) => (\n <ChipGroup\n ref={ref}\n as={ToggleGroup.Root}\n orientation=\"horizontal\"\n {...props}\n />\n)\n","import { ChipToggleGroupItem } from './ChipToggleGroupItem'\nimport { ChipToggleGroupRoot } from './ChipToggleGroupRoot'\n\ntype ChipToggleGroup = typeof ChipToggleGroupRoot & {\n Item: typeof ChipToggleGroupItem\n}\n\nexport const ChipToggleGroup = ChipToggleGroupRoot as ChipToggleGroup\nChipToggleGroup.Item = ChipToggleGroupItem\n","import { ComboboxInput as BaseComboboxInput } from '@reach/combobox'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const StyledComboboxInput = styled(BaseComboboxInput, {\n base: [\n 'bg-(image:--bg-chevron)',\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n '[background-repeat:no-repeat,repeat-x]',\n 'bg-size-[--spacing(5)_auto,100%]',\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'box-border',\n 'text-grey-1000',\n 'cursor-text',\n 'block',\n 'font-body',\n 'h-10',\n 'pl-3',\n 'pr-10',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'w-full',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800'\n ],\n\n variants: {\n size: {\n sm: ['h-8', 'text-sm', 'leading-[1.7]'],\n md: ['h-10', 'text-md', 'leading-loose'],\n lg: ['h-12', 'text-md', 'leading-loose']\n },\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-700',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n theme: {\n white: [],\n grey: []\n },\n state: {\n error: []\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border', 'border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n})\n\nexport type ComboboxInputProps = React.ComponentProps<\n typeof StyledComboboxInput\n>\n\nexport const ComboboxInput = ({\n ref,\n size = 'md',\n appearance = 'standard',\n ...rest\n}: ComboboxInputProps) => (\n <StyledComboboxInput\n size={size}\n appearance={appearance}\n {...rest}\n ref={ref}\n />\n)\n","import { ComboboxList as BaseComboboxList } from '@reach/combobox'\n\nimport { styled } from '../../styled'\n\nexport const ComboboxList = styled(\n BaseComboboxList,\n {\n base: ['list-none', 'm-0', 'p-0', 'select-none']\n },\n { enablePolymorphism: false }\n)\n","import { ComboboxOption as BaseComboboxOption } from '@reach/combobox'\n\nimport { styled } from '../../styled'\n\nexport const ComboboxOption = styled(\n BaseComboboxOption,\n {\n base: [\n 'text-grey-900',\n 'cursor-pointer',\n 'm-0',\n 'p-2',\n 'hover:bg-grey-100',\n 'hover:rounded-sm',\n 'aria-selected:bg-grey-100',\n 'aria-selected:rounded-sm',\n 'data-user-value:text-primary-800'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { ComboboxPopover as BaseComboboxPopover } from '@reach/combobox'\n\nimport { styled } from '../../styled'\n\nexport const ComboboxPopover = styled(\n BaseComboboxPopover,\n {\n base: [\n 'bg-white',\n 'border',\n 'border-grey-200',\n 'rounded-md',\n 'shadow-md',\n 'box-border',\n 'font-body',\n 'text-md',\n 'outline-none',\n 'p-1',\n 'translate-y-2'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { Combobox as BaseCombobox, ComboboxOptionText } from '@reach/combobox'\n\nimport { ComboboxInput } from './ComboboxInput'\nimport { ComboboxList } from './ComboboxList'\nimport { ComboboxOption } from './ComboboxOption'\nimport { ComboboxPopover } from './ComboboxPopover'\n\n// ':root': { '--reach-combobox': 1 }\n\nexport const Combobox = /* @__PURE__ */ Object.assign(BaseCombobox, {\n displayName: 'Combobox',\n Option: ComboboxOption,\n Input: ComboboxInput,\n Popover: ComboboxPopover,\n List: ComboboxList,\n OptionText: ComboboxOptionText\n})\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport type { ValidationOptions } from '../form/validation'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { Label } from '../label/Label'\nimport { type LabelProps } from '../label/Label'\nimport { Link } from '../link/Link'\nimport { Description } from './FieldDescription'\n\nexport type FieldWrapperProps = {\n className?: string\n error?: string\n fieldId: string\n label: string\n prompt?: { link?: string; label: string; onClick?: () => void }\n description?: string\n required?: boolean\n hideLabel?: boolean\n appearance?: LabelProps['appearance']\n}\n\nexport type FieldElementWrapperProps = Omit<FieldWrapperProps, 'fieldId'> & {\n name: string\n validation?: ValidationOptions\n}\n\nexport const FieldWrapper = ({\n children,\n error,\n fieldId,\n label,\n prompt,\n description,\n required,\n hideLabel,\n appearance,\n ...rest\n}: React.PropsWithChildren<FieldWrapperProps>) => (\n <div {...rest}>\n <div\n className={cn(\n 'mb-3',\n 'flex',\n 'items-center',\n 'justify-between',\n hideLabel && 'sr-only'\n )}\n >\n <Label htmlFor={fieldId} required={required} appearance={appearance}>\n {label}\n </Label>\n {prompt && (\n <Link href={prompt?.link} onClick={prompt?.onClick} size=\"sm\">\n {prompt.label}\n </Link>\n )}\n </div>\n {description && <Description className=\"mb-3\">{description}</Description>}\n {children}\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n </div>\n)\n\nFieldWrapper.displayName = 'FieldWrapper'\n","import * as React from 'react'\n\nimport type { InputProps } from '../input/Input'\n\nexport type FormCustomContextType =\n | {\n appearance?: InputProps['appearance']\n theme?: InputProps['theme']\n }\n | undefined\n\nexport const FormCustomContext = React.createContext<FormCustomContextType>({\n appearance: 'standard'\n})\n\nexport const useFormCustomContext = () => React.use(FormCustomContext)\n","import { overrideStyledVariantValue } from '../override-styled-variant-value/overrideStyledVariantValue'\n\nconst toIconSize = {\n sm: 'sm',\n md: 'md',\n lg: 'md'\n}\n\nexport const getFieldIconSize = (size: any) =>\n overrideStyledVariantValue(size, (s) => toIconSize[s])\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Text } from '../text/Text'\n\nexport const InputBackground = styled('div', {\n base: [\n 'flex',\n 'text-grey-1000',\n 'transition-[background,border-color]',\n 'duration-100',\n 'ease-out',\n 'w-full'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-blue-800',\n 'rounded-md'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1',\n 'rounded-md'\n ]\n },\n size: {\n sm: ['h-8'],\n md: ['h-10'],\n lg: ['h-12'],\n xl: ['h-16']\n },\n disabled: {\n true: ['cursor-not-allowed', 'opacity-30']\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n})\n\nInputBackground.displayName = 'InputBackground'\n\n// @__PURE__ keeps this tree-shakable for consumers importing only\n// InputBackground from this module.\nconst StyledInputText = /* @__PURE__ */ styled(Text, {\n base: [\n 'appearance-none',\n 'border-none',\n 'bg-none',\n 'bg-transparent',\n 'shadow-none',\n 'box-border',\n 'focus:outline-none',\n 'px-3',\n 'size-full',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ]\n})\n\nexport type InputTextProps = Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> &\n Omit<React.ComponentProps<typeof StyledInputText>, 'type' | 'as' | 'ref'> & {\n // override default 'type' property to prevent Input from being used to render\n // checkboxes, radios etc — we have dedicated components for them\n type?: 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'search'\n as?: never\n disabled?: boolean\n // StyledInputText wraps Text (default element 'p'), but InputText always\n // renders it as=\"input\", so the inherited paragraph ref must be overridden\n ref?: React.Ref<HTMLInputElement>\n }\n\nconst toTextSize = {\n sm: 'sm',\n md: 'md',\n lg: 'md',\n xl: 'lg'\n}\n\nexport const InputText = ({\n ref,\n type = 'text',\n size,\n ...rest\n}: InputTextProps) => {\n const textSize = overrideStyledVariantValue(size, (s) => toTextSize[s])\n\n return (\n <StyledInputText\n ref={ref}\n as=\"input\"\n type={type === 'number' ? 'text' : type}\n inputMode={type === 'number' ? 'numeric' : undefined}\n pattern={type === 'number' ? '[0-9]*' : undefined}\n size={textSize}\n {...rest}\n />\n )\n}\n\ntype InputBackgroundProps = React.ComponentProps<typeof InputBackground>\nexport type InputProps = Omit<\n React.ComponentProps<typeof InputText>,\n 'size' | 'state' | 'appearance'\n> & {\n size?: InputBackgroundProps['size']\n state?: InputBackgroundProps['state']\n appearance?: InputBackgroundProps['appearance']\n theme?: InputBackgroundProps['theme']\n disabled?: boolean\n name?: string\n readOnly?: boolean\n value?: string | number\n onChange?: React.ChangeEventHandler<HTMLInputElement>\n}\n\nexport const Input = ({\n ref,\n className,\n size = 'md',\n appearance = 'standard',\n theme,\n state,\n disabled,\n style,\n ...rest\n}: InputProps) => (\n <InputBackground\n size={size}\n appearance={appearance}\n theme={theme}\n disabled={disabled}\n state={state}\n className={className}\n style={style}\n >\n <InputText size={size} ref={ref} disabled={disabled} {...rest} />\n </InputBackground>\n)\n","import { Eye, EyeCrossed } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useState } from 'react'\n\nimport { cn } from '../../styled'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport type { InputProps } from '../input/Input'\nimport { Input } from '../input/Input'\n\ntype PasswordInputProps = Omit<InputProps, 'type'> & {\n hidePasswordText?: string\n showPasswordText?: string\n}\n\nexport const PasswordInput = ({\n ref,\n className,\n hidePasswordText = 'Hide password',\n showPasswordText = 'Show password',\n size = 'md',\n ...restProps\n}: PasswordInputProps) => {\n const [isPasswordVisible, setIsPasswordVisible] = useState<boolean>(false)\n const togglePasswordVisibility = () =>\n setIsPasswordVisible((currentState) => !currentState)\n\n const iconSize = getFieldIconSize(size)\n\n return (\n <div className={cn('relative', className)}>\n <Input\n {...restProps}\n size={size}\n type={isPasswordVisible ? 'text' : 'password'}\n ref={ref}\n className=\"pr-6\"\n />\n <ActionIcon\n appearance=\"simple\"\n theme=\"neutral\"\n label={isPasswordVisible ? hidePasswordText : showPasswordText}\n onClick={togglePasswordVisibility}\n onMouseDown={(e) => e.preventDefault()} // prevent focus being lost from password input\n size={iconSize}\n className={cn(\n size === 'lg' ? 'bottom-1' : 'bottom-0',\n 'absolute',\n 'right-0'\n )}\n >\n <Icon is={isPasswordVisible ? Eye : EyeCrossed} />\n </ActionIcon>\n </div>\n )\n}\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport { cn } from '../../styled'\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { PasswordInput } from '../password-input/PasswordInput'\n\ntype PasswordFieldProps = React.ComponentProps<typeof PasswordInput> &\n Omit<FieldElementWrapperProps, 'label'> & {\n label?: string\n }\n\nexport const PasswordField = ({\n className,\n hideLabel,\n label = 'Password',\n name,\n prompt = undefined,\n description,\n validation,\n appearance,\n theme,\n ...rest\n}: PasswordFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n className={cn('relative', className)}\n >\n <PasswordInput\n autoComplete=\"current-password\"\n name={name}\n id={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error !== undefined && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nPasswordField.displayName = 'PasswordField'\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport { throttle } from 'throttle-debounce'\nimport invariant from 'tiny-invariant'\n\nimport type { Override } from '../../utilities/types'\nimport type { FieldElementWrapperProps } from '../field-wrapper/FieldWrapper'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { PasswordField } from '../password-field/PasswordField'\nimport { PasswordInput } from '../password-input/PasswordInput'\n\ntype ValidationResult = Record<string, boolean>\n\nconst getMessageTheme = (result: boolean, isFocused: boolean) => {\n if (result) return 'success'\n\n return isFocused ? 'neutral' : 'error'\n}\n\ntype CreatePasswordFieldProps = Override<\n React.ComponentProps<typeof PasswordInput> & FieldElementWrapperProps,\n {\n label?: string\n name?: string\n validate: (\n password: string\n ) => Promise<ValidationResult | undefined> | ValidationResult\n defaultValidation: ValidationResult\n messageDirection?: 'row' | 'column'\n }\n>\n\nexport const CreatePasswordField = ({\n validate,\n defaultValidation,\n messageDirection = 'row',\n label = 'Create a password',\n name = 'password',\n className,\n validation,\n appearance,\n ...rest\n}: CreatePasswordFieldProps) => {\n const { formState, control } = useFormContext()\n const [isFocused, setIsFocused] = React.useState<boolean>(false)\n const [validationResult, setValidationResult] =\n React.useState<ValidationResult>(defaultValidation)\n\n const touched: boolean = formState.touched[name]\n const error =\n formState.errors[name]?.type === 'validate' ||\n Object.values(validationResult).every((isValid) => !isValid)\n\n const validatePassword = React.useCallback(\n async (password: string) => {\n const result = await validate(password)\n\n if (result) {\n invariant(\n typeof result === 'object',\n 'The validate function must return an object'\n )\n\n setValidationResult(result)\n return Object.values(result).every((isValid) => isValid)\n }\n\n return false\n },\n [setValidationResult]\n )\n\n // useMemo, not useCallback(throttle(...)): the throttler must survive\n // re-renders or its timing window resets every render.\n const handleChange = React.useMemo(\n () => throttle(500, validatePassword),\n [validatePassword]\n )\n\n const showValidation: boolean =\n (control.mode.isOnBlur && (isFocused || touched)) ||\n (control.mode.isOnSubmit && (isFocused || (formState.isSubmitted && error)))\n\n return (\n <div className={className}>\n <PasswordField\n label={label}\n name={name}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n handleChange(e.target.value)\n }\n onBlur={() => setIsFocused(false)}\n onFocus={() => setIsFocused(true)}\n validation={{ ...validation, validate: validatePassword }}\n appearance={appearance}\n {...rest}\n />\n {showValidation && (\n <div\n style={{ '--direction': messageDirection }}\n className=\"direction-(--direction) mt-2 flex flex-wrap gap-2\"\n >\n {Object.entries(validationResult).map(([message, result]) => (\n <InlineMessage\n key={message}\n theme={getMessageTheme(result, isFocused)}\n >\n {message}\n </InlineMessage>\n ))}\n </div>\n )}\n </div>\n )\n}\n\nCreatePasswordField.displayName = 'CreatePasswordField'\n","import type {\n InitialTableState,\n Row,\n RowSelectionState,\n SortDirection,\n Table\n} from '@tanstack/react-table'\nimport * as React from 'react'\n\nexport enum AsyncDataState {\n NONE = 'none',\n PENDING = 'pending',\n FULFILLED = 'fulfilled',\n REJECTED = 'rejected'\n}\n\nexport type AsyncDataResult = {\n total: number\n results: TableData\n}\n\nexport type AsyncDataOptions = {\n pageIndex: number\n pageSize: number\n sortBy?: string\n sortDirection?: SortDirection\n globalFilter?: string\n}\n\nexport type GetAsyncData = (\n options: AsyncDataOptions\n) => Promise<AsyncDataResult | undefined>\n\nexport type TablePosition = {\n top: number | null\n bottom: number | null\n offsetTop: number\n isVisible: boolean\n}\n\nexport type DataTableContextType<T = unknown> = Table<T> & {\n setIsSortable: React.Dispatch<React.SetStateAction<boolean>>\n applyPagination: () => void\n removePagination: () => void\n getTotalRows: () => number\n isSortable: boolean\n asyncDataState?: AsyncDataState\n runAsyncData?: (options: Partial<AsyncDataOptions>) => Promise<void>\n hasAsyncData: boolean\n disabledRows?: Record<string, boolean>\n enableRowSelection?: boolean | ((row: Row<unknown>) => boolean)\n rowSelection: RowSelectionState\n tablePosition?: TablePosition\n setTablePosition: React.Dispatch<React.SetStateAction<TablePosition>>\n data: AsyncDataResult\n columns: any\n tableId: string\n /**\n * Directly update the data array that the table rows are built from.\n * This is useful when re-ordering rows, but is high-risk if you're not sure what you're doing!\n *\n * Note in particular that this value is also updated if you update the value of the `DataTable`'s `data` prop\n * — it's probably best to only use one of those two methods for any given table.\n */\n setData: React.Dispatch<React.SetStateAction<AsyncDataResult>>\n}\n\nexport type TableData = Array<Record<string, unknown>>\n\n// Use tanstack's purpose-built initial-state type rather than composing from\n// the full `*TableState` interfaces: a shallow `Partial<… & PaginationTableState>`\n// leaves `pagination` typed as the full `PaginationState` (requiring `pageIndex`),\n// whereas `InitialTableState` correctly types it as `Partial<PaginationState>` so\n// consumers can pass e.g. `{ pagination: { pageSize } }`.\nexport type InitialState = InitialTableState\n\nexport type DefaultSort = { column: string; direction: SortDirection }\n","import type {\n PaginationState,\n SortDirection,\n SortingState\n} from '@tanstack/react-table'\nimport invariant from 'tiny-invariant'\n\nimport type {\n AsyncDataOptions,\n AsyncDataResult,\n GetAsyncData\n} from './DataTable.types'\n\nconst getSortDirection = (sorting: SortingState): SortDirection | undefined => {\n if (sorting[0]) {\n return sorting[0].desc ? 'desc' : 'asc'\n }\n return undefined\n}\n\nexport const getNewAsyncData = async (\n getAsyncData: GetAsyncData,\n asyncDataOptions: Partial<AsyncDataOptions>,\n paginationState: PaginationState,\n sorting: SortingState,\n globalFilter: string\n): Promise<AsyncDataResult | undefined> => {\n const { pageIndex, pageSize } = paginationState\n const params = {\n pageIndex: asyncDataOptions?.pageIndex ?? pageIndex,\n pageSize: asyncDataOptions?.pageSize ?? pageSize,\n sortBy: asyncDataOptions?.sortBy ?? sorting[0]?.id,\n sortDirection: asyncDataOptions?.sortDirection ?? getSortDirection(sorting),\n globalFilter: asyncDataOptions.globalFilter ?? globalFilter\n }\n\n const newData = await getAsyncData(params)\n\n invariant(\n Array.isArray(newData?.results),\n 'The getAsyncData function must return an object with a property `result` which must be an array'\n )\n invariant(\n newData && Number.isInteger(newData.total) && newData.total >= 0,\n 'The getAsyncData function must return an object with a property `total` which must be a positive integer or zero'\n )\n\n return newData\n}\n","import type { PaginationState } from '@tanstack/react-table'\nimport * as React from 'react'\n\nconst defaultPaginationState: PaginationState = { pageIndex: 0, pageSize: 10 }\nexport const usePagination = (\n // Initial pagination may be partial (e.g. just `pageSize`); defaults below\n // fill the rest, so the working `paginationState` stays a full PaginationState.\n initialPaginationState: Partial<PaginationState> | undefined\n) => {\n const [isPaginated, setIsPaginated] = React.useState<boolean>(\n !!initialPaginationState\n )\n\n const [paginationState, setPaginationState] = React.useState<\n PaginationState | undefined\n >({\n ...defaultPaginationState,\n ...(initialPaginationState || {})\n })\n\n const applyPagination = React.useCallback(() => {\n setIsPaginated(true)\n }, [])\n\n // Lets <Pagination> undo applyPagination when it unmounts, restoring\n // whatever the provider was configured with initially.\n const wasInitiallyPaginated = React.useRef(!!initialPaginationState)\n const removePagination = React.useCallback(() => {\n setIsPaginated(wasInitiallyPaginated.current)\n }, [])\n\n return {\n isPaginated,\n paginationState,\n setPaginationState,\n applyPagination,\n removePagination\n }\n}\n","import type { SortingState } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport type { DefaultSort } from './DataTable.types'\n\nexport const useSortByColumn = (defaultSort: DefaultSort | undefined) => {\n const [isSortable, setIsSortable] = React.useState<boolean>(false)\n\n const [sorting, setSorting] = React.useState<SortingState>(\n defaultSort\n ? [\n {\n id: defaultSort.column,\n desc: defaultSort.direction === 'desc'\n }\n ]\n : []\n )\n\n return { isSortable, setIsSortable, sorting, setSorting }\n}\n","import type {\n ExpandedState,\n OnChangeFn,\n PaginationState,\n Row,\n RowSelectionState\n} from '@tanstack/react-table'\nimport {\n getCoreRowModel,\n getExpandedRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable\n} from '@tanstack/react-table'\nimport * as React from 'react'\n// Use the named export, not the default: the CJS build's Node-mode interop\n// (__toESM(mod, 1)) shadows this package's `default` with the whole module\n// object, so a default import resolves to a non-callable object at runtime.\n// NoCheck is equivalent here — the dep (`dataProp`) is always an array, so the\n// default export's dev-only all-primitive guard would never fire.\nimport { useDeepCompareEffectNoCheck as useDeepCompareEffect } from 'use-deep-compare-effect'\n\nimport {\n AsyncDataState,\n type DataTableContextType,\n type InitialState,\n type TableData,\n type TablePosition,\n type AsyncDataOptions,\n type AsyncDataResult,\n type DefaultSort,\n type GetAsyncData\n} from './DataTable.types'\nimport { getNewAsyncData } from './getNewAsyncData'\nimport { usePagination } from './usePagination'\nimport { useSortByColumn } from './useSorting'\n\nconst DataTableContext =\n React.createContext<DataTableContextType<unknown> | null>(null)\n\ntype DataTableProviderProps = {\n columns\n defaultSort?: DefaultSort\n children: React.ReactNode\n initialState?: InitialState\n disabledRows?: Record<string, boolean>\n enableRowSelection?: boolean | ((row: Row<unknown>) => boolean)\n onRowSelectionChange?: OnChangeFn<RowSelectionState>\n} & (\n | { data: TableData; getAsyncData?: never }\n | { data?: never; getAsyncData: GetAsyncData }\n)\n\nexport const DataTableProvider = ({\n columns,\n data: dataProp = [],\n getAsyncData,\n defaultSort,\n initialState = undefined,\n disabledRows,\n enableRowSelection,\n onRowSelectionChange,\n children\n}: DataTableProviderProps) => {\n // Rendered into checkbox id/htmlFor/name attributes, so it must be\n // identical between server and client render — useId guarantees this.\n const tableId = React.useId()\n\n const [data, setData] = React.useState<AsyncDataResult>({\n results: dataProp ?? [],\n total: dataProp?.length ?? 0\n })\n\n const [rowSelection, setRowSelection] = React.useState<RowSelectionState>({})\n const [expanded, setExpanded] = React.useState<ExpandedState>({})\n\n const [tablePosition, setTablePosition] = React.useState<TablePosition>({\n top: null,\n bottom: null,\n offsetTop: 0,\n isVisible: true\n })\n\n const {\n isPaginated,\n applyPagination,\n removePagination,\n paginationState,\n setPaginationState\n } = usePagination(initialState?.pagination)\n\n const [asyncDataState, setAsyncDataState] = React.useState<AsyncDataState>(\n AsyncDataState.NONE\n )\n\n const [globalFilter, setGlobalFilter] = React.useState<string>('')\n\n const { setIsSortable, isSortable, sorting, setSorting } =\n useSortByColumn(defaultSort)\n\n // Monotonic sequence so only the latest in-flight request may commit its\n // response — without this, rapid pagination/sort/filter changes race two\n // requests and the slower, stale response wins `setData`.\n const asyncRequestIdRef = React.useRef(0)\n\n const runAsyncData = React.useCallback(\n async (overrideAsyncDataOptions: Partial<AsyncDataOptions>) => {\n if (!getAsyncData) return\n\n const requestId = ++asyncRequestIdRef.current\n\n try {\n setAsyncDataState(AsyncDataState.PENDING)\n\n const newData = await getNewAsyncData(\n getAsyncData,\n overrideAsyncDataOptions,\n paginationState as PaginationState,\n sorting,\n globalFilter\n )\n\n if (requestId !== asyncRequestIdRef.current) return\n\n setData(newData as AsyncDataResult)\n setAsyncDataState(AsyncDataState.FULFILLED)\n } catch (_error) {\n if (requestId !== asyncRequestIdRef.current) return\n\n setAsyncDataState(AsyncDataState.REJECTED)\n }\n },\n [\n getAsyncData,\n paginationState?.pageIndex,\n paginationState?.pageSize,\n sorting,\n globalFilter\n ]\n )\n\n React.useEffect(() => {\n runAsyncData({})\n }, [runAsyncData])\n\n useDeepCompareEffect(() => {\n if (!dataProp) return\n\n setData({ results: dataProp, total: dataProp.length })\n }, [dataProp])\n\n const getTotalRows = React.useCallback(() => data.total, [data.total])\n\n const table = useReactTable<unknown>({\n columns,\n data: data.results,\n pageCount:\n getAsyncData && paginationState\n ? Math.ceil(getTotalRows() / paginationState.pageSize)\n : -1,\n initialState: initialState,\n state: {\n sorting,\n globalFilter,\n pagination: paginationState,\n rowSelection,\n expanded\n },\n manualPagination: getAsyncData && isPaginated,\n manualSorting: getAsyncData && isPaginated,\n enableSorting: asyncDataState !== AsyncDataState.PENDING,\n enableGlobalFilter: !getAsyncData,\n enableRowSelection,\n onExpandedChange: setExpanded,\n getSubRows: (row) => (row as Row<unknown>).subRows,\n onRowSelectionChange: (updaterOrValue) => {\n if (onRowSelectionChange) onRowSelectionChange(updaterOrValue)\n setRowSelection(updaterOrValue)\n },\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: isPaginated ? getPaginationRowModel() : undefined,\n getSortedRowModel:\n isSortable || sorting.length ? getSortedRowModel() : undefined,\n getFilteredRowModel: getFilteredRowModel(),\n getExpandedRowModel: getExpandedRowModel(),\n onPaginationChange: isPaginated\n ? (setPaginationState as OnChangeFn<PaginationState>)\n : undefined,\n onSortingChange: setSorting,\n onGlobalFilterChange: setGlobalFilter,\n globalFilterFn: (row, columnId, filterValue) => {\n const checkFilterMatchesCell = (cellValue: string) =>\n cellValue.toLowerCase().includes(filterValue.toLowerCase())\n\n const isSubRow = row.depth > 0\n\n if (isSubRow) return true\n\n const value = row.getValue(columnId)\n switch (typeof value) {\n case 'string':\n return checkFilterMatchesCell(value)\n case 'boolean':\n case 'number':\n return checkFilterMatchesCell(String(value))\n default:\n return false\n }\n }\n })\n\n const value: DataTableContextType = React.useMemo(() => {\n return {\n ...table,\n columns,\n data,\n setData,\n setIsSortable,\n applyPagination,\n removePagination,\n getTotalRows,\n isSortable,\n asyncDataState,\n runAsyncData,\n hasAsyncData: !!getAsyncData,\n disabledRows,\n enableRowSelection,\n rowSelection,\n tablePosition,\n setTablePosition,\n tableId\n }\n // The value object's identity is what notifies consumers, and the spread\n // `table` instance is stable while its internal state changes — so every\n // piece of provider state must be a dep here or consumers go stale.\n }, [\n table,\n columns,\n data,\n applyPagination,\n removePagination,\n getTotalRows,\n isSortable,\n asyncDataState,\n runAsyncData,\n getAsyncData,\n disabledRows,\n enableRowSelection,\n rowSelection,\n tablePosition,\n expanded,\n sorting,\n globalFilter,\n paginationState,\n isPaginated,\n tableId\n ])\n\n return <DataTableContext value={value}>{children}</DataTableContext>\n}\n\nexport const useDataTable = <T extends Record<string, unknown>>() => {\n const context = React.use(DataTableContext) as DataTableContextType<T>\n\n if (!context)\n throw new Error(\n 'useDataTable can only be called from inside a DataTableProvider'\n )\n\n return context\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledTableBody = styled('tbody', {\n base: [],\n variants: {\n striped: {\n true: ['[&_tr]:even:bg-grey-100', '[&_tr]:odd:bg-white'],\n false: ['[&_tr]:bg-white']\n }\n }\n})\n\ntype TableBodyProps = React.ComponentProps<typeof StyledTableBody>\n\nexport const TableBody = ({ striped = true, ...rest }: TableBodyProps) => (\n <StyledTableBody striped={striped} {...rest} />\n)\n\nTableBody.displayName = 'TableBody'\n","import { styled } from '../../styled'\n\nexport const TableCell = styled('td', {\n base: [\n 'border-t',\n 'border-t-grey-100',\n 'box-border',\n 'text-grey-800',\n 'font-body',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n 'first:font-semibold'\n ]\n})\n\nTableCell.displayName = 'TableCell'\n","import { styled } from '../../styled'\n\nexport const TableFooter = styled('tfoot', {\n base: []\n})\n\nTableFooter.displayName = 'TableFooter'\n","import { styled } from '../../styled'\n\nexport const TableFooterCell = styled('td', {\n base: [\n 'text-grey-800',\n 'font-body',\n 'font-semibold',\n 'text-left',\n 'align-middle'\n ]\n})\n\nTableFooterCell.displayName = 'TableFooterCell'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const TABLE_HEADER_THEMES = {\n PRIMARY: 'primary',\n PRIMARY_DARK: 'primaryDark',\n PRIMARY_LIGHT: 'primaryLight',\n LIGHT: 'light',\n WHITE: 'white'\n} as const\n\nconst StyledTableHeader = /* @__PURE__ */ styled('thead', {\n base: [],\n variants: {\n theme: {\n [TABLE_HEADER_THEMES.PRIMARY]: ['[&_th]:bg-primary-800'],\n [TABLE_HEADER_THEMES.PRIMARY_DARK]: ['[&_th]:bg-primary-1000'],\n [TABLE_HEADER_THEMES.PRIMARY_LIGHT]: [\n '[&_th]:bg-primary-200',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.LIGHT]: [\n '[&_th]:bg-grey-100',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.WHITE]: ['[&_th]:bg-white', '[&_th]:text-grey-1000']\n },\n isSticky: {\n true: ['sticky', 'top-0', 'z-3']\n }\n }\n})\n\ntype TableHeaderProps = React.ComponentProps<typeof StyledTableHeader>\n\nexport const TableHeader = ({\n theme = 'primaryDark',\n isSticky = false,\n ...rest\n}: TableHeaderProps) => {\n return <StyledTableHeader theme={theme} isSticky={isSticky} {...rest} />\n}\n\nTableHeader.displayName = 'TableHeader'\n","import { styled } from '../../styled'\n\nexport const TableHeaderCell = styled('th', {\n base: [\n 'text-white',\n 'font-body',\n 'font-semibold',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n '[[colspan]]:text-center'\n ]\n})\n\nTableHeaderCell.displayName = 'TableHeaderCell'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledRow = styled('tr', {\n base: ['bg-[unset]']\n})\n\nexport const TableRow = (props: React.ComponentProps<typeof StyledRow>) => (\n <StyledRow {...props} />\n)\n","import * as React from 'react'\n\ntype ColumnStyle = Record<\n `--sticky-column-width-${number}` | `--sticky-offset-left-${number}`,\n string\n>\n\ninterface UseStickyColumnsCss {\n columnsStyle?: ColumnStyle\n}\n\nexport const useStickyColumnsStyle = ({\n numberOfStickyColumns,\n wrapperRef\n}: {\n numberOfStickyColumns: number\n wrapperRef: React.RefObject<HTMLDivElement | null>\n}): UseStickyColumnsCss => {\n const [columnsStyle, setColumnsStyle] = React.useState<ColumnStyle>({})\n\n const generateColumnsStyle = React.useCallback(() => {\n let accWidth = 0\n\n // Getting the table header cells elements to use their width to set the left position in the sticky columns.\n const tableHeaderCells = wrapperRef.current?.querySelectorAll('th')\n const tableHeaderElements = [...(tableHeaderCells || [])]\n\n // Getting only the number of sticky columns from the elements array that is what we are interested in.\n const stickyColumns = tableHeaderElements.slice(0, numberOfStickyColumns)\n\n const newColumnsStyle = stickyColumns.reduce((acc, column, index) => {\n const elementNumber = index + 1\n const styleObject = {\n ...acc,\n [`--sticky-column-width-${elementNumber}`]: `${column.offsetWidth}px`,\n [`--sticky-offset-left-${elementNumber}`]: `${accWidth}px`\n }\n\n accWidth += tableHeaderCells?.item(index).clientWidth || 0\n\n return styleObject\n }, {})\n\n return newColumnsStyle\n }, [numberOfStickyColumns, wrapperRef])\n\n React.useLayoutEffect(() => {\n if (!numberOfStickyColumns) return\n const newColumnsStyle = generateColumnsStyle()\n\n setColumnsStyle(newColumnsStyle)\n }, [numberOfStickyColumns, wrapperRef, generateColumnsStyle])\n\n return {\n columnsStyle\n }\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { useStickyColumnsStyle } from './useStickyColumnsCss'\n\nexport const TableStickyColumnsContainer = ({\n children,\n numberOfStickyColumns = 0,\n className,\n ...restProps\n}: React.PropsWithChildren<{\n numberOfStickyColumns?: number\n className?: string\n}>) => {\n const [hasScroll, setHasScroll] = React.useState<boolean>(false)\n const wrapperRef = React.useRef<HTMLDivElement | null>(null)\n const { columnsStyle } = useStickyColumnsStyle({\n numberOfStickyColumns,\n wrapperRef\n })\n\n const handleScroll = (event: React.UIEvent<HTMLDivElement>) => {\n const newHasScroll = event.currentTarget.scrollLeft > 0\n if (newHasScroll !== hasScroll) {\n setHasScroll(newHasScroll)\n }\n }\n\n return (\n <div\n onScroll={handleScroll}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"scrollbar\"\n ref={wrapperRef}\n style={columnsStyle}\n className={cn(\n 'overflow-auto',\n 'max-w-full',\n 'relative',\n 'overscroll-x-contain',\n '[&_td,&_th]:bg-inherit',\n className,\n numberOfStickyColumns >= 1 && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:sticky',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:left-(--sticky-offset-left-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:min-w-(--sticky-column-width-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:z-2'\n ],\n numberOfStickyColumns >= 2 && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:sticky',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:left-(--sticky-offset-left-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:min-w-(--sticky-column-width-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:z-2'\n ],\n numberOfStickyColumns >= 3 && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:sticky',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:left-(--sticky-offset-left-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:min-w-(--sticky-column-width-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:z-2'\n ],\n numberOfStickyColumns >= 4 && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:sticky',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:left-(--sticky-offset-left-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:min-w-(--sticky-column-width-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:z-2'\n ],\n numberOfStickyColumns === 1 &&\n hasScroll && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 2 &&\n hasScroll && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 3 &&\n hasScroll && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 4 &&\n hasScroll && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ]\n )}\n {...restProps}\n >\n {children}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { TableBody } from './TableBody'\nimport { TableCell } from './TableCell'\nimport { TableFooter } from './TableFooter'\nimport { TableFooterCell } from './TableFooterCell'\nimport { TableHeader } from './TableHeader'\nimport { TableHeaderCell } from './TableHeaderCell'\nimport { TableRow } from './TableRow'\nimport { TableStickyColumnsContainer } from './TableStickyColumnsContainer'\n\nconst StyledTable = styled('table', {\n base: [\n 'border-separate',\n 'border-spacing-0',\n 'font-sans',\n 'text-sm',\n 'w-full',\n 'relative',\n 'z-0'\n ],\n variants: {\n size: {\n md: ['[&_td,&_th]:h-10', '[&_td,&_th]:px-3', '[&_td,&_th]:py-1'],\n lg: [\n '[&_td,&_th]:h-12',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ],\n xl: [\n '[&_th]:h-12',\n '[&_td]:h-16',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ]\n },\n corners: {\n round: ['rounded-md'],\n square: []\n }\n }\n})\n\ntype TableProps = React.ComponentProps<typeof StyledTable> & {\n numberOfStickyColumns?: number\n scrollContainerCls?: string | string[]\n scrollContainerkey?: string\n maxRowDepth?: number\n}\n\nconst TableComponent = ({\n ref,\n size = 'md',\n corners = 'round',\n numberOfStickyColumns = 0,\n scrollContainerCls,\n scrollContainerkey,\n ...rest\n}: TableProps) => {\n const tableComponent = (\n <StyledTable ref={ref} size={size} corners={corners} {...rest} />\n )\n\n if (numberOfStickyColumns) {\n return (\n <TableStickyColumnsContainer\n key={scrollContainerkey}\n className={cn(scrollContainerCls)}\n numberOfStickyColumns={numberOfStickyColumns}\n >\n {tableComponent}\n </TableStickyColumnsContainer>\n )\n }\n\n return tableComponent\n}\n\nexport const Table = /* @__PURE__ */ Object.assign(TableComponent, {\n Body: TableBody,\n Cell: TableCell,\n Footer: TableFooter,\n FooterCell: TableFooterCell,\n Header: TableHeader,\n HeaderCell: TableHeaderCell,\n Row: TableRow,\n StickyColumnsContainer: TableStickyColumnsContainer\n})\n","import type { Cell } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Table } from '../table/Table'\n\ntype DataTableDataCellProps = {\n cell: Cell<Record<string, unknown>, unknown>\n}\n\nexport const DataTableDataCell = ({ cell }: DataTableDataCellProps) => (\n <Table.Cell key={cell.id}>\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </Table.Cell>\n)\n","import type { Row } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { useDataTable } from './DataTable.context'\n\nexport const DataTableRowSelectionCheckbox = ({\n row,\n checked,\n onCheckedChange,\n label = `Row ${row.id} selection`\n}: {\n row: Row<Record<string, unknown>>\n checked: boolean | 'indeterminate'\n onCheckedChange: (value: boolean) => void\n label?: string\n}): React.ReactElement<unknown> => {\n const { tableId } = useDataTable()\n\n return (\n <>\n <label htmlFor={`${tableId}_row_${row.id}_selection`} className=\"sr-only\">\n {label}\n </label>\n <Checkbox\n size=\"lg\"\n style={{ '--depth': row.depth }}\n checked={checked}\n onCheckedChange={onCheckedChange}\n id={`${tableId}_row_${row.id}_selection`}\n name={`${tableId}_row_${row.id}_selection`}\n disabled={!row.getCanSelect()}\n className=\"mr-3 ml-[calc((var(--depth,0)*2)*4px)]\"\n />\n </>\n )\n}\n","import { ChevronDown, ChevronRight } from '@atom-learning/icons'\nimport type { Row } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableDataCell } from './DataTableDataCell'\nimport { DataTableRowSelectionCheckbox } from './DataTableRowSelectionCheckbox'\n\nexport type DataTableRowProps = React.ComponentProps<typeof Table.Row> & {\n row: Row<Record<string, unknown>>\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n}\n\nconst StyledRow = styled(Table.Row, {\n base: ['bg-[initial]', 'relative'],\n variants: {\n isSelected: {\n true: ['bg-primary-100!']\n },\n isDisabled: {\n true: ['opacity-30']\n },\n isFocusable: {\n true: [\n 'translate-y-0',\n 'duration-200',\n 'ease-out',\n 'transition-shadow',\n 'transition-transform',\n 'hover:shadow-[0px_4px_11px_0px_hsla(0,0%,12%,0.12)]',\n 'hover:-translate-y-px',\n 'hover:z-3',\n 'focus:outline-2',\n 'focus:outline-primary-500',\n 'focus:outline-solid',\n 'focus:-outline-offset-4',\n 'focus:[&_td]:bg-transparent'\n ]\n }\n }\n})\n\nconst isElementInteractive = (element: Element | null): boolean => {\n if (!element) return false\n if (element.closest('button, a, input, select, textarea')) return true\n if (element.getAttribute('role') === 'button') return true\n return false\n}\n\nexport const DataTableRow = ({ row, rowAction }: DataTableRowProps) => {\n const { enableRowSelection, disabledRows, getCanSomeRowsExpand } =\n useDataTable()\n\n const isDisabled = !!disabledRows?.[row.id]\n\n const toggleExpandHandler = row.getToggleExpandedHandler()\n const toggleSelectHandler = row.getToggleSelectedHandler()\n\n const getCheckedState = (): boolean | 'indeterminate' => {\n if (row.getIsSomeSelected()) return 'indeterminate'\n return row.getIsSelected()\n }\n\n const handleRowClick = (\n rowData: Row<Record<string, unknown>>,\n event: React.MouseEvent<HTMLTableRowElement>\n ) => {\n if (!rowAction) return\n\n // Skip if clicking on an interactive element\n const rowElement = (event.target as Element).closest('tr')\n if (!rowElement || isElementInteractive(event.target as Element)) {\n return\n }\n\n rowAction(rowData.original, event)\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n if (isElementInteractive(event.target as Element)) {\n return\n }\n event.preventDefault()\n handleRowClick(\n row,\n event as unknown as React.MouseEvent<HTMLTableRowElement>\n )\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n const currentRow = (event.target as HTMLElement).closest('tr')\n const nextRow = currentRow?.nextElementSibling as HTMLElement\n if (nextRow && nextRow.tagName === 'TR') {\n nextRow.focus()\n }\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n const currentRow = (event.target as HTMLElement).closest('tr')\n const previousRow = currentRow?.previousElementSibling as HTMLElement\n if (previousRow && previousRow.tagName === 'TR') {\n previousRow.focus()\n }\n }\n }\n\n return (\n <StyledRow\n isSelected={row.getIsSelected()}\n isDisabled={isDisabled}\n isFocusable={!!rowAction && !isDisabled}\n {...(rowAction && {\n onClick: (event) => handleRowClick(row, event),\n tabIndex: 0,\n className: 'cursor-pointer',\n onKeyDown: handleKeyDown\n })}\n >\n {getCanSomeRowsExpand() && (\n <Table.Cell\n data-testid={`expand-icon-${row.id}`}\n onClick={toggleExpandHandler}\n className={cn(\n 'w-10',\n row.getCanExpand() ? 'cursor-pointer' : 'cursor-auto'\n )}\n >\n {row.getCanExpand() && (\n <Icon is={row.getIsExpanded() ? ChevronDown : ChevronRight} />\n )}\n </Table.Cell>\n )}\n\n {enableRowSelection && (\n <Table.Cell className=\"w-10\">\n <DataTableRowSelectionCheckbox\n row={row}\n checked={getCheckedState()}\n onCheckedChange={toggleSelectHandler}\n />\n </Table.Cell>\n )}\n {row.getVisibleCells().map((cell) => {\n return <DataTableDataCell key={cell.id} cell={cell} />\n })}\n </StyledRow>\n )\n}\n","import * as React from 'react'\n\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableRow } from './DataTableRow'\n\ntype DataTableBodyProps = Omit<\n React.ComponentProps<typeof Table.Body>,\n 'children'\n> & {\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n}\n\nexport const DataTableBody = ({\n striped = false,\n rowAction,\n ...rest\n}: DataTableBodyProps) => {\n const { getRowModel } = useDataTable()\n\n return (\n <Table.Body {...rest} striped={striped}>\n {getRowModel().rows.map((row) => {\n return <DataTableRow row={row} key={row.id} rowAction={rowAction} />\n })}\n </Table.Body>\n )\n}\n","import { styled } from '../../styled'\n\nexport const Divider = styled(\n 'hr',\n {\n base: ['border-none', 'bg-grey-200'],\n variants: {\n orientation: {\n horizontal: ['h-px', 'w-full'],\n vertical: ['h-full', 'min-h-8', 'w-px']\n }\n },\n defaultVariants: {\n orientation: 'horizontal'\n }\n },\n { enableResponsiveVariants: true }\n)\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\nimport { useDataTable } from './DataTable.context'\n\nconst defaultCopy = {\n sorted_by: 'Sorted by',\n ascending: 'ascending',\n descending: 'descending',\n separator: '-'\n}\n\nexport const DataTableMetaData = ({\n copy,\n ...rest\n}: React.ComponentProps<typeof Text> & {\n copy?: {\n sorted_by?: string\n ascending?: string\n descending?: string\n separator?: string\n }\n sortLabel?: string\n}) => {\n const { getState, columns, getRowModel, rowSelection } = useDataTable()\n const { sorting } = getState()\n const isSorted = sorting.length > 0\n\n const totalRows = getRowModel()?.rows?.length\n\n const selectedRows = Object.keys(rowSelection || {}).length\n\n const copyMerged = { ...defaultCopy, ...copy }\n\n const getColumnDisplayName = (id: string) => {\n const sortedColumn = columns.find((col) => col.id === id)\n return sortedColumn?.header || id\n }\n\n const getSortingString = (sorting) => {\n return `${copyMerged.separator} ${\n copyMerged.sorted_by\n } ${getColumnDisplayName(sorting[0].id)} ${\n sorting[0].desc ? copyMerged.descending : copyMerged.ascending\n }`\n }\n\n return (\n <Text weight=\"bold\" {...rest}>{`${selectedRows || totalRows} ${\n (selectedRows || totalRows) === 1 ? 'item' : 'items'\n } ${selectedRows ? 'selected' : ''} ${\n isSorted ? getSortingString(sorting) : ''\n }`}</Text>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Button } from '../button/Button'\nimport { Divider } from '../divider/Divider'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableMetaData } from './DataTableMetaData'\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'p-2',\n 'w-full',\n 'mb-2',\n 'justify-between',\n 'items-center',\n 'min-h-16',\n 'rounded-t-sm'\n ],\n variants: {\n isRowSelected: {\n true: ['bg-primary-100']\n }\n }\n})\n\nconst BulkActionsDefaultActions = ({\n children\n}: {\n children: React.ReactElement<unknown>\n}): React.ReactElement<unknown> | null => {\n const { rowSelection } = useDataTable()\n\n if (Object.keys(rowSelection || {}).length > 0) return null\n\n return children\n}\n\nconst BulkActionsSelectedRowActions = ({\n cancelLabel = 'Cancel',\n children\n}: {\n cancelLabel?: string\n children: React.ReactNode\n}) => {\n const { toggleAllPageRowsSelected, rowSelection } = useDataTable()\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (Object.keys(rowSelection || {}).length === 0) return null\n\n return (\n <>\n {children}\n {React.Children.count(children) > 0 && (\n <Divider orientation=\"vertical\" className=\"mx-4\" />\n )}\n <Button theme=\"neutral\" onClick={handleDeselectAllPageRows}>\n {cancelLabel}\n </Button>\n </>\n )\n}\n\nexport const DataTableBulkActions = /* @__PURE__ */ Object.assign(\n ({\n children,\n ...rest\n }: {\n children:\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n | [\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >,\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n ]\n }) => {\n const { rowSelection } = useDataTable()\n\n const isRowSelected = Object.keys(rowSelection || {}).length > 0\n\n return (\n <StyledContainer isRowSelected={isRowSelected} {...rest}>\n <DataTableMetaData />\n <div className=\"flex items-center justify-end\">{children}</div>\n </StyledContainer>\n )\n },\n {\n DefaultActions: BulkActionsDefaultActions,\n SelectedRowActions: BulkActionsSelectedRowActions\n }\n)\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { Divider } from '../divider/Divider'\nimport { useDataTable } from './DataTable.context'\n\nexport const BulkActionsSelectedRowActions = ({\n cancelLabel = 'Cancel',\n showDividers = true,\n children\n}: {\n cancelLabel?: string\n showDividers?: boolean\n children: React.ReactNode\n}) => {\n const { toggleAllPageRowsSelected, rowSelection } = useDataTable()\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (Object.keys(rowSelection || {}).length === 0) return null\n\n return (\n <>\n {children}\n {showDividers && React.Children.count(children) > 0 && (\n <Divider orientation=\"vertical\" className=\"mx-4\" />\n )}\n <Button theme=\"neutral\" onClick={handleDeselectAllPageRows}>\n {cancelLabel}\n </Button>\n </>\n )\n}\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Badge } from '../badge/Badge'\nimport { Icon } from '../icon/Icon'\nimport { Text } from '../text/Text'\nimport { useDataTable } from './DataTable.context'\nimport { BulkActionsSelectedRowActions } from './DataTableBulkActionsSelectedRowActions'\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'pl-3',\n 'pr-1',\n 'py-2',\n 'mb-4',\n 'mt-2',\n 'justify-between',\n 'items-center',\n 'rounded-lg',\n 'bg-primary-800',\n 'pointer-events-auto',\n 'z-2',\n 'w-full',\n 'mx-4',\n 'shadow-lg',\n 'sm:max-w-200',\n 'lg:max-w-250',\n 'lg:mb-8',\n 'lg:pl-4',\n 'lg:pr-1',\n 'lg:py-3',\n 'xl:max-w-350',\n 'xl:mb-8',\n 'xl:pl-6',\n 'xl:pr-2',\n 'xl:py-4'\n ]\n})\n\nexport const DataTableBulkActionsFloating = /* @__PURE__ */ Object.assign(\n ({\n children,\n ...rest\n }: React.PropsWithChildren<React.ComponentProps<typeof StyledContainer>>) => {\n const { rowSelection, toggleAllPageRowsSelected } = useDataTable()\n\n const numberOfSelectedRows = Object.keys(rowSelection || {}).length\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (numberOfSelectedRows === 0) return null\n\n return (\n <section className=\"pointer-events-none sticky bottom-0 left-0 flex justify-center\">\n <StyledContainer {...rest}>\n <div className=\"flex flex-auto items-center justify-start gap-2\">\n <Badge\n theme=\"success\"\n size=\"xs\"\n emphasis=\"subtle\"\n className=\"h-6 min-w-6\"\n >\n {numberOfSelectedRows}\n </Badge>\n <Text size=\"sm\" weight=\"bold\" className=\"text-white\">\n selected\n </Text>\n </div>\n <div className=\"flex flex-auto items-center justify-end gap-3\">\n {children}\n <ActionIcon\n appearance=\"simple\"\n theme=\"white\"\n size=\"md\"\n onClick={handleDeselectAllPageRows}\n label=\"close\"\n >\n <Icon is={Close} />\n </ActionIcon>\n </div>\n </StyledContainer>\n </section>\n )\n },\n {\n SelectedRowActions: BulkActionsSelectedRowActions\n }\n)\n","import * as React from 'react'\n\nimport type { EmptyStateProps } from './EmptyState'\n\ntype EmptyStateProviderProps = {\n size?: EmptyStateProps['size']\n}\n\ntype EmptyStateContextValue = EmptyStateProviderProps\n\nexport const EmptyStateContext = React.createContext<EmptyStateContextValue>({})\n\nexport const EmptyStateProvider = ({\n size,\n children\n}: React.PropsWithChildren<EmptyStateProviderProps>) => {\n const value = React.useMemo<EmptyStateContextValue>(() => ({ size }), [size])\n return <EmptyStateContext value={value}>{children}</EmptyStateContext>\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateBody = styled(\n Text,\n {\n base: ['text-grey-800', 'font-normal'],\n variants: {\n size: {\n xs: ['mb-4', 'text-sm'],\n sm: ['mb-4', 'text-sm'],\n md: ['mb-4', 'text-sm'],\n lg: ['mb-6', 'text-md'],\n xl: ['mb-6', 'text-md']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype EmptyStateBodyProps = React.ComponentProps<typeof StyledEmptyStateBody>\n\nexport const EmptyStateBody = (props: EmptyStateBodyProps) => {\n const { size } = React.use(EmptyStateContext)\n return <StyledEmptyStateBody {...props} size={size} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Image } from '../image/Image'\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateImage = styled(\n Image,\n {\n base: [],\n variants: {\n size: {\n xs: ['max-h-8', 'max-w-14', 'mb-4'],\n sm: ['max-h-12', 'max-w-21', 'mb-4'],\n md: ['max-h-18', 'max-w-[126px]', 'mb-4'],\n lg: ['max-h-[142px]', 'max-w-[190px]', 'mb-6'],\n xl: ['max-h-[213px]', 'max-w-[285px]', 'mb-6']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype EmptyStateImageProps = React.ComponentProps<typeof StyledEmptyStateImage>\n\nexport const EmptyStateImage = (props: EmptyStateImageProps) => {\n const { size } = React.use(EmptyStateContext)\n return <StyledEmptyStateImage size={size} {...props} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateTitle = styled(\n 'h2',\n {\n base: ['text-grey-800', 'font-body', 'font-semibold', 'm-0'],\n variants: {\n size: {\n xs: ['mb-3', 'text-md'],\n sm: ['mb-3', 'text-md'],\n md: ['mb-3', 'text-md'],\n lg: ['mb-4', 'text-lg'],\n xl: ['mb-4', 'text-lg']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\n// Override, not intersection: ComponentProps yields `as?: never`, and\n// intersecting that with ElementType silently collapses `as` to undefined\ntype EmptyStateTitleProps = Override<\n React.ComponentProps<typeof StyledEmptyStateTitle>,\n {\n as?: React.ComponentType | React.ElementType\n }\n>\n\nexport const EmptyStateTitle = (props: EmptyStateTitleProps) => {\n const { size } = React.use(EmptyStateContext)\n return <StyledEmptyStateTitle size={size} {...props} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { EmptyStateProvider } from './EmptyState.context'\nimport { EmptyStateBody } from './EmptyStateBody'\nimport { EmptyStateImage } from './EmptyStateImage'\nimport { EmptyStateTitle } from './EmptyStateTitle'\n\nconst EmptyStateContainer = styled(\n 'div',\n {\n base: ['flex', 'flex-col', 'items-center', 'text-center', '*:last:mb-0'],\n variants: {\n size: {\n xs: ['p-2'],\n sm: ['p-3'],\n md: ['p-4'],\n lg: ['p-8'],\n xl: ['p-10']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport type EmptyStateProps = React.ComponentProps<typeof EmptyStateContainer>\n\nconst EmptyStateComponent = ({ size = 'sm', ...rest }: EmptyStateProps) => (\n <EmptyStateProvider size={size}>\n <EmptyStateContainer size={size} {...rest} />\n </EmptyStateProvider>\n)\n\nexport const EmptyState = /* @__PURE__ */ Object.assign(EmptyStateComponent, {\n Image: EmptyStateImage,\n Title: EmptyStateTitle,\n Body: EmptyStateBody\n})\n\nEmptyStateComponent.displayName = 'EmptyState'\n","import * as React from 'react'\n\nimport { EmptyState } from '../empty-state/EmptyState'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\n\ntype DataTableEmptyStateProps = React.ComponentProps<typeof EmptyState>\n\nexport const DataTableEmptyState = ({\n children,\n ...rest\n}: DataTableEmptyStateProps) => {\n const { asyncDataState, getTotalRows } = useDataTable()\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n if (!isEmpty) return null\n\n return <EmptyState {...rest}>{children}</EmptyState>\n}\n","import * as React from 'react'\n\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState, type DataTableContextType } from './DataTable.types'\n\nexport const DataTableError = ({\n children\n}: {\n children: (\n retry?: DataTableContextType['runAsyncData']\n ) => React.ReactElement<unknown>\n}) => {\n const { asyncDataState, runAsyncData } = useDataTable()\n\n if (asyncDataState !== AsyncDataState.REJECTED) return null\n\n return children(runAsyncData)\n}\n","import { Close, Search } from '@atom-learning/icons'\nimport { useComposedRefs } from '@radix-ui/react-compose-refs'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { useCallbackRef } from '../../utilities/hooks/useCallbackRef'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Input, InputBackground, InputText } from '../input/Input'\n\nexport type SearchInputProps = React.ComponentProps<typeof Input> & {\n size?: 'sm' | 'md' | 'lg'\n className?: string\n value?: string\n defaultValue?: string\n onValueChange?: (newValue: string) => void\n clearText?: string\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void\n}\n\nenum INPUT_ICON {\n SEARCH = 'SEARCH',\n CLEAR = 'CLEAR'\n}\n\nconst StyledIcon = styled(Icon, {\n base: ['text-grey-700', 'absolute', 'pointer-events-none'],\n variants: {\n size: {\n sm: ['right-2', 'size-4'],\n md: ['right-2.5', 'size-5'],\n lg: ['right-2.5', 'size-5']\n }\n }\n})\n\nexport const SearchInput = ({\n ref,\n size = 'md',\n appearance = 'standard',\n theme,\n className,\n value,\n defaultValue = '',\n onValueChange,\n clearText = 'Clear',\n onChange,\n ...rest\n}: SearchInputProps) => {\n const [inputElRef, setInputElRef] = useCallbackRef()\n const [innerValue, setInnerValue] = React.useState(defaultValue)\n // Derived during render — mirroring `value` into state via an effect would\n // paint one stale frame per controlled update.\n const currentValue = value ?? innerValue\n const activeIcon = currentValue ? INPUT_ICON.CLEAR : INPUT_ICON.SEARCH\n\n const iconSize = getFieldIconSize(size)\n\n const composedInputRef = useComposedRefs(\n ref as React.Ref<HTMLElement>,\n setInputElRef\n )\n\n const handleClear = () => {\n const inputEl = inputElRef.current\n if (!inputEl) return\n\n // https://stackoverflow.com/a/46012210\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n 'value'\n )?.set\n nativeInputValueSetter?.call?.(inputEl, '')\n const ev2 = new Event('input', {\n bubbles: true\n })\n inputEl.dispatchEvent(ev2)\n inputEl.focus()\n onValueChange?.('')\n }\n\n const handleOnChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(event)\n\n const newValue = event.target.value\n setInnerValue(newValue)\n onValueChange?.(newValue)\n }\n\n const getIcon = () => {\n if (activeIcon === INPUT_ICON.SEARCH)\n return (\n <StyledIcon\n is={Search}\n size={size}\n className={cn(\n size == 'sm' ? 'size-4' : 'size-5',\n 'top-1/2',\n '-translate-y-1/2'\n )}\n />\n )\n\n return (\n <ActionIcon\n label={clearText}\n theme=\"neutral\"\n size={iconSize}\n onClick={handleClear}\n className=\"absolute top-1/2 right-1 -translate-y-1/2\"\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n }\n\n return (\n <InputBackground\n size={size}\n appearance={appearance}\n theme={theme}\n className={cn('relative', 'w-auto', className)}\n >\n <InputText\n ref={composedInputRef}\n size={size}\n type=\"search\"\n {...rest}\n value={currentValue}\n onChange={handleOnChange}\n className={cn(\n size === 'sm' ? 'pr-8' : 'pr-10',\n '[&::-webkit-search-decoration]:appearance-none',\n '[&::-webkit-search-cancel-button]:appearance-none',\n '[&::-webkit-search-results-button]:appearance-none'\n )}\n />\n {getIcon()}\n </InputBackground>\n )\n}\n","import * as React from 'react'\nimport { debounce } from 'throttle-debounce'\n\nimport { cn } from '../../styled'\nimport { Label } from '../label/Label'\nimport { SearchInput } from '../search-input/SearchInput'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\n\ntype DataTableSearchProps = React.ComponentProps<typeof SearchInput> & {\n label: string\n hideLabel?: boolean\n}\nexport const DataTableGlobalFilter = ({\n onChange,\n label,\n hideLabel = false,\n ...rest\n}: DataTableSearchProps) => {\n const {\n setGlobalFilter,\n getState,\n resetPagination,\n getTotalRows,\n asyncDataState\n } = useDataTable()\n const { globalFilter } = getState()\n const inputId = React.useId()\n\n // Memoized so re-renders don't recreate the debouncer and reset its timer\n // mid-typing. Filtering happens in a transition: re-filtering large row sets\n // must not block keystroke rendering.\n const handleChange = React.useMemo(\n () =>\n debounce(250, (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(event)\n React.startTransition(() => {\n resetPagination()\n setGlobalFilter(event.target.value)\n })\n }),\n [onChange, resetPagination, setGlobalFilter]\n )\n\n React.useEffect(() => () => handleChange.cancel(), [handleChange])\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n if (isEmpty) return null\n\n return (\n <>\n <Label htmlFor={inputId} className={cn('mb-3', hideLabel && 'sr-only')}>\n {label}\n </Label>\n <SearchInput\n {...rest}\n id={inputId}\n defaultValue={globalFilter}\n onChange={handleChange}\n name={label}\n />\n </>\n )\n}\n","import { ArrowDown, ArrowUp } from '@atom-learning/icons'\nimport type { Header } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\nimport { useHover } from 'react-aria'\n\nimport { styled, cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Table } from '../table/Table'\nimport { Text } from '../text/Text'\nimport { useDataTable } from './DataTable.context'\n\ntype DataTableHeaderProps = React.ComponentProps<typeof Table.HeaderCell> & {\n header: Header<Record<string, unknown>, unknown>\n includeTotal?: boolean\n totalSuffix?: string\n}\n\nconst StyledCount = styled(Text, {\n base: ['text-grey-600', 'whitespace-nowrap', 'hidden', 'min-[800px]:block']\n})\n\nconst StyledTableHeaderCell = styled(Table.HeaderCell, {\n base: [],\n variants: {\n isSortable: {\n true: [\n '*:relative',\n 'before:absolute',\n 'before:bg-primary-100',\n 'before:duration-200',\n 'before:ease-in',\n 'before:inset-0',\n 'before:opacity-0',\n 'before:transition-opacity',\n 'cursor-pointer',\n 'hover:before:opacity-50',\n 'relative'\n ]\n }\n }\n})\n\nconst sortIcons = {\n asc: ArrowUp,\n desc: ArrowDown\n}\n\nconst SortIcon = ({ direction }: { direction: 'asc' | 'desc' }) => (\n <Icon\n is={sortIcons[direction]}\n size=\"sm\"\n className=\"stroke-primary-900 absolute left-1\"\n />\n)\n\nconst handleKeyDown = (\n event: React.KeyboardEvent<HTMLTableCellElement>,\n callback: (event: unknown) => void | undefined\n) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n callback(event as unknown)\n }\n}\n\nexport const DataTableHeaderCell = ({\n header,\n includeTotal = false,\n totalSuffix = 'items',\n children,\n className,\n ...rest\n}: DataTableHeaderProps) => {\n const sortDirection = header.column.getIsSorted()\n const { isSortable: isSortableTable, getRowModel } = useDataTable()\n // false for display columns, e.g. \"Actions\"\n const isDataColumn = header.column.getCanSort()\n\n const totalRows = getRowModel()?.rows?.length\n\n const { hoverProps, isHovered } = useHover({})\n\n const headerSortingHandler = header.column.getToggleSortingHandler()\n\n return (\n <StyledTableHeaderCell\n isSortable={isSortableTable && isDataColumn}\n colSpan={header.colSpan}\n onClick={\n isSortableTable && isDataColumn && headerSortingHandler\n ? headerSortingHandler\n : undefined\n }\n onKeyDown={(event) =>\n isSortableTable &&\n isDataColumn &&\n headerSortingHandler &&\n handleKeyDown(event, headerSortingHandler)\n }\n tabIndex={isSortableTable && isDataColumn ? 0 : -1}\n {...hoverProps}\n className={className}\n {...rest}\n >\n <div\n className={cn(\n 'flex',\n 'gap-1',\n 'items-center',\n header.colSpan > 1 ? 'justify-center' : 'justify-start'\n )}\n >\n {flexRender(header.column.columnDef.header, header.getContext())}\n {sortDirection && isSortableTable && (\n <div\n className={cn(\n 'flex',\n 'items-center',\n 'relative',\n 'size-6',\n 'ml-2',\n isHovered ? 'bg-primary-200' : 'bg-primary-100',\n 'rounded-sm'\n )}\n >\n <SortIcon direction={sortDirection} />\n </div>\n )}\n {includeTotal ? (\n <StyledCount size=\"sm\" weight=\"normal\">\n ({totalRows} {totalSuffix})\n </StyledCount>\n ) : null}\n </div>\n </StyledTableHeaderCell>\n )\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { useDataTable } from './DataTable.context'\n\nexport const DataTableSelectAllRowsCheckbox = ({\n label = 'All rows selection'\n}: {\n label?: string\n}) => {\n const {\n getIsAllPageRowsSelected,\n getIsSomePageRowsSelected,\n toggleAllPageRowsSelected,\n tableId\n } = useDataTable()\n\n const getCheckedState = () => {\n if (getIsSomePageRowsSelected()) return 'indeterminate'\n if (getIsAllPageRowsSelected()) return true\n return false\n }\n\n const updateCheckedState = () => {\n if (getIsSomePageRowsSelected()) {\n return toggleAllPageRowsSelected(false)\n }\n return toggleAllPageRowsSelected(!getIsAllPageRowsSelected())\n }\n\n return (\n <>\n <label htmlFor={`${tableId}_all_rows_selection`} className=\"sr-only\">\n {label}\n </label>\n <Checkbox\n size=\"lg\"\n checked={getCheckedState()}\n onCheckedChange={updateCheckedState}\n id={`${tableId}_all_rows_selection`}\n name={`${tableId}_all_rows_selection`}\n />\n </>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableHeaderCell } from './DataTableHeaderCell'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\n\ntype DataTableHeadProps = Omit<\n React.ComponentProps<typeof Table.Header>,\n 'children'\n> & {\n sortable?: boolean\n isSticky?: boolean\n stickyOffset?: number\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n}\n\nexport const DataTableHead = ({\n sortable = true,\n theme = 'light',\n isSticky = false,\n stickyOffset = 0,\n showTotalInFirstColumn,\n totalSuffix,\n style,\n className,\n ...rest\n}: DataTableHeadProps): React.ReactElement<unknown> => {\n const {\n getHeaderGroups,\n setIsSortable,\n enableRowSelection,\n getCanSomeRowsExpand,\n tablePosition\n } = useDataTable()\n\n React.useEffect(() => {\n setIsSortable(sortable)\n }, [sortable, setIsSortable])\n\n const tableHeaderRowRef = React.useRef<HTMLTableRowElement>(null)\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n\n const [headerOffset, setHeaderOffset] = React.useState<number>(0)\n const [headerHide, setHeaderHide] = React.useState<boolean>(false)\n\n React.useEffect(() => {\n if (!isSticky) return\n\n if (!tableRef.current && tableHeaderRowRef.current) {\n tableRef.current = tableHeaderRowRef.current.closest(\n 'table'\n ) as HTMLTableElement | null\n }\n\n if (tableRef.current) {\n if (tablePosition?.top !== null && tablePosition?.bottom !== null) {\n const newOffset =\n tablePosition?.top != null &&\n tablePosition?.bottom != null &&\n tablePosition.top < stickyOffset &&\n tablePosition.bottom > 100\n ? -tablePosition.top + stickyOffset\n : 0\n\n if (newOffset !== 0) setHeaderHide(true)\n\n setHeaderOffset(newOffset)\n\n const rafId = requestAnimationFrame(() => {\n setHeaderHide(false)\n })\n\n return () => cancelAnimationFrame(rafId)\n }\n }\n }, [isSticky, stickyOffset, tablePosition])\n\n return (\n <Table.Header\n theme={theme}\n style={{\n ...style,\n '--header-offset': `${headerOffset}px`\n }}\n {...rest}\n className={cn(\n 'relative',\n 'z-3',\n '[&_tr:not(:last-child)>th]:border-b-none',\n '[&_tr:not(:first-child)>th]:rounded-none!',\n className\n )}\n >\n {getHeaderGroups().map((headerGroup, headerGroupIndex) => {\n return (\n <Table.Row\n key={headerGroup.id}\n // Single ref slot: only the first header row may carry it, or\n // each successive header group would silently clobber it.\n ref={headerGroupIndex === 0 ? tableHeaderRowRef : undefined}\n className={\n isSticky && headerOffset !== 0\n ? cn(\n 'translate-y-(--header-offset)',\n headerHide\n ? 'delay-0ms opacity-0 transition-none'\n : 'delay-150ms opacity-100 transition-opacity duration-100',\n '[&_th]:last:before:absolute',\n '[&_th]:last:before:bottom-0',\n '[&_th]:last:before:pointer-events-none',\n '[&_th]:last:before:right-0',\n '[&_th]:last:before:shadow-sm',\n '[&_th]:last:before:top-0',\n '[&_th]:last:before:w-full'\n )\n : undefined\n }\n >\n {getCanSomeRowsExpand() && <Table.HeaderCell className=\"w-10\" />}\n {enableRowSelection && (\n <Table.HeaderCell className=\"w-10\">\n <DataTableSelectAllRowsCheckbox />\n </Table.HeaderCell>\n )}\n {headerGroup.headers.map((header, index) => (\n <DataTableHeaderCell\n header={header}\n key={header.id}\n includeTotal={index === 0 && showTotalInFirstColumn}\n totalSuffix={totalSuffix}\n />\n ))}\n </Table.Row>\n )\n })}\n </Table.Header>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Loader } from '../loader/Loader'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\n\nconst PendingState = styled(Loader, {\n base: [\n 'absolute',\n 'left-1/2',\n 'top-1/2',\n '-translate-x-1/2',\n '-translate-y-1/2',\n 'z-1'\n ]\n})\n\nexport const DataTableLoading = (\n props: React.ComponentProps<typeof PendingState>\n) => {\n const { asyncDataState } = useDataTable()\n\n if (asyncDataState !== AsyncDataState.PENDING) return null\n\n return <PendingState {...props} />\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { Table } from '../table/Table'\nimport { TableBody } from '../table/TableBody'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\nimport { DataTableBody } from './DataTableBody'\nimport { DataTableHead } from './DataTableHead'\nimport { DataTableLoading } from './DataTableLoading'\n\nconst TableContainer = styled('div', {\n base: ['p-2', 'bg-white', 'rounded-lg']\n})\n\nexport type DataTableTableProps = Omit<\n React.ComponentProps<typeof Table>,\n 'children' | 'numberOfStickyColumns'\n> &\n Partial<\n Pick<React.ComponentProps<typeof DataTableHead>, 'theme' | 'sortable'>\n > &\n Partial<Pick<React.ComponentProps<typeof TableBody>, 'striped'>> & {\n scrollOptions?: {\n hasStickyHeader?: boolean\n stickyHeaderOffset?: number\n headerCss?: string\n numberOfStickyColumns?: number\n scrollContainerCls?: string | string[]\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n }\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n withContainer?: boolean\n }\n\nexport const DataTableTable = ({\n sortable,\n striped,\n theme = 'white',\n className,\n scrollOptions = {\n numberOfStickyColumns: 0,\n stickyHeaderOffset: 0,\n hasStickyHeader: false,\n showTotalInFirstColumn: true,\n totalSuffix: 'items'\n },\n rowAction,\n withContainer = false,\n ...rest\n}: DataTableTableProps): React.JSX.Element | null => {\n const {\n asyncDataState,\n getTotalRows,\n getCanSomeRowsExpand,\n rowSelection,\n enableRowSelection,\n tableId,\n setTablePosition\n } = useDataTable()\n\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n const isTableVisible = React.useRef(false)\n const isScrolling = React.useRef<boolean>(false)\n const scrollRafIdRef = React.useRef<number | null>(null)\n\n const scrollTarget = typeof window === 'undefined' ? null : window\n\n React.useEffect(() => {\n if (!scrollTarget || typeof IntersectionObserver === 'undefined') {\n return\n }\n\n const updatePosition = () => {\n if (tableRef.current) {\n const tableTop = tableRef.current.getBoundingClientRect().top\n const tableBottom = tableRef.current.getBoundingClientRect().bottom\n\n setTablePosition((prevPosition) => ({\n ...prevPosition,\n top: tableTop,\n bottom: tableBottom\n }))\n }\n isScrolling.current = false\n }\n\n const handleScroll = () => {\n if (!isScrolling.current) {\n scrollRafIdRef.current = requestAnimationFrame(updatePosition)\n isScrolling.current = true\n }\n }\n\n if (!tableRef.current) return\n\n const observerOffset = scrollOptions?.stickyHeaderOffset || 0\n\n const observerOptions = {\n rootMargin: `-${observerOffset}px 0px -${observerOffset}px 0px`,\n threshold: 0\n }\n\n const handleTableIntersection = (entries: IntersectionObserverEntry[]) => {\n if (!entries || entries.length === 0) return\n const entry = entries[0]\n\n isTableVisible.current = entry.isIntersecting\n\n if (scrollTarget) {\n if (entry.isIntersecting) {\n // add scroll listener\n scrollTarget?.addEventListener('scroll', handleScroll)\n } else {\n // remove scroll listener\n scrollTarget?.removeEventListener('scroll', handleScroll)\n }\n }\n\n setTablePosition((prevPosition) => ({\n ...prevPosition,\n isVisible: entry.isIntersecting\n }))\n }\n\n const tableObserver = new IntersectionObserver(\n handleTableIntersection,\n observerOptions\n )\n\n //only track table position if we have a sticky header or bulk actions active\n if (\n tableRef.current &&\n (scrollOptions.hasStickyHeader ||\n Object.keys(rowSelection || {}).length > 0)\n ) {\n tableObserver.observe(tableRef.current)\n }\n\n return () => {\n tableObserver.disconnect()\n if (scrollRafIdRef.current !== null) {\n cancelAnimationFrame(scrollRafIdRef.current)\n scrollRafIdRef.current = null\n }\n isScrolling.current = false\n if (scrollTarget) {\n scrollTarget?.removeEventListener('scroll', handleScroll)\n }\n }\n }, [\n rowSelection,\n scrollOptions.hasStickyHeader,\n scrollOptions?.stickyHeaderOffset,\n setTablePosition\n ])\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n const buildScrollContainerKey = (): string => {\n let controlColumnCount = 0\n\n if (getCanSomeRowsExpand() && !!enableRowSelection) {\n controlColumnCount = 2\n } else if (getCanSomeRowsExpand() || !!enableRowSelection) {\n controlColumnCount = 1\n }\n\n return `${tableId}_${controlColumnCount}_control_columns`\n }\n\n if (isEmpty) return null\n\n const tableComponent = (\n <Table\n corners=\"round\"\n size=\"lg\"\n {...rest}\n ref={tableRef}\n numberOfStickyColumns={scrollOptions.numberOfStickyColumns}\n scrollContainerCls={scrollOptions.scrollContainerCls}\n scrollContainerkey={buildScrollContainerKey()}\n className={cn(\n isPending && [\n 'opacity-50',\n 'pointer-events-none',\n 'transition-opacity',\n 'duration-250',\n 'linear',\n 'delay-150'\n ],\n className\n )}\n >\n <DataTableHead\n theme={theme}\n sortable={sortable}\n isSticky={scrollOptions.hasStickyHeader}\n stickyOffset={scrollOptions.stickyHeaderOffset}\n className={scrollOptions.headerCss}\n showTotalInFirstColumn={scrollOptions.showTotalInFirstColumn}\n totalSuffix={scrollOptions.totalSuffix}\n />\n <DataTableBody striped={striped} rowAction={rowAction} />\n </Table>\n )\n\n return (\n <>\n <DataTableLoading />\n {withContainer ? (\n <TableContainer\n className={cn(\n scrollOptions.numberOfStickyColumns === 0 && 'overflow-x-auto'\n )}\n >\n {tableComponent}\n </TableContainer>\n ) : (\n tableComponent\n )}\n </>\n )\n}\n","import { DragHandle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nexport const StyledHandle = styled(ActionIcon, {\n base: [\n 'text-inherit!',\n 'fill-current',\n 'disabled:**:pointer-events-none',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n isDragging: {\n true: ['cursor-grabbing'],\n false: ['cursor-grab']\n }\n }\n})\n\nexport type HandleProps = Omit<\n React.ComponentProps<typeof StyledHandle>,\n 'children' | 'size'\n> & {\n size?: React.ComponentProps<typeof Icon>['size']\n}\n\nexport const Handle = ({ ref, isDragging, size, ...rest }: HandleProps) => (\n <StyledHandle\n ref={ref}\n isDragging={isDragging}\n appearance=\"simple\"\n hasTooltip={false}\n size={size}\n {...rest}\n >\n <Icon is={DragHandle} />\n </StyledHandle>\n)\n","import { useSortable } from '@dnd-kit/sortable'\nimport * as React from 'react'\n\nimport { Handle as DragHandle, type HandleProps } from './Handle'\n\nexport type SortableHandleProps = {\n targetId: string | number\n disabled?: boolean\n label?: string\n} & Omit<HandleProps, 'label'>\n\nexport const SortableHandle = ({\n targetId,\n disabled = false,\n label = 'drag handle',\n ...rest\n}: SortableHandleProps) => {\n const { attributes, listeners, isDragging, setActivatorNodeRef } =\n useSortable({ id: targetId })\n\n return (\n <DragHandle\n ref={setActivatorNodeRef}\n isDragging={isDragging}\n label={label}\n disabled={disabled}\n {...(!disabled ? listeners : {})}\n {...(!disabled ? attributes : {})}\n {...rest}\n />\n )\n}\n\nSortableHandle.displayName = 'SortableHandle'\n","import type { UniqueIdentifier } from '@dnd-kit/core'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\n\nexport type SortableItemProps = {\n id: UniqueIdentifier\n asChild?: boolean\n isDragHandle?: boolean\n disabled?: boolean\n className?: string\n style?: Pick<React.HTMLAttributes<HTMLDivElement>, 'style'>\n}\n\nexport const SortableItem = ({\n id,\n asChild = false,\n className,\n style,\n isDragHandle = false,\n disabled,\n ...rest\n}: React.PropsWithChildren<SortableItemProps>) => {\n const { transform, setNodeRef, isDragging, listeners, attributes } =\n useSortable({ id })\n\n const Component = asChild ? Slot : 'div'\n return (\n <Component\n ref={setNodeRef}\n style={{\n ...style,\n '--scale': 1,\n '--translate-x': transform?.x || 0,\n '--translate-y': transform?.y || 0\n }}\n data-dragging={isDragging}\n data-disabled={disabled}\n {...(isDragHandle && !disabled ? listeners : {})}\n {...(isDragHandle && !disabled ? attributes : {})}\n {...rest}\n className={cn(\n 'translate-x-[calc(var(--translate-x)*1px)]',\n 'translate-y-[calc(var(--translate-y)*1px)]',\n 'scale-(--scale)',\n isDragging && 'z-5',\n 'disabled:**:pointer-events-none',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n isDragHandle && (isDragging ? 'cursor-grabbing' : 'cursor-grab'),\n className\n )}\n />\n )\n}\n\nSortableItem.displayName = 'SortableItem'\n","import type { DragEndEvent, UniqueIdentifier } from '@dnd-kit/core'\nimport {\n closestCenter,\n DndContext,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors\n} from '@dnd-kit/core'\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates\n} from '@dnd-kit/sortable'\nimport * as React from 'react'\n\ntype SortableRootProps = {\n sortableIds: (string | number)[]\n onSortChange: (onSortChangeData: {\n order: UniqueIdentifier[]\n oldIndex: number\n newIndex: number\n }) => void\n}\n\nexport const SortableRoot = ({\n sortableIds,\n onSortChange,\n children\n}: React.PropsWithChildren<SortableRootProps>) => {\n const [order, setOrder] = React.useState<(string | number)[]>(sortableIds)\n // Reconcile the external ids during render (React's \"adjusting state when\n // props change\" pattern — no stale frame), comparing by content rather than\n // identity so a parent passing an inline array doesn't reset the order and\n // discard in-flight drag state on every render.\n const [prevIds, setPrevIds] = React.useState(sortableIds)\n if (prevIds !== sortableIds) {\n setPrevIds(sortableIds)\n const contentChanged =\n prevIds.length !== sortableIds.length ||\n sortableIds.some((id, index) => id !== prevIds[index])\n if (contentChanged) setOrder(sortableIds)\n }\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates\n })\n )\n\n const handleDragEnd = (event: DragEndEvent) => {\n const { active, over } = event\n if (active.id && over?.id && active.id !== over?.id) {\n setOrder((order) => {\n const oldIndex = order.indexOf(active.id)\n const newIndex = order.indexOf(over.id)\n const newOrder = arrayMove(order, oldIndex, newIndex)\n onSortChange({ order: newOrder, oldIndex, newIndex })\n return newOrder\n })\n }\n }\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext items={order}>{children}</SortableContext>\n </DndContext>\n )\n}\n\nSortableRoot.displayName = 'SortableRoot'\n","export { SortableHandle as Handle } from './SortableHandle'\nexport { SortableItem as Item } from './SortableItem'\nexport { SortableRoot as Root } from './SortableRoot'\n","import type { Row } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport * as Sortable from '../../sortable'\nimport { Table } from '../../table/Table'\nimport { DataTableDataCell } from '../DataTableDataCell'\n\nexport type DataTableDraggableRowProps = React.ComponentProps<\n typeof Table.Row\n> & {\n row: Row<Record<string, unknown>>\n idColumn?: string\n}\n\nexport const DragAndDropTableRow = ({\n row,\n idColumn = 'id'\n}: DataTableDraggableRowProps) => {\n const rowId = row.original[idColumn] as string | number\n return (\n <Sortable.Item id={rowId} asChild>\n <Table.Row>\n {row.getVisibleCells().map((cell, i) => {\n if (i === 0) {\n return (\n <Table.Cell key={cell.id}>\n <Sortable.Handle targetId={rowId} className=\"inline-block\" />\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </Table.Cell>\n )\n }\n return <DataTableDataCell key={cell.id} cell={cell} />\n })}\n </Table.Row>\n </Sortable.Item>\n )\n}\n","import * as React from 'react'\n\nimport { Table } from '../../table/Table'\nimport { useDataTable } from '../DataTable.context'\nimport { DragAndDropTableRow } from './DragAndDropTableRow'\n\ntype DataTableBodyProps = Omit<\n React.ComponentProps<typeof Table.Body>,\n 'children'\n> & {\n idColumn?: string\n}\n\nexport const DragAndDropTableBody = ({\n striped = false,\n idColumn = 'id',\n ...rest\n}: DataTableBodyProps) => {\n const { getRowModel } = useDataTable()\n return (\n <Table.Body {...rest} striped={striped}>\n {getRowModel().rows.map((row) => {\n return (\n <DragAndDropTableRow row={row} key={row.id} idColumn={idColumn} />\n )\n })}\n </Table.Body>\n )\n}\n","import { arrayMove } from '@dnd-kit/sortable'\nimport * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport * as Sortable from '../../sortable'\nimport { Table } from '../../table/Table'\nimport { useDataTable } from '../DataTable.context'\nimport { AsyncDataState, type AsyncDataResult } from '../DataTable.types'\nimport { DataTableHead } from '../DataTableHead'\nimport { DataTableLoading } from '../DataTableLoading'\nimport type { DataTableTableProps } from '../DataTableTable'\nimport { DragAndDropTableBody } from './DragAndDropTableBody'\n\ntype DragAndDropTableProps = DataTableTableProps & {\n className?: string\n idColumn?: string\n onDragAndDrop?: (onDragAndDropData: {\n oldIndex: number\n newIndex: number\n newData: AsyncDataResult\n }) => void\n}\n\nexport const DragAndDropTable = ({\n idColumn = 'id',\n onDragAndDrop,\n sortable,\n striped,\n theme,\n className,\n ...rest\n}: DragAndDropTableProps) => {\n const { asyncDataState, data, setData } = useDataTable()\n const isPending = asyncDataState === AsyncDataState.PENDING\n\n const rowIds = React.useMemo(\n () =>\n data.results.map((row) => {\n return row[idColumn] as string | number\n }),\n [data, idColumn]\n )\n const handleSortChange = React.useCallback(\n ({ oldIndex, newIndex }) => {\n const sortedResults = arrayMove(data.results, oldIndex, newIndex)\n const newData = { results: sortedResults, total: data.total }\n setData({ results: sortedResults, total: data.total })\n onDragAndDrop?.({ oldIndex, newIndex, newData })\n },\n [data, onDragAndDrop]\n )\n\n return (\n <Sortable.Root onSortChange={handleSortChange} sortableIds={rowIds}>\n <DataTableLoading />\n <Table\n {...rest}\n className={cn(\n isPending && [\n 'opacity-50',\n 'pointer-events-none',\n 'transition-opacity',\n 'duration-250',\n 'linear',\n 'delay-150'\n ],\n className\n )}\n >\n <DataTableHead theme={theme} sortable={sortable} />\n <DragAndDropTableBody striped={striped} idColumn={idColumn} />\n </Table>\n </Sortable.Root>\n )\n}\n","export enum VisibleElementsAmount {\n LESS = 6,\n MORE = 8\n}\n\nexport const VIEW_ALL_POPOVER = 'VIEW_ALL_POPOVER'\nexport const GO_TO_PREVIOUS_PAGE = 'GO_TO_PREVIOUS_PAGE'\nexport const GO_TO_NEXT_PAGE = 'GO_TO_NEXT_PAGE'\n","import {\n GO_TO_NEXT_PAGE,\n GO_TO_PREVIOUS_PAGE,\n VIEW_ALL_POPOVER\n} from './pagination.constants'\nimport type { PaginationItemsToRender } from './types'\n\nexport const getPaginationElementsToRender = (\n currentPage: number,\n pagesCount: number,\n visibleElementsCount: number\n): PaginationItemsToRender => {\n const paginationPages = Array.from(\n { length: pagesCount },\n (_, index) => index + 1\n )\n\n /*\n * As we always show the `<` `>` arrows,\n * subtract 2 from `visibleElementsCount` (one for each of the GO_TO_PREVIOUS/NEXT_PAGE arrows)\n * to get the `visiblePagesCount`\n */\n let visiblePagesCount = visibleElementsCount - 2\n const withPreviousNextPageArrows = (paginationPages) => [\n GO_TO_PREVIOUS_PAGE,\n ...paginationPages,\n GO_TO_NEXT_PAGE\n ]\n\n /**\n * If fewer pages than threshold for truncating render them all.\n *\n * pagesCount: 6\n * visibleElementsCount: >=6\n * returns [GO_TO_PREVIOUS_PAGE, 1, 2, 3, 4, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | 2 | | 3 | | 4 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (pagesCount <= visiblePagesCount) {\n return withPreviousNextPageArrows(paginationPages)\n }\n\n /**\n * If current page is either at the very start or at the very end of the pages\n */\n const canFitEdgePage = visibleElementsCount >= 5\n const canFitViewAllPopover = visibleElementsCount >= 4\n const canFitPages = visibleElementsCount >= 3\n\n if (canFitViewAllPopover) {\n // Subtract one from visiblePagesCount to accomodate for us adding the `[…]` VIEW_ALL_POPOVER\n visiblePagesCount -= 1\n }\n\n if (canFitEdgePage) {\n // Subtract one more from visiblePagesCount to accomodate for us adding the GO_TO_PREVIOUS/NEXT_PAGE arrows\n visiblePagesCount -= 1\n }\n\n const firstPage = paginationPages[0]\n // Non-null: this line is only reached when pagesCount exceeds the visible\n // threshold, so paginationPages always has a last element. `.at()` widens to\n // `T | undefined`, which the index access it replaced did not.\n const lastPage = paginationPages.at(-1)!\n\n /**\n * If we're truncating and current page is at the start of the page list,\n * render the initial truncated page list, e.g.\n *\n * pagesCount: 8\n * currentPage: 1/2\n * visibleElementsCount: 6\n * returns [GO_TO_PREVIOUS_PAGE, 1, 2, VIEW_ALL_POPOVER, 6, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | 2 | | … | | 8 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (currentPage < visiblePagesCount) {\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitPages) {\n newPaginationItems.push(...paginationPages.slice(0, visiblePagesCount))\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitEdgePage) {\n newPaginationItems.push(lastPage)\n }\n return withPreviousNextPageArrows(newPaginationItems)\n }\n\n /**\n * If we're truncating and the current page is towards the end of the\n * page list (depending on visibleElementsCount),\n * render a truncated page list from the end, e.g.\n *\n * pagesCount: 8\n * currentPage: 7/8\n * visibleElementsCount: 6\n * returns [GO_TO_PREVIOUS_PAGE, 1, VIEW_ALL_POPOVER, 7, 8, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | … | | 7 | | 8 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (currentPage > pagesCount - visiblePagesCount) {\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitEdgePage) {\n newPaginationItems.push(firstPage)\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitPages) {\n newPaginationItems.push(\n ...paginationPages.slice(pagesCount - visiblePagesCount, pagesCount)\n )\n }\n return withPreviousNextPageArrows(newPaginationItems)\n }\n\n /**\n * If we're truncating and the current page doesn't meet any of the previous conditions\n * (we're in the middle)\n * render a truncated page list from a specific index relative to `currentPage`, e.g.\n *\n * currentPage: 4\n * visibleElementsCount: 6 // VisibleElementsAmount.LESS\n * returns [GO_TO_PREVIOUS_PAGE, 3, 4, VIEW_ALL_POPOVER, 6, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 3 | | 4 | | … | | 6 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n * currentPage: 6\n * visibleElementsCount: 8 // VisibleElementsAmount.MORE\n * returns [GO_TO_PREVIOUS_PAGE, 4, 5, 6, 7, VIEW_ALL_POPOVER, 10, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 4 | | 5 | | 6 | | 7 | | … | | 10 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+\n */\n const canFitCurrentPage = canFitPages\n const canFitCurrentPageAndPreviousPage = visibleElementsCount >= 6\n const canFitCurrentPageAndPreviousPageAndNextPage = visibleElementsCount >= 7\n const canFitLastPage = canFitEdgePage\n\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitCurrentPageAndPreviousPageAndNextPage) {\n newPaginationItems.push(\n ...paginationPages.slice(\n currentPage + 1 - visiblePagesCount,\n currentPage + 1\n )\n )\n } else if (canFitCurrentPageAndPreviousPage) {\n newPaginationItems.push(\n ...paginationPages.slice(currentPage - visiblePagesCount, currentPage)\n )\n } else if (canFitCurrentPage) {\n newPaginationItems.push(\n ...paginationPages.slice(currentPage - 1, currentPage - 1 + 1)\n )\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitLastPage) {\n newPaginationItems.push(lastPage)\n }\n return withPreviousNextPageArrows(newPaginationItems)\n}\n\nexport const findNextAvailablePage = (\n startPage: number,\n disabledPages: number[],\n pagesCount: number\n): number | undefined => {\n if (startPage > pagesCount) return\n const disabledSet = new Set(disabledPages)\n let nextPage = startPage\n while (disabledSet.has(nextPage)) {\n nextPage++\n }\n return nextPage\n}\n\nexport const findPreviousAvailablePage = (\n startPage: number,\n disabledPages: number[]\n): number | undefined => {\n if (startPage < 1) return\n const disabledSet = new Set(disabledPages)\n let previousPage = startPage\n while (disabledSet.has(previousPage)) {\n previousPage--\n }\n return previousPage\n}\n","import * as React from 'react'\n\nimport { VisibleElementsAmount } from './pagination.constants'\nimport {\n findNextAvailablePage,\n findPreviousAvailablePage,\n getPaginationElementsToRender\n} from './pagination.helper'\nimport type { PaginationContextValue, PaginationProviderProps } from './types'\n\nexport const PaginationContext = React.createContext<PaginationContextValue>({\n goToPage: () => null,\n goToPreviousPage: () => null,\n goToNextPage: () => null,\n currentPage: 1,\n pagesCount: 0,\n onItemHover: () => null,\n paginationItems: [],\n labels: {},\n indicatedPages: [],\n disabledPages: []\n})\n\n// Module-level defaults: inline `= {}` / `= () => null` defaults would mint\n// a new identity every render and the value useMemo below could never hit.\nconst DEFAULT_LABELS = {}\nconst DEFAULT_ON_ITEM_HOVER = () => null\nconst DEFAULT_INDICATED_PAGES: number[] = []\nconst DEFAULT_DISABLED_PAGES: number[] = []\n\nexport const PaginationProvider = ({\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = DEFAULT_INDICATED_PAGES,\n disabledPages = DEFAULT_DISABLED_PAGES,\n onItemHover = DEFAULT_ON_ITEM_HOVER,\n labels = DEFAULT_LABELS,\n children\n}: React.PropsWithChildren<PaginationProviderProps>) => {\n const [internalCurrentPage, setInternalCurrentPage] = React.useState(1)\n\n const currentPage = selectedPage || internalCurrentPage\n\n const goToPage = React.useCallback(\n (pageNumber: number) => {\n setInternalCurrentPage(pageNumber)\n onSelectedPageChange?.(pageNumber)\n },\n [onSelectedPageChange]\n )\n\n const previousPage = currentPage - 1\n const previousAvailablePage = findPreviousAvailablePage(\n previousPage,\n disabledPages\n )\n\n const goToPreviousPage = React.useCallback(() => {\n if (previousAvailablePage) goToPage(previousAvailablePage)\n }, [goToPage, previousAvailablePage])\n\n const nextPage = currentPage + 1\n const nextAvailablePage = findNextAvailablePage(\n nextPage,\n disabledPages,\n pagesCount\n )\n const goToNextPage = React.useCallback(() => {\n if (nextAvailablePage) goToPage(nextAvailablePage)\n }, [goToPage, nextAvailablePage])\n\n const paginationItems = React.useMemo(\n () =>\n getPaginationElementsToRender(\n currentPage,\n pagesCount,\n visibleElementsCount\n ),\n [currentPage, pagesCount, visibleElementsCount]\n )\n\n const value = React.useMemo(() => {\n return {\n goToNextPage,\n goToPreviousPage,\n goToPage,\n currentPage,\n paginationItems,\n indicatedPages,\n disabledPages,\n pagesCount,\n onItemHover,\n previousAvailablePage,\n nextAvailablePage,\n labels\n }\n }, [\n goToNextPage,\n goToPreviousPage,\n goToPage,\n currentPage,\n indicatedPages,\n paginationItems,\n disabledPages,\n pagesCount,\n onItemHover,\n previousAvailablePage,\n nextAvailablePage,\n labels\n ])\n\n return <PaginationContext value={value}>{children}</PaginationContext>\n}\n","import * as React from 'react'\n\nimport { PaginationContext } from './Pagination.context'\nimport type { PaginationContextValue } from './types'\n\nexport const usePagination = (): PaginationContextValue => {\n const context = React.use(PaginationContext)\n\n if (!context) {\n throw new Error(\n 'Ensure that you wrap any components with the PaginationProvider component'\n )\n }\n\n return context\n}\n","import { ChevronRight } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { usePagination } from './usePagination'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: ['ml-1', 'disabled:opacity-30']\n})\n\nexport const PaginationNextButton = (\n props: Partial<React.ComponentProps<typeof StyledActionIcon>>\n) => {\n const { goToNextPage, labels, nextAvailablePage } = usePagination()\n\n const isDisabled = !nextAvailablePage\n\n return (\n <StyledActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n onClick={goToNextPage}\n disabled={isDisabled}\n {...props}\n label={labels?.nextPageButtonLabel || 'Next page'}\n >\n <Icon is={ChevronRight} />\n </StyledActionIcon>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { PaginationPageProps } from './types'\nimport { usePagination } from './usePagination'\n\nconst StyledButton = styled('button', {\n base: [\n 'items-center',\n 'border',\n 'border-transparent',\n 'rounded-sm',\n 'cursor-pointer',\n 'font-body',\n 'justify-center',\n 'whitespace-nowrap',\n 'w-max',\n 'flex',\n 'flex-col',\n 'p-0',\n 'font-normal',\n 'text-text-subtle',\n 'bg-(--base-1)',\n 'relative',\n 'not-disabled:active:bg-(--base-3)',\n 'not-disabled:active:text-(--text-bold)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--base-2)',\n 'not-disabled:hover:text-text-regular',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n size: {\n md: ['size-10']\n },\n selected: {\n true: [\n 'border',\n 'border-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:border-(--accent-11)',\n 'not-disabled:active:text-(--accent-11)',\n 'not-disabled:hover:border-(--accent-10)',\n 'not-disabled:hover:text-(--accent-10)',\n 'text-(--accent-9)'\n ]\n },\n indicated: {\n true: [\n 'bg-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:bg-(--accent-11)',\n 'not-disabled:active:text-white',\n 'not-disabled:hover:bg-(--accent-10)',\n 'not-disabled:hover:text-white',\n 'text-white'\n ]\n }\n },\n compoundVariants: [\n {\n selected: true,\n indicated: true,\n class: [\n 'bg-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:bg-(--accent-11)',\n 'not-disabled:active:text-white',\n 'not-disabled:hover:bg-(--accent-10)',\n 'not-disabled:hover:text-white',\n 'not-focus-visible:border-white!',\n 'shadow-[var(--accent-9)_0px_0px_0px_1px]',\n 'text-white'\n ]\n }\n ]\n})\n\nexport const PaginationPage = ({\n pageNumber,\n className,\n onClick\n}: PaginationPageProps) => {\n const { currentPage, goToPage, indicatedPages, disabledPages, onItemHover } =\n usePagination()\n\n const isIndicated = indicatedPages.includes(pageNumber)\n const isDisabled = disabledPages.includes(pageNumber)\n\n const isSelected = currentPage === pageNumber\n\n const handleOnHover = () => {\n if (isSelected || isDisabled) return\n onItemHover?.(pageNumber)\n }\n\n const handleOnClick = (pageNumber) => {\n onClick?.()\n goToPage(pageNumber)\n }\n\n return (\n <StyledButton\n selected={isSelected}\n size=\"md\"\n onClick={() => handleOnClick(pageNumber)}\n className={className}\n indicated={isIndicated}\n disabled={isDisabled}\n aria-current={isSelected && 'page'}\n aria-disabled={isDisabled}\n onMouseOver={handleOnHover}\n >\n {pageNumber}\n </StyledButton>\n )\n}\n","import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Arrow, Close, Content } from '@radix-ui/react-popover'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContent = styled(Content, {\n base: [\n 'bg-white',\n 'rounded-md',\n 'shadow-lg',\n 'max-w-[90vw]',\n 'p-6',\n 'pr-10',\n 'relative',\n 'z-10',\n 'will-change-transform',\n 'will-change-opacity',\n 'animation-duration-75',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n size: {\n sm: ['max-w-50'],\n md: ['max-w-100'],\n lg: ['max-w-150']\n }\n }\n})\n\nconst StyledArrow = styled(Arrow, {\n base: ['fill-white', 'z-1', 'in-data-[align=end]:mx-6']\n})\n\ntype PopoverContentProps = React.ComponentProps<typeof StyledContent> &\n React.ComponentProps<typeof Content> & {\n closePopoverText?: string\n showCloseButton?: boolean\n }\n\nexport const PopoverContent = ({\n children,\n side = 'top',\n sideOffset = 8,\n closePopoverText = 'Close popover',\n showCloseButton = true,\n size = 'md',\n ...rest\n}: PopoverContentProps) => (\n <StyledContent size={size} side={side} sideOffset={sideOffset} {...rest}>\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closePopoverText}\n size=\"md\"\n hasTooltip={false}\n theme=\"neutral\"\n className=\"absolute top-0.5 right-0.5\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {children}\n <StyledArrow width={16} height={8} />\n </StyledContent>\n)\n","import { Anchor, Portal, Root, Trigger } from '@radix-ui/react-popover'\n\nimport { PopoverContent } from './PopoverContent'\n\nexport const Popover = /* @__PURE__ */ Object.assign(Root, {\n Content: PopoverContent,\n Portal,\n Anchor,\n Trigger\n})\n\nRoot.displayName = 'Popover'\n","import { Ellypsis } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Popover } from '../popover/Popover'\nimport { PaginationPage } from './PaginationPage'\nimport { usePagination } from './usePagination'\n\nexport const PaginationPopover = ({\n children\n}: React.PropsWithChildren<unknown>) => {\n const { pagesCount, labels } = usePagination()\n const paginationItems = Array.from(\n { length: pagesCount },\n (_, index) => index + 1\n )\n\n const [isOpen, setIsOpen] = React.useState<boolean>(false)\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen} defaultOpen={false}>\n <Popover.Trigger asChild>\n {children || (\n <ActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n label={labels?.popoverTriggerLabel || 'Open pagination popover'}\n data-testid=\"pagination_popover_trigger\"\n >\n <Icon is={Ellypsis} />\n </ActionIcon>\n )}\n </Popover.Trigger>\n <Popover.Content size=\"md\" showCloseButton={false} className=\"p-0\">\n <div className=\"flex flex-wrap justify-center gap-1 p-4\">\n {paginationItems?.map((pageNumber) => {\n return (\n <PaginationPage\n key={pageNumber}\n pageNumber={pageNumber}\n onClick={() => setIsOpen(false)}\n />\n )\n })}\n </div>\n </Popover.Content>\n </Popover>\n )\n}\n","import { ChevronLeft } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { usePagination } from './usePagination'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: ['mr-1', 'disabled:opacity-30']\n})\n\nexport const PaginationPreviousButton = (\n props: Partial<React.ComponentProps<typeof StyledActionIcon>>\n) => {\n const { goToPreviousPage, labels, previousAvailablePage } = usePagination()\n\n const isDisabled = !previousAvailablePage\n\n return (\n <StyledActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n onClick={goToPreviousPage}\n disabled={isDisabled}\n {...props}\n label={labels?.previousPageButtonLabel || 'Previous page'}\n >\n <Icon is={ChevronLeft} />\n </StyledActionIcon>\n )\n}\n","import * as React from 'react'\n\nimport {\n GO_TO_NEXT_PAGE,\n GO_TO_PREVIOUS_PAGE,\n VIEW_ALL_POPOVER\n} from './pagination.constants'\nimport { PaginationNextButton } from './PaginationNextButton'\nimport { PaginationPage } from './PaginationPage'\nimport { PaginationPopover } from './PaginationPopover'\nimport { PaginationPreviousButton } from './PaginationPreviousButton'\nimport { usePagination } from './usePagination'\n\nexport const PaginationItems = () => {\n const { paginationItems } = usePagination()\n\n return (\n <>\n {paginationItems.map((paginationItem) => {\n switch (paginationItem) {\n case VIEW_ALL_POPOVER:\n return <PaginationPopover key={paginationItem} />\n case GO_TO_PREVIOUS_PAGE:\n return <PaginationPreviousButton key={paginationItem} />\n case GO_TO_NEXT_PAGE:\n return <PaginationNextButton key={paginationItem} />\n default:\n return (\n <PaginationPage\n key={paginationItem}\n pageNumber={paginationItem}\n />\n )\n }\n })}\n </>\n )\n}\n","import * as React from 'react'\n\nimport { ColorScheme } from '../../experiments/color-scheme/ColorScheme'\nimport { cn } from '../../styled'\nimport { VisibleElementsAmount } from './pagination.constants'\nimport { PaginationProvider } from './Pagination.context'\nimport { PaginationItems } from './PaginationItems'\nimport { PaginationPopover } from './PaginationPopover'\nimport type { PaginationProps, PaginationProviderProps } from './types'\n\nconst PaginationComponent = ({\n colorScheme,\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = [],\n disabledPages = [],\n onItemHover = () => null,\n labels = {},\n children,\n className,\n ...rest\n}: PaginationProps) => {\n if (!pagesCount) return null\n\n const paginationProviderProps: PaginationProviderProps = {\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount,\n pagesCount,\n indicatedPages,\n disabledPages,\n onItemHover,\n labels\n }\n\n return (\n <PaginationProvider {...paginationProviderProps}>\n <ColorScheme base=\"grey1\" accent=\"primary1\" {...colorScheme} asChild>\n <div {...rest} className={cn('flex', 'gap-1', className)}>\n {children || <PaginationItems />}\n </div>\n </ColorScheme>\n </PaginationProvider>\n )\n}\n\nexport const Pagination = /* @__PURE__ */ Object.assign(PaginationComponent, {\n Popover: PaginationPopover\n})\n\nPaginationComponent.displayName = 'Pagination'\n","import * as React from 'react'\n\nimport type { TcolorScheme } from '../../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../../styled'\nimport { Pagination as PaginationComponent } from '../../pagination/Pagination'\nimport { Text } from '../../text/Text'\nimport { useDataTable } from '../DataTable.context'\nimport { AsyncDataState } from '../DataTable.types'\n\nconst StyledNav = styled('nav', {\n base: [\n 'flex',\n 'flex-col',\n 'justify-between',\n 'items-center',\n 'tabular-nums',\n 'flex-wrap',\n 'w-full',\n 'gap-4',\n 'mt-4',\n 'md:flex-row'\n ]\n})\n\ntype PaginationProps = React.ComponentProps<typeof StyledNav> & {\n colorScheme?: TcolorScheme\n}\n\n/** Applies pagination to parent DataTableProvider and renders UI to switch pages etc */\nexport const Pagination = ({ colorScheme, ...rest }: PaginationProps) => {\n const {\n applyPagination,\n removePagination,\n getState,\n getExpandedRowModel,\n getRowModel,\n setPageIndex,\n getTotalRows,\n getPageCount,\n asyncDataState,\n hasAsyncData\n } = useDataTable()\n\n React.useEffect(() => {\n applyPagination()\n return () => removePagination()\n }, [applyPagination, removePagination])\n\n const { pagination: paginationState } = getState()\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n // Show pagination only if total pages are more than 1\n const showPagination = hasAsyncData\n ? getPageCount() > 1\n : getExpandedRowModel().rows.length / paginationState.pageSize > 1\n\n if (isEmpty || !showPagination) return null\n const totalVisibleRows = getExpandedRowModel().rows.length\n\n const start =\n totalVisibleRows === 0\n ? 0\n : paginationState.pageIndex * paginationState.pageSize + 1\n\n const asyncRowCount = getRowModel().rows.length\n const end = hasAsyncData\n ? asyncRowCount === 0\n ? start\n : start + asyncRowCount - 1\n : Math.min(start + paginationState.pageSize - 1, totalVisibleRows)\n\n // indexing for the pagination component is 1 based\n const setPage = (index: number) => {\n setPageIndex(index - 1)\n }\n\n const pageCount = hasAsyncData\n ? getPageCount()\n : Math.max(1, Math.ceil(totalVisibleRows / paginationState.pageSize))\n\n return (\n <StyledNav {...rest}>\n <Text size=\"sm\">{`${start} - ${end} of ${\n hasAsyncData ? getTotalRows() : totalVisibleRows\n } items`}</Text>\n <PaginationComponent\n colorScheme={colorScheme}\n selectedPage={paginationState.pageIndex + 1}\n pagesCount={pageCount}\n onSelectedPageChange={setPage}\n />\n </StyledNav>\n )\n}\n\nPagination.displayName = 'Pagination'\n","import { DataTableProvider } from './DataTable.context'\nimport { DataTableBody } from './DataTableBody'\nimport { DataTableBulkActions } from './DataTableBulkActions'\nimport { DataTableBulkActionsFloating } from './DataTableBulkActionsFloating'\nimport { DataTableDataCell } from './DataTableDataCell'\nimport { DataTableEmptyState } from './DataTableEmptyState'\nimport { DataTableError } from './DataTableError'\nimport { DataTableGlobalFilter } from './DataTableGlobalFilter'\nimport { DataTableHead } from './DataTableHead'\nimport { DataTableHeaderCell } from './DataTableHeaderCell'\nimport { DataTableLoading } from './DataTableLoading'\nimport { DataTableMetaData } from './DataTableMetaData'\nimport { DataTableRow } from './DataTableRow'\nimport { DataTableRowSelectionCheckbox } from './DataTableRowSelectionCheckbox'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\nimport { DataTableTable } from './DataTableTable'\nimport { DragAndDropTable } from './drag-and-drop/DragAndDropTable'\nimport { Pagination } from './pagination/Pagination'\n\n/** Context provider for DataTable state and logic.\n *\n * Children can call `useDataTable` to access everything provided by `@tanstack/react-table` plus\n * the functionality we've built on top.\n */\nexport const DataTable = /* @__PURE__ */ Object.assign(DataTableProvider, {\n /** Default table body implementation for `DataTable`.\n *\n * Can be configured with alternating colours of rows. If you need more customisation options,\n * you can build your own implementation with `useDataTable()` and the UI-only `Table` components.\n */\n Body: DataTableBody,\n\n /** Default table data cell implementation for `DataTable`\n *\n *\n */\n DataCell: DataTableDataCell,\n\n /**\n * Used in place of `DataTable.Table` to render a table with rows that the user can sort by drag-and-drop\n */\n DragAndDropTable: DragAndDropTable,\n\n /** Default global search implementation for `DataTable`\n *\n * If you need more customisation options, you can compose your own implementation with our UI-only input components and `useDataTable`.\n */\n GlobalFilter: DataTableGlobalFilter,\n\n /** Default table head implementation\n *\n * Can be configured to be sortable and with different visual themes.\n * If you need more customisation options, you can build your own implementation\n * with `useDataTable` and the UI-only `Table` components.\n */\n Head: DataTableHead,\n\n /** Default header implementation for `DataTable`\n *\n * Can be configured to make the column sortable. If you need more customisation options,\n * you can build your own implementation with the UI-only `Table` components.\n */\n HeaderCell: DataTableHeaderCell,\n\n /** Default pagination implementation for `DataTable`\n *\n * Can navigate forward, backward, or to any specific page. If you need more customisation options,\n * you can build your own implementation with `useDataTable` and other UI components.\n *\n */\n MetaData: DataTableMetaData,\n\n /** Default display of amount of items and current sorting status for 'DataTable'\n *\n */\n Pagination: Pagination,\n\n /** Default row implementation for `DataTable`\n *\n * Renders all visible cells as `Table.Cell`. If you need more customisation options,\n * you can build your own implementation with the UI-only `Table` components.\n */\n Row: DataTableRow,\n\n /** Default table implementation for `DataTable`.\n *\n * Can be configured with sortable columns and different visual themes.\n *\n * If you need more customisation options, you can compose your own implementation with\n * lower-level `DataTable` components or build the whole thing from\n * scratch with `useDataTable` and the UI-only `Table` components.\n *\n */\n Table: DataTableTable,\n\n /** Default loading implementation for remote data\n *\n * Renders a loading component while fetching the paginated data using `getAsyncData`.\n *\n * If you need more customisation, you can compose your own implentation, `asyncDataState`\n * can be retrieved from `useDataTable`\n */\n Loading: DataTableLoading,\n\n /** Default error implementation for remote data\n *\n * Renders an error component when `getAsyncData` promise rejects.\n * Children are rendered as a function, it exposes a `runAsyncData` function to the children component.\n * `runAsyncData()` can be used to retry fetching the paginated data with the current pageIndex, pageSize\n * and sorting parameters or your own custom paginated options.\n *\n * If you need more customisation, you can compose your own implentation, `asyncDataState` and `runAsyncData()`\n * can be retrieved from `useDataTable`\n *\n */\n Error: DataTableError,\n\n /** Empty state implementation for `DataTable`.\n *\n * Extends the EmptyState component\n */\n EmptyState: DataTableEmptyState,\n\n /** Select all rows checkbox.\n *\n * Renders a checkbox on the header, allowing for bulk selection/deselection of all selectable rows\n */\n SelectAllRowsCheckbox: DataTableSelectAllRowsCheckbox,\n\n /** Individual row selection checkbox.\n *\n * Renders a checkbox on each row, allowing for individual selection/deselection of any selectable row\n */\n RowSelectionCheckbox: DataTableRowSelectionCheckbox,\n\n /** Bulk actions for selected rows.\n *\n * Renders a toolbar with actions that can be applied to all selected rows\n */\n BulkActions: DataTableBulkActions,\n\n /** Bulk actions for selected rows.\n *\n * Renders a toolbar with actions that can be applied to all selected rows\n */\n BulkActionsFloating: DataTableBulkActionsFloating\n})\n","export const monthNamesShort = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec'\n]\n\nexport const weekdayNamesShort = [\n 'Sun',\n 'Mon',\n 'Tue',\n 'Wed',\n 'Thu',\n 'Fri',\n 'Sat'\n]\n\nexport const DEFAULT_LABELS = {\n open: 'Open calendar',\n next: 'Next month',\n previous: 'Previous month',\n nextYear: 'Next year',\n previousYear: 'Previous year'\n}\n","import { styled } from '../../styled'\n\nexport const Day = styled('button', {\n base: [\n 'bg-transparent',\n 'border-none',\n 'rounded-full',\n 'text-grey-900',\n 'cursor-pointer',\n 'font-body',\n 'text-sm',\n 'size-8',\n 'p-0',\n 'transition-all',\n 'duration-75',\n 'hover:bg-grey-200',\n 'active:bg-primary-800',\n 'active:text-white',\n 'focus:outline-2',\n 'focus:outline-offset-2',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'disabled:cursor-default',\n 'disabled:opacity-30'\n ],\n variants: {\n isSelected: {\n true: ['bg-primary-800', 'hover:bg-primary-800', 'text-white']\n },\n isToday: {\n true: ['bg-grey-200']\n },\n isOutsideMonth: {\n true: ['text-grey-600']\n }\n }\n})\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport type { Props as DayzedInterface } from 'dayzed'\nimport { useDayzed } from 'dayzed'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Button } from '../button/Button'\nimport { Icon } from '../icon/Icon'\nimport { Text } from '../text/Text'\nimport { DEFAULT_LABELS, monthNamesShort, weekdayNamesShort } from './constants'\nimport { Day } from './Day'\n\nconst StyledButton = styled(Button, {\n base: ['text-grey-1000', 'p-3', 'w-16'],\n variants: {\n selected: {\n false: [\n 'disabled:bg-white!',\n 'font-normal',\n 'hover:bg-grey-200!',\n 'hover:text-grey-1000!',\n 'text-grey-1000!'\n ]\n }\n }\n})\n\nexport type CalendarTranslationProps = {\n monthNames?: string[]\n weekdayNames?: string[]\n labels?: {\n open: string\n next: string\n previous: string\n nextYear: string\n previousYear: string\n }\n}\n\ntype CalendarProps = DayzedInterface &\n CalendarTranslationProps & {\n refDateToday?: React.RefObject<HTMLButtonElement | null>\n refDateSelected?: React.RefObject<HTMLButtonElement | null>\n setYear: (date: Date) => Promise<void>\n className?: string\n }\n\nconst offsetWeekdayNames = (\n weekdayNames: string[],\n firstDayOfWeek: number\n): string[] => {\n const start = weekdayNames.slice(0, firstDayOfWeek)\n const end = weekdayNames.slice(firstDayOfWeek)\n return [...end, ...start]\n}\n\nexport const Calendar = ({\n className,\n refDateSelected,\n refDateToday,\n firstDayOfWeek = 0,\n monthNames = monthNamesShort,\n weekdayNames = weekdayNamesShort,\n labels = DEFAULT_LABELS,\n date: dateProp,\n minDate,\n maxDate,\n setYear,\n ...rest\n}: CalendarProps) => {\n // `new Date()` as a default parameter runs on every render (impure render,\n // and a server/client hydration divergence near midnight) — capture the\n // fallback once instead.\n const [fallbackDate] = React.useState(() => new Date())\n const date = dateProp ?? fallbackDate\n\n const [showYears, setShowYears] = React.useState<boolean>(false)\n const [currentYear, setCurrentYear] = React.useState<number>(\n date?.getFullYear()\n )\n\n const handleSetYear = (year: number): void => {\n // Copy before setFullYear — mutating the `date` prop in place changes the\n // caller's object.\n const newDate = new Date(date)\n newDate.setFullYear(year)\n setYear(newDate)\n setShowYears(false)\n }\n\n const isAtMinYear = minDate && currentYear - 16 <= minDate.getFullYear()\n const isAtMaxYear = maxDate && currentYear >= maxDate.getFullYear()\n\n const yearList = Array.from({ length: 16 }, (_, i) => {\n const year = currentYear - i\n if (\n (maxDate && year > maxDate.getFullYear()) ||\n (minDate && year < minDate.getFullYear())\n )\n return 0\n return year\n })\n\n const { calendars, getBackProps, getForwardProps, getDateProps } = useDayzed({\n firstDayOfWeek,\n showOutsideDays: true,\n date,\n minDate,\n maxDate,\n ...rest\n })\n\n if (!calendars.length) return null\n\n return (\n <div className={cn('relative', 'w-fit', '-mt-1', className)}>\n <div className=\"absolute top-0 -right-1 flex\">\n <ActionIcon\n label={labels[showYears ? 'previousYear' : 'previous']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getBackProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear - 16)\n })}\n disabled={showYears && isAtMinYear}\n >\n <Icon is={ChevronLeft} />\n </ActionIcon>\n <ActionIcon\n label={labels[showYears ? 'nextYear' : 'next']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getForwardProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear + 16)\n })}\n disabled={showYears && isAtMaxYear}\n >\n <Icon is={ChevronRight} />\n </ActionIcon>\n </div>\n {showYears && (\n <div className=\"grid grid-cols-4 gap-x-1 gap-y-3 pt-12 [direction:rtl]\">\n {yearList.map((year, i) => {\n const isCurrentYear = year === date.getFullYear()\n // Out-of-range slots render as empty placeholders in a fixed 16-cell\n // grid; several share the same `0` value, so the slot index is their\n // only stable identity.\n // eslint-disable-next-line react/no-array-index-key\n if (!year) return <div key={i} className=\"h-10 w-16\" />\n\n return (\n <StyledButton\n key={year}\n theme={isCurrentYear ? 'primary' : 'neutral'}\n onClick={() => handleSetYear(year)}\n selected={isCurrentYear}\n >\n {year}\n </StyledButton>\n )\n })}\n </div>\n )}\n {!showYears &&\n calendars.map(({ month, year, weeks }) => (\n <div key={`${month}${year}`}>\n <div className=\"mb-4 flex h-10 items-center\">\n <Button\n theme=\"neutral\"\n onClick={() => setShowYears(true)}\n className=\"text-grey-1000 px-0\"\n >\n {monthNames[month]} {year}\n </Button>\n </div>\n <div className=\"mb-3 grid grid-cols-7 gap-x-2 gap-y-1\">\n {offsetWeekdayNames(weekdayNames, firstDayOfWeek).map(\n (weekday) => (\n <Text\n as=\"span\"\n size=\"sm\"\n weight=\"bold\"\n key={`${month}${year}${weekday}`}\n className=\"text-center\"\n >\n {weekday}\n </Text>\n )\n )}\n </div>\n <div className=\"grid grid-cols-7 gap-x-2 gap-y-1\">\n {weeks.map((week, weekIndex) =>\n week.map((dateObj, index) => {\n const key = `${month}${year}${weekIndex}${index}`\n\n if (!dateObj) return <div key={key} />\n\n const { date, selected, today, prevMonth, nextMonth } =\n dateObj\n\n return (\n <Day\n isOutsideMonth={prevMonth || nextMonth}\n isSelected={selected}\n isToday={today}\n key={key}\n ref={\n selected ? refDateSelected : today ? refDateToday : null\n }\n {...getDateProps({ dateObj })}\n type=\"button\"\n >\n {date.getDate()}\n </Day>\n )\n })\n )}\n </div>\n </div>\n ))}\n </div>\n )\n}\n\nCalendar.displayName = 'Calendar'\n","export const DEFAULT_DATE_FORMAT = 'DD/MM/YYYY'\n","import { CalendarEvent } from '@atom-learning/icons'\nimport { useComposedRefs } from '@radix-ui/react-compose-refs'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport type { Props as DayzedInterface } from 'dayzed'\nimport * as React from 'react'\n\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Calendar, type CalendarTranslationProps } from '../calendar/Calendar'\nimport { DEFAULT_LABELS } from '../calendar/constants'\nimport { Icon } from '../icon/Icon'\nimport { Input } from '../input/Input'\nimport { Popover } from '../popover/Popover'\nimport { DEFAULT_DATE_FORMAT } from './constants'\n\ndayjs.extend(customParseFormat)\n\nexport type DateInputProps = Omit<DayzedInterface, 'onDateSelected'> &\n CalendarTranslationProps & {\n initialDate?: Date\n dateFormat?: string\n disabled?: boolean\n size?: 'sm' | 'md' | 'lg'\n appearance?: 'standard' | 'modern'\n theme?: 'white' | 'grey'\n revalidate?: () => Promise<boolean>\n onChange?: (value?: Date) => void\n ref?: React.Ref<HTMLInputElement>\n }\n\nconst formatDateToString = (date?: Date, dateFormat = DEFAULT_DATE_FORMAT) =>\n date ? dayjs(date).format(dateFormat) : ''\n\nexport const DateInput = ({\n ref,\n initialDate,\n dateFormat = DEFAULT_DATE_FORMAT,\n firstDayOfWeek = 1,\n disabled,\n monthNames,\n weekdayNames,\n size = 'md',\n appearance,\n theme,\n labels,\n revalidate,\n onChange,\n minDate,\n maxDate,\n ...rest\n}: DateInputProps) => {\n const [date, setDate] = React.useState(\n initialDate ? dayjs(initialDate).toDate() : undefined\n )\n\n const [inputElRef, setInputElRef] = useCallbackRefState()\n const composedInputRef = useComposedRefs(\n ref as React.Ref<HTMLElement>,\n setInputElRef\n )\n\n const dateString = formatDateToString(date, dateFormat)\n\n const handleInputChange = React.useCallback(\n (event) => {\n const newDateString = event.target.value\n const parsedInputDate = dayjs(newDateString, dateFormat)\n const newDate = parsedInputDate.isValid()\n ? parsedInputDate.toDate()\n : undefined\n setDate(newDate)\n onChange?.(newDate)\n },\n [dateFormat, onChange]\n )\n\n const handleCalendarChange = React.useCallback(\n (newDate) => {\n setDate(newDate)\n\n const mirrorChangeToInputElement = () => {\n if (!inputElRef) return\n\n // Call the `set` function on the input value directly to mirror the change.\n // Props to: https://stackoverflow.com/a/46012210\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n 'value'\n )?.set\n nativeInputValueSetter?.call(\n inputElRef,\n formatDateToString(newDate, dateFormat)\n )\n const event = new Event('input', { bubbles: true })\n inputElRef.dispatchEvent(event)\n }\n mirrorChangeToInputElement()\n },\n [dateFormat, inputElRef]\n )\n\n const updatedLabels = {\n ...DEFAULT_LABELS,\n ...labels\n }\n\n const [calendarOpen, setCalendarOpen] = React.useState(false)\n\n const refDateToday = React.useRef<HTMLButtonElement>(null)\n const refDateSelected = React.useRef<HTMLButtonElement>(null)\n\n const iconSize = getFieldIconSize(size)\n\n return (\n <div className=\"relative h-max\">\n <Input\n name=\"date\"\n disabled={disabled}\n size={size}\n appearance={appearance}\n theme={theme}\n {...(rest as React.ComponentProps<typeof Input>)}\n onChange={handleInputChange}\n ref={composedInputRef}\n defaultValue={dateString}\n />\n <Popover modal open={calendarOpen} onOpenChange={setCalendarOpen}>\n <Popover.Trigger asChild>\n <ActionIcon\n disabled={disabled}\n label={updatedLabels.open}\n size={iconSize}\n theme=\"neutral\"\n hasTooltip={false}\n className=\"absolute top-1/2 right-0 -translate-y-1/2\"\n >\n <Icon is={CalendarEvent} />\n </ActionIcon>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side=\"bottom\"\n align=\"end\"\n showCloseButton={false}\n onOpenAutoFocus={(e) => {\n e.preventDefault()\n if (date) {\n refDateSelected.current?.focus()\n } else {\n refDateToday.current?.focus()\n }\n }}\n className=\"z-1147483646 pr-6\"\n >\n <Calendar\n date={\n // The calendar only mounts inside the opened popover (a\n // client-only interaction), so this `new Date()` fallback never\n // renders on the server and can't cause a hydration mismatch.\n // eslint-disable-next-line react-doctor/rendering-hydration-mismatch-time\n date || new Date()\n }\n selected={date}\n onDateSelected={async (date) => {\n setCalendarOpen(false)\n await handleCalendarChange(date.date)\n if (revalidate) revalidate()\n }}\n setYear={async (date) => {\n await handleCalendarChange(date)\n if (revalidate) revalidate()\n }}\n minDate={minDate}\n maxDate={maxDate}\n refDateToday={refDateToday}\n refDateSelected={refDateSelected}\n firstDayOfWeek={firstDayOfWeek}\n monthNames={monthNames}\n weekdayNames={weekdayNames}\n labels={updatedLabels}\n />\n </Popover.Content>\n </Popover.Portal>\n </Popover>\n </div>\n )\n}\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport { DateInput, type DateInputProps } from '../date-input/DateInput'\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\n\ntype DateFieldProps = DateInputProps & FieldElementWrapperProps\n\nexport const DateField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: DateFieldProps) => {\n const { register, trigger } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <DateInput\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n revalidate={trigger}\n />\n </FieldWrapper>\n )\n}\n\nDateField.displayName = 'DateField'\n","import { styled } from '../../styled'\n\nexport const DialogActionBar = styled('div', {\n base: [\n 'border-t',\n 'border-grey-300',\n 'p-4',\n 'flex',\n 'gap-4',\n 'shadow-[0_-6px_6px_-1px_rgba(51,51,51,0.05)]'\n ]\n})\n","import { styled } from '../../styled'\n\nexport const DialogBackground = styled('div', {\n base: ['w-screen', 'h-screen']\n})\n","import { Close } from '@radix-ui/react-dialog'\n\nexport const DialogClose = Close\n","export const backdropOverlay = [\n 'bg-alpha-600',\n 'fixed',\n 'inset-0',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-fade-in',\n 'motion-safe:data-[state=closed]:animate-fade-out'\n]\n","import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Close, Content, Overlay, Portal } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { backdropOverlay } from '../../utilities/style/backdrop-overlay'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { DialogBackground } from './DialogBackground'\n\nconst modalOverlayId = 'modal_overlay'\n\nconst StyledDialogOverlay = styled(Overlay, {\n base: backdropOverlay\n})\n\nconst StyledDialogContent = styled(\n Content,\n {\n base: [\n // `transform: translate()` is required for `floating-ui` to\n // correctly position elements within the Dialog component.\n // we can't use the translate property directly\n 'transform-[translate(-50%,-50%)]',\n 'bg-white',\n 'shadow-xl',\n 'box-border',\n 'left-1/2',\n 'h-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'overflow-y-auto',\n 'rounded-md',\n 'p-8',\n 'fixed',\n 'top-1/2',\n 'z-1147483646',\n 'focus:outline-none',\n 'motion-safe:data-[state=open]:animate-slide-in-center',\n 'motion-safe:data-[state=closed]:animate-slide-out-center'\n ],\n variants: {\n size: {\n xs: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-95',\n '[&>[data-dialog-close]]:top-4',\n '[&>[data-dialog-close]]:right-4'\n ],\n sm: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-120',\n '[&>[data-dialog-close]]:top-4',\n '[&>[data-dialog-close]]:right-4'\n ],\n md: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-150',\n '[&>[data-dialog-close]]:top-4',\n '[&>[data-dialog-close]]:right-4'\n ],\n lg: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-200',\n '[&>[data-dialog-close]]:top-4',\n '[&>[data-dialog-close]]:right-4'\n ],\n xl: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-275',\n '[&>[data-dialog-close]]:top-4',\n '[&>[data-dialog-close]]:right-4'\n ],\n fullscreen: [\n 'rounded-none',\n 'w-screen',\n 'h-screen',\n 'max-w-screen',\n 'max-h-screen',\n 'supports-svh:h-svh',\n 'supports-svh:max-h-svh',\n '[&>[data-dialog-close]]:top-safe-offset-4',\n '[&>[data-dialog-close]]:right-safe-offset-4'\n ]\n },\n layout: {\n panel: ['flex', 'flex-col', 'p-0']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype DialogContentProps = React.ComponentProps<typeof StyledDialogContent> & {\n closeDialogText?: string\n showCloseButton?: boolean\n}\n\nexport const DialogContent = ({\n size = 'sm',\n children,\n closeDialogText = 'Close dialog',\n showCloseButton = true,\n ...rest\n}: DialogContentProps) => (\n <Portal>\n <StyledDialogOverlay id={modalOverlayId}>\n {React.Children.map(children, (child) =>\n React.isValidElement(child) && child.type === DialogBackground\n ? child\n : null\n )}\n <StyledDialogContent\n size={size}\n aria-label=\"Dialog\"\n onPointerDownOutside={(event) => {\n const element = event.target as HTMLElement\n if (element?.id !== modalOverlayId) {\n event.preventDefault()\n }\n }}\n {...rest}\n >\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closeDialogText}\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n data-dialog-close\n className=\"absolute top-4 right-4 size-12\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {React.Children.map(children, (child) =>\n React.isValidElement(child) && child.type === DialogBackground\n ? null\n : child\n )}\n </StyledDialogContent>\n </StyledDialogOverlay>\n </Portal>\n)\n","import { styled } from '../../styled'\n\nexport const DialogFooter = styled('footer', {\n base: ['flex', 'justify-end', 'gap-3', 'pt-4']\n})\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Heading, type HeadingProps } from '../heading/Heading'\n\nexport const DialogHeading = ({ className, ...rest }: HeadingProps) => (\n <Heading\n size=\"sm\"\n {...rest}\n className={cn(\n 'border-b',\n 'border-b-grey-200',\n 'pb-8',\n 'pt-0',\n 'px-8',\n 'mb-8',\n '-mx-8',\n 'box-content',\n className\n )}\n />\n)\n","import { styled } from '../../styled'\n\nexport const DialogNavigationBar = styled('div', {\n base: [\n 'flex',\n 'justify-between',\n 'items-center',\n 'border-b',\n 'border-grey-300',\n 'p-4'\n ]\n})\n","import { styled } from '../../styled'\n\nexport const DialogScrollableContent = styled('div', {\n base: ['overflow-scroll', 'flex-1', 'p-4']\n})\n","import { Description, Root, Title, Trigger } from '@radix-ui/react-dialog'\n\nimport { DialogActionBar } from './DialogActionBar'\nimport { DialogBackground } from './DialogBackground'\nimport { DialogClose } from './DialogClose'\nimport { DialogContent } from './DialogContent'\nimport { DialogFooter } from './DialogFooter'\nimport { DialogHeading } from './DialogHeading'\nimport { DialogNavigationBar } from './DialogNavigationBar'\nimport { DialogScrollableContent } from './DialogScrollableContent'\n\nexport const Dialog = /* @__PURE__ */ Object.assign(Root, {\n ActionBar: DialogActionBar,\n Background: DialogBackground,\n Close: DialogClose,\n Content: DialogContent,\n Heading: DialogHeading,\n Footer: DialogFooter,\n NavigationBar: DialogNavigationBar,\n ScrollableContent: DialogScrollableContent,\n\n Description: Description,\n Title: Title,\n Trigger: Trigger\n})\n\nDialog.displayName = 'Dialog'\n","import { Overlay } from '@radix-ui/react-dialog'\n\nimport { styled } from '../../styled'\nimport { backdropOverlay } from '../../utilities/style/backdrop-overlay'\n\nexport const DrawerOverlay = styled(\n Overlay,\n { base: backdropOverlay },\n { enablePolymorphism: false }\n)\n","import { Content, Portal } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { ColorScheme } from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { DrawerContext } from './Drawer.context'\nimport { DrawerOverlay } from './DrawerOverlay'\n\nexport const StyledContent = styled(Content, {\n base: [\n 'bg-(--base-1)',\n 'shadow-lg',\n 'fixed',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n position: {\n top: [\n '[--slide-direction-out-y:-100%]',\n 'top-0',\n 'left-0',\n 'w-full',\n 'max-h-17/20'\n ],\n right: [\n '[--slide-direction-out-x:100%]',\n 'right-0',\n 'top-0',\n 'h-full',\n 'w-(--drawer-content-width,100%)',\n 'max-w-full'\n ],\n bottom: [\n '[--slide-direction-out-y:100%]',\n 'bottom-0',\n 'left-0',\n 'w-full',\n 'max-h-17/20'\n ],\n left: [\n '[--slide-direction-out-x:-100%]',\n 'left-0',\n 'top-0',\n 'h-full',\n 'w-(--drawer-content-width,100%)',\n 'max-w-full'\n ]\n },\n size: {\n xs: ['[--drawer-content-width:240px]'],\n sm: ['[--drawer-content-width:256px]'],\n md: ['[--drawer-content-width:288px]'],\n lg: ['[--drawer-content-width:304px]'],\n xl: ['[--drawer-content-width:320px]'],\n '2xl': ['[--drawer-content-width:720px]'],\n '3xl': ['[--drawer-content-width:1000px]']\n }\n }\n})\n\nexport const DrawerContent = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledContent>) => {\n const { position } = React.use(DrawerContext)\n\n return (\n <Portal>\n <DrawerOverlay />\n <ColorScheme base=\"grey1\" accent=\"primary1\" asChild>\n <StyledContent size=\"lg\" position={position} {...rest} asChild>\n <div className=\"flex flex-col\">{children}</div>\n </StyledContent>\n </ColorScheme>\n </Portal>\n )\n}\n","import * as React from 'react'\n\nimport { StyledContent } from './DrawerContent'\n\ntype DrawerProviderProps = {\n position?: React.ComponentProps<typeof StyledContent>['position']\n}\n\ntype DrawerContext = DrawerProviderProps\n\nexport const DrawerContext = React.createContext<DrawerContext>({\n position: 'left'\n})\n\nexport const DrawerProvider = ({\n position = 'left',\n ...rest\n}: React.PropsWithChildren<DrawerProviderProps>) => {\n const value = React.useMemo<DrawerContext>(() => ({ position }), [position])\n return <DrawerContext value={value} {...rest} />\n}\n","import { Close } from '@atom-learning/icons'\nimport { Close as DialogClose } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nexport const DrawerClose = ({\n label = 'Close',\n ...props\n}: Omit<React.ComponentProps<typeof ActionIcon>, 'children'>) => (\n <DialogClose asChild>\n <ActionIcon\n theme=\"neutral\"\n appearance=\"simple\"\n size=\"md\"\n hasTooltip={false}\n label={label}\n {...props}\n >\n <Icon is={Close} />\n </ActionIcon>\n </DialogClose>\n)\n","import { styled } from '../../styled'\n\nexport const DrawerFooter = styled('div', {\n base: ['p-4', 'w-full', 'border-t', 'border-t-(--base-3)']\n})\n","import { styled } from '../../styled'\n\nexport const DrawerHeader = styled('div', {\n base: ['p-4', 'w-full', 'min-h-16', 'border-b', 'border-b-(--base-3)']\n})\n","import { styled } from '../../styled'\n\nexport const DrawerMain = styled('div', {\n base: ['p-4', 'w-full', 'grow', 'overflow-y-auto']\n})\n","import { Trigger } from '@radix-ui/react-dialog'\n\nexport const DrawerTrigger = Trigger\n","import { Root } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { DrawerProvider } from './Drawer.context'\nimport { DrawerClose } from './DrawerClose'\nimport { DrawerContent } from './DrawerContent'\nimport { DrawerFooter } from './DrawerFooter'\nimport { DrawerHeader } from './DrawerHeader'\nimport { DrawerMain } from './DrawerMain'\nimport { DrawerTrigger } from './DrawerTrigger'\n\ntype DrawerProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof DrawerProvider>\n\nconst DrawerComponent = ({ children, position, ...rest }: DrawerProps) => (\n <DrawerProvider position={position}>\n <Root {...rest}>{children}</Root>\n </DrawerProvider>\n)\n\nexport const Drawer = /* @__PURE__ */ Object.assign(DrawerComponent, {\n Close: DrawerClose,\n Content: DrawerContent,\n Main: DrawerMain,\n Header: DrawerHeader,\n Footer: DrawerFooter,\n Trigger: DrawerTrigger\n})\n","import { Content } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuContent = styled(\n Content,\n {\n base: [\n 'bg-white',\n 'rounded-sm',\n 'shadow-sm',\n 'py-2',\n 'z-10',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { Item } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuItem = styled(\n Item,\n {\n base: [\n 'items-center',\n 'text-grey-1000',\n 'cursor-pointer',\n 'flex',\n 'font-body',\n 'font-normal',\n 'relative',\n 'px-3',\n 'py-2',\n 'data-disabled:cursor-not-allowed',\n 'data-disabled:opacity-30',\n 'data-disabled:pointer-events-none',\n 'aria-[current=page]:before:absolute',\n 'aria-[current=page]:before:border-l-2',\n 'aria-[current=page]:before:border-l-current',\n \"aria-[current=page]:before:content-['']\",\n 'aria-[current=page]:before:h-6',\n 'aria-[current=page]:before:left-0',\n 'aria-[current=page]:before:outline-none',\n 'aria-[current=page]:before:scale-100',\n 'focus:before:absolute',\n 'focus:before:border-l-2',\n 'focus:before:border-l-current',\n \"focus:before:content-['']\",\n 'focus:before:h-6',\n 'focus:before:left-0',\n 'focus:before:outline-none',\n 'focus:before:scale-100',\n 'focus:outline-none',\n 'focus:text-primary-900',\n 'hover:underline'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { Label } from '@radix-ui/react-dropdown-menu'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\ntype DropdownMenuLabelProps = React.ComponentProps<typeof Label>\n\nexport const DropdownMenuLabel = ({\n className,\n ...rest\n}: DropdownMenuLabelProps) => (\n <Text\n as={Label}\n size=\"sm\"\n className={cn('px-3', 'py-2', 'text-text-subtle', className)}\n {...rest}\n />\n)\n\nDropdownMenuLabel.displayName = 'DropdownMenuLabel'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\nimport { DropdownMenuItem } from './DropdownMenuItem'\n\nconst StyledLink = styled('a', {\n base: ['no-underline']\n})\n\nexport const DropdownMenuLinkItem = ({\n children,\n href,\n reloadDocument,\n target,\n rel,\n download,\n ...rest\n}: React.ComponentProps<typeof DropdownMenuItem> &\n Pick<React.ComponentPropsWithoutRef<'a'>, 'target' | 'rel' | 'download'> & {\n href: string\n reloadDocument?: boolean\n }) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n\n return (\n // Anchor attributes belong on the rendered <a> (StyledLink); the remaining\n // props are DropdownMenuItem's menu-item behaviour props, which it merges onto\n // StyledLink via `asChild`. `getExternalAnchorProps` still wins for external\n // hrefs (security rel/target).\n <DropdownMenuItem {...rest} asChild>\n <StyledLink\n as={routerLinkProps.as}\n href={href}\n target={target}\n rel={rel}\n download={download}\n role=\"menuitem\"\n {...getExternalAnchorProps(href)}\n >\n {children}\n </StyledLink>\n </DropdownMenuItem>\n )\n}\n","import { Separator } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuSeparator = styled(\n Separator,\n {\n base: ['h-px', 'bg-grey-600', 'my-2']\n },\n { enablePolymorphism: false }\n)\n","import { Trigger } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuTrigger = styled(\n Trigger,\n {\n base: ['disabled:cursor-not-allowed', 'disabled:opacity-30']\n },\n { enablePolymorphism: false }\n)\n","import {\n Group,\n Portal,\n Root as DropdownMenuRoot\n} from '@radix-ui/react-dropdown-menu'\nimport * as React from 'react'\n\nimport { DropdownMenuContent } from './DropdownMenuContent'\nimport { DropdownMenuItem } from './DropdownMenuItem'\nimport { DropdownMenuLabel } from './DropdownMenuLabel'\nimport { DropdownMenuLinkItem } from './DropdownMenuLinkItem'\nimport { DropdownMenuSeparator } from './DropdownMenuSeparator'\nimport { DropdownMenuTrigger } from './DropdownMenuTrigger'\n\nexport const DropdownMenu = /* @__PURE__ */ Object.assign(DropdownMenuRoot, {\n Content: DropdownMenuContent,\n Group: Group,\n Item: DropdownMenuItem,\n Label: DropdownMenuLabel,\n LinkItem: DropdownMenuLinkItem,\n Portal: Portal,\n Separator: DropdownMenuSeparator,\n Trigger: DropdownMenuTrigger\n})\n","import { Upload } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { cn, type StyledComponentProps } from '../../styled'\nimport { Button } from '../button/Button'\nimport { Icon } from '../icon/Icon'\n\n// FileInput always renders the Button as a <label>, so its public props are\n// Button's own props retargeted to the label element\nexport type FileInputProps = Omit<\n StyledComponentProps<typeof Button, 'label'>,\n 'as'\n> & {\n onFileSelect: (selection: FileList | null) => void\n accept?: string\n multiple?: boolean\n disabled?: boolean\n}\n\nexport const FileInput = ({\n accept,\n children,\n className,\n disabled = false,\n multiple = false,\n onFileSelect,\n ...rest\n}: FileInputProps) => {\n const handleFileSelect = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { files } = event.target\n\n onFileSelect(files)\n }\n\n // The rendered element is a <label>, which ignores the `disabled` attribute\n // and never matches `:disabled`. Disable the hidden input (so the label can't\n // open the picker) and mirror Button's disabled affordance via aria-disabled\n // + pointer-events-none/opacity so the state is visible and interaction-free.\n return (\n <Button\n as=\"label\"\n aria-disabled={disabled || undefined}\n className={cn(\n disabled && 'pointer-events-none cursor-not-allowed opacity-30',\n className\n )}\n {...rest}\n >\n <Icon is={Upload} />\n {children}\n <input\n type=\"file\"\n onChange={handleFileSelect}\n accept={accept}\n multiple={multiple}\n disabled={disabled}\n hidden\n />\n </Button>\n )\n}\n\nFileInput.displayName = 'FileInput'\n","import * as React from 'react'\nimport type {\n DefaultValues,\n FieldValues,\n Mode,\n SubmitErrorHandler,\n SubmitHandler,\n UseFormMethods\n} from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\n\nimport {\n type FormCustomContextType,\n FormCustomContext\n} from './useFormCustomContext'\n\ntype FormProps<TFormData extends FieldValues> = Omit<\n React.HTMLAttributes<HTMLFormElement>,\n 'onSubmit' | 'onError' | 'children'\n> & {\n defaultValues?: DefaultValues<TFormData>\n validationMode?: Mode\n onSubmit: SubmitHandler<TFormData>\n onError?: SubmitErrorHandler<TFormData>\n noValidate?: boolean\n children:\n | React.ReactNode\n | ((methods: UseFormMethods<TFormData>) => React.ReactNode)\n}\n\nexport const Form = <TFormData extends FieldValues>(\n props: FormProps<TFormData> & FormCustomContextType\n) => {\n const {\n children,\n defaultValues,\n validationMode = 'onBlur',\n onSubmit,\n onError,\n appearance,\n theme,\n ...rest\n } = props\n\n const methods = useForm<TFormData>({\n defaultValues,\n mode: validationMode\n })\n\n // Memoized: the form re-renders on every RHF state change and would\n // otherwise push a fresh context value to every consumer each time.\n const customContextValue = React.useMemo(\n () => ({ appearance, theme }),\n [appearance, theme]\n )\n\n return (\n <FormProvider {...methods}>\n <FormCustomContext value={customContextValue}>\n <form\n aria-label=\"form\"\n onSubmit={methods.handleSubmit(onSubmit, onError)}\n {...rest}\n >\n {typeof children === 'function' ? children(methods) : children}\n </form>\n </FormCustomContext>\n </FormProvider>\n )\n}\n\nForm.displayName = 'Form'\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { Input, type InputProps } from '../input/Input'\n\ntype InputFieldProps = InputProps & FieldElementWrapperProps\n\nexport const InputField = ({\n className,\n label,\n name,\n validation,\n prompt,\n description,\n hideLabel,\n appearance,\n theme,\n ...rest\n}: InputFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Input\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nInputField.displayName = 'InputField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const StyledLi = styled('li', {\n base: ['last:mb-0', 'not-last:mb-2']\n})\n\nexport const StyledList = styled('ul', {\n base: ['list-inside', 'font-body'],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]']\n },\n noCapsize: {\n true: ['capsize-none']\n },\n ordered: {\n true: [\n 'pl-4',\n 'list-decimal',\n '[&_>_li]:pl-1',\n '[&_>_li::marker]:font-medium',\n '[&_>_li::marker]:text-sm'\n ],\n false: ['pl-3', 'list-disc', '[&_>_li]:pl-2']\n },\n theme: {\n primary: ['marker:text-primary-800']\n }\n }\n})\n\ntype ListProps = React.ComponentProps<typeof StyledList> & {\n ordered?: boolean\n}\n\nconst ListComponent = ({\n ref,\n size = 'md',\n noCapsize = true,\n ordered = false,\n ...rest\n}: ListProps) => (\n <StyledList\n ref={ref}\n as={ordered ? 'ol' : 'ul'}\n ordered={ordered}\n size={size}\n noCapsize={noCapsize}\n {...rest}\n />\n)\n\nexport const List = /* @__PURE__ */ Object.assign(ListComponent, {\n Item: StyledLi\n})\n","import type { Code } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownCodeProps = {\n node: Code\n}\n\nconst StyledMarkdownCode = styled('div', {\n base: [\n 'bg-grey-200',\n 'rounded-md',\n 'text-grey-1000',\n 'font-mono',\n 'text-sm/[1.4]',\n 'my-4',\n 'p-3'\n ]\n})\n\nexport const MarkdownCode = ({ node }: MarkdownCodeProps) => (\n <StyledMarkdownCode as=\"pre\">{node.value}</StyledMarkdownCode>\n)\n","import type { RootContent, Emphasis } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownEmphasisProps = {\n node: Emphasis\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const StyledMarkdownEmphasis = styled('em', {\n base: ['italic']\n})\n\nexport const MarkdownEmphasis = ({\n node,\n handleNode\n}: MarkdownEmphasisProps) => (\n <StyledMarkdownEmphasis>\n {node.children?.map(handleNode)}\n </StyledMarkdownEmphasis>\n)\n","import type { RootContent, Heading as HeadingType } from 'mdast'\nimport * as React from 'react'\n\nimport { Heading, type HeadingProps } from '../../heading/Heading'\n\ntype MarkdownHeadingProps = {\n node: HeadingType\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nconst getHeadingProps = (depth: number): HeadingProps => {\n switch (depth) {\n case 1:\n return { size: 'xl', as: 'h1' }\n case 2:\n return { size: 'lg', as: 'h2' }\n case 3:\n return { size: 'md', as: 'h3' }\n case 4:\n return { size: 'sm', as: 'h4' }\n case 5:\n return { size: 'xs', as: 'h5' }\n default:\n return { size: 'xs', as: 'h6' }\n }\n}\n\nexport const MarkdownHeading = ({\n node,\n handleNode,\n ...rest\n}: MarkdownHeadingProps) => {\n const { as, size } = getHeadingProps(node.depth)\n\n return (\n <Heading as={as} size={size} {...rest}>\n {node.children?.map(handleNode)}\n </Heading>\n )\n}\n","import type { Image as ImageType } from 'mdast'\nimport * as React from 'react'\n\nimport { Image } from '../../image/Image'\n\ntype MarkdownImageProps = {\n node: ImageType\n className?: string\n}\n\nexport const MarkdownImage = ({ node, className }: MarkdownImageProps) => (\n <Image src={node.url} alt={node.alt ?? undefined} className={className} />\n)\n","import type { InlineCode } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownInlineCodeProps = {\n node: InlineCode\n}\n\nconst StyledMarkdownInlineCode = styled('div', {\n base: [\n 'bg-grey-200',\n 'rounded-sm',\n 'text-grey-1000',\n 'inline-block',\n 'font-mono',\n 'text-[85%]',\n 'px-1',\n 'py-0.5'\n ]\n})\n\nexport const MarkdownInlineCode = ({ node }: MarkdownInlineCodeProps) => (\n <StyledMarkdownInlineCode as=\"code\">{node.value}</StyledMarkdownInlineCode>\n)\n","import type { RootContent, Link as LinkType } from 'mdast'\nimport * as React from 'react'\n\nimport { Link } from '../../link/Link'\n\ntype MarkdownLinkProps = {\n node: LinkType\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const MarkdownLink = ({ node, handleNode }: MarkdownLinkProps) => (\n <Link title={node.title ?? undefined} href={node.url}>\n {node.children?.map(handleNode)}\n </Link>\n)\n","import type { RootContent, List as ListType } from 'mdast'\nimport * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport { List } from '../../list/List'\n\ntype MarkdownListProps = {\n node: ListType\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n className?: string\n}\n\nexport const MarkdownList = ({\n node,\n handleNode,\n className\n}: MarkdownListProps) => (\n <List\n ordered={node.ordered || undefined}\n className={cn(\n '[&_p]:inline',\n '[&_p]:before:hidden',\n '[&_p]:after:hidden',\n className\n )}\n >\n {node.children?.map(handleNode)}\n </List>\n)\n","import type { RootContent, ListItem } from 'mdast'\nimport * as React from 'react'\n\nimport { List } from '../../list/List'\n\ntype MarkdownListItemProps = {\n node: ListItem\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const MarkdownListItem = ({\n node,\n handleNode\n}: MarkdownListItemProps) => (\n <List.Item>{node.children?.map(handleNode)}</List.Item>\n)\n","import type { RootContent, Paragraph } from 'mdast'\nimport * as React from 'react'\n\nimport { Text } from '../../text/Text'\n\ntype MarkdownParagraphProps = {\n node: Paragraph\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const MarkdownParagraph = ({\n node,\n handleNode,\n ...rest\n}: MarkdownParagraphProps) => (\n <Text {...rest}>{node.children?.map(handleNode)}</Text>\n)\n","import type { RootContent, Strong } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownStrongProps = {\n node: Strong\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nconst StyledMarkdownStrong = styled('strong', {\n base: ['font-semibold']\n})\n\nexport const MarkdownStrong = ({ node, handleNode }: MarkdownStrongProps) => (\n <StyledMarkdownStrong>{node.children?.map(handleNode)}</StyledMarkdownStrong>\n)\n","import type { Text as TextType } from 'mdast'\nimport * as React from 'react'\n\ntype MarkdownTextProps = {\n node: TextType\n}\n\nexport const MarkdownText = ({ node }: MarkdownTextProps): React.ReactNode =>\n node.value\n","import * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport { Divider } from '../../divider/Divider'\n\ntype MarkdownThematicBreakProps = {\n className?: string\n}\n\nexport const MarkdownThematicBreak = ({\n className\n}: MarkdownThematicBreakProps) => (\n <Divider className={cn('w-full', className)} />\n)\n","import { directiveFromMarkdown } from 'mdast-util-directive'\nimport { fromMarkdown } from 'mdast-util-from-markdown'\nimport { directive } from 'micromark-extension-directive'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { MarkdownCode } from './components/MarkdownCode'\nimport { MarkdownEmphasis } from './components/MarkdownEmphasis'\nimport { MarkdownHeading } from './components/MarkdownHeading'\nimport { MarkdownImage } from './components/MarkdownImage'\nimport { MarkdownInlineCode } from './components/MarkdownInlineCode'\nimport { MarkdownLink } from './components/MarkdownLink'\nimport { MarkdownList } from './components/MarkdownList'\nimport { MarkdownListItem } from './components/MarkdownListItem'\nimport { MarkdownParagraph } from './components/MarkdownParagraph'\nimport { MarkdownStrong } from './components/MarkdownStrong'\nimport { MarkdownText } from './components/MarkdownText'\nimport { MarkdownThematicBreak } from './components/MarkdownThematicBreak'\n\ntype HandleNode = (node, index?: number) => React.JSX.Element | null\n\nconst StyledMarkdownContent = styled('div', {\n base: [\n 'flex',\n 'flex-col',\n 'gap-8',\n '[&>h1]:max-w-[65ch]',\n '[&>h2]:max-w-[65ch]',\n '[&>h3]:max-w-[65ch]',\n '[&>h4]:max-w-[65ch]',\n '[&>p]:max-w-[75ch]',\n '[&>ul]:max-w-[75ch]'\n ]\n})\n\ntype MarkdownContentProps = React.ComponentProps<\n typeof StyledMarkdownContent\n> & {\n content: string\n customComponents?: {\n [key: string]: (props: {\n node: any\n handleNode: HandleNode\n }) => React.JSX.Element\n }\n}\n\nconst defaultComponentsMap = {\n code: MarkdownCode,\n emphasis: MarkdownEmphasis,\n heading: MarkdownHeading,\n inlineCode: MarkdownInlineCode,\n image: MarkdownImage,\n link: MarkdownLink,\n list: MarkdownList,\n listItem: MarkdownListItem,\n paragraph: MarkdownParagraph,\n strong: MarkdownStrong,\n text: MarkdownText,\n thematicBreak: MarkdownThematicBreak\n}\n\nconst generateNodeKey = (node, index: number) => {\n if (node.position?.start) {\n const { line, column, offset } = node.position.start\n return `${node.type}${line}${column}${offset}`\n }\n\n // Deterministic fallback: keys must be stable across renders and identical\n // between server and client, so no timestamps or random values.\n return `${node.type}${index}`\n}\n\nexport const MarkdownContent = ({\n content,\n customComponents = {},\n className\n}: MarkdownContentProps) => {\n const AST = fromMarkdown(content, {\n extensions: [directive()],\n mdastExtensions: [directiveFromMarkdown()]\n })\n\n const componentsMap = {\n ...defaultComponentsMap,\n ...customComponents\n }\n\n const handleNode: HandleNode = (node, index = 0) => {\n const MarkdownComponent = componentsMap[node.type]\n\n return MarkdownComponent ? (\n <MarkdownComponent\n key={generateNodeKey(node, index)}\n node={node}\n handleNode={handleNode}\n />\n ) : null\n }\n\n return (\n <StyledMarkdownContent className={className}>\n {AST.children.map(handleNode)}\n </StyledMarkdownContent>\n )\n}\n\nMarkdownContent.displayName = 'MarkdownContent'\n","const light = {\n '--text': 'var(--color-text-subtle)',\n '--text-hover': 'var(--color-grey-1000)',\n '--text-active': 'var(--color-grey-1000)',\n '--text-selected': 'var(--color-primary-800)',\n '--text-selected-hover': 'var(--color-primary-800)',\n '--text-selected-pressed': 'var(--color-primary-800)',\n '--text-selected-focus': 'var(--color-primary-800)',\n '--background': 'white',\n '--background-hover': 'var(--color-grey-100)',\n '--background-active': 'var(--color-grey-200)',\n '--background-selected': 'var(--color-primary-100)',\n '--background-selected-hover': 'var(--color-grey-100)',\n '--background-selected-pressed': 'var(--color-grey-200)',\n '--item-text-selected': 'var(--color-grey-900)',\n '--item-background-selected': 'var(--color-grey-900)',\n '--trigger-background-open': 'var(--color-grey-200)',\n '--dropdown-background': 'white'\n}\n\nexport const colorSchemes = {\n light\n}\n","import * as React from 'react'\n\ninterface NavigationMenuContextValue {\n onNodeUpdate: (\n trigger: HTMLButtonElement,\n itemValue: string\n ) => HTMLButtonElement\n}\n\nexport const NavigationMenuContext = React.createContext<\n NavigationMenuContextValue | undefined\n>(undefined)\n\nexport const useNavigationMenuContext = (): NavigationMenuContextValue => {\n const context = React.use(NavigationMenuContext)\n\n if (context === undefined) {\n throw new Error(\n 'useNavigationMenuContext must be used within a NavigationMenuContextProvider'\n )\n }\n\n return context\n}\n","/*\nUsed to block default radix hover to open menu behaviour\nProps: https://github.com/radix-ui/primitives/issues/1630\n*/\nexport const preventEvent = (\n event: React.PointerEvent | Event | React.SyntheticEvent\n): void => {\n const e = event as Event\n e.preventDefault()\n}\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { preventEvent } from '../../utilities/event/preventEvent'\n\nconst StyledContent = styled(NavigationMenuPrimitive.Content, {\n base: ['p-3', 'bg-(--dropdown-background)', 'mt-1', 'shadow-md', 'rounded-md']\n})\n\ntype NavigationMenuDropdownContentProps = React.ComponentProps<\n typeof StyledContent\n>\n\nexport const NavigationMenuDropdownContent = ({\n children,\n ...rest\n}: NavigationMenuDropdownContentProps) => (\n <StyledContent\n onPointerMove={preventEvent}\n onPointerLeave={preventEvent}\n {...rest}\n >\n <ul>{children}</ul>\n </StyledContent>\n)\n\nNavigationMenuDropdownContent.displayName = 'NavigationMenuDropdownContent'\n","export const navigationMenuBaseItemStyles = [\n 'relative',\n 'text-(--text)',\n 'outline-none',\n 'cursor-pointer',\n 'font-body',\n 'select-none',\n 'p-3',\n 'rounded-md',\n 'bg-(--background)',\n 'hover:bg-(--background-hover)',\n 'hover:text-(--text-hover)',\n 'active:bg-(--background-active)',\n 'active:text-(--text-active)',\n 'focus-visible:inset-shadow-[0_0_0_2px_var(--color-primary-800)]',\n 'disabled:bg-none',\n 'disabled:cursor-default',\n 'disabled:opacity-[30%]',\n 'disabled:text-(--text)'\n]\n\nexport const navigationMenuActiveItemStyles = [\n 'font-semibold',\n 'text-item-(--background-selected)',\n 'after:-translate-x-1/2',\n 'after:absolute',\n 'after:bg-item-(--background-selected)',\n 'after:block',\n 'after:bottom-0',\n 'after:h-0.5',\n 'after:left-1/2',\n 'after:rounded-md',\n 'after:translate-y-0',\n 'after:w-6'\n]\n","import { ChevronDown } from '@atom-learning/icons'\nimport * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { preventEvent } from '../../utilities/event/preventEvent'\nimport { Icon } from '../icon/Icon'\nimport {\n navigationMenuActiveItemStyles,\n navigationMenuBaseItemStyles\n} from './NavigationMenu.styles'\n\nconst StyledTrigger = styled(NavigationMenuPrimitive.Trigger, {\n base: [\n ...navigationMenuBaseItemStyles,\n 'flex',\n 'items-center',\n 'rounded-md',\n 'justify-between',\n 'data-[state=open]:bg-(--trigger-background-open)'\n ],\n variants: {\n active: {\n true: navigationMenuActiveItemStyles\n }\n }\n})\n\nexport const NavigationMenuDropdownTrigger = ({\n ref,\n children,\n active,\n ...rest\n}: React.ComponentProps<typeof StyledTrigger>) => (\n <StyledTrigger\n active={active}\n {...rest}\n ref={ref}\n onPointerMove={preventEvent}\n onPointerLeave={preventEvent}\n >\n {children}\n <Icon\n is={ChevronDown}\n size=\"sm\"\n className={cn(\n 'ml-1',\n 'in-data-[state=open]:-rotate-180',\n 'motion-safe:duration-200',\n 'motion-safe:ease-in',\n 'motion-safe:transition-transform'\n )}\n />\n </StyledTrigger>\n)\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React, { type ComponentProps, type ReactElement } from 'react'\n\nimport { useNavigationMenuContext } from './NavigationMenu.context'\nimport { NavigationMenuDropdownContent } from './NavigationMenuDropdownContent'\nimport { NavigationMenuDropdownTrigger } from './NavigationMenuDropdownTrigger'\n\ntype NavigationMenuDropdownProps = {\n active?: boolean\n className?: string\n id: string\n} & React.HTMLProps<HTMLButtonElement>\n\ntype DropdownTriggerProps = ComponentProps<typeof NavigationMenuDropdownTrigger>\n\nexport const NavigationMenuDropdown = ({\n children,\n id,\n ...rest\n}: NavigationMenuDropdownProps) => {\n const { onNodeUpdate } = useNavigationMenuContext()\n\n return (\n <NavigationMenuPrimitive.Item value={id}>\n {React.Children.map(children, (child) => {\n const isTrigger =\n React.isValidElement(child) &&\n child.type === NavigationMenuDropdownTrigger\n const isContent =\n React.isValidElement(child) &&\n child.type === NavigationMenuDropdownContent\n\n if (!isTrigger && !isContent) {\n throw new Error(\n 'Only NavigationMenu.Trigger and NavigationMenu.Content can be the passed as a \"children\" of NavigationMenu.Dropdown'\n )\n }\n return isTrigger\n ? React.cloneElement(\n child as ReactElement<DropdownTriggerProps>,\n {\n ...rest,\n ref: (node: HTMLButtonElement) => {\n onNodeUpdate(node, id)\n }\n } as React.PropsWithRef<DropdownTriggerProps>\n )\n : child\n })}\n </NavigationMenuPrimitive.Item>\n )\n}\n\nNavigationMenuDropdown.displayName = 'NavigationMenuDropdown'\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\nimport { navigationMenuBaseItemStyles } from './NavigationMenu.styles'\n\nconst DisabledButton = styled('button', {\n base: [\n ...navigationMenuBaseItemStyles,\n 'disabled:bg-none',\n 'disabled:cursor-default',\n 'disabled:opacity-30',\n 'disabled:text-text'\n ]\n})\n\nconst ListItem = NavigationMenuPrimitive.Item\n\nconst StyledLink = styled(NavigationMenuPrimitive.Link, {\n base: [\n ...navigationMenuBaseItemStyles,\n 'block',\n 'no-underline',\n 'leading-none'\n ],\n variants: {\n elementType: {\n dropdownItem: [\n 'data-active:bg-background-selected',\n 'data-active:text-text-selected',\n 'data-active:hover:bg-background-selected-hover',\n 'data-active:hover:text-text-selected-hover',\n 'data-active:active:bg-background-selected-pressed',\n 'data-active:active:text-text-selected-pressed',\n 'data-active:focus-visible:shadow-[0_0_0_2px_var(--color-primary-800)]',\n 'data-active:focus-visible:text-text-selected-focus'\n ],\n link: [\n 'data-active:font-semibold',\n 'data-active:text-item-(--background-selected)',\n 'data-active:after:-translate-x-1/2',\n 'data-active:after:absolute',\n 'data-active:after:bg-item-(--background-selected)',\n 'data-active:after:block',\n 'data-active:after:bottom-0',\n 'data-active:after:h-0.5',\n 'data-active:after:left-1/2',\n 'data-active:after:rounded-md',\n 'data-active:after:translate-y-0',\n 'data-active:after:w-6'\n ]\n }\n }\n})\n\nexport const NavigationMenuLink = ({\n ref,\n children,\n href,\n disabled,\n className,\n variant = 'link',\n reloadDocument,\n ...rest\n}: Omit<React.ComponentProps<typeof StyledLink>, 'elementType'> & {\n disabled?: boolean\n variant?: React.ComponentProps<typeof StyledLink>['elementType']\n reloadDocument?: boolean\n ref?: React.Ref<HTMLAnchorElement>\n}) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n const RouterLink = routerLinkProps.as\n\n return (\n <ListItem>\n {disabled ? (\n <DisabledButton disabled className={className}>\n {children}\n </DisabledButton>\n ) : RouterLink ? (\n <StyledLink\n href={href}\n ref={ref}\n elementType={variant}\n className={className}\n asChild\n {...rest}\n >\n <RouterLink href={href}>{children}</RouterLink>\n </StyledLink>\n ) : (\n <StyledLink\n href={href}\n ref={ref}\n elementType={variant}\n className={className}\n {...getExternalAnchorProps(href)}\n {...rest}\n >\n {children}\n </StyledLink>\n )}\n </ListItem>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { NavigationMenuLink } from './NavigationMenuLink'\n\nexport const NavigationMenuDropdownItem = ({\n ref,\n ...props\n}: React.PropsWithChildren<\n React.ComponentProps<typeof NavigationMenuLink>\n>) => <NavigationMenuLink ref={ref} variant=\"dropdownItem\" {...props} />\n\nexport const NavigationMenuDropdownItemTitle = styled(Text, {\n base: ['text-grey-900', 'font-semibold']\n})\n\nNavigationMenuDropdownItemTitle.displayName = 'NavigationMenuDropdownItemTitle'\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { colorSchemes as navigationMenuColorSchemes } from './NavigationMenu.colorscheme.config'\nimport { NavigationMenuContext } from './NavigationMenu.context'\nimport { NavigationMenuDropdown } from './NavigationMenuDropdown'\nimport { NavigationMenuDropdownContent } from './NavigationMenuDropdownContent'\nimport {\n NavigationMenuDropdownItem,\n NavigationMenuDropdownItemTitle\n} from './NavigationMenuDropdownItem'\nimport { NavigationMenuDropdownTrigger } from './NavigationMenuDropdownTrigger'\nimport { NavigationMenuLink } from './NavigationMenuLink'\n\nconst StyledMenu = styled(NavigationMenuPrimitive.Root, {\n base: ['flex', 'justify-center', 'relative']\n})\n\nconst StyledList = styled(NavigationMenuPrimitive.List, {\n base: ['flex', 'justify-center', 'items-center', 'gap-1', 'list-none']\n})\n\nconst StyledViewport = styled(NavigationMenuPrimitive.Viewport, {\n base: ['z-2147483647']\n})\n\nconst ViewportPosition = styled('div', {\n base: ['absolute', 'left-0', 'top-full', 'w-full', 'flex', 'justify-center']\n})\n\nconst NavigationMenuComponent = ({\n children,\n className,\n ...rest\n}: React.ComponentProps<typeof StyledMenu>) => {\n const [offset, setOffset] = React.useState<number | null | undefined>()\n const [activeItem, setActiveItem] = React.useState<string | undefined>()\n const listRef = React.useRef<HTMLUListElement>(null)\n const listWidthRef = React.useRef(0)\n\n // Cache the resting list width. It must be measured while the menu is closed:\n // as a dropdown opens, its content is briefly laid out inline in the trigger\n // row, so a width read during the open transition is inflated. Held in a ref\n // (not state) since it only feeds the imperative offset calc below and never\n // renders. Re-measured when the item count changes; stale on resize.\n React.useLayoutEffect(() => {\n if (listRef.current) {\n listWidthRef.current = listRef.current.offsetWidth\n }\n }, [React.Children.toArray(children).length])\n\n React.useEffect(() => {\n let timer: ReturnType<typeof setTimeout>\n\n // Delay transitioning back to initial position\n // to allow enough time for fadeOut animation to complete\n if (activeItem === '') {\n timer = setTimeout(setOffset, 200, null)\n }\n\n return () => {\n if (timer !== null) {\n clearTimeout(timer)\n }\n }\n }, [activeItem])\n\n // Radix has no built-in way to align the viewport with the active trigger, so\n // the offset is computed here. https://github.com/radix-ui/primitives/issues/1462\n const onNodeUpdate = React.useCallback(\n (trigger: HTMLButtonElement, itemValue: string) => {\n const listWidth = listWidthRef.current\n if (trigger && listWidth && activeItem === itemValue) {\n const listCenter = listWidth / 2\n\n const triggerOffsetRight =\n listWidth -\n trigger.offsetLeft -\n trigger.offsetWidth +\n trigger.offsetWidth / 2\n\n setOffset(Math.round(listCenter - triggerOffsetRight))\n }\n\n return trigger\n },\n [activeItem]\n )\n\n const contextValue = React.useMemo(() => ({ onNodeUpdate }), [onNodeUpdate])\n\n return (\n <NavigationMenuContext value={contextValue}>\n <StyledMenu\n className={cn(className)}\n style={navigationMenuColorSchemes['light']}\n onValueChange={setActiveItem}\n {...rest}\n >\n <StyledList ref={listRef}>{children}</StyledList>\n <ViewportPosition>\n <StyledViewport\n style={{ '--navigation-menu-viewport-offset': `${offset || 0}px` }}\n className={cn([\n 'data-[state=open]:animate-fade-in',\n 'data-[state=closed]:animate-fade-out',\n 'translate-x-(--navigation-menu-viewport-offset)'\n ])}\n />\n </ViewportPosition>\n </StyledMenu>\n </NavigationMenuContext>\n )\n}\n\nexport const NavigationMenu = /* @__PURE__ */ Object.assign(\n NavigationMenuComponent,\n {\n Link: NavigationMenuLink,\n Dropdown: NavigationMenuDropdown,\n DropdownContent: NavigationMenuDropdownContent,\n DropdownItem: NavigationMenuDropdownItem,\n DropdownItemTitle: NavigationMenuDropdownItemTitle,\n DropdownTrigger: NavigationMenuDropdownTrigger\n }\n)\n\nNavigationMenuComponent.displayName = 'NavigationMenu'\n","const light = {\n '--text': 'var(--foreground)',\n '--background': 'var(--base-1)',\n '--background-hover': 'var(--base-2)',\n '--background-active': 'var(--base-3)',\n '--text-selected': 'var(--accent-9)',\n '--background-selected': 'var(--accent-2)'\n}\n\nexport const colorSchemes = {\n light\n}\n","import { Item } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\n\n/*\n * (!)\n * NavigationMenu vertical behaviour was buggy so had to build the\n * opening/closing nested Content(Accordion) based on `Collapsible` instead.\n * This means that the `value` prop does nothing, so removing it from typescript\n */\ntype NavigationMenuVerticalItemProps = Omit<\n React.ComponentProps<typeof Item>,\n 'value'\n>\n\nexport const NavigationMenuVerticalItem = (\n props: NavigationMenuVerticalItemProps\n) => (\n <Item\n className={cn(\n '[ul_li_&]:[--navigation-menu-vertical-item-pl:--spacing(8)]',\n '[ul_li_&_&]:[--navigation-menu-vertical-item-pl:--spacing(12)]',\n '[ul_li_&_&_&]:[--navigation-menu-vertical-item-pl:--spacing(16)]'\n )}\n {...props}\n />\n)\n","import { Root } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { useCallbackRef } from '../../utilities/hooks/useCallbackRef'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\n\ntype NavigationMenuVerticalAccordionContextValue = {\n triggerRef?: React.RefObject<HTMLElement | null>\n setTriggerRef?: (el: HTMLElement | null) => void | (() => void)\n}\nexport const NavigationMenuVerticalAccordionContext =\n React.createContext<NavigationMenuVerticalAccordionContextValue>({})\nconst NavigationMenuVerticalAccordionProvider = ({ children }) => {\n const [triggerRef, setTriggerRef] = useCallbackRef()\n const value = React.useMemo(\n () => ({ triggerRef, setTriggerRef }),\n [triggerRef, setTriggerRef]\n )\n return (\n <NavigationMenuVerticalAccordionContext value={value}>\n {children}\n </NavigationMenuVerticalAccordionContext>\n )\n}\n\ntype NavigationMenuVerticalAccordionProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof NavigationMenuVerticalItem>\nexport const NavigationMenuVerticalAccordion = ({\n defaultOpen,\n open,\n onOpenChange,\n disabled,\n ...rest\n}: NavigationMenuVerticalAccordionProps) => {\n const collapsibleProps = { defaultOpen, open, onOpenChange, disabled }\n return (\n <NavigationMenuVerticalAccordionProvider>\n <Root {...collapsibleProps} asChild>\n <NavigationMenuVerticalItem {...rest} />\n </Root>\n </NavigationMenuVerticalAccordionProvider>\n )\n}\n","import { List } from '@radix-ui/react-navigation-menu'\n\nimport { styled } from '../../styled'\n\nconst StyledList = styled(List, {\n base: [\n '[--navigation-menu-vertical-item-pl:--spacing(4)]',\n '*:not-first:mt-0.5'\n ]\n})\n\nexport const NavigationMenuVerticalList = StyledList\n","import { Content } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { NavigationMenuVerticalAccordionContext } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalList } from './NavigationMenuVerticalList'\n\nconst StyledNavigationMenuVerticalAccordionContent = Content\n\ntype NavigationMenuVerticalAccordionContentProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalAccordionContent\n> &\n React.ComponentProps<typeof NavigationMenuVerticalList>\n\nexport const NavigationMenuVerticalAccordionContent = ({\n children,\n ...rest\n}: NavigationMenuVerticalAccordionContentProps) => {\n const { triggerRef } = React.use(NavigationMenuVerticalAccordionContext)\n\n const handleOnKeydown = (e) => {\n if (!triggerRef?.current) return\n if (e.key === 'Escape') {\n e.stopPropagation()\n e.preventDefault()\n triggerRef.current.focus()\n triggerRef.current.click()\n }\n }\n\n return (\n <StyledNavigationMenuVerticalAccordionContent\n onKeyDown={handleOnKeydown}\n {...rest}\n >\n <NavigationMenuVerticalList>{children}</NavigationMenuVerticalList>\n </StyledNavigationMenuVerticalAccordionContent>\n )\n}\n","export const navigationMenuVerticalItemStyles = [\n '[--navigation-menu-vertical-item-font-weight:400]',\n 'data-[state=open]:[--navigation-menu-vertical-item-font-weight:600]',\n 'border-none',\n 'outline-none',\n 'bg-none',\n 'decoration-[inherit]',\n 'cursor-pointer',\n 'rounded-md',\n 'flex',\n 'items-center',\n 'p-2',\n 'pl-(--navigation-menu-vertical-item-pl)',\n 'w-full',\n 'text-(--text)',\n 'bg-(--background)',\n 'disabled:cursor-not-allowed',\n '[text-decoration:unset]',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--background-active)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--background-hover)',\n 'data-active:bg-(--background-selected)',\n 'data-active:text-(--text-selected)',\n 'data-active:[--navigation-menu-vertical-item-font-weight:600]'\n]\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\n\nconst StyledNavigationMenuVerticalIcon = styled(Icon, {\n base: ['self-start']\n})\n\nexport const NavigationMenuVerticalIcon = (\n props: React.ComponentProps<typeof StyledNavigationMenuVerticalIcon>\n) => <StyledNavigationMenuVerticalIcon size=\"md\" {...props} />\n","import * as React from 'react'\n\nexport const SideBarContext = React.createContext<{\n isExpanded?: boolean\n}>({\n isExpanded: undefined\n})\n\nexport const useSidebarState = () => React.use(SideBarContext)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useSidebarState } from '../side-bar/SideBar.context'\nimport { Text } from '../text/Text'\n\nconst StyledNavigationMenuVerticalText = styled(Text, {\n base: [\n 'font-(--navigation-menu-vertical-item-font-weight)',\n 'w-max',\n 'max-w-40',\n 'text-left',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[opacity,translate]'\n ],\n variants: {\n isExpanded: {\n true: ['opacity-100', 'motion-safe:translate-0'],\n false: ['opacity-0', 'motion-safe:translate-x-2']\n }\n }\n})\n\ntype StyledNavigationMenuVerticalTextProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalText\n>\n\nexport const NavigationMenuVerticalText = (\n props: StyledNavigationMenuVerticalTextProps\n) => {\n const { isExpanded } = useSidebarState()\n\n return (\n <StyledNavigationMenuVerticalText\n size=\"md\"\n as=\"span\"\n {...props}\n isExpanded={isExpanded}\n />\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { NavigationMenuVerticalIcon } from './NavigationMenuVerticalIcon'\nimport { NavigationMenuVerticalText } from './NavigationMenuVerticalText'\n\ntype NavigationMenuVerticalItemContentProps = React.ComponentProps<'div'>\n\nexport const NavigationMenuVerticalItemContent = ({\n children,\n className,\n ...rest\n}: NavigationMenuVerticalItemContentProps) => (\n <div className={cn('flex', 'gap-2', 'items-center', className)} {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return (\n <NavigationMenuVerticalText>{child}</NavigationMenuVerticalText>\n )\n }\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n ) &&\n child.type === Icon\n ) {\n return <NavigationMenuVerticalIcon {...child.props} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </div>\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-collapsible'\nimport { Link } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalAccordionContext } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalAccordionTrigger = styled(Trigger, {\n base: navigationMenuVerticalItemStyles,\n variants: {\n size: {\n md: ['min-h-10'],\n lg: ['min-h-12']\n }\n }\n})\n\nconst StyledIcon = styled(Icon, {\n base: [\n 'transition-transform',\n 'duration-300',\n '[[data-state=open]>&]:rotate-180'\n ]\n})\n\ntype NavigationMenuAccordionTriggerProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalAccordionTrigger\n>\n\nexport const NavigationMenuVerticalAccordionTrigger = ({\n children,\n ...rest\n}: NavigationMenuAccordionTriggerProps) => {\n const { setTriggerRef } = React.use(NavigationMenuVerticalAccordionContext)\n\n return (\n <Link asChild>\n <StyledNavigationMenuVerticalAccordionTrigger size=\"lg\" {...rest} asChild>\n <button\n type=\"button\"\n className=\"flex items-center justify-between gap-3\"\n ref={setTriggerRef}\n >\n <NavigationMenuVerticalItemContent>\n {children}\n </NavigationMenuVerticalItemContent>\n <StyledIcon size=\"sm\" is={ChevronDown} />\n </button>\n </StyledNavigationMenuVerticalAccordionTrigger>\n </Link>\n )\n}\n","import { Link } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { preventEvent } from '../../utilities/event/preventEvent'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalLink = styled(Link, {\n base: navigationMenuVerticalItemStyles,\n variants: {\n size: {\n md: ['min-h-10'],\n lg: ['min-h-12']\n }\n }\n})\n\ntype NavigationMenuVerticalItemProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalLink\n> & { reloadDocument?: boolean }\n\nexport const NavigationMenuVerticalLink = ({\n as,\n href,\n children,\n reloadDocument,\n ...rest\n}: NavigationMenuVerticalItemProps) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n const Component = as || routerLinkProps.as || (href ? 'a' : 'button')\n const componentProps =\n as || routerLinkProps.as\n ? {}\n : href\n ? getExternalAnchorProps(href)\n : { type: 'button' }\n\n return (\n <NavigationMenuVerticalItem>\n <StyledNavigationMenuVerticalLink\n size=\"lg\"\n href={href}\n {...rest}\n {...componentProps}\n onSelect={preventEvent}\n asChild // ?: Can't use `as` for this as we lose `data-active` etc. attributes when we try to. Using `asChild` and `Component` as a workaround.\n >\n <Component>\n <NavigationMenuVerticalItemContent>\n {children}\n </NavigationMenuVerticalItemContent>\n </Component>\n </StyledNavigationMenuVerticalLink>\n </NavigationMenuVerticalItem>\n )\n}\n","import { Root } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled, Theme } from '../../styled'\nimport { colorSchemes as navigationMenuVerticalColorSchemes } from './NavigationMenuVertical.colorscheme.config'\nimport { NavigationMenuVerticalAccordion } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalAccordionContent } from './NavigationMenuVerticalAccordionContent'\nimport { NavigationMenuVerticalAccordionTrigger } from './NavigationMenuVerticalAccordionTrigger'\nimport { NavigationMenuVerticalIcon } from './NavigationMenuVerticalIcon'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\nimport { NavigationMenuVerticalLink } from './NavigationMenuVerticalLink'\nimport { NavigationMenuVerticalList } from './NavigationMenuVerticalList'\nimport { NavigationMenuVerticalText } from './NavigationMenuVerticalText'\n\nconst StyledRoot = styled(Root, {\n base: ['w-full']\n})\n\n/*\n * (!)\n * NavigationMenu vertical behaviour was buggy so had to build the\n * opening/closing nested Content(Accordion) based on `Collapsible` instead.\n * This means that the below `value` based props and `Trigger`/`Content`\n * animations do nothing, so removing them from typescript\n */\ntype NavigationVerticalProps = Omit<\n React.ComponentProps<typeof StyledRoot>,\n | 'delayDuration'\n | 'skipDelayDuration'\n | 'defaultValue'\n | 'value'\n | 'onValueChange'\n>\n\nexport const NavigationMenuVertical = /* @__PURE__ */ Object.assign(\n ({ children, ...rest }: NavigationVerticalProps) => (\n <Theme theme={navigationMenuVerticalColorSchemes['light']}>\n <StyledRoot {...rest} orientation=\"vertical\">\n <NavigationMenuVerticalList>{children}</NavigationMenuVerticalList>\n </StyledRoot>\n </Theme>\n ),\n {\n Link: NavigationMenuVerticalLink,\n Accordion: NavigationMenuVerticalAccordion,\n AccordionContent: NavigationMenuVerticalAccordionContent,\n AccordionTrigger: NavigationMenuVerticalAccordionTrigger,\n Item: NavigationMenuVerticalItem,\n ItemContent: NavigationMenuVerticalItemContent,\n Icon: NavigationMenuVerticalIcon,\n Text: NavigationMenuVerticalText\n }\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Badge } from '../badge/Badge'\nimport { Icon } from '../icon/Icon'\n\nconst StyledBadge = styled(Badge, {\n base: [\n 'font-body',\n 'text-sm',\n 'flex-row',\n 'justify-center',\n 'absolute',\n 'top-0',\n 'right-0',\n 'translate-x-3',\n '-translate-y-1/2',\n 'rounded-full',\n 'h-6',\n 'min-w-6',\n 'text-center'\n ]\n})\n\ntype BadgeProps = React.ComponentProps<typeof Badge>\n\ntype NotificationBadgeProps = {\n value: number | string\n emphasis?: BadgeProps['emphasis']\n theme?: BadgeProps['theme']\n icon?: React.FC<React.SVGProps<SVGSVGElement>>\n}\n\nexport const NotificationBadge = ({\n value,\n emphasis = 'bold',\n theme = 'primary',\n icon,\n children\n}: React.PropsWithChildren<NotificationBadgeProps>) => (\n <div className=\"relative\">\n {!!value && (\n <StyledBadge role=\"status\" emphasis={emphasis} theme={theme}>\n {icon && <Icon is={icon} role=\"img\" aria-hidden=\"false\" />}\n {value}\n </StyledBadge>\n )}\n {children}\n </div>\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Tooltip } from '../tooltip/Tooltip'\n\nconst StyledStepperButton = styled(ActionIcon, {\n base: [\n 'rounded-md',\n 'z-1',\n 'h-full!',\n 'hover:[&_svg]:text-grey-800',\n 'hover:bg-grey-100',\n '[&_svg]:text-grey-700',\n 'active:[&_svg]:text-grey-900',\n 'active:bg-grey-200',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n fieldAppearance: {\n standard: ['bg-white', 'border-grey-800!'],\n modern: ['bg-grey-100', 'border-grey-100!', 'hover:bg-grey-200!']\n },\n fieldTheme: {\n white: [],\n grey: []\n },\n emphasis: {\n bold: [\n '[&_svg]:text-primary-700',\n 'hover:bg-primary-100!',\n 'hover:[&_svg]:text-primary-800!',\n 'active:bg-primary-200!',\n 'active:[&_svg]:text-primary-900!'\n ]\n }\n },\n compoundVariants: [\n {\n fieldAppearance: 'modern',\n fieldTheme: 'white',\n class: ['bg-white']\n },\n {\n fieldAppearance: 'standard',\n emphasis: 'bold',\n class: ['bg-white', 'border-primary-800!']\n },\n {\n fieldAppearance: 'modern',\n emphasis: 'bold',\n class: ['bg-white!', 'hover:bg-primary-100!']\n }\n ]\n})\n\ntype NumberInputStepperProps = Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'children'\n> &\n Omit<React.ComponentProps<typeof StyledStepperButton>, 'children'> & {\n icon: React.FC<React.SVGProps<SVGSVGElement>>\n showTooltip?: boolean\n disabledTooltipContent?: string\n }\n\nexport const NumberInputStepper = ({\n ref,\n icon,\n disabledTooltipContent,\n showTooltip,\n fieldAppearance = 'standard',\n fieldTheme,\n ...rest\n}: NumberInputStepperProps) => {\n /**\n * Focus has been removed from the button\n * as the increment and decrement buttons should be keyboard accessible via arrow keys.\n * see MDN docs https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/spinbutton_role\n */\n return (\n <Tooltip>\n <Tooltip.Trigger asChild>\n <span className=\"z-1\" tabIndex={-1}>\n <StyledStepperButton\n hasTooltip={false}\n tabIndex={-1}\n appearance=\"outline\"\n fieldAppearance={fieldAppearance}\n fieldTheme={fieldTheme}\n ref={ref}\n {...rest}\n >\n <Icon is={icon} />\n </StyledStepperButton>\n </span>\n </Tooltip.Trigger>\n {showTooltip && (\n <Tooltip.Content>{disabledTooltipContent}</Tooltip.Content>\n )}\n </Tooltip>\n )\n}\n","import { Minus, Plus } from '@atom-learning/icons'\nimport { useComposedRefs } from '@radix-ui/react-compose-refs'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { Input } from '../input/Input'\nimport { NumberInputStepper } from './NumberInputStepper'\n\nexport interface NumberInputProps {\n name: string\n min?: number\n max?: number\n step?: number\n value?: number\n defaultValue?: number\n disabled?: boolean\n readonly?: boolean\n size?: 'sm' | 'md' | 'lg'\n appearance?: 'standard' | 'modern'\n theme?: 'white' | 'grey'\n emphasis?: 'bold'\n onValueChange?: (value: number) => void\n stepperButtonLabels?: { increment?: string; decrement?: string }\n disabledTooltipContent?: { increment?: string; decrement?: string }\n className?: string\n}\n\nconst NumberInputContainer = styled('div', {\n base: ['flex'],\n variants: {\n appearance: {\n standard: [],\n modern: ['gap-px']\n },\n emphasis: {\n bold: ['gap-0']\n }\n }\n})\n\nexport const NumberInput = ({\n ref,\n value,\n defaultValue = 0,\n onValueChange,\n min = 0,\n max = Number.MAX_SAFE_INTEGER,\n step = 1,\n disabled: isDisabled = false,\n readonly: isReadOnly = false,\n size = 'md',\n stepperButtonLabels: stepperButtonLabelsProp,\n disabledTooltipContent: disabledTooltipContentProp,\n className,\n appearance = 'standard',\n theme,\n emphasis,\n ...rest\n}: NumberInputProps & {\n ref?: React.Ref<HTMLInputElement>\n}) => {\n // `?? defaultValue` (not `||`): a controlled `value={0}` is a value, not\n // an absence. `currentValue` is derived during render — mirroring the prop\n // into state via an effect would paint one stale frame per update.\n const [internalValue, setInternalValue] = React.useState<number>(\n value ?? defaultValue\n )\n const currentValue = value ?? internalValue\n\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n const composedInputRef = useComposedRefs(ref, inputRef)\n\n const iconSize = getFieldIconSize(size)\n\n const stepperButtonLabels = {\n increment: 'increment',\n decrement: 'decrement',\n ...stepperButtonLabelsProp\n }\n\n const disabledTooltipContent = {\n decrement: `Cannot enter values below ${min}`,\n increment: `Cannot enter values above ${max}`,\n ...disabledTooltipContentProp\n }\n\n const isAtMax = currentValue >= max\n const isAtMin = currentValue <= min\n\n const clamp = React.useCallback(\n (internalValue: number) => Math.min(Math.max(internalValue, min), max),\n [max, min]\n )\n\n const updateValue = React.useCallback(\n (newValue: number) => {\n onValueChange?.(newValue)\n setInternalValue(newValue)\n },\n [onValueChange]\n )\n\n const onInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const parsedValue = Number(event.target.value.replace(/\\D/g, ''))\n updateValue(parsedValue)\n },\n [updateValue]\n )\n\n const increment = React.useCallback(() => {\n if (isAtMax || isReadOnly) return\n inputRef?.current?.focus()\n const newValue = Number(currentValue) + step\n updateValue(clamp(newValue))\n }, [clamp, isAtMax, isReadOnly, step, updateValue, currentValue])\n\n const decrement = React.useCallback(() => {\n if (isAtMin || isReadOnly) return\n inputRef?.current?.focus()\n const newValue = Number(currentValue) - step\n updateValue(clamp(newValue))\n }, [clamp, isAtMin, isReadOnly, min, step, updateValue, currentValue])\n\n const onKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.nativeEvent.isComposing) return\n\n /**\n * Keyboard Accessibility\n *\n * We want to increase or decrease the input's value\n * based on if the user the arrow keys.\n *\n * @see https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard-interaction-17\n */\n const eventKey = event.key\n\n const keyMap: Record<string, React.KeyboardEventHandler> = {\n ArrowUp: increment,\n ArrowRight: increment,\n ArrowDown: decrement,\n ArrowLeft: decrement,\n Home: () => updateValue(min),\n End: () => updateValue(max)\n }\n\n const action = keyMap[eventKey]\n\n if (action) {\n event.preventDefault()\n action(event)\n }\n },\n [increment, decrement, updateValue, min, max]\n )\n\n const hasError = currentValue < min || currentValue > max\n const {\n state: externalState,\n 'aria-invalid': externalAriaInvalid,\n ...restProps\n } = rest as { state?: 'error'; 'aria-invalid'?: boolean } & typeof rest\n\n const inputProps: React.ComponentProps<typeof Input> = {\n type: 'number',\n value: currentValue,\n ...restProps,\n onChange: onInputChange,\n onKeyDown,\n size,\n appearance,\n theme,\n state: externalState || (hasError ? 'error' : undefined),\n 'aria-invalid': externalAriaInvalid || hasError || undefined,\n className: cn(\n 'rounded-none',\n 'w-16',\n '[&_>_input]:text-center',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none',\n emphasis === 'bold' && [\n 'rounded-1',\n '[&_>_input[aria-invalid=true]]:text-danger',\n 'focus-within:[&_>_input]:text-grey-1000'\n ],\n emphasis === 'bold' &&\n appearance === 'standard' && [\n 'border-none',\n '[&:has([aria-invalid=true])]:border-2',\n '[&:has([aria-invalid=true])]:border-danger',\n 'focus-within:border-2',\n 'focus-within:border-blue-800'\n ]\n ),\n ref: composedInputRef,\n readOnly: isReadOnly,\n disabled: isDisabled,\n 'aria-valuemin': min,\n 'aria-valuemax': max,\n 'aria-valuenow': currentValue,\n role: 'spinbutton'\n }\n\n return (\n <NumberInputContainer\n appearance={appearance}\n emphasis={emphasis}\n className={className}\n >\n <NumberInputStepper\n onClick={decrement}\n icon={Minus}\n className={cn(\n emphasis !== 'bold' && ['border-r-none', 'rounded-r-none']\n )}\n size={iconSize}\n fieldAppearance={appearance}\n fieldTheme={theme}\n emphasis={emphasis}\n disabled={isAtMin || isDisabled}\n showTooltip={isAtMin && !isDisabled}\n disabledTooltipContent={disabledTooltipContent.decrement}\n label={stepperButtonLabels.decrement}\n />\n <Input {...inputProps} />\n <NumberInputStepper\n onClick={increment}\n icon={Plus}\n className={cn(\n emphasis !== 'bold' && ['border-l-none', 'rounded-l-none']\n )}\n size={iconSize}\n fieldAppearance={appearance}\n fieldTheme={theme}\n emphasis={emphasis}\n disabled={isAtMax || isDisabled}\n showTooltip={isAtMax && !isDisabled}\n disabledTooltipContent={disabledTooltipContent.increment}\n label={stepperButtonLabels.increment}\n />\n </NumberInputContainer>\n )\n}\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { FieldWrapper } from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport type { ValidationOptions } from '../form/validation'\nimport type { NumberInputProps } from '../number-input/NumberInput'\nimport { NumberInput } from '../number-input/NumberInput'\n\nexport interface NumberInputFieldProps extends NumberInputProps {\n className?: string\n hideLabel?: boolean\n description?: string\n label: string\n name: string\n prompt?: { link: string; label: string }\n validation?: ValidationOptions\n}\n\nexport const NumberInputField = ({\n className,\n defaultValue = 0,\n hideLabel,\n value,\n prompt,\n description,\n label,\n name,\n validation,\n onValueChange,\n appearance,\n theme,\n ...rest\n}: NumberInputFieldProps) => {\n const { control, setValue } = useFormContext()\n const context = useFormCustomContext()\n const {\n field: { ref, onChange, value: innerValue, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n const { error } = useFieldError(name)\n\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n React.useEffect(() => {\n // Sync an externally-controlled `value` into react-hook-form without\n // marking the field dirty/touched — this isn't user input.\n if (typeof value !== 'undefined')\n setValue(name, value, { shouldDirty: false })\n }, [value, name, setValue])\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <NumberInput\n id={name}\n name={innerName}\n ref={ref}\n {...(error && { state: 'error', 'aria-invalid': true })}\n defaultValue={defaultValue}\n onValueChange={(newValue) => {\n onChange(newValue)\n onValueChange?.(newValue)\n }}\n value={innerValue}\n appearance={formAppearance}\n theme={formTheme}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nNumberInputField.displayName = 'NumberInputField'\n","import * as Progress from '@radix-ui/react-progress'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledProgressBar = styled(\n Progress.Root,\n {\n base: [\n 'rounded-full',\n 'bg-grey-200',\n 'relative',\n 'overflow-hidden',\n 'w-full'\n ],\n variants: {\n size: {\n sm: ['h-1'],\n md: ['h-2']\n },\n theme: {\n primary: ['text-primary-800'],\n info: ['text-info'],\n success: ['text-success'],\n warning: ['text-warning'],\n danger: ['text-danger'],\n neutral: ['bg-grey-400', 'text-grey-800']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nconst StyledIndicator = styled(Progress.Indicator, {\n base: [\n 'bg-current',\n 'rounded-full',\n 'box-border',\n 'h-full',\n 'absolute',\n 'transition-all',\n 'duration-300',\n 'ease-out'\n ]\n})\n\ntype ProgressBarProps = React.ComponentPropsWithoutRef<\n typeof StyledProgressBar\n> &\n (\n | { id: string; 'aria-label'?: string }\n | { 'aria-label': string; id?: string }\n )\n\nexport const ProgressBar = ({\n value,\n max = 100,\n size = 'md',\n theme = 'primary',\n ...rest\n}: ProgressBarProps) => (\n <StyledProgressBar\n value={value}\n max={max}\n theme={theme}\n size={size}\n {...rest}\n >\n <StyledIndicator\n className=\"w-full translate-x-(--progress)\"\n style={{\n '--progress': `-${100 - ((value || 0) / max) * 100}%`\n }}\n />\n </StyledProgressBar>\n)\n\nProgressBar.displayName = 'ProgressBar'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\n\nimport { styled } from '../../styled'\n\nexport const RadioButtonGroup = styled(\n RadioGroup.Root,\n {\n base: ['flex', 'flex-wrap'],\n variants: {\n direction: {\n row: ['*:not-last:mr-8', 'flex-row'],\n column: ['flex-col']\n }\n }\n },\n { enablePolymorphism: false }\n)\n\nRadioButtonGroup.displayName = 'RadioButtonGroup'\n","import * as React from 'react'\n\nimport { InlineFieldWrapper } from '../field-wrapper/InlineFieldWrapper'\nimport type { ValidationOptions } from '../form/validation'\nimport { RadioButton } from '../radio-button/RadioButton'\n\ntype RadioFieldProps = {\n className?: string\n defaultChecked?: boolean\n error?: string\n label: string\n validation?: ValidationOptions\n} & React.ComponentProps<typeof RadioButton>\n\nexport const RadioField = ({\n className,\n label,\n value,\n ...rest\n}: RadioFieldProps) => (\n <InlineFieldWrapper className={className} label={label}>\n <RadioButton value={value} {...rest} />\n </InlineFieldWrapper>\n)\n\nRadioField.displayName = 'RadioField'\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { styled } from '../../styled'\nimport { Description as FieldDescription } from '../field-wrapper/FieldDescription'\nimport type { FieldElementWrapperProps } from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { Label } from '../label/Label'\nimport { RadioButtonGroup } from '../radio-button/RadioButtonGroup'\nimport { RadioField } from './RadioField'\n\nconst Fieldset = styled('fieldset', {\n base: ['border-0', 'p-0', 'm-0', 'min-w-0']\n})\n\ntype RadioButtonFieldProps = React.ComponentProps<typeof RadioButtonGroup> &\n FieldElementWrapperProps\n\nconst RadioButtonFieldComponent = ({\n children,\n className,\n direction = 'column',\n defaultValue,\n value,\n description,\n label,\n name,\n validation,\n onValueChange,\n ...rest\n}: RadioButtonFieldProps) => {\n const { control, setValue } = useFormContext()\n const {\n field: { ref, onChange, value: innerValue }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n const { error } = useFieldError(name)\n\n React.useEffect(() => {\n // Sync an externally-controlled `value` into react-hook-form without\n // marking the field dirty/touched — this isn't user input.\n if (typeof value !== 'undefined')\n setValue(name, value, { shouldDirty: false })\n }, [value, name, setValue])\n\n return (\n <Fieldset className={className}>\n <Label\n as=\"legend\"\n required={Boolean(validation?.required)}\n className=\"mb-3 p-0\"\n >\n {label}\n </Label>\n {description && (\n <FieldDescription className=\"mb-3\">{description}</FieldDescription>\n )}\n\n <RadioButtonGroup\n ref={ref}\n direction={direction}\n defaultValue={defaultValue}\n onValueChange={(newValue) => {\n onChange(newValue)\n onValueChange?.(newValue)\n }}\n value={innerValue}\n {...rest}\n >\n {children}\n </RadioButtonGroup>\n\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n </Fieldset>\n )\n}\n\nexport const RadioButtonField = /* @__PURE__ */ Object.assign(\n RadioButtonFieldComponent,\n {\n Item: RadioField\n }\n)\n\nRadioButtonFieldComponent.displayName = 'RadioButtonField'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledRadioCard = styled(RadioGroup.Item, {\n base: [\n 'items-center',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'rounded-sm',\n 'cursor-pointer',\n 'flex',\n 'text-left',\n 'data-[state=checked]:-outline-offset-2',\n 'data-[state=checked]:outline-2',\n 'data-[state=checked]:outline-primary-800',\n 'data-[state=checked]:outline-solid'\n ],\n variants: {\n align: {\n left: ['flex-row'],\n right: ['flex-row-reverse']\n },\n size: {\n md: ['px-4', 'py-3'],\n lg: ['px-8', 'py-4']\n },\n isFullWidth: {\n true: ['w-full'],\n false: ['w-max']\n }\n }\n})\n\nconst RadioButton = styled('div', {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-transparent',\n 'border',\n 'border-grey-900',\n 'rounded-full',\n 'flex',\n 'shrink-0',\n 'justify-center',\n 'p-0',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'in-data-[state=checked]:bg-primary-800',\n 'in-data-[state=checked]:border-primary-800'\n ],\n variants: {\n containerIsFullWidth: {\n true: [],\n false: []\n },\n align: {\n left: ['mr-4'],\n right: []\n }\n },\n compoundVariants: [\n {\n containerIsFullWidth: true,\n align: 'right',\n class: ['ml-auto']\n },\n {\n containerIsFullWidth: false,\n align: 'right',\n class: ['ml-4']\n }\n ]\n})\n\nconst Indicator = styled(RadioGroup.Indicator, {\n base: ['bg-white', 'rounded-full', 'absolute', 'size-1.5']\n})\n\ntype RadioCardProps = React.ComponentProps<typeof StyledRadioCard>\n\nexport const RadioCard = ({\n children,\n isFullWidth = false,\n size = 'md',\n align = 'left',\n ...rest\n}: RadioCardProps) => (\n <StyledRadioCard\n {...rest}\n align={align}\n isFullWidth={isFullWidth}\n size={size}\n >\n <RadioButton align={align} containerIsFullWidth={isFullWidth}>\n <Indicator />\n </RadioButton>\n <div>{children}</div>\n </StyledRadioCard>\n)\n","import { RouterProvider } from './RouterProvider'\n\n// The router integration lives under the `Router` name; there is no root\n// component to render, only the context provider. This compound must live in\n// its own module, not the components barrel — a value declared in the barrel\n// forces the root barrel's `export *` to pull the whole barrel (all components)\n// into the eager entry chunk instead of resolving each export to its individual\n// module.\nexport const Router = { Provider: RouterProvider }\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { RadioCard } from './RadioCard'\n\ntype RadioCardGroupProps = Override<\n React.ComponentProps<typeof RadioCard>,\n React.ComponentProps<typeof RadioGroup.Root>\n>\n\nexport const RadioCardGroup = ({\n className,\n children,\n size,\n isFullWidth,\n align,\n ...rest\n}: RadioCardGroupProps) => (\n <RadioGroup.Root {...rest}>\n <div className={cn('flex', 'flex-row', 'flex-wrap', 'gap-3', className)}>\n {React.Children.map(children, (child) => {\n if (React.isValidElement(child) && child?.type === RadioCard) {\n return React.cloneElement(\n child as React.ReactElement<React.ComponentProps<typeof RadioCard>>,\n { size, isFullWidth, align }\n )\n }\n return child\n })}\n </div>\n </RadioGroup.Root>\n)\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { SearchInput, type SearchInputProps } from '../search-input/SearchInput'\n\ntype SearchFieldProps = SearchInputProps & FieldElementWrapperProps\n\nexport const SearchField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: SearchFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <SearchInput\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nSearchField.displayName = 'SearchField'\n","import * as React from 'react'\n\nimport type { SectionMessageTheme } from './SectionMessage'\n\nexport type SectionMessageContextValue = {\n theme: SectionMessageTheme\n hasIcon: boolean\n setHasIcon: React.Dispatch<React.SetStateAction<boolean>>\n hasDismiss: boolean\n setHasDismiss: React.Dispatch<React.SetStateAction<boolean>>\n}\nexport type SectionMessageProviderProps = {\n theme: SectionMessageTheme\n children: React.ReactNode\n}\n\nexport const SectionMessageContext =\n React.createContext<SectionMessageContextValue | null>(null)\n\nexport const SectionMessageProvider = ({\n theme = 'info',\n children\n}: SectionMessageProviderProps) => {\n const [hasIcon, setHasIcon] = React.useState(false)\n const [hasDismiss, setHasDismiss] = React.useState(false)\n\n const value = React.useMemo<SectionMessageContextValue>(\n () => ({ theme, hasIcon, setHasIcon, hasDismiss, setHasDismiss }),\n [theme, hasIcon, setHasIcon, hasDismiss, setHasDismiss]\n )\n\n return <SectionMessageContext value={value}>{children}</SectionMessageContext>\n}\n\nexport const useSectionMessageContext = (): SectionMessageContextValue => {\n const context = React.use(SectionMessageContext)\n\n if (!context) {\n throw new Error(\n 'useSectionMessageContext must be used within a SectionMessageProvider'\n )\n }\n\n return context\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\nexport const SectionMessageDescription = ({\n className,\n ...rest\n}: React.ComponentProps<typeof Text>) => (\n <Text size=\"sm\" {...rest} className={cn('text-grey-900', className)} />\n)\n","import { Close } from '@atom-learning/icons'\nimport React, { useEffect } from 'react'\n\nimport { cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Dismissible } from '../dismissible'\nimport { Icon } from '../icon/Icon'\nimport { useSectionMessageContext } from './SectionMessage.context'\n\nexport const SectionMessageDismiss = ({\n label = 'Dismiss',\n className,\n ...rest\n}: React.ComponentProps<typeof ActionIcon>) => {\n const { setHasDismiss } = useSectionMessageContext()\n\n useEffect(() => {\n setHasDismiss(true)\n return () => setHasDismiss(false)\n }, [setHasDismiss])\n\n return (\n <Dismissible.Trigger asChild>\n <ActionIcon\n label={label}\n size=\"sm\"\n appearance=\"simple\"\n theme=\"neutral\"\n {...rest}\n className={cn('m-auto', 'absolute', 'top-2', 'right-2', className)}\n >\n <Icon is={Close} />\n </ActionIcon>\n </Dismissible.Trigger>\n )\n}\n","import { Danger, Error, Info, OkCircle } from '@atom-learning/icons'\nimport React, { useEffect } from 'react'\n\nimport { cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useSectionMessageContext } from './SectionMessage.context'\n\nconst themeIcons = {\n success: OkCircle,\n warning: Danger,\n error: Error,\n neutral: Info,\n info: Info\n}\n\ntype SectionMessageIconProps = Partial<React.ComponentProps<typeof Icon>>\n\nexport const SectionMessageIcon = ({\n className,\n is,\n ...rest\n}: SectionMessageIconProps) => {\n const { theme, setHasIcon } = useSectionMessageContext()\n\n useEffect(() => {\n setHasIcon(true)\n return () => setHasIcon(false)\n }, [setHasIcon])\n\n return (\n <Icon\n is={is || themeIcons[theme]}\n size=\"sm\"\n {...rest}\n className={cn(\n 'm-auto',\n 'absolute',\n 'left-4',\n 'top-4',\n 'text-current',\n className\n )}\n />\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\n\nexport const SectionMessageContent = styled('div', {\n base: ['max-w-full', 'shrink-0', 'pt-0.5', '*:not-last:mb-2']\n})\n\nexport const SectionMessageActions = ({\n className,\n ...rest\n}: React.ComponentProps<'div'>) => (\n <div className={cn('max-w-full', 'shrink-0', className)}>\n <div className=\"flex flex-wrap gap-3\" {...rest} />\n </div>\n)\n","import * as React from 'react'\n\nimport { Text, type TextProps } from '../text/Text'\n\nexport const SectionMessageTitle = (props: TextProps) => (\n <Text size=\"md\" weight=\"bold\" {...props} />\n)\n","import { TooltipProvider } from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Dismissible } from '../dismissible'\nimport {\n SectionMessageProvider,\n useSectionMessageContext\n} from './SectionMessage.context'\nimport { SectionMessageDescription } from './SectionMessageDescription'\nimport { SectionMessageDismiss } from './SectionMessageDismiss'\nimport { SectionMessageIcon } from './SectionMessageIcon'\nimport {\n SectionMessageActions,\n SectionMessageContent\n} from './SectionMessageLayout'\nimport { SectionMessageTitle } from './SectionMessageTitle'\n\nconst StyledSectionMessage = styled(Dismissible, {\n base: [\n 'relative',\n 'rounded-md',\n 'flex',\n 'shrink-0',\n 'min-h-12',\n 'p-4',\n 'border',\n 'border-white'\n ],\n variants: {\n theme: {\n success: ['bg-success-light', 'text-success-dark'],\n warning: ['bg-warning-light', 'text-warning-text'],\n error: ['bg-danger-light', 'text-danger-dark'],\n neutral: ['bg-grey-100', 'text-grey-1000'],\n info: ['bg-info-light', 'text-info-dark']\n },\n hasIcon: {\n true: ['pl-10']\n },\n hasDismiss: {\n true: ['pr-12']\n }\n }\n})\n\nconst SectionMessageRoot = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledSectionMessage> & {\n className?: string\n}) => {\n const { theme, hasIcon, hasDismiss } = useSectionMessageContext()\n\n return (\n <StyledSectionMessage\n {...rest}\n theme={theme}\n hasIcon={hasIcon}\n hasDismiss={hasDismiss}\n >\n <div className=\"flex grow justify-between gap-3\">{children}</div>\n </StyledSectionMessage>\n )\n}\n\nexport type SectionMessageTheme =\n | 'success'\n | 'warning'\n | 'error'\n | 'neutral'\n | 'info'\n\nexport type SectionMessageProps = React.ComponentProps<\n typeof SectionMessageRoot\n> & {\n theme?: SectionMessageTheme\n}\n\nconst SectionMessageComponent = ({\n theme = 'info',\n ...rest\n}: SectionMessageProps) => (\n <TooltipProvider>\n <SectionMessageProvider theme={theme}>\n <SectionMessageRoot {...rest} />\n </SectionMessageProvider>\n </TooltipProvider>\n)\n\nexport const SectionMessage = /* @__PURE__ */ Object.assign(\n SectionMessageComponent,\n {\n Title: SectionMessageTitle,\n Description: SectionMessageDescription,\n Icon: SectionMessageIcon,\n Dismiss: SectionMessageDismiss,\n Content: SectionMessageContent,\n Actions: SectionMessageActions\n }\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nconst StyledSelect = styled(\n 'select',\n {\n base: [\n 'bg-(image:--bg-chevron)',\n 'appearance-none',\n '[background-repeat:no-repeat,repeat-x]',\n 'rounded-md',\n 'text-grey-1000',\n 'block',\n 'font-body',\n 'font-normal',\n 'leading-[1.4]',\n 'w-full',\n 'hover:cursor-pointer',\n '-ms-expand:hidden',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n '*[[disabled]]:opacity-30',\n '*[[disabled]]:cursor-not-allowed'\n ],\n variants: {\n size: {\n sm: [\n 'bg-position-[right_--spacing(2)_top_50%,0_0]',\n 'bg-size-[18px_auto,100%]',\n 'text-sm',\n 'h-8',\n 'pl-2',\n 'pr-8'\n ],\n md: [\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n 'bg-size-[20px_auto,100%]',\n 'text-md',\n 'h-10',\n 'pl-3',\n 'pr-10'\n ],\n lg: [\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n 'bg-size-[20px_auto,100%]',\n 'text-md',\n 'h-12',\n 'pl-3',\n 'pr-10'\n ]\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n },\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-700',\n 'focus:border-primary-800',\n 'focus:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus:outline-2',\n 'focus:outline-blue-800',\n 'focus:outline-offset-1',\n 'focus:outline-solid',\n 'focus:z-1'\n ]\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n },\n { enablePolymorphism: false, enableResponsiveVariants: true }\n)\n\nexport type SelectProps = Override<\n React.ComponentProps<typeof StyledSelect>,\n {\n placeholder?: string\n }\n // TODO: figure out why uncommenting this causes TS errors in\n // component declaration\n // & (\n // | { id: string; 'aria-label'?: string }\n // | { 'aria-label': string; id?: string }\n // )\n>\n\nexport const Select = ({\n ref,\n placeholder,\n children,\n size = 'md',\n appearance = 'standard',\n ...rest\n}: SelectProps) => {\n // Type assertion needed due to responsive variant size prop compatibility\n const props: React.ComponentProps<typeof StyledSelect> = {\n size,\n appearance,\n ref,\n ...rest\n }\n\n if ([rest.value, rest.defaultValue].every((value) => value === undefined)) {\n props.defaultValue = ''\n }\n\n return (\n <StyledSelect {...props}>\n {placeholder && (\n <option disabled hidden value=\"\">\n {placeholder}\n </option>\n )}\n {children}\n </StyledSelect>\n )\n}\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { Select, type SelectProps } from '../select/Select'\n\ntype SelectFieldProps = SelectProps & FieldElementWrapperProps\n\nexport const SelectField = ({\n className,\n hideLabel,\n children,\n name,\n label,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: SelectFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Select\n name={name}\n id={name}\n appearance={formAppearance}\n theme={formTheme}\n {...rest}\n ref={ref}\n {...(error && { state: 'error' })}\n >\n {children}\n </Select>\n </FieldWrapper>\n )\n}\n\nSelectField.displayName = 'SelectField'\n","import * as React from 'react'\n\ntype SelectMenuContextValue = {\n size: 'sm' | 'md' | 'lg'\n theme: 'white' | 'grey'\n state?: 'error'\n}\n\nexport const SelectMenuContext = React.createContext<SelectMenuContextValue>({\n size: 'md',\n theme: 'grey'\n})\n\nexport const useSelectMenuContext = () => React.use(SelectMenuContext)\n","import * as React from 'react'\nimport * as AriaComponents from 'react-aria-components'\n\nimport { styled } from '../../styled'\n\nconst Content = styled(\n AriaComponents.Popover,\n {\n base: [\n 'bg-white',\n 'rounded-md',\n 'shadow-lg',\n 'z-10',\n 'overflow-hidden',\n 'will-change-transform',\n // Floors at the trigger width; caps at min(viewport − 8px per edge, 400px)\n // on the --spacing() scale: --spacing(4)=16px (2×8px), --spacing(100)=400px.\n 'min-w-[var(--trigger-width)]',\n 'max-w-[min(calc(100vw-(--spacing(4))),--spacing(100))]'\n ]\n },\n { enablePolymorphism: false }\n)\n\nconst Viewport = styled(\n AriaComponents.ListBox,\n {\n base: ['max-h-[inherit]', 'w-full', 'overflow-auto', 'p-1', 'outline-none']\n },\n { enablePolymorphism: false }\n)\n\ntype SelectMenuContentProps = Omit<\n React.ComponentPropsWithRef<typeof AriaComponents.Popover>,\n 'children'\n> & {\n children?: React.ReactNode\n}\n\nexport const SelectMenuContent = ({\n ref,\n children,\n offset = 4,\n ...rest\n}: SelectMenuContentProps) => (\n // offset/containerPadding are react-aria positioner props in px (JS numbers,\n // not CSS), so they can't use the --spacing() scale: 4px gap from the trigger,\n // 8px minimum inset from every viewport edge (the 2×8px behind the max-width).\n <Content ref={ref} offset={offset} containerPadding={8} {...rest}>\n <Viewport>{children}</Viewport>\n </Content>\n)\n","import { Ok } from '@atom-learning/icons'\nimport * as React from 'react'\nimport * as AriaComponents from 'react-aria-components'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useSelectMenuContext } from './SelectMenu.context'\n\nconst Item = styled(\n AriaComponents.ListBoxItem,\n {\n base: [\n 'relative',\n 'flex',\n 'items-center',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n 'cursor-pointer',\n 'rounded-sm',\n 'outline-none',\n 'data-[disabled]:cursor-not-allowed',\n 'data-[disabled]:opacity-30',\n // react-aria's data-hovered (pointer only, ignores touch) — not `hover:`,\n // whose :hover sticks after a tap on touchscreens (this menu targets\n // webviews). data-focused covers keyboard navigation; together they\n // replicate the old Radix data-highlighted.\n 'data-[hovered]:bg-grey-100',\n 'data-[focused]:bg-grey-100',\n 'data-[focus-visible]:outline-none'\n ],\n variants: {\n size: {\n sm: ['py-1.5', 'pl-7', 'pr-4', 'text-sm'],\n md: ['py-2', 'pl-8', 'pr-6'],\n lg: ['py-2', 'pl-8', 'pr-6']\n }\n }\n },\n { enablePolymorphism: false }\n)\n\ntype SelectMenuItemProps = Omit<AriaComponents.ListBoxItemProps, 'children'> & {\n children?: React.ReactNode\n}\n\nexport const SelectMenuItem = ({\n children,\n textValue,\n ...rest\n}: SelectMenuItemProps) => {\n const { size } = useSelectMenuContext()\n const resolvedTextValue =\n textValue ?? (typeof children === 'string' ? children : undefined)\n\n return (\n <Item size={size} textValue={resolvedTextValue} {...rest}>\n {({ isSelected }) => (\n <>\n <span className=\"absolute left-2 inline-flex items-center\">\n {isSelected && (\n <Icon is={Ok} className={size === 'sm' ? 'size-3' : 'size-4'} />\n )}\n </span>\n {children}\n </>\n )}\n </Item>\n )\n}\n","import * as React from 'react'\nimport * as AriaComponents from 'react-aria-components'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\ntype SelectMenuLabelProps = React.ComponentProps<typeof AriaComponents.Header>\n\nexport const SelectMenuLabel = ({\n className,\n ...rest\n}: SelectMenuLabelProps) => (\n <Text\n as={AriaComponents.Header}\n size=\"sm\"\n className={cn('p-2', 'mb-1', 'text-text-subtle', className)}\n {...rest}\n />\n)\n\nSelectMenuLabel.displayName = 'SelectMenuLabel'\n","import * as AriaComponents from 'react-aria-components'\n\nimport { styled } from '../../styled'\n\nexport const SelectMenuSeparator = styled(\n AriaComponents.Separator,\n {\n base: ['h-px', 'bg-grey-200', 'my-2', 'mx-1']\n },\n { enablePolymorphism: false }\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport * as React from 'react'\nimport * as AriaComponents from 'react-aria-components'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useSelectMenuContext } from './SelectMenu.context'\n\nconst Trigger = styled(\n AriaComponents.Button,\n {\n base: [\n 'appearance-none',\n 'rounded-md',\n 'block',\n 'w-full',\n 'font-body',\n 'font-normal',\n 'leading-[1.4]',\n 'text-grey-1000',\n 'text-left',\n 'relative',\n 'inline-flex',\n 'items-center',\n 'border-none',\n 'hover:cursor-pointer',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'data-[focus-visible]:outline-2',\n 'data-[focus-visible]:outline-blue-800',\n 'data-[focus-visible]:outline-offset-1',\n 'data-[focus-visible]:outline-solid',\n 'data-[focus-visible]:z-1'\n ],\n variants: {\n size: {\n sm: ['h-8', 'pl-2', 'pr-8', 'text-sm'],\n md: ['h-10', 'pl-3', 'pr-10', 'text-md'],\n lg: ['h-12', 'pl-3', 'pr-10', 'text-md']\n },\n theme: {\n white: ['bg-white'],\n grey: ['bg-grey-100']\n },\n state: {\n error: ['bg-danger-light', 'data-[focus-visible]:outline-danger']\n }\n }\n },\n { enablePolymorphism: false }\n)\n\nconst TriggerIcon = styled(Icon, {\n base: [\n 'absolute',\n 'top-1/2',\n '-translate-y-1/2',\n 'pointer-events-none',\n 'text-grey-700'\n ],\n variants: {\n size: {\n sm: ['right-2', 'size-4'],\n md: ['right-3', 'size-5'],\n lg: ['right-3', 'size-5']\n }\n }\n})\n\n// Label the SelectMenu via aria-label/aria-labelledby on the root <SelectMenu>,\n// not here — react-aria computes the trigger's accessible name from the root\n// Select's label props, so labels placed on the trigger are ignored.\ntype SelectMenuTriggerProps = Omit<\n React.ComponentPropsWithRef<typeof AriaComponents.Button>,\n 'children' | 'aria-label' | 'aria-labelledby'\n> & {\n placeholder?: string\n children?: React.ReactNode\n}\n\nexport const SelectMenuTrigger = ({\n ref,\n placeholder,\n children,\n ...rest\n}: SelectMenuTriggerProps) => {\n const { size, theme, state } = useSelectMenuContext()\n\n return (\n <Trigger ref={ref} size={size} theme={theme} state={state} {...rest}>\n <AriaComponents.SelectValue className=\"truncate\">\n {({ isPlaceholder, selectedText }) =>\n isPlaceholder ? (placeholder ?? '') : (children ?? selectedText)\n }\n </AriaComponents.SelectValue>\n <TriggerIcon is={ChevronDown} size={size} />\n </Trigger>\n )\n}\n","import * as React from 'react'\nimport * as AriaComponents from 'react-aria-components'\n\nimport { cn } from '../../styled'\nimport { SelectMenuContext } from './SelectMenu.context'\nimport { SelectMenuContent } from './SelectMenuContent'\nimport { SelectMenuItem } from './SelectMenuItem'\nimport { SelectMenuLabel } from './SelectMenuLabel'\nimport { SelectMenuSeparator } from './SelectMenuSeparator'\nimport { SelectMenuTrigger } from './SelectMenuTrigger'\n\ntype SelectMenuProps = Omit<\n AriaComponents.SelectProps<object>,\n 'className' | 'style' | 'children'\n> & {\n size?: 'sm' | 'md' | 'lg'\n theme?: 'white' | 'grey'\n state?: 'error'\n className?: string\n children?: React.ReactNode\n}\n\nconst SelectMenuRoot = ({\n size = 'md',\n theme = 'grey',\n state,\n className,\n children,\n ...rest\n}: SelectMenuProps) => {\n const value = React.useMemo(\n () => ({ size, theme, state }),\n [size, theme, state]\n )\n return (\n <SelectMenuContext value={value}>\n {/* w-full so the trigger fills its container even in flex/inline layouts\n (react-aria wraps the trigger in an extra div). Consumers can override\n the width — or anything else — via className, e.g. w-auto / w-64. */}\n <AriaComponents.Select className={cn('w-full', className)} {...rest}>\n {children}\n </AriaComponents.Select>\n </SelectMenuContext>\n )\n}\n\nexport const SelectMenu = /* @__PURE__ */ Object.assign(SelectMenuRoot, {\n Trigger: SelectMenuTrigger,\n Content: SelectMenuContent,\n Item: SelectMenuItem,\n Group: AriaComponents.ListBoxSection,\n Label: SelectMenuLabel,\n Separator: SelectMenuSeparator\n})\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { SelectMenu } from '../select-menu/SelectMenu'\n\ntype SelectMenuFieldProps = React.PropsWithChildren<\n FieldElementWrapperProps & {\n placeholder?: string\n size?: 'sm' | 'md' | 'lg'\n theme?: 'white' | 'grey'\n disabled?: boolean\n className?: string\n }\n>\n\nexport const SelectMenuField = ({\n className,\n hideLabel,\n children,\n name,\n label,\n validation,\n prompt,\n description,\n theme,\n size,\n placeholder,\n disabled,\n ...rest\n}: SelectMenuFieldProps) => {\n const { control } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const formTheme = context?.theme ?? theme\n\n const {\n field: { ref, onChange, value }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue: ''\n })\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n >\n <SelectMenu\n aria-label={label}\n selectedKey={value === '' ? null : value}\n onSelectionChange={onChange}\n size={size}\n theme={formTheme}\n isDisabled={disabled}\n {...(error && { state: 'error' })}\n {...rest}\n >\n <SelectMenu.Trigger ref={ref} placeholder={placeholder} />\n <SelectMenu.Content>{children}</SelectMenu.Content>\n </SelectMenu>\n </FieldWrapper>\n )\n}\n\nSelectMenuField.displayName = 'SelectMenuField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Image } from '../image/Image'\nimport { Text } from '../text/Text'\n\nexport const SideBarHeader = styled('div', {\n base: ['border-b', 'border-b-(--border)', 'p-4', 'w-full']\n})\n\nexport const SideBarBody = styled('div', {\n base: ['grow', 'overflow-y-auto', 'overflow-x-hidden', 'p-4', 'w-full']\n})\n\nexport const SideBarFooter = styled('div', {\n base: ['border-t', 'border-t-(--border)', 'p-4', 'w-full']\n})\n\nconst StyledSideBarBrand = /* @__PURE__ */ styled('a', {\n base: [\n 'items-end',\n 'text-text',\n 'flex',\n 'gap-4',\n 'no-underline',\n 'hover:no-underline',\n 'focus:no-underline'\n ]\n})\n\nexport const SideBarBrand = StyledSideBarBrand as React.FC<\n React.ComponentPropsWithRef<'a'> & { as?: React.ElementType }\n>\n\nexport const SideBarBrandLogo = Image\n\nexport const SideBarBrandName = styled(Text, {\n base: ['text-text', 'whitespace-nowrap']\n})\n","import * as React from 'react'\nimport { useFocusWithin, useHover, useInteractOutside } from 'react-aria'\n\nimport { styled, Theme, cn } from '../../styled'\nimport { SideBarContext } from './SideBar.context'\nimport {\n SideBarBody,\n SideBarBrand,\n SideBarBrandLogo,\n SideBarBrandName,\n SideBarFooter,\n SideBarHeader\n} from './SideBarComponents'\n\nconst light = {\n '--background': 'white',\n '--text': 'var(--color-grey-800)',\n '--border': 'var(--color-grey-200)'\n}\n\nconst Root = styled('div', {\n base: ['sticky', 'z-1'],\n variants: {\n type: {\n static: [],\n expandable: ['w-22']\n }\n }\n})\n\nconst Content = styled('div', {\n base: [\n 'bg-(--background)',\n 'border-r',\n 'border-r-(--border)',\n 'shadow-[4px_0_4px_-2px_rgba(31,31,31,0)]',\n 'flex',\n 'flex-col',\n 'h-full',\n 'overflow-hidden',\n 'will-change-width',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[shadow,width]'\n ],\n variants: {\n type: {\n static: [],\n expandable: []\n },\n isExpanded: {\n true: ['w-[16rem]'],\n false: ['w-22']\n }\n },\n compoundVariants: [\n {\n isExpanded: true,\n type: 'expandable',\n class: ['shadow-[4px_0_4px_-2px_rgba(31,31,31,0.1)]']\n }\n ]\n})\n\nconst PointerBlocker = styled('div', {\n base: [\n 'bottom-0',\n 'left-0',\n 'absolute',\n 'right-0',\n 'top-0',\n 'transition-all'\n ],\n variants: {\n isVisible: {\n true: ['delay-0', 'visible'],\n false: ['delay-50', 'invisible']\n }\n }\n})\n\ntype SideBarProps = React.ComponentProps<typeof Root> & {\n className?: string\n offset?: number | string\n} & React.ComponentProps<typeof Theme>\n\nconst SideBarComponent = ({\n theme,\n className,\n children,\n type = 'expandable',\n offset = '0px',\n style,\n ...rest\n}: SideBarProps) => {\n const [isExpanded, setIsExpanded] = React.useState(type === 'static')\n const ref = React.useRef<HTMLDivElement>(null)\n\n useInteractOutside({\n ref,\n onInteractOutside: () => setIsExpanded(false)\n })\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: () => setIsExpanded(true),\n onBlurWithin: () => setIsExpanded(false)\n })\n const { hoverProps, isHovered } = useHover({\n onHoverStart: () => setIsExpanded(true),\n onHoverEnd: () => setIsExpanded(false)\n })\n const touchProps = {\n onTouchEnd: () => setIsExpanded(true)\n }\n\n const expandableProps =\n type === 'expandable'\n ? {\n ...focusWithinProps,\n ...hoverProps,\n ...touchProps,\n ref\n }\n : {}\n\n const sideBarContextValue = React.useMemo(\n () => ({ isExpanded }),\n [isExpanded]\n )\n\n return (\n <SideBarContext value={sideBarContextValue}>\n <Theme theme={theme || light}>\n <Root\n {...rest}\n style={{ ...style, '--offset': offset }}\n type={type}\n className={cn(\n 'h-[calc(100svh-var(--offset))]',\n 'top-(--offset)',\n className\n )}\n >\n <Content {...expandableProps} isExpanded={isExpanded} type={type}>\n {children}\n {/**\n * When the SideBar is collapsed, ensure that the initial tap event\n * is used to expand the nav first before making the items available\n */}\n {type === 'expandable' && (\n <PointerBlocker isVisible={!isHovered && !isExpanded} />\n )}\n </Content>\n </Root>\n </Theme>\n </SideBarContext>\n )\n}\n\nexport const SideBar = /* @__PURE__ */ Object.assign(SideBarComponent, {\n Brand: SideBarBrand,\n BrandLogo: SideBarBrandLogo,\n BrandName: SideBarBrandName,\n Header: SideBarHeader,\n Body: SideBarBody,\n Footer: SideBarFooter,\n displayName: 'SideBar'\n})\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\n\nexport type SliderStepsType = {\n steps?: { label: string; value: number }[]\n}\n\ntype SliderStepsProps = {\n min: number\n max: number\n} & SliderStepsType\n\nconst getPercentValue = (value: number, min: number, max: number): number => {\n return ((value - min) / (max - min)) * 100\n}\n\nconst getTransformValue = (value: number, min: number, max: number): number => {\n const percentage = getPercentValue(value, min, max)\n\n if (percentage <= 10) return 0\n if (percentage >= 90) return 100\n return 50\n}\n\nexport const SliderSteps = ({ min, max, steps = [] }: SliderStepsProps) => {\n if (steps.length === 0) return null\n\n return (\n <div className=\"relative mt-3 h-3 w-full\">\n {steps.map((step) => (\n <Text\n as=\"span\"\n key={step.value}\n style={{\n '--left': `${getPercentValue(step.value, min, max)}%`,\n '--translate-x': `-${getTransformValue(step.value, min, max)}%`\n }}\n className=\"text-grey-700 absolute left-(--left) translate-x-(--translate-x)\"\n >\n {step.label}\n </Text>\n ))}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\n\nexport type SliderValueType = {\n outputLabel?: (value: number | number[]) => string\n}\n\ntype SliderValueProps = SliderValueType & {\n value?: number[]\n}\n\nexport const SliderValue = ({\n value = [],\n outputLabel = (value) => `Current value is ${value}`\n}: SliderValueProps) => (\n <Text className=\"text-grey-700 mt-4 w-full\">\n {outputLabel(value.length === 1 ? value[0] : value)}\n </Text>\n)\n","import { Range, Root, Thumb, Track } from '@radix-ui/react-slider'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { CSSWrapper } from '../../utilities/css-wrapper/CSSWrapper'\nimport { SliderSteps } from './SliderSteps'\nimport { SliderValue } from './SliderValue'\n\nconst StyledTrack = styled(Track, {\n base: [\n 'rounded-full',\n 'grow',\n 'relative',\n 'data-[orientation=horizontal]:h-1',\n 'data-[orientation=vertical]:w-1'\n ],\n variants: {\n theme: {\n light: ['bg-white'],\n tonal: ['bg-grey-600']\n }\n }\n})\n\nconst StyledSlider = styled(Root, {\n base: [\n 'items-center',\n 'flex',\n 'relative',\n 'touch-none',\n 'select-none',\n 'cursor-pointer',\n 'data-[orientation=horizontal]:h-4',\n 'data-[orientation=vertical]:flex-col',\n 'data-[orientation=vertical]:w-4',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nconst StyledRange = styled(Range, {\n base: [\n 'bg-primary-800',\n 'rounded-full',\n 'h-full',\n 'absolute',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nconst StyledThumb = styled(Thumb, {\n base: [\n 'bg-primary-900',\n 'rounded-full',\n 'block',\n 'size-4',\n 'hover:bg-primary-1000',\n 'focus:outline-2',\n 'focus:outline-offset-2',\n 'focus:outline-primary-900',\n 'focus:outline-solid',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nexport type SliderProps = React.ComponentProps<typeof StyledSlider> &\n Pick<React.ComponentProps<typeof StyledTrack>, 'theme'>\n\nconst SliderComponent = ({\n ref,\n value,\n defaultValue,\n min = 0,\n max = 100,\n theme = 'tonal',\n className,\n children,\n ...rest\n}: SliderProps) => {\n const values = value || defaultValue\n return (\n <CSSWrapper className={className}>\n <StyledSlider\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n ref={ref}\n {...rest}\n >\n <StyledTrack theme={theme}>\n <StyledRange />\n </StyledTrack>\n {values?.length &&\n // Thumbs are positional and can share a value, so the index is their\n // stable identity.\n // eslint-disable-next-line react/no-array-index-key\n values.map((_, i) => <StyledThumb key={`thumb${i}`} />)}\n </StyledSlider>\n {children}\n </CSSWrapper>\n )\n}\n\nexport const Slider = /* @__PURE__ */ Object.assign(SliderComponent, {\n Value: SliderValue,\n Steps: SliderSteps\n})\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { Slider, type SliderProps } from '../slider/Slider'\nimport type { SliderStepsType } from '../slider/SliderSteps'\nimport type { SliderValueType } from '../slider/SliderValue'\n\ntype SliderFieldProps = SliderProps &\n SliderStepsType &\n SliderValueType &\n FieldElementWrapperProps\n\n// Stable identity so the default doesn't hand `Slider.Steps` a fresh array every\n// render (which would redraw children that compare props).\nconst DEFAULT_STEPS: SliderFieldProps['steps'] = []\n\nexport const SliderField = ({\n className,\n hideLabel,\n label,\n name,\n defaultValue,\n value,\n validation,\n outputLabel,\n min = 0,\n max = 100,\n steps = DEFAULT_STEPS,\n ...rest\n}: SliderFieldProps) => {\n const { control, setValue } = useFormContext()\n const {\n field: { ref, onChange, value: innerValue, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n\n // Serialized so an inline `value` array with a fresh identity per render\n // doesn't re-fire the sync effect.\n const serializedValue = JSON.stringify(value)\n React.useEffect(() => {\n // Sync an externally-controlled `value` into react-hook-form without\n // marking the field dirty/touched — this isn't user input. An empty\n // array is a valid value (clearing) and must sync too.\n if (typeof value !== 'undefined')\n setValue(name, value, { shouldDirty: false })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [serializedValue, name, setValue])\n\n return (\n <FieldWrapper\n className={className}\n fieldId={name}\n label={label}\n hideLabel={hideLabel}\n >\n <Slider\n ref={ref}\n name={innerName}\n onValueChange={onChange}\n value={innerValue}\n min={min}\n max={max}\n {...rest}\n >\n <Slider.Steps min={min} max={max} steps={steps} />\n\n <Slider.Value value={innerValue} outputLabel={outputLabel} />\n </Slider>\n </FieldWrapper>\n )\n}\n\nSliderField.displayName = 'SliderField'\n","import { styled } from '../../styled'\n\nexport const SkeletonLoader = styled('div', {\n base: ['bg-grey-300', 'size-16', 'animate-shimmer']\n})\n\nSkeletonLoader.displayName = 'Skeleton'\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonHeading = ({\n className\n}: {\n className?: React.ComponentProps<typeof SkeletonLoader>['className']\n}) => <SkeletonLoader className={cn('w-64', 'h-6', 'rounded-xl', className)} />\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonButton = ({\n className\n}: {\n className?: React.ComponentProps<typeof SkeletonLoader>['className']\n}) => (\n <SkeletonLoader className={cn('w-[10rem]', 'h-8', 'rounded-sm', className)} />\n)\n","import * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { type PolymorphicComponent, styled } from '../../styled'\n\nexport const StyledTile = styled(\n 'div',\n {\n base: [\n 'box-border',\n 'flex',\n 'flex-col',\n 'relative',\n 'border',\n 'bg-(--base-1)',\n 'text-(--foreground)',\n 'border-transparent'\n ],\n variants: {\n borderRadius: {\n sm: ['rounded-sm'],\n md: ['rounded-md'],\n lg: ['rounded-xl']\n },\n border: {\n true: ['border-(--base-3)']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\n// Re-expose StyledTile's own props so Tile stays polymorphic (keeps `as`, e.g.\n// `<Tile as=\"a\" href>`). Typing with React.ComponentProps<typeof StyledTile>\n// would collapse to the default element and drop `as` (as?: never).\ntype StyledTileOwnProps =\n typeof StyledTile extends PolymorphicComponent<infer _Element, infer OwnProps>\n ? OwnProps\n : never\n\ntype TileOwnProps = StyledTileOwnProps & { colorScheme?: TcolorScheme }\n\nexport const Tile = (({\n ref,\n children,\n borderRadius = 'lg',\n colorScheme = {},\n ...rest\n}: React.ComponentProps<typeof StyledTile> & {\n colorScheme?: TcolorScheme\n}) => (\n <ColorScheme\n asChild\n base=\"grey1\"\n accent=\"primary2\"\n interactive=\"loContrast\"\n {...colorScheme}\n >\n <StyledTile ref={ref} borderRadius={borderRadius} {...rest}>\n {children}\n </StyledTile>\n </ColorScheme>\n)) as PolymorphicComponent<'div', TileOwnProps>\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonTabs = ({\n numberOfTabs,\n className,\n tabClassName\n}: {\n numberOfTabs: number\n className?: string\n tabClassName?: string\n}) => (\n <Tile className={cn('p-6', 'flex-row', 'gap-4', className)}>\n {Array.from({ length: numberOfTabs }, (_, index) => `tab_${index}`).map(\n (key) => (\n <SkeletonLoader\n key={key}\n className={cn('w-32', 'h-6', 'rounded-sm', tabClassName)}\n />\n )\n )}\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\n\nconst buildConicGradient = () => {\n const numberOfSegments = 5\n const gap = 4\n const segmentAngle = (360 - numberOfSegments * gap) / numberOfSegments\n const stops: string[] = []\n let current = 0\n\n Array.from({ length: numberOfSegments }).forEach(() => {\n stops.push(\n `var(--color-grey-300) ${current}deg ${current + segmentAngle}deg`\n )\n current += segmentAngle\n stops.push(`white ${current}deg ${current + gap}deg`)\n current += gap\n })\n\n return `conic-gradient(${stops.join(', ')})`\n}\n\nexport const SkeletonDoughnutChart = ({\n className\n}: {\n className?: string\n}) => (\n <Tile className={cn('p-6', 'size-60', className)}>\n <div\n className=\"animate-shimmer aspect-square w-full rounded-full [background-image:var(--gradient)] bg-clip-padding\"\n style={{ '--gradient': buildConicGradient() }}\n >\n <div className=\"mt-[20%] ml-[20%] size-[60%] rounded-full bg-white\" />\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Table } from '../table/Table'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonTable = ({\n numberOfColumns = 4,\n numberOfRows = 4,\n columnWidth,\n className\n}: {\n numberOfColumns?: number\n numberOfRows?: number\n columnWidth?: Record<number, string>\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-row', 'gap-4', 'relative', className)}>\n <Table size=\"md\">\n <Table.Header theme=\"white\">\n {Array.from({ length: numberOfColumns }, (_, index) => index).map(\n (columnIndex) => (\n <Table.HeaderCell key={columnIndex}>\n <SkeletonLoader\n style={{ '--width': columnWidth?.[columnIndex] || '100px' }}\n className=\"h-4 w-(--width) rounded-xl\"\n />\n </Table.HeaderCell>\n )\n )}\n </Table.Header>\n <Table.Body striped={false}>\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowIndex) => (\n <Table.Row key={rowIndex}>\n {Array.from({ length: numberOfColumns }, (_, index) => index).map(\n (columnIndex) => (\n <Table.Cell key={columnIndex} className=\"border-none\">\n <SkeletonLoader\n style={{\n '--width': columnWidth?.[columnIndex] || '100px'\n }}\n className=\"bg-grey-200 h-4 w-(--width) rounded-xl\"\n />\n </Table.Cell>\n )\n )}\n </Table.Row>\n )\n )}\n </Table.Body>\n </Table>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\nimport { SkeletonButton } from './SkeletonButton'\nimport { SkeletonDoughnutChart } from './SkeletonDoughnutChart'\n\nexport const SkeletonCard = ({\n numberOfRows = 3,\n withChart,\n className\n}: {\n numberOfRows?: number\n withChart?: boolean\n className?: string\n}) => (\n <Tile\n className={cn(\n 'relative',\n 'w-full',\n 'flex-col',\n 'items-center',\n 'gap-6',\n 'p-6',\n className\n )}\n >\n <div className=\"align-center flex w-full gap-6\">\n {withChart && <SkeletonDoughnutChart />}\n <div className=\"flex grow flex-col gap-6\">\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowNumber) => (\n <SkeletonLoader\n key={rowNumber}\n className=\"bg-grey-200 h-10 w-full min-w-25 rounded-md\"\n />\n )\n )}\n </div>\n </div>\n <SkeletonButton />\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nconst getBarHeight = (groupIndex: number, columnIndex: number) =>\n Math.round(90 + Math.abs(Math.sin(groupIndex + columnIndex + 1)) * 30)\n\nconst ColumnGroup = ({\n numberOfColumns,\n groupIndex\n}: {\n numberOfColumns: number\n groupIndex: number\n}) => (\n <div className=\"flex flex-col items-center gap-4\">\n <div className=\"flex items-end gap-2\">\n {Array.from({ length: numberOfColumns }, (_, i) => (\n <SkeletonLoader\n key={i}\n className=\"h-(--height) w-5 rounded-t-full rounded-b-none\"\n style={{\n '--height': `${getBarHeight(groupIndex, i)}px`\n }}\n />\n ))}\n </div>\n <SkeletonLoader className=\"h-2 w-14 rounded-full\" />\n </div>\n)\n\nconst LegendItem = () => (\n <div className=\"flex items-center gap-2\">\n <SkeletonLoader className=\"h-3 w-3 rounded-full\" />\n <SkeletonLoader className=\"h-3 w-24 rounded-full\" />\n </div>\n)\n\nexport const SkeletonColumnChart = ({\n numberOfLabels = 2,\n numberOfGroups = 7,\n numberOfColumns = 1,\n className\n}: {\n numberOfLabels?: number\n numberOfGroups?: number\n numberOfColumns?: number\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-col', 'gap-6', 'w-full', className)}>\n <div className=\"flex flex-col gap-3\">\n <div className=\"flex items-center gap-4\">\n {Array.from({ length: numberOfLabels }, (_, i) => (\n <LegendItem key={i} />\n ))}\n </div>\n </div>\n <div className=\"flex items-end justify-between gap-2\">\n {Array.from({ length: numberOfGroups }, (_, i) => (\n <ColumnGroup key={i} numberOfColumns={numberOfColumns} groupIndex={i} />\n ))}\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nconst getBarWidth = (rowIndex: number) =>\n Math.round(40 + Math.abs(Math.sin(rowIndex + 1)) * 55)\n\nconst LegendItem = () => (\n <div className=\"flex items-center gap-2\">\n <SkeletonLoader className=\"h-3 w-3 rounded-full\" />\n <SkeletonLoader className=\"h-3 w-24 rounded-full\" />\n </div>\n)\n\nexport const SkeletonBarChart = ({\n numberOfLabels = 3,\n numberOfRows = 4,\n numberOfTicks = 4,\n className\n}: {\n numberOfLabels?: number\n numberOfRows?: number\n numberOfTicks?: number\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-col', 'gap-6', 'w-full', className)}>\n <div className=\"flex items-center gap-4\">\n {Array.from({ length: numberOfLabels }, (_, i) => (\n <LegendItem key={i} />\n ))}\n </div>\n <div className=\"flex flex-col justify-between gap-4\">\n {Array.from({ length: numberOfRows }, (_, i) => (\n <div key={i} className=\"flex items-center gap-5\">\n <SkeletonLoader className=\"h-3 w-20 shrink-0 rounded-full\" />\n <div className=\"grow\">\n <SkeletonLoader\n className=\"h-5 w-(--width) rounded-full\"\n style={{\n '--width': `${getBarWidth(i)}%`\n }}\n />\n </div>\n </div>\n ))}\n <div className=\"flex justify-between pl-24\">\n {Array.from({ length: numberOfTicks }, (_, i) => (\n <SkeletonLoader key={i} className=\"h-2 w-8 rounded-full\" />\n ))}\n </div>\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonPanelList = ({ className }: { className?: string }) => (\n <Tile className={cn('px-6', 'flex-col', 'w-full', className)}>\n <div className=\"border-grey-100 flex flex-wrap items-center gap-4 border-b py-4 last:border-b-0\">\n <SkeletonLoader className=\"size-10 rounded-full\" />\n <div className=\"grow\">\n <SkeletonLoader className=\"h-4 w-2/3 rounded-full\" />\n </div>\n <SkeletonLoader className=\"h-8 w-28 rounded-md\" />\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonSubjectList = ({ className }: { className?: string }) => (\n <Tile\n className={cn(\n 'p-2',\n 'flex-row',\n 'flex-wrap',\n 'items-center',\n 'justify-between',\n 'gap-4',\n 'w-full',\n className\n )}\n >\n <SkeletonLoader className=\"h-22 max-w-xl grow rounded-xl\" />\n <SkeletonLoader className=\"size-10 shrink-0 rounded-md\" />\n </Tile>\n)\n","export { SkeletonLoader as Loader } from './Skeleton'\nexport { SkeletonHeading as Heading } from './SkeletonHeading'\nexport { SkeletonButton as Button } from './SkeletonButton'\nexport { SkeletonTabs as Tabs } from './SkeletonTabs'\nexport { SkeletonDoughnutChart as DoughnutChart } from './SkeletonDoughnutChart'\nexport { SkeletonTable as Table } from './SkeletonTable'\nexport { SkeletonCard as Card } from './SkeletonCard'\nexport { SkeletonColumnChart as ColumnChart } from './SkeletonColumnChart'\nexport { SkeletonBarChart as BarChart } from './SkeletonBarChart'\nexport { SkeletonPanelList as PanelList } from './SkeletonPanelList'\nexport { SkeletonSubjectList as SubjectList } from './SkeletonSubjectList'\n","import { styled } from '../../styled'\n\n/**\n * A flexible flex spacer that expands along the major axis of its containing flex layout.\n * It renders a `div` by default, and takes up any available space.\n */\nexport const Spacer = styled('div', {\n base: ['flex-1', 'justify-self-stretch', 'self-stretch']\n})\n\nSpacer.displayName = 'Spacer'\n","import * as React from 'react'\n\nimport type { Context, StepperProviderProps } from './types'\n\n// null default so useStepper's missing-provider guard can fire — a full\n// default object would silently render a zero-step stepper instead.\nconst StepperContext = React.createContext<Context | null>(null)\n\nexport const StepperProvider = ({\n children,\n stepCount,\n allowSkip,\n onComplete,\n onStepChange,\n direction,\n steps,\n hideLabels,\n showCompletedIcons\n}: React.PropsWithChildren<StepperProviderProps>) => {\n const [activeStep, setActiveStep] = React.useState(0)\n\n const [viewedSteps, setviewedSteps] = React.useState<number[]>([0])\n const [completedSteps, setCompletedSteps] = React.useState<number[]>([])\n\n const isControlled = !stepCount\n\n // Step changes (and their side effects) happen in the navigation handlers,\n // not an effect: an effect would fire onStepChange on mount (twice under\n // StrictMode) and again whenever the callback identity changed.\n const changeStep = React.useCallback(\n (nextStep: number) => {\n setActiveStep(nextStep)\n setviewedSteps((prev) =>\n prev.includes(nextStep) ? prev : [...prev, nextStep]\n )\n onStepChange?.(nextStep)\n },\n [onStepChange]\n )\n\n const goToNextStep = React.useCallback(() => {\n const isCompleted = onComplete && activeStep === stepCount - 1\n const isNextStep = activeStep < stepCount - 1\n\n if (onComplete || isNextStep) {\n setCompletedSteps((prev) =>\n prev.includes(activeStep) ? prev : [...prev, activeStep]\n )\n }\n\n if (isCompleted) {\n return onComplete?.()\n }\n if (isNextStep) {\n return changeStep(activeStep + 1)\n }\n }, [activeStep, stepCount, onComplete, changeStep])\n\n const goToPreviousStep = React.useCallback(() => {\n changeStep(activeStep - 1)\n }, [activeStep, changeStep])\n\n const goToStep = React.useCallback(\n (index: number) => {\n changeStep(index)\n },\n [changeStep]\n )\n\n const value = React.useMemo<Context>(\n () => ({\n steps: steps || Array(stepCount).fill(''),\n goToPreviousStep: isControlled ? undefined : goToPreviousStep,\n goToNextStep: isControlled ? undefined : goToNextStep,\n goToStep: isControlled ? undefined : goToStep,\n activeStep,\n viewedSteps,\n completedSteps,\n allowSkip,\n direction,\n hideLabels,\n showCompletedIcons\n }),\n [\n steps,\n stepCount,\n isControlled,\n goToPreviousStep,\n goToNextStep,\n goToStep,\n activeStep,\n viewedSteps,\n completedSteps,\n allowSkip,\n direction,\n hideLabels,\n showCompletedIcons\n ]\n )\n\n return <StepperContext value={value}>{children}</StepperContext>\n}\n\nexport const useStepper = (): Context => {\n const context = React.use(StepperContext)\n if (!context)\n throw new Error(\n 'Ensure that you wrap any components with the root component Stepper'\n )\n\n return context\n}\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { useStepper } from './Stepper.context'\nimport type { StepperNavigateProps } from './types'\n\nexport const StepperStepBack = ({\n label,\n children,\n ...rest\n}: StepperNavigateProps & React.ComponentProps<typeof Button>) => {\n const { activeStep, goToPreviousStep } = useStepper()\n return (\n <Button\n size=\"sm\"\n appearance=\"outline\"\n {...rest}\n disabled={activeStep === 0}\n onClick={goToPreviousStep}\n >\n {children || label?.(activeStep)}\n </Button>\n )\n}\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { useStepper } from './Stepper.context'\nimport type { StepperNavigateProps } from './types'\n\nexport const StepperStepForward = ({\n label,\n children,\n onClick,\n ...rest\n}: StepperNavigateProps & Partial<React.ComponentProps<typeof Button>>) => {\n const { goToNextStep, activeStep } = useStepper()\n\n const handleClick = () => {\n if (onClick) {\n return onClick(() => goToNextStep?.())\n }\n goToNextStep?.()\n }\n\n return (\n <Button size=\"sm\" {...rest} onClick={handleClick} className=\"ml-auto\">\n {children || label?.(activeStep)}\n </Button>\n )\n}\n","import { styled } from '../../styled'\n\nexport const StepperStepBullet = styled('div', {\n base: [\n 'flex',\n 'relative',\n 'p-2',\n 'justify-center',\n 'items-center',\n 'size-8',\n 'rounded-[50%]',\n 'border-0',\n 'bg-grey-200',\n 'z-1',\n 'flex-none'\n ],\n variants: {\n status: {\n default: ['bg-grey-200', 'text-grey-700'],\n active: ['bg-white', 'border-2', 'border-current', 'text-primary-900'],\n viewed: ['bg-white', 'border-2', 'border-grey-600', 'text-grey-1000'],\n completed: ['bg-primary-800', 'text-white'],\n reviewed: ['bg-primary-900', 'text-white'],\n success: ['bg-success', 'text-white']\n }\n }\n})\n","import { styled } from '../../styled'\n\nexport const StepperStepContainer = styled('div', {\n base: [\n 'flex',\n 'relative',\n 'font-body',\n 'font-semibold',\n 'text-md',\n 'items-center',\n 'not-last:after:absolute',\n \"not-last:after:content-['']\",\n 'focus-visible:outline-none'\n ],\n variants: {\n canInteract: {\n true: []\n },\n direction: {\n vertical: [\n 'flex-row',\n 'not-last:after:h-full',\n 'not-last:after:left-3.5',\n 'not-last:after:top-1/2',\n 'not-last:after:w-1',\n 'py-3'\n ],\n horizontal: [\n 'flex-col',\n 'not-last:after:h-1',\n 'not-last:after:left-1/2',\n 'not-last:after:top-3.5',\n 'not-last:after:w-full',\n 'px-2'\n ]\n },\n separator: {\n default: ['not-last:after:bg-grey-200'],\n active: ['not-last:after:bg-primary-800'],\n success: ['not-last:after:bg-success'],\n viewed: ['not-last:after:bg-grey-600']\n },\n status: {\n completed: [],\n active: [],\n default: [],\n viewed: [],\n success: [],\n reviewed: []\n }\n },\n compoundVariants: [\n {\n canInteract: true,\n status: 'completed',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:bg-primary-900',\n 'hover:first:text-white!',\n 'hover:last:text-primary-900'\n ]\n },\n {\n canInteract: true,\n status: 'active',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'viewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'reviewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!'\n ]\n }\n ]\n})\n","import { styled } from '../../styled'\nimport { Text } from '../text/Text'\n\nexport const StepperStepLabel = styled(Text, {\n base: ['font-semibold'],\n variants: {\n direction: {\n vertical: ['ml-3', 'text-left'],\n horizontal: ['mt-3', 'text-center']\n },\n status: {\n default: ['font-normal', 'text-grey-700'],\n active: ['text-primary-900'],\n viewed: ['text-grey-1000'],\n completed: ['text-primary-800'],\n success: ['text-success'],\n reviewed: []\n }\n }\n})\n","export enum Status {\n ACTIVE = 'active',\n VIEWED = 'viewed',\n SUCCESS = 'success',\n DEFAULT = 'default',\n COMPLETED = 'completed',\n REVIEWED = 'reviewed'\n}\nexport interface Step {\n label?: string\n status: `${Status}`\n}\n\nexport type Direction = 'vertical' | 'horizontal'\n\nexport type Context = {\n steps: Step[]\n goToPreviousStep?: () => void\n goToNextStep?: () => void\n goToStep?: (index: number) => void\n activeStep: number\n viewedSteps: number[]\n completedSteps: number[]\n allowSkip?: boolean\n direction?: Direction\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport type StepperProviderProps = {\n stepCount: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps: Step[]\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport interface StepperProps {\n className?: string\n stepCount?: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps?: Step[]\n hideLabels?: boolean\n showCompletedIcons?: boolean\n}\n\nexport interface StepperNavigateProps {\n label?: (currentStep?: number) => string\n onClick?: (next: () => void) => void\n}\n\nexport interface StepperStepsProps {\n className?: string\n}\n","import { Ok } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useStepper } from './Stepper.context'\nimport { StepperStepBullet } from './StepperStepBullet'\nimport { StepperStepContainer } from './StepperStepContainer'\nimport { StepperStepLabel } from './StepperStepLabel'\nimport { type StepperStepsProps, Status } from './types'\n\nconst StepperStepsContainer = styled('div', {\n base: ['flex', 'justify-between'],\n variants: {\n direction: {\n vertical: ['flex-col'],\n horizontal: ['flex-row']\n }\n }\n})\n\nexport const StepperSteps = ({ className }: StepperStepsProps) => {\n const {\n steps,\n goToStep,\n activeStep,\n viewedSteps,\n allowSkip,\n direction,\n hideLabels,\n completedSteps,\n showCompletedIcons\n } = useStepper()\n\n // `viewedSteps`/`completedSteps` are scanned once per step below; Set lookups\n // keep the per-step status checks O(1) instead of O(steps).\n const viewedStepsSet = new Set(viewedSteps)\n const completedStepsSet = new Set(completedSteps)\n\n const getBulletStatus = (index: number) => {\n const activeBullet = steps[index]\n\n if (activeBullet.status) return activeBullet.status\n if (completedSteps.length === steps.length) return Status.SUCCESS\n if (activeStep === index && completedStepsSet.has(activeStep))\n return Status.REVIEWED\n if (activeStep === index) return Status.ACTIVE\n if (completedStepsSet.has(index)) return Status.COMPLETED\n if (viewedStepsSet.has(index)) return Status.VIEWED\n return Status.DEFAULT\n }\n\n const getSeparatorStatus = (index: number) => {\n const bulletStatus = steps[index]?.status\n\n if (completedSteps.length === steps.length) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.SUCCESS) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.COMPLETED || index < Math.max(...viewedSteps)) {\n return Status.ACTIVE\n }\n\n if (bulletStatus === Status.VIEWED) {\n return Status.VIEWED\n }\n\n return Status.DEFAULT\n }\n\n return (\n <StepperStepsContainer className={className} direction={direction}>\n {steps.map((step, index) => {\n const bulletStatus = getBulletStatus(index)\n const separatorStatus = getSeparatorStatus(index)\n\n return (\n <StepperStepContainer\n tabIndex={0}\n // Steps are a fixed, index-addressed list (activeStep/viewedSteps/\n // goToStep all key off the index) that never reorders, so the index\n // is the stable identity here.\n // eslint-disable-next-line react/no-array-index-key\n key={`step_${index}`}\n direction={direction}\n separator={separatorStatus}\n status={bulletStatus}\n style={{ '--steps': steps.length || 0 }}\n className={\n direction === 'horizontal'\n ? 'w-[calc(100%/var(--steps))]'\n : 'h-[calc(100%/var(--steps))]'\n }\n canInteract={allowSkip}\n >\n <StepperStepBullet\n as={allowSkip ? 'button' : 'div'}\n onClick={() =>\n allowSkip && viewedStepsSet.has(index)\n ? goToStep?.(index)\n : undefined\n }\n status={bulletStatus}\n aria-current={index === activeStep ? 'step' : undefined}\n aria-label={!step.label ? `step ${index + 1}` : ''}\n aria-labelledby={step.label ? `step-${index}` : undefined}\n className={\n allowSkip && viewedStepsSet.has(index)\n ? 'cursor-pointer'\n : 'cursor-auto'\n }\n >\n {step.status === Status.SUCCESS ||\n (showCompletedIcons && bulletStatus === Status.COMPLETED) ? (\n <Icon is={Ok} />\n ) : (\n index + 1\n )}\n </StepperStepBullet>\n\n {step.label && !hideLabels && (\n <StepperStepLabel\n as=\"span\"\n id={`step-${index}`}\n direction={direction}\n status={bulletStatus}\n >\n {step.label}\n </StepperStepLabel>\n )}\n </StepperStepContainer>\n )\n })}\n </StepperStepsContainer>\n )\n}\n","import * as React from 'react'\nimport invariant from 'tiny-invariant'\n\nimport { cn } from '../../styled'\nimport { StepperProvider } from './Stepper.context'\nimport { StepperStepBack } from './StepperStepBack'\nimport { StepperStepForward } from './StepperStepForward'\nimport { StepperSteps } from './StepperSteps'\nimport type { StepperProps } from './types'\n\nconst StepperComponent = ({\n children,\n stepCount,\n allowSkip,\n onComplete,\n onStepChange,\n direction = 'horizontal',\n steps,\n hideLabels = false,\n showCompletedIcons = false,\n className\n}: React.PropsWithChildren<StepperProps>) => {\n invariant(\n !(stepCount && steps),\n '`Stepper` should only be given one of `stepCount` or `steps`. When both are provided, `steps` will be used and `stepCount` will be ignored.'\n )\n\n const count = steps?.length || stepCount || 0\n\n return (\n <StepperProvider\n stepCount={count}\n allowSkip={allowSkip}\n onComplete={onComplete}\n onStepChange={stepCount ? onStepChange : undefined}\n direction={direction}\n steps={steps || Array(count).fill('')}\n hideLabels={hideLabels}\n showCompletedIcons={showCompletedIcons}\n >\n <div aria-label=\"progress\" className={cn('w-full', className)}>\n {children}\n </div>\n </StepperProvider>\n )\n}\n\nexport const Stepper = /* @__PURE__ */ Object.assign(StepperComponent, {\n StepBack: StepperStepBack,\n StepForward: StepperStepForward,\n Steps: StepperSteps\n})\n\nStepperComponent.displayName = 'Stepper'\n","import * as RadixSwitch from '@radix-ui/react-switch'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledSwitch = styled(RadixSwitch.Root, {\n base: [\n 'appearance-none',\n 'bg-grey-600',\n 'border-none',\n 'rounded-full',\n 'cursor-pointer',\n 'flex',\n 'overflow-hidden',\n 'relative',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'hover:bg-grey-700',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:hover:bg-primary-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n md: ['p-0.5', 'w-10'],\n lg: ['p-1', 'w-16']\n }\n }\n})\n\nconst StyledThumb = styled(RadixSwitch.Thumb, {\n base: [\n 'bg-white',\n 'rounded-full',\n 'block',\n 'transition-transform',\n 'duration-50',\n 'will-change-transform'\n ],\n variants: {\n size: {\n md: ['data-[state=checked]:translate-x-5', 'size-4'],\n lg: ['data-[state=checked]:translate-x-8', 'size-6']\n }\n }\n})\n\ntype SwitchProps = React.ComponentProps<typeof StyledSwitch>\n\nexport const Switch = ({ size = 'md', ...rest }: SwitchProps) => (\n <StyledSwitch size={size} {...rest}>\n <StyledThumb size={size} />\n </StyledSwitch>\n)\n\nSwitch.displayName = 'Switch'\n","import { Content } from '@radix-ui/react-tabs'\n\nimport { styled } from '../../styled'\n\nconst StyledTabsContent = styled(Content, {\n base: ['grow', 'font-body']\n})\n\nexport const TabsContent = StyledTabsContent\n\nTabsContent.displayName = 'TabsContent'\n","import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\n\nconst StyledTabsTriggerHoverBackground = styled('div', {\n base: [\n 'absolute',\n 'inset-0',\n 'h-[calc(100%+2px)]',\n 'opacity-0',\n 'bg-(--interactive-1)'\n ]\n})\n\nconst StyledTabsTrigger = styled(Trigger, {\n base: [\n 'bg-none',\n 'cursor-pointer',\n 'shrink-0',\n 'p-4',\n 'select-none',\n 'border-b-2',\n 'border-b-transparent',\n 'relative',\n 'data-[state=active]:border-current',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:text-(--interactive-1)',\n 'data-[state=active]:tracking-[-0.005em]',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:text-(--interactive-3)',\n 'not-disabled:focus-visible:[&_div]:opacity-7',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:text-(--interactive-2)',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:[&_div]:opacity-7',\n 'not-disabled:hover:text-(--interactive-2)'\n ]\n})\n\nexport const TabsTrigger = ({\n ref,\n children,\n ...rest\n}: React.ComponentProps<typeof StyledTabsTrigger> & { value: string }) => (\n <StyledTabsTrigger {...rest} ref={ref}>\n <Text size=\"sm\" as=\"span\">\n {children}\n </Text>\n <StyledTabsTriggerHoverBackground />\n </StyledTabsTrigger>\n)\n","import { useCallback, useRef, useSyncExternalStore } from 'react'\nimport { debounce, throttle } from 'throttle-debounce'\n\ntype UseScrollPositionOptions = {\n element?: HTMLElement | null\n delay?: number\n delayMethod?: 'throttle' | 'debounce'\n}\n\ntype UseScrollPositionOutput = {\n left: number\n top: number\n}\n\nconst NO_ELEMENT_SNAPSHOT: UseScrollPositionOutput = { left: 0, top: 0 }\n\n// useSyncExternalStore rather than event-listener + setState: the position is\n// correct from the very first render (an already-scrolled element must not\n// report {0,0} until its next scroll event), the trailing throttle/debounce\n// invocation is cancelled on unsubscribe (no state updates after unmount),\n// and reads can't tear under concurrent rendering.\nexport const useScrollPosition = ({\n element,\n delay = 500,\n delayMethod = 'throttle'\n}: UseScrollPositionOptions): UseScrollPositionOutput => {\n const snapshotRef = useRef<UseScrollPositionOutput | null>(null)\n\n const subscribe = useCallback(\n (onStoreChange: () => void) => {\n if (!element) return () => undefined\n\n const delayMethodFn = delayMethod === 'debounce' ? debounce : throttle\n const handleScroll = delayMethodFn(delay, onStoreChange)\n\n element.addEventListener('scroll', handleScroll)\n\n return () => {\n handleScroll.cancel()\n element.removeEventListener('scroll', handleScroll)\n }\n },\n [element, delay, delayMethod]\n )\n\n // Snapshots must be referentially stable between store changes, so cache\n // the object and only replace it when the underlying values move.\n const getSnapshot = () => {\n if (!element) return NO_ELEMENT_SNAPSHOT\n\n const prev = snapshotRef.current\n if (\n !prev ||\n prev.left !== element.scrollLeft ||\n prev.top !== element.scrollTop\n ) {\n snapshotRef.current = {\n left: element.scrollLeft,\n top: element.scrollTop\n }\n }\n return snapshotRef.current as UseScrollPositionOutput\n }\n\n return useSyncExternalStore(subscribe, getSnapshot, () => NO_ELEMENT_SNAPSHOT)\n}\n","import { useCallback, useMemo, useState } from 'react'\n\nimport { useResizeObserver } from './useResizeObserver'\n\ninterface Size {\n width: number | undefined\n height: number | undefined\n}\n\nexport const useSize = ({\n element,\n delay = 500\n}: {\n element?: HTMLElement | null\n delay?: number\n}): Size => {\n const [size, setSize] = useState<Size>({\n width: undefined,\n height: undefined\n })\n\n const handleResize = useCallback(() => {\n const width = element?.clientWidth\n const height = element?.clientHeight\n setSize((prev) =>\n prev.width === width && prev.height === height ? prev : { width, height }\n )\n }, [element])\n\n const elements = useMemo(() => [element], [element])\n\n useResizeObserver({\n delay,\n elements: elements,\n onResize: handleResize\n })\n\n return size\n}\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport { List } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { useScrollPosition } from '../../utilities/hooks/useScrollPosition'\nimport { useSize } from '../../utilities/hooks/useSize'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContainer = styled(ColorScheme, {\n base: ['relative', 'border-b', 'border-b-(--base-4)', 'w-full']\n})\n\nconst StyledTriggerList = styled(List, {\n base: ['shrink-0', 'flex', 'w-full', 'overflow-x-auto', 'scrollbar-none']\n})\n\nconst StyledChevronActionIcon = styled(ActionIcon, {\n base: [\n 'h-full!',\n 'absolute',\n 'top-1/2',\n '-translate-y-1/2',\n 'cursor-pointer',\n 'bg-(--base-1)!',\n 'text-(--interactive-1)!',\n 'rounded-none',\n 'opacity-90'\n ]\n})\n\nconst SCROLL_STEP = 0.8 // Used to scroll 80% of clientWidth\n\nexport const TabsTriggerList = ({\n children,\n colorScheme = {},\n ...rest\n}: React.ComponentProps<typeof StyledTriggerList> & {\n colorScheme?: TcolorScheme\n}) => {\n const [listRef, setListRefCallback] = useCallbackRefState()\n\n const { width } = useSize({ element: listRef, delay: 500 })\n const { left } = useScrollPosition({\n element: listRef,\n delay: 100,\n delayMethod: 'debounce'\n })\n\n const canScrollXAxis = React.useMemo(() => {\n if (!listRef) return false\n return listRef.scrollWidth > listRef.clientWidth\n }, [width, listRef])\n\n const canScrollLeft = React.useMemo(() => {\n if (!canScrollXAxis) return false\n return left > 0\n }, [left, canScrollXAxis])\n\n const canScrollRight = React.useMemo(() => {\n if (!listRef || !canScrollXAxis) return false\n return listRef.scrollWidth - left - listRef.clientWidth > 1 // 1 rather than 0 to account for sub-pixel widths and calculations\n }, [listRef, left, canScrollXAxis])\n\n const scrollList = React.useCallback(\n (stepModifier) => {\n if (!listRef) return\n listRef.scroll({\n left: listRef.scrollLeft + listRef.clientWidth * stepModifier,\n behavior: 'smooth'\n })\n },\n [listRef]\n )\n\n return (\n <StyledContainer\n base=\"grey1\"\n accent=\"primary1\"\n interactive=\"hiContrast\"\n {...colorScheme}\n {...rest}\n >\n <StyledTriggerList ref={setListRefCallback}>{children}</StyledTriggerList>\n\n {canScrollLeft && (\n <StyledChevronActionIcon\n label=\"scroll left\"\n size=\"md\"\n onClick={() => scrollList(-SCROLL_STEP)}\n tabIndex={-1}\n className=\"left-0\"\n >\n <Icon is={ChevronLeft} />\n </StyledChevronActionIcon>\n )}\n\n {canScrollRight && (\n <StyledChevronActionIcon\n label=\"scroll right\"\n size=\"md\"\n onClick={() => scrollList(SCROLL_STEP)}\n tabIndex={-1}\n className=\"right-0\"\n >\n <Icon is={ChevronRight} />\n </StyledChevronActionIcon>\n )}\n </StyledContainer>\n )\n}\n\nTabsTriggerList.displayName = 'TabsTriggerList'\n","import { Root } from '@radix-ui/react-tabs'\n\nimport { styled } from '../../styled'\nimport { TabsContent } from './TabsContent'\nimport { TabsTrigger } from './TabsTrigger'\nimport { TabsTriggerList } from './TabsTriggerList'\n\n// Non-polymorphic: Root is a Radix behavioural primitive, so retargeting it\n// via `as` would discard its keyboard/aria handling. This also gives the\n// component a single call signature, so React.ComponentProps infers cleanly\n// from the Object.assign intersection without a hand-written interface.\nconst StyledRoot = styled(\n Root,\n {\n base: ['w-full']\n },\n { enablePolymorphism: false }\n)\n\nexport const Tabs = /* @__PURE__ */ Object.assign(StyledRoot, {\n TriggerList: TabsTriggerList,\n Trigger: TabsTrigger,\n Content: TabsContent,\n displayName: 'Tabs'\n})\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const Textarea = styled(\n 'textarea',\n {\n base: [\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'box-border',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n 'text-md',\n 'leading-[1.4]',\n 'm-0',\n 'min-h-24',\n 'px-3',\n 'py-3',\n 'resize-y',\n 'w-full',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n }\n },\n defaultVariants: {\n appearance: 'standard'\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n },\n { enablePolymorphism: false }\n)\n\nexport type TextareaProps = React.ComponentProps<typeof Textarea>\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { Textarea, type TextareaProps } from '../textarea/Textarea'\n\ntype TextareaFieldProps = TextareaProps & FieldElementWrapperProps\n\nexport const TextareaField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: TextareaFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Textarea\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nTextareaField.displayName = 'TextareaField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\nimport { Tile } from '../tile/Tile'\n\nconst StyledTileInteractive = styled(Tile, {\n base: [\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--base-2)',\n 'not-disabled:after:absolute',\n 'not-disabled:after:duration-250',\n 'not-disabled:after:ease-out',\n 'not-disabled:after:inset-0',\n 'not-disabled:after:opacity-0',\n 'not-disabled:after:pointer-events-none',\n 'not-disabled:after:rounded-[inherit]',\n 'not-disabled:after:shadow-lg',\n 'not-disabled:after:transition-opacity',\n 'not-disabled:cursor-pointer',\n 'not-disabled:duration-250',\n 'not-disabled:ease-in',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:after:opacity-100',\n 'not-disabled:hover:-translate-y-0.5',\n 'not-disabled:transition-transform',\n 'not-disabled:translate-y-0'\n ]\n})\n\ntype TileInteractiveProps = Override<\n React.ComponentProps<typeof StyledTileInteractive> &\n React.ButtonHTMLAttributes<HTMLButtonElement> & {\n href?: string\n reloadDocument?: boolean\n },\n { as?: React.ElementType }\n>\n\nexport const TileInteractive = ({\n ref,\n onClick,\n href,\n type = 'button',\n as,\n reloadDocument,\n ...rest\n}: TileInteractiveProps) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n const isLink = !!href\n const elementSpecificProps = isLink\n ? {\n as: as || routerLinkProps.as || 'a',\n href,\n onClick: undefined\n }\n : {\n as: as || 'button',\n type,\n onClick\n }\n\n return <StyledTileInteractive {...rest} {...elementSpecificProps} ref={ref} />\n}\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { TileInteractive } from '../tile-interactive/TileInteractive'\n\nconst StyledTileToggleGroupItem = styled(TileInteractive, {\n base: [\n 'text-left',\n 'not-disabled:data-[state=on]:active:bg-(--interactive-3)',\n 'not-disabled:data-[state=on]:hover:bg-(--interactive-2)',\n 'data-[state=on]:before:-inset-px',\n 'data-[state=on]:before:absolute',\n 'data-[state=on]:before:rounded-[inherit]',\n 'data-[state=on]:before:inset-shadow-[var(--accent-8)_0px_0px_0px_2px]',\n 'data-[state=on]:before:z-1',\n 'data-[state=on]:bg-(--interactive-1)',\n 'data-[state=on]:border-(--accent-8)'\n ]\n})\n\ntype TileToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> &\n React.ComponentProps<typeof StyledTileToggleGroupItem>\n\nexport const TileToggleGroupItem = ({\n children,\n ...rest\n}: TileToggleGroupItem) => (\n <ToggleGroup.Item {...rest} asChild>\n <StyledTileToggleGroupItem as=\"button\">\n {children}\n </StyledTileToggleGroupItem>\n </ToggleGroup.Item>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { ToggleGroup } from '../../utilities/radix-overrides/toggle-group'\n\ntype TileToggleGroupRootProps = React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const TileToggleGroupRoot = ({\n ref,\n orientation,\n className,\n ...rest\n}: TileToggleGroupRootProps) => (\n <ToggleGroup.Root\n ref={ref}\n {...rest}\n className={cn(\n 'flex',\n 'gap-2',\n orientation === 'horizontal' && 'flex-row',\n orientation === 'vertical' && 'flex-col',\n 'flex-wrap',\n className\n )}\n />\n)\n","import { TileToggleGroupItem } from './TileToggleGroupItem'\nimport { TileToggleGroupRoot } from './TileToggleGroupRoot'\n\ntype TileToggleGroup = typeof TileToggleGroupRoot & {\n Item: typeof TileToggleGroupItem\n}\n\nexport const TileToggleGroup = TileToggleGroupRoot as TileToggleGroup\nTileToggleGroup.Item = TileToggleGroupItem\n","import * as React from 'react'\nimport type { Toast } from 'react-hot-toast'\n\nexport const ToastContext = React.createContext<Pick<\n Toast,\n 'type' | 'id' | 'message'\n> | null>(null)\n\nexport const useToastContext = () => {\n const context = React.use(ToastContext)\n\n if (!context) {\n throw new Error('useToastContext must be used within a ToastProvider')\n }\n\n return context\n}\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { toast } from 'react-hot-toast'\n\nimport { cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { useToastContext } from './Toast.context'\n\nexport interface ToastCloseButtonProps extends Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'label' | 'children'\n> {\n onDismiss?: () => void\n label?: string\n}\n\nexport const ToastCloseButton = ({\n onDismiss,\n label = 'Close alert',\n ...rest\n}: ToastCloseButtonProps) => {\n const { id } = useToastContext()\n\n return (\n <ActionIcon\n label={label}\n onClick={() => {\n toast.dismiss(id)\n onDismiss?.()\n }}\n {...rest}\n className={cn(\n 'text-white',\n '-mr-2',\n 'hover:opacity-80',\n 'hover:text-white',\n 'focus:opacity-80',\n 'focus:text-white'\n )}\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n}\n","import * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const ToastIcon = (props: React.ComponentProps<typeof Icon>) => (\n <Icon size=\"sm\" {...props} className=\"mr-3 flex-[0_0_auto]\" />\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useToastContext } from './Toast.context'\nimport { ToastCloseButton } from './ToastCloseButton'\nimport { ToastIcon } from './ToastIcon'\n\nexport const StyledToast = styled('div', {\n base: [\n 'flex',\n 'items-center',\n 'pointer-events-auto',\n 'rounded-md',\n 'shadow-md',\n 'box-border',\n 'text-white',\n 'min-h-12',\n 'relative',\n 'px-4',\n 'py-1',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[colors,transform]'\n ],\n variants: {\n type: {\n loading: ['bg-info'],\n blank: ['bg-info'],\n success: ['bg-success'],\n error: ['bg-danger']\n }\n }\n})\n\nconst ToastComponent = (props: React.ComponentProps<typeof StyledToast>) => {\n const { type } = useToastContext()\n const styledType = type === 'custom' ? undefined : type\n return <StyledToast type={props.type || styledType} {...props} />\n}\n\nexport const Toast = /* @__PURE__ */ Object.assign(ToastComponent, {\n Icon: ToastIcon,\n Close: ToastCloseButton\n})\n","import { Error } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useToaster } from 'react-hot-toast'\n\nimport { styled } from '../../styled'\nimport { Spacer } from '../spacer/Spacer'\nimport { Text } from '../text/Text'\nimport { Toast } from './Toast'\nimport { ToastContext } from './Toast.context'\n\nexport { toast } from 'react-hot-toast'\nexport { useToastContext } from './Toast.context'\n\nconst ToastProviderBase = /* @__PURE__ */ styled('div', {\n base: [\n 'fixed',\n 'z-2147483647',\n 'inset-safe-offset-2',\n 'pointer-events-none',\n 'sm:top-safe-offset-3'\n ]\n})\n\nconst ToastWrapper = /* @__PURE__ */ styled('div', {\n base: [\n 'absolute',\n 'w-full',\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'box-border',\n 'min-h-12',\n '[--slide-opacity-out:0]',\n '[--slide-direction-out-y:-100%]'\n ],\n variants: {\n visible: {\n true: ['motion-safe:animate-slide-direction-in'],\n false: ['opacity-0', 'motion-safe:animate-slide-direction-out']\n }\n }\n})\n\nexport const ToastProvider = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => {\n const { toasts, handlers } = useToaster()\n const { startPause, endPause, calculateOffset, updateHeight } = handlers\n\n return (\n <>\n <ToastProviderBase\n onMouseEnter={startPause}\n onMouseLeave={endPause}\n className={className}\n >\n {toasts.map((toast) => {\n const { message: children } = toast\n\n const offset = calculateOffset(toast, {\n reverseOrder: true,\n gutter: 8\n })\n\n const ref = (el: HTMLDivElement | null) => {\n if (el && toast.height === undefined) {\n updateHeight(toast.id, el.getBoundingClientRect().height)\n }\n }\n\n return (\n <ToastWrapper\n key={toast.id}\n ref={ref}\n visible={toast.visible}\n role={toast.ariaProps.role}\n aria-live={toast.ariaProps['aria-live']}\n style={{ '--offset': `${offset}px` }}\n className=\"top-(--offset)\"\n >\n <ToastContext value={toast}>\n {typeof children === 'function' ? (\n children(toast)\n ) : React.isValidElement(children) ? (\n children\n ) : (\n <Toast className=\"w-100\">\n {toast.type === 'error' && <Toast.Icon is={Error} />}\n <Text>{children}</Text>\n <Spacer />\n <Toast.Close />\n </Toast>\n )}\n </ToastContext>\n </ToastWrapper>\n )\n })}\n </ToastProviderBase>\n {children}\n </>\n )\n}\n\nToastProvider.displayName = 'ToastProvider'\n","import { Toast as ToastBase } from './Toast'\nimport { ToastProvider } from './ToastProvider'\n\nexport { toast } from './ToastProvider'\n\n// Assembled here rather than in Toast.tsx: ToastProvider imports Toast to\n// render it, so attaching Provider inside Toast.tsx would create a circular\n// import whose init order depends on the entry module. This module sits\n// above both files in the import graph, so no cycle.\nexport const Toast = /* @__PURE__ */ Object.assign(ToastBase, {\n Provider: ToastProvider\n})\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\n\nimport { styled } from '../../styled'\n\nexport const standardVariant = [\n 'before:bg-grey-600',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'text-grey-800',\n 'data-[state=on]:border-current!',\n 'data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'data-[state=on]:text-primary-800',\n 'not-disabled:data-[state=on]:before:bg-none',\n 'not-disabled:focus-visible:before:bg-none',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:before:bg-none',\n 'not-disabled:hover:border-current!',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const modernVariant = [\n 'bg-grey-200',\n 'border-0',\n 'text-grey-800',\n 'overflow-hidden',\n 'rounded-md',\n 'data-[state=on]:bg-white',\n 'data-[state=on]:border!',\n 'data-[state=on]:border-grey-200!',\n 'data-[state=on]:shadow-none!',\n 'data-[state=on]:text-grey-900',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px_white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const ToggleGroupItem = styled(\n ToggleGroup.Item,\n {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n defaultVariants: {\n theme: 'standard'\n }\n },\n { enablePolymorphism: false }\n)\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { modernVariant, standardVariant } from './ToggleGroupItem'\n\nexport const StyledButton = styled(\n ToggleGroup.Item,\n {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'grow',\n 'flex',\n 'items-center',\n 'justify-center',\n 'font-semibold',\n 'leading-none',\n 'py-1'\n ],\n variants: {\n size: {\n sm: ['*:not-last:mr-2', 'min-h-8', 'px-4', 'text-sm'],\n md: ['*:not-last:mr-3', 'min-h-10', 'px-8', 'text-md'],\n lg: ['*:not-last:mr-3', 'min-h-12', 'px-8', 'text-lg']\n },\n isIconOnly: {\n true: []\n },\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n compoundVariants: [\n {\n isIconOnly: true,\n size: 'sm',\n class: ['min-w-8', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'sm',\n theme: 'modern',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n theme: 'modern',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n theme: 'modern',\n class: ['min-w-15', 'p-0']\n }\n ]\n },\n { enableResponsiveVariants: true }\n)\n\nexport const ToggleGroupButton = ({\n ref,\n size = 'md',\n theme = 'standard',\n children,\n ...rest\n}: React.ComponentProps<typeof StyledButton>) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n const isIconOnly =\n isSingleChild &&\n React.isValidElement(childrenArray[0]) &&\n childrenArray[0]?.type === Icon\n\n return (\n <StyledButton\n ref={ref}\n size={size}\n isIconOnly={isIconOnly}\n theme={theme}\n {...rest}\n >\n {\n childrenArray.map((child) => {\n if (\n !isSingleChild &&\n (typeof child === 'string' || typeof child === 'number')\n )\n return <span key={child}>{child}</span>\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n )\n ) {\n if (child?.type === Icon)\n return React.cloneElement(child, { ...child.props, size })\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledButton>\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { ToggleGroup } from '../../utilities/radix-overrides/toggle-group'\n\ntype RootType = {\n orientation?: 'horizontal' | 'vertical'\n isFullWidth?: boolean\n gap?: 0 | 1 | 2 | 3\n wrap?: boolean\n}\n\nexport const StyledRoot = styled(ToggleGroup.Root, {\n base: ['w-fit'],\n variants: {\n isFullWidth: {\n true: [\n '**:data-radix-collection-item:basis-0',\n '**:data-radix-collection-item:grow',\n 'w-full'\n ],\n false: ['w-auto']\n },\n hasGap: {\n true: ['**:data-radix-collection-item:rounded-md'],\n false: [\n '**:data-radix-collection-item:not-last:before:absolute',\n \"**:data-radix-collection-item:not-last:before:content-['']\",\n '**:data-radix-collection-item:relative',\n 'rounded-md'\n ]\n },\n direction: {\n column: [],\n row: []\n },\n theme: {\n standard: [],\n modern: ['bg-grey-200']\n }\n },\n compoundVariants: [\n {\n hasGap: false,\n direction: 'row',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-l-md',\n '**:data-radix-collection-item:last:rounded-r-md',\n '**:data-radix-collection-item:not-first:border-l-transparent',\n '**:data-radix-collection-item:not-last:before:h-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:before:right-0',\n '**:data-radix-collection-item:not-last:before:-top-px',\n '**:data-radix-collection-item:not-last:before:translate-x-3/2',\n '**:data-radix-collection-item:not-last:before:w-px',\n '**:data-radix-collection-item:not-last:border-r-transparent',\n '**:data-radix-collection-item:rounded-none'\n ]\n },\n {\n hasGap: false,\n direction: 'column',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-t-sm',\n '**:data-radix-collection-item:last:rounded-b-sm',\n '**:data-radix-collection-item:not-first:border-t-transparent',\n '**:data-radix-collection-item:not-last:before:bottom-0',\n '**:data-radix-collection-item:not-last:before:h-px',\n '**:data-radix-collection-item:not-last:before:-left-px',\n '**:data-radix-collection-item:not-last:before:translate-y-3/2',\n '**:data-radix-collection-item:not-last:before:w-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:border-b-transparent'\n ]\n },\n {\n hasGap: false,\n theme: 'modern',\n class: []\n },\n {\n hasGap: false,\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:bg-transparent',\n '**:data-radix-collection-item:rounded-none',\n 'bg-white'\n ]\n }\n ]\n})\n\nconst gapClassMap = {\n 0: 'gap-0.5',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3'\n}\n\nconst orientationToDirection = (orientation) =>\n orientation === 'horizontal' ? 'row' : 'column'\n\nexport const ToggleGroupRoot = ({\n ref,\n orientation = 'horizontal',\n gap,\n isFullWidth,\n children,\n theme = 'standard',\n wrap,\n ...rest\n}: React.ComponentProps<typeof StyledRoot> & RootType) => {\n const hasGap = typeof gap === 'number'\n const direction = orientationToDirection(orientation)\n\n return (\n <StyledRoot\n ref={ref}\n direction={direction}\n hasGap={hasGap}\n isFullWidth={isFullWidth}\n orientation={orientation}\n theme={theme}\n {...rest}\n >\n <div\n className={cn(\n 'flex',\n hasGap && gapClassMap[gap],\n orientation === 'horizontal' ? 'flex-row' : 'flex-col',\n wrap ? 'flex-wrap' : 'flex-nowrap'\n )}\n >\n {\n React.Children.toArray(children).map((child) => {\n if (React.isValidElement<{ theme?: typeof theme }>(child)) {\n return React.cloneElement(child, { ...child.props, theme })\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </div>\n </StyledRoot>\n )\n}\n","import { ToggleGroupButton as Button } from './ToggleGroupButton'\nimport { ToggleGroupItem as Item } from './ToggleGroupItem'\nimport { ToggleGroupRoot as Root } from './ToggleGroupRoot'\n\nexport const ToggleGroup = { Item, Button, Root }\n","import { useCallback, useRef, useSyncExternalStore } from 'react'\nimport { debounce, throttle } from 'throttle-debounce'\n\ntype UseWindowScrollPositionOptions = {\n delay?: number\n delayMethod?: 'throttle' | 'debounce'\n}\n\ntype UseWindowScrollPositionOutput = {\n x: number\n y: number\n}\n\nconst SERVER_SNAPSHOT: UseWindowScrollPositionOutput = { x: 0, y: 0 }\n\n// useSyncExternalStore rather than event-listener + setState: the position is\n// correct from the very first render (a mid-page mount must not report {0,0}\n// until the first scroll event), the trailing throttle/debounce invocation is\n// cancelled on unsubscribe (no state updates after unmount), and reads can't\n// tear under concurrent rendering.\nexport const useWindowScrollPosition = ({\n delay = 500,\n delayMethod = 'throttle'\n}: UseWindowScrollPositionOptions = {}): UseWindowScrollPositionOutput => {\n const snapshotRef = useRef<UseWindowScrollPositionOutput | null>(null)\n\n const subscribe = useCallback(\n (onStoreChange: () => void) => {\n const delayMethodFn = delayMethod === 'debounce' ? debounce : throttle\n const handleScroll = delayMethodFn(delay, onStoreChange)\n\n window.addEventListener('scroll', handleScroll)\n\n return () => {\n handleScroll.cancel()\n window.removeEventListener('scroll', handleScroll)\n }\n },\n [delay, delayMethod]\n )\n\n // Snapshots must be referentially stable between store changes, so cache\n // the object and only replace it when the underlying values move.\n const getSnapshot = () => {\n const prev = snapshotRef.current\n if (!prev || prev.x !== window.scrollX || prev.y !== window.scrollY) {\n snapshotRef.current = { x: window.scrollX, y: window.scrollY }\n }\n return snapshotRef.current as UseWindowScrollPositionOutput\n }\n\n return useSyncExternalStore(subscribe, getSnapshot, () => SERVER_SNAPSHOT)\n}\n","const light = {\n '--background': 'white',\n '--divider': 'var(--color-grey-200)',\n '--border-bottom': 'var(--color-grey-200)'\n}\n\nexport const colorSchemes = {\n light\n}\n","import * as React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\ntype TopBarActionIconProps = Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'size' | 'children'\n> & {\n icon: React.FC<React.SVGProps<SVGSVGElement>>\n label: string\n}\n\nexport const TopBarActionIcon = ({\n ref,\n icon,\n ...rest\n}: TopBarActionIconProps) => (\n <ActionIcon size=\"md\" appearance=\"simple\" theme=\"neutral\" ref={ref} {...rest}>\n <Icon is={icon} />\n </ActionIcon>\n)\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { Image } from '../image/Image'\nimport { Text } from '../text/Text'\n\nexport const TopBarBrandLogo = ({\n src,\n alt = 'Atom Learning logo',\n className\n}: Pick<React.ComponentProps<typeof Image>, 'src' | 'alt'> & {\n className?: string\n}) => (\n <Image\n src={src}\n alt={alt}\n className={cn('h-8', 'mr-3', 'w-auto', className)}\n />\n)\n\nexport const TopBarBrandName = styled(Text, {\n base: ['text-grey-800']\n})\n\nexport const TopBarBrand = styled('a', {\n base: [\n 'flex',\n 'items-center',\n 'no-underline',\n 'text-grey-800',\n 'hover:no-underline',\n 'focus:no-underline'\n ]\n})\n","import * as React from 'react'\n\nimport { styled, Theme } from '../../styled'\nimport { useWindowScrollPosition } from '../../utilities/hooks/useWindowScrollPosition'\nimport { Divider } from '../divider/Divider'\nimport { colorSchemes as topBarColorSchemes } from './TopBar.colorscheme.config'\nimport { TopBarActionIcon } from './TopBarActionIcon'\nimport { TopBarBrand, TopBarBrandLogo, TopBarBrandName } from './TopBarBrand'\n\nconst TopBarDivider = () => (\n <Divider orientation=\"vertical\" className=\"bg-divider h-6\" />\n)\n\nconst StyledRoot = styled(\n 'header',\n {\n base: [\n 'bg-(--background)',\n 'sticky',\n 'flex',\n 'items-center',\n 'z-15',\n 'transition-shadow',\n 'duration-200',\n 'ease-out'\n ],\n variants: {\n hasScrolled: {\n true: ['shadow-[0px_4px_4px_-2px_rgba(31,31,31,0.1)]']\n },\n size: {\n md: ['h-safe-offset-top-16', 'pt-safe'],\n lg: ['h-safe-offset-top-24', 'pt-safe']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n },\n appearance: {\n standard: [\n 'w-screen',\n 'max-w-full',\n 'top-safe',\n 'border-b',\n 'border-b-(--border-bottom)'\n ],\n rounded: [\n 'w-full',\n 'top-safe-offset-2',\n 'p-2',\n 'border',\n 'border-white',\n 'rounded-full'\n ]\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst Container = styled('div', {\n base: ['flex', 'items-center', 'h-10', 'mx-4', 'w-full', 'md:mx-8']\n})\n\ntype TopBarProps = React.ComponentProps<typeof StyledRoot> &\n React.ComponentProps<typeof Container> &\n React.ComponentProps<typeof Theme>\n\nconst TopBarComponent = ({\n size = 'md',\n diffused,\n theme,\n appearance = 'standard',\n ...rest\n}: React.PropsWithChildren<TopBarProps>) => {\n const { y: scrollPositionY } = useWindowScrollPosition()\n\n return (\n <Theme theme={theme || topBarColorSchemes['light']}>\n <StyledRoot\n hasScrolled={!!scrollPositionY}\n diffused={diffused}\n appearance={appearance}\n size={size}\n >\n <Container {...rest} />\n </StyledRoot>\n </Theme>\n )\n}\n\nexport const TopBar = /* @__PURE__ */ Object.assign(TopBarComponent, {\n Brand: TopBarBrand,\n BrandLogo: TopBarBrandLogo,\n BrandName: TopBarBrandName,\n ActionIcon: TopBarActionIcon,\n Divider: TopBarDivider\n})\n\nTopBarComponent.displayName = 'TopBar'\n","import * as React from 'react'\n// Note: Only loading vimeo to reduce the bundle size https://www.npmjs.com/package/react-player\nimport ReactPlayer from 'react-player/vimeo.js'\n\nimport { CSSWrapper } from '../../utilities/css-wrapper/CSSWrapper'\nimport type { Override } from '../../utilities/types'\n\ntype VideoProps = Override<\n React.ComponentProps<typeof ReactPlayer>,\n {\n id: string\n ratio?: number\n className?: string\n ref?: React.Ref<ReactPlayer>\n }\n>\n\nexport const Video = ({\n ref,\n id,\n ratio = 9 / 16,\n className,\n ...rest\n}: VideoProps) => (\n <CSSWrapper className={className}>\n <div\n style={{ '--ratio': `${ratio * 100}%` }}\n className=\"relative h-0 w-full overflow-hidden rounded-sm pt-(--ratio)\"\n >\n <ReactPlayer\n {...rest}\n role=\"figure\"\n url={`https://player.vimeo.com/video/${id}`}\n height=\"100%\"\n width=\"100%\"\n ref={ref}\n className=\"absolute top-0 left-0\"\n />\n </div>\n </CSSWrapper>\n)\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\n\ntype KeyboardEventWindowOrElement =\n | KeyboardEvent\n | React.KeyboardEvent<HTMLDivElement>\ntype ShortcutConfig = Partial<KeyboardEvent>\n\ntype KeyboardShortcutProps = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean\n config: {\n shortcut: ShortcutConfig\n action: ({\n event,\n shortcut\n }: {\n event: KeyboardEvent | React.KeyboardEvent<HTMLDivElement>\n shortcut: ShortcutConfig\n }) => void\n }[]\n targetWindow?: boolean\n onKeyDown?: (e: KeyboardEventWindowOrElement) => void\n ref?: React.Ref<HTMLDivElement>\n}\n\nexport const KeyboardShortcut = ({\n ref,\n asChild,\n config,\n targetWindow = false,\n onKeyDown,\n ...rest\n}: KeyboardShortcutProps) => {\n const handleOnKeydown = React.useCallback(\n (e: KeyboardEventWindowOrElement) => {\n config.forEach(({ shortcut, action }) => {\n if (Object.entries(shortcut).every(([key, value]) => e[key] === value))\n action({ event: e, shortcut })\n })\n onKeyDown?.(e)\n },\n [config, onKeyDown]\n )\n\n // Latest-ref so the window listener subscribes once — keyed on the handler\n // it would re-subscribe whenever an inline `config` array changes identity.\n const handleOnKeydownRef = React.useRef(handleOnKeydown)\n React.useLayoutEffect(() => {\n handleOnKeydownRef.current = handleOnKeydown\n })\n\n React.useEffect(() => {\n if (!targetWindow) return\n\n const listener = (e: KeyboardEvent) => handleOnKeydownRef.current(e)\n window.addEventListener('keydown', listener)\n\n return () => {\n window.removeEventListener('keydown', listener)\n }\n }, [targetWindow])\n\n const Component = asChild ? Slot : 'div'\n\n return (\n <Component\n onKeyDown={targetWindow ? undefined : handleOnKeydown}\n ref={ref}\n {...rest}\n />\n )\n}\n\nconst StyledKeyboardShortcutIndicator = /* @__PURE__ */ styled(Text, {\n base: [\n 'bg-grey-100',\n 'text-text-subtle',\n 'px-2',\n 'py-0.5',\n 'min-w-6',\n 'min-h-6',\n 'font-normal',\n 'inline-flex',\n 'justify-center',\n 'items-center',\n 'rounded-md',\n 'shrink-0',\n 'capsize-none'\n ]\n})\n\ntype KeyboardShortcutIndicatorProps = React.ComponentProps<\n typeof StyledKeyboardShortcutIndicator\n>\n\nexport const KeyboardShortcutIndicator = (\n props: KeyboardShortcutIndicatorProps\n) => {\n return <StyledKeyboardShortcutIndicator size=\"sm\" as=\"kbd\" {...props} />\n}\n","import {\n KeyboardShortcut as KeyboardShortcutComponent,\n KeyboardShortcutIndicator\n} from './KeyboardShortcut'\n\nexport const KeyboardShortcut = /* @__PURE__ */ Object.assign(\n KeyboardShortcutComponent,\n {\n Indicator: KeyboardShortcutIndicator\n }\n)\n","import * as React from 'react'\n\nimport { Tabs } from '../tabs/Tabs'\nimport type { SegmentedControlTheme } from './SegmentedControl.types'\nimport type { SegmentedControlRootProps } from './SegmentedControlRoot'\n\nexport interface SegmentedControlContextValue extends Pick<\n React.ComponentProps<typeof Tabs>,\n 'defaultValue' | 'value' | 'onValueChange'\n> {\n size: SegmentedControlRootProps['size']\n theme: SegmentedControlTheme\n}\n\nexport const SegmentedControlContext =\n React.createContext<SegmentedControlContextValue>({\n size: 'md',\n theme: 'primary',\n defaultValue: '',\n value: '',\n onValueChange: () => null\n })\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Badge } from '../badge/Badge'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst badgeSizeMap = {\n sm: 'xs',\n md: 'xs',\n lg: 'sm'\n}\n\nexport const SegmentedControlBadge = ({\n className,\n ...rest\n}: Omit<React.ComponentProps<typeof Badge>, 'size'>) => {\n const { size } = React.use(SegmentedControlContext)\n\n return (\n <Badge\n {...rest}\n size={badgeSizeMap[size as string]}\n className={cn('border-none', 'font-normal', className)}\n />\n )\n}\n","import * as React from 'react'\n\nimport { Tabs } from '../tabs/Tabs'\n\nexport const SegmentedControlContent = Tabs.Content\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst StyledText = styled(\n Text,\n {\n base: ['font-body', 'text-text-subtle', 'font-normal'],\n variants: {\n size: {\n sm: ['text-xs', 'leading-[1.6]'],\n md: ['text-sm', 'leading-[1.53]'],\n lg: ['text-md', 'leading-normal']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport const SegmentedControlDescription = (\n props: Omit<React.ComponentProps<typeof StyledText>, 'size'>\n) => {\n const { size } = React.use(SegmentedControlContext)\n\n return <StyledText {...props} size={size} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst StyledHeading = styled(\n Text,\n {\n base: ['font-body', 'text-text-regular'],\n variants: {\n size: {\n sm: ['text-sm', 'leading-[1.53]'],\n md: ['text-md', 'leading-normal'],\n lg: ['text-lg', 'leading-[1.52]']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport const SegmentedControlHeading = (\n props: Omit<React.ComponentProps<typeof StyledHeading>, 'size'>\n) => {\n const { size } = React.use(SegmentedControlContext)\n\n return <StyledHeading {...props} size={size} />\n}\n","import * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst sizeMap = {\n sm: 'sm',\n md: 'md',\n lg: 'md'\n}\n\nexport const SegmentedControlIcon = (\n props: Omit<React.ComponentProps<typeof Icon>, 'size'>\n) => {\n const { size } = React.use(SegmentedControlContext)\n\n return (\n <Icon\n {...(props as React.ComponentProps<typeof Icon>)}\n size={sizeMap[size as string]}\n />\n )\n}\n","import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst StyledItem = styled(\n Trigger,\n {\n base: [\n 'relative',\n 'bg-transparent',\n 'rounded-md',\n 'z-2',\n 'min-w-35',\n 'border-2',\n 'border-transparent',\n 'cursor-pointer',\n 'select-none',\n 'flex',\n 'flex-col',\n 'items-center',\n 'justify-center',\n 'data-[state=active]:border-2',\n 'data-[state=active]:border-transparent',\n 'data-[state=active]:focus-visible:border-primary-800',\n 'data-[state=active]:focus-visible:shadow-none',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:shadow-none',\n 'data-[state=active]:text-(--text-bold)',\n 'data-[state=inactive]:font-normal',\n 'data-[state=inactive]:text-grey-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'focus-visible:outline-none'\n ],\n variants: {\n theme: {\n primary: [\n 'data-[state=inactive]:hover:bg-primary-300',\n 'focus-visible:border-primary-800'\n ],\n marsh: [\n 'data-[state=inactive]:hover:bg-marsh-300',\n 'focus-visible:border-marsh-800'\n ]\n },\n size: {\n sm: ['flex-[unset]', 'gap-3', 'px-6', 'py-4'],\n md: ['flex-1', 'gap-4', 'px-4', 'py-6'],\n lg: ['flex-1', 'gap-4', 'px-4', 'py-6']\n }\n },\n defaultVariants: {\n size: 'md',\n theme: 'primary'\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport const SegmentedControlItem = ({\n ref,\n children,\n ...rest\n}: Omit<React.ComponentProps<typeof StyledItem>, 'size'>) => {\n const { size, theme } = React.use(SegmentedControlContext)\n\n return (\n <StyledItem {...rest} theme={theme} size={size} ref={ref}>\n {children}\n </StyledItem>\n )\n}\n","import { composeRefs } from '@radix-ui/react-compose-refs'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Tabs } from '../tabs/Tabs'\nimport { SegmentedControlContext } from './SegmentedControl.context'\nimport { SegmentedControlItem } from './SegmentedControlItem'\n\nconst StyledTriggerList = styled(Tabs.TriggerList, {\n base: [\n 'relative',\n 'p-1',\n 'rounded-lg',\n 'overflow-hidden',\n '[&>div[role=tablist]]:relative',\n '[&>button]:z-2'\n ],\n variants: {\n theme: {\n primary: ['bg-primary-200'],\n marsh: ['bg-marsh-200']\n }\n }\n})\n\nconst SelectionIndicator = styled('div', {\n base: ['absolute', 'bg-white', 'rounded-md'],\n variants: {\n interacted: {\n true: ['duration-300', 'ease-in', 'transition-all'],\n false: ['transition-none']\n }\n }\n})\n\nexport const SegmentedControlItemList = (\n props: React.ComponentProps<typeof Tabs.TriggerList>\n) => {\n const { theme, defaultValue, value } = React.use(SegmentedControlContext)\n\n const tabsRef = React.useRef<(HTMLElement | null)[]>([])\n\n const selectedIndex = React.Children.toArray(props.children).findIndex(\n (child) =>\n (\n child as React.ReactElement<\n React.ComponentProps<typeof SegmentedControlItem>\n >\n )?.props.value === value\n )\n\n const [indicatorStyles, setIndicatorStyles] = React.useState({\n left: 0,\n height: 0,\n width: 0\n })\n const [hasInteracted, setHasInteracted] = React.useState(false)\n\n const updateIndicatorPosition = React.useCallback(() => {\n const currentTab = tabsRef.current[selectedIndex]\n if (!currentTab) return\n\n const { width, height } = currentTab.getBoundingClientRect()\n setIndicatorStyles({\n left: Math.round(currentTab.offsetLeft),\n height: Math.round(height),\n width: Math.round(width)\n })\n }, [selectedIndex])\n\n // Latest-ref so the ResizeObserver and window listener subscribe once per\n // tab-count change instead of being torn down on every selection change\n // (updateIndicatorPosition's identity tracks selectedIndex).\n const updateIndicatorPositionRef = React.useRef(updateIndicatorPosition)\n React.useLayoutEffect(() => {\n updateIndicatorPositionRef.current = updateIndicatorPosition\n })\n\n const tabCount = React.Children.count(props.children)\n\n React.useEffect(() => {\n const resizeObserver = new ResizeObserver(() =>\n updateIndicatorPositionRef.current()\n )\n const currentTabs = tabsRef.current\n currentTabs.forEach((tab) => {\n if (tab) resizeObserver.observe(tab)\n })\n\n return () => {\n resizeObserver.disconnect()\n }\n }, [tabCount])\n\n React.useEffect(() => {\n const handleResize = () => updateIndicatorPositionRef.current()\n window.addEventListener('resize', handleResize)\n return () => {\n window.removeEventListener('resize', handleResize)\n }\n }, [])\n\n // Layout effect: the indicator must be measured and placed before paint,\n // or it appears at its old position for a frame and visibly jumps.\n React.useLayoutEffect(() => {\n updateIndicatorPosition()\n }, [selectedIndex, updateIndicatorPosition])\n\n return (\n <StyledTriggerList theme={theme} defaultValue={defaultValue} {...props}>\n <SelectionIndicator interacted={hasInteracted} style={indicatorStyles} />\n {React.Children.map(props.children, (child, index) => {\n if (\n !React.isValidElement<\n React.ComponentProps<typeof SegmentedControlItem>\n >(child)\n ) {\n throw new Error(\n `Child passed to SegmentedControlItemList is not a valid element`\n )\n }\n\n return React.cloneElement(child, {\n onClick: (e) => {\n setHasInteracted(true)\n if (child.props.onClick) child.props.onClick(e)\n },\n // Composed so a consumer-supplied ref on the item survives the\n // clone; the cleanup empties the slot when the item detaches.\n ref: composeRefs(\n (child.props as { ref?: React.Ref<HTMLElement> }).ref,\n (el: HTMLElement | null) => {\n tabsRef.current[index] = el\n return () => {\n tabsRef.current[index] = null\n }\n }\n )\n })\n })}\n </StyledTriggerList>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Tabs } from '../tabs/Tabs'\nimport { SegmentedControlContext } from './SegmentedControl.context'\nimport type { SegmentedControlTheme } from './SegmentedControl.types'\n\nconst StyledSegmentedControlRoot = styled(\n Tabs,\n {\n base: ['[&>div]:border-none'],\n variants: {\n size: {\n sm: ['w-[unset]!'],\n md: [],\n lg: []\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport interface SegmentedControlRootProps extends React.ComponentProps<\n typeof StyledSegmentedControlRoot\n> {\n theme?: SegmentedControlTheme\n}\n\nexport const SegmentedControlRoot = ({\n size,\n theme = 'primary',\n defaultValue,\n children,\n value,\n onValueChange,\n ...rest\n}: React.PropsWithChildren<SegmentedControlRootProps>) => {\n const isControlled = value !== undefined\n\n const [internalValue, setInternalValue] = React.useState(defaultValue)\n\n const currentValue = isControlled ? value : internalValue\n // Fire the consumer's `onValueChange` in BOTH modes; only own internal state\n // when uncontrolled. (Previously `isControlled ? onValueChange :\n // setInternalValue`, which silently dropped the consumer callback in\n // uncontrolled mode once `onValueChange` stopped leaking through `...rest`.)\n const handleValueChange = React.useCallback(\n (newValue: string) => {\n if (!isControlled) setInternalValue(newValue)\n onValueChange?.(newValue)\n },\n [isControlled, onValueChange]\n )\n\n const contextValue = React.useMemo(\n () => ({\n size,\n theme,\n defaultValue,\n onValueChange: handleValueChange,\n value: currentValue\n }),\n [size, theme, defaultValue, handleValueChange, currentValue]\n )\n\n return (\n <SegmentedControlContext value={contextValue}>\n <StyledSegmentedControlRoot\n size={size}\n value={currentValue}\n onValueChange={handleValueChange}\n {...rest}\n >\n {children}\n </StyledSegmentedControlRoot>\n </SegmentedControlContext>\n )\n}\n","import { SegmentedControlBadge } from './SegmentedControlBadge'\nimport { SegmentedControlContent } from './SegmentedControlContent'\nimport { SegmentedControlDescription } from './SegmentedControlDescription'\nimport { SegmentedControlHeading } from './SegmentedControlHeading'\nimport { SegmentedControlIcon } from './SegmentedControlIcon'\nimport { SegmentedControlItem } from './SegmentedControlItem'\nimport { SegmentedControlItemList } from './SegmentedControlItemList'\nimport { SegmentedControlRoot } from './SegmentedControlRoot'\n\nexport const SegmentedControl = {\n Root: SegmentedControlRoot,\n Item: SegmentedControlItem,\n Heading: SegmentedControlHeading,\n Description: SegmentedControlDescription,\n Icon: SegmentedControlIcon,\n Content: SegmentedControlContent,\n Badge: SegmentedControlBadge,\n ItemList: SegmentedControlItemList\n}\n","import * as React from 'react'\n\nimport type { FileDropContextValue } from './types'\n\nexport const FileDropContext = React.createContext<FileDropContextValue>({\n isDragging: false,\n files: []\n})\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { FileDropContext } from './FileDrop.context'\nimport { type FileDropContextValue } from './types'\n\ninterface FileDropProps extends Omit<\n React.ComponentProps<'div'>,\n 'onDrop' | 'ref' | 'children'\n> {\n onDrop: (files: File[]) => void\n children?:\n | React.ReactNode\n | ((value: FileDropContextValue) => React.ReactNode)\n accept?: React.InputHTMLAttributes<HTMLInputElement>['accept']\n multiple?: React.InputHTMLAttributes<HTMLInputElement>['multiple']\n}\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'flex-col',\n 'gap-6',\n 'items-center',\n 'border',\n 'border-dashed',\n 'border-grey-500',\n 'px-12',\n 'py-8',\n 'rounded-md',\n 'cursor-pointer',\n '**:pointer-events-none'\n ]\n})\n\nexport const FileDrop = ({\n children,\n accept,\n multiple,\n onDrop,\n ...rest\n}: FileDropProps) => {\n const [isDragging, setIsDragging] = React.useState(false)\n const [files, setFiles] = React.useState<File[]>([])\n const fileUploadInputRef = React.useRef<HTMLInputElement>(null)\n\n const handleDragOver = (event: React.DragEvent<HTMLDivElement>) => {\n event.preventDefault()\n setIsDragging(true)\n }\n\n const handleDragLeave = () => setIsDragging(false)\n\n const handleDrop = (fileList: FileList | null) => {\n if (!fileList) return\n\n setIsDragging(false)\n\n const files = [...fileList]\n onDrop(files)\n setFiles(files)\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if ('Space' === event.key || 'Enter' === event.key) {\n fileUploadInputRef.current?.click()\n }\n }\n\n // Memoized: consumers otherwise re-render at drag-over event frequency.\n const value = React.useMemo<FileDropContextValue>(\n () => ({ isDragging, files }),\n [isDragging, files]\n )\n\n return (\n <FileDropContext value={value}>\n <StyledContainer\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onDrop={(event) => {\n event.preventDefault()\n handleDrop(event.dataTransfer.files)\n }}\n onClick={() => fileUploadInputRef.current?.click()}\n // A drop zone wraps a file input and arbitrary (possibly interactive)\n // children, which a native <button> may not contain, so the button role\n // lives on this container instead.\n // eslint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"button\"\n onKeyDown={handleKeyDown}\n tabIndex={0}\n {...rest}\n >\n {typeof children === 'function' ? children(value) : children}\n <input\n type=\"file\"\n ref={fileUploadInputRef}\n style={{ visibility: 'hidden' }}\n accept={accept}\n multiple={multiple}\n onChange={(event) => {\n handleDrop(event.target.files)\n }}\n />\n </StyledContainer>\n </FileDropContext>\n )\n}\n\nFileDrop.displayName = 'FileDrop'\n","import * as React from 'react'\n\nimport { FileDropContext } from './FileDrop.context'\nimport type { FileDropContextValue } from './types'\n\nexport const useFileDrop = (): FileDropContextValue =>\n React.use(FileDropContext)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAQ,kBAAkB,SAAS;CACjD,MAAK;CACL,GAAI;WAHN;EAKE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GAAM,WAAU;aAAW;EAAc,CAAA;EACzC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAW,KAAO,CAAA;EAClB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAW,KAAO,CAAA;EAClB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAW,KAAO,CAAA;CACf;;;;AClCP,IAAa,eAAe,OAC1B,UACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,OAAO;GACL,SAAS;IACP;IACA;IACA;GACF;GACA,WAAW;IACT;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IACA;GACF;GACA,QAAQ;IACN;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IACA;GACF;EACF;EACA,YAAY;GACV,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,WAAW,EACT,MAAM;GAAC;GAAsB;GAAc;EAAqB,EAClE;EACA,WAAW;GACT,MAAM,CAAC,QAAQ;GACf,OAAO,CAAC,OAAO;EACjB;CACF;CACA,iBAAiB;EACf,YAAY;EACZ,MAAM;EACN,OAAO;CACT;AACF,GACA,EACE,0BAA0B,KAC5B,CACF;;AAIA,IAAM,wBAAwC,uBAC5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;IACA;IACA;IACA;IACA;GACF;EACF,GAAG;GACD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAEiC;EAAQ;CAA4B,CAAA;AACvE;;;AC7GA,IAAa,sBAA8C;CACzD,MAAM,UAAU,MAAM,IAAI,iBAAiB;CAE3C,IAAI,CAAC,SACH,MAAM,IAAI,MACR,2EACF;CAGF,OAAO;AACT;;;ACPA,IAAM,qBAAmB,OAAO,YAAY,EAC1C,MAAM,CAAC,QAAQ,qBAAqB,EACtC,CAAC;AAED,IAAa,wBACX,UACG;CACH,MAAM,EAAE,cAAc,QAAQ,sBAAsB,cAAc;CAIlE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,oBAAD;EACE,YAAY;EACZ,MAAK;EACL,OAAM;EACN,SAAS;EACT,UAAU,CARM;EAShB,GAAI;EACJ,OAAO,QAAQ,uBAAuB;YAEtC,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD,EAAM,IAAI,qBAAA,aAAe,CAAA;CACT,CAAA;AAEtB;;;AC1BA,IAAM,iBAAe,OAAO,UAAU;CACpC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,MAAM,EACJ,IAAI,CAAC,SAAS,EAChB;EACA,UAAU,EACR,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,EACF;EACA,WAAW,EACT,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;EACF,EACF;CACF;CACA,kBAAkB,CAChB;EACE,UAAU;EACV,WAAW;EACX,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF,CACF;AACF,CAAC;AAED,IAAa,kBAAkB,EAC7B,YACA,WACA,cACyB;CACzB,MAAM,EAAE,aAAa,UAAU,gBAA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AAA,EACT,CAAA;AAGnB,IAAa,iBAAiC,uBAAO,OACnD,yBACA;CACE,OAAO;CACP,aAAa;CACb,MAAM;CACN,SAAS;CACT,SAAS;CACT,SAAS;AACX,CACF;;;AC/FA,IAAM,eAAe,OACnB,UACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,MAAM;GACJ,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,OAAO,EACL,OAAO,CAAC,EACV;EACA,OAAO;GACL,OAAO,CAAC;GACR,MAAM,CAAC;EACT;EACA,YAAY;GACV,UAAU;IACR;IACA;IACA;IACA;IACA;GACF;GACA,QAAQ;IACN;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;CACF;CACA,kBAAkB;EAChB;GACE,OAAO;GACP,YAAY;GACZ,OAAO,CAAC,eAAe;EACzB;EACA;GACE,OAAO;GACP,YAAY;GACZ,OAAO,CAAC,mBAAmB,sBAAsB;EACnD;EACA;GACE,YAAY;GACZ,OAAO;GACP,OAAO,CAAC,UAAU;EACpB;EACA;GACE,YAAY;GACZ,OAAO;GACP,OAAO,CAAC,aAAa;EACvB;CACF;AACF,GACA;CAAE,oBAAoB;CAAO,0BAA0B;AAAK,CAC9D;AAeA,IAAa,UAAU,EACrB,KACA,aACA,UACA,OAAO,MACP,aAAa,YACb,GAAG,WACc;CAEjB,MAAM,QAAmD;EACvD;EACA;EACA;EACA,GAAG;CACL;CAEA,IAAI,CAAC,KAAK,OAAO,KAAK,YAAY,CAAC,CAAC,OAAO,UAAU,UAAU,KAAA,CAAS,GACtE,MAAM,eAAe;CAGvB,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,cAAD;EAAc,GAAI;YAAlB,CACG,eACC,iBAAA,G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ACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU,EACR,QAAQ;EACN,SAAS,CAAC,eAAe,eAAe;EACxC,QAAQ;GAAC;GAAY;GAAY;GAAkB;EAAkB;EACrE,QAAQ;GAAC;GAAY;GAAY;GAAmB;EAAgB;EACpE,WAAW,CAAC,kBAAkB,YAAY;EAC1C,UAAU,CAAC,kBAAkB,YAAY;EACzC,SAAS,CAAC,cAAc,YAAY;CACtC,EACF;AACF,CAAC;;;ACxBD,IAAa,uBAAuB,OAAO,OAAO;CAChD,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,aAAa,EACX,MAAM,CAAC,EACT;EACA,WAAW;GACT,UAAU;IACR;IACA;IACA;IACA;IACA;IACA;GACF;GACA,YAAY;IACV;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,WAAW;GACT,SAAS,CAAC,4BAA4B;GACtC,QAAQ,CAAC,+BAA+B;GACxC,SAAS,CAAC,2BAA2B;GACrC,QAAQ,CAAC,4BAA4B;EACvC;EACA,QAAQ;GACN,WAAW,CAAC;GACZ,QAAQ,CAAC;GACT,SAAS,CAAC;GACV,QAAQ,CAAC;GACT,SAAS,CAAC;GACV,UAAU,CAAC;EACb;CACF;CACA,kBAAkB;EAChB;GACE,aAAa;GACb,QAAQ;GACR,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA;GACE,aAAa;GACb,QAAQ;GACR,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA;GACE,aAAa;GACb,QAAQ;GACR,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA;GACE,aAAa;GACb,QAAQ;GACR,OAAO;IACL;IACA;IACA;IACA;GACF;EACF;CACF;AACF,CAAC;;;ACnGD,IAAa,mBAAmB,OAAO,MAAM;CAC3C,MAAM,CAAC,eAAe;CACtB,UAAU;EACR,WA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C,UAAU;EAEf,cAAc,KAAK;EAEnB,MAAM,QAAQ,CAAC,GAAG,QAAQ;EAC1B,OAAO,KAAK;EACZ,SAAS,KAAK;CAChB;CAEA,MAAM,iBAAiB,UAA+C;EACpE,IAAI,YAAY,MAAM,OAAO,YAAY,MAAM,KAC7C,mBAAmB,SAAS,MAAM;CAEtC;CAGA,MAAM,QAAQ,MAAM,eACX;EAAE;EAAY;CAAM,IAC3B,CAAC,YAAY,KAAK,CACpB;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAD;EAAwB;YACtB,iBAAA,GAAA,kBAAA,KAAA,CAAC,iBAAD;GACE,YAAY;GACZ,aAAa;GACb,SAAS,UAAU;IACjB,MAAM,eAAe;IACrB,WAAW,MAAM,aAAa,KAAK;GACrC;GACA,eAAe,mBAAmB,SAAS,MAAM;GAKjD,MAAK;GACL,WAAW;GACX,UAAU;GACV,GAAI;aAfN,CAiBG,OAAO,aAAa,aAAa,SAAS,KAAK,IAAI,UACpD,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;IACE,MAAK;IACL,KAAK;IACL,OAAO,EAAE,YAAY,SAAS;IACtB;IACE;IACV,WAAW,UAAU;KACnB,WAAW,MAAM,OAAO,KAAK;IAC/B;GACD,CAAA,CACc;;CACF,CAAA;AAErB;AAEA,SAAS,cAAc;;;ACzGvB,IAAa,oBACX,MAAM,IAAI,eAAe"}
1
+ {"version":3,"file":"index.cjs.js","names":[],"sources":["../src/styled.tsx","../src/utilities/css-wrapper/CSSWrapper.tsx","../src/components/accordion/AccordionContent.tsx","../src/components/accordion/AccordionItem.tsx","../src/experiments/color-scheme/ColorScheme.config.ts","../src/experiments/color-scheme/ColorScheme.tsx","../src/components/icon/Icon.tsx","../src/components/accordion/AccordionTrigger.tsx","../src/components/accordion/Accordion.tsx","../src/components/tooltip/TooltipContent.tsx","../src/components/tooltip/Tooltip.tsx","../src/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.tsx","../src/utilities/uri/index.ts","../src/components/router-provider/RouterProvider.tsx","../src/components/action-icon/ActionIcon.constants.ts","../src/components/action-icon/ActionIcon.tsx","../src/components/alert-dialog/AlertDialogContent.tsx","../src/components/alert-dialog/AlertDialog.tsx","../src/utilities/hooks/useIsMountedRef.ts","../src/components/loader/Loader.tsx","../src/components/button/Button.tsx","../src/components/heading/Heading.tsx","../src/components/text/Text.tsx","../src/components/alert-dialog/alert-context/AlertDialogIcon.tsx","../src/components/alert-dialog/alert-context/AlertDialog.tsx","../src/components/alert-dialog/alert-context/reducer.ts","../src/components/alert-dialog/AlertDialog.context.tsx","../src/components/alert-dialog/Alert.ts","../src/components/avatar/Avatar.context.tsx","../src/utilities/override-styled-variant-value/overrideStyledVariantValue.ts","../src/components/avatar/AvatarIcon.tsx","../src/components/link/Link.tsx","../src/components/image/ImageCredit.tsx","../src/components/image/Image.tsx","../src/components/avatar/AvatarPlaceholder.tsx","../src/components/avatar/AvatarInitial.tsx","../src/components/avatar/AvatarImage.tsx","../src/components/avatar/Avatar.tsx","../src/utilities/hooks/useCallbackRef.ts","../src/components/badge/Badge.colorscheme.config.ts","../src/components/badge/Badge.context.tsx","../src/components/badge/BadgeIcon.tsx","../src/utilities/hooks/useResizeObserver.ts","../src/components/badge/BadgeText.tsx","../src/components/badge/Badge.tsx","../src/components/dismissible/DismissibleRoot.tsx","../src/components/dismissible/DismissibleTrigger.tsx","../src/components/dismissible/index.ts","../src/components/banner/Banner.context.tsx","../src/components/banner/Banner.tsx","../src/components/banner/banner-regular/BannerRegularButton.tsx","../src/components/banner/banner-regular/BannerRegularActions.tsx","../src/components/banner/BannerContainer.tsx","../src/components/banner/banner-regular/BannerRegularContainer.tsx","../src/components/banner/banner-regular/BannerRegularContent.tsx","../src/components/banner/banner-regular/BannerRegularDismiss.tsx","../src/components/banner/banner-regular/BannerRegularHeading.tsx","../src/components/banner/banner-regular/BannerRegularImage.tsx","../src/components/banner/banner-regular/BannerRegularText.tsx","../src/components/banner/banner-regular/BannerRegular.tsx","../src/components/banner/banner-slim/BannerSlimActions.tsx","../src/components/banner/banner-slim/BannerSlimButton.tsx","../src/components/banner/banner-slim/BannerSlimContainer.tsx","../src/components/banner/banner-slim/BannerSlimContent.tsx","../src/components/banner/banner-slim/BannerSlimDismiss.tsx","../src/components/banner/banner-slim/BannerSlimImage.tsx","../src/components/banner/banner-slim/BannerSlimText.tsx","../src/components/banner/banner-slim/BannerSlim.tsx","../src/components/carousel/CarouselArrows.tsx","../src/components/carousel/CarouselPagination.tsx","../src/components/carousel/CarouselSlider.tsx","../src/components/carousel/CarouselSlide.tsx","../src/components/carousel/Carousel.tsx","../src/components/checkbox/Checkbox.tsx","../src/components/checkbox-group/CheckboxGroupChecked.context.tsx","../src/components/checkbox-group/CheckboxGroupMounted.context.tsx","../src/components/checkbox-group/CheckboxGroupAllItem.tsx","../src/components/checkbox-group/CheckboxGroupItem.tsx","../src/components/checkbox-group/CheckboxGroupSub.tsx","../src/components/checkbox-group/CheckboxGroup.tsx","../src/components/tree/TreeListItem.tsx","../src/components/tree/TreeCollapsible.tsx","../src/components/tree/TreeList.tsx","../src/components/tree/TreeCollapsibleContent.tsx","../src/components/tree/TreeIcon.tsx","../src/components/tree/TreeText.tsx","../src/components/tree/TreeItemContent.tsx","../src/components/tree/TreeCollapsibleTrigger.tsx","../src/components/tree/TreeItem.tsx","../src/components/tree/Tree.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsible.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsibleContent.tsx","../src/components/checkbox-tree/CheckboxTreeItemContent.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsibleTrigger.tsx","../src/components/checkbox-tree/CheckboxTreeItem.tsx","../src/components/checkbox-tree/CheckboxTree.tsx","../src/components/inline-message/InlineMessage.config.ts","../src/components/inline-message/InlineMessage.tsx","../src/components/label/Label.tsx","../src/components/radio-button/RadioButton.tsx","../src/components/field-wrapper/FieldDescription.tsx","../src/components/field-wrapper/InlineFieldWrapper.tsx","../src/components/form/useFieldError.ts","../src/components/checkbox-field/CheckboxField.tsx","../src/components/chip/Chip.tsx","../src/components/chip/ChipGroup.tsx","../src/components/dismissible-group/DismissibleGroupRoot.tsx","../src/components/dismissible-group/DismissibleGroupItem.tsx","../src/components/dismissible-group/index.ts","../src/components/chip-dismissible-group/ChipDismissibleGroupItem.tsx","../src/components/chip-dismissible-group/ChipDismissibleGroupRoot.tsx","../src/components/chip-dismissible-group/index.ts","../src/components/chip-toggle-group/ChipToggleGroupItem.tsx","../src/utilities/radix-overrides/toggle-group/ToggleGroupRoot.tsx","../src/utilities/radix-overrides/toggle-group/index.ts","../src/components/chip-toggle-group/ChipToggleGroupRoot.tsx","../src/components/chip-toggle-group/index.ts","../src/components/combobox/ComboboxInput.tsx","../src/components/combobox/ComboboxList.tsx","../src/components/combobox/ComboboxOption.tsx","../src/components/combobox/ComboboxPopover.tsx","../src/components/combobox/Combobox.tsx","../src/components/field-wrapper/FieldWrapper.tsx","../src/components/form/useFormCustomContext.ts","../src/utilities/style/get-icon-size.ts","../src/components/input/Input.tsx","../src/components/password-input/PasswordInput.tsx","../src/components/password-field/PasswordField.tsx","../src/components/create-password-field/CreatePasswordField.tsx","../src/components/data-table/DataTable.types.ts","../src/components/data-table/getNewAsyncData.ts","../src/components/data-table/usePagination.ts","../src/components/data-table/useSorting.ts","../src/components/data-table/DataTable.context.tsx","../src/components/table/TableBody.tsx","../src/components/table/TableCell.tsx","../src/components/table/TableFooter.tsx","../src/components/table/TableFooterCell.tsx","../src/components/table/TableHeader.tsx","../src/components/table/TableHeaderCell.tsx","../src/components/table/TableRow.tsx","../src/components/table/useStickyColumnsCss.ts","../src/components/table/TableStickyColumnsContainer.tsx","../src/components/table/Table.tsx","../src/components/data-table/DataTableDataCell.tsx","../src/components/data-table/DataTableRowSelectionCheckbox.tsx","../src/components/data-table/DataTableRow.tsx","../src/components/data-table/DataTableBody.tsx","../src/components/divider/Divider.tsx","../src/components/data-table/DataTableMetaData.tsx","../src/components/data-table/DataTableBulkActions.tsx","../src/components/data-table/DataTableBulkActionsSelectedRowActions.tsx","../src/components/data-table/DataTableBulkActionsFloating.tsx","../src/components/empty-state/EmptyState.context.tsx","../src/components/empty-state/EmptyStateBody.tsx","../src/components/empty-state/EmptyStateImage.tsx","../src/components/empty-state/EmptyStateTitle.tsx","../src/components/empty-state/EmptyState.tsx","../src/components/data-table/DataTableEmptyState.tsx","../src/components/data-table/DataTableError.tsx","../src/components/search-input/SearchInput.tsx","../src/components/data-table/DataTableGlobalFilter.tsx","../src/components/data-table/DataTableHeaderCell.tsx","../src/components/data-table/DataTableSelectAllRowsCheckbox.tsx","../src/components/data-table/DataTableHead.tsx","../src/components/data-table/DataTableLoading.tsx","../src/components/data-table/DataTableTable.tsx","../src/components/sortable/Handle.tsx","../src/components/sortable/SortableHandle.tsx","../src/components/sortable/SortableItem.tsx","../src/components/sortable/SortableRoot.tsx","../src/components/sortable/index.ts","../src/components/data-table/drag-and-drop/DragAndDropTableRow.tsx","../src/components/data-table/drag-and-drop/DragAndDropTableBody.tsx","../src/components/data-table/drag-and-drop/DragAndDropTable.tsx","../src/components/pagination/pagination.constants.ts","../src/components/pagination/pagination.helper.ts","../src/components/pagination/Pagination.context.tsx","../src/components/pagination/usePagination.tsx","../src/components/pagination/PaginationNextButton.tsx","../src/components/pagination/PaginationPage.tsx","../src/components/popover/PopoverContent.tsx","../src/components/popover/Popover.tsx","../src/components/pagination/PaginationPopover.tsx","../src/components/pagination/PaginationPreviousButton.tsx","../src/components/pagination/PaginationItems.tsx","../src/components/pagination/Pagination.tsx","../src/components/data-table/pagination/Pagination.tsx","../src/components/data-table/DataTable.tsx","../src/components/calendar/constants.ts","../src/components/calendar/Day.tsx","../src/components/calendar/Calendar.tsx","../src/components/date-input/constants.ts","../src/components/date-input/DateInput.tsx","../src/components/date-field/DateField.tsx","../src/components/dialog/DialogActionBar.tsx","../src/components/dialog/DialogBackground.tsx","../src/components/dialog/DialogClose.tsx","../src/utilities/style/backdrop-overlay.ts","../src/components/dialog/DialogContent.tsx","../src/components/dialog/DialogFooter.tsx","../src/components/dialog/DialogHeading.tsx","../src/components/dialog/DialogNavigationBar.tsx","../src/components/dialog/DialogScrollableContent.tsx","../src/components/dialog/Dialog.tsx","../src/components/drawer/DrawerOverlay.tsx","../src/components/drawer/DrawerContent.tsx","../src/components/drawer/Drawer.context.tsx","../src/components/drawer/DrawerClose.tsx","../src/components/drawer/DrawerFooter.tsx","../src/components/drawer/DrawerHeader.tsx","../src/components/drawer/DrawerMain.tsx","../src/components/drawer/DrawerTrigger.tsx","../src/components/drawer/Drawer.tsx","../src/components/dropdown-menu/DropdownMenuContent.tsx","../src/components/dropdown-menu/DropdownMenuItem.tsx","../src/components/dropdown-menu/DropdownMenuLabel.tsx","../src/components/dropdown-menu/DropdownMenuLinkItem.tsx","../src/components/dropdown-menu/DropdownMenuSeparator.tsx","../src/components/dropdown-menu/DropdownMenuTrigger.tsx","../src/components/dropdown-menu/DropdownMenu.tsx","../src/components/file-input/FileInput.tsx","../src/components/form/Form.tsx","../src/components/input-field/InputField.tsx","../src/components/list/List.tsx","../src/components/markdown-content/components/MarkdownCode.tsx","../src/components/markdown-content/components/MarkdownEmphasis.tsx","../src/components/markdown-content/components/MarkdownHeading.tsx","../src/components/markdown-content/components/MarkdownImage.tsx","../src/components/markdown-content/components/MarkdownInlineCode.tsx","../src/components/markdown-content/components/MarkdownLink.tsx","../src/components/markdown-content/components/MarkdownList.tsx","../src/components/markdown-content/components/MarkdownListItem.tsx","../src/components/markdown-content/components/MarkdownParagraph.tsx","../src/components/markdown-content/components/MarkdownStrong.tsx","../src/components/markdown-content/components/MarkdownText.tsx","../src/components/markdown-content/components/MarkdownThematicBreak.tsx","../src/components/markdown-content/MarkdownContent.tsx","../src/components/navigation/NavigationMenu.colorscheme.config.ts","../src/components/navigation/NavigationMenu.context.tsx","../src/utilities/event/preventEvent.ts","../src/components/navigation/NavigationMenuDropdownContent.tsx","../src/components/navigation/NavigationMenu.styles.ts","../src/components/navigation/NavigationMenuDropdownTrigger.tsx","../src/components/navigation/NavigationMenuDropdown.tsx","../src/components/navigation/NavigationMenuLink.tsx","../src/components/navigation/NavigationMenuDropdownItem.tsx","../src/components/navigation/NavigationMenu.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.colorscheme.config.ts","../src/components/navigation-menu-vertical/NavigationMenuVerticalItem.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordion.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalList.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordionContent.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts","../src/components/navigation-menu-vertical/NavigationMenuVerticalIcon.tsx","../src/components/side-bar/SideBar.context.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalText.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalLink.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.tsx","../src/components/notification-badge/NotificationBadge.tsx","../src/components/number-input/NumberInputStepper.tsx","../src/components/number-input/NumberInput.tsx","../src/components/number-input-field/NumberInputField.tsx","../src/components/progress-bar/ProgressBar.tsx","../src/components/radio-button/RadioButtonGroup.tsx","../src/components/radio-button-field/RadioField.tsx","../src/components/radio-button-field/RadioButtonField.tsx","../src/components/radio-card/RadioCard.tsx","../src/components/router-provider/Router.ts","../src/components/radio-card/RadioCardGroup.tsx","../src/components/search-field/SearchField.tsx","../src/components/section-message/SectionMessage.context.tsx","../src/components/section-message/SectionMessageDescription.tsx","../src/components/section-message/SectionMessageDismiss.tsx","../src/components/section-message/SectionMessageIcon.tsx","../src/components/section-message/SectionMessageLayout.tsx","../src/components/section-message/SectionMessageTitle.tsx","../src/components/section-message/SectionMessage.tsx","../src/components/select/Select.tsx","../src/components/select-field/SelectField.tsx","../src/components/select-menu/SelectMenu.context.tsx","../src/components/select-menu/SelectMenuContent.tsx","../src/components/select-menu/SelectMenuItem.tsx","../src/components/select-menu/SelectMenuLabel.tsx","../src/components/select-menu/SelectMenuSeparator.tsx","../src/components/select-menu/SelectMenuTrigger.tsx","../src/components/select-menu/SelectMenu.tsx","../src/components/select-menu-field/SelectMenuField.tsx","../src/components/side-bar/SideBarComponents.tsx","../src/components/side-bar/SideBar.tsx","../src/components/slider/SliderSteps.tsx","../src/components/slider/SliderValue.tsx","../src/components/slider/Slider.tsx","../src/components/slider-field/SliderField.tsx","../src/components/skeleton-loader/Skeleton.tsx","../src/components/skeleton-loader/SkeletonHeading.tsx","../src/components/skeleton-loader/SkeletonButton.tsx","../src/components/tile/Tile.tsx","../src/components/skeleton-loader/SkeletonTabs.tsx","../src/components/skeleton-loader/SkeletonDoughnutChart.tsx","../src/components/skeleton-loader/SkeletonTable.tsx","../src/components/skeleton-loader/SkeletonCard.tsx","../src/components/skeleton-loader/SkeletonColumnChart.tsx","../src/components/skeleton-loader/SkeletonBarChart.tsx","../src/components/skeleton-loader/SkeletonPanelList.tsx","../src/components/skeleton-loader/SkeletonSubjectList.tsx","../src/components/skeleton-loader/index.ts","../src/components/spacer/Spacer.tsx","../src/components/stepper/Stepper.context.tsx","../src/components/stepper/StepperStepBack.tsx","../src/components/stepper/StepperStepForward.tsx","../src/components/stepper/StepperStepBullet.tsx","../src/components/stepper/StepperStepContainer.tsx","../src/components/stepper/StepperStepLabel.tsx","../src/components/stepper/types.ts","../src/components/stepper/StepperSteps.tsx","../src/components/stepper/Stepper.tsx","../src/components/switch/Switch.tsx","../src/components/tabs/TabsContent.tsx","../src/components/tabs/TabsTrigger.tsx","../src/utilities/hooks/useScrollPosition.ts","../src/utilities/hooks/useSize.ts","../src/components/tabs/TabsTriggerList.tsx","../src/components/tabs/Tabs.tsx","../src/components/textarea/Textarea.tsx","../src/components/textarea-field/TextareaField.tsx","../src/components/tile-interactive/TileInteractive.tsx","../src/components/tile-toggle-group/TileToggleGroupItem.tsx","../src/components/tile-toggle-group/TileToggleGroupRoot.tsx","../src/components/tile-toggle-group/index.ts","../src/components/toast/Toast.context.tsx","../src/components/toast/ToastCloseButton.tsx","../src/components/toast/ToastIcon.tsx","../src/components/toast/Toast.tsx","../src/components/toast/ToastProvider.tsx","../src/components/toast/index.ts","../src/components/toggle-group/ToggleGroupItem.tsx","../src/components/toggle-group/ToggleGroupButton.tsx","../src/components/toggle-group/ToggleGroupRoot.tsx","../src/components/toggle-group/index.ts","../src/utilities/hooks/useWindowScrollPosition.ts","../src/components/top-bar/TopBar.colorscheme.config.ts","../src/components/top-bar/TopBarActionIcon.tsx","../src/components/top-bar/TopBarBrand.tsx","../src/components/top-bar/TopBar.tsx","../src/components/video/Video.tsx","../src/components/keyboard-shortcut/KeyboardShortcut.tsx","../src/components/keyboard-shortcut/index.ts","../src/components/segmented-control/SegmentedControl.context.tsx","../src/components/segmented-control/SegmentedControlBadge.tsx","../src/components/segmented-control/SegmentedControlContent.tsx","../src/components/segmented-control/SegmentedControlDescription.tsx","../src/components/segmented-control/SegmentedControlHeading.tsx","../src/components/segmented-control/SegmentedControlIcon.tsx","../src/components/segmented-control/SegmentedControlItem.tsx","../src/components/segmented-control/SegmentedControlItemList.tsx","../src/components/segmented-control/SegmentedControlRoot.tsx","../src/components/segmented-control/SegmentedControl.tsx","../src/components/file-drop/FileDrop.context.ts","../src/components/file-drop/FileDrop.tsx","../src/components/file-drop/useFileDrop.ts"],"sourcesContent":["// composeRefs must propagate ref-callback cleanup returns per the React 19\n// contract — the ref composition across the library (here and in the input /\n// badge / segmented-control components) relies on cleanups firing on detach.\n// @radix-ui/react-compose-refs@1.1.x is verified to do this.\nimport { composeRefs } from '@radix-ui/react-compose-refs'\nimport clsx, { type ClassValue } from 'clsx'\nimport React, { type ElementType, type ReactElement } from 'react'\nimport { extendTailwindMerge } from 'tailwind-merge'\nimport { defaultConfig, tv } from 'tailwind-variants'\n\ndefaultConfig.twMerge = false\n\nconst ARBITRARY_NUMBER_RE = /^\\[[\\d.]+\\]$/\n\nconst isArbitraryNumber = (value: string) =>\n ARBITRARY_NUMBER_RE.test(value) || !Number.isNaN(Number(value))\n\n// Matches Radix-style state variants (e.g. `data-[state=closed]:rounded-sm`),\n// used to detect an asChild className coming from a parent component.\nconst DATA_STATE_VARIANT_RE = /^data-\\[state=[^\\]]+\\]:/\n\nconst twMerge = extendTailwindMerge<\n 'capsize' | 'capsize-before' | 'capsize-after'\n>({\n extend: {\n classGroups: {\n capsize: [{ capsize: ['none', isArbitraryNumber] }],\n 'capsize-before': [{ 'capsize-before': [isArbitraryNumber] }],\n 'capsize-after': [{ 'capsize-after': [isArbitraryNumber] }]\n },\n conflictingClassGroups: {\n capsize: ['capsize-before', 'capsize-after'],\n 'capsize-before': ['capsize'],\n 'capsize-after': ['capsize']\n }\n }\n})\n\nexport const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs))\n\ntype Breakpoint = '@initial' | '@sm' | '@md' | '@lg' | '@xl'\n\nexport const Theme = ({\n children,\n theme\n}: React.PropsWithChildren<{ theme?: Record<string, string> }>) => (\n <div className=\"contents\" style={theme}>\n {children}\n </div>\n)\n\nexport const createTheme = (config: Record<string, Record<string, string>>) =>\n Object.fromEntries(\n Object.values(config).flatMap((tokens) =>\n Object.entries(tokens).map(([token, value]) => [`--${token}`, value])\n )\n )\n\n// ---------------------------------------------------------------------------\n// Local typing for styled()\n// ---------------------------------------------------------------------------\n\n// Responsive variant prop: either a single value or a per-breakpoint map\n// Each breakpoint can have a different value from the union type V\ntype ResponsiveVariant<V extends string | number | boolean> =\n | V\n | Partial<Record<Breakpoint, V>>\n\n// Helpers to derive value type from variant config keys\ntype Keys<V> = keyof V\ntype StringKeys<V> = Extract<Keys<V>, string>\ntype NumberKeys<V> = Extract<Keys<V>, number>\n// Booleans are represented as string keys \"true\"/\"false\" in our VariantConfig,\n// so we only need to detect those in StringKeys.\ntype BooleanKeys<V> = Extract<StringKeys<V>, 'true' | 'false'>\n\ntype HasBoolLikeKeys<V> =\n BooleanKeys<V> extends never\n ? Extract<StringKeys<V>, 'true' | 'false'> extends never\n ? false\n : true\n : true\n\n// If a variant's keys are boolean-like, expose the prop as boolean.\n// If it has numeric keys, allow those numbers and their string forms.\n// Otherwise use a string union of the keys.\ntype VariantValueType<V> =\n HasBoolLikeKeys<V> extends true\n ? boolean\n : [NumberKeys<V>] extends [never]\n ? StringKeys<V>\n : NumberKeys<V> | `${NumberKeys<V>}`\n\n// Shape of the `variants` section passed to styled()\ntype VariantConfig = Record<string, Record<string | number, string | string[]>>\n\n// Options for styled() function\ntype StyledOptions = {\n enableResponsiveVariants?: boolean\n enablePolymorphism?: boolean\n}\n\n// Helper to check if responsive variants are enabled\ntype AreResponsiveVariantsEnabled<O> = O extends {\n enableResponsiveVariants: true\n}\n ? true\n : false\n\n// Props derived from a `variants` config\n// If enableResponsiveVariants is true, all variants support responsive values\n// If enableResponsiveVariants is not provided or false, variants do not support responsive values\ntype VariantProps<\n V extends VariantConfig | undefined,\n R extends boolean = false\n> = V extends VariantConfig\n ? R extends true\n ? {\n [K in keyof V]?: ResponsiveVariant<VariantValueType<V[K]>>\n }\n : {\n [K in keyof V]?: VariantValueType<V[K]>\n }\n : unknown\n\n// Typed config for our styled helper.\n// We intentionally *don't* rely on tailwind-variants' TS types here;\n// we only care about enough structure to derive props.\ntype StyledConfig<V extends VariantConfig | undefined = undefined> = {\n base?: string | string[]\n variants?: V\n compoundVariants?: Array<\n {\n class?: string | string[]\n } & (V extends VariantConfig\n ? {\n [K in keyof V]?: VariantValueType<V[K]> | VariantValueType<V[K]>[]\n }\n : Record<string, never>)\n >\n defaultVariants?: V extends VariantConfig\n ? { [K in keyof V]?: VariantValueType<V[K]> }\n : Record<string, never>\n}\n\n// Props of the default element. `as` is typed `never` so JSX usage with `as`\n// can only resolve through the generic polymorphic signature — signatures\n// built from this can never accept calls the generic one would reject.\ntype DefaultElementProps<\n TDefaultElement extends ElementType,\n OwnProps\n> = OwnProps & { as?: never } & Omit<\n React.ComponentPropsWithRef<TDefaultElement>,\n keyof OwnProps | 'as'\n >\n\n// Polymorphic component type: `as` prop narrows accepted props and ref type.\n//\n// The non-generic default-element signature appears twice on purpose. Tooling\n// that inspects call signatures disagrees on which one to read: props-table\n// generation (react-docgen-typescript) reads the FIRST, while type-level\n// inference (React.ComponentProps and friends) reads the LAST. If either\n// tool lands on the generic signature instead, TAs erases to its ElementType\n// constraint and the props collapse to `any` (docgen then also loses every\n// element-specific prop, e.g. Radix's asChild).\nexport interface PolymorphicComponent<\n TDefaultElement extends ElementType,\n OwnProps\n> {\n (\n props: DefaultElementProps<TDefaultElement, OwnProps>\n ): React.ReactElement | null\n <TAs extends ElementType = TDefaultElement>(\n props: OwnProps & { as?: TAs } & Omit<\n React.ComponentPropsWithRef<TAs>,\n keyof OwnProps | 'as'\n >\n ): React.ReactElement | null\n (\n props: DefaultElementProps<TDefaultElement, OwnProps>\n ): React.ReactElement | null\n displayName?: string\n __isStyledComponent?: boolean\n /**\n * Phantom brand (never present at runtime) that carries this component's own\n * props so a wrapping styled() can recover them via {@link BaseOwnProps}.\n * Optional so plain function casts to this interface stay assignable; nominal\n * enough that foreign polymorphic components (Reach, Radix) don't match it.\n */\n readonly __ownProps?: OwnProps\n}\n\n// Non-polymorphic component type: no `as` prop. Single concrete call\n// signature, so React.ComponentProps and react-docgen-typescript both read\n// it directly — no sandwich needed.\nexport interface StyledComponent<\n TDefaultElement extends ElementType,\n OwnProps\n> {\n (\n props: OwnProps &\n Omit<React.ComponentPropsWithRef<TDefaultElement>, keyof OwnProps | 'as'>\n ): React.ReactElement | null\n displayName?: string\n __isStyledComponent?: boolean\n}\n\ntype PolymorphicElementProps<E extends ElementType, OwnProps> = OwnProps & {\n as?: E\n} & Omit<React.ComponentPropsWithRef<E>, keyof OwnProps | 'as'>\n\n// When styled() wraps one of our own polymorphic components (rather than a host\n// string), that component's own props (variants + custom props) are part of the\n// styled component's identity and must persist regardless of `as`. Without this\n// they live only in the default element's `ComponentPropsWithRef` and get\n// dropped by the generic `as` signature, which keys element props off the `as`\n// target. Recover them via the `__ownProps` phantom brand — matching on that\n// field (rather than the call signatures) means foreign polymorphic components\n// (Reach, Radix) and host strings don't match and instead contribute `unknown`,\n// the intersection identity, so their attributes still swap with `as`.\ntype BaseOwnProps<T> = T extends { readonly __ownProps?: infer OwnProps }\n ? unknown extends OwnProps\n ? unknown\n : OwnProps\n : unknown\n\n/**\n * Extract the props a styled component accepts, optionally for a specific\n * `as` element. `React.ComponentProps<typeof Box>` only describes the default\n * element (with `as` unusable); use this to retarget or to build wrappers\n * that re-expose polymorphism:\n *\n * ```tsx\n * type AnchorBoxProps = StyledComponentProps<typeof Box, 'a'> // href, anchor ref…\n * ```\n */\nexport type StyledComponentProps<C, TAs extends ElementType = never> =\n C extends PolymorphicComponent<\n infer TDefault extends ElementType,\n infer OwnProps\n >\n ? PolymorphicElementProps<[TAs] extends [never] ? TDefault : TAs, OwnProps>\n : C extends ElementType\n ? React.ComponentPropsWithRef<[TAs] extends [never] ? C : TAs>\n : never\n\n// Function overloads for better type inference\n\n// enablePolymorphism: false — no `as` prop\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>,\n options: { enablePolymorphism: false; enableResponsiveVariants: true }\n): StyledComponent<TElement, VariantProps<V, true>>\n\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>,\n options: { enablePolymorphism: false }\n): StyledComponent<TElement, VariantProps<V, false>>\n\n// enablePolymorphism: true (default) — `as` prop available\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>,\n options: { enableResponsiveVariants: true }\n): PolymorphicComponent<\n TElement,\n VariantProps<V, true> & BaseOwnProps<TElement>\n>\n\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>\n): PolymorphicComponent<\n TElement,\n VariantProps<V, false> & BaseOwnProps<TElement>\n>\n\n// Implementation\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined,\n O extends StyledOptions | undefined = undefined\n>(el: TElement, styles: StyledConfig<V>, options?: O) {\n const variantKeys = Object.keys(styles.variants || {})\n // Membership set for the per-prop lookups in `Comp`'s render, so filtering\n // props stays O(1) per key instead of scanning `variantKeys` each time.\n const variantKeySet = new Set(variantKeys)\n const enableResponsiveVariants = options?.enableResponsiveVariants === true\n const tvFn = tv(styles as any)\n\n type ResponsiveVariantsEnabled = AreResponsiveVariantsEnabled<O>\n type VariantPropsType = VariantProps<V, ResponsiveVariantsEnabled>\n type BaseProps = React.ComponentPropsWithRef<TElement>\n // Extract variant keys to omit from BaseProps so variant props override native HTML attributes\n type VariantKeys = V extends VariantConfig ? keyof V : never\n type StyledProps = Omit<BaseProps, VariantKeys> &\n VariantPropsType & {\n as?: ElementType\n ref?: React.Ref<React.ComponentRef<TElement>>\n className?: string\n /** @internal wrapper classes passed between nested styled components */\n __wrapperClasses?: string\n }\n\n const Comp = (props: StyledProps) => {\n const { ref } = props\n const additionalStyles = enableResponsiveVariants\n ? variantKeys.flatMap((variantKey) => {\n const responsiveVariantConfig:\n | Record<Breakpoint, string | number>\n | undefined = props[variantKey]\n const variantStyles: Record<string, string | string[]> =\n styles.variants![variantKey]\n\n if (\n typeof responsiveVariantConfig === 'object' &&\n responsiveVariantConfig &&\n !Array.isArray(responsiveVariantConfig)\n ) {\n return Object.entries(responsiveVariantConfig).flatMap(\n ([key, val]) => {\n const valStr = String(val)\n const styleArr: string | string[] =\n variantStyles && variantStyles[valStr]\n\n if (styleArr && Array.isArray(styleArr)) {\n return styleArr.flatMap((cls: string) => {\n if (key === '@initial') return cls\n return `${key.replace('@', '')}:${cls}`\n })\n }\n return []\n }\n )\n }\n\n return []\n })\n : []\n\n // Filter out variant props that don't belong to this component before calling tvFn\n // This prevents tailwind-variants from processing props meant for wrapped components\n // Only pass props that are in this component's variant keys\n // For boolean variants, only include them if the value is explicitly true or false (not null/undefined)\n // Note: tailwind-variants treats null as \"no variant\" but undefined/missing as \"apply false variant\"\n // So we need to convert undefined to null for boolean variants to prevent default behavior\n const propsForTv =\n variantKeys.length > 0\n ? Object.fromEntries(\n // Single pass: skip non-variant props and normalise the rest in one\n // iteration rather than a separate filter then map.\n Object.entries(props as Record<string, unknown>).flatMap(\n ([key, value]) => {\n if (!variantKeySet.has(key)) return []\n // Check if this is a boolean variant (has both 'true' and 'false' keys)\n const variantConfig = styles.variants?.[key]\n if (\n variantConfig &&\n 'true' in variantConfig &&\n 'false' in variantConfig\n ) {\n // For boolean variants, only include if value is explicitly true or false\n // Convert undefined to null to prevent tailwind-variants from applying false variant\n if (value === true || value === false) {\n return [[key, value]]\n }\n // For null/undefined, pass null to prevent tailwind-variants from applying defaults\n // This ensures that when a boolean prop is explicitly null/undefined, no variant is applied\n return [[key, null]]\n }\n // For non-boolean variants, pass value as-is (including null/undefined)\n return [[key, value]]\n }\n )\n )\n : {}\n\n const cls = tvFn(propsForTv)\n\n const filteredProps = Object.fromEntries(\n Object.entries(props).filter(\n ([key]) =>\n !variantKeySet.has(key) && key !== 'as' && key !== '__wrapperClasses'\n )\n )\n\n const mergedClassName = clsx(cls, additionalStyles).trim()\n const propsClassName = props.className\n // Check for wrapper classes passed from a parent styled component\n const wrapperClasses = props.__wrapperClasses\n\n if (\n typeof el === 'string' ||\n typeof el === 'function' ||\n (el && typeof el === 'object')\n ) {\n const elementType = el as ElementType\n\n // If el is a host string ('div', 'span', etc.) we must not pass variant props to the DOM.\n if (typeof el === 'string') {\n const { className: _, ...restFilteredProps } = filteredProps as any\n // Merge order: wrapper classes (lowest priority) < component classes < user's className (highest priority)\n // This ensures variant classes from this component override base classes from wrapper\n // IMPORTANT: When propsClassName exists (could be from asChild), we need to ensure child's classes win\n // over parent classes, but user's className should still have highest priority.\n // Strategy: Only apply special merge when wrapperClasses exist (nested styled component scenario).\n // For regular cases (no wrapperClasses), use standard merge order so user's className has highest priority.\n const finalClassName =\n wrapperClasses && propsClassName\n ? twMerge(mergedClassName, wrapperClasses, propsClassName) // wrapper overrides base, user className wins\n : wrapperClasses\n ? twMerge(mergedClassName, wrapperClasses) // wrapper overrides base\n : propsClassName\n ? (() => {\n // When propsClassName comes from asChild (Radix), we want this component's classes to win\n // When propsClassName is a regular className prop, the user's className should win (highest priority)\n // We can detect asChild scenario by checking if propsClassName contains classes that look like they came from a parent component\n // (e.g., data attribute variants like data-[state=closed]:rounded-sm)\n // If it does, treat it as asChild and let component classes win. Otherwise, let user's className win.\n const hasDataAttributeVariants = propsClassName\n .split(' ')\n .some((cls) => DATA_STATE_VARIANT_RE.test(cls))\n\n if (hasDataAttributeVariants) {\n // This is likely from asChild - component's classes should win\n return twMerge(propsClassName, mergedClassName)\n } else {\n // Regular className prop - user's className should win (highest priority)\n return twMerge(mergedClassName, propsClassName)\n }\n })()\n : twMerge(mergedClassName) // Always merge mergedClassName to resolve conflicts within it (e.g., bg-[unset] vs bg-(--base))\n\n return React.createElement(props.as || elementType, {\n ...restFilteredProps,\n ref,\n className: finalClassName\n })\n }\n\n // If el is a function component (or other component object), pass ALL props through\n // (the wrapped component may expect variant props), but ensure className and ref are forwarded.\n // We need to pass all props (not filteredProps) because the underlying component may have its own variants\n //\n // For className merging with wrapped styled components:\n // Solution: Pass wrapper's classes via __wrapperClasses prop for styled components to merge correctly.\n // For regular function components, merge wrapper classes with our classes and pass as className.\n // This ensures:\n // - Styled components can merge: wrapper classes < wrapped component classes < user's className\n // - Regular components get merged classes directly and don't receive __wrapperClasses\n // Filter out variant props and __wrapperClasses from props passed to function components\n // This prevents them from ending up in the DOM.\n // Note: We filter out variant props that belong to THIS component. Variant props that belong to\n // the wrapped component will be passed through (they're not in variantKeys), and the wrapped\n // component will filter them if it's a styled component.\n // Note: 'as' prop is filtered from filteredProps to prevent it from going to DOM for string elements,\n // but we add it back for function components since they need it for polymorphism.\n const { className: _, ...restFilteredProps } = filteredProps as any\n const asProp = props.as // Extract 'as' prop separately\n // Note: __wrapperClasses is already filtered out in filteredProps, so restFilteredProps doesn't include it\n\n // For styled components: Pass wrapper classes via __wrapperClasses so they can merge correctly.\n // Styled components extract __wrapperClasses from props (before filteredProps) and filter it in filteredProps.\n // For regular function components: We merge wrapper classes into className, but also pass __wrapperClasses\n // which they may spread. To prevent it in DOM, we need to ensure it's filtered, but we can't control that.\n // However, styled components that wrap regular components will filter __wrapperClasses in their filteredProps.\n if (wrapperClasses) {\n // We have wrapper classes from parent - this is a nested styled component scenario\n // Merge order: wrapper classes (base) < this component's classes (variants) < user's className\n // This ensures variant classes override base classes via twMerge\n // IMPORTANT: When propsClassName exists (could be from asChild), we need to ensure this component's classes win.\n // Strategy: Merge wrapperClasses with propsClassName first, then merge with mergedClassName last.\n // This ensures: wrapperClasses < propsClassName < mergedClassName (this component's classes win)\n // This is critical when propsClassName contains parent classes from asChild merge.\n const finalClassName = propsClassName\n ? twMerge(wrapperClasses, propsClassName, mergedClassName) // This component's classes win by being merged last\n : twMerge(wrapperClasses, mergedClassName)\n\n // Check if the wrapped component is a styled component. Component\n // types can be objects, not just functions (e.g. React.memo, lazy)\n const isStyledComponent =\n (typeof elementType === 'function' ||\n typeof elementType === 'object') &&\n elementType !== null &&\n (elementType as any).__isStyledComponent === true\n\n const propsForComponent: any = {\n ...restFilteredProps, // Base props (filters THIS component's variant props, __wrapperClasses, 'as')\n ...(asProp ? { as: asProp } : {}), // Add 'as' prop back for function components (polymorphic support)\n // Note: We don't add variant props back - they're already filtered by filteredProps.\n ref\n }\n\n if (isStyledComponent) {\n // Wrapped component is a styled component - pass __wrapperClasses so variant classes win\n // IMPORTANT: When propsClassName exists (could be from asChild), it may contain both parent and child classes.\n // We should NOT merge propsClassName with mergedClassName here, because that would remove child classes.\n // Instead, pass propsClassName as-is (or merge only wrapperClasses with mergedClassName) so the child\n // can merge its own classes last. The child will merge: twMerge(__wrapperClasses, propsClassName, child's mergedClassName).\n // This ensures child's classes win by being merged last.\n // Merge wrapperClasses with mergedClassName to create the wrapper classes for the child\n const combinedWrapperClasses = twMerge(\n wrapperClasses,\n mergedClassName\n )\n propsForComponent.__wrapperClasses = combinedWrapperClasses\n propsForComponent.className = propsClassName || undefined\n } else {\n // Wrapped component is not a styled component - merge wrapper classes into className\n // and don't pass __wrapperClasses (it would end up in DOM)\n propsForComponent.className = finalClassName\n }\n return React.createElement(elementType, propsForComponent)\n } else {\n // No wrapper classes from parent - we're top-level\n // For function components: Pass __wrapperClasses so styled components can merge correctly.\n // Styled components extract __wrapperClasses from their props (before filteredProps) and filter it in filteredProps.\n // Regular function components will receive __wrapperClasses but should filter it out themselves.\n // We also merge wrapper classes into className for regular function components.\n // Note: We pass __wrapperClasses in props (not filteredProps) so styled components can access it,\n // but styled components filter it in their filteredProps so it won't go to DOM.\n // Regular function components that spread all props will pass __wrapperClasses to DOM, which is a problem.\n // But we can't distinguish them, so we rely on styled components filtering it.\n // Check if the wrapped component is a styled component\n // elementType is the component itself (e.g., Inner when Outer extends Inner)\n // Component types can be objects, not just functions, but we can still check the flag\n const isStyledComponent =\n (typeof elementType === 'function' ||\n typeof elementType === 'object') &&\n elementType !== null &&\n (elementType as any).__isStyledComponent === true\n\n const propsForComponent: any = {\n ...restFilteredProps, // Filters out __wrapperClasses, variant props, 'as'\n ...(asProp ? { as: asProp } : {}),\n ref\n }\n\n if (isStyledComponent) {\n // Styled component - pass wrapper classes via __wrapperClasses so variant classes can take precedence\n // IMPORTANT: When propsClassName exists, we need to distinguish between:\n // 1. User's className (should win - highest priority)\n // 2. className from asChild/parent component (component's classes should win)\n // We detect asChild by checking for data attribute variants (e.g., data-[state=closed]:rounded-sm)\n const hasDataAttributeVariants = propsClassName\n ? propsClassName\n .split(' ')\n .some((cls) => DATA_STATE_VARIANT_RE.test(cls))\n : false\n\n const mergedPropsAndComponent = propsClassName\n ? hasDataAttributeVariants\n ? // This is likely from asChild - component's classes should win\n twMerge(propsClassName, mergedClassName)\n : // Regular user className - user's className should win (highest priority)\n twMerge(mergedClassName, propsClassName)\n : mergedClassName\n propsForComponent.__wrapperClasses = mergedClassName\n propsForComponent.className = mergedPropsAndComponent || undefined\n } else {\n // Regular function component - merge wrapper classes into className\n // Standard merge order: component classes < user's className (highest priority)\n propsForComponent.className = twMerge(mergedClassName, propsClassName)\n }\n return React.createElement(elementType, propsForComponent)\n }\n }\n\n if (React.isValidElement(el)) {\n const element = el as ReactElement<unknown>\n // Merge existing element className, incoming filteredProps.className and our computed class\n const existingClass = (element.props as any).className\n const incomingClass = (filteredProps as any).className\n const finalClassName = cn(\n existingClass,\n incomingClass,\n mergedClassName\n ).trim()\n\n const cloneProps: any = {\n // ...element.props,\n ...filteredProps,\n as: props.as || (element.props as { as?: ElementType }).as,\n className: finalClassName\n }\n\n // Forward the ref if provided, composed with any ref the element\n // already carries — overwriting it would silently detach the original.\n if (ref) {\n const existingRef = (element.props as { ref?: React.Ref<unknown> }).ref\n cloneProps.ref = existingRef ? composeRefs(existingRef, ref) : ref\n }\n\n return React.cloneElement(element, cloneProps)\n }\n\n throw Error('Something is wrong')\n }\n\n // Mark the component as a styled component so we can detect it later\n ;(Comp as any).__isStyledComponent = true\n\n // Name the component for DevTools and error component stacks — without\n // this every styled component reads as the inner function name, \"Comp\"\n const baseName =\n typeof el === 'string'\n ? el\n : (el as any).displayName || (el as any).name || 'Component'\n Comp.displayName = baseName.startsWith('styled.')\n ? baseName\n : `styled.${baseName}`\n\n return Comp\n}\n","import * as React from 'react'\n\ntype CssWrapperProps = {\n className?: string\n children: React.ReactNode\n}\n\nexport const CSSWrapper = ({\n className,\n children\n}: CssWrapperProps): React.ReactElement<unknown> =>\n className ? (\n <div className={className}>{children}</div>\n ) : (\n // children could be multiple elements/components,\n // so we need a fragment here.\n // eslint-disable-next-line react/jsx-no-useless-fragment\n <>{children}</>\n )\n\nCSSWrapper.displayName = 'CSSWrapper'\n","import { Content } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { CSSWrapper } from '../../utilities/css-wrapper/CSSWrapper'\n\nconst StyledContent = styled(Content, {\n base: [\n 'border-none',\n 'w-full',\n 'bg-(--base-1)',\n 'overflow-hidden',\n 'data-[state=open]:rounded-b-sm',\n 'data-[state=open]:rounded-t-none',\n 'motion-safe:data-[state=open]:animate-accordion-open',\n 'motion-safe:data-[state=closed]:animate-accordion-close'\n ]\n})\n\nexport const AccordionContent = ({\n children,\n className,\n ...rest\n}: React.ComponentProps<typeof StyledContent>) => (\n <StyledContent {...rest}>\n <CSSWrapper className={className}>{children}</CSSWrapper>\n </StyledContent>\n)\n","import { Item } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const AccordionItem = styled(\n Item,\n {\n base: ['w-full', 'not-last:mb-1']\n },\n { enablePolymorphism: false }\n)\n","type ColorSchemeKeys = 'interactive' | 'base' | 'accent' | 'foreground'\n\n// ColorScheme is a partial record, but values are always strings (never undefined)\ntype ColorScheme = Partial<\n Record<`--${ColorSchemeKeys}` | `--${ColorSchemeKeys}-${string}`, string>\n>\n\ntype ColorSchemeConfig = { colorName: string; color0?: string }\n\nconst generateColors = ({\n prefix,\n colorName,\n color0 = ''\n}: {\n prefix: ColorSchemeKeys\n colorName: string\n color0?: string\n}): ColorScheme => {\n const colors: Record<string, string> = {}\n let i = 1\n if (color0) {\n colors[`--${prefix}-${i}`] = `var(--color-${color0})`\n i++\n }\n let k = 1\n for (i; i <= 11; i++) {\n colors[`--${prefix}-${i}`] = `var(--color-${colorName}-${k * 100})`\n k++\n }\n return colors as ColorScheme\n}\n\nexport const colorSchemes: Record<string, ColorScheme> = {} as Record<\n string,\n ColorScheme\n>\n\ncolorSchemes['interactive-loContrast'] = {\n '--interactive-foreground': 'var(--foreground)',\n '--interactive-1': 'var(--accent-1)',\n '--interactive-2': 'var(--accent-2)',\n '--interactive-3': 'var(--accent-3)'\n}\n\ncolorSchemes['interactive-hiContrast'] = {\n '--interactive-foreground': 'var(--foreground-7-plus)',\n '--interactive-1': 'var(--accent-9)',\n '--interactive-2': 'var(--accent-10)',\n '--interactive-3': 'var(--accent-11)'\n}\n\nconst colorNames = [\n 'primary',\n 'grey',\n 'blue',\n 'pink',\n 'purple',\n 'cyan',\n 'green',\n 'magenta',\n 'red',\n 'teal',\n 'orange',\n 'yellow',\n 'lime'\n]\n\nconst createVariants = () =>\n Object.fromEntries(\n colorNames.flatMap((c) => [\n [`${c}1`, { colorName: c, color0: 'white' }],\n [`${c}2`, { colorName: c }]\n ])\n ) as Record<string, ColorSchemeConfig>\n\nexport const bases = createVariants()\nexport const accents = bases\n;(() => {\n Object.entries(bases).forEach(\n ([name, config]: [string, ColorSchemeConfig]) => {\n const themeName = `base-${name}`\n colorSchemes[themeName] = {\n '--foreground': 'var(--color-grey-1000)',\n '--foreground-7-plus': 'var(--color-white)',\n ...generateColors({\n prefix: 'base',\n colorName: config.colorName,\n color0: config.color0\n })\n }\n }\n )\n\n Object.entries(accents).forEach(\n ([name, config]: [string, ColorSchemeConfig]) => {\n colorSchemes[`accent-${name}`] = generateColors({\n prefix: 'accent',\n colorName: config.colorName,\n color0: config.color0\n })\n }\n )\n})()\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { accents, bases, colorSchemes } from './ColorScheme.config'\n\nexport type TcolorScheme = {\n base?: keyof typeof bases\n accent?: keyof typeof accents\n interactive?: 'loContrast' | 'hiContrast'\n}\n\ntype ColorSchemeOwnProps = TcolorScheme & {\n asChild?: boolean\n ref?: React.Ref<HTMLDivElement>\n}\n\ntype ColorSchemeProps = React.HTMLAttributes<HTMLDivElement> &\n ColorSchemeOwnProps\n\n/**\n * @experimental Component has not been finalised. Further design input required. Use with caution.\n */\nexport const ColorScheme = ({\n ref,\n base = '',\n accent = '',\n interactive,\n asChild = false,\n ...rest\n}: ColorSchemeProps) => {\n const Component = asChild ? Slot : 'div'\n\n // Build style object - config ensures values are always strings (never undefined)\n const style = {\n ...(interactive && colorSchemes[`interactive-${interactive}`]),\n ...(accent && colorSchemes[`accent-${accent}`]),\n ...(base && colorSchemes[`base-${base}`])\n } as React.CSSProperties\n\n return <Component {...rest} ref={ref} style={style} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nexport const StyledIcon = styled(\n 'svg',\n {\n base: [\n 'inline-block',\n 'fill-none',\n 'shrink-0',\n 'stroke-current',\n '[stroke-linecap:round]',\n '[stroke-linejoin:round]',\n 'align-middle'\n ],\n variants: {\n size: {\n sm: ['size-4', 'stroke-[1.5]'],\n md: ['size-6', 'stroke-[1.75]'],\n lg: ['size-8', 'stroke-2']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype IconProps = Override<\n React.ComponentProps<typeof StyledIcon>,\n {\n is: React.FC<React.SVGProps<SVGSVGElement>>\n as?: never\n }\n>\n\nexport const Icon = ({ ref, is: SVG, size = 'md', ...rest }: IconProps) => (\n <StyledIcon size={size} aria-hidden=\"true\" {...rest} as={SVG} ref={ref} />\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\n\nconst RotatingIcon = styled(Icon, {\n base: [\n 'transition-transform',\n 'duration-300',\n '[[data-state=open]>&]:rotate-180',\n '[[data-state=closed]>&]:rotate-0'\n ]\n})\n\nconst StyledTrigger = styled(Trigger, {\n base: [\n 'border-none',\n 'py-3',\n 'px-4',\n 'w-full',\n 'flex',\n 'justify-between',\n 'items-center',\n 'cursor-pointer',\n 'bg-(--interactive-2)',\n 'text-(--interactive-foreground)',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--interactive-3)',\n 'not-disabled:focus-visible:bg-(--interactive-3)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--interactive-3)',\n 'data-[state=open]:rounded-b-none',\n 'data-[state=open]:rounded-t-sm',\n 'data-[state=closed]:rounded-sm'\n ],\n variants: {\n arrowPosition: {\n left: ['flex-row-reverse', 'gap-2', 'justify-end'],\n right: []\n }\n }\n})\n\nexport const AccordionTrigger = ({\n children,\n colorScheme = {},\n asChild,\n arrowPosition = 'right',\n ...rest\n}: React.ComponentProps<typeof StyledTrigger> & {\n colorScheme?: TcolorScheme\n}) => (\n <ColorScheme asChild accent=\"grey1\" interactive=\"loContrast\" {...colorScheme}>\n <StyledTrigger asChild={asChild} arrowPosition={arrowPosition} {...rest}>\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <RotatingIcon is={ChevronDown} data-testid=\"accordion-chevron\" />\n </>\n )}\n </StyledTrigger>\n </ColorScheme>\n)\n","import { Root } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { AccordionContent } from './AccordionContent'\nimport { AccordionItem } from './AccordionItem'\nimport { AccordionTrigger } from './AccordionTrigger'\n\ntype AccordionProps = React.ComponentProps<typeof Root> & {\n type: 'single' | 'multiple'\n}\n\nconst AccordionBase = ({\n ref,\n type = 'single',\n className,\n children,\n ...rest\n}: AccordionProps) => (\n // eslint-disable-next-line\n // @ts-ignore TODO: Radix has an TS error that throws a warning if you pass multiple in. Needs to be fixed by the owner\n <Root ref={ref} type={type} className={cn('w-full', className)} {...rest}>\n {children}\n </Root>\n)\n\nexport const Accordion = /* @__PURE__ */ Object.assign(AccordionBase, {\n Item: AccordionItem,\n Content: AccordionContent,\n Trigger: AccordionTrigger\n})\n","import { Arrow, Content } from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledContent = styled(Content, {\n base: [\n 'bg-grey-900',\n 'rounded-sm',\n 'shadow-sm',\n 'text-white',\n 'font-body',\n 'text-sm',\n 'leading-normal',\n 'whitespace-normal',\n 'px-3',\n 'py-2',\n 'z-10',\n 'will-change-transform',\n 'will-change-[opacity]',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=delayed-open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n size: {\n sm: ['max-w-25'],\n md: ['max-w-[250px]'],\n lg: ['max-w-100']\n }\n }\n})\n\nconst StyledArrow = styled(Arrow, {\n base: [\n 'fill-grey-900',\n 'in-data-[align=end]:mr-2',\n 'in-data-[align=start]:ml-2'\n ]\n})\n\ntype TooltipContentProps = React.ComponentProps<typeof StyledContent> &\n React.ComponentProps<typeof Content>\n\nexport const TooltipContent = ({\n children,\n side = 'top',\n sideOffset = 4,\n size = 'md',\n ...rest\n}: TooltipContentProps) => (\n <StyledContent side={side} sideOffset={sideOffset} size={size} {...rest}>\n {children}\n <StyledArrow />\n </StyledContent>\n)\n","import { Portal, Provider, Root, Trigger } from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { TooltipContent } from './TooltipContent'\n\ntype TooltipProps = React.ComponentProps<typeof Root>\n\nconst TooltipComponent = ({\n children,\n delayDuration = 350,\n ...rest\n}: TooltipProps) => (\n <Root delayDuration={delayDuration} {...rest}>\n {children}\n </Root>\n)\n\nexport const Tooltip = /* @__PURE__ */ Object.assign(TooltipComponent, {\n Content: TooltipContent,\n Trigger: Trigger,\n Portal: Portal,\n Provider: Provider\n})\n\nTooltipComponent.displayName = 'Tooltip'\n","import * as React from 'react'\n\nimport { Tooltip } from '../../components/tooltip/Tooltip'\n\nexport type OptionalTooltipWrapperProps = {\n hasTooltip?: boolean\n label?: React.ReactNode\n tooltipSide?: React.ComponentProps<typeof Tooltip.Content>['side']\n}\n\nexport const OptionalTooltipWrapper = ({\n hasTooltip,\n label,\n tooltipSide,\n children\n}: React.PropsWithChildren<OptionalTooltipWrapperProps>) => {\n if (hasTooltip) {\n return (\n <Tooltip>\n <Tooltip.Trigger\n asChild\n onFocus={(e: React.FocusEvent) => {\n // Only show the tooltip on keyboard focus, not programmatic focus\n // (e.g. when a dialog auto-focuses this element on open).\n // The browser sets :focus-visible during keyboard navigation,\n // so if it is absent we know the focus was not from the keyboard\n // and call preventDefault() to tell Radix to skip opening the tooltip.\n if (!(e.currentTarget as Element).matches(':focus-visible')) {\n e.preventDefault()\n }\n }}\n >\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content side={tooltipSide}>{label}</Tooltip.Content>\n </Tooltip>\n )\n }\n\n // children could be multiple elements/components,\n // so we need a fragment here.\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>\n}\n\nOptionalTooltipWrapper.displayName = 'OptionalTooltipWrapper'\n","// Deliberately syntactic (no window.location.origin comparison): the check\n// must give the same answer on server and client, or an SSR'd same-origin\n// absolute link renders target=\"_blank\" markup that the client would not.\n// Consumers wanting same-tab navigation should pass relative URLs.\nconst EXTERNAL_URL_RE = /^https?:\\/\\//\n\nexport const isExternalUrl = (url?: string) =>\n !!url && EXTERNAL_URL_RE.test(url)\n\nexport const getExternalAnchorProps = (url?: string) =>\n isExternalUrl(url) ? { target: '_blank', rel: 'noopener noreferrer' } : {}\n","import * as React from 'react'\n\ntype LinkComponent = React.ComponentType<\n React.AnchorHTMLAttributes<HTMLAnchorElement>\n>\n\ntype RouterContextValue = {\n link?: LinkComponent\n}\n\nconst RouterContext = React.createContext<RouterContextValue>({})\n\ntype RouterProviderProps = {\n link: LinkComponent\n children: React.ReactNode\n}\n\nexport const RouterProvider = ({ link, children }: RouterProviderProps) => {\n const value = React.useMemo<RouterContextValue>(() => ({ link }), [link])\n return (\n <RouterContext.Provider value={value}>{children}</RouterContext.Provider>\n )\n}\n\nconst isAbsoluteUrl = (url?: string) => /^https?:\\/\\//.test(url || '')\n\n// `as` is surfaced as the broad `React.ElementType` (not the narrower\n// `LinkComponent`) so it feeds straight into styled()'s polymorphic `as` prop:\n// a concrete component type makes TS infer element-specific props and reject the\n// call, whereas `ElementType` lets inference land on the polymorphic signature.\nconst EMPTY: { as?: React.ElementType } = {}\n\nexport const useRouterLinkProps = (\n href?: string,\n { reloadDocument }: { reloadDocument?: boolean } = {}\n): { as?: React.ElementType } => {\n const { link } = React.useContext(RouterContext)\n\n if (!link || !href || isAbsoluteUrl(href) || reloadDocument) {\n return EMPTY\n }\n\n return { as: link }\n}\n\nRouterProvider.displayName = 'Router.Provider'\n","export const ActionIconSizeMap = {\n xs: 'sm',\n sm: 'sm',\n md: 'md',\n lg: 'lg'\n}\n","import * as React from 'react'\nimport invariant from 'tiny-invariant'\n\nimport { styled } from '../../styled'\nimport type { OptionalTooltipWrapperProps } from '../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\nimport { OptionalTooltipWrapper } from '../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\nimport type { Override } from '../../utilities/types'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { Icon } from '../icon/Icon'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\nimport { ActionIconSizeMap } from './ActionIcon.constants'\n\nconst StyledButton = styled(\n 'button',\n {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-white',\n 'rounded-md',\n 'box-border',\n 'cursor-pointer',\n 'flex',\n 'shrink-0',\n 'justify-center',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n neutral: [\n '[--solid-base:var(--color-white)]',\n '[--solid-interact:var(--color-grey-100)]',\n '[--solid-active:var(--color-grey-200)]',\n '[--solid-text:var(--color-grey-1200)]',\n '[--base:var(--color-grey-700)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1100)]'\n ],\n primary: [\n '[--base:var(--color-primary-800)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1000)]'\n ],\n primaryDark: [\n '[--base:var(--color-primary-1000)]',\n '[--interact:var(--color-primary-1100)]',\n '[--active:var(--color-primary-1200)]'\n ],\n success: [\n '[--base:var(--color-success)]',\n '[--interact:var(--color-success-mid)]',\n '[--active:var(--color-success-dark)]'\n ],\n warning: [\n '[--base:var(--color-warning)]',\n '[--interact:var(--color-warning-mid)]',\n '[--active:var(--color-warning-dark)]'\n ],\n danger: [\n '[--base:var(--color-danger)]',\n '[--interact:var(--color-danger-mid)]',\n '[--active:var(--color-danger-dark)]'\n ],\n white: [\n '[--base:var(--color-white)]',\n '[--interact:var(--color-white)]',\n '[--active:var(--color-white)]'\n ]\n },\n appearance: {\n simple: [\n 'bg-transparent',\n 'text-(--base)',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ],\n outline: [\n 'bg-[unset]',\n 'border',\n 'border-current',\n 'text-(--base)',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ],\n solid: [\n 'bg-(--solid-base,var(--base))',\n 'text-(--solid-text,white)',\n 'not-disabled:hover:bg-(--solid-interact,var(--interact))',\n 'not-disabled:hover:text-(--solid-text,white)',\n 'not-disabled:focus:bg-(--solid-interact,var(--interact))',\n 'not-disabled:focus:text-(--solid-text,white)',\n 'not-disabled:active:bg-(--solid-active,var(--active))'\n ]\n },\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12']\n },\n isRounded: {\n true: ['rounded-full']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\ntype ActionIconProps = Override<\n React.ComponentProps<typeof StyledButton>,\n {\n as?: React.ElementType\n children: React.ReactNode\n href?: string\n label: string\n reloadDocument?: boolean\n } & Omit<OptionalTooltipWrapperProps, 'label'>\n>\n\nexport const ActionIcon = ({\n ref,\n children,\n theme = 'primary',\n appearance = 'simple',\n size = 'sm',\n label,\n href,\n disabled,\n hasTooltip = true,\n tooltipSide,\n reloadDocument,\n ...rest\n}: ActionIconProps) => {\n const INVALID_CHILDREN_MESSAGE = `A single ${Icon.name} component is permitted as a child of ActionIcon`\n\n invariant(React.Children.count(children) === 1, INVALID_CHILDREN_MESSAGE)\n\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n\n // Polymorphic props: can be either button or anchor element\n const optionalLinkProps = href\n ? ({\n as: routerLinkProps.as || 'a',\n href: disabled ? undefined : href,\n onClick: undefined,\n 'aria-disabled': !!disabled\n } as const)\n : ({ type: 'button' } as const)\n\n return (\n <OptionalTooltipWrapper\n hasTooltip={hasTooltip}\n label={label}\n tooltipSide={tooltipSide}\n >\n <StyledButton\n {...optionalLinkProps}\n {...getExternalAnchorProps(href)}\n {...rest}\n aria-label={label}\n theme={theme}\n appearance={appearance}\n size={size}\n ref={ref}\n disabled={disabled}\n >\n {React.Children.map(children, (child) => {\n // TS needs this check for any following code to access child.type\n // even with optional chaining\n if (!React.isValidElement(child)) {\n throw new Error(INVALID_CHILDREN_MESSAGE)\n }\n\n invariant(\n child.type === Icon,\n `Children of type ${child?.type} aren't permitted. Only an ${Icon.name} component is allowed in ActionIcon`\n )\n\n return React.cloneElement(\n child as React.ReactElement<React.ComponentProps<typeof Icon>>,\n {\n size: ActionIconSizeMap[size as string]\n }\n )\n })}\n </StyledButton>\n </OptionalTooltipWrapper>\n )\n}\n","import { Content, Overlay, Portal } from '@radix-ui/react-alert-dialog'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledAlertDialogOverlay = styled(Overlay, {\n base: [\n 'bg-alpha-600',\n 'top-0',\n 'right-0',\n 'bottom-0',\n 'left-0',\n 'fixed',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-fade-in',\n 'motion-safe:data-[state=closed]:animate-fade-out'\n ]\n})\nconst StyledAlertDialogContent = styled(Content, {\n base: [\n // `transform: translate()` is required for `floating-ui` to\n // correctly position elements within the Dialog component.\n // we can't use the translate property directly\n 'transform-[translate(-50%,-50%)]',\n 'bg-white',\n 'rounded-md',\n 'shadow-xl',\n 'box-border',\n 'left-1/2',\n 'max-w-[90vw]',\n 'p-8',\n 'fixed',\n 'top-1/2',\n 'focus:outline-none',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-slide-in-center',\n 'motion-safe:data-[state=closed]:animate-slide-out-center'\n ],\n variants: {\n size: {\n sm: ['w-95'],\n md: ['w-120'],\n lg: ['w-150']\n }\n }\n})\n\nexport const AlertDialogContent = ({\n size = 'sm',\n ...rest\n}: React.ComponentProps<typeof StyledAlertDialogContent>) => (\n <Portal>\n <StyledAlertDialogOverlay />\n <StyledAlertDialogContent size={size} {...rest} />\n </Portal>\n)\n","import {\n Action,\n Cancel,\n Description,\n Root,\n Title,\n Trigger\n} from '@radix-ui/react-alert-dialog'\nimport * as React from 'react'\n\nimport { AlertDialogContent } from './AlertDialogContent'\n\nexport const AlertDialog = /* @__PURE__ */ Object.assign(Root, {\n Description: Description,\n Title: Title,\n Action: Action,\n Cancel: Cancel,\n Content: AlertDialogContent,\n Trigger: Trigger\n})\n\nAlertDialog.displayName = 'AlertDialog'\n","import { useEffect, useRef } from 'react'\n\nexport const useIsMountedRef = () => {\n const isMountedRef = useRef<boolean | undefined>(undefined)\n\n useEffect(() => {\n isMountedRef.current = true\n return () => {\n isMountedRef.current = false\n }\n })\n\n return isMountedRef\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\n\nconst Dot = styled('div', {\n base: [\n 'animate-pulse',\n 'bg-current',\n 'rounded-full',\n 'animation-duration-900',\n 'nth-3:animation-delay-300',\n 'nth-4:animation-delay-600'\n ],\n variants: {\n size: {\n sm: ['size-1', 'mx-0.5'],\n md: ['size-1.5', 'mx-0.5'],\n lg: ['size-2', 'mx-[3px]']\n }\n }\n})\n\ntype LoaderProps = React.ComponentProps<'div'> & {\n message?: string\n size?: 'sm' | 'md' | 'lg'\n}\n\nexport const Loader = ({\n className,\n message = 'Loading',\n size = 'md',\n ...rest\n}: LoaderProps) => (\n <div\n className={cn('flex', 'justify-center', className)}\n role=\"alert\"\n {...rest}\n >\n <span className=\"sr-only\">{message}</span>\n <Dot size={size} />\n <Dot size={size} />\n <Dot size={size} />\n </div>\n)\n","import * as React from 'react'\n\nimport { type PolymorphicComponent, styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { Loader } from '../loader/Loader'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\n\nexport const StyledButton = styled(\n 'button',\n {\n base: [\n 'items-center',\n 'bg-[unset]',\n 'rounded-md',\n 'cursor-pointer',\n 'flex',\n 'font-body',\n 'font-semibold',\n 'justify-center',\n 'no-underline',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'whitespace-nowrap',\n 'w-max',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n primary: [\n '[--base:var(--color-primary-800)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1000)]'\n ],\n secondary: [\n '[--base:var(--color-primary-1000)]',\n '[--interact:var(--color-primary-1100)]',\n '[--active:var(--color-primary-1200)]'\n ],\n success: [\n '[--base:var(--color-success)]',\n '[--interact:var(--color-success-mid)]',\n '[--active:var(--color-success-dark)]'\n ],\n warning: [\n '[--base:var(--color-warning)]',\n '[--interact:var(--color-warning-mid)]',\n '[--active:var(--color-warning-dark)]',\n '[--text:var(--color-grey-800)]'\n ],\n danger: [\n '[--base:var(--color-danger)]',\n '[--interact:var(--color-danger-mid)]',\n '[--active:var(--color-danger-dark)]'\n ],\n neutral: [\n '[--base:white]',\n '[--interact:rgba(255,255,255,0.9)]',\n '[--active:rgba(255,255,255,0.75)]',\n '[--text:var(--color-primary-800)]'\n ]\n },\n appearance: {\n solid: [\n 'bg-(--base)',\n 'text-(--text,white)',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'not-disabled:hover:bg-(--interact)',\n 'not-disabled:hover:text-(--text,white)',\n 'not-disabled:focus:bg-(--interact)',\n 'not-disabled:focus:text-(--text,white)',\n 'not-disabled:active:bg-(--active)'\n ],\n outline: [\n 'border',\n 'border-current',\n 'text-(--base)',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'not-disabled:hover:no-underline',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:no-underline',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ]\n },\n size: {\n sm: [\n 'text-sm',\n 'leading-[1.53]',\n 'h-8',\n 'px-4',\n 'gap-2',\n '[&_svg]:size-4'\n ],\n md: [\n 'text-md',\n 'leading-normal',\n 'h-10',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-5'\n ],\n lg: [\n 'text-lg',\n 'leading-normal',\n 'h-12',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-[22px]'\n ],\n xl: [\n 'text-lg',\n 'leading-normal',\n 'h-16',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-[22px]'\n ]\n },\n isLoading: {\n true: ['cursor-not-allowed', 'opacity-60', 'pointer-events-none']\n },\n fullWidth: {\n true: ['w-full'],\n false: ['w-max']\n }\n },\n defaultVariants: {\n appearance: 'solid',\n size: 'md',\n theme: 'primary'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\n// @__PURE__ keeps this tree-shakable for consumers importing only\n// StyledButton from this module.\nconst LoaderContentsWrapper = /* @__PURE__ */ styled(\n 'span',\n {\n base: ['items-center', 'flex', 'justify-center', 'invisible'],\n variants: {\n size: {\n sm: ['gap-2'],\n md: ['gap-3'],\n lg: ['gap-3'],\n xl: ['gap-3']\n }\n },\n defaultVariants: {\n size: 'md'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst WithLoader = ({\n size,\n children\n}: React.ComponentProps<typeof LoaderContentsWrapper>) => (\n <>\n <Loader className=\"absolute\" />\n <LoaderContentsWrapper size={size}>{children}</LoaderContentsWrapper>\n </>\n)\n\ntype ButtonCustomProps = {\n children: React.ReactNode\n href?: string\n isLoading?: boolean\n reloadDocument?: boolean\n}\n\ntype ButtonProps = Override<\n React.ComponentProps<typeof StyledButton>,\n ButtonCustomProps & { as?: React.ElementType }\n>\n\n// Re-expose StyledButton's variant props merged with our own, so the public\n// polymorphic type re-checks props against whatever `as` target is passed\ntype StyledButtonOwnProps =\n typeof StyledButton extends PolymorphicComponent<\n infer _Element extends React.ElementType,\n infer OwnProps\n >\n ? OwnProps\n : never\n\ntype ButtonOwnProps = Override<StyledButtonOwnProps, ButtonCustomProps>\n\nexport const Button = (({\n ref,\n children,\n as,\n href,\n isLoading = false,\n onClick,\n disabled,\n reloadDocument,\n ...rest\n}: ButtonProps) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n\n return (\n <StyledButton\n as={as || routerLinkProps.as || (href ? 'a' : undefined)}\n {...(!disabled && !isLoading && { href, onClick })}\n isLoading={isLoading}\n type={!href ? 'button' : undefined}\n disabled={disabled}\n {...rest}\n {...getExternalAnchorProps(href)}\n ref={ref}\n >\n {isLoading ? (\n <WithLoader size={rest.size}>{children}</WithLoader>\n ) : (\n children\n )}\n </StyledButton>\n )\n}) as PolymorphicComponent<'button', ButtonOwnProps>\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nexport const Heading = styled(\n 'h2',\n {\n base: ['m-0'],\n variants: {\n size: {\n xs: ['font-body', 'text-md', 'leading-normal', 'capsize-[0.3864]'],\n sm: ['font-body', 'text-lg', 'leading-[1.14]', 'capsize-[0.2078]'],\n md: [\n 'font-display',\n 'text-xl',\n 'leading-[1.14]',\n 'tracking-[0.01em]',\n 'capsize-before-[0.2114]',\n 'capsize-after-[0.2634]'\n ],\n lg: [\n 'font-display',\n 'text-2xl',\n 'leading-[1.08]',\n 'tracking-[0.01em]',\n 'capsize-before-[0.1405]',\n 'capsize-after-[0.2405]'\n ],\n xl: [\n 'font-display',\n 'text-3xl',\n 'leading-[1.12]',\n 'capsize-before-[0.16]',\n 'capsize-after-[0.26]'\n ],\n xxl: [\n 'font-display',\n 'text-4xl',\n 'leading-none',\n 'capsize-before-[0.1]',\n 'capsize-after-[0.2]'\n ]\n },\n noCapsize: {\n true: ['capsize-none']\n },\n weight: {\n medium: ['font-medium'],\n bold: ['font-bold']\n }\n },\n defaultVariants: {\n size: 'md',\n weight: 'bold'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport type HeadingProps = Override<\n React.ComponentProps<typeof Heading>,\n {\n as?:\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | React.ComponentType\n | React.ElementType\n }\n>\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nexport const Text = styled(\n 'p',\n {\n base: ['m-0'],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]'],\n '2xl': ['text-2xl', 'leading-[1.40]', 'capsize-[0.3336]'],\n '3xl': ['text-3xl', 'leading-[1.28]', 'capsize-[0.2709]'],\n '4xl': ['text-4xl', 'leading-none', 'capsize-[0.1309]']\n },\n noCapsize: {\n true: ['capsize-none']\n },\n weight: {\n normal: ['font-normal'],\n bold: ['font-semibold']\n },\n family: {\n body: ['font-body'],\n display: ['font-display'],\n mono: ['font-mono']\n }\n },\n defaultVariants: {\n size: 'md',\n family: 'body'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport type TextProps = Override<\n React.ComponentProps<typeof Text>,\n {\n as?:\n | 'blockquote'\n | 'caption'\n | 'dd'\n | 'dt'\n | 'figcaption'\n | 'li'\n | 'p'\n | 'span'\n | 'legend'\n | React.ComponentType\n | React.ElementType\n }\n>\n","import { Danger, Info, OkCircle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Icon } from '../../icon/Icon'\n\nexport type AlertDialogTheme = 'info' | 'warning' | 'danger' | 'success'\n\nconst StyledIcon = styled(Icon, {\n base: ['self-start'],\n variants: {\n theme: {\n info: ['text-info'],\n warning: ['text-warning-mid'],\n danger: ['rotate-180', 'text-danger'],\n success: ['text-success']\n }\n }\n})\n\nconst iconMap: Record<\n AlertDialogTheme,\n React.FC<React.SVGProps<SVGSVGElement>>\n> = {\n info: Info,\n warning: Danger,\n danger: Info,\n success: OkCircle\n}\n\nexport const AlertDialogIcon = ({ theme }: { theme: AlertDialogTheme }) => (\n <StyledIcon theme={theme} is={iconMap[theme]} />\n)\n","import * as React from 'react'\n\nimport { Button } from '../../button/Button'\nimport { Heading } from '../../heading/Heading'\nimport { Text } from '../../text/Text'\nimport { AlertDialog } from '../AlertDialog'\nimport { AlertDialogIcon } from './AlertDialogIcon'\nimport type { alert } from './types'\n\ntype AlertDialogContentProps = React.ComponentProps<typeof AlertDialog> & {\n className?: string\n onClose: () => void\n} & alert\n\nexport const Alert = ({\n title,\n size,\n theme,\n description,\n onAction,\n cancelActionText,\n confirmActionText,\n onClose,\n confirmElement,\n cancelElement,\n ...rest\n}: AlertDialogContentProps) => (\n <AlertDialog defaultOpen>\n <AlertDialog.Content\n size={size}\n onEscapeKeyDown={(e) => e.preventDefault()}\n onCloseAutoFocus={onClose}\n {...rest}\n className=\"flex max-h-[90vh] flex-col gap-8\"\n >\n <div className=\"flex items-center gap-2\">\n {theme && <AlertDialogIcon theme={theme} />}\n <Heading as={AlertDialog.Title} size=\"sm\" className=\"mr-4\">\n {title}\n </Heading>\n </div>\n {description && (\n <Text as={AlertDialog.Description} className=\"flex overflow-y-auto\">\n {description}\n </Text>\n )}\n <div className=\"flex flex-wrap justify-end gap-2\">\n <AlertDialog.Cancel asChild>\n {cancelElement ||\n (cancelActionText && (\n <Button\n size=\"sm\"\n appearance=\"outline\"\n onClick={() => onAction?.(false)}\n >\n {cancelActionText}\n </Button>\n ))}\n </AlertDialog.Cancel>\n <AlertDialog.Action asChild>\n {confirmElement || (\n <Button size=\"sm\" onClick={() => onAction?.(true)}>\n {confirmActionText}\n </Button>\n )}\n </AlertDialog.Action>\n </div>\n </AlertDialog.Content>\n </AlertDialog>\n)\n","import type { alert } from './types'\n\ntype State = alert[]\ntype Action =\n | { type: 'ADD'; payload: alert }\n | { type: 'REMOVE'; payload: string }\n\nexport const initialState = []\n\n// Reducers must be pure — ids are minted by the caller (showAlert) before\n// dispatch; minted here they would diverge under StrictMode's double-invoke.\nexport const reducer = (state: State, action: Action): alert[] => {\n switch (action.type) {\n case 'ADD':\n return [...state, action.payload]\n case 'REMOVE':\n return state.filter(({ id }) => id !== action.payload)\n default:\n return state\n }\n}\n","import * as React from 'react'\n\nimport { useIsMountedRef } from '../../utilities/hooks/useIsMountedRef'\nimport { Alert } from './alert-context/AlertDialog'\nimport { initialState, reducer } from './alert-context/reducer'\nimport type { alert } from './alert-context/types'\n\ntype context = {\n showAlert: (data: alert) => void\n}\n\n// undefined default so useAlert's missing-provider guard can fire — a default\n// object would make showAlert outside a provider a silent no-op.\nconst AlertContext = React.createContext<context | undefined>(undefined)\n\nexport const AlertProvider = ({\n children\n}: React.PropsWithChildren<unknown>) => {\n const [alerts, dispatch] = React.useReducer(reducer, initialState)\n const isMountedRef = useIsMountedRef()\n\n // dispatch is stable, so the provider value never needs to change identity.\n const value = React.useMemo<context>(\n () => ({\n showAlert: (content: alert) =>\n dispatch({\n // The id is minted here, not in the reducer — reducers must stay\n // pure (StrictMode double-invokes them). crypto.randomUUID requires\n // a secure context, which consumers of this library always have.\n payload: { ...content, id: crypto.randomUUID() },\n type: 'ADD'\n })\n }),\n []\n )\n\n return (\n <AlertContext value={value}>\n {Boolean(alerts.length) && (\n <Alert\n {...alerts[0]}\n key={alerts[0].id}\n onClose={() => {\n if (isMountedRef.current)\n dispatch({\n payload: alerts[0].id,\n type: 'REMOVE'\n })\n }}\n />\n )}\n {children}\n </AlertContext>\n )\n}\n\nexport const useAlert = (): context => {\n const context = React.use(AlertContext)\n\n if (context === undefined) {\n throw new Error('useAlert must be used within a AlertProvider')\n }\n\n return context\n}\n","import { AlertProvider } from './AlertDialog.context'\n\n// The alert system's provider lives under the `Alert` name; the alert UI\n// itself is imperative (`useAlert`), so there is no root component to render.\n// This compound must live in its own module, not the components barrel — a\n// value declared in the barrel forces the root barrel's `export *` to pull the\n// whole barrel (all components) into the eager entry chunk instead of resolving\n// each export to its individual module.\nexport const Alert = { Provider: AlertProvider }\n","import * as React from 'react'\n\nexport type AvatarRootContextValue = {\n name?: string\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'\n}\n\nexport const AvatarRootContext = React.createContext<AvatarRootContextValue>({\n name: undefined,\n size: 'lg'\n})\n","/*\n * Utility function to allow for overriding responsive variants using logic provided via the `overrideFunction` argument.\n *\n * It was developed out of a design requirement to override and pass through size properties to the <Icon /> component; depending\n * on the size of its parent component. It could be used for various other props where we want to tweak the value but\n * maintain the flexibility of a stitches variant property (which allows for use either via a string or a breakpoint object)\n * Documentation on stitches responsive variants: https://stitches.dev/docs/breakpoints#responsive-variants\n *\n */\nexport const overrideStyledVariantValue = (\n prop: any,\n overrideFunction: (any) => any\n) => {\n let overrideValue\n switch (typeof prop) {\n case 'object':\n overrideValue = {}\n Object.keys(prop).forEach((breakpoint) => {\n const propAtBreakpoint = prop[breakpoint]\n overrideValue[breakpoint] = propAtBreakpoint\n ? overrideFunction(propAtBreakpoint)\n : propAtBreakpoint\n })\n break\n default:\n overrideValue = overrideFunction(prop)\n }\n\n return overrideValue\n}\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Icon } from '../icon/Icon'\nimport { AvatarRootContext } from './Avatar.context'\n\nconst toIconSize = {\n xs: 'sm',\n sm: 'sm',\n md: 'md',\n lg: 'md',\n xl: 'lg',\n xxl: 'lg'\n}\n\ntype AvatarIcon = {\n is: React.FC<React.SVGProps<SVGSVGElement>>\n}\n\nexport const AvatarIcon = ({ is }: AvatarIcon) => {\n const rootContext = React.use(AvatarRootContext)\n const { size } = rootContext\n const iconSize = overrideStyledVariantValue(size, (s) => toIconSize[s])\n\n return <Icon size={iconSize} is={is} />\n}\n","import * as React from 'react'\n\nimport { type PolymorphicComponent, styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\n\nexport const StyledLink = styled(\n 'a',\n {\n base: [\n 'bg-[unset]',\n 'text-primary-800',\n 'cursor-pointer',\n 'font-body',\n 'no-underline',\n 'focus:text-primary-900',\n 'focus:underline',\n 'hover:text-primary-900',\n 'hover:underline',\n 'active:text-primary-1000',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:after:content-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:before:content-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:text-[100%]/none'\n ],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]']\n },\n noCapsize: {\n true: ['capsize-none']\n }\n },\n defaultVariants: {\n size: 'md'\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype LinkCustomProps = {\n disabled?: boolean\n reloadDocument?: boolean\n}\n\ntype LinkProps = Override<\n React.ComponentProps<typeof StyledLink>,\n LinkCustomProps & { as?: React.ElementType }\n>\n\n// Re-expose StyledLink's variant props merged with our own, so the public\n// polymorphic type re-checks props against whatever `as` target is passed\ntype StyledLinkOwnProps =\n typeof StyledLink extends PolymorphicComponent<\n infer _Element extends React.ElementType,\n infer OwnProps\n >\n ? OwnProps\n : never\n\ntype LinkOwnProps = Override<StyledLinkOwnProps, LinkCustomProps>\n\nexport const Link = (({\n ref,\n as,\n disabled,\n href,\n reloadDocument,\n ...rest\n}: LinkProps) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n\n return (\n <StyledLink\n as={as || routerLinkProps.as || (!href ? 'button' : undefined)}\n noCapsize={!href ? true : undefined}\n href={href}\n {...(disabled && { disabled: true })}\n {...rest}\n {...getExternalAnchorProps(href)}\n ref={ref}\n />\n )\n}) as PolymorphicComponent<'a', LinkOwnProps>\n","import { Close, Info } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Link } from '../link/Link'\n\nexport type ImageCreditProps = {\n /** Creator name, shown once the credit is revealed. */\n author: string\n /** Link to the author / image source. */\n sourceUrl?: string\n /** Human-readable license name, e.g. \"CC BY 4.0\". */\n licenseName?: string\n /** Link to the license terms. */\n licenseUrl?: string\n}\n\n// Shared surface/interaction styles for the controls overlaid on the image.\nconst overlayControlClasses = [\n 'not-disabled:hover:bg-black/75',\n 'focus:outline-none',\n 'focus-visible:ring-2',\n 'focus-visible:ring-white/70'\n]\nconst overlayLinkClasses = [\n 'text-white',\n 'underline-offset-2',\n 'hover:text-white',\n 'focus:text-white',\n 'active:text-white'\n]\n\nexport const ImageCredit = ({\n author,\n sourceUrl,\n licenseName,\n licenseUrl\n}: ImageCreditProps) => {\n const [expanded, setExpanded] = React.useState(false)\n\n if (!expanded) {\n return (\n <ActionIcon\n label=\"Show image credit\"\n theme=\"white\"\n isRounded\n hasTooltip={false}\n onClick={() => setExpanded(true)}\n className={cn(\n 'absolute',\n 'right-2',\n 'bottom-2',\n 'bg-black/60',\n 'backdrop-blur-sm',\n overlayControlClasses\n )}\n >\n <Icon is={Info} />\n </ActionIcon>\n )\n }\n\n return (\n <div\n className={cn(\n 'absolute',\n 'right-2',\n 'bottom-2',\n 'flex',\n 'max-w-[calc(100%-1rem)]',\n 'items-center',\n 'gap-1',\n 'rounded-md',\n 'bg-black/60',\n 'pl-2',\n 'text-xs',\n 'text-white',\n 'backdrop-blur-sm'\n )}\n >\n {/* Author and licence sit on one line when they fit, and wrap onto\n separate rows (each kept whole) when they don't. */}\n <figcaption className=\"flex min-w-0 flex-wrap items-center gap-x-1\">\n {sourceUrl ? (\n <Link href={sourceUrl} size=\"xs\" className={cn(overlayLinkClasses)}>\n {author}\n </Link>\n ) : (\n <span>{author}</span>\n )}\n {licenseName ? (\n <span className=\"flex items-center gap-x-1\">\n <span aria-hidden=\"true\">·</span>\n {licenseUrl ? (\n <Link\n href={licenseUrl}\n size=\"xs\"\n className={cn(overlayLinkClasses)}\n >\n {licenseName}\n </Link>\n ) : (\n <span>{licenseName}</span>\n )}\n </span>\n ) : null}\n </figcaption>\n <ActionIcon\n label=\"Hide credit\"\n theme=\"white\"\n isRounded\n hasTooltip={false}\n onClick={() => setExpanded(false)}\n className={cn(overlayControlClasses)}\n >\n <Icon is={Close} />\n </ActionIcon>\n </div>\n )\n}\n\nImageCredit.displayName = 'Image.Credit'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { ImageCredit } from './ImageCredit'\n\n// default styling lifted from https://www.zachleat.com/web/fluid-images/#copy-and-paste\n// (potentially unnecessary now we've moved to Tailwind)\nexport const StyledImage = styled(\n 'img',\n {\n base: ['align-middle', 'max-w-full'],\n variants: {\n fluid: {\n true: [\n \"[[src$='.svg']]:h-auto\",\n \"[[src$='.svg']]:max-w-none\",\n \"[[src$='.svg']]:w-full\",\n '[[width]]:[[height]]:h-auto',\n '[[width]]:w-auto'\n ]\n }\n }\n },\n { enablePolymorphism: false }\n)\n\ntype ImageProps = Override<\n React.ComponentProps<typeof StyledImage>,\n { children?: React.ReactNode }\n>\n\nconst ImageComponent = ({ children, ref, ...props }: ImageProps) => {\n if (!children) {\n return <StyledImage {...props} ref={ref} />\n }\n\n return (\n <figure className=\"relative overflow-hidden\">\n <StyledImage {...props} ref={ref} />\n {children}\n </figure>\n )\n}\n\nexport const Image = /* @__PURE__ */ Object.assign(ImageComponent, {\n Credit: ImageCredit,\n displayName: 'Image'\n})\n","import { User } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const AvatarPlaceholder = () => (\n <div className=\"relative size-full\">\n <Icon is={User} className=\"size-full\" />\n </div>\n)\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Text } from '../text/Text'\nimport { AvatarRootContext } from './Avatar.context'\nimport { AvatarPlaceholder } from './AvatarPlaceholder'\n\nconst toTextSize = {\n xs: 'xs',\n sm: 'sm',\n md: 'sm',\n lg: 'md',\n xl: 'md',\n xxl: 'lg'\n}\n\nexport const AvatarInitial = () => {\n const rootContext = React.use(AvatarRootContext)\n const { name, size } = rootContext\n const textSize = overrideStyledVariantValue(size, (s) => toTextSize[s])\n\n if (!name) {\n return <AvatarPlaceholder />\n }\n\n return (\n <Text size={textSize} className=\"text-grey-800\">\n {name[0].toUpperCase()}\n </Text>\n )\n}\n","import * as React from 'react'\n\nimport { Image } from '../image/Image'\nimport { AvatarInitial } from './AvatarInitial'\n\nexport const AvatarImage = ({ src, alt }: { src: string; alt: string }) => {\n if (!src) {\n return <AvatarInitial />\n }\n\n return <Image className=\"size-full object-cover\" src={src} alt={alt} />\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport type { AvatarRootContextValue } from './Avatar.context'\nimport { AvatarRootContext } from './Avatar.context'\nimport { AvatarIcon } from './AvatarIcon'\nimport { AvatarImage } from './AvatarImage'\nimport { AvatarInitial } from './AvatarInitial'\nimport { AvatarPlaceholder } from './AvatarPlaceholder'\n\nconst avatarRootStyles = [\n 'flex',\n 'justify-center',\n 'items-center',\n 'text-grey-800',\n 'rounded-full',\n 'border-2',\n 'border-grey-200',\n 'bg-(--bg-color)',\n 'overflow-hidden'\n]\n\nconst StyledDiv = /* @__PURE__ */ styled('div', {\n base: avatarRootStyles,\n variants: {\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12'],\n xl: ['size-16'],\n xxl: ['size-24']\n },\n emphasis: {\n bold: ['border-0', '[&>p]:text-white'],\n subtle: ['border-0'],\n white: []\n }\n }\n})\n\nconst StyledButton = /* @__PURE__ */ styled('button', {\n base: [\n ...avatarRootStyles,\n 'not-disabled:active:bg-grey-200',\n 'not-disabled:active:border-primary-800',\n 'not-disabled:hover:bg-grey-100',\n 'not-disabled:hover:border-grey-800',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12'],\n xl: ['size-16'],\n xxl: ['size-24']\n },\n emphasis: {\n bold: ['border-0', '[&>p]:text-white'],\n subtle: ['border-0'],\n white: []\n }\n }\n})\n\ntype AvatarProps = React.ComponentProps<\n typeof StyledDiv | typeof StyledButton\n> & {\n name?: string\n} & (\n | {\n onClick: React.MouseEventHandler<HTMLButtonElement>\n disabled?: boolean\n }\n | { onClick?: never; disabled?: never }\n )\n\nexport { AvatarRootContext }\nexport type { AvatarRootContextValue }\n\nexport const AvatarRootProvider = ({ children, name, size }: AvatarProps) => {\n const value = React.useMemo<AvatarRootContextValue>(\n () => ({ name, size }),\n [name, size]\n )\n\n return <AvatarRootContext value={value}>{children}</AvatarRootContext>\n}\n\nconst DS_COLORS = [\n 'maroon',\n 'red',\n 'magenta',\n 'pink',\n 'purple',\n 'lapis',\n 'blue',\n 'cyan',\n 'teal',\n 'green',\n 'lime',\n 'yellow',\n 'orange'\n] as const\n\nconst getBackgroundColor = ({\n emphasis,\n name\n}: Pick<AvatarProps, 'emphasis' | 'name'>) => {\n if (emphasis === 'white' || !name) return 'white'\n const index = name.toLocaleUpperCase().charCodeAt(0) % DS_COLORS.length\n return `var(--color-${DS_COLORS[index]}-${emphasis === 'bold' ? 700 : 300})`\n}\n\nexport const AvatarRoot = ({\n children,\n size = 'lg',\n name,\n emphasis = 'white',\n disabled = false,\n onClick\n}: AvatarProps) => {\n const backgroundColor = getBackgroundColor({ emphasis, name })\n return (\n <AvatarRootProvider name={name} size={size}>\n {onClick ? (\n <StyledButton\n size={size}\n style={{\n '--bg-color': backgroundColor\n }}\n disabled={disabled}\n onClick={disabled ? undefined : onClick}\n className={cn(disabled ? 'cursor-auto' : 'cursor-pointer')}\n emphasis={emphasis}\n >\n {children}\n </StyledButton>\n ) : (\n <StyledDiv\n size={size}\n style={{\n '--bg-color': backgroundColor\n }}\n emphasis={emphasis}\n >\n {children}\n </StyledDiv>\n )}\n </AvatarRootProvider>\n )\n}\n\nexport const Avatar = /* @__PURE__ */ Object.assign(AvatarRoot, {\n Image: AvatarImage,\n Initial: AvatarInitial,\n Placeholder: AvatarPlaceholder,\n Icon: AvatarIcon\n})\n\nAvatarRoot.displayName = 'Avatar'\n","import * as React from 'react'\n\nexport const useCallbackRef: () => [\n React.RefObject<HTMLElement | null>,\n (el: HTMLElement | null) => void | (() => void)\n] = () => {\n const elRef = React.useRef<HTMLElement | null>(null)\n\n // React 19 ref-callback cleanup: the ref must be cleared on detach, or it\n // retains the unmounted DOM node — stale reads and a memory leak.\n const setElRefCallback = React.useCallback((el: HTMLElement | null) => {\n elRef.current = el\n return () => {\n elRef.current = null\n }\n }, [])\n\n return [elRef, setElRefCallback]\n}\n\nexport const useCallbackRefState: () => [\n HTMLElement | null,\n (el: HTMLElement | null) => void\n] = () => {\n const [elRef, setElRef] = React.useState<HTMLElement | null>(null)\n const hasElement = React.useRef(false)\n\n const setElRefCallback = React.useCallback((el: HTMLElement | null) => {\n // Commit the attached node to state exactly once — the first time one\n // becomes available — and never again. Under React 19 concurrent rendering\n // with heavy CPU contention, renders get interrupted and re-run, so the DOM\n // node attached via the callback ref churns: React commits and replaces the\n // node, firing this callback with a fresh identity each time. The previous\n // `prev === el ? prev : el` guard couldn't catch that — a new identity is\n // never `=== prev` — so every churn scheduled another render, which churned\n // the node again: an unbounded \"Maximum update depth exceeded\" loop.\n //\n // A one-shot setState makes the returned element reference stable and the\n // loop structurally impossible (later invocations are no-ops). All consumers\n // attach this to a single, always-mounted element, so the first node is the\n // node — there is no element swap to miss.\n //\n // NOTE: re-verified against React 19 ref-callback cleanups (2026-07): a\n // cleanup-based attach/detach setState rewrite still loops — the regression\n // test in useCallbackRef.test.tsx fails with \"Maximum update depth\n // exceeded\". Cleanups don't help when every render mints a new node.\n if (el && !hasElement.current) {\n hasElement.current = true\n setElRef(el)\n }\n }, [])\n\n return [elRef, setElRefCallback]\n}\n","/*\n\t•\tFactory for non-semantic color schemes\n*/\nconst createScheme = (c: string, overrides: Record<string, string> = {}) => ({\n '--text-subtle': `var(--color-${c}-1000)`,\n '--background-subtle': `var(--color-${c}-200)`,\n '--text-subtle-hover': `var(--color-${c}-1100)`,\n '--background-subtle-hover': `var(--color-${c}-300)`,\n '--text-bold': 'white',\n '--background-bold': `var(--color-${c}-800)`,\n '--background-bold-hover': `var(--color-${c}-900)`,\n '--text-on-white': `var(--color-${c}-800)`,\n ...overrides\n})\n\n/*\n\t•\tSemantic themes\n*/\nconst info = {\n '--text-subtle': 'var(--color-info-mid)',\n '--background-subtle': 'var(--color-info-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-info)',\n '--text-on-white': 'var(--color-info)'\n}\nconst neutral = {\n '--text-subtle': 'var(--color-grey-900)',\n '--background-subtle': 'var(--color-grey-100)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-grey-800)',\n '--text-on-white': 'var(--color-grey-800)'\n}\nconst success = {\n '--text-subtle': 'var(--color-success-mid)',\n '--background-subtle': 'var(--color-success-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-success)',\n '--text-on-white': 'var(--color-success)'\n}\nconst danger = {\n '--text-subtle': 'var(--color-danger-mid)',\n '--background-subtle': 'var(--color-danger-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-danger)',\n '--text-on-white': 'var(--color-danger)'\n}\nconst warning = {\n '--text-subtle': 'var(--color-warning-text)',\n '--background-subtle': 'var(--color-warning-light)',\n '--text-bold': 'var(--color-grey-1000)',\n '--background-bold': 'var(--color-warning)',\n '--text-on-white': 'var(--color-warning)'\n}\n\n/*\n\t•\tNon-semantic themes\n*/\nexport const badgeSemanticNames = [\n 'info',\n 'neutral',\n 'success',\n 'danger',\n 'warning'\n]\nexport const colorSchemes = {\n info,\n neutral,\n success,\n danger,\n warning,\n primary: createScheme('primary'),\n grey: createScheme('grey'),\n blue: createScheme('blue'),\n pink: createScheme('pink'),\n purple: createScheme('purple', {\n '--text-on-white': 'var(--color-purple-700)'\n }),\n cyan: createScheme('cyan'),\n green: createScheme('green'),\n magenta: createScheme('magenta'),\n red: createScheme('red', {\n '--background-subtle-hover': 'var(--color-red-400)'\n }),\n teal: createScheme('teal'),\n orange: createScheme('orange', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-orange-600)',\n '--background-bold-hover': 'var(--color-orange-700)',\n '--text-on-white': 'var(--color-orange-1000)'\n }),\n yellow: createScheme('yellow', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-yellow-500)',\n '--background-bold-hover': 'var(--color-yellow-600)',\n '--text-on-white': 'var(--color-yellow-900)'\n }),\n lime: createScheme('lime', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-lime-600)',\n '--background-bold-hover': 'var(--color-lime-700)',\n '--text-on-white': 'var(--color-lime-900)'\n }),\n lapis: createScheme('lapis', {\n '--background-bold': 'var(--color-lapis-700)',\n '--text-on-white': 'var(--color-lapis-700)'\n }),\n maroon: createScheme('maroon', {\n '--text-on-white': 'var(--color-maroon-700)'\n }),\n marsh: createScheme('marsh', { '--text-on-white': 'var(--color-marsh-700)' })\n}\n","import * as React from 'react'\n\nimport type { BadgeProps } from './Badge'\nimport type { BadgeOverflow } from './Badge.types'\n\ntype BadgeProviderProps = {\n size?: BadgeProps['size']\n overflow?: BadgeOverflow\n}\n\ntype BadgeContext = BadgeProviderProps & {\n isOverflowing?: boolean\n setIsOverflowing?: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nexport const BadgeContext = React.createContext<BadgeContext>({})\n\nexport const BadgeProvider = ({\n size,\n overflow,\n children\n}: React.PropsWithChildren<BadgeProviderProps>) => {\n const [isOverflowing, setIsOverflowing] = React.useState(false)\n\n const value = React.useMemo<BadgeContext>(\n () => ({ size, overflow, isOverflowing, setIsOverflowing }),\n [size, overflow, isOverflowing, setIsOverflowing]\n )\n return <BadgeContext value={value}>{children}</BadgeContext>\n}\n","import * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const BadgeIcon = (props: React.ComponentProps<typeof Icon>) => (\n <Icon size=\"sm\" {...props} />\n)\n","import * as React from 'react'\nimport { debounce } from 'throttle-debounce'\n\ntype UseResizeObserverOptions = {\n elements: (HTMLElement | undefined | null)[]\n onResize: (entries: ResizeObserverEntry[]) => void\n delay?: number\n}\n\ntype UseResizeObserverOutput = ResizeObserver | null\n\nconst createResizeObserver = (\n callback: (entries: ResizeObserverEntry[]) => void\n) => {\n try {\n return new ResizeObserver(callback)\n } catch {\n return null\n }\n}\n\nexport const useResizeObserver = ({\n delay = 500,\n elements,\n onResize\n}: UseResizeObserverOptions): UseResizeObserverOutput => {\n // Keep the latest `onResize` in a ref so the observer is only recreated when\n // `delay` changes. Otherwise a callback whose identity changes on render (e.g.\n // `useSize`'s `handleResize`, which depends on `element`) would recreate and\n // re-subscribe the observer, and `ResizeObserver` fires its initial callback\n // on every `observe()` — a measure → setState → re-render → re-subscribe loop\n // that surfaces as \"Maximum update depth exceeded\".\n const onResizeRef = React.useRef(onResize)\n React.useLayoutEffect(() => {\n onResizeRef.current = onResize\n })\n\n // The observer is an OS-backed resource, so it must be created inside an\n // effect — created during render it would leak whenever React discards a\n // render (StrictMode, interrupted renders). The debounced callback is\n // cancelled on cleanup so no trailing invocation fires after the observer\n // is gone.\n const [observer, setObserver] = React.useState<ResizeObserver | null>(null)\n\n React.useEffect(() => {\n const debouncedOnResize = debounce(\n delay,\n (entries: ResizeObserverEntry[]) => onResizeRef.current(entries)\n )\n const resizeObserver = createResizeObserver(debouncedOnResize)\n setObserver(resizeObserver)\n\n return () => {\n debouncedOnResize.cancel()\n resizeObserver?.disconnect()\n }\n }, [delay])\n\n React.useEffect(() => {\n if (!observer) return\n\n elements.forEach((element) => {\n if (element) observer.observe(element)\n })\n\n // `disconnect` drops every observation this effect registered in one call,\n // so the subscription can never outlive the effect (per-element `unobserve`\n // would leak any element whose ref changed between subscribe and cleanup).\n return () => observer.disconnect()\n }, [observer, elements])\n\n return observer\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { useResizeObserver } from '../../utilities/hooks/useResizeObserver'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Text } from '../text/Text'\nimport { BadgeContext } from './Badge.context'\n\n/*\n * Instead of sticking a resize observer on every `BadgeText`\n * regardless of overflow type, split the resize logic into a component.\n * Basically call the hook conditionally, only for the version with\n * the `overflow === 'ellipsis'` which needs it.\n * This saves us from initialising a resize observer for any badge which doesn't need it.\n */\nconst ObserveBadgeTextOverflow: React.FC<{ elRef: HTMLElement | null }> = ({\n elRef\n}) => {\n const { setIsOverflowing } = React.use(BadgeContext)\n\n // `elements` feeds the observe effect's dependency array, so it must keep a\n // stable identity across renders — a fresh `[elRef]` literal would re-subscribe\n // the observer every render.\n const elements = React.useMemo(() => [elRef], [elRef])\n\n useResizeObserver({\n delay: 0,\n elements,\n onResize: () => {\n if (!elRef?.scrollWidth || !elRef?.clientWidth) return\n setIsOverflowing?.(elRef.scrollWidth > elRef.clientWidth)\n }\n })\n\n return null\n}\n\nconst StyledBadgeText = styled(Text, {\n base: ['py-0.5', 'capsize-none'],\n variants: {\n overflow: {\n ellipsis: ['overflow-x-hidden', 'text-ellipsis', 'whitespace-nowrap'],\n wrap: ['whitespace-normal']\n }\n }\n})\n\ntype BadgeTextProps = React.ComponentProps<typeof StyledBadgeText>\n\nconst toTextSize = {\n xs: 'sm',\n sm: 'md',\n md: 'md'\n}\n\nexport const BadgeText = ({ children, ...rest }: BadgeTextProps) => {\n // We need the return type here. Otherwise typsecript breaks when this type is used in Badge. Do not remove unless you want to tackle that issue again.\n const { size: badgeSize, overflow } = React.use(BadgeContext)\n\n const size = overrideStyledVariantValue(badgeSize, (s) => toTextSize[s])\n\n const [elRef, setElRef] = useCallbackRefState()\n\n return (\n <>\n {overflow === 'ellipsis' && <ObserveBadgeTextOverflow elRef={elRef} />}\n <StyledBadgeText size={size} overflow={overflow} ref={setElRef} {...rest}>\n {children}\n </StyledBadgeText>\n </>\n )\n}\n","import { useComposedRefs } from '@radix-ui/react-compose-refs'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { OptionalTooltipWrapper } from '../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\nimport { Icon } from '../icon/Icon'\nimport {\n badgeSemanticNames,\n colorSchemes as badgeColorSchemes\n} from './Badge.colorscheme.config'\nimport { BadgeContext, BadgeProvider } from './Badge.context'\nimport type { BadgeOverflow } from './Badge.types'\nimport { BadgeIcon } from './BadgeIcon'\nimport { BadgeText } from './BadgeText'\n\nconst StyledBadge = styled(\n 'div',\n {\n base: [\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'min-w-0',\n 'border',\n 'border-white',\n 'font-body',\n '*:not-last:mr-1'\n ],\n variants: {\n emphasis: {\n white: ['text-(--text-on-white)', 'bg-white'],\n subtle: ['text-(--text-subtle)', 'bg-(--background-subtle)'],\n bold: ['text-(--text-bold)', 'bg-(--background-bold)']\n },\n size: {\n xs: ['px-1', 'py-0'],\n sm: ['px-1', 'py-0.5'],\n md: ['px-2', 'py-1']\n },\n isClickable: {\n true: ['cursor-pointer']\n },\n highlighted: {\n true: []\n }\n },\n compoundVariants: [\n {\n isClickable: true,\n emphasis: 'white',\n class: [\n 'hover:text-(--text-on-white)',\n 'hover:bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n isClickable: true,\n emphasis: 'subtle',\n class: [\n 'hover:bg-(--background-subtle-hover)',\n 'hover:text-(--text-subtle-hover)'\n ]\n },\n {\n isClickable: true,\n emphasis: 'bold',\n class: [\n 'hover:bg-(--background-bold-hover)',\n 'hover:text-(--text-bold)'\n ]\n },\n {\n emphasis: 'white',\n highlighted: true,\n class: [\n 'text-(--text-on-white)',\n 'bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n emphasis: 'subtle',\n highlighted: true,\n class: ['text-(--text-subtle-hover)', '(--bg-background-subtle-hover)']\n },\n {\n emphasis: 'bold',\n highlighted: true,\n class: ['text-(--text-bold)', 'bg-(--background-bold-hover)']\n }\n ]\n },\n { enableResponsiveVariants: true }\n)\n\nexport type BadgeProps = React.ComponentProps<typeof StyledBadge> & {\n theme?: keyof typeof badgeColorSchemes\n overflow?: BadgeOverflow\n}\n\ntype BadgeInnerProps = Omit<BadgeProps, 'size' | 'overflow'>\n\nconst BadgeInner = ({\n ref,\n theme = 'info',\n emphasis = 'subtle',\n children,\n style,\n ...rest\n}: BadgeInnerProps) => {\n const { size, overflow, isOverflowing } = React.use(BadgeContext)\n const [badgeElRef, setBadgeElRef] = useCallbackRefState()\n const composedBadgeRef = useComposedRefs(\n ref as React.Ref<HTMLElement>,\n setBadgeElRef\n )\n\n const label = badgeElRef?.textContent\n\n const isInfoOnly = badgeSemanticNames.includes(theme)\n\n const isClickable =\n Object.keys(rest).includes('onClick') || Object.keys(rest).includes('href')\n\n return (\n <OptionalTooltipWrapper\n hasTooltip={overflow === 'ellipsis' && isOverflowing}\n label={label}\n >\n <StyledBadge\n role=\"status\"\n emphasis={emphasis}\n size={size}\n style={{\n ...badgeColorSchemes[theme],\n ...style\n }}\n {...rest}\n ref={composedBadgeRef}\n isClickable={isClickable && !isInfoOnly}\n >\n {React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <BadgeText>{child}</BadgeText>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n return <BadgeIcon {...iconProps} />\n }\n return child\n })}\n </StyledBadge>\n </OptionalTooltipWrapper>\n )\n}\n\nconst BadgeComponent = ({\n ref,\n size = 'sm',\n overflow = 'wrap',\n ...rest\n}: BadgeProps) => (\n <BadgeProvider size={size} overflow={overflow}>\n <BadgeInner {...rest} ref={ref} />\n </BadgeProvider>\n)\n\nexport const Badge = /* @__PURE__ */ Object.assign(BadgeComponent, {\n Icon: BadgeIcon,\n Text: BadgeText\n})\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nexport interface DismissibleRootContextValue {\n disabled?: boolean\n isDismissed: boolean\n setIsDismissed: (boolean) => void\n onDismiss: () => void\n}\n\nexport const DismissibleRootContext =\n React.createContext<DismissibleRootContextValue>({\n isDismissed: false,\n setIsDismissed: () => undefined,\n onDismiss: () => undefined\n })\n\nexport interface DismissibleRootProps {\n disabled?: boolean\n dismissed?: boolean\n onDismiss?: () => void\n}\n\nexport const DismissibleRootProvider = ({\n dismissed: controlledIsDismissed,\n children,\n disabled,\n onDismiss = () => null\n}: React.PropsWithChildren<DismissibleRootProps>) => {\n const [isDismissed, setIsDismissed] = React.useState(false)\n\n const value = React.useMemo<DismissibleRootContextValue>(() => {\n const isControlled = typeof controlledIsDismissed === 'boolean'\n return {\n disabled,\n isDismissed: isControlled\n ? (controlledIsDismissed as boolean)\n : isDismissed,\n setIsDismissed: isControlled ? () => null : setIsDismissed,\n onDismiss\n }\n }, [disabled, isDismissed, onDismiss, controlledIsDismissed])\n\n return (\n <DismissibleRootContext value={value}>{children}</DismissibleRootContext>\n )\n}\n\nexport interface DismissibleRootInternalProps {\n asChild?: boolean\n}\n\nconst DismissibleRootInternal = ({\n asChild = false,\n ...rest\n}: React.PropsWithChildren<DismissibleRootInternalProps>) => {\n const rootContext = React.use(DismissibleRootContext)\n\n const { isDismissed, disabled } = rootContext\n\n if (isDismissed) return null\n\n const props = { ...(disabled && { [`data-disabled`]: '' }), ...rest }\n const Component = asChild ? Slot : 'div'\n return <Component {...props} />\n}\n\nexport const DismissibleRoot = ({\n disabled = false,\n dismissed,\n onDismiss,\n ...rest\n}: React.PropsWithChildren<\n DismissibleRootInternalProps & DismissibleRootProps\n>) => (\n <DismissibleRootProvider\n dismissed={dismissed}\n disabled={disabled}\n onDismiss={onDismiss}\n >\n <DismissibleRootInternal {...rest} />\n </DismissibleRootProvider>\n)\n\nDismissibleRoot.displayName = 'Dismissible'\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { DismissibleRootContext } from './DismissibleRoot'\n\nexport interface DismissibleTriggerProps {\n asChild?: boolean\n}\n\nconst DefaultTrigger = (props) => (\n <button type=\"button\" {...props}>\n Dismiss\n </button>\n)\n\nexport const DismissibleTrigger = ({\n asChild = false,\n ...rest\n}: React.PropsWithChildren<DismissibleTriggerProps>) => {\n const context = React.use(DismissibleRootContext)\n if (context === undefined) {\n throw new Error(\n 'Dismissible.Trigger can only be used within a Dismissible.Item'\n )\n }\n\n const { setIsDismissed, disabled, onDismiss } = context\n\n const handleDismiss = () => {\n setIsDismissed(true)\n onDismiss?.()\n }\n\n const props = {\n disabled: disabled,\n onClick: handleDismiss,\n ...rest\n }\n\n const Component = asChild ? Slot : DefaultTrigger\n return <Component {...props} />\n}\n","import { DismissibleRoot } from './DismissibleRoot'\nimport { DismissibleTrigger } from './DismissibleTrigger'\n\nexport const Dismissible = /* @__PURE__ */ Object.assign(DismissibleRoot, {\n Trigger: DismissibleTrigger\n})\n","import * as React from 'react'\n\nimport type { BannerContainerProps } from './BannerContainer'\n\ntype Breakpoint = '@initial' | '@sm' | '@md' | '@lg' | '@xl'\ntype ResponsiveSize = 'sm' | 'md' | Partial<Record<Breakpoint, 'sm' | 'md'>>\n\n// Extract size and emphasis props, preserving responsive variant types\nexport type BannerProviderProps = {\n size?: ResponsiveSize\n emphasis?: BannerContainerProps['emphasis']\n}\n\ntype BannerContextValue = BannerProviderProps & {\n hasDismiss: boolean\n setHasDismiss: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nexport const BannerContext = React.createContext<BannerContextValue>({\n emphasis: 'minimal',\n size: {\n '@initial': 'sm',\n '@md': 'md'\n },\n hasDismiss: false,\n setHasDismiss: () => null\n})\n\nexport const useBannerContext = (): BannerContextValue => {\n const context = React.use(BannerContext)\n\n if (context === undefined) {\n throw new Error('useBannerContext must be used within a BannerProvider')\n }\n\n return context\n}\n\nexport const BannerProvider = ({\n emphasis = 'minimal',\n size = {\n '@initial': 'sm',\n '@md': 'md'\n },\n children\n}: React.PropsWithChildren<BannerProviderProps>) => {\n const [hasDismiss, setHasDismiss] = React.useState(false)\n const value = React.useMemo<BannerContextValue>(\n () => ({ emphasis, size, hasDismiss, setHasDismiss }),\n [emphasis, size, hasDismiss, setHasDismiss]\n )\n return <BannerContext value={value}>{children}</BannerContext>\n}\n\nBannerProvider.displayName = 'Banner'\n","import { Dismissible } from '../dismissible'\nimport { BannerProvider } from './Banner.context'\n\nexport const Banner = /* @__PURE__ */ Object.assign(BannerProvider, {\n Dismiss: Dismissible.Trigger\n})\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '../../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport type { Override } from '../../../utilities/types'\nimport { Button } from '../../button/Button'\nimport { useBannerContext } from '../Banner.context'\n\nexport const BannerRegularButton = (\n props: Override<\n React.ComponentProps<typeof Button>,\n { as?: React.ElementType }\n >\n) => {\n const { emphasis, size } = useBannerContext()\n\n const fullWidth = overrideStyledVariantValue(size, (s) => s === 'sm')\n\n return (\n <Button\n size={size}\n fullWidth={fullWidth}\n theme={emphasis === 'bold' ? 'neutral' : 'primary'}\n {...props}\n />\n )\n}\n\nBannerRegularButton.displayName = 'BannerRegularButton'\n","import * as React from 'react'\nimport invariant from 'tiny-invariant'\n\nimport { cn } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\nimport { BannerRegularButton } from './BannerRegularButton'\n\nconst MAX_ALLOWED_CHILDREN = 2\n\nconst toGap = {\n sm: 'gap-2',\n md: 'gap-4'\n}\n\nconst toDirection = {\n sm: 'flex-col',\n md: 'flex-row'\n}\n\nexport const BannerRegularActions = ({\n children,\n className,\n ...rest\n}: React.PropsWithChildren<React.ComponentProps<'div'>>) => {\n const { size } = useBannerContext()\n\n const gap = typeof size === 'string' ? toGap[size] : 'gap-2 md:gap-4'\n\n const direction =\n typeof size === 'string' ? toDirection[size] : 'flex-col md:flex-row'\n\n invariant(\n React.Children.count(children) <= MAX_ALLOWED_CHILDREN,\n `A maximum of ${MAX_ALLOWED_CHILDREN} ${BannerRegularButton.displayName} component(s) are permitted as children of ${BannerRegularActions.displayName}`\n )\n\n return (\n <div className={cn('flex', gap, direction, className)} {...rest}>\n {React.Children.map(children, (child, index) => {\n // if child is undefined or null, React.isValidElement returns false and hence error is thrown.\n // This line will prevent that from happening\n if (child == null) return child\n\n if (!React.isValidElement(child)) {\n throw new Error(\n `Child passed to ${BannerRegularActions.displayName} is not a valid element`\n )\n }\n\n invariant(\n child.type === BannerRegularButton,\n `Children of type ${child?.type} aren't permitted. Only an ${BannerRegularButton.displayName} component is allowed in ${BannerRegularActions.displayName}`\n )\n\n const propsToInject: Partial<\n React.ComponentProps<typeof BannerRegularButton>\n > = {\n // Override button appearance - make the second button outlined\n appearance: index > 0 ? 'outline' : undefined\n }\n\n return React.cloneElement(\n child as React.ReactElement<\n React.ComponentProps<typeof BannerRegularButton>\n >,\n propsToInject\n )\n })}\n </div>\n )\n}\n\nBannerRegularActions.displayName = 'BannerRegularActions'\n","import * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { Dismissible } from '../dismissible'\nimport { useBannerContext } from './Banner.context'\n\nconst StyledBannerContainer = styled(\n 'section',\n {\n base: [\n 'flex',\n 'relative',\n 'w-full',\n 'rounded-lg',\n 'overflow-hidden',\n 'text-(--foreground)',\n '[--banner-heading-color:var(--color-foreground)]',\n '[--banner-text-color:var(--color-grey-900)]'\n ],\n variants: {\n emphasis: {\n bold: [\n '[--banner-heading-color:var(--color-foreground-7-plus)]',\n '[--banner-text-color:var(--color-grey-100)]',\n 'bg-(--base-11)',\n 'text-(--foreground-7-plus)'\n ],\n subtle: ['bg-(--base-3)'],\n minimal: ['bg-(--base-1)']\n },\n size: {\n sm: [],\n md: []\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport type BannerContainerProps = React.ComponentProps<\n typeof StyledBannerContainer\n> & {\n colorScheme?: TcolorScheme\n} & React.ComponentProps<typeof Dismissible>\n\nexport const BannerContainer = ({\n colorScheme = {},\n onDismiss,\n dismissed,\n ...rest\n}: BannerContainerProps) => {\n const { emphasis } = useBannerContext()\n\n return (\n <ColorScheme {...colorScheme} asChild>\n <Dismissible asChild onDismiss={onDismiss} dismissed={dismissed}>\n {/* Explicit role keeps the banner landmark regardless of where the\n banner is nested, which a native <header> would only expose at the\n top level. */}\n {/* eslint-disable-next-line jsx-a11y/prefer-tag-over-role */}\n <StyledBannerContainer role=\"banner\" emphasis={emphasis} {...rest} />\n </Dismissible>\n </ColorScheme>\n )\n}\n","import * as React from 'react'\n\nimport { BannerContainer } from '../BannerContainer'\n\ntype BannerRegularContainerProps = Omit<\n React.ComponentProps<typeof BannerContainer>,\n 'direction' | 'align' | 'wrap' | 'gap' | 'justify'\n>\n\nexport const BannerRegularContainer = (props: BannerRegularContainerProps) => (\n <BannerContainer {...props} />\n)\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\n\nconst Container = styled(\n 'div',\n {\n base: ['w-31/50', 'grow'],\n variants: {\n size: {\n sm: ['p-4'],\n md: ['p-6', 'pr-8']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerRegularContent = (\n props: React.ComponentProps<typeof Container>\n) => {\n const { size } = useBannerContext()\n\n return <Container size={size} {...props} />\n}\n\nBannerRegularContent.displayName = 'BannerRegularContent'\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { overrideStyledVariantValue } from '../../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { ActionIcon } from '../../action-icon/ActionIcon'\nimport { Icon } from '../../icon/Icon'\nimport { Banner } from '../Banner'\nimport { useBannerContext } from '../Banner.context'\n\nconst toActionIconSize = {\n sm: 'md',\n md: 'sm'\n}\n\nconst StyledDismiss = styled(ActionIcon, {\n base: ['z-1', 'absolute', 'top-3', 'right-3']\n})\n\ntype BannerRegularDismissProps = Omit<\n React.ComponentProps<typeof StyledDismiss>,\n 'children' | 'onClick' | 'href'\n>\n\nexport const BannerRegularDismiss = ({\n label = 'dismiss',\n ...rest\n}: BannerRegularDismissProps) => {\n const { size, setHasDismiss } = useBannerContext()\n\n React.useEffect(() => {\n setHasDismiss(true)\n return () => {\n setHasDismiss(false)\n }\n }, [setHasDismiss])\n\n const actionIconSize = overrideStyledVariantValue(\n size,\n (s) => toActionIconSize[s]\n )\n\n return (\n <Banner.Dismiss asChild>\n <StyledDismiss\n label={label}\n size={actionIconSize}\n hasTooltip={false}\n isRounded\n theme=\"neutral\"\n appearance=\"solid\"\n {...rest}\n >\n <Icon is={Close} />\n </StyledDismiss>\n </Banner.Dismiss>\n )\n}\n\nBannerRegularDismiss.displayName = 'BannerRegularDismiss'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Heading } from '../../heading/Heading'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledHeading = styled(\n Heading,\n {\n base: ['mb-4', 'text-(--banner-heading-color)'],\n variants: {\n containerSize: {\n sm: [],\n md: []\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerRegularHeading = (\n props: React.ComponentPropsWithoutRef<typeof Heading>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledHeading\n size=\"md\"\n containerSize={size}\n hasDismiss={hasDismiss}\n {...props}\n />\n )\n}\n\nBannerRegularHeading.displayName = 'BannerRegularHeading'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Image } from '../../image/Image'\nimport { useBannerContext } from '../Banner.context'\n\nconst Container = styled(\n 'div',\n {\n base: ['relative', 'overflow-hidden', 'w-19/50'],\n variants: {\n size: {\n sm: ['hidden'],\n md: ['block']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst StyledImage = styled(Image, {\n base: ['absolute', 'max-w-none', 'size-full', 'object-cover']\n})\n\nexport const BannerRegularImage = (\n props: React.ComponentPropsWithoutRef<typeof Image>\n) => {\n const { size } = useBannerContext()\n\n return (\n <Container size={size}>\n <StyledImage {...props} />\n </Container>\n )\n}\n\nBannerRegularImage.displayName = 'BannerRegularImage'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Text } from '../../text/Text'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledText = styled(\n Text,\n {\n base: ['text-(--banner-text-color)'],\n variants: {\n containerSize: {\n sm: ['mb-4'],\n md: ['mb-6']\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerRegularText = (\n props: React.ComponentPropsWithoutRef<typeof Text>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledText\n size={size}\n containerSize={size}\n hasDismiss={hasDismiss}\n {...props}\n />\n )\n}\n\nBannerRegularText.displayName = 'BannerRegularText'\n","import * as React from 'react'\n\nimport { Banner } from '../Banner'\nimport { BannerRegularActions } from './BannerRegularActions'\nimport { BannerRegularButton } from './BannerRegularButton'\nimport { BannerRegularContainer } from './BannerRegularContainer'\nimport { BannerRegularContent } from './BannerRegularContent'\nimport { BannerRegularDismiss } from './BannerRegularDismiss'\nimport { BannerRegularHeading } from './BannerRegularHeading'\nimport { BannerRegularImage } from './BannerRegularImage'\nimport { BannerRegularText } from './BannerRegularText'\n\nconst BannerRegularComponent = ({\n colorScheme,\n size,\n emphasis,\n onDismiss,\n ...rest\n}: React.ComponentProps<typeof BannerRegularContainer>) => (\n <Banner size={size} emphasis={emphasis}>\n <BannerRegularContainer\n colorScheme={colorScheme}\n onDismiss={onDismiss}\n {...rest}\n />\n </Banner>\n)\n\nexport const BannerRegular = /* @__PURE__ */ Object.assign(\n BannerRegularComponent,\n {\n Content: BannerRegularContent,\n Heading: BannerRegularHeading,\n Text: BannerRegularText,\n Actions: BannerRegularActions,\n Image: BannerRegularImage,\n Button: BannerRegularButton,\n Dismiss: BannerRegularDismiss\n }\n)\n\nBannerRegularComponent.displayName = 'BannerRegular'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledBannerSlimActions = styled(\n 'div',\n {\n base: ['flex', 'gap-4'],\n variants: {\n size: {\n sm: ['w-full'],\n md: ['w-auto']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerSlimActions = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledBannerSlimActions>) => {\n const { size } = useBannerContext()\n return (\n <StyledBannerSlimActions size={size} {...rest}>\n {children}\n </StyledBannerSlimActions>\n )\n}\n\nBannerSlimActions.displayName = 'BannerSlimActions'\n","import * as React from 'react'\n\nimport { type PolymorphicComponent, cn } from '../../../styled'\nimport { overrideStyledVariantValue } from '../../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Button } from '../../button/Button'\nimport { useBannerContext } from '../Banner.context'\n\n// Re-expose Button's own props so BannerSlim.Button stays polymorphic (keeps\n// `as`, e.g. `<BannerSlim.Button as=\"a\" href>`). Typing with\n// React.ComponentProps<typeof Button> alone would collapse to the default\n// element and drop `as` (as?: never).\ntype ButtonOwnProps =\n typeof Button extends PolymorphicComponent<infer _Element, infer OwnProps>\n ? OwnProps\n : never\n\nexport const BannerSlimButton = (({\n className,\n ...rest\n}: React.ComponentProps<typeof Button>) => {\n const { emphasis, size } = useBannerContext()\n\n const fullWidth = overrideStyledVariantValue(size, (s) => s === 'sm')\n\n return (\n <Button\n size=\"md\"\n fullWidth={fullWidth}\n theme={emphasis === 'bold' ? 'neutral' : 'primary'}\n {...rest}\n className={cn('ml-auto', className)}\n />\n )\n}) as PolymorphicComponent<'button', ButtonOwnProps>\n\nBannerSlimButton.displayName = 'BannerSlimButton'\n","import * as React from 'react'\n\nimport { styled, cn } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\nimport { BannerContainer } from '../BannerContainer'\n\nconst toDirection = {\n sm: 'flex-col',\n md: 'flex-row'\n}\n\nconst toAlign = {\n sm: 'items-start',\n md: 'items-center'\n}\n\nconst toWrap = {\n sm: 'flex-wrap',\n md: 'flex-nowrap'\n}\n\nconst StyledBannerSlimContainer = styled(\n BannerContainer,\n {\n base: ['p-4'],\n variants: {\n sizeWorkaround: {\n sm: [],\n md: ['px-6']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\ntype BannerSlimContainerProps = React.ComponentProps<\n typeof StyledBannerSlimContainer\n>\n\nexport const BannerSlimContainer = ({\n className,\n ...rest\n}: BannerSlimContainerProps) => {\n const { size } = useBannerContext()\n\n const direction =\n typeof size === 'string' ? toDirection[size] : 'flex-col md:flex-row'\n\n const align =\n typeof size === 'string' ? toAlign[size] : 'items-start md:items-center'\n\n const wrap =\n typeof size === 'string' ? toWrap[size] : 'flex-wrap md:flex-nowrap'\n\n return (\n <StyledBannerSlimContainer\n {...rest}\n sizeWorkaround={size}\n className={cn(direction, align, 'gap-4', wrap, className)}\n />\n )\n}\n\nBannerSlimContainer.displayName = 'BannerSlimContainer'\n","import { styled } from '../../../styled'\n\nexport const BannerSlimContent = styled('div', {\n base: ['w-full', 'flex', 'items-center', 'gap-4']\n})\n\nBannerSlimContent.displayName = 'BannerSlimContent'\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { ActionIcon } from '../../action-icon/ActionIcon'\nimport { Icon } from '../../icon/Icon'\nimport { Banner } from '../Banner'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledDismiss = styled(\n ActionIcon,\n {\n base: [],\n variants: {\n emphasis: {\n bold: ['text-white!']\n },\n containerSize: {\n sm: ['absolute', 'right-4', 'top-4'],\n md: ['static']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\ntype BannerSlimDismissProps = Omit<\n React.ComponentProps<typeof StyledDismiss>,\n 'children' | 'onClick' | 'href'\n>\n\nexport const BannerSlimDismiss = ({\n label = 'dismiss',\n ...rest\n}: BannerSlimDismissProps) => {\n const { size, setHasDismiss, emphasis } = useBannerContext()\n\n React.useEffect(() => {\n setHasDismiss(true)\n return () => {\n setHasDismiss(false)\n }\n }, [setHasDismiss])\n\n return (\n <Banner.Dismiss asChild>\n <StyledDismiss\n label={label}\n size=\"md\"\n hasTooltip={false}\n isRounded\n theme=\"neutral\"\n containerSize={size}\n emphasis={emphasis as BannerSlimDismissProps['emphasis']}\n {...rest}\n >\n <Icon is={Close} />\n </StyledDismiss>\n </Banner.Dismiss>\n )\n}\n\nBannerSlimDismiss.displayName = 'BannerSlimDismiss'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Image } from '../../image/Image'\nimport { useBannerContext } from '../Banner.context'\n\nconst Container = styled(\n 'div',\n {\n base: ['overflow-hidden', 'rounded-full', 'self-start', 'shrink-0'],\n variants: {\n size: {\n sm: ['size-10'],\n md: ['size-12']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst StyledImage = styled(Image, {\n base: ['max-w-none', 'size-full', 'object-cover']\n})\n\nexport const BannerSlimImage = (\n props: React.ComponentPropsWithoutRef<typeof Image>\n) => {\n const { size } = useBannerContext()\n\n return (\n <Container size={size}>\n <StyledImage {...props} />\n </Container>\n )\n}\n\nBannerSlimImage.displayName = 'BannerSlimImage'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Text } from '../../text/Text'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledText = styled(\n Text,\n {\n base: ['text-(--banner-heading-color)'],\n variants: {\n containerSize: {\n sm: [],\n md: []\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerSlimText = (\n props: React.ComponentPropsWithoutRef<typeof Text>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledText\n size=\"md\"\n weight=\"bold\"\n containerSize={size}\n hasDismiss={hasDismiss}\n noCapsize\n {...props}\n />\n )\n}\n\nBannerSlimText.displayName = 'BannerSlimText'\n","import * as React from 'react'\n\nimport { Banner } from '../Banner'\nimport { BannerContainer } from '../BannerContainer'\nimport { BannerSlimActions } from './BannerSlimActions'\nimport { BannerSlimButton } from './BannerSlimButton'\nimport { BannerSlimContainer } from './BannerSlimContainer'\nimport { BannerSlimContent } from './BannerSlimContent'\nimport { BannerSlimDismiss } from './BannerSlimDismiss'\nimport { BannerSlimImage } from './BannerSlimImage'\nimport { BannerSlimText } from './BannerSlimText'\n\nconst BannerSlimComponent = ({\n colorScheme,\n size,\n emphasis,\n onDismiss,\n ...rest\n}: React.ComponentProps<typeof Banner> &\n React.ComponentProps<typeof BannerContainer>) => (\n <Banner size={size} emphasis={emphasis}>\n <BannerSlimContainer\n colorScheme={colorScheme}\n onDismiss={onDismiss}\n {...rest}\n />\n </Banner>\n)\n\nexport const BannerSlim = /* @__PURE__ */ Object.assign(BannerSlimComponent, {\n Content: BannerSlimContent,\n Text: BannerSlimText,\n Image: BannerSlimImage,\n Button: BannerSlimButton,\n Dismiss: BannerSlimDismiss,\n Actions: BannerSlimActions\n})\n\nBannerSlimComponent.displayName = 'BannerSlim'\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useCarousel } from './Carousel'\n\nconst ArrowButton = /* @__PURE__ */ styled('button', {\n base: [\n 'items-center',\n 'text-primary-800',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'size-12',\n 'top-1/2',\n '-translate-y-1/2',\n 'transition-colors',\n 'duration-150',\n 'ease-in-out',\n 'hover:text-primary-900',\n 'active:text-primary-1000',\n 'disabled:text-grey-200',\n 'disabled:cursor-not-allowed'\n ]\n})\n\nexport const CarouselArrowPrevious = (\n props: React.ComponentProps<typeof ArrowButton>\n) => {\n const { scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <ArrowButton\n type=\"button\"\n onClick={scrollPrev}\n disabled={!canScrollPrev}\n aria-label=\"Previous slide\"\n {...props}\n >\n <Icon is={ChevronLeft} />\n </ArrowButton>\n )\n}\n\nexport const CarouselArrowNext = (\n props: React.ComponentProps<typeof ArrowButton>\n) => {\n const { scrollNext, canScrollNext } = useCarousel()\n\n return (\n <ArrowButton\n type=\"button\"\n onClick={scrollNext}\n disabled={!canScrollNext}\n aria-label=\"Next slide\"\n {...props}\n >\n <Icon is={ChevronRight} />\n </ArrowButton>\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { useCarousel } from './Carousel'\n\nconst Dot = styled('button', {\n base: [\n 'bg-grey-600',\n 'cursor-pointer',\n 'duration-100',\n 'ease-in',\n 'focus:bg-primary-900',\n 'hover:bg-primary-900',\n 'mx-1',\n 'p-1',\n 'rounded-full',\n 'size-3',\n 'transition-all',\n 'disabled:bg-primary-800',\n 'disabled:cursor-default'\n ]\n})\n\nexport const CarouselPagination = ({\n className,\n ...rest\n}: React.HTMLAttributes<HTMLDivElement>) => {\n const { scrollSnaps, selectedIndex, scrollTo } = useCarousel()\n\n const dots = Array.from({ length: scrollSnaps.length }, (_, i) => i)\n\n return (\n <div className={cn('flex', 'justify-center', className)} {...rest}>\n {dots.map((index) => (\n <Dot\n key={index}\n type=\"button\"\n onClick={() => scrollTo(index)}\n disabled={index === selectedIndex}\n aria-label=\"slide dot\"\n />\n ))}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { useCarousel } from './Carousel'\n\nexport type CarouselSlideGap = 'none' | 0 | 1 | 2 | 3 | 4\n\n// Horizontal padding applied around each slide's content, on the same\n// spacing scale as Flex/ToggleGroup's gap. 'none' renders full-bleed slides.\nexport const toSlideGapClass: Record<CarouselSlideGap, string> = {\n none: '',\n 0: 'px-0.5',\n 1: 'px-1',\n 2: 'px-2',\n 3: 'px-3',\n 4: 'px-4'\n}\n\n// Slides read the gap via context so it is configured once on the slider.\nexport const CarouselSlideGapContext = React.createContext<CarouselSlideGap>(3)\n\ntype CarouselSliderProps = {\n children?: React.ReactNode\n className?: string\n gap?: CarouselSlideGap\n overflow?: boolean\n tabIndex?: number\n}\n\nexport const CarouselSlider = ({\n children,\n className,\n gap = 3,\n overflow,\n tabIndex = 0,\n ...rest\n}: CarouselSliderProps) => {\n const { emblaRef } = useCarousel()\n\n return (\n <div\n ref={emblaRef}\n className={cn(\n 'ml-[50%]',\n '-translate-x-1/2',\n 'cursor-grab',\n overflow ? 'overflow-visible' : 'overflow-hidden',\n className\n )}\n role=\"listbox\"\n aria-live=\"polite\"\n tabIndex={tabIndex}\n {...rest}\n >\n <div className=\"flex\">\n <CarouselSlideGapContext value={gap}>\n {children}\n </CarouselSlideGapContext>\n </div>\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { useCarousel } from './Carousel'\nimport { CarouselSlideGapContext, toSlideGapClass } from './CarouselSlider'\n\nexport const CarouselSlide = ({\n children,\n className,\n index,\n ...rest\n}: React.PropsWithChildren<\n { index: number } & React.HTMLAttributes<HTMLDivElement>\n>) => {\n const { selectedIndex } = useCarousel()\n const gap = React.use(CarouselSlideGapContext)\n const isSelected = selectedIndex === index\n\n return (\n <div\n role=\"option\"\n aria-selected={isSelected}\n // min-w-0 so basis-full wins over the content's min-content size and\n // the slide never outgrows the slider viewport\n className={cn('min-w-0', 'basis-full', 'shrink-0', className)}\n {...rest}\n >\n {/* padding to create the gap between slides; gap=\"none\" for full-bleed */}\n <div\n className={cn('flex items-center justify-center', toSlideGapClass[gap])}\n >\n {children}\n </div>\n </div>\n )\n}\n","import useEmblaCarousel from 'embla-carousel-react'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { CarouselArrowNext, CarouselArrowPrevious } from './CarouselArrows'\nimport { CarouselPagination } from './CarouselPagination'\nimport { CarouselSlide } from './CarouselSlide'\nimport { CarouselSlider } from './CarouselSlider'\n\ntype EmblaApi = ReturnType<typeof useEmblaCarousel>[1]\n\ntype CarouselContextValue = {\n emblaRef: React.RefCallback<HTMLDivElement>\n emblaApi: EmblaApi\n selectedIndex: number\n scrollSnaps: number[]\n canScrollPrev: boolean\n canScrollNext: boolean\n scrollPrev: () => void\n scrollNext: () => void\n scrollTo: (index: number) => void\n}\n\nconst CarouselContext = React.createContext<CarouselContextValue | null>(null)\n\ntype CarouselProps = {\n currentSlide?: number\n}\n\nexport const CarouselComponent = ({\n children,\n currentSlide = 0,\n className,\n ...rest\n}: React.PropsWithChildren<\n CarouselProps & React.HTMLAttributes<HTMLDivElement>\n>) => {\n const [emblaRef, emblaApi] = useEmblaCarousel({\n startIndex: currentSlide,\n align: 'center'\n })\n\n const [selectedIndex, setSelectedIndex] = React.useState(currentSlide)\n const [scrollSnaps, setScrollSnaps] = React.useState<number[]>([])\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const scrollPrev = React.useCallback(() => {\n emblaApi?.scrollPrev()\n }, [emblaApi])\n\n const scrollNext = React.useCallback(() => {\n emblaApi?.scrollNext()\n }, [emblaApi])\n\n const scrollTo = React.useCallback(\n (index: number) => {\n emblaApi?.scrollTo(index)\n },\n [emblaApi]\n )\n\n const onSelect = React.useCallback(() => {\n if (!emblaApi) return\n setSelectedIndex(emblaApi.selectedScrollSnap())\n setCanScrollPrev(emblaApi.canScrollPrev())\n setCanScrollNext(emblaApi.canScrollNext())\n }, [emblaApi])\n\n const onInit = React.useCallback(() => {\n if (!emblaApi) return\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [emblaApi])\n\n React.useEffect(() => {\n if (!emblaApi) return\n\n onInit()\n onSelect()\n\n emblaApi.on('reInit', onInit)\n emblaApi.on('reInit', onSelect)\n emblaApi.on('select', onSelect)\n\n return () => {\n emblaApi.off('reInit', onInit)\n emblaApi.off('reInit', onSelect)\n emblaApi.off('select', onSelect)\n }\n }, [emblaApi, onInit, onSelect])\n\n const contextValue = React.useMemo<CarouselContextValue>(\n () => ({\n emblaRef,\n emblaApi,\n selectedIndex,\n scrollSnaps,\n canScrollPrev,\n canScrollNext,\n scrollPrev,\n scrollNext,\n scrollTo\n }),\n [\n emblaRef,\n emblaApi,\n selectedIndex,\n scrollSnaps,\n canScrollPrev,\n canScrollNext,\n scrollPrev,\n scrollNext,\n scrollTo\n ]\n )\n\n return (\n <div className={cn('relative', 'w-full', className)} {...rest}>\n <CarouselContext value={contextValue}>{children}</CarouselContext>\n </div>\n )\n}\n\nexport const useCarousel = () => {\n const context = React.use(CarouselContext)\n if (!context) {\n throw new Error('useCarousel must be used within a Carousel')\n }\n\n return {\n ...context,\n // Alias for backward compatibility\n currentSlide: context.selectedIndex\n }\n}\n\nexport const Carousel = /* @__PURE__ */ Object.assign(CarouselComponent, {\n ArrowNext: CarouselArrowNext,\n ArrowPrevious: CarouselArrowPrevious,\n Pagination: CarouselPagination,\n Slide: CarouselSlide,\n Slider: CarouselSlider\n})\n\nCarouselComponent.displayName = 'Carousel'\n","import { Minus, Ok } from '@atom-learning/icons'\nimport * as RadixCheckbox from '@radix-ui/react-checkbox'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Icon } from '../icon/Icon'\n\nconst StyledCheckbox = styled(RadixCheckbox.Root, {\n base: [\n 'appearance-none',\n 'relative',\n 'bg-transparent',\n 'border',\n 'border-grey-800',\n 'rounded-[3px]',\n 'text-white',\n 'bg-white',\n 'cursor-pointer',\n 'size-4',\n 'p-0',\n 'flex',\n 'items-center',\n 'justify-center',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'shrink-0',\n 'not-disabled:before:-inset-2',\n 'not-disabled:before:-z-1',\n 'not-disabled:before:absolute',\n 'not-disabled:before:bg-primary-300',\n \"not-disabled:before:content-['']\",\n 'not-disabled:before:duration-125',\n 'not-disabled:before:ease-in-out',\n 'not-disabled:before:opacity-0',\n 'not-disabled:before:rounded-[50%]',\n 'not-disabled:before:scale-0',\n 'not-disabled:before:transition-[opacity,scale]',\n 'not-disabled:hover:before:opacity-100',\n 'not-disabled:hover:before:scale-100',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:border-primary-800',\n 'data-[state=indeterminate]:bg-primary-800',\n 'data-[state=indeterminate]:border-primary-800',\n 'focus:-outline-offset-1',\n 'focus:outline-2',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n state: {\n error: ['border-danger']\n },\n size: {\n md: ['size-4'],\n lg: ['mt-px', 'size-6']\n }\n }\n})\n\nconst toIconSize = {\n md: 'sm',\n lg: 'sm'\n}\n\nexport const Checkbox = ({\n ref,\n size = 'md',\n checked,\n ...rest\n}: React.ComponentProps<typeof StyledCheckbox>) => {\n const iconSize = overrideStyledVariantValue(size, (s) => toIconSize[s])\n\n return (\n <div className=\"relative z-1\">\n <StyledCheckbox ref={ref} checked={checked} size={size} {...rest}>\n <div className=\"absolute -inset-3 opacity-50\" />\n <RadixCheckbox.Indicator asChild>\n <Icon\n is={checked === 'indeterminate' ? Minus : Ok}\n size={iconSize}\n className=\"stroke-3\"\n />\n </RadixCheckbox.Indicator>\n </StyledCheckbox>\n </div>\n )\n}\n","import * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from './CheckboxGroup.types'\n\ntype CheckboxGroupCheckedContextValue = {\n checked: CheckboxGroupItemValue[]\n handleItemCheckedChange: (\n newItemChecked: boolean,\n itemValue: CheckboxGroupItemValue\n ) => void\n}\n\ntype CheckboxGroupCheckedContextProps = {\n checked?: CheckboxGroupCheckedContextValue['checked']\n defaultChecked?: CheckboxGroupCheckedContextValue['checked']\n onCheckedChange?: (\n checked: CheckboxGroupCheckedContextValue['checked']\n ) => void\n}\n\nexport const CheckboxGroupCheckedContext =\n React.createContext<CheckboxGroupCheckedContextValue>({\n checked: [],\n handleItemCheckedChange: () => null\n })\n\nconst generateNewCheckedFn = (\n currentChecked: CheckboxGroupCheckedContextValue['checked']\n) => {\n return (newItemChecked, itemValue) => {\n const newCheckedSet = new Set(currentChecked)\n if (newItemChecked) {\n newCheckedSet.add(itemValue)\n } else {\n newCheckedSet.delete(itemValue)\n }\n const newChecked = [...newCheckedSet]\n return newChecked\n }\n}\n\nexport const CheckboxGroupCheckedProvider = ({\n checked: controlledChecked,\n defaultChecked = [],\n onCheckedChange,\n ...rest\n}: React.PropsWithChildren<CheckboxGroupCheckedContextProps>) => {\n const [checked, setChecked] = React.useState(defaultChecked)\n\n const handleItemControlledCheckedChange = React.useCallback(\n (newItemChecked, itemValue) => {\n if (!controlledChecked) return () => null\n const newCheckedFn = generateNewCheckedFn(controlledChecked)\n const newChecked = newCheckedFn(newItemChecked, itemValue)\n onCheckedChange?.(newChecked)\n },\n [onCheckedChange, controlledChecked]\n )\n\n const handleItemCheckedChange = React.useCallback(\n (newItemChecked, itemValue) => {\n setChecked((prevChecked) => {\n const newCheckedFn = generateNewCheckedFn(prevChecked)\n const newChecked = newCheckedFn(newItemChecked, itemValue)\n onCheckedChange?.(newChecked)\n return newChecked\n })\n },\n [onCheckedChange]\n )\n\n const value = React.useMemo<CheckboxGroupCheckedContextValue>(() => {\n const isControlled = Array.isArray(controlledChecked)\n return {\n checked: isControlled\n ? (controlledChecked as CheckboxGroupCheckedContextValue['checked']) // We're literally JUST checking it above but TS still flags it, wrongly, so casting\n : checked,\n handleItemCheckedChange: isControlled\n ? handleItemControlledCheckedChange\n : handleItemCheckedChange\n }\n }, [\n checked,\n handleItemCheckedChange,\n handleItemControlledCheckedChange,\n controlledChecked\n ])\n\n return <CheckboxGroupCheckedContext value={value} {...rest} />\n}\n","import * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from './CheckboxGroup.types'\n\ntype CheckboxGroupMountedContextValue = {\n mounted: CheckboxGroupItemValue[]\n handleItemMountedChange: (\n newItemMounted: boolean,\n itemValue: CheckboxGroupItemValue\n ) => void\n}\n\nexport const CheckboxGroupMountedContext =\n React.createContext<CheckboxGroupMountedContextValue>({\n mounted: [],\n handleItemMountedChange: () => null\n })\n\nexport const CheckboxGroupMountedProvider = (props) => {\n const { handleItemMountedChange: handleItemMountedChangeFurtherUpContext } =\n React.use(CheckboxGroupMountedContext)\n\n const [mounted, setMounted] = React.useState<CheckboxGroupItemValue[]>([])\n const handleItemMountedChange = React.useCallback(\n (newItemMounted, itemValue) => {\n handleItemMountedChangeFurtherUpContext?.(newItemMounted, itemValue)\n setMounted((prevMounted) => {\n const newMountedSet = new Set(prevMounted)\n if (newItemMounted) {\n newMountedSet.add(itemValue)\n } else {\n newMountedSet.delete(itemValue)\n }\n const newMounted = [...newMountedSet]\n return newMounted\n })\n },\n [handleItemMountedChangeFurtherUpContext]\n )\n\n const value = React.useMemo<CheckboxGroupMountedContextValue>(\n () => ({ mounted, handleItemMountedChange }),\n [mounted, handleItemMountedChange]\n )\n\n return <CheckboxGroupMountedContext value={value} {...props} />\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { CheckboxGroupCheckedContext } from './CheckboxGroupChecked.context'\nimport { CheckboxGroupMountedContext } from './CheckboxGroupMounted.context'\n\ntype CheckboxGroupAllItemProps = Omit<\n React.ComponentProps<typeof Checkbox>,\n 'checked' | 'defaultChecked'\n>\n\nexport const CheckboxGroupAllItem = ({\n onCheckedChange,\n title = 'all',\n ...rest\n}: CheckboxGroupAllItemProps) => {\n const {\n checked: checkedItems,\n handleItemCheckedChange: handleItemCheckedChangeContext\n } = React.use(CheckboxGroupCheckedContext)\n const { mounted: mountedItems } = React.use(CheckboxGroupMountedContext)\n\n const handleItemCheckedChange = (newChecked) => {\n mountedItems.forEach((value) => {\n handleItemCheckedChangeContext(newChecked, value)\n })\n onCheckedChange?.(newChecked)\n }\n\n const isAllChecked = (() => {\n if (!checkedItems.length || !mountedItems.length) return false\n\n // Set lookup keeps the every/some scans O(mounted) instead of O(mounted × checked).\n const checkedSet = new Set(checkedItems)\n\n if (mountedItems.every((mountedItem) => checkedSet.has(mountedItem)))\n return true\n\n if (mountedItems.some((mountedItem) => checkedSet.has(mountedItem)))\n return 'indeterminate'\n\n return false\n })()\n\n return (\n <Checkbox\n onCheckedChange={handleItemCheckedChange}\n checked={isAllChecked}\n title={title}\n {...rest}\n />\n )\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { CheckboxGroupCheckedContext } from './CheckboxGroupChecked.context'\nimport { CheckboxGroupMountedContext } from './CheckboxGroupMounted.context'\n\ntype CheckboxGroupItemProps = Omit<\n React.ComponentProps<typeof Checkbox>,\n 'onCheckedChange' | 'checked' | 'defaultChecked'\n> & {\n onCheckedChange?: (newChecked: boolean) => void\n}\n\nexport const CheckboxGroupItem = ({\n value,\n title,\n onCheckedChange,\n ...rest\n}: CheckboxGroupItemProps) => {\n const {\n checked: checkedItems,\n handleItemCheckedChange: handleItemCheckedChangeContext\n } = React.use(CheckboxGroupCheckedContext)\n const { handleItemMountedChange } = React.use(CheckboxGroupMountedContext)\n\n const handleItemCheckedChange = (newChecked) => {\n handleItemCheckedChangeContext(newChecked, value)\n onCheckedChange?.(newChecked)\n }\n\n React.useEffect(() => {\n handleItemMountedChange(true, value)\n return () => {\n handleItemMountedChange(false, value)\n }\n }, [handleItemMountedChange, value])\n\n return (\n <Checkbox\n onCheckedChange={handleItemCheckedChange}\n checked={checkedItems.includes(value)}\n title={title ?? String(value)}\n {...rest}\n />\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { CheckboxGroupMountedProvider } from './CheckboxGroupMounted.context'\n\ntype CheckboxGroupSubProps = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean\n}\n\nexport const CheckboxGroupSub = ({\n asChild = false,\n ...rest\n}: CheckboxGroupSubProps) => {\n const Component = asChild ? Slot : 'div'\n\n return (\n <CheckboxGroupMountedProvider>\n <Component {...rest} />\n </CheckboxGroupMountedProvider>\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from './CheckboxGroup.types'\nimport { CheckboxGroupAllItem } from './CheckboxGroupAllItem'\nimport { CheckboxGroupCheckedProvider } from './CheckboxGroupChecked.context'\nimport { CheckboxGroupItem } from './CheckboxGroupItem'\nimport { CheckboxGroupMountedProvider } from './CheckboxGroupMounted.context'\nimport { CheckboxGroupSub } from './CheckboxGroupSub'\n\ntype CheckboxGroupRootProps = Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'defaultChecked'\n> & {\n checked?: CheckboxGroupItemValue[]\n onCheckedChange?: (checked: CheckboxGroupItemValue[]) => void\n defaultChecked?: CheckboxGroupItemValue[]\n asChild?: boolean\n}\n\nconst CheckboxGroupRoot = ({\n checked,\n defaultChecked,\n onCheckedChange,\n asChild = false,\n ...rest\n}: CheckboxGroupRootProps) => {\n const Component = asChild ? Slot : 'div'\n\n return (\n <CheckboxGroupCheckedProvider\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={onCheckedChange}\n >\n <CheckboxGroupMountedProvider>\n <Component {...rest} />\n </CheckboxGroupMountedProvider>\n </CheckboxGroupCheckedProvider>\n )\n}\n\nexport const CheckboxGroup = /* @__PURE__ */ Object.assign(CheckboxGroupRoot, {\n Item: CheckboxGroupItem,\n AllItem: CheckboxGroupAllItem,\n Sub: CheckboxGroupSub\n})\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\n\ntype TreeListItemProps = React.ComponentProps<'li'>\n\nexport const TreeListItem = ({\n ref,\n className,\n ...rest\n}: TreeListItemProps) => (\n <li\n {...rest}\n ref={ref}\n role=\"treeitem\"\n className={cn(\n 'flex',\n 'items-center',\n 'gap-2',\n 'not-first:mt-0.5',\n className\n )}\n />\n)\n","import { Root } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useCallbackRef } from '../../utilities/hooks/useCallbackRef'\nimport { TreeListItem } from './TreeListItem'\n\ntype TreeCollapsibleContextValue = {\n triggerRef?: React.RefObject<HTMLElement | null>\n setTriggerRef?: (el: HTMLElement | null) => void | (() => void)\n}\nexport const TreeCollapsibleContext =\n React.createContext<TreeCollapsibleContextValue>({})\nconst TreeCollapsibleProvider = ({ children }) => {\n const [triggerRef, setTriggerRef] = useCallbackRef()\n const value = React.useMemo(\n () => ({ triggerRef, setTriggerRef }),\n [triggerRef, setTriggerRef]\n )\n return (\n <TreeCollapsibleContext value={value}>{children}</TreeCollapsibleContext>\n )\n}\n\nconst StyledCollapsibleTreeItemRoot = /* @__PURE__ */ styled(Root, {\n base: ['w-full']\n})\n\ntype TreeCollapsibleProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof StyledCollapsibleTreeItemRoot>\nexport const TreeCollapsible = ({\n ref,\n ...props\n}: TreeCollapsibleProps & {\n ref?: React.Ref<HTMLLIElement>\n}) => (\n <TreeListItem ref={ref}>\n <TreeCollapsibleProvider>\n <StyledCollapsibleTreeItemRoot {...props} />\n </TreeCollapsibleProvider>\n </TreeListItem>\n)\n","import { styled } from '../../styled'\n\nexport const TreeList = styled('ul', {\n base: ['flex', 'flex-col', 'p-0', 'm-0', 'list-none', 'w-full', '[&_&]:pl-4']\n})\n","import { Content } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { TreeCollapsibleContext } from './TreeCollapsible'\nimport { TreeList } from './TreeList'\n\ntype TreeCollapsibleContentProps = React.ComponentProps<typeof Content> &\n React.ComponentProps<typeof TreeList> & {\n ref?: React.Ref<HTMLUListElement>\n }\n\nexport const TreeCollapsibleContent = ({\n ref,\n children,\n className,\n ...rest\n}: TreeCollapsibleContentProps) => {\n const { triggerRef } = React.use(TreeCollapsibleContext)\n\n const handleOnKeydown = (e) => {\n if (!triggerRef?.current) return\n if (e.key === 'Escape') {\n e.stopPropagation()\n e.preventDefault()\n triggerRef.current.focus()\n triggerRef.current.click()\n }\n }\n\n return (\n <Content\n className={cn('data-[state=closed]:hidden', className)}\n onKeyDown={handleOnKeydown}\n {...rest}\n asChild\n >\n <TreeList ref={ref} role=\"group\">\n {children}\n </TreeList>\n </Content>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\n\nexport const TreeIcon = ({\n className,\n ...rest\n}: React.ComponentProps<typeof Icon>) => (\n <Icon\n size=\"md\"\n {...rest}\n className={cn('my-1', 'shrink-0', 'self-start', className)}\n />\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\ntype StyledTreeTextProps = React.ComponentProps<typeof Text>\n\nexport const TreeText = ({ className, ...rest }: StyledTreeTextProps) => (\n <Text\n as=\"span\"\n {...rest}\n className={cn(\n 'py-0.5',\n 'whitespace-nowrap',\n 'overflow-x-hidden',\n 'text-ellipsis',\n className\n )}\n size=\"md\"\n />\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { TreeIcon } from './TreeIcon'\nimport { TreeText } from './TreeText'\n\nconst StyledItemContent = styled('div', {\n base: [\n 'w-full',\n 'relative',\n 'min-h-8',\n 'pl-10',\n 'flex',\n 'items-center',\n 'gap-2'\n ]\n})\n\ntype TreeItemContentProps = React.ComponentProps<typeof StyledItemContent>\n\nexport const TreeItemContent = ({\n ref,\n children,\n ...rest\n}: TreeItemContentProps) => (\n <StyledItemContent ref={ref} {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <TreeText>{child}</TreeText>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n return <TreeIcon {...iconProps} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledItemContent>\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { TreeCollapsibleContext } from './TreeCollapsible'\nimport { TreeItemContent } from './TreeItemContent'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: [\n 'absolute',\n 'left-0',\n 'top-0',\n 'pointer-events-none',\n '[&_svg]:duration-300',\n '[&_svg]:transition-transform',\n '[&[data-state=closed]>svg]:-rotate-90',\n '[&[data-state=open]>svg]:rotate-0'\n ]\n})\n\ntype NavigationMenuCollapsibleTriggerProps = React.ComponentProps<\n typeof TreeItemContent\n> & {\n label: string\n}\n\nexport const TreeCollapsibleTrigger = ({\n children,\n label,\n className,\n onClick,\n ...rest\n}: NavigationMenuCollapsibleTriggerProps) => {\n const { setTriggerRef, triggerRef } = React.use(TreeCollapsibleContext)\n\n return (\n <TreeItemContent\n {...rest}\n className={cn('cursor-pointer', className)}\n onClick={(event) => {\n onClick?.(event)\n triggerRef?.current?.click()\n }}\n >\n <Trigger asChild>\n <StyledActionIcon\n size=\"sm\"\n ref={setTriggerRef}\n label={label}\n theme=\"neutral\"\n hasTooltip={false}\n onClick={(e) => e.stopPropagation()}\n >\n <Icon is={ChevronDown} />\n </StyledActionIcon>\n </Trigger>\n {children}\n </TreeItemContent>\n )\n}\n","import * as React from 'react'\n\nimport { TreeItemContent } from './TreeItemContent'\nimport { TreeListItem } from './TreeListItem'\n\ntype TreeItemProps = React.ComponentProps<typeof TreeItemContent>\n\nexport const TreeItem = ({ children, ...rest }: TreeItemProps) => (\n <TreeListItem>\n <TreeItemContent {...rest}>{children}</TreeItemContent>\n </TreeListItem>\n)\n","import * as React from 'react'\n\nimport { TreeCollapsible } from './TreeCollapsible'\nimport { TreeCollapsibleContent } from './TreeCollapsibleContent'\nimport { TreeCollapsibleTrigger } from './TreeCollapsibleTrigger'\nimport { TreeIcon } from './TreeIcon'\nimport { TreeItem } from './TreeItem'\nimport { TreeList } from './TreeList'\nimport { TreeText } from './TreeText'\n\ntype TreeProps = React.ComponentProps<typeof TreeList>\n\nexport const TreeRoot = ({ ref, children, ...rest }: TreeProps) => (\n <TreeList {...rest} ref={ref} role=\"tree\">\n {children}\n </TreeList>\n)\n\nexport const Tree = /* @__PURE__ */ Object.assign(TreeRoot, {\n Collapsible: TreeCollapsible,\n CollapsibleContent: TreeCollapsibleContent,\n CollapsibleTrigger: TreeCollapsibleTrigger,\n Item: TreeItem,\n Icon: TreeIcon,\n Text: TreeText\n})\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\n\ntype CheckboxTreeCollapsibleProps = Omit<\n React.ComponentProps<typeof Tree.Collapsible> &\n React.ComponentProps<typeof CheckboxGroup.Sub>,\n 'asChild'\n>\n\nexport const CheckboxTreeCollapsible = ({\n children,\n ...rest\n}: CheckboxTreeCollapsibleProps) => (\n <CheckboxGroup.Sub asChild>\n <Tree.Collapsible {...rest}>{children}</Tree.Collapsible>\n </CheckboxGroup.Sub>\n)\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\n\ntype CheckboxTreeCollapsibleContentProps = Omit<\n React.ComponentProps<typeof Tree.CollapsibleContent>,\n 'asChild'\n>\n\nexport const CheckboxTreeCollapsibleContent = ({\n children,\n ...rest\n}: CheckboxTreeCollapsibleContentProps) => (\n <CheckboxGroup.Sub asChild>\n <Tree.CollapsibleContent {...rest} forceMount>\n {children}\n </Tree.CollapsibleContent>\n </CheckboxGroup.Sub>\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Tree } from '../tree/Tree'\n\nconst StyledItemContent = styled('label', {\n base: ['max-w-full', 'flex', 'items-center', 'gap-2']\n})\n\ntype CheckboxTreeItemContentProps = React.ComponentProps<\n typeof StyledItemContent\n>\n\nexport const CheckboxTreeItemContent = ({\n children,\n ...rest\n}: CheckboxTreeItemContentProps) => (\n <StyledItemContent {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <Tree.Text>{child}</Tree.Text>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n return <Tree.Icon {...iconProps} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledItemContent>\n)\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeItemContent } from './CheckboxTreeItemContent'\n\ntype CheckboxGroupCollapsibleTriggerProps = Omit<\n React.ComponentProps<typeof Tree.CollapsibleTrigger> &\n React.ComponentProps<typeof CheckboxGroup.AllItem>,\n 'required' | 'asChild'\n>\n\nexport const CheckboxTreeCollapsibleTrigger = ({\n onCheckedChange,\n title,\n label,\n children,\n disabled,\n ...rest\n}: CheckboxGroupCollapsibleTriggerProps) => {\n const treeCollapsibleTriggerProps = { label }\n const checkboxAllItemProps = { onCheckedChange, title, disabled }\n return (\n <Tree.CollapsibleTrigger {...treeCollapsibleTriggerProps} {...rest}>\n <CheckboxTreeItemContent\n onClick={\n // Don't propagate click and don't open/close the collapsible when the label/checkbox are clicked\n (e) => e.stopPropagation()\n }\n >\n <CheckboxGroup.AllItem {...checkboxAllItemProps} />\n {children}\n </CheckboxTreeItemContent>\n </Tree.CollapsibleTrigger>\n )\n}\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeItemContent } from './CheckboxTreeItemContent'\n\ntype CheckboxTreeItemProps = Omit<\n React.ComponentProps<typeof Tree.Item> &\n React.ComponentProps<typeof CheckboxGroup.Item>,\n 'required' | 'asChild'\n>\n\nexport const CheckboxTreeItem = ({\n value,\n title,\n onCheckedChange,\n children,\n disabled,\n ...rest\n}: CheckboxTreeItemProps) => {\n const checkboxItemProps = { value, title, onCheckedChange, disabled }\n return (\n <Tree.Item {...rest}>\n <CheckboxTreeItemContent>\n <CheckboxGroup.Item {...checkboxItemProps} />\n {children}\n </CheckboxTreeItemContent>\n </Tree.Item>\n )\n}\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeCollapsible } from './CheckboxTreeCollapsible'\nimport { CheckboxTreeCollapsibleContent } from './CheckboxTreeCollapsibleContent'\nimport { CheckboxTreeCollapsibleTrigger } from './CheckboxTreeCollapsibleTrigger'\nimport { CheckboxTreeItem } from './CheckboxTreeItem'\n\ntype CheckboxTreeRootProps = Omit<\n React.ComponentProps<typeof CheckboxGroup> &\n React.ComponentProps<typeof Tree>,\n 'asChild'\n>\n\nexport const CheckboxTreeRoot = ({\n checked,\n defaultChecked,\n onCheckedChange,\n ...rest\n}: CheckboxTreeRootProps): React.ReactElement<unknown> => {\n const checkboxGroupProps = { checked, defaultChecked, onCheckedChange }\n return (\n <CheckboxGroup {...checkboxGroupProps} asChild>\n <Tree {...rest} />\n </CheckboxGroup>\n )\n}\n\ntype CheckboxTreeType = typeof CheckboxTreeRoot & {\n Collapsible: typeof CheckboxTreeCollapsible\n CollapsibleContent: typeof CheckboxTreeCollapsibleContent\n CollapsibleTrigger: typeof CheckboxTreeCollapsibleTrigger\n Item: typeof CheckboxTreeItem\n}\n\nexport const CheckboxTree: CheckboxTreeType = /* @__PURE__ */ Object.assign(\n CheckboxTreeRoot,\n {\n Collapsible: CheckboxTreeCollapsible,\n CollapsibleContent: CheckboxTreeCollapsibleContent,\n CollapsibleTrigger: CheckboxTreeCollapsibleTrigger,\n Item: CheckboxTreeItem\n }\n)\n","import { Danger, Error, Info, OkCircle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport type { InlineMessageTheme } from './InlineMessage.types'\n\nexport const INLINE_MESSAGE_ICONS: Record<\n InlineMessageTheme,\n React.FC<React.SVGProps<SVGSVGElement>>\n> = {\n success: OkCircle,\n warning: Danger,\n info: Info,\n neutral: Info,\n error: Error\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Text } from '../text/Text'\nimport { INLINE_MESSAGE_ICONS } from './InlineMessage.config'\nimport type { InlineMessageTheme } from './InlineMessage.types'\n\nconst InlineMessageContainer = styled('div', {\n base: ['flex'],\n variants: {\n theme: {\n success: ['text-success'],\n warning: ['[&_svg]:text-warning-dark', 'text-warning-text'],\n info: ['text-info'],\n neutral: ['text-grey-800'],\n error: ['text-danger']\n }\n }\n})\n\ntype InlineMessageProps = React.ComponentProps<\n typeof InlineMessageContainer\n> & {\n showIcon?: boolean\n size?: 'xs' | 'sm' | 'md'\n}\n\nexport const InlineMessage = ({\n className,\n showIcon = true,\n theme = 'error',\n size = 'sm',\n children,\n ...rest\n}: InlineMessageProps) => (\n <InlineMessageContainer theme={theme} className={className} {...rest}>\n {showIcon && (\n <Icon\n size=\"sm\"\n is={INLINE_MESSAGE_ICONS[theme as InlineMessageTheme]}\n className=\"mr-2\"\n />\n )}\n <Text as=\"span\" size={size} className=\"translate-y-0.5\">\n {children}\n </Text>\n </InlineMessageContainer>\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nconst StyledLabel = styled('label', {\n base: ['text-grey-900', 'font-body', 'm-0'],\n variants: {\n size: {\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]']\n },\n type: {\n block: ['block', 'font-semibold'],\n inline: ['flex', 'font-normal', 'max-w-max']\n },\n align: { start: [], center: [] },\n direction: { reverse: [], row: [] },\n appearance: { standard: [], modern: [] }\n },\n compoundVariants: [\n {\n type: 'inline',\n align: 'start',\n class: ['items-start']\n },\n {\n type: 'inline',\n align: 'center',\n class: ['items-center']\n },\n {\n type: 'inline',\n direction: 'reverse',\n class: ['flex-row-reverse']\n },\n {\n type: 'inline',\n direction: 'row',\n class: ['flex-row']\n },\n {\n type: 'block',\n appearance: 'modern',\n class: ['font-normal']\n }\n ]\n})\n\nexport type LabelProps = Override<\n React.ComponentPropsWithoutRef<typeof StyledLabel>,\n {\n as?: 'label' | 'legend'\n required?: boolean\n }\n>\n\nexport const Label = ({\n align = 'start',\n as = 'label',\n direction = 'row',\n size = 'md',\n type = 'block',\n children,\n required,\n ...rest\n}: LabelProps) => (\n <StyledLabel\n as={as}\n size={size}\n type={type}\n align={align}\n direction={direction}\n {...rest}\n >\n {children}\n {required && (\n <span className=\"text-danger ml-1 font-normal\" aria-hidden>\n *\n </span>\n )}\n </StyledLabel>\n)\n\nLabel.displayName = 'Label'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nconst StyledRadioButton = styled(\n RadioGroup.Item,\n {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-transparent',\n 'border',\n 'border-grey-800',\n 'rounded-full',\n 'text-white',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'p-0',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:border-primary-800',\n 'disabled:bg-grey-200',\n 'disabled:border-grey-800',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'disabled:data-[state=checked]:bg-grey-800',\n 'disabled:data-[state=checked]:border-grey-800'\n ],\n variants: {\n size: {\n md: ['size-4'],\n lg: ['-mt-1', 'size-6']\n }\n }\n },\n { enablePolymorphism: false, enableResponsiveVariants: true }\n)\n\nconst StyledIndicator = styled(\n RadioGroup.Indicator,\n {\n base: ['size-1.5', 'rounded-full', 'bg-current', 'absolute'],\n variants: {\n size: {\n md: ['size-1.5'],\n lg: ['size-3']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype RadioButtonProps = Override<\n React.ComponentProps<typeof StyledRadioButton>,\n {\n 'aria-label'?: string\n }\n>\n\nexport const RadioButton = ({ size, ...rest }: RadioButtonProps) => (\n <StyledRadioButton {...rest} size={size}>\n <StyledIndicator size={size} />\n </StyledRadioButton>\n)\n\nRadioButton.displayName = 'RadioButton'\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\nexport const Description = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => (\n <Text size=\"sm\" className={cn('text-grey-700', 'max-w-[80ch]', className)}>\n {children}\n </Text>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { Label } from '../label/Label'\nimport { RadioButton } from '../radio-button/RadioButton'\nimport { Description } from './FieldDescription'\n\ntype InlineFieldWrapperProps = {\n className?: string\n error?: string\n label: string\n required?: boolean\n align?: 'start' | 'center'\n direction?: 'row' | 'reverse'\n description?: string\n}\n\nexport const InlineFieldWrapper = ({\n align = 'start',\n children,\n className,\n description,\n direction = 'row',\n error,\n label,\n required\n}: React.PropsWithChildren<InlineFieldWrapperProps>) => (\n <div className={className}>\n <Label\n align={align}\n direction={direction}\n required={required}\n type=\"inline\"\n >\n {React.Children.map(children, (child: any) => (\n <div\n className={cn(\n direction === 'reverse' && 'ml-3',\n direction === 'row' && 'mr-3',\n (child?.type === Checkbox || child?.type === RadioButton) &&\n child?.props?.size !== 'lg' &&\n 'translate-y-1'\n )}\n >\n {child}\n </div>\n ))}\n {label}\n </Label>\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n {description && (\n <Description\n className={cn(\n 'mt-2',\n direction === 'reverse' && 'mr-7',\n direction === 'row' && 'ml-7'\n )}\n >\n {description}\n </Description>\n )}\n </div>\n)\n\nInlineFieldWrapper.displayName = 'InlineFieldWrapper'\n","import delve from 'dlv'\nimport { useFormContext } from 'react-hook-form'\n\n// Splits react-hook-form field paths on their `,` `[` `]` `.` separators.\nconst FIELD_PATH_SEPARATOR_RE = /[,[\\].]+?/\n\nexport const useFieldError = (fieldName: string) => {\n const { errors } = useFormContext()\n\n // in case of migration to a newer version of react-hook-form the path needs to updated to account for dynamic fields naming convention\n const fieldPath = fieldName.split(FIELD_PATH_SEPARATOR_RE).filter(Boolean)\n\n const getErrors = () => delve(errors, fieldPath)\n\n return {\n error: getErrors()?.message\n }\n}\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport type { FieldElementWrapperProps } from '../field-wrapper/FieldWrapper'\nimport { InlineFieldWrapper } from '../field-wrapper/InlineFieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\n\nenum CheckboxValue {\n ON = 'on',\n OFF = 'off'\n}\n\nexport const CheckboxField = ({\n className,\n label,\n name,\n validation,\n description,\n defaultChecked = false,\n checked,\n onCheckedChange,\n ...rest\n}: React.ComponentProps<typeof Checkbox> & FieldElementWrapperProps) => {\n const { control, setValue } = useFormContext()\n const { error } = useFieldError(name)\n const {\n field: { ref, onChange, value: innerChecked, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue: defaultChecked\n })\n\n React.useEffect(() => {\n // Sync an externally-controlled `checked` into react-hook-form without\n // marking the field dirty/touched — this isn't user input.\n if (typeof checked !== 'undefined')\n setValue(name, checked, { shouldDirty: false })\n }, [checked, name, setValue])\n\n return (\n <InlineFieldWrapper\n className={className}\n description={description}\n error={error}\n label={label}\n required={Boolean(validation?.required)}\n >\n <Checkbox\n ref={ref}\n name={innerName}\n {...rest}\n onCheckedChange={(newChecked) => {\n onChange(newChecked)\n onCheckedChange?.(newChecked)\n }}\n value={innerChecked ? CheckboxValue.ON : CheckboxValue.OFF}\n checked={innerChecked}\n {...(error && { state: 'error' })}\n />\n </InlineFieldWrapper>\n )\n}\n\nCheckboxField.displayName = 'CheckboxField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Icon } from '../icon/Icon'\n\nexport const StyledChipContent = styled('span', {\n base: [\n 'inline-flex',\n 'items-center',\n 'px-1',\n 'grow',\n 'overflow-hidden',\n 'text-ellipsis',\n 'whitespace-nowrap',\n '*:not-last:mr-1'\n ]\n})\n\nconst toIconSize = { sm: 'sm', md: 'sm', lg: 'md' }\n\nexport const ChipIcon = (props: React.ComponentProps<typeof Icon>) => {\n const rootContext = React.use(ChipRootContext)\n const { size } = rootContext\n const iconSize = overrideStyledVariantValue(size, (s) => toIconSize[s])\n return <Icon {...props} size={iconSize} />\n}\n\nconst ChipContent = ({ children, ...rest }) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n return (\n <StyledChipContent {...rest}>\n {\n childrenArray.map((child) => {\n if (!isSingleChild && typeof child === 'string')\n return (\n <span\n key={child}\n className=\"overflow-hidden text-ellipsis whitespace-nowrap\"\n >\n {child}\n </span>\n )\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n // `React.Children.toArray` already assigns each child a stable key.\n return <ChipIcon key={child.key} {...iconProps} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledChipContent>\n )\n}\n\nexport const StyledRoot = styled('div', {\n base: [\n 'flex',\n 'px-2',\n 'border',\n 'rounded-md',\n 'items-center',\n 'font-body',\n 'max-w-full',\n 'border-primary-800',\n 'text-primary-900',\n 'bg-primary-100',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n size: {\n sm: ['h-6', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['h-8', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n lg: ['h-10', 'text-md', 'leading-normal', 'capsize-[0.3864]']\n },\n appearance: {\n standard: [],\n modern: ['border-grey-900', 'text-grey-900', 'bg-grey-100']\n }\n }\n})\n\nexport type ChipRootContext = React.ComponentProps<typeof StyledRoot>\nexport type ChipRootProviderProps = ChipRootContext\n\nexport const ChipRootContext = React.createContext<ChipRootContext>({})\n\nexport const ChipRootProvider = ({ size, children }: ChipRootProviderProps) => {\n const value = React.useMemo<ChipRootContext>(() => ({ size }), [size])\n return <ChipRootContext value={value}>{children}</ChipRootContext>\n}\n\nexport type ChipRootProps = ChipRootProviderProps\n\nconst ChipRoot = ({ ref, size = 'md', ...rest }: ChipRootProps) => (\n <ChipRootProvider size={size}>\n <StyledRoot ref={ref} size={size} {...rest} />\n </ChipRootProvider>\n)\n\nexport const Chip = /* @__PURE__ */ Object.assign(ChipRoot, {\n Content: ChipContent,\n Icon: ChipIcon\n})\n","import { styled } from '../../styled'\n\nexport const ChipGroup = styled('div', {\n base: ['flex', 'flex-row', 'flex-wrap', 'gap-2']\n})\n","import * as React from 'react'\n\nexport interface DismissibleGroupContextValue {\n disabled?: boolean\n onDismiss: (value: string | number) => void\n}\nexport const DismissibleGroupContext =\n React.createContext<DismissibleGroupContextValue>({\n onDismiss: () => null\n })\n\nexport interface DismissibleGroupProps {\n disabled?: boolean\n onDismiss: (value: string | number) => void\n}\n\nexport const DismissibleGroupProvider = ({\n children,\n disabled,\n onDismiss\n}: React.PropsWithChildren<DismissibleGroupProps>) => {\n const value = React.useMemo<DismissibleGroupContextValue>(\n () => ({ disabled, onDismiss }),\n [disabled, onDismiss]\n )\n return (\n <DismissibleGroupContext value={value}>{children}</DismissibleGroupContext>\n )\n}\n\nexport interface DismissibleGroupRootProps extends DismissibleGroupProps {\n as?: React.ElementType\n ref?: React.Ref<HTMLDivElement>\n}\n\nexport const DismissibleGroupRoot = ({\n as: Component = 'div',\n disabled,\n onDismiss,\n ...rest\n}: React.PropsWithChildren<DismissibleGroupRootProps>) => (\n <DismissibleGroupProvider disabled={disabled} onDismiss={onDismiss}>\n <Component {...rest} />\n </DismissibleGroupProvider>\n)\n\nDismissibleGroupRoot.displayName = 'DismissibleGroup'\n","import * as React from 'react'\n\nimport { Dismissible } from '../dismissible'\nimport { DismissibleGroupContext } from './DismissibleGroupRoot'\n\nexport type DismissibleGroupItemProps = React.ComponentProps<\n typeof Dismissible\n> & {\n value: string | number\n disabled?: boolean\n}\n\nexport const DismissibleGroupItem = ({\n children,\n value,\n disabled: itemDisabled = false,\n ...rest\n}: React.PropsWithChildren<DismissibleGroupItemProps>) => {\n const groupContext = React.use(DismissibleGroupContext)\n if (groupContext === undefined) {\n throw new Error(\n 'DismissibleGroup.Item can only be used within a DismissibleGroup'\n )\n }\n const { onDismiss, disabled: groupDisabled } = groupContext\n return (\n <Dismissible\n disabled={groupDisabled || itemDisabled}\n {...rest}\n onDismiss={() => onDismiss(value)}\n >\n {children}\n </Dismissible>\n )\n}\n","import { DismissibleTrigger } from '../dismissible/DismissibleTrigger'\nimport { DismissibleGroupItem } from './DismissibleGroupItem'\nimport { DismissibleGroupRoot } from './DismissibleGroupRoot'\n\nexport const DismissibleGroup = /* @__PURE__ */ Object.assign(\n DismissibleGroupRoot,\n {\n Item: DismissibleGroupItem,\n Trigger: DismissibleTrigger\n }\n)\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Chip } from '../chip/Chip'\nimport { DismissibleGroup } from '../dismissible-group'\nimport { Icon } from '../icon/Icon'\n\nconst StyledChipDismissibleGroupItem = styled(Chip, {\n base: ['flex', 'px-1']\n})\n\nexport type ChipDismissibleGroupItem = React.ComponentProps<\n typeof DismissibleGroup.Item\n> &\n React.ComponentProps<typeof StyledChipDismissibleGroupItem> & {\n dismissActionLabel: string\n }\n\nexport const ChipDismissibleGroupItem = ({\n size = 'md',\n children,\n dismissActionLabel = 'Dismiss',\n ...rest\n}: ChipDismissibleGroupItem) => (\n <DismissibleGroup.Item asChild {...rest}>\n <StyledChipDismissibleGroupItem size={size}>\n <Chip.Content>{children}</Chip.Content>\n <DismissibleGroup.Trigger asChild>\n <ActionIcon\n label={dismissActionLabel}\n size={size === 'sm' ? 'xs' : 'sm'}\n className=\"text-grey-600\"\n >\n <Icon is={Close} />\n </ActionIcon>\n </DismissibleGroup.Trigger>\n </StyledChipDismissibleGroupItem>\n </DismissibleGroup.Item>\n)\n","import * as React from 'react'\n\nimport { ChipGroup } from '../chip/ChipGroup'\nimport { DismissibleGroup } from '../dismissible-group'\n\ntype ChipDismissibleGroupRootProps = React.ComponentProps<typeof ChipGroup> &\n React.ComponentProps<typeof DismissibleGroup>\n\nexport const ChipDismissibleGroupRoot = ({\n ref,\n ...props\n}: ChipDismissibleGroupRootProps) => {\n return <ChipGroup as={DismissibleGroup} ref={ref} {...props} />\n}\n","import { ChipDismissibleGroupItem } from './ChipDismissibleGroupItem'\nimport { ChipDismissibleGroupRoot } from './ChipDismissibleGroupRoot'\n\ntype ChipDismissibleGroup = typeof ChipDismissibleGroupRoot & {\n Item: typeof ChipDismissibleGroupItem\n}\n\nexport const ChipDismissibleGroup =\n ChipDismissibleGroupRoot as ChipDismissibleGroup\nChipDismissibleGroup.Item = ChipDismissibleGroupItem\n","import { Ok } from '@atom-learning/icons'\nimport * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Chip } from '../chip/Chip'\nimport { Icon } from '../icon/Icon'\n\nconst StyledChipToggleIcon = styled(Icon, {\n base: ['hidden']\n})\n\nconst StyledChipToggleGroupItem = styled(Chip, {\n base: [\n 'flex',\n 'not-disabled:cursor-pointer',\n 'not-disabled:data-[state=on]:hover:bg-white',\n 'not-disabled:data-[state=on]:hover:text-primary-1000',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-grey-200',\n 'not-disabled:hover:border-current',\n 'not-disabled:hover:text-grey-1000',\n 'data-[state=off]:bg-white',\n 'data-[state=off]:border-grey-600',\n 'data-[state=off]:text-grey-800',\n 'data-[state=on]:[&_svg]:block'\n ],\n variants: {\n appearance: {\n standard: [],\n modern: [\n 'data-[state=off]:bg-grey-100',\n 'data-[state=off]:border-transparent',\n 'data-[state=on]:border-grey-900',\n 'data-[state=on]:text-grey-900',\n 'data-[state=on]:bg-white',\n 'data-[state=on]:font-bold'\n ]\n }\n }\n})\n\ntype ChipToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> &\n React.ComponentProps<typeof StyledChipToggleGroupItem>\n\nexport const ChipToggleGroupItem = ({\n size = 'md',\n appearance,\n children,\n ...rest\n}: ChipToggleGroupItem) => (\n <ToggleGroup.Item {...rest} asChild>\n <StyledChipToggleGroupItem as=\"button\" appearance={appearance}>\n <StyledChipToggleIcon is={Ok} size={size === 'lg' ? 'md' : 'sm'} />\n <Chip.Content>{children}</Chip.Content>\n </StyledChipToggleGroupItem>\n </ToggleGroup.Item>\n)\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\ntype RootType = {\n disableDeselect?: boolean\n}\n\ntype ToggleGroupRootProps = React.ComponentProps<typeof ToggleGroup.Root> &\n RootType\n\nexport const ToggleGroupRoot = ({\n ref,\n disableDeselect = false,\n onValueChange,\n defaultValue,\n ...rest\n}: ToggleGroupRootProps) => {\n const [internalValue, setInternalValue] =\n React.useState<ToggleGroupRootProps['value']>(defaultValue)\n const handleValueChange: ToggleGroupRootProps['onValueChange'] = (\n newValue\n ) => {\n if (disableDeselect && (newValue === '' || newValue?.length === 0)) return\n setInternalValue(newValue)\n onValueChange?.(newValue)\n }\n\n return (\n // eslint-disable-next-line\n // @ts-ignore Radix types complain on properties depending on whether `type=\"single\"` or `\"multiple\"`. Works correctly so muting.\n <ToggleGroup.Root\n ref={ref}\n onValueChange={handleValueChange}\n value={internalValue}\n {...rest}\n />\n )\n}\n","import { ToggleGroupRoot } from './ToggleGroupRoot'\n\nexport const ToggleGroup = {\n Root: ToggleGroupRoot\n}\n","import * as React from 'react'\n\nimport { ToggleGroup } from '../../utilities/radix-overrides/toggle-group'\nimport { ChipGroup } from '../chip/ChipGroup'\n\ntype ChipToggleGroupRootProps = React.ComponentProps<typeof ChipGroup> &\n React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const ChipToggleGroupRoot = ({\n ref,\n ...props\n}: ChipToggleGroupRootProps) => (\n <ChipGroup\n ref={ref}\n as={ToggleGroup.Root}\n orientation=\"horizontal\"\n {...props}\n />\n)\n","import { ChipToggleGroupItem } from './ChipToggleGroupItem'\nimport { ChipToggleGroupRoot } from './ChipToggleGroupRoot'\n\ntype ChipToggleGroup = typeof ChipToggleGroupRoot & {\n Item: typeof ChipToggleGroupItem\n}\n\nexport const ChipToggleGroup = ChipToggleGroupRoot as ChipToggleGroup\nChipToggleGroup.Item = ChipToggleGroupItem\n","import { ComboboxInput as BaseComboboxInput } from '@reach/combobox'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const StyledComboboxInput = styled(BaseComboboxInput, {\n base: [\n 'bg-(image:--bg-chevron)',\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n '[background-repeat:no-repeat,repeat-x]',\n 'bg-size-[--spacing(5)_auto,100%]',\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'box-border',\n 'text-grey-1000',\n 'cursor-text',\n 'block',\n 'font-body',\n 'h-10',\n 'pl-3',\n 'pr-10',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'w-full',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800'\n ],\n\n variants: {\n size: {\n sm: ['h-8', 'text-sm', 'leading-[1.7]'],\n md: ['h-10', 'text-md', 'leading-loose'],\n lg: ['h-12', 'text-md', 'leading-loose']\n },\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-700',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n theme: {\n white: [],\n grey: []\n },\n state: {\n error: []\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border', 'border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n})\n\nexport type ComboboxInputProps = React.ComponentProps<\n typeof StyledComboboxInput\n>\n\nexport const ComboboxInput = ({\n ref,\n size = 'md',\n appearance = 'standard',\n ...rest\n}: ComboboxInputProps) => (\n <StyledComboboxInput\n size={size}\n appearance={appearance}\n {...rest}\n ref={ref}\n />\n)\n","import { ComboboxList as BaseComboboxList } from '@reach/combobox'\n\nimport { styled } from '../../styled'\n\nexport const ComboboxList = styled(\n BaseComboboxList,\n {\n base: ['list-none', 'm-0', 'p-0', 'select-none']\n },\n { enablePolymorphism: false }\n)\n","import { ComboboxOption as BaseComboboxOption } from '@reach/combobox'\n\nimport { styled } from '../../styled'\n\nexport const ComboboxOption = styled(\n BaseComboboxOption,\n {\n base: [\n 'text-grey-900',\n 'cursor-pointer',\n 'm-0',\n 'p-2',\n 'hover:bg-grey-100',\n 'hover:rounded-sm',\n 'aria-selected:bg-grey-100',\n 'aria-selected:rounded-sm',\n 'data-user-value:text-primary-800'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { ComboboxPopover as BaseComboboxPopover } from '@reach/combobox'\n\nimport { styled } from '../../styled'\n\nexport const ComboboxPopover = styled(\n BaseComboboxPopover,\n {\n base: [\n 'bg-white',\n 'border',\n 'border-grey-200',\n 'rounded-md',\n 'shadow-md',\n 'box-border',\n 'font-body',\n 'text-md',\n 'outline-none',\n 'p-1',\n 'translate-y-2'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { Combobox as BaseCombobox, ComboboxOptionText } from '@reach/combobox'\n\nimport { ComboboxInput } from './ComboboxInput'\nimport { ComboboxList } from './ComboboxList'\nimport { ComboboxOption } from './ComboboxOption'\nimport { ComboboxPopover } from './ComboboxPopover'\n\n// ':root': { '--reach-combobox': 1 }\n\nexport const Combobox = /* @__PURE__ */ Object.assign(BaseCombobox, {\n displayName: 'Combobox',\n Option: ComboboxOption,\n Input: ComboboxInput,\n Popover: ComboboxPopover,\n List: ComboboxList,\n OptionText: ComboboxOptionText\n})\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport type { ValidationOptions } from '../form/validation'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { Label } from '../label/Label'\nimport { type LabelProps } from '../label/Label'\nimport { Link } from '../link/Link'\nimport { Description } from './FieldDescription'\n\nexport type FieldWrapperProps = {\n className?: string\n error?: string\n fieldId: string\n label: string\n prompt?: { link?: string; label: string; onClick?: () => void }\n description?: string\n required?: boolean\n hideLabel?: boolean\n appearance?: LabelProps['appearance']\n}\n\nexport type FieldElementWrapperProps = Omit<FieldWrapperProps, 'fieldId'> & {\n name: string\n validation?: ValidationOptions\n}\n\nexport const FieldWrapper = ({\n children,\n error,\n fieldId,\n label,\n prompt,\n description,\n required,\n hideLabel,\n appearance,\n ...rest\n}: React.PropsWithChildren<FieldWrapperProps>) => (\n <div {...rest}>\n <div\n className={cn(\n 'mb-3',\n 'flex',\n 'items-center',\n 'justify-between',\n hideLabel && 'sr-only'\n )}\n >\n <Label htmlFor={fieldId} required={required} appearance={appearance}>\n {label}\n </Label>\n {prompt && (\n <Link href={prompt?.link} onClick={prompt?.onClick} size=\"sm\">\n {prompt.label}\n </Link>\n )}\n </div>\n {description && <Description className=\"mb-3\">{description}</Description>}\n {children}\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n </div>\n)\n\nFieldWrapper.displayName = 'FieldWrapper'\n","import * as React from 'react'\n\nimport type { InputProps } from '../input/Input'\n\nexport type FormCustomContextType =\n | {\n appearance?: InputProps['appearance']\n theme?: InputProps['theme']\n }\n | undefined\n\nexport const FormCustomContext = React.createContext<FormCustomContextType>({\n appearance: 'standard'\n})\n\nexport const useFormCustomContext = () => React.use(FormCustomContext)\n","import { overrideStyledVariantValue } from '../override-styled-variant-value/overrideStyledVariantValue'\n\nconst toIconSize = {\n sm: 'sm',\n md: 'md',\n lg: 'md'\n}\n\nexport const getFieldIconSize = (size: any) =>\n overrideStyledVariantValue(size, (s) => toIconSize[s])\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Text } from '../text/Text'\n\nexport const InputBackground = styled('div', {\n base: [\n 'flex',\n 'text-grey-1000',\n 'transition-[background,border-color]',\n 'duration-100',\n 'ease-out',\n 'w-full'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-blue-800',\n 'rounded-md'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1',\n 'rounded-md'\n ]\n },\n size: {\n sm: ['h-8'],\n md: ['h-10'],\n lg: ['h-12'],\n xl: ['h-16']\n },\n disabled: {\n true: ['cursor-not-allowed', 'opacity-30']\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n})\n\nInputBackground.displayName = 'InputBackground'\n\n// @__PURE__ keeps this tree-shakable for consumers importing only\n// InputBackground from this module.\nconst StyledInputText = /* @__PURE__ */ styled(Text, {\n base: [\n 'appearance-none',\n 'border-none',\n 'bg-none',\n 'bg-transparent',\n 'shadow-none',\n 'box-border',\n 'focus:outline-none',\n 'px-3',\n 'size-full',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ]\n})\n\nexport type InputTextProps = Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> &\n Omit<React.ComponentProps<typeof StyledInputText>, 'type' | 'as' | 'ref'> & {\n // override default 'type' property to prevent Input from being used to render\n // checkboxes, radios etc — we have dedicated components for them\n type?: 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'search'\n as?: never\n disabled?: boolean\n // StyledInputText wraps Text (default element 'p'), but InputText always\n // renders it as=\"input\", so the inherited paragraph ref must be overridden\n ref?: React.Ref<HTMLInputElement>\n }\n\nconst toTextSize = {\n sm: 'sm',\n md: 'md',\n lg: 'md',\n xl: 'lg'\n}\n\nexport const InputText = ({\n ref,\n type = 'text',\n size,\n ...rest\n}: InputTextProps) => {\n const textSize = overrideStyledVariantValue(size, (s) => toTextSize[s])\n\n return (\n <StyledInputText\n ref={ref}\n as=\"input\"\n type={type === 'number' ? 'text' : type}\n inputMode={type === 'number' ? 'numeric' : undefined}\n pattern={type === 'number' ? '[0-9]*' : undefined}\n size={textSize}\n {...rest}\n />\n )\n}\n\ntype InputBackgroundProps = React.ComponentProps<typeof InputBackground>\nexport type InputProps = Omit<\n React.ComponentProps<typeof InputText>,\n 'size' | 'state' | 'appearance'\n> & {\n size?: InputBackgroundProps['size']\n state?: InputBackgroundProps['state']\n appearance?: InputBackgroundProps['appearance']\n theme?: InputBackgroundProps['theme']\n disabled?: boolean\n name?: string\n readOnly?: boolean\n value?: string | number\n onChange?: React.ChangeEventHandler<HTMLInputElement>\n}\n\nexport const Input = ({\n ref,\n className,\n size = 'md',\n appearance = 'standard',\n theme,\n state,\n disabled,\n style,\n ...rest\n}: InputProps) => (\n <InputBackground\n size={size}\n appearance={appearance}\n theme={theme}\n disabled={disabled}\n state={state}\n className={className}\n style={style}\n >\n <InputText size={size} ref={ref} disabled={disabled} {...rest} />\n </InputBackground>\n)\n","import { Eye, EyeCrossed } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useState } from 'react'\n\nimport { cn } from '../../styled'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport type { InputProps } from '../input/Input'\nimport { Input } from '../input/Input'\n\ntype PasswordInputProps = Omit<InputProps, 'type'> & {\n hidePasswordText?: string\n showPasswordText?: string\n}\n\nexport const PasswordInput = ({\n ref,\n className,\n hidePasswordText = 'Hide password',\n showPasswordText = 'Show password',\n size = 'md',\n ...restProps\n}: PasswordInputProps) => {\n const [isPasswordVisible, setIsPasswordVisible] = useState<boolean>(false)\n const togglePasswordVisibility = () =>\n setIsPasswordVisible((currentState) => !currentState)\n\n const iconSize = getFieldIconSize(size)\n\n return (\n <div className={cn('relative', className)}>\n <Input\n {...restProps}\n size={size}\n type={isPasswordVisible ? 'text' : 'password'}\n ref={ref}\n className=\"pr-6\"\n />\n <ActionIcon\n appearance=\"simple\"\n theme=\"neutral\"\n label={isPasswordVisible ? hidePasswordText : showPasswordText}\n onClick={togglePasswordVisibility}\n onMouseDown={(e) => e.preventDefault()} // prevent focus being lost from password input\n size={iconSize}\n className={cn(\n size === 'lg' ? 'bottom-1' : 'bottom-0',\n 'absolute',\n 'right-0'\n )}\n >\n <Icon is={isPasswordVisible ? Eye : EyeCrossed} />\n </ActionIcon>\n </div>\n )\n}\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport { cn } from '../../styled'\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { PasswordInput } from '../password-input/PasswordInput'\n\ntype PasswordFieldProps = React.ComponentProps<typeof PasswordInput> &\n Omit<FieldElementWrapperProps, 'label'> & {\n label?: string\n }\n\nexport const PasswordField = ({\n className,\n hideLabel,\n label = 'Password',\n name,\n prompt = undefined,\n description,\n validation,\n appearance,\n theme,\n ...rest\n}: PasswordFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n className={cn('relative', className)}\n >\n <PasswordInput\n autoComplete=\"current-password\"\n name={name}\n id={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error !== undefined && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nPasswordField.displayName = 'PasswordField'\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport { throttle } from 'throttle-debounce'\nimport invariant from 'tiny-invariant'\n\nimport type { Override } from '../../utilities/types'\nimport type { FieldElementWrapperProps } from '../field-wrapper/FieldWrapper'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { PasswordField } from '../password-field/PasswordField'\nimport { PasswordInput } from '../password-input/PasswordInput'\n\ntype ValidationResult = Record<string, boolean>\n\nconst getMessageTheme = (result: boolean, isFocused: boolean) => {\n if (result) return 'success'\n\n return isFocused ? 'neutral' : 'error'\n}\n\ntype CreatePasswordFieldProps = Override<\n React.ComponentProps<typeof PasswordInput> & FieldElementWrapperProps,\n {\n label?: string\n name?: string\n validate: (\n password: string\n ) => Promise<ValidationResult | undefined> | ValidationResult\n defaultValidation: ValidationResult\n messageDirection?: 'row' | 'column'\n }\n>\n\nexport const CreatePasswordField = ({\n validate,\n defaultValidation,\n messageDirection = 'row',\n label = 'Create a password',\n name = 'password',\n className,\n validation,\n appearance,\n ...rest\n}: CreatePasswordFieldProps) => {\n const { formState, control } = useFormContext()\n const [isFocused, setIsFocused] = React.useState<boolean>(false)\n const [validationResult, setValidationResult] =\n React.useState<ValidationResult>(defaultValidation)\n\n const touched: boolean = formState.touched[name]\n const error =\n formState.errors[name]?.type === 'validate' ||\n Object.values(validationResult).every((isValid) => !isValid)\n\n const validatePassword = React.useCallback(\n async (password: string) => {\n const result = await validate(password)\n\n if (result) {\n invariant(\n typeof result === 'object',\n 'The validate function must return an object'\n )\n\n setValidationResult(result)\n return Object.values(result).every((isValid) => isValid)\n }\n\n return false\n },\n [setValidationResult]\n )\n\n // useMemo, not useCallback(throttle(...)): the throttler must survive\n // re-renders or its timing window resets every render.\n const handleChange = React.useMemo(\n () => throttle(500, validatePassword),\n [validatePassword]\n )\n\n const showValidation: boolean =\n (control.mode.isOnBlur && (isFocused || touched)) ||\n (control.mode.isOnSubmit && (isFocused || (formState.isSubmitted && error)))\n\n return (\n <div className={className}>\n <PasswordField\n label={label}\n name={name}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n handleChange(e.target.value)\n }\n onBlur={() => setIsFocused(false)}\n onFocus={() => setIsFocused(true)}\n validation={{ ...validation, validate: validatePassword }}\n appearance={appearance}\n {...rest}\n />\n {showValidation && (\n <div\n style={{ '--direction': messageDirection }}\n className=\"direction-(--direction) mt-2 flex flex-wrap gap-2\"\n >\n {Object.entries(validationResult).map(([message, result]) => (\n <InlineMessage\n key={message}\n theme={getMessageTheme(result, isFocused)}\n >\n {message}\n </InlineMessage>\n ))}\n </div>\n )}\n </div>\n )\n}\n\nCreatePasswordField.displayName = 'CreatePasswordField'\n","import type {\n InitialTableState,\n Row,\n RowSelectionState,\n SortDirection,\n Table\n} from '@tanstack/react-table'\nimport * as React from 'react'\n\nexport enum AsyncDataState {\n NONE = 'none',\n PENDING = 'pending',\n FULFILLED = 'fulfilled',\n REJECTED = 'rejected'\n}\n\nexport type AsyncDataResult = {\n total: number\n results: TableData\n}\n\nexport type AsyncDataOptions = {\n pageIndex: number\n pageSize: number\n sortBy?: string\n sortDirection?: SortDirection\n globalFilter?: string\n}\n\nexport type GetAsyncData = (\n options: AsyncDataOptions\n) => Promise<AsyncDataResult | undefined>\n\nexport type TablePosition = {\n top: number | null\n bottom: number | null\n offsetTop: number\n isVisible: boolean\n}\n\nexport type DataTableContextType<T = unknown> = Table<T> & {\n setIsSortable: React.Dispatch<React.SetStateAction<boolean>>\n applyPagination: () => void\n removePagination: () => void\n getTotalRows: () => number\n isSortable: boolean\n asyncDataState?: AsyncDataState\n runAsyncData?: (options: Partial<AsyncDataOptions>) => Promise<void>\n hasAsyncData: boolean\n disabledRows?: Record<string, boolean>\n enableRowSelection?: boolean | ((row: Row<unknown>) => boolean)\n rowSelection: RowSelectionState\n tablePosition?: TablePosition\n setTablePosition: React.Dispatch<React.SetStateAction<TablePosition>>\n data: AsyncDataResult\n columns: any\n tableId: string\n /**\n * Directly update the data array that the table rows are built from.\n * This is useful when re-ordering rows, but is high-risk if you're not sure what you're doing!\n *\n * Note in particular that this value is also updated if you update the value of the `DataTable`'s `data` prop\n * — it's probably best to only use one of those two methods for any given table.\n */\n setData: React.Dispatch<React.SetStateAction<AsyncDataResult>>\n}\n\nexport type TableData = Array<Record<string, unknown>>\n\n// Use tanstack's purpose-built initial-state type rather than composing from\n// the full `*TableState` interfaces: a shallow `Partial<… & PaginationTableState>`\n// leaves `pagination` typed as the full `PaginationState` (requiring `pageIndex`),\n// whereas `InitialTableState` correctly types it as `Partial<PaginationState>` so\n// consumers can pass e.g. `{ pagination: { pageSize } }`.\nexport type InitialState = InitialTableState\n\nexport type DefaultSort = { column: string; direction: SortDirection }\n","import type {\n PaginationState,\n SortDirection,\n SortingState\n} from '@tanstack/react-table'\nimport invariant from 'tiny-invariant'\n\nimport type {\n AsyncDataOptions,\n AsyncDataResult,\n GetAsyncData\n} from './DataTable.types'\n\nconst getSortDirection = (sorting: SortingState): SortDirection | undefined => {\n if (sorting[0]) {\n return sorting[0].desc ? 'desc' : 'asc'\n }\n return undefined\n}\n\nexport const getNewAsyncData = async (\n getAsyncData: GetAsyncData,\n asyncDataOptions: Partial<AsyncDataOptions>,\n paginationState: PaginationState,\n sorting: SortingState,\n globalFilter: string\n): Promise<AsyncDataResult | undefined> => {\n const { pageIndex, pageSize } = paginationState\n const params = {\n pageIndex: asyncDataOptions?.pageIndex ?? pageIndex,\n pageSize: asyncDataOptions?.pageSize ?? pageSize,\n sortBy: asyncDataOptions?.sortBy ?? sorting[0]?.id,\n sortDirection: asyncDataOptions?.sortDirection ?? getSortDirection(sorting),\n globalFilter: asyncDataOptions.globalFilter ?? globalFilter\n }\n\n const newData = await getAsyncData(params)\n\n invariant(\n Array.isArray(newData?.results),\n 'The getAsyncData function must return an object with a property `result` which must be an array'\n )\n invariant(\n newData && Number.isInteger(newData.total) && newData.total >= 0,\n 'The getAsyncData function must return an object with a property `total` which must be a positive integer or zero'\n )\n\n return newData\n}\n","import type { PaginationState } from '@tanstack/react-table'\nimport * as React from 'react'\n\nconst defaultPaginationState: PaginationState = { pageIndex: 0, pageSize: 10 }\nexport const usePagination = (\n // Initial pagination may be partial (e.g. just `pageSize`); defaults below\n // fill the rest, so the working `paginationState` stays a full PaginationState.\n initialPaginationState: Partial<PaginationState> | undefined\n) => {\n const [isPaginated, setIsPaginated] = React.useState<boolean>(\n !!initialPaginationState\n )\n\n const [paginationState, setPaginationState] = React.useState<\n PaginationState | undefined\n >({\n ...defaultPaginationState,\n ...(initialPaginationState || {})\n })\n\n const applyPagination = React.useCallback(() => {\n setIsPaginated(true)\n }, [])\n\n // Lets <Pagination> undo applyPagination when it unmounts, restoring\n // whatever the provider was configured with initially.\n const wasInitiallyPaginated = React.useRef(!!initialPaginationState)\n const removePagination = React.useCallback(() => {\n setIsPaginated(wasInitiallyPaginated.current)\n }, [])\n\n return {\n isPaginated,\n paginationState,\n setPaginationState,\n applyPagination,\n removePagination\n }\n}\n","import type { SortingState } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport type { DefaultSort } from './DataTable.types'\n\nexport const useSortByColumn = (defaultSort: DefaultSort | undefined) => {\n const [isSortable, setIsSortable] = React.useState<boolean>(false)\n\n const [sorting, setSorting] = React.useState<SortingState>(\n defaultSort\n ? [\n {\n id: defaultSort.column,\n desc: defaultSort.direction === 'desc'\n }\n ]\n : []\n )\n\n return { isSortable, setIsSortable, sorting, setSorting }\n}\n","import type {\n ExpandedState,\n OnChangeFn,\n PaginationState,\n Row,\n RowSelectionState\n} from '@tanstack/react-table'\nimport {\n getCoreRowModel,\n getExpandedRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable\n} from '@tanstack/react-table'\nimport * as React from 'react'\n// Use the named export, not the default: the CJS build's Node-mode interop\n// (__toESM(mod, 1)) shadows this package's `default` with the whole module\n// object, so a default import resolves to a non-callable object at runtime.\n// NoCheck is equivalent here — the dep (`dataProp`) is always an array, so the\n// default export's dev-only all-primitive guard would never fire.\nimport { useDeepCompareEffectNoCheck as useDeepCompareEffect } from 'use-deep-compare-effect'\n\nimport {\n AsyncDataState,\n type DataTableContextType,\n type InitialState,\n type TableData,\n type TablePosition,\n type AsyncDataOptions,\n type AsyncDataResult,\n type DefaultSort,\n type GetAsyncData\n} from './DataTable.types'\nimport { getNewAsyncData } from './getNewAsyncData'\nimport { usePagination } from './usePagination'\nimport { useSortByColumn } from './useSorting'\n\nconst DataTableContext =\n React.createContext<DataTableContextType<unknown> | null>(null)\n\ntype DataTableProviderProps = {\n columns\n defaultSort?: DefaultSort\n children: React.ReactNode\n initialState?: InitialState\n disabledRows?: Record<string, boolean>\n enableRowSelection?: boolean | ((row: Row<unknown>) => boolean)\n onRowSelectionChange?: OnChangeFn<RowSelectionState>\n} & (\n | { data: TableData; getAsyncData?: never }\n | { data?: never; getAsyncData: GetAsyncData }\n)\n\nexport const DataTableProvider = ({\n columns,\n data: dataProp = [],\n getAsyncData,\n defaultSort,\n initialState = undefined,\n disabledRows,\n enableRowSelection,\n onRowSelectionChange,\n children\n}: DataTableProviderProps) => {\n // Rendered into checkbox id/htmlFor/name attributes, so it must be\n // identical between server and client render — useId guarantees this.\n const tableId = React.useId()\n\n const [data, setData] = React.useState<AsyncDataResult>({\n results: dataProp ?? [],\n total: dataProp?.length ?? 0\n })\n\n const [rowSelection, setRowSelection] = React.useState<RowSelectionState>({})\n const [expanded, setExpanded] = React.useState<ExpandedState>({})\n\n const [tablePosition, setTablePosition] = React.useState<TablePosition>({\n top: null,\n bottom: null,\n offsetTop: 0,\n isVisible: true\n })\n\n const {\n isPaginated,\n applyPagination,\n removePagination,\n paginationState,\n setPaginationState\n } = usePagination(initialState?.pagination)\n\n const [asyncDataState, setAsyncDataState] = React.useState<AsyncDataState>(\n AsyncDataState.NONE\n )\n\n const [globalFilter, setGlobalFilter] = React.useState<string>('')\n\n const { setIsSortable, isSortable, sorting, setSorting } =\n useSortByColumn(defaultSort)\n\n // Monotonic sequence so only the latest in-flight request may commit its\n // response — without this, rapid pagination/sort/filter changes race two\n // requests and the slower, stale response wins `setData`.\n const asyncRequestIdRef = React.useRef(0)\n\n const runAsyncData = React.useCallback(\n async (overrideAsyncDataOptions: Partial<AsyncDataOptions>) => {\n if (!getAsyncData) return\n\n const requestId = ++asyncRequestIdRef.current\n\n try {\n setAsyncDataState(AsyncDataState.PENDING)\n\n const newData = await getNewAsyncData(\n getAsyncData,\n overrideAsyncDataOptions,\n paginationState as PaginationState,\n sorting,\n globalFilter\n )\n\n if (requestId !== asyncRequestIdRef.current) return\n\n setData(newData as AsyncDataResult)\n setAsyncDataState(AsyncDataState.FULFILLED)\n } catch (_error) {\n if (requestId !== asyncRequestIdRef.current) return\n\n setAsyncDataState(AsyncDataState.REJECTED)\n }\n },\n [\n getAsyncData,\n paginationState?.pageIndex,\n paginationState?.pageSize,\n sorting,\n globalFilter\n ]\n )\n\n React.useEffect(() => {\n runAsyncData({})\n }, [runAsyncData])\n\n useDeepCompareEffect(() => {\n if (!dataProp) return\n\n setData({ results: dataProp, total: dataProp.length })\n }, [dataProp])\n\n const getTotalRows = React.useCallback(() => data.total, [data.total])\n\n const table = useReactTable<unknown>({\n columns,\n data: data.results,\n pageCount:\n getAsyncData && paginationState\n ? Math.ceil(getTotalRows() / paginationState.pageSize)\n : -1,\n initialState: initialState,\n state: {\n sorting,\n globalFilter,\n pagination: paginationState,\n rowSelection,\n expanded\n },\n manualPagination: getAsyncData && isPaginated,\n manualSorting: getAsyncData && isPaginated,\n enableSorting: asyncDataState !== AsyncDataState.PENDING,\n enableGlobalFilter: !getAsyncData,\n enableRowSelection,\n onExpandedChange: setExpanded,\n getSubRows: (row) => (row as Row<unknown>).subRows,\n onRowSelectionChange: (updaterOrValue) => {\n if (onRowSelectionChange) onRowSelectionChange(updaterOrValue)\n setRowSelection(updaterOrValue)\n },\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: isPaginated ? getPaginationRowModel() : undefined,\n getSortedRowModel:\n isSortable || sorting.length ? getSortedRowModel() : undefined,\n getFilteredRowModel: getFilteredRowModel(),\n getExpandedRowModel: getExpandedRowModel(),\n onPaginationChange: isPaginated\n ? (setPaginationState as OnChangeFn<PaginationState>)\n : undefined,\n onSortingChange: setSorting,\n onGlobalFilterChange: setGlobalFilter,\n globalFilterFn: (row, columnId, filterValue) => {\n const checkFilterMatchesCell = (cellValue: string) =>\n cellValue.toLowerCase().includes(filterValue.toLowerCase())\n\n const isSubRow = row.depth > 0\n\n if (isSubRow) return true\n\n const value = row.getValue(columnId)\n switch (typeof value) {\n case 'string':\n return checkFilterMatchesCell(value)\n case 'boolean':\n case 'number':\n return checkFilterMatchesCell(String(value))\n default:\n return false\n }\n }\n })\n\n const value: DataTableContextType = React.useMemo(() => {\n return {\n ...table,\n columns,\n data,\n setData,\n setIsSortable,\n applyPagination,\n removePagination,\n getTotalRows,\n isSortable,\n asyncDataState,\n runAsyncData,\n hasAsyncData: !!getAsyncData,\n disabledRows,\n enableRowSelection,\n rowSelection,\n tablePosition,\n setTablePosition,\n tableId\n }\n // The value object's identity is what notifies consumers, and the spread\n // `table` instance is stable while its internal state changes — so every\n // piece of provider state must be a dep here or consumers go stale.\n }, [\n table,\n columns,\n data,\n applyPagination,\n removePagination,\n getTotalRows,\n isSortable,\n asyncDataState,\n runAsyncData,\n getAsyncData,\n disabledRows,\n enableRowSelection,\n rowSelection,\n tablePosition,\n expanded,\n sorting,\n globalFilter,\n paginationState,\n isPaginated,\n tableId\n ])\n\n return <DataTableContext value={value}>{children}</DataTableContext>\n}\n\nexport const useDataTable = <T extends Record<string, unknown>>() => {\n const context = React.use(DataTableContext) as DataTableContextType<T>\n\n if (!context)\n throw new Error(\n 'useDataTable can only be called from inside a DataTableProvider'\n )\n\n return context\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledTableBody = styled('tbody', {\n base: [],\n variants: {\n striped: {\n true: ['[&_tr]:even:bg-grey-100', '[&_tr]:odd:bg-white'],\n false: ['[&_tr]:bg-white']\n }\n }\n})\n\ntype TableBodyProps = React.ComponentProps<typeof StyledTableBody>\n\nexport const TableBody = ({ striped = true, ...rest }: TableBodyProps) => (\n <StyledTableBody striped={striped} {...rest} />\n)\n\nTableBody.displayName = 'TableBody'\n","import { styled } from '../../styled'\n\nexport const TableCell = styled('td', {\n base: [\n 'border-t',\n 'border-t-grey-100',\n 'box-border',\n 'text-grey-800',\n 'font-body',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n 'first:font-semibold'\n ]\n})\n\nTableCell.displayName = 'TableCell'\n","import { styled } from '../../styled'\n\nexport const TableFooter = styled('tfoot', {\n base: []\n})\n\nTableFooter.displayName = 'TableFooter'\n","import { styled } from '../../styled'\n\nexport const TableFooterCell = styled('td', {\n base: [\n 'text-grey-800',\n 'font-body',\n 'font-semibold',\n 'text-left',\n 'align-middle'\n ]\n})\n\nTableFooterCell.displayName = 'TableFooterCell'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const TABLE_HEADER_THEMES = {\n PRIMARY: 'primary',\n PRIMARY_DARK: 'primaryDark',\n PRIMARY_LIGHT: 'primaryLight',\n LIGHT: 'light',\n WHITE: 'white'\n} as const\n\nconst StyledTableHeader = /* @__PURE__ */ styled('thead', {\n base: [],\n variants: {\n theme: {\n [TABLE_HEADER_THEMES.PRIMARY]: ['[&_th]:bg-primary-800'],\n [TABLE_HEADER_THEMES.PRIMARY_DARK]: ['[&_th]:bg-primary-1000'],\n [TABLE_HEADER_THEMES.PRIMARY_LIGHT]: [\n '[&_th]:bg-primary-200',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.LIGHT]: [\n '[&_th]:bg-grey-100',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.WHITE]: ['[&_th]:bg-white', '[&_th]:text-grey-1000']\n },\n isSticky: {\n true: ['sticky', 'top-0', 'z-3']\n }\n }\n})\n\ntype TableHeaderProps = React.ComponentProps<typeof StyledTableHeader>\n\nexport const TableHeader = ({\n theme = 'primaryDark',\n isSticky = false,\n ...rest\n}: TableHeaderProps) => {\n return <StyledTableHeader theme={theme} isSticky={isSticky} {...rest} />\n}\n\nTableHeader.displayName = 'TableHeader'\n","import { styled } from '../../styled'\n\nexport const TableHeaderCell = styled('th', {\n base: [\n 'text-white',\n 'font-body',\n 'font-semibold',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n '[[colspan]]:text-center'\n ]\n})\n\nTableHeaderCell.displayName = 'TableHeaderCell'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledRow = styled('tr', {\n base: ['bg-[unset]']\n})\n\nexport const TableRow = (props: React.ComponentProps<typeof StyledRow>) => (\n <StyledRow {...props} />\n)\n","import * as React from 'react'\n\ntype ColumnStyle = Record<\n `--sticky-column-width-${number}` | `--sticky-offset-left-${number}`,\n string\n>\n\ninterface UseStickyColumnsCss {\n columnsStyle?: ColumnStyle\n}\n\nexport const useStickyColumnsStyle = ({\n numberOfStickyColumns,\n wrapperRef\n}: {\n numberOfStickyColumns: number\n wrapperRef: React.RefObject<HTMLDivElement | null>\n}): UseStickyColumnsCss => {\n const [columnsStyle, setColumnsStyle] = React.useState<ColumnStyle>({})\n\n const generateColumnsStyle = React.useCallback(() => {\n let accWidth = 0\n\n // Getting the table header cells elements to use their width to set the left position in the sticky columns.\n const tableHeaderCells = wrapperRef.current?.querySelectorAll('th')\n const tableHeaderElements = [...(tableHeaderCells || [])]\n\n // Getting only the number of sticky columns from the elements array that is what we are interested in.\n const stickyColumns = tableHeaderElements.slice(0, numberOfStickyColumns)\n\n const newColumnsStyle = stickyColumns.reduce((acc, column, index) => {\n const elementNumber = index + 1\n const styleObject = {\n ...acc,\n [`--sticky-column-width-${elementNumber}`]: `${column.offsetWidth}px`,\n [`--sticky-offset-left-${elementNumber}`]: `${accWidth}px`\n }\n\n accWidth += tableHeaderCells?.item(index).clientWidth || 0\n\n return styleObject\n }, {})\n\n return newColumnsStyle\n }, [numberOfStickyColumns, wrapperRef])\n\n React.useLayoutEffect(() => {\n if (!numberOfStickyColumns) return\n const newColumnsStyle = generateColumnsStyle()\n\n setColumnsStyle(newColumnsStyle)\n }, [numberOfStickyColumns, wrapperRef, generateColumnsStyle])\n\n return {\n columnsStyle\n }\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { useStickyColumnsStyle } from './useStickyColumnsCss'\n\nexport const TableStickyColumnsContainer = ({\n children,\n numberOfStickyColumns = 0,\n className,\n ...restProps\n}: React.PropsWithChildren<{\n numberOfStickyColumns?: number\n className?: string\n}>) => {\n const [hasScroll, setHasScroll] = React.useState<boolean>(false)\n const wrapperRef = React.useRef<HTMLDivElement | null>(null)\n const { columnsStyle } = useStickyColumnsStyle({\n numberOfStickyColumns,\n wrapperRef\n })\n\n const handleScroll = (event: React.UIEvent<HTMLDivElement>) => {\n const newHasScroll = event.currentTarget.scrollLeft > 0\n if (newHasScroll !== hasScroll) {\n setHasScroll(newHasScroll)\n }\n }\n\n return (\n <div\n onScroll={handleScroll}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"scrollbar\"\n ref={wrapperRef}\n style={columnsStyle}\n className={cn(\n 'overflow-auto',\n 'max-w-full',\n 'relative',\n 'overscroll-x-contain',\n '[&_td,&_th]:bg-inherit',\n className,\n numberOfStickyColumns >= 1 && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:sticky',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:left-(--sticky-offset-left-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:min-w-(--sticky-column-width-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:z-2'\n ],\n numberOfStickyColumns >= 2 && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:sticky',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:left-(--sticky-offset-left-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:min-w-(--sticky-column-width-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:z-2'\n ],\n numberOfStickyColumns >= 3 && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:sticky',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:left-(--sticky-offset-left-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:min-w-(--sticky-column-width-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:z-2'\n ],\n numberOfStickyColumns >= 4 && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:sticky',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:left-(--sticky-offset-left-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:min-w-(--sticky-column-width-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:z-2'\n ],\n numberOfStickyColumns === 1 &&\n hasScroll && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 2 &&\n hasScroll && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 3 &&\n hasScroll && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 4 &&\n hasScroll && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ]\n )}\n {...restProps}\n >\n {children}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { TableBody } from './TableBody'\nimport { TableCell } from './TableCell'\nimport { TableFooter } from './TableFooter'\nimport { TableFooterCell } from './TableFooterCell'\nimport { TableHeader } from './TableHeader'\nimport { TableHeaderCell } from './TableHeaderCell'\nimport { TableRow } from './TableRow'\nimport { TableStickyColumnsContainer } from './TableStickyColumnsContainer'\n\nconst StyledTable = styled('table', {\n base: [\n 'border-separate',\n 'border-spacing-0',\n 'font-sans',\n 'text-sm',\n 'w-full',\n 'relative',\n 'z-0'\n ],\n variants: {\n size: {\n md: ['[&_td,&_th]:h-10', '[&_td,&_th]:px-3', '[&_td,&_th]:py-1'],\n lg: [\n '[&_td,&_th]:h-12',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ],\n xl: [\n '[&_th]:h-12',\n '[&_td]:h-16',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ]\n },\n corners: {\n round: ['rounded-md'],\n square: []\n }\n }\n})\n\ntype TableProps = React.ComponentProps<typeof StyledTable> & {\n numberOfStickyColumns?: number\n scrollContainerCls?: string | string[]\n scrollContainerkey?: string\n maxRowDepth?: number\n}\n\nconst TableComponent = ({\n ref,\n size = 'md',\n corners = 'round',\n numberOfStickyColumns = 0,\n scrollContainerCls,\n scrollContainerkey,\n ...rest\n}: TableProps) => {\n const tableComponent = (\n <StyledTable ref={ref} size={size} corners={corners} {...rest} />\n )\n\n if (numberOfStickyColumns) {\n return (\n <TableStickyColumnsContainer\n key={scrollContainerkey}\n className={cn(scrollContainerCls)}\n numberOfStickyColumns={numberOfStickyColumns}\n >\n {tableComponent}\n </TableStickyColumnsContainer>\n )\n }\n\n return tableComponent\n}\n\nexport const Table = /* @__PURE__ */ Object.assign(TableComponent, {\n Body: TableBody,\n Cell: TableCell,\n Footer: TableFooter,\n FooterCell: TableFooterCell,\n Header: TableHeader,\n HeaderCell: TableHeaderCell,\n Row: TableRow,\n StickyColumnsContainer: TableStickyColumnsContainer\n})\n","import type { Cell } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Table } from '../table/Table'\n\ntype DataTableDataCellProps = {\n cell: Cell<Record<string, unknown>, unknown>\n}\n\nexport const DataTableDataCell = ({ cell }: DataTableDataCellProps) => (\n <Table.Cell key={cell.id}>\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </Table.Cell>\n)\n","import type { Row } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { useDataTable } from './DataTable.context'\n\nexport const DataTableRowSelectionCheckbox = ({\n row,\n checked,\n onCheckedChange,\n label = `Row ${row.id} selection`\n}: {\n row: Row<Record<string, unknown>>\n checked: boolean | 'indeterminate'\n onCheckedChange: (value: boolean) => void\n label?: string\n}): React.ReactElement<unknown> => {\n const { tableId } = useDataTable()\n\n return (\n <>\n <label htmlFor={`${tableId}_row_${row.id}_selection`} className=\"sr-only\">\n {label}\n </label>\n <Checkbox\n size=\"lg\"\n style={{ '--depth': row.depth }}\n checked={checked}\n onCheckedChange={onCheckedChange}\n id={`${tableId}_row_${row.id}_selection`}\n name={`${tableId}_row_${row.id}_selection`}\n disabled={!row.getCanSelect()}\n className=\"mr-3 ml-[calc((var(--depth,0)*2)*4px)]\"\n />\n </>\n )\n}\n","import { ChevronDown, ChevronRight } from '@atom-learning/icons'\nimport type { Row } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableDataCell } from './DataTableDataCell'\nimport { DataTableRowSelectionCheckbox } from './DataTableRowSelectionCheckbox'\n\nexport type DataTableRowProps = React.ComponentProps<typeof Table.Row> & {\n row: Row<Record<string, unknown>>\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n}\n\nconst StyledRow = styled(Table.Row, {\n base: ['bg-[initial]', 'relative'],\n variants: {\n isSelected: {\n true: ['bg-primary-100!']\n },\n isDisabled: {\n true: ['opacity-30']\n },\n isFocusable: {\n true: [\n 'translate-y-0',\n 'duration-200',\n 'ease-out',\n 'transition-shadow',\n 'transition-transform',\n 'hover:shadow-[0px_4px_11px_0px_hsla(0,0%,12%,0.12)]',\n 'hover:-translate-y-px',\n 'hover:z-3',\n 'focus:outline-2',\n 'focus:outline-primary-500',\n 'focus:outline-solid',\n 'focus:-outline-offset-4',\n 'focus:[&_td]:bg-transparent'\n ]\n }\n }\n})\n\nconst isElementInteractive = (element: Element | null): boolean => {\n if (!element) return false\n if (element.closest('button, a, input, select, textarea')) return true\n if (element.getAttribute('role') === 'button') return true\n return false\n}\n\nexport const DataTableRow = ({ row, rowAction }: DataTableRowProps) => {\n const { enableRowSelection, disabledRows, getCanSomeRowsExpand } =\n useDataTable()\n\n const isDisabled = !!disabledRows?.[row.id]\n\n const toggleExpandHandler = row.getToggleExpandedHandler()\n const toggleSelectHandler = row.getToggleSelectedHandler()\n\n const getCheckedState = (): boolean | 'indeterminate' => {\n if (row.getIsSomeSelected()) return 'indeterminate'\n return row.getIsSelected()\n }\n\n const handleRowClick = (\n rowData: Row<Record<string, unknown>>,\n event: React.MouseEvent<HTMLTableRowElement>\n ) => {\n if (!rowAction) return\n\n // Skip if clicking on an interactive element\n const rowElement = (event.target as Element).closest('tr')\n if (!rowElement || isElementInteractive(event.target as Element)) {\n return\n }\n\n rowAction(rowData.original, event)\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n if (isElementInteractive(event.target as Element)) {\n return\n }\n event.preventDefault()\n handleRowClick(\n row,\n event as unknown as React.MouseEvent<HTMLTableRowElement>\n )\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n const currentRow = (event.target as HTMLElement).closest('tr')\n const nextRow = currentRow?.nextElementSibling as HTMLElement\n if (nextRow && nextRow.tagName === 'TR') {\n nextRow.focus()\n }\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n const currentRow = (event.target as HTMLElement).closest('tr')\n const previousRow = currentRow?.previousElementSibling as HTMLElement\n if (previousRow && previousRow.tagName === 'TR') {\n previousRow.focus()\n }\n }\n }\n\n return (\n <StyledRow\n isSelected={row.getIsSelected()}\n isDisabled={isDisabled}\n isFocusable={!!rowAction && !isDisabled}\n {...(rowAction && {\n onClick: (event) => handleRowClick(row, event),\n tabIndex: 0,\n className: 'cursor-pointer',\n onKeyDown: handleKeyDown\n })}\n >\n {getCanSomeRowsExpand() && (\n <Table.Cell\n data-testid={`expand-icon-${row.id}`}\n onClick={toggleExpandHandler}\n className={cn(\n 'w-10',\n row.getCanExpand() ? 'cursor-pointer' : 'cursor-auto'\n )}\n >\n {row.getCanExpand() && (\n <Icon is={row.getIsExpanded() ? ChevronDown : ChevronRight} />\n )}\n </Table.Cell>\n )}\n\n {enableRowSelection && (\n <Table.Cell className=\"w-10\">\n <DataTableRowSelectionCheckbox\n row={row}\n checked={getCheckedState()}\n onCheckedChange={toggleSelectHandler}\n />\n </Table.Cell>\n )}\n {row.getVisibleCells().map((cell) => {\n return <DataTableDataCell key={cell.id} cell={cell} />\n })}\n </StyledRow>\n )\n}\n","import * as React from 'react'\n\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableRow } from './DataTableRow'\n\ntype DataTableBodyProps = Omit<\n React.ComponentProps<typeof Table.Body>,\n 'children'\n> & {\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n}\n\nexport const DataTableBody = ({\n striped = false,\n rowAction,\n ...rest\n}: DataTableBodyProps) => {\n const { getRowModel } = useDataTable()\n\n return (\n <Table.Body {...rest} striped={striped}>\n {getRowModel().rows.map((row) => {\n return <DataTableRow row={row} key={row.id} rowAction={rowAction} />\n })}\n </Table.Body>\n )\n}\n","import { styled } from '../../styled'\n\nexport const Divider = styled(\n 'hr',\n {\n base: ['border-none', 'bg-grey-200'],\n variants: {\n orientation: {\n horizontal: ['h-px', 'w-full'],\n vertical: ['h-full', 'min-h-8', 'w-px']\n }\n },\n defaultVariants: {\n orientation: 'horizontal'\n }\n },\n { enableResponsiveVariants: true }\n)\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\nimport { useDataTable } from './DataTable.context'\n\nconst defaultCopy = {\n sorted_by: 'Sorted by',\n ascending: 'ascending',\n descending: 'descending',\n separator: '-'\n}\n\nexport const DataTableMetaData = ({\n copy,\n ...rest\n}: React.ComponentProps<typeof Text> & {\n copy?: {\n sorted_by?: string\n ascending?: string\n descending?: string\n separator?: string\n }\n sortLabel?: string\n}) => {\n const { getState, columns, getRowModel, rowSelection } = useDataTable()\n const { sorting } = getState()\n const isSorted = sorting.length > 0\n\n const totalRows = getRowModel()?.rows?.length\n\n const selectedRows = Object.keys(rowSelection || {}).length\n\n const copyMerged = { ...defaultCopy, ...copy }\n\n const getColumnDisplayName = (id: string) => {\n const sortedColumn = columns.find((col) => col.id === id)\n return sortedColumn?.header || id\n }\n\n const getSortingString = (sorting) => {\n return `${copyMerged.separator} ${\n copyMerged.sorted_by\n } ${getColumnDisplayName(sorting[0].id)} ${\n sorting[0].desc ? copyMerged.descending : copyMerged.ascending\n }`\n }\n\n return (\n <Text weight=\"bold\" {...rest}>{`${selectedRows || totalRows} ${\n (selectedRows || totalRows) === 1 ? 'item' : 'items'\n } ${selectedRows ? 'selected' : ''} ${\n isSorted ? getSortingString(sorting) : ''\n }`}</Text>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Button } from '../button/Button'\nimport { Divider } from '../divider/Divider'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableMetaData } from './DataTableMetaData'\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'p-2',\n 'w-full',\n 'mb-2',\n 'justify-between',\n 'items-center',\n 'min-h-16',\n 'rounded-t-sm'\n ],\n variants: {\n isRowSelected: {\n true: ['bg-primary-100']\n }\n }\n})\n\nconst BulkActionsDefaultActions = ({\n children\n}: {\n children: React.ReactElement<unknown>\n}): React.ReactElement<unknown> | null => {\n const { rowSelection } = useDataTable()\n\n if (Object.keys(rowSelection || {}).length > 0) return null\n\n return children\n}\n\nconst BulkActionsSelectedRowActions = ({\n cancelLabel = 'Cancel',\n children\n}: {\n cancelLabel?: string\n children: React.ReactNode\n}) => {\n const { toggleAllPageRowsSelected, rowSelection } = useDataTable()\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (Object.keys(rowSelection || {}).length === 0) return null\n\n return (\n <>\n {children}\n {React.Children.count(children) > 0 && (\n <Divider orientation=\"vertical\" className=\"mx-4\" />\n )}\n <Button theme=\"neutral\" onClick={handleDeselectAllPageRows}>\n {cancelLabel}\n </Button>\n </>\n )\n}\n\nexport const DataTableBulkActions = /* @__PURE__ */ Object.assign(\n ({\n children,\n ...rest\n }: {\n children:\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n | [\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >,\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n ]\n }) => {\n const { rowSelection } = useDataTable()\n\n const isRowSelected = Object.keys(rowSelection || {}).length > 0\n\n return (\n <StyledContainer isRowSelected={isRowSelected} {...rest}>\n <DataTableMetaData />\n <div className=\"flex items-center justify-end\">{children}</div>\n </StyledContainer>\n )\n },\n {\n DefaultActions: BulkActionsDefaultActions,\n SelectedRowActions: BulkActionsSelectedRowActions\n }\n)\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { Divider } from '../divider/Divider'\nimport { useDataTable } from './DataTable.context'\n\nexport const BulkActionsSelectedRowActions = ({\n cancelLabel = 'Cancel',\n showDividers = true,\n children\n}: {\n cancelLabel?: string\n showDividers?: boolean\n children: React.ReactNode\n}) => {\n const { toggleAllPageRowsSelected, rowSelection } = useDataTable()\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (Object.keys(rowSelection || {}).length === 0) return null\n\n return (\n <>\n {children}\n {showDividers && React.Children.count(children) > 0 && (\n <Divider orientation=\"vertical\" className=\"mx-4\" />\n )}\n <Button theme=\"neutral\" onClick={handleDeselectAllPageRows}>\n {cancelLabel}\n </Button>\n </>\n )\n}\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Badge } from '../badge/Badge'\nimport { Icon } from '../icon/Icon'\nimport { Text } from '../text/Text'\nimport { useDataTable } from './DataTable.context'\nimport { BulkActionsSelectedRowActions } from './DataTableBulkActionsSelectedRowActions'\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'pl-3',\n 'pr-1',\n 'py-2',\n 'mb-4',\n 'mt-2',\n 'justify-between',\n 'items-center',\n 'rounded-lg',\n 'bg-primary-800',\n 'pointer-events-auto',\n 'z-2',\n 'w-full',\n 'mx-4',\n 'shadow-lg',\n 'sm:max-w-200',\n 'lg:max-w-250',\n 'lg:mb-8',\n 'lg:pl-4',\n 'lg:pr-1',\n 'lg:py-3',\n 'xl:max-w-350',\n 'xl:mb-8',\n 'xl:pl-6',\n 'xl:pr-2',\n 'xl:py-4'\n ]\n})\n\nexport const DataTableBulkActionsFloating = /* @__PURE__ */ Object.assign(\n ({\n children,\n ...rest\n }: React.PropsWithChildren<React.ComponentProps<typeof StyledContainer>>) => {\n const { rowSelection, toggleAllPageRowsSelected } = useDataTable()\n\n const numberOfSelectedRows = Object.keys(rowSelection || {}).length\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (numberOfSelectedRows === 0) return null\n\n return (\n <section className=\"pointer-events-none sticky bottom-0 left-0 flex justify-center\">\n <StyledContainer {...rest}>\n <div className=\"flex flex-auto items-center justify-start gap-2\">\n <Badge\n theme=\"success\"\n size=\"xs\"\n emphasis=\"subtle\"\n className=\"h-6 min-w-6\"\n >\n {numberOfSelectedRows}\n </Badge>\n <Text size=\"sm\" weight=\"bold\" className=\"text-white\">\n selected\n </Text>\n </div>\n <div className=\"flex flex-auto items-center justify-end gap-3\">\n {children}\n <ActionIcon\n appearance=\"simple\"\n theme=\"white\"\n size=\"md\"\n onClick={handleDeselectAllPageRows}\n label=\"close\"\n >\n <Icon is={Close} />\n </ActionIcon>\n </div>\n </StyledContainer>\n </section>\n )\n },\n {\n SelectedRowActions: BulkActionsSelectedRowActions\n }\n)\n","import * as React from 'react'\n\nimport type { EmptyStateProps } from './EmptyState'\n\ntype EmptyStateProviderProps = {\n size?: EmptyStateProps['size']\n}\n\ntype EmptyStateContextValue = EmptyStateProviderProps\n\nexport const EmptyStateContext = React.createContext<EmptyStateContextValue>({})\n\nexport const EmptyStateProvider = ({\n size,\n children\n}: React.PropsWithChildren<EmptyStateProviderProps>) => {\n const value = React.useMemo<EmptyStateContextValue>(() => ({ size }), [size])\n return <EmptyStateContext value={value}>{children}</EmptyStateContext>\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateBody = styled(\n Text,\n {\n base: ['text-grey-800', 'font-normal'],\n variants: {\n size: {\n xs: ['mb-4', 'text-sm'],\n sm: ['mb-4', 'text-sm'],\n md: ['mb-4', 'text-sm'],\n lg: ['mb-6', 'text-md'],\n xl: ['mb-6', 'text-md']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype EmptyStateBodyProps = React.ComponentProps<typeof StyledEmptyStateBody>\n\nexport const EmptyStateBody = (props: EmptyStateBodyProps) => {\n const { size } = React.use(EmptyStateContext)\n return <StyledEmptyStateBody {...props} size={size} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Image } from '../image/Image'\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateImage = styled(\n Image,\n {\n base: [],\n variants: {\n size: {\n xs: ['max-h-8', 'max-w-14', 'mb-4'],\n sm: ['max-h-12', 'max-w-21', 'mb-4'],\n md: ['max-h-18', 'max-w-[126px]', 'mb-4'],\n lg: ['max-h-[142px]', 'max-w-[190px]', 'mb-6'],\n xl: ['max-h-[213px]', 'max-w-[285px]', 'mb-6']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype EmptyStateImageProps = React.ComponentProps<typeof StyledEmptyStateImage>\n\nexport const EmptyStateImage = (props: EmptyStateImageProps) => {\n const { size } = React.use(EmptyStateContext)\n return <StyledEmptyStateImage size={size} {...props} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateTitle = styled(\n 'h2',\n {\n base: ['text-grey-800', 'font-body', 'font-semibold', 'm-0'],\n variants: {\n size: {\n xs: ['mb-3', 'text-md'],\n sm: ['mb-3', 'text-md'],\n md: ['mb-3', 'text-md'],\n lg: ['mb-4', 'text-lg'],\n xl: ['mb-4', 'text-lg']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\n// Override, not intersection: ComponentProps yields `as?: never`, and\n// intersecting that with ElementType silently collapses `as` to undefined\ntype EmptyStateTitleProps = Override<\n React.ComponentProps<typeof StyledEmptyStateTitle>,\n {\n as?: React.ComponentType | React.ElementType\n }\n>\n\nexport const EmptyStateTitle = (props: EmptyStateTitleProps) => {\n const { size } = React.use(EmptyStateContext)\n return <StyledEmptyStateTitle size={size} {...props} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { EmptyStateProvider } from './EmptyState.context'\nimport { EmptyStateBody } from './EmptyStateBody'\nimport { EmptyStateImage } from './EmptyStateImage'\nimport { EmptyStateTitle } from './EmptyStateTitle'\n\nconst EmptyStateContainer = styled(\n 'div',\n {\n base: ['flex', 'flex-col', 'items-center', 'text-center', '*:last:mb-0'],\n variants: {\n size: {\n xs: ['p-2'],\n sm: ['p-3'],\n md: ['p-4'],\n lg: ['p-8'],\n xl: ['p-10']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport type EmptyStateProps = React.ComponentProps<typeof EmptyStateContainer>\n\nconst EmptyStateComponent = ({ size = 'sm', ...rest }: EmptyStateProps) => (\n <EmptyStateProvider size={size}>\n <EmptyStateContainer size={size} {...rest} />\n </EmptyStateProvider>\n)\n\nexport const EmptyState = /* @__PURE__ */ Object.assign(EmptyStateComponent, {\n Image: EmptyStateImage,\n Title: EmptyStateTitle,\n Body: EmptyStateBody\n})\n\nEmptyStateComponent.displayName = 'EmptyState'\n","import * as React from 'react'\n\nimport { EmptyState } from '../empty-state/EmptyState'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\n\ntype DataTableEmptyStateProps = React.ComponentProps<typeof EmptyState>\n\nexport const DataTableEmptyState = ({\n children,\n ...rest\n}: DataTableEmptyStateProps) => {\n const { asyncDataState, getTotalRows } = useDataTable()\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n if (!isEmpty) return null\n\n return <EmptyState {...rest}>{children}</EmptyState>\n}\n","import * as React from 'react'\n\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState, type DataTableContextType } from './DataTable.types'\n\nexport const DataTableError = ({\n children\n}: {\n children: (\n retry?: DataTableContextType['runAsyncData']\n ) => React.ReactElement<unknown>\n}) => {\n const { asyncDataState, runAsyncData } = useDataTable()\n\n if (asyncDataState !== AsyncDataState.REJECTED) return null\n\n return children(runAsyncData)\n}\n","import { Close, Search } from '@atom-learning/icons'\nimport { useComposedRefs } from '@radix-ui/react-compose-refs'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { useCallbackRef } from '../../utilities/hooks/useCallbackRef'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Input, InputBackground, InputText } from '../input/Input'\n\nexport type SearchInputProps = React.ComponentProps<typeof Input> & {\n size?: 'sm' | 'md' | 'lg'\n className?: string\n value?: string\n defaultValue?: string\n onValueChange?: (newValue: string) => void\n clearText?: string\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void\n}\n\nenum INPUT_ICON {\n SEARCH = 'SEARCH',\n CLEAR = 'CLEAR'\n}\n\nconst StyledIcon = styled(Icon, {\n base: ['text-grey-700', 'absolute', 'pointer-events-none'],\n variants: {\n size: {\n sm: ['right-2', 'size-4'],\n md: ['right-2.5', 'size-5'],\n lg: ['right-2.5', 'size-5']\n }\n }\n})\n\nexport const SearchInput = ({\n ref,\n size = 'md',\n appearance = 'standard',\n theme,\n className,\n value,\n defaultValue = '',\n onValueChange,\n clearText = 'Clear',\n onChange,\n ...rest\n}: SearchInputProps) => {\n const [inputElRef, setInputElRef] = useCallbackRef()\n const [innerValue, setInnerValue] = React.useState(defaultValue)\n // Derived during render — mirroring `value` into state via an effect would\n // paint one stale frame per controlled update.\n const currentValue = value ?? innerValue\n const activeIcon = currentValue ? INPUT_ICON.CLEAR : INPUT_ICON.SEARCH\n\n const iconSize = getFieldIconSize(size)\n\n const composedInputRef = useComposedRefs(\n ref as React.Ref<HTMLElement>,\n setInputElRef\n )\n\n const handleClear = () => {\n const inputEl = inputElRef.current\n if (!inputEl) return\n\n // https://stackoverflow.com/a/46012210\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n 'value'\n )?.set\n nativeInputValueSetter?.call?.(inputEl, '')\n const ev2 = new Event('input', {\n bubbles: true\n })\n inputEl.dispatchEvent(ev2)\n inputEl.focus()\n onValueChange?.('')\n }\n\n const handleOnChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(event)\n\n const newValue = event.target.value\n setInnerValue(newValue)\n onValueChange?.(newValue)\n }\n\n const getIcon = () => {\n if (activeIcon === INPUT_ICON.SEARCH)\n return (\n <StyledIcon\n is={Search}\n size={size}\n className={cn(\n size == 'sm' ? 'size-4' : 'size-5',\n 'top-1/2',\n '-translate-y-1/2'\n )}\n />\n )\n\n return (\n <ActionIcon\n label={clearText}\n theme=\"neutral\"\n size={iconSize}\n onClick={handleClear}\n className=\"absolute top-1/2 right-1 -translate-y-1/2\"\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n }\n\n return (\n <InputBackground\n size={size}\n appearance={appearance}\n theme={theme}\n className={cn('relative', 'w-auto', className)}\n >\n <InputText\n ref={composedInputRef}\n size={size}\n type=\"search\"\n {...rest}\n value={currentValue}\n onChange={handleOnChange}\n className={cn(\n size === 'sm' ? 'pr-8' : 'pr-10',\n '[&::-webkit-search-decoration]:appearance-none',\n '[&::-webkit-search-cancel-button]:appearance-none',\n '[&::-webkit-search-results-button]:appearance-none'\n )}\n />\n {getIcon()}\n </InputBackground>\n )\n}\n","import * as React from 'react'\nimport { debounce } from 'throttle-debounce'\n\nimport { cn } from '../../styled'\nimport { Label } from '../label/Label'\nimport { SearchInput } from '../search-input/SearchInput'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\n\ntype DataTableSearchProps = React.ComponentProps<typeof SearchInput> & {\n label: string\n hideLabel?: boolean\n}\nexport const DataTableGlobalFilter = ({\n onChange,\n label,\n hideLabel = false,\n ...rest\n}: DataTableSearchProps) => {\n const {\n setGlobalFilter,\n getState,\n resetPagination,\n getTotalRows,\n asyncDataState\n } = useDataTable()\n const { globalFilter } = getState()\n const inputId = React.useId()\n\n // Memoized so re-renders don't recreate the debouncer and reset its timer\n // mid-typing. Filtering happens in a transition: re-filtering large row sets\n // must not block keystroke rendering.\n const handleChange = React.useMemo(\n () =>\n debounce(250, (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(event)\n React.startTransition(() => {\n resetPagination()\n setGlobalFilter(event.target.value)\n })\n }),\n [onChange, resetPagination, setGlobalFilter]\n )\n\n React.useEffect(() => () => handleChange.cancel(), [handleChange])\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n if (isEmpty) return null\n\n return (\n <>\n <Label htmlFor={inputId} className={cn('mb-3', hideLabel && 'sr-only')}>\n {label}\n </Label>\n <SearchInput\n {...rest}\n id={inputId}\n defaultValue={globalFilter}\n onChange={handleChange}\n name={label}\n />\n </>\n )\n}\n","import { ArrowDown, ArrowUp } from '@atom-learning/icons'\nimport type { Header } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\nimport { useHover } from 'react-aria'\n\nimport { styled, cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Table } from '../table/Table'\nimport { Text } from '../text/Text'\nimport { useDataTable } from './DataTable.context'\n\ntype DataTableHeaderProps = React.ComponentProps<typeof Table.HeaderCell> & {\n header: Header<Record<string, unknown>, unknown>\n includeTotal?: boolean\n totalSuffix?: string\n}\n\nconst StyledCount = styled(Text, {\n base: ['text-grey-600', 'whitespace-nowrap', 'hidden', 'min-[800px]:block']\n})\n\nconst StyledTableHeaderCell = styled(Table.HeaderCell, {\n base: [],\n variants: {\n isSortable: {\n true: [\n '*:relative',\n 'before:absolute',\n 'before:bg-primary-100',\n 'before:duration-200',\n 'before:ease-in',\n 'before:inset-0',\n 'before:opacity-0',\n 'before:transition-opacity',\n 'cursor-pointer',\n 'hover:before:opacity-50',\n 'relative'\n ]\n }\n }\n})\n\nconst sortIcons = {\n asc: ArrowUp,\n desc: ArrowDown\n}\n\nconst SortIcon = ({ direction }: { direction: 'asc' | 'desc' }) => (\n <Icon\n is={sortIcons[direction]}\n size=\"sm\"\n className=\"stroke-primary-900 absolute left-1\"\n />\n)\n\nconst handleKeyDown = (\n event: React.KeyboardEvent<HTMLTableCellElement>,\n callback: (event: unknown) => void | undefined\n) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n callback(event as unknown)\n }\n}\n\nexport const DataTableHeaderCell = ({\n header,\n includeTotal = false,\n totalSuffix = 'items',\n children,\n className,\n ...rest\n}: DataTableHeaderProps) => {\n const sortDirection = header.column.getIsSorted()\n const { isSortable: isSortableTable, getRowModel } = useDataTable()\n // false for display columns, e.g. \"Actions\"\n const isDataColumn = header.column.getCanSort()\n\n const totalRows = getRowModel()?.rows?.length\n\n const { hoverProps, isHovered } = useHover({})\n\n const headerSortingHandler = header.column.getToggleSortingHandler()\n\n return (\n <StyledTableHeaderCell\n isSortable={isSortableTable && isDataColumn}\n colSpan={header.colSpan}\n onClick={\n isSortableTable && isDataColumn && headerSortingHandler\n ? headerSortingHandler\n : undefined\n }\n onKeyDown={(event) =>\n isSortableTable &&\n isDataColumn &&\n headerSortingHandler &&\n handleKeyDown(event, headerSortingHandler)\n }\n tabIndex={isSortableTable && isDataColumn ? 0 : -1}\n {...hoverProps}\n className={className}\n {...rest}\n >\n <div\n className={cn(\n 'flex',\n 'gap-1',\n 'items-center',\n header.colSpan > 1 ? 'justify-center' : 'justify-start'\n )}\n >\n {flexRender(header.column.columnDef.header, header.getContext())}\n {sortDirection && isSortableTable && (\n <div\n className={cn(\n 'flex',\n 'items-center',\n 'relative',\n 'size-6',\n 'ml-2',\n isHovered ? 'bg-primary-200' : 'bg-primary-100',\n 'rounded-sm'\n )}\n >\n <SortIcon direction={sortDirection} />\n </div>\n )}\n {includeTotal ? (\n <StyledCount size=\"sm\" weight=\"normal\">\n ({totalRows} {totalSuffix})\n </StyledCount>\n ) : null}\n </div>\n </StyledTableHeaderCell>\n )\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { useDataTable } from './DataTable.context'\n\nexport const DataTableSelectAllRowsCheckbox = ({\n label = 'All rows selection'\n}: {\n label?: string\n}) => {\n const {\n getIsAllPageRowsSelected,\n getIsSomePageRowsSelected,\n toggleAllPageRowsSelected,\n tableId\n } = useDataTable()\n\n const getCheckedState = () => {\n if (getIsSomePageRowsSelected()) return 'indeterminate'\n if (getIsAllPageRowsSelected()) return true\n return false\n }\n\n const updateCheckedState = () => {\n if (getIsSomePageRowsSelected()) {\n return toggleAllPageRowsSelected(false)\n }\n return toggleAllPageRowsSelected(!getIsAllPageRowsSelected())\n }\n\n return (\n <>\n <label htmlFor={`${tableId}_all_rows_selection`} className=\"sr-only\">\n {label}\n </label>\n <Checkbox\n size=\"lg\"\n checked={getCheckedState()}\n onCheckedChange={updateCheckedState}\n id={`${tableId}_all_rows_selection`}\n name={`${tableId}_all_rows_selection`}\n />\n </>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableHeaderCell } from './DataTableHeaderCell'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\n\ntype DataTableHeadProps = Omit<\n React.ComponentProps<typeof Table.Header>,\n 'children'\n> & {\n sortable?: boolean\n isSticky?: boolean\n stickyOffset?: number\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n}\n\nexport const DataTableHead = ({\n sortable = true,\n theme = 'light',\n isSticky = false,\n stickyOffset = 0,\n showTotalInFirstColumn,\n totalSuffix,\n style,\n className,\n ...rest\n}: DataTableHeadProps): React.ReactElement<unknown> => {\n const {\n getHeaderGroups,\n setIsSortable,\n enableRowSelection,\n getCanSomeRowsExpand,\n tablePosition\n } = useDataTable()\n\n React.useEffect(() => {\n setIsSortable(sortable)\n }, [sortable, setIsSortable])\n\n const tableHeaderRowRef = React.useRef<HTMLTableRowElement>(null)\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n\n const [headerOffset, setHeaderOffset] = React.useState<number>(0)\n const [headerHide, setHeaderHide] = React.useState<boolean>(false)\n\n React.useEffect(() => {\n if (!isSticky) return\n\n if (!tableRef.current && tableHeaderRowRef.current) {\n tableRef.current = tableHeaderRowRef.current.closest(\n 'table'\n ) as HTMLTableElement | null\n }\n\n if (tableRef.current) {\n if (tablePosition?.top !== null && tablePosition?.bottom !== null) {\n const newOffset =\n tablePosition?.top != null &&\n tablePosition?.bottom != null &&\n tablePosition.top < stickyOffset &&\n tablePosition.bottom > 100\n ? -tablePosition.top + stickyOffset\n : 0\n\n if (newOffset !== 0) setHeaderHide(true)\n\n setHeaderOffset(newOffset)\n\n const rafId = requestAnimationFrame(() => {\n setHeaderHide(false)\n })\n\n return () => cancelAnimationFrame(rafId)\n }\n }\n }, [isSticky, stickyOffset, tablePosition])\n\n return (\n <Table.Header\n theme={theme}\n style={{\n ...style,\n '--header-offset': `${headerOffset}px`\n }}\n {...rest}\n className={cn(\n 'relative',\n 'z-3',\n '[&_tr:not(:last-child)>th]:border-b-none',\n '[&_tr:not(:first-child)>th]:rounded-none!',\n className\n )}\n >\n {getHeaderGroups().map((headerGroup, headerGroupIndex) => {\n return (\n <Table.Row\n key={headerGroup.id}\n // Single ref slot: only the first header row may carry it, or\n // each successive header group would silently clobber it.\n ref={headerGroupIndex === 0 ? tableHeaderRowRef : undefined}\n className={\n isSticky && headerOffset !== 0\n ? cn(\n 'translate-y-(--header-offset)',\n headerHide\n ? 'delay-0ms opacity-0 transition-none'\n : 'delay-150ms opacity-100 transition-opacity duration-100',\n '[&_th]:last:before:absolute',\n '[&_th]:last:before:bottom-0',\n '[&_th]:last:before:pointer-events-none',\n '[&_th]:last:before:right-0',\n '[&_th]:last:before:shadow-sm',\n '[&_th]:last:before:top-0',\n '[&_th]:last:before:w-full'\n )\n : undefined\n }\n >\n {getCanSomeRowsExpand() && <Table.HeaderCell className=\"w-10\" />}\n {enableRowSelection && (\n <Table.HeaderCell className=\"w-10\">\n <DataTableSelectAllRowsCheckbox />\n </Table.HeaderCell>\n )}\n {headerGroup.headers.map((header, index) => (\n <DataTableHeaderCell\n header={header}\n key={header.id}\n includeTotal={index === 0 && showTotalInFirstColumn}\n totalSuffix={totalSuffix}\n />\n ))}\n </Table.Row>\n )\n })}\n </Table.Header>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Loader } from '../loader/Loader'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\n\nconst PendingState = styled(Loader, {\n base: [\n 'absolute',\n 'left-1/2',\n 'top-1/2',\n '-translate-x-1/2',\n '-translate-y-1/2',\n 'z-1'\n ]\n})\n\nexport const DataTableLoading = (\n props: React.ComponentProps<typeof PendingState>\n) => {\n const { asyncDataState } = useDataTable()\n\n if (asyncDataState !== AsyncDataState.PENDING) return null\n\n return <PendingState {...props} />\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { Table } from '../table/Table'\nimport { TableBody } from '../table/TableBody'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\nimport { DataTableBody } from './DataTableBody'\nimport { DataTableHead } from './DataTableHead'\nimport { DataTableLoading } from './DataTableLoading'\n\nconst TableContainer = styled('div', {\n base: ['p-2', 'bg-white', 'rounded-lg']\n})\n\nexport type DataTableTableProps = Omit<\n React.ComponentProps<typeof Table>,\n 'children' | 'numberOfStickyColumns'\n> &\n Partial<\n Pick<React.ComponentProps<typeof DataTableHead>, 'theme' | 'sortable'>\n > &\n Partial<Pick<React.ComponentProps<typeof TableBody>, 'striped'>> & {\n scrollOptions?: {\n hasStickyHeader?: boolean\n stickyHeaderOffset?: number\n headerCss?: string\n numberOfStickyColumns?: number\n scrollContainerCls?: string | string[]\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n }\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n withContainer?: boolean\n }\n\nexport const DataTableTable = ({\n sortable,\n striped,\n theme = 'white',\n className,\n scrollOptions = {\n numberOfStickyColumns: 0,\n stickyHeaderOffset: 0,\n hasStickyHeader: false,\n showTotalInFirstColumn: true,\n totalSuffix: 'items'\n },\n rowAction,\n withContainer = false,\n ...rest\n}: DataTableTableProps): React.JSX.Element | null => {\n const {\n asyncDataState,\n getTotalRows,\n getCanSomeRowsExpand,\n rowSelection,\n enableRowSelection,\n tableId,\n setTablePosition\n } = useDataTable()\n\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n const isTableVisible = React.useRef(false)\n const isScrolling = React.useRef<boolean>(false)\n const scrollRafIdRef = React.useRef<number | null>(null)\n\n const scrollTarget = typeof window === 'undefined' ? null : window\n\n React.useEffect(() => {\n if (!scrollTarget || typeof IntersectionObserver === 'undefined') {\n return\n }\n\n const updatePosition = () => {\n if (tableRef.current) {\n const tableTop = tableRef.current.getBoundingClientRect().top\n const tableBottom = tableRef.current.getBoundingClientRect().bottom\n\n setTablePosition((prevPosition) => ({\n ...prevPosition,\n top: tableTop,\n bottom: tableBottom\n }))\n }\n isScrolling.current = false\n }\n\n const handleScroll = () => {\n if (!isScrolling.current) {\n scrollRafIdRef.current = requestAnimationFrame(updatePosition)\n isScrolling.current = true\n }\n }\n\n if (!tableRef.current) return\n\n const observerOffset = scrollOptions?.stickyHeaderOffset || 0\n\n const observerOptions = {\n rootMargin: `-${observerOffset}px 0px -${observerOffset}px 0px`,\n threshold: 0\n }\n\n const handleTableIntersection = (entries: IntersectionObserverEntry[]) => {\n if (!entries || entries.length === 0) return\n const entry = entries[0]\n\n isTableVisible.current = entry.isIntersecting\n\n if (scrollTarget) {\n if (entry.isIntersecting) {\n // add scroll listener\n scrollTarget?.addEventListener('scroll', handleScroll)\n } else {\n // remove scroll listener\n scrollTarget?.removeEventListener('scroll', handleScroll)\n }\n }\n\n setTablePosition((prevPosition) => ({\n ...prevPosition,\n isVisible: entry.isIntersecting\n }))\n }\n\n const tableObserver = new IntersectionObserver(\n handleTableIntersection,\n observerOptions\n )\n\n //only track table position if we have a sticky header or bulk actions active\n if (\n tableRef.current &&\n (scrollOptions.hasStickyHeader ||\n Object.keys(rowSelection || {}).length > 0)\n ) {\n tableObserver.observe(tableRef.current)\n }\n\n return () => {\n tableObserver.disconnect()\n if (scrollRafIdRef.current !== null) {\n cancelAnimationFrame(scrollRafIdRef.current)\n scrollRafIdRef.current = null\n }\n isScrolling.current = false\n if (scrollTarget) {\n scrollTarget?.removeEventListener('scroll', handleScroll)\n }\n }\n }, [\n rowSelection,\n scrollOptions.hasStickyHeader,\n scrollOptions?.stickyHeaderOffset,\n setTablePosition\n ])\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n const buildScrollContainerKey = (): string => {\n let controlColumnCount = 0\n\n if (getCanSomeRowsExpand() && !!enableRowSelection) {\n controlColumnCount = 2\n } else if (getCanSomeRowsExpand() || !!enableRowSelection) {\n controlColumnCount = 1\n }\n\n return `${tableId}_${controlColumnCount}_control_columns`\n }\n\n if (isEmpty) return null\n\n const tableComponent = (\n <Table\n corners=\"round\"\n size=\"lg\"\n {...rest}\n ref={tableRef}\n numberOfStickyColumns={scrollOptions.numberOfStickyColumns}\n scrollContainerCls={scrollOptions.scrollContainerCls}\n scrollContainerkey={buildScrollContainerKey()}\n className={cn(\n isPending && [\n 'opacity-50',\n 'pointer-events-none',\n 'transition-opacity',\n 'duration-250',\n 'linear',\n 'delay-150'\n ],\n className\n )}\n >\n <DataTableHead\n theme={theme}\n sortable={sortable}\n isSticky={scrollOptions.hasStickyHeader}\n stickyOffset={scrollOptions.stickyHeaderOffset}\n className={scrollOptions.headerCss}\n showTotalInFirstColumn={scrollOptions.showTotalInFirstColumn}\n totalSuffix={scrollOptions.totalSuffix}\n />\n <DataTableBody striped={striped} rowAction={rowAction} />\n </Table>\n )\n\n return (\n <>\n <DataTableLoading />\n {withContainer ? (\n <TableContainer\n className={cn(\n scrollOptions.numberOfStickyColumns === 0 && 'overflow-x-auto'\n )}\n >\n {tableComponent}\n </TableContainer>\n ) : (\n tableComponent\n )}\n </>\n )\n}\n","import { DragHandle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nexport const StyledHandle = styled(ActionIcon, {\n base: [\n 'text-inherit!',\n 'fill-current',\n 'disabled:**:pointer-events-none',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n isDragging: {\n true: ['cursor-grabbing'],\n false: ['cursor-grab']\n }\n }\n})\n\nexport type HandleProps = Omit<\n React.ComponentProps<typeof StyledHandle>,\n 'children' | 'size'\n> & {\n size?: React.ComponentProps<typeof Icon>['size']\n}\n\nexport const Handle = ({ ref, isDragging, size, ...rest }: HandleProps) => (\n <StyledHandle\n ref={ref}\n isDragging={isDragging}\n appearance=\"simple\"\n hasTooltip={false}\n size={size}\n {...rest}\n >\n <Icon is={DragHandle} />\n </StyledHandle>\n)\n","import { useSortable } from '@dnd-kit/sortable'\nimport * as React from 'react'\n\nimport { Handle as DragHandle, type HandleProps } from './Handle'\n\nexport type SortableHandleProps = {\n targetId: string | number\n disabled?: boolean\n label?: string\n} & Omit<HandleProps, 'label'>\n\nexport const SortableHandle = ({\n targetId,\n disabled = false,\n label = 'drag handle',\n ...rest\n}: SortableHandleProps) => {\n const { attributes, listeners, isDragging, setActivatorNodeRef } =\n useSortable({ id: targetId })\n\n return (\n <DragHandle\n ref={setActivatorNodeRef}\n isDragging={isDragging}\n label={label}\n disabled={disabled}\n {...(!disabled ? listeners : {})}\n {...(!disabled ? attributes : {})}\n {...rest}\n />\n )\n}\n\nSortableHandle.displayName = 'SortableHandle'\n","import type { UniqueIdentifier } from '@dnd-kit/core'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\n\nexport type SortableItemProps = {\n id: UniqueIdentifier\n asChild?: boolean\n isDragHandle?: boolean\n disabled?: boolean\n className?: string\n style?: Pick<React.HTMLAttributes<HTMLDivElement>, 'style'>\n}\n\nexport const SortableItem = ({\n id,\n asChild = false,\n className,\n style,\n isDragHandle = false,\n disabled,\n ...rest\n}: React.PropsWithChildren<SortableItemProps>) => {\n const { transform, setNodeRef, isDragging, listeners, attributes } =\n useSortable({ id })\n\n const Component = asChild ? Slot : 'div'\n return (\n <Component\n ref={setNodeRef}\n style={{\n ...style,\n '--scale': 1,\n '--translate-x': transform?.x || 0,\n '--translate-y': transform?.y || 0\n }}\n data-dragging={isDragging}\n data-disabled={disabled}\n {...(isDragHandle && !disabled ? listeners : {})}\n {...(isDragHandle && !disabled ? attributes : {})}\n {...rest}\n className={cn(\n 'translate-x-[calc(var(--translate-x)*1px)]',\n 'translate-y-[calc(var(--translate-y)*1px)]',\n 'scale-(--scale)',\n isDragging && 'z-5',\n 'disabled:**:pointer-events-none',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n isDragHandle && (isDragging ? 'cursor-grabbing' : 'cursor-grab'),\n className\n )}\n />\n )\n}\n\nSortableItem.displayName = 'SortableItem'\n","import type { DragEndEvent, UniqueIdentifier } from '@dnd-kit/core'\nimport {\n closestCenter,\n DndContext,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors\n} from '@dnd-kit/core'\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates\n} from '@dnd-kit/sortable'\nimport * as React from 'react'\n\ntype SortableRootProps = {\n sortableIds: (string | number)[]\n onSortChange: (onSortChangeData: {\n order: UniqueIdentifier[]\n oldIndex: number\n newIndex: number\n }) => void\n}\n\nexport const SortableRoot = ({\n sortableIds,\n onSortChange,\n children\n}: React.PropsWithChildren<SortableRootProps>) => {\n const [order, setOrder] = React.useState<(string | number)[]>(sortableIds)\n // Reconcile the external ids during render (React's \"adjusting state when\n // props change\" pattern — no stale frame), comparing by content rather than\n // identity so a parent passing an inline array doesn't reset the order and\n // discard in-flight drag state on every render.\n const [prevIds, setPrevIds] = React.useState(sortableIds)\n if (prevIds !== sortableIds) {\n setPrevIds(sortableIds)\n const contentChanged =\n prevIds.length !== sortableIds.length ||\n sortableIds.some((id, index) => id !== prevIds[index])\n if (contentChanged) setOrder(sortableIds)\n }\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates\n })\n )\n\n const handleDragEnd = (event: DragEndEvent) => {\n const { active, over } = event\n if (active.id && over?.id && active.id !== over?.id) {\n setOrder((order) => {\n const oldIndex = order.indexOf(active.id)\n const newIndex = order.indexOf(over.id)\n const newOrder = arrayMove(order, oldIndex, newIndex)\n onSortChange({ order: newOrder, oldIndex, newIndex })\n return newOrder\n })\n }\n }\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext items={order}>{children}</SortableContext>\n </DndContext>\n )\n}\n\nSortableRoot.displayName = 'SortableRoot'\n","export { SortableHandle as Handle } from './SortableHandle'\nexport { SortableItem as Item } from './SortableItem'\nexport { SortableRoot as Root } from './SortableRoot'\n","import type { Row } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport * as Sortable from '../../sortable'\nimport { Table } from '../../table/Table'\nimport { DataTableDataCell } from '../DataTableDataCell'\n\nexport type DataTableDraggableRowProps = React.ComponentProps<\n typeof Table.Row\n> & {\n row: Row<Record<string, unknown>>\n idColumn?: string\n}\n\nexport const DragAndDropTableRow = ({\n row,\n idColumn = 'id'\n}: DataTableDraggableRowProps) => {\n const rowId = row.original[idColumn] as string | number\n return (\n <Sortable.Item id={rowId} asChild>\n <Table.Row>\n {row.getVisibleCells().map((cell, i) => {\n if (i === 0) {\n return (\n <Table.Cell key={cell.id}>\n <Sortable.Handle targetId={rowId} className=\"inline-block\" />\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </Table.Cell>\n )\n }\n return <DataTableDataCell key={cell.id} cell={cell} />\n })}\n </Table.Row>\n </Sortable.Item>\n )\n}\n","import * as React from 'react'\n\nimport { Table } from '../../table/Table'\nimport { useDataTable } from '../DataTable.context'\nimport { DragAndDropTableRow } from './DragAndDropTableRow'\n\ntype DataTableBodyProps = Omit<\n React.ComponentProps<typeof Table.Body>,\n 'children'\n> & {\n idColumn?: string\n}\n\nexport const DragAndDropTableBody = ({\n striped = false,\n idColumn = 'id',\n ...rest\n}: DataTableBodyProps) => {\n const { getRowModel } = useDataTable()\n return (\n <Table.Body {...rest} striped={striped}>\n {getRowModel().rows.map((row) => {\n return (\n <DragAndDropTableRow row={row} key={row.id} idColumn={idColumn} />\n )\n })}\n </Table.Body>\n )\n}\n","import { arrayMove } from '@dnd-kit/sortable'\nimport * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport * as Sortable from '../../sortable'\nimport { Table } from '../../table/Table'\nimport { useDataTable } from '../DataTable.context'\nimport { AsyncDataState, type AsyncDataResult } from '../DataTable.types'\nimport { DataTableHead } from '../DataTableHead'\nimport { DataTableLoading } from '../DataTableLoading'\nimport type { DataTableTableProps } from '../DataTableTable'\nimport { DragAndDropTableBody } from './DragAndDropTableBody'\n\ntype DragAndDropTableProps = DataTableTableProps & {\n className?: string\n idColumn?: string\n onDragAndDrop?: (onDragAndDropData: {\n oldIndex: number\n newIndex: number\n newData: AsyncDataResult\n }) => void\n}\n\nexport const DragAndDropTable = ({\n idColumn = 'id',\n onDragAndDrop,\n sortable,\n striped,\n theme,\n className,\n ...rest\n}: DragAndDropTableProps) => {\n const { asyncDataState, data, setData } = useDataTable()\n const isPending = asyncDataState === AsyncDataState.PENDING\n\n const rowIds = React.useMemo(\n () =>\n data.results.map((row) => {\n return row[idColumn] as string | number\n }),\n [data, idColumn]\n )\n const handleSortChange = React.useCallback(\n ({ oldIndex, newIndex }) => {\n const sortedResults = arrayMove(data.results, oldIndex, newIndex)\n const newData = { results: sortedResults, total: data.total }\n setData({ results: sortedResults, total: data.total })\n onDragAndDrop?.({ oldIndex, newIndex, newData })\n },\n [data, onDragAndDrop]\n )\n\n return (\n <Sortable.Root onSortChange={handleSortChange} sortableIds={rowIds}>\n <DataTableLoading />\n <Table\n {...rest}\n className={cn(\n isPending && [\n 'opacity-50',\n 'pointer-events-none',\n 'transition-opacity',\n 'duration-250',\n 'linear',\n 'delay-150'\n ],\n className\n )}\n >\n <DataTableHead theme={theme} sortable={sortable} />\n <DragAndDropTableBody striped={striped} idColumn={idColumn} />\n </Table>\n </Sortable.Root>\n )\n}\n","export enum VisibleElementsAmount {\n LESS = 6,\n MORE = 8\n}\n\nexport const VIEW_ALL_POPOVER = 'VIEW_ALL_POPOVER'\nexport const GO_TO_PREVIOUS_PAGE = 'GO_TO_PREVIOUS_PAGE'\nexport const GO_TO_NEXT_PAGE = 'GO_TO_NEXT_PAGE'\n","import {\n GO_TO_NEXT_PAGE,\n GO_TO_PREVIOUS_PAGE,\n VIEW_ALL_POPOVER\n} from './pagination.constants'\nimport type { PaginationItemsToRender } from './types'\n\nexport const getPaginationElementsToRender = (\n currentPage: number,\n pagesCount: number,\n visibleElementsCount: number\n): PaginationItemsToRender => {\n const paginationPages = Array.from(\n { length: pagesCount },\n (_, index) => index + 1\n )\n\n /*\n * As we always show the `<` `>` arrows,\n * subtract 2 from `visibleElementsCount` (one for each of the GO_TO_PREVIOUS/NEXT_PAGE arrows)\n * to get the `visiblePagesCount`\n */\n let visiblePagesCount = visibleElementsCount - 2\n const withPreviousNextPageArrows = (paginationPages) => [\n GO_TO_PREVIOUS_PAGE,\n ...paginationPages,\n GO_TO_NEXT_PAGE\n ]\n\n /**\n * If fewer pages than threshold for truncating render them all.\n *\n * pagesCount: 6\n * visibleElementsCount: >=6\n * returns [GO_TO_PREVIOUS_PAGE, 1, 2, 3, 4, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | 2 | | 3 | | 4 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (pagesCount <= visiblePagesCount) {\n return withPreviousNextPageArrows(paginationPages)\n }\n\n /**\n * If current page is either at the very start or at the very end of the pages\n */\n const canFitEdgePage = visibleElementsCount >= 5\n const canFitViewAllPopover = visibleElementsCount >= 4\n const canFitPages = visibleElementsCount >= 3\n\n if (canFitViewAllPopover) {\n // Subtract one from visiblePagesCount to accomodate for us adding the `[…]` VIEW_ALL_POPOVER\n visiblePagesCount -= 1\n }\n\n if (canFitEdgePage) {\n // Subtract one more from visiblePagesCount to accomodate for us adding the GO_TO_PREVIOUS/NEXT_PAGE arrows\n visiblePagesCount -= 1\n }\n\n const firstPage = paginationPages[0]\n // Non-null: this line is only reached when pagesCount exceeds the visible\n // threshold, so paginationPages always has a last element. `.at()` widens to\n // `T | undefined`, which the index access it replaced did not.\n const lastPage = paginationPages.at(-1)!\n\n /**\n * If we're truncating and current page is at the start of the page list,\n * render the initial truncated page list, e.g.\n *\n * pagesCount: 8\n * currentPage: 1/2\n * visibleElementsCount: 6\n * returns [GO_TO_PREVIOUS_PAGE, 1, 2, VIEW_ALL_POPOVER, 6, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | 2 | | … | | 8 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (currentPage < visiblePagesCount) {\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitPages) {\n newPaginationItems.push(...paginationPages.slice(0, visiblePagesCount))\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitEdgePage) {\n newPaginationItems.push(lastPage)\n }\n return withPreviousNextPageArrows(newPaginationItems)\n }\n\n /**\n * If we're truncating and the current page is towards the end of the\n * page list (depending on visibleElementsCount),\n * render a truncated page list from the end, e.g.\n *\n * pagesCount: 8\n * currentPage: 7/8\n * visibleElementsCount: 6\n * returns [GO_TO_PREVIOUS_PAGE, 1, VIEW_ALL_POPOVER, 7, 8, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | … | | 7 | | 8 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (currentPage > pagesCount - visiblePagesCount) {\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitEdgePage) {\n newPaginationItems.push(firstPage)\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitPages) {\n newPaginationItems.push(\n ...paginationPages.slice(pagesCount - visiblePagesCount, pagesCount)\n )\n }\n return withPreviousNextPageArrows(newPaginationItems)\n }\n\n /**\n * If we're truncating and the current page doesn't meet any of the previous conditions\n * (we're in the middle)\n * render a truncated page list from a specific index relative to `currentPage`, e.g.\n *\n * currentPage: 4\n * visibleElementsCount: 6 // VisibleElementsAmount.LESS\n * returns [GO_TO_PREVIOUS_PAGE, 3, 4, VIEW_ALL_POPOVER, 6, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 3 | | 4 | | … | | 6 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n * currentPage: 6\n * visibleElementsCount: 8 // VisibleElementsAmount.MORE\n * returns [GO_TO_PREVIOUS_PAGE, 4, 5, 6, 7, VIEW_ALL_POPOVER, 10, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 4 | | 5 | | 6 | | 7 | | … | | 10 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+\n */\n const canFitCurrentPage = canFitPages\n const canFitCurrentPageAndPreviousPage = visibleElementsCount >= 6\n const canFitCurrentPageAndPreviousPageAndNextPage = visibleElementsCount >= 7\n const canFitLastPage = canFitEdgePage\n\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitCurrentPageAndPreviousPageAndNextPage) {\n newPaginationItems.push(\n ...paginationPages.slice(\n currentPage + 1 - visiblePagesCount,\n currentPage + 1\n )\n )\n } else if (canFitCurrentPageAndPreviousPage) {\n newPaginationItems.push(\n ...paginationPages.slice(currentPage - visiblePagesCount, currentPage)\n )\n } else if (canFitCurrentPage) {\n newPaginationItems.push(\n ...paginationPages.slice(currentPage - 1, currentPage - 1 + 1)\n )\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitLastPage) {\n newPaginationItems.push(lastPage)\n }\n return withPreviousNextPageArrows(newPaginationItems)\n}\n\nexport const findNextAvailablePage = (\n startPage: number,\n disabledPages: number[],\n pagesCount: number\n): number | undefined => {\n if (startPage > pagesCount) return\n const disabledSet = new Set(disabledPages)\n let nextPage = startPage\n while (disabledSet.has(nextPage)) {\n nextPage++\n }\n return nextPage\n}\n\nexport const findPreviousAvailablePage = (\n startPage: number,\n disabledPages: number[]\n): number | undefined => {\n if (startPage < 1) return\n const disabledSet = new Set(disabledPages)\n let previousPage = startPage\n while (disabledSet.has(previousPage)) {\n previousPage--\n }\n return previousPage\n}\n","import * as React from 'react'\n\nimport { VisibleElementsAmount } from './pagination.constants'\nimport {\n findNextAvailablePage,\n findPreviousAvailablePage,\n getPaginationElementsToRender\n} from './pagination.helper'\nimport type { PaginationContextValue, PaginationProviderProps } from './types'\n\nexport const PaginationContext = React.createContext<PaginationContextValue>({\n goToPage: () => null,\n goToPreviousPage: () => null,\n goToNextPage: () => null,\n currentPage: 1,\n pagesCount: 0,\n onItemHover: () => null,\n paginationItems: [],\n labels: {},\n indicatedPages: [],\n disabledPages: []\n})\n\n// Module-level defaults: inline `= {}` / `= () => null` defaults would mint\n// a new identity every render and the value useMemo below could never hit.\nconst DEFAULT_LABELS = {}\nconst DEFAULT_ON_ITEM_HOVER = () => null\nconst DEFAULT_INDICATED_PAGES: number[] = []\nconst DEFAULT_DISABLED_PAGES: number[] = []\n\nexport const PaginationProvider = ({\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = DEFAULT_INDICATED_PAGES,\n disabledPages = DEFAULT_DISABLED_PAGES,\n onItemHover = DEFAULT_ON_ITEM_HOVER,\n labels = DEFAULT_LABELS,\n children\n}: React.PropsWithChildren<PaginationProviderProps>) => {\n const [internalCurrentPage, setInternalCurrentPage] = React.useState(1)\n\n const currentPage = selectedPage || internalCurrentPage\n\n const goToPage = React.useCallback(\n (pageNumber: number) => {\n setInternalCurrentPage(pageNumber)\n onSelectedPageChange?.(pageNumber)\n },\n [onSelectedPageChange]\n )\n\n const previousPage = currentPage - 1\n const previousAvailablePage = findPreviousAvailablePage(\n previousPage,\n disabledPages\n )\n\n const goToPreviousPage = React.useCallback(() => {\n if (previousAvailablePage) goToPage(previousAvailablePage)\n }, [goToPage, previousAvailablePage])\n\n const nextPage = currentPage + 1\n const nextAvailablePage = findNextAvailablePage(\n nextPage,\n disabledPages,\n pagesCount\n )\n const goToNextPage = React.useCallback(() => {\n if (nextAvailablePage) goToPage(nextAvailablePage)\n }, [goToPage, nextAvailablePage])\n\n const paginationItems = React.useMemo(\n () =>\n getPaginationElementsToRender(\n currentPage,\n pagesCount,\n visibleElementsCount\n ),\n [currentPage, pagesCount, visibleElementsCount]\n )\n\n const value = React.useMemo(() => {\n return {\n goToNextPage,\n goToPreviousPage,\n goToPage,\n currentPage,\n paginationItems,\n indicatedPages,\n disabledPages,\n pagesCount,\n onItemHover,\n previousAvailablePage,\n nextAvailablePage,\n labels\n }\n }, [\n goToNextPage,\n goToPreviousPage,\n goToPage,\n currentPage,\n indicatedPages,\n paginationItems,\n disabledPages,\n pagesCount,\n onItemHover,\n previousAvailablePage,\n nextAvailablePage,\n labels\n ])\n\n return <PaginationContext value={value}>{children}</PaginationContext>\n}\n","import * as React from 'react'\n\nimport { PaginationContext } from './Pagination.context'\nimport type { PaginationContextValue } from './types'\n\nexport const usePagination = (): PaginationContextValue => {\n const context = React.use(PaginationContext)\n\n if (!context) {\n throw new Error(\n 'Ensure that you wrap any components with the PaginationProvider component'\n )\n }\n\n return context\n}\n","import { ChevronRight } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { usePagination } from './usePagination'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: ['ml-1', 'disabled:opacity-30']\n})\n\nexport const PaginationNextButton = (\n props: Partial<React.ComponentProps<typeof StyledActionIcon>>\n) => {\n const { goToNextPage, labels, nextAvailablePage } = usePagination()\n\n const isDisabled = !nextAvailablePage\n\n return (\n <StyledActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n onClick={goToNextPage}\n disabled={isDisabled}\n {...props}\n label={labels?.nextPageButtonLabel || 'Next page'}\n >\n <Icon is={ChevronRight} />\n </StyledActionIcon>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { PaginationPageProps } from './types'\nimport { usePagination } from './usePagination'\n\nconst StyledButton = styled('button', {\n base: [\n 'items-center',\n 'border',\n 'border-transparent',\n 'rounded-sm',\n 'cursor-pointer',\n 'font-body',\n 'justify-center',\n 'whitespace-nowrap',\n 'w-max',\n 'flex',\n 'flex-col',\n 'p-0',\n 'font-normal',\n 'text-text-subtle',\n 'bg-(--base-1)',\n 'relative',\n 'not-disabled:active:bg-(--base-3)',\n 'not-disabled:active:text-(--text-bold)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--base-2)',\n 'not-disabled:hover:text-text-regular',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n size: {\n md: ['size-10']\n },\n selected: {\n true: [\n 'border',\n 'border-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:border-(--accent-11)',\n 'not-disabled:active:text-(--accent-11)',\n 'not-disabled:hover:border-(--accent-10)',\n 'not-disabled:hover:text-(--accent-10)',\n 'text-(--accent-9)'\n ]\n },\n indicated: {\n true: [\n 'bg-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:bg-(--accent-11)',\n 'not-disabled:active:text-white',\n 'not-disabled:hover:bg-(--accent-10)',\n 'not-disabled:hover:text-white',\n 'text-white'\n ]\n }\n },\n compoundVariants: [\n {\n selected: true,\n indicated: true,\n class: [\n 'bg-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:bg-(--accent-11)',\n 'not-disabled:active:text-white',\n 'not-disabled:hover:bg-(--accent-10)',\n 'not-disabled:hover:text-white',\n 'not-focus-visible:border-white!',\n 'shadow-[var(--accent-9)_0px_0px_0px_1px]',\n 'text-white'\n ]\n }\n ]\n})\n\nexport const PaginationPage = ({\n pageNumber,\n className,\n onClick\n}: PaginationPageProps) => {\n const { currentPage, goToPage, indicatedPages, disabledPages, onItemHover } =\n usePagination()\n\n const isIndicated = indicatedPages.includes(pageNumber)\n const isDisabled = disabledPages.includes(pageNumber)\n\n const isSelected = currentPage === pageNumber\n\n const handleOnHover = () => {\n if (isSelected || isDisabled) return\n onItemHover?.(pageNumber)\n }\n\n const handleOnClick = (pageNumber) => {\n onClick?.()\n goToPage(pageNumber)\n }\n\n return (\n <StyledButton\n selected={isSelected}\n size=\"md\"\n onClick={() => handleOnClick(pageNumber)}\n className={className}\n indicated={isIndicated}\n disabled={isDisabled}\n aria-current={isSelected && 'page'}\n aria-disabled={isDisabled}\n onMouseOver={handleOnHover}\n >\n {pageNumber}\n </StyledButton>\n )\n}\n","import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Arrow, Close, Content } from '@radix-ui/react-popover'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContent = styled(Content, {\n base: [\n 'bg-white',\n 'rounded-md',\n 'shadow-lg',\n 'max-w-[90vw]',\n 'p-6',\n 'pr-10',\n 'relative',\n 'z-10',\n 'will-change-transform',\n 'will-change-opacity',\n 'animation-duration-75',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n size: {\n sm: ['max-w-50'],\n md: ['max-w-100'],\n lg: ['max-w-150']\n }\n }\n})\n\nconst StyledArrow = styled(Arrow, {\n base: ['fill-white', 'z-1', 'in-data-[align=end]:mx-6']\n})\n\ntype PopoverContentProps = React.ComponentProps<typeof StyledContent> &\n React.ComponentProps<typeof Content> & {\n closePopoverText?: string\n showCloseButton?: boolean\n }\n\nexport const PopoverContent = ({\n children,\n side = 'top',\n sideOffset = 8,\n closePopoverText = 'Close popover',\n showCloseButton = true,\n size = 'md',\n ...rest\n}: PopoverContentProps) => (\n <StyledContent size={size} side={side} sideOffset={sideOffset} {...rest}>\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closePopoverText}\n size=\"md\"\n hasTooltip={false}\n theme=\"neutral\"\n className=\"absolute top-0.5 right-0.5\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {children}\n <StyledArrow width={16} height={8} />\n </StyledContent>\n)\n","import { Anchor, Portal, Root, Trigger } from '@radix-ui/react-popover'\n\nimport { PopoverContent } from './PopoverContent'\n\nexport const Popover = /* @__PURE__ */ Object.assign(Root, {\n Content: PopoverContent,\n Portal,\n Anchor,\n Trigger\n})\n\nRoot.displayName = 'Popover'\n","import { Ellypsis } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Popover } from '../popover/Popover'\nimport { PaginationPage } from './PaginationPage'\nimport { usePagination } from './usePagination'\n\nexport const PaginationPopover = ({\n children\n}: React.PropsWithChildren<unknown>) => {\n const { pagesCount, labels } = usePagination()\n const paginationItems = Array.from(\n { length: pagesCount },\n (_, index) => index + 1\n )\n\n const [isOpen, setIsOpen] = React.useState<boolean>(false)\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen} defaultOpen={false}>\n <Popover.Trigger asChild>\n {children || (\n <ActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n label={labels?.popoverTriggerLabel || 'Open pagination popover'}\n data-testid=\"pagination_popover_trigger\"\n >\n <Icon is={Ellypsis} />\n </ActionIcon>\n )}\n </Popover.Trigger>\n <Popover.Content size=\"md\" showCloseButton={false} className=\"p-0\">\n <div className=\"flex flex-wrap justify-center gap-1 p-4\">\n {paginationItems?.map((pageNumber) => {\n return (\n <PaginationPage\n key={pageNumber}\n pageNumber={pageNumber}\n onClick={() => setIsOpen(false)}\n />\n )\n })}\n </div>\n </Popover.Content>\n </Popover>\n )\n}\n","import { ChevronLeft } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { usePagination } from './usePagination'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: ['mr-1', 'disabled:opacity-30']\n})\n\nexport const PaginationPreviousButton = (\n props: Partial<React.ComponentProps<typeof StyledActionIcon>>\n) => {\n const { goToPreviousPage, labels, previousAvailablePage } = usePagination()\n\n const isDisabled = !previousAvailablePage\n\n return (\n <StyledActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n onClick={goToPreviousPage}\n disabled={isDisabled}\n {...props}\n label={labels?.previousPageButtonLabel || 'Previous page'}\n >\n <Icon is={ChevronLeft} />\n </StyledActionIcon>\n )\n}\n","import * as React from 'react'\n\nimport {\n GO_TO_NEXT_PAGE,\n GO_TO_PREVIOUS_PAGE,\n VIEW_ALL_POPOVER\n} from './pagination.constants'\nimport { PaginationNextButton } from './PaginationNextButton'\nimport { PaginationPage } from './PaginationPage'\nimport { PaginationPopover } from './PaginationPopover'\nimport { PaginationPreviousButton } from './PaginationPreviousButton'\nimport { usePagination } from './usePagination'\n\nexport const PaginationItems = () => {\n const { paginationItems } = usePagination()\n\n return (\n <>\n {paginationItems.map((paginationItem) => {\n switch (paginationItem) {\n case VIEW_ALL_POPOVER:\n return <PaginationPopover key={paginationItem} />\n case GO_TO_PREVIOUS_PAGE:\n return <PaginationPreviousButton key={paginationItem} />\n case GO_TO_NEXT_PAGE:\n return <PaginationNextButton key={paginationItem} />\n default:\n return (\n <PaginationPage\n key={paginationItem}\n pageNumber={paginationItem}\n />\n )\n }\n })}\n </>\n )\n}\n","import * as React from 'react'\n\nimport { ColorScheme } from '../../experiments/color-scheme/ColorScheme'\nimport { cn } from '../../styled'\nimport { VisibleElementsAmount } from './pagination.constants'\nimport { PaginationProvider } from './Pagination.context'\nimport { PaginationItems } from './PaginationItems'\nimport { PaginationPopover } from './PaginationPopover'\nimport type { PaginationProps, PaginationProviderProps } from './types'\n\nconst PaginationComponent = ({\n colorScheme,\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = [],\n disabledPages = [],\n onItemHover = () => null,\n labels = {},\n children,\n className,\n ...rest\n}: PaginationProps) => {\n if (!pagesCount) return null\n\n const paginationProviderProps: PaginationProviderProps = {\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount,\n pagesCount,\n indicatedPages,\n disabledPages,\n onItemHover,\n labels\n }\n\n return (\n <PaginationProvider {...paginationProviderProps}>\n <ColorScheme base=\"grey1\" accent=\"primary1\" {...colorScheme} asChild>\n <div {...rest} className={cn('flex', 'gap-1', className)}>\n {children || <PaginationItems />}\n </div>\n </ColorScheme>\n </PaginationProvider>\n )\n}\n\nexport const Pagination = /* @__PURE__ */ Object.assign(PaginationComponent, {\n Popover: PaginationPopover\n})\n\nPaginationComponent.displayName = 'Pagination'\n","import * as React from 'react'\n\nimport type { TcolorScheme } from '../../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../../styled'\nimport { Pagination as PaginationComponent } from '../../pagination/Pagination'\nimport { Text } from '../../text/Text'\nimport { useDataTable } from '../DataTable.context'\nimport { AsyncDataState } from '../DataTable.types'\n\nconst StyledNav = styled('nav', {\n base: [\n 'flex',\n 'flex-col',\n 'justify-between',\n 'items-center',\n 'tabular-nums',\n 'flex-wrap',\n 'w-full',\n 'gap-4',\n 'mt-4',\n 'md:flex-row'\n ]\n})\n\ntype PaginationProps = React.ComponentProps<typeof StyledNav> & {\n colorScheme?: TcolorScheme\n}\n\n/** Applies pagination to parent DataTableProvider and renders UI to switch pages etc */\nexport const Pagination = ({ colorScheme, ...rest }: PaginationProps) => {\n const {\n applyPagination,\n removePagination,\n getState,\n getExpandedRowModel,\n getRowModel,\n setPageIndex,\n getTotalRows,\n getPageCount,\n asyncDataState,\n hasAsyncData\n } = useDataTable()\n\n React.useEffect(() => {\n applyPagination()\n return () => removePagination()\n }, [applyPagination, removePagination])\n\n const { pagination: paginationState } = getState()\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n // Show pagination only if total pages are more than 1\n const showPagination = hasAsyncData\n ? getPageCount() > 1\n : getExpandedRowModel().rows.length / paginationState.pageSize > 1\n\n if (isEmpty || !showPagination) return null\n const totalVisibleRows = getExpandedRowModel().rows.length\n\n const start =\n totalVisibleRows === 0\n ? 0\n : paginationState.pageIndex * paginationState.pageSize + 1\n\n const asyncRowCount = getRowModel().rows.length\n const end = hasAsyncData\n ? asyncRowCount === 0\n ? start\n : start + asyncRowCount - 1\n : Math.min(start + paginationState.pageSize - 1, totalVisibleRows)\n\n // indexing for the pagination component is 1 based\n const setPage = (index: number) => {\n setPageIndex(index - 1)\n }\n\n const pageCount = hasAsyncData\n ? getPageCount()\n : Math.max(1, Math.ceil(totalVisibleRows / paginationState.pageSize))\n\n return (\n <StyledNav {...rest}>\n <Text size=\"sm\">{`${start} - ${end} of ${\n hasAsyncData ? getTotalRows() : totalVisibleRows\n } items`}</Text>\n <PaginationComponent\n colorScheme={colorScheme}\n selectedPage={paginationState.pageIndex + 1}\n pagesCount={pageCount}\n onSelectedPageChange={setPage}\n />\n </StyledNav>\n )\n}\n\nPagination.displayName = 'Pagination'\n","import { DataTableProvider } from './DataTable.context'\nimport { DataTableBody } from './DataTableBody'\nimport { DataTableBulkActions } from './DataTableBulkActions'\nimport { DataTableBulkActionsFloating } from './DataTableBulkActionsFloating'\nimport { DataTableDataCell } from './DataTableDataCell'\nimport { DataTableEmptyState } from './DataTableEmptyState'\nimport { DataTableError } from './DataTableError'\nimport { DataTableGlobalFilter } from './DataTableGlobalFilter'\nimport { DataTableHead } from './DataTableHead'\nimport { DataTableHeaderCell } from './DataTableHeaderCell'\nimport { DataTableLoading } from './DataTableLoading'\nimport { DataTableMetaData } from './DataTableMetaData'\nimport { DataTableRow } from './DataTableRow'\nimport { DataTableRowSelectionCheckbox } from './DataTableRowSelectionCheckbox'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\nimport { DataTableTable } from './DataTableTable'\nimport { DragAndDropTable } from './drag-and-drop/DragAndDropTable'\nimport { Pagination } from './pagination/Pagination'\n\n/** Context provider for DataTable state and logic.\n *\n * Children can call `useDataTable` to access everything provided by `@tanstack/react-table` plus\n * the functionality we've built on top.\n */\nexport const DataTable = /* @__PURE__ */ Object.assign(DataTableProvider, {\n /** Default table body implementation for `DataTable`.\n *\n * Can be configured with alternating colours of rows. If you need more customisation options,\n * you can build your own implementation with `useDataTable()` and the UI-only `Table` components.\n */\n Body: DataTableBody,\n\n /** Default table data cell implementation for `DataTable`\n *\n *\n */\n DataCell: DataTableDataCell,\n\n /**\n * Used in place of `DataTable.Table` to render a table with rows that the user can sort by drag-and-drop\n */\n DragAndDropTable: DragAndDropTable,\n\n /** Default global search implementation for `DataTable`\n *\n * If you need more customisation options, you can compose your own implementation with our UI-only input components and `useDataTable`.\n */\n GlobalFilter: DataTableGlobalFilter,\n\n /** Default table head implementation\n *\n * Can be configured to be sortable and with different visual themes.\n * If you need more customisation options, you can build your own implementation\n * with `useDataTable` and the UI-only `Table` components.\n */\n Head: DataTableHead,\n\n /** Default header implementation for `DataTable`\n *\n * Can be configured to make the column sortable. If you need more customisation options,\n * you can build your own implementation with the UI-only `Table` components.\n */\n HeaderCell: DataTableHeaderCell,\n\n /** Default pagination implementation for `DataTable`\n *\n * Can navigate forward, backward, or to any specific page. If you need more customisation options,\n * you can build your own implementation with `useDataTable` and other UI components.\n *\n */\n MetaData: DataTableMetaData,\n\n /** Default display of amount of items and current sorting status for 'DataTable'\n *\n */\n Pagination: Pagination,\n\n /** Default row implementation for `DataTable`\n *\n * Renders all visible cells as `Table.Cell`. If you need more customisation options,\n * you can build your own implementation with the UI-only `Table` components.\n */\n Row: DataTableRow,\n\n /** Default table implementation for `DataTable`.\n *\n * Can be configured with sortable columns and different visual themes.\n *\n * If you need more customisation options, you can compose your own implementation with\n * lower-level `DataTable` components or build the whole thing from\n * scratch with `useDataTable` and the UI-only `Table` components.\n *\n */\n Table: DataTableTable,\n\n /** Default loading implementation for remote data\n *\n * Renders a loading component while fetching the paginated data using `getAsyncData`.\n *\n * If you need more customisation, you can compose your own implentation, `asyncDataState`\n * can be retrieved from `useDataTable`\n */\n Loading: DataTableLoading,\n\n /** Default error implementation for remote data\n *\n * Renders an error component when `getAsyncData` promise rejects.\n * Children are rendered as a function, it exposes a `runAsyncData` function to the children component.\n * `runAsyncData()` can be used to retry fetching the paginated data with the current pageIndex, pageSize\n * and sorting parameters or your own custom paginated options.\n *\n * If you need more customisation, you can compose your own implentation, `asyncDataState` and `runAsyncData()`\n * can be retrieved from `useDataTable`\n *\n */\n Error: DataTableError,\n\n /** Empty state implementation for `DataTable`.\n *\n * Extends the EmptyState component\n */\n EmptyState: DataTableEmptyState,\n\n /** Select all rows checkbox.\n *\n * Renders a checkbox on the header, allowing for bulk selection/deselection of all selectable rows\n */\n SelectAllRowsCheckbox: DataTableSelectAllRowsCheckbox,\n\n /** Individual row selection checkbox.\n *\n * Renders a checkbox on each row, allowing for individual selection/deselection of any selectable row\n */\n RowSelectionCheckbox: DataTableRowSelectionCheckbox,\n\n /** Bulk actions for selected rows.\n *\n * Renders a toolbar with actions that can be applied to all selected rows\n */\n BulkActions: DataTableBulkActions,\n\n /** Bulk actions for selected rows.\n *\n * Renders a toolbar with actions that can be applied to all selected rows\n */\n BulkActionsFloating: DataTableBulkActionsFloating\n})\n","export const monthNamesShort = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec'\n]\n\nexport const weekdayNamesShort = [\n 'Sun',\n 'Mon',\n 'Tue',\n 'Wed',\n 'Thu',\n 'Fri',\n 'Sat'\n]\n\nexport const DEFAULT_LABELS = {\n open: 'Open calendar',\n next: 'Next month',\n previous: 'Previous month',\n nextYear: 'Next year',\n previousYear: 'Previous year'\n}\n","import { styled } from '../../styled'\n\nexport const Day = styled('button', {\n base: [\n 'bg-transparent',\n 'border-none',\n 'rounded-full',\n 'text-grey-900',\n 'cursor-pointer',\n 'font-body',\n 'text-sm',\n 'size-8',\n 'p-0',\n 'transition-all',\n 'duration-75',\n 'hover:bg-grey-200',\n 'active:bg-primary-800',\n 'active:text-white',\n 'focus:outline-2',\n 'focus:outline-offset-2',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'disabled:cursor-default',\n 'disabled:opacity-30'\n ],\n variants: {\n isSelected: {\n true: ['bg-primary-800', 'hover:bg-primary-800', 'text-white']\n },\n isToday: {\n true: ['bg-grey-200']\n },\n isOutsideMonth: {\n true: ['text-grey-600']\n }\n }\n})\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport type { Props as DayzedInterface } from 'dayzed'\nimport { useDayzed } from 'dayzed'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Button } from '../button/Button'\nimport { Icon } from '../icon/Icon'\nimport { Text } from '../text/Text'\nimport { DEFAULT_LABELS, monthNamesShort, weekdayNamesShort } from './constants'\nimport { Day } from './Day'\n\nconst StyledButton = styled(Button, {\n base: ['text-grey-1000', 'p-3', 'w-16'],\n variants: {\n selected: {\n false: [\n 'disabled:bg-white!',\n 'font-normal',\n 'hover:bg-grey-200!',\n 'hover:text-grey-1000!',\n 'text-grey-1000!'\n ]\n }\n }\n})\n\nexport type CalendarTranslationProps = {\n monthNames?: string[]\n weekdayNames?: string[]\n labels?: {\n open: string\n next: string\n previous: string\n nextYear: string\n previousYear: string\n }\n}\n\ntype CalendarProps = DayzedInterface &\n CalendarTranslationProps & {\n refDateToday?: React.RefObject<HTMLButtonElement | null>\n refDateSelected?: React.RefObject<HTMLButtonElement | null>\n setYear: (date: Date) => Promise<void>\n className?: string\n }\n\nconst offsetWeekdayNames = (\n weekdayNames: string[],\n firstDayOfWeek: number\n): string[] => {\n const start = weekdayNames.slice(0, firstDayOfWeek)\n const end = weekdayNames.slice(firstDayOfWeek)\n return [...end, ...start]\n}\n\nexport const Calendar = ({\n className,\n refDateSelected,\n refDateToday,\n firstDayOfWeek = 0,\n monthNames = monthNamesShort,\n weekdayNames = weekdayNamesShort,\n labels = DEFAULT_LABELS,\n date: dateProp,\n minDate,\n maxDate,\n setYear,\n ...rest\n}: CalendarProps) => {\n // `new Date()` as a default parameter runs on every render (impure render,\n // and a server/client hydration divergence near midnight) — capture the\n // fallback once instead.\n const [fallbackDate] = React.useState(() => new Date())\n const date = dateProp ?? fallbackDate\n\n const [showYears, setShowYears] = React.useState<boolean>(false)\n const [currentYear, setCurrentYear] = React.useState<number>(\n date?.getFullYear()\n )\n\n const handleSetYear = (year: number): void => {\n // Copy before setFullYear — mutating the `date` prop in place changes the\n // caller's object.\n const newDate = new Date(date)\n newDate.setFullYear(year)\n setYear(newDate)\n setShowYears(false)\n }\n\n const isAtMinYear = minDate && currentYear - 16 <= minDate.getFullYear()\n const isAtMaxYear = maxDate && currentYear >= maxDate.getFullYear()\n\n const yearList = Array.from({ length: 16 }, (_, i) => {\n const year = currentYear - i\n if (\n (maxDate && year > maxDate.getFullYear()) ||\n (minDate && year < minDate.getFullYear())\n )\n return 0\n return year\n })\n\n const { calendars, getBackProps, getForwardProps, getDateProps } = useDayzed({\n firstDayOfWeek,\n showOutsideDays: true,\n date,\n minDate,\n maxDate,\n ...rest\n })\n\n if (!calendars.length) return null\n\n return (\n <div className={cn('relative', 'w-fit', '-mt-1', className)}>\n <div className=\"absolute top-0 -right-1 flex\">\n <ActionIcon\n label={labels[showYears ? 'previousYear' : 'previous']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getBackProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear - 16)\n })}\n disabled={showYears && isAtMinYear}\n >\n <Icon is={ChevronLeft} />\n </ActionIcon>\n <ActionIcon\n label={labels[showYears ? 'nextYear' : 'next']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getForwardProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear + 16)\n })}\n disabled={showYears && isAtMaxYear}\n >\n <Icon is={ChevronRight} />\n </ActionIcon>\n </div>\n {showYears && (\n <div className=\"grid grid-cols-4 gap-x-1 gap-y-3 pt-12 [direction:rtl]\">\n {yearList.map((year, i) => {\n const isCurrentYear = year === date.getFullYear()\n // Out-of-range slots render as empty placeholders in a fixed 16-cell\n // grid; several share the same `0` value, so the slot index is their\n // only stable identity.\n // eslint-disable-next-line react/no-array-index-key\n if (!year) return <div key={i} className=\"h-10 w-16\" />\n\n return (\n <StyledButton\n key={year}\n theme={isCurrentYear ? 'primary' : 'neutral'}\n onClick={() => handleSetYear(year)}\n selected={isCurrentYear}\n >\n {year}\n </StyledButton>\n )\n })}\n </div>\n )}\n {!showYears &&\n calendars.map(({ month, year, weeks }) => (\n <div key={`${month}${year}`}>\n <div className=\"mb-4 flex h-10 items-center\">\n <Button\n theme=\"neutral\"\n onClick={() => setShowYears(true)}\n className=\"text-grey-1000 px-0\"\n >\n {monthNames[month]} {year}\n </Button>\n </div>\n <div className=\"mb-3 grid grid-cols-7 gap-x-2 gap-y-1\">\n {offsetWeekdayNames(weekdayNames, firstDayOfWeek).map(\n (weekday) => (\n <Text\n as=\"span\"\n size=\"sm\"\n weight=\"bold\"\n key={`${month}${year}${weekday}`}\n className=\"text-center\"\n >\n {weekday}\n </Text>\n )\n )}\n </div>\n <div className=\"grid grid-cols-7 gap-x-2 gap-y-1\">\n {weeks.map((week, weekIndex) =>\n week.map((dateObj, index) => {\n const key = `${month}${year}${weekIndex}${index}`\n\n if (!dateObj) return <div key={key} />\n\n const { date, selected, today, prevMonth, nextMonth } =\n dateObj\n\n return (\n <Day\n isOutsideMonth={prevMonth || nextMonth}\n isSelected={selected}\n isToday={today}\n key={key}\n ref={\n selected ? refDateSelected : today ? refDateToday : null\n }\n {...getDateProps({ dateObj })}\n type=\"button\"\n >\n {date.getDate()}\n </Day>\n )\n })\n )}\n </div>\n </div>\n ))}\n </div>\n )\n}\n\nCalendar.displayName = 'Calendar'\n","export const DEFAULT_DATE_FORMAT = 'DD/MM/YYYY'\n","import { CalendarEvent } from '@atom-learning/icons'\nimport { useComposedRefs } from '@radix-ui/react-compose-refs'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport type { Props as DayzedInterface } from 'dayzed'\nimport * as React from 'react'\n\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Calendar, type CalendarTranslationProps } from '../calendar/Calendar'\nimport { DEFAULT_LABELS } from '../calendar/constants'\nimport { Icon } from '../icon/Icon'\nimport { Input } from '../input/Input'\nimport { Popover } from '../popover/Popover'\nimport { DEFAULT_DATE_FORMAT } from './constants'\n\ndayjs.extend(customParseFormat)\n\nexport type DateInputProps = Omit<DayzedInterface, 'onDateSelected'> &\n CalendarTranslationProps & {\n initialDate?: Date\n dateFormat?: string\n disabled?: boolean\n size?: 'sm' | 'md' | 'lg'\n appearance?: 'standard' | 'modern'\n theme?: 'white' | 'grey'\n revalidate?: () => Promise<boolean>\n onChange?: (value?: Date) => void\n ref?: React.Ref<HTMLInputElement>\n }\n\nconst formatDateToString = (date?: Date, dateFormat = DEFAULT_DATE_FORMAT) =>\n date ? dayjs(date).format(dateFormat) : ''\n\nexport const DateInput = ({\n ref,\n initialDate,\n dateFormat = DEFAULT_DATE_FORMAT,\n firstDayOfWeek = 1,\n disabled,\n monthNames,\n weekdayNames,\n size = 'md',\n appearance,\n theme,\n labels,\n revalidate,\n onChange,\n minDate,\n maxDate,\n ...rest\n}: DateInputProps) => {\n const [date, setDate] = React.useState(\n initialDate ? dayjs(initialDate).toDate() : undefined\n )\n\n const [inputElRef, setInputElRef] = useCallbackRefState()\n const composedInputRef = useComposedRefs(\n ref as React.Ref<HTMLElement>,\n setInputElRef\n )\n\n const dateString = formatDateToString(date, dateFormat)\n\n const handleInputChange = React.useCallback(\n (event) => {\n const newDateString = event.target.value\n const parsedInputDate = dayjs(newDateString, dateFormat)\n const newDate = parsedInputDate.isValid()\n ? parsedInputDate.toDate()\n : undefined\n setDate(newDate)\n onChange?.(newDate)\n },\n [dateFormat, onChange]\n )\n\n const handleCalendarChange = React.useCallback(\n (newDate) => {\n setDate(newDate)\n\n const mirrorChangeToInputElement = () => {\n if (!inputElRef) return\n\n // Call the `set` function on the input value directly to mirror the change.\n // Props to: https://stackoverflow.com/a/46012210\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n 'value'\n )?.set\n nativeInputValueSetter?.call(\n inputElRef,\n formatDateToString(newDate, dateFormat)\n )\n const event = new Event('input', { bubbles: true })\n inputElRef.dispatchEvent(event)\n }\n mirrorChangeToInputElement()\n },\n [dateFormat, inputElRef]\n )\n\n const updatedLabels = {\n ...DEFAULT_LABELS,\n ...labels\n }\n\n const [calendarOpen, setCalendarOpen] = React.useState(false)\n\n const refDateToday = React.useRef<HTMLButtonElement>(null)\n const refDateSelected = React.useRef<HTMLButtonElement>(null)\n\n const iconSize = getFieldIconSize(size)\n\n return (\n <div className=\"relative h-max\">\n <Input\n name=\"date\"\n disabled={disabled}\n size={size}\n appearance={appearance}\n theme={theme}\n {...(rest as React.ComponentProps<typeof Input>)}\n onChange={handleInputChange}\n ref={composedInputRef}\n defaultValue={dateString}\n />\n <Popover modal open={calendarOpen} onOpenChange={setCalendarOpen}>\n <Popover.Trigger asChild>\n <ActionIcon\n disabled={disabled}\n label={updatedLabels.open}\n size={iconSize}\n theme=\"neutral\"\n hasTooltip={false}\n className=\"absolute top-1/2 right-0 -translate-y-1/2\"\n >\n <Icon is={CalendarEvent} />\n </ActionIcon>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side=\"bottom\"\n align=\"end\"\n showCloseButton={false}\n onOpenAutoFocus={(e) => {\n e.preventDefault()\n if (date) {\n refDateSelected.current?.focus()\n } else {\n refDateToday.current?.focus()\n }\n }}\n className=\"z-1147483646 pr-6\"\n >\n <Calendar\n date={\n // The calendar only mounts inside the opened popover (a\n // client-only interaction), so this `new Date()` fallback never\n // renders on the server and can't cause a hydration mismatch.\n // eslint-disable-next-line react-doctor/rendering-hydration-mismatch-time\n date || new Date()\n }\n selected={date}\n onDateSelected={async (date) => {\n setCalendarOpen(false)\n await handleCalendarChange(date.date)\n if (revalidate) revalidate()\n }}\n setYear={async (date) => {\n await handleCalendarChange(date)\n if (revalidate) revalidate()\n }}\n minDate={minDate}\n maxDate={maxDate}\n refDateToday={refDateToday}\n refDateSelected={refDateSelected}\n firstDayOfWeek={firstDayOfWeek}\n monthNames={monthNames}\n weekdayNames={weekdayNames}\n labels={updatedLabels}\n />\n </Popover.Content>\n </Popover.Portal>\n </Popover>\n </div>\n )\n}\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport { DateInput, type DateInputProps } from '../date-input/DateInput'\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\n\ntype DateFieldProps = DateInputProps & FieldElementWrapperProps\n\nexport const DateField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: DateFieldProps) => {\n const { register, trigger } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <DateInput\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n revalidate={trigger}\n />\n </FieldWrapper>\n )\n}\n\nDateField.displayName = 'DateField'\n","import { styled } from '../../styled'\n\nexport const DialogActionBar = styled('div', {\n base: [\n 'border-t',\n 'border-grey-300',\n 'p-4',\n 'flex',\n 'gap-4',\n 'shadow-[0_-6px_6px_-1px_rgba(51,51,51,0.05)]'\n ]\n})\n","import { styled } from '../../styled'\n\nexport const DialogBackground = styled('div', {\n base: ['w-screen', 'h-screen']\n})\n","import { Close } from '@radix-ui/react-dialog'\n\nexport const DialogClose = Close\n","export const backdropOverlay = [\n 'bg-alpha-600',\n 'fixed',\n 'inset-0',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-fade-in',\n 'motion-safe:data-[state=closed]:animate-fade-out'\n]\n","import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Close, Content, Overlay, Portal } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { backdropOverlay } from '../../utilities/style/backdrop-overlay'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { DialogBackground } from './DialogBackground'\n\nconst modalOverlayId = 'modal_overlay'\n\nconst StyledDialogOverlay = styled(Overlay, {\n base: backdropOverlay\n})\n\nconst StyledDialogContent = styled(\n Content,\n {\n base: [\n // `transform: translate()` is required for `floating-ui` to\n // correctly position elements within the Dialog component.\n // we can't use the translate property directly\n 'transform-[translate(-50%,-50%)]',\n 'bg-white',\n 'shadow-xl',\n 'box-border',\n 'left-1/2',\n 'h-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'overflow-y-auto',\n 'rounded-md',\n 'p-8',\n 'fixed',\n 'top-1/2',\n 'z-1147483646',\n 'focus:outline-none',\n 'motion-safe:data-[state=open]:animate-slide-in-center',\n 'motion-safe:data-[state=closed]:animate-slide-out-center'\n ],\n variants: {\n size: {\n xs: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-95',\n '[&>[data-dialog-close]]:top-4',\n '[&>[data-dialog-close]]:right-4'\n ],\n sm: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-120',\n '[&>[data-dialog-close]]:top-4',\n '[&>[data-dialog-close]]:right-4'\n ],\n md: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-150',\n '[&>[data-dialog-close]]:top-4',\n '[&>[data-dialog-close]]:right-4'\n ],\n lg: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-200',\n '[&>[data-dialog-close]]:top-4',\n '[&>[data-dialog-close]]:right-4'\n ],\n xl: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-275',\n '[&>[data-dialog-close]]:top-4',\n '[&>[data-dialog-close]]:right-4'\n ],\n fullscreen: [\n 'rounded-none',\n 'w-screen',\n 'h-screen',\n 'max-w-screen',\n 'max-h-screen',\n 'supports-svh:h-svh',\n 'supports-svh:max-h-svh',\n '[&>[data-dialog-close]]:top-safe-offset-4',\n '[&>[data-dialog-close]]:right-safe-offset-4'\n ]\n },\n layout: {\n panel: ['flex', 'flex-col', 'p-0']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype DialogContentProps = React.ComponentProps<typeof StyledDialogContent> & {\n closeDialogText?: string\n showCloseButton?: boolean\n}\n\nexport const DialogContent = ({\n size = 'sm',\n children,\n closeDialogText = 'Close dialog',\n showCloseButton = true,\n ...rest\n}: DialogContentProps) => (\n <Portal>\n <StyledDialogOverlay id={modalOverlayId}>\n {React.Children.map(children, (child) =>\n React.isValidElement(child) && child.type === DialogBackground\n ? child\n : null\n )}\n <StyledDialogContent\n size={size}\n aria-label=\"Dialog\"\n onPointerDownOutside={(event) => {\n const element = event.target as HTMLElement\n if (element?.id !== modalOverlayId) {\n event.preventDefault()\n }\n }}\n {...rest}\n >\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closeDialogText}\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n data-dialog-close\n className=\"absolute top-4 right-4 size-12\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {React.Children.map(children, (child) =>\n React.isValidElement(child) && child.type === DialogBackground\n ? null\n : child\n )}\n </StyledDialogContent>\n </StyledDialogOverlay>\n </Portal>\n)\n","import { styled } from '../../styled'\n\nexport const DialogFooter = styled('footer', {\n base: ['flex', 'justify-end', 'gap-3', 'pt-4']\n})\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Heading, type HeadingProps } from '../heading/Heading'\n\nexport const DialogHeading = ({ className, ...rest }: HeadingProps) => (\n <Heading\n size=\"sm\"\n {...rest}\n className={cn(\n 'border-b',\n 'border-b-grey-200',\n 'pb-8',\n 'pt-0',\n 'px-8',\n 'mb-8',\n '-mx-8',\n 'box-content',\n className\n )}\n />\n)\n","import { styled } from '../../styled'\n\nexport const DialogNavigationBar = styled('div', {\n base: [\n 'flex',\n 'justify-between',\n 'items-center',\n 'border-b',\n 'border-grey-300',\n 'p-4'\n ]\n})\n","import { styled } from '../../styled'\n\nexport const DialogScrollableContent = styled('div', {\n base: ['overflow-scroll', 'flex-1', 'p-4']\n})\n","import { Description, Root, Title, Trigger } from '@radix-ui/react-dialog'\n\nimport { DialogActionBar } from './DialogActionBar'\nimport { DialogBackground } from './DialogBackground'\nimport { DialogClose } from './DialogClose'\nimport { DialogContent } from './DialogContent'\nimport { DialogFooter } from './DialogFooter'\nimport { DialogHeading } from './DialogHeading'\nimport { DialogNavigationBar } from './DialogNavigationBar'\nimport { DialogScrollableContent } from './DialogScrollableContent'\n\nexport const Dialog = /* @__PURE__ */ Object.assign(Root, {\n ActionBar: DialogActionBar,\n Background: DialogBackground,\n Close: DialogClose,\n Content: DialogContent,\n Heading: DialogHeading,\n Footer: DialogFooter,\n NavigationBar: DialogNavigationBar,\n ScrollableContent: DialogScrollableContent,\n\n Description: Description,\n Title: Title,\n Trigger: Trigger\n})\n\nDialog.displayName = 'Dialog'\n","import { Overlay } from '@radix-ui/react-dialog'\n\nimport { styled } from '../../styled'\nimport { backdropOverlay } from '../../utilities/style/backdrop-overlay'\n\nexport const DrawerOverlay = styled(\n Overlay,\n { base: backdropOverlay },\n { enablePolymorphism: false }\n)\n","import { Content, Portal } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { ColorScheme } from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { DrawerContext } from './Drawer.context'\nimport { DrawerOverlay } from './DrawerOverlay'\n\nexport const StyledContent = styled(Content, {\n base: [\n 'bg-(--base-1)',\n 'shadow-lg',\n 'fixed',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n position: {\n top: [\n '[--slide-direction-out-y:-100%]',\n 'top-0',\n 'left-0',\n 'w-full',\n 'max-h-17/20'\n ],\n right: [\n '[--slide-direction-out-x:100%]',\n 'right-0',\n 'top-0',\n 'h-full',\n 'w-(--drawer-content-width,100%)',\n 'max-w-full'\n ],\n bottom: [\n '[--slide-direction-out-y:100%]',\n 'bottom-0',\n 'left-0',\n 'w-full',\n 'max-h-17/20'\n ],\n left: [\n '[--slide-direction-out-x:-100%]',\n 'left-0',\n 'top-0',\n 'h-full',\n 'w-(--drawer-content-width,100%)',\n 'max-w-full'\n ]\n },\n size: {\n xs: ['[--drawer-content-width:240px]'],\n sm: ['[--drawer-content-width:256px]'],\n md: ['[--drawer-content-width:288px]'],\n lg: ['[--drawer-content-width:304px]'],\n xl: ['[--drawer-content-width:320px]'],\n '2xl': ['[--drawer-content-width:720px]'],\n '3xl': ['[--drawer-content-width:1000px]']\n }\n }\n})\n\nexport const DrawerContent = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledContent>) => {\n const { position } = React.use(DrawerContext)\n\n return (\n <Portal>\n <DrawerOverlay />\n <ColorScheme base=\"grey1\" accent=\"primary1\" asChild>\n <StyledContent size=\"lg\" position={position} {...rest} asChild>\n <div className=\"flex flex-col\">{children}</div>\n </StyledContent>\n </ColorScheme>\n </Portal>\n )\n}\n","import * as React from 'react'\n\nimport { StyledContent } from './DrawerContent'\n\ntype DrawerProviderProps = {\n position?: React.ComponentProps<typeof StyledContent>['position']\n}\n\ntype DrawerContext = DrawerProviderProps\n\nexport const DrawerContext = React.createContext<DrawerContext>({\n position: 'left'\n})\n\nexport const DrawerProvider = ({\n position = 'left',\n ...rest\n}: React.PropsWithChildren<DrawerProviderProps>) => {\n const value = React.useMemo<DrawerContext>(() => ({ position }), [position])\n return <DrawerContext value={value} {...rest} />\n}\n","import { Close } from '@atom-learning/icons'\nimport { Close as DialogClose } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nexport const DrawerClose = ({\n label = 'Close',\n ...props\n}: Omit<React.ComponentProps<typeof ActionIcon>, 'children'>) => (\n <DialogClose asChild>\n <ActionIcon\n theme=\"neutral\"\n appearance=\"simple\"\n size=\"md\"\n hasTooltip={false}\n label={label}\n {...props}\n >\n <Icon is={Close} />\n </ActionIcon>\n </DialogClose>\n)\n","import { styled } from '../../styled'\n\nexport const DrawerFooter = styled('div', {\n base: ['p-4', 'w-full', 'border-t', 'border-t-(--base-3)']\n})\n","import { styled } from '../../styled'\n\nexport const DrawerHeader = styled('div', {\n base: ['p-4', 'w-full', 'min-h-16', 'border-b', 'border-b-(--base-3)']\n})\n","import { styled } from '../../styled'\n\nexport const DrawerMain = styled('div', {\n base: ['p-4', 'w-full', 'grow', 'overflow-y-auto']\n})\n","import { Trigger } from '@radix-ui/react-dialog'\n\nexport const DrawerTrigger = Trigger\n","import { Root } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { DrawerProvider } from './Drawer.context'\nimport { DrawerClose } from './DrawerClose'\nimport { DrawerContent } from './DrawerContent'\nimport { DrawerFooter } from './DrawerFooter'\nimport { DrawerHeader } from './DrawerHeader'\nimport { DrawerMain } from './DrawerMain'\nimport { DrawerTrigger } from './DrawerTrigger'\n\ntype DrawerProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof DrawerProvider>\n\nconst DrawerComponent = ({ children, position, ...rest }: DrawerProps) => (\n <DrawerProvider position={position}>\n <Root {...rest}>{children}</Root>\n </DrawerProvider>\n)\n\nexport const Drawer = /* @__PURE__ */ Object.assign(DrawerComponent, {\n Close: DrawerClose,\n Content: DrawerContent,\n Main: DrawerMain,\n Header: DrawerHeader,\n Footer: DrawerFooter,\n Trigger: DrawerTrigger\n})\n","import { Content } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuContent = styled(\n Content,\n {\n base: [\n 'bg-white',\n 'rounded-sm',\n 'shadow-sm',\n 'py-2',\n 'z-10',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { Item } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuItem = styled(\n Item,\n {\n base: [\n 'items-center',\n 'text-grey-1000',\n 'cursor-pointer',\n 'flex',\n 'font-body',\n 'font-normal',\n 'relative',\n 'px-3',\n 'py-2',\n 'data-disabled:cursor-not-allowed',\n 'data-disabled:opacity-30',\n 'data-disabled:pointer-events-none',\n 'aria-[current=page]:before:absolute',\n 'aria-[current=page]:before:border-l-2',\n 'aria-[current=page]:before:border-l-current',\n \"aria-[current=page]:before:content-['']\",\n 'aria-[current=page]:before:h-6',\n 'aria-[current=page]:before:left-0',\n 'aria-[current=page]:before:outline-none',\n 'aria-[current=page]:before:scale-100',\n 'focus:before:absolute',\n 'focus:before:border-l-2',\n 'focus:before:border-l-current',\n \"focus:before:content-['']\",\n 'focus:before:h-6',\n 'focus:before:left-0',\n 'focus:before:outline-none',\n 'focus:before:scale-100',\n 'focus:outline-none',\n 'focus:text-primary-900',\n 'hover:underline'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { Label } from '@radix-ui/react-dropdown-menu'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\ntype DropdownMenuLabelProps = React.ComponentProps<typeof Label>\n\nexport const DropdownMenuLabel = ({\n className,\n ...rest\n}: DropdownMenuLabelProps) => (\n <Text\n as={Label}\n size=\"sm\"\n className={cn('px-3', 'py-2', 'text-text-subtle', className)}\n {...rest}\n />\n)\n\nDropdownMenuLabel.displayName = 'DropdownMenuLabel'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\nimport { DropdownMenuItem } from './DropdownMenuItem'\n\nconst StyledLink = styled('a', {\n base: ['no-underline']\n})\n\nexport const DropdownMenuLinkItem = ({\n children,\n href,\n reloadDocument,\n target,\n rel,\n download,\n ...rest\n}: React.ComponentProps<typeof DropdownMenuItem> &\n Pick<React.ComponentPropsWithoutRef<'a'>, 'target' | 'rel' | 'download'> & {\n href: string\n reloadDocument?: boolean\n }) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n\n return (\n // Anchor attributes belong on the rendered <a> (StyledLink); the remaining\n // props are DropdownMenuItem's menu-item behaviour props, which it merges onto\n // StyledLink via `asChild`. `getExternalAnchorProps` still wins for external\n // hrefs (security rel/target).\n <DropdownMenuItem {...rest} asChild>\n <StyledLink\n as={routerLinkProps.as}\n href={href}\n target={target}\n rel={rel}\n download={download}\n role=\"menuitem\"\n {...getExternalAnchorProps(href)}\n >\n {children}\n </StyledLink>\n </DropdownMenuItem>\n )\n}\n","import { Separator } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuSeparator = styled(\n Separator,\n {\n base: ['h-px', 'bg-grey-600', 'my-2']\n },\n { enablePolymorphism: false }\n)\n","import { Trigger } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuTrigger = styled(\n Trigger,\n {\n base: ['disabled:cursor-not-allowed', 'disabled:opacity-30']\n },\n { enablePolymorphism: false }\n)\n","import {\n Group,\n Portal,\n Root as DropdownMenuRoot\n} from '@radix-ui/react-dropdown-menu'\nimport * as React from 'react'\n\nimport { DropdownMenuContent } from './DropdownMenuContent'\nimport { DropdownMenuItem } from './DropdownMenuItem'\nimport { DropdownMenuLabel } from './DropdownMenuLabel'\nimport { DropdownMenuLinkItem } from './DropdownMenuLinkItem'\nimport { DropdownMenuSeparator } from './DropdownMenuSeparator'\nimport { DropdownMenuTrigger } from './DropdownMenuTrigger'\n\nexport const DropdownMenu = /* @__PURE__ */ Object.assign(DropdownMenuRoot, {\n Content: DropdownMenuContent,\n Group: Group,\n Item: DropdownMenuItem,\n Label: DropdownMenuLabel,\n LinkItem: DropdownMenuLinkItem,\n Portal: Portal,\n Separator: DropdownMenuSeparator,\n Trigger: DropdownMenuTrigger\n})\n","import { Upload } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { cn, type StyledComponentProps } from '../../styled'\nimport { Button } from '../button/Button'\nimport { Icon } from '../icon/Icon'\n\n// FileInput always renders the Button as a <label>, so its public props are\n// Button's own props retargeted to the label element\nexport type FileInputProps = Omit<\n StyledComponentProps<typeof Button, 'label'>,\n 'as'\n> & {\n onFileSelect: (selection: FileList | null) => void\n accept?: string\n multiple?: boolean\n disabled?: boolean\n}\n\nexport const FileInput = ({\n accept,\n children,\n className,\n disabled = false,\n multiple = false,\n onFileSelect,\n ...rest\n}: FileInputProps) => {\n const handleFileSelect = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { files } = event.target\n\n onFileSelect(files)\n }\n\n // The rendered element is a <label>, which ignores the `disabled` attribute\n // and never matches `:disabled`. Disable the hidden input (so the label can't\n // open the picker) and mirror Button's disabled affordance via aria-disabled\n // + pointer-events-none/opacity so the state is visible and interaction-free.\n return (\n <Button\n as=\"label\"\n aria-disabled={disabled || undefined}\n className={cn(\n disabled && 'pointer-events-none cursor-not-allowed opacity-30',\n className\n )}\n {...rest}\n >\n <Icon is={Upload} />\n {children}\n <input\n type=\"file\"\n onChange={handleFileSelect}\n accept={accept}\n multiple={multiple}\n disabled={disabled}\n hidden\n />\n </Button>\n )\n}\n\nFileInput.displayName = 'FileInput'\n","import * as React from 'react'\nimport type {\n DefaultValues,\n FieldValues,\n Mode,\n SubmitErrorHandler,\n SubmitHandler,\n UseFormMethods\n} from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\n\nimport {\n type FormCustomContextType,\n FormCustomContext\n} from './useFormCustomContext'\n\ntype FormProps<TFormData extends FieldValues> = Omit<\n React.HTMLAttributes<HTMLFormElement>,\n 'onSubmit' | 'onError' | 'children'\n> & {\n defaultValues?: DefaultValues<TFormData>\n validationMode?: Mode\n onSubmit: SubmitHandler<TFormData>\n onError?: SubmitErrorHandler<TFormData>\n noValidate?: boolean\n children:\n | React.ReactNode\n | ((methods: UseFormMethods<TFormData>) => React.ReactNode)\n}\n\nexport const Form = <TFormData extends FieldValues>(\n props: FormProps<TFormData> & FormCustomContextType\n) => {\n const {\n children,\n defaultValues,\n validationMode = 'onBlur',\n onSubmit,\n onError,\n appearance,\n theme,\n ...rest\n } = props\n\n const methods = useForm<TFormData>({\n defaultValues,\n mode: validationMode\n })\n\n // Memoized: the form re-renders on every RHF state change and would\n // otherwise push a fresh context value to every consumer each time.\n const customContextValue = React.useMemo(\n () => ({ appearance, theme }),\n [appearance, theme]\n )\n\n return (\n <FormProvider {...methods}>\n <FormCustomContext value={customContextValue}>\n <form\n aria-label=\"form\"\n onSubmit={methods.handleSubmit(onSubmit, onError)}\n {...rest}\n >\n {typeof children === 'function' ? children(methods) : children}\n </form>\n </FormCustomContext>\n </FormProvider>\n )\n}\n\nForm.displayName = 'Form'\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { Input, type InputProps } from '../input/Input'\n\ntype InputFieldProps = InputProps & FieldElementWrapperProps\n\nexport const InputField = ({\n className,\n label,\n name,\n validation,\n prompt,\n description,\n hideLabel,\n appearance,\n theme,\n ...rest\n}: InputFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Input\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nInputField.displayName = 'InputField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const StyledLi = styled('li', {\n base: ['last:mb-0', 'not-last:mb-2']\n})\n\nexport const StyledList = styled('ul', {\n base: ['list-inside', 'font-body'],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]']\n },\n noCapsize: {\n true: ['capsize-none']\n },\n ordered: {\n true: [\n 'pl-4',\n 'list-decimal',\n '[&_>_li]:pl-1',\n '[&_>_li::marker]:font-medium',\n '[&_>_li::marker]:text-sm'\n ],\n false: ['pl-3', 'list-disc', '[&_>_li]:pl-2']\n },\n theme: {\n primary: ['marker:text-primary-800']\n }\n }\n})\n\ntype ListProps = React.ComponentProps<typeof StyledList> & {\n ordered?: boolean\n}\n\nconst ListComponent = ({\n ref,\n size = 'md',\n noCapsize = true,\n ordered = false,\n ...rest\n}: ListProps) => (\n <StyledList\n ref={ref}\n as={ordered ? 'ol' : 'ul'}\n ordered={ordered}\n size={size}\n noCapsize={noCapsize}\n {...rest}\n />\n)\n\nexport const List = /* @__PURE__ */ Object.assign(ListComponent, {\n Item: StyledLi\n})\n","import type { Code } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownCodeProps = {\n node: Code\n}\n\nconst StyledMarkdownCode = styled('div', {\n base: [\n 'bg-grey-200',\n 'rounded-md',\n 'text-grey-1000',\n 'font-mono',\n 'text-sm/[1.4]',\n 'my-4',\n 'p-3'\n ]\n})\n\nexport const MarkdownCode = ({ node }: MarkdownCodeProps) => (\n <StyledMarkdownCode as=\"pre\">{node.value}</StyledMarkdownCode>\n)\n","import type { RootContent, Emphasis } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownEmphasisProps = {\n node: Emphasis\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const StyledMarkdownEmphasis = styled('em', {\n base: ['italic']\n})\n\nexport const MarkdownEmphasis = ({\n node,\n handleNode\n}: MarkdownEmphasisProps) => (\n <StyledMarkdownEmphasis>\n {node.children?.map(handleNode)}\n </StyledMarkdownEmphasis>\n)\n","import type { RootContent, Heading as HeadingType } from 'mdast'\nimport * as React from 'react'\n\nimport { Heading, type HeadingProps } from '../../heading/Heading'\n\ntype MarkdownHeadingProps = {\n node: HeadingType\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nconst getHeadingProps = (depth: number): HeadingProps => {\n switch (depth) {\n case 1:\n return { size: 'xl', as: 'h1' }\n case 2:\n return { size: 'lg', as: 'h2' }\n case 3:\n return { size: 'md', as: 'h3' }\n case 4:\n return { size: 'sm', as: 'h4' }\n case 5:\n return { size: 'xs', as: 'h5' }\n default:\n return { size: 'xs', as: 'h6' }\n }\n}\n\nexport const MarkdownHeading = ({\n node,\n handleNode,\n ...rest\n}: MarkdownHeadingProps) => {\n const { as, size } = getHeadingProps(node.depth)\n\n return (\n <Heading as={as} size={size} {...rest}>\n {node.children?.map(handleNode)}\n </Heading>\n )\n}\n","import type { Image as ImageType } from 'mdast'\nimport * as React from 'react'\n\nimport { Image } from '../../image/Image'\n\ntype MarkdownImageProps = {\n node: ImageType\n className?: string\n}\n\nexport const MarkdownImage = ({ node, className }: MarkdownImageProps) => (\n <Image src={node.url} alt={node.alt ?? undefined} className={className} />\n)\n","import type { InlineCode } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownInlineCodeProps = {\n node: InlineCode\n}\n\nconst StyledMarkdownInlineCode = styled('div', {\n base: [\n 'bg-grey-200',\n 'rounded-sm',\n 'text-grey-1000',\n 'inline-block',\n 'font-mono',\n 'text-[85%]',\n 'px-1',\n 'py-0.5'\n ]\n})\n\nexport const MarkdownInlineCode = ({ node }: MarkdownInlineCodeProps) => (\n <StyledMarkdownInlineCode as=\"code\">{node.value}</StyledMarkdownInlineCode>\n)\n","import type { RootContent, Link as LinkType } from 'mdast'\nimport * as React from 'react'\n\nimport { Link } from '../../link/Link'\n\ntype MarkdownLinkProps = {\n node: LinkType\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const MarkdownLink = ({ node, handleNode }: MarkdownLinkProps) => (\n <Link title={node.title ?? undefined} href={node.url}>\n {node.children?.map(handleNode)}\n </Link>\n)\n","import type { RootContent, List as ListType } from 'mdast'\nimport * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport { List } from '../../list/List'\n\ntype MarkdownListProps = {\n node: ListType\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n className?: string\n}\n\nexport const MarkdownList = ({\n node,\n handleNode,\n className\n}: MarkdownListProps) => (\n <List\n ordered={node.ordered || undefined}\n className={cn(\n '[&_p]:inline',\n '[&_p]:before:hidden',\n '[&_p]:after:hidden',\n className\n )}\n >\n {node.children?.map(handleNode)}\n </List>\n)\n","import type { RootContent, ListItem } from 'mdast'\nimport * as React from 'react'\n\nimport { List } from '../../list/List'\n\ntype MarkdownListItemProps = {\n node: ListItem\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const MarkdownListItem = ({\n node,\n handleNode\n}: MarkdownListItemProps) => (\n <List.Item>{node.children?.map(handleNode)}</List.Item>\n)\n","import type { RootContent, Paragraph } from 'mdast'\nimport * as React from 'react'\n\nimport { Text } from '../../text/Text'\n\ntype MarkdownParagraphProps = {\n node: Paragraph\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const MarkdownParagraph = ({\n node,\n handleNode,\n ...rest\n}: MarkdownParagraphProps) => (\n <Text {...rest}>{node.children?.map(handleNode)}</Text>\n)\n","import type { RootContent, Strong } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownStrongProps = {\n node: Strong\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nconst StyledMarkdownStrong = styled('strong', {\n base: ['font-semibold']\n})\n\nexport const MarkdownStrong = ({ node, handleNode }: MarkdownStrongProps) => (\n <StyledMarkdownStrong>{node.children?.map(handleNode)}</StyledMarkdownStrong>\n)\n","import type { Text as TextType } from 'mdast'\nimport * as React from 'react'\n\ntype MarkdownTextProps = {\n node: TextType\n}\n\nexport const MarkdownText = ({ node }: MarkdownTextProps): React.ReactNode =>\n node.value\n","import * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport { Divider } from '../../divider/Divider'\n\ntype MarkdownThematicBreakProps = {\n className?: string\n}\n\nexport const MarkdownThematicBreak = ({\n className\n}: MarkdownThematicBreakProps) => (\n <Divider className={cn('w-full', className)} />\n)\n","import { directiveFromMarkdown } from 'mdast-util-directive'\nimport { fromMarkdown } from 'mdast-util-from-markdown'\nimport { directive } from 'micromark-extension-directive'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { MarkdownCode } from './components/MarkdownCode'\nimport { MarkdownEmphasis } from './components/MarkdownEmphasis'\nimport { MarkdownHeading } from './components/MarkdownHeading'\nimport { MarkdownImage } from './components/MarkdownImage'\nimport { MarkdownInlineCode } from './components/MarkdownInlineCode'\nimport { MarkdownLink } from './components/MarkdownLink'\nimport { MarkdownList } from './components/MarkdownList'\nimport { MarkdownListItem } from './components/MarkdownListItem'\nimport { MarkdownParagraph } from './components/MarkdownParagraph'\nimport { MarkdownStrong } from './components/MarkdownStrong'\nimport { MarkdownText } from './components/MarkdownText'\nimport { MarkdownThematicBreak } from './components/MarkdownThematicBreak'\n\ntype HandleNode = (node, index?: number) => React.JSX.Element | null\n\nconst StyledMarkdownContent = styled('div', {\n base: [\n 'flex',\n 'flex-col',\n 'gap-8',\n '[&>h1]:max-w-[65ch]',\n '[&>h2]:max-w-[65ch]',\n '[&>h3]:max-w-[65ch]',\n '[&>h4]:max-w-[65ch]',\n '[&>p]:max-w-[75ch]',\n '[&>ul]:max-w-[75ch]'\n ]\n})\n\ntype MarkdownContentProps = React.ComponentProps<\n typeof StyledMarkdownContent\n> & {\n content: string\n customComponents?: {\n [key: string]: (props: {\n node: any\n handleNode: HandleNode\n }) => React.JSX.Element\n }\n}\n\nconst defaultComponentsMap = {\n code: MarkdownCode,\n emphasis: MarkdownEmphasis,\n heading: MarkdownHeading,\n inlineCode: MarkdownInlineCode,\n image: MarkdownImage,\n link: MarkdownLink,\n list: MarkdownList,\n listItem: MarkdownListItem,\n paragraph: MarkdownParagraph,\n strong: MarkdownStrong,\n text: MarkdownText,\n thematicBreak: MarkdownThematicBreak\n}\n\nconst generateNodeKey = (node, index: number) => {\n if (node.position?.start) {\n const { line, column, offset } = node.position.start\n return `${node.type}${line}${column}${offset}`\n }\n\n // Deterministic fallback: keys must be stable across renders and identical\n // between server and client, so no timestamps or random values.\n return `${node.type}${index}`\n}\n\nexport const MarkdownContent = ({\n content,\n customComponents = {},\n className\n}: MarkdownContentProps) => {\n const AST = fromMarkdown(content, {\n extensions: [directive()],\n mdastExtensions: [directiveFromMarkdown()]\n })\n\n const componentsMap = {\n ...defaultComponentsMap,\n ...customComponents\n }\n\n const handleNode: HandleNode = (node, index = 0) => {\n const MarkdownComponent = componentsMap[node.type]\n\n return MarkdownComponent ? (\n <MarkdownComponent\n key={generateNodeKey(node, index)}\n node={node}\n handleNode={handleNode}\n />\n ) : null\n }\n\n return (\n <StyledMarkdownContent className={className}>\n {AST.children.map(handleNode)}\n </StyledMarkdownContent>\n )\n}\n\nMarkdownContent.displayName = 'MarkdownContent'\n","const light = {\n '--text': 'var(--color-text-subtle)',\n '--text-hover': 'var(--color-grey-1000)',\n '--text-active': 'var(--color-grey-1000)',\n '--text-selected': 'var(--color-primary-800)',\n '--text-selected-hover': 'var(--color-primary-800)',\n '--text-selected-pressed': 'var(--color-primary-800)',\n '--text-selected-focus': 'var(--color-primary-800)',\n '--background': 'white',\n '--background-hover': 'var(--color-grey-100)',\n '--background-active': 'var(--color-grey-200)',\n '--background-selected': 'var(--color-primary-100)',\n '--background-selected-hover': 'var(--color-grey-100)',\n '--background-selected-pressed': 'var(--color-grey-200)',\n '--item-text-selected': 'var(--color-grey-900)',\n '--item-background-selected': 'var(--color-grey-900)',\n '--trigger-background-open': 'var(--color-grey-200)',\n '--dropdown-background': 'white'\n}\n\nexport const colorSchemes = {\n light\n}\n","import * as React from 'react'\n\ninterface NavigationMenuContextValue {\n onNodeUpdate: (\n trigger: HTMLButtonElement,\n itemValue: string\n ) => HTMLButtonElement\n}\n\nexport const NavigationMenuContext = React.createContext<\n NavigationMenuContextValue | undefined\n>(undefined)\n\nexport const useNavigationMenuContext = (): NavigationMenuContextValue => {\n const context = React.use(NavigationMenuContext)\n\n if (context === undefined) {\n throw new Error(\n 'useNavigationMenuContext must be used within a NavigationMenuContextProvider'\n )\n }\n\n return context\n}\n","/*\nUsed to block default radix hover to open menu behaviour\nProps: https://github.com/radix-ui/primitives/issues/1630\n*/\nexport const preventEvent = (\n event: React.PointerEvent | Event | React.SyntheticEvent\n): void => {\n const e = event as Event\n e.preventDefault()\n}\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { preventEvent } from '../../utilities/event/preventEvent'\n\nconst StyledContent = styled(NavigationMenuPrimitive.Content, {\n base: ['p-3', 'bg-(--dropdown-background)', 'mt-1', 'shadow-md', 'rounded-md']\n})\n\ntype NavigationMenuDropdownContentProps = React.ComponentProps<\n typeof StyledContent\n>\n\nexport const NavigationMenuDropdownContent = ({\n children,\n ...rest\n}: NavigationMenuDropdownContentProps) => (\n <StyledContent\n onPointerMove={preventEvent}\n onPointerLeave={preventEvent}\n {...rest}\n >\n <ul>{children}</ul>\n </StyledContent>\n)\n\nNavigationMenuDropdownContent.displayName = 'NavigationMenuDropdownContent'\n","export const navigationMenuBaseItemStyles = [\n 'relative',\n 'text-(--text)',\n 'outline-none',\n 'cursor-pointer',\n 'font-body',\n 'select-none',\n 'p-3',\n 'rounded-md',\n 'bg-(--background)',\n 'hover:bg-(--background-hover)',\n 'hover:text-(--text-hover)',\n 'active:bg-(--background-active)',\n 'active:text-(--text-active)',\n 'focus-visible:inset-shadow-[0_0_0_2px_var(--color-primary-800)]',\n 'disabled:bg-none',\n 'disabled:cursor-default',\n 'disabled:opacity-[30%]',\n 'disabled:text-(--text)'\n]\n\nexport const navigationMenuActiveItemStyles = [\n 'font-semibold',\n 'text-item-(--background-selected)',\n 'after:-translate-x-1/2',\n 'after:absolute',\n 'after:bg-item-(--background-selected)',\n 'after:block',\n 'after:bottom-0',\n 'after:h-0.5',\n 'after:left-1/2',\n 'after:rounded-md',\n 'after:translate-y-0',\n 'after:w-6'\n]\n","import { ChevronDown } from '@atom-learning/icons'\nimport * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { preventEvent } from '../../utilities/event/preventEvent'\nimport { Icon } from '../icon/Icon'\nimport {\n navigationMenuActiveItemStyles,\n navigationMenuBaseItemStyles\n} from './NavigationMenu.styles'\n\nconst StyledTrigger = styled(NavigationMenuPrimitive.Trigger, {\n base: [\n ...navigationMenuBaseItemStyles,\n 'flex',\n 'items-center',\n 'rounded-md',\n 'justify-between',\n 'data-[state=open]:bg-(--trigger-background-open)'\n ],\n variants: {\n active: {\n true: navigationMenuActiveItemStyles\n }\n }\n})\n\nexport const NavigationMenuDropdownTrigger = ({\n ref,\n children,\n active,\n ...rest\n}: React.ComponentProps<typeof StyledTrigger>) => (\n <StyledTrigger\n active={active}\n {...rest}\n ref={ref}\n onPointerMove={preventEvent}\n onPointerLeave={preventEvent}\n >\n {children}\n <Icon\n is={ChevronDown}\n size=\"sm\"\n className={cn(\n 'ml-1',\n 'in-data-[state=open]:-rotate-180',\n 'motion-safe:duration-200',\n 'motion-safe:ease-in',\n 'motion-safe:transition-transform'\n )}\n />\n </StyledTrigger>\n)\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React, { type ComponentProps, type ReactElement } from 'react'\n\nimport { useNavigationMenuContext } from './NavigationMenu.context'\nimport { NavigationMenuDropdownContent } from './NavigationMenuDropdownContent'\nimport { NavigationMenuDropdownTrigger } from './NavigationMenuDropdownTrigger'\n\ntype NavigationMenuDropdownProps = {\n active?: boolean\n className?: string\n id: string\n} & React.HTMLProps<HTMLButtonElement>\n\ntype DropdownTriggerProps = ComponentProps<typeof NavigationMenuDropdownTrigger>\n\nexport const NavigationMenuDropdown = ({\n children,\n id,\n ...rest\n}: NavigationMenuDropdownProps) => {\n const { onNodeUpdate } = useNavigationMenuContext()\n\n return (\n <NavigationMenuPrimitive.Item value={id}>\n {React.Children.map(children, (child) => {\n const isTrigger =\n React.isValidElement(child) &&\n child.type === NavigationMenuDropdownTrigger\n const isContent =\n React.isValidElement(child) &&\n child.type === NavigationMenuDropdownContent\n\n if (!isTrigger && !isContent) {\n throw new Error(\n 'Only NavigationMenu.Trigger and NavigationMenu.Content can be the passed as a \"children\" of NavigationMenu.Dropdown'\n )\n }\n return isTrigger\n ? React.cloneElement(\n child as ReactElement<DropdownTriggerProps>,\n {\n ...rest,\n ref: (node: HTMLButtonElement) => {\n onNodeUpdate(node, id)\n }\n } as React.PropsWithRef<DropdownTriggerProps>\n )\n : child\n })}\n </NavigationMenuPrimitive.Item>\n )\n}\n\nNavigationMenuDropdown.displayName = 'NavigationMenuDropdown'\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\nimport { navigationMenuBaseItemStyles } from './NavigationMenu.styles'\n\nconst DisabledButton = styled('button', {\n base: [\n ...navigationMenuBaseItemStyles,\n 'disabled:bg-none',\n 'disabled:cursor-default',\n 'disabled:opacity-30',\n 'disabled:text-text'\n ]\n})\n\nconst ListItem = NavigationMenuPrimitive.Item\n\nconst StyledLink = styled(NavigationMenuPrimitive.Link, {\n base: [\n ...navigationMenuBaseItemStyles,\n 'block',\n 'no-underline',\n 'leading-none'\n ],\n variants: {\n elementType: {\n dropdownItem: [\n 'data-active:bg-background-selected',\n 'data-active:text-text-selected',\n 'data-active:hover:bg-background-selected-hover',\n 'data-active:hover:text-text-selected-hover',\n 'data-active:active:bg-background-selected-pressed',\n 'data-active:active:text-text-selected-pressed',\n 'data-active:focus-visible:shadow-[0_0_0_2px_var(--color-primary-800)]',\n 'data-active:focus-visible:text-text-selected-focus'\n ],\n link: [\n 'data-active:font-semibold',\n 'data-active:text-item-(--background-selected)',\n 'data-active:after:-translate-x-1/2',\n 'data-active:after:absolute',\n 'data-active:after:bg-item-(--background-selected)',\n 'data-active:after:block',\n 'data-active:after:bottom-0',\n 'data-active:after:h-0.5',\n 'data-active:after:left-1/2',\n 'data-active:after:rounded-md',\n 'data-active:after:translate-y-0',\n 'data-active:after:w-6'\n ]\n }\n }\n})\n\nexport const NavigationMenuLink = ({\n ref,\n children,\n href,\n disabled,\n className,\n variant = 'link',\n reloadDocument,\n ...rest\n}: Omit<React.ComponentProps<typeof StyledLink>, 'elementType'> & {\n disabled?: boolean\n variant?: React.ComponentProps<typeof StyledLink>['elementType']\n reloadDocument?: boolean\n ref?: React.Ref<HTMLAnchorElement>\n}) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n const RouterLink = routerLinkProps.as\n\n return (\n <ListItem>\n {disabled ? (\n <DisabledButton disabled className={className}>\n {children}\n </DisabledButton>\n ) : RouterLink ? (\n <StyledLink\n href={href}\n ref={ref}\n elementType={variant}\n className={className}\n asChild\n {...rest}\n >\n <RouterLink href={href}>{children}</RouterLink>\n </StyledLink>\n ) : (\n <StyledLink\n href={href}\n ref={ref}\n elementType={variant}\n className={className}\n {...getExternalAnchorProps(href)}\n {...rest}\n >\n {children}\n </StyledLink>\n )}\n </ListItem>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { NavigationMenuLink } from './NavigationMenuLink'\n\nexport const NavigationMenuDropdownItem = ({\n ref,\n ...props\n}: React.PropsWithChildren<\n React.ComponentProps<typeof NavigationMenuLink>\n>) => <NavigationMenuLink ref={ref} variant=\"dropdownItem\" {...props} />\n\nexport const NavigationMenuDropdownItemTitle = styled(Text, {\n base: ['text-grey-900', 'font-semibold']\n})\n\nNavigationMenuDropdownItemTitle.displayName = 'NavigationMenuDropdownItemTitle'\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { colorSchemes as navigationMenuColorSchemes } from './NavigationMenu.colorscheme.config'\nimport { NavigationMenuContext } from './NavigationMenu.context'\nimport { NavigationMenuDropdown } from './NavigationMenuDropdown'\nimport { NavigationMenuDropdownContent } from './NavigationMenuDropdownContent'\nimport {\n NavigationMenuDropdownItem,\n NavigationMenuDropdownItemTitle\n} from './NavigationMenuDropdownItem'\nimport { NavigationMenuDropdownTrigger } from './NavigationMenuDropdownTrigger'\nimport { NavigationMenuLink } from './NavigationMenuLink'\n\nconst StyledMenu = styled(NavigationMenuPrimitive.Root, {\n base: ['flex', 'justify-center', 'relative']\n})\n\nconst StyledList = styled(NavigationMenuPrimitive.List, {\n base: ['flex', 'justify-center', 'items-center', 'gap-1', 'list-none']\n})\n\nconst StyledViewport = styled(NavigationMenuPrimitive.Viewport, {\n base: ['z-2147483647']\n})\n\nconst ViewportPosition = styled('div', {\n base: ['absolute', 'left-0', 'top-full', 'w-full', 'flex', 'justify-center']\n})\n\nconst NavigationMenuComponent = ({\n children,\n className,\n ...rest\n}: React.ComponentProps<typeof StyledMenu>) => {\n const [offset, setOffset] = React.useState<number | null | undefined>()\n const [activeItem, setActiveItem] = React.useState<string | undefined>()\n const listRef = React.useRef<HTMLUListElement>(null)\n const listWidthRef = React.useRef(0)\n\n // Cache the resting list width. It must be measured while the menu is closed:\n // as a dropdown opens, its content is briefly laid out inline in the trigger\n // row, so a width read during the open transition is inflated. Held in a ref\n // (not state) since it only feeds the imperative offset calc below and never\n // renders. Re-measured when the item count changes; stale on resize.\n React.useLayoutEffect(() => {\n if (listRef.current) {\n listWidthRef.current = listRef.current.offsetWidth\n }\n }, [React.Children.toArray(children).length])\n\n React.useEffect(() => {\n let timer: ReturnType<typeof setTimeout>\n\n // Delay transitioning back to initial position\n // to allow enough time for fadeOut animation to complete\n if (activeItem === '') {\n timer = setTimeout(setOffset, 200, null)\n }\n\n return () => {\n if (timer !== null) {\n clearTimeout(timer)\n }\n }\n }, [activeItem])\n\n // Radix has no built-in way to align the viewport with the active trigger, so\n // the offset is computed here. https://github.com/radix-ui/primitives/issues/1462\n const onNodeUpdate = React.useCallback(\n (trigger: HTMLButtonElement, itemValue: string) => {\n const listWidth = listWidthRef.current\n if (trigger && listWidth && activeItem === itemValue) {\n const listCenter = listWidth / 2\n\n const triggerOffsetRight =\n listWidth -\n trigger.offsetLeft -\n trigger.offsetWidth +\n trigger.offsetWidth / 2\n\n setOffset(Math.round(listCenter - triggerOffsetRight))\n }\n\n return trigger\n },\n [activeItem]\n )\n\n const contextValue = React.useMemo(() => ({ onNodeUpdate }), [onNodeUpdate])\n\n return (\n <NavigationMenuContext value={contextValue}>\n <StyledMenu\n className={cn(className)}\n style={navigationMenuColorSchemes['light']}\n onValueChange={setActiveItem}\n {...rest}\n >\n <StyledList ref={listRef}>{children}</StyledList>\n <ViewportPosition>\n <StyledViewport\n style={{ '--navigation-menu-viewport-offset': `${offset || 0}px` }}\n className={cn([\n 'data-[state=open]:animate-fade-in',\n 'data-[state=closed]:animate-fade-out',\n 'translate-x-(--navigation-menu-viewport-offset)'\n ])}\n />\n </ViewportPosition>\n </StyledMenu>\n </NavigationMenuContext>\n )\n}\n\nexport const NavigationMenu = /* @__PURE__ */ Object.assign(\n NavigationMenuComponent,\n {\n Link: NavigationMenuLink,\n Dropdown: NavigationMenuDropdown,\n DropdownContent: NavigationMenuDropdownContent,\n DropdownItem: NavigationMenuDropdownItem,\n DropdownItemTitle: NavigationMenuDropdownItemTitle,\n DropdownTrigger: NavigationMenuDropdownTrigger\n }\n)\n\nNavigationMenuComponent.displayName = 'NavigationMenu'\n","const light = {\n '--text': 'var(--foreground)',\n '--background': 'var(--base-1)',\n '--background-hover': 'var(--base-2)',\n '--background-active': 'var(--base-3)',\n '--text-selected': 'var(--accent-9)',\n '--background-selected': 'var(--accent-2)'\n}\n\nexport const colorSchemes = {\n light\n}\n","import { Item } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\n\n/*\n * (!)\n * NavigationMenu vertical behaviour was buggy so had to build the\n * opening/closing nested Content(Accordion) based on `Collapsible` instead.\n * This means that the `value` prop does nothing, so removing it from typescript\n */\ntype NavigationMenuVerticalItemProps = Omit<\n React.ComponentProps<typeof Item>,\n 'value'\n>\n\nexport const NavigationMenuVerticalItem = (\n props: NavigationMenuVerticalItemProps\n) => (\n <Item\n className={cn(\n '[ul_li_&]:[--navigation-menu-vertical-item-pl:--spacing(8)]',\n '[ul_li_&_&]:[--navigation-menu-vertical-item-pl:--spacing(12)]',\n '[ul_li_&_&_&]:[--navigation-menu-vertical-item-pl:--spacing(16)]'\n )}\n {...props}\n />\n)\n","import { Root } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { useCallbackRef } from '../../utilities/hooks/useCallbackRef'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\n\ntype NavigationMenuVerticalAccordionContextValue = {\n triggerRef?: React.RefObject<HTMLElement | null>\n setTriggerRef?: (el: HTMLElement | null) => void | (() => void)\n}\nexport const NavigationMenuVerticalAccordionContext =\n React.createContext<NavigationMenuVerticalAccordionContextValue>({})\nconst NavigationMenuVerticalAccordionProvider = ({ children }) => {\n const [triggerRef, setTriggerRef] = useCallbackRef()\n const value = React.useMemo(\n () => ({ triggerRef, setTriggerRef }),\n [triggerRef, setTriggerRef]\n )\n return (\n <NavigationMenuVerticalAccordionContext value={value}>\n {children}\n </NavigationMenuVerticalAccordionContext>\n )\n}\n\ntype NavigationMenuVerticalAccordionProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof NavigationMenuVerticalItem>\nexport const NavigationMenuVerticalAccordion = ({\n defaultOpen,\n open,\n onOpenChange,\n disabled,\n ...rest\n}: NavigationMenuVerticalAccordionProps) => {\n const collapsibleProps = { defaultOpen, open, onOpenChange, disabled }\n return (\n <NavigationMenuVerticalAccordionProvider>\n <Root {...collapsibleProps} asChild>\n <NavigationMenuVerticalItem {...rest} />\n </Root>\n </NavigationMenuVerticalAccordionProvider>\n )\n}\n","import { List } from '@radix-ui/react-navigation-menu'\n\nimport { styled } from '../../styled'\n\nconst StyledList = styled(List, {\n base: [\n '[--navigation-menu-vertical-item-pl:--spacing(4)]',\n '*:not-first:mt-0.5'\n ]\n})\n\nexport const NavigationMenuVerticalList = StyledList\n","import { Content } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { NavigationMenuVerticalAccordionContext } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalList } from './NavigationMenuVerticalList'\n\nconst StyledNavigationMenuVerticalAccordionContent = Content\n\ntype NavigationMenuVerticalAccordionContentProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalAccordionContent\n> &\n React.ComponentProps<typeof NavigationMenuVerticalList>\n\nexport const NavigationMenuVerticalAccordionContent = ({\n children,\n ...rest\n}: NavigationMenuVerticalAccordionContentProps) => {\n const { triggerRef } = React.use(NavigationMenuVerticalAccordionContext)\n\n const handleOnKeydown = (e) => {\n if (!triggerRef?.current) return\n if (e.key === 'Escape') {\n e.stopPropagation()\n e.preventDefault()\n triggerRef.current.focus()\n triggerRef.current.click()\n }\n }\n\n return (\n <StyledNavigationMenuVerticalAccordionContent\n onKeyDown={handleOnKeydown}\n {...rest}\n >\n <NavigationMenuVerticalList>{children}</NavigationMenuVerticalList>\n </StyledNavigationMenuVerticalAccordionContent>\n )\n}\n","export const navigationMenuVerticalItemStyles = [\n '[--navigation-menu-vertical-item-font-weight:400]',\n 'data-[state=open]:[--navigation-menu-vertical-item-font-weight:600]',\n 'border-none',\n 'outline-none',\n 'bg-none',\n 'decoration-[inherit]',\n 'cursor-pointer',\n 'rounded-md',\n 'flex',\n 'items-center',\n 'p-2',\n 'pl-(--navigation-menu-vertical-item-pl)',\n 'w-full',\n 'text-(--text)',\n 'bg-(--background)',\n 'disabled:cursor-not-allowed',\n '[text-decoration:unset]',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--background-active)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--background-hover)',\n 'data-active:bg-(--background-selected)',\n 'data-active:text-(--text-selected)',\n 'data-active:[--navigation-menu-vertical-item-font-weight:600]'\n]\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\n\nconst StyledNavigationMenuVerticalIcon = styled(Icon, {\n base: ['self-start']\n})\n\nexport const NavigationMenuVerticalIcon = (\n props: React.ComponentProps<typeof StyledNavigationMenuVerticalIcon>\n) => <StyledNavigationMenuVerticalIcon size=\"md\" {...props} />\n","import * as React from 'react'\n\nexport const SideBarContext = React.createContext<{\n isExpanded?: boolean\n}>({\n isExpanded: undefined\n})\n\nexport const useSidebarState = () => React.use(SideBarContext)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useSidebarState } from '../side-bar/SideBar.context'\nimport { Text } from '../text/Text'\n\nconst StyledNavigationMenuVerticalText = styled(Text, {\n base: [\n 'font-(--navigation-menu-vertical-item-font-weight)',\n 'w-max',\n 'max-w-40',\n 'text-left',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[opacity,translate]'\n ],\n variants: {\n isExpanded: {\n true: ['opacity-100', 'motion-safe:translate-0'],\n false: ['opacity-0', 'motion-safe:translate-x-2']\n }\n }\n})\n\ntype StyledNavigationMenuVerticalTextProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalText\n>\n\nexport const NavigationMenuVerticalText = (\n props: StyledNavigationMenuVerticalTextProps\n) => {\n const { isExpanded } = useSidebarState()\n\n return (\n <StyledNavigationMenuVerticalText\n size=\"md\"\n as=\"span\"\n {...props}\n isExpanded={isExpanded}\n />\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { NavigationMenuVerticalIcon } from './NavigationMenuVerticalIcon'\nimport { NavigationMenuVerticalText } from './NavigationMenuVerticalText'\n\ntype NavigationMenuVerticalItemContentProps = React.ComponentProps<'div'>\n\nexport const NavigationMenuVerticalItemContent = ({\n children,\n className,\n ...rest\n}: NavigationMenuVerticalItemContentProps) => (\n <div className={cn('flex', 'gap-2', 'items-center', className)} {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return (\n <NavigationMenuVerticalText>{child}</NavigationMenuVerticalText>\n )\n }\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n ) &&\n child.type === Icon\n ) {\n return <NavigationMenuVerticalIcon {...child.props} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </div>\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-collapsible'\nimport { Link } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalAccordionContext } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalAccordionTrigger = styled(Trigger, {\n base: navigationMenuVerticalItemStyles,\n variants: {\n size: {\n md: ['min-h-10'],\n lg: ['min-h-12']\n }\n }\n})\n\nconst StyledIcon = styled(Icon, {\n base: [\n 'transition-transform',\n 'duration-300',\n '[[data-state=open]>&]:rotate-180'\n ]\n})\n\ntype NavigationMenuAccordionTriggerProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalAccordionTrigger\n>\n\nexport const NavigationMenuVerticalAccordionTrigger = ({\n children,\n ...rest\n}: NavigationMenuAccordionTriggerProps) => {\n const { setTriggerRef } = React.use(NavigationMenuVerticalAccordionContext)\n\n return (\n <Link asChild>\n <StyledNavigationMenuVerticalAccordionTrigger size=\"lg\" {...rest} asChild>\n <button\n type=\"button\"\n className=\"flex items-center justify-between gap-3\"\n ref={setTriggerRef}\n >\n <NavigationMenuVerticalItemContent>\n {children}\n </NavigationMenuVerticalItemContent>\n <StyledIcon size=\"sm\" is={ChevronDown} />\n </button>\n </StyledNavigationMenuVerticalAccordionTrigger>\n </Link>\n )\n}\n","import { Link } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { preventEvent } from '../../utilities/event/preventEvent'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalLink = styled(Link, {\n base: navigationMenuVerticalItemStyles,\n variants: {\n size: {\n md: ['min-h-10'],\n lg: ['min-h-12']\n }\n }\n})\n\ntype NavigationMenuVerticalItemProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalLink\n> & { reloadDocument?: boolean }\n\nexport const NavigationMenuVerticalLink = ({\n as,\n href,\n children,\n reloadDocument,\n ...rest\n}: NavigationMenuVerticalItemProps) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n const Component = as || routerLinkProps.as || (href ? 'a' : 'button')\n const componentProps =\n as || routerLinkProps.as\n ? {}\n : href\n ? getExternalAnchorProps(href)\n : { type: 'button' }\n\n return (\n <NavigationMenuVerticalItem>\n <StyledNavigationMenuVerticalLink\n size=\"lg\"\n href={href}\n {...rest}\n {...componentProps}\n onSelect={preventEvent}\n asChild // ?: Can't use `as` for this as we lose `data-active` etc. attributes when we try to. Using `asChild` and `Component` as a workaround.\n >\n <Component>\n <NavigationMenuVerticalItemContent>\n {children}\n </NavigationMenuVerticalItemContent>\n </Component>\n </StyledNavigationMenuVerticalLink>\n </NavigationMenuVerticalItem>\n )\n}\n","import { Root } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled, Theme } from '../../styled'\nimport { colorSchemes as navigationMenuVerticalColorSchemes } from './NavigationMenuVertical.colorscheme.config'\nimport { NavigationMenuVerticalAccordion } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalAccordionContent } from './NavigationMenuVerticalAccordionContent'\nimport { NavigationMenuVerticalAccordionTrigger } from './NavigationMenuVerticalAccordionTrigger'\nimport { NavigationMenuVerticalIcon } from './NavigationMenuVerticalIcon'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\nimport { NavigationMenuVerticalLink } from './NavigationMenuVerticalLink'\nimport { NavigationMenuVerticalList } from './NavigationMenuVerticalList'\nimport { NavigationMenuVerticalText } from './NavigationMenuVerticalText'\n\nconst StyledRoot = styled(Root, {\n base: ['w-full']\n})\n\n/*\n * (!)\n * NavigationMenu vertical behaviour was buggy so had to build the\n * opening/closing nested Content(Accordion) based on `Collapsible` instead.\n * This means that the below `value` based props and `Trigger`/`Content`\n * animations do nothing, so removing them from typescript\n */\ntype NavigationVerticalProps = Omit<\n React.ComponentProps<typeof StyledRoot>,\n | 'delayDuration'\n | 'skipDelayDuration'\n | 'defaultValue'\n | 'value'\n | 'onValueChange'\n>\n\nexport const NavigationMenuVertical = /* @__PURE__ */ Object.assign(\n ({ children, ...rest }: NavigationVerticalProps) => (\n <Theme theme={navigationMenuVerticalColorSchemes['light']}>\n <StyledRoot {...rest} orientation=\"vertical\">\n <NavigationMenuVerticalList>{children}</NavigationMenuVerticalList>\n </StyledRoot>\n </Theme>\n ),\n {\n Link: NavigationMenuVerticalLink,\n Accordion: NavigationMenuVerticalAccordion,\n AccordionContent: NavigationMenuVerticalAccordionContent,\n AccordionTrigger: NavigationMenuVerticalAccordionTrigger,\n Item: NavigationMenuVerticalItem,\n ItemContent: NavigationMenuVerticalItemContent,\n Icon: NavigationMenuVerticalIcon,\n Text: NavigationMenuVerticalText\n }\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Badge } from '../badge/Badge'\nimport { Icon } from '../icon/Icon'\n\nconst StyledBadge = styled(Badge, {\n base: [\n 'font-body',\n 'text-sm',\n 'flex-row',\n 'justify-center',\n 'absolute',\n 'top-0',\n 'right-0',\n 'translate-x-3',\n '-translate-y-1/2',\n 'rounded-full',\n 'h-6',\n 'min-w-6',\n 'text-center'\n ]\n})\n\ntype BadgeProps = React.ComponentProps<typeof Badge>\n\ntype NotificationBadgeProps = {\n value: number | string\n emphasis?: BadgeProps['emphasis']\n theme?: BadgeProps['theme']\n icon?: React.FC<React.SVGProps<SVGSVGElement>>\n}\n\nexport const NotificationBadge = ({\n value,\n emphasis = 'bold',\n theme = 'primary',\n icon,\n children\n}: React.PropsWithChildren<NotificationBadgeProps>) => (\n <div className=\"relative\">\n {!!value && (\n <StyledBadge role=\"status\" emphasis={emphasis} theme={theme}>\n {icon && <Icon is={icon} role=\"img\" aria-hidden=\"false\" />}\n {value}\n </StyledBadge>\n )}\n {children}\n </div>\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Tooltip } from '../tooltip/Tooltip'\n\nconst StyledStepperButton = styled(ActionIcon, {\n base: [\n 'rounded-md',\n 'z-1',\n 'h-full!',\n 'hover:[&_svg]:text-grey-800',\n 'hover:bg-grey-100',\n '[&_svg]:text-grey-700',\n 'active:[&_svg]:text-grey-900',\n 'active:bg-grey-200',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n fieldAppearance: {\n standard: ['bg-white', 'border-grey-800!'],\n modern: ['bg-grey-100', 'border-grey-100!', 'hover:bg-grey-200!']\n },\n fieldTheme: {\n white: [],\n grey: []\n },\n emphasis: {\n bold: [\n '[&_svg]:text-primary-700',\n 'hover:bg-primary-100!',\n 'hover:[&_svg]:text-primary-800!',\n 'active:bg-primary-200!',\n 'active:[&_svg]:text-primary-900!'\n ]\n }\n },\n compoundVariants: [\n {\n fieldAppearance: 'modern',\n fieldTheme: 'white',\n class: ['bg-white']\n },\n {\n fieldAppearance: 'standard',\n emphasis: 'bold',\n class: ['bg-white', 'border-primary-800!']\n },\n {\n fieldAppearance: 'modern',\n emphasis: 'bold',\n class: ['bg-white!', 'hover:bg-primary-100!']\n }\n ]\n})\n\ntype NumberInputStepperProps = Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'children'\n> &\n Omit<React.ComponentProps<typeof StyledStepperButton>, 'children'> & {\n icon: React.FC<React.SVGProps<SVGSVGElement>>\n showTooltip?: boolean\n disabledTooltipContent?: string\n }\n\nexport const NumberInputStepper = ({\n ref,\n icon,\n disabledTooltipContent,\n showTooltip,\n fieldAppearance = 'standard',\n fieldTheme,\n ...rest\n}: NumberInputStepperProps) => {\n /**\n * Focus has been removed from the button\n * as the increment and decrement buttons should be keyboard accessible via arrow keys.\n * see MDN docs https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/spinbutton_role\n */\n return (\n <Tooltip>\n <Tooltip.Trigger asChild>\n <span className=\"z-1\" tabIndex={-1}>\n <StyledStepperButton\n hasTooltip={false}\n tabIndex={-1}\n appearance=\"outline\"\n fieldAppearance={fieldAppearance}\n fieldTheme={fieldTheme}\n ref={ref}\n {...rest}\n >\n <Icon is={icon} />\n </StyledStepperButton>\n </span>\n </Tooltip.Trigger>\n {showTooltip && (\n <Tooltip.Content>{disabledTooltipContent}</Tooltip.Content>\n )}\n </Tooltip>\n )\n}\n","import { Minus, Plus } from '@atom-learning/icons'\nimport { useComposedRefs } from '@radix-ui/react-compose-refs'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { Input } from '../input/Input'\nimport { NumberInputStepper } from './NumberInputStepper'\n\nexport interface NumberInputProps {\n name: string\n min?: number\n max?: number\n step?: number\n value?: number\n defaultValue?: number\n disabled?: boolean\n readonly?: boolean\n size?: 'sm' | 'md' | 'lg'\n appearance?: 'standard' | 'modern'\n theme?: 'white' | 'grey'\n emphasis?: 'bold'\n onValueChange?: (value: number) => void\n stepperButtonLabels?: { increment?: string; decrement?: string }\n disabledTooltipContent?: { increment?: string; decrement?: string }\n className?: string\n}\n\nconst NumberInputContainer = styled('div', {\n base: ['flex'],\n variants: {\n appearance: {\n standard: [],\n modern: ['gap-px']\n },\n emphasis: {\n bold: ['gap-0']\n }\n }\n})\n\nexport const NumberInput = ({\n ref,\n value,\n defaultValue = 0,\n onValueChange,\n min = 0,\n max = Number.MAX_SAFE_INTEGER,\n step = 1,\n disabled: isDisabled = false,\n readonly: isReadOnly = false,\n size = 'md',\n stepperButtonLabels: stepperButtonLabelsProp,\n disabledTooltipContent: disabledTooltipContentProp,\n className,\n appearance = 'standard',\n theme,\n emphasis,\n ...rest\n}: NumberInputProps & {\n ref?: React.Ref<HTMLInputElement>\n}) => {\n // `?? defaultValue` (not `||`): a controlled `value={0}` is a value, not\n // an absence. `currentValue` is derived during render — mirroring the prop\n // into state via an effect would paint one stale frame per update.\n const [internalValue, setInternalValue] = React.useState<number>(\n value ?? defaultValue\n )\n const currentValue = value ?? internalValue\n\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n const composedInputRef = useComposedRefs(ref, inputRef)\n\n const iconSize = getFieldIconSize(size)\n\n const stepperButtonLabels = {\n increment: 'increment',\n decrement: 'decrement',\n ...stepperButtonLabelsProp\n }\n\n const disabledTooltipContent = {\n decrement: `Cannot enter values below ${min}`,\n increment: `Cannot enter values above ${max}`,\n ...disabledTooltipContentProp\n }\n\n const isAtMax = currentValue >= max\n const isAtMin = currentValue <= min\n\n const clamp = React.useCallback(\n (internalValue: number) => Math.min(Math.max(internalValue, min), max),\n [max, min]\n )\n\n const updateValue = React.useCallback(\n (newValue: number) => {\n onValueChange?.(newValue)\n setInternalValue(newValue)\n },\n [onValueChange]\n )\n\n const onInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const parsedValue = Number(event.target.value.replace(/\\D/g, ''))\n updateValue(parsedValue)\n },\n [updateValue]\n )\n\n const increment = React.useCallback(() => {\n if (isAtMax || isReadOnly) return\n inputRef?.current?.focus()\n const newValue = Number(currentValue) + step\n updateValue(clamp(newValue))\n }, [clamp, isAtMax, isReadOnly, step, updateValue, currentValue])\n\n const decrement = React.useCallback(() => {\n if (isAtMin || isReadOnly) return\n inputRef?.current?.focus()\n const newValue = Number(currentValue) - step\n updateValue(clamp(newValue))\n }, [clamp, isAtMin, isReadOnly, min, step, updateValue, currentValue])\n\n const onKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.nativeEvent.isComposing) return\n\n /**\n * Keyboard Accessibility\n *\n * We want to increase or decrease the input's value\n * based on if the user the arrow keys.\n *\n * @see https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard-interaction-17\n */\n const eventKey = event.key\n\n const keyMap: Record<string, React.KeyboardEventHandler> = {\n ArrowUp: increment,\n ArrowRight: increment,\n ArrowDown: decrement,\n ArrowLeft: decrement,\n Home: () => updateValue(min),\n End: () => updateValue(max)\n }\n\n const action = keyMap[eventKey]\n\n if (action) {\n event.preventDefault()\n action(event)\n }\n },\n [increment, decrement, updateValue, min, max]\n )\n\n const hasError = currentValue < min || currentValue > max\n const {\n state: externalState,\n 'aria-invalid': externalAriaInvalid,\n ...restProps\n } = rest as { state?: 'error'; 'aria-invalid'?: boolean } & typeof rest\n\n const inputProps: React.ComponentProps<typeof Input> = {\n type: 'number',\n value: currentValue,\n ...restProps,\n onChange: onInputChange,\n onKeyDown,\n size,\n appearance,\n theme,\n state: externalState || (hasError ? 'error' : undefined),\n 'aria-invalid': externalAriaInvalid || hasError || undefined,\n className: cn(\n 'rounded-none',\n 'w-16',\n '[&_>_input]:text-center',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none',\n emphasis === 'bold' && [\n 'rounded-1',\n '[&_>_input[aria-invalid=true]]:text-danger',\n 'focus-within:[&_>_input]:text-grey-1000'\n ],\n emphasis === 'bold' &&\n appearance === 'standard' && [\n 'border-none',\n '[&:has([aria-invalid=true])]:border-2',\n '[&:has([aria-invalid=true])]:border-danger',\n 'focus-within:border-2',\n 'focus-within:border-blue-800'\n ]\n ),\n ref: composedInputRef,\n readOnly: isReadOnly,\n disabled: isDisabled,\n 'aria-valuemin': min,\n 'aria-valuemax': max,\n 'aria-valuenow': currentValue,\n role: 'spinbutton'\n }\n\n return (\n <NumberInputContainer\n appearance={appearance}\n emphasis={emphasis}\n className={className}\n >\n <NumberInputStepper\n onClick={decrement}\n icon={Minus}\n className={cn(\n emphasis !== 'bold' && ['border-r-none', 'rounded-r-none']\n )}\n size={iconSize}\n fieldAppearance={appearance}\n fieldTheme={theme}\n emphasis={emphasis}\n disabled={isAtMin || isDisabled}\n showTooltip={isAtMin && !isDisabled}\n disabledTooltipContent={disabledTooltipContent.decrement}\n label={stepperButtonLabels.decrement}\n />\n <Input {...inputProps} />\n <NumberInputStepper\n onClick={increment}\n icon={Plus}\n className={cn(\n emphasis !== 'bold' && ['border-l-none', 'rounded-l-none']\n )}\n size={iconSize}\n fieldAppearance={appearance}\n fieldTheme={theme}\n emphasis={emphasis}\n disabled={isAtMax || isDisabled}\n showTooltip={isAtMax && !isDisabled}\n disabledTooltipContent={disabledTooltipContent.increment}\n label={stepperButtonLabels.increment}\n />\n </NumberInputContainer>\n )\n}\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { FieldWrapper } from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport type { ValidationOptions } from '../form/validation'\nimport type { NumberInputProps } from '../number-input/NumberInput'\nimport { NumberInput } from '../number-input/NumberInput'\n\nexport interface NumberInputFieldProps extends NumberInputProps {\n className?: string\n hideLabel?: boolean\n description?: string\n label: string\n name: string\n prompt?: { link: string; label: string }\n validation?: ValidationOptions\n}\n\nexport const NumberInputField = ({\n className,\n defaultValue = 0,\n hideLabel,\n value,\n prompt,\n description,\n label,\n name,\n validation,\n onValueChange,\n appearance,\n theme,\n ...rest\n}: NumberInputFieldProps) => {\n const { control, setValue } = useFormContext()\n const context = useFormCustomContext()\n const {\n field: { ref, onChange, value: innerValue, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n const { error } = useFieldError(name)\n\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n React.useEffect(() => {\n // Sync an externally-controlled `value` into react-hook-form without\n // marking the field dirty/touched — this isn't user input.\n if (typeof value !== 'undefined')\n setValue(name, value, { shouldDirty: false })\n }, [value, name, setValue])\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <NumberInput\n id={name}\n name={innerName}\n ref={ref}\n {...(error && { state: 'error', 'aria-invalid': true })}\n defaultValue={defaultValue}\n onValueChange={(newValue) => {\n onChange(newValue)\n onValueChange?.(newValue)\n }}\n value={innerValue}\n appearance={formAppearance}\n theme={formTheme}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nNumberInputField.displayName = 'NumberInputField'\n","import * as Progress from '@radix-ui/react-progress'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledProgressBar = styled(\n Progress.Root,\n {\n base: [\n 'rounded-full',\n 'bg-grey-200',\n 'relative',\n 'overflow-hidden',\n 'w-full'\n ],\n variants: {\n size: {\n sm: ['h-1'],\n md: ['h-2']\n },\n theme: {\n primary: ['text-primary-800'],\n info: ['text-info'],\n success: ['text-success'],\n warning: ['text-warning'],\n danger: ['text-danger'],\n neutral: ['bg-grey-400', 'text-grey-800']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nconst StyledIndicator = styled(Progress.Indicator, {\n base: [\n 'bg-current',\n 'rounded-full',\n 'box-border',\n 'h-full',\n 'absolute',\n 'transition-all',\n 'duration-300',\n 'ease-out'\n ]\n})\n\ntype ProgressBarProps = React.ComponentPropsWithoutRef<\n typeof StyledProgressBar\n> &\n (\n | { id: string; 'aria-label'?: string }\n | { 'aria-label': string; id?: string }\n )\n\nexport const ProgressBar = ({\n value,\n max = 100,\n size = 'md',\n theme = 'primary',\n ...rest\n}: ProgressBarProps) => (\n <StyledProgressBar\n value={value}\n max={max}\n theme={theme}\n size={size}\n {...rest}\n >\n <StyledIndicator\n className=\"w-full translate-x-(--progress)\"\n style={{\n '--progress': `-${100 - ((value || 0) / max) * 100}%`\n }}\n />\n </StyledProgressBar>\n)\n\nProgressBar.displayName = 'ProgressBar'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\n\nimport { styled } from '../../styled'\n\nexport const RadioButtonGroup = styled(\n RadioGroup.Root,\n {\n base: ['flex', 'flex-wrap'],\n variants: {\n direction: {\n row: ['*:not-last:mr-8', 'flex-row'],\n column: ['flex-col']\n }\n }\n },\n { enablePolymorphism: false }\n)\n\nRadioButtonGroup.displayName = 'RadioButtonGroup'\n","import * as React from 'react'\n\nimport { InlineFieldWrapper } from '../field-wrapper/InlineFieldWrapper'\nimport type { ValidationOptions } from '../form/validation'\nimport { RadioButton } from '../radio-button/RadioButton'\n\ntype RadioFieldProps = {\n className?: string\n defaultChecked?: boolean\n error?: string\n label: string\n validation?: ValidationOptions\n} & React.ComponentProps<typeof RadioButton>\n\nexport const RadioField = ({\n className,\n label,\n value,\n ...rest\n}: RadioFieldProps) => (\n <InlineFieldWrapper className={className} label={label}>\n <RadioButton value={value} {...rest} />\n </InlineFieldWrapper>\n)\n\nRadioField.displayName = 'RadioField'\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { styled } from '../../styled'\nimport { Description as FieldDescription } from '../field-wrapper/FieldDescription'\nimport type { FieldElementWrapperProps } from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { Label } from '../label/Label'\nimport { RadioButtonGroup } from '../radio-button/RadioButtonGroup'\nimport { RadioField } from './RadioField'\n\nconst Fieldset = styled('fieldset', {\n base: ['border-0', 'p-0', 'm-0', 'min-w-0']\n})\n\ntype RadioButtonFieldProps = React.ComponentProps<typeof RadioButtonGroup> &\n FieldElementWrapperProps\n\nconst RadioButtonFieldComponent = ({\n children,\n className,\n direction = 'column',\n defaultValue,\n value,\n description,\n label,\n name,\n validation,\n onValueChange,\n ...rest\n}: RadioButtonFieldProps) => {\n const { control, setValue } = useFormContext()\n const {\n field: { ref, onChange, value: innerValue }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n const { error } = useFieldError(name)\n\n React.useEffect(() => {\n // Sync an externally-controlled `value` into react-hook-form without\n // marking the field dirty/touched — this isn't user input.\n if (typeof value !== 'undefined')\n setValue(name, value, { shouldDirty: false })\n }, [value, name, setValue])\n\n return (\n <Fieldset className={className}>\n <Label\n as=\"legend\"\n required={Boolean(validation?.required)}\n className=\"mb-3 p-0\"\n >\n {label}\n </Label>\n {description && (\n <FieldDescription className=\"mb-3\">{description}</FieldDescription>\n )}\n\n <RadioButtonGroup\n ref={ref}\n direction={direction}\n defaultValue={defaultValue}\n onValueChange={(newValue) => {\n onChange(newValue)\n onValueChange?.(newValue)\n }}\n value={innerValue}\n {...rest}\n >\n {children}\n </RadioButtonGroup>\n\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n </Fieldset>\n )\n}\n\nexport const RadioButtonField = /* @__PURE__ */ Object.assign(\n RadioButtonFieldComponent,\n {\n Item: RadioField\n }\n)\n\nRadioButtonFieldComponent.displayName = 'RadioButtonField'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledRadioCard = styled(RadioGroup.Item, {\n base: [\n 'items-center',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'rounded-sm',\n 'cursor-pointer',\n 'flex',\n 'text-left',\n 'data-[state=checked]:-outline-offset-2',\n 'data-[state=checked]:outline-2',\n 'data-[state=checked]:outline-primary-800',\n 'data-[state=checked]:outline-solid'\n ],\n variants: {\n align: {\n left: ['flex-row'],\n right: ['flex-row-reverse']\n },\n size: {\n md: ['px-4', 'py-3'],\n lg: ['px-8', 'py-4']\n },\n isFullWidth: {\n true: ['w-full'],\n false: ['w-max']\n }\n }\n})\n\nconst RadioButton = styled('div', {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-transparent',\n 'border',\n 'border-grey-900',\n 'rounded-full',\n 'flex',\n 'shrink-0',\n 'justify-center',\n 'p-0',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'in-data-[state=checked]:bg-primary-800',\n 'in-data-[state=checked]:border-primary-800'\n ],\n variants: {\n containerIsFullWidth: {\n true: [],\n false: []\n },\n align: {\n left: ['mr-4'],\n right: []\n }\n },\n compoundVariants: [\n {\n containerIsFullWidth: true,\n align: 'right',\n class: ['ml-auto']\n },\n {\n containerIsFullWidth: false,\n align: 'right',\n class: ['ml-4']\n }\n ]\n})\n\nconst Indicator = styled(RadioGroup.Indicator, {\n base: ['bg-white', 'rounded-full', 'absolute', 'size-1.5']\n})\n\ntype RadioCardProps = React.ComponentProps<typeof StyledRadioCard>\n\nexport const RadioCard = ({\n children,\n isFullWidth = false,\n size = 'md',\n align = 'left',\n ...rest\n}: RadioCardProps) => (\n <StyledRadioCard\n {...rest}\n align={align}\n isFullWidth={isFullWidth}\n size={size}\n >\n <RadioButton align={align} containerIsFullWidth={isFullWidth}>\n <Indicator />\n </RadioButton>\n <div>{children}</div>\n </StyledRadioCard>\n)\n","import { RouterProvider } from './RouterProvider'\n\n// The router integration lives under the `Router` name; there is no root\n// component to render, only the context provider. This compound must live in\n// its own module, not the components barrel — a value declared in the barrel\n// forces the root barrel's `export *` to pull the whole barrel (all components)\n// into the eager entry chunk instead of resolving each export to its individual\n// module.\nexport const Router = { Provider: RouterProvider }\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { RadioCard } from './RadioCard'\n\ntype RadioCardGroupProps = Override<\n React.ComponentProps<typeof RadioCard>,\n React.ComponentProps<typeof RadioGroup.Root>\n>\n\nexport const RadioCardGroup = ({\n className,\n children,\n size,\n isFullWidth,\n align,\n ...rest\n}: RadioCardGroupProps) => (\n <RadioGroup.Root {...rest}>\n <div className={cn('flex', 'flex-row', 'flex-wrap', 'gap-3', className)}>\n {React.Children.map(children, (child) => {\n if (React.isValidElement(child) && child?.type === RadioCard) {\n return React.cloneElement(\n child as React.ReactElement<React.ComponentProps<typeof RadioCard>>,\n { size, isFullWidth, align }\n )\n }\n return child\n })}\n </div>\n </RadioGroup.Root>\n)\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { SearchInput, type SearchInputProps } from '../search-input/SearchInput'\n\ntype SearchFieldProps = SearchInputProps & FieldElementWrapperProps\n\nexport const SearchField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: SearchFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <SearchInput\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nSearchField.displayName = 'SearchField'\n","import * as React from 'react'\n\nimport type { SectionMessageTheme } from './SectionMessage'\n\nexport type SectionMessageContextValue = {\n theme: SectionMessageTheme\n hasIcon: boolean\n setHasIcon: React.Dispatch<React.SetStateAction<boolean>>\n hasDismiss: boolean\n setHasDismiss: React.Dispatch<React.SetStateAction<boolean>>\n}\nexport type SectionMessageProviderProps = {\n theme: SectionMessageTheme\n children: React.ReactNode\n}\n\nexport const SectionMessageContext =\n React.createContext<SectionMessageContextValue | null>(null)\n\nexport const SectionMessageProvider = ({\n theme = 'info',\n children\n}: SectionMessageProviderProps) => {\n const [hasIcon, setHasIcon] = React.useState(false)\n const [hasDismiss, setHasDismiss] = React.useState(false)\n\n const value = React.useMemo<SectionMessageContextValue>(\n () => ({ theme, hasIcon, setHasIcon, hasDismiss, setHasDismiss }),\n [theme, hasIcon, setHasIcon, hasDismiss, setHasDismiss]\n )\n\n return <SectionMessageContext value={value}>{children}</SectionMessageContext>\n}\n\nexport const useSectionMessageContext = (): SectionMessageContextValue => {\n const context = React.use(SectionMessageContext)\n\n if (!context) {\n throw new Error(\n 'useSectionMessageContext must be used within a SectionMessageProvider'\n )\n }\n\n return context\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\nexport const SectionMessageDescription = ({\n className,\n ...rest\n}: React.ComponentProps<typeof Text>) => (\n <Text size=\"sm\" {...rest} className={cn('text-grey-900', className)} />\n)\n","import { Close } from '@atom-learning/icons'\nimport React, { useEffect } from 'react'\n\nimport { cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Dismissible } from '../dismissible'\nimport { Icon } from '../icon/Icon'\nimport { useSectionMessageContext } from './SectionMessage.context'\n\nexport const SectionMessageDismiss = ({\n label = 'Dismiss',\n className,\n ...rest\n}: React.ComponentProps<typeof ActionIcon>) => {\n const { setHasDismiss } = useSectionMessageContext()\n\n useEffect(() => {\n setHasDismiss(true)\n return () => setHasDismiss(false)\n }, [setHasDismiss])\n\n return (\n <Dismissible.Trigger asChild>\n <ActionIcon\n label={label}\n size=\"sm\"\n appearance=\"simple\"\n theme=\"neutral\"\n {...rest}\n className={cn('m-auto', 'absolute', 'top-2', 'right-2', className)}\n >\n <Icon is={Close} />\n </ActionIcon>\n </Dismissible.Trigger>\n )\n}\n","import { Danger, Error, Info, OkCircle } from '@atom-learning/icons'\nimport React, { useEffect } from 'react'\n\nimport { cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useSectionMessageContext } from './SectionMessage.context'\n\nconst themeIcons = {\n success: OkCircle,\n warning: Danger,\n error: Error,\n neutral: Info,\n info: Info\n}\n\ntype SectionMessageIconProps = Partial<React.ComponentProps<typeof Icon>>\n\nexport const SectionMessageIcon = ({\n className,\n is,\n ...rest\n}: SectionMessageIconProps) => {\n const { theme, setHasIcon } = useSectionMessageContext()\n\n useEffect(() => {\n setHasIcon(true)\n return () => setHasIcon(false)\n }, [setHasIcon])\n\n return (\n <Icon\n is={is || themeIcons[theme]}\n size=\"sm\"\n {...rest}\n className={cn(\n 'm-auto',\n 'absolute',\n 'left-4',\n 'top-4',\n 'text-current',\n className\n )}\n />\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\n\nexport const SectionMessageContent = styled('div', {\n base: ['max-w-full', 'shrink-0', 'pt-0.5', '*:not-last:mb-2']\n})\n\nexport const SectionMessageActions = ({\n className,\n ...rest\n}: React.ComponentProps<'div'>) => (\n <div className={cn('max-w-full', 'shrink-0', className)}>\n <div className=\"flex flex-wrap gap-3\" {...rest} />\n </div>\n)\n","import * as React from 'react'\n\nimport { Text, type TextProps } from '../text/Text'\n\nexport const SectionMessageTitle = (props: TextProps) => (\n <Text size=\"md\" weight=\"bold\" {...props} />\n)\n","import { TooltipProvider } from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Dismissible } from '../dismissible'\nimport {\n SectionMessageProvider,\n useSectionMessageContext\n} from './SectionMessage.context'\nimport { SectionMessageDescription } from './SectionMessageDescription'\nimport { SectionMessageDismiss } from './SectionMessageDismiss'\nimport { SectionMessageIcon } from './SectionMessageIcon'\nimport {\n SectionMessageActions,\n SectionMessageContent\n} from './SectionMessageLayout'\nimport { SectionMessageTitle } from './SectionMessageTitle'\n\nconst StyledSectionMessage = styled(Dismissible, {\n base: [\n 'relative',\n 'rounded-md',\n 'flex',\n 'shrink-0',\n 'min-h-12',\n 'p-4',\n 'border',\n 'border-white'\n ],\n variants: {\n theme: {\n success: ['bg-success-light', 'text-success-dark'],\n warning: ['bg-warning-light', 'text-warning-text'],\n error: ['bg-danger-light', 'text-danger-dark'],\n neutral: ['bg-grey-100', 'text-grey-1000'],\n info: ['bg-info-light', 'text-info-dark']\n },\n hasIcon: {\n true: ['pl-10']\n },\n hasDismiss: {\n true: ['pr-12']\n }\n }\n})\n\nconst SectionMessageRoot = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledSectionMessage> & {\n className?: string\n}) => {\n const { theme, hasIcon, hasDismiss } = useSectionMessageContext()\n\n return (\n <StyledSectionMessage\n {...rest}\n theme={theme}\n hasIcon={hasIcon}\n hasDismiss={hasDismiss}\n >\n <div className=\"flex grow justify-between gap-3\">{children}</div>\n </StyledSectionMessage>\n )\n}\n\nexport type SectionMessageTheme =\n | 'success'\n | 'warning'\n | 'error'\n | 'neutral'\n | 'info'\n\nexport type SectionMessageProps = React.ComponentProps<\n typeof SectionMessageRoot\n> & {\n theme?: SectionMessageTheme\n}\n\nconst SectionMessageComponent = ({\n theme = 'info',\n ...rest\n}: SectionMessageProps) => (\n <TooltipProvider>\n <SectionMessageProvider theme={theme}>\n <SectionMessageRoot {...rest} />\n </SectionMessageProvider>\n </TooltipProvider>\n)\n\nexport const SectionMessage = /* @__PURE__ */ Object.assign(\n SectionMessageComponent,\n {\n Title: SectionMessageTitle,\n Description: SectionMessageDescription,\n Icon: SectionMessageIcon,\n Dismiss: SectionMessageDismiss,\n Content: SectionMessageContent,\n Actions: SectionMessageActions\n }\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nconst StyledSelect = styled(\n 'select',\n {\n base: [\n 'bg-(image:--bg-chevron)',\n 'appearance-none',\n '[background-repeat:no-repeat,repeat-x]',\n 'rounded-md',\n 'text-grey-1000',\n 'block',\n 'font-body',\n 'font-normal',\n 'leading-[1.4]',\n 'w-full',\n 'hover:cursor-pointer',\n '-ms-expand:hidden',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n '*[[disabled]]:opacity-30',\n '*[[disabled]]:cursor-not-allowed'\n ],\n variants: {\n size: {\n sm: [\n 'bg-position-[right_--spacing(2)_top_50%,0_0]',\n 'bg-size-[18px_auto,100%]',\n 'text-sm',\n 'h-8',\n 'pl-2',\n 'pr-8'\n ],\n md: [\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n 'bg-size-[20px_auto,100%]',\n 'text-md',\n 'h-10',\n 'pl-3',\n 'pr-10'\n ],\n lg: [\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n 'bg-size-[20px_auto,100%]',\n 'text-md',\n 'h-12',\n 'pl-3',\n 'pr-10'\n ]\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n },\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-700',\n 'focus:border-primary-800',\n 'focus:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus:outline-2',\n 'focus:outline-blue-800',\n 'focus:outline-offset-1',\n 'focus:outline-solid',\n 'focus:z-1'\n ]\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n },\n { enablePolymorphism: false, enableResponsiveVariants: true }\n)\n\nexport type SelectProps = Override<\n React.ComponentProps<typeof StyledSelect>,\n {\n placeholder?: string\n }\n // TODO: figure out why uncommenting this causes TS errors in\n // component declaration\n // & (\n // | { id: string; 'aria-label'?: string }\n // | { 'aria-label': string; id?: string }\n // )\n>\n\nexport const Select = ({\n ref,\n placeholder,\n children,\n size = 'md',\n appearance = 'standard',\n ...rest\n}: SelectProps) => {\n // Type assertion needed due to responsive variant size prop compatibility\n const props: React.ComponentProps<typeof StyledSelect> = {\n size,\n appearance,\n ref,\n ...rest\n }\n\n if ([rest.value, rest.defaultValue].every((value) => value === undefined)) {\n props.defaultValue = ''\n }\n\n return (\n <StyledSelect {...props}>\n {placeholder && (\n <option disabled hidden value=\"\">\n {placeholder}\n </option>\n )}\n {children}\n </StyledSelect>\n )\n}\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { Select, type SelectProps } from '../select/Select'\n\ntype SelectFieldProps = SelectProps & FieldElementWrapperProps\n\nexport const SelectField = ({\n className,\n hideLabel,\n children,\n name,\n label,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: SelectFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Select\n name={name}\n id={name}\n appearance={formAppearance}\n theme={formTheme}\n {...rest}\n ref={ref}\n {...(error && { state: 'error' })}\n >\n {children}\n </Select>\n </FieldWrapper>\n )\n}\n\nSelectField.displayName = 'SelectField'\n","import * as React from 'react'\n\ntype SelectMenuContextValue = {\n size: 'sm' | 'md' | 'lg'\n theme: 'white' | 'grey'\n state?: 'error'\n}\n\nexport const SelectMenuContext = React.createContext<SelectMenuContextValue>({\n size: 'md',\n theme: 'grey'\n})\n\nexport const useSelectMenuContext = () => React.use(SelectMenuContext)\n","import * as React from 'react'\nimport * as AriaComponents from 'react-aria-components'\n\nimport { styled } from '../../styled'\n\nconst Content = styled(\n AriaComponents.Popover,\n {\n base: [\n 'bg-white',\n 'rounded-md',\n 'shadow-lg',\n 'z-10',\n 'overflow-hidden',\n 'will-change-transform'\n ],\n variants: {\n matchTriggerWidth: {\n // Pinned to exactly the trigger width — the dropdown never grows or\n // shrinks to its content. The trigger is on-screen, so no viewport cap\n // is needed.\n true: ['w-(--trigger-width)'],\n // Floors at the trigger width; caps at min(viewport − 8px per edge,\n // 400px) on the --spacing() scale: --spacing(4)=16px (2×8px),\n // --spacing(100)=400px.\n false: [\n 'min-w-(--trigger-width)',\n 'max-w-[min(calc(100vw-(--spacing(4))),--spacing(100))]'\n ]\n }\n }\n },\n { enablePolymorphism: false }\n)\n\nconst Viewport = styled(\n AriaComponents.ListBox,\n {\n base: ['max-h-[inherit]', 'w-full', 'overflow-auto', 'p-1', 'outline-none']\n },\n { enablePolymorphism: false }\n)\n\ntype SelectMenuContentProps = Omit<\n React.ComponentPropsWithRef<typeof AriaComponents.Popover>,\n 'children'\n> & {\n children?: React.ReactNode\n /** Pins the dropdown to the trigger's width instead of letting it grow to fit its content. */\n matchTriggerWidth?: boolean\n}\n\nexport const SelectMenuContent = ({\n ref,\n children,\n offset = 4,\n matchTriggerWidth = false,\n ...rest\n}: SelectMenuContentProps) => (\n // offset/containerPadding are react-aria positioner props in px (JS numbers,\n // not CSS), so they can't use the --spacing() scale: 4px gap from the trigger,\n // 8px minimum inset from every viewport edge (the 2×8px behind the max-width).\n <Content\n ref={ref}\n offset={offset}\n containerPadding={8}\n matchTriggerWidth={matchTriggerWidth}\n {...rest}\n >\n <Viewport>{children}</Viewport>\n </Content>\n)\n","import { Ok } from '@atom-learning/icons'\nimport * as React from 'react'\nimport * as AriaComponents from 'react-aria-components'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useSelectMenuContext } from './SelectMenu.context'\n\nconst Item = styled(\n AriaComponents.ListBoxItem,\n {\n base: [\n 'relative',\n 'flex',\n 'items-center',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n // Explicit line-height so `sm` (text-sm) doesn't inherit Tailwind's tight\n // 1.25 ratio; keeps rows comfortable rather than cramped.\n 'leading-normal',\n 'cursor-pointer',\n 'rounded-sm',\n 'outline-none',\n 'data-[disabled]:cursor-not-allowed',\n 'data-[disabled]:opacity-30',\n // react-aria's data-hovered (pointer only, ignores touch) — not `hover:`,\n // whose :hover sticks after a tap on touchscreens (this menu targets\n // webviews). data-focused covers keyboard navigation; together they\n // replicate the old Radix data-highlighted.\n 'data-[hovered]:bg-grey-100',\n 'data-[focused]:bg-grey-100',\n 'data-[focus-visible]:outline-none'\n ],\n variants: {\n size: {\n sm: ['py-2', 'pl-7', 'pr-4', 'text-sm'],\n md: ['py-2.5', 'pl-8', 'pr-6'],\n lg: ['py-2.5', 'pl-8', 'pr-6']\n }\n }\n },\n { enablePolymorphism: false }\n)\n\ntype SelectMenuItemProps = Omit<AriaComponents.ListBoxItemProps, 'children'> & {\n children?: React.ReactNode\n}\n\nexport const SelectMenuItem = ({\n children,\n textValue,\n ...rest\n}: SelectMenuItemProps) => {\n const { size } = useSelectMenuContext()\n const resolvedTextValue =\n textValue ?? (typeof children === 'string' ? children : undefined)\n\n return (\n <Item size={size} textValue={resolvedTextValue} {...rest}>\n {({ isSelected }) => (\n <>\n <span className=\"absolute left-2 inline-flex items-center\">\n {isSelected && (\n <Icon is={Ok} className={size === 'sm' ? 'size-3' : 'size-4'} />\n )}\n </span>\n {children}\n </>\n )}\n </Item>\n )\n}\n","import * as React from 'react'\nimport * as AriaComponents from 'react-aria-components'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\ntype SelectMenuLabelProps = React.ComponentProps<typeof AriaComponents.Header>\n\nexport const SelectMenuLabel = ({\n className,\n ...rest\n}: SelectMenuLabelProps) => (\n <Text\n as={AriaComponents.Header}\n size=\"sm\"\n className={cn('p-2', 'mb-1', 'text-text-subtle', className)}\n {...rest}\n />\n)\n\nSelectMenuLabel.displayName = 'SelectMenuLabel'\n","import * as AriaComponents from 'react-aria-components'\n\nimport { styled } from '../../styled'\n\nexport const SelectMenuSeparator = styled(\n AriaComponents.Separator,\n {\n base: ['h-px', 'bg-grey-200', 'my-2', 'mx-1']\n },\n { enablePolymorphism: false }\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport * as React from 'react'\nimport * as AriaComponents from 'react-aria-components'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useSelectMenuContext } from './SelectMenu.context'\n\nconst Trigger = styled(\n AriaComponents.Button,\n {\n base: [\n 'appearance-none',\n 'rounded-md',\n 'block',\n 'w-full',\n 'font-body',\n 'font-normal',\n 'leading-[1.4]',\n 'text-grey-1000',\n 'text-left',\n 'relative',\n 'inline-flex',\n 'items-center',\n 'border-none',\n 'hover:cursor-pointer',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'data-[focus-visible]:outline-2',\n 'data-[focus-visible]:outline-blue-800',\n 'data-[focus-visible]:outline-offset-1',\n 'data-[focus-visible]:outline-solid',\n 'data-[focus-visible]:z-1'\n ],\n variants: {\n size: {\n sm: ['h-8', 'pl-2', 'pr-8', 'text-sm'],\n md: ['h-10', 'pl-3', 'pr-10', 'text-md'],\n lg: ['h-12', 'pl-3', 'pr-10', 'text-md']\n },\n theme: {\n white: ['bg-white'],\n grey: ['bg-grey-100']\n },\n state: {\n error: ['bg-danger-light', 'data-[focus-visible]:outline-danger']\n }\n }\n },\n { enablePolymorphism: false }\n)\n\nconst TriggerIcon = styled(Icon, {\n base: [\n 'absolute',\n 'top-1/2',\n '-translate-y-1/2',\n 'pointer-events-none',\n 'text-grey-700'\n ],\n variants: {\n size: {\n sm: ['right-2', 'size-4'],\n md: ['right-3', 'size-5'],\n lg: ['right-3', 'size-5']\n }\n }\n})\n\n// Label the SelectMenu via aria-label/aria-labelledby on the root <SelectMenu>,\n// not here — react-aria computes the trigger's accessible name from the root\n// Select's label props, so labels placed on the trigger are ignored.\ntype SelectMenuTriggerProps = Omit<\n React.ComponentPropsWithRef<typeof AriaComponents.Button>,\n 'children' | 'aria-label' | 'aria-labelledby'\n> & {\n placeholder?: string\n children?: React.ReactNode\n}\n\nexport const SelectMenuTrigger = ({\n ref,\n placeholder,\n children,\n ...rest\n}: SelectMenuTriggerProps) => {\n const { size, theme, state } = useSelectMenuContext()\n\n return (\n <Trigger ref={ref} size={size} theme={theme} state={state} {...rest}>\n <AriaComponents.SelectValue className=\"truncate\">\n {({ isPlaceholder, selectedText }) =>\n isPlaceholder ? (placeholder ?? '') : (children ?? selectedText)\n }\n </AriaComponents.SelectValue>\n <TriggerIcon is={ChevronDown} size={size} />\n </Trigger>\n )\n}\n","import * as React from 'react'\nimport * as AriaComponents from 'react-aria-components'\n\nimport { cn } from '../../styled'\nimport { SelectMenuContext } from './SelectMenu.context'\nimport { SelectMenuContent } from './SelectMenuContent'\nimport { SelectMenuItem } from './SelectMenuItem'\nimport { SelectMenuLabel } from './SelectMenuLabel'\nimport { SelectMenuSeparator } from './SelectMenuSeparator'\nimport { SelectMenuTrigger } from './SelectMenuTrigger'\n\ntype SelectMenuProps = Omit<\n AriaComponents.SelectProps<object>,\n 'className' | 'style' | 'children'\n> & {\n size?: 'sm' | 'md' | 'lg'\n theme?: 'white' | 'grey'\n state?: 'error'\n className?: string\n children?: React.ReactNode\n}\n\nconst SelectMenuRoot = ({\n size = 'md',\n theme = 'grey',\n state,\n className,\n children,\n ...rest\n}: SelectMenuProps) => {\n const value = React.useMemo(\n () => ({ size, theme, state }),\n [size, theme, state]\n )\n return (\n <SelectMenuContext value={value}>\n {/* w-full so the trigger fills its container even in flex/inline layouts\n (react-aria wraps the trigger in an extra div). Consumers can override\n the width — or anything else — via className, e.g. w-auto / w-64. */}\n <AriaComponents.Select className={cn('w-full', className)} {...rest}>\n {children}\n </AriaComponents.Select>\n </SelectMenuContext>\n )\n}\n\nexport const SelectMenu = /* @__PURE__ */ Object.assign(SelectMenuRoot, {\n Trigger: SelectMenuTrigger,\n Content: SelectMenuContent,\n Item: SelectMenuItem,\n Group: AriaComponents.ListBoxSection,\n Label: SelectMenuLabel,\n Separator: SelectMenuSeparator\n})\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { SelectMenu } from '../select-menu/SelectMenu'\n\ntype SelectMenuFieldProps = React.PropsWithChildren<\n FieldElementWrapperProps & {\n placeholder?: string\n size?: 'sm' | 'md' | 'lg'\n theme?: 'white' | 'grey'\n disabled?: boolean\n className?: string\n }\n>\n\nexport const SelectMenuField = ({\n className,\n hideLabel,\n children,\n name,\n label,\n validation,\n prompt,\n description,\n theme,\n size,\n placeholder,\n disabled,\n ...rest\n}: SelectMenuFieldProps) => {\n const { control } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const formTheme = context?.theme ?? theme\n\n const {\n field: { ref, onChange, value }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue: ''\n })\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n >\n <SelectMenu\n aria-label={label}\n selectedKey={value === '' ? null : value}\n onSelectionChange={onChange}\n size={size}\n theme={formTheme}\n isDisabled={disabled}\n {...(error && { state: 'error' })}\n {...rest}\n >\n <SelectMenu.Trigger ref={ref} placeholder={placeholder} />\n <SelectMenu.Content>{children}</SelectMenu.Content>\n </SelectMenu>\n </FieldWrapper>\n )\n}\n\nSelectMenuField.displayName = 'SelectMenuField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Image } from '../image/Image'\nimport { Text } from '../text/Text'\n\nexport const SideBarHeader = styled('div', {\n base: ['border-b', 'border-b-(--border)', 'p-4', 'w-full']\n})\n\nexport const SideBarBody = styled('div', {\n base: ['grow', 'overflow-y-auto', 'overflow-x-hidden', 'p-4', 'w-full']\n})\n\nexport const SideBarFooter = styled('div', {\n base: ['border-t', 'border-t-(--border)', 'p-4', 'w-full']\n})\n\nconst StyledSideBarBrand = /* @__PURE__ */ styled('a', {\n base: [\n 'items-end',\n 'text-text',\n 'flex',\n 'gap-4',\n 'no-underline',\n 'hover:no-underline',\n 'focus:no-underline'\n ]\n})\n\nexport const SideBarBrand = StyledSideBarBrand as React.FC<\n React.ComponentPropsWithRef<'a'> & { as?: React.ElementType }\n>\n\nexport const SideBarBrandLogo = Image\n\nexport const SideBarBrandName = styled(Text, {\n base: ['text-text', 'whitespace-nowrap']\n})\n","import * as React from 'react'\nimport { useFocusWithin, useHover, useInteractOutside } from 'react-aria'\n\nimport { styled, Theme, cn } from '../../styled'\nimport { SideBarContext } from './SideBar.context'\nimport {\n SideBarBody,\n SideBarBrand,\n SideBarBrandLogo,\n SideBarBrandName,\n SideBarFooter,\n SideBarHeader\n} from './SideBarComponents'\n\nconst light = {\n '--background': 'white',\n '--text': 'var(--color-grey-800)',\n '--border': 'var(--color-grey-200)'\n}\n\nconst Root = styled('div', {\n base: ['sticky', 'z-1'],\n variants: {\n type: {\n static: [],\n expandable: ['w-22']\n }\n }\n})\n\nconst Content = styled('div', {\n base: [\n 'bg-(--background)',\n 'border-r',\n 'border-r-(--border)',\n 'shadow-[4px_0_4px_-2px_rgba(31,31,31,0)]',\n 'flex',\n 'flex-col',\n 'h-full',\n 'overflow-hidden',\n 'will-change-width',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[shadow,width]'\n ],\n variants: {\n type: {\n static: [],\n expandable: []\n },\n isExpanded: {\n true: ['w-[16rem]'],\n false: ['w-22']\n }\n },\n compoundVariants: [\n {\n isExpanded: true,\n type: 'expandable',\n class: ['shadow-[4px_0_4px_-2px_rgba(31,31,31,0.1)]']\n }\n ]\n})\n\nconst PointerBlocker = styled('div', {\n base: [\n 'bottom-0',\n 'left-0',\n 'absolute',\n 'right-0',\n 'top-0',\n 'transition-all'\n ],\n variants: {\n isVisible: {\n true: ['delay-0', 'visible'],\n false: ['delay-50', 'invisible']\n }\n }\n})\n\ntype SideBarProps = React.ComponentProps<typeof Root> & {\n className?: string\n offset?: number | string\n} & React.ComponentProps<typeof Theme>\n\nconst SideBarComponent = ({\n theme,\n className,\n children,\n type = 'expandable',\n offset = '0px',\n style,\n ...rest\n}: SideBarProps) => {\n const [isExpanded, setIsExpanded] = React.useState(type === 'static')\n const ref = React.useRef<HTMLDivElement>(null)\n\n useInteractOutside({\n ref,\n onInteractOutside: () => setIsExpanded(false)\n })\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: () => setIsExpanded(true),\n onBlurWithin: () => setIsExpanded(false)\n })\n const { hoverProps, isHovered } = useHover({\n onHoverStart: () => setIsExpanded(true),\n onHoverEnd: () => setIsExpanded(false)\n })\n const touchProps = {\n onTouchEnd: () => setIsExpanded(true)\n }\n\n const expandableProps =\n type === 'expandable'\n ? {\n ...focusWithinProps,\n ...hoverProps,\n ...touchProps,\n ref\n }\n : {}\n\n const sideBarContextValue = React.useMemo(\n () => ({ isExpanded }),\n [isExpanded]\n )\n\n return (\n <SideBarContext value={sideBarContextValue}>\n <Theme theme={theme || light}>\n <Root\n {...rest}\n style={{ ...style, '--offset': offset }}\n type={type}\n className={cn(\n 'h-[calc(100svh-var(--offset))]',\n 'top-(--offset)',\n className\n )}\n >\n <Content {...expandableProps} isExpanded={isExpanded} type={type}>\n {children}\n {/**\n * When the SideBar is collapsed, ensure that the initial tap event\n * is used to expand the nav first before making the items available\n */}\n {type === 'expandable' && (\n <PointerBlocker isVisible={!isHovered && !isExpanded} />\n )}\n </Content>\n </Root>\n </Theme>\n </SideBarContext>\n )\n}\n\nexport const SideBar = /* @__PURE__ */ Object.assign(SideBarComponent, {\n Brand: SideBarBrand,\n BrandLogo: SideBarBrandLogo,\n BrandName: SideBarBrandName,\n Header: SideBarHeader,\n Body: SideBarBody,\n Footer: SideBarFooter,\n displayName: 'SideBar'\n})\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\n\nexport type SliderStepsType = {\n steps?: { label: string; value: number }[]\n}\n\ntype SliderStepsProps = {\n min: number\n max: number\n} & SliderStepsType\n\nconst getPercentValue = (value: number, min: number, max: number): number => {\n return ((value - min) / (max - min)) * 100\n}\n\nconst getTransformValue = (value: number, min: number, max: number): number => {\n const percentage = getPercentValue(value, min, max)\n\n if (percentage <= 10) return 0\n if (percentage >= 90) return 100\n return 50\n}\n\nexport const SliderSteps = ({ min, max, steps = [] }: SliderStepsProps) => {\n if (steps.length === 0) return null\n\n return (\n <div className=\"relative mt-3 h-3 w-full\">\n {steps.map((step) => (\n <Text\n as=\"span\"\n key={step.value}\n style={{\n '--left': `${getPercentValue(step.value, min, max)}%`,\n '--translate-x': `-${getTransformValue(step.value, min, max)}%`\n }}\n className=\"text-grey-700 absolute left-(--left) translate-x-(--translate-x)\"\n >\n {step.label}\n </Text>\n ))}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\n\nexport type SliderValueType = {\n outputLabel?: (value: number | number[]) => string\n}\n\ntype SliderValueProps = SliderValueType & {\n value?: number[]\n}\n\nexport const SliderValue = ({\n value = [],\n outputLabel = (value) => `Current value is ${value}`\n}: SliderValueProps) => (\n <Text className=\"text-grey-700 mt-4 w-full\">\n {outputLabel(value.length === 1 ? value[0] : value)}\n </Text>\n)\n","import { Range, Root, Thumb, Track } from '@radix-ui/react-slider'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { CSSWrapper } from '../../utilities/css-wrapper/CSSWrapper'\nimport { SliderSteps } from './SliderSteps'\nimport { SliderValue } from './SliderValue'\n\nconst StyledTrack = styled(Track, {\n base: [\n 'rounded-full',\n 'grow',\n 'relative',\n 'data-[orientation=horizontal]:h-1',\n 'data-[orientation=vertical]:w-1'\n ],\n variants: {\n theme: {\n light: ['bg-white'],\n tonal: ['bg-grey-600']\n }\n }\n})\n\nconst StyledSlider = styled(Root, {\n base: [\n 'items-center',\n 'flex',\n 'relative',\n 'touch-none',\n 'select-none',\n 'cursor-pointer',\n 'data-[orientation=horizontal]:h-4',\n 'data-[orientation=vertical]:flex-col',\n 'data-[orientation=vertical]:w-4',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nconst StyledRange = styled(Range, {\n base: [\n 'bg-primary-800',\n 'rounded-full',\n 'h-full',\n 'absolute',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nconst StyledThumb = styled(Thumb, {\n base: [\n 'bg-primary-900',\n 'rounded-full',\n 'block',\n 'size-4',\n 'hover:bg-primary-1000',\n 'focus:outline-2',\n 'focus:outline-offset-2',\n 'focus:outline-primary-900',\n 'focus:outline-solid',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nexport type SliderProps = React.ComponentProps<typeof StyledSlider> &\n Pick<React.ComponentProps<typeof StyledTrack>, 'theme'>\n\nconst SliderComponent = ({\n ref,\n value,\n defaultValue,\n min = 0,\n max = 100,\n theme = 'tonal',\n className,\n children,\n ...rest\n}: SliderProps) => {\n const values = value || defaultValue\n return (\n <CSSWrapper className={className}>\n <StyledSlider\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n ref={ref}\n {...rest}\n >\n <StyledTrack theme={theme}>\n <StyledRange />\n </StyledTrack>\n {values?.length &&\n // Thumbs are positional and can share a value, so the index is their\n // stable identity.\n // eslint-disable-next-line react/no-array-index-key\n values.map((_, i) => <StyledThumb key={`thumb${i}`} />)}\n </StyledSlider>\n {children}\n </CSSWrapper>\n )\n}\n\nexport const Slider = /* @__PURE__ */ Object.assign(SliderComponent, {\n Value: SliderValue,\n Steps: SliderSteps\n})\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { Slider, type SliderProps } from '../slider/Slider'\nimport type { SliderStepsType } from '../slider/SliderSteps'\nimport type { SliderValueType } from '../slider/SliderValue'\n\ntype SliderFieldProps = SliderProps &\n SliderStepsType &\n SliderValueType &\n FieldElementWrapperProps\n\n// Stable identity so the default doesn't hand `Slider.Steps` a fresh array every\n// render (which would redraw children that compare props).\nconst DEFAULT_STEPS: SliderFieldProps['steps'] = []\n\nexport const SliderField = ({\n className,\n hideLabel,\n label,\n name,\n defaultValue,\n value,\n validation,\n outputLabel,\n min = 0,\n max = 100,\n steps = DEFAULT_STEPS,\n ...rest\n}: SliderFieldProps) => {\n const { control, setValue } = useFormContext()\n const {\n field: { ref, onChange, value: innerValue, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n\n // Serialized so an inline `value` array with a fresh identity per render\n // doesn't re-fire the sync effect.\n const serializedValue = JSON.stringify(value)\n React.useEffect(() => {\n // Sync an externally-controlled `value` into react-hook-form without\n // marking the field dirty/touched — this isn't user input. An empty\n // array is a valid value (clearing) and must sync too.\n if (typeof value !== 'undefined')\n setValue(name, value, { shouldDirty: false })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [serializedValue, name, setValue])\n\n return (\n <FieldWrapper\n className={className}\n fieldId={name}\n label={label}\n hideLabel={hideLabel}\n >\n <Slider\n ref={ref}\n name={innerName}\n onValueChange={onChange}\n value={innerValue}\n min={min}\n max={max}\n {...rest}\n >\n <Slider.Steps min={min} max={max} steps={steps} />\n\n <Slider.Value value={innerValue} outputLabel={outputLabel} />\n </Slider>\n </FieldWrapper>\n )\n}\n\nSliderField.displayName = 'SliderField'\n","import { styled } from '../../styled'\n\nexport const SkeletonLoader = styled('div', {\n base: ['bg-grey-300', 'size-16', 'animate-shimmer']\n})\n\nSkeletonLoader.displayName = 'Skeleton'\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonHeading = ({\n className\n}: {\n className?: React.ComponentProps<typeof SkeletonLoader>['className']\n}) => <SkeletonLoader className={cn('w-64', 'h-6', 'rounded-xl', className)} />\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonButton = ({\n className\n}: {\n className?: React.ComponentProps<typeof SkeletonLoader>['className']\n}) => (\n <SkeletonLoader className={cn('w-[10rem]', 'h-8', 'rounded-sm', className)} />\n)\n","import * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { type PolymorphicComponent, styled } from '../../styled'\n\nexport const StyledTile = styled(\n 'div',\n {\n base: [\n 'box-border',\n 'flex',\n 'flex-col',\n 'relative',\n 'border',\n 'bg-(--base-1)',\n 'text-(--foreground)',\n 'border-transparent'\n ],\n variants: {\n borderRadius: {\n sm: ['rounded-sm'],\n md: ['rounded-md'],\n lg: ['rounded-xl']\n },\n border: {\n true: ['border-(--base-3)']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\n// Re-expose StyledTile's own props so Tile stays polymorphic (keeps `as`, e.g.\n// `<Tile as=\"a\" href>`). Typing with React.ComponentProps<typeof StyledTile>\n// would collapse to the default element and drop `as` (as?: never).\ntype StyledTileOwnProps =\n typeof StyledTile extends PolymorphicComponent<infer _Element, infer OwnProps>\n ? OwnProps\n : never\n\ntype TileOwnProps = StyledTileOwnProps & { colorScheme?: TcolorScheme }\n\nexport const Tile = (({\n ref,\n children,\n borderRadius = 'lg',\n colorScheme = {},\n ...rest\n}: React.ComponentProps<typeof StyledTile> & {\n colorScheme?: TcolorScheme\n}) => (\n <ColorScheme\n asChild\n base=\"grey1\"\n accent=\"primary2\"\n interactive=\"loContrast\"\n {...colorScheme}\n >\n <StyledTile ref={ref} borderRadius={borderRadius} {...rest}>\n {children}\n </StyledTile>\n </ColorScheme>\n)) as PolymorphicComponent<'div', TileOwnProps>\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonTabs = ({\n numberOfTabs,\n className,\n tabClassName\n}: {\n numberOfTabs: number\n className?: string\n tabClassName?: string\n}) => (\n <Tile className={cn('p-6', 'flex-row', 'gap-4', className)}>\n {Array.from({ length: numberOfTabs }, (_, index) => `tab_${index}`).map(\n (key) => (\n <SkeletonLoader\n key={key}\n className={cn('w-32', 'h-6', 'rounded-sm', tabClassName)}\n />\n )\n )}\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\n\nconst buildConicGradient = () => {\n const numberOfSegments = 5\n const gap = 4\n const segmentAngle = (360 - numberOfSegments * gap) / numberOfSegments\n const stops: string[] = []\n let current = 0\n\n Array.from({ length: numberOfSegments }).forEach(() => {\n stops.push(\n `var(--color-grey-300) ${current}deg ${current + segmentAngle}deg`\n )\n current += segmentAngle\n stops.push(`white ${current}deg ${current + gap}deg`)\n current += gap\n })\n\n return `conic-gradient(${stops.join(', ')})`\n}\n\nexport const SkeletonDoughnutChart = ({\n className\n}: {\n className?: string\n}) => (\n <Tile className={cn('p-6', 'size-60', className)}>\n <div\n className=\"animate-shimmer aspect-square w-full rounded-full [background-image:var(--gradient)] bg-clip-padding\"\n style={{ '--gradient': buildConicGradient() }}\n >\n <div className=\"mt-[20%] ml-[20%] size-[60%] rounded-full bg-white\" />\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Table } from '../table/Table'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonTable = ({\n numberOfColumns = 4,\n numberOfRows = 4,\n columnWidth,\n className\n}: {\n numberOfColumns?: number\n numberOfRows?: number\n columnWidth?: Record<number, string>\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-row', 'gap-4', 'relative', className)}>\n <Table size=\"md\">\n <Table.Header theme=\"white\">\n {Array.from({ length: numberOfColumns }, (_, index) => index).map(\n (columnIndex) => (\n <Table.HeaderCell key={columnIndex}>\n <SkeletonLoader\n style={{ '--width': columnWidth?.[columnIndex] || '100px' }}\n className=\"h-4 w-(--width) rounded-xl\"\n />\n </Table.HeaderCell>\n )\n )}\n </Table.Header>\n <Table.Body striped={false}>\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowIndex) => (\n <Table.Row key={rowIndex}>\n {Array.from({ length: numberOfColumns }, (_, index) => index).map(\n (columnIndex) => (\n <Table.Cell key={columnIndex} className=\"border-none\">\n <SkeletonLoader\n style={{\n '--width': columnWidth?.[columnIndex] || '100px'\n }}\n className=\"bg-grey-200 h-4 w-(--width) rounded-xl\"\n />\n </Table.Cell>\n )\n )}\n </Table.Row>\n )\n )}\n </Table.Body>\n </Table>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\nimport { SkeletonButton } from './SkeletonButton'\nimport { SkeletonDoughnutChart } from './SkeletonDoughnutChart'\n\nexport const SkeletonCard = ({\n numberOfRows = 3,\n withChart,\n className\n}: {\n numberOfRows?: number\n withChart?: boolean\n className?: string\n}) => (\n <Tile\n className={cn(\n 'relative',\n 'w-full',\n 'flex-col',\n 'items-center',\n 'gap-6',\n 'p-6',\n className\n )}\n >\n <div className=\"align-center flex w-full gap-6\">\n {withChart && <SkeletonDoughnutChart />}\n <div className=\"flex grow flex-col gap-6\">\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowNumber) => (\n <SkeletonLoader\n key={rowNumber}\n className=\"bg-grey-200 h-10 w-full min-w-25 rounded-md\"\n />\n )\n )}\n </div>\n </div>\n <SkeletonButton />\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nconst getBarHeight = (groupIndex: number, columnIndex: number) =>\n Math.round(90 + Math.abs(Math.sin(groupIndex + columnIndex + 1)) * 30)\n\nconst ColumnGroup = ({\n numberOfColumns,\n groupIndex\n}: {\n numberOfColumns: number\n groupIndex: number\n}) => (\n <div className=\"flex flex-col items-center gap-4\">\n <div className=\"flex items-end gap-2\">\n {Array.from({ length: numberOfColumns }, (_, i) => (\n <SkeletonLoader\n key={i}\n className=\"h-(--height) w-5 rounded-t-full rounded-b-none\"\n style={{\n '--height': `${getBarHeight(groupIndex, i)}px`\n }}\n />\n ))}\n </div>\n <SkeletonLoader className=\"h-2 w-14 rounded-full\" />\n </div>\n)\n\nconst LegendItem = () => (\n <div className=\"flex items-center gap-2\">\n <SkeletonLoader className=\"h-3 w-3 rounded-full\" />\n <SkeletonLoader className=\"h-3 w-24 rounded-full\" />\n </div>\n)\n\nexport const SkeletonColumnChart = ({\n numberOfLabels = 2,\n numberOfGroups = 7,\n numberOfColumns = 1,\n className\n}: {\n numberOfLabels?: number\n numberOfGroups?: number\n numberOfColumns?: number\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-col', 'gap-6', 'w-full', className)}>\n <div className=\"flex flex-col gap-3\">\n <div className=\"flex items-center gap-4\">\n {Array.from({ length: numberOfLabels }, (_, i) => (\n <LegendItem key={i} />\n ))}\n </div>\n </div>\n <div className=\"flex items-end justify-between gap-2\">\n {Array.from({ length: numberOfGroups }, (_, i) => (\n <ColumnGroup key={i} numberOfColumns={numberOfColumns} groupIndex={i} />\n ))}\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nconst getBarWidth = (rowIndex: number) =>\n Math.round(40 + Math.abs(Math.sin(rowIndex + 1)) * 55)\n\nconst LegendItem = () => (\n <div className=\"flex items-center gap-2\">\n <SkeletonLoader className=\"h-3 w-3 rounded-full\" />\n <SkeletonLoader className=\"h-3 w-24 rounded-full\" />\n </div>\n)\n\nexport const SkeletonBarChart = ({\n numberOfLabels = 3,\n numberOfRows = 4,\n numberOfTicks = 4,\n className\n}: {\n numberOfLabels?: number\n numberOfRows?: number\n numberOfTicks?: number\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-col', 'gap-6', 'w-full', className)}>\n <div className=\"flex items-center gap-4\">\n {Array.from({ length: numberOfLabels }, (_, i) => (\n <LegendItem key={i} />\n ))}\n </div>\n <div className=\"flex flex-col justify-between gap-4\">\n {Array.from({ length: numberOfRows }, (_, i) => (\n <div key={i} className=\"flex items-center gap-5\">\n <SkeletonLoader className=\"h-3 w-20 shrink-0 rounded-full\" />\n <div className=\"grow\">\n <SkeletonLoader\n className=\"h-5 w-(--width) rounded-full\"\n style={{\n '--width': `${getBarWidth(i)}%`\n }}\n />\n </div>\n </div>\n ))}\n <div className=\"flex justify-between pl-24\">\n {Array.from({ length: numberOfTicks }, (_, i) => (\n <SkeletonLoader key={i} className=\"h-2 w-8 rounded-full\" />\n ))}\n </div>\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonPanelList = ({ className }: { className?: string }) => (\n <Tile className={cn('px-6', 'flex-col', 'w-full', className)}>\n <div className=\"border-grey-100 flex flex-wrap items-center gap-4 border-b py-4 last:border-b-0\">\n <SkeletonLoader className=\"size-10 rounded-full\" />\n <div className=\"grow\">\n <SkeletonLoader className=\"h-4 w-2/3 rounded-full\" />\n </div>\n <SkeletonLoader className=\"h-8 w-28 rounded-md\" />\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonSubjectList = ({ className }: { className?: string }) => (\n <Tile\n className={cn(\n 'p-2',\n 'flex-row',\n 'flex-wrap',\n 'items-center',\n 'justify-between',\n 'gap-4',\n 'w-full',\n className\n )}\n >\n <SkeletonLoader className=\"h-22 max-w-xl grow rounded-xl\" />\n <SkeletonLoader className=\"size-10 shrink-0 rounded-md\" />\n </Tile>\n)\n","export { SkeletonLoader as Loader } from './Skeleton'\nexport { SkeletonHeading as Heading } from './SkeletonHeading'\nexport { SkeletonButton as Button } from './SkeletonButton'\nexport { SkeletonTabs as Tabs } from './SkeletonTabs'\nexport { SkeletonDoughnutChart as DoughnutChart } from './SkeletonDoughnutChart'\nexport { SkeletonTable as Table } from './SkeletonTable'\nexport { SkeletonCard as Card } from './SkeletonCard'\nexport { SkeletonColumnChart as ColumnChart } from './SkeletonColumnChart'\nexport { SkeletonBarChart as BarChart } from './SkeletonBarChart'\nexport { SkeletonPanelList as PanelList } from './SkeletonPanelList'\nexport { SkeletonSubjectList as SubjectList } from './SkeletonSubjectList'\n","import { styled } from '../../styled'\n\n/**\n * A flexible flex spacer that expands along the major axis of its containing flex layout.\n * It renders a `div` by default, and takes up any available space.\n */\nexport const Spacer = styled('div', {\n base: ['flex-1', 'justify-self-stretch', 'self-stretch']\n})\n\nSpacer.displayName = 'Spacer'\n","import * as React from 'react'\n\nimport type { Context, StepperProviderProps } from './types'\n\n// null default so useStepper's missing-provider guard can fire — a full\n// default object would silently render a zero-step stepper instead.\nconst StepperContext = React.createContext<Context | null>(null)\n\nexport const StepperProvider = ({\n children,\n stepCount,\n allowSkip,\n onComplete,\n onStepChange,\n direction,\n steps,\n hideLabels,\n showCompletedIcons\n}: React.PropsWithChildren<StepperProviderProps>) => {\n const [activeStep, setActiveStep] = React.useState(0)\n\n const [viewedSteps, setviewedSteps] = React.useState<number[]>([0])\n const [completedSteps, setCompletedSteps] = React.useState<number[]>([])\n\n const isControlled = !stepCount\n\n // Step changes (and their side effects) happen in the navigation handlers,\n // not an effect: an effect would fire onStepChange on mount (twice under\n // StrictMode) and again whenever the callback identity changed.\n const changeStep = React.useCallback(\n (nextStep: number) => {\n setActiveStep(nextStep)\n setviewedSteps((prev) =>\n prev.includes(nextStep) ? prev : [...prev, nextStep]\n )\n onStepChange?.(nextStep)\n },\n [onStepChange]\n )\n\n const goToNextStep = React.useCallback(() => {\n const isCompleted = onComplete && activeStep === stepCount - 1\n const isNextStep = activeStep < stepCount - 1\n\n if (onComplete || isNextStep) {\n setCompletedSteps((prev) =>\n prev.includes(activeStep) ? prev : [...prev, activeStep]\n )\n }\n\n if (isCompleted) {\n return onComplete?.()\n }\n if (isNextStep) {\n return changeStep(activeStep + 1)\n }\n }, [activeStep, stepCount, onComplete, changeStep])\n\n const goToPreviousStep = React.useCallback(() => {\n changeStep(activeStep - 1)\n }, [activeStep, changeStep])\n\n const goToStep = React.useCallback(\n (index: number) => {\n changeStep(index)\n },\n [changeStep]\n )\n\n const value = React.useMemo<Context>(\n () => ({\n steps: steps || Array(stepCount).fill(''),\n goToPreviousStep: isControlled ? undefined : goToPreviousStep,\n goToNextStep: isControlled ? undefined : goToNextStep,\n goToStep: isControlled ? undefined : goToStep,\n activeStep,\n viewedSteps,\n completedSteps,\n allowSkip,\n direction,\n hideLabels,\n showCompletedIcons\n }),\n [\n steps,\n stepCount,\n isControlled,\n goToPreviousStep,\n goToNextStep,\n goToStep,\n activeStep,\n viewedSteps,\n completedSteps,\n allowSkip,\n direction,\n hideLabels,\n showCompletedIcons\n ]\n )\n\n return <StepperContext value={value}>{children}</StepperContext>\n}\n\nexport const useStepper = (): Context => {\n const context = React.use(StepperContext)\n if (!context)\n throw new Error(\n 'Ensure that you wrap any components with the root component Stepper'\n )\n\n return context\n}\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { useStepper } from './Stepper.context'\nimport type { StepperNavigateProps } from './types'\n\nexport const StepperStepBack = ({\n label,\n children,\n ...rest\n}: StepperNavigateProps & React.ComponentProps<typeof Button>) => {\n const { activeStep, goToPreviousStep } = useStepper()\n return (\n <Button\n size=\"sm\"\n appearance=\"outline\"\n {...rest}\n disabled={activeStep === 0}\n onClick={goToPreviousStep}\n >\n {children || label?.(activeStep)}\n </Button>\n )\n}\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { useStepper } from './Stepper.context'\nimport type { StepperNavigateProps } from './types'\n\nexport const StepperStepForward = ({\n label,\n children,\n onClick,\n ...rest\n}: StepperNavigateProps & Partial<React.ComponentProps<typeof Button>>) => {\n const { goToNextStep, activeStep } = useStepper()\n\n const handleClick = () => {\n if (onClick) {\n return onClick(() => goToNextStep?.())\n }\n goToNextStep?.()\n }\n\n return (\n <Button size=\"sm\" {...rest} onClick={handleClick} className=\"ml-auto\">\n {children || label?.(activeStep)}\n </Button>\n )\n}\n","import { styled } from '../../styled'\n\nexport const StepperStepBullet = styled('div', {\n base: [\n 'flex',\n 'relative',\n 'p-2',\n 'justify-center',\n 'items-center',\n 'size-8',\n 'rounded-[50%]',\n 'border-0',\n 'bg-grey-200',\n 'z-1',\n 'flex-none'\n ],\n variants: {\n status: {\n default: ['bg-grey-200', 'text-grey-700'],\n active: ['bg-white', 'border-2', 'border-current', 'text-primary-900'],\n viewed: ['bg-white', 'border-2', 'border-grey-600', 'text-grey-1000'],\n completed: ['bg-primary-800', 'text-white'],\n reviewed: ['bg-primary-900', 'text-white'],\n success: ['bg-success', 'text-white']\n }\n }\n})\n","import { styled } from '../../styled'\n\nexport const StepperStepContainer = styled('div', {\n base: [\n 'flex',\n 'relative',\n 'font-body',\n 'font-semibold',\n 'text-md',\n 'items-center',\n 'not-last:after:absolute',\n \"not-last:after:content-['']\",\n 'focus-visible:outline-none'\n ],\n variants: {\n canInteract: {\n true: []\n },\n direction: {\n vertical: [\n 'flex-row',\n 'not-last:after:h-full',\n 'not-last:after:left-3.5',\n 'not-last:after:top-1/2',\n 'not-last:after:w-1',\n 'py-3'\n ],\n horizontal: [\n 'flex-col',\n 'not-last:after:h-1',\n 'not-last:after:left-1/2',\n 'not-last:after:top-3.5',\n 'not-last:after:w-full',\n 'px-2'\n ]\n },\n separator: {\n default: ['not-last:after:bg-grey-200'],\n active: ['not-last:after:bg-primary-800'],\n success: ['not-last:after:bg-success'],\n viewed: ['not-last:after:bg-grey-600']\n },\n status: {\n completed: [],\n active: [],\n default: [],\n viewed: [],\n success: [],\n reviewed: []\n }\n },\n compoundVariants: [\n {\n canInteract: true,\n status: 'completed',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:bg-primary-900',\n 'hover:first:text-white!',\n 'hover:last:text-primary-900'\n ]\n },\n {\n canInteract: true,\n status: 'active',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'viewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'reviewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!'\n ]\n }\n ]\n})\n","import { styled } from '../../styled'\nimport { Text } from '../text/Text'\n\nexport const StepperStepLabel = styled(Text, {\n base: ['font-semibold'],\n variants: {\n direction: {\n vertical: ['ml-3', 'text-left'],\n horizontal: ['mt-3', 'text-center']\n },\n status: {\n default: ['font-normal', 'text-grey-700'],\n active: ['text-primary-900'],\n viewed: ['text-grey-1000'],\n completed: ['text-primary-800'],\n success: ['text-success'],\n reviewed: []\n }\n }\n})\n","export enum Status {\n ACTIVE = 'active',\n VIEWED = 'viewed',\n SUCCESS = 'success',\n DEFAULT = 'default',\n COMPLETED = 'completed',\n REVIEWED = 'reviewed'\n}\nexport interface Step {\n label?: string\n status: `${Status}`\n}\n\nexport type Direction = 'vertical' | 'horizontal'\n\nexport type Context = {\n steps: Step[]\n goToPreviousStep?: () => void\n goToNextStep?: () => void\n goToStep?: (index: number) => void\n activeStep: number\n viewedSteps: number[]\n completedSteps: number[]\n allowSkip?: boolean\n direction?: Direction\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport type StepperProviderProps = {\n stepCount: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps: Step[]\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport interface StepperProps {\n className?: string\n stepCount?: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps?: Step[]\n hideLabels?: boolean\n showCompletedIcons?: boolean\n}\n\nexport interface StepperNavigateProps {\n label?: (currentStep?: number) => string\n onClick?: (next: () => void) => void\n}\n\nexport interface StepperStepsProps {\n className?: string\n}\n","import { Ok } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useStepper } from './Stepper.context'\nimport { StepperStepBullet } from './StepperStepBullet'\nimport { StepperStepContainer } from './StepperStepContainer'\nimport { StepperStepLabel } from './StepperStepLabel'\nimport { type StepperStepsProps, Status } from './types'\n\nconst StepperStepsContainer = styled('div', {\n base: ['flex', 'justify-between'],\n variants: {\n direction: {\n vertical: ['flex-col'],\n horizontal: ['flex-row']\n }\n }\n})\n\nexport const StepperSteps = ({ className }: StepperStepsProps) => {\n const {\n steps,\n goToStep,\n activeStep,\n viewedSteps,\n allowSkip,\n direction,\n hideLabels,\n completedSteps,\n showCompletedIcons\n } = useStepper()\n\n // `viewedSteps`/`completedSteps` are scanned once per step below; Set lookups\n // keep the per-step status checks O(1) instead of O(steps).\n const viewedStepsSet = new Set(viewedSteps)\n const completedStepsSet = new Set(completedSteps)\n\n const getBulletStatus = (index: number) => {\n const activeBullet = steps[index]\n\n if (activeBullet.status) return activeBullet.status\n if (completedSteps.length === steps.length) return Status.SUCCESS\n if (activeStep === index && completedStepsSet.has(activeStep))\n return Status.REVIEWED\n if (activeStep === index) return Status.ACTIVE\n if (completedStepsSet.has(index)) return Status.COMPLETED\n if (viewedStepsSet.has(index)) return Status.VIEWED\n return Status.DEFAULT\n }\n\n const getSeparatorStatus = (index: number) => {\n const bulletStatus = steps[index]?.status\n\n if (completedSteps.length === steps.length) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.SUCCESS) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.COMPLETED || index < Math.max(...viewedSteps)) {\n return Status.ACTIVE\n }\n\n if (bulletStatus === Status.VIEWED) {\n return Status.VIEWED\n }\n\n return Status.DEFAULT\n }\n\n return (\n <StepperStepsContainer className={className} direction={direction}>\n {steps.map((step, index) => {\n const bulletStatus = getBulletStatus(index)\n const separatorStatus = getSeparatorStatus(index)\n\n return (\n <StepperStepContainer\n tabIndex={0}\n // Steps are a fixed, index-addressed list (activeStep/viewedSteps/\n // goToStep all key off the index) that never reorders, so the index\n // is the stable identity here.\n // eslint-disable-next-line react/no-array-index-key\n key={`step_${index}`}\n direction={direction}\n separator={separatorStatus}\n status={bulletStatus}\n style={{ '--steps': steps.length || 0 }}\n className={\n direction === 'horizontal'\n ? 'w-[calc(100%/var(--steps))]'\n : 'h-[calc(100%/var(--steps))]'\n }\n canInteract={allowSkip}\n >\n <StepperStepBullet\n as={allowSkip ? 'button' : 'div'}\n onClick={() =>\n allowSkip && viewedStepsSet.has(index)\n ? goToStep?.(index)\n : undefined\n }\n status={bulletStatus}\n aria-current={index === activeStep ? 'step' : undefined}\n aria-label={!step.label ? `step ${index + 1}` : ''}\n aria-labelledby={step.label ? `step-${index}` : undefined}\n className={\n allowSkip && viewedStepsSet.has(index)\n ? 'cursor-pointer'\n : 'cursor-auto'\n }\n >\n {step.status === Status.SUCCESS ||\n (showCompletedIcons && bulletStatus === Status.COMPLETED) ? (\n <Icon is={Ok} />\n ) : (\n index + 1\n )}\n </StepperStepBullet>\n\n {step.label && !hideLabels && (\n <StepperStepLabel\n as=\"span\"\n id={`step-${index}`}\n direction={direction}\n status={bulletStatus}\n >\n {step.label}\n </StepperStepLabel>\n )}\n </StepperStepContainer>\n )\n })}\n </StepperStepsContainer>\n )\n}\n","import * as React from 'react'\nimport invariant from 'tiny-invariant'\n\nimport { cn } from '../../styled'\nimport { StepperProvider } from './Stepper.context'\nimport { StepperStepBack } from './StepperStepBack'\nimport { StepperStepForward } from './StepperStepForward'\nimport { StepperSteps } from './StepperSteps'\nimport type { StepperProps } from './types'\n\nconst StepperComponent = ({\n children,\n stepCount,\n allowSkip,\n onComplete,\n onStepChange,\n direction = 'horizontal',\n steps,\n hideLabels = false,\n showCompletedIcons = false,\n className\n}: React.PropsWithChildren<StepperProps>) => {\n invariant(\n !(stepCount && steps),\n '`Stepper` should only be given one of `stepCount` or `steps`. When both are provided, `steps` will be used and `stepCount` will be ignored.'\n )\n\n const count = steps?.length || stepCount || 0\n\n return (\n <StepperProvider\n stepCount={count}\n allowSkip={allowSkip}\n onComplete={onComplete}\n onStepChange={stepCount ? onStepChange : undefined}\n direction={direction}\n steps={steps || Array(count).fill('')}\n hideLabels={hideLabels}\n showCompletedIcons={showCompletedIcons}\n >\n <div aria-label=\"progress\" className={cn('w-full', className)}>\n {children}\n </div>\n </StepperProvider>\n )\n}\n\nexport const Stepper = /* @__PURE__ */ Object.assign(StepperComponent, {\n StepBack: StepperStepBack,\n StepForward: StepperStepForward,\n Steps: StepperSteps\n})\n\nStepperComponent.displayName = 'Stepper'\n","import * as RadixSwitch from '@radix-ui/react-switch'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledSwitch = styled(RadixSwitch.Root, {\n base: [\n 'appearance-none',\n 'bg-grey-600',\n 'border-none',\n 'rounded-full',\n 'cursor-pointer',\n 'flex',\n 'overflow-hidden',\n 'relative',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'hover:bg-grey-700',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:hover:bg-primary-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n md: ['p-0.5', 'w-10'],\n lg: ['p-1', 'w-16']\n }\n }\n})\n\nconst StyledThumb = styled(RadixSwitch.Thumb, {\n base: [\n 'bg-white',\n 'rounded-full',\n 'block',\n 'transition-transform',\n 'duration-50',\n 'will-change-transform'\n ],\n variants: {\n size: {\n md: ['data-[state=checked]:translate-x-5', 'size-4'],\n lg: ['data-[state=checked]:translate-x-8', 'size-6']\n }\n }\n})\n\ntype SwitchProps = React.ComponentProps<typeof StyledSwitch>\n\nexport const Switch = ({ size = 'md', ...rest }: SwitchProps) => (\n <StyledSwitch size={size} {...rest}>\n <StyledThumb size={size} />\n </StyledSwitch>\n)\n\nSwitch.displayName = 'Switch'\n","import { Content } from '@radix-ui/react-tabs'\n\nimport { styled } from '../../styled'\n\nconst StyledTabsContent = styled(Content, {\n base: ['grow', 'font-body']\n})\n\nexport const TabsContent = StyledTabsContent\n\nTabsContent.displayName = 'TabsContent'\n","import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\n\nconst StyledTabsTriggerHoverBackground = styled('div', {\n base: [\n 'absolute',\n 'inset-0',\n 'h-[calc(100%+2px)]',\n 'opacity-0',\n 'bg-(--interactive-1)'\n ]\n})\n\nconst StyledTabsTrigger = styled(Trigger, {\n base: [\n 'bg-none',\n 'cursor-pointer',\n 'shrink-0',\n 'p-4',\n 'select-none',\n 'border-b-2',\n 'border-b-transparent',\n 'relative',\n 'data-[state=active]:border-current',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:text-(--interactive-1)',\n 'data-[state=active]:tracking-[-0.005em]',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:text-(--interactive-3)',\n 'not-disabled:focus-visible:[&_div]:opacity-7',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:text-(--interactive-2)',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:[&_div]:opacity-7',\n 'not-disabled:hover:text-(--interactive-2)'\n ]\n})\n\nexport const TabsTrigger = ({\n ref,\n children,\n ...rest\n}: React.ComponentProps<typeof StyledTabsTrigger> & { value: string }) => (\n <StyledTabsTrigger {...rest} ref={ref}>\n <Text size=\"sm\" as=\"span\">\n {children}\n </Text>\n <StyledTabsTriggerHoverBackground />\n </StyledTabsTrigger>\n)\n","import { useCallback, useRef, useSyncExternalStore } from 'react'\nimport { debounce, throttle } from 'throttle-debounce'\n\ntype UseScrollPositionOptions = {\n element?: HTMLElement | null\n delay?: number\n delayMethod?: 'throttle' | 'debounce'\n}\n\ntype UseScrollPositionOutput = {\n left: number\n top: number\n}\n\nconst NO_ELEMENT_SNAPSHOT: UseScrollPositionOutput = { left: 0, top: 0 }\n\n// useSyncExternalStore rather than event-listener + setState: the position is\n// correct from the very first render (an already-scrolled element must not\n// report {0,0} until its next scroll event), the trailing throttle/debounce\n// invocation is cancelled on unsubscribe (no state updates after unmount),\n// and reads can't tear under concurrent rendering.\nexport const useScrollPosition = ({\n element,\n delay = 500,\n delayMethod = 'throttle'\n}: UseScrollPositionOptions): UseScrollPositionOutput => {\n const snapshotRef = useRef<UseScrollPositionOutput | null>(null)\n\n const subscribe = useCallback(\n (onStoreChange: () => void) => {\n if (!element) return () => undefined\n\n const delayMethodFn = delayMethod === 'debounce' ? debounce : throttle\n const handleScroll = delayMethodFn(delay, onStoreChange)\n\n element.addEventListener('scroll', handleScroll)\n\n return () => {\n handleScroll.cancel()\n element.removeEventListener('scroll', handleScroll)\n }\n },\n [element, delay, delayMethod]\n )\n\n // Snapshots must be referentially stable between store changes, so cache\n // the object and only replace it when the underlying values move.\n const getSnapshot = () => {\n if (!element) return NO_ELEMENT_SNAPSHOT\n\n const prev = snapshotRef.current\n if (\n !prev ||\n prev.left !== element.scrollLeft ||\n prev.top !== element.scrollTop\n ) {\n snapshotRef.current = {\n left: element.scrollLeft,\n top: element.scrollTop\n }\n }\n return snapshotRef.current as UseScrollPositionOutput\n }\n\n return useSyncExternalStore(subscribe, getSnapshot, () => NO_ELEMENT_SNAPSHOT)\n}\n","import { useCallback, useMemo, useState } from 'react'\n\nimport { useResizeObserver } from './useResizeObserver'\n\ninterface Size {\n width: number | undefined\n height: number | undefined\n}\n\nexport const useSize = ({\n element,\n delay = 500\n}: {\n element?: HTMLElement | null\n delay?: number\n}): Size => {\n const [size, setSize] = useState<Size>({\n width: undefined,\n height: undefined\n })\n\n const handleResize = useCallback(() => {\n const width = element?.clientWidth\n const height = element?.clientHeight\n setSize((prev) =>\n prev.width === width && prev.height === height ? prev : { width, height }\n )\n }, [element])\n\n const elements = useMemo(() => [element], [element])\n\n useResizeObserver({\n delay,\n elements: elements,\n onResize: handleResize\n })\n\n return size\n}\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport { List } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { useScrollPosition } from '../../utilities/hooks/useScrollPosition'\nimport { useSize } from '../../utilities/hooks/useSize'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContainer = styled(ColorScheme, {\n base: ['relative', 'border-b', 'border-b-(--base-4)', 'w-full']\n})\n\nconst StyledTriggerList = styled(List, {\n base: ['shrink-0', 'flex', 'w-full', 'overflow-x-auto', 'scrollbar-none']\n})\n\nconst StyledChevronActionIcon = styled(ActionIcon, {\n base: [\n 'h-full!',\n 'absolute',\n 'top-1/2',\n '-translate-y-1/2',\n 'cursor-pointer',\n 'bg-(--base-1)!',\n 'text-(--interactive-1)!',\n 'rounded-none',\n 'opacity-90'\n ]\n})\n\nconst SCROLL_STEP = 0.8 // Used to scroll 80% of clientWidth\n\nexport const TabsTriggerList = ({\n children,\n colorScheme = {},\n ...rest\n}: React.ComponentProps<typeof StyledTriggerList> & {\n colorScheme?: TcolorScheme\n}) => {\n const [listRef, setListRefCallback] = useCallbackRefState()\n\n const { width } = useSize({ element: listRef, delay: 500 })\n const { left } = useScrollPosition({\n element: listRef,\n delay: 100,\n delayMethod: 'debounce'\n })\n\n const canScrollXAxis = React.useMemo(() => {\n if (!listRef) return false\n return listRef.scrollWidth > listRef.clientWidth\n }, [width, listRef])\n\n const canScrollLeft = React.useMemo(() => {\n if (!canScrollXAxis) return false\n return left > 0\n }, [left, canScrollXAxis])\n\n const canScrollRight = React.useMemo(() => {\n if (!listRef || !canScrollXAxis) return false\n return listRef.scrollWidth - left - listRef.clientWidth > 1 // 1 rather than 0 to account for sub-pixel widths and calculations\n }, [listRef, left, canScrollXAxis])\n\n const scrollList = React.useCallback(\n (stepModifier) => {\n if (!listRef) return\n listRef.scroll({\n left: listRef.scrollLeft + listRef.clientWidth * stepModifier,\n behavior: 'smooth'\n })\n },\n [listRef]\n )\n\n return (\n <StyledContainer\n base=\"grey1\"\n accent=\"primary1\"\n interactive=\"hiContrast\"\n {...colorScheme}\n {...rest}\n >\n <StyledTriggerList ref={setListRefCallback}>{children}</StyledTriggerList>\n\n {canScrollLeft && (\n <StyledChevronActionIcon\n label=\"scroll left\"\n size=\"md\"\n onClick={() => scrollList(-SCROLL_STEP)}\n tabIndex={-1}\n className=\"left-0\"\n >\n <Icon is={ChevronLeft} />\n </StyledChevronActionIcon>\n )}\n\n {canScrollRight && (\n <StyledChevronActionIcon\n label=\"scroll right\"\n size=\"md\"\n onClick={() => scrollList(SCROLL_STEP)}\n tabIndex={-1}\n className=\"right-0\"\n >\n <Icon is={ChevronRight} />\n </StyledChevronActionIcon>\n )}\n </StyledContainer>\n )\n}\n\nTabsTriggerList.displayName = 'TabsTriggerList'\n","import { Root } from '@radix-ui/react-tabs'\n\nimport { styled } from '../../styled'\nimport { TabsContent } from './TabsContent'\nimport { TabsTrigger } from './TabsTrigger'\nimport { TabsTriggerList } from './TabsTriggerList'\n\n// Non-polymorphic: Root is a Radix behavioural primitive, so retargeting it\n// via `as` would discard its keyboard/aria handling. This also gives the\n// component a single call signature, so React.ComponentProps infers cleanly\n// from the Object.assign intersection without a hand-written interface.\nconst StyledRoot = styled(\n Root,\n {\n base: ['w-full']\n },\n { enablePolymorphism: false }\n)\n\nexport const Tabs = /* @__PURE__ */ Object.assign(StyledRoot, {\n TriggerList: TabsTriggerList,\n Trigger: TabsTrigger,\n Content: TabsContent,\n displayName: 'Tabs'\n})\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const Textarea = styled(\n 'textarea',\n {\n base: [\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'box-border',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n 'text-md',\n 'leading-[1.4]',\n 'm-0',\n 'min-h-24',\n 'px-3',\n 'py-3',\n 'resize-y',\n 'w-full',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n }\n },\n defaultVariants: {\n appearance: 'standard'\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n },\n { enablePolymorphism: false }\n)\n\nexport type TextareaProps = React.ComponentProps<typeof Textarea>\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { Textarea, type TextareaProps } from '../textarea/Textarea'\n\ntype TextareaFieldProps = TextareaProps & FieldElementWrapperProps\n\nexport const TextareaField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: TextareaFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Textarea\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nTextareaField.displayName = 'TextareaField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\nimport { Tile } from '../tile/Tile'\n\nconst StyledTileInteractive = styled(Tile, {\n base: [\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--base-2)',\n 'not-disabled:after:absolute',\n 'not-disabled:after:duration-250',\n 'not-disabled:after:ease-out',\n 'not-disabled:after:inset-0',\n 'not-disabled:after:opacity-0',\n 'not-disabled:after:pointer-events-none',\n 'not-disabled:after:rounded-[inherit]',\n 'not-disabled:after:shadow-lg',\n 'not-disabled:after:transition-opacity',\n 'not-disabled:cursor-pointer',\n 'not-disabled:duration-250',\n 'not-disabled:ease-in',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:after:opacity-100',\n 'not-disabled:hover:-translate-y-0.5',\n 'not-disabled:transition-transform',\n 'not-disabled:translate-y-0'\n ]\n})\n\ntype TileInteractiveProps = Override<\n React.ComponentProps<typeof StyledTileInteractive> &\n React.ButtonHTMLAttributes<HTMLButtonElement> & {\n href?: string\n reloadDocument?: boolean\n },\n { as?: React.ElementType }\n>\n\nexport const TileInteractive = ({\n ref,\n onClick,\n href,\n type = 'button',\n as,\n reloadDocument,\n ...rest\n}: TileInteractiveProps) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n const isLink = !!href\n const elementSpecificProps = isLink\n ? {\n as: as || routerLinkProps.as || 'a',\n href,\n onClick: undefined\n }\n : {\n as: as || 'button',\n type,\n onClick\n }\n\n return <StyledTileInteractive {...rest} {...elementSpecificProps} ref={ref} />\n}\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { TileInteractive } from '../tile-interactive/TileInteractive'\n\nconst StyledTileToggleGroupItem = styled(TileInteractive, {\n base: [\n 'text-left',\n 'not-disabled:data-[state=on]:active:bg-(--interactive-3)',\n 'not-disabled:data-[state=on]:hover:bg-(--interactive-2)',\n 'data-[state=on]:before:-inset-px',\n 'data-[state=on]:before:absolute',\n 'data-[state=on]:before:rounded-[inherit]',\n 'data-[state=on]:before:inset-shadow-[var(--accent-8)_0px_0px_0px_2px]',\n 'data-[state=on]:before:z-1',\n 'data-[state=on]:bg-(--interactive-1)',\n 'data-[state=on]:border-(--accent-8)'\n ]\n})\n\ntype TileToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> &\n React.ComponentProps<typeof StyledTileToggleGroupItem>\n\nexport const TileToggleGroupItem = ({\n children,\n ...rest\n}: TileToggleGroupItem) => (\n <ToggleGroup.Item {...rest} asChild>\n <StyledTileToggleGroupItem as=\"button\">\n {children}\n </StyledTileToggleGroupItem>\n </ToggleGroup.Item>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { ToggleGroup } from '../../utilities/radix-overrides/toggle-group'\n\ntype TileToggleGroupRootProps = React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const TileToggleGroupRoot = ({\n ref,\n orientation,\n className,\n ...rest\n}: TileToggleGroupRootProps) => (\n <ToggleGroup.Root\n ref={ref}\n {...rest}\n className={cn(\n 'flex',\n 'gap-2',\n orientation === 'horizontal' && 'flex-row',\n orientation === 'vertical' && 'flex-col',\n 'flex-wrap',\n className\n )}\n />\n)\n","import { TileToggleGroupItem } from './TileToggleGroupItem'\nimport { TileToggleGroupRoot } from './TileToggleGroupRoot'\n\ntype TileToggleGroup = typeof TileToggleGroupRoot & {\n Item: typeof TileToggleGroupItem\n}\n\nexport const TileToggleGroup = TileToggleGroupRoot as TileToggleGroup\nTileToggleGroup.Item = TileToggleGroupItem\n","import * as React from 'react'\nimport type { Toast } from 'react-hot-toast'\n\nexport const ToastContext = React.createContext<Pick<\n Toast,\n 'type' | 'id' | 'message'\n> | null>(null)\n\nexport const useToastContext = () => {\n const context = React.use(ToastContext)\n\n if (!context) {\n throw new Error('useToastContext must be used within a ToastProvider')\n }\n\n return context\n}\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { toast } from 'react-hot-toast'\n\nimport { cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { useToastContext } from './Toast.context'\n\nexport interface ToastCloseButtonProps extends Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'label' | 'children'\n> {\n onDismiss?: () => void\n label?: string\n}\n\nexport const ToastCloseButton = ({\n onDismiss,\n label = 'Close alert',\n ...rest\n}: ToastCloseButtonProps) => {\n const { id } = useToastContext()\n\n return (\n <ActionIcon\n label={label}\n onClick={() => {\n toast.dismiss(id)\n onDismiss?.()\n }}\n {...rest}\n className={cn(\n 'text-white',\n '-mr-2',\n 'hover:opacity-80',\n 'hover:text-white',\n 'focus:opacity-80',\n 'focus:text-white'\n )}\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n}\n","import * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const ToastIcon = (props: React.ComponentProps<typeof Icon>) => (\n <Icon size=\"sm\" {...props} className=\"mr-3 flex-[0_0_auto]\" />\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useToastContext } from './Toast.context'\nimport { ToastCloseButton } from './ToastCloseButton'\nimport { ToastIcon } from './ToastIcon'\n\nexport const StyledToast = styled('div', {\n base: [\n 'flex',\n 'items-center',\n 'pointer-events-auto',\n 'rounded-md',\n 'shadow-md',\n 'box-border',\n 'text-white',\n 'min-h-12',\n 'relative',\n 'px-4',\n 'py-1',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[colors,transform]'\n ],\n variants: {\n type: {\n loading: ['bg-info'],\n blank: ['bg-info'],\n success: ['bg-success'],\n error: ['bg-danger']\n }\n }\n})\n\nconst ToastComponent = (props: React.ComponentProps<typeof StyledToast>) => {\n const { type } = useToastContext()\n const styledType = type === 'custom' ? undefined : type\n return <StyledToast type={props.type || styledType} {...props} />\n}\n\nexport const Toast = /* @__PURE__ */ Object.assign(ToastComponent, {\n Icon: ToastIcon,\n Close: ToastCloseButton\n})\n","import { Error } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useToaster } from 'react-hot-toast'\n\nimport { styled } from '../../styled'\nimport { Spacer } from '../spacer/Spacer'\nimport { Text } from '../text/Text'\nimport { Toast } from './Toast'\nimport { ToastContext } from './Toast.context'\n\nexport { toast } from 'react-hot-toast'\nexport { useToastContext } from './Toast.context'\n\nconst ToastProviderBase = /* @__PURE__ */ styled('div', {\n base: [\n 'fixed',\n 'z-2147483647',\n 'inset-safe-offset-2',\n 'pointer-events-none',\n 'sm:top-safe-offset-3'\n ]\n})\n\nconst ToastWrapper = /* @__PURE__ */ styled('div', {\n base: [\n 'absolute',\n 'w-full',\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'box-border',\n 'min-h-12',\n '[--slide-opacity-out:0]',\n '[--slide-direction-out-y:-100%]'\n ],\n variants: {\n visible: {\n true: ['motion-safe:animate-slide-direction-in'],\n false: ['opacity-0', 'motion-safe:animate-slide-direction-out']\n }\n }\n})\n\nexport const ToastProvider = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => {\n const { toasts, handlers } = useToaster()\n const { startPause, endPause, calculateOffset, updateHeight } = handlers\n\n return (\n <>\n <ToastProviderBase\n onMouseEnter={startPause}\n onMouseLeave={endPause}\n className={className}\n >\n {toasts.map((toast) => {\n const { message: children } = toast\n\n const offset = calculateOffset(toast, {\n reverseOrder: true,\n gutter: 8\n })\n\n const ref = (el: HTMLDivElement | null) => {\n if (el && toast.height === undefined) {\n updateHeight(toast.id, el.getBoundingClientRect().height)\n }\n }\n\n return (\n <ToastWrapper\n key={toast.id}\n ref={ref}\n visible={toast.visible}\n role={toast.ariaProps.role}\n aria-live={toast.ariaProps['aria-live']}\n style={{ '--offset': `${offset}px` }}\n className=\"top-(--offset)\"\n >\n <ToastContext value={toast}>\n {typeof children === 'function' ? (\n children(toast)\n ) : React.isValidElement(children) ? (\n children\n ) : (\n <Toast className=\"w-100\">\n {toast.type === 'error' && <Toast.Icon is={Error} />}\n <Text>{children}</Text>\n <Spacer />\n <Toast.Close />\n </Toast>\n )}\n </ToastContext>\n </ToastWrapper>\n )\n })}\n </ToastProviderBase>\n {children}\n </>\n )\n}\n\nToastProvider.displayName = 'ToastProvider'\n","import { Toast as ToastBase } from './Toast'\nimport { ToastProvider } from './ToastProvider'\n\nexport { toast } from './ToastProvider'\n\n// Assembled here rather than in Toast.tsx: ToastProvider imports Toast to\n// render it, so attaching Provider inside Toast.tsx would create a circular\n// import whose init order depends on the entry module. This module sits\n// above both files in the import graph, so no cycle.\nexport const Toast = /* @__PURE__ */ Object.assign(ToastBase, {\n Provider: ToastProvider\n})\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\n\nimport { styled } from '../../styled'\n\nexport const standardVariant = [\n 'before:bg-grey-600',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'text-grey-800',\n 'data-[state=on]:border-current!',\n 'data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'data-[state=on]:text-primary-800',\n 'not-disabled:data-[state=on]:before:bg-none',\n 'not-disabled:focus-visible:before:bg-none',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:before:bg-none',\n 'not-disabled:hover:border-current!',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const modernVariant = [\n 'bg-grey-200',\n 'border-0',\n 'text-grey-800',\n 'overflow-hidden',\n 'rounded-md',\n 'data-[state=on]:bg-white',\n 'data-[state=on]:border!',\n 'data-[state=on]:border-grey-200!',\n 'data-[state=on]:shadow-none!',\n 'data-[state=on]:text-grey-900',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px_white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const ToggleGroupItem = styled(\n ToggleGroup.Item,\n {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n defaultVariants: {\n theme: 'standard'\n }\n },\n { enablePolymorphism: false }\n)\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { modernVariant, standardVariant } from './ToggleGroupItem'\n\nexport const StyledButton = styled(\n ToggleGroup.Item,\n {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'grow',\n 'flex',\n 'items-center',\n 'justify-center',\n 'font-semibold',\n 'leading-none',\n 'py-1'\n ],\n variants: {\n size: {\n sm: ['*:not-last:mr-2', 'min-h-8', 'px-4', 'text-sm'],\n md: ['*:not-last:mr-3', 'min-h-10', 'px-8', 'text-md'],\n lg: ['*:not-last:mr-3', 'min-h-12', 'px-8', 'text-lg']\n },\n isIconOnly: {\n true: []\n },\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n compoundVariants: [\n {\n isIconOnly: true,\n size: 'sm',\n class: ['min-w-8', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'sm',\n theme: 'modern',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n theme: 'modern',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n theme: 'modern',\n class: ['min-w-15', 'p-0']\n }\n ]\n },\n { enableResponsiveVariants: true }\n)\n\nexport const ToggleGroupButton = ({\n ref,\n size = 'md',\n theme = 'standard',\n children,\n ...rest\n}: React.ComponentProps<typeof StyledButton>) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n const isIconOnly =\n isSingleChild &&\n React.isValidElement(childrenArray[0]) &&\n childrenArray[0]?.type === Icon\n\n return (\n <StyledButton\n ref={ref}\n size={size}\n isIconOnly={isIconOnly}\n theme={theme}\n {...rest}\n >\n {\n childrenArray.map((child) => {\n if (\n !isSingleChild &&\n (typeof child === 'string' || typeof child === 'number')\n )\n return <span key={child}>{child}</span>\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n )\n ) {\n if (child?.type === Icon)\n return React.cloneElement(child, { ...child.props, size })\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledButton>\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { ToggleGroup } from '../../utilities/radix-overrides/toggle-group'\n\ntype RootType = {\n orientation?: 'horizontal' | 'vertical'\n isFullWidth?: boolean\n gap?: 0 | 1 | 2 | 3\n wrap?: boolean\n}\n\nexport const StyledRoot = styled(ToggleGroup.Root, {\n base: ['w-fit'],\n variants: {\n isFullWidth: {\n true: [\n '**:data-radix-collection-item:basis-0',\n '**:data-radix-collection-item:grow',\n 'w-full'\n ],\n false: ['w-auto']\n },\n hasGap: {\n true: ['**:data-radix-collection-item:rounded-md'],\n false: [\n '**:data-radix-collection-item:not-last:before:absolute',\n \"**:data-radix-collection-item:not-last:before:content-['']\",\n '**:data-radix-collection-item:relative',\n 'rounded-md'\n ]\n },\n direction: {\n column: [],\n row: []\n },\n theme: {\n standard: [],\n modern: ['bg-grey-200']\n }\n },\n compoundVariants: [\n {\n hasGap: false,\n direction: 'row',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-l-md',\n '**:data-radix-collection-item:last:rounded-r-md',\n '**:data-radix-collection-item:not-first:border-l-transparent',\n '**:data-radix-collection-item:not-last:before:h-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:before:right-0',\n '**:data-radix-collection-item:not-last:before:-top-px',\n '**:data-radix-collection-item:not-last:before:translate-x-3/2',\n '**:data-radix-collection-item:not-last:before:w-px',\n '**:data-radix-collection-item:not-last:border-r-transparent',\n '**:data-radix-collection-item:rounded-none'\n ]\n },\n {\n hasGap: false,\n direction: 'column',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-t-sm',\n '**:data-radix-collection-item:last:rounded-b-sm',\n '**:data-radix-collection-item:not-first:border-t-transparent',\n '**:data-radix-collection-item:not-last:before:bottom-0',\n '**:data-radix-collection-item:not-last:before:h-px',\n '**:data-radix-collection-item:not-last:before:-left-px',\n '**:data-radix-collection-item:not-last:before:translate-y-3/2',\n '**:data-radix-collection-item:not-last:before:w-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:border-b-transparent'\n ]\n },\n {\n hasGap: false,\n theme: 'modern',\n class: []\n },\n {\n hasGap: false,\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:bg-transparent',\n '**:data-radix-collection-item:rounded-none',\n 'bg-white'\n ]\n }\n ]\n})\n\nconst gapClassMap = {\n 0: 'gap-0.5',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3'\n}\n\nconst orientationToDirection = (orientation) =>\n orientation === 'horizontal' ? 'row' : 'column'\n\nexport const ToggleGroupRoot = ({\n ref,\n orientation = 'horizontal',\n gap,\n isFullWidth,\n children,\n theme = 'standard',\n wrap,\n ...rest\n}: React.ComponentProps<typeof StyledRoot> & RootType) => {\n const hasGap = typeof gap === 'number'\n const direction = orientationToDirection(orientation)\n\n return (\n <StyledRoot\n ref={ref}\n direction={direction}\n hasGap={hasGap}\n isFullWidth={isFullWidth}\n orientation={orientation}\n theme={theme}\n {...rest}\n >\n <div\n className={cn(\n 'flex',\n hasGap && gapClassMap[gap],\n orientation === 'horizontal' ? 'flex-row' : 'flex-col',\n wrap ? 'flex-wrap' : 'flex-nowrap'\n )}\n >\n {\n React.Children.toArray(children).map((child) => {\n if (React.isValidElement<{ theme?: typeof theme }>(child)) {\n return React.cloneElement(child, { ...child.props, theme })\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </div>\n </StyledRoot>\n )\n}\n","import { ToggleGroupButton as Button } from './ToggleGroupButton'\nimport { ToggleGroupItem as Item } from './ToggleGroupItem'\nimport { ToggleGroupRoot as Root } from './ToggleGroupRoot'\n\nexport const ToggleGroup = { Item, Button, Root }\n","import { useCallback, useRef, useSyncExternalStore } from 'react'\nimport { debounce, throttle } from 'throttle-debounce'\n\ntype UseWindowScrollPositionOptions = {\n delay?: number\n delayMethod?: 'throttle' | 'debounce'\n}\n\ntype UseWindowScrollPositionOutput = {\n x: number\n y: number\n}\n\nconst SERVER_SNAPSHOT: UseWindowScrollPositionOutput = { x: 0, y: 0 }\n\n// useSyncExternalStore rather than event-listener + setState: the position is\n// correct from the very first render (a mid-page mount must not report {0,0}\n// until the first scroll event), the trailing throttle/debounce invocation is\n// cancelled on unsubscribe (no state updates after unmount), and reads can't\n// tear under concurrent rendering.\nexport const useWindowScrollPosition = ({\n delay = 500,\n delayMethod = 'throttle'\n}: UseWindowScrollPositionOptions = {}): UseWindowScrollPositionOutput => {\n const snapshotRef = useRef<UseWindowScrollPositionOutput | null>(null)\n\n const subscribe = useCallback(\n (onStoreChange: () => void) => {\n const delayMethodFn = delayMethod === 'debounce' ? debounce : throttle\n const handleScroll = delayMethodFn(delay, onStoreChange)\n\n window.addEventListener('scroll', handleScroll)\n\n return () => {\n handleScroll.cancel()\n window.removeEventListener('scroll', handleScroll)\n }\n },\n [delay, delayMethod]\n )\n\n // Snapshots must be referentially stable between store changes, so cache\n // the object and only replace it when the underlying values move.\n const getSnapshot = () => {\n const prev = snapshotRef.current\n if (!prev || prev.x !== window.scrollX || prev.y !== window.scrollY) {\n snapshotRef.current = { x: window.scrollX, y: window.scrollY }\n }\n return snapshotRef.current as UseWindowScrollPositionOutput\n }\n\n return useSyncExternalStore(subscribe, getSnapshot, () => SERVER_SNAPSHOT)\n}\n","const light = {\n '--background': 'white',\n '--divider': 'var(--color-grey-200)',\n '--border-bottom': 'var(--color-grey-200)'\n}\n\nexport const colorSchemes = {\n light\n}\n","import * as React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\ntype TopBarActionIconProps = Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'size' | 'children'\n> & {\n icon: React.FC<React.SVGProps<SVGSVGElement>>\n label: string\n}\n\nexport const TopBarActionIcon = ({\n ref,\n icon,\n ...rest\n}: TopBarActionIconProps) => (\n <ActionIcon size=\"md\" appearance=\"simple\" theme=\"neutral\" ref={ref} {...rest}>\n <Icon is={icon} />\n </ActionIcon>\n)\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { Image } from '../image/Image'\nimport { Text } from '../text/Text'\n\nexport const TopBarBrandLogo = ({\n src,\n alt = 'Atom Learning logo',\n className\n}: Pick<React.ComponentProps<typeof Image>, 'src' | 'alt'> & {\n className?: string\n}) => (\n <Image\n src={src}\n alt={alt}\n className={cn('h-8', 'mr-3', 'w-auto', className)}\n />\n)\n\nexport const TopBarBrandName = styled(Text, {\n base: ['text-grey-800']\n})\n\nexport const TopBarBrand = styled('a', {\n base: [\n 'flex',\n 'items-center',\n 'no-underline',\n 'text-grey-800',\n 'hover:no-underline',\n 'focus:no-underline'\n ]\n})\n","import * as React from 'react'\n\nimport { styled, Theme } from '../../styled'\nimport { useWindowScrollPosition } from '../../utilities/hooks/useWindowScrollPosition'\nimport { Divider } from '../divider/Divider'\nimport { colorSchemes as topBarColorSchemes } from './TopBar.colorscheme.config'\nimport { TopBarActionIcon } from './TopBarActionIcon'\nimport { TopBarBrand, TopBarBrandLogo, TopBarBrandName } from './TopBarBrand'\n\nconst TopBarDivider = () => (\n <Divider orientation=\"vertical\" className=\"bg-divider h-6\" />\n)\n\nconst StyledRoot = styled(\n 'header',\n {\n base: [\n 'bg-(--background)',\n 'sticky',\n 'flex',\n 'items-center',\n 'z-15',\n 'transition-shadow',\n 'duration-200',\n 'ease-out'\n ],\n variants: {\n hasScrolled: {\n true: ['shadow-[0px_4px_4px_-2px_rgba(31,31,31,0.1)]']\n },\n size: {\n md: ['h-safe-offset-top-16', 'pt-safe'],\n lg: ['h-safe-offset-top-24', 'pt-safe']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n },\n appearance: {\n standard: [\n 'w-screen',\n 'max-w-full',\n 'top-safe',\n 'border-b',\n 'border-b-(--border-bottom)'\n ],\n rounded: [\n 'w-full',\n 'top-safe-offset-2',\n 'p-2',\n 'border',\n 'border-white',\n 'rounded-full'\n ]\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst Container = styled('div', {\n base: ['flex', 'items-center', 'h-10', 'mx-4', 'w-full', 'md:mx-8']\n})\n\ntype TopBarProps = React.ComponentProps<typeof StyledRoot> &\n React.ComponentProps<typeof Container> &\n React.ComponentProps<typeof Theme>\n\nconst TopBarComponent = ({\n size = 'md',\n diffused,\n theme,\n appearance = 'standard',\n ...rest\n}: React.PropsWithChildren<TopBarProps>) => {\n const { y: scrollPositionY } = useWindowScrollPosition()\n\n return (\n <Theme theme={theme || topBarColorSchemes['light']}>\n <StyledRoot\n hasScrolled={!!scrollPositionY}\n diffused={diffused}\n appearance={appearance}\n size={size}\n >\n <Container {...rest} />\n </StyledRoot>\n </Theme>\n )\n}\n\nexport const TopBar = /* @__PURE__ */ Object.assign(TopBarComponent, {\n Brand: TopBarBrand,\n BrandLogo: TopBarBrandLogo,\n BrandName: TopBarBrandName,\n ActionIcon: TopBarActionIcon,\n Divider: TopBarDivider\n})\n\nTopBarComponent.displayName = 'TopBar'\n","import * as React from 'react'\n// Note: Only loading vimeo to reduce the bundle size https://www.npmjs.com/package/react-player\nimport ReactPlayer from 'react-player/vimeo.js'\n\nimport { CSSWrapper } from '../../utilities/css-wrapper/CSSWrapper'\nimport type { Override } from '../../utilities/types'\n\ntype VideoProps = Override<\n React.ComponentProps<typeof ReactPlayer>,\n {\n id: string\n ratio?: number\n className?: string\n ref?: React.Ref<ReactPlayer>\n }\n>\n\nexport const Video = ({\n ref,\n id,\n ratio = 9 / 16,\n className,\n ...rest\n}: VideoProps) => (\n <CSSWrapper className={className}>\n <div\n style={{ '--ratio': `${ratio * 100}%` }}\n className=\"relative h-0 w-full overflow-hidden rounded-sm pt-(--ratio)\"\n >\n <ReactPlayer\n {...rest}\n role=\"figure\"\n url={`https://player.vimeo.com/video/${id}`}\n height=\"100%\"\n width=\"100%\"\n ref={ref}\n className=\"absolute top-0 left-0\"\n />\n </div>\n </CSSWrapper>\n)\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\n\ntype KeyboardEventWindowOrElement =\n | KeyboardEvent\n | React.KeyboardEvent<HTMLDivElement>\ntype ShortcutConfig = Partial<KeyboardEvent>\n\ntype KeyboardShortcutProps = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean\n config: {\n shortcut: ShortcutConfig\n action: ({\n event,\n shortcut\n }: {\n event: KeyboardEvent | React.KeyboardEvent<HTMLDivElement>\n shortcut: ShortcutConfig\n }) => void\n }[]\n targetWindow?: boolean\n onKeyDown?: (e: KeyboardEventWindowOrElement) => void\n ref?: React.Ref<HTMLDivElement>\n}\n\nexport const KeyboardShortcut = ({\n ref,\n asChild,\n config,\n targetWindow = false,\n onKeyDown,\n ...rest\n}: KeyboardShortcutProps) => {\n const handleOnKeydown = React.useCallback(\n (e: KeyboardEventWindowOrElement) => {\n config.forEach(({ shortcut, action }) => {\n if (Object.entries(shortcut).every(([key, value]) => e[key] === value))\n action({ event: e, shortcut })\n })\n onKeyDown?.(e)\n },\n [config, onKeyDown]\n )\n\n // Latest-ref so the window listener subscribes once — keyed on the handler\n // it would re-subscribe whenever an inline `config` array changes identity.\n const handleOnKeydownRef = React.useRef(handleOnKeydown)\n React.useLayoutEffect(() => {\n handleOnKeydownRef.current = handleOnKeydown\n })\n\n React.useEffect(() => {\n if (!targetWindow) return\n\n const listener = (e: KeyboardEvent) => handleOnKeydownRef.current(e)\n window.addEventListener('keydown', listener)\n\n return () => {\n window.removeEventListener('keydown', listener)\n }\n }, [targetWindow])\n\n const Component = asChild ? Slot : 'div'\n\n return (\n <Component\n onKeyDown={targetWindow ? undefined : handleOnKeydown}\n ref={ref}\n {...rest}\n />\n )\n}\n\nconst StyledKeyboardShortcutIndicator = /* @__PURE__ */ styled(Text, {\n base: [\n 'bg-grey-100',\n 'text-text-subtle',\n 'px-2',\n 'py-0.5',\n 'min-w-6',\n 'min-h-6',\n 'font-normal',\n 'inline-flex',\n 'justify-center',\n 'items-center',\n 'rounded-md',\n 'shrink-0',\n 'capsize-none'\n ]\n})\n\ntype KeyboardShortcutIndicatorProps = React.ComponentProps<\n typeof StyledKeyboardShortcutIndicator\n>\n\nexport const KeyboardShortcutIndicator = (\n props: KeyboardShortcutIndicatorProps\n) => {\n return <StyledKeyboardShortcutIndicator size=\"sm\" as=\"kbd\" {...props} />\n}\n","import {\n KeyboardShortcut as KeyboardShortcutComponent,\n KeyboardShortcutIndicator\n} from './KeyboardShortcut'\n\nexport const KeyboardShortcut = /* @__PURE__ */ Object.assign(\n KeyboardShortcutComponent,\n {\n Indicator: KeyboardShortcutIndicator\n }\n)\n","import * as React from 'react'\n\nimport { Tabs } from '../tabs/Tabs'\nimport type { SegmentedControlTheme } from './SegmentedControl.types'\nimport type { SegmentedControlRootProps } from './SegmentedControlRoot'\n\nexport interface SegmentedControlContextValue extends Pick<\n React.ComponentProps<typeof Tabs>,\n 'defaultValue' | 'value' | 'onValueChange'\n> {\n size: SegmentedControlRootProps['size']\n theme: SegmentedControlTheme\n}\n\nexport const SegmentedControlContext =\n React.createContext<SegmentedControlContextValue>({\n size: 'md',\n theme: 'primary',\n defaultValue: '',\n value: '',\n onValueChange: () => null\n })\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Badge } from '../badge/Badge'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst badgeSizeMap = {\n sm: 'xs',\n md: 'xs',\n lg: 'sm'\n}\n\nexport const SegmentedControlBadge = ({\n className,\n ...rest\n}: Omit<React.ComponentProps<typeof Badge>, 'size'>) => {\n const { size } = React.use(SegmentedControlContext)\n\n return (\n <Badge\n {...rest}\n size={badgeSizeMap[size as string]}\n className={cn('border-none', 'font-normal', className)}\n />\n )\n}\n","import * as React from 'react'\n\nimport { Tabs } from '../tabs/Tabs'\n\nexport const SegmentedControlContent = Tabs.Content\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst StyledText = styled(\n Text,\n {\n base: ['font-body', 'text-text-subtle', 'font-normal'],\n variants: {\n size: {\n sm: ['text-xs', 'leading-[1.6]'],\n md: ['text-sm', 'leading-[1.53]'],\n lg: ['text-md', 'leading-normal']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport const SegmentedControlDescription = (\n props: Omit<React.ComponentProps<typeof StyledText>, 'size'>\n) => {\n const { size } = React.use(SegmentedControlContext)\n\n return <StyledText {...props} size={size} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst StyledHeading = styled(\n Text,\n {\n base: ['font-body', 'text-text-regular'],\n variants: {\n size: {\n sm: ['text-sm', 'leading-[1.53]'],\n md: ['text-md', 'leading-normal'],\n lg: ['text-lg', 'leading-[1.52]']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport const SegmentedControlHeading = (\n props: Omit<React.ComponentProps<typeof StyledHeading>, 'size'>\n) => {\n const { size } = React.use(SegmentedControlContext)\n\n return <StyledHeading {...props} size={size} />\n}\n","import * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst sizeMap = {\n sm: 'sm',\n md: 'md',\n lg: 'md'\n}\n\nexport const SegmentedControlIcon = (\n props: Omit<React.ComponentProps<typeof Icon>, 'size'>\n) => {\n const { size } = React.use(SegmentedControlContext)\n\n return (\n <Icon\n {...(props as React.ComponentProps<typeof Icon>)}\n size={sizeMap[size as string]}\n />\n )\n}\n","import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst StyledItem = styled(\n Trigger,\n {\n base: [\n 'relative',\n 'bg-transparent',\n 'rounded-md',\n 'z-2',\n 'min-w-35',\n 'border-2',\n 'border-transparent',\n 'cursor-pointer',\n 'select-none',\n 'flex',\n 'flex-col',\n 'items-center',\n 'justify-center',\n 'data-[state=active]:border-2',\n 'data-[state=active]:border-transparent',\n 'data-[state=active]:focus-visible:border-primary-800',\n 'data-[state=active]:focus-visible:shadow-none',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:shadow-none',\n 'data-[state=active]:text-(--text-bold)',\n 'data-[state=inactive]:font-normal',\n 'data-[state=inactive]:text-grey-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'focus-visible:outline-none'\n ],\n variants: {\n theme: {\n primary: [\n 'data-[state=inactive]:hover:bg-primary-300',\n 'focus-visible:border-primary-800'\n ],\n marsh: [\n 'data-[state=inactive]:hover:bg-marsh-300',\n 'focus-visible:border-marsh-800'\n ]\n },\n size: {\n sm: ['flex-[unset]', 'gap-3', 'px-6', 'py-4'],\n md: ['flex-1', 'gap-4', 'px-4', 'py-6'],\n lg: ['flex-1', 'gap-4', 'px-4', 'py-6']\n }\n },\n defaultVariants: {\n size: 'md',\n theme: 'primary'\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport const SegmentedControlItem = ({\n ref,\n children,\n ...rest\n}: Omit<React.ComponentProps<typeof StyledItem>, 'size'>) => {\n const { size, theme } = React.use(SegmentedControlContext)\n\n return (\n <StyledItem {...rest} theme={theme} size={size} ref={ref}>\n {children}\n </StyledItem>\n )\n}\n","import { composeRefs } from '@radix-ui/react-compose-refs'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Tabs } from '../tabs/Tabs'\nimport { SegmentedControlContext } from './SegmentedControl.context'\nimport { SegmentedControlItem } from './SegmentedControlItem'\n\nconst StyledTriggerList = styled(Tabs.TriggerList, {\n base: [\n 'relative',\n 'p-1',\n 'rounded-lg',\n 'overflow-hidden',\n '[&>div[role=tablist]]:relative',\n '[&>button]:z-2'\n ],\n variants: {\n theme: {\n primary: ['bg-primary-200'],\n marsh: ['bg-marsh-200']\n }\n }\n})\n\nconst SelectionIndicator = styled('div', {\n base: ['absolute', 'bg-white', 'rounded-md'],\n variants: {\n interacted: {\n true: ['duration-300', 'ease-in', 'transition-all'],\n false: ['transition-none']\n }\n }\n})\n\nexport const SegmentedControlItemList = (\n props: React.ComponentProps<typeof Tabs.TriggerList>\n) => {\n const { theme, defaultValue, value } = React.use(SegmentedControlContext)\n\n const tabsRef = React.useRef<(HTMLElement | null)[]>([])\n\n const selectedIndex = React.Children.toArray(props.children).findIndex(\n (child) =>\n (\n child as React.ReactElement<\n React.ComponentProps<typeof SegmentedControlItem>\n >\n )?.props.value === value\n )\n\n const [indicatorStyles, setIndicatorStyles] = React.useState({\n left: 0,\n height: 0,\n width: 0\n })\n const [hasInteracted, setHasInteracted] = React.useState(false)\n\n const updateIndicatorPosition = React.useCallback(() => {\n const currentTab = tabsRef.current[selectedIndex]\n if (!currentTab) return\n\n const { width, height } = currentTab.getBoundingClientRect()\n setIndicatorStyles({\n left: Math.round(currentTab.offsetLeft),\n height: Math.round(height),\n width: Math.round(width)\n })\n }, [selectedIndex])\n\n // Latest-ref so the ResizeObserver and window listener subscribe once per\n // tab-count change instead of being torn down on every selection change\n // (updateIndicatorPosition's identity tracks selectedIndex).\n const updateIndicatorPositionRef = React.useRef(updateIndicatorPosition)\n React.useLayoutEffect(() => {\n updateIndicatorPositionRef.current = updateIndicatorPosition\n })\n\n const tabCount = React.Children.count(props.children)\n\n React.useEffect(() => {\n const resizeObserver = new ResizeObserver(() =>\n updateIndicatorPositionRef.current()\n )\n const currentTabs = tabsRef.current\n currentTabs.forEach((tab) => {\n if (tab) resizeObserver.observe(tab)\n })\n\n return () => {\n resizeObserver.disconnect()\n }\n }, [tabCount])\n\n React.useEffect(() => {\n const handleResize = () => updateIndicatorPositionRef.current()\n window.addEventListener('resize', handleResize)\n return () => {\n window.removeEventListener('resize', handleResize)\n }\n }, [])\n\n // Layout effect: the indicator must be measured and placed before paint,\n // or it appears at its old position for a frame and visibly jumps.\n React.useLayoutEffect(() => {\n updateIndicatorPosition()\n }, [selectedIndex, updateIndicatorPosition])\n\n return (\n <StyledTriggerList theme={theme} defaultValue={defaultValue} {...props}>\n <SelectionIndicator interacted={hasInteracted} style={indicatorStyles} />\n {React.Children.map(props.children, (child, index) => {\n if (\n !React.isValidElement<\n React.ComponentProps<typeof SegmentedControlItem>\n >(child)\n ) {\n throw new Error(\n `Child passed to SegmentedControlItemList is not a valid element`\n )\n }\n\n return React.cloneElement(child, {\n onClick: (e) => {\n setHasInteracted(true)\n if (child.props.onClick) child.props.onClick(e)\n },\n // Composed so a consumer-supplied ref on the item survives the\n // clone; the cleanup empties the slot when the item detaches.\n ref: composeRefs(\n (child.props as { ref?: React.Ref<HTMLElement> }).ref,\n (el: HTMLElement | null) => {\n tabsRef.current[index] = el\n return () => {\n tabsRef.current[index] = null\n }\n }\n )\n })\n })}\n </StyledTriggerList>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Tabs } from '../tabs/Tabs'\nimport { SegmentedControlContext } from './SegmentedControl.context'\nimport type { SegmentedControlTheme } from './SegmentedControl.types'\n\nconst StyledSegmentedControlRoot = styled(\n Tabs,\n {\n base: ['[&>div]:border-none'],\n variants: {\n size: {\n sm: ['w-[unset]!'],\n md: [],\n lg: []\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport interface SegmentedControlRootProps extends React.ComponentProps<\n typeof StyledSegmentedControlRoot\n> {\n theme?: SegmentedControlTheme\n}\n\nexport const SegmentedControlRoot = ({\n size,\n theme = 'primary',\n defaultValue,\n children,\n value,\n onValueChange,\n ...rest\n}: React.PropsWithChildren<SegmentedControlRootProps>) => {\n const isControlled = value !== undefined\n\n const [internalValue, setInternalValue] = React.useState(defaultValue)\n\n const currentValue = isControlled ? value : internalValue\n // Fire the consumer's `onValueChange` in BOTH modes; only own internal state\n // when uncontrolled. (Previously `isControlled ? onValueChange :\n // setInternalValue`, which silently dropped the consumer callback in\n // uncontrolled mode once `onValueChange` stopped leaking through `...rest`.)\n const handleValueChange = React.useCallback(\n (newValue: string) => {\n if (!isControlled) setInternalValue(newValue)\n onValueChange?.(newValue)\n },\n [isControlled, onValueChange]\n )\n\n const contextValue = React.useMemo(\n () => ({\n size,\n theme,\n defaultValue,\n onValueChange: handleValueChange,\n value: currentValue\n }),\n [size, theme, defaultValue, handleValueChange, currentValue]\n )\n\n return (\n <SegmentedControlContext value={contextValue}>\n <StyledSegmentedControlRoot\n size={size}\n value={currentValue}\n onValueChange={handleValueChange}\n {...rest}\n >\n {children}\n </StyledSegmentedControlRoot>\n </SegmentedControlContext>\n )\n}\n","import { SegmentedControlBadge } from './SegmentedControlBadge'\nimport { SegmentedControlContent } from './SegmentedControlContent'\nimport { SegmentedControlDescription } from './SegmentedControlDescription'\nimport { SegmentedControlHeading } from './SegmentedControlHeading'\nimport { SegmentedControlIcon } from './SegmentedControlIcon'\nimport { SegmentedControlItem } from './SegmentedControlItem'\nimport { SegmentedControlItemList } from './SegmentedControlItemList'\nimport { SegmentedControlRoot } from './SegmentedControlRoot'\n\nexport const SegmentedControl = {\n Root: SegmentedControlRoot,\n Item: SegmentedControlItem,\n Heading: SegmentedControlHeading,\n Description: SegmentedControlDescription,\n Icon: SegmentedControlIcon,\n Content: SegmentedControlContent,\n Badge: SegmentedControlBadge,\n ItemList: SegmentedControlItemList\n}\n","import * as React from 'react'\n\nimport type { FileDropContextValue } from './types'\n\nexport const FileDropContext = React.createContext<FileDropContextValue>({\n isDragging: false,\n files: []\n})\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { FileDropContext } from './FileDrop.context'\nimport { type FileDropContextValue } from './types'\n\ninterface FileDropProps extends Omit<\n React.ComponentProps<'div'>,\n 'onDrop' | 'ref' | 'children'\n> {\n onDrop: (files: File[]) => void\n children?:\n | React.ReactNode\n | ((value: FileDropContextValue) => React.ReactNode)\n accept?: React.InputHTMLAttributes<HTMLInputElement>['accept']\n multiple?: React.InputHTMLAttributes<HTMLInputElement>['multiple']\n}\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'flex-col',\n 'gap-6',\n 'items-center',\n 'border',\n 'border-dashed',\n 'border-grey-500',\n 'px-12',\n 'py-8',\n 'rounded-md',\n 'cursor-pointer',\n '**:pointer-events-none'\n ]\n})\n\nexport const FileDrop = ({\n children,\n accept,\n multiple,\n onDrop,\n ...rest\n}: FileDropProps) => {\n const [isDragging, setIsDragging] = React.useState(false)\n const [files, setFiles] = React.useState<File[]>([])\n const fileUploadInputRef = React.useRef<HTMLInputElement>(null)\n\n const handleDragOver = (event: React.DragEvent<HTMLDivElement>) => {\n event.preventDefault()\n setIsDragging(true)\n }\n\n const handleDragLeave = () => setIsDragging(false)\n\n const handleDrop = (fileList: FileList | null) => {\n if (!fileList) return\n\n setIsDragging(false)\n\n const files = [...fileList]\n onDrop(files)\n setFiles(files)\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if ('Space' === event.key || 'Enter' === event.key) {\n fileUploadInputRef.current?.click()\n }\n }\n\n // Memoized: consumers otherwise re-render at drag-over event frequency.\n const value = React.useMemo<FileDropContextValue>(\n () => ({ isDragging, files }),\n [isDragging, files]\n )\n\n return (\n <FileDropContext value={value}>\n <StyledContainer\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onDrop={(event) => {\n event.preventDefault()\n handleDrop(event.dataTransfer.files)\n }}\n onClick={() => fileUploadInputRef.current?.click()}\n // A drop zone wraps a file input and arbitrary (possibly interactive)\n // children, which a native <button> may not contain, so the button role\n // lives on this container instead.\n // eslint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"button\"\n onKeyDown={handleKeyDown}\n tabIndex={0}\n {...rest}\n >\n {typeof children === 'function' ? children(value) : children}\n <input\n type=\"file\"\n ref={fileUploadInputRef}\n style={{ visibility: 'hidden' }}\n accept={accept}\n multiple={multiple}\n onChange={(event) => {\n handleDrop(event.target.files)\n }}\n />\n </StyledContainer>\n </FileDropContext>\n )\n}\n\nFileDrop.displayName = 'FileDrop'\n","import * as React from 'react'\n\nimport { FileDropContext } from './FileDrop.context'\nimport type { FileDropContextValue } from './types'\n\nexport const useFileDrop = (): FileDropContextValue =>\n React.use(FileDropContext)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,kBAAA,cAAc,UAAU;AAExB,IAAM,sBAAsB;AAE5B,IAAM,qBAAqB,UACzB,oBAAoB,KAAK,KAAK,KAAK,CAAC,OAAO,MAAM,OAAO,KAAK,CAA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AA,IAAA,CAAC,OAAD,EAAW,KAAO,CAAA;EAClB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAW,KAAO,CAAA;EAClB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAW,KAAO,CAAA;CACf;;;;AClCP,IAAa,eAAe,OAC1B,UACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,OAAO;GACL,SAAS;IACP;IACA;IACA;GACF;GACA,WAAW;IACT;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IACA;GACF;GACA,QAAQ;IACN;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IACA;GACF;EACF;EACA,YAAY;GACV,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,WAAW,EACT,MAAM;GAAC;GAAsB;GAAc;EAAqB,EAClE;EACA,WAAW;GACT,MAAM,CAAC,QAAQ;GACf,OAAO,CAAC,OAAO;EACjB;CACF;CACA,iBAAiB;EACf,YAAY;EACZ,MAAM;EACN,OAAO;CACT;AACF,GACA,EACE,0BAA0B,KAC5B,CACF;;AAIA,IAAM,wBAAwC,uBAC5C,QACA;CACE,MAAM;EAAC;EAAgB;EAAQ;EAAkB;CAAW;CAC5D,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,OAAO;EACZ,IAAI,CAAC,OAAO;EACZ,IAAI,CAAC,OAAO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eAAe,OACnB,UACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,MAAM;GACJ,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,OAAO,EACL,OAAO,CAAC,EACV;EACA,OAAO;GACL,OAAO,CAAC;GACR,MAAM,CAAC;EACT;EACA,YAAY;GACV,UAAU;IACR;IACA;IACA;IACA;IACA;GACF;GACA,QAAQ;IACN;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;CACF;CACA,kBAAkB;EAChB;GACE,OAAO;GACP,YAAY;GACZ,OAAO,CAAC,eAAe;EACzB;EACA;GACE,OAAO;GACP,YAAY;GACZ,OAAO,CAAC,mBAAmB,sBAAsB;EACnD;EACA;GACE,YAAY;GACZ,OAAO;GACP,OAAO,CAAC,UAAU;EACpB;EACA;GACE,YAAY;GACZ,OAAO;GACP,OAAO,CAAC,aAAa;EACvB;CACF;AACF,GACA;CAAE,oBAAoB;CAAO,0BAA0B;AAAK,CAC9D;AAeA,IAAa,UAAU,EACrB,KACA,aACA,UACA,OAAO,MACP,aAAa,YACb,GAAG,WACc;CAEjB,MAAM,QAAmD;EACvD;EACA;EACA;EACA,GAAG;CACL;CAEA,IAAI,CAAC,KAAK,OAAO,KAAK,YAAY,CAAC,CAAC,OAAO,UAAU,UAAU,KAAA,CAAS,GACtE,MAAM,eAAe;CAGvB,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,cAAD;EAAc,GAAI;YAAlB,CACG,eACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;GAAQ,UAAA;GAAS,QAAA;GAAO,OAAM;aAC3B;EACK,CAAA,GAET,QACW;;AAElB;;;ACvIA,IAAa,eAAe,EAC1B,WACA,WACA,UACA,M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