@wordpress/ui 0.5.1-next.v.0 → 0.6.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 (257) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/build/box/box.cjs +2 -2
  3. package/build/box/box.cjs.map +2 -2
  4. package/build/button/button.cjs +18 -303
  5. package/build/button/button.cjs.map +3 -3
  6. package/build/form/primitives/constants.cjs +35 -0
  7. package/build/form/primitives/constants.cjs.map +7 -0
  8. package/build/form/primitives/field/description.cjs +6 -33
  9. package/build/form/primitives/field/description.cjs.map +2 -2
  10. package/build/form/primitives/field/details.cjs +6 -33
  11. package/build/form/primitives/field/details.cjs.map +2 -2
  12. package/build/form/primitives/field/label.cjs +6 -33
  13. package/build/form/primitives/field/label.cjs.map +2 -2
  14. package/build/form/primitives/field/root.cjs +6 -17
  15. package/build/form/primitives/field/root.cjs.map +2 -2
  16. package/build/form/primitives/fieldset/description.cjs +6 -33
  17. package/build/form/primitives/fieldset/description.cjs.map +2 -2
  18. package/build/form/primitives/fieldset/details.cjs +6 -33
  19. package/build/form/primitives/fieldset/details.cjs.map +2 -2
  20. package/build/form/primitives/fieldset/legend.cjs +6 -33
  21. package/build/form/primitives/fieldset/legend.cjs.map +2 -2
  22. package/build/form/primitives/fieldset/root.cjs +6 -16
  23. package/build/form/primitives/fieldset/root.cjs.map +2 -2
  24. package/build/form/primitives/index.cjs +8 -2
  25. package/build/form/primitives/index.cjs.map +2 -2
  26. package/build/form/primitives/input/index.cjs +31 -0
  27. package/build/form/primitives/input/index.cjs.map +7 -0
  28. package/build/form/primitives/input/input.cjs +82 -0
  29. package/build/form/primitives/input/input.cjs.map +7 -0
  30. package/build/form/primitives/input/types.cjs +19 -0
  31. package/build/form/primitives/input/types.cjs.map +7 -0
  32. package/build/form/primitives/input-layout/input-layout.cjs +12 -111
  33. package/build/form/primitives/input-layout/input-layout.cjs.map +3 -3
  34. package/build/form/primitives/input-layout/slot.cjs +6 -94
  35. package/build/form/primitives/input-layout/slot.cjs.map +2 -2
  36. package/build/form/primitives/select/index.cjs +40 -0
  37. package/build/form/primitives/select/index.cjs.map +7 -0
  38. package/build/form/primitives/select/item.cjs +98 -0
  39. package/build/form/primitives/select/item.cjs.map +7 -0
  40. package/build/form/primitives/select/popup.cjs +109 -0
  41. package/build/form/primitives/select/popup.cjs.map +7 -0
  42. package/build/form/primitives/select/root.cjs +35 -0
  43. package/build/form/primitives/select/root.cjs.map +7 -0
  44. package/build/form/primitives/select/trigger.cjs +116 -0
  45. package/build/form/primitives/select/trigger.cjs.map +7 -0
  46. package/build/form/primitives/select/types.cjs +19 -0
  47. package/build/form/primitives/select/types.cjs.map +7 -0
  48. package/build/index.cjs +19 -0
  49. package/build/index.cjs.map +2 -2
  50. package/build/lock-unlock.cjs +37 -0
  51. package/build/lock-unlock.cjs.map +7 -0
  52. package/build/stack/stack.cjs +6 -11
  53. package/build/stack/stack.cjs.map +2 -2
  54. package/build/tooltip/index.cjs +40 -0
  55. package/build/tooltip/index.cjs.map +7 -0
  56. package/build/tooltip/popup.cjs +100 -0
  57. package/build/tooltip/popup.cjs.map +7 -0
  58. package/build/tooltip/provider.cjs +35 -0
  59. package/build/tooltip/provider.cjs.map +7 -0
  60. package/build/tooltip/root.cjs +35 -0
  61. package/build/tooltip/root.cjs.map +7 -0
  62. package/build/tooltip/trigger.cjs +38 -0
  63. package/build/tooltip/trigger.cjs.map +7 -0
  64. package/build/tooltip/types.cjs +19 -0
  65. package/build/tooltip/types.cjs.map +7 -0
  66. package/build/utils/types.cjs.map +1 -1
  67. package/build/visually-hidden/visually-hidden.cjs +6 -19
  68. package/build/visually-hidden/visually-hidden.cjs.map +2 -2
  69. package/build-module/box/box.mjs +2 -2
  70. package/build-module/box/box.mjs.map +2 -2
  71. package/build-module/button/button.mjs +18 -303
  72. package/build-module/button/button.mjs.map +3 -3
  73. package/build-module/form/primitives/constants.mjs +10 -0
  74. package/build-module/form/primitives/constants.mjs.map +7 -0
  75. package/build-module/form/primitives/field/description.mjs +6 -33
  76. package/build-module/form/primitives/field/description.mjs.map +2 -2
  77. package/build-module/form/primitives/field/details.mjs +6 -33
  78. package/build-module/form/primitives/field/details.mjs.map +2 -2
  79. package/build-module/form/primitives/field/label.mjs +6 -33
  80. package/build-module/form/primitives/field/label.mjs.map +2 -2
  81. package/build-module/form/primitives/field/root.mjs +6 -17
  82. package/build-module/form/primitives/field/root.mjs.map +2 -2
  83. package/build-module/form/primitives/fieldset/description.mjs +6 -33
  84. package/build-module/form/primitives/fieldset/description.mjs.map +2 -2
  85. package/build-module/form/primitives/fieldset/details.mjs +6 -33
  86. package/build-module/form/primitives/fieldset/details.mjs.map +2 -2
  87. package/build-module/form/primitives/fieldset/legend.mjs +6 -33
  88. package/build-module/form/primitives/fieldset/legend.mjs.map +2 -2
  89. package/build-module/form/primitives/fieldset/root.mjs +6 -16
  90. package/build-module/form/primitives/fieldset/root.mjs.map +2 -2
  91. package/build-module/form/primitives/index.mjs +5 -1
  92. package/build-module/form/primitives/index.mjs.map +2 -2
  93. package/build-module/form/primitives/input/index.mjs +6 -0
  94. package/build-module/form/primitives/input/index.mjs.map +7 -0
  95. package/build-module/form/primitives/input/input.mjs +47 -0
  96. package/build-module/form/primitives/input/input.mjs.map +7 -0
  97. package/build-module/form/primitives/input/types.mjs +1 -0
  98. package/build-module/form/primitives/input/types.mjs.map +7 -0
  99. package/build-module/form/primitives/input-layout/input-layout.mjs +12 -111
  100. package/build-module/form/primitives/input-layout/input-layout.mjs.map +3 -3
  101. package/build-module/form/primitives/input-layout/slot.mjs +6 -94
  102. package/build-module/form/primitives/input-layout/slot.mjs.map +2 -2
  103. package/build-module/form/primitives/select/index.mjs +12 -0
  104. package/build-module/form/primitives/select/index.mjs.map +7 -0
  105. package/build-module/form/primitives/select/item.mjs +63 -0
  106. package/build-module/form/primitives/select/item.mjs.map +7 -0
  107. package/build-module/form/primitives/select/popup.mjs +76 -0
  108. package/build-module/form/primitives/select/popup.mjs.map +7 -0
  109. package/build-module/form/primitives/select/root.mjs +10 -0
  110. package/build-module/form/primitives/select/root.mjs.map +7 -0
  111. package/build-module/form/primitives/select/trigger.mjs +81 -0
  112. package/build-module/form/primitives/select/trigger.mjs.map +7 -0
  113. package/build-module/form/primitives/select/types.mjs +1 -0
  114. package/build-module/form/primitives/select/types.mjs.map +7 -0
  115. package/build-module/index.mjs +4 -0
  116. package/build-module/index.mjs.map +2 -2
  117. package/build-module/lock-unlock.mjs +11 -0
  118. package/build-module/lock-unlock.mjs.map +7 -0
  119. package/build-module/stack/stack.mjs +6 -11
  120. package/build-module/stack/stack.mjs.map +2 -2
  121. package/build-module/tooltip/index.mjs +12 -0
  122. package/build-module/tooltip/index.mjs.map +7 -0
  123. package/build-module/tooltip/popup.mjs +67 -0
  124. package/build-module/tooltip/popup.mjs.map +7 -0
  125. package/build-module/tooltip/provider.mjs +10 -0
  126. package/build-module/tooltip/provider.mjs.map +7 -0
  127. package/build-module/tooltip/root.mjs +10 -0
  128. package/build-module/tooltip/root.mjs.map +7 -0
  129. package/build-module/tooltip/trigger.mjs +13 -0
  130. package/build-module/tooltip/trigger.mjs.map +7 -0
  131. package/build-module/tooltip/types.mjs +1 -0
  132. package/build-module/tooltip/types.mjs.map +7 -0
  133. package/build-module/visually-hidden/visually-hidden.mjs +6 -19
  134. package/build-module/visually-hidden/visually-hidden.mjs.map +2 -2
  135. package/build-types/badge/stories/choosing-intent.story.d.ts +17 -0
  136. package/build-types/badge/stories/choosing-intent.story.d.ts.map +1 -0
  137. package/build-types/badge/stories/index.story.d.ts +1 -1
  138. package/build-types/badge/stories/index.story.d.ts.map +1 -1
  139. package/build-types/box/stories/index.story.d.ts +1 -1
  140. package/build-types/box/stories/index.story.d.ts.map +1 -1
  141. package/build-types/button/stories/index.story.d.ts +1 -1
  142. package/build-types/button/stories/index.story.d.ts.map +1 -1
  143. package/build-types/form/primitives/constants.d.ts +9 -0
  144. package/build-types/form/primitives/constants.d.ts.map +1 -0
  145. package/build-types/form/primitives/field/stories/index.story.d.ts +1 -1
  146. package/build-types/form/primitives/field/stories/index.story.d.ts.map +1 -1
  147. package/build-types/form/primitives/fieldset/stories/index.story.d.ts +1 -1
  148. package/build-types/form/primitives/fieldset/stories/index.story.d.ts.map +1 -1
  149. package/build-types/form/primitives/index.d.ts +2 -0
  150. package/build-types/form/primitives/index.d.ts.map +1 -1
  151. package/build-types/form/primitives/input/index.d.ts +2 -0
  152. package/build-types/form/primitives/input/index.d.ts.map +1 -0
  153. package/build-types/form/primitives/input/input.d.ts +10 -0
  154. package/build-types/form/primitives/input/input.d.ts.map +1 -0
  155. package/build-types/form/primitives/input/stories/index.story.d.ts +13 -0
  156. package/build-types/form/primitives/input/stories/index.story.d.ts.map +1 -0
  157. package/build-types/form/primitives/input/test/index.test.d.ts +2 -0
  158. package/build-types/form/primitives/input/test/index.test.d.ts.map +1 -0
  159. package/build-types/form/primitives/input/types.d.ts +27 -0
  160. package/build-types/form/primitives/input/types.d.ts.map +1 -0
  161. package/build-types/form/primitives/input-layout/stories/index.story.d.ts +1 -1
  162. package/build-types/form/primitives/input-layout/stories/index.story.d.ts.map +1 -1
  163. package/build-types/form/primitives/select/index.d.ts +5 -0
  164. package/build-types/form/primitives/select/index.d.ts.map +1 -0
  165. package/build-types/form/primitives/select/item.d.ts +7 -0
  166. package/build-types/form/primitives/select/item.d.ts.map +1 -0
  167. package/build-types/form/primitives/select/popup.d.ts +2 -0
  168. package/build-types/form/primitives/select/popup.d.ts.map +1 -0
  169. package/build-types/form/primitives/select/root.d.ts +3 -0
  170. package/build-types/form/primitives/select/root.d.ts.map +1 -0
  171. package/build-types/form/primitives/select/stories/index.story.d.ts +50 -0
  172. package/build-types/form/primitives/select/stories/index.story.d.ts.map +1 -0
  173. package/build-types/form/primitives/select/test/index.test.d.ts +2 -0
  174. package/build-types/form/primitives/select/test/index.test.d.ts.map +1 -0
  175. package/build-types/form/primitives/select/trigger.d.ts +7 -0
  176. package/build-types/form/primitives/select/trigger.d.ts.map +1 -0
  177. package/build-types/form/primitives/select/types.d.ts +42 -0
  178. package/build-types/form/primitives/select/types.d.ts.map +1 -0
  179. package/build-types/icon/stories/index.story.d.ts +1 -1
  180. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  181. package/build-types/index.d.ts +1 -0
  182. package/build-types/index.d.ts.map +1 -1
  183. package/build-types/lock-unlock.d.ts +2 -0
  184. package/build-types/lock-unlock.d.ts.map +1 -0
  185. package/build-types/stack/stories/index.story.d.ts +1 -1
  186. package/build-types/stack/stories/index.story.d.ts.map +1 -1
  187. package/build-types/tooltip/index.d.ts +6 -0
  188. package/build-types/tooltip/index.d.ts.map +1 -0
  189. package/build-types/tooltip/popup.d.ts +4 -0
  190. package/build-types/tooltip/popup.d.ts.map +1 -0
  191. package/build-types/tooltip/provider.d.ts +4 -0
  192. package/build-types/tooltip/provider.d.ts.map +1 -0
  193. package/build-types/tooltip/root.d.ts +4 -0
  194. package/build-types/tooltip/root.d.ts.map +1 -0
  195. package/build-types/tooltip/stories/index.story.d.ts +23 -0
  196. package/build-types/tooltip/stories/index.story.d.ts.map +1 -0
  197. package/build-types/tooltip/test/index.test.d.ts +2 -0
  198. package/build-types/tooltip/test/index.test.d.ts.map +1 -0
  199. package/build-types/tooltip/trigger.d.ts +4 -0
  200. package/build-types/tooltip/trigger.d.ts.map +1 -0
  201. package/build-types/tooltip/types.d.ts +18 -0
  202. package/build-types/tooltip/types.d.ts.map +1 -0
  203. package/build-types/utils/types.d.ts +0 -3
  204. package/build-types/utils/types.d.ts.map +1 -1
  205. package/build-types/visually-hidden/stories/index.story.d.ts +1 -1
  206. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  207. package/package.json +12 -10
  208. package/src/badge/stories/choosing-intent.mdx +29 -32
  209. package/src/badge/stories/choosing-intent.story.tsx +129 -0
  210. package/src/badge/stories/index.story.tsx +1 -1
  211. package/src/box/box.tsx +2 -2
  212. package/src/box/stories/index.story.tsx +1 -1
  213. package/src/box/test/box.test.tsx +0 -11
  214. package/src/button/stories/index.story.tsx +1 -6
  215. package/src/button/style.module.css +2 -2
  216. package/src/button/test/button.test.tsx +1 -16
  217. package/src/form/primitives/constants.ts +10 -0
  218. package/src/form/primitives/field/stories/index.story.tsx +1 -1
  219. package/src/form/primitives/fieldset/stories/index.story.tsx +1 -1
  220. package/src/form/primitives/index.ts +2 -0
  221. package/src/form/primitives/input/index.ts +1 -0
  222. package/src/form/primitives/input/input.tsx +28 -0
  223. package/src/form/primitives/input/stories/index.story.tsx +40 -0
  224. package/src/form/primitives/input/style.module.css +34 -0
  225. package/src/form/primitives/input/test/index.test.tsx +13 -0
  226. package/src/form/primitives/input/types.ts +31 -0
  227. package/src/form/primitives/input-layout/stories/index.story.tsx +1 -1
  228. package/src/form/primitives/input-layout/style.module.css +5 -4
  229. package/src/form/primitives/select/index.ts +4 -0
  230. package/src/form/primitives/select/item.tsx +39 -0
  231. package/src/form/primitives/select/popup.tsx +55 -0
  232. package/src/form/primitives/select/root.tsx +6 -0
  233. package/src/form/primitives/select/stories/index.story.tsx +276 -0
  234. package/src/form/primitives/select/style.module.css +7 -0
  235. package/src/form/primitives/select/test/index.test.tsx +35 -0
  236. package/src/form/primitives/select/trigger.tsx +58 -0
  237. package/src/form/primitives/select/types.ts +52 -0
  238. package/src/icon/stories/index.story.tsx +1 -1
  239. package/src/index.ts +1 -0
  240. package/src/lock-unlock.ts +7 -0
  241. package/src/stack/stories/index.story.tsx +1 -1
  242. package/src/stories/introduction.mdx +1 -1
  243. package/src/tooltip/index.ts +6 -0
  244. package/src/tooltip/popup.tsx +64 -0
  245. package/src/tooltip/provider.tsx +8 -0
  246. package/src/tooltip/root.tsx +8 -0
  247. package/src/tooltip/stories/index.story.tsx +97 -0
  248. package/src/tooltip/style.module.css +20 -0
  249. package/src/tooltip/test/index.test.tsx +87 -0
  250. package/src/tooltip/trigger.tsx +15 -0
  251. package/src/tooltip/types.ts +26 -0
  252. package/src/utils/css/dropdown-motion.module.css +47 -0
  253. package/src/utils/css/focus.module.css +1 -1
  254. package/src/utils/css/item-popup.module.css +127 -0
  255. package/src/utils/css/select-trigger.module.css +58 -0
  256. package/src/utils/types.ts +0 -3
  257. package/src/visually-hidden/stories/index.story.tsx +1 -1
