@wordpress/components 39.0.0 → 40.1.1-next.v.202608281122.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1121) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/CONTRIBUTING.md +7 -8
  3. package/build/base-control/styles/base-control-styles.cjs +150 -45
  4. package/build/base-control/styles/base-control-styles.cjs.map +4 -4
  5. package/build/border-box-control/border-box-control/hook.cjs +88 -23
  6. package/build/border-box-control/border-box-control/hook.cjs.map +3 -3
  7. package/build/border-box-control/border-box-control-linked-button/hook.cjs +87 -8
  8. package/build/border-box-control/border-box-control-linked-button/hook.cjs.map +4 -4
  9. package/build/border-box-control/border-box-control-split-controls/hook.cjs +89 -16
  10. package/build/border-box-control/border-box-control-split-controls/hook.cjs.map +4 -4
  11. package/build/border-box-control/border-box-control-visualizer/hook.cjs +108 -8
  12. package/build/border-box-control/border-box-control-visualizer/hook.cjs.map +4 -4
  13. package/build/border-control/border-control/hook.cjs +89 -14
  14. package/build/border-control/border-control/hook.cjs.map +4 -4
  15. package/build/border-control/border-control-dropdown/component.cjs +2 -4
  16. package/build/border-control/border-control-dropdown/component.cjs.map +2 -2
  17. package/build/border-control/border-control-dropdown/hook.cjs +103 -27
  18. package/build/border-control/border-control-dropdown/hook.cjs.map +4 -4
  19. package/build/box-control/box-input-control.cjs +102 -10
  20. package/build/box-control/box-input-control.cjs.map +4 -4
  21. package/build/box-control/index.cjs +95 -5
  22. package/build/box-control/index.cjs.map +4 -4
  23. package/build/button/index.cjs +10 -3
  24. package/build/button/index.cjs.map +2 -2
  25. package/build/card/card-body/hook.cjs +4 -2
  26. package/build/card/card-body/hook.cjs.map +2 -2
  27. package/build/card/styles.cjs +31 -16
  28. package/build/card/styles.cjs.map +2 -2
  29. package/build/circular-option-picker/circular-option-picker-option.cjs +4 -5
  30. package/build/circular-option-picker/circular-option-picker-option.cjs.map +2 -2
  31. package/build/circular-option-picker/circular-option-picker.cjs +24 -6
  32. package/build/circular-option-picker/circular-option-picker.cjs.map +2 -2
  33. package/build/circular-option-picker/index.cjs +6 -2
  34. package/build/circular-option-picker/index.cjs.map +2 -2
  35. package/build/circular-option-picker/utils.cjs +38 -8
  36. package/build/circular-option-picker/utils.cjs.map +3 -3
  37. package/build/color-palette/index.cjs +103 -10
  38. package/build/color-palette/index.cjs.map +3 -3
  39. package/build/combobox-control/index.cjs +87 -2
  40. package/build/combobox-control/index.cjs.map +3 -3
  41. package/build/confirm-dialog/component.cjs +5 -1
  42. package/build/confirm-dialog/component.cjs.map +2 -2
  43. package/build/content-editable-control/index.cjs +1 -1
  44. package/build/content-editable-control/index.cjs.map +2 -2
  45. package/build/context/context-system-provider.cjs +1 -1
  46. package/build/context/context-system-provider.cjs.map +3 -3
  47. package/build/custom-gradient-picker/gradient-bar/control-points.cjs +14 -2
  48. package/build/custom-gradient-picker/gradient-bar/control-points.cjs.map +2 -2
  49. package/build/custom-gradient-picker/gradient-bar/index.cjs +2 -0
  50. package/build/custom-gradient-picker/gradient-bar/index.cjs.map +2 -2
  51. package/build/dropdown/dropdown-content-wrapper.cjs +102 -3
  52. package/build/dropdown/dropdown-content-wrapper.cjs.map +4 -4
  53. package/build/duotone-picker/custom-duotone-bar.cjs +1 -0
  54. package/build/duotone-picker/custom-duotone-bar.cjs.map +2 -2
  55. package/build/duotone-picker/duotone-picker.cjs +23 -14
  56. package/build/duotone-picker/duotone-picker.cjs.map +2 -2
  57. package/build/focal-point-picker/index.cjs +5 -3
  58. package/build/focal-point-picker/index.cjs.map +2 -2
  59. package/build/gradient-picker/index.cjs +105 -11
  60. package/build/gradient-picker/index.cjs.map +3 -3
  61. package/build/input-control/input-field.cjs +1 -0
  62. package/build/input-control/input-field.cjs.map +2 -2
  63. package/build/input-control/styles/input-control-styles.cjs +22 -22
  64. package/build/input-control/styles/input-control-styles.cjs.map +2 -2
  65. package/build/modal/index.cjs +1 -0
  66. package/build/modal/index.cjs.map +2 -2
  67. package/build/palette-edit/index.cjs +208 -33
  68. package/build/palette-edit/index.cjs.map +3 -3
  69. package/build/private-apis.cjs +1 -6
  70. package/build/private-apis.cjs.map +2 -2
  71. package/build/progress-bar/index.cjs +95 -7
  72. package/build/progress-bar/index.cjs.map +4 -4
  73. package/build/radio-control/index.cjs +1 -0
  74. package/build/radio-control/index.cjs.map +2 -2
  75. package/build/resizable-box/resize-tooltip/index.cjs +91 -4
  76. package/build/resizable-box/resize-tooltip/index.cjs.map +3 -3
  77. package/build/resizable-box/resize-tooltip/label.cjs +103 -6
  78. package/build/resizable-box/resize-tooltip/label.cjs.map +4 -4
  79. package/build/scrollable/hook.cjs +93 -6
  80. package/build/scrollable/hook.cjs.map +4 -4
  81. package/build/snackbar/index.cjs +8 -5
  82. package/build/snackbar/index.cjs.map +2 -2
  83. package/build/textarea-control/index.cjs +87 -3
  84. package/build/textarea-control/index.cjs.map +3 -3
  85. package/build/toggle-group-control/toggle-group-control/component.cjs +1 -1
  86. package/build/toggle-group-control/toggle-group-control/component.cjs.map +2 -2
  87. package/build/toggle-group-control/toggle-group-control-option-base/component.cjs +1 -1
  88. package/build/toggle-group-control/toggle-group-control-option-base/component.cjs.map +2 -2
  89. package/build/tools-panel/tools-panel-item/hook.cjs +2 -2
  90. package/build/tools-panel/tools-panel-item/hook.cjs.map +2 -2
  91. package/build/utils/config-values.cjs +0 -3
  92. package/build/utils/config-values.cjs.map +2 -2
  93. package/build/validated-form-controls/components/content-editable-control.cjs +3 -2
  94. package/build/validated-form-controls/components/content-editable-control.cjs.map +2 -2
  95. package/build/validated-form-controls/components/custom-select-control.cjs +3 -2
  96. package/build/validated-form-controls/components/custom-select-control.cjs.map +2 -2
  97. package/build/validated-form-controls/components/index.cjs +1 -9
  98. package/build/validated-form-controls/components/index.cjs.map +2 -2
  99. package/build/validated-form-controls/components/input-control.cjs +9 -2
  100. package/build/validated-form-controls/components/input-control.cjs.map +3 -3
  101. package/build/validated-form-controls/components/range-control.cjs +3 -2
  102. package/build/validated-form-controls/components/range-control.cjs.map +2 -2
  103. package/build/validated-form-controls/components/textarea-control.cjs +9 -2
  104. package/build/validated-form-controls/components/textarea-control.cjs.map +3 -3
  105. package/build/validated-form-controls/index.cjs +1 -3
  106. package/build/validated-form-controls/index.cjs.map +2 -2
  107. package/build/z-stack/component.cjs +105 -7
  108. package/build/z-stack/component.cjs.map +4 -4
  109. package/build-module/base-control/styles/base-control-styles.mjs +151 -46
  110. package/build-module/base-control/styles/base-control-styles.mjs.map +3 -3
  111. package/build-module/border-box-control/border-box-control/hook.mjs +89 -14
  112. package/build-module/border-box-control/border-box-control/hook.mjs.map +3 -3
  113. package/build-module/border-box-control/border-box-control-linked-button/hook.mjs +87 -8
  114. package/build-module/border-box-control/border-box-control-linked-button/hook.mjs.map +3 -3
  115. package/build-module/border-box-control/border-box-control-split-controls/hook.mjs +89 -16
  116. package/build-module/border-box-control/border-box-control-split-controls/hook.mjs.map +3 -3
  117. package/build-module/border-box-control/border-box-control-visualizer/hook.mjs +108 -8
  118. package/build-module/border-box-control/border-box-control-visualizer/hook.mjs.map +3 -3
  119. package/build-module/border-control/border-control/hook.mjs +90 -15
  120. package/build-module/border-control/border-control/hook.mjs.map +3 -3
  121. package/build-module/border-control/border-control-dropdown/component.mjs +2 -4
  122. package/build-module/border-control/border-control-dropdown/component.mjs.map +2 -2
  123. package/build-module/border-control/border-control-dropdown/hook.mjs +103 -27
  124. package/build-module/border-control/border-control-dropdown/hook.mjs.map +3 -3
  125. package/build-module/box-control/box-input-control.mjs +102 -10
  126. package/build-module/box-control/box-input-control.mjs.map +3 -3
  127. package/build-module/box-control/index.mjs +95 -5
  128. package/build-module/box-control/index.mjs.map +3 -3
  129. package/build-module/button/index.mjs +11 -4
  130. package/build-module/button/index.mjs.map +2 -2
  131. package/build-module/card/card-body/hook.mjs +4 -2
  132. package/build-module/card/card-body/hook.mjs.map +2 -2
  133. package/build-module/card/styles.mjs +30 -16
  134. package/build-module/card/styles.mjs.map +2 -2
  135. package/build-module/circular-option-picker/circular-option-picker-option.mjs +4 -5
  136. package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
  137. package/build-module/circular-option-picker/circular-option-picker.mjs +24 -6
  138. package/build-module/circular-option-picker/circular-option-picker.mjs.map +2 -2
  139. package/build-module/circular-option-picker/index.mjs +4 -2
  140. package/build-module/circular-option-picker/index.mjs.map +2 -2
  141. package/build-module/circular-option-picker/utils.mjs +25 -7
  142. package/build-module/circular-option-picker/utils.mjs.map +2 -2
  143. package/build-module/color-palette/index.mjs +104 -11
  144. package/build-module/color-palette/index.mjs.map +3 -3
  145. package/build-module/combobox-control/index.mjs +88 -3
  146. package/build-module/combobox-control/index.mjs.map +3 -3
  147. package/build-module/confirm-dialog/component.mjs +5 -1
  148. package/build-module/confirm-dialog/component.mjs.map +2 -2
  149. package/build-module/content-editable-control/index.mjs +1 -1
  150. package/build-module/content-editable-control/index.mjs.map +2 -2
  151. package/build-module/context/context-system-provider.mjs +1 -1
  152. package/build-module/context/context-system-provider.mjs.map +3 -3
  153. package/build-module/custom-gradient-picker/gradient-bar/control-points.mjs +14 -2
  154. package/build-module/custom-gradient-picker/gradient-bar/control-points.mjs.map +2 -2
  155. package/build-module/custom-gradient-picker/gradient-bar/index.mjs +2 -0
  156. package/build-module/custom-gradient-picker/gradient-bar/index.mjs.map +2 -2
  157. package/build-module/dropdown/dropdown-content-wrapper.mjs +92 -3
  158. package/build-module/dropdown/dropdown-content-wrapper.mjs.map +3 -3
  159. package/build-module/duotone-picker/custom-duotone-bar.mjs +1 -0
  160. package/build-module/duotone-picker/custom-duotone-bar.mjs.map +2 -2
  161. package/build-module/duotone-picker/duotone-picker.mjs +24 -15
  162. package/build-module/duotone-picker/duotone-picker.mjs.map +2 -2
  163. package/build-module/focal-point-picker/index.mjs +5 -3
  164. package/build-module/focal-point-picker/index.mjs.map +2 -2
  165. package/build-module/gradient-picker/index.mjs +106 -12
  166. package/build-module/gradient-picker/index.mjs.map +3 -3
  167. package/build-module/input-control/input-field.mjs +1 -0
  168. package/build-module/input-control/input-field.mjs.map +2 -2
  169. package/build-module/input-control/styles/input-control-styles.mjs +22 -22
  170. package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
  171. package/build-module/modal/index.mjs +1 -0
  172. package/build-module/modal/index.mjs.map +2 -2
  173. package/build-module/palette-edit/index.mjs +209 -34
  174. package/build-module/palette-edit/index.mjs.map +2 -2
  175. package/build-module/private-apis.mjs +2 -7
  176. package/build-module/private-apis.mjs.map +2 -2
  177. package/build-module/progress-bar/index.mjs +95 -7
  178. package/build-module/progress-bar/index.mjs.map +3 -3
  179. package/build-module/radio-control/index.mjs +1 -0
  180. package/build-module/radio-control/index.mjs.map +2 -2
  181. package/build-module/resizable-box/resize-tooltip/index.mjs +91 -4
  182. package/build-module/resizable-box/resize-tooltip/index.mjs.map +3 -3
  183. package/build-module/resizable-box/resize-tooltip/label.mjs +93 -6
  184. package/build-module/resizable-box/resize-tooltip/label.mjs.map +3 -3
  185. package/build-module/scrollable/hook.mjs +93 -6
  186. package/build-module/scrollable/hook.mjs.map +4 -4
  187. package/build-module/snackbar/index.mjs +8 -5
  188. package/build-module/snackbar/index.mjs.map +2 -2
  189. package/build-module/textarea-control/index.mjs +87 -3
  190. package/build-module/textarea-control/index.mjs.map +3 -3
  191. package/build-module/toggle-group-control/toggle-group-control/component.mjs +1 -1
  192. package/build-module/toggle-group-control/toggle-group-control/component.mjs.map +2 -2
  193. package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs +1 -1
  194. package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs.map +2 -2
  195. package/build-module/tools-panel/tools-panel-item/hook.mjs +2 -2
  196. package/build-module/tools-panel/tools-panel-item/hook.mjs.map +2 -2
  197. package/build-module/utils/config-values.mjs +0 -3
  198. package/build-module/utils/config-values.mjs.map +2 -2
  199. package/build-module/validated-form-controls/components/content-editable-control.mjs +2 -1
  200. package/build-module/validated-form-controls/components/content-editable-control.mjs.map +2 -2
  201. package/build-module/validated-form-controls/components/custom-select-control.mjs +2 -1
  202. package/build-module/validated-form-controls/components/custom-select-control.mjs.map +2 -2
  203. package/build-module/validated-form-controls/components/index.mjs +0 -4
  204. package/build-module/validated-form-controls/components/index.mjs.map +2 -2
  205. package/build-module/validated-form-controls/components/input-control.mjs +8 -1
  206. package/build-module/validated-form-controls/components/input-control.mjs.map +2 -2
  207. package/build-module/validated-form-controls/components/range-control.mjs +2 -1
  208. package/build-module/validated-form-controls/components/range-control.mjs.map +2 -2
  209. package/build-module/validated-form-controls/components/textarea-control.mjs +8 -1
  210. package/build-module/validated-form-controls/components/textarea-control.mjs.map +2 -2
  211. package/build-module/validated-form-controls/index.mjs +0 -1
  212. package/build-module/validated-form-controls/index.mjs.map +2 -2
  213. package/build-module/z-stack/component.mjs +95 -7
  214. package/build-module/z-stack/component.mjs.map +3 -3
  215. package/build-style/style-rtl.css +79 -134
  216. package/build-style/style.css +79 -134
  217. package/build-types/base-control/styles/base-control-styles.d.ts +21 -20
  218. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  219. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  220. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  221. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  222. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +863 -1
  223. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  224. package/build-types/border-box-control/types.d.ts +6 -2
  225. package/build-types/border-box-control/types.d.ts.map +1 -1
  226. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  227. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  228. package/build-types/border-control/border-control-dropdown/hook.d.ts +4 -2
  229. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  230. package/build-types/box-control/box-input-control.d.ts.map +1 -1
  231. package/build-types/box-control/index.d.ts.map +1 -1
  232. package/build-types/button/index.d.ts.map +1 -1
  233. package/build-types/card/styles.d.ts +2 -1
  234. package/build-types/card/styles.d.ts.map +1 -1
  235. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  236. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  237. package/build-types/circular-option-picker/index.d.ts +1 -1
  238. package/build-types/circular-option-picker/index.d.ts.map +1 -1
  239. package/build-types/circular-option-picker/types.d.ts +34 -26
  240. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  241. package/build-types/circular-option-picker/utils.d.ts +9 -5
  242. package/build-types/circular-option-picker/utils.d.ts.map +1 -1
  243. package/build-types/color-palette/index.d.ts.map +1 -1
  244. package/build-types/color-palette/types.d.ts +23 -3
  245. package/build-types/color-palette/types.d.ts.map +1 -1
  246. package/build-types/combobox-control/index.d.ts.map +1 -1
  247. package/build-types/combobox-control/types.d.ts +4 -2
  248. package/build-types/combobox-control/types.d.ts.map +1 -1
  249. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  250. package/build-types/confirm-dialog/types.d.ts +11 -0
  251. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  252. package/build-types/context/context-system-provider.d.ts.map +1 -1
  253. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +1 -1
  254. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  255. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +1 -1
  256. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
  257. package/build-types/custom-gradient-picker/types.d.ts +10 -0
  258. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  259. package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -1
  260. package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
  261. package/build-types/duotone-picker/duotone-picker.d.ts +1 -1
  262. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  263. package/build-types/duotone-picker/types.d.ts +43 -4
  264. package/build-types/duotone-picker/types.d.ts.map +1 -1
  265. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  266. package/build-types/gradient-picker/index.d.ts.map +1 -1
  267. package/build-types/gradient-picker/types.d.ts +22 -3
  268. package/build-types/gradient-picker/types.d.ts.map +1 -1
  269. package/build-types/input-control/input-field.d.ts.map +1 -1
  270. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  271. package/build-types/modal/index.d.ts.map +1 -1
  272. package/build-types/palette-edit/index.d.ts +8 -5
  273. package/build-types/palette-edit/index.d.ts.map +1 -1
  274. package/build-types/palette-edit/types.d.ts +47 -8
  275. package/build-types/palette-edit/types.d.ts.map +1 -1
  276. package/build-types/popover/types.d.ts +6 -2
  277. package/build-types/popover/types.d.ts.map +1 -1
  278. package/build-types/private-apis.d.ts.map +1 -1
  279. package/build-types/progress-bar/index.d.ts.map +1 -1
  280. package/build-types/radio-control/index.d.ts.map +1 -1
  281. package/build-types/radio-control/types.d.ts +6 -0
  282. package/build-types/radio-control/types.d.ts.map +1 -1
  283. package/build-types/resizable-box/resize-tooltip/index.d.ts +4 -5
  284. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  285. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  286. package/build-types/scrollable/hook.d.ts.map +1 -1
  287. package/build-types/snackbar/index.d.ts.map +1 -1
  288. package/build-types/textarea-control/index.d.ts.map +1 -1
  289. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  290. package/build-types/utils/config-values.d.ts +0 -3
  291. package/build-types/validated-form-controls/components/content-editable-control.d.ts.map +1 -1
  292. package/build-types/validated-form-controls/components/custom-select-control.d.ts.map +1 -1
  293. package/build-types/validated-form-controls/components/index.d.ts +0 -4
  294. package/build-types/validated-form-controls/components/index.d.ts.map +1 -1
  295. package/build-types/validated-form-controls/components/input-control.d.ts.map +1 -1
  296. package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
  297. package/build-types/validated-form-controls/components/textarea-control.d.ts.map +1 -1
  298. package/build-types/validated-form-controls/index.d.ts +0 -1
  299. package/build-types/validated-form-controls/index.d.ts.map +1 -1
  300. package/build-types/z-stack/component.d.ts.map +1 -1
  301. package/package.json +30 -30
  302. package/src/animate/stories/index.story.tsx +0 -10
  303. package/src/base-control/stories/index.story.tsx +1 -1
  304. package/src/base-control/styles/base-control-styles.tsx +115 -0
  305. package/src/base-control/styles/style.module.scss +39 -0
  306. package/src/border-box-control/border-box-control/README.md +2 -2
  307. package/src/border-box-control/border-box-control/hook.ts +5 -16
  308. package/src/border-box-control/border-box-control-linked-button/hook.ts +6 -10
  309. package/src/border-box-control/border-box-control-split-controls/hook.ts +11 -20
  310. package/src/border-box-control/border-box-control-visualizer/hook.ts +37 -11
  311. package/src/border-box-control/stories/index.story.tsx +1 -1
  312. package/src/border-box-control/style.module.scss +43 -0
  313. package/src/border-box-control/types.ts +6 -2
  314. package/src/border-control/border-control/hook.ts +10 -19
  315. package/src/border-control/border-control-dropdown/component.tsx +6 -8
  316. package/src/border-control/border-control-dropdown/hook.ts +23 -32
  317. package/src/border-control/style.module.scss +93 -0
  318. package/src/border-control/test/{index.js → index.jsx} +63 -31
  319. package/src/box-control/box-input-control.tsx +31 -16
  320. package/src/box-control/index.tsx +15 -12
  321. package/src/box-control/style.module.scss +28 -0
  322. package/src/box-control/test/index.tsx +161 -0
  323. package/src/button/index.tsx +32 -10
  324. package/src/button/test/index.tsx +51 -0
  325. package/src/card/card-body/hook.ts +2 -2
  326. package/src/card/styles.ts +11 -1
  327. package/src/card/test/__snapshots__/index.tsx.snap +27 -27
  328. package/src/circular-option-picker/README.md +8 -4
  329. package/src/circular-option-picker/circular-option-picker-option.tsx +26 -16
  330. package/src/circular-option-picker/circular-option-picker.tsx +47 -14
  331. package/src/circular-option-picker/index.tsx +5 -1
  332. package/src/circular-option-picker/stories/index.story.tsx +3 -3
  333. package/src/circular-option-picker/test/index.tsx +152 -3
  334. package/src/circular-option-picker/types.ts +38 -32
  335. package/src/circular-option-picker/utils.tsx +35 -5
  336. package/src/clipboard-button/index.tsx +1 -1
  337. package/src/color-palette/README.md +11 -7
  338. package/src/color-palette/index.tsx +28 -14
  339. package/src/color-palette/stories/index.story.tsx +5 -0
  340. package/src/color-palette/style.module.scss +12 -0
  341. package/src/color-palette/test/index.tsx +80 -5
  342. package/src/color-palette/types.ts +23 -3
  343. package/src/color-picker/stories/index.story.tsx +0 -5
  344. package/src/combobox-control/README.md +1 -1
  345. package/src/combobox-control/index.tsx +4 -4
  346. package/src/combobox-control/style.module.scss +6 -0
  347. package/src/combobox-control/style.scss +1 -1
  348. package/src/combobox-control/types.ts +4 -2
  349. package/src/composite/legacy/stories/index.story.tsx +10 -10
  350. package/src/composite/stories/index.story.tsx +0 -5
  351. package/src/confirm-dialog/README.md +16 -0
  352. package/src/confirm-dialog/component.tsx +7 -1
  353. package/src/confirm-dialog/test/index.tsx +41 -0
  354. package/src/confirm-dialog/types.ts +11 -0
  355. package/src/content-editable-control/style.module.scss +0 -1
  356. package/src/context/{context-system-provider.js → context-system-provider.jsx} +0 -1
  357. package/src/context/test/__snapshots__/{context-system-provider.js.snap → context-system-provider.jsx.snap} +3 -3
  358. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +24 -3
  359. package/src/custom-gradient-picker/gradient-bar/index.tsx +2 -0
  360. package/src/custom-gradient-picker/test/index.tsx +134 -0
  361. package/src/custom-gradient-picker/types.ts +10 -0
  362. package/src/dropdown/dropdown-content-wrapper.tsx +17 -7
  363. package/src/dropdown/stories/index.story.tsx +0 -5
  364. package/src/dropdown/style.module.scss +25 -0
  365. package/src/dropdown/test/index.tsx +51 -0
  366. package/src/duotone-picker/README.md +21 -6
  367. package/src/duotone-picker/custom-duotone-bar.tsx +1 -0
  368. package/src/duotone-picker/duotone-picker.tsx +79 -54
  369. package/src/duotone-picker/stories/duotone-picker.story.tsx +63 -15
  370. package/src/duotone-picker/test/custom-duotone-bar.tsx +114 -0
  371. package/src/duotone-picker/test/index.tsx +346 -0
  372. package/src/duotone-picker/types.ts +48 -4
  373. package/src/focal-point-picker/index.tsx +6 -2
  374. package/src/focal-point-picker/stories/index.story.tsx +15 -0
  375. package/src/focal-point-picker/test/index.tsx +31 -0
  376. package/src/form-toggle/stories/index.story.tsx +3 -0
  377. package/src/form-token-field/style.scss +7 -1
  378. package/src/gradient-picker/README.md +19 -10
  379. package/src/gradient-picker/index.tsx +43 -16
  380. package/src/gradient-picker/stories/index.story.tsx +5 -0
  381. package/src/gradient-picker/test/index.tsx +84 -0
  382. package/src/gradient-picker/types.ts +22 -3
  383. package/src/input-control/input-field.tsx +1 -0
  384. package/src/input-control/stories/index.story.tsx +3 -3
  385. package/src/input-control/stories/migration-guide.mdx +201 -0
  386. package/src/input-control/style.scss +11 -0
  387. package/src/input-control/styles/input-control-styles.tsx +30 -11
  388. package/src/input-control/test/{index.js → index.jsx} +10 -0
  389. package/src/keyboard-shortcuts/stories/index.story.tsx +2 -2
  390. package/src/menu-group/stories/index.story.tsx +9 -6
  391. package/src/menu-item/stories/index.story.tsx +6 -3
  392. package/src/menu-items-choice/stories/index.story.tsx +14 -11
  393. package/src/modal/index.tsx +1 -0
  394. package/src/modal/test/index.tsx +19 -0
  395. package/src/navigator/stories/index.story.tsx +0 -5
  396. package/src/number-control/stories/index.story.tsx +3 -3
  397. package/src/palette-edit/index.tsx +364 -70
  398. package/src/palette-edit/stories/index.story.tsx +59 -18
  399. package/src/palette-edit/style.scss +3 -1
  400. package/src/palette-edit/test/index.tsx +375 -1
  401. package/src/palette-edit/types.ts +50 -8
  402. package/src/popover/README.md +2 -2
  403. package/src/popover/stories/index.story.tsx +5 -1
  404. package/src/popover/stories/utils.tsx +79 -0
  405. package/src/popover/test/index.tsx +24 -1
  406. package/src/popover/test/utils/index.js +1 -0
  407. package/src/popover/test/utils/index.tsx +4 -78
  408. package/src/popover/types.ts +9 -3
  409. package/src/private-apis.ts +0 -8
  410. package/src/progress-bar/index.tsx +10 -6
  411. package/src/progress-bar/style.module.scss +62 -0
  412. package/src/progress-bar/test/index.tsx +13 -11
  413. package/src/radio-control/README.md +3 -1
  414. package/src/radio-control/index.tsx +1 -0
  415. package/src/radio-control/stories/index.story.tsx +12 -0
  416. package/src/radio-control/style.scss +1 -3
  417. package/src/radio-control/test/index.tsx +59 -0
  418. package/src/radio-control/types.ts +6 -0
  419. package/src/range-control/stories/index.story.tsx +30 -0
  420. package/src/resizable-box/resize-tooltip/index.tsx +16 -7
  421. package/src/resizable-box/resize-tooltip/label.tsx +18 -12
  422. package/src/resizable-box/resize-tooltip/style.module.scss +40 -0
  423. package/src/resizable-box/resize-tooltip/test/index.tsx +44 -0
  424. package/src/resizable-box/resize-tooltip/test/label.tsx +25 -0
  425. package/src/resizable-box/stories/index.story.tsx +11 -0
  426. package/src/sandbox/stories/index.story.tsx +2 -0
  427. package/src/scrollable/hook.ts +11 -17
  428. package/src/scrollable/stories/index.story.tsx +1 -0
  429. package/src/scrollable/style.module.scss +44 -0
  430. package/src/scrollable/test/index.tsx +120 -6
  431. package/src/snackbar/index.tsx +10 -6
  432. package/src/snackbar/stories/index.story.tsx +5 -0
  433. package/src/snackbar/stories/list.story.tsx +3 -0
  434. package/src/snackbar/test/index.tsx +28 -2
  435. package/src/snackbar/test/list.tsx +61 -1
  436. package/src/spinner/stories/index.story.tsx +2 -2
  437. package/src/style.scss +1 -0
  438. package/src/text-control/stories/index.story.tsx +2 -3
  439. package/src/text-control/style.scss +0 -1
  440. package/src/textarea-control/index.tsx +6 -3
  441. package/src/textarea-control/stories/index.story.tsx +2 -3
  442. package/src/textarea-control/stories/migration-guide.mdx +79 -0
  443. package/src/textarea-control/style.module.scss +56 -0
  444. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +12 -116
  445. package/src/toggle-group-control/toggle-group-control/style.module.scss +0 -2
  446. package/src/toggle-group-control/toggle-group-control-option-base/style.module.scss +0 -2
  447. package/src/tools-panel/test/index.tsx +39 -0
  448. package/src/tools-panel/tools-panel-item/hook.ts +4 -1
  449. package/src/utils/config-values.js +0 -3
  450. package/src/utils/theme-variables.scss +0 -1
  451. package/src/validated-form-controls/components/content-editable-control.tsx +2 -1
  452. package/src/validated-form-controls/components/custom-select-control.tsx +2 -1
  453. package/src/validated-form-controls/components/index.ts +0 -4
  454. package/src/validated-form-controls/components/input-control.tsx +9 -1
  455. package/src/validated-form-controls/components/range-control.tsx +2 -1
  456. package/src/validated-form-controls/components/stories/content-editable-control.story.tsx +6 -0
  457. package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +6 -0
  458. package/src/validated-form-controls/components/stories/overview.mdx +4 -47
  459. package/src/validated-form-controls/components/textarea-control.tsx +9 -1
  460. package/src/validated-form-controls/index.ts +0 -1
  461. package/src/validated-form-controls/style.scss +11 -67
  462. package/src/validated-form-controls/test/input-control.tsx +12 -0
  463. package/src/validated-form-controls/test/textarea-control.tsx +17 -0
  464. package/src/z-stack/component.tsx +17 -9
  465. package/src/z-stack/style.module.scss +26 -0
  466. package/build/border-box-control/styles.cjs +0 -99
  467. package/build/border-box-control/styles.cjs.map +0 -7
  468. package/build/border-control/styles.cjs +0 -117
  469. package/build/border-control/styles.cjs.map +0 -7
  470. package/build/box-control/styles/box-control-styles.cjs +0 -131
  471. package/build/box-control/styles/box-control-styles.cjs.map +0 -7
  472. package/build/color-palette/styles.cjs +0 -49
  473. package/build/color-palette/styles.cjs.map +0 -7
  474. package/build/combobox-control/styles.cjs +0 -49
  475. package/build/combobox-control/styles.cjs.map +0 -7
  476. package/build/dropdown/styles.cjs +0 -61
  477. package/build/dropdown/styles.cjs.map +0 -7
  478. package/build/progress-bar/styles.cjs +0 -106
  479. package/build/progress-bar/styles.cjs.map +0 -7
  480. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.cjs +0 -90
  481. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.cjs.map +0 -7
  482. package/build/scrollable/styles.cjs +0 -96
  483. package/build/scrollable/styles.cjs.map +0 -7
  484. package/build/textarea-control/styles/textarea-control-styles.cjs +0 -54
  485. package/build/textarea-control/styles/textarea-control-styles.cjs.map +0 -7
  486. package/build/validated-form-controls/components/combobox-control.cjs +0 -75
  487. package/build/validated-form-controls/components/combobox-control.cjs.map +0 -7
  488. package/build/validated-form-controls/components/form-token-field.cjs +0 -69
  489. package/build/validated-form-controls/components/form-token-field.cjs.map +0 -7
  490. package/build/validated-form-controls/components/toggle-control.cjs +0 -67
  491. package/build/validated-form-controls/components/toggle-control.cjs.map +0 -7
  492. package/build/validated-form-controls/components/toggle-group-control.cjs +0 -71
  493. package/build/validated-form-controls/components/toggle-group-control.cjs.map +0 -7
  494. package/build/validated-form-controls/control-with-error.cjs +0 -200
  495. package/build/validated-form-controls/control-with-error.cjs.map +0 -7
  496. package/build/validated-form-controls/validity-indicator.cjs +0 -67
  497. package/build/validated-form-controls/validity-indicator.cjs.map +0 -7
  498. package/build/z-stack/styles.cjs +0 -80
  499. package/build/z-stack/styles.cjs.map +0 -7
  500. package/build-module/border-box-control/styles.mjs +0 -67
  501. package/build-module/border-box-control/styles.mjs.map +0 -7
  502. package/build-module/border-control/styles.mjs +0 -80
  503. package/build-module/border-control/styles.mjs.map +0 -7
  504. package/build-module/box-control/styles/box-control-styles.mjs +0 -91
  505. package/build-module/box-control/styles/box-control-styles.mjs.map +0 -7
  506. package/build-module/color-palette/styles.mjs +0 -14
  507. package/build-module/color-palette/styles.mjs.map +0 -7
  508. package/build-module/combobox-control/styles.mjs +0 -14
  509. package/build-module/combobox-control/styles.mjs.map +0 -7
  510. package/build-module/dropdown/styles.mjs +0 -26
  511. package/build-module/dropdown/styles.mjs.map +0 -7
  512. package/build-module/progress-bar/styles.mjs +0 -68
  513. package/build-module/progress-bar/styles.mjs.map +0 -7
  514. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.mjs +0 -52
  515. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.mjs.map +0 -7
  516. package/build-module/scrollable/styles.mjs +0 -65
  517. package/build-module/scrollable/styles.mjs.map +0 -7
  518. package/build-module/textarea-control/styles/textarea-control-styles.mjs +0 -19
  519. package/build-module/textarea-control/styles/textarea-control-styles.mjs.map +0 -7
  520. package/build-module/validated-form-controls/components/combobox-control.mjs +0 -40
  521. package/build-module/validated-form-controls/components/combobox-control.mjs.map +0 -7
  522. package/build-module/validated-form-controls/components/form-token-field.mjs +0 -44
  523. package/build-module/validated-form-controls/components/form-token-field.mjs.map +0 -7
  524. package/build-module/validated-form-controls/components/toggle-control.mjs +0 -32
  525. package/build-module/validated-form-controls/components/toggle-control.mjs.map +0 -7
  526. package/build-module/validated-form-controls/components/toggle-group-control.mjs +0 -46
  527. package/build-module/validated-form-controls/components/toggle-group-control.mjs.map +0 -7
  528. package/build-module/validated-form-controls/control-with-error.mjs +0 -175
  529. package/build-module/validated-form-controls/control-with-error.mjs.map +0 -7
  530. package/build-module/validated-form-controls/validity-indicator.mjs +0 -32
  531. package/build-module/validated-form-controls/validity-indicator.mjs.map +0 -7
  532. package/build-module/z-stack/styles.mjs +0 -44
  533. package/build-module/z-stack/styles.mjs.map +0 -7
  534. package/build-types/alignment-matrix-control/stories/index.story.d.ts +0 -8
  535. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +0 -1
  536. package/build-types/alignment-matrix-control/test/index.d.ts +0 -2
  537. package/build-types/alignment-matrix-control/test/index.d.ts.map +0 -1
  538. package/build-types/angle-picker-control/stories/index.story.d.ts +0 -8
  539. package/build-types/angle-picker-control/stories/index.story.d.ts.map +0 -1
  540. package/build-types/animate/stories/index.story.d.ts +0 -12
  541. package/build-types/animate/stories/index.story.d.ts.map +0 -1
  542. package/build-types/autocomplete/test/get-autocomplete-match.d.ts +0 -2
  543. package/build-types/autocomplete/test/get-autocomplete-match.d.ts.map +0 -1
  544. package/build-types/autocomplete/test/index.d.ts +0 -2
  545. package/build-types/autocomplete/test/index.d.ts.map +0 -1
  546. package/build-types/badge/stories/e2e/index.story.d.ts +0 -7
  547. package/build-types/badge/stories/e2e/index.story.d.ts.map +0 -1
  548. package/build-types/badge/stories/index.story.d.ts +0 -11
  549. package/build-types/badge/stories/index.story.d.ts.map +0 -1
  550. package/build-types/badge/test/index.d.ts +0 -2
  551. package/build-types/badge/test/index.d.ts.map +0 -1
  552. package/build-types/base-control/stories/index.story.d.ts +0 -17
  553. package/build-types/base-control/stories/index.story.d.ts.map +0 -1
  554. package/build-types/base-control/test/index.d.ts +0 -2
  555. package/build-types/base-control/test/index.d.ts.map +0 -1
  556. package/build-types/border-box-control/stories/index.story.d.ts +0 -14
  557. package/build-types/border-box-control/stories/index.story.d.ts.map +0 -1
  558. package/build-types/border-box-control/styles.d.ts +0 -10
  559. package/build-types/border-box-control/styles.d.ts.map +0 -1
  560. package/build-types/border-box-control/test/index.d.ts +0 -2
  561. package/build-types/border-box-control/test/index.d.ts.map +0 -1
  562. package/build-types/border-box-control/test/utils.d.ts +0 -2
  563. package/build-types/border-box-control/test/utils.d.ts.map +0 -1
  564. package/build-types/border-control/stories/index.story.d.ts +0 -109
  565. package/build-types/border-control/stories/index.story.d.ts.map +0 -1
  566. package/build-types/border-control/styles.d.ts +0 -17
  567. package/build-types/border-control/styles.d.ts.map +0 -1
  568. package/build-types/box-control/stories/index.story.d.ts +0 -12
  569. package/build-types/box-control/stories/index.story.d.ts.map +0 -1
  570. package/build-types/box-control/styles/box-control-styles.d.ts +0 -65
  571. package/build-types/box-control/styles/box-control-styles.d.ts.map +0 -1
  572. package/build-types/box-control/test/index.d.ts +0 -2
  573. package/build-types/box-control/test/index.d.ts.map +0 -1
  574. package/build-types/button/stories/e2e/index.story.d.ts +0 -9
  575. package/build-types/button/stories/e2e/index.story.d.ts.map +0 -1
  576. package/build-types/button/stories/index.story.d.ts +0 -31
  577. package/build-types/button/stories/index.story.d.ts.map +0 -1
  578. package/build-types/button/test/index.d.ts +0 -2
  579. package/build-types/button/test/index.d.ts.map +0 -1
  580. package/build-types/button-group/stories/index.story.d.ts +0 -12
  581. package/build-types/button-group/stories/index.story.d.ts.map +0 -1
  582. package/build-types/card/stories/index.story.d.ts +0 -20
  583. package/build-types/card/stories/index.story.d.ts.map +0 -1
  584. package/build-types/card/test/index.d.ts +0 -2
  585. package/build-types/card/test/index.d.ts.map +0 -1
  586. package/build-types/checkbox-control/stories/index.story.d.ts +0 -24
  587. package/build-types/checkbox-control/stories/index.story.d.ts.map +0 -1
  588. package/build-types/checkbox-control/test/index.d.ts +0 -2
  589. package/build-types/checkbox-control/test/index.d.ts.map +0 -1
  590. package/build-types/circular-option-picker/stories/index.story.d.ts +0 -10
  591. package/build-types/circular-option-picker/stories/index.story.d.ts.map +0 -1
  592. package/build-types/circular-option-picker/test/index.d.ts +0 -2
  593. package/build-types/circular-option-picker/test/index.d.ts.map +0 -1
  594. package/build-types/color-indicator/stories/index.story.d.ts +0 -6
  595. package/build-types/color-indicator/stories/index.story.d.ts.map +0 -1
  596. package/build-types/color-indicator/test/index.d.ts +0 -2
  597. package/build-types/color-indicator/test/index.d.ts.map +0 -1
  598. package/build-types/color-palette/stories/index.story.d.ts +0 -11
  599. package/build-types/color-palette/stories/index.story.d.ts.map +0 -1
  600. package/build-types/color-palette/styles.d.ts +0 -11
  601. package/build-types/color-palette/styles.d.ts.map +0 -1
  602. package/build-types/color-palette/test/index.d.ts +0 -2
  603. package/build-types/color-palette/test/index.d.ts.map +0 -1
  604. package/build-types/color-palette/test/utils.d.ts +0 -2
  605. package/build-types/color-palette/test/utils.d.ts.map +0 -1
  606. package/build-types/color-picker/stories/index.story.d.ts +0 -6
  607. package/build-types/color-picker/stories/index.story.d.ts.map +0 -1
  608. package/build-types/color-picker/test/index.d.ts +0 -2
  609. package/build-types/color-picker/test/index.d.ts.map +0 -1
  610. package/build-types/combobox-control/stories/index.story.d.ts +0 -93
  611. package/build-types/combobox-control/stories/index.story.d.ts.map +0 -1
  612. package/build-types/combobox-control/styles.d.ts +0 -6
  613. package/build-types/combobox-control/styles.d.ts.map +0 -1
  614. package/build-types/combobox-control/test/index.d.ts +0 -2
  615. package/build-types/combobox-control/test/index.d.ts.map +0 -1
  616. package/build-types/composite/legacy/stories/index.story.d.ts +0 -9
  617. package/build-types/composite/legacy/stories/index.story.d.ts.map +0 -1
  618. package/build-types/composite/legacy/stories/utils.d.ts +0 -27
  619. package/build-types/composite/legacy/stories/utils.d.ts.map +0 -1
  620. package/build-types/composite/legacy/test/index.d.ts +0 -2
  621. package/build-types/composite/legacy/test/index.d.ts.map +0 -1
  622. package/build-types/composite/stories/index.story.d.ts +0 -33
  623. package/build-types/composite/stories/index.story.d.ts.map +0 -1
  624. package/build-types/composite/test/index.d.ts +0 -2
  625. package/build-types/composite/test/index.d.ts.map +0 -1
  626. package/build-types/confirm-dialog/stories/index.story.d.ts +0 -7
  627. package/build-types/confirm-dialog/stories/index.story.d.ts.map +0 -1
  628. package/build-types/confirm-dialog/test/index.d.ts +0 -2
  629. package/build-types/confirm-dialog/test/index.d.ts.map +0 -1
  630. package/build-types/content-editable-control/stories/index.story.d.ts +0 -7
  631. package/build-types/content-editable-control/stories/index.story.d.ts.map +0 -1
  632. package/build-types/content-editable-control/test/index.d.ts +0 -2
  633. package/build-types/content-editable-control/test/index.d.ts.map +0 -1
  634. package/build-types/context/test/context-connect.d.ts +0 -2
  635. package/build-types/context/test/context-connect.d.ts.map +0 -1
  636. package/build-types/context/test/wordpress-component.d.ts +0 -2
  637. package/build-types/context/test/wordpress-component.d.ts.map +0 -1
  638. package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts +0 -2
  639. package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts.map +0 -1
  640. package/build-types/custom-gradient-picker/stories/index.story.d.ts +0 -6
  641. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +0 -1
  642. package/build-types/custom-gradient-picker/test/index.d.ts +0 -2
  643. package/build-types/custom-gradient-picker/test/index.d.ts.map +0 -1
  644. package/build-types/custom-gradient-picker/test/serializer.d.ts +0 -2
  645. package/build-types/custom-gradient-picker/test/serializer.d.ts.map +0 -1
  646. package/build-types/custom-select-control/stories/index.story.d.ts +0 -8
  647. package/build-types/custom-select-control/stories/index.story.d.ts.map +0 -1
  648. package/build-types/custom-select-control/test/index.d.ts +0 -2
  649. package/build-types/custom-select-control/test/index.d.ts.map +0 -1
  650. package/build-types/custom-select-control-v2/stories/index.story.d.ts +0 -38
  651. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +0 -1
  652. package/build-types/custom-select-control-v2/test/index.d.ts +0 -2
  653. package/build-types/custom-select-control-v2/test/index.d.ts.map +0 -1
  654. package/build-types/date-time/date-picker/test/index.d.ts +0 -2
  655. package/build-types/date-time/date-picker/test/index.d.ts.map +0 -1
  656. package/build-types/date-time/date-picker/test/use-lilius.d.ts +0 -2
  657. package/build-types/date-time/date-picker/test/use-lilius.d.ts.map +0 -1
  658. package/build-types/date-time/date-time/test/index.d.ts +0 -2
  659. package/build-types/date-time/date-time/test/index.d.ts.map +0 -1
  660. package/build-types/date-time/stories/date-time.story.d.ts +0 -8
  661. package/build-types/date-time/stories/date-time.story.d.ts.map +0 -1
  662. package/build-types/date-time/stories/date.story.d.ts +0 -8
  663. package/build-types/date-time/stories/date.story.d.ts.map +0 -1
  664. package/build-types/date-time/stories/time.story.d.ts +0 -11
  665. package/build-types/date-time/stories/time.story.d.ts.map +0 -1
  666. package/build-types/date-time/stories/utils.d.ts +0 -3
  667. package/build-types/date-time/stories/utils.d.ts.map +0 -1
  668. package/build-types/date-time/test/utils.test.d.ts +0 -2
  669. package/build-types/date-time/test/utils.test.d.ts.map +0 -1
  670. package/build-types/date-time/time-picker/test/index.d.ts +0 -2
  671. package/build-types/date-time/time-picker/test/index.d.ts.map +0 -1
  672. package/build-types/date-time/time-picker/time-input/test/index.d.ts +0 -2
  673. package/build-types/date-time/time-picker/time-input/test/index.d.ts.map +0 -1
  674. package/build-types/disabled/stories/index.story.d.ts +0 -7
  675. package/build-types/disabled/stories/index.story.d.ts.map +0 -1
  676. package/build-types/disabled/test/index.d.ts +0 -2
  677. package/build-types/disabled/test/index.d.ts.map +0 -1
  678. package/build-types/divider/stories/index.story.d.ts +0 -8
  679. package/build-types/divider/stories/index.story.d.ts.map +0 -1
  680. package/build-types/divider/test/index.d.ts +0 -2
  681. package/build-types/divider/test/index.d.ts.map +0 -1
  682. package/build-types/draggable/stories/index.story.d.ts +0 -13
  683. package/build-types/draggable/stories/index.story.d.ts.map +0 -1
  684. package/build-types/drop-zone/stories/index.story.d.ts +0 -6
  685. package/build-types/drop-zone/stories/index.story.d.ts.map +0 -1
  686. package/build-types/dropdown/stories/index.story.d.ts +0 -18
  687. package/build-types/dropdown/stories/index.story.d.ts.map +0 -1
  688. package/build-types/dropdown/styles.d.ts +0 -6
  689. package/build-types/dropdown/styles.d.ts.map +0 -1
  690. package/build-types/dropdown/test/index.d.ts +0 -2
  691. package/build-types/dropdown/test/index.d.ts.map +0 -1
  692. package/build-types/dropdown-menu/stories/index.story.d.ts +0 -7
  693. package/build-types/dropdown-menu/stories/index.story.d.ts.map +0 -1
  694. package/build-types/dropdown-menu/test/index.d.ts +0 -2
  695. package/build-types/dropdown-menu/test/index.d.ts.map +0 -1
  696. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +0 -7
  697. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +0 -1
  698. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +0 -8
  699. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +0 -1
  700. package/build-types/elevation/stories/index.story.d.ts +0 -16
  701. package/build-types/elevation/stories/index.story.d.ts.map +0 -1
  702. package/build-types/elevation/test/index.d.ts +0 -2
  703. package/build-types/elevation/test/index.d.ts.map +0 -1
  704. package/build-types/external-link/stories/index.story.d.ts +0 -6
  705. package/build-types/external-link/stories/index.story.d.ts.map +0 -1
  706. package/build-types/external-link/test/index.d.ts +0 -2
  707. package/build-types/external-link/test/index.d.ts.map +0 -1
  708. package/build-types/flex/stories/index.story.d.ts +0 -7
  709. package/build-types/flex/stories/index.story.d.ts.map +0 -1
  710. package/build-types/flex/test/index.d.ts +0 -2
  711. package/build-types/flex/test/index.d.ts.map +0 -1
  712. package/build-types/focal-point-picker/stories/index.story.d.ts +0 -49
  713. package/build-types/focal-point-picker/stories/index.story.d.ts.map +0 -1
  714. package/build-types/focal-point-picker/test/index.d.ts +0 -2
  715. package/build-types/focal-point-picker/test/index.d.ts.map +0 -1
  716. package/build-types/focal-point-picker/test/media.d.ts +0 -2
  717. package/build-types/focal-point-picker/test/media.d.ts.map +0 -1
  718. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +0 -20
  719. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +0 -1
  720. package/build-types/font-size-picker/stories/index.story.d.ts +0 -26
  721. package/build-types/font-size-picker/stories/index.story.d.ts.map +0 -1
  722. package/build-types/font-size-picker/test/font-size-picker-select.d.ts +0 -2
  723. package/build-types/font-size-picker/test/font-size-picker-select.d.ts.map +0 -1
  724. package/build-types/font-size-picker/test/font-size-picker-toggle-group.d.ts +0 -2
  725. package/build-types/font-size-picker/test/font-size-picker-toggle-group.d.ts.map +0 -1
  726. package/build-types/font-size-picker/test/index.d.ts +0 -2
  727. package/build-types/font-size-picker/test/index.d.ts.map +0 -1
  728. package/build-types/font-size-picker/test/utils.d.ts +0 -2
  729. package/build-types/font-size-picker/test/utils.d.ts.map +0 -1
  730. package/build-types/form-file-upload/stories/index.story.d.ts +0 -17
  731. package/build-types/form-file-upload/stories/index.story.d.ts.map +0 -1
  732. package/build-types/form-file-upload/test/index.d.ts +0 -2
  733. package/build-types/form-file-upload/test/index.d.ts.map +0 -1
  734. package/build-types/form-toggle/stories/index.story.d.ts +0 -6
  735. package/build-types/form-toggle/stories/index.story.d.ts.map +0 -1
  736. package/build-types/form-toggle/test/index.d.ts +0 -2
  737. package/build-types/form-toggle/test/index.d.ts.map +0 -1
  738. package/build-types/form-token-field/stories/index.story.d.ts +0 -25
  739. package/build-types/form-token-field/stories/index.story.d.ts.map +0 -1
  740. package/build-types/form-token-field/test/index.d.ts +0 -2
  741. package/build-types/form-token-field/test/index.d.ts.map +0 -1
  742. package/build-types/gradient-picker/stories/index.story.d.ts +0 -11
  743. package/build-types/gradient-picker/stories/index.story.d.ts.map +0 -1
  744. package/build-types/gradient-picker/test/index.d.ts +0 -2
  745. package/build-types/gradient-picker/test/index.d.ts.map +0 -1
  746. package/build-types/grid/stories/index.story.d.ts +0 -6
  747. package/build-types/grid/stories/index.story.d.ts.map +0 -1
  748. package/build-types/grid/test/grid.d.ts +0 -2
  749. package/build-types/grid/test/grid.d.ts.map +0 -1
  750. package/build-types/guide/stories/index.story.d.ts +0 -6
  751. package/build-types/guide/stories/index.story.d.ts.map +0 -1
  752. package/build-types/guide/test/index.d.ts +0 -2
  753. package/build-types/guide/test/index.d.ts.map +0 -1
  754. package/build-types/h-stack/stories/e2e/index.story.d.ts +0 -6
  755. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +0 -1
  756. package/build-types/h-stack/stories/index.story.d.ts +0 -6
  757. package/build-types/h-stack/stories/index.story.d.ts.map +0 -1
  758. package/build-types/h-stack/test/index.d.ts +0 -2
  759. package/build-types/h-stack/test/index.d.ts.map +0 -1
  760. package/build-types/heading/stories/index.story.d.ts +0 -6
  761. package/build-types/heading/stories/index.story.d.ts.map +0 -1
  762. package/build-types/heading/test/index.d.ts +0 -2
  763. package/build-types/heading/test/index.d.ts.map +0 -1
  764. package/build-types/higher-order/with-fallback-styles/test/index.d.ts +0 -2
  765. package/build-types/higher-order/with-fallback-styles/test/index.d.ts.map +0 -1
  766. package/build-types/higher-order/with-filters/test/index.d.ts +0 -2
  767. package/build-types/higher-order/with-filters/test/index.d.ts.map +0 -1
  768. package/build-types/higher-order/with-focus-outside/test/index.d.ts +0 -2
  769. package/build-types/higher-order/with-focus-outside/test/index.d.ts.map +0 -1
  770. package/build-types/higher-order/with-focus-return/test/index.d.ts +0 -2
  771. package/build-types/higher-order/with-focus-return/test/index.d.ts.map +0 -1
  772. package/build-types/higher-order/with-notices/test/index.d.ts +0 -2
  773. package/build-types/higher-order/with-notices/test/index.d.ts.map +0 -1
  774. package/build-types/higher-order/with-spoken-messages/test/index.d.ts +0 -2
  775. package/build-types/higher-order/with-spoken-messages/test/index.d.ts.map +0 -1
  776. package/build-types/icon/stories/index.story.d.ts +0 -21
  777. package/build-types/icon/stories/index.story.d.ts.map +0 -1
  778. package/build-types/icon/test/index.d.ts +0 -2
  779. package/build-types/icon/test/index.d.ts.map +0 -1
  780. package/build-types/input-control/stories/index.story.d.ts +0 -31
  781. package/build-types/input-control/stories/index.story.d.ts.map +0 -1
  782. package/build-types/isolated-event-container/test/index.d.ts +0 -2
  783. package/build-types/isolated-event-container/test/index.d.ts.map +0 -1
  784. package/build-types/item-group/stories/index.story.d.ts +0 -9
  785. package/build-types/item-group/stories/index.story.d.ts.map +0 -1
  786. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +0 -6
  787. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +0 -1
  788. package/build-types/keyboard-shortcuts/test/index.d.ts +0 -2
  789. package/build-types/keyboard-shortcuts/test/index.d.ts.map +0 -1
  790. package/build-types/menu/stories/index.story.d.ts +0 -13
  791. package/build-types/menu/stories/index.story.d.ts.map +0 -1
  792. package/build-types/menu/test/index.d.ts +0 -2
  793. package/build-types/menu/test/index.d.ts.map +0 -1
  794. package/build-types/menu-group/stories/index.story.d.ts +0 -11
  795. package/build-types/menu-group/stories/index.story.d.ts.map +0 -1
  796. package/build-types/menu-group/test/index.d.ts +0 -2
  797. package/build-types/menu-group/test/index.d.ts.map +0 -1
  798. package/build-types/menu-item/stories/index.story.d.ts +0 -70
  799. package/build-types/menu-item/stories/index.story.d.ts.map +0 -1
  800. package/build-types/menu-items-choice/stories/index.story.d.ts +0 -6
  801. package/build-types/menu-items-choice/stories/index.story.d.ts.map +0 -1
  802. package/build-types/modal/stories/index.story.d.ts +0 -11
  803. package/build-types/modal/stories/index.story.d.ts.map +0 -1
  804. package/build-types/modal/test/aria-helper.d.ts +0 -2
  805. package/build-types/modal/test/aria-helper.d.ts.map +0 -1
  806. package/build-types/modal/test/index.d.ts +0 -2
  807. package/build-types/modal/test/index.d.ts.map +0 -1
  808. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +0 -6
  809. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +0 -1
  810. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +0 -6
  811. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +0 -1
  812. package/build-types/navigable-container/test/navigable-menu.d.ts +0 -2
  813. package/build-types/navigable-container/test/navigable-menu.d.ts.map +0 -1
  814. package/build-types/navigable-container/test/tababble-container.d.ts +0 -2
  815. package/build-types/navigable-container/test/tababble-container.d.ts.map +0 -1
  816. package/build-types/navigator/stories/index.story.d.ts +0 -8
  817. package/build-types/navigator/stories/index.story.d.ts.map +0 -1
  818. package/build-types/navigator/test/index.d.ts +0 -2
  819. package/build-types/navigator/test/index.d.ts.map +0 -1
  820. package/build-types/navigator/test/router.d.ts +0 -2
  821. package/build-types/navigator/test/router.d.ts.map +0 -1
  822. package/build-types/notice/stories/index.story.d.ts +0 -15
  823. package/build-types/notice/stories/index.story.d.ts.map +0 -1
  824. package/build-types/notice/test/index.d.ts +0 -2
  825. package/build-types/notice/test/index.d.ts.map +0 -1
  826. package/build-types/notice/test/list.d.ts +0 -2
  827. package/build-types/notice/test/list.d.ts.map +0 -1
  828. package/build-types/number-control/stories/index.story.d.ts +0 -19
  829. package/build-types/number-control/stories/index.story.d.ts.map +0 -1
  830. package/build-types/number-control/test/index.d.ts +0 -2
  831. package/build-types/number-control/test/index.d.ts.map +0 -1
  832. package/build-types/palette-edit/stories/index.story.d.ts +0 -7
  833. package/build-types/palette-edit/stories/index.story.d.ts.map +0 -1
  834. package/build-types/palette-edit/test/index.d.ts +0 -2
  835. package/build-types/palette-edit/test/index.d.ts.map +0 -1
  836. package/build-types/panel/stories/index.story.d.ts +0 -13
  837. package/build-types/panel/stories/index.story.d.ts.map +0 -1
  838. package/build-types/panel/test/body.d.ts +0 -2
  839. package/build-types/panel/test/body.d.ts.map +0 -1
  840. package/build-types/panel/test/header.d.ts +0 -2
  841. package/build-types/panel/test/header.d.ts.map +0 -1
  842. package/build-types/panel/test/index.d.ts +0 -2
  843. package/build-types/panel/test/index.d.ts.map +0 -1
  844. package/build-types/panel/test/row.d.ts +0 -2
  845. package/build-types/panel/test/row.d.ts.map +0 -1
  846. package/build-types/placeholder/stories/index.story.d.ts +0 -6
  847. package/build-types/placeholder/stories/index.story.d.ts.map +0 -1
  848. package/build-types/placeholder/test/index.d.ts +0 -2
  849. package/build-types/placeholder/test/index.d.ts.map +0 -1
  850. package/build-types/popover/stories/e2e/index.story.d.ts +0 -18
  851. package/build-types/popover/stories/e2e/index.story.d.ts.map +0 -1
  852. package/build-types/popover/stories/index.story.d.ts +0 -11
  853. package/build-types/popover/stories/index.story.d.ts.map +0 -1
  854. package/build-types/popover/test/index.d.ts +0 -2
  855. package/build-types/popover/test/index.d.ts.map +0 -1
  856. package/build-types/popover/test/utils/index.d.ts +0 -3
  857. package/build-types/popover/test/utils/index.d.ts.map +0 -1
  858. package/build-types/progress-bar/stories/index.story.d.ts +0 -23
  859. package/build-types/progress-bar/stories/index.story.d.ts.map +0 -1
  860. package/build-types/progress-bar/styles.d.ts +0 -16
  861. package/build-types/progress-bar/styles.d.ts.map +0 -1
  862. package/build-types/progress-bar/test/index.d.ts +0 -2
  863. package/build-types/progress-bar/test/index.d.ts.map +0 -1
  864. package/build-types/query-controls/stories/index.story.d.ts +0 -7
  865. package/build-types/query-controls/stories/index.story.d.ts.map +0 -1
  866. package/build-types/query-controls/test/terms.d.ts +0 -2
  867. package/build-types/query-controls/test/terms.d.ts.map +0 -1
  868. package/build-types/radio-control/stories/index.story.d.ts +0 -7
  869. package/build-types/radio-control/stories/index.story.d.ts.map +0 -1
  870. package/build-types/radio-control/test/index.d.ts +0 -2
  871. package/build-types/radio-control/test/index.d.ts.map +0 -1
  872. package/build-types/radio-group/stories/index.story.d.ts +0 -8
  873. package/build-types/radio-group/stories/index.story.d.ts.map +0 -1
  874. package/build-types/range-control/stories/index.story.d.ts +0 -42
  875. package/build-types/range-control/stories/index.story.d.ts.map +0 -1
  876. package/build-types/range-control/test/index.d.ts +0 -2
  877. package/build-types/range-control/test/index.d.ts.map +0 -1
  878. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +0 -18
  879. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +0 -1
  880. package/build-types/resizable-box/stories/index.story.d.ts +0 -46
  881. package/build-types/resizable-box/stories/index.story.d.ts.map +0 -1
  882. package/build-types/responsive-wrapper/stories/index.story.d.ts +0 -16
  883. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +0 -1
  884. package/build-types/sandbox/stories/index.story.d.ts +0 -7
  885. package/build-types/sandbox/stories/index.story.d.ts.map +0 -1
  886. package/build-types/sandbox/test/index.d.ts +0 -2
  887. package/build-types/sandbox/test/index.d.ts.map +0 -1
  888. package/build-types/scroll-lock/stories/index.story.d.ts +0 -6
  889. package/build-types/scroll-lock/stories/index.story.d.ts.map +0 -1
  890. package/build-types/scroll-lock/test/index.d.ts +0 -2
  891. package/build-types/scroll-lock/test/index.d.ts.map +0 -1
  892. package/build-types/scrollable/stories/index.story.d.ts +0 -6
  893. package/build-types/scrollable/stories/index.story.d.ts.map +0 -1
  894. package/build-types/scrollable/styles.d.ts +0 -8
  895. package/build-types/scrollable/styles.d.ts.map +0 -1
  896. package/build-types/scrollable/test/index.d.ts +0 -2
  897. package/build-types/scrollable/test/index.d.ts.map +0 -1
  898. package/build-types/search-control/stories/index.story.d.ts +0 -18
  899. package/build-types/search-control/stories/index.story.d.ts.map +0 -1
  900. package/build-types/search-control/test/index.d.ts +0 -2
  901. package/build-types/search-control/test/index.d.ts.map +0 -1
  902. package/build-types/select-control/stories/index.story.d.ts +0 -28
  903. package/build-types/select-control/stories/index.story.d.ts.map +0 -1
  904. package/build-types/select-control/test/select-control.d.ts +0 -2
  905. package/build-types/select-control/test/select-control.d.ts.map +0 -1
  906. package/build-types/shortcut/stories/index.story.d.ts +0 -7
  907. package/build-types/shortcut/stories/index.story.d.ts.map +0 -1
  908. package/build-types/shortcut/test/index.d.ts +0 -2
  909. package/build-types/shortcut/test/index.d.ts.map +0 -1
  910. package/build-types/slot-fill/stories/index.story.d.ts +0 -10
  911. package/build-types/slot-fill/stories/index.story.d.ts.map +0 -1
  912. package/build-types/snackbar/stories/index.story.d.ts +0 -10
  913. package/build-types/snackbar/stories/index.story.d.ts.map +0 -1
  914. package/build-types/snackbar/stories/list.story.d.ts +0 -6
  915. package/build-types/snackbar/stories/list.story.d.ts.map +0 -1
  916. package/build-types/snackbar/test/index.d.ts +0 -2
  917. package/build-types/snackbar/test/index.d.ts.map +0 -1
  918. package/build-types/snackbar/test/list.d.ts +0 -2
  919. package/build-types/snackbar/test/list.d.ts.map +0 -1
  920. package/build-types/spacer/stories/index.story.d.ts +0 -7
  921. package/build-types/spacer/stories/index.story.d.ts.map +0 -1
  922. package/build-types/spacer/test/index.d.ts +0 -2
  923. package/build-types/spacer/test/index.d.ts.map +0 -1
  924. package/build-types/spinner/stories/index.story.d.ts +0 -7
  925. package/build-types/spinner/stories/index.story.d.ts.map +0 -1
  926. package/build-types/style-provider/test/index.d.ts +0 -2
  927. package/build-types/style-provider/test/index.d.ts.map +0 -1
  928. package/build-types/surface/stories/index.story.d.ts +0 -6
  929. package/build-types/surface/stories/index.story.d.ts.map +0 -1
  930. package/build-types/surface/test/index.d.ts +0 -2
  931. package/build-types/surface/test/index.d.ts.map +0 -1
  932. package/build-types/tab-panel/stories/index.story.d.ts +0 -9
  933. package/build-types/tab-panel/stories/index.story.d.ts.map +0 -1
  934. package/build-types/tab-panel/test/index.d.ts +0 -2
  935. package/build-types/tab-panel/test/index.d.ts.map +0 -1
  936. package/build-types/tabs/stories/index.story.d.ts +0 -13
  937. package/build-types/tabs/stories/index.story.d.ts.map +0 -1
  938. package/build-types/tabs/test/index.d.ts +0 -2
  939. package/build-types/tabs/test/index.d.ts.map +0 -1
  940. package/build-types/text/stories/index.story.d.ts +0 -14
  941. package/build-types/text/stories/index.story.d.ts.map +0 -1
  942. package/build-types/text/test/index.d.ts +0 -2
  943. package/build-types/text/test/index.d.ts.map +0 -1
  944. package/build-types/text-control/stories/index.story.d.ts +0 -7
  945. package/build-types/text-control/stories/index.story.d.ts.map +0 -1
  946. package/build-types/text-control/test/text-control.d.ts +0 -2
  947. package/build-types/text-control/test/text-control.d.ts.map +0 -1
  948. package/build-types/text-highlight/stories/index.story.d.ts +0 -6
  949. package/build-types/text-highlight/stories/index.story.d.ts.map +0 -1
  950. package/build-types/text-highlight/test/index.d.ts +0 -2
  951. package/build-types/text-highlight/test/index.d.ts.map +0 -1
  952. package/build-types/textarea-control/stories/index.story.d.ts +0 -6
  953. package/build-types/textarea-control/stories/index.story.d.ts.map +0 -1
  954. package/build-types/textarea-control/styles/textarea-control-styles.d.ts +0 -5
  955. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +0 -1
  956. package/build-types/tip/stories/index.story.d.ts +0 -6
  957. package/build-types/tip/stories/index.story.d.ts.map +0 -1
  958. package/build-types/toggle-control/stories/index.story.d.ts +0 -13
  959. package/build-types/toggle-control/stories/index.story.d.ts.map +0 -1
  960. package/build-types/toggle-control/test/index.d.ts +0 -2
  961. package/build-types/toggle-control/test/index.d.ts.map +0 -1
  962. package/build-types/toggle-group-control/stories/index.story.d.ts +0 -21
  963. package/build-types/toggle-group-control/stories/index.story.d.ts.map +0 -1
  964. package/build-types/toggle-group-control/test/index.d.ts +0 -2
  965. package/build-types/toggle-group-control/test/index.d.ts.map +0 -1
  966. package/build-types/toolbar/stories/index.story.d.ts +0 -12
  967. package/build-types/toolbar/stories/index.story.d.ts.map +0 -1
  968. package/build-types/toolbar/test/index.d.ts +0 -2
  969. package/build-types/toolbar/test/index.d.ts.map +0 -1
  970. package/build-types/toolbar/test/toolbar-group.d.ts +0 -2
  971. package/build-types/toolbar/test/toolbar-group.d.ts.map +0 -1
  972. package/build-types/tools-panel/stories/index.story.d.ts +0 -11
  973. package/build-types/tools-panel/stories/index.story.d.ts.map +0 -1
  974. package/build-types/tools-panel/test/index.d.ts +0 -2
  975. package/build-types/tools-panel/test/index.d.ts.map +0 -1
  976. package/build-types/tooltip/stories/index.story.d.ts +0 -15
  977. package/build-types/tooltip/stories/index.story.d.ts.map +0 -1
  978. package/build-types/tooltip/test/index.d.ts +0 -2
  979. package/build-types/tooltip/test/index.d.ts.map +0 -1
  980. package/build-types/tooltip/test/utils/index.d.ts +0 -7
  981. package/build-types/tooltip/test/utils/index.d.ts.map +0 -1
  982. package/build-types/tree-grid/stories/index.story.d.ts +0 -6
  983. package/build-types/tree-grid/stories/index.story.d.ts.map +0 -1
  984. package/build-types/tree-grid/test/cell.d.ts +0 -2
  985. package/build-types/tree-grid/test/cell.d.ts.map +0 -1
  986. package/build-types/tree-grid/test/index.d.ts +0 -2
  987. package/build-types/tree-grid/test/index.d.ts.map +0 -1
  988. package/build-types/tree-grid/test/roving-tab-index-item.d.ts +0 -2
  989. package/build-types/tree-grid/test/roving-tab-index-item.d.ts.map +0 -1
  990. package/build-types/tree-grid/test/roving-tab-index.d.ts +0 -2
  991. package/build-types/tree-grid/test/roving-tab-index.d.ts.map +0 -1
  992. package/build-types/tree-grid/test/row.d.ts +0 -2
  993. package/build-types/tree-grid/test/row.d.ts.map +0 -1
  994. package/build-types/tree-select/stories/index.story.d.ts +0 -6
  995. package/build-types/tree-select/stories/index.story.d.ts.map +0 -1
  996. package/build-types/truncate/stories/index.story.d.ts +0 -7
  997. package/build-types/truncate/stories/index.story.d.ts.map +0 -1
  998. package/build-types/truncate/test/index.d.ts +0 -2
  999. package/build-types/truncate/test/index.d.ts.map +0 -1
  1000. package/build-types/unit-control/stories/index.story.d.ts +0 -27
  1001. package/build-types/unit-control/stories/index.story.d.ts.map +0 -1
  1002. package/build-types/unit-control/test/index.d.ts +0 -2
  1003. package/build-types/unit-control/test/index.d.ts.map +0 -1
  1004. package/build-types/unit-control/test/utils.d.ts +0 -2
  1005. package/build-types/unit-control/test/utils.d.ts.map +0 -1
  1006. package/build-types/utils/test/polymorphic-element.d.ts +0 -2
  1007. package/build-types/utils/test/polymorphic-element.d.ts.map +0 -1
  1008. package/build-types/v-stack/stories/e2e/index.story.d.ts +0 -6
  1009. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +0 -1
  1010. package/build-types/v-stack/stories/index.story.d.ts +0 -11
  1011. package/build-types/v-stack/stories/index.story.d.ts.map +0 -1
  1012. package/build-types/v-stack/test/index.d.ts +0 -2
  1013. package/build-types/v-stack/test/index.d.ts.map +0 -1
  1014. package/build-types/validated-form-controls/components/combobox-control.d.ts +0 -20
  1015. package/build-types/validated-form-controls/components/combobox-control.d.ts.map +0 -1
  1016. package/build-types/validated-form-controls/components/form-token-field.d.ts +0 -3
  1017. package/build-types/validated-form-controls/components/form-token-field.d.ts.map +0 -1
  1018. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +0 -6
  1019. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +0 -1
  1020. package/build-types/validated-form-controls/components/stories/content-editable-control.story.d.ts +0 -6
  1021. package/build-types/validated-form-controls/components/stories/content-editable-control.story.d.ts.map +0 -1
  1022. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +0 -6
  1023. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +0 -1
  1024. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +0 -9
  1025. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +0 -1
  1026. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +0 -12
  1027. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +0 -1
  1028. package/build-types/validated-form-controls/components/stories/overview.story.d.ts +0 -60
  1029. package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +0 -1
  1030. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +0 -6
  1031. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +0 -1
  1032. package/build-types/validated-form-controls/components/stories/story-utils.d.ts +0 -3
  1033. package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +0 -1
  1034. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +0 -6
  1035. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +0 -1
  1036. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +0 -6
  1037. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +0 -1
  1038. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +0 -6
  1039. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +0 -1
  1040. package/build-types/validated-form-controls/components/toggle-control.d.ts +0 -7
  1041. package/build-types/validated-form-controls/components/toggle-control.d.ts.map +0 -1
  1042. package/build-types/validated-form-controls/components/toggle-group-control.d.ts +0 -15
  1043. package/build-types/validated-form-controls/components/toggle-group-control.d.ts.map +0 -1
  1044. package/build-types/validated-form-controls/control-with-error.d.ts +0 -36
  1045. package/build-types/validated-form-controls/control-with-error.d.ts.map +0 -1
  1046. package/build-types/validated-form-controls/test/combobox-control.d.ts +0 -2
  1047. package/build-types/validated-form-controls/test/combobox-control.d.ts.map +0 -1
  1048. package/build-types/validated-form-controls/test/content-editable-control.d.ts +0 -2
  1049. package/build-types/validated-form-controls/test/content-editable-control.d.ts.map +0 -1
  1050. package/build-types/validated-form-controls/test/control-with-error.d.ts +0 -2
  1051. package/build-types/validated-form-controls/test/control-with-error.d.ts.map +0 -1
  1052. package/build-types/validated-form-controls/test/custom-select-control.d.ts +0 -2
  1053. package/build-types/validated-form-controls/test/custom-select-control.d.ts.map +0 -1
  1054. package/build-types/validated-form-controls/test/form-token-field.d.ts +0 -2
  1055. package/build-types/validated-form-controls/test/form-token-field.d.ts.map +0 -1
  1056. package/build-types/validated-form-controls/test/input-control.d.ts +0 -2
  1057. package/build-types/validated-form-controls/test/input-control.d.ts.map +0 -1
  1058. package/build-types/validated-form-controls/test/range-control.d.ts +0 -2
  1059. package/build-types/validated-form-controls/test/range-control.d.ts.map +0 -1
  1060. package/build-types/validated-form-controls/test/textarea-control.d.ts +0 -2
  1061. package/build-types/validated-form-controls/test/textarea-control.d.ts.map +0 -1
  1062. package/build-types/validated-form-controls/test/toggle-control.d.ts +0 -2
  1063. package/build-types/validated-form-controls/test/toggle-control.d.ts.map +0 -1
  1064. package/build-types/validated-form-controls/test/toggle-group-control.d.ts +0 -2
  1065. package/build-types/validated-form-controls/test/toggle-group-control.d.ts.map +0 -1
  1066. package/build-types/validated-form-controls/validity-indicator.d.ts +0 -6
  1067. package/build-types/validated-form-controls/validity-indicator.d.ts.map +0 -1
  1068. package/build-types/view/stories/index.story.d.ts +0 -6
  1069. package/build-types/view/stories/index.story.d.ts.map +0 -1
  1070. package/build-types/visually-hidden/stories/index.story.d.ts +0 -8
  1071. package/build-types/visually-hidden/stories/index.story.d.ts.map +0 -1
  1072. package/build-types/z-stack/stories/index.story.d.ts +0 -6
  1073. package/build-types/z-stack/stories/index.story.d.ts.map +0 -1
  1074. package/build-types/z-stack/styles.d.ts +0 -14
  1075. package/build-types/z-stack/styles.d.ts.map +0 -1
  1076. package/src/base-control/styles/base-control-styles.ts +0 -46
  1077. package/src/border-box-control/styles.ts +0 -71
  1078. package/src/border-control/styles.ts +0 -151
  1079. package/src/box-control/styles/box-control-styles.ts +0 -34
  1080. package/src/color-palette/styles.ts +0 -13
  1081. package/src/combobox-control/styles.ts +0 -9
  1082. package/src/dropdown/styles.ts +0 -33
  1083. package/src/progress-bar/styles.ts +0 -84
  1084. package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +0 -47
  1085. package/src/scrollable/styles.ts +0 -57
  1086. package/src/scrollable/test/__snapshots__/index.tsx.snap +0 -66
  1087. package/src/textarea-control/styles/textarea-control-styles.ts +0 -90
  1088. package/src/validated-form-controls/components/combobox-control.tsx +0 -56
  1089. package/src/validated-form-controls/components/form-token-field.tsx +0 -57
  1090. package/src/validated-form-controls/components/stories/combobox-control.story.tsx +0 -56
  1091. package/src/validated-form-controls/components/stories/form-token-field.story.tsx +0 -60
  1092. package/src/validated-form-controls/components/stories/input-control.story.tsx +0 -126
  1093. package/src/validated-form-controls/components/stories/overview.story.tsx +0 -560
  1094. package/src/validated-form-controls/components/stories/textarea-control.story.tsx +0 -50
  1095. package/src/validated-form-controls/components/stories/toggle-control.story.tsx +0 -47
  1096. package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +0 -58
  1097. package/src/validated-form-controls/components/toggle-control.tsx +0 -40
  1098. package/src/validated-form-controls/components/toggle-group-control.tsx +0 -55
  1099. package/src/validated-form-controls/control-with-error.tsx +0 -321
  1100. package/src/validated-form-controls/test/combobox-control.tsx +0 -61
  1101. package/src/validated-form-controls/test/control-with-error.tsx +0 -577
  1102. package/src/validated-form-controls/test/form-token-field.tsx +0 -52
  1103. package/src/validated-form-controls/test/toggle-control.tsx +0 -49
  1104. package/src/validated-form-controls/test/toggle-group-control.tsx +0 -28
  1105. package/src/validated-form-controls/validity-indicator.tsx +0 -40
  1106. package/src/z-stack/styles.ts +0 -35
  1107. /package/src/context/test/{context-system-provider.js → context-system-provider.jsx} +0 -0
  1108. /package/src/input-control/test/__snapshots__/{index.js.snap → index.jsx.snap} +0 -0
  1109. /package/src/item-group/test/__snapshots__/{index.js.snap → index.jsx.snap} +0 -0
  1110. /package/src/item-group/test/{index.js → index.jsx} +0 -0
  1111. /package/src/menu-item/test/__snapshots__/{index.js.snap → index.jsx.snap} +0 -0
  1112. /package/src/menu-item/test/{index.js → index.jsx} +0 -0
  1113. /package/src/slot-fill/test/__snapshots__/{slot.js.snap → slot.jsx.snap} +0 -0
  1114. /package/src/slot-fill/test/{index.js → index.jsx} +0 -0
  1115. /package/src/slot-fill/test/{slot.js → slot.jsx} +0 -0
  1116. /package/src/utils/hooks/test/{use-controlled-state.js → use-controlled-state.jsx} +0 -0
  1117. /package/src/utils/hooks/test/{use-controlled-value.js → use-controlled-value.jsx} +0 -0
  1118. /package/src/utils/hooks/test/{use-cx.js → use-cx.jsx} +0 -0
  1119. /package/src/utils/test/{get-node-text.js → get-node-text.jsx} +0 -0
  1120. /package/src/view/test/__snapshots__/{index.js.snap → index.jsx.snap} +0 -0
  1121. /package/src/view/test/{index.js → index.jsx} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/border-box-control/border-box-control/hook.ts"],
