@locus-ui/components 0.0.15 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +163 -67
  644. package/dist/index.d.mts +81 -1486
  645. package/dist/index.d.ts +81 -1486
  646. package/dist/index.js +59 -3666
  647. package/dist/index.js.map +1 -1
  648. package/dist/index.mjs +19 -3648
  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 +1 -1
  747. package/dist/index.css.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,3652 +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/panel/panel.tsx
1675
- import clsx14 from "clsx";
1676
- import * as React12 from "react";
1677
-
1678
- // src/components/panel/panel.props.ts
1679
- var PanelVariants = ["solid", "outlined", "muted"];
1680
- var PanelPropsDefs = {
1681
- /**
1682
- * Sets the variant style of the panel ("solid", "outlined", or "muted").
1683
- */
1684
- variant: {
1685
- type: "enum",
1686
- values: PanelVariants,
1687
- dataAttr: "variant"
1688
- },
1689
- /**
1690
- * The blur amount applied to the panel.
1691
- *
1692
- * @example blur="4px" // Sets the backdrop blur to 4 pixels
1693
- * @default "2px"
1694
- */
1695
- blur: {
1696
- type: "string",
1697
- default: "2px",
1698
- cssProperty: "--panel-blur"
1699
- }
1700
- };
1701
-
1702
- // src/components/panel/panel.tsx
1703
- import { jsx as jsx15 } from "react/jsx-runtime";
1704
- var Panel = React12.forwardRef((props, ref) => {
1705
- const { className, dataAttrs, children, ...rest } = getComponentProps(
1706
- props,
1707
- PanelPropsDefs,
1708
- MarginPropDefs,
1709
- PaddingPropDefs,
1710
- SpacingPropDef,
1711
- RadiusPropDefs,
1712
- RoundnessPropDef,
1713
- ColorPropDef
1714
- );
1715
- return /* @__PURE__ */ jsx15(
1716
- "div",
1717
- {
1718
- ref,
1719
- className: clsx14("panel", className),
1720
- ...dataAttrs,
1721
- ...rest,
1722
- children
1723
- }
1724
- );
1725
- });
1726
- Panel.displayName = "Panel";
1727
-
1728
- // src/components/portal/backdrop/portal-backdrop.tsx
1729
- import clsx15 from "clsx";
1730
- import * as React14 from "react";
1731
-
1732
- // src/components/portal/portal-context.tsx
1733
- import * as React13 from "react";
1734
- var PortalContext = React13.createContext(
1735
- void 0
1736
- );
1737
- function usePortalContext() {
1738
- const context = React13.useContext(PortalContext);
1739
- if (!context) {
1740
- throw new Error("`usePortalContext` must be used within a `Portal.Root`");
1741
- }
1742
- return context;
1743
- }
1744
-
1745
- // src/components/portal/backdrop/portal-backdrop.props.ts
1746
- var variants = ["clear", "shadow", "blurred"];
1747
- var PortalBackdropPropsDefs = {
1748
- /**
1749
- * The visual style variant of the backdrop.
1750
- *
1751
- * @example variant="blurred" // Applies a blurred effect to the backdrop
1752
- * @default "clear"
1753
- */
1754
- variant: {
1755
- type: "enum",
1756
- values: variants,
1757
- default: "clear",
1758
- dataAttr: "variant"
1759
- },
1760
- /**
1761
- * The opacity level of the backdrop.
1762
- *
1763
- * @example opacity="0.5" // Sets the backdrop opacity to 50%
1764
- * @default "0.3"
1765
- */
1766
- opacity: {
1767
- type: "string",
1768
- default: "0.3",
1769
- cssProperty: "--backdrop-opacity"
1770
- },
1771
- /**
1772
- * The blur amount applied to the backdrop when the "blurred" variant is used.
1773
- *
1774
- * @example blur="4px" // Sets the backdrop blur to 4 pixels
1775
- * @default "2px"
1776
- */
1777
- blur: {
1778
- type: "string",
1779
- default: "2px",
1780
- cssProperty: "--backdrop-blur"
1781
- }
1782
- };
1783
-
1784
- // src/components/portal/backdrop/portal-backdrop.tsx
1785
- import { jsx as jsx16 } from "react/jsx-runtime";
1786
- var PortalBackdrop = React14.forwardRef(
1787
- (props, ref) => {
1788
- const context = usePortalContext();
1789
- const { className, dataAttrs, ...rest } = getComponentProps(
1790
- props,
1791
- PortalBackdropPropsDefs
1792
- );
1793
- if (!context.open) return null;
1794
- return /* @__PURE__ */ jsx16(
1795
- "div",
1796
- {
1797
- ref,
1798
- className: clsx15("portal-backdrop", className),
1799
- ...dataAttrs,
1800
- ...rest
1801
- }
1802
- );
1803
- }
1804
- );
1805
- PortalBackdrop.displayName = "Portal.Backdrop";
1806
-
1807
- // src/components/portal/content/portal-content.tsx
1808
- import clsx16 from "clsx";
1809
- import * as React17 from "react";
1810
- import ReactDOM from "react-dom";
1811
-
1812
- // src/components/theme/theme-context.tsx
1813
- import * as React15 from "react";
1814
- var ThemeContext = React15.createContext(
1815
- void 0
1816
- );
1817
- function useTheme() {
1818
- const context = React15.useContext(ThemeContext);
1819
- if (!context) {
1820
- throw new Error("`useTheme` must be used within a `Theme`");
1821
- }
1822
- return context;
1823
- }
1824
-
1825
- // src/components/portal/utils/use-anchor-position.ts
1826
- import * as React16 from "react";
1827
- function useAnchorPosition({
1828
- anchorRef,
1829
- contentRef,
1830
- side = "bottom",
1831
- align = "center",
1832
- sideOffset = 0,
1833
- alignOffset = 0,
1834
- enabled = true
1835
- }) {
1836
- const [position, setPosition] = React16.useState(null);
1837
- const [, _forceUpdate] = React16.useReducer((x) => x + 1, 0);
1838
- const updatePosition = React16.useCallback(() => {
1839
- const anchor = anchorRef.current;
1840
- const content = contentRef.current;
1841
- if (!anchor || !content || !enabled) {
1842
- setPosition(null);
1843
- return;
1844
- }
1845
- const anchorRect = anchor.getBoundingClientRect();
1846
- const contentRect = content.getBoundingClientRect();
1847
- let top = 0;
1848
- let left = 0;
1849
- switch (side) {
1850
- case "top":
1851
- top = anchorRect.top - contentRect.height - sideOffset;
1852
- break;
1853
- case "bottom":
1854
- top = anchorRect.bottom + sideOffset;
1855
- break;
1856
- case "left":
1857
- left = anchorRect.left - contentRect.width - sideOffset;
1858
- break;
1859
- case "right":
1860
- left = anchorRect.right + sideOffset;
1861
- break;
1862
- }
1863
- if (side === "top" || side === "bottom") {
1864
- switch (align) {
1865
- case "start":
1866
- left = anchorRect.left + alignOffset;
1867
- break;
1868
- case "center":
1869
- left = anchorRect.left + (anchorRect.width - contentRect.width) / 2 + alignOffset;
1870
- break;
1871
- case "end":
1872
- left = anchorRect.right - contentRect.width + alignOffset;
1873
- break;
1874
- }
1875
- } else {
1876
- switch (align) {
1877
- case "start":
1878
- top = anchorRect.top + alignOffset;
1879
- break;
1880
- case "center":
1881
- top = anchorRect.top + (anchorRect.height - contentRect.height) / 2 + alignOffset;
1882
- break;
1883
- case "end":
1884
- top = anchorRect.bottom - contentRect.height + alignOffset;
1885
- break;
1886
- }
1887
- }
1888
- top += window.scrollY;
1889
- left += window.scrollX;
1890
- const viewportWidth = window.innerWidth;
1891
- const viewportHeight = window.innerHeight;
1892
- left = Math.max(0, Math.min(left, viewportWidth - contentRect.width));
1893
- top = Math.max(
1894
- 0,
1895
- Math.min(top, viewportHeight - contentRect.height + window.scrollY)
1896
- );
1897
- setPosition({ top, left });
1898
- }, [anchorRef, contentRef, side, align, sideOffset, alignOffset, enabled]);
1899
- React16.useEffect(() => {
1900
- if (!enabled) {
1901
- setPosition(null);
1902
- return;
1903
- }
1904
- let attempts = 0;
1905
- const maxAttempts = 10;
1906
- const tryUpdate = () => {
1907
- attempts++;
1908
- if (anchorRef.current && contentRef.current) {
1909
- updatePosition();
1910
- } else if (attempts < maxAttempts) {
1911
- requestAnimationFrame(tryUpdate);
1912
- }
1913
- };
1914
- requestAnimationFrame(tryUpdate);
1915
- window.addEventListener("scroll", updatePosition, true);
1916
- window.addEventListener("resize", updatePosition);
1917
- return () => {
1918
- window.removeEventListener("scroll", updatePosition, true);
1919
- window.removeEventListener("resize", updatePosition);
1920
- };
1921
- }, [enabled, updatePosition, anchorRef, contentRef]);
1922
- return position;
1923
- }
1924
-
1925
- // src/components/portal/content/portal-content.props.ts
1926
- var positions = [
1927
- "tl",
1928
- "top",
1929
- "tr",
1930
- "left",
1931
- "center",
1932
- "right",
1933
- "bl",
1934
- "bottom",
1935
- "br"
1936
- ];
1937
- var anchorSides = ["top", "right", "bottom", "left"];
1938
- var PortalContentPropsDefs = {
1939
- /**
1940
- * The position of the portal content relative to the screen if no anchor is used.
1941
- *
1942
- * @example position="bl" // Portal renders at bottom-left of the screen
1943
- */
1944
- position: {
1945
- type: "enum",
1946
- values: positions,
1947
- default: "center",
1948
- dataAttr: "position"
1949
- },
1950
- /**
1951
- * Whether the portal content is anchored to an element.
1952
- *
1953
- * When anchored, the portal content is positioned relative to the trigger element unless a custom anchorRef is provided.
1954
- */
1955
- anchored: {
1956
- type: "boolean",
1957
- dataAttr: "anchored"
1958
- },
1959
- /**
1960
- * The side of the anchor element to position the portal content on.
1961
- *
1962
- * @default "bottom"
1963
- */
1964
- side: {
1965
- type: "enum",
1966
- values: anchorSides,
1967
- default: "bottom"
1968
- },
1969
- /** Offset in pixels from the anchor element along the side axis. */
1970
- sideOffset: {
1971
- type: "string"
1972
- },
1973
- /** Offset in pixels along the alignment axis. */
1974
- alignOffset: {
1975
- type: "string"
1976
- }
1977
- };
1978
-
1979
- // src/components/portal/content/portal-content.tsx
1980
- import { jsx as jsx17 } from "react/jsx-runtime";
1981
- var PortalContent = React17.forwardRef(
1982
- (props, ref) => {
1983
- const portalContext = usePortalContext();
1984
- const themeContext = React17.useContext(ThemeContext);
1985
- const contentRef = React17.useRef(null);
1986
- const {
1987
- side = "bottom",
1988
- align = "center",
1989
- sideOffset = "0",
1990
- alignOffset = "0",
1991
- anchored = false,
1992
- children,
1993
- className,
1994
- dataAttrs,
1995
- style
1996
- } = getComponentProps(props, PortalContentPropsDefs, AlignPropDef);
1997
- const anchorRef = portalContext.anchorRef ?? portalContext.triggerRef;
1998
- const anchorPosition = useAnchorPosition({
1999
- anchorRef,
2000
- contentRef,
2001
- side,
2002
- align,
2003
- sideOffset: parseInt(sideOffset, 10) || 0,
2004
- alignOffset: parseInt(alignOffset, 10) || 0,
2005
- enabled: anchored && portalContext.open
2006
- });
2007
- const setRefs = React17.useCallback(
2008
- (node) => {
2009
- contentRef.current = node;
2010
- if (typeof ref === "function") {
2011
- ref(node);
2012
- } else if (ref) {
2013
- ref.current = node;
2014
- }
2015
- },
2016
- [ref]
2017
- );
2018
- React17.useEffect(() => {
2019
- if (!portalContext.open) return;
2020
- function onKeyDown(e) {
2021
- if (e.key === "Escape") {
2022
- portalContext.onOpenChange?.(false);
2023
- }
2024
- }
2025
- document.addEventListener("keydown", onKeyDown);
2026
- return () => {
2027
- document.removeEventListener("keydown", onKeyDown);
2028
- };
2029
- }, [portalContext.open, portalContext.onOpenChange]);
2030
- React17.useEffect(() => {
2031
- if (!portalContext.open || !anchored) return;
2032
- function onClickOutside(e) {
2033
- const target = e.target;
2034
- const content2 = contentRef.current;
2035
- const trigger = (portalContext.anchorRef ?? portalContext.triggerRef)?.current;
2036
- if (content2?.contains(target) || trigger?.contains(target)) {
2037
- return;
2038
- }
2039
- portalContext.onOpenChange?.(false);
2040
- }
2041
- const timeoutId = setTimeout(() => {
2042
- document.addEventListener("click", onClickOutside);
2043
- }, 0);
2044
- return () => {
2045
- clearTimeout(timeoutId);
2046
- document.removeEventListener("click", onClickOutside);
2047
- };
2048
- }, [
2049
- portalContext.open,
2050
- portalContext.onOpenChange,
2051
- portalContext.anchorRef,
2052
- portalContext.triggerRef,
2053
- anchored
2054
- ]);
2055
- const container = portalContext.open && globalThis?.document?.body;
2056
- if (!container) return null;
2057
- const combinedStyle = {
2058
- ...style,
2059
- ...anchored && anchorPosition ? {
2060
- position: "absolute",
2061
- top: anchorPosition.top,
2062
- left: anchorPosition.left
2063
- } : {}
2064
- };
2065
- const portalContent = /* @__PURE__ */ jsx17(
2066
- "div",
2067
- {
2068
- ref: setRefs,
2069
- className: clsx16("portal", className),
2070
- "data-appearance": themeContext?.appearance,
2071
- "data-radius": themeContext?.radius,
2072
- "data-roundness": themeContext?.roundness ?? "theme",
2073
- "data-spacing": themeContext?.spacing ?? "theme",
2074
- "data-theme-radius": themeContext?.radius,
2075
- "data-theme-roundness": themeContext?.roundness,
2076
- "data-theme-spacing": themeContext?.spacing,
2077
- onClick: anchored ? void 0 : () => portalContext.onOpenChange?.(false),
2078
- style: combinedStyle,
2079
- ...dataAttrs,
2080
- children: /* @__PURE__ */ jsx17(
2081
- "div",
2082
- {
2083
- className: "portal-content",
2084
- onClick: (e) => e.stopPropagation(),
2085
- children
2086
- }
2087
- )
2088
- }
2089
- );
2090
- const content = themeContext ? /* @__PURE__ */ jsx17(ThemeContext.Provider, { value: themeContext, children: portalContent }) : portalContent;
2091
- return ReactDOM.createPortal(content, container);
2092
- }
2093
- );
2094
- PortalContent.displayName = "Portal.Content";
2095
-
2096
- // src/components/portal/root/portal-root.tsx
2097
- import * as React19 from "react";
2098
-
2099
- // src/components/portal/trigger/portal-trigger.tsx
2100
- import * as React18 from "react";
2101
- import { jsx as jsx18 } from "react/jsx-runtime";
2102
- var PortalTrigger = React18.forwardRef(
2103
- ({ children, asChild, onClick, ...props }, ref) => {
2104
- const context = usePortalContext();
2105
- const internalRef = React18.useRef(null);
2106
- React18.useEffect(() => {
2107
- if (internalRef.current) {
2108
- context.triggerRef.current = internalRef.current;
2109
- }
2110
- }, [context.triggerRef]);
2111
- const handleClick = (event) => {
2112
- context.onOpenChange?.(!context.open);
2113
- onClick?.(event);
2114
- };
2115
- const setRefs = React18.useCallback(
2116
- (node) => {
2117
- internalRef.current = node;
2118
- if (typeof ref === "function") {
2119
- ref(node);
2120
- } else if (ref) {
2121
- ref.current = node;
2122
- }
2123
- context.triggerRef.current = node;
2124
- },
2125
- [ref, context.triggerRef]
2126
- );
2127
- if (asChild && React18.isValidElement(children)) {
2128
- return React18.cloneElement(children, {
2129
- ref: setRefs,
2130
- onClick: handleClick,
2131
- ...props
2132
- });
2133
- }
2134
- return /* @__PURE__ */ jsx18(
2135
- "button",
2136
- {
2137
- ref: setRefs,
2138
- type: "button",
2139
- onClick: handleClick,
2140
- "aria-expanded": context.open,
2141
- "aria-haspopup": "dialog",
2142
- ...props,
2143
- children
2144
- }
2145
- );
2146
- }
2147
- );
2148
- PortalTrigger.displayName = "Portal.Trigger";
2149
-
2150
- // src/components/portal/root/portal-root.props.ts
2151
- var PortalRootPropsDefs = {
2152
- /** Whether the portal is open. */
2153
- open: {
2154
- type: "boolean",
2155
- default: false
2156
- },
2157
- /** Callback fired when the open state changes. */
2158
- onOpenChange: {
2159
- type: "function"
2160
- },
2161
- /** Whether the portal is open by default (uncontrolled). */
2162
- defaultOpen: {
2163
- type: "boolean",
2164
- default: false
2165
- },
2166
- /** Custom anchor element ref. If not provided, the trigger is used as anchor. */
2167
- anchorRef: {
2168
- type: "reactNode"
2169
- }
2170
- };
2171
-
2172
- // src/components/portal/root/portal-root.tsx
2173
- import { jsx as jsx19 } from "react/jsx-runtime";
2174
- var ALLOWED_CHILDREN4 = [
2175
- PortalTrigger.displayName,
2176
- PortalBackdrop.displayName,
2177
- PortalContent.displayName
2178
- ];
2179
- var PortalRoot = (props) => {
2180
- const {
2181
- defaultOpen = false,
2182
- open: portalOpen,
2183
- onOpenChange,
2184
- anchorRef,
2185
- children
2186
- } = getComponentProps(props, PortalRootPropsDefs);
2187
- const [open, setOpen] = useControllableState({
2188
- value: portalOpen,
2189
- defaultValue: defaultOpen,
2190
- onChange: onOpenChange
2191
- });
2192
- const triggerRef = React19.useRef(null);
2193
- const value = React19.useMemo(
2194
- () => ({
2195
- open,
2196
- onOpenChange: setOpen,
2197
- triggerRef,
2198
- anchorRef
2199
- }),
2200
- [open, setOpen, anchorRef]
2201
- );
2202
- const validChildren = filterChildren(children, ALLOWED_CHILDREN4, {
2203
- parentDisplayName: PortalRoot.displayName
2204
- });
2205
- return /* @__PURE__ */ jsx19(PortalContext.Provider, { value, children: validChildren });
2206
- };
2207
- PortalRoot.displayName = "Portal.Root";
2208
-
2209
- // src/components/portal/portal.tsx
2210
- var Portal = {
2211
- /** The root component that provides context for the portal. */
2212
- Root: PortalRoot,
2213
- /** The trigger element that opens the portal when interacted with. */
2214
- Trigger: PortalTrigger,
2215
- /** The content displayed inside the portal when open. */
2216
- Content: PortalContent,
2217
- /** A backdrop optionally displayed behind portal content when open. */
2218
- Backdrop: PortalBackdrop
2219
- };
2220
-
2221
- // src/components/progress-bar/fill/progress-bar-fill.tsx
2222
- import clsx17 from "clsx";
2223
- import { useContext as useContext4 } from "react";
2224
-
2225
- // src/components/progress-bar/progress-bar-context.ts
2226
- import React20 from "react";
2227
- var ProgressBarContext = React20.createContext(null);
2228
-
2229
- // src/components/progress-bar/fill/progress-bar-fill.props.ts
2230
- var ProgressBarFillPropsDefs = {
2231
- /**
2232
- * The value of the progress bar (filled state).
2233
- * Should be a number between 0 and 1 representing the percentage of completion.
2234
- */
2235
- value: {
2236
- type: "number"
2237
- }
2238
- };
2239
-
2240
- // src/components/progress-bar/fill/progress-bar-fill.tsx
2241
- import { jsx as jsx20 } from "react/jsx-runtime";
2242
- var ProgressBarFill = (props) => {
2243
- const context = useContext4(ProgressBarContext);
2244
- const { value, color, style, className, dataAttrs, ...rest } = getComponentProps(props, ProgressBarFillPropsDefs);
2245
- return /* @__PURE__ */ jsx20(
2246
- "div",
2247
- {
2248
- "data-color": color ?? context?.color,
2249
- "data-variant": context?.variant,
2250
- style: { ...style, width: `${(value ?? 0) / ((context?.totalValue ?? 0) > 1 ? context.totalValue : 1) * 100}%` },
2251
- className: clsx17("progress-bar-fill", className),
2252
- ...dataAttrs,
2253
- ...rest
2254
- }
2255
- );
2256
- };
2257
- ProgressBarFill.displayName = "ProgressBar.Fill";
2258
-
2259
- // src/components/progress-bar/root/progress-bar-root.tsx
2260
- import clsx18 from "clsx";
2261
- import React21, { isValidElement as isValidElement4, useMemo as useMemo5 } from "react";
2262
-
2263
- // src/components/progress-bar/root/progress-bar-root.props.ts
2264
- var ProgressBarVariants = ["solid", "outlined", "muted"];
2265
- var ProgressBarRootPropsDefs = {
2266
- /**
2267
- * Sets the variant style of the progress bar ("solid", "outlined", or "muted").
2268
- */
2269
- variant: {
2270
- type: "enum",
2271
- values: ProgressBarVariants,
2272
- dataAttr: "variant"
2273
- },
2274
- /**
2275
- * The value of the progress bar (filled state).
2276
- * Should be a number between 0 and 1 representing the percentage of completion.
2277
- */
2278
- value: {
2279
- type: "number"
2280
- }
2281
- };
2282
-
2283
- // src/components/progress-bar/root/progress-bar-root.tsx
2284
- import { jsx as jsx21 } from "react/jsx-runtime";
2285
- var ALLOWED_CHILDREN5 = [ProgressBarFill.displayName];
2286
- var ProgressBarRoot = (props) => {
2287
- const { value, size, color, variant, className, dataAttrs, ...rest } = getComponentProps(
2288
- props,
2289
- ProgressBarRootPropsDefs,
2290
- MarginPropDefs,
2291
- SizePropDef
2292
- );
2293
- const validChildren = filterChildren(props.children, ALLOWED_CHILDREN5, {
2294
- parentDisplayName: ProgressBarRoot.displayName
2295
- });
2296
- const { fills, totalValue } = useMemo5(() => {
2297
- const fills2 = validChildren.filter(
2298
- (child) => isValidElement4(child) && child.type.displayName === ProgressBarFill.displayName
2299
- );
2300
- if (fills2.length > 0) {
2301
- const totalValue2 = fills2.reduce(
2302
- (sum, child) => sum + (isValidElement4(child) ? child.props.value ?? 0 : 0),
2303
- 0
2304
- );
2305
- return {
2306
- fills: fills2,
2307
- totalValue: totalValue2
2308
- };
2309
- }
2310
- return {
2311
- fills: [/* @__PURE__ */ jsx21(ProgressBarFill, { color, value })],
2312
- totalValue: value ?? 0
2313
- };
2314
- }, [validChildren, color, value]);
2315
- return /* @__PURE__ */ jsx21(ProgressBarContext.Provider, { value: { color, variant, totalValue }, children: /* @__PURE__ */ jsx21(
2316
- "div",
2317
- {
2318
- "data-size": size,
2319
- "data-color": color,
2320
- "data-variant": variant,
2321
- className: clsx18("progress-bar-root", className),
2322
- ...dataAttrs,
2323
- ...rest,
2324
- children: fills.map((fill, index) => /* @__PURE__ */ jsx21(React21.Fragment, { children: fill }, index))
2325
- }
2326
- ) });
2327
- };
2328
- ProgressBarRoot.displayName = "ProgressBar.Root";
2329
-
2330
- // src/components/progress-bar/progress-bar.tsx
2331
- var ProgressBar = Object.assign(ProgressBarRoot, {
2332
- /**
2333
- * The root component for the Progress Bar.
2334
- */
2335
- Root: ProgressBarRoot,
2336
- /**
2337
- * The fill component for the Progress Bar, representing the filled portion.
2338
- */
2339
- Fill: ProgressBarFill
2340
- });
2341
-
2342
- // src/components/select/content/select-content.tsx
2343
- import clsx20 from "clsx";
2344
- import * as React25 from "react";
2345
-
2346
- // src/components/select/select-context.tsx
2347
- import * as React22 from "react";
2348
- var SelectContext = React22.createContext(
2349
- null
2350
- );
2351
- function useSelectContext() {
2352
- const context = React22.useContext(SelectContext);
2353
- if (!context) {
2354
- throw new Error("Select components must be used within a Select.Root");
2355
- }
2356
- return context;
2357
- }
2358
-
2359
- // src/components/select/utils/user-composed-refs.ts
2360
- import * as React23 from "react";
2361
- function useComposedRefs(...refs) {
2362
- return React23.useCallback(
2363
- (node) => {
2364
- refs.forEach((ref) => {
2365
- if (typeof ref === "function") {
2366
- ref(node);
2367
- } else if (ref != null) {
2368
- ref.current = node;
2369
- }
2370
- });
2371
- },
2372
- [refs]
2373
- );
2374
- }
2375
-
2376
- // src/components/select/viewport/select-viewport.tsx
2377
- import clsx19 from "clsx";
2378
- import * as React24 from "react";
2379
- import { jsx as jsx22 } from "react/jsx-runtime";
2380
- var SelectViewport = React24.forwardRef(
2381
- (props, ref) => {
2382
- const { className, children, ...rest } = props;
2383
- return /* @__PURE__ */ jsx22("div", { ref, className: clsx19("select-viewport", className), ...rest, children });
2384
- }
2385
- );
2386
- SelectViewport.displayName = "Select.Viewport";
2387
-
2388
- // src/components/select/content/select-content.tsx
2389
- import { jsx as jsx23 } from "react/jsx-runtime";
2390
- var SelectContent = React25.forwardRef(
2391
- (props, forwardedRef) => {
2392
- const {
2393
- className,
2394
- children,
2395
- position = "popper",
2396
- side = "bottom",
2397
- offset,
2398
- align = "center",
2399
- ...rest
2400
- } = props;
2401
- const context = useSelectContext();
2402
- const composedRef = useComposedRefs(forwardedRef, context.contentRef);
2403
- React25.useEffect(() => {
2404
- context.itemValues.current = [];
2405
- }, [context.open]);
2406
- React25.useEffect(() => {
2407
- if (!context.open) return;
2408
- const handleClickOutside = (event) => {
2409
- const target = event.target;
2410
- if (context.contentRef.current && !context.contentRef.current.contains(target) && context.triggerRef.current && !context.triggerRef.current.contains(target)) {
2411
- context.onOpenChange(false);
2412
- }
2413
- };
2414
- document.addEventListener("mousedown", handleClickOutside);
2415
- return () => document.removeEventListener("mousedown", handleClickOutside);
2416
- }, [context.open]);
2417
- React25.useEffect(() => {
2418
- if (!context.open) return;
2419
- const handleKeyDown = (event) => {
2420
- const items = context.itemValues.current;
2421
- const itemCount = items.length;
2422
- switch (event.key) {
2423
- case "ArrowDown":
2424
- event.preventDefault();
2425
- context.setHighlightedIndex(
2426
- (prev) => prev < itemCount - 1 ? prev + 1 : 0
2427
- );
2428
- break;
2429
- case "ArrowUp":
2430
- event.preventDefault();
2431
- context.setHighlightedIndex(
2432
- (prev) => prev > 0 ? prev - 1 : itemCount - 1
2433
- );
2434
- break;
2435
- case "Tab":
2436
- event.preventDefault();
2437
- if (event.shiftKey) {
2438
- context.setHighlightedIndex(
2439
- (prev) => prev > 0 ? prev - 1 : itemCount - 1
2440
- );
2441
- } else {
2442
- context.setHighlightedIndex(
2443
- (prev) => prev < itemCount - 1 ? prev + 1 : 0
2444
- );
2445
- }
2446
- break;
2447
- case "Enter":
2448
- case " ":
2449
- event.preventDefault();
2450
- if (context.highlightedIndex >= 0) {
2451
- const selectedValue = items[context.highlightedIndex];
2452
- if (selectedValue) {
2453
- context.onValueChange(selectedValue);
2454
- const displayText = children;
2455
- if (displayText) context.setDisplayValue(displayText);
2456
- context.onOpenChange(false);
2457
- }
2458
- }
2459
- break;
2460
- case "Escape":
2461
- event.preventDefault();
2462
- context.onOpenChange(false);
2463
- context.triggerRef.current?.focus();
2464
- break;
2465
- }
2466
- };
2467
- document.addEventListener("keydown", handleKeyDown);
2468
- return () => document.removeEventListener("keydown", handleKeyDown);
2469
- }, [context.open, context.highlightedIndex]);
2470
- const [contentWidth, setContentWidth] = React25.useState();
2471
- const labelInside = context.labelPosition === "inside";
2472
- const anchorRef = labelInside ? context.rootRef : context.triggerRef;
2473
- React25.useLayoutEffect(() => {
2474
- if (context.open && anchorRef.current) {
2475
- setContentWidth(anchorRef.current.getBoundingClientRect().width);
2476
- }
2477
- }, [context.open, context.labelPosition, anchorRef]);
2478
- if (!context.open) {
2479
- return /* @__PURE__ */ jsx23("div", { style: { display: "none" }, "aria-hidden": "true", children });
2480
- }
2481
- return /* @__PURE__ */ jsx23(
2482
- Portal.Root,
2483
- {
2484
- open: context.open,
2485
- onOpenChange: context.onOpenChange,
2486
- anchorRef,
2487
- children: /* @__PURE__ */ jsx23(Portal.Content, { anchored: true, side, align, sideOffset: offset, children: /* @__PURE__ */ jsx23(
2488
- "div",
2489
- {
2490
- ref: composedRef,
2491
- role: "listbox",
2492
- "data-state": context.open ? "open" : "closed",
2493
- "data-side": side,
2494
- "data-align": align,
2495
- "data-trigger-variant": context.triggerVariant,
2496
- className: clsx20("select-content", className),
2497
- style: { width: contentWidth },
2498
- ...rest,
2499
- children: /* @__PURE__ */ jsx23(SelectViewport, { children })
2500
- }
2501
- ) })
2502
- }
2503
- );
2504
- }
2505
- );
2506
- SelectContent.displayName = "Select.Content";
2507
-
2508
- // src/components/select/group/select-group.tsx
2509
- import clsx21 from "clsx";
2510
- import * as React26 from "react";
2511
-
2512
- // src/components/select/group/select-group.props.ts
2513
- var SelectGroupsPropDefs = {
2514
- title: {
2515
- type: "string"
2516
- }
2517
- };
2518
-
2519
- // src/components/select/group/select-group.tsx
2520
- import { jsx as jsx24, jsxs as jsxs5 } from "react/jsx-runtime";
2521
- var SelectGroup = React26.forwardRef(
2522
- (props, ref) => {
2523
- const { className, children, dataAttrs, ...rest } = getComponentProps(
2524
- props,
2525
- SelectGroupsPropDefs
2526
- );
2527
- return /* @__PURE__ */ jsxs5(
2528
- "div",
2529
- {
2530
- ref,
2531
- role: "group",
2532
- className: clsx21("select-group", className),
2533
- ...rest,
2534
- children: [
2535
- /* @__PURE__ */ jsx24(Text, { className: "select-group-label", disabled: true, children: props.title }),
2536
- children
2537
- ]
2538
- }
2539
- );
2540
- }
2541
- );
2542
- SelectGroup.displayName = "Select.Group";
2543
-
2544
- // src/components/select/item/select-item.tsx
2545
- import clsx22 from "clsx";
2546
- import * as React27 from "react";
2547
-
2548
- // src/components/select/item/select-item-indicator.tsx
2549
- import { jsx as jsx25 } from "react/jsx-runtime";
2550
- var SelectItemIndicator = () => {
2551
- return /* @__PURE__ */ jsx25("span", { className: "select-item-indicator", children: /* @__PURE__ */ jsx25(
2552
- "svg",
2553
- {
2554
- width: "20",
2555
- height: "20",
2556
- viewBox: "0 0 15 15",
2557
- fill: "none",
2558
- xmlns: "http://www.w3.org/2000/svg",
2559
- children: /* @__PURE__ */ jsx25(
2560
- "path",
2561
- {
2562
- 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",
2563
- fill: "currentColor",
2564
- fillRule: "evenodd",
2565
- clipRule: "evenodd"
2566
- }
2567
- )
2568
- }
2569
- ) });
2570
- };
2571
-
2572
- // src/components/select/item/select-item.props.ts
2573
- var SelectItemPropDefs = {
2574
- value: {
2575
- type: "string"
2576
- },
2577
- disabled: {
2578
- type: "boolean",
2579
- default: false
2580
- }
2581
- };
2582
-
2583
- // src/components/select/item/select-item.tsx
2584
- import { jsx as jsx26, jsxs as jsxs6 } from "react/jsx-runtime";
2585
- var SelectItem = React27.forwardRef(
2586
- (props, ref) => {
2587
- const context = useSelectContext();
2588
- const { value, disabled, children, className, ...rest } = getComponentProps(
2589
- props,
2590
- SelectItemPropDefs
2591
- );
2592
- const selected = context.value === value;
2593
- React27.useEffect(() => {
2594
- if (selected && children) {
2595
- context.setDisplayValue(children);
2596
- }
2597
- }, [selected]);
2598
- React27.useEffect(() => {
2599
- if (!value) return;
2600
- if (!disabled) {
2601
- const values = context.itemValues.current;
2602
- if (!values.includes(value)) values.push(value);
2603
- }
2604
- return () => {
2605
- const values = context.itemValues.current;
2606
- const index = values.indexOf(value);
2607
- if (index > -1) values.splice(index, 1);
2608
- };
2609
- }, [value, disabled]);
2610
- const itemIndex = value ? context.itemValues.current.indexOf(value) : -1;
2611
- const isHighlighted = context.highlightedIndex >= 0 && context.highlightedIndex === itemIndex;
2612
- const handleClick = () => {
2613
- if (!disabled) {
2614
- if (value) {
2615
- context.onValueChange(value);
2616
- context.setDisplayValue(children);
2617
- }
2618
- context.onOpenChange(false);
2619
- context.triggerRef.current?.focus();
2620
- }
2621
- };
2622
- const handleMouseEnter = () => {
2623
- if (!disabled) context.setHighlightedIndex(itemIndex);
2624
- };
2625
- return /* @__PURE__ */ jsxs6(
2626
- Box,
2627
- {
2628
- ref,
2629
- role: "option",
2630
- radius: "none",
2631
- "aria-selected": selected,
2632
- "aria-disabled": disabled,
2633
- "data-variant": context.triggerVariant,
2634
- "data-state": selected ? "checked" : "unchecked",
2635
- "data-highlighted": isHighlighted ? "" : void 0,
2636
- "data-disabled": disabled ? "" : void 0,
2637
- className: clsx22("select-item", className),
2638
- onClick: handleClick,
2639
- onMouseEnter: handleMouseEnter,
2640
- ...rest,
2641
- children: [
2642
- /* @__PURE__ */ jsx26(
2643
- Box,
2644
- {
2645
- style: { width: 24, height: 24, justifyContent: "center" },
2646
- className: "flex items-center",
2647
- children: selected && /* @__PURE__ */ jsx26(SelectItemIndicator, {})
2648
- }
2649
- ),
2650
- /* @__PURE__ */ jsx26(Text, { disabled, children })
2651
- ]
2652
- }
2653
- );
2654
- }
2655
- );
2656
- SelectItem.displayName = "Select.Item";
2657
-
2658
- // src/components/select/label/select-label.tsx
2659
- import clsx23 from "clsx";
2660
- import * as React28 from "react";
2661
-
2662
- // src/components/select/label/select-label.props.ts
2663
- var labelPositions2 = ["top", "left", "inside"];
2664
- var SelectLabelPropDefs = {
2665
- position: {
2666
- type: "enum",
2667
- values: labelPositions2,
2668
- default: "top",
2669
- dataAttr: "position"
2670
- }
2671
- };
2672
-
2673
- // src/components/select/label/select-label.tsx
2674
- import { jsx as jsx27 } from "react/jsx-runtime";
2675
- var SelectLabel = React28.forwardRef(
2676
- (props, ref) => {
2677
- const context = useSelectContext();
2678
- const { className, children, position, dataAttrs } = getComponentProps(
2679
- props,
2680
- SelectLabelPropDefs
2681
- );
2682
- React28.useLayoutEffect(() => {
2683
- context.setLabelPosition?.(position ?? "top");
2684
- }, [position, context.setLabelPosition]);
2685
- return /* @__PURE__ */ jsx27(
2686
- "label",
2687
- {
2688
- ref,
2689
- htmlFor: context.labelId,
2690
- className: clsx23("select-label", className),
2691
- ...dataAttrs,
2692
- children: /* @__PURE__ */ jsx27(Text, { disabled: context.disabled, children })
2693
- }
2694
- );
2695
- }
2696
- );
2697
- SelectLabel.displayName = "Select.Label";
2698
-
2699
- // src/components/select/root/select-root.tsx
2700
- import clsx27 from "clsx";
2701
- import {
2702
- useId as useId2,
2703
- useLayoutEffect as useLayoutEffect3,
2704
- useMemo as useMemo6,
2705
- useRef as useRef5,
2706
- useState as useState6
2707
- } from "react";
2708
-
2709
- // src/components/select/trigger/select-trigger.tsx
2710
- import clsx26 from "clsx";
2711
- import * as React30 from "react";
2712
-
2713
- // src/components/select/value/select-value.tsx
2714
- import clsx24 from "clsx";
2715
- import * as React29 from "react";
2716
- import { jsx as jsx28 } from "react/jsx-runtime";
2717
- var SelectValue = React29.forwardRef(
2718
- (props, ref) => {
2719
- const { className, placeholder: placeholderProp, ...rest } = props;
2720
- const context = useSelectContext();
2721
- const placeholder = placeholderProp ?? context.placeholder;
2722
- return /* @__PURE__ */ jsx28(
2723
- "span",
2724
- {
2725
- ref,
2726
- className: clsx24("select-value", className),
2727
- "data-placeholder": !context.value ? "" : void 0,
2728
- ...rest,
2729
- children: /* @__PURE__ */ jsx28(Text, { disabled: context.disabled, children: context.displayValue || placeholder })
2730
- }
2731
- );
2732
- }
2733
- );
2734
- SelectValue.displayName = "Select.Value";
2735
-
2736
- // src/components/select/trigger/select-trigger-icon.tsx
2737
- import clsx25 from "clsx";
2738
- import { jsx as jsx29 } from "react/jsx-runtime";
2739
- var SelectTriggerIcon = (props) => {
2740
- const { className, ...rest } = props;
2741
- return /* @__PURE__ */ jsx29(
2742
- "svg",
2743
- {
2744
- className: clsx25("select-trigger-icon", className),
2745
- width: "20",
2746
- height: "20",
2747
- viewBox: "0 0 15 15",
2748
- fill: "none",
2749
- xmlns: "http://www.w3.org/2000/svg",
2750
- ...rest,
2751
- children: /* @__PURE__ */ jsx29(
2752
- "path",
2753
- {
2754
- 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",
2755
- fill: "currentColor",
2756
- fillRule: "evenodd",
2757
- clipRule: "evenodd"
2758
- }
2759
- )
2760
- }
2761
- );
2762
- };
2763
-
2764
- // src/components/select/trigger/select-trigger.props.ts
2765
- var SelectTriggerPropsDefs = {};
2766
-
2767
- // src/components/select/trigger/select-trigger.tsx
2768
- import { jsx as jsx30, jsxs as jsxs7 } from "react/jsx-runtime";
2769
- var SelectTrigger = React30.forwardRef(
2770
- (props, forwardedRef) => {
2771
- const {
2772
- className,
2773
- disabled: disabledProp,
2774
- dataAttrs
2775
- } = getComponentProps(props, SelectTriggerPropsDefs);
2776
- const context = useSelectContext();
2777
- const disabled = disabledProp ?? context.disabled;
2778
- const isInsideLabel = context.labelPosition === "inside";
2779
- const composedRef = useComposedRefs(forwardedRef, context.triggerRef);
2780
- const handleClick = () => {
2781
- if (!disabled) {
2782
- context.onOpenChange(!context.open);
2783
- }
2784
- };
2785
- const handleKeyDown = (event) => {
2786
- if (disabled) return;
2787
- switch (event.key) {
2788
- case "Enter":
2789
- case " ":
2790
- case "ArrowDown":
2791
- case "ArrowUp":
2792
- event.preventDefault();
2793
- context.onOpenChange(true);
2794
- break;
2795
- }
2796
- };
2797
- if (isInsideLabel) {
2798
- return /* @__PURE__ */ jsxs7(
2799
- "div",
2800
- {
2801
- ref: composedRef,
2802
- "data-state": context.open ? "open" : "closed",
2803
- "data-disabled": disabled ? "" : void 0,
2804
- "data-variant": context.triggerVariant,
2805
- className: clsx26("select-trigger", className),
2806
- ...dataAttrs,
2807
- children: [
2808
- /* @__PURE__ */ jsx30(SelectValue, {}),
2809
- /* @__PURE__ */ jsx30(SelectTriggerIcon, {})
2810
- ]
2811
- }
2812
- );
2813
- }
2814
- return /* @__PURE__ */ jsxs7(
2815
- "button",
2816
- {
2817
- ref: composedRef,
2818
- type: "button",
2819
- role: "combobox",
2820
- "aria-expanded": context.open,
2821
- "aria-haspopup": "listbox",
2822
- "aria-disabled": disabled,
2823
- disabled,
2824
- "data-state": context.open ? "open" : "closed",
2825
- "data-disabled": disabled ? "" : void 0,
2826
- className: clsx26("select-trigger", className),
2827
- onClick: handleClick,
2828
- onKeyDown: handleKeyDown,
2829
- "data-variant": context.triggerVariant,
2830
- ...dataAttrs,
2831
- children: [
2832
- /* @__PURE__ */ jsx30(SelectValue, {}),
2833
- /* @__PURE__ */ jsx30(SelectTriggerIcon, {})
2834
- ]
2835
- }
2836
- );
2837
- }
2838
- );
2839
- SelectTrigger.displayName = "Select.Trigger";
2840
-
2841
- // src/components/select/root/select-root.props.ts
2842
- var selectVariants = ["outlined", "solid", "clear"];
2843
- var SelectRootPropsDefs = {
2844
- variant: {
2845
- type: "enum",
2846
- values: selectVariants,
2847
- dataAttr: "variant"
2848
- },
2849
- value: {
2850
- type: "string"
2851
- },
2852
- defaultValue: {
2853
- type: "string"
2854
- },
2855
- disabled: {
2856
- type: "boolean"
2857
- },
2858
- required: {
2859
- type: "boolean"
2860
- },
2861
- placeholder: {
2862
- type: "string"
2863
- },
2864
- name: {
2865
- type: "string"
2866
- },
2867
- onValueChange: {
2868
- type: "function"
2869
- }
2870
- };
2871
-
2872
- // src/components/select/root/select-root.tsx
2873
- import { jsx as jsx31, jsxs as jsxs8 } from "react/jsx-runtime";
2874
- var ALLOWED_CHILDREN6 = [
2875
- SelectLabel.displayName,
2876
- SelectTrigger.displayName,
2877
- SelectContent.displayName
2878
- ];
2879
- var SelectRoot = (props) => {
2880
- const {
2881
- children,
2882
- className,
2883
- dataAttrs,
2884
- value: valueProp,
2885
- defaultValue = "",
2886
- onValueChange,
2887
- disabled = false,
2888
- required = false,
2889
- placeholder,
2890
- variant,
2891
- name
2892
- } = getComponentProps(
2893
- props,
2894
- SelectRootPropsDefs,
2895
- MarginPropDefs,
2896
- RadiusPropDefs,
2897
- RoundnessPropDef
2898
- );
2899
- const [value, setValue] = useControllableState({
2900
- value: valueProp,
2901
- defaultValue,
2902
- onChange: onValueChange
2903
- });
2904
- const [open, setOpen] = useState6(false);
2905
- const [highlightedIndex, setHighlightedIndex] = useState6(-1);
2906
- const [labelPosition, setLabelPosition] = useState6("top");
2907
- const [triggerVariant, setTriggerVariant] = useState6("outlined");
2908
- const [displayValue, setDisplayValue] = useState6(null);
2909
- const labelId = useId2();
2910
- const rootRef = useRef5(null);
2911
- const triggerRef = useRef5(null);
2912
- const contentRef = useRef5(null);
2913
- const itemsRef = useRef5(/* @__PURE__ */ new Map());
2914
- const itemValues = useRef5([]);
2915
- const contextValue = useMemo6(
2916
- () => ({
2917
- open,
2918
- value,
2919
- displayValue,
2920
- onOpenChange: setOpen,
2921
- onValueChange: setValue,
2922
- setDisplayValue,
2923
- rootRef,
2924
- triggerRef,
2925
- contentRef,
2926
- labelPosition,
2927
- setLabelPosition,
2928
- triggerVariant,
2929
- setTriggerVariant,
2930
- disabled,
2931
- required,
2932
- placeholder,
2933
- name,
2934
- labelId,
2935
- highlightedIndex,
2936
- setHighlightedIndex,
2937
- itemsRef,
2938
- itemValues
2939
- }),
2940
- [
2941
- open,
2942
- value,
2943
- displayValue,
2944
- disabled,
2945
- required,
2946
- name,
2947
- placeholder,
2948
- labelId,
2949
- highlightedIndex,
2950
- labelPosition,
2951
- triggerVariant
2952
- ]
2953
- );
2954
- useLayoutEffect3(() => {
2955
- setTriggerVariant?.(variant ?? "outlined");
2956
- }, [variant, setTriggerVariant]);
2957
- const validChildren = filterChildren(children, ALLOWED_CHILDREN6, {
2958
- parentDisplayName: SelectRoot.displayName
2959
- });
2960
- const labelInside = labelPosition === "inside";
2961
- const handleClick = () => {
2962
- if (!disabled) {
2963
- setOpen(!open);
2964
- }
2965
- };
2966
- const handleKeyDown = (event) => {
2967
- if (disabled) return;
2968
- switch (event.key) {
2969
- case "Enter":
2970
- case " ":
2971
- case "ArrowDown":
2972
- case "ArrowUp":
2973
- event.preventDefault();
2974
- setOpen(true);
2975
- break;
2976
- }
2977
- };
2978
- if (labelInside) {
2979
- return /* @__PURE__ */ jsx31(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8(
2980
- "button",
2981
- {
2982
- type: "button",
2983
- role: "combobox",
2984
- "aria-expanded": open,
2985
- "aria-haspopup": "listbox",
2986
- "aria-disabled": disabled,
2987
- disabled,
2988
- ref: rootRef,
2989
- "data-state": open ? "open" : "closed",
2990
- "data-disabled": disabled ? "" : void 0,
2991
- className: clsx27("select-root", className),
2992
- onClick: handleClick,
2993
- onKeyDown: handleKeyDown,
2994
- ...dataAttrs,
2995
- children: [
2996
- validChildren,
2997
- name && /* @__PURE__ */ jsx31("input", { type: "hidden", name, value })
2998
- ]
2999
- }
3000
- ) });
3001
- }
3002
- return /* @__PURE__ */ jsx31(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8(
3003
- Box,
3004
- {
3005
- ref: rootRef,
3006
- className: clsx27("select-root", className),
3007
- ...dataAttrs,
3008
- children: [
3009
- validChildren,
3010
- name && /* @__PURE__ */ jsx31("input", { type: "hidden", name, value })
3011
- ]
3012
- }
3013
- ) });
3014
- };
3015
- SelectRoot.displayName = "Select.Root";
3016
-
3017
- // src/components/select/separator/select-separator.tsx
3018
- import clsx28 from "clsx";
3019
- import * as React31 from "react";
3020
- import { jsx as jsx32 } from "react/jsx-runtime";
3021
- var SelectSeparator = React31.forwardRef(
3022
- (props, ref) => {
3023
- const { className, ...rest } = props;
3024
- return /* @__PURE__ */ jsx32(
3025
- "div",
3026
- {
3027
- ref,
3028
- className: clsx28("select-separator", className),
3029
- ...rest
3030
- }
3031
- );
3032
- }
3033
- );
3034
- SelectSeparator.displayName = "Select.Separator";
3035
-
3036
- // src/components/select/select.tsx
3037
- var Select = {
3038
- Root: SelectRoot,
3039
- Trigger: SelectTrigger,
3040
- Content: SelectContent,
3041
- Viewport: SelectViewport,
3042
- Group: SelectGroup,
3043
- Label: SelectLabel,
3044
- Item: SelectItem,
3045
- Separator: SelectSeparator
3046
- };
3047
-
3048
- // src/components/separator/separator.tsx
3049
- import clsx29 from "clsx";
3050
-
3051
- // src/components/separator/separator.props.ts
3052
- var directions = ["horizontal", "vertical"];
3053
- var variants2 = ["solid", "dashed", "dotted"];
3054
- var SeparatorPropsDefs = {
3055
- /**
3056
- * The direction of the separator.
3057
- *
3058
- * @example direction="vertical" // positions the separator vertically
3059
- */
3060
- direction: {
3061
- type: "enum",
3062
- values: directions,
3063
- default: "horizontal",
3064
- dataAttr: "direction"
3065
- },
3066
- /**
3067
- * The variant of the separator.
3068
- *
3069
- * @example variant="dashed" // makes the separator dashed
3070
- */
3071
- variant: {
3072
- type: "enum",
3073
- values: variants2,
3074
- default: "solid",
3075
- dataAttr: "variant"
3076
- }
3077
- };
3078
-
3079
- // src/components/separator/separator.tsx
3080
- import { jsx as jsx33 } from "react/jsx-runtime";
3081
- var Separator = (props) => {
3082
- const { className, dataAttrs, style } = getComponentProps(
3083
- props,
3084
- SeparatorPropsDefs
3085
- );
3086
- return /* @__PURE__ */ jsx33(
3087
- "div",
3088
- {
3089
- className: clsx29("separator", className),
3090
- style,
3091
- ...dataAttrs
3092
- }
3093
- );
3094
- };
3095
- Separator.displayName = "Separator";
3096
-
3097
- // src/components/switch/indicator/switch-indicator.tsx
3098
- import clsx30 from "clsx";
3099
- import React33 from "react";
3100
-
3101
- // src/components/switch/switch-context.ts
3102
- import React32 from "react";
3103
- var SwitchContext = React32.createContext(
3104
- null
3105
- );
3106
- function useSwitchContext() {
3107
- const context = React32.useContext(SwitchContext);
3108
- if (!context) {
3109
- throw new Error("Switch components must be used within a Switch.Root");
3110
- }
3111
- return context;
3112
- }
3113
-
3114
- // src/components/switch/root/switch-root.props.ts
3115
- var SwitchVariants = ["solid", "outlined", "muted"];
3116
- var SwitchRootPropsDefs = {
3117
- /**
3118
- * Sets the variant style of the switch ("solid" or "outlined").
3119
- */
3120
- variant: {
3121
- type: "enum",
3122
- values: SwitchVariants,
3123
- dataAttr: "variant"
3124
- },
3125
- /**
3126
- * Sets the checked state of the switch.
3127
- *
3128
- * When using an uncontrolled switch, use `defaultChecked` instead.
3129
- * @default undefined
3130
- */
3131
- checked: {
3132
- type: "boolean",
3133
- dataAttr: "checked"
3134
- },
3135
- /**
3136
- * The value of the switch (checked state).
3137
- */
3138
- value: {
3139
- type: "boolean"
3140
- },
3141
- /**
3142
- * Sets the default checked state of the switch.
3143
- * @default undefined
3144
- */
3145
- defaultChecked: {
3146
- type: "boolean"
3147
- },
3148
- /**
3149
- * Disables the switch component.
3150
- * @default undefined
3151
- */
3152
- disabled: {
3153
- type: "boolean",
3154
- dataAttr: "disabled"
3155
- },
3156
- /**
3157
- * Makes the switch read-only.
3158
- * @default undefined
3159
- */
3160
- readonly: {
3161
- type: "boolean",
3162
- dataAttr: "readonly"
3163
- },
3164
- /**
3165
- * Marks the switch as required.
3166
- * @default undefined
3167
- */
3168
- required: {
3169
- type: "boolean",
3170
- dataAttr: "required"
3171
- },
3172
- /**
3173
- * Sets the name attribute of the switch input for form control.
3174
- * @default undefined
3175
- */
3176
- name: {
3177
- type: "string"
3178
- },
3179
- /**
3180
- * Callback fired when the checked state changes.
3181
- *
3182
- * @param value - The new checked state.
3183
- */
3184
- onCheckedChange: {
3185
- type: "function"
3186
- }
3187
- };
3188
-
3189
- // src/components/switch/indicator/switch-indicator.props.ts
3190
- var SwitchIndicatorPropDefs = {
3191
- /**
3192
- * Sets the variant style of the switch ("solid" or "outlined").
3193
- */
3194
- variant: {
3195
- type: "enum",
3196
- values: SwitchVariants,
3197
- dataAttr: "variant"
3198
- }
3199
- };
3200
-
3201
- // src/components/switch/indicator/switch-indicator.tsx
3202
- import { jsx as jsx34 } from "react/jsx-runtime";
3203
- var SwitchIndicator = React33.forwardRef((props, ref) => {
3204
- const {
3205
- value,
3206
- setValue,
3207
- hovered,
3208
- color,
3209
- disabled,
3210
- readonly,
3211
- focused,
3212
- variant: contextVariant
3213
- } = useSwitchContext();
3214
- const { size, variant, className, style, dataAttrs } = getComponentProps(
3215
- props,
3216
- SwitchIndicatorPropDefs,
3217
- SizePropDef
3218
- );
3219
- const indicatorVariant = variant || contextVariant;
3220
- const handleKeyDown = (event) => {
3221
- if (disabled || readonly) return;
3222
- if (event.key === " " || event.key === "Enter") {
3223
- event.preventDefault();
3224
- setValue(!value);
3225
- }
3226
- };
3227
- const indicatorProps = {
3228
- ...value && { "data-checked": true },
3229
- ...disabled && { "data-disabled": true },
3230
- ...readonly && { "data-readonly": true },
3231
- ...(variant || contextVariant) && { "data-variant": indicatorVariant }
3232
- };
3233
- return /* @__PURE__ */ jsx34(
3234
- "div",
3235
- {
3236
- ref,
3237
- style,
3238
- role: "switch",
3239
- "data-size": size,
3240
- "data-color": color,
3241
- "data-hovered": hovered,
3242
- "aria-disabled": disabled,
3243
- "data-focused": focused,
3244
- "aria-readonly": readonly,
3245
- onKeyDown: handleKeyDown,
3246
- tabIndex: disabled || readonly ? -1 : 0,
3247
- className: clsx30("switch-indicator", className),
3248
- ...indicatorProps,
3249
- ...dataAttrs
3250
- }
3251
- );
3252
- });
3253
- SwitchIndicator.displayName = "Switch.Indicator";
3254
-
3255
- // src/components/switch/label/switch-label.tsx
3256
- import clsx31 from "clsx";
3257
- import React34 from "react";
3258
-
3259
- // src/components/switch/label/switch-label.props.ts
3260
- var labelPositions3 = ["top", "left", "right", "bottom"];
3261
- var SwitchLabelPropDefs = {
3262
- /**
3263
- * Sets the position of the label relative to the switch.
3264
- *
3265
- * @example position="left" // positions the label to the left of the switch
3266
- * @example position="top" // positions the label above the switch
3267
- */
3268
- position: {
3269
- type: "enum",
3270
- values: labelPositions3,
3271
- dataAttr: "position"
3272
- }
3273
- };
3274
-
3275
- // src/components/switch/label/switch-label.tsx
3276
- import { jsx as jsx35 } from "react/jsx-runtime";
3277
- var SwitchLabel = React34.forwardRef(
3278
- (props, ref) => {
3279
- const context = useSwitchContext();
3280
- const { className, children, position } = getComponentProps(
3281
- props,
3282
- SwitchLabelPropDefs
3283
- );
3284
- React34.useLayoutEffect(() => {
3285
- context.setLabelPosition?.(position ?? "right");
3286
- }, [position, context.setLabelPosition]);
3287
- return /* @__PURE__ */ jsx35(
3288
- "label",
3289
- {
3290
- ref,
3291
- htmlFor: context.labelId,
3292
- className: clsx31("switch-label", className),
3293
- ...position && { [`data-position`]: position },
3294
- children: /* @__PURE__ */ jsx35(Text, { children })
3295
- }
3296
- );
3297
- }
3298
- );
3299
- SwitchLabel.displayName = "Switch.Label";
3300
-
3301
- // src/components/switch/root/switch-root.tsx
3302
- import clsx32 from "clsx";
3303
1
  import {
3304
- isValidElement as isValidElement5,
3305
- useId as useId3,
3306
- useMemo as useMemo7,
3307
- useState as useState7
3308
- } from "react";
3309
- import { jsx as jsx36, jsxs as jsxs9 } from "react/jsx-runtime";
3310
- var ALLOWED_CHILDREN7 = [
3311
- SwitchLabel.displayName,
3312
- SwitchIndicator.displayName
3313
- ];
3314
- var SwitchRoot = (props) => {
3315
- const {
3316
- name,
3317
- size,
3318
- color,
3319
- variant,
3320
- checked,
3321
- dataAttrs,
3322
- onCheckedChange,
3323
- value: valueProp,
3324
- disabled = false,
3325
- required = false,
3326
- readonly = false,
3327
- defaultChecked = false
3328
- } = getComponentProps(
3329
- props,
3330
- SwitchRootPropsDefs,
3331
- AlignPropDef,
3332
- MarginPropDefs,
3333
- SizePropDef,
3334
- ColorPropDef
3335
- );
3336
- const [value, setValue] = useControllableState({
3337
- value: valueProp || checked,
3338
- defaultValue: defaultChecked,
3339
- onChange: onCheckedChange
3340
- });
3341
- const labelId = useId3();
3342
- const [labelPosition, setLabelPosition] = useState7("right");
3343
- const [hovered, setHovered] = useState7(false);
3344
- const [focused, setFocused] = useState7(false);
3345
- const validChildren = filterChildren(props.children, ALLOWED_CHILDREN7, {
3346
- parentDisplayName: SwitchRoot.displayName
3347
- });
3348
- const { restDataAttrs } = useMemo7(() => {
3349
- const { ["data-color"]: _, ...restDataAttrs2 } = dataAttrs || {};
3350
- return { restDataAttrs: restDataAttrs2 };
3351
- }, [dataAttrs]);
3352
- const { indicator, otherChildren } = useMemo7(() => {
3353
- const indicatorIndex = validChildren.findIndex(
3354
- (child) => isValidElement5(child) && child.type.displayName === SwitchIndicator.displayName
3355
- );
3356
- if (indicatorIndex > -1) {
3357
- return {
3358
- indicator: validChildren[indicatorIndex],
3359
- otherChildren: validChildren.filter((_, i) => i !== indicatorIndex)
3360
- };
3361
- }
3362
- return {
3363
- indicator: /* @__PURE__ */ jsx36(SwitchIndicator, { size }),
3364
- otherChildren: validChildren
3365
- };
3366
- }, [validChildren, size]);
3367
- const contextValue = useMemo7(
3368
- () => ({
3369
- name,
3370
- value,
3371
- color,
3372
- setValue,
3373
- onCheckedChange,
3374
- labelId,
3375
- labelPosition,
3376
- setLabelPosition,
3377
- variant,
3378
- hovered,
3379
- setHovered,
3380
- focused,
3381
- setFocused,
3382
- disabled,
3383
- readonly,
3384
- required
3385
- }),
3386
- [
3387
- name,
3388
- value,
3389
- color,
3390
- onCheckedChange,
3391
- setValue,
3392
- labelId,
3393
- labelPosition,
3394
- hovered,
3395
- focused,
3396
- disabled,
3397
- readonly,
3398
- required
3399
- ]
3400
- );
3401
- const handleClick = () => {
3402
- if (disabled || readonly) return;
3403
- setValue(!value);
3404
- };
3405
- return /* @__PURE__ */ jsx36(SwitchContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs9(
3406
- "div",
3407
- {
3408
- className: clsx32("switch-root", props.className),
3409
- onClick: () => handleClick(),
3410
- onFocus: () => setFocused(true),
3411
- onBlur: () => setFocused(false),
3412
- onMouseEnter: () => setHovered(true),
3413
- onMouseLeave: () => setHovered(false),
3414
- ...restDataAttrs,
3415
- children: [
3416
- /* @__PURE__ */ jsx36(
3417
- "div",
3418
- {
3419
- className: "switch-container",
3420
- "data-size": size,
3421
- "data-color": color,
3422
- "data-checked": value,
3423
- "data-hovered": hovered,
3424
- "data-focused": focused,
3425
- "data-variant": variant,
3426
- children: indicator
3427
- }
3428
- ),
3429
- otherChildren,
3430
- name && /* @__PURE__ */ jsx36("input", { type: "hidden", name, value: String(value) })
3431
- ]
3432
- }
3433
- ) });
3434
- };
3435
- SwitchRoot.displayName = "Switch";
3436
-
3437
- // src/components/switch/switch.tsx
3438
- var Switch = Object.assign(SwitchRoot, {
3439
- Root: SwitchRoot,
3440
- Label: SwitchLabel,
3441
- Indicator: SwitchIndicator
3442
- });
3443
-
3444
- // src/components/theme/theme.tsx
3445
- import * as React36 from "react";
3446
- import { jsx as jsx37 } from "react/jsx-runtime";
3447
- var Theme = React36.forwardRef((props, ref) => {
3448
- const context = React36.useContext(ThemeContext);
3449
- const isRoot = context === void 0;
3450
- if (isRoot) return /* @__PURE__ */ jsx37(ThemeRoot, { ...props, ref });
3451
- return /* @__PURE__ */ jsx37(ThemeSub, { ...props, ref });
3452
- });
3453
- Theme.displayName = "Theme";
3454
- var ThemeRoot = React36.forwardRef((props, ref) => {
3455
- const {
3456
- appearance: themeAppearance,
3457
- radius: themeRadius,
3458
- roundness: themeRoundness,
3459
- spacing: themeSpacing,
3460
- children,
3461
- ...rest
3462
- } = props;
3463
- const [appearance, setAppearance] = React36.useState(
3464
- themeAppearance ?? "light"
3465
- );
3466
- const [radius, setRadius] = React36.useState(themeRadius ?? "md");
3467
- const [roundness2, setRoundness] = React36.useState(
3468
- themeRoundness ?? "3"
3469
- );
3470
- const [spacing, setSpacing] = React36.useState(themeSpacing ?? "md");
3471
- const value = React36.useMemo(
3472
- () => ({
3473
- appearance,
3474
- radius,
3475
- roundness: roundness2,
3476
- spacing,
3477
- onAppearanceChange: setAppearance,
3478
- onRadiusChange: setRadius,
3479
- onRoundnessChange: setRoundness,
3480
- onSpacingChange: setSpacing
3481
- }),
3482
- [appearance, radius, roundness2, spacing]
3483
- );
3484
- return /* @__PURE__ */ jsx37(ThemeContext.Provider, { value, children: /* @__PURE__ */ jsx37(
3485
- "div",
3486
- {
3487
- ref,
3488
- "data-appearance": appearance,
3489
- "data-theme-radius": radius,
3490
- "data-theme-roundness": roundness2,
3491
- "data-theme-spacing": spacing,
3492
- ...rest,
3493
- children
3494
- }
3495
- ) });
3496
- });
3497
- ThemeRoot.displayName = "ThemeRoot";
3498
- var ThemeSub = React36.forwardRef((props, ref) => {
3499
- const context = React36.useContext(ThemeContext);
3500
- const {
3501
- appearance,
3502
- radius,
3503
- roundness: roundness2,
3504
- spacing,
3505
- onAppearanceChange,
3506
- onRadiusChange,
3507
- onRoundnessChange,
3508
- onSpacingChange,
3509
- children,
3510
- ...rest
3511
- } = props;
3512
- const contextProps = {
3513
- appearance: appearance ?? context.appearance,
3514
- radius: radius ?? context.radius,
3515
- roundness: roundness2 ?? context.roundness,
3516
- spacing: spacing ?? context.spacing,
3517
- onAppearanceChange: context.onAppearanceChange,
3518
- onRadiusChange: context.onRadiusChange,
3519
- onRoundnessChange: context.onRoundnessChange,
3520
- onSpacingChange: context.onSpacingChange
3521
- };
3522
- return /* @__PURE__ */ jsx37(ThemeContext.Provider, { value: contextProps, children: /* @__PURE__ */ jsx37(
3523
- "div",
3524
- {
3525
- ref,
3526
- "data-appearance": appearance,
3527
- "data-theme-radius": radius,
3528
- "data-theme-roundness": roundness2,
3529
- "data-theme-spacing": spacing,
3530
- ...rest,
3531
- className: "flex",
3532
- children
3533
- }
3534
- ) });
3535
- });
3536
- ThemeSub.displayName = "ThemeSub";
3537
-
3538
- // src/components/theme/theme-control.tsx
3539
- import { useEffect as useEffect7, useState as useState9 } from "react";
3540
- import { jsx as jsx38, jsxs as jsxs10 } from "react/jsx-runtime";
3541
- function ThemeControl({ position = "bottom" }) {
3542
- const {
3543
- appearance,
3544
- onAppearanceChange,
3545
- radius,
3546
- onRadiusChange,
3547
- roundness: roundness2,
3548
- onRoundnessChange,
3549
- spacing,
3550
- onSpacingChange
3551
- } = useTheme();
3552
- const [visible, setVisible] = useState9(false);
3553
- useEffect7(() => {
3554
- function handleKeyDown(event) {
3555
- if (event.altKey && event.code === "KeyT") {
3556
- event.preventDefault();
3557
- setVisible(!visible);
3558
- }
3559
- }
3560
- document.addEventListener("keydown", handleKeyDown);
3561
- return () => document.removeEventListener("keydown", handleKeyDown);
3562
- }, [visible]);
3563
- return /* @__PURE__ */ jsx38(Portal.Root, { open: visible, onOpenChange: setVisible, children: /* @__PURE__ */ jsx38(Portal.Content, { position, children: /* @__PURE__ */ jsxs10(
3564
- Box,
3565
- {
3566
- m: "4",
3567
- p: "4",
3568
- className: "flex flex-col gap-2 border-[rgba(var(--border-color), 0.6)]",
3569
- children: [
3570
- /* @__PURE__ */ jsxs10(
3571
- Select.Root,
3572
- {
3573
- variant: "solid",
3574
- value: appearance,
3575
- onValueChange: (change) => onAppearanceChange?.(change),
3576
- children: [
3577
- /* @__PURE__ */ jsx38(Select.Label, { position: "inside", children: "Theme Settings" }),
3578
- /* @__PURE__ */ jsx38(Select.Trigger, {}),
3579
- /* @__PURE__ */ jsxs10(Select.Content, { children: [
3580
- /* @__PURE__ */ jsx38(Select.Item, { value: "light", children: "Light" }),
3581
- /* @__PURE__ */ jsx38(Select.Item, { value: "dark", children: "Dark" })
3582
- ] })
3583
- ]
3584
- }
3585
- ),
3586
- /* @__PURE__ */ jsxs10(
3587
- Select.Root,
3588
- {
3589
- variant: "solid",
3590
- value: radius,
3591
- onValueChange: (change) => onRadiusChange?.(change),
3592
- children: [
3593
- /* @__PURE__ */ jsx38(Select.Label, { position: "inside", children: "Radius" }),
3594
- /* @__PURE__ */ jsx38(Select.Trigger, {}),
3595
- /* @__PURE__ */ jsxs10(Select.Content, { children: [
3596
- /* @__PURE__ */ jsx38(Select.Item, { value: "none", children: "None" }),
3597
- /* @__PURE__ */ jsx38(Select.Item, { value: "xs", children: "XS" }),
3598
- /* @__PURE__ */ jsx38(Select.Item, { value: "sm", children: "SM" }),
3599
- /* @__PURE__ */ jsx38(Select.Item, { value: "md", children: "MD" }),
3600
- /* @__PURE__ */ jsx38(Select.Item, { value: "lg", children: "LG" }),
3601
- /* @__PURE__ */ jsx38(Select.Item, { value: "xl", children: "XL" }),
3602
- /* @__PURE__ */ jsx38(Select.Item, { value: "full", children: "FULL" })
3603
- ] })
3604
- ]
3605
- }
3606
- ),
3607
- /* @__PURE__ */ jsxs10(
3608
- Select.Root,
3609
- {
3610
- variant: "solid",
3611
- value: roundness2,
3612
- onValueChange: (change) => onRoundnessChange?.(change),
3613
- children: [
3614
- /* @__PURE__ */ jsx38(Select.Label, { className: "min-w-40!", position: "inside", children: "Roundness" }),
3615
- /* @__PURE__ */ jsx38(Select.Trigger, {}),
3616
- /* @__PURE__ */ jsxs10(Select.Content, { children: [
3617
- /* @__PURE__ */ jsx38(Select.Item, { value: "1", children: "1" }),
3618
- /* @__PURE__ */ jsx38(Select.Item, { value: "2", children: "2" }),
3619
- /* @__PURE__ */ jsx38(Select.Item, { value: "3", children: "3" }),
3620
- /* @__PURE__ */ jsx38(Select.Item, { value: "4", children: "4" }),
3621
- /* @__PURE__ */ jsx38(Select.Item, { value: "5", children: "5" }),
3622
- /* @__PURE__ */ jsx38(Select.Item, { value: "6", children: "6" })
3623
- ] })
3624
- ]
3625
- }
3626
- ),
3627
- /* @__PURE__ */ jsxs10(
3628
- Select.Root,
3629
- {
3630
- variant: "solid",
3631
- value: spacing,
3632
- onValueChange: (change) => onSpacingChange?.(change),
3633
- children: [
3634
- /* @__PURE__ */ jsx38(Select.Label, { position: "inside", children: "Spacing" }),
3635
- /* @__PURE__ */ jsx38(Select.Trigger, {}),
3636
- /* @__PURE__ */ jsxs10(Select.Content, { children: [
3637
- /* @__PURE__ */ jsx38(Select.Item, { value: "xs", children: "XS" }),
3638
- /* @__PURE__ */ jsx38(Select.Item, { value: "sm", children: "SM" }),
3639
- /* @__PURE__ */ jsx38(Select.Item, { value: "md", children: "MD" }),
3640
- /* @__PURE__ */ jsx38(Select.Item, { value: "lg", children: "LG" }),
3641
- /* @__PURE__ */ jsx38(Select.Item, { value: "xl", children: "XL" })
3642
- ] })
3643
- ]
3644
- }
3645
- )
3646
- ]
3647
- }
3648
- ) }) });
3649
- }
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";
3650
20
  export {
3651
21
  Accordion,
3652
22
  Badge,
@@ -3654,6 +24,7 @@ export {
3654
24
  Button,
3655
25
  Checkbox,
3656
26
  Container,
27
+ Flex,
3657
28
  Panel,
3658
29
  Portal,
3659
30
  ProgressBar,