@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,31 @@
|
|
|
1
|
+
/* eslint-disable arrow-body-style */
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import ReactDOM from 'react-dom';
|
|
4
|
+
import generateId from "./generate-id.js";
|
|
5
|
+
|
|
6
|
+
// TODO: handle iframe case with ref.current.ownerDocument
|
|
7
|
+
export const PortalUtils = {
|
|
8
|
+
appendElement: element => {
|
|
9
|
+
window.document.body.appendChild(element);
|
|
10
|
+
},
|
|
11
|
+
removeElement: id => {
|
|
12
|
+
const domElement = window.document.getElementById(id);
|
|
13
|
+
domElement?.remove();
|
|
14
|
+
},
|
|
15
|
+
createPortalForKey: function createPortalForKey(idKey, Component) {
|
|
16
|
+
const Portal = props => {
|
|
17
|
+
const [id] = useState(generateId(idKey));
|
|
18
|
+
const [portalElement] = useState(window.document.createElement('div'));
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
portalElement.id = id;
|
|
21
|
+
PortalUtils.appendElement(portalElement);
|
|
22
|
+
return () => {
|
|
23
|
+
PortalUtils.removeElement(id);
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React.createElement(Component, props), portalElement);
|
|
27
|
+
};
|
|
28
|
+
return Portal;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export default PortalUtils;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* cSpell:disable */
|
|
2
|
+
import { css, createGlobalStyle } from "../../build/utils/styled.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Resets css styles which can be applied to element created by styled-component
|
|
6
|
+
*
|
|
7
|
+
* ### Example
|
|
8
|
+
*
|
|
9
|
+
* ```javascript
|
|
10
|
+
* import { reset } from '@adminjs/design-system'
|
|
11
|
+
*
|
|
12
|
+
* const myContentComponent = styled`
|
|
13
|
+
* ${reset};
|
|
14
|
+
* `
|
|
15
|
+
* ```
|
|
16
|
+
* @new in version 3.3
|
|
17
|
+
* @memberof module:@adminjs/design-system
|
|
18
|
+
*/
|
|
19
|
+
const reset = css`
|
|
20
|
+
/* http://meyerweb.com/eric/tools/css/reset/
|
|
21
|
+
v4.0 | 20180602
|
|
22
|
+
License: none (public domain)
|
|
23
|
+
*/
|
|
24
|
+
html, body, div, span, applet, object, iframe,
|
|
25
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
26
|
+
a, abbr, acronym, address, big, cite, code,
|
|
27
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
|
28
|
+
small, strike, strong, sub, sup, tt, var,
|
|
29
|
+
b, u, i, center,
|
|
30
|
+
dl, dt, dd, ol, ul, li,
|
|
31
|
+
fieldset, form, label, legend,
|
|
32
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
|
33
|
+
article, aside, canvas, details, embed,
|
|
34
|
+
figure, figcaption, footer, header, hgroup,
|
|
35
|
+
main, menu, nav, output, ruby, section, summary,
|
|
36
|
+
time, mark, audio, video {
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
border: 0;
|
|
40
|
+
font-size: 100%;
|
|
41
|
+
font: inherit;
|
|
42
|
+
vertical-align: baseline;
|
|
43
|
+
}
|
|
44
|
+
/* HTML5 display-role reset for older browsers */
|
|
45
|
+
article, aside, details, figcaption, figure,
|
|
46
|
+
footer, header, hgroup, main, menu, nav, section {
|
|
47
|
+
display: block;
|
|
48
|
+
}
|
|
49
|
+
/* HTML5 hidden-attribute fix for newer browsers */
|
|
50
|
+
*[hidden] {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
53
|
+
body {
|
|
54
|
+
line-height: 1;
|
|
55
|
+
}
|
|
56
|
+
ol, ul {
|
|
57
|
+
list-style: none;
|
|
58
|
+
}
|
|
59
|
+
blockquote, q {
|
|
60
|
+
quotes: none;
|
|
61
|
+
}
|
|
62
|
+
blockquote:before, blockquote:after,
|
|
63
|
+
q:before, q:after {
|
|
64
|
+
content: '';
|
|
65
|
+
content: none;
|
|
66
|
+
}
|
|
67
|
+
table {
|
|
68
|
+
border-collapse: collapse;
|
|
69
|
+
border-spacing: 0;
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
/* cSpell:enable */
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Resets css component which should be applied to the top of the html
|
|
77
|
+
*
|
|
78
|
+
* ### Example
|
|
79
|
+
*
|
|
80
|
+
* ```jsx
|
|
81
|
+
* import { Reset } from '@adminjs/design-system'
|
|
82
|
+
*
|
|
83
|
+
* <ThemeProvider theme={theme}>
|
|
84
|
+
* <Reset />
|
|
85
|
+
* <Box>
|
|
86
|
+
* { ... }
|
|
87
|
+
* </Box>
|
|
88
|
+
* </ThemeProvider>
|
|
89
|
+
* ```
|
|
90
|
+
* @new in version 3.3
|
|
91
|
+
* @memberof module:@adminjs/design-system
|
|
92
|
+
*/
|
|
93
|
+
const Reset = createGlobalStyle`${reset}`;
|
|
94
|
+
export { Reset, reset };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const selectStyles = theme => ({
|
|
2
|
+
control: baseStyles => ({
|
|
3
|
+
...baseStyles,
|
|
4
|
+
boxShadow: 'none',
|
|
5
|
+
background: 'transparent',
|
|
6
|
+
borderColor: theme.colors.inputBorder
|
|
7
|
+
}),
|
|
8
|
+
input: baseStyles => ({
|
|
9
|
+
...baseStyles,
|
|
10
|
+
color: theme.colors.grey100
|
|
11
|
+
}),
|
|
12
|
+
singleValue: baseStyles => ({
|
|
13
|
+
...baseStyles,
|
|
14
|
+
color: theme.colors.grey100
|
|
15
|
+
}),
|
|
16
|
+
menu: baseStyles => ({
|
|
17
|
+
...baseStyles,
|
|
18
|
+
boxShadow: 'none',
|
|
19
|
+
background: theme.colors.container,
|
|
20
|
+
border: theme.borders.input,
|
|
21
|
+
zIndex: 100
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
const filterStyles = theme => ({
|
|
25
|
+
control: provided => ({
|
|
26
|
+
...provided,
|
|
27
|
+
boxShadow: 'none',
|
|
28
|
+
background: 'transparent',
|
|
29
|
+
borderColor: theme.colors.inputBorder
|
|
30
|
+
}),
|
|
31
|
+
input: () => ({
|
|
32
|
+
color: theme.colors.grey100,
|
|
33
|
+
gridArea: '1/1/2/3',
|
|
34
|
+
gridTemplateColumns: '0px min-content'
|
|
35
|
+
}),
|
|
36
|
+
singleValue: () => ({
|
|
37
|
+
color: theme.colors.grey100,
|
|
38
|
+
gridArea: '1/1/2/3'
|
|
39
|
+
}),
|
|
40
|
+
menu: provided => ({
|
|
41
|
+
...provided,
|
|
42
|
+
borderColor: theme.colors.border,
|
|
43
|
+
background: theme.colors.filterBg,
|
|
44
|
+
zIndex: 5
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
export { filterStyles, selectStyles };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Box, Label } from "../index.js";
|
|
4
|
+
const StoryWrapper = props => {
|
|
5
|
+
const {
|
|
6
|
+
label,
|
|
7
|
+
children,
|
|
8
|
+
gap = 16,
|
|
9
|
+
...other
|
|
10
|
+
} = props;
|
|
11
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
12
|
+
variant: "grey"
|
|
13
|
+
}, /*#__PURE__*/React.createElement(Label, null, label), /*#__PURE__*/React.createElement(Box, _extends({
|
|
14
|
+
bg: "white",
|
|
15
|
+
p: "xxl",
|
|
16
|
+
width: 1,
|
|
17
|
+
style: {
|
|
18
|
+
gap
|
|
19
|
+
}
|
|
20
|
+
}, other), children));
|
|
21
|
+
};
|
|
22
|
+
export default StoryWrapper;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { getValueAndUnit } from 'polished';
|
|
2
|
+
export function themeGet(kind, value, offset) {
|
|
3
|
+
return ({
|
|
4
|
+
theme
|
|
5
|
+
}) => {
|
|
6
|
+
const themeVal = value ? theme[kind][value] : theme[kind];
|
|
7
|
+
if (themeVal && offset) {
|
|
8
|
+
let offsetValue;
|
|
9
|
+
if (typeof offset === 'string') {
|
|
10
|
+
[offsetValue] = getValueAndUnit(offset);
|
|
11
|
+
} else {
|
|
12
|
+
offsetValue = offset;
|
|
13
|
+
}
|
|
14
|
+
const [pxValue, unit] = getValueAndUnit(themeVal);
|
|
15
|
+
return `${pxValue + offsetValue}${unit}`;
|
|
16
|
+
}
|
|
17
|
+
return themeVal;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export default themeGet;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* Handy utility function which simplifies taking values from the {@link Theme}.
|
|
25
|
+
*
|
|
26
|
+
* ### Example
|
|
27
|
+
*
|
|
28
|
+
* ```javascript
|
|
29
|
+
* import { Box, themeGet } from '@adminjs/design-system'
|
|
30
|
+
*
|
|
31
|
+
* const myComponent = styled(Box)`
|
|
32
|
+
* padding: ${themeGet('space', 'xl')};
|
|
33
|
+
* font: ${themeGet('font')};
|
|
34
|
+
* margin-top: ${themeGet('space', 'xl', -2)};
|
|
35
|
+
*
|
|
36
|
+
* margin-bottom: ${(props) => themeGet('space', props.disabled ? 'xl' : 'xxl')(props)};
|
|
37
|
+
* `
|
|
38
|
+
*
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @param {string} kind One of the keys in the {@link Theme} interface. For example:
|
|
42
|
+
* `fontWeights`
|
|
43
|
+
* @param {string} [value] Value for the key
|
|
44
|
+
* @param {string | number} [offset] optional offset. When you want to take xxl + 2pixels
|
|
45
|
+
* you can do this by passing +2 as the offset.
|
|
46
|
+
* @return {ThemeFunction} function taking props as an argument
|
|
47
|
+
*
|
|
48
|
+
* @new in version 3.3
|
|
49
|
+
* @function themeGet
|
|
50
|
+
* @memberof Theme
|
|
51
|
+
*/
|
package/config/rollup.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
import babel from '@rollup/plugin-babel'
|
|
3
|
+
import commonjs from '@rollup/plugin-commonjs'
|
|
4
|
+
import resolve from '@rollup/plugin-node-resolve'
|
|
5
|
+
import { minify } from 'rollup-plugin-esbuild-minify'
|
|
6
|
+
import replace from '@rollup/plugin-replace'
|
|
7
|
+
import presetEnv from '@babel/preset-env'
|
|
8
|
+
import presetReact from '@babel/preset-react'
|
|
9
|
+
import presetTs from '@babel/preset-typescript'
|
|
10
|
+
|
|
11
|
+
const extensions = ['.mjs', '.js', '.jsx', '.json', '.ts', '.tsx']
|
|
12
|
+
|
|
13
|
+
const plugins = [
|
|
14
|
+
resolve({ extensions }),
|
|
15
|
+
replace({
|
|
16
|
+
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
|
|
17
|
+
'process.env.IS_BROWSER': 'true',
|
|
18
|
+
preventAssignment: true,
|
|
19
|
+
}),
|
|
20
|
+
commonjs(),
|
|
21
|
+
babel({
|
|
22
|
+
extensions,
|
|
23
|
+
babelrc: false,
|
|
24
|
+
babelHelpers: 'bundled',
|
|
25
|
+
presets: [
|
|
26
|
+
[presetEnv, {
|
|
27
|
+
targets: {
|
|
28
|
+
node: '18',
|
|
29
|
+
},
|
|
30
|
+
loose: true,
|
|
31
|
+
modules: false,
|
|
32
|
+
}],
|
|
33
|
+
presetReact,
|
|
34
|
+
presetTs,
|
|
35
|
+
],
|
|
36
|
+
}),
|
|
37
|
+
...(process.env.NODE_ENV === 'production' ? [minify()] : []),
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
input: 'entry.js',
|
|
42
|
+
plugins,
|
|
43
|
+
external: [
|
|
44
|
+
'react',
|
|
45
|
+
'@adminjs/design-system/styled-components',
|
|
46
|
+
'react-dom',
|
|
47
|
+
'react-router',
|
|
48
|
+
'react-router-dom',
|
|
49
|
+
'react-feather',
|
|
50
|
+
],
|
|
51
|
+
output: {
|
|
52
|
+
file: process.env.NODE_ENV === 'production' ? 'bundle.production.js' : 'bundle.development.js',
|
|
53
|
+
sourcemap: process.env.NODE_ENV === 'production' ? false : 'inline',
|
|
54
|
+
name: 'AdminJSDesignSystem',
|
|
55
|
+
format: 'iife',
|
|
56
|
+
interop: 'auto',
|
|
57
|
+
inlineDynamicImports: true,
|
|
58
|
+
globals: {
|
|
59
|
+
react: 'React',
|
|
60
|
+
'@adminjs/design-system/styled-components': 'styled',
|
|
61
|
+
'react-dom': 'ReactDOM',
|
|
62
|
+
'react-router': 'ReactRouter',
|
|
63
|
+
'react-router-dom': 'ReactRouterDOM',
|
|
64
|
+
'react-feather': 'FeatherIcons',
|
|
65
|
+
'react-select': 'ReactSelect',
|
|
66
|
+
'react-select/async': 'ReactSelectAsync',
|
|
67
|
+
'react-select/creatable': 'ReactSelectCreatable',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
}
|
package/entry.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import ReactDatepicker from 'react-datepicker'
|
|
2
|
+
import * as FeatherIcons from 'react-feather'
|
|
3
|
+
|
|
4
|
+
import * as AdminJSDesignSystem from './build/index.js'
|
|
5
|
+
import * as styled from './build/utils/styled.js'
|
|
6
|
+
|
|
7
|
+
window.styled = window.styled || styled
|
|
8
|
+
window.ReactDatepicker = window.ReactDatepicker || ReactDatepicker.default || ReactDatepicker
|
|
9
|
+
window.FeatherIcons = window.FeatherIcons || FeatherIcons
|
|
10
|
+
|
|
11
|
+
export default AdminJSDesignSystem
|
package/firebase.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@clement_lores/admin-design-system",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "DesignSystem which AdminJS is built with",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./build/index.js",
|
|
9
|
+
"types": "./types/src/index.d.ts",
|
|
10
|
+
"require": "./build/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./styled-components": {
|
|
13
|
+
"import": "./build/utils/styled.js",
|
|
14
|
+
"types": "./types/src/utils/styled.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"repository": "git@github.com:loresclement/adminjs-design-system.git",
|
|
18
|
+
"author": "Clément LORES",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"release": "semantic-release",
|
|
25
|
+
"build": "babel src --out-dir build --copy-files --no-copy-ignored --extensions '.ts,.js,.jsx,.tsx'",
|
|
26
|
+
"types": "tsc",
|
|
27
|
+
"clean": "rm -fR types && rm -fR build",
|
|
28
|
+
"lint": "eslint './src/**/*' './vendor-types/**/*'",
|
|
29
|
+
"check:all": "yarn build && yarn lint",
|
|
30
|
+
"bundle": "rollup --config ./config/rollup.js",
|
|
31
|
+
"storybook": "NODE_OPTIONS=--openssl-legacy-provider storybook dev -p 6006",
|
|
32
|
+
"storybook:build": "storybook build",
|
|
33
|
+
"storybook:deploy": "firebase deploy --only hosting",
|
|
34
|
+
"dev": "yarn build && yarn types && yarn bundle",
|
|
35
|
+
"prepare": "husky install && ts-patch install -s"
|
|
36
|
+
},
|
|
37
|
+
"husky": {
|
|
38
|
+
"hooks": {
|
|
39
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"browserslist": [
|
|
43
|
+
"last 5 Chrome versions"
|
|
44
|
+
],
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"react": "^18.1.0",
|
|
47
|
+
"react-dom": "^18.1.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@babel/cli": "^7.21.0",
|
|
51
|
+
"@babel/core": "^7.21.0",
|
|
52
|
+
"@babel/preset-env": "^7.20.2",
|
|
53
|
+
"@babel/preset-react": "^7.18.6",
|
|
54
|
+
"@babel/preset-typescript": "^7.21.0",
|
|
55
|
+
"@commitlint/cli": "^17.5.0",
|
|
56
|
+
"@commitlint/config-conventional": "^17.4.4",
|
|
57
|
+
"@rollup/plugin-babel": "^7.1.0",
|
|
58
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
59
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
60
|
+
"@rollup/plugin-replace": "^6.0.3",
|
|
61
|
+
"@semantic-release/git": "^10.0.1",
|
|
62
|
+
"@storybook/addon-essentials": "^7.6.3",
|
|
63
|
+
"@storybook/addon-interactions": "^7.6.3",
|
|
64
|
+
"@storybook/addon-links": "^7.6.3",
|
|
65
|
+
"@storybook/addon-storysource": "^7.6.3",
|
|
66
|
+
"@storybook/addons": "^7.6.17",
|
|
67
|
+
"@storybook/blocks": "^7.6.3",
|
|
68
|
+
"@storybook/manager-api": "^7.6.3",
|
|
69
|
+
"@storybook/react": "^7.6.3",
|
|
70
|
+
"@storybook/react-webpack5": "^7.6.3",
|
|
71
|
+
"@storybook/source-loader": "^7.6.3",
|
|
72
|
+
"@storybook/testing-library": "^0.2.2",
|
|
73
|
+
"@storybook/theming": "^7.6.3",
|
|
74
|
+
"@types/hoist-non-react-statics": "^3.3.7",
|
|
75
|
+
"@types/react": "^18.0.15",
|
|
76
|
+
"@types/react-datepicker": "^4.10.0",
|
|
77
|
+
"@types/react-text-mask": "^5.4.14",
|
|
78
|
+
"@types/styled-components": "^5.1.36",
|
|
79
|
+
"@types/styled-system": "^5.1.25",
|
|
80
|
+
"@typescript-eslint/eslint-plugin": "^5.56.0",
|
|
81
|
+
"@typescript-eslint/parser": "^5.56.0",
|
|
82
|
+
"babel-plugin-module-resolver": "^5.0.3",
|
|
83
|
+
"babel-plugin-replace-import-extension": "^1.1.5",
|
|
84
|
+
"babel-plugin-styled-components": "^2.3.0",
|
|
85
|
+
"eslint": "^8.36.0",
|
|
86
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
87
|
+
"eslint-plugin-import": "^2.32.0",
|
|
88
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
89
|
+
"eslint-plugin-react": "^7.37.5",
|
|
90
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
91
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
92
|
+
"husky": "^9.1.7",
|
|
93
|
+
"react": "^18.2.0",
|
|
94
|
+
"react-dom": "^18.2.0",
|
|
95
|
+
"resolve-typescript-plugin": "^2.0.1",
|
|
96
|
+
"rollup": "^4.62.0",
|
|
97
|
+
"rollup-plugin-esbuild-minify": "^1.3.0",
|
|
98
|
+
"semantic-release": "^25.0.5",
|
|
99
|
+
"semantic-release-slack-bot": "^4.0.2",
|
|
100
|
+
"source-map-loader": "^4.0.1",
|
|
101
|
+
"storybook": "^7.6.3",
|
|
102
|
+
"ts-loader": "^9.6.1",
|
|
103
|
+
"ts-patch": "^3.1.2",
|
|
104
|
+
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
|
105
|
+
"typescript": "^5.0.2",
|
|
106
|
+
"typescript-transform-paths": "^3.4.7"
|
|
107
|
+
},
|
|
108
|
+
"dependencies": {
|
|
109
|
+
"@hypnosphi/create-react-context": "^0.3.1",
|
|
110
|
+
"@tinymce/tinymce-react": "^6.3.0",
|
|
111
|
+
"@tiptap/core": "2.1.13",
|
|
112
|
+
"@tiptap/extension-bubble-menu": "2.1.13",
|
|
113
|
+
"@tiptap/extension-character-count": "2.1.13",
|
|
114
|
+
"@tiptap/extension-code": "2.1.13",
|
|
115
|
+
"@tiptap/extension-document": "2.1.13",
|
|
116
|
+
"@tiptap/extension-floating-menu": "2.1.13",
|
|
117
|
+
"@tiptap/extension-heading": "2.1.13",
|
|
118
|
+
"@tiptap/extension-image": "2.1.13",
|
|
119
|
+
"@tiptap/extension-link": "2.1.13",
|
|
120
|
+
"@tiptap/extension-table": "2.1.13",
|
|
121
|
+
"@tiptap/extension-table-cell": "2.1.13",
|
|
122
|
+
"@tiptap/extension-table-header": "2.1.13",
|
|
123
|
+
"@tiptap/extension-table-row": "2.1.13",
|
|
124
|
+
"@tiptap/extension-text": "2.1.13",
|
|
125
|
+
"@tiptap/extension-text-align": "2.1.13",
|
|
126
|
+
"@tiptap/extension-typography": "2.1.13",
|
|
127
|
+
"@tiptap/pm": "2.1.13",
|
|
128
|
+
"@tiptap/react": "2.1.13",
|
|
129
|
+
"@tiptap/starter-kit": "2.1.13",
|
|
130
|
+
"date-fns": "^4.4.0",
|
|
131
|
+
"flat": "^6.0.1",
|
|
132
|
+
"hoist-non-react-statics": "3.3.2",
|
|
133
|
+
"jw-paginate": "^1.0.4",
|
|
134
|
+
"lodash": "^4.18.1",
|
|
135
|
+
"polished": "^4.3.1",
|
|
136
|
+
"react-currency-input-field": "^3.6.10",
|
|
137
|
+
"react-datepicker": "^4.10.0",
|
|
138
|
+
"react-feather": "^2.0.10",
|
|
139
|
+
"react-phone-input-2": "^2.15.1",
|
|
140
|
+
"react-select": "^5.10.2",
|
|
141
|
+
"react-text-mask": "^5.5.0",
|
|
142
|
+
"styled-components": "5.3.9",
|
|
143
|
+
"styled-system": "^5.1.5",
|
|
144
|
+
"text-mask-addons": "^3.8.0",
|
|
145
|
+
"tinymce": "^8.6.0"
|
|
146
|
+
},
|
|
147
|
+
"resolutions": {
|
|
148
|
+
"@emotion/react": "11.10.6",
|
|
149
|
+
"@tiptap/core": "2.1.13",
|
|
150
|
+
"@tiptap/extension-bubble-menu": "2.1.13",
|
|
151
|
+
"@tiptap/extension-character-count": "2.1.13",
|
|
152
|
+
"@tiptap/extension-code": "2.1.13",
|
|
153
|
+
"@tiptap/extension-document": "2.1.13",
|
|
154
|
+
"@tiptap/extension-floating-menu": "2.1.13",
|
|
155
|
+
"@tiptap/extension-heading": "2.1.13",
|
|
156
|
+
"@tiptap/extension-image": "2.1.13",
|
|
157
|
+
"@tiptap/extension-link": "2.1.13",
|
|
158
|
+
"@tiptap/extension-table": "2.1.13",
|
|
159
|
+
"@tiptap/extension-table-cell": "2.1.13",
|
|
160
|
+
"@tiptap/extension-table-header": "2.1.13",
|
|
161
|
+
"@tiptap/extension-table-row": "2.1.13",
|
|
162
|
+
"@tiptap/extension-text": "2.1.13",
|
|
163
|
+
"@tiptap/extension-text-align": "2.1.13",
|
|
164
|
+
"@tiptap/extension-typography": "2.1.13",
|
|
165
|
+
"@tiptap/pm": "2.1.13",
|
|
166
|
+
"@tiptap/react": "2.1.13",
|
|
167
|
+
"@tiptap/starter-kit": "2.1.13",
|
|
168
|
+
"hoist-non-react-statics": "3.3.2",
|
|
169
|
+
"styled-components": "5.3.9"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import Avatar from './avatar.jsx'
|
|
5
|
+
|
|
6
|
+
export const Default: StoryObj<typeof Avatar> = {}
|
|
7
|
+
|
|
8
|
+
export const WithLetter: StoryObj<typeof Avatar> = {
|
|
9
|
+
render: ({ alt }) => (
|
|
10
|
+
<Avatar alt={alt}>
|
|
11
|
+
{alt
|
|
12
|
+
.split(' ')
|
|
13
|
+
.map((w) => w.charAt(0))
|
|
14
|
+
.join('')}
|
|
15
|
+
</Avatar>
|
|
16
|
+
),
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const meta: Meta<typeof Avatar> = {
|
|
20
|
+
title: 'DesignSystem/Atoms/Avatar',
|
|
21
|
+
component: Avatar,
|
|
22
|
+
args: {
|
|
23
|
+
src: 'https://images.unsplash.com/photo-1612144431180-2d672779556c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=870&q=80',
|
|
24
|
+
alt: 'Bubble Avatar',
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default meta
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { MarginProps, space } from 'styled-system'
|
|
2
|
+
import { styled } from '@styled-components'
|
|
3
|
+
|
|
4
|
+
export type AvatarProps = MarginProps & {
|
|
5
|
+
alt?: string
|
|
6
|
+
src?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const Avatar = styled.div<AvatarProps>`
|
|
10
|
+
width: 36px;
|
|
11
|
+
height: 36px;
|
|
12
|
+
border-radius: 50%;
|
|
13
|
+
position: relative;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
line-height: 1;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
font-size: ${({ theme }) => theme.space.lg};
|
|
21
|
+
user-select: none;
|
|
22
|
+
|
|
23
|
+
&:before {
|
|
24
|
+
content: '';
|
|
25
|
+
position: absolute;
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
background-image: url('${({ src }) => src}');
|
|
31
|
+
background-position: center;
|
|
32
|
+
background-repeat: no-repeat;
|
|
33
|
+
background-size: cover;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
background-color: ${({ theme }) => theme.colors.primary100};
|
|
37
|
+
color: ${({ theme }) => theme.colors.white};
|
|
38
|
+
|
|
39
|
+
${space}
|
|
40
|
+
`
|
|
41
|
+
|
|
42
|
+
Avatar.displayName = 'Avatar'
|
|
43
|
+
|
|
44
|
+
export default Avatar
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './avatar.jsx'
|