@wordpress/components 39.0.0 → 40.1.1-next.v.202608281122.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 (1121) hide show
  1. package/CHANGELOG.md +79 -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 +1 -1
  46. package/build/context/context-system-provider.cjs.map +3 -3
  47. package/build/custom-gradient-picker/gradient-bar/control-points.cjs +14 -2
  48. package/build/custom-gradient-picker/gradient-bar/control-points.cjs.map +2 -2
  49. package/build/custom-gradient-picker/gradient-bar/index.cjs +2 -0
  50. package/build/custom-gradient-picker/gradient-bar/index.cjs.map +2 -2
  51. package/build/dropdown/dropdown-content-wrapper.cjs +102 -3
  52. package/build/dropdown/dropdown-content-wrapper.cjs.map +4 -4
  53. package/build/duotone-picker/custom-duotone-bar.cjs +1 -0
  54. package/build/duotone-picker/custom-duotone-bar.cjs.map +2 -2
  55. package/build/duotone-picker/duotone-picker.cjs +23 -14
  56. package/build/duotone-picker/duotone-picker.cjs.map +2 -2
  57. package/build/focal-point-picker/index.cjs +5 -3
  58. package/build/focal-point-picker/index.cjs.map +2 -2
  59. package/build/gradient-picker/index.cjs +105 -11
  60. package/build/gradient-picker/index.cjs.map +3 -3
  61. package/build/input-control/input-field.cjs +1 -0
  62. package/build/input-control/input-field.cjs.map +2 -2
  63. package/build/input-control/styles/input-control-styles.cjs +22 -22
  64. package/build/input-control/styles/input-control-styles.cjs.map +2 -2
  65. package/build/modal/index.cjs +1 -0
  66. package/build/modal/index.cjs.map +2 -2
  67. package/build/palette-edit/index.cjs +208 -33
  68. package/build/palette-edit/index.cjs.map +3 -3
  69. package/build/private-apis.cjs +1 -6
  70. package/build/private-apis.cjs.map +2 -2
  71. package/build/progress-bar/index.cjs +95 -7
  72. package/build/progress-bar/index.cjs.map +4 -4
  73. package/build/radio-control/index.cjs +1 -0
  74. package/build/radio-control/index.cjs.map +2 -2
  75. package/build/resizable-box/resize-tooltip/index.cjs +91 -4
  76. package/build/resizable-box/resize-tooltip/index.cjs.map +3 -3
  77. package/build/resizable-box/resize-tooltip/label.cjs +103 -6
  78. package/build/resizable-box/resize-tooltip/label.cjs.map +4 -4
  79. package/build/scrollable/hook.cjs +93 -6
  80. package/build/scrollable/hook.cjs.map +4 -4
  81. package/build/snackbar/index.cjs +8 -5
  82. package/build/snackbar/index.cjs.map +2 -2
  83. package/build/textarea-control/index.cjs +87 -3
  84. package/build/textarea-control/index.cjs.map +3 -3
  85. package/build/toggle-group-control/toggle-group-control/component.cjs +1 -1
  86. package/build/toggle-group-control/toggle-group-control/component.cjs.map +2 -2
  87. package/build/toggle-group-control/toggle-group-control-option-base/component.cjs +1 -1
  88. package/build/toggle-group-control/toggle-group-control-option-base/component.cjs.map +2 -2
  89. package/build/tools-panel/tools-panel-item/hook.cjs +2 -2
  90. package/build/tools-panel/tools-panel-item/hook.cjs.map +2 -2
  91. package/build/utils/config-values.cjs +0 -3
  92. package/build/utils/config-values.cjs.map +2 -2
  93. package/build/validated-form-controls/components/content-editable-control.cjs +3 -2
  94. package/build/validated-form-controls/components/content-editable-control.cjs.map +2 -2
  95. package/build/validated-form-controls/components/custom-select-control.cjs +3 -2
  96. package/build/validated-form-controls/components/custom-select-control.cjs.map +2 -2
  97. package/build/validated-form-controls/components/index.cjs +1 -9
  98. package/build/validated-form-controls/components/index.cjs.map +2 -2
  99. package/build/validated-form-controls/components/input-control.cjs +9 -2
  100. package/build/validated-form-controls/components/input-control.cjs.map +3 -3
  101. package/build/validated-form-controls/components/range-control.cjs +3 -2
  102. package/build/validated-form-controls/components/range-control.cjs.map +2 -2
  103. package/build/validated-form-controls/components/textarea-control.cjs +9 -2
  104. package/build/validated-form-controls/components/textarea-control.cjs.map +3 -3
  105. package/build/validated-form-controls/index.cjs +1 -3
  106. package/build/validated-form-controls/index.cjs.map +2 -2
  107. package/build/z-stack/component.cjs +105 -7
  108. package/build/z-stack/component.cjs.map +4 -4
  109. package/build-module/base-control/styles/base-control-styles.mjs +151 -46
  110. package/build-module/base-control/styles/base-control-styles.mjs.map +3 -3
  111. package/build-module/border-box-control/border-box-control/hook.mjs +89 -14
  112. package/build-module/border-box-control/border-box-control/hook.mjs.map +3 -3
  113. package/build-module/border-box-control/border-box-control-linked-button/hook.mjs +87 -8
  114. package/build-module/border-box-control/border-box-control-linked-button/hook.mjs.map +3 -3
  115. package/build-module/border-box-control/border-box-control-split-controls/hook.mjs +89 -16
  116. package/build-module/border-box-control/border-box-control-split-controls/hook.mjs.map +3 -3
  117. package/build-module/border-box-control/border-box-control-visualizer/hook.mjs +108 -8
  118. package/build-module/border-box-control/border-box-control-visualizer/hook.mjs.map +3 -3
  119. package/build-module/border-control/border-control/hook.mjs +90 -15
  120. package/build-module/border-control/border-control/hook.mjs.map +3 -3
  121. package/build-module/border-control/border-control-dropdown/component.mjs +2 -4
  122. package/build-module/border-control/border-control-dropdown/component.mjs.map +2 -2
  123. package/build-module/border-control/border-control-dropdown/hook.mjs +103 -27
  124. package/build-module/border-control/border-control-dropdown/hook.mjs.map +3 -3
  125. package/build-module/box-control/box-input-control.mjs +102 -10
  126. package/build-module/box-control/box-input-control.mjs.map +3 -3
  127. package/build-module/box-control/index.mjs +95 -5
  128. package/build-module/box-control/index.mjs.map +3 -3
  129. package/build-module/button/index.mjs +11 -4
  130. package/build-module/button/index.mjs.map +2 -2
  131. package/build-module/card/card-body/hook.mjs +4 -2
  132. package/build-module/card/card-body/hook.mjs.map +2 -2
  133. package/build-module/card/styles.mjs +30 -16
  134. package/build-module/card/styles.mjs.map +2 -2
  135. package/build-module/circular-option-picker/circular-option-picker-option.mjs +4 -5
  136. package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
  137. package/build-module/circular-option-picker/circular-option-picker.mjs +24 -6
  138. package/build-module/circular-option-picker/circular-option-picker.mjs.map +2 -2
  139. package/build-module/circular-option-picker/index.mjs +4 -2
  140. package/build-module/circular-option-picker/index.mjs.map +2 -2
  141. package/build-module/circular-option-picker/utils.mjs +25 -7
  142. package/build-module/circular-option-picker/utils.mjs.map +2 -2
  143. package/build-module/color-palette/index.mjs +104 -11
  144. package/build-module/color-palette/index.mjs.map +3 -3
  145. package/build-module/combobox-control/index.mjs +88 -3
  146. package/build-module/combobox-control/index.mjs.map +3 -3
  147. package/build-module/confirm-dialog/component.mjs +5 -1
  148. package/build-module/confirm-dialog/component.mjs.map +2 -2
  149. package/build-module/content-editable-control/index.mjs +1 -1
  150. package/build-module/content-editable-control/index.mjs.map +2 -2
  151. package/build-module/context/context-system-provider.mjs +1 -1
  152. package/build-module/context/context-system-provider.mjs.map +3 -3
  153. package/build-module/custom-gradient-picker/gradient-bar/control-points.mjs +14 -2
  154. package/build-module/custom-gradient-picker/gradient-bar/control-points.mjs.map +2 -2
  155. package/build-module/custom-gradient-picker/gradient-bar/index.mjs +2 -0
  156. package/build-module/custom-gradient-picker/gradient-bar/index.mjs.map +2 -2
  157. package/build-module/dropdown/dropdown-content-wrapper.mjs +92 -3
  158. package/build-module/dropdown/dropdown-content-wrapper.mjs.map +3 -3
  159. package/build-module/duotone-picker/custom-duotone-bar.mjs +1 -0
  160. package/build-module/duotone-picker/custom-duotone-bar.mjs.map +2 -2
  161. package/build-module/duotone-picker/duotone-picker.mjs +24 -15
  162. package/build-module/duotone-picker/duotone-picker.mjs.map +2 -2
  163. package/build-module/focal-point-picker/index.mjs +5 -3
  164. package/build-module/focal-point-picker/index.mjs.map +2 -2
  165. package/build-module/gradient-picker/index.mjs +106 -12
  166. package/build-module/gradient-picker/index.mjs.map +3 -3
  167. package/build-module/input-control/input-field.mjs +1 -0
  168. package/build-module/input-control/input-field.mjs.map +2 -2
  169. package/build-module/input-control/styles/input-control-styles.mjs +22 -22
  170. package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
  171. package/build-module/modal/index.mjs +1 -0
  172. package/build-module/modal/index.mjs.map +2 -2
  173. package/build-module/palette-edit/index.mjs +209 -34
  174. package/build-module/palette-edit/index.mjs.map +2 -2
  175. package/build-module/private-apis.mjs +2 -7
  176. package/build-module/private-apis.mjs.map +2 -2
  177. package/build-module/progress-bar/index.mjs +95 -7
  178. package/build-module/progress-bar/index.mjs.map +3 -3
  179. package/build-module/radio-control/index.mjs +1 -0
  180. package/build-module/radio-control/index.mjs.map +2 -2
  181. package/build-module/resizable-box/resize-tooltip/index.mjs +91 -4
  182. package/build-module/resizable-box/resize-tooltip/index.mjs.map +3 -3
  183. package/build-module/resizable-box/resize-tooltip/label.mjs +93 -6
  184. package/build-module/resizable-box/resize-tooltip/label.mjs.map +3 -3
  185. package/build-module/scrollable/hook.mjs +93 -6
  186. package/build-module/scrollable/hook.mjs.map +4 -4
  187. package/build-module/snackbar/index.mjs +8 -5
  188. package/build-module/snackbar/index.mjs.map +2 -2
  189. package/build-module/textarea-control/index.mjs +87 -3
  190. package/build-module/textarea-control/index.mjs.map +3 -3
  191. package/build-module/toggle-group-control/toggle-group-control/component.mjs +1 -1
  192. package/build-module/toggle-group-control/toggle-group-control/component.mjs.map +2 -2
  193. package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs +1 -1
  194. package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs.map +2 -2
  195. package/build-module/tools-panel/tools-panel-item/hook.mjs +2 -2
  196. package/build-module/tools-panel/tools-panel-item/hook.mjs.map +2 -2
  197. package/build-module/utils/config-values.mjs +0 -3
  198. package/build-module/utils/config-values.mjs.map +2 -2
  199. package/build-module/validated-form-controls/components/content-editable-control.mjs +2 -1
  200. package/build-module/validated-form-controls/components/content-editable-control.mjs.map +2 -2
  201. package/build-module/validated-form-controls/components/custom-select-control.mjs +2 -1
  202. package/build-module/validated-form-controls/components/custom-select-control.mjs.map +2 -2
  203. package/build-module/validated-form-controls/components/index.mjs +0 -4
  204. package/build-module/validated-form-controls/components/index.mjs.map +2 -2
  205. package/build-module/validated-form-controls/components/input-control.mjs +8 -1
  206. package/build-module/validated-form-controls/components/input-control.mjs.map +2 -2
  207. package/build-module/validated-form-controls/components/range-control.mjs +2 -1
  208. package/build-module/validated-form-controls/components/range-control.mjs.map +2 -2
  209. package/build-module/validated-form-controls/components/textarea-control.mjs +8 -1
  210. package/build-module/validated-form-controls/components/textarea-control.mjs.map +2 -2
  211. package/build-module/validated-form-controls/index.mjs +0 -1
  212. package/build-module/validated-form-controls/index.mjs.map +2 -2
  213. package/build-module/z-stack/component.mjs +95 -7
  214. package/build-module/z-stack/component.mjs.map +3 -3
  215. package/build-style/style-rtl.css +79 -134
  216. package/build-style/style.css +79 -134
  217. package/build-types/base-control/styles/base-control-styles.d.ts +21 -20
  218. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  219. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  220. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  221. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  222. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +863 -1
  223. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  224. package/build-types/border-box-control/types.d.ts +6 -2
  225. package/build-types/border-box-control/types.d.ts.map +1 -1
  226. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  227. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  228. package/build-types/border-control/border-control-dropdown/hook.d.ts +4 -2
  229. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  230. package/build-types/box-control/box-input-control.d.ts.map +1 -1
  231. package/build-types/box-control/index.d.ts.map +1 -1
  232. package/build-types/button/index.d.ts.map +1 -1
  233. package/build-types/card/styles.d.ts +2 -1
  234. package/build-types/card/styles.d.ts.map +1 -1
  235. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  236. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  237. package/build-types/circular-option-picker/index.d.ts +1 -1
  238. package/build-types/circular-option-picker/index.d.ts.map +1 -1
  239. package/build-types/circular-option-picker/types.d.ts +34 -26
  240. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  241. package/build-types/circular-option-picker/utils.d.ts +9 -5
  242. package/build-types/circular-option-picker/utils.d.ts.map +1 -1
  243. package/build-types/color-palette/index.d.ts.map +1 -1
  244. package/build-types/color-palette/types.d.ts +23 -3
  245. package/build-types/color-palette/types.d.ts.map +1 -1
  246. package/build-types/combobox-control/index.d.ts.map +1 -1
  247. package/build-types/combobox-control/types.d.ts +4 -2
  248. package/build-types/combobox-control/types.d.ts.map +1 -1
  249. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  250. package/build-types/confirm-dialog/types.d.ts +11 -0
  251. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  252. package/build-types/context/context-system-provider.d.ts.map +1 -1
  253. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +1 -1
  254. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  255. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +1 -1
  256. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
  257. package/build-types/custom-gradient-picker/types.d.ts +10 -0
  258. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  259. package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -1
  260. package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
  261. package/build-types/duotone-picker/duotone-picker.d.ts +1 -1
  262. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  263. package/build-types/duotone-picker/types.d.ts +43 -4
  264. package/build-types/duotone-picker/types.d.ts.map +1 -1
  265. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  266. package/build-types/gradient-picker/index.d.ts.map +1 -1
  267. package/build-types/gradient-picker/types.d.ts +22 -3
  268. package/build-types/gradient-picker/types.d.ts.map +1 -1
  269. package/build-types/input-control/input-field.d.ts.map +1 -1
  270. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  271. package/build-types/modal/index.d.ts.map +1 -1
  272. package/build-types/palette-edit/index.d.ts +8 -5
  273. package/build-types/palette-edit/index.d.ts.map +1 -1
  274. package/build-types/palette-edit/types.d.ts +47 -8
  275. package/build-types/palette-edit/types.d.ts.map +1 -1
  276. package/build-types/popover/types.d.ts +6 -2
  277. package/build-types/popover/types.d.ts.map +1 -1
  278. package/build-types/private-apis.d.ts.map +1 -1
  279. package/build-types/progress-bar/index.d.ts.map +1 -1
  280. package/build-types/radio-control/index.d.ts.map +1 -1
  281. package/build-types/radio-control/types.d.ts +6 -0
  282. package/build-types/radio-control/types.d.ts.map +1 -1
  283. package/build-types/resizable-box/resize-tooltip/index.d.ts +4 -5
  284. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  285. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  286. package/build-types/scrollable/hook.d.ts.map +1 -1
  287. package/build-types/snackbar/index.d.ts.map +1 -1
  288. package/build-types/textarea-control/index.d.ts.map +1 -1
  289. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  290. package/build-types/utils/config-values.d.ts +0 -3
  291. package/build-types/validated-form-controls/components/content-editable-control.d.ts.map +1 -1
  292. package/build-types/validated-form-controls/components/custom-select-control.d.ts.map +1 -1
  293. package/build-types/validated-form-controls/components/index.d.ts +0 -4
  294. package/build-types/validated-form-controls/components/index.d.ts.map +1 -1
  295. package/build-types/validated-form-controls/components/input-control.d.ts.map +1 -1
  296. package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
  297. package/build-types/validated-form-controls/components/textarea-control.d.ts.map +1 -1
  298. package/build-types/validated-form-controls/index.d.ts +0 -1
  299. package/build-types/validated-form-controls/index.d.ts.map +1 -1
  300. package/build-types/z-stack/component.d.ts.map +1 -1
  301. package/package.json +30 -30
  302. package/src/animate/stories/index.story.tsx +0 -10
  303. package/src/base-control/stories/index.story.tsx +1 -1
  304. package/src/base-control/styles/base-control-styles.tsx +115 -0
  305. package/src/base-control/styles/style.module.scss +39 -0
  306. package/src/border-box-control/border-box-control/README.md +2 -2
  307. package/src/border-box-control/border-box-control/hook.ts +5 -16
  308. package/src/border-box-control/border-box-control-linked-button/hook.ts +6 -10
  309. package/src/border-box-control/border-box-control-split-controls/hook.ts +11 -20
  310. package/src/border-box-control/border-box-control-visualizer/hook.ts +37 -11
  311. package/src/border-box-control/stories/index.story.tsx +1 -1
  312. package/src/border-box-control/style.module.scss +43 -0
  313. package/src/border-box-control/types.ts +6 -2
  314. package/src/border-control/border-control/hook.ts +10 -19
  315. package/src/border-control/border-control-dropdown/component.tsx +6 -8
  316. package/src/border-control/border-control-dropdown/hook.ts +23 -32
  317. package/src/border-control/style.module.scss +93 -0
  318. package/src/border-control/test/{index.js → index.jsx} +63 -31
  319. package/src/box-control/box-input-control.tsx +31 -16
  320. package/src/box-control/index.tsx +15 -12
  321. package/src/box-control/style.module.scss +28 -0
  322. package/src/box-control/test/index.tsx +161 -0
  323. package/src/button/index.tsx +32 -10
  324. package/src/button/test/index.tsx +51 -0
  325. package/src/card/card-body/hook.ts +2 -2
  326. package/src/card/styles.ts +11 -1
  327. package/src/card/test/__snapshots__/index.tsx.snap +27 -27
  328. package/src/circular-option-picker/README.md +8 -4
  329. package/src/circular-option-picker/circular-option-picker-option.tsx +26 -16
  330. package/src/circular-option-picker/circular-option-picker.tsx +47 -14
  331. package/src/circular-option-picker/index.tsx +5 -1
  332. package/src/circular-option-picker/stories/index.story.tsx +3 -3
  333. package/src/circular-option-picker/test/index.tsx +152 -3
  334. package/src/circular-option-picker/types.ts +38 -32
  335. package/src/circular-option-picker/utils.tsx +35 -5
  336. package/src/clipboard-button/index.tsx +1 -1
  337. package/src/color-palette/README.md +11 -7
  338. package/src/color-palette/index.tsx +28 -14
  339. package/src/color-palette/stories/index.story.tsx +5 -0
  340. package/src/color-palette/style.module.scss +12 -0
  341. package/src/color-palette/test/index.tsx +80 -5
  342. package/src/color-palette/types.ts +23 -3
  343. package/src/color-picker/stories/index.story.tsx +0 -5
  344. package/src/combobox-control/README.md +1 -1
  345. package/src/combobox-control/index.tsx +4 -4
  346. package/src/combobox-control/style.module.scss +6 -0
  347. package/src/combobox-control/style.scss +1 -1
  348. package/src/combobox-control/types.ts +4 -2
  349. package/src/composite/legacy/stories/index.story.tsx +10 -10
  350. package/src/composite/stories/index.story.tsx +0 -5
  351. package/src/confirm-dialog/README.md +16 -0
  352. package/src/confirm-dialog/component.tsx +7 -1
  353. package/src/confirm-dialog/test/index.tsx +41 -0
  354. package/src/confirm-dialog/types.ts +11 -0
  355. package/src/content-editable-control/style.module.scss +0 -1
  356. package/src/context/{context-system-provider.js → context-system-provider.jsx} +0 -1
  357. package/src/context/test/__snapshots__/{context-system-provider.js.snap → context-system-provider.jsx.snap} +3 -3
  358. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +24 -3
  359. package/src/custom-gradient-picker/gradient-bar/index.tsx +2 -0
  360. package/src/custom-gradient-picker/test/index.tsx +134 -0
  361. package/src/custom-gradient-picker/types.ts +10 -0
  362. package/src/dropdown/dropdown-content-wrapper.tsx +17 -7
  363. package/src/dropdown/stories/index.story.tsx +0 -5
  364. package/src/dropdown/style.module.scss +25 -0
  365. package/src/dropdown/test/index.tsx +51 -0
  366. package/src/duotone-picker/README.md +21 -6
  367. package/src/duotone-picker/custom-duotone-bar.tsx +1 -0
  368. package/src/duotone-picker/duotone-picker.tsx +79 -54
  369. package/src/duotone-picker/stories/duotone-picker.story.tsx +63 -15
  370. package/src/duotone-picker/test/custom-duotone-bar.tsx +114 -0
  371. package/src/duotone-picker/test/index.tsx +346 -0
  372. package/src/duotone-picker/types.ts +48 -4
  373. package/src/focal-point-picker/index.tsx +6 -2
  374. package/src/focal-point-picker/stories/index.story.tsx +15 -0
  375. package/src/focal-point-picker/test/index.tsx +31 -0
  376. package/src/form-toggle/stories/index.story.tsx +3 -0
  377. package/src/form-token-field/style.scss +7 -1
  378. package/src/gradient-picker/README.md +19 -10
  379. package/src/gradient-picker/index.tsx +43 -16
  380. package/src/gradient-picker/stories/index.story.tsx +5 -0
  381. package/src/gradient-picker/test/index.tsx +84 -0
  382. package/src/gradient-picker/types.ts +22 -3
  383. package/src/input-control/input-field.tsx +1 -0
  384. package/src/input-control/stories/index.story.tsx +3 -3
  385. package/src/input-control/stories/migration-guide.mdx +201 -0
  386. package/src/input-control/style.scss +11 -0
  387. package/src/input-control/styles/input-control-styles.tsx +30 -11
  388. package/src/input-control/test/{index.js → index.jsx} +10 -0
  389. package/src/keyboard-shortcuts/stories/index.story.tsx +2 -2
  390. package/src/menu-group/stories/index.story.tsx +9 -6
  391. package/src/menu-item/stories/index.story.tsx +6 -3
  392. package/src/menu-items-choice/stories/index.story.tsx +14 -11
  393. package/src/modal/index.tsx +1 -0
  394. package/src/modal/test/index.tsx +19 -0
  395. package/src/navigator/stories/index.story.tsx +0 -5
  396. package/src/number-control/stories/index.story.tsx +3 -3
  397. package/src/palette-edit/index.tsx +364 -70
  398. package/src/palette-edit/stories/index.story.tsx +59 -18
  399. package/src/palette-edit/style.scss +3 -1
  400. package/src/palette-edit/test/index.tsx +375 -1
  401. package/src/palette-edit/types.ts +50 -8
  402. package/src/popover/README.md +2 -2
  403. package/src/popover/stories/index.story.tsx +5 -1
  404. package/src/popover/stories/utils.tsx +79 -0
  405. package/src/popover/test/index.tsx +24 -1
  406. package/src/popover/test/utils/index.js +1 -0
  407. package/src/popover/test/utils/index.tsx +4 -78
  408. package/src/popover/types.ts +9 -3
  409. package/src/private-apis.ts +0 -8
  410. package/src/progress-bar/index.tsx +10 -6
  411. package/src/progress-bar/style.module.scss +62 -0
  412. package/src/progress-bar/test/index.tsx +13 -11
  413. package/src/radio-control/README.md +3 -1
  414. package/src/radio-control/index.tsx +1 -0
  415. package/src/radio-control/stories/index.story.tsx +12 -0
  416. package/src/radio-control/style.scss +1 -3
  417. package/src/radio-control/test/index.tsx +59 -0
  418. package/src/radio-control/types.ts +6 -0
  419. package/src/range-control/stories/index.story.tsx +30 -0
  420. package/src/resizable-box/resize-tooltip/index.tsx +16 -7
  421. package/src/resizable-box/resize-tooltip/label.tsx +18 -12
  422. package/src/resizable-box/resize-tooltip/style.module.scss +40 -0
  423. package/src/resizable-box/resize-tooltip/test/index.tsx +44 -0
  424. package/src/resizable-box/resize-tooltip/test/label.tsx +25 -0
  425. package/src/resizable-box/stories/index.story.tsx +11 -0
  426. package/src/sandbox/stories/index.story.tsx +2 -0
  427. package/src/scrollable/hook.ts +11 -17
  428. package/src/scrollable/stories/index.story.tsx +1 -0
  429. package/src/scrollable/style.module.scss +44 -0
  430. package/src/scrollable/test/index.tsx +120 -6
  431. package/src/snackbar/index.tsx +10 -6
  432. package/src/snackbar/stories/index.story.tsx +5 -0
  433. package/src/snackbar/stories/list.story.tsx +3 -0
  434. package/src/snackbar/test/index.tsx +28 -2
  435. package/src/snackbar/test/list.tsx +61 -1
  436. package/src/spinner/stories/index.story.tsx +2 -2
  437. package/src/style.scss +1 -0
  438. package/src/text-control/stories/index.story.tsx +2 -3
  439. package/src/text-control/style.scss +0 -1
  440. package/src/textarea-control/index.tsx +6 -3
  441. package/src/textarea-control/stories/index.story.tsx +2 -3
  442. package/src/textarea-control/stories/migration-guide.mdx +79 -0
  443. package/src/textarea-control/style.module.scss +56 -0
  444. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +12 -116
  445. package/src/toggle-group-control/toggle-group-control/style.module.scss +0 -2
  446. package/src/toggle-group-control/toggle-group-control-option-base/style.module.scss +0 -2
  447. package/src/tools-panel/test/index.tsx +39 -0
  448. package/src/tools-panel/tools-panel-item/hook.ts +4 -1
  449. package/src/utils/config-values.js +0 -3
  450. package/src/utils/theme-variables.scss +0 -1
  451. package/src/validated-form-controls/components/content-editable-control.tsx +2 -1
  452. package/src/validated-form-controls/components/custom-select-control.tsx +2 -1
  453. package/src/validated-form-controls/components/index.ts +0 -4
  454. package/src/validated-form-controls/components/input-control.tsx +9 -1
  455. package/src/validated-form-controls/components/range-control.tsx +2 -1
  456. package/src/validated-form-controls/components/stories/content-editable-control.story.tsx +6 -0
  457. package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +6 -0
  458. package/src/validated-form-controls/components/stories/overview.mdx +4 -47
  459. package/src/validated-form-controls/components/textarea-control.tsx +9 -1
  460. package/src/validated-form-controls/index.ts +0 -1
  461. package/src/validated-form-controls/style.scss +11 -67
  462. package/src/validated-form-controls/test/input-control.tsx +12 -0
  463. package/src/validated-form-controls/test/textarea-control.tsx +17 -0
  464. package/src/z-stack/component.tsx +17 -9
  465. package/src/z-stack/style.module.scss +26 -0
  466. package/build/border-box-control/styles.cjs +0 -99
  467. package/build/border-box-control/styles.cjs.map +0 -7
  468. package/build/border-control/styles.cjs +0 -117
  469. package/build/border-control/styles.cjs.map +0 -7
  470. package/build/box-control/styles/box-control-styles.cjs +0 -131
  471. package/build/box-control/styles/box-control-styles.cjs.map +0 -7
  472. package/build/color-palette/styles.cjs +0 -49
  473. package/build/color-palette/styles.cjs.map +0 -7
  474. package/build/combobox-control/styles.cjs +0 -49
  475. package/build/combobox-control/styles.cjs.map +0 -7
  476. package/build/dropdown/styles.cjs +0 -61
  477. package/build/dropdown/styles.cjs.map +0 -7
  478. package/build/progress-bar/styles.cjs +0 -106
  479. package/build/progress-bar/styles.cjs.map +0 -7
  480. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.cjs +0 -90
  481. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.cjs.map +0 -7
  482. package/build/scrollable/styles.cjs +0 -96
  483. package/build/scrollable/styles.cjs.map +0 -7
  484. package/build/textarea-control/styles/textarea-control-styles.cjs +0 -54
  485. package/build/textarea-control/styles/textarea-control-styles.cjs.map +0 -7
  486. package/build/validated-form-controls/components/combobox-control.cjs +0 -75
  487. package/build/validated-form-controls/components/combobox-control.cjs.map +0 -7
  488. package/build/validated-form-controls/components/form-token-field.cjs +0 -69
  489. package/build/validated-form-controls/components/form-token-field.cjs.map +0 -7
  490. package/build/validated-form-controls/components/toggle-control.cjs +0 -67
  491. package/build/validated-form-controls/components/toggle-control.cjs.map +0 -7
  492. package/build/validated-form-controls/components/toggle-group-control.cjs +0 -71
  493. package/build/validated-form-controls/components/toggle-group-control.cjs.map +0 -7
  494. package/build/validated-form-controls/control-with-error.cjs +0 -200
  495. package/build/validated-form-controls/control-with-error.cjs.map +0 -7
  496. package/build/validated-form-controls/validity-indicator.cjs +0 -67
  497. package/build/validated-form-controls/validity-indicator.cjs.map +0 -7
  498. package/build/z-stack/styles.cjs +0 -80
  499. package/build/z-stack/styles.cjs.map +0 -7
  500. package/build-module/border-box-control/styles.mjs +0 -67
  501. package/build-module/border-box-control/styles.mjs.map +0 -7
  502. package/build-module/border-control/styles.mjs +0 -80
  503. package/build-module/border-control/styles.mjs.map +0 -7
  504. package/build-module/box-control/styles/box-control-styles.mjs +0 -91
  505. package/build-module/box-control/styles/box-control-styles.mjs.map +0 -7
  506. package/build-module/color-palette/styles.mjs +0 -14
  507. package/build-module/color-palette/styles.mjs.map +0 -7
  508. package/build-module/combobox-control/styles.mjs +0 -14
  509. package/build-module/combobox-control/styles.mjs.map +0 -7
  510. package/build-module/dropdown/styles.mjs +0 -26
  511. package/build-module/dropdown/styles.mjs.map +0 -7
  512. package/build-module/progress-bar/styles.mjs +0 -68
  513. package/build-module/progress-bar/styles.mjs.map +0 -7
  514. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.mjs +0 -52
  515. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.mjs.map +0 -7
  516. package/build-module/scrollable/styles.mjs +0 -65
  517. package/build-module/scrollable/styles.mjs.map +0 -7
  518. package/build-module/textarea-control/styles/textarea-control-styles.mjs +0 -19
  519. package/build-module/textarea-control/styles/textarea-control-styles.mjs.map +0 -7
  520. package/build-module/validated-form-controls/components/combobox-control.mjs +0 -40
  521. package/build-module/validated-form-controls/components/combobox-control.mjs.map +0 -7
  522. package/build-module/validated-form-controls/components/form-token-field.mjs +0 -44
  523. package/build-module/validated-form-controls/components/form-token-field.mjs.map +0 -7
  524. package/build-module/validated-form-controls/components/toggle-control.mjs +0 -32
  525. package/build-module/validated-form-controls/components/toggle-control.mjs.map +0 -7
  526. package/build-module/validated-form-controls/components/toggle-group-control.mjs +0 -46
  527. package/build-module/validated-form-controls/components/toggle-group-control.mjs.map +0 -7
  528. package/build-module/validated-form-controls/control-with-error.mjs +0 -175
  529. package/build-module/validated-form-controls/control-with-error.mjs.map +0 -7
  530. package/build-module/validated-form-controls/validity-indicator.mjs +0 -32
  531. package/build-module/validated-form-controls/validity-indicator.mjs.map +0 -7
  532. package/build-module/z-stack/styles.mjs +0 -44
  533. package/build-module/z-stack/styles.mjs.map +0 -7
  534. package/build-types/alignment-matrix-control/stories/index.story.d.ts +0 -8
  535. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +0 -1
  536. package/build-types/alignment-matrix-control/test/index.d.ts +0 -2
  537. package/build-types/alignment-matrix-control/test/index.d.ts.map +0 -1
  538. package/build-types/angle-picker-control/stories/index.story.d.ts +0 -8
  539. package/build-types/angle-picker-control/stories/index.story.d.ts.map +0 -1
  540. package/build-types/animate/stories/index.story.d.ts +0 -12
  541. package/build-types/animate/stories/index.story.d.ts.map +0 -1
  542. package/build-types/autocomplete/test/get-autocomplete-match.d.ts +0 -2
  543. package/build-types/autocomplete/test/get-autocomplete-match.d.ts.map +0 -1
  544. package/build-types/autocomplete/test/index.d.ts +0 -2
  545. package/build-types/autocomplete/test/index.d.ts.map +0 -1
  546. package/build-types/badge/stories/e2e/index.story.d.ts +0 -7
  547. package/build-types/badge/stories/e2e/index.story.d.ts.map +0 -1
  548. package/build-types/badge/stories/index.story.d.ts +0 -11
  549. package/build-types/badge/stories/index.story.d.ts.map +0 -1
  550. package/build-types/badge/test/index.d.ts +0 -2
  551. package/build-types/badge/test/index.d.ts.map +0 -1
  552. package/build-types/base-control/stories/index.story.d.ts +0 -17
  553. package/build-types/base-control/stories/index.story.d.ts.map +0 -1
  554. package/build-types/base-control/test/index.d.ts +0 -2
  555. package/build-types/base-control/test/index.d.ts.map +0 -1
  556. package/build-types/border-box-control/stories/index.story.d.ts +0 -14
  557. package/build-types/border-box-control/stories/index.story.d.ts.map +0 -1
  558. package/build-types/border-box-control/styles.d.ts +0 -10
  559. package/build-types/border-box-control/styles.d.ts.map +0 -1
  560. package/build-types/border-box-control/test/index.d.ts +0 -2
  561. package/build-types/border-box-control/test/index.d.ts.map +0 -1
  562. package/build-types/border-box-control/test/utils.d.ts +0 -2
  563. package/build-types/border-box-control/test/utils.d.ts.map +0 -1
  564. package/build-types/border-control/stories/index.story.d.ts +0 -109
  565. package/build-types/border-control/stories/index.story.d.ts.map +0 -1
  566. package/build-types/border-control/styles.d.ts +0 -17
  567. package/build-types/border-control/styles.d.ts.map +0 -1
  568. package/build-types/box-control/stories/index.story.d.ts +0 -12
  569. package/build-types/box-control/stories/index.story.d.ts.map +0 -1
  570. package/build-types/box-control/styles/box-control-styles.d.ts +0 -65
  571. package/build-types/box-control/styles/box-control-styles.d.ts.map +0 -1
  572. package/build-types/box-control/test/index.d.ts +0 -2
  573. package/build-types/box-control/test/index.d.ts.map +0 -1
  574. package/build-types/button/stories/e2e/index.story.d.ts +0 -9
  575. package/build-types/button/stories/e2e/index.story.d.ts.map +0 -1
  576. package/build-types/button/stories/index.story.d.ts +0 -31
  577. package/build-types/button/stories/index.story.d.ts.map +0 -1
  578. package/build-types/button/test/index.d.ts +0 -2
  579. package/build-types/button/test/index.d.ts.map +0 -1
  580. package/build-types/button-group/stories/index.story.d.ts +0 -12
  581. package/build-types/button-group/stories/index.story.d.ts.map +0 -1
  582. package/build-types/card/stories/index.story.d.ts +0 -20
  583. package/build-types/card/stories/index.story.d.ts.map +0 -1
  584. package/build-types/card/test/index.d.ts +0 -2
  585. package/build-types/card/test/index.d.ts.map +0 -1
  586. package/build-types/checkbox-control/stories/index.story.d.ts +0 -24
  587. package/build-types/checkbox-control/stories/index.story.d.ts.map +0 -1
  588. package/build-types/checkbox-control/test/index.d.ts +0 -2
  589. package/build-types/checkbox-control/test/index.d.ts.map +0 -1
  590. package/build-types/circular-option-picker/stories/index.story.d.ts +0 -10
  591. package/build-types/circular-option-picker/stories/index.story.d.ts.map +0 -1
  592. package/build-types/circular-option-picker/test/index.d.ts +0 -2
  593. package/build-types/circular-option-picker/test/index.d.ts.map +0 -1
  594. package/build-types/color-indicator/stories/index.story.d.ts +0 -6
  595. package/build-types/color-indicator/stories/index.story.d.ts.map +0 -1
  596. package/build-types/color-indicator/test/index.d.ts +0 -2
  597. package/build-types/color-indicator/test/index.d.ts.map +0 -1
  598. package/build-types/color-palette/stories/index.story.d.ts +0 -11
  599. package/build-types/color-palette/stories/index.story.d.ts.map +0 -1
  600. package/build-types/color-palette/styles.d.ts +0 -11
  601. package/build-types/color-palette/styles.d.ts.map +0 -1
  602. package/build-types/color-palette/test/index.d.ts +0 -2
  603. package/build-types/color-palette/test/index.d.ts.map +0 -1
  604. package/build-types/color-palette/test/utils.d.ts +0 -2
  605. package/build-types/color-palette/test/utils.d.ts.map +0 -1
  606. package/build-types/color-picker/stories/index.story.d.ts +0 -6
  607. package/build-types/color-picker/stories/index.story.d.ts.map +0 -1
  608. package/build-types/color-picker/test/index.d.ts +0 -2
  609. package/build-types/color-picker/test/index.d.ts.map +0 -1
  610. package/build-types/combobox-control/stories/index.story.d.ts +0 -93
  611. package/build-types/combobox-control/stories/index.story.d.ts.map +0 -1
  612. package/build-types/combobox-control/styles.d.ts +0 -6
  613. package/build-types/combobox-control/styles.d.ts.map +0 -1
  614. package/build-types/combobox-control/test/index.d.ts +0 -2
  615. package/build-types/combobox-control/test/index.d.ts.map +0 -1
  616. package/build-types/composite/legacy/stories/index.story.d.ts +0 -9
  617. package/build-types/composite/legacy/stories/index.story.d.ts.map +0 -1
  618. package/build-types/composite/legacy/stories/utils.d.ts +0 -27
  619. package/build-types/composite/legacy/stories/utils.d.ts.map +0 -1
  620. package/build-types/composite/legacy/test/index.d.ts +0 -2
  621. package/build-types/composite/legacy/test/index.d.ts.map +0 -1
  622. package/build-types/composite/stories/index.story.d.ts +0 -33
  623. package/build-types/composite/stories/index.story.d.ts.map +0 -1
  624. package/build-types/composite/test/index.d.ts +0 -2
  625. package/build-types/composite/test/index.d.ts.map +0 -1
  626. package/build-types/confirm-dialog/stories/index.story.d.ts +0 -7
  627. package/build-types/confirm-dialog/stories/index.story.d.ts.map +0 -1
  628. package/build-types/confirm-dialog/test/index.d.ts +0 -2
  629. package/build-types/confirm-dialog/test/index.d.ts.map +0 -1
  630. package/build-types/content-editable-control/stories/index.story.d.ts +0 -7
  631. package/build-types/content-editable-control/stories/index.story.d.ts.map +0 -1
  632. package/build-types/content-editable-control/test/index.d.ts +0 -2
  633. package/build-types/content-editable-control/test/index.d.ts.map +0 -1
  634. package/build-types/context/test/context-connect.d.ts +0 -2
  635. package/build-types/context/test/context-connect.d.ts.map +0 -1
  636. package/build-types/context/test/wordpress-component.d.ts +0 -2
  637. package/build-types/context/test/wordpress-component.d.ts.map +0 -1
  638. package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts +0 -2
  639. package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts.map +0 -1
  640. package/build-types/custom-gradient-picker/stories/index.story.d.ts +0 -6
  641. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +0 -1
  642. package/build-types/custom-gradient-picker/test/index.d.ts +0 -2
  643. package/build-types/custom-gradient-picker/test/index.d.ts.map +0 -1
  644. package/build-types/custom-gradient-picker/test/serializer.d.ts +0 -2
  645. package/build-types/custom-gradient-picker/test/serializer.d.ts.map +0 -1
  646. package/build-types/custom-select-control/stories/index.story.d.ts +0 -8
  647. package/build-types/custom-select-control/stories/index.story.d.ts.map +0 -1
  648. package/build-types/custom-select-control/test/index.d.ts +0 -2
  649. package/build-types/custom-select-control/test/index.d.ts.map +0 -1
  650. package/build-types/custom-select-control-v2/stories/index.story.d.ts +0 -38
  651. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +0 -1
  652. package/build-types/custom-select-control-v2/test/index.d.ts +0 -2
  653. package/build-types/custom-select-control-v2/test/index.d.ts.map +0 -1
  654. package/build-types/date-time/date-picker/test/index.d.ts +0 -2
  655. package/build-types/date-time/date-picker/test/index.d.ts.map +0 -1
  656. package/build-types/date-time/date-picker/test/use-lilius.d.ts +0 -2
  657. package/build-types/date-time/date-picker/test/use-lilius.d.ts.map +0 -1
  658. package/build-types/date-time/date-time/test/index.d.ts +0 -2
  659. package/build-types/date-time/date-time/test/index.d.ts.map +0 -1
  660. package/build-types/date-time/stories/date-time.story.d.ts +0 -8
  661. package/build-types/date-time/stories/date-time.story.d.ts.map +0 -1
  662. package/build-types/date-time/stories/date.story.d.ts +0 -8
  663. package/build-types/date-time/stories/date.story.d.ts.map +0 -1
  664. package/build-types/date-time/stories/time.story.d.ts +0 -11
  665. package/build-types/date-time/stories/time.story.d.ts.map +0 -1
  666. package/build-types/date-time/stories/utils.d.ts +0 -3
  667. package/build-types/date-time/stories/utils.d.ts.map +0 -1
  668. package/build-types/date-time/test/utils.test.d.ts +0 -2
  669. package/build-types/date-time/test/utils.test.d.ts.map +0 -1
  670. package/build-types/date-time/time-picker/test/index.d.ts +0 -2
  671. package/build-types/date-time/time-picker/test/index.d.ts.map +0 -1
  672. package/build-types/date-time/time-picker/time-input/test/index.d.ts +0 -2
  673. package/build-types/date-time/time-picker/time-input/test/index.d.ts.map +0 -1
  674. package/build-types/disabled/stories/index.story.d.ts +0 -7
  675. package/build-types/disabled/stories/index.story.d.ts.map +0 -1
  676. package/build-types/disabled/test/index.d.ts +0 -2
  677. package/build-types/disabled/test/index.d.ts.map +0 -1
  678. package/build-types/divider/stories/index.story.d.ts +0 -8
  679. package/build-types/divider/stories/index.story.d.ts.map +0 -1
  680. package/build-types/divider/test/index.d.ts +0 -2
  681. package/build-types/divider/test/index.d.ts.map +0 -1
  682. package/build-types/draggable/stories/index.story.d.ts +0 -13
  683. package/build-types/draggable/stories/index.story.d.ts.map +0 -1
  684. package/build-types/drop-zone/stories/index.story.d.ts +0 -6
  685. package/build-types/drop-zone/stories/index.story.d.ts.map +0 -1
  686. package/build-types/dropdown/stories/index.story.d.ts +0 -18
  687. package/build-types/dropdown/stories/index.story.d.ts.map +0 -1
  688. package/build-types/dropdown/styles.d.ts +0 -6
  689. package/build-types/dropdown/styles.d.ts.map +0 -1
  690. package/build-types/dropdown/test/index.d.ts +0 -2
  691. package/build-types/dropdown/test/index.d.ts.map +0 -1
  692. package/build-types/dropdown-menu/stories/index.story.d.ts +0 -7
  693. package/build-types/dropdown-menu/stories/index.story.d.ts.map +0 -1
  694. package/build-types/dropdown-menu/test/index.d.ts +0 -2
  695. package/build-types/dropdown-menu/test/index.d.ts.map +0 -1
  696. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +0 -7
  697. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +0 -1
  698. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +0 -8
  699. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +0 -1
  700. package/build-types/elevation/stories/index.story.d.ts +0 -16
  701. package/build-types/elevation/stories/index.story.d.ts.map +0 -1
  702. package/build-types/elevation/test/index.d.ts +0 -2
  703. package/build-types/elevation/test/index.d.ts.map +0 -1
  704. package/build-types/external-link/stories/index.story.d.ts +0 -6
  705. package/build-types/external-link/stories/index.story.d.ts.map +0 -1
  706. package/build-types/external-link/test/index.d.ts +0 -2
  707. package/build-types/external-link/test/index.d.ts.map +0 -1
  708. package/build-types/flex/stories/index.story.d.ts +0 -7
  709. package/build-types/flex/stories/index.story.d.ts.map +0 -1
  710. package/build-types/flex/test/index.d.ts +0 -2
  711. package/build-types/flex/test/index.d.ts.map +0 -1
  712. package/build-types/focal-point-picker/stories/index.story.d.ts +0 -49
  713. package/build-types/focal-point-picker/stories/index.story.d.ts.map +0 -1
  714. package/build-types/focal-point-picker/test/index.d.ts +0 -2
  715. package/build-types/focal-point-picker/test/index.d.ts.map +0 -1
  716. package/build-types/focal-point-picker/test/media.d.ts +0 -2
  717. package/build-types/focal-point-picker/test/media.d.ts.map +0 -1
  718. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +0 -20
  719. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +0 -1
  720. package/build-types/font-size-picker/stories/index.story.d.ts +0 -26
  721. package/build-types/font-size-picker/stories/index.story.d.ts.map +0 -1
  722. package/build-types/font-size-picker/test/font-size-picker-select.d.ts +0 -2
  723. package/build-types/font-size-picker/test/font-size-picker-select.d.ts.map +0 -1
  724. package/build-types/font-size-picker/test/font-size-picker-toggle-group.d.ts +0 -2
  725. package/build-types/font-size-picker/test/font-size-picker-toggle-group.d.ts.map +0 -1
  726. package/build-types/font-size-picker/test/index.d.ts +0 -2
  727. package/build-types/font-size-picker/test/index.d.ts.map +0 -1
  728. package/build-types/font-size-picker/test/utils.d.ts +0 -2
  729. package/build-types/font-size-picker/test/utils.d.ts.map +0 -1
  730. package/build-types/form-file-upload/stories/index.story.d.ts +0 -17
  731. package/build-types/form-file-upload/stories/index.story.d.ts.map +0 -1
  732. package/build-types/form-file-upload/test/index.d.ts +0 -2
  733. package/build-types/form-file-upload/test/index.d.ts.map +0 -1
  734. package/build-types/form-toggle/stories/index.story.d.ts +0 -6
  735. package/build-types/form-toggle/stories/index.story.d.ts.map +0 -1
  736. package/build-types/form-toggle/test/index.d.ts +0 -2
  737. package/build-types/form-toggle/test/index.d.ts.map +0 -1
  738. package/build-types/form-token-field/stories/index.story.d.ts +0 -25
  739. package/build-types/form-token-field/stories/index.story.d.ts.map +0 -1
  740. package/build-types/form-token-field/test/index.d.ts +0 -2
  741. package/build-types/form-token-field/test/index.d.ts.map +0 -1
  742. package/build-types/gradient-picker/stories/index.story.d.ts +0 -11
  743. package/build-types/gradient-picker/stories/index.story.d.ts.map +0 -1
  744. package/build-types/gradient-picker/test/index.d.ts +0 -2
  745. package/build-types/gradient-picker/test/index.d.ts.map +0 -1
  746. package/build-types/grid/stories/index.story.d.ts +0 -6
  747. package/build-types/grid/stories/index.story.d.ts.map +0 -1
  748. package/build-types/grid/test/grid.d.ts +0 -2
  749. package/build-types/grid/test/grid.d.ts.map +0 -1
  750. package/build-types/guide/stories/index.story.d.ts +0 -6
  751. package/build-types/guide/stories/index.story.d.ts.map +0 -1
  752. package/build-types/guide/test/index.d.ts +0 -2
  753. package/build-types/guide/test/index.d.ts.map +0 -1
  754. package/build-types/h-stack/stories/e2e/index.story.d.ts +0 -6
  755. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +0 -1
  756. package/build-types/h-stack/stories/index.story.d.ts +0 -6
  757. package/build-types/h-stack/stories/index.story.d.ts.map +0 -1
  758. package/build-types/h-stack/test/index.d.ts +0 -2
  759. package/build-types/h-stack/test/index.d.ts.map +0 -1
  760. package/build-types/heading/stories/index.story.d.ts +0 -6
  761. package/build-types/heading/stories/index.story.d.ts.map +0 -1
  762. package/build-types/heading/test/index.d.ts +0 -2
  763. package/build-types/heading/test/index.d.ts.map +0 -1
  764. package/build-types/higher-order/with-fallback-styles/test/index.d.ts +0 -2
  765. package/build-types/higher-order/with-fallback-styles/test/index.d.ts.map +0 -1
  766. package/build-types/higher-order/with-filters/test/index.d.ts +0 -2
  767. package/build-types/higher-order/with-filters/test/index.d.ts.map +0 -1
  768. package/build-types/higher-order/with-focus-outside/test/index.d.ts +0 -2
  769. package/build-types/higher-order/with-focus-outside/test/index.d.ts.map +0 -1
  770. package/build-types/higher-order/with-focus-return/test/index.d.ts +0 -2
  771. package/build-types/higher-order/with-focus-return/test/index.d.ts.map +0 -1
  772. package/build-types/higher-order/with-notices/test/index.d.ts +0 -2
  773. package/build-types/higher-order/with-notices/test/index.d.ts.map +0 -1
  774. package/build-types/higher-order/with-spoken-messages/test/index.d.ts +0 -2
  775. package/build-types/higher-order/with-spoken-messages/test/index.d.ts.map +0 -1
  776. package/build-types/icon/stories/index.story.d.ts +0 -21
  777. package/build-types/icon/stories/index.story.d.ts.map +0 -1
  778. package/build-types/icon/test/index.d.ts +0 -2
  779. package/build-types/icon/test/index.d.ts.map +0 -1
  780. package/build-types/input-control/stories/index.story.d.ts +0 -31
  781. package/build-types/input-control/stories/index.story.d.ts.map +0 -1
  782. package/build-types/isolated-event-container/test/index.d.ts +0 -2
  783. package/build-types/isolated-event-container/test/index.d.ts.map +0 -1
  784. package/build-types/item-group/stories/index.story.d.ts +0 -9
  785. package/build-types/item-group/stories/index.story.d.ts.map +0 -1
  786. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +0 -6
  787. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +0 -1
  788. package/build-types/keyboard-shortcuts/test/index.d.ts +0 -2
  789. package/build-types/keyboard-shortcuts/test/index.d.ts.map +0 -1
  790. package/build-types/menu/stories/index.story.d.ts +0 -13
  791. package/build-types/menu/stories/index.story.d.ts.map +0 -1
  792. package/build-types/menu/test/index.d.ts +0 -2
  793. package/build-types/menu/test/index.d.ts.map +0 -1
  794. package/build-types/menu-group/stories/index.story.d.ts +0 -11
  795. package/build-types/menu-group/stories/index.story.d.ts.map +0 -1
  796. package/build-types/menu-group/test/index.d.ts +0 -2
  797. package/build-types/menu-group/test/index.d.ts.map +0 -1
  798. package/build-types/menu-item/stories/index.story.d.ts +0 -70
  799. package/build-types/menu-item/stories/index.story.d.ts.map +0 -1
  800. package/build-types/menu-items-choice/stories/index.story.d.ts +0 -6
  801. package/build-types/menu-items-choice/stories/index.story.d.ts.map +0 -1
  802. package/build-types/modal/stories/index.story.d.ts +0 -11
  803. package/build-types/modal/stories/index.story.d.ts.map +0 -1
  804. package/build-types/modal/test/aria-helper.d.ts +0 -2
  805. package/build-types/modal/test/aria-helper.d.ts.map +0 -1
  806. package/build-types/modal/test/index.d.ts +0 -2
  807. package/build-types/modal/test/index.d.ts.map +0 -1
  808. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +0 -6
  809. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +0 -1
  810. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +0 -6
  811. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +0 -1
  812. package/build-types/navigable-container/test/navigable-menu.d.ts +0 -2
  813. package/build-types/navigable-container/test/navigable-menu.d.ts.map +0 -1
  814. package/build-types/navigable-container/test/tababble-container.d.ts +0 -2
  815. package/build-types/navigable-container/test/tababble-container.d.ts.map +0 -1
  816. package/build-types/navigator/stories/index.story.d.ts +0 -8
  817. package/build-types/navigator/stories/index.story.d.ts.map +0 -1
  818. package/build-types/navigator/test/index.d.ts +0 -2
  819. package/build-types/navigator/test/index.d.ts.map +0 -1
  820. package/build-types/navigator/test/router.d.ts +0 -2
  821. package/build-types/navigator/test/router.d.ts.map +0 -1
  822. package/build-types/notice/stories/index.story.d.ts +0 -15
  823. package/build-types/notice/stories/index.story.d.ts.map +0 -1
  824. package/build-types/notice/test/index.d.ts +0 -2
  825. package/build-types/notice/test/index.d.ts.map +0 -1
  826. package/build-types/notice/test/list.d.ts +0 -2
  827. package/build-types/notice/test/list.d.ts.map +0 -1
  828. package/build-types/number-control/stories/index.story.d.ts +0 -19
  829. package/build-types/number-control/stories/index.story.d.ts.map +0 -1
  830. package/build-types/number-control/test/index.d.ts +0 -2
  831. package/build-types/number-control/test/index.d.ts.map +0 -1
  832. package/build-types/palette-edit/stories/index.story.d.ts +0 -7
  833. package/build-types/palette-edit/stories/index.story.d.ts.map +0 -1
  834. package/build-types/palette-edit/test/index.d.ts +0 -2
  835. package/build-types/palette-edit/test/index.d.ts.map +0 -1
  836. package/build-types/panel/stories/index.story.d.ts +0 -13
  837. package/build-types/panel/stories/index.story.d.ts.map +0 -1
  838. package/build-types/panel/test/body.d.ts +0 -2
  839. package/build-types/panel/test/body.d.ts.map +0 -1
  840. package/build-types/panel/test/header.d.ts +0 -2
  841. package/build-types/panel/test/header.d.ts.map +0 -1
  842. package/build-types/panel/test/index.d.ts +0 -2
  843. package/build-types/panel/test/index.d.ts.map +0 -1
  844. package/build-types/panel/test/row.d.ts +0 -2
  845. package/build-types/panel/test/row.d.ts.map +0 -1
  846. package/build-types/placeholder/stories/index.story.d.ts +0 -6
  847. package/build-types/placeholder/stories/index.story.d.ts.map +0 -1
  848. package/build-types/placeholder/test/index.d.ts +0 -2
  849. package/build-types/placeholder/test/index.d.ts.map +0 -1
  850. package/build-types/popover/stories/e2e/index.story.d.ts +0 -18
  851. package/build-types/popover/stories/e2e/index.story.d.ts.map +0 -1
  852. package/build-types/popover/stories/index.story.d.ts +0 -11
  853. package/build-types/popover/stories/index.story.d.ts.map +0 -1
  854. package/build-types/popover/test/index.d.ts +0 -2
  855. package/build-types/popover/test/index.d.ts.map +0 -1
  856. package/build-types/popover/test/utils/index.d.ts +0 -3
  857. package/build-types/popover/test/utils/index.d.ts.map +0 -1
  858. package/build-types/progress-bar/stories/index.story.d.ts +0 -23
  859. package/build-types/progress-bar/stories/index.story.d.ts.map +0 -1
  860. package/build-types/progress-bar/styles.d.ts +0 -16
  861. package/build-types/progress-bar/styles.d.ts.map +0 -1
  862. package/build-types/progress-bar/test/index.d.ts +0 -2
  863. package/build-types/progress-bar/test/index.d.ts.map +0 -1
  864. package/build-types/query-controls/stories/index.story.d.ts +0 -7
  865. package/build-types/query-controls/stories/index.story.d.ts.map +0 -1
  866. package/build-types/query-controls/test/terms.d.ts +0 -2
  867. package/build-types/query-controls/test/terms.d.ts.map +0 -1
  868. package/build-types/radio-control/stories/index.story.d.ts +0 -7
  869. package/build-types/radio-control/stories/index.story.d.ts.map +0 -1
  870. package/build-types/radio-control/test/index.d.ts +0 -2
  871. package/build-types/radio-control/test/index.d.ts.map +0 -1
  872. package/build-types/radio-group/stories/index.story.d.ts +0 -8
  873. package/build-types/radio-group/stories/index.story.d.ts.map +0 -1
  874. package/build-types/range-control/stories/index.story.d.ts +0 -42
  875. package/build-types/range-control/stories/index.story.d.ts.map +0 -1
  876. package/build-types/range-control/test/index.d.ts +0 -2
  877. package/build-types/range-control/test/index.d.ts.map +0 -1
  878. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +0 -18
  879. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +0 -1
  880. package/build-types/resizable-box/stories/index.story.d.ts +0 -46
  881. package/build-types/resizable-box/stories/index.story.d.ts.map +0 -1
  882. package/build-types/responsive-wrapper/stories/index.story.d.ts +0 -16
  883. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +0 -1
  884. package/build-types/sandbox/stories/index.story.d.ts +0 -7
  885. package/build-types/sandbox/stories/index.story.d.ts.map +0 -1
  886. package/build-types/sandbox/test/index.d.ts +0 -2
  887. package/build-types/sandbox/test/index.d.ts.map +0 -1
  888. package/build-types/scroll-lock/stories/index.story.d.ts +0 -6
  889. package/build-types/scroll-lock/stories/index.story.d.ts.map +0 -1
  890. package/build-types/scroll-lock/test/index.d.ts +0 -2
  891. package/build-types/scroll-lock/test/index.d.ts.map +0 -1
  892. package/build-types/scrollable/stories/index.story.d.ts +0 -6
  893. package/build-types/scrollable/stories/index.story.d.ts.map +0 -1
  894. package/build-types/scrollable/styles.d.ts +0 -8
  895. package/build-types/scrollable/styles.d.ts.map +0 -1
  896. package/build-types/scrollable/test/index.d.ts +0 -2
  897. package/build-types/scrollable/test/index.d.ts.map +0 -1
  898. package/build-types/search-control/stories/index.story.d.ts +0 -18
  899. package/build-types/search-control/stories/index.story.d.ts.map +0 -1
  900. package/build-types/search-control/test/index.d.ts +0 -2
  901. package/build-types/search-control/test/index.d.ts.map +0 -1
  902. package/build-types/select-control/stories/index.story.d.ts +0 -28
  903. package/build-types/select-control/stories/index.story.d.ts.map +0 -1
  904. package/build-types/select-control/test/select-control.d.ts +0 -2
  905. package/build-types/select-control/test/select-control.d.ts.map +0 -1
  906. package/build-types/shortcut/stories/index.story.d.ts +0 -7
  907. package/build-types/shortcut/stories/index.story.d.ts.map +0 -1
  908. package/build-types/shortcut/test/index.d.ts +0 -2
  909. package/build-types/shortcut/test/index.d.ts.map +0 -1
  910. package/build-types/slot-fill/stories/index.story.d.ts +0 -10
  911. package/build-types/slot-fill/stories/index.story.d.ts.map +0 -1
  912. package/build-types/snackbar/stories/index.story.d.ts +0 -10
  913. package/build-types/snackbar/stories/index.story.d.ts.map +0 -1
  914. package/build-types/snackbar/stories/list.story.d.ts +0 -6
  915. package/build-types/snackbar/stories/list.story.d.ts.map +0 -1
  916. package/build-types/snackbar/test/index.d.ts +0 -2
  917. package/build-types/snackbar/test/index.d.ts.map +0 -1
  918. package/build-types/snackbar/test/list.d.ts +0 -2
  919. package/build-types/snackbar/test/list.d.ts.map +0 -1
  920. package/build-types/spacer/stories/index.story.d.ts +0 -7
  921. package/build-types/spacer/stories/index.story.d.ts.map +0 -1
  922. package/build-types/spacer/test/index.d.ts +0 -2
  923. package/build-types/spacer/test/index.d.ts.map +0 -1
  924. package/build-types/spinner/stories/index.story.d.ts +0 -7
  925. package/build-types/spinner/stories/index.story.d.ts.map +0 -1
  926. package/build-types/style-provider/test/index.d.ts +0 -2
  927. package/build-types/style-provider/test/index.d.ts.map +0 -1
  928. package/build-types/surface/stories/index.story.d.ts +0 -6
  929. package/build-types/surface/stories/index.story.d.ts.map +0 -1
  930. package/build-types/surface/test/index.d.ts +0 -2
  931. package/build-types/surface/test/index.d.ts.map +0 -1
  932. package/build-types/tab-panel/stories/index.story.d.ts +0 -9
  933. package/build-types/tab-panel/stories/index.story.d.ts.map +0 -1
  934. package/build-types/tab-panel/test/index.d.ts +0 -2
  935. package/build-types/tab-panel/test/index.d.ts.map +0 -1
  936. package/build-types/tabs/stories/index.story.d.ts +0 -13
  937. package/build-types/tabs/stories/index.story.d.ts.map +0 -1
  938. package/build-types/tabs/test/index.d.ts +0 -2
  939. package/build-types/tabs/test/index.d.ts.map +0 -1
  940. package/build-types/text/stories/index.story.d.ts +0 -14
  941. package/build-types/text/stories/index.story.d.ts.map +0 -1
  942. package/build-types/text/test/index.d.ts +0 -2
  943. package/build-types/text/test/index.d.ts.map +0 -1
  944. package/build-types/text-control/stories/index.story.d.ts +0 -7
  945. package/build-types/text-control/stories/index.story.d.ts.map +0 -1
  946. package/build-types/text-control/test/text-control.d.ts +0 -2
  947. package/build-types/text-control/test/text-control.d.ts.map +0 -1
  948. package/build-types/text-highlight/stories/index.story.d.ts +0 -6
  949. package/build-types/text-highlight/stories/index.story.d.ts.map +0 -1
  950. package/build-types/text-highlight/test/index.d.ts +0 -2
  951. package/build-types/text-highlight/test/index.d.ts.map +0 -1
  952. package/build-types/textarea-control/stories/index.story.d.ts +0 -6
  953. package/build-types/textarea-control/stories/index.story.d.ts.map +0 -1
  954. package/build-types/textarea-control/styles/textarea-control-styles.d.ts +0 -5
  955. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +0 -1
  956. package/build-types/tip/stories/index.story.d.ts +0 -6
  957. package/build-types/tip/stories/index.story.d.ts.map +0 -1
  958. package/build-types/toggle-control/stories/index.story.d.ts +0 -13
  959. package/build-types/toggle-control/stories/index.story.d.ts.map +0 -1
  960. package/build-types/toggle-control/test/index.d.ts +0 -2
  961. package/build-types/toggle-control/test/index.d.ts.map +0 -1
  962. package/build-types/toggle-group-control/stories/index.story.d.ts +0 -21
  963. package/build-types/toggle-group-control/stories/index.story.d.ts.map +0 -1
  964. package/build-types/toggle-group-control/test/index.d.ts +0 -2
  965. package/build-types/toggle-group-control/test/index.d.ts.map +0 -1
  966. package/build-types/toolbar/stories/index.story.d.ts +0 -12
  967. package/build-types/toolbar/stories/index.story.d.ts.map +0 -1
  968. package/build-types/toolbar/test/index.d.ts +0 -2
  969. package/build-types/toolbar/test/index.d.ts.map +0 -1
  970. package/build-types/toolbar/test/toolbar-group.d.ts +0 -2
  971. package/build-types/toolbar/test/toolbar-group.d.ts.map +0 -1
  972. package/build-types/tools-panel/stories/index.story.d.ts +0 -11
  973. package/build-types/tools-panel/stories/index.story.d.ts.map +0 -1
  974. package/build-types/tools-panel/test/index.d.ts +0 -2
  975. package/build-types/tools-panel/test/index.d.ts.map +0 -1
  976. package/build-types/tooltip/stories/index.story.d.ts +0 -15
  977. package/build-types/tooltip/stories/index.story.d.ts.map +0 -1
  978. package/build-types/tooltip/test/index.d.ts +0 -2
  979. package/build-types/tooltip/test/index.d.ts.map +0 -1
  980. package/build-types/tooltip/test/utils/index.d.ts +0 -7
  981. package/build-types/tooltip/test/utils/index.d.ts.map +0 -1
  982. package/build-types/tree-grid/stories/index.story.d.ts +0 -6
  983. package/build-types/tree-grid/stories/index.story.d.ts.map +0 -1
  984. package/build-types/tree-grid/test/cell.d.ts +0 -2
  985. package/build-types/tree-grid/test/cell.d.ts.map +0 -1
  986. package/build-types/tree-grid/test/index.d.ts +0 -2
  987. package/build-types/tree-grid/test/index.d.ts.map +0 -1
  988. package/build-types/tree-grid/test/roving-tab-index-item.d.ts +0 -2
  989. package/build-types/tree-grid/test/roving-tab-index-item.d.ts.map +0 -1
  990. package/build-types/tree-grid/test/roving-tab-index.d.ts +0 -2
  991. package/build-types/tree-grid/test/roving-tab-index.d.ts.map +0 -1
  992. package/build-types/tree-grid/test/row.d.ts +0 -2
  993. package/build-types/tree-grid/test/row.d.ts.map +0 -1
  994. package/build-types/tree-select/stories/index.story.d.ts +0 -6
  995. package/build-types/tree-select/stories/index.story.d.ts.map +0 -1
  996. package/build-types/truncate/stories/index.story.d.ts +0 -7
  997. package/build-types/truncate/stories/index.story.d.ts.map +0 -1
  998. package/build-types/truncate/test/index.d.ts +0 -2
  999. package/build-types/truncate/test/index.d.ts.map +0 -1
  1000. package/build-types/unit-control/stories/index.story.d.ts +0 -27
  1001. package/build-types/unit-control/stories/index.story.d.ts.map +0 -1
  1002. package/build-types/unit-control/test/index.d.ts +0 -2
  1003. package/build-types/unit-control/test/index.d.ts.map +0 -1
  1004. package/build-types/unit-control/test/utils.d.ts +0 -2
  1005. package/build-types/unit-control/test/utils.d.ts.map +0 -1
  1006. package/build-types/utils/test/polymorphic-element.d.ts +0 -2
  1007. package/build-types/utils/test/polymorphic-element.d.ts.map +0 -1
  1008. package/build-types/v-stack/stories/e2e/index.story.d.ts +0 -6
  1009. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +0 -1
  1010. package/build-types/v-stack/stories/index.story.d.ts +0 -11
  1011. package/build-types/v-stack/stories/index.story.d.ts.map +0 -1
  1012. package/build-types/v-stack/test/index.d.ts +0 -2
  1013. package/build-types/v-stack/test/index.d.ts.map +0 -1
  1014. package/build-types/validated-form-controls/components/combobox-control.d.ts +0 -20
  1015. package/build-types/validated-form-controls/components/combobox-control.d.ts.map +0 -1
  1016. package/build-types/validated-form-controls/components/form-token-field.d.ts +0 -3
  1017. package/build-types/validated-form-controls/components/form-token-field.d.ts.map +0 -1
  1018. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +0 -6
  1019. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +0 -1
  1020. package/build-types/validated-form-controls/components/stories/content-editable-control.story.d.ts +0 -6
  1021. package/build-types/validated-form-controls/components/stories/content-editable-control.story.d.ts.map +0 -1
  1022. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +0 -6
  1023. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +0 -1
  1024. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +0 -9
  1025. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +0 -1
  1026. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +0 -12
  1027. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +0 -1
  1028. package/build-types/validated-form-controls/components/stories/overview.story.d.ts +0 -60
  1029. package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +0 -1
  1030. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +0 -6
  1031. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +0 -1
  1032. package/build-types/validated-form-controls/components/stories/story-utils.d.ts +0 -3
  1033. package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +0 -1
  1034. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +0 -6
  1035. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +0 -1
  1036. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +0 -6
  1037. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +0 -1
  1038. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +0 -6
  1039. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +0 -1
  1040. package/build-types/validated-form-controls/components/toggle-control.d.ts +0 -7
  1041. package/build-types/validated-form-controls/components/toggle-control.d.ts.map +0 -1
  1042. package/build-types/validated-form-controls/components/toggle-group-control.d.ts +0 -15
  1043. package/build-types/validated-form-controls/components/toggle-group-control.d.ts.map +0 -1
  1044. package/build-types/validated-form-controls/control-with-error.d.ts +0 -36
  1045. package/build-types/validated-form-controls/control-with-error.d.ts.map +0 -1
  1046. package/build-types/validated-form-controls/test/combobox-control.d.ts +0 -2
  1047. package/build-types/validated-form-controls/test/combobox-control.d.ts.map +0 -1
  1048. package/build-types/validated-form-controls/test/content-editable-control.d.ts +0 -2
  1049. package/build-types/validated-form-controls/test/content-editable-control.d.ts.map +0 -1
  1050. package/build-types/validated-form-controls/test/control-with-error.d.ts +0 -2
  1051. package/build-types/validated-form-controls/test/control-with-error.d.ts.map +0 -1
  1052. package/build-types/validated-form-controls/test/custom-select-control.d.ts +0 -2
  1053. package/build-types/validated-form-controls/test/custom-select-control.d.ts.map +0 -1
  1054. package/build-types/validated-form-controls/test/form-token-field.d.ts +0 -2
  1055. package/build-types/validated-form-controls/test/form-token-field.d.ts.map +0 -1
  1056. package/build-types/validated-form-controls/test/input-control.d.ts +0 -2
  1057. package/build-types/validated-form-controls/test/input-control.d.ts.map +0 -1
  1058. package/build-types/validated-form-controls/test/range-control.d.ts +0 -2
  1059. package/build-types/validated-form-controls/test/range-control.d.ts.map +0 -1
  1060. package/build-types/validated-form-controls/test/textarea-control.d.ts +0 -2
  1061. package/build-types/validated-form-controls/test/textarea-control.d.ts.map +0 -1
  1062. package/build-types/validated-form-controls/test/toggle-control.d.ts +0 -2
  1063. package/build-types/validated-form-controls/test/toggle-control.d.ts.map +0 -1
  1064. package/build-types/validated-form-controls/test/toggle-group-control.d.ts +0 -2
  1065. package/build-types/validated-form-controls/test/toggle-group-control.d.ts.map +0 -1
  1066. package/build-types/validated-form-controls/validity-indicator.d.ts +0 -6
  1067. package/build-types/validated-form-controls/validity-indicator.d.ts.map +0 -1
  1068. package/build-types/view/stories/index.story.d.ts +0 -6
  1069. package/build-types/view/stories/index.story.d.ts.map +0 -1
  1070. package/build-types/visually-hidden/stories/index.story.d.ts +0 -8
  1071. package/build-types/visually-hidden/stories/index.story.d.ts.map +0 -1
  1072. package/build-types/z-stack/stories/index.story.d.ts +0 -6
  1073. package/build-types/z-stack/stories/index.story.d.ts.map +0 -1
  1074. package/build-types/z-stack/styles.d.ts +0 -14
  1075. package/build-types/z-stack/styles.d.ts.map +0 -1
  1076. package/src/base-control/styles/base-control-styles.ts +0 -46
  1077. package/src/border-box-control/styles.ts +0 -71
  1078. package/src/border-control/styles.ts +0 -151
  1079. package/src/box-control/styles/box-control-styles.ts +0 -34
  1080. package/src/color-palette/styles.ts +0 -13
  1081. package/src/combobox-control/styles.ts +0 -9
  1082. package/src/dropdown/styles.ts +0 -33
  1083. package/src/progress-bar/styles.ts +0 -84
  1084. package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +0 -47
  1085. package/src/scrollable/styles.ts +0 -57
  1086. package/src/scrollable/test/__snapshots__/index.tsx.snap +0 -66
  1087. package/src/textarea-control/styles/textarea-control-styles.ts +0 -90
  1088. package/src/validated-form-controls/components/combobox-control.tsx +0 -56
  1089. package/src/validated-form-controls/components/form-token-field.tsx +0 -57
  1090. package/src/validated-form-controls/components/stories/combobox-control.story.tsx +0 -56
  1091. package/src/validated-form-controls/components/stories/form-token-field.story.tsx +0 -60
  1092. package/src/validated-form-controls/components/stories/input-control.story.tsx +0 -126
  1093. package/src/validated-form-controls/components/stories/overview.story.tsx +0 -560
  1094. package/src/validated-form-controls/components/stories/textarea-control.story.tsx +0 -50
  1095. package/src/validated-form-controls/components/stories/toggle-control.story.tsx +0 -47
  1096. package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +0 -58
  1097. package/src/validated-form-controls/components/toggle-control.tsx +0 -40
  1098. package/src/validated-form-controls/components/toggle-group-control.tsx +0 -55
  1099. package/src/validated-form-controls/control-with-error.tsx +0 -321
  1100. package/src/validated-form-controls/test/combobox-control.tsx +0 -61
  1101. package/src/validated-form-controls/test/control-with-error.tsx +0 -577
  1102. package/src/validated-form-controls/test/form-token-field.tsx +0 -52
  1103. package/src/validated-form-controls/test/toggle-control.tsx +0 -49
  1104. package/src/validated-form-controls/test/toggle-group-control.tsx +0 -28
  1105. package/src/validated-form-controls/validity-indicator.tsx +0 -40
  1106. package/src/z-stack/styles.ts +0 -35
  1107. /package/src/context/test/{context-system-provider.js → context-system-provider.jsx} +0 -0
  1108. /package/src/input-control/test/__snapshots__/{index.js.snap → index.jsx.snap} +0 -0
  1109. /package/src/item-group/test/__snapshots__/{index.js.snap → index.jsx.snap} +0 -0
  1110. /package/src/item-group/test/{index.js → index.jsx} +0 -0
  1111. /package/src/menu-item/test/__snapshots__/{index.js.snap → index.jsx.snap} +0 -0
  1112. /package/src/menu-item/test/{index.js → index.jsx} +0 -0
  1113. /package/src/slot-fill/test/__snapshots__/{slot.js.snap → slot.jsx.snap} +0 -0
  1114. /package/src/slot-fill/test/{index.js → index.jsx} +0 -0
  1115. /package/src/slot-fill/test/{slot.js → slot.jsx} +0 -0
  1116. /package/src/utils/hooks/test/{use-controlled-state.js → use-controlled-state.jsx} +0 -0
  1117. /package/src/utils/hooks/test/{use-controlled-value.js → use-controlled-value.jsx} +0 -0
  1118. /package/src/utils/hooks/test/{use-cx.js → use-cx.jsx} +0 -0
  1119. /package/src/utils/test/{get-node-text.js → get-node-text.jsx} +0 -0
  1120. /package/src/view/test/__snapshots__/{index.js.snap → index.jsx.snap} +0 -0
  1121. /package/src/view/test/{index.js → index.jsx} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/confirm-dialog/component.tsx", "../../../style-runtime/src/index.ts", "../../src/confirm-dialog/style.module.scss"],
