@locus-ui/components 0.0.16 → 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 +79 -67
  644. package/dist/index.d.mts +81 -1524
  645. package/dist/index.d.ts +81 -1524
  646. package/dist/index.js +59 -3757
  647. package/dist/index.js.map +1 -1
  648. package/dist/index.mjs +18 -3738
  649. package/dist/index.mjs.map +1 -1
  650. package/dist/props/align.prop.d.mts +16 -0
  651. package/dist/props/align.prop.d.ts +16 -0
  652. package/dist/props/align.prop.js +41 -0
  653. package/dist/props/align.prop.js.map +1 -0
  654. package/dist/props/align.prop.mjs +16 -0
  655. package/dist/props/align.prop.mjs.map +1 -0
  656. package/dist/props/color.prop.d.mts +26 -0
  657. package/dist/props/color.prop.d.ts +26 -0
  658. package/dist/props/color.prop.js +60 -0
  659. package/dist/props/color.prop.js.map +1 -0
  660. package/dist/props/color.prop.mjs +35 -0
  661. package/dist/props/color.prop.mjs.map +1 -0
  662. package/dist/props/direction.prop.d.mts +11 -0
  663. package/dist/props/direction.prop.d.ts +11 -0
  664. package/dist/props/direction.prop.js +39 -0
  665. package/dist/props/direction.prop.js.map +1 -0
  666. package/dist/props/direction.prop.mjs +14 -0
  667. package/dist/props/direction.prop.mjs.map +1 -0
  668. package/dist/props/index.d.mts +11 -0
  669. package/dist/props/index.d.ts +11 -0
  670. package/dist/props/index.js +82 -0
  671. package/dist/props/index.js.map +1 -0
  672. package/dist/props/index.mjs +43 -0
  673. package/dist/props/index.mjs.map +1 -0
  674. package/dist/props/margin.prop.d.mts +135 -0
  675. package/dist/props/margin.prop.d.ts +135 -0
  676. package/dist/props/margin.prop.js +177 -0
  677. package/dist/props/margin.prop.js.map +1 -0
  678. package/dist/props/margin.prop.mjs +153 -0
  679. package/dist/props/margin.prop.mjs.map +1 -0
  680. package/dist/props/padding.prop.d.mts +135 -0
  681. package/dist/props/padding.prop.d.ts +135 -0
  682. package/dist/props/padding.prop.js +169 -0
  683. package/dist/props/padding.prop.js.map +1 -0
  684. package/dist/props/padding.prop.mjs +145 -0
  685. package/dist/props/padding.prop.mjs.map +1 -0
  686. package/dist/props/prop-def.d.mts +66 -0
  687. package/dist/props/prop-def.d.ts +66 -0
  688. package/dist/props/prop-def.js +18 -0
  689. package/dist/props/prop-def.js.map +1 -0
  690. package/dist/props/prop-def.mjs +2 -0
  691. package/dist/props/prop-def.mjs.map +1 -0
  692. package/dist/props/radius.prop.d.mts +177 -0
  693. package/dist/props/radius.prop.d.ts +177 -0
  694. package/dist/props/radius.prop.js +211 -0
  695. package/dist/props/radius.prop.js.map +1 -0
  696. package/dist/props/radius.prop.mjs +186 -0
  697. package/dist/props/radius.prop.mjs.map +1 -0
  698. package/dist/props/roundness.prop.d.mts +23 -0
  699. package/dist/props/roundness.prop.d.ts +23 -0
  700. package/dist/props/roundness.prop.js +48 -0
  701. package/dist/props/roundness.prop.js.map +1 -0
  702. package/dist/props/roundness.prop.mjs +23 -0
  703. package/dist/props/roundness.prop.mjs.map +1 -0
  704. package/dist/props/size.prop.d.mts +19 -0
  705. package/dist/props/size.prop.d.ts +19 -0
  706. package/dist/props/size.prop.js +44 -0
  707. package/dist/props/size.prop.js.map +1 -0
  708. package/dist/props/size.prop.mjs +19 -0
  709. package/dist/props/size.prop.mjs.map +1 -0
  710. package/dist/props/spacing.prop.d.mts +24 -0
  711. package/dist/props/spacing.prop.d.ts +24 -0
  712. package/dist/props/spacing.prop.js +49 -0
  713. package/dist/props/spacing.prop.js.map +1 -0
  714. package/dist/props/spacing.prop.mjs +24 -0
  715. package/dist/props/spacing.prop.mjs.map +1 -0
  716. package/dist/utils/filter-children.d.mts +50 -0
  717. package/dist/utils/filter-children.d.ts +50 -0
  718. package/dist/utils/filter-children.js +121 -0
  719. package/dist/utils/filter-children.js.map +1 -0
  720. package/dist/utils/filter-children.mjs +86 -0
  721. package/dist/utils/filter-children.mjs.map +1 -0
  722. package/dist/utils/get-component-props.d.mts +14 -0
  723. package/dist/utils/get-component-props.d.ts +14 -0
  724. package/dist/utils/get-component-props.js +126 -0
  725. package/dist/utils/get-component-props.js.map +1 -0
  726. package/dist/utils/get-component-props.mjs +92 -0
  727. package/dist/utils/get-component-props.mjs.map +1 -0
  728. package/dist/utils/get-props.d.mts +29 -0
  729. package/dist/utils/get-props.d.ts +29 -0
  730. package/dist/utils/get-props.js +17 -0
  731. package/dist/utils/get-props.js.map +1 -0
  732. package/dist/utils/get-props.mjs +1 -0
  733. package/dist/utils/get-props.mjs.map +1 -0
  734. package/dist/utils/parse-color.d.mts +14 -0
  735. package/dist/utils/parse-color.d.ts +14 -0
  736. package/dist/utils/parse-color.js +49 -0
  737. package/dist/utils/parse-color.js.map +1 -0
  738. package/dist/utils/parse-color.mjs +25 -0
  739. package/dist/utils/parse-color.mjs.map +1 -0
  740. package/dist/utils/use-controllable-state.d.mts +7 -0
  741. package/dist/utils/use-controllable-state.d.ts +7 -0
  742. package/dist/utils/use-controllable-state.js +58 -0
  743. package/dist/utils/use-controllable-state.js.map +1 -0
  744. package/dist/utils/use-controllable-state.mjs +24 -0
  745. package/dist/utils/use-controllable-state.mjs.map +1 -0
  746. package/package.json +1 -1
  747. package/dist/index.css.map +0 -1