4
- "sourcesContent": ["import { useMemo, useState } from '@wordpress/element';\nimport * as styles from '../styles';\nimport { getBorderDiff, getCommonBorder, getSplitBorders, hasMixedBorders, hasSplitBorders, isCompleteBorder, isEmptyBorder } from '../utils';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\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 cx = useCx();\n const classes = useMemo(() => {\n return cx(styles.borderBoxControl, className);\n }, [cx, className]);\n const linkedControlClassName = useMemo(() => {\n return cx(styles.linkedBorderControl());\n }, [cx]);\n const wrapperClassName = useMemo(() => {\n return cx(styles.wrapper);\n }, [cx]);\n return {\n ...otherProps,\n className: classes,\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}"],
5
- "mappings": ";AAAA,SAAS,SAAS,gBAAgB;AAClC,YAAY,YAAY;AACxB,SAAS,eAAe,iBAAiB,iBAAiB,iBAAiB,iBAAiB,kBAAkB,qBAAqB;AACnI,SAAS,wBAAwB;AACjC,SAAS,aAAa;AACf,SAAS,oBAAoB,OAAO;AACzC,QAAM;AAAA,IACJ;AAAA,IACA,SAAS,CAAC;AAAA,IACV;AAAA,IACA,cAAc;AAAA,IACd,cAAc;AAAA,IACd;AAAA,IACA,oCAAoC;AAAA;AAAA,IAEpC,MAAM;AAAA,IACN,uBAAuB;AAAA,IACvB,GAAG;AAAA,EACL,IAAI,iBAAiB,OAAO,kBAAkB;AAC9C,QAAM,eAAe,gBAAgB,KAAK;AAC1C,QAAM,eAAe,gBAA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;AAC5B,WAAO,GAAU,yBAAkB,SAAS;AAAA,EAC9C,GAAG,CAAC,IAAI,SAAS,CAAC;AAClB,QAAM,yBAAyB,QAAQ,MAAM;AAC3C,WAAO,GAAU,2BAAoB,CAAC;AAAA,EACxC,GAAG,CAAC,EAAE,CAAC;AACP,QAAM,mBAAmB,QAAQ,MAAM;AACrC,WAAO,GAAU,cAAO;AAAA,EAC1B,GAAG,CAAC,EAAE,CAAC;AACP,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW;AAAA,IACX;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;",
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
+ "m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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
6
  "names": []
