@wordpress/components 39.0.0 → 40.0.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 (1080) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/CONTRIBUTING.md +7 -8
  3. package/build/base-control/styles/base-control-styles.cjs +150 -45
  4. package/build/base-control/styles/base-control-styles.cjs.map +4 -4
  5. package/build/border-box-control/border-box-control/hook.cjs +88 -23
  6. package/build/border-box-control/border-box-control/hook.cjs.map +3 -3
  7. package/build/border-box-control/border-box-control-linked-button/hook.cjs +87 -8
  8. package/build/border-box-control/border-box-control-linked-button/hook.cjs.map +4 -4
  9. package/build/border-box-control/border-box-control-split-controls/hook.cjs +89 -16
  10. package/build/border-box-control/border-box-control-split-controls/hook.cjs.map +4 -4
  11. package/build/border-box-control/border-box-control-visualizer/hook.cjs +108 -8
  12. package/build/border-box-control/border-box-control-visualizer/hook.cjs.map +4 -4
  13. package/build/border-control/border-control/hook.cjs +89 -14
  14. package/build/border-control/border-control/hook.cjs.map +4 -4
  15. package/build/border-control/border-control-dropdown/component.cjs +2 -4
  16. package/build/border-control/border-control-dropdown/component.cjs.map +2 -2
  17. package/build/border-control/border-control-dropdown/hook.cjs +103 -27
  18. package/build/border-control/border-control-dropdown/hook.cjs.map +4 -4
  19. package/build/box-control/box-input-control.cjs +102 -10
  20. package/build/box-control/box-input-control.cjs.map +4 -4
  21. package/build/box-control/index.cjs +95 -5
  22. package/build/box-control/index.cjs.map +4 -4
  23. package/build/button/index.cjs +10 -3
  24. package/build/button/index.cjs.map +2 -2
  25. package/build/card/card-body/hook.cjs +4 -2
  26. package/build/card/card-body/hook.cjs.map +2 -2
  27. package/build/card/styles.cjs +31 -16
  28. package/build/card/styles.cjs.map +2 -2
  29. package/build/circular-option-picker/circular-option-picker-option.cjs +4 -5
  30. package/build/circular-option-picker/circular-option-picker-option.cjs.map +2 -2
  31. package/build/circular-option-picker/circular-option-picker.cjs +24 -6
  32. package/build/circular-option-picker/circular-option-picker.cjs.map +2 -2
  33. package/build/circular-option-picker/index.cjs +6 -2
  34. package/build/circular-option-picker/index.cjs.map +2 -2
  35. package/build/circular-option-picker/utils.cjs +38 -8
  36. package/build/circular-option-picker/utils.cjs.map +3 -3
  37. package/build/color-palette/index.cjs +103 -10
  38. package/build/color-palette/index.cjs.map +3 -3
  39. package/build/combobox-control/index.cjs +87 -2
  40. package/build/combobox-control/index.cjs.map +3 -3
  41. package/build/confirm-dialog/component.cjs +5 -1
  42. package/build/confirm-dialog/component.cjs.map +2 -2
  43. package/build/content-editable-control/index.cjs +1 -1
  44. package/build/content-editable-control/index.cjs.map +2 -2
  45. package/build/context/context-system-provider.cjs.map +2 -2
  46. package/build/custom-gradient-picker/gradient-bar/control-points.cjs +14 -2
  47. package/build/custom-gradient-picker/gradient-bar/control-points.cjs.map +2 -2
  48. package/build/custom-gradient-picker/gradient-bar/index.cjs +2 -0
  49. package/build/custom-gradient-picker/gradient-bar/index.cjs.map +2 -2
  50. package/build/dropdown/dropdown-content-wrapper.cjs +102 -3
  51. package/build/dropdown/dropdown-content-wrapper.cjs.map +4 -4
  52. package/build/duotone-picker/custom-duotone-bar.cjs +1 -0
  53. package/build/duotone-picker/custom-duotone-bar.cjs.map +2 -2
  54. package/build/duotone-picker/duotone-picker.cjs +23 -14
  55. package/build/duotone-picker/duotone-picker.cjs.map +2 -2
  56. package/build/focal-point-picker/index.cjs +5 -3
  57. package/build/focal-point-picker/index.cjs.map +2 -2
  58. package/build/gradient-picker/index.cjs +105 -11
  59. package/build/gradient-picker/index.cjs.map +3 -3
  60. package/build/input-control/input-field.cjs +1 -0
  61. package/build/input-control/input-field.cjs.map +2 -2
  62. package/build/input-control/styles/input-control-styles.cjs +22 -22
  63. package/build/input-control/styles/input-control-styles.cjs.map +2 -2
  64. package/build/modal/index.cjs +1 -0
  65. package/build/modal/index.cjs.map +2 -2
  66. package/build/palette-edit/index.cjs +208 -33
  67. package/build/palette-edit/index.cjs.map +3 -3
  68. package/build/private-apis.cjs +1 -6
  69. package/build/private-apis.cjs.map +2 -2
  70. package/build/progress-bar/index.cjs +95 -7
  71. package/build/progress-bar/index.cjs.map +4 -4
  72. package/build/radio-control/index.cjs +1 -0
  73. package/build/radio-control/index.cjs.map +2 -2
  74. package/build/resizable-box/resize-tooltip/index.cjs +91 -4
  75. package/build/resizable-box/resize-tooltip/index.cjs.map +3 -3
  76. package/build/resizable-box/resize-tooltip/label.cjs +103 -6
  77. package/build/resizable-box/resize-tooltip/label.cjs.map +4 -4
  78. package/build/scrollable/hook.cjs +93 -6
  79. package/build/scrollable/hook.cjs.map +4 -4
  80. package/build/textarea-control/index.cjs +87 -3
  81. package/build/textarea-control/index.cjs.map +3 -3
  82. package/build/toggle-group-control/toggle-group-control/component.cjs +1 -1
  83. package/build/toggle-group-control/toggle-group-control/component.cjs.map +2 -2
  84. package/build/toggle-group-control/toggle-group-control-option-base/component.cjs +1 -1
  85. package/build/toggle-group-control/toggle-group-control-option-base/component.cjs.map +2 -2
  86. package/build/utils/config-values.cjs +0 -3
  87. package/build/utils/config-values.cjs.map +2 -2
  88. package/build/validated-form-controls/components/content-editable-control.cjs +3 -2
  89. package/build/validated-form-controls/components/content-editable-control.cjs.map +2 -2
  90. package/build/validated-form-controls/components/custom-select-control.cjs +3 -2
  91. package/build/validated-form-controls/components/custom-select-control.cjs.map +2 -2
  92. package/build/validated-form-controls/components/index.cjs +1 -9
  93. package/build/validated-form-controls/components/index.cjs.map +2 -2
  94. package/build/validated-form-controls/components/input-control.cjs +9 -2
  95. package/build/validated-form-controls/components/input-control.cjs.map +3 -3
  96. package/build/validated-form-controls/components/range-control.cjs +3 -2
  97. package/build/validated-form-controls/components/range-control.cjs.map +2 -2
  98. package/build/validated-form-controls/components/textarea-control.cjs +9 -2
  99. package/build/validated-form-controls/components/textarea-control.cjs.map +3 -3
  100. package/build/validated-form-controls/index.cjs +1 -3
  101. package/build/validated-form-controls/index.cjs.map +2 -2
  102. package/build/z-stack/component.cjs +105 -7
  103. package/build/z-stack/component.cjs.map +4 -4
  104. package/build-module/base-control/styles/base-control-styles.mjs +151 -46
  105. package/build-module/base-control/styles/base-control-styles.mjs.map +3 -3
  106. package/build-module/border-box-control/border-box-control/hook.mjs +89 -14
  107. package/build-module/border-box-control/border-box-control/hook.mjs.map +3 -3
  108. package/build-module/border-box-control/border-box-control-linked-button/hook.mjs +87 -8
  109. package/build-module/border-box-control/border-box-control-linked-button/hook.mjs.map +3 -3
  110. package/build-module/border-box-control/border-box-control-split-controls/hook.mjs +89 -16
  111. package/build-module/border-box-control/border-box-control-split-controls/hook.mjs.map +3 -3
  112. package/build-module/border-box-control/border-box-control-visualizer/hook.mjs +108 -8
  113. package/build-module/border-box-control/border-box-control-visualizer/hook.mjs.map +3 -3
  114. package/build-module/border-control/border-control/hook.mjs +90 -15
  115. package/build-module/border-control/border-control/hook.mjs.map +3 -3
  116. package/build-module/border-control/border-control-dropdown/component.mjs +2 -4
  117. package/build-module/border-control/border-control-dropdown/component.mjs.map +2 -2
  118. package/build-module/border-control/border-control-dropdown/hook.mjs +103 -27
  119. package/build-module/border-control/border-control-dropdown/hook.mjs.map +3 -3
  120. package/build-module/box-control/box-input-control.mjs +102 -10
  121. package/build-module/box-control/box-input-control.mjs.map +3 -3
  122. package/build-module/box-control/index.mjs +95 -5
  123. package/build-module/box-control/index.mjs.map +3 -3
  124. package/build-module/button/index.mjs +11 -4
  125. package/build-module/button/index.mjs.map +2 -2
  126. package/build-module/card/card-body/hook.mjs +4 -2
  127. package/build-module/card/card-body/hook.mjs.map +2 -2
  128. package/build-module/card/styles.mjs +30 -16
  129. package/build-module/card/styles.mjs.map +2 -2
  130. package/build-module/circular-option-picker/circular-option-picker-option.mjs +4 -5
  131. package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
  132. package/build-module/circular-option-picker/circular-option-picker.mjs +24 -6
  133. package/build-module/circular-option-picker/circular-option-picker.mjs.map +2 -2
  134. package/build-module/circular-option-picker/index.mjs +4 -2
  135. package/build-module/circular-option-picker/index.mjs.map +2 -2
  136. package/build-module/circular-option-picker/utils.mjs +25 -7
  137. package/build-module/circular-option-picker/utils.mjs.map +2 -2
  138. package/build-module/color-palette/index.mjs +104 -11
  139. package/build-module/color-palette/index.mjs.map +3 -3
  140. package/build-module/combobox-control/index.mjs +88 -3
  141. package/build-module/combobox-control/index.mjs.map +3 -3
  142. package/build-module/confirm-dialog/component.mjs +5 -1
  143. package/build-module/confirm-dialog/component.mjs.map +2 -2
  144. package/build-module/content-editable-control/index.mjs +1 -1
  145. package/build-module/content-editable-control/index.mjs.map +2 -2
  146. package/build-module/context/context-system-provider.mjs.map +2 -2
  147. package/build-module/custom-gradient-picker/gradient-bar/control-points.mjs +14 -2
  148. package/build-module/custom-gradient-picker/gradient-bar/control-points.mjs.map +2 -2
  149. package/build-module/custom-gradient-picker/gradient-bar/index.mjs +2 -0
  150. package/build-module/custom-gradient-picker/gradient-bar/index.mjs.map +2 -2
  151. package/build-module/dropdown/dropdown-content-wrapper.mjs +92 -3
  152. package/build-module/dropdown/dropdown-content-wrapper.mjs.map +3 -3
  153. package/build-module/duotone-picker/custom-duotone-bar.mjs +1 -0
  154. package/build-module/duotone-picker/custom-duotone-bar.mjs.map +2 -2
  155. package/build-module/duotone-picker/duotone-picker.mjs +24 -15
  156. package/build-module/duotone-picker/duotone-picker.mjs.map +2 -2
  157. package/build-module/focal-point-picker/index.mjs +5 -3
  158. package/build-module/focal-point-picker/index.mjs.map +2 -2
  159. package/build-module/gradient-picker/index.mjs +106 -12
  160. package/build-module/gradient-picker/index.mjs.map +3 -3
  161. package/build-module/input-control/input-field.mjs +1 -0
  162. package/build-module/input-control/input-field.mjs.map +2 -2
  163. package/build-module/input-control/styles/input-control-styles.mjs +22 -22
  164. package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
  165. package/build-module/modal/index.mjs +1 -0
  166. package/build-module/modal/index.mjs.map +2 -2
  167. package/build-module/palette-edit/index.mjs +209 -34
  168. package/build-module/palette-edit/index.mjs.map +2 -2
  169. package/build-module/private-apis.mjs +2 -7
  170. package/build-module/private-apis.mjs.map +2 -2
  171. package/build-module/progress-bar/index.mjs +95 -7
  172. package/build-module/progress-bar/index.mjs.map +3 -3
  173. package/build-module/radio-control/index.mjs +1 -0
  174. package/build-module/radio-control/index.mjs.map +2 -2
  175. package/build-module/resizable-box/resize-tooltip/index.mjs +91 -4
  176. package/build-module/resizable-box/resize-tooltip/index.mjs.map +3 -3
  177. package/build-module/resizable-box/resize-tooltip/label.mjs +93 -6
  178. package/build-module/resizable-box/resize-tooltip/label.mjs.map +3 -3
  179. package/build-module/scrollable/hook.mjs +93 -6
  180. package/build-module/scrollable/hook.mjs.map +4 -4
  181. package/build-module/textarea-control/index.mjs +87 -3
  182. package/build-module/textarea-control/index.mjs.map +3 -3
  183. package/build-module/toggle-group-control/toggle-group-control/component.mjs +1 -1
  184. package/build-module/toggle-group-control/toggle-group-control/component.mjs.map +2 -2
  185. package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs +1 -1
  186. package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs.map +2 -2
  187. package/build-module/utils/config-values.mjs +0 -3
  188. package/build-module/utils/config-values.mjs.map +2 -2
  189. package/build-module/validated-form-controls/components/content-editable-control.mjs +2 -1
  190. package/build-module/validated-form-controls/components/content-editable-control.mjs.map +2 -2
  191. package/build-module/validated-form-controls/components/custom-select-control.mjs +2 -1
  192. package/build-module/validated-form-controls/components/custom-select-control.mjs.map +2 -2
  193. package/build-module/validated-form-controls/components/index.mjs +0 -4
  194. package/build-module/validated-form-controls/components/index.mjs.map +2 -2
  195. package/build-module/validated-form-controls/components/input-control.mjs +8 -1
  196. package/build-module/validated-form-controls/components/input-control.mjs.map +2 -2
  197. package/build-module/validated-form-controls/components/range-control.mjs +2 -1
  198. package/build-module/validated-form-controls/components/range-control.mjs.map +2 -2
  199. package/build-module/validated-form-controls/components/textarea-control.mjs +8 -1
  200. package/build-module/validated-form-controls/components/textarea-control.mjs.map +2 -2
  201. package/build-module/validated-form-controls/index.mjs +0 -1
  202. package/build-module/validated-form-controls/index.mjs.map +2 -2
  203. package/build-module/z-stack/component.mjs +95 -7
  204. package/build-module/z-stack/component.mjs.map +3 -3
  205. package/build-style/style-rtl.css +79 -134
  206. package/build-style/style.css +79 -134
  207. package/build-types/base-control/styles/base-control-styles.d.ts +21 -20
  208. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  209. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  210. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  211. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  212. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +863 -1
  213. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  214. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  215. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  216. package/build-types/border-control/border-control-dropdown/hook.d.ts +4 -2
  217. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  218. package/build-types/box-control/box-input-control.d.ts.map +1 -1
  219. package/build-types/box-control/index.d.ts.map +1 -1
  220. package/build-types/button/index.d.ts.map +1 -1
  221. package/build-types/card/styles.d.ts +2 -1
  222. package/build-types/card/styles.d.ts.map +1 -1
  223. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  224. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  225. package/build-types/circular-option-picker/index.d.ts +1 -1
  226. package/build-types/circular-option-picker/index.d.ts.map +1 -1
  227. package/build-types/circular-option-picker/types.d.ts +34 -26
  228. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  229. package/build-types/circular-option-picker/utils.d.ts +9 -5
  230. package/build-types/circular-option-picker/utils.d.ts.map +1 -1
  231. package/build-types/color-palette/index.d.ts.map +1 -1
  232. package/build-types/color-palette/types.d.ts +23 -3
  233. package/build-types/color-palette/types.d.ts.map +1 -1
  234. package/build-types/combobox-control/index.d.ts.map +1 -1
  235. package/build-types/combobox-control/types.d.ts +4 -2
  236. package/build-types/combobox-control/types.d.ts.map +1 -1
  237. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  238. package/build-types/confirm-dialog/types.d.ts +11 -0
  239. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  240. package/build-types/context/context-system-provider.d.ts.map +1 -1
  241. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +1 -1
  242. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  243. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +1 -1
  244. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
  245. package/build-types/custom-gradient-picker/types.d.ts +10 -0
  246. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  247. package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -1
  248. package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
  249. package/build-types/duotone-picker/duotone-picker.d.ts +1 -1
  250. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  251. package/build-types/duotone-picker/types.d.ts +43 -4
  252. package/build-types/duotone-picker/types.d.ts.map +1 -1
  253. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  254. package/build-types/gradient-picker/index.d.ts.map +1 -1
  255. package/build-types/gradient-picker/types.d.ts +22 -3
  256. package/build-types/gradient-picker/types.d.ts.map +1 -1
  257. package/build-types/input-control/input-field.d.ts.map +1 -1
  258. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  259. package/build-types/modal/index.d.ts.map +1 -1
  260. package/build-types/palette-edit/index.d.ts +8 -5
  261. package/build-types/palette-edit/index.d.ts.map +1 -1
  262. package/build-types/palette-edit/types.d.ts +47 -8
  263. package/build-types/palette-edit/types.d.ts.map +1 -1
  264. package/build-types/private-apis.d.ts.map +1 -1
  265. package/build-types/progress-bar/index.d.ts.map +1 -1
  266. package/build-types/radio-control/index.d.ts.map +1 -1
  267. package/build-types/radio-control/types.d.ts +6 -0
  268. package/build-types/radio-control/types.d.ts.map +1 -1
  269. package/build-types/resizable-box/resize-tooltip/index.d.ts +4 -5
  270. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  271. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  272. package/build-types/scrollable/hook.d.ts.map +1 -1
  273. package/build-types/textarea-control/index.d.ts.map +1 -1
  274. package/build-types/utils/config-values.d.ts +0 -3
  275. package/build-types/validated-form-controls/components/content-editable-control.d.ts.map +1 -1
  276. package/build-types/validated-form-controls/components/custom-select-control.d.ts.map +1 -1
  277. package/build-types/validated-form-controls/components/index.d.ts +0 -4
  278. package/build-types/validated-form-controls/components/index.d.ts.map +1 -1
  279. package/build-types/validated-form-controls/components/input-control.d.ts.map +1 -1
  280. package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
  281. package/build-types/validated-form-controls/components/textarea-control.d.ts.map +1 -1
  282. package/build-types/validated-form-controls/index.d.ts +0 -1
  283. package/build-types/validated-form-controls/index.d.ts.map +1 -1
  284. package/build-types/z-stack/component.d.ts.map +1 -1
  285. package/package.json +30 -30
  286. package/src/animate/stories/index.story.tsx +0 -10
  287. package/src/base-control/stories/index.story.tsx +1 -1
  288. package/src/base-control/styles/base-control-styles.tsx +115 -0
  289. package/src/base-control/styles/style.module.scss +39 -0
  290. package/src/border-box-control/border-box-control/hook.ts +5 -16
  291. package/src/border-box-control/border-box-control-linked-button/hook.ts +6 -10
  292. package/src/border-box-control/border-box-control-split-controls/hook.ts +11 -20
  293. package/src/border-box-control/border-box-control-visualizer/hook.ts +37 -11
  294. package/src/border-box-control/stories/index.story.tsx +1 -1
  295. package/src/border-box-control/style.module.scss +43 -0
  296. package/src/border-control/border-control/hook.ts +10 -19
  297. package/src/border-control/border-control-dropdown/component.tsx +6 -8
  298. package/src/border-control/border-control-dropdown/hook.ts +23 -32
  299. package/src/border-control/style.module.scss +93 -0
  300. package/src/border-control/test/index.js +63 -31
  301. package/src/box-control/box-input-control.tsx +31 -16
  302. package/src/box-control/index.tsx +15 -12
  303. package/src/box-control/style.module.scss +28 -0
  304. package/src/box-control/test/index.tsx +161 -0
  305. package/src/button/index.tsx +32 -10
  306. package/src/button/test/index.tsx +51 -0
  307. package/src/card/card-body/hook.ts +2 -2
  308. package/src/card/styles.ts +11 -1
  309. package/src/card/test/__snapshots__/index.tsx.snap +27 -27
  310. package/src/circular-option-picker/README.md +8 -4
  311. package/src/circular-option-picker/circular-option-picker-option.tsx +26 -16
  312. package/src/circular-option-picker/circular-option-picker.tsx +47 -14
  313. package/src/circular-option-picker/index.tsx +5 -1
  314. package/src/circular-option-picker/stories/index.story.tsx +3 -3
  315. package/src/circular-option-picker/test/index.tsx +152 -3
  316. package/src/circular-option-picker/types.ts +38 -32
  317. package/src/circular-option-picker/utils.tsx +35 -5
  318. package/src/clipboard-button/index.tsx +1 -1
  319. package/src/color-palette/README.md +11 -7
  320. package/src/color-palette/index.tsx +28 -14
  321. package/src/color-palette/stories/index.story.tsx +5 -0
  322. package/src/color-palette/style.module.scss +12 -0
  323. package/src/color-palette/test/index.tsx +80 -5
  324. package/src/color-palette/types.ts +23 -3
  325. package/src/color-picker/stories/index.story.tsx +0 -5
  326. package/src/combobox-control/README.md +1 -1
  327. package/src/combobox-control/index.tsx +4 -4
  328. package/src/combobox-control/style.module.scss +6 -0
  329. package/src/combobox-control/style.scss +1 -1
  330. package/src/combobox-control/types.ts +4 -2
  331. package/src/composite/legacy/stories/index.story.tsx +10 -10
  332. package/src/composite/stories/index.story.tsx +0 -5
  333. package/src/confirm-dialog/README.md +16 -0
  334. package/src/confirm-dialog/component.tsx +7 -1
  335. package/src/confirm-dialog/test/index.tsx +41 -0
  336. package/src/confirm-dialog/types.ts +11 -0
  337. package/src/content-editable-control/style.module.scss +0 -1
  338. package/src/context/context-system-provider.js +0 -1
  339. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +24 -3
  340. package/src/custom-gradient-picker/gradient-bar/index.tsx +2 -0
  341. package/src/custom-gradient-picker/test/index.tsx +134 -0
  342. package/src/custom-gradient-picker/types.ts +10 -0
  343. package/src/dropdown/dropdown-content-wrapper.tsx +17 -7
  344. package/src/dropdown/stories/index.story.tsx +0 -5
  345. package/src/dropdown/style.module.scss +25 -0
  346. package/src/dropdown/test/index.tsx +51 -0
  347. package/src/duotone-picker/README.md +21 -6
  348. package/src/duotone-picker/custom-duotone-bar.tsx +1 -0
  349. package/src/duotone-picker/duotone-picker.tsx +79 -54
  350. package/src/duotone-picker/stories/duotone-picker.story.tsx +63 -15
  351. package/src/duotone-picker/test/custom-duotone-bar.tsx +114 -0
  352. package/src/duotone-picker/test/index.tsx +346 -0
  353. package/src/duotone-picker/types.ts +48 -4
  354. package/src/focal-point-picker/index.tsx +6 -2
  355. package/src/focal-point-picker/stories/index.story.tsx +15 -0
  356. package/src/focal-point-picker/test/index.tsx +31 -0
  357. package/src/form-toggle/stories/index.story.tsx +3 -0
  358. package/src/form-token-field/style.scss +7 -1
  359. package/src/gradient-picker/README.md +19 -10
  360. package/src/gradient-picker/index.tsx +43 -16
  361. package/src/gradient-picker/stories/index.story.tsx +5 -0
  362. package/src/gradient-picker/test/index.tsx +84 -0
  363. package/src/gradient-picker/types.ts +22 -3
  364. package/src/input-control/input-field.tsx +1 -0
  365. package/src/input-control/stories/index.story.tsx +3 -3
  366. package/src/input-control/stories/migration-guide.mdx +201 -0
  367. package/src/input-control/style.scss +11 -0
  368. package/src/input-control/styles/input-control-styles.tsx +30 -11
  369. package/src/input-control/test/index.js +10 -0
  370. package/src/keyboard-shortcuts/stories/index.story.tsx +2 -2
  371. package/src/menu-group/stories/index.story.tsx +9 -6
  372. package/src/menu-item/stories/index.story.tsx +6 -3
  373. package/src/menu-items-choice/stories/index.story.tsx +14 -11
  374. package/src/modal/index.tsx +1 -0
  375. package/src/modal/test/index.tsx +19 -0
  376. package/src/navigator/stories/index.story.tsx +0 -5
  377. package/src/number-control/stories/index.story.tsx +3 -3
  378. package/src/palette-edit/index.tsx +364 -70
  379. package/src/palette-edit/stories/index.story.tsx +59 -18
  380. package/src/palette-edit/style.scss +3 -1
  381. package/src/palette-edit/test/index.tsx +375 -1
  382. package/src/palette-edit/types.ts +50 -8
  383. package/src/popover/stories/index.story.tsx +5 -1
  384. package/src/popover/stories/utils.tsx +79 -0
  385. package/src/popover/test/index.tsx +1 -1
  386. package/src/popover/test/utils/index.js +1 -0
  387. package/src/popover/test/utils/index.tsx +4 -78
  388. package/src/private-apis.ts +0 -8
  389. package/src/progress-bar/index.tsx +10 -6
  390. package/src/progress-bar/style.module.scss +62 -0
  391. package/src/progress-bar/test/index.tsx +13 -11
  392. package/src/radio-control/README.md +3 -1
  393. package/src/radio-control/index.tsx +1 -0
  394. package/src/radio-control/stories/index.story.tsx +12 -0
  395. package/src/radio-control/style.scss +1 -3
  396. package/src/radio-control/test/index.tsx +59 -0
  397. package/src/radio-control/types.ts +6 -0
  398. package/src/range-control/stories/index.story.tsx +30 -0
  399. package/src/resizable-box/resize-tooltip/index.tsx +16 -7
  400. package/src/resizable-box/resize-tooltip/label.tsx +18 -12
  401. package/src/resizable-box/resize-tooltip/style.module.scss +40 -0
  402. package/src/resizable-box/resize-tooltip/test/index.tsx +44 -0
  403. package/src/resizable-box/resize-tooltip/test/label.tsx +25 -0
  404. package/src/resizable-box/stories/index.story.tsx +11 -0
  405. package/src/sandbox/stories/index.story.tsx +2 -0
  406. package/src/scrollable/hook.ts +11 -17
  407. package/src/scrollable/stories/index.story.tsx +1 -0
  408. package/src/scrollable/style.module.scss +44 -0
  409. package/src/scrollable/test/index.tsx +120 -6
  410. package/src/snackbar/stories/index.story.tsx +5 -0
  411. package/src/snackbar/stories/list.story.tsx +3 -0
  412. package/src/spinner/stories/index.story.tsx +2 -2
  413. package/src/style.scss +1 -0
  414. package/src/text-control/stories/index.story.tsx +2 -3
  415. package/src/text-control/style.scss +0 -1
  416. package/src/textarea-control/index.tsx +6 -3
  417. package/src/textarea-control/stories/index.story.tsx +2 -3
  418. package/src/textarea-control/stories/migration-guide.mdx +79 -0
  419. package/src/textarea-control/style.module.scss +56 -0
  420. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +12 -116
  421. package/src/toggle-group-control/toggle-group-control/style.module.scss +0 -2
  422. package/src/toggle-group-control/toggle-group-control-option-base/style.module.scss +0 -2
  423. package/src/utils/config-values.js +0 -3
  424. package/src/utils/theme-variables.scss +0 -1
  425. package/src/validated-form-controls/components/content-editable-control.tsx +2 -1
  426. package/src/validated-form-controls/components/custom-select-control.tsx +2 -1
  427. package/src/validated-form-controls/components/index.ts +0 -4
  428. package/src/validated-form-controls/components/input-control.tsx +9 -1
  429. package/src/validated-form-controls/components/range-control.tsx +2 -1
  430. package/src/validated-form-controls/components/stories/content-editable-control.story.tsx +6 -0
  431. package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +6 -0
  432. package/src/validated-form-controls/components/stories/overview.mdx +4 -47
  433. package/src/validated-form-controls/components/textarea-control.tsx +9 -1
  434. package/src/validated-form-controls/index.ts +0 -1
  435. package/src/validated-form-controls/style.scss +11 -67
  436. package/src/validated-form-controls/test/input-control.tsx +12 -0
  437. package/src/validated-form-controls/test/textarea-control.tsx +17 -0
  438. package/src/z-stack/component.tsx +17 -9
  439. package/src/z-stack/style.module.scss +26 -0
  440. package/build/border-box-control/styles.cjs +0 -99
  441. package/build/border-box-control/styles.cjs.map +0 -7
  442. package/build/border-control/styles.cjs +0 -117
  443. package/build/border-control/styles.cjs.map +0 -7
  444. package/build/box-control/styles/box-control-styles.cjs +0 -131
  445. package/build/box-control/styles/box-control-styles.cjs.map +0 -7
  446. package/build/color-palette/styles.cjs +0 -49
  447. package/build/color-palette/styles.cjs.map +0 -7
  448. package/build/combobox-control/styles.cjs +0 -49
  449. package/build/combobox-control/styles.cjs.map +0 -7
  450. package/build/dropdown/styles.cjs +0 -61
  451. package/build/dropdown/styles.cjs.map +0 -7
  452. package/build/progress-bar/styles.cjs +0 -106
  453. package/build/progress-bar/styles.cjs.map +0 -7
  454. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.cjs +0 -90
  455. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.cjs.map +0 -7
  456. package/build/scrollable/styles.cjs +0 -96
  457. package/build/scrollable/styles.cjs.map +0 -7
  458. package/build/textarea-control/styles/textarea-control-styles.cjs +0 -54
  459. package/build/textarea-control/styles/textarea-control-styles.cjs.map +0 -7
  460. package/build/validated-form-controls/components/combobox-control.cjs +0 -75
  461. package/build/validated-form-controls/components/combobox-control.cjs.map +0 -7
  462. package/build/validated-form-controls/components/form-token-field.cjs +0 -69
  463. package/build/validated-form-controls/components/form-token-field.cjs.map +0 -7
  464. package/build/validated-form-controls/components/toggle-control.cjs +0 -67
  465. package/build/validated-form-controls/components/toggle-control.cjs.map +0 -7
  466. package/build/validated-form-controls/components/toggle-group-control.cjs +0 -71
  467. package/build/validated-form-controls/components/toggle-group-control.cjs.map +0 -7
  468. package/build/validated-form-controls/control-with-error.cjs +0 -200
  469. package/build/validated-form-controls/control-with-error.cjs.map +0 -7
  470. package/build/validated-form-controls/validity-indicator.cjs +0 -67
  471. package/build/validated-form-controls/validity-indicator.cjs.map +0 -7
  472. package/build/z-stack/styles.cjs +0 -80
  473. package/build/z-stack/styles.cjs.map +0 -7
  474. package/build-module/border-box-control/styles.mjs +0 -67
  475. package/build-module/border-box-control/styles.mjs.map +0 -7
  476. package/build-module/border-control/styles.mjs +0 -80
  477. package/build-module/border-control/styles.mjs.map +0 -7
  478. package/build-module/box-control/styles/box-control-styles.mjs +0 -91
  479. package/build-module/box-control/styles/box-control-styles.mjs.map +0 -7
  480. package/build-module/color-palette/styles.mjs +0 -14
  481. package/build-module/color-palette/styles.mjs.map +0 -7
  482. package/build-module/combobox-control/styles.mjs +0 -14
  483. package/build-module/combobox-control/styles.mjs.map +0 -7
  484. package/build-module/dropdown/styles.mjs +0 -26
  485. package/build-module/dropdown/styles.mjs.map +0 -7
  486. package/build-module/progress-bar/styles.mjs +0 -68
  487. package/build-module/progress-bar/styles.mjs.map +0 -7
  488. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.mjs +0 -52
  489. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.mjs.map +0 -7
  490. package/build-module/scrollable/styles.mjs +0 -65
  491. package/build-module/scrollable/styles.mjs.map +0 -7
  492. package/build-module/textarea-control/styles/textarea-control-styles.mjs +0 -19
  493. package/build-module/textarea-control/styles/textarea-control-styles.mjs.map +0 -7
  494. package/build-module/validated-form-controls/components/combobox-control.mjs +0 -40
  495. package/build-module/validated-form-controls/components/combobox-control.mjs.map +0 -7
  496. package/build-module/validated-form-controls/components/form-token-field.mjs +0 -44
  497. package/build-module/validated-form-controls/components/form-token-field.mjs.map +0 -7
  498. package/build-module/validated-form-controls/components/toggle-control.mjs +0 -32
  499. package/build-module/validated-form-controls/components/toggle-control.mjs.map +0 -7
  500. package/build-module/validated-form-controls/components/toggle-group-control.mjs +0 -46
  501. package/build-module/validated-form-controls/components/toggle-group-control.mjs.map +0 -7
  502. package/build-module/validated-form-controls/control-with-error.mjs +0 -175
  503. package/build-module/validated-form-controls/control-with-error.mjs.map +0 -7
  504. package/build-module/validated-form-controls/validity-indicator.mjs +0 -32
  505. package/build-module/validated-form-controls/validity-indicator.mjs.map +0 -7
  506. package/build-module/z-stack/styles.mjs +0 -44
  507. package/build-module/z-stack/styles.mjs.map +0 -7
  508. package/build-types/alignment-matrix-control/stories/index.story.d.ts +0 -8
  509. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +0 -1
  510. package/build-types/alignment-matrix-control/test/index.d.ts +0 -2
  511. package/build-types/alignment-matrix-control/test/index.d.ts.map +0 -1
  512. package/build-types/angle-picker-control/stories/index.story.d.ts +0 -8
  513. package/build-types/angle-picker-control/stories/index.story.d.ts.map +0 -1
  514. package/build-types/animate/stories/index.story.d.ts +0 -12
  515. package/build-types/animate/stories/index.story.d.ts.map +0 -1
  516. package/build-types/autocomplete/test/get-autocomplete-match.d.ts +0 -2
  517. package/build-types/autocomplete/test/get-autocomplete-match.d.ts.map +0 -1
  518. package/build-types/autocomplete/test/index.d.ts +0 -2
  519. package/build-types/autocomplete/test/index.d.ts.map +0 -1
  520. package/build-types/badge/stories/e2e/index.story.d.ts +0 -7
  521. package/build-types/badge/stories/e2e/index.story.d.ts.map +0 -1
  522. package/build-types/badge/stories/index.story.d.ts +0 -11
  523. package/build-types/badge/stories/index.story.d.ts.map +0 -1
  524. package/build-types/badge/test/index.d.ts +0 -2
  525. package/build-types/badge/test/index.d.ts.map +0 -1
  526. package/build-types/base-control/stories/index.story.d.ts +0 -17
  527. package/build-types/base-control/stories/index.story.d.ts.map +0 -1
  528. package/build-types/base-control/test/index.d.ts +0 -2
  529. package/build-types/base-control/test/index.d.ts.map +0 -1
  530. package/build-types/border-box-control/stories/index.story.d.ts +0 -14
  531. package/build-types/border-box-control/stories/index.story.d.ts.map +0 -1
  532. package/build-types/border-box-control/styles.d.ts +0 -10
  533. package/build-types/border-box-control/styles.d.ts.map +0 -1
  534. package/build-types/border-box-control/test/index.d.ts +0 -2
  535. package/build-types/border-box-control/test/index.d.ts.map +0 -1
  536. package/build-types/border-box-control/test/utils.d.ts +0 -2
  537. package/build-types/border-box-control/test/utils.d.ts.map +0 -1
  538. package/build-types/border-control/stories/index.story.d.ts +0 -109
  539. package/build-types/border-control/stories/index.story.d.ts.map +0 -1
  540. package/build-types/border-control/styles.d.ts +0 -17
  541. package/build-types/border-control/styles.d.ts.map +0 -1
  542. package/build-types/box-control/stories/index.story.d.ts +0 -12
  543. package/build-types/box-control/stories/index.story.d.ts.map +0 -1
  544. package/build-types/box-control/styles/box-control-styles.d.ts +0 -65
  545. package/build-types/box-control/styles/box-control-styles.d.ts.map +0 -1
  546. package/build-types/box-control/test/index.d.ts +0 -2
  547. package/build-types/box-control/test/index.d.ts.map +0 -1
  548. package/build-types/button/stories/e2e/index.story.d.ts +0 -9
  549. package/build-types/button/stories/e2e/index.story.d.ts.map +0 -1
  550. package/build-types/button/stories/index.story.d.ts +0 -31
  551. package/build-types/button/stories/index.story.d.ts.map +0 -1
  552. package/build-types/button/test/index.d.ts +0 -2
  553. package/build-types/button/test/index.d.ts.map +0 -1
  554. package/build-types/button-group/stories/index.story.d.ts +0 -12
  555. package/build-types/button-group/stories/index.story.d.ts.map +0 -1
  556. package/build-types/card/stories/index.story.d.ts +0 -20
  557. package/build-types/card/stories/index.story.d.ts.map +0 -1
  558. package/build-types/card/test/index.d.ts +0 -2
  559. package/build-types/card/test/index.d.ts.map +0 -1
  560. package/build-types/checkbox-control/stories/index.story.d.ts +0 -24
  561. package/build-types/checkbox-control/stories/index.story.d.ts.map +0 -1
  562. package/build-types/checkbox-control/test/index.d.ts +0 -2
  563. package/build-types/checkbox-control/test/index.d.ts.map +0 -1
  564. package/build-types/circular-option-picker/stories/index.story.d.ts +0 -10
  565. package/build-types/circular-option-picker/stories/index.story.d.ts.map +0 -1
  566. package/build-types/circular-option-picker/test/index.d.ts +0 -2
  567. package/build-types/circular-option-picker/test/index.d.ts.map +0 -1
  568. package/build-types/color-indicator/stories/index.story.d.ts +0 -6
  569. package/build-types/color-indicator/stories/index.story.d.ts.map +0 -1
  570. package/build-types/color-indicator/test/index.d.ts +0 -2
  571. package/build-types/color-indicator/test/index.d.ts.map +0 -1
  572. package/build-types/color-palette/stories/index.story.d.ts +0 -11
  573. package/build-types/color-palette/stories/index.story.d.ts.map +0 -1
  574. package/build-types/color-palette/styles.d.ts +0 -11
  575. package/build-types/color-palette/styles.d.ts.map +0 -1
  576. package/build-types/color-palette/test/index.d.ts +0 -2
  577. package/build-types/color-palette/test/index.d.ts.map +0 -1
  578. package/build-types/color-palette/test/utils.d.ts +0 -2
  579. package/build-types/color-palette/test/utils.d.ts.map +0 -1
  580. package/build-types/color-picker/stories/index.story.d.ts +0 -6
  581. package/build-types/color-picker/stories/index.story.d.ts.map +0 -1
  582. package/build-types/color-picker/test/index.d.ts +0 -2
  583. package/build-types/color-picker/test/index.d.ts.map +0 -1
  584. package/build-types/combobox-control/stories/index.story.d.ts +0 -93
  585. package/build-types/combobox-control/stories/index.story.d.ts.map +0 -1
  586. package/build-types/combobox-control/styles.d.ts +0 -6
  587. package/build-types/combobox-control/styles.d.ts.map +0 -1
  588. package/build-types/combobox-control/test/index.d.ts +0 -2
  589. package/build-types/combobox-control/test/index.d.ts.map +0 -1
  590. package/build-types/composite/legacy/stories/index.story.d.ts +0 -9
  591. package/build-types/composite/legacy/stories/index.story.d.ts.map +0 -1
  592. package/build-types/composite/legacy/stories/utils.d.ts +0 -27
  593. package/build-types/composite/legacy/stories/utils.d.ts.map +0 -1
  594. package/build-types/composite/legacy/test/index.d.ts +0 -2
  595. package/build-types/composite/legacy/test/index.d.ts.map +0 -1
  596. package/build-types/composite/stories/index.story.d.ts +0 -33
  597. package/build-types/composite/stories/index.story.d.ts.map +0 -1
  598. package/build-types/composite/test/index.d.ts +0 -2
  599. package/build-types/composite/test/index.d.ts.map +0 -1
  600. package/build-types/confirm-dialog/stories/index.story.d.ts +0 -7
  601. package/build-types/confirm-dialog/stories/index.story.d.ts.map +0 -1
  602. package/build-types/confirm-dialog/test/index.d.ts +0 -2
  603. package/build-types/confirm-dialog/test/index.d.ts.map +0 -1
  604. package/build-types/content-editable-control/stories/index.story.d.ts +0 -7
  605. package/build-types/content-editable-control/stories/index.story.d.ts.map +0 -1
  606. package/build-types/content-editable-control/test/index.d.ts +0 -2
  607. package/build-types/content-editable-control/test/index.d.ts.map +0 -1
  608. package/build-types/context/test/context-connect.d.ts +0 -2
  609. package/build-types/context/test/context-connect.d.ts.map +0 -1
  610. package/build-types/context/test/wordpress-component.d.ts +0 -2
  611. package/build-types/context/test/wordpress-component.d.ts.map +0 -1
  612. package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts +0 -2
  613. package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts.map +0 -1
  614. package/build-types/custom-gradient-picker/stories/index.story.d.ts +0 -6
  615. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +0 -1
  616. package/build-types/custom-gradient-picker/test/index.d.ts +0 -2
  617. package/build-types/custom-gradient-picker/test/index.d.ts.map +0 -1
  618. package/build-types/custom-gradient-picker/test/serializer.d.ts +0 -2
  619. package/build-types/custom-gradient-picker/test/serializer.d.ts.map +0 -1
  620. package/build-types/custom-select-control/stories/index.story.d.ts +0 -8
  621. package/build-types/custom-select-control/stories/index.story.d.ts.map +0 -1
  622. package/build-types/custom-select-control/test/index.d.ts +0 -2
  623. package/build-types/custom-select-control/test/index.d.ts.map +0 -1
  624. package/build-types/custom-select-control-v2/stories/index.story.d.ts +0 -38
  625. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +0 -1
  626. package/build-types/custom-select-control-v2/test/index.d.ts +0 -2
  627. package/build-types/custom-select-control-v2/test/index.d.ts.map +0 -1
  628. package/build-types/date-time/date-picker/test/index.d.ts +0 -2
  629. package/build-types/date-time/date-picker/test/index.d.ts.map +0 -1
  630. package/build-types/date-time/date-picker/test/use-lilius.d.ts +0 -2
  631. package/build-types/date-time/date-picker/test/use-lilius.d.ts.map +0 -1
  632. package/build-types/date-time/date-time/test/index.d.ts +0 -2
  633. package/build-types/date-time/date-time/test/index.d.ts.map +0 -1
  634. package/build-types/date-time/stories/date-time.story.d.ts +0 -8
  635. package/build-types/date-time/stories/date-time.story.d.ts.map +0 -1
  636. package/build-types/date-time/stories/date.story.d.ts +0 -8
  637. package/build-types/date-time/stories/date.story.d.ts.map +0 -1
  638. package/build-types/date-time/stories/time.story.d.ts +0 -11
  639. package/build-types/date-time/stories/time.story.d.ts.map +0 -1
  640. package/build-types/date-time/stories/utils.d.ts +0 -3
  641. package/build-types/date-time/stories/utils.d.ts.map +0 -1
  642. package/build-types/date-time/test/utils.test.d.ts +0 -2
  643. package/build-types/date-time/test/utils.test.d.ts.map +0 -1
  644. package/build-types/date-time/time-picker/test/index.d.ts +0 -2
  645. package/build-types/date-time/time-picker/test/index.d.ts.map +0 -1
  646. package/build-types/date-time/time-picker/time-input/test/index.d.ts +0 -2
  647. package/build-types/date-time/time-picker/time-input/test/index.d.ts.map +0 -1
  648. package/build-types/disabled/stories/index.story.d.ts +0 -7
  649. package/build-types/disabled/stories/index.story.d.ts.map +0 -1
  650. package/build-types/disabled/test/index.d.ts +0 -2
  651. package/build-types/disabled/test/index.d.ts.map +0 -1
  652. package/build-types/divider/stories/index.story.d.ts +0 -8
  653. package/build-types/divider/stories/index.story.d.ts.map +0 -1
  654. package/build-types/divider/test/index.d.ts +0 -2
  655. package/build-types/divider/test/index.d.ts.map +0 -1
  656. package/build-types/draggable/stories/index.story.d.ts +0 -13
  657. package/build-types/draggable/stories/index.story.d.ts.map +0 -1
  658. package/build-types/drop-zone/stories/index.story.d.ts +0 -6
  659. package/build-types/drop-zone/stories/index.story.d.ts.map +0 -1
  660. package/build-types/dropdown/stories/index.story.d.ts +0 -18
  661. package/build-types/dropdown/stories/index.story.d.ts.map +0 -1
  662. package/build-types/dropdown/styles.d.ts +0 -6
  663. package/build-types/dropdown/styles.d.ts.map +0 -1
  664. package/build-types/dropdown/test/index.d.ts +0 -2
  665. package/build-types/dropdown/test/index.d.ts.map +0 -1
  666. package/build-types/dropdown-menu/stories/index.story.d.ts +0 -7
  667. package/build-types/dropdown-menu/stories/index.story.d.ts.map +0 -1
  668. package/build-types/dropdown-menu/test/index.d.ts +0 -2
  669. package/build-types/dropdown-menu/test/index.d.ts.map +0 -1
  670. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +0 -7
  671. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +0 -1
  672. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +0 -8
  673. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +0 -1
  674. package/build-types/elevation/stories/index.story.d.ts +0 -16
  675. package/build-types/elevation/stories/index.story.d.ts.map +0 -1
  676. package/build-types/elevation/test/index.d.ts +0 -2
  677. package/build-types/elevation/test/index.d.ts.map +0 -1
  678. package/build-types/external-link/stories/index.story.d.ts +0 -6
  679. package/build-types/external-link/stories/index.story.d.ts.map +0 -1
  680. package/build-types/external-link/test/index.d.ts +0 -2
  681. package/build-types/external-link/test/index.d.ts.map +0 -1
  682. package/build-types/flex/stories/index.story.d.ts +0 -7
  683. package/build-types/flex/stories/index.story.d.ts.map +0 -1
  684. package/build-types/flex/test/index.d.ts +0 -2
  685. package/build-types/flex/test/index.d.ts.map +0 -1
  686. package/build-types/focal-point-picker/stories/index.story.d.ts +0 -49
  687. package/build-types/focal-point-picker/stories/index.story.d.ts.map +0 -1
  688. package/build-types/focal-point-picker/test/index.d.ts +0 -2
  689. package/build-types/focal-point-picker/test/index.d.ts.map +0 -1
  690. package/build-types/focal-point-picker/test/media.d.ts +0 -2
  691. package/build-types/focal-point-picker/test/media.d.ts.map +0 -1
  692. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +0 -20
  693. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +0 -1
  694. package/build-types/font-size-picker/stories/index.story.d.ts +0 -26
  695. package/build-types/font-size-picker/stories/index.story.d.ts.map +0 -1
  696. package/build-types/font-size-picker/test/font-size-picker-select.d.ts +0 -2
  697. package/build-types/font-size-picker/test/font-size-picker-select.d.ts.map +0 -1
  698. package/build-types/font-size-picker/test/font-size-picker-toggle-group.d.ts +0 -2
  699. package/build-types/font-size-picker/test/font-size-picker-toggle-group.d.ts.map +0 -1
  700. package/build-types/font-size-picker/test/index.d.ts +0 -2
  701. package/build-types/font-size-picker/test/index.d.ts.map +0 -1
  702. package/build-types/font-size-picker/test/utils.d.ts +0 -2
  703. package/build-types/font-size-picker/test/utils.d.ts.map +0 -1
  704. package/build-types/form-file-upload/stories/index.story.d.ts +0 -17
  705. package/build-types/form-file-upload/stories/index.story.d.ts.map +0 -1
  706. package/build-types/form-file-upload/test/index.d.ts +0 -2
  707. package/build-types/form-file-upload/test/index.d.ts.map +0 -1
  708. package/build-types/form-toggle/stories/index.story.d.ts +0 -6
  709. package/build-types/form-toggle/stories/index.story.d.ts.map +0 -1
  710. package/build-types/form-toggle/test/index.d.ts +0 -2
  711. package/build-types/form-toggle/test/index.d.ts.map +0 -1
  712. package/build-types/form-token-field/stories/index.story.d.ts +0 -25
  713. package/build-types/form-token-field/stories/index.story.d.ts.map +0 -1
  714. package/build-types/form-token-field/test/index.d.ts +0 -2
  715. package/build-types/form-token-field/test/index.d.ts.map +0 -1
  716. package/build-types/gradient-picker/stories/index.story.d.ts +0 -11
  717. package/build-types/gradient-picker/stories/index.story.d.ts.map +0 -1
  718. package/build-types/gradient-picker/test/index.d.ts +0 -2
  719. package/build-types/gradient-picker/test/index.d.ts.map +0 -1
  720. package/build-types/grid/stories/index.story.d.ts +0 -6
  721. package/build-types/grid/stories/index.story.d.ts.map +0 -1
  722. package/build-types/grid/test/grid.d.ts +0 -2
  723. package/build-types/grid/test/grid.d.ts.map +0 -1
  724. package/build-types/guide/stories/index.story.d.ts +0 -6
  725. package/build-types/guide/stories/index.story.d.ts.map +0 -1
  726. package/build-types/guide/test/index.d.ts +0 -2
  727. package/build-types/guide/test/index.d.ts.map +0 -1
  728. package/build-types/h-stack/stories/e2e/index.story.d.ts +0 -6
  729. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +0 -1
  730. package/build-types/h-stack/stories/index.story.d.ts +0 -6
  731. package/build-types/h-stack/stories/index.story.d.ts.map +0 -1
  732. package/build-types/h-stack/test/index.d.ts +0 -2
  733. package/build-types/h-stack/test/index.d.ts.map +0 -1
  734. package/build-types/heading/stories/index.story.d.ts +0 -6
  735. package/build-types/heading/stories/index.story.d.ts.map +0 -1
  736. package/build-types/heading/test/index.d.ts +0 -2
  737. package/build-types/heading/test/index.d.ts.map +0 -1
  738. package/build-types/higher-order/with-fallback-styles/test/index.d.ts +0 -2
  739. package/build-types/higher-order/with-fallback-styles/test/index.d.ts.map +0 -1
  740. package/build-types/higher-order/with-filters/test/index.d.ts +0 -2
  741. package/build-types/higher-order/with-filters/test/index.d.ts.map +0 -1
  742. package/build-types/higher-order/with-focus-outside/test/index.d.ts +0 -2
  743. package/build-types/higher-order/with-focus-outside/test/index.d.ts.map +0 -1
  744. package/build-types/higher-order/with-focus-return/test/index.d.ts +0 -2
  745. package/build-types/higher-order/with-focus-return/test/index.d.ts.map +0 -1
  746. package/build-types/higher-order/with-notices/test/index.d.ts +0 -2
  747. package/build-types/higher-order/with-notices/test/index.d.ts.map +0 -1
  748. package/build-types/higher-order/with-spoken-messages/test/index.d.ts +0 -2
  749. package/build-types/higher-order/with-spoken-messages/test/index.d.ts.map +0 -1
  750. package/build-types/icon/stories/index.story.d.ts +0 -21
  751. package/build-types/icon/stories/index.story.d.ts.map +0 -1
  752. package/build-types/icon/test/index.d.ts +0 -2
  753. package/build-types/icon/test/index.d.ts.map +0 -1
  754. package/build-types/input-control/stories/index.story.d.ts +0 -31
  755. package/build-types/input-control/stories/index.story.d.ts.map +0 -1
  756. package/build-types/isolated-event-container/test/index.d.ts +0 -2
  757. package/build-types/isolated-event-container/test/index.d.ts.map +0 -1
  758. package/build-types/item-group/stories/index.story.d.ts +0 -9
  759. package/build-types/item-group/stories/index.story.d.ts.map +0 -1
  760. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +0 -6
  761. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +0 -1
  762. package/build-types/keyboard-shortcuts/test/index.d.ts +0 -2
  763. package/build-types/keyboard-shortcuts/test/index.d.ts.map +0 -1
  764. package/build-types/menu/stories/index.story.d.ts +0 -13
  765. package/build-types/menu/stories/index.story.d.ts.map +0 -1
  766. package/build-types/menu/test/index.d.ts +0 -2
  767. package/build-types/menu/test/index.d.ts.map +0 -1
  768. package/build-types/menu-group/stories/index.story.d.ts +0 -11
  769. package/build-types/menu-group/stories/index.story.d.ts.map +0 -1
  770. package/build-types/menu-group/test/index.d.ts +0 -2
  771. package/build-types/menu-group/test/index.d.ts.map +0 -1
  772. package/build-types/menu-item/stories/index.story.d.ts +0 -70
  773. package/build-types/menu-item/stories/index.story.d.ts.map +0 -1
  774. package/build-types/menu-items-choice/stories/index.story.d.ts +0 -6
  775. package/build-types/menu-items-choice/stories/index.story.d.ts.map +0 -1
  776. package/build-types/modal/stories/index.story.d.ts +0 -11
  777. package/build-types/modal/stories/index.story.d.ts.map +0 -1
  778. package/build-types/modal/test/aria-helper.d.ts +0 -2
  779. package/build-types/modal/test/aria-helper.d.ts.map +0 -1
  780. package/build-types/modal/test/index.d.ts +0 -2
  781. package/build-types/modal/test/index.d.ts.map +0 -1
  782. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +0 -6
  783. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +0 -1
  784. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +0 -6
  785. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +0 -1
  786. package/build-types/navigable-container/test/navigable-menu.d.ts +0 -2
  787. package/build-types/navigable-container/test/navigable-menu.d.ts.map +0 -1
  788. package/build-types/navigable-container/test/tababble-container.d.ts +0 -2
  789. package/build-types/navigable-container/test/tababble-container.d.ts.map +0 -1
  790. package/build-types/navigator/stories/index.story.d.ts +0 -8
  791. package/build-types/navigator/stories/index.story.d.ts.map +0 -1
  792. package/build-types/navigator/test/index.d.ts +0 -2
  793. package/build-types/navigator/test/index.d.ts.map +0 -1
  794. package/build-types/navigator/test/router.d.ts +0 -2
  795. package/build-types/navigator/test/router.d.ts.map +0 -1
  796. package/build-types/notice/stories/index.story.d.ts +0 -15
  797. package/build-types/notice/stories/index.story.d.ts.map +0 -1
  798. package/build-types/notice/test/index.d.ts +0 -2
  799. package/build-types/notice/test/index.d.ts.map +0 -1
  800. package/build-types/notice/test/list.d.ts +0 -2
  801. package/build-types/notice/test/list.d.ts.map +0 -1
  802. package/build-types/number-control/stories/index.story.d.ts +0 -19
  803. package/build-types/number-control/stories/index.story.d.ts.map +0 -1
  804. package/build-types/number-control/test/index.d.ts +0 -2
  805. package/build-types/number-control/test/index.d.ts.map +0 -1
  806. package/build-types/palette-edit/stories/index.story.d.ts +0 -7
  807. package/build-types/palette-edit/stories/index.story.d.ts.map +0 -1
  808. package/build-types/palette-edit/test/index.d.ts +0 -2
  809. package/build-types/palette-edit/test/index.d.ts.map +0 -1
  810. package/build-types/panel/stories/index.story.d.ts +0 -13
  811. package/build-types/panel/stories/index.story.d.ts.map +0 -1
  812. package/build-types/panel/test/body.d.ts +0 -2
  813. package/build-types/panel/test/body.d.ts.map +0 -1
  814. package/build-types/panel/test/header.d.ts +0 -2
  815. package/build-types/panel/test/header.d.ts.map +0 -1
  816. package/build-types/panel/test/index.d.ts +0 -2
  817. package/build-types/panel/test/index.d.ts.map +0 -1
  818. package/build-types/panel/test/row.d.ts +0 -2
  819. package/build-types/panel/test/row.d.ts.map +0 -1
  820. package/build-types/placeholder/stories/index.story.d.ts +0 -6
  821. package/build-types/placeholder/stories/index.story.d.ts.map +0 -1
  822. package/build-types/placeholder/test/index.d.ts +0 -2
  823. package/build-types/placeholder/test/index.d.ts.map +0 -1
  824. package/build-types/popover/stories/e2e/index.story.d.ts +0 -18
  825. package/build-types/popover/stories/e2e/index.story.d.ts.map +0 -1
  826. package/build-types/popover/stories/index.story.d.ts +0 -11
  827. package/build-types/popover/stories/index.story.d.ts.map +0 -1
  828. package/build-types/popover/test/index.d.ts +0 -2
  829. package/build-types/popover/test/index.d.ts.map +0 -1
  830. package/build-types/popover/test/utils/index.d.ts +0 -3
  831. package/build-types/popover/test/utils/index.d.ts.map +0 -1
  832. package/build-types/progress-bar/stories/index.story.d.ts +0 -23
  833. package/build-types/progress-bar/stories/index.story.d.ts.map +0 -1
  834. package/build-types/progress-bar/styles.d.ts +0 -16
  835. package/build-types/progress-bar/styles.d.ts.map +0 -1
  836. package/build-types/progress-bar/test/index.d.ts +0 -2
  837. package/build-types/progress-bar/test/index.d.ts.map +0 -1
  838. package/build-types/query-controls/stories/index.story.d.ts +0 -7
  839. package/build-types/query-controls/stories/index.story.d.ts.map +0 -1
  840. package/build-types/query-controls/test/terms.d.ts +0 -2
  841. package/build-types/query-controls/test/terms.d.ts.map +0 -1
  842. package/build-types/radio-control/stories/index.story.d.ts +0 -7
  843. package/build-types/radio-control/stories/index.story.d.ts.map +0 -1
  844. package/build-types/radio-control/test/index.d.ts +0 -2
  845. package/build-types/radio-control/test/index.d.ts.map +0 -1
  846. package/build-types/radio-group/stories/index.story.d.ts +0 -8
  847. package/build-types/radio-group/stories/index.story.d.ts.map +0 -1
  848. package/build-types/range-control/stories/index.story.d.ts +0 -42
  849. package/build-types/range-control/stories/index.story.d.ts.map +0 -1
  850. package/build-types/range-control/test/index.d.ts +0 -2
  851. package/build-types/range-control/test/index.d.ts.map +0 -1
  852. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +0 -18
  853. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +0 -1
  854. package/build-types/resizable-box/stories/index.story.d.ts +0 -46
  855. package/build-types/resizable-box/stories/index.story.d.ts.map +0 -1
  856. package/build-types/responsive-wrapper/stories/index.story.d.ts +0 -16
  857. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +0 -1
  858. package/build-types/sandbox/stories/index.story.d.ts +0 -7
  859. package/build-types/sandbox/stories/index.story.d.ts.map +0 -1
  860. package/build-types/sandbox/test/index.d.ts +0 -2
  861. package/build-types/sandbox/test/index.d.ts.map +0 -1
  862. package/build-types/scroll-lock/stories/index.story.d.ts +0 -6
  863. package/build-types/scroll-lock/stories/index.story.d.ts.map +0 -1
  864. package/build-types/scroll-lock/test/index.d.ts +0 -2
  865. package/build-types/scroll-lock/test/index.d.ts.map +0 -1
  866. package/build-types/scrollable/stories/index.story.d.ts +0 -6
  867. package/build-types/scrollable/stories/index.story.d.ts.map +0 -1
  868. package/build-types/scrollable/styles.d.ts +0 -8
  869. package/build-types/scrollable/styles.d.ts.map +0 -1
  870. package/build-types/scrollable/test/index.d.ts +0 -2
  871. package/build-types/scrollable/test/index.d.ts.map +0 -1
  872. package/build-types/search-control/stories/index.story.d.ts +0 -18
  873. package/build-types/search-control/stories/index.story.d.ts.map +0 -1
  874. package/build-types/search-control/test/index.d.ts +0 -2
  875. package/build-types/search-control/test/index.d.ts.map +0 -1
  876. package/build-types/select-control/stories/index.story.d.ts +0 -28
  877. package/build-types/select-control/stories/index.story.d.ts.map +0 -1
  878. package/build-types/select-control/test/select-control.d.ts +0 -2
  879. package/build-types/select-control/test/select-control.d.ts.map +0 -1
  880. package/build-types/shortcut/stories/index.story.d.ts +0 -7
  881. package/build-types/shortcut/stories/index.story.d.ts.map +0 -1
  882. package/build-types/shortcut/test/index.d.ts +0 -2
  883. package/build-types/shortcut/test/index.d.ts.map +0 -1
  884. package/build-types/slot-fill/stories/index.story.d.ts +0 -10
  885. package/build-types/slot-fill/stories/index.story.d.ts.map +0 -1
  886. package/build-types/snackbar/stories/index.story.d.ts +0 -10
  887. package/build-types/snackbar/stories/index.story.d.ts.map +0 -1
  888. package/build-types/snackbar/stories/list.story.d.ts +0 -6
  889. package/build-types/snackbar/stories/list.story.d.ts.map +0 -1
  890. package/build-types/snackbar/test/index.d.ts +0 -2
  891. package/build-types/snackbar/test/index.d.ts.map +0 -1
  892. package/build-types/snackbar/test/list.d.ts +0 -2
  893. package/build-types/snackbar/test/list.d.ts.map +0 -1
  894. package/build-types/spacer/stories/index.story.d.ts +0 -7
  895. package/build-types/spacer/stories/index.story.d.ts.map +0 -1
  896. package/build-types/spacer/test/index.d.ts +0 -2
  897. package/build-types/spacer/test/index.d.ts.map +0 -1
  898. package/build-types/spinner/stories/index.story.d.ts +0 -7
  899. package/build-types/spinner/stories/index.story.d.ts.map +0 -1
  900. package/build-types/style-provider/test/index.d.ts +0 -2
  901. package/build-types/style-provider/test/index.d.ts.map +0 -1
  902. package/build-types/surface/stories/index.story.d.ts +0 -6
  903. package/build-types/surface/stories/index.story.d.ts.map +0 -1
  904. package/build-types/surface/test/index.d.ts +0 -2
  905. package/build-types/surface/test/index.d.ts.map +0 -1
  906. package/build-types/tab-panel/stories/index.story.d.ts +0 -9
  907. package/build-types/tab-panel/stories/index.story.d.ts.map +0 -1
  908. package/build-types/tab-panel/test/index.d.ts +0 -2
  909. package/build-types/tab-panel/test/index.d.ts.map +0 -1
  910. package/build-types/tabs/stories/index.story.d.ts +0 -13
  911. package/build-types/tabs/stories/index.story.d.ts.map +0 -1
  912. package/build-types/tabs/test/index.d.ts +0 -2
  913. package/build-types/tabs/test/index.d.ts.map +0 -1
  914. package/build-types/text/stories/index.story.d.ts +0 -14
  915. package/build-types/text/stories/index.story.d.ts.map +0 -1
  916. package/build-types/text/test/index.d.ts +0 -2
  917. package/build-types/text/test/index.d.ts.map +0 -1
  918. package/build-types/text-control/stories/index.story.d.ts +0 -7
  919. package/build-types/text-control/stories/index.story.d.ts.map +0 -1
  920. package/build-types/text-control/test/text-control.d.ts +0 -2
  921. package/build-types/text-control/test/text-control.d.ts.map +0 -1
  922. package/build-types/text-highlight/stories/index.story.d.ts +0 -6
  923. package/build-types/text-highlight/stories/index.story.d.ts.map +0 -1
  924. package/build-types/text-highlight/test/index.d.ts +0 -2
  925. package/build-types/text-highlight/test/index.d.ts.map +0 -1
  926. package/build-types/textarea-control/stories/index.story.d.ts +0 -6
  927. package/build-types/textarea-control/stories/index.story.d.ts.map +0 -1
  928. package/build-types/textarea-control/styles/textarea-control-styles.d.ts +0 -5
  929. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +0 -1
  930. package/build-types/tip/stories/index.story.d.ts +0 -6
  931. package/build-types/tip/stories/index.story.d.ts.map +0 -1
  932. package/build-types/toggle-control/stories/index.story.d.ts +0 -13
  933. package/build-types/toggle-control/stories/index.story.d.ts.map +0 -1
  934. package/build-types/toggle-control/test/index.d.ts +0 -2
  935. package/build-types/toggle-control/test/index.d.ts.map +0 -1
  936. package/build-types/toggle-group-control/stories/index.story.d.ts +0 -21
  937. package/build-types/toggle-group-control/stories/index.story.d.ts.map +0 -1
  938. package/build-types/toggle-group-control/test/index.d.ts +0 -2
  939. package/build-types/toggle-group-control/test/index.d.ts.map +0 -1
  940. package/build-types/toolbar/stories/index.story.d.ts +0 -12
  941. package/build-types/toolbar/stories/index.story.d.ts.map +0 -1
  942. package/build-types/toolbar/test/index.d.ts +0 -2
  943. package/build-types/toolbar/test/index.d.ts.map +0 -1
  944. package/build-types/toolbar/test/toolbar-group.d.ts +0 -2
  945. package/build-types/toolbar/test/toolbar-group.d.ts.map +0 -1
  946. package/build-types/tools-panel/stories/index.story.d.ts +0 -11
  947. package/build-types/tools-panel/stories/index.story.d.ts.map +0 -1
  948. package/build-types/tools-panel/test/index.d.ts +0 -2
  949. package/build-types/tools-panel/test/index.d.ts.map +0 -1
  950. package/build-types/tooltip/stories/index.story.d.ts +0 -15
  951. package/build-types/tooltip/stories/index.story.d.ts.map +0 -1
  952. package/build-types/tooltip/test/index.d.ts +0 -2
  953. package/build-types/tooltip/test/index.d.ts.map +0 -1
  954. package/build-types/tooltip/test/utils/index.d.ts +0 -7
  955. package/build-types/tooltip/test/utils/index.d.ts.map +0 -1
  956. package/build-types/tree-grid/stories/index.story.d.ts +0 -6
  957. package/build-types/tree-grid/stories/index.story.d.ts.map +0 -1
  958. package/build-types/tree-grid/test/cell.d.ts +0 -2
  959. package/build-types/tree-grid/test/cell.d.ts.map +0 -1
  960. package/build-types/tree-grid/test/index.d.ts +0 -2
  961. package/build-types/tree-grid/test/index.d.ts.map +0 -1
  962. package/build-types/tree-grid/test/roving-tab-index-item.d.ts +0 -2
  963. package/build-types/tree-grid/test/roving-tab-index-item.d.ts.map +0 -1
  964. package/build-types/tree-grid/test/roving-tab-index.d.ts +0 -2
  965. package/build-types/tree-grid/test/roving-tab-index.d.ts.map +0 -1
  966. package/build-types/tree-grid/test/row.d.ts +0 -2
  967. package/build-types/tree-grid/test/row.d.ts.map +0 -1
  968. package/build-types/tree-select/stories/index.story.d.ts +0 -6
  969. package/build-types/tree-select/stories/index.story.d.ts.map +0 -1
  970. package/build-types/truncate/stories/index.story.d.ts +0 -7
  971. package/build-types/truncate/stories/index.story.d.ts.map +0 -1
  972. package/build-types/truncate/test/index.d.ts +0 -2
  973. package/build-types/truncate/test/index.d.ts.map +0 -1
  974. package/build-types/unit-control/stories/index.story.d.ts +0 -27
  975. package/build-types/unit-control/stories/index.story.d.ts.map +0 -1
  976. package/build-types/unit-control/test/index.d.ts +0 -2
  977. package/build-types/unit-control/test/index.d.ts.map +0 -1
  978. package/build-types/unit-control/test/utils.d.ts +0 -2
  979. package/build-types/unit-control/test/utils.d.ts.map +0 -1
  980. package/build-types/utils/test/polymorphic-element.d.ts +0 -2
  981. package/build-types/utils/test/polymorphic-element.d.ts.map +0 -1
  982. package/build-types/v-stack/stories/e2e/index.story.d.ts +0 -6
  983. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +0 -1
  984. package/build-types/v-stack/stories/index.story.d.ts +0 -11
  985. package/build-types/v-stack/stories/index.story.d.ts.map +0 -1
  986. package/build-types/v-stack/test/index.d.ts +0 -2
  987. package/build-types/v-stack/test/index.d.ts.map +0 -1
  988. package/build-types/validated-form-controls/components/combobox-control.d.ts +0 -20
  989. package/build-types/validated-form-controls/components/combobox-control.d.ts.map +0 -1
  990. package/build-types/validated-form-controls/components/form-token-field.d.ts +0 -3
  991. package/build-types/validated-form-controls/components/form-token-field.d.ts.map +0 -1
  992. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +0 -6
  993. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +0 -1
  994. package/build-types/validated-form-controls/components/stories/content-editable-control.story.d.ts +0 -6
  995. package/build-types/validated-form-controls/components/stories/content-editable-control.story.d.ts.map +0 -1
  996. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +0 -6
  997. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +0 -1
  998. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +0 -9
  999. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +0 -1
  1000. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +0 -12
  1001. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +0 -1
  1002. package/build-types/validated-form-controls/components/stories/overview.story.d.ts +0 -60
  1003. package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +0 -1
  1004. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +0 -6
  1005. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +0 -1
  1006. package/build-types/validated-form-controls/components/stories/story-utils.d.ts +0 -3
  1007. package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +0 -1
  1008. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +0 -6
  1009. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +0 -1
  1010. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +0 -6
  1011. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +0 -1
  1012. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +0 -6
  1013. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +0 -1
  1014. package/build-types/validated-form-controls/components/toggle-control.d.ts +0 -7
  1015. package/build-types/validated-form-controls/components/toggle-control.d.ts.map +0 -1
  1016. package/build-types/validated-form-controls/components/toggle-group-control.d.ts +0 -15
  1017. package/build-types/validated-form-controls/components/toggle-group-control.d.ts.map +0 -1
  1018. package/build-types/validated-form-controls/control-with-error.d.ts +0 -36
  1019. package/build-types/validated-form-controls/control-with-error.d.ts.map +0 -1
  1020. package/build-types/validated-form-controls/test/combobox-control.d.ts +0 -2
  1021. package/build-types/validated-form-controls/test/combobox-control.d.ts.map +0 -1
  1022. package/build-types/validated-form-controls/test/content-editable-control.d.ts +0 -2
  1023. package/build-types/validated-form-controls/test/content-editable-control.d.ts.map +0 -1
  1024. package/build-types/validated-form-controls/test/control-with-error.d.ts +0 -2
  1025. package/build-types/validated-form-controls/test/control-with-error.d.ts.map +0 -1
  1026. package/build-types/validated-form-controls/test/custom-select-control.d.ts +0 -2
  1027. package/build-types/validated-form-controls/test/custom-select-control.d.ts.map +0 -1
  1028. package/build-types/validated-form-controls/test/form-token-field.d.ts +0 -2
  1029. package/build-types/validated-form-controls/test/form-token-field.d.ts.map +0 -1
  1030. package/build-types/validated-form-controls/test/input-control.d.ts +0 -2
  1031. package/build-types/validated-form-controls/test/input-control.d.ts.map +0 -1
  1032. package/build-types/validated-form-controls/test/range-control.d.ts +0 -2
  1033. package/build-types/validated-form-controls/test/range-control.d.ts.map +0 -1
  1034. package/build-types/validated-form-controls/test/textarea-control.d.ts +0 -2
  1035. package/build-types/validated-form-controls/test/textarea-control.d.ts.map +0 -1
  1036. package/build-types/validated-form-controls/test/toggle-control.d.ts +0 -2
  1037. package/build-types/validated-form-controls/test/toggle-control.d.ts.map +0 -1
  1038. package/build-types/validated-form-controls/test/toggle-group-control.d.ts +0 -2
  1039. package/build-types/validated-form-controls/test/toggle-group-control.d.ts.map +0 -1
  1040. package/build-types/validated-form-controls/validity-indicator.d.ts +0 -6
  1041. package/build-types/validated-form-controls/validity-indicator.d.ts.map +0 -1
  1042. package/build-types/view/stories/index.story.d.ts +0 -6
  1043. package/build-types/view/stories/index.story.d.ts.map +0 -1
  1044. package/build-types/visually-hidden/stories/index.story.d.ts +0 -8
  1045. package/build-types/visually-hidden/stories/index.story.d.ts.map +0 -1
  1046. package/build-types/z-stack/stories/index.story.d.ts +0 -6
  1047. package/build-types/z-stack/stories/index.story.d.ts.map +0 -1
  1048. package/build-types/z-stack/styles.d.ts +0 -14
  1049. package/build-types/z-stack/styles.d.ts.map +0 -1
  1050. package/src/base-control/styles/base-control-styles.ts +0 -46
  1051. package/src/border-box-control/styles.ts +0 -71
  1052. package/src/border-control/styles.ts +0 -151
  1053. package/src/box-control/styles/box-control-styles.ts +0 -34
  1054. package/src/color-palette/styles.ts +0 -13
  1055. package/src/combobox-control/styles.ts +0 -9
  1056. package/src/dropdown/styles.ts +0 -33
  1057. package/src/progress-bar/styles.ts +0 -84
  1058. package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +0 -47
  1059. package/src/scrollable/styles.ts +0 -57
  1060. package/src/scrollable/test/__snapshots__/index.tsx.snap +0 -66
  1061. package/src/textarea-control/styles/textarea-control-styles.ts +0 -90
  1062. package/src/validated-form-controls/components/combobox-control.tsx +0 -56
  1063. package/src/validated-form-controls/components/form-token-field.tsx +0 -57
  1064. package/src/validated-form-controls/components/stories/combobox-control.story.tsx +0 -56
  1065. package/src/validated-form-controls/components/stories/form-token-field.story.tsx +0 -60
  1066. package/src/validated-form-controls/components/stories/input-control.story.tsx +0 -126
  1067. package/src/validated-form-controls/components/stories/overview.story.tsx +0 -560
  1068. package/src/validated-form-controls/components/stories/textarea-control.story.tsx +0 -50
  1069. package/src/validated-form-controls/components/stories/toggle-control.story.tsx +0 -47
  1070. package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +0 -58
  1071. package/src/validated-form-controls/components/toggle-control.tsx +0 -40
  1072. package/src/validated-form-controls/components/toggle-group-control.tsx +0 -55
  1073. package/src/validated-form-controls/control-with-error.tsx +0 -321
  1074. package/src/validated-form-controls/test/combobox-control.tsx +0 -61
  1075. package/src/validated-form-controls/test/control-with-error.tsx +0 -577
  1076. package/src/validated-form-controls/test/form-token-field.tsx +0 -52
  1077. package/src/validated-form-controls/test/toggle-control.tsx +0 -49
  1078. package/src/validated-form-controls/test/toggle-group-control.tsx +0 -28
  1079. package/src/validated-form-controls/validity-indicator.tsx +0 -40
  1080. package/src/z-stack/styles.ts +0 -35
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/circular-option-picker/index.tsx"],
4
- "sourcesContent": ["import CircularOptionPicker from './circular-option-picker';\nexport { Option } from './circular-option-picker-option';\nexport { OptionGroup } from './circular-option-picker-option-group';\nexport { ButtonAction, DropdownLinkAction } from './circular-option-picker-actions';\nexport { getComputeCircularOptionPickerCommonProps } from './utils';\nexport default CircularOptionPicker;"],
5
- "mappings": ";AAAA,OAAO,0BAA0B;AACjC,SAAS,cAAc;AACvB,SAAS,mBAAmB;AAC5B,SAAS,cAAc,0BAA0B;AACjD,SAAS,iDAAiD;AAC1D,IAAO,iCAAQ;",
4
+ "sourcesContent": ["import CircularOptionPicker from './circular-option-picker';\nexport { Option } from './circular-option-picker-option';\nexport { OptionGroup } from './circular-option-picker-option-group';\nexport { ButtonAction, DropdownLinkAction } from './circular-option-picker-actions';\nexport { getComputeCircularOptionPickerCommonProps, resolveCircularOptionPickerPresentation, warnIfCircularOptionPickerAsButtonsIsSet } from './utils';\nexport default CircularOptionPicker;"],
5
+ "mappings": ";AAAA,OAAO,0BAA0B;AACjC,SAAS,cAAc;AACvB,SAAS,mBAAmB;AAC5B,SAAS,cAAc,0BAA0B;AACjD,SAAS,2CAA2C,yCAAyC,gDAAgD;AAC7I,IAAO,iCAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,26 @@
1
1
  // packages/components/src/circular-option-picker/utils.tsx
