@crystallize/design-system 1.4.0 → 1.4.2

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.
Files changed (380) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/dist/TableComponent-I2YOOYOU.css +281 -0
  3. package/dist/TableComponent-QINOO453.mjs +1377 -0
  4. package/dist/arrow-clockwise-Z2G6UEGP.svg +1 -0
  5. package/dist/arrow-counterclockwise-2O5EYVJT.svg +1 -0
  6. package/dist/bg-color-HB2WDYGO.svg +1 -0
  7. package/dist/camera-CR7D2PNH.svg +1 -0
  8. package/dist/caret-right-fill-FFBNEXVX.svg +1 -0
  9. package/dist/chat-square-quote-CI6PUJHH.svg +1 -0
  10. package/dist/chevron-down-3FRWSIKS.svg +1 -0
  11. package/dist/chunk-VUXQZRSP.mjs +737 -0
  12. package/dist/clipboard-OSEFDF25.svg +1 -0
  13. package/dist/close-FH57ZMJF.svg +1 -0
  14. package/dist/code-SEVR6TIQ.svg +1 -0
  15. package/dist/copy-DMGDODUL.svg +1 -0
  16. package/dist/diagram-2-CEJUD2B4.svg +1 -0
  17. package/dist/download-JXUGIUCX.svg +1 -0
  18. package/dist/draggable-block-menu-KKHDNKJA.svg +1 -0
  19. package/dist/dropdown-more-BHZ5COKX.svg +1 -0
  20. package/dist/file-image-TIQPFJX4.svg +1 -0
  21. package/dist/filetype-gif-OG2BEYYK.svg +1 -0
  22. package/dist/font-color-J4GA3ZJO.svg +1 -0
  23. package/dist/font-family-ZU5N6TTE.svg +1 -0
  24. package/dist/gear-ICMT4NTP.svg +1 -0
  25. package/dist/horizontal-rule-N6RD2V7H.svg +1 -0
  26. package/dist/indent-MJ6JIMCK.svg +1 -0
  27. package/dist/index.css +4209 -0
  28. package/dist/index.d.ts +450 -3
  29. package/dist/index.js +11526 -5
  30. package/dist/index.mjs +9437 -0
  31. package/dist/journal-code-XUT44HDV.svg +1 -0
  32. package/dist/justify-J7X5JEEX.svg +1 -0
  33. package/dist/link-W52N4JKZ.svg +1 -0
  34. package/dist/list-ol-2ZEUN4Z7.svg +1 -0
  35. package/dist/list-ul-DVKNUP47.svg +1 -0
  36. package/dist/lock-WCYOZOHW.svg +1 -0
  37. package/dist/lock-fill-JZSKOSHK.svg +1 -0
  38. package/dist/markdown-4BGQNLLT.svg +1 -0
  39. package/dist/mic-H5FNOMM7.svg +1 -0
  40. package/dist/outdent-2LUMUMIP.svg +1 -0
  41. package/dist/paint-bucket-VCISMZTH.svg +1 -0
  42. package/dist/palette-SWGFPRWZ.svg +1 -0
  43. package/dist/pencil-fill-STFSC26F.svg +1 -0
  44. package/dist/plug-HGGGEVS3.svg +1 -0
  45. package/dist/plug-fill-OTG3U4TN.svg +1 -0
  46. package/dist/plus-CQISIKEC.svg +1 -0
  47. package/dist/plus-slash-minus-N22JU4TI.svg +1 -0
  48. package/dist/prettier-WUJ7B5NV.svg +1 -0
  49. package/dist/prettier-error-DYJSLYDP.svg +1 -0
  50. package/dist/square-check-UTG6FU6D.svg +1 -0
  51. package/dist/success-YVXUMPEZ.svg +1 -0
  52. package/dist/table-BR6DI4ZQ.svg +1 -0
  53. package/dist/text-center-UQI6PAEF.svg +1 -0
  54. package/dist/text-left-KT2B6TR3.svg +1 -0
  55. package/dist/text-paragraph-MFTUIIQG.svg +1 -0
  56. package/dist/text-right-SKELPISG.svg +1 -0
  57. package/dist/trash-UOM6D7TD.svg +1 -0
  58. package/dist/type-bold-PY7COC3N.svg +1 -0
  59. package/dist/type-h1-6KJP7YOM.svg +1 -0
  60. package/dist/type-h2-VHI2USC3.svg +1 -0
  61. package/dist/type-h3-JIU77CHO.svg +1 -0
  62. package/dist/type-h4-P5EHKDAL.svg +1 -0
  63. package/dist/type-h5-CS2KYVRG.svg +1 -0
  64. package/dist/type-h6-J2O74LJZ.svg +1 -0
  65. package/dist/type-italic-3DSFOSG2.svg +1 -0
  66. package/dist/type-strikethrough-E2KKQFSX.svg +1 -0
  67. package/dist/type-subscript-BMPTRIBU.svg +1 -0
  68. package/dist/type-superscript-EDF6EPAA.svg +1 -0
  69. package/dist/type-underline-CBFA5VLF.svg +1 -0
  70. package/dist/upload-Q6KICGZW.svg +1 -0
  71. package/dist/user-EOI2NEFZ.svg +1 -0
  72. package/package.json +114 -79
  73. package/readme.md +9 -0
  74. package/src/action-menu/ActionMenu.stories.tsx +25 -0
  75. package/src/action-menu/action-item.tsx +16 -0
  76. package/src/action-menu/action-menu.css +38 -0
  77. package/src/action-menu/action-menu.tsx +25 -0
  78. package/src/action-menu/index.tsx +3 -0
  79. package/src/avatar/Avatar.stories.tsx +20 -0
  80. package/src/avatar/avatar.css +23 -0
  81. package/src/avatar/avatar.tsx +34 -0
  82. package/src/avatar/get-initials.ts +5 -0
  83. package/src/avatar/index.ts +1 -0
  84. package/src/button/Button.stories.tsx +105 -0
  85. package/src/button/button.css +116 -0
  86. package/src/button/button.tsx +136 -0
  87. package/src/button/index.ts +3 -0
  88. package/src/card/card.css +7 -0
  89. package/src/card/card.stories.tsx +24 -0
  90. package/src/card/card.tsx +27 -0
  91. package/src/card/index.ts +3 -0
  92. package/src/checkbox/checkbox.css +30 -0
  93. package/src/checkbox/checkbox.stories.tsx +62 -0
  94. package/src/checkbox/checkbox.test.tsx +16 -0
  95. package/src/checkbox/checkbox.tsx +28 -0
  96. package/src/checkbox/index.ts +1 -0
  97. package/src/colors/Colors.stories.tsx +127 -0
  98. package/src/colors/color-defaults.json +15 -0
  99. package/src/colors/color-pairing.json +12 -0
  100. package/src/colors/colors.json +158 -0
  101. package/src/colors/index.ts +1 -0
  102. package/src/colors/old-to-new.txt +19 -0
  103. package/src/colors/types.ts +29 -0
  104. package/src/dialog/Dialog.stories.tsx +168 -0
  105. package/src/dialog/Dialog.test.tsx +25 -0
  106. package/src/dialog/config.tsx +139 -0
  107. package/src/dialog/confirm-dialog.tsx +70 -0
  108. package/src/dialog/destroyFns.ts +1 -0
  109. package/src/dialog/dialog.css +27 -0
  110. package/src/dialog/dialog.tsx +95 -0
  111. package/src/dialog/index.tsx +40 -0
  112. package/src/dialog/types.ts +70 -0
  113. package/src/dropdown-menu/DropdownMenu.stories.tsx +38 -0
  114. package/src/dropdown-menu/dropdown-menu-item.tsx +15 -0
  115. package/src/dropdown-menu/dropdown-menu-label.tsx +10 -0
  116. package/src/dropdown-menu/dropdown-menu-root.tsx +33 -0
  117. package/src/dropdown-menu/dropdown-menu.css +20 -0
  118. package/src/dropdown-menu/index.ts +11 -0
  119. package/src/icon-button/IconButton.stories.tsx +45 -0
  120. package/src/icon-button/icon-button.css +50 -0
  121. package/src/icon-button/icon-button.tsx +39 -0
  122. package/src/icon-button/index.ts +3 -0
  123. package/src/iconography/Icon.stories.tsx +47 -0
  124. package/src/iconography/add.tsx +30 -0
  125. package/src/iconography/arrow.tsx +15 -0
  126. package/src/iconography/atom.tsx +59 -0
  127. package/src/iconography/cancel.tsx +26 -0
  128. package/src/iconography/catalogue.tsx +26 -0
  129. package/src/iconography/copy.tsx +24 -0
  130. package/src/iconography/crystal.tsx +93 -0
  131. package/src/iconography/customers.tsx +38 -0
  132. package/src/iconography/edit.tsx +30 -0
  133. package/src/iconography/error.tsx +40 -0
  134. package/src/iconography/fulfilment.tsx +58 -0
  135. package/src/iconography/glasses.tsx +62 -0
  136. package/src/iconography/graphQL.tsx +90 -0
  137. package/src/iconography/grid.tsx +84 -0
  138. package/src/iconography/hooks.tsx +26 -0
  139. package/src/iconography/image.tsx +47 -0
  140. package/src/iconography/index.ts +63 -0
  141. package/src/iconography/info.tsx +41 -0
  142. package/src/iconography/key.tsx +19 -0
  143. package/src/iconography/language.tsx +38 -0
  144. package/src/iconography/nail-polish.tsx +84 -0
  145. package/src/iconography/order.tsx +38 -0
  146. package/src/iconography/particle.tsx +88 -0
  147. package/src/iconography/percentage.tsx +44 -0
  148. package/src/iconography/price-tag.tsx +40 -0
  149. package/src/iconography/shapes.tsx +48 -0
  150. package/src/iconography/subscription.tsx +34 -0
  151. package/src/iconography/topics.tsx +58 -0
  152. package/src/iconography/triangle.tsx +27 -0
  153. package/src/iconography/usage.tsx +34 -0
  154. package/src/iconography/users.tsx +44 -0
  155. package/src/iconography/warning.tsx +51 -0
  156. package/src/index.css +14 -0
  157. package/src/index.ts +33 -0
  158. package/src/inline-radio/index.ts +1 -0
  159. package/src/inline-radio/inline-radio.css +36 -0
  160. package/src/inline-radio/inline-radio.stories.tsx +81 -0
  161. package/src/inline-radio/inline-radio.tsx +41 -0
  162. package/src/input/Input.stories.tsx +26 -0
  163. package/src/input/index.ts +1 -0
  164. package/src/input/input.css +7 -0
  165. package/src/input/input.tsx +20 -0
  166. package/src/input-with-label/InputWithLabel.stories.tsx +98 -0
  167. package/src/input-with-label/index.ts +3 -0
  168. package/src/input-with-label/input-with-label.css +35 -0
  169. package/src/input-with-label/input-with-label.tsx +59 -0
  170. package/src/label/index.ts +1 -0
  171. package/src/label/label.css +3 -0
  172. package/src/label/label.stories.tsx +19 -0
  173. package/src/label/label.tsx +13 -0
  174. package/src/progress/Progress.stories.tsx +26 -0
  175. package/src/progress/index.ts +1 -0
  176. package/src/progress/progress.css +7 -0
  177. package/src/progress/progress.tsx +17 -0
  178. package/src/radio/index.ts +1 -0
  179. package/src/radio/radio.css +20 -0
  180. package/src/radio/radio.stories.tsx +142 -0
  181. package/src/radio/radio.tsx +19 -0
  182. package/src/rich-text-editor/appSettings.ts +28 -0
  183. package/src/rich-text-editor/context/SettingsContext.tsx +71 -0
  184. package/src/rich-text-editor/context/SharedAutocompleteContext.tsx +60 -0
  185. package/src/rich-text-editor/context/SharedHistoryContext.tsx +25 -0
  186. package/src/rich-text-editor/hooks/useReport.ts +64 -0
  187. package/src/rich-text-editor/images/cat-typing.gif +0 -0
  188. package/src/rich-text-editor/images/emoji/1F600.png +0 -0
  189. package/src/rich-text-editor/images/emoji/1F641.png +0 -0
  190. package/src/rich-text-editor/images/emoji/1F642.png +0 -0
  191. package/src/rich-text-editor/images/emoji/2764.png +0 -0
  192. package/src/rich-text-editor/images/emoji/LICENSE.md +5 -0
  193. package/src/rich-text-editor/images/icons/LICENSE.md +5 -0
  194. package/src/rich-text-editor/images/icons/arrow-clockwise.svg +1 -0
  195. package/src/rich-text-editor/images/icons/arrow-counterclockwise.svg +1 -0
  196. package/src/rich-text-editor/images/icons/bg-color.svg +1 -0
  197. package/src/rich-text-editor/images/icons/camera.svg +1 -0
  198. package/src/rich-text-editor/images/icons/card-checklist.svg +1 -0
  199. package/src/rich-text-editor/images/icons/caret-right-fill.svg +1 -0
  200. package/src/rich-text-editor/images/icons/chat-left-text.svg +1 -0
  201. package/src/rich-text-editor/images/icons/chat-right-dots.svg +1 -0
  202. package/src/rich-text-editor/images/icons/chat-right-text.svg +1 -0
  203. package/src/rich-text-editor/images/icons/chat-right.svg +1 -0
  204. package/src/rich-text-editor/images/icons/chat-square-quote.svg +1 -0
  205. package/src/rich-text-editor/images/icons/chevron-down.svg +1 -0
  206. package/src/rich-text-editor/images/icons/clipboard.svg +1 -0
  207. package/src/rich-text-editor/images/icons/close.svg +1 -0
  208. package/src/rich-text-editor/images/icons/code.svg +1 -0
  209. package/src/rich-text-editor/images/icons/comments.svg +1 -0
  210. package/src/rich-text-editor/images/icons/copy.svg +1 -0
  211. package/src/rich-text-editor/images/icons/diagram-2.svg +1 -0
  212. package/src/rich-text-editor/images/icons/download.svg +1 -0
  213. package/src/rich-text-editor/images/icons/draggable-block-menu.svg +1 -0
  214. package/src/rich-text-editor/images/icons/dropdown-more.svg +1 -0
  215. package/src/rich-text-editor/images/icons/figma.svg +1 -0
  216. package/src/rich-text-editor/images/icons/file-image.svg +1 -0
  217. package/src/rich-text-editor/images/icons/filetype-gif.svg +1 -0
  218. package/src/rich-text-editor/images/icons/font-color.svg +1 -0
  219. package/src/rich-text-editor/images/icons/font-family.svg +1 -0
  220. package/src/rich-text-editor/images/icons/gear.svg +1 -0
  221. package/src/rich-text-editor/images/icons/horizontal-rule.svg +1 -0
  222. package/src/rich-text-editor/images/icons/indent.svg +1 -0
  223. package/src/rich-text-editor/images/icons/journal-code.svg +1 -0
  224. package/src/rich-text-editor/images/icons/journal-text.svg +1 -0
  225. package/src/rich-text-editor/images/icons/justify.svg +1 -0
  226. package/src/rich-text-editor/images/icons/link.svg +1 -0
  227. package/src/rich-text-editor/images/icons/list-ol.svg +1 -0
  228. package/src/rich-text-editor/images/icons/list-ul.svg +1 -0
  229. package/src/rich-text-editor/images/icons/lock-fill.svg +1 -0
  230. package/src/rich-text-editor/images/icons/lock.svg +1 -0
  231. package/src/rich-text-editor/images/icons/markdown.svg +1 -0
  232. package/src/rich-text-editor/images/icons/mic.svg +1 -0
  233. package/src/rich-text-editor/images/icons/outdent.svg +1 -0
  234. package/src/rich-text-editor/images/icons/paint-bucket.svg +1 -0
  235. package/src/rich-text-editor/images/icons/palette.svg +1 -0
  236. package/src/rich-text-editor/images/icons/pencil-fill.svg +1 -0
  237. package/src/rich-text-editor/images/icons/plug-fill.svg +1 -0
  238. package/src/rich-text-editor/images/icons/plug.svg +1 -0
  239. package/src/rich-text-editor/images/icons/plus-slash-minus.svg +1 -0
  240. package/src/rich-text-editor/images/icons/plus.svg +1 -0
  241. package/src/rich-text-editor/images/icons/prettier-error.svg +1 -0
  242. package/src/rich-text-editor/images/icons/prettier.svg +1 -0
  243. package/src/rich-text-editor/images/icons/send.svg +1 -0
  244. package/src/rich-text-editor/images/icons/square-check.svg +1 -0
  245. package/src/rich-text-editor/images/icons/sticky.svg +1 -0
  246. package/src/rich-text-editor/images/icons/success.svg +1 -0
  247. package/src/rich-text-editor/images/icons/table.svg +1 -0
  248. package/src/rich-text-editor/images/icons/text-center.svg +1 -0
  249. package/src/rich-text-editor/images/icons/text-left.svg +1 -0
  250. package/src/rich-text-editor/images/icons/text-paragraph.svg +1 -0
  251. package/src/rich-text-editor/images/icons/text-right.svg +1 -0
  252. package/src/rich-text-editor/images/icons/trash.svg +1 -0
  253. package/src/rich-text-editor/images/icons/trash3.svg +1 -0
  254. package/src/rich-text-editor/images/icons/tweet.svg +1 -0
  255. package/src/rich-text-editor/images/icons/type-bold.svg +1 -0
  256. package/src/rich-text-editor/images/icons/type-h1.svg +1 -0
  257. package/src/rich-text-editor/images/icons/type-h2.svg +1 -0
  258. package/src/rich-text-editor/images/icons/type-h3.svg +1 -0
  259. package/src/rich-text-editor/images/icons/type-h4.svg +1 -0
  260. package/src/rich-text-editor/images/icons/type-h5.svg +1 -0
  261. package/src/rich-text-editor/images/icons/type-h6.svg +1 -0
  262. package/src/rich-text-editor/images/icons/type-italic.svg +1 -0
  263. package/src/rich-text-editor/images/icons/type-strikethrough.svg +1 -0
  264. package/src/rich-text-editor/images/icons/type-subscript.svg +1 -0
  265. package/src/rich-text-editor/images/icons/type-superscript.svg +1 -0
  266. package/src/rich-text-editor/images/icons/type-underline.svg +1 -0
  267. package/src/rich-text-editor/images/icons/upload.svg +1 -0
  268. package/src/rich-text-editor/images/icons/user.svg +1 -0
  269. package/src/rich-text-editor/images/icons/youtube.svg +1 -0
  270. package/src/rich-text-editor/images/image/LICENSE.md +5 -0
  271. package/src/rich-text-editor/images/landscape.jpg +0 -0
  272. package/src/rich-text-editor/images/logo.svg +1 -0
  273. package/src/rich-text-editor/images/yellow-flower-small.jpg +0 -0
  274. package/src/rich-text-editor/images/yellow-flower.jpg +0 -0
  275. package/src/rich-text-editor/index.ts +1 -0
  276. package/src/rich-text-editor/model/crystallize-rich-text-types/code.ts +39 -0
  277. package/src/rich-text-editor/model/crystallize-rich-text-types/headings.ts +12 -0
  278. package/src/rich-text-editor/model/crystallize-rich-text-types/index.ts +69 -0
  279. package/src/rich-text-editor/model/crystallize-rich-text-types/link.ts +9 -0
  280. package/src/rich-text-editor/model/crystallize-rich-text-types/table.ts +16 -0
  281. package/src/rich-text-editor/model/crystallize-to-lexical.ts +186 -0
  282. package/src/rich-text-editor/model/lexical-to-crystallize.ts +232 -0
  283. package/src/rich-text-editor/nodes/AutocompleteNode.tsx +96 -0
  284. package/src/rich-text-editor/nodes/BaseNodes.ts +45 -0
  285. package/src/rich-text-editor/nodes/KeywordNode.ts +73 -0
  286. package/src/rich-text-editor/nodes/TableCellNodes.ts +31 -0
  287. package/src/rich-text-editor/nodes/TableComponent.tsx +1547 -0
  288. package/src/rich-text-editor/nodes/TableNode.tsx +398 -0
  289. package/src/rich-text-editor/plugins/ActionsPlugin/index.tsx +83 -0
  290. package/src/rich-text-editor/plugins/AutoLinkPlugin/index.tsx +47 -0
  291. package/src/rich-text-editor/plugins/AutocompletePlugin/index.tsx +2536 -0
  292. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.tsx +60 -0
  293. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.css +14 -0
  294. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.tsx +140 -0
  295. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/index.css +46 -0
  296. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/index.tsx +155 -0
  297. package/src/rich-text-editor/plugins/CodeHighlightPlugin/index.ts +21 -0
  298. package/src/rich-text-editor/plugins/ComponentPickerPlugin/index.tsx +320 -0
  299. package/src/rich-text-editor/plugins/DragDropPastePlugin/index.ts +40 -0
  300. package/src/rich-text-editor/plugins/DraggableBlockPlugin/index.css +36 -0
  301. package/src/rich-text-editor/plugins/DraggableBlockPlugin/index.tsx +368 -0
  302. package/src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.css +40 -0
  303. package/src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.tsx +305 -0
  304. package/src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.css +128 -0
  305. package/src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx +351 -0
  306. package/src/rich-text-editor/plugins/LinkPlugin/index.tsx +16 -0
  307. package/src/rich-text-editor/plugins/ListMaxIndentLevelPlugin/index.ts +86 -0
  308. package/src/rich-text-editor/plugins/MarkdownShortcutPlugin/index.tsx +16 -0
  309. package/src/rich-text-editor/plugins/MarkdownTransformers/index.ts +195 -0
  310. package/src/rich-text-editor/plugins/MaxLengthPlugin/index.tsx +49 -0
  311. package/src/rich-text-editor/plugins/SpeechToTextPlugin/index.ts +113 -0
  312. package/src/rich-text-editor/plugins/TabFocusPlugin/index.tsx +65 -0
  313. package/src/rich-text-editor/plugins/TableActionMenuPlugin/index.tsx +481 -0
  314. package/src/rich-text-editor/plugins/TableCellResizer/index.css +12 -0
  315. package/src/rich-text-editor/plugins/TableCellResizer/index.tsx +386 -0
  316. package/src/rich-text-editor/plugins/TablePlugin.tsx +190 -0
  317. package/src/rich-text-editor/plugins/ToolbarPlugin/index.tsx +726 -0
  318. package/src/rich-text-editor/plugins/TreeViewPlugin/index.tsx +25 -0
  319. package/src/rich-text-editor/plugins/TypingPerfPlugin/index.ts +117 -0
  320. package/src/rich-text-editor/rich-text-editor.css +1361 -0
  321. package/src/rich-text-editor/rich-text-editor.stories.tsx +385 -0
  322. package/src/rich-text-editor/rich-text-editor.tsx +228 -0
  323. package/src/rich-text-editor/tests/rich-text-editor-basic-rendering.test.tsx +47 -0
  324. package/src/rich-text-editor/tests/rich-text-editor-code.test.tsx +39 -0
  325. package/src/rich-text-editor/tests/rich-text-editor-model-basics.test.tsx +56 -0
  326. package/src/rich-text-editor/tests/rich-text-editor-model-conversions.test.tsx +195 -0
  327. package/src/rich-text-editor/tests/rich-text-editor-onchange.test.tsx +37 -0
  328. package/src/rich-text-editor/tests/rich-text-editor-quote.test.tsx +36 -0
  329. package/src/rich-text-editor/tests/rich-text-editor-text-formats.test.tsx +135 -0
  330. package/src/rich-text-editor/tests/rich-text-editor-typing.test.tsx +73 -0
  331. package/src/rich-text-editor/tests/utils.ts +23 -0
  332. package/src/rich-text-editor/themes/PlaygroundEditorTheme.css +433 -0
  333. package/src/rich-text-editor/themes/PlaygroundEditorTheme.ts +113 -0
  334. package/src/rich-text-editor/types.ts +5 -0
  335. package/src/rich-text-editor/ui/ContentEditable.css +13 -0
  336. package/src/rich-text-editor/ui/ContentEditable.tsx +15 -0
  337. package/src/rich-text-editor/ui/LinkPreview.css +57 -0
  338. package/src/rich-text-editor/ui/LinkPreview.tsx +169 -0
  339. package/src/rich-text-editor/utils/environment.ts +1 -0
  340. package/src/rich-text-editor/utils/getDOMRangeRect.ts +42 -0
  341. package/src/rich-text-editor/utils/getSelectedNode.ts +27 -0
  342. package/src/rich-text-editor/utils/guard.ts +10 -0
  343. package/src/rich-text-editor/utils/isMobileWidth.ts +7 -0
  344. package/src/rich-text-editor/utils/joinClasses.ts +13 -0
  345. package/src/rich-text-editor/utils/point.ts +55 -0
  346. package/src/rich-text-editor/utils/rect.ts +158 -0
  347. package/src/rich-text-editor/utils/setFloatingElemPosition.ts +46 -0
  348. package/src/rich-text-editor/utils/swipe.ts +127 -0
  349. package/src/rich-text-editor/utils/url.ts +33 -0
  350. package/src/select/index.ts +1 -0
  351. package/src/select/select-item.tsx +18 -0
  352. package/src/select/select-root.tsx +50 -0
  353. package/src/select/select.css +44 -0
  354. package/src/select/select.stories.tsx +74 -0
  355. package/src/select/select.ts +9 -0
  356. package/src/slider/Slider.stories.tsx +54 -0
  357. package/src/slider/index.ts +1 -0
  358. package/src/slider/slider.css +27 -0
  359. package/src/slider/slider.tsx +20 -0
  360. package/src/spinner/Spinner.stories.tsx +19 -0
  361. package/src/spinner/index.tsx +48 -0
  362. package/src/spinner/spinner.css +11 -0
  363. package/src/tag/Tag.stories.tsx +32 -0
  364. package/src/tag/index.ts +1 -0
  365. package/src/tag/tag.css +7 -0
  366. package/src/tag/tag.tsx +27 -0
  367. package/src/vite-env.d.ts +1 -0
  368. package/tailwind.config.cjs +51 -0
  369. package/LICENSE +0 -21
  370. package/README.md +0 -87
  371. package/dist/components/Button.d.ts +0 -11
  372. package/dist/components/Checkbox.d.ts +0 -29
  373. package/dist/components/Typography.d.ts +0 -14
  374. package/dist/design-system.cjs.development.js +0 -251
  375. package/dist/design-system.cjs.development.js.map +0 -1
  376. package/dist/design-system.cjs.production.min.js +0 -2
  377. package/dist/design-system.cjs.production.min.js.map +0 -1
  378. package/dist/design-system.esm.js +0 -245
  379. package/dist/design-system.esm.js.map +0 -1
  380. package/dist/styles/theme.d.ts +0 -2