7
7
  }
@@ -1,20 +1,99 @@
1
1
  // packages/components/src/border-box-control/border-box-control-linked-button/hook.ts
2
- import { useMemo } from "@wordpress/element";
3
- import * as styles from "../styles.mjs";
2
+ import clsx from "clsx";
3
+
4
+ // packages/style-runtime/src/index.ts
5
+ var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
6
+ function getRuntime() {
7
+ const globalScope = globalThis;
8
+ if (globalScope.__wpStyleRuntime) {
9
+ return globalScope.__wpStyleRuntime;
10
+ }
11
+ globalScope.__wpStyleRuntime = {
12
+ documents: /* @__PURE__ */ new Map(),
13
+ styles: /* @__PURE__ */ new Map(),
14
+ injectedStyles: /* @__PURE__ */ new WeakMap()
15
+ };
16
+ if (typeof document !== "undefined") {
17
+ registerDocument(document);
18
+ }
19
+ return globalScope.__wpStyleRuntime;
20
+ }
21
+ function documentContainsStyleHash(targetDocument, hash) {
22
+ if (!targetDocument.head) {
23
+ return false;
24
+ }
25
+ for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {
26
+ if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
27
+ return true;
28
+ }
29
+ }
30
+ return false;
31
+ }
32
+ function injectStyle(targetDocument, hash, css) {
33
+ if (!targetDocument.head) {
34
+ return;
35
+ }
36
+ const runtime = getRuntime();
37
+ let injectedStyles = runtime.injectedStyles.get(targetDocument);
38
+ if (!injectedStyles) {
39
+ injectedStyles = /* @__PURE__ */ new Set();
40
+ runtime.injectedStyles.set(targetDocument, injectedStyles);
41
+ }
42
+ if (injectedStyles.has(hash)) {
43
+ return;
44
+ }
45
+ if (documentContainsStyleHash(targetDocument, hash)) {
46
+ injectedStyles.add(hash);
47
+ return;
48
+ }
49
+ const style = targetDocument.createElement("style");
50
+ style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
51
+ style.appendChild(targetDocument.createTextNode(css));
52
+ targetDocument.head.appendChild(style);
53
+ injectedStyles.add(hash);
54
+ }
55
+ function registerDocument(targetDocument) {
56
+ const runtime = getRuntime();
57
+ runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
58
+ for (const [hash, css] of runtime.styles) {
59
+ injectStyle(targetDocument, hash, css);
60
+ }
61
+ return () => {
62
+ const count = runtime.documents.get(targetDocument);
63
+ if (count === void 0) {
64
+ return;
65
+ }
66
+ if (count <= 1) {
67
+ runtime.documents.delete(targetDocument);
68
+ return;
69
+ }
70
+ runtime.documents.set(targetDocument, count - 1);
71
+ };
72
+ }
73
+ function registerStyle(hash, css) {
74
+ const runtime = getRuntime();
75
+ runtime.styles.set(hash, css);
76
+ for (const targetDocument of runtime.documents.keys()) {
77
+ injectStyle(targetDocument, hash, css);
78
+ }
79
+ }
80
+
81
+ // packages/components/src/border-box-control/style.module.scss
82
+ if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
83
+ 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}");
84
+ }
85
+ 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" };
86
+
87
+ // packages/components/src/border-box-control/border-box-control-linked-button/hook.ts
4
88
  import { useContextSystem } from "../../context/index.mjs";