2
2
  import { __ } from "@wordpress/i18n";
3
- function getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby) {
4
- const metaProps = asButtons ? {
5
- asButtons: true
6
- } : {
7
- asButtons: false,
3
+ import deprecated from "@wordpress/deprecated";
4
+ function warnIfCircularOptionPickerAsButtonsIsSet(componentName, asButtons) {
5
+ if (asButtons === void 0) {
6
+ return;
7
+ }
8
+ deprecated(`\`asButtons\` prop in wp.components.${componentName}`, {
9
+ since: "7.2",
10
+ alternative: "`presentation`",
11
+ hint: '`asButtons={ true }` maps to `presentation="toggle-buttons"`. Explicit `presentation` takes precedence.'
12
+ });
13
+ }
14
+ function resolveCircularOptionPickerPresentation(presentation, asButtons) {
15
+ return presentation ?? (asButtons ? "toggle-buttons" : "listbox");
16
+ }
17
+ function getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby, presentation) {
18
+ const resolvedPresentation = resolveCircularOptionPickerPresentation(presentation, asButtons);
19
+ const metaProps = resolvedPresentation === "listbox" ? {
20
+ presentation: "listbox",
8
21
  loop
22
+ } : {
23
+ presentation: resolvedPresentation
9
24
  };
10
25
  const labelProps = {
11
26
  "aria-labelledby": ariaLabelledby,
@@ -13,10 +28,13 @@ function getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, a
13
28
  };
14
29
  return {
15
30
  metaProps,
16
- labelProps
31
+ labelProps,
32
+ resolvedPresentation
17
33
  };
18
34
  }
19
35
  export {
20
- getComputeCircularOptionPickerCommonProps
36
+ getComputeCircularOptionPickerCommonProps,
37
+ resolveCircularOptionPickerPresentation,
38
+ warnIfCircularOptionPickerAsButtonsIsSet
21
39
  };
22
40
  //# sourceMappingURL=utils.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/circular-option-picker/utils.tsx"],
4
- "sourcesContent": ["import { __ } from '@wordpress/i18n';\n\n/**\n * Computes the common props for the CircularOptionPicker.\n */\nexport function getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby) {\n const metaProps = asButtons ? {\n asButtons: true\n } : {\n asButtons: false,\n loop\n };\n const labelProps = {\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabelledby ? undefined : ariaLabel || __('Custom color picker')\n };\n return {\n metaProps,\n labelProps\n };\n}"],
5
- "mappings": ";AAAA,SAAS,UAAU;AAKZ,SAAS,0CAA0C,WAAW,MAAM,WAAW,gBAAgB;AACpG,QAAM,YAAY,YAAY;AAAA,IAC5B,WAAW;AAAA,EACb,IAAI;AAAA,IACF,WAAW;AAAA,IACX;AAAA,EACF;AACA,QAAM,aAAa;AAAA,IACjB,mBAAmB;AAAA,IACnB,cAAc,iBAAiB,SAAY,aAAa,GAAG,qBAAqB;AAAA,EAClF;AACA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport deprecated from '@wordpress/deprecated';\nexport function warnIfCircularOptionPickerAsButtonsIsSet(componentName, asButtons) {\n if (asButtons === undefined) {\n return;\n }\n deprecated(`\\`asButtons\\` prop in wp.components.${componentName}`, {\n since: '7.2',\n alternative: '`presentation`',\n hint: '`asButtons={ true }` maps to `presentation=\"toggle-buttons\"`. Explicit `presentation` takes precedence.'\n });\n}\nexport function resolveCircularOptionPickerPresentation(presentation, asButtons) {\n return presentation ?? (asButtons ? 'toggle-buttons' : 'listbox');\n}\n\n/**\n * Computes the common props for the CircularOptionPicker.\n */\nexport function getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby, presentation) {\n const resolvedPresentation = resolveCircularOptionPickerPresentation(presentation, asButtons);\n const metaProps = resolvedPresentation === 'listbox' ? {\n presentation: 'listbox',\n loop\n } : {\n presentation: resolvedPresentation\n };\n const labelProps = {\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabelledby ? undefined : ariaLabel || __('Custom color picker')\n };\n return {\n metaProps,\n labelProps,\n resolvedPresentation\n };\n}"],
5
+ "mappings": ";AAAA,SAAS,UAAU;AACnB,OAAO,gBAAgB;AAChB,SAAS,yCAAyC,eAAe,WAAW;AACjF,MAAI,cAAc,QAAW;AAC3B;AAAA,EACF;AACA,aAAW,uCAAuC,aAAa,IAAI;AAAA,IACjE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,EACR,CAAC;AACH;AACO,SAAS,wCAAwC,cAAc,WAAW;AAC/E,SAAO,iBAAiB,YAAY,mBAAmB;AACzD;AAKO,SAAS,0CAA0C,WAAW,MAAM,WAAW,gBAAgB,cAAc;AAClH,QAAM,uBAAuB,wCAAwC,cAAc,SAAS;AAC5F,QAAM,YAAY,yBAAyB,YAAY;AAAA,IACrD,cAAc;AAAA,IACd;AAAA,EACF,IAAI;AAAA,IACF,cAAc;AAAA,EAChB;AACA,QAAM,aAAa;AAAA,IACjB,mBAAmB;AAAA,IACnB,cAAc,iBAAiB,SAAY,aAAa,GAAG,qBAAqB;AAAA,EAClF;AACA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -8,11 +8,96 @@ import { __, sprintf } from "@wordpress/i18n";
8
8
  import { useCallback, useMemo, useState, forwardRef } from "@wordpress/element";