@@ -0,0 +1,15 @@
1
+ import React__default from 'react';
2
+ import { SwitchLabelInternalProps } from './switch-label.props.mjs';
3
+ import '../../../props/prop-def.mjs';
4
+
5
+ interface AllSwitchLabelProps extends SwitchLabelInternalProps {
6
+ }
7
+ type SwitchLabelProps = AllSwitchLabelProps & Omit<React__default.HTMLAttributes<HTMLLabelElement>, "children"> & {
8
+ children?: React__default.ReactNode;
9
+ };
10
+ /** Label for a switch component. */
11
+ declare const SwitchLabel: React__default.ForwardRefExoticComponent<AllSwitchLabelProps & Omit<React__default.HTMLAttributes<HTMLLabelElement>, "children"> & {
12
+ children?: React__default.ReactNode;
13
+ } & React__default.RefAttributes<HTMLLabelElement>>;
14
+
15
+ export { type AllSwitchLabelProps, SwitchLabel, type SwitchLabelProps };
@@ -0,0 +1,15 @@
1
+ import React__default from 'react';
2
+ import { SwitchLabelInternalProps } from './switch-label.props.js';
3
+ import '../../../props/prop-def.js';
4
+
5
+ interface AllSwitchLabelProps extends SwitchLabelInternalProps {
6
+ }
7
+ type SwitchLabelProps = AllSwitchLabelProps & Omit<React__default.HTMLAttributes<HTMLLabelElement>, "children"> & {
8
+ children?: React__default.ReactNode;
9
+ };
10
+ /** Label for a switch component. */
11
+ declare const SwitchLabel: React__default.ForwardRefExoticComponent<AllSwitchLabelProps & Omit<React__default.HTMLAttributes<HTMLLabelElement>, "children"> & {
12
+ children?: React__default.ReactNode;
13
+ } & React__default.RefAttributes<HTMLLabelElement>>;
14
+
15
+ export { type AllSwitchLabelProps, SwitchLabel, type SwitchLabelProps };
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var switch_label_exports = {};
31
+ __export(switch_label_exports, {
32
+ SwitchLabel: () => SwitchLabel
33
+ });
34
+ module.exports = __toCommonJS(switch_label_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_clsx = __toESM(require("clsx"));
37
+ var import_react = __toESM(require("react"));
38
+ var import_get_component_props = require("../../../utils/get-component-props");
39
+ var import_text = require("../../text");
40
+ var import_switch_context = require("../switch-context");
41
+ var import_switch_label = require("./switch-label.props");
42
+ const SwitchLabel = import_react.default.forwardRef(
43
+ (props, ref) => {
44
+ const context = (0, import_switch_context.useSwitchContext)();
45
+ const { className, children, position } = (0, import_get_component_props.getComponentProps)(
46
+ props,
47
+ import_switch_label.SwitchLabelPropDefs
48
+ );
49
+ import_react.default.useLayoutEffect(() => {
50
+ context.setLabelPosition?.(position ?? "right");
51
+ }, [position, context.setLabelPosition]);
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
53
+ "label",
54
+ {
55
+ ref,
56
+ htmlFor: context.labelId,
57
+ className: (0, import_clsx.default)("switch-label", className),
58
+ ...position && { [`data-position`]: position },
59
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { children })
60
+ }
61
+ );
62
+ }
63
+ );
64
+ SwitchLabel.displayName = "Switch.Label";
65
+ // Annotate the CommonJS export names for ESM import in node:
66
+ 0 && (module.exports = {
67
+ SwitchLabel
68
+ });
69
+ //# sourceMappingURL=switch-label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/switch/label/switch-label.tsx"],"sourcesContent":["\"use client\";\n\nimport clsx from \"clsx\";\nimport React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { Text } from \"../../text\";\nimport { useSwitchContext } from \"../switch-context\";\nimport {\n SwitchLabelInternalProps,\n SwitchLabelPropDefs,\n} from \"./switch-label.props\";\n\ninterface AllSwitchLabelProps extends SwitchLabelInternalProps {}\n\ntype SwitchLabelProps = AllSwitchLabelProps &\n Omit<React.HTMLAttributes<HTMLLabelElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\n/** Label for a switch component. */\nconst SwitchLabel = React.forwardRef<HTMLLabelElement, SwitchLabelProps>(\n (props, ref) => {\n const context = useSwitchContext();\n const { className, children, position } = getComponentProps(\n props,\n SwitchLabelPropDefs,\n );\n\n React.useLayoutEffect(() => {\n context.setLabelPosition?.(position ?? \"right\");\n }, [position, context.setLabelPosition]);\n\n return (\n <label\n ref={ref}\n htmlFor={context.labelId}\n className={clsx(\"switch-label\", className)}\n {...(position && { [`data-position`]: position })}\n >\n <Text>{children}</Text>\n </label>\n );\n },\n);\nSwitchLabel.displayName = \"Switch.Label\";\n\nexport { AllSwitchLabelProps, SwitchLabel, SwitchLabelProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCQ;AArCR,kBAAiB;AACjB,mBAAkB;AAClB,iCAAkC;AAClC,kBAAqB;AACrB,4BAAiC;AACjC,0BAGO;AAUP,MAAM,cAAc,aAAAA,QAAM;AAAA,EACxB,CAAC,OAAO,QAAQ;AACd,UAAM,cAAU,wCAAiB;AACjC,UAAM,EAAE,WAAW,UAAU,SAAS,QAAI;AAAA,MACxC;AAAA,MACA;AAAA,IACF;AAEA,iBAAAA,QAAM,gBAAgB,MAAM;AAC1B,cAAQ,mBAAmB,YAAY,OAAO;AAAA,IAChD,GAAG,CAAC,UAAU,QAAQ,gBAAgB,CAAC;AAEvC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS,QAAQ;AAAA,QACjB,eAAW,YAAAC,SAAK,gBAAgB,SAAS;AAAA,QACxC,GAAI,YAAY,EAAE,CAAC,eAAe,GAAG,SAAS;AAAA,QAE/C,sDAAC,oBAAM,UAAS;AAAA;AAAA,IAClB;AAAA,EAEJ;AACF;AACA,YAAY,cAAc;","names":["React","clsx"]}
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import clsx from "clsx";
4
+ import React from "react";
5
+ import { getComponentProps } from "../../../utils/get-component-props";
6
+ import { Text } from "../../text";
7
+ import { useSwitchContext } from "../switch-context";
8
+ import {
9
+ SwitchLabelPropDefs
10
+ } from "./switch-label.props";
11
+ const SwitchLabel = React.forwardRef(
12
+ (props, ref) => {
13
+ const context = useSwitchContext();
14
+ const { className, children, position } = getComponentProps(
15
+ props,
16
+ SwitchLabelPropDefs
17
+ );
18
+ React.useLayoutEffect(() => {
19
+ context.setLabelPosition?.(position ?? "right");
20
+ }, [position, context.setLabelPosition]);
21
+ return /* @__PURE__ */ jsx(
22
+ "label",
23
+ {
24
+ ref,
25
+ htmlFor: context.labelId,
26
+ className: clsx("switch-label", className),
27
+ ...position && { [`data-position`]: position },
28
+ children: /* @__PURE__ */ jsx(Text, { children })
29
+ }
30
+ );
31
+ }
32
+ );
33
+ SwitchLabel.displayName = "Switch.Label";
34
+ export {
35
+ SwitchLabel
36
+ };
37
+ //# sourceMappingURL=switch-label.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/switch/label/switch-label.tsx"],"sourcesContent":["\"use client\";\n\nimport clsx from \"clsx\";\nimport React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { Text } from \"../../text\";\nimport { useSwitchContext } from \"../switch-context\";\nimport {\n SwitchLabelInternalProps,\n SwitchLabelPropDefs,\n} from \"./switch-label.props\";\n\ninterface AllSwitchLabelProps extends SwitchLabelInternalProps {}\n\ntype SwitchLabelProps = AllSwitchLabelProps &\n Omit<React.HTMLAttributes<HTMLLabelElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\n/** Label for a switch component. */\nconst SwitchLabel = React.forwardRef<HTMLLabelElement, SwitchLabelProps>(\n (props, ref) => {\n const context = useSwitchContext();\n const { className, children, position } = getComponentProps(\n props,\n SwitchLabelPropDefs,\n );\n\n React.useLayoutEffect(() => {\n context.setLabelPosition?.(position ?? \"right\");\n }, [position, context.setLabelPosition]);\n\n return (\n <label\n ref={ref}\n htmlFor={context.labelId}\n className={clsx(\"switch-label\", className)}\n {...(position && { [`data-position`]: position })}\n >\n <Text>{children}</Text>\n </label>\n );\n },\n);\nSwitchLabel.displayName = \"Switch.Label\";\n\nexport { AllSwitchLabelProps, SwitchLabel, SwitchLabelProps };\n"],"mappings":";AAuCQ;AArCR,OAAO,UAAU;AACjB,OAAO,WAAW;AAClB,SAAS,yBAAyB;AAClC,SAAS,YAAY;AACrB,SAAS,wBAAwB;AACjC;AAAA,EAEE;AAAA,OACK;AAUP,MAAM,cAAc,MAAM;AAAA,EACxB,CAAC,OAAO,QAAQ;AACd,UAAM,UAAU,iBAAiB;AACjC,UAAM,EAAE,WAAW,UAAU,SAAS,IAAI;AAAA,MACxC;AAAA,MACA;AAAA,IACF;AAEA,UAAM,gBAAgB,MAAM;AAC1B,cAAQ,mBAAmB,YAAY,OAAO;AAAA,IAChD,GAAG,CAAC,UAAU,QAAQ,gBAAgB,CAAC;AAEvC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS,QAAQ;AAAA,QACjB,WAAW,KAAK,gBAAgB,SAAS;AAAA,QACxC,GAAI,YAAY,EAAE,CAAC,eAAe,GAAG,SAAS;AAAA,QAE/C,8BAAC,QAAM,UAAS;AAAA;AAAA,IAClB;AAAA,EAEJ;AACF;AACA,YAAY,cAAc;","names":[]}
@@ -0,0 +1,20 @@
1
+ import { GetPropDefTypes } from '../../../props/prop-def.mjs';
2
+
3
+ declare const labelPositions: readonly ["top", "left", "right", "bottom"];
4
+ type LabelPosition = (typeof labelPositions)[number];
5
+ declare const SwitchLabelPropDefs: {
6
+ /**
7
+ * Sets the position of the label relative to the switch.
8
+ *
9
+ * @example position="left" // positions the label to the left of the switch
10
+ * @example position="top" // positions the label above the switch
11
+ */
12
+ readonly position: {
13
+ type: "enum";
14
+ values: readonly ["top", "left", "right", "bottom"];
15
+ dataAttr: string;
16
+ };
17
+ };
18
+ type SwitchLabelInternalProps = GetPropDefTypes<typeof SwitchLabelPropDefs>;
19
+
20
+ export { type LabelPosition, type SwitchLabelInternalProps, SwitchLabelPropDefs, labelPositions };
@@ -0,0 +1,20 @@
1
+ import { GetPropDefTypes } from '../../../props/prop-def.js';
2
+
3
+ declare const labelPositions: readonly ["top", "left", "right", "bottom"];
4
+ type LabelPosition = (typeof labelPositions)[number];
5
+ declare const SwitchLabelPropDefs: {
6
+ /**
7
+ * Sets the position of the label relative to the switch.
8
+ *
9
+ * @example position="left" // positions the label to the left of the switch
10
+ * @example position="top" // positions the label above the switch
11
+ */
12
+ readonly position: {
13
+ type: "enum";
14
+ values: readonly ["top", "left", "right", "bottom"];
15
+ dataAttr: string;
16
+ };
17
+ };
18
+ type SwitchLabelInternalProps = GetPropDefTypes<typeof SwitchLabelPropDefs>;
19
+
20
+ export { type LabelPosition, type SwitchLabelInternalProps, SwitchLabelPropDefs, labelPositions };
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var switch_label_props_exports = {};
20
+ __export(switch_label_props_exports, {
21
+ SwitchLabelPropDefs: () => SwitchLabelPropDefs,
22
+ labelPositions: () => labelPositions
23
+ });
24
+ module.exports = __toCommonJS(switch_label_props_exports);
25
+ const labelPositions = ["top", "left", "right", "bottom"];
26
+ const SwitchLabelPropDefs = {
27
+ /**
28
+ * Sets the position of the label relative to the switch.
29
+ *
30
+ * @example position="left" // positions the label to the left of the switch
31
+ * @example position="top" // positions the label above the switch
32
+ */
33
+ position: {
34
+ type: "enum",
35
+ values: labelPositions,
36
+ dataAttr: "position"
37
+ }
38
+ };
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ SwitchLabelPropDefs,
42
+ labelPositions
43
+ });
44
+ //# sourceMappingURL=switch-label.props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/switch/label/switch-label.props.ts"],"sourcesContent":["import { GetPropDefTypes, PropDef } from \"../../../props\";\n\nconst labelPositions = [\"top\", \"left\", \"right\", \"bottom\"] as const;\ntype LabelPosition = (typeof labelPositions)[number];\n\nconst SwitchLabelPropDefs = {\n /**\n * Sets the position of the label relative to the switch.\n *\n * @example position=\"left\" // positions the label to the left of the switch\n * @example position=\"top\" // positions the label above the switch\n */\n position: {\n type: \"enum\",\n values: labelPositions,\n dataAttr: \"position\",\n } satisfies PropDef<LabelPosition>,\n} as const;\n\ntype SwitchLabelInternalProps = GetPropDefTypes<typeof SwitchLabelPropDefs>;\n\nexport {\n LabelPosition,\n labelPositions,\n SwitchLabelInternalProps,\n SwitchLabelPropDefs,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,MAAM,iBAAiB,CAAC,OAAO,QAAQ,SAAS,QAAQ;AAGxD,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1B,UAAU;AAAA,IACR,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AACF;","names":[]}
@@ -0,0 +1,19 @@
1
+ const labelPositions = ["top", "left", "right", "bottom"];
2
+ const SwitchLabelPropDefs = {
3
+ /**
4
+ * Sets the position of the label relative to the switch.
5
+ *
6
+ * @example position="left" // positions the label to the left of the switch
7
+ * @example position="top" // positions the label above the switch
8
+ */
9
+ position: {
10
+ type: "enum",
11
+ values: labelPositions,
12
+ dataAttr: "position"
13
+ }
14
+ };
15
+ export {
16
+ SwitchLabelPropDefs,
17
+ labelPositions
18
+ };
19
+ //# sourceMappingURL=switch-label.props.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/switch/label/switch-label.props.ts"],"sourcesContent":["import { GetPropDefTypes, PropDef } from \"../../../props\";\n\nconst labelPositions = [\"top\", \"left\", \"right\", \"bottom\"] as const;\ntype LabelPosition = (typeof labelPositions)[number];\n\nconst SwitchLabelPropDefs = {\n /**\n * Sets the position of the label relative to the switch.\n *\n * @example position=\"left\" // positions the label to the left of the switch\n * @example position=\"top\" // positions the label above the switch\n */\n position: {\n type: \"enum\",\n values: labelPositions,\n dataAttr: \"position\",\n } satisfies PropDef<LabelPosition>,\n} as const;\n\ntype SwitchLabelInternalProps = GetPropDefTypes<typeof SwitchLabelPropDefs>;\n\nexport {\n LabelPosition,\n labelPositions,\n SwitchLabelInternalProps,\n SwitchLabelPropDefs,\n};\n"],"mappings":"AAEA,MAAM,iBAAiB,CAAC,OAAO,QAAQ,SAAS,QAAQ;AAGxD,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1B,UAAU;AAAA,IACR,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AACF;","names":[]}
@@ -0,0 +1,23 @@
1
+ import { HTMLAttributes, FC } from 'react';
2
+ import { AlignProp } from '../../../props/align.prop.mjs';
3
+ import { ColorProp } from '../../../props/color.prop.mjs';
4
+ import { MarginProps } from '../../../props/margin.prop.mjs';
5
+ import { SizeProp } from '../../../props/size.prop.mjs';
6
+ import { WithStrictChildren } from '../../../utils/filter-children.mjs';
7
+ import { SwitchIndicatorProps } from '../indicator/switch-indicator.mjs';
8
+ import { SwitchLabelProps } from '../label/switch-label.mjs';
9
+ import { SwitchRootInternalProps } from './switch-root.props.mjs';
10
+ import '../../../props/prop-def.mjs';
11
+ import '../../../utils/parse-color.mjs';
12
+ import '../indicator/switch-indicator.props.mjs';
13
+ import '../label/switch-label.props.mjs';
14
+
15
+ interface AllSwitchRootProps extends SwitchRootInternalProps, AlignProp, ColorProp, MarginProps, SizeProp {
16
+ }
17
+ /**
18
+ * A versatile Switch, managing state, context, and styling.
19
+ */
20
+ type SwitchRootProps = AllSwitchRootProps & WithStrictChildren<HTMLAttributes<HTMLDivElement>, SwitchLabelProps | SwitchIndicatorProps>;
21
+ declare const SwitchRoot: FC<SwitchRootProps>;
22
+
23
+ export { type AllSwitchRootProps, SwitchRoot, type SwitchRootProps };
@@ -0,0 +1,23 @@
1
+ import { HTMLAttributes, FC } from 'react';
2
+ import { AlignProp } from '../../../props/align.prop.js';
3
+ import { ColorProp } from '../../../props/color.prop.js';
4
+ import { MarginProps } from '../../../props/margin.prop.js';
5
+ import { SizeProp } from '../../../props/size.prop.js';
6
+ import { WithStrictChildren } from '../../../utils/filter-children.js';
7
+ import { SwitchIndicatorProps } from '../indicator/switch-indicator.js';
8
+ import { SwitchLabelProps } from '../label/switch-label.js';
9
+ import { SwitchRootInternalProps } from './switch-root.props.js';
10
+ import '../../../props/prop-def.js';
11
+ import '../../../utils/parse-color.js';
12
+ import '../indicator/switch-indicator.props.js';
13
+ import '../label/switch-label.props.js';
14
+
15
+ interface AllSwitchRootProps extends SwitchRootInternalProps, AlignProp, ColorProp, MarginProps, SizeProp {
16
+ }
17
+ /**
18
+ * A versatile Switch, managing state, context, and styling.
19
+ */
20
+ type SwitchRootProps = AllSwitchRootProps & WithStrictChildren<HTMLAttributes<HTMLDivElement>, SwitchLabelProps | SwitchIndicatorProps>;
21
+ declare const SwitchRoot: FC<SwitchRootProps>;
22
+
23
+ export { type AllSwitchRootProps, SwitchRoot, type SwitchRootProps };
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var switch_root_exports = {};
31
+ __export(switch_root_exports, {
32
+ SwitchRoot: () => SwitchRoot
33
+ });
34
+ module.exports = __toCommonJS(switch_root_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_clsx = __toESM(require("clsx"));
37
+ var import_react = require("react");
38
+ var import_props = require("../../../props");
39
+ var import_filter_children = require("../../../utils/filter-children");
40
+ var import_get_component_props = require("../../../utils/get-component-props");
41
+ var import_use_controllable_state = require("../../../utils/use-controllable-state");
42
+ var import_switch_indicator = require("../indicator/switch-indicator");
43
+ var import_switch_label = require("../label/switch-label");
44
+ var import_switch_context = require("../switch-context");
45
+ var import_switch_root = require("./switch-root.props");
46
+ const ALLOWED_CHILDREN = [
47
+ import_switch_label.SwitchLabel.displayName,
48
+ import_switch_indicator.SwitchIndicator.displayName
49
+ ];
50
+ const SwitchRoot = (props) => {
51
+ const {
52
+ name,
53
+ size,
54
+ color,
55
+ variant,
56
+ checked,
57
+ dataAttrs,
58
+ style,
59
+ className,
60
+ onCheckedChange,
61
+ value: valueProp,
62
+ disabled = false,
63
+ required = false,
64
+ readonly = false,
65
+ defaultChecked = false
66
+ } = (0, import_get_component_props.getComponentProps)(
67
+ props,
68
+ import_switch_root.SwitchRootPropsDefs,
69
+ import_props.AlignPropDef,
70
+ import_props.MarginPropDefs,
71
+ import_props.SizePropDef,
72
+ import_props.ColorPropDef
73
+ );
74
+ const [value, setValue] = (0, import_use_controllable_state.useControllableState)({
75
+ value: valueProp || checked,
76
+ defaultValue: defaultChecked,
77
+ onChange: onCheckedChange
78
+ });
79
+ const labelId = (0, import_react.useId)();
80
+ const [labelPosition, setLabelPosition] = (0, import_react.useState)("right");
81
+ const [hovered, setHovered] = (0, import_react.useState)(false);
82
+ const [focused, setFocused] = (0, import_react.useState)(false);
83
+ const validChildren = (0, import_filter_children.filterChildren)(props.children, ALLOWED_CHILDREN, {
84
+ parentDisplayName: SwitchRoot.displayName,
85
+ allowedTypes: [import_switch_label.SwitchLabel, import_switch_indicator.SwitchIndicator]
86
+ });
87
+ const { restDataAttrs } = (0, import_react.useMemo)(() => {
88
+ const { ["data-color"]: _, ...restDataAttrs2 } = dataAttrs || {};
89
+ return { restDataAttrs: restDataAttrs2 };
90
+ }, [dataAttrs]);
91
+ const { indicator, otherChildren } = (0, import_react.useMemo)(() => {
92
+ const indicatorIndex = validChildren.findIndex(
93
+ (child) => (0, import_react.isValidElement)(child) && (0, import_filter_children.matchesComponent)(child.type, import_switch_indicator.SwitchIndicator)
94
+ );
95
+ if (indicatorIndex > -1) {
96
+ return {
97
+ indicator: validChildren[indicatorIndex],
98
+ otherChildren: validChildren.filter((_, i) => i !== indicatorIndex)
99
+ };
100
+ }
101
+ return {
102
+ indicator: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_switch_indicator.SwitchIndicator, { size }),
103
+ otherChildren: validChildren
104
+ };
105
+ }, [validChildren, size]);
106
+ const contextValue = (0, import_react.useMemo)(
107
+ () => ({
108
+ name,
109
+ value,
110
+ color,
111
+ setValue,
112
+ onCheckedChange,
113
+ labelId,
114
+ labelPosition,
115
+ setLabelPosition,
116
+ variant,
117
+ hovered,
118
+ setHovered,
119
+ focused,
120
+ setFocused,
121
+ disabled,
122
+ readonly,
123
+ required
124
+ }),
125
+ [
126
+ name,
127
+ value,
128
+ color,
129
+ onCheckedChange,
130
+ setValue,
131
+ labelId,
132
+ labelPosition,
133
+ hovered,
134
+ focused,
135
+ disabled,
136
+ readonly,
137
+ required
138
+ ]
139
+ );
140
+ const handleClick = () => {
141
+ if (disabled || readonly) return;
142
+ setValue(!value);
143
+ };
144
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_switch_context.SwitchContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
145
+ "div",
146
+ {
147
+ className: (0, import_clsx.default)("switch-root", className),
148
+ onClick: () => handleClick(),
149
+ onFocus: () => setFocused(true),
150
+ onBlur: () => setFocused(false),
151
+ onMouseEnter: () => setHovered(true),
152
+ onMouseLeave: () => setHovered(false),
153
+ ...restDataAttrs,
154
+ children: [
155
+ otherChildren,
156
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
157
+ "div",
158
+ {
159
+ className: (0, import_clsx.default)("switch-container", className),
160
+ "data-size": size,
161
+ "data-color": color,
162
+ "data-checked": value,
163
+ "data-hovered": hovered,
164
+ "data-focused": focused,
165
+ "data-variant": variant,
166
+ style,
167
+ children: indicator
168
+ }
169
+ ),
170
+ name && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "hidden", name, value: String(value) })
171
+ ]
172
+ }
173
+ ) });
174
+ };
175
+ SwitchRoot.displayName = "Switch";
176
+ // Annotate the CommonJS export names for ESM import in node:
177
+ 0 && (module.exports = {
178
+ SwitchRoot
179
+ });
180
+ //# sourceMappingURL=switch-root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/switch/root/switch-root.tsx"],"sourcesContent":["\"use client\";\n\nimport clsx from \"clsx\";\nimport {\n FC,\n HTMLAttributes,\n isValidElement,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport {\n AlignProp,\n AlignPropDef,\n ColorProp,\n ColorPropDef,\n MarginPropDefs,\n MarginProps,\n SizeProp,\n SizePropDef,\n} from \"../../../props\";\nimport {\n filterChildren,\n matchesComponent,\n WithStrictChildren,\n} from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useControllableState } from \"../../../utils/use-controllable-state\";\nimport {\n SwitchIndicator,\n SwitchIndicatorProps,\n} from \"../indicator/switch-indicator\";\nimport { SwitchLabel, SwitchLabelProps } from \"../label/switch-label\";\nimport { LabelPosition } from \"../label/switch-label.props\";\nimport { SwitchContext } from \"../switch-context\";\nimport {\n SwitchRootInternalProps,\n SwitchRootPropsDefs,\n} from \"./switch-root.props\";\n\ninterface AllSwitchRootProps\n extends\n SwitchRootInternalProps,\n AlignProp,\n ColorProp,\n MarginProps,\n SizeProp {}\n\nconst ALLOWED_CHILDREN = [\n SwitchLabel.displayName!,\n SwitchIndicator.displayName!,\n];\n\n/**\n * A versatile Switch, managing state, context, and styling.\n */\ntype SwitchRootProps = AllSwitchRootProps &\n WithStrictChildren<\n HTMLAttributes<HTMLDivElement>,\n SwitchLabelProps | SwitchIndicatorProps\n >;\n\nconst SwitchRoot: FC<SwitchRootProps> = (props) => {\n const {\n name,\n size,\n color,\n variant,\n checked,\n dataAttrs,\n style,\n className,\n onCheckedChange,\n value: valueProp,\n disabled = false,\n required = false,\n readonly = false,\n defaultChecked = false,\n } = getComponentProps(\n props,\n SwitchRootPropsDefs,\n AlignPropDef,\n MarginPropDefs,\n SizePropDef,\n ColorPropDef,\n );\n\n const [value, setValue] = useControllableState<boolean>({\n value: valueProp || checked,\n defaultValue: defaultChecked,\n onChange: onCheckedChange,\n });\n\n const labelId = useId();\n const [labelPosition, setLabelPosition] = useState<LabelPosition>(\"right\");\n\n const [hovered, setHovered] = useState(false);\n const [focused, setFocused] = useState(false);\n\n const validChildren = filterChildren(props.children, ALLOWED_CHILDREN, {\n parentDisplayName: SwitchRoot.displayName,\n allowedTypes: [SwitchLabel, SwitchIndicator],\n });\n\n const { restDataAttrs } = useMemo(() => {\n const { [\"data-color\"]: _, ...restDataAttrs } = dataAttrs || {};\n return { restDataAttrs };\n }, [dataAttrs]);\n\n const { indicator, otherChildren } = useMemo(() => {\n const indicatorIndex = validChildren.findIndex(\n (child) =>\n isValidElement(child) && matchesComponent(child.type, SwitchIndicator),\n );\n\n if (indicatorIndex > -1) {\n return {\n indicator: validChildren[indicatorIndex],\n otherChildren: validChildren.filter((_, i) => i !== indicatorIndex),\n };\n }\n\n return {\n indicator: <SwitchIndicator size={size} />,\n otherChildren: validChildren,\n };\n }, [validChildren, size]);\n\n const contextValue = useMemo(\n () => ({\n name,\n value,\n color,\n setValue,\n onCheckedChange,\n labelId,\n labelPosition,\n setLabelPosition,\n variant,\n hovered,\n setHovered,\n focused,\n setFocused,\n disabled,\n readonly,\n required,\n }),\n [\n name,\n value,\n color,\n onCheckedChange,\n setValue,\n labelId,\n labelPosition,\n hovered,\n focused,\n disabled,\n readonly,\n required,\n ],\n );\n\n const handleClick = () => {\n if (disabled || readonly) return;\n setValue(!value);\n };\n\n return (\n <SwitchContext.Provider value={contextValue}>\n <div\n className={clsx(\"switch-root\", className)}\n onClick={() => handleClick()}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n {...restDataAttrs}\n >\n {otherChildren}\n\n <div\n className={clsx(\"switch-container\", className)}\n data-size={size}\n data-color={color}\n data-checked={value}\n data-hovered={hovered}\n data-focused={focused}\n data-variant={variant}\n style={style}\n >\n {indicator}\n </div>\n\n {name && <input type=\"hidden\" name={name} value={String(value)} />}\n </div>\n </SwitchContext.Provider>\n );\n};\nSwitchRoot.displayName = \"Switch\";\n\nexport { AllSwitchRootProps, SwitchRoot, SwitchRootProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2HiB;AAzHjB,kBAAiB;AACjB,mBAOO;AACP,mBASO;AACP,6BAIO;AACP,iCAAkC;AAClC,oCAAqC;AACrC,8BAGO;AACP,0BAA8C;AAE9C,4BAA8B;AAC9B,yBAGO;AAUP,MAAM,mBAAmB;AAAA,EACvB,gCAAY;AAAA,EACZ,wCAAgB;AAClB;AAWA,MAAM,aAAkC,CAAC,UAAU;AACjD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,WAAW;AAAA,IACX,WAAW;AAAA,IACX,WAAW;AAAA,IACX,iBAAiB;AAAA,EACnB,QAAI;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,CAAC,OAAO,QAAQ,QAAI,oDAA8B;AAAA,IACtD,OAAO,aAAa;AAAA,IACpB,cAAc;AAAA,IACd,UAAU;AAAA,EACZ,CAAC;AAED,QAAM,cAAU,oBAAM;AACtB,QAAM,CAAC,eAAe,gBAAgB,QAAI,uBAAwB,OAAO;AAEzE,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,KAAK;AAC5C,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,KAAK;AAE5C,QAAM,oBAAgB,uCAAe,MAAM,UAAU,kBAAkB;AAAA,IACrE,mBAAmB,WAAW;AAAA,IAC9B,cAAc,CAAC,iCAAa,uCAAe;AAAA,EAC7C,CAAC;AAED,QAAM,EAAE,cAAc,QAAI,sBAAQ,MAAM;AACtC,UAAM,EAAE,CAAC,YAAY,GAAG,GAAG,GAAGA,eAAc,IAAI,aAAa,CAAC;AAC9D,WAAO,EAAE,eAAAA,eAAc;AAAA,EACzB,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,EAAE,WAAW,cAAc,QAAI,sBAAQ,MAAM;AACjD,UAAM,iBAAiB,cAAc;AAAA,MACnC,CAAC,cACC,6BAAe,KAAK,SAAK,yCAAiB,MAAM,MAAM,uCAAe;AAAA,IACzE;AAEA,QAAI,iBAAiB,IAAI;AACvB,aAAO;AAAA,QACL,WAAW,cAAc,cAAc;AAAA,QACvC,eAAe,cAAc,OAAO,CAAC,GAAG,MAAM,MAAM,cAAc;AAAA,MACpE;AAAA,IACF;AAEA,WAAO;AAAA,MACL,WAAW,4CAAC,2CAAgB,MAAY;AAAA,MACxC,eAAe;AAAA,IACjB;AAAA,EACF,GAAG,CAAC,eAAe,IAAI,CAAC;AAExB,QAAM,mBAAe;AAAA,IACnB,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,cAAc,MAAM;AACxB,QAAI,YAAY,SAAU;AAC1B,aAAS,CAAC,KAAK;AAAA,EACjB;AAEA,SACE,4CAAC,oCAAc,UAAd,EAAuB,OAAO,cAC7B;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,YAAAC,SAAK,eAAe,SAAS;AAAA,MACxC,SAAS,MAAM,YAAY;AAAA,MAC3B,SAAS,MAAM,WAAW,IAAI;AAAA,MAC9B,QAAQ,MAAM,WAAW,KAAK;AAAA,MAC9B,cAAc,MAAM,WAAW,IAAI;AAAA,MACnC,cAAc,MAAM,WAAW,KAAK;AAAA,MACnC,GAAG;AAAA,MAEH;AAAA;AAAA,QAED;AAAA,UAAC;AAAA;AAAA,YACC,eAAW,YAAAA,SAAK,oBAAoB,SAAS;AAAA,YAC7C,aAAW;AAAA,YACX,cAAY;AAAA,YACZ,gBAAc;AAAA,YACd,gBAAc;AAAA,YACd,gBAAc;AAAA,YACd,gBAAc;AAAA,YACd;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QAEC,QAAQ,4CAAC,WAAM,MAAK,UAAS,MAAY,OAAO,OAAO,KAAK,GAAG;AAAA;AAAA;AAAA,EAClE,GACF;AAEJ;AACA,WAAW,cAAc;","names":["restDataAttrs","clsx"]}