@techsio/ui-kit 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/README.md +59 -6
  2. package/dist/.storybook/decorator.d.ts +12 -0
  3. package/dist/.storybook/decorator.d.ts.map +1 -0
  4. package/dist/.storybook/main.d.ts +4 -0
  5. package/dist/.storybook/main.d.ts.map +1 -0
  6. package/dist/.storybook/preview.d.ts +5 -0
  7. package/dist/.storybook/preview.d.ts.map +1 -0
  8. package/dist/.storybook/test-runner.d.ts +12 -0
  9. package/dist/.storybook/test-runner.d.ts.map +1 -0
  10. package/dist/atoms/badge.js +37 -19
  11. package/dist/atoms/button.js +167 -154
  12. package/dist/atoms/checkbox.js +52 -0
  13. package/dist/atoms/figma/badge.figma.js +33 -0
  14. package/dist/atoms/figma/button.figma.js +76 -0
  15. package/dist/atoms/figma/checkbox.figma.js +35 -0
  16. package/dist/atoms/figma/icon.figma.js +33 -0
  17. package/dist/atoms/figma/image.figma.js +21 -0
  18. package/dist/atoms/figma/input.figma.js +34 -0
  19. package/dist/atoms/figma/label.figma.js +25 -0
  20. package/dist/atoms/figma/link-button.figma.js +42 -0
  21. package/dist/atoms/figma/link.figma.js +15 -0
  22. package/dist/atoms/figma/numeric-input.figma.js +52 -0
  23. package/dist/atoms/figma/rating.figma.js +38 -0
  24. package/dist/atoms/figma/skeleton.figma.js +119 -0
  25. package/dist/atoms/figma/status-text.figma.js +27 -0
  26. package/dist/atoms/figma/textarea.figma.js +38 -0
  27. package/dist/atoms/figma/tooltip.figma.js +47 -0
  28. package/dist/atoms/icon.js +17 -17
  29. package/dist/atoms/image.js +22 -4
  30. package/dist/atoms/input.js +40 -34
  31. package/dist/atoms/label.js +10 -10
  32. package/dist/atoms/link-button.js +19 -18
  33. package/dist/atoms/link.js +6 -4
  34. package/dist/atoms/numeric-input.js +98 -70
  35. package/dist/atoms/rating.js +30 -30
  36. package/dist/atoms/skeleton.js +47 -47
  37. package/dist/atoms/status-text.js +75 -0
  38. package/dist/atoms/textarea.js +48 -42
  39. package/dist/atoms/tooltip.js +17 -17
  40. package/dist/molecules/accordion.js +58 -60
  41. package/dist/molecules/breadcrumb.js +206 -124
  42. package/dist/molecules/carousel.js +139 -87
  43. package/dist/molecules/color-select.js +56 -56
  44. package/dist/molecules/combobox.js +131 -104
  45. package/dist/molecules/dialog.js +97 -97
  46. package/dist/molecules/figma/accordion.figma.js +41 -0
  47. package/dist/molecules/figma/breadcrumb.figma.js +31 -0
  48. package/dist/molecules/figma/carousel.figma.js +34 -0
  49. package/dist/molecules/figma/combobox.figma.js +38 -0
  50. package/dist/molecules/figma/dialog.figma.js +24 -0
  51. package/dist/molecules/figma/form-checkbox.figma.js +41 -0
  52. package/dist/molecules/figma/form-input.figma.js +38 -0
  53. package/dist/molecules/figma/form-numeric-input.figma.js +67 -0
  54. package/dist/molecules/figma/form-textarea.figma.js +38 -0
  55. package/dist/molecules/figma/menu.figma.js +26 -0
  56. package/dist/molecules/figma/pagination.figma.js +22 -0
  57. package/dist/molecules/figma/popover.figma.js +38 -0
  58. package/dist/molecules/figma/product-card.figma.js +34 -0
  59. package/dist/molecules/figma/radio-card.figma.js +35 -0
  60. package/dist/molecules/figma/radio-group.figma.js +45 -0
  61. package/dist/molecules/figma/search-form.figma.js +24 -0
  62. package/dist/molecules/figma/select.figma.js +46 -0
  63. package/dist/molecules/figma/slider.figma.js +30 -0
  64. package/dist/molecules/figma/steps.figma.js +33 -0
  65. package/dist/molecules/figma/switch.figma.js +33 -0
  66. package/dist/molecules/figma/tabs.figma.js +46 -0
  67. package/dist/molecules/figma/toast.figma.js +34 -0
  68. package/dist/molecules/figma/tree-view.figma.js +30 -0
  69. package/dist/molecules/form-checkbox.js +121 -48
  70. package/dist/molecules/form-input.js +15 -27
  71. package/dist/molecules/form-numeric-input.js +11 -24
  72. package/dist/molecules/form-textarea.js +15 -27
  73. package/dist/molecules/menu.js +69 -67
  74. package/dist/molecules/pagination.js +112 -76
  75. package/dist/molecules/phone-input.js +654 -0
  76. package/dist/molecules/popover.js +221 -96
  77. package/dist/molecules/product-card.js +38 -37
  78. package/dist/molecules/radio-card.js +517 -0
  79. package/dist/molecules/radio-group.js +341 -0
  80. package/dist/molecules/search-form.js +170 -91
  81. package/dist/molecules/select.js +369 -141
  82. package/dist/molecules/slider.js +72 -85
  83. package/dist/molecules/steps.js +517 -152
  84. package/dist/molecules/switch.js +37 -43
  85. package/dist/molecules/tabs.js +63 -61
  86. package/dist/molecules/toast.js +32 -32
  87. package/dist/molecules/tree-view.js +89 -83
  88. package/dist/organisms/footer.js +50 -52
  89. package/dist/organisms/gallery.js +244 -0
  90. package/dist/organisms/header.js +60 -58
  91. package/dist/organisms/table.js +52 -52
  92. package/dist/src/atoms/badge.d.ts +27 -7
  93. package/dist/src/atoms/badge.d.ts.map +1 -1
  94. package/dist/src/atoms/button.d.ts +7 -6
  95. package/dist/src/atoms/button.d.ts.map +1 -1
  96. package/dist/src/atoms/checkbox.d.ts +11 -0
  97. package/dist/src/atoms/checkbox.d.ts.map +1 -0
  98. package/dist/src/atoms/figma/badge.figma.d.ts +2 -0
  99. package/dist/src/atoms/figma/badge.figma.d.ts.map +1 -0
  100. package/dist/src/atoms/figma/button.figma.d.ts +2 -0
  101. package/dist/src/atoms/figma/button.figma.d.ts.map +1 -0
  102. package/dist/src/atoms/figma/checkbox.figma.d.ts +2 -0
  103. package/dist/src/atoms/figma/checkbox.figma.d.ts.map +1 -0
  104. package/dist/src/atoms/figma/icon.figma.d.ts +2 -0
  105. package/dist/src/atoms/figma/icon.figma.d.ts.map +1 -0
  106. package/dist/src/atoms/figma/image.figma.d.ts +2 -0
  107. package/dist/src/atoms/figma/image.figma.d.ts.map +1 -0
  108. package/dist/src/atoms/figma/input.figma.d.ts +2 -0
  109. package/dist/src/atoms/figma/input.figma.d.ts.map +1 -0
  110. package/dist/src/atoms/figma/label.figma.d.ts +2 -0
  111. package/dist/src/atoms/figma/label.figma.d.ts.map +1 -0
  112. package/dist/src/atoms/figma/link-button.figma.d.ts +2 -0
  113. package/dist/src/atoms/figma/link-button.figma.d.ts.map +1 -0
  114. package/dist/src/atoms/figma/link.figma.d.ts +2 -0
  115. package/dist/src/atoms/figma/link.figma.d.ts.map +1 -0
  116. package/dist/src/atoms/figma/numeric-input.figma.d.ts +2 -0
  117. package/dist/src/atoms/figma/numeric-input.figma.d.ts.map +1 -0
  118. package/dist/src/atoms/figma/rating.figma.d.ts +2 -0
  119. package/dist/src/atoms/figma/rating.figma.d.ts.map +1 -0
  120. package/dist/src/atoms/figma/skeleton.figma.d.ts +2 -0
  121. package/dist/src/atoms/figma/skeleton.figma.d.ts.map +1 -0
  122. package/dist/src/atoms/figma/status-text.figma.d.ts +2 -0
  123. package/dist/src/atoms/figma/status-text.figma.d.ts.map +1 -0
  124. package/dist/src/atoms/figma/textarea.figma.d.ts +2 -0
  125. package/dist/src/atoms/figma/textarea.figma.d.ts.map +1 -0
  126. package/dist/src/atoms/figma/tooltip.figma.d.ts +2 -0
  127. package/dist/src/atoms/figma/tooltip.figma.d.ts.map +1 -0
  128. package/dist/src/atoms/icon.d.ts +6 -6
  129. package/dist/src/atoms/image.d.ts +35 -9
  130. package/dist/src/atoms/image.d.ts.map +1 -1
  131. package/dist/src/atoms/input.d.ts +3 -3
  132. package/dist/src/atoms/input.d.ts.map +1 -1
  133. package/dist/src/atoms/label.d.ts +2 -2
  134. package/dist/src/atoms/link-button.d.ts +71 -12
  135. package/dist/src/atoms/link-button.d.ts.map +1 -1
  136. package/dist/src/atoms/link.d.ts +5 -5
  137. package/dist/src/atoms/link.d.ts.map +1 -1
  138. package/dist/src/atoms/numeric-input.d.ts +23 -22
  139. package/dist/src/atoms/numeric-input.d.ts.map +1 -1
  140. package/dist/src/atoms/rating.d.ts +6 -5
  141. package/dist/src/atoms/rating.d.ts.map +1 -1
  142. package/dist/src/atoms/skeleton.d.ts +15 -15
  143. package/dist/src/atoms/skeleton.d.ts.map +1 -1
  144. package/dist/src/atoms/status-text.d.ts +97 -0
  145. package/dist/src/atoms/status-text.d.ts.map +1 -0
  146. package/dist/src/atoms/textarea.d.ts +3 -3
  147. package/dist/src/atoms/textarea.d.ts.map +1 -1
  148. package/dist/src/atoms/tooltip.d.ts +3 -3
  149. package/dist/src/atoms/tooltip.d.ts.map +1 -1
  150. package/dist/src/molecules/accordion.d.ts +14 -13
  151. package/dist/src/molecules/accordion.d.ts.map +1 -1
  152. package/dist/src/molecules/breadcrumb.d.ts +132 -35
  153. package/dist/src/molecules/breadcrumb.d.ts.map +1 -1
  154. package/dist/src/molecules/carousel.d.ts +67 -16
  155. package/dist/src/molecules/carousel.d.ts.map +1 -1
  156. package/dist/src/molecules/color-select.d.ts +4 -4
  157. package/dist/src/molecules/combobox.d.ts +36 -9
  158. package/dist/src/molecules/combobox.d.ts.map +1 -1
  159. package/dist/src/molecules/dialog.d.ts +3 -3
  160. package/dist/src/molecules/dialog.d.ts.map +1 -1
  161. package/dist/src/molecules/figma/accordion.figma.d.ts +2 -0
  162. package/dist/src/molecules/figma/accordion.figma.d.ts.map +1 -0
  163. package/dist/src/molecules/figma/breadcrumb.figma.d.ts +2 -0
  164. package/dist/src/molecules/figma/breadcrumb.figma.d.ts.map +1 -0
  165. package/dist/src/molecules/figma/carousel.figma.d.ts +2 -0
  166. package/dist/src/molecules/figma/carousel.figma.d.ts.map +1 -0
  167. package/dist/src/molecules/figma/combobox.figma.d.ts +2 -0
  168. package/dist/src/molecules/figma/combobox.figma.d.ts.map +1 -0
  169. package/dist/src/molecules/figma/dialog.figma.d.ts +2 -0
  170. package/dist/src/molecules/figma/dialog.figma.d.ts.map +1 -0
  171. package/dist/src/molecules/figma/form-checkbox.figma.d.ts +2 -0
  172. package/dist/src/molecules/figma/form-checkbox.figma.d.ts.map +1 -0
  173. package/dist/src/molecules/figma/form-input.figma.d.ts +2 -0
  174. package/dist/src/molecules/figma/form-input.figma.d.ts.map +1 -0
  175. package/dist/src/molecules/figma/form-numeric-input.figma.d.ts +2 -0
  176. package/dist/src/molecules/figma/form-numeric-input.figma.d.ts.map +1 -0
  177. package/dist/src/molecules/figma/form-textarea.figma.d.ts +2 -0
  178. package/dist/src/molecules/figma/form-textarea.figma.d.ts.map +1 -0
  179. package/dist/src/molecules/figma/menu.figma.d.ts +2 -0
  180. package/dist/src/molecules/figma/menu.figma.d.ts.map +1 -0
  181. package/dist/src/molecules/figma/pagination.figma.d.ts +2 -0
  182. package/dist/src/molecules/figma/pagination.figma.d.ts.map +1 -0
  183. package/dist/src/molecules/figma/popover.figma.d.ts +2 -0
  184. package/dist/src/molecules/figma/popover.figma.d.ts.map +1 -0
  185. package/dist/src/molecules/figma/product-card.figma.d.ts +2 -0
  186. package/dist/src/molecules/figma/product-card.figma.d.ts.map +1 -0
  187. package/dist/src/molecules/figma/radio-card.figma.d.ts +2 -0
  188. package/dist/src/molecules/figma/radio-card.figma.d.ts.map +1 -0
  189. package/dist/src/molecules/figma/radio-group.figma.d.ts +2 -0
  190. package/dist/src/molecules/figma/radio-group.figma.d.ts.map +1 -0
  191. package/dist/src/molecules/figma/search-form.figma.d.ts +2 -0
  192. package/dist/src/molecules/figma/search-form.figma.d.ts.map +1 -0
  193. package/dist/src/molecules/figma/select.figma.d.ts +2 -0
  194. package/dist/src/molecules/figma/select.figma.d.ts.map +1 -0
  195. package/dist/src/molecules/figma/slider.figma.d.ts +2 -0
  196. package/dist/src/molecules/figma/slider.figma.d.ts.map +1 -0
  197. package/dist/src/molecules/figma/steps.figma.d.ts +2 -0
  198. package/dist/src/molecules/figma/steps.figma.d.ts.map +1 -0
  199. package/dist/src/molecules/figma/switch.figma.d.ts +2 -0
  200. package/dist/src/molecules/figma/switch.figma.d.ts.map +1 -0
  201. package/dist/src/molecules/figma/tabs.figma.d.ts +2 -0
  202. package/dist/src/molecules/figma/tabs.figma.d.ts.map +1 -0
  203. package/dist/src/molecules/figma/toast.figma.d.ts +2 -0
  204. package/dist/src/molecules/figma/toast.figma.d.ts.map +1 -0
  205. package/dist/src/molecules/figma/tree-view.figma.d.ts +2 -0
  206. package/dist/src/molecules/figma/tree-view.figma.d.ts.map +1 -0
  207. package/dist/src/molecules/form-checkbox.d.ts +22 -12
  208. package/dist/src/molecules/form-checkbox.d.ts.map +1 -1
  209. package/dist/src/molecules/form-input.d.ts +8 -6
  210. package/dist/src/molecules/form-input.d.ts.map +1 -1
  211. package/dist/src/molecules/form-numeric-input.d.ts +6 -6
  212. package/dist/src/molecules/form-numeric-input.d.ts.map +1 -1
  213. package/dist/src/molecules/form-textarea.d.ts +8 -6
  214. package/dist/src/molecules/form-textarea.d.ts.map +1 -1
  215. package/dist/src/molecules/menu.d.ts +11 -11
  216. package/dist/src/molecules/menu.d.ts.map +1 -1
  217. package/dist/src/molecules/pagination.d.ts +37 -9
  218. package/dist/src/molecules/pagination.d.ts.map +1 -1
  219. package/dist/src/molecules/phone-input.d.ts +246 -0
  220. package/dist/src/molecules/phone-input.d.ts.map +1 -0
  221. package/dist/src/molecules/popover.d.ts +76 -24
  222. package/dist/src/molecules/popover.d.ts.map +1 -1
  223. package/dist/src/molecules/product-card.d.ts +11 -10
  224. package/dist/src/molecules/product-card.d.ts.map +1 -1
  225. package/dist/src/molecules/radio-card.d.ts +429 -0
  226. package/dist/src/molecules/radio-card.d.ts.map +1 -0
  227. package/dist/src/molecules/radio-group.d.ts +245 -0
  228. package/dist/src/molecules/radio-group.d.ts.map +1 -0
  229. package/dist/src/molecules/search-form.d.ts +94 -27
  230. package/dist/src/molecules/search-form.d.ts.map +1 -1
  231. package/dist/src/molecules/select.d.ts +124 -30
  232. package/dist/src/molecules/select.d.ts.map +1 -1
  233. package/dist/src/molecules/slider.d.ts +9 -12
  234. package/dist/src/molecules/slider.d.ts.map +1 -1
  235. package/dist/src/molecules/steps.d.ts +236 -64
  236. package/dist/src/molecules/steps.d.ts.map +1 -1
  237. package/dist/src/molecules/switch.d.ts +7 -7
  238. package/dist/src/molecules/switch.d.ts.map +1 -1
  239. package/dist/src/molecules/tabs.d.ts +10 -10
  240. package/dist/src/molecules/tabs.d.ts.map +1 -1
  241. package/dist/src/molecules/toast.d.ts +6 -6
  242. package/dist/src/molecules/tree-view.d.ts +14 -14
  243. package/dist/src/molecules/tree-view.d.ts.map +1 -1
  244. package/dist/src/organisms/footer.d.ts +15 -6
  245. package/dist/src/organisms/footer.d.ts.map +1 -1
  246. package/dist/src/organisms/gallery.d.ts +147 -0
  247. package/dist/src/organisms/gallery.d.ts.map +1 -0
  248. package/dist/src/organisms/header.d.ts +9 -9
  249. package/dist/src/organisms/header.d.ts.map +1 -1
  250. package/dist/src/organisms/table.d.ts +10 -10
  251. package/dist/src/organisms/table.d.ts.map +1 -1
  252. package/dist/src/templates/accordion.d.ts +3 -3
  253. package/dist/src/templates/breadcrumb.d.ts +28 -0
  254. package/dist/src/templates/breadcrumb.d.ts.map +1 -0
  255. package/dist/src/templates/carousel.d.ts +4 -4
  256. package/dist/src/templates/carousel.d.ts.map +1 -1
  257. package/dist/src/templates/gallery.d.ts +43 -0
  258. package/dist/src/templates/gallery.d.ts.map +1 -0
  259. package/dist/src/templates/numeric-input.d.ts +5 -5
  260. package/dist/src/templates/popover.d.ts +19 -0
  261. package/dist/src/templates/popover.d.ts.map +1 -0
  262. package/dist/src/templates/product-card.d.ts +4 -4
  263. package/dist/src/templates/select.d.ts +22 -0
  264. package/dist/src/templates/select.d.ts.map +1 -0
  265. package/dist/src/templates/tabs.d.ts +4 -4
  266. package/dist/src/types/zag.d.ts +19 -18
  267. package/dist/src/types/zag.d.ts.map +1 -1
  268. package/dist/src/utils.d.ts +1 -1
  269. package/dist/src/utils.d.ts.map +1 -1
  270. package/dist/stories/atoms/badge.stories.d.ts +12 -0
  271. package/dist/stories/atoms/badge.stories.d.ts.map +1 -0
  272. package/dist/stories/atoms/button.stories.d.ts +12 -0
  273. package/dist/stories/atoms/button.stories.d.ts.map +1 -0
  274. package/dist/stories/atoms/checkbox.stories.d.ts +56 -0
  275. package/dist/stories/atoms/checkbox.stories.d.ts.map +1 -0
  276. package/dist/stories/atoms/icon.stories.d.ts +11 -0
  277. package/dist/stories/atoms/icon.stories.d.ts.map +1 -0
  278. package/dist/stories/atoms/image.stories.d.ts +8 -0
  279. package/dist/stories/atoms/image.stories.d.ts.map +1 -0
  280. package/dist/stories/atoms/input.stories.d.ts +8 -0
  281. package/dist/stories/atoms/input.stories.d.ts.map +1 -0
  282. package/dist/stories/atoms/numeric-input.stories.d.ts +23 -0
  283. package/dist/stories/atoms/numeric-input.stories.d.ts.map +1 -0
  284. package/dist/stories/atoms/rating.stories.d.ts +10 -0
  285. package/dist/stories/atoms/rating.stories.d.ts.map +1 -0
  286. package/dist/stories/atoms/skeleton.stories.d.ts +34 -0
  287. package/dist/stories/atoms/skeleton.stories.d.ts.map +1 -0
  288. package/dist/stories/atoms/status-text.stories.d.ts +15 -0
  289. package/dist/stories/atoms/status-text.stories.d.ts.map +1 -0
  290. package/dist/stories/atoms/textarea.stories.d.ts +12 -0
  291. package/dist/stories/atoms/textarea.stories.d.ts.map +1 -0
  292. package/dist/stories/atoms/tooltip.stories.d.ts +28 -0
  293. package/dist/stories/atoms/tooltip.stories.d.ts.map +1 -0
  294. package/dist/stories/helpers/icon-options.d.ts +4 -0
  295. package/dist/stories/helpers/icon-options.d.ts.map +1 -0
  296. package/dist/stories/molecules/accordion.stories.d.ts +14 -0
  297. package/dist/stories/molecules/accordion.stories.d.ts.map +1 -0
  298. package/dist/stories/molecules/breadcrumb.stories.d.ts +14 -0
  299. package/dist/stories/molecules/breadcrumb.stories.d.ts.map +1 -0
  300. package/dist/stories/molecules/carousel.stories.d.ts +19 -0
  301. package/dist/stories/molecules/carousel.stories.d.ts.map +1 -0
  302. package/dist/stories/molecules/color-select.stories.d.ts +12 -0
  303. package/dist/stories/molecules/color-select.stories.d.ts.map +1 -0
  304. package/dist/stories/molecules/combobox.stories.d.ts +11 -0
  305. package/dist/stories/molecules/combobox.stories.d.ts.map +1 -0
  306. package/dist/stories/molecules/dialog.stories.d.ts +19 -0
  307. package/dist/stories/molecules/dialog.stories.d.ts.map +1 -0
  308. package/dist/stories/molecules/form-checkbox.stories.d.ts +17 -0
  309. package/dist/stories/molecules/form-checkbox.stories.d.ts.map +1 -0
  310. package/dist/stories/molecules/form-input.stories.d.ts +12 -0
  311. package/dist/stories/molecules/form-input.stories.d.ts.map +1 -0
  312. package/dist/stories/molecules/form-numeric-input.stories.d.ts +17 -0
  313. package/dist/stories/molecules/form-numeric-input.stories.d.ts.map +1 -0
  314. package/dist/stories/molecules/form-textarea.stories.d.ts +12 -0
  315. package/dist/stories/molecules/form-textarea.stories.d.ts.map +1 -0
  316. package/dist/stories/molecules/menu.stories.d.ts +22 -0
  317. package/dist/stories/molecules/menu.stories.d.ts.map +1 -0
  318. package/dist/stories/molecules/pagination.stories.d.ts +13 -0
  319. package/dist/stories/molecules/pagination.stories.d.ts.map +1 -0
  320. package/dist/stories/molecules/phone-input.stories.d.ts +19 -0
  321. package/dist/stories/molecules/phone-input.stories.d.ts.map +1 -0
  322. package/dist/stories/molecules/popover.stories.d.ts +140 -0
  323. package/dist/stories/molecules/popover.stories.d.ts.map +1 -0
  324. package/dist/stories/molecules/product-card.stories.d.ts +41 -0
  325. package/dist/stories/molecules/product-card.stories.d.ts.map +1 -0
  326. package/dist/stories/molecules/radio-card.stories.d.ts +13 -0
  327. package/dist/stories/molecules/radio-card.stories.d.ts.map +1 -0
  328. package/dist/stories/molecules/radio-group.stories.d.ts +13 -0
  329. package/dist/stories/molecules/radio-group.stories.d.ts.map +1 -0
  330. package/dist/stories/molecules/search-form.stories.d.ts +16 -0
  331. package/dist/stories/molecules/search-form.stories.d.ts.map +1 -0
  332. package/dist/stories/molecules/select.stories.d.ts +19 -0
  333. package/dist/stories/molecules/select.stories.d.ts.map +1 -0
  334. package/dist/stories/molecules/slider.stories.d.ts +19 -0
  335. package/dist/stories/molecules/slider.stories.d.ts.map +1 -0
  336. package/dist/stories/molecules/steps.stories.d.ts +19 -0
  337. package/dist/stories/molecules/steps.stories.d.ts.map +1 -0
  338. package/dist/stories/molecules/switch.stories.d.ts +13 -0
  339. package/dist/stories/molecules/switch.stories.d.ts.map +1 -0
  340. package/dist/stories/molecules/tabs.stories.d.ts +18 -0
  341. package/dist/stories/molecules/tabs.stories.d.ts.map +1 -0
  342. package/dist/stories/molecules/toast.stories.d.ts +11 -0
  343. package/dist/stories/molecules/toast.stories.d.ts.map +1 -0
  344. package/dist/stories/molecules/tree-view.stories.d.ts +17 -0
  345. package/dist/stories/molecules/tree-view.stories.d.ts.map +1 -0
  346. package/dist/stories/organisms/footer.stories.d.ts +12 -0
  347. package/dist/stories/organisms/footer.stories.d.ts.map +1 -0
  348. package/dist/stories/organisms/gallery.stories.d.ts +73 -0
  349. package/dist/stories/organisms/gallery.stories.d.ts.map +1 -0
  350. package/dist/stories/organisms/header.stories.d.ts +12 -0
  351. package/dist/stories/organisms/header.stories.d.ts.map +1 -0
  352. package/dist/stories/organisms/table.stories.d.ts +56 -0
  353. package/dist/stories/organisms/table.stories.d.ts.map +1 -0
  354. package/dist/stories/overview/apca-contrast-test.stories.d.ts +8 -0
  355. package/dist/stories/overview/apca-contrast-test.stories.d.ts.map +1 -0
  356. package/dist/stories/overview/color-palette.stories.d.ts +8 -0
  357. package/dist/stories/overview/color-palette.stories.d.ts.map +1 -0
  358. package/dist/stories/overview/component-comparison.stories.d.ts +6 -0
  359. package/dist/stories/overview/component-comparison.stories.d.ts.map +1 -0
  360. package/dist/stories/templates/accordion.stories.d.ts +8 -0
  361. package/dist/stories/templates/accordion.stories.d.ts.map +1 -0
  362. package/dist/stories/templates/breadcrumb.stories.d.ts +12 -0
  363. package/dist/stories/templates/breadcrumb.stories.d.ts.map +1 -0
  364. package/dist/stories/templates/carousel.stories.d.ts +8 -0
  365. package/dist/stories/templates/carousel.stories.d.ts.map +1 -0
  366. package/dist/stories/templates/comprehensive-form.stories.d.ts +26 -0
  367. package/dist/stories/templates/comprehensive-form.stories.d.ts.map +1 -0
  368. package/dist/stories/templates/gallery.stories.d.ts +7 -0
  369. package/dist/stories/templates/gallery.stories.d.ts.map +1 -0
  370. package/dist/stories/templates/numeric-input.stories.d.ts +8 -0
  371. package/dist/stories/templates/numeric-input.stories.d.ts.map +1 -0
  372. package/dist/stories/templates/popover.stories.d.ts +55 -0
  373. package/dist/stories/templates/popover.stories.d.ts.map +1 -0
  374. package/dist/stories/templates/product-card.stories.d.ts +10 -0
  375. package/dist/stories/templates/product-card.stories.d.ts.map +1 -0
  376. package/dist/stories/templates/select.stories.d.ts +10 -0
  377. package/dist/stories/templates/select.stories.d.ts.map +1 -0
  378. package/dist/stories/templates/tabs.stories.d.ts +8 -0
  379. package/dist/stories/templates/tabs.stories.d.ts.map +1 -0
  380. package/dist/templates/accordion.js +9 -9
  381. package/dist/templates/breadcrumb.js +78 -0
  382. package/dist/templates/carousel.js +13 -15
  383. package/dist/templates/gallery.js +89 -0
  384. package/dist/templates/numeric-input.js +4 -4
  385. package/dist/templates/popover.js +35 -0
  386. package/dist/templates/product-card.js +10 -10
  387. package/dist/templates/select.js +43 -0
  388. package/dist/templates/tabs.js +8 -8
  389. package/dist/test/visual.spec.d.ts +2 -0
  390. package/dist/test/visual.spec.d.ts.map +1 -0
  391. package/dist/utils.js +1 -1
  392. package/package.json +41 -28
  393. package/src/tokens/_base.css +3 -3
  394. package/src/tokens/_layout.css +4 -0
  395. package/src/tokens/_semantic.css +49 -10
  396. package/src/tokens/_tokens-base.css +67 -0
  397. package/src/tokens/_typography.css +36 -6
  398. package/src/tokens/components/_form-control.css +67 -0
  399. package/src/tokens/components/atoms/_badge.css +16 -5
  400. package/src/tokens/components/atoms/_button.css +16 -10
  401. package/src/tokens/components/atoms/_checkbox.css +52 -0
  402. package/src/tokens/components/atoms/_icon.css +90 -2
  403. package/src/tokens/components/atoms/_image.css +5 -0
  404. package/src/tokens/components/atoms/_input.css +11 -32
  405. package/src/tokens/components/atoms/_label.css +11 -0
  406. package/src/tokens/components/atoms/_numeric-input.css +27 -13
  407. package/src/tokens/components/atoms/_rating.css +2 -2
  408. package/src/tokens/components/atoms/_status-text.css +32 -0
  409. package/src/tokens/components/atoms/_textarea.css +15 -17
  410. package/src/tokens/components/components.css +10 -1
  411. package/src/tokens/components/molecules/_accordion.css +1 -8
  412. package/src/tokens/components/molecules/_breadcrumb.css +42 -20
  413. package/src/tokens/components/molecules/_carousel.css +10 -2
  414. package/src/tokens/components/molecules/_color-select.css +3 -3
  415. package/src/tokens/components/molecules/_combobox.css +15 -21
  416. package/src/tokens/components/molecules/_dialog.css +0 -1
  417. package/src/tokens/components/molecules/_menu.css +0 -1
  418. package/src/tokens/components/molecules/_pagination.css +3 -3
  419. package/src/tokens/components/molecules/_phone-input.css +63 -0
  420. package/src/tokens/components/molecules/_popover.css +3 -0
  421. package/src/tokens/components/molecules/_product-card.css +9 -1
  422. package/src/tokens/components/molecules/_radio-card.css +197 -0
  423. package/src/tokens/components/molecules/_radio-group.css +150 -0
  424. package/src/tokens/components/molecules/_search-form.css +7 -3
  425. package/src/tokens/components/molecules/_select.css +41 -20
  426. package/src/tokens/components/molecules/_steps.css +115 -34
  427. package/src/tokens/components/molecules/_toast.css +5 -5
  428. package/src/tokens/components/molecules/_tree-view.css +5 -6
  429. package/src/tokens/components/organisms/_footer.css +1 -6
  430. package/src/tokens/components/organisms/_gallery.css +35 -0
  431. package/src/tokens/components/organisms/_header.css +8 -0
  432. package/src/tokens/figma/dark/variables.css +1406 -0
  433. package/src/tokens/figma/light/variables.css +1406 -0
  434. package/src/tokens/index.css +1 -65
  435. package/src/tokens/tokens-only.css +1 -64
  436. package/dist/atoms/error-text.js +0 -38
  437. package/dist/atoms/extra-text.js +0 -27
  438. package/dist/molecules/checkbox.js +0 -98
  439. package/dist/src/atoms/error-text.d.ts +0 -29
  440. package/dist/src/atoms/error-text.d.ts.map +0 -1
  441. package/dist/src/atoms/extra-text.d.ts +0 -27
  442. package/dist/src/atoms/extra-text.d.ts.map +0 -1
  443. package/dist/src/molecules/checkbox.d.ts +0 -19
  444. package/dist/src/molecules/checkbox.d.ts.map +0 -1
  445. package/src/tokens/components/molecules/_checkbox.css +0 -34
  446. package/src/tokens/components/molecules/index.css +0 -2