4
- "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { useCallback, useEffect, useRef, useState } from '@wordpress/element';\nimport Modal from '../modal';\nimport { useContextSystem, contextConnect } from '../context';\nimport { Flex } from '../flex';\nimport Button from '../button';\nimport { Text } from '../text';\nimport { VStack } from '../v-stack';\nimport styles from './style.module.scss';\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nconst UnconnectedConfirmDialog = (props, forwardedRef) => {\n const {\n isOpen: isOpenProp,\n onConfirm,\n onCancel,\n children,\n confirmButtonText,\n cancelButtonText,\n isBusy,\n ...otherProps\n } = useContextSystem(props, 'ConfirmDialog');\n const wrapperClassName = styles.wrapper;\n const cancelButtonRef = useRef(null);\n const confirmButtonRef = useRef(null);\n const [isOpen, setIsOpen] = useState();\n const [shouldSelfClose, setShouldSelfClose] = useState();\n useEffect(() => {\n // We only allow the dialog to close itself if `isOpenProp` is *not* set.\n // If `isOpenProp` is set, then it (probably) means it's controlled by a\n // parent component. In that case, `shouldSelfClose` might do more harm than\n // good, so we disable it.\n const isIsOpenSet = typeof isOpenProp !== 'undefined';\n setIsOpen(isIsOpenSet ? isOpenProp : true);\n setShouldSelfClose(!isIsOpenSet);\n }, [isOpenProp]);\n const handleEvent = useCallback(callback => event => {\n callback?.(event);\n if (shouldSelfClose) {\n setIsOpen(false);\n }\n }, [shouldSelfClose, setIsOpen]);\n const handleEnter = useCallback(event => {\n // Avoid triggering the 'confirm' action when a button is focused,\n // as this can cause a double submission.\n const isConfirmOrCancelButton = event.target === cancelButtonRef.current || event.target === confirmButtonRef.current;\n if (!isConfirmOrCancelButton && event.key === 'Enter') {\n handleEvent(onConfirm)(event);\n }\n }, [handleEvent, onConfirm]);\n const cancelLabel = cancelButtonText ?? __('Cancel');\n const confirmLabel = confirmButtonText ?? __('OK');\n return /*#__PURE__*/_jsx(_Fragment, {\n children: isOpen && /*#__PURE__*/_jsx(Modal, {\n onRequestClose: handleEvent(onCancel),\n onKeyDown: handleEnter,\n closeButtonLabel: cancelLabel,\n isDismissible: true,\n ref: forwardedRef,\n overlayClassName: wrapperClassName,\n __experimentalHideHeader: true,\n ...otherProps,\n children: /*#__PURE__*/_jsxs(VStack, {\n spacing: 8,\n children: [/*#__PURE__*/_jsx(Text, {\n children: children\n }), /*#__PURE__*/_jsxs(Flex, {\n direction: \"row\",\n justify: \"flex-end\",\n children: [/*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ref: cancelButtonRef,\n variant: \"tertiary\",\n onClick: handleEvent(onCancel),\n accessibleWhenDisabled: true,\n disabled: isBusy,\n children: cancelLabel\n }), /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ref: confirmButtonRef,\n variant: \"primary\",\n onClick: handleEvent(onConfirm),\n accessibleWhenDisabled: true,\n disabled: isBusy,\n isBusy: isBusy,\n children: confirmLabel\n })]\n })]\n })\n })\n });\n};\n\n/**\n * `ConfirmDialog` is built on top of [`Modal`](/packages/components/src/modal/README.md)\n * and displays a confirmation dialog, with _confirm_ and _cancel_ buttons.\n *\n * The dialog is confirmed by clicking the _confirm_ button or by pressing the `Enter` key.\n * It is cancelled (closed) by clicking the _cancel_ button, by pressing the `ESC` key, or by\n * clicking outside the dialog focus (i.e. the overlay).\n *\n * `ConfirmDialog` has two main modes: controlled and uncontrolled.\n *\n * ### Uncontrolled mode\n *\n * Allows the component to be used standalone, just by declaring it as part of another React\n * component's render method:\n *\n * - It will be automatically open (displayed) upon mounting.\n * - It will be automatically closed when clicking the _cancel_ button, by pressing the `ESC`\n * key, or by clicking outside the dialog focus (i.e. the overlay).\n * - `onCancel` is not mandatory but can be passed. Even if passed, the dialog will still be\n * able to close itself.\n *\n * Activating this mode is as simple as omitting the `isOpen` prop. The only mandatory prop\n * in this case is the `onConfirm` callback. The message is passed as the `children`.\n *\n * ```jsx\n * import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n *\n * function Example() {\n * \treturn (\n * \t\t<ConfirmDialog onConfirm={ () => console.debug( 'Confirmed!' ) }>\n * \t\t\tAre you sure? <strong>This action cannot be undone!</strong>\n * \t\t</ConfirmDialog>\n * \t);\n * }\n * ```\n *\n * ### Controlled mode\n *\n * Let the parent component control when the dialog is open/closed. It's activated when a\n * boolean value is passed to `isOpen`:\n *\n * - It will not be automatically closed. You need to let it know when to open/close by\n * updating the value of the `isOpen` prop.\n * - Both `onConfirm` and the `onCancel` callbacks are mandatory props in this mode.\n * - You'll want to update the state that controls `isOpen` from the `onCancel` and\n * `onConfirm` callbacks.\n *\n * ```jsx\n * import { useState } from '@wordpress/element';\n * import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n *\n * function Example() {\n * \tconst [ isOpen, setIsOpen ] = useState( true );\n *\n * \tconst handleConfirm = () => {\n * \t\tconsole.debug( 'Confirmed!' );\n * \t\tsetIsOpen( false );\n * \t};\n *\n * \tconst handleCancel = () => {\n * \t\tconsole.debug( 'Cancelled!' );\n * \t\tsetIsOpen( false );\n * \t};\n *\n * \treturn (\n * \t\t<ConfirmDialog\n * \t\t\tisOpen={ isOpen }\n * \t\t\tonConfirm={ handleConfirm }\n * \t\t\tonCancel={ handleCancel }\n * \t\t>\n * \t\t\tAre you sure? <strong>This action cannot be undone!</strong>\n * \t\t</ConfirmDialog>\n * \t);\n * }\n * ```\n */\nexport const ConfirmDialog = contextConnect(UnconnectedConfirmDialog, 'ConfirmDialog');\nexport default ConfirmDialog;", "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(\"af7a0f28df\", \".f8c6ba0dd016e6c1__wrapper.f8c6ba0dd016e6c1__wrapper{z-index:1000001}\");\n}\nexport default {\"wrapper\":\"f8c6ba0dd016e6c1__wrapper\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,qBAAyD;AACzD,mBAAkB;AAClB,qBAAiD;AACjD,kBAAqB;AACrB,oBAAmB;AACnB,kBAAqB;AACrB,qBAAuB;;;ACPvB,IAAM,uBAAuB;AAU7B,SAAS,aAAa;AACpB,QAAM,cAAc;AACpB,MAAI,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A,YACxB,UAAU;AAAA,YACV;AAAA,YACA,UAAU;AAAA,UACZ,CAAC,CAAC;AAAA,QACJ,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH;AA8EO,IAAM,oBAAgB,+BAAe,0BAA0B,eAAe;AACrF,IAAO,oBAAQ;",
4
+ "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { useCallback, useEffect, useRef, useState } from '@wordpress/element';\nimport Modal from '../modal';\nimport { useContextSystem, contextConnect } from '../context';\nimport { Flex } from '../flex';\nimport Button from '../button';\nimport { Text } from '../text';\nimport { VStack } from '../v-stack';\nimport styles from './style.module.scss';\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nconst UnconnectedConfirmDialog = (props, forwardedRef) => {\n const {\n isOpen: isOpenProp,\n onConfirm,\n onCancel,\n children,\n confirmButtonText,\n cancelButtonText,\n isBusy,\n title,\n __experimentalHideHeader = true,\n ...otherProps\n } = useContextSystem(props, 'ConfirmDialog');\n const wrapperClassName = styles.wrapper;\n const cancelButtonRef = useRef(null);\n const confirmButtonRef = useRef(null);\n const [isOpen, setIsOpen] = useState();\n const [shouldSelfClose, setShouldSelfClose] = useState();\n useEffect(() => {\n // We only allow the dialog to close itself if `isOpenProp` is *not* set.\n // If `isOpenProp` is set, then it (probably) means it's controlled by a\n // parent component. In that case, `shouldSelfClose` might do more harm than\n // good, so we disable it.\n const isIsOpenSet = typeof isOpenProp !== 'undefined';\n setIsOpen(isIsOpenSet ? isOpenProp : true);\n setShouldSelfClose(!isIsOpenSet);\n }, [isOpenProp]);\n const handleEvent = useCallback(callback => event => {\n callback?.(event);\n if (shouldSelfClose) {\n setIsOpen(false);\n }\n }, [shouldSelfClose, setIsOpen]);\n const handleEnter = useCallback(event => {\n // Avoid triggering the 'confirm' action when a button is focused,\n // as this can cause a double submission.\n const isConfirmOrCancelButton = event.target === cancelButtonRef.current || event.target === confirmButtonRef.current;\n if (!isConfirmOrCancelButton && event.key === 'Enter') {\n handleEvent(onConfirm)(event);\n }\n }, [handleEvent, onConfirm]);\n const cancelLabel = cancelButtonText ?? __('Cancel');\n const confirmLabel = confirmButtonText ?? __('OK');\n return /*#__PURE__*/_jsx(_Fragment, {\n children: isOpen && /*#__PURE__*/_jsx(Modal, {\n onRequestClose: handleEvent(onCancel),\n onKeyDown: handleEnter,\n closeButtonLabel: cancelLabel,\n isDismissible: true,\n ref: forwardedRef,\n overlayClassName: wrapperClassName,\n title: title,\n contentLabel: __experimentalHideHeader ? title : undefined,\n __experimentalHideHeader: __experimentalHideHeader,\n ...otherProps,\n children: /*#__PURE__*/_jsxs(VStack, {\n spacing: 8,\n children: [/*#__PURE__*/_jsx(Text, {\n children: children\n }), /*#__PURE__*/_jsxs(Flex, {\n direction: \"row\",\n justify: \"flex-end\",\n children: [/*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ref: cancelButtonRef,\n variant: \"tertiary\",\n onClick: handleEvent(onCancel),\n accessibleWhenDisabled: true,\n disabled: isBusy,\n children: cancelLabel\n }), /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ref: confirmButtonRef,\n variant: \"primary\",\n onClick: handleEvent(onConfirm),\n accessibleWhenDisabled: true,\n disabled: isBusy,\n isBusy: isBusy,\n children: confirmLabel\n })]\n })]\n })\n })\n });\n};\n\n/**\n * `ConfirmDialog` is built on top of [`Modal`](/packages/components/src/modal/README.md)\n * and displays a confirmation dialog, with _confirm_ and _cancel_ buttons.\n *\n * The dialog is confirmed by clicking the _confirm_ button or by pressing the `Enter` key.\n * It is cancelled (closed) by clicking the _cancel_ button, by pressing the `ESC` key, or by\n * clicking outside the dialog focus (i.e. the overlay).\n *\n * `ConfirmDialog` has two main modes: controlled and uncontrolled.\n *\n * ### Uncontrolled mode\n *\n * Allows the component to be used standalone, just by declaring it as part of another React\n * component's render method:\n *\n * - It will be automatically open (displayed) upon mounting.\n * - It will be automatically closed when clicking the _cancel_ button, by pressing the `ESC`\n * key, or by clicking outside the dialog focus (i.e. the overlay).\n * - `onCancel` is not mandatory but can be passed. Even if passed, the dialog will still be\n * able to close itself.\n *\n * Activating this mode is as simple as omitting the `isOpen` prop. The only mandatory prop\n * in this case is the `onConfirm` callback. The message is passed as the `children`.\n *\n * ```jsx\n * import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n *\n * function Example() {\n * \treturn (\n * \t\t<ConfirmDialog onConfirm={ () => console.debug( 'Confirmed!' ) }>\n * \t\t\tAre you sure? <strong>This action cannot be undone!</strong>\n * \t\t</ConfirmDialog>\n * \t);\n * }\n * ```\n *\n * ### Controlled mode\n *\n * Let the parent component control when the dialog is open/closed. It's activated when a\n * boolean value is passed to `isOpen`:\n *\n * - It will not be automatically closed. You need to let it know when to open/close by\n * updating the value of the `isOpen` prop.\n * - Both `onConfirm` and the `onCancel` callbacks are mandatory props in this mode.\n * - You'll want to update the state that controls `isOpen` from the `onCancel` and\n * `onConfirm` callbacks.\n *\n * ```jsx\n * import { useState } from '@wordpress/element';\n * import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n *\n * function Example() {\n * \tconst [ isOpen, setIsOpen ] = useState( true );\n *\n * \tconst handleConfirm = () => {\n * \t\tconsole.debug( 'Confirmed!' );\n * \t\tsetIsOpen( false );\n * \t};\n *\n * \tconst handleCancel = () => {\n * \t\tconsole.debug( 'Cancelled!' );\n * \t\tsetIsOpen( false );\n * \t};\n *\n * \treturn (\n * \t\t<ConfirmDialog\n * \t\t\tisOpen={ isOpen }\n * \t\t\tonConfirm={ handleConfirm }\n * \t\t\tonCancel={ handleCancel }\n * \t\t>\n * \t\t\tAre you sure? <strong>This action cannot be undone!</strong>\n * \t\t</ConfirmDialog>\n * \t);\n * }\n * ```\n */\nexport const ConfirmDialog = contextConnect(UnconnectedConfirmDialog, 'ConfirmDialog');\nexport default ConfirmDialog;", "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(\"af7a0f28df\", \".f8c6ba0dd016e6c1__wrapper.f8c6ba0dd016e6c1__wrapper{z-index:1000001}\");\n}\nexport default {\"wrapper\":\"f8c6ba0dd016e6c1__wrapper\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,qBAAyD;AACzD,mBAAkB;AAClB,qBAAiD;AACjD,kBAAqB;AACrB,oBAAmB;AACnB,kBAAqB;AACrB,qBAAuB;;;ACPvB,IAAM,uBAAuB;AAU7B,SAAS,aAAa;AACpB,QAAM,cAAc;AACpB,MAAI,YAAY,kBAAkB;AAChC,WAAO,YAAY;AAAA,EACrB;AACA,c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9B,wBAAwB;AAAA,YACxB,UAAU;AAAA,YACV;AAAA,YACA,UAAU;AAAA,UACZ,CAAC,CAAC;AAAA,QACJ,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH;AA8EO,IAAM,oBAAgB,+BAAe,0BAA0B,eAAe;AACrF,IAAO,oBAAQ;",
6
6
  "names": ["_jsx", "_Fragment", "Modal", "_jsxs", "Button"]