@@ -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":""}
@@ -0,0 +1,27 @@
1
+ import type { Input } from '@base-ui/react/input';
2
+ import type { InputLayoutProps } from '../input-layout/types';
3
+ import type { ComponentProps } from '../../../utils/types';
4
+ export type InputProps = Omit<ComponentProps<typeof Input>, 'value' | 'defaultValue' | 'type' | 'disabled' | 'prefix' | 'size'> & Pick<InputLayoutProps, 'prefix' | 'suffix'> & {
5
+ /**
6
+ * Whether the field is disabled.
7
+ */
8
+ disabled?: boolean;
9
+ } & {
10
+ /**
11
+ * The type of the input element.
12
+ */
13
+ type?: Input.Props['type'];
14
+ /**
15
+ * The default value to use in uncontrolled mode.
16
+ */
17
+ defaultValue?: Input.Props['defaultValue'];
18
+ /**
19
+ * The value to use in controlled mode.
20
+ */
21
+ value?: Input.Props['value'];
22
+ /**
23
+ * The size of the field.
24
+ */
25
+ size?: Exclude<InputLayoutProps['size'], 'small'>;
26
+ };
27
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,UAAU,GAAG,IAAI,CAC5B,cAAc,CAAE,OAAO,KAAK,CAAE,EAC9B,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAClE,GACA,IAAI,CAAE,gBAAgB,EAAE,QAAQ,GAAG,QAAQ,CAAE,GAAG;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG;IACH;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,KAAK,CAAE,MAAM,CAAE,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,KAAK,CAAE,cAAc,CAAE,CAAC;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,KAAK,CAAE,OAAO,CAAE,CAAC;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAE,gBAAgB,CAAE,MAAM,CAAE,EAAE,OAAO,CAAE,CAAC;CACtD,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react-webpack5';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { InputLayout } from '../../../..';
3
3
  declare const meta: Meta<typeof InputLayout>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/input-layout/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,WAAW,CAMnC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,WAAW,CAAE,CAAC;AAE5C,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAI9B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/input-layout/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,WAAW,CAMnC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,WAAW,CAAE,CAAC;AAE5C,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAI9B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { Item } from './item';
