@clement_lores/admin-design-system 1.0.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/.babelrc.cjs +23 -0
- package/.eslintrc +50 -0
- package/.firebaserc +17 -0
- package/.prettierrc +6 -0
- package/.releaserc +36 -0
- package/.storybook/main.mjs +103 -0
- package/.storybook/manager.mjs +49 -0
- package/.storybook/preview-head.html +4 -0
- package/.storybook/preview.mjs +53 -0
- package/.storybook/theme-decorator.js +27 -0
- package/README.md +132 -0
- package/build/atoms/avatar/avatar.js +44 -0
- package/build/atoms/avatar/avatar.stories.js +19 -0
- package/build/atoms/avatar/index.js +1 -0
- package/build/atoms/badge/badge-props.doc.md +10 -0
- package/build/atoms/badge/badge.doc.md +90 -0
- package/build/atoms/badge/badge.js +86 -0
- package/build/atoms/badge/badge.stories.js +91 -0
- package/build/atoms/badge/index.js +1 -0
- package/build/atoms/box/box-props.doc.md +16 -0
- package/build/atoms/box/box.doc.md +75 -0
- package/build/atoms/box/box.js +97 -0
- package/build/atoms/box/box.stories.js +41 -0
- package/build/atoms/box/index.js +1 -0
- package/build/atoms/button/button-css.js +193 -0
- package/build/atoms/button/button-props.doc.md +4 -0
- package/build/atoms/button/button-props.js +1 -0
- package/build/atoms/button/button.doc.md +103 -0
- package/build/atoms/button/button.js +37 -0
- package/build/atoms/button/button.stories.js +111 -0
- package/build/atoms/button/index.js +3 -0
- package/build/atoms/check-box/check-box.js +177 -0
- package/build/atoms/check-box/check-box.stories.js +54 -0
- package/build/atoms/check-box/index.js +1 -0
- package/build/atoms/currency-input/currency-input.js +63 -0
- package/build/atoms/currency-input/currency-input.stories.js +103 -0
- package/build/atoms/currency-input/index.js +1 -0
- package/build/atoms/icon/icon.js +134 -0
- package/build/atoms/icon/icon.stories.js +69 -0
- package/build/atoms/icon/index.js +1 -0
- package/build/atoms/illustration/illustration.js +71 -0
- package/build/atoms/illustration/illustration.stories.js +55 -0
- package/build/atoms/illustration/index.js +1 -0
- package/build/atoms/illustrations/accept.js +48 -0
- package/build/atoms/illustrations/adminjs-logo.js +52 -0
- package/build/atoms/illustrations/astronaut.js +58 -0
- package/build/atoms/illustrations/bag.js +90 -0
- package/build/atoms/illustrations/beware.js +57 -0
- package/build/atoms/illustrations/box.js +95 -0
- package/build/atoms/illustrations/calendar.js +97 -0
- package/build/atoms/illustrations/cancel.js +48 -0
- package/build/atoms/illustrations/cards.js +65 -0
- package/build/atoms/illustrations/clip.js +107 -0
- package/build/atoms/illustrations/cloud.js +58 -0
- package/build/atoms/illustrations/cup.js +60 -0
- package/build/atoms/illustrations/details.js +84 -0
- package/build/atoms/illustrations/docs.js +77 -0
- package/build/atoms/illustrations/document-check.js +66 -0
- package/build/atoms/illustrations/document-search.js +69 -0
- package/build/atoms/illustrations/drawer.js +84 -0
- package/build/atoms/illustrations/file-search.js +37 -0
- package/build/atoms/illustrations/flag-in-cog.js +97 -0
- package/build/atoms/illustrations/folder.js +73 -0
- package/build/atoms/illustrations/folders.js +74 -0
- package/build/atoms/illustrations/github-logo.js +26 -0
- package/build/atoms/illustrations/identity-card.js +93 -0
- package/build/atoms/illustrations/index.js +35 -0
- package/build/atoms/illustrations/launch.js +75 -0
- package/build/atoms/illustrations/moon.js +135 -0
- package/build/atoms/illustrations/not-found.js +80 -0
- package/build/atoms/illustrations/notebook.js +132 -0
- package/build/atoms/illustrations/padlock.js +79 -0
- package/build/atoms/illustrations/photos.js +65 -0
- package/build/atoms/illustrations/planet.js +110 -0
- package/build/atoms/illustrations/plug.js +80 -0
- package/build/atoms/illustrations/props.type.js +1 -0
- package/build/atoms/illustrations/rocket-new.js +113 -0
- package/build/atoms/illustrations/rocket.js +343 -0
- package/build/atoms/illustrations/slack-logo.js +52 -0
- package/build/atoms/illustrations/tags.js +62 -0
- package/build/atoms/index.js +23 -0
- package/build/atoms/input/index.js +1 -0
- package/build/atoms/input/input.js +164 -0
- package/build/atoms/input/input.stories.js +109 -0
- package/build/atoms/label/index.js +1 -0
- package/build/atoms/label/label.js +144 -0
- package/build/atoms/label/label.stories.js +61 -0
- package/build/atoms/link/index.js +1 -0
- package/build/atoms/link/link.js +118 -0
- package/build/atoms/link/link.stories.js +52 -0
- package/build/atoms/loader/index.js +1 -0
- package/build/atoms/loader/loader.js +83 -0
- package/build/atoms/loader/loader.stories.js +7 -0
- package/build/atoms/overlay/index.js +1 -0
- package/build/atoms/overlay/overlay.js +19 -0
- package/build/atoms/overlay/overlay.stories.js +7 -0
- package/build/atoms/phone-input/index.js +1 -0
- package/build/atoms/phone-input/phone-input.js +69 -0
- package/build/atoms/phone-input/phone-input.stories.js +59 -0
- package/build/atoms/placeholder/index.js +1 -0
- package/build/atoms/placeholder/placeholder.js +110 -0
- package/build/atoms/placeholder/placeholder.stories.js +17 -0
- package/build/atoms/radio/index.js +1 -0
- package/build/atoms/radio/radio.js +146 -0
- package/build/atoms/radio/radio.stories.js +42 -0
- package/build/atoms/section/index.js +1 -0
- package/build/atoms/section/section.js +45 -0
- package/build/atoms/section/section.stories.js +24 -0
- package/build/atoms/table/index.js +6 -0
- package/build/atoms/table/table-body.js +15 -0
- package/build/atoms/table/table-caption.js +39 -0
- package/build/atoms/table/table-cell.js +38 -0
- package/build/atoms/table/table-head.js +33 -0
- package/build/atoms/table/table-row.js +24 -0
- package/build/atoms/table/table.js +114 -0
- package/build/atoms/table/table.stories.js +46 -0
- package/build/atoms/tabs/index.js +2 -0
- package/build/atoms/tabs/tab.js +29 -0
- package/build/atoms/tabs/tabs.js +118 -0
- package/build/atoms/tabs/tabs.stories.js +26 -0
- package/build/atoms/text/index.js +1 -0
- package/build/atoms/text/text.js +77 -0
- package/build/atoms/text-area/index.js +1 -0
- package/build/atoms/text-area/text-area.js +58 -0
- package/build/atoms/text-area/text-area.stories.js +26 -0
- package/build/atoms/tooltip/index.js +5 -0
- package/build/atoms/tooltip/tooltip-content.js +10 -0
- package/build/atoms/tooltip/tooltip-control.js +102 -0
- package/build/atoms/tooltip/tooltip-props.js +1 -0
- package/build/atoms/tooltip/tooltip-styled.js +129 -0
- package/build/atoms/tooltip/tooltip.doc.md +61 -0
- package/build/atoms/tooltip/tooltip.js +65 -0
- package/build/atoms/tooltip/tooltip.stories.js +47 -0
- package/build/atoms/typography/caption-shared.js +10 -0
- package/build/atoms/typography/caption.js +10 -0
- package/build/atoms/typography/card-title.js +14 -0
- package/build/atoms/typography/header.doc.md +38 -0
- package/build/atoms/typography/header.js +128 -0
- package/build/atoms/typography/index.js +5 -0
- package/build/atoms/typography/small-text.js +10 -0
- package/build/atoms/typography/title.js +10 -0
- package/build/atoms/typography/typography.stories.js +80 -0
- package/build/constants.js +2 -0
- package/build/global.js +53 -0
- package/build/hooks/use-window-size.js +28 -0
- package/build/index.doc.md +133 -0
- package/build/index.js +16 -0
- package/build/molecules/date-picker/date-picker.js +326 -0
- package/build/molecules/date-picker/date-picker.stories.js +49 -0
- package/build/molecules/date-picker/index.js +2 -0
- package/build/molecules/date-picker/useDatePicker.js +37 -0
- package/build/molecules/drawer/drawer-content.js +22 -0
- package/build/molecules/drawer/drawer-footer.js +21 -0
- package/build/molecules/drawer/drawer.js +120 -0
- package/build/molecules/drawer/drawer.stories.js +39 -0
- package/build/molecules/drawer/index.js +3 -0
- package/build/molecules/drop-down/drop-down-item-action.js +19 -0
- package/build/molecules/drop-down/drop-down-item.js +95 -0
- package/build/molecules/drop-down/drop-down-menu.js +45 -0
- package/build/molecules/drop-down/drop-down-trigger.js +11 -0
- package/build/molecules/drop-down/drop-down.doc.md +74 -0
- package/build/molecules/drop-down/drop-down.js +85 -0
- package/build/molecules/drop-down/drop-down.stories.js +66 -0
- package/build/molecules/drop-down/index.js +5 -0
- package/build/molecules/drop-zone/drop-zone-image.js +46 -0
- package/build/molecules/drop-zone/drop-zone-item.js +128 -0
- package/build/molecules/drop-zone/drop-zone.js +318 -0
- package/build/molecules/drop-zone/drop-zone.stories.js +111 -0
- package/build/molecules/drop-zone/index.js +2 -0
- package/build/molecules/form-group/form-group.js +184 -0
- package/build/molecules/form-group/form-group.stories.js +35 -0
- package/build/molecules/form-group/form-message.js +23 -0
- package/build/molecules/form-group/index.js +3 -0
- package/build/molecules/form-group/input-group.js +68 -0
- package/build/molecules/index.js +15 -0
- package/build/molecules/info-box/index.js +1 -0
- package/build/molecules/info-box/info-box.js +70 -0
- package/build/molecules/info-box/info-box.stories.js +17 -0
- package/build/molecules/message-box/index.js +1 -0
- package/build/molecules/message-box/message-box.js +173 -0
- package/build/molecules/message-box/message-box.stories.js +43 -0
- package/build/molecules/modal/index.js +4 -0
- package/build/molecules/modal/modal-inline.js +63 -0
- package/build/molecules/modal/modal-props.js +1 -0
- package/build/molecules/modal/modal-styled.js +52 -0
- package/build/molecules/modal/modal-wrapper.js +33 -0
- package/build/molecules/modal/modal.doc.md +138 -0
- package/build/molecules/modal/modal.js +17 -0
- package/build/molecules/modal/modal.stories.js +79 -0
- package/build/molecules/navigation-element/index.js +3 -0
- package/build/molecules/navigation-element/navigation-element-props.js +1 -0
- package/build/molecules/navigation-element/navigation-element-styled.js +66 -0
- package/build/molecules/navigation-element/navigation-element.doc.md +69 -0
- package/build/molecules/navigation-element/navigation-element.js +61 -0
- package/build/molecules/navigation-element/navigation-element.stories.js +53 -0
- package/build/molecules/pagination/index.js +1 -0
- package/build/molecules/pagination/pagination.js +141 -0
- package/build/molecules/pagination/pagination.stories.js +22 -0
- package/build/molecules/rich-text-editor/components/heading-select.js +29 -0
- package/build/molecules/rich-text-editor/components/image-button.js +45 -0
- package/build/molecules/rich-text-editor/components/menu-bar.js +32 -0
- package/build/molecules/rich-text-editor/components/menu-button.js +37 -0
- package/build/molecules/rich-text-editor/icons/align-center.js +12 -0
- package/build/molecules/rich-text-editor/icons/align-justify.js +12 -0
- package/build/molecules/rich-text-editor/icons/align-left.js +12 -0
- package/build/molecules/rich-text-editor/icons/align-right.js +12 -0
- package/build/molecules/rich-text-editor/icons/bold.js +12 -0
- package/build/molecules/rich-text-editor/icons/bullet-list.js +12 -0
- package/build/molecules/rich-text-editor/icons/clear.js +12 -0
- package/build/molecules/rich-text-editor/icons/code.js +18 -0
- package/build/molecules/rich-text-editor/icons/font-size.js +12 -0
- package/build/molecules/rich-text-editor/icons/image.js +18 -0
- package/build/molecules/rich-text-editor/icons/index.js +20 -0
- package/build/molecules/rich-text-editor/icons/italic.js +12 -0
- package/build/molecules/rich-text-editor/icons/link.js +15 -0
- package/build/molecules/rich-text-editor/icons/ordered-list.js +12 -0
- package/build/molecules/rich-text-editor/icons/pagebreak.js +12 -0
- package/build/molecules/rich-text-editor/icons/paragraph.js +12 -0
- package/build/molecules/rich-text-editor/icons/quote.js +12 -0
- package/build/molecules/rich-text-editor/icons/redo.js +12 -0
- package/build/molecules/rich-text-editor/icons/strikethrough.js +12 -0
- package/build/molecules/rich-text-editor/icons/undo.js +12 -0
- package/build/molecules/rich-text-editor/index.js +2 -0
- package/build/molecules/rich-text-editor/rich-text-editor-props.js +1 -0
- package/build/molecules/rich-text-editor/rich-text-editor.js +60 -0
- package/build/molecules/rich-text-editor/rich-text-editor.stories.js +85 -0
- package/build/molecules/rich-text-editor/rich-text-editor.styled.js +46 -0
- package/build/molecules/rich-text-editor/useTiptapCommands.js +15 -0
- package/build/molecules/select/index.js +2 -0
- package/build/molecules/select/select-async.js +43 -0
- package/build/molecules/select/select-theme.js +36 -0
- package/build/molecules/select/select.js +45 -0
- package/build/molecules/select/select.stories.js +80 -0
- package/build/molecules/stepper/index.js +2 -0
- package/build/molecules/stepper/step.js +141 -0
- package/build/molecules/stepper/stepper.js +115 -0
- package/build/molecules/stepper/stepper.stories.js +54 -0
- package/build/molecules/tinymce-editor/index.js +1 -0
- package/build/molecules/tinymce-editor/tinymce-editor.js +89 -0
- package/build/molecules/tinymce-editor/tinymce-editor.styled.js +15 -0
- package/build/molecules/value-group/index.js +2 -0
- package/build/molecules/value-group/value-group-props.js +1 -0
- package/build/molecules/value-group/value-group.doc.md +67 -0
- package/build/molecules/value-group/value-group.js +28 -0
- package/build/molecules/value-group/value-group.stories.js +41 -0
- package/build/organisms/button-group/button-group.doc.md +92 -0
- package/build/organisms/button-group/button-group.js +34 -0
- package/build/organisms/button-group/button-group.stories.js +103 -0
- package/build/organisms/button-group/button-group.styled.js +54 -0
- package/build/organisms/button-group/button-group.types.js +1 -0
- package/build/organisms/button-group/button-in-group.js +25 -0
- package/build/organisms/button-group/drop-down-item-with-buttons.js +45 -0
- package/build/organisms/button-group/index.js +6 -0
- package/build/organisms/button-group/single-button-in-group.js +39 -0
- package/build/organisms/current-user-nav/current-user-nav-props.js +1 -0
- package/build/organisms/current-user-nav/current-user-nav-styled.js +27 -0
- package/build/organisms/current-user-nav/current-user-nav.doc.md +72 -0
- package/build/organisms/current-user-nav/current-user-nav.js +68 -0
- package/build/organisms/current-user-nav/current-user-nav.stories.js +74 -0
- package/build/organisms/current-user-nav/index.js +3 -0
- package/build/organisms/index.js +4 -0
- package/build/organisms/made-with-love/index.js +1 -0
- package/build/organisms/made-with-love/made-with-love.js +43 -0
- package/build/organisms/made-with-love/made-with-love.stories.js +7 -0
- package/build/organisms/navigation/index.js +4 -0
- package/build/organisms/navigation/navigation-element-wrapper.js +14 -0
- package/build/organisms/navigation/navigation-props.js +1 -0
- package/build/organisms/navigation/navigation-styled.js +14 -0
- package/build/organisms/navigation/navigation.doc.md +126 -0
- package/build/organisms/navigation/navigation.js +34 -0
- package/build/organisms/navigation/navigation.stories.js +110 -0
- package/build/templates/blog.js +0 -0
- package/build/templates/blog.stories.js +52 -0
- package/build/theme.doc.md +111 -0
- package/build/theme.js +532 -0
- package/build/utils/assert.js +7 -0
- package/build/utils/color-props.js +1 -0
- package/build/utils/combine-styles.js +28 -0
- package/build/utils/content-styles.js +268 -0
- package/build/utils/css-class.js +35 -0
- package/build/utils/date-utils.js +50 -0
- package/build/utils/datepicker.styles.js +788 -0
- package/build/utils/default-theme.interface.js +1 -0
- package/build/utils/direction-props.js +1 -0
- package/build/utils/focus-shadow.style.js +6 -0
- package/build/utils/generate-id.js +8 -0
- package/build/utils/human-file-size.js +23 -0
- package/build/utils/index.js +13 -0
- package/build/utils/non-nullish-partial-record.type.js +1 -0
- package/build/utils/phone-input.styles.js +1168 -0
- package/build/utils/portal-utils.js +31 -0
- package/build/utils/reset.styles.js +94 -0
- package/build/utils/select-styles.js +47 -0
- package/build/utils/story-wrapper.js +22 -0
- package/build/utils/styled.js +6 -0
- package/build/utils/theme-get.js +51 -0
- package/commitlint.config.cjs +5 -0
- package/config/rollup.js +70 -0
- package/entry.js +11 -0
- package/firebase.json +17 -0
- package/package.json +171 -0
- package/src/atoms/avatar/avatar.stories.tsx +28 -0
- package/src/atoms/avatar/avatar.tsx +44 -0
- package/src/atoms/avatar/index.ts +1 -0
- package/src/atoms/badge/badge-props.doc.md +10 -0
- package/src/atoms/badge/badge.doc.md +90 -0
- package/src/atoms/badge/badge.stories.tsx +90 -0
- package/src/atoms/badge/badge.tsx +99 -0
- package/src/atoms/badge/index.ts +1 -0
- package/src/atoms/box/box-props.doc.md +16 -0
- package/src/atoms/box/box.doc.md +75 -0
- package/src/atoms/box/box.stories.tsx +47 -0
- package/src/atoms/box/box.tsx +131 -0
- package/src/atoms/box/index.ts +1 -0
- package/src/atoms/button/button-css.tsx +196 -0
- package/src/atoms/button/button-props.doc.md +4 -0
- package/src/atoms/button/button-props.ts +43 -0
- package/src/atoms/button/button.doc.md +103 -0
- package/src/atoms/button/button.stories.tsx +113 -0
- package/src/atoms/button/button.tsx +39 -0
- package/src/atoms/button/index.ts +3 -0
- package/src/atoms/check-box/check-box.stories.tsx +46 -0
- package/src/atoms/check-box/check-box.tsx +169 -0
- package/src/atoms/check-box/index.ts +1 -0
- package/src/atoms/currency-input/currency-input.stories.tsx +77 -0
- package/src/atoms/currency-input/currency-input.tsx +74 -0
- package/src/atoms/currency-input/index.ts +1 -0
- package/src/atoms/icon/icon.stories.tsx +46 -0
- package/src/atoms/icon/icon.tsx +155 -0
- package/src/atoms/icon/index.ts +1 -0
- package/src/atoms/illustration/illustration.stories.tsx +39 -0
- package/src/atoms/illustration/illustration.tsx +84 -0
- package/src/atoms/illustration/index.ts +1 -0
- package/src/atoms/illustrations/accept.tsx +17 -0
- package/src/atoms/illustrations/adminjs-logo.tsx +37 -0
- package/src/atoms/illustrations/astronaut.tsx +22 -0
- package/src/atoms/illustrations/bag.tsx +25 -0
- package/src/atoms/illustrations/beware.tsx +18 -0
- package/src/atoms/illustrations/box.tsx +25 -0
- package/src/atoms/illustrations/calendar.tsx +24 -0
- package/src/atoms/illustrations/cancel.tsx +17 -0
- package/src/atoms/illustrations/cards.tsx +20 -0
- package/src/atoms/illustrations/clip.tsx +28 -0
- package/src/atoms/illustrations/cloud.tsx +22 -0
- package/src/atoms/illustrations/cup.tsx +20 -0
- package/src/atoms/illustrations/details.tsx +24 -0
- package/src/atoms/illustrations/docs.tsx +25 -0
- package/src/atoms/illustrations/document-check.tsx +22 -0
- package/src/atoms/illustrations/document-search.tsx +22 -0
- package/src/atoms/illustrations/drawer.tsx +26 -0
- package/src/atoms/illustrations/file-search.tsx +18 -0
- package/src/atoms/illustrations/flag-in-cog.tsx +26 -0
- package/src/atoms/illustrations/folder.tsx +24 -0
- package/src/atoms/illustrations/folders.tsx +22 -0
- package/src/atoms/illustrations/github-logo.tsx +15 -0
- package/src/atoms/illustrations/identity-card.tsx +28 -0
- package/src/atoms/illustrations/index.ts +35 -0
- package/src/atoms/illustrations/launch.tsx +24 -0
- package/src/atoms/illustrations/moon.tsx +42 -0
- package/src/atoms/illustrations/not-found.tsx +24 -0
- package/src/atoms/illustrations/notebook.tsx +32 -0
- package/src/atoms/illustrations/padlock.tsx +24 -0
- package/src/atoms/illustrations/photos.tsx +19 -0
- package/src/atoms/illustrations/planet.tsx +28 -0
- package/src/atoms/illustrations/plug.tsx +23 -0
- package/src/atoms/illustrations/props.type.ts +7 -0
- package/src/atoms/illustrations/rocket-new.tsx +30 -0
- package/src/atoms/illustrations/rocket.tsx +90 -0
- package/src/atoms/illustrations/slack-logo.tsx +29 -0
- package/src/atoms/illustrations/tags.tsx +20 -0
- package/src/atoms/index.ts +23 -0
- package/src/atoms/input/index.ts +1 -0
- package/src/atoms/input/input.stories.tsx +77 -0
- package/src/atoms/input/input.tsx +146 -0
- package/src/atoms/label/index.ts +1 -0
- package/src/atoms/label/label.stories.tsx +42 -0
- package/src/atoms/label/label.tsx +163 -0
- package/src/atoms/link/index.ts +1 -0
- package/src/atoms/link/link.stories.tsx +45 -0
- package/src/atoms/link/link.tsx +128 -0
- package/src/atoms/loader/index.ts +1 -0
- package/src/atoms/loader/loader.stories.tsx +12 -0
- package/src/atoms/loader/loader.tsx +91 -0
- package/src/atoms/overlay/index.ts +1 -0
- package/src/atoms/overlay/overlay.stories.tsx +12 -0
- package/src/atoms/overlay/overlay.tsx +24 -0
- package/src/atoms/phone-input/index.ts +1 -0
- package/src/atoms/phone-input/phone-input.stories.tsx +47 -0
- package/src/atoms/phone-input/phone-input.tsx +79 -0
- package/src/atoms/placeholder/index.ts +1 -0
- package/src/atoms/placeholder/placeholder.stories.tsx +25 -0
- package/src/atoms/placeholder/placeholder.tsx +105 -0
- package/src/atoms/radio/index.ts +1 -0
- package/src/atoms/radio/radio.stories.tsx +35 -0
- package/src/atoms/radio/radio.tsx +142 -0
- package/src/atoms/section/index.ts +1 -0
- package/src/atoms/section/section.stories.tsx +35 -0
- package/src/atoms/section/section.tsx +47 -0
- package/src/atoms/table/index.ts +6 -0
- package/src/atoms/table/table-body.tsx +19 -0
- package/src/atoms/table/table-caption.tsx +43 -0
- package/src/atoms/table/table-cell.tsx +35 -0
- package/src/atoms/table/table-head.tsx +31 -0
- package/src/atoms/table/table-row.tsx +26 -0
- package/src/atoms/table/table.stories.tsx +76 -0
- package/src/atoms/table/table.tsx +110 -0
- package/src/atoms/tabs/index.ts +2 -0
- package/src/atoms/tabs/tab.tsx +38 -0
- package/src/atoms/tabs/tabs.stories.tsx +30 -0
- package/src/atoms/tabs/tabs.tsx +165 -0
- package/src/atoms/text/index.ts +1 -0
- package/src/atoms/text/text.tsx +98 -0
- package/src/atoms/text-area/index.ts +1 -0
- package/src/atoms/text-area/text-area.stories.tsx +24 -0
- package/src/atoms/text-area/text-area.tsx +63 -0
- package/src/atoms/tooltip/index.ts +5 -0
- package/src/atoms/tooltip/tooltip-content.tsx +13 -0
- package/src/atoms/tooltip/tooltip-control.tsx +118 -0
- package/src/atoms/tooltip/tooltip-props.ts +30 -0
- package/src/atoms/tooltip/tooltip-styled.tsx +138 -0
- package/src/atoms/tooltip/tooltip.doc.md +61 -0
- package/src/atoms/tooltip/tooltip.stories.tsx +53 -0
- package/src/atoms/tooltip/tooltip.tsx +77 -0
- package/src/atoms/typography/caption-shared.ts +13 -0
- package/src/atoms/typography/caption.ts +15 -0
- package/src/atoms/typography/card-title.ts +19 -0
- package/src/atoms/typography/header.doc.md +38 -0
- package/src/atoms/typography/header.tsx +128 -0
- package/src/atoms/typography/index.ts +5 -0
- package/src/atoms/typography/small-text.ts +15 -0
- package/src/atoms/typography/title.ts +15 -0
- package/src/atoms/typography/typography.stories.tsx +259 -0
- package/src/constants.ts +2 -0
- package/src/global.ts +53 -0
- package/src/hooks/use-window-size.ts +36 -0
- package/src/index.doc.md +133 -0
- package/src/index.ts +20 -0
- package/src/molecules/date-picker/date-picker.stories.tsx +48 -0
- package/src/molecules/date-picker/date-picker.tsx +329 -0
- package/src/molecules/date-picker/index.ts +2 -0
- package/src/molecules/date-picker/useDatePicker.ts +45 -0
- package/src/molecules/drawer/drawer-content.tsx +18 -0
- package/src/molecules/drawer/drawer-footer.tsx +19 -0
- package/src/molecules/drawer/drawer.stories.tsx +55 -0
- package/src/molecules/drawer/drawer.tsx +127 -0
- package/src/molecules/drawer/index.ts +3 -0
- package/src/molecules/drop-down/drop-down-item-action.tsx +20 -0
- package/src/molecules/drop-down/drop-down-item.tsx +95 -0
- package/src/molecules/drop-down/drop-down-menu.tsx +45 -0
- package/src/molecules/drop-down/drop-down-trigger.tsx +12 -0
- package/src/molecules/drop-down/drop-down.doc.md +74 -0
- package/src/molecules/drop-down/drop-down.stories.tsx +82 -0
- package/src/molecules/drop-down/drop-down.tsx +99 -0
- package/src/molecules/drop-down/index.ts +5 -0
- package/src/molecules/drop-zone/drop-zone-image.tsx +15 -0
- package/src/molecules/drop-zone/drop-zone-item.tsx +126 -0
- package/src/molecules/drop-zone/drop-zone.stories.tsx +94 -0
- package/src/molecules/drop-zone/drop-zone.tsx +374 -0
- package/src/molecules/drop-zone/index.ts +2 -0
- package/src/molecules/form-group/form-group.stories.tsx +62 -0
- package/src/molecules/form-group/form-group.tsx +170 -0
- package/src/molecules/form-group/form-message.tsx +20 -0
- package/src/molecules/form-group/index.ts +3 -0
- package/src/molecules/form-group/input-group.tsx +59 -0
- package/src/molecules/index.ts +15 -0
- package/src/molecules/info-box/index.ts +1 -0
- package/src/molecules/info-box/info-box.stories.tsx +23 -0
- package/src/molecules/info-box/info-box.tsx +78 -0
- package/src/molecules/message-box/index.ts +1 -0
- package/src/molecules/message-box/message-box.stories.tsx +35 -0
- package/src/molecules/message-box/message-box.tsx +185 -0
- package/src/molecules/modal/index.ts +4 -0
- package/src/molecules/modal/modal-inline.tsx +53 -0
- package/src/molecules/modal/modal-props.ts +43 -0
- package/src/molecules/modal/modal-styled.tsx +60 -0
- package/src/molecules/modal/modal-wrapper.tsx +37 -0
- package/src/molecules/modal/modal.doc.md +138 -0
- package/src/molecules/modal/modal.stories.tsx +67 -0
- package/src/molecules/modal/modal.tsx +24 -0
- package/src/molecules/navigation-element/index.ts +3 -0
- package/src/molecules/navigation-element/navigation-element-props.ts +43 -0
- package/src/molecules/navigation-element/navigation-element-styled.ts +57 -0
- package/src/molecules/navigation-element/navigation-element.doc.md +69 -0
- package/src/molecules/navigation-element/navigation-element.stories.tsx +42 -0
- package/src/molecules/navigation-element/navigation-element.tsx +65 -0
- package/src/molecules/pagination/index.ts +1 -0
- package/src/molecules/pagination/pagination.stories.tsx +25 -0
- package/src/molecules/pagination/pagination.tsx +182 -0
- package/src/molecules/rich-text-editor/components/heading-select.tsx +42 -0
- package/src/molecules/rich-text-editor/components/image-button.tsx +49 -0
- package/src/molecules/rich-text-editor/components/menu-bar.tsx +31 -0
- package/src/molecules/rich-text-editor/components/menu-button.tsx +44 -0
- package/src/molecules/rich-text-editor/icons/align-center.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/align-justify.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/align-left.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/align-right.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/bold.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/bullet-list.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/clear.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/code.tsx +16 -0
- package/src/molecules/rich-text-editor/icons/font-size.tsx +14 -0
- package/src/molecules/rich-text-editor/icons/image.tsx +22 -0
- package/src/molecules/rich-text-editor/icons/index.ts +20 -0
- package/src/molecules/rich-text-editor/icons/italic.tsx +14 -0
- package/src/molecules/rich-text-editor/icons/link.tsx +21 -0
- package/src/molecules/rich-text-editor/icons/ordered-list.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/pagebreak.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/paragraph.tsx +14 -0
- package/src/molecules/rich-text-editor/icons/quote.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/redo.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/strikethrough.tsx +17 -0
- package/src/molecules/rich-text-editor/icons/undo.tsx +17 -0
- package/src/molecules/rich-text-editor/index.ts +2 -0
- package/src/molecules/rich-text-editor/rich-text-editor-props.ts +1 -0
- package/src/molecules/rich-text-editor/rich-text-editor.stories.tsx +88 -0
- package/src/molecules/rich-text-editor/rich-text-editor.styled.tsx +52 -0
- package/src/molecules/rich-text-editor/rich-text-editor.tsx +81 -0
- package/src/molecules/rich-text-editor/useTiptapCommands.ts +50 -0
- package/src/molecules/select/index.ts +2 -0
- package/src/molecules/select/select-async.tsx +51 -0
- package/src/molecules/select/select-theme.ts +41 -0
- package/src/molecules/select/select.stories.tsx +77 -0
- package/src/molecules/select/select.tsx +51 -0
- package/src/molecules/stepper/index.ts +2 -0
- package/src/molecules/stepper/step.tsx +162 -0
- package/src/molecules/stepper/stepper.stories.tsx +76 -0
- package/src/molecules/stepper/stepper.tsx +118 -0
- package/src/molecules/tinymce-editor/index.ts +1 -0
- package/src/molecules/tinymce-editor/tinymce-editor.styled.tsx +22 -0
- package/src/molecules/tinymce-editor/tinymce-editor.tsx +110 -0
- package/src/molecules/value-group/index.ts +2 -0
- package/src/molecules/value-group/value-group-props.ts +16 -0
- package/src/molecules/value-group/value-group.doc.md +67 -0
- package/src/molecules/value-group/value-group.stories.tsx +48 -0
- package/src/molecules/value-group/value-group.tsx +32 -0
- package/src/organisms/button-group/button-group.doc.md +92 -0
- package/src/organisms/button-group/button-group.stories.tsx +112 -0
- package/src/organisms/button-group/button-group.styled.tsx +61 -0
- package/src/organisms/button-group/button-group.tsx +41 -0
- package/src/organisms/button-group/button-group.types.ts +61 -0
- package/src/organisms/button-group/button-in-group.tsx +38 -0
- package/src/organisms/button-group/drop-down-item-with-buttons.tsx +56 -0
- package/src/organisms/button-group/index.ts +6 -0
- package/src/organisms/button-group/single-button-in-group.tsx +42 -0
- package/src/organisms/current-user-nav/current-user-nav-props.ts +39 -0
- package/src/organisms/current-user-nav/current-user-nav-styled.ts +31 -0
- package/src/organisms/current-user-nav/current-user-nav.doc.md +72 -0
- package/src/organisms/current-user-nav/current-user-nav.stories.tsx +53 -0
- package/src/organisms/current-user-nav/current-user-nav.tsx +72 -0
- package/src/organisms/current-user-nav/index.ts +3 -0
- package/src/organisms/index.ts +4 -0
- package/src/organisms/made-with-love/index.ts +1 -0
- package/src/organisms/made-with-love/made-with-love.stories.tsx +12 -0
- package/src/organisms/made-with-love/made-with-love.tsx +50 -0
- package/src/organisms/navigation/index.ts +4 -0
- package/src/organisms/navigation/navigation-element-wrapper.tsx +27 -0
- package/src/organisms/navigation/navigation-props.ts +26 -0
- package/src/organisms/navigation/navigation-styled.tsx +17 -0
- package/src/organisms/navigation/navigation.doc.md +126 -0
- package/src/organisms/navigation/navigation.stories.tsx +124 -0
- package/src/organisms/navigation/navigation.tsx +34 -0
- package/src/templates/blog.stories.tsx +69 -0
- package/src/templates/blog.tsx +0 -0
- package/src/theme.doc.md +111 -0
- package/src/theme.ts +554 -0
- package/src/utils/assert.ts +8 -0
- package/src/utils/color-props.ts +7 -0
- package/src/utils/combine-styles.ts +35 -0
- package/src/utils/content-styles.ts +268 -0
- package/src/utils/css-class.ts +37 -0
- package/src/utils/date-utils.ts +60 -0
- package/src/utils/datepicker.styles.ts +790 -0
- package/src/utils/default-theme.interface.ts +30 -0
- package/src/utils/direction-props.ts +1 -0
- package/src/utils/focus-shadow.style.ts +8 -0
- package/src/utils/generate-id.ts +10 -0
- package/src/utils/human-file-size.ts +30 -0
- package/src/utils/index.ts +14 -0
- package/src/utils/non-nullish-partial-record.type.ts +13 -0
- package/src/utils/phone-input.styles.ts +1170 -0
- package/src/utils/portal-utils.tsx +45 -0
- package/src/utils/reset.styles.ts +98 -0
- package/src/utils/select-styles.ts +52 -0
- package/src/utils/story-wrapper.tsx +23 -0
- package/src/utils/styled.ts +7 -0
- package/src/utils/theme-get.ts +57 -0
- package/tsconfig.json +36 -0
- package/types/src/atoms/avatar/avatar.d.ts +10 -0
- package/types/src/atoms/avatar/avatar.stories.d.ts +6 -0
- package/types/src/atoms/avatar/index.d.ts +1 -0
- package/types/src/atoms/badge/badge.d.ts +51 -0
- package/types/src/atoms/badge/badge.stories.d.ts +6 -0
- package/types/src/atoms/badge/index.d.ts +1 -0
- package/types/src/atoms/box/box.d.ts +47 -0
- package/types/src/atoms/box/box.stories.d.ts +7 -0
- package/types/src/atoms/box/index.d.ts +1 -0
- package/types/src/atoms/button/button-css.d.ts +18 -0
- package/types/src/atoms/button/button-props.d.ts +38 -0
- package/types/src/atoms/button/button.d.ts +25 -0
- package/types/src/atoms/button/button.stories.d.ts +6 -0
- package/types/src/atoms/button/index.d.ts +3 -0
- package/types/src/atoms/check-box/check-box.d.ts +39 -0
- package/types/src/atoms/check-box/check-box.stories.d.ts +6 -0
- package/types/src/atoms/check-box/index.d.ts +1 -0
- package/types/src/atoms/currency-input/currency-input.d.ts +74 -0
- package/types/src/atoms/currency-input/currency-input.stories.d.ts +6 -0
- package/types/src/atoms/currency-input/index.d.ts +1 -0
- package/types/src/atoms/icon/icon.d.ts +93 -0
- package/types/src/atoms/icon/icon.stories.d.ts +6 -0
- package/types/src/atoms/icon/index.d.ts +1 -0
- package/types/src/atoms/illustration/illustration.d.ts +52 -0
- package/types/src/atoms/illustration/illustration.stories.d.ts +6 -0
- package/types/src/atoms/illustration/index.d.ts +1 -0
- package/types/src/atoms/illustrations/accept.d.ts +4 -0
- package/types/src/atoms/illustrations/adminjs-logo.d.ts +4 -0
- package/types/src/atoms/illustrations/astronaut.d.ts +4 -0
- package/types/src/atoms/illustrations/bag.d.ts +4 -0
- package/types/src/atoms/illustrations/beware.d.ts +4 -0
- package/types/src/atoms/illustrations/box.d.ts +4 -0
- package/types/src/atoms/illustrations/calendar.d.ts +4 -0
- package/types/src/atoms/illustrations/cancel.d.ts +4 -0
- package/types/src/atoms/illustrations/cards.d.ts +4 -0
- package/types/src/atoms/illustrations/clip.d.ts +4 -0
- package/types/src/atoms/illustrations/cloud.d.ts +4 -0
- package/types/src/atoms/illustrations/cup.d.ts +4 -0
- package/types/src/atoms/illustrations/details.d.ts +4 -0
- package/types/src/atoms/illustrations/docs.d.ts +4 -0
- package/types/src/atoms/illustrations/document-check.d.ts +4 -0
- package/types/src/atoms/illustrations/document-search.d.ts +4 -0
- package/types/src/atoms/illustrations/drawer.d.ts +4 -0
- package/types/src/atoms/illustrations/file-search.d.ts +4 -0
- package/types/src/atoms/illustrations/flag-in-cog.d.ts +4 -0
- package/types/src/atoms/illustrations/folder.d.ts +4 -0
- package/types/src/atoms/illustrations/folders.d.ts +4 -0
- package/types/src/atoms/illustrations/github-logo.d.ts +4 -0
- package/types/src/atoms/illustrations/identity-card.d.ts +4 -0
- package/types/src/atoms/illustrations/index.d.ts +35 -0
- package/types/src/atoms/illustrations/launch.d.ts +4 -0
- package/types/src/atoms/illustrations/moon.d.ts +4 -0
- package/types/src/atoms/illustrations/not-found.d.ts +4 -0
- package/types/src/atoms/illustrations/notebook.d.ts +4 -0
- package/types/src/atoms/illustrations/padlock.d.ts +4 -0
- package/types/src/atoms/illustrations/photos.d.ts +4 -0
- package/types/src/atoms/illustrations/planet.d.ts +4 -0
- package/types/src/atoms/illustrations/plug.d.ts +4 -0
- package/types/src/atoms/illustrations/props.type.d.ts +6 -0
- package/types/src/atoms/illustrations/rocket-new.d.ts +4 -0
- package/types/src/atoms/illustrations/rocket.d.ts +4 -0
- package/types/src/atoms/illustrations/slack-logo.d.ts +4 -0
- package/types/src/atoms/illustrations/tags.d.ts +4 -0
- package/types/src/atoms/index.d.ts +23 -0
- package/types/src/atoms/input/index.d.ts +1 -0
- package/types/src/atoms/input/input.d.ts +63 -0
- package/types/src/atoms/input/input.stories.d.ts +6 -0
- package/types/src/atoms/label/index.d.ts +1 -0
- package/types/src/atoms/label/label.d.ts +79 -0
- package/types/src/atoms/label/label.stories.d.ts +5 -0
- package/types/src/atoms/link/index.d.ts +1 -0
- package/types/src/atoms/link/link.d.ts +74 -0
- package/types/src/atoms/link/link.stories.d.ts +5 -0
- package/types/src/atoms/loader/index.d.ts +1 -0
- package/types/src/atoms/loader/loader.d.ts +27 -0
- package/types/src/atoms/loader/loader.stories.d.ts +5 -0
- package/types/src/atoms/overlay/index.d.ts +1 -0
- package/types/src/atoms/overlay/overlay.d.ts +3 -0
- package/types/src/atoms/overlay/overlay.stories.d.ts +5 -0
- package/types/src/atoms/phone-input/index.d.ts +1 -0
- package/types/src/atoms/phone-input/phone-input.d.ts +47 -0
- package/types/src/atoms/phone-input/phone-input.stories.d.ts +6 -0
- package/types/src/atoms/placeholder/index.d.ts +1 -0
- package/types/src/atoms/placeholder/placeholder.d.ts +52 -0
- package/types/src/atoms/placeholder/placeholder.stories.d.ts +6 -0
- package/types/src/atoms/radio/index.d.ts +1 -0
- package/types/src/atoms/radio/radio.d.ts +40 -0
- package/types/src/atoms/radio/radio.stories.d.ts +5 -0
- package/types/src/atoms/section/index.d.ts +1 -0
- package/types/src/atoms/section/section.d.ts +31 -0
- package/types/src/atoms/section/section.stories.d.ts +5 -0
- package/types/src/atoms/table/index.d.ts +6 -0
- package/types/src/atoms/table/table-body.d.ts +6 -0
- package/types/src/atoms/table/table-caption.d.ts +6 -0
- package/types/src/atoms/table/table-cell.d.ts +9 -0
- package/types/src/atoms/table/table-head.d.ts +6 -0
- package/types/src/atoms/table/table-row.d.ts +6 -0
- package/types/src/atoms/table/table.d.ts +90 -0
- package/types/src/atoms/table/table.stories.d.ts +7 -0
- package/types/src/atoms/tabs/index.d.ts +2 -0
- package/types/src/atoms/tabs/tab.d.ts +17 -0
- package/types/src/atoms/tabs/tabs.d.ts +49 -0
- package/types/src/atoms/tabs/tabs.stories.d.ts +5 -0
- package/types/src/atoms/text/index.d.ts +1 -0
- package/types/src/atoms/text/text.d.ts +62 -0
- package/types/src/atoms/text-area/index.d.ts +1 -0
- package/types/src/atoms/text-area/text-area.d.ts +46 -0
- package/types/src/atoms/text-area/text-area.stories.d.ts +5 -0
- package/types/src/atoms/tooltip/index.d.ts +5 -0
- package/types/src/atoms/tooltip/tooltip-content.d.ts +16 -0
- package/types/src/atoms/tooltip/tooltip-control.d.ts +9 -0
- package/types/src/atoms/tooltip/tooltip-props.d.ts +25 -0
- package/types/src/atoms/tooltip/tooltip-styled.d.ts +3 -0
- package/types/src/atoms/tooltip/tooltip.d.ts +12 -0
- package/types/src/atoms/tooltip/tooltip.stories.d.ts +5 -0
- package/types/src/atoms/typography/caption-shared.d.ts +3 -0
- package/types/src/atoms/typography/caption.d.ts +3 -0
- package/types/src/atoms/typography/card-title.d.ts +3 -0
- package/types/src/atoms/typography/header.d.ts +29 -0
- package/types/src/atoms/typography/index.d.ts +5 -0
- package/types/src/atoms/typography/small-text.d.ts +3 -0
- package/types/src/atoms/typography/title.d.ts +3 -0
- package/types/src/atoms/typography/typography.stories.d.ts +9 -0
- package/types/src/constants.d.ts +1 -0
- package/types/src/global.d.ts +1 -0
- package/types/src/hooks/use-window-size.d.ts +6 -0
- package/types/src/index.d.ts +16 -0
- package/types/src/molecules/date-picker/date-picker.d.ts +78 -0
- package/types/src/molecules/date-picker/date-picker.stories.d.ts +5 -0
- package/types/src/molecules/date-picker/index.d.ts +2 -0
- package/types/src/molecules/date-picker/useDatePicker.d.ts +14 -0
- package/types/src/molecules/drawer/drawer-content.d.ts +7 -0
- package/types/src/molecules/drawer/drawer-footer.d.ts +7 -0
- package/types/src/molecules/drawer/drawer.d.ts +88 -0
- package/types/src/molecules/drawer/drawer.stories.d.ts +5 -0
- package/types/src/molecules/drawer/index.d.ts +3 -0
- package/types/src/molecules/drop-down/drop-down-item-action.d.ts +12 -0
- package/types/src/molecules/drop-down/drop-down-item.d.ts +32 -0
- package/types/src/molecules/drop-down/drop-down-menu.d.ts +31 -0
- package/types/src/molecules/drop-down/drop-down-trigger.d.ts +6 -0
- package/types/src/molecules/drop-down/drop-down.d.ts +30 -0
- package/types/src/molecules/drop-down/drop-down.stories.d.ts +10 -0
- package/types/src/molecules/drop-down/index.d.ts +5 -0
- package/types/src/molecules/drop-zone/drop-zone-image.d.ts +3 -0
- package/types/src/molecules/drop-zone/drop-zone-item.d.ts +55 -0
- package/types/src/molecules/drop-zone/drop-zone.d.ts +148 -0
- package/types/src/molecules/drop-zone/drop-zone.stories.d.ts +8 -0
- package/types/src/molecules/drop-zone/index.d.ts +2 -0
- package/types/src/molecules/form-group/form-group.d.ts +119 -0
- package/types/src/molecules/form-group/form-group.stories.d.ts +6 -0
- package/types/src/molecules/form-group/form-message.d.ts +11 -0
- package/types/src/molecules/form-group/index.d.ts +3 -0
- package/types/src/molecules/form-group/input-group.d.ts +6 -0
- package/types/src/molecules/index.d.ts +15 -0
- package/types/src/molecules/info-box/index.d.ts +1 -0
- package/types/src/molecules/info-box/info-box.d.ts +53 -0
- package/types/src/molecules/info-box/info-box.stories.d.ts +5 -0
- package/types/src/molecules/message-box/index.d.ts +1 -0
- package/types/src/molecules/message-box/message-box.d.ts +94 -0
- package/types/src/molecules/message-box/message-box.stories.d.ts +7 -0
- package/types/src/molecules/modal/index.d.ts +4 -0
- package/types/src/molecules/modal/modal-inline.d.ts +14 -0
- package/types/src/molecules/modal/modal-props.d.ts +38 -0
- package/types/src/molecules/modal/modal-styled.d.ts +12 -0
- package/types/src/molecules/modal/modal-wrapper.d.ts +4 -0
- package/types/src/molecules/modal/modal.d.ts +12 -0
- package/types/src/molecules/modal/modal.stories.d.ts +5 -0
- package/types/src/molecules/navigation-element/index.d.ts +3 -0
- package/types/src/molecules/navigation-element/navigation-element-props.d.ts +38 -0
- package/types/src/molecules/navigation-element/navigation-element-styled.d.ts +3 -0
- package/types/src/molecules/navigation-element/navigation-element.d.ts +14 -0
- package/types/src/molecules/navigation-element/navigation-element.stories.d.ts +5 -0
- package/types/src/molecules/pagination/index.d.ts +1 -0
- package/types/src/molecules/pagination/pagination.d.ts +64 -0
- package/types/src/molecules/pagination/pagination.stories.d.ts +5 -0
- package/types/src/molecules/rich-text-editor/components/heading-select.d.ts +7 -0
- package/types/src/molecules/rich-text-editor/components/image-button.d.ts +7 -0
- package/types/src/molecules/rich-text-editor/components/menu-bar.d.ts +7 -0
- package/types/src/molecules/rich-text-editor/components/menu-button.d.ts +12 -0
- package/types/src/molecules/rich-text-editor/icons/align-center.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/align-justify.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/align-left.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/align-right.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/bold.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/bullet-list.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/clear.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/code.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/font-size.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/image.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/index.d.ts +19 -0
- package/types/src/molecules/rich-text-editor/icons/italic.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/link.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/ordered-list.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/pagebreak.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/paragraph.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/quote.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/redo.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/strikethrough.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/icons/undo.d.ts +3 -0
- package/types/src/molecules/rich-text-editor/index.d.ts +2 -0
- package/types/src/molecules/rich-text-editor/rich-text-editor-props.d.ts +1 -0
- package/types/src/molecules/rich-text-editor/rich-text-editor.d.ts +15 -0
- package/types/src/molecules/rich-text-editor/rich-text-editor.stories.d.ts +5 -0
- package/types/src/molecules/rich-text-editor/rich-text-editor.styled.d.ts +22 -0
- package/types/src/molecules/rich-text-editor/useTiptapCommands.d.ts +12 -0
- package/types/src/molecules/select/index.d.ts +2 -0
- package/types/src/molecules/select/select-async.d.ts +9 -0
- package/types/src/molecules/select/select-theme.d.ts +7 -0
- package/types/src/molecules/select/select.d.ts +9 -0
- package/types/src/molecules/select/select.stories.d.ts +7 -0
- package/types/src/molecules/stepper/index.d.ts +2 -0
- package/types/src/molecules/stepper/step.d.ts +86 -0
- package/types/src/molecules/stepper/stepper.d.ts +112 -0
- package/types/src/molecules/stepper/stepper.stories.d.ts +6 -0
- package/types/src/molecules/tinymce-editor/index.d.ts +1 -0
- package/types/src/molecules/tinymce-editor/tinymce-editor.d.ts +14 -0
- package/types/src/molecules/tinymce-editor/tinymce-editor.styled.d.ts +21 -0
- package/types/src/molecules/value-group/index.d.ts +2 -0
- package/types/src/molecules/value-group/value-group-props.d.ts +15 -0
- package/types/src/molecules/value-group/value-group.d.ts +14 -0
- package/types/src/molecules/value-group/value-group.stories.d.ts +7 -0
- package/types/src/organisms/button-group/button-group.d.ts +13 -0
- package/types/src/organisms/button-group/button-group.stories.d.ts +7 -0
- package/types/src/organisms/button-group/button-group.styled.d.ts +33 -0
- package/types/src/organisms/button-group/button-group.types.d.ts +59 -0
- package/types/src/organisms/button-group/button-in-group.d.ts +4 -0
- package/types/src/organisms/button-group/drop-down-item-with-buttons.d.ts +4 -0
- package/types/src/organisms/button-group/index.d.ts +6 -0
- package/types/src/organisms/button-group/single-button-in-group.d.ts +4 -0
- package/types/src/organisms/current-user-nav/current-user-nav-props.d.ts +37 -0
- package/types/src/organisms/current-user-nav/current-user-nav-styled.d.ts +12 -0
- package/types/src/organisms/current-user-nav/current-user-nav.d.ts +14 -0
- package/types/src/organisms/current-user-nav/current-user-nav.stories.d.ts +7 -0
- package/types/src/organisms/current-user-nav/index.d.ts +3 -0
- package/types/src/organisms/index.d.ts +4 -0
- package/types/src/organisms/made-with-love/index.d.ts +1 -0
- package/types/src/organisms/made-with-love/made-with-love.d.ts +3 -0
- package/types/src/organisms/made-with-love/made-with-love.stories.d.ts +5 -0
- package/types/src/organisms/navigation/index.d.ts +4 -0
- package/types/src/organisms/navigation/navigation-element-wrapper.d.ts +4 -0
- package/types/src/organisms/navigation/navigation-props.d.ts +21 -0
- package/types/src/organisms/navigation/navigation-styled.d.ts +12 -0
- package/types/src/organisms/navigation/navigation.d.ts +14 -0
- package/types/src/organisms/navigation/navigation.stories.d.ts +8 -0
- package/types/src/templates/blog.d.ts +1 -0
- package/types/src/templates/blog.stories.d.ts +4 -0
- package/types/src/theme.d.ts +503 -0
- package/types/src/utils/assert.d.ts +2 -0
- package/types/src/utils/color-props.d.ts +5 -0
- package/types/src/utils/combine-styles.d.ts +23 -0
- package/types/src/utils/content-styles.d.ts +21 -0
- package/types/src/utils/css-class.d.ts +21 -0
- package/types/src/utils/date-utils.d.ts +34 -0
- package/types/src/utils/datepicker.styles.d.ts +3 -0
- package/types/src/utils/default-theme.interface.d.ts +17 -0
- package/types/src/utils/direction-props.d.ts +1 -0
- package/types/src/utils/focus-shadow.style.d.ts +3 -0
- package/types/src/utils/generate-id.d.ts +2 -0
- package/types/src/utils/human-file-size.d.ts +12 -0
- package/types/src/utils/index.d.ts +13 -0
- package/types/src/utils/non-nullish-partial-record.type.d.ts +16 -0
- package/types/src/utils/phone-input.styles.d.ts +3 -0
- package/types/src/utils/portal-utils.d.ts +7 -0
- package/types/src/utils/reset.styles.d.ts +37 -0
- package/types/src/utils/select-styles.d.ts +5 -0
- package/types/src/utils/story-wrapper.d.ts +9 -0
- package/types/src/utils/styled.d.ts +4 -0
- package/types/src/utils/theme-get.d.ts +32 -0
- package/vendor-types/csstype/index.d.ts +0 -0
- package/vendor-types/jw-paginate/index.d.ts +10 -0
- package/vendor-types/styled-components/index.d.ts +7 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import StoryWrapper from "../../utils/story-wrapper.js";
|
|
3
|
+
import { Button, CheckBox, Icon, Link, Text } from "../index.js";
|
|
4
|
+
import { Table, TableBody, TableCaption, TableCell, TableHead, TableRow } from "./index.js";
|
|
5
|
+
export const Default = {
|
|
6
|
+
render: ({
|
|
7
|
+
onClick
|
|
8
|
+
}) => {
|
|
9
|
+
const handleClick = event => {
|
|
10
|
+
event.preventDefault();
|
|
11
|
+
onClick(event);
|
|
12
|
+
};
|
|
13
|
+
const header = ['Name', 'Surname', 'Gender', 'Age'];
|
|
14
|
+
const data = [['John', 'Doe', 'Male', '57'], ['Joanna', 'K', 'Female', '32'], ['Patrick', 'Jogs', 'Male', '35'], ['Elisabeth', 'Briggs', 'Female', '28'], ['Jda', 'Karo', 'Female', '22']];
|
|
15
|
+
return /*#__PURE__*/React.createElement(StoryWrapper, {
|
|
16
|
+
label: ""
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Table, null, /*#__PURE__*/React.createElement(TableCaption, null, /*#__PURE__*/React.createElement(Text, {
|
|
18
|
+
as: "span"
|
|
19
|
+
}, "Selected items "), /*#__PURE__*/React.createElement(Button, {
|
|
20
|
+
onClick: handleClick
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
22
|
+
icon: "Trash"
|
|
23
|
+
}), "Remove")), /*#__PURE__*/React.createElement(TableHead, null, /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableCell, null, /*#__PURE__*/React.createElement(CheckBox, null)), header.map((head, i) => /*#__PURE__*/React.createElement(TableCell, {
|
|
24
|
+
key: head,
|
|
25
|
+
onClick: handleClick
|
|
26
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
27
|
+
href: "/"
|
|
28
|
+
}, head, i === 0 && /*#__PURE__*/React.createElement(Icon, {
|
|
29
|
+
icon: "ChevronUp"
|
|
30
|
+
})))))), /*#__PURE__*/React.createElement(TableBody, null, data.map(row => /*#__PURE__*/React.createElement(TableRow, {
|
|
31
|
+
key: row[0]
|
|
32
|
+
}, /*#__PURE__*/React.createElement(TableCell, null, /*#__PURE__*/React.createElement(CheckBox, null)), row.map(item => /*#__PURE__*/React.createElement(TableCell, {
|
|
33
|
+
key: item
|
|
34
|
+
}, item)))))));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const meta = {
|
|
38
|
+
title: 'DesignSystem/Atoms/Table',
|
|
39
|
+
component: Table,
|
|
40
|
+
argTypes: {
|
|
41
|
+
onClick: {
|
|
42
|
+
action: 'clicked'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export default meta;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { useLayoutEffect } from 'react';
|
|
2
|
+
import { useTabs } from "./tabs.js";
|
|
3
|
+
/**
|
|
4
|
+
* Renders children inside Tabs component. Each Tab will add a single tab in
|
|
5
|
+
* the navigation bar.
|
|
6
|
+
*/
|
|
7
|
+
export const Tab = ({
|
|
8
|
+
id,
|
|
9
|
+
label,
|
|
10
|
+
children
|
|
11
|
+
}) => {
|
|
12
|
+
const {
|
|
13
|
+
currentTab,
|
|
14
|
+
registerTab,
|
|
15
|
+
unregisterTab
|
|
16
|
+
} = useTabs();
|
|
17
|
+
useLayoutEffect(() => {
|
|
18
|
+
registerTab(id, label);
|
|
19
|
+
return () => unregisterTab(id);
|
|
20
|
+
});
|
|
21
|
+
if (id !== currentTab) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
26
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
27
|
+
};
|
|
28
|
+
Tab.displayName = 'Tab';
|
|
29
|
+
export default Tab;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React, { createContext, useCallback, useState, useMemo, useContext } from 'react';
|
|
2
|
+
import { styled, css } from "../../../build/utils/styled.js";
|
|
3
|
+
import assert from "../../utils/assert.js";
|
|
4
|
+
const StyledButton = styled.button`
|
|
5
|
+
background: none;
|
|
6
|
+
border: none;
|
|
7
|
+
padding: ${({
|
|
8
|
+
theme
|
|
9
|
+
}) => `${theme.space.lg} ${theme.space.xl}`};
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
border-bottom: 2px solid ${({
|
|
12
|
+
theme
|
|
13
|
+
}) => theme.colors.border};
|
|
14
|
+
color: ${({
|
|
15
|
+
theme
|
|
16
|
+
}) => theme.colors.grey60};
|
|
17
|
+
user-select: none;
|
|
18
|
+
${({
|
|
19
|
+
theme
|
|
20
|
+
}) => ({
|
|
21
|
+
fontFamily: theme.font,
|
|
22
|
+
fontSize: theme.fontSizes.md,
|
|
23
|
+
lineHeight: theme.lineHeights.lg
|
|
24
|
+
})};
|
|
25
|
+
|
|
26
|
+
${({
|
|
27
|
+
active,
|
|
28
|
+
theme
|
|
29
|
+
}) => active && css`
|
|
30
|
+
border-color: ${theme.colors.primary100};
|
|
31
|
+
color: ${theme.colors.primary100};
|
|
32
|
+
`}
|
|
33
|
+
`;
|
|
34
|
+
const StyledContent = styled.div`
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
`;
|
|
38
|
+
const StyledHeader = styled.div`
|
|
39
|
+
display: flex;
|
|
40
|
+
`;
|
|
41
|
+
const StyledSpacer = styled.div`
|
|
42
|
+
flex-grow: 1;
|
|
43
|
+
border-bottom: 2px solid ${({
|
|
44
|
+
theme
|
|
45
|
+
}) => theme.colors.border};
|
|
46
|
+
`;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Tabs component renders a tab navigation bar that lets the user select a Tab
|
|
50
|
+
* to display below. Children of the selected Tab are then rendered below the
|
|
51
|
+
* navigation bar.
|
|
52
|
+
*/
|
|
53
|
+
export const Tabs = ({
|
|
54
|
+
currentTab,
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
56
|
+
onChange = () => {},
|
|
57
|
+
children,
|
|
58
|
+
fullWidth = true,
|
|
59
|
+
headerComponent: Header = StyledHeader,
|
|
60
|
+
buttonComponent: Button = StyledButton,
|
|
61
|
+
contentComponent: Content = StyledContent
|
|
62
|
+
}) => {
|
|
63
|
+
const [tabs, setTabs] = useState([]);
|
|
64
|
+
const registerTab = useCallback((id, title) => {
|
|
65
|
+
setTabs(currentTabs => {
|
|
66
|
+
if (currentTabs.find(t => t.id === id)) {
|
|
67
|
+
// eslint-disable-next-line no-console
|
|
68
|
+
console.error(`There are multiple Tab components with ID '${id}'`);
|
|
69
|
+
}
|
|
70
|
+
return [...currentTabs, {
|
|
71
|
+
id,
|
|
72
|
+
title
|
|
73
|
+
}];
|
|
74
|
+
});
|
|
75
|
+
}, []);
|
|
76
|
+
const unregisterTab = useCallback(id => setTabs(newTabs => newTabs.filter(t => t.id !== id)), []);
|
|
77
|
+
const memoizedContext = useMemo(() => ({
|
|
78
|
+
currentTab,
|
|
79
|
+
registerTab,
|
|
80
|
+
unregisterTab
|
|
81
|
+
}), [currentTab, registerTab, unregisterTab]);
|
|
82
|
+
return (
|
|
83
|
+
/*#__PURE__*/
|
|
84
|
+
// eslint-disable-next-line no-use-before-define
|
|
85
|
+
React.createElement(TabContext.Provider, {
|
|
86
|
+
value: memoizedContext
|
|
87
|
+
}, /*#__PURE__*/React.createElement(StyledContent, {
|
|
88
|
+
role: "tablist"
|
|
89
|
+
}, /*#__PURE__*/React.createElement(Header, null, tabs.map(({
|
|
90
|
+
id,
|
|
91
|
+
title
|
|
92
|
+
}) => /*#__PURE__*/React.createElement(Button, {
|
|
93
|
+
role: "tab",
|
|
94
|
+
active: id === currentTab,
|
|
95
|
+
key: id,
|
|
96
|
+
onClick: () => onChange(id),
|
|
97
|
+
tabId: id
|
|
98
|
+
}, title)), fullWidth && /*#__PURE__*/React.createElement(StyledSpacer, null)), /*#__PURE__*/React.createElement(Content, {
|
|
99
|
+
role: "tabpanel"
|
|
100
|
+
}, children)))
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
export const TabContext = /*#__PURE__*/createContext({
|
|
104
|
+
registerTab: () => {
|
|
105
|
+
// eslint-disable-next-line no-console
|
|
106
|
+
console.error('Tab used outside of Tabs component. Tab needs to be a child of Tabs.');
|
|
107
|
+
},
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
109
|
+
unregisterTab: () => {},
|
|
110
|
+
currentTab: ''
|
|
111
|
+
});
|
|
112
|
+
export const useTabs = () => {
|
|
113
|
+
const ctx = useContext(TabContext);
|
|
114
|
+
assert(TabContext, 'useTabs is used outside TabContext');
|
|
115
|
+
return ctx;
|
|
116
|
+
};
|
|
117
|
+
Tabs.displayName = 'Tabs';
|
|
118
|
+
export default Tabs;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Box } from "../index.js";
|
|
3
|
+
import { Tab, Tabs } from "./index.js";
|
|
4
|
+
export const Default = () => {
|
|
5
|
+
const [selectedTab, setSelectedTab] = useState('first');
|
|
6
|
+
return /*#__PURE__*/React.createElement(Tabs, {
|
|
7
|
+
currentTab: selectedTab,
|
|
8
|
+
onChange: setSelectedTab
|
|
9
|
+
}, /*#__PURE__*/React.createElement(Tab, {
|
|
10
|
+
id: "first",
|
|
11
|
+
label: "First tab"
|
|
12
|
+
}, "First"), /*#__PURE__*/React.createElement(Tab, {
|
|
13
|
+
id: "second",
|
|
14
|
+
label: "Second tab"
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
16
|
+
color: "primary100"
|
|
17
|
+
}, "Second")), /*#__PURE__*/React.createElement(Tab, {
|
|
18
|
+
id: "third",
|
|
19
|
+
label: "Third tab"
|
|
20
|
+
}, "Third"));
|
|
21
|
+
};
|
|
22
|
+
const meta = {
|
|
23
|
+
title: 'DesignSystem/Atoms/Tabs',
|
|
24
|
+
component: Tabs
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./text.js";
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { typography, space, variant, color, layout } from 'styled-system';
|
|
2
|
+
import { styled } from "../../../build/utils/styled.js";
|
|
3
|
+
import contentCSS from "../../utils/content-styles.js";
|
|
4
|
+
import { cssClass } from "../../utils/css-class.js";
|
|
5
|
+
const variants = variant({
|
|
6
|
+
variants: {
|
|
7
|
+
xs: {
|
|
8
|
+
fontSize: 'xs'
|
|
9
|
+
},
|
|
10
|
+
sm: {
|
|
11
|
+
fontSize: 'sm'
|
|
12
|
+
},
|
|
13
|
+
lg: {
|
|
14
|
+
fontSize: 'lg'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Prop Types of a Text component.
|
|
21
|
+
* Apart from variant it extends all {@link ColorProps}, {@link SpaceProps} and
|
|
22
|
+
* {@link TypographyProps}
|
|
23
|
+
*
|
|
24
|
+
* @memberof Text
|
|
25
|
+
* @alias TextProps
|
|
26
|
+
* @property {string} [...] Other props from {@link ColorProps}, {@link SpaceProps}
|
|
27
|
+
* and {@link TypographyProps}
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @classdesc
|
|
32
|
+
*
|
|
33
|
+
* <img src="components/text.png" />
|
|
34
|
+
*
|
|
35
|
+
* Use the Text component to control font size, weight, alignment, and color.
|
|
36
|
+
* By default it is rendered as a `div` but you can change this to other (like `span`)
|
|
37
|
+
* by using `as` prop,
|
|
38
|
+
*
|
|
39
|
+
* ### Usage
|
|
40
|
+
*
|
|
41
|
+
* ```javascript
|
|
42
|
+
* import { Text, TextProps } from '@adminjs/design-system'
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @component
|
|
46
|
+
* @subcategory Atoms
|
|
47
|
+
* @see TextProps
|
|
48
|
+
* @see {@link https://storybook.adminjs.co/?path=/story/designsystem-atoms-text--default Storybook}
|
|
49
|
+
* @hideconstructor
|
|
50
|
+
* @example <caption>Lorem ipsum</caption>
|
|
51
|
+
* return (
|
|
52
|
+
* <Box>
|
|
53
|
+
* <Text>
|
|
54
|
+
* In publishing and graphic design,
|
|
55
|
+
* Lorem ipsum is a <b>placeholder</b> text commonly used to demonstrate the
|
|
56
|
+
* visual form of a document or a typeface without relying on meaningful
|
|
57
|
+
* content.
|
|
58
|
+
* </Text>
|
|
59
|
+
* <Text mt="default" variant="sm">This text was from Wikipedia</Text>
|
|
60
|
+
* </Box>
|
|
61
|
+
* )
|
|
62
|
+
* @section design-system
|
|
63
|
+
*/
|
|
64
|
+
const Text = styled.div`
|
|
65
|
+
${contentCSS};
|
|
66
|
+
${typography};
|
|
67
|
+
${space};
|
|
68
|
+
${layout};
|
|
69
|
+
${color};
|
|
70
|
+
${variants};
|
|
71
|
+
`;
|
|
72
|
+
Text.defaultProps = {
|
|
73
|
+
className: cssClass('Text')
|
|
74
|
+
};
|
|
75
|
+
Text.displayName = 'Text';
|
|
76
|
+
export { Text };
|
|
77
|
+
export default Text;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./text-area.js";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { space, typography, layout } from 'styled-system';
|
|
2
|
+
import { styled } from "../../../build/utils/styled.js";
|
|
3
|
+
import { InputCSS } from "../input/index.js";
|
|
4
|
+
import { cssClass } from "../../utils/css-class.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Prop Types of a TextArea component.
|
|
8
|
+
* It extends all {@link SpaceProps}, {@link TypographyProps} and {@link LayoutProps}
|
|
9
|
+
* @memberof TextArea
|
|
10
|
+
* @alias TextAreaProps
|
|
11
|
+
* @property {string} [...] All props default to _textarea_ html component like `onChange`,
|
|
12
|
+
* `value` etc.
|
|
13
|
+
* @property {string} [...] Props from {@link SpaceProps}, {@link TypographyProps}
|
|
14
|
+
* and {@link LayoutProps} + they extend {@link InputProps}
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @classdesc
|
|
19
|
+
*
|
|
20
|
+
* <img src="components/textarea.png" />
|
|
21
|
+
*
|
|
22
|
+
* Wrapped `textarea` html element.
|
|
23
|
+
*
|
|
24
|
+
* ### Usage
|
|
25
|
+
*
|
|
26
|
+
* ```javascript
|
|
27
|
+
* import { TextArea, TextAreaProps } from '@adminjs/design-system'
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @component
|
|
31
|
+
* @subcategory Atoms
|
|
32
|
+
* @see {@link https://storybook.adminjs.co/?path=/story/designsystem-atoms-textarea--default Storybook}
|
|
33
|
+
* @see TextAreaProps
|
|
34
|
+
* @hideconstructor
|
|
35
|
+
* @example
|
|
36
|
+
* return (
|
|
37
|
+
* <Box p="xl">
|
|
38
|
+
* <Label htmlFor="textarea1">Some example label</Label>
|
|
39
|
+
* <TextArea id="textarea1" width={1/2} />
|
|
40
|
+
* </Box>
|
|
41
|
+
* )
|
|
42
|
+
* @section design-system
|
|
43
|
+
*/
|
|
44
|
+
const TextArea = styled.textarea`
|
|
45
|
+
${InputCSS}
|
|
46
|
+
${space};
|
|
47
|
+
${layout};
|
|
48
|
+
${typography};
|
|
49
|
+
`;
|
|
50
|
+
TextArea.defaultProps = {
|
|
51
|
+
px: 'default',
|
|
52
|
+
py: 'default',
|
|
53
|
+
fontSize: 'default',
|
|
54
|
+
className: cssClass('TextArea')
|
|
55
|
+
};
|
|
56
|
+
TextArea.displayName = 'TextArea';
|
|
57
|
+
export { TextArea };
|
|
58
|
+
export default TextArea;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import StoryWrapper from "../../utils/story-wrapper.js";
|
|
3
|
+
import { Box } from "../index.js";
|
|
4
|
+
import { TextArea } from "./index.js";
|
|
5
|
+
export const Default = () => /*#__PURE__*/React.createElement(Box, {
|
|
6
|
+
width: 1
|
|
7
|
+
}, /*#__PURE__*/React.createElement(StoryWrapper, {
|
|
8
|
+
label: "Regular example"
|
|
9
|
+
}, /*#__PURE__*/React.createElement(TextArea, {
|
|
10
|
+
id: "input1",
|
|
11
|
+
placeholder: "Simple textarea field...",
|
|
12
|
+
width: 1
|
|
13
|
+
})), /*#__PURE__*/React.createElement(StoryWrapper, {
|
|
14
|
+
label: "Without border and huge"
|
|
15
|
+
}, /*#__PURE__*/React.createElement(TextArea, {
|
|
16
|
+
id: "input2",
|
|
17
|
+
placeholder: "Huge borderless",
|
|
18
|
+
width: 1,
|
|
19
|
+
borderless: true,
|
|
20
|
+
variant: "xl"
|
|
21
|
+
})));
|
|
22
|
+
const meta = {
|
|
23
|
+
title: 'DesignSystem/Atoms/TextArea',
|
|
24
|
+
component: TextArea
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { styled } from "../../../build/utils/styled.js";
|
|
2
|
+
import { Box } from "../box/index.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @component
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
8
|
+
export const TooltipContent = styled(Box)``;
|
|
9
|
+
TooltipContent.displayName = 'TooltipContent';
|
|
10
|
+
export default TooltipContent;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import useWindowSize from "../../hooks/use-window-size.js";
|
|
3
|
+
import { StyledTooltip } from "./tooltip-styled.js";
|
|
4
|
+
/**
|
|
5
|
+
* @component
|
|
6
|
+
* @private
|
|
7
|
+
* @memberof Tooltip
|
|
8
|
+
*/
|
|
9
|
+
export const TooltipControl = props => {
|
|
10
|
+
const {
|
|
11
|
+
title,
|
|
12
|
+
childRef,
|
|
13
|
+
direction = 'bottom',
|
|
14
|
+
ContentElement,
|
|
15
|
+
size
|
|
16
|
+
} = props;
|
|
17
|
+
const tooltipRef = useRef(null);
|
|
18
|
+
const [dimension, setDimension] = useState(null);
|
|
19
|
+
const [position, setPosition] = useState(null);
|
|
20
|
+
const [elementPosition, setElementPosition] = useState(null);
|
|
21
|
+
const windowSize = useWindowSize();
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (childRef.current) {
|
|
24
|
+
const {
|
|
25
|
+
width: clientWidth,
|
|
26
|
+
top: offsetTop,
|
|
27
|
+
left: offsetLeft,
|
|
28
|
+
height: clientHeight
|
|
29
|
+
} = childRef.current.getBoundingClientRect();
|
|
30
|
+
setElementPosition({
|
|
31
|
+
width: clientWidth,
|
|
32
|
+
top: offsetTop,
|
|
33
|
+
left: offsetLeft,
|
|
34
|
+
height: clientHeight
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}, [childRef, windowSize?.width, windowSize?.height]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (tooltipRef.current) {
|
|
40
|
+
const {
|
|
41
|
+
clientWidth,
|
|
42
|
+
clientHeight
|
|
43
|
+
} = tooltipRef.current;
|
|
44
|
+
setDimension({
|
|
45
|
+
width: clientWidth,
|
|
46
|
+
height: clientHeight
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}, [tooltipRef?.current?.clientWidth, tooltipRef?.current?.clientHeight, title]);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (!elementPosition || !dimension) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// eslint-disable-next-line default-case
|
|
56
|
+
switch (direction) {
|
|
57
|
+
case 'bottom':
|
|
58
|
+
{
|
|
59
|
+
setPosition({
|
|
60
|
+
top: elementPosition.top + elementPosition.height,
|
|
61
|
+
left: elementPosition.left + elementPosition.width / 2 - dimension.width / 2
|
|
62
|
+
});
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
case 'top':
|
|
66
|
+
{
|
|
67
|
+
setPosition({
|
|
68
|
+
top: elementPosition.top - dimension.height,
|
|
69
|
+
left: elementPosition.left + elementPosition.width / 2 - dimension.width / 2
|
|
70
|
+
});
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
case 'left':
|
|
74
|
+
{
|
|
75
|
+
setPosition({
|
|
76
|
+
top: elementPosition.top + elementPosition.height / 2 - dimension.height / 2,
|
|
77
|
+
left: elementPosition.left - dimension.width
|
|
78
|
+
});
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
case 'right':
|
|
82
|
+
{
|
|
83
|
+
setPosition({
|
|
84
|
+
top: elementPosition.top + elementPosition.height / 2 - dimension.height / 2,
|
|
85
|
+
left: elementPosition.left + elementPosition.width
|
|
86
|
+
});
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, [elementPosition, dimension, direction]);
|
|
91
|
+
const isVisible = !!(dimension && position);
|
|
92
|
+
return /*#__PURE__*/React.createElement(StyledTooltip, {
|
|
93
|
+
ref: tooltipRef,
|
|
94
|
+
left: position?.left || '-1110px',
|
|
95
|
+
top: position?.top || '-1110px',
|
|
96
|
+
size: size,
|
|
97
|
+
direction: direction,
|
|
98
|
+
isVisible: isVisible
|
|
99
|
+
}, ContentElement || title);
|
|
100
|
+
};
|
|
101
|
+
TooltipControl.displayName = 'TooltipControl';
|
|
102
|
+
export default TooltipControl;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { styled, css } from "../../../build/utils/styled.js";
|
|
2
|
+
import themeGet from "../../utils/theme-get.js";
|
|
3
|
+
import { Box } from "../box/index.js";
|
|
4
|
+
const ARROW_WIDTH = 7;
|
|
5
|
+
const topCSS = css`
|
|
6
|
+
margin-top: -${props => props.isVisible ? themeGet('space', 'lg')(props) : '0px'};
|
|
7
|
+
|
|
8
|
+
&::after, &::before {
|
|
9
|
+
top: 100%;
|
|
10
|
+
left: 50%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&::after {
|
|
14
|
+
margin-left: -${ARROW_WIDTH}px;
|
|
15
|
+
border-color: ${themeGet('colors', 'grey20')} transparent transparent transparent;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&::before {
|
|
19
|
+
margin-left: -${ARROW_WIDTH - 1}px;
|
|
20
|
+
border-color: ${themeGet('colors', 'highlight')} transparent transparent transparent;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const bottomCSS = css`
|
|
24
|
+
margin-top: ${props => props.isVisible ? themeGet('space', 'lg')(props) : '0px'};
|
|
25
|
+
|
|
26
|
+
&::after, &::before {
|
|
27
|
+
bottom: 100%;
|
|
28
|
+
left: 50%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&::after {
|
|
32
|
+
margin-left: -${ARROW_WIDTH}px;
|
|
33
|
+
border-color: transparent transparent ${themeGet('colors', 'grey20')} transparent;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&::before {
|
|
37
|
+
margin-left: -${ARROW_WIDTH - 1}px;
|
|
38
|
+
border-color: transparent transparent ${themeGet('colors', 'highlight')} transparent;
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
const leftCSS = css`
|
|
42
|
+
margin-left: -${props => props.isVisible ? themeGet('space', 'lg')(props) : '0px'};
|
|
43
|
+
|
|
44
|
+
&::after, &::before {
|
|
45
|
+
left: 100%;
|
|
46
|
+
top: 50%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&::after {
|
|
50
|
+
margin-right: -${ARROW_WIDTH}px;
|
|
51
|
+
margin-top: -${ARROW_WIDTH}px;
|
|
52
|
+
border-color: transparent transparent transparent ${themeGet('colors', 'grey20')};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&::before {
|
|
56
|
+
margin-right: -${ARROW_WIDTH - 1}px;
|
|
57
|
+
margin-top: -${ARROW_WIDTH - 1}px;
|
|
58
|
+
border-color: transparent transparent transparent ${themeGet('colors', 'highlight')};
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
const rightCSS = css`
|
|
62
|
+
margin-left: ${props => props.isVisible ? themeGet('space', 'lg')(props) : '0px'};
|
|
63
|
+
|
|
64
|
+
&::after, &::before {
|
|
65
|
+
right: 100%;
|
|
66
|
+
top: 50%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&::after {
|
|
70
|
+
margin-left: -${ARROW_WIDTH}px;
|
|
71
|
+
margin-top: -${ARROW_WIDTH}px;
|
|
72
|
+
border-color: transparent ${themeGet('colors', 'grey20')} transparent transparent;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&::before {
|
|
76
|
+
margin-left: -${ARROW_WIDTH - 1}px;
|
|
77
|
+
margin-top: -${ARROW_WIDTH - 1}px;
|
|
78
|
+
border-color: transparent ${themeGet('colors', 'highlight')} transparent transparent;
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
const getPadding = props => {
|
|
82
|
+
const px = props.size === 'lg' ? 'xl' : 'md';
|
|
83
|
+
const py = props.size === 'lg' ? 'lg' : 'sm';
|
|
84
|
+
return `${themeGet('space', py)(props)} ${themeGet('space', px)(props)}`;
|
|
85
|
+
};
|
|
86
|
+
const StyledTooltip = styled(Box)`
|
|
87
|
+
transition: opacity 0.2s, margin 0.2s;
|
|
88
|
+
|
|
89
|
+
position: absolute;
|
|
90
|
+
|
|
91
|
+
opacity: ${({
|
|
92
|
+
isVisible
|
|
93
|
+
}) => isVisible ? '1' : '0'};
|
|
94
|
+
|
|
95
|
+
padding: ${props => getPadding(props)};
|
|
96
|
+
|
|
97
|
+
pointer-events: none;
|
|
98
|
+
|
|
99
|
+
&::after {
|
|
100
|
+
content: " ";
|
|
101
|
+
position: absolute;
|
|
102
|
+
border-style: solid;
|
|
103
|
+
border-width: 7px;
|
|
104
|
+
z-index: 1;
|
|
105
|
+
}
|
|
106
|
+
&::before {
|
|
107
|
+
content: " ";
|
|
108
|
+
position: absolute;
|
|
109
|
+
border-style: solid;
|
|
110
|
+
border-width: 6px;
|
|
111
|
+
z-index: 2;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
${props => ({
|
|
115
|
+
top: topCSS,
|
|
116
|
+
bottom: bottomCSS,
|
|
117
|
+
left: leftCSS,
|
|
118
|
+
right: rightCSS
|
|
119
|
+
})[props.direction]}
|
|
120
|
+
`;
|
|
121
|
+
StyledTooltip.defaultProps = {
|
|
122
|
+
borderColor: 'grey20',
|
|
123
|
+
borderStyle: 'solid',
|
|
124
|
+
borderWidth: '1px',
|
|
125
|
+
bg: 'highlight',
|
|
126
|
+
borderRadius: '3px'
|
|
127
|
+
};
|
|
128
|
+
export default StyledTooltip;
|
|
129
|
+
export { StyledTooltip };
|