@wordpress/components 40.1.1-next.v.202609031004.0 → 41.0.1-next.v.202609171837.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 (583) hide show
  1. package/CHANGELOG.md +49 -1
  2. package/CONTRIBUTING.md +2 -0
  3. package/build/border-box-control/border-box-control/hook.cjs +1 -1
  4. package/build/border-box-control/border-box-control/hook.cjs.map +2 -2
  5. package/build/border-box-control/border-box-control-linked-button/hook.cjs +1 -1
  6. package/build/border-box-control/border-box-control-linked-button/hook.cjs.map +2 -2
  7. package/build/border-box-control/border-box-control-split-controls/hook.cjs +1 -1
  8. package/build/border-box-control/border-box-control-split-controls/hook.cjs.map +2 -2
  9. package/build/border-box-control/border-box-control-visualizer/hook.cjs +1 -1
  10. package/build/border-box-control/border-box-control-visualizer/hook.cjs.map +2 -2
  11. package/build/box-control/box-input-control.cjs +2 -2
  12. package/build/box-control/box-input-control.cjs.map +2 -2
  13. package/build/box-control/icon.cjs +120 -11
  14. package/build/box-control/icon.cjs.map +4 -4
  15. package/build/box-control/index.cjs +2 -2
  16. package/build/box-control/index.cjs.map +2 -2
  17. package/build/card/card/component.cjs +0 -8
  18. package/build/card/card/component.cjs.map +3 -3
  19. package/build/checkbox-control/index.cjs +6 -2
  20. package/build/checkbox-control/index.cjs.map +2 -2
  21. package/build/composite/context.cjs +9 -2
  22. package/build/composite/context.cjs.map +2 -2
  23. package/build/composite/group-label.cjs +4 -0
  24. package/build/composite/group-label.cjs.map +2 -2
  25. package/build/composite/group.cjs +10 -2
  26. package/build/composite/group.cjs.map +2 -2
  27. package/build/composite/item.cjs +4 -0
  28. package/build/composite/item.cjs.map +3 -3
  29. package/build/custom-select-control-v2/styles.cjs +9 -9
  30. package/build/custom-select-control-v2/styles.cjs.map +2 -2
  31. package/build/disabled/index.cjs +1 -1
  32. package/build/disabled/index.cjs.map +2 -2
  33. package/build/draggable/index.cjs.map +1 -1
  34. package/build/elevation/hook.cjs +111 -37
  35. package/build/elevation/hook.cjs.map +4 -4
  36. package/build/focal-point-picker/styles/focal-point-picker-style.cjs +11 -11
  37. package/build/focal-point-picker/styles/focal-point-picker-style.cjs.map +1 -1
  38. package/build/form-token-field/index.cjs +1 -1
  39. package/build/form-token-field/index.cjs.map +2 -2
  40. package/build/grid/hook.cjs +130 -24
  41. package/build/grid/hook.cjs.map +4 -4
  42. package/build/grid/utils.cjs +1 -1
  43. package/build/grid/utils.cjs.map +2 -2
  44. package/build/input-control/styles/input-control-styles.cjs +42 -27
  45. package/build/input-control/styles/input-control-styles.cjs.map +2 -2
  46. package/build/item-group/context.cjs +1 -0
  47. package/build/item-group/context.cjs.map +2 -2
  48. package/build/item-group/item/component.cjs +12 -0
  49. package/build/item-group/item/component.cjs.map +3 -3
  50. package/build/item-group/item/hook.cjs +6 -5
  51. package/build/item-group/item/hook.cjs.map +2 -2
  52. package/build/item-group/item-group/component.cjs +1 -0
  53. package/build/item-group/item-group/component.cjs.map +2 -2
  54. package/build/menu/styles.cjs +17 -17
  55. package/build/menu/styles.cjs.map +2 -2
  56. package/build/navigator/styles.cjs +7 -7
  57. package/build/navigator/styles.cjs.map +2 -2
  58. package/build/palette-edit/index.cjs +39 -44
  59. package/build/palette-edit/index.cjs.map +3 -3
  60. package/build/palette-edit/styles.cjs +15 -23
  61. package/build/palette-edit/styles.cjs.map +2 -2
  62. package/build/progress-bar/index.cjs +1 -1
  63. package/build/progress-bar/index.cjs.map +2 -2
  64. package/build/range-control/styles/range-control-styles.cjs +25 -25
  65. package/build/range-control/styles/range-control-styles.cjs.map +2 -2
  66. package/build/select-control/styles/select-control-styles.cjs +8 -8
  67. package/build/select-control/styles/select-control-styles.cjs.map +2 -2
  68. package/build/tabs/styles.cjs +5 -5
  69. package/build/tabs/styles.cjs.map +2 -2
  70. package/build/textarea-control/index.cjs +1 -1
  71. package/build/textarea-control/index.cjs.map +2 -2
  72. package/build/toggle-group-control/context.cjs +8 -2
  73. package/build/toggle-group-control/context.cjs.map +2 -2
  74. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs +5 -2
  75. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs.map +2 -2
  76. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs +5 -2
  77. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs.map +2 -2
  78. package/build/toggle-group-control/toggle-group-control/component.cjs +3 -1
  79. package/build/toggle-group-control/toggle-group-control/component.cjs.map +2 -2
  80. package/build/toggle-group-control/toggle-group-control-option/component.cjs +2 -0
  81. package/build/toggle-group-control/toggle-group-control-option/component.cjs.map +2 -2
  82. package/build/toggle-group-control/toggle-group-control-option-base/component.cjs +2 -1
  83. package/build/toggle-group-control/toggle-group-control-option-base/component.cjs.map +2 -2
  84. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs +2 -0
  85. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs.map +2 -2
  86. package/build/tree-grid/cell.cjs +4 -0
  87. package/build/tree-grid/cell.cjs.map +2 -2
  88. package/build/tree-grid/roving-tab-index-item.cjs +5 -1
  89. package/build/tree-grid/roving-tab-index-item.cjs.map +2 -2
  90. package/build/tree-grid/row.cjs +6 -1
  91. package/build/tree-grid/row.cjs.map +2 -2
  92. package/build/tree-grid/use-validate-tree-grid-structure.cjs +81 -0
  93. package/build/tree-grid/use-validate-tree-grid-structure.cjs.map +7 -0
  94. package/build/utils/colors-values.cjs +3 -2
  95. package/build/utils/colors-values.cjs.map +2 -2
  96. package/build/utils/config-values.cjs +0 -2
  97. package/build/utils/config-values.cjs.map +2 -2
  98. package/build-module/border-box-control/border-box-control/hook.mjs +1 -1
  99. package/build-module/border-box-control/border-box-control/hook.mjs.map +2 -2
  100. package/build-module/border-box-control/border-box-control-linked-button/hook.mjs +1 -1
  101. package/build-module/border-box-control/border-box-control-linked-button/hook.mjs.map +2 -2
  102. package/build-module/border-box-control/border-box-control-split-controls/hook.mjs +1 -1
  103. package/build-module/border-box-control/border-box-control-split-controls/hook.mjs.map +2 -2
  104. package/build-module/border-box-control/border-box-control-visualizer/hook.mjs +1 -1
  105. package/build-module/border-box-control/border-box-control-visualizer/hook.mjs.map +2 -2
  106. package/build-module/box-control/box-input-control.mjs +2 -2
  107. package/build-module/box-control/box-input-control.mjs.map +2 -2
  108. package/build-module/box-control/icon.mjs +110 -11
  109. package/build-module/box-control/icon.mjs.map +3 -3
  110. package/build-module/box-control/index.mjs +2 -2
  111. package/build-module/box-control/index.mjs.map +2 -2
  112. package/build-module/card/card/component.mjs +0 -8
  113. package/build-module/card/card/component.mjs.map +2 -2
  114. package/build-module/checkbox-control/index.mjs +6 -2
  115. package/build-module/checkbox-control/index.mjs.map +2 -2
  116. package/build-module/composite/context.mjs +6 -1
  117. package/build-module/composite/context.mjs.map +2 -2
  118. package/build-module/composite/group-label.mjs +5 -1
  119. package/build-module/composite/group-label.mjs.map +2 -2
  120. package/build-module/composite/group.mjs +11 -3
  121. package/build-module/composite/group.mjs.map +2 -2
  122. package/build-module/composite/item.mjs +4 -0
  123. package/build-module/composite/item.mjs.map +2 -2
  124. package/build-module/custom-select-control-v2/styles.mjs +9 -9
  125. package/build-module/custom-select-control-v2/styles.mjs.map +2 -2
  126. package/build-module/disabled/index.mjs +1 -1
  127. package/build-module/disabled/index.mjs.map +2 -2
  128. package/build-module/draggable/index.mjs.map +1 -1
  129. package/build-module/elevation/hook.mjs +111 -37
  130. package/build-module/elevation/hook.mjs.map +3 -3
  131. package/build-module/focal-point-picker/styles/focal-point-picker-style.mjs +11 -11
  132. package/build-module/focal-point-picker/styles/focal-point-picker-style.mjs.map +1 -1
  133. package/build-module/form-token-field/index.mjs +1 -1
  134. package/build-module/form-token-field/index.mjs.map +2 -2
  135. package/build-module/grid/hook.mjs +130 -24
  136. package/build-module/grid/hook.mjs.map +3 -3
  137. package/build-module/grid/utils.mjs +1 -1
  138. package/build-module/grid/utils.mjs.map +2 -2
  139. package/build-module/input-control/styles/input-control-styles.mjs +42 -27
  140. package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
  141. package/build-module/item-group/context.mjs +1 -0
  142. package/build-module/item-group/context.mjs.map +2 -2
  143. package/build-module/item-group/item/component.mjs +12 -0
  144. package/build-module/item-group/item/component.mjs.map +2 -2
  145. package/build-module/item-group/item/hook.mjs +6 -5
  146. package/build-module/item-group/item/hook.mjs.map +2 -2
  147. package/build-module/item-group/item-group/component.mjs +1 -0
  148. package/build-module/item-group/item-group/component.mjs.map +2 -2
  149. package/build-module/menu/styles.mjs +17 -17
  150. package/build-module/menu/styles.mjs.map +2 -2
  151. package/build-module/navigator/styles.mjs +7 -7
  152. package/build-module/navigator/styles.mjs.map +2 -2
  153. package/build-module/palette-edit/index.mjs +41 -46
  154. package/build-module/palette-edit/index.mjs.map +2 -2
  155. package/build-module/palette-edit/styles.mjs +15 -22
  156. package/build-module/palette-edit/styles.mjs.map +2 -2
  157. package/build-module/progress-bar/index.mjs +1 -1
  158. package/build-module/progress-bar/index.mjs.map +2 -2
  159. package/build-module/range-control/styles/range-control-styles.mjs +25 -25
  160. package/build-module/range-control/styles/range-control-styles.mjs.map +2 -2
  161. package/build-module/select-control/styles/select-control-styles.mjs +8 -8
  162. package/build-module/select-control/styles/select-control-styles.mjs.map +2 -2
  163. package/build-module/tabs/styles.mjs +5 -5
  164. package/build-module/tabs/styles.mjs.map +2 -2
  165. package/build-module/textarea-control/index.mjs +1 -1
  166. package/build-module/textarea-control/index.mjs.map +2 -2
  167. package/build-module/toggle-group-control/context.mjs +8 -2
  168. package/build-module/toggle-group-control/context.mjs.map +2 -2
  169. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs +5 -2
  170. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs.map +2 -2
  171. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs +5 -2
  172. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs.map +2 -2
  173. package/build-module/toggle-group-control/toggle-group-control/component.mjs +3 -1
  174. package/build-module/toggle-group-control/toggle-group-control/component.mjs.map +2 -2
  175. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs +2 -0
  176. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs.map +2 -2
  177. package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs +2 -1
  178. package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs.map +2 -2
  179. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs +2 -0
  180. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs.map +2 -2
  181. package/build-module/tree-grid/cell.mjs +5 -1
  182. package/build-module/tree-grid/cell.mjs.map +2 -2
  183. package/build-module/tree-grid/roving-tab-index-item.mjs +5 -1
  184. package/build-module/tree-grid/roving-tab-index-item.mjs.map +2 -2
  185. package/build-module/tree-grid/row.mjs +7 -2
  186. package/build-module/tree-grid/row.mjs.map +2 -2
  187. package/build-module/tree-grid/use-validate-tree-grid-structure.mjs +56 -0
  188. package/build-module/tree-grid/use-validate-tree-grid-structure.mjs.map +7 -0
  189. package/build-module/utils/colors-values.mjs +3 -2
  190. package/build-module/utils/colors-values.mjs.map +2 -2
  191. package/build-module/utils/config-values.mjs +0 -2
  192. package/build-module/utils/config-values.mjs.map +2 -2
  193. package/build-style/style-rtl.css +44 -115
  194. package/build-style/style.css +44 -115
  195. package/build-types/animate/types.d.ts.map +1 -1
  196. package/build-types/box-control/icon.d.ts +1 -1
  197. package/build-types/box-control/icon.d.ts.map +1 -1
  198. package/build-types/box-control/types.d.ts.map +1 -1
  199. package/build-types/card/card/component.d.ts.map +1 -1
  200. package/build-types/checkbox-control/index.d.ts.map +1 -1
  201. package/build-types/composite/context.d.ts +2 -0
  202. package/build-types/composite/context.d.ts.map +1 -1
  203. package/build-types/composite/group-label.d.ts.map +1 -1
  204. package/build-types/composite/group.d.ts.map +1 -1
  205. package/build-types/composite/item.d.ts.map +1 -1
  206. package/build-types/composite/legacy/index.d.ts.map +1 -1
  207. package/build-types/context/wordpress-component.d.ts.map +1 -1
  208. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  209. package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
  210. package/build-types/elevation/hook.d.ts +2 -1
  211. package/build-types/elevation/hook.d.ts.map +1 -1
  212. package/build-types/focusable-iframe/types.d.ts.map +1 -1
  213. package/build-types/form-token-field/types.d.ts.map +1 -1
  214. package/build-types/grid/hook.d.ts +866 -1
  215. package/build-types/grid/hook.d.ts.map +1 -1
  216. package/build-types/heading/types.d.ts.map +1 -1
  217. package/build-types/icon/index.d.ts.map +1 -1
  218. package/build-types/input-control/reducer/actions.d.ts.map +1 -1
  219. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  220. package/build-types/input-control/types.d.ts.map +1 -1
  221. package/build-types/item-group/context.d.ts.map +1 -1
  222. package/build-types/item-group/item/component.d.ts.map +1 -1
  223. package/build-types/item-group/item/hook.d.ts +1 -1
  224. package/build-types/item-group/item/hook.d.ts.map +1 -1
  225. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  226. package/build-types/item-group/types.d.ts +4 -0
  227. package/build-types/item-group/types.d.ts.map +1 -1
  228. package/build-types/menu/styles.d.ts.map +1 -1
  229. package/build-types/modal/use-modal-exit-animation.d.ts.map +1 -1
  230. package/build-types/navigator/navigator-screen/use-screen-animate-presence.d.ts.map +1 -1
  231. package/build-types/navigator/styles.d.ts.map +1 -1
  232. package/build-types/palette-edit/index.d.ts.map +1 -1
  233. package/build-types/palette-edit/styles.d.ts +0 -503
  234. package/build-types/palette-edit/styles.d.ts.map +1 -1
  235. package/build-types/panel/types.d.ts.map +1 -1
  236. package/build-types/popover/types.d.ts.map +1 -1
  237. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  238. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  239. package/build-types/slot-fill/types.d.ts.map +1 -1
  240. package/build-types/surface/types.d.ts.map +1 -1
  241. package/build-types/tabs/styles.d.ts.map +1 -1
  242. package/build-types/text/types.d.ts.map +1 -1
  243. package/build-types/toggle-group-control/context.d.ts +2 -2
  244. package/build-types/toggle-group-control/context.d.ts.map +1 -1
  245. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +1 -1
  246. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  247. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +1 -1
  248. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  249. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  250. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +2 -2
  251. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  252. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  253. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +2 -2
  254. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  255. package/build-types/toggle-group-control/types.d.ts +12 -3
  256. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  257. package/build-types/tree-grid/cell.d.ts.map +1 -1
  258. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  259. package/build-types/tree-grid/row.d.ts.map +1 -1
  260. package/build-types/tree-grid/use-validate-tree-grid-structure.d.ts +2 -0
  261. package/build-types/tree-grid/use-validate-tree-grid-structure.d.ts.map +1 -0
  262. package/build-types/tree-select/types.d.ts.map +1 -1
  263. package/build-types/truncate/types.d.ts.map +1 -1
  264. package/build-types/utils/colors-values.d.ts.map +1 -1
  265. package/build-types/utils/config-values.d.ts +0 -2
  266. package/build-types/utils/font-size.d.ts.map +1 -1
  267. package/emotion-to-scss-modules.md +147 -0
  268. package/package.json +29 -32
  269. package/src/alignment-matrix-control/test/{index.jsdom.test.tsx → index.browser.test.tsx} +26 -16
  270. package/src/animate/types.ts +1 -4
  271. package/src/autocomplete/get-default-use-items.tsx +2 -2
  272. package/src/autocomplete/index.tsx +1 -1
  273. package/src/autocomplete/style.scss +4 -3
  274. package/src/autocomplete/test/index.jsdom.test.tsx +2 -1
  275. package/src/badge/test/index.jsdom.test.tsx +1 -0
  276. package/src/base-control/test/index.jsdom.test.tsx +1 -0
  277. package/src/border-box-control/border-box-control/component.tsx +1 -1
  278. package/src/border-box-control/border-box-control-split-controls/component.tsx +1 -1
  279. package/src/border-box-control/style.module.scss +12 -2
  280. package/src/border-box-control/test/index.jsdom.test.tsx +5 -2
  281. package/src/border-control/border-control-dropdown/component.tsx +4 -4
  282. package/src/border-control/border-control-dropdown/hook.ts +1 -1
  283. package/src/border-control/test/index.jsdom.test.tsx +25 -12
  284. package/src/box-control/box-input-control.tsx +2 -2
  285. package/src/box-control/icon.tsx +50 -16
  286. package/src/box-control/style.module.scss +62 -0
  287. package/src/box-control/test/icon.jsdom.test.tsx +33 -0
  288. package/src/box-control/test/index.jsdom.test.tsx +6 -3
  289. package/src/box-control/types.ts +1 -3
  290. package/src/button/index.tsx +2 -2
  291. package/src/button/style.scss +0 -6
  292. package/src/button/test/{index.jsdom.test.tsx → index.browser.test.tsx} +157 -146
  293. package/src/card/card/component.tsx +1 -14
  294. package/src/card/test/index.browser.test.tsx +473 -0
  295. package/src/checkbox-control/index.tsx +4 -0
  296. package/src/checkbox-control/stories/index.story.tsx +1 -1
  297. package/src/checkbox-control/style.scss +2 -8
  298. package/src/checkbox-control/test/__snapshots__/index.jsdom.test.tsx.snap +5 -5
  299. package/src/checkbox-control/test/index.jsdom.test.tsx +4 -1
  300. package/src/circular-option-picker/style.scss +7 -45
  301. package/src/circular-option-picker/test/{index.jsdom.test.tsx → index.browser.test.tsx} +31 -27
  302. package/src/color-indicator/test/__snapshots__/index.jsdom.test.tsx.snap +2 -2
  303. package/src/color-indicator/test/index.jsdom.test.tsx +1 -0
  304. package/src/color-palette/index.tsx +4 -4
  305. package/src/color-palette/test/{index.jsdom.test.tsx → index.browser.test.tsx} +64 -62
  306. package/src/color-palette/test/utils.jsdom.test.ts +1 -0
  307. package/src/color-picker/test/{index.jsdom.test.tsx → index.browser.test.tsx} +187 -215
  308. package/src/combobox-control/index.tsx +2 -2
  309. package/src/combobox-control/test/index.jsdom.test.tsx +12 -7
  310. package/src/composite/context.tsx +6 -0
  311. package/src/composite/group-label.tsx +8 -1
  312. package/src/composite/group.tsx +9 -2
  313. package/src/composite/item.tsx +6 -0
  314. package/src/composite/legacy/index.tsx +2 -3
  315. package/src/composite/legacy/test/{index.jsdom.test.tsx → index.browser.test.tsx} +172 -157
  316. package/src/composite/test/{index.jsdom.test.tsx → index.browser.test.tsx} +180 -145
  317. package/src/confirm-dialog/test/index.browser.test.tsx +48 -0
  318. package/src/confirm-dialog/test/index.jsdom.test.tsx +28 -20
  319. package/src/content-editable-control/test/index.jsdom.test.tsx +4 -3
  320. package/src/context/test/context-system-provider.jsdom.test.tsx +14 -10
  321. package/src/context/wordpress-component.ts +17 -13
  322. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +2 -2
  323. package/src/custom-gradient-picker/gradient-bar/test/utils.jsdom.test.ts +6 -5
  324. package/src/custom-gradient-picker/style.scss +24 -8
  325. package/src/custom-gradient-picker/test/{index.jsdom.test.tsx → index.browser.test.tsx} +80 -87
  326. package/src/custom-select-control/test/{index.jsdom.test.tsx → index.browser.test.tsx} +168 -121
  327. package/src/custom-select-control-v2/custom-select.tsx +1 -1
  328. package/src/custom-select-control-v2/styles.ts +4 -2
  329. package/src/custom-select-control-v2/test/{index.jsdom.test.tsx → index.browser.test.tsx} +237 -162
  330. package/src/custom-select-control-v2/types.ts +1 -2
  331. package/src/dashicon/index.tsx +1 -1
  332. package/src/date-time/date-picker/test/index.jsdom.test.tsx +6 -3
  333. package/src/date-time/date-picker/test/use-lilius.jsdom.test.ts +1 -0
  334. package/src/date-time/date-picker/use-lilius/index.ts +1 -1
  335. package/src/date-time/date-time/test/index.jsdom.test.tsx +20 -11
  336. package/src/date-time/time-picker/test/index.jsdom.test.tsx +54 -32
  337. package/src/date-time/time-picker/time-input/test/index.jsdom.test.tsx +8 -3
  338. package/src/disabled/index.tsx +7 -7
  339. package/src/disabled/test/index.browser.test.tsx +38 -0
  340. package/src/disabled/test/index.jsdom.test.tsx +26 -0
  341. package/src/divider/test/index.browser.test.tsx +52 -0
  342. package/src/draggable/index.tsx +1 -1
  343. package/src/dropdown/test/index.browser.test.tsx +55 -0
  344. package/src/dropdown/test/index.jsdom.test.tsx +1 -51
  345. package/src/dropdown-menu/test/index.jsdom.test.tsx +5 -4
  346. package/src/duotone-picker/duotone-picker.tsx +1 -1
  347. package/src/duotone-picker/test/custom-duotone-bar.jsdom.test.tsx +11 -8
  348. package/src/duotone-picker/test/{index.jsdom.test.tsx → index.browser.test.tsx} +37 -31
  349. package/src/elevation/hook.ts +60 -89
  350. package/src/elevation/style.module.scss +46 -0
  351. package/src/elevation/test/index.browser.test.tsx +141 -0
  352. package/src/external-link/test/index.jsdom.test.tsx +5 -4
  353. package/src/flex/test/index.browser.test.tsx +181 -0
  354. package/src/focal-point-picker/styles/focal-point-picker-style.ts +1 -1
  355. package/src/focal-point-picker/test/{index.jsdom.test.tsx → index.browser.test.tsx} +43 -39
  356. package/src/focal-point-picker/test/media.jsdom.test.tsx +1 -0
  357. package/src/focusable-iframe/types.ts +1 -2
  358. package/src/font-size-picker/font-size-picker-select.tsx +1 -1
  359. package/src/font-size-picker/index.tsx +1 -1
  360. package/src/font-size-picker/test/{font-size-picker-select.jsdom.test.tsx → font-size-picker-select.browser.test.tsx} +21 -20
  361. package/src/font-size-picker/test/{font-size-picker-toggle-group.jsdom.test.tsx → font-size-picker-toggle-group.browser.test.tsx} +16 -16
  362. package/src/font-size-picker/test/{index.jsdom.test.tsx → index.browser.test.tsx} +44 -43
  363. package/src/form-file-upload/test/index.browser.test.tsx +88 -0
  364. package/src/form-file-upload/test/index.jsdom.test.tsx +3 -55
  365. package/src/form-toggle/style.scss +1 -1
  366. package/src/form-toggle/test/__snapshots__/index.jsdom.test.tsx.snap +2 -38
  367. package/src/form-toggle/test/index.jsdom.test.tsx +8 -17
  368. package/src/form-token-field/index.tsx +3 -3
  369. package/src/form-token-field/test/index.jsdom.test.tsx +86 -44
  370. package/src/form-token-field/types.ts +4 -5
  371. package/src/gradient-picker/index.tsx +2 -2
  372. package/src/gradient-picker/test/{index.jsdom.test.tsx → index.browser.test.tsx} +28 -26
  373. package/src/grid/hook.ts +71 -40
  374. package/src/grid/style.module.scss +97 -0
  375. package/src/grid/test/grid.browser.test.tsx +342 -0
  376. package/src/grid/utils.ts +1 -1
  377. package/src/guide/test/index.jsdom.test.tsx +4 -2
  378. package/src/h-stack/test/__snapshots__/index.jsdom.test.tsx.snap +4 -4
  379. package/src/h-stack/test/index.jsdom.test.tsx +3 -0
  380. package/src/heading/test/index.browser.test.tsx +72 -0
  381. package/src/heading/types.ts +1 -12
  382. package/src/higher-order/with-fallback-styles/test/index.jsdom.test.tsx +3 -2
  383. package/src/higher-order/with-filters/test/__snapshots__/index.jsdom.test.tsx.snap +9 -9
  384. package/src/higher-order/with-filters/test/index.jsdom.test.tsx +6 -5
  385. package/src/higher-order/with-focus-outside/test/index.jsdom.test.tsx +2 -1
  386. package/src/higher-order/with-focus-return/test/index.jsdom.test.tsx +1 -0
  387. package/src/higher-order/with-notices/test/index.jsdom.test.tsx +1 -0
  388. package/src/higher-order/with-spoken-messages/test/index.jsdom.test.tsx +3 -2
  389. package/src/icon/index.tsx +6 -5
  390. package/src/icon/test/{index.jsdom.test.tsx → index.browser.test.tsx} +43 -33
  391. package/src/input-control/reducer/actions.ts +1 -4
  392. package/src/input-control/styles/input-control-styles.tsx +38 -7
  393. package/src/input-control/test/index.jsdom.test.tsx +8 -34
  394. package/src/input-control/test/legacy-size.browser.test.tsx +47 -0
  395. package/src/input-control/types.ts +2 -4
  396. package/src/isolated-event-container/test/index.jsdom.test.tsx +4 -3
  397. package/src/item-group/context.ts +1 -0
  398. package/src/item-group/item/component.tsx +19 -1
  399. package/src/item-group/item/hook.ts +2 -3
  400. package/src/item-group/item-group/component.tsx +1 -0
  401. package/src/item-group/test/index.browser.test.tsx +264 -0
  402. package/src/item-group/types.ts +4 -0
  403. package/src/keyboard-shortcuts/test/index.jsdom.test.tsx +5 -4
  404. package/src/menu/styles.ts +9 -5
  405. package/src/menu/test/index.jsdom.test.tsx +68 -279
  406. package/src/menu/test/keyboard-navigation.browser.test.tsx +218 -0
  407. package/src/menu-group/test/index.jsdom.test.tsx +1 -0
  408. package/src/menu-item/test/__snapshots__/index.jsdom.test.tsx.snap +15 -9
  409. package/src/menu-item/test/index.jsdom.test.tsx +1 -0
  410. package/src/modal/test/aria-helper.jsdom.test.ts +1 -0
  411. package/src/modal/test/focus.browser.test.tsx +92 -0
  412. package/src/modal/test/index.jsdom.test.tsx +8 -106
  413. package/src/modal/use-modal-exit-animation.ts +1 -2
  414. package/src/navigable-container/test/navigable-menu-navigation.browser.test.tsx +132 -0
  415. package/src/navigable-container/test/navigable-menu.jsdom.test.tsx +5 -167
  416. package/src/navigable-container/test/tababble-container.jsdom.test.tsx +3 -111
  417. package/src/navigable-container/test/tabbable-container-navigation.browser.test.tsx +119 -0
  418. package/src/navigator/navigator-screen/use-screen-animate-presence.ts +1 -5
  419. package/src/navigator/styles.ts +12 -8
  420. package/src/navigator/test/{index.jsdom.test.tsx → index.browser.test.tsx} +92 -60
  421. package/src/notice/style.scss +0 -7
  422. package/src/notice/test/__snapshots__/index.jsdom.test.tsx.snap +2 -2
  423. package/src/notice/test/index.jsdom.test.tsx +8 -4
  424. package/src/notice/test/list.jsdom.test.tsx +1 -0
  425. package/src/number-control/index.tsx +1 -1
  426. package/src/number-control/test/index.jsdom.test.tsx +9 -6
  427. package/src/palette-edit/index.tsx +66 -72
  428. package/src/palette-edit/style.scss +0 -6
  429. package/src/palette-edit/styles.ts +0 -5
  430. package/src/palette-edit/test/{index.jsdom.test.tsx → index.browser.test.tsx} +224 -101
  431. package/src/palette-edit/test/spacing.browser.test.tsx +61 -0
  432. package/src/panel/test/__snapshots__/body.jsdom.test.tsx.snap +2 -2
  433. package/src/panel/test/__snapshots__/header.jsdom.test.tsx.snap +2 -2
  434. package/src/panel/test/__snapshots__/index.jsdom.test.tsx.snap +3 -3
  435. package/src/panel/test/__snapshots__/row.jsdom.test.tsx.snap +3 -3
  436. package/src/panel/test/body.jsdom.test.tsx +2 -1
  437. package/src/panel/test/header.jsdom.test.tsx +1 -0
  438. package/src/panel/test/index.jsdom.test.tsx +1 -0
  439. package/src/panel/test/row.jsdom.test.tsx +1 -0
  440. package/src/panel/types.ts +1 -2
  441. package/src/placeholder/style.scss +1 -6
  442. package/src/placeholder/test/index.jsdom.test.tsx +19 -14
  443. package/src/popover/index.tsx +3 -3
  444. package/src/popover/test/{index.jsdom.test.tsx → index.browser.test.tsx} +159 -110
  445. package/src/popover/types.ts +1 -4
  446. package/src/progress-bar/style.module.scss +9 -1
  447. package/src/progress-bar/test/{index.jsdom.test.tsx → index.browser.test.tsx} +31 -27
  448. package/src/radio-control/test/index.jsdom.test.tsx +14 -11
  449. package/src/range-control/index.tsx +1 -1
  450. package/src/range-control/styles/range-control-styles.ts +12 -10
  451. package/src/range-control/test/index.jsdom.test.tsx +10 -7
  452. package/src/resizable-box/resize-tooltip/test/{index.jsdom.test.tsx → index.browser.test.tsx} +7 -5
  453. package/src/resizable-box/resize-tooltip/test/{label.jsdom.test.tsx → label.browser.test.tsx} +6 -4
  454. package/src/sandbox/test/index.jsdom.test.tsx +1 -0
  455. package/src/scroll-lock/test/index.jsdom.test.tsx +1 -0
  456. package/src/scrollable/test/{index.jsdom.test.tsx → index.browser.test.tsx} +71 -29
  457. package/src/search-control/test/{index.jsdom.test.tsx → index.browser.test.tsx} +16 -14
  458. package/src/select-control/stories/index.story.tsx +2 -3
  459. package/src/select-control/styles/select-control-styles.ts +5 -7
  460. package/src/select-control/test/legacy-size.browser.test.tsx +47 -0
  461. package/src/select-control/test/select-control.jsdom.test.tsx +4 -41
  462. package/src/shortcut/test/__snapshots__/index.jsdom.test.tsx.snap +3 -3
  463. package/src/shortcut/test/index.jsdom.test.tsx +1 -0
  464. package/src/slot-fill/test/__snapshots__/slot.jsdom.test.tsx.snap +19 -19
  465. package/src/slot-fill/test/cross-document-styles.browser.test.tsx +62 -0
  466. package/src/slot-fill/test/index.jsdom.test.tsx +1 -0
  467. package/src/slot-fill/test/slot.jsdom.test.tsx +5 -57
  468. package/src/slot-fill/types.ts +1 -2
  469. package/src/snackbar/style.scss +1 -5
  470. package/src/snackbar/test/{index.jsdom.test.tsx → index.browser.test.tsx} +54 -49
  471. package/src/snackbar/test/{list.jsdom.test.tsx → list.browser.test.tsx} +17 -15
  472. package/src/spacer/test/{index.jsdom.test.tsx → index.browser.test.tsx} +70 -56
  473. package/src/style-provider/test/index.jsdom.test.tsx +1 -0
  474. package/src/surface/hook.ts +1 -1
  475. package/src/surface/test/index.jsdom.test.tsx +1 -0
  476. package/src/surface/types.ts +1 -5
  477. package/src/tab-panel/style.scss +4 -23
  478. package/src/tab-panel/test/{index.jsdom.test.tsx → index.browser.test.tsx} +160 -126
  479. package/src/tabs/styles.ts +4 -6
  480. package/src/tabs/test/{index.jsdom.test.tsx → index.browser.test.tsx} +145 -113
  481. package/src/text/test/index.browser.test.tsx +235 -0
  482. package/src/text/types.ts +1 -6
  483. package/src/text-control/test/text-control.jsdom.test.tsx +1 -0
  484. package/src/text-highlight/test/index.jsdom.test.tsx +1 -0
  485. package/src/textarea-control/style.module.scss +8 -3
  486. package/src/toggle-control/test/index.jsdom.test.tsx +4 -1
  487. package/src/toggle-group-control/context.ts +14 -5
  488. package/src/toggle-group-control/stories/index.story.tsx +15 -2
  489. package/src/toggle-group-control/test/{index.jsdom.test.tsx → index.browser.test.tsx} +370 -77
  490. package/src/toggle-group-control/toggle-group-control/README.md +8 -5
  491. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +4 -0
  492. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +5 -1
  493. package/src/toggle-group-control/toggle-group-control/component.tsx +2 -0
  494. package/src/toggle-group-control/toggle-group-control/style.module.scss +7 -1
  495. package/src/toggle-group-control/toggle-group-control-option/README.md +8 -5
  496. package/src/toggle-group-control/toggle-group-control-option/component.tsx +2 -0
  497. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +4 -1
  498. package/src/toggle-group-control/toggle-group-control-option-icon/README.md +7 -0
  499. package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +2 -0
  500. package/src/toggle-group-control/types.ts +12 -3
  501. package/src/toolbar/test/index.jsdom.test.tsx +5 -2
  502. package/src/toolbar/test/toolbar-group.jsdom.test.tsx +2 -1
  503. package/src/tools-panel/test/index.browser.test.tsx +101 -0
  504. package/src/tools-panel/test/index.jsdom.test.tsx +89 -124
  505. package/src/tools-panel/tools-panel-header/component.tsx +2 -2
  506. package/src/tooltip/test/{index.jsdom.test.tsx → index.browser.test.tsx} +76 -74
  507. package/src/tooltip/test/utils/index.tsx +4 -4
  508. package/src/tree-grid/cell.tsx +6 -2
  509. package/src/tree-grid/roving-tab-index-item.tsx +7 -3
  510. package/src/tree-grid/row.tsx +8 -2
  511. package/src/tree-grid/test/__snapshots__/cell.jsdom.test.tsx.snap +2 -2
  512. package/src/tree-grid/test/__snapshots__/index.jsdom.test.tsx.snap +2 -2
  513. package/src/tree-grid/test/__snapshots__/roving-tab-index-item.jsdom.test.tsx.snap +4 -4
  514. package/src/tree-grid/test/__snapshots__/roving-tab-index.jsdom.test.tsx.snap +2 -2
  515. package/src/tree-grid/test/__snapshots__/row.jsdom.test.tsx.snap +9 -5
  516. package/src/tree-grid/test/cell.jsdom.test.tsx +114 -11
  517. package/src/tree-grid/test/index.jsdom.test.tsx +2 -272
  518. package/src/tree-grid/test/keyboard-navigation.browser.test.tsx +149 -0
  519. package/src/tree-grid/test/roving-tab-index-item.jsdom.test.tsx +4 -1
  520. package/src/tree-grid/test/roving-tab-index.jsdom.test.tsx +1 -0
  521. package/src/tree-grid/test/row.jsdom.test.tsx +98 -3
  522. package/src/tree-grid/use-validate-tree-grid-structure.ts +104 -0
  523. package/src/tree-select/types.ts +4 -5
  524. package/src/truncate/hook.ts +2 -2
  525. package/src/truncate/test/index.jsdom.test.tsx +1 -0
  526. package/src/truncate/types.ts +1 -5
  527. package/src/unit-control/test/index.jsdom.test.tsx +24 -22
  528. package/src/unit-control/utils.ts +1 -1
  529. package/src/utils/colors-values.js +5 -4
  530. package/src/utils/config-values.js +0 -2
  531. package/src/utils/font-size.ts +1 -12
  532. package/src/utils/hooks/test/use-controlled-state.jsdom.test.tsx +5 -4
  533. package/src/utils/hooks/test/use-controlled-value.jsdom.test.tsx +3 -2
  534. package/src/utils/hooks/test/use-cx.jsdom.test.tsx +5 -4
  535. package/src/utils/test/polymorphic-element.browser.test.tsx +42 -0
  536. package/src/utils/test/polymorphic-element.jsdom.test.tsx +1 -2
  537. package/src/v-stack/test/__snapshots__/index.jsdom.test.tsx.snap +4 -4
  538. package/src/v-stack/test/index.jsdom.test.tsx +3 -0
  539. package/src/validated-form-controls/components/stories/content-editable-control.story.tsx +1 -1
  540. package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +1 -1
  541. package/src/validated-form-controls/components/stories/range-control.story.tsx +1 -1
  542. package/src/validated-form-controls/style.scss +11 -15
  543. package/src/validated-form-controls/test/content-editable-control.jsdom.test.tsx +1 -1
  544. package/src/validated-form-controls/test/custom-select-control.jsdom.test.tsx +3 -0
  545. package/src/validated-form-controls/test/input-control.jsdom.test.tsx +3 -0
  546. package/src/validated-form-controls/test/{range-control.jsdom.test.tsx → range-control.browser.test.tsx} +9 -7
  547. package/src/validated-form-controls/test/textarea-control.jsdom.test.tsx +1 -0
  548. package/src/view/test/__snapshots__/index.jsdom.test.tsx.snap +7 -7
  549. package/src/view/test/index.jsdom.test.tsx +2 -1
  550. package/build/box-control/styles/box-control-icon-styles.cjs +0 -173
  551. package/build/box-control/styles/box-control-icon-styles.cjs.map +0 -7
  552. package/build/elevation/styles.cjs +0 -42
  553. package/build/elevation/styles.cjs.map +0 -7
  554. package/build-module/box-control/styles/box-control-icon-styles.mjs +0 -133
  555. package/build-module/box-control/styles/box-control-icon-styles.mjs.map +0 -7
  556. package/build-module/elevation/styles.mjs +0 -17
  557. package/build-module/elevation/styles.mjs.map +0 -7
  558. package/build-types/box-control/styles/box-control-icon-styles.d.ts +0 -41
  559. package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +0 -1
  560. package/build-types/elevation/styles.d.ts +0 -2
  561. package/build-types/elevation/styles.d.ts.map +0 -1
  562. package/src/box-control/styles/box-control-icon-styles.ts +0 -62
  563. package/src/card/test/__snapshots__/index.jsdom.test.tsx.snap +0 -533
  564. package/src/card/test/index.jsdom.test.tsx +0 -312
  565. package/src/context/test/__snapshots__/context-system-provider.jsdom.test.tsx.snap +0 -35
  566. package/src/custom-select-control/test/__snapshots__/index.jsdom.test.tsx.snap +0 -6
  567. package/src/divider/test/index.jsdom.test.tsx +0 -43
  568. package/src/elevation/styles.ts +0 -10
  569. package/src/elevation/test/__snapshots__/index.jsdom.test.tsx.snap +0 -227
  570. package/src/elevation/test/index.jsdom.test.tsx +0 -78
  571. package/src/flex/test/__snapshots__/index.jsdom.test.tsx.snap +0 -28
  572. package/src/flex/test/index.jsdom.test.tsx +0 -140
  573. package/src/grid/test/grid.jsdom.test.tsx +0 -158
  574. package/src/heading/test/__snapshots__/index.jsdom.test.tsx.snap +0 -60
  575. package/src/heading/test/index.jsdom.test.tsx +0 -61
  576. package/src/input-control/test/__snapshots__/index.jsdom.test.tsx.snap +0 -11
  577. package/src/item-group/test/__snapshots__/index.jsdom.test.tsx.snap +0 -151
  578. package/src/item-group/test/index.jsdom.test.tsx +0 -138
  579. package/src/select-control/test/__snapshots__/select-control.jsdom.test.tsx.snap +0 -11
  580. package/src/spacer/test/__snapshots__/index.jsdom.test.tsx.snap +0 -11
  581. package/src/text/test/__snapshots__/index.jsdom.test.tsx.snap +0 -71
  582. package/src/text/test/index.jsdom.test.tsx +0 -211
  583. package/src/toggle-group-control/test/__snapshots__/index.jsdom.test.tsx.snap +0 -359
