@wordpress/components 40.0.0 → 40.1.1-next.v.202609031004.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 (291) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/build/border-box-control/border-box-control/component.cjs +37 -5
  3. package/build/border-box-control/border-box-control/component.cjs.map +3 -3
  4. package/build/border-box-control/border-box-control/hook.cjs +24 -3
  5. package/build/border-box-control/border-box-control/hook.cjs.map +3 -3
  6. package/build/border-box-control/border-box-control-linked-button/hook.cjs +2 -2
  7. package/build/border-box-control/border-box-control-linked-button/hook.cjs.map +2 -2
  8. package/build/border-box-control/border-box-control-split-controls/hook.cjs +2 -2
  9. package/build/border-box-control/border-box-control-split-controls/hook.cjs.map +2 -2
  10. package/build/border-box-control/border-box-control-visualizer/hook.cjs +2 -2
  11. package/build/border-box-control/border-box-control-visualizer/hook.cjs.map +2 -2
  12. package/build/color-palette/index.cjs +1 -1
  13. package/build/color-palette/index.cjs.map +2 -2
  14. package/build/context/context-system-provider.cjs +2 -5
  15. package/build/context/context-system-provider.cjs.map +3 -3
  16. package/build/context/use-context-system.cjs +7 -2
  17. package/build/context/use-context-system.cjs.map +2 -2
  18. package/build/icon/index.cjs +30 -12
  19. package/build/icon/index.cjs.map +2 -2
  20. package/build/item-group/item/hook.cjs +1 -1
  21. package/build/item-group/item/hook.cjs.map +2 -2
  22. package/build/item-group/item-group/hook.cjs +1 -1
  23. package/build/item-group/item-group/hook.cjs.map +2 -2
  24. package/build/resizable-box/index.cjs.map +1 -1
  25. package/build/snackbar/index.cjs +8 -5
  26. package/build/snackbar/index.cjs.map +2 -2
  27. package/build/tools-panel/tools-panel/hook.cjs +102 -106
  28. package/build/tools-panel/tools-panel/hook.cjs.map +2 -2
  29. package/build/tools-panel/tools-panel-item/hook.cjs +33 -33
  30. package/build/tools-panel/tools-panel-item/hook.cjs.map +2 -2
  31. package/build-module/border-box-control/border-box-control/component.mjs +38 -6
  32. package/build-module/border-box-control/border-box-control/component.mjs.map +2 -2
  33. package/build-module/border-box-control/border-box-control/hook.mjs +14 -3
  34. package/build-module/border-box-control/border-box-control/hook.mjs.map +2 -2
  35. package/build-module/border-box-control/border-box-control-linked-button/hook.mjs +2 -2
  36. package/build-module/border-box-control/border-box-control-linked-button/hook.mjs.map +2 -2
  37. package/build-module/border-box-control/border-box-control-split-controls/hook.mjs +2 -2
  38. package/build-module/border-box-control/border-box-control-split-controls/hook.mjs.map +2 -2
  39. package/build-module/border-box-control/border-box-control-visualizer/hook.mjs +2 -2
  40. package/build-module/border-box-control/border-box-control-visualizer/hook.mjs.map +2 -2
  41. package/build-module/color-palette/index.mjs +1 -1
  42. package/build-module/color-palette/index.mjs.map +2 -2
  43. package/build-module/context/context-system-provider.mjs +2 -5
  44. package/build-module/context/context-system-provider.mjs.map +3 -3
  45. package/build-module/context/use-context-system.mjs +7 -2
  46. package/build-module/context/use-context-system.mjs.map +2 -2
  47. package/build-module/icon/index.mjs +30 -12
  48. package/build-module/icon/index.mjs.map +2 -2
  49. package/build-module/item-group/item/hook.mjs +1 -1
  50. package/build-module/item-group/item/hook.mjs.map +2 -2
  51. package/build-module/item-group/item-group/hook.mjs +1 -1
  52. package/build-module/item-group/item-group/hook.mjs.map +2 -2
  53. package/build-module/resizable-box/index.mjs.map +1 -1
  54. package/build-module/snackbar/index.mjs +8 -5
  55. package/build-module/snackbar/index.mjs.map +2 -2
  56. package/build-module/tools-panel/tools-panel/hook.mjs +103 -107
  57. package/build-module/tools-panel/tools-panel/hook.mjs.map +2 -2
  58. package/build-module/tools-panel/tools-panel-item/hook.mjs +35 -35
  59. package/build-module/tools-panel/tools-panel-item/hook.mjs.map +2 -2
  60. package/build-style/style-rtl.css +7 -35
  61. package/build-style/style.css +7 -35
  62. package/build-types/border-box-control/border-box-control/component.d.ts +4 -0
  63. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  64. package/build-types/border-box-control/border-box-control/hook.d.ts +4 -2
  65. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  66. package/build-types/border-box-control/types.d.ts +6 -2
  67. package/build-types/border-box-control/types.d.ts.map +1 -1
  68. package/build-types/composite/types.d.ts +1 -1
  69. package/build-types/context/context-system-provider.d.ts +8 -6
  70. package/build-types/context/context-system-provider.d.ts.map +1 -1
  71. package/build-types/context/use-context-system.d.ts.map +1 -1
  72. package/build-types/icon/index.d.ts.map +1 -1
  73. package/build-types/popover/types.d.ts +6 -2
  74. package/build-types/popover/types.d.ts.map +1 -1
  75. package/build-types/snackbar/index.d.ts.map +1 -1
  76. package/build-types/tools-panel/tools-panel/hook.d.ts +4 -4
  77. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  78. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  79. package/build-types/tools-panel/types.d.ts +52 -9
  80. package/build-types/tools-panel/types.d.ts.map +1 -1
  81. package/package.json +26 -25
  82. package/src/angle-picker-control/style.module.scss +1 -1
  83. package/src/autocomplete/test/get-autocomplete-match.ts +2 -1
  84. package/src/base-control/stories/index.story.tsx +2 -2
  85. package/src/border-box-control/border-box-control/README.md +5 -3
  86. package/src/border-box-control/border-box-control/component.tsx +83 -15
  87. package/src/border-box-control/border-box-control/hook.ts +19 -1
  88. package/src/border-box-control/stories/index.story.tsx +10 -0
  89. package/src/border-box-control/style.module.scss +34 -3
  90. package/src/border-box-control/test/{index.tsx → index.jsdom.test.tsx} +133 -0
  91. package/src/border-box-control/test/utils.ts +11 -0
  92. package/src/border-box-control/types.ts +6 -2
  93. package/src/border-control/test/{index.js → index.jsdom.test.tsx} +20 -13
  94. package/src/checkbox-control/style.scss +2 -2
  95. package/src/checkbox-control/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +8 -5
  96. package/src/color-palette/index.tsx +1 -1
  97. package/src/composite/README.md +1 -1
  98. package/src/composite/types.ts +1 -1
  99. package/src/context/{context-system-provider.js → context-system-provider.tsx} +19 -5
  100. package/src/context/stories/{ComponentsProvider.stories.jsx → ComponentsProvider.stories.tsx} +2 -2
  101. package/src/context/test/__snapshots__/{context-system-provider.js.snap → context-system-provider.jsdom.test.tsx.snap} +3 -3
  102. package/src/context/test/context-connect.tsx +1 -2
  103. package/src/context/test/{context-system-provider.js → context-system-provider.jsdom.test.tsx} +81 -43
  104. package/src/context/test/wordpress-component.tsx +1 -2
  105. package/src/context/use-context-system.js +13 -4
  106. package/src/custom-gradient-picker/test/serializer.ts +1 -0
  107. package/src/date-time/test/utils.test.ts +9 -0
  108. package/src/draggable/style.module.scss +1 -1
  109. package/src/dropdown/style.module.scss +2 -2
  110. package/src/font-size-picker/test/utils.ts +1 -0
  111. package/src/icon/index.tsx +28 -12
  112. package/src/icon/test/{index.tsx → index.jsdom.test.tsx} +66 -0
  113. package/src/input-control/test/{index.js → index.jsdom.test.tsx} +16 -10
  114. package/src/item-group/style.module.scss +1 -2
  115. package/src/navigator/test/router.ts +1 -0
  116. package/src/notice/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +5 -2
  117. package/src/popover/README.md +2 -2
  118. package/src/popover/test/{index.tsx → index.jsdom.test.tsx} +23 -0
  119. package/src/popover/types.ts +9 -3
  120. package/src/query-controls/test/terms.ts +1 -0
  121. package/src/resizable-box/index.tsx +1 -1
  122. package/src/slot-fill/test/{index.js → index.jsdom.test.tsx} +3 -3
  123. package/src/slot-fill/test/{slot.js → slot.jsdom.test.tsx} +17 -9
  124. package/src/snackbar/index.tsx +10 -6
  125. package/src/snackbar/test/{index.tsx → index.jsdom.test.tsx} +28 -2
  126. package/src/snackbar/test/list.jsdom.test.tsx +99 -0
  127. package/src/surface/style.module.scss +2 -2
  128. package/src/textarea-control/style.module.scss +1 -1
  129. package/src/tip/style.scss +1 -1
  130. package/src/toggle-group-control/toggle-group-control/style.module.scss +1 -1
  131. package/src/tools-panel/test/{index.tsx → index.jsdom.test.tsx} +528 -9
  132. package/src/tools-panel/tools-panel/hook.ts +195 -180
  133. package/src/tools-panel/tools-panel-item/README.md +42 -1
  134. package/src/tools-panel/tools-panel-item/hook.ts +97 -69
  135. package/src/tools-panel/types.ts +54 -9
  136. package/src/truncate/style.module.scss +0 -1
  137. package/src/unit-control/test/utils.ts +1 -0
  138. package/src/utils/hooks/test/{use-controlled-state.js → use-controlled-state.jsdom.test.tsx} +17 -3
  139. package/src/utils/hooks/test/{use-controlled-value.js → use-controlled-value.jsdom.test.tsx} +3 -1
  140. package/src/utils/hooks/test/{use-cx.js → use-cx.jsdom.test.tsx} +3 -1
  141. package/src/utils/test/colors.js +1 -0
  142. package/src/utils/test/{get-node-text.js → get-node-text.tsx} +1 -0
  143. package/src/utils/test/math.js +1 -0
  144. package/src/utils/test/rtl.js +1 -0
  145. package/src/utils/test/space.js +1 -0
  146. package/src/utils/test/strings.js +1 -0
  147. package/src/utils/test/unit-values.js +1 -0
  148. package/src/view/test/{index.js → index.jsdom.test.tsx} +5 -1
  149. package/src/snackbar/test/list.tsx +0 -39
  150. /package/src/alignment-matrix-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  151. /package/src/autocomplete/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  152. /package/src/badge/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  153. /package/src/base-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  154. /package/src/box-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  155. /package/src/button/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  156. /package/src/card/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  157. /package/src/card/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  158. /package/src/checkbox-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  159. /package/src/circular-option-picker/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  160. /package/src/color-indicator/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  161. /package/src/color-indicator/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  162. /package/src/color-palette/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  163. /package/src/color-palette/test/{utils.ts → utils.jsdom.test.ts} +0 -0
  164. /package/src/color-picker/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  165. /package/src/combobox-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  166. /package/src/composite/legacy/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  167. /package/src/composite/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  168. /package/src/confirm-dialog/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  169. /package/src/content-editable-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  170. /package/src/custom-gradient-picker/gradient-bar/test/{utils.ts → utils.jsdom.test.ts} +0 -0
  171. /package/src/custom-gradient-picker/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  172. /package/src/custom-select-control/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  173. /package/src/custom-select-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  174. /package/src/custom-select-control-v2/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  175. /package/src/date-time/date-picker/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  176. /package/src/date-time/date-picker/test/{use-lilius.ts → use-lilius.jsdom.test.ts} +0 -0
  177. /package/src/date-time/date-time/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  178. /package/src/date-time/time-picker/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  179. /package/src/date-time/time-picker/time-input/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  180. /package/src/disabled/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  181. /package/src/divider/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  182. /package/src/dropdown/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  183. /package/src/dropdown-menu/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  184. /package/src/duotone-picker/test/{custom-duotone-bar.tsx → custom-duotone-bar.jsdom.test.tsx} +0 -0
  185. /package/src/duotone-picker/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  186. /package/src/elevation/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  187. /package/src/elevation/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  188. /package/src/external-link/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  189. /package/src/flex/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  190. /package/src/flex/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  191. /package/src/focal-point-picker/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  192. /package/src/focal-point-picker/test/{media.tsx → media.jsdom.test.tsx} +0 -0
  193. /package/src/font-size-picker/test/{font-size-picker-select.tsx → font-size-picker-select.jsdom.test.tsx} +0 -0
  194. /package/src/font-size-picker/test/{font-size-picker-toggle-group.tsx → font-size-picker-toggle-group.jsdom.test.tsx} +0 -0
  195. /package/src/font-size-picker/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  196. /package/src/form-file-upload/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  197. /package/src/form-toggle/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  198. /package/src/form-toggle/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  199. /package/src/form-token-field/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  200. /package/src/gradient-picker/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  201. /package/src/grid/test/{grid.tsx → grid.jsdom.test.tsx} +0 -0
  202. /package/src/guide/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  203. /package/src/h-stack/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  204. /package/src/h-stack/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  205. /package/src/heading/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  206. /package/src/heading/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  207. /package/src/higher-order/with-fallback-styles/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  208. /package/src/higher-order/with-filters/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  209. /package/src/higher-order/with-filters/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  210. /package/src/higher-order/with-focus-outside/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  211. /package/src/higher-order/with-focus-return/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  212. /package/src/higher-order/with-notices/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  213. /package/src/higher-order/with-spoken-messages/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  214. /package/src/input-control/test/__snapshots__/{index.js.snap → index.jsdom.test.tsx.snap} +0 -0
  215. /package/src/isolated-event-container/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  216. /package/src/item-group/test/__snapshots__/{index.js.snap → index.jsdom.test.tsx.snap} +0 -0
  217. /package/src/item-group/test/{index.js → index.jsdom.test.tsx} +0 -0
  218. /package/src/keyboard-shortcuts/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  219. /package/src/menu/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  220. /package/src/menu-group/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  221. /package/src/menu-item/test/__snapshots__/{index.js.snap → index.jsdom.test.tsx.snap} +0 -0
  222. /package/src/menu-item/test/{index.js → index.jsdom.test.tsx} +0 -0
  223. /package/src/modal/test/{aria-helper.ts → aria-helper.jsdom.test.ts} +0 -0
  224. /package/src/modal/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  225. /package/src/navigable-container/test/{navigable-menu.tsx → navigable-menu.jsdom.test.tsx} +0 -0
  226. /package/src/navigable-container/test/{tababble-container.tsx → tababble-container.jsdom.test.tsx} +0 -0
  227. /package/src/navigator/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  228. /package/src/notice/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  229. /package/src/notice/test/{list.tsx → list.jsdom.test.tsx} +0 -0
  230. /package/src/number-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  231. /package/src/palette-edit/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  232. /package/src/panel/test/__snapshots__/{body.tsx.snap → body.jsdom.test.tsx.snap} +0 -0
  233. /package/src/panel/test/__snapshots__/{header.tsx.snap → header.jsdom.test.tsx.snap} +0 -0
  234. /package/src/panel/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  235. /package/src/panel/test/__snapshots__/{row.tsx.snap → row.jsdom.test.tsx.snap} +0 -0
  236. /package/src/panel/test/{body.tsx → body.jsdom.test.tsx} +0 -0
  237. /package/src/panel/test/{header.tsx → header.jsdom.test.tsx} +0 -0
  238. /package/src/panel/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  239. /package/src/panel/test/{row.tsx → row.jsdom.test.tsx} +0 -0
  240. /package/src/placeholder/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  241. /package/src/progress-bar/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  242. /package/src/radio-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  243. /package/src/range-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  244. /package/src/resizable-box/resize-tooltip/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  245. /package/src/resizable-box/resize-tooltip/test/{label.tsx → label.jsdom.test.tsx} +0 -0
  246. /package/src/sandbox/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  247. /package/src/scroll-lock/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  248. /package/src/scrollable/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  249. /package/src/search-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  250. /package/src/select-control/test/__snapshots__/{select-control.tsx.snap → select-control.jsdom.test.tsx.snap} +0 -0
  251. /package/src/select-control/test/{select-control.tsx → select-control.jsdom.test.tsx} +0 -0
  252. /package/src/shortcut/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  253. /package/src/shortcut/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  254. /package/src/slot-fill/test/__snapshots__/{slot.js.snap → slot.jsdom.test.tsx.snap} +0 -0
  255. /package/src/spacer/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  256. /package/src/spacer/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  257. /package/src/style-provider/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  258. /package/src/surface/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  259. /package/src/tab-panel/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  260. /package/src/tabs/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  261. /package/src/text/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  262. /package/src/text/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  263. /package/src/text-control/test/{text-control.tsx → text-control.jsdom.test.tsx} +0 -0
  264. /package/src/text-highlight/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  265. /package/src/toggle-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  266. /package/src/toggle-group-control/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  267. /package/src/toggle-group-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  268. /package/src/toolbar/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  269. /package/src/toolbar/test/{toolbar-group.tsx → toolbar-group.jsdom.test.tsx} +0 -0
  270. /package/src/tooltip/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  271. /package/src/tree-grid/test/__snapshots__/{cell.tsx.snap → cell.jsdom.test.tsx.snap} +0 -0
  272. /package/src/tree-grid/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  273. /package/src/tree-grid/test/__snapshots__/{roving-tab-index-item.tsx.snap → roving-tab-index-item.jsdom.test.tsx.snap} +0 -0
  274. /package/src/tree-grid/test/__snapshots__/{roving-tab-index.tsx.snap → roving-tab-index.jsdom.test.tsx.snap} +0 -0
  275. /package/src/tree-grid/test/__snapshots__/{row.tsx.snap → row.jsdom.test.tsx.snap} +0 -0
  276. /package/src/tree-grid/test/{cell.tsx → cell.jsdom.test.tsx} +0 -0
  277. /package/src/tree-grid/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  278. /package/src/tree-grid/test/{roving-tab-index-item.tsx → roving-tab-index-item.jsdom.test.tsx} +0 -0
  279. /package/src/tree-grid/test/{roving-tab-index.tsx → roving-tab-index.jsdom.test.tsx} +0 -0
  280. /package/src/tree-grid/test/{row.tsx → row.jsdom.test.tsx} +0 -0
  281. /package/src/truncate/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  282. /package/src/unit-control/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  283. /package/src/utils/test/{polymorphic-element.tsx → polymorphic-element.jsdom.test.tsx} +0 -0
  284. /package/src/v-stack/test/__snapshots__/{index.tsx.snap → index.jsdom.test.tsx.snap} +0 -0
  285. /package/src/v-stack/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  286. /package/src/validated-form-controls/test/{content-editable-control.tsx → content-editable-control.jsdom.test.tsx} +0 -0
  287. /package/src/validated-form-controls/test/{custom-select-control.tsx → custom-select-control.jsdom.test.tsx} +0 -0
  288. /package/src/validated-form-controls/test/{input-control.tsx → input-control.jsdom.test.tsx} +0 -0
  289. /package/src/validated-form-controls/test/{range-control.tsx → range-control.jsdom.test.tsx} +0 -0
  290. /package/src/validated-form-controls/test/{textarea-control.tsx → textarea-control.jsdom.test.tsx} +0 -0
  291. /package/src/view/test/__snapshots__/{index.js.snap → index.jsdom.test.tsx.snap} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 40.1.0-next.0 (2026-09-03)