9
9
  import Dropdown from "../dropdown/index.mjs";
10
10
  import { ColorPicker } from "../color-picker/index.mjs";
11
- import CircularOptionPicker, { getComputeCircularOptionPickerCommonProps } from "../circular-option-picker/index.mjs";
11
+ import CircularOptionPicker, { getComputeCircularOptionPickerCommonProps, warnIfCircularOptionPickerAsButtonsIsSet } from "../circular-option-picker/index.mjs";
12
12
  import { VStack } from "../v-stack/index.mjs";
13
13
  import { Truncate } from "../truncate/index.mjs";
14
- import { ColorHeading } from "./styles.mjs";
14
+ import { Heading } from "../heading/index.mjs";
15
15
  import DropdownContentWrapper from "../dropdown/dropdown-content-wrapper.mjs";
16
+
17
+ // packages/style-runtime/src/index.ts
18
+ var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
19
+ function getRuntime() {
20
+ const globalScope = globalThis;
21
+ if (globalScope.__wpStyleRuntime) {
22
+ return globalScope.__wpStyleRuntime;
23
+ }
24
+ globalScope.__wpStyleRuntime = {
25
+ documents: /* @__PURE__ */ new Map(),
26
+ styles: /* @__PURE__ */ new Map(),
27
+ injectedStyles: /* @__PURE__ */ new WeakMap()
28
+ };
29
+ if (typeof document !== "undefined") {
30
+ registerDocument(document);
31
+ }
32
+ return globalScope.__wpStyleRuntime;
33
+ }
34
+ function documentContainsStyleHash(targetDocument, hash) {
35
+ if (!targetDocument.head) {
36
+ return false;
37
+ }
38
+ for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {
39
+ if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
40
+ return true;
41
+ }
42
+ }
43
+ return false;
44
+ }
45
+ function injectStyle(targetDocument, hash, css) {
46
+ if (!targetDocument.head) {
47
+ return;
48
+ }
49
+ const runtime = getRuntime();
50
+ let injectedStyles = runtime.injectedStyles.get(targetDocument);
51
+ if (!injectedStyles) {
52
+ injectedStyles = /* @__PURE__ */ new Set();
53
+ runtime.injectedStyles.set(targetDocument, injectedStyles);
54
+ }
55
+ if (injectedStyles.has(hash)) {
56
+ return;
57
+ }
58
+ if (documentContainsStyleHash(targetDocument, hash)) {
59
+ injectedStyles.add(hash);
60
+ return;
61
+ }
62
+ const style = targetDocument.createElement("style");
63
+ style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
64
+ style.appendChild(targetDocument.createTextNode(css));
65
+ targetDocument.head.appendChild(style);
66
+ injectedStyles.add(hash);
67
+ }
68
+ function registerDocument(targetDocument) {
69
+ const runtime = getRuntime();
70
+ runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
71
+ for (const [hash, css] of runtime.styles) {
72
+ injectStyle(targetDocument, hash, css);
73
+ }
74
+ return () => {
75
+ const count = runtime.documents.get(targetDocument);
76
+ if (count === void 0) {
77
+ return;
78
+ }
79
+ if (count <= 1) {
80
+ runtime.documents.delete(targetDocument);
81
+ return;
82
+ }
83
+ runtime.documents.set(targetDocument, count - 1);
84
+ };
85
+ }
86
+ function registerStyle(hash, css) {
87
+ const runtime = getRuntime();
88
+ runtime.styles.set(hash, css);
89
+ for (const targetDocument of runtime.documents.keys()) {
90
+ injectStyle(targetDocument, hash, css);
91
+ }
92
+ }
93
+
94
+ // packages/components/src/color-palette/style.module.scss
95
+ if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
96
+ registerStyle("a7b05d56c7", ".cf6db1948d5273a8__color-heading{text-transform:uppercase}.cf6db1948d5273a8__color-heading.cf6db1948d5273a8__color-heading.cf6db1948d5273a8__color-heading{font-size:11px;line-height:24px;margin-bottom:0}");
97
+ }
98
+ var style_module_default = { "color-heading": "cf6db1948d5273a8__color-heading" };
99
+
100
+ // packages/components/src/color-palette/index.tsx
16
101
  import { extractColorNameFromCurrentValue, isMultiplePaletteArray, normalizeColorValue } from "./utils.mjs";