@@ -1,178 +1,543 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { normalizeProps, useMachine } from "@zag-js/react";
1
+ import { Fragment, jsx } from "react/jsx-runtime";
2
+ import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
3
3
  import { connect, machine } from "@zag-js/steps";
4
- import { useId } from "react";
4
+ import { createContext, useContext, useId } from "react";
5
5
  import { Button } from "../atoms/button.js";
6
- import { slugify, tv } from "../utils.js";
6
+ import { Icon } from "../atoms/icon.js";
7
+ import { tv } from "../utils.js";
7
8
  const stepsVariants = tv({
8
9
  slots: {
9
10
  root: [
10
- 'relative flex bg-steps-root-bg',
11
- 'gap-root',
12
- 'text-steps-fg',
13
- 'data-[orientation=horizontal]:flex-col',
14
- 'data-[orientation=vertical]:grid data-[orientation=vertical]:grid-cols-[auto_1fr]'
11
+ "flex w-full flex-col gap-steps-root",
12
+ "text-steps-fg",
13
+ "data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-start"
15
14
  ],
16
15
  list: [
17
- 'relative flex bg-steps-list-bg gap-list',
18
- 'data-[orientation=vertical]:flex-col',
19
- 'data-[orientation=vertical]:h-full'
16
+ "flex w-full gap-steps-list",
17
+ "data-[orientation=horizontal]:items-start",
18
+ "data-[orientation=vertical]:w-auto data-[orientation=vertical]:min-w-steps-list-vertical data-[orientation=vertical]:flex-col"
19
+ ],
20
+ panels: [
21
+ "flex w-full flex-col gap-steps-panels",
22
+ "data-[orientation=vertical]:min-w-0 data-[orientation=vertical]:flex-1"
20
23
  ],
21
24
  item: [
22
- 'relative flex bg-steps-item-bg items-center gap-item',
23
- 'focus-visible:outline-none',
24
- 'data-[orientation=horizontal]:w-full data-[orientation=horizontal]:justify-start',
25
- 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:h-full'
25
+ "relative flex min-w-0 gap-steps-item",
26
+ "data-[orientation=horizontal]:flex-1 data-[orientation=horizontal]:items-center",
27
+ "data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-start"
26
28
  ],
27
29
  trigger: [
28
- 'relative gap-trigger flex cursor-pointer group',
29
- 'items-center justify-center',
30
- 'transition-all duration-200',
31
- 'focus-visible:outline-none',
32
- 'data-[orientation=horizontal]:flex-row',
33
- 'data-[orientation=vertical]:flex-col'
30
+ "group relative flex min-w-0 items-center justify-start gap-steps-trigger",
31
+ "text-left",
32
+ "focus-visible:outline-(style:--default-ring-style) focus-visible:outline-(length:--default-ring-width)",
33
+ "focus-visible:outline-steps-ring",
34
+ "focus-visible:outline-offset-(length:--default-ring-offset)",
35
+ "data-[orientation=vertical]:items-start",
36
+ "data-disabled:cursor-not-allowed",
37
+ "transition-colors duration-200 motion-reduce:transition-none"
34
38
  ],
35
- content: [
36
- 'grid p-content bg-steps-content-bg',
37
- 'focus-visible:outline-none',
38
- 'focus-visible:ring',
39
- 'focus-visible:ring-steps-ring',
40
- 'data-[orientation=horizontal]:w-full',
41
- 'data-[orientation=vertical]:flex-1'
39
+ itemText: [
40
+ "inline-flex min-w-0 flex-col gap-steps-text",
41
+ "data-[orientation=vertical]:items-start"
42
42
  ],
43
43
  indicator: [
44
- 'grid place-items-center',
45
- 'h-steps-indicator rounded-full aspect-square',
46
- 'bg-steps-indicator-bg data-[complete]:bg-steps-indicator-bg-complete',
47
- 'group-focus-visible:ring',
48
- 'group-focus-visible:ring-steps-ring',
49
- 'group-hover:bg-steps-indicator-bg-hover',
50
- 'group-hover:text-steps-fg-active',
51
- 'transition-all duration-200 ease-out',
52
- 'data-[current]:bg-steps-indicator-bg-current',
53
- 'focus-visible:data-[current]:ring',
54
- 'focus-visible:data-[current]:ring-steps-ring',
55
- 'data-[current]:outline-none',
56
- 'data-[current]:text-steps-fg-current data-[complete]:text-steps-fg-active'
44
+ "flex shrink-0 items-center justify-center rounded-steps-indicator",
45
+ "border-(length:--border-width-steps-indicator) border-steps-indicator-border",
46
+ "bg-steps-indicator-bg text-steps-indicator-fg",
47
+ "group-hover:border-steps-indicator-border-hover group-hover:bg-steps-indicator-bg-hover",
48
+ "data-current:border-steps-indicator-border-current data-current:bg-steps-indicator-bg-current data-current:text-steps-indicator-fg-current",
49
+ "data-complete:border-steps-indicator-border-complete data-complete:bg-steps-indicator-bg-complete data-complete:text-steps-indicator-fg-complete",
50
+ "transition-colors duration-200 motion-reduce:transition-none"
51
+ ],
52
+ indicatorIcon: "text-steps-icon",
53
+ number: [
54
+ "font-steps-number leading-none"
55
+ ],
56
+ title: [
57
+ "truncate font-steps-title text-steps-title text-steps-title-fg",
58
+ "data-current:text-steps-title-fg-current",
59
+ "data-complete:text-steps-title-fg-complete",
60
+ "transition-colors duration-200 motion-reduce:transition-none"
61
+ ],
62
+ description: [
63
+ "text-steps-description text-steps-description-fg",
64
+ "data-current:text-steps-description-fg-current",
65
+ "data-complete:text-steps-description-fg-complete",
66
+ "transition-colors duration-200 motion-reduce:transition-none"
57
67
  ],
58
68
  separator: [
59
- 'bg-steps-separator-bg',
60
- 'data-[complete]:bg-steps-separator-bg-complete',
61
- 'data-[orientation=horizontal]:h-steps-separator data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-1',
62
- 'data-[orientation=vertical]:w-steps-separator data-[orientation=vertical]:h-full'
63
- ],
64
- containerButtons: [
65
- 'flex gap-2 h-fit',
66
- 'data-[orientation=vertical]:col-start-2'
67
- ],
68
- stepButton: [
69
- 'rounded-none p-steps-btn',
70
- 'focus-visible:ring',
71
- 'focus-visible:ring-steps-ring'
72
- ]
69
+ "shrink-0 rounded-steps-separator bg-steps-separator-bg",
70
+ "data-current:bg-steps-separator-bg-current",
71
+ "data-complete:bg-steps-separator-bg-complete",
72
+ "data-last:hidden",
73
+ "data-[orientation=horizontal]:h-steps-separator data-[orientation=horizontal]:flex-1",
74
+ "data-[orientation=vertical]:ms-steps-separator-offset data-[orientation=vertical]:min-h-steps-separator-vertical data-[orientation=vertical]:w-steps-separator data-[orientation=vertical]:flex-1",
75
+ "transition-colors duration-200 motion-reduce:transition-none"
76
+ ],
77
+ progress: [
78
+ "relative overflow-hidden rounded-steps-progress bg-steps-progress-bg",
79
+ "data-[orientation=horizontal]:h-steps-progress data-[orientation=horizontal]:w-full",
80
+ "data-[orientation=vertical]:w-steps-progress data-[orientation=vertical]:self-stretch"
81
+ ],
82
+ progressRange: [
83
+ "absolute rounded-steps-progress bg-steps-progress-range-bg",
84
+ "transition-[width,height] duration-200 motion-reduce:transition-none",
85
+ "data-[orientation=horizontal]:inset-y-0 data-[orientation=horizontal]:start-0",
86
+ "data-[orientation=vertical]:inset-x-0 data-[orientation=vertical]:top-0"
87
+ ],
88
+ content: [
89
+ "border-(length:--border-width-steps-content) w-full rounded-steps-content",
90
+ "border-steps-content-border bg-steps-content-bg",
91
+ "text-steps-content-fg",
92
+ "focus-visible:outline-(style:--default-ring-style) focus-visible:outline-(length:--default-ring-width)",
93
+ "focus-visible:outline-steps-ring",
94
+ "focus-visible:outline-offset-(length:--default-ring-offset)"
95
+ ],
96
+ completedContent: [
97
+ "border-(length:--border-width-steps-content) w-full rounded-steps-content",
98
+ "border-steps-content-border bg-steps-content-bg",
99
+ "text-steps-content-fg",
100
+ "data-complete:border-steps-content-border-complete",
101
+ "data-complete:bg-steps-content-bg-complete"
102
+ ],
103
+ navigation: [
104
+ "flex flex-wrap items-center gap-steps-navigation",
105
+ "data-[orientation=vertical]:justify-start"
106
+ ],
107
+ prevTrigger: "",
108
+ nextTrigger: ""
109
+ },
110
+ variants: {
111
+ variant: {
112
+ subtle: {},
113
+ solid: {
114
+ trigger: [
115
+ "rounded-steps-trigger px-steps-trigger-x py-steps-trigger-y",
116
+ "hover:bg-steps-trigger-bg-hover",
117
+ "data-current:bg-steps-trigger-bg-current",
118
+ "data-complete:bg-steps-trigger-bg-complete"
119
+ ],
120
+ indicator: [
121
+ "border-transparent bg-steps-indicator-bg-solid text-steps-indicator-fg-solid",
122
+ "group-hover:bg-steps-indicator-bg-solid-hover",
123
+ "data-current:bg-steps-indicator-bg-solid-current data-current:text-steps-indicator-fg-solid-current",
124
+ "data-complete:bg-steps-indicator-bg-solid-complete data-complete:text-steps-indicator-fg-solid-complete"
125
+ ]
126
+ }
127
+ },
128
+ size: {
129
+ sm: {
130
+ indicator: "size-steps-indicator-sm",
131
+ indicatorIcon: "text-steps-icon-sm",
132
+ number: "text-steps-number-sm",
133
+ title: "text-steps-title-sm",
134
+ description: "text-steps-description-sm",
135
+ content: "p-steps-content-sm text-steps-content-sm",
136
+ completedContent: "p-steps-content-sm text-steps-content-sm"
137
+ },
138
+ md: {
139
+ indicator: "size-steps-indicator-md",
140
+ indicatorIcon: "text-steps-icon-md",
141
+ number: "text-steps-number-md",
142
+ title: "text-steps-title-md",
143
+ description: "text-steps-description-md",
144
+ content: "p-steps-content-md text-steps-content-md",
145
+ completedContent: "p-steps-content-md text-steps-content-md"
146
+ },
147
+ lg: {
148
+ indicator: "size-steps-indicator-lg",
149
+ indicatorIcon: "text-steps-icon-lg",
150
+ number: "text-steps-number-lg",
151
+ title: "text-steps-title-lg",
152
+ description: "text-steps-description-lg",
153
+ content: "p-steps-content-lg text-steps-content-lg",
154
+ completedContent: "p-steps-content-lg text-steps-content-lg"
155
+ }
156
+ }
157
+ },
158
+ defaultVariants: {
159
+ variant: "subtle",
160
+ size: "md"
73
161
  }
74
162
  });
