@stridge/noctis 1.0.0-beta.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 (565) hide show
  1. package/README.md +60 -0
  2. package/dist/_virtual/_rolldown/runtime.js +27 -0
  3. package/dist/components/accordion/accordion.context.js +15 -0
  4. package/dist/components/accordion/accordion.d.ts +136 -0
  5. package/dist/components/accordion/accordion.js +132 -0
  6. package/dist/components/accordion/accordion.props.d.ts +45 -0
  7. package/dist/components/accordion/accordion.props.js +53 -0
  8. package/dist/components/accordion/accordion.slots.d.ts +24 -0
  9. package/dist/components/accordion/accordion.slots.js +39 -0
  10. package/dist/components/accordion/accordion.types.d.ts +11 -0
  11. package/dist/components/accordion/index.d.ts +3 -0
  12. package/dist/components/alert-dialog/alert-dialog.context.js +16 -0
  13. package/dist/components/alert-dialog/alert-dialog.d.ts +324 -0
  14. package/dist/components/alert-dialog/alert-dialog.js +279 -0
  15. package/dist/components/alert-dialog/alert-dialog.props.d.ts +85 -0
  16. package/dist/components/alert-dialog/alert-dialog.props.js +84 -0
  17. package/dist/components/alert-dialog/alert-dialog.slots.d.ts +29 -0
  18. package/dist/components/alert-dialog/alert-dialog.slots.js +52 -0
  19. package/dist/components/alert-dialog/alert-dialog.types.d.ts +22 -0
  20. package/dist/components/alert-dialog/index.d.ts +3 -0
  21. package/dist/components/autocomplete/autocomplete.context.d.ts +5 -0
  22. package/dist/components/autocomplete/autocomplete.context.js +13 -0
  23. package/dist/components/autocomplete/autocomplete.d.ts +364 -0
  24. package/dist/components/autocomplete/autocomplete.js +373 -0
  25. package/dist/components/autocomplete/autocomplete.props.d.ts +83 -0
  26. package/dist/components/autocomplete/autocomplete.props.js +63 -0
  27. package/dist/components/autocomplete/autocomplete.slots.d.ts +32 -0
  28. package/dist/components/autocomplete/autocomplete.slots.js +61 -0
  29. package/dist/components/autocomplete/index.d.ts +3 -0
  30. package/dist/components/avatar/avatar.context.js +21 -0
  31. package/dist/components/avatar/avatar.d.ts +235 -0
  32. package/dist/components/avatar/avatar.js +208 -0
  33. package/dist/components/avatar/avatar.props.d.ts +86 -0
  34. package/dist/components/avatar/avatar.props.js +78 -0
  35. package/dist/components/avatar/avatar.slots.d.ts +35 -0
  36. package/dist/components/avatar/avatar.slots.js +49 -0
  37. package/dist/components/avatar/avatar.types.d.ts +28 -0
  38. package/dist/components/avatar/index.d.ts +2 -0
  39. package/dist/components/button/button.d.ts +91 -0
  40. package/dist/components/button/button.js +82 -0
  41. package/dist/components/button/button.props.d.ts +48 -0
  42. package/dist/components/button/button.props.js +25 -0
  43. package/dist/components/button/button.slots.d.ts +30 -0
  44. package/dist/components/button/button.slots.js +40 -0
  45. package/dist/components/button/button.types.d.ts +12 -0
  46. package/dist/components/button/index.d.ts +2 -0
  47. package/dist/components/button-group/button-group.context.js +15 -0
  48. package/dist/components/button-group/button-group.d.ts +60 -0
  49. package/dist/components/button-group/button-group.js +50 -0
  50. package/dist/components/button-group/button-group.props.d.ts +22 -0
  51. package/dist/components/button-group/button-group.props.js +33 -0
  52. package/dist/components/button-group/button-group.slots.d.ts +12 -0
  53. package/dist/components/button-group/button-group.slots.js +18 -0
  54. package/dist/components/button-group/index.d.ts +2 -0
  55. package/dist/components/checkbox/checkbox-group.d.ts +46 -0
  56. package/dist/components/checkbox/checkbox-group.js +31 -0
  57. package/dist/components/checkbox/checkbox.context.js +15 -0
  58. package/dist/components/checkbox/checkbox.d.ts +130 -0
  59. package/dist/components/checkbox/checkbox.js +117 -0
  60. package/dist/components/checkbox/checkbox.props.d.ts +84 -0
  61. package/dist/components/checkbox/checkbox.props.js +49 -0
  62. package/dist/components/checkbox/checkbox.slots.d.ts +27 -0
  63. package/dist/components/checkbox/checkbox.slots.js +40 -0
  64. package/dist/components/checkbox/index.d.ts +3 -0
  65. package/dist/components/code-block/brand-logo.d.ts +37 -0
  66. package/dist/components/code-block/brand-logo.js +212 -0
  67. package/dist/components/code-block/code-block.context.js +13 -0
  68. package/dist/components/code-block/code-block.d.ts +190 -0
  69. package/dist/components/code-block/code-block.js +267 -0
  70. package/dist/components/code-block/code-block.props.d.ts +42 -0
  71. package/dist/components/code-block/code-block.props.js +51 -0
  72. package/dist/components/code-block/code-block.slots.d.ts +16 -0
  73. package/dist/components/code-block/code-block.slots.js +31 -0
  74. package/dist/components/code-block/index.d.ts +3 -0
  75. package/dist/components/code-block/language-label.js +43 -0
  76. package/dist/components/collapsible/collapsible.context.js +18 -0
  77. package/dist/components/collapsible/collapsible.d.ts +167 -0
  78. package/dist/components/collapsible/collapsible.js +182 -0
  79. package/dist/components/collapsible/collapsible.props.d.ts +33 -0
  80. package/dist/components/collapsible/collapsible.props.js +44 -0
  81. package/dist/components/collapsible/collapsible.slots.d.ts +25 -0
  82. package/dist/components/collapsible/collapsible.slots.js +40 -0
  83. package/dist/components/collapsible/collapsible.types.d.ts +23 -0
  84. package/dist/components/collapsible/index.d.ts +2 -0
  85. package/dist/components/color-picker/area.d.ts +11 -0
  86. package/dist/components/color-picker/area.js +148 -0
  87. package/dist/components/color-picker/color-picker.d.ts +110 -0
  88. package/dist/components/color-picker/color-picker.js +149 -0
  89. package/dist/components/color-picker/color-picker.props.d.ts +69 -0
  90. package/dist/components/color-picker/color-picker.props.js +74 -0
  91. package/dist/components/color-picker/color-picker.slots.js +21 -0
  92. package/dist/components/color-picker/color.d.ts +18 -0
  93. package/dist/components/color-picker/color.js +224 -0
  94. package/dist/components/color-picker/context.d.ts +25 -0
  95. package/dist/components/color-picker/context.js +23 -0
  96. package/dist/components/color-picker/eyedropper.d.ts +14 -0
  97. package/dist/components/color-picker/eyedropper.js +50 -0
  98. package/dist/components/color-picker/format-tabs.d.ts +11 -0
  99. package/dist/components/color-picker/format-tabs.js +35 -0
  100. package/dist/components/color-picker/index.d.ts +3 -0
  101. package/dist/components/color-picker/inputs.d.ts +16 -0
  102. package/dist/components/color-picker/inputs.js +61 -0
  103. package/dist/components/color-picker/sliders.d.ts +17 -0
  104. package/dist/components/color-picker/sliders.js +94 -0
  105. package/dist/components/color-picker/store.js +48 -0
  106. package/dist/components/color-picker/swatch.d.ts +15 -0
  107. package/dist/components/color-picker/swatch.js +25 -0
  108. package/dist/components/color-swatch/color-swatch-picker.d.ts +87 -0
  109. package/dist/components/color-swatch/color-swatch-picker.js +73 -0
  110. package/dist/components/color-swatch/color-swatch.context.js +8 -0
  111. package/dist/components/color-swatch/color-swatch.d.ts +55 -0
  112. package/dist/components/color-swatch/color-swatch.js +48 -0
  113. package/dist/components/color-swatch/color-swatch.props.d.ts +54 -0
  114. package/dist/components/color-swatch/color-swatch.props.js +32 -0
  115. package/dist/components/color-swatch/color-swatch.slots.js +13 -0
  116. package/dist/components/color-swatch/index.d.ts +2 -0
  117. package/dist/components/combobox/combobox.context.js +13 -0
  118. package/dist/components/combobox/combobox.d.ts +328 -0
  119. package/dist/components/combobox/combobox.js +315 -0
  120. package/dist/components/combobox/combobox.props.d.ts +85 -0
  121. package/dist/components/combobox/combobox.props.js +79 -0
  122. package/dist/components/combobox/combobox.slots.d.ts +28 -0
  123. package/dist/components/combobox/combobox.slots.js +63 -0
  124. package/dist/components/combobox/index.d.ts +2 -0
  125. package/dist/components/context-menu/context-menu.d.ts +254 -0
  126. package/dist/components/context-menu/context-menu.js +150 -0
  127. package/dist/components/context-menu/context-menu.props.d.ts +22 -0
  128. package/dist/components/context-menu/context-menu.props.js +32 -0
  129. package/dist/components/context-menu/context-menu.slots.d.ts +24 -0
  130. package/dist/components/context-menu/context-menu.slots.js +42 -0
  131. package/dist/components/context-menu/index.d.ts +2 -0
  132. package/dist/components/copy-button/copy-button.d.ts +56 -0
  133. package/dist/components/copy-button/copy-button.js +88 -0
  134. package/dist/components/copy-button/copy-button.props.d.ts +27 -0
  135. package/dist/components/copy-button/copy-button.props.js +51 -0
  136. package/dist/components/copy-button/copy-button.slots.d.ts +20 -0
  137. package/dist/components/copy-button/copy-button.slots.js +36 -0
  138. package/dist/components/copy-button/index.d.ts +2 -0
  139. package/dist/components/dialog/dialog.context.js +15 -0
  140. package/dist/components/dialog/dialog.d.ts +299 -0
  141. package/dist/components/dialog/dialog.js +263 -0
  142. package/dist/components/dialog/dialog.props.d.ts +71 -0
  143. package/dist/components/dialog/dialog.props.js +75 -0
  144. package/dist/components/dialog/dialog.slots.d.ts +26 -0
  145. package/dist/components/dialog/dialog.slots.js +46 -0
  146. package/dist/components/dialog/dialog.types.d.ts +16 -0
  147. package/dist/components/dialog/index.d.ts +3 -0
  148. package/dist/components/field/field.d.ts +221 -0
  149. package/dist/components/field/field.js +192 -0
  150. package/dist/components/field/field.props.d.ts +66 -0
  151. package/dist/components/field/field.props.js +65 -0
  152. package/dist/components/field/field.slots.d.ts +35 -0
  153. package/dist/components/field/field.slots.js +54 -0
  154. package/dist/components/field/field.types.d.ts +5 -0
  155. package/dist/components/field/index.d.ts +4 -0
  156. package/dist/components/inline-code/index.d.ts +1 -0
  157. package/dist/components/inline-code/inline-code.d.ts +46 -0
  158. package/dist/components/inline-code/inline-code.js +36 -0
  159. package/dist/components/inline-code/inline-code.props.d.ts +17 -0
  160. package/dist/components/inline-code/inline-code.props.js +27 -0
  161. package/dist/components/inline-code/inline-code.slots.js +8 -0
  162. package/dist/components/input/index.d.ts +3 -0
  163. package/dist/components/input/input.context.js +13 -0
  164. package/dist/components/input/input.d.ts +161 -0
  165. package/dist/components/input/input.js +117 -0
  166. package/dist/components/input/input.props.d.ts +51 -0
  167. package/dist/components/input/input.props.js +50 -0
  168. package/dist/components/input/input.slots.d.ts +35 -0
  169. package/dist/components/input/input.slots.js +46 -0
  170. package/dist/components/input/input.types.d.ts +12 -0
  171. package/dist/components/kbd/glyphs.js +45 -0
  172. package/dist/components/kbd/index.d.ts +1 -0
  173. package/dist/components/kbd/kbd.d.ts +61 -0
  174. package/dist/components/kbd/kbd.js +233 -0
  175. package/dist/components/kbd/kbd.props.d.ts +30 -0
  176. package/dist/components/kbd/kbd.props.js +39 -0
  177. package/dist/components/kbd/kbd.slots.js +14 -0
  178. package/dist/components/kbd/use-apple-platform.js +25 -0
  179. package/dist/components/menu/index.d.ts +2 -0
  180. package/dist/components/menu/menu.d.ts +355 -0
  181. package/dist/components/menu/menu.js +263 -0
  182. package/dist/components/menu/menu.props.d.ts +92 -0
  183. package/dist/components/menu/menu.props.js +97 -0
  184. package/dist/components/menu/menu.slots.d.ts +32 -0
  185. package/dist/components/menu/menu.slots.js +60 -0
  186. package/dist/components/menubar/index.d.ts +2 -0
  187. package/dist/components/menubar/menubar.context.js +13 -0
  188. package/dist/components/menubar/menubar.d.ts +162 -0
  189. package/dist/components/menubar/menubar.js +122 -0
  190. package/dist/components/menubar/menubar.props.d.ts +41 -0
  191. package/dist/components/menubar/menubar.props.js +45 -0
  192. package/dist/components/menubar/menubar.slots.d.ts +26 -0
  193. package/dist/components/menubar/menubar.slots.js +40 -0
  194. package/dist/components/meter/index.d.ts +2 -0
  195. package/dist/components/meter/meter.context.d.ts +9 -0
  196. package/dist/components/meter/meter.context.js +13 -0
  197. package/dist/components/meter/meter.d.ts +163 -0
  198. package/dist/components/meter/meter.js +121 -0
  199. package/dist/components/meter/meter.props.d.ts +50 -0
  200. package/dist/components/meter/meter.props.js +33 -0
  201. package/dist/components/meter/meter.slots.d.ts +18 -0
  202. package/dist/components/meter/meter.slots.js +31 -0
  203. package/dist/components/navigation-menu/index.d.ts +2 -0
  204. package/dist/components/navigation-menu/navigation-menu.d.ts +328 -0
  205. package/dist/components/navigation-menu/navigation-menu.js +274 -0
  206. package/dist/components/navigation-menu/navigation-menu.props.d.ts +98 -0
  207. package/dist/components/navigation-menu/navigation-menu.props.js +90 -0
  208. package/dist/components/navigation-menu/navigation-menu.slots.d.ts +34 -0
  209. package/dist/components/navigation-menu/navigation-menu.slots.js +60 -0
  210. package/dist/components/number-field/index.d.ts +2 -0
  211. package/dist/components/number-field/number-field.context.d.ts +13 -0
  212. package/dist/components/number-field/number-field.context.js +13 -0
  213. package/dist/components/number-field/number-field.d.ts +197 -0
  214. package/dist/components/number-field/number-field.js +187 -0
  215. package/dist/components/number-field/number-field.props.d.ts +66 -0
  216. package/dist/components/number-field/number-field.props.js +50 -0
  217. package/dist/components/number-field/number-field.slots.d.ts +31 -0
  218. package/dist/components/number-field/number-field.slots.js +48 -0
  219. package/dist/components/otp-field/index.d.ts +3 -0
  220. package/dist/components/otp-field/otp-field.context.js +13 -0
  221. package/dist/components/otp-field/otp-field.d.ts +99 -0
  222. package/dist/components/otp-field/otp-field.js +76 -0
  223. package/dist/components/otp-field/otp-field.props.d.ts +48 -0
  224. package/dist/components/otp-field/otp-field.props.js +43 -0
  225. package/dist/components/otp-field/otp-field.slots.d.ts +28 -0
  226. package/dist/components/otp-field/otp-field.slots.js +39 -0
  227. package/dist/components/popover/index.d.ts +2 -0
  228. package/dist/components/popover/popover.d.ts +192 -0
  229. package/dist/components/popover/popover.js +152 -0
  230. package/dist/components/popover/popover.props.d.ts +34 -0
  231. package/dist/components/popover/popover.props.js +44 -0
  232. package/dist/components/popover/popover.slots.d.ts +22 -0
  233. package/dist/components/popover/popover.slots.js +42 -0
  234. package/dist/components/preview-card/index.d.ts +2 -0
  235. package/dist/components/preview-card/preview-card.d.ts +182 -0
  236. package/dist/components/preview-card/preview-card.js +146 -0
  237. package/dist/components/preview-card/preview-card.props.d.ts +37 -0
  238. package/dist/components/preview-card/preview-card.props.js +48 -0
  239. package/dist/components/preview-card/preview-card.slots.d.ts +22 -0
  240. package/dist/components/preview-card/preview-card.slots.js +39 -0
  241. package/dist/components/progress/index.d.ts +3 -0
  242. package/dist/components/progress/progress.context.d.ts +9 -0
  243. package/dist/components/progress/progress.context.js +13 -0
  244. package/dist/components/progress/progress.d.ts +139 -0
  245. package/dist/components/progress/progress.js +92 -0
  246. package/dist/components/progress/progress.props.d.ts +56 -0
  247. package/dist/components/progress/progress.props.js +38 -0
  248. package/dist/components/progress/progress.slots.d.ts +24 -0
  249. package/dist/components/progress/progress.slots.js +37 -0
  250. package/dist/components/radio/index.d.ts +2 -0
  251. package/dist/components/radio/radio.context.js +5 -0
  252. package/dist/components/radio/radio.d.ts +205 -0
  253. package/dist/components/radio/radio.js +168 -0
  254. package/dist/components/radio/radio.props.d.ts +106 -0
  255. package/dist/components/radio/radio.props.js +65 -0
  256. package/dist/components/radio/radio.slots.d.ts +29 -0
  257. package/dist/components/radio/radio.slots.js +44 -0
  258. package/dist/components/rail/index.d.ts +3 -0
  259. package/dist/components/rail/rail.context.d.ts +17 -0
  260. package/dist/components/rail/rail.context.js +23 -0
  261. package/dist/components/rail/rail.d.ts +232 -0
  262. package/dist/components/rail/rail.js +254 -0
  263. package/dist/components/rail/rail.props.d.ts +98 -0
  264. package/dist/components/rail/rail.props.js +64 -0
  265. package/dist/components/rail/rail.slots.d.ts +20 -0
  266. package/dist/components/rail/rail.slots.js +40 -0
  267. package/dist/components/scroll-area/index.d.ts +2 -0
  268. package/dist/components/scroll-area/scroll-area.context.js +15 -0
  269. package/dist/components/scroll-area/scroll-area.d.ts +217 -0
  270. package/dist/components/scroll-area/scroll-area.js +153 -0
  271. package/dist/components/scroll-area/scroll-area.props.d.ts +73 -0
  272. package/dist/components/scroll-area/scroll-area.props.js +64 -0
  273. package/dist/components/scroll-area/scroll-area.slots.d.ts +40 -0
  274. package/dist/components/scroll-area/scroll-area.slots.js +54 -0
  275. package/dist/components/scroll-area/scroll-area.types.d.ts +24 -0
  276. package/dist/components/search-dialog/index.d.ts +3 -0
  277. package/dist/components/search-dialog/parts/input.d.ts +24 -0
  278. package/dist/components/search-dialog/parts/input.js +53 -0
  279. package/dist/components/search-dialog/parts/messages.d.ts +80 -0
  280. package/dist/components/search-dialog/parts/messages.js +75 -0
  281. package/dist/components/search-dialog/parts/results.d.ts +43 -0
  282. package/dist/components/search-dialog/parts/results.js +63 -0
  283. package/dist/components/search-dialog/parts/root.d.ts +54 -0
  284. package/dist/components/search-dialog/parts/root.js +99 -0
  285. package/dist/components/search-dialog/search-dialog.context.d.ts +15 -0
  286. package/dist/components/search-dialog/search-dialog.context.js +20 -0
  287. package/dist/components/search-dialog/search-dialog.d.ts +84 -0
  288. package/dist/components/search-dialog/search-dialog.js +43 -0
  289. package/dist/components/search-dialog/search-dialog.props.d.ts +45 -0
  290. package/dist/components/search-dialog/search-dialog.props.js +49 -0
  291. package/dist/components/search-dialog/search-dialog.slots.d.ts +16 -0
  292. package/dist/components/search-dialog/search-dialog.slots.js +32 -0
  293. package/dist/components/select/index.d.ts +2 -0
  294. package/dist/components/select/select.context.js +17 -0
  295. package/dist/components/select/select.d.ts +356 -0
  296. package/dist/components/select/select.js +314 -0
  297. package/dist/components/select/select.props.d.ts +110 -0
  298. package/dist/components/select/select.props.js +103 -0
  299. package/dist/components/select/select.slots.d.ts +38 -0
  300. package/dist/components/select/select.slots.js +67 -0
  301. package/dist/components/separator/index.d.ts +2 -0
  302. package/dist/components/separator/separator.d.ts +69 -0
  303. package/dist/components/separator/separator.js +44 -0
  304. package/dist/components/separator/separator.props.d.ts +30 -0
  305. package/dist/components/separator/separator.props.js +30 -0
  306. package/dist/components/separator/separator.slots.d.ts +22 -0
  307. package/dist/components/separator/separator.slots.js +21 -0
  308. package/dist/components/separator/separator.types.d.ts +5 -0
  309. package/dist/components/sheet/index.d.ts +3 -0
  310. package/dist/components/sheet/sheet-stack.d.ts +106 -0
  311. package/dist/components/sheet/sheet-stack.js +146 -0
  312. package/dist/components/sheet/sheet.d.ts +279 -0
  313. package/dist/components/sheet/sheet.js +264 -0
  314. package/dist/components/sheet/sheet.props.d.ts +74 -0
  315. package/dist/components/sheet/sheet.props.js +77 -0
  316. package/dist/components/sheet/sheet.slots.js +22 -0
  317. package/dist/components/sheet/sheet.types.d.ts +12 -0
  318. package/dist/components/slider/index.d.ts +3 -0
  319. package/dist/components/slider/slider.context.d.ts +5 -0
  320. package/dist/components/slider/slider.context.js +29 -0
  321. package/dist/components/slider/slider.d.ts +230 -0
  322. package/dist/components/slider/slider.js +274 -0
  323. package/dist/components/slider/slider.props.d.ts +72 -0
  324. package/dist/components/slider/slider.props.js +59 -0
  325. package/dist/components/slider/slider.slots.d.ts +30 -0
  326. package/dist/components/slider/slider.slots.js +50 -0
  327. package/dist/components/surface/index.d.ts +1 -0
  328. package/dist/components/surface/surface.d.ts +84 -0
  329. package/dist/components/surface/surface.js +48 -0
  330. package/dist/components/surface/surface.props.d.ts +35 -0
  331. package/dist/components/surface/surface.props.js +26 -0
  332. package/dist/components/surface/surface.slots.js +9 -0
  333. package/dist/components/surface/surface.types.d.ts +14 -0
  334. package/dist/components/switch/index.d.ts +2 -0
  335. package/dist/components/switch/switch.context.js +14 -0
  336. package/dist/components/switch/switch.d.ts +110 -0
  337. package/dist/components/switch/switch.js +92 -0
  338. package/dist/components/switch/switch.props.d.ts +68 -0
  339. package/dist/components/switch/switch.props.js +41 -0
  340. package/dist/components/switch/switch.slots.d.ts +23 -0
  341. package/dist/components/switch/switch.slots.js +35 -0
  342. package/dist/components/table/index.d.ts +1 -0
  343. package/dist/components/table/table.d.ts +104 -0
  344. package/dist/components/table/table.js +92 -0
  345. package/dist/components/table/table.props.d.ts +38 -0
  346. package/dist/components/table/table.props.js +49 -0
  347. package/dist/components/table/table.slots.js +17 -0
  348. package/dist/components/tabs/index.d.ts +2 -0
  349. package/dist/components/tabs/tabs.context.d.ts +9 -0
  350. package/dist/components/tabs/tabs.context.js +13 -0
  351. package/dist/components/tabs/tabs.d.ts +139 -0
  352. package/dist/components/tabs/tabs.js +118 -0
  353. package/dist/components/tabs/tabs.props.d.ts +59 -0
  354. package/dist/components/tabs/tabs.props.js +39 -0
  355. package/dist/components/tabs/tabs.slots.d.ts +20 -0
  356. package/dist/components/tabs/tabs.slots.js +33 -0
  357. package/dist/components/textarea/index.d.ts +3 -0
  358. package/dist/components/textarea/textarea.context.js +13 -0
  359. package/dist/components/textarea/textarea.d.ts +142 -0
  360. package/dist/components/textarea/textarea.js +129 -0
  361. package/dist/components/textarea/textarea.props.d.ts +44 -0
  362. package/dist/components/textarea/textarea.props.js +32 -0
  363. package/dist/components/textarea/textarea.slots.d.ts +23 -0
  364. package/dist/components/textarea/textarea.slots.js +33 -0
  365. package/dist/components/textarea/textarea.types.d.ts +5 -0
  366. package/dist/components/toast/index.d.ts +4 -0
  367. package/dist/components/toast/toast.d.ts +241 -0
  368. package/dist/components/toast/toast.js +193 -0
  369. package/dist/components/toast/toast.manager.d.ts +76 -0
  370. package/dist/components/toast/toast.manager.js +71 -0
  371. package/dist/components/toast/toast.props.d.ts +66 -0
  372. package/dist/components/toast/toast.props.js +74 -0
  373. package/dist/components/toast/toast.slots.d.ts +30 -0
  374. package/dist/components/toast/toast.slots.js +49 -0
  375. package/dist/components/toast/toast.types.d.ts +19 -0
  376. package/dist/components/toggle/index.d.ts +2 -0
  377. package/dist/components/toggle/toggle.context.d.ts +11 -0
  378. package/dist/components/toggle/toggle.context.js +14 -0
  379. package/dist/components/toggle/toggle.d.ts +136 -0
  380. package/dist/components/toggle/toggle.js +101 -0
  381. package/dist/components/toggle/toggle.props.d.ts +51 -0
  382. package/dist/components/toggle/toggle.props.js +29 -0
  383. package/dist/components/toggle/toggle.slots.d.ts +26 -0
  384. package/dist/components/toggle/toggle.slots.js +36 -0
  385. package/dist/components/toolbar/index.d.ts +3 -0
  386. package/dist/components/toolbar/toolbar.context.js +23 -0
  387. package/dist/components/toolbar/toolbar.d.ts +218 -0
  388. package/dist/components/toolbar/toolbar.js +197 -0
  389. package/dist/components/toolbar/toolbar.props.d.ts +54 -0
  390. package/dist/components/toolbar/toolbar.props.js +55 -0
  391. package/dist/components/toolbar/toolbar.slots.d.ts +24 -0
  392. package/dist/components/toolbar/toolbar.slots.js +37 -0
  393. package/dist/components/toolbar/toolbar.types.d.ts +15 -0
  394. package/dist/components/tooltip/index.d.ts +2 -0
  395. package/dist/components/tooltip/tooltip.d.ts +170 -0
  396. package/dist/components/tooltip/tooltip.js +143 -0
  397. package/dist/components/tooltip/tooltip.props.d.ts +36 -0
  398. package/dist/components/tooltip/tooltip.props.js +42 -0
  399. package/dist/components/tooltip/tooltip.slots.d.ts +26 -0
  400. package/dist/components/tooltip/tooltip.slots.js +42 -0
  401. package/dist/core/derive-threshold-tone.js +35 -0
  402. package/dist/core/merge-class-name.d.ts +17 -0
  403. package/dist/core/merge-class-name.js +16 -0
  404. package/dist/core/noctis-provider.d.ts +38 -0
  405. package/dist/core/noctis-provider.js +44 -0
  406. package/dist/core/primitive/index.d.ts +1 -0
  407. package/dist/core/primitive/primitive.d.ts +44 -0
  408. package/dist/core/primitive/primitive.js +27 -0
  409. package/dist/core/radius-scope/index.d.ts +2 -0
  410. package/dist/core/radius-scope/radius-scope.d.ts +43 -0
  411. package/dist/core/radius-scope/radius-scope.js +36 -0
  412. package/dist/core/radius-scope/radius-scope.styles.d.ts +13 -0
  413. package/dist/core/radius-scope/radius-scope.styles.js +11 -0
  414. package/dist/core/render.d.ts +24 -0
  415. package/dist/core/render.js +12 -0
  416. package/dist/core/use-copy.d.ts +13 -0
  417. package/dist/core/use-copy.js +30 -0
  418. package/dist/core/use-injected-labels.js +55 -0
  419. package/dist/core/use-reduced-motion.d.ts +9 -0
  420. package/dist/core/use-reduced-motion.js +26 -0
  421. package/dist/core/visually-hidden/index.d.ts +1 -0
  422. package/dist/core/visually-hidden/visually-hidden.d.ts +24 -0
  423. package/dist/core/visually-hidden/visually-hidden.js +19 -0
  424. package/dist/i18n/default-messages.d.ts +12 -0
  425. package/dist/i18n/default-messages.js +10 -0
  426. package/dist/i18n/index.d.ts +2 -0
  427. package/dist/i18n/index.js +2 -0
  428. package/dist/i18n/messages/index.d.ts +2 -0
  429. package/dist/i18n/messages/index.js +2 -0
  430. package/dist/icons/glyphs.d.ts +2 -0
  431. package/dist/icons/glyphs.js +2 -0
  432. package/dist/icons/icon.d.ts +40 -0
  433. package/dist/icons/icon.js +26 -0
  434. package/dist/icons/icon.styles.d.ts +9 -0
  435. package/dist/icons/index.d.ts +3 -0
  436. package/dist/index.d.ts +126 -0
  437. package/dist/index.js +112 -0
  438. package/dist/primitives/accordion.d.ts +7 -0
  439. package/dist/primitives/accordion.js +8 -0
  440. package/dist/primitives/alert-dialog.d.ts +7 -0
  441. package/dist/primitives/alert-dialog.js +8 -0
  442. package/dist/primitives/autocomplete/autocomplete.d.ts +58 -0
  443. package/dist/primitives/autocomplete/autocomplete.js +58 -0
  444. package/dist/primitives/autocomplete/index.d.ts +1 -0
  445. package/dist/primitives/autocomplete.d.ts +2 -0
  446. package/dist/primitives/autocomplete.js +2 -0
  447. package/dist/primitives/avatar.d.ts +7 -0
  448. package/dist/primitives/avatar.js +8 -0
  449. package/dist/primitives/button.d.ts +7 -0
  450. package/dist/primitives/button.js +8 -0
  451. package/dist/primitives/checkbox-group.d.ts +7 -0
  452. package/dist/primitives/checkbox-group.js +8 -0
  453. package/dist/primitives/checkbox.d.ts +7 -0
  454. package/dist/primitives/checkbox.js +8 -0
  455. package/dist/primitives/collapsible.d.ts +7 -0
  456. package/dist/primitives/collapsible.js +8 -0
  457. package/dist/primitives/combobox/combobox.d.ts +71 -0
  458. package/dist/primitives/combobox/combobox.js +66 -0
  459. package/dist/primitives/combobox/index.d.ts +1 -0
  460. package/dist/primitives/combobox.d.ts +2 -0
  461. package/dist/primitives/combobox.js +2 -0
  462. package/dist/primitives/context-menu.d.ts +7 -0
  463. package/dist/primitives/context-menu.js +8 -0
  464. package/dist/primitives/csp-provider.d.ts +1 -0
  465. package/dist/primitives/csp-provider.js +2 -0
  466. package/dist/primitives/dialog.d.ts +7 -0
  467. package/dist/primitives/dialog.js +8 -0
  468. package/dist/primitives/direction-provider.d.ts +1 -0
  469. package/dist/primitives/direction-provider.js +8 -0
  470. package/dist/primitives/drawer.d.ts +1 -0
  471. package/dist/primitives/drawer.js +2 -0
  472. package/dist/primitives/field.d.ts +7 -0
  473. package/dist/primitives/field.js +8 -0
  474. package/dist/primitives/fieldset.d.ts +7 -0
  475. package/dist/primitives/fieldset.js +8 -0
  476. package/dist/primitives/form.d.ts +7 -0
  477. package/dist/primitives/form.js +8 -0
  478. package/dist/primitives/index.d.ts +79 -0
  479. package/dist/primitives/index.js +113 -0
  480. package/dist/primitives/input.d.ts +7 -0
  481. package/dist/primitives/input.js +8 -0
  482. package/dist/primitives/menu.d.ts +7 -0
  483. package/dist/primitives/menu.js +8 -0
  484. package/dist/primitives/menubar.d.ts +7 -0
  485. package/dist/primitives/menubar.js +8 -0
  486. package/dist/primitives/meter/index.d.ts +1 -0
  487. package/dist/primitives/meter/meter.d.ts +56 -0
  488. package/dist/primitives/meter/meter.js +59 -0
  489. package/dist/primitives/meter.d.ts +2 -0
  490. package/dist/primitives/meter.js +2 -0
  491. package/dist/primitives/navigation-menu.d.ts +7 -0
  492. package/dist/primitives/navigation-menu.js +8 -0
  493. package/dist/primitives/number-field/context.d.ts +13 -0
  494. package/dist/primitives/number-field/context.js +36 -0
  495. package/dist/primitives/number-field/index.d.ts +2 -0
  496. package/dist/primitives/number-field/number-field.d.ts +90 -0
  497. package/dist/primitives/number-field/number-field.js +107 -0
  498. package/dist/primitives/number-field.d.ts +3 -0
  499. package/dist/primitives/number-field.js +2 -0
  500. package/dist/primitives/otp-field.d.ts +7 -0
  501. package/dist/primitives/otp-field.js +8 -0
  502. package/dist/primitives/popover.d.ts +7 -0
  503. package/dist/primitives/popover.js +8 -0
  504. package/dist/primitives/preview-card.d.ts +7 -0
  505. package/dist/primitives/preview-card.js +8 -0
  506. package/dist/primitives/progress/index.d.ts +1 -0
  507. package/dist/primitives/progress/progress.d.ts +56 -0
  508. package/dist/primitives/progress/progress.js +59 -0
  509. package/dist/primitives/progress.d.ts +2 -0
  510. package/dist/primitives/progress.js +2 -0
  511. package/dist/primitives/radio-group.d.ts +7 -0
  512. package/dist/primitives/radio-group.js +8 -0
  513. package/dist/primitives/radio.d.ts +7 -0
  514. package/dist/primitives/radio.js +8 -0
  515. package/dist/primitives/scroll-area.d.ts +7 -0
  516. package/dist/primitives/scroll-area.js +8 -0
  517. package/dist/primitives/select.d.ts +7 -0
  518. package/dist/primitives/select.js +8 -0
  519. package/dist/primitives/separator.d.ts +7 -0
  520. package/dist/primitives/separator.js +8 -0
  521. package/dist/primitives/slider/context.d.ts +12 -0
  522. package/dist/primitives/slider/context.js +18 -0
  523. package/dist/primitives/slider/index.d.ts +2 -0
  524. package/dist/primitives/slider/slider.d.ts +83 -0
  525. package/dist/primitives/slider/slider.js +99 -0
  526. package/dist/primitives/slider.d.ts +3 -0
  527. package/dist/primitives/slider.js +2 -0
  528. package/dist/primitives/switch.d.ts +1 -0
  529. package/dist/primitives/switch.js +2 -0
  530. package/dist/primitives/tabs.d.ts +7 -0
  531. package/dist/primitives/tabs.js +8 -0
  532. package/dist/primitives/toast/context.d.ts +11 -0
  533. package/dist/primitives/toast/context.js +18 -0
  534. package/dist/primitives/toast/index.d.ts +2 -0
  535. package/dist/primitives/toast/toast.d.ts +122 -0
  536. package/dist/primitives/toast/toast.js +133 -0
  537. package/dist/primitives/toast.d.ts +3 -0
  538. package/dist/primitives/toast.js +2 -0
  539. package/dist/primitives/toggle-group.d.ts +7 -0
  540. package/dist/primitives/toggle-group.js +8 -0
  541. package/dist/primitives/toggle.d.ts +7 -0
  542. package/dist/primitives/toggle.js +8 -0
  543. package/dist/primitives/toolbar.d.ts +7 -0
  544. package/dist/primitives/toolbar.js +8 -0
  545. package/dist/primitives/tooltip.d.ts +7 -0
  546. package/dist/primitives/tooltip.js +8 -0
  547. package/dist/props.d.ts +46 -0
  548. package/dist/props.js +46 -0
  549. package/dist/styles.css +11513 -0
  550. package/dist/tailwind/cn.d.ts +33 -0
  551. package/dist/tailwind/cn.js +42 -0
  552. package/dist/tailwind/index.d.ts +3 -0
  553. package/dist/tailwind/index.js +3 -0
  554. package/dist/tailwind/tv.d.ts +20 -0
  555. package/dist/tailwind/tv.js +11 -0
  556. package/dist/tailwind.css +485 -0
  557. package/dist/theme/react.d.ts +1 -0
  558. package/dist/theme/react.js +1 -0
  559. package/dist/theme.d.ts +1 -0
  560. package/dist/theme.js +1 -0
  561. package/dist/tokens/react.d.ts +1 -0
  562. package/dist/tokens/react.js +1 -0
  563. package/dist/tokens.d.ts +1 -0
  564. package/dist/tokens.js +1 -0
  565. package/package.json +121 -0