2
+ export { Popup } from './popup';
3
+ export { Root } from './root';
4
+ export { Trigger } from './trigger';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Select as _Select } from '@base-ui/react/select';
2
+ export declare const Item: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectItemProps, "children" | "value"> & {
3
+ value?: string;
4
+ size?: import("../input-layout/types").InputLayoutProps["size"];
5
+ children?: _Select.Item.Props["children"];
6
+ } & import("react").RefAttributes<HTMLDivElement>>;
7
+ //# sourceMappingURL=item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAS1D,eAAO,MAAM,IAAI;;;;kDA6BhB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const Popup: import("react").ForwardRefExoticComponent<import("@base-ui/react").SelectPopupProps & import("react").RefAttributes<HTMLDivElement>>;
2
+ //# sourceMappingURL=popup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popup.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/popup.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,KAAK,sIAqCjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { SelectRootProps } from './types';
2
+ export declare function Root(props: SelectRootProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/root.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,wBAAgB,IAAI,CAAE,KAAK,EAAE,eAAe,+BAE3C"}
@@ -0,0 +1,50 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import '@wordpress/theme/design-tokens.css';
3
+ import { Select } from '../../../..';
4
+ declare const meta: Meta<typeof Select.Root>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof Select.Root>;
7
+ export declare const Default: Story;
8
+ export declare const Compact: Story;
9
+ /**
10
+ * The `minimal` variant must be used judiciously, because in many
11
+ * contexts it can be unclear to users that it is a select trigger.
12
+ *
13
+ * Combined with the `small` size, `minimal` can be used to create a
14
+ * very low-profile `Select`, intended for rare use cases like
15
+ * a pagination control.
16
+ */
17
+ export declare const Minimal: Story;
18
+ /**
19
+ * By passing an `items` array to `Select.Root`, the `Select.Trigger` will be able to
20
+ * render a `label` string for each item rather than the raw `value` string. In this
21
+ * case, the option with an empty string value has a `"Select"` label string.
22
+ *
23
+ * This may be easier than writing a custom render function for the `Select.Trigger`.
24
+ */
25
+ export declare const WithEmptyValueOption: Story;
26
+ /**
27
+ * When accessibly labeling a `Select`, note that the label must be associated with the `Select.Trigger`,
28
+ * not the `Select.Root`.
29
+ *
30
+ * Whether labeling with `aria-label`, `htmlFor`, or `aria-labelledby`, the association must be made to the `Select.Trigger`.
31
+ */
32
+ export declare const Labeling: Story;
33
+ export declare const WithOverflow: Story;
34
+ export declare const Disabled: Story;
35
+ export declare const WithDisabledItem: Story;
36
+ /**
37
+ * For custom needs, a `Select.Trigger` can take a custom render function as its children,
38
+ * while `Select.Item` can take arbitrary content as children.
39
+ */
40
+ export declare const WithCustomTriggerAndItem: Story;
41
+ /**
42
+ * Popovers in Gutenberg are managed with explicit z-index values, which can create
43
+ * situations where a popover renders below another popover, when you want it to be rendered above.
44
+ *
45
+ * The `--wp-ui-select-z-index` CSS variable, available on the `Select.Popup` component,
46
+ * is an escape hatch that can be used to override the z-index of a given `Select` popover
47
+ * on a case-by-case basis.
48
+ */
49
+ export declare const WithCustomZIndex: Story;
50
+ //# sourceMappingURL=index.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/select/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,MAAM,CAAC,IAAI,CAQnC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,MAAM,CAAC,IAAI,CAAE,CAAC;AAE5C,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAkBrB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,EAAE,KAkBrB,CAAC;AAcF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAsBlC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,KAatB,CAAC;AAKF,eAAO,MAAM,YAAY,EAAE,KAa1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KActB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAa9B,CAAC;AAaF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAwCtC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAc9B,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/select/test/index.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { Select as _Select } from '@base-ui/react/select';
2
+ export declare const Trigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectTriggerProps, "children"> & {
3
+ size?: import("../input-layout/types").InputLayoutProps["size"];
4
+ variant?: "default" | "minimal";
5
+ children?: _Select.Value.Props["children"];
6
+ } & import("react").RefAttributes<HTMLButtonElement>>;
7
+ //# sourceMappingURL=trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAU1D,eAAO,MAAM,OAAO;;;;qDA+CnB,CAAC"}
@@ -0,0 +1,42 @@
1
+ import type { Select as _Select } from '@base-ui/react/select';
2
+ import type { InputLayoutProps } from '../input-layout/types';
3
+ export type SelectRootProps = Omit<_Select.Root.Props<string, false>, 'multiple'>;
4
+ export type SelectTriggerProps = Omit<_Select.Trigger.Props, 'children'> & {
5
+ /**
6
+ * The size of the trigger.
7
+ *
8
+ * @default 'default'
9
+ */
10
+ size?: InputLayoutProps['size'];
11
+ /**
12
+ * The style variant of the trigger.
13
+ *
14
+ * @default 'default'
15
+ */
16
+ variant?: 'default' | 'minimal';
17
+ /**
18
+ * A function that gets called with the current value as an argument.
19
+ * Use this to customize the trigger content.
20
+ */
21
+ children?: _Select.Value.Props['children'];
22
+ };
23
+ export type SelectPopupProps = _Select.Popup.Props;
24
+ export type SelectItemProps = Omit<_Select.Item.Props, 'children' | 'value'> & {
25
+ /**
26
+ * A unique value that identifies this select item.
27
+ */
28
+ value?: string;
29
+ /**
30
+ * The size of the item.
31
+ *
32
+ * @default 'default'
33
+ */
34
+ size?: InputLayoutProps['size'];
35
+ /**
36
+ * The content of the item.
37
+ *
38
+ * @default `value`
39
+ */
40
+ children?: _Select.Item.Props['children'];
41
+ };
42
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,MAAM,MAAM,eAAe,GAAG,IAAI,CACjC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAE,MAAM,EAAE,KAAK,CAAE,EACnC,UAAU,CACV,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAE,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,CAAE,GAAG;IAC5E;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAE,MAAM,CAAE,CAAC;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAE,UAAU,CAAE,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG,IAAI,CACjC,OAAO,CAAC,IAAI,CAAC,KAAK,EAClB,UAAU,GAAG,OAAO,CACpB,GAAG;IACH;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAE,MAAM,CAAE,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAE,UAAU,CAAE,CAAC;CAC5C,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react-webpack5';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Icon } from '../index';
3
3
  declare const meta: Meta<typeof Icon>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/icon/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,IAAI,CAgB5B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAYpC,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/icon/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,IAAI,CAgB5B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAYpC,CAAC"}
@@ -4,5 +4,6 @@ export * from './button';
4
4
  export * from './form/primitives';
5
5
  export * from './icon';
6
6
  export * from './stack';
7
+ export * as Tooltip from './tooltip';
7
8
  export * from './visually-hidden';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const lock: (object: unknown, privateData: unknown) => void, unlock: <T = any>(object: unknown) => T;
2
+ //# sourceMappingURL=lock-unlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock-unlock.d.ts","sourceRoot":"","sources":["../src/lock-unlock.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,mDAAE,MAAM,iCAIzB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react-webpack5';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Stack } from '../index';
3
3
  declare const meta: Meta<typeof Stack>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/stack/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,CAG7B,CAAC;AACF,eAAe,IAAI,CAAC;AAYpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,KAAK,CAAE,CAAC;AAEtC,eAAO,MAAM,OAAO,EAAE,KA4DrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAsBpB,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/stack/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,CAG7B,CAAC;AACF,eAAe,IAAI,CAAC;AAYpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,KAAK,CAAE,CAAC;AAEtC,eAAO,MAAM,OAAO,EAAE,KA4DrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAsBpB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Popup } from './popup';
