@crystallize/design-system 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +118 -0
- package/dist/TableComponent-I2YOOYOU.css +281 -0
- package/dist/TableComponent-QINOO453.mjs +1377 -0
- package/dist/arrow-clockwise-Z2G6UEGP.svg +1 -0
- package/dist/arrow-counterclockwise-2O5EYVJT.svg +1 -0
- package/dist/bg-color-HB2WDYGO.svg +1 -0
- package/dist/camera-CR7D2PNH.svg +1 -0
- package/dist/caret-right-fill-FFBNEXVX.svg +1 -0
- package/dist/chat-square-quote-CI6PUJHH.svg +1 -0
- package/dist/chevron-down-3FRWSIKS.svg +1 -0
- package/dist/chunk-VUXQZRSP.mjs +737 -0
- package/dist/clipboard-OSEFDF25.svg +1 -0
- package/dist/close-FH57ZMJF.svg +1 -0
- package/dist/code-SEVR6TIQ.svg +1 -0
- package/dist/copy-DMGDODUL.svg +1 -0
- package/dist/diagram-2-CEJUD2B4.svg +1 -0
- package/dist/download-JXUGIUCX.svg +1 -0
- package/dist/draggable-block-menu-KKHDNKJA.svg +1 -0
- package/dist/dropdown-more-BHZ5COKX.svg +1 -0
- package/dist/file-image-TIQPFJX4.svg +1 -0
- package/dist/filetype-gif-OG2BEYYK.svg +1 -0
- package/dist/font-color-J4GA3ZJO.svg +1 -0
- package/dist/font-family-ZU5N6TTE.svg +1 -0
- package/dist/gear-ICMT4NTP.svg +1 -0
- package/dist/horizontal-rule-N6RD2V7H.svg +1 -0
- package/dist/indent-MJ6JIMCK.svg +1 -0
- package/dist/index.css +4209 -0
- package/dist/index.d.ts +450 -3
- package/dist/index.js +11526 -5
- package/dist/index.mjs +9437 -0
- package/dist/journal-code-XUT44HDV.svg +1 -0
- package/dist/justify-J7X5JEEX.svg +1 -0
- package/dist/link-W52N4JKZ.svg +1 -0
- package/dist/list-ol-2ZEUN4Z7.svg +1 -0
- package/dist/list-ul-DVKNUP47.svg +1 -0
- package/dist/lock-WCYOZOHW.svg +1 -0
- package/dist/lock-fill-JZSKOSHK.svg +1 -0
- package/dist/markdown-4BGQNLLT.svg +1 -0
- package/dist/mic-H5FNOMM7.svg +1 -0
- package/dist/outdent-2LUMUMIP.svg +1 -0
- package/dist/paint-bucket-VCISMZTH.svg +1 -0
- package/dist/palette-SWGFPRWZ.svg +1 -0
- package/dist/pencil-fill-STFSC26F.svg +1 -0
- package/dist/plug-HGGGEVS3.svg +1 -0
- package/dist/plug-fill-OTG3U4TN.svg +1 -0
- package/dist/plus-CQISIKEC.svg +1 -0
- package/dist/plus-slash-minus-N22JU4TI.svg +1 -0
- package/dist/prettier-WUJ7B5NV.svg +1 -0
- package/dist/prettier-error-DYJSLYDP.svg +1 -0
- package/dist/square-check-UTG6FU6D.svg +1 -0
- package/dist/success-YVXUMPEZ.svg +1 -0
- package/dist/table-BR6DI4ZQ.svg +1 -0
- package/dist/text-center-UQI6PAEF.svg +1 -0
- package/dist/text-left-KT2B6TR3.svg +1 -0
- package/dist/text-paragraph-MFTUIIQG.svg +1 -0
- package/dist/text-right-SKELPISG.svg +1 -0
- package/dist/trash-UOM6D7TD.svg +1 -0
- package/dist/type-bold-PY7COC3N.svg +1 -0
- package/dist/type-h1-6KJP7YOM.svg +1 -0
- package/dist/type-h2-VHI2USC3.svg +1 -0
- package/dist/type-h3-JIU77CHO.svg +1 -0
- package/dist/type-h4-P5EHKDAL.svg +1 -0
- package/dist/type-h5-CS2KYVRG.svg +1 -0
- package/dist/type-h6-J2O74LJZ.svg +1 -0
- package/dist/type-italic-3DSFOSG2.svg +1 -0
- package/dist/type-strikethrough-E2KKQFSX.svg +1 -0
- package/dist/type-subscript-BMPTRIBU.svg +1 -0
- package/dist/type-superscript-EDF6EPAA.svg +1 -0
- package/dist/type-underline-CBFA5VLF.svg +1 -0
- package/dist/upload-Q6KICGZW.svg +1 -0
- package/dist/user-EOI2NEFZ.svg +1 -0
- package/package.json +114 -79
- package/readme.md +9 -0
- package/src/action-menu/ActionMenu.stories.tsx +25 -0
- package/src/action-menu/action-item.tsx +16 -0
- package/src/action-menu/action-menu.css +38 -0
- package/src/action-menu/action-menu.tsx +25 -0
- package/src/action-menu/index.tsx +3 -0
- package/src/avatar/Avatar.stories.tsx +20 -0
- package/src/avatar/avatar.css +23 -0
- package/src/avatar/avatar.tsx +34 -0
- package/src/avatar/get-initials.ts +5 -0
- package/src/avatar/index.ts +1 -0
- package/src/button/Button.stories.tsx +105 -0
- package/src/button/button.css +116 -0
- package/src/button/button.tsx +136 -0
- package/src/button/index.ts +3 -0
- package/src/card/card.css +7 -0
- package/src/card/card.stories.tsx +24 -0
- package/src/card/card.tsx +27 -0
- package/src/card/index.ts +3 -0
- package/src/checkbox/checkbox.css +30 -0
- package/src/checkbox/checkbox.stories.tsx +62 -0
- package/src/checkbox/checkbox.test.tsx +16 -0
- package/src/checkbox/checkbox.tsx +28 -0
- package/src/checkbox/index.ts +1 -0
- package/src/colors/Colors.stories.tsx +127 -0
- package/src/colors/color-defaults.json +15 -0
- package/src/colors/color-pairing.json +12 -0
- package/src/colors/colors.json +158 -0
- package/src/colors/index.ts +1 -0
- package/src/colors/old-to-new.txt +19 -0
- package/src/colors/types.ts +29 -0
- package/src/dialog/Dialog.stories.tsx +168 -0
- package/src/dialog/Dialog.test.tsx +25 -0
- package/src/dialog/config.tsx +139 -0
- package/src/dialog/confirm-dialog.tsx +70 -0
- package/src/dialog/destroyFns.ts +1 -0
- package/src/dialog/dialog.css +27 -0
- package/src/dialog/dialog.tsx +95 -0
- package/src/dialog/index.tsx +40 -0
- package/src/dialog/types.ts +70 -0
- package/src/dropdown-menu/DropdownMenu.stories.tsx +38 -0
- package/src/dropdown-menu/dropdown-menu-item.tsx +15 -0
- package/src/dropdown-menu/dropdown-menu-label.tsx +10 -0
- package/src/dropdown-menu/dropdown-menu-root.tsx +33 -0
- package/src/dropdown-menu/dropdown-menu.css +20 -0
- package/src/dropdown-menu/index.ts +11 -0
- package/src/icon-button/IconButton.stories.tsx +45 -0
- package/src/icon-button/icon-button.css +50 -0
- package/src/icon-button/icon-button.tsx +39 -0
- package/src/icon-button/index.ts +3 -0
- package/src/iconography/Icon.stories.tsx +47 -0
- package/src/iconography/add.tsx +30 -0
- package/src/iconography/arrow.tsx +15 -0
- package/src/iconography/atom.tsx +59 -0
- package/src/iconography/cancel.tsx +26 -0
- package/src/iconography/catalogue.tsx +26 -0
- package/src/iconography/copy.tsx +24 -0
- package/src/iconography/crystal.tsx +93 -0
- package/src/iconography/customers.tsx +38 -0
- package/src/iconography/edit.tsx +30 -0
- package/src/iconography/error.tsx +40 -0
- package/src/iconography/fulfilment.tsx +58 -0
- package/src/iconography/glasses.tsx +62 -0
- package/src/iconography/graphQL.tsx +90 -0
- package/src/iconography/grid.tsx +84 -0
- package/src/iconography/hooks.tsx +26 -0
- package/src/iconography/image.tsx +47 -0
- package/src/iconography/index.ts +63 -0
- package/src/iconography/info.tsx +41 -0
- package/src/iconography/key.tsx +19 -0
- package/src/iconography/language.tsx +38 -0
- package/src/iconography/nail-polish.tsx +84 -0
- package/src/iconography/order.tsx +38 -0
- package/src/iconography/particle.tsx +88 -0
- package/src/iconography/percentage.tsx +44 -0
- package/src/iconography/price-tag.tsx +40 -0
- package/src/iconography/shapes.tsx +48 -0
- package/src/iconography/subscription.tsx +34 -0
- package/src/iconography/topics.tsx +58 -0
- package/src/iconography/triangle.tsx +27 -0
- package/src/iconography/usage.tsx +34 -0
- package/src/iconography/users.tsx +44 -0
- package/src/iconography/warning.tsx +51 -0
- package/src/index.css +14 -0
- package/src/index.ts +33 -0
- package/src/inline-radio/index.ts +1 -0
- package/src/inline-radio/inline-radio.css +36 -0
- package/src/inline-radio/inline-radio.stories.tsx +81 -0
- package/src/inline-radio/inline-radio.tsx +41 -0
- package/src/input/Input.stories.tsx +26 -0
- package/src/input/index.ts +1 -0
- package/src/input/input.css +7 -0
- package/src/input/input.tsx +20 -0
- package/src/input-with-label/InputWithLabel.stories.tsx +98 -0
- package/src/input-with-label/index.ts +3 -0
- package/src/input-with-label/input-with-label.css +35 -0
- package/src/input-with-label/input-with-label.tsx +59 -0
- package/src/label/index.ts +1 -0
- package/src/label/label.css +3 -0
- package/src/label/label.stories.tsx +19 -0
- package/src/label/label.tsx +13 -0
- package/src/progress/Progress.stories.tsx +26 -0
- package/src/progress/index.ts +1 -0
- package/src/progress/progress.css +7 -0
- package/src/progress/progress.tsx +17 -0
- package/src/radio/index.ts +1 -0
- package/src/radio/radio.css +20 -0
- package/src/radio/radio.stories.tsx +142 -0
- package/src/radio/radio.tsx +19 -0
- package/src/rich-text-editor/appSettings.ts +28 -0
- package/src/rich-text-editor/context/SettingsContext.tsx +71 -0
- package/src/rich-text-editor/context/SharedAutocompleteContext.tsx +60 -0
- package/src/rich-text-editor/context/SharedHistoryContext.tsx +25 -0
- package/src/rich-text-editor/hooks/useReport.ts +64 -0
- package/src/rich-text-editor/images/cat-typing.gif +0 -0
- package/src/rich-text-editor/images/emoji/1F600.png +0 -0
- package/src/rich-text-editor/images/emoji/1F641.png +0 -0
- package/src/rich-text-editor/images/emoji/1F642.png +0 -0
- package/src/rich-text-editor/images/emoji/2764.png +0 -0
- package/src/rich-text-editor/images/emoji/LICENSE.md +5 -0
- package/src/rich-text-editor/images/icons/LICENSE.md +5 -0
- package/src/rich-text-editor/images/icons/arrow-clockwise.svg +1 -0
- package/src/rich-text-editor/images/icons/arrow-counterclockwise.svg +1 -0
- package/src/rich-text-editor/images/icons/bg-color.svg +1 -0
- package/src/rich-text-editor/images/icons/camera.svg +1 -0
- package/src/rich-text-editor/images/icons/card-checklist.svg +1 -0
- package/src/rich-text-editor/images/icons/caret-right-fill.svg +1 -0
- package/src/rich-text-editor/images/icons/chat-left-text.svg +1 -0
- package/src/rich-text-editor/images/icons/chat-right-dots.svg +1 -0
- package/src/rich-text-editor/images/icons/chat-right-text.svg +1 -0
- package/src/rich-text-editor/images/icons/chat-right.svg +1 -0
- package/src/rich-text-editor/images/icons/chat-square-quote.svg +1 -0
- package/src/rich-text-editor/images/icons/chevron-down.svg +1 -0
- package/src/rich-text-editor/images/icons/clipboard.svg +1 -0
- package/src/rich-text-editor/images/icons/close.svg +1 -0
- package/src/rich-text-editor/images/icons/code.svg +1 -0
- package/src/rich-text-editor/images/icons/comments.svg +1 -0
- package/src/rich-text-editor/images/icons/copy.svg +1 -0
- package/src/rich-text-editor/images/icons/diagram-2.svg +1 -0
- package/src/rich-text-editor/images/icons/download.svg +1 -0
- package/src/rich-text-editor/images/icons/draggable-block-menu.svg +1 -0
- package/src/rich-text-editor/images/icons/dropdown-more.svg +1 -0
- package/src/rich-text-editor/images/icons/figma.svg +1 -0
- package/src/rich-text-editor/images/icons/file-image.svg +1 -0
- package/src/rich-text-editor/images/icons/filetype-gif.svg +1 -0
- package/src/rich-text-editor/images/icons/font-color.svg +1 -0
- package/src/rich-text-editor/images/icons/font-family.svg +1 -0
- package/src/rich-text-editor/images/icons/gear.svg +1 -0
- package/src/rich-text-editor/images/icons/horizontal-rule.svg +1 -0
- package/src/rich-text-editor/images/icons/indent.svg +1 -0
- package/src/rich-text-editor/images/icons/journal-code.svg +1 -0
- package/src/rich-text-editor/images/icons/journal-text.svg +1 -0
- package/src/rich-text-editor/images/icons/justify.svg +1 -0
- package/src/rich-text-editor/images/icons/link.svg +1 -0
- package/src/rich-text-editor/images/icons/list-ol.svg +1 -0
- package/src/rich-text-editor/images/icons/list-ul.svg +1 -0
- package/src/rich-text-editor/images/icons/lock-fill.svg +1 -0
- package/src/rich-text-editor/images/icons/lock.svg +1 -0
- package/src/rich-text-editor/images/icons/markdown.svg +1 -0
- package/src/rich-text-editor/images/icons/mic.svg +1 -0
- package/src/rich-text-editor/images/icons/outdent.svg +1 -0
- package/src/rich-text-editor/images/icons/paint-bucket.svg +1 -0
- package/src/rich-text-editor/images/icons/palette.svg +1 -0
- package/src/rich-text-editor/images/icons/pencil-fill.svg +1 -0
- package/src/rich-text-editor/images/icons/plug-fill.svg +1 -0
- package/src/rich-text-editor/images/icons/plug.svg +1 -0
- package/src/rich-text-editor/images/icons/plus-slash-minus.svg +1 -0
- package/src/rich-text-editor/images/icons/plus.svg +1 -0
- package/src/rich-text-editor/images/icons/prettier-error.svg +1 -0
- package/src/rich-text-editor/images/icons/prettier.svg +1 -0
- package/src/rich-text-editor/images/icons/send.svg +1 -0
- package/src/rich-text-editor/images/icons/square-check.svg +1 -0
- package/src/rich-text-editor/images/icons/sticky.svg +1 -0
- package/src/rich-text-editor/images/icons/success.svg +1 -0
- package/src/rich-text-editor/images/icons/table.svg +1 -0
- package/src/rich-text-editor/images/icons/text-center.svg +1 -0
- package/src/rich-text-editor/images/icons/text-left.svg +1 -0
- package/src/rich-text-editor/images/icons/text-paragraph.svg +1 -0
- package/src/rich-text-editor/images/icons/text-right.svg +1 -0
- package/src/rich-text-editor/images/icons/trash.svg +1 -0
- package/src/rich-text-editor/images/icons/trash3.svg +1 -0
- package/src/rich-text-editor/images/icons/tweet.svg +1 -0
- package/src/rich-text-editor/images/icons/type-bold.svg +1 -0
- package/src/rich-text-editor/images/icons/type-h1.svg +1 -0
- package/src/rich-text-editor/images/icons/type-h2.svg +1 -0
- package/src/rich-text-editor/images/icons/type-h3.svg +1 -0
- package/src/rich-text-editor/images/icons/type-h4.svg +1 -0
- package/src/rich-text-editor/images/icons/type-h5.svg +1 -0
- package/src/rich-text-editor/images/icons/type-h6.svg +1 -0
- package/src/rich-text-editor/images/icons/type-italic.svg +1 -0
- package/src/rich-text-editor/images/icons/type-strikethrough.svg +1 -0
- package/src/rich-text-editor/images/icons/type-subscript.svg +1 -0
- package/src/rich-text-editor/images/icons/type-superscript.svg +1 -0
- package/src/rich-text-editor/images/icons/type-underline.svg +1 -0
- package/src/rich-text-editor/images/icons/upload.svg +1 -0
- package/src/rich-text-editor/images/icons/user.svg +1 -0
- package/src/rich-text-editor/images/icons/youtube.svg +1 -0
- package/src/rich-text-editor/images/image/LICENSE.md +5 -0
- package/src/rich-text-editor/images/landscape.jpg +0 -0
- package/src/rich-text-editor/images/logo.svg +1 -0
- package/src/rich-text-editor/images/yellow-flower-small.jpg +0 -0
- package/src/rich-text-editor/images/yellow-flower.jpg +0 -0
- package/src/rich-text-editor/index.ts +1 -0
- package/src/rich-text-editor/model/crystallize-rich-text-types/code.ts +39 -0
- package/src/rich-text-editor/model/crystallize-rich-text-types/headings.ts +12 -0
- package/src/rich-text-editor/model/crystallize-rich-text-types/index.ts +69 -0
- package/src/rich-text-editor/model/crystallize-rich-text-types/link.ts +9 -0
- package/src/rich-text-editor/model/crystallize-rich-text-types/table.ts +16 -0
- package/src/rich-text-editor/model/crystallize-to-lexical.ts +186 -0
- package/src/rich-text-editor/model/lexical-to-crystallize.ts +232 -0
- package/src/rich-text-editor/nodes/AutocompleteNode.tsx +96 -0
- package/src/rich-text-editor/nodes/BaseNodes.ts +45 -0
- package/src/rich-text-editor/nodes/KeywordNode.ts +73 -0
- package/src/rich-text-editor/nodes/TableCellNodes.ts +31 -0
- package/src/rich-text-editor/nodes/TableComponent.tsx +1547 -0
- package/src/rich-text-editor/nodes/TableNode.tsx +398 -0
- package/src/rich-text-editor/plugins/ActionsPlugin/index.tsx +83 -0
- package/src/rich-text-editor/plugins/AutoLinkPlugin/index.tsx +47 -0
- package/src/rich-text-editor/plugins/AutocompletePlugin/index.tsx +2536 -0
- package/src/rich-text-editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.tsx +60 -0
- package/src/rich-text-editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.css +14 -0
- package/src/rich-text-editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.tsx +140 -0
- package/src/rich-text-editor/plugins/CodeActionMenuPlugin/index.css +46 -0
- package/src/rich-text-editor/plugins/CodeActionMenuPlugin/index.tsx +155 -0
- package/src/rich-text-editor/plugins/CodeHighlightPlugin/index.ts +21 -0
- package/src/rich-text-editor/plugins/ComponentPickerPlugin/index.tsx +320 -0
- package/src/rich-text-editor/plugins/DragDropPastePlugin/index.ts +40 -0
- package/src/rich-text-editor/plugins/DraggableBlockPlugin/index.css +36 -0
- package/src/rich-text-editor/plugins/DraggableBlockPlugin/index.tsx +368 -0
- package/src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.css +40 -0
- package/src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.tsx +305 -0
- package/src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.css +128 -0
- package/src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx +351 -0
- package/src/rich-text-editor/plugins/LinkPlugin/index.tsx +16 -0
- package/src/rich-text-editor/plugins/ListMaxIndentLevelPlugin/index.ts +86 -0
- package/src/rich-text-editor/plugins/MarkdownShortcutPlugin/index.tsx +16 -0
- package/src/rich-text-editor/plugins/MarkdownTransformers/index.ts +195 -0
- package/src/rich-text-editor/plugins/MaxLengthPlugin/index.tsx +49 -0
- package/src/rich-text-editor/plugins/SpeechToTextPlugin/index.ts +113 -0
- package/src/rich-text-editor/plugins/TabFocusPlugin/index.tsx +65 -0
- package/src/rich-text-editor/plugins/TableActionMenuPlugin/index.tsx +481 -0
- package/src/rich-text-editor/plugins/TableCellResizer/index.css +12 -0
- package/src/rich-text-editor/plugins/TableCellResizer/index.tsx +386 -0
- package/src/rich-text-editor/plugins/TablePlugin.tsx +190 -0
- package/src/rich-text-editor/plugins/ToolbarPlugin/index.tsx +726 -0
- package/src/rich-text-editor/plugins/TreeViewPlugin/index.tsx +25 -0
- package/src/rich-text-editor/plugins/TypingPerfPlugin/index.ts +117 -0
- package/src/rich-text-editor/rich-text-editor.css +1396 -0
- package/src/rich-text-editor/rich-text-editor.stories.tsx +385 -0
- package/src/rich-text-editor/rich-text-editor.tsx +228 -0
- package/src/rich-text-editor/tests/rich-text-editor-basic-rendering.test.tsx +47 -0
- package/src/rich-text-editor/tests/rich-text-editor-code.test.tsx +39 -0
- package/src/rich-text-editor/tests/rich-text-editor-model-basics.test.tsx +56 -0
- package/src/rich-text-editor/tests/rich-text-editor-model-conversions.test.tsx +195 -0
- package/src/rich-text-editor/tests/rich-text-editor-onchange.test.tsx +37 -0
- package/src/rich-text-editor/tests/rich-text-editor-quote.test.tsx +36 -0
- package/src/rich-text-editor/tests/rich-text-editor-text-formats.test.tsx +135 -0
- package/src/rich-text-editor/tests/rich-text-editor-typing.test.tsx +73 -0
- package/src/rich-text-editor/tests/utils.ts +23 -0
- package/src/rich-text-editor/themes/PlaygroundEditorTheme.css +433 -0
- package/src/rich-text-editor/themes/PlaygroundEditorTheme.ts +113 -0
- package/src/rich-text-editor/types.ts +5 -0
- package/src/rich-text-editor/ui/ContentEditable.css +13 -0
- package/src/rich-text-editor/ui/ContentEditable.tsx +15 -0
- package/src/rich-text-editor/ui/LinkPreview.css +57 -0
- package/src/rich-text-editor/ui/LinkPreview.tsx +169 -0
- package/src/rich-text-editor/utils/environment.ts +1 -0
- package/src/rich-text-editor/utils/getDOMRangeRect.ts +42 -0
- package/src/rich-text-editor/utils/getSelectedNode.ts +27 -0
- package/src/rich-text-editor/utils/guard.ts +10 -0
- package/src/rich-text-editor/utils/isMobileWidth.ts +7 -0
- package/src/rich-text-editor/utils/joinClasses.ts +13 -0
- package/src/rich-text-editor/utils/point.ts +55 -0
- package/src/rich-text-editor/utils/rect.ts +158 -0
- package/src/rich-text-editor/utils/setFloatingElemPosition.ts +46 -0
- package/src/rich-text-editor/utils/swipe.ts +127 -0
- package/src/rich-text-editor/utils/url.ts +33 -0
- package/src/select/index.ts +1 -0
- package/src/select/select-item.tsx +18 -0
- package/src/select/select-root.tsx +50 -0
- package/src/select/select.css +44 -0
- package/src/select/select.stories.tsx +74 -0
- package/src/select/select.ts +9 -0
- package/src/slider/Slider.stories.tsx +54 -0
- package/src/slider/index.ts +1 -0
- package/src/slider/slider.css +27 -0
- package/src/slider/slider.tsx +20 -0
- package/src/spinner/Spinner.stories.tsx +19 -0
- package/src/spinner/index.tsx +48 -0
- package/src/spinner/spinner.css +11 -0
- package/src/tag/Tag.stories.tsx +32 -0
- package/src/tag/index.ts +1 -0
- package/src/tag/tag.css +7 -0
- package/src/tag/tag.tsx +27 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.cjs +51 -0
- package/LICENSE +0 -21
- package/README.md +0 -87
- package/dist/components/Button.d.ts +0 -11
- package/dist/components/Checkbox.d.ts +0 -29
- package/dist/components/Typography.d.ts +0 -14
- package/dist/design-system.cjs.development.js +0 -251
- package/dist/design-system.cjs.development.js.map +0 -1
- package/dist/design-system.cjs.production.min.js +0 -2
- package/dist/design-system.cjs.production.min.js.map +0 -1
- package/dist/design-system.esm.js +0 -245
- package/dist/design-system.esm.js.map +0 -1
- package/dist/styles/theme.d.ts +0 -2
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { forwardRef, SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
type TopicsProps = SVGProps<SVGSVGElement>;
|
|
4
|
+
|
|
5
|
+
type TopicsRef = SVGSVGElement;
|
|
6
|
+
|
|
7
|
+
export const Topics = forwardRef<TopicsRef, TopicsProps>((delegated, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<svg ref={ref} width="23" height="23" viewBox="0 0 23 23" fill="none" {...delegated}>
|
|
10
|
+
<path
|
|
11
|
+
d="M10.922 11.146H9.274c-.075 0-.075.697 0 .697h.027v-.697H7.395c-.075 0-.075.697 0 .697h1.908c.075 0 .075-.697 0-.697h-.027v.697h1.647c.074 0 .074-.697-.001-.697Z"
|
|
12
|
+
fill="#528693"
|
|
13
|
+
/>
|
|
14
|
+
<path
|
|
15
|
+
d="M15.221 11.146H11.6c-.165 0-.166.697 0 .697h.058v-.697H7.461c-.165 0-.166.697 0 .697h4.196c.165 0 .165-.697 0-.697H11.6v.697h3.622c.165 0 .166-.697 0-.697Z"
|
|
16
|
+
fill="#528693"
|
|
17
|
+
/>
|
|
18
|
+
<path
|
|
19
|
+
d="M6.713 13.669a2.108 2.108 0 0 1-2.243-2.144 2.114 2.114 0 0 1 2.165-2.204 2.209 2.209 0 0 1 2.116 2.094c0 1.38-.825 2.254-2.038 2.254Z"
|
|
20
|
+
fill="#fff"
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
d="M6.713 13.318a1.813 1.813 0 0 1-1.648-2.751 1.837 1.837 0 0 1 1.191-.854c2.376-.484 2.983 3.478.457 3.607-.446.023-.45.716 0 .698a2.462 2.462 0 0 0 2.373-2.887 2.558 2.558 0 0 0-2.762-2.14 2.528 2.528 0 0 0 .39 5.029.351.351 0 0 0 0-.702ZM15.01 17.67h-3.684v-5.477a.351.351 0 0 0-.696 0v.152h.696V5.32h3.685a.35.35 0 0 0 0-.696h-3.746a.652.652 0 0 0-.329.056.554.554 0 0 0-.307.541v7.124a.351.351 0 0 0 .697 0v-.156h-.697v5.519a.596.596 0 0 0 .187.522.694.694 0 0 0 .53.136h3.664a.351.351 0 0 0 0-.697Z"
|
|
24
|
+
fill="#528693"
|
|
25
|
+
/>
|
|
26
|
+
<path
|
|
27
|
+
d="M15.439 13.208a1.705 1.705 0 0 1-1.55-2.584 1.727 1.727 0 0 1 1.117-.803c2.236-.462 2.808 3.27.43 3.389-.335.017-.338.537 0 .523a2.183 2.183 0 0 0 2.101-2.562 2.27 2.27 0 0 0-2.457-1.895 2.24 2.24 0 0 0 .351 4.461.264.264 0 1 0 .008-.529Z"
|
|
28
|
+
fill="#528693"
|
|
29
|
+
/>
|
|
30
|
+
<path
|
|
31
|
+
d="M15.448 13.669a2.106 2.106 0 0 1-2.243-2.144 2.115 2.115 0 0 1 2.166-2.204 2.209 2.209 0 0 1 2.115 2.094 2.023 2.023 0 0 1-2.038 2.254Z"
|
|
32
|
+
fill="#BFF6F8"
|
|
33
|
+
/>
|
|
34
|
+
<path
|
|
35
|
+
d="M15.448 13.318a1.813 1.813 0 0 1-1.649-2.751 1.834 1.834 0 0 1 1.192-.854c2.376-.484 2.984 3.479.457 3.607-.447.023-.45.716 0 .698a2.463 2.463 0 0 0 2.372-2.887 2.558 2.558 0 0 0-2.761-2.14 2.527 2.527 0 0 0 .389 5.029c.452.01.451-.692 0-.702ZM15.439 19.73a1.703 1.703 0 0 1-1.78-1.92 1.724 1.724 0 0 1 1.346-1.466c2.237-.461 2.809 3.27.43 3.389-.334.016-.337.537 0 .523a2.185 2.185 0 0 0 2.105-2.561 2.27 2.27 0 0 0-2.457-1.896 2.24 2.24 0 0 0 .35 4.46c.344.008.344-.518.006-.528Z"
|
|
36
|
+
fill="#528693"
|
|
37
|
+
/>
|
|
38
|
+
<path
|
|
39
|
+
d="M15.448 20.192a2.107 2.107 0 0 1-2.243-2.144 2.116 2.116 0 0 1 2.166-2.205 2.21 2.21 0 0 1 2.115 2.095 2.025 2.025 0 0 1-2.038 2.254Z"
|
|
40
|
+
fill="#BFF6F8"
|
|
41
|
+
/>
|
|
42
|
+
<path
|
|
43
|
+
d="M15.448 19.841a1.814 1.814 0 0 1-1.649-2.751 1.836 1.836 0 0 1 1.192-.854c2.376-.484 2.984 3.479.457 3.607-.447.023-.45.716 0 .698a2.463 2.463 0 0 0 2.372-2.887 2.558 2.558 0 0 0-2.761-2.14 2.528 2.528 0 0 0 .389 5.03c.452.012.451-.69 0-.703ZM15.439 6.685a1.704 1.704 0 0 1-1.55-2.584 1.725 1.725 0 0 1 1.117-.803c2.236-.461 2.808 3.27.43 3.388-.335.017-.338.538 0 .524a2.185 2.185 0 0 0 2.101-2.562 2.27 2.27 0 0 0-2.457-1.895 2.24 2.24 0 0 0 .351 4.46c.346.007.346-.517.008-.528Z"
|
|
44
|
+
fill="#528693"
|
|
45
|
+
/>
|
|
46
|
+
<path
|
|
47
|
+
d="M15.448 7.146a2.177 2.177 0 1 1-.077-4.348 2.209 2.209 0 0 1 2.115 2.094 2.026 2.026 0 0 1-2.038 2.254Z"
|
|
48
|
+
fill="#BFF6F8"
|
|
49
|
+
/>
|
|
50
|
+
<path
|
|
51
|
+
d="M15.448 6.795a1.814 1.814 0 0 1-1.649-2.751 1.834 1.834 0 0 1 1.192-.853c2.376-.485 2.984 3.478.457 3.606-.447.023-.45.716 0 .698a2.463 2.463 0 0 0 2.372-2.887 2.558 2.558 0 0 0-2.761-2.14 2.527 2.527 0 0 0 .389 5.03.351.351 0 0 0 0-.703Z"
|
|
52
|
+
fill="#528693"
|
|
53
|
+
/>
|
|
54
|
+
</svg>
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
Topics.displayName = 'TopicsIcon';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { forwardRef, SVGProps } from 'react';
|
|
3
|
+
|
|
4
|
+
type TriangleProps = SVGProps<SVGSVGElement> & {
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type TriangleRef = SVGSVGElement;
|
|
10
|
+
|
|
11
|
+
export const Triangle = forwardRef<TriangleRef, TriangleProps>((delegated, ref) => {
|
|
12
|
+
const { width = 20, height = 20, ...rest } = delegated;
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<svg
|
|
16
|
+
viewBox="0 0 17 15"
|
|
17
|
+
width={width}
|
|
18
|
+
height={height}
|
|
19
|
+
ref={ref}
|
|
20
|
+
fill="none"
|
|
21
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
22
|
+
{...rest}
|
|
23
|
+
>
|
|
24
|
+
<path d="M15.463 1.2L8.5 12.685 1.537 1.2h13.925zM1.353.896s0 0 0 0h0z" stroke="currentColor" strokeWidth={2.4} />
|
|
25
|
+
</svg>
|
|
26
|
+
);
|
|
27
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { forwardRef, SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
type UsageProps = SVGProps<SVGSVGElement>;
|
|
4
|
+
|
|
5
|
+
type UsageRef = SVGSVGElement;
|
|
6
|
+
|
|
7
|
+
export const Usage = forwardRef<UsageRef, UsageProps>((delegated, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<svg ref={ref} width="23" height="23" viewBox="0 0 23 23" fill="none" {...delegated}>
|
|
10
|
+
<path
|
|
11
|
+
d="M20.44 11.968c.222 0 .402.18.392.4a8.952 8.952 0 1 1-9.343-9.343c.22-.01.4.17.4.39v5.02c0 .22-.18.397-.4.425a3.133 3.133 0 1 0 3.507 3.507c.029-.22.205-.399.426-.399h5.019Z"
|
|
12
|
+
fill="#BFF6F8"
|
|
13
|
+
/>
|
|
14
|
+
<path
|
|
15
|
+
fillRule="evenodd"
|
|
16
|
+
clipRule="evenodd"
|
|
17
|
+
d="M20.22 12.568a8.35 8.35 0 1 1-8.931-8.93v4.645a3.733 3.733 0 1 0 4.284 4.285h4.646Zm.612-.2c.01-.22-.17-.4-.391-.4h-5.019c-.221 0-.397.18-.426.399A3.134 3.134 0 1 1 11.49 8.86c.219-.028.399-.204.399-.425v-5.02c0-.22-.18-.4-.4-.39a8.952 8.952 0 1 0 9.343 9.343Z"
|
|
18
|
+
fill="#528693"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
d="M12.877 2.471c0-.22.18-.4.4-.39a8.952 8.952 0 0 1 8.543 8.543c.01.22-.17.4-.391.4H16.41c-.22 0-.397-.18-.425-.4a3.133 3.133 0 0 0-2.71-2.708c-.218-.028-.398-.205-.398-.426V2.471Z"
|
|
22
|
+
fill="#fff"
|
|
23
|
+
/>
|
|
24
|
+
<path
|
|
25
|
+
fillRule="evenodd"
|
|
26
|
+
clipRule="evenodd"
|
|
27
|
+
d="M13.477 2.693a8.352 8.352 0 0 1 7.73 7.73h-4.645a3.733 3.733 0 0 0-3.085-3.084V2.693Zm-.2-.613c-.22-.01-.4.17-.4.391v5.02c0 .22.18.397.399.425a3.132 3.132 0 0 1 2.709 2.709c.028.219.204.399.425.399h5.019c.22 0 .4-.18.391-.4a8.948 8.948 0 0 0-5.517-7.871 8.952 8.952 0 0 0-3.026-.673Z"
|
|
28
|
+
fill="#528693"
|
|
29
|
+
/>
|
|
30
|
+
</svg>
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
Usage.displayName = 'UsageIcon';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { forwardRef, SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
type UsersProps = SVGProps<SVGSVGElement>;
|
|
4
|
+
|
|
5
|
+
type UsersRef = SVGSVGElement;
|
|
6
|
+
|
|
7
|
+
export const Users = forwardRef<UsersRef, UsersProps>((delegated, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<svg ref={ref} width="24" height="24" viewBox="0 0 24 24" fill="none" {...delegated}>
|
|
10
|
+
<path
|
|
11
|
+
d="M20.713 15.436a2.465 2.465 0 0 0-1.746-.594c-.23 0-.466.016-.703.032l-.15.008c.027-.159.043-.32.05-.48 1.222-1.07 1.257-3.224 1.211-4.1a2.867 2.867 0 0 0-.702-1.78c-.48-.516-1.117-.81-1.782-.821-.038-.004-.08-.004-.122-.004a2.408 2.408 0 0 0-1.396.503 2.877 2.877 0 0 0-.933 1.273 4.077 4.077 0 0 0-.178 1.569c.06 1.108.164 2.17.79 2.912.14.165.3.307.475.42.01.17.028.337.055.504l-.097-.004c-.238-.016-.469-.032-.696-.032a2.454 2.454 0 0 0-1.74.594 2.46 2.46 0 0 0-.712 1.494 6.447 6.447 0 0 0-.105 1.104c.003.424.5.534.863.617l.157.035c1.148.266 2.319.382 3.49.346.168 0 .332 0 .505-.004 1.399.012 2.793-.19 4.143-.597a.148.148 0 0 0 .09-.063.182.182 0 0 0 .03-.114.173.173 0 0 0 .013-.087c-.027-1.002-.11-2.122-.81-2.731Zm-5.67-2.13c-.388-.72-.419-1.67-.443-2.437a3.114 3.114 0 0 1 .363-1.679 2.386 2.386 0 0 1 1.195-.978c.23-.106.474-.165.723-.175.08 0 .159.007.238.02.263.05.518.143.758.275.458.242.822.666 1.02 1.19.097.275.151.566.16.862.068 2.191-.538 3.554-1.795 4.054a1.074 1.074 0 0 1-.423.078 2.11 2.11 0 0 1-1.028-.36 2.442 2.442 0 0 1-.768-.85Zm2.746 1.367a1.724 1.724 0 0 1-.175.709c-.108.217-.26.403-.443.541a.875.875 0 0 1-.409.118c-.594 0-.793-.924-.854-1.395.303.186.64.292.985.31a.963.963 0 0 0 .213-.023c.238-.047.469-.135.683-.26Zm-.543 3.966c-.182 0-.364.004-.549.004a11.426 11.426 0 0 1-4.132-.585c.045-.971.15-1.958.856-2.437a2.46 2.46 0 0 1 1.512-.386l.356.004c.12 0 .241-.004.367-.008.2.779.58 1.191 1.1 1.191a1.28 1.28 0 0 0 .315-.043c.24-.075.456-.222.626-.424.17-.203.289-.455.341-.727a8.5 8.5 0 0 0 .44.011l.367-.004a2.438 2.438 0 0 1 1.496.386c.761.514.817 1.639.854 2.468-1.29.376-2.618.56-3.95.55Z"
|
|
12
|
+
fill="#528693"
|
|
13
|
+
/>
|
|
14
|
+
<path
|
|
15
|
+
fillRule="evenodd"
|
|
16
|
+
clipRule="evenodd"
|
|
17
|
+
d="M20.93 15.187c.422.368.642.875.762 1.393.119.513.147 1.07.161 1.569a.502.502 0 0 1-.015.162.51.51 0 0 1-.084.24.479.479 0 0 1-.276.198c-1.378.416-2.8.62-4.229.61-.173.003-.338.003-.502.003a13.965 13.965 0 0 1-3.57-.354h-.001a6.66 6.66 0 0 0-.15-.034l-.004-.001a2.345 2.345 0 0 0-.021-.005c-.17-.038-.42-.095-.628-.206-.232-.124-.468-.349-.471-.725v-.006a6.77 6.77 0 0 1 .108-1.15c.075-.646.36-1.246.81-1.682l.016-.016a2.786 2.786 0 0 1 1.963-.67c.123 0 .247.004.369.01a2.537 2.537 0 0 1-.368-.355c-.707-.84-.809-2.014-.868-3.104a4.412 4.412 0 0 1 .194-1.691l.005-.017a3.208 3.208 0 0 1 1.041-1.418 2.738 2.738 0 0 1 1.588-.571h.015c.034 0 .084 0 .135.004.756.017 1.47.352 2.005.926l.005.006c.476.534.752 1.242.785 1.983.024.453.027 1.24-.136 2.058-.152.76-.454 1.586-1.057 2.183.147-.008.296-.014.444-.015a2.796 2.796 0 0 1 1.97.671l.005.004Zm-1.963-.345c.626-.039 1.245.171 1.747.594.555.485.722 1.293.78 2.107.014.178.021.356.027.532l.002.092a.173.173 0 0 1-.014.087.185.185 0 0 1-.03.114.148.148 0 0 1-.088.063 13.928 13.928 0 0 1-4.144.597c-.173.004-.337.004-.505.004a13.635 13.635 0 0 1-3.647-.381l-.007-.002c-.256-.058-.576-.13-.743-.317a.433.433 0 0 1-.113-.298 6.45 6.45 0 0 1 .105-1.104 2.46 2.46 0 0 1 .713-1.494 2.454 2.454 0 0 1 1.74-.594c.15 0 .301.007.455.016l.219.014.02.002.098.004a4.673 4.673 0 0 1-.055-.503 2.186 2.186 0 0 1-.476-.42c-.625-.744-.73-1.805-.79-2.913a4.079 4.079 0 0 1 .179-1.569c.196-.516.52-.958.933-1.273.413-.315.897-.49 1.396-.503.042 0 .084 0 .122.004.665.011 1.302.305 1.782.821.112.126.212.263.299.409a2.825 2.825 0 0 1 .229.484 2.989 2.989 0 0 1 .178.958 8.385 8.385 0 0 1-.107 1.762c-.145.826-.46 1.699-1.109 2.266a3.643 3.643 0 0 1-.049.48l.15-.007h.004l.184-.012c.173-.011.345-.02.515-.02Zm-3.924-1.536c.192.348.455.64.768.85.312.21.665.334 1.028.36.144.003.288-.024.423-.078.878-.349 1.438-1.118 1.673-2.296a7.797 7.797 0 0 0 .12-1.823v-.003a2.854 2.854 0 0 0-.158-.793 2.409 2.409 0 0 0-.208-.423 2.14 2.14 0 0 0-.812-.768 2.582 2.582 0 0 0-.758-.275 1.653 1.653 0 0 0-.238-.02c-.248.01-.493.069-.723.175-.482.173-.9.516-1.195.979-.274.503-.4 1.09-.363 1.678.024.766.055 1.717.443 2.437Zm.205-3.948c-.24.445-.352.966-.319 1.49v.01c.026.786.06 1.652.404 2.29.168.304.396.555.662.734.264.178.558.281.859.304a.746.746 0 0 0 .285-.054l.001-.001c1.056-.42 1.654-1.587 1.588-3.737a2.533 2.533 0 0 0-.141-.758 1.887 1.887 0 0 0-.864-1.012l-.005-.003a2.252 2.252 0 0 0-.656-.239 1.324 1.324 0 0 0-.176-.015 1.575 1.575 0 0 0-.59.145l-.013.006-.014.004a2.054 2.054 0 0 0-1.021.836Zm1.823 7.02a1.28 1.28 0 0 1-.314.044c-.52 0-.902-.412-1.1-1.19h-.011c-.122.004-.241.007-.357.007l-.356-.004a2.46 2.46 0 0 0-1.512.386c-.706.48-.81 1.466-.856 2.437 1.34.448 2.736.646 4.132.585.093 0 .186 0 .277-.002l.269-.002h.003c1.33.01 2.657-.174 3.945-.549l.004-.001a15.237 15.237 0 0 0-.03-.518c-.056-.731-.213-1.537-.824-1.95a2.436 2.436 0 0 0-1.495-.386l-.367.004c-.143 0-.29-.004-.44-.011-.053.272-.171.524-.342.727-.17.202-.387.35-.626.424Zm1.217-.81a1.9 1.9 0 0 1-.338.599 1.675 1.675 0 0 1-.78.527l-.013.004c-.13.035-.262.053-.396.055h-.004c-.36 0-.67-.147-.914-.41a2.133 2.133 0 0 1-.431-.775l-.123.002h-.003l-.378-.005a2.13 2.13 0 0 0-1.306.332c-.263.18-.431.465-.539.847-.09.32-.13.687-.155 1.077 1.229.382 2.502.548 3.775.492h.014c.09 0 .18 0 .272-.002h.002l.273-.002.002.133v-.133c1.215.01 2.426-.147 3.607-.467a5.42 5.42 0 0 0-.133-1.024c-.104-.408-.276-.728-.56-.922a2.107 2.107 0 0 0-1.29-.331l-.02.001-.371.004c-.063 0-.127-.001-.19-.003Zm-.55-.525a1.742 1.742 0 0 0 .051-.37 2.261 2.261 0 0 1-.683.26.952.952 0 0 1-.213.023 2.063 2.063 0 0 1-.985-.31c.015.117.039.263.075.415.11.459.333.98.78.98a.874.874 0 0 0 .408-.118c.184-.138.335-.324.443-.54a1.688 1.688 0 0 0 .124-.34Zm-.749.604a1.194 1.194 0 0 0 .336-.426c-.05.013-.1.025-.15.035-.093.02-.187.03-.282.03h-.017a2.382 2.382 0 0 1-.51-.084c.02.063.044.124.07.182.116.257.23.325.322.327a.543.543 0 0 0 .231-.064Z"
|
|
18
|
+
fill="#528693"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
d="M21.192 18.089c-1.29.375-2.617.56-3.948.55-.182 0-.363.004-.549.004a11.426 11.426 0 0 1-4.13-.586c.045-.97.15-1.957.856-2.436a2.46 2.46 0 0 1 1.511-.386l.357.004c.119 0 .241-.004.367-.008.199.779.58 1.191 1.1 1.191a1.28 1.28 0 0 0 .315-.043c.239-.075.455-.222.626-.425.17-.202.288-.454.341-.727.15.008.297.012.44.012l.367-.004a2.438 2.438 0 0 1 1.495.386c.76.514.817 1.638.852 2.468Z"
|
|
22
|
+
fill="#BFF6F8"
|
|
23
|
+
/>
|
|
24
|
+
<path
|
|
25
|
+
d="M17.79 14.673a1.725 1.725 0 0 1-.176.709 1.52 1.52 0 0 1-.443.541.874.874 0 0 1-.409.118c-.593 0-.793-.924-.854-1.395.304.186.64.292.986.31a.952.952 0 0 0 .213-.023c.238-.048.468-.135.683-.26ZM19.057 10.385c.068 2.19-.538 3.553-1.795 4.052a1.074 1.074 0 0 1-.423.079 2.11 2.11 0 0 1-1.028-.36 2.44 2.44 0 0 1-.768-.85c-.388-.72-.42-1.671-.444-2.438a3.113 3.113 0 0 1 .364-1.678 2.386 2.386 0 0 1 1.195-.979c.23-.105.474-.165.723-.174.08 0 .159.007.237.02.264.05.519.143.759.275.458.242.822.666 1.02 1.19.097.276.15.567.16.863Z"
|
|
26
|
+
fill="#fff"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
d="M16.988 14.936a4.666 4.666 0 0 0-3.056-.923c-.404 0-.816.024-1.23.049l-.262.012c.047-.246.075-.496.085-.747 2.14-1.663 2.201-5.014 2.122-6.377a4.201 4.201 0 0 0-1.23-2.768A4.615 4.615 0 0 0 10.3 2.904c-.068-.006-.14-.006-.214-.006A4.552 4.552 0 0 0 6.01 5.66a5.683 5.683 0 0 0-.312 2.44c.104 1.724.287 3.375 1.382 4.53.244.257.524.477.831.655.017.262.05.523.098.782l-.171-.006c-.416-.024-.82-.049-1.217-.049a4.644 4.644 0 0 0-3.045.923A3.673 3.673 0 0 0 2.33 17.26a8.948 8.948 0 0 0-.183 1.718c.006.66.874.831 1.51.96.098.018.19.036.275.055 2.009.413 4.058.593 6.108.538.293 0 .58 0 .883-.007a27.22 27.22 0 0 0 7.251-.929.26.26 0 0 0 .208-.275.242.242 0 0 0 .025-.136c-.048-1.558-.195-3.3-1.418-4.248Zm-9.923-3.313c-.679-1.12-.733-2.599-.776-3.791a4.401 4.401 0 0 1 .636-2.61 4.11 4.11 0 0 1 2.09-1.523 3.678 3.678 0 0 1 1.266-.272c.14.001.278.011.416.03.46.08.907.223 1.327.429a3.6 3.6 0 0 1 1.785 1.852c.17.427.265.88.281 1.339.12 3.409-.941 5.53-3.142 6.306a2.09 2.09 0 0 1-.74.123 4 4 0 0 1-3.143-1.883Zm4.806 2.127a2.447 2.447 0 0 1-1.082 1.944 1.677 1.677 0 0 1-.715.184c-1.04 0-1.388-1.437-1.495-2.17.53.288 1.12.454 1.724.482.125 0 .25-.012.373-.036.416-.074.82-.21 1.195-.404Zm-.951 6.17c-.318 0-.636.005-.96.005a22.32 22.32 0 0 1-7.231-.91c.08-1.51.263-3.046 1.498-3.791a4.729 4.729 0 0 1 2.646-.6l.623.006c.208 0 .422-.006.642-.012.349 1.21 1.015 1.853 1.926 1.853.185-.002.37-.025.55-.068a2.386 2.386 0 0 0 1.693-1.79c.263.011.52.018.77.018l.643-.007a4.682 4.682 0 0 1 2.616.6c1.333.8 1.431 2.55 1.495 3.84a26.835 26.835 0 0 1-6.914.855h.003Z"
|
|
30
|
+
fill="#528693"
|
|
31
|
+
/>
|
|
32
|
+
<path
|
|
33
|
+
d="M17.825 19.063a26.834 26.834 0 0 1-6.909.856c-.318 0-.635.006-.96.006a22.32 22.32 0 0 1-7.228-.91c.08-1.511.263-3.046 1.498-3.792a4.729 4.729 0 0 1 2.646-.599l.623.006c.208 0 .422-.006.642-.012.349 1.21 1.015 1.853 1.926 1.853.186-.003.37-.025.55-.068a2.385 2.385 0 0 0 1.693-1.79c.264.011.52.017.77.017l.643-.006a4.682 4.682 0 0 1 2.617.6c1.33.8 1.428 2.549 1.49 3.84Z"
|
|
34
|
+
fill="#BFF6F8"
|
|
35
|
+
/>
|
|
36
|
+
<path
|
|
37
|
+
d="M11.872 13.75a2.446 2.446 0 0 1-1.082 1.944 1.676 1.676 0 0 1-.716.184c-1.04 0-1.388-1.437-1.494-2.17.53.288 1.12.453 1.724.482.125 0 .25-.012.373-.037a4.2 4.2 0 0 0 1.195-.403ZM14.09 7.08c.119 3.405-.942 5.526-3.142 6.303a2.088 2.088 0 0 1-.74.122 3.998 3.998 0 0 1-3.143-1.883c-.679-1.119-.733-2.598-.776-3.79a4.401 4.401 0 0 1 .636-2.611 4.11 4.11 0 0 1 2.09-1.523 3.678 3.678 0 0 1 1.266-.271c.14 0 .278.011.416.03.46.079.907.223 1.327.428a3.6 3.6 0 0 1 1.785 1.853c.17.427.265.881.28 1.341Z"
|
|
38
|
+
fill="#fff"
|
|
39
|
+
/>
|
|
40
|
+
</svg>
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
Users.displayName = 'UsersIcon';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { forwardRef, SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
type WarningProps = SVGProps<SVGSVGElement>;
|
|
4
|
+
type WarningRef = SVGSVGElement;
|
|
5
|
+
|
|
6
|
+
export const Warning = forwardRef<WarningRef, WarningProps>((delegated, ref) => {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
ref={ref}
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
width="22"
|
|
12
|
+
height="22"
|
|
13
|
+
fill="none"
|
|
14
|
+
viewBox="0 0 22 22"
|
|
15
|
+
{...delegated}
|
|
16
|
+
>
|
|
17
|
+
<path
|
|
18
|
+
d="M9.67541 3.72993C10.2804 2.68198 11.793 2.68198 12.398 3.72993L19.8853 16.6982C20.4903 17.7462 19.734 19.0561 18.524 19.0561H3.54948C2.33942 19.0561 1.58313 17.7462 2.18816 16.6982L9.67541 3.72993Z"
|
|
19
|
+
fill="#FFDE99"
|
|
20
|
+
/>
|
|
21
|
+
<path
|
|
22
|
+
fillRule="evenodd"
|
|
23
|
+
clipRule="evenodd"
|
|
24
|
+
d="M19.3657 16.9982L11.8784 4.02993C11.5043 3.38198 10.5691 3.38198 10.195 4.02993L2.70778 16.9982C2.33369 17.6462 2.8013 18.4561 3.54948 18.4561H18.524C19.2722 18.4561 19.7398 17.6462 19.3657 16.9982ZM12.398 3.72993C11.793 2.68198 10.2804 2.68198 9.67541 3.72993L2.18816 16.6982C1.58313 17.7462 2.33942 19.0561 3.54948 19.0561H18.524C19.734 19.0561 20.4903 17.7462 19.8853 16.6982L12.398 3.72993Z"
|
|
25
|
+
fill="#528693"
|
|
26
|
+
/>
|
|
27
|
+
<path
|
|
28
|
+
d="M10.4293 8.73822C10.4293 8.33098 10.7595 8.00085 11.1667 8.00085V8.00085C11.5739 8.00085 11.9041 8.33098 11.9041 8.73822V12.3883C11.9041 12.7956 11.5739 13.1257 11.1667 13.1257V13.1257C10.7595 13.1257 10.4293 12.7956 10.4293 12.3883V8.73822Z"
|
|
29
|
+
fill="white"
|
|
30
|
+
/>
|
|
31
|
+
<path
|
|
32
|
+
fillRule="evenodd"
|
|
33
|
+
clipRule="evenodd"
|
|
34
|
+
d="M12.504 8.73824V12.3883C12.504 13.127 11.9053 13.7257 11.1667 13.7257C10.4281 13.7257 9.82932 13.127 9.82932 12.3883V8.73825C9.82932 7.99964 10.4281 7.40088 11.1667 7.40088C11.9053 7.40088 12.504 7.99964 12.504 8.73824ZM11.1667 8.00088C10.7594 8.00088 10.4293 8.33101 10.4293 8.73825V12.3883C10.4293 12.7956 10.7594 13.1257 11.1667 13.1257C11.5739 13.1257 11.904 12.7956 11.904 12.3883V8.73824C11.904 8.33101 11.5739 8.00088 11.1667 8.00088Z"
|
|
35
|
+
fill="#528693"
|
|
36
|
+
/>
|
|
37
|
+
<path
|
|
38
|
+
d="M11.9041 15.7807C11.9041 16.1879 11.5739 16.5181 11.1667 16.5181C10.7595 16.5181 10.4293 16.1879 10.4293 15.7807C10.4293 15.3735 10.7595 15.0433 11.1667 15.0433C11.5739 15.0433 11.9041 15.3735 11.9041 15.7807Z"
|
|
39
|
+
fill="white"
|
|
40
|
+
/>
|
|
41
|
+
<path
|
|
42
|
+
fillRule="evenodd"
|
|
43
|
+
clipRule="evenodd"
|
|
44
|
+
d="M12.504 15.7807C12.504 16.5193 11.9053 17.1181 11.1667 17.1181C10.4281 17.1181 9.82932 16.5193 9.82932 15.7807C9.82932 15.0421 10.4281 14.4434 11.1667 14.4434C11.9053 14.4434 12.504 15.0421 12.504 15.7807ZM11.1667 16.5181C11.5739 16.5181 11.904 16.188 11.904 15.7807C11.904 15.3735 11.5739 15.0434 11.1667 15.0434C10.7594 15.0434 10.4293 15.3735 10.4293 15.7807C10.4293 16.188 10.7594 16.5181 11.1667 16.5181Z"
|
|
45
|
+
fill="#528693"
|
|
46
|
+
/>
|
|
47
|
+
</svg>
|
|
48
|
+
);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
Warning.displayName = 'WarningIcon';
|
package/src/index.css
ADDED
package/src/index.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
// Tokens ---
|
|
3
|
+
import { buttonTokens } from './button';
|
|
4
|
+
import { cardToken } from './card';
|
|
5
|
+
|
|
6
|
+
// Components ---
|
|
7
|
+
export * from './action-menu';
|
|
8
|
+
export * from './avatar';
|
|
9
|
+
export * from './button';
|
|
10
|
+
export * from './card';
|
|
11
|
+
export * from './checkbox';
|
|
12
|
+
export * from './dialog';
|
|
13
|
+
export * from './dropdown-menu';
|
|
14
|
+
export * from './icon-button';
|
|
15
|
+
export * from './inline-radio';
|
|
16
|
+
export * from './input-with-label';
|
|
17
|
+
export * from './input';
|
|
18
|
+
export * from './label';
|
|
19
|
+
export * from './progress';
|
|
20
|
+
export * from './radio';
|
|
21
|
+
export * from './select';
|
|
22
|
+
export * from './slider';
|
|
23
|
+
export * from './spinner';
|
|
24
|
+
export * from './tag';
|
|
25
|
+
export * from './rich-text-editor';
|
|
26
|
+
|
|
27
|
+
// Icons ---
|
|
28
|
+
export * from './iconography';
|
|
29
|
+
|
|
30
|
+
export const tokens = {
|
|
31
|
+
button: buttonTokens,
|
|
32
|
+
card: cardToken,
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './inline-radio';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.c-inline-radio-group {
|
|
2
|
+
@apply inline-flex space-x-1 rounded bg-gray-100-800 p-[3px];
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.c-inline-radio-group-xs {
|
|
6
|
+
@apply h-6;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.c-inline-radio-group-sm {
|
|
10
|
+
@apply h-9 text-sm;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.c-inline-radio-group-md {
|
|
14
|
+
@apply h-11 text-base;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.c-inline-radio-group-lg {
|
|
18
|
+
@apply h-14 text-lg;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.c-inline-radio {
|
|
22
|
+
@apply m-0 flex cursor-pointer items-center justify-center rounded-[3px] border-none bg-transparent text-sm font-medium !leading-none text-gray;
|
|
23
|
+
|
|
24
|
+
&[aria-checked='true'] {
|
|
25
|
+
@apply bg-elevate shadow-sm;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:focus-visible {
|
|
29
|
+
@apply outline outline-1 outline-inherit;
|
|
30
|
+
outline-color: currentColor;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:disabled {
|
|
34
|
+
@apply cursor-not-allowed;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { InlineRadio } from './inline-radio';
|
|
3
|
+
import { Icon } from '../iconography';
|
|
4
|
+
|
|
5
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof InlineRadio.Group> = {
|
|
8
|
+
title: 'Components/InlineRadio',
|
|
9
|
+
component: InlineRadio.Group,
|
|
10
|
+
argTypes: {
|
|
11
|
+
size: {
|
|
12
|
+
defaultValue: 'sm',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default meta;
|
|
18
|
+
|
|
19
|
+
type Story = StoryObj<typeof InlineRadio.Group>;
|
|
20
|
+
|
|
21
|
+
export const Example: Story = {
|
|
22
|
+
render: () => {
|
|
23
|
+
return (
|
|
24
|
+
<InlineRadio.Group defaultValue="plus" size="xs">
|
|
25
|
+
<InlineRadio.Item value="plus" id="example-r1">
|
|
26
|
+
+
|
|
27
|
+
</InlineRadio.Item>
|
|
28
|
+
<InlineRadio.Item value="minus" id="example-r2">
|
|
29
|
+
-
|
|
30
|
+
</InlineRadio.Item>
|
|
31
|
+
</InlineRadio.Group>
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const ProductView: Story = {
|
|
37
|
+
render: () => {
|
|
38
|
+
return (
|
|
39
|
+
<InlineRadio.Group defaultValue="pretty" size="xs">
|
|
40
|
+
<InlineRadio.Item value="pretty" id="productview-r1">
|
|
41
|
+
<Icon.NailPolish />
|
|
42
|
+
</InlineRadio.Item>
|
|
43
|
+
<InlineRadio.Item value="nerdy" id="productview-r2">
|
|
44
|
+
<Icon.Glasses />
|
|
45
|
+
</InlineRadio.Item>
|
|
46
|
+
</InlineRadio.Group>
|
|
47
|
+
);
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const Controlled: Story = {
|
|
52
|
+
render: () => {
|
|
53
|
+
const [view, setView] = useState('pretty');
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<InlineRadio.Group value={view} onValueChange={v => setView(v)} size="xs">
|
|
57
|
+
<InlineRadio.Item value="pretty" id="controlled-r1">
|
|
58
|
+
<Icon.NailPolish />
|
|
59
|
+
</InlineRadio.Item>
|
|
60
|
+
<InlineRadio.Item value="nerdy" id="controlled-r2">
|
|
61
|
+
<Icon.Glasses />
|
|
62
|
+
</InlineRadio.Item>
|
|
63
|
+
</InlineRadio.Group>
|
|
64
|
+
);
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const WithSize: Story = {
|
|
69
|
+
render: ({ size }) => {
|
|
70
|
+
return (
|
|
71
|
+
<InlineRadio.Group defaultValue="preview" size={size}>
|
|
72
|
+
<InlineRadio.Item value="preview" id="controlled-r1">
|
|
73
|
+
Preview
|
|
74
|
+
</InlineRadio.Item>
|
|
75
|
+
<InlineRadio.Item value="edit" id="controlled-r2">
|
|
76
|
+
Edit
|
|
77
|
+
</InlineRadio.Item>
|
|
78
|
+
</InlineRadio.Group>
|
|
79
|
+
);
|
|
80
|
+
},
|
|
81
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
2
|
+
import { cx, cva, VariantProps } from 'class-variance-authority';
|
|
3
|
+
import type { ComponentProps } from 'react';
|
|
4
|
+
|
|
5
|
+
import './inline-radio.css';
|
|
6
|
+
|
|
7
|
+
const inlineRadioGroupStyles = cva('c-inline-radio-group', {
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
xs: 'c-inline-radio-group-xs',
|
|
11
|
+
sm: 'c-inline-radio-group-sm',
|
|
12
|
+
md: 'c-inline-radio-group-md',
|
|
13
|
+
lg: 'c-inline-radio-group-lg',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
size: 'sm',
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
type InlineRadioGroupProps = ComponentProps<typeof RadioGroupPrimitive.Root> &
|
|
22
|
+
VariantProps<typeof inlineRadioGroupStyles>;
|
|
23
|
+
|
|
24
|
+
function InlineRadioGroup({ size, className, ...delegated }: InlineRadioGroupProps) {
|
|
25
|
+
return <RadioGroupPrimitive.Root {...delegated} className={inlineRadioGroupStyles({ size, className })} />;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type InlineRadioItemProps = ComponentProps<typeof RadioGroupPrimitive.Item>;
|
|
29
|
+
|
|
30
|
+
function InlineRadioItem({ children, className, ...delegated }: InlineRadioItemProps) {
|
|
31
|
+
return (
|
|
32
|
+
<RadioGroupPrimitive.Item {...delegated} className={cx('c-inline-radio', className)}>
|
|
33
|
+
<RadioGroupPrimitive.Indicator forceMount>{children}</RadioGroupPrimitive.Indicator>
|
|
34
|
+
</RadioGroupPrimitive.Item>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const InlineRadio = {
|
|
39
|
+
Group: InlineRadioGroup,
|
|
40
|
+
Item: InlineRadioItem,
|
|
41
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { Input } from '.';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Input> = {
|
|
6
|
+
title: 'Components/Input',
|
|
7
|
+
component: Input,
|
|
8
|
+
argTypes: {},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
|
|
13
|
+
type Story = StoryObj<typeof Input>;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
placeholder: "c'mon type something",
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const Disabled: Story = {
|
|
22
|
+
args: {
|
|
23
|
+
value: "I'm disabled",
|
|
24
|
+
disabled: true,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Input } from './input';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { cva, VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ComponentPropsWithRef, forwardRef } from 'react';
|
|
3
|
+
|
|
4
|
+
import './input.css';
|
|
5
|
+
|
|
6
|
+
type InputStylesProps = VariantProps<typeof inputStyles>;
|
|
7
|
+
const inputStyles = cva(['c-input'], {
|
|
8
|
+
variants: {},
|
|
9
|
+
defaultVariants: {},
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
type InputProps = InputStylesProps & ComponentPropsWithRef<'input'>;
|
|
13
|
+
|
|
14
|
+
export type InputRef = HTMLInputElement;
|
|
15
|
+
|
|
16
|
+
export const Input = forwardRef<InputRef, InputProps>(({ className, ...delegated }, ref) => {
|
|
17
|
+
return <input ref={ref} className={inputStyles({ className })} type="text" {...delegated} />;
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
Input.displayName = 'Input';
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { InputWithLabel } from '.';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof InputWithLabel> = {
|
|
6
|
+
title: 'Components/InputWithLabel',
|
|
7
|
+
component: InputWithLabel,
|
|
8
|
+
argTypes: {
|
|
9
|
+
variant: {
|
|
10
|
+
defaultValue: '',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
|
|
17
|
+
type Story = StoryObj<typeof InputWithLabel>;
|
|
18
|
+
|
|
19
|
+
export const Default: Story = {
|
|
20
|
+
args: {
|
|
21
|
+
placeholder: 'Luke Skywalker',
|
|
22
|
+
label: 'Name',
|
|
23
|
+
value: 'Luke Skywalker',
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Error: Story = {
|
|
28
|
+
args: {
|
|
29
|
+
placeholder: 'Luke Skywalker',
|
|
30
|
+
label: 'Name',
|
|
31
|
+
status: 'error',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const ErrorWithMessage: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
placeholder: 'Luke Skywalker',
|
|
38
|
+
label: 'Name',
|
|
39
|
+
status: 'error',
|
|
40
|
+
errorMessage: 'You are not my father',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const Elevated: Story = {
|
|
45
|
+
args: {
|
|
46
|
+
placeholder: 'Luke Skywalker',
|
|
47
|
+
label: 'Name',
|
|
48
|
+
variant: 'elevated',
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const ElevatedError: Story = {
|
|
53
|
+
args: {
|
|
54
|
+
placeholder: 'Luke Skywalker',
|
|
55
|
+
label: 'Name',
|
|
56
|
+
variant: 'elevated',
|
|
57
|
+
status: 'error',
|
|
58
|
+
errorMessage: 'Something went no no',
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const WithAppend: Story = {
|
|
63
|
+
args: {
|
|
64
|
+
placeholder: 'Luke Skywalker',
|
|
65
|
+
label: 'Name',
|
|
66
|
+
variant: 'elevated',
|
|
67
|
+
append: <div className="self-end">🍩</div>,
|
|
68
|
+
id: 'my-id',
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const Disabled: Story = {
|
|
73
|
+
args: {
|
|
74
|
+
placeholder: 'Luke Skywalker',
|
|
75
|
+
label: 'Name',
|
|
76
|
+
disabled: true,
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const Readonly: Story = {
|
|
81
|
+
args: {
|
|
82
|
+
placeholder: 'Luke Skywalker',
|
|
83
|
+
label: 'Name',
|
|
84
|
+
readOnly: true,
|
|
85
|
+
value: 'Darth Vader',
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const PassingPropsToLabel: Story = {
|
|
90
|
+
args: {
|
|
91
|
+
placeholder: 'Luke Skywalker',
|
|
92
|
+
label: 'Name',
|
|
93
|
+
value: 'Darth Vader',
|
|
94
|
+
labelProps: {
|
|
95
|
+
className: 'bg-elevated',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.c-input-with-label {
|
|
2
|
+
@apply relative block rounded border border-solid border-transparent p-3;
|
|
3
|
+
|
|
4
|
+
&-input-wrap {
|
|
5
|
+
@apply mt-1 flex;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&-input {
|
|
9
|
+
@apply flex-1 overflow-hidden text-ellipsis text-base;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&-append {
|
|
13
|
+
@apply -mr-3 flex flex-shrink-0 items-center px-3;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-elevated {
|
|
17
|
+
@apply bg-elevate shadow;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.c-input-with-label--error {
|
|
21
|
+
@apply text-error;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&-error {
|
|
25
|
+
@apply !mt-1 text-xs text-error;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-sm {
|
|
29
|
+
@apply text-sm;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-lg {
|
|
33
|
+
@apply text-lg;
|
|
34
|
+
}
|
|
35
|
+
}
|