@wordpress/ui 0.4.0 → 0.5.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 (420) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/LICENSE.md +1 -1
  3. package/README.md +18 -0
  4. package/build/badge/badge.cjs +95 -0
  5. package/build/badge/badge.cjs.map +7 -0
  6. package/build/{lock-unlock.js → badge/index.cjs} +8 -14
  7. package/build/badge/index.cjs.map +7 -0
  8. package/build/badge/types.cjs +19 -0
  9. package/build/badge/types.cjs.map +7 -0
  10. package/build/box/{box.js → box.cjs} +7 -6
  11. package/build/box/box.cjs.map +7 -0
  12. package/build/box/{index.js → index.cjs} +2 -2
  13. package/build/box/{types.js → types.cjs} +1 -1
  14. package/build/box/types.cjs.map +7 -0
  15. package/build/button/button.cjs +401 -0
  16. package/build/button/button.cjs.map +7 -0
  17. package/build/{utils/element.js → button/icon.cjs} +22 -20
  18. package/build/button/icon.cjs.map +7 -0
  19. package/build/button/index.cjs +39 -0
  20. package/build/button/index.cjs.map +7 -0
  21. package/build/button/types.cjs +19 -0
  22. package/build/button/types.cjs.map +7 -0
  23. package/build/form/primitives/field/control.cjs +38 -0
  24. package/build/form/primitives/field/control.cjs.map +7 -0
  25. package/build/form/primitives/field/description.cjs +92 -0
  26. package/build/form/primitives/field/description.cjs.map +7 -0
  27. package/build/form/primitives/field/details.cjs +99 -0
  28. package/build/form/primitives/field/details.cjs.map +7 -0
  29. package/build/form/primitives/field/index.cjs +46 -0
  30. package/build/form/primitives/field/index.cjs.map +7 -0
  31. package/build/form/primitives/field/item.cjs +36 -0
  32. package/build/form/primitives/field/item.cjs.map +7 -0
  33. package/build/form/primitives/field/label.cjs +98 -0
  34. package/build/form/primitives/field/label.cjs.map +7 -0
  35. package/build/form/primitives/field/root.cjs +79 -0
  36. package/build/form/primitives/field/root.cjs.map +7 -0
  37. package/build/form/primitives/field/types.cjs +19 -0
  38. package/build/form/primitives/field/types.cjs.map +7 -0
  39. package/build/form/primitives/fieldset/context.cjs +40 -0
  40. package/build/form/primitives/fieldset/context.cjs.map +7 -0
  41. package/build/form/primitives/fieldset/description.cjs +101 -0
  42. package/build/form/primitives/fieldset/description.cjs.map +7 -0
  43. package/build/form/primitives/fieldset/details.cjs +103 -0
  44. package/build/form/primitives/fieldset/details.cjs.map +7 -0
  45. package/build/form/primitives/fieldset/index.cjs +40 -0
  46. package/build/form/primitives/fieldset/index.cjs.map +7 -0
  47. package/build/form/primitives/fieldset/legend.cjs +94 -0
  48. package/build/form/primitives/fieldset/legend.cjs.map +7 -0
  49. package/build/form/primitives/fieldset/root.cjs +86 -0
  50. package/build/form/primitives/fieldset/root.cjs.map +7 -0
  51. package/build/form/primitives/fieldset/types.cjs +19 -0
  52. package/build/form/primitives/fieldset/types.cjs.map +7 -0
  53. package/build/form/primitives/index.cjs +50 -0
  54. package/build/form/primitives/index.cjs.map +7 -0
  55. package/build/form/primitives/input/index.cjs +31 -0
  56. package/build/form/primitives/input/index.cjs.map +7 -0
  57. package/build/form/primitives/input/input.cjs +148 -0
  58. package/build/form/primitives/input/input.cjs.map +7 -0
  59. package/build/form/primitives/input/types.cjs +19 -0
  60. package/build/form/primitives/input/types.cjs.map +7 -0
  61. package/build/form/primitives/input-layout/context.cjs +49 -0
  62. package/build/form/primitives/input-layout/context.cjs.map +7 -0
  63. package/build/form/primitives/input-layout/index.cjs +35 -0
  64. package/build/form/primitives/input-layout/index.cjs.map +7 -0
  65. package/build/form/primitives/input-layout/input-layout.cjs +196 -0
  66. package/build/form/primitives/input-layout/input-layout.cjs.map +7 -0
  67. package/build/form/primitives/input-layout/slot.cjs +165 -0
  68. package/build/form/primitives/input-layout/slot.cjs.map +7 -0
  69. package/build/form/primitives/input-layout/types.cjs +19 -0
  70. package/build/form/primitives/input-layout/types.cjs.map +7 -0
  71. package/build/icon/icon.cjs +46 -0
  72. package/build/icon/icon.cjs.map +7 -0
  73. package/build/{index.js → icon/index.cjs} +13 -7
  74. package/build/icon/index.cjs.map +7 -0
  75. package/build/icon/types.cjs +19 -0
  76. package/build/icon/types.cjs.map +7 -0
  77. package/build/index.cjs +37 -0
  78. package/build/index.cjs.map +7 -0
  79. package/build/stack/{index.js → index.cjs} +2 -2
  80. package/build/stack/index.cjs.map +7 -0
  81. package/build/stack/{stack.js → stack.cjs} +6 -18
  82. package/build/stack/stack.cjs.map +7 -0
  83. package/build/stack/{types.js → types.cjs} +1 -1
  84. package/build/stack/types.cjs.map +7 -0
  85. package/build/types/css-modules.d.cjs +2 -0
  86. package/build/types/css-modules.d.cjs.map +7 -0
  87. package/build/types/{react.d.js → react.d.cjs} +1 -1
  88. package/build/utils/{types.js → types.cjs} +1 -1
  89. package/build/visually-hidden/index.cjs +31 -0
  90. package/build/visually-hidden/index.cjs.map +7 -0
  91. package/build/visually-hidden/types.cjs +19 -0
  92. package/build/visually-hidden/types.cjs.map +7 -0
  93. package/build/visually-hidden/visually-hidden.cjs +69 -0
  94. package/build/visually-hidden/visually-hidden.cjs.map +7 -0
  95. package/build-module/badge/badge.mjs +70 -0
  96. package/build-module/badge/badge.mjs.map +7 -0
  97. package/build-module/badge/index.mjs +6 -0
  98. package/build-module/badge/index.mjs.map +7 -0
  99. package/build-module/badge/types.mjs +1 -0
  100. package/build-module/box/{box.js → box.mjs} +7 -6
  101. package/build-module/box/box.mjs.map +7 -0
  102. package/build-module/box/index.mjs +6 -0
  103. package/build-module/box/types.mjs +1 -0
  104. package/build-module/button/button.mjs +366 -0
  105. package/build-module/button/button.mjs.map +7 -0
  106. package/build-module/button/icon.mjs +22 -0
  107. package/build-module/button/icon.mjs.map +7 -0
  108. package/build-module/button/index.mjs +14 -0
  109. package/build-module/button/index.mjs.map +7 -0
  110. package/build-module/button/types.mjs +1 -0
  111. package/build-module/form/primitives/field/control.mjs +13 -0
  112. package/build-module/form/primitives/field/control.mjs.map +7 -0
  113. package/build-module/form/primitives/field/description.mjs +57 -0
  114. package/build-module/form/primitives/field/description.mjs.map +7 -0
  115. package/build-module/form/primitives/field/details.mjs +64 -0
  116. package/build-module/form/primitives/field/details.mjs.map +7 -0
  117. package/build-module/form/primitives/field/index.mjs +16 -0
  118. package/build-module/form/primitives/field/index.mjs.map +7 -0
  119. package/build-module/form/primitives/field/item.mjs +11 -0
  120. package/build-module/form/primitives/field/item.mjs.map +7 -0
  121. package/build-module/form/primitives/field/label.mjs +63 -0
  122. package/build-module/form/primitives/field/label.mjs.map +7 -0
  123. package/build-module/form/primitives/field/root.mjs +44 -0
  124. package/build-module/form/primitives/field/root.mjs.map +7 -0
  125. package/build-module/form/primitives/field/types.mjs +1 -0
  126. package/build-module/form/primitives/fieldset/context.mjs +14 -0
  127. package/build-module/form/primitives/fieldset/context.mjs.map +7 -0
  128. package/build-module/form/primitives/fieldset/description.mjs +66 -0
  129. package/build-module/form/primitives/fieldset/description.mjs.map +7 -0
  130. package/build-module/form/primitives/fieldset/details.mjs +68 -0
  131. package/build-module/form/primitives/fieldset/details.mjs.map +7 -0
  132. package/build-module/form/primitives/fieldset/index.mjs +12 -0
  133. package/build-module/form/primitives/fieldset/index.mjs.map +7 -0
  134. package/build-module/form/primitives/fieldset/legend.mjs +59 -0
  135. package/build-module/form/primitives/fieldset/legend.mjs.map +7 -0
  136. package/build-module/form/primitives/fieldset/root.mjs +51 -0
  137. package/build-module/form/primitives/fieldset/root.mjs.map +7 -0
  138. package/build-module/form/primitives/fieldset/types.mjs +1 -0
  139. package/build-module/form/primitives/index.mjs +12 -0
  140. package/build-module/form/primitives/index.mjs.map +7 -0
  141. package/build-module/form/primitives/input/index.mjs +6 -0
  142. package/build-module/form/primitives/input/index.mjs.map +7 -0
  143. package/build-module/form/primitives/input/input.mjs +113 -0
  144. package/build-module/form/primitives/input/input.mjs.map +7 -0
  145. package/build-module/form/primitives/input/types.mjs +1 -0
  146. package/build-module/form/primitives/input/types.mjs.map +7 -0
  147. package/build-module/form/primitives/input-layout/context.mjs +22 -0
  148. package/build-module/form/primitives/input-layout/context.mjs.map +7 -0
  149. package/build-module/form/primitives/input-layout/index.mjs +10 -0
  150. package/build-module/form/primitives/input-layout/index.mjs.map +7 -0
  151. package/build-module/form/primitives/input-layout/input-layout.mjs +161 -0
  152. package/build-module/form/primitives/input-layout/input-layout.mjs.map +7 -0
  153. package/build-module/form/primitives/input-layout/slot.mjs +130 -0
  154. package/build-module/form/primitives/input-layout/slot.mjs.map +7 -0
  155. package/build-module/form/primitives/input-layout/types.mjs +1 -0
  156. package/build-module/form/primitives/input-layout/types.mjs.map +7 -0
  157. package/build-module/icon/icon.mjs +21 -0
  158. package/build-module/icon/icon.mjs.map +7 -0
  159. package/build-module/icon/index.mjs +6 -0
  160. package/build-module/icon/index.mjs.map +7 -0
  161. package/build-module/icon/types.mjs +1 -0
  162. package/build-module/icon/types.mjs.map +7 -0
  163. package/build-module/index.mjs +9 -0
  164. package/build-module/index.mjs.map +7 -0
  165. package/build-module/stack/index.mjs +6 -0
  166. package/build-module/stack/index.mjs.map +7 -0
  167. package/build-module/stack/{stack.js → stack.mjs} +6 -8
  168. package/build-module/stack/stack.mjs.map +7 -0
  169. package/build-module/stack/types.mjs +1 -0
  170. package/build-module/stack/types.mjs.map +7 -0
  171. package/build-module/types/css-modules.d.mjs +1 -0
  172. package/build-module/types/css-modules.d.mjs.map +7 -0
  173. package/build-module/types/{react.d.js → react.d.mjs} +1 -1
  174. package/build-module/utils/types.mjs +1 -0
  175. package/build-module/utils/types.mjs.map +7 -0
  176. package/build-module/visually-hidden/index.mjs +6 -0
  177. package/build-module/visually-hidden/index.mjs.map +7 -0
  178. package/build-module/visually-hidden/types.mjs +1 -0
  179. package/build-module/visually-hidden/types.mjs.map +7 -0
  180. package/build-module/visually-hidden/visually-hidden.mjs +44 -0
  181. package/build-module/visually-hidden/visually-hidden.mjs.map +7 -0
  182. package/build-types/badge/badge.d.ts +7 -0
  183. package/build-types/badge/badge.d.ts.map +1 -0
  184. package/build-types/badge/index.d.ts +2 -0
  185. package/build-types/badge/index.d.ts.map +1 -0
  186. package/build-types/badge/stories/index.story.d.ts +15 -0
  187. package/build-types/badge/stories/index.story.d.ts.map +1 -0
  188. package/build-types/badge/types.d.ts +14 -0
  189. package/build-types/badge/types.d.ts.map +1 -0
  190. package/build-types/box/box.d.ts +0 -3
  191. package/build-types/box/box.d.ts.map +1 -1
  192. package/build-types/box/stories/index.story.d.ts +1 -11
  193. package/build-types/box/stories/index.story.d.ts.map +1 -1
  194. package/build-types/box/types.d.ts +8 -15
  195. package/build-types/box/types.d.ts.map +1 -1
  196. package/build-types/button/button.d.ts +3 -0
  197. package/build-types/button/button.d.ts.map +1 -0
  198. package/build-types/button/icon.d.ts +10 -0
  199. package/build-types/button/icon.d.ts.map +1 -0
  200. package/build-types/button/index.d.ts +10 -0
  201. package/build-types/button/index.d.ts.map +1 -0
  202. package/build-types/button/stories/index.story.d.ts +23 -0
  203. package/build-types/button/stories/index.story.d.ts.map +1 -0
  204. package/build-types/button/test/button.test.d.ts +2 -0
  205. package/build-types/button/test/button.test.d.ts.map +1 -0
  206. package/build-types/button/test/icon.test.d.ts +2 -0
  207. package/build-types/button/test/icon.test.d.ts.map +1 -0
  208. package/build-types/button/types.d.ts +63 -0
  209. package/build-types/button/types.d.ts.map +1 -0
  210. package/build-types/form/primitives/field/control.d.ts +6 -0
  211. package/build-types/form/primitives/field/control.d.ts.map +1 -0
  212. package/build-types/form/primitives/field/description.d.ts +9 -0
  213. package/build-types/form/primitives/field/description.d.ts.map +1 -0
  214. package/build-types/form/primitives/field/details.d.ts +21 -0
  215. package/build-types/form/primitives/field/details.d.ts.map +1 -0
  216. package/build-types/form/primitives/field/index.d.ts +8 -0
  217. package/build-types/form/primitives/field/index.d.ts.map +1 -0
  218. package/build-types/form/primitives/field/item.d.ts +3 -0
  219. package/build-types/form/primitives/field/item.d.ts.map +1 -0
  220. package/build-types/form/primitives/field/label.d.ts +11 -0
  221. package/build-types/form/primitives/field/label.d.ts.map +1 -0
  222. package/build-types/form/primitives/field/root.d.ts +15 -0
  223. package/build-types/form/primitives/field/root.d.ts.map +1 -0
  224. package/build-types/form/primitives/field/stories/index.story.d.ts +39 -0
  225. package/build-types/form/primitives/field/stories/index.story.d.ts.map +1 -0
  226. package/build-types/form/primitives/field/test/index.test.d.ts +2 -0
  227. package/build-types/form/primitives/field/test/index.test.d.ts.map +1 -0
  228. package/build-types/form/primitives/field/types.d.ts +62 -0
  229. package/build-types/form/primitives/field/types.d.ts.map +1 -0
  230. package/build-types/form/primitives/fieldset/context.d.ts +8 -0
  231. package/build-types/form/primitives/fieldset/context.d.ts.map +1 -0
  232. package/build-types/form/primitives/fieldset/description.d.ts +9 -0
  233. package/build-types/form/primitives/fieldset/description.d.ts.map +1 -0
  234. package/build-types/form/primitives/fieldset/details.d.ts +21 -0
  235. package/build-types/form/primitives/fieldset/details.d.ts.map +1 -0
  236. package/build-types/form/primitives/fieldset/index.d.ts +6 -0
  237. package/build-types/form/primitives/fieldset/index.d.ts.map +1 -0
  238. package/build-types/form/primitives/fieldset/legend.d.ts +9 -0
  239. package/build-types/form/primitives/fieldset/legend.d.ts.map +1 -0
  240. package/build-types/form/primitives/fieldset/root.d.ts +15 -0
  241. package/build-types/form/primitives/fieldset/root.d.ts.map +1 -0
  242. package/build-types/form/primitives/fieldset/stories/index.story.d.ts +18 -0
  243. package/build-types/form/primitives/fieldset/stories/index.story.d.ts.map +1 -0
  244. package/build-types/form/primitives/fieldset/test/index.test.d.ts +2 -0
  245. package/build-types/form/primitives/fieldset/test/index.test.d.ts.map +1 -0
  246. package/build-types/form/primitives/fieldset/types.d.ts +32 -0
  247. package/build-types/form/primitives/fieldset/types.d.ts.map +1 -0
  248. package/build-types/form/primitives/index.d.ts +5 -0
  249. package/build-types/form/primitives/index.d.ts.map +1 -0
  250. package/build-types/form/primitives/input/index.d.ts +2 -0
  251. package/build-types/form/primitives/input/index.d.ts.map +1 -0
  252. package/build-types/form/primitives/input/input.d.ts +10 -0
  253. package/build-types/form/primitives/input/input.d.ts.map +1 -0
  254. package/build-types/form/primitives/input/stories/index.story.d.ts +13 -0
  255. package/build-types/form/primitives/input/stories/index.story.d.ts.map +1 -0
  256. package/build-types/form/primitives/input/test/index.test.d.ts +2 -0
  257. package/build-types/form/primitives/input/test/index.test.d.ts.map +1 -0
  258. package/build-types/form/primitives/input/types.d.ts +27 -0
  259. package/build-types/form/primitives/input/types.d.ts.map +1 -0
  260. package/build-types/form/primitives/input-layout/context.d.ts +17 -0
  261. package/build-types/form/primitives/input-layout/context.d.ts.map +1 -0
  262. package/build-types/form/primitives/input-layout/index.d.ts +4 -0
  263. package/build-types/form/primitives/input-layout/index.d.ts.map +1 -0
  264. package/build-types/form/primitives/input-layout/input-layout.d.ts +7 -0
  265. package/build-types/form/primitives/input-layout/input-layout.d.ts.map +1 -0
  266. package/build-types/form/primitives/input-layout/slot.d.ts +6 -0
  267. package/build-types/form/primitives/input-layout/slot.d.ts.map +1 -0
  268. package/build-types/form/primitives/input-layout/stories/index.story.d.ts +24 -0
  269. package/build-types/form/primitives/input-layout/stories/index.story.d.ts.map +1 -0
  270. package/build-types/form/primitives/input-layout/test/index.test.d.ts +2 -0
  271. package/build-types/form/primitives/input-layout/test/index.test.d.ts.map +1 -0
  272. package/build-types/form/primitives/input-layout/types.d.ts +41 -0
  273. package/build-types/form/primitives/input-layout/types.d.ts.map +1 -0
  274. package/build-types/icon/icon.d.ts +14 -0
  275. package/build-types/icon/icon.d.ts.map +1 -0
  276. package/build-types/icon/index.d.ts +2 -0
  277. package/build-types/icon/index.d.ts.map +1 -0
  278. package/build-types/icon/stories/index.story.d.ts +11 -0
  279. package/build-types/icon/stories/index.story.d.ts.map +1 -0
  280. package/build-types/icon/test/icon.test.d.ts +2 -0
  281. package/build-types/icon/test/icon.test.d.ts.map +1 -0
  282. package/build-types/icon/types.d.ts +15 -0
  283. package/build-types/icon/types.d.ts.map +1 -0
  284. package/build-types/index.d.ts +6 -0
  285. package/build-types/index.d.ts.map +1 -1
  286. package/build-types/stack/index.d.ts +0 -3
  287. package/build-types/stack/index.d.ts.map +1 -1
  288. package/build-types/stack/stack.d.ts.map +1 -1
  289. package/build-types/stack/stories/index.story.d.ts +1 -11
  290. package/build-types/stack/stories/index.story.d.ts.map +1 -1
  291. package/build-types/stack/types.d.ts +2 -5
  292. package/build-types/stack/types.d.ts.map +1 -1
  293. package/build-types/test/index.test.d.ts +2 -0
  294. package/build-types/test/index.test.d.ts.map +1 -0
  295. package/build-types/visually-hidden/index.d.ts +2 -0
  296. package/build-types/visually-hidden/index.d.ts.map +1 -0
  297. package/build-types/visually-hidden/stories/index.story.d.ts +7 -0
  298. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -0
  299. package/build-types/visually-hidden/test/visually-hidden.test.d.ts +2 -0
  300. package/build-types/visually-hidden/test/visually-hidden.test.d.ts.map +1 -0
  301. package/build-types/visually-hidden/types.d.ts +8 -0
  302. package/build-types/visually-hidden/types.d.ts.map +1 -0
  303. package/build-types/visually-hidden/visually-hidden.d.ts +7 -0
  304. package/build-types/visually-hidden/visually-hidden.d.ts.map +1 -0
  305. package/package.json +26 -9
  306. package/src/badge/badge.tsx +88 -0
  307. package/src/badge/index.ts +1 -0
  308. package/src/badge/stories/choosing-intent.mdx +112 -0
  309. package/src/badge/stories/index.story.tsx +120 -0
  310. package/src/badge/types.ts +22 -0
  311. package/src/box/box.tsx +11 -23
  312. package/src/box/stories/index.story.tsx +3 -15
  313. package/src/box/types.ts +16 -59
  314. package/src/button/button.tsx +57 -0
  315. package/src/button/icon.tsx +24 -0
  316. package/src/button/index.ts +16 -0
  317. package/src/button/stories/index.story.tsx +192 -0
  318. package/src/button/style.module.css +232 -0
  319. package/src/button/test/button.test.tsx +89 -0
  320. package/src/button/test/icon.test.tsx +13 -0
  321. package/src/button/types.ts +72 -0
  322. package/src/form/primitives/field/control.tsx +9 -0
  323. package/src/form/primitives/field/description.tsx +18 -0
  324. package/src/form/primitives/field/details.tsx +36 -0
  325. package/src/form/primitives/field/index.ts +8 -0
  326. package/src/form/primitives/field/item.tsx +9 -0
  327. package/src/form/primitives/field/label.tsx +21 -0
  328. package/src/form/primitives/field/root.tsx +33 -0
  329. package/src/form/primitives/field/stories/index.story.tsx +132 -0
  330. package/src/form/primitives/field/test/index.test.tsx +36 -0
  331. package/src/form/primitives/field/types.ts +82 -0
  332. package/src/form/primitives/fieldset/context.tsx +13 -0
  333. package/src/form/primitives/fieldset/description.tsx +36 -0
  334. package/src/form/primitives/fieldset/details.tsx +46 -0
  335. package/src/form/primitives/fieldset/index.ts +6 -0
  336. package/src/form/primitives/fieldset/legend.tsx +17 -0
  337. package/src/form/primitives/fieldset/root.tsx +42 -0
  338. package/src/form/primitives/fieldset/stories/index.story.tsx +67 -0
  339. package/src/form/primitives/fieldset/style.module.css +12 -0
  340. package/src/form/primitives/fieldset/test/index.test.tsx +135 -0
  341. package/src/form/primitives/fieldset/types.ts +35 -0
  342. package/src/form/primitives/index.ts +4 -0
  343. package/src/form/primitives/input/index.ts +1 -0
  344. package/src/form/primitives/input/input.tsx +28 -0
  345. package/src/form/primitives/input/stories/index.story.tsx +40 -0
  346. package/src/form/primitives/input/style.module.css +34 -0
  347. package/src/form/primitives/input/test/index.test.tsx +13 -0
  348. package/src/form/primitives/input/types.ts +31 -0
  349. package/src/form/primitives/input-layout/context.tsx +36 -0
  350. package/src/form/primitives/input-layout/index.ts +6 -0
  351. package/src/form/primitives/input-layout/input-layout.tsx +49 -0
  352. package/src/form/primitives/input-layout/slot.tsx +39 -0
  353. package/src/form/primitives/input-layout/stories/index.story.tsx +67 -0
  354. package/src/form/primitives/input-layout/style.module.css +82 -0
  355. package/src/form/primitives/input-layout/test/index.test.tsx +23 -0
  356. package/src/form/primitives/input-layout/types.ts +44 -0
  357. package/src/icon/icon.tsx +30 -0
  358. package/src/icon/index.ts +1 -0
  359. package/src/icon/stories/index.story.tsx +47 -0
  360. package/src/icon/test/icon.test.tsx +13 -0
  361. package/src/icon/types.ts +14 -0
  362. package/src/index.ts +6 -0
  363. package/src/stack/index.ts +0 -3
  364. package/src/stack/stack.tsx +5 -18
  365. package/src/stack/stories/index.story.tsx +1 -14
  366. package/src/stack/test/stack.test.tsx +22 -12
  367. package/src/stack/types.ts +2 -6
  368. package/src/stories/introduction.mdx +6 -0
  369. package/src/test/index.test.ts +22 -0
  370. package/src/utils/css/field.module.css +27 -0
  371. package/src/utils/css/focus.module.css +31 -0
  372. package/src/utils/css/resets.module.css +13 -0
  373. package/src/visually-hidden/index.ts +1 -0
  374. package/src/visually-hidden/stories/index.story.tsx +22 -0
  375. package/src/visually-hidden/style.module.css +15 -0
  376. package/src/visually-hidden/test/visually-hidden.test.tsx +59 -0
  377. package/src/visually-hidden/types.ts +8 -0
  378. package/src/visually-hidden/visually-hidden.tsx +23 -0
  379. package/build/box/box.js.map +0 -7
  380. package/build/box/types.js.map +0 -7
  381. package/build/index.js.map +0 -7
  382. package/build/lock-unlock.js.map +0 -7
  383. package/build/stack/index.js.map +0 -7
  384. package/build/stack/stack.js.map +0 -7
  385. package/build/stack/types.js.map +0 -7
  386. package/build/types/css-modules.d.js +0 -2
  387. package/build/utils/element.js.map +0 -7
  388. package/build-module/box/box.js.map +0 -7
  389. package/build-module/box/index.js +0 -6
  390. package/build-module/box/types.js +0 -1
  391. package/build-module/index.js +0 -3
  392. package/build-module/index.js.map +0 -7
  393. package/build-module/lock-unlock.js +0 -11
  394. package/build-module/lock-unlock.js.map +0 -7
  395. package/build-module/stack/index.js +0 -6
  396. package/build-module/stack/index.js.map +0 -7
  397. package/build-module/stack/stack.js.map +0 -7
  398. package/build-module/stack/types.js +0 -1
  399. package/build-module/types/css-modules.d.js +0 -1
  400. package/build-module/utils/element.js +0 -20
  401. package/build-module/utils/element.js.map +0 -7
  402. package/build-module/utils/types.js +0 -1
  403. package/build-types/lock-unlock.d.ts +0 -2
  404. package/build-types/lock-unlock.d.ts.map +0 -1
  405. package/build-types/utils/element.d.ts +0 -25
  406. package/build-types/utils/element.d.ts.map +0 -1
  407. package/src/lock-unlock.ts +0 -10
  408. package/src/utils/element.ts +0 -51
  409. package/tsconfig.json +0 -13
  410. package/tsconfig.tsbuildinfo +0 -1
  411. /package/build/box/{index.js.map → index.cjs.map} +0 -0
  412. /package/build/types/{react.d.js.map → react.d.cjs.map} +0 -0
  413. /package/build/utils/{types.js.map → types.cjs.map} +0 -0
  414. /package/build-module/{box/types.js.map → badge/types.mjs.map} +0 -0
  415. /package/build-module/box/{index.js.map → index.mjs.map} +0 -0
  416. /package/build-module/{stack/types.js.map → box/types.mjs.map} +0 -0
  417. /package/build-module/{types/css-modules.d.js.map → button/types.mjs.map} +0 -0
  418. /package/build-module/{utils/types.js.map → form/primitives/field/types.mjs.map} +0 -0
  419. /package/{build/types/css-modules.d.js.map → build-module/form/primitives/fieldset/types.mjs.map} +0 -0
  420. /package/build-module/types/{react.d.js.map → react.d.mjs.map} +0 -0