75
- function Steps({ id, items, currentStep = 0, orientation = 'horizontal', linear = false, showControls = true, completeText, onStepChange, onStepComplete }) {
163
+ const StepsContext = /*#__PURE__*/ createContext(null);
164
+ function useStepsContext() {
165
+ const context = useContext(StepsContext);
166
+ if (!context) throw new Error("Steps components must be used within Steps.Root");
167
+ return context;
168
+ }
169
+ const StepsItemContext = /*#__PURE__*/ createContext(null);
170
+ function useStepsItemContext() {
171
+ const context = useContext(StepsItemContext);
172
+ if (!context) throw new Error("Steps item components must be used within Steps.Item");
173
+ return context;
174
+ }
175
+ function getStepStatusDataProps(state) {
176
+ return {
177
+ "data-complete": state.completed || void 0,
178
+ "data-current": state.current || void 0,
179
+ "data-incomplete": state.incomplete || void 0
180
+ };
181
+ }
182
+ function getOrientationFromApi(api) {
183
+ const rootProps = api.getRootProps();
184
+ return rootProps["data-orientation"] ?? "horizontal";
185
+ }
186
+ function getControlSize(size) {
187
+ if ("sm" === size) return "sm";
188
+ if ("lg" === size) return "lg";
189
+ return "md";
190
+ }
191
+ function useSteps({ id, ...props }) {
76
192
  const generatedId = useId();
77
- const uniqueId = id || generatedId;
78
193
  const service = useMachine(machine, {
79
- id: uniqueId,
80
- count: items.length,
81
- step: currentStep,
82
- orientation,
194
+ id: id ?? generatedId,
195
+ ...props
196
+ });
197
+ return connect(service, normalizeProps);
198
+ }
199
+ function Steps({ id, count = 1, defaultStep, dir = "ltr", linear = false, onStepChange, onStepComplete, orientation = "horizontal", size, step, variant, children, className, ref, ...props }) {
200
+ const api = useSteps({
201
+ count,
202
+ defaultStep,
203
+ dir,
204
+ id,
83
205
  linear,
84
- onStepChange: (details)=>{
85
- onStepChange?.(details.step);
206
+ onStepChange,
207
+ onStepComplete,
208
+ orientation,
209
+ step
210
+ });
211
+ const styles = stepsVariants({
212
+ size,
213
+ variant
214
+ });
215
+ const rootProps = mergeProps(props, api.getRootProps());
216
+ return /*#__PURE__*/ jsx(StepsContext.Provider, {
217
+ value: {
218
+ api,
219
+ orientation,
220
+ size,
221
+ styles
86
222
  },
87
- onStepComplete: ()=>{
88
- onStepComplete?.();
89
- }
223
+ children: /*#__PURE__*/ jsx("div", {
224
+ className: styles.root({
225
+ className
226
+ }),
227
+ ref: ref,
228
+ ...rootProps,
229
+ children: children
230
+ })
231
+ });
232
+ }
233
+ Steps.RootProvider = function({ value, size, variant, children, className, ref, ...props }) {
234
+ const styles = stepsVariants({
235
+ size,
236
+ variant
90
237
  });
91
- const api = connect(service, normalizeProps);
92
- const { root, list, item, trigger, separator, indicator, content, containerButtons, stepButton } = stepsVariants();
93
- return /*#__PURE__*/ jsxs("div", {
94
- className: root(),
95
- ...api.getRootProps(),
96
- children: [
97
- /*#__PURE__*/ jsx("div", {
98
- className: list(),
99
- ...api.getListProps(),
100
- children: items.map((step, index)=>/*#__PURE__*/ jsxs("div", {
101
- className: item(),
102
- ...api.getItemProps({
103
- index
104
- }),
105
- children: [
106
- /*#__PURE__*/ jsxs("button", {
107
- className: trigger(),
108
- ...api.getTriggerProps({
109
- index
110
- }),
111
- children: [
112
- /*#__PURE__*/ jsx("span", {
113
- className: indicator(),
114
- ...api.getIndicatorProps({
115
- index
116
- }),
117
- children: index + 1
118
- }),
119
- /*#__PURE__*/ jsx("span", {
120
- children: step.title
121
- })
122
- ]
123
- }),
124
- index < items.length - 1 && /*#__PURE__*/ jsx("div", {
125
- className: separator(),
126
- ...api.getSeparatorProps({
127
- index
128
- })
129
- })
130
- ]
131
- }, slugify(step.title)))
238
+ const resolvedOrientation = getOrientationFromApi(value);
239
+ const rootProps = mergeProps(props, value.getRootProps());
240
+ return /*#__PURE__*/ jsx(StepsContext.Provider, {
241
+ value: {
242
+ api: value,
243
+ orientation: resolvedOrientation,
244
+ size,
245
+ styles
246
+ },
247
+ children: /*#__PURE__*/ jsx("div", {
248
+ className: styles.root({
249
+ className
132
250
  }),
133
- items.map((step, index)=>/*#__PURE__*/ jsx("div", {
134
- className: content(),
135
- ...api.getContentProps({
136
- index
137
- }),
138
- children: /*#__PURE__*/ jsxs("article", {
139
- className: "h-fit",
140
- children: [
141
- /*#__PURE__*/ jsx("h3", {
142
- children: step.title
143
- }),
144
- step.content
145
- ]
146
- })
147
- }, `content-${slugify(step.title)}`)),
148
- /*#__PURE__*/ jsx("div", {
149
- className: content(),
150
- ...api.getContentProps({
151
- index: items.length
152
- }),
153
- children: completeText
251
+ ref: ref,
252
+ ...rootProps,
253
+ children: children
254
+ })
255
+ });
256
+ };
257
+ Steps.List = function({ children, className, ref, ...props }) {
258
+ const { api, styles } = useStepsContext();
259
+ const listProps = mergeProps(props, api.getListProps());
260
+ return /*#__PURE__*/ jsx("div", {
261
+ className: styles.list({
262
+ className
263
+ }),
264
+ ref: ref,
265
+ ...listProps,
266
+ children: children
267
+ });
268
+ };
269
+ Steps.Panels = function({ children, className, ref, ...props }) {
270
+ const { orientation, styles } = useStepsContext();
271
+ return /*#__PURE__*/ jsx("div", {
272
+ className: styles.panels({
273
+ className
274
+ }),
275
+ ref: ref,
276
+ ...props,
277
+ "data-orientation": orientation,
278
+ children: children
279
+ });
280
+ };
281
+ Steps.Navigation = function({ children, className, ref, ...props }) {
282
+ const { orientation, styles } = useStepsContext();
283
+ return /*#__PURE__*/ jsx("div", {
284
+ className: styles.navigation({
285
+ className
286
+ }),
287
+ ref: ref,
288
+ ...props,
289
+ "data-orientation": orientation,
290
+ children: children
291
+ });
292
+ };
293
+ Steps.Item = function({ index, children, className, ref, ...props }) {
294
+ const { api, styles } = useStepsContext();
295
+ const state = api.getItemState({
296
+ index
297
+ });
298
+ const itemProps = mergeProps(props, api.getItemProps({
299
+ index
300
+ }));
301
+ return /*#__PURE__*/ jsx(StepsItemContext.Provider, {
302
+ value: {
303
+ index,
304
+ state
305
+ },
306
+ children: /*#__PURE__*/ jsx("div", {
307
+ className: styles.item({
308
+ className
154
309
  }),
155
- showControls && /*#__PURE__*/ jsxs("div", {
156
- className: containerButtons(),
157
- "data-orientation": orientation,
158
- children: [
159
- /*#__PURE__*/ jsx(Button, {
160
- theme: "solid",
161
- size: "sm",
162
- className: stepButton(),
163
- ...api.getPrevTriggerProps(),
164
- children: "Back"
165
- }),
166
- /*#__PURE__*/ jsx(Button, {
167
- size: "sm",
168
- theme: "solid",
169
- className: stepButton(),
170
- ...api.getNextTriggerProps(),
171
- children: "Next"
172
- })
173
- ]
174
- })
175
- ]
310
+ ref: ref,
311
+ ...itemProps,
312
+ children: children
313
+ })
176
314
  });
177
- }
178
- export { Steps };
315
+ };
316
+ Steps.Trigger = function({ children, className, disabled, ref, ...props }) {
317
+ const { api, styles } = useStepsContext();
318
+ const { index } = useStepsItemContext();
319
+ const triggerProps = api.getTriggerProps({
320
+ index
321
+ });
322
+ const { onClick: onTriggerClick, disabled: machineDisabled, ...restTriggerProps } = triggerProps;
323
+ const { onClick, ...restProps } = props;
324
+ const buttonProps = mergeProps(restProps, restTriggerProps);
325
+ const isDisabled = Boolean(machineDisabled || disabled);
326
+ return /*#__PURE__*/ jsx(Button, {
327
+ className: styles.trigger({
328
+ className
329
+ }),
330
+ ref: ref,
331
+ size: "current",
332
+ theme: "unstyled",
333
+ type: "button",
334
+ ...buttonProps,
335
+ "data-disabled": isDisabled || void 0,
336
+ disabled: isDisabled,
337
+ onClick: (event)=>{
338
+ onClick?.(event);
339
+ if (!event.defaultPrevented) onTriggerClick?.(event);
340
+ },
341
+ children: children
342
+ });
343
+ };
344
+ Steps.ItemText = function({ children, className, ref, ...props }) {
345
+ const { orientation, styles } = useStepsContext();
346
+ return /*#__PURE__*/ jsx("span", {
347
+ className: styles.itemText({
348
+ className
349
+ }),
350
+ ref: ref,
351
+ ...props,
352
+ "data-orientation": orientation,
353
+ children: children
354
+ });
355
+ };
356
+ Steps.Indicator = function({ children, className, ref, ...props }) {
357
+ const { api, styles } = useStepsContext();
358
+ const { index } = useStepsItemContext();
359
+ const indicatorProps = mergeProps(props, api.getIndicatorProps({
360
+ index
361
+ }));
362
+ return /*#__PURE__*/ jsx("div", {
363
+ className: styles.indicator({
364
+ className
365
+ }),
366
+ ref: ref,
367
+ ...indicatorProps,
368
+ children: children ?? /*#__PURE__*/ jsx(Steps.Status, {
369
+ complete: /*#__PURE__*/ jsx(Icon, {
370
+ className: styles.indicatorIcon(),
371
+ icon: "token-icon-steps-check"
372
+ }),
373
+ current: /*#__PURE__*/ jsx(Steps.Number, {}),
374
+ incomplete: /*#__PURE__*/ jsx(Steps.Number, {})
375
+ })
376
+ });
377
+ };
378
+ Steps.Status = function({ complete, current, incomplete }) {
379
+ const { state } = useStepsItemContext();
380
+ if (state.current) return /*#__PURE__*/ jsx(Fragment, {
381
+ children: current ?? incomplete
382
+ });
383
+ if (state.completed) return /*#__PURE__*/ jsx(Fragment, {
384
+ children: complete
385
+ });
386
+ return /*#__PURE__*/ jsx(Fragment, {
387
+ children: incomplete
388
+ });
389
+ };
390
+ Steps.Number = function({ className, ref, ...props }) {
391
+ const { styles } = useStepsContext();
392
+ const { state } = useStepsItemContext();
393
+ return /*#__PURE__*/ jsx("span", {
394
+ className: styles.number({
395
+ className
396
+ }),
397
+ ref: ref,
398
+ ...props,
399
+ children: state.index + 1
400
+ });
401
+ };
402
+ Steps.Title = function({ children, className, ref, ...props }) {
403
+ const { styles } = useStepsContext();
404
+ const { state } = useStepsItemContext();
405
+ return /*#__PURE__*/ jsx("span", {
406
+ className: styles.title({
407
+ className
408
+ }),
409
+ ref: ref,
410
+ ...props,
411
+ ...getStepStatusDataProps(state),
412
+ children: children
413
+ });
414
+ };
415
+ Steps.Description = function({ children, className, ref, ...props }) {
416
+ const { styles } = useStepsContext();
417
+ const { state } = useStepsItemContext();
418
+ return /*#__PURE__*/ jsx("span", {
419
+ className: styles.description({
420
+ className
421
+ }),
422
+ ref: ref,
423
+ ...props,
424
+ ...getStepStatusDataProps(state),
425
+ children: children
426
+ });
427
+ };
428
+ Steps.Separator = function({ className, ref, ...props }) {
429
+ const { api, styles } = useStepsContext();
430
+ const { index, state } = useStepsItemContext();
431
+ const separatorProps = mergeProps(props, api.getSeparatorProps({
432
+ index
433
+ }), {
434
+ "data-last": state.last || void 0
435
+ });
436
+ return /*#__PURE__*/ jsx("div", {
437
+ className: styles.separator({
438
+ className
439
+ }),
440
+ ref: ref,
441
+ ...separatorProps
442
+ });
443
+ };
444
+ Steps.Content = function({ index, children, className, ref, ...props }) {
445
+ const { api, styles } = useStepsContext();
446
+ const contentProps = mergeProps(props, api.getContentProps({
447
+ index
448
+ }));
449
+ return /*#__PURE__*/ jsx("div", {
450
+ className: styles.content({
451
+ className
452
+ }),
453
+ ref: ref,
454
+ ...contentProps,
455
+ children: children
456
+ });
457
+ };
458
+ Steps.Progress = function({ className, ref, style, ...props }) {
459
+ const { api, orientation, styles } = useStepsContext();
460
+ const progressProps = mergeProps(props, api.getProgressProps());
461
+ const progressRangeStyle = "horizontal" === orientation ? {
462
+ width: "var(--percent)"
463
+ } : {
464
+ height: "var(--percent)"
465
+ };
466
+ return /*#__PURE__*/ jsx("div", {
467
+ className: styles.progress({
468
+ className
469
+ }),
470
+ ref: ref,
471
+ ...progressProps,
472
+ "data-orientation": orientation,
473
+ style: style,
474
+ children: /*#__PURE__*/ jsx("span", {
475
+ "aria-hidden": "true",
476
+ className: styles.progressRange(),
477
+ "data-orientation": orientation,
478
+ style: progressRangeStyle
479
+ })
480
+ });
481
+ };
482
+ Steps.CompletedContent = function({ children, className, ref, ...props }) {
483
+ const { api, styles } = useStepsContext();
484
+ const contentProps = mergeProps(props, api.getContentProps({
485
+ index: api.count
486
+ }));
487
+ return /*#__PURE__*/ jsx("div", {
488
+ className: styles.completedContent({
489
+ className
490
+ }),
491
+ ref: ref,
492
+ ...contentProps,
493
+ "data-complete": api.isCompleted || void 0,
494
+ children: children
495
+ });
496
+ };
497
+ Steps.PrevTrigger = function({ className, ref, size, theme = "outlined", variant = "secondary", ...props }) {
498
+ const { api, styles, size: rootSize } = useStepsContext();
499
+ const { onClick: onPrevTriggerClick, disabled: prevTriggerDisabled, ...restPrevTriggerProps } = api.getPrevTriggerProps();
500
+ const { onClick, disabled, ...restProps } = props;
501
+ const buttonProps = mergeProps(restProps, restPrevTriggerProps);
502
+ const isDisabled = Boolean(disabled || prevTriggerDisabled);
503
+ return /*#__PURE__*/ jsx(Button, {
504
+ className: styles.prevTrigger({
505
+ className
506
+ }),
507
+ ref: ref,
508
+ size: size ?? getControlSize(rootSize),
509
+ theme: theme,
510
+ variant: variant,
511
+ ...buttonProps,
512
+ disabled: isDisabled,
513
+ onClick: (event)=>{
514
+ onClick?.(event);
515
+ if (!event.defaultPrevented) onPrevTriggerClick?.(event);
516
+ }
517
+ });
518
+ };
519
+ Steps.NextTrigger = function({ className, ref, size, theme = "solid", variant = "primary", ...props }) {
520
+ const { api, styles, size: rootSize } = useStepsContext();
521
+ const { onClick: onNextTriggerClick, disabled: nextTriggerDisabled, ...restNextTriggerProps } = api.getNextTriggerProps();
522
+ const { onClick, disabled, ...restProps } = props;
523
+ const buttonProps = mergeProps(restProps, restNextTriggerProps);
524
+ const isDisabled = Boolean(disabled || nextTriggerDisabled);
525
+ return /*#__PURE__*/ jsx(Button, {
526
+ className: styles.nextTrigger({
527
+ className
528
+ }),
529
+ ref: ref,
530
+ size: size ?? getControlSize(rootSize),
531
+ theme: theme,
532
+ variant: variant,
533
+ ...buttonProps,
534
+ disabled: isDisabled,
535
+ onClick: (event)=>{
536
+ onClick?.(event);
537
+ if (!event.defaultPrevented) onNextTriggerClick?.(event);
538
+ }
539
+ });
540
+ };
541
+ Steps.Root = Steps;
542
+ Steps.displayName = "Steps";
543
+ export { Steps, useSteps };