@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,169 @@
|
|
|
1
|
+
import React, { ChangeEvent, useEffect, useState } from 'react'
|
|
2
|
+
import { styled, css } from '@styled-components'
|
|
3
|
+
|
|
4
|
+
import focusShadowStyle from '../../utils/focus-shadow.style.js'
|
|
5
|
+
import { Label } from '../label/index.js'
|
|
6
|
+
|
|
7
|
+
const Icon = styled.svg`
|
|
8
|
+
fill: none;
|
|
9
|
+
stroke: white;
|
|
10
|
+
stroke-width: 2px;
|
|
11
|
+
`
|
|
12
|
+
|
|
13
|
+
export const CheckboxRadioContainer = styled.span`
|
|
14
|
+
position: relative;
|
|
15
|
+
display: inline-block;
|
|
16
|
+
vertical-align: middle;
|
|
17
|
+
& + ${Label} {
|
|
18
|
+
margin-left: ${({ theme }) => theme.space.default};
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
margin-bottom: ${({ theme }) => theme.space.sm};
|
|
21
|
+
}
|
|
22
|
+
`
|
|
23
|
+
|
|
24
|
+
// Hide checkbox visually but remain accessible to screen readers.
|
|
25
|
+
// Source: https://polished.js.org/docs/#hidevisually
|
|
26
|
+
const HiddenCheckbox = styled.input.attrs({ type: 'checkbox' })`
|
|
27
|
+
border: 0;
|
|
28
|
+
clip: rect(0 0 0 0);
|
|
29
|
+
height: 1px;
|
|
30
|
+
margin: -1px;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
padding: 0;
|
|
33
|
+
position: absolute;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
width: 1px;
|
|
36
|
+
`
|
|
37
|
+
|
|
38
|
+
type StyledProps = {
|
|
39
|
+
checked?: boolean;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const checkboxBackground = (theme, checked, disabled): string => {
|
|
44
|
+
if (checked) {
|
|
45
|
+
return disabled ? theme.colors.grey40 : theme.colors.primary100
|
|
46
|
+
}
|
|
47
|
+
return 'transparent'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const StyledCheckbox = styled.a<StyledProps>`
|
|
51
|
+
display: inline-block;
|
|
52
|
+
width: 16px;
|
|
53
|
+
/* when it is placed within a container setting different font size */
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
border: 1px solid ${({ theme, checked, disabled }): string => (checked && !disabled ? theme.colors.primary100 : theme.colors.inputBorder)};
|
|
56
|
+
height: 16px;
|
|
57
|
+
background: ${({ checked, theme, disabled }): string => checkboxBackground(theme, checked, disabled)};
|
|
58
|
+
transition: all 150ms;
|
|
59
|
+
position: relative;
|
|
60
|
+
border-radius: 2px;
|
|
61
|
+
|
|
62
|
+
${HiddenCheckbox}:focus + & {
|
|
63
|
+
${({ theme }) => `box-shadow: ${focusShadowStyle(theme)};`};
|
|
64
|
+
}
|
|
65
|
+
${HiddenCheckbox}:hover + & {
|
|
66
|
+
border-color: ${({ theme }) => theme.colors.grey60};
|
|
67
|
+
}
|
|
68
|
+
${Icon} {
|
|
69
|
+
visibility: ${(props): string => (props.checked ? 'visible' : 'hidden')};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
${({ disabled }) => (!disabled && css`
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
`)}
|
|
75
|
+
|
|
76
|
+
&:after {
|
|
77
|
+
content: '';
|
|
78
|
+
position: absolute;
|
|
79
|
+
left: -5px;
|
|
80
|
+
top: -5px;
|
|
81
|
+
width: 24px;
|
|
82
|
+
height: 24px;
|
|
83
|
+
opacity: 0;
|
|
84
|
+
background: ${({ theme }) => theme.colors.primary100};
|
|
85
|
+
}
|
|
86
|
+
&:after:before {
|
|
87
|
+
opacity: 0.1;
|
|
88
|
+
}
|
|
89
|
+
`
|
|
90
|
+
|
|
91
|
+
export type CheckBoxProps = React.HTMLProps<HTMLInputElement>
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @typedef {object} CheckBoxProps
|
|
95
|
+
* @alias CheckBoxProps
|
|
96
|
+
* @memberof module:@adminjs/design-system.CheckBox
|
|
97
|
+
* @property {string} [...] All props default to _checkbox_ html input like `onChange`,
|
|
98
|
+
* `checked` etc.
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @classdesc
|
|
103
|
+
*
|
|
104
|
+
* <img src="components/checkbox.png" />
|
|
105
|
+
*
|
|
106
|
+
* HTML CheckBox
|
|
107
|
+
*
|
|
108
|
+
* ### Usage
|
|
109
|
+
*
|
|
110
|
+
* ```javascript
|
|
111
|
+
* import { CheckBox, CheckBoxProps } from '@adminjs/design-system'
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @component
|
|
115
|
+
* @see {@link https://storybook.adminjs.co/?path=/story/designsystem-atoms-checkbox--default StoryBook}
|
|
116
|
+
* @hideconstructor
|
|
117
|
+
* @subcategory Atoms
|
|
118
|
+
* @example
|
|
119
|
+
* return (
|
|
120
|
+
* <Box p="xl">
|
|
121
|
+
* <CheckBox id="checkbox1"/>
|
|
122
|
+
* <Label inline htmlFor="checkbox1" ml="default">Some example label</Label>
|
|
123
|
+
* </Box>
|
|
124
|
+
* )
|
|
125
|
+
* @section design-system
|
|
126
|
+
*/
|
|
127
|
+
const CheckBox: React.FC<CheckBoxProps> = (props) => {
|
|
128
|
+
const { className, checked, onChange, disabled, ...restProps } = props
|
|
129
|
+
|
|
130
|
+
const [isChecked, setChecked] = useState(checked ?? false)
|
|
131
|
+
const handleChange = (event: ChangeEvent<HTMLInputElement>): void => {
|
|
132
|
+
if (disabled) return
|
|
133
|
+
if (onChange) {
|
|
134
|
+
onChange(event)
|
|
135
|
+
} else {
|
|
136
|
+
setChecked(!event.target.checked)
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
setChecked(checked ?? false)
|
|
142
|
+
}, [checked])
|
|
143
|
+
|
|
144
|
+
return (
|
|
145
|
+
<CheckboxRadioContainer className={[className ?? '', 'adminjs_Checkbox'].join(' ')}>
|
|
146
|
+
<HiddenCheckbox
|
|
147
|
+
checked={isChecked}
|
|
148
|
+
onChange={handleChange}
|
|
149
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
150
|
+
{...restProps as {}}
|
|
151
|
+
disabled={disabled}
|
|
152
|
+
/>
|
|
153
|
+
<StyledCheckbox
|
|
154
|
+
checked={isChecked}
|
|
155
|
+
disabled={disabled}
|
|
156
|
+
onClick={(event): void => handleChange && handleChange(event as any)}
|
|
157
|
+
>
|
|
158
|
+
<Icon viewBox="0 0 24 24">
|
|
159
|
+
<polyline points="20 6 9 17 4 12" />
|
|
160
|
+
</Icon>
|
|
161
|
+
</StyledCheckbox>
|
|
162
|
+
</CheckboxRadioContainer>
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
CheckBox.displayName = 'CheckBox'
|
|
167
|
+
|
|
168
|
+
export { CheckBox }
|
|
169
|
+
export default CheckBox
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './check-box.jsx'
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Meta, StoryFn, StoryObj } from '@storybook/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { FormGroup } from '../../index.js'
|
|
5
|
+
import StoryWrapper from '../../utils/story-wrapper.jsx'
|
|
6
|
+
import { Box, Button } from '../index.js'
|
|
7
|
+
import { CurrencyInput } from './index.js'
|
|
8
|
+
|
|
9
|
+
export const Default: StoryObj = {
|
|
10
|
+
render: (props) => (
|
|
11
|
+
<Box width={1}>
|
|
12
|
+
<StoryWrapper label="Currency input example">
|
|
13
|
+
<FormGroup>
|
|
14
|
+
<CurrencyInput {...props} />
|
|
15
|
+
<Button type="submit" mt="lg">Submit</Button>
|
|
16
|
+
</FormGroup>
|
|
17
|
+
</StoryWrapper>
|
|
18
|
+
</Box>
|
|
19
|
+
),
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const Examples: StoryFn = () => (
|
|
23
|
+
<Box width={1}>
|
|
24
|
+
<StoryWrapper label="Euro input">
|
|
25
|
+
<CurrencyInput
|
|
26
|
+
id="input1"
|
|
27
|
+
placeholder="Simple input field..."
|
|
28
|
+
intlConfig={{ locale: 'de-DE', currency: 'EUR' }}
|
|
29
|
+
/>
|
|
30
|
+
</StoryWrapper>
|
|
31
|
+
</Box>
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
const meta: Meta<typeof CurrencyInput> = {
|
|
35
|
+
title: 'DesignSystem/Atoms/CurrencyInput',
|
|
36
|
+
component: CurrencyInput,
|
|
37
|
+
args: {
|
|
38
|
+
variant: 'default',
|
|
39
|
+
borderless: false,
|
|
40
|
+
disabled: false,
|
|
41
|
+
prefix: '$',
|
|
42
|
+
suffix: '',
|
|
43
|
+
decimalSeparator: '.',
|
|
44
|
+
groupSeparator: ' ',
|
|
45
|
+
allowDecimals: true,
|
|
46
|
+
width: 1 / 2,
|
|
47
|
+
decimalsLimit: 2,
|
|
48
|
+
},
|
|
49
|
+
argTypes: {
|
|
50
|
+
variant: { options: ['sm', 'lg', 'xl', 'default'], control: { type: 'select' } },
|
|
51
|
+
borderless: { control: { type: 'boolean' } },
|
|
52
|
+
disabled: { control: { type: 'boolean' } },
|
|
53
|
+
width: {
|
|
54
|
+
control: {
|
|
55
|
+
type: 'number',
|
|
56
|
+
min: 0,
|
|
57
|
+
max: 1,
|
|
58
|
+
step: 0.1,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
prefix: { control: { type: 'text' } },
|
|
62
|
+
suffix: { control: { type: 'text' } },
|
|
63
|
+
decimalSeparator: { control: { type: 'text' } },
|
|
64
|
+
groupSeparator: { control: { type: 'text' } },
|
|
65
|
+
allowDecimals: { control: { type: 'boolean' } },
|
|
66
|
+
decimalsLimit: {
|
|
67
|
+
control: {
|
|
68
|
+
type: 'number',
|
|
69
|
+
min: 0,
|
|
70
|
+
max: 5,
|
|
71
|
+
step: 1,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export default meta
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { space, typography, layout, TypographyProps } from 'styled-system'
|
|
2
|
+
import CurrencyInputFieldLib, {
|
|
3
|
+
CurrencyInputProps as CurrencyInputFieldProps,
|
|
4
|
+
formatValue as formatCurrencyProperty,
|
|
5
|
+
} from 'react-currency-input-field'
|
|
6
|
+
import { styled } from '@styled-components'
|
|
7
|
+
|
|
8
|
+
import { InputCSS, InputProps } from '../input/index.js'
|
|
9
|
+
import { cssClass } from '../../utils/css-class.js'
|
|
10
|
+
|
|
11
|
+
const CurrencyInputField = (CurrencyInputFieldLib as any).default ?? CurrencyInputFieldLib
|
|
12
|
+
const CurrencyInputComponent = CurrencyInputField.default ?? CurrencyInputField
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Prop Types of a CurrencyInput component.
|
|
16
|
+
* CurrencyInput is based on `react-currency-input-field` @see {@link https://github.com/cchanxzy/react-currency-input-field React Currency Input Field Component}
|
|
17
|
+
* It extends all {@link SpaceProps}, {@link TypographyProps} and {@link LayoutProps} and {@link https://github.com/cchanxzy/react-currency-input-field#props React Currency Input Field Component Props}
|
|
18
|
+
* @memberof CurrencyInput
|
|
19
|
+
* @alias CurrencyInputProps
|
|
20
|
+
* @property {string} [...] All props default to _currencyinput_ html component like `onChange`,
|
|
21
|
+
* `value` etc.
|
|
22
|
+
* @property {string} [...] Props from {@link SpaceProps}, {@link TypographyProps}
|
|
23
|
+
* and {@link LayoutProps} + they extend {@link InputProps}
|
|
24
|
+
*/
|
|
25
|
+
export type CurrencyInputProps = TypographyProps &
|
|
26
|
+
InputProps &
|
|
27
|
+
CurrencyInputFieldProps
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @classdesc
|
|
31
|
+
*
|
|
32
|
+
* <img src="components/currency-input.png" />
|
|
33
|
+
*
|
|
34
|
+
* Wrapped `currencyinput` html element.
|
|
35
|
+
*
|
|
36
|
+
* ### Usage
|
|
37
|
+
*
|
|
38
|
+
* ```ts
|
|
39
|
+
* import { CurrencyInput, CurrencyInputProps } from '@adminjs/design-system'
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @component
|
|
43
|
+
* @subcategory Atoms
|
|
44
|
+
* @see {@link https://storybook.adminjs.co/?path=/story/designsystem-atoms-currencyinput--default Storybook}
|
|
45
|
+
* @see CurrencyInputProps
|
|
46
|
+
* @hideconstructor
|
|
47
|
+
* @example
|
|
48
|
+
* return (
|
|
49
|
+
* <Box p="xl">
|
|
50
|
+
* <Label htmlFor="currencyinput1">Some example label</Label>
|
|
51
|
+
* <CurrencyInput id="currencyinput1" intlConfig={{ locale: 'en-US', currency: 'GBP' }} />;
|
|
52
|
+
* </Box>
|
|
53
|
+
* )
|
|
54
|
+
* @section design-system
|
|
55
|
+
*/
|
|
56
|
+
const CurrencyInput = styled(CurrencyInputComponent)<CurrencyInputProps>`
|
|
57
|
+
${InputCSS}
|
|
58
|
+
${space};
|
|
59
|
+
${layout};
|
|
60
|
+
${typography};
|
|
61
|
+
|
|
62
|
+
width: 100%;
|
|
63
|
+
`
|
|
64
|
+
|
|
65
|
+
CurrencyInput.defaultProps = {
|
|
66
|
+
px: 'default',
|
|
67
|
+
py: 'sm',
|
|
68
|
+
className: cssClass('CurrencyInput'),
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
CurrencyInput.displayName = 'CurrencyInput'
|
|
72
|
+
|
|
73
|
+
export { CurrencyInput, formatCurrencyProperty }
|
|
74
|
+
export default CurrencyInput
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './currency-input.jsx'
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Meta, StoryFn, StoryObj } from '@storybook/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import * as FeatherIcons from 'react-feather'
|
|
4
|
+
|
|
5
|
+
import { Box, Label } from '../index.js'
|
|
6
|
+
import { Icon } from './icon.js'
|
|
7
|
+
|
|
8
|
+
const icons = Object.keys(FeatherIcons).filter((name) => name !== 'default')
|
|
9
|
+
|
|
10
|
+
export const Default: StoryObj = {}
|
|
11
|
+
|
|
12
|
+
export const Icons: StoryFn = () => (
|
|
13
|
+
<Box display="grid" style={{ gridTemplateColumns: 'repeat(10, 1fr)', gap: 16 }}>
|
|
14
|
+
{icons.map((key) => (
|
|
15
|
+
<Box key={key} flex alignItems="center" flexDirection="column">
|
|
16
|
+
<Label>{key}</Label>
|
|
17
|
+
<Icon icon={key} size={24} />
|
|
18
|
+
</Box>
|
|
19
|
+
))}
|
|
20
|
+
</Box>
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
const meta: Meta<typeof Icon> = {
|
|
24
|
+
title: 'DesignSystem/Atoms/Icon',
|
|
25
|
+
component: Icon,
|
|
26
|
+
args: {
|
|
27
|
+
icon: icons[0],
|
|
28
|
+
size: 48,
|
|
29
|
+
rounded: false,
|
|
30
|
+
spin: false,
|
|
31
|
+
},
|
|
32
|
+
argTypes: {
|
|
33
|
+
icon: {
|
|
34
|
+
description: 'CamelCased name of an icon from https://www.npmjs.com/package/react-feather',
|
|
35
|
+
control: { type: 'select' },
|
|
36
|
+
options: icons,
|
|
37
|
+
},
|
|
38
|
+
size: { control: { type: 'number', min: 16, max: 48, step: 4 } },
|
|
39
|
+
color: { control: { type: 'color' } },
|
|
40
|
+
bg: { control: { type: 'color' } },
|
|
41
|
+
rounded: { control: { type: 'boolean' } },
|
|
42
|
+
spin: { control: { type: 'boolean' } },
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default meta
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import * as FeatherIcons from 'react-feather'
|
|
3
|
+
import {
|
|
4
|
+
SpaceProps,
|
|
5
|
+
space,
|
|
6
|
+
color as styledColor,
|
|
7
|
+
BorderRadiusProps,
|
|
8
|
+
borderRadius,
|
|
9
|
+
} from 'styled-system'
|
|
10
|
+
import { styled, css } from '@styled-components'
|
|
11
|
+
|
|
12
|
+
import { NewColorProps as ColorProps } from '../../utils/color-props.js'
|
|
13
|
+
import { cssClass } from '../../utils/css-class.js'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Prop Types of an Icon component.
|
|
17
|
+
* Apart from props defined below it extends all {@link ColorProps} and {@link SpaceProps}
|
|
18
|
+
*
|
|
19
|
+
* @memberof Icon
|
|
20
|
+
* @alias IconProps
|
|
21
|
+
* @property {string} [...] Other props from {@link ColorProps} and {@link SpaceProps}
|
|
22
|
+
*/
|
|
23
|
+
export type IconProps = SpaceProps &
|
|
24
|
+
BorderRadiusProps &
|
|
25
|
+
ColorProps & {
|
|
26
|
+
/**
|
|
27
|
+
* CamelCased name of an icon from https://feathericons.com/
|
|
28
|
+
*/
|
|
29
|
+
icon?: keyof typeof FeatherIcons | string
|
|
30
|
+
/**
|
|
31
|
+
* Size variant. Default to 16
|
|
32
|
+
*/
|
|
33
|
+
size?: number
|
|
34
|
+
/**
|
|
35
|
+
* Icon color
|
|
36
|
+
*/
|
|
37
|
+
color?: string
|
|
38
|
+
/**
|
|
39
|
+
* Icon background
|
|
40
|
+
*/
|
|
41
|
+
bg?: string
|
|
42
|
+
/**
|
|
43
|
+
* If background should be rounded
|
|
44
|
+
*/
|
|
45
|
+
rounded?: boolean
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Indicates if given icons should spin
|
|
49
|
+
*/
|
|
50
|
+
spin?: boolean
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const spinCss = css`
|
|
54
|
+
@keyframes iconSpin {
|
|
55
|
+
from {
|
|
56
|
+
transform: rotate(0deg);
|
|
57
|
+
}
|
|
58
|
+
to {
|
|
59
|
+
transform: rotate(360deg);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
animation-name: iconSpin;
|
|
64
|
+
animation-duration: 1000ms;
|
|
65
|
+
animation-iteration-count: infinite;
|
|
66
|
+
animation-timing-function: linear;
|
|
67
|
+
`
|
|
68
|
+
|
|
69
|
+
const Wrapper = styled.span<IconProps>`
|
|
70
|
+
vertical-align: middle;
|
|
71
|
+
display: inline-block;
|
|
72
|
+
line-height: ${({ theme }) => theme.lineHeights.sm};
|
|
73
|
+
font-size: ${({ theme }) => theme.fontSizes.sm};
|
|
74
|
+
|
|
75
|
+
& > svg {
|
|
76
|
+
stroke: ${({ theme, color }) => (color && color !== 'inherit' ? theme.colors[color] : 'currentColor')};
|
|
77
|
+
${({ spin }) => (spin ? spinCss : '')};
|
|
78
|
+
}
|
|
79
|
+
${({ rounded }) => (rounded ? 'border-radius: 9999px;' : '')};
|
|
80
|
+
${space};
|
|
81
|
+
${styledColor};
|
|
82
|
+
${borderRadius}
|
|
83
|
+
`
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @classdesc
|
|
87
|
+
*
|
|
88
|
+
* <img src="components/icon.png" />
|
|
89
|
+
*
|
|
90
|
+
* Component wrapping [react-feather](https://www.npmjs.com/package/react-feather).
|
|
91
|
+
* List of all icons can be found here: https://feathericons.com/
|
|
92
|
+
* If you have problem verifying the key of given icon - you can always open the
|
|
93
|
+
* Chrome Terminal (with AdminJS open) and write there:
|
|
94
|
+
*
|
|
95
|
+
* ```
|
|
96
|
+
* Object.keys(window.FeatherIcons)
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* to see list of all available icon keys.
|
|
100
|
+
*
|
|
101
|
+
* ### Usage
|
|
102
|
+
*
|
|
103
|
+
* ```javascript
|
|
104
|
+
* import { Icon, IconProps } from '@adminjs/design-system'
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* @component
|
|
108
|
+
* @subcategory Atoms
|
|
109
|
+
* @see IconProps
|
|
110
|
+
* @see {@link https://storybook.adminjs.co/?path=/story/designsystem-atoms-icon--default Storybook}
|
|
111
|
+
* @hideconstructor
|
|
112
|
+
* @example <caption>Icons inside other elements</caption>
|
|
113
|
+
* return (
|
|
114
|
+
* <Box variant="grey">
|
|
115
|
+
* <Label mb="default"><Icon icon="Camera" />Icon in Label</Label>
|
|
116
|
+
* <Button><Icon icon="Camera" />Icon in button</Button>
|
|
117
|
+
* </Box>
|
|
118
|
+
* )
|
|
119
|
+
* @example <caption>Different sizes</caption>
|
|
120
|
+
* const sizes = [16, 20, 24, 32]
|
|
121
|
+
* return (
|
|
122
|
+
* <Box variant="grey">
|
|
123
|
+
* {sizes.map(size => (
|
|
124
|
+
* <Label m="default"><Icon icon="Camera" size={size}/>Icon {size}</Label>
|
|
125
|
+
* ))}
|
|
126
|
+
* </Box>
|
|
127
|
+
* )
|
|
128
|
+
*
|
|
129
|
+
* @example <caption>Big rounded icon with background</caption>
|
|
130
|
+
* return (
|
|
131
|
+
* <Box variant="grey">
|
|
132
|
+
* <Icon icon="Plus" color="white" bg="primary100" rounded size={32} p="default"/>
|
|
133
|
+
* </Box>
|
|
134
|
+
* )
|
|
135
|
+
* @section design-system
|
|
136
|
+
*/
|
|
137
|
+
const Icon: React.FC<IconProps> = (props) => {
|
|
138
|
+
const { icon, size = 16, color = 'inherit', ...other } = props
|
|
139
|
+
|
|
140
|
+
if (!icon) return null
|
|
141
|
+
|
|
142
|
+
const FeatherIcon = FeatherIcons[icon] || FeatherIcons.Slash
|
|
143
|
+
|
|
144
|
+
if (FeatherIcon) {
|
|
145
|
+
return (
|
|
146
|
+
<Wrapper icon={icon} className={cssClass('Icon')} {...other} color={color}>
|
|
147
|
+
<FeatherIcon size={size} color={color} />
|
|
148
|
+
</Wrapper>
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
return null
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export { Icon }
|
|
155
|
+
export default Icon
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './icon.jsx'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Meta, StoryFn, StoryObj } from '@storybook/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import * as illustrations from '../illustrations/index.js'
|
|
5
|
+
import { Box, Label } from '../index.js'
|
|
6
|
+
import { Illustration, IllustrationProps, IllustrationVariant } from './index.js'
|
|
7
|
+
|
|
8
|
+
const illustrationVariants = Object.keys(illustrations) as IllustrationVariant[]
|
|
9
|
+
|
|
10
|
+
export const Default: StoryObj<IllustrationProps> = {
|
|
11
|
+
render: ({ variant }) => <Illustration variant={variant} />,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const Illustrations: StoryFn = () => (
|
|
15
|
+
<Box display="grid" style={{ gridTemplateColumns: 'repeat(4, 1fr)', gap: 16 }}>
|
|
16
|
+
{illustrationVariants.map((key) => (
|
|
17
|
+
<Box key={key} flex alignItems="center" flexDirection="column">
|
|
18
|
+
<Label>{key}</Label>
|
|
19
|
+
<Illustration variant={key} width={150} height={150} />
|
|
20
|
+
</Box>
|
|
21
|
+
))}
|
|
22
|
+
</Box>
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
const meta: Meta<typeof Illustration> = {
|
|
26
|
+
title: 'DesignSystem/Atoms/Illustration',
|
|
27
|
+
args: {
|
|
28
|
+
variant: illustrationVariants[0],
|
|
29
|
+
width: 150,
|
|
30
|
+
height: 150,
|
|
31
|
+
},
|
|
32
|
+
argTypes: {
|
|
33
|
+
variant: { options: illustrationVariants, control: { type: 'select' } },
|
|
34
|
+
width: { control: { type: 'number' } },
|
|
35
|
+
height: { control: { type: 'number' } },
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default meta
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react'
|
|
2
|
+
import { styled } from '@styled-components'
|
|
3
|
+
|
|
4
|
+
import { cssClass } from '../../utils/index.js'
|
|
5
|
+
import * as Illustrations from '../illustrations/index.js'
|
|
6
|
+
|
|
7
|
+
export type IllustrationVariant = keyof typeof Illustrations
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @memberof Illustration
|
|
11
|
+
* @alias IllustrationProps
|
|
12
|
+
*/
|
|
13
|
+
export type IllustrationProps = {
|
|
14
|
+
/** Available illustration variant */
|
|
15
|
+
variant: IllustrationVariant
|
|
16
|
+
/** Optional max width restrictions */
|
|
17
|
+
width?: number
|
|
18
|
+
/** Optional max height restrictions */
|
|
19
|
+
height?: number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const Wrapper = styled.div.attrs((props) => ({
|
|
23
|
+
className: cssClass('Illustration', props.className),
|
|
24
|
+
}))`
|
|
25
|
+
[fill='#3040D6'] {
|
|
26
|
+
fill: ${({ theme }) => theme.colors.primary100};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[stroke='#3B3552'] {
|
|
30
|
+
stroke: ${({ theme }) => theme.colors.accent};
|
|
31
|
+
}
|
|
32
|
+
`
|
|
33
|
+
|
|
34
|
+
type RawIllustrationType = IllustrationProps & PropsWithChildren
|
|
35
|
+
|
|
36
|
+
const RawIllustration: React.FC<RawIllustrationType> = (props) => {
|
|
37
|
+
const { variant, ...other } = props
|
|
38
|
+
const IllustrationComponent = Illustrations[variant]
|
|
39
|
+
return (
|
|
40
|
+
<Wrapper>
|
|
41
|
+
<IllustrationComponent {...other} />
|
|
42
|
+
</Wrapper>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @classdesc
|
|
48
|
+
*
|
|
49
|
+
* <img src="components/illustration.png" />
|
|
50
|
+
*
|
|
51
|
+
* Awesome database with all the illustrations provided with AdminJS.
|
|
52
|
+
*
|
|
53
|
+
*
|
|
54
|
+
* ### Usage
|
|
55
|
+
*
|
|
56
|
+
* ```javascript
|
|
57
|
+
* import { Illustration, IllustrationProps } from '@adminjs/design-system'
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @component
|
|
61
|
+
* @subcategory Atoms
|
|
62
|
+
* @see IllustrationProps
|
|
63
|
+
* @see {@link https://storybook.adminjs.co/?path=/story/designsystem-atoms-illustration--default Storybook}
|
|
64
|
+
* @hideconstructor
|
|
65
|
+
*
|
|
66
|
+
* @example <caption>Folders</caption>
|
|
67
|
+
* return (
|
|
68
|
+
* <Illustration variant="Folders" />
|
|
69
|
+
* )
|
|
70
|
+
* @example <caption>DocumentSearch</caption>
|
|
71
|
+
* return (
|
|
72
|
+
* <Illustration variant="DocumentSearch" />
|
|
73
|
+
* )
|
|
74
|
+
* @example <caption>Rocket</caption>
|
|
75
|
+
* return (
|
|
76
|
+
* <Box bg="grey100" p="xxl"><Illustration variant="Rocket" /></Box>
|
|
77
|
+
* )
|
|
78
|
+
* @section design-system
|
|
79
|
+
*/
|
|
80
|
+
export const Illustration = RawIllustration
|
|
81
|
+
|
|
82
|
+
Illustration.displayName = 'Illustration'
|
|
83
|
+
|
|
84
|
+
export default Illustration
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './illustration.jsx'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { Props } from './props.type.js'
|
|
4
|
+
|
|
5
|
+
export const Accept: React.FC<Props> = ({ width = 152, height = 152 }) => (
|
|
6
|
+
<svg width={width} height={height} viewBox="0 0 152 152" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
|
+
<circle cx="76" cy="76" r="76" fill="white" />
|
|
8
|
+
<circle cx="106.552" cy="54.4483" r="17.4483" fill="#3040D6" />
|
|
9
|
+
<circle cx="75.4483" cy="76.4483" r="39.4483" fill="white" stroke="#3B3552" strokeWidth="1.5" />
|
|
10
|
+
<path d="M91.3957 102.098L90.7592 102.495L91.1558 103.131L91.7924 102.735L91.3957 102.098ZM98.8131 95.5823L99.3931 96.0578L99.8686 95.4778L99.2886 95.0023L98.8131 95.5823ZM90.6025 100.825L90.2059 100.188L89.5694 100.585L89.966 101.221L90.6025 100.825ZM97.6531 94.6313L98.1286 94.0513L97.5486 93.5758L97.0731 94.1558L97.6531 94.6313ZM104.196 85.7222L104.91 85.9523V85.9523L104.196 85.7222ZM105.647 76.4492H106.397V75.6992H105.647V76.4492ZM101.435 91.8411L101.052 92.486L101.697 92.8688L102.08 92.2239L101.435 91.8411ZM100.145 91.0755L99.5001 90.6926L99.1173 91.3376L99.7623 91.7204L100.145 91.0755ZM102.768 85.262L102.054 85.0319L102.768 85.262ZM104.147 76.4492V75.6992H103.397V76.4492H104.147ZM91.7924 102.735C94.6786 100.936 97.2465 98.6763 99.3931 96.0578L98.2331 95.1068C96.1899 97.5992 93.7457 99.7502 90.9991 101.461L91.7924 102.735ZM89.966 101.221L90.7592 102.495L92.0323 101.701L91.2391 100.428L89.966 101.221ZM97.0731 94.1558C95.1332 96.5221 92.8128 98.5641 90.2059 100.188L90.9991 101.461C93.7457 99.7502 96.1899 97.5992 98.2331 95.1068L97.0731 94.1558ZM99.2886 95.0023L98.1286 94.0513L97.1776 95.2113L98.3376 96.1623L99.2886 95.0023ZM104.91 85.9523C105.876 82.9561 106.397 79.7621 106.397 76.4492H104.897C104.897 79.604 104.401 82.6429 103.482 85.4921L104.91 85.9523ZM102.08 92.2239C103.244 90.263 104.198 88.162 104.91 85.9523L103.482 85.4921C102.805 87.5939 101.897 89.5925 100.79 91.4583L102.08 92.2239ZM99.7623 91.7204L101.052 92.486L101.818 91.1961L100.528 90.4305L99.7623 91.7204ZM102.054 85.0319C101.412 87.0257 100.551 88.922 99.5001 90.6926L100.79 91.4583C101.897 89.5925 102.805 87.5939 103.482 85.4921L102.054 85.0319ZM103.397 76.4492C103.397 79.4459 102.926 82.3296 102.054 85.0319L103.482 85.4921C104.401 82.6429 104.897 79.604 104.897 76.4492H103.397ZM105.647 75.6992H104.147V77.1992H105.647V75.6992Z" fill="#3B3552" />
|
|
11
|
+
<path d="M58.3015 32.4619L59.0002 32.1893L58.7277 31.4906L58.029 31.7632L58.3015 32.4619ZM41.5051 43.6534L40.9658 43.1322L40.4446 43.6715L40.9839 44.1927L41.5051 43.6534ZM58.8467 33.8593L59.1192 34.5581L59.8179 34.2855L59.5454 33.5868L58.8467 33.8593ZM42.5837 44.6957L42.0625 45.2351L42.6018 45.7562L43.123 45.2169L42.5837 44.6957ZM36.8518 49.2761L37.2841 48.6632L36.6712 48.2309L36.2389 48.8438L36.8518 49.2761ZM31.3804 59.5114L30.6804 59.2422L30.4111 59.9422L31.1112 60.2114L31.3804 59.5114ZM38.0776 50.1406L38.6905 50.5729L39.1228 49.96L38.5099 49.5277L38.0776 50.1406ZM32.7804 60.0498L32.5112 60.7499L33.2112 61.0191L33.4804 60.3191L32.7804 60.0498ZM58.029 31.7632C51.5321 34.2976 45.7255 38.2069 40.9658 43.1322L42.0444 44.1746C46.6565 39.4021 52.2819 35.6152 58.5741 33.1606L58.029 31.7632ZM59.5454 33.5868L59.0002 32.1893L57.6028 32.7345L58.1479 34.1319L59.5454 33.5868ZM43.123 45.2169C47.5874 40.5973 53.0317 36.9328 59.1192 34.5581L58.5741 33.1606C52.2819 35.6152 46.6565 39.4021 42.0444 44.1746L43.123 45.2169ZM40.9839 44.1927L42.0625 45.2351L43.1049 44.1564L42.0263 43.114L40.9839 44.1927ZM36.2389 48.8438C33.9826 52.043 32.1076 55.5311 30.6804 59.2422L32.0804 59.7806C33.4626 56.1865 35.2788 52.8077 37.4647 49.7084L36.2389 48.8438ZM38.5099 49.5277L37.2841 48.6632L36.4196 49.889L37.6454 50.7535L38.5099 49.5277ZM33.4804 60.3191C34.8177 56.8419 36.575 53.5725 38.6905 50.5729L37.4647 49.7084C35.2788 52.8077 33.4626 56.1865 32.0804 59.7806L33.4804 60.3191ZM31.1112 60.2114L32.5112 60.7499L33.0496 59.3498L31.6496 58.8114L31.1112 60.2114Z" fill="#3B3552" />
|
|
12
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M94.4566 55.3952C93.9524 52.5885 97.1355 50.5591 99.2233 52.5014C101.189 54.33 103.108 56.332 104.211 58.0528C107.613 63.3618 109.586 69.675 109.586 76.449C109.586 95.3028 94.3022 110.587 75.4484 110.587C72.1858 110.587 67.9237 109.35 64.2042 107.98C61.4858 106.979 61.9438 103.2 64.7455 102.464C66.6153 101.972 68.4144 101.416 69.7243 100.833C84.7188 94.1575 95.1725 79.1275 95.1725 61.6559C95.1725 59.9413 94.8626 57.6549 94.4566 55.3952Z" fill="#3040D6" fillOpacity="0.05" />
|
|
13
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M56.3673 74.3156C58.1892 72.4984 61.1148 72.4529 62.9919 74.1793L63.1342 74.3156L70.7513 81.9134L89.2802 63.433C91.1021 61.6158 94.0277 61.5704 95.9048 63.2967L96.0471 63.433C97.869 65.2502 97.9146 68.1682 96.1838 70.0405L96.0471 70.1824L74.1353 92.0376C72.3134 93.8548 69.3878 93.9002 67.5107 92.1739L67.3684 92.0376L56.3673 81.065C54.4987 79.2012 54.4987 76.1794 56.3673 74.3156Z" fill="white" stroke="#3B3552" strokeWidth="1.5" />
|
|
14
|
+
</svg>
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
export default Accept
|