5
- import { useCx } from "../../utils/hooks/use-cx.mjs";
6
89
  function useBorderBoxControlLinkedButton(props) {
7
90
  const {
8
91
  className,
9
92
  ...otherProps
10
93
  } = useContextSystem(props, "BorderBoxControlLinkedButton");
11
- const cx = useCx();
12
- const classes = useMemo(() => {
13
- return cx(styles.borderBoxControlLinkedButton, className);
14
- }, [className, cx]);
15
94
  return {
16
95
  ...otherProps,
17
- className: classes
96
+ className: clsx(style_module_default["linked-button"], className)
18
97
  };
19
98
  }
20
99
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/border-box-control/border-box-control-linked-button/hook.ts"],
4
- "sourcesContent": ["import { useMemo } from '@wordpress/element';\nimport * as styles from '../styles';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nexport function useBorderBoxControlLinkedButton(props) {\n const {\n className,\n ...otherProps\n } = useContextSystem(props, 'BorderBoxControlLinkedButton');\n\n // Generate class names.\n const cx = useCx();\n const classes = useMemo(() => {\n return cx(styles.borderBoxControlLinkedButton, className);\n }, [className, cx]);\n return {\n ...otherProps,\n className: classes\n };\n}"],
5
- "mappings": ";AAAA,SAAS,eAAe;AACxB,YAAY,YAAY;AACxB,SAAS,wBAAwB;AACjC,SAAS,aAAa;AACf,SAAS,gCAAgC,OAAO;AACrD,QAAM;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,EACL,IAAI,iBAAiB,OAAO,8BAA8B;AAG1D,QAAM,KAAK,MAAM;AACjB,QAAM,UAAU,QAAQ,MAAM;AAC5B,WAAO,GAAU,qCAA8B,SAAS;AAAA,EAC1D,GAAG,CAAC,WAAW,EAAE,CAAC;AAClB,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW;AAAA,EACb;AACF;",
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,OAAO,UAAU;;;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;AAC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AA,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,SAAS,wBAAwB;AAC1B,SAAS,gCAAgC,OAAO;AACrD,QAAM;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,EACL,IAAI,iBAAiB,OAAO,8BAA8B;AAC1D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW,KAAK,qBAAO,eAAe,GAAG,SAAS;AAAA,EACpD;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,91 @@
1
1
  // packages/components/src/border-box-control/border-box-control-split-controls/hook.ts
