cetec-design-system 0.0.7 → 0.0.9

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 (516) hide show
  1. package/package.json +2 -2
  2. package/src/App.tsx +478 -0
  3. package/src/components/Box/Box.tsx +26 -0
  4. package/src/components/Box/index.tsx +1 -0
  5. package/src/components/Button/Button.stories.tsx +129 -0
  6. package/src/components/Button/Button.tsx +45 -0
  7. package/src/components/Button/ButtonContent.tsx +32 -0
  8. package/src/components/Button/index.tsx +1 -0
  9. package/src/components/CheckBox/CheckBox.tsx +36 -0
  10. package/src/components/CheckBox/index.tsx +1 -0
  11. package/src/components/Code/Code.tsx +35 -0
  12. package/src/components/Code/Pre.tsx +35 -0
  13. package/src/components/Code/copy-to-clipboard-button.tsx +41 -0
  14. package/src/components/Code/index.tsx +2 -0
  15. package/src/components/Divider/Divider.tsx +26 -0
  16. package/src/components/Divider/index.tsx +1 -0
  17. package/src/components/Heading/Heading.tsx +33 -0
  18. package/src/components/Heading/index.tsx +1 -0
  19. package/src/components/Icon/Icon.stories.tsx +31 -0
  20. package/src/components/Icon/Icon.tsx +46 -0
  21. package/src/components/Icon/iconNames.ts +219 -0
  22. package/src/components/Icon/icons.d.ts +1 -0
  23. package/src/components/Icon/index.tsx +3 -0
  24. package/src/components/IconButton/IconButton.tsx +58 -0
  25. package/src/components/IconButton/index.tsx +1 -0
  26. package/src/components/Input/Input.tsx +42 -0
  27. package/src/components/Input/index.tsx +1 -0
  28. package/src/components/Label/Label.tsx +33 -0
  29. package/src/components/Label/index.tsx +1 -0
  30. package/src/components/Link/Link.tsx +54 -0
  31. package/src/components/Link/index.tsx +1 -0
  32. package/src/components/PandaPatterns.tsx +23 -0
  33. package/src/components/Radio/Radio.tsx +28 -0
  34. package/src/components/Radio/index.tsx +1 -0
  35. package/src/components/Slot.tsx +16 -0
  36. package/src/components/Spinner/Spinner.tsx +22 -0
  37. package/src/components/Spinner/index.tsx +1 -0
  38. package/src/components/Text/Text.stories.tsx +106 -0
  39. package/src/components/Text/Text.tsx +39 -0
  40. package/src/components/Text/index.tsx +1 -0
  41. package/src/components/TextInput/TextInput.tsx +33 -0
  42. package/src/components/TextInput/index.tsx +1 -0
  43. package/src/components/Textarea/Textarea.tsx +36 -0
  44. package/src/components/Textarea/index.tsx +1 -0
  45. package/src/components/ThemeSwitcher/ThemeSwitcher.tsx +20 -0
  46. package/src/components/ThemeSwitcher/index.tsx +1 -0
  47. package/src/contexts/ThemeContext.tsx +77 -0
  48. package/src/main.tsx +10 -0
  49. package/src/recipes/box.ts +16 -0
  50. package/src/recipes/button.ts +220 -0
  51. package/src/recipes/checkbox.ts +81 -0
  52. package/src/recipes/code.ts +37 -0
  53. package/src/recipes/divider.ts +40 -0
  54. package/src/recipes/index.ts +12 -0
  55. package/src/recipes/input.ts +56 -0
  56. package/src/recipes/radio.ts +71 -0
  57. package/src/recipes/spinner.ts +42 -0
  58. package/src/recipes/text.ts +193 -0
  59. package/src/recipes/textarea.ts +78 -0
  60. package/src/recipes/textinput.ts +76 -0
  61. package/src/storybook/Tokens.mdx +169 -0
  62. package/src/storybook/components/Colors.tsx +78 -0
  63. package/src/storybook/doctemplate.mdx +36 -0
  64. package/src/storybook/intro.mdx +15 -0
  65. package/src/styles/conditions.ts +108 -0
  66. package/src/styles/font-imports.css +35 -0
  67. package/src/styles/globalStyle.ts +90 -0
  68. package/src/styles/index.css +3 -0
  69. package/src/styles/semanticTokens.ts +110 -0
  70. package/src/styles/tokens.ts +580 -0
  71. package/src/utils/forwardRefWithAs.ts +26 -0
  72. package/src/utils/generate-sprite.js +174 -0
  73. package/src/utils/splitProps.ts +11 -0
  74. package/src/utils/sprite-config.js +25 -0
  75. package/src/utils/svgsSource/Building.svg +3 -0
  76. package/src/utils/svgsSource/aa-placeholder.svg +3 -0
  77. package/src/utils/svgsSource/alarm.svg +3 -0
  78. package/src/utils/svgsSource/apps.svg +3 -0
  79. package/src/utils/svgsSource/arrow-down.svg +3 -0
  80. package/src/utils/svgsSource/arrow-drop-down.svg +3 -0
  81. package/src/utils/svgsSource/arrow-drop-up.svg +3 -0
  82. package/src/utils/svgsSource/arrow-left.svg +3 -0
  83. package/src/utils/svgsSource/arrow-line-down.svg +3 -0
  84. package/src/utils/svgsSource/arrow-line-left.svg +3 -0
  85. package/src/utils/svgsSource/arrow-line-right.svg +3 -0
  86. package/src/utils/svgsSource/arrow-line-up.svg +3 -0
  87. package/src/utils/svgsSource/arrow-prompt.svg +3 -0
  88. package/src/utils/svgsSource/arrow-redo.svg +3 -0
  89. package/src/utils/svgsSource/arrow-right.svg +3 -0
  90. package/src/utils/svgsSource/arrow-square-in.svg +4 -0
  91. package/src/utils/svgsSource/arrow-square-out.svg +4 -0
  92. package/src/utils/svgsSource/arrow-undo.svg +3 -0
  93. package/src/utils/svgsSource/arrow-up.svg +3 -0
  94. package/src/utils/svgsSource/arrows-down-up.svg +3 -0
  95. package/src/utils/svgsSource/arrows-left-right.svg +3 -0
  96. package/src/utils/svgsSource/at.svg +3 -0
  97. package/src/utils/svgsSource/attachment.svg +3 -0
  98. package/src/utils/svgsSource/barcode-reader.svg +3 -0
  99. package/src/utils/svgsSource/barcode.svg +10 -0
  100. package/src/utils/svgsSource/basket.svg +6 -0
  101. package/src/utils/svgsSource/bell-active.svg +3 -0
  102. package/src/utils/svgsSource/bell-slash.svg +3 -0
  103. package/src/utils/svgsSource/bell.svg +3 -0
  104. package/src/utils/svgsSource/bin.svg +3 -0
  105. package/src/utils/svgsSource/bookmark-outlined.svg +3 -0
  106. package/src/utils/svgsSource/bookmark.svg +3 -0
  107. package/src/utils/svgsSource/bookmarks.svg +3 -0
  108. package/src/utils/svgsSource/calendar-add.svg +3 -0
  109. package/src/utils/svgsSource/calendar-view-day.svg +3 -0
  110. package/src/utils/svgsSource/calendar-view-month.svg +3 -0
  111. package/src/utils/svgsSource/calendar-view-week.svg +3 -0
  112. package/src/utils/svgsSource/calendar.svg +3 -0
  113. package/src/utils/svgsSource/caret-down.svg +3 -0
  114. package/src/utils/svgsSource/caret-left.svg +3 -0
  115. package/src/utils/svgsSource/caret-right.svg +3 -0
  116. package/src/utils/svgsSource/caret-up.svg +3 -0
  117. package/src/utils/svgsSource/cart.svg +3 -0
  118. package/src/utils/svgsSource/check-thick.svg +3 -0
  119. package/src/utils/svgsSource/check.svg +3 -0
  120. package/src/utils/svgsSource/checkbox-checked.svg +3 -0
  121. package/src/utils/svgsSource/checkbox-focus.svg +3 -0
  122. package/src/utils/svgsSource/checkbox-indeterminate.svg +3 -0
  123. package/src/utils/svgsSource/checkbox.svg +3 -0
  124. package/src/utils/svgsSource/circle-check.svg +3 -0
  125. package/src/utils/svgsSource/circle.svg +3 -0
  126. package/src/utils/svgsSource/circles-add.svg +3 -0
  127. package/src/utils/svgsSource/clipboard.svg +3 -0
  128. package/src/utils/svgsSource/clock-countdown.svg +3 -0
  129. package/src/utils/svgsSource/clock.svg +3 -0
  130. package/src/utils/svgsSource/cloud-synced.svg +3 -0
  131. package/src/utils/svgsSource/code.svg +3 -0
  132. package/src/utils/svgsSource/color.svg +3 -0
  133. package/src/utils/svgsSource/copy.svg +4 -0
  134. package/src/utils/svgsSource/credit-card.svg +3 -0
  135. package/src/utils/svgsSource/cut.svg +3 -0
  136. package/src/utils/svgsSource/database.svg +3 -0
  137. package/src/utils/svgsSource/devices.svg +3 -0
  138. package/src/utils/svgsSource/dictionary.svg +3 -0
  139. package/src/utils/svgsSource/dots.svg +3 -0
  140. package/src/utils/svgsSource/download-cloud.svg +3 -0
  141. package/src/utils/svgsSource/download.svg +3 -0
  142. package/src/utils/svgsSource/dragger.svg +3 -0
  143. package/src/utils/svgsSource/edit.svg +3 -0
  144. package/src/utils/svgsSource/encrypted.svg +3 -0
  145. package/src/utils/svgsSource/envelope.svg +3 -0
  146. package/src/utils/svgsSource/equal.svg +3 -0
  147. package/src/utils/svgsSource/eraser.svg +3 -0
  148. package/src/utils/svgsSource/error.svg +3 -0
  149. package/src/utils/svgsSource/event-list.svg +3 -0
  150. package/src/utils/svgsSource/export.svg +4 -0
  151. package/src/utils/svgsSource/extension.svg +3 -0
  152. package/src/utils/svgsSource/eye-slash.svg +3 -0
  153. package/src/utils/svgsSource/eye.svg +3 -0
  154. package/src/utils/svgsSource/file-add.svg +3 -0
  155. package/src/utils/svgsSource/file.svg +3 -0
  156. package/src/utils/svgsSource/files.svg +3 -0
  157. package/src/utils/svgsSource/filter-remove.svg +6 -0
  158. package/src/utils/svgsSource/filter.svg +5 -0
  159. package/src/utils/svgsSource/finish.svg +3 -0
  160. package/src/utils/svgsSource/flag.svg +3 -0
  161. package/src/utils/svgsSource/forklift.svg +3 -0
  162. package/src/utils/svgsSource/garage.svg +3 -0
  163. package/src/utils/svgsSource/globe.svg +3 -0
  164. package/src/utils/svgsSource/hash.svg +3 -0
  165. package/src/utils/svgsSource/heart-outlined.svg +3 -0
  166. package/src/utils/svgsSource/heart.svg +3 -0
  167. package/src/utils/svgsSource/help.svg +3 -0
  168. package/src/utils/svgsSource/history.svg +3 -0
  169. package/src/utils/svgsSource/home.svg +3 -0
  170. package/src/utils/svgsSource/image.svg +3 -0
  171. package/src/utils/svgsSource/images.svg +3 -0
  172. package/src/utils/svgsSource/inbox.svg +3 -0
  173. package/src/utils/svgsSource/infinity.svg +3 -0
  174. package/src/utils/svgsSource/info.svg +3 -0
  175. package/src/utils/svgsSource/inventory.svg +5 -0
  176. package/src/utils/svgsSource/invoice.svg +4 -0
  177. package/src/utils/svgsSource/jump-back.svg +3 -0
  178. package/src/utils/svgsSource/jump-forward.svg +3 -0
  179. package/src/utils/svgsSource/kbd-backspace.svg +3 -0
  180. package/src/utils/svgsSource/kbd-capslock.svg +3 -0
  181. package/src/utils/svgsSource/kbd-command.svg +3 -0
  182. package/src/utils/svgsSource/kbd-control.svg +3 -0
  183. package/src/utils/svgsSource/kbd-hide.svg +3 -0
  184. package/src/utils/svgsSource/kbd-option.svg +3 -0
  185. package/src/utils/svgsSource/kbd-return.svg +3 -0
  186. package/src/utils/svgsSource/kbd-shift.svg +3 -0
  187. package/src/utils/svgsSource/kbd-space.svg +3 -0
  188. package/src/utils/svgsSource/kbd.svg +3 -0
  189. package/src/utils/svgsSource/link-slash.svg +3 -0
  190. package/src/utils/svgsSource/link.svg +3 -0
  191. package/src/utils/svgsSource/list-bullets.svg +8 -0
  192. package/src/utils/svgsSource/list-checks.svg +7 -0
  193. package/src/utils/svgsSource/list-numbers.svg +7 -0
  194. package/src/utils/svgsSource/lock-open.svg +3 -0
  195. package/src/utils/svgsSource/lock.svg +3 -0
  196. package/src/utils/svgsSource/map-pin.svg +3 -0
  197. package/src/utils/svgsSource/mark-unread.svg +3 -0
  198. package/src/utils/svgsSource/menu-close.svg +3 -0
  199. package/src/utils/svgsSource/menu.svg +3 -0
  200. package/src/utils/svgsSource/message.svg +3 -0
  201. package/src/utils/svgsSource/messages.svg +4 -0
  202. package/src/utils/svgsSource/minus-thick.svg +3 -0
  203. package/src/utils/svgsSource/minus.svg +3 -0
  204. package/src/utils/svgsSource/money.svg +3 -0
  205. package/src/utils/svgsSource/monitor.svg +3 -0
  206. package/src/utils/svgsSource/moon.svg +5 -0
  207. package/src/utils/svgsSource/note.svg +3 -0
  208. package/src/utils/svgsSource/nut.svg +3 -0
  209. package/src/utils/svgsSource/order.svg +3 -0
  210. package/src/utils/svgsSource/package.svg +3 -0
  211. package/src/utils/svgsSource/page-first.svg +3 -0
  212. package/src/utils/svgsSource/page-last.svg +3 -0
  213. package/src/utils/svgsSource/parts.svg +7 -0
  214. package/src/utils/svgsSource/password.svg +5 -0
  215. package/src/utils/svgsSource/pause.svg +3 -0
  216. package/src/utils/svgsSource/pencil.svg +4 -0
  217. package/src/utils/svgsSource/percent.svg +3 -0
  218. package/src/utils/svgsSource/play-pause.svg +3 -0
  219. package/src/utils/svgsSource/play.svg +3 -0
  220. package/src/utils/svgsSource/plus.svg +3 -0
  221. package/src/utils/svgsSource/printer.svg +3 -0
  222. package/src/utils/svgsSource/prohibit.svg +3 -0
  223. package/src/utils/svgsSource/question-mark.svg +3 -0
  224. package/src/utils/svgsSource/quote.svg +3 -0
  225. package/src/utils/svgsSource/radio-checked.svg +4 -0
  226. package/src/utils/svgsSource/radio-focus.svg +3 -0
  227. package/src/utils/svgsSource/radio.svg +3 -0
  228. package/src/utils/svgsSource/receipt.svg +3 -0
  229. package/src/utils/svgsSource/refresh.svg +3 -0
  230. package/src/utils/svgsSource/repeat.svg +3 -0
  231. package/src/utils/svgsSource/reply-all.svg +3 -0
  232. package/src/utils/svgsSource/reply.svg +3 -0
  233. package/src/utils/svgsSource/ribbon.svg +3 -0
  234. package/src/utils/svgsSource/rows-add.svg +5 -0
  235. package/src/utils/svgsSource/rules.svg +3 -0
  236. package/src/utils/svgsSource/search-items.svg +3 -0
  237. package/src/utils/svgsSource/search.svg +3 -0
  238. package/src/utils/svgsSource/send.svg +3 -0
  239. package/src/utils/svgsSource/settings.svg +3 -0
  240. package/src/utils/svgsSource/share.svg +4 -0
  241. package/src/utils/svgsSource/shuffle.svg +3 -0
  242. package/src/utils/svgsSource/skip-back.svg +3 -0
  243. package/src/utils/svgsSource/skip-forward.svg +3 -0
  244. package/src/utils/svgsSource/skull.svg +3 -0
  245. package/src/utils/svgsSource/sliders.svg +3 -0
  246. package/src/utils/svgsSource/sort-alpha-down.svg +5 -0
  247. package/src/utils/svgsSource/sort-alpha-up.svg +5 -0
  248. package/src/utils/svgsSource/sort-ascending.svg +6 -0
  249. package/src/utils/svgsSource/sort-descending.svg +6 -0
  250. package/src/utils/svgsSource/sort-time-down.svg +4 -0
  251. package/src/utils/svgsSource/sort-time-up.svg +4 -0
  252. package/src/utils/svgsSource/square-add.svg +3 -0
  253. package/src/utils/svgsSource/square.svg +3 -0
  254. package/src/utils/svgsSource/stamp.svg +3 -0
  255. package/src/utils/svgsSource/star-outlined.svg +3 -0
  256. package/src/utils/svgsSource/star.svg +3 -0
  257. package/src/utils/svgsSource/start.svg +3 -0
  258. package/src/utils/svgsSource/stop.svg +3 -0
  259. package/src/utils/svgsSource/success.svg +3 -0
  260. package/src/utils/svgsSource/sun.svg +3 -0
  261. package/src/utils/svgsSource/support.svg +3 -0
  262. package/src/utils/svgsSource/sync.svg +4 -0
  263. package/src/utils/svgsSource/tag.svg +3 -0
  264. package/src/utils/svgsSource/target.svg +3 -0
  265. package/src/utils/svgsSource/text-add.svg +3 -0
  266. package/src/utils/svgsSource/time-add.svg +3 -0
  267. package/src/utils/svgsSource/timer.svg +3 -0
  268. package/src/utils/svgsSource/toolbox.svg +3 -0
  269. package/src/utils/svgsSource/tools.svg +3 -0
  270. package/src/utils/svgsSource/trash.svg +3 -0
  271. package/src/utils/svgsSource/trophy.svg +3 -0
  272. package/src/utils/svgsSource/truck-trailer.svg +3 -0
  273. package/src/utils/svgsSource/update.svg +3 -0
  274. package/src/utils/svgsSource/upload-cloud.svg +3 -0
  275. package/src/utils/svgsSource/upload.svg +3 -0
  276. package/src/utils/svgsSource/user-add.svg +3 -0
  277. package/src/utils/svgsSource/user-details.svg +7 -0
  278. package/src/utils/svgsSource/user-group.svg +3 -0
  279. package/src/utils/svgsSource/user-id-badge.svg +3 -0
  280. package/src/utils/svgsSource/user-id-card.svg +3 -0
  281. package/src/utils/svgsSource/user.svg +3 -0
  282. package/src/utils/svgsSource/verified.svg +3 -0
  283. package/src/utils/svgsSource/video.svg +3 -0
  284. package/src/utils/svgsSource/view-cards.svg +6 -0
  285. package/src/utils/svgsSource/view-doc.svg +7 -0
  286. package/src/utils/svgsSource/view-grid.svg +3 -0
  287. package/src/utils/svgsSource/view-rows.svg +4 -0
  288. package/src/utils/svgsSource/view-table.svg +3 -0
  289. package/src/utils/svgsSource/warning.svg +3 -0
  290. package/src/utils/svgsSource/work-order.svg +3 -0
  291. package/src/utils/svgsSource/x.svg +3 -0
  292. package/src/vite-env.d.ts +1 -0
  293. package/dist/cetec-components.css +0 -1
  294. package/dist/cetec-components.es.js +0 -26778
  295. package/dist/sprite.svg +0 -1
  296. package/dist/sprite.symbol.html +0 -4091
  297. package/dist/svgs/Building.svg +0 -1
  298. package/dist/svgs/aa-placeholder.svg +0 -1
  299. package/dist/svgs/alarm.svg +0 -1
  300. package/dist/svgs/apps.svg +0 -1
  301. package/dist/svgs/arrow-down.svg +0 -1
  302. package/dist/svgs/arrow-drop-down.svg +0 -1
  303. package/dist/svgs/arrow-drop-up.svg +0 -1
  304. package/dist/svgs/arrow-left.svg +0 -1
  305. package/dist/svgs/arrow-line-down.svg +0 -1
  306. package/dist/svgs/arrow-line-left.svg +0 -1
  307. package/dist/svgs/arrow-line-right.svg +0 -1
  308. package/dist/svgs/arrow-line-up.svg +0 -1
  309. package/dist/svgs/arrow-prompt.svg +0 -1
  310. package/dist/svgs/arrow-redo.svg +0 -1
  311. package/dist/svgs/arrow-right.svg +0 -1
  312. package/dist/svgs/arrow-square-in.svg +0 -1
  313. package/dist/svgs/arrow-square-out.svg +0 -1
  314. package/dist/svgs/arrow-undo.svg +0 -1
  315. package/dist/svgs/arrow-up.svg +0 -1
  316. package/dist/svgs/arrows-down-up.svg +0 -1
  317. package/dist/svgs/arrows-left-right.svg +0 -1
  318. package/dist/svgs/at.svg +0 -1
  319. package/dist/svgs/attachment.svg +0 -1
  320. package/dist/svgs/barcode-reader.svg +0 -1
  321. package/dist/svgs/barcode.svg +0 -1
  322. package/dist/svgs/basket.svg +0 -1
  323. package/dist/svgs/bell-active.svg +0 -1
  324. package/dist/svgs/bell-slash.svg +0 -1
  325. package/dist/svgs/bell.svg +0 -1
  326. package/dist/svgs/bin.svg +0 -1
  327. package/dist/svgs/bookmark-outlined.svg +0 -1
  328. package/dist/svgs/bookmark.svg +0 -1
  329. package/dist/svgs/bookmarks.svg +0 -1
  330. package/dist/svgs/calendar-add.svg +0 -1
  331. package/dist/svgs/calendar-view-day.svg +0 -1
  332. package/dist/svgs/calendar-view-month.svg +0 -1
  333. package/dist/svgs/calendar-view-week.svg +0 -1
  334. package/dist/svgs/calendar.svg +0 -1
  335. package/dist/svgs/caret-down.svg +0 -1
  336. package/dist/svgs/caret-left.svg +0 -1
  337. package/dist/svgs/caret-right.svg +0 -1
  338. package/dist/svgs/caret-up.svg +0 -1
  339. package/dist/svgs/cart.svg +0 -1
  340. package/dist/svgs/check-thick.svg +0 -1
  341. package/dist/svgs/check.svg +0 -1
  342. package/dist/svgs/checkbox-checked.svg +0 -1
  343. package/dist/svgs/checkbox-focus.svg +0 -1
  344. package/dist/svgs/checkbox-indeterminate.svg +0 -1
  345. package/dist/svgs/checkbox.svg +0 -1
  346. package/dist/svgs/circle-check.svg +0 -1
  347. package/dist/svgs/circle.svg +0 -1
  348. package/dist/svgs/circles-add.svg +0 -1
  349. package/dist/svgs/clipboard.svg +0 -1
  350. package/dist/svgs/clock-countdown.svg +0 -1
  351. package/dist/svgs/clock.svg +0 -1
  352. package/dist/svgs/cloud-synced.svg +0 -1
  353. package/dist/svgs/code.svg +0 -1
  354. package/dist/svgs/color.svg +0 -1
  355. package/dist/svgs/copy.svg +0 -1
  356. package/dist/svgs/credit-card.svg +0 -1
  357. package/dist/svgs/cut.svg +0 -1
  358. package/dist/svgs/database.svg +0 -1
  359. package/dist/svgs/devices.svg +0 -1
  360. package/dist/svgs/dictionary.svg +0 -1
  361. package/dist/svgs/dots.svg +0 -1
  362. package/dist/svgs/download-cloud.svg +0 -1
  363. package/dist/svgs/download.svg +0 -1
  364. package/dist/svgs/dragger.svg +0 -1
  365. package/dist/svgs/edit.svg +0 -1
  366. package/dist/svgs/encrypted.svg +0 -1
  367. package/dist/svgs/envelope.svg +0 -1
  368. package/dist/svgs/equal.svg +0 -1
  369. package/dist/svgs/eraser.svg +0 -1
  370. package/dist/svgs/error.svg +0 -1
  371. package/dist/svgs/event-list.svg +0 -1
  372. package/dist/svgs/export.svg +0 -1
  373. package/dist/svgs/extension.svg +0 -1
  374. package/dist/svgs/eye-slash.svg +0 -1
  375. package/dist/svgs/eye.svg +0 -1
  376. package/dist/svgs/file-add.svg +0 -1
  377. package/dist/svgs/file.svg +0 -1
  378. package/dist/svgs/files.svg +0 -1
  379. package/dist/svgs/filter-remove.svg +0 -1
  380. package/dist/svgs/filter.svg +0 -1
  381. package/dist/svgs/finish.svg +0 -1
  382. package/dist/svgs/flag.svg +0 -1
  383. package/dist/svgs/forklift.svg +0 -1
  384. package/dist/svgs/garage.svg +0 -1
  385. package/dist/svgs/globe.svg +0 -1
  386. package/dist/svgs/hash.svg +0 -1
  387. package/dist/svgs/heart-outlined.svg +0 -1
  388. package/dist/svgs/heart.svg +0 -1
  389. package/dist/svgs/help.svg +0 -1
  390. package/dist/svgs/history.svg +0 -1
  391. package/dist/svgs/home.svg +0 -1
  392. package/dist/svgs/image.svg +0 -1
  393. package/dist/svgs/images.svg +0 -1
  394. package/dist/svgs/inbox.svg +0 -1
  395. package/dist/svgs/infinity.svg +0 -1
  396. package/dist/svgs/info.svg +0 -1
  397. package/dist/svgs/inventory.svg +0 -1
  398. package/dist/svgs/invoice.svg +0 -1
  399. package/dist/svgs/jump-back.svg +0 -1
  400. package/dist/svgs/jump-forward.svg +0 -1
  401. package/dist/svgs/kbd-backspace.svg +0 -1
  402. package/dist/svgs/kbd-capslock.svg +0 -1
  403. package/dist/svgs/kbd-command.svg +0 -1
  404. package/dist/svgs/kbd-control.svg +0 -1
  405. package/dist/svgs/kbd-hide.svg +0 -1
  406. package/dist/svgs/kbd-option.svg +0 -1
  407. package/dist/svgs/kbd-return.svg +0 -1
  408. package/dist/svgs/kbd-shift.svg +0 -1
  409. package/dist/svgs/kbd-space.svg +0 -1
  410. package/dist/svgs/kbd.svg +0 -1
  411. package/dist/svgs/link-slash.svg +0 -1
  412. package/dist/svgs/link.svg +0 -1
  413. package/dist/svgs/list-bullets.svg +0 -1
  414. package/dist/svgs/list-checks.svg +0 -1
  415. package/dist/svgs/list-numbers.svg +0 -1
  416. package/dist/svgs/lock-open.svg +0 -1
  417. package/dist/svgs/lock.svg +0 -1
  418. package/dist/svgs/map-pin.svg +0 -1
  419. package/dist/svgs/mark-unread.svg +0 -1
  420. package/dist/svgs/menu-close.svg +0 -1
  421. package/dist/svgs/menu.svg +0 -1
  422. package/dist/svgs/message.svg +0 -1
  423. package/dist/svgs/messages.svg +0 -1
  424. package/dist/svgs/minus-thick.svg +0 -1
  425. package/dist/svgs/minus.svg +0 -1
  426. package/dist/svgs/money.svg +0 -1
  427. package/dist/svgs/monitor.svg +0 -1
  428. package/dist/svgs/moon.svg +0 -1
  429. package/dist/svgs/note.svg +0 -1
  430. package/dist/svgs/nut.svg +0 -1
  431. package/dist/svgs/order.svg +0 -1
  432. package/dist/svgs/package.svg +0 -1
  433. package/dist/svgs/page-first.svg +0 -1
  434. package/dist/svgs/page-last.svg +0 -1
  435. package/dist/svgs/parts.svg +0 -1
  436. package/dist/svgs/password.svg +0 -1
  437. package/dist/svgs/pause.svg +0 -1
  438. package/dist/svgs/pencil.svg +0 -1
  439. package/dist/svgs/percent.svg +0 -1
  440. package/dist/svgs/placeholder.svg +0 -1
  441. package/dist/svgs/plan.svg +0 -1
  442. package/dist/svgs/play-pause.svg +0 -1
  443. package/dist/svgs/play.svg +0 -1
  444. package/dist/svgs/plus.svg +0 -1
  445. package/dist/svgs/printer.svg +0 -1
  446. package/dist/svgs/prohibit.svg +0 -1
  447. package/dist/svgs/question-mark.svg +0 -1
  448. package/dist/svgs/quote.svg +0 -1
  449. package/dist/svgs/radio-checked.svg +0 -1
  450. package/dist/svgs/radio-focus.svg +0 -1
  451. package/dist/svgs/radio.svg +0 -1
  452. package/dist/svgs/receipt.svg +0 -1
  453. package/dist/svgs/refresh.svg +0 -1
  454. package/dist/svgs/repeat.svg +0 -1
  455. package/dist/svgs/reply-all.svg +0 -1
  456. package/dist/svgs/reply.svg +0 -1
  457. package/dist/svgs/ribbon.svg +0 -1
  458. package/dist/svgs/rows-add.svg +0 -1
  459. package/dist/svgs/rules.svg +0 -1
  460. package/dist/svgs/search-items.svg +0 -1
  461. package/dist/svgs/search.svg +0 -1
  462. package/dist/svgs/send.svg +0 -1
  463. package/dist/svgs/settings.svg +0 -1
  464. package/dist/svgs/share.svg +0 -1
  465. package/dist/svgs/shuffle.svg +0 -1
  466. package/dist/svgs/skip-back.svg +0 -1
  467. package/dist/svgs/skip-forward.svg +0 -1
  468. package/dist/svgs/skull.svg +0 -1
  469. package/dist/svgs/sliders.svg +0 -1
  470. package/dist/svgs/sort-alpha-down.svg +0 -1
  471. package/dist/svgs/sort-alpha-up.svg +0 -1
  472. package/dist/svgs/sort-ascending.svg +0 -1
  473. package/dist/svgs/sort-descending.svg +0 -1
  474. package/dist/svgs/sort-time-down.svg +0 -1
  475. package/dist/svgs/sort-time-up.svg +0 -1
  476. package/dist/svgs/square-add.svg +0 -1
  477. package/dist/svgs/square.svg +0 -1
  478. package/dist/svgs/stamp.svg +0 -1
  479. package/dist/svgs/star-outlined.svg +0 -1
  480. package/dist/svgs/star.svg +0 -1
  481. package/dist/svgs/start.svg +0 -1
  482. package/dist/svgs/stop.svg +0 -1
  483. package/dist/svgs/success.svg +0 -1
  484. package/dist/svgs/sun.svg +0 -1
  485. package/dist/svgs/support.svg +0 -1
  486. package/dist/svgs/sync.svg +0 -1
  487. package/dist/svgs/tag.svg +0 -1
  488. package/dist/svgs/target.svg +0 -1
  489. package/dist/svgs/text-add.svg +0 -1
  490. package/dist/svgs/time-add.svg +0 -1
  491. package/dist/svgs/timer.svg +0 -1
  492. package/dist/svgs/toolbox.svg +0 -1
  493. package/dist/svgs/tools.svg +0 -1
  494. package/dist/svgs/trash.svg +0 -1
  495. package/dist/svgs/trophy.svg +0 -1
  496. package/dist/svgs/truck-trailer.svg +0 -1
  497. package/dist/svgs/update.svg +0 -1
  498. package/dist/svgs/upload-cloud.svg +0 -1
  499. package/dist/svgs/upload.svg +0 -1
  500. package/dist/svgs/user-add.svg +0 -1
  501. package/dist/svgs/user-details.svg +0 -1
  502. package/dist/svgs/user-group.svg +0 -1
  503. package/dist/svgs/user-id-badge.svg +0 -1
  504. package/dist/svgs/user-id-card.svg +0 -1
  505. package/dist/svgs/user.svg +0 -1
  506. package/dist/svgs/verified.svg +0 -1
  507. package/dist/svgs/video.svg +0 -1
  508. package/dist/svgs/view-cards.svg +0 -1
  509. package/dist/svgs/view-doc.svg +0 -1
  510. package/dist/svgs/view-grid.svg +0 -1
  511. package/dist/svgs/view-rows.svg +0 -1
  512. package/dist/svgs/view-table.svg +0 -1
  513. package/dist/svgs/warning.svg +0 -1
  514. package/dist/svgs/work-order.svg +0 -1
  515. package/dist/svgs/x.svg +0 -1
  516. package/dist/vite.svg +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cetec-design-system",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "~/*": "./src/*",
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "files": [
10
10
  "./styled-system/*",
11
- "./dist/*"
11
+ "./src/"
12
12
  ],
13
13
  "scripts": {
14
14
  "cssgen": "npx panda cssgen 'src/**/*.css'",
