@locus-ui/components 0.0.16 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (747) hide show
  1. package/dist/components/accordion/accordion-context.d.mts +15 -0
  2. package/dist/components/accordion/accordion-context.d.ts +15 -0
  3. package/dist/components/accordion/accordion-context.js +52 -0
  4. package/dist/components/accordion/accordion-context.js.map +1 -0
  5. package/dist/components/accordion/accordion-context.mjs +17 -0
  6. package/dist/components/accordion/accordion-context.mjs.map +1 -0
  7. package/dist/components/accordion/accordion.d.mts +22 -0
  8. package/dist/components/accordion/accordion.d.ts +22 -0
  9. package/dist/components/accordion/accordion.js +38 -0
  10. package/dist/components/accordion/accordion.js.map +1 -0
  11. package/dist/components/accordion/accordion.mjs +14 -0
  12. package/dist/components/accordion/accordion.mjs.map +1 -0
  13. package/dist/components/accordion/accordion.props.d.mts +40 -0
  14. package/dist/components/accordion/accordion.props.d.ts +40 -0
  15. package/dist/components/accordion/accordion.props.js +65 -0
  16. package/dist/components/accordion/accordion.props.js.map +1 -0
  17. package/dist/components/accordion/accordion.props.mjs +40 -0
  18. package/dist/components/accordion/accordion.props.mjs.map +1 -0
  19. package/dist/components/accordion/content/accordion-content.d.mts +14 -0
  20. package/dist/components/accordion/content/accordion-content.d.ts +14 -0
  21. package/dist/components/accordion/content/accordion-content.js +61 -0
  22. package/dist/components/accordion/content/accordion-content.js.map +1 -0
  23. package/dist/components/accordion/content/accordion-content.mjs +29 -0
  24. package/dist/components/accordion/content/accordion-content.mjs.map +1 -0
  25. package/dist/components/accordion/content/accordion-content.props.d.mts +6 -0
  26. package/dist/components/accordion/content/accordion-content.props.d.ts +6 -0
  27. package/dist/components/accordion/content/accordion-content.props.js +31 -0
  28. package/dist/components/accordion/content/accordion-content.props.js.map +1 -0
  29. package/dist/components/accordion/content/accordion-content.props.mjs +7 -0
  30. package/dist/components/accordion/content/accordion-content.props.mjs.map +1 -0
  31. package/dist/components/accordion/header/accordion-header.d.mts +14 -0
  32. package/dist/components/accordion/header/accordion-header.d.ts +14 -0
  33. package/dist/components/accordion/header/accordion-header.js +86 -0
  34. package/dist/components/accordion/header/accordion-header.js.map +1 -0
  35. package/dist/components/accordion/header/accordion-header.mjs +54 -0
  36. package/dist/components/accordion/header/accordion-header.mjs.map +1 -0
  37. package/dist/components/accordion/header/accordion-header.props.d.mts +11 -0
  38. package/dist/components/accordion/header/accordion-header.props.d.ts +11 -0
  39. package/dist/components/accordion/header/accordion-header.props.js +34 -0
  40. package/dist/components/accordion/header/accordion-header.props.js.map +1 -0
  41. package/dist/components/accordion/header/accordion-header.props.mjs +10 -0
  42. package/dist/components/accordion/header/accordion-header.props.mjs.map +1 -0
  43. package/dist/components/accordion/index.d.mts +14 -0
  44. package/dist/components/accordion/index.d.ts +14 -0
  45. package/dist/components/accordion/index.js +29 -0
  46. package/dist/components/accordion/index.js.map +1 -0
  47. package/dist/components/accordion/index.mjs +5 -0
  48. package/dist/components/accordion/index.mjs.map +1 -0
  49. package/dist/components/accordion/item/accordion-item.d.mts +15 -0
  50. package/dist/components/accordion/item/accordion-item.d.ts +15 -0
  51. package/dist/components/accordion/item/accordion-item.js +97 -0
  52. package/dist/components/accordion/item/accordion-item.js.map +1 -0
  53. package/dist/components/accordion/item/accordion-item.mjs +68 -0
  54. package/dist/components/accordion/item/accordion-item.mjs.map +1 -0
  55. package/dist/components/accordion/item/accordion-item.props.d.mts +19 -0
  56. package/dist/components/accordion/item/accordion-item.props.d.ts +19 -0
  57. package/dist/components/accordion/item/accordion-item.props.js +42 -0
  58. package/dist/components/accordion/item/accordion-item.props.js.map +1 -0
  59. package/dist/components/accordion/item/accordion-item.props.mjs +18 -0
  60. package/dist/components/accordion/item/accordion-item.props.mjs.map +1 -0
  61. package/dist/components/accordion/root/accordion-root.d.mts +17 -0
  62. package/dist/components/accordion/root/accordion-root.d.ts +17 -0
  63. package/dist/components/accordion/root/accordion-root.js +102 -0
  64. package/dist/components/accordion/root/accordion-root.js.map +1 -0
  65. package/dist/components/accordion/root/accordion-root.mjs +72 -0
  66. package/dist/components/accordion/root/accordion-root.mjs.map +1 -0
  67. package/dist/components/accordion/root/accordion-root.props.d.mts +30 -0
  68. package/dist/components/accordion/root/accordion-root.props.d.ts +30 -0
  69. package/dist/components/accordion/root/accordion-root.props.js +59 -0
  70. package/dist/components/accordion/root/accordion-root.props.js.map +1 -0
  71. package/dist/components/accordion/root/accordion-root.props.mjs +34 -0
  72. package/dist/components/accordion/root/accordion-root.props.mjs.map +1 -0
  73. package/dist/components/badge/badge.d.mts +15 -0
  74. package/dist/components/badge/badge.d.ts +15 -0
  75. package/dist/components/badge/badge.js +64 -0
  76. package/dist/components/badge/badge.js.map +1 -0
  77. package/dist/components/badge/badge.mjs +35 -0
  78. package/dist/components/badge/badge.mjs.map +1 -0
  79. package/dist/components/badge/badge.props.d.mts +16 -0
  80. package/dist/components/badge/badge.props.d.ts +16 -0
  81. package/dist/components/badge/badge.props.js +41 -0
  82. package/dist/components/badge/badge.props.js.map +1 -0
  83. package/dist/components/badge/badge.props.mjs +16 -0
  84. package/dist/components/badge/badge.props.mjs.map +1 -0
  85. package/dist/components/badge/index.d.mts +9 -0
  86. package/dist/components/badge/index.d.ts +9 -0
  87. package/dist/components/badge/index.js +29 -0
  88. package/dist/components/badge/index.js.map +1 -0
  89. package/dist/components/badge/index.mjs +5 -0
  90. package/dist/components/badge/index.mjs.map +1 -0
  91. package/dist/components/box/box.d.mts +16 -0
  92. package/dist/components/box/box.d.ts +16 -0
  93. package/dist/components/box/box.js +66 -0
  94. package/dist/components/box/box.js.map +1 -0
  95. package/dist/components/box/box.mjs +38 -0
  96. package/dist/components/box/box.mjs.map +1 -0
  97. package/dist/components/box/box.props.d.mts +6 -0
  98. package/dist/components/box/box.props.d.ts +6 -0
  99. package/dist/components/box/box.props.js +43 -0
  100. package/dist/components/box/box.props.js.map +1 -0
  101. package/dist/components/box/box.props.mjs +19 -0
  102. package/dist/components/box/box.props.mjs.map +1 -0
  103. package/dist/components/box/index.d.mts +8 -0
  104. package/dist/components/box/index.d.ts +8 -0
  105. package/dist/components/box/index.js +29 -0
  106. package/dist/components/box/index.js.map +1 -0
  107. package/dist/components/box/index.mjs +5 -0
  108. package/dist/components/box/index.mjs.map +1 -0
  109. package/dist/components/button/button.d.mts +16 -0
  110. package/dist/components/button/button.d.ts +16 -0
  111. package/dist/components/button/button.js +85 -0
  112. package/dist/components/button/button.js.map +1 -0
  113. package/dist/components/button/button.mjs +57 -0
  114. package/dist/components/button/button.mjs.map +1 -0
  115. package/dist/components/button/button.props.d.mts +40 -0
  116. package/dist/components/button/button.props.d.ts +40 -0
  117. package/dist/components/button/button.props.js +65 -0
  118. package/dist/components/button/button.props.js.map +1 -0
  119. package/dist/components/button/button.props.mjs +40 -0
  120. package/dist/components/button/button.props.mjs.map +1 -0
  121. package/dist/components/button/index.d.mts +10 -0
  122. package/dist/components/button/index.d.ts +10 -0
  123. package/dist/components/button/index.js +29 -0
  124. package/dist/components/button/index.js.map +1 -0
  125. package/dist/components/button/index.mjs +5 -0
  126. package/dist/components/button/index.mjs.map +1 -0
  127. package/dist/components/checkbox/checkbox-context.d.mts +26 -0
  128. package/dist/components/checkbox/checkbox-context.d.ts +26 -0
  129. package/dist/components/checkbox/checkbox-context.js +52 -0
  130. package/dist/components/checkbox/checkbox-context.js.map +1 -0
  131. package/dist/components/checkbox/checkbox-context.mjs +17 -0
  132. package/dist/components/checkbox/checkbox-context.mjs.map +1 -0
  133. package/dist/components/checkbox/checkbox.d.mts +24 -0
  134. package/dist/components/checkbox/checkbox.d.ts +24 -0
  135. package/dist/components/checkbox/checkbox.js +36 -0
  136. package/dist/components/checkbox/checkbox.js.map +1 -0
  137. package/dist/components/checkbox/checkbox.mjs +12 -0
  138. package/dist/components/checkbox/checkbox.mjs.map +1 -0
  139. package/dist/components/checkbox/index.d.mts +15 -0
  140. package/dist/components/checkbox/index.d.ts +15 -0
  141. package/dist/components/checkbox/index.js +29 -0
  142. package/dist/components/checkbox/index.js.map +1 -0
  143. package/dist/components/checkbox/index.mjs +5 -0
  144. package/dist/components/checkbox/index.mjs.map +1 -0
  145. package/dist/components/checkbox/indicator/checkbox-indicator.d.mts +15 -0
  146. package/dist/components/checkbox/indicator/checkbox-indicator.d.ts +15 -0
  147. package/dist/components/checkbox/indicator/checkbox-indicator.js +114 -0
  148. package/dist/components/checkbox/indicator/checkbox-indicator.js.map +1 -0
  149. package/dist/components/checkbox/indicator/checkbox-indicator.mjs +82 -0
  150. package/dist/components/checkbox/indicator/checkbox-indicator.mjs.map +1 -0
  151. package/dist/components/checkbox/indicator/checkbox-indicator.props.d.mts +15 -0
  152. package/dist/components/checkbox/indicator/checkbox-indicator.props.d.ts +15 -0
  153. package/dist/components/checkbox/indicator/checkbox-indicator.props.js +39 -0
  154. package/dist/components/checkbox/indicator/checkbox-indicator.props.js.map +1 -0
  155. package/dist/components/checkbox/indicator/checkbox-indicator.props.mjs +15 -0
  156. package/dist/components/checkbox/indicator/checkbox-indicator.props.mjs.map +1 -0
  157. package/dist/components/checkbox/label/checkbox-label.d.mts +15 -0
  158. package/dist/components/checkbox/label/checkbox-label.d.ts +15 -0
  159. package/dist/components/checkbox/label/checkbox-label.js +69 -0
  160. package/dist/components/checkbox/label/checkbox-label.js.map +1 -0
  161. package/dist/components/checkbox/label/checkbox-label.mjs +37 -0
  162. package/dist/components/checkbox/label/checkbox-label.mjs.map +1 -0
  163. package/dist/components/checkbox/label/checkbox-label.props.d.mts +20 -0
  164. package/dist/components/checkbox/label/checkbox-label.props.d.ts +20 -0
  165. package/dist/components/checkbox/label/checkbox-label.props.js +44 -0
  166. package/dist/components/checkbox/label/checkbox-label.props.js.map +1 -0
  167. package/dist/components/checkbox/label/checkbox-label.props.mjs +19 -0
  168. package/dist/components/checkbox/label/checkbox-label.props.mjs.map +1 -0
  169. package/dist/components/checkbox/root/checkbox-root.d.mts +23 -0
  170. package/dist/components/checkbox/root/checkbox-root.d.ts +23 -0
  171. package/dist/components/checkbox/root/checkbox-root.js +160 -0
  172. package/dist/components/checkbox/root/checkbox-root.js.map +1 -0
  173. package/dist/components/checkbox/root/checkbox-root.mjs +142 -0
  174. package/dist/components/checkbox/root/checkbox-root.mjs.map +1 -0
  175. package/dist/components/checkbox/root/checkbox-root.props.d.mts +92 -0
  176. package/dist/components/checkbox/root/checkbox-root.props.d.ts +92 -0
  177. package/dist/components/checkbox/root/checkbox-root.props.js +119 -0
  178. package/dist/components/checkbox/root/checkbox-root.props.js.map +1 -0
  179. package/dist/components/checkbox/root/checkbox-root.props.mjs +94 -0
  180. package/dist/components/checkbox/root/checkbox-root.props.mjs.map +1 -0
  181. package/dist/components/container/container.d.mts +11 -0
  182. package/dist/components/container/container.d.ts +11 -0
  183. package/dist/components/container/container.js +55 -0
  184. package/dist/components/container/container.js.map +1 -0
  185. package/dist/components/container/container.mjs +21 -0
  186. package/dist/components/container/container.mjs.map +1 -0
  187. package/dist/components/container/container.props.d.mts +10 -0
  188. package/dist/components/container/container.props.d.ts +10 -0
  189. package/dist/components/container/container.props.js +32 -0
  190. package/dist/components/container/container.props.js.map +1 -0
  191. package/dist/components/container/container.props.mjs +8 -0
  192. package/dist/components/container/container.props.mjs.map +1 -0
  193. package/dist/components/container/index.d.mts +5 -0
  194. package/dist/components/container/index.d.ts +5 -0
  195. package/dist/components/container/index.js +29 -0
  196. package/dist/components/container/index.js.map +1 -0
  197. package/dist/components/container/index.mjs +5 -0
  198. package/dist/components/container/index.mjs.map +1 -0
  199. package/dist/components/flex/flex.d.mts +45 -0
  200. package/dist/components/flex/flex.d.ts +45 -0
  201. package/dist/components/flex/flex.js +55 -0
  202. package/dist/components/flex/flex.js.map +1 -0
  203. package/dist/components/flex/flex.mjs +25 -0
  204. package/dist/components/flex/flex.mjs.map +1 -0
  205. package/dist/components/flex/flex.props.d.mts +52 -0
  206. package/dist/components/flex/flex.props.d.ts +52 -0
  207. package/dist/components/flex/flex.props.js +98 -0
  208. package/dist/components/flex/flex.props.js.map +1 -0
  209. package/dist/components/flex/flex.props.mjs +74 -0
  210. package/dist/components/flex/flex.props.mjs.map +1 -0
  211. package/dist/components/flex/index.d.mts +6 -0
  212. package/dist/components/flex/index.d.ts +6 -0
  213. package/dist/components/flex/index.js +29 -0
  214. package/dist/components/flex/index.js.map +1 -0
  215. package/dist/components/flex/index.mjs +5 -0
  216. package/dist/components/flex/index.mjs.map +1 -0
  217. package/dist/components/index.d.mts +81 -0
  218. package/dist/components/index.d.ts +81 -0
  219. package/dist/components/index.js +75 -0
  220. package/dist/components/index.js.map +1 -0
  221. package/dist/components/index.mjs +35 -0
  222. package/dist/components/index.mjs.map +1 -0
  223. package/dist/components/panel/index.d.mts +10 -0
  224. package/dist/components/panel/index.d.ts +10 -0
  225. package/dist/components/panel/index.js +29 -0
  226. package/dist/components/panel/index.js.map +1 -0
  227. package/dist/components/panel/index.mjs +5 -0
  228. package/dist/components/panel/index.mjs.map +1 -0
  229. package/dist/components/panel/panel.d.mts +29 -0
  230. package/dist/components/panel/panel.d.ts +29 -0
  231. package/dist/components/panel/panel.js +67 -0
  232. package/dist/components/panel/panel.js.map +1 -0
  233. package/dist/components/panel/panel.mjs +40 -0
  234. package/dist/components/panel/panel.mjs.map +1 -0
  235. package/dist/components/panel/panel.props.d.mts +27 -0
  236. package/dist/components/panel/panel.props.d.ts +27 -0
  237. package/dist/components/panel/panel.props.js +52 -0
  238. package/dist/components/panel/panel.props.js.map +1 -0
  239. package/dist/components/panel/panel.props.mjs +27 -0
  240. package/dist/components/panel/panel.props.mjs.map +1 -0
  241. package/dist/components/portal/backdrop/portal-backdrop.d.mts +10 -0
  242. package/dist/components/portal/backdrop/portal-backdrop.d.ts +10 -0
  243. package/dist/components/portal/backdrop/portal-backdrop.js +71 -0
  244. package/dist/components/portal/backdrop/portal-backdrop.js.map +1 -0
  245. package/dist/components/portal/backdrop/portal-backdrop.mjs +39 -0
  246. package/dist/components/portal/backdrop/portal-backdrop.mjs.map +1 -0
  247. package/dist/components/portal/backdrop/portal-backdrop.props.d.mts +62 -0
  248. package/dist/components/portal/backdrop/portal-backdrop.props.d.ts +62 -0
  249. package/dist/components/portal/backdrop/portal-backdrop.props.js +65 -0
  250. package/dist/components/portal/backdrop/portal-backdrop.props.js.map +1 -0
  251. package/dist/components/portal/backdrop/portal-backdrop.props.mjs +41 -0
  252. package/dist/components/portal/backdrop/portal-backdrop.props.mjs.map +1 -0
  253. package/dist/components/portal/content/portal-content.d.mts +12 -0
  254. package/dist/components/portal/content/portal-content.d.ts +12 -0
  255. package/dist/components/portal/content/portal-content.js +163 -0
  256. package/dist/components/portal/content/portal-content.js.map +1 -0
  257. package/dist/components/portal/content/portal-content.mjs +133 -0
  258. package/dist/components/portal/content/portal-content.mjs.map +1 -0
  259. package/dist/components/portal/content/portal-content.props.d.mts +45 -0
  260. package/dist/components/portal/content/portal-content.props.d.ts +45 -0
  261. package/dist/components/portal/content/portal-content.props.js +80 -0
  262. package/dist/components/portal/content/portal-content.props.js.map +1 -0
  263. package/dist/components/portal/content/portal-content.props.mjs +56 -0
  264. package/dist/components/portal/content/portal-content.props.mjs.map +1 -0
  265. package/dist/components/portal/index.d.mts +14 -0
  266. package/dist/components/portal/index.d.ts +14 -0
  267. package/dist/components/portal/index.js +47 -0
  268. package/dist/components/portal/index.js.map +1 -0
  269. package/dist/components/portal/index.mjs +25 -0
  270. package/dist/components/portal/index.mjs.map +1 -0
  271. package/dist/components/portal/portal-context.d.mts +16 -0
  272. package/dist/components/portal/portal-context.d.ts +16 -0
  273. package/dist/components/portal/portal-context.js +52 -0
  274. package/dist/components/portal/portal-context.js.map +1 -0
  275. package/dist/components/portal/portal-context.mjs +17 -0
  276. package/dist/components/portal/portal-context.mjs.map +1 -0
  277. package/dist/components/portal/portal.d.mts +24 -0
  278. package/dist/components/portal/portal.d.ts +24 -0
  279. package/dist/components/portal/portal.js +42 -0
  280. package/dist/components/portal/portal.js.map +1 -0
  281. package/dist/components/portal/portal.mjs +18 -0
  282. package/dist/components/portal/portal.mjs.map +1 -0
  283. package/dist/components/portal/root/portal-root.d.mts +18 -0
  284. package/dist/components/portal/root/portal-root.d.ts +18 -0
  285. package/dist/components/portal/root/portal-root.js +74 -0
  286. package/dist/components/portal/root/portal-root.js.map +1 -0
  287. package/dist/components/portal/root/portal-root.mjs +56 -0
  288. package/dist/components/portal/root/portal-root.mjs.map +1 -0
  289. package/dist/components/portal/root/portal-root.props.d.mts +23 -0
  290. package/dist/components/portal/root/portal-root.props.d.ts +23 -0
  291. package/dist/components/portal/root/portal-root.props.js +48 -0
  292. package/dist/components/portal/root/portal-root.props.js.map +1 -0
  293. package/dist/components/portal/root/portal-root.props.mjs +24 -0
  294. package/dist/components/portal/root/portal-root.props.mjs.map +1 -0
  295. package/dist/components/portal/trigger/portal-trigger.d.mts +9 -0
  296. package/dist/components/portal/trigger/portal-trigger.d.ts +9 -0
  297. package/dist/components/portal/trigger/portal-trigger.js +89 -0
  298. package/dist/components/portal/trigger/portal-trigger.js.map +1 -0
  299. package/dist/components/portal/trigger/portal-trigger.mjs +55 -0
  300. package/dist/components/portal/trigger/portal-trigger.mjs.map +1 -0
  301. package/dist/components/portal/utils/use-anchor-position.d.mts +31 -0
  302. package/dist/components/portal/utils/use-anchor-position.d.ts +31 -0
  303. package/dist/components/portal/utils/use-anchor-position.js +137 -0
  304. package/dist/components/portal/utils/use-anchor-position.js.map +1 -0
  305. package/dist/components/portal/utils/use-anchor-position.mjs +103 -0
  306. package/dist/components/portal/utils/use-anchor-position.mjs.map +1 -0
  307. package/dist/components/progress-bar/fill/progress-bar-fill.d.mts +17 -0
  308. package/dist/components/progress-bar/fill/progress-bar-fill.d.ts +17 -0
  309. package/dist/components/progress-bar/fill/progress-bar-fill.js +61 -0
  310. package/dist/components/progress-bar/fill/progress-bar-fill.js.map +1 -0
  311. package/dist/components/progress-bar/fill/progress-bar-fill.mjs +29 -0
  312. package/dist/components/progress-bar/fill/progress-bar-fill.mjs.map +1 -0
  313. package/dist/components/progress-bar/fill/progress-bar-fill.props.d.mts +14 -0
  314. package/dist/components/progress-bar/fill/progress-bar-fill.props.d.ts +14 -0
  315. package/dist/components/progress-bar/fill/progress-bar-fill.props.js +37 -0
  316. package/dist/components/progress-bar/fill/progress-bar-fill.props.js.map +1 -0
  317. package/dist/components/progress-bar/fill/progress-bar-fill.props.mjs +13 -0
  318. package/dist/components/progress-bar/fill/progress-bar-fill.props.mjs.map +1 -0
  319. package/dist/components/progress-bar/index.d.mts +12 -0
  320. package/dist/components/progress-bar/index.d.ts +12 -0
  321. package/dist/components/progress-bar/index.js +29 -0
  322. package/dist/components/progress-bar/index.js.map +1 -0
  323. package/dist/components/progress-bar/index.mjs +5 -0
  324. package/dist/components/progress-bar/index.mjs.map +1 -0
  325. package/dist/components/progress-bar/progress-bar-context.d.mts +11 -0
  326. package/dist/components/progress-bar/progress-bar-context.d.ts +11 -0
  327. package/dist/components/progress-bar/progress-bar-context.js +52 -0
  328. package/dist/components/progress-bar/progress-bar-context.js.map +1 -0
  329. package/dist/components/progress-bar/progress-bar-context.mjs +17 -0
  330. package/dist/components/progress-bar/progress-bar-context.mjs.map +1 -0
  331. package/dist/components/progress-bar/progress-bar.d.mts +27 -0
  332. package/dist/components/progress-bar/progress-bar.d.ts +27 -0
  333. package/dist/components/progress-bar/progress-bar.js +40 -0
  334. package/dist/components/progress-bar/progress-bar.js.map +1 -0
  335. package/dist/components/progress-bar/progress-bar.mjs +16 -0
  336. package/dist/components/progress-bar/progress-bar.mjs.map +1 -0
  337. package/dist/components/progress-bar/root/progress-bar-root.d.mts +17 -0
  338. package/dist/components/progress-bar/root/progress-bar-root.d.ts +17 -0
  339. package/dist/components/progress-bar/root/progress-bar-root.js +93 -0
  340. package/dist/components/progress-bar/root/progress-bar-root.js.map +1 -0
  341. package/dist/components/progress-bar/root/progress-bar-root.mjs +69 -0
  342. package/dist/components/progress-bar/root/progress-bar-root.mjs.map +1 -0
  343. package/dist/components/progress-bar/root/progress-bar-root.props.d.mts +23 -0
  344. package/dist/components/progress-bar/root/progress-bar-root.props.d.ts +23 -0
  345. package/dist/components/progress-bar/root/progress-bar-root.props.js +48 -0
  346. package/dist/components/progress-bar/root/progress-bar-root.props.js.map +1 -0
  347. package/dist/components/progress-bar/root/progress-bar-root.props.mjs +23 -0
  348. package/dist/components/progress-bar/root/progress-bar-root.props.mjs.map +1 -0
  349. package/dist/components/select/content/select-content.d.mts +16 -0
  350. package/dist/components/select/content/select-content.d.ts +16 -0
  351. package/dist/components/select/content/select-content.js +163 -0
  352. package/dist/components/select/content/select-content.js.map +1 -0
  353. package/dist/components/select/content/select-content.mjs +129 -0
  354. package/dist/components/select/content/select-content.mjs.map +1 -0
  355. package/dist/components/select/content/select-content.props.d.mts +28 -0
  356. package/dist/components/select/content/select-content.props.d.ts +28 -0
  357. package/dist/components/select/content/select-content.props.js +54 -0
  358. package/dist/components/select/content/select-content.props.js.map +1 -0
  359. package/dist/components/select/content/select-content.props.mjs +30 -0
  360. package/dist/components/select/content/select-content.props.mjs.map +1 -0
  361. package/dist/components/select/group/select-group.d.mts +10 -0
  362. package/dist/components/select/group/select-group.d.ts +10 -0
  363. package/dist/components/select/group/select-group.js +67 -0
  364. package/dist/components/select/group/select-group.js.map +1 -0
  365. package/dist/components/select/group/select-group.mjs +35 -0
  366. package/dist/components/select/group/select-group.mjs.map +1 -0
  367. package/dist/components/select/group/select-group.props.d.mts +10 -0
  368. package/dist/components/select/group/select-group.props.d.ts +10 -0
  369. package/dist/components/select/group/select-group.props.js +33 -0
  370. package/dist/components/select/group/select-group.props.js.map +1 -0
  371. package/dist/components/select/group/select-group.props.mjs +9 -0
  372. package/dist/components/select/group/select-group.props.mjs.map +1 -0
  373. package/dist/components/select/index.d.mts +22 -0
  374. package/dist/components/select/index.d.ts +22 -0
  375. package/dist/components/select/index.js +29 -0
  376. package/dist/components/select/index.js.map +1 -0
  377. package/dist/components/select/index.mjs +5 -0
  378. package/dist/components/select/index.mjs.map +1 -0
  379. package/dist/components/select/item/select-item-indicator.d.mts +5 -0
  380. package/dist/components/select/item/select-item-indicator.d.ts +5 -0
  381. package/dist/components/select/item/select-item-indicator.js +50 -0
  382. package/dist/components/select/item/select-item-indicator.js.map +1 -0
  383. package/dist/components/select/item/select-item-indicator.mjs +26 -0
  384. package/dist/components/select/item/select-item-indicator.mjs.map +1 -0
  385. package/dist/components/select/item/select-item.d.mts +14 -0
  386. package/dist/components/select/item/select-item.d.ts +14 -0
  387. package/dist/components/select/item/select-item.js +120 -0
  388. package/dist/components/select/item/select-item.js.map +1 -0
  389. package/dist/components/select/item/select-item.mjs +88 -0
  390. package/dist/components/select/item/select-item.mjs.map +1 -0
  391. package/dist/components/select/item/select-item.props.d.mts +14 -0
  392. package/dist/components/select/item/select-item.props.d.ts +14 -0
  393. package/dist/components/select/item/select-item.props.js +37 -0
  394. package/dist/components/select/item/select-item.props.js.map +1 -0
  395. package/dist/components/select/item/select-item.props.mjs +13 -0
  396. package/dist/components/select/item/select-item.props.mjs.map +1 -0
  397. package/dist/components/select/label/select-label.d.mts +15 -0
  398. package/dist/components/select/label/select-label.d.ts +15 -0
  399. package/dist/components/select/label/select-label.js +69 -0
  400. package/dist/components/select/label/select-label.js.map +1 -0
  401. package/dist/components/select/label/select-label.mjs +37 -0
  402. package/dist/components/select/label/select-label.mjs.map +1 -0
  403. package/dist/components/select/label/select-label.props.d.mts +15 -0
  404. package/dist/components/select/label/select-label.props.d.ts +15 -0
  405. package/dist/components/select/label/select-label.props.js +39 -0
  406. package/dist/components/select/label/select-label.props.js.map +1 -0
  407. package/dist/components/select/label/select-label.props.mjs +14 -0
  408. package/dist/components/select/label/select-label.props.mjs.map +1 -0
  409. package/dist/components/select/root/select-root.d.mts +21 -0
  410. package/dist/components/select/root/select-root.d.ts +21 -0
  411. package/dist/components/select/root/select-root.js +195 -0
  412. package/dist/components/select/root/select-root.js.map +1 -0
  413. package/dist/components/select/root/select-root.mjs +175 -0
  414. package/dist/components/select/root/select-root.mjs.map +1 -0
  415. package/dist/components/select/root/select-root.props.d.mts +33 -0
  416. package/dist/components/select/root/select-root.props.d.ts +33 -0
  417. package/dist/components/select/root/select-root.props.js +57 -0
  418. package/dist/components/select/root/select-root.props.js.map +1 -0
  419. package/dist/components/select/root/select-root.props.mjs +33 -0
  420. package/dist/components/select/root/select-root.props.mjs.map +1 -0
  421. package/dist/components/select/select-context.d.mts +33 -0
  422. package/dist/components/select/select-context.d.ts +33 -0
  423. package/dist/components/select/select-context.js +52 -0
  424. package/dist/components/select/select-context.js.map +1 -0
  425. package/dist/components/select/select-context.mjs +17 -0
  426. package/dist/components/select/select-context.mjs.map +1 -0
  427. package/dist/components/select/select.d.mts +43 -0
  428. package/dist/components/select/select.d.ts +43 -0
  429. package/dist/components/select/select.js +46 -0
  430. package/dist/components/select/select.js.map +1 -0
  431. package/dist/components/select/select.mjs +22 -0
  432. package/dist/components/select/select.mjs.map +1 -0
  433. package/dist/components/select/separator/select-separator.d.mts +7 -0
  434. package/dist/components/select/separator/select-separator.d.ts +7 -0
  435. package/dist/components/select/separator/select-separator.js +55 -0
  436. package/dist/components/select/separator/select-separator.js.map +1 -0
  437. package/dist/components/select/separator/select-separator.mjs +21 -0
  438. package/dist/components/select/separator/select-separator.mjs.map +1 -0
  439. package/dist/components/select/trigger/select-trigger-icon.d.mts +5 -0
  440. package/dist/components/select/trigger/select-trigger-icon.d.ts +5 -0
  441. package/dist/components/select/trigger/select-trigger-icon.js +64 -0
  442. package/dist/components/select/trigger/select-trigger-icon.js.map +1 -0
  443. package/dist/components/select/trigger/select-trigger-icon.mjs +30 -0
  444. package/dist/components/select/trigger/select-trigger-icon.mjs.map +1 -0
  445. package/dist/components/select/trigger/select-trigger.d.mts +18 -0
  446. package/dist/components/select/trigger/select-trigger.d.ts +18 -0
  447. package/dist/components/select/trigger/select-trigger.js +119 -0
  448. package/dist/components/select/trigger/select-trigger.js.map +1 -0
  449. package/dist/components/select/trigger/select-trigger.mjs +87 -0
  450. package/dist/components/select/trigger/select-trigger.mjs.map +1 -0
  451. package/dist/components/select/trigger/select-trigger.props.d.mts +7 -0
  452. package/dist/components/select/trigger/select-trigger.props.d.ts +7 -0
  453. package/dist/components/select/trigger/select-trigger.props.js +29 -0
  454. package/dist/components/select/trigger/select-trigger.props.js.map +1 -0
  455. package/dist/components/select/trigger/select-trigger.props.mjs +5 -0
  456. package/dist/components/select/trigger/select-trigger.props.mjs.map +1 -0
  457. package/dist/components/select/utils/user-composed-refs.d.mts +5 -0
  458. package/dist/components/select/utils/user-composed-refs.d.ts +5 -0
  459. package/dist/components/select/utils/user-composed-refs.js +53 -0
  460. package/dist/components/select/utils/user-composed-refs.js.map +1 -0
  461. package/dist/components/select/utils/user-composed-refs.mjs +19 -0
  462. package/dist/components/select/utils/user-composed-refs.mjs.map +1 -0
  463. package/dist/components/select/value/select-value.d.mts +8 -0
  464. package/dist/components/select/value/select-value.d.ts +8 -0
  465. package/dist/components/select/value/select-value.js +61 -0
  466. package/dist/components/select/value/select-value.js.map +1 -0
  467. package/dist/components/select/value/select-value.mjs +27 -0
  468. package/dist/components/select/value/select-value.mjs.map +1 -0
  469. package/dist/components/select/viewport/select-viewport.d.mts +7 -0
  470. package/dist/components/select/viewport/select-viewport.d.ts +7 -0
  471. package/dist/components/select/viewport/select-viewport.js +49 -0
  472. package/dist/components/select/viewport/select-viewport.js.map +1 -0
  473. package/dist/components/select/viewport/select-viewport.mjs +15 -0
  474. package/dist/components/select/viewport/select-viewport.mjs.map +1 -0
  475. package/dist/components/separator/index.d.mts +6 -0
  476. package/dist/components/separator/index.d.ts +6 -0
  477. package/dist/components/separator/index.js +29 -0
  478. package/dist/components/separator/index.js.map +1 -0
  479. package/dist/components/separator/index.mjs +5 -0
  480. package/dist/components/separator/index.mjs.map +1 -0
  481. package/dist/components/separator/separator.d.mts +15 -0
  482. package/dist/components/separator/separator.d.ts +15 -0
  483. package/dist/components/separator/separator.js +57 -0
  484. package/dist/components/separator/separator.js.map +1 -0
  485. package/dist/components/separator/separator.mjs +23 -0
  486. package/dist/components/separator/separator.mjs.map +1 -0
  487. package/dist/components/separator/separator.props.d.mts +29 -0
  488. package/dist/components/separator/separator.props.d.ts +29 -0
  489. package/dist/components/separator/separator.props.js +54 -0
  490. package/dist/components/separator/separator.props.js.map +1 -0
  491. package/dist/components/separator/separator.props.mjs +30 -0
  492. package/dist/components/separator/separator.props.mjs.map +1 -0
  493. package/dist/components/switch/index.d.mts +15 -0
  494. package/dist/components/switch/index.d.ts +15 -0
  495. package/dist/components/switch/index.js +29 -0
  496. package/dist/components/switch/index.js.map +1 -0
  497. package/dist/components/switch/index.mjs +5 -0
  498. package/dist/components/switch/index.mjs.map +1 -0
  499. package/dist/components/switch/indicator/switch-indicator.d.mts +15 -0
  500. package/dist/components/switch/indicator/switch-indicator.d.ts +15 -0
  501. package/dist/components/switch/indicator/switch-indicator.js +97 -0
  502. package/dist/components/switch/indicator/switch-indicator.js.map +1 -0
  503. package/dist/components/switch/indicator/switch-indicator.mjs +65 -0
  504. package/dist/components/switch/indicator/switch-indicator.mjs.map +1 -0
  505. package/dist/components/switch/indicator/switch-indicator.props.d.mts +15 -0
  506. package/dist/components/switch/indicator/switch-indicator.props.d.ts +15 -0
  507. package/dist/components/switch/indicator/switch-indicator.props.js +39 -0
  508. package/dist/components/switch/indicator/switch-indicator.props.js.map +1 -0
  509. package/dist/components/switch/indicator/switch-indicator.props.mjs +15 -0
  510. package/dist/components/switch/indicator/switch-indicator.props.mjs.map +1 -0
  511. package/dist/components/switch/label/switch-label.d.mts +15 -0
  512. package/dist/components/switch/label/switch-label.d.ts +15 -0
  513. package/dist/components/switch/label/switch-label.js +69 -0
  514. package/dist/components/switch/label/switch-label.js.map +1 -0
  515. package/dist/components/switch/label/switch-label.mjs +37 -0
  516. package/dist/components/switch/label/switch-label.mjs.map +1 -0
  517. package/dist/components/switch/label/switch-label.props.d.mts +20 -0
  518. package/dist/components/switch/label/switch-label.props.d.ts +20 -0
  519. package/dist/components/switch/label/switch-label.props.js +44 -0
  520. package/dist/components/switch/label/switch-label.props.js.map +1 -0
  521. package/dist/components/switch/label/switch-label.props.mjs +19 -0
  522. package/dist/components/switch/label/switch-label.props.mjs.map +1 -0
  523. package/dist/components/switch/root/switch-root.d.mts +23 -0
  524. package/dist/components/switch/root/switch-root.d.ts +23 -0
  525. package/dist/components/switch/root/switch-root.js +180 -0
  526. package/dist/components/switch/root/switch-root.js.map +1 -0
  527. package/dist/components/switch/root/switch-root.mjs +163 -0
  528. package/dist/components/switch/root/switch-root.mjs.map +1 -0
  529. package/dist/components/switch/root/switch-root.props.d.mts +76 -0
  530. package/dist/components/switch/root/switch-root.props.d.ts +76 -0
  531. package/dist/components/switch/root/switch-root.props.js +103 -0
  532. package/dist/components/switch/root/switch-root.props.js.map +1 -0
  533. package/dist/components/switch/root/switch-root.props.mjs +78 -0
  534. package/dist/components/switch/root/switch-root.props.mjs.map +1 -0
  535. package/dist/components/switch/switch-context.d.mts +26 -0
  536. package/dist/components/switch/switch-context.d.ts +26 -0
  537. package/dist/components/switch/switch-context.js +52 -0
  538. package/dist/components/switch/switch-context.js.map +1 -0
  539. package/dist/components/switch/switch-context.mjs +17 -0
  540. package/dist/components/switch/switch-context.mjs.map +1 -0
  541. package/dist/components/switch/switch.d.mts +24 -0
  542. package/dist/components/switch/switch.d.ts +24 -0
  543. package/dist/components/switch/switch.js +36 -0
  544. package/dist/components/switch/switch.js.map +1 -0
  545. package/dist/components/switch/switch.mjs +12 -0
  546. package/dist/components/switch/switch.mjs.map +1 -0
  547. package/dist/components/text/index.d.mts +7 -0
  548. package/dist/components/text/index.d.ts +7 -0
  549. package/dist/components/text/index.js +29 -0
  550. package/dist/components/text/index.js.map +1 -0
  551. package/dist/components/text/index.mjs +5 -0
  552. package/dist/components/text/index.mjs.map +1 -0
  553. package/dist/components/text/text.d.mts +25 -0
  554. package/dist/components/text/text.d.ts +25 -0
  555. package/dist/components/text/text.js +66 -0
  556. package/dist/components/text/text.js.map +1 -0
  557. package/dist/components/text/text.mjs +36 -0
  558. package/dist/components/text/text.mjs.map +1 -0
  559. package/dist/components/text/text.props.d.mts +24 -0
  560. package/dist/components/text/text.props.d.ts +24 -0
  561. package/dist/components/text/text.props.js +48 -0
  562. package/dist/components/text/text.props.js.map +1 -0
  563. package/dist/components/text/text.props.mjs +24 -0
  564. package/dist/components/text/text.props.mjs.map +1 -0
  565. package/dist/components/theme/index.d.mts +8 -0
  566. package/dist/components/theme/index.d.ts +8 -0
  567. package/dist/components/theme/index.js +35 -0
  568. package/dist/components/theme/index.js.map +1 -0
  569. package/dist/components/theme/index.mjs +9 -0
  570. package/dist/components/theme/index.mjs.map +1 -0
  571. package/dist/components/theme/theme-context.d.mts +25 -0
  572. package/dist/components/theme/theme-context.d.ts +25 -0
  573. package/dist/components/theme/theme-context.js +52 -0
  574. package/dist/components/theme/theme-context.js.map +1 -0
  575. package/dist/components/theme/theme-context.mjs +17 -0
  576. package/dist/components/theme/theme-context.mjs.map +1 -0
  577. package/dist/components/theme/theme-control.d.mts +9 -0
  578. package/dist/components/theme/theme-control.d.ts +9 -0
  579. package/dist/components/theme/theme-control.js +156 -0
  580. package/dist/components/theme/theme-control.js.map +1 -0
  581. package/dist/components/theme/theme-control.mjs +132 -0
  582. package/dist/components/theme/theme-control.mjs.map +1 -0
  583. package/dist/components/theme/theme.d.mts +14 -0
  584. package/dist/components/theme/theme.d.ts +14 -0
  585. package/dist/components/theme/theme.js +132 -0
  586. package/dist/components/theme/theme.js.map +1 -0
  587. package/dist/components/theme/theme.mjs +100 -0
  588. package/dist/components/theme/theme.mjs.map +1 -0
  589. package/dist/components/theme/theme.props.d.mts +24 -0
  590. package/dist/components/theme/theme.props.d.ts +24 -0
  591. package/dist/components/theme/theme.props.js +54 -0
  592. package/dist/components/theme/theme.props.js.map +1 -0
  593. package/dist/components/theme/theme.props.mjs +30 -0
  594. package/dist/components/theme/theme.props.mjs.map +1 -0
  595. package/dist/icons/check-mark.icon.d.mts +6 -0
  596. package/dist/icons/check-mark.icon.d.ts +6 -0
  597. package/dist/icons/check-mark.icon.js +51 -0
  598. package/dist/icons/check-mark.icon.js.map +1 -0
  599. package/dist/icons/check-mark.icon.mjs +27 -0
  600. package/dist/icons/check-mark.icon.mjs.map +1 -0
  601. package/dist/icons/chevron-down.icon.d.mts +6 -0
  602. package/dist/icons/chevron-down.icon.d.ts +6 -0
  603. package/dist/icons/chevron-down.icon.js +53 -0
  604. package/dist/icons/chevron-down.icon.js.map +1 -0
  605. package/dist/icons/chevron-down.icon.mjs +29 -0
  606. package/dist/icons/chevron-down.icon.mjs.map +1 -0
  607. package/dist/icons/chevron-left.icon.d.mts +6 -0
  608. package/dist/icons/chevron-left.icon.d.ts +6 -0
  609. package/dist/icons/chevron-left.icon.js +53 -0
  610. package/dist/icons/chevron-left.icon.js.map +1 -0
  611. package/dist/icons/chevron-left.icon.mjs +29 -0
  612. package/dist/icons/chevron-left.icon.mjs.map +1 -0
  613. package/dist/icons/chevron-right.icon.d.mts +6 -0
  614. package/dist/icons/chevron-right.icon.d.ts +6 -0
  615. package/dist/icons/chevron-right.icon.js +53 -0
  616. package/dist/icons/chevron-right.icon.js.map +1 -0
  617. package/dist/icons/chevron-right.icon.mjs +29 -0
  618. package/dist/icons/chevron-right.icon.mjs.map +1 -0
  619. package/dist/icons/chevron-up.icon.d.mts +6 -0
  620. package/dist/icons/chevron-up.icon.d.ts +6 -0
  621. package/dist/icons/chevron-up.icon.js +51 -0
  622. package/dist/icons/chevron-up.icon.js.map +1 -0
  623. package/dist/icons/chevron-up.icon.mjs +27 -0
  624. package/dist/icons/chevron-up.icon.mjs.map +1 -0
  625. package/dist/icons/icon-colors.d.mts +7 -0
  626. package/dist/icons/icon-colors.d.ts +7 -0
  627. package/dist/icons/icon-colors.js +34 -0
  628. package/dist/icons/icon-colors.js.map +1 -0
  629. package/dist/icons/icon-colors.mjs +10 -0
  630. package/dist/icons/icon-colors.mjs.map +1 -0
  631. package/dist/icons/index.d.mts +4 -0
  632. package/dist/icons/index.d.ts +4 -0
  633. package/dist/icons/index.js +32 -0
  634. package/dist/icons/index.js.map +1 -0
  635. package/dist/icons/index.mjs +7 -0
  636. package/dist/icons/index.mjs.map +1 -0
  637. package/dist/icons/minus.icon.d.mts +6 -0
  638. package/dist/icons/minus.icon.d.ts +6 -0
  639. package/dist/icons/minus.icon.js +51 -0
  640. package/dist/icons/minus.icon.js.map +1 -0
  641. package/dist/icons/minus.icon.mjs +27 -0
  642. package/dist/icons/minus.icon.mjs.map +1 -0
  643. package/dist/index.css +79 -67
  644. package/dist/index.d.mts +81 -1524
  645. package/dist/index.d.ts +81 -1524
  646. package/dist/index.js +59 -3757
  647. package/dist/index.js.map +1 -1
  648. package/dist/index.mjs +18 -3738
  649. package/dist/index.mjs.map +1 -1
  650. package/dist/props/align.prop.d.mts +16 -0
  651. package/dist/props/align.prop.d.ts +16 -0
  652. package/dist/props/align.prop.js +41 -0
  653. package/dist/props/align.prop.js.map +1 -0
  654. package/dist/props/align.prop.mjs +16 -0
  655. package/dist/props/align.prop.mjs.map +1 -0
  656. package/dist/props/color.prop.d.mts +26 -0
  657. package/dist/props/color.prop.d.ts +26 -0
  658. package/dist/props/color.prop.js +60 -0
  659. package/dist/props/color.prop.js.map +1 -0
  660. package/dist/props/color.prop.mjs +35 -0
  661. package/dist/props/color.prop.mjs.map +1 -0
  662. package/dist/props/direction.prop.d.mts +11 -0
  663. package/dist/props/direction.prop.d.ts +11 -0
  664. package/dist/props/direction.prop.js +39 -0
  665. package/dist/props/direction.prop.js.map +1 -0
  666. package/dist/props/direction.prop.mjs +14 -0
  667. package/dist/props/direction.prop.mjs.map +1 -0
  668. package/dist/props/index.d.mts +11 -0
  669. package/dist/props/index.d.ts +11 -0
  670. package/dist/props/index.js +82 -0
  671. package/dist/props/index.js.map +1 -0
  672. package/dist/props/index.mjs +43 -0
  673. package/dist/props/index.mjs.map +1 -0
  674. package/dist/props/margin.prop.d.mts +135 -0
  675. package/dist/props/margin.prop.d.ts +135 -0
  676. package/dist/props/margin.prop.js +177 -0
  677. package/dist/props/margin.prop.js.map +1 -0
  678. package/dist/props/margin.prop.mjs +153 -0
  679. package/dist/props/margin.prop.mjs.map +1 -0
  680. package/dist/props/padding.prop.d.mts +135 -0
  681. package/dist/props/padding.prop.d.ts +135 -0
  682. package/dist/props/padding.prop.js +169 -0
  683. package/dist/props/padding.prop.js.map +1 -0
  684. package/dist/props/padding.prop.mjs +145 -0
  685. package/dist/props/padding.prop.mjs.map +1 -0
  686. package/dist/props/prop-def.d.mts +66 -0
  687. package/dist/props/prop-def.d.ts +66 -0
  688. package/dist/props/prop-def.js +18 -0
  689. package/dist/props/prop-def.js.map +1 -0
  690. package/dist/props/prop-def.mjs +2 -0
  691. package/dist/props/prop-def.mjs.map +1 -0
  692. package/dist/props/radius.prop.d.mts +177 -0
  693. package/dist/props/radius.prop.d.ts +177 -0
  694. package/dist/props/radius.prop.js +211 -0
  695. package/dist/props/radius.prop.js.map +1 -0
  696. package/dist/props/radius.prop.mjs +186 -0
  697. package/dist/props/radius.prop.mjs.map +1 -0
  698. package/dist/props/roundness.prop.d.mts +23 -0
  699. package/dist/props/roundness.prop.d.ts +23 -0
  700. package/dist/props/roundness.prop.js +48 -0
  701. package/dist/props/roundness.prop.js.map +1 -0
  702. package/dist/props/roundness.prop.mjs +23 -0
  703. package/dist/props/roundness.prop.mjs.map +1 -0
  704. package/dist/props/size.prop.d.mts +19 -0
  705. package/dist/props/size.prop.d.ts +19 -0
  706. package/dist/props/size.prop.js +44 -0
  707. package/dist/props/size.prop.js.map +1 -0
  708. package/dist/props/size.prop.mjs +19 -0
  709. package/dist/props/size.prop.mjs.map +1 -0
  710. package/dist/props/spacing.prop.d.mts +24 -0
  711. package/dist/props/spacing.prop.d.ts +24 -0
  712. package/dist/props/spacing.prop.js +49 -0
  713. package/dist/props/spacing.prop.js.map +1 -0
  714. package/dist/props/spacing.prop.mjs +24 -0
  715. package/dist/props/spacing.prop.mjs.map +1 -0
  716. package/dist/utils/filter-children.d.mts +50 -0
  717. package/dist/utils/filter-children.d.ts +50 -0
  718. package/dist/utils/filter-children.js +121 -0
  719. package/dist/utils/filter-children.js.map +1 -0
  720. package/dist/utils/filter-children.mjs +86 -0
  721. package/dist/utils/filter-children.mjs.map +1 -0
  722. package/dist/utils/get-component-props.d.mts +14 -0
  723. package/dist/utils/get-component-props.d.ts +14 -0
  724. package/dist/utils/get-component-props.js +126 -0
  725. package/dist/utils/get-component-props.js.map +1 -0
  726. package/dist/utils/get-component-props.mjs +92 -0
  727. package/dist/utils/get-component-props.mjs.map +1 -0
  728. package/dist/utils/get-props.d.mts +29 -0
  729. package/dist/utils/get-props.d.ts +29 -0
  730. package/dist/utils/get-props.js +17 -0
  731. package/dist/utils/get-props.js.map +1 -0
  732. package/dist/utils/get-props.mjs +1 -0
  733. package/dist/utils/get-props.mjs.map +1 -0
  734. package/dist/utils/parse-color.d.mts +14 -0
  735. package/dist/utils/parse-color.d.ts +14 -0
  736. package/dist/utils/parse-color.js +49 -0
  737. package/dist/utils/parse-color.js.map +1 -0
  738. package/dist/utils/parse-color.mjs +25 -0
  739. package/dist/utils/parse-color.mjs.map +1 -0
  740. package/dist/utils/use-controllable-state.d.mts +7 -0
  741. package/dist/utils/use-controllable-state.d.ts +7 -0
  742. package/dist/utils/use-controllable-state.js +58 -0
  743. package/dist/utils/use-controllable-state.js.map +1 -0
  744. package/dist/utils/use-controllable-state.mjs +24 -0
  745. package/dist/utils/use-controllable-state.mjs.map +1 -0
  746. package/package.json +2 -1
  747. package/dist/index.css.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,3742 +1,22 @@