6
+
7
+ ### Enhancements
8
+
9
+ - `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
+ - `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
+ - `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)).
12
+
13
+ ### Bug Fixes
14
+
15
+ - `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
+ - `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
+ - `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)).
18
+ - `Snackbar`: Restart the auto-dismiss timer when a notice is recreated with the same ID during removal ([#81764](https://github.com/WordPress/gutenberg/pull/81764)).
19
+ - `ToolsPanel`: Stop a panel item whose `panelId` doesn't match the panel from writing its value into that panel's menu, which could leave an orphaned entry in the dropdown ([#82127](https://github.com/WordPress/gutenberg/pull/82127)).
20
+ - `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
+ - `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
+ - `Tip`: Preserve the intended yellow color after its icon became stroke-based. ([#78808](https://github.com/WordPress/gutenberg/pull/78808))
23
+
24
+ ### Internal
25
+
26
+ - Migrate JSX files to TypeScript and remove their ESLint filename suppressions ([#82132](https://github.com/WordPress/gutenberg/pull/82132)).
27
+ - Use the `.jsx` extension for JavaScript source files that contain JSX ([#80990](https://github.com/WordPress/gutenberg/pull/80990)).
28
+ - Remove tsconfig project references to packages that are not dependencies ([#82106](https://github.com/WordPress/gutenberg/pull/82106)).
29
+ - `ToolsPanel`: Cut the render cascade panel items set off when the selected block changes, and keep a default control resettable when `Reset all` leaves its value in place ([#82180](https://github.com/WordPress/gutenberg/pull/82180)).
30
+
5
31
  ## 40.0.0 (2026-08-26)
6
32
 
7
33
  ### Breaking Changes
@@ -40,7 +40,8 @@ var import_compose = require("@wordpress/compose");
40
40
  var import_border_box_control_linked_button = __toESM(require("../border-box-control-linked-button/index.cjs"));
41
41
  var import_border_box_control_split_controls = __toESM(require("../border-box-control-split-controls/index.cjs"));
42
42
  var import_border_control = require("../../border-control/index.cjs");
43
- var import_base_control_styles = require("../../base-control/styles/base-control-styles.cjs");
43
+ var import_base_control = __toESM(require("../../base-control/index.cjs"));
44
+ var import_grid = require("../../grid/index.cjs");
44
45
  var import_view = require("../../view/index.cjs");
45
46
  var import_visually_hidden = require("../../visually-hidden/index.cjs");
46
47
  var import_context = require("../../context/index.cjs");
@@ -48,6 +49,7 @@ var import_hook = require("./hook.cjs");
48
49
  var import_jsx_runtime = require("react/jsx-runtime");
49
50
  var BorderLabel = (props) => {
50
51
  const {
52
+ id,
51
53
  label,
52
54
  hideLabelFromVision
53
55
  } = props;
@@ -55,9 +57,11 @@ var BorderLabel = (props) => {
55
57
  return null;
56
58
  }
57
59
  return hideLabelFromVision ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_visually_hidden.VisuallyHidden, {
58
- as: "label",
60
+ as: "span",
61
+ id,
59
62
  children: label
60
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_base_control_styles.StyledLabel, {
63
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_base_control.default.VisualLabel, {
64
+ id,
61
65
  children: label
62
66
  });
63
67
  };
@@ -70,6 +74,8 @@ var UnconnectedBorderBoxControl = (props, forwardedRef) => {
70
74
  enableAlpha,
71
75
  enableStyle,
72
76
  hasMixedBorders,
77
+ hasVisibleLabel,
78
+ headerClassName,
73
79
  hideLabelFromVision,
74
80
  isLinked,
75
81
  label,
@@ -83,8 +89,12 @@ var UnconnectedBorderBoxControl = (props, forwardedRef) => {
83
89
  toggleLinked,
84
90
  wrapperClassName,
85
91
  __experimentalIsRenderedInSidebar,
92
+ "aria-label": ariaLabel,
93
+ "aria-labelledby": ariaLabelledBy,
86
94
  ...otherProps
87
95
  } = (0, import_hook.useBorderBoxControl)(props);
96
+ const generatedLabelId = (0, import_compose.useInstanceId)(BorderBoxControl, "border-box-control-label");
97
+ const labelId = label && !ariaLabel && !ariaLabelledBy ? generatedLabelId : void 0;
88
98
  const [popoverAnchor, setPopoverAnchor] = (0, import_element.useState)(null);
89
99
  const popoverProps = (0, import_element.useMemo)(() => popoverPlacement ? {
90
100
  placement: popoverPlacement,
@@ -95,9 +105,31 @@ var UnconnectedBorderBoxControl = (props, forwardedRef) => {
95
105
  const mergedRef = (0, import_compose.useMergeRefs)([setPopoverAnchor, forwardedRef]);
96
106
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_view.View, {
97
107
  className,
108
+ role: label || ariaLabel || ariaLabelledBy ? "group" : void 0,
109
+ "aria-label": ariaLabel,
110
+ "aria-labelledby": ariaLabelledBy ?? labelId,
98
111
  ...otherProps,
99
112
  ref: mergedRef,
100
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BorderLabel, {
113
+ children: [hasVisibleLabel ? (
114
+ // The toggle shares the label's row so that it lines up with
115
+ // the equivalent toggle on sibling controls, e.g. the border
116
+ // radius one.
117
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_grid.Grid, {
118
+ className: headerClassName,
119
+ columns: 2,
120
+ templateColumns: "1fr min-content",
121
+ alignment: "center",
122
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BorderLabel, {
123
+ id: labelId,
124
+ label,
125
+ hideLabelFromVision
126
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_border_box_control_linked_button.default, {
127
+ onClick: toggleLinked,
128
+ isLinked
129
+ })]
130
+ })
131
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BorderLabel, {
132
+ id: labelId,
101
133
  label,
102
134
  hideLabelFromVision
103
135
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_view.View, {
@@ -127,7 +159,7 @@ var UnconnectedBorderBoxControl = (props, forwardedRef) => {
127
159
  popoverOffset,
128
160
  value: splitValue,
129
161
  __experimentalIsRenderedInSidebar
130
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_border_box_control_linked_button.default, {
162
+ }), !hasVisibleLabel && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_border_box_control_linked_button.default, {
131
163
  onClick: toggleLinked,
132
164
  isLinked
133
165
  })]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/border-box-control/border-box-control/component.tsx"],
4
- "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\nimport BorderBoxControlLinkedButton from '../border-box-control-linked-button';\nimport BorderBoxControlSplitControls from '../border-box-control-split-controls';\nimport { BorderControl } from '../../border-control';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { contextConnect } from '../../context';\nimport { useBorderBoxControl } from './hook';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst BorderLabel = props => {\n const {\n label,\n hideLabelFromVision\n } = props;\n if (!label) {\n return null;\n }\n return hideLabelFromVision ? /*#__PURE__*/_jsx(VisuallyHidden, {\n as: \"label\",\n children: label\n }) : /*#__PURE__*/_jsx(StyledLabel, {\n children: label\n });\n};\nconst UnconnectedBorderBoxControl = (props, forwardedRef) => {\n const {\n className,\n colors,\n disableCustomColors,\n disableUnits,\n enableAlpha,\n enableStyle,\n hasMixedBorders,\n hideLabelFromVision,\n isLinked,\n label,\n linkedControlClassName,\n linkedValue,\n onLinkedChange,\n onSplitChange,\n popoverPlacement,\n popoverOffset,\n splitValue,\n toggleLinked,\n wrapperClassName,\n __experimentalIsRenderedInSidebar,\n ...otherProps\n } = useBorderBoxControl(props);\n\n // Use internal state instead of a ref to make sure that the component\n // re-renders when the popover's anchor updates.\n const [popoverAnchor, setPopoverAnchor] = useState(null);\n\n // Memoize popoverProps to avoid returning a new object every time.\n const popoverProps = useMemo(() => popoverPlacement ? {\n placement: popoverPlacement,\n offset: popoverOffset,\n anchor: popoverAnchor,\n shift: true\n } : undefined, [popoverPlacement, popoverOffset, popoverAnchor]);\n const mergedRef = useMergeRefs([setPopoverAnchor, forwardedRef]);\n return /*#__PURE__*/_jsxs(View, {\n className: className,\n ...otherProps,\n ref: mergedRef,\n children: [/*#__PURE__*/_jsx(BorderLabel, {\n label: label,\n hideLabelFromVision: hideLabelFromVision\n }), /*#__PURE__*/_jsxs(View, {\n className: wrapperClassName,\n children: [isLinked ? /*#__PURE__*/_jsx(BorderControl, {\n className: linkedControlClassName,\n colors: colors,\n disableUnits: disableUnits,\n disableCustomColors: disableCustomColors,\n enableAlpha: enableAlpha,\n enableStyle: enableStyle,\n onChange: onLinkedChange,\n placeholder: hasMixedBorders ? __('Mixed') : undefined,\n __unstablePopoverProps: popoverProps,\n shouldSanitizeBorder: false // This component will handle that.\n ,\n value: linkedValue,\n withSlider: true,\n width: \"116px\",\n __experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar\n }) : /*#__PURE__*/_jsx(BorderBoxControlSplitControls, {\n colors: colors,\n disableCustomColors: disableCustomColors,\n enableAlpha: enableAlpha,\n enableStyle: enableStyle,\n onChange: onSplitChange,\n popoverPlacement: popoverPlacement,\n popoverOffset: popoverOffset,\n value: splitValue,\n __experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar\n }), /*#__PURE__*/_jsx(BorderBoxControlLinkedButton, {\n onClick: toggleLinked,\n isLinked: isLinked\n })]\n })]\n });\n};\n\n/**\n * An input control for the color, style, and width of the border of a box. The\n * border can be customized as a whole, or individually for each side of the box.\n *\n * ```jsx\n * import { BorderBoxControl } from '@wordpress/components';\n * import { __ } from '@wordpress/i18n';\n *\n * const colors = [\n * \t{ name: 'Blue 20', color: '#72aee6' },\n * \t// ...\n * ];\n *\n * const MyBorderBoxControl = () => {\n * \tconst defaultBorder = {\n * \t\tcolor: '#72aee6',\n * \t\tstyle: 'dashed',\n * \t\twidth: '1px',\n * \t};\n * \tconst [ borders, setBorders ] = useState( {\n * \t\ttop: defaultBorder,\n * \t\tright: defaultBorder,\n * \t\tbottom: defaultBorder,\n * \t\tleft: defaultBorder,\n * \t} );\n * \tconst onChange = ( newBorders ) => setBorders( newBorders );\n *\n * \treturn (\n * \t\t<BorderBoxControl\n * \t\t\tcolors={ colors }\n * \t\t\tlabel={ __( 'Borders' ) }\n * \t\t\tonChange={ onChange }\n * \t\t\tvalue={ borders }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const BorderBoxControl = contextConnect(UnconnectedBorderBoxControl, 'BorderBoxControl');\nexport default BorderBoxControl;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,qBAAkC;AAClC,qBAA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3B,WAAW;AAAA,MACX,UAAU,CAAC,WAAwB,uCAAAD,KAAK,qCAAe;AAAA,QACrD,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV,aAAa,sBAAkB,gBAAG,OAAO,IAAI;AAAA,QAC7C,wBAAwB;AAAA,QACxB,sBAAsB;AAAA,QAEtB,OAAO;AAAA,QACP,YAAY;AAAA,QACZ,OAAO;AAAA,QACP;AAAA,MACF,CAAC,IAAiB,uCAAAA,KAAK,yCAAAE,SAA+B;AAAA,QACpD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP;AAAA,MACF,CAAC,GAAgB,uCAAAF,KAAK,wCAAAG,SAA8B;AAAA,QAClD,SAAS;AAAA,QACT;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAwCO,IAAM,uBAAmB,+BAAe,6BAA6B,kBAAkB;AAC9F,IAAO,oBAAQ;",
6
- "names": ["_jsx", "_jsxs", "BorderBoxControlSplitControls", "BorderBoxControlLinkedButton"]
4
+ "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport BorderBoxControlLinkedButton from '../border-box-control-linked-button';\nimport BorderBoxControlSplitControls from '../border-box-control-split-controls';\nimport { BorderControl } from '../../border-control';\nimport BaseControl from '../../base-control';\nimport { Grid } from '../../grid';\nimport { View } from '../../view';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { contextConnect } from '../../context';\nimport { useBorderBoxControl } from './hook';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst BorderLabel = props => {\n const {\n id,\n label,\n hideLabelFromVision\n } = props;\n if (!label) {\n return null;\n }\n\n // The visible label is rendered as `BaseControl.VisualLabel` so it carries\n // the stable `.components-base-control__label` className consumers style\n // against; `StyledLabel` is an emotion component with a generated one.\n return hideLabelFromVision ? /*#__PURE__*/_jsx(VisuallyHidden, {\n as: \"span\",\n id: id,\n children: label\n }) : /*#__PURE__*/_jsx(BaseControl.VisualLabel, {\n id: id,\n children: label\n });\n};\nconst UnconnectedBorderBoxControl = (props, forwardedRef) => {\n const {\n className,\n colors,\n disableCustomColors,\n disableUnits,\n enableAlpha,\n enableStyle,\n hasMixedBorders,\n hasVisibleLabel,\n headerClassName,\n hideLabelFromVision,\n isLinked,\n label,\n linkedControlClassName,\n linkedValue,\n onLinkedChange,\n onSplitChange,\n popoverPlacement,\n popoverOffset,\n splitValue,\n toggleLinked,\n wrapperClassName,\n __experimentalIsRenderedInSidebar,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...otherProps\n } = useBorderBoxControl(props);\n\n // The label names the group of border controls rather than a single input,\n // so it is associated via `aria-labelledby` instead of `htmlFor`.\n const generatedLabelId = useInstanceId(BorderBoxControl, 'border-box-control-label');\n\n // A consumer-provided accessible name takes precedence, so the generated\n // relationship is only used as a fallback. Where an external name wins,\n // the unused ID is left off the internal label. Empty values are treated\n // as absent, matching the accessible name computation, which skips an\n // empty `aria-label` or `aria-labelledby` rather than resolving a name\n // from it.\n const labelId = label && !ariaLabel && !ariaLabelledBy ? generatedLabelId : undefined;\n\n // Use internal state instead of a ref to make sure that the component\n // re-renders when the popover's anchor updates.\n const [popoverAnchor, setPopoverAnchor] = useState(null);\n\n // Memoize popoverProps to avoid returning a new object every time.\n const popoverProps = useMemo(() => popoverPlacement ? {\n placement: popoverPlacement,\n offset: popoverOffset,\n anchor: popoverAnchor,\n shift: true\n } : undefined, [popoverPlacement, popoverOffset, popoverAnchor]);\n const mergedRef = useMergeRefs([setPopoverAnchor, forwardedRef]);\n return /*#__PURE__*/_jsxs(View, {\n className: className\n // Whichever naming source wins, it describes the border controls\n // as a whole, so the wrapper needs a role for that accessible\n // name to attach to. Without a name there is no group to expose.\n ,\n role: label || ariaLabel || ariaLabelledBy ? 'group' : undefined,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy ?? labelId,\n ...otherProps,\n ref: mergedRef,\n children: [hasVisibleLabel ?\n /*#__PURE__*/\n // The toggle shares the label's row so that it lines up with\n // the equivalent toggle on sibling controls, e.g. the border\n // radius one.\n _jsxs(Grid, {\n className: headerClassName,\n columns: 2,\n templateColumns: \"1fr min-content\",\n alignment: \"center\",\n children: [/*#__PURE__*/_jsx(BorderLabel, {\n id: labelId,\n label: label,\n hideLabelFromVision: hideLabelFromVision\n }), /*#__PURE__*/_jsx(BorderBoxControlLinkedButton, {\n onClick: toggleLinked,\n isLinked: isLinked\n })]\n }) : /*#__PURE__*/_jsx(BorderLabel, {\n id: labelId,\n label: label,\n hideLabelFromVision: hideLabelFromVision\n }), /*#__PURE__*/_jsxs(View, {\n className: wrapperClassName,\n children: [isLinked ? /*#__PURE__*/_jsx(BorderControl, {\n className: linkedControlClassName,\n colors: colors,\n disableUnits: disableUnits,\n disableCustomColors: disableCustomColors,\n enableAlpha: enableAlpha,\n enableStyle: enableStyle,\n onChange: onLinkedChange,\n placeholder: hasMixedBorders ? __('Mixed') : undefined,\n __unstablePopoverProps: popoverProps,\n shouldSanitizeBorder: false // This component will handle that.\n ,\n value: linkedValue,\n withSlider: true,\n width: \"116px\",\n __experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar\n }) : /*#__PURE__*/_jsx(BorderBoxControlSplitControls, {\n colors: colors,\n disableCustomColors: disableCustomColors,\n enableAlpha: enableAlpha,\n enableStyle: enableStyle,\n onChange: onSplitChange,\n popoverPlacement: popoverPlacement,\n popoverOffset: popoverOffset,\n value: splitValue,\n __experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar\n }), !hasVisibleLabel && /*#__PURE__*/_jsx(BorderBoxControlLinkedButton, {\n onClick: toggleLinked,\n isLinked: isLinked\n })]\n })]\n });\n};\n\n/**\n * An input control for the color, style, and width of the border of a box. The\n * border can be customized as a whole, or individually for each side of the box.\n *\n * The controls are exposed as a group named by the `label` prop. Passing\n * `aria-labelledby` or `aria-label` names the group instead, taking precedence\n * over `label`; with none of the three, the wrapper is not exposed as a group.\n *\n * ```jsx\n * import { BorderBoxControl } from '@wordpress/components';\n * import { __ } from '@wordpress/i18n';\n *\n * const colors = [\n * \t{ name: 'Blue 20', color: '#72aee6' },\n * \t// ...\n * ];\n *\n * const MyBorderBoxControl = () => {\n * \tconst defaultBorder = {\n * \t\tcolor: '#72aee6',\n * \t\tstyle: 'dashed',\n * \t\twidth: '1px',\n * \t};\n * \tconst [ borders, setBorders ] = useState( {\n * \t\ttop: defaultBorder,\n * \t\tright: defaultBorder,\n * \t\tbottom: defaultBorder,\n * \t\tleft: defaultBorder,\n * \t} );\n * \tconst onChange = ( newBorders ) => setBorders( newBorders );\n *\n * \treturn (\n * \t\t<BorderBoxControl\n * \t\t\tcolors={ colors }\n * \t\t\tlabel={ __( 'Borders' ) }\n * \t\t\tonChange={ onChange }\n * \t\t\tvalue={ borders }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const BorderBoxControl = contextConnect(UnconnectedBorderBoxControl, 'BorderBoxControl');\nexport default BorderBoxControl;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,qBAAkC;AAClC,qBAA4C;AAC5C,8CAAyC;AACzC,+CAA0C;AAC1C,4BAA8B;AAC9B,0BAAwB;AACxB,kBAAqB;AACrB,kBAAqB;AACrB,6BAA+B;AAC/B,qBAA+B;AAC/B,kBAAoC;AACpC,yBAA2C;AAC3C,IAAM,cAAc,WAAS;AAC3B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AAKA,SAAO,sBAAmC,uCAAAA,KAAK,uC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AA,QACjB,WAAW;AAAA,QACX,UAAU,CAAc,uCAAAF,KAAK,aAAa;AAAA,UACxC,IAAI;AAAA,UACJ;AAAA,UACA;AAAA,QACF,CAAC,GAAgB,uCAAAA,KAAK,wCAAAG,SAA8B;AAAA,UAClD,SAAS;AAAA,UACT;AAAA,QACF,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,QAAiB,uCAAAH,KAAK,aAAa;AAAA,MAClC,IAAI;AAAA,MACJ;AAAA,MACA;AAAA,IACF,CAAC,GAAgB,uCAAAE,MAAM,kBAAM;AAAA,MAC3B,WAAW;AAAA,MACX,UAAU,CAAC,WAAwB,uCAAAF,KAAK,qCAAe;AAAA,QACrD,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV,aAAa,sBAAkB,gBAAG,OAAO,IAAI;AAAA,QAC7C,wBAAwB;AAAA,QACxB,sBAAsB;AAAA,QAEtB,OAAO;AAAA,QACP,YAAY;AAAA,QACZ,OAAO;AAAA,QACP;AAAA,MACF,CAAC,IAAiB,uCAAAA,KAAK,yCAAAI,SAA+B;AAAA,QACpD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP;AAAA,MACF,CAAC,GAAG,CAAC,mBAAgC,uCAAAJ,KAAK,wCAAAG,SAA8B;AAAA,QACtE,SAAS;AAAA,QACT;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AA4CO,IAAM,uBAAmB,+BAAe,6BAA6B,kBAAkB;AAC9F,IAAO,oBAAQ;",
6
+ "names": ["_jsx", "BaseControl", "_jsxs", "BorderBoxControlLinkedButton", "BorderBoxControlSplitControls"]
7
7
  }
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // packages/components/src/border-box-control/border-box-control/hook.ts
@@ -23,6 +33,7 @@ __export(hook_exports, {
23
33
  useBorderBoxControl: () => useBorderBoxControl
24
34
  });
25
35
  module.exports = __toCommonJS(hook_exports);
36
+ var import_clsx = __toESM(require("clsx"));
26
37
  var import_element = require("@wordpress/element");
27
38
 
28
39
  // packages/style-runtime/src/index.ts
@@ -104,9 +115,9 @@ function registerStyle(hash, css) {
104
115
 
105
116
  // packages/components/src/border-box-control/style.module.scss
106
117
  if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
107
- registerStyle("67ff33c72d", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._48f63719b9dc7e1a__wrapper{position:relative}._902e774d37b6698b__linked-button{inset-inline-end:0;line-height:0;position:absolute;top:8px}._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("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}");
108
119
  }
109
- var style_module_default = { "linked-border-control": "fa6e6c2331986855__linked-border-control", "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
+ 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" };
110
121
 
111
122
  // packages/components/src/border-box-control/border-box-control/hook.ts
112
123
  var import_utils = require("../utils.cjs");
@@ -118,6 +129,8 @@ function useBorderBoxControl(props) {
118
129
  onChange,
119
130
  enableAlpha = false,
120
131
  enableStyle = true,
132
+ hideLabelFromVision,
133
+ label,
121
134
  value,
122
135
  __experimentalIsRenderedInSidebar = false,
123
136
  // Deprecated props, no longer used.
@@ -125,6 +138,7 @@ function useBorderBoxControl(props) {
125
138
  __next40pxDefaultSize: _next40pxDefaultSize,
126
139
  ...otherProps
127
140
  } = (0, import_context.useContextSystem)(props, "BorderBoxControl");
141
+ const hasVisibleLabel = !!label && !hideLabelFromVision;
128
142
  const mixedBorders = (0, import_utils.hasMixedBorders)(value);
129
143
  const splitBorders = (0, import_utils.hasSplitBorders)(value);
130
144
  const linkedValue = splitBorders ? (0, import_utils.getCommonBorder)(value) : value;
@@ -175,12 +189,19 @@ function useBorderBoxControl(props) {
175
189
  onChange(newBorder);
176
190
  }
177
191
  };
178
- const linkedControlClassName = style_module_default["linked-border-control"];
192
+ const linkedControlClassName = (0, import_clsx.default)(style_module_default["linked-border-control"], {
193
+ [style_module_default["linked-border-control-full-width"]]: hasVisibleLabel
194
+ });
179
195
  const wrapperClassName = style_module_default.wrapper;
196
+ const headerClassName = style_module_default.header;
180
197
  return {
181
198
  ...otherProps,
182
199
  className,
183
200
  colors,
201
+ hasVisibleLabel,
202
+ headerClassName,
203
+ hideLabelFromVision,
204
+ label,
184
205
  disableUnits: mixedBorders && !hasWidthValue,
185
206
  enableAlpha,
186
207
  enableStyle,
@@ -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 { 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 value,\n __experimentalIsRenderedInSidebar = false,\n // Deprecated props, no longer used.\n size: _size,\n __next40pxDefaultSize: _next40pxDefaultSize,\n ...otherProps\n } = useContextSystem(props, 'BorderBoxControl');\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 const linkedControlClassName = styles['linked-border-control'];\n const wrapperClassName = styles.wrapper;\n return {\n ...otherProps,\n className,\n colors,\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(\"67ff33c72d\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._48f63719b9dc7e1a__wrapper{position:relative}._902e774d37b6698b__linked-button{inset-inline-end:0;line-height:0;position:absolute;top:8px}._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\",\"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,qBAAyB;;;ACAzB,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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AAG;AAAA,MACL;AAAA,MACA,QAAQ;AAAA,QACN,GAAG,OAAO;AAAA,QACV,GAAG;AAAA,MACL;AAAA,MACA,MAAM;AAAA,QACJ,GAAG,OAAO;AAAA,QACV,GAAG;AAAA,MACL;AAAA,IACF;AACA,YAAI,8BAAgB,cAAc,GAAG;AACnC,aAAO,SAAS,cAAc;AAAA,IAChC;AACA,UAAM,qBAAiB,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;AACA,QAAM,yBAAyB,qBAAO,uBAAuB;AAC7D,QAAM,mBAAmB,qBAAO;AAChC,SAAO;AAAA,IACL,GAAG;AAAA,IACH;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
- "names": []
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,OAAO,aAAa,aAAa;AACnC,qBAAiB,QAAQ;AA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AAA,IACA,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
6
+ "names": ["clsx"]
7
7
  }
@@ -114,9 +114,9 @@ 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("67ff33c72d", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._48f63719b9dc7e1a__wrapper{position:relative}._902e774d37b6698b__linked-button{inset-inline-end:0;line-height:0;position:absolute;top:8px}._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("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
118
  }
119
- var style_module_default = { "linked-border-control": "fa6e6c2331986855__linked-border-control", "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" };
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
 
121
121
  // packages/components/src/border-box-control/border-box-control-linked-button/hook.ts
122
122
  var import_context = require("../../context/index.cjs");
@@ -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(\"67ff33c72d\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._48f63719b9dc7e1a__wrapper{position:relative}._902e774d37b6698b__linked-button{inset-inline-end:0;line-height:0;position:absolute;top:8px}._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\",\"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,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,0BAA0B,gBAAgB,IAAI,GAAG;AACnD,mBAAe,IAAI,IAAI;AACvB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AAA,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(\"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,E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;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;",
6
6
  "names": ["clsx"]
7
7
  }
@@ -114,9 +114,9 @@ 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("67ff33c72d", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._48f63719b9dc7e1a__wrapper{position:relative}._902e774d37b6698b__linked-button{inset-inline-end:0;line-height:0;position:absolute;top:8px}._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("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
118
  }
119
- var style_module_default = { "linked-border-control": "fa6e6c2331986855__linked-border-control", "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" };
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
 
121
121
  // packages/components/src/border-box-control/border-box-control-split-controls/hook.ts
122
122
  var import_context = require("../../context/index.cjs");
@@ -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(\"67ff33c72d\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._48f63719b9dc7e1a__wrapper{position:relative}._902e774d37b6698b__linked-button{inset-inline-end:0;line-height:0;position:absolute;top:8px}._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\",\"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,IA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MAAM;AACX,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,4xBAA4xB;AACzzB;AACA,IAAO,uBAAQ,EAAC,yBAAwB,2CAA0C,WAAU,8BAA6B,iBAAgB,oCAAmC,cAAa,iCAAgC,kBAAiB,oCAAmC,2BAA0B,6CAA4C,wBAAuB,yCAAwC;;;AFFlZ,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(\"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,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A,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;",
6
6
  "names": ["clsx"]
7
7
  }
@@ -114,9 +114,9 @@ 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("67ff33c72d", ".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._48f63719b9dc7e1a__wrapper{position:relative}._902e774d37b6698b__linked-button{inset-inline-end:0;line-height:0;position:absolute;top:8px}._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("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
118
  }
119
- var style_module_default = { "linked-border-control": "fa6e6c2331986855__linked-border-control", "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" };
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
 
121
121
  // packages/components/src/border-box-control/border-box-control-visualizer/hook.ts
122
122
  var import_utils = require("../../utils/index.cjs");
@@ -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(\"67ff33c72d\", \".fa6e6c2331986855__linked-border-control.fa6e6c2331986855__linked-border-control{flex:1;margin-inline-end:24px}._48f63719b9dc7e1a__wrapper{position:relative}._902e774d37b6698b__linked-button{inset-inline-end:0;line-height:0;position:absolute;top:8px}._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\",\"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,WAAW;AAC3B,MAAI,iBAAiB,QAAQ,eAAe,IAAI,cAAc;AAC9D,MAAI,CAAC,gBAAgB;AACnB,qBAAiB,oBAAI,IAAI;AACzB,YAAQ,e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wC;;;AFFlZ,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(\"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;AA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AA,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
  }
@@ -158,7 +158,7 @@ function SinglePalette({
158
158
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_circular_option_picker.default.Option, {
159
159
  isSelected,
160
160
  selectedIconProps: isSelected ? {
161
- fill: colordColor.contrast() > colordColor.contrast("#000") ? "#fff" : "#000"
161
+ color: colordColor.contrast() > colordColor.contrast("#000") ? "#fff" : "#000"
162
162
  } : {},
163
163
  tooltipText: name || // translators: %s: color hex code e.g: "#f00".
164
164
  (0, import_i18n.sprintf)((0, import_i18n.__)("Color code: %s"), color),