paris 0.23.1 → 0.24.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.
- package/CHANGELOG.md +16 -0
- package/README.md +17 -17
- package/dist/helpers/OpenChangeEffect.d.ts +11 -0
- package/dist/helpers/OpenChangeEffect.js +16 -0
- package/dist/helpers/OpenChangeEffect.js.map +1 -0
- package/dist/helpers/renderEnhancer.d.ts +7 -0
- package/dist/helpers/renderEnhancer.js +20 -0
- package/dist/helpers/renderEnhancer.js.map +1 -0
- package/dist/helpers/useControllableState.d.ts +7 -0
- package/dist/helpers/useControllableState.js +49 -0
- package/dist/helpers/useControllableState.js.map +1 -0
- package/dist/helpers/useIsMounted.d.ts +1 -0
- package/dist/helpers/useResizeObserver.d.ts +12 -0
- package/dist/stories/accordion/Accordion.d.ts +47 -0
- package/dist/stories/accordion/Accordion.js +82 -0
- package/dist/stories/accordion/Accordion.js.map +1 -0
- package/dist/stories/accordion/Accordion.module.css +130 -0
- package/dist/stories/accordion/Accordion.module.scss.js +26 -0
- package/dist/stories/accordion/Accordion.module.scss.js.map +1 -0
- package/dist/stories/accordion/index.js +2 -0
- package/dist/stories/accordion/index.js.map +1 -0
- package/dist/stories/accordionselect/AccordionSelect.d.ts +102 -0
- package/dist/stories/accordionselect/AccordionSelect.js +137 -0
- package/dist/stories/accordionselect/AccordionSelect.js.map +1 -0
- package/dist/stories/accordionselect/AccordionSelect.module.css +106 -0
- package/dist/stories/accordionselect/AccordionSelect.module.scss.js +27 -0
- package/dist/stories/accordionselect/AccordionSelect.module.scss.js.map +1 -0
- package/dist/stories/accordionselect/index.js +2 -0
- package/dist/stories/accordionselect/index.js.map +1 -0
- package/dist/stories/avatar/Avatar.d.ts +22 -0
- package/dist/stories/avatar/Avatar.js +37 -0
- package/dist/stories/avatar/Avatar.js.map +1 -0
- package/dist/stories/avatar/Avatar.module.css +7 -0
- package/dist/stories/avatar/Avatar.module.scss.js +7 -0
- package/dist/stories/avatar/Avatar.module.scss.js.map +1 -0
- package/dist/stories/avatar/index.js +2 -0
- package/dist/stories/avatar/index.js.map +1 -0
- package/dist/stories/button/Button.d.ts +120 -0
- package/dist/stories/button/Button.js +123 -0
- package/dist/stories/button/Button.js.map +1 -0
- package/dist/stories/button/Button.module.css +137 -0
- package/dist/stories/button/Button.module.scss.js +35 -0
- package/dist/stories/button/Button.module.scss.js.map +1 -0
- package/dist/stories/button/index.js +2 -0
- package/dist/stories/button/index.js.map +1 -0
- package/dist/stories/callout/Callout.d.ts +22 -0
- package/dist/stories/callout/Callout.js +21 -0
- package/dist/stories/callout/Callout.js.map +1 -0
- package/dist/stories/callout/Callout.module.css +35 -0
- package/dist/stories/callout/Callout.module.scss.js +15 -0
- package/dist/stories/callout/Callout.module.scss.js.map +1 -0
- package/dist/stories/callout/index.js +2 -0
- package/dist/stories/callout/index.js.map +1 -0
- package/dist/stories/card/Card.d.ts +30 -0
- package/dist/stories/card/Card.js +22 -0
- package/dist/stories/card/Card.js.map +1 -0
- package/dist/stories/card/Card.module.css +39 -0
- package/dist/stories/card/Card.module.scss.js +17 -0
- package/dist/stories/card/Card.module.scss.js.map +1 -0
- package/dist/stories/card/index.js +2 -0
- package/dist/stories/card/index.js.map +1 -0
- package/dist/stories/cardbutton/CardButton.d.ts +50 -0
- package/dist/stories/cardbutton/CardButton.js +53 -0
- package/dist/stories/cardbutton/CardButton.js.map +1 -0
- package/dist/stories/cardbutton/CardButton.module.css +77 -0
- package/dist/stories/cardbutton/CardButton.module.scss.js +19 -0
- package/dist/stories/cardbutton/CardButton.module.scss.js.map +1 -0
- package/dist/stories/cardbutton/index.js +2 -0
- package/dist/stories/cardbutton/index.js.map +1 -0
- package/dist/stories/checkbox/Checkbox.d.ts +31 -0
- package/dist/stories/checkbox/Checkbox.js +99 -0
- package/dist/stories/checkbox/Checkbox.js.map +1 -0
- package/dist/stories/checkbox/Checkbox.module.css +155 -0
- package/dist/stories/checkbox/Checkbox.module.scss.js +32 -0
- package/dist/stories/checkbox/Checkbox.module.scss.js.map +1 -0
- package/dist/stories/checkbox/index.js +2 -0
- package/dist/stories/checkbox/index.js.map +1 -0
- package/dist/stories/codeinput/CodeInput.d.ts +47 -0
- package/dist/stories/codeinput/CodeInput.js +105 -0
- package/dist/stories/codeinput/CodeInput.js.map +1 -0
- package/dist/stories/codeinput/CodeInput.module.css +63 -0
- package/dist/stories/codeinput/CodeInput.module.scss.js +13 -0
- package/dist/stories/codeinput/CodeInput.module.scss.js.map +1 -0
- package/dist/stories/codeinput/index.js +2 -0
- package/dist/stories/codeinput/index.js.map +1 -0
- package/dist/stories/combobox/Combobox.d.ts +125 -0
- package/dist/stories/combobox/Combobox.js +257 -0
- package/dist/stories/combobox/Combobox.js.map +1 -0
- package/dist/stories/combobox/index.js +2 -0
- package/dist/stories/combobox/index.js.map +1 -0
- package/dist/stories/dialog/Dialog.d.ts +103 -0
- package/dist/stories/dialog/Dialog.js +187 -0
- package/dist/stories/dialog/Dialog.js.map +1 -0
- package/dist/stories/dialog/Dialog.module.css +185 -0
- package/dist/stories/dialog/Dialog.module.scss.js +48 -0
- package/dist/stories/dialog/Dialog.module.scss.js.map +1 -0
- package/dist/stories/dialog/index.js +2 -0
- package/dist/stories/dialog/index.js.map +1 -0
- package/dist/stories/drawer/Drawer.d.ts +143 -0
- package/dist/stories/drawer/Drawer.js +357 -0
- package/dist/stories/drawer/Drawer.js.map +1 -0
- package/dist/stories/drawer/Drawer.module.css +406 -0
- package/dist/stories/drawer/Drawer.module.scss.js +96 -0
- package/dist/stories/drawer/Drawer.module.scss.js.map +1 -0
- package/dist/stories/drawer/DrawerActions.d.ts +5 -0
- package/dist/stories/drawer/DrawerActions.js +23 -0
- package/dist/stories/drawer/DrawerActions.js.map +1 -0
- package/dist/stories/drawer/DrawerBottomPanel.d.ts +9 -0
- package/dist/stories/drawer/DrawerBottomPanel.js +48 -0
- package/dist/stories/drawer/DrawerBottomPanel.js.map +1 -0
- package/dist/stories/drawer/DrawerContext.d.ts +11 -0
- package/dist/stories/drawer/DrawerContext.js +23 -0
- package/dist/stories/drawer/DrawerContext.js.map +1 -0
- package/dist/stories/drawer/DrawerPage.d.ts +12 -0
- package/dist/stories/drawer/DrawerPage.js +22 -0
- package/dist/stories/drawer/DrawerPage.js.map +1 -0
- package/dist/stories/drawer/DrawerPageContext.d.ts +12 -0
- package/dist/stories/drawer/DrawerPageContext.js +23 -0
- package/dist/stories/drawer/DrawerPageContext.js.map +1 -0
- package/dist/stories/drawer/DrawerPaginationContext.d.ts +9 -0
- package/dist/stories/drawer/DrawerPaginationContext.js +17 -0
- package/dist/stories/drawer/DrawerPaginationContext.js.map +1 -0
- package/dist/stories/drawer/DrawerProgressBar.d.ts +15 -0
- package/dist/stories/drawer/DrawerProgressBar.js +60 -0
- package/dist/stories/drawer/DrawerProgressBar.js.map +1 -0
- package/dist/stories/drawer/DrawerSlotContext.d.ts +34 -0
- package/dist/stories/drawer/DrawerSlotContext.js +120 -0
- package/dist/stories/drawer/DrawerSlotContext.js.map +1 -0
- package/dist/stories/drawer/DrawerTitle.d.ts +5 -0
- package/dist/stories/drawer/DrawerTitle.js +29 -0
- package/dist/stories/drawer/DrawerTitle.js.map +1 -0
- package/dist/stories/drawer/index.js +10 -0
- package/dist/stories/drawer/index.js.map +1 -0
- package/dist/stories/field/Field.d.ts +54 -0
- package/dist/stories/field/Field.js +91 -0
- package/dist/stories/field/Field.js.map +1 -0
- package/dist/stories/field/index.js +2 -0
- package/dist/stories/field/index.js.map +1 -0
- package/dist/stories/icon/ArrowRight.d.ts +2 -0
- package/dist/stories/icon/ArrowRight.js +13 -0
- package/dist/stories/icon/ArrowRight.js.map +1 -0
- package/dist/stories/icon/Check.d.ts +2 -0
- package/dist/stories/icon/Check.js +13 -0
- package/dist/stories/icon/Check.js.map +1 -0
- package/dist/stories/icon/ChevronLeft.d.ts +2 -0
- package/dist/stories/icon/ChevronLeft.js +13 -0
- package/dist/stories/icon/ChevronLeft.js.map +1 -0
- package/dist/stories/icon/ChevronRight.d.ts +2 -0
- package/dist/stories/icon/ChevronRight.js +13 -0
- package/dist/stories/icon/ChevronRight.js.map +1 -0
- package/dist/stories/icon/Close.d.ts +2 -0
- package/dist/stories/icon/Close.js +13 -0
- package/dist/stories/icon/Close.js.map +1 -0
- package/dist/stories/icon/Ellipsis.d.ts +2 -0
- package/dist/stories/icon/Ellipsis.js +13 -0
- package/dist/stories/icon/Ellipsis.js.map +1 -0
- package/{src/stories/icon/Icon.tsx → dist/stories/icon/Icon.d.ts} +2 -8
- package/dist/stories/icon/Icon.js +8 -0
- package/dist/stories/icon/Icon.js.map +1 -0
- package/dist/stories/icon/Info.d.ts +2 -0
- package/dist/stories/icon/Info.js +13 -0
- package/dist/stories/icon/Info.js.map +1 -0
- package/dist/stories/icon/NotificationDot.d.ts +2 -0
- package/dist/stories/icon/NotificationDot.js +7 -0
- package/dist/stories/icon/NotificationDot.js.map +1 -0
- package/dist/stories/icon/Spinner.d.ts +2 -0
- package/dist/stories/icon/Spinner.js +24 -0
- package/dist/stories/icon/Spinner.js.map +1 -0
- package/dist/stories/icon/index.js +11 -0
- package/dist/stories/icon/index.js.map +1 -0
- package/dist/stories/informationaltooltip/InformationalTooltip.d.ts +68 -0
- package/dist/stories/informationaltooltip/InformationalTooltip.js +85 -0
- package/dist/stories/informationaltooltip/InformationalTooltip.js.map +1 -0
- package/dist/stories/informationaltooltip/InformationalTooltip.module.css +22 -0
- package/dist/stories/informationaltooltip/InformationalTooltip.module.scss.js +11 -0
- package/dist/stories/informationaltooltip/InformationalTooltip.module.scss.js.map +1 -0
- package/dist/stories/informationaltooltip/index.js +2 -0
- package/dist/stories/informationaltooltip/index.js.map +1 -0
- package/dist/stories/input/Input.d.ts +57 -0
- package/dist/stories/input/Input.js +108 -0
- package/dist/stories/input/Input.js.map +1 -0
- package/dist/stories/input/Input.module.css +165 -0
- package/dist/stories/input/Input.module.scss.js +23 -0
- package/dist/stories/input/Input.module.scss.js.map +1 -0
- package/dist/stories/input/index.js +2 -0
- package/dist/stories/input/index.js.map +1 -0
- package/dist/stories/markdown/Markdown.d.ts +36 -0
- package/dist/stories/markdown/Markdown.js +141 -0
- package/dist/stories/markdown/Markdown.js.map +1 -0
- package/dist/stories/markdown/Markdown.module.css +301 -0
- package/dist/stories/markdown/Markdown.module.scss.js +73 -0
- package/dist/stories/markdown/Markdown.module.scss.js.map +1 -0
- package/dist/stories/markdown/index.js +2 -0
- package/dist/stories/markdown/index.js.map +1 -0
- package/dist/stories/markdowneditor/FixedToolbar.d.ts +19 -0
- package/dist/stories/markdowneditor/FixedToolbar.js +212 -0
- package/dist/stories/markdowneditor/FixedToolbar.js.map +1 -0
- package/dist/stories/markdowneditor/FixedToolbar.module.css +24 -0
- package/dist/stories/markdowneditor/FixedToolbar.module.scss.js +11 -0
- package/dist/stories/markdowneditor/FixedToolbar.module.scss.js.map +1 -0
- package/dist/stories/markdowneditor/FloatingToolbar.d.ts +15 -0
- package/dist/stories/markdowneditor/FloatingToolbar.js +66 -0
- package/dist/stories/markdowneditor/FloatingToolbar.js.map +1 -0
- package/dist/stories/markdowneditor/FloatingToolbar.module.css +18 -0
- package/dist/stories/markdowneditor/FloatingToolbar.module.scss.js +9 -0
- package/dist/stories/markdowneditor/FloatingToolbar.module.scss.js.map +1 -0
- package/dist/stories/markdowneditor/LinkPopover.d.ts +11 -0
- package/dist/stories/markdowneditor/LinkPopover.js +106 -0
- package/dist/stories/markdowneditor/LinkPopover.js.map +1 -0
- package/dist/stories/markdowneditor/LinkPopover.module.css +113 -0
- package/dist/stories/markdowneditor/LinkPopover.module.scss.js +21 -0
- package/dist/stories/markdowneditor/LinkPopover.module.scss.js.map +1 -0
- package/{src/stories/markdowneditor/MarkdownEditor.tsx → dist/stories/markdowneditor/MarkdownEditor.d.ts} +5 -68
- package/dist/stories/markdowneditor/MarkdownEditor.js +62 -0
- package/dist/stories/markdowneditor/MarkdownEditor.js.map +1 -0
- package/dist/stories/markdowneditor/MarkdownEditor.module.css +325 -0
- package/dist/stories/markdowneditor/MarkdownEditor.module.scss.js +11 -0
- package/dist/stories/markdowneditor/MarkdownEditor.module.scss.js.map +1 -0
- package/dist/stories/markdowneditor/MarkdownEditorContext.d.ts +10 -0
- package/dist/stories/markdowneditor/MarkdownEditorContext.js +11 -0
- package/dist/stories/markdowneditor/MarkdownEditorContext.js.map +1 -0
- package/dist/stories/markdowneditor/ToolbarButton.d.ts +22 -0
- package/dist/stories/markdowneditor/ToolbarButton.js +33 -0
- package/dist/stories/markdowneditor/ToolbarButton.js.map +1 -0
- package/dist/stories/markdowneditor/ToolbarButton.module.css +30 -0
- package/dist/stories/markdowneditor/ToolbarButton.module.scss.js +7 -0
- package/dist/stories/markdowneditor/ToolbarButton.module.scss.js.map +1 -0
- package/dist/stories/markdowneditor/features.d.ts +10 -0
- package/dist/stories/markdowneditor/features.js +79 -0
- package/dist/stories/markdowneditor/features.js.map +1 -0
- package/dist/stories/markdowneditor/index.js +7 -0
- package/dist/stories/markdowneditor/index.js.map +1 -0
- package/dist/stories/markdowneditor/useMarkdownEditor.d.ts +19 -0
- package/dist/stories/markdowneditor/useMarkdownEditor.js +50 -0
- package/dist/stories/markdowneditor/useMarkdownEditor.js.map +1 -0
- package/dist/stories/menu/Menu.d.ts +48 -0
- package/dist/stories/menu/Menu.js +31 -0
- package/dist/stories/menu/Menu.js.map +1 -0
- package/dist/stories/menu/Menu.module.css +59 -0
- package/dist/stories/menu/Menu.module.scss.js +12 -0
- package/dist/stories/menu/Menu.module.scss.js.map +1 -0
- package/dist/stories/menu/index.js +2 -0
- package/dist/stories/menu/index.js.map +1 -0
- package/dist/stories/pagination/index.js +2 -0
- package/dist/stories/pagination/index.js.map +1 -0
- package/dist/stories/pagination/usePagination.d.ts +47 -0
- package/dist/stories/pagination/usePagination.js +52 -0
- package/dist/stories/pagination/usePagination.js.map +1 -0
- package/dist/stories/popover/Popover.d.ts +29 -0
- package/dist/stories/popover/Popover.js +56 -0
- package/dist/stories/popover/Popover.js.map +1 -0
- package/dist/stories/popover/Popover.module.css +20 -0
- package/dist/stories/popover/Popover.module.scss.js +8 -0
- package/dist/stories/popover/Popover.module.scss.js.map +1 -0
- package/dist/stories/popover/index.js +2 -0
- package/dist/stories/popover/index.js.map +1 -0
- package/dist/stories/select/Select.d.ts +112 -0
- package/dist/stories/select/Select.js +283 -0
- package/dist/stories/select/Select.js.map +1 -0
- package/dist/stories/select/Select.module.css +236 -0
- package/dist/stories/select/Select.module.scss.js +47 -0
- package/dist/stories/select/Select.module.scss.js.map +1 -0
- package/dist/stories/select/index.js +2 -0
- package/dist/stories/select/index.js.map +1 -0
- package/dist/stories/styledlink/StyledLink.d.ts +20 -0
- package/dist/stories/styledlink/StyledLink.js +15 -0
- package/dist/stories/styledlink/StyledLink.js.map +1 -0
- package/dist/stories/styledlink/StyledLink.module.css +10 -0
- package/dist/stories/styledlink/StyledLink.module.scss.js +7 -0
- package/dist/stories/styledlink/StyledLink.module.scss.js.map +1 -0
- package/dist/stories/styledlink/index.js +2 -0
- package/dist/stories/styledlink/index.js.map +1 -0
- package/dist/stories/table/Table.d.ts +76 -0
- package/dist/stories/table/Table.js +91 -0
- package/dist/stories/table/Table.js.map +1 -0
- package/dist/stories/table/Table.module.css +60 -0
- package/dist/stories/table/Table.module.scss.js +21 -0
- package/dist/stories/table/Table.module.scss.js.map +1 -0
- package/dist/stories/table/index.js +2 -0
- package/dist/stories/table/index.js.map +1 -0
- package/dist/stories/tabs/Tabs.d.ts +74 -0
- package/dist/stories/tabs/Tabs.js +128 -0
- package/dist/stories/tabs/Tabs.js.map +1 -0
- package/dist/stories/tabs/Tabs.module.css +144 -0
- package/dist/stories/tabs/Tabs.module.scss.js +37 -0
- package/dist/stories/tabs/Tabs.module.scss.js.map +1 -0
- package/dist/stories/tabs/index.js +2 -0
- package/dist/stories/tabs/index.js.map +1 -0
- package/dist/stories/tag/Tag.d.ts +36 -0
- package/dist/stories/tag/Tag.js +52 -0
- package/dist/stories/tag/Tag.js.map +1 -0
- package/dist/stories/tag/Tag.module.css +164 -0
- package/dist/stories/tag/Tag.module.scss.js +38 -0
- package/dist/stories/tag/Tag.module.scss.js.map +1 -0
- package/dist/stories/tag/index.js +2 -0
- package/dist/stories/tag/index.js.map +1 -0
- package/dist/stories/text/Text.d.ts +52 -0
- package/dist/stories/text/Text.js +37 -0
- package/dist/stories/text/Text.js.map +1 -0
- package/dist/stories/text/Text.module.css +54 -0
- package/dist/stories/text/Text.module.scss.js +19 -0
- package/dist/stories/text/Text.module.scss.js.map +1 -0
- package/{src → dist}/stories/text/Typography.module.css +20 -20
- package/dist/stories/text/Typography.module.css.js +45 -0
- package/dist/stories/text/Typography.module.css.js.map +1 -0
- package/dist/stories/text/index.js +2 -0
- package/dist/stories/text/index.js.map +1 -0
- package/dist/stories/textarea/TextArea.d.ts +28 -0
- package/dist/stories/textarea/TextArea.js +102 -0
- package/dist/stories/textarea/TextArea.js.map +1 -0
- package/dist/stories/textarea/index.js +2 -0
- package/dist/stories/textarea/index.js.map +1 -0
- package/{src/stories/theme/tw-preflight.css → dist/stories/theme/global.css} +86 -110
- package/dist/stories/theme/index.js +4 -0
- package/dist/stories/theme/index.js.map +1 -0
- package/dist/stories/theme/themes.d.ts +513 -0
- package/dist/stories/theme/themes.js +854 -0
- package/dist/stories/theme/themes.js.map +1 -0
- package/dist/stories/theme/tokens.d.ts +128 -0
- package/dist/stories/theme/tokens.js +130 -0
- package/dist/stories/theme/tokens.js.map +1 -0
- package/dist/stories/tilt/Tilt.d.ts +70 -0
- package/dist/stories/tilt/Tilt.js +256 -0
- package/dist/stories/tilt/Tilt.js.map +1 -0
- package/dist/stories/tilt/Tilt.module.css +22 -0
- package/dist/stories/tilt/Tilt.module.scss.js +11 -0
- package/dist/stories/tilt/Tilt.module.scss.js.map +1 -0
- package/dist/stories/tilt/index.js +2 -0
- package/dist/stories/tilt/index.js.map +1 -0
- package/{src/stories/toast/Toast.tsx → dist/stories/toast/Toast.d.ts} +3 -17
- package/dist/stories/toast/Toast.js +19 -0
- package/dist/stories/toast/Toast.js.map +1 -0
- package/dist/stories/toast/Toast.module.css +17 -0
- package/dist/stories/toast/Toast.module.scss.js +7 -0
- package/dist/stories/toast/Toast.module.scss.js.map +1 -0
- package/dist/stories/toast/index.js +3 -0
- package/dist/stories/toast/index.js.map +1 -0
- package/dist/stories/utility/EasingFunctions.d.ts +1 -0
- package/dist/stories/utility/EasingFunctions.js +6 -0
- package/dist/stories/utility/EasingFunctions.js.map +1 -0
- package/dist/stories/utility/RemoveFromDOM.d.ts +11 -0
- package/dist/stories/utility/RemoveFromDOM.js +7 -0
- package/dist/stories/utility/RemoveFromDOM.js.map +1 -0
- package/dist/stories/utility/TextWhenString.d.ts +6 -0
- package/dist/stories/utility/TextWhenString.js +13 -0
- package/dist/stories/utility/TextWhenString.js.map +1 -0
- package/dist/stories/utility/VisuallyHidden.d.ts +13 -0
- package/dist/stories/utility/VisuallyHidden.js +8 -0
- package/dist/stories/utility/VisuallyHidden.js.map +1 -0
- package/dist/stories/utility/index.js +5 -0
- package/dist/stories/utility/index.js.map +1 -0
- package/dist/styles.css +3307 -0
- package/dist/types/Enhancer.d.ts +4 -0
- package/package.json +148 -44
- package/src/helpers/OpenChangeEffect.tsx +0 -21
- package/src/helpers/renderEnhancer.tsx +0 -20
- package/src/helpers/useControllableState.test.ts +0 -88
- package/src/helpers/useControllableState.ts +0 -59
- package/src/helpers/useIsMounted.ts +0 -17
- package/src/helpers/useResizeObserver.ts +0 -94
- package/src/pages/_app.tsx +0 -6
- package/src/pages/_document.tsx +0 -13
- package/src/pages/index.tsx +0 -116
- package/src/stories/Pagination.mdx +0 -73
- package/src/stories/Tokens.mdx +0 -46
- package/src/stories/Welcome.mdx +0 -8
- package/src/stories/accordion/Accordion.module.scss +0 -163
- package/src/stories/accordion/Accordion.stories.ts +0 -48
- package/src/stories/accordion/Accordion.test.tsx +0 -142
- package/src/stories/accordion/Accordion.tsx +0 -148
- package/src/stories/accordionselect/AccordionSelect.module.scss +0 -119
- package/src/stories/accordionselect/AccordionSelect.stories.ts +0 -38
- package/src/stories/accordionselect/AccordionSelect.test.tsx +0 -327
- package/src/stories/accordionselect/AccordionSelect.tsx +0 -249
- package/src/stories/avatar/Avatar.module.scss +0 -7
- package/src/stories/avatar/Avatar.stories.ts +0 -22
- package/src/stories/avatar/Avatar.test.tsx +0 -77
- package/src/stories/avatar/Avatar.tsx +0 -55
- package/src/stories/button/Button.module.scss +0 -167
- package/src/stories/button/Button.stories.ts +0 -93
- package/src/stories/button/Button.test.tsx +0 -266
- package/src/stories/button/Button.tsx +0 -226
- package/src/stories/callout/Callout.module.scss +0 -43
- package/src/stories/callout/Callout.stories.ts +0 -52
- package/src/stories/callout/Callout.test.tsx +0 -79
- package/src/stories/callout/Callout.tsx +0 -43
- package/src/stories/card/Card.module.scss +0 -42
- package/src/stories/card/Card.stories.ts +0 -38
- package/src/stories/card/Card.test.tsx +0 -81
- package/src/stories/card/Card.tsx +0 -54
- package/src/stories/cardbutton/CardButton.module.scss +0 -88
- package/src/stories/cardbutton/CardButton.stories.tsx +0 -24
- package/src/stories/cardbutton/CardButton.test.tsx +0 -174
- package/src/stories/cardbutton/CardButton.tsx +0 -100
- package/src/stories/checkbox/Checkbox.module.scss +0 -198
- package/src/stories/checkbox/Checkbox.stories.ts +0 -87
- package/src/stories/checkbox/Checkbox.test.tsx +0 -584
- package/src/stories/checkbox/Checkbox.tsx +0 -123
- package/src/stories/codeinput/CodeInput.module.scss +0 -77
- package/src/stories/codeinput/CodeInput.stories.ts +0 -51
- package/src/stories/codeinput/CodeInput.test.tsx +0 -56
- package/src/stories/codeinput/CodeInput.tsx +0 -160
- package/src/stories/combobox/Combobox.module.scss +0 -5
- package/src/stories/combobox/Combobox.stories.ts +0 -270
- package/src/stories/combobox/Combobox.test.tsx +0 -275
- package/src/stories/combobox/Combobox.tsx +0 -396
- package/src/stories/dialog/Dialog.module.scss +0 -211
- package/src/stories/dialog/Dialog.stories.tsx +0 -93
- package/src/stories/dialog/Dialog.test.tsx +0 -244
- package/src/stories/dialog/Dialog.tsx +0 -283
- package/src/stories/drawer/Drawer.module.scss +0 -479
- package/src/stories/drawer/Drawer.stories.tsx +0 -494
- package/src/stories/drawer/Drawer.test.tsx +0 -734
- package/src/stories/drawer/Drawer.tsx +0 -548
- package/src/stories/drawer/DrawerActions.tsx +0 -28
- package/src/stories/drawer/DrawerBottomPanel.tsx +0 -55
- package/src/stories/drawer/DrawerContext.tsx +0 -31
- package/src/stories/drawer/DrawerPage.tsx +0 -37
- package/src/stories/drawer/DrawerPageContext.tsx +0 -35
- package/src/stories/drawer/DrawerPaginationContext.tsx +0 -22
- package/src/stories/drawer/DrawerProgressBar.tsx +0 -72
- package/src/stories/drawer/DrawerSlotContext.tsx +0 -172
- package/src/stories/drawer/DrawerTitle.tsx +0 -35
- package/src/stories/field/Field.stories.ts +0 -36
- package/src/stories/field/Field.test.tsx +0 -146
- package/src/stories/field/Field.tsx +0 -145
- package/src/stories/icon/ArrowRight.tsx +0 -11
- package/src/stories/icon/Check.tsx +0 -11
- package/src/stories/icon/ChevronLeft.tsx +0 -11
- package/src/stories/icon/ChevronRight.tsx +0 -11
- package/src/stories/icon/Close.tsx +0 -11
- package/src/stories/icon/Ellipsis.tsx +0 -11
- package/src/stories/icon/Icon.module.scss +0 -5
- package/src/stories/icon/Icon.stories.ts +0 -33
- package/src/stories/icon/Icon.test.tsx +0 -59
- package/src/stories/icon/Info.tsx +0 -11
- package/src/stories/icon/NotificationDot.tsx +0 -8
- package/src/stories/icon/Spinner.tsx +0 -17
- package/src/stories/informationaltooltip/InformationalTooltip.module.scss +0 -23
- package/src/stories/informationaltooltip/InformationalTooltip.stories.tsx +0 -61
- package/src/stories/informationaltooltip/InformationalTooltip.test.tsx +0 -178
- package/src/stories/informationaltooltip/InformationalTooltip.tsx +0 -170
- package/src/stories/input/Input.module.scss +0 -217
- package/src/stories/input/Input.stories.ts +0 -110
- package/src/stories/input/Input.test.tsx +0 -174
- package/src/stories/input/Input.tsx +0 -181
- package/src/stories/markdown/Markdown.module.scss +0 -384
- package/src/stories/markdown/Markdown.stories.ts +0 -203
- package/src/stories/markdown/Markdown.test.tsx +0 -228
- package/src/stories/markdown/Markdown.tsx +0 -293
- package/src/stories/markdowneditor/FixedToolbar.module.scss +0 -24
- package/src/stories/markdowneditor/FixedToolbar.tsx +0 -274
- package/src/stories/markdowneditor/FloatingToolbar.module.scss +0 -21
- package/src/stories/markdowneditor/FloatingToolbar.tsx +0 -94
- package/src/stories/markdowneditor/LinkPopover.module.scss +0 -124
- package/src/stories/markdowneditor/LinkPopover.tsx +0 -135
- package/src/stories/markdowneditor/MarkdownEditor.module.scss +0 -405
- package/src/stories/markdowneditor/MarkdownEditor.stories.tsx +0 -226
- package/src/stories/markdowneditor/MarkdownEditor.test.tsx +0 -115
- package/src/stories/markdowneditor/MarkdownEditorContext.tsx +0 -20
- package/src/stories/markdowneditor/ToolbarButton.module.scss +0 -35
- package/src/stories/markdowneditor/ToolbarButton.tsx +0 -52
- package/src/stories/markdowneditor/features.ts +0 -92
- package/src/stories/markdowneditor/useMarkdownEditor.ts +0 -75
- package/src/stories/menu/Menu.module.scss +0 -71
- package/src/stories/menu/Menu.stories.tsx +0 -37
- package/src/stories/menu/Menu.test.tsx +0 -254
- package/src/stories/menu/Menu.tsx +0 -95
- package/src/stories/pagination/usePagination.test.ts +0 -259
- package/src/stories/pagination/usePagination.ts +0 -117
- package/src/stories/popover/Popover.module.scss +0 -22
- package/src/stories/popover/Popover.stories.ts +0 -20
- package/src/stories/popover/Popover.test.tsx +0 -152
- package/src/stories/popover/Popover.tsx +0 -89
- package/src/stories/select/Select.module.scss +0 -311
- package/src/stories/select/Select.stories.ts +0 -153
- package/src/stories/select/Select.test.tsx +0 -341
- package/src/stories/select/Select.tsx +0 -398
- package/src/stories/styledlink/StyledLink.module.scss +0 -11
- package/src/stories/styledlink/StyledLink.stories.ts +0 -28
- package/src/stories/styledlink/StyledLink.test.tsx +0 -59
- package/src/stories/styledlink/StyledLink.tsx +0 -33
- package/src/stories/table/Table.module.scss +0 -74
- package/src/stories/table/Table.stories.ts +0 -62
- package/src/stories/table/Table.test.tsx +0 -156
- package/src/stories/table/Table.tsx +0 -182
- package/src/stories/tabs/Tabs.module.scss +0 -185
- package/src/stories/tabs/Tabs.stories.tsx +0 -209
- package/src/stories/tabs/Tabs.test.tsx +0 -167
- package/src/stories/tabs/Tabs.tsx +0 -191
- package/src/stories/tag/Tag.module.scss +0 -189
- package/src/stories/tag/Tag.stories.ts +0 -58
- package/src/stories/tag/Tag.test.tsx +0 -90
- package/src/stories/tag/Tag.tsx +0 -84
- package/src/stories/text/Text.module.scss +0 -39
- package/src/stories/text/Text.stories.ts +0 -195
- package/src/stories/text/Text.test.tsx +0 -81
- package/src/stories/text/Text.tsx +0 -108
- package/src/stories/textarea/TextArea.stories.ts +0 -39
- package/src/stories/textarea/TextArea.test.tsx +0 -147
- package/src/stories/textarea/TextArea.tsx +0 -112
- package/src/stories/theme/global.scss +0 -6
- package/src/stories/theme/themes.ts +0 -1509
- package/src/stories/theme/tokens.ts +0 -149
- package/src/stories/theme/util.scss +0 -8
- package/src/stories/tilt/Tilt.module.scss +0 -22
- package/src/stories/tilt/Tilt.stories.tsx +0 -42
- package/src/stories/tilt/Tilt.test.tsx +0 -203
- package/src/stories/tilt/Tilt.tsx +0 -375
- package/src/stories/toast/Toast.module.scss +0 -20
- package/src/stories/toast/Toast.stories.tsx +0 -31
- package/src/stories/toast/Toast.test.tsx +0 -86
- package/src/stories/utility/Dropdown.module.scss +0 -28
- package/src/stories/utility/EasingFunctions.ts +0 -3
- package/src/stories/utility/RemoveFromDOM.tsx +0 -15
- package/src/stories/utility/TextWhenString.tsx +0 -15
- package/src/stories/utility/Utility.test.tsx +0 -96
- package/src/stories/utility/VisuallyHidden.tsx +0 -18
- package/src/styles/Home.module.css +0 -268
- package/src/styles/globals.css +0 -3
- package/src/test/render.tsx +0 -20
- package/src/test/setup.ts +0 -32
- package/src/types/Enhancer.ts +0 -3
- /package/{src/stories/accordion/index.ts → dist/stories/accordion/index.d.ts} +0 -0
- /package/{src/stories/accordionselect/index.ts → dist/stories/accordionselect/index.d.ts} +0 -0
- /package/{src/stories/avatar/index.ts → dist/stories/avatar/index.d.ts} +0 -0
- /package/{src/stories/button/index.ts → dist/stories/button/index.d.ts} +0 -0
- /package/{src/stories/callout/index.ts → dist/stories/callout/index.d.ts} +0 -0
- /package/{src/stories/card/index.ts → dist/stories/card/index.d.ts} +0 -0
- /package/{src/stories/cardbutton/index.ts → dist/stories/cardbutton/index.d.ts} +0 -0
- /package/{src/stories/checkbox/index.ts → dist/stories/checkbox/index.d.ts} +0 -0
- /package/{src/stories/codeinput/index.ts → dist/stories/codeinput/index.d.ts} +0 -0
- /package/{src/stories/combobox/index.ts → dist/stories/combobox/index.d.ts} +0 -0
- /package/{src/stories/dialog/index.ts → dist/stories/dialog/index.d.ts} +0 -0
- /package/{src/stories/drawer/index.ts → dist/stories/drawer/index.d.ts} +0 -0
- /package/{src/stories/field/index.ts → dist/stories/field/index.d.ts} +0 -0
- /package/{src/stories/icon/index.ts → dist/stories/icon/index.d.ts} +0 -0
- /package/{src/stories/informationaltooltip/index.ts → dist/stories/informationaltooltip/index.d.ts} +0 -0
- /package/{src/stories/input/index.ts → dist/stories/input/index.d.ts} +0 -0
- /package/{src/stories/markdown/index.ts → dist/stories/markdown/index.d.ts} +0 -0
- /package/{src/stories/markdowneditor/index.ts → dist/stories/markdowneditor/index.d.ts} +0 -0
- /package/{src/stories/menu/index.ts → dist/stories/menu/index.d.ts} +0 -0
- /package/{src/stories/pagination/index.ts → dist/stories/pagination/index.d.ts} +0 -0
- /package/{src/stories/popover/index.ts → dist/stories/popover/index.d.ts} +0 -0
- /package/{src/stories/select/index.ts → dist/stories/select/index.d.ts} +0 -0
- /package/{src/stories/styledlink/index.ts → dist/stories/styledlink/index.d.ts} +0 -0
- /package/{src/stories/table/index.ts → dist/stories/table/index.d.ts} +0 -0
- /package/{src/stories/tabs/index.ts → dist/stories/tabs/index.d.ts} +0 -0
- /package/{src/stories/tag/index.ts → dist/stories/tag/index.d.ts} +0 -0
- /package/{src/stories/text/index.ts → dist/stories/text/index.d.ts} +0 -0
- /package/{src/stories/textarea/index.ts → dist/stories/textarea/index.d.ts} +0 -0
- /package/{src/stories/theme/index.ts → dist/stories/theme/index.d.ts} +0 -0
- /package/{src/stories/tilt/index.ts → dist/stories/tilt/index.d.ts} +0 -0
- /package/{src/stories/toast/index.ts → dist/stories/toast/index.d.ts} +0 -0
- /package/{src/stories/utility/index.ts → dist/stories/utility/index.d.ts} +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
|
|
2
|
+
export type AccordionSelectOption<T = Record<string, unknown>> = {
|
|
3
|
+
/**
|
|
4
|
+
* A unique identifier for the option.
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* The content to render for this option.
|
|
9
|
+
*/
|
|
10
|
+
node: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Whether this option is disabled.
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Optional metadata associated with the option.
|
|
18
|
+
*/
|
|
19
|
+
metadata?: T;
|
|
20
|
+
};
|
|
21
|
+
export type AccordionSelectProps<T = Record<string, unknown>> = {
|
|
22
|
+
/**
|
|
23
|
+
* The list of selectable options.
|
|
24
|
+
*/
|
|
25
|
+
options: AccordionSelectOption<T>[];
|
|
26
|
+
/**
|
|
27
|
+
* The currently selected option ID.
|
|
28
|
+
*/
|
|
29
|
+
value?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* The initial selected option ID for uncontrolled mode. If `value` is provided, this is ignored.
|
|
32
|
+
*/
|
|
33
|
+
defaultValue?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Called when the user selects an option.
|
|
36
|
+
*/
|
|
37
|
+
onChange?: (option: AccordionSelectOption<T>) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Custom content to render as the header when an option is selected.
|
|
40
|
+
* Receives the selected option. If not provided, the option's `node` is used.
|
|
41
|
+
*/
|
|
42
|
+
renderSelected?: (option: AccordionSelectOption<T>) => ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Custom content to render for each option in the dropdown.
|
|
45
|
+
* Receives the option and whether it's selected. If not provided, the option's `node` is used.
|
|
46
|
+
*/
|
|
47
|
+
renderOption?: (option: AccordionSelectOption<T>, isSelected: boolean) => ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Placeholder to show when no option is selected.
|
|
50
|
+
* @default 'Select an option'
|
|
51
|
+
*/
|
|
52
|
+
placeholder?: ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the accordion is open. If provided, the component becomes controlled.
|
|
55
|
+
*/
|
|
56
|
+
isOpen?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Called when the open state changes.
|
|
59
|
+
*/
|
|
60
|
+
onOpenChange?: (open: boolean) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Whether to close the accordion when an option is selected.
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
closeOnSelect?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Whether to close the accordion when clicking outside.
|
|
68
|
+
* @default true
|
|
69
|
+
*/
|
|
70
|
+
closeOnClickOutside?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Optional action to render at the bottom of the options list (e.g. "Add new" button).
|
|
73
|
+
*/
|
|
74
|
+
action?: ReactNode;
|
|
75
|
+
/**
|
|
76
|
+
* Optional label to display on the header (e.g. a Tag).
|
|
77
|
+
*/
|
|
78
|
+
label?: ReactNode;
|
|
79
|
+
/**
|
|
80
|
+
* Optional overrides for nested components.
|
|
81
|
+
*/
|
|
82
|
+
overrides?: {
|
|
83
|
+
root?: ComponentPropsWithoutRef<'div'>;
|
|
84
|
+
header?: ComponentPropsWithoutRef<'div'>;
|
|
85
|
+
dropdown?: ComponentPropsWithoutRef<'div'>;
|
|
86
|
+
dropdownContent?: ComponentPropsWithoutRef<'div'>;
|
|
87
|
+
option?: ComponentPropsWithoutRef<'button'>;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* An AccordionSelect component. Displays the selected option in a card header that expands to reveal all options.
|
|
92
|
+
*
|
|
93
|
+
* <hr />
|
|
94
|
+
*
|
|
95
|
+
* To use this component, import it as follows:
|
|
96
|
+
*
|
|
97
|
+
* ```js
|
|
98
|
+
* import { AccordionSelect } from 'paris/accordionselect';
|
|
99
|
+
* ```
|
|
100
|
+
* @constructor
|
|
101
|
+
*/
|
|
102
|
+
export declare const AccordionSelect: FC<AccordionSelectProps>;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { useRef, useEffect } from 'react';
|
|
5
|
+
import { useControllableState } from '../../helpers/useControllableState.js';
|
|
6
|
+
import { Check } from '../icon/Check.js';
|
|
7
|
+
import { ChevronRight } from '../icon/ChevronRight.js';
|
|
8
|
+
import { Icon } from '../icon/Icon.js';
|
|
9
|
+
import { TextWhenString } from '../utility/TextWhenString.js';
|
|
10
|
+
import styles from './AccordionSelect.module.scss.js';
|
|
11
|
+
|
|
12
|
+
const AccordionSelect = ({
|
|
13
|
+
options,
|
|
14
|
+
value,
|
|
15
|
+
defaultValue,
|
|
16
|
+
onChange,
|
|
17
|
+
renderSelected,
|
|
18
|
+
renderOption,
|
|
19
|
+
placeholder = "Select an option",
|
|
20
|
+
isOpen: controlledOpen,
|
|
21
|
+
onOpenChange,
|
|
22
|
+
closeOnSelect = true,
|
|
23
|
+
closeOnClickOutside = true,
|
|
24
|
+
action,
|
|
25
|
+
label,
|
|
26
|
+
overrides
|
|
27
|
+
}) => {
|
|
28
|
+
const [open, setOpen] = useControllableState({
|
|
29
|
+
value: controlledOpen,
|
|
30
|
+
defaultValue: false,
|
|
31
|
+
onChange: onOpenChange
|
|
32
|
+
});
|
|
33
|
+
const rootRef = useRef(null);
|
|
34
|
+
const [resolvedValue, setResolvedValue] = useControllableState({
|
|
35
|
+
value,
|
|
36
|
+
defaultValue,
|
|
37
|
+
onChange: (id) => {
|
|
38
|
+
const option = options.find((o) => o.id === id);
|
|
39
|
+
if (option) onChange?.(option);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const selectedOption = options.find((o) => o.id === resolvedValue);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (!closeOnClickOutside || !open) {
|
|
45
|
+
return () => {
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const handleClickOutside = (e) => {
|
|
49
|
+
if (rootRef.current && !rootRef.current.contains(e.target)) {
|
|
50
|
+
setOpen(false);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
54
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
55
|
+
}, [closeOnClickOutside, open, setOpen]);
|
|
56
|
+
let headerContent = placeholder;
|
|
57
|
+
if (selectedOption) {
|
|
58
|
+
headerContent = renderSelected ? renderSelected(selectedOption) : selectedOption.node;
|
|
59
|
+
}
|
|
60
|
+
return /* @__PURE__ */ jsxs(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
ref: rootRef,
|
|
64
|
+
...overrides?.root,
|
|
65
|
+
className: clsx(styles.root, open && styles.open, overrides?.root?.className),
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ jsxs(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
...overrides?.header,
|
|
71
|
+
className: clsx(styles.header, open && styles.open, overrides?.header?.className),
|
|
72
|
+
onClick: () => setOpen(!open),
|
|
73
|
+
onKeyDown: (e) => {
|
|
74
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
setOpen(!open);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
role: "button",
|
|
80
|
+
tabIndex: 0,
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ jsx("div", { className: styles.headerContent, children: /* @__PURE__ */ jsx(TextWhenString, { kind: "paragraphSmall", weight: "medium", children: headerContent }) }),
|
|
83
|
+
/* @__PURE__ */ jsxs("div", { className: styles.headerEnd, children: [
|
|
84
|
+
label,
|
|
85
|
+
/* @__PURE__ */ jsx(Icon, { icon: ChevronRight, size: 16, className: clsx(styles.chevron, open && styles.open) })
|
|
86
|
+
] })
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ jsx(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
...overrides?.dropdown,
|
|
94
|
+
"aria-hidden": !open,
|
|
95
|
+
className: clsx(styles.dropdown, open && styles.open, overrides?.dropdown?.className),
|
|
96
|
+
children: /* @__PURE__ */ jsxs(
|
|
97
|
+
"div",
|
|
98
|
+
{
|
|
99
|
+
...overrides?.dropdownContent,
|
|
100
|
+
className: clsx(styles.dropdownContent, overrides?.dropdownContent?.className),
|
|
101
|
+
children: [
|
|
102
|
+
options.map((option) => {
|
|
103
|
+
const isOptionSelected = option.id === resolvedValue;
|
|
104
|
+
return /* @__PURE__ */ jsxs(
|
|
105
|
+
"button",
|
|
106
|
+
{
|
|
107
|
+
type: "button",
|
|
108
|
+
disabled: option.disabled || !open,
|
|
109
|
+
tabIndex: open ? void 0 : -1,
|
|
110
|
+
"data-selected": isOptionSelected,
|
|
111
|
+
...overrides?.option,
|
|
112
|
+
className: clsx(styles.option, overrides?.option?.className),
|
|
113
|
+
onClick: () => {
|
|
114
|
+
setResolvedValue(option.id);
|
|
115
|
+
if (closeOnSelect) setOpen(false);
|
|
116
|
+
},
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ jsx("div", { className: styles.optionContent, children: renderOption ? renderOption(option, isOptionSelected) : /* @__PURE__ */ jsx(TextWhenString, { kind: "paragraphXSmall", weight: "medium", children: option.node }) }),
|
|
119
|
+
isOptionSelected && /* @__PURE__ */ jsx(Icon, { icon: Check, size: 13, className: styles.check })
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
option.id
|
|
123
|
+
);
|
|
124
|
+
}),
|
|
125
|
+
action
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export { AccordionSelect };
|
|
137
|
+
//# sourceMappingURL=AccordionSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionSelect.js","sources":["../../../src/stories/accordionselect/AccordionSelect.tsx"],"sourcesContent":["'use client';\n\nimport { clsx } from 'clsx';\nimport type { ComponentPropsWithoutRef, FC, ReactNode } from 'react';\nimport { useEffect, useRef } from 'react';\nimport { useControllableState } from '../../helpers/useControllableState';\nimport { Check, ChevronRight, Icon } from '../icon';\nimport { TextWhenString } from '../utility';\nimport styles from './AccordionSelect.module.scss';\n\nexport type AccordionSelectOption<T = Record<string, unknown>> = {\n /**\n * A unique identifier for the option.\n */\n id: string;\n /**\n * The content to render for this option.\n */\n node: ReactNode;\n /**\n * Whether this option is disabled.\n * @default false\n */\n disabled?: boolean;\n /**\n * Optional metadata associated with the option.\n */\n metadata?: T;\n};\n\nexport type AccordionSelectProps<T = Record<string, unknown>> = {\n /**\n * The list of selectable options.\n */\n options: AccordionSelectOption<T>[];\n /**\n * The currently selected option ID.\n */\n value?: string | null;\n /**\n * The initial selected option ID for uncontrolled mode. If `value` is provided, this is ignored.\n */\n defaultValue?: string | null;\n /**\n * Called when the user selects an option.\n */\n onChange?: (option: AccordionSelectOption<T>) => void;\n /**\n * Custom content to render as the header when an option is selected.\n * Receives the selected option. If not provided, the option's `node` is used.\n */\n renderSelected?: (option: AccordionSelectOption<T>) => ReactNode;\n /**\n * Custom content to render for each option in the dropdown.\n * Receives the option and whether it's selected. If not provided, the option's `node` is used.\n */\n renderOption?: (option: AccordionSelectOption<T>, isSelected: boolean) => ReactNode;\n /**\n * Placeholder to show when no option is selected.\n * @default 'Select an option'\n */\n placeholder?: ReactNode;\n /**\n * Whether the accordion is open. If provided, the component becomes controlled.\n */\n isOpen?: boolean;\n /**\n * Called when the open state changes.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Whether to close the accordion when an option is selected.\n * @default true\n */\n closeOnSelect?: boolean;\n /**\n * Whether to close the accordion when clicking outside.\n * @default true\n */\n closeOnClickOutside?: boolean;\n /**\n * Optional action to render at the bottom of the options list (e.g. \"Add new\" button).\n */\n action?: ReactNode;\n /**\n * Optional label to display on the header (e.g. a Tag).\n */\n label?: ReactNode;\n /**\n * Optional overrides for nested components.\n */\n overrides?: {\n root?: ComponentPropsWithoutRef<'div'>;\n header?: ComponentPropsWithoutRef<'div'>;\n dropdown?: ComponentPropsWithoutRef<'div'>;\n dropdownContent?: ComponentPropsWithoutRef<'div'>;\n option?: ComponentPropsWithoutRef<'button'>;\n };\n};\n\n/**\n * An AccordionSelect component. Displays the selected option in a card header that expands to reveal all options.\n *\n * <hr />\n *\n * To use this component, import it as follows:\n *\n * ```js\n * import { AccordionSelect } from 'paris/accordionselect';\n * ```\n * @constructor\n */\nexport const AccordionSelect: FC<AccordionSelectProps> = ({\n options,\n value,\n defaultValue,\n onChange,\n renderSelected,\n renderOption,\n placeholder = 'Select an option',\n isOpen: controlledOpen,\n onOpenChange,\n closeOnSelect = true,\n closeOnClickOutside = true,\n action,\n label,\n overrides,\n}) => {\n const [open, setOpen] = useControllableState({\n value: controlledOpen,\n defaultValue: false,\n onChange: onOpenChange,\n });\n const rootRef = useRef<HTMLDivElement>(null);\n\n const [resolvedValue, setResolvedValue] = useControllableState<string | null>({\n value,\n defaultValue,\n onChange: (id) => {\n const option = options.find((o) => o.id === id);\n if (option) onChange?.(option);\n },\n });\n\n const selectedOption = options.find((o) => o.id === resolvedValue);\n\n useEffect(() => {\n if (!closeOnClickOutside || !open) {\n return () => {};\n }\n\n const handleClickOutside = (e: MouseEvent) => {\n if (rootRef.current && !rootRef.current.contains(e.target as Node)) {\n setOpen(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, [closeOnClickOutside, open, setOpen]);\n\n let headerContent: ReactNode = placeholder;\n if (selectedOption) {\n headerContent = renderSelected ? renderSelected(selectedOption) : selectedOption.node;\n }\n\n return (\n <div\n ref={rootRef}\n {...overrides?.root}\n className={clsx(styles.root, open && styles.open, overrides?.root?.className)}\n >\n <div\n {...overrides?.header}\n className={clsx(styles.header, open && styles.open, overrides?.header?.className)}\n onClick={() => setOpen(!open)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n setOpen(!open);\n }\n }}\n role=\"button\"\n tabIndex={0}\n >\n <div className={styles.headerContent}>\n <TextWhenString kind=\"paragraphSmall\" weight=\"medium\">\n {headerContent}\n </TextWhenString>\n </div>\n <div className={styles.headerEnd}>\n {label}\n <Icon icon={ChevronRight} size={16} className={clsx(styles.chevron, open && styles.open)} />\n </div>\n </div>\n\n {/*\n * Collapse animation uses the CSS grid-rows trick (`1fr` → `0fr`) instead\n * of animating `height: auto`. JS-driven height-auto animations (e.g.\n * framer-motion) flash an intermediate layout state on open/close that\n * causes scrollable ancestors to clamp `scrollTop` to 0 in the first\n * paint frame — visible as an instant scroll snap before the animation\n * starts. The grid-rows approach keeps the layout stable across the\n * entire transition.\n */}\n <div\n {...overrides?.dropdown}\n aria-hidden={!open}\n className={clsx(styles.dropdown, open && styles.open, overrides?.dropdown?.className)}\n >\n <div\n {...overrides?.dropdownContent}\n className={clsx(styles.dropdownContent, overrides?.dropdownContent?.className)}\n >\n {options.map((option) => {\n const isOptionSelected = option.id === resolvedValue;\n return (\n <button\n key={option.id}\n type=\"button\"\n disabled={option.disabled || !open}\n tabIndex={open ? undefined : -1}\n data-selected={isOptionSelected}\n {...overrides?.option}\n className={clsx(styles.option, overrides?.option?.className)}\n onClick={() => {\n setResolvedValue(option.id);\n if (closeOnSelect) setOpen(false);\n }}\n >\n <div className={styles.optionContent}>\n {renderOption ? (\n renderOption(option, isOptionSelected)\n ) : (\n <TextWhenString kind=\"paragraphXSmall\" weight=\"medium\">\n {option.node}\n </TextWhenString>\n )}\n </div>\n {isOptionSelected && <Icon icon={Check} size={13} className={styles.check} />}\n </button>\n );\n })}\n {action}\n </div>\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAgHO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAA4C,CAAC;AAAA,CAAA,CACtD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,C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,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CACJ;AAER,CAAA;;"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
.paris_root_66wcQ {
|
|
2
|
+
color: var(--pte-new-colors-contentPrimary);
|
|
3
|
+
border: 1px solid var(--pte-new-colors-borderStrong);
|
|
4
|
+
border-radius: var(--pte-new-borders-radius-roundedMedium);
|
|
5
|
+
background: var(--pte-new-colors-surfacePrimary);
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
transition: var(--pte-animations-interaction);
|
|
8
|
+
}
|
|
9
|
+
.paris_root_66wcQ.paris_open_FCY1A {
|
|
10
|
+
border-color: var(--pte-new-colors-borderUltrastrong);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.paris_header_PKn63 {
|
|
14
|
+
padding: 10px 12px;
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 10px;
|
|
19
|
+
background-color: var(--pte-new-colors-overlayWhiteSubtle);
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition: var(--pte-animations-interaction);
|
|
22
|
+
}
|
|
23
|
+
.paris_header_PKn63.paris_open_FCY1A {
|
|
24
|
+
background-color: var(--pte-new-colors-overlayMedium);
|
|
25
|
+
border-bottom: 1px solid var(--pte-new-colors-borderStrong);
|
|
26
|
+
}
|
|
27
|
+
.paris_header_PKn63:hover {
|
|
28
|
+
background-color: var(--pte-new-colors-overlayStrong);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.paris_headerContent_GYCii {
|
|
32
|
+
flex: 1;
|
|
33
|
+
min-width: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.paris_headerEnd_OTSFb {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 8px;
|
|
40
|
+
flex-shrink: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.paris_chevron_Dhtll {
|
|
44
|
+
transition: transform var(--pte-animations-duration-gradual) var(--pte-animations-timing-easeInOutExpo);
|
|
45
|
+
transform: rotate(90deg);
|
|
46
|
+
}
|
|
47
|
+
.paris_chevron_Dhtll.paris_open_FCY1A {
|
|
48
|
+
transform: rotate(-90deg);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.paris_dropdown_UgKKg {
|
|
52
|
+
display: grid;
|
|
53
|
+
grid-template-rows: 0fr;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
transition: grid-template-rows 800ms cubic-bezier(0.87, 0, 0.13, 1), opacity 800ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
56
|
+
}
|
|
57
|
+
.paris_dropdown_UgKKg.paris_open_FCY1A {
|
|
58
|
+
grid-template-rows: 1fr;
|
|
59
|
+
opacity: 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.paris_dropdownContent_29-L- {
|
|
63
|
+
min-height: 0;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
padding: 0;
|
|
68
|
+
gap: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.paris_option_Ijd6n {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: 10px;
|
|
75
|
+
padding: 8px 14px;
|
|
76
|
+
border-bottom: 0.5px solid var(--pte-new-colors-borderMedium);
|
|
77
|
+
background: transparent;
|
|
78
|
+
color: inherit;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
transition: background var(--pte-animations-duration-instant) var(--pte-animations-timing-easeInOutExpo);
|
|
81
|
+
}
|
|
82
|
+
.paris_option_Ijd6n:last-of-type {
|
|
83
|
+
border-bottom: none;
|
|
84
|
+
}
|
|
85
|
+
.paris_option_Ijd6n[data-selected=true] {
|
|
86
|
+
background: var(--pte-new-colors-overlaySubtle);
|
|
87
|
+
}
|
|
88
|
+
.paris_option_Ijd6n:hover {
|
|
89
|
+
background: var(--pte-new-colors-overlayMedium);
|
|
90
|
+
}
|
|
91
|
+
.paris_option_Ijd6n:disabled {
|
|
92
|
+
opacity: 0.4;
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
}
|
|
95
|
+
.paris_option_Ijd6n:disabled:hover {
|
|
96
|
+
background: transparent;
|
|
97
|
+
}
|
|
98
|
+
.paris_option_Ijd6n .paris_check_niu9e {
|
|
99
|
+
padding: 4px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.paris_optionContent_C6dcG {
|
|
103
|
+
flex: 1;
|
|
104
|
+
text-align: left;
|
|
105
|
+
min-width: 0;
|
|
106
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import './AccordionSelect.module.css';const root = "paris_root_66wcQ";
|
|
2
|
+
const open = "paris_open_FCY1A";
|
|
3
|
+
const header = "paris_header_PKn63";
|
|
4
|
+
const headerContent = "paris_headerContent_GYCii";
|
|
5
|
+
const headerEnd = "paris_headerEnd_OTSFb";
|
|
6
|
+
const chevron = "paris_chevron_Dhtll";
|
|
7
|
+
const dropdown = "paris_dropdown_UgKKg";
|
|
8
|
+
const dropdownContent = "paris_dropdownContent_29-L-";
|
|
9
|
+
const option = "paris_option_Ijd6n";
|
|
10
|
+
const check = "paris_check_niu9e";
|
|
11
|
+
const optionContent = "paris_optionContent_C6dcG";
|
|
12
|
+
const styles = {
|
|
13
|
+
root: root,
|
|
14
|
+
open: open,
|
|
15
|
+
header: header,
|
|
16
|
+
headerContent: headerContent,
|
|
17
|
+
headerEnd: headerEnd,
|
|
18
|
+
chevron: chevron,
|
|
19
|
+
dropdown: dropdown,
|
|
20
|
+
dropdownContent: dropdownContent,
|
|
21
|
+
option: option,
|
|
22
|
+
check: check,
|
|
23
|
+
optionContent: optionContent
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { check, chevron, styles as default, dropdown, dropdownContent, header, headerContent, headerEnd, open, option, optionContent, root };
|
|
27
|
+
//# sourceMappingURL=AccordionSelect.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionSelect.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CSSLength } from '@ssh/csstypes';
|
|
2
|
+
import { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
|
|
3
|
+
export type AvatarProps = {
|
|
4
|
+
frameColor?: string;
|
|
5
|
+
/** The width of the Avatar, as a CSS length string or a number. If a number is provided, the assumed unit is pixels. */
|
|
6
|
+
width?: CSSLength | number;
|
|
7
|
+
/** The contents of the Avatar, usually an image element. */
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
10
|
+
/**
|
|
11
|
+
* An Avatar component.
|
|
12
|
+
*
|
|
13
|
+
* <hr />
|
|
14
|
+
*
|
|
15
|
+
* To use this component, import it as follows:
|
|
16
|
+
*
|
|
17
|
+
* ```js
|
|
18
|
+
* import { Avatar } from 'paris/avatar';
|
|
19
|
+
* ```
|
|
20
|
+
* @constructor
|
|
21
|
+
*/
|
|
22
|
+
export declare const Avatar: FC<AvatarProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
import 'pte';
|
|
6
|
+
import { pvar } from '../theme/themes.js';
|
|
7
|
+
import styles from './Avatar.module.scss.js';
|
|
8
|
+
|
|
9
|
+
const Avatar = ({
|
|
10
|
+
frameColor = pvar("new.colors.borderMedium"),
|
|
11
|
+
width = "fit-content",
|
|
12
|
+
children,
|
|
13
|
+
className,
|
|
14
|
+
style,
|
|
15
|
+
...props
|
|
16
|
+
}) => {
|
|
17
|
+
const widthMemoized = useMemo(
|
|
18
|
+
() => typeof width === "number" ? `${width}px` : width,
|
|
19
|
+
[width]
|
|
20
|
+
);
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
...props,
|
|
25
|
+
style: {
|
|
26
|
+
width: widthMemoized,
|
|
27
|
+
"--frame-color": frameColor,
|
|
28
|
+
...style
|
|
29
|
+
},
|
|
30
|
+
className: clsx(styles.content, className),
|
|
31
|
+
children
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { Avatar };
|
|
37
|
+
//# sourceMappingURL=Avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../../../src/stories/avatar/Avatar.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSLength } from '@ssh/csstypes';\nimport { clsx } from 'clsx';\nimport type { ComponentPropsWithoutRef, CSSProperties, FC, ReactNode } from 'react';\nimport { useMemo } from 'react';\nimport { pvar } from '../theme';\nimport styles from './Avatar.module.scss';\n\nexport type AvatarProps = {\n frameColor?: string;\n /** The width of the Avatar, as a CSS length string or a number. If a number is provided, the assumed unit is pixels. */\n width?: CSSLength | number;\n /** The contents of the Avatar, usually an image element. */\n children?: ReactNode;\n} & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;\n\n/**\n * An Avatar component.\n *\n * <hr />\n *\n * To use this component, import it as follows:\n *\n * ```js\n * import { Avatar } from 'paris/avatar';\n * ```\n * @constructor\n */\nexport const Avatar: FC<AvatarProps> = ({\n frameColor = pvar('new.colors.borderMedium'),\n width = 'fit-content',\n children,\n className,\n style,\n ...props\n}) => {\n const widthMemoized = useMemo(\n () => (typeof width === 'number' ? `${width}px` : width) as CSSProperties['width'],\n [width],\n );\n return (\n <div\n {...props}\n style={\n {\n width: widthMemoized,\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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CACL;AAER,CAAA;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { ButtonProps as AriaButtonProps } from '@ariakit/react';
|
|
2
|
+
import { CSSLength } from '@ssh/csstypes';
|
|
3
|
+
import { FC, HTMLAttributeAnchorTarget, MouseEventHandler, ReactNode } from 'react';
|
|
4
|
+
import { Enhancer } from '../../types/Enhancer';
|
|
5
|
+
export declare const CornerPresets: readonly ["sharp", "rounded", "roundedXL"];
|
|
6
|
+
export declare const ButtonThemes: {
|
|
7
|
+
readonly negative: {
|
|
8
|
+
readonly primary: string;
|
|
9
|
+
readonly secondary: string;
|
|
10
|
+
readonly primaryAlt: string;
|
|
11
|
+
readonly secondaryAlt: string;
|
|
12
|
+
};
|
|
13
|
+
readonly positive: {
|
|
14
|
+
readonly primary: string;
|
|
15
|
+
readonly secondary: string;
|
|
16
|
+
readonly primaryAlt: string;
|
|
17
|
+
readonly secondaryAlt: string;
|
|
18
|
+
};
|
|
19
|
+
readonly warning: {
|
|
20
|
+
readonly primary: string;
|
|
21
|
+
readonly secondary: string;
|
|
22
|
+
readonly primaryAlt: string;
|
|
23
|
+
readonly secondaryAlt: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type ButtonProps = {
|
|
27
|
+
/**
|
|
28
|
+
* The appearance of the Button.
|
|
29
|
+
* @default primary
|
|
30
|
+
*/
|
|
31
|
+
kind?: 'primary' | 'secondary' | 'tertiary';
|
|
32
|
+
/**
|
|
33
|
+
* The size of the Button.
|
|
34
|
+
* @default large
|
|
35
|
+
*/
|
|
36
|
+
size?: 'large' | 'medium' | 'small' | 'xs';
|
|
37
|
+
/**
|
|
38
|
+
* The shape of the Button.
|
|
39
|
+
* @default pill
|
|
40
|
+
*/
|
|
41
|
+
shape?: 'pill' | 'circle' | 'rectangle' | 'square';
|
|
42
|
+
/**
|
|
43
|
+
* The radius of the corners for the `rectangle` and `square` Button shapes. Either a preset or a valid {@link CSSLength} string.
|
|
44
|
+
* `sharp` will have no rounding, `rounded` will have a slight rounding, and `roundedXL` will have a large rounding.
|
|
45
|
+
* @see CornerPresets
|
|
46
|
+
* @default rounded
|
|
47
|
+
*/
|
|
48
|
+
corners?: (typeof CornerPresets)[number] | CSSLength;
|
|
49
|
+
/**
|
|
50
|
+
* A color to apply for the Button. Provide an object with `primary` and `secondary` properties to set the primary and hover colors.
|
|
51
|
+
*/
|
|
52
|
+
colors?: {
|
|
53
|
+
/** The primary color of the Button. Primary buttons will use this as the background color, and secondary/tertiary buttons will use it for the text and border. */
|
|
54
|
+
primary: string;
|
|
55
|
+
/**
|
|
56
|
+
* The secondary color of the Button, used for hover/active states.
|
|
57
|
+
*/
|
|
58
|
+
secondary: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Preset themes for coloring the button. Overrides the `colors` prop.
|
|
62
|
+
*/
|
|
63
|
+
theme?: keyof typeof ButtonThemes;
|
|
64
|
+
/**
|
|
65
|
+
* An icon or other element to render before the Button's text. A `size` argument is passed that should be used to determine the width & height of the content displayed.
|
|
66
|
+
*
|
|
67
|
+
* When Button shape is `circle` or `square`, this element will be the only visible content.
|
|
68
|
+
*/
|
|
69
|
+
startEnhancer?: Enhancer;
|
|
70
|
+
/**
|
|
71
|
+
* An icon or other element to render after the Button's text. A `size` argument is passed that should be used to determine the width & height of the content displayed.
|
|
72
|
+
*/
|
|
73
|
+
endEnhancer?: Enhancer;
|
|
74
|
+
/**
|
|
75
|
+
* Disables the Button, disallowing user interaction.
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
disabled?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Displays a loading indicator inside the Button and disables user interaction.
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
loading?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The interaction handler for the Button.
|
|
86
|
+
*/
|
|
87
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
88
|
+
/**
|
|
89
|
+
* Optionally, the Button can be rendered as an anchor element by passing an `href` prop. To use a Next.js Link component, use the `render` prop directly.
|
|
90
|
+
*/
|
|
91
|
+
href?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Optionally, the target of the anchor element can be specified (defaults to `_self`).
|
|
94
|
+
*/
|
|
95
|
+
hreftarget?: HTMLAttributeAnchorTarget;
|
|
96
|
+
/**
|
|
97
|
+
* The contents of the Button.
|
|
98
|
+
*
|
|
99
|
+
* This should be text. When Button shape is `circle` or `square`, the action description should still be passed here for screen readers.
|
|
100
|
+
*/
|
|
101
|
+
children?: ReactNode | ReactNode[];
|
|
102
|
+
/**
|
|
103
|
+
* Displays a notification dot.
|
|
104
|
+
*/
|
|
105
|
+
displayNotificationDot?: boolean;
|
|
106
|
+
} & Omit<AriaButtonProps, 'children' | 'disabled' | 'onClick'>;
|
|
107
|
+
/**
|
|
108
|
+
* A `Button` is used to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.
|
|
109
|
+
*
|
|
110
|
+
* <hr />
|
|
111
|
+
*
|
|
112
|
+
* To use the `Button` component, import it as follows:
|
|
113
|
+
*
|
|
114
|
+
* ```js
|
|
115
|
+
* import { Button } from 'paris/button';
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* @constructor
|
|
119
|
+
*/
|
|
120
|
+
export declare const Button: FC<ButtonProps>;
|