1
- "use client";
2
-
3
- // src/components/accordion/content/accordion-content.tsx
4
- import clsx2 from "clsx";
5
-
6
- // src/utils/get-component-props.ts
7
- import clsx from "clsx";
8
- function getComponentProps(props, ...propDefs) {
9
- let style = props.style ?? {};
10
- const classNames = props.className ? [props.className] : [];
11
- const dataAttrs = {};
12
- const extractedProps = {};
13
- const allProps = Object.assign({}, ...propDefs);
14
- const propKeys = Object.keys(allProps);
15
- const restProps = { ...props };
16
- delete restProps.className;
17
- delete restProps.style;
18
- for (const key of propKeys) {
19
- const prop = allProps[key];
20
- const value = props?.[key];
21
- delete restProps[key];
22
- if (prop.type === "boolean" || prop.type === "string" || prop.type === "number" || prop.type === "value | array" || prop.type === "reactNode" || prop.type === "function") {
23
- extractedProps[key] = value;
24
- if (prop.cssProperty) {
25
- if (value !== void 0 && value !== null) {
26
- style = {
27
- ...style,
28
- [prop.cssProperty]: prop.type === "boolean" ? value ? "1" : "0" : value
29
- };
30
- } else if (prop.default !== void 0) {
31
- style = {
32
- ...style,
33
- [prop.cssProperty]: prop.type === "boolean" ? prop.default ? "1" : "0" : prop.default
34
- };
35
- }
36
- }
37
- if (prop.dataAttr) {
38
- if (value) dataAttrs[`data-${prop.dataAttr}`] = value;
39
- else if (prop.default !== void 0) {
40
- dataAttrs[`data-${prop.dataAttr}`] = prop.default;
41
- }
42
- }
43
- continue;
44
- }
45
- const applyValue = (propValue, breakpoint) => {
46
- const usedBreakpoint = breakpoint ? `-${breakpoint}` : "";
47
- if (prop.type === "enum" || prop.type === "enum | string") {
48
- if (propValue !== null && propValue !== void 0) {
49
- if (!breakpoint) extractedProps[key] = propValue;
50
- if (!prop.values.includes(propValue)) {
51
- const transformedValue = "transform" in prop && prop.transform ? prop.transform(propValue) : propValue;
52
- if (prop.className) {
53
- classNames.push(
54
- breakpoint ? `${prop.className}-${breakpoint}` : prop.className
55
- );
56
- style = {
57
- ...style,
58
- [`--custom-${key}${usedBreakpoint}`]: transformedValue
59
- };
60
- }
61
- if (prop.dataAttr) {
62
- dataAttrs[`data-${prop.dataAttr}${usedBreakpoint}`] = propValue;
63
- }
64
- } else if (prop.dataAttr) {
65
- if (propValue === "inherit" && prop.className) {
66
- classNames.push(prop.className);
67
- }
68
- dataAttrs[`data-${prop.dataAttr}${usedBreakpoint}`] = propValue;
69
- }
70
- } else if (prop.dataAttr && prop.default) {
71
- if (!breakpoint) extractedProps[key] = prop.default;
72
- if (prop.dataAttr) {
73
- dataAttrs[`data-${prop.dataAttr}${usedBreakpoint}`] = prop.default;
74
- }
75
- }
76
- }
77
- };
78
- if ("responsive" in prop && prop.responsive && value && typeof value === "object" && !Array.isArray(value)) {
79
- for (const [bp, bpValue] of Object.entries(value)) {
80
- applyValue(bpValue, bp);
81
- }
82
- if ("dataAttr" in prop && prop.dataAttr) {
83
- dataAttrs[`data-${prop.dataAttr}`] = "";
84
- }
85
- } else applyValue(value);
86
- }
87
- return {
88
- ...restProps,
89
- ...extractedProps,
90
- style,
91
- dataAttrs,
92
- className: clsx(classNames)
93
- };
94
- }
95
-
96
- // src/components/accordion/accordion-context.ts
97
- import React from "react";
98
- var AccordionContext = React.createContext(null);
99
- function useAccordionContext() {
100
- const context = React.useContext(AccordionContext);
101
- if (!context) {
102
- throw new Error(
103
- "Accordion components must be used within an Accordion.Root"
104
- );
105
- }
106
- return context;
107
- }
108
-
109
- // src/components/accordion/content/accordion-content.props.ts
110
- var AccordionContentPropDefs = {
111
- //
112
- };
113
-
114
- // src/components/accordion/content/accordion-content.tsx
115
- import { jsx } from "react/jsx-runtime";
116
- var AccordionContent = (props) => {
117
- const context = useAccordionContext();
118
- const { className, children, dataAttrs, ...rest } = getComponentProps(
119
- props,
120
- AccordionContentPropDefs
121
- );
122
- return /* @__PURE__ */ jsx(
123
- "div",
124
- {
125
- "data-variant": context.variant,
126
- className: clsx2("accordion-content", className),
127
- ...rest,
128
- children: /* @__PURE__ */ jsx("div", { className: "accordion-content-inner", children: /* @__PURE__ */ jsx("div", { children }) })
129
- }
130
- );
131
- };
132
- AccordionContent.displayName = "Accordion.Content";
133
-
134
- // src/components/accordion/header/accordion-header.tsx
135
- import clsx3 from "clsx";
136
-
137
- // src/icons/icon-colors.ts
138
- var colorMap = {
139
- currentColor: "currentColor",
140
- primary: "rgb(var(--primary))",
141
- white: "white",
142
- black: "black"
143
- };
144
-
145
- // src/icons/chevron-down.icon.tsx
146
- import { jsx as jsx2 } from "react/jsx-runtime";
147
- var ChevronDown = ({
148
- color = "currentColor"
149
- }) => {
150
- return /* @__PURE__ */ jsx2(
151
- "svg",
152
- {
153
- width: "20",
154
- height: "20",
155
- viewBox: "0 0 15 15",
156
- fill: "none",
157
- xmlns: "http://www.w3.org/2000/svg",
158
- children: /* @__PURE__ */ jsx2(
159
- "path",
160
- {
161
- fill: colorMap[color],
162
- d: "M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z",
163
- fillRule: "evenodd",
164
- clipRule: "evenodd"
165
- }
166
- )
167
- }
168
- );
169
- };
170
-
171
- // src/components/accordion/header/accordion-header.props.ts
172
- var AccordionHeaderPropDefs = {
173
- /** The value of the parent AccordionItem — injected automatically */
174
- value: {
175
- type: "string"
176
- }
177
- };
178
-
179
- // src/components/accordion/header/accordion-header.tsx
180
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
181
- var AccordionHeader = (props) => {
182
- const context = useAccordionContext();
183
- const { className, children, value, dataAttrs, ...rest } = getComponentProps(
184
- props,
185
- AccordionHeaderPropDefs
186
- );
187
- const itemOpen = context.multiple ? context.value?.includes(value ?? "") : context.value === value;
188
- const handleClick = () => {
189
- if (!value) return;
190
- if (context.multiple) {
191
- const current = context.value ?? [];
192
- const next = current.includes(value) ? current.filter((v) => v !== value) : [...current, value];
193
- context.setValue(next.length ? next : null);
194
- } else {
195
- context.setValue(context.value === value ? null : value);
196
- }
197
- };
198
- return /* @__PURE__ */ jsxs(
199
- "div",
200
- {
201
- "data-open": itemOpen,
202
- "data-variant": context.variant,
203
- className: clsx3("accordion-header", className),
204
- role: "button",
205
- tabIndex: 0,
206
- onClick: handleClick,
207
- onKeyDown: (e) => {
208
- if (e.key === "Enter" || e.key === " ") {
209
- e.preventDefault();
210
- handleClick();
211
- }
212
- },
213
- ...rest,
214
- children: [
215
- /* @__PURE__ */ jsx3("span", { children }),
216
- /* @__PURE__ */ jsx3("span", { className: "accordion-header-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx3(ChevronDown, {}) })
217
- ]
218
- }
219
- );
220
- };
221
- AccordionHeader.displayName = "Accordion.Header";
222
-
223
- // src/components/accordion/item/accordion-item.tsx
224
- import clsx4 from "clsx";
225
- import React3, { useEffect, useMemo } from "react";
226
-
227
- // src/utils/filter-children.ts
228
- import * as React2 from "react";
229
- function filterChildren(children, allowedDisplayNames, options = {}) {
230
- const { parentDisplayName, strict = false } = options;
231
- return React2.Children.toArray(children).filter((child) => {
232
- if (!React2.isValidElement(child)) return false;
233
- const childType = child.type;
234
- const displayName = childType?.displayName;
235
- if (!displayName || !allowedDisplayNames.includes(displayName)) {
236
- const parent = parentDisplayName ?? "Component";
237
- const childName = displayName || "Unknown";
238
- const allowed = allowedDisplayNames.join(", ");
239
- const message = `${parent}: Invalid child "${childName}"${strict ? "" : " was filtered out"}. Only ${allowed} are allowed as direct children.`;
240
- if (strict) throw new Error(message);
241
- console.warn(message);
242
- return false;
243
- }
244
- return true;
245
- });
246
- }
247
-
248
- // src/components/accordion/item/accordion-item.props.ts
249
- var AccordionItemPropDefs = {
250
- /**
251
- * Sets the accordion item to be open by default.
252
- */
253
- open: {
254
- type: "boolean"
255
- },
256
- /**
257
- * The value of the accordion item. Automatically generated if not provided.
258
- */
259
- value: {
260
- type: "string"
261
- }
262
- };
263
-
264
- // src/components/accordion/item/accordion-item.tsx
265
- import { jsxs as jsxs2 } from "react/jsx-runtime";
266
- var ALLOWED_CHILDREN = [
267
- AccordionHeader.displayName,
268
- AccordionContent.displayName
269
- ];
270
- var AccordionItem = (props) => {
271
- const context = useAccordionContext();
272
- const { open, value, className, dataAttrs, ...rest } = getComponentProps(
273
- props,
274
- AccordionItemPropDefs
275
- );
276
- const itemOpen = open ?? (context.multiple ? context.value?.includes(value ?? "") : context.value === value);
277
- const validChildren = filterChildren(props.children, ALLOWED_CHILDREN, {
278
- parentDisplayName: AccordionItem.displayName
279
- });
280
- const { header, content } = useMemo(() => {
281
- const header2 = validChildren.find(
282
- (child) => child.type.displayName === AccordionHeader.displayName
283
- );
284
- const content2 = validChildren.find(
285
- (child) => child.type.displayName === AccordionContent.displayName
286
- );
287
- return { header: header2, content: content2 };
288
- }, [validChildren]);
289
- useEffect(() => {
290
- if (!value) return;
291
- return () => {
292
- const values = context.itemValues.current;
293
- const index = values.indexOf(value);
294
- if (index > -1) values.splice(index, 1);
295
- };
296
- }, [value]);
297
- const headerWithValue = header ? React3.cloneElement(header, {
298
- value
299
- }) : null;
300
- return /* @__PURE__ */ jsxs2(
301
- "div",
302
- {
303
- "data-variant": context.variant,
304
- className: clsx4("accordion-item", className),
305
- ...rest,
306
- "data-open": itemOpen,
307
- children: [
308
- headerWithValue,
309
- content
310
- ]
311
- }
312
- );
313
- };
314
- AccordionItem.displayName = "Accordion.Item";
315
-
316
- // src/components/accordion/root/accordion-root.tsx
317
- import clsx5 from "clsx";
318
- import { useMemo as useMemo2, useRef } from "react";
319
-
320
- // src/props/align.prop.ts
321
- var Alignments = ["start", "center", "end"];
322
- var AlignPropDef = {
323
- /**
324
- * The alignment of the component.
325
- */
326
- align: {
327
- type: "enum",
328
- values: Alignments,
329
- dataAttr: "align"
330
- }
331
- };
332
-
333
- // src/utils/parse-color.ts
334
- function parseColor(value) {
335
- const trimmed = value.trim();
336
- const hexMatch = trimmed.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);
337
- if (hexMatch) {
338
- let hex = hexMatch[1];
339
- if (hex.length === 3) {
340
- hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
341
- }
342
- const r = parseInt(hex.slice(0, 2), 16);
343
- const g = parseInt(hex.slice(2, 4), 16);
344
- const b = parseInt(hex.slice(4, 6), 16);
345
- return `${r}, ${g}, ${b}`;
346
- }
347
- const rgbMatch = trimmed.match(
348
- /^rgba?\(\s*(\d{1,3})\s*[,\s]\s*(\d{1,3})\s*[,\s]\s*(\d{1,3})\s*(?:[,/]\s*[\d.]+%?\s*)?\)$/
349
- );
350
- if (rgbMatch) {
351
- return `${rgbMatch[1]}, ${rgbMatch[2]}, ${rgbMatch[3]}`;
352
- }
353
- return trimmed;
354
- }
355
-
356
- // src/props/color.prop.ts
357
- var Colors = [
358
- "primary",
359
- "secondary",
360
- "tertiary",
361
- "accent",
362
- "success",
363
- "warning",
364
- "danger",
365
- "info"
366
- ];
367
- var ColorPropDef = {
368
- /**
369
- * Sets the color of the component.
370
- *
371
- * Uses predefined theme colors ("primary", "secondary", etc.) or accepts custom color values in hex, rgb, or raw rgb formats.
372
- *
373
- * @example color="primary" // primary color
374
- * @example color="#7BEB34" // hex color
375
- * @example color="rgb(125, 235, 52)" // rgb color
376
- * @example color="125, 235, 52" // raw rgb values
377
- */
378
- color: {
379
- type: "enum | string",
380
- values: Colors,
381
- dataAttr: "color",
382
- className: "color",
383
- transform: parseColor
384
- }
385
- };
386
-
387
- // src/props/margin.prop.ts
388
- var marginValues = [
389
- "auto",
390
- "inherit",
391
- "-8",
392
- "-6",
393
- "-5",
394
- "-4",
395
- "-3",
396
- "-2",
397
- "-1",
398
- "0",
399
- "1",
400
- "2",
401
- "3",
402
- "4",
403
- "5",
404
- "6",
405
- "8"
406
- ];
407
- var MarginPropDefs = {
408
- /**
409
- * Sets margin on all sides of the element.
410
- * Supports scale, auto, inherit, custom, and responsive values.
411
- *
412
- * @example m="4" // 16px margin on all sides
413
- * @example m="-26px" // -26px negative margin custom value
414
- * @example m={{ initial: "2", md: "4", lg: "8" }} // responsive margins
415
- *
416
- * @link
417
- * https://developer.mozilla.org/en-US/docs/Web/CSS/margin
418
- */
419
- m: {
420
- type: "enum | string",
421
- values: marginValues,
422
- dataAttr: "m",
423
- className: "lcs-m",
424
- responsive: true
425
- },
426
- /**
427
- * Sets margin on the top of the element.
428
- * Supports scale, auto, inherit, custom, and responsive values.
429
- *
430
- * @example mt="4" // 16px margin on all sides
431
- * @example mt="-26px" // -26px negative margin custom value
432
- * @example mt={{ initial: "2", md: "4", lg: "8" }} // responsive margins
433
- *
434
- * @link
435
- * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top
436
- */
437
- mt: {
438
- type: "enum | string",
439
- values: marginValues,
440
- dataAttr: "mt",
441
- className: "lcs-mt",
442
- responsive: true
443
- },
444
- /**
445
- * Sets margin on the bottom of the element.
446
- * Supports scale, auto, inherit, custom, and responsive values.
447
- *
448
- * @example mb="4" // 16px margin on all sides
449
- * @example mb="-26px" // -26px negative margin custom value
450
- * @example mb={{ initial: "2", md: "4", lg: "8" }} // responsive margins
451
- *
452
- * @link
453
- * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom
454
- */
455
- mb: {
456
- type: "enum | string",
457
- values: marginValues,
458
- dataAttr: "mb",
459
- className: "lcs-mb",
460
- responsive: true
461
- },
462
- /**
463
- * Sets margin on the left of the element.
464
- * Supports scale, auto, inherit, custom, and responsive values.
465
- *
466
- * @example ml="4" // 16px margin on all sides
467
- * @example ml="-26px" // -26px negative margin custom value
468
- * @example ml={{ initial: "2", md: "4", lg: "8" }} // responsive margins
469
- *
470
- * @link
471
- * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left
472
- */
473
- ml: {
474
- type: "enum | string",
475
- values: marginValues,
476
- dataAttr: "ml",
477
- className: "lcs-ml",
478
- responsive: true
479
- },
480
- /**
481
- * Sets margin on the right of the element.
482
- * Supports scale, auto, inherit, custom, and responsive values.
483
- *
484
- * @example mr="4" // 16px margin on all sides
485
- * @example mr="-26px" // -26px negative margin custom value
486
- * @example mr={{ initial: "2", md: "4", lg: "8" }} // responsive margins
487
- *
488
- * @link
489
- * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right
490
- */
491
- mr: {
492
- type: "enum | string",
493
- values: marginValues,
494
- dataAttr: "mr",
495
- className: "lcs-mr",
496
- responsive: true
497
- },
498
- /**
499
- * Sets margin on the left and right (horizontal) sides of the element.
500
- * Supports scale, auto, inherit, custom, and responsive values.
501
- *
502
- * @example mx="4" // 16px horizontal margin
503
- * @example mx="-26px" // -26px negative horizontal margin custom value
504
- * @example mx={{ initial: "2", md: "4", lg: "8" }} // responsive horizontal margins
505
- *
506
- * @link
507
- * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left
508
- * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right
509
- */
510
- mx: {
511
- type: "enum | string",
512
- values: marginValues,
513
- dataAttr: "mx",
514
- className: "lcs-mx",
515
- responsive: true
516
- },
517
- /**
518
- * Sets margin on the top and bottom (vertical) sides of the element.
519
- * Supports scale, auto, inherit, custom, and responsive values.
520
- *
521
- * @example my="4" // 16px vertical margin
522
- * @example my="-26px" // -26px negative vertical margin custom value
523
- * @example my={{ initial: "2", md: "4", lg: "8" }} // responsive vertical margins
524
- *
525
- * @link
526
- * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top
527
- * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom
528
- */
529
- my: {
530
- type: "enum | string",
531
- values: marginValues,
532
- dataAttr: "my",
533
- className: "lcs-my",
534
- responsive: true
535
- }
536
- };
537
-
538
- // src/props/padding.prop.ts
539
- var paddingValues = [
540
- "inherit",
541
- "0",
542
- "1",
543
- "2",
544
- "3",
545
- "4",
546
- "5",
547
- "6",
548
- "8"
549
- ];
550
- var PaddingPropDefs = {
551
- /**
552
- * Sets padding on all sides of the element.
553
- * Supports scale, inherit, custom, and responsive values.
554
- *
555
- * @example p="4" // 16px padding on all sides
556
- * @example p="26px" // 26px padding custom value
557
- * @example p={{ initial: "2", md: "4", lg: "8" }} // responsive padding
558
- *
559
- * @link
560
- * https://developer.mozilla.org/en-US/docs/Web/CSS/padding
561
- */
562
- p: {
563
- type: "enum | string",
564
- values: paddingValues,
565
- dataAttr: "p",
566
- className: "lcs-p",
567
- responsive: true
568
- },
569
- /**
570
- * Sets padding on the top of the element.
571
- * Supports scale, inherit, custom, and responsive values.
572
- *
573
- * @example pt="4" // 16px top padding
574
- * @example pt="26px" // 26px top padding custom value
575
- * @example pt={{ initial: "2", md: "4", lg: "8" }} // responsive top padding
576
- *
577
- * @link
578
- * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top
579
- */
580
- pt: {
581
- type: "enum | string",
582
- values: paddingValues,
583
- dataAttr: "pt",
584
- className: "lcs-pt",
585
- responsive: true
586
- },
587
- /**
588
- * Sets padding on the bottom of the element.
589
- * Supports scale, inherit, custom, and responsive values.
590
- *
591
- * @example pb="4" // 16px bottom padding
592
- * @example pb="26px" // 26px bottom padding custom value
593
- * @example pb={{ initial: "2", md: "4", lg: "8" }} // responsive bottom padding
594
- *
595
- * @link
596
- * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom
597
- */
598
- pb: {
599
- type: "enum | string",
600
- values: paddingValues,
601
- dataAttr: "pb",
602
- className: "lcs-pb",
603
- responsive: true
604
- },
605
- /**
606
- * Sets padding on the left of the element.
607
- * Supports scale, inherit, custom, and responsive values.
608
- *
609
- * @example pl="4" // 16px left padding
610
- * @example pl="26px" // 26px left padding custom value
611
- * @example pl={{ initial: "2", md: "4", lg: "8" }} // responsive left padding
612
- *
613
- * @link
614
- * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left
615
- */
616
- pl: {
617
- type: "enum | string",
618
- values: paddingValues,
619
- dataAttr: "pl",
620
- className: "lcs-pl",
621
- responsive: true
622
- },
623
- /**
624
- * Sets padding on the right of the element.
625
- * Supports scale, inherit, custom, and responsive values.
626
- *
627
- * @example pr="4" // 16px right padding
628
- * @example pr="26px" // 26px right padding custom value
629
- * @example pr={{ initial: "2", md: "4", lg: "8" }} // responsive right padding
630
- *
631
- * @link
632
- * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right
633
- */
634
- pr: {
635
- type: "enum | string",
636
- values: paddingValues,
637
- dataAttr: "pr",
638
- className: "lcs-pr",
639
- responsive: true
640
- },
641
- /**
642
- * Sets padding on the left and right (horizontal) sides of the element.
643
- * Supports scale, inherit, custom, and responsive values.
644
- *
645
- * @example px="4" // 16px horizontal padding
646
- * @example px="26px" // 26px horizontal padding custom value
647
- * @example px={{ initial: "2", md: "4", lg: "8" }} // responsive horizontal padding
648
- *
649
- * @link
650
- * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left
651
- * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right
652
- */
653
- px: {
654
- type: "enum | string",
655
- values: paddingValues,
656
- dataAttr: "px",
657
- className: "lcs-px",
658
- responsive: true
659
- },
660
- /**
661
- * Sets padding on the top and bottom (vertical) sides of the element.
662
- * Supports scale, inherit, custom, and responsive values.
663
- *
664
- * @example py="4" // 16px vertical padding
665
- * @example py="26px" // 26px vertical padding custom value
666
- * @example py={{ initial: "2", md: "4", lg: "8" }} // responsive vertical padding
667
- *
668
- * @link
669
- * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top
670
- * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom
671
- */
672
- py: {
673
- type: "enum | string",
674
- values: paddingValues,
675
- dataAttr: "py",
676
- className: "lcs-py",
677
- responsive: true
678
- }
679
- };
680
-
681
- // src/props/radius.prop.ts
682
- var radii = [
683
- "none",
684
- "xs",
685
- "sm",
686
- "md",
687
- "lg",
688
- "xl",
689
- "full",
690
- "inherit"
691
- ];
692
- var RadiusPropDefs = {
693
- /**
694
- * Sets the border-radius of the element.
695
- * Supports scaled, inherit, custom, and responsive values.
696
- *
697
- * @example radius="md" // medium border-radius
698
- * @example radius="26px" // 26px border-radius custom value
699
- * @example radius={{ initial: "none", lg: "full" }} // responsive border-radius
700
- *
701
- * @default "theme" // uses the theme's default border-radius value or none if not set
702
- *
703
- * @link
704
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
705
- */
706
- radius: {
707
- type: "enum | string",
708
- values: radii,
709
- default: "theme",
710
- dataAttr: "radius",
711
- className: "lcs-radius",
712
- responsive: true
713
- },
714
- /**
715
- * Sets the top border-radius of the element.
716
- * Supports scaled, inherit, custom, and responsive values.
717
- *
718
- * @example radius-t="md" // medium border-radius
719
- * @example radius-t="26px" // 26px border-radius custom value
720
- * @example radius-t={{ initial: "none", lg: "full" }} // responsive border-radius
721
- *
722
- * @link
723
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius
724
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius
725
- */
726
- "radius-t": {
727
- type: "enum | string",
728
- values: radii,
729
- dataAttr: "radius-t",
730
- className: "lcs-radius-t",
731
- responsive: true
732
- },
733
- /**
734
- * Sets the right border-radius of the element.
735
- * Supports scaled, inherit, custom, and responsive values.
736
- *
737
- * @example radius-r="md" // medium border-radius
738
- * @example radius-r="26px" // 26px border-radius custom value
739
- * @example radius-r={{ initial: "none", lg: "full" }} // responsive border-radius
740
- *
741
- * @link
742
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius
743
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius
744
- */
745
- "radius-r": {
746
- type: "enum | string",
747
- values: radii,
748
- dataAttr: "radius-r",
749
- className: "lcs-radius-r",
750
- responsive: true
751
- },
752
- /**
753
- * Sets the bottom border-radius of the element.
754
- * Supports scaled, inherit, custom, and responsive values.
755
- *
756
- * @example radius-b="md" // medium border-radius
757
- * @example radius-b="26px" // 26px border-radius custom value
758
- * @example radius-b={{ initial: "none", lg: "full" }} // responsive border-radius
759
- *
760
- * @link
761
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius
762
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius
763
- */
764
- "radius-b": {
765
- type: "enum | string",
766
- values: radii,
767
- dataAttr: "radius-b",
768
- className: "lcs-radius-b",
769
- responsive: true
770
- },
771
- /**
772
- * Sets the left border-radius of the element.
773
- * Supports scaled, inherit, custom, and responsive values.
774
- *
775
- * @example radius-l="md" // medium border-radius
776
- * @example radius-l="26px" // 26px border-radius custom value
777
- * @example radius-l={{ initial: "none", lg: "full" }} // responsive border-radius
778
- *
779
- * @link
780
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-top-radius
781
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-bottom-radius
782
- */
783
- "radius-l": {
784
- type: "enum | string",
785
- values: radii,
786
- dataAttr: "radius-l",
787
- className: "lcs-radius-l",
788
- responsive: true
789
- },
790
- /**
791
- * Sets the top-left border-radius of the element.
792
- * Supports scaled, inherit, custom, and responsive values.
793
- *
794
- * @example radius-tl="md" // medium border-radius
795
- * @example radius-tl="26px" // 26px border-radius custom value
796
- * @example radius-tl={{ initial: "none", lg: "full" }} // responsive border-radius
797
- *
798
- * @link
799
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius
800
- */
801
- "radius-tl": {
802
- type: "enum | string",
803
- values: radii,
804
- dataAttr: "radius-tl",
805
- className: "lcs-radius-tl",
806
- responsive: true
807
- },
808
- /**
809
- * Sets the top-right border-radius of the element.
810
- * Supports scaled, inherit, custom, and responsive values.
811
- *
812
- * @example "radius-tr"="md" // medium border-radius
813
- * @example "radius-tr"="26px" // 26px border-radius custom value
814
- * @example "radius-tr"={{ initial: "none", lg: "full" }} // responsive border-radius
815
- *
816
- * @link
817
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius
818
- */
819
- "radius-tr": {
820
- type: "enum | string",
821
- values: radii,
822
- dataAttr: "radius-tr",
823
- className: "lcs-radius-tr",
824
- responsive: true
825
- },
826
- /**
827
- * Sets the bottom-right border-radius of the element.
828
- * Supports scaled, inherit, custom, and responsive values.
829
- *
830
- * @example "radius-br"="md" // medium border-radius
831
- * @example "radius-br"="26px" // 26px border-radius custom value
832
- * @example "radius-br"={{ initial: "none", lg: "full" }} // responsive border-radius
833
- *
834
- * @link
835
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius
836
- */
837
- "radius-br": {
838
- type: "enum | string",
839
- values: radii,
840
- dataAttr: "radius-br",
841
- className: "lcs-radius-br",
842
- responsive: true
843
- },
844
- /**
845
- * Sets the bottom-left border-radius of the element.
846
- * Supports scaled, inherit, custom, and responsive values.
847
- *
848
- * @example "radius-bl"="md" // medium border-radius
849
- * @example "radius-bl"="26px" // 26px border-radius custom value
850
- * @example "radius-bl"={{ initial: "none", lg: "full" }} // responsive border-radius
851
- *
852
- * @link
853
- * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius
854
- */
855
- "radius-bl": {
856
- type: "enum | string",
857
- values: radii,
858
- dataAttr: "radius-bl",
859
- className: "lcs-radius-bl",
860
- responsive: true
861
- }
862
- };
863
-
864
- // src/props/roundness.prop.ts
865
- var roundness = ["1", "2", "3", "4", "5", "6", "inherit"];
866
- var RoundnessPropDef = {
867
- /**
868
- * Sets the roundness multiplier for the element's radius.
869
- * Supports scaled and inherit values.
870
- *
871
- * @example roundness="4" // 8px base roundness
872
- * @example roundness="inherit" // inherits roundness from parent
873
- *
874
- * @default "theme" // uses the theme's default roundness value or none if not set
875
- */
876
- roundness: {
877
- type: "enum",
878
- values: roundness,
879
- default: "theme",
880
- dataAttr: "roundness"
881
- }
882
- };
883
-
884
- // src/props/size.prop.ts
885
- var Sizes = ["xs", "sm", "md", "lg", "xl"];
886
- var SizePropDef = {
887
- /**
888
- * Sets the size of the component.
889
- *
890
- * @example size="md" // medium sized component
891
- */
892
- size: {
893
- type: "enum | string",
894
- values: Sizes,
895
- dataAttr: "size",
896
- className: "size"
897
- }
898
- };
899
-
900
- // src/props/spacing.prop.ts
901
- var spacingValues = ["xs", "sm", "md", "lg", "xl", "inherit"];
902
- var SpacingPropDef = {
903
- /**
904
- * Sets the spacing scale for the component.
905
- * This multiplier affects various layout properties such as margin, padding, and gap values.
906
- *
907
- * @example spacing="md" // medium spacing scale (1)
908
- * @example spacing={{ initial: "sm", lg: "xl" }} // responsive spacing
909
- *
910
- * @default "theme" // uses the theme's default spacing value or none if not set
911
- */
912
- spacing: {
913
- type: "enum",
914
- values: spacingValues,
915
- dataAttr: "spacing",
916
- default: "theme",
917
- responsive: true
918
- }
919
- };
920
-
921
- // src/utils/use-controllable-state.ts
922
- import * as React4 from "react";
923
- function useControllableState({
924
- value,
925
- defaultValue,
926
- onChange
927
- }) {
928
- const [state, setState] = React4.useState(defaultValue);
929
- const isControlled = value !== void 0;
930
- const current = isControlled ? value : state;
931
- const set = React4.useCallback(
932
- (value2) => {
933
- if (!isControlled) setState(value2);
934
- onChange?.(value2);
935
- },
936
- [isControlled, onChange]
937
- );
938
- return [current, set];
939
- }
940
-
941
- // src/components/accordion/root/accordion-root.props.ts
942
- var AccordionVariants = ["solid", "outlined", "muted"];
943
- var AccordionRootPropsDefs = {
944
- /**
945
- * Sets the variant style of the accordion ("solid", "outlined", or "muted").
946
- */
947
- variant: {
948
- type: "enum",
949
- values: AccordionVariants,
950
- dataAttr: "variant"
951
- },
952
- /**
953
- * Allows multiple accordion items to be expanded simultaneously when set to true.
954
- */
955
- multiple: {
956
- type: "boolean"
957
- },
958
- /**
959
- * The value of the accordion.
960
- */
961
- value: {
962
- type: "value | array"
963
- },
964
- /**
965
- * Callback fired when the value of the accordion changes.
966
- */
967
- onValueChange: {
968
- type: "function"
969
- }
970
- };
971
-
972
- // src/components/accordion/root/accordion-root.tsx
973
- import { jsx as jsx4 } from "react/jsx-runtime";
974
- var ALLOWED_CHILDREN2 = [AccordionItem.displayName];
975
- var AccordionRoot = (props) => {
976
- const {
977
- variant,
978
- multiple,
979
- size,
980
- value: propValue,
981
- onValueChange,
982
- className,
983
- dataAttrs,
984
- ...rest
985
- } = getComponentProps(props, AccordionRootPropsDefs, SizePropDef);
986
- const [value, setValue] = useControllableState({
987
- value: propValue,
988
- defaultValue: propValue ?? null,
989
- onChange: onValueChange
990
- });
991
- const validChildren = filterChildren(props.children, ALLOWED_CHILDREN2, {
992
- parentDisplayName: AccordionRoot.displayName
993
- });
994
- const itemsRef = useRef(/* @__PURE__ */ new Map());
995
- const itemValues = useRef([]);
996
- const contextValue = useMemo2(
997
- () => ({
998
- variant,
999
- multiple,
1000
- value,
1001
- setValue,
1002
- onValueChange,
1003
- itemsRef,
1004
- itemValues
1005
- }),
1006
- [variant, multiple, value, setValue, onValueChange]
1007
- );
1008
- return /* @__PURE__ */ jsx4(AccordionContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx4(
1009
- "div",
1010
- {
1011
- className: clsx5("accordion-root", className),
1012
- ...dataAttrs,
1013
- ...rest,
1014
- children: validChildren.map((child, index) => /* @__PURE__ */ jsx4(
1015
- AccordionItem,
1016
- {
1017
- value: child.props.value ?? String(index),
1018
- ...child.props,
1019
- children: child.props.children
1020
- },
1021
- index
1022
- ))
1023
- }
1024
- ) });
1025
- };
1026
- AccordionRoot.displayName = "Accordion";
1027
-
1028
- // src/components/accordion/accordion.tsx
1029
- var Accordion = Object.assign(AccordionRoot, {
1030
- Root: AccordionRoot,
1031
- Item: AccordionItem,
1032
- Header: AccordionHeader,
1033
- Content: AccordionContent
1034
- });
1035
-
1036
- // src/components/badge/badge.tsx
1037
- import clsx6 from "clsx";
1038
-
1039
- // src/components/badge/badge.props.ts
1040
- var BadgeVariants = ["solid", "outlined", "muted", "clear"];
1041
- var BadgeRootPropsDefs = {
1042
- /**
1043
- * Sets the variant style of the badge ("solid", "outlined", "muted", or "clear").
1044
- */
1045
- variant: {
1046
- type: "enum",
1047
- values: BadgeVariants,
1048
- dataAttr: "variant"
1049
- }
1050
- };
1051
-
1052
- // src/components/badge/badge.tsx
1053
- import { jsx as jsx5 } from "react/jsx-runtime";
1054
- var Badge = (props) => {
1055
- const { color, variant, className, dataAttrs, ...rest } = getComponentProps(
1056
- props,
1057
- BadgeRootPropsDefs,
1058
- MarginPropDefs,
1059
- PaddingPropDefs,
1060
- RadiusPropDefs,
1061
- SizePropDef
1062
- );
1063
- return /* @__PURE__ */ jsx5(
1064
- "div",
1065
- {
1066
- className: clsx6("badge", className),
1067
- "data-color": color ?? true,
1068
- "data-variant": variant,
1069
- ...dataAttrs,
1070
- ...rest,
1071
- children: props.children
1072
- }
1073
- );
1074
- };
1075
-
1076
- // src/components/box/box.tsx
1077
- import clsx7 from "clsx";
1078
- import * as React5 from "react";
1079
-
1080
- // src/components/box/box.props.ts
1081
- var BoxPropsDefs = {
1082
- /**
1083
- * Defines wether the Box is rendered as a **div** or **span**.
1084
- *
1085
- * @example
1086
- * as="div"
1087
- * as="span"
1088
- */
1089
- // as: {
1090
- // type: "enum",
1091
- // values: boxAs,
1092
- // default: "div",
1093
- // } satisfies PropDef<(typeof boxAs)[number]>,
1094
- };
1095
-
1096
- // src/components/box/box.tsx
1097
- import { jsx as jsx6 } from "react/jsx-runtime";
1098
- var Box = React5.forwardRef((props, ref) => {
1099
- const { className, dataAttrs, children, ...rest } = getComponentProps(
1100
- props,
1101
- BoxPropsDefs,
1102
- MarginPropDefs,
1103
- PaddingPropDefs,
1104
- SpacingPropDef,
1105
- RadiusPropDefs,
1106
- RoundnessPropDef
1107
- );
1108
- return /* @__PURE__ */ jsx6(
1109
- "div",
1110
- {
1111
- ref,
1112
- ...dataAttrs,
1113
- className: clsx7("lcs-box", className),
1114
- ...rest,
1115
- children
1116
- }
1117
- );
1118
- });
1119
- Box.displayName = "Box";
1120
-
1121
- // src/components/button/button.tsx
1122
- import clsx8 from "clsx";
1123
- import { useState as useState2 } from "react";
1124
-
1125
- // src/components/button/button.props.ts
1126
- var ButtonVariants = ["solid", "outlined", "muted", "clear"];
1127
- var ButtonRootPropsDefs = {
1128
- /**
1129
- * Sets the variant style of the button ("solid", "outlined", "muted", or "clear").
1130
- */
1131
- variant: {
1132
- type: "enum",
1133
- values: ButtonVariants,
1134
- dataAttr: "variant"
1135
- },
1136
- /**
1137
- * Enables high contrast mode for better visibility.
1138
- * @default undefined
1139
- */
1140
- highContrast: {
1141
- type: "boolean",
1142
- dataAttr: "high-contrast"
1143
- },
1144
- /**
1145
- * Disables the button component.
1146
- * @default undefined
1147
- */
1148
- disabled: {
1149
- type: "boolean",
1150
- dataAttr: "disabled"
1151
- },
1152
- /**
1153
- * Makes the button read-only.
1154
- * @default undefined
1155
- */
1156
- readonly: {
1157
- type: "boolean",
1158
- dataAttr: "readonly"
1159
- }
1160
- };
1161
-
1162
- // src/components/button/button.tsx
1163
- import { jsx as jsx7 } from "react/jsx-runtime";
1164
- var Button = (props) => {
1165
- const {
1166
- color,
1167
- variant,
1168
- className,
1169
- dataAttrs,
1170
- disabled,
1171
- highContrast,
1172
- readonly,
1173
- ...rest
1174
- } = getComponentProps(
1175
- props,
1176
- ButtonRootPropsDefs,
1177
- ColorPropDef,
1178
- MarginPropDefs,
1179
- PaddingPropDefs,
1180
- RadiusPropDefs,
1181
- SizePropDef
1182
- );
1183
- const [hovered, setHovered] = useState2(false);
1184
- return /* @__PURE__ */ jsx7(
1185
- "button",
1186
- {
1187
- className: clsx8("button", className),
1188
- "data-color": color ?? true,
1189
- "data-variant": variant,
1190
- "data-disabled": disabled ? true : void 0,
1191
- "data-high-contrast": highContrast ? true : void 0,
1192
- "data-readonly": readonly ? true : void 0,
1193
- "data-hovered": hovered ? true : void 0,
1194
- ...dataAttrs,
1195
- disabled: disabled || readonly,
1196
- onMouseEnter: () => setHovered(true),
1197
- onMouseLeave: () => setHovered(false),
1198
- ...rest,
1199
- children: /* @__PURE__ */ jsx7("span", { children: props.children })
1200
- }
1201
- );
1202
- };
1203
-
1204
- // src/components/checkbox/indicator/checkbox-indicator.tsx
1205
- import clsx9 from "clsx";
1206
- import React7 from "react";
1207
-
1208
- // src/icons/check-mark.icon.tsx
1209
- import { jsx as jsx8 } from "react/jsx-runtime";
1210
- var CheckMark = ({ color = "currentColor" }) => {
1211
- return /* @__PURE__ */ jsx8(
1212
- "svg",
1213
- {
1214
- width: "64",
1215
- height: "64",
1216
- viewBox: "0 0 15 15",
1217
- fill: "none",
1218
- xmlns: "http://www.w3.org/2000/svg",
1219
- children: /* @__PURE__ */ jsx8(
1220
- "path",
1221
- {
1222
- d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
1223
- fill: colorMap[color],
1224
- fillRule: "evenodd",
1225
- clipRule: "evenodd"
1226
- }
1227
- )
1228
- }
1229
- );
1230
- };
1231
-
1232
- // src/icons/minus.icon.tsx
1233
- import { jsx as jsx9 } from "react/jsx-runtime";
1234
- var Minus = ({ color = "currentColor" }) => {
1235
- return /* @__PURE__ */ jsx9(
1236
- "svg",
1237
- {
1238
- width: "64",
1239
- height: "64",
1240
- viewBox: "0 0 15 15",
1241
- fill: "none",
1242
- xmlns: "http://www.w3.org/2000/svg",
1243
- children: /* @__PURE__ */ jsx9(
1244
- "path",
1245
- {
1246
- d: "M3.5 7.5C3.5 7.08579 3.83579 6.75 4.25 6.75H10.75C11.1642 6.75 11.5 7.08579 11.5 7.5C11.5 7.91421 11.1642 8.25 10.75 8.25H4.25C3.83579 8.25 3.5 7.91421 3.5 7.5Z",
1247
- fill: colorMap[color],
1248
- fillRule: "evenodd",
1249
- clipRule: "evenodd"
1250
- }
1251
- )
1252
- }
1253
- );
1254
- };
1255
-
1256
- // src/components/checkbox/checkbox-context.ts
1257
- import React6 from "react";
1258
- var CheckboxContext = React6.createContext(
1259
- null
1260
- );
1261
- function useCheckboxContext() {
1262
- const context = React6.useContext(CheckboxContext);
1263
- if (!context) {
1264
- throw new Error("Checkbox components must be used within a Checkbox.Root");
1265
- }
1266
- return context;
1267
- }
1268
-
1269
- // src/components/checkbox/root/checkbox-root.props.ts
1270
- var CheckboxVariants = ["solid", "outlined", "muted"];
1271
- var CheckboxRootPropsDefs = {
1272
- /**
1273
- * Sets the variant style of the checkbox ("solid" or "outlined").
1274
- */
1275
- variant: {
1276
- type: "enum",
1277
- values: CheckboxVariants,
1278
- dataAttr: "variant"
1279
- },
1280
- /**
1281
- * Sets the checked state of the checkbox.
1282
- *
1283
- * When using an uncontrolled checkbox, use `defaultChecked` instead.
1284
- * @default undefined
1285
- */
1286
- checked: {
1287
- type: "boolean",
1288
- dataAttr: "checked"
1289
- },
1290
- /**
1291
- * Sets the indeterminate state of the checkbox.
1292
- * @default undefined
1293
- */
1294
- indeterminate: {
1295
- type: "boolean",
1296
- dataAttr: "indeterminate"
1297
- },
1298
- /**
1299
- * Enables high contrast mode for better visibility.
1300
- * @default undefined
1301
- */
1302
- highContrast: {
1303
- type: "boolean",
1304
- dataAttr: "high-contrast"
1305
- },
1306
- /**
1307
- * The value of the checkbox (checked state).
1308
- */
1309
- value: {
1310
- type: "boolean"
1311
- },
1312
- /**
1313
- * Sets the default checked state of the checkbox.
1314
- * @default undefined
1315
- */
1316
- defaultChecked: {
1317
- type: "boolean"
1318
- },
1319
- /**
1320
- * Disables the checkbox component.
1321
- * @default undefined
1322
- */
1323
- disabled: {
1324
- type: "boolean",
1325
- dataAttr: "disabled"
1326
- },
1327
- /**
1328
- * Makes the checkbox read-only.
1329
- * @default undefined
1330
- */
1331
- readonly: {
1332
- type: "boolean",
1333
- dataAttr: "readonly"
1334
- },
1335
- /**
1336
- * Marks the checkbox as required.
1337
- * @default undefined
1338
- */
1339
- required: {
1340
- type: "boolean",
1341
- dataAttr: "required"
1342
- },
1343
- /**
1344
- * Sets the name attribute of the checkbox input for form control.
1345
- * @default undefined
1346
- */
1347
- name: {
1348
- type: "string"
1349
- },
1350
- /**
1351
- * Callback fired when the checked state changes.
1352
- *
1353
- * @param value - The new checked state.
1354
- */
1355
- onCheckedChange: {
1356
- type: "function"
1357
- }
1358
- };
1359
-
1360
- // src/components/checkbox/indicator/checkbox-indicator.props.ts
1361
- var CheckboxIndicatorPropDefs = {
1362
- /**
1363
- * Sets the variant style of the checkbox ("solid" or "outlined").
1364
- */
1365
- variant: {
1366
- type: "enum",
1367
- values: CheckboxVariants,
1368
- dataAttr: "variant"
1369
- }
1370
- };
1371
-
1372
- // src/components/checkbox/indicator/checkbox-indicator.tsx
1373
- import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
1374
- var CheckboxIndicator = React7.forwardRef((props, ref) => {
1375
- const {
1376
- value,
1377
- setValue,
1378
- hovered,
1379
- color,
1380
- disabled,
1381
- readonly,
1382
- highContrast,
1383
- indeterminate,
1384
- variant: contextVariant
1385
- } = useCheckboxContext();
1386
- const { size, variant, className, style, dataAttrs } = getComponentProps(
1387
- props,
1388
- CheckboxIndicatorPropDefs,
1389
- SizePropDef
1390
- );
1391
- const indicatorVariant = variant || contextVariant;
1392
- const handleKeyDown = (event) => {
1393
- if (disabled || readonly) return;
1394
- if (event.key === " " || event.key === "Enter") {
1395
- event.preventDefault();
1396
- setValue(!value);
1397
- }
1398
- };
1399
- const indicatorProps = {
1400
- ...value && { "data-checked": true },
1401
- ...disabled && { "data-disabled": true },
1402
- ...readonly && { "data-readonly": true },
1403
- ...highContrast && { "data-high-contrast": true },
1404
- ...indeterminate && { "data-indeterminate": true },
1405
- ...(variant || contextVariant) && { "data-variant": indicatorVariant }
1406
- };
1407
- return /* @__PURE__ */ jsxs3(
1408
- "span",
1409
- {
1410
- ref,
1411
- style,
1412
- role: "checkbox",
1413
- "data-color": color,
1414
- "data-hovered": hovered,
1415
- "aria-disabled": disabled,
1416
- "aria-readonly": readonly,
1417
- "aria-checked": indeterminate ? "mixed" : value,
1418
- onKeyDown: handleKeyDown,
1419
- tabIndex: disabled || readonly ? -1 : 0,
1420
- className: clsx9("checkbox-indicator", className),
1421
- ...indicatorProps,
1422
- ...dataAttrs,
1423
- children: [
1424
- indeterminate && !value && /* @__PURE__ */ jsx10(
1425
- Minus,
1426
- {
1427
- color: highContrast && indicatorVariant === "solid" ? "black" : "white"
1428
- }
1429
- ),
1430
- value && /* @__PURE__ */ jsx10(
1431
- CheckMark,
1432
- {
1433
- color: highContrast && indicatorVariant === "solid" ? "black" : "white"
1434
- }
1435
- )
1436
- ]
1437
- }
1438
- );
1439
- });
1440
- CheckboxIndicator.displayName = "Checkbox.Indicator";
1441
-
1442
- // src/components/checkbox/label/checkbox-label.tsx
1443
- import clsx11 from "clsx";
1444
- import React9 from "react";
1445
-
1446
- // src/components/text/text.tsx
1447
- import clsx10 from "clsx";
1448
- import React8 from "react";
1449
-
1450
- // src/components/text/text.props.ts
1451
- var TextPropsDefs = {
1452
- disabled: {
1453
- type: "boolean",
1454
- default: false,
1455
- dataAttr: "disabled"
1456
- }
1457
- /**
1458
- * Defines wether the Text is rendered as a **p**, **span** or **div**.
1459
- *
1460
- * @example
1461
- * as="p"
1462
- * as="span"
1463
- * as="div"
1464
- */
1465
- // as: {
1466
- // type: "enum",
1467
- // values: textAs,
1468
- // default: "p",
1469
- // } satisfies PropDef<(typeof textAs)[number]>,
1470
- };
1471
-
1472
- // src/components/text/text.tsx
1473
- import { jsx as jsx11 } from "react/jsx-runtime";
1474
- var Text = React8.forwardRef(
1475
- (props, ref) => {
1476
- const { className, dataAttrs, children, ...rest } = getComponentProps(
1477
- props,
1478
- TextPropsDefs,
1479
- MarginPropDefs,
1480
- PaddingPropDefs,
1481
- ColorPropDef
1482
- );
1483
- return /* @__PURE__ */ jsx11("p", { ref, ...dataAttrs, className: clsx10("text", className), ...rest, children });
1484
- }
1485
- );
1486
-
1487
- // src/components/checkbox/label/checkbox-label.props.ts
1488
- var labelPositions = ["top", "left", "right", "bottom"];
1489
- var CheckboxLabelPropDefs = {
1490
- /**
1491
- * Sets the position of the label relative to the checkbox.
1492
- *
1493
- * @example position="left" // positions the label to the left of the checkbox
1494
- * @example position="top" // positions the label above the checkbox
1495
- */
1496
- position: {
1497
- type: "enum",
1498
- values: labelPositions,
1499
- dataAttr: "position"
1500
- }
1501
- };
1502
-
1503
- // src/components/checkbox/label/checkbox-label.tsx
1504
- import { jsx as jsx12 } from "react/jsx-runtime";
1505
- var CheckboxLabel = React9.forwardRef(
1506
- (props, ref) => {
1507
- const context = useCheckboxContext();
1508
- const { className, children, position } = getComponentProps(
1509
- props,
1510
- CheckboxLabelPropDefs
1511
- );
1512
- React9.useLayoutEffect(() => {
1513
- context.setLabelPosition?.(position ?? "right");
1514
- }, [position, context.setLabelPosition]);
1515
- return /* @__PURE__ */ jsx12(
1516
- "label",
1517
- {
1518
- ref,
1519
- htmlFor: context.labelId,
1520
- className: clsx11("checkbox-label", className),
1521
- ...position && { [`data-position`]: position },
1522
- children: /* @__PURE__ */ jsx12(Text, { children })
1523
- }
1524
- );
1525
- }
1526
- );
1527
- CheckboxLabel.displayName = "Checkbox.Label";
1528
-
1529
- // src/components/checkbox/root/checkbox-root.tsx
1530
- import clsx12 from "clsx";
1531
- import {
1532
- isValidElement as isValidElement2,
1533
- useId,
1534
- useMemo as useMemo3,
1535
- useState as useState3
1536
- } from "react";
1537
- import { jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
1538
- var ALLOWED_CHILDREN3 = [
1539
- CheckboxLabel.displayName,
1540
- CheckboxIndicator.displayName
1541
- ];
1542
- var CheckboxRoot = (props) => {
1543
- const {
1544
- name,
1545
- size,
1546
- color,
1547
- variant,
1548
- checked,
1549
- dataAttrs,
1550
- onCheckedChange,
1551
- value: valueProp,
1552
- disabled = false,
1553
- required = false,
1554
- readonly = false,
1555
- highContrast = false,
1556
- indeterminate = false,
1557
- defaultChecked = false
1558
- } = getComponentProps(
1559
- props,
1560
- CheckboxRootPropsDefs,
1561
- AlignPropDef,
1562
- MarginPropDefs,
1563
- SizePropDef
1564
- );
1565
- const [value, setValue] = useControllableState({
1566
- value: valueProp || checked,
1567
- defaultValue: defaultChecked,
1568
- onChange: onCheckedChange
1569
- });
1570
- const labelId = useId();
1571
- const [labelPosition, setLabelPosition] = useState3("right");
1572
- const [hovered, setHovered] = useState3(false);
1573
- const validChildren = filterChildren(props.children, ALLOWED_CHILDREN3, {
1574
- parentDisplayName: CheckboxRoot.displayName
1575
- });
1576
- const { indicator, otherChildren } = useMemo3(() => {
1577
- const indicatorIndex = validChildren.findIndex(
1578
- (child) => isValidElement2(child) && child.type.displayName === CheckboxIndicator.displayName
1579
- );
1580
- if (indicatorIndex > -1) {
1581
- return {
1582
- indicator: validChildren[indicatorIndex],
1583
- otherChildren: validChildren.filter((_, i) => i !== indicatorIndex)
1584
- };
1585
- }
1586
- return {
1587
- indicator: /* @__PURE__ */ jsx13(CheckboxIndicator, { size }),
1588
- otherChildren: validChildren
1589
- };
1590
- }, [validChildren, size]);
1591
- const contextValue = useMemo3(
1592
- () => ({
1593
- name,
1594
- value,
1595
- color,
1596
- setValue,
1597
- onCheckedChange,
1598
- labelId,
1599
- labelPosition,
1600
- setLabelPosition,
1601
- variant,
1602
- hovered,
1603
- setHovered,
1604
- disabled,
1605
- readonly,
1606
- required,
1607
- indeterminate,
1608
- highContrast
1609
- }),
1610
- [
1611
- name,
1612
- value,
1613
- color,
1614
- onCheckedChange,
1615
- setValue,
1616
- labelId,
1617
- labelPosition,
1618
- hovered,
1619
- disabled,
1620
- readonly,
1621
- required,
1622
- indeterminate,
1623
- highContrast
1624
- ]
1625
- );
1626
- const handleClick = () => {
1627
- if (disabled || readonly) return;
1628
- setValue(!value);
1629
- };
1630
- return /* @__PURE__ */ jsx13(CheckboxContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs4(
1631
- "div",
1632
- {
1633
- className: clsx12("checkbox-root", props.className),
1634
- onClick: () => handleClick(),
1635
- onMouseEnter: () => setHovered(true),
1636
- onMouseLeave: () => setHovered(false),
1637
- ...dataAttrs,
1638
- children: [
1639
- indicator,
1640
- otherChildren,
1641
- name && /* @__PURE__ */ jsx13("input", { type: "hidden", name, value: String(value) })
1642
- ]
1643
- }
1644
- ) });
1645
- };
1646
- CheckboxRoot.displayName = "Checkbox";
1647
-
1648
- // src/components/checkbox/checkbox.tsx
1649
- var Checkbox = Object.assign(CheckboxRoot, {
1650
- Root: CheckboxRoot,
1651
- Label: CheckboxLabel,
1652
- Indicator: CheckboxIndicator
1653
- });
1654
-
1655
- // src/components/container/container.tsx
1656
- import clsx13 from "clsx";
1657
- import * as React11 from "react";
1658
- import { jsx as jsx14 } from "react/jsx-runtime";
1659
- var Container = React11.forwardRef((props, ref) => {
1660
- const { className, children, direction, ...rest } = props;
1661
- return /* @__PURE__ */ jsx14(
1662
- "div",
1663
- {
1664
- ref,
1665
- "data-direction": direction,
1666
- className: clsx13(className, "lcs-container"),
1667
- ...rest,
1668
- children
1669
- }
1670
- );
1671
- });
1672
- Container.displayName = "Container";
1673
-
1674
- // src/components/flex/flex.tsx
1675
- import clsx14 from "clsx";
1676
- import * as React12 from "react";
1677
-
1678
- // src/components/flex/flex.props.ts
1679
- var FlexGapValues = ["0", "1", "2", "3", "4", "5", "6", "8"];
1680
- var FlexDirectionValues = [
1681
- "row",
1682
- "row-reverse",
1683
- "column",
1684
- "column-reverse"
1685
- ];
1686
- var FlexJustifyValues = [
1687
- "start",
1688
- "end",
1689
- "center",
1690
- "between",
1691
- "around",
1692
- "evenly"
1693
- ];
1694
- var FlexAlignValues = [
1695
- "start",
1696
- "end",
1697
- "center",
1698
- "stretch",
1699
- "baseline"
1700
- ];
1701
- var FlexWrapValues = ["nowrap", "wrap", "wrap-reverse"];
1702
- var FlexPropsDefs = {
1703
- /**
1704
- * Sets the gap between flex items.
1705
- */
1706
- gap: {
1707
- type: "enum | string",
1708
- values: FlexGapValues,
1709
- dataAttr: "gap",
1710
- responsive: true
1711
- },
1712
- /**
1713
- * Sets the justification of flex items along the main axis.
1714
- */
1715
- justify: {
1716
- type: "enum",
1717
- values: FlexJustifyValues,
1718
- dataAttr: "justify",
1719
- responsive: true
1720
- },
1721
- /**
1722
- * Sets the direction of flex items.
1723
- */
1724
- direction: {
1725
- type: "enum",
1726
- values: FlexDirectionValues,
1727
- dataAttr: "direction",
1728
- responsive: true
1729
- },
1730
- /**
1731
- * Sets the alignment of flex items along the cross axis.
1732
- */
1733
- align: {
1734
- type: "enum",
1735
- values: FlexAlignValues,
1736
- dataAttr: "align",
1737
- responsive: true
1738
- },
1739
- /**
1740
- * Sets the wrapping behavior of flex items.
1741
- */
1742
- wrap: {
1743
- type: "enum",
1744
- values: FlexWrapValues,
1745
- dataAttr: "wrap",
1746
- responsive: true
1747
- }
1748
- };
1749
-
1750
- // src/components/flex/flex.tsx
1751
- import { jsx as jsx15 } from "react/jsx-runtime";
1752
- var Flex = React12.forwardRef((props, ref) => {
1753
- const { className, dataAttrs, children, ...rest } = getComponentProps(
1754
- props,
1755
- FlexPropsDefs,
1756
- MarginPropDefs,
1757
- PaddingPropDefs,
1758
- SpacingPropDef
1759
- );
1760
- return /* @__PURE__ */ jsx15("div", { ref, className: clsx14("flex", className), ...dataAttrs, ...rest, children });
1761
- });
1762
- Flex.displayName = "Flex";
1763
-
1764
- // src/components/panel/panel.tsx
1765
- import clsx15 from "clsx";
1766
- import * as React13 from "react";
1767
-
1768
- // src/components/panel/panel.props.ts
1769
- var PanelVariants = ["solid", "outlined", "muted"];
1770
- var PanelPropsDefs = {
1771
- /**
1772
- * Sets the variant style of the panel ("solid", "outlined", or "muted").
1773
- */
1774
- variant: {
1775
- type: "enum",
1776
- values: PanelVariants,
1777
- dataAttr: "variant"
1778
- },
1779
- /**
1780
- * The blur amount applied to the panel.
1781
- *
1782
- * @example blur="4px" // Sets the backdrop blur to 4 pixels
1783
- * @default "2px"
1784
- */
1785
- blur: {
1786
- type: "string",
1787
- default: "2px",
1788
- cssProperty: "--panel-blur"
1789
- }
1790
- };
1791
-
1792
- // src/components/panel/panel.tsx
1793
- import { jsx as jsx16 } from "react/jsx-runtime";
1794
- var Panel = React13.forwardRef((props, ref) => {
1795
- const { className, dataAttrs, children, ...rest } = getComponentProps(
1796
- props,
1797
- PanelPropsDefs,
1798
- MarginPropDefs,
1799
- PaddingPropDefs,
1800
- SpacingPropDef,
1801
- RadiusPropDefs,
1802
- RoundnessPropDef,
1803
- ColorPropDef
1804
- );
1805
- return /* @__PURE__ */ jsx16(
1806
- "div",
1807
- {
1808
- ref,
1809
- className: clsx15("panel", className),
1810
- ...dataAttrs,
1811
- ...rest,
1812
- children
1813
- }
1814
- );
1815
- });
1816
- Panel.displayName = "Panel";
1817
-
1818
- // src/components/portal/backdrop/portal-backdrop.tsx
1819
- import clsx16 from "clsx";
1820
- import * as React15 from "react";
1821
-
1822
- // src/components/portal/portal-context.tsx
1823
- import * as React14 from "react";
1824
- var PortalContext = React14.createContext(
1825
- void 0
1826
- );
1827
- function usePortalContext() {
1828
- const context = React14.useContext(PortalContext);
1829
- if (!context) {
1830
- throw new Error("`usePortalContext` must be used within a `Portal.Root`");
1831
- }
1832
- return context;
1833
- }
1834
-
1835
- // src/components/portal/backdrop/portal-backdrop.props.ts
1836
- var variants = ["clear", "shadow", "blurred"];
1837
- var PortalBackdropPropsDefs = {
1838
- /**
1839
- * The visual style variant of the backdrop.
1840
- *
1841
- * @example variant="blurred" // Applies a blurred effect to the backdrop
1842
- * @default "clear"
1843
- */
1844
- variant: {
1845
- type: "enum",
1846
- values: variants,
1847
- default: "clear",
1848
- dataAttr: "variant"
1849
- },
1850
- /**
1851
- * The opacity level of the backdrop.
1852
- *
1853
- * @example opacity="0.5" // Sets the backdrop opacity to 50%
1854
- * @default "0.3"
1855
- */
1856
- opacity: {
1857
- type: "string",
1858
- default: "0.3",
1859
- cssProperty: "--backdrop-opacity"
1860
- },
1861
- /**
1862
- * The blur amount applied to the backdrop when the "blurred" variant is used.
1863
- *
1864
- * @example blur="4px" // Sets the backdrop blur to 4 pixels
1865
- * @default "2px"
1866
- */
1867
- blur: {
1868
- type: "string",
1869
- default: "2px",
1870
- cssProperty: "--backdrop-blur"
1871
- }
1872
- };
1873
-
1874
- // src/components/portal/backdrop/portal-backdrop.tsx
1875
- import { jsx as jsx17 } from "react/jsx-runtime";
1876
- var PortalBackdrop = React15.forwardRef(
1877
- (props, ref) => {
1878
- const context = usePortalContext();
1879
- const { className, dataAttrs, ...rest } = getComponentProps(
1880
- props,
1881
- PortalBackdropPropsDefs
1882
- );
1883
- if (!context.open) return null;
1884
- return /* @__PURE__ */ jsx17(
1885
- "div",
1886
- {
1887
- ref,
1888
- className: clsx16("portal-backdrop", className),
1889
- ...dataAttrs,
1890
- ...rest
1891
- }
1892
- );
1893
- }
1894
- );
1895
- PortalBackdrop.displayName = "Portal.Backdrop";
1896
-
1897
- // src/components/portal/content/portal-content.tsx
1898
- import clsx17 from "clsx";
1899
- import * as React18 from "react";
1900
- import ReactDOM from "react-dom";
1901
-
1902
- // src/components/theme/theme-context.tsx
1903
- import * as React16 from "react";
1904
- var ThemeContext = React16.createContext(
1905
- void 0
1906
- );
1907
- function useTheme() {
1908
- const context = React16.useContext(ThemeContext);
1909
- if (!context) {
1910
- throw new Error("`useTheme` must be used within a `Theme`");
1911
- }
1912
- return context;
1913
- }
1914
-
1915
- // src/components/portal/utils/use-anchor-position.ts
1916
- import * as React17 from "react";
1917
- function useAnchorPosition({
1918
- anchorRef,
1919
- contentRef,
1920
- side = "bottom",
1921
- align = "center",
1922
- sideOffset = 0,
1923
- alignOffset = 0,
1924
- enabled = true
1925
- }) {
1926
- const [position, setPosition] = React17.useState(null);
1927
- const [, _forceUpdate] = React17.useReducer((x) => x + 1, 0);
1928
- const updatePosition = React17.useCallback(() => {
1929
- const anchor = anchorRef.current;
1930
- const content = contentRef.current;
1931
- if (!anchor || !content || !enabled) {
1932
- setPosition(null);
1933
- return;
1934
- }
1935
- const anchorRect = anchor.getBoundingClientRect();
1936
- const contentRect = content.getBoundingClientRect();
1937
- let top = 0;
1938
- let left = 0;
1939
- switch (side) {
1940
- case "top":
1941
- top = anchorRect.top - contentRect.height - sideOffset;
1942
- break;
1943
- case "bottom":
1944
- top = anchorRect.bottom + sideOffset;
1945
- break;
1946
- case "left":
1947
- left = anchorRect.left - contentRect.width - sideOffset;
1948
- break;
1949
- case "right":
1950
- left = anchorRect.right + sideOffset;
1951
- break;
1952
- }
1953
- if (side === "top" || side === "bottom") {
1954
- switch (align) {
1955
- case "start":
1956
- left = anchorRect.left + alignOffset;
1957
- break;
1958
- case "center":
1959
- left = anchorRect.left + (anchorRect.width - contentRect.width) / 2 + alignOffset;
1960
- break;
1961
- case "end":
1962
- left = anchorRect.right - contentRect.width + alignOffset;
1963
- break;
1964
- }
1965
- } else {
1966
- switch (align) {
1967
- case "start":
1968
- top = anchorRect.top + alignOffset;
1969
- break;
1970
- case "center":
1971
- top = anchorRect.top + (anchorRect.height - contentRect.height) / 2 + alignOffset;
1972
- break;
1973
- case "end":
1974
- top = anchorRect.bottom - contentRect.height + alignOffset;
1975
- break;
1976
- }
1977
- }
1978
- top += window.scrollY;
1979
- left += window.scrollX;
1980
- const viewportWidth = window.innerWidth;
1981
- const viewportHeight = window.innerHeight;
1982
- left = Math.max(0, Math.min(left, viewportWidth - contentRect.width));
1983
- top = Math.max(
1984
- 0,
1985
- Math.min(top, viewportHeight - contentRect.height + window.scrollY)
1986
- );
1987
- setPosition({ top, left });
1988
- }, [anchorRef, contentRef, side, align, sideOffset, alignOffset, enabled]);
1989
- React17.useEffect(() => {
1990
- if (!enabled) {
1991
- setPosition(null);
1992
- return;
1993
- }
1994
- let attempts = 0;
1995
- const maxAttempts = 10;
1996
- const tryUpdate = () => {
1997
- attempts++;
1998
- if (anchorRef.current && contentRef.current) {
1999
- updatePosition();
2000
- } else if (attempts < maxAttempts) {
2001
- requestAnimationFrame(tryUpdate);
2002
- }
2003
- };
2004
- requestAnimationFrame(tryUpdate);
2005
- window.addEventListener("scroll", updatePosition, true);
2006
- window.addEventListener("resize", updatePosition);
2007
- return () => {
2008
- window.removeEventListener("scroll", updatePosition, true);
2009
- window.removeEventListener("resize", updatePosition);
2010
- };
2011
- }, [enabled, updatePosition, anchorRef, contentRef]);
2012
- return position;
2013
- }
2014
-
2015
- // src/components/portal/content/portal-content.props.ts
2016
- var positions = [
2017
- "tl",
2018
- "top",
2019
- "tr",
2020
- "left",
2021
- "center",
2022
- "right",
2023
- "bl",
2024
- "bottom",
2025
- "br"
2026
- ];
2027
- var anchorSides = ["top", "right", "bottom", "left"];
2028
- var PortalContentPropsDefs = {
2029
- /**
2030
- * The position of the portal content relative to the screen if no anchor is used.
2031
- *
2032
- * @example position="bl" // Portal renders at bottom-left of the screen
2033
- */
2034
- position: {
2035
- type: "enum",
2036
- values: positions,
2037
- default: "center",
2038
- dataAttr: "position"
2039
- },
2040
- /**
2041
- * Whether the portal content is anchored to an element.
2042
- *
2043
- * When anchored, the portal content is positioned relative to the trigger element unless a custom anchorRef is provided.
2044
- */
2045
- anchored: {
2046
- type: "boolean",
2047
- dataAttr: "anchored"
2048
- },
2049
- /**
2050
- * The side of the anchor element to position the portal content on.
2051
- *
2052
- * @default "bottom"
2053
- */
2054
- side: {
2055
- type: "enum",
2056
- values: anchorSides,
2057
- default: "bottom"
2058
- },
2059
- /** Offset in pixels from the anchor element along the side axis. */
2060
- sideOffset: {
2061
- type: "string"
2062
- },
2063
- /** Offset in pixels along the alignment axis. */
2064
- alignOffset: {
2065
- type: "string"
2066
- }
2067
- };
2068
-
2069
- // src/components/portal/content/portal-content.tsx
2070
- import { jsx as jsx18 } from "react/jsx-runtime";
2071
- var PortalContent = React18.forwardRef(
2072
- (props, ref) => {
2073
- const portalContext = usePortalContext();
2074
- const themeContext = React18.useContext(ThemeContext);
2075
- const contentRef = React18.useRef(null);
2076
- const {
2077
- side = "bottom",
2078
- align = "center",
2079
- sideOffset = "0",
2080
- alignOffset = "0",
2081
- anchored = false,
2082
- children,
2083
- className,
2084
- dataAttrs,
2085
- style
2086
- } = getComponentProps(props, PortalContentPropsDefs, AlignPropDef);
2087
- const anchorRef = portalContext.anchorRef ?? portalContext.triggerRef;
2088
- const anchorPosition = useAnchorPosition({
2089
- anchorRef,
2090
- contentRef,
2091
- side,
2092
- align,
2093
- sideOffset: parseInt(sideOffset, 10) || 0,
2094
- alignOffset: parseInt(alignOffset, 10) || 0,
2095
- enabled: anchored && portalContext.open
2096
- });
2097
- const setRefs = React18.useCallback(
2098
- (node) => {
2099
- contentRef.current = node;
2100
- if (typeof ref === "function") {
2101
- ref(node);
2102
- } else if (ref) {
2103
- ref.current = node;
2104
- }
2105
- },
2106
- [ref]
2107
- );
2108
- React18.useEffect(() => {
2109
- if (!portalContext.open) return;
2110
- function onKeyDown(e) {
2111
- if (e.key === "Escape") {
2112
- portalContext.onOpenChange?.(false);
2113
- }
2114
- }
2115
- document.addEventListener("keydown", onKeyDown);
2116
- return () => {
2117
- document.removeEventListener("keydown", onKeyDown);
2118
- };
2119
- }, [portalContext.open, portalContext.onOpenChange]);
2120
- React18.useEffect(() => {
2121
- if (!portalContext.open || !anchored) return;
2122
- function onClickOutside(e) {
2123
- const target = e.target;
2124
- const content2 = contentRef.current;
2125
- const trigger = (portalContext.anchorRef ?? portalContext.triggerRef)?.current;
2126
- if (content2?.contains(target) || trigger?.contains(target)) {
2127
- return;
2128
- }
2129
- portalContext.onOpenChange?.(false);
2130
- }
2131
- const timeoutId = setTimeout(() => {
2132
- document.addEventListener("click", onClickOutside);
2133
- }, 0);
2134
- return () => {
2135
- clearTimeout(timeoutId);
2136
- document.removeEventListener("click", onClickOutside);
2137
- };
2138
- }, [
2139
- portalContext.open,
2140
- portalContext.onOpenChange,
2141
- portalContext.anchorRef,
2142
- portalContext.triggerRef,
2143
- anchored
2144
- ]);
2145
- const container = portalContext.open && globalThis?.document?.body;
2146
- if (!container) return null;
2147
- const combinedStyle = {
2148
- ...style,
2149
- ...anchored && anchorPosition ? {
2150
- position: "absolute",
2151
- top: anchorPosition.top,
2152
- left: anchorPosition.left
2153
- } : {}
2154
- };
2155
- const portalContent = /* @__PURE__ */ jsx18(
2156
- "div",
2157
- {
2158
- ref: setRefs,
2159
- className: clsx17("portal", className),
2160
- "data-appearance": themeContext?.appearance,
2161
- "data-radius": themeContext?.radius,
2162
- "data-roundness": themeContext?.roundness ?? "theme",
2163
- "data-spacing": themeContext?.spacing ?? "theme",
2164
- "data-theme-radius": themeContext?.radius,
2165
- "data-theme-roundness": themeContext?.roundness,
2166
- "data-theme-spacing": themeContext?.spacing,
2167
- onClick: anchored ? void 0 : () => portalContext.onOpenChange?.(false),
2168
- style: combinedStyle,
2169
- ...dataAttrs,
2170
- children: /* @__PURE__ */ jsx18(
2171
- "div",
2172
- {
2173
- className: "portal-content",
2174
- onClick: (e) => e.stopPropagation(),
2175
- children
2176
- }
2177
- )
2178
- }
2179
- );
2180
- const content = themeContext ? /* @__PURE__ */ jsx18(ThemeContext.Provider, { value: themeContext, children: portalContent }) : portalContent;
2181
- return ReactDOM.createPortal(content, container);
2182
- }
2183
- );
2184
- PortalContent.displayName = "Portal.Content";
2185
-
2186
- // src/components/portal/root/portal-root.tsx
2187
- import * as React20 from "react";
2188
-
2189
- // src/components/portal/trigger/portal-trigger.tsx
2190
- import * as React19 from "react";
2191
- import { jsx as jsx19 } from "react/jsx-runtime";
2192
- var PortalTrigger = React19.forwardRef(
2193
- ({ children, asChild, onClick, ...props }, ref) => {
2194
- const context = usePortalContext();
2195
- const internalRef = React19.useRef(null);
2196
- React19.useEffect(() => {
2197
- if (internalRef.current) {
2198
- context.triggerRef.current = internalRef.current;
2199
- }
2200
- }, [context.triggerRef]);
2201
- const handleClick = (event) => {
2202
- context.onOpenChange?.(!context.open);
2203
- onClick?.(event);
2204
- };
2205
- const setRefs = React19.useCallback(
2206
- (node) => {
2207
- internalRef.current = node;
2208
- if (typeof ref === "function") {
2209
- ref(node);
2210
- } else if (ref) {
2211
- ref.current = node;
2212
- }
2213
- context.triggerRef.current = node;
2214
- },
2215
- [ref, context.triggerRef]
2216
- );
2217
- if (asChild && React19.isValidElement(children)) {
2218
- return React19.cloneElement(children, {
2219
- ref: setRefs,
2220
- onClick: handleClick,
2221
- ...props
2222
- });
2223
- }
2224
- return /* @__PURE__ */ jsx19(
2225
- "button",
2226
- {
2227
- ref: setRefs,
2228
- type: "button",
2229
- onClick: handleClick,
2230
- "aria-expanded": context.open,
2231
- "aria-haspopup": "dialog",
2232
- ...props,
2233
- children
2234
- }
2235
- );
2236
- }
2237
- );
2238
- PortalTrigger.displayName = "Portal.Trigger";
2239
-
2240
- // src/components/portal/root/portal-root.props.ts
2241
- var PortalRootPropsDefs = {
2242
- /** Whether the portal is open. */
2243
- open: {
2244
- type: "boolean",
2245
- default: false
2246
- },
2247
- /** Callback fired when the open state changes. */
2248
- onOpenChange: {
2249
- type: "function"
2250
- },
2251
- /** Whether the portal is open by default (uncontrolled). */
2252
- defaultOpen: {
2253
- type: "boolean",
2254
- default: false
2255
- },
2256
- /** Custom anchor element ref. If not provided, the trigger is used as anchor. */
2257
- anchorRef: {
2258
- type: "reactNode"
2259
- }
2260
- };
2261
-
2262
- // src/components/portal/root/portal-root.tsx
2263
- import { jsx as jsx20 } from "react/jsx-runtime";
2264
- var ALLOWED_CHILDREN4 = [
2265
- PortalTrigger.displayName,
2266
- PortalBackdrop.displayName,
2267
- PortalContent.displayName
2268
- ];
2269
- var PortalRoot = (props) => {
2270
- const {
2271
- defaultOpen = false,
2272
- open: portalOpen,
2273
- onOpenChange,
2274
- anchorRef,
2275
- children
2276
- } = getComponentProps(props, PortalRootPropsDefs);
2277
- const [open, setOpen] = useControllableState({
2278
- value: portalOpen,
2279
- defaultValue: defaultOpen,
2280
- onChange: onOpenChange
2281
- });
2282
- const triggerRef = React20.useRef(null);
2283
- const value = React20.useMemo(
2284
- () => ({
2285
- open,
2286
- onOpenChange: setOpen,
2287
- triggerRef,
2288
- anchorRef
2289
- }),
2290
- [open, setOpen, anchorRef]
2291
- );
2292
- const validChildren = filterChildren(children, ALLOWED_CHILDREN4, {
2293
- parentDisplayName: PortalRoot.displayName
2294
- });
2295
- return /* @__PURE__ */ jsx20(PortalContext.Provider, { value, children: validChildren });
2296
- };
2297
- PortalRoot.displayName = "Portal.Root";
2298
-
2299
- // src/components/portal/portal.tsx
2300
- var Portal = {
2301
- /** The root component that provides context for the portal. */
2302
- Root: PortalRoot,
2303
- /** The trigger element that opens the portal when interacted with. */
2304
- Trigger: PortalTrigger,
2305
- /** The content displayed inside the portal when open. */
2306
- Content: PortalContent,
2307
- /** A backdrop optionally displayed behind portal content when open. */
2308
- Backdrop: PortalBackdrop
2309
- };
2310
-
2311
- // src/components/progress-bar/fill/progress-bar-fill.tsx
2312
- import clsx18 from "clsx";
2313
- import { useContext as useContext4 } from "react";
2314
-
2315
- // src/components/progress-bar/progress-bar-context.ts
2316
- import React21 from "react";
2317
- var ProgressBarContext = React21.createContext(null);
2318
-
2319
- // src/components/progress-bar/fill/progress-bar-fill.props.ts
2320
- var ProgressBarFillPropsDefs = {
2321
- /**
2322
- * The value of the progress bar (filled state).
2323
- * Should be a number between 0 and 1 representing the percentage of completion.
2324
- */
2325
- value: {
2326
- type: "number"
2327
- }
2328
- };
2329
-
2330
- // src/components/progress-bar/fill/progress-bar-fill.tsx
2331
- import { jsx as jsx21 } from "react/jsx-runtime";
2332
- var ProgressBarFill = (props) => {
2333
- const context = useContext4(ProgressBarContext);
2334
- const { value, color, style, className, dataAttrs, ...rest } = getComponentProps(props, ProgressBarFillPropsDefs);
2335
- return /* @__PURE__ */ jsx21(
2336
- "div",
2337
- {
2338
- "data-color": color ?? context?.color,
2339
- "data-variant": context?.variant,
2340
- style: { ...style, width: `${(value ?? 0) / ((context?.totalValue ?? 0) > 1 ? context.totalValue : 1) * 100}%` },
2341
- className: clsx18("progress-bar-fill", className),
2342
- ...dataAttrs,
2343
- ...rest
2344
- }
2345
- );
2346
- };
2347
- ProgressBarFill.displayName = "ProgressBar.Fill";
2348
-
2349
- // src/components/progress-bar/root/progress-bar-root.tsx
2350
- import clsx19 from "clsx";
2351
- import React22, { isValidElement as isValidElement4, useMemo as useMemo5 } from "react";
2352
-
2353
- // src/components/progress-bar/root/progress-bar-root.props.ts
2354
- var ProgressBarVariants = ["solid", "outlined", "muted"];
2355
- var ProgressBarRootPropsDefs = {
2356
- /**
2357
- * Sets the variant style of the progress bar ("solid", "outlined", or "muted").
2358
- */
2359
- variant: {
2360
- type: "enum",
2361
- values: ProgressBarVariants,
2362
- dataAttr: "variant"
2363
- },
2364
- /**
2365
- * The value of the progress bar (filled state).
2366
- * Should be a number between 0 and 1 representing the percentage of completion.
2367
- */
2368
- value: {
2369
- type: "number"
2370
- }
2371
- };
2372
-
2373
- // src/components/progress-bar/root/progress-bar-root.tsx
2374
- import { jsx as jsx22 } from "react/jsx-runtime";
2375
- var ALLOWED_CHILDREN5 = [ProgressBarFill.displayName];
2376
- var ProgressBarRoot = (props) => {
2377
- const { value, size, color, variant, className, dataAttrs, ...rest } = getComponentProps(
2378
- props,
2379
- ProgressBarRootPropsDefs,
2380
- MarginPropDefs,
2381
- SizePropDef
2382
- );
2383
- const validChildren = filterChildren(props.children, ALLOWED_CHILDREN5, {
2384
- parentDisplayName: ProgressBarRoot.displayName
2385
- });
2386
- const { fills, totalValue } = useMemo5(() => {
2387
- const fills2 = validChildren.filter(
2388
- (child) => isValidElement4(child) && child.type.displayName === ProgressBarFill.displayName
2389
- );
2390
- if (fills2.length > 0) {
2391
- const totalValue2 = fills2.reduce(
2392
- (sum, child) => sum + (isValidElement4(child) ? child.props.value ?? 0 : 0),
2393
- 0
2394
- );
2395
- return {
2396
- fills: fills2,
2397
- totalValue: totalValue2
2398
- };
2399
- }
2400
- return {
2401
- fills: [/* @__PURE__ */ jsx22(ProgressBarFill, { color, value })],
2402
- totalValue: value ?? 0
2403
- };
2404
- }, [validChildren, color, value]);
2405
- return /* @__PURE__ */ jsx22(ProgressBarContext.Provider, { value: { color, variant, totalValue }, children: /* @__PURE__ */ jsx22(
2406
- "div",
2407
- {
2408
- "data-size": size,
2409
- "data-color": color,
2410
- "data-variant": variant,
2411
- className: clsx19("progress-bar-root", className),
2412
- ...dataAttrs,
2413
- ...rest,
2414
- children: fills.map((fill, index) => /* @__PURE__ */ jsx22(React22.Fragment, { children: fill }, index))
2415
- }
2416
- ) });
2417
- };
2418
- ProgressBarRoot.displayName = "ProgressBar.Root";
2419
-
2420
- // src/components/progress-bar/progress-bar.tsx
2421
- var ProgressBar = Object.assign(ProgressBarRoot, {
2422
- /**
2423
- * The root component for the Progress Bar.
2424
- */
2425
- Root: ProgressBarRoot,
2426
- /**
2427
- * The fill component for the Progress Bar, representing the filled portion.
2428
- */
2429
- Fill: ProgressBarFill
2430
- });
2431
-
2432
- // src/components/select/content/select-content.tsx
2433
- import clsx21 from "clsx";
2434
- import * as React26 from "react";
2435
-
2436
- // src/components/select/select-context.tsx
2437
- import * as React23 from "react";
2438
- var SelectContext = React23.createContext(
2439
- null
2440
- );
2441
- function useSelectContext() {
2442
- const context = React23.useContext(SelectContext);
2443
- if (!context) {
2444
- throw new Error("Select components must be used within a Select.Root");
2445
- }
2446
- return context;
2447
- }
2448
-
2449
- // src/components/select/utils/user-composed-refs.ts
2450
- import * as React24 from "react";
2451
- function useComposedRefs(...refs) {
2452
- return React24.useCallback(
2453
- (node) => {
2454
- refs.forEach((ref) => {
2455
- if (typeof ref === "function") {
2456
- ref(node);
2457
- } else if (ref != null) {
2458
- ref.current = node;
2459
- }
2460
- });
2461
- },
2462
- [refs]
2463
- );
2464
- }
2465
-
2466
- // src/components/select/viewport/select-viewport.tsx
2467
- import clsx20 from "clsx";
2468
- import * as React25 from "react";
2469
- import { jsx as jsx23 } from "react/jsx-runtime";
2470
- var SelectViewport = React25.forwardRef(
2471
- (props, ref) => {
2472
- const { className, children, ...rest } = props;
2473
- return /* @__PURE__ */ jsx23("div", { ref, className: clsx20("select-viewport", className), ...rest, children });
2474
- }
2475
- );
2476
- SelectViewport.displayName = "Select.Viewport";
2477
-
2478
- // src/components/select/content/select-content.tsx
2479
- import { jsx as jsx24 } from "react/jsx-runtime";
2480
- var SelectContent = React26.forwardRef(
2481
- (props, forwardedRef) => {
2482
- const {
2483
- className,
2484
- children,
2485
- position = "popper",
2486
- side = "bottom",
2487
- offset,
2488
- align = "center",
2489
- ...rest
2490
- } = props;
2491
- const context = useSelectContext();
2492
- const composedRef = useComposedRefs(forwardedRef, context.contentRef);
2493
- React26.useEffect(() => {
2494
- context.itemValues.current = [];
2495
- }, [context.open]);
2496
- React26.useEffect(() => {
2497
- if (!context.open) return;
2498
- const handleClickOutside = (event) => {
2499
- const target = event.target;
2500
- if (context.contentRef.current && !context.contentRef.current.contains(target) && context.triggerRef.current && !context.triggerRef.current.contains(target)) {
2501
- context.onOpenChange(false);
2502
- }
2503
- };
2504
- document.addEventListener("mousedown", handleClickOutside);
2505
- return () => document.removeEventListener("mousedown", handleClickOutside);
2506
- }, [context.open]);
2507
- React26.useEffect(() => {
2508
- if (!context.open) return;
2509
- const handleKeyDown = (event) => {
2510
- const items = context.itemValues.current;
2511
- const itemCount = items.length;
2512
- switch (event.key) {
2513
- case "ArrowDown":
2514
- event.preventDefault();
2515
- context.setHighlightedIndex(
2516
- (prev) => prev < itemCount - 1 ? prev + 1 : 0
2517
- );
2518
- break;
2519
- case "ArrowUp":
2520
- event.preventDefault();
2521
- context.setHighlightedIndex(
2522
- (prev) => prev > 0 ? prev - 1 : itemCount - 1
2523
- );
2524
- break;
2525
- case "Tab":
2526
- event.preventDefault();
2527
- if (event.shiftKey) {
2528
- context.setHighlightedIndex(
2529
- (prev) => prev > 0 ? prev - 1 : itemCount - 1
2530
- );
2531
- } else {
2532
- context.setHighlightedIndex(
2533
- (prev) => prev < itemCount - 1 ? prev + 1 : 0
2534
- );
2535
- }
2536
- break;
2537
- case "Enter":
2538
- case " ":
2539
- event.preventDefault();
2540
- if (context.highlightedIndex >= 0) {
2541
- const selectedValue = items[context.highlightedIndex];
2542
- if (selectedValue) {
2543
- context.onValueChange(selectedValue);
2544
- const displayText = children;
2545
- if (displayText) context.setDisplayValue(displayText);
2546
- context.onOpenChange(false);
2547
- }
2548
- }
2549
- break;
2550
- case "Escape":
2551
- event.preventDefault();
2552
- context.onOpenChange(false);
2553
- context.triggerRef.current?.focus();
2554
- break;
2555
- }
2556
- };
2557
- document.addEventListener("keydown", handleKeyDown);
2558
- return () => document.removeEventListener("keydown", handleKeyDown);
2559
- }, [context.open, context.highlightedIndex]);
2560
- const [contentWidth, setContentWidth] = React26.useState();
2561
- const labelInside = context.labelPosition === "inside";
2562
- const anchorRef = labelInside ? context.rootRef : context.triggerRef;
2563
- React26.useLayoutEffect(() => {
2564
- if (context.open && anchorRef.current) {
2565
- setContentWidth(anchorRef.current.getBoundingClientRect().width);
2566
- }
2567
- }, [context.open, context.labelPosition, anchorRef]);
2568
- if (!context.open) {
2569
- return /* @__PURE__ */ jsx24("div", { style: { display: "none" }, "aria-hidden": "true", children });
2570
- }
2571
- return /* @__PURE__ */ jsx24(
2572
- Portal.Root,
2573
- {
2574
- open: context.open,
2575
- onOpenChange: context.onOpenChange,
2576
- anchorRef,
2577
- children: /* @__PURE__ */ jsx24(Portal.Content, { anchored: true, side, align, sideOffset: offset, children: /* @__PURE__ */ jsx24(
2578
- "div",
2579
- {
2580
- ref: composedRef,
2581
- role: "listbox",
2582
- "data-state": context.open ? "open" : "closed",
2583
- "data-side": side,
2584
- "data-align": align,
2585
- "data-trigger-variant": context.triggerVariant,
2586
- className: clsx21("select-content", className),
2587
- style: { width: contentWidth },
2588
- ...rest,
2589
- children: /* @__PURE__ */ jsx24(SelectViewport, { children })
2590
- }
2591
- ) })
2592
- }
2593
- );
2594
- }
2595
- );
2596
- SelectContent.displayName = "Select.Content";
2597
-
2598
- // src/components/select/group/select-group.tsx
2599
- import clsx22 from "clsx";
2600
- import * as React27 from "react";
2601
-
2602
- // src/components/select/group/select-group.props.ts
2603
- var SelectGroupsPropDefs = {
2604
- title: {
2605
- type: "string"
2606
- }
2607
- };
2608
-
2609
- // src/components/select/group/select-group.tsx
2610
- import { jsx as jsx25, jsxs as jsxs5 } from "react/jsx-runtime";
2611
- var SelectGroup = React27.forwardRef(
2612
- (props, ref) => {
2613
- const { className, children, dataAttrs, ...rest } = getComponentProps(
2614
- props,
2615
- SelectGroupsPropDefs
2616
- );
2617
- return /* @__PURE__ */ jsxs5(
2618
- "div",
2619
- {
2620
- ref,
2621
- role: "group",
2622
- className: clsx22("select-group", className),
2623
- ...rest,
2624
- children: [
2625
- /* @__PURE__ */ jsx25(Text, { className: "select-group-label", disabled: true, children: props.title }),
2626
- children
2627
- ]
2628
- }
2629
- );
2630
- }
2631
- );
2632
- SelectGroup.displayName = "Select.Group";
2633
-
2634
- // src/components/select/item/select-item.tsx
2635
- import clsx23 from "clsx";
2636
- import * as React28 from "react";
2637
-
2638
- // src/components/select/item/select-item-indicator.tsx
2639
- import { jsx as jsx26 } from "react/jsx-runtime";
2640
- var SelectItemIndicator = () => {
2641
- return /* @__PURE__ */ jsx26("span", { className: "select-item-indicator", children: /* @__PURE__ */ jsx26(
2642
- "svg",
2643
- {
2644
- width: "20",
2645
- height: "20",
2646
- viewBox: "0 0 15 15",
2647
- fill: "none",
2648
- xmlns: "http://www.w3.org/2000/svg",
2649
- children: /* @__PURE__ */ jsx26(
2650
- "path",
2651
- {
2652
- d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
2653
- fill: "currentColor",
2654
- fillRule: "evenodd",
2655
- clipRule: "evenodd"
2656
- }
2657
- )
2658
- }
2659
- ) });
2660
- };
2661
-
2662
- // src/components/select/item/select-item.props.ts
2663
- var SelectItemPropDefs = {
2664
- value: {
2665
- type: "string"
2666
- },
2667
- disabled: {
2668
- type: "boolean",
2669
- default: false
2670
- }
2671
- };
2672
-
2673
- // src/components/select/item/select-item.tsx
2674
- import { jsx as jsx27, jsxs as jsxs6 } from "react/jsx-runtime";
2675
- var SelectItem = React28.forwardRef(
2676
- (props, ref) => {
2677
- const context = useSelectContext();
2678
- const { value, disabled, children, className, ...rest } = getComponentProps(
2679
- props,
2680
- SelectItemPropDefs
2681
- );
2682
- const selected = context.value === value;
2683
- React28.useEffect(() => {
2684
- if (selected && children) {
2685
- context.setDisplayValue(children);
2686
- }
2687
- }, [selected]);
2688
- React28.useEffect(() => {
2689
- if (!value) return;
2690
- if (!disabled) {
2691
- const values = context.itemValues.current;
2692
- if (!values.includes(value)) values.push(value);
2693
- }
2694
- return () => {
2695
- const values = context.itemValues.current;
2696
- const index = values.indexOf(value);
2697
- if (index > -1) values.splice(index, 1);
2698
- };
2699
- }, [value, disabled]);
2700
- const itemIndex = value ? context.itemValues.current.indexOf(value) : -1;
2701
- const isHighlighted = context.highlightedIndex >= 0 && context.highlightedIndex === itemIndex;
2702
- const handleClick = () => {
2703
- if (!disabled) {
2704
- if (value) {
2705
- context.onValueChange(value);
2706
- context.setDisplayValue(children);
2707
- }
2708
- context.onOpenChange(false);
2709
- context.triggerRef.current?.focus();
2710
- }
2711
- };
2712
- const handleMouseEnter = () => {
2713
- if (!disabled) context.setHighlightedIndex(itemIndex);
2714
- };
2715
- return /* @__PURE__ */ jsxs6(
2716
- Box,
2717
- {
2718
- ref,
2719
- role: "option",
2720
- radius: "none",
2721
- "aria-selected": selected,
2722
- "aria-disabled": disabled,
2723
- "data-variant": context.triggerVariant,
2724
- "data-state": selected ? "checked" : "unchecked",
2725
- "data-highlighted": isHighlighted ? "" : void 0,
2726
- "data-disabled": disabled ? "" : void 0,
2727
- className: clsx23("select-item", className),
2728
- onClick: handleClick,
2729
- onMouseEnter: handleMouseEnter,
2730
- ...rest,
2731
- children: [
2732
- /* @__PURE__ */ jsx27(
2733
- Box,
2734
- {
2735
- style: { width: 24, height: 24, justifyContent: "center" },
2736
- className: "flex items-center",
2737
- children: selected && /* @__PURE__ */ jsx27(SelectItemIndicator, {})
2738
- }
2739
- ),
2740
- /* @__PURE__ */ jsx27(Text, { disabled, children })
2741
- ]
2742
- }
2743
- );
2744
- }
2745
- );
2746
- SelectItem.displayName = "Select.Item";
2747
-
2748
- // src/components/select/label/select-label.tsx
2749
- import clsx24 from "clsx";
2750
- import * as React29 from "react";
2751
-
2752
- // src/components/select/label/select-label.props.ts
2753
- var labelPositions2 = ["top", "left", "inside"];
2754
- var SelectLabelPropDefs = {
2755
- position: {
2756
- type: "enum",
2757
- values: labelPositions2,
2758
- default: "top",
2759
- dataAttr: "position"
2760
- }
2761
- };
2762
-
2763
- // src/components/select/label/select-label.tsx
2764
- import { jsx as jsx28 } from "react/jsx-runtime";
2765
- var SelectLabel = React29.forwardRef(
2766
- (props, ref) => {
2767
- const context = useSelectContext();
2768
- const { className, children, position, dataAttrs } = getComponentProps(
2769
- props,
2770
- SelectLabelPropDefs
2771
- );
2772
- React29.useLayoutEffect(() => {
2773
- context.setLabelPosition?.(position ?? "top");
2774
- }, [position, context.setLabelPosition]);
2775
- return /* @__PURE__ */ jsx28(
2776
- "label",
2777
- {
2778
- ref,
2779
- htmlFor: context.labelId,
2780
- className: clsx24("select-label", className),
2781
- ...dataAttrs,
2782
- children: /* @__PURE__ */ jsx28(Text, { disabled: context.disabled, children })
2783
- }
2784
- );
2785
- }
2786
- );
2787
- SelectLabel.displayName = "Select.Label";
2788
-
2789
- // src/components/select/root/select-root.tsx
2790
- import clsx28 from "clsx";
2791
- import {
2792
- useId as useId2,
2793
- useLayoutEffect as useLayoutEffect3,
2794
- useMemo as useMemo6,
2795
- useRef as useRef5,
2796
- useState as useState6
2797
- } from "react";
2798
-
2799
- // src/components/select/trigger/select-trigger.tsx
2800
- import clsx27 from "clsx";
2801
- import * as React31 from "react";
2802
-
2803
- // src/components/select/value/select-value.tsx
2804
- import clsx25 from "clsx";
2805
- import * as React30 from "react";
2806
- import { jsx as jsx29 } from "react/jsx-runtime";
2807
- var SelectValue = React30.forwardRef(
2808
- (props, ref) => {
2809
- const { className, placeholder: placeholderProp, ...rest } = props;
2810
- const context = useSelectContext();
2811
- const placeholder = placeholderProp ?? context.placeholder;
2812
- return /* @__PURE__ */ jsx29(
2813
- "span",
2814
- {
2815
- ref,
2816
- className: clsx25("select-value", className),
2817
- "data-placeholder": !context.value ? "" : void 0,
2818
- ...rest,
2819
- children: /* @__PURE__ */ jsx29(Text, { disabled: context.disabled, children: context.displayValue || placeholder })
2820
- }
2821
- );
2822
- }
2823
- );
2824
- SelectValue.displayName = "Select.Value";
2825
-
2826
- // src/components/select/trigger/select-trigger-icon.tsx
2827
- import clsx26 from "clsx";
2828
- import { jsx as jsx30 } from "react/jsx-runtime";
2829
- var SelectTriggerIcon = (props) => {
2830
- const { className, ...rest } = props;
2831
- return /* @__PURE__ */ jsx30(
2832
- "svg",
2833
- {
2834
- className: clsx26("select-trigger-icon", className),
2835
- width: "20",
2836
- height: "20",
2837
- viewBox: "0 0 15 15",
2838
- fill: "none",
2839
- xmlns: "http://www.w3.org/2000/svg",
2840
- ...rest,
2841
- children: /* @__PURE__ */ jsx30(
2842
- "path",
2843
- {
2844
- d: "M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z",
2845
- fill: "currentColor",
2846
- fillRule: "evenodd",
2847
- clipRule: "evenodd"
2848
- }
2849
- )
2850
- }
2851
- );
2852
- };
2853
-
2854
- // src/components/select/trigger/select-trigger.props.ts
2855
- var SelectTriggerPropsDefs = {};
2856
-
2857
- // src/components/select/trigger/select-trigger.tsx
2858
- import { jsx as jsx31, jsxs as jsxs7 } from "react/jsx-runtime";
2859
- var SelectTrigger = React31.forwardRef(
2860
- (props, forwardedRef) => {
2861
- const {
2862
- className,
2863
- disabled: disabledProp,
2864
- dataAttrs
2865
- } = getComponentProps(props, SelectTriggerPropsDefs);
2866
- const context = useSelectContext();
2867
- const disabled = disabledProp ?? context.disabled;
2868
- const isInsideLabel = context.labelPosition === "inside";
2869
- const composedRef = useComposedRefs(forwardedRef, context.triggerRef);
2870
- const handleClick = () => {
2871
- if (!disabled) {
2872
- context.onOpenChange(!context.open);
2873
- }
2874
- };
2875
- const handleKeyDown = (event) => {
2876
- if (disabled) return;
2877
- switch (event.key) {
2878
- case "Enter":
2879
- case " ":
2880
- case "ArrowDown":
2881
- case "ArrowUp":
2882
- event.preventDefault();
2883
- context.onOpenChange(true);
2884
- break;
2885
- }
2886
- };
2887
- if (isInsideLabel) {
2888
- return /* @__PURE__ */ jsxs7(
2889
- "div",
2890
- {
2891
- ref: composedRef,
2892
- "data-state": context.open ? "open" : "closed",
2893
- "data-disabled": disabled ? "" : void 0,
2894
- "data-variant": context.triggerVariant,
2895
- className: clsx27("select-trigger", className),
2896
- ...dataAttrs,
2897
- children: [
2898
- /* @__PURE__ */ jsx31(SelectValue, {}),
2899
- /* @__PURE__ */ jsx31(SelectTriggerIcon, {})
2900
- ]
2901
- }
2902
- );
2903
- }
2904
- return /* @__PURE__ */ jsxs7(
2905
- "button",
2906
- {
2907
- ref: composedRef,
2908
- type: "button",
2909
- role: "combobox",
2910
- "aria-expanded": context.open,
2911
- "aria-haspopup": "listbox",
2912
- "aria-disabled": disabled,
2913
- disabled,
2914
- "data-state": context.open ? "open" : "closed",
2915
- "data-disabled": disabled ? "" : void 0,
2916
- className: clsx27("select-trigger", className),
2917
- onClick: handleClick,
2918
- onKeyDown: handleKeyDown,
2919
- "data-variant": context.triggerVariant,
2920
- ...dataAttrs,
2921
- children: [
2922
- /* @__PURE__ */ jsx31(SelectValue, {}),
2923
- /* @__PURE__ */ jsx31(SelectTriggerIcon, {})
2924
- ]
2925
- }
2926
- );
2927
- }
2928
- );
2929
- SelectTrigger.displayName = "Select.Trigger";
2930
-
2931
- // src/components/select/root/select-root.props.ts
2932
- var selectVariants = ["outlined", "solid", "clear"];
2933
- var SelectRootPropsDefs = {
2934
- variant: {
2935
- type: "enum",
2936
- values: selectVariants,
2937
- dataAttr: "variant"
2938
- },
2939
- value: {
2940
- type: "string"
2941
- },
2942
- defaultValue: {
2943
- type: "string"
2944
- },
2945
- disabled: {
2946
- type: "boolean"
2947
- },
2948
- required: {
2949
- type: "boolean"
2950
- },
2951
- placeholder: {
2952
- type: "string"
2953
- },
2954
- name: {
2955
- type: "string"
2956
- },
2957
- onValueChange: {
2958
- type: "function"
2959
- }
2960
- };
2961
-
2962
- // src/components/select/root/select-root.tsx
2963
- import { jsx as jsx32, jsxs as jsxs8 } from "react/jsx-runtime";
2964
- var ALLOWED_CHILDREN6 = [
2965
- SelectLabel.displayName,
2966
- SelectTrigger.displayName,
2967
- SelectContent.displayName
2968
- ];
2969
- var SelectRoot = (props) => {
2970
- const {
2971
- children,
2972
- className,
2973
- dataAttrs,
2974
- value: valueProp,
2975
- defaultValue = "",
2976
- onValueChange,
2977
- disabled = false,
2978
- required = false,
2979
- placeholder,
2980
- variant,
2981
- name
2982
- } = getComponentProps(
2983
- props,
2984
- SelectRootPropsDefs,
2985
- MarginPropDefs,
2986
- RadiusPropDefs,
2987
- RoundnessPropDef
2988
- );
2989
- const [value, setValue] = useControllableState({
2990
- value: valueProp,
2991
- defaultValue,
2992
- onChange: onValueChange
2993
- });
2994
- const [open, setOpen] = useState6(false);
2995
- const [highlightedIndex, setHighlightedIndex] = useState6(-1);
2996
- const [labelPosition, setLabelPosition] = useState6("top");
2997
- const [triggerVariant, setTriggerVariant] = useState6("outlined");
2998
- const [displayValue, setDisplayValue] = useState6(null);
2999
- const labelId = useId2();
3000
- const rootRef = useRef5(null);
3001
- const triggerRef = useRef5(null);
3002
- const contentRef = useRef5(null);
3003
- const itemsRef = useRef5(/* @__PURE__ */ new Map());
3004
- const itemValues = useRef5([]);
3005
- const contextValue = useMemo6(
3006
- () => ({
3007
- open,
3008
- value,
3009
- displayValue,
3010
- onOpenChange: setOpen,
3011
- onValueChange: setValue,
3012
- setDisplayValue,
3013
- rootRef,
3014
- triggerRef,
3015
- contentRef,
3016
- labelPosition,
3017
- setLabelPosition,
3018
- triggerVariant,
3019
- setTriggerVariant,
3020
- disabled,
3021
- required,
3022
- placeholder,
3023
- name,
3024
- labelId,
3025
- highlightedIndex,
3026
- setHighlightedIndex,
3027
- itemsRef,
3028
- itemValues
3029
- }),
3030
- [
3031
- open,
3032
- value,
3033
- displayValue,
3034
- disabled,
3035
- required,
3036
- name,
3037
- placeholder,
3038
- labelId,
3039
- highlightedIndex,
3040
- labelPosition,
3041
- triggerVariant
3042
- ]
3043
- );
3044
- useLayoutEffect3(() => {
3045
- setTriggerVariant?.(variant ?? "outlined");
3046
- }, [variant, setTriggerVariant]);
3047
- const validChildren = filterChildren(children, ALLOWED_CHILDREN6, {
3048
- parentDisplayName: SelectRoot.displayName
3049
- });
3050
- const labelInside = labelPosition === "inside";
3051
- const handleClick = () => {
3052
- if (!disabled) {
3053
- setOpen(!open);
3054
- }
3055
- };
3056
- const handleKeyDown = (event) => {
3057
- if (disabled) return;
3058
- switch (event.key) {
3059
- case "Enter":
3060
- case " ":
3061
- case "ArrowDown":
3062
- case "ArrowUp":
3063
- event.preventDefault();
3064
- setOpen(true);
3065
- break;
3066
- }
3067
- };
3068
- if (labelInside) {
3069
- return /* @__PURE__ */ jsx32(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8(
3070
- "button",
3071
- {
3072
- type: "button",
3073
- role: "combobox",
3074
- "aria-expanded": open,
3075
- "aria-haspopup": "listbox",
3076
- "aria-disabled": disabled,
3077
- disabled,
3078
- ref: rootRef,
3079
- "data-state": open ? "open" : "closed",
3080
- "data-disabled": disabled ? "" : void 0,
3081
- className: clsx28("select-root", className),
3082
- onClick: handleClick,
3083
- onKeyDown: handleKeyDown,
3084
- ...dataAttrs,
3085
- children: [
3086
- validChildren,
3087
- name && /* @__PURE__ */ jsx32("input", { type: "hidden", name, value })
3088
- ]
3089
- }
3090
- ) });
3091
- }
3092
- return /* @__PURE__ */ jsx32(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8(
3093
- Box,
3094
- {
3095
- ref: rootRef,
3096
- className: clsx28("select-root", className),
3097
- ...dataAttrs,
3098
- children: [
3099
- validChildren,
3100
- name && /* @__PURE__ */ jsx32("input", { type: "hidden", name, value })
3101
- ]
3102
- }
3103
- ) });
3104
- };
3105
- SelectRoot.displayName = "Select.Root";
3106
-
3107
- // src/components/select/separator/select-separator.tsx
3108
- import clsx29 from "clsx";
3109
- import * as React32 from "react";
3110
- import { jsx as jsx33 } from "react/jsx-runtime";
3111
- var SelectSeparator = React32.forwardRef(
3112
- (props, ref) => {
3113
- const { className, ...rest } = props;
3114
- return /* @__PURE__ */ jsx33(
3115
- "div",
3116
- {
3117
- ref,
3118
- className: clsx29("select-separator", className),
3119
- ...rest
3120
- }
3121
- );
3122
- }
3123
- );
3124
- SelectSeparator.displayName = "Select.Separator";
3125
-
3126
- // src/components/select/select.tsx
3127
- var Select = {
3128
- Root: SelectRoot,
3129
- Trigger: SelectTrigger,
3130
- Content: SelectContent,
3131
- Viewport: SelectViewport,
3132
- Group: SelectGroup,
3133
- Label: SelectLabel,
3134
- Item: SelectItem,
3135
- Separator: SelectSeparator
3136
- };
3137
-
3138
- // src/components/separator/separator.tsx
3139
- import clsx30 from "clsx";
3140
-
3141
- // src/components/separator/separator.props.ts
3142
- var directions = ["horizontal", "vertical"];
3143
- var variants2 = ["solid", "dashed", "dotted"];
3144
- var SeparatorPropsDefs = {
3145
- /**
3146
- * The direction of the separator.
3147
- *
3148
- * @example direction="vertical" // positions the separator vertically
3149
- */
3150
- direction: {
3151
- type: "enum",
3152
- values: directions,
3153
- default: "horizontal",
3154
- dataAttr: "direction"
3155
- },
3156
- /**
3157
- * The variant of the separator.
3158
- *
3159
- * @example variant="dashed" // makes the separator dashed
3160
- */
3161
- variant: {
3162
- type: "enum",
3163
- values: variants2,
3164
- default: "solid",
3165
- dataAttr: "variant"
3166
- }
3167
- };
3168
-
3169
- // src/components/separator/separator.tsx
3170
- import { jsx as jsx34 } from "react/jsx-runtime";
3171
- var Separator = (props) => {
3172
- const { className, dataAttrs, style } = getComponentProps(
3173
- props,
3174
- SeparatorPropsDefs
3175
- );
3176
- return /* @__PURE__ */ jsx34(
3177
- "div",
3178
- {
3179
- className: clsx30("separator", className),
3180
- style,
3181
- ...dataAttrs
3182
- }
3183
- );
3184
- };
3185
- Separator.displayName = "Separator";
3186
-
3187
- // src/components/switch/indicator/switch-indicator.tsx
3188
- import clsx31 from "clsx";
3189
- import React34 from "react";
3190
-
3191
- // src/components/switch/switch-context.ts
3192
- import React33 from "react";
3193
- var SwitchContext = React33.createContext(
3194
- null
3195
- );
3196
- function useSwitchContext() {
3197
- const context = React33.useContext(SwitchContext);
3198
- if (!context) {
3199
- throw new Error("Switch components must be used within a Switch.Root");
3200
- }
3201
- return context;
3202
- }
3203
-
3204
- // src/components/switch/root/switch-root.props.ts
3205
- var SwitchVariants = ["solid", "outlined", "muted"];
3206
- var SwitchRootPropsDefs = {
3207
- /**
3208
- * Sets the variant style of the switch ("solid" or "outlined").
3209
- */
3210
- variant: {
3211
- type: "enum",
3212
- values: SwitchVariants,
3213
- dataAttr: "variant"
3214
- },
3215
- /**
3216
- * Sets the checked state of the switch.
3217
- *
3218
- * When using an uncontrolled switch, use `defaultChecked` instead.
3219
- * @default undefined
3220
- */
3221
- checked: {
3222
- type: "boolean",
3223
- dataAttr: "checked"
3224
- },
3225
- /**
3226
- * The value of the switch (checked state).
3227
- */
3228
- value: {
3229
- type: "boolean"
3230
- },
3231
- /**
3232
- * Sets the default checked state of the switch.
3233
- * @default undefined
3234
- */
3235
- defaultChecked: {
3236
- type: "boolean"
3237
- },
3238
- /**
3239
- * Disables the switch component.
3240
- * @default undefined
3241
- */
3242
- disabled: {
3243
- type: "boolean",
3244
- dataAttr: "disabled"
3245
- },
3246
- /**
3247
- * Makes the switch read-only.
3248
- * @default undefined
3249
- */
3250
- readonly: {
3251
- type: "boolean",
3252
- dataAttr: "readonly"
3253
- },
3254
- /**
3255
- * Marks the switch as required.
3256
- * @default undefined
3257
- */
3258
- required: {
3259
- type: "boolean",
3260
- dataAttr: "required"
3261
- },
3262
- /**
3263
- * Sets the name attribute of the switch input for form control.
3264
- * @default undefined
3265
- */
3266
- name: {
3267
- type: "string"
3268
- },
3269
- /**
3270
- * Callback fired when the checked state changes.
3271
- *
3272
- * @param value - The new checked state.
3273
- */
3274
- onCheckedChange: {
3275
- type: "function"
3276
- }
3277
- };
3278
-
3279
- // src/components/switch/indicator/switch-indicator.props.ts
3280
- var SwitchIndicatorPropDefs = {
3281
- /**
3282
- * Sets the variant style of the switch ("solid" or "outlined").
3283
- */
3284
- variant: {
3285
- type: "enum",
3286
- values: SwitchVariants,
3287
- dataAttr: "variant"
3288
- }
3289
- };
3290
-
3291
- // src/components/switch/indicator/switch-indicator.tsx
3292
- import { jsx as jsx35 } from "react/jsx-runtime";
3293
- var SwitchIndicator = React34.forwardRef((props, ref) => {
3294
- const {
3295
- value,
3296
- setValue,
3297
- hovered,
3298
- color,
3299
- disabled,
3300
- readonly,
3301
- focused,
3302
- variant: contextVariant
3303
- } = useSwitchContext();
3304
- const { size, variant, className, style, dataAttrs } = getComponentProps(
3305
- props,
3306
- SwitchIndicatorPropDefs,
3307
- SizePropDef
3308
- );
3309
- const indicatorVariant = variant || contextVariant;
3310
- const handleKeyDown = (event) => {
3311
- if (disabled || readonly) return;
3312
- if (event.key === " " || event.key === "Enter") {
3313
- event.preventDefault();
3314
- setValue(!value);
3315
- }
3316
- };
3317
- const indicatorProps = {
3318
- ...value && { "data-checked": true },
3319
- ...disabled && { "data-disabled": true },
3320
- ...readonly && { "data-readonly": true },
3321
- ...(variant || contextVariant) && { "data-variant": indicatorVariant }
3322
- };
3323
- return /* @__PURE__ */ jsx35(
3324
- "div",
3325
- {
3326
- ref,
3327
- style,
3328
- role: "switch",
3329
- "data-size": size,
3330
- "data-color": color,
3331
- "data-hovered": hovered,
3332
- "aria-disabled": disabled,
3333
- "data-focused": focused,
3334
- "aria-readonly": readonly,
3335
- onKeyDown: handleKeyDown,
3336
- tabIndex: disabled || readonly ? -1 : 0,
3337
- className: clsx31("switch-indicator", className),
3338
- ...indicatorProps,
3339
- ...dataAttrs
3340
- }
3341
- );
3342
- });
3343
- SwitchIndicator.displayName = "Switch.Indicator";
3344
-
3345
- // src/components/switch/label/switch-label.tsx
3346
- import clsx32 from "clsx";
3347
- import React35 from "react";
3348
-
3349
- // src/components/switch/label/switch-label.props.ts
3350
- var labelPositions3 = ["top", "left", "right", "bottom"];
3351
- var SwitchLabelPropDefs = {
3352
- /**
3353
- * Sets the position of the label relative to the switch.
3354
- *
3355
- * @example position="left" // positions the label to the left of the switch
3356
- * @example position="top" // positions the label above the switch
3357
- */
3358
- position: {
3359
- type: "enum",
3360
- values: labelPositions3,
3361
- dataAttr: "position"
3362
- }
3363
- };
3364
-
3365
- // src/components/switch/label/switch-label.tsx
3366
- import { jsx as jsx36 } from "react/jsx-runtime";
3367
- var SwitchLabel = React35.forwardRef(
3368
- (props, ref) => {
3369
- const context = useSwitchContext();
3370
- const { className, children, position } = getComponentProps(
3371
- props,
3372
- SwitchLabelPropDefs
3373
- );
3374
- React35.useLayoutEffect(() => {
3375
- context.setLabelPosition?.(position ?? "right");
3376
- }, [position, context.setLabelPosition]);
3377
- return /* @__PURE__ */ jsx36(
3378
- "label",
3379
- {
3380
- ref,
3381
- htmlFor: context.labelId,
3382
- className: clsx32("switch-label", className),
3383
- ...position && { [`data-position`]: position },
3384
- children: /* @__PURE__ */ jsx36(Text, { children })
3385
- }
3386
- );
3387
- }
3388
- );
3389
- SwitchLabel.displayName = "Switch.Label";
3390
-
3391
- // src/components/switch/root/switch-root.tsx
3392
- import clsx33 from "clsx";
3393
1
  import {
3394
- isValidElement as isValidElement5,
3395
- useId as useId3,
3396
- useMemo as useMemo7,
3397
- useState as useState7
3398
- } from "react";
3399
- import { jsx as jsx37, jsxs as jsxs9 } from "react/jsx-runtime";
3400
- var ALLOWED_CHILDREN7 = [
3401
- SwitchLabel.displayName,
3402
- SwitchIndicator.displayName
3403
- ];
3404
- var SwitchRoot = (props) => {
3405
- const {
3406
- name,
3407
- size,
3408
- color,
3409
- variant,
3410
- checked,
3411
- dataAttrs,
3412
- onCheckedChange,
3413
- value: valueProp,
3414
- disabled = false,
3415
- required = false,
3416
- readonly = false,
3417
- defaultChecked = false
3418
- } = getComponentProps(
3419
- props,
3420
- SwitchRootPropsDefs,
3421
- AlignPropDef,
3422
- MarginPropDefs,
3423
- SizePropDef,
3424
- ColorPropDef
3425
- );
3426
- const [value, setValue] = useControllableState({
3427
- value: valueProp || checked,
3428
- defaultValue: defaultChecked,
3429
- onChange: onCheckedChange
3430
- });
3431
- const labelId = useId3();
3432
- const [labelPosition, setLabelPosition] = useState7("right");
3433
- const [hovered, setHovered] = useState7(false);
3434
- const [focused, setFocused] = useState7(false);
3435
- const validChildren = filterChildren(props.children, ALLOWED_CHILDREN7, {
3436
- parentDisplayName: SwitchRoot.displayName
3437
- });
3438
- const { restDataAttrs } = useMemo7(() => {
3439
- const { ["data-color"]: _, ...restDataAttrs2 } = dataAttrs || {};
3440
- return { restDataAttrs: restDataAttrs2 };
3441
- }, [dataAttrs]);
3442
- const { indicator, otherChildren } = useMemo7(() => {
3443
- const indicatorIndex = validChildren.findIndex(
3444
- (child) => isValidElement5(child) && child.type.displayName === SwitchIndicator.displayName
3445
- );
3446
- if (indicatorIndex > -1) {
3447
- return {
3448
- indicator: validChildren[indicatorIndex],
3449
- otherChildren: validChildren.filter((_, i) => i !== indicatorIndex)
3450
- };
3451
- }
3452
- return {
3453
- indicator: /* @__PURE__ */ jsx37(SwitchIndicator, { size }),
3454
- otherChildren: validChildren
3455
- };
3456
- }, [validChildren, size]);
3457
- const contextValue = useMemo7(
3458
- () => ({
3459
- name,
3460
- value,
3461
- color,
3462
- setValue,
3463
- onCheckedChange,
3464
- labelId,
3465
- labelPosition,
3466
- setLabelPosition,
3467
- variant,
3468
- hovered,
3469
- setHovered,
3470
- focused,
3471
- setFocused,
3472
- disabled,
3473
- readonly,
3474
- required
3475
- }),
3476
- [
3477
- name,
3478
- value,
3479
- color,
3480
- onCheckedChange,
3481
- setValue,
3482
- labelId,
3483
- labelPosition,
3484
- hovered,
3485
- focused,
3486
- disabled,
3487
- readonly,
3488
- required
3489
- ]
3490
- );
3491
- const handleClick = () => {
3492
- if (disabled || readonly) return;
3493
- setValue(!value);
3494
- };
3495
- return /* @__PURE__ */ jsx37(SwitchContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs9(
3496
- "div",
3497
- {
3498
- className: clsx33("switch-root", props.className),
3499
- onClick: () => handleClick(),
3500
- onFocus: () => setFocused(true),
3501
- onBlur: () => setFocused(false),
3502
- onMouseEnter: () => setHovered(true),
3503
- onMouseLeave: () => setHovered(false),
3504
- ...restDataAttrs,
3505
- children: [
3506
- /* @__PURE__ */ jsx37(
3507
- "div",
3508
- {
3509
- className: "switch-container",
3510
- "data-size": size,
3511
- "data-color": color,
3512
- "data-checked": value,
3513
- "data-hovered": hovered,
3514
- "data-focused": focused,
3515
- "data-variant": variant,
3516
- children: indicator
3517
- }
3518
- ),
3519
- otherChildren,
3520
- name && /* @__PURE__ */ jsx37("input", { type: "hidden", name, value: String(value) })
3521
- ]
3522
- }
3523
- ) });
3524
- };
3525
- SwitchRoot.displayName = "Switch";
3526
-
3527
- // src/components/switch/switch.tsx
3528
- var Switch = Object.assign(SwitchRoot, {
3529
- Root: SwitchRoot,
3530
- Label: SwitchLabel,
3531
- Indicator: SwitchIndicator
3532
- });
3533
-
3534
- // src/components/theme/theme.tsx
3535
- import * as React37 from "react";
3536
- import { jsx as jsx38 } from "react/jsx-runtime";
3537
- var Theme = React37.forwardRef((props, ref) => {
3538
- const context = React37.useContext(ThemeContext);
3539
- const isRoot = context === void 0;
3540
- if (isRoot) return /* @__PURE__ */ jsx38(ThemeRoot, { ...props, ref });
3541
- return /* @__PURE__ */ jsx38(ThemeSub, { ...props, ref });
3542
- });
3543
- Theme.displayName = "Theme";
3544
- var ThemeRoot = React37.forwardRef((props, ref) => {
3545
- const {
3546
- appearance: themeAppearance,
3547
- radius: themeRadius,
3548
- roundness: themeRoundness,
3549
- spacing: themeSpacing,
3550
- children,
3551
- ...rest
3552
- } = props;
3553
- const [appearance, setAppearance] = React37.useState(
3554
- themeAppearance ?? "light"
3555
- );
3556
- const [radius, setRadius] = React37.useState(themeRadius ?? "md");
3557
- const [roundness2, setRoundness] = React37.useState(
3558
- themeRoundness ?? "3"
3559
- );
3560
- const [spacing, setSpacing] = React37.useState(themeSpacing ?? "md");
3561
- const value = React37.useMemo(
3562
- () => ({
3563
- appearance,
3564
- radius,
3565
- roundness: roundness2,
3566
- spacing,
3567
- onAppearanceChange: setAppearance,
3568
- onRadiusChange: setRadius,
3569
- onRoundnessChange: setRoundness,
3570
- onSpacingChange: setSpacing
3571
- }),
3572
- [appearance, radius, roundness2, spacing]
3573
- );
3574
- return /* @__PURE__ */ jsx38(ThemeContext.Provider, { value, children: /* @__PURE__ */ jsx38(
3575
- "div",
3576
- {
3577
- ref,
3578
- "data-appearance": appearance,
3579
- "data-theme-radius": radius,
3580
- "data-theme-roundness": roundness2,
3581
- "data-theme-spacing": spacing,
3582
- ...rest,
3583
- children
3584
- }
3585
- ) });
3586
- });
3587
- ThemeRoot.displayName = "ThemeRoot";
3588
- var ThemeSub = React37.forwardRef((props, ref) => {
3589
- const context = React37.useContext(ThemeContext);
3590
- const {
3591
- appearance,
3592
- radius,
3593
- roundness: roundness2,
3594
- spacing,
3595
- onAppearanceChange,
3596
- onRadiusChange,
3597
- onRoundnessChange,
3598
- onSpacingChange,
3599
- children,
3600
- ...rest
3601
- } = props;
3602
- const contextProps = {
3603
- appearance: appearance ?? context.appearance,
3604
- radius: radius ?? context.radius,
3605
- roundness: roundness2 ?? context.roundness,
3606
- spacing: spacing ?? context.spacing,
3607
- onAppearanceChange: context.onAppearanceChange,
3608
- onRadiusChange: context.onRadiusChange,
3609
- onRoundnessChange: context.onRoundnessChange,
3610
- onSpacingChange: context.onSpacingChange
3611
- };
3612
- return /* @__PURE__ */ jsx38(ThemeContext.Provider, { value: contextProps, children: /* @__PURE__ */ jsx38(
3613
- "div",
3614
- {
3615
- ref,
3616
- "data-appearance": appearance,
3617
- "data-theme-radius": radius,
3618
- "data-theme-roundness": roundness2,
3619
- "data-theme-spacing": spacing,
3620
- ...rest,
3621
- className: "flex",
3622
- children
3623
- }
3624
- ) });
3625
- });
3626
- ThemeSub.displayName = "ThemeSub";
3627
-
3628
- // src/components/theme/theme-control.tsx
3629
- import { useEffect as useEffect7, useState as useState9 } from "react";
3630
- import { jsx as jsx39, jsxs as jsxs10 } from "react/jsx-runtime";
3631
- function ThemeControl({ position = "bottom" }) {
3632
- const {
3633
- appearance,
3634
- onAppearanceChange,
3635
- radius,
3636
- onRadiusChange,
3637
- roundness: roundness2,
3638
- onRoundnessChange,
3639
- spacing,
3640
- onSpacingChange
3641
- } = useTheme();
3642
- const [visible, setVisible] = useState9(false);
3643
- useEffect7(() => {
3644
- function handleKeyDown(event) {
3645
- if (event.altKey && event.code === "KeyT") {
3646
- event.preventDefault();
3647
- setVisible(!visible);
3648
- }
3649
- }
3650
- document.addEventListener("keydown", handleKeyDown);
3651
- return () => document.removeEventListener("keydown", handleKeyDown);
3652
- }, [visible]);
3653
- return /* @__PURE__ */ jsx39(Portal.Root, { open: visible, onOpenChange: setVisible, children: /* @__PURE__ */ jsx39(Portal.Content, { position, children: /* @__PURE__ */ jsxs10(
3654
- Box,
3655
- {
3656
- m: "4",
3657
- p: "4",
3658
- className: "flex flex-col gap-2 border-[rgba(var(--border-color), 0.6)]",
3659
- children: [
3660
- /* @__PURE__ */ jsxs10(
3661
- Select.Root,
3662
- {
3663
- variant: "solid",
3664
- value: appearance,
3665
- onValueChange: (change) => onAppearanceChange?.(change),
3666
- children: [
3667
- /* @__PURE__ */ jsx39(Select.Label, { position: "inside", children: "Theme Settings" }),
3668
- /* @__PURE__ */ jsx39(Select.Trigger, {}),
3669
- /* @__PURE__ */ jsxs10(Select.Content, { children: [
3670
- /* @__PURE__ */ jsx39(Select.Item, { value: "light", children: "Light" }),
3671
- /* @__PURE__ */ jsx39(Select.Item, { value: "dark", children: "Dark" })
3672
- ] })
3673
- ]
3674
- }
3675
- ),
3676
- /* @__PURE__ */ jsxs10(
3677
- Select.Root,
3678
- {
3679
- variant: "solid",
3680
- value: radius,
3681
- onValueChange: (change) => onRadiusChange?.(change),
3682
- children: [
3683
- /* @__PURE__ */ jsx39(Select.Label, { position: "inside", children: "Radius" }),
3684
- /* @__PURE__ */ jsx39(Select.Trigger, {}),
3685
- /* @__PURE__ */ jsxs10(Select.Content, { children: [
3686
- /* @__PURE__ */ jsx39(Select.Item, { value: "none", children: "None" }),
3687
- /* @__PURE__ */ jsx39(Select.Item, { value: "xs", children: "XS" }),
3688
- /* @__PURE__ */ jsx39(Select.Item, { value: "sm", children: "SM" }),
3689
- /* @__PURE__ */ jsx39(Select.Item, { value: "md", children: "MD" }),
3690
- /* @__PURE__ */ jsx39(Select.Item, { value: "lg", children: "LG" }),
3691
- /* @__PURE__ */ jsx39(Select.Item, { value: "xl", children: "XL" }),
3692
- /* @__PURE__ */ jsx39(Select.Item, { value: "full", children: "FULL" })
3693
- ] })
3694
- ]
3695
- }
3696
- ),
3697
- /* @__PURE__ */ jsxs10(
3698
- Select.Root,
3699
- {
3700
- variant: "solid",
3701
- value: roundness2,
3702
- onValueChange: (change) => onRoundnessChange?.(change),
3703
- children: [
3704
- /* @__PURE__ */ jsx39(Select.Label, { className: "min-w-40!", position: "inside", children: "Roundness" }),
3705
- /* @__PURE__ */ jsx39(Select.Trigger, {}),
3706
- /* @__PURE__ */ jsxs10(Select.Content, { children: [
3707
- /* @__PURE__ */ jsx39(Select.Item, { value: "1", children: "1" }),
3708
- /* @__PURE__ */ jsx39(Select.Item, { value: "2", children: "2" }),
3709
- /* @__PURE__ */ jsx39(Select.Item, { value: "3", children: "3" }),
3710
- /* @__PURE__ */ jsx39(Select.Item, { value: "4", children: "4" }),
3711
- /* @__PURE__ */ jsx39(Select.Item, { value: "5", children: "5" }),
3712
- /* @__PURE__ */ jsx39(Select.Item, { value: "6", children: "6" })
3713
- ] })
3714
- ]
3715
- }
3716
- ),
3717
- /* @__PURE__ */ jsxs10(
3718
- Select.Root,
3719
- {
3720
- variant: "solid",
3721
- value: spacing,
3722
- onValueChange: (change) => onSpacingChange?.(change),
3723
- children: [
3724
- /* @__PURE__ */ jsx39(Select.Label, { position: "inside", children: "Spacing" }),
3725
- /* @__PURE__ */ jsx39(Select.Trigger, {}),
3726
- /* @__PURE__ */ jsxs10(Select.Content, { children: [
3727
- /* @__PURE__ */ jsx39(Select.Item, { value: "xs", children: "XS" }),
3728
- /* @__PURE__ */ jsx39(Select.Item, { value: "sm", children: "SM" }),
3729
- /* @__PURE__ */ jsx39(Select.Item, { value: "md", children: "MD" }),
3730
- /* @__PURE__ */ jsx39(Select.Item, { value: "lg", children: "LG" }),
3731
- /* @__PURE__ */ jsx39(Select.Item, { value: "xl", children: "XL" })
3732
- ] })
3733
- ]
3734
- }
3735
- )
3736
- ]
3737
- }
3738
- ) }) });
3739
- }
2
+ Accordion,
3
+ Badge,
4
+ Box,
5
+ Button,
6
+ Checkbox,
7
+ Container,
8
+ Flex,
9
+ Panel,
10
+ Portal,
11
+ ProgressBar,
12
+ Select,
13
+ Separator,
14
+ Switch,
15
+ Text,
16
+ Theme,
17
+ ThemeControl,
18
+ useTheme
19
+ } from "./components";
3740
20
  export {
3741
21
  Accordion,
3742
22
  Badge,