package/CHANGELOG.md CHANGED
@@ -2,16 +2,57 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 40.1.0-next.0 (2026-09-03)
5
+ ## 41.0.0-next.0 (2026-09-17)
6
+
7
+ ### Breaking Changes
8
+
9
+ - Components that compose Emotion style fragments with `cx()` should pass source-order-dependent fragments in a single `css()` call. Passing separate fragments can change override order after the following components stopped rendering styles through Emotion:
10
+ - `BoxControl` ([#82570](https://github.com/WordPress/gutenberg/pull/82570))
11
+ - `Grid` ([#82571](https://github.com/WordPress/gutenberg/pull/82571))
12
+ - `Elevation` ([#82572](https://github.com/WordPress/gutenberg/pull/82572))
6
13
 
7
14
  ### Enhancements
8
15
 
16
+ - `SelectControl`: Mark as not recommended for use in a WordPress environment, in favour of `SelectControl` from `@wordpress/ui` ([#83030](https://github.com/WordPress/gutenberg/pull/83030)).
17
+ - `PaletteEdit`: Use standard menu semantics and keyboard navigation for palette option actions through `Menu` from `@wordpress/ui` ([#82768](https://github.com/WordPress/gutenberg/pull/82768)).
18
+ - `CheckboxControl`: Match the `@wordpress/ui` checkmark size and disabled fill ([#82555](https://github.com/WordPress/gutenberg/pull/82555)).
19
+ - `Snackbar`: Show the action's focus ring with the design system's outline instead of a legacy dotted outline, and let `Button`/`ExternalLink` own the ring ([#82640](https://github.com/WordPress/gutenberg/pull/82640)).
20
+ - `CircularOptionPicker`: Updated to show outline via design system's mixin for focus ring instead of previous border implementation ([#82521](https://github.com/WordPress/gutenberg/pull/82521)).
21
+ - `Autocomplete`: Show focus ring with the design system's outline instead of previous box-shadow implementation ([#82766](https://github.com/WordPress/gutenberg/pull/82766)).
22
+ - `CustomGradientPicker`: Show the control point's focus ring with the design system's outline and a contrasting backing to separate it from the gradient ([#82834](https://github.com/WordPress/gutenberg/pull/82834)).
23
+
24
+ ### Bug Fixes
25
+
26
+ - `Card`: Keep shadow radii aligned with the Card's actual radius regardless of render order ([#82572](https://github.com/WordPress/gutenberg/pull/82572)).
27
+ - `SelectControl`: Stop forcing a fill on the chevron icon, so the stroke-based chevron renders as a line again instead of a filled shape ([#82949](https://github.com/WordPress/gutenberg/pull/82949)).
28
+ - `BorderBoxControl`: Restore the split borders layout. The top and bottom controls are centred across the row and the right control sits at the end of its column again, after `BorderControl`'s own `margin: 0` began overriding both ([#82939](https://github.com/WordPress/gutenberg/pull/82939)).
29
+ - `PaletteEdit`: Separate adjacent header action buttons so their focus rings do not overlap ([#82768](https://github.com/WordPress/gutenberg/pull/82768)).
30
+
31
+ ### Internal
32
+
33
+ - Remove obsolete Jest test dependencies and types ([#82975](https://github.com/WordPress/gutenberg/pull/82975)).
34
+ - Remove the obsolete Jest console test dependency and matcher types ([#82843](https://github.com/WordPress/gutenberg/pull/82843)).
35
+ - Update Ariakit to 0.4.39 and run affected interaction coverage in Browser Mode ([#82831](https://github.com/WordPress/gutenberg/pull/82831)).
36
+ - `Notice`: Remove dismiss button style overrides that now duplicate `Button` defaults, and drop an unused Sass import ([#82640](https://github.com/WordPress/gutenberg/pull/82640)).
37
+ - Run Components interaction tests in Vitest Browser Mode ([#80995](https://github.com/WordPress/gutenberg/pull/80995)).
38
+
39
+ ## 40.1.0 (2026-09-10)
40
+
41
+ ### Enhancements
42
+
43
+ - Compound components: Report missing state or accessible semantic structure with clear developer guidance ([#82509](https://github.com/WordPress/gutenberg/pull/82509)).
44
+ - `ToggleGroupControl`: Honor the root `disabled` prop so the whole control is unselectable ([#82259](https://github.com/WordPress/gutenberg/pull/82259)).
45
+ - Validated form controls: Use `--wpds-color-stroke-interactive-error` for the invalid-state focus ring and border ([#82410](https://github.com/WordPress/gutenberg/pull/82410)).
9
46
  - `Popover`: Widen `offset` to also accept an object with separate main and cross axis offsets. The same applies to `BorderBoxControl`'s `popoverOffset` prop ([#82060](https://github.com/WordPress/gutenberg/pull/82060)).
10
47
  - `ToolsPanelItem`: Add `defaultShown` to show an optional item that has no value, and an `onShownChange` callback that fires only when the user toggles the item in the panel's menu ([#78010](https://github.com/WordPress/gutenberg/pull/78010)).
11
48
  - `BorderBoxControl`: render the linked/unlinked toggle in a row alongside the label when a visible label is present, so it lines up with the equivalent toggle on sibling controls. Without a visible label the toggle stays beside the inputs, as before. The visible label is now a `BaseControl.VisualLabel`, so it renders as a `span` rather than a `label` element; it was never associated with an input in either form ([#82163](https://github.com/WordPress/gutenberg/pull/82163)).
49
+ - `TabPanel`: Updated to show outline via design system's mixin for focus ring instead of legacy box-shadow implementation ([#82421](https://github.com/WordPress/gutenberg/pull/82421)).
12
50
 
13
51
  ### Bug Fixes
14
52
 
53
+ - `FormTokenField`: Wrap to the last suggestion when pressing the up arrow with no suggestion selected, instead of leaving the selection on an invalid index ([#82646](https://github.com/WordPress/gutenberg/pull/82646)).
54
+ - `Disabled`: Keep the `className` passed by the consumer on the wrapper when `isDisabled` is `false`. Only `components-disabled` and the disabled styling are conditional now, so the wrapper stays styleable and targetable in both states ([#82648](https://github.com/WordPress/gutenberg/pull/82648)).
55
+ - `ProgressBar`: Remove determinate transitions and use a slower, stepped indeterminate animation when reduced motion is preferred. ([#82490](https://github.com/WordPress/gutenberg/pull/82490))
15
56
  - `ColorPalette`: Apply the computed contrast color to the selected checkmark now that the icon is stroke-based. ([#78812](https://github.com/WordPress/gutenberg/pull/78812))
16
57
  - `CheckboxControl`: Color the checked and indeterminate icons with `color` rather than `fill`, so they stay visible now that those icons are stroke-based. ([#78812](https://github.com/WordPress/gutenberg/pull/78812))
17
58
  - `BorderBoxControl`: Give the group of border controls an accessible name from the `label` prop, by rendering the wrapper as a `role="group"` associated with the label through `aria-labelledby`. A consumer-supplied `aria-labelledby` or `aria-label` takes precedence over `label` and names the group instead; the wrapper is only given the `group` role when one of the three provides a name. A hidden label (`hideLabelFromVision`) now renders as a `span` rather than a `label` element, matching the visible one ([#82279](https://github.com/WordPress/gutenberg/pull/82279)).
@@ -20,9 +61,16 @@
20
61
  - `Icon`: Merge a consumer-supplied `style` prop with the icon's intrinsic styles instead of replacing them, so styles like `fill: none` on stroke-based icons survive unless the consumer overrides the same property explicitly. ([#78808](https://github.com/WordPress/gutenberg/pull/78808))
21
62
  - `ItemGroup`: Drop the blanket `path { fill: currentColor }` rule that was overriding stroke-based icons' intended fill via inheritance bypass. Paths without an explicit fill still inherit `currentColor` from the surrounding SVG. Custom paths that specify a fill now retain it instead of being overridden by ItemGroup. ([#78808](https://github.com/WordPress/gutenberg/pull/78808))
22
63
  - `Tip`: Preserve the intended yellow color after its icon became stroke-based. ([#78808](https://github.com/WordPress/gutenberg/pull/78808))
64
+ - `Button`, `Placeholder`: Remove the obsolete `fill: CanvasText` override for forced colors mode. ([#82481](https://github.com/WordPress/gutenberg/pull/82481))
65
+ - `InputControl`, `SelectControl`, `TextareaControl`: Match the `@wordpress/ui` disabled styles, so the disabled state is distinguishable again. The border and text now use the design system's disabled tokens, and the background no longer changes ([#82454](https://github.com/WordPress/gutenberg/pull/82454)).
66
+
67
+ ### Documentation
68
+
69
+ - Add an Emotion-to-SCSS Modules migration guide for contributors ([#82567](https://github.com/WordPress/gutenberg/pull/82567)).
23
70
 
24
71
  ### Internal
25
72
 
73
+ - `FormToggle`: Use the standard `inert` state instead of the `Disabled` component's class name for inherited disabled styles ([#82651](https://github.com/WordPress/gutenberg/pull/82651)).
26
74
  - Migrate JSX files to TypeScript and remove their ESLint filename suppressions ([#82132](https://github.com/WordPress/gutenberg/pull/82132)).
27
75
  - Use the `.jsx` extension for JavaScript source files that contain JSX ([#80990](https://github.com/WordPress/gutenberg/pull/80990)).
28
76
  - Remove tsconfig project references to packages that are not dependencies ([#82106](https://github.com/WordPress/gutenberg/pull/82106)).
package/CONTRIBUTING.md CHANGED
@@ -422,6 +422,8 @@ Place component-local styles in a `style.module.scss` file next to the component
422
422
 
423
423
  Legacy components may still use Emotion while they are being migrated, but new Emotion usage should not be added.
424
424
 
425
+ Before migrating existing styles, read [Migrating components from Emotion to SCSS Modules](./emotion-to-scss-modules.md) for compatibility checks, cascade and custom-property pitfalls, verification, and examples from merged migrations.
426
+
425
427
  ### Deprecating styles
426
428
 
427
429
  Changing the styles of a non-experimental component must be done with care. To prevent serious breakage in third-party usage, in some cases we may want a grace period before fully removing the old styles. This can be done by temporarily placing the new styles behind a feature flag prop prefixed by `__next`, accompanied by a `deprecate()` warning in the console. The feature flag should be opt-in (false by default), and have a reasonably descriptive name (**not** `__nextHasNewStyles`). A descriptive name allows for multiple deprecations to proceed in parallel, separated by concerns or by deprecation version.
@@ -115,7 +115,7 @@ function registerStyle(hash, css) {
115
115
 
116
116
  // packages/components/src/border-box-control/style.module.scss
117
117
  if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
118
- registerStyle("2eee37fabd", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2;margin:0 auto}.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}");
118
+ registerStyle("aabfd0c968", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2}.ec002fcdf4036950__centered-border-control.ec002fcdf4036950__centered-border-control{margin:0 auto}.f9ea07d7127ab067__right-border-control.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}");
119
119
  }
120
120
  var style_module_default = { "linked-border-control": "fa6e6c2331986855__linked-border-control", "linked-border-control-full-width": "_6a6edeeb175d724f__linked-border-control-full-width", "header": "f5104488f80fa50f__header", "wrapper": "_48f63719b9dc7e1a__wrapper", "linked-button": "_902e774d37b6698b__linked-button", "visualizer": "_5978f65e1d08de6c__visualizer", "split-controls": "afa8e78cec6a9f62__split-controls", "centered-border-control": "ec002fcdf4036950__centered-border-control", "right-border-control": "f9ea07d7127ab067__right-border-control" };
121
121
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/border-box-control/border-box-control/hook.ts", "../../../../style-runtime/src/index.ts", "../../../src/border-box-control/style.module.scss"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport { useState } from '@wordpress/element';\nimport styles from '../style.module.scss';\nimport { getBorderDiff, getCommonBorder, getSplitBorders, hasMixedBorders, hasSplitBorders, isCompleteBorder, isEmptyBorder } from '../utils';\nimport { useContextSystem } from '../../context';\nexport function useBorderBoxControl(props) {\n const {\n className,\n colors = [],\n onChange,\n enableAlpha = false,\n enableStyle = true,\n hideLabelFromVision,\n label,\n value,\n __experimentalIsRenderedInSidebar = false,\n // Deprecated props, no longer used.\n size: _size,\n __next40pxDefaultSize: _next40pxDefaultSize,\n ...otherProps\n } = useContextSystem(props, 'BorderBoxControl');\n\n // A visible label gives the control a header row to place the linked/\n // unlinked toggle in, alongside that label. Without one the toggle stays\n // inside the input wrapper, positioned absolutely.\n const hasVisibleLabel = !!label && !hideLabelFromVision;\n const mixedBorders = hasMixedBorders(value);\n const splitBorders = hasSplitBorders(value);\n const linkedValue = splitBorders ? getCommonBorder(value) : value;\n const splitValue = splitBorders ? value : getSplitBorders(value);\n\n // If no numeric width value is set, the unit select will be disabled.\n const hasWidthValue = !isNaN(parseFloat(`${linkedValue?.width}`));\n const [isLinked, setIsLinked] = useState(!mixedBorders);\n const toggleLinked = () => setIsLinked(!isLinked);\n const onLinkedChange = newBorder => {\n if (!newBorder) {\n return onChange(undefined);\n }\n\n // If we have all props defined on the new border apply it.\n if (!mixedBorders || isCompleteBorder(newBorder)) {\n return onChange(isEmptyBorder(newBorder) ? undefined : newBorder);\n }\n\n // If we had mixed borders we might have had some shared border props\n // that we need to maintain. For example; we could have mixed borders\n // with all the same color but different widths. Then from the linked\n // control we change the color. We should keep the separate widths.\n const changes = getBorderDiff(linkedValue, newBorder);\n const updatedBorders = {\n top: {\n ...value?.top,\n ...changes\n },\n right: {\n ...value?.right,\n ...changes\n },\n bottom: {\n ...value?.bottom,\n ...changes\n },\n left: {\n ...value?.left,\n ...changes\n }\n };\n if (hasMixedBorders(updatedBorders)) {\n return onChange(updatedBorders);\n }\n const filteredResult = isEmptyBorder(updatedBorders.top) ? undefined : updatedBorders.top;\n onChange(filteredResult);\n };\n const onSplitChange = (newBorder, side) => {\n const updatedBorders = {\n ...splitValue,\n [side]: newBorder\n };\n if (hasMixedBorders(updatedBorders)) {\n onChange(updatedBorders);\n } else {\n onChange(newBorder);\n }\n };\n\n // The linked control reserves an inline-end gutter for the absolutely\n // positioned toggle. Once the toggle moves up into the header row that\n // gutter only shortens the input, so drop it.\n const linkedControlClassName = clsx(styles['linked-border-control'], {\n [styles['linked-border-control-full-width']]: hasVisibleLabel\n });\n const wrapperClassName = styles.wrapper;\n const headerClassName = styles.header;\n return {\n ...otherProps,\n className,\n colors,\n hasVisibleLabel,\n headerClassName,\n hideLabelFromVision,\n label,\n disableUnits: mixedBorders && !hasWidthValue,\n enableAlpha,\n enableStyle,\n hasMixedBorders: mixedBorders,\n isLinked,\n linkedControlClassName,\n onLinkedChange,\n onSplitChange,\n toggleLinked,\n linkedValue,\n splitValue,\n wrapperClassName,\n __experimentalIsRenderedInSidebar\n };\n}", "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(\"2eee37fabd\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2;margin:0 auto}.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}\");\n}\nexport default {\"linked-border-control\":\"fa6e6c2331986855__linked-border-control\",\"linked-border-control-full-width\":\"_6a6edeeb175d724f__linked-border-control-full-width\",\"header\":\"f5104488f80fa50f__header\",\"wrapper\":\"_48f63719b9dc7e1a__wrapper\",\"linked-button\":\"_902e774d37b6698b__linked-button\",\"visualizer\":\"_5978f65e1d08de6c__visualizer\",\"split-controls\":\"afa8e78cec6a9f62__split-controls\",\"centered-border-control\":\"ec002fcdf4036950__centered-border-control\",\"right-border-control\":\"f9ea07d7127ab067__right-border-control\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAAyB;;;ACDzB,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,O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,gBAAgB,CAAC;AAAA,IAC/B;AAAA,IACA;AAAA,IACA,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { useState } from '@wordpress/element';\nimport styles from '../style.module.scss';\nimport { getBorderDiff, getCommonBorder, getSplitBorders, hasMixedBorders, hasSplitBorders, isCompleteBorder, isEmptyBorder } from '../utils';\nimport { useContextSystem } from '../../context';\nexport function useBorderBoxControl(props) {\n const {\n className,\n colors = [],\n onChange,\n enableAlpha = false,\n enableStyle = true,\n hideLabelFromVision,\n label,\n value,\n __experimentalIsRenderedInSidebar = false,\n // Deprecated props, no longer used.\n size: _size,\n __next40pxDefaultSize: _next40pxDefaultSize,\n ...otherProps\n } = useContextSystem(props, 'BorderBoxControl');\n\n // A visible label gives the control a header row to place the linked/\n // unlinked toggle in, alongside that label. Without one the toggle stays\n // inside the input wrapper, positioned absolutely.\n const hasVisibleLabel = !!label && !hideLabelFromVision;\n const mixedBorders = hasMixedBorders(value);\n const splitBorders = hasSplitBorders(value);\n const linkedValue = splitBorders ? getCommonBorder(value) : value;\n const splitValue = splitBorders ? value : getSplitBorders(value);\n\n // If no numeric width value is set, the unit select will be disabled.\n const hasWidthValue = !isNaN(parseFloat(`${linkedValue?.width}`));\n const [isLinked, setIsLinked] = useState(!mixedBorders);\n const toggleLinked = () => setIsLinked(!isLinked);\n const onLinkedChange = newBorder => {\n if (!newBorder) {\n return onChange(undefined);\n }\n\n // If we have all props defined on the new border apply it.\n if (!mixedBorders || isCompleteBorder(newBorder)) {\n return onChange(isEmptyBorder(newBorder) ? undefined : newBorder);\n }\n\n // If we had mixed borders we might have had some shared border props\n // that we need to maintain. For example; we could have mixed borders\n // with all the same color but different widths. Then from the linked\n // control we change the color. We should keep the separate widths.\n const changes = getBorderDiff(linkedValue, newBorder);\n const updatedBorders = {\n top: {\n ...value?.top,\n ...changes\n },\n right: {\n ...value?.right,\n ...changes\n },\n bottom: {\n ...value?.bottom,\n ...changes\n },\n left: {\n ...value?.left,\n ...changes\n }\n };\n if (hasMixedBorders(updatedBorders)) {\n return onChange(updatedBorders);\n }\n const filteredResult = isEmptyBorder(updatedBorders.top) ? undefined : updatedBorders.top;\n onChange(filteredResult);\n };\n const onSplitChange = (newBorder, side) => {\n const updatedBorders = {\n ...splitValue,\n [side]: newBorder\n };\n if (hasMixedBorders(updatedBorders)) {\n onChange(updatedBorders);\n } else {\n onChange(newBorder);\n }\n };\n\n // The linked control reserves an inline-end gutter for the absolutely\n // positioned toggle. Once the toggle moves up into the header row that\n // gutter only shortens the input, so drop it.\n const linkedControlClassName = clsx(styles['linked-border-control'], {\n [styles['linked-border-control-full-width']]: hasVisibleLabel\n });\n const wrapperClassName = styles.wrapper;\n const headerClassName = styles.header;\n return {\n ...otherProps,\n className,\n colors,\n hasVisibleLabel,\n headerClassName,\n hideLabelFromVision,\n label,\n disableUnits: mixedBorders && !hasWidthValue,\n enableAlpha,\n enableStyle,\n hasMixedBorders: mixedBorders,\n isLinked,\n linkedControlClassName,\n onLinkedChange,\n onSplitChange,\n toggleLinked,\n linkedValue,\n splitValue,\n wrapperClassName,\n __experimentalIsRenderedInSidebar\n };\n}", "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(\"aabfd0c968\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2}.ec002fcdf4036950__centered-border-control.ec002fcdf4036950__centered-border-control{margin:0 auto}.f9ea07d7127ab067__right-border-control.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}\");\n}\nexport default {\"linked-border-control\":\"fa6e6c2331986855__linked-border-control\",\"linked-border-control-full-width\":\"_6a6edeeb175d724f__linked-border-control-full-width\",\"header\":\"f5104488f80fa50f__header\",\"wrapper\":\"_48f63719b9dc7e1a__wrapper\",\"linked-button\":\"_902e774d37b6698b__linked-button\",\"visualizer\":\"_5978f65e1d08de6c__visualizer\",\"split-controls\":\"afa8e78cec6a9f62__split-controls\",\"centered-border-control\":\"ec002fcdf4036950__centered-border-control\",\"right-border-control\":\"f9ea07d7127ab067__right-border-control\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAAyB;;;ACDzB,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;AACT;AAUA,SAAS,YAAY,gBAAgB,MAAM,KAAK;AAC9C,MAAI,CAAC,eAAe,MAAM;AACxB;AAAA,EACF;AACA,QAAM,UAAU,WAAW;AAC3B,MAAI,iBAAiB,QAAQ,eAAe,IAAI,cAAc;AAC9D,MAAI,CAAC,gBAAgB;AACnB,qBAAiB,oBAAI,IAAI;AACzB,YAAQ,eAAe,IAAI,gBAAgB,cAAc;AAAA,EAC3D;AACA,MAAI,eAAe,IAAI,IAAI,GAAG;AAC5B;AAAA,EACF;AAKA,MAAI,0BA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iB,4BAAc,eAAe,GAAG,IAAI,SAAY,eAAe;AACtF,aAAS,cAAc;AAAA,EACzB;AACA,QAAM,gBAAgB,CAAC,WAAW,SAAS;AACzC,UAAM,iBAAiB;AAAA,MACrB,GAAG;AAAA,MACH,CAAC,IAAI,GAAG;AAAA,IACV;AACA,YAAI,8BAAgB,cAAc,GAAG;AACnC,eAAS,cAAc;AAAA,IACzB,OAAO;AACL,eAAS,SAAS;AAAA,IACpB;AAAA,EACF;AAKA,QAAM,6BAAyB,YAAAA,SAAK,qBAAO,uBAAuB,GAAG;AAAA,IACnE,CAAC,qBAAO,kCAAkC,CAAC,GAAG;AAAA,EAChD,CAAC;AACD,QAAM,mBAAmB,qBAAO;AAChC,QAAM,kBAAkB,qBAAO;AAC/B,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc,gBAAgB,CAAC;AAAA,IAC/B;AAAA,IACA;AAAA,IACA,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": ["clsx"]
7
7
  }
@@ -114,7 +114,7 @@ function registerStyle(hash, css) {
114
114
 
115
115
  // packages/components/src/border-box-control/style.module.scss
116
116
  if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
117
- registerStyle("2eee37fabd", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2;margin:0 auto}.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}");
117
+ registerStyle("aabfd0c968", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2}.ec002fcdf4036950__centered-border-control.ec002fcdf4036950__centered-border-control{margin:0 auto}.f9ea07d7127ab067__right-border-control.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}");
118
118
  }
119
119
  var style_module_default = { "linked-border-control": "fa6e6c2331986855__linked-border-control", "linked-border-control-full-width": "_6a6edeeb175d724f__linked-border-control-full-width", "header": "f5104488f80fa50f__header", "wrapper": "_48f63719b9dc7e1a__wrapper", "linked-button": "_902e774d37b6698b__linked-button", "visualizer": "_5978f65e1d08de6c__visualizer", "split-controls": "afa8e78cec6a9f62__split-controls", "centered-border-control": "ec002fcdf4036950__centered-border-control", "right-border-control": "f9ea07d7127ab067__right-border-control" };
120
120
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/border-box-control/border-box-control-linked-button/hook.ts", "../../../../style-runtime/src/index.ts", "../../../src/border-box-control/style.module.scss"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport styles from '../style.module.scss';\nimport { useContextSystem } from '../../context';\nexport function useBorderBoxControlLinkedButton(props) {\n const {\n className,\n ...otherProps\n } = useContextSystem(props, 'BorderBoxControlLinkedButton');\n return {\n ...otherProps,\n className: clsx(styles['linked-button'], className)\n };\n}", "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(\"2eee37fabd\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2;margin:0 auto}.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}\");\n}\nexport default {\"linked-border-control\":\"fa6e6c2331986855__linked-border-control\",\"linked-border-control-full-width\":\"_6a6edeeb175d724f__linked-border-control-full-width\",\"header\":\"f5104488f80fa50f__header\",\"wrapper\":\"_48f63719b9dc7e1a__wrapper\",\"linked-button\":\"_902e774d37b6698b__linked-button\",\"visualizer\":\"_5978f65e1d08de6c__visualizer\",\"split-controls\":\"afa8e78cec6a9f62__split-controls\",\"centered-border-control\":\"ec002fcdf4036950__centered-border-control\",\"right-border-control\":\"f9ea07d7127ab067__right-border-control\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;;;ACAjB,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;AAA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ACX,UAAM,QAAQ,QAAQ,UAAU,IAAI,cAAc;AAClD,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,kjCAAkjC;AAC/kC;AACA,IAAO,uBAAQ,EAAC,yBAAwB,2CAA0C,oCAAmC,uDAAsD,UAAS,4BAA2B,WAAU,8BAA6B,iBAAgB,oCAAmC,cAAa,iCAAgC,kBAAiB,oCAAmC,2BAA0B,6CAA4C,wBAAuB,yCAAwC;;;AFF/gB,qBAAiC;AAC1B,SAAS,gCAAgC,OAAO;AACrD,QAAM;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,EACL,QAAI,iCAAiB,OAAO,8BAA8B;AAC1D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,eAAW,YAAAA,SAAK,qBAAO,eAAe,GAAG,SAAS;AAAA,EACpD;AACF;",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport styles from '../style.module.scss';\nimport { useContextSystem } from '../../context';\nexport function useBorderBoxControlLinkedButton(props) {\n const {\n className,\n ...otherProps\n } = useContextSystem(props, 'BorderBoxControlLinkedButton');\n return {\n ...otherProps,\n className: clsx(styles['linked-button'], className)\n };\n}", "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(\"aabfd0c968\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2}.ec002fcdf4036950__centered-border-control.ec002fcdf4036950__centered-border-control{margin:0 auto}.f9ea07d7127ab067__right-border-control.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}\");\n}\nexport default {\"linked-border-control\":\"fa6e6c2331986855__linked-border-control\",\"linked-border-control-full-width\":\"_6a6edeeb175d724f__linked-border-control-full-width\",\"header\":\"f5104488f80fa50f__header\",\"wrapper\":\"_48f63719b9dc7e1a__wrapper\",\"linked-button\":\"_902e774d37b6698b__linked-button\",\"visualizer\":\"_5978f65e1d08de6c__visualizer\",\"split-controls\":\"afa8e78cec6a9f62__split-controls\",\"centered-border-control\":\"ec002fcdf4036950__centered-border-control\",\"right-border-control\":\"f9ea07d7127ab067__right-border-control\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;;;ACAjB,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;AACT;AAUA,SAAS,YAAY,gBAAgB,MAAM,KAAK;AAC9C,MAAI,CAAC,e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,gBAAc,cAAc,8qCAA8qC;AAC3sC;AACA,IAAO,uBAAQ,EAAC,yBAAwB,2CAA0C,oCAAmC,uDAAsD,UAAS,4BAA2B,WAAU,8BAA6B,iBAAgB,oCAAmC,cAAa,iCAAgC,kBAAiB,oCAAmC,2BAA0B,6CAA4C,wBAAuB,yCAAwC;;;AFF/gB,qBAAiC;AAC1B,SAAS,gCAAgC,OAAO;AACrD,QAAM;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,EACL,QAAI,iCAAiB,OAAO,8BAA8B;AAC1D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,eAAW,YAAAA,SAAK,qBAAO,eAAe,GAAG,SAAS;AAAA,EACpD;AACF;",
6
6
  "names": ["clsx"]
7
7
  }
@@ -114,7 +114,7 @@ function registerStyle(hash, css) {
114
114
 
115
115
  // packages/components/src/border-box-control/style.module.scss
116
116
  if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
117
- registerStyle("2eee37fabd", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2;margin:0 auto}.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}");
117
+ registerStyle("aabfd0c968", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2}.ec002fcdf4036950__centered-border-control.ec002fcdf4036950__centered-border-control{margin:0 auto}.f9ea07d7127ab067__right-border-control.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}");
118
118
  }
119
119
  var style_module_default = { "linked-border-control": "fa6e6c2331986855__linked-border-control", "linked-border-control-full-width": "_6a6edeeb175d724f__linked-border-control-full-width", "header": "f5104488f80fa50f__header", "wrapper": "_48f63719b9dc7e1a__wrapper", "linked-button": "_902e774d37b6698b__linked-button", "visualizer": "_5978f65e1d08de6c__visualizer", "split-controls": "afa8e78cec6a9f62__split-controls", "centered-border-control": "ec002fcdf4036950__centered-border-control", "right-border-control": "f9ea07d7127ab067__right-border-control" };
120
120
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/border-box-control/border-box-control-split-controls/hook.ts", "../../../../style-runtime/src/index.ts", "../../../src/border-box-control/style.module.scss"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport styles from '../style.module.scss';\nimport { useContextSystem } from '../../context';\nexport function useBorderBoxControlSplitControls(props) {\n const {\n className,\n colors = [],\n enableAlpha = false,\n enableStyle = true,\n __experimentalIsRenderedInSidebar = false,\n ...otherProps\n } = useContextSystem(props, 'BorderBoxControlSplitControls');\n return {\n ...otherProps,\n centeredClassName: clsx(styles['centered-border-control'], className),\n className: clsx(styles['split-controls'], className),\n colors,\n enableAlpha,\n enableStyle,\n rightAlignedClassName: clsx(styles['right-border-control'], className),\n __experimentalIsRenderedInSidebar\n };\n}", "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(\"2eee37fabd\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2;margin:0 auto}.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}\");\n}\nexport default {\"linked-border-control\":\"fa6e6c2331986855__linked-border-control\",\"linked-border-control-full-width\":\"_6a6edeeb175d724f__linked-border-control-full-width\",\"header\":\"f5104488f80fa50f__header\",\"wrapper\":\"_48f63719b9dc7e1a__wrapper\",\"linked-button\":\"_902e774d37b6698b__linked-button\",\"visualizer\":\"_5978f65e1d08de6c__visualizer\",\"split-controls\":\"afa8e78cec6a9f62__split-controls\",\"centered-border-control\":\"ec002fcdf4036950__centered-border-control\",\"right-border-control\":\"f9ea07d7127ab067__right-border-control\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;;;ACAjB,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,SA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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,kjCAAkjC;AAC/kC;AACA,IAAO,uBAAQ,EAAC,yBAAwB,2CAA0C,oCAAmC,uDAAsD,UAAS,4BAA2B,WAAU,8BAA6B,iBAAgB,oCAAmC,cAAa,iCAAgC,kBAAiB,oCAAmC,2BAA0B,6CAA4C,wBAAuB,yCAAwC;;;AFF/gB,qBAAiC;AAC1B,SAAS,iCAAiC,OAAO;AACtD,QAAM;AAAA,IACJ;AAAA,IACA,SAAS,CAAC;AAAA,IACV,cAAc;AAAA,IACd,cAAc;AAAA,IACd,oCAAoC;AAAA,IACpC,GAAG;AAAA,EACL,QAAI,iCAAiB,OAAO,+BAA+B;AAC3D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,uBAAmB,YAAAA,SAAK,qBAAO,yBAAyB,GAAG,SAAS;AAAA,IACpE,eAAW,YAAAA,SAAK,qBAAO,gBAAgB,GAAG,SAAS;AAAA,IACnD;AAAA,IACA;AAAA,IACA;AAAA,IACA,2BAAuB,YAAAA,SAAK,qBAAO,sBAAsB,GAAG,SAAS;AAAA,IACrE;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport styles from '../style.module.scss';\nimport { useContextSystem } from '../../context';\nexport function useBorderBoxControlSplitControls(props) {\n const {\n className,\n colors = [],\n enableAlpha = false,\n enableStyle = true,\n __experimentalIsRenderedInSidebar = false,\n ...otherProps\n } = useContextSystem(props, 'BorderBoxControlSplitControls');\n return {\n ...otherProps,\n centeredClassName: clsx(styles['centered-border-control'], className),\n className: clsx(styles['split-controls'], className),\n colors,\n enableAlpha,\n enableStyle,\n rightAlignedClassName: clsx(styles['right-border-control'], className),\n __experimentalIsRenderedInSidebar\n };\n}", "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(\"aabfd0c968\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2}.ec002fcdf4036950__centered-border-control.ec002fcdf4036950__centered-border-control{margin:0 auto}.f9ea07d7127ab067__right-border-control.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}\");\n}\nexport default {\"linked-border-control\":\"fa6e6c2331986855__linked-border-control\",\"linked-border-control-full-width\":\"_6a6edeeb175d724f__linked-border-control-full-width\",\"header\":\"f5104488f80fa50f__header\",\"wrapper\":\"_48f63719b9dc7e1a__wrapper\",\"linked-button\":\"_902e774d37b6698b__linked-button\",\"visualizer\":\"_5978f65e1d08de6c__visualizer\",\"split-controls\":\"afa8e78cec6a9f62__split-controls\",\"centered-border-control\":\"ec002fcdf4036950__centered-border-control\",\"right-border-control\":\"f9ea07d7127ab067__right-border-control\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;;;ACAjB,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;AACv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A,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,8qCAA8qC;AAC3sC;AACA,IAAO,uBAAQ,EAAC,yBAAwB,2CAA0C,oCAAmC,uDAAsD,UAAS,4BAA2B,WAAU,8BAA6B,iBAAgB,oCAAmC,cAAa,iCAAgC,kBAAiB,oCAAmC,2BAA0B,6CAA4C,wBAAuB,yCAAwC;;;AFF/gB,qBAAiC;AAC1B,SAAS,iCAAiC,OAAO;AACtD,QAAM;AAAA,IACJ;AAAA,IACA,SAAS,CAAC;AAAA,IACV,cAAc;AAAA,IACd,cAAc;AAAA,IACd,oCAAoC;AAAA,IACpC,GAAG;AAAA,EACL,QAAI,iCAAiB,OAAO,+BAA+B;AAC3D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,uBAAmB,YAAAA,SAAK,qBAAO,yBAAyB,GAAG,SAAS;AAAA,IACpE,eAAW,YAAAA,SAAK,qBAAO,gBAAgB,GAAG,SAAS;AAAA,IACnD;AAAA,IACA;AAAA,IACA;AAAA,IACA,2BAAuB,YAAAA,SAAK,qBAAO,sBAAsB,GAAG,SAAS;AAAA,IACrE;AAAA,EACF;AACF;",
6
6
  "names": ["clsx"]
7
7
  }
@@ -114,7 +114,7 @@ function registerStyle(hash, css) {
114
114
 
115
115
  // packages/components/src/border-box-control/style.module.scss
116
116
  if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
117
- registerStyle("2eee37fabd", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2;margin:0 auto}.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}");
117
+ registerStyle("aabfd0c968", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2}.ec002fcdf4036950__centered-border-control.ec002fcdf4036950__centered-border-control{margin:0 auto}.f9ea07d7127ab067__right-border-control.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}");
118
118
  }
119
119
  var style_module_default = { "linked-border-control": "fa6e6c2331986855__linked-border-control", "linked-border-control-full-width": "_6a6edeeb175d724f__linked-border-control-full-width", "header": "f5104488f80fa50f__header", "wrapper": "_48f63719b9dc7e1a__wrapper", "linked-button": "_902e774d37b6698b__linked-button", "visualizer": "_5978f65e1d08de6c__visualizer", "split-controls": "afa8e78cec6a9f62__split-controls", "centered-border-control": "ec002fcdf4036950__centered-border-control", "right-border-control": "f9ea07d7127ab067__right-border-control" };
120
120
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/border-box-control/border-box-control-visualizer/hook.ts", "../../../../style-runtime/src/index.ts", "../../../src/border-box-control/style.module.scss"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport styles from '../style.module.scss';\nimport { COLORS, CONFIG } from '../../utils';\nimport { useContextSystem } from '../../context';\nconst borderBoxStyleWithFallback = border => {\n const {\n color = COLORS.gray[200],\n style = 'solid',\n width = CONFIG.borderWidth\n } = border || {};\n const clampedWidth = width !== CONFIG.borderWidth ? `clamp(1px, ${width}, 10px)` : width;\n const hasVisibleBorder = !!width && width !== '0' || !!color;\n const borderStyle = hasVisibleBorder ? style || 'solid' : style;\n return `${color} ${borderStyle} ${clampedWidth}`;\n};\nexport function useBorderBoxControlVisualizer(props) {\n const {\n className,\n style,\n value,\n ...otherProps\n } = useContextSystem(props, 'BorderBoxControlVisualizer');\n return {\n ...otherProps,\n className: clsx(styles.visualizer, className),\n style: {\n ...style,\n '--wp-components-border-box-visualizer-top': borderBoxStyleWithFallback(value?.top),\n '--wp-components-border-box-visualizer-bottom': borderBoxStyleWithFallback(value?.bottom),\n // Logical properties map left/right to inline start/end for RTL.\n '--wp-components-border-box-visualizer-start': borderBoxStyleWithFallback(value?.left),\n '--wp-components-border-box-visualizer-end': borderBoxStyleWithFallback(value?.right)\n },\n value\n };\n}", "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(\"2eee37fabd\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2;margin:0 auto}.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}\");\n}\nexport default {\"linked-border-control\":\"fa6e6c2331986855__linked-border-control\",\"linked-border-control-full-width\":\"_6a6edeeb175d724f__linked-border-control-full-width\",\"header\":\"f5104488f80fa50f__header\",\"wrapper\":\"_48f63719b9dc7e1a__wrapper\",\"linked-button\":\"_902e774d37b6698b__linked-button\",\"visualizer\":\"_5978f65e1d08de6c__visualizer\",\"split-controls\":\"afa8e78cec6a9f62__split-controls\",\"centered-border-control\":\"ec002fcdf4036950__centered-border-control\",\"right-border-control\":\"f9ea07d7127ab067__right-border-control\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;;;ACAjB,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;AACT;AAUA,SAAS,YAAY,gBAAgB,MAAM,KAAK;AAC9C,MAAI,CAAC,eAAe,MAAM;AACxB;AAAA,EACF;AACA,QAAM,UAAU,WA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AAQ,EAAC,yBAAwB,2CAA0C,oCAAmC,uDAAsD,UAAS,4BAA2B,WAAU,8BAA6B,iBAAgB,oCAAmC,cAAa,iCAAgC,kBAAiB,oCAAmC,2BAA0B,6CAA4C,wBAAuB,yCAAwC;;;AFF/gB,mBAA+B;AAC/B,qBAAiC;AACjC,IAAM,6BAA6B,YAAU;AAC3C,QAAM;AAAA,IACJ,QAAQ,oBAAO,KAAK,GAAG;AAAA,IACvB,QAAQ;AAAA,IACR,QAAQ,oBAAO;AAAA,EACjB,IAAI,UAAU,CAAC;AACf,QAAM,eAAe,UAAU,oBAAO,cAAc,cAAc,KAAK,YAAY;AACnF,QAAM,mBAAmB,CAAC,CAAC,SAAS,UAAU,OAAO,CAAC,CAAC;AACvD,QAAM,cAAc,mBAAmB,SAAS,UAAU;AAC1D,SAAO,GAAG,KAAK,IAAI,WAAW,IAAI,YAAY;AAChD;AACO,SAAS,8BAA8B,OAAO;AACnD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,QAAI,iCAAiB,OAAO,4BAA4B;AACxD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,eAAW,YAAAA,SAAK,qBAAO,YAAY,SAAS;AAAA,IAC5C,OAAO;AAAA,MACL,GAAG;AAAA,MACH,6CAA6C,2BAA2B,OAAO,GAAG;AAAA,MAClF,gDAAgD,2BAA2B,OAAO,MAAM;AAAA;AAAA,MAExF,+CAA+C,2BAA2B,OAAO,IAAI;AAAA,MACrF,6CAA6C,2BAA2B,OAAO,KAAK;AAAA,IACtF;AAAA,IACA;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport styles from '../style.module.scss';\nimport { COLORS, CONFIG } from '../../utils';\nimport { useContextSystem } from '../../context';\nconst borderBoxStyleWithFallback = border => {\n const {\n color = COLORS.gray[200],\n style = 'solid',\n width = CONFIG.borderWidth\n } = border || {};\n const clampedWidth = width !== CONFIG.borderWidth ? `clamp(1px, ${width}, 10px)` : width;\n const hasVisibleBorder = !!width && width !== '0' || !!color;\n const borderStyle = hasVisibleBorder ? style || 'solid' : style;\n return `${color} ${borderStyle} ${clampedWidth}`;\n};\nexport function useBorderBoxControlVisualizer(props) {\n const {\n className,\n style,\n value,\n ...otherProps\n } = useContextSystem(props, 'BorderBoxControlVisualizer');\n return {\n ...otherProps,\n className: clsx(styles.visualizer, className),\n style: {\n ...style,\n '--wp-components-border-box-visualizer-top': borderBoxStyleWithFallback(value?.top),\n '--wp-components-border-box-visualizer-bottom': borderBoxStyleWithFallback(value?.bottom),\n // Logical properties map left/right to inline start/end for RTL.\n '--wp-components-border-box-visualizer-start': borderBoxStyleWithFallback(value?.left),\n '--wp-components-border-box-visualizer-end': borderBoxStyleWithFallback(value?.right)\n },\n value\n };\n}", "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(\"aabfd0c968\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._6a6edeeb175d724f__linked-border-control-full-width._6a6edeeb175d724f__linked-border-control-full-width{margin-inline-end:0}.f5104488f80fa50f__header{margin-bottom:4px}.f5104488f80fa50f__header>span{margin-bottom:0}._48f63719b9dc7e1a__wrapper{position:relative}._48f63719b9dc7e1a__wrapper ._902e774d37b6698b__linked-button{inset-inline-end:0;position:absolute;top:8px}._902e774d37b6698b__linked-button{line-height:0}._5978f65e1d08de6c__visualizer{border-bottom:var(--wp-components-border-box-visualizer-bottom);border-inline-end:var(--wp-components-border-box-visualizer-end);border-inline-start:var(--wp-components-border-box-visualizer-start);border-top:var(--wp-components-border-box-visualizer-top);bottom:20px;position:absolute;top:20px;inset-inline:39px}.afa8e78cec6a9f62__split-controls{flex:1;position:relative}.ec002fcdf4036950__centered-border-control{grid-column:span 2}.ec002fcdf4036950__centered-border-control.ec002fcdf4036950__centered-border-control{margin:0 auto}.f9ea07d7127ab067__right-border-control.f9ea07d7127ab067__right-border-control{margin-inline-start:auto}\");\n}\nexport default {\"linked-border-control\":\"fa6e6c2331986855__linked-border-control\",\"linked-border-control-full-width\":\"_6a6edeeb175d724f__linked-border-control-full-width\",\"header\":\"f5104488f80fa50f__header\",\"wrapper\":\"_48f63719b9dc7e1a__wrapper\",\"linked-button\":\"_902e774d37b6698b__linked-button\",\"visualizer\":\"_5978f65e1d08de6c__visualizer\",\"split-controls\":\"afa8e78cec6a9f62__split-controls\",\"centered-border-control\":\"ec002fcdf4036950__centered-border-control\",\"right-border-control\":\"f9ea07d7127ab067__right-border-control\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;;;ACAjB,IAAM,uBAA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S,8BAA8B,OAAO;AACnD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,QAAI,iCAAiB,OAAO,4BAA4B;AACxD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,eAAW,YAAAA,SAAK,qBAAO,YAAY,SAAS;AAAA,IAC5C,OAAO;AAAA,MACL,GAAG;AAAA,MACH,6CAA6C,2BAA2B,OAAO,GAAG;AAAA,MAClF,gDAAgD,2BAA2B,OAAO,MAAM;AAAA;AAAA,MAExF,+CAA+C,2BAA2B,OAAO,IAAI;AAAA,MACrF,6CAA6C,2BAA2B,OAAO,KAAK;AAAA,IACtF;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": ["clsx"]
7
7
  }
@@ -126,9 +126,9 @@ function registerStyle(hash, css) {
126
126
 
127
127
  // packages/components/src/box-control/style.module.scss
128
128
  if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
129
- registerStyle("541c332c55", ".d5a55650545c8e59__unit-control{max-width:90px}.ea5687e40d8b3401__input-wrapper{grid-column:1/span 3}._33fca83ebb9a56db__reset-button{grid-area:1/2;justify-self:end}._80f02f0884ee052b__linked-button-wrapper{grid-area:1/3;justify-self:end}._432c155702d177a9__icon{flex:0 0 auto}._4c5932d5023e1609__range-control{margin-inline-end:8px;width:100%}");
129
+ registerStyle("92b287e16a", ".d5a55650545c8e59__unit-control{max-width:90px}.ea5687e40d8b3401__input-wrapper{grid-column:1/span 3}._33fca83ebb9a56db__reset-button{grid-area:1/2;justify-self:end}._80f02f0884ee052b__linked-button-wrapper{grid-area:1/3;justify-self:end}._432c155702d177a9__icon{flex:0 0 auto}._4c5932d5023e1609__range-control{margin-inline-end:8px;width:100%}.f6b3cb50c11eeefd__icon-root{box-sizing:border-box;display:block;height:24px;padding:4px;position:relative;width:24px}._165111a2812ec757__icon-viewbox{box-sizing:border-box;display:block;height:100%;position:relative;width:100%}._96e1dc84980225de__icon-stroke{background-color:currentColor;box-sizing:border-box;display:block;opacity:.3;pointer-events:none;position:absolute}.ae4cb7d643590907__is-highlighted{opacity:1}._0e353501165ff99d__icon-right,._79ee6c4e8e5d2e63__icon-left{bottom:3px;top:3px;width:2px}._286ce95a0c988af5__icon-bottom,._742ba047912baed5__icon-top{height:2px;left:3px;right:3px}._742ba047912baed5__icon-top{top:0}._0e353501165ff99d__icon-right{right:0}._286ce95a0c988af5__icon-bottom{bottom:0}._79ee6c4e8e5d2e63__icon-left{left:0}");
130
130
  }
131
- var style_module_default = { "unit-control": "d5a55650545c8e59__unit-control", "input-wrapper": "ea5687e40d8b3401__input-wrapper", "reset-button": "_33fca83ebb9a56db__reset-button", "linked-button-wrapper": "_80f02f0884ee052b__linked-button-wrapper", "icon": "_432c155702d177a9__icon", "range-control": "_4c5932d5023e1609__range-control" };
131
+ var style_module_default = { "unit-control": "d5a55650545c8e59__unit-control", "input-wrapper": "ea5687e40d8b3401__input-wrapper", "reset-button": "_33fca83ebb9a56db__reset-button", "linked-button-wrapper": "_80f02f0884ee052b__linked-button-wrapper", "icon": "_432c155702d177a9__icon", "range-control": "_4c5932d5023e1609__range-control", "icon-root": "f6b3cb50c11eeefd__icon-root", "icon-viewbox": "_165111a2812ec757__icon-viewbox", "icon-stroke": "_96e1dc84980225de__icon-stroke", "is-highlighted": "ae4cb7d643590907__is-highlighted", "icon-left": "_79ee6c4e8e5d2e63__icon-left", "icon-right": "_0e353501165ff99d__icon-right", "icon-top": "_742ba047912baed5__icon-top", "icon-bottom": "_286ce95a0c988af5__icon-bottom" };
132
132
 
133
133
  // packages/components/src/box-control/box-input-control.tsx
134
134
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/box-control/box-input-control.tsx", "../../../style-runtime/src/index.ts", "../../src/box-control/style.module.scss"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { settings } from '@wordpress/icons';\nimport Tooltip from '../tooltip';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\nimport { CUSTOM_VALUE_SETTINGS, getMergedValue, getAllowedSides, getPresetIndexFromValue, getPresetValueFromIndex, isValuePreset, isValuesDefined, isValueMixed, LABELS } from './utils';\nimport BoxControlIcon from './icon';\nimport Button from '../button';\nimport { HStack } from '../h-stack';\nimport RangeControl from '../range-control';\nimport UnitControl from '../unit-control';\nimport styles from './style.module.scss';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nfunction getSidesToModify(side, sides, isAlt) {\n const allowedSides = getAllowedSides(sides);\n let modifiedSides = [];\n switch (side) {\n case 'all':\n modifiedSides = ['top', 'bottom', 'left', 'right'];\n break;\n case 'horizontal':\n modifiedSides = ['left', 'right'];\n break;\n case 'vertical':\n modifiedSides = ['top', 'bottom'];\n break;\n default:\n modifiedSides = [side];\n }\n if (isAlt) {\n switch (side) {\n case 'top':\n modifiedSides.push('bottom');\n break;\n case 'bottom':\n modifiedSides.push('top');\n break;\n case 'left':\n modifiedSides.push('right');\n break;\n case 'right':\n modifiedSides.push('left');\n break;\n }\n }\n return modifiedSides.filter(s => allowedSides.has(s));\n}\nexport default function BoxInputControl({\n onChange = noop,\n onFocus = noop,\n values,\n selectedUnits,\n setSelectedUnits,\n sides,\n side,\n min = 0,\n presets,\n presetKey,\n placeholder: placeholderProp,\n ...props\n}) {\n const defaultValuesToModify = getSidesToModify(side, sides);\n const handleOnFocus = event => {\n onFocus(event, {\n side\n });\n };\n const handleOnChange = nextValues => {\n onChange(nextValues);\n };\n const handleRawOnValueChange = next => {\n const nextValues = {\n ...values\n };\n defaultValuesToModify.forEach(modifiedSide => {\n nextValues[modifiedSide] = next;\n });\n handleOnChange(nextValues);\n };\n const handleOnValueChange = (next, extra) => {\n const nextValues = {\n ...values\n };\n const isNumeric = next !== undefined && !isNaN(parseFloat(next));\n const nextValue = isNumeric ? next : undefined;\n const modifiedSides = getSidesToModify(side, sides,\n /**\n * Supports changing pair sides. For example, holding the ALT key\n * when changing the TOP will also update BOTTOM.\n */\n // @ts-expect-error - TODO: event.altKey is only present when the change event was\n // triggered by a keyboard event. Should this feature be implemented differently so\n // it also works with drag events?\n !!extra?.event.altKey);\n modifiedSides.forEach(modifiedSide => {\n nextValues[modifiedSide] = nextValue;\n });\n handleOnChange(nextValues);\n };\n const handleOnUnitChange = next => {\n const newUnits = {\n ...selectedUnits\n };\n defaultValuesToModify.forEach(modifiedSide => {\n newUnits[modifiedSide] = next;\n });\n setSelectedUnits(newUnits);\n };\n const mergedValue = getMergedValue(values, defaultValuesToModify);\n const hasValues = isValuesDefined(values);\n const isMixed = hasValues && defaultValuesToModify.length > 1 && isValueMixed(values, defaultValuesToModify);\n const [parsedQuantity, parsedUnit] = parseQuantityAndUnitFromRawValue(mergedValue);\n const computedUnit = hasValues ? parsedUnit : selectedUnits[defaultValuesToModify[0]];\n const generatedId = useInstanceId(BoxInputControl, 'box-control-input');\n const inputId = [generatedId, side].join('-');\n const isMixedUnit = defaultValuesToModify.length > 1 && mergedValue === undefined && defaultValuesToModify.some(s => selectedUnits[s] !== computedUnit);\n const usedValue = mergedValue === undefined && computedUnit ? computedUnit : mergedValue;\n const mixedPlaceholder = isMixed || isMixedUnit ? __('Mixed') : undefined;\n const hasPresets = presets && presets.length > 0 && presetKey;\n const hasPresetValue = hasPresets && mergedValue !== undefined && !isMixed && isValuePreset(mergedValue, presetKey);\n const [showCustomValueControl, setShowCustomValueControl] = useState(!hasPresets || !hasPresetValue && !isMixed && mergedValue !== undefined);\n const presetIndex = hasPresetValue ? getPresetIndexFromValue(mergedValue, presetKey, presets) : undefined;\n const marks = hasPresets ? [{\n value: 0,\n label: '',\n tooltip: __('None')\n }, ...presets.map((preset, index) => ({\n value: index + 1,\n label: '',\n tooltip: preset.name ?? preset.slug\n }))] : [];\n return /*#__PURE__*/_jsxs(HStack, {\n className: styles['input-wrapper'],\n expanded: true,\n children: [/*#__PURE__*/_jsx(BoxControlIcon, {\n className: styles.icon,\n side: side,\n sides: sides\n }), showCustomValueControl && /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Tooltip, {\n placement: \"top-end\",\n text: LABELS[side],\n children: /*#__PURE__*/_jsx(UnitControl, {\n ...props,\n min: min,\n className: clsx(styles['unit-control'], 'component-box-control__unit-control'),\n id: inputId,\n isPressEnterToChange: true,\n disableUnits: isMixed || isMixedUnit,\n value: usedValue,\n onChange: handleOnValueChange,\n onUnitChange: handleOnUnitChange,\n onFocus: handleOnFocus,\n label: LABELS[side],\n placeholder: mixedPlaceholder ?? placeholderProp,\n hideLabelFromVision: true\n })\n }), /*#__PURE__*/_jsx(RangeControl, {\n className: styles['range-control'],\n \"aria-controls\": inputId,\n label: LABELS[side],\n hideLabelFromVision: true,\n onChange: newValue => {\n handleOnValueChange(newValue !== undefined ? [newValue, computedUnit].join('') : undefined);\n },\n min: isFinite(min) ? min : 0,\n max: CUSTOM_VALUE_SETTINGS[computedUnit ?? 'px']?.max ?? 10,\n step: CUSTOM_VALUE_SETTINGS[computedUnit ?? 'px']?.step ?? 0.1,\n value: parsedQuantity ?? 0,\n withInputField: false\n })]\n }), hasPresets && !showCustomValueControl && /*#__PURE__*/_jsx(RangeControl, {\n className: clsx(styles['range-control'], 'spacing-sizes-control__range-control'),\n value: presetIndex !== undefined ? presetIndex + 1 : 0,\n onChange: newIndex => {\n const newValue = newIndex === 0 || newIndex === undefined ? undefined : getPresetValueFromIndex(newIndex - 1, presetKey, presets);\n handleRawOnValueChange(newValue);\n },\n withInputField: false,\n \"aria-valuenow\": presetIndex !== undefined ? presetIndex + 1 : 0,\n \"aria-valuetext\": marks[presetIndex !== undefined ? presetIndex + 1 : 0].tooltip,\n renderTooltipContent: index => marks[!index ? 0 : index].tooltip,\n min: 0,\n max: marks.length - 1,\n marks: marks,\n label: LABELS[side],\n hideLabelFromVision: true\n }), hasPresets && /*#__PURE__*/_jsx(Button, {\n label: showCustomValueControl ? __('Use size preset') : __('Set custom size'),\n icon: settings,\n onClick: () => {\n setShowCustomValueControl(!showCustomValueControl);\n },\n isPressed: showCustomValueControl,\n size: \"small\",\n iconSize: 24\n })]\n }, `box-control-${side}`);\n}", "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(\"541c332c55\", \".d5a55650545c8e59__unit-control{max-width:90px}.ea5687e40d8b3401__input-wrapper{grid-column:1/span 3}._33fca83ebb9a56db__reset-button{grid-area:1/2;justify-self:end}._80f02f0884ee052b__linked-button-wrapper{grid-area:1/3;justify-self:end}._432c155702d177a9__icon{flex:0 0 auto}._4c5932d5023e1609__range-control{margin-inline-end:8px;width:100%}\");\n}\nexport default {\"unit-control\":\"d5a55650545c8e59__unit-control\",\"input-wrapper\":\"ea5687e40d8b3401__input-wrapper\",\"reset-button\":\"_33fca83ebb9a56db__reset-button\",\"linked-button-wrapper\":\"_80f02f0884ee052b__linked-button-wrapper\",\"icon\":\"_432c155702d177a9__icon\",\"range-control\":\"_4c5932d5023e1609__range-control\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAA8B;AAC9B,kBAAmB;AACnB,qBAAyB;AACzB,mBAAyB;AACzB,qBAAoB;AACpB,mBAAiD;AACjD,IAAAA,gBAA+K;AAC/K,kBAA2B;AAC3B,oBAAmB;AACnB,qBAAuB;AACvB,2BAAyB;AACzB,0BAAwB;;;ACZxB,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;AACT;AAUA,SAAS,YAAY,gBAAgB,MAAM,KAAK;AAC9C,MAAI,CAAC,eAAe,MAAM;AACxB;AAAA,EACF;AACA,QAAM,UAAU,WAAW;AAC3B,MAAI,iB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,OAAO,6BAAyB,gBAAG,iBAAiB,QAAI,gBAAG,iBAAiB;AAAA,MAC5E,MAAM;AAAA,MACN,SAAS,MAAM;AACb,kCAA0B,CAAC,sBAAsB;AAAA,MACnD;AAAA,MACA,WAAW;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA,IACZ,CAAC,CAAC;AAAA,EACJ,GAAG,eAAe,IAAI,EAAE;AAC1B;",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { settings } from '@wordpress/icons';\nimport Tooltip from '../tooltip';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\nimport { CUSTOM_VALUE_SETTINGS, getMergedValue, getAllowedSides, getPresetIndexFromValue, getPresetValueFromIndex, isValuePreset, isValuesDefined, isValueMixed, LABELS } from './utils';\nimport BoxControlIcon from './icon';\nimport Button from '../button';\nimport { HStack } from '../h-stack';\nimport RangeControl from '../range-control';\nimport UnitControl from '../unit-control';\nimport styles from './style.module.scss';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nfunction getSidesToModify(side, sides, isAlt) {\n const allowedSides = getAllowedSides(sides);\n let modifiedSides = [];\n switch (side) {\n case 'all':\n modifiedSides = ['top', 'bottom', 'left', 'right'];\n break;\n case 'horizontal':\n modifiedSides = ['left', 'right'];\n break;\n case 'vertical':\n modifiedSides = ['top', 'bottom'];\n break;\n default:\n modifiedSides = [side];\n }\n if (isAlt) {\n switch (side) {\n case 'top':\n modifiedSides.push('bottom');\n break;\n case 'bottom':\n modifiedSides.push('top');\n break;\n case 'left':\n modifiedSides.push('right');\n break;\n case 'right':\n modifiedSides.push('left');\n break;\n }\n }\n return modifiedSides.filter(s => allowedSides.has(s));\n}\nexport default function BoxInputControl({\n onChange = noop,\n onFocus = noop,\n values,\n selectedUnits,\n setSelectedUnits,\n sides,\n side,\n min = 0,\n presets,\n presetKey,\n placeholder: placeholderProp,\n ...props\n}) {\n const defaultValuesToModify = getSidesToModify(side, sides);\n const handleOnFocus = event => {\n onFocus(event, {\n side\n });\n };\n const handleOnChange = nextValues => {\n onChange(nextValues);\n };\n const handleRawOnValueChange = next => {\n const nextValues = {\n ...values\n };\n defaultValuesToModify.forEach(modifiedSide => {\n nextValues[modifiedSide] = next;\n });\n handleOnChange(nextValues);\n };\n const handleOnValueChange = (next, extra) => {\n const nextValues = {\n ...values\n };\n const isNumeric = next !== undefined && !isNaN(parseFloat(next));\n const nextValue = isNumeric ? next : undefined;\n const modifiedSides = getSidesToModify(side, sides,\n /**\n * Supports changing pair sides. For example, holding the ALT key\n * when changing the TOP will also update BOTTOM.\n */\n // @ts-expect-error - TODO: event.altKey is only present when the change event was\n // triggered by a keyboard event. Should this feature be implemented differently so\n // it also works with drag events?\n !!extra?.event.altKey);\n modifiedSides.forEach(modifiedSide => {\n nextValues[modifiedSide] = nextValue;\n });\n handleOnChange(nextValues);\n };\n const handleOnUnitChange = next => {\n const newUnits = {\n ...selectedUnits\n };\n defaultValuesToModify.forEach(modifiedSide => {\n newUnits[modifiedSide] = next;\n });\n setSelectedUnits(newUnits);\n };\n const mergedValue = getMergedValue(values, defaultValuesToModify);\n const hasValues = isValuesDefined(values);\n const isMixed = hasValues && defaultValuesToModify.length > 1 && isValueMixed(values, defaultValuesToModify);\n const [parsedQuantity, parsedUnit] = parseQuantityAndUnitFromRawValue(mergedValue);\n const computedUnit = hasValues ? parsedUnit : selectedUnits[defaultValuesToModify[0]];\n const generatedId = useInstanceId(BoxInputControl, 'box-control-input');\n const inputId = [generatedId, side].join('-');\n const isMixedUnit = defaultValuesToModify.length > 1 && mergedValue === undefined && defaultValuesToModify.some(s => selectedUnits[s] !== computedUnit);\n const usedValue = mergedValue === undefined && computedUnit ? computedUnit : mergedValue;\n const mixedPlaceholder = isMixed || isMixedUnit ? __('Mixed') : undefined;\n const hasPresets = presets && presets.length > 0 && presetKey;\n const hasPresetValue = hasPresets && mergedValue !== undefined && !isMixed && isValuePreset(mergedValue, presetKey);\n const [showCustomValueControl, setShowCustomValueControl] = useState(!hasPresets || !hasPresetValue && !isMixed && mergedValue !== undefined);\n const presetIndex = hasPresetValue ? getPresetIndexFromValue(mergedValue, presetKey, presets) : undefined;\n const marks = hasPresets ? [{\n value: 0,\n label: '',\n tooltip: __('None')\n }, ...presets.map((preset, index) => ({\n value: index + 1,\n label: '',\n tooltip: preset.name ?? preset.slug\n }))] : [];\n return /*#__PURE__*/_jsxs(HStack, {\n className: styles['input-wrapper'],\n expanded: true,\n children: [/*#__PURE__*/_jsx(BoxControlIcon, {\n className: styles.icon,\n side: side,\n sides: sides\n }), showCustomValueControl && /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Tooltip, {\n placement: \"top-end\",\n text: LABELS[side],\n children: /*#__PURE__*/_jsx(UnitControl, {\n ...props,\n min: min,\n className: clsx(styles['unit-control'], 'component-box-control__unit-control'),\n id: inputId,\n isPressEnterToChange: true,\n disableUnits: isMixed || isMixedUnit,\n value: usedValue,\n onChange: handleOnValueChange,\n onUnitChange: handleOnUnitChange,\n onFocus: handleOnFocus,\n label: LABELS[side],\n placeholder: mixedPlaceholder ?? placeholderProp,\n hideLabelFromVision: true\n })\n }), /*#__PURE__*/_jsx(RangeControl, {\n className: styles['range-control'],\n \"aria-controls\": inputId,\n label: LABELS[side],\n hideLabelFromVision: true,\n onChange: newValue => {\n handleOnValueChange(newValue !== undefined ? [newValue, computedUnit].join('') : undefined);\n },\n min: isFinite(min) ? min : 0,\n max: CUSTOM_VALUE_SETTINGS[computedUnit ?? 'px']?.max ?? 10,\n step: CUSTOM_VALUE_SETTINGS[computedUnit ?? 'px']?.step ?? 0.1,\n value: parsedQuantity ?? 0,\n withInputField: false\n })]\n }), hasPresets && !showCustomValueControl && /*#__PURE__*/_jsx(RangeControl, {\n className: clsx(styles['range-control'], 'spacing-sizes-control__range-control'),\n value: presetIndex !== undefined ? presetIndex + 1 : 0,\n onChange: newIndex => {\n const newValue = newIndex === 0 || newIndex === undefined ? undefined : getPresetValueFromIndex(newIndex - 1, presetKey, presets);\n handleRawOnValueChange(newValue);\n },\n withInputField: false,\n \"aria-valuenow\": presetIndex !== undefined ? presetIndex + 1 : 0,\n \"aria-valuetext\": marks[presetIndex !== undefined ? presetIndex + 1 : 0].tooltip,\n renderTooltipContent: index => marks[!index ? 0 : index].tooltip,\n min: 0,\n max: marks.length - 1,\n marks: marks,\n label: LABELS[side],\n hideLabelFromVision: true\n }), hasPresets && /*#__PURE__*/_jsx(Button, {\n label: showCustomValueControl ? __('Use size preset') : __('Set custom size'),\n icon: settings,\n onClick: () => {\n setShowCustomValueControl(!showCustomValueControl);\n },\n isPressed: showCustomValueControl,\n size: \"small\",\n iconSize: 24\n })]\n }, `box-control-${side}`);\n}", "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(\"92b287e16a\", \".d5a55650545c8e59__unit-control{max-width:90px}.ea5687e40d8b3401__input-wrapper{grid-column:1/span 3}._33fca83ebb9a56db__reset-button{grid-area:1/2;justify-self:end}._80f02f0884ee052b__linked-button-wrapper{grid-area:1/3;justify-self:end}._432c155702d177a9__icon{flex:0 0 auto}._4c5932d5023e1609__range-control{margin-inline-end:8px;width:100%}.f6b3cb50c11eeefd__icon-root{box-sizing:border-box;display:block;height:24px;padding:4px;position:relative;width:24px}._165111a2812ec757__icon-viewbox{box-sizing:border-box;display:block;height:100%;position:relative;width:100%}._96e1dc84980225de__icon-stroke{background-color:currentColor;box-sizing:border-box;display:block;opacity:.3;pointer-events:none;position:absolute}.ae4cb7d643590907__is-highlighted{opacity:1}._0e353501165ff99d__icon-right,._79ee6c4e8e5d2e63__icon-left{bottom:3px;top:3px;width:2px}._286ce95a0c988af5__icon-bottom,._742ba047912baed5__icon-top{height:2px;left:3px;right:3px}._742ba047912baed5__icon-top{top:0}._0e353501165ff99d__icon-right{right:0}._286ce95a0c988af5__icon-bottom{bottom:0}._79ee6c4e8e5d2e63__icon-left{left:0}\");\n}\nexport default {\"unit-control\":\"d5a55650545c8e59__unit-control\",\"input-wrapper\":\"ea5687e40d8b3401__input-wrapper\",\"reset-button\":\"_33fca83ebb9a56db__reset-button\",\"linked-button-wrapper\":\"_80f02f0884ee052b__linked-button-wrapper\",\"icon\":\"_432c155702d177a9__icon\",\"range-control\":\"_4c5932d5023e1609__range-control\",\"icon-root\":\"f6b3cb50c11eeefd__icon-root\",\"icon-viewbox\":\"_165111a2812ec757__icon-viewbox\",\"icon-stroke\":\"_96e1dc84980225de__icon-stroke\",\"is-highlighted\":\"ae4cb7d643590907__is-highlighted\",\"icon-left\":\"_79ee6c4e8e5d2e63__icon-left\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