7
7
  }
@@ -119,7 +119,7 @@ function registerStyle(hash, css) {
119
119
 
120
120
  // packages/components/src/content-editable-control/style.module.scss
121
121
  if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
122
- registerStyle("87e5397cb4", "._0f130cee1a924516__editable{background:var(--wp-components-color-background,var(--wpds-color-background-surface-neutral-strong,#fff));border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 transparent;color:var(--wp-components-color-foreground,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-family:-apple-system,system-ui,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px;width:100%}@media not (prefers-reduced-motion){._0f130cee1a924516__editable{transition:box-shadow .1s linear}}@media (min-width:600px){._0f130cee1a924516__editable{font-size:13px;line-height:normal}}._0f130cee1a924516__editable:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}._0f130cee1a924516__editable::placeholder{color:rgba(30,30,30,.62)}._0f130cee1a924516__editable{border-color:var(--wp-components-color-gray-600,var(--wpds-color-stroke-interactive-neutral,#8d8d8d))}._0f130cee1a924516__editable[aria-placeholder]:empty:before{color:color-mix(in srgb,var(--wp-components-color-foreground,var(--wpds-color-foreground-content-neutral,#1e1e1e)),transparent 38%);content:attr(aria-placeholder)}._0f130cee1a924516__editable{min-height:40px;padding:12px}._0f130cee1a924516__editable[aria-disabled=true]{background:var(--wp-components-color-gray-100,var(--wpds-color-background-surface-neutral,#fcfcfc));border-color:var(--wp-components-color-gray-300,var(--wpds-color-stroke-surface-neutral,#dbdbdb));color:var(--wp-components-color-gray-700,var(--wpds-color-foreground-content-neutral-weak,#707070));cursor:default}");
122
+ registerStyle("3558237a49", "._0f130cee1a924516__editable{background:var(--wp-components-color-background,var(--wpds-color-background-surface-neutral-strong,#fff));border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);color:var(--wp-components-color-foreground,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-family:-apple-system,system-ui,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px;width:100%}@media (min-width:600px){._0f130cee1a924516__editable{font-size:13px;line-height:normal}}._0f130cee1a924516__editable:hover:not(:disabled,[aria-disabled=true],[type=checkbox]){border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}._0f130cee1a924516__editable:focus{border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);box-shadow:none;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._0f130cee1a924516__editable::placeholder{color:rgba(30,30,30,.62)}._0f130cee1a924516__editable[aria-placeholder]:empty:before{color:color-mix(in srgb,var(--wp-components-color-foreground,var(--wpds-color-foreground-content-neutral,#1e1e1e)),transparent 38%);content:attr(aria-placeholder)}._0f130cee1a924516__editable{min-height:40px;padding:12px}._0f130cee1a924516__editable[aria-disabled=true]{background:var(--wp-components-color-gray-100,var(--wpds-color-background-surface-neutral,#fcfcfc));border-color:var(--wp-components-color-gray-300,var(--wpds-color-stroke-surface-neutral,#dbdbdb));color:var(--wp-components-color-gray-700,var(--wpds-color-foreground-content-neutral-weak,#707070));cursor:default}");
123
123
  }