2
+ import { Trigger } from './trigger';
3
+ import { Root } from './root';
4
+ import { Provider } from './provider';
5
+ export { Provider, Root, Trigger, Popup };
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { PopupProps } from './types';
2
+ declare const Popup: import("react").ForwardRefExoticComponent<PopupProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ export { Popup };
4
+ //# sourceMappingURL=popup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popup.d.ts","sourceRoot":"","sources":["../../src/tooltip/popup.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAQ1C,QAAA,MAAM,KAAK,uGA8CR,CAAC;AAEJ,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ProviderProps } from './types';
2
+ declare function Provider({ children, ...props }: ProviderProps): import("react").JSX.Element;
3
+ export { Provider };
4
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/tooltip/provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,iBAAS,QAAQ,CAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BAEvD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { RootProps } from './types';
2
+ declare function Root(props: RootProps): import("react").JSX.Element;
3
+ export { Root };
4
+ //# sourceMappingURL=root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../src/tooltip/root.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,iBAAS,IAAI,CAAE,KAAK,EAAE,SAAS,+BAE9B;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Tooltip } from '../..';
3
+ declare const meta: Meta<typeof Tooltip.Root>;
4
+ export default meta;
5
+ export declare const Default: StoryObj<typeof Tooltip.Root>;
6
+ /**
7
+ * The `disabled` prop prevents the tooltip from showing, and can be used to
8
+ * show the tooltip conditionally without rendering the underlying react
9
+ * component conditionally (which could cause reconciliation issues).
10
+ */
11
+ export declare const Disabled: StoryObj<typeof Tooltip.Root>;
12
+ /**
13
+ * Use the `side` prop to control where the tooltip appears relative to the
14
+ * trigger element.
15
+ */
16
+ export declare const Positioning: StoryObj<typeof Tooltip.Root>;
17
+ /**
18
+ * Use `Tooltip.Provider` to control the delay before tooltips appear.
19
+ * This is useful when you have multiple tooltips and want them to share
20
+ * the same delay configuration.
21
+ */
22
+ export declare const WithProvider: StoryObj<typeof Tooltip.Root>;
23
+ //# sourceMappingURL=index.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/tooltip/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,CAAC,IAAI,CAQpC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,OAAO,CAAC,IAAI,CASlD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAE,OAAO,OAAO,CAAC,IAAI,CAMnD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAE,OAAO,OAAO,CAAC,IAAI,CA+BtD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAE,OAAO,OAAO,CAAC,IAAI,CAgBvD,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/tooltip/test/index.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { TriggerProps } from './types';
2
+ declare const Trigger: import("react").ForwardRefExoticComponent<TriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
3
+ export { Trigger };
4
+ //# sourceMappingURL=trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../src/tooltip/trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,QAAA,MAAM,OAAO,4GAQZ,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { Tooltip } from '@base-ui/react/tooltip';
3
+ import type { ComponentProps } from '../utils/types';
4
+ export type RootProps = Pick<Tooltip.Root.Props, 'disabled' | 'children'>;
5
+ export type ProviderProps = Pick<Tooltip.Provider.Props, 'delay' | 'children'>;
6
+ export interface TriggerProps extends ComponentProps<'button'> {
7
+ /**
8
+ * The content to be rendered inside the component.
9
+ */
10
+ children?: ReactNode;
11
+ }
12
+ export interface PopupProps extends ComponentProps<'div'>, Pick<Tooltip.Positioner.Props, 'align' | 'side' | 'sideOffset'> {
13
+ /**
14
+ * The content to be rendered inside the component.
15
+ */
16
+ children?: ReactNode;
17
+ }
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tooltip/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,SAAS,GAAG,IAAI,CAAE,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAAE,CAAC;AAE5E,MAAM,MAAM,aAAa,GAAG,IAAI,CAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK,EACtB,OAAO,GAAG,UAAU,CACpB,CAAC;AAEF,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAE,QAAQ,CAAE;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,UAChB,SAAQ,cAAc,CAAE,KAAK,CAAE,EAC9B,IAAI,CAAE,OAAO,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,YAAY,CAAE;IAClE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"}
@@ -1,6 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  import { type ElementType, type ComponentPropsWithoutRef, type HTMLAttributes, type Ref } from 'react';
5
2
  type HTMLAttributesWithRef<T extends ElementType = any> = HTMLAttributes<T> & {
6
3
  ref?: Ref<T> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACN,KAAK,WAAW,EAChB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,GAAG,EACR,MAAM,OAAO,CAAC;AAEf,KAAK,qBAAqB,CAAE,CAAC,SAAS,WAAW,GAAG,GAAG,IACtD,cAAc,CAAE,CAAC,CAAE,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAE,CAAC,CAAE,GAAG,SAAS,CAAA;CAAE,CAAC;AAEtD,KAAK,iBAAiB,CAAE,KAAK,IAAK,CACjC,KAAK,EAAE,KAAK,KACR,KAAK,CAAC,YAAY,CAAE,OAAO,CAAE,CAAC;AAEnC,MAAM,MAAM,cAAc,CAAE,CAAC,SAAS,WAAW,IAAK,IAAI,CACzD,wBAAwB,CAAE,CAAC,CAAE,EAC7B,WAAW,GAAG,UAAU,GAAG,QAAQ,CACnC,GAAG;IACH;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,MAAM,CAAC,EACJ,iBAAiB,CAAE,qBAAqB,CAAE,GAC1C,KAAK,CAAC,YAAY,CAAE,MAAM,CAAE,MAAM,EAAE,OAAO,CAAE,CAAE,CAAC;CACnD,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,WAAW,EAChB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,GAAG,EACR,MAAM,OAAO,CAAC;AAEf,KAAK,qBAAqB,CAAE,CAAC,SAAS,WAAW,GAAG,GAAG,IACtD,cAAc,CAAE,CAAC,CAAE,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAE,CAAC,CAAE,GAAG,SAAS,CAAA;CAAE,CAAC;AAEtD,KAAK,iBAAiB,CAAE,KAAK,IAAK,CACjC,KAAK,EAAE,KAAK,KACR,KAAK,CAAC,YAAY,CAAE,OAAO,CAAE,CAAC;AAEnC,MAAM,MAAM,cAAc,CAAE,CAAC,SAAS,WAAW,IAAK,IAAI,CACzD,wBAAwB,CAAE,CAAC,CAAE,EAC7B,WAAW,GAAG,UAAU,GAAG,QAAQ,CACnC,GAAG;IACH;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,MAAM,CAAC,EACJ,iBAAiB,CAAE,qBAAqB,CAAE,GAC1C,KAAK,CAAC,YAAY,CAAE,MAAM,CAAE,MAAM,EAAE,OAAO,CAAE,CAAE,CAAC;CACnD,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react-webpack5';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { VisuallyHidden } from '../';
3
3
  declare const meta: Meta<typeof VisuallyHidden>;
4
4
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/visually-hidden/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,cAAc,CAGtC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,cAAc,CAAE,CAAC;AAE/C,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/visually-hidden/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,cAAc,CAGtC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,cAAc,CAAE,CAAC;AAE/C,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/ui",
3
- "version": "0.5.1-next.v.0+500f87dd8",
3
+ "version": "0.6.0",
4
4
  "description": "Themeable React UI components for the WordPress Design System.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -44,20 +44,22 @@
44
44
  "sideEffects": false,
45
45
  "dependencies": {
46
46
  "@base-ui/react": "^1.0.0",
47
- "@wordpress/a11y": "^4.37.1-next.v.0+500f87dd8",
48
- "@wordpress/element": "^6.37.1-next.v.0+500f87dd8",
49
- "@wordpress/i18n": "^6.10.1-next.v.0+500f87dd8",
50
- "@wordpress/icons": "^11.4.1-next.v.0+500f87dd8",
51
- "@wordpress/primitives": "^4.37.1-next.v.0+500f87dd8",
47
+ "@wordpress/a11y": "^4.39.0",
48
+ "@wordpress/element": "^6.39.0",
49
+ "@wordpress/i18n": "^6.12.0",
50
+ "@wordpress/icons": "^11.6.0",
51
+ "@wordpress/primitives": "^4.39.0",
52
+ "@wordpress/private-apis": "^1.39.0",
53
+ "@wordpress/theme": "^0.6.0",
52
54
  "clsx": "^2.1.1"
53
55
  },
54
56
  "devDependencies": {
55
- "@storybook/addon-docs": "^9.1.17",
57
+ "@storybook/addon-docs": "^10.1.11",
58
+ "@storybook/react-vite": "^10.1.11",
56
59
  "@testing-library/jest-dom": "^6.6.3",
57
60
  "@types/jest": "^29.5.14",
58
61
  "@types/node": "^20.17.10",
59
- "@wordpress/theme": "^0.5.1-next.v.0+500f87dd8",
60
- "storybook": "^9.1.17"
62
+ "storybook": "^10.1.11"
61
63
  },
62
64
  "peerDependencies": {
63
65
  "react": "^18.0.0",
@@ -66,5 +68,5 @@
66
68
  "publishConfig": {
67
69
  "access": "public"
68
70
  },
69
- "gitHead": "ca0db0ee8ac2116cd307650136027d26d0cdd9bd"
71
+ "gitHead": "eee1cfb1472f11183e40fb77465a5f13145df7ad"
70
72
  }
@@ -1,20 +1,11 @@
1
- import { Meta } from '@storybook/addon-docs/blocks';
2
- import { Badge } from '../index';
3
- import '@wordpress/theme/design-tokens.css';
1
+ import { Canvas, Meta } from '@storybook/addon-docs/blocks';
2
+ import * as ChoosingIntentStories from './choosing-intent.story';
4
3
 
5
- <Meta title="Design System/Components/Badge/Choosing intent" />
4
+ <Meta of={ ChoosingIntentStories } />
6
5
 
7
6
  # Choosing intent
8
7
 
9
- <div style={ { padding: '2rem', display: 'flex', justifyContent: 'center', gap: '0.5rem', flexWrap: 'wrap', border: '1px solid #e0e0e0', borderRadius: '0.5rem' } }>
10
- <Badge intent="high">high</Badge>
11
- <Badge intent="medium">medium</Badge>
12
- <Badge intent="low">low</Badge>
13
- <Badge intent="stable">stable</Badge>
14
- <Badge intent="informational">informational</Badge>
15
- <Badge intent="draft">draft</Badge>
16
- <Badge intent="none">none</Badge>
17
- </div>
8
+ <Canvas of={ ChoosingIntentStories.AllIntents } />
18
9
 
19
10
  It can be difficult to determine which badge intent to use because the component's properties are not tied to any specific product view. Those properties should be balanced against the requirements of the view in which the badge appears, all while keeping an eye on high-level consistency (global statuses that appear across multiple views).
20
11
 
@@ -36,21 +27,21 @@ Use when there's something for the user to act on.
36
27
  * Needs attention as soon as possible
37
28
  * _E.g. "Payment declined", "Security issue"_
38
29
 
39
- <Badge intent="high">Payment declined</Badge> <Badge intent="high">Security issue</Badge>
30
+ <Canvas of={ ChoosingIntentStories.High } />
40
31
 
41
32
  ### `medium` – Important / blocks progress
42
33
 
43
34
  * Blocks a key task, should be handled soon
44
35
  * _E.g. "Approval required", "Review needed"_
45
36
 
46
- <Badge intent="medium">Approval required</Badge> <Badge intent="medium">Review needed</Badge>
37
+ <Canvas of={ ChoosingIntentStories.Medium } />
47
38
 
48
39
  ### `low` – Worth noticing / non‑urgent
49
40
 
50
41
  * Good to be aware of; action may be optional or later
51
42
  * _E.g. "Pending", "Queued", "Minor issues", "Optional setup"_
52
43
 
53
- <Badge intent="low">Pending</Badge> <Badge intent="low">Queued</Badge>
44
+ <Canvas of={ ChoosingIntentStories.Low } />
54
45
 
55
46
  ## 3. Informational / draft = special non-final states
56
47
 
@@ -59,13 +50,13 @@ Use when there's something for the user to act on.
59
50
  * Context only; no clear action
60
51
  * _E.g. "Scheduled", "Beta", "Internal only"_
61
52
 
62
- <Badge intent="informational">Scheduled</Badge> <Badge intent="informational">Beta</Badge>
53
+ <Canvas of={ ChoosingIntentStories.Informational } />
63
54
 
64
55
  ### `draft` – Not final / work in progress
65
56
 
66
57
  * _E.g. "Draft", "Unpublished", "Work in progress"_
67
58
 
68
- <Badge intent="draft">Draft</Badge> <Badge intent="draft">Unpublished</Badge>
59
+ <Canvas of={ ChoosingIntentStories.Draft } />
69
60
 
70
61
  ## 4. Stable / none = normal states
71
62
 
@@ -74,34 +65,40 @@ Use when there's something for the user to act on.
74
65
  * Use when confirming success or "all good" is important in that view
75
66
  * _E.g. "Healthy", "Active", "Live"_
76
67
 
77
- <Badge intent="stable">Healthy</Badge> <Badge intent="stable">Active</Badge>
68
+ <Canvas of={ ChoosingIntentStories.Stable } />
78
69
 
79
70
  ### `none` – Default for normal / background states
80
71
 
81
72
  * Especially in dense lists where too much color creates visual noise
82
73
  * _E.g. "Inactive", "Expired"_
83
74
 
84
- <Badge intent="none">Inactive</Badge> <Badge intent="none">Expired</Badge>
75
+ <Canvas of={ ChoosingIntentStories.None } />
85
76
 
86
77
  ## Examples
87
78
 
88
- ### Comment status:
79
+ ### Comment status
89
80
 
90
- - "Approved" → `none`: <Badge intent="none">Approved</Badge>
91
- - "Approval required" → `medium`: <Badge intent="medium">Approval required</Badge>
81
+ - "Approved" → `none`
82
+ - "Approval required" → `medium`
92
83
 
93
- ### Page status:
84
+ <Canvas of={ ChoosingIntentStories.CommentStatus } />
94
85
 
95
- - "Published" `none`: <Badge intent="none">Published</Badge>
96
- - "Pending" → `low`: <Badge intent="low">Pending</Badge>
97
- - "Draft" → `draft`: <Badge intent="draft">Draft</Badge>
98
- - "Scheduled" → `informational`: <Badge intent="informational">Scheduled</Badge>
99
- - "Private" → `informational`: <Badge intent="informational">Private</Badge>
86
+ ### Page status
100
87
 
101
- ### Plugin status:
88
+ - "Published" → `none`
89
+ - "Pending" → `low`
90
+ - "Draft" → `draft`
91
+ - "Scheduled" → `informational`
92
+ - "Private" → `informational`
102
93
 
103
- - "Active" `stable`: <Badge intent="stable">Active</Badge>
104
- - "Inactive" → `none`: <Badge intent="none">Inactive</Badge>
94
+ <Canvas of={ ChoosingIntentStories.PageStatus } />
95
+
96
+ ### Plugin status
97
+
98
+ - "Active" → `stable`
99
+ - "Inactive" → `none`
100
+
101
+ <Canvas of={ ChoosingIntentStories.PluginStatus } />
105
102
 
106
103
  ## 5. When in doubt…
107
104