@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,52 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Box, Button, Drawer, DrawerContent, DropZone, Header, Icon, Input, Label, RichTextEditor } from "../index.js";
|
|
3
|
+
export const Default = () => {
|
|
4
|
+
const [isDrawerVisible, setIsDrawerVisible] = useState(false);
|
|
5
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
6
|
+
variant: "grey",
|
|
7
|
+
width: 1
|
|
8
|
+
}, isDrawerVisible && /*#__PURE__*/React.createElement(Drawer, null, /*#__PURE__*/React.createElement(DrawerContent, null, /*#__PURE__*/React.createElement(Header.H3, null, /*#__PURE__*/React.createElement(Button, {
|
|
9
|
+
size: "icon",
|
|
10
|
+
rounded: true,
|
|
11
|
+
mr: "lg",
|
|
12
|
+
onClick: () => setIsDrawerVisible(false)
|
|
13
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
14
|
+
icon: "ChevronRight"
|
|
15
|
+
})), "Article settings"), /*#__PURE__*/React.createElement(Label, null, "Drop splash screen"), /*#__PURE__*/React.createElement(DropZone, null))), /*#__PURE__*/React.createElement(Box, {
|
|
16
|
+
variant: "white"
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
18
|
+
flex: true,
|
|
19
|
+
flexDirection: "row-reverse",
|
|
20
|
+
mb: "xl"
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
22
|
+
size: "icon",
|
|
23
|
+
onClick: () => setIsDrawerVisible(true)
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
25
|
+
icon: "Settings"
|
|
26
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
27
|
+
mr: "default",
|
|
28
|
+
variant: "primary"
|
|
29
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
30
|
+
icon: "Send"
|
|
31
|
+
}), "Publish"), /*#__PURE__*/React.createElement(Button, {
|
|
32
|
+
mr: "default"
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
34
|
+
icon: "Save"
|
|
35
|
+
}), "Save")), /*#__PURE__*/React.createElement(Box, {
|
|
36
|
+
mb: "xxl"
|
|
37
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
38
|
+
variant: "xxl",
|
|
39
|
+
borderless: true,
|
|
40
|
+
width: 1,
|
|
41
|
+
placeholder: "My amazing new article"
|
|
42
|
+
})), /*#__PURE__*/React.createElement(RichTextEditor, {
|
|
43
|
+
value: "",
|
|
44
|
+
onChange: () => {
|
|
45
|
+
/* noop */
|
|
46
|
+
}
|
|
47
|
+
})));
|
|
48
|
+
};
|
|
49
|
+
const meta = {
|
|
50
|
+
title: 'DesignSystem/Templates/Blog'
|
|
51
|
+
};
|
|
52
|
+
export default meta;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
An entire AdminJS interface is built with 2 main packages:
|
|
2
|
+
|
|
3
|
+
- [styled-components]{@link https://styled-components.com/} backed by
|
|
4
|
+
- [styled-system]{@link https://styled-system.com/}.
|
|
5
|
+
|
|
6
|
+
The core of the style information is the {@link Theme}. It is base on the
|
|
7
|
+
[Theme Specification]{@link https://styled-system.com/theme-specification/} and
|
|
8
|
+
it is used by almost all the components provided by AdminJS.
|
|
9
|
+
|
|
10
|
+
The structure of the Theme is as follows:
|
|
11
|
+
|
|
12
|
+
```javascript
|
|
13
|
+
const theme = {
|
|
14
|
+
breakpoints,
|
|
15
|
+
colors,
|
|
16
|
+
fontSizes,
|
|
17
|
+
fontWeights,
|
|
18
|
+
lineHeights,
|
|
19
|
+
shadows,
|
|
20
|
+
sizes,
|
|
21
|
+
space,
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Each element controls a different kind of props passed to the Design System Components.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
So let's say you would like to create a box with the same background as our
|
|
30
|
+
`primary100` color. This is one way of achieving that:
|
|
31
|
+
|
|
32
|
+
```javascript
|
|
33
|
+
import styled from 'styled-components'
|
|
34
|
+
import { Box } from '@adminjs/design-system'
|
|
35
|
+
|
|
36
|
+
const MyBlueBox = styled(Box)`
|
|
37
|
+
background: ${({ theme }) => theme.colors.primary100};
|
|
38
|
+
// other css styles you want to override.
|
|
39
|
+
`
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
> There is a helper function {@link themeGet} which can be used to fetch the data from Theme.
|
|
43
|
+
|
|
44
|
+
But, since AdminJS uses [styled-system]{@link https://styled-system.com/}, you also can achieve
|
|
45
|
+
a similar result by passing a `bg` Prop to the [Box Component]{@link Box},
|
|
46
|
+
everything because Box supports all the {@link ColorProps}.
|
|
47
|
+
|
|
48
|
+
```javascript
|
|
49
|
+
import { Box } from '@adminjs/design-system'
|
|
50
|
+
|
|
51
|
+
const ComponentWhereIWantToUseBlueBox = () => (
|
|
52
|
+
<Box bg="primary100">
|
|
53
|
+
...
|
|
54
|
+
</Box>
|
|
55
|
+
)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The last way of accessing the theme is to use withTheme HOC provided by
|
|
59
|
+
[styled-components]{@link https://styled-components.com/}
|
|
60
|
+
|
|
61
|
+
```javascript
|
|
62
|
+
import { withTheme } from 'styled-components'
|
|
63
|
+
|
|
64
|
+
const MyComponent = (props) => {
|
|
65
|
+
const { theme } = props
|
|
66
|
+
// theme.colors.primary100
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default withTheme(MyComponent)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
{@link ColorProps} is only one of the extensions we provided. Take a look at the documentation
|
|
73
|
+
below to see all possible options,
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Responsive styles
|
|
77
|
+
|
|
78
|
+
You can pass an array instead of value to props to define how behaves in in different breakpoints.
|
|
79
|
+
|
|
80
|
+
so passing `[1, 1/2, 0.4]` as `width` will width for a following breakpoints:
|
|
81
|
+
|
|
82
|
+
- <= 577px: 100%
|
|
83
|
+
- 578px-769px: 50%
|
|
84
|
+
- \>= 769px: 40%
|
|
85
|
+
|
|
86
|
+
Combined with {@Box} and {@FlexProps} creates a tool to build entire layouts.
|
|
87
|
+
|
|
88
|
+
Take a look at this example:
|
|
89
|
+
|
|
90
|
+
```javascript
|
|
91
|
+
import { Box } from '@adminjs/design-system'
|
|
92
|
+
|
|
93
|
+
const ComponentWhereIWantToUseResponsiveStyle = () => (
|
|
94
|
+
<Box flex flexDirection="column">
|
|
95
|
+
<Box width={[1, 1/2, 1/3]}>Sidebar</Box>
|
|
96
|
+
<Box width={[1, 1/2, 2/3]}>Content</Box>
|
|
97
|
+
</Box>
|
|
98
|
+
)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Above we defined that the Sidebar box should have 100% width until the viewport reaches the first
|
|
102
|
+
breakpoint, then 50% (until the next breakpoint) and then 1/3rd of the page for the remaining 2
|
|
103
|
+
breakpoints.
|
|
104
|
+
|
|
105
|
+
You can read more about responsive features on `styled-system`
|
|
106
|
+
{@link https://styled-system.com/responsive-styles}
|
|
107
|
+
|
|
108
|
+
<style>
|
|
109
|
+
.shadow-div { display: block; width: 80px; height: 80px;}
|
|
110
|
+
.space-box { display: inline-block; height: 20px; background: #4268F6; vertical-align: middle;}
|
|
111
|
+
</style>
|
package/build/theme.js
ADDED
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/**
|
|
3
|
+
* @interface Theme
|
|
4
|
+
* @load ./theme.doc.md
|
|
5
|
+
* @section design-system
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Color palette.
|
|
10
|
+
*
|
|
11
|
+
* @memberof Theme
|
|
12
|
+
* @alias colors
|
|
13
|
+
* @property {string} primary100=#4268F6 <div style="background: #4268F6; height: 20px;" />
|
|
14
|
+
* @property {string} primary80=#6483F8 <div style="background: #6483F8; height: 20px;" />
|
|
15
|
+
* @property {string} primary60=#879FFA <div style="background: #879FFA; height: 20px;" />
|
|
16
|
+
* @property {string} primary40=#A9BAFA <div style="background: #A9BAFA; height: 20px;" />
|
|
17
|
+
* @property {string} primary20=#CBD5FD <div style="background: #CBD5FD; height: 20px;" />
|
|
18
|
+
* @property {string} accent=#38CAF1 <div style="background: #38CAF1; height: 20px;" />
|
|
19
|
+
* @property {string} love=#e6282b <div style="background: #e6282b; height: 20px;" />
|
|
20
|
+
* @property {string} grey100=#1C1C38 <div style="background: #1C1C38; height: 20px;" />
|
|
21
|
+
* @property {string} grey80=#454655 <div style="background: #454655; height: 20px;" />
|
|
22
|
+
* @property {string} grey60=#898A9A <div style="background: #898A9A; height: 20px;" />
|
|
23
|
+
* @property {string} grey40=#C0C0CA <div style="background: #C0C0CA; height: 20px;" />
|
|
24
|
+
* @property {string} grey20=#F6F7FB <div style="background: #F6F7FB; height: 20px;" />
|
|
25
|
+
* @property {string} white=#fff <div style="background: #fff; height: 20px;" />
|
|
26
|
+
* @property {string} errorDark=#DE405D <div style="background: #DE405D; height: 20px;" />
|
|
27
|
+
* @property {string} error=#FF4567 <div style="background: #FF4567; height: 20px;" />
|
|
28
|
+
* @property {string} errorLight=#FFA5B5 <div style="background: #FFA5B5; height: 20px;" />
|
|
29
|
+
* @property {string} successDark=#32A887 <div style="background: #32A887; height: 20px;" />
|
|
30
|
+
* @property {string} success=#70C9B0 <div style="background: #70C9B0; height: 20px;" />
|
|
31
|
+
* @property {string} successLight=#DBF0F1 <div style="background: #DBF0F1; height: 20px;" />
|
|
32
|
+
* @property {string} infoDark=#4268F6 <div style="background: #4268F6; height: 20px;" />
|
|
33
|
+
* @property {string} info=#879FFA <div style="background: #879FFA; height: 20px;" />
|
|
34
|
+
* @property {string} infoLight=#CBD5FD <div style="background: #CBD5FD; height: 20px;" />
|
|
35
|
+
* @property {string} filterBg=#343F87 <div style="background: #343F87; height: 20px;" />
|
|
36
|
+
* @property {string} hoverBg=#535B8E <div style="background: #535B8E; height: 20px;" />
|
|
37
|
+
* @property {string} inputBorder=#898A9A <div style="background: #898A9A; height: 20px;" />
|
|
38
|
+
* @property {string} border=#DDE1E5, <div style="background: #DDE1E5; height: 20px;" />
|
|
39
|
+
* @property {string} separator=#C0C0CA <div style="background: #C0C0CA; height: 20px;" />
|
|
40
|
+
* @property {string} highlight=#F6F7FB <div style="background: #F6F7FB; height: 20px;" />
|
|
41
|
+
* @property {string} filterInputBorder=rgba(255,255,255,0.15) <div style="background: rgba(255,255,255,0.15); height: 20px;" />
|
|
42
|
+
* @property {string} filterDisabled=rgba(83,91,142,0.05) <div style="background: rgba(83,91,142,0.05); height: 20px;" />
|
|
43
|
+
* @property {string} bg=#F6F7FB <div style="background: #F6F7FB; height: 20px;" />
|
|
44
|
+
*/
|
|
45
|
+
export const colors = {
|
|
46
|
+
// global
|
|
47
|
+
border: '#EEEEEF',
|
|
48
|
+
text: '#0C1E29',
|
|
49
|
+
// primary
|
|
50
|
+
primary100: '#3040D6',
|
|
51
|
+
primary80: '#6483F8',
|
|
52
|
+
primary60: '#99A9EE',
|
|
53
|
+
primary40: '#BBC5F4',
|
|
54
|
+
primary20: '#DDE2F9',
|
|
55
|
+
// accent
|
|
56
|
+
accent: '#3B3552',
|
|
57
|
+
// grey
|
|
58
|
+
grey100: '#0C1E29',
|
|
59
|
+
grey80: '#454655',
|
|
60
|
+
grey60: '#898A9A',
|
|
61
|
+
grey40: '#BBC3CB',
|
|
62
|
+
grey20: '#F2F2F2',
|
|
63
|
+
// common
|
|
64
|
+
white: '#fff',
|
|
65
|
+
black: '#000',
|
|
66
|
+
// alerts
|
|
67
|
+
errorDark: '#9d0616',
|
|
68
|
+
error: '#C20012',
|
|
69
|
+
errorLight: '#F9E5E7',
|
|
70
|
+
successDark: '#007D7F',
|
|
71
|
+
success: '#007D7F',
|
|
72
|
+
successLight: '#E5F2F2',
|
|
73
|
+
warningDark: '#A14F17',
|
|
74
|
+
warning: '#A14F17',
|
|
75
|
+
warningLight: '#F6EDE8',
|
|
76
|
+
infoDark: '#4268F6',
|
|
77
|
+
info: '#3040D6',
|
|
78
|
+
infoLight: '#CBD5FD',
|
|
79
|
+
// backgrounds
|
|
80
|
+
bg: '#F8F9F9',
|
|
81
|
+
filterBg: '#FBFBFB',
|
|
82
|
+
container: '#FFFFFF',
|
|
83
|
+
sidebar: '#FFFFFF',
|
|
84
|
+
// elements
|
|
85
|
+
inputBorder: '#BBC3CB',
|
|
86
|
+
separator: '#BBC3CB',
|
|
87
|
+
highlight: '#F2F2F2',
|
|
88
|
+
// AdminJS logo color
|
|
89
|
+
love: '#4D70EB'
|
|
90
|
+
};
|
|
91
|
+
export const ColorVariants = {
|
|
92
|
+
primary: 'primary100',
|
|
93
|
+
secondary: 'accent',
|
|
94
|
+
danger: 'error',
|
|
95
|
+
success: 'success',
|
|
96
|
+
info: 'info',
|
|
97
|
+
warning: 'warning',
|
|
98
|
+
text: 'text'
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Sizes can be used with paddings, margins etc.
|
|
102
|
+
*
|
|
103
|
+
* This is the example of using responsive margin with Box component
|
|
104
|
+
*
|
|
105
|
+
* ```javascript
|
|
106
|
+
* <Box p=['default', 'xl']>some content</Box>
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* This component will have 8px padding for lowest breakpoint and 24px above
|
|
110
|
+
* this breakpoint.
|
|
111
|
+
*
|
|
112
|
+
* @memberof Theme
|
|
113
|
+
* @alias space
|
|
114
|
+
|
|
115
|
+
* @property {string} xs=2px 2px - <span class="space-box" style="width: 2px;" />
|
|
116
|
+
* @property {string} sm=4px 4px - <span class="space-box" style="width: 4px;" />
|
|
117
|
+
* @property {string} default=8px 8px - <span class="space-box" style="width: 8px;" /> (alias md)
|
|
118
|
+
* @property {string} lg=16px 16px - <span class="space-box" style="width: 16px;" />
|
|
119
|
+
* @property {string} xl=24px 24px - <span class="space-box" style="width: 24px;" />
|
|
120
|
+
* @property {string} xxl=32px 32px - <span class="space-box" style="width: 32px;" />
|
|
121
|
+
* @property {string} x3=48px 48px - <span class="space-box" style="width: 48px;" />
|
|
122
|
+
* @property {string} x4=64px 64px - <span class="space-box" style="width: 64px;" />
|
|
123
|
+
* @property {string} x5=80px 80px - <span class="space-box" style="width: 80px;" />
|
|
124
|
+
* @property {string} x6=128px 128px - <span class="space-box" style="width: 128px;" />
|
|
125
|
+
*/
|
|
126
|
+
export const space = {
|
|
127
|
+
xs: '2px',
|
|
128
|
+
sm: '4px',
|
|
129
|
+
default: '8px',
|
|
130
|
+
md: '8px',
|
|
131
|
+
lg: '16px',
|
|
132
|
+
xl: '24px',
|
|
133
|
+
xxl: '32px',
|
|
134
|
+
x3: '48px',
|
|
135
|
+
x4: '64px',
|
|
136
|
+
x5: '80px',
|
|
137
|
+
x6: '128px'
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @memberof Theme
|
|
142
|
+
* @alias sizes
|
|
143
|
+
* @property {string} navbarHeight=64px
|
|
144
|
+
* @property {string} sidebarWidth=300px
|
|
145
|
+
* @property {string} maxFormWidth=740px
|
|
146
|
+
*/
|
|
147
|
+
export const sizes = {
|
|
148
|
+
navbarHeight: '64px',
|
|
149
|
+
sidebarWidth: '300px',
|
|
150
|
+
maxFormWidth: '740px'
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @memberof Theme
|
|
155
|
+
* @alias fontSizes
|
|
156
|
+
* @property {string} xs=10px <div style="font-size: 10px;">'xs' font size</div>
|
|
157
|
+
* @property {string} sm=12px <div style="font-size: 12px;">'sm' font size</div>
|
|
158
|
+
* @property {string} default=14px (alias md) <div style="font-size: 14px;">'default' font size</div>
|
|
159
|
+
* @property {string} lg=16px <div style="font-size: 16px;">'lg' font size</div>
|
|
160
|
+
* @property {string} xl=18px <div style="font-size: 18px;">'xl' font size</div>
|
|
161
|
+
* @property {string} h4=24px <div style="font-size: 24px;">'h4' font size</div>
|
|
162
|
+
* @property {string} h3=28px <div style="font-size: 28px;">'h3' font size</div>
|
|
163
|
+
* @property {string} h2=32px <div style="font-size: 32px;">'h2' font size</div>
|
|
164
|
+
* @property {string} h1=40px <div style="font-size: 40px;">'h1' font size</div>
|
|
165
|
+
*/
|
|
166
|
+
export const fontSizes = {
|
|
167
|
+
xs: '10px',
|
|
168
|
+
sm: '12px',
|
|
169
|
+
default: '14px',
|
|
170
|
+
md: '14px',
|
|
171
|
+
lg: '16px',
|
|
172
|
+
xl: '18px',
|
|
173
|
+
h4: '24px',
|
|
174
|
+
h3: '28px',
|
|
175
|
+
h2: '32px',
|
|
176
|
+
h1: '40px'
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @memberof Theme
|
|
181
|
+
* @alias fontWeights
|
|
182
|
+
* @property {string} lighter=200
|
|
183
|
+
* @property {string} lighter=300
|
|
184
|
+
* @property {string} normal=400
|
|
185
|
+
* @property {string} normal=500
|
|
186
|
+
* @property {string} bolder=900
|
|
187
|
+
*/
|
|
188
|
+
export const fontWeights = {
|
|
189
|
+
lighter: 200,
|
|
190
|
+
light: 300,
|
|
191
|
+
normal: 400,
|
|
192
|
+
bold: 700,
|
|
193
|
+
bolder: 900
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @memberof Theme
|
|
198
|
+
* @alias lineHeights
|
|
199
|
+
* @property {string} xs=10px
|
|
200
|
+
* @property {string} sm=12px
|
|
201
|
+
* @property {string} default=16px (alias md)
|
|
202
|
+
* @property {string} lg=24px
|
|
203
|
+
* @property {string} xl=32px
|
|
204
|
+
* @property {string} xxl=40px
|
|
205
|
+
*/
|
|
206
|
+
export const lineHeights = {
|
|
207
|
+
xs: '10px',
|
|
208
|
+
sm: '12px',
|
|
209
|
+
default: '16px',
|
|
210
|
+
md: '16px',
|
|
211
|
+
lg: '24px',
|
|
212
|
+
xl: '32px',
|
|
213
|
+
xxl: '40px'
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* This dimension can be used with `testShadow` and `boxShadow` props provided
|
|
218
|
+
* by {@link ShadowProps}
|
|
219
|
+
*
|
|
220
|
+
* ```javascript
|
|
221
|
+
* <Box variant="grey" boxShadow="card">Some content...</Box>
|
|
222
|
+
* ```
|
|
223
|
+
*
|
|
224
|
+
* @alias shadows
|
|
225
|
+
* @memberof Theme
|
|
226
|
+
* @property {string} login <div class="shadow-div" style="box-shadow: 0 15px 24px 0 rgba(137,138,154,0.15);"/>
|
|
227
|
+
* @property {string} cardHover <div class="shadow-div" style="box-shadow: 0 4px 12px 0 rgba(137,138,154,0.4);"/>
|
|
228
|
+
* @property {string} drawer <div class="shadow-div" style="box-shadow: -2px 0 8px 0 rgba(137,138,154,0.2);"/>
|
|
229
|
+
* @property {string} card <div class="shadow-div" style="box-shadow: 0 1px 6px 0 rgba(137,138,154,0.4);"/>
|
|
230
|
+
* @property {string} inputFocus <div class="shadow-div" style="box-shadow: 0 2px 4px 0 rgba(135,159,250,0.4);"/>
|
|
231
|
+
* @property {string} buttonFocus <div class="shadow-div" style="box-shadow: 0 4px 6px 0 rgba(56,202,241,0.3);"/>
|
|
232
|
+
*/
|
|
233
|
+
export const shadows = {
|
|
234
|
+
login: '0 15px 24px 0 rgba(137,138,154,0.15)',
|
|
235
|
+
cardHover: '0 4px 12px 0 rgba(137,138,154,0.4)',
|
|
236
|
+
drawer: '-2px 0 8px 0 rgba(137,138,154,0.2)',
|
|
237
|
+
card: '0rem 0.25rem 0.5rem rgba(0, 0, 0, 0.1)',
|
|
238
|
+
inputFocus: '0 2px 4px 0 rgba(135,159,250,0.4)',
|
|
239
|
+
buttonFocus: '0 4px 6px 0 rgba(56,202,241,0.3)'
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Responsive breakpoints
|
|
244
|
+
*
|
|
245
|
+
* How to use them - simply pass an array to given prop:
|
|
246
|
+
*
|
|
247
|
+
* ```javascript
|
|
248
|
+
* // Showing box on mobile devices
|
|
249
|
+
* <Box display={["block", "none"]}>...</Box>
|
|
250
|
+
*
|
|
251
|
+
* // responsive width
|
|
252
|
+
* <Box width={[1, 1/2, 1/3, 1/4]}>...</Box>
|
|
253
|
+
* ```
|
|
254
|
+
*
|
|
255
|
+
* @memberof Theme
|
|
256
|
+
* @alias breakpoints
|
|
257
|
+
* @property {string} 0=577px
|
|
258
|
+
* @property {string} 1=769px
|
|
259
|
+
* @property {string} 2=1024px
|
|
260
|
+
* @property {string} 3=1324px
|
|
261
|
+
*/
|
|
262
|
+
export const breakpoints = ['577px', '769px', '1024px', '1324px' // 1024 + sidebarWidth
|
|
263
|
+
];
|
|
264
|
+
export const font = '\'Roboto\', sans-serif';
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Border styles
|
|
268
|
+
*
|
|
269
|
+
* @memberof Theme
|
|
270
|
+
* @alias borders
|
|
271
|
+
* @property {string} input
|
|
272
|
+
* @property {string} filterInput
|
|
273
|
+
* @property {string} bg
|
|
274
|
+
* @property {string} default
|
|
275
|
+
*/
|
|
276
|
+
export const borders = {
|
|
277
|
+
input: `1px solid ${colors.border}`,
|
|
278
|
+
filterInput: ' 1px rgba(255,255,255, 0.15)',
|
|
279
|
+
bg: `1px solid ${colors.bg}`,
|
|
280
|
+
default: `1px solid ${colors.border}`
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Border widths set for an entire layout. If you like to have border radius in Button's and Box'es
|
|
285
|
+
* Then set default property.
|
|
286
|
+
*
|
|
287
|
+
* @memberof Theme
|
|
288
|
+
* @alias borderWidths
|
|
289
|
+
* @property {string} default - default border with
|
|
290
|
+
*/
|
|
291
|
+
export const borderWidths = {
|
|
292
|
+
default: '0px'
|
|
293
|
+
};
|
|
294
|
+
// TODO: add transitions
|
|
295
|
+
|
|
296
|
+
export const defaultProps = {};
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* The color utility parses a component's color and bg props and converts them into CSS
|
|
300
|
+
* declarations. By default the raw value of the prop is returned. But most often you
|
|
301
|
+
* would use one of the color from the [color palette]{@link colors}.
|
|
302
|
+
*
|
|
303
|
+
* @typedef {object} ColorProps
|
|
304
|
+
* @alias ColorProps
|
|
305
|
+
* @memberof Theme
|
|
306
|
+
* @property {string} [color] Text color. It could be either a #hash or
|
|
307
|
+
* {@link colors} from css theme name like
|
|
308
|
+
* `grey80`
|
|
309
|
+
* @property {string} [backgroundColor, bg] Background color. Similar as above could be a
|
|
310
|
+
* #hash or one of {@link colors}.
|
|
311
|
+
*/
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* The space utility converts shorthand margin and padding props to margin and padding
|
|
315
|
+
* CSS declarations.
|
|
316
|
+
*
|
|
317
|
+
* You can use as a value raw dimensions in "px" or one of the value from the
|
|
318
|
+
* [space scale]{@link space}.
|
|
319
|
+
*
|
|
320
|
+
* @typedef {object} SpaceProps
|
|
321
|
+
* @alias SpaceProps
|
|
322
|
+
* @memberof Theme
|
|
323
|
+
* @property {string} [margin, m] margin
|
|
324
|
+
* @property {string} [marginTop, mt] margin-top
|
|
325
|
+
* @property {string} [marginRight, mr] margin-right
|
|
326
|
+
* @property {string} [marginBottom, mb] margin-bottom
|
|
327
|
+
* @property {string} [marginLeft, ml] margin-left
|
|
328
|
+
* @property {string} [marginX, mx] margin-left and margin-right
|
|
329
|
+
* @property {string} [marginY, my] margin-top and margin-bottom
|
|
330
|
+
* @property {string} [padding, p] padding
|
|
331
|
+
* @property {string} [paddingTop, pt] padding-top
|
|
332
|
+
* @property {string} [paddingRight, pr] padding-right
|
|
333
|
+
* @property {string} [paddingBottom, pb] padding-bottom
|
|
334
|
+
* @property {string} [paddingLeft, pl] padding-left
|
|
335
|
+
* @property {string} [paddingX, px] padding-left and padding-right
|
|
336
|
+
* @property {string} [paddingY, py] padding-top and padding-bottom
|
|
337
|
+
*
|
|
338
|
+
* Set of props related to {@link space}. You can put there either string with 'px' or
|
|
339
|
+
* one of `space` properties like `sm`, `default`, `xl` etc.
|
|
340
|
+
*/
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Typography props include _fontFamily_, _fontSize_, _fontWeight_, _lineHeight_, _letterSpacing_,
|
|
344
|
+
* _textAlign_, and _fontStyle_.
|
|
345
|
+
*
|
|
346
|
+
* @typedef {object} TypographyProps
|
|
347
|
+
* @alias TypographyProps
|
|
348
|
+
* @memberof Theme
|
|
349
|
+
* @property {string} [fontSize] font-size. Could be either actual css value or key taken from
|
|
350
|
+
* {@link fontSizes}
|
|
351
|
+
* @property {string} [fontWeight] font-weight. Could be either actual css value or key taken from
|
|
352
|
+
* {@link fontWeights}
|
|
353
|
+
* @property {string} [lineHeight] line-height. Could be either actual css value or key taken from
|
|
354
|
+
* {@link lineHeights}
|
|
355
|
+
* @property {string} [textAlign] text-align
|
|
356
|
+
* @property {string} [fontFamily] font-family
|
|
357
|
+
* @property {string} [fontStyle] font-style
|
|
358
|
+
* @property {string} [letterSpacing] letter-spacing
|
|
359
|
+
*/
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* The layout utility includes style props for width, height, display, minWidth,
|
|
363
|
+
* minHeight, maxWidth, maxHeight, size, verticalAlign, overflow, overflowX, and overflowY.
|
|
364
|
+
*
|
|
365
|
+
* The width prop is transformed based on the following:
|
|
366
|
+
*
|
|
367
|
+
* - Numbers from 0-1 are converted to percentage widths.
|
|
368
|
+
* - Numbers greater than 1 are converted to pixel values.
|
|
369
|
+
* - String values are passed as raw CSS values.
|
|
370
|
+
* - And arrays are converted to responsive width styles.
|
|
371
|
+
* - the width prop will attempt to pick up values from the {@link sizes}
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* // width `50%`
|
|
375
|
+
* <Box width={1/2} />
|
|
376
|
+
*
|
|
377
|
+
* // width `256px`
|
|
378
|
+
* <Box width={256} />
|
|
379
|
+
*
|
|
380
|
+
* // width `'2em'`
|
|
381
|
+
* <Box width='2em' />
|
|
382
|
+
*
|
|
383
|
+
* // width `100%` on all viewport and `50%` from the smallest breakpoint and up
|
|
384
|
+
* <Box width={[ 1, 1/2 ]} />
|
|
385
|
+
*
|
|
386
|
+
* // width from `sizes`
|
|
387
|
+
* <Box height='navbarHeight' />
|
|
388
|
+
*
|
|
389
|
+
* @typedef {object} LayoutProps
|
|
390
|
+
* @alias LayoutProps
|
|
391
|
+
* @memberof Theme
|
|
392
|
+
* @property {string} [width] width
|
|
393
|
+
* @property {string} [height] height
|
|
394
|
+
* @property {string} [display] display
|
|
395
|
+
* @property {string} [minWidth] min-width
|
|
396
|
+
* @property {string} [minHeight] min-height
|
|
397
|
+
* @property {string} [maxWidth] max-width
|
|
398
|
+
* @property {string} [maxHeight] max-height
|
|
399
|
+
* @property {string} [size] size
|
|
400
|
+
* @property {string} [verticalAlign] vertical-align
|
|
401
|
+
* @property {string} [overflow] overflow
|
|
402
|
+
* @property {string} [overflowX] overflow-x
|
|
403
|
+
* @property {string} [overflowY] overflow-y
|
|
404
|
+
*/
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* The flexbox utility includes style props for alignItems, alignContent, justifyItems,
|
|
408
|
+
* justifyContent, flexWrap, flexDirection, flex, flexGrow, flexShrink, flexBasis,
|
|
409
|
+
* justifySelf, alignSelf, and order.
|
|
410
|
+
*
|
|
411
|
+
* The width prop is transformed based on the following:
|
|
412
|
+
*
|
|
413
|
+
* - Numbers from 0-1 are converted to percentage widths.
|
|
414
|
+
* - Numbers greater than 1 are converted to pixel values.
|
|
415
|
+
* - String values are passed as raw CSS values.
|
|
416
|
+
* - And arrays are converted to responsive width styles.
|
|
417
|
+
* - the width prop will attempt to pick up values from the {@link sizes}
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* // alignItems
|
|
421
|
+
* <Box alignItems='center' />
|
|
422
|
+
*
|
|
423
|
+
* // alignContent
|
|
424
|
+
* <Box alignContent='center' />
|
|
425
|
+
*
|
|
426
|
+
* // justifyContent
|
|
427
|
+
* <Box justifyContent='center' />
|
|
428
|
+
*
|
|
429
|
+
* // flexWrap
|
|
430
|
+
* <Box flexWrap='wrap' />
|
|
431
|
+
*
|
|
432
|
+
* // flexBasis
|
|
433
|
+
* <Box flexBasis='auto' />
|
|
434
|
+
*
|
|
435
|
+
* // flexDirection
|
|
436
|
+
* <Box flexDirection='column' />
|
|
437
|
+
*
|
|
438
|
+
* // flex
|
|
439
|
+
* <Box flex />
|
|
440
|
+
*
|
|
441
|
+
* // justifySelf
|
|
442
|
+
* <Box justifySelf='center' />
|
|
443
|
+
*
|
|
444
|
+
* // alignSelf
|
|
445
|
+
* <Box alignSelf='center' />
|
|
446
|
+
*
|
|
447
|
+
* // order
|
|
448
|
+
* <Box order='2' />
|
|
449
|
+
*
|
|
450
|
+
* @typedef {object} FlexboxProps
|
|
451
|
+
* @alias FlexboxProps
|
|
452
|
+
* @memberof Theme
|
|
453
|
+
* @property {string} [alignItems] align-items
|
|
454
|
+
* @property {string} [alignContent] align-content
|
|
455
|
+
* @property {string} [justifyItems] justify-items
|
|
456
|
+
* @property {string} [justifyContent] justify-content
|
|
457
|
+
* @property {string} [flexWrap] flex-wrap
|
|
458
|
+
* @property {string} [flexDirection] flex-direction
|
|
459
|
+
* @property {boolean} [flex] flex
|
|
460
|
+
* @property {number|string} [flexGrow] flex-grow
|
|
461
|
+
* @property {number} [flexShrink] flex-shrink
|
|
462
|
+
* @property {string} [flexBasis] flex-basis
|
|
463
|
+
* @property {string} [justifySelf] justify-self
|
|
464
|
+
* @property {string} [alignSelf] align-self
|
|
465
|
+
* @property {number|string} [order] order
|
|
466
|
+
*/
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Reused Variant Enum: `primary` | `danger` | `success` | `info` | `secondary` | `default`
|
|
470
|
+
*
|
|
471
|
+
* @typedef {Enum} VariantType
|
|
472
|
+
* @alias VariantType
|
|
473
|
+
* @memberof Theme
|
|
474
|
+
*/
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* The border utility includes all style props related to border
|
|
478
|
+
*
|
|
479
|
+
* @typedef {object} BorderProps
|
|
480
|
+
* @alias BorderProps
|
|
481
|
+
* @memberof Theme
|
|
482
|
+
* @property {string | number} [borderWidth]
|
|
483
|
+
* @property {string} [borderStyle]
|
|
484
|
+
* @property {string} [borderColor] It could be either a #hash or {@link colors}
|
|
485
|
+
* @property {string | number} [borderRadius]
|
|
486
|
+
* @property {string | number} [borderTop]
|
|
487
|
+
* @property {string | number} [borderTopWidth]
|
|
488
|
+
* @property {string} [borderTopStyle]
|
|
489
|
+
* @property {string} [borderTopColor] It could be either a #hash or {@link colors}
|
|
490
|
+
* @property {string | number} [borderTopLeftRadius]
|
|
491
|
+
* @property {string | number} [borderTopRightRadius]
|
|
492
|
+
* @property {string | number} [borderRight]
|
|
493
|
+
* @property {string | number} [borderRightWidth]
|
|
494
|
+
* @property {string} [borderRightStyle]
|
|
495
|
+
* @property {string} [borderRightColor] It could be either a #hash or {@link colors}
|
|
496
|
+
* @property {string | number} [borderBottom]
|
|
497
|
+
* @property {string | number} [borderBottomWidth]
|
|
498
|
+
* @property {string} [borderBottomStyle]
|
|
499
|
+
* @property {string} [borderBottomColor] It could be either a #hash or {@link colors}
|
|
500
|
+
* @property {string | number} [borderBottomLeftRadius]
|
|
501
|
+
* @property {string | number} [borderBottomRightRadius]
|
|
502
|
+
* @property {string | number} [borderLeft]
|
|
503
|
+
* @property {string | number} [borderLeftWidth]
|
|
504
|
+
* @property {string} [borderLeftStyle]
|
|
505
|
+
* @property {string} [borderLeftColor] It could be either a #hash or {@link colors}
|
|
506
|
+
* @property {string | number} [borderX]
|
|
507
|
+
* @property {string | number} [borderY]
|
|
508
|
+
*/
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* The position utility includes style props for position, zIndex, top, right, bottom, and left.
|
|
512
|
+
*
|
|
513
|
+
* @typedef {object} PositionProps
|
|
514
|
+
* @alias PositionProps
|
|
515
|
+
* @memberof Theme
|
|
516
|
+
* property {string | number} [position]
|
|
517
|
+
* property {string | number} [zIndex]
|
|
518
|
+
* property {string | number} [top]
|
|
519
|
+
* property {string | number} [right]
|
|
520
|
+
* property {string | number} [bottom]
|
|
521
|
+
* property {string | number} [left]
|
|
522
|
+
*/
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* The shadow utility includes style props for textShadow and boxShadow.
|
|
526
|
+
*
|
|
527
|
+
* @typedef {object} ShadowProps
|
|
528
|
+
* @alias ShadowProps
|
|
529
|
+
* @memberof Theme
|
|
530
|
+
* property {string} [boxShadow]
|
|
531
|
+
* property {string} [textShadow]
|
|
532
|
+
*/
|