@atom-learning/components 5.12.0 → 5.12.1
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.
- package/CHANGELOG.md +16 -22
- package/dist/components/accordion/AccordionContent.js +1 -1
- package/dist/components/accordion/AccordionTrigger.js +1 -1
- package/dist/components/accordion/AccordionTrigger.js.map +1 -1
- package/dist/components/action-icon/ActionIcon.d.ts +1 -1
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/action-icon/ActionIcon.js.map +1 -1
- package/dist/components/alert-dialog/AlertDialogContent.js +1 -1
- package/dist/components/alert-dialog/AlertDialogContent.js.map +1 -1
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/badge/Badge.d.ts +4 -4
- package/dist/components/badge/BadgeText.js +1 -1
- package/dist/components/badge/BadgeText.js.map +1 -1
- package/dist/components/banner/BannerContainer.d.ts +4 -4
- package/dist/components/banner/banner-regular/BannerRegular.d.ts +11 -11
- package/dist/components/banner/banner-regular/BannerRegularDismiss.d.ts +2 -2
- package/dist/components/banner/banner-regular/BannerRegularImage.js +1 -1
- package/dist/components/banner/banner-regular/BannerRegularImage.js.map +1 -1
- package/dist/components/banner/banner-slim/BannerSlim.d.ts +27 -27
- package/dist/components/banner/banner-slim/BannerSlimContent.d.ts +4 -4
- package/dist/components/banner/banner-slim/BannerSlimDismiss.d.ts +2 -2
- package/dist/components/banner/banner-slim/BannerSlimImage.js +1 -1
- package/dist/components/banner/banner-slim/BannerSlimImage.js.map +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/carousel/Carousel.js +1 -1
- package/dist/components/carousel/Carousel.js.map +1 -1
- package/dist/components/carousel/CarouselArrows.js +1 -1
- package/dist/components/carousel/CarouselArrows.js.map +1 -1
- package/dist/components/carousel/CarouselSlider.js +1 -1
- package/dist/components/carousel/CarouselSlider.js.map +1 -1
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/checkbox-tree/CheckboxTree.d.ts +123 -123
- package/dist/components/chip/Chip.d.ts +14 -14
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.d.ts +5 -5
- package/dist/components/chip-toggle-group/ChipToggleGroupItem.d.ts +5 -5
- package/dist/components/chip-toggle-group/ChipToggleGroupItem.js +1 -1
- package/dist/components/chip-toggle-group/ChipToggleGroupItem.js.map +1 -1
- package/dist/components/combobox/ComboboxInput.js +1 -1
- package/dist/components/combobox/ComboboxOption.js +1 -1
- package/dist/components/combobox/ComboboxOption.js.map +1 -1
- package/dist/components/combobox/ComboboxPopover.js +1 -1
- package/dist/components/combobox/ComboboxPopover.js.map +1 -1
- package/dist/components/create-password-field/CreatePasswordField.d.ts +1 -2
- package/dist/components/create-password-field/CreatePasswordField.js +1 -1
- package/dist/components/create-password-field/CreatePasswordField.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +9 -9
- package/dist/components/data-table/DataTableHead.d.ts +1 -1
- package/dist/components/data-table/DataTableHead.js +1 -1
- package/dist/components/data-table/DataTableHead.js.map +1 -1
- package/dist/components/data-table/DataTableHeaderCell.js +1 -1
- package/dist/components/data-table/DataTableHeaderCell.js.map +1 -1
- package/dist/components/data-table/DataTableRow.js +1 -1
- package/dist/components/data-table/DataTableRow.js.map +1 -1
- package/dist/components/data-table/DataTableRowSelectionCheckbox.js +1 -1
- package/dist/components/data-table/DataTableRowSelectionCheckbox.js.map +1 -1
- package/dist/components/date-input/DateInput.js +1 -1
- package/dist/components/date-input/DateInput.js.map +1 -1
- package/dist/components/dialog/DialogContent.js +1 -1
- package/dist/components/dialog/DialogContent.js.map +1 -1
- package/dist/components/drawer/DrawerContent.js +1 -1
- package/dist/components/drawer/DrawerContent.js.map +1 -1
- package/dist/components/drawer/DrawerFooter.js +1 -1
- package/dist/components/drawer/DrawerFooter.js.map +1 -1
- package/dist/components/drawer/DrawerHeader.js +1 -1
- package/dist/components/drawer/DrawerHeader.js.map +1 -1
- package/dist/components/drawer/DrawerMain.js +1 -1
- package/dist/components/drawer/DrawerMain.js.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenuContent.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuContent.js.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenuItem.d.ts +2 -428
- package/dist/components/dropdown-menu/DropdownMenuItem.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuItem.js.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenuTrigger.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuTrigger.js.map +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +4 -4
- package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
- package/dist/components/field-wrapper/InlineFieldWrapper.js.map +1 -1
- package/dist/components/flex/Flex.d.ts +4 -4
- package/dist/components/flex/Flex.js +1 -1
- package/dist/components/flex/Flex.js.map +1 -1
- package/dist/components/grid/Grid.d.ts +1 -3
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/grid/Grid.js.map +1 -1
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/icon/Icon.js.map +1 -1
- package/dist/components/inline-message/InlineMessage.config.d.ts +0 -2
- package/dist/components/inline-message/InlineMessage.config.js +1 -1
- package/dist/components/inline-message/InlineMessage.config.js.map +1 -1
- package/dist/components/inline-message/InlineMessage.d.ts +5 -6
- package/dist/components/inline-message/InlineMessage.js +1 -1
- package/dist/components/inline-message/InlineMessage.js.map +1 -1
- package/dist/components/input/Input.d.ts +4 -4
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/label/Label.d.ts +1 -1
- package/dist/components/link/Link.js +1 -1
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/list/List.js +1 -1
- package/dist/components/list/List.js.map +1 -1
- package/dist/components/loader/Loader.js +1 -1
- package/dist/components/loader/Loader.js.map +1 -1
- package/dist/components/markdown-content/MarkdownContent.d.ts +4 -4
- package/dist/components/markdown-content/MarkdownContent.js +1 -1
- package/dist/components/markdown-content/MarkdownContent.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownList.d.ts +1 -1
- package/dist/components/markdown-content/components/MarkdownList.js.map +1 -1
- package/dist/components/navigation/NavigationMenu.js +1 -1
- package/dist/components/navigation/NavigationMenu.js.map +1 -1
- package/dist/components/navigation/NavigationMenuDropdownTrigger.js +1 -1
- package/dist/components/navigation/NavigationMenuDropdownTrigger.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +5 -5
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.d.ts +7 -7
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.js +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.js.map +1 -1
- package/dist/components/number-input/NumberInput.js +1 -1
- package/dist/components/number-input/NumberInputStepper.d.ts +2 -2
- package/dist/components/number-input/NumberInputStepper.js +1 -1
- package/dist/components/number-input/NumberInputStepper.js.map +1 -1
- package/dist/components/pagination/PaginationNextButton.d.ts +2 -2
- package/dist/components/pagination/PaginationPage.js +1 -1
- package/dist/components/pagination/PaginationPage.js.map +1 -1
- package/dist/components/pagination/PaginationPreviousButton.d.ts +2 -2
- package/dist/components/password-field/PasswordField.js.map +1 -1
- package/dist/components/password-input/PasswordInput.js +1 -1
- package/dist/components/password-input/PasswordInput.js.map +1 -1
- package/dist/components/popover/PopoverContent.js +1 -1
- package/dist/components/popover/PopoverContent.js.map +1 -1
- package/dist/components/progress-bar/ProgressBar.js +1 -1
- package/dist/components/progress-bar/ProgressBar.js.map +1 -1
- package/dist/components/radio-button/RadioButton.js +1 -1
- package/dist/components/radio-button/RadioButton.js.map +1 -1
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/section-message/SectionMessageLayout.js +1 -1
- package/dist/components/section-message/SectionMessageLayout.js.map +1 -1
- package/dist/components/segmented-control/SegmentedControlItem.js +1 -1
- package/dist/components/segmented-control/SegmentedControlItem.js.map +1 -1
- package/dist/components/segmented-control/SegmentedControlItemList.js +1 -1
- package/dist/components/segmented-control/SegmentedControlItemList.js.map +1 -1
- package/dist/components/select/Select.js +1 -1
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/side-bar/SideBar.d.ts +1 -1
- package/dist/components/side-bar/SideBar.js +1 -1
- package/dist/components/side-bar/SideBar.js.map +1 -1
- package/dist/components/slider/Slider.d.ts +372 -2
- package/dist/components/slider/Slider.js +1 -1
- package/dist/components/slider/Slider.js.map +1 -1
- package/dist/components/sortable/Handle.d.ts +2 -2
- package/dist/components/sortable/Handle.js +1 -1
- package/dist/components/sortable/Handle.js.map +1 -1
- package/dist/components/sortable/SortableItem.d.ts +3 -1
- package/dist/components/sortable/SortableItem.js +1 -1
- package/dist/components/sortable/SortableItem.js.map +1 -1
- package/dist/components/sortable/index.d.ts +1 -1
- package/dist/components/stepper/StepperStepBullet.d.ts +4 -4
- package/dist/components/stepper/StepperStepContainer.d.ts +4 -4
- package/dist/components/stepper/StepperStepContainer.js +1 -1
- package/dist/components/stepper/StepperStepContainer.js.map +1 -1
- package/dist/components/stepper/StepperSteps.js +1 -1
- package/dist/components/stepper/StepperSteps.js.map +1 -1
- package/dist/components/switch/Switch.js +1 -1
- package/dist/components/switch/Switch.js.map +1 -1
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/TableBody.js +1 -1
- package/dist/components/table/TableBody.js.map +1 -1
- package/dist/components/table/TableHeader.d.ts +1 -1
- package/dist/components/table/TableHeader.js +1 -1
- package/dist/components/table/TableHeader.js.map +1 -1
- package/dist/components/table/TableRow.d.ts +2 -1
- package/dist/components/table/TableRow.js +1 -1
- package/dist/components/table/TableRow.js.map +1 -1
- package/dist/components/tabs/TabsTrigger.js +1 -1
- package/dist/components/tabs/TabsTrigger.js.map +1 -1
- package/dist/components/text/Text.js +1 -1
- package/dist/components/text/Text.js.map +1 -1
- package/dist/components/tile/TileGroup.d.ts +4 -4
- package/dist/components/tile-interactive/TileInteractive.js +1 -1
- package/dist/components/tile-interactive/TileInteractive.js.map +1 -1
- package/dist/components/toast/Toast.d.ts +5 -23
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components/toast/ToastProvider.js +1 -1
- package/dist/components/toast/ToastProvider.js.map +1 -1
- package/dist/components/toggle-group/ToggleGroupButton.js +1 -1
- package/dist/components/toggle-group/ToggleGroupButton.js.map +1 -1
- package/dist/components/toggle-group/ToggleGroupItem.js +1 -1
- package/dist/components/toggle-group/ToggleGroupItem.js.map +1 -1
- package/dist/components/toggle-group/ToggleGroupRoot.js +1 -1
- package/dist/components/toggle-group/ToggleGroupRoot.js.map +1 -1
- package/dist/components/toggle-group/index.d.ts +5 -5
- package/dist/components/tooltip/TooltipContent.js +1 -1
- package/dist/components/tooltip/TooltipContent.js.map +1 -1
- package/dist/components/top-bar/TopBar.d.ts +2 -2
- package/dist/components/top-bar/TopBar.js +1 -1
- package/dist/components/top-bar/TopBar.js.map +1 -1
- package/dist/components/tree/Tree.d.ts +100 -100
- package/dist/components/tree/TreeCollapsibleTrigger.js +1 -1
- package/dist/components/tree/TreeCollapsibleTrigger.js.map +1 -1
- package/dist/components/tree/TreeItemContent.d.ts +5 -5
- package/dist/components/tree/TreeListItem.d.ts +5 -5
- package/dist/components/video/Video.js +1 -1
- package/dist/components/video/Video.js.map +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/utilities/index.d.ts +1 -2
- package/dist/utilities/no-overflow-wrapper/NoOverflowWrapper.d.ts +1 -374
- package/dist/utilities/no-overflow-wrapper/NoOverflowWrapper.js +1 -1
- package/dist/utilities/no-overflow-wrapper/NoOverflowWrapper.js.map +1 -1
- package/dist/utilities/no-overflow-wrapper/index.d.ts +1 -1
- package/dist/utilities/style/backdrop-overlay.js +1 -1
- package/dist/utilities/style/backdrop-overlay.js.map +1 -1
- package/dist/utilities/style/index.d.ts +0 -2
- package/package.json +1 -1
- package/dist/components/drawer/Drawer.styles.d.ts +0 -4
- package/dist/components/drawer/Drawer.styles.js +0 -2
- package/dist/components/drawer/Drawer.styles.js.map +0 -1
- package/dist/constants/zIndices.d.ts +0 -6
- package/dist/constants/zIndices.js +0 -2
- package/dist/constants/zIndices.js.map +0 -1
- package/dist/utilities/create-theme-variants/createThemeVariants.d.ts +0 -22
- package/dist/utilities/create-theme-variants/createThemeVariants.js +0 -2
- package/dist/utilities/create-theme-variants/createThemeVariants.js.map +0 -1
- package/dist/utilities/create-theme-variants/index.d.ts +0 -1
- package/dist/utilities/style/disabledStyle.d.ts +0 -2
- package/dist/utilities/style/disabledStyle.js +0 -2
- package/dist/utilities/style/disabledStyle.js.map +0 -1
- package/dist/utilities/style/focus-visible-style-block.d.ts +0 -13
- package/dist/utilities/style/focus-visible-style-block.js +0 -2
- package/dist/utilities/style/focus-visible-style-block.js.map +0 -1
- package/dist/utilities/style/reset.d.ts +0 -13
- package/dist/utilities/style/reset.js +0 -2
- package/dist/utilities/style/reset.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownContent.js","sources":["../../../src/components/markdown-content/MarkdownContent.tsx"],"sourcesContent":["import directive from 'mdast-util-directive'\nimport fromMarkdown from 'mdast-util-from-markdown'\nimport syntax from 'micromark-extension-directive'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { Flex } from '../flex/Flex'\nimport {
|
|
1
|
+
{"version":3,"file":"MarkdownContent.js","sources":["../../../src/components/markdown-content/MarkdownContent.tsx"],"sourcesContent":["import directive from 'mdast-util-directive'\nimport fromMarkdown from 'mdast-util-from-markdown'\nimport syntax from 'micromark-extension-directive'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { Flex } from '../flex/Flex'\nimport {\n MarkdownCode,\n MarkdownEmphasis,\n MarkdownHeading,\n MarkdownImage,\n MarkdownInlineCode,\n MarkdownLink,\n MarkdownList,\n MarkdownListItem,\n MarkdownParagraph,\n MarkdownStrong,\n MarkdownText,\n MarkdownThematicBreak\n} from './components'\n\ntype HandleNode = (node) => JSX.Element | null\n\nconst StyledMarkdownContent = styled(Flex, {\n '& > h1, & > h2, & > h3, & > h4': { maxWidth: '65ch' },\n '& > p': { maxWidth: '75ch' },\n '& > ul': { maxWidth: '75ch' }\n})\n\ntype MarkdownContentProps = React.ComponentProps<\n typeof StyledMarkdownContent\n> & {\n content: string\n customComponents?: {\n [key: string]: (props: { node: any; handleNode: HandleNode }) => 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) => {\n if (node.position?.start) {\n const { line, column, offset } = node.position?.start\n return `${node.type}${line}${column}${offset}`\n }\n\n return `${node.type}${+new Date()}`\n}\n\nexport const MarkdownContent = ({\n content,\n customComponents = {},\n css\n}: MarkdownContentProps) => {\n const AST = fromMarkdown(content, {\n extensions: [syntax()],\n mdastExtensions: [directive.fromMarkdown]\n })\n\n const componentsMap = {\n ...defaultComponentsMap,\n ...customComponents\n }\n\n const handleNode: HandleNode = (node) => {\n const MarkdownComponent = componentsMap[node.type]\n\n return MarkdownComponent ? (\n <MarkdownComponent\n key={generateNodeKey(node)}\n node={node}\n handleNode={handleNode}\n />\n ) : null\n }\n\n return (\n <StyledMarkdownContent direction=\"column\" gap={5} css={css}>\n {AST.children.map(handleNode)}\n </StyledMarkdownContent>\n )\n}\n\nMarkdownContent.displayName = 'MarkdownContent'\n"],"names":["StyledMarkdownContent","styled","Flex","defaultComponentsMap","MarkdownCode","MarkdownEmphasis","MarkdownHeading","MarkdownInlineCode","MarkdownImage","MarkdownLink","MarkdownList","MarkdownListItem","MarkdownParagraph","MarkdownStrong","MarkdownText","MarkdownThematicBreak","generateNodeKey","node","_a","_b","line","column","offset","MarkdownContent","content","customComponents","css","AST","fromMarkdown","syntax","directive","componentsMap","handleNode","MarkdownComponent","React"],"mappings":"u/BAyBA,MAAMA,EAAwBC,EAAOC,EAAM,CACzC,iCAAkC,CAAE,SAAU,MAAO,EACrD,QAAS,CAAE,SAAU,MAAO,EAC5B,SAAU,CAAE,SAAU,MAAO,CAC/B,CAAC,EAWKC,EAAuB,CAC3B,KAAMC,EACN,SAAUC,EACV,QAASC,EACT,WAAYC,EACZ,MAAOC,EACP,KAAMC,EACN,KAAMC,EACN,SAAUC,EACV,UAAWC,EACX,OAAQC,EACR,KAAMC,EACN,cAAeC,CACjB,EAEMC,EAAmBC,GAAS,CAvDlC,IAAAC,EAAAC,EAwDE,IAAID,EAAAD,EAAK,WAAL,MAAAC,EAAe,MAAO,CACxB,KAAM,CAAE,KAAAE,EAAM,OAAAC,EAAQ,OAAAC,CAAO,GAAIH,EAAAF,EAAK,WAAL,KAAAE,OAAAA,EAAe,MAChD,MAAO,GAAGF,EAAK,OAAOG,IAAOC,IAASC,GACxC,CAEA,MAAO,GAAGL,EAAK,OAAO,CAAC,IAAI,MAC7B,EAEaM,EAAkB,CAAC,CAC9B,QAAAC,EACA,iBAAAC,EAAmB,CACnB,EAAA,IAAAC,CACF,IAA4B,CAC1B,MAAMC,EAAMC,EAAaJ,EAAS,CAChC,WAAY,CAACK,EAAO,CAAC,EACrB,gBAAiB,CAACC,EAAU,YAAY,CAC1C,CAAC,EAEKC,EAAgB,CACpB,GAAG5B,EACH,GAAGsB,CACL,EAEMO,EAA0Bf,GAAS,CACvC,MAAMgB,EAAoBF,EAAcd,EAAK,MAE7C,OAAOgB,EACLC,EAAA,cAACD,EAAA,CACC,IAAKjB,EAAgBC,CAAI,EACzB,KAAMA,EACN,WAAYe,CAAAA,CACd,EACE,IACN,EAEA,OACEE,EAAA,cAAClC,EAAA,CAAsB,UAAU,SAAS,IAAK,EAAG,IAAK0B,CAAAA,EACpDC,EAAI,SAAS,IAAIK,CAAU,CAC9B,CAEJ,EAEAT,EAAgB,YAAc"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Content, List as ListType } from 'mdast';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { CSS } from '../../../stitches';
|
|
3
|
+
import { type CSS } from '../../../stitches';
|
|
4
4
|
type MarkdownListProps = {
|
|
5
5
|
node: ListType;
|
|
6
6
|
handleNode: (node: Content) => React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownList.js","sources":["../../../../src/components/markdown-content/components/MarkdownList.tsx"],"sourcesContent":["import type { Content, List as ListType } from 'mdast'\nimport * as React from 'react'\n\nimport { CSS } from '~/stitches'\n\nimport { List } from '../../list'\n\ntype MarkdownListProps = {\n node: ListType\n handleNode: (node: Content) => React.ReactElement\n css?: CSS\n}\n\nexport const MarkdownList = ({ node, handleNode, css }: MarkdownListProps) => (\n <List\n css={\n
|
|
1
|
+
{"version":3,"file":"MarkdownList.js","sources":["../../../../src/components/markdown-content/components/MarkdownList.tsx"],"sourcesContent":["import type { Content, List as ListType } from 'mdast'\nimport * as React from 'react'\n\nimport { type CSS } from '~/stitches'\n\nimport { List } from '../../list'\n\ntype MarkdownListProps = {\n node: ListType\n handleNode: (node: Content) => React.ReactElement\n css?: CSS\n}\n\nexport const MarkdownList = ({ node, handleNode, css }: MarkdownListProps) => (\n <List\n css={{\n '& p': { display: 'inline' },\n '& p:before, & p:after': { display: 'none' },\n ...css\n }}\n ordered={node.ordered || undefined}\n >\n {node.children?.map(handleNode)}\n </List>\n)\n"],"names":["MarkdownList","node","handleNode","css","_a","React","List"],"mappings":"kEAaO,MAAMA,EAAe,CAAC,CAAE,KAAAC,EAAM,WAAAC,EAAY,IAAAC,CAAI,IAAsB,CAb3E,IAAAC,EAcE,OAAAC,EAAA,cAACC,EAAA,CACC,IAAK,CACH,MAAO,CAAE,QAAS,QAAS,EAC3B,wBAAyB,CAAE,QAAS,MAAO,EAC3C,GAAGH,CACL,EACA,QAASF,EAAK,SAAW,MAExBG,GAAAA,EAAAH,EAAK,WAAL,KAAA,OAAAG,EAAe,IAAIF,CACtB,CAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from"@radix-ui/react-navigation-menu";import t from"react";import{keyframes as N,styled as o}from"../../stitches.js";import{fadeOut as h}from"../../utilities/style/keyframe-animations.js";import{NavigationMenuContext as M}from"./NavigationMenuContext.js";import{NavigationMenuDropdown as D}from"./NavigationMenuDropdown.js";import{NavigationMenuDropdownContent as C}from"./NavigationMenuDropdownContent.js";import{NavigationMenuDropdownItem as E,NavigationMenuDropdownItemTitle as x}from"./NavigationMenuDropdownItem.js";import{NavigationMenuDropdownTrigger as I}from"./NavigationMenuDropdownTrigger.js";import{NavigationMenuLink as T}from"./NavigationMenuLink.js";import{colorSchemes as j}from"./stitches.navigationMenu.colorscheme.config.js";const L=N({"0%, 50%":{opacity:0},"100%":{opacity:1}}),S=o(r.Root,{display:"flex",justifyContent:"center",position:"relative"}),W=o(r.List,{all:"unset",display:"flex",justifyContent:"center",alignItems:"center",gap:"$1",listStyle:"none"}),$=o(r.Viewport,{zIndex:2147483647}),k=o("div",{position:"absolute",left:0,top:"100%",width:"100%",display:"flex",justifyContent:"center"}),m=({children:s,css:f,...u})=>{const[p,l]=t.useState(),[n,d]=t.useState(),[i,c]=t.useState(0),a=t.useRef(null);t.useLayoutEffect(()=>{a.current&&c(a.current.offsetWidth)},[t.Children.toArray(s).length]),t.useEffect(()=>{let e;return n===""&&(e=setTimeout(()=>l(null),200)),()=>{e!==null&&clearTimeout(e)}},[n]);const g=(e,v)=>{if(e&&i&&n===v){const y=i/2,w=i-e.offsetLeft-e.offsetWidth+e.offsetWidth/2;l(Math.round(y-w))}return e};return t.createElement(M.Provider,{value:{onNodeUpdate:g}},t.createElement(S,{className:j.light,onValueChange:d,css:f,...u},t.createElement(W,{ref:a},s),t.createElement(k,null,t.createElement($,{style:{"--navigation-menu-viewport-offset":`${p||0}px`},css:{transform:"translateX(var(--navigation-menu-viewport-offset))",'&[data-state="open"]':{animation:`${L} 200ms ease`},'&[data-state="closed"]':{animation:`${h} 200ms ease-out`}}}))))},V=Object.assign(m,{Link:T,Dropdown:D,DropdownContent:C,DropdownItem:E,DropdownItemTitle:x,DropdownTrigger:I});m.displayName="NavigationMenu";export{V as NavigationMenu};
|
|
2
2
|
//# sourceMappingURL=NavigationMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenu.js","sources":["../../../src/components/navigation/NavigationMenu.tsx"],"sourcesContent":["import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport {
|
|
1
|
+
{"version":3,"file":"NavigationMenu.js","sources":["../../../src/components/navigation/NavigationMenu.tsx"],"sourcesContent":["import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { keyframes, styled } from '~/stitches'\nimport { fadeOut } from '~/utilities/style/keyframe-animations'\n\nimport { NavigationMenuContext } from './NavigationMenuContext'\nimport { NavigationMenuDropdown } from './NavigationMenuDropdown'\nimport { NavigationMenuDropdownContent } from './NavigationMenuDropdownContent'\nimport {\n NavigationMenuDropdownItem,\n NavigationMenuDropdownItemTitle\n} from './NavigationMenuDropdownItem'\nimport { NavigationMenuDropdownTrigger } from './NavigationMenuDropdownTrigger'\nimport { NavigationMenuLink } from './NavigationMenuLink'\nimport { colorSchemes as navigationMenuColorSchemes } from './stitches.navigationMenu.colorscheme.config'\n\nconst delayedFadeIn = keyframes({\n '0%, 50%': { opacity: 0 },\n '100%': { opacity: 1 }\n})\n\nconst StyledMenu = styled(NavigationMenuPrimitive.Root, {\n display: 'flex',\n justifyContent: 'center',\n position: 'relative'\n})\n\nconst StyledList = styled(NavigationMenuPrimitive.List, {\n all: 'unset',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n gap: '$1',\n listStyle: 'none'\n})\n\nconst StyledViewport = styled(NavigationMenuPrimitive.Viewport, {\n zIndex: 2147483647\n})\n\nconst ViewportPosition = styled('div', {\n position: 'absolute',\n left: 0,\n top: '100%',\n width: '100%',\n display: 'flex',\n justifyContent: 'center'\n})\n\nconst NavigationMenuComponent = ({\n children,\n css,\n ...props\n}: React.ComponentProps<typeof StyledMenu>) => {\n const [offset, setOffset] = React.useState<number | null | undefined>()\n const [activeItem, setActiveItem] = React.useState<string | undefined>()\n const [listWidth, setListWidth] = React.useState(0)\n const listRef = React.useRef<HTMLUListElement>(null)\n\n React.useLayoutEffect(() => {\n if (listRef.current) {\n setListWidth(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(null), 200)\n }\n\n return () => {\n if (timer !== null) {\n clearTimeout(timer)\n }\n }\n }, [activeItem])\n\n // https://github.com/radix-ui/primitives/issues/1462\n const onNodeUpdate = (trigger: HTMLButtonElement, itemValue: string) => {\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\n return (\n <NavigationMenuContext.Provider value={{ onNodeUpdate }}>\n <StyledMenu\n className={navigationMenuColorSchemes['light']}\n onValueChange={setActiveItem}\n css={css}\n {...props}\n >\n <StyledList ref={listRef}>{children}</StyledList>\n <ViewportPosition>\n <StyledViewport\n style={{ '--navigation-menu-viewport-offset': `${offset || 0}px` }}\n css={{\n transform: `translateX(var(--navigation-menu-viewport-offset))`,\n '&[data-state=\"open\"]': {\n animation: `${delayedFadeIn} 200ms ease`\n },\n '&[data-state=\"closed\"]': {\n animation: `${fadeOut} 200ms ease-out`\n }\n }}\n />\n </ViewportPosition>\n </StyledMenu>\n </NavigationMenuContext.Provider>\n )\n}\n\nexport const NavigationMenu = Object.assign(NavigationMenuComponent, {\n Link: NavigationMenuLink,\n Dropdown: NavigationMenuDropdown,\n DropdownContent: NavigationMenuDropdownContent,\n DropdownItem: NavigationMenuDropdownItem,\n DropdownItemTitle: NavigationMenuDropdownItemTitle,\n DropdownTrigger: NavigationMenuDropdownTrigger\n})\n\nNavigationMenuComponent.displayName = 'NavigationMenu'\n"],"names":["delayedFadeIn","keyframes","StyledMenu","styled","NavigationMenuPrimitive","StyledList","StyledViewport","ViewportPosition","NavigationMenuComponent","children","css","props","offset","setOffset","React","activeItem","setActiveItem","listWidth","setListWidth","listRef","timer","onNodeUpdate","trigger","itemValue","listCenter","triggerOffsetRight","NavigationMenuContext","navigationMenuColorSchemes","fadeOut","NavigationMenu","NavigationMenuLink","NavigationMenuDropdown","NavigationMenuDropdownContent","NavigationMenuDropdownItem","NavigationMenuDropdownItemTitle","NavigationMenuDropdownTrigger"],"mappings":"ovBAiBA,MAAMA,EAAgBC,EAAU,CAC9B,UAAW,CAAE,QAAS,CAAE,EACxB,OAAQ,CAAE,QAAS,CAAE,CACvB,CAAC,EAEKC,EAAaC,EAAOC,EAAwB,KAAM,CACtD,QAAS,OACT,eAAgB,SAChB,SAAU,UACZ,CAAC,EAEKC,EAAaF,EAAOC,EAAwB,KAAM,CACtD,IAAK,QACL,QAAS,OACT,eAAgB,SAChB,WAAY,SACZ,IAAK,KACL,UAAW,MACb,CAAC,EAEKE,EAAiBH,EAAOC,EAAwB,SAAU,CAC9D,OAAQ,UACV,CAAC,EAEKG,EAAmBJ,EAAO,MAAO,CACrC,SAAU,WACV,KAAM,EACN,IAAK,OACL,MAAO,OACP,QAAS,OACT,eAAgB,QAClB,CAAC,EAEKK,EAA0B,CAAC,CAC/B,SAAAC,EACA,IAAAC,KACGC,CACL,IAA+C,CAC7C,KAAM,CAACC,EAAQC,CAAS,EAAIC,EAAM,SAC5B,EAAA,CAACC,EAAYC,CAAa,EAAIF,EAAM,SAA6B,EACjE,CAACG,EAAWC,CAAY,EAAIJ,EAAM,SAAS,CAAC,EAC5CK,EAAUL,EAAM,OAAyB,IAAI,EAEnDA,EAAM,gBAAgB,IAAM,CACtBK,EAAQ,SACVD,EAAaC,EAAQ,QAAQ,WAAW,CAE5C,EAAG,CAACL,EAAM,SAAS,QAAQL,CAAQ,EAAE,MAAM,CAAC,EAE5CK,EAAM,UAAU,IAAM,CACpB,IAAIM,EAIJ,OAAIL,IAAe,KACjBK,EAAQ,WAAW,IAAMP,EAAU,IAAI,EAAG,GAAG,GAGxC,IAAM,CACPO,IAAU,MACZ,aAAaA,CAAK,CAEtB,CACF,EAAG,CAACL,CAAU,CAAC,EAGf,MAAMM,EAAe,CAACC,EAA4BC,IAAsB,CACtE,GAAID,GAAWL,GAAaF,IAAeQ,EAAW,CACpD,MAAMC,EAAaP,EAAY,EAEzBQ,EACJR,EACAK,EAAQ,WACRA,EAAQ,YACRA,EAAQ,YAAc,EAExBT,EAAU,KAAK,MAAMW,EAAaC,CAAkB,CAAC,CACvD,CAEA,OAAOH,CACT,EAEA,OACER,EAAA,cAACY,EAAsB,SAAtB,CAA+B,MAAO,CAAE,aAAAL,CAAa,CACpDP,EAAAA,EAAA,cAACZ,EAAA,CACC,UAAWyB,EAA2B,MACtC,cAAeX,EACf,IAAKN,EACJ,GAAGC,CAEJG,EAAAA,EAAA,cAACT,EAAA,CAAW,IAAKc,CAAAA,EAAUV,CAAS,EACpCK,EAAA,cAACP,EAAA,KACCO,EAAA,cAACR,EAAA,CACC,MAAO,CAAE,oCAAqC,GAAGM,GAAU,KAAM,EACjE,IAAK,CACH,UAAW,qDACX,uBAAwB,CACtB,UAAW,GAAGZ,cAChB,EACA,yBAA0B,CACxB,UAAW,GAAG4B,kBAChB,CACF,CAAA,CACF,CACF,CACF,CACF,CAEJ,EAEaC,EAAiB,OAAO,OAAOrB,EAAyB,CACnE,KAAMsB,EACN,SAAUC,EACV,gBAAiBC,EACjB,aAAcC,EACd,kBAAmBC,EACnB,gBAAiBC,CACnB,CAAC,EAED3B,EAAwB,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ChevronDown as
|
|
1
|
+
import{ChevronDown as m}from"@atom-learning/icons";import*as s from"@radix-ui/react-navigation-menu";import e from"react";import{styled as p}from"../../stitches.js";import{Icon as d}from"../icon/Icon.js";import{navigationMenuBaseItemStyles as f,navigationMenuActiveItemStyles as c}from"./NavigationMenu.styles.js";import{preventEvent as t}from"../../utilities/event/preventEvent.js";const g=p(s.Trigger,f,{display:"flex",alignItems:"center",borderRadius:"$1",justifyContent:"space-between",'&[data-state="open"]':{background:"$triggerBackgroundOpen"},variants:{active:{true:{...c}}}}),r=e.forwardRef(({children:o,active:n,...a},i)=>e.createElement(g,{active:n,...a,ref:i,onPointerMove:t,onPointerLeave:t},o,e.createElement(d,{is:m,css:{ml:"$1","[data-state=open] &":{transform:"rotate(-180deg)"},"@media (prefers-reduced-motion: no-preference)":{transition:"transform 200ms ease"}},size:"sm"})));r.displayName="NavigationMenuDropdownTrigger";export{r as NavigationMenuDropdownTrigger};
|
|
2
2
|
//# sourceMappingURL=NavigationMenuDropdownTrigger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuDropdownTrigger.js","sources":["../../../src/components/navigation/NavigationMenuDropdownTrigger.tsx"],"sourcesContent":["import { ChevronDown } from '@atom-learning/icons'\nimport * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/stitches'\nimport { preventEvent } from '~/utilities/event'\n\nimport { Icon } from '../icon'\nimport {\n navigationMenuActiveItemStyles,\n navigationMenuBaseItemStyles\n} from './NavigationMenu.styles'\n\nconst StyledTrigger = styled(\n NavigationMenuPrimitive.Trigger,\n navigationMenuBaseItemStyles,\n {\n display: 'flex',\n alignItems: 'center',\n borderRadius: '$1',\n justifyContent: 'space-between',\n '&[data-state=\"open\"]': {\n background: '$triggerBackgroundOpen'\n },\n variants: {\n active: { true: { ...navigationMenuActiveItemStyles } }\n }\n }\n)\n\nexport const NavigationMenuDropdownTrigger: React.ForwardRefExoticComponent<\n React.ComponentProps<typeof StyledTrigger>\n> = React.forwardRef(({ children, active, ...props }, forwardedRef) => (\n <StyledTrigger\n active={active}\n {...props}\n ref={forwardedRef}\n onPointerMove={preventEvent}\n onPointerLeave={preventEvent}\n >\n {children}\n <Icon\n is={ChevronDown}\n css={{\n ml: '$1',\n '[data-state=open] &': { transform: 'rotate(-180deg)' },\n '@media (prefers-reduced-motion: no-preference)': {\n transition: 'transform
|
|
1
|
+
{"version":3,"file":"NavigationMenuDropdownTrigger.js","sources":["../../../src/components/navigation/NavigationMenuDropdownTrigger.tsx"],"sourcesContent":["import { ChevronDown } from '@atom-learning/icons'\nimport * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/stitches'\nimport { preventEvent } from '~/utilities/event'\n\nimport { Icon } from '../icon'\nimport {\n navigationMenuActiveItemStyles,\n navigationMenuBaseItemStyles\n} from './NavigationMenu.styles'\n\nconst StyledTrigger = styled(\n NavigationMenuPrimitive.Trigger,\n navigationMenuBaseItemStyles,\n {\n display: 'flex',\n alignItems: 'center',\n borderRadius: '$1',\n justifyContent: 'space-between',\n '&[data-state=\"open\"]': {\n background: '$triggerBackgroundOpen'\n },\n variants: {\n active: { true: { ...navigationMenuActiveItemStyles } }\n }\n }\n)\n\nexport const NavigationMenuDropdownTrigger: React.ForwardRefExoticComponent<\n React.ComponentProps<typeof StyledTrigger>\n> = React.forwardRef(({ children, active, ...props }, forwardedRef) => (\n <StyledTrigger\n active={active}\n {...props}\n ref={forwardedRef}\n onPointerMove={preventEvent}\n onPointerLeave={preventEvent}\n >\n {children}\n <Icon\n is={ChevronDown}\n css={{\n ml: '$1',\n '[data-state=open] &': { transform: 'rotate(-180deg)' },\n '@media (prefers-reduced-motion: no-preference)': {\n transition: 'transform 200ms ease'\n }\n }}\n size=\"sm\"\n />\n </StyledTrigger>\n))\n\nNavigationMenuDropdownTrigger.displayName = 'NavigationMenuDropdownTrigger'\n"],"names":["StyledTrigger","styled","NavigationMenuPrimitive","navigationMenuBaseItemStyles","navigationMenuActiveItemStyles","NavigationMenuDropdownTrigger","React","children","active","props","forwardedRef","preventEvent","Icon","ChevronDown"],"mappings":"+XAaA,MAAMA,EAAgBC,EACpBC,EAAwB,QACxBC,EACA,CACE,QAAS,OACT,WAAY,SACZ,aAAc,KACd,eAAgB,gBAChB,uBAAwB,CACtB,WAAY,wBACd,EACA,SAAU,CACR,OAAQ,CAAE,KAAM,CAAE,GAAGC,CAA+B,CAAE,CACxD,CACF,CACF,EAEaC,EAETC,EAAM,WAAW,CAAC,CAAE,SAAAC,EAAU,OAAAC,KAAWC,CAAM,EAAGC,IACpDJ,EAAA,cAACN,EAAA,CACC,OAAQQ,EACP,GAAGC,EACJ,IAAKC,EACL,cAAeC,EACf,eAAgBA,CAAAA,EAEfJ,EACDD,EAAA,cAACM,EAAA,CACC,GAAIC,EACJ,IAAK,CACH,GAAI,KACJ,sBAAuB,CAAE,UAAW,iBAAkB,EACtD,iDAAkD,CAChD,WAAY,sBACd,CACF,EACA,KAAK,IAAA,CACP,CACF,CACD,EAEDR,EAA8B,YAAc"}
|
|
@@ -2745,11 +2745,11 @@ export declare const NavigationMenuVertical: (({ children, ...rest }: TNavigatio
|
|
|
2745
2745
|
}) => JSX.Element;
|
|
2746
2746
|
ItemContent: ({ children, ...rest }: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2747
2747
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
2748
|
-
}, "direction" | "gap" | "css" | "
|
|
2749
|
-
direction?: "inherit" | "initial" | "revert" | "unset" | "row" | "
|
|
2750
|
-
wrap?: "inherit" | "initial" | "revert" | "unset" | "
|
|
2751
|
-
justify?: "left" | "right" | "center" | "stretch" | "inherit" | "initial" | "revert" | "unset" | "
|
|
2752
|
-
align?: "center" | "stretch" | "inherit" | "initial" | "revert" | "unset" | "
|
|
2748
|
+
}, "direction" | "gap" | "css" | "wrap" | "justify" | "align"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
2749
|
+
direction?: "inherit" | "initial" | "revert" | "unset" | "row" | "row-reverse" | "column" | "column-reverse" | "revert-layer" | undefined;
|
|
2750
|
+
wrap?: "inherit" | "initial" | "revert" | "unset" | "revert-layer" | "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
2751
|
+
justify?: "left" | "right" | "center" | "stretch" | "inherit" | "initial" | "revert" | "unset" | "revert-layer" | "normal" | "unsafe" | "safe" | "start" | "end" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
2752
|
+
align?: "center" | "stretch" | "inherit" | "initial" | "revert" | "unset" | "revert-layer" | "normal" | "unsafe" | "safe" | "start" | "end" | "flex-start" | "flex-end" | "self-start" | "self-end" | "baseline" | "first baseline" | "last baseline" | undefined;
|
|
2753
2753
|
gap?: number | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | undefined;
|
|
2754
2754
|
}, {
|
|
2755
2755
|
sm: string;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export declare const navigationMenuVerticalItemStyles: {
|
|
2
|
+
border: string;
|
|
3
|
+
outline: string;
|
|
4
|
+
font: string;
|
|
5
|
+
background: string;
|
|
6
|
+
textAlign: string;
|
|
7
|
+
textDecoration: string;
|
|
2
8
|
cursor: string;
|
|
3
9
|
borderRadius: string;
|
|
4
10
|
display: string;
|
|
@@ -29,7 +35,7 @@ export declare const navigationMenuVerticalItemStyles: {
|
|
|
29
35
|
bg: string;
|
|
30
36
|
};
|
|
31
37
|
'&:focus-visible': {
|
|
32
|
-
outline:
|
|
38
|
+
outline: string;
|
|
33
39
|
position: string;
|
|
34
40
|
zIndex: number;
|
|
35
41
|
boxShadow: string;
|
|
@@ -45,10 +51,4 @@ export declare const navigationMenuVerticalItemStyles: {
|
|
|
45
51
|
};
|
|
46
52
|
};
|
|
47
53
|
};
|
|
48
|
-
textDecoration: string;
|
|
49
|
-
border: string;
|
|
50
|
-
outline: string;
|
|
51
|
-
font: string;
|
|
52
|
-
background: string;
|
|
53
|
-
textAlign: string;
|
|
54
54
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const e={border:"none",outline:"none",font:"inherit",background:"none",textAlign:"inherit",textDecoration:"unset",cursor:"pointer",borderRadius:"$2",display:"flex",alignItems:"center",p:"$2",pl:"var(--navigation-menu-vertical-item-pl)",width:"100%",color:"$text",bg:"$background","--navigation-menu-vertical-item-font-weight":400,"&[data-active]":{bg:"$backgroundSelected",color:"$textSelected","--navigation-menu-vertical-item-font-weight":600},"&[data-state=open]":{"--navigation-menu-vertical-item-font-weight":600},"&[disabled]":{opacity:.3,cursor:"not-allowed"},"&:not([disabled])":{"&:hover":{bg:"$backgroundHover"},"&:active":{bg:"$backgroundActive"},"&:focus-visible":{outline:"none",position:"relative",zIndex:1,boxShadow:"white 0px 0px 0px 2px, $colors$primary800 0px 0px 0px 4px"}},variants:{size:{md:{minHeight:"$4"},lg:{minHeight:"$5"}}}};export{e as navigationMenuVerticalItemStyles};
|
|
2
2
|
//# sourceMappingURL=NavigationMenuVertical.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuVertical.styles.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"NavigationMenuVertical.styles.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts"],"sourcesContent":["export const navigationMenuVerticalItemStyles = {\n border: 'none',\n outline: 'none',\n font: 'inherit',\n background: 'none',\n textAlign: 'inherit',\n textDecoration: 'unset',\n cursor: 'pointer',\n borderRadius: '$2',\n display: 'flex',\n alignItems: 'center',\n p: '$2',\n pl: `var(--navigation-menu-vertical-item-pl)`,\n width: '100%',\n color: '$text',\n bg: '$background',\n '--navigation-menu-vertical-item-font-weight': 400,\n '&[data-active]': {\n bg: '$backgroundSelected',\n color: '$textSelected',\n '--navigation-menu-vertical-item-font-weight': 600\n },\n '&[data-state=open]': {\n '--navigation-menu-vertical-item-font-weight': 600\n },\n '&[disabled]': {\n opacity: 0.3,\n cursor: 'not-allowed'\n },\n '&:not([disabled])': {\n '&:hover': {\n bg: '$backgroundHover'\n },\n '&:active': {\n bg: '$backgroundActive'\n },\n '&:focus-visible': {\n outline: 'none',\n position: 'relative',\n zIndex: 1,\n boxShadow: `white 0px 0px 0px 2px, $colors$primary800 0px 0px 0px 4px`\n }\n },\n variants: {\n size: {\n md: {\n minHeight: '$4'\n },\n lg: {\n minHeight: '$5'\n }\n }\n }\n}\n"],"names":["navigationMenuVerticalItemStyles"],"mappings":"AAAa,MAAAA,EAAmC,CAC9C,OAAQ,OACR,QAAS,OACT,KAAM,UACN,WAAY,OACZ,UAAW,UACX,eAAgB,QAChB,OAAQ,UACR,aAAc,KACd,QAAS,OACT,WAAY,SACZ,EAAG,KACH,GAAI,0CACJ,MAAO,OACP,MAAO,QACP,GAAI,cACJ,8CAA+C,IAC/C,iBAAkB,CAChB,GAAI,sBACJ,MAAO,gBACP,8CAA+C,GACjD,EACA,qBAAsB,CACpB,8CAA+C,GACjD,EACA,cAAe,CACb,QAAS,GACT,OAAQ,aACV,EACA,oBAAqB,CACnB,UAAW,CACT,GAAI,kBACN,EACA,WAAY,CACV,GAAI,mBACN,EACA,kBAAmB,CACjB,QAAS,OACT,SAAU,WACV,OAAQ,EACR,UAAW,2DACb,CACF,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CACF,UAAW,IACb,EACA,GAAI,CACF,UAAW,IACb,CACF,CACF,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Minus as F,Plus as H}from"@atom-learning/icons";import*as r from"react";import{styled as $}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"
|
|
1
|
+
import{Minus as F,Plus as H}from"@atom-learning/icons";import*as r from"react";import{styled as $}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"color2k";import"../../utilities/style/keyframe-animations.js";import{getFieldIconSize as V}from"../../utilities/style/get-icon-size.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import{Flex as X}from"../flex/Flex.js";import{Input as _}from"../input/Input.js";import{NumberInputStepper as k}from"./NumberInputStepper.js";const G=$(X,{variants:{appearance:{standard:{},modern:{gap:"1px"}}}}),N=r.forwardRef(({value:u,defaultValue:T=0,onValueChange:w,min:n=0,max:o=Number.MAX_SAFE_INTEGER,step:m=1,disabled:s=!1,readonly:p=!1,size:x="md",stepperButtonLabels:A,disabledTooltipContent:I,css:M,appearance:d="standard",...z},L)=>{const[a,E]=r.useState(u||T);r.useEffect(()=>{typeof u<"u"&&E(u)},[u]);const l=r.useRef(null);r.useImperativeHandle(L,()=>l.current);const R=r.useMemo(()=>V(x),[x]),h={increment:"increment",decrement:"decrement",...A},y={decrement:`Cannot enter values below ${n}`,increment:`Cannot enter values above ${o}`,...I},c=a>=o,b=a<=n,f=r.useCallback(e=>Math.min(Math.max(e,n),o),[o,n]),t=r.useCallback(e=>{w==null||w(e),E(e)},[w]),B=r.useCallback(e=>{const i=Number(e.target.value.replace(/\D/g,""));t(i)},[t]),v=r.useCallback(()=>{var e;if(c||p)return;(e=l==null?void 0:l.current)==null||e.focus();const i=Number(a)+m;t(f(i))},[f,c,p,m,t,a]),C=r.useCallback(()=>{var e;if(b||p)return;(e=l==null?void 0:l.current)==null||e.focus();const i=Number(a)-m;t(f(i))},[f,b,p,n,m,t,a]),D=r.useCallback(e=>{if(e.nativeEvent.isComposing)return;const i=e.key,g={ArrowUp:v,ArrowRight:v,ArrowDown:C,ArrowLeft:C,Home:()=>t(n),End:()=>t(o)}[i];g&&(e.preventDefault(),g(e))},[v,C,t,n,o]),S={type:"number",value:a,...z,onChange:B,onKeyDown:D,size:x,appearance:d,css:{borderRadius:"0px",width:"$6","&:disabled":{opacity:.3,pointerEvents:"none"}},ref:l,readOnly:p,disabled:s,"aria-valuemin":n,"aria-valuemax":o,"aria-valuenow":a,role:"spinbutton"};return r.createElement(G,{appearance:d,css:M},r.createElement(k,{onClick:C,icon:F,css:{borderRight:"none",borderTopRightRadius:"0px",borderBottomRightRadius:"0px"},size:R,fieldAppearance:d,disabled:b||s,showTooltip:b&&!s,disabledTooltipContent:y.decrement,label:h.decrement}),r.createElement(_,{...S}),r.createElement(k,{onClick:v,icon:H,css:{borderLeft:"none",borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px"},size:R,fieldAppearance:d,disabled:c||s,showTooltip:c&&!s,disabledTooltipContent:y.increment,label:h.increment}))});N.displayName="NumberInput";export{N as NumberInput};
|
|
2
2
|
//# sourceMappingURL=NumberInput.js.map
|
|
@@ -3,7 +3,7 @@ import { ActionIcon } from '../action-icon';
|
|
|
3
3
|
declare const StyledStepperButton: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
4
4
|
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
5
5
|
}, "appearance" | "size" | "css" | "theme" | "isRounded"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
6
|
-
theme?: "success" | "danger" | "warning" | "neutral" | "
|
|
6
|
+
theme?: "success" | "danger" | "warning" | "neutral" | "white" | "primary" | undefined;
|
|
7
7
|
appearance?: "outline" | "solid" | "simple" | undefined;
|
|
8
8
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
9
9
|
isRounded?: boolean | "true" | undefined;
|
|
@@ -378,7 +378,7 @@ declare const StyledStepperButton: import("@atom-learning/stitches-react/types/s
|
|
|
378
378
|
};
|
|
379
379
|
}> | undefined;
|
|
380
380
|
}, "appearance" | "size" | "theme" | "label" | "children" | "as" | keyof import("../../types").NavigatorActions | "hasTooltip" | "tooltipSide" | "isRounded"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
381
|
-
theme?: "success" | "danger" | "warning" | "neutral" | "
|
|
381
|
+
theme?: "success" | "danger" | "warning" | "neutral" | "white" | "primary" | undefined;
|
|
382
382
|
appearance?: "outline" | "solid" | "simple" | undefined;
|
|
383
383
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
384
384
|
isRounded?: boolean | "true" | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as e from"react";import{styled as o}from"../../stitches.js";import{ActionIcon as c}from"../action-icon/ActionIcon.js";import{Icon as m}from"../icon/Icon.js";import{Tooltip as r}from"../tooltip/Tooltip.js";const s=o("span",{zIndex:1}),g=o(c,{borderRadius:"$1",zIndex:1,height:"100% !important","&:hover":{bg:"$grey100",svg:{color:"$grey800"}},svg:{color:"$grey700"},"&:active":{bg:"$grey200",svg:{color:"$grey900"}},"&:disabled":{opacity:.3,pointerEvents:"none"},variants:{fieldAppearance:{standard:{backgroundColor:"white",borderColor:"$grey800 !important"},modern:{backgroundColor:"$grey100",borderColor:"$grey100 !important"}}}}),b=e.forwardRef((t,n)=>{const{icon:a,disabledTooltipContent:i,showTooltip:l,fieldAppearance:p="standard",...d}=t;return e.createElement(r,null,e.createElement(r.Trigger,{asChild:!0},e.createElement(s,{tabIndex:-1},e.createElement(g,{hasTooltip:!1,tabIndex:-1,appearance:"outline",fieldAppearance:p,ref:n,...d},e.createElement(m,{is:a})))),l&&e.createElement(r.Content,null,i))});export{b as NumberInputStepper};
|
|
1
|
+
import*as e from"react";import{styled as o}from"../../stitches.js";import{ActionIcon as c}from"../action-icon/ActionIcon.js";import{Icon as m}from"../icon/Icon.js";import{Tooltip as r}from"../tooltip/Tooltip.js";const s=o("span",{zIndex:1}),g=o(c,{borderRadius:"$1",zIndex:1,height:"100% !important","&:hover":{bg:"$grey100","& svg":{color:"$grey800"}},"& svg":{color:"$grey700"},"&:active":{bg:"$grey200","& svg":{color:"$grey900"}},"&:disabled":{opacity:.3,pointerEvents:"none"},variants:{fieldAppearance:{standard:{backgroundColor:"white",borderColor:"$grey800 !important"},modern:{backgroundColor:"$grey100",borderColor:"$grey100 !important"}}}}),b=e.forwardRef((t,n)=>{const{icon:a,disabledTooltipContent:i,showTooltip:l,fieldAppearance:p="standard",...d}=t;return e.createElement(r,null,e.createElement(r.Trigger,{asChild:!0},e.createElement(s,{tabIndex:-1},e.createElement(g,{hasTooltip:!1,tabIndex:-1,appearance:"outline",fieldAppearance:p,ref:n,...d},e.createElement(m,{is:a})))),l&&e.createElement(r.Content,null,i))});export{b as NumberInputStepper};
|
|
2
2
|
//# sourceMappingURL=NumberInputStepper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInputStepper.js","sources":["../../../src/components/number-input/NumberInputStepper.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { ActionIcon } from '../action-icon'\nimport { Icon } from '../icon'\nimport { Tooltip } from '../tooltip'\n\nconst StyledSpan = styled('span', { zIndex: 1 })\n\nconst StyledStepperButton = styled(ActionIcon, {\n borderRadius: '$1',\n zIndex: 1,\n height: '100% !important',\n '&:hover': {\n bg: '$grey100',\n svg: {
|
|
1
|
+
{"version":3,"file":"NumberInputStepper.js","sources":["../../../src/components/number-input/NumberInputStepper.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { ActionIcon } from '../action-icon'\nimport { Icon } from '../icon'\nimport { Tooltip } from '../tooltip'\n\nconst StyledSpan = styled('span', { zIndex: 1 })\n\nconst StyledStepperButton = styled(ActionIcon, {\n borderRadius: '$1',\n zIndex: 1,\n height: '100% !important',\n '&:hover': {\n bg: '$grey100',\n '& svg': {\n color: '$grey800'\n }\n },\n '& svg': {\n color: '$grey700'\n },\n '&:active': {\n bg: '$grey200',\n '& svg': {\n color: '$grey900'\n }\n },\n '&:disabled': {\n opacity: 0.3,\n pointerEvents: 'none'\n },\n variants: {\n fieldAppearance: {\n standard: {\n backgroundColor: 'white',\n borderColor: '$grey800 !important'\n },\n modern: {\n backgroundColor: '$grey100',\n borderColor: '$grey100 !important'\n }\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: React.ForwardRefExoticComponent<NumberInputStepperProps> =\n React.forwardRef((props, forwardedRef) => {\n const {\n icon,\n disabledTooltipContent,\n showTooltip,\n fieldAppearance = 'standard',\n ...rest\n } = props\n\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 <StyledSpan tabIndex={-1}>\n <StyledStepperButton\n hasTooltip={false}\n tabIndex={-1}\n appearance=\"outline\"\n fieldAppearance={fieldAppearance}\n ref={forwardedRef}\n {...rest}\n >\n <Icon is={icon} />\n </StyledStepperButton>\n </StyledSpan>\n </Tooltip.Trigger>\n {showTooltip && (\n <Tooltip.Content>{disabledTooltipContent}</Tooltip.Content>\n )}\n </Tooltip>\n )\n })\n"],"names":["StyledSpan","styled","StyledStepperButton","ActionIcon","NumberInputStepper","React","props","forwardedRef","icon","disabledTooltipContent","showTooltip","fieldAppearance","rest","Tooltip","Icon"],"mappings":"oNAQA,MAAMA,EAAaC,EAAO,OAAQ,CAAE,OAAQ,CAAE,CAAC,EAEzCC,EAAsBD,EAAOE,EAAY,CAC7C,aAAc,KACd,OAAQ,EACR,OAAQ,kBACR,UAAW,CACT,GAAI,WACJ,QAAS,CACP,MAAO,UACT,CACF,EACA,QAAS,CACP,MAAO,UACT,EACA,WAAY,CACV,GAAI,WACJ,QAAS,CACP,MAAO,UACT,CACF,EACA,aAAc,CACZ,QAAS,GACT,cAAe,MACjB,EACA,SAAU,CACR,gBAAiB,CACf,SAAU,CACR,gBAAiB,QACjB,YAAa,qBACf,EACA,OAAQ,CACN,gBAAiB,WACjB,YAAa,qBACf,CACF,CACF,CACF,CAAC,EAYYC,EACXC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACxC,KAAM,CACJ,KAAAC,EACA,uBAAAC,EACA,YAAAC,EACA,gBAAAC,EAAkB,cACfC,CACL,EAAIN,EAOJ,OACED,EAAA,cAACQ,EAAA,KACCR,EAAA,cAACQ,EAAQ,QAAR,CAAgB,QAAO,EAAA,EACtBR,EAAA,cAACL,EAAA,CAAW,SAAU,EACpBK,EAAAA,EAAA,cAACH,EAAA,CACC,WAAY,GACZ,SAAU,GACV,WAAW,UACX,gBAAiBS,EACjB,IAAKJ,EACJ,GAAGK,CAEJP,EAAAA,EAAA,cAACS,EAAA,CAAK,GAAIN,CAAM,CAAA,CAClB,CACF,CACF,EACCE,GACCL,EAAA,cAACQ,EAAQ,QAAR,KAAiBJ,CAAuB,CAE7C,CAEJ,CAAC"}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
declare const StyledActionIcon: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
4
4
|
}, "appearance" | "size" | "css" | "theme" | "isRounded"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
5
|
-
theme?: "success" | "danger" | "warning" | "neutral" | "
|
|
5
|
+
theme?: "success" | "danger" | "warning" | "neutral" | "white" | "primary" | undefined;
|
|
6
6
|
appearance?: "outline" | "solid" | "simple" | undefined;
|
|
7
7
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
8
8
|
isRounded?: boolean | "true" | undefined;
|
|
@@ -377,7 +377,7 @@ declare const StyledActionIcon: import("@atom-learning/stitches-react/types/styl
|
|
|
377
377
|
};
|
|
378
378
|
}> | undefined;
|
|
379
379
|
}, "appearance" | "size" | "theme" | "label" | "children" | "as" | keyof import("../../types").NavigatorActions | "hasTooltip" | "tooltipSide" | "isRounded"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
380
|
-
theme?: "success" | "danger" | "warning" | "neutral" | "
|
|
380
|
+
theme?: "success" | "danger" | "warning" | "neutral" | "white" | "primary" | undefined;
|
|
381
381
|
appearance?: "outline" | "solid" | "simple" | undefined;
|
|
382
382
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
383
383
|
isRounded?: boolean | "true" | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as u from"react";import{styled as x}from"../../stitches.js";import{usePagination as h}from"./usePagination.js";const $=x("button",{alignItems:"center",border:"1px solid transparent",borderRadius:"$0",cursor:"pointer",fontFamily:"$body",justifyContent:"center",whiteSpace:"nowrap",width:"max-content",display:"flex",flexDirection:"column",p:"0",fontWeight:400,color:"$textSubtle",bg:"$base1",position:"relative","&:not(:disabled)":{"&:hover":{color:"$textRegular",bg:"$base2"},"&:active":{color:"$textBold",bg:"$base3"},"&:focus-visible":{outline:"none",position:"relative",zIndex:1,boxShadow:"white 0px 0px 0px 2px, $colors$primary800 0px 0px 0px 4px"}},"&[disabled]":{opacity:.3,cursor:"not-allowed",pointerEvents:"none"},variants:{size:{md:{width:"$4",height:"$4"}},selected:{true:{border:"1px solid $accent9",color:"$accent9",fontWeight:600,"&:not(:disabled)":{"&:hover":{borderColor:"$accent10",color:"$accent10"},"&:active":{borderColor:"$accent11",color:"$accent11"}}}},indicated:{true:{fontWeight:600,color:"white",bg:"$accent9","&:not(:disabled)":{"&:hover":{color:"white",bg:"$accent10"},"&:active":{color:"white",bg:"$accent11"}}}}},compoundVariants:[{selected:!0,indicated:!0,css:{fontWeight:600,color:"white",bg:"$accent9",boxShadow:"$colors$accent9 0px 0px 0px 1px","&:not(:focus-visible)":{borderColor:"white !important"},"&:not(:disabled)":{"&:hover":{color:"white",bg:"$accent10"},"&:active":{color:"white",bg:"$accent11"}}}}]}),m=({pageNumber:e,css:n,onClick:i})=>{const{currentPage:r,goToPage:a,indicatedPages:l,disabledPages:s,onItemHover:c}=h(),d=l.includes(e),o=s.includes(e),t=r===e,b=()=>{t||o||c==null||c(e)},p=g=>{i==null||i(),a(g)};return u.createElement($,{selected:t,size:"md",onClick:()=>p(e),css:n,indicated:d,disabled:o,"aria-current":t&&"page","aria-disabled":o,onMouseOver:b},e)};export{m as PaginationPage};
|
|
2
2
|
//# sourceMappingURL=PaginationPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationPage.js","sources":["../../../src/components/pagination/PaginationPage.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {
|
|
1
|
+
{"version":3,"file":"PaginationPage.js","sources":["../../../src/components/pagination/PaginationPage.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '../../stitches'\nimport type { PaginationPageProps } from './types'\nimport { usePagination } from './usePagination'\n\nconst StyledButton = styled('button', {\n alignItems: 'center',\n border: '1px solid transparent',\n borderRadius: '$0',\n cursor: 'pointer',\n fontFamily: '$body',\n justifyContent: 'center',\n whiteSpace: 'nowrap',\n width: 'max-content',\n display: 'flex',\n flexDirection: 'column',\n p: '0',\n fontWeight: 400,\n color: '$textSubtle',\n bg: '$base1',\n position: 'relative',\n\n '&:not(:disabled)': {\n '&:hover': {\n color: '$textRegular',\n bg: '$base2'\n },\n '&:active': {\n color: '$textBold',\n bg: '$base3'\n },\n '&:focus-visible': {\n outline: 'none',\n position: 'relative',\n zIndex: 1,\n boxShadow: `white 0px 0px 0px 2px, $colors$primary800 0px 0px 0px 4px`\n }\n },\n '&[disabled]': {\n opacity: 0.3,\n cursor: 'not-allowed',\n pointerEvents: 'none'\n },\n variants: {\n size: {\n md: {\n width: '$4',\n height: '$4'\n }\n },\n selected: {\n true: {\n border: '1px solid $accent9',\n color: '$accent9',\n fontWeight: 600,\n '&:not(:disabled)': {\n '&:hover': {\n borderColor: '$accent10',\n color: '$accent10'\n },\n '&:active': {\n borderColor: '$accent11',\n color: '$accent11'\n }\n }\n }\n },\n indicated: {\n true: {\n fontWeight: 600,\n color: 'white',\n bg: '$accent9',\n '&:not(:disabled)': {\n '&:hover': {\n color: 'white',\n bg: '$accent10'\n },\n '&:active': {\n color: 'white',\n bg: '$accent11'\n }\n }\n }\n }\n },\n\n compoundVariants: [\n {\n selected: true,\n indicated: true,\n css: {\n fontWeight: 600,\n color: 'white',\n bg: '$accent9',\n boxShadow: '$colors$accent9 0px 0px 0px 1px',\n '&:not(:focus-visible)': {\n borderColor: 'white !important'\n },\n '&:not(:disabled)': {\n '&:hover': {\n color: 'white',\n bg: '$accent10'\n },\n '&:active': {\n color: 'white',\n bg: '$accent11'\n }\n }\n }\n }\n ]\n})\n\nexport const PaginationPage = ({\n pageNumber,\n css,\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 css={css}\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"],"names":["StyledButton","styled","PaginationPage","pageNumber","css","onClick","currentPage","goToPage","indicatedPages","disabledPages","onItemHover","usePagination","isIndicated","isDisabled","isSelected","handleOnHover","handleOnClick","React"],"mappings":"sHAMA,MAAMA,EAAeC,EAAO,SAAU,CACpC,WAAY,SACZ,OAAQ,wBACR,aAAc,KACd,OAAQ,UACR,WAAY,QACZ,eAAgB,SAChB,WAAY,SACZ,MAAO,cACP,QAAS,OACT,cAAe,SACf,EAAG,IACH,WAAY,IACZ,MAAO,cACP,GAAI,SACJ,SAAU,WAEV,mBAAoB,CAClB,UAAW,CACT,MAAO,eACP,GAAI,QACN,EACA,WAAY,CACV,MAAO,YACP,GAAI,QACN,EACA,kBAAmB,CACjB,QAAS,OACT,SAAU,WACV,OAAQ,EACR,UAAW,2DACb,CACF,EACA,cAAe,CACb,QAAS,GACT,OAAQ,cACR,cAAe,MACjB,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CACF,MAAO,KACP,OAAQ,IACV,CACF,EACA,SAAU,CACR,KAAM,CACJ,OAAQ,qBACR,MAAO,WACP,WAAY,IACZ,mBAAoB,CAClB,UAAW,CACT,YAAa,YACb,MAAO,WACT,EACA,WAAY,CACV,YAAa,YACb,MAAO,WACT,CACF,CACF,CACF,EACA,UAAW,CACT,KAAM,CACJ,WAAY,IACZ,MAAO,QACP,GAAI,WACJ,mBAAoB,CAClB,UAAW,CACT,MAAO,QACP,GAAI,WACN,EACA,WAAY,CACV,MAAO,QACP,GAAI,WACN,CACF,CACF,CACF,CACF,EAEA,iBAAkB,CAChB,CACE,SAAU,GACV,UAAW,GACX,IAAK,CACH,WAAY,IACZ,MAAO,QACP,GAAI,WACJ,UAAW,kCACX,wBAAyB,CACvB,YAAa,kBACf,EACA,mBAAoB,CAClB,UAAW,CACT,MAAO,QACP,GAAI,WACN,EACA,WAAY,CACV,MAAO,QACP,GAAI,WACN,CACF,CACF,CACF,CACF,CACF,CAAC,EAEYC,EAAiB,CAAC,CAC7B,WAAAC,EACA,IAAAC,EACA,QAAAC,CACF,IAA2B,CACzB,KAAM,CAAE,YAAAC,EAAa,SAAAC,EAAU,eAAAC,EAAgB,cAAAC,EAAe,YAAAC,CAAY,EACxEC,EAEIC,EAAAA,EAAcJ,EAAe,SAASL,CAAU,EAChDU,EAAaJ,EAAc,SAASN,CAAU,EAE9CW,EAAaR,IAAgBH,EAE7BY,EAAgB,IAAM,CACtBD,GAAcD,GAClBH,GAAA,MAAAA,EAAcP,CAChB,CAAA,EAEMa,EAAiBb,GAAe,CACpCE,GAAA,MAAAA,EACAE,EAAAA,EAASJ,CAAU,CACrB,EAEA,OACEc,EAAA,cAACjB,EAAA,CACC,SAAUc,EACV,KAAK,KACL,QAAS,IAAME,EAAcb,CAAU,EACvC,IAAKC,EACL,UAAWQ,EACX,SAAUC,EACV,eAAcC,GAAc,OAC5B,gBAAeD,EACf,YAAaE,CAAAA,EAEZZ,CACH,CAEJ"}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
declare const StyledActionIcon: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
4
4
|
}, "appearance" | "size" | "css" | "theme" | "isRounded"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
5
|
-
theme?: "success" | "danger" | "warning" | "neutral" | "
|
|
5
|
+
theme?: "success" | "danger" | "warning" | "neutral" | "white" | "primary" | undefined;
|
|
6
6
|
appearance?: "outline" | "solid" | "simple" | undefined;
|
|
7
7
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
8
8
|
isRounded?: boolean | "true" | undefined;
|
|
@@ -377,7 +377,7 @@ declare const StyledActionIcon: import("@atom-learning/stitches-react/types/styl
|
|
|
377
377
|
};
|
|
378
378
|
}> | undefined;
|
|
379
379
|
}, "appearance" | "size" | "theme" | "label" | "children" | "as" | keyof import("../../types").NavigatorActions | "hasTooltip" | "tooltipSide" | "isRounded"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
380
|
-
theme?: "success" | "danger" | "warning" | "neutral" | "
|
|
380
|
+
theme?: "success" | "danger" | "warning" | "neutral" | "white" | "primary" | undefined;
|
|
381
381
|
appearance?: "outline" | "solid" | "simple" | undefined;
|
|
382
382
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
383
383
|
isRounded?: boolean | "true" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordField.js","sources":["../../../src/components/password-field/PasswordField.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper'\nimport { useFieldError, useFormCustomContext } from '~/components/form'\nimport { PasswordInput } from '~/components/password-input'\
|
|
1
|
+
{"version":3,"file":"PasswordField.js","sources":["../../../src/components/password-field/PasswordField.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper'\nimport { useFieldError, useFormCustomContext } from '~/components/form'\nimport { PasswordInput } from '~/components/password-input'\n\ntype PasswordFieldProps = React.ComponentProps<typeof PasswordInput> &\n Omit<FieldElementWrapperProps, 'label'> & {\n label?: string\n }\n\nexport const PasswordField = ({\n css = {},\n hideLabel,\n label = 'Password',\n name,\n prompt = undefined,\n description,\n validation,\n appearance,\n ...remainingProps\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\n return (\n <FieldWrapper\n css={{ ...css, position: 'relative' }}\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 <PasswordInput\n autoComplete=\"current-password\"\n name={name}\n id={name}\n ref={ref}\n appearance={formAppearance}\n {...(error !== undefined && { state: 'error' })}\n {...remainingProps}\n />\n </FieldWrapper>\n )\n}\n\nPasswordField.displayName = 'PasswordField'\n"],"names":["PasswordField","css","hideLabel","label","name","prompt","description","validation","appearance","remainingProps","register","useFormContext","context","useFormCustomContext","error","useFieldError","ref","formAppearance","React","FieldWrapper","PasswordInput"],"mappings":"mZAeO,MAAMA,EAAgB,CAAC,CAC5B,IAAAC,EAAM,CAAA,EACN,UAAAC,EACA,MAAAC,EAAQ,WACR,KAAAC,EACA,OAAAC,EAAS,OACT,YAAAC,EACA,WAAAC,EACA,WAAAC,KACGC,CACL,IAA0B,CACxB,KAAM,CAAE,SAAAC,CAAS,EAAIC,EAAe,EAC9BC,EAAUC,IACV,CAAE,MAAAC,CAAM,EAAIC,EAAcX,CAAI,EAE9BY,EAAMT,EAAaG,EAASH,CAAU,EAAIG,EAC1CO,GAAiBL,GAAA,KAAAA,OAAAA,EAAS,aAAcJ,EAE9C,OACEU,EAAA,cAACC,EAAA,CACC,IAAK,CAAE,GAAGlB,EAAK,SAAU,UAAW,EACpC,YAAaK,EACb,MAAOQ,EACP,QAASV,EACT,UAAWF,EACX,MAAOC,EACP,OAAQE,EACR,SAAU,QAAQE,GAAA,KAAAA,OAAAA,EAAY,QAAQ,EACtC,WAAYU,CAAAA,EAEZC,EAAA,cAACE,EAAA,CACC,aAAa,mBACb,KAAMhB,EACN,GAAIA,EACJ,IAAKY,EACL,WAAYC,EACX,GAAIH,IAAU,QAAa,CAAE,MAAO,OAAQ,EAC5C,GAAGL,CACN,CAAA,CACF,CAEJ,EAEAT,EAAc,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Eye as f,EyeCrossed as w}from"@atom-learning/icons";import*as e from"react";import{useState as u}from"react";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Box as E}from"../box/Box.js";import{Icon as I}from"../icon/Icon.js";import{Input as h}from"../input/Input.js";import"../../
|
|
1
|
+
import{Eye as f,EyeCrossed as w}from"@atom-learning/icons";import*as e from"react";import{useState as u}from"react";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Box as E}from"../box/Box.js";import{Icon as I}from"../icon/Icon.js";import{Input as h}from"../input/Input.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"color2k";import"../../utilities/style/keyframe-animations.js";import{getFieldIconSize as z}from"../../utilities/style/get-icon-size.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";const s=e.forwardRef(({css:i,hidePasswordText:m="Hide password",showPasswordText:p="Show password",size:o="md",...a},n)=>{const[t,c]=u(!1),l=()=>c(r=>!r),d=e.useMemo(()=>z(o),[o]);return e.createElement(E,{css:{position:"relative",...i}},e.createElement(h,{...a,size:o,type:t?"text":"password",ref:n,css:{pr:"$sizes$2"}}),e.createElement(x,{appearance:"simple",theme:"neutral",css:{bottom:o==="lg"?"4px":0,position:"absolute",right:0},label:t?m:p,onClick:l,onMouseDown:r=>r.preventDefault(),size:d},e.createElement(I,{is:t?f:w})))});s.displayName="PasswordInput";export{s as PasswordInput};
|
|
2
2
|
//# sourceMappingURL=PasswordInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInput.js","sources":["../../../src/components/password-input/PasswordInput.tsx"],"sourcesContent":["import { Eye, EyeCrossed } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useState } from 'react'\n\nimport { ActionIcon } from '~/components/action-icon'\nimport { Box } from '~/components/box'\nimport { Icon } from '~/components/icon'\nimport type { InputProps } from '~/components/input'\nimport { Input } from '~/components/input'\nimport
|
|
1
|
+
{"version":3,"file":"PasswordInput.js","sources":["../../../src/components/password-input/PasswordInput.tsx"],"sourcesContent":["import { Eye, EyeCrossed } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useState } from 'react'\n\nimport { ActionIcon } from '~/components/action-icon'\nimport { Box } from '~/components/box'\nimport { Icon } from '~/components/icon'\nimport type { InputProps } from '~/components/input'\nimport { Input } from '~/components/input'\nimport { getFieldIconSize } from '~/utilities'\n\ntype PasswordInputProps = Omit<InputProps, 'type'> & {\n hidePasswordText?: string\n showPasswordText?: string\n}\n\nexport const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps> =\n React.forwardRef(\n (\n {\n css,\n hidePasswordText = 'Hide password',\n showPasswordText = 'Show password',\n size = 'md',\n ...restProps\n },\n ref\n ) => {\n const [isPasswordVisible, setIsPasswordVisible] = useState<boolean>(false)\n const togglePasswordVisibility = () =>\n setIsPasswordVisible((currentState) => !currentState)\n\n const iconSize = React.useMemo(() => getFieldIconSize(size), [size])\n\n return (\n <Box css={{ position: 'relative', ...css }}>\n <Input\n {...restProps}\n size={size}\n type={isPasswordVisible ? 'text' : 'password'}\n ref={ref}\n css={{ pr: '$sizes$2' }}\n />\n <ActionIcon\n appearance=\"simple\"\n theme=\"neutral\"\n css={{\n bottom: size === 'lg' ? '4px' : 0,\n position: 'absolute',\n right: 0\n }}\n label={isPasswordVisible ? hidePasswordText : showPasswordText}\n onClick={togglePasswordVisibility}\n onMouseDown={(e) => e.preventDefault()} // prevent focus being lost from password input\n size={iconSize}\n >\n <Icon is={isPasswordVisible ? Eye : EyeCrossed} />\n </ActionIcon>\n </Box>\n )\n }\n )\n\nPasswordInput.displayName = 'PasswordInput'\n"],"names":["PasswordInput","React","css","hidePasswordText","showPasswordText","size","restProps","ref","isPasswordVisible","setIsPasswordVisible","useState","togglePasswordVisibility","currentState","iconSize","getFieldIconSize","Box","Input","ActionIcon","e","Icon","Eye","EyeCrossed"],"mappings":"qiBAgBO,MAAMA,EACXC,EAAM,WACJ,CACE,CACE,IAAAC,EACA,iBAAAC,EAAmB,gBACnB,iBAAAC,EAAmB,gBACnB,KAAAC,EAAO,QACJC,CACL,EACAC,IACG,CACH,KAAM,CAACC,EAAmBC,CAAoB,EAAIC,EAAkB,EAAK,EACnEC,EAA2B,IAC/BF,EAAsBG,GAAiB,CAACA,CAAY,EAEhDC,EAAWZ,EAAM,QAAQ,IAAMa,EAAiBT,CAAI,EAAG,CAACA,CAAI,CAAC,EAEnE,OACEJ,EAAA,cAACc,EAAA,CAAI,IAAK,CAAE,SAAU,WAAY,GAAGb,CAAI,CAAA,EACvCD,EAAA,cAACe,EAAA,CACE,GAAGV,EACJ,KAAMD,EACN,KAAMG,EAAoB,OAAS,WACnC,IAAKD,EACL,IAAK,CAAE,GAAI,UAAW,CACxB,CAAA,EACAN,EAAA,cAACgB,EAAA,CACC,WAAW,SACX,MAAM,UACN,IAAK,CACH,OAAQZ,IAAS,KAAO,MAAQ,EAChC,SAAU,WACV,MAAO,CACT,EACA,MAAOG,EAAoBL,EAAmBC,EAC9C,QAASO,EACT,YAAcO,GAAMA,EAAE,iBACtB,KAAML,CAAAA,EAENZ,EAAA,cAACkB,EAAA,CAAK,GAAIX,EAAoBY,EAAMC,EAAY,CAClD,CACF,CAEJ,CACF,EAEFrB,EAAc,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Close as
|
|
1
|
+
import{Close as r}from"@atom-learning/icons";import{Content as l,Arrow as p,Close as h}from"@radix-ui/react-popover";import*as e from"react";import{styled as t}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"color2k";import{slideDownAndFade as c,slideLeftAndFade as f,slideUpAndFade as $,slideRightAndFade as x}from"../../utilities/style/keyframe-animations.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import{ActionIcon as g}from"../action-icon/ActionIcon.js";import{Icon as w}from"../icon/Icon.js";const z=t(l,{bg:"white",borderRadius:"$1",boxShadow:"$2",maxWidth:"90vw",p:"$sizes$2",pr:"$6",position:"relative",zIndex:10,"@allowMotion":{animationDuration:"75ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="open"]':{'&[data-side="top"]':{animationName:c},'&[data-side="right"]':{animationName:f},'&[data-side="bottom"]':{animationName:$},'&[data-side="left"]':{animationName:x}}},variants:{size:{sm:{maxWidth:"200px"},md:{maxWidth:"400px"},lg:{maxWidth:"600px"}}}}),b=t(p,{fill:"white",zIndex:1,'[data-align="end"] &':{mr:"$sizes$2"},'[data-align="start"] &':{ml:"$sizes$2"}}),C=({children:i,side:o="top",sideOffset:a=8,closePopoverText:s="Close popover",showCloseButton:n=!0,size:m="md",...d})=>e.createElement(z,{size:m,side:o,sideOffset:a,...d},n&&e.createElement(g,{as:h,css:{position:"absolute",right:"$0",top:"$0"},label:s,size:"md",hasTooltip:!1,theme:"neutral"},e.createElement(w,{is:r})),i,e.createElement(b,{width:16,height:8}));export{C as PopoverContent};
|
|
2
2
|
//# sourceMappingURL=PopoverContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverContent.js","sources":["../../../src/components/popover/PopoverContent.tsx"],"sourcesContent":["import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Arrow, Close, Content } from '@radix-ui/react-popover'\nimport * as React from 'react'\n\nimport {
|
|
1
|
+
{"version":3,"file":"PopoverContent.js","sources":["../../../src/components/popover/PopoverContent.tsx"],"sourcesContent":["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 '~/stitches'\nimport {\n slideDownAndFade,\n slideLeftAndFade,\n slideRightAndFade,\n slideUpAndFade\n} from '~/utilities'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContent = styled(Content, {\n bg: 'white',\n borderRadius: '$1',\n boxShadow: '$2',\n maxWidth: '90vw',\n p: '$sizes$2',\n pr: '$6',\n position: 'relative',\n zIndex: 10,\n '@allowMotion': {\n animationDuration: '75ms',\n animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',\n willChange: 'transform, opacity',\n '&[data-state=\"open\"]': {\n '&[data-side=\"top\"]': { animationName: slideDownAndFade },\n '&[data-side=\"right\"]': { animationName: slideLeftAndFade },\n '&[data-side=\"bottom\"]': { animationName: slideUpAndFade },\n '&[data-side=\"left\"]': { animationName: slideRightAndFade }\n }\n },\n variants: {\n size: {\n sm: { maxWidth: '200px' },\n md: { maxWidth: '400px' },\n lg: { maxWidth: '600px' }\n }\n }\n})\n\nconst StyledArrow = styled(Arrow, {\n fill: 'white',\n zIndex: 1,\n '[data-align=\"end\"] &': { mr: '$sizes$2' },\n '[data-align=\"start\"] &': { ml: '$sizes$2' }\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 ...remainingProps\n}: PopoverContentProps) => (\n <StyledContent\n size={size}\n side={side}\n sideOffset={sideOffset}\n {...remainingProps}\n >\n {showCloseButton && (\n <ActionIcon\n as={Close}\n css={{ position: 'absolute', right: '$0', top: '$0' }}\n label={closePopoverText}\n size=\"md\"\n hasTooltip={false}\n theme=\"neutral\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {children}\n <StyledArrow width={16} height={8} />\n </StyledContent>\n)\n"],"names":["StyledContent","styled","Content","slideDownAndFade","slideLeftAndFade","slideUpAndFade","slideRightAndFade","StyledArrow","Arrow","PopoverContent","children","side","sideOffset","closePopoverText","showCloseButton","size","remainingProps","React","ActionIcon","Close","Icon","CloseIcon"],"mappings":"6iBAeA,MAAMA,EAAgBC,EAAOC,EAAS,CACpC,GAAI,QACJ,aAAc,KACd,UAAW,KACX,SAAU,OACV,EAAG,WACH,GAAI,KACJ,SAAU,WACV,OAAQ,GACR,eAAgB,CACd,kBAAmB,OACnB,wBAAyB,gCACzB,WAAY,qBACZ,uBAAwB,CACtB,qBAAsB,CAAE,cAAeC,CAAiB,EACxD,uBAAwB,CAAE,cAAeC,CAAiB,EAC1D,wBAAyB,CAAE,cAAeC,CAAe,EACzD,sBAAuB,CAAE,cAAeC,CAAkB,CAC5D,CACF,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CAAE,SAAU,OAAQ,EACxB,GAAI,CAAE,SAAU,OAAQ,EACxB,GAAI,CAAE,SAAU,OAAQ,CAC1B,CACF,CACF,CAAC,EAEKC,EAAcN,EAAOO,EAAO,CAChC,KAAM,QACN,OAAQ,EACR,uBAAwB,CAAE,GAAI,UAAW,EACzC,yBAA0B,CAAE,GAAI,UAAW,CAC7C,CAAC,EAQYC,EAAiB,CAAC,CAC7B,SAAAC,EACA,KAAAC,EAAO,MACP,WAAAC,EAAa,EACb,iBAAAC,EAAmB,gBACnB,gBAAAC,EAAkB,GAClB,KAAAC,EAAO,QACJC,CACL,IACEC,EAAA,cAACjB,EAAA,CACC,KAAMe,EACN,KAAMJ,EACN,WAAYC,EACX,GAAGI,CAEHF,EAAAA,GACCG,EAAA,cAACC,EAAA,CACC,GAAIC,EACJ,IAAK,CAAE,SAAU,WAAY,MAAO,KAAM,IAAK,IAAK,EACpD,MAAON,EACP,KAAK,KACL,WAAY,GACZ,MAAM,SAENI,EAAAA,EAAA,cAACG,EAAA,CAAK,GAAIC,EAAW,CACvB,EAEDX,EACDO,EAAA,cAACV,EAAA,CAAY,MAAO,GAAI,OAAQ,CAAA,CAAG,CACrC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as o from"@radix-ui/react-progress";import*as a from"react";import{styled as t}from"../../stitches.js";const m=t(o.Root,{borderRadius:"$round",background:"$grey200",position:"relative",overflow:"hidden",width:"100%",variants:{size:{sm:{height:"4px"},md:{height:"$0"}},theme:{primary:{color:"$primary800"},info:{color:"$info"},success:{color:"$success"},warning:{color:"$warning"},danger:{color:"$danger"},neutral:{color:"$grey800",bg:"$grey400"}}}}),d=t(o.Indicator,{backgroundColor:"
|
|
1
|
+
import*as o from"@radix-ui/react-progress";import*as a from"react";import{styled as t}from"../../stitches.js";const m=t(o.Root,{borderRadius:"$round",background:"$grey200",position:"relative",overflow:"hidden",width:"100%",variants:{size:{sm:{height:"4px"},md:{height:"$0"}},theme:{primary:{color:"$primary800"},info:{color:"$info"},success:{color:"$success"},warning:{color:"$warning"},danger:{color:"$danger"},neutral:{color:"$grey800",bg:"$grey400"}}}}),d=t(o.Indicator,{backgroundColor:"currentColor",borderRadius:"$round",boxSizing:"border-box",height:"100%",position:"absolute",transition:"all 300ms ease-out"}),i=({value:r,max:e=100,size:s="md",theme:n="primary",...l})=>a.createElement(m,{value:r,max:e,theme:n,size:s,...l},a.createElement(d,{style:{width:"100%",transform:`translateX(-${100-(r||0)/e*100}%)`}}));i.displayName="ProgressBar";export{i as ProgressBar};
|
|
2
2
|
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sources":["../../../src/components/progress-bar/ProgressBar.tsx"],"sourcesContent":["import * as Progress from '@radix-ui/react-progress'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\n\nconst StyledProgressBar = styled(Progress.Root, {\n borderRadius: '$round',\n background: '$grey200',\n position: 'relative',\n overflow: 'hidden',\n width: '100%',\n variants: {\n size: {\n sm: { height: '4px' },\n md: { height: '$0' }\n },\n theme: {\n primary: { color: '$primary800' },\n info: { color: '$info' },\n success: { color: '$success' },\n warning: { color: '$warning' },\n danger: { color: '$danger' },\n neutral: { color: '$grey800', bg: '$grey400' }\n }\n }\n})\n\nconst StyledIndicator = styled(Progress.Indicator, {\n backgroundColor: '
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sources":["../../../src/components/progress-bar/ProgressBar.tsx"],"sourcesContent":["import * as Progress from '@radix-ui/react-progress'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\n\nconst StyledProgressBar = styled(Progress.Root, {\n borderRadius: '$round',\n background: '$grey200',\n position: 'relative',\n overflow: 'hidden',\n width: '100%',\n variants: {\n size: {\n sm: { height: '4px' },\n md: { height: '$0' }\n },\n theme: {\n primary: { color: '$primary800' },\n info: { color: '$info' },\n success: { color: '$success' },\n warning: { color: '$warning' },\n danger: { color: '$danger' },\n neutral: { color: '$grey800', bg: '$grey400' }\n }\n }\n})\n\nconst StyledIndicator = styled(Progress.Indicator, {\n backgroundColor: 'currentColor',\n borderRadius: '$round',\n boxSizing: 'border-box',\n height: '100%',\n position: 'absolute',\n transition: 'all 300ms ease-out'\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 ...remainingProps\n}: ProgressBarProps) => (\n <StyledProgressBar\n value={value}\n max={max}\n theme={theme}\n size={size}\n {...remainingProps}\n >\n <StyledIndicator\n style={{\n width: '100%',\n transform: `translateX(-${100 - ((value || 0) / max) * 100}%)`\n }}\n />\n </StyledProgressBar>\n)\n\nProgressBar.displayName = 'ProgressBar'\n"],"names":["StyledProgressBar","styled","Progress","StyledIndicator","ProgressBar","value","max","size","theme","remainingProps","React"],"mappings":"8GAKA,MAAMA,EAAoBC,EAAOC,EAAS,KAAM,CAC9C,aAAc,SACd,WAAY,WACZ,SAAU,WACV,SAAU,SACV,MAAO,OACP,SAAU,CACR,KAAM,CACJ,GAAI,CAAE,OAAQ,KAAM,EACpB,GAAI,CAAE,OAAQ,IAAK,CACrB,EACA,MAAO,CACL,QAAS,CAAE,MAAO,aAAc,EAChC,KAAM,CAAE,MAAO,OAAQ,EACvB,QAAS,CAAE,MAAO,UAAW,EAC7B,QAAS,CAAE,MAAO,UAAW,EAC7B,OAAQ,CAAE,MAAO,SAAU,EAC3B,QAAS,CAAE,MAAO,WAAY,GAAI,UAAW,CAC/C,CACF,CACF,CAAC,EAEKC,EAAkBF,EAAOC,EAAS,UAAW,CACjD,gBAAiB,eACjB,aAAc,SACd,UAAW,aACX,OAAQ,OACR,SAAU,WACV,WAAY,oBACd,CAAC,EAUYE,EAAc,CAAC,CAC1B,MAAAC,EACA,IAAAC,EAAM,IACN,KAAAC,EAAO,KACP,MAAAC,EAAQ,aACLC,CACL,IACEC,EAAA,cAACV,EAAA,CACC,MAAOK,EACP,IAAKC,EACL,MAAOE,EACP,KAAMD,EACL,GAAGE,GAEJC,EAAA,cAACP,EAAA,CACC,MAAO,CACL,MAAO,OACP,UAAW,eAAe,KAAQE,GAAS,GAAKC,EAAO,OACzD,CAAA,CACF,CACF,EAGFF,EAAY,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as o from"@radix-ui/react-radio-group";import*as e from"react";import{styled as t}from"../../stitches.js";const s=t(o.Item,{alignItems:"center",appearance:"none",backgroundColor:"transparent",border:"1px solid $grey800",borderRadius:"$round",color:"white",cursor:"pointer",display:"flex",justifyContent:"center",p:0,size:"$1",variants:{size:{md:{size:"$1"},lg:{size:"$2",mt:"-$1"}}},transition:"all 50ms ease-out","&:focus":{outline:"2px solid $primary800",outlineOffset:"1px"},'&[data-state="checked"]':{backgroundColor:"$primary800",borderColor:"$primary800"},"&[disabled]":{backgroundColor:"$grey200",borderColor:"$grey800",color:"$grey800",cursor:"not-allowed"}}),n=t(o.Indicator,{size:"6px",borderRadius:"$round",backgroundColor:"
|
|
1
|
+
import*as o from"@radix-ui/react-radio-group";import*as e from"react";import{styled as t}from"../../stitches.js";const s=t(o.Item,{alignItems:"center",appearance:"none",backgroundColor:"transparent",border:"1px solid $grey800",borderRadius:"$round",color:"white",cursor:"pointer",display:"flex",justifyContent:"center",p:0,size:"$1",variants:{size:{md:{size:"$1"},lg:{size:"$2",mt:"-$1"}}},transition:"all 50ms ease-out","&:focus":{outline:"2px solid $primary800",outlineOffset:"1px"},'&[data-state="checked"]':{backgroundColor:"$primary800",borderColor:"$primary800"},"&[disabled]":{backgroundColor:"$grey200",borderColor:"$grey800",color:"$grey800",cursor:"not-allowed"}}),n=t(o.Indicator,{size:"6px",borderRadius:"$round",backgroundColor:"currentColor",position:"absolute",variants:{size:{md:{size:"6px"},lg:{size:"12px"}}}}),a=({size:r,...i})=>e.createElement(s,{...i,size:r},e.createElement(n,{size:r}));a.displayName="RadioButton";export{a as RadioButton};
|
|
2
2
|
//# sourceMappingURL=RadioButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.js","sources":["../../../src/components/radio-button/RadioButton.tsx"],"sourcesContent":["import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { Override } from '~/utilities/types'\n\nconst StyledRadioButton = styled(RadioGroup.Item, {\n alignItems: 'center',\n appearance: 'none',\n backgroundColor: 'transparent',\n border: '1px solid $grey800',\n borderRadius: '$round',\n color: 'white',\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n p: 0,\n size: '$1',\n variants: {\n size: {\n md: {\n size: '$1'\n },\n lg: {\n size: '$2',\n mt: '-$1'\n }\n }\n },\n transition: 'all 50ms ease-out',\n '&:focus': {\n outline: '2px solid $primary800',\n outlineOffset: '1px'\n },\n '&[data-state=\"checked\"]': {\n backgroundColor: '$primary800',\n borderColor: '$primary800'\n },\n '&[disabled]': {\n backgroundColor: '$grey200',\n borderColor: '$grey800',\n color: '$grey800',\n cursor: 'not-allowed'\n }\n})\n\nconst StyledIndicator = styled(RadioGroup.Indicator, {\n size: '6px',\n borderRadius: '$round',\n backgroundColor: '
|
|
1
|
+
{"version":3,"file":"RadioButton.js","sources":["../../../src/components/radio-button/RadioButton.tsx"],"sourcesContent":["import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { Override } from '~/utilities/types'\n\nconst StyledRadioButton = styled(RadioGroup.Item, {\n alignItems: 'center',\n appearance: 'none',\n backgroundColor: 'transparent',\n border: '1px solid $grey800',\n borderRadius: '$round',\n color: 'white',\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n p: 0,\n size: '$1',\n variants: {\n size: {\n md: {\n size: '$1'\n },\n lg: {\n size: '$2',\n mt: '-$1'\n }\n }\n },\n transition: 'all 50ms ease-out',\n '&:focus': {\n outline: '2px solid $primary800',\n outlineOffset: '1px'\n },\n '&[data-state=\"checked\"]': {\n backgroundColor: '$primary800',\n borderColor: '$primary800'\n },\n '&[disabled]': {\n backgroundColor: '$grey200',\n borderColor: '$grey800',\n color: '$grey800',\n cursor: 'not-allowed'\n }\n})\n\nconst StyledIndicator = styled(RadioGroup.Indicator, {\n size: '6px',\n borderRadius: '$round',\n backgroundColor: 'currentColor',\n position: 'absolute',\n variants: {\n size: {\n md: {\n size: '6px'\n },\n lg: {\n size: '12px'\n }\n }\n }\n})\n\ntype RadioButtonProps = Override<\n React.ComponentProps<typeof StyledRadioButton>,\n {\n as?: never\n } & {\n 'aria-label'?: string\n }\n>\n\nexport const RadioButton = ({ size, ...props }: RadioButtonProps) => {\n return (\n <StyledRadioButton {...props} size={size}>\n <StyledIndicator size={size} />\n </StyledRadioButton>\n )\n}\n\nRadioButton.displayName = 'RadioButton'\n"],"names":["StyledRadioButton","styled","RadioGroup","StyledIndicator","RadioButton","size","props","React"],"mappings":"iHAMA,MAAMA,EAAoBC,EAAOC,EAAW,KAAM,CAChD,WAAY,SACZ,WAAY,OACZ,gBAAiB,cACjB,OAAQ,qBACR,aAAc,SACd,MAAO,QACP,OAAQ,UACR,QAAS,OACT,eAAgB,SAChB,EAAG,EACH,KAAM,KACN,SAAU,CACR,KAAM,CACJ,GAAI,CACF,KAAM,IACR,EACA,GAAI,CACF,KAAM,KACN,GAAI,KACN,CACF,CACF,EACA,WAAY,oBACZ,UAAW,CACT,QAAS,wBACT,cAAe,KACjB,EACA,0BAA2B,CACzB,gBAAiB,cACjB,YAAa,aACf,EACA,cAAe,CACb,gBAAiB,WACjB,YAAa,WACb,MAAO,WACP,OAAQ,aACV,CACF,CAAC,EAEKC,EAAkBF,EAAOC,EAAW,UAAW,CACnD,KAAM,MACN,aAAc,SACd,gBAAiB,eACjB,SAAU,WACV,SAAU,CACR,KAAM,CACJ,GAAI,CACF,KAAM,KACR,EACA,GAAI,CACF,KAAM,MACR,CACF,CACF,CACF,CAAC,EAWYE,EAAc,CAAC,CAAE,KAAAC,KAASC,CAAM,IAEzCC,EAAA,cAACP,EAAA,CAAmB,GAAGM,EAAO,KAAMD,GAClCE,EAAA,cAACJ,EAAA,CAAgB,KAAME,CAAAA,CAAM,CAC/B,EAIJD,EAAY,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Search as $,Close as k}from"@atom-learning/icons";import*as t from"react";import{ActionIcon as L}from"../action-icon/ActionIcon.js";import{Icon as E}from"../icon/Icon.js";import{InputText as x,InputBackground as T}from"../input/Input.js";import{styled as f}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"
|
|
1
|
+
import{Search as $,Close as k}from"@atom-learning/icons";import*as t from"react";import{ActionIcon as L}from"../action-icon/ActionIcon.js";import{Icon as E}from"../icon/Icon.js";import{InputText as x,InputBackground as T}from"../input/Input.js";import{styled as f}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"color2k";import"../../utilities/style/keyframe-animations.js";import{getFieldIconSize as M}from"../../utilities/style/get-icon-size.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import{useCallbackRef as N}from"../../utilities/hooks/useCallbackRef.js";var O=(e=>(e.SEARCH="SEARCH",e.CLEAR="CLEAR",e))(O||{});const V=f(E,{color:"$grey700",position:"absolute",pointerEvents:"none",variants:{size:{sm:{right:"$2",size:"$1"},md:{right:10,size:20},lg:{right:10,size:20}}}}),Y=f(x,{"&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button":{display:"none"}}),d=t.forwardRef(({size:e="md",appearance:h="standard",css:C,value:o,defaultValue:l="",onValueChange:a,clearText:b="Clear",onChange:c,...v},g)=>{const[u,A]=N(),[R,p]=t.useState(l),[z,m]=t.useState(l?"CLEAR":"SEARCH");t.useEffect(()=>{typeof o>"u"||(p(o),m(o?"CLEAR":"SEARCH"))},[o]);const S=t.useMemo(()=>M(e),[e]);t.useImperativeHandle(g,()=>u.current);const w=()=>{var n,r;const s=u.current;if(!s)return;const i=(n=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:n.set;(r=i==null?void 0:i.call)==null||r.call(i,s,"");const H=new Event("input",{bubbles:!0});s.dispatchEvent(H),s.focus(),a==null||a("")},I=n=>{c==null||c(n);const r=n.target.value;p(r),a==null||a(r),m(r?"CLEAR":"SEARCH")},y=()=>z==="SEARCH"?t.createElement(V,{is:$,size:e,css:{size:e=="sm"?"$1":20,top:"50%",transform:"translateY(-50%)"}}):t.createElement(L,{label:b,theme:"neutral",size:S,css:{position:"absolute",top:"50%",transform:"translateY(-50%)",right:"$1"},onClick:w},t.createElement(E,{is:k}));return t.createElement(T,{css:{position:"relative",width:"auto",...C},size:e,appearance:h},t.createElement(Y,{ref:A,size:e,type:"search",...v,value:R,onChange:I,css:{pr:e==="sm"?"$5":"$6"}}),y())});d.displayName="SearchInput";export{d as SearchInput};
|
|
2
2
|
//# sourceMappingURL=SearchInput.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{Box as s}from"../box/Box.js";import{Flex as r}from"../flex/Flex.js";const a=({css:e,...t})=>o.createElement(s,{css:{maxWidth:"100%",flexShrink:0,paddingTop:"$0",
|
|
1
|
+
import o from"react";import{Box as s}from"../box/Box.js";import{Flex as r}from"../flex/Flex.js";const a=({css:e,...t})=>o.createElement(s,{css:{maxWidth:"100%",flexShrink:0,paddingTop:"$0","& > *:not(:last-child)":{mb:"$2"},...e},...t}),n=({css:e,...t})=>o.createElement(s,{css:{maxWidth:"100%",flexShrink:0,...e}},o.createElement(r,{wrap:"wrap",gap:3,...t}));export{n as SectionMessageActions,a as SectionMessageContent};
|
|
2
2
|
//# sourceMappingURL=SectionMessageLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionMessageLayout.js","sources":["../../../src/components/section-message/SectionMessageLayout.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Box } from '../box'\nimport { Flex } from '../flex'\n\nexport const SectionMessageContent = ({\n css,\n ...rest\n}: React.ComponentProps<typeof Box>): JSX.Element => (\n <Box\n css={{\n maxWidth: '100%',\n flexShrink: 0,\n paddingTop: '$0',\n
|
|
1
|
+
{"version":3,"file":"SectionMessageLayout.js","sources":["../../../src/components/section-message/SectionMessageLayout.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Box } from '../box'\nimport { Flex } from '../flex'\n\nexport const SectionMessageContent = ({\n css,\n ...rest\n}: React.ComponentProps<typeof Box>): JSX.Element => (\n <Box\n css={{\n maxWidth: '100%',\n flexShrink: 0,\n paddingTop: '$0',\n '& > *:not(:last-child)': { mb: '$2' },\n ...css\n }}\n {...rest}\n />\n)\n\nexport const SectionMessageActions = ({\n css,\n ...rest\n}: React.ComponentProps<typeof Flex>): JSX.Element => (\n <Box css={{ maxWidth: '100%', flexShrink: 0, ...css }}>\n <Flex wrap=\"wrap\" gap={3} {...rest} />\n </Box>\n)\n"],"names":["SectionMessageContent","css","rest","React","Box","SectionMessageActions","Flex"],"mappings":"gGAKO,MAAMA,EAAwB,CAAC,CACpC,IAAAC,KACGC,CACL,IACEC,EAAA,cAACC,EAAA,CACC,IAAK,CACH,SAAU,OACV,WAAY,EACZ,WAAY,KACZ,yBAA0B,CAAE,GAAI,IAAK,EACrC,GAAGH,CACL,EACC,GAAGC,CACN,CAAA,EAGWG,EAAwB,CAAC,CACpC,IAAAJ,KACGC,CACL,IACEC,EAAA,cAACC,EAAA,CAAI,IAAK,CAAE,SAAU,OAAQ,WAAY,EAAG,GAAGH,CAAI,GAClDE,EAAA,cAACG,EAAA,CAAK,KAAK,OAAO,IAAK,EAAI,GAAGJ,EAAM,CACtC"}
|