paris 0.23.0 → 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 +22 -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 -542
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CSSLength } from '@ssh/csstypes';
|
|
2
|
+
import { ComponentPropsWithoutRef, FC, ReactElement, ReactNode } from 'react';
|
|
3
|
+
export declare const CornerPresets: readonly ["sharp", "rounded", "roundedXL"];
|
|
4
|
+
export type TagProps = {
|
|
5
|
+
/** The size of the Tag. */
|
|
6
|
+
size?: 'normal' | 'compact';
|
|
7
|
+
/** The shape of the Tag. `square` will display only the `icon`. */
|
|
8
|
+
shape?: 'rectangle' | 'square';
|
|
9
|
+
/**
|
|
10
|
+
* The radius of the corners of the Tag. Either a preset or a valid {@link CSSLength} string.
|
|
11
|
+
* `sharp` will have no rounding, `rounded` will have a slight rounding, and `roundedXL` will have a large rounding.
|
|
12
|
+
* @see CornerPresets
|
|
13
|
+
*/
|
|
14
|
+
corners?: (typeof CornerPresets)[number] | CSSLength;
|
|
15
|
+
/** The kind of Tag. */
|
|
16
|
+
kind?: 'default' | 'secondary' | 'positive' | 'warning' | 'negative' | 'new' | 'void' | 'draft';
|
|
17
|
+
/** The color level of Tag background, applies to the colored states of `positive`, `warning`, and `negative`. */
|
|
18
|
+
colorLevel?: 'light' | 'medium' | 'strong';
|
|
19
|
+
/** An icon to display in the shape: `square` variant of the Tag. For best results, use an SVG icon with fill set to `currentColor`. */
|
|
20
|
+
icon?: ReactElement;
|
|
21
|
+
/** The contents of the Tag. */
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
24
|
+
/**
|
|
25
|
+
* A Tag component.
|
|
26
|
+
*
|
|
27
|
+
* <hr />
|
|
28
|
+
*
|
|
29
|
+
* To use this component, import it as follows:
|
|
30
|
+
*
|
|
31
|
+
* ```js
|
|
32
|
+
* import { Tag } from 'paris/tag';
|
|
33
|
+
* ```
|
|
34
|
+
* @constructor
|
|
35
|
+
*/
|
|
36
|
+
export declare const Tag: FC<TagProps>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
import { Check } from '../icon/Check.js';
|
|
6
|
+
import { Icon } from '../icon/Icon.js';
|
|
7
|
+
import typography from '../text/Typography.module.css.js';
|
|
8
|
+
import { VisuallyHidden } from '../utility/VisuallyHidden.js';
|
|
9
|
+
import styles from './Tag.module.scss.js';
|
|
10
|
+
|
|
11
|
+
const CornerPresets = ["sharp", "rounded", "roundedXL"];
|
|
12
|
+
const Tag = ({
|
|
13
|
+
size = "normal",
|
|
14
|
+
shape = "rectangle",
|
|
15
|
+
corners,
|
|
16
|
+
kind = "default",
|
|
17
|
+
colorLevel,
|
|
18
|
+
icon = /* @__PURE__ */ jsx(Icon, { icon: Check, size: 12 }),
|
|
19
|
+
children,
|
|
20
|
+
className
|
|
21
|
+
}) => {
|
|
22
|
+
const cornersIsPreset = useMemo(() => CornerPresets.includes(corners), [corners]);
|
|
23
|
+
return /* @__PURE__ */ jsxs(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: clsx(
|
|
27
|
+
styles.tag,
|
|
28
|
+
styles[size],
|
|
29
|
+
styles[kind],
|
|
30
|
+
size === "normal" && typography.labelXSmall,
|
|
31
|
+
size === "compact" && typography.labelXXSmall,
|
|
32
|
+
styles[shape],
|
|
33
|
+
!corners && size === "normal" && styles.sharp,
|
|
34
|
+
!corners && size === "compact" && styles.rounded,
|
|
35
|
+
corners && cornersIsPreset && styles[corners],
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
"data-status": colorLevel,
|
|
39
|
+
style: corners && !cornersIsPreset ? { borderRadius: corners } : {},
|
|
40
|
+
children: [
|
|
41
|
+
shape !== "square" && /* @__PURE__ */ jsx("div", { children }),
|
|
42
|
+
shape === "square" && /* @__PURE__ */ jsxs("div", { className: styles.icon, children: [
|
|
43
|
+
icon,
|
|
44
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children })
|
|
45
|
+
] })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export { CornerPresets, Tag };
|
|
52
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../src/stories/tag/Tag.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSLength } from '@ssh/csstypes';\nimport { clsx } from 'clsx';\nimport type { ComponentPropsWithoutRef, FC, ReactElement, ReactNode } from 'react';\nimport { useMemo } from 'react';\nimport { Check, Icon } from '../icon';\nimport typography from '../text/Typography.module.css';\nimport { VisuallyHidden } from '../utility';\nimport styles from './Tag.module.scss';\n\nexport const CornerPresets = ['sharp', 'rounded', 'roundedXL'] as const;\n\nexport type TagProps = {\n /** The size of the Tag. */\n size?: 'normal' | 'compact';\n /** The shape of the Tag. `square` will display only the `icon`. */\n shape?: 'rectangle' | 'square';\n /**\n * The radius of the corners of the Tag. Either a preset or a valid {@link CSSLength} string.\n * `sharp` will have no rounding, `rounded` will have a slight rounding, and `roundedXL` will have a large rounding.\n * @see CornerPresets\n */\n corners?: (typeof CornerPresets)[number] | CSSLength;\n /** The kind of Tag. */\n kind?: 'default' | 'secondary' | 'positive' | 'warning' | 'negative' | 'new' | 'void' | 'draft';\n /** The color level of Tag background, applies to the colored states of `positive`, `warning`, and `negative`. */\n colorLevel?: 'light' | 'medium' | 'strong';\n /** An icon to display in the shape: `square` variant of the Tag. For best results, use an SVG icon with fill set to `currentColor`. */\n icon?: ReactElement;\n /** The contents of the Tag. */\n children: ReactNode;\n} & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;\n\n/**\n * A Tag component.\n *\n * <hr />\n *\n * To use this component, import it as follows:\n *\n * ```js\n * import { Tag } from 'paris/tag';\n * ```\n * @constructor\n */\nexport const Tag: FC<TagProps> = ({\n size = 'normal',\n shape = 'rectangle',\n corners,\n kind = 'default',\n colorLevel,\n icon = <Icon icon={Check} size={12} />,\n children,\n className,\n}) => {\n const cornersIsPreset = useMemo(() => (CornerPresets as readonly string[]).includes(corners as string), [corners]);\n return (\n <div\n className={clsx(\n styles.tag,\n styles[size],\n styles[kind],\n size === 'normal' && typography.labelXSmall,\n size === 'compact' && typography.labelXXSmall,\n styles[shape],\n !corners && size === 'normal' && styles.sharp,\n !corners && size === 'compact' && styles.rounded,\n corners && cornersIsPreset && styles[corners],\n className,\n )}\n data-status={colorLevel}\n style={corners && !cornersIsPreset ? { borderRadius: corners } : {}}\n >\n {shape !== 'square' && <div>{children}</div>}\n {shape === 'square' && (\n <div className={styles.icon}>\n {icon}\n <VisuallyHidden>{children}</VisuallyHidden>\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAWO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,aAAA,CAAA,CAAA,CAAgB,CAAC,OAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAA;AAmCtD,CAAA,CAAA,CAAA,CAAA,CAAA,CA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AAW,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAClB,QAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACD,GAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAgB,QAAA,CAAA,CAAS;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAC9B;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAER;AAER,CAAA;;"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
.paris_tag_QE3dx {
|
|
2
|
+
width: fit-content;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.paris_normal_8yko9 {
|
|
6
|
+
height: 26px;
|
|
7
|
+
}
|
|
8
|
+
.paris_normal_8yko9.paris_rectangle_0M8zy {
|
|
9
|
+
padding: 7px 13px;
|
|
10
|
+
}
|
|
11
|
+
.paris_normal_8yko9.paris_rectangle_0M8zy.paris_sharp_Qf5k1 {
|
|
12
|
+
padding: 6px 12px;
|
|
13
|
+
}
|
|
14
|
+
.paris_normal_8yko9.paris_rectangle_0M8zy.paris_secondary_yPIwf, .paris_normal_8yko9.paris_rectangle_0M8zy.paris_draft_Y1UjW, .paris_normal_8yko9.paris_rectangle_0M8zy.paris_new_5Kd0m {
|
|
15
|
+
padding: 6px 12px;
|
|
16
|
+
}
|
|
17
|
+
.paris_normal_8yko9.paris_square_xlGrW {
|
|
18
|
+
width: 26px;
|
|
19
|
+
padding: 4px;
|
|
20
|
+
}
|
|
21
|
+
.paris_normal_8yko9.paris_square_xlGrW.paris_sharp_Qf5k1 {
|
|
22
|
+
padding: 3px;
|
|
23
|
+
}
|
|
24
|
+
.paris_normal_8yko9.paris_square_xlGrW.paris_secondary_yPIwf, .paris_normal_8yko9.paris_square_xlGrW.paris_draft_Y1UjW, .paris_normal_8yko9.paris_square_xlGrW.paris_new_5Kd0m {
|
|
25
|
+
padding: 3px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.paris_compact_0Tvlm {
|
|
29
|
+
height: 20px;
|
|
30
|
+
}
|
|
31
|
+
.paris_compact_0Tvlm.paris_rectangle_0M8zy {
|
|
32
|
+
padding: 5px 10px;
|
|
33
|
+
}
|
|
34
|
+
.paris_compact_0Tvlm.paris_rectangle_0M8zy.paris_sharp_Qf5k1 {
|
|
35
|
+
padding: 4px 9px;
|
|
36
|
+
}
|
|
37
|
+
.paris_compact_0Tvlm.paris_rectangle_0M8zy.paris_secondary_yPIwf, .paris_compact_0Tvlm.paris_rectangle_0M8zy.paris_draft_Y1UjW, .paris_compact_0Tvlm.paris_rectangle_0M8zy.paris_new_5Kd0m {
|
|
38
|
+
padding: 4px 9px;
|
|
39
|
+
}
|
|
40
|
+
.paris_compact_0Tvlm.paris_square_xlGrW {
|
|
41
|
+
width: 20px;
|
|
42
|
+
padding: 4px;
|
|
43
|
+
}
|
|
44
|
+
.paris_compact_0Tvlm.paris_square_xlGrW.paris_sharp_Qf5k1 {
|
|
45
|
+
padding: 3px;
|
|
46
|
+
}
|
|
47
|
+
.paris_compact_0Tvlm.paris_square_xlGrW.paris_secondary_yPIwf, .paris_compact_0Tvlm.paris_square_xlGrW.paris_draft_Y1UjW, .paris_compact_0Tvlm.paris_square_xlGrW.paris_new_5Kd0m {
|
|
48
|
+
padding: 3px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.paris_sharp_Qf5k1 {
|
|
52
|
+
border-radius: var(--pte-borders-radius-rectangle);
|
|
53
|
+
border: 1px solid;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.paris_rounded_e7vdE {
|
|
57
|
+
border-radius: var(--pte-borders-radius-roundedSmall);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.paris_roundedXL_Hgswm {
|
|
61
|
+
border-radius: var(--pte-borders-radius-pill);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.paris_square_xlGrW {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.paris_icon_FxMyh {
|
|
72
|
+
width: 12px;
|
|
73
|
+
height: 12px;
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: row;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
align-items: center;
|
|
78
|
+
}
|
|
79
|
+
.paris_icon_FxMyh svg {
|
|
80
|
+
width: 10px !important;
|
|
81
|
+
height: 10px !important;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.paris_default_6fhzM {
|
|
85
|
+
background-color: var(--pte-new-colors-overlayStrong);
|
|
86
|
+
color: var(--pte-new-colors-contentSecondary);
|
|
87
|
+
border-color: var(--pte-new-colors-contentSecondary);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.paris_secondary_yPIwf {
|
|
91
|
+
background-color: transparent;
|
|
92
|
+
color: var(--pte-new-colors-contentSecondary);
|
|
93
|
+
border: 1px solid var(--pte-new-colors-borderMedium);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.paris_positive_RauML {
|
|
97
|
+
color: var(--pte-new-colors-contentPositive);
|
|
98
|
+
background-color: var(--pte-new-colors-backgroundPositive);
|
|
99
|
+
border-color: var(--pte-new-colors-contentPositive);
|
|
100
|
+
}
|
|
101
|
+
.paris_positive_RauML[data-status=medium] {
|
|
102
|
+
background-color: var(--pte-new-colors-backgroundPositiveMedium);
|
|
103
|
+
border-color: var(--pte-new-colors-contentPositiveMedium);
|
|
104
|
+
}
|
|
105
|
+
.paris_positive_RauML[data-status=strong] {
|
|
106
|
+
background-color: var(--pte-new-colors-backgroundPositiveStrong);
|
|
107
|
+
border-color: var(--pte-new-colors-contentPositiveStrong);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.paris_warning_Ch7Pn {
|
|
111
|
+
color: var(--pte-new-colors-contentWarning);
|
|
112
|
+
background-color: var(--pte-new-colors-backgroundWarning);
|
|
113
|
+
border-color: var(--pte-new-colors-contentWarning);
|
|
114
|
+
}
|
|
115
|
+
.paris_warning_Ch7Pn[data-status=medium] {
|
|
116
|
+
background-color: var(--pte-new-colors-backgroundWarningMedium);
|
|
117
|
+
border-color: var(--pte-new-colors-contentWarningMedium);
|
|
118
|
+
}
|
|
119
|
+
.paris_warning_Ch7Pn[data-status=strong] {
|
|
120
|
+
background-color: var(--pte-new-colors-backgroundWarningStrong);
|
|
121
|
+
border-color: var(--pte-new-colors-contentWarningStrong);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.paris_negative_HlkYZ {
|
|
125
|
+
color: var(--pte-new-colors-contentNegative);
|
|
126
|
+
background-color: var(--pte-new-colors-backgroundNegative);
|
|
127
|
+
border-color: var(--pte-new-colors-contentNegative);
|
|
128
|
+
}
|
|
129
|
+
.paris_negative_HlkYZ[data-status=medium] {
|
|
130
|
+
background-color: var(--pte-new-colors-backgroundNegativeMedium);
|
|
131
|
+
border-color: var(--pte-new-colors-contentNegativeMedium);
|
|
132
|
+
}
|
|
133
|
+
.paris_negative_HlkYZ[data-status=strong] {
|
|
134
|
+
background-color: var(--pte-new-colors-backgroundNegativeStrong);
|
|
135
|
+
border-color: var(--pte-new-colors-contentNegativeStrong);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.paris_void_KWTJM {
|
|
139
|
+
background-color: var(--pte-new-colors-backgroundSecondary);
|
|
140
|
+
color: var(--pte-new-colors-contentDisabled);
|
|
141
|
+
border-color: var(--pte-new-colors-contentDisabled);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.paris_draft_Y1UjW {
|
|
145
|
+
background-color: transparent;
|
|
146
|
+
color: var(--pte-new-colors-contentTertiary);
|
|
147
|
+
border: 1px dashed var(--pte-new-colors-borderMedium);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.paris_new_5Kd0m {
|
|
151
|
+
color: var(--pte-new-colors-contentPrimary);
|
|
152
|
+
background-color: var(--pte-new-colors-backgroundAccentMedium);
|
|
153
|
+
animation: paris_glow_6NhRz 2s infinite var(--pte-new-animations-timing-easeInOut);
|
|
154
|
+
border: 1px solid var(--pte-new-colors-contentAccent);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@keyframes paris_glow_6NhRz {
|
|
158
|
+
0%, 100% {
|
|
159
|
+
box-shadow: var(--pte-new-lighting-glowSubtle1), var(--pte-new-lighting-glowSubtle2), var(--pte-new-lighting-glowSubtle3);
|
|
160
|
+
}
|
|
161
|
+
50% {
|
|
162
|
+
box-shadow: var(--pte-new-lighting-glowDeep1), var(--pte-new-lighting-glowDeep2), var(--pte-new-lighting-glowDeep3);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import './Tag.module.css';const tag = "paris_tag_QE3dx";
|
|
2
|
+
const normal = "paris_normal_8yko9";
|
|
3
|
+
const rectangle = "paris_rectangle_0M8zy";
|
|
4
|
+
const sharp = "paris_sharp_Qf5k1";
|
|
5
|
+
const secondary = "paris_secondary_yPIwf";
|
|
6
|
+
const draft = "paris_draft_Y1UjW";
|
|
7
|
+
const square = "paris_square_xlGrW";
|
|
8
|
+
const compact = "paris_compact_0Tvlm";
|
|
9
|
+
const rounded = "paris_rounded_e7vdE";
|
|
10
|
+
const roundedXL = "paris_roundedXL_Hgswm";
|
|
11
|
+
const icon = "paris_icon_FxMyh";
|
|
12
|
+
const positive = "paris_positive_RauML";
|
|
13
|
+
const warning = "paris_warning_Ch7Pn";
|
|
14
|
+
const negative = "paris_negative_HlkYZ";
|
|
15
|
+
const glow = "paris_glow_6NhRz";
|
|
16
|
+
const styles = {
|
|
17
|
+
tag: tag,
|
|
18
|
+
normal: normal,
|
|
19
|
+
rectangle: rectangle,
|
|
20
|
+
sharp: sharp,
|
|
21
|
+
secondary: secondary,
|
|
22
|
+
draft: draft,
|
|
23
|
+
"new": "paris_new_5Kd0m",
|
|
24
|
+
square: square,
|
|
25
|
+
compact: compact,
|
|
26
|
+
rounded: rounded,
|
|
27
|
+
roundedXL: roundedXL,
|
|
28
|
+
icon: icon,
|
|
29
|
+
"default": "paris_default_6fhzM",
|
|
30
|
+
positive: positive,
|
|
31
|
+
warning: warning,
|
|
32
|
+
negative: negative,
|
|
33
|
+
"void": "paris_void_KWTJM",
|
|
34
|
+
glow: glow
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { compact, styles as default, draft, glow, icon, negative, normal, positive, rectangle, rounded, roundedXL, secondary, sharp, square, tag, warning };
|
|
38
|
+
//# sourceMappingURL=Tag.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CSSColor } from '@ssh/csstypes';
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react';
|
|
3
|
+
import { LightTheme } from '../theme';
|
|
4
|
+
export type TextElement = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'legend' | 'caption' | 'small';
|
|
5
|
+
export type GlobalCSSValues = 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset';
|
|
6
|
+
export type TextProps<T extends TextElement = TextElement> = {
|
|
7
|
+
/**
|
|
8
|
+
* The font class to use.
|
|
9
|
+
* @default paragraphMedium
|
|
10
|
+
*/
|
|
11
|
+
kind?: keyof typeof LightTheme.typography.styles;
|
|
12
|
+
/**
|
|
13
|
+
* The HTML text tag to use.
|
|
14
|
+
* @default span
|
|
15
|
+
*/
|
|
16
|
+
as?: T;
|
|
17
|
+
/**
|
|
18
|
+
* The font weight to apply.
|
|
19
|
+
*/
|
|
20
|
+
weight?: keyof typeof LightTheme.typography.fontWeights;
|
|
21
|
+
/**
|
|
22
|
+
* The font style to apply.
|
|
23
|
+
*/
|
|
24
|
+
fontStyle?: keyof typeof LightTheme.typography.fontStyles;
|
|
25
|
+
/**
|
|
26
|
+
* A color to apply.
|
|
27
|
+
*/
|
|
28
|
+
color?: CSSColor;
|
|
29
|
+
/** The contents of the Text element. */
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
} & ComponentPropsWithoutRef<T>;
|
|
32
|
+
/**
|
|
33
|
+
* A `Text` component is used to render text with one of our theme formats.
|
|
34
|
+
*
|
|
35
|
+
* <hr />
|
|
36
|
+
*
|
|
37
|
+
* To use the `Text` component, import it as follows:
|
|
38
|
+
*
|
|
39
|
+
* ```tsx
|
|
40
|
+
* import { Text } from 'paris/text';
|
|
41
|
+
*
|
|
42
|
+
* export const ExampleHeading: FC = () => (
|
|
43
|
+
* <Text as="h1" kind="headingLarge" weight="bold" fontStyle="italic">Hello World!</Text>
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @example ```tsx
|
|
48
|
+
* <Text as="h1" kind="headingLarge">Hello World!</Text>
|
|
49
|
+
* ```
|
|
50
|
+
* @constructor
|
|
51
|
+
*/
|
|
52
|
+
export declare const Text: import('react').MemoExoticComponent<(<T extends TextElement = TextElement>({ kind, as, weight, fontStyle, color, children, ...props }: TextProps<T>) => ReactElement)>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { memo, createElement } from 'react';
|
|
3
|
+
import styles from './Text.module.scss.js';
|
|
4
|
+
import typography from './Typography.module.css.js';
|
|
5
|
+
|
|
6
|
+
const Text = memo(
|
|
7
|
+
({
|
|
8
|
+
kind,
|
|
9
|
+
as,
|
|
10
|
+
weight,
|
|
11
|
+
fontStyle,
|
|
12
|
+
color,
|
|
13
|
+
children,
|
|
14
|
+
...props
|
|
15
|
+
}) => createElement(
|
|
16
|
+
as || "span",
|
|
17
|
+
{
|
|
18
|
+
...props,
|
|
19
|
+
className: clsx(
|
|
20
|
+
styles.text,
|
|
21
|
+
typography[kind || "paragraphMedium"],
|
|
22
|
+
weight && styles[`weight-${weight}`],
|
|
23
|
+
fontStyle && styles[`fontStyle-${fontStyle}`],
|
|
24
|
+
props?.className
|
|
25
|
+
),
|
|
26
|
+
...color ? {
|
|
27
|
+
style: {
|
|
28
|
+
"--text-color": color
|
|
29
|
+
}
|
|
30
|
+
} : {}
|
|
31
|
+
},
|
|
32
|
+
children
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export { Text };
|
|
37
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../src/stories/text/Text.tsx"],"sourcesContent":["import type { CSSColor } from '@ssh/csstypes';\nimport { clsx } from 'clsx';\nimport type { ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react';\nimport { createElement, memo } from 'react';\nimport type { LightTheme } from '../theme';\nimport styles from './Text.module.scss';\nimport typography from './Typography.module.css';\n\nexport type TextElement =\n | 'p'\n | 'span'\n | 'div'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'label'\n | 'legend'\n | 'caption'\n | 'small';\nexport type GlobalCSSValues = 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset';\n\nexport type TextProps<T extends TextElement = TextElement> = {\n /**\n * The font class to use.\n * @default paragraphMedium\n */\n kind?: keyof typeof LightTheme.typography.styles;\n\n /**\n * The HTML text tag to use.\n * @default span\n */\n as?: T;\n\n /**\n * The font weight to apply.\n */\n weight?: keyof typeof LightTheme.typography.fontWeights;\n\n /**\n * The font style to apply.\n */\n fontStyle?: keyof typeof LightTheme.typography.fontStyles;\n\n /**\n * A color to apply.\n */\n color?: CSSColor;\n\n /** The contents of the Text element. */\n children: ReactNode;\n} & ComponentPropsWithoutRef<T>;\n\n/**\n * A `Text` component is used to render text with one of our theme formats.\n *\n * <hr />\n *\n * To use the `Text` component, import it as follows:\n *\n * ```tsx\n * import { Text } from 'paris/text';\n *\n * export const ExampleHeading: FC = () => (\n * <Text as=\"h1\" kind=\"headingLarge\" weight=\"bold\" fontStyle=\"italic\">Hello World!</Text>\n * );\n * ```\n *\n * @example ```tsx\n * <Text as=\"h1\" kind=\"headingLarge\">Hello World!</Text>\n * ```\n * @constructor\n */\nexport const Text = memo(\n <T extends TextElement = TextElement>({\n kind,\n as,\n weight,\n fontStyle,\n color,\n children,\n ...props\n }: TextProps<T>): ReactElement =>\n createElement(\n as || 'span',\n {\n ...props,\n className: clsx(\n styles.text,\n typography[kind || 'paragraphMedium'],\n weight && styles[`weight-${weight}`],\n fontStyle && styles[`fontStyle-${fontStyle}`],\n props?.className,\n ),\n ...(color\n ? {\n style: {\n '--text-color': color,\n },\n }\n : {}),\n },\n children,\n ),\n);\n"],"names":[],"mappings":";;;;;AA4EO,MAAM,IAAA,GAAO,IAAA;AAAA,EAChB,CAAsC;AAAA,IAClC,IAAA;AAAA,IACA,EAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAG;AAAA,GACP,KACI,aAAA;AAAA,IACI,EAAA,IAAM,MAAA;AAAA,IACN;AAAA,MACI,GAAG,KAAA;AAAA,MACH,SAAA,EAAW,IAAA;AAAA,QACP,MAAA,CAAO,IAAA;AAAA,QACP,UAAA,CAAW,QAAQ,iBAAiB,CAAA;AAAA,QACpC,MAAA,IAAU,MAAA,CAAO,CAAA,OAAA,EAAU,MAAM,CAAA,CAAE,CAAA;AAAA,QACnC,SAAA,IAAa,MAAA,CAAO,CAAA,UAAA,EAAa,SAAS,CAAA,CAAE,CAAA;AAAA,QAC5C,KAAA,EAAO;AAAA,OACX;AAAA,MACA,GAAI,KAAA,GACE;AAAA,QACI,KAAA,EAAO;AAAA,UACH,cAAA,EAAgB;AAAA;AACpB,UAEJ;AAAC,KACX;AAAA,IACA;AAAA;AAEZ;;;;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.paris_text_RV-f- {
|
|
2
|
+
font-family: var(--pte-typography-fontFamily);
|
|
3
|
+
color: var(--text-color);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* Font weight theme values */
|
|
7
|
+
.paris_weight-thin_VdyKV {
|
|
8
|
+
font-weight: var(--pte-typography-fontWeights-thin) !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.paris_weight-extralight_v2q7X {
|
|
12
|
+
font-weight: var(--pte-typography-fontWeights-extralight) !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.paris_weight-light_M9spZ {
|
|
16
|
+
font-weight: var(--pte-typography-fontWeights-light) !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.paris_weight-normal_LewA5 {
|
|
20
|
+
font-weight: var(--pte-typography-fontWeights-normal) !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.paris_weight-medium_GHnah {
|
|
24
|
+
font-weight: var(--pte-typography-fontWeights-medium) !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.paris_weight-semibold_WyV-- {
|
|
28
|
+
font-weight: var(--pte-typography-fontWeights-semibold) !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.paris_weight-bold_hsKog {
|
|
32
|
+
font-weight: var(--pte-typography-fontWeights-bold) !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.paris_weight-extrabold_PQngW {
|
|
36
|
+
font-weight: var(--pte-typography-fontWeights-extrabold) !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.paris_weight-black_ukoVu {
|
|
40
|
+
font-weight: var(--pte-typography-fontWeights-black) !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.paris_weight-extrablack_Jg1hX {
|
|
44
|
+
font-weight: var(--pte-typography-fontWeights-extrablack) !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Font style theme values */
|
|
48
|
+
.paris_fontStyle-normal_hecdJ {
|
|
49
|
+
font-style: var(--pte-typography-fontStyles-normal) !important;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.paris_fontStyle-italic_TlCEh {
|
|
53
|
+
font-style: var(--pte-typography-fontStyles-italic) !important;
|
|
54
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import './Text.module.css';const text = "paris_text_RV-f-";
|
|
2
|
+
const styles = {
|
|
3
|
+
text: text,
|
|
4
|
+
"weight-thin": "paris_weight-thin_VdyKV",
|
|
5
|
+
"weight-extralight": "paris_weight-extralight_v2q7X",
|
|
6
|
+
"weight-light": "paris_weight-light_M9spZ",
|
|
7
|
+
"weight-normal": "paris_weight-normal_LewA5",
|
|
8
|
+
"weight-medium": "paris_weight-medium_GHnah",
|
|
9
|
+
"weight-semibold": "paris_weight-semibold_WyV--",
|
|
10
|
+
"weight-bold": "paris_weight-bold_hsKog",
|
|
11
|
+
"weight-extrabold": "paris_weight-extrabold_PQngW",
|
|
12
|
+
"weight-black": "paris_weight-black_ukoVu",
|
|
13
|
+
"weight-extrablack": "paris_weight-extrablack_Jg1hX",
|
|
14
|
+
"fontStyle-normal": "paris_fontStyle-normal_hecdJ",
|
|
15
|
+
"fontStyle-italic": "paris_fontStyle-italic_TlCEh"
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { styles as default, text };
|
|
19
|
+
//# sourceMappingURL=Text.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|