2
- import { useMemo } from "@wordpress/element";
3
- import * as styles from "../styles.mjs";
2
+ import clsx from "clsx";
3
+
4
+ // packages/style-runtime/src/index.ts
5
+ var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
6
+ function getRuntime() {
7
+ const globalScope = globalThis;
8
+ if (globalScope.__wpStyleRuntime) {
9
+ return globalScope.__wpStyleRuntime;
10
+ }
11
+ globalScope.__wpStyleRuntime = {
12
+ documents: /* @__PURE__ */ new Map(),
13
+ styles: /* @__PURE__ */ new Map(),
14
+ injectedStyles: /* @__PURE__ */ new WeakMap()
15
+ };
16
+ if (typeof document !== "undefined") {
17
+ registerDocument(document);
18
+ }
19
+ return globalScope.__wpStyleRuntime;
20
+ }
21
+ function documentContainsStyleHash(targetDocument, hash) {
22
+ if (!targetDocument.head) {
23
+ return false;
24
+ }
25
+ for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {
26
+ if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
27
+ return true;
28
+ }
29
+ }
30
+ return false;
31
+ }
32
+ function injectStyle(targetDocument, hash, css) {
33
+ if (!targetDocument.head) {
34
+ return;
35
+ }
36
+ const runtime = getRuntime();
37
+ let injectedStyles = runtime.injectedStyles.get(targetDocument);
38
+ if (!injectedStyles) {
39
+ injectedStyles = /* @__PURE__ */ new Set();
40
+ runtime.injectedStyles.set(targetDocument, injectedStyles);
41
+ }
42
+ if (injectedStyles.has(hash)) {
43
+ return;
44
+ }
45
+ if (documentContainsStyleHash(targetDocument, hash)) {
46
+ injectedStyles.add(hash);
47
+ return;
48
+ }
49
+ const style = targetDocument.createElement("style");
50
+ style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
51
+ style.appendChild(targetDocument.createTextNode(css));
52
+ targetDocument.head.appendChild(style);
53
+ injectedStyles.add(hash);
54
+ }
55
+ function registerDocument(targetDocument) {
56
+ const runtime = getRuntime();
57
+ runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
58
+ for (const [hash, css] of runtime.styles) {
59
+ injectStyle(targetDocument, hash, css);
60
+ }
61
+ return () => {
62
+ const count = runtime.documents.get(targetDocument);
63
+ if (count === void 0) {
64
+ return;
65
+ }
66
+ if (count <= 1) {
67
+ runtime.documents.delete(targetDocument);
68
+ return;
69
+ }
70
+ runtime.documents.set(targetDocument, count - 1);
71
+ };
72
+ }
73
+ function registerStyle(hash, css) {
74
+ const runtime = getRuntime();
75
+ runtime.styles.set(hash, css);
76
+ for (const targetDocument of runtime.documents.keys()) {
77
+ injectStyle(targetDocument, hash, css);
78
+ }
79
+ }
80
+
81
+ // packages/components/src/border-box-control/style.module.scss
82
+ if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
83
+ 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}");
84
+ }
85
+ 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" };
86
+
87
+ // packages/components/src/border-box-control/border-box-control-split-controls/hook.ts
4
88
  import { useContextSystem } from "../../context/index.mjs";