124
124
  var style_module_default = { "editable": "_0f130cee1a924516__editable" };
125
125
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/content-editable-control/index.tsx", "../../../style-runtime/src/index.ts", "../../src/content-editable-control/style.module.scss"],
4
- "sourcesContent": ["import { useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport BaseControl from '../base-control';\nimport { useBaseControlProps } from '../base-control/hooks';\nimport { VisuallyHidden } from '../visually-hidden';\nimport styles from './style.module.scss';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedContentEditableControl({\n label,\n id,\n className,\n help,\n hideLabelFromVision,\n disabled,\n required,\n placeholder,\n ...additionalProps\n}, forwardedRef) {\n // The label is not passed through to `BaseControl`: it would render a\n // `<label for>` pointing at the `contentEditable` `div`, which is not a\n // labelable element, making the association invalid. The label is instead\n // rendered here without `for` and wired up via `aria-labelledby`.\n const {\n baseControlProps,\n controlProps\n } = useBaseControlProps({\n id,\n className,\n help\n });\n const labelId = `${controlProps.id}__label`;\n const editableRef = useRef(null);\n const mergedRefs = useMergeRefs([editableRef, forwardedRef]);\n return /*#__PURE__*/_jsxs(BaseControl, {\n ...baseControlProps,\n children: [hideLabelFromVision ? /*#__PURE__*/_jsx(VisuallyHidden, {\n id: labelId,\n children: label\n }) : /*#__PURE__*/_jsx(BaseControl.VisualLabel, {\n id: labelId\n // Focus the field on label click, like `<label for>` would.\n ,\n onClick: () => editableRef.current?.focus(),\n children: label\n }), /*#__PURE__*/_jsx(\"div\", {\n className: styles.editable,\n role: \"textbox\",\n \"aria-multiline\": true,\n \"aria-labelledby\": labelId,\n \"aria-placeholder\": placeholder || undefined,\n \"aria-disabled\": disabled || undefined,\n \"aria-required\": required || undefined,\n ref: mergedRefs\n // A disabled field is not `contentEditable`, which also\n // removes it from the tab order.\n ,\n contentEditable: !disabled,\n suppressContentEditableWarning: true,\n ...additionalProps,\n ...controlProps\n })]\n });\n}\n\n/**\n * A presentational `contentEditable` form control: a labeled editable element\n * rendered with the chrome (`BaseControl` + label) shared by the other form\n * controls in the package.\n *\n * Unlike the in-canvas `RichText` from `@wordpress/block-editor`, this control\n * is intended for standalone form fields (DataForms, sidebar inputs, etc.).\n * It is deliberately **presentational only** and has no `@wordpress/rich-text`\n * dependency: the editable behavior (value, formatting, keyboard shortcuts)\n * and any focus/selection tracking are owned by the consumer, which wires them\n * through the forwarded ref and native event props (see the richtext DataForm\n * control in `@wordpress/dataviews` for the canonical assembly).\n *\n * ```jsx\n * // The rich-text \"assembly\" lives in the consumer.\n * <ContentEditableControl\n * label=\"Caption\"\n * ref={ mergedRef }\n * onFocus={ onEditableFocus }\n * onBlur={ onEditableBlur }\n * />\n * ```\n */\nexport const ContentEditableControl = forwardRef(UnforwardedContentEditableControl);\nexport default ContentEditableControl;", "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(\"87e5397cb4\", \"._0f130cee1a924516__editable{background:var(--wp-components-color-background,var(--wpds-color-background-surface-neutral-strong,#fff));border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 transparent;color:var(--wp-components-color-foreground,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-family:-apple-system,system-ui,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px;width:100%}@media not (prefers-reduced-motion){._0f130cee1a924516__editable{transition:box-shadow .1s linear}}@media (min-width:600px){._0f130cee1a924516__editable{font-size:13px;line-height:normal}}._0f130cee1a924516__editable:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}._0f130cee1a924516__editable::placeholder{color:rgba(30,30,30,.62)}._0f130cee1a924516__editable{border-color:var(--wp-components-color-gray-600,var(--wpds-color-stroke-interactive-neutral,#8d8d8d))}._0f130cee1a924516__editable[aria-placeholder]:empty:before{color:color-mix(in srgb,var(--wp-components-color-foreground,var(--wpds-color-foreground-content-neutral,#1e1e1e)),transparent 38%);content:attr(aria-placeholder)}._0f130cee1a924516__editable{min-height:40px;padding:12px}._0f130cee1a924516__editable[aria-disabled=true]{background:var(--wp-components-color-gray-100,var(--wpds-color-background-surface-neutral,#fcfcfc));border-color:var(--wp-components-color-gray-300,var(--wpds-color-stroke-surface-neutral,#dbdbdb));color:var(--wp-components-color-gray-700,var(--wpds-color-foreground-content-neutral-weak,#707070));cursor:default}\");\n}\nexport default {\"editable\":\"_0f130cee1a924516__editable\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA6B;AAC7B,qBAAmC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C,sBAAmC,uCAAAC,KAAK,uCAAgB;AAAA,MACjE,IAAI;AAAA,MACJ,UAAU;AAAA,IACZ,CAAC,IAAiB,uCAAAA,KAAK,oBAAAD,QAAY,aAAa;AAAA,MAC9C,IAAI;AAAA,MAGJ,SAAS,MAAM,YAAY,SAAS,MAAM;AAAA,MAC1C,UAAU;AAAA,IACZ,CAAC,GAAgB,uCAAAC,KAAK,OAAO;AAAA,MAC3B,WAAW,qBAAO;AAAA,MAClB,MAAM;AAAA,MACN,kBAAkB;AAAA,MAClB,mBAAmB;AAAA,MACnB,oBAAoB,eAAe;AAAA,MACnC,iBAAiB,YAAY;AAAA,MAC7B,iBAAiB,YAAY;AAAA,MAC7B,KAAK;AAAA,MAIL,iBAAiB,CAAC;AAAA,MAClB,gCAAgC;AAAA,MAChC,GAAG;AAAA,MACH,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAyBO,IAAM,6BAAyB,2BAAW,iCAAiC;AAClF,IAAO,mCAAQ;",
4
+ "sourcesContent": ["import { useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport BaseControl from '../base-control';\nimport { useBaseControlProps } from '../base-control/hooks';\nimport { VisuallyHidden } from '../visually-hidden';\nimport styles from './style.module.scss';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedContentEditableControl({\n label,\n id,\n className,\n help,\n hideLabelFromVision,\n disabled,\n required,\n placeholder,\n ...additionalProps\n}, forwardedRef) {\n // The label is not passed through to `BaseControl`: it would render a\n // `<label for>` pointing at the `contentEditable` `div`, which is not a\n // labelable element, making the association invalid. The label is instead\n // rendered here without `for` and wired up via `aria-labelledby`.\n const {\n baseControlProps,\n controlProps\n } = useBaseControlProps({\n id,\n className,\n help\n });\n const labelId = `${controlProps.id}__label`;\n const editableRef = useRef(null);\n const mergedRefs = useMergeRefs([editableRef, forwardedRef]);\n return /*#__PURE__*/_jsxs(BaseControl, {\n ...baseControlProps,\n children: [hideLabelFromVision ? /*#__PURE__*/_jsx(VisuallyHidden, {\n id: labelId,\n children: label\n }) : /*#__PURE__*/_jsx(BaseControl.VisualLabel, {\n id: labelId\n // Focus the field on label click, like `<label for>` would.\n ,\n onClick: () => editableRef.current?.focus(),\n children: label\n }), /*#__PURE__*/_jsx(\"div\", {\n className: styles.editable,\n role: \"textbox\",\n \"aria-multiline\": true,\n \"aria-labelledby\": labelId,\n \"aria-placeholder\": placeholder || undefined,\n \"aria-disabled\": disabled || undefined,\n \"aria-required\": required || undefined,\n ref: mergedRefs\n // A disabled field is not `contentEditable`, which also\n // removes it from the tab order.\n ,\n contentEditable: !disabled,\n suppressContentEditableWarning: true,\n ...additionalProps,\n ...controlProps\n })]\n });\n}\n\n/**\n * A presentational `contentEditable` form control: a labeled editable element\n * rendered with the chrome (`BaseControl` + label) shared by the other form\n * controls in the package.\n *\n * Unlike the in-canvas `RichText` from `@wordpress/block-editor`, this control\n * is intended for standalone form fields (DataForms, sidebar inputs, etc.).\n * It is deliberately **presentational only** and has no `@wordpress/rich-text`\n * dependency: the editable behavior (value, formatting, keyboard shortcuts)\n * and any focus/selection tracking are owned by the consumer, which wires them\n * through the forwarded ref and native event props (see the richtext DataForm\n * control in `@wordpress/dataviews` for the canonical assembly).\n *\n * ```jsx\n * // The rich-text \"assembly\" lives in the consumer.\n * <ContentEditableControl\n * label=\"Caption\"\n * ref={ mergedRef }\n * onFocus={ onEditableFocus }\n * onBlur={ onEditableBlur }\n * />\n * ```\n */\nexport const ContentEditableControl = forwardRef(UnforwardedContentEditableControl);\nexport default ContentEditableControl;", "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(\"3558237a49\", \"._0f130cee1a924516__editable{background:var(--wp-components-color-background,var(--wpds-color-background-surface-neutral-strong,#fff));border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);color:var(--wp-components-color-foreground,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-family:-apple-system,system-ui,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px;width:100%}@media (min-width:600px){._0f130cee1a924516__editable{font-size:13px;line-height:normal}}._0f130cee1a924516__editable:hover:not(:disabled,[aria-disabled=true],[type=checkbox]){border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}._0f130cee1a924516__editable:focus{border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);box-shadow:none;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._0f130cee1a924516__editable::placeholder{color:rgba(30,30,30,.62)}._0f130cee1a924516__editable[aria-placeholder]:empty:before{color:color-mix(in srgb,var(--wp-components-color-foreground,var(--wpds-color-foreground-content-neutral,#1e1e1e)),transparent 38%);content:attr(aria-placeholder)}._0f130cee1a924516__editable{min-height:40px;padding:12px}._0f130cee1a924516__editable[aria-disabled=true]{background:var(--wp-components-color-gray-100,var(--wpds-color-background-surface-neutral,#fcfcfc));border-color:var(--wp-components-color-gray-300,var(--wpds-color-stroke-surface-neutral,#dbdbdb));color:var(--wp-components-color-gray-700,var(--wpds-color-foreground-content-neutral-weak,#707070));cursor:default}\");\n}\nexport default {\"editable\":\"_0f130cee1a924516__editable\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA6B;AAC7B,qBAAmC;AACnC,0BAAwB;AACxB,mBAAoC;AACpC,6BAA+B;;;ACJ/B,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,MAAM,aAAa,oBAAoB,MAAM,MAAM;AACrD,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;A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;",
6
6
  "names": ["_jsxs", "BaseControl", "_jsx"]
7
7
  }
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
- // packages/components/src/context/context-system-provider.js
30
+ // packages/components/src/context/context-system-provider.jsx
31
31
  var context_system_provider_exports = {};
32
32
  __export(context_system_provider_exports, {
33
33
  ComponentsContext: () => ComponentsContext,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/context/context-system-provider.js"],
4
- "sourcesContent": ["import deepmerge from 'deepmerge';\nimport fastDeepEqual from 'fast-deep-equal/es6/index.js';\n// @ts-expect-error https://github.com/jonschlinkert/is-plain-object/pull/47\nimport { isPlainObject } from 'is-plain-object';\nimport { createContext, useContext, useRef, useMemo, memo } from '@wordpress/element';\nimport warn from '@wordpress/warning';\nimport { useUpdateEffect } from '../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ComponentsContext = createContext(/** @type {Record<string, any>} */{});\nComponentsContext.displayName = 'ComponentsContext';\nexport const useComponentsContext = () => useContext(ComponentsContext);\n\n/**\n * Consolidates incoming ContextSystem values with a (potential) parent ContextSystem value.\n *\n * Note: This function will warn if it detects an un-memoized `value`\n *\n * @param {Object} props\n * @param {Record<string, any>} props.value\n * @return {Record<string, any>} The consolidated value.\n */\nfunction useContextSystemBridge({\n value\n}) {\n const parentContext = useComponentsContext();\n const valueRef = useRef(value);\n useUpdateEffect(() => {\n if (\n // Objects are equivalent.\n fastDeepEqual(valueRef.current, value) &&\n // But not the same reference.\n valueRef.current !== value) {\n globalThis.SCRIPT_DEBUG === true ? warn(`Please memoize your context: ${JSON.stringify(value)}`) : void 0;\n }\n }, [value]);\n\n // `parentContext` will always be memoized (i.e., the result of this hook itself)\n // or the default value from when the `ComponentsContext` was originally\n // initialized (which will never change, it's a static variable)\n // so this memoization will prevent `deepmerge()` from rerunning unless\n // the references to `value` change OR the `parentContext` has an actual material change\n // (because again, it's guaranteed to be memoized or a static reference to the empty object\n // so we know that the only changes for `parentContext` are material ones... i.e., why we\n // don't have to warn in the `useUpdateEffect` hook above for `parentContext` and we only\n // need to bother with the `value`). The `useUpdateEffect` above will ensure that we are\n // correctly warning when the `value` isn't being properly memoized. All of that to say\n // that this should be super safe to assume that `useMemo` will only run on actual\n // changes to the two dependencies, therefore saving us calls to `deepmerge()`!\n const config = useMemo(() => {\n // Deep clone `parentContext` to avoid mutating it later.\n return deepmerge(parentContext ?? {}, value ?? {}, {\n isMergeableObject: isPlainObject\n });\n }, [parentContext, value]);\n return config;\n}\n\n/**\n * A Provider component that can modify props for connected components within\n * the Context system.\n *\n * @example\n * ```jsx\n * <ContextSystemProvider value={{ Button: { size: 'small' }}}>\n * <Button>...</Button>\n * </ContextSystemProvider>\n * ```\n *\n * @template {Record<string, any>} T\n * @param {Object} options\n * @param {React.ReactNode} options.children Children to render.\n * @param {T} options.value Props to render into connected components.\n * @return {React.JSX.Element} A Provider wrapped component.\n */\nconst BaseContextSystemProvider = ({\n children,\n value\n}) => {\n const contextValue = useContextSystemBridge({\n value\n });\n return /*#__PURE__*/_jsx(ComponentsContext.Provider, {\n value: contextValue,\n children: children\n });\n};\nexport const ContextSystemProvider = memo(BaseContextSystemProvider);"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAsB;AACtB,iBAA0B;AAE1B,6BAA8B;AAC9B,qBAAiE;AACjE,qBAAiB;AACjB,mBAAgC;AAChC,yBAA4B;AACrB,IAAM,wBAAoB;AAAA;AAAA,EAAgD,CAAC;AAAC;AACnF,kBAAkB,cAAc;AACzB,IAAM,uBAAuB,UAAM,2BAAW,iBAAiB;AAWtE,SAAS,uBAAuB;AAAA,EAC9B;AACF,GAAG;AACD,QAAM,gBAAgB,qBAAqB;AAC3C,QAAM,eAAW,uBAAO,KAAK;AAC7B,oCAAgB,MAAM;AACpB;AAAA;AAAA,UAEA,WAAAA,SAAc,SAAS,SAAS,KAAK;AAAA,MAErC,SAAS,YAAY;AAAA,MAAO;AAC1B,iBAAW,iBAAiB,WAAO,eAAAC,SAAK,gCAAgC,KAAK,UAAU,KAAK,CAAC,EAAE,IAAI;AAAA,IACrG;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAcV,QAAM,aAAS,wBAAQ,MAAM;AAE3B,eAAO,iBAAAC,SAAU,iBAAiB,CAAC,GAAG,SAAS,CAAC,GAAG;AAAA,MACjD,mBAAmB;AAAA,IACrB,CAAC;AAAA,EACH,GAAG,CAAC,eAAe,KAAK,CAAC;AACzB,SAAO;AACT;AAmBA,IAAM,4BAA4B,CAAC;AAAA,EACjC;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAe,uBAAuB;AAAA,IAC1C;AAAA,EACF,CAAC;AACD,SAAoB,uCAAAC,KAAK,kBAAkB,UAAU;AAAA,IACnD,OAAO;AAAA,IACP;AAAA,EACF,CAAC;AACH;AACO,IAAM,4BAAwB,qBAAK,yBAAyB;",
3
+ "sources": ["../../src/context/context-system-provider.jsx"],
4
+ "sourcesContent": ["import deepmerge from 'deepmerge';\nimport fastDeepEqual from 'fast-deep-equal/es6/index.js';\nimport { isPlainObject } from 'is-plain-object';\nimport { createContext, useContext, useRef, useMemo, memo } from '@wordpress/element';\nimport warn from '@wordpress/warning';\nimport { useUpdateEffect } from '../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ComponentsContext = createContext(/** @type {Record<string, any>} */{});\nComponentsContext.displayName = 'ComponentsContext';\nexport const useComponentsContext = () => useContext(ComponentsContext);\n\n/**\n * Consolidates incoming ContextSystem values with a (potential) parent ContextSystem value.\n *\n * Note: This function will warn if it detects an un-memoized `value`\n *\n * @param {Object} props\n * @param {Record<string, any>} props.value\n * @return {Record<string, any>} The consolidated value.\n */\nfunction useContextSystemBridge({\n value\n}) {\n const parentContext = useComponentsContext();\n const valueRef = useRef(value);\n useUpdateEffect(() => {\n if (\n // Objects are equivalent.\n fastDeepEqual(valueRef.current, value) &&\n // But not the same reference.\n valueRef.current !== value) {\n globalThis.SCRIPT_DEBUG === true ? warn(`Please memoize your context: ${JSON.stringify(value)}`) : void 0;\n }\n }, [value]);\n\n // `parentContext` will always be memoized (i.e., the result of this hook itself)\n // or the default value from when the `ComponentsContext` was originally\n // initialized (which will never change, it's a static variable)\n // so this memoization will prevent `deepmerge()` from rerunning unless\n // the references to `value` change OR the `parentContext` has an actual material change\n // (because again, it's guaranteed to be memoized or a static reference to the empty object\n // so we know that the only changes for `parentContext` are material ones... i.e., why we\n // don't have to warn in the `useUpdateEffect` hook above for `parentContext` and we only\n // need to bother with the `value`). The `useUpdateEffect` above will ensure that we are\n // correctly warning when the `value` isn't being properly memoized. All of that to say\n // that this should be super safe to assume that `useMemo` will only run on actual\n // changes to the two dependencies, therefore saving us calls to `deepmerge()`!\n const config = useMemo(() => {\n // Deep clone `parentContext` to avoid mutating it later.\n return deepmerge(parentContext ?? {}, value ?? {}, {\n isMergeableObject: isPlainObject\n });\n }, [parentContext, value]);\n return config;\n}\n\n/**\n * A Provider component that can modify props for connected components within\n * the Context system.\n *\n * @example\n * ```jsx\n * <ContextSystemProvider value={{ Button: { size: 'small' }}}>\n * <Button>...</Button>\n * </ContextSystemProvider>\n * ```\n *\n * @template {Record<string, any>} T\n * @param {Object} options\n * @param {React.ReactNode} options.children Children to render.\n * @param {T} options.value Props to render into connected components.\n * @return {React.JSX.Element} A Provider wrapped component.\n */\nconst BaseContextSystemProvider = ({\n children,\n value\n}) => {\n const contextValue = useContextSystemBridge({\n value\n });\n return /*#__PURE__*/_jsx(ComponentsContext.Provider, {\n value: contextValue,\n children: children\n });\n};\nexport const ContextSystemProvider = memo(BaseContextSystemProvider);"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAsB;AACtB,iBAA0B;AAC1B,6BAA8B;AAC9B,qBAAiE;AACjE,qBAAiB;AACjB,mBAAgC;AAChC,yBAA4B;AACrB,IAAM,wBAAoB;AAAA;AAAA,EAAgD,CAAC;AAAC;AACnF,kBAAkB,cAAc;AACzB,IAAM,uBAAuB,UAAM,2BAAW,iBAAiB;AAWtE,SAAS,uBAAuB;AAAA,EAC9B;AACF,GAAG;AACD,QAAM,gBAAgB,qBAAqB;AAC3C,QAAM,eAAW,uBAAO,KAAK;AAC7B,oCAAgB,MAAM;AACpB;AAAA;AAAA,UAEA,WAAAA,SAAc,SAAS,SAAS,KAAK;AAAA,MAErC,SAAS,YAAY;AAAA,MAAO;AAC1B,iBAAW,iBAAiB,WAAO,eAAAC,SAAK,gCAAgC,KAAK,UAAU,KAAK,CAAC,EAAE,IAAI;AAAA,IACrG;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAcV,QAAM,aAAS,wBAAQ,MAAM;AAE3B,eAAO,iBAAAC,SAAU,iBAAiB,CAAC,GAAG,SAAS,CAAC,GAAG;AAAA,MACjD,mBAAmB;AAAA,IACrB,CAAC;AAAA,EACH,GAAG,CAAC,eAAe,KAAK,CAAC;AACzB,SAAO;AACT;AAmBA,IAAM,4BAA4B,CAAC;AAAA,EACjC;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAe,uBAAuB;AAAA,IAC1C;AAAA,EACF,CAAC;AACD,SAAoB,uCAAAC,KAAK,kBAAkB,UAAU;AAAA,IACnD,OAAO;AAAA,IACP;AAAA,EACF,CAAC;AACH;AACO,IAAM,4BAAwB,qBAAK,yBAAyB;",
6
6
  "names": ["fastDeepEqual", "warn", "deepmerge", "_jsx"]
7
7
  }
@@ -52,6 +52,7 @@ function ControlPointButton({
52
52
  isOpen,
53
53
  position,
54
54
  color,
55
+ disablePositioning,
55
56
  ...additionalProps
56
57
  }) {
57
58
  const instanceId = (0, import_compose.useInstanceId)(ControlPointButton);
@@ -74,7 +75,7 @@ function ControlPointButton({
74
75
  ...additionalProps
75
76
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_visually_hidden.VisuallyHidden, {
76
77
  id: descriptionId,
77
- children: (0, import_i18n.__)("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")
78
+ children: disablePositioning ? (0, import_i18n.__)("Press the button to change the color.") : (0, import_i18n.__)("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")
78
79
  })]
79
80
  });
80
81
  }
@@ -102,6 +103,7 @@ function GradientColorPickerDropdown({
102
103
  function ControlPoints({
103
104
  disableRemove,
104
105
  disableAlpha,
106
+ disablePositioning,
105
107
  gradientPickerDomRef,
106
108
  ignoreMarkerPosition,
107
109
  value: controlPoints,
@@ -163,6 +165,9 @@ function ControlPoints({
163
165
  onToggle();
164
166
  },
165
167
  onMouseDown: () => {
168
+ if (disablePositioning) {
169
+ return;
170
+ }
166
171
  if (window && window.addEventListener) {
167
172
  controlPointMoveStateRef.current = {
168
173
  initialPosition,
@@ -176,6 +181,12 @@ function ControlPoints({
176
181
  }
177
182
  },
178
183
  onKeyDown: (event) => {
184
+ if (disablePositioning) {
185
+ if (event.code === "ArrowLeft" || event.code === "ArrowRight") {
186
+ event.stopPropagation();
187
+ }
188
+ return;
189
+ }
179
190
  if (event.code === "ArrowLeft") {
180
191
  event.stopPropagation();
181
192
  onChange((0, import_utils.updateControlPointPosition)(controlPoints, index, (0, import_utils.clampPercent)(point.position - import_constants.KEYBOARD_CONTROL_POINT_VARIATION)));
@@ -186,7 +197,8 @@ function ControlPoints({
186
197
  },
187
198
  isOpen,
188
199
  position: point.position,
189
- color: point.color
200
+ color: point.color,
201
+ disablePositioning
190
202
  }, index),
191
203
  renderContent: ({
192
204
  onClose
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/custom-gradient-picker/gradient-bar/control-points.tsx"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport { colord } from 'colord';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEffect, useRef, useState, useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { plus } from '@wordpress/icons';\nimport Button from '../../button';\nimport { HStack } from '../../h-stack';\nimport { ColorPicker } from '../../color-picker';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { CustomColorPickerDropdown } from '../../color-palette';\nimport { addControlPoint, clampPercent, removeControlPoint, updateControlPointColor, updateControlPointColorByPosition, updateControlPointPosition, getHorizontalRelativeGradientPosition } from './utils';\nimport { MINIMUM_SIGNIFICANT_MOVE, KEYBOARD_CONTROL_POINT_VARIATION } from './constants';\nimport DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction ControlPointButton({\n isOpen,\n position,\n color,\n ...additionalProps\n}) {\n const instanceId = useInstanceId(ControlPointButton);\n const descriptionId = `components-custom-gradient-picker__control-point-button-description-${instanceId}`;\n return /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Button, {\n \"aria-label\": sprintf(\n // translators: 1: gradient position e.g: 70. 2: gradient color code e.g: rgb(52,121,151).\n __('Gradient control point at position %1$d%% with color code %2$s.'), position, color),\n \"aria-describedby\": descriptionId,\n \"aria-haspopup\": \"true\",\n \"aria-expanded\": isOpen,\n __next40pxDefaultSize: true,\n className: clsx('components-custom-gradient-picker__control-point-button', {\n 'is-active': isOpen\n }),\n ...additionalProps\n }), /*#__PURE__*/_jsx(VisuallyHidden, {\n id: descriptionId,\n children: __('Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.')\n })]\n });\n}\nfunction GradientColorPickerDropdown({\n isRenderedInSidebar,\n className,\n ...props\n}) {\n // Open the popover below the gradient control/insertion point\n const popoverProps = useMemo(() => ({\n placement: 'bottom',\n offset: 8,\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 }), []);\n const mergedClassName = clsx('components-custom-gradient-picker__control-point-dropdown', className);\n return /*#__PURE__*/_jsx(CustomColorPickerDropdown, {\n isRenderedInSidebar: isRenderedInSidebar,\n popoverProps: popoverProps,\n className: mergedClassName,\n ...props\n });\n}\nfunction ControlPoints({\n disableRemove,\n disableAlpha,\n gradientPickerDomRef,\n ignoreMarkerPosition,\n value: controlPoints,\n onChange,\n onStartControlPointChange,\n onStopControlPointChange,\n __experimentalIsRenderedInSidebar\n}) {\n const controlPointMoveStateRef = useRef(undefined);\n const onMouseMove = event => {\n if (controlPointMoveStateRef.current === undefined || gradientPickerDomRef.current === null) {\n return;\n }\n const relativePosition = getHorizontalRelativeGradientPosition(event.clientX, gradientPickerDomRef.current);\n const {\n initialPosition,\n index,\n significantMoveHappened\n } = controlPointMoveStateRef.current;\n if (!significantMoveHappened && Math.abs(initialPosition - relativePosition) >= MINIMUM_SIGNIFICANT_MOVE) {\n controlPointMoveStateRef.current.significantMoveHappened = true;\n }\n onChange(updateControlPointPosition(controlPoints, index, relativePosition));\n };\n const cleanEventListeners = () => {\n if (window && window.removeEventListener && controlPointMoveStateRef.current && controlPointMoveStateRef.current.listenersActivated) {\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('mouseup', cleanEventListeners);\n onStopControlPointChange();\n controlPointMoveStateRef.current.listenersActivated = false;\n }\n };\n\n // Adding `cleanEventListeners` to the dependency array below requires the function itself to be wrapped in a `useCallback`\n // This memoization would prevent the event listeners from being properly cleaned.\n // Instead, we'll pass a ref to the function in our `useEffect` so `cleanEventListeners` itself is no longer a dependency.\n const cleanEventListenersRef = useRef(undefined);\n cleanEventListenersRef.current = cleanEventListeners;\n useEffect(() => {\n return () => {\n cleanEventListenersRef.current?.();\n };\n }, []);\n return /*#__PURE__*/_jsx(_Fragment, {\n children: controlPoints.map((point, index) => {\n const initialPosition = point?.position;\n return ignoreMarkerPosition !== initialPosition && /*#__PURE__*/_jsx(GradientColorPickerDropdown, {\n isRenderedInSidebar: __experimentalIsRenderedInSidebar,\n onClose: onStopControlPointChange,\n renderToggle: ({\n isOpen,\n onToggle\n }) => /*#__PURE__*/_jsx(ControlPointButton, {\n onClick: () => {\n if (controlPointMoveStateRef.current && controlPointMoveStateRef.current.significantMoveHappened) {\n return;\n }\n if (isOpen) {\n onStopControlPointChange();\n } else {\n onStartControlPointChange();\n }\n onToggle();\n },\n onMouseDown: () => {\n if (window && window.addEventListener) {\n controlPointMoveStateRef.current = {\n initialPosition,\n index,\n significantMoveHappened: false,\n listenersActivated: true\n };\n onStartControlPointChange();\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('mouseup', cleanEventListeners);\n }\n },\n onKeyDown: event => {\n if (event.code === 'ArrowLeft') {\n // Stop propagation of the key press event to avoid focus moving\n // to another editor area.\n event.stopPropagation();\n onChange(updateControlPointPosition(controlPoints, index, clampPercent(point.position - KEYBOARD_CONTROL_POINT_VARIATION)));\n } else if (event.code === 'ArrowRight') {\n // Stop propagation of the key press event to avoid focus moving\n // to another editor area.\n event.stopPropagation();\n onChange(updateControlPointPosition(controlPoints, index, clampPercent(point.position + KEYBOARD_CONTROL_POINT_VARIATION)));\n }\n },\n isOpen: isOpen,\n position: point.position,\n color: point.color\n }, index),\n renderContent: ({\n onClose\n }) => /*#__PURE__*/_jsxs(DropdownContentWrapper, {\n paddingSize: \"none\",\n children: [/*#__PURE__*/_jsx(ColorPicker, {\n enableAlpha: !disableAlpha,\n color: point.color,\n onChange: color => {\n onChange(updateControlPointColor(controlPoints, index, colord(color).toRgbString()));\n }\n }), !disableRemove && controlPoints.length > 2 && /*#__PURE__*/_jsx(HStack, {\n className: \"components-custom-gradient-picker__remove-control-point-wrapper\",\n alignment: \"center\",\n children: /*#__PURE__*/_jsx(Button, {\n onClick: () => {\n onChange(removeControlPoint(controlPoints, index));\n onClose();\n },\n variant: \"link\",\n children: __('Remove Control Point')\n })\n })]\n }),\n style: {\n left: `${point.position}%`,\n transform: 'translateX( -50% )'\n }\n }, index);\n })\n });\n}\nfunction InsertPoint({\n value: controlPoints,\n onChange,\n onOpenInserter,\n onCloseInserter,\n insertPosition,\n disableAlpha,\n __experimentalIsRenderedInSidebar\n}) {\n const [alreadyInsertedPoint, setAlreadyInsertedPoint] = useState(false);\n return /*#__PURE__*/_jsx(GradientColorPickerDropdown, {\n isRenderedInSidebar: __experimentalIsRenderedInSidebar,\n className: \"components-custom-gradient-picker__inserter\",\n onClose: () => {\n onCloseInserter();\n },\n renderToggle: ({\n isOpen,\n onToggle\n }) => /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n \"aria-expanded\": isOpen,\n \"aria-haspopup\": \"true\",\n onClick: () => {\n if (isOpen) {\n onCloseInserter();\n } else {\n setAlreadyInsertedPoint(false);\n onOpenInserter();\n }\n onToggle();\n },\n className: \"components-custom-gradient-picker__insert-point-dropdown\",\n icon: plus\n }),\n renderContent: () => /*#__PURE__*/_jsx(DropdownContentWrapper, {\n paddingSize: \"none\",\n children: /*#__PURE__*/_jsx(ColorPicker, {\n enableAlpha: !disableAlpha,\n onChange: color => {\n if (!alreadyInsertedPoint) {\n onChange(addControlPoint(controlPoints, insertPosition, colord(color).toRgbString()));\n setAlreadyInsertedPoint(true);\n } else {\n onChange(updateControlPointColorByPosition(controlPoints, insertPosition, colord(color).toRgbString()));\n }\n }\n })\n }),\n style: insertPosition !== null ? {\n left: `${insertPosition}%`,\n transform: 'translateX( -50% )'\n } : undefined\n });\n}\nControlPoints.InsertPoint = InsertPoint;\nexport default ControlPoints;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,oBAAuB;AACvB,qBAA8B;AAC9B,qBAAqD;AACrD,kBAA4B;AAC5B,mBAAqB;AACrB,oBAAmB;AACnB,qBAAuB;AACvB,0BAA4B;AAC5B,6BAA+B;AA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C,eAAe,oBAAgB,sBAAO,KAAK,EAAE,YAAY,CAAC,CAAC;AAAA,UACxG;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,IACD,OAAO,mBAAmB,OAAO;AAAA,MAC/B,MAAM,GAAG,cAAc;AAAA,MACvB,WAAW;AAAA,IACb,IAAI;AAAA,EACN,CAAC;AACH;AACA,cAAc,cAAc;AAC5B,IAAO,yBAAQ;",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { colord } from 'colord';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEffect, useRef, useState, useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { plus } from '@wordpress/icons';\nimport Button from '../../button';\nimport { HStack } from '../../h-stack';\nimport { ColorPicker } from '../../color-picker';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { CustomColorPickerDropdown } from '../../color-palette';\nimport { addControlPoint, clampPercent, removeControlPoint, updateControlPointColor, updateControlPointColorByPosition, updateControlPointPosition, getHorizontalRelativeGradientPosition } from './utils';\nimport { MINIMUM_SIGNIFICANT_MOVE, KEYBOARD_CONTROL_POINT_VARIATION } from './constants';\nimport DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction ControlPointButton({\n isOpen,\n position,\n color,\n disablePositioning,\n ...additionalProps\n}) {\n const instanceId = useInstanceId(ControlPointButton);\n const descriptionId = `components-custom-gradient-picker__control-point-button-description-${instanceId}`;\n return /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Button, {\n \"aria-label\": sprintf(\n // translators: 1: gradient position e.g: 70. 2: gradient color code e.g: rgb(52,121,151).\n __('Gradient control point at position %1$d%% with color code %2$s.'), position, color),\n \"aria-describedby\": descriptionId,\n \"aria-haspopup\": \"true\",\n \"aria-expanded\": isOpen,\n __next40pxDefaultSize: true,\n className: clsx('components-custom-gradient-picker__control-point-button', {\n 'is-active': isOpen\n }),\n ...additionalProps\n }), /*#__PURE__*/_jsx(VisuallyHidden, {\n id: descriptionId,\n children: disablePositioning ? __('Press the button to change the color.') : __('Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.')\n })]\n });\n}\nfunction GradientColorPickerDropdown({\n isRenderedInSidebar,\n className,\n ...props\n}) {\n // Open the popover below the gradient control/insertion point\n const popoverProps = useMemo(() => ({\n placement: 'bottom',\n offset: 8,\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 }), []);\n const mergedClassName = clsx('components-custom-gradient-picker__control-point-dropdown', className);\n return /*#__PURE__*/_jsx(CustomColorPickerDropdown, {\n isRenderedInSidebar: isRenderedInSidebar,\n popoverProps: popoverProps,\n className: mergedClassName,\n ...props\n });\n}\nfunction ControlPoints({\n disableRemove,\n disableAlpha,\n disablePositioning,\n gradientPickerDomRef,\n ignoreMarkerPosition,\n value: controlPoints,\n onChange,\n onStartControlPointChange,\n onStopControlPointChange,\n __experimentalIsRenderedInSidebar\n}) {\n const controlPointMoveStateRef = useRef(undefined);\n const onMouseMove = event => {\n if (controlPointMoveStateRef.current === undefined || gradientPickerDomRef.current === null) {\n return;\n }\n const relativePosition = getHorizontalRelativeGradientPosition(event.clientX, gradientPickerDomRef.current);\n const {\n initialPosition,\n index,\n significantMoveHappened\n } = controlPointMoveStateRef.current;\n if (!significantMoveHappened && Math.abs(initialPosition - relativePosition) >= MINIMUM_SIGNIFICANT_MOVE) {\n controlPointMoveStateRef.current.significantMoveHappened = true;\n }\n onChange(updateControlPointPosition(controlPoints, index, relativePosition));\n };\n const cleanEventListeners = () => {\n if (window && window.removeEventListener && controlPointMoveStateRef.current && controlPointMoveStateRef.current.listenersActivated) {\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('mouseup', cleanEventListeners);\n onStopControlPointChange();\n controlPointMoveStateRef.current.listenersActivated = false;\n }\n };\n\n // Adding `cleanEventListeners` to the dependency array below requires the function itself to be wrapped in a `useCallback`\n // This memoization would prevent the event listeners from being properly cleaned.\n // Instead, we'll pass a ref to the function in our `useEffect` so `cleanEventListeners` itself is no longer a dependency.\n const cleanEventListenersRef = useRef(undefined);\n cleanEventListenersRef.current = cleanEventListeners;\n useEffect(() => {\n return () => {\n cleanEventListenersRef.current?.();\n };\n }, []);\n return /*#__PURE__*/_jsx(_Fragment, {\n children: controlPoints.map((point, index) => {\n const initialPosition = point?.position;\n return ignoreMarkerPosition !== initialPosition && /*#__PURE__*/_jsx(GradientColorPickerDropdown, {\n isRenderedInSidebar: __experimentalIsRenderedInSidebar,\n onClose: onStopControlPointChange,\n renderToggle: ({\n isOpen,\n onToggle\n }) => /*#__PURE__*/_jsx(ControlPointButton, {\n onClick: () => {\n if (controlPointMoveStateRef.current && controlPointMoveStateRef.current.significantMoveHappened) {\n return;\n }\n if (isOpen) {\n onStopControlPointChange();\n } else {\n onStartControlPointChange();\n }\n onToggle();\n },\n onMouseDown: () => {\n if (disablePositioning) {\n return;\n }\n if (window && window.addEventListener) {\n controlPointMoveStateRef.current = {\n initialPosition,\n index,\n significantMoveHappened: false,\n listenersActivated: true\n };\n onStartControlPointChange();\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('mouseup', cleanEventListeners);\n }\n },\n onKeyDown: event => {\n if (disablePositioning) {\n // The point cannot move, but the\n // arrow keys are still consumed so\n // they do not bubble away and move\n // focus to another editor area.\n if (event.code === 'ArrowLeft' || event.code === 'ArrowRight') {\n event.stopPropagation();\n }\n return;\n }\n if (event.code === 'ArrowLeft') {\n // Stop propagation of the key press event to avoid focus moving\n // to another editor area.\n event.stopPropagation();\n onChange(updateControlPointPosition(controlPoints, index, clampPercent(point.position - KEYBOARD_CONTROL_POINT_VARIATION)));\n } else if (event.code === 'ArrowRight') {\n // Stop propagation of the key press event to avoid focus moving\n // to another editor area.\n event.stopPropagation();\n onChange(updateControlPointPosition(controlPoints, index, clampPercent(point.position + KEYBOARD_CONTROL_POINT_VARIATION)));\n }\n },\n isOpen: isOpen,\n position: point.position,\n color: point.color,\n disablePositioning: disablePositioning\n }, index),\n renderContent: ({\n onClose\n }) => /*#__PURE__*/_jsxs(DropdownContentWrapper, {\n paddingSize: \"none\",\n children: [/*#__PURE__*/_jsx(ColorPicker, {\n enableAlpha: !disableAlpha,\n color: point.color,\n onChange: color => {\n onChange(updateControlPointColor(controlPoints, index, colord(color).toRgbString()));\n }\n }), !disableRemove && controlPoints.length > 2 && /*#__PURE__*/_jsx(HStack, {\n className: \"components-custom-gradient-picker__remove-control-point-wrapper\",\n alignment: \"center\",\n children: /*#__PURE__*/_jsx(Button, {\n onClick: () => {\n onChange(removeControlPoint(controlPoints, index));\n onClose();\n },\n variant: \"link\",\n children: __('Remove Control Point')\n })\n })]\n }),\n style: {\n left: `${point.position}%`,\n transform: 'translateX( -50% )'\n }\n }, index);\n })\n });\n}\nfunction InsertPoint({\n value: controlPoints,\n onChange,\n onOpenInserter,\n onCloseInserter,\n insertPosition,\n disableAlpha,\n __experimentalIsRenderedInSidebar\n}) {\n const [alreadyInsertedPoint, setAlreadyInsertedPoint] = useState(false);\n return /*#__PURE__*/_jsx(GradientColorPickerDropdown, {\n isRenderedInSidebar: __experimentalIsRenderedInSidebar,\n className: \"components-custom-gradient-picker__inserter\",\n onClose: () => {\n onCloseInserter();\n },\n renderToggle: ({\n isOpen,\n onToggle\n }) => /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n \"aria-expanded\": isOpen,\n \"aria-haspopup\": \"true\",\n onClick: () => {\n if (isOpen) {\n onCloseInserter();\n } else {\n setAlreadyInsertedPoint(false);\n onOpenInserter();\n }\n onToggle();\n },\n className: \"components-custom-gradient-picker__insert-point-dropdown\",\n icon: plus\n }),\n renderContent: () => /*#__PURE__*/_jsx(DropdownContentWrapper, {\n paddingSize: \"none\",\n children: /*#__PURE__*/_jsx(ColorPicker, {\n enableAlpha: !disableAlpha,\n onChange: color => {\n if (!alreadyInsertedPoint) {\n onChange(addControlPoint(controlPoints, insertPosition, colord(color).toRgbString()));\n setAlreadyInsertedPoint(true);\n } else {\n onChange(updateControlPointColorByPosition(controlPoints, insertPosition, colord(color).toRgbString()));\n }\n }\n })\n }),\n style: insertPosition !== null ? {\n left: `${insertPosition}%`,\n transform: 'translateX( -50% )'\n } : undefined\n });\n}\nControlPoints.InsertPoint = InsertPoint;\nexport default ControlPoints;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,oBAAuB;AACvB,qBAA8B;AAC9B,qBAAqD;AACrD,kBAA4B;AAC5B,mBAAqB;AACrB,oBAAmB;AACnB,qBAAuB;AACvB,0BAA4B;AAC5B,6BAA+B;AAC/B,2BAA0C;AAC1C,mBAAiM;AACjM,uBAA2E;AAC3E,sCAAmC;AACnC,yBAAkE;AAClE,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,iBAAa,8BAAc,kBAAkB;AACnD,QAAM,gBAAgB,uEAAuE,UAAU;AACvG,SAAoB,uCAAAA,MAAM,mBAAAC,UAAW;AAAA,IACnC,UAAU,CAAc,uCAAAC,KAAK,cAAAC,SAAQ;AAAA,MACnC,kBAAc;AAAA;AAAA,YAEd,gBAAG,iEAAiE;AAAA,QAAG;AAAA,QAAU;AAAA,MAAK;AAAA,MACtF,oBAAoB;AAAA,MACpB,iBAAiB;AAAA,MACjB,iBAAiB;AAAA,MACjB,uBAAuB;AAAA,MACvB,eAAW,YAAAC,SAAK,2DAA2D;AAAA,QACzE,aAAa;AAAA,MACf,CAAC;AAAA,MACD,GAAG;AAAA,IACL,CAAC,GAAgB,uCAAAF,KAAK,uCAAgB;AAAA,MACpC,IAAI;AAAA,MACJ,UAAU,yBAAqB,gBAAG,uCAAuC,QAAI,gBAAG,sKAAsK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B;AAAA,IACrB,WAAW;AAAA,IACX,SAAS,MAAM;AACb,sBAAgB;AAAA,IAClB;AAAA,IACA,cAAc,CAAC;AAAA,MACb;AAAA,MACA;AAAA,IACF,MAAmB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,MAC9B,uBAAuB;AAAA,MACvB,iBAAiB;AAAA,MACjB,iBAAiB;AAAA,MACjB,SAAS,MAAM;AACb,YAAI,QAAQ;AACV,0BAAgB;AAAA,QAClB,OAAO;AACL,kCAAwB,KAAK;AAC7B,yBAAe;AAAA,QACjB;AACA,iBAAS;AAAA,MACX;AAAA,MACA,WAAW;AAAA,MACX,MAAM;AAAA,IACR,CAAC;AAAA,IACD,eAAe,MAAmB,uCAAAD,KAAK,gCAAAG,SAAwB;AAAA,MAC7D,aAAa;AAAA,MACb,UAAuB,uCAAAH,KAAK,iCAAa;AAAA,QACvC,aAAa,CAAC;AAAA,QACd,UAAU,WAAS;AACjB,cAAI,CAAC,sBAAsB;AACzB,yBAAS,8BAAgB,eAAe,oBAAgB,sBAAO,KAAK,EAAE,YAAY,CAAC,CAAC;AACpF,oCAAwB,IAAI;AAAA,UAC9B,OAAO;AACL,yBAAS,gDAAkC,eAAe,oBAAgB,sBAAO,KAAK,EAAE,YAAY,CAAC,CAAC;AAAA,UACxG;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,IACD,OAAO,mBAAmB,OAAO;AAAA,MAC/B,MAAM,GAAG,cAAc;AAAA,MACvB,WAAW;AAAA,IACb,IAAI;AAAA,EACN,CAAC;AACH;AACA,cAAc,cAAc;AAC5B,IAAO,yBAAQ;",
6
6
  "names": ["_jsxs", "_Fragment", "_jsx", "Button", "clsx", "DropdownContentWrapper"]
7
7
  }
@@ -98,6 +98,7 @@ function CustomGradientBar({
98
98
  onChange,
99
99
  disableInserter = false,
100
100
  disableAlpha = false,
101
+ disablePositioning = false,
101
102
  __experimentalIsRenderedInSidebar = false
102
103
  }) {
103
104
  const gradientMarkersContainerDomRef = (0, import_element.useRef)(null);
@@ -167,6 +168,7 @@ function CustomGradientBar({
167
168
  __experimentalIsRenderedInSidebar,
168
169
  disableAlpha,
169
170
  disableRemove: disableInserter,
171
+ disablePositioning,
170
172
  gradientPickerDomRef: gradientMarkersContainerDomRef,
171
173
  ignoreMarkerPosition: isInsertingControlPoint ? gradientBarState.insertPosition : void 0,
172
174
  value: controlPoints,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/custom-gradient-picker/gradient-bar/index.tsx"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport { useRef, useReducer } from '@wordpress/element';\nimport ControlPoints from './control-points';\nimport { getHorizontalRelativeGradientPosition } from './utils';\nimport { MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT } from './constants';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst customGradientBarReducer = (state, action) => {\n switch (action.type) {\n case 'MOVE_INSERTER':\n if (state.id === 'IDLE' || state.id === 'MOVING_INSERTER') {\n return {\n id: 'MOVING_INSERTER',\n insertPosition: action.insertPosition\n };\n }\n break;\n case 'STOP_INSERTER_MOVE':\n if (state.id === 'MOVING_INSERTER') {\n return {\n id: 'IDLE'\n };\n }\n break;\n case 'OPEN_INSERTER':\n if (state.id === 'MOVING_INSERTER') {\n return {\n id: 'INSERTING_CONTROL_POINT',\n insertPosition: state.insertPosition\n };\n }\n break;\n case 'CLOSE_INSERTER':\n if (state.id === 'INSERTING_CONTROL_POINT') {\n return {\n id: 'IDLE'\n };\n }\n break;\n case 'START_CONTROL_CHANGE':\n if (state.id === 'IDLE') {\n return {\n id: 'MOVING_CONTROL_POINT'\n };\n }\n break;\n case 'STOP_CONTROL_CHANGE':\n if (state.id === 'MOVING_CONTROL_POINT') {\n return {\n id: 'IDLE'\n };\n }\n break;\n }\n return state;\n};\nconst customGradientBarReducerInitialState = {\n id: 'IDLE'\n};\nexport default function CustomGradientBar({\n background,\n hasGradient,\n value: controlPoints,\n onChange,\n disableInserter = false,\n disableAlpha = false,\n __experimentalIsRenderedInSidebar = false\n}) {\n const gradientMarkersContainerDomRef = useRef(null);\n const [gradientBarState, gradientBarStateDispatch] = useReducer(customGradientBarReducer, customGradientBarReducerInitialState);\n const onMouseEnterAndMove = event => {\n if (!gradientMarkersContainerDomRef.current) {\n return;\n }\n const insertPosition = getHorizontalRelativeGradientPosition(event.clientX, gradientMarkersContainerDomRef.current);\n\n // If the insert point is close to an existing control point don't show it.\n if (controlPoints.some(({\n position\n }) => {\n return Math.abs(insertPosition - position) < MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT;\n })) {\n if (gradientBarState.id === 'MOVING_INSERTER') {\n gradientBarStateDispatch({\n type: 'STOP_INSERTER_MOVE'\n });\n }\n return;\n }\n gradientBarStateDispatch({\n type: 'MOVE_INSERTER',\n insertPosition\n });\n };\n const onMouseLeave = () => {\n gradientBarStateDispatch({\n type: 'STOP_INSERTER_MOVE'\n });\n };\n const isMovingInserter = gradientBarState.id === 'MOVING_INSERTER';\n const isInsertingControlPoint = gradientBarState.id === 'INSERTING_CONTROL_POINT';\n return /*#__PURE__*/_jsxs(\"div\", {\n className: clsx('components-custom-gradient-picker__gradient-bar', {\n 'has-gradient': hasGradient\n }),\n onMouseEnter: onMouseEnterAndMove,\n onMouseMove: onMouseEnterAndMove,\n onMouseLeave: onMouseLeave,\n children: [/*#__PURE__*/_jsx(\"div\", {\n className: \"components-custom-gradient-picker__gradient-bar-background\",\n style: {\n background,\n opacity: hasGradient ? 1 : 0.4\n }\n }), /*#__PURE__*/_jsxs(\"div\", {\n ref: gradientMarkersContainerDomRef,\n className: \"components-custom-gradient-picker__markers-container\",\n children: [!disableInserter && (isMovingInserter || isInsertingControlPoint) && /*#__PURE__*/_jsx(ControlPoints.InsertPoint, {\n __experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,\n disableAlpha: disableAlpha,\n insertPosition: gradientBarState.insertPosition,\n value: controlPoints,\n onChange: onChange,\n onOpenInserter: () => {\n gradientBarStateDispatch({\n type: 'OPEN_INSERTER'\n });\n },\n onCloseInserter: () => {\n gradientBarStateDispatch({\n type: 'CLOSE_INSERTER'\n });\n }\n }), /*#__PURE__*/_jsx(ControlPoints, {\n __experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,\n disableAlpha: disableAlpha,\n disableRemove: disableInserter,\n gradientPickerDomRef: gradientMarkersContainerDomRef,\n ignoreMarkerPosition: isInsertingControlPoint ? gradientBarState.insertPosition : undefined,\n value: controlPoints,\n onChange: onChange,\n onStartControlPointChange: () => {\n gradientBarStateDispatch({\n type: 'START_CONTROL_CHANGE'\n });\n },\n onStopControlPointChange: () => {\n gradientBarStateDispatch({\n type: 'STOP_CONTROL_CHANGE'\n });\n }\n })]\n })]\n });\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAAmC;AACnC,4BAA0B;AAC1B,mBAAsD;AACtD,uBAA4D;AAC5D,yBAA2C;AAC3C,IAAM,2BAA2B,CAAC,OAAO,WAAW;AAClD,UAAQ,OAAO,MAAM;AAAA,IACnB,KAAK;AACH,UAAI,MAAM,OAAO,UAAU,MAAM,OAAO,mBAAmB;AACzD,eAAO;AAAA,UACL,IAAI;AAAA,UACJ,gBAAgB,OAAO;AAAA,QACzB;AAAA,MACF;AACA;AAAA,IACF,KAAK;AACH,UAAI,MAAM,OAAO,mBAAmB;AAClC,eAAO;AAAA,UACL,IAAI;AAAA,QACN;AAAA,MACF;AACA;AAAA,IACF,KAAK;AACH,UAAI,MAAM,OAAO,mBAAmB;AAClC,eAAO;AAAA,UACL,IAAI;AAAA,UACJ,gBAAgB,MAAM;AAAA,QACxB;AAAA,MACF;AACA;AAAA,IACF,KAAK;AACH,UAAI,MAAM,OAAO,2BAA2B;AAC1C,eAAO;AAAA,UACL,IAAI;AAAA,QACN;AAAA,MACF;AACA;AAAA,IACF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A,IACd,aAAa;AAAA,IACb;AAAA,IACA,UAAU,CAAc,uCAAAC,KAAK,OAAO;AAAA,MAClC,WAAW;AAAA,MACX,OAAO;AAAA,QACL;AAAA,QACA,SAAS,cAAc,IAAI;AAAA,MAC7B;AAAA,IACF,CAAC,GAAgB,uCAAAF,MAAM,OAAO;AAAA,MAC5B,KAAK;AAAA,MACL,WAAW;AAAA,MACX,UAAU,CAAC,CAAC,oBAAoB,oBAAoB,4BAAyC,uCAAAE,KAAK,sBAAAC,QAAc,aAAa;AAAA,QAC3H;AAAA,QACA;AAAA,QACA,gBAAgB,iBAAiB;AAAA,QACjC,OAAO;AAAA,QACP;AAAA,QACA,gBAAgB,MAAM;AACpB,mCAAyB;AAAA,YACvB,MAAM;AAAA,UACR,CAAC;AAAA,QACH;AAAA,QACA,iBAAiB,MAAM;AACrB,mCAAyB;AAAA,YACvB,MAAM;AAAA,UACR,CAAC;AAAA,QACH;AAAA,MACF,CAAC,GAAgB,uCAAAD,KAAK,sBAAAC,SAAe;AAAA,QACnC;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf,sBAAsB;AAAA,QACtB,sBAAsB,0BAA0B,iBAAiB,iBAAiB;AAAA,QAClF,OAAO;AAAA,QACP;AAAA,QACA,2BAA2B,MAAM;AAC/B,mCAAyB;AAAA,YACvB,MAAM;AAAA,UACR,CAAC;AAAA,QACH;AAAA,QACA,0BAA0B,MAAM;AAC9B,mCAAyB;AAAA,YACvB,MAAM;AAAA,UACR,CAAC;AAAA,QACH;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { useRef, useReducer } from '@wordpress/element';\nimport ControlPoints from './control-points';\nimport { getHorizontalRelativeGradientPosition } from './utils';\nimport { MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT } from './constants';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst customGradientBarReducer = (state, action) => {\n switch (action.type) {\n case 'MOVE_INSERTER':\n if (state.id === 'IDLE' || state.id === 'MOVING_INSERTER') {\n return {\n id: 'MOVING_INSERTER',\n insertPosition: action.insertPosition\n };\n }\n break;\n case 'STOP_INSERTER_MOVE':\n if (state.id === 'MOVING_INSERTER') {\n return {\n id: 'IDLE'\n };\n }\n break;\n case 'OPEN_INSERTER':\n if (state.id === 'MOVING_INSERTER') {\n return {\n id: 'INSERTING_CONTROL_POINT',\n insertPosition: state.insertPosition\n };\n }\n break;\n case 'CLOSE_INSERTER':\n if (state.id === 'INSERTING_CONTROL_POINT') {\n return {\n id: 'IDLE'\n };\n }\n break;\n case 'START_CONTROL_CHANGE':\n if (state.id === 'IDLE') {\n return {\n id: 'MOVING_CONTROL_POINT'\n };\n }\n break;\n case 'STOP_CONTROL_CHANGE':\n if (state.id === 'MOVING_CONTROL_POINT') {\n return {\n id: 'IDLE'\n };\n }\n break;\n }\n return state;\n};\nconst customGradientBarReducerInitialState = {\n id: 'IDLE'\n};\nexport default function CustomGradientBar({\n background,\n hasGradient,\n value: controlPoints,\n onChange,\n disableInserter = false,\n disableAlpha = false,\n disablePositioning = false,\n __experimentalIsRenderedInSidebar = false\n}) {\n const gradientMarkersContainerDomRef = useRef(null);\n const [gradientBarState, gradientBarStateDispatch] = useReducer(customGradientBarReducer, customGradientBarReducerInitialState);\n const onMouseEnterAndMove = event => {\n if (!gradientMarkersContainerDomRef.current) {\n return;\n }\n const insertPosition = getHorizontalRelativeGradientPosition(event.clientX, gradientMarkersContainerDomRef.current);\n\n // If the insert point is close to an existing control point don't show it.\n if (controlPoints.some(({\n position\n }) => {\n return Math.abs(insertPosition - position) < MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT;\n })) {\n if (gradientBarState.id === 'MOVING_INSERTER') {\n gradientBarStateDispatch({\n type: 'STOP_INSERTER_MOVE'\n });\n }\n return;\n }\n gradientBarStateDispatch({\n type: 'MOVE_INSERTER',\n insertPosition\n });\n };\n const onMouseLeave = () => {\n gradientBarStateDispatch({\n type: 'STOP_INSERTER_MOVE'\n });\n };\n const isMovingInserter = gradientBarState.id === 'MOVING_INSERTER';\n const isInsertingControlPoint = gradientBarState.id === 'INSERTING_CONTROL_POINT';\n return /*#__PURE__*/_jsxs(\"div\", {\n className: clsx('components-custom-gradient-picker__gradient-bar', {\n 'has-gradient': hasGradient\n }),\n onMouseEnter: onMouseEnterAndMove,\n onMouseMove: onMouseEnterAndMove,\n onMouseLeave: onMouseLeave,\n children: [/*#__PURE__*/_jsx(\"div\", {\n className: \"components-custom-gradient-picker__gradient-bar-background\",\n style: {\n background,\n opacity: hasGradient ? 1 : 0.4\n }\n }), /*#__PURE__*/_jsxs(\"div\", {\n ref: gradientMarkersContainerDomRef,\n className: \"components-custom-gradient-picker__markers-container\",\n children: [!disableInserter && (isMovingInserter || isInsertingControlPoint) && /*#__PURE__*/_jsx(ControlPoints.InsertPoint, {\n __experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,\n disableAlpha: disableAlpha,\n insertPosition: gradientBarState.insertPosition,\n value: controlPoints,\n onChange: onChange,\n onOpenInserter: () => {\n gradientBarStateDispatch({\n type: 'OPEN_INSERTER'\n });\n },\n onCloseInserter: () => {\n gradientBarStateDispatch({\n type: 'CLOSE_INSERTER'\n });\n }\n }), /*#__PURE__*/_jsx(ControlPoints, {\n __experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,\n disableAlpha: disableAlpha,\n disableRemove: disableInserter,\n disablePositioning: disablePositioning,\n gradientPickerDomRef: gradientMarkersContainerDomRef,\n ignoreMarkerPosition: isInsertingControlPoint ? gradientBarState.insertPosition : undefined,\n value: controlPoints,\n onChange: onChange,\n onStartControlPointChange: () => {\n gradientBarStateDispatch({\n type: 'START_CONTROL_CHANGE'\n });\n },\n onStopControlPointChange: () => {\n gradientBarStateDispatch({\n type: 'STOP_CONTROL_CHANGE'\n });\n }\n })]\n })]\n });\n}"],
5
+ "mappings": ";;;;;;;;;;;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AiB,MAAM;AACrB,mCAAyB;AAAA,YACvB,MAAM;AAAA,UACR,CAAC;AAAA,QACH;AAAA,MACF,CAAC,GAAgB,uCAAAD,KAAK,sBAAAC,SAAe;AAAA,QACnC;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA,sBAAsB;AAAA,QACtB,sBAAsB,0BAA0B,iBAAiB,iBAAiB;AAAA,QAClF,OAAO;AAAA,QACP;AAAA,QACA,2BAA2B,MAAM;AAC/B,mCAAyB;AAAA,YACvB,MAAM;AAAA,UACR,CAAC;AAAA,QACH;AAAA,QACA,0BAA0B,MAAM;AAC9B,mCAAyB;AAAA,YACvB,MAAM;AAAA,UACR,CAAC;AAAA,QACH;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;",
6
6
  "names": ["_jsxs", "clsx", "_jsx", "ControlPoints"]
7
7
  }
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // packages/components/src/dropdown/dropdown-content-wrapper.tsx
@@ -24,17 +34,106 @@ __export(dropdown_content_wrapper_exports, {
24
34
  default: () => dropdown_content_wrapper_default
25
35
  });
26
36
  module.exports = __toCommonJS(dropdown_content_wrapper_exports);
37
+ var import_clsx = __toESM(require("clsx"));
27
38
  var import_context = require("../context/index.cjs");
28
- var import_styles = require("./styles.cjs");
39
+
40
+ // packages/style-runtime/src/index.ts
41
+ var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
42
+ function getRuntime() {
43
+ const globalScope = globalThis;
44
+ if (globalScope.__wpStyleRuntime) {
45
+ return globalScope.__wpStyleRuntime;
46
+ }
47
+ globalScope.__wpStyleRuntime = {
48
+ documents: /* @__PURE__ */ new Map(),
49
+ styles: /* @__PURE__ */ new Map(),
50
+ injectedStyles: /* @__PURE__ */ new WeakMap()
51
+ };
52
+ if (typeof document !== "undefined") {
53
+ registerDocument(document);
54
+ }
55
+ return globalScope.__wpStyleRuntime;
56
+ }
57
+ function documentContainsStyleHash(targetDocument, hash) {
58
+ if (!targetDocument.head) {
59
+ return false;
60
+ }
61
+ for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {
62
+ if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
63
+ return true;
64
+ }
65
+ }
66
+ return false;
67
+ }
68
+ function injectStyle(targetDocument, hash, css) {
69
+ if (!targetDocument.head) {
70
+ return;
71
+ }
72
+ const runtime = getRuntime();
73
+ let injectedStyles = runtime.injectedStyles.get(targetDocument);
74
+ if (!injectedStyles) {
75
+ injectedStyles = /* @__PURE__ */ new Set();
76
+ runtime.injectedStyles.set(targetDocument, injectedStyles);
77
+ }
78
+ if (injectedStyles.has(hash)) {
79
+ return;
80
+ }
81
+ if (documentContainsStyleHash(targetDocument, hash)) {
82
+ injectedStyles.add(hash);
83
+ return;
84
+ }
85
+ const style = targetDocument.createElement("style");
86
+ style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
87
+ style.appendChild(targetDocument.createTextNode(css));
88
+ targetDocument.head.appendChild(style);
89
+ injectedStyles.add(hash);
90
+ }
91
+ function registerDocument(targetDocument) {
92
+ const runtime = getRuntime();
93
+ runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
94
+ for (const [hash, css] of runtime.styles) {
95
+ injectStyle(targetDocument, hash, css);
96
+ }
97
+ return () => {
98
+ const count = runtime.documents.get(targetDocument);
99
+ if (count === void 0) {
100
+ return;
101
+ }
102
+ if (count <= 1) {
103
+ runtime.documents.delete(targetDocument);
104
+ return;
105
+ }
106
+ runtime.documents.set(targetDocument, count - 1);
107
+ };
108
+ }
109
+ function registerStyle(hash, css) {
110
+ const runtime = getRuntime();
111
+ runtime.styles.set(hash, css);
112
+ for (const targetDocument of runtime.documents.keys()) {
113
+ injectStyle(targetDocument, hash, css);
114
+ }
115
+ }
116
+
117
+ // packages/components/src/dropdown/style.module.scss
118
+ if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
119
+ registerStyle("7f9bfd3385", ".ab61d20c737fa550__content-wrapper{margin-left:-8px;margin-right:-8px}.ab61d20c737fa550__content-wrapper:first-of-type{margin-top:-8px}.ab61d20c737fa550__content-wrapper:last-of-type{margin-bottom:-8px}.f0a033fae417d720__padding-small{padding:8px}.d83816967399484e__padding-medium{padding:16px}");
120
+ }
121
+ var style_module_default = { "content-wrapper": "ab61d20c737fa550__content-wrapper", "padding-small": "f0a033fae417d720__padding-small", "padding-medium": "d83816967399484e__padding-medium" };
122
+
123
+ // packages/components/src/dropdown/dropdown-content-wrapper.tsx
29
124
  var import_jsx_runtime = require("react/jsx-runtime");
30
125
  function UnconnectedDropdownContentWrapper(props, forwardedRef) {
31
126
  const {
32
127
  paddingSize = "small",
128
+ className,
33
129
  ...derivedProps
34
130
  } = (0, import_context.useContextSystem)(props, "DropdownContentWrapper");
35
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.DropdownContentWrapperDiv, {
131
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
36
132
  ...derivedProps,
37
- paddingSize,
133
+ className: (0, import_clsx.default)(style_module_default["content-wrapper"], {
134
+ [style_module_default["padding-small"]]: paddingSize !== "none" && paddingSize !== "medium",
135
+ [style_module_default["padding-medium"]]: paddingSize === "medium"
136
+ }, className),
38
137
  ref: forwardedRef
39
138
  });
40
139
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/dropdown/dropdown-content-wrapper.tsx"],
4
- "sourcesContent": ["import { contextConnect, useContextSystem } from '../context';\nimport { DropdownContentWrapperDiv } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnconnectedDropdownContentWrapper(props, forwardedRef) {\n const {\n paddingSize = 'small',\n ...derivedProps\n } = useContextSystem(props, 'DropdownContentWrapper');\n return /*#__PURE__*/_jsx(DropdownContentWrapperDiv, {\n ...derivedProps,\n paddingSize: paddingSize,\n ref: forwardedRef\n });\n}\n\n/**\n * A convenience wrapper for the `renderContent` when you want to apply\n * different padding. (Default is `paddingSize=\"small\"`).\n *\n * ```jsx\n * import {\n * Dropdown,\n * __experimentalDropdownContentWrapper as DropdownContentWrapper,\n * } from '@wordpress/components';\n *\n * <Dropdown\n * renderContent={ () => (\n * <DropdownContentWrapper paddingSize=\"medium\">\n * My dropdown content\n * </DropdownContentWrapper>\n * ) }\n * />\n * ```\n */\nexport const DropdownContentWrapper = contextConnect(UnconnectedDropdownContentWrapper, 'DropdownContentWrapper');\nexport default DropdownContentWrapper;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAiD;AACjD,oBAA0C;AAC1C,yBAA4B;AAC5B,SAAS,kCAAkC,OAAO,cAAc;AAC9D,QAAM;AAAA,IACJ,cAAc;AAAA,IACd,GAAG;AAAA,EACL,QAAI,iCAAiB,OAAO,wBAAwB;AACpD,SAAoB,uCAAAA,KAAK,yCAA2B;AAAA,IAClD,GAAG;AAAA,IACH;AAAA,IACA,KAAK;AAAA,EACP,CAAC;AACH;AAqBO,IAAM,6BAAyB,+BAAe,mCAAmC,wBAAwB;AAChH,IAAO,mCAAQ;",
6
- "names": ["_jsx"]
3
+ "sources": ["../../src/dropdown/dropdown-content-wrapper.tsx", "../../../style-runtime/src/index.ts", "../../src/dropdown/style.module.scss"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { contextConnect, useContextSystem } from '../context';\nimport styles from './style.module.scss';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnconnectedDropdownContentWrapper(props, forwardedRef) {\n const {\n paddingSize = 'small',\n className,\n ...derivedProps\n } = useContextSystem(props, 'DropdownContentWrapper');\n return /*#__PURE__*/_jsx(\"div\", {\n ...derivedProps,\n className: clsx(styles['content-wrapper'], {\n [styles['padding-small']]: paddingSize !== 'none' && paddingSize !== 'medium',\n [styles['padding-medium']]: paddingSize === 'medium'\n }, className),\n ref: forwardedRef\n });\n}\n\n/**\n * A convenience wrapper for the `renderContent` when you want to apply\n * different padding. (Default is `paddingSize=\"small\"`).\n *\n * ```jsx\n * import {\n * Dropdown,\n * __experimentalDropdownContentWrapper as DropdownContentWrapper,\n * } from '@wordpress/components';\n *\n * <Dropdown\n * renderContent={ () => (\n * <DropdownContentWrapper paddingSize=\"medium\">\n * My dropdown content\n * </DropdownContentWrapper>\n * ) }\n * />\n * ```\n */\nexport const DropdownContentWrapper = contextConnect(UnconnectedDropdownContentWrapper, 'DropdownContentWrapper');\nexport default DropdownContentWrapper;", "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(\"7f9bfd3385\", \".ab61d20c737fa550__content-wrapper{margin-left:-8px;margin-right:-8px}.ab61d20c737fa550__content-wrapper:first-of-type{margin-top:-8px}.ab61d20c737fa550__content-wrapper:last-of-type{margin-bottom:-8px}.f0a033fae417d720__padding-small{padding:8px}.d83816967399484e__padding-medium{padding:16px}\");\n}\nexport default {\"content-wrapper\":\"ab61d20c737fa550__content-wrapper\",\"padding-small\":\"f0a033fae417d720__padding-small\",\"padding-medium\":\"d83816967399484e__padding-medium\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAAiD;;;ACDjD,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,gBAAg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,QAAI,UAAU,QAAW;AACvB;AAAA,IACF;AACA,QAAI,SAAS,GAAG;AACd,cAAQ,UAAU,OAAO,cAAc;AACvC;AAAA,IACF;AACA,YAAQ,UAAU,IAAI,gBAAgB,QAAQ,CAAC;AAAA,EACjD;AACF;AAaO,SAAS,cAAc,MAAM,KAAK;AACvC,QAAM,UAAU,WAAW;AAC3B,UAAQ,OAAO,IAAI,MAAM,GAAG;AAC5B,aAAW,kBAAkB,QAAQ,UAAU,KAAK,GAAG;AACrD,gBAAY,gBAAgB,MAAM,GAAG;AAAA,EACvC;AACF;;;AChIA,IAAI,OAAO,YAAY,eAAe,QAAQ,IAAI,aAAa,QAAQ;AACtE,gBAAc,cAAc,wSAAwS;AACrU;AACA,IAAO,uBAAQ,EAAC,mBAAkB,qCAAoC,iBAAgB,mCAAkC,kBAAiB,mCAAkC;;;AFD3K,yBAA4B;AAC5B,SAAS,kCAAkC,OAAO,cAAc;AAC9D,QAAM;AAAA,IACJ,cAAc;AAAA,IACd;AAAA,IACA,GAAG;AAAA,EACL,QAAI,iCAAiB,OAAO,wBAAwB;AACpD,SAAoB,uCAAAA,KAAK,OAAO;AAAA,IAC9B,GAAG;AAAA,IACH,eAAW,YAAAC,SAAK,qBAAO,iBAAiB,GAAG;AAAA,MACzC,CAAC,qBAAO,eAAe,CAAC,GAAG,gBAAgB,UAAU,gBAAgB;AAAA,MACrE,CAAC,qBAAO,gBAAgB,CAAC,GAAG,gBAAgB;AAAA,IAC9C,GAAG,SAAS;AAAA,IACZ,KAAK;AAAA,EACP,CAAC;AACH;AAqBO,IAAM,6BAAyB,+BAAe,mCAAmC,wBAAwB;AAChH,IAAO,mCAAQ;",
6
+ "names": ["_jsx", "clsx"]
7
7
  }
@@ -47,6 +47,7 @@ function CustomDuotoneBar({
47
47
  const controlPoints = (0, import_utils.getColorStopsFromColors)(values);
48
48
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_gradient_bar.default, {
49
49
  disableInserter: true,
50
+ disablePositioning: true,
50
51
  background,
51
52
  hasGradient,
52
53
  value: controlPoints,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/duotone-picker/custom-duotone-bar.tsx"],
4
- "sourcesContent": ["import CustomGradientBar from '../custom-gradient-picker/gradient-bar';\nimport { getColorStopsFromColors, getGradientFromCSSColors, getColorsFromColorStops } from './utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PLACEHOLDER_VALUES = ['#333', '#CCC'];\nexport default function CustomDuotoneBar({\n value,\n onChange\n}) {\n const hasGradient = !!value;\n const values = hasGradient ? value : PLACEHOLDER_VALUES;\n const background = getGradientFromCSSColors(values);\n const controlPoints = getColorStopsFromColors(values);\n return /*#__PURE__*/_jsx(CustomGradientBar, {\n disableInserter: true,\n background: background,\n hasGradient: hasGradient,\n value: controlPoints,\n onChange: newColorStops => {\n const newValue = getColorsFromColorStops(newColorStops);\n onChange(newValue);\n }\n });\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA8B;AAC9B,mBAA2F;AAC3F,yBAA4B;AAC5B,IAAM,qBAAqB,CAAC,QAAQ,MAAM;AAC3B,SAAR,iBAAkC;AAAA,EACvC;AAAA,EACA;AACF,GAAG;AACD,QAAM,cAAc,CAAC,CAAC;AACtB,QAAM,SAAS,cAAc,QAAQ;AACrC,QAAM,iBAAa,uCAAyB,MAAM;AAClD,QAAM,oBAAgB,sCAAwB,MAAM;AACpD,SAAoB,uCAAAA,KAAK,oBAAAC,SAAmB;AAAA,IAC1C,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,UAAU,mBAAiB;AACzB,YAAM,eAAW,sCAAwB,aAAa;AACtD,eAAS,QAAQ;AAAA,IACnB;AAAA,EACF,CAAC;AACH;",
4
+ "sourcesContent": ["import CustomGradientBar from '../custom-gradient-picker/gradient-bar';\nimport { getColorStopsFromColors, getGradientFromCSSColors, getColorsFromColorStops } from './utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PLACEHOLDER_VALUES = ['#333', '#CCC'];\nexport default function CustomDuotoneBar({\n value,\n onChange\n}) {\n const hasGradient = !!value;\n const values = hasGradient ? value : PLACEHOLDER_VALUES;\n const background = getGradientFromCSSColors(values);\n const controlPoints = getColorStopsFromColors(values);\n return /*#__PURE__*/_jsx(CustomGradientBar, {\n disableInserter: true,\n disablePositioning: true,\n background: background,\n hasGradient: hasGradient,\n value: controlPoints,\n onChange: newColorStops => {\n const newValue = getColorsFromColorStops(newColorStops);\n onChange(newValue);\n }\n });\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA8B;AAC9B,mBAA2F;AAC3F,yBAA4B;AAC5B,IAAM,qBAAqB,CAAC,QAAQ,MAAM;AAC3B,SAAR,iBAAkC;AAAA,EACvC;AAAA,EACA;AACF,GAAG;AACD,QAAM,cAAc,CAAC,CAAC;AACtB,QAAM,SAAS,cAAc,QAAQ;AACrC,QAAM,iBAAa,uCAAyB,MAAM;AAClD,QAAM,oBAAgB,sCAAwB,MAAM;AACpD,SAAoB,uCAAAA,KAAK,oBAAAC,SAAmB;AAAA,IAC1C,iBAAiB;AAAA,IACjB,oBAAoB;AAAA,IACpB;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,UAAU,mBAAiB;AACzB,YAAM,eAAW,sCAAwB,aAAa;AACtD,eAAS,QAAQ;AAAA,IACnB;AAAA,EACF,CAAC;AACH;",
6
6
  "names": ["_jsx", "CustomGradientBar"]
7
7
  }