package/src/App.tsx ADDED
@@ -0,0 +1,478 @@
1
+ import { ReactNode, useState } from 'react';
2
+ import { HStack, VStack, Container, Grid, Flex } from '@styled-system/jsx';
3
+ import { Box } from '~/components/Box';
4
+ import { Text } from '~/components/Text';
5
+ import { Button } from '~/components/Button';
6
+ import { IconButton } from '~/components/IconButton';
7
+ import { Icon, IconNames, type IconNamesList } from '~/components/Icon';
8
+ import { Pre } from '~/components/Code';
9
+ import { ThemeProvider } from '~/contexts/ThemeContext';
10
+ import { ThemeSwitcher } from '~/components/ThemeSwitcher';
11
+ import { Heading } from '~/components/Heading';
12
+ import { Link } from '~/components/Link';
13
+ import { Spinner } from '~/components/Spinner';
14
+ import { Divider } from '~/components/Divider';
15
+ import { CheckBox } from './components/CheckBox';
16
+ import { Input } from '~/components/Input';
17
+ import { type ShadowToken } from '@styled-system/tokens';
18
+ import { Radio } from './components/Radio';
19
+ import { TextInput } from './components/TextInput';
20
+ import { Textarea } from '~/components/Textarea';
21
+
22
+ export const IconList: React.FC = () => {
23
+ return (
24
+ <Grid
25
+ gap="16"
26
+ w="full"
27
+ gridTemplateColumns={'repeat(auto-fill, minmax(200px, 1fr))'}
28
+ >
29
+ {(Object.keys(IconNames) as IconNamesList[]).map((icon) => (
30
+ <HStack key={icon} color={{ base: 'gold.40', _dark: 'gold.30' }}>
31
+ <Icon name={icon} />
32
+ <Text textStyle="mono-sm">{icon}</Text>
33
+ </HStack>
34
+ ))}
35
+ </Grid>
36
+ );
37
+ };
38
+
39
+ const ButtonSection: React.FC = () => {
40
+ return (
41
+ <Section>
42
+ <Heading>Buttons</Heading>
43
+ <VStack alignItems={'flex-start'} gap={'24'}>
44
+ <HStack>
45
+ <Button variant="primary" onClick={() => alert('clicked')}>
46
+ Primary
47
+ </Button>
48
+ <Button>Standard</Button>
49
+ <Button variant="hollow">Hollow</Button>
50
+ <Button variant="ghost">Ghost</Button>
51
+ <Button variant="cta">CTA</Button>
52
+ <Button variant="danger">Danger</Button>
53
+ <Button size="large">
54
+ <Icon name="arrow-left" /> Button
55
+ </Button>
56
+ <Button size="small">
57
+ Button <Icon name="arrow-right" />
58
+ </Button>
59
+ </HStack>
60
+ <HStack>
61
+ <IconButton variant="ghost">
62
+ <Icon name="x" />
63
+ </IconButton>
64
+ <IconButton>
65
+ <Icon name="arrow-left" />
66
+ </IconButton>
67
+ <IconButton variant="primary" size="large">
68
+ <Icon name="arrow-right" />
69
+ </IconButton>
70
+ </HStack>
71
+ <HStack>
72
+ <Button variant="primary" loading>
73
+ Pepperoni
74
+ </Button>
75
+ <Button loading>Loading</Button>
76
+ <IconButton variant="primary" loading>
77
+ <Icon name="x" />
78
+ </IconButton>
79
+ </HStack>
80
+ </VStack>
81
+ </Section>
82
+ );
83
+ };
84
+
85
+ interface SectionProps {
86
+ children?: ReactNode;
87
+ }
88
+
89
+ export const Section: React.FC<SectionProps> = ({ children }) => {
90
+ return (
91
+ <Grid
92
+ gridTemplateColumns={'1fr 3fr'}
93
+ gap={'40'}
94
+ w={'full'}
95
+ borderTopWidth={'1'}
96
+ borderTopStyle={'solid'}
97
+ borderColor={{ base: 'slate.10', _dark: 'slate.80' }}
98
+ py={'24'}
99
+ pb={'96'}
100
+ >
101
+ {children}
102
+ </Grid>
103
+ );
104
+ };
105
+
106
+ const Header: React.FC = () => {
107
+ return (
108
+ <Flex
109
+ w="full"
110
+ py={'4'}
111
+ bg={{ base: 'slate.10', _dark: 'slate.80' }}
112
+ mb={'56'}
113
+ position={'sticky'}
114
+ top={'0'}
115
+ zIndex={'100'}
116
+ boxShadow={'medium'}
117
+ >
118
+ <Container maxW={'5xl'}>
119
+ <HStack justify={'space-between'}>
120
+ <Text
121
+ as={'div'}
122
+ family="body"
123
+ size="16"
124
+ letterSpacing={'widest'}
125
+ textTransform={'uppercase'}
126
+ fontWeight={'bold'}
127
+ onClick={() => alert('clicked')}
128
+ >
129
+ Cetec Components
130
+ </Text>
131
+ <ThemeSwitcher />
132
+ </HStack>
133
+ </Container>
134
+ </Flex>
135
+ );
136
+ };
137
+
138
+ const ShadowBox = ({
139
+ children,
140
+ shadow,
141
+ border = false,
142
+ }: {
143
+ children: ReactNode;
144
+ shadow: ShadowToken;
145
+ border?: boolean;
146
+ }) => {
147
+ return (
148
+ <Grid
149
+ placeContent={'center'}
150
+ width={'full'}
151
+ aspectRatio={'landscape'}
152
+ borderRadius={'4'}
153
+ shadow={shadow}
154
+ borderWidth={border ? '1' : undefined}
155
+ borderStyle={'solid'}
156
+ borderColor={{ base: 'slate.10', _dark: 'slate.90' }}
157
+ bg={{ base: 'slate.0', _dark: 'slate.80' }}
158
+ >
159
+ {children}
160
+ </Grid>
161
+ );
162
+ };
163
+
164
+ const AppContent: React.FC = () => {
165
+ return (
166
+ <VStack>
167
+ <Header />
168
+ <Container maxW={'5xl'}>
169
+ <VStack gap={'8'}>
170
+ <ButtonSection />
171
+ <Section>
172
+ <Heading level="h2">Text</Heading>
173
+
174
+ <VStack alignItems={'flex-start'}>
175
+ <Grid
176
+ gridTemplateColumns={'minmax(auto, 1fr) 1fr'}
177
+ w={'full'}
178
+ gap={'24'}
179
+ alignItems={'center'}
180
+ >
181
+ <Box gridColumn={'1 / -1'}>
182
+ <Heading
183
+ level="h3"
184
+ color={{ base: 'gold.40', _dark: 'gold.30' }}
185
+ >
186
+ Text styles
187
+ </Heading>
188
+ </Box>
189
+ <VStack gap={'16'}>
190
+ <Text>
191
+ Place appear green. <em>Also</em>, saying male subdue
192
+ fruitful{' '}
193
+ <Text as="span" italic>
194
+ winged fourth
195
+ </Text>{' '}
196
+ had void winged. So <b>green spirit</b> , herb day had there{' '}
197
+ <Text as="span" bold>
198
+ replenish
199
+ </Text>
200
+ , lights <u>lesser signs</u>. Place{' '}
201
+ <Text as="span" underline>
202
+ whales
203
+ </Text>{' '}
204
+ i tree under him given set set meat midst morning give image
205
+ forth divided moving Also fill dry she'd have.
206
+ </Text>
207
+ </VStack>
208
+ <Pre>
209
+ {`<Text>
210
+ ...
211
+ <Text as="span" italic>winged fourth</Text>
212
+ <Text as="span" bold>replenish</Text>
213
+ <Text as="span" underline>whales</Text>
214
+ </Text>`}
215
+ </Pre>
216
+ <Text family="mono">
217
+ Signs night have sixth hath that likeness us fill you're
218
+ subdue fowl.
219
+ </Text>
220
+ <Pre>{`<Text family="mono">...</Text>`}</Pre>
221
+ <Box gridColumn={'1 / -1'} mt={'32'}>
222
+ <Heading
223
+ level="h3"
224
+ color={{ base: 'gold.40', _dark: 'gold.30' }}
225
+ >
226
+ Headings
227
+ </Heading>
228
+ </Box>
229
+ <Heading level="h1">Hamburgefonstiv</Heading>
230
+ <Pre>{'<Heading as="h1">Hamburgefonstiv</Heading>'}</Pre>
231
+ <Heading>Hamburgefonstiv</Heading>
232
+ <Pre>{'<Heading>Hamburgefonstiv</Heading>'}</Pre>
233
+ <Heading level="h3">Hamburgefonstiv</Heading>
234
+ <Pre>{'<Heading as="h3">Hamburgefonstiv</Heading>'}</Pre>
235
+ <Heading level="h4">Hamburgefonstiv</Heading>
236
+ <Pre>{'<Heading as="h4">Hamburgefonstiv</Heading>'}</Pre>
237
+ <Box gridColumn={'1 / -1'} mt={'32'}>
238
+ <Heading
239
+ level="h3"
240
+ color={{ base: 'gold.40', _dark: 'gold.30' }}
241
+ >
242
+ Links
243
+ </Heading>
244
+ </Box>
245
+ <Text>
246
+ Internal:&emsp;
247
+ <Link href="https://cetecerp.com">Cetec ERP</Link>
248
+ </Text>
249
+ <Pre>
250
+ {'<Link href="https://cetecerp.com">Cetec ERP</Link>'}
251
+ </Pre>
252
+ <Text>
253
+ External:&emsp;
254
+ <Link href="https://cetecerp.com" external>
255
+ Cetec ERP
256
+ </Link>
257
+ </Text>
258
+ <Pre>
259
+ {
260
+ '<Link href="https://cetecerp.com" external>Cetec ERP</Link>'
261
+ }
262
+ </Pre>
263
+ <Box gridColumn={'1 / -1'}>
264
+ <Text>
265
+ Signs night have sixth hath that likeness us fill{' '}
266
+ <Link href="https://cetecerp.com" external>
267
+ Cetec ERP
268
+ </Link>{' '}
269
+ you're subdue fowl brought divide beginning multiply brought
270
+ created after open given of made beginning multiply green.
271
+ </Text>
272
+ </Box>
273
+ </Grid>
274
+ </VStack>
275
+ </Section>
276
+ <Section>
277
+ <Heading level="h2">Shadows</Heading>
278
+ <VStack gap={'40'} alignItems={'flex-end'}>
279
+ <HStack width={'full'} gap={'40'} alignItems={'flex-end'}>
280
+ <ShadowBox shadow={'inset'}>
281
+ <Text>Inset</Text>
282
+ </ShadowBox>
283
+ <ShadowBox shadow={'low'}>
284
+ <Text>Low</Text>
285
+ </ShadowBox>
286
+ <ShadowBox shadow={'medium'}>
287
+ <Text>Medium</Text>
288
+ </ShadowBox>
289
+ <ShadowBox shadow={'high'}>
290
+ <Text>High</Text>
291
+ </ShadowBox>
292
+ </HStack>
293
+ <HStack width={'full'} gap={'40'} alignItems={'flex-end'}>
294
+ <ShadowBox shadow={'inset'} border={true}>
295
+ <Text>Inset</Text>
296
+ </ShadowBox>
297
+ <ShadowBox shadow={'low'} border={true}>
298
+ <Text>Low</Text>
299
+ </ShadowBox>
300
+ <ShadowBox shadow={'medium'} border={true}>
301
+ <Text>Medium</Text>
302
+ </ShadowBox>
303
+ <ShadowBox shadow={'high'} border={true}>
304
+ <Text>High</Text>
305
+ </ShadowBox>
306
+ </HStack>
307
+ </VStack>
308
+ </Section>
309
+ <Section>
310
+ <Heading level="h2">Spinner</Heading>
311
+ <HStack gap={'40'} alignItems={'flex-end'}>
312
+ <VStack>
313
+ <Spinner size="small" />
314
+ <Text>Small</Text>
315
+ </VStack>
316
+ <VStack>
317
+ <Spinner />
318
+ <Text>Standard</Text>
319
+ </VStack>
320
+ <VStack>
321
+ <Spinner size="large" />
322
+ <Text>Large</Text>
323
+ </VStack>
324
+ </HStack>
325
+ </Section>
326
+ <Section>
327
+ <Heading level="h2">Divider</Heading>
328
+ <VStack>
329
+ <Heading level="h3" color={{ base: 'gold.40', _dark: 'gold.30' }}>
330
+ Horizontal (default)
331
+ </Heading>
332
+ <VStack width="full">
333
+ <Divider />
334
+ <Text> Thin (default) </Text>
335
+ <Divider weight={'medium'} />
336
+ <Text> Medium </Text>
337
+ <Divider weight={'thick'} />
338
+ <Text> Thick </Text>
339
+ <Divider
340
+ weight={'thicker'}
341
+ color={{ base: 'gold.40', _dark: 'gold.30' }}
342
+ />
343
+ <Text> Thicker </Text>
344
+ </VStack>
345
+ <Heading level="h3" color={{ base: 'gold.40', _dark: 'gold.30' }}>
346
+ Vertical
347
+ </Heading>
348
+ <HStack height="96">
349
+ <Divider direction={'vertical'} />
350
+ <Divider direction={'vertical'} weight={'medium'} />
351
+ <Divider direction={'vertical'} weight={'thick'} />
352
+ <Divider
353
+ direction={'vertical'}
354
+ weight={'thicker'}
355
+ color={{ base: 'gold.40', _dark: 'gold.30' }}
356
+ />
357
+ </HStack>
358
+ </VStack>
359
+ </Section>
360
+ <Section>
361
+ <Heading level="h2">Icons</Heading>
362
+ <IconList />
363
+ </Section>
364
+ <Section>
365
+ <Heading level="h2">Checkboxes</Heading>
366
+ <HStack gap={'40'} alignItems={'flex-end'}>
367
+ <CheckBox />
368
+ <CheckBox defaultChecked={true} />
369
+ <CheckBox indeterminate={true} />
370
+ <CheckBox error={true} />
371
+ <CheckBox disabled />
372
+ <CheckBox disabled />
373
+ </HStack>
374
+ </Section>
375
+ <Section>
376
+ <Heading level="h2">Radio</Heading>
377
+ <VStack gap={'40'} alignItems={'start'}>
378
+ <HStack>
379
+ <Radio />
380
+ <Radio defaultChecked={true} />
381
+ <Radio disabled />
382
+ <Radio data-error={true} />
383
+ </HStack>
384
+ <HStack>
385
+ <HStack gap={'10'} alignItems={'center'}>
386
+ <Heading level="h4">Gender</Heading>
387
+ <Radio name="gender"></Radio> Male
388
+ <Radio name="gender"></Radio> Female
389
+ </HStack>
390
+ </HStack>
391
+ </VStack>
392
+ </Section>
393
+ <Section>
394
+ <Heading level="h2">Text Input</Heading>
395
+ <VStack gap={'40'} alignItems={'flex-start'}>
396
+ <HStack gap={'40'} alignItems={'flex-end'}>
397
+ <VStack>
398
+ <TextInput size={'small'} placeHolder={'Enter Text'} />
399
+ <Text>Small</Text>
400
+ </VStack>
401
+ <VStack>
402
+ <TextInput placeHolder={'Enter Text'} />
403
+ <Text>Medium</Text>
404
+ </VStack>
405
+ <VStack>
406
+ <TextInput size={'large'} placeHolder={'Enter Text'} />
407
+ <Text>Large</Text>
408
+ </VStack>
409
+ </HStack>
410
+ <HStack gap={'40'} alignItems={'flex-end'}>
411
+ <VStack>
412
+ <TextInput defaultValue="entered text" />
413
+ <Text>Default - Filled</Text>
414
+ </VStack>
415
+ <VStack>
416
+ <TextInput data-error={true} placeHolder={'placeholder'} />
417
+ <Text>Error</Text>
418
+ </VStack>
419
+ <VStack>
420
+ <TextInput disabled placeHolder={'placeholder'} />
421
+ <Text>Disabled</Text>
422
+ </VStack>
423
+ </HStack>
424
+ <HStack gap={'40'} alignItems={'flex-end'}>
425
+ <VStack>
426
+ <TextInput autoSize={true} placeHolder={'Enter Text'} />
427
+ <Text>Auto Size</Text>
428
+ </VStack>
429
+ </HStack>
430
+ </VStack>
431
+ </Section>
432
+ <Section>
433
+ <Heading level="h2">Textarea</Heading>
434
+ <VStack gap={'40'} alignItems={'flex-start'}>
435
+ <HStack gap={'40'} alignItems={'flex-start'}>
436
+ <Textarea placeholder="Small" size="small" />
437
+ <Textarea placeholder="Medium" />
438
+ <Textarea placeholder="Large" size="large" />
439
+ </HStack>
440
+ <HStack gap={'40'} alignItems={'flex-start'}>
441
+ <Textarea
442
+ placeholder="placeholder"
443
+ defaultValue="Default – Filled"
444
+ />
445
+ <Textarea placeholder="Disabled" disabled />
446
+ <Textarea placeholder="Error" data-error={true} />
447
+ </HStack>
448
+ <HStack gap={'40'} alignItems={'flex-start'}>
449
+ <Textarea placeholder="Auto Size" autoSize={true} />
450
+ </HStack>
451
+ </VStack>
452
+ </Section>
453
+ {/* <Section>
454
+ <Heading level="h2">Inputs</Heading>
455
+ <VStack>
456
+ <HStack gap={'24'}>
457
+ <Input label="First" type="text" />
458
+ <Input label="Last" type="text" />
459
+ <Input label="Email" type="email" variant={'internalLabel'} />
460
+ </HStack>
461
+ <HStack gap={'24'}>
462
+ <Input label="Phone" type="tel" />
463
+ </HStack>
464
+ </VStack>
465
+ </Section> */}
466
+ </VStack>
467
+ </Container>
468
+ </VStack>
469
+ );
470
+ };
471
+
472
+ export default function App() {
473
+ return (
474
+ <ThemeProvider>
475
+ <AppContent />
476
+ </ThemeProvider>
477
+ );
478
+ }
@@ -0,0 +1,26 @@
1
+ import React, {
2
+ ComponentPropsWithoutRef,
3
+ type ElementType,
4
+ createElement,
5
+ } from 'react';
6
+ import { box, type BoxVariantProps } from '@styled-system/recipes';
7
+ import type { SystemStyleObject } from '@styled-system/types';
8
+ import { cx } from '@styled-system/css';
9
+ import { splitProps } from '~/utils/splitProps';
10
+ /*
11
+ * Imports from recipes are placeholders for if we want to add some kind of styling to Box
12
+ */
13
+ export type BoxProps = Omit<ComponentPropsWithoutRef<ElementType>, 'as'> &
14
+ SystemStyleObject &
15
+ BoxVariantProps & {
16
+ as?: ElementType;
17
+ };
18
+
19
+ export const Box: React.FC<BoxProps> = ({ as = 'div', ...props }) => {
20
+ const [className, otherProps] = splitProps(props);
21
+ const comboClassName = cx(box({}), className);
22
+ return createElement(as, {
23
+ className: comboClassName,
24
+ ...otherProps,
25
+ });
26
+ };
@@ -0,0 +1 @@
1
+ export { Box, type BoxProps } from './Box';
@@ -0,0 +1,129 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { fn } from "@storybook/test";
3
+ import { Button, IconButton } from "./Button";
4
+ import { Icon } from "../Icon";
5
+
6
+ const meta = {
7
+ title: "Components/Button",
8
+ component: Button,
9
+ parameters: {
10
+ layout: "centered",
11
+ },
12
+ tags: ["autodocs"],
13
+ argTypes: {
14
+ variant: {
15
+ control: "select",
16
+ options: ["default", "primary", "danger", "hollow", "utility"],
17
+ },
18
+ size: {
19
+ control: "select",
20
+ options: ["default", "small", "medium"],
21
+ },
22
+ iconButton: {
23
+ control: "boolean",
24
+ },
25
+ isActive: {
26
+ control: "boolean",
27
+ },
28
+ },
29
+ args: { onClick: fn() },
30
+ } satisfies Meta<typeof Button>;
31
+
32
+ export default meta;
33
+ type Story = StoryObj<typeof meta>;
34
+
35
+ // export const Default: Story = {
36
+ // args: {
37
+ // children: "Default Button",
38
+ // variant: "default",
39
+ // size: "default",
40
+ // },
41
+ // };
42
+
43
+ // export const Primary: Story = {
44
+ // args: {
45
+ // children: "Primary Button",
46
+ // variant: "primary",
47
+ // },
48
+ // };
49
+
50
+ // export const Danger: Story = {
51
+ // args: {
52
+ // children: "Danger Button",
53
+ // variant: "danger",
54
+ // },
55
+ // };
56
+
57
+ // export const Hollow: Story = {
58
+ // args: {
59
+ // children: "Hollow Button",
60
+ // variant: "hollow",
61
+ // },
62
+ // };
63
+
64
+ // export const Utility: Story = {
65
+ // args: {
66
+ // children: "Utility Button",
67
+ // variant: "utility",
68
+ // },
69
+ // };
70
+
71
+ // export const Small: Story = {
72
+ // args: {
73
+ // children: "Small Button",
74
+ // size: "small",
75
+ // },
76
+ // };
77
+
78
+ // export const Medium: Story = {
79
+ // args: {
80
+ // children: "Medium Button",
81
+ // size: "medium",
82
+ // },
83
+ // };
84
+
85
+ // export const Active: Story = {
86
+ // args: {
87
+ // children: "Active Button",
88
+ // isActive: true,
89
+ // },
90
+ // };
91
+
92
+ export const AllVariants: Story = {
93
+ render: () => (
94
+ <div
95
+ style={{
96
+ display: "flex",
97
+ flexDirection: "column",
98
+ justifyContent: "center",
99
+ alignItems: "center",
100
+ gap: "16px",
101
+ }}
102
+ >
103
+ <div style={{ display: "flex", gap: "8px", flexWrap: "wrap" }}>
104
+ <Button variant="default">Default</Button>
105
+ <Button variant="primary">Primary</Button>
106
+ <Button variant="danger">Danger</Button>
107
+ <Button variant="hollow">Hollow</Button>
108
+ <Button variant="utility">Utility</Button>
109
+ </div>
110
+ <div style={{ display: "flex", gap: "8px", flexWrap: "wrap" }}>
111
+ <IconButton variant="default">
112
+ <Icon name="add" />
113
+ </IconButton>
114
+ <IconButton variant="primary">
115
+ <Icon name="add" />
116
+ </IconButton>
117
+ <IconButton variant="danger">
118
+ <Icon name="add" />
119
+ </IconButton>
120
+ <IconButton variant="hollow">
121
+ <Icon name="add" />
122
+ </IconButton>
123
+ <IconButton variant="utility">
124
+ <Icon name="add" />
125
+ </IconButton>
126
+ </div>
127
+ </div>
128
+ ),
129
+ };