5
- import { useCx } from "../../utils/index.mjs";
6
89
  function useBorderBoxControlSplitControls(props) {
7
90
  const {
8
91
  className,
@@ -12,24 +95,14 @@ function useBorderBoxControlSplitControls(props) {
12
95
  __experimentalIsRenderedInSidebar = false,
13
96
  ...otherProps
14
97
  } = useContextSystem(props, "BorderBoxControlSplitControls");
15
- const cx = useCx();
16
- const classes = useMemo(() => {
17
- return cx(styles.borderBoxControlSplitControls, className);
18
- }, [cx, className]);
19
- const centeredClassName = useMemo(() => {
20
- return cx(styles.centeredBorderControl, className);
21
- }, [cx, className]);
22
- const rightAlignedClassName = useMemo(() => {
23
- return cx(styles.rightBorderControl(), className);
24
- }, [cx, className]);
25
98
  return {
26
99
  ...otherProps,
27
- centeredClassName,
28
- className: classes,
100
+ centeredClassName: clsx(style_module_default["centered-border-control"], className),
101
+ className: clsx(style_module_default["split-controls"], className),
29
102
  colors,
30
103
  enableAlpha,
31
104
  enableStyle,
32
- rightAlignedClassName,
105
+ rightAlignedClassName: clsx(style_module_default["right-border-control"], className),
33
106
  __experimentalIsRenderedInSidebar
34
107
  };
35
108
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/border-box-control/border-box-control-split-controls/hook.ts"],
4
- "sourcesContent": ["import { useMemo } from '@wordpress/element';\nimport * as styles from '../styles';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/';\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\n // Generate class names.\n const cx = useCx();\n const classes = useMemo(() => {\n return cx(styles.borderBoxControlSplitControls, className);\n }, [cx, className]);\n const centeredClassName = useMemo(() => {\n return cx(styles.centeredBorderControl, className);\n }, [cx, className]);\n const rightAlignedClassName = useMemo(() => {\n return cx(styles.rightBorderControl(), className);\n }, [cx, className]);\n return {\n ...otherProps,\n centeredClassName,\n className: classes,\n colors,\n enableAlpha,\n enableStyle,\n rightAlignedClassName,\n __experimentalIsRenderedInSidebar\n };\n}"],
5
- "mappings": ";AAAA,SAAS,eAAe;AACxB,YAAY,YAAY;AACxB,SAAS,wBAAwB;AACjC,SAAS,aAAa;AACf,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,IAAI,iBAAiB,OAAO,+BAA+B;AAG3D,QAAM,KAAK,MAAM;AACjB,QAAM,UAAU,QAAQ,MAAM;AAC5B,WAAO,GAAU,sCAA+B,SAAS;AAAA,EAC3D,GAAG,CAAC,IAAI,SAAS,CAAC;AAClB,QAAM,oBAAoB,QAAQ,MAAM;AACtC,WAAO,GAAU,8BAAuB,SAAS;AAAA,EACnD,GAAG,CAAC,IAAI,SAAS,CAAC;AAClB,QAAM,wBAAwB,QAAQ,MAAM;AAC1C,WAAO,GAAU,0BAAmB,GAAG,SAAS;AAAA,EAClD,GAAG,CAAC,IAAI,SAAS,CAAC;AAClB,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
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,OAAO,UAAU;;;ACAjB,IAAM,uBAAuB;AAU7B,SAAS,aAAa;AACpB,QAAM,c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
7
  }
@@ -1,21 +1,121 @@
1
1
  // packages/components/src/border-box-control/border-box-control-visualizer/hook.ts
2
- import { useMemo } from "@wordpress/element";
3
- import * as styles from "../styles.mjs";
2
+ import clsx from "clsx";
3
+
4
+ // packages/style-runtime/src/index.ts
5
+ var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
6
+ function getRuntime() {
7
+ const globalScope = globalThis;
8
+ if (globalScope.__wpStyleRuntime) {
9
+ return globalScope.__wpStyleRuntime;
10
+ }
11
+ globalScope.__wpStyleRuntime = {
12
+ documents: /* @__PURE__ */ new Map(),
13
+ styles: /* @__PURE__ */ new Map(),
14
+ injectedStyles: /* @__PURE__ */ new WeakMap()
15
+ };
16
+ if (typeof document !== "undefined") {
17
+ registerDocument(document);
18
+ }
19
+ return globalScope.__wpStyleRuntime;
20
+ }
21
+ function documentContainsStyleHash(targetDocument, hash) {
22
+ if (!targetDocument.head) {
23
+ return false;
24
+ }
25
+ for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {
26
+ if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
27
+ return true;
28
+ }
29
+ }
30
+ return false;
31
+ }
32
+ function injectStyle(targetDocument, hash, css) {
33
+ if (!targetDocument.head) {
34
+ return;
35
+ }
36
+ const runtime = getRuntime();
37
+ let injectedStyles = runtime.injectedStyles.get(targetDocument);
38
+ if (!injectedStyles) {
39
+ injectedStyles = /* @__PURE__ */ new Set();
40
+ runtime.injectedStyles.set(targetDocument, injectedStyles);
41
+ }
42
+ if (injectedStyles.has(hash)) {
43
+ return;
44
+ }
45
+ if (documentContainsStyleHash(targetDocument, hash)) {
46
+ injectedStyles.add(hash);
47
+ return;
48
+ }
49
+ const style = targetDocument.createElement("style");
50
+ style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
51
+ style.appendChild(targetDocument.createTextNode(css));
52
+ targetDocument.head.appendChild(style);
53
+ injectedStyles.add(hash);
54
+ }
55
+ function registerDocument(targetDocument) {
56
+ const runtime = getRuntime();
57
+ runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
58
+ for (const [hash, css] of runtime.styles) {
59
+ injectStyle(targetDocument, hash, css);
60
+ }
61
+ return () => {
62
+ const count = runtime.documents.get(targetDocument);
63
+ if (count === void 0) {
64
+ return;
65
+ }
66
+ if (count <= 1) {
67
+ runtime.documents.delete(targetDocument);
68
+ return;
69
+ }
70
+ runtime.documents.set(targetDocument, count - 1);
71
+ };
72
+ }
73
+ function registerStyle(hash, css) {
74
+ const runtime = getRuntime();
75
+ runtime.styles.set(hash, css);
76
+ for (const targetDocument of runtime.documents.keys()) {
77
+ injectStyle(targetDocument, hash, css);
78
+ }
79
+ }
80
+
81
+ // packages/components/src/border-box-control/style.module.scss
82
+ if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
83
+ 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}");
84
+ }
85
+ 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" };
86
+
87
+ // packages/components/src/border-box-control/border-box-control-visualizer/hook.ts
88
+ import { COLORS, CONFIG } from "../../utils/index.mjs";
4
89
  import { useContextSystem } from "../../context/index.mjs";