@@ -0,0 +1,22 @@
1
+ //#region src/components/sheet/sheet.slots.ts
2
+ /**
3
+ * The slot vocabulary every `Sheet` part stamps as its `data-slot`. The authored source the
4
+ * orchestration file reads from, kebab-cased `{component}-{part}`; SLOTS.md still generates from the
5
+ * token-graph declarations. `Sheet.Root` wraps Base UI's `Dialog.Root` without rendering an element of
6
+ * its own, and `Sheet.Content` composes the portal/backdrop/popup without stamping a slot — so neither
7
+ * appears here, keeping the const parity-true to the rendered DOM.
8
+ */
9
+ const SHEET_SLOTS = {
10
+ trigger: "noctis-sheet-trigger",
11
+ backdrop: "noctis-sheet-backdrop",
12
+ viewport: "noctis-sheet-viewport",
13
+ popup: "noctis-sheet-popup",
14
+ close: "noctis-sheet-close",
15
+ header: "noctis-sheet-header",
16
+ body: "noctis-sheet-body",
17
+ footer: "noctis-sheet-footer",
18
+ title: "noctis-sheet-title",
19
+ description: "noctis-sheet-description"
20
+ };
21
+ //#endregion
22
+ export { SHEET_SLOTS };
@@ -0,0 +1,12 @@
1
+ //#region src/components/sheet/sheet.types.d.ts
2
+ /**
3
+ * The side/size vocabulary `Sheet` panels carry — formerly derived from the `sheetPopup` `tv()` recipe,
4
+ * now the authored source of truth since styling moved to precompiled `sheet.css`. Types-only: no
5
+ * runtime code, so it never participates in the styling layer.
6
+ */
7
+ /** Which edge the sheet docks to, and the direction it slides from. */
8
+ type SheetSide = "start" | "end" | "top" | "bottom";
9
+ /** The panel's cross-axis extent — width for side sheets, height for top/bottom sheets. */
10
+ type SheetSize = "sm" | "md" | "lg" | "xl" | "full";
11
+ //#endregion
12
+ export { SheetSide, SheetSize };
@@ -0,0 +1,3 @@
1
+ import { SliderSize } from "./slider.context.js";
2
+ import { Slider } from "./slider.js";
3
+ import { SliderDataAttributes } from "./slider.slots.js";
@@ -0,0 +1,5 @@
1
+ //#region src/components/slider/slider.context.d.ts
2
+ /** Control size — `sm` or `md`; the rail thickness, hit-area, and thumb diameter re-point off it. */
3
+ type SliderSize = "sm" | "md";
4
+ //#endregion
5
+ export { SliderSize };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { createContext, use } from "react";
3
+ //#region src/components/slider/slider.context.ts
4
+ const SliderContext = createContext(null);
5
+ const SliderProvider = SliderContext.Provider;
6
+ /** Read the slider context, throwing a named error when a part renders outside `Slider.Root`. */
7
+ function useSliderContext(part) {
8
+ const context = use(SliderContext);
9
+ if (context === null) throw new Error(`Slider.${part} must be rendered inside <Slider.Root>.`);
10
+ return context;
11
+ }
12
+ const SliderValueContext = createContext(null);
13
+ const SliderValueProvider = SliderValueContext.Provider;
14
+ /** Read the live value geometry. Returns `null` outside a `Slider.Root` (parts degrade gracefully). */
15
+ function useSliderValueContext() {
16
+ return use(SliderValueContext);
17
+ }
18
+ /**
19
+ * The index of the enclosing `Slider.Thumb`, shared with a composed `Slider.ThumbValue` so its readout
20
+ * shows that thumb's value without the consumer repeating the index.
21
+ */
22
+ const SliderThumbIndexContext = createContext(0);
23
+ const SliderThumbIndexProvider = SliderThumbIndexContext.Provider;
24
+ /** Read the enclosing thumb's index (defaults to `0` for a single-value slider). */
25
+ function useSliderThumbIndex() {
26
+ return use(SliderThumbIndexContext);
27
+ }
28
+ //#endregion
29
+ export { SliderProvider, SliderThumbIndexProvider, SliderValueProvider, useSliderContext, useSliderThumbIndex, useSliderValueContext };
@@ -0,0 +1,230 @@
1
+ import { Slider as Slider$1 } from "../../primitives/slider/slider.js";
2
+ import { SliderSize } from "./slider.context.js";
3
+ import { SliderPartProps, SliderRootPropsArgs, controlProps, headerProps, indicatorProps, labelProps, markLabelProps, markProps, marksProps, rootProps, thumbProps, thumbValueProps, trackProps, valueProps } from "./slider.props.js";
4
+ import { ComponentPropsWithoutRef, ReactElement, ReactNode } from "react";
5
+
6
+ //#region src/components/slider/slider.d.ts
7
+ /**
8
+ * Owns the slider's value and shares the control `size` plus the live value geometry with its parts.
9
+ * Works controlled (`value` + `onValueChange`) or uncontrolled (`defaultValue`); pass an array of two
10
+ * numbers for a range. Built on Base UI, so it handles the active locale and the range thumbs'
11
+ * value-text suffixes. Compose `Slider.Control` (holding `Slider.Track` → `Slider.Indicator` and one
12
+ * `Slider.Thumb` per value), optionally under a `Slider.Header` with the `Slider.Label` + `Slider.Value`.
13
+ */
14
+ declare function SliderRoot({
15
+ size,
16
+ origin,
17
+ className,
18
+ children,
19
+ value,
20
+ defaultValue,
21
+ min,
22
+ max,
23
+ orientation,
24
+ onValueChange,
25
+ ...props
26
+ }: Slider.Root.Props): ReactElement;
27
+ /** A baseline row above the control holding `Slider.Label` + `Slider.Value`; owns the header→rail gap. */
28
+ declare function SliderHeader({
29
+ className,
30
+ ...props
31
+ }: Slider.Header.Props): ReactElement;
32
+ /** The slider's accessible label. Pair it with `Slider.Value` inside a `Slider.Header` above the control. */
33
+ declare function SliderLabel({
34
+ className,
35
+ ...props
36
+ }: Slider.Label.Props): ReactElement;
37
+ /** The formatted current value, localized via the injected locale. */
38
+ declare function SliderValue({
39
+ className,
40
+ ...props
41
+ }: Slider.Value.Props): ReactElement;
42
+ /** The interactive row the rail and thumbs sit centred within. Holds the `Track` and the `Thumb`s. */
43
+ declare function SliderControl({
44
+ className,
45
+ ...props
46
+ }: Slider.Control.Props): ReactElement;
47
+ /** The sunken rail the indicator fills. Render the `Slider.Indicator` inside it. */
48
+ declare function SliderTrack({
49
+ className,
50
+ ...props
51
+ }: Slider.Track.Props): ReactElement;
52
+ /**
53
+ * The filled portion of the rail — the accent fill up to the thumb (or between range thumbs). When the
54
+ * Root sets a non-min `origin` on a single-value slider, the fill anchors there instead of the minimum.
55
+ */
56
+ declare function SliderIndicator({
57
+ className,
58
+ style,
59
+ ...props
60
+ }: Slider.Indicator.Props): ReactElement;
61
+ /**
62
+ * A draggable handle. Render one per value — `index={0}` for a single slider, and a second
63
+ * `index={1}` for a range. Base UI nests the real `<input type="range">` and stamps the live
64
+ * drag/focus/disabled state the CSS keys off. A composed `Slider.ThumbValue` child reads this thumb's
65
+ * index to show its live value while dragging.
66
+ */
67
+ declare function SliderThumb({
68
+ className,
69
+ index,
70
+ children,
71
+ ...props
72
+ }: Slider.Thumb.Props): ReactElement;
73
+ /**
74
+ * An opt-in live value readout, rendered as a child of `Slider.Thumb`. Floats above the thumb only
75
+ * while dragging (and on keyboard focus) so the value stays visible — never under the finger. It is
76
+ * `aria-hidden`: the thumb input's `aria-valuetext` remains the single announced source of truth.
77
+ */
78
+ declare function SliderThumbValue({
79
+ className,
80
+ ...props
81
+ }: Slider.ThumbValue.Props): ReactElement;
82
+ /**
83
+ * The decorative layer of step ticks over the control. Holds `Slider.Mark` children; the whole layer is
84
+ * `aria-hidden` (the value text already conveys position to assistive tech).
85
+ */
86
+ declare function SliderMarks({
87
+ className,
88
+ ...props
89
+ }: Slider.Marks.Props): ReactElement;
90
+ /**
91
+ * A single sharp tick at `value` on the scale, with an optional caption (e.g. a min/max label). Reads
92
+ * the neutral `border` colour until the value passes it, then switches to the accent (the fill's
93
+ * signal). Positioned logically so it mirrors under RTL and re-anchors for a vertical slider.
94
+ */
95
+ declare function SliderMark({
96
+ className,
97
+ value,
98
+ children,
99
+ style,
100
+ ...props
101
+ }: Slider.Mark.Props): ReactElement;
102
+ /**
103
+ * A slider for picking a number — or a range — from a continuous scale. The indicator fills the
104
+ * sunken rail in the accent up to the thumb, signalling the selected value; a range adds a second
105
+ * thumb and fills between them. Two sizes (`sm`, `md`). Built on Base UI's Slider, so it is fully
106
+ * keyboard-operable (arrows, Home/End, Page Up/Down, Shift+Arrow for the `largeStep`), RTL-aware,
107
+ * localizes its value text, and the thumb's grow-on-drag respects `prefers-reduced-motion`.
108
+ *
109
+ * Compose from parts: `Slider.Root` owns the value and the shared `size`; `Slider.Control` holds the
110
+ * `Slider.Track` (with its `Slider.Indicator`) and one `Slider.Thumb` per value. An optional
111
+ * `Slider.Header` wraps `Slider.Label` + `Slider.Value` above the control; a `Slider.ThumbValue` child
112
+ * of a thumb adds a drag readout; `Slider.Marks` / `Slider.Mark` add a tick scale; and `origin` anchors
113
+ * a bipolar fill away from the minimum.
114
+ *
115
+ * The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are
116
+ * exposed through the matching `Slider` namespace — e.g. `Slider.Thumb.Props`.
117
+ */
118
+ declare const Slider: {
119
+ /** Owns the value and the shared `size`. `Slider.Root.props({ size })` → its spreadable prop bag. */Root: typeof SliderRoot & {
120
+ props: typeof rootProps;
121
+ }; /** The label/value header row. `Slider.Header.props()` → its spreadable prop bag. */
122
+ Header: typeof SliderHeader & {
123
+ props: typeof headerProps;
124
+ }; /** The accessible label. `Slider.Label.props()` → its spreadable prop bag. */
125
+ Label: typeof SliderLabel & {
126
+ props: typeof labelProps;
127
+ }; /** The formatted value text. `Slider.Value.props()` → its spreadable prop bag. */
128
+ Value: typeof SliderValue & {
129
+ props: typeof valueProps;
130
+ }; /** The interactive control row. `Slider.Control.props()` → its spreadable prop bag. */
131
+ Control: typeof SliderControl & {
132
+ props: typeof controlProps;
133
+ }; /** The sunken rail. `Slider.Track.props()` → its spreadable prop bag. */
134
+ Track: typeof SliderTrack & {
135
+ props: typeof trackProps;
136
+ }; /** The accent fill. `Slider.Indicator.props()` → its spreadable prop bag. */
137
+ Indicator: typeof SliderIndicator & {
138
+ props: typeof indicatorProps;
139
+ }; /** A draggable handle. `Slider.Thumb.props()` → its spreadable prop bag for a foreign element. */
140
+ Thumb: typeof SliderThumb & {
141
+ props: typeof thumbProps;
142
+ }; /** The opt-in drag readout. `Slider.ThumbValue.props()` → its spreadable prop bag. */
143
+ ThumbValue: typeof SliderThumbValue & {
144
+ props: typeof thumbValueProps;
145
+ }; /** The step-tick layer. `Slider.Marks.props()` → its spreadable prop bag. */
146
+ Marks: typeof SliderMarks & {
147
+ props: typeof marksProps;
148
+ }; /** A single step tick. `Slider.Mark.props()` → its spreadable prop bag. */
149
+ Mark: typeof SliderMark & {
150
+ props: typeof markProps;
151
+ Label: {
152
+ props: typeof markLabelProps;
153
+ };
154
+ };
155
+ };
156
+ /**
157
+ * Per-part prop and state types, mirroring Base UI's `Component.Part.Props` convention. Types-only —
158
+ * it emits no runtime code and merges with the `Slider` object above, so `Slider.Thumb` is the
159
+ * component value while `Slider.Thumb.Props` is its prop type.
160
+ */
161
+ declare namespace Slider {
162
+ /** Control size — `sm` or `md`. */
163
+ type Size = SliderSize;
164
+ /** The spreadable data-attribute prop bag every `Slider.*.props()` returns (D12). */
165
+ type PartProps = SliderPartProps;
166
+ namespace Root {
167
+ type Props = Omit<Slider$1.Root.Props, "className" | "children"> & {
168
+ /**
169
+ * Control size — `sm` or `md`.
170
+ * @default "md"
171
+ */
172
+ size?: SliderSize;
173
+ /**
174
+ * Anchor the fill at a non-minimum value on a single-value slider, so the indicator spans
175
+ * `origin → value` (bipolar / centre fill — balance, EQ, brightness ±). Ignored for a range,
176
+ * where Base UI already fills between the two thumbs. Defaults to the scale minimum.
177
+ */
178
+ origin?: number; /** `Slider.Control` (and an optional `Slider.Header` with `Slider.Label` / `Slider.Value`). */
179
+ children?: ReactNode; /** Classes merged onto the root. */
180
+ className?: string;
181
+ };
182
+ type State = Slider$1.Root.State;
183
+ /** Argument to the `Slider.Root.props(...)` escape-hatch helper. */
184
+ type PropsArgs = SliderRootPropsArgs;
185
+ }
186
+ namespace Header {
187
+ /** A plain flex row; pass `Slider.Label` + `Slider.Value` as children. */
188
+ type Props = ComponentPropsWithoutRef<"div">;
189
+ }
190
+ namespace Label {
191
+ type Props = Slider$1.Label.Props;
192
+ type State = Slider$1.Label.State;
193
+ }
194
+ namespace Value {
195
+ type Props = Slider$1.Value.Props;
196
+ type State = Slider$1.Value.State;
197
+ }
198
+ namespace Control {
199
+ type Props = Slider$1.Control.Props;
200
+ type State = Slider$1.Control.State;
201
+ }
202
+ namespace Track {
203
+ type Props = Slider$1.Track.Props;
204
+ type State = Slider$1.Track.State;
205
+ }
206
+ namespace Indicator {
207
+ type Props = Slider$1.Indicator.Props;
208
+ type State = Slider$1.Indicator.State;
209
+ }
210
+ namespace Thumb {
211
+ type Props = Slider$1.Thumb.Props;
212
+ type State = Slider$1.Thumb.State;
213
+ }
214
+ namespace ThumbValue {
215
+ /** The drag readout; its content is the thumb's value, so `children` is owned by the part. */
216
+ type Props = Omit<Slider$1.Value.Props, "children">;
217
+ }
218
+ namespace Marks {
219
+ /** A plain layer; pass `Slider.Mark` children. */
220
+ type Props = ComponentPropsWithoutRef<"div">;
221
+ }
222
+ namespace Mark {
223
+ type Props = Omit<ComponentPropsWithoutRef<"span">, "children"> & {
224
+ /** The position on the scale this tick marks. */value: number; /** An optional decorative caption (e.g. a min/max label) rendered beneath the tick. */
225
+ children?: ReactNode;
226
+ };
227
+ }
228
+ }
229
+ //#endregion
230
+ export { Slider };
@@ -0,0 +1,274 @@
1
+ "use client";
2
+ import { Slider as Slider$1 } from "../../primitives/slider/slider.js";
3
+ import { SliderProvider, SliderThumbIndexProvider, SliderValueProvider, useSliderContext, useSliderThumbIndex, useSliderValueContext } from "./slider.context.js";
4
+ import { SLIDER_SLOTS } from "./slider.slots.js";
5
+ import { controlProps, headerProps, indicatorProps, labelProps, markLabelProps, markProps, marksProps, rootProps, thumbProps, thumbValueProps, trackProps, valueProps } from "./slider.props.js";
6
+ import { useState } from "react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ //#region src/components/slider/slider.tsx
9
+ const clamp01 = (n) => n < 0 ? 0 : n > 1 ? 1 : n;
10
+ /** Normalize Base UI's `number | number[]` value into an array (one entry for a single slider). */
11
+ function toValues(value, fallback) {
12
+ if (Array.isArray(value)) return [...value];
13
+ if (typeof value === "number") return [value];
14
+ return [fallback];
15
+ }
16
+ /**
17
+ * The fill geometry for a single-value slider with a non-min `origin`: the indicator spans
18
+ * `origin → value` instead of `min → value`. Overrides only the two axis keys Base UI sets inline
19
+ * (`inset-inline-start` + `width` horizontally; `bottom` + `height` vertically) so RTL still mirrors
20
+ * via the logical inline start and the cross-axis `inherit` Base UI applies is left untouched.
21
+ */
22
+ function originFillStyle(ctx) {
23
+ const { values, min, max, orientation, origin } = ctx;
24
+ if (origin === void 0 || values.length !== 1) return void 0;
25
+ const span = max - min;
26
+ if (span <= 0) return void 0;
27
+ const value = clamp01((values[0] - min) / span);
28
+ const anchor = clamp01((origin - min) / span);
29
+ const start = `${Math.min(anchor, value) * 100}%`;
30
+ const size = `${Math.abs(value - anchor) * 100}%`;
31
+ return orientation === "vertical" ? {
32
+ bottom: start,
33
+ height: size
34
+ } : {
35
+ insetInlineStart: start,
36
+ width: size
37
+ };
38
+ }
39
+ /** The fraction (0–1) of the scale a mark's value sits at. */
40
+ function markFraction(ctx, value) {
41
+ const span = ctx.max - ctx.min;
42
+ return span <= 0 ? 0 : clamp01((value - ctx.min) / span);
43
+ }
44
+ /** Whether the current value has reached a mark — within the span for a range, up to the value otherwise. */
45
+ function isMarkPassed(ctx, value) {
46
+ if (ctx.values.length > 1) {
47
+ const lo = Math.min(...ctx.values);
48
+ const hi = Math.max(...ctx.values);
49
+ return value >= lo && value <= hi;
50
+ }
51
+ return value <= ctx.values[0];
52
+ }
53
+ /**
54
+ * Owns the slider's value and shares the control `size` plus the live value geometry with its parts.
55
+ * Works controlled (`value` + `onValueChange`) or uncontrolled (`defaultValue`); pass an array of two
56
+ * numbers for a range. Built on Base UI, so it handles the active locale and the range thumbs'
57
+ * value-text suffixes. Compose `Slider.Control` (holding `Slider.Track` → `Slider.Indicator` and one
58
+ * `Slider.Thumb` per value), optionally under a `Slider.Header` with the `Slider.Label` + `Slider.Value`.
59
+ */
60
+ function SliderRoot({ size = "md", origin, className, children, value, defaultValue, min = 0, max = 100, orientation = "horizontal", onValueChange, ...props }) {
61
+ const controlled = value !== void 0;
62
+ const [uncontrolled, setUncontrolled] = useState(() => toValues(defaultValue, min));
63
+ const values = controlled ? toValues(value, min) : uncontrolled;
64
+ const handleValueChange = (next, details) => {
65
+ if (!controlled) setUncontrolled(toValues(next, min));
66
+ onValueChange?.(next, details);
67
+ };
68
+ return /* @__PURE__ */ jsx(Slider$1.Root, {
69
+ "data-slot": SLIDER_SLOTS.root,
70
+ "data-size": size,
71
+ className,
72
+ value,
73
+ defaultValue,
74
+ min,
75
+ max,
76
+ orientation,
77
+ onValueChange: handleValueChange,
78
+ ...props,
79
+ children: /* @__PURE__ */ jsx(SliderProvider, {
80
+ value: { size },
81
+ children: /* @__PURE__ */ jsx(SliderValueProvider, {
82
+ value: {
83
+ values,
84
+ min,
85
+ max,
86
+ orientation,
87
+ origin
88
+ },
89
+ children
90
+ })
91
+ })
92
+ });
93
+ }
94
+ /** A baseline row above the control holding `Slider.Label` + `Slider.Value`; owns the header→rail gap. */
95
+ function SliderHeader({ className, ...props }) {
96
+ useSliderContext("Header");
97
+ return /* @__PURE__ */ jsx("div", {
98
+ "data-slot": SLIDER_SLOTS.header,
99
+ className,
100
+ ...props
101
+ });
102
+ }
103
+ /** The slider's accessible label. Pair it with `Slider.Value` inside a `Slider.Header` above the control. */
104
+ function SliderLabel({ className, ...props }) {
105
+ useSliderContext("Label");
106
+ return /* @__PURE__ */ jsx(Slider$1.Label, {
107
+ "data-slot": SLIDER_SLOTS.label,
108
+ className,
109
+ ...props
110
+ });
111
+ }
112
+ /** The formatted current value, localized via the injected locale. */
113
+ function SliderValue({ className, ...props }) {
114
+ useSliderContext("Value");
115
+ return /* @__PURE__ */ jsx(Slider$1.Value, {
116
+ "data-slot": SLIDER_SLOTS.value,
117
+ className,
118
+ ...props
119
+ });
120
+ }
121
+ /** The interactive row the rail and thumbs sit centred within. Holds the `Track` and the `Thumb`s. */
122
+ function SliderControl({ className, ...props }) {
123
+ useSliderContext("Control");
124
+ return /* @__PURE__ */ jsx(Slider$1.Control, {
125
+ "data-slot": SLIDER_SLOTS.control,
126
+ className,
127
+ ...props
128
+ });
129
+ }
130
+ /** The sunken rail the indicator fills. Render the `Slider.Indicator` inside it. */
131
+ function SliderTrack({ className, ...props }) {
132
+ return /* @__PURE__ */ jsx(Slider$1.Track, {
133
+ "data-slot": SLIDER_SLOTS.track,
134
+ className,
135
+ ...props
136
+ });
137
+ }
138
+ /**
139
+ * The filled portion of the rail — the accent fill up to the thumb (or between range thumbs). When the
140
+ * Root sets a non-min `origin` on a single-value slider, the fill anchors there instead of the minimum.
141
+ */
142
+ function SliderIndicator({ className, style, ...props }) {
143
+ const ctx = useSliderValueContext();
144
+ const fill = ctx ? originFillStyle(ctx) : void 0;
145
+ return /* @__PURE__ */ jsx(Slider$1.Indicator, {
146
+ "data-slot": SLIDER_SLOTS.indicator,
147
+ className,
148
+ style: fill ? {
149
+ ...fill,
150
+ ...style
151
+ } : style,
152
+ ...props
153
+ });
154
+ }
155
+ /**
156
+ * A draggable handle. Render one per value — `index={0}` for a single slider, and a second
157
+ * `index={1}` for a range. Base UI nests the real `<input type="range">` and stamps the live
158
+ * drag/focus/disabled state the CSS keys off. A composed `Slider.ThumbValue` child reads this thumb's
159
+ * index to show its live value while dragging.
160
+ */
161
+ function SliderThumb({ className, index = 0, children, ...props }) {
162
+ return /* @__PURE__ */ jsx(Slider$1.Thumb, {
163
+ "data-slot": SLIDER_SLOTS.thumb,
164
+ index,
165
+ className,
166
+ ...props,
167
+ children: /* @__PURE__ */ jsx(SliderThumbIndexProvider, {
168
+ value: index,
169
+ children
170
+ })
171
+ });
172
+ }
173
+ /**
174
+ * An opt-in live value readout, rendered as a child of `Slider.Thumb`. Floats above the thumb only
175
+ * while dragging (and on keyboard focus) so the value stays visible — never under the finger. It is
176
+ * `aria-hidden`: the thumb input's `aria-valuetext` remains the single announced source of truth.
177
+ */
178
+ function SliderThumbValue({ className, ...props }) {
179
+ const index = useSliderThumbIndex();
180
+ return /* @__PURE__ */ jsx(Slider$1.Value, {
181
+ "data-slot": SLIDER_SLOTS.thumbValue,
182
+ "aria-hidden": true,
183
+ className,
184
+ ...props,
185
+ children: (formatted) => formatted[index]
186
+ });
187
+ }
188
+ /**
189
+ * The decorative layer of step ticks over the control. Holds `Slider.Mark` children; the whole layer is
190
+ * `aria-hidden` (the value text already conveys position to assistive tech).
191
+ */
192
+ function SliderMarks({ className, ...props }) {
193
+ useSliderContext("Marks");
194
+ const ctx = useSliderValueContext();
195
+ return /* @__PURE__ */ jsx("div", {
196
+ "data-slot": SLIDER_SLOTS.marks,
197
+ "data-orientation": ctx?.orientation ?? "horizontal",
198
+ "aria-hidden": true,
199
+ className,
200
+ ...props
201
+ });
202
+ }
203
+ /**
204
+ * A single sharp tick at `value` on the scale, with an optional caption (e.g. a min/max label). Reads
205
+ * the neutral `border` colour until the value passes it, then switches to the accent (the fill's
206
+ * signal). Positioned logically so it mirrors under RTL and re-anchors for a vertical slider.
207
+ */
208
+ function SliderMark({ className, value, children, style, ...props }) {
209
+ const ctx = useSliderValueContext();
210
+ const fraction = ctx ? markFraction(ctx, value) : 0;
211
+ const passed = ctx ? isMarkPassed(ctx, value) : false;
212
+ const offset = `${fraction * 100}%`;
213
+ const placement = ctx?.orientation === "vertical" ? { insetBlockEnd: offset } : { insetInlineStart: offset };
214
+ return /* @__PURE__ */ jsx("span", {
215
+ "data-slot": SLIDER_SLOTS.mark,
216
+ "data-orientation": ctx?.orientation ?? "horizontal",
217
+ "data-state": passed ? "passed" : void 0,
218
+ style: {
219
+ ...placement,
220
+ ...style
221
+ },
222
+ className,
223
+ ...props,
224
+ children: children != null && /* @__PURE__ */ jsx("span", {
225
+ "data-slot": SLIDER_SLOTS.markLabel,
226
+ children
227
+ })
228
+ });
229
+ }
230
+ /**
231
+ * A slider for picking a number — or a range — from a continuous scale. The indicator fills the
232
+ * sunken rail in the accent up to the thumb, signalling the selected value; a range adds a second
233
+ * thumb and fills between them. Two sizes (`sm`, `md`). Built on Base UI's Slider, so it is fully
234
+ * keyboard-operable (arrows, Home/End, Page Up/Down, Shift+Arrow for the `largeStep`), RTL-aware,
235
+ * localizes its value text, and the thumb's grow-on-drag respects `prefers-reduced-motion`.
236
+ *
237
+ * Compose from parts: `Slider.Root` owns the value and the shared `size`; `Slider.Control` holds the
238
+ * `Slider.Track` (with its `Slider.Indicator`) and one `Slider.Thumb` per value. An optional
239
+ * `Slider.Header` wraps `Slider.Label` + `Slider.Value` above the control; a `Slider.ThumbValue` child
240
+ * of a thumb adds a drag readout; `Slider.Marks` / `Slider.Mark` add a tick scale; and `origin` anchors
241
+ * a bipolar fill away from the minimum.
242
+ *
243
+ * The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are
244
+ * exposed through the matching `Slider` namespace — e.g. `Slider.Thumb.Props`.
245
+ */
246
+ const Slider = {
247
+ /** Owns the value and the shared `size`. `Slider.Root.props({ size })` → its spreadable prop bag. */
248
+ Root: Object.assign(SliderRoot, { props: rootProps }),
249
+ /** The label/value header row. `Slider.Header.props()` → its spreadable prop bag. */
250
+ Header: Object.assign(SliderHeader, { props: headerProps }),
251
+ /** The accessible label. `Slider.Label.props()` → its spreadable prop bag. */
252
+ Label: Object.assign(SliderLabel, { props: labelProps }),
253
+ /** The formatted value text. `Slider.Value.props()` → its spreadable prop bag. */
254
+ Value: Object.assign(SliderValue, { props: valueProps }),
255
+ /** The interactive control row. `Slider.Control.props()` → its spreadable prop bag. */
256
+ Control: Object.assign(SliderControl, { props: controlProps }),
257
+ /** The sunken rail. `Slider.Track.props()` → its spreadable prop bag. */
258
+ Track: Object.assign(SliderTrack, { props: trackProps }),
259
+ /** The accent fill. `Slider.Indicator.props()` → its spreadable prop bag. */
260
+ Indicator: Object.assign(SliderIndicator, { props: indicatorProps }),
261
+ /** A draggable handle. `Slider.Thumb.props()` → its spreadable prop bag for a foreign element. */
262
+ Thumb: Object.assign(SliderThumb, { props: thumbProps }),
263
+ /** The opt-in drag readout. `Slider.ThumbValue.props()` → its spreadable prop bag. */
264
+ ThumbValue: Object.assign(SliderThumbValue, { props: thumbValueProps }),
265
+ /** The step-tick layer. `Slider.Marks.props()` → its spreadable prop bag. */
266
+ Marks: Object.assign(SliderMarks, { props: marksProps }),
267
+ /** A single step tick. `Slider.Mark.props()` → its spreadable prop bag. */
268
+ Mark: Object.assign(SliderMark, {
269
+ props: markProps,
270
+ Label: { props: markLabelProps }
271
+ })
272
+ };
273
+ //#endregion
274
+ export { Slider };
@@ -0,0 +1,72 @@
1
+ import { SliderSize } from "./slider.context.js";
2
+
3
+ //#region src/components/slider/slider.props.d.ts
4
+ /** A spreadable data-attribute prop bag — the shape every `Slider.*.props()` returns. */
5
+ type SliderPartProps = {
6
+ /** The slot value the matching `slider.css` rules anchor on. */"data-slot": string; /** Forwarded verbatim — styling is attribute-driven, so this is an optional consumer passthrough. */
7
+ className?: string; /** A data-attribute present (empty string) or absent (`undefined`); never `false`. */
8
+ [attr: `data-${string}`]: string | undefined;
9
+ };
10
+ /** Common shape: every part's `.props()` accepts an optional `className` passthrough. */
11
+ interface BasePropsArgs {
12
+ /** Forwarded verbatim onto the returned prop bag. */
13
+ className?: string;
14
+ }
15
+ /** Argument to `Slider.Root.props(...)` — the control size the CSS keys its metrics off. */
16
+ interface SliderRootPropsArgs extends BasePropsArgs {
17
+ /** Control size — `sm` or `md`. @default "md" */
18
+ size?: SliderSize;
19
+ }
20
+ /** Argument to a stateless part's `.props(...)` — no variants of its own; metrics flow from the root. */
21
+ type SliderStatelessPropsArgs = BasePropsArgs;
22
+ /** Root prop bag: `data-slot` plus the `data-size` the descendant rules read. */
23
+ declare function rootProps({
24
+ size,
25
+ className
26
+ }?: SliderRootPropsArgs): SliderPartProps;
27
+ /** Header prop bag: the baseline row that holds the label and value above the control. */
28
+ declare function headerProps({
29
+ className
30
+ }?: SliderStatelessPropsArgs): SliderPartProps;
31
+ /** Label prop bag: just the slot anchor. */
32
+ declare function labelProps({
33
+ className
34
+ }?: SliderStatelessPropsArgs): SliderPartProps;
35
+ /** Value prop bag: just the slot anchor. */
36
+ declare function valueProps({
37
+ className
38
+ }?: SliderStatelessPropsArgs): SliderPartProps;
39
+ /** Control prop bag: just the slot anchor (metrics flow from the root size). */
40
+ declare function controlProps({
41
+ className
42
+ }?: SliderStatelessPropsArgs): SliderPartProps;
43
+ /** Track prop bag: just the slot anchor. */
44
+ declare function trackProps({
45
+ className
46
+ }?: SliderStatelessPropsArgs): SliderPartProps;
47
+ /** Indicator prop bag: just the slot anchor. */
48
+ declare function indicatorProps({
49
+ className
50
+ }?: SliderStatelessPropsArgs): SliderPartProps;
51
+ /** Thumb prop bag: just the slot anchor (Base UI stamps the live drag/disabled/focus state). */
52
+ declare function thumbProps({
53
+ className
54
+ }?: SliderStatelessPropsArgs): SliderPartProps;
55
+ /** Thumb-value prop bag: the drag readout bubble (decorative — `aria-hidden`, shown on drag/focus). */
56
+ declare function thumbValueProps({
57
+ className
58
+ }?: SliderStatelessPropsArgs): SliderPartProps;
59
+ /** Marks prop bag: the container layered over the control that positions the step ticks. */
60
+ declare function marksProps({
61
+ className
62
+ }?: SliderStatelessPropsArgs): SliderPartProps;
63
+ /** Mark prop bag: a single step tick (its position + passed state are set inline by the part). */
64
+ declare function markProps({
65
+ className
66
+ }?: SliderStatelessPropsArgs): SliderPartProps;
67
+ /** Mark-label prop bag: a tick's decorative caption (`aria-hidden`). */
68
+ declare function markLabelProps({
69
+ className
70
+ }?: SliderStatelessPropsArgs): SliderPartProps;
71
+ //#endregion
72
+ export { SliderPartProps, SliderRootPropsArgs, controlProps, headerProps, indicatorProps, labelProps, markLabelProps, markProps, marksProps, rootProps, thumbProps, thumbValueProps, trackProps, valueProps };