@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,118 @@
1
+ "use client";
2
+ import { Icon } from "../../icons/icon.js";
3
+ import { tabs_exports } from "../../primitives/tabs.js";
4
+ import { TabsProvider, useTabsContext } from "./tabs.context.js";
5
+ import { TABS_SLOTS } from "./tabs.slots.js";
6
+ import { indicatorProps, listProps, panelProps, rootProps, tabProps } from "./tabs.props.js";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ //#region src/components/tabs/tabs.tsx
9
+ /**
10
+ * Owns the active value and shares the `variant`/`size` with the strip. Works controlled (`value` +
11
+ * `onValueChange`) or uncontrolled (`defaultValue`). Compose `Tabs.List` (holding `Tabs.Tab`s and a
12
+ * `Tabs.Indicator`) with one `Tabs.Panel` per value.
13
+ */
14
+ function TabsRoot({ variant = "line", size = "md", color = "primary", className, children, ...props }) {
15
+ return /* @__PURE__ */ jsx(tabs_exports.Tabs.Root, {
16
+ "data-slot": TABS_SLOTS.root,
17
+ "data-variant": variant,
18
+ "data-size": size,
19
+ "data-color": color,
20
+ className,
21
+ ...props,
22
+ children: /* @__PURE__ */ jsx(TabsProvider, {
23
+ value: {
24
+ variant,
25
+ size
26
+ },
27
+ children
28
+ })
29
+ });
30
+ }
31
+ /**
32
+ * The row of tabs. Holds the `Tab`s and a single `Indicator`, and carries the strip's `variant` look.
33
+ * Arrow keys move between tabs and switch immediately (`activateOnFocus`); set it `false` for manual
34
+ * activation (move with arrows, commit with Enter/Space) when showing a panel is expensive.
35
+ */
36
+ function TabsList({ activateOnFocus = true, className, ...props }) {
37
+ useTabsContext("List");
38
+ return /* @__PURE__ */ jsx(tabs_exports.Tabs.List, {
39
+ "data-slot": TABS_SLOTS.list,
40
+ className,
41
+ activateOnFocus,
42
+ ...props
43
+ });
44
+ }
45
+ /** One tab. Names its panel; pass `value` to match a `Panel`. Optional leading `icon`. */
46
+ function TabsTab({ icon, className, children, ...props }) {
47
+ const { size } = useTabsContext("Tab");
48
+ return /* @__PURE__ */ jsxs(tabs_exports.Tabs.Tab, {
49
+ "data-slot": TABS_SLOTS.tab,
50
+ className,
51
+ ...props,
52
+ children: [icon ? /* @__PURE__ */ jsx(Icon, {
53
+ icon,
54
+ size: size === "sm" ? "sm" : "md"
55
+ }) : null, children]
56
+ });
57
+ }
58
+ /** Pins the indicator to the strip's bottom rule (line) or behind the active tab (pill/segmented). */
59
+ function lineStyle(variant) {
60
+ if (variant === "line") return {
61
+ left: "var(--active-tab-left)",
62
+ width: "var(--active-tab-width)"
63
+ };
64
+ return {
65
+ left: "var(--active-tab-left)",
66
+ top: "var(--active-tab-top)",
67
+ width: "var(--active-tab-width)",
68
+ height: "var(--active-tab-height)"
69
+ };
70
+ }
71
+ /** The sliding active highlight. Render it once inside `Tabs.List`; it follows the active tab. */
72
+ function TabsIndicator({ className, style, ...props }) {
73
+ const { variant } = useTabsContext("Indicator");
74
+ return /* @__PURE__ */ jsx(tabs_exports.Tabs.Indicator, {
75
+ "data-slot": TABS_SLOTS.indicator,
76
+ className,
77
+ style: {
78
+ ...lineStyle(variant),
79
+ ...style
80
+ },
81
+ ...props
82
+ });
83
+ }
84
+ /** The content for one tab. Match its `value` to a `Tab`. Only the active panel is shown. */
85
+ function TabsPanel({ className, ...props }) {
86
+ return /* @__PURE__ */ jsx(tabs_exports.Tabs.Panel, {
87
+ "data-slot": TABS_SLOTS.panel,
88
+ className,
89
+ ...props
90
+ });
91
+ }
92
+ /**
93
+ * A tabbed control: a strip of tabs over swappable panels, with a single highlight that slides between
94
+ * the active tab. Three looks — `line` (underline), `pill` (floating pill), and `segmented` (raised
95
+ * pill in a sunken track) — in two sizes. Built on Base UI's Tabs, so the strip is fully
96
+ * keyboard-operable (arrows, Home/End), RTL-aware, and the indicator animation respects
97
+ * `prefers-reduced-motion`.
98
+ *
99
+ * Compose from parts: `Tabs.Root` owns the value and the shared `variant`/`size`, `Tabs.List` holds
100
+ * the `Tabs.Tab`s and one `Tabs.Indicator`, and a `Tabs.Panel` renders each value's content.
101
+ *
102
+ * The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are
103
+ * exposed through the matching `Tabs` namespace — e.g. `Tabs.Tab.Props`.
104
+ */
105
+ const Tabs = {
106
+ /** Owns the value and the shared look/size. `Tabs.Root.props({ variant, size })` → its spreadable prop bag. */
107
+ Root: Object.assign(TabsRoot, { props: rootProps }),
108
+ /** The tab strip. `Tabs.List.props()` → its spreadable prop bag. */
109
+ List: Object.assign(TabsList, { props: listProps }),
110
+ /** One tab. `Tabs.Tab.props({ selected, disabled })` → its spreadable prop bag for a foreign element. */
111
+ Tab: Object.assign(TabsTab, { props: tabProps }),
112
+ /** The sliding highlight. `Tabs.Indicator.props()` → its spreadable prop bag. */
113
+ Indicator: Object.assign(TabsIndicator, { props: indicatorProps }),
114
+ /** One panel. `Tabs.Panel.props()` → its spreadable prop bag. */
115
+ Panel: Object.assign(TabsPanel, { props: panelProps })
116
+ };
117
+ //#endregion
118
+ export { Tabs };
@@ -0,0 +1,59 @@
1
+ import { TabsColor, TabsSize, TabsVariant } from "./tabs.context.js";
2
+
3
+ //#region src/components/tabs/tabs.props.d.ts
4
+ /** A spreadable data-attribute prop bag — the shape every `Tabs.*.props()` returns. */
5
+ type TabsPartProps = {
6
+ /** The slot value the matching `tabs.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 `Tabs.Root.props(...)` — the strip's shared look + size, stamped on the root the CSS keys metrics off. */
16
+ interface TabsRootPropsArgs extends BasePropsArgs {
17
+ /** Strip look — `line`, `pill`, or `segmented`. @default "line" */
18
+ variant?: TabsVariant;
19
+ /** Control height and type — `sm` or `md`. @default "md" */
20
+ size?: TabsSize;
21
+ /** The `segmented` active chip's fill — `primary` (default) or `accent`. @default "primary" */
22
+ color?: TabsColor;
23
+ }
24
+ /** Argument to `Tabs.Tab.props(...)` — the per-tab state the CSS keys its colour/affordance off. */
25
+ interface TabsTabPropsArgs extends BasePropsArgs {
26
+ /** Whether this tab is the active one (drives the foreground colour via `data-active`). */
27
+ selected?: boolean;
28
+ /** Whether this tab is disabled (drives the not-allowed affordance via `data-disabled`). */
29
+ disabled?: boolean;
30
+ }
31
+ /** Argument to a stateless part's `.props(...)` — no variants/state of its own; look flows from the root. */
32
+ type TabsStatelessPropsArgs = BasePropsArgs;
33
+ /** Root prop bag: `data-slot` plus the `data-variant`/`data-size`/`data-color` the descendant rules read. */
34
+ declare function rootProps({
35
+ variant,
36
+ size,
37
+ color,
38
+ className
39
+ }?: TabsRootPropsArgs): TabsPartProps;
40
+ /** List prop bag: just the slot anchor (variant look flows from the root). */
41
+ declare function listProps({
42
+ className
43
+ }?: TabsStatelessPropsArgs): TabsPartProps;
44
+ /** Tab prop bag: slot anchor plus the `data-active`/`data-disabled` state. */
45
+ declare function tabProps({
46
+ selected,
47
+ disabled,
48
+ className
49
+ }?: TabsTabPropsArgs): TabsPartProps;
50
+ /** Indicator prop bag: just the slot anchor (positioning flows from the root variant). */
51
+ declare function indicatorProps({
52
+ className
53
+ }?: TabsStatelessPropsArgs): TabsPartProps;
54
+ /** Panel prop bag: just the slot anchor. */
55
+ declare function panelProps({
56
+ className
57
+ }?: TabsStatelessPropsArgs): TabsPartProps;
58
+ //#endregion
59
+ export { TabsPartProps, TabsRootPropsArgs, TabsTabPropsArgs, indicatorProps, listProps, panelProps, rootProps, tabProps };
@@ -0,0 +1,39 @@
1
+ import { TABS_SLOTS } from "./tabs.slots.js";
2
+ //#region src/components/tabs/tabs.props.ts
3
+ /** Stamp a boolean state as a bare data-attribute: present (`""`) when on, absent (`undefined`) when off. */
4
+ const flag = (on) => on ? "" : void 0;
5
+ const withClassName = (bag, className) => className === void 0 ? bag : {
6
+ ...bag,
7
+ className
8
+ };
9
+ /** Root prop bag: `data-slot` plus the `data-variant`/`data-size`/`data-color` the descendant rules read. */
10
+ function rootProps({ variant = "line", size = "md", color = "primary", className } = {}) {
11
+ return withClassName({
12
+ "data-slot": TABS_SLOTS.root,
13
+ "data-variant": variant,
14
+ "data-size": size,
15
+ "data-color": color
16
+ }, className);
17
+ }
18
+ /** List prop bag: just the slot anchor (variant look flows from the root). */
19
+ function listProps({ className } = {}) {
20
+ return withClassName({ "data-slot": TABS_SLOTS.list }, className);
21
+ }
22
+ /** Tab prop bag: slot anchor plus the `data-active`/`data-disabled` state. */
23
+ function tabProps({ selected, disabled, className } = {}) {
24
+ return withClassName({
25
+ "data-slot": TABS_SLOTS.tab,
26
+ "data-active": flag(selected),
27
+ "data-disabled": flag(disabled)
28
+ }, className);
29
+ }
30
+ /** Indicator prop bag: just the slot anchor (positioning flows from the root variant). */
31
+ function indicatorProps({ className } = {}) {
32
+ return withClassName({ "data-slot": TABS_SLOTS.indicator }, className);
33
+ }
34
+ /** Panel prop bag: just the slot anchor. */
35
+ function panelProps({ className } = {}) {
36
+ return withClassName({ "data-slot": TABS_SLOTS.panel }, className);
37
+ }
38
+ //#endregion
39
+ export { indicatorProps, listProps, panelProps, rootProps, tabProps };
@@ -0,0 +1,20 @@
1
+ //#region src/components/tabs/tabs.slots.d.ts
2
+ /**
3
+ * The `data-*` hooks `Tabs` stamps on its parts, for host-side styling and tests. Slot values mark
4
+ * each rendered element; the state attributes are emitted by Base UI's Tabs — pair a slot with a
5
+ * state to target, say, only the active tab.
6
+ */
7
+ declare enum TabsDataAttributes {
8
+ /** The root tabs element. */
9
+ slot = "data-slot",
10
+ /** Present on the active tab and its panel. */
11
+ active = "data-active",
12
+ /** Present on the tab the keyboard is focused on. */
13
+ highlighted = "data-highlighted",
14
+ /** Present on a disabled tab. */
15
+ disabled = "data-disabled",
16
+ /** `horizontal` | `vertical` — the strip's orientation. */
17
+ orientation = "data-orientation"
18
+ }
19
+ //#endregion
20
+ export { TabsDataAttributes };
@@ -0,0 +1,33 @@
1
+ //#region src/components/tabs/tabs.slots.ts
2
+ /**
3
+ * The slot vocabulary every `Tabs` 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.
6
+ */
7
+ const TABS_SLOTS = {
8
+ root: "noctis-tabs",
9
+ list: "noctis-tabs-list",
10
+ tab: "noctis-tabs-tab",
11
+ indicator: "noctis-tabs-indicator",
12
+ panel: "noctis-tabs-panel"
13
+ };
14
+ /**
15
+ * The `data-*` hooks `Tabs` stamps on its parts, for host-side styling and tests. Slot values mark
16
+ * each rendered element; the state attributes are emitted by Base UI's Tabs — pair a slot with a
17
+ * state to target, say, only the active tab.
18
+ */
19
+ let TabsDataAttributes = /* @__PURE__ */ function(TabsDataAttributes) {
20
+ /** The root tabs element. */
21
+ TabsDataAttributes["slot"] = "data-slot";
22
+ /** Present on the active tab and its panel. */
23
+ TabsDataAttributes["active"] = "data-active";
24
+ /** Present on the tab the keyboard is focused on. */
25
+ TabsDataAttributes["highlighted"] = "data-highlighted";
26
+ /** Present on a disabled tab. */
27
+ TabsDataAttributes["disabled"] = "data-disabled";
28
+ /** `horizontal` | `vertical` — the strip's orientation. */
29
+ TabsDataAttributes["orientation"] = "data-orientation";
30
+ return TabsDataAttributes;
31
+ }({});
32
+ //#endregion
33
+ export { TABS_SLOTS, TabsDataAttributes };
@@ -0,0 +1,3 @@
1
+ import { TextareaSize } from "./textarea.types.js";
2
+ import { Textarea } from "./textarea.js";
3
+ import { TextareaDataAttributes } from "./textarea.slots.js";
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { createContext, use } from "react";
3
+ //#region src/components/textarea/textarea.context.ts
4
+ const TextareaContext = createContext(null);
5
+ const TextareaProvider = TextareaContext.Provider;
6
+ /** Read the field context, throwing a named error when a part renders outside `Textarea.Root`. */
7
+ function useTextareaContext(part) {
8
+ const context = use(TextareaContext);
9
+ if (context === null) throw new Error(`Textarea.${part} must be rendered inside <Textarea.Root>.`);
10
+ return context;
11
+ }
12
+ //#endregion
13
+ export { TextareaProvider, useTextareaContext };
@@ -0,0 +1,142 @@
1
+ import { FieldActionPropsArgs, FieldCountPropsArgs, actionProps, countProps } from "../field/field.props.js";
2
+ import { FieldAction, FieldCount } from "../field/field.js";
3
+ import { input_d_exports } from "../../primitives/input.js";
4
+ import { TextareaSize } from "./textarea.types.js";
5
+ import { TextareaPartProps, TextareaRootPropsArgs, TextareaToolbarPropsArgs, controlProps, rootProps, toolbarProps } from "./textarea.props.js";
6
+ import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
7
+
8
+ //#region src/components/textarea/textarea.d.ts
9
+ /**
10
+ * The multi-line field shell — a `<div>` that paints the field surface, border, and a subtle rest shadow,
11
+ * and stacks the editable control above an optional toolbar. It owns the shared `size` (descendant parts
12
+ * read it from context) and stamps the `data-size` axis `textarea.css` keys its metrics off. State flows
13
+ * from the control: the shell reads the control's `:disabled`/`aria-invalid`/`readonly` (and Base UI/Field
14
+ * `data-*`) through `:has()`, so validity and disabled have one source of truth; the `invalid`/`disabled`
15
+ * props stay as additive shell-only overrides. Clicking the shell padding focuses the control; focus is
16
+ * calm and ring-less, shifting the border to the focus role.
17
+ */
18
+ declare function TextareaRoot({
19
+ size,
20
+ invalid,
21
+ disabled,
22
+ className,
23
+ children,
24
+ onMouseDown,
25
+ ...props
26
+ }: Textarea.Root.Props): ReactElement;
27
+ /**
28
+ * The editable control — a native `<textarea>` rendered through Base UI's input, so it works on its own
29
+ * or inside a Base UI `Field.Root` (which feeds it the validity/disabled state the shell reads). It is
30
+ * reset to a clean textarea so the shell owns the chrome, top-aligns its text, and auto-grows with its
31
+ * content (native `field-sizing` where supported, a tiny scroll-height fallback otherwise) between the
32
+ * field's min and max height, keeping a vertical resize handle.
33
+ */
34
+ declare function TextareaControl({
35
+ className,
36
+ ref,
37
+ onChange,
38
+ ...props
39
+ }: Textarea.Control.Props): ReactElement;
40
+ /**
41
+ * The toolbar row beneath the control — a flex strip, divided from the text by a hairline, that hosts the
42
+ * shared `Textarea.Action`s and an optional `Textarea.Count` (the comment-composer footer). Lay actions
43
+ * and the count out with the usual flex utilities.
44
+ */
45
+ declare function TextareaToolbar({
46
+ className,
47
+ children,
48
+ ...props
49
+ }: Textarea.Toolbar.Props): ReactElement;
50
+ /**
51
+ * A multi-line text field: the editable control wearing the shared field surface, border, calm focus, and
52
+ * rest shadow, that auto-grows with its content and keeps a resize handle. Compose from parts —
53
+ * `Textarea.Root` is the shell that owns the `size`, `Textarea.Control` is the Base UI textarea (its
54
+ * disabled/read-only/invalid state drives the shell), and `Textarea.Toolbar` is an optional footer row for
55
+ * `Textarea.Action`s and a `Textarea.Count`. The action and count are the shared field affordances
56
+ * (identical to Input's), so the composer footer reads exactly like the rest of the family. Built on Base
57
+ * UI's input, so it slots straight into a `Field.Root` for labels, descriptions, and validation.
58
+ *
59
+ * The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are exposed
60
+ * through the matching `Textarea` namespace — e.g. `Textarea.Control.Props`.
61
+ */
62
+ declare const Textarea: {
63
+ /** The field shell. `Textarea.Root.props({ size, invalid, disabled })` → its spreadable prop bag. */Root: typeof TextareaRoot & {
64
+ props: typeof rootProps;
65
+ }; /** The editable textarea. `Textarea.Control.props()` → its spreadable prop bag for a foreign element. */
66
+ Control: typeof TextareaControl & {
67
+ props: typeof controlProps;
68
+ }; /** The footer toolbar row. `Textarea.Toolbar.props()` → its spreadable prop bag. */
69
+ Toolbar: typeof TextareaToolbar & {
70
+ props: typeof toolbarProps;
71
+ }; /** The shared in-field action button (shortcut/submit/clear). `Textarea.Action.props({ side })` → its prop bag. */
72
+ Action: typeof FieldAction & {
73
+ props: typeof actionProps;
74
+ }; /** The shared character-count readout. `Textarea.Count.props()` → its spreadable prop bag. */
75
+ Count: typeof FieldCount & {
76
+ props: typeof countProps;
77
+ };
78
+ };
79
+ /**
80
+ * Per-part prop and state types, mirroring Base UI's `Component.Part.Props` convention. Types-only — it
81
+ * emits no runtime code and merges with the `Textarea` object above.
82
+ */
83
+ declare namespace Textarea {
84
+ /** Field height/padding/text scale — `sm`, `md`, or `lg`. */
85
+ type Size = TextareaSize;
86
+ /** The spreadable data-attribute prop bag every `Textarea.*.props()` returns (D12). */
87
+ type PartProps = TextareaPartProps;
88
+ namespace Root {
89
+ type Props = Omit<ComponentPropsWithRef<"div">, "children"> & {
90
+ /**
91
+ * Field height/padding/text scale.
92
+ * @default "md"
93
+ */
94
+ size?: TextareaSize;
95
+ /**
96
+ * Shell-only override that forces the invalid border. The default path reads the control's
97
+ * `aria-invalid`/Field validity through `:has()`, so this is only an escape hatch.
98
+ * @default false
99
+ */
100
+ invalid?: boolean;
101
+ /**
102
+ * Shell-only override that forces the disabled affordance. The default path reads the
103
+ * control's `disabled`/Field state through `:has()`, so this is only an escape hatch.
104
+ * @default false
105
+ */
106
+ disabled?: boolean; /** `Textarea.Control` and an optional `Textarea.Toolbar`. */
107
+ children?: ReactNode; /** Classes merged onto the shell. */
108
+ className?: string;
109
+ };
110
+ /** Argument to the `Textarea.Root.props(...)` escape-hatch helper. */
111
+ type PropsArgs = TextareaRootPropsArgs;
112
+ }
113
+ namespace Control {
114
+ type Props = input_d_exports.Input.Props & {
115
+ /**
116
+ * Initial visible row count (the native textarea attribute). The field still auto-grows and is
117
+ * bounded by its min/max height, so this is just the starting size.
118
+ */
119
+ rows?: number;
120
+ };
121
+ type State = input_d_exports.Input.State;
122
+ }
123
+ namespace Toolbar {
124
+ type Props = ComponentPropsWithRef<"div">;
125
+ /** Argument to the `Textarea.Toolbar.props(...)` escape-hatch helper. */
126
+ type PropsArgs = TextareaToolbarPropsArgs;
127
+ }
128
+ /** The shared in-field action button — see {@link FieldAction}. */
129
+ namespace Action {
130
+ type Props = FieldAction.Props;
131
+ /** Argument to the `Textarea.Action.props(...)` escape-hatch helper. */
132
+ type PropsArgs = FieldActionPropsArgs;
133
+ }
134
+ /** The shared character-count readout — see {@link FieldCount}. */
135
+ namespace Count {
136
+ type Props = FieldCount.Props;
137
+ /** Argument to the `Textarea.Count.props(...)` escape-hatch helper. */
138
+ type PropsArgs = FieldCountPropsArgs;
139
+ }
140
+ }
141
+ //#endregion
142
+ export { Textarea };
@@ -0,0 +1,129 @@
1
+ "use client";
2
+ import { actionProps, countProps } from "../field/field.props.js";
3
+ import { FieldAction, FieldCount } from "../field/field.js";
4
+ import { input_exports } from "../../primitives/input.js";
5
+ import { TextareaProvider, useTextareaContext } from "./textarea.context.js";
6
+ import { TEXTAREA_SLOTS } from "./textarea.slots.js";
7
+ import { controlProps, rootProps, toolbarProps } from "./textarea.props.js";
8
+ import { jsx } from "react/jsx-runtime";
9
+ //#region src/components/textarea/textarea.tsx
10
+ /** Interactive descendants that own their own click: a click landing on (or inside) one is left alone. */
11
+ const INTERACTIVE_SELECTOR = "button, a, input, textarea, select, label, [contenteditable], [tabindex]";
12
+ /**
13
+ * Whether the browser auto-sizes a textarea to its content natively (CSS `field-sizing: content`). When
14
+ * it does, the control grows with no script; when it doesn't (older browsers), the control falls back to
15
+ * a tiny scroll-height auto-grow on input. Resolved once; `false` under SSR, re-checked on the client.
16
+ */
17
+ const SUPPORTS_FIELD_SIZING = typeof CSS !== "undefined" && typeof CSS.supports === "function" && CSS.supports("field-sizing", "content");
18
+ /** Grow a textarea to fit its content; CSS `min/max-block-size` floor and cap it, scrolling past the cap. */
19
+ function autoGrow(el) {
20
+ el.style.height = "auto";
21
+ el.style.height = `${el.scrollHeight}px`;
22
+ }
23
+ /**
24
+ * The multi-line field shell — a `<div>` that paints the field surface, border, and a subtle rest shadow,
25
+ * and stacks the editable control above an optional toolbar. It owns the shared `size` (descendant parts
26
+ * read it from context) and stamps the `data-size` axis `textarea.css` keys its metrics off. State flows
27
+ * from the control: the shell reads the control's `:disabled`/`aria-invalid`/`readonly` (and Base UI/Field
28
+ * `data-*`) through `:has()`, so validity and disabled have one source of truth; the `invalid`/`disabled`
29
+ * props stay as additive shell-only overrides. Clicking the shell padding focuses the control; focus is
30
+ * calm and ring-less, shifting the border to the focus role.
31
+ */
32
+ function TextareaRoot({ size = "md", invalid = false, disabled = false, className, children, onMouseDown, ...props }) {
33
+ const { className: _omit, ...recipe } = rootProps({
34
+ size,
35
+ invalid,
36
+ disabled
37
+ });
38
+ const value = { size };
39
+ function handleMouseDown(event) {
40
+ onMouseDown?.(event);
41
+ if (event.defaultPrevented || event.button !== 0) return;
42
+ if (event.target.closest(INTERACTIVE_SELECTOR)) return;
43
+ const control = event.currentTarget.querySelector(`[data-slot="${TEXTAREA_SLOTS.control}"]`);
44
+ if (control) {
45
+ event.preventDefault();
46
+ control.focus();
47
+ }
48
+ }
49
+ return /* @__PURE__ */ jsx("div", {
50
+ ...recipe,
51
+ "data-slot": TEXTAREA_SLOTS.root,
52
+ className,
53
+ onMouseDown: handleMouseDown,
54
+ ...props,
55
+ children: /* @__PURE__ */ jsx(TextareaProvider, {
56
+ value,
57
+ children
58
+ })
59
+ });
60
+ }
61
+ /**
62
+ * The editable control — a native `<textarea>` rendered through Base UI's input, so it works on its own
63
+ * or inside a Base UI `Field.Root` (which feeds it the validity/disabled state the shell reads). It is
64
+ * reset to a clean textarea so the shell owns the chrome, top-aligns its text, and auto-grows with its
65
+ * content (native `field-sizing` where supported, a tiny scroll-height fallback otherwise) between the
66
+ * field's min and max height, keeping a vertical resize handle.
67
+ */
68
+ function TextareaControl({ className, ref, onChange, ...props }) {
69
+ useTextareaContext("Control");
70
+ const setRef = (node) => {
71
+ if (typeof ref === "function") ref(node);
72
+ else if (ref) ref.current = node;
73
+ if (node && !SUPPORTS_FIELD_SIZING) autoGrow(node);
74
+ };
75
+ const handleChange = (event) => {
76
+ onChange?.(event);
77
+ if (!SUPPORTS_FIELD_SIZING) autoGrow(event.currentTarget);
78
+ };
79
+ return /* @__PURE__ */ jsx(input_exports.Input, {
80
+ render: /* @__PURE__ */ jsx("textarea", {}),
81
+ ref: setRef,
82
+ onChange: handleChange,
83
+ "data-slot": TEXTAREA_SLOTS.control,
84
+ className,
85
+ ...props
86
+ });
87
+ }
88
+ /**
89
+ * The toolbar row beneath the control — a flex strip, divided from the text by a hairline, that hosts the
90
+ * shared `Textarea.Action`s and an optional `Textarea.Count` (the comment-composer footer). Lay actions
91
+ * and the count out with the usual flex utilities.
92
+ */
93
+ function TextareaToolbar({ className, children, ...props }) {
94
+ const { className: _omit, ...recipe } = toolbarProps();
95
+ useTextareaContext("Toolbar");
96
+ return /* @__PURE__ */ jsx("div", {
97
+ ...recipe,
98
+ "data-slot": TEXTAREA_SLOTS.toolbar,
99
+ className,
100
+ ...props,
101
+ children
102
+ });
103
+ }
104
+ /**
105
+ * A multi-line text field: the editable control wearing the shared field surface, border, calm focus, and
106
+ * rest shadow, that auto-grows with its content and keeps a resize handle. Compose from parts —
107
+ * `Textarea.Root` is the shell that owns the `size`, `Textarea.Control` is the Base UI textarea (its
108
+ * disabled/read-only/invalid state drives the shell), and `Textarea.Toolbar` is an optional footer row for
109
+ * `Textarea.Action`s and a `Textarea.Count`. The action and count are the shared field affordances
110
+ * (identical to Input's), so the composer footer reads exactly like the rest of the family. Built on Base
111
+ * UI's input, so it slots straight into a `Field.Root` for labels, descriptions, and validation.
112
+ *
113
+ * The runtime compound is a plain object (kept tree-shakeable); per-part prop and state types are exposed
114
+ * through the matching `Textarea` namespace — e.g. `Textarea.Control.Props`.
115
+ */
116
+ const Textarea = {
117
+ /** The field shell. `Textarea.Root.props({ size, invalid, disabled })` → its spreadable prop bag. */
118
+ Root: Object.assign(TextareaRoot, { props: rootProps }),
119
+ /** The editable textarea. `Textarea.Control.props()` → its spreadable prop bag for a foreign element. */
120
+ Control: Object.assign(TextareaControl, { props: controlProps }),
121
+ /** The footer toolbar row. `Textarea.Toolbar.props()` → its spreadable prop bag. */
122
+ Toolbar: Object.assign(TextareaToolbar, { props: toolbarProps }),
123
+ /** The shared in-field action button (shortcut/submit/clear). `Textarea.Action.props({ side })` → its prop bag. */
124
+ Action: Object.assign(FieldAction, { props: actionProps }),
125
+ /** The shared character-count readout. `Textarea.Count.props()` → its spreadable prop bag. */
126
+ Count: Object.assign(FieldCount, { props: countProps })
127
+ };
128
+ //#endregion
129
+ export { Textarea };
@@ -0,0 +1,44 @@
1
+ import { TextareaSize } from "./textarea.types.js";
2
+
3
+ //#region src/components/textarea/textarea.props.d.ts
4
+ /** A spreadable data-attribute prop bag — the shape every `Textarea.*.props()` returns. */
5
+ type TextareaPartProps = {
6
+ /** The slot value the matching `textarea.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 `Textarea.Root.props(...)` — the shell's size + validity, stamped on the slot the CSS keys metrics off. */
16
+ interface TextareaRootPropsArgs extends BasePropsArgs {
17
+ /** Field height/padding/text scale. @default "md" */
18
+ size?: TextareaSize;
19
+ /** Shell-only override: force the invalid border via `data-invalid` (the default path reads the control). */
20
+ invalid?: boolean;
21
+ /** Shell-only override: force the disabled affordance via `data-disabled` (the default path reads the control). */
22
+ disabled?: boolean;
23
+ }
24
+ /** Argument to a stateless part's `.props(...)` — no variants/state of its own; look flows from the root. */
25
+ type TextareaControlPropsArgs = BasePropsArgs;
26
+ /** Argument to `Textarea.Toolbar.props(...)` — the toolbar carries no variants of its own. */
27
+ type TextareaToolbarPropsArgs = BasePropsArgs;
28
+ /** Root prop bag: `data-slot` plus the `data-size` and the `data-invalid`/`data-disabled` shell overrides. */
29
+ declare function rootProps({
30
+ size,
31
+ invalid,
32
+ disabled,
33
+ className
34
+ }?: TextareaRootPropsArgs): TextareaPartProps;
35
+ /** Control prop bag: just the slot anchor (the editable textarea; metrics flow from the root). */
36
+ declare function controlProps({
37
+ className
38
+ }?: TextareaControlPropsArgs): TextareaPartProps;
39
+ /** Toolbar prop bag: just the slot anchor (the row hosting the field affordances). */
40
+ declare function toolbarProps({
41
+ className
42
+ }?: TextareaToolbarPropsArgs): TextareaPartProps;
43
+ //#endregion
44
+ export { TextareaPartProps, TextareaRootPropsArgs, TextareaToolbarPropsArgs, controlProps, rootProps, toolbarProps };
@@ -0,0 +1,32 @@
1
+ import { TEXTAREA_SLOTS } from "./textarea.slots.js";
2
+ //#region src/components/textarea/textarea.props.ts
3
+ /**
4
+ * The D12 unified variant contract for Textarea — each compound part exposes a `props(...)` builder
5
+ * returning a spreadable `{ "data-slot": "noctis-textarea-<part>", ...dataAttrs }` so `textarea.css` can
6
+ * style a foreign element as that part, mirroring Input's builders.
7
+ */
8
+ /** Stamp a boolean state as a bare data-attribute: present (`""`) when on, absent (`undefined`) when off. */
9
+ const flag = (on) => on ? "" : void 0;
10
+ const withClassName = (bag, className) => className === void 0 ? bag : {
11
+ ...bag,
12
+ className
13
+ };
14
+ /** Root prop bag: `data-slot` plus the `data-size` and the `data-invalid`/`data-disabled` shell overrides. */
15
+ function rootProps({ size = "md", invalid, disabled, className } = {}) {
16
+ return withClassName({
17
+ "data-slot": TEXTAREA_SLOTS.root,
18
+ "data-size": size,
19
+ "data-invalid": flag(invalid),
20
+ "data-disabled": flag(disabled)
21
+ }, className);
22
+ }
23
+ /** Control prop bag: just the slot anchor (the editable textarea; metrics flow from the root). */
24
+ function controlProps({ className } = {}) {
25
+ return withClassName({ "data-slot": TEXTAREA_SLOTS.control }, className);
26
+ }
27
+ /** Toolbar prop bag: just the slot anchor (the row hosting the field affordances). */
28
+ function toolbarProps({ className } = {}) {
29
+ return withClassName({ "data-slot": TEXTAREA_SLOTS.toolbar }, className);
30
+ }
31
+ //#endregion
32
+ export { controlProps, rootProps, toolbarProps };
@@ -0,0 +1,23 @@
1
+ //#region src/components/textarea/textarea.slots.d.ts
2
+ /**
3
+ * The data attributes the {@link Textarea} (and the Base UI control it renders) expose for styling and
4
+ * testing. The shell's look is keyed off the root `data-slot="noctis-textarea"` plus `data-size`. State
5
+ * flows from the editable control: the shell reads the control's `:disabled`/`aria-invalid`/`readonly`
6
+ * (and Base UI/Field `data-*`) through `:has()`, so validity and disabled have one source of truth, with
7
+ * the root's own `[data-invalid]`/`[data-disabled]` as additive shell-only overrides. Focus is calm and
8
+ * ring-less, shifting the border to the focus role, mirroring Input.
9
+ */
10
+ declare enum TextareaDataAttributes {
11
+ /** The rendered element of a given part (root shell, control, or toolbar). */
12
+ slot = "data-slot",
13
+ /** The size scale — `sm` | `md` | `lg`; the generated layer keys the per-size internals off it. */
14
+ size = "data-size",
15
+ /** Present when the field is in an invalid state — set by Base UI/Field on the control, or by the root override. */
16
+ invalid = "data-invalid",
17
+ /** Present when the field is disabled — set by Base UI on the control, or by the root override. */
18
+ disabled = "data-disabled",
19
+ /** Present when the field is read-only — set by Base UI on the control; the shell holds the rest border. */
20
+ readonly = "data-readonly"
21
+ }
22
+ //#endregion
23
+ export { TextareaDataAttributes };