5
- import { useCx } from "../../utils/index.mjs";
90
+ var borderBoxStyleWithFallback = (border) => {
91
+ const {
92
+ color = COLORS.gray[200],
93
+ style = "solid",
94
+ width = CONFIG.borderWidth
95
+ } = border || {};
96
+ const clampedWidth = width !== CONFIG.borderWidth ? `clamp(1px, ${width}, 10px)` : width;
97
+ const hasVisibleBorder = !!width && width !== "0" || !!color;
98
+ const borderStyle = hasVisibleBorder ? style || "solid" : style;
99
+ return `${color} ${borderStyle} ${clampedWidth}`;
100
+ };
6
101
  function useBorderBoxControlVisualizer(props) {
7
102
  const {
8
103
  className,
104
+ style,
9
105
  value,
10
106
  ...otherProps
11
107
  } = useContextSystem(props, "BorderBoxControlVisualizer");
12
- const cx = useCx();
13
- const classes = useMemo(() => {
14
- return cx(styles.borderBoxControlVisualizer(value), className);
15
- }, [cx, className, value]);
16
108
  return {
17
109
  ...otherProps,
18
- className: classes,
110
+ className: clsx(style_module_default.visualizer, className),
111
+ style: {
112
+ ...style,
113
+ "--wp-components-border-box-visualizer-top": borderBoxStyleWithFallback(value?.top),
114
+ "--wp-components-border-box-visualizer-bottom": borderBoxStyleWithFallback(value?.bottom),
115
+ // Logical properties map left/right to inline start/end for RTL.
116
+ "--wp-components-border-box-visualizer-start": borderBoxStyleWithFallback(value?.left),
117
+ "--wp-components-border-box-visualizer-end": borderBoxStyleWithFallback(value?.right)
118
+ },
19
119
  value
20
120
  };
21
121
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/border-box-control/border-box-control-visualizer/hook.ts"],
4
- "sourcesContent": ["import { useMemo } from '@wordpress/element';\nimport * as styles from '../styles';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils';\nexport function useBorderBoxControlVisualizer(props) {\n const {\n className,\n value,\n ...otherProps\n } = useContextSystem(props, 'BorderBoxControlVisualizer');\n\n // Generate class names.\n const cx = useCx();\n const classes = useMemo(() => {\n return cx(styles.borderBoxControlVisualizer(value), className);\n }, [cx, className, value]);\n return {\n ...otherProps,\n className: classes,\n value\n };\n}"],
5
- "mappings": ";AAAA,SAAS,eAAe;AACxB,YAAY,YAAY;AACxB,SAAS,wBAAwB;AACjC,SAAS,aAAa;AACf,SAAS,8BAA8B,OAAO;AACnD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI,iBAAiB,OAAO,4BAA4B;AAGxD,QAAM,KAAK,MAAM;AACjB,QAAM,UAAU,QAAQ,MAAM;AAC5B,WAAO,GAAU,kCAA2B,KAAK,GAAG,SAAS;AAAA,EAC/D,GAAG,CAAC,IAAI,WAAW,KAAK,CAAC;AACzB,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW;AAAA,IACX;AAAA,EACF;AACF;",
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,OAAO,UAAU;;;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,eA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