17
102
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
103
  extend([namesPlugin, a11yPlugin]);
@@ -23,6 +108,7 @@ function SinglePalette({
23
108
  onChange,
24
109
  value,
25
110
  selectedSlug,
111
+ presentation,
26
112
  ...additionalProps
27
113
  }) {
28
114
  const colorOptions = useMemo(() => {
@@ -32,7 +118,7 @@ function SinglePalette({
32
118
  slug
33
119
  }, index) => {
34
120
  const colordColor = colord(color);
35
- const isSelected = selectedSlug ? slug === selectedSlug : value === color;
121
+ const isSelected = presentation !== "command-buttons" && (selectedSlug ? slug === selectedSlug : value === color);
36
122
  return /* @__PURE__ */ _jsx(CircularOptionPicker.Option, {
37
123
  isSelected,
38
124
  selectedIconProps: isSelected ? {
@@ -47,7 +133,7 @@ function SinglePalette({
47
133
  onClick: isSelected ? clearColor : () => onChange(color, index, slug)
48
134
  }, slug ?? `${color}-${index}`);
49
135
  });
50
- }, [colors, value, selectedSlug, onChange, clearColor]);
136
+ }, [colors, value, selectedSlug, onChange, clearColor, presentation]);
51
137
  return /* @__PURE__ */ _jsx(CircularOptionPicker.OptionGroup, {
52
138
  className,
53
139
  options: colorOptions,
@@ -61,7 +147,8 @@ function MultiplePalettes({
61
147
  onChange,
62
148
  value,
63
149
  selectedSlug,
64
- headingLevel
150
+ headingLevel,
151
+ presentation
65
152
  }) {
66
153
  const instanceId = useInstanceId(MultiplePalettes, "color-palette");
67
154
  if (colors.length === 0) {
@@ -77,7 +164,8 @@ function MultiplePalettes({
77
164
  const id = `${instanceId}-${index}`;
78
165
  return /* @__PURE__ */ _jsxs(VStack, {
79
166
  spacing: 2,
80
- children: [/* @__PURE__ */ _jsx(ColorHeading, {
167
+ children: [/* @__PURE__ */ _jsx(Heading, {
168
+ className: style_module_default["color-heading"],
81
169
  id,
82
170
  level: headingLevel,
83
171
  children: name
@@ -87,6 +175,7 @@ function MultiplePalettes({
87
175
  onChange: (newColor, _colorIndex, slug) => onChange(newColor, index, slug),
88
176
  value,
89
177
  selectedSlug,
178
+ presentation,
90
179
  "aria-labelledby": id
91
180
  })]
92
181
  }, index);
@@ -125,6 +214,7 @@ function CustomColorPickerDropdown({
125
214
  function UnforwardedColorPalette(props, forwardedRef) {
126
215
  const {
127
216
  asButtons,
217
+ presentation,
128
218
  loop,
129
219
  clearable = true,
130
220
  colors = [],
@@ -139,6 +229,7 @@ function UnforwardedColorPalette(props, forwardedRef) {
139
229
  "aria-labelledby": ariaLabelledby,
140
230
  ...additionalProps
141
231
  } = props;
232
+ warnIfCircularOptionPickerAsButtonsIsSet("ColorPalette", asButtons);
142
233
  const [normalizedColorValue, setNormalizedColorValue] = useState(value);
143
234
  const clearColor = useCallback(() => onChange(void 0), [onChange]);
144
235
  const customColorPaletteCallbackRef = useCallback((node) => {
@@ -162,11 +253,17 @@ function UnforwardedColorPalette(props, forwardedRef) {
162
253
  buttonLabelName,
163
254
  displayValue
164
255
  ) : __("Custom color picker");
256
+ const {
257
+ metaProps,
258
+ labelProps,
259
+ resolvedPresentation
260
+ } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby, presentation);
165
261
  const paletteCommonProps = {
166
262
  clearColor,
167
263
  onChange,
168
264
  value,
169
- selectedSlug
265
+ selectedSlug,
266
+ presentation: resolvedPresentation
170
267
  };
171
268
  const actions = !!clearable && /* @__PURE__ */ _jsx(CircularOptionPicker.ButtonAction, {
172
269
  onClick: clearColor,
@@ -174,10 +271,6 @@ function UnforwardedColorPalette(props, forwardedRef) {
174
271
  disabled: !value,
175
272
  children: __("Clear")
176
273
  });
177
- const {
178
- metaProps,
179
- labelProps
180
- } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);
181
274
  if (disableCustomColors && colors.length === 0 && !actions) {
182
275
  return null;
183
276
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/color-palette/index.tsx"],
4
- "sourcesContent": ["import { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\nimport clsx from 'clsx';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo, useState, forwardRef } from '@wordpress/element';\nimport Dropdown from '../dropdown';\nimport { ColorPicker } from '../color-picker';\nimport CircularOptionPicker, { getComputeCircularOptionPickerCommonProps } from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport { Truncate } from '../truncate';\nimport { ColorHeading } from './styles';\nimport DropdownContentWrapper from '../dropdown/dropdown-content-wrapper';\nimport { extractColorNameFromCurrentValue, isMultiplePaletteArray, normalizeColorValue } from './utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nextend([namesPlugin, a11yPlugin]);\nfunction SinglePalette({\n className,\n clearColor,\n colors,\n onChange,\n value,\n selectedSlug,\n ...additionalProps\n}) {\n const colorOptions = useMemo(() => {\n return colors.map(({\n color,\n name,\n slug\n }, index) => {\n const colordColor = colord(color);\n // When a non-empty selectedSlug is provided, selection is decided\n // strictly by slug — entries without a slug or with a different slug\n // are not selected, even when their color value matches `value`.\n // This correctly handles mixed palettes where some entries have slugs\n // and others don't. Fall back to color value matching otherwise\n // (including when selectedSlug is an empty string).\n const isSelected = selectedSlug ? slug === selectedSlug : value === color;\n return /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n isSelected: isSelected,\n selectedIconProps: isSelected ? {\n fill: colordColor.contrast() > colordColor.contrast('#000') ? '#fff' : '#000'\n } : {},\n tooltipText: name ||\n // translators: %s: color hex code e.g: \"#f00\".\n sprintf(__('Color code: %s'), color),\n style: {\n backgroundColor: color,\n color\n },\n onClick: isSelected ? clearColor : () => onChange(color, index, slug)\n }, slug ?? `${color}-${index}`);\n });\n }, [colors, value, selectedSlug, onChange, clearColor]);\n return /*#__PURE__*/_jsx(CircularOptionPicker.OptionGroup, {\n className: className,\n options: colorOptions,\n ...additionalProps\n });\n}\nfunction MultiplePalettes({\n className,\n clearColor,\n colors,\n onChange,\n value,\n selectedSlug,\n headingLevel\n}) {\n const instanceId = useInstanceId(MultiplePalettes, 'color-palette');\n if (colors.length === 0) {\n return null;\n }\n return /*#__PURE__*/_jsx(VStack, {\n spacing: 3,\n className: className,\n children: colors.map(({\n name,\n colors: colorPalette\n }, index) => {\n const id = `${instanceId}-${index}`;\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 2,\n children: [/*#__PURE__*/_jsx(ColorHeading, {\n id: id,\n level: headingLevel,\n children: name\n }), /*#__PURE__*/_jsx(SinglePalette, {\n clearColor: clearColor,\n colors: colorPalette,\n onChange: (newColor, _colorIndex, slug) => onChange(newColor, index, slug),\n value: value,\n selectedSlug: selectedSlug,\n \"aria-labelledby\": id\n })]\n }, index);\n })\n });\n}\nexport function CustomColorPickerDropdown({\n isRenderedInSidebar,\n popoverProps: receivedPopoverProps,\n ...props\n}) {\n const popoverProps = useMemo(() => ({\n shift: true,\n // Disabling resize as it would otherwise cause the popover to show\n // scrollbars while dragging the color picker's handle close to the\n // popover edge.\n resize: false,\n ...(isRenderedInSidebar ? {\n // When in the sidebar: open to the left (stacking),\n // leaving the same gap as the parent popover.\n placement: 'left-start',\n offset: 34\n } : {\n // Default behavior: open below the anchor\n placement: 'bottom',\n offset: 8\n }),\n ...receivedPopoverProps\n }), [isRenderedInSidebar, receivedPopoverProps]);\n return /*#__PURE__*/_jsx(Dropdown, {\n contentClassName: \"components-color-palette__custom-color-dropdown-content\",\n popoverProps: popoverProps,\n ...props\n });\n}\nfunction UnforwardedColorPalette(props, forwardedRef) {\n const {\n asButtons,\n loop,\n clearable = true,\n colors = [],\n disableCustomColors = false,\n enableAlpha = false,\n onChange,\n value,\n selectedSlug,\n __experimentalIsRenderedInSidebar = false,\n headingLevel = 2,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...additionalProps\n } = props;\n const [normalizedColorValue, setNormalizedColorValue] = useState(value);\n const clearColor = useCallback(() => onChange(undefined), [onChange]);\n const customColorPaletteCallbackRef = useCallback(node => {\n setNormalizedColorValue(normalizeColorValue(value, node));\n }, [value]);\n const hasMultipleColorOrigins = isMultiplePaletteArray(colors);\n const buttonLabelName = useMemo(() => extractColorNameFromCurrentValue(value, colors, hasMultipleColorOrigins, selectedSlug), [value, colors, hasMultipleColorOrigins, selectedSlug]);\n const renderCustomColorPicker = () => /*#__PURE__*/_jsx(DropdownContentWrapper, {\n paddingSize: \"none\",\n children: /*#__PURE__*/_jsx(ColorPicker, {\n color: normalizedColorValue,\n onChange: color => onChange(color),\n enableAlpha: enableAlpha\n })\n });\n const isHex = value?.startsWith('#');\n\n // Leave hex values as-is. Remove the `var()` wrapper from CSS vars.\n const displayValue = value?.replace(/^var\\((.+)\\)$/, '$1');\n const customColorAccessibleLabel = !!displayValue ? sprintf(\n // translators: 1: The name of the color e.g: \"vivid red\". 2: The color's hex code e.g: \"#f00\".\n __('Custom color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".'), buttonLabelName, displayValue) : __('Custom color picker');\n const paletteCommonProps = {\n clearColor,\n onChange,\n value,\n selectedSlug\n };\n const actions = !!clearable && /*#__PURE__*/_jsx(CircularOptionPicker.ButtonAction, {\n onClick: clearColor,\n accessibleWhenDisabled: true,\n disabled: !value,\n children: __('Clear')\n });\n const {\n metaProps,\n labelProps\n } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);\n\n // If disableCustomColors is true and colors.length is 0, return null to avoid rendering an empty palette wrapper.\n if (disableCustomColors && colors.length === 0 && !actions) {\n return null;\n }\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 3,\n ref: forwardedRef,\n ...additionalProps,\n children: [!disableCustomColors && /*#__PURE__*/_jsx(CustomColorPickerDropdown, {\n isRenderedInSidebar: __experimentalIsRenderedInSidebar,\n renderContent: renderCustomColorPicker,\n renderToggle: ({\n isOpen,\n onToggle\n }) => /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-wrapper\",\n spacing: 0,\n children: [/*#__PURE__*/_jsx(\"button\", {\n ref: customColorPaletteCallbackRef,\n className: \"components-color-palette__custom-color-button\",\n \"aria-expanded\": isOpen,\n \"aria-haspopup\": \"true\",\n onClick: onToggle,\n \"aria-label\": customColorAccessibleLabel,\n style: {\n background: value\n },\n type: \"button\"\n }), /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-text-wrapper\",\n spacing: 0.5,\n children: [/*#__PURE__*/_jsx(Truncate, {\n className: \"components-color-palette__custom-color-name\",\n children: value ? buttonLabelName : __('No color selected')\n }), /*#__PURE__*/_jsx(Truncate, {\n className: clsx('components-color-palette__custom-color-value', {\n 'components-color-palette__custom-color-value--is-hex': isHex\n }),\n children: displayValue\n })]\n })]\n })\n }), (colors.length > 0 || actions) && /*#__PURE__*/_jsx(CircularOptionPicker, {\n ...metaProps,\n ...labelProps,\n actions: actions,\n options: hasMultipleColorOrigins ? /*#__PURE__*/_jsx(MultiplePalettes, {\n ...paletteCommonProps,\n headingLevel: headingLevel,\n colors: colors,\n value: value\n }) : /*#__PURE__*/_jsx(SinglePalette, {\n ...paletteCommonProps,\n colors: colors,\n value: value\n })\n })]\n });\n}\n\n/**\n * Allows the user to pick a color from a list of pre-defined color entries.\n *\n * ```jsx\n * import { ColorPalette } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyColorPalette = () => {\n * const [ color, setColor ] = useState ( '#f00' )\n * const colors = [\n * { name: 'red', color: '#f00' },\n * { name: 'white', color: '#fff' },\n * { name: 'blue', color: '#00f' },\n * ];\n * return (\n * <ColorPalette\n * colors={ colors }\n * value={ color }\n * onChange={ ( color ) => setColor( color ) }\n * />\n * );\n * } );\n * ```\n */\nexport const ColorPalette = forwardRef(UnforwardedColorPalette);\nColorPalette.displayName = 'ColorPalette';\nexport default ColorPalette;"],
5
- "mappings": ";AAAA,SAAS,Q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B,qBAAK,sBAAsB;AAAA,MAC5E,GAAG;AAAA,MACH,GAAG;AAAA,MACH;AAAA,MACA,SAAS,0BAAuC,qBAAK,kBAAkB;AAAA,QACrE,GAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,IAAiB,qBAAK,eAAe;AAAA,QACpC,GAAG;AAAA,QACH;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AA0BO,IAAM,eAAe,WAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,wBAAQ;",
3
+ "sources": ["../../src/color-palette/index.tsx", "../../../style-runtime/src/index.ts", "../../src/color-palette/style.module.scss"],
4
+ "sourcesContent": ["import { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\nimport clsx from 'clsx';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo, useState, forwardRef } from '@wordpress/element';\nimport Dropdown from '../dropdown';\nimport { ColorPicker } from '../color-picker';\nimport CircularOptionPicker, { getComputeCircularOptionPickerCommonProps, warnIfCircularOptionPickerAsButtonsIsSet } from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport { Truncate } from '../truncate';\nimport { Heading } from '../heading';\nimport DropdownContentWrapper from '../dropdown/dropdown-content-wrapper';\nimport styles from './style.module.scss';\nimport { extractColorNameFromCurrentValue, isMultiplePaletteArray, normalizeColorValue } from './utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nextend([namesPlugin, a11yPlugin]);\nfunction SinglePalette({\n className,\n clearColor,\n colors,\n onChange,\n value,\n selectedSlug,\n presentation,\n ...additionalProps\n}) {\n const colorOptions = useMemo(() => {\n return colors.map(({\n color,\n name,\n slug\n }, index) => {\n const colordColor = colord(color);\n // When a non-empty selectedSlug is provided, selection is decided\n // strictly by slug — entries without a slug or with a different slug\n // are not selected, even when their color value matches `value`.\n // This correctly handles mixed palettes where some entries have slugs\n // and others don't. Fall back to color value matching otherwise\n // (including when selectedSlug is an empty string).\n const isSelected = presentation !== 'command-buttons' && (selectedSlug ? slug === selectedSlug : value === color);\n return /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n isSelected: isSelected,\n selectedIconProps: isSelected ? {\n fill: colordColor.contrast() > colordColor.contrast('#000') ? '#fff' : '#000'\n } : {},\n tooltipText: name ||\n // translators: %s: color hex code e.g: \"#f00\".\n sprintf(__('Color code: %s'), color),\n style: {\n backgroundColor: color,\n color\n },\n onClick: isSelected ? clearColor : () => onChange(color, index, slug)\n }, slug ?? `${color}-${index}`);\n });\n }, [colors, value, selectedSlug, onChange, clearColor, presentation]);\n return /*#__PURE__*/_jsx(CircularOptionPicker.OptionGroup, {\n className: className,\n options: colorOptions,\n ...additionalProps\n });\n}\nfunction MultiplePalettes({\n className,\n clearColor,\n colors,\n onChange,\n value,\n selectedSlug,\n headingLevel,\n presentation\n}) {\n const instanceId = useInstanceId(MultiplePalettes, 'color-palette');\n if (colors.length === 0) {\n return null;\n }\n return /*#__PURE__*/_jsx(VStack, {\n spacing: 3,\n className: className,\n children: colors.map(({\n name,\n colors: colorPalette\n }, index) => {\n const id = `${instanceId}-${index}`;\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 2,\n children: [/*#__PURE__*/_jsx(Heading, {\n className: styles['color-heading'],\n id: id,\n level: headingLevel,\n children: name\n }), /*#__PURE__*/_jsx(SinglePalette, {\n clearColor: clearColor,\n colors: colorPalette,\n onChange: (newColor, _colorIndex, slug) => onChange(newColor, index, slug),\n value: value,\n selectedSlug: selectedSlug,\n presentation: presentation,\n \"aria-labelledby\": id\n })]\n }, index);\n })\n });\n}\nexport function CustomColorPickerDropdown({\n isRenderedInSidebar,\n popoverProps: receivedPopoverProps,\n ...props\n}) {\n const popoverProps = useMemo(() => ({\n shift: true,\n // Disabling resize as it would otherwise cause the popover to show\n // scrollbars while dragging the color picker's handle close to the\n // popover edge.\n resize: false,\n ...(isRenderedInSidebar ? {\n // When in the sidebar: open to the left (stacking),\n // leaving the same gap as the parent popover.\n placement: 'left-start',\n offset: 34\n } : {\n // Default behavior: open below the anchor\n placement: 'bottom',\n offset: 8\n }),\n ...receivedPopoverProps\n }), [isRenderedInSidebar, receivedPopoverProps]);\n return /*#__PURE__*/_jsx(Dropdown, {\n contentClassName: \"components-color-palette__custom-color-dropdown-content\",\n popoverProps: popoverProps,\n ...props\n });\n}\nfunction UnforwardedColorPalette(props, forwardedRef) {\n const {\n asButtons,\n presentation,\n loop,\n clearable = true,\n colors = [],\n disableCustomColors = false,\n enableAlpha = false,\n onChange,\n value,\n selectedSlug,\n __experimentalIsRenderedInSidebar = false,\n headingLevel = 2,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...additionalProps\n } = props;\n warnIfCircularOptionPickerAsButtonsIsSet('ColorPalette', asButtons);\n const [normalizedColorValue, setNormalizedColorValue] = useState(value);\n const clearColor = useCallback(() => onChange(undefined), [onChange]);\n const customColorPaletteCallbackRef = useCallback(node => {\n setNormalizedColorValue(normalizeColorValue(value, node));\n }, [value]);\n const hasMultipleColorOrigins = isMultiplePaletteArray(colors);\n const buttonLabelName = useMemo(() => extractColorNameFromCurrentValue(value, colors, hasMultipleColorOrigins, selectedSlug), [value, colors, hasMultipleColorOrigins, selectedSlug]);\n const renderCustomColorPicker = () => /*#__PURE__*/_jsx(DropdownContentWrapper, {\n paddingSize: \"none\",\n children: /*#__PURE__*/_jsx(ColorPicker, {\n color: normalizedColorValue,\n onChange: color => onChange(color),\n enableAlpha: enableAlpha\n })\n });\n const isHex = value?.startsWith('#');\n\n // Leave hex values as-is. Remove the `var()` wrapper from CSS vars.\n const displayValue = value?.replace(/^var\\((.+)\\)$/, '$1');\n const customColorAccessibleLabel = !!displayValue ? sprintf(\n // translators: 1: The name of the color e.g: \"vivid red\". 2: The color's hex code e.g: \"#f00\".\n __('Custom color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".'), buttonLabelName, displayValue) : __('Custom color picker');\n const {\n metaProps,\n labelProps,\n resolvedPresentation\n } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby, presentation);\n const paletteCommonProps = {\n clearColor,\n onChange,\n value,\n selectedSlug,\n presentation: resolvedPresentation\n };\n const actions = !!clearable && /*#__PURE__*/_jsx(CircularOptionPicker.ButtonAction, {\n onClick: clearColor,\n accessibleWhenDisabled: true,\n disabled: !value,\n children: __('Clear')\n });\n\n // If disableCustomColors is true and colors.length is 0, return null to avoid rendering an empty palette wrapper.\n if (disableCustomColors && colors.length === 0 && !actions) {\n return null;\n }\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 3,\n ref: forwardedRef,\n ...additionalProps,\n children: [!disableCustomColors && /*#__PURE__*/_jsx(CustomColorPickerDropdown, {\n isRenderedInSidebar: __experimentalIsRenderedInSidebar,\n renderContent: renderCustomColorPicker,\n renderToggle: ({\n isOpen,\n onToggle\n }) => /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-wrapper\",\n spacing: 0,\n children: [/*#__PURE__*/_jsx(\"button\", {\n ref: customColorPaletteCallbackRef,\n className: \"components-color-palette__custom-color-button\",\n \"aria-expanded\": isOpen,\n \"aria-haspopup\": \"true\",\n onClick: onToggle,\n \"aria-label\": customColorAccessibleLabel,\n style: {\n background: value\n },\n type: \"button\"\n }), /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-text-wrapper\",\n spacing: 0.5,\n children: [/*#__PURE__*/_jsx(Truncate, {\n className: \"components-color-palette__custom-color-name\",\n children: value ? buttonLabelName : __('No color selected')\n }), /*#__PURE__*/_jsx(Truncate, {\n className: clsx('components-color-palette__custom-color-value', {\n 'components-color-palette__custom-color-value--is-hex': isHex\n }),\n children: displayValue\n })]\n })]\n })\n }), (colors.length > 0 || actions) && /*#__PURE__*/_jsx(CircularOptionPicker, {\n ...metaProps,\n ...labelProps,\n actions: actions,\n options: hasMultipleColorOrigins ? /*#__PURE__*/_jsx(MultiplePalettes, {\n ...paletteCommonProps,\n headingLevel: headingLevel,\n colors: colors,\n value: value\n }) : /*#__PURE__*/_jsx(SinglePalette, {\n ...paletteCommonProps,\n colors: colors,\n value: value\n })\n })]\n });\n}\n\n/**\n * Allows the user to pick a color from a list of pre-defined color entries.\n *\n * ```jsx\n * import { ColorPalette } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyColorPalette = () => {\n * const [ color, setColor ] = useState ( '#f00' )\n * const colors = [\n * { name: 'red', color: '#f00' },\n * { name: 'white', color: '#fff' },\n * { name: 'blue', color: '#00f' },\n * ];\n * return (\n * <ColorPalette\n * colors={ colors }\n * value={ color }\n * onChange={ ( color ) => setColor( color ) }\n * />\n * );\n * } );\n * ```\n */\nexport const ColorPalette = forwardRef(UnforwardedColorPalette);\nColorPalette.displayName = 'ColorPalette';\nexport default ColorPalette;", "const STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n const globalScope = globalThis;\n if (globalScope.__wpStyleRuntime) {\n return globalScope.__wpStyleRuntime;\n }\n globalScope.__wpStyleRuntime = {\n documents: new Map(),\n styles: new Map(),\n injectedStyles: new WeakMap()\n };\n if (typeof document !== 'undefined') {\n registerDocument(document);\n }\n return globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(targetDocument, hash) {\n if (!targetDocument.head) {\n return false;\n }\n for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {\n if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle(targetDocument, hash, css) {\n if (!targetDocument.head) {\n return;\n }\n const runtime = getRuntime();\n let injectedStyles = runtime.injectedStyles.get(targetDocument);\n if (!injectedStyles) {\n injectedStyles = new Set();\n runtime.injectedStyles.set(targetDocument, injectedStyles);\n }\n if (injectedStyles.has(hash)) {\n return;\n }\n\n // Older generated CSS module output can still inject matching style tags\n // after this document's cache is created, so keep the DOM as the fallback\n // source of truth on cache misses.\n if (documentContainsStyleHash(targetDocument, hash)) {\n injectedStyles.add(hash);\n return;\n }\n const style = targetDocument.createElement('style');\n style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);\n style.appendChild(targetDocument.createTextNode(css));\n targetDocument.head.appendChild(style);\n injectedStyles.add(hash);\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument(targetDocument) {\n const runtime = getRuntime();\n runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);\n for (const [hash, css] of runtime.styles) {\n injectStyle(targetDocument, hash, css);\n }\n return () => {\n const count = runtime.documents.get(targetDocument);\n if (count === undefined) {\n return;\n }\n if (count <= 1) {\n runtime.documents.delete(targetDocument);\n return;\n }\n runtime.documents.set(targetDocument, count - 1);\n };\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle(hash, css) {\n const runtime = getRuntime();\n runtime.styles.set(hash, css);\n for (const targetDocument of runtime.documents.keys()) {\n injectStyle(targetDocument, hash, css);\n }\n}", "import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"a7b05d56c7\", \".cf6db1948d5273a8__color-heading{text-transform:uppercase}.cf6db1948d5273a8__color-heading.cf6db1948d5273a8__color-heading.cf6db1948d5273a8__color-heading{font-size:11px;line-height:24px;margin-bottom:0}\");\n}\nexport default {\"color-heading\":\"cf6db1948d5273a8__color-heading\"};\n"],
5
+ "mappings": ";AAAA,SAAS,QAAQ,cAAc;AAC/B,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAC9B,SAAS,IAAI,eAAe;AAC5B,SAAS,aAAa,SAAS,UAAU,kBAAkB;AAC3D,OAAO,cAAc;AACrB,SAAS,mBAAmB;AAC5B,OAAO,wBAAwB,2CAA2C,gDAAgD;AAC1H,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,OAAO,4BAA4B;;;ACbnC,IAAM,uBAAuB;AAU7B,SAAS,aAAa;AACpB,QAAM,cAAc;AACpB,MAAI,YAAY,kBAAkB;AAChC,WAAO,YAAY;AAAA,EACrB;AACA,cAAY,mBAAmB;AAAA,IAC7B,WAAW,oBAAI,IAAI;AAAA,IACnB,QAAQ,oBAAI,IAAI;AAAA,IAChB,gBAAgB,oBAAI,QAAQ;AAAA,EAC9B;AACA,MAAI,OAAO,aAAa,aAAa;AACnC,qBAAiB,QAAQ;AAAA,EAC3B;AACA,SAAO,YAAY;AACrB;AAUA,SAAS,0BAA0B,gBAAgB,MAAM;AACvD,MAAI,CAAC,eAAe,MAAM;AACxB,WAAO;AAAA,EACT;AACA,aAAW,SAAS,eAAe,KAAK,iBAAiB,SAAS,oBAAoB,GAAG,GAAG;AAC1F,QAAI,MA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,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC,IAAI,OAAO,SAAS,KAAK,YAAyB,qBAAK,sBAAsB;AAAA,MAC5E,GAAG;AAAA,MACH,GAAG;AAAA,MACH;AAAA,MACA,SAAS,0BAAuC,qBAAK,kBAAkB;AAAA,QACrE,GAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,IAAiB,qBAAK,eAAe;AAAA,QACpC,GAAG;AAAA,QACH;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AA0BO,IAAM,eAAe,WAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
@@ -6,16 +6,100 @@ import { useInstanceId } from "@wordpress/compose";
6
6
  import { speak } from "@wordpress/a11y";
7
7
  import { closeSmall } from "@wordpress/icons";
8
8
  import { withIgnoreIMEEvents } from "@wordpress/keycodes";
9
- import { InputWrapperFlex } from "./styles.mjs";
10
9
  import TokenInput from "../form-token-field/token-input.mjs";
11
10
  import SuggestionsList from "../form-token-field/suggestions-list.mjs";
12
11
  import BaseControl from "../base-control/index.mjs";
13
12
  import Button from "../button/index.mjs";
14
- import { FlexBlock } from "../flex/index.mjs";
13
+ import { Flex, FlexBlock } from "../flex/index.mjs";
15
14
  import withFocusOutside from "../higher-order/with-focus-outside/index.mjs";
16
15
  import { useControlledValue } from "../utils/hooks/index.mjs";
17
16
  import { normalizeTextString } from "../utils/strings.mjs";
18
17
  import Spinner from "../spinner/index.mjs";
18
+
19
+ // packages/style-runtime/src/index.ts
20
+ var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
21
+ function getRuntime() {
22
+ const globalScope = globalThis;
23
+ if (globalScope.__wpStyleRuntime) {
24
+ return globalScope.__wpStyleRuntime;
25
+ }
26
+ globalScope.__wpStyleRuntime = {
27
+ documents: /* @__PURE__ */ new Map(),
28
+ styles: /* @__PURE__ */ new Map(),
29
+ injectedStyles: /* @__PURE__ */ new WeakMap()
30
+ };
31
+ if (typeof document !== "undefined") {
32
+ registerDocument(document);
33
+ }
34
+ return globalScope.__wpStyleRuntime;
35
+ }
36
+ function documentContainsStyleHash(targetDocument, hash) {
37
+ if (!targetDocument.head) {
38
+ return false;
39
+ }
40
+ for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {
41
+ if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
42
+ return true;
43
+ }
44
+ }
45
+ return false;
46
+ }
47
+ function injectStyle(targetDocument, hash, css) {
48
+ if (!targetDocument.head) {
49
+ return;
50
+ }
51
+ const runtime = getRuntime();
52
+ let injectedStyles = runtime.injectedStyles.get(targetDocument);
53
+ if (!injectedStyles) {
54
+ injectedStyles = /* @__PURE__ */ new Set();
55
+ runtime.injectedStyles.set(targetDocument, injectedStyles);
56
+ }
57
+ if (injectedStyles.has(hash)) {
58
+ return;
59
+ }
60
+ if (documentContainsStyleHash(targetDocument, hash)) {
61
+ injectedStyles.add(hash);
62
+ return;
63
+ }
64
+ const style = targetDocument.createElement("style");
65
+ style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
66
+ style.appendChild(targetDocument.createTextNode(css));
67
+ targetDocument.head.appendChild(style);
68
+ injectedStyles.add(hash);
69
+ }
70
+ function registerDocument(targetDocument) {
71
+ const runtime = getRuntime();
72
+ runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
73
+ for (const [hash, css] of runtime.styles) {
74
+ injectStyle(targetDocument, hash, css);
75
+ }
76
+ return () => {
77
+ const count = runtime.documents.get(targetDocument);
78
+ if (count === void 0) {
79
+ return;
80
+ }
81
+ if (count <= 1) {
82
+ runtime.documents.delete(targetDocument);
83
+ return;
84
+ }
85
+ runtime.documents.set(targetDocument, count - 1);
86
+ };
87
+ }
88
+ function registerStyle(hash, css) {
89
+ const runtime = getRuntime();
90
+ runtime.styles.set(hash, css);
91
+ for (const targetDocument of runtime.documents.keys()) {
92
+ injectStyle(targetDocument, hash, css);
93
+ }
94
+ }
95
+
96
+ // packages/components/src/combobox-control/style.module.scss
97
+ if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
98
+ registerStyle("5e90aa62ab", "._52e80c14d3dae324__input-wrapper{height:38px;padding-inline:8px}");
99
+ }
100
+ var style_module_default = { "input-wrapper": "_52e80c14d3dae324__input-wrapper" };
101
+
102
+ // packages/components/src/combobox-control/index.tsx
19
103
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
104
  var noop = () => {
21
105
  };
@@ -188,7 +272,8 @@ function ComboboxControl(props) {
188
272
  className: "components-combobox-control__suggestions-container",
189
273
  tabIndex: -1,
190
274
  onKeyDown,
191
- children: [/* @__PURE__ */ _jsxs(InputWrapperFlex, {
275
+ children: [/* @__PURE__ */ _jsxs(Flex, {
276
+ className: style_module_default["input-wrapper"],
192
277
  children: [/* @__PURE__ */ _jsx(FlexBlock, {
193
278
  children: /* @__PURE__ */ _jsx(TokenInput, {
194
279
  className: "components-combobox-control__input",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/combobox-control/index.tsx"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { Component, useState, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\nimport { withIgnoreIMEEvents } from '@wordpress/keycodes';\nimport { InputWrapperFlex } from './styles';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { FlexBlock } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\nimport Spinner from '../spinner';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nconst DetectOutside = withFocusOutside(class DetectOutsideComponent extends Component {\n handleFocusOutside(event) {\n this.props.onFocusOutside(event);\n }\n render() {\n return this.props.children;\n }\n});\nconst getIndexOfMatchingSuggestion = (selectedSuggestion, matchingSuggestions) => selectedSuggestion === null ? -1 : matchingSuggestions.indexOf(selectedSuggestion);\n\n/**\n * `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of\n * being able to search for options using a search input.\n *\n * ```jsx\n * import { ComboboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const options = [\n * \t{\n * \t\tvalue: 'small',\n * \t\tlabel: 'Small',\n * \t},\n * \t{\n * \t\tvalue: 'normal',\n * \t\tlabel: 'Normal',\n * \t\tdisabled: true,\n * \t},\n * \t{\n * \t\tvalue: 'large',\n * \t\tlabel: 'Large',\n * \t\tdisabled: false,\n * \t},\n * ];\n *\n * function MyComboboxControl() {\n * \tconst [ fontSize, setFontSize ] = useState();\n * \tconst [ filteredOptions, setFilteredOptions ] = useState( options );\n * \treturn (\n * \t\t<ComboboxControl\n * \t\t\tlabel=\"Font Size\"\n * \t\t\tvalue={ fontSize }\n * \t\t\tonChange={ setFontSize }\n * \t\t\toptions={ filteredOptions }\n * \t\t\tonFilterValueChange={ ( inputValue ) =>\n * \t\t\t\tsetFilteredOptions(\n * \t\t\t\t\toptions.filter( ( option ) =>\n * \t\t\t\t\t\toption.label\n * \t\t\t\t\t\t\t.toLowerCase()\n * \t\t\t\t\t\t\t.startsWith( inputValue.toLowerCase() )\n * \t\t\t\t\t)\n * \t\t\t\t)\n * \t\t\t}\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction ComboboxControl(props) {\n const {\n value: valueProp,\n label,\n options,\n onChange: onChangeProp,\n onFilterValueChange = noop,\n hideLabelFromVision,\n help,\n allowReset = true,\n className,\n isLoading = false,\n messages = {\n selected: __('Item selected.')\n },\n __experimentalRenderItem,\n expandOnFocus = true,\n placeholder\n } = props;\n const [value, setValue] = useControlledValue({\n value: valueProp,\n onChange: onChangeProp\n });\n const currentOption = options.find(option => option.value === value);\n const currentLabel = currentOption?.label ?? '';\n // Use a custom prefix when generating the `instanceId` to avoid having\n // duplicate input IDs when rendering this component and `FormTokenField`\n // in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n const instanceId = useInstanceId(ComboboxControl, 'combobox-control');\n const [selectedSuggestion, setSelectedSuggestion] = useState(currentOption || null);\n const [isExpanded, setIsExpanded] = useState(false);\n const [inputHasFocus, setInputHasFocus] = useState(false);\n const [inputValue, setInputValue] = useState('');\n const inputContainer = useRef(null);\n const matchingSuggestions = useMemo(() => {\n const startsWithMatch = [];\n const containsMatch = [];\n const match = normalizeTextString(inputValue);\n options.forEach(option => {\n const index = normalizeTextString(option.label).indexOf(match);\n if (index === 0) {\n startsWithMatch.push(option);\n } else if (index > 0) {\n containsMatch.push(option);\n }\n });\n return startsWithMatch.concat(containsMatch);\n }, [inputValue, options]);\n const onSuggestionSelected = newSelectedSuggestion => {\n if (newSelectedSuggestion.disabled) {\n return;\n }\n setValue(newSelectedSuggestion.value);\n speak(messages.selected, 'assertive');\n setSelectedSuggestion(newSelectedSuggestion);\n setInputValue('');\n setIsExpanded(false);\n };\n const handleArrowNavigation = (offset = 1) => {\n const index = getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions);\n let nextIndex = index + offset;\n if (nextIndex < 0) {\n nextIndex = matchingSuggestions.length - 1;\n } else if (nextIndex >= matchingSuggestions.length) {\n nextIndex = 0;\n }\n setSelectedSuggestion(matchingSuggestions[nextIndex]);\n setIsExpanded(true);\n };\n const onKeyDown = withIgnoreIMEEvents(event => {\n let preventDefault = false;\n if (event.defaultPrevented) {\n return;\n }\n switch (event.code) {\n case 'Enter':\n if (selectedSuggestion) {\n onSuggestionSelected(selectedSuggestion);\n preventDefault = true;\n }\n break;\n case 'ArrowUp':\n handleArrowNavigation(-1);\n preventDefault = true;\n break;\n case 'ArrowDown':\n handleArrowNavigation(1);\n preventDefault = true;\n break;\n case 'Escape':\n setIsExpanded(false);\n setSelectedSuggestion(null);\n preventDefault = true;\n break;\n default:\n break;\n }\n if (preventDefault) {\n event.preventDefault();\n }\n });\n const onBlur = () => {\n setInputHasFocus(false);\n };\n const onFocus = () => {\n setInputHasFocus(true);\n if (expandOnFocus) {\n setIsExpanded(true);\n }\n onFilterValueChange('');\n setInputValue('');\n };\n const onClick = () => {\n setIsExpanded(true);\n };\n const onFocusOutside = () => {\n setIsExpanded(false);\n };\n const onInputChange = event => {\n const text = event.value;\n setInputValue(text);\n onFilterValueChange(text);\n if (inputHasFocus) {\n setIsExpanded(true);\n }\n };\n const handleOnReset = () => {\n setValue(null);\n inputContainer.current?.focus();\n };\n\n // Stop propagation of the keydown event when pressing Enter on the Reset\n // button to prevent calling the onKeydown callback on the container div\n // element which actually sets the selected suggestion.\n const handleResetStopPropagation = event => {\n event.stopPropagation();\n };\n\n // Update current selections when the filter input changes.\n useEffect(() => {\n const hasMatchingSuggestions = matchingSuggestions.length > 0;\n const hasSelectedMatchingSuggestions = getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions) > 0;\n if (hasMatchingSuggestions && !hasSelectedMatchingSuggestions) {\n // If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n setSelectedSuggestion(matchingSuggestions[0]);\n }\n }, [matchingSuggestions, selectedSuggestion]);\n\n // Announcements.\n useEffect(() => {\n const hasMatchingSuggestions = matchingSuggestions.length > 0;\n if (isExpanded) {\n const message = hasMatchingSuggestions ? sprintf(/* translators: %d: number of results. */\n _n('%d result found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.', matchingSuggestions.length), matchingSuggestions.length) : __('No results.');\n speak(message, 'polite');\n }\n }, [matchingSuggestions, isExpanded]);\n\n // Disable reason: There is no appropriate role which describes the\n // input container intended accessible usability.\n // TODO: Refactor click detection to use blur to stop propagation.\n /* eslint-disable jsx-a11y/no-static-element-interactions */\n return /*#__PURE__*/_jsx(DetectOutside, {\n onFocusOutside: onFocusOutside,\n children: /*#__PURE__*/_jsx(BaseControl, {\n className: clsx(className, 'components-combobox-control'),\n label: label,\n id: `components-form-token-input-${instanceId}`,\n hideLabelFromVision: hideLabelFromVision,\n help: help,\n children: /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-combobox-control__suggestions-container\",\n tabIndex: -1,\n onKeyDown: onKeyDown,\n children: [/*#__PURE__*/_jsxs(InputWrapperFlex, {\n children: [/*#__PURE__*/_jsx(FlexBlock, {\n children: /*#__PURE__*/_jsx(TokenInput, {\n className: \"components-combobox-control__input\",\n instanceId: instanceId,\n ref: inputContainer,\n placeholder: placeholder,\n value: isExpanded ? inputValue : currentLabel,\n onFocus: onFocus,\n onBlur: onBlur,\n onClick: onClick,\n isExpanded: isExpanded,\n selectedSuggestionIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),\n onChange: onInputChange,\n \"aria-describedby\": help ?\n // TODO: Refactor `TokenInput` to not use hardcoded IDs.\n `components-form-token-input-${instanceId}__help` : undefined\n })\n }), isLoading && /*#__PURE__*/_jsx(Spinner, {}), allowReset && Boolean(value) && !isExpanded && /*#__PURE__*/_jsx(Button, {\n size: \"small\",\n icon: closeSmall,\n onClick: handleOnReset,\n onKeyDown: handleResetStopPropagation,\n label: __('Reset')\n })]\n }), isExpanded && !isLoading && /*#__PURE__*/_jsx(SuggestionsList, {\n instanceId: instanceId\n // The empty string for `value` here is not actually used, but is\n // just a quick way to satisfy the TypeScript requirements of SuggestionsList.\n // See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330\n ,\n match: {\n label: inputValue,\n value: ''\n },\n displayTransform: suggestion => suggestion.label,\n suggestions: matchingSuggestions,\n selectedIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),\n onHover: setSelectedSuggestion,\n onSelect: onSuggestionSelected,\n scrollIntoView: true,\n __experimentalRenderItem: __experimentalRenderItem\n })]\n })\n })\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,OAAO,GAAG,OAAO;AAAA,UACnB,CAAC,CAAC;AAAA,QACJ,CAAC,GAAG,cAAc,CAAC,aAA0B,qBAAK,iBAAiB;AAAA,UACjE;AAAA,UAKA,OAAO;AAAA,YACL,OAAO;AAAA,YACP,OAAO;AAAA,UACT;AAAA,UACA,kBAAkB,gBAAc,WAAW;AAAA,UAC3C,aAAa;AAAA,UACb,eAAe,6BAA6B,oBAAoB,mBAAmB;AAAA,UACnF,SAAS;AAAA,UACT,UAAU;AAAA,UACV,gBAAgB;AAAA,UAChB;AAAA,QACF,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AAEH;AACA,IAAO,2BAAQ;",
3
+ "sources": ["../../src/combobox-control/index.tsx", "../../../style-runtime/src/index.ts", "../../src/combobox-control/style.module.scss"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { Component, useState, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\nimport { withIgnoreIMEEvents } from '@wordpress/keycodes';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { Flex, FlexBlock } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\nimport Spinner from '../spinner';\nimport styles from './style.module.scss';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nconst DetectOutside = withFocusOutside(class DetectOutsideComponent extends Component {\n handleFocusOutside(event) {\n this.props.onFocusOutside(event);\n }\n render() {\n return this.props.children;\n }\n});\nconst getIndexOfMatchingSuggestion = (selectedSuggestion, matchingSuggestions) => selectedSuggestion === null ? -1 : matchingSuggestions.indexOf(selectedSuggestion);\n\n/**\n * `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of\n * being able to search for options using a search input.\n *\n * ```jsx\n * import { ComboboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const options = [\n * \t{\n * \t\tvalue: 'small',\n * \t\tlabel: 'Small',\n * \t},\n * \t{\n * \t\tvalue: 'normal',\n * \t\tlabel: 'Normal',\n * \t\tdisabled: true,\n * \t},\n * \t{\n * \t\tvalue: 'large',\n * \t\tlabel: 'Large',\n * \t\tdisabled: false,\n * \t},\n * ];\n *\n * function MyComboboxControl() {\n * \tconst [ fontSize, setFontSize ] = useState();\n * \tconst [ filteredOptions, setFilteredOptions ] = useState( options );\n * \treturn (\n * \t\t<ComboboxControl\n * \t\t\tlabel=\"Font Size\"\n * \t\t\tvalue={ fontSize }\n * \t\t\tonChange={ setFontSize }\n * \t\t\toptions={ filteredOptions }\n * \t\t\tonFilterValueChange={ ( inputValue ) =>\n * \t\t\t\tsetFilteredOptions(\n * \t\t\t\t\toptions.filter( ( option ) =>\n * \t\t\t\t\t\toption.label\n * \t\t\t\t\t\t\t.toLowerCase()\n * \t\t\t\t\t\t\t.startsWith( inputValue.toLowerCase() )\n * \t\t\t\t\t)\n * \t\t\t\t)\n * \t\t\t}\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction ComboboxControl(props) {\n const {\n value: valueProp,\n label,\n options,\n onChange: onChangeProp,\n onFilterValueChange = noop,\n hideLabelFromVision,\n help,\n allowReset = true,\n className,\n isLoading = false,\n messages = {\n selected: __('Item selected.')\n },\n __experimentalRenderItem,\n expandOnFocus = true,\n placeholder\n } = props;\n const [value, setValue] = useControlledValue({\n value: valueProp,\n onChange: onChangeProp\n });\n const currentOption = options.find(option => option.value === value);\n const currentLabel = currentOption?.label ?? '';\n // Use a custom prefix when generating the `instanceId` to avoid having\n // duplicate input IDs when rendering this component and `FormTokenField`\n // in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n const instanceId = useInstanceId(ComboboxControl, 'combobox-control');\n const [selectedSuggestion, setSelectedSuggestion] = useState(currentOption || null);\n const [isExpanded, setIsExpanded] = useState(false);\n const [inputHasFocus, setInputHasFocus] = useState(false);\n const [inputValue, setInputValue] = useState('');\n const inputContainer = useRef(null);\n const matchingSuggestions = useMemo(() => {\n const startsWithMatch = [];\n const containsMatch = [];\n const match = normalizeTextString(inputValue);\n options.forEach(option => {\n const index = normalizeTextString(option.label).indexOf(match);\n if (index === 0) {\n startsWithMatch.push(option);\n } else if (index > 0) {\n containsMatch.push(option);\n }\n });\n return startsWithMatch.concat(containsMatch);\n }, [inputValue, options]);\n const onSuggestionSelected = newSelectedSuggestion => {\n if (newSelectedSuggestion.disabled) {\n return;\n }\n setValue(newSelectedSuggestion.value);\n speak(messages.selected, 'assertive');\n setSelectedSuggestion(newSelectedSuggestion);\n setInputValue('');\n setIsExpanded(false);\n };\n const handleArrowNavigation = (offset = 1) => {\n const index = getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions);\n let nextIndex = index + offset;\n if (nextIndex < 0) {\n nextIndex = matchingSuggestions.length - 1;\n } else if (nextIndex >= matchingSuggestions.length) {\n nextIndex = 0;\n }\n setSelectedSuggestion(matchingSuggestions[nextIndex]);\n setIsExpanded(true);\n };\n const onKeyDown = withIgnoreIMEEvents(event => {\n let preventDefault = false;\n if (event.defaultPrevented) {\n return;\n }\n switch (event.code) {\n case 'Enter':\n if (selectedSuggestion) {\n onSuggestionSelected(selectedSuggestion);\n preventDefault = true;\n }\n break;\n case 'ArrowUp':\n handleArrowNavigation(-1);\n preventDefault = true;\n break;\n case 'ArrowDown':\n handleArrowNavigation(1);\n preventDefault = true;\n break;\n case 'Escape':\n setIsExpanded(false);\n setSelectedSuggestion(null);\n preventDefault = true;\n break;\n default:\n break;\n }\n if (preventDefault) {\n event.preventDefault();\n }\n });\n const onBlur = () => {\n setInputHasFocus(false);\n };\n const onFocus = () => {\n setInputHasFocus(true);\n if (expandOnFocus) {\n setIsExpanded(true);\n }\n onFilterValueChange('');\n setInputValue('');\n };\n const onClick = () => {\n setIsExpanded(true);\n };\n const onFocusOutside = () => {\n setIsExpanded(false);\n };\n const onInputChange = event => {\n const text = event.value;\n setInputValue(text);\n onFilterValueChange(text);\n if (inputHasFocus) {\n setIsExpanded(true);\n }\n };\n const handleOnReset = () => {\n setValue(null);\n inputContainer.current?.focus();\n };\n\n // Stop propagation of the keydown event when pressing Enter on the Reset\n // button to prevent calling the onKeydown callback on the container div\n // element which actually sets the selected suggestion.\n const handleResetStopPropagation = event => {\n event.stopPropagation();\n };\n\n // Update current selections when the filter input changes.\n useEffect(() => {\n const hasMatchingSuggestions = matchingSuggestions.length > 0;\n const hasSelectedMatchingSuggestions = getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions) > 0;\n if (hasMatchingSuggestions && !hasSelectedMatchingSuggestions) {\n // If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n setSelectedSuggestion(matchingSuggestions[0]);\n }\n }, [matchingSuggestions, selectedSuggestion]);\n\n // Announcements.\n useEffect(() => {\n const hasMatchingSuggestions = matchingSuggestions.length > 0;\n if (isExpanded) {\n const message = hasMatchingSuggestions ? sprintf(/* translators: %d: number of results. */\n _n('%d result found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.', matchingSuggestions.length), matchingSuggestions.length) : __('No results.');\n speak(message, 'polite');\n }\n }, [matchingSuggestions, isExpanded]);\n\n // Disable reason: There is no appropriate role which describes the\n // input container intended accessible usability.\n // TODO: Refactor click detection to use blur to stop propagation.\n /* eslint-disable jsx-a11y/no-static-element-interactions */\n return /*#__PURE__*/_jsx(DetectOutside, {\n onFocusOutside: onFocusOutside,\n children: /*#__PURE__*/_jsx(BaseControl, {\n className: clsx(className, 'components-combobox-control'),\n label: label,\n id: `components-form-token-input-${instanceId}`,\n hideLabelFromVision: hideLabelFromVision,\n help: help,\n children: /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-combobox-control__suggestions-container\",\n tabIndex: -1,\n onKeyDown: onKeyDown,\n children: [/*#__PURE__*/_jsxs(Flex, {\n className: styles['input-wrapper'],\n children: [/*#__PURE__*/_jsx(FlexBlock, {\n children: /*#__PURE__*/_jsx(TokenInput, {\n className: \"components-combobox-control__input\",\n instanceId: instanceId,\n ref: inputContainer,\n placeholder: placeholder,\n value: isExpanded ? inputValue : currentLabel,\n onFocus: onFocus,\n onBlur: onBlur,\n onClick: onClick,\n isExpanded: isExpanded,\n selectedSuggestionIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),\n onChange: onInputChange,\n \"aria-describedby\": help ?\n // TODO: Refactor `TokenInput` to not use hardcoded IDs.\n `components-form-token-input-${instanceId}__help` : undefined\n })\n }), isLoading && /*#__PURE__*/_jsx(Spinner, {}), allowReset && Boolean(value) && !isExpanded && /*#__PURE__*/_jsx(Button, {\n size: \"small\",\n icon: closeSmall,\n onClick: handleOnReset,\n onKeyDown: handleResetStopPropagation,\n label: __('Reset')\n })]\n }), isExpanded && !isLoading && /*#__PURE__*/_jsx(SuggestionsList, {\n instanceId: instanceId\n // The empty string for `value` here is not actually used, but is\n // just a quick way to satisfy the TypeScript requirements of SuggestionsList.\n // See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330\n ,\n match: {\n label: inputValue,\n value: ''\n },\n displayTransform: suggestion => suggestion.label,\n suggestions: matchingSuggestions,\n selectedIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),\n onHover: setSelectedSuggestion,\n onSelect: onSuggestionSelected,\n scrollIntoView: true,\n __experimentalRenderItem: __experimentalRenderItem\n })]\n })\n })\n });\n /* eslint-enable jsx-a11y/no-static-element-interactions */\n}\nexport default ComboboxControl;", "const STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n const globalScope = globalThis;\n if (globalScope.__wpStyleRuntime) {\n return globalScope.__wpStyleRuntime;\n }\n globalScope.__wpStyleRuntime = {\n documents: new Map(),\n styles: new Map(),\n injectedStyles: new WeakMap()\n };\n if (typeof document !== 'undefined') {\n registerDocument(document);\n }\n return globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(targetDocument, hash) {\n if (!targetDocument.head) {\n return false;\n }\n for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {\n if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle(targetDocument, hash, css) {\n if (!targetDocument.head) {\n return;\n }\n const runtime = getRuntime();\n let injectedStyles = runtime.injectedStyles.get(targetDocument);\n if (!injectedStyles) {\n injectedStyles = new Set();\n runtime.injectedStyles.set(targetDocument, injectedStyles);\n }\n if (injectedStyles.has(hash)) {\n return;\n }\n\n // Older generated CSS module output can still inject matching style tags\n // after this document's cache is created, so keep the DOM as the fallback\n // source of truth on cache misses.\n if (documentContainsStyleHash(targetDocument, hash)) {\n injectedStyles.add(hash);\n return;\n }\n const style = targetDocument.createElement('style');\n style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);\n style.appendChild(targetDocument.createTextNode(css));\n targetDocument.head.appendChild(style);\n injectedStyles.add(hash);\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument(targetDocument) {\n const runtime = getRuntime();\n runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);\n for (const [hash, css] of runtime.styles) {\n injectStyle(targetDocument, hash, css);\n }\n return () => {\n const count = runtime.documents.get(targetDocument);\n if (count === undefined) {\n return;\n }\n if (count <= 1) {\n runtime.documents.delete(targetDocument);\n return;\n }\n runtime.documents.set(targetDocument, count - 1);\n };\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle(hash, css) {\n const runtime = getRuntime();\n runtime.styles.set(hash, css);\n for (const targetDocument of runtime.documents.keys()) {\n injectStyle(targetDocument, hash, css);\n }\n}", "import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"5e90aa62ab\", \"._52e80c14d3dae324__input-wrapper{height:38px;padding-inline:8px}\");\n}\nexport default {\"input-wrapper\":\"_52e80c14d3dae324__input-wrapper\"};\n"],
5
+ "mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,IAAI,IAAI,eAAe;AAChC,SAAS,WAAW,UAAU,SAAS,QAAQ,iBAAiB;AAChE,SAAS,qBAAqB;AAC9B,SAAS,aAAa;AACtB,SAAS,kBAAkB;AAC3B,SAAS,2BAA2B;AACpC,OAAO,gBAAgB;AACvB,OAAO,qBAAqB;AAC5B,OAAO,iBAAiB;AACxB,OAAO,YAAY;AACnB,SAAS,MAAM,iBAAiB;AAChC,OAAO,sBAAsB;AAC7B,SAAS,0BAA0B;AACnC,SAAS,2BAA2B;AACpC,OAAO,aAAa;;;ACfpB,IAAM,uBAAuB;AAU7B,SAAS,aAAa;AACpB,QAAM,cAAc;AACpB,MAAI,YAA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BAAW;AAAA,YACtD,CAAC;AAAA,UACH,CAAC,GAAG,aAA0B,qBAAK,SAAS,CAAC,CAAC,GAAG,cAAc,QAAQ,KAAK,KAAK,CAAC,cAA2B,qBAAK,QAAQ;AAAA,YACxH,MAAM;AAAA,YACN,MAAM;AAAA,YACN,SAAS;AAAA,YACT,WAAW;AAAA,YACX,OAAO,GAAG,OAAO;AAAA,UACnB,CAAC,CAAC;AAAA,QACJ,CAAC,GAAG,cAAc,CAAC,aAA0B,qBAAK,iBAAiB;AAAA,UACjE;AAAA,UAKA,OAAO;AAAA,YACL,OAAO;AAAA,YACP,OAAO;AAAA,UACT;AAAA,UACA,kBAAkB,gBAAc,WAAW;AAAA,UAC3C,aAAa;AAAA,UACb,eAAe,6BAA6B,oBAAoB,mBAAmB;AAAA,UACnF,SAAS;AAAA,UACT,UAAU;AAAA,UACV,gBAAgB;AAAA,UAChB;AAAA,QACF,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AAEH;AACA,IAAO,2BAAQ;",
6
6
  "names": []
7
7
  }
@@ -102,6 +102,8 @@ var UnconnectedConfirmDialog = (props, forwardedRef) => {
102
102
  confirmButtonText,
103
103
  cancelButtonText,
104
104
  isBusy,
105
+ title,
106
+ __experimentalHideHeader = true,
105
107
  ...otherProps
106
108
  } = useContextSystem(props, "ConfirmDialog");
107
109
  const wrapperClassName = style_module_default.wrapper;
@@ -136,7 +138,9 @@ var UnconnectedConfirmDialog = (props, forwardedRef) => {
136
138
  isDismissible: true,
137
139
  ref: forwardedRef,
138
140
  overlayClassName: wrapperClassName,
139
- __experimentalHideHeader: true,
141
+ title,
142
+ contentLabel: __experimentalHideHeader ? title : void 0,
143
+ __experimentalHideHeader,
140
144
  ...otherProps,
141
145
  children: /* @__PURE__ */ _jsxs(VStack, {
142
146
  spacing: 8,