@@ -0,0 +1,10 @@
1
+ import { Button as ButtonButton } from './button';
2
+ import { ButtonIcon } from './icon';
3
+ /**
4
+ * A versatile button component with multiple variants, tones, and sizes.
5
+ * Built on design tokens for consistent theming and accessibility.
6
+ */
7
+ export declare const Button: typeof ButtonButton & {
8
+ Icon: typeof ButtonIcon;
9
+ };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;;GAGG;AACH,eAAO,MAAM,MAAM,EAMZ,OAAO,YAAY,GAAG;IAC5B,IAAI,EAAE,OAAO,UAAU,CAAC;CACxB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Button } from '../index';
3
+ declare const meta: Meta<typeof Button>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Button>;
6
+ export declare const Default: Story;
7
+ export declare const Outline: Story;
8
+ export declare const Minimal: Story;
9
+ export declare const Compact: Story;
10
+ export declare const Small: Story;
11
+ export declare const Neutral: Story;
12
+ export declare const NeutralOutline: Story;
13
+ export declare const Unstyled: Story;
14
+ export declare const AllTonesAndVariants: Story;
15
+ export declare const WithIcon: Story;
16
+ export declare const Loading: Story;
17
+ /**
18
+ * The pressed state is only available for buttons with `tone="neutral"` and
19
+ * `variant="minimal"`. This represents a toggle button that is currently in an
20
+ * active/pressed state.
21
+ */
22
+ export declare const Pressed: Story;
23
+ //# sourceMappingURL=index.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/button/stories/index.story.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,MAAM,CAQ9B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,MAAM,CAAE,CAAC;AAEvC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA6DjC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAoBrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=button.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.test.d.ts","sourceRoot":"","sources":["../../../src/button/test/button.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=icon.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.test.d.ts","sourceRoot":"","sources":["../../../src/button/test/icon.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,63 @@
1
+ import { type ReactNode, type HTMLAttributes } from 'react';
2
+ import type { Button as _Button } from '@base-ui/react/button';
3
+ import type { ComponentProps } from '../utils/types';
4
+ type _ButtonProps = ComponentProps<typeof _Button>;
5
+ export interface ButtonProps extends Omit<_ButtonProps, 'disabled' | 'aria-pressed'> {
6
+ /**
7
+ * The variant of the button. Variants describe the visual style treatment
8
+ * of the button.
9
+ *
10
+ * @default "solid"
11
+ */
12
+ variant?: 'solid' | 'outline' | 'minimal' | 'unstyled';
13
+ /**
14
+ * The tone of the button, describing a semantic color intent:
15
+ *
16
+ * - `'brand': for the most prominent actions, using the brand colors.
17
+ * - `'neutral'` for less prominent actions.
18
+ *
19
+ * @default "brand"
20
+ */
21
+ tone?: 'brand' | 'neutral';
22
+ /**
23
+ * The size of the button.
24
+ *
25
+ * - `'default'`: For normal text-label buttons, unless it is a toggle button.
26
+ * - `'compact'`: For toggle buttons, icon buttons, and buttons when used in context of either.
27
+ * - `'small'`: For icon buttons associated with more advanced or auxiliary features.
28
+ *
29
+ * @default "default"
30
+ */
31
+ size?: 'default' | 'compact' | 'small';
32
+ /**
33
+ * Whether the button is disabled.
34
+ */
35
+ disabled?: boolean;
36
+ /**
37
+ * Whether the element should be focusable even when it is disabled.
38
+ *
39
+ * @default true
40
+ */
41
+ focusableWhenDisabled?: _ButtonProps['focusableWhenDisabled'];
42
+ /**
43
+ * Indicates the current "pressed" state of toggle buttons. This should only
44
+ * be used with neutral minimal buttons.
45
+ */
46
+ 'aria-pressed'?: HTMLAttributes<HTMLButtonElement>['aria-pressed'];
47
+ /**
48
+ * The content of the button.
49
+ */
50
+ children?: ReactNode;
51
+ /**
52
+ * Whether the button is in a loading state, such as when an action is being
53
+ * performed.
54
+ * @default false
55
+ */
56
+ loading?: boolean;
57
+ /**
58
+ * The text used for assistive technology to indicate the loading state.
59
+ */
60
+ loadingAnnouncement?: string;
61
+ }
62
+ export {};
63
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,KAAK,YAAY,GAAG,cAAc,CAAE,OAAO,OAAO,CAAE,CAAC;AAErD,MAAM,WAAW,WAChB,SAAQ,IAAI,CAAE,YAAY,EAAE,UAAU,GAAG,cAAc,CAAE;IACzD;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAEvD;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE3B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,YAAY,CAAE,uBAAuB,CAAE,CAAC;IAEhE;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAE,iBAAiB,CAAE,CAAE,cAAc,CAAE,CAAC;IAEvE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,6 @@
1
+ import { Field as _Field } from '@base-ui/react/field';
2
+ export declare const Control: import("react").ForwardRefExoticComponent<Omit<import("../../../utils/types").ComponentProps<import("react").ForwardRefExoticComponent<import("@base-ui/react").FieldControlProps & import("react").RefAttributes<HTMLInputElement>>>, "defaultValue"> & {
3
+ children?: _Field.Control.Props["children"];
4
+ defaultValue?: _Field.Control.Props["defaultValue"];
5
+ } & import("react").RefAttributes<HTMLInputElement>>;
6
+ //# sourceMappingURL=control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/control.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAIvD,eAAO,MAAM,OAAO;;;oDAInB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const Description: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").FieldDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref">, "className" | "children" | "render"> & {
2
+ className?: string;
3
+ render?: ((props: import("react").HTMLAttributes<any> & {
4
+ ref?: import("react").Ref<any> | undefined;
5
+ }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
6
+ } & {
7
+ children?: string;
8
+ } & import("react").RefAttributes<HTMLParagraphElement>>;
9
+ //# sourceMappingURL=description.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/description.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;wDAWrB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A component for showing additional information about the field,
3
+ * styled similarly to a normal `Field.Description`.
4
+ * Unlike a normal description, it can include links and other semantic elements.
5
+ *
6
+ * Although this content is not associated with the field using direct semantics,
7
+ * it is made discoverable to screen reader users via a visually hidden description,
8
+ * alerting them to the presence of additional information below.
9
+ *
10
+ * If the content only includes plain text, use `Field.Description` instead,
11
+ * so the readout is not unnecessarily verbose for screen reader users.
12
+ */
13
+ export declare const Details: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className" | "children" | "render"> & {
14
+ className?: string;
15
+ render?: ((props: import("react").HTMLAttributes<any> & {
16
+ ref?: import("react").Ref<any> | undefined;
17
+ }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
18
+ } & {
19
+ children?: React.ReactNode;
20
+ } & import("react").RefAttributes<HTMLDivElement>>;
21
+ //# sourceMappingURL=details.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/details.tsx"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO;;;;;;;kDAenB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Root } from './root';
2
+ import { Item } from './item';
3
+ import { Label } from './label';
4
+ import { Description } from './description';
5
+ import { Details } from './details';
6
+ import { Control } from './control';
7
+ export { Root, Item, Label, Description, Details, Control };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FieldItemProps } from './types';
2
+ export declare const Item: React.ForwardRefExoticComponent<FieldItemProps & React.RefAttributes<HTMLDivElement>>;
3
+ //# sourceMappingURL=item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/item.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,yBAAyB,CACjD,cAAc,GAAG,KAAK,CAAC,aAAa,CAAE,cAAc,CAAE,CAGpD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Field as _Field } from '@base-ui/react/field';
2
+ export declare const Label: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").FieldLabelProps & import("react").RefAttributes<any>, "ref">, "className" | "children" | "render"> & {
3
+ className?: string;
4
+ render?: ((props: import("react").HTMLAttributes<any> & {
5
+ ref?: import("react").Ref<any> | undefined;
6
+ }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
7
+ } & {
8
+ children?: _Field.Label.Props["children"];
9
+ variant?: "default" | "plain";
10
+ } & import("react").RefAttributes<HTMLLabelElement>>;
11
+ //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/label.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAKvD,eAAO,MAAM,KAAK;;;;;;;;oDAcjB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Field as _Field } from '@base-ui/react/field';
2
+ /**
3
+ * A low-level component that associates an accessible label and description
4
+ * with a single form control element.
5
+ *
6
+ * To label a group of multiple form control elements, use the `Fieldset` component instead.
7
+ *
8
+ * Simply wrapping a control with this component does not guarantee
9
+ * accessible labeling. See examples for how to associate the label in different cases.
10
+ */
11
+ export declare const Root: import("react").ForwardRefExoticComponent<Omit<import("../../../utils/types").ComponentProps<import("react").ForwardRefExoticComponent<import("@base-ui/react").FieldRootProps & import("react").RefAttributes<HTMLDivElement>>>, "disabled" | "validate" | "validationMode" | "validationDebounceTime" | "invalid" | "dirty" | "touched"> & {
12
+ children?: _Field.Root.Props["children"];
13
+ disabled?: _Field.Root.Props["disabled"];
14
+ } & import("react").RefAttributes<HTMLDivElement>>;
15
+ //# sourceMappingURL=root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/root.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAUvD;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI;;;kDAYd,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import '@wordpress/theme/design-tokens.css';
3
+ import { Field } from '../../../..';
4
+ declare const meta: Meta<typeof Field.Root>;
5
+ export default meta;
6
+ /**
7
+ * If your control component forwards refs, as well as the `aria-labelledby` and `aria-describedby` props
8
+ * to the actual underlying HTML element to be labeled,
9
+ * you can simply place your control in the `render` prop of `Field.Control`.
10
+ */
11
+ export declare const Default: StoryObj<typeof Field.Root>;
12
+ /**
13
+ * If your control component does not forward refs, but does forward the `id` prop
14
+ * to the actual underlying HTML element to be labeled, use the `htmlFor` prop
15
+ * of the `Field.Label` component to associate the label with the control.
16
+ *
17
+ * This is preferred over `aria-labelledby` because it allows users to click the
18
+ * label to focus the control.
19
+ */
20
+ export declare const UsingHtmlFor: StoryObj<typeof Field.Root>;
21
+ /**
22
+ * If your control component does not forward refs nor the `id` prop, but does
23
+ * forward the `aria-labelledby` prop to the actual underlying HTML element to be
24
+ * labeled, use the `id` prop of the `Field.Label` component to associate the
25
+ * label with the control.
26
+ */
27
+ export declare const UsingAriaLabelledby: StoryObj<typeof Field.Root>;
28
+ /**
29
+ * To add rich content (such as links) to the description, use `Field.Details`.
30
+ *
31
+ * Although this content is not associated with the field using direct semantics,
32
+ * it is made discoverable to screen reader users via a visually hidden description,
33
+ * alerting them to the presence of additional information below.
34
+ *
35
+ * If the content only includes plain text, use `Field.Description` instead,
36
+ * so the readout is not unnecessarily verbose for screen reader users.
37
+ */
38
+ export declare const WithDetails: StoryObj<typeof Field.Root>;
39
+ //# sourceMappingURL=index.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/field/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,CAAC,IAAI,CAUlC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,KAAK,CAAC,IAAI,CAchD,CAAC;AAQF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAE,OAAO,KAAK,CAAC,IAAI,CAoBrD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAE,OAAO,KAAK,CAAC,IAAI,CAoB5D,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAE,OAAO,KAAK,CAAC,IAAI,CAkBpD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/field/test/index.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ import type { Field } from '@base-ui/react/field';
2
+ import type { ComponentProps } from '../../../utils/types';
3
+ export type FieldRootProps = Omit<ComponentProps<typeof Field.Root>, 'disabled' | 'dirty' | 'invalid' | 'touched' | 'validate' | 'validationDebounceTime' | 'validationMode'> & {
4
+ children?: Field.Root.Props['children'];
5
+ /**
6
+ * Whether the field is disabled.
7
+ *
8
+ * @default false
9
+ */
10
+ disabled?: Field.Root.Props['disabled'];
11
+ };
12
+ export type FieldItemProps = ComponentProps<typeof Field.Item> & {
13
+ children?: React.ReactNode;
14
+ };
15
+ export type FieldLabelProps = ComponentProps<typeof Field.Label> & {
16
+ /**
17
+ * The label string, or the string and the element to associate it with.
18
+ *
19
+ * To keep things accessible, do not include other interactive
20
+ * elements such as links or buttons.
21
+ */
22
+ children?: Field.Label.Props['children'];
23
+ /**
24
+ * The visual variant of the label.
25
+ *
26
+ * Use 'plain' for controls like checkboxes and radio buttons.
27
+ *
28
+ * @default 'default'
29
+ */
30
+ variant?: 'default' | 'plain';
31
+ };
32
+ export type FieldControlProps = Omit<ComponentProps<typeof Field.Control>, 'defaultValue'> & {
33
+ children?: Field.Control.Props['children'];
34
+ /**
35
+ * The default value to use in uncontrolled mode.
36
+ */
37
+ defaultValue?: Field.Control.Props['defaultValue'];
38
+ };
39
+ export type FieldDescriptionProps = ComponentProps<typeof Field.Description> & {
40
+ /**
41
+ * The accessible description, associated using `aria-describedby`.
42
+ *
43
+ * For screen reader accessibility, this should only contain plain text,
44
+ * and no semantics such as links.
45
+ */
46
+ children?: string;
47
+ };
48
+ export type FieldDetailsProps = ComponentProps<'div'> & {
49
+ /**
50
+ * Additional information about the field, which unlike a normal description,
51
+ * can include links and other semantic elements.
52
+ *
53
+ * Although this content is not associated with the field using direct semantics,
54
+ * it is made discoverable to screen reader users via a visually hidden description,
55
+ * alerting them to the presence of additional information below.
56
+ *
57
+ * Do not use this component when the details content is only plain text,
58
+ * as it makes the readout unnecessarily verbose for screen reader users.
59
+ */
60
+ children?: React.ReactNode;
61
+ };
62
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG,IAAI,CAChC,cAAc,CAAE,OAAO,KAAK,CAAC,IAAI,CAAE,EACjC,UAAU,GAEV,OAAO,GACP,SAAS,GACT,SAAS,GACT,UAAU,GACV,wBAAwB,GACxB,gBAAgB,CAClB,GAAG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAE,UAAU,CAAE,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAE,UAAU,CAAE,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,cAAc,CAAE,OAAO,KAAK,CAAC,IAAI,CAAE,GAAG;IAClE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAE,OAAO,KAAK,CAAC,KAAK,CAAE,GAAG;IACpE;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAE,UAAU,CAAE,CAAC;IAC3C;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CACnC,cAAc,CAAE,OAAO,KAAK,CAAC,OAAO,CAAE,EACtC,cAAc,CACd,GAAG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAE,UAAU,CAAE,CAAC;IAC7C;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAE,cAAc,CAAE,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,cAAc,CACjD,OAAO,KAAK,CAAC,WAAW,CACxB,GAAG;IACH;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAE,KAAK,CAAE,GAAG;IACzD;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,8 @@
1
+ type FieldsetContextType = {
2
+ registerDescriptionId: (id: string) => void;
3
+ unregisterDescriptionId: () => void;
4
+ };
5
+ export declare const FieldsetContext: import("react").Context<FieldsetContextType>;
6
+ export declare const useFieldsetContext: () => FieldsetContextType;
7
+ export {};
8
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/context.tsx"],"names":[],"mappings":"AAEA,KAAK,mBAAmB,GAAG;IAC1B,qBAAqB,EAAE,CAAE,EAAE,EAAE,MAAM,KAAM,IAAI,CAAC;IAC9C,uBAAuB,EAAE,MAAM,IAAI,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,eAAe,8CAGzB,CAAC;AAEJ,eAAO,MAAM,kBAAkB,2BAAsC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const FieldsetDescription: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "className" | "children" | "render"> & {
2
+ className?: string;
3
+ render?: ((props: import("react").HTMLAttributes<any> & {
4
+ ref?: import("react").Ref<any> | undefined;
5
+ }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
6
+ } & {
7
+ children?: string;
8
+ } & import("react").RefAttributes<HTMLParagraphElement>>;
9
+ //# sourceMappingURL=description.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/description.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB;;;;;;;wDA4B7B,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A component for showing additional information about the fieldset,
3
+ * styled similarly to a normal `Fieldset.Description`.
4
+ * Unlike a normal description, it can include links and other semantic elements.
5
+ *
6
+ * Although this content is not associated with the fieldset using direct semantics,
7
+ * it is made discoverable to screen reader users via a visually hidden description,
8
+ * alerting them to the presence of additional information below.
9
+ *
10
+ * If the content only includes plain text, use `Fieldset.Description` instead,
11
+ * so the readout is not unnecessarily verbose for screen reader users.
12
+ */
13
+ export declare const FieldsetDetails: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className" | "children" | "render"> & {
14
+ className?: string;
15
+ render?: ((props: import("react").HTMLAttributes<any> & {
16
+ ref?: import("react").Ref<any> | undefined;
17
+ }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
18
+ } & {
19
+ children?: React.ReactNode;
20
+ } & import("react").RefAttributes<HTMLDivElement>>;
21
+ //# sourceMappingURL=details.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/details.tsx"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;;;;;;;kDAyBzB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { FieldsetRoot as Root } from './root';
2
+ import { FieldsetLegend as Legend } from './legend';
3
+ import { FieldsetDescription as Description } from './description';
4
+ import { FieldsetDetails as Details } from './details';
5
+ export { Root, Legend, Description, Details };
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,mBAAmB,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,eAAe,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const FieldsetLegend: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").FieldsetLegendProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "className" | "children" | "render"> & {
2
+ className?: string;
3
+ render?: ((props: import("react").HTMLAttributes<any> & {
4
+ ref?: import("react").Ref<any> | undefined;
5
+ }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
6
+ } & {
7
+ children?: React.ReactNode;
8
+ } & import("react").RefAttributes<HTMLDivElement>>;
9
+ //# sourceMappingURL=legend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/legend.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;;;kDAU1B,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A low-level component that associates an accessible legend and description with
3
+ * a group of multiple form control elements.
4
+ *
5
+ * To label a single form control element, use the `Field` component instead.
6
+ */
7
+ export declare const FieldsetRoot: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").FieldsetRootProps & import("react").RefAttributes<HTMLElement>, "ref">, "className" | "children" | "render"> & {
8
+ className?: string;
9
+ render?: ((props: import("react").HTMLAttributes<any> & {
10
+ ref?: import("react").Ref<any> | undefined;
11
+ }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
12
+ } & {
13
+ children?: React.ReactNode;
14
+ } & import("react").RefAttributes<HTMLFieldSetElement>>;
15
+ //# sourceMappingURL=root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/root.tsx"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;;uDA4BtB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Fieldset } from '../../../..';
3
+ declare const meta: Meta<typeof Fieldset.Root>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Fieldset.Root>;
6
+ export declare const Default: Story;
7
+ /**
8
+ * To add rich content (such as links) to the description, use `Fieldset.Details`.
9
+ *
10
+ * Although this content is not associated with the fieldset using direct semantics,
11
+ * it is made discoverable to screen reader users via a visually hidden description,
12
+ * alerting them to the presence of additional information below.
13
+ *
14
+ * If the content only includes plain text, use `Fieldset.Description` instead,
15
+ * so the readout is not unnecessarily verbose for screen reader users.
16
+ */
17
+ export declare const WithDetails: Story;
18
+ //# sourceMappingURL=index.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/fieldset/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,QAAQ,CAAC,IAAI,CAQrC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,QAAQ,CAAC,IAAI,CAAE,CAAC;AAE9C,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,KAqBzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/fieldset/test/index.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
1
+ import type { Fieldset as _Fieldset } from '@base-ui/react';
2
+ import type { ComponentProps } from '../../../utils/types';
3
+ export type FieldsetRootProps = ComponentProps<typeof _Fieldset.Root> & {
4
+ children?: React.ReactNode;
5
+ };
6
+ export type FieldsetLegendProps = ComponentProps<typeof _Fieldset.Legend> & {
7
+ children?: React.ReactNode;
8
+ };
9
+ export type FieldsetDescriptionProps = ComponentProps<'p'> & {
10
+ /**
11
+ * The accessible description, associated using `aria-describedby`.
12
+ *
13
+ * For screen reader accessibility, this should only contain plain text,
14
+ * and no semantics such as links.
15
+ */
16
+ children?: string;
17
+ };
18
+ export type FieldsetDetailsProps = ComponentProps<'div'> & {
19
+ /**
20
+ * Additional information about the fieldset, which unlike a normal description,
21
+ * can include links and other semantic elements.
22
+ *
23
+ * Although this content is not associated with the fieldset using direct semantics,
24
+ * it is made discoverable to screen reader users via a visually hidden description,
25
+ * alerting them to the presence of additional information below.
26
+ *
27
+ * Do not use this component when the details content is only plain text,
28
+ * as it makes the readout unnecessarily verbose for screen reader users.
29
+ */
30
+ children?: React.ReactNode;
31
+ };
32
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAE,OAAO,SAAS,CAAC,IAAI,CAAE,GAAG;IACzE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAE,OAAO,SAAS,CAAC,MAAM,CAAE,GAAG;IAC7E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAE,GAAG,CAAE,GAAG;IAC9D;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAE,KAAK,CAAE,GAAG;IAC5D;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * as Field from './field';
2
+ export * as Fieldset from './fieldset';
3
+ export { Input } from './input';
4
+ export { InputLayout } from './input-layout';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/form/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Input } from './input';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Input as _Input } from '@base-ui/react/input';
2
+ export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("../../../utils/types").ComponentProps<import("react").ForwardRefExoticComponent<import("@base-ui/react").InputProps & import("react").RefAttributes<HTMLInputElement>>>, "defaultValue" | "prefix" | "size" | "disabled" | "type" | "value"> & Pick<import("../input-layout/types").InputLayoutProps, "prefix" | "suffix"> & {
3
+ disabled?: boolean;
4
+ } & {
5
+ type?: _Input.Props["type"];
6
+ defaultValue?: _Input.Props["defaultValue"];
7
+ value?: _Input.Props["value"];
8
+ size?: Exclude<import("../input-layout/types").InputLayoutProps["size"], "small">;
9
+ } & import("react").RefAttributes<HTMLInputElement>>;
10
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAQvD,eAAO,MAAM,KAAK;;;;;;;oDAmBf,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Input } from '../../../..';
3
+ declare const meta: Meta<typeof Input>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Input>;
6
+ export declare const Default: Story;
7
+ /**
8
+ * The `InputLayout.Slot` component can be used to add standard padding in
9
+ * the `prefix` or `suffix` slot.
10
+ */
11
+ export declare const WithPrefix: Story;
12
+ export declare const Disabled: Story;
13
+ //# sourceMappingURL=index.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/input/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAe,MAAM,aAAa,CAAC;AAEjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,CAS7B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,KAAK,CAAE,CAAC;AAEtC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/input/test/index.test.tsx"],"names":[],"mappings":""}