@@ -0,0 +1,95 @@
1
+ import type { ReactNode, RefAttributes } from 'react';
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
+ import { cva, cx, VariantProps } from 'class-variance-authority';
4
+
5
+ import { Button } from '../button';
6
+ import { Icon } from '../iconography';
7
+ import type { DialogFuncProps } from './types';
8
+
9
+ import './dialog.css';
10
+
11
+ const IconMap = {
12
+ error: Icon.Error,
13
+ info: Icon.Info,
14
+ warning: Icon.Warning,
15
+ };
16
+
17
+ type DialogContentStylesProps = VariantProps<typeof dialogContentStyles>;
18
+ const dialogContentStyles = cva('c-dialog', {
19
+ variants: {
20
+ withIcon: {
21
+ true: 'c-dialog-with-icon',
22
+ },
23
+ },
24
+ });
25
+
26
+ type DialogContentProps = DialogContentStylesProps & {
27
+ children: ReactNode;
28
+ } & Pick<
29
+ DialogFuncProps,
30
+ 'onEscapeKeyDown' | 'onInteractOutside' | 'onPointerDownOutside' | 'closable' | 'type' | 'className'
31
+ > &
32
+ DialogPrimitive.DialogContentProps &
33
+ Pick<DialogPrimitive.PortalProps, 'container'>;
34
+
35
+ function DialogContent({ children, closable = true, type, className, container, ...delegated }: DialogContentProps) {
36
+ const withIcon = typeof type !== 'undefined';
37
+
38
+ const IconComponent = type && IconMap[type];
39
+
40
+ return (
41
+ <DialogPrimitive.Portal container={container}>
42
+ <DialogPrimitive.Overlay className="c-dialog-overlay" />
43
+ <DialogPrimitive.Content className={dialogContentStyles({ withIcon, class: className })} {...delegated}>
44
+ {IconComponent && (
45
+ <div className="flex h-[44px] w-[44px] min-w-[44px] items-center justify-center rounded-lg bg-gray-50-900 p-[5px]">
46
+ <IconComponent className="c-dialog-icon" width={34} height={34} />
47
+ </div>
48
+ )}
49
+ {closable && (
50
+ <DialogClose asChild>
51
+ <Button className="c-dialog-close-button">
52
+ <Icon.Cancel color="density" aria-label="Close" height={16} width={16} />
53
+ </Button>
54
+ </DialogClose>
55
+ )}
56
+ <div>{children}</div>
57
+ </DialogPrimitive.Content>
58
+ </DialogPrimitive.Portal>
59
+ );
60
+ }
61
+
62
+ type DialogTitleProps = JSX.IntrinsicAttributes & DialogPrimitive.DialogTitleProps & RefAttributes<HTMLHeadingElement>;
63
+
64
+ function DialogTitle({ className, ...delegated }: DialogTitleProps) {
65
+ return <DialogPrimitive.Title className={cx('c-dialog-title', className)} {...delegated} />;
66
+ }
67
+
68
+ type DialogDescriptionProps = JSX.IntrinsicAttributes &
69
+ DialogPrimitive.DialogDescriptionProps &
70
+ RefAttributes<HTMLParagraphElement>;
71
+
72
+ function DialogDescription(delegated: DialogDescriptionProps) {
73
+ return <DialogPrimitive.Description className="c-dialog-description" {...delegated} />;
74
+ }
75
+
76
+ const DialogTrigger = DialogPrimitive.Trigger;
77
+
78
+ const DialogClose = DialogPrimitive.Close;
79
+
80
+ export const DialogRoot = DialogPrimitive.Root;
81
+
82
+ type DialogBaseProps = React.ComponentProps<typeof DialogRoot> & {
83
+ children: ReactNode;
84
+ };
85
+
86
+ export function DialogBase({ children, ...delegated }: DialogBaseProps) {
87
+ return <DialogRoot {...delegated}>{children}</DialogRoot>;
88
+ }
89
+
90
+ DialogBase.Title = DialogTitle;
91
+ DialogBase.Trigger = DialogTrigger;
92
+ DialogBase.Description = DialogDescription;
93
+ DialogBase.Content = DialogContent;
94
+ DialogBase.Overlay = DialogPrimitive.Overlay;
95
+ DialogBase.Close = DialogPrimitive.Close;
@@ -0,0 +1,40 @@
1
+ import { destroyFns } from './destroyFns';
2
+ import { DialogBase } from './dialog';
3
+ import type { DialogFuncProps } from './types';
4
+ import { confirm, withWarning, withConfirm, withDialog, withError, withInfo } from './config';
5
+
6
+ type DialogType = typeof DialogBase & DialogFuncProps;
7
+
8
+ const Dialog = DialogBase as DialogType;
9
+
10
+ function showDialog(delegated: DialogFuncProps) {
11
+ return confirm(withDialog(delegated));
12
+ }
13
+
14
+ function showWarning(delegated: DialogFuncProps) {
15
+ return confirm(withWarning(delegated));
16
+ }
17
+
18
+ function showConfirm(delegated: DialogFuncProps) {
19
+ return confirm(withConfirm(delegated));
20
+ }
21
+
22
+ function showError(delegated: DialogFuncProps) {
23
+ return confirm(withError(delegated));
24
+ }
25
+
26
+ function showInfo(delegated: DialogFuncProps) {
27
+ return confirm(withInfo(delegated));
28
+ }
29
+
30
+ function destroyAll() {
31
+ while (destroyFns.length) {
32
+ const close = destroyFns.pop();
33
+
34
+ if (close) {
35
+ close();
36
+ }
37
+ }
38
+ }
39
+
40
+ export { Dialog, destroyAll, showWarning, showConfirm, showDialog, showError, showInfo };
@@ -0,0 +1,70 @@
1
+ import type { ReactNode, ComponentProps } from 'react';
2
+
3
+ import type { Button } from '../button';
4
+
5
+ export type DialogFuncProps = {
6
+ afterClose?: () => void;
7
+ /**
8
+ * Text that should be displayed in the cancel button
9
+ */
10
+ cancelText?: ReactNode;
11
+ className?: string;
12
+ closable?: boolean;
13
+ content?: ReactNode;
14
+ description?: ReactNode;
15
+ /**
16
+ * Flag that controls if the cancel button should be included in the dialog or not
17
+ */
18
+ displayCancel?: boolean;
19
+ /**
20
+ * Flag that controls if the ok button should be included in the dialog or not
21
+ */
22
+ displayOk?: boolean;
23
+ /**
24
+ * @deprecated - Use displayCancel instead
25
+ *
26
+ * Flag that controls if the cancel button should be included in the dialog or not
27
+ */
28
+ okCancel?: boolean;
29
+ /**
30
+ * Text that should be displayed in the ok button
31
+ */
32
+ okText?: ReactNode;
33
+ okButtonIntent?: ComponentProps<typeof Button>['intent'];
34
+ /**
35
+ * The callback that will be called once the user click the cancel button
36
+ * @param args
37
+ * @returns void
38
+ */
39
+ onCancel?: (...args: unknown[]) => void;
40
+ onEscapeKeyDown?: (event: Event) => void;
41
+ onInteractOutside?: (event: Event) => void;
42
+ /**
43
+ * The callback that will be called once the user click the ok button
44
+ * @param args
45
+ * @returns void
46
+ */
47
+ onOk?: (...args: unknown[]) => void;
48
+ onPointerDownOutside?: (event: Event) => void;
49
+ open?: boolean;
50
+ prefixCls?: string;
51
+ title?: ReactNode;
52
+ type?: 'info' | 'error' | 'warning';
53
+ };
54
+
55
+ export type ConfigUpdate = DialogFuncProps | ((prevConfig: DialogFuncProps) => DialogFuncProps);
56
+
57
+ export type DialogFunc = (props: DialogFuncProps) => {
58
+ destroy: () => void;
59
+ update: (configUpdate: ConfigUpdate) => void;
60
+ };
61
+
62
+ export type ModalStaticFunctions = Record<NonNullable<DialogFuncProps['type']>, DialogFunc>;
63
+
64
+ export interface ConfirmDialogProps extends DialogFuncProps {
65
+ afterClose?: () => void;
66
+ close: (...args: unknown[]) => void;
67
+ autoFocusButton?: null | 'ok' | 'cancel';
68
+ rootPrefixCls: string;
69
+ iconPrefixCls?: string;
70
+ }
@@ -0,0 +1,38 @@
1
+ import type { Meta } from '@storybook/react';
2
+
3
+ import { DropdownMenu } from '.';
4
+ import { Button } from '../button';
5
+ import { Icon } from '../iconography';
6
+
7
+ export default {
8
+ title: 'Components/DropdownMenu',
9
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
+ } as Meta<any>;
11
+
12
+ function ContentWithIcon() {
13
+ return (
14
+ <>
15
+ <DropdownMenu.Label>View</DropdownMenu.Label>
16
+ <DropdownMenu.Item>
17
+ <div className="flex items-center font-sans">
18
+ <Icon.Glasses width={24} height={24} />
19
+ <span className="px-3">Nerdy</span>
20
+ </div>
21
+ </DropdownMenu.Item>
22
+ <DropdownMenu.Item>
23
+ <div className="flex items-center">
24
+ <Icon.GraphQL width={24} height={24} />
25
+ <span className="px-3 font-sans">Developer</span>
26
+ </div>
27
+ </DropdownMenu.Item>
28
+ </>
29
+ );
30
+ }
31
+
32
+ export const WithOpenState = () => {
33
+ return (
34
+ <DropdownMenu.Root content={<ContentWithIcon />}>
35
+ <Button prepend={<Icon.NailPolish width={20} height={20} />}>Pretty</Button>
36
+ </DropdownMenu.Root>
37
+ );
38
+ };
@@ -0,0 +1,15 @@
1
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
2
+ import { cx } from 'class-variance-authority';
3
+ import type { ReactNode } from 'react';
4
+
5
+ type DropdownMenuItemProps = DropdownMenuPrimitive.MenuItemProps & {
6
+ children: ReactNode;
7
+ };
8
+
9
+ export function DropdownMenuItem({ children, className, ...delegated }: DropdownMenuItemProps) {
10
+ return (
11
+ <DropdownMenuPrimitive.Item {...delegated} className={cx('c-dropdown-menu-item', className)}>
12
+ {children}
13
+ </DropdownMenuPrimitive.Item>
14
+ );
15
+ }
@@ -0,0 +1,10 @@
1
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
2
+ import type { ReactNode } from 'react';
3
+
4
+ type DropdownMenuLabelProps = {
5
+ children: ReactNode;
6
+ };
7
+
8
+ export function DropdownMenuLabel({ children }: DropdownMenuLabelProps) {
9
+ return <DropdownMenuPrimitive.Label className="c-dropdown-menu-label">{children}</DropdownMenuPrimitive.Label>;
10
+ }
@@ -0,0 +1,33 @@
1
+ import type { ReactNode } from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+
4
+ type DropdownMenuRootProps = DropdownMenuPrimitive.MenuContentProps & {
5
+ children: ReactNode;
6
+ content: ReactNode;
7
+ alignContent?: 'start' | 'center' | 'end';
8
+ disabled?: boolean;
9
+ };
10
+
11
+ export function DropdownMenuRoot({
12
+ children,
13
+ content,
14
+ alignContent = 'start',
15
+ disabled,
16
+ ...delegated
17
+ }: DropdownMenuRootProps) {
18
+ return (
19
+ <DropdownMenuPrimitive.Root>
20
+ <DropdownMenuPrimitive.Trigger disabled={disabled} asChild>
21
+ {children}
22
+ </DropdownMenuPrimitive.Trigger>
23
+ <DropdownMenuPrimitive.Content
24
+ align={alignContent}
25
+ sideOffset={5}
26
+ className="c-dropdown-menu-content"
27
+ {...delegated}
28
+ >
29
+ {content}
30
+ </DropdownMenuPrimitive.Content>
31
+ </DropdownMenuPrimitive.Root>
32
+ );
33
+ }
@@ -0,0 +1,20 @@
1
+ .c-dropdown-menu-content {
2
+ @apply shadow;
3
+ }
4
+
5
+ .c-dropdown-menu-label {
6
+ @apply bg-elevate px-4 pt-2 font-sans text-xs font-bold text-gray-500-400;
7
+ @apply first:rounded-tl first:rounded-tr;
8
+ }
9
+
10
+ .c-dropdown-menu-item {
11
+ @apply flex h-10 cursor-pointer items-center bg-elevate px-3 font-sans text-xs font-medium text-gray-700-200;
12
+
13
+ &:hover,
14
+ &:focus,
15
+ &:focus-visible {
16
+ @apply bg-gray-50-900 outline-none;
17
+ }
18
+
19
+ @apply first:rounded-tr first:rounded-tl last:rounded-br last:rounded-bl;
20
+ }
@@ -0,0 +1,11 @@
1
+ import { DropdownMenuRoot } from './dropdown-menu-root';
2
+ import { DropdownMenuItem } from './dropdown-menu-item';
3
+ import { DropdownMenuLabel } from './dropdown-menu-label';
4
+
5
+ import './dropdown-menu.css';
6
+
7
+ export const DropdownMenu = {
8
+ Root: DropdownMenuRoot,
9
+ Item: DropdownMenuItem,
10
+ Label: DropdownMenuLabel,
11
+ };
@@ -0,0 +1,45 @@
1
+ import type { StoryObj, Meta } from '@storybook/react';
2
+ import { IconButton } from '.';
3
+ import { Card } from '../card';
4
+ import { Icon } from '../iconography';
5
+
6
+ const meta: Meta<typeof IconButton> = {
7
+ title: 'Components/IconButton',
8
+ component: IconButton,
9
+ argTypes: {},
10
+ };
11
+
12
+ export default meta;
13
+ type Story = StoryObj<typeof IconButton>;
14
+
15
+ const sizes = ['xxs', 'xs', 'sm', 'md', 'lg'] as const;
16
+
17
+ export const AllButton: Story = {
18
+ name: 'All Buttons',
19
+ render: () => {
20
+ return (
21
+ <div className="grid grid-cols-5 justify-items-center gap-6">
22
+ {sizes.map(size => (
23
+ <Card>
24
+ <IconButton size={size}>
25
+ <Icon.Cancel width={16} height={16} />
26
+ </IconButton>
27
+ </Card>
28
+ ))}
29
+ </div>
30
+ );
31
+ },
32
+ };
33
+
34
+ export const Default: Story = {
35
+ args: {
36
+ children: <Icon.Cancel width={16} height={16} />,
37
+ },
38
+ };
39
+
40
+ export const Elevate: Story = {
41
+ args: {
42
+ children: <Icon.Add width={16} height={16} />,
43
+ variant: 'elevate',
44
+ },
45
+ };
@@ -0,0 +1,50 @@
1
+ .c-icon-button {
2
+ @apply flex cursor-pointer appearance-none items-center justify-center rounded border-none bg-transparent p-0 font-medium;
3
+
4
+ &:disabled {
5
+ @apply scale-100 cursor-default shadow-none;
6
+ }
7
+
8
+ &:enabled {
9
+ &:active {
10
+ transform: scale(0.95);
11
+ }
12
+
13
+ &:focus,
14
+ &:hover {
15
+ @apply bg-elevate shadow;
16
+ }
17
+
18
+ &:hover {
19
+ @apply outline outline-1 outline-purple-200-700;
20
+ }
21
+
22
+ &:focus-visible {
23
+ @apply outline outline-1 outline-offset-1 outline-inherit;
24
+ }
25
+ }
26
+
27
+ &-elevate {
28
+ @apply bg-elevate shadow;
29
+ }
30
+
31
+ &-xxs {
32
+ @apply h-5 w-5;
33
+ }
34
+
35
+ &-xs {
36
+ @apply h-6 w-6;
37
+ }
38
+
39
+ &-sm {
40
+ @apply h-9 w-9;
41
+ }
42
+
43
+ &-md {
44
+ @apply h-11 w-11;
45
+ }
46
+
47
+ &-lg {
48
+ @apply h-14 w-14;
49
+ }
50
+ }
@@ -0,0 +1,39 @@
1
+ import { ComponentPropsWithRef, forwardRef } from 'react';
2
+ import { cva, VariantProps } from 'class-variance-authority';
3
+
4
+ import './icon-button.css';
5
+
6
+ type IconButtonStylesProps = VariantProps<typeof buttonStyles>;
7
+ const buttonStyles = cva(['c-icon-button'], {
8
+ variants: {
9
+ variant: {
10
+ default: '',
11
+ elevate: 'c-icon-button-elevate',
12
+ },
13
+ size: {
14
+ xxs: 'c-icon-button-xxs',
15
+ xs: 'c-icon-button-xs',
16
+ sm: 'c-icon-button-sm',
17
+ md: 'c-icon-button-md',
18
+ lg: 'c-icon-button-lg',
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ size: 'sm',
23
+ variant: 'default',
24
+ },
25
+ });
26
+
27
+ export type IconButtonProps = ComponentPropsWithRef<'button'> & IconButtonStylesProps;
28
+
29
+ export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
30
+ ({ children, className, type = 'button', size, variant, ...delegated }, ref) => {
31
+ return (
32
+ <button ref={ref} type={type} className={buttonStyles({ size, variant, className })} {...delegated}>
33
+ {children}
34
+ </button>
35
+ );
36
+ },
37
+ );
38
+
39
+ IconButton.displayName = 'Button';
@@ -0,0 +1,3 @@
1
+ export { IconButton } from './icon-button';
2
+
3
+ export type { IconButtonProps } from './icon-button';
@@ -0,0 +1,47 @@
1
+ import type { StoryObj, Meta } from '@storybook/react';
2
+ import { Icon } from '.';
3
+ import { Card } from '../card';
4
+
5
+ function Dummy() {
6
+ return <div>🤓</div>;
7
+ }
8
+
9
+ const meta: Meta<typeof Dummy> = {
10
+ title: 'Components/Icon',
11
+ component: Dummy,
12
+ };
13
+
14
+ export default meta;
15
+ type Story = StoryObj<typeof Icon>;
16
+
17
+ export const AllIcons: Story = {
18
+ name: 'All icons',
19
+ render: () => {
20
+ return (
21
+ <div>
22
+ <div className="grid grid-cols-6 justify-items-center gap-6">
23
+ {Object.keys(Icon).map(iconName => {
24
+ // @ts-expect-error
25
+ const Cmp = Icon[iconName];
26
+ const cmpString = `<Icon.${iconName} />`;
27
+ return (
28
+ <div
29
+ className="cursor-pointer text-center active:scale-95"
30
+ onClick={() => {
31
+ const type = 'text/plain';
32
+ const blob = new Blob([cmpString], { type });
33
+ navigator.clipboard.write([new ClipboardItem({ [type]: blob })]);
34
+ }}
35
+ >
36
+ <Card title={cmpString}>
37
+ <Cmp width={25} height={25} />
38
+ </Card>
39
+ <div className="mt-2 whitespace-nowrap text-xs text-gray-700-200">{cmpString}</div>
40
+ </div>
41
+ );
42
+ })}
43
+ </div>
44
+ </div>
45
+ );
46
+ },
47
+ };
@@ -0,0 +1,30 @@
1
+ import { forwardRef, SVGProps } from 'react';
2
+
3
+ type AddProps = SVGProps<SVGSVGElement>;
4
+
5
+ type AddRef = SVGSVGElement;
6
+
7
+ export const Add = forwardRef<AddRef, AddProps>((delegated, ref) => {
8
+ return (
9
+ <svg
10
+ ref={ref}
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ width="22"
13
+ height="22"
14
+ viewBox="0 0 22 22"
15
+ fill="currentColor"
16
+ {...delegated}
17
+ >
18
+ <path
19
+ fill="#528693"
20
+ d="M13.258 19.467c.005-.095-.045-3.832-.045-3.832v-2.157l-.05-.096.141-.13 5.963.028a.647.647 0 0 0 .407-.15.587.587 0 0 0 .202-.376l.005-.188.055-3.064a.576.576 0 0 0-.174-.521.6.6 0 0 0-.266-.155 1.606 1.606 0 0 0-.366-.028c-.055.01-.114.004-.194.01h-.646l-4.962.031a.188.188 0 0 1-.133-.032l-.055-.091v-.348l.05-5.612a.61.61 0 0 0-.16-.434.625.625 0 0 0-.316-.16c-.109-.009-.258-.004-.38-.004-.058-.005-2.166-.092-2.974-.12a.517.517 0 0 0-.42.165.567.567 0 0 0-.156.44l.004 2.336-.045 2.57.022 1.222a.151.151 0 0 1-.04.086.105.105 0 0 1-.079.033l-5.894-.05a.57.57 0 0 0-.517.25c-.095.202-.13.427-.101.648L2.06 12.59a.598.598 0 0 0 .178.453l.054.055a.573.573 0 0 0 .247.11c.086.016.172.022.26.018l2.68.037 3.287-.014a16.393 16.393 0 0 0-.046 2.005l.02.22c-.02.017-.02.274 0 3.384.006.077.007.155.004.232-.01.136.006.273.045.403.024.083.07.157.133.215.053.059.12.104.194.133.146.037.297.052.448.046.06-.005.119 0 .174 0l2.748.077c.2.022.4-.016.577-.11a.452.452 0 0 0 .194-.388Zm-.873-.278h-.12a52.435 52.435 0 0 0-1.019-.05l-1.527-.066-.092-.046a.18.18 0 0 1-.04-.168l.044-3.357.015-2.401a.678.678 0 0 0-.188-.535.651.651 0 0 0-.457-.194l-5.185.017-.695-.009-.114.05-.12-.118.005-2.474a.248.248 0 0 1 .037-.202l.073-.054 5.163.022H9.3a.194.194 0 0 0 .156-.064.189.189 0 0 0 .06-.151l.004-1.706.014-2.62.013-1.45.018-.582-.004-.088.055-.054a.239.239 0 0 1 .165-.055l2.487.055.092.01.065.064.022.077-.091 5.333-.002.797a.452.452 0 0 0 .457.457l5.479-.018h.165c.165-.008.33-.002.493.018.046.006.09.02.13.041.05.05.036.156.036.238l-.004.078-.032 1.898s-.005.178-.01.22a.567.567 0 0 0 .005.123.5.5 0 0 1 .005.114c-.028.11-.12.119-.28.114l-5.583-.013a.905.905 0 0 0-.59.114.6.6 0 0 0-.234.499l.02 2.743.113 3.023c0 .068-.007.135-.018.201a.165.165 0 0 1-.12.17v-.002Z"
21
+ />
22
+ <path
23
+ fill="#BFF6F8"
24
+ d="M12.384 19.19h-.119a52.478 52.478 0 0 0-1.02-.05l-1.527-.065-.092-.046a.18.18 0 0 1-.04-.169l.045-3.357.014-2.401a.678.678 0 0 0-.188-.535.651.651 0 0 0-.457-.194l-5.184.016-.695-.009-.114.05-.12-.118.005-2.474a.248.248 0 0 1 .037-.202l.073-.054 5.163.022H9.3a.194.194 0 0 0 .156-.064.189.189 0 0 0 .06-.151l.004-1.706.014-2.62.013-1.45.018-.582-.004-.088.055-.054a.239.239 0 0 1 .165-.055l2.487.055.092.01.065.064.022.077-.091 5.333-.002.797a.452.452 0 0 0 .457.457l5.479-.018h.165c.165-.008.33-.002.493.018.046.006.09.02.13.041.05.05.036.156.036.238l-.004.078-.032 1.898s-.005.178-.01.22a.567.567 0 0 0 .005.123.5.5 0 0 1 .005.114c-.028.11-.12.119-.28.114l-5.583-.013a.906.906 0 0 0-.59.114.6.6 0 0 0-.234.499l.02 2.743.113 3.023c0 .068-.007.135-.018.201a.166.166 0 0 1-.12.17Z"
25
+ />
26
+ </svg>
27
+ );
28
+ });
29
+
30
+ Add.displayName = 'AddIcon';
@@ -0,0 +1,15 @@
1
+ import { forwardRef, SVGProps } from 'react';
2
+
3
+ type ArrowProps = SVGProps<SVGSVGElement>;
4
+
5
+ type ArrowRef = SVGSVGElement;
6
+
7
+ export const Arrow = forwardRef<ArrowRef, ArrowProps>((delegated, ref) => {
8
+ return (
9
+ <svg ref={ref} width="10" height="10" viewBox="0 0 10 10" fill="currentColor" {...delegated}>
10
+ <path d="M4.14995 9.85C4.24341 9.94161 4.36907 9.99293 4.49995 9.99293C4.63083 9.99293 4.75649 9.94161 4.84995 9.85L8.03995 6.67C8.09195 6.6248 8.13404 6.56934 8.16359 6.5071C8.19314 6.44486 8.20951 6.37719 8.21167 6.30832C8.21383 6.23946 8.20173 6.17089 8.17614 6.10693C8.15055 6.04296 8.11201 5.98497 8.06295 5.9366C8.01389 5.88823 7.95536 5.85052 7.89104 5.82584C7.82671 5.80116 7.75798 5.79003 7.68915 5.79317C7.62033 5.79631 7.55289 5.81363 7.49108 5.84406C7.42927 5.87449 7.37441 5.91737 7.32995 5.97L4.49995 8.78L1.66995 5.96C1.62475 5.908 1.56929 5.86591 1.50705 5.83636C1.44481 5.80681 1.37714 5.79044 1.30827 5.78828C1.23941 5.78612 1.17084 5.79822 1.10688 5.82381C1.04291 5.8494 0.98492 5.88794 0.936549 5.937C0.888179 5.98606 0.850469 6.04459 0.825787 6.10892C0.801105 6.17324 0.789983 6.24197 0.79312 6.3108C0.796256 6.37962 0.813582 6.44706 0.844012 6.50887C0.874442 6.57068 0.917318 6.62554 0.96995 6.67L4.14995 9.85ZM4.49995 -2.18557e-08C4.22381 -3.39261e-08 3.99995 0.223858 3.99995 0.5L3.99995 9.5L4.99995 9.5L4.99995 0.5C4.99995 0.223857 4.77609 -9.78527e-09 4.49995 -2.18557e-08Z" />
11
+ </svg>
12
+ );
13
+ });
14
+
15
+ Arrow.displayName = 'ArrowIcon';
@@ -0,0 +1,59 @@
1
+ import { forwardRef, SVGProps } from 'react';
2
+
3
+ type AtomProps = SVGProps<SVGSVGElement>;
4
+
5
+ type AtomRef = SVGSVGElement;
6
+
7
+ export const Atom = forwardRef<AtomRef, AtomProps>((delegated, ref) => {
8
+ return (
9
+ <svg
10
+ ref={ref}
11
+ width="24"
12
+ height="27"
13
+ viewBox="0 0 24 27"
14
+ fill="none"
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ {...delegated}
17
+ >
18
+ <path
19
+ fill="#528693"
20
+ d="M18.068 3.103c.935 0 .938-1.5 0-1.5s-.938 1.5 0 1.5ZM5.911 2.928c.641 0 .643-1.027 0-1.027-.642 0-.643 1.027 0 1.027ZM4.294 8.862c.577 0 .578-.925 0-.925s-.578.925 0 .925ZM6.03 23.058a.39.39 0 0 0 .265-.126.413.413 0 0 0 0-.558.39.39 0 0 0-.264-.126.39.39 0 0 0-.264.126.413.413 0 0 0 0 .558.39.39 0 0 0 .264.126ZM16.93 23.13c.674 0 .675-1.078 0-1.078s-.675 1.078 0 1.078ZM18.966 17.685c.885 0 .887-1.418 0-1.418-.886 0-.886 1.418 0 1.418ZM11.6 23.619a.217.217 0 0 0 .15-.069.23.23 0 0 0 0-.315.216.216 0 0 0-.15-.068.216.216 0 0 0-.15.068.23.23 0 0 0 0 .315c.039.042.093.067.15.069ZM22.291 13.446l.043.031a.903.903 0 0 0 1.263-.344.972.972 0 0 0 0-.952.936.936 0 0 0-.34-.348.902.902 0 0 0-.924.004l-.042.03a.905.905 0 0 0-.319.33.937.937 0 0 0 0 .922c.077.136.187.25.319.329v-.002ZM11.496 26.097c3.17 0 5.738-.359 5.738-.8 0-.443-2.569-.802-5.738-.802-3.17 0-5.738.359-5.738.801 0 .442 2.569.8 5.738.8Z"
21
+ opacity=".05"
22
+ />
23
+ <path
24
+ fill="#FF99DB"
25
+ d="M11.496 16.417c1.95 0 3.531-1.629 3.531-3.638 0-2.01-1.581-3.638-3.531-3.638-1.95 0-3.531 1.629-3.531 3.638 0 2.01 1.58 3.638 3.53 3.638Z"
26
+ />
27
+ <path
28
+ fill="#528693"
29
+ d="M8.252 12.78c0-.689.207-1.36.591-1.923.385-.563.929-.99 1.557-1.222a3.153 3.153 0 0 1 1.956-.076 3.236 3.236 0 0 1 1.642 1.096 3.424 3.424 0 0 1 .285 3.834 3.278 3.278 0 0 1-1.46 1.341 3.156 3.156 0 0 1-1.945.232A3.259 3.259 0 0 1 9 14.9a3.437 3.437 0 0 1-.748-2.122.3.3 0 0 0-.088-.202.283.283 0 0 0-.398 0 .3.3 0 0 0-.088.202c0 .81.243 1.602.695 2.265a3.834 3.834 0 0 0 1.834 1.439c.74.273 1.545.305 2.304.09a3.81 3.81 0 0 0 1.934-1.293 4.03 4.03 0 0 0 .33-4.516 3.859 3.859 0 0 0-1.723-1.577 3.715 3.715 0 0 0-2.29-.268 3.85 3.85 0 0 0-2.203 1.37 4.059 4.059 0 0 0-.881 2.49.3.3 0 0 0 .088.202.283.283 0 0 0 .398 0 .3.3 0 0 0 .088-.202Z"
30
+ />
31
+ <path
32
+ fill="#528693"
33
+ d="M9.025 12.946a2.787 2.787 0 0 1 .78-1.91 2.626 2.626 0 0 1 1.854-.803.157.157 0 0 0 .113-.048.167.167 0 0 0 0-.232.157.157 0 0 0-.113-.048c-.783 0-1.533.32-2.087.891a3.093 3.093 0 0 0-.866 2.15c0 .044.017.086.047.116a.157.157 0 0 0 .225 0 .167.167 0 0 0 .047-.116ZM8.972 13.854c.033 0 .066-.01.094-.029a.17.17 0 0 0 .062-.079.137.137 0 0 0 .014-.068l-.006-.046a.176.176 0 0 0-.044-.078l-.034-.027a.167.167 0 0 0-.086-.025.174.174 0 0 0-.12.053.183.183 0 0 0-.05.123l.005.046c.008.03.024.056.044.078l.035.028a.166.166 0 0 0 .086.023v.001ZM12.136 10.204v.004a.112.112 0 0 0 .026.051c.01.016.024.03.04.039l.036.015a.145.145 0 0 0 .077 0l.034-.015a.112.112 0 0 0 .041-.039.076.076 0 0 0 .019-.033.118.118 0 0 0 .012-.057l-.005-.04-.014-.035a.113.113 0 0 0-.038-.042.107.107 0 0 0-.05-.027.109.109 0 0 0-.057-.003.104.104 0 0 0-.054.018l-.03.024a.148.148 0 0 0-.037.065v.004a.136.136 0 0 0 0 .07Z"
34
+ />
35
+ <path
36
+ fill="#528693"
37
+ d="M6.023 12.779a23.383 23.383 0 0 1 1.024-7.096c.517-1.608 1.283-3.336 2.601-4.417.989-.81 2.233-.962 3.322-.27 1.369.87 2.196 2.529 2.747 4.027a21.916 21.916 0 0 1 1.234 6.778 24.482 24.482 0 0 1-.779 7.302c-.471 1.725-1.178 3.543-2.437 4.827-.881.898-2.097 1.4-3.294.86-1.407-.632-2.294-2.18-2.89-3.56-.883-2.039-1.303-4.3-1.46-6.515a27.856 27.856 0 0 1-.068-1.936.278.278 0 0 0-.082-.187.262.262 0 0 0-.369 0 .278.278 0 0 0-.081.187c.004 2.518.314 5.078 1.117 7.465.567 1.685 1.403 3.46 2.818 4.559a3.229 3.229 0 0 0 3.73.283c1.471-.883 2.37-2.582 2.98-4.158.88-2.267 1.261-4.74 1.347-7.17a24.885 24.885 0 0 0-.84-7.606c-.509-1.799-1.28-3.699-2.628-5.008C12.998.158 11.617-.328 10.28.247 8.781.892 7.8 2.46 7.15 3.92c-.951 2.138-1.408 4.494-1.582 6.829-.05.675-.074 1.352-.075 2.03.002.07.032.138.081.187a.262.262 0 0 0 .369 0 .278.278 0 0 0 .081-.187Z"
38
+ />
39
+ <path
40
+ fill="#528693"
41
+ d="M8.64 7.969c2.066-1.293 4.315-2.336 6.686-2.86 1.61-.357 3.548-.57 5.086.197.576.27 1.048.73 1.34 1.309.24.543.327 1.145.25 1.737-.164 1.605-1.1 3.108-2.06 4.333a21.318 21.318 0 0 1-4.85 4.42 22.562 22.562 0 0 1-6.661 3.155c-1.718.468-3.69.777-5.416.176-1.207-.422-2.038-1.42-2.049-2.758-.012-1.547.808-3.03 1.665-4.243a19.773 19.773 0 0 1 4.556-4.482c.474-.345.958-.673 1.454-.984.29-.184.024-.657-.269-.473a22.835 22.835 0 0 0-5.39 4.61C1.87 13.438.81 15.035.512 16.801c-.235 1.395.136 2.779 1.293 3.62 1.41 1.023 3.364.982 4.994.743 2.442-.36 4.8-1.342 6.944-2.575a23.78 23.78 0 0 0 5.757-4.55c1.223-1.345 2.372-2.932 2.86-4.732.359-1.328.254-2.821-.758-3.823-1.204-1.192-3.091-1.326-4.666-1.182-2.378.218-4.688 1.076-6.806 2.183-.599.313-1.183.651-1.757 1.01-.293.183-.026.657.268.473Z"
42
+ />
43
+ <path
44
+ fill="#528693"
45
+ d="M14.62 7.496c-2.17-1.357-4.551-2.454-7.05-2.966-1.725-.353-3.736-.512-5.352.35a3.343 3.343 0 0 0-1.39 1.404 3.481 3.481 0 0 0-.38 1.967c.135 1.715 1.061 3.29 2.067 4.615a21.487 21.487 0 0 0 5.078 4.687 22.835 22.835 0 0 0 7.03 3.29c1.783.463 3.854.752 5.624.074 1.321-.507 2.24-1.618 2.306-3.095.074-1.64-.756-3.25-1.652-4.546-1.285-1.86-2.956-3.421-4.755-4.742a24.734 24.734 0 0 0-1.526-1.037c-.293-.185-.56.289-.269.473a22.565 22.565 0 0 1 5.134 4.347c1.078 1.26 2.095 2.754 2.443 4.424.258 1.237-.018 2.535-1.092 3.266-1.361.927-3.228.846-4.768.588-2.321-.389-4.55-1.322-6.593-2.502a23.435 23.435 0 0 1-5.472-4.295c-1.187-1.278-2.314-2.784-2.819-4.501-.351-1.197-.326-2.555.618-3.46C2.94 4.75 4.755 4.716 6.204 4.867c2.261.235 4.469 1.078 6.48 2.139.567.3 1.123.623 1.668.964.06.032.131.04.197.02a.267.267 0 0 0 .155-.126.282.282 0 0 0-.084-.367Z"
46
+ />
47
+ <path
48
+ fill="#fff"
49
+ d="M11.963 14.285h.003c.2-.04.384-.14.53-.287.175-.111.317-.27.41-.46l.159-.388c.065-.21.075-.434.028-.649a1.234 1.234 0 0 0-.188-.604l-.246-.329-.32-.254a1.152 1.152 0 0 0-.585-.193 1.164 1.164 0 0 0-.63.03l-.377.163c-.343.228-.6.571-.725.971l-.056.433c-.01.217.037.433.136.626.036.136.106.26.203.359.11.176.263.32.442.418l.377.164c.275.078.564.078.84 0h-.001Z"
50
+ />
51
+ <path
52
+ fill="#FF99DB"
53
+ d="m11.172 13.1.017.019.105.083c.057.038.124.06.192.063a.253.253 0 0 0 .138 0 .379.379 0 0 0 .191-.063l.105-.083.08-.108a.403.403 0 0 0 .062-.199.414.414 0 0 0-.009-.212l-.002-.026a.548.548 0 0 0-.135-.24.524.524 0 0 0-.232-.139l-.14-.019a.513.513 0 0 0-.265.074.605.605 0 0 0-.243.324.562.562 0 0 0 .136.527Z"
54
+ />
55
+ </svg>
56
+ );
57
+ });
58
+
59
+ Atom.displayName = 'AtomIcon';
@@ -0,0 +1,26 @@
1
+ import { forwardRef, SVGProps } from 'react';
2
+
3
+ type CancelProps = SVGProps<SVGSVGElement>;
4
+
5
+ type CancelRef = SVGSVGElement;
6
+
7
+ export const Cancel = forwardRef<CancelRef, CancelProps>((delegated, ref) => {
8
+ return (
9
+ <svg
10
+ ref={ref}
11
+ width="34"
12
+ height="34"
13
+ viewBox="0 0 34 34"
14
+ fill="none"
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ {...delegated}
17
+ >
18
+ <path
19
+ d="m27.4301 24.4325-.1299.1299c-.17.15-.6497.5798-1.1695 1.0595l-1.7392 1.5993-.1499.05a.2783.2783 0 0 1-.2299-.14l-3.6183-3.7182-2.6088-2.6388a1.0488 1.0488 0 0 0-.7926-.3838 1.006 1.006 0 0 0-.7096.2899l-5.6474 5.6773-.7696.7496-.07.18h-.2599l-2.6987-2.7088a.3813.3813 0 0 1-.18-.2598l.02-.14 5.6674-5.6173 1.2394-1.2395a.2995.2995 0 0 0 .1-.2398.2903.2903 0 0 0-.1-.2299l-1.8591-1.8692-2.8487-2.8786-1.5692-1.5992-.6197-.6597-.1-.09v-.12a.3689.3689 0 0 1 .12-.2398l2.7786-2.6588.11-.09h.14l.1099.06 5.7273 5.9272.8696.8796a.6998.6998 0 0 0 .9995 0l5.9672-6.0071.1799-.18a4.5467 4.5467 0 0 1 .5597-.5197.5585.5585 0 0 1 .19-.1c.1099 0 .2099.13.2998.22l.08.0899 2.039 2.109s.1899.2.2299.2499a.864.864 0 0 0 .1399.13.7704.7704 0 0 1 .13.1199c.0899.1499 0 .2598-.1799.4298l-6.1172 6.0871a1.3994 1.3994 0 0 0-.5197.7696.9287.9287 0 0 0 .2899.7997l3.0185 2.9786 3.4284 3.1785a2.001 2.001 0 0 1 .1999.2398.2564.2564 0 0 1 .0853.1524.2564.2564 0 0 1-.0323.1715Z"
20
+ fill="currentColor"
21
+ />
22
+ </svg>
23
+ );
24
+ });
25
+
26
+ Cancel.displayName = 'CancelIcon';