@wordpress/components 27.4.0 → 27.6.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 (1287) hide show
  1. package/CHANGELOG.md +47 -1
  2. package/build/alignment-matrix-control/icon.js +2 -2
  3. package/build/alignment-matrix-control/icon.js.map +1 -1
  4. package/build/alignment-matrix-control/index.js +5 -3
  5. package/build/alignment-matrix-control/index.js.map +1 -1
  6. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +8 -8
  7. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  8. package/build/alignment-matrix-control/utils.js +6 -2
  9. package/build/alignment-matrix-control/utils.js.map +1 -1
  10. package/build/angle-picker-control/index.js +2 -2
  11. package/build/angle-picker-control/index.js.map +1 -1
  12. package/build/animate/index.js +4 -4
  13. package/build/animate/index.js.map +1 -1
  14. package/build/autocomplete/autocompleter-ui.js +5 -3
  15. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  16. package/build/autocomplete/index.js +21 -7
  17. package/build/autocomplete/index.js.map +1 -1
  18. package/build/base-control/hooks.js +1 -4
  19. package/build/base-control/hooks.js.map +1 -1
  20. package/build/base-control/index.js +2 -2
  21. package/build/base-control/index.js.map +1 -1
  22. package/build/base-control/types.js.map +1 -1
  23. package/build/border-control/types.js.map +1 -1
  24. package/build/button/index.js +2 -2
  25. package/build/button/index.js.map +1 -1
  26. package/build/button-group/index.js +2 -2
  27. package/build/button-group/index.js.map +1 -1
  28. package/build/checkbox-control/index.js +11 -4
  29. package/build/checkbox-control/index.js.map +1 -1
  30. package/build/circular-option-picker/circular-option-picker-actions.js +3 -3
  31. package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  32. package/build/circular-option-picker/circular-option-picker-option-group.js +2 -2
  33. package/build/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
  34. package/build/circular-option-picker/circular-option-picker-option.js +2 -2
  35. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  36. package/build/circular-option-picker/circular-option-picker.js +2 -2
  37. package/build/circular-option-picker/circular-option-picker.js.map +1 -1
  38. package/build/clipboard-button/index.js +2 -2
  39. package/build/clipboard-button/index.js.map +1 -1
  40. package/build/color-indicator/index.js +2 -2
  41. package/build/color-indicator/index.js.map +1 -1
  42. package/build/color-palette/index.js +2 -2
  43. package/build/color-palette/index.js.map +1 -1
  44. package/build/color-picker/hex-input.js +3 -1
  45. package/build/color-picker/hex-input.js.map +1 -1
  46. package/build/color-picker/hue-picker.native.js +6 -2
  47. package/build/color-picker/hue-picker.native.js.map +1 -1
  48. package/build/color-picker/index.native.js +9 -3
  49. package/build/color-picker/index.native.js.map +1 -1
  50. package/build/color-picker/saturation-picker.native.js +6 -2
  51. package/build/color-picker/saturation-picker.native.js.map +1 -1
  52. package/build/color-picker/use-deprecated-props.js +9 -3
  53. package/build/color-picker/use-deprecated-props.js.map +1 -1
  54. package/build/combobox-control/index.js +7 -2
  55. package/build/combobox-control/index.js.map +1 -1
  56. package/build/combobox-control/types.js.map +1 -1
  57. package/build/context/context-connect.js +6 -2
  58. package/build/context/context-connect.js.map +1 -1
  59. package/build/custom-gradient-picker/gradient-bar/control-points.js +3 -3
  60. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  61. package/build/custom-gradient-picker/gradient-bar/index.js +2 -2
  62. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  63. package/build/custom-gradient-picker/index.js.map +1 -1
  64. package/build/custom-select-control/index.js +3 -3
  65. package/build/custom-select-control/index.js.map +1 -1
  66. package/build/custom-select-control-v2/legacy-component/index.js +3 -1
  67. package/build/custom-select-control-v2/legacy-component/index.js.map +1 -1
  68. package/build/dimension-control/index.js +2 -2
  69. package/build/dimension-control/index.js.map +1 -1
  70. package/build/drop-zone/index.js +74 -66
  71. package/build/drop-zone/index.js.map +1 -1
  72. package/build/dropdown/index.js +2 -2
  73. package/build/dropdown/index.js.map +1 -1
  74. package/build/dropdown/styles.js +5 -3
  75. package/build/dropdown/styles.js.map +1 -1
  76. package/build/dropdown-menu/index.js +5 -5
  77. package/build/dropdown-menu/index.js.map +1 -1
  78. package/build/dropdown-menu/index.native.js +4 -4
  79. package/build/dropdown-menu/index.native.js.map +1 -1
  80. package/build/duotone-picker/utils.js +3 -1
  81. package/build/duotone-picker/utils.js.map +1 -1
  82. package/build/elevation/hook.js +5 -6
  83. package/build/elevation/hook.js.map +1 -1
  84. package/build/external-link/index.js +2 -2
  85. package/build/external-link/index.js.map +1 -1
  86. package/build/focal-point-picker/controls.js +3 -1
  87. package/build/focal-point-picker/controls.js.map +1 -1
  88. package/build/focal-point-picker/focal-point.js +2 -2
  89. package/build/focal-point-picker/focal-point.js.map +1 -1
  90. package/build/focal-point-picker/index.js +23 -9
  91. package/build/focal-point-picker/index.js.map +1 -1
  92. package/build/focal-point-picker/styles/focal-point-picker-style.js +12 -12
  93. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  94. package/build/focal-point-picker/tooltip/index.native.js +3 -8
  95. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  96. package/build/focal-point-picker/utils.js +3 -1
  97. package/build/focal-point-picker/utils.js.map +1 -1
  98. package/build/font-size-picker/index.js +3 -2
  99. package/build/font-size-picker/index.js.map +1 -1
  100. package/build/font-size-picker/types.js.map +1 -1
  101. package/build/form-toggle/index.js +2 -2
  102. package/build/form-toggle/index.js.map +1 -1
  103. package/build/form-token-field/index.js +3 -3
  104. package/build/form-token-field/index.js.map +1 -1
  105. package/build/form-token-field/suggestions-list.js +9 -5
  106. package/build/form-token-field/suggestions-list.js.map +1 -1
  107. package/build/form-token-field/token-input.js +2 -2
  108. package/build/form-token-field/token-input.js.map +1 -1
  109. package/build/form-token-field/token.js +2 -2
  110. package/build/form-token-field/token.js.map +1 -1
  111. package/build/guide/index.js +2 -2
  112. package/build/guide/index.js.map +1 -1
  113. package/build/input-control/index.js +3 -6
  114. package/build/input-control/index.js.map +1 -1
  115. package/build/input-control/input-field.js +3 -1
  116. package/build/input-control/input-field.js.map +1 -1
  117. package/build/input-control/label.js +3 -1
  118. package/build/input-control/label.js.map +1 -1
  119. package/build/input-control/styles/input-control-styles.js +31 -23
  120. package/build/input-control/styles/input-control-styles.js.map +1 -1
  121. package/build/input-control/utils.js +8 -4
  122. package/build/input-control/utils.js.map +1 -1
  123. package/build/item-group/item/hook.js +0 -4
  124. package/build/item-group/item/hook.js.map +1 -1
  125. package/build/menu-group/index.js +2 -2
  126. package/build/menu-group/index.js.map +1 -1
  127. package/build/menu-item/index.js +3 -3
  128. package/build/menu-item/index.js.map +1 -1
  129. package/build/mobile/color-settings/utils.native.js +1 -1
  130. package/build/mobile/color-settings/utils.native.js.map +1 -1
  131. package/build/mobile/gradient/index.native.js +3 -1
  132. package/build/mobile/gradient/index.native.js.map +1 -1
  133. package/build/mobile/keyboard-aware-flat-list/index.android.js +9 -3
  134. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  135. package/build/mobile/keyboard-aware-flat-list/index.ios.js +15 -13
  136. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  137. package/build/mobile/keyboard-aware-flat-list/shared.native.js +33 -0
  138. package/build/mobile/keyboard-aware-flat-list/shared.native.js.map +1 -0
  139. package/build/modal/aria-helper.js +9 -3
  140. package/build/modal/aria-helper.js.map +1 -1
  141. package/build/modal/index.js +10 -6
  142. package/build/modal/index.js.map +1 -1
  143. package/build/navigation/back-button/index.js +2 -2
  144. package/build/navigation/back-button/index.js.map +1 -1
  145. package/build/navigation/group/index.js +2 -2
  146. package/build/navigation/group/index.js.map +1 -1
  147. package/build/navigation/index.js +3 -3
  148. package/build/navigation/index.js.map +1 -1
  149. package/build/navigation/item/base.js +2 -2
  150. package/build/navigation/item/base.js.map +1 -1
  151. package/build/navigation/item/index.js +2 -2
  152. package/build/navigation/item/index.js.map +1 -1
  153. package/build/navigation/menu/index.js +2 -2
  154. package/build/navigation/menu/index.js.map +1 -1
  155. package/build/navigation/styles/navigation-styles.js +12 -12
  156. package/build/navigation/styles/navigation-styles.js.map +1 -1
  157. package/build/notice/index.js +3 -3
  158. package/build/notice/index.js.map +1 -1
  159. package/build/notice/list.js +2 -2
  160. package/build/notice/list.js.map +1 -1
  161. package/build/number-control/index.js +2 -2
  162. package/build/number-control/index.js.map +1 -1
  163. package/build/palette-edit/index.js +5 -5
  164. package/build/palette-edit/index.js.map +1 -1
  165. package/build/palette-edit/styles.js +14 -15
  166. package/build/palette-edit/styles.js.map +1 -1
  167. package/build/panel/body.js +5 -3
  168. package/build/panel/body.js.map +1 -1
  169. package/build/panel/index.js +2 -2
  170. package/build/panel/index.js.map +1 -1
  171. package/build/panel/row.js +2 -2
  172. package/build/panel/row.js.map +1 -1
  173. package/build/placeholder/index.js +3 -3
  174. package/build/placeholder/index.js.map +1 -1
  175. package/build/popover/index.js +5 -3
  176. package/build/popover/index.js.map +1 -1
  177. package/build/popover/overlay-middlewares.js +3 -1
  178. package/build/popover/overlay-middlewares.js.map +1 -1
  179. package/build/query-controls/author-select.js +3 -1
  180. package/build/query-controls/author-select.js.map +1 -1
  181. package/build/radio-control/index.js +2 -2
  182. package/build/radio-control/index.js.map +1 -1
  183. package/build/range-control/index.js +3 -3
  184. package/build/range-control/index.js.map +1 -1
  185. package/build/range-control/mark.js +3 -3
  186. package/build/range-control/mark.js.map +1 -1
  187. package/build/range-control/rail.js +1 -1
  188. package/build/range-control/rail.js.map +1 -1
  189. package/build/range-control/styles/range-control-styles.js +29 -29
  190. package/build/range-control/styles/range-control-styles.js.map +1 -1
  191. package/build/range-control/tooltip.js +2 -2
  192. package/build/range-control/tooltip.js.map +1 -1
  193. package/build/resizable-box/index.js +10 -10
  194. package/build/resizable-box/index.js.map +1 -1
  195. package/build/resizable-box/resize-tooltip/index.js +5 -3
  196. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  197. package/build/resizable-box/resize-tooltip/label.js +3 -1
  198. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  199. package/build/resizable-box/resize-tooltip/utils.js +12 -4
  200. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  201. package/build/responsive-wrapper/index.js +2 -2
  202. package/build/responsive-wrapper/index.js.map +1 -1
  203. package/build/search-control/index.js +2 -2
  204. package/build/search-control/index.js.map +1 -1
  205. package/build/select-control/index.js +5 -3
  206. package/build/select-control/index.js.map +1 -1
  207. package/build/select-control/styles/select-control-styles.js +8 -6
  208. package/build/select-control/styles/select-control-styles.js.map +1 -1
  209. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +3 -3
  210. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  211. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +3 -3
  212. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  213. package/build/slot-fill/bubbles-virtually/use-slot-fills.js +2 -2
  214. package/build/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
  215. package/build/slot-fill/bubbles-virtually/use-slot.js +2 -2
  216. package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  217. package/build/slot-fill/types.js.map +1 -1
  218. package/build/snackbar/index.js +3 -3
  219. package/build/snackbar/index.js.map +1 -1
  220. package/build/snackbar/list.js +2 -2
  221. package/build/snackbar/list.js.map +1 -1
  222. package/build/spinner/index.js +2 -2
  223. package/build/spinner/index.js.map +1 -1
  224. package/build/tab-panel/index.js +2 -2
  225. package/build/tab-panel/index.js.map +1 -1
  226. package/build/text/get-line-height.js +6 -2
  227. package/build/text/get-line-height.js.map +1 -1
  228. package/build/text/utils.js +6 -2
  229. package/build/text/utils.js.map +1 -1
  230. package/build/text-control/index.js +2 -2
  231. package/build/text-control/index.js.map +1 -1
  232. package/build/theme/color-algorithms.js +6 -2
  233. package/build/theme/color-algorithms.js.map +1 -1
  234. package/build/toggle-group-control/toggle-group-control-option-base/component.js +3 -1
  235. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  236. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  237. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  238. package/build/toolbar/toolbar/index.js +2 -2
  239. package/build/toolbar/toolbar/index.js.map +1 -1
  240. package/build/toolbar/toolbar-button/index.js +3 -3
  241. package/build/toolbar/toolbar-button/index.js.map +1 -1
  242. package/build/toolbar/toolbar-group/index.js +2 -2
  243. package/build/toolbar/toolbar-group/index.js.map +1 -1
  244. package/build/tools-panel/tools-panel/hook.js +5 -6
  245. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  246. package/build/tools-panel/tools-panel-item/hook.js +6 -8
  247. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  248. package/build/tools-panel/types.js.map +1 -1
  249. package/build/tree-grid/roving-tab-index-item.js +3 -1
  250. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  251. package/build/truncate/hook.js +1 -1
  252. package/build/truncate/hook.js.map +1 -1
  253. package/build/unit-control/index.js +5 -3
  254. package/build/unit-control/index.js.map +1 -1
  255. package/build/unit-control/unit-select-control.js +2 -2
  256. package/build/unit-control/unit-select-control.js.map +1 -1
  257. package/build/utils/colors.js +21 -7
  258. package/build/utils/colors.js.map +1 -1
  259. package/build/utils/font-size.js +3 -1
  260. package/build/utils/font-size.js.map +1 -1
  261. package/build/utils/get-valid-children.js +3 -1
  262. package/build/utils/get-valid-children.js.map +1 -1
  263. package/build/utils/input/base.js +2 -3
  264. package/build/utils/input/base.js.map +1 -1
  265. package/build/utils/strings.js +11 -57
  266. package/build/utils/strings.js.map +1 -1
  267. package/build/utils/use-responsive-value.js +3 -1
  268. package/build/utils/use-responsive-value.js.map +1 -1
  269. package/build/view/component.js +26 -8
  270. package/build/view/component.js.map +1 -1
  271. package/build-module/alignment-matrix-control/icon.js +2 -2
  272. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  273. package/build-module/alignment-matrix-control/index.js +5 -3
  274. package/build-module/alignment-matrix-control/index.js.map +1 -1
  275. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +9 -9
  276. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  277. package/build-module/alignment-matrix-control/utils.js +6 -2
  278. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  279. package/build-module/angle-picker-control/index.js +2 -2
  280. package/build-module/angle-picker-control/index.js.map +1 -1
  281. package/build-module/animate/index.js +4 -4
  282. package/build-module/animate/index.js.map +1 -1
  283. package/build-module/autocomplete/autocompleter-ui.js +5 -3
  284. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  285. package/build-module/autocomplete/index.js +21 -7
  286. package/build-module/autocomplete/index.js.map +1 -1
  287. package/build-module/base-control/hooks.js +1 -4
  288. package/build-module/base-control/hooks.js.map +1 -1
  289. package/build-module/base-control/index.js +2 -2
  290. package/build-module/base-control/index.js.map +1 -1
  291. package/build-module/base-control/types.js.map +1 -1
  292. package/build-module/border-control/types.js.map +1 -1
  293. package/build-module/button/index.js +2 -2
  294. package/build-module/button/index.js.map +1 -1
  295. package/build-module/button-group/index.js +2 -2
  296. package/build-module/button-group/index.js.map +1 -1
  297. package/build-module/checkbox-control/index.js +11 -4
  298. package/build-module/checkbox-control/index.js.map +1 -1
  299. package/build-module/circular-option-picker/circular-option-picker-actions.js +3 -3
  300. package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  301. package/build-module/circular-option-picker/circular-option-picker-option-group.js +2 -2
  302. package/build-module/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
  303. package/build-module/circular-option-picker/circular-option-picker-option.js +2 -2
  304. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  305. package/build-module/circular-option-picker/circular-option-picker.js +2 -2
  306. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  307. package/build-module/clipboard-button/index.js +2 -2
  308. package/build-module/clipboard-button/index.js.map +1 -1
  309. package/build-module/color-indicator/index.js +2 -2
  310. package/build-module/color-indicator/index.js.map +1 -1
  311. package/build-module/color-palette/index.js +2 -2
  312. package/build-module/color-palette/index.js.map +1 -1
  313. package/build-module/color-picker/hex-input.js +3 -1
  314. package/build-module/color-picker/hex-input.js.map +1 -1
  315. package/build-module/color-picker/hue-picker.native.js +6 -2
  316. package/build-module/color-picker/hue-picker.native.js.map +1 -1
  317. package/build-module/color-picker/index.native.js +9 -3
  318. package/build-module/color-picker/index.native.js.map +1 -1
  319. package/build-module/color-picker/saturation-picker.native.js +6 -2
  320. package/build-module/color-picker/saturation-picker.native.js.map +1 -1
  321. package/build-module/color-picker/use-deprecated-props.js +9 -3
  322. package/build-module/color-picker/use-deprecated-props.js.map +1 -1
  323. package/build-module/combobox-control/index.js +7 -2
  324. package/build-module/combobox-control/index.js.map +1 -1
  325. package/build-module/combobox-control/types.js.map +1 -1
  326. package/build-module/context/context-connect.js +6 -2
  327. package/build-module/context/context-connect.js.map +1 -1
  328. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +3 -3
  329. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  330. package/build-module/custom-gradient-picker/gradient-bar/index.js +2 -2
  331. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  332. package/build-module/custom-gradient-picker/index.js.map +1 -1
  333. package/build-module/custom-select-control/index.js +3 -3
  334. package/build-module/custom-select-control/index.js.map +1 -1
  335. package/build-module/custom-select-control-v2/legacy-component/index.js +3 -1
  336. package/build-module/custom-select-control-v2/legacy-component/index.js.map +1 -1
  337. package/build-module/dimension-control/index.js +2 -2
  338. package/build-module/dimension-control/index.js.map +1 -1
  339. package/build-module/drop-zone/index.js +74 -66
  340. package/build-module/drop-zone/index.js.map +1 -1
  341. package/build-module/dropdown/index.js +2 -2
  342. package/build-module/dropdown/index.js.map +1 -1
  343. package/build-module/dropdown/styles.js +5 -3
  344. package/build-module/dropdown/styles.js.map +1 -1
  345. package/build-module/dropdown-menu/index.js +5 -5
  346. package/build-module/dropdown-menu/index.js.map +1 -1
  347. package/build-module/dropdown-menu/index.native.js +4 -4
  348. package/build-module/dropdown-menu/index.native.js.map +1 -1
  349. package/build-module/duotone-picker/utils.js +3 -1
  350. package/build-module/duotone-picker/utils.js.map +1 -1
  351. package/build-module/elevation/hook.js +6 -7
  352. package/build-module/elevation/hook.js.map +1 -1
  353. package/build-module/external-link/index.js +2 -2
  354. package/build-module/external-link/index.js.map +1 -1
  355. package/build-module/focal-point-picker/controls.js +3 -1
  356. package/build-module/focal-point-picker/controls.js.map +1 -1
  357. package/build-module/focal-point-picker/focal-point.js +2 -2
  358. package/build-module/focal-point-picker/focal-point.js.map +1 -1
  359. package/build-module/focal-point-picker/index.js +23 -9
  360. package/build-module/focal-point-picker/index.js.map +1 -1
  361. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +13 -13
  362. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  363. package/build-module/focal-point-picker/tooltip/index.native.js +3 -8
  364. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  365. package/build-module/focal-point-picker/utils.js +3 -1
  366. package/build-module/focal-point-picker/utils.js.map +1 -1
  367. package/build-module/font-size-picker/index.js +3 -2
  368. package/build-module/font-size-picker/index.js.map +1 -1
  369. package/build-module/font-size-picker/types.js.map +1 -1
  370. package/build-module/form-toggle/index.js +2 -2
  371. package/build-module/form-toggle/index.js.map +1 -1
  372. package/build-module/form-token-field/index.js +3 -3
  373. package/build-module/form-token-field/index.js.map +1 -1
  374. package/build-module/form-token-field/suggestions-list.js +9 -5
  375. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  376. package/build-module/form-token-field/token-input.js +2 -2
  377. package/build-module/form-token-field/token-input.js.map +1 -1
  378. package/build-module/form-token-field/token.js +2 -2
  379. package/build-module/form-token-field/token.js.map +1 -1
  380. package/build-module/guide/index.js +2 -2
  381. package/build-module/guide/index.js.map +1 -1
  382. package/build-module/input-control/index.js +3 -6
  383. package/build-module/input-control/index.js.map +1 -1
  384. package/build-module/input-control/input-field.js +3 -1
  385. package/build-module/input-control/input-field.js.map +1 -1
  386. package/build-module/input-control/label.js +3 -1
  387. package/build-module/input-control/label.js.map +1 -1
  388. package/build-module/input-control/styles/input-control-styles.js +31 -23
  389. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  390. package/build-module/input-control/utils.js +8 -4
  391. package/build-module/input-control/utils.js.map +1 -1
  392. package/build-module/item-group/item/hook.js +0 -4
  393. package/build-module/item-group/item/hook.js.map +1 -1
  394. package/build-module/menu-group/index.js +2 -2
  395. package/build-module/menu-group/index.js.map +1 -1
  396. package/build-module/menu-item/index.js +3 -3
  397. package/build-module/menu-item/index.js.map +1 -1
  398. package/build-module/mobile/color-settings/utils.native.js +1 -1
  399. package/build-module/mobile/color-settings/utils.native.js.map +1 -1
  400. package/build-module/mobile/gradient/index.native.js +3 -1
  401. package/build-module/mobile/gradient/index.native.js.map +1 -1
  402. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +9 -3
  403. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  404. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +16 -15
  405. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  406. package/build-module/mobile/keyboard-aware-flat-list/shared.native.js +27 -0
  407. package/build-module/mobile/keyboard-aware-flat-list/shared.native.js.map +1 -0
  408. package/build-module/modal/aria-helper.js +9 -3
  409. package/build-module/modal/aria-helper.js.map +1 -1
  410. package/build-module/modal/index.js +10 -6
  411. package/build-module/modal/index.js.map +1 -1
  412. package/build-module/navigation/back-button/index.js +2 -2
  413. package/build-module/navigation/back-button/index.js.map +1 -1
  414. package/build-module/navigation/group/index.js +2 -2
  415. package/build-module/navigation/group/index.js.map +1 -1
  416. package/build-module/navigation/index.js +3 -3
  417. package/build-module/navigation/index.js.map +1 -1
  418. package/build-module/navigation/item/base.js +2 -2
  419. package/build-module/navigation/item/base.js.map +1 -1
  420. package/build-module/navigation/item/index.js +2 -2
  421. package/build-module/navigation/item/index.js.map +1 -1
  422. package/build-module/navigation/menu/index.js +2 -2
  423. package/build-module/navigation/menu/index.js.map +1 -1
  424. package/build-module/navigation/styles/navigation-styles.js +13 -13
  425. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  426. package/build-module/notice/index.js +3 -3
  427. package/build-module/notice/index.js.map +1 -1
  428. package/build-module/notice/list.js +2 -2
  429. package/build-module/notice/list.js.map +1 -1
  430. package/build-module/number-control/index.js +2 -2
  431. package/build-module/number-control/index.js.map +1 -1
  432. package/build-module/palette-edit/index.js +6 -6
  433. package/build-module/palette-edit/index.js.map +1 -1
  434. package/build-module/palette-edit/styles.js +13 -14
  435. package/build-module/palette-edit/styles.js.map +1 -1
  436. package/build-module/panel/body.js +5 -3
  437. package/build-module/panel/body.js.map +1 -1
  438. package/build-module/panel/index.js +2 -2
  439. package/build-module/panel/index.js.map +1 -1
  440. package/build-module/panel/row.js +2 -2
  441. package/build-module/panel/row.js.map +1 -1
  442. package/build-module/placeholder/index.js +3 -3
  443. package/build-module/placeholder/index.js.map +1 -1
  444. package/build-module/popover/index.js +5 -3
  445. package/build-module/popover/index.js.map +1 -1
  446. package/build-module/popover/overlay-middlewares.js +3 -1
  447. package/build-module/popover/overlay-middlewares.js.map +1 -1
  448. package/build-module/query-controls/author-select.js +3 -1
  449. package/build-module/query-controls/author-select.js.map +1 -1
  450. package/build-module/radio-control/index.js +2 -2
  451. package/build-module/radio-control/index.js.map +1 -1
  452. package/build-module/range-control/index.js +3 -3
  453. package/build-module/range-control/index.js.map +1 -1
  454. package/build-module/range-control/mark.js +3 -3
  455. package/build-module/range-control/mark.js.map +1 -1
  456. package/build-module/range-control/rail.js +1 -1
  457. package/build-module/range-control/rail.js.map +1 -1
  458. package/build-module/range-control/styles/range-control-styles.js +30 -30
  459. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  460. package/build-module/range-control/tooltip.js +2 -2
  461. package/build-module/range-control/tooltip.js.map +1 -1
  462. package/build-module/resizable-box/index.js +10 -10
  463. package/build-module/resizable-box/index.js.map +1 -1
  464. package/build-module/resizable-box/resize-tooltip/index.js +5 -3
  465. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  466. package/build-module/resizable-box/resize-tooltip/label.js +3 -1
  467. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  468. package/build-module/resizable-box/resize-tooltip/utils.js +12 -4
  469. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  470. package/build-module/responsive-wrapper/index.js +2 -2
  471. package/build-module/responsive-wrapper/index.js.map +1 -1
  472. package/build-module/search-control/index.js +2 -2
  473. package/build-module/search-control/index.js.map +1 -1
  474. package/build-module/select-control/index.js +5 -3
  475. package/build-module/select-control/index.js.map +1 -1
  476. package/build-module/select-control/styles/select-control-styles.js +8 -6
  477. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  478. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +2 -1
  479. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  480. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  481. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  482. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js +1 -1
  483. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
  484. package/build-module/slot-fill/bubbles-virtually/use-slot.js +1 -1
  485. package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  486. package/build-module/slot-fill/types.js.map +1 -1
  487. package/build-module/snackbar/index.js +3 -3
  488. package/build-module/snackbar/index.js.map +1 -1
  489. package/build-module/snackbar/list.js +2 -2
  490. package/build-module/snackbar/list.js.map +1 -1
  491. package/build-module/spinner/index.js +2 -2
  492. package/build-module/spinner/index.js.map +1 -1
  493. package/build-module/tab-panel/index.js +2 -2
  494. package/build-module/tab-panel/index.js.map +1 -1
  495. package/build-module/text/get-line-height.js +6 -2
  496. package/build-module/text/get-line-height.js.map +1 -1
  497. package/build-module/text/utils.js +6 -2
  498. package/build-module/text/utils.js.map +1 -1
  499. package/build-module/text-control/index.js +2 -2
  500. package/build-module/text-control/index.js.map +1 -1
  501. package/build-module/theme/color-algorithms.js +6 -2
  502. package/build-module/theme/color-algorithms.js.map +1 -1
  503. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +3 -1
  504. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  505. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +10 -10
  506. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  507. package/build-module/toolbar/toolbar/index.js +2 -2
  508. package/build-module/toolbar/toolbar/index.js.map +1 -1
  509. package/build-module/toolbar/toolbar-button/index.js +3 -3
  510. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  511. package/build-module/toolbar/toolbar-group/index.js +2 -2
  512. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  513. package/build-module/tools-panel/tools-panel/hook.js +5 -6
  514. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  515. package/build-module/tools-panel/tools-panel-item/hook.js +6 -8
  516. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  517. package/build-module/tools-panel/types.js.map +1 -1
  518. package/build-module/tree-grid/roving-tab-index-item.js +3 -1
  519. package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
  520. package/build-module/truncate/hook.js +1 -1
  521. package/build-module/truncate/hook.js.map +1 -1
  522. package/build-module/unit-control/index.js +5 -3
  523. package/build-module/unit-control/index.js.map +1 -1
  524. package/build-module/unit-control/unit-select-control.js +2 -2
  525. package/build-module/unit-control/unit-select-control.js.map +1 -1
  526. package/build-module/utils/colors.js +21 -7
  527. package/build-module/utils/colors.js.map +1 -1
  528. package/build-module/utils/font-size.js +3 -1
  529. package/build-module/utils/font-size.js.map +1 -1
  530. package/build-module/utils/get-valid-children.js +3 -1
  531. package/build-module/utils/get-valid-children.js.map +1 -1
  532. package/build-module/utils/input/base.js +2 -3
  533. package/build-module/utils/input/base.js.map +1 -1
  534. package/build-module/utils/strings.js +12 -57
  535. package/build-module/utils/strings.js.map +1 -1
  536. package/build-module/utils/use-responsive-value.js +3 -1
  537. package/build-module/utils/use-responsive-value.js.map +1 -1
  538. package/build-module/view/component.js +26 -8
  539. package/build-module/view/component.js.map +1 -1
  540. package/build-style/style-rtl.css +56 -55
  541. package/build-style/style.css +56 -55
  542. package/build-types/alignment-matrix-control/cell.d.ts +1 -1
  543. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
  544. package/build-types/alignment-matrix-control/icon.d.ts +1 -1
  545. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
  546. package/build-types/alignment-matrix-control/index.d.ts +1 -1
  547. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  548. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  549. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  550. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +4 -4
  551. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts +4 -4
  552. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -1
  553. package/build-types/alignment-matrix-control/utils.d.ts.map +1 -1
  554. package/build-types/angle-picker-control/angle-circle.d.ts +1 -1
  555. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
  556. package/build-types/angle-picker-control/index.d.ts +1 -1
  557. package/build-types/angle-picker-control/stories/index.story.d.ts +1 -1
  558. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +4 -4
  559. package/build-types/animate/index.d.ts.map +1 -1
  560. package/build-types/autocomplete/autocompleter-ui.d.ts +1 -1
  561. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  562. package/build-types/autocomplete/index.d.ts +3 -3
  563. package/build-types/autocomplete/index.d.ts.map +1 -1
  564. package/build-types/base-control/hooks.d.ts +1 -0
  565. package/build-types/base-control/hooks.d.ts.map +1 -1
  566. package/build-types/base-control/index.d.ts +2 -2
  567. package/build-types/base-control/index.d.ts.map +1 -1
  568. package/build-types/base-control/styles/base-control-styles.d.ts +5 -5
  569. package/build-types/base-control/types.d.ts +1 -2
  570. package/build-types/base-control/types.d.ts.map +1 -1
  571. package/build-types/border-box-control/border-box-control/hook.d.ts +69 -59
  572. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  573. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +70 -61
  574. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  575. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +69 -59
  576. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  577. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +69 -59
  578. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  579. package/build-types/border-box-control/stories/index.story.d.ts +1 -1
  580. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  581. package/build-types/border-control/border-control/component.d.ts +1 -0
  582. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  583. package/build-types/border-control/border-control/hook.d.ts +70 -59
  584. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  585. package/build-types/border-control/border-control-dropdown/hook.d.ts +69 -59
  586. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  587. package/build-types/border-control/border-control-style-picker/component.d.ts +1 -1
  588. package/build-types/border-control/stories/index.story.d.ts +12 -6
  589. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  590. package/build-types/border-control/types.d.ts +4 -0
  591. package/build-types/border-control/types.d.ts.map +1 -1
  592. package/build-types/box-control/all-input-control.d.ts +1 -1
  593. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  594. package/build-types/box-control/axial-input-controls.d.ts +1 -1
  595. package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
  596. package/build-types/box-control/icon.d.ts +1 -1
  597. package/build-types/box-control/icon.d.ts.map +1 -1
  598. package/build-types/box-control/index.d.ts +1 -1
  599. package/build-types/box-control/index.d.ts.map +1 -1
  600. package/build-types/box-control/input-controls.d.ts +1 -1
  601. package/build-types/box-control/input-controls.d.ts.map +1 -1
  602. package/build-types/box-control/linked-button.d.ts +1 -1
  603. package/build-types/box-control/linked-button.d.ts.map +1 -1
  604. package/build-types/box-control/stories/index.story.d.ts +439 -390
  605. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  606. package/build-types/box-control/styles/box-control-icon-styles.d.ts +6 -6
  607. package/build-types/box-control/styles/box-control-styles.d.ts +5 -5
  608. package/build-types/button/deprecated.d.ts +5 -51
  609. package/build-types/button/deprecated.d.ts.map +1 -1
  610. package/build-types/button/index.d.ts +1 -1
  611. package/build-types/button/index.d.ts.map +1 -1
  612. package/build-types/button/stories/index.story.d.ts +1 -1
  613. package/build-types/button/stories/index.story.d.ts.map +1 -1
  614. package/build-types/button-group/index.d.ts +1 -1
  615. package/build-types/button-group/index.d.ts.map +1 -1
  616. package/build-types/card/card/hook.d.ts +69 -59
  617. package/build-types/card/card/hook.d.ts.map +1 -1
  618. package/build-types/card/card-body/hook.d.ts +69 -59
  619. package/build-types/card/card-body/hook.d.ts.map +1 -1
  620. package/build-types/card/card-divider/hook.d.ts +69 -59
  621. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  622. package/build-types/card/card-footer/hook.d.ts +69 -59
  623. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  624. package/build-types/card/card-header/hook.d.ts +69 -59
  625. package/build-types/card/card-header/hook.d.ts.map +1 -1
  626. package/build-types/card/card-media/hook.d.ts +69 -59
  627. package/build-types/card/card-media/hook.d.ts.map +1 -1
  628. package/build-types/card/stories/index.story.d.ts +2 -2
  629. package/build-types/checkbox-control/index.d.ts +1 -1
  630. package/build-types/checkbox-control/index.d.ts.map +1 -1
  631. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +2 -2
  632. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
  633. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts +1 -1
  634. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -1
  635. package/build-types/circular-option-picker/circular-option-picker-option.d.ts +1 -1
  636. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  637. package/build-types/circular-option-picker/circular-option-picker.d.ts +1 -1
  638. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  639. package/build-types/clipboard-button/index.d.ts +1 -1
  640. package/build-types/clipboard-button/index.d.ts.map +1 -1
  641. package/build-types/color-indicator/index.d.ts +1 -1
  642. package/build-types/color-indicator/index.d.ts.map +1 -1
  643. package/build-types/color-palette/index.d.ts +1 -1
  644. package/build-types/color-palette/index.d.ts.map +1 -1
  645. package/build-types/color-palette/styles.d.ts +1 -1
  646. package/build-types/color-picker/color-copy-button.d.ts +1 -1
  647. package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
  648. package/build-types/color-picker/color-input.d.ts +1 -1
  649. package/build-types/color-picker/color-input.d.ts.map +1 -1
  650. package/build-types/color-picker/component.d.ts +2 -2
  651. package/build-types/color-picker/component.d.ts.map +1 -1
  652. package/build-types/color-picker/hex-input.d.ts +1 -1
  653. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  654. package/build-types/color-picker/hsl-input.d.ts +1 -1
  655. package/build-types/color-picker/hsl-input.d.ts.map +1 -1
  656. package/build-types/color-picker/input-with-slider.d.ts +1 -1
  657. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  658. package/build-types/color-picker/legacy-adapter.d.ts +1 -1
  659. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
  660. package/build-types/color-picker/picker.d.ts +1 -1
  661. package/build-types/color-picker/picker.d.ts.map +1 -1
  662. package/build-types/color-picker/rgb-input.d.ts +1 -1
  663. package/build-types/color-picker/rgb-input.d.ts.map +1 -1
  664. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  665. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  666. package/build-types/color-picker/styles.d.ts +6 -6
  667. package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -1
  668. package/build-types/combobox-control/index.d.ts +3 -1
  669. package/build-types/combobox-control/index.d.ts.map +1 -1
  670. package/build-types/combobox-control/stories/index.story.d.ts +22 -2
  671. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  672. package/build-types/combobox-control/styles.d.ts +1 -1
  673. package/build-types/combobox-control/types.d.ts +1 -0
  674. package/build-types/combobox-control/types.d.ts.map +1 -1
  675. package/build-types/composite/current/stories/utils.d.ts +1 -1
  676. package/build-types/composite/current/stories/utils.d.ts.map +1 -1
  677. package/build-types/composite/legacy/stories/utils.d.ts +1 -1
  678. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  679. package/build-types/confirm-dialog/stories/index.story.d.ts +2 -2
  680. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  681. package/build-types/context/context-connect.d.ts.map +1 -1
  682. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +2 -2
  683. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  684. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +1 -1
  685. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
  686. package/build-types/custom-gradient-picker/index.d.ts +1 -1
  687. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  688. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -2
  689. package/build-types/custom-select-control/index.d.ts +2 -2
  690. package/build-types/custom-select-control/index.d.ts.map +1 -1
  691. package/build-types/custom-select-control-v2/custom-select.d.ts +1 -1
  692. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  693. package/build-types/custom-select-control-v2/default-component/index.d.ts +1 -1
  694. package/build-types/custom-select-control-v2/default-component/index.d.ts.map +1 -1
  695. package/build-types/custom-select-control-v2/item.d.ts +1 -1
  696. package/build-types/custom-select-control-v2/item.d.ts.map +1 -1
  697. package/build-types/custom-select-control-v2/legacy-component/index.d.ts +1 -1
  698. package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +1 -1
  699. package/build-types/custom-select-control-v2/stories/default.story.d.ts +3 -3
  700. package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +1 -1
  701. package/build-types/custom-select-control-v2/styles.d.ts +8 -8
  702. package/build-types/dashicon/index.d.ts +1 -1
  703. package/build-types/dashicon/index.d.ts.map +1 -1
  704. package/build-types/date-time/date/index.d.ts +1 -1
  705. package/build-types/date-time/date/index.d.ts.map +1 -1
  706. package/build-types/date-time/date/styles.d.ts +5 -5
  707. package/build-types/date-time/date-time/styles.d.ts +1 -1
  708. package/build-types/date-time/time/index.d.ts +1 -1
  709. package/build-types/date-time/time/index.d.ts.map +1 -1
  710. package/build-types/date-time/time/styles.d.ts +10 -10
  711. package/build-types/date-time/time/timezone.d.ts +1 -1
  712. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  713. package/build-types/dimension-control/index.d.ts +1 -1
  714. package/build-types/dimension-control/index.d.ts.map +1 -1
  715. package/build-types/disabled/index.d.ts +1 -1
  716. package/build-types/disabled/index.d.ts.map +1 -1
  717. package/build-types/disclosure/index.d.ts +1 -1
  718. package/build-types/disclosure/index.d.ts.map +1 -1
  719. package/build-types/divider/styles.d.ts +1 -1
  720. package/build-types/draggable/index.d.ts +1 -1
  721. package/build-types/draggable/index.d.ts.map +1 -1
  722. package/build-types/drop-zone/index.d.ts +1 -1
  723. package/build-types/drop-zone/index.d.ts.map +1 -1
  724. package/build-types/drop-zone/stories/index.story.d.ts +1 -1
  725. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  726. package/build-types/dropdown/index.d.ts +1 -1
  727. package/build-types/dropdown/index.d.ts.map +1 -1
  728. package/build-types/dropdown/stories/index.story.d.ts +4 -4
  729. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  730. package/build-types/dropdown/styles.d.ts +1 -1
  731. package/build-types/dropdown/styles.d.ts.map +1 -1
  732. package/build-types/dropdown-menu/index.d.ts +1 -1
  733. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  734. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  735. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  736. package/build-types/dropdown-menu-v2/index.d.ts +7 -7
  737. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  738. package/build-types/dropdown-menu-v2/styles.d.ts +12 -12
  739. package/build-types/duotone-picker/color-list-picker/index.d.ts +1 -1
  740. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  741. package/build-types/duotone-picker/custom-duotone-bar.d.ts +1 -1
  742. package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
  743. package/build-types/duotone-picker/duotone-picker.d.ts +1 -1
  744. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  745. package/build-types/duotone-picker/duotone-swatch.d.ts +1 -1
  746. package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -1
  747. package/build-types/duotone-picker/utils.d.ts.map +1 -1
  748. package/build-types/elevation/hook.d.ts +68 -58
  749. package/build-types/elevation/hook.d.ts.map +1 -1
  750. package/build-types/flex/flex/hook.d.ts +69 -59
  751. package/build-types/flex/flex/hook.d.ts.map +1 -1
  752. package/build-types/flex/flex-block/hook.d.ts +69 -59
  753. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  754. package/build-types/flex/flex-item/hook.d.ts +69 -59
  755. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  756. package/build-types/focal-point-picker/controls.d.ts +1 -1
  757. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  758. package/build-types/focal-point-picker/focal-point.d.ts +1 -1
  759. package/build-types/focal-point-picker/focal-point.d.ts.map +1 -1
  760. package/build-types/focal-point-picker/grid.d.ts +1 -1
  761. package/build-types/focal-point-picker/grid.d.ts.map +1 -1
  762. package/build-types/focal-point-picker/index.d.ts +1 -1
  763. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  764. package/build-types/focal-point-picker/media.d.ts +1 -1
  765. package/build-types/focal-point-picker/media.d.ts.map +1 -1
  766. package/build-types/focal-point-picker/stories/index.story.d.ts +8 -8
  767. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  768. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +9 -9
  769. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  770. package/build-types/focal-point-picker/styles/focal-point-style.d.ts +1 -1
  771. package/build-types/focal-point-picker/test/index.d.ts +2 -0
  772. package/build-types/focal-point-picker/test/index.d.ts.map +1 -0
  773. package/build-types/focal-point-picker/test/media.d.ts +2 -0
  774. package/build-types/focal-point-picker/test/media.d.ts.map +1 -0
  775. package/build-types/focal-point-picker/utils.d.ts.map +1 -1
  776. package/build-types/focusable-iframe/index.d.ts +1 -1
  777. package/build-types/focusable-iframe/index.d.ts.map +1 -1
  778. package/build-types/font-size-picker/font-size-picker-select.d.ts +1 -1
  779. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  780. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts +1 -1
  781. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  782. package/build-types/font-size-picker/index.d.ts.map +1 -1
  783. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  784. package/build-types/font-size-picker/styles.d.ts +4 -4
  785. package/build-types/font-size-picker/types.d.ts +2 -0
  786. package/build-types/font-size-picker/types.d.ts.map +1 -1
  787. package/build-types/form-file-upload/index.d.ts +1 -1
  788. package/build-types/form-file-upload/index.d.ts.map +1 -1
  789. package/build-types/form-file-upload/stories/index.story.d.ts +5 -5
  790. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  791. package/build-types/form-toggle/index.d.ts +2 -2
  792. package/build-types/form-toggle/index.d.ts.map +1 -1
  793. package/build-types/form-token-field/index.d.ts +1 -1
  794. package/build-types/form-token-field/index.d.ts.map +1 -1
  795. package/build-types/form-token-field/styles.d.ts +1 -1
  796. package/build-types/form-token-field/suggestions-list.d.ts +2 -1
  797. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  798. package/build-types/form-token-field/token-input.d.ts +2 -2
  799. package/build-types/form-token-field/token-input.d.ts.map +1 -1
  800. package/build-types/form-token-field/token.d.ts +1 -1
  801. package/build-types/form-token-field/token.d.ts.map +1 -1
  802. package/build-types/gradient-picker/index.d.ts +1 -1
  803. package/build-types/gradient-picker/index.d.ts.map +1 -1
  804. package/build-types/grid/hook.d.ts +69 -59
  805. package/build-types/grid/hook.d.ts.map +1 -1
  806. package/build-types/guide/icons.d.ts +1 -1
  807. package/build-types/guide/icons.d.ts.map +1 -1
  808. package/build-types/guide/index.d.ts +1 -1
  809. package/build-types/guide/index.d.ts.map +1 -1
  810. package/build-types/guide/page-control.d.ts +1 -1
  811. package/build-types/guide/page-control.d.ts.map +1 -1
  812. package/build-types/guide/page.d.ts +1 -1
  813. package/build-types/guide/page.d.ts.map +1 -1
  814. package/build-types/h-stack/hook.d.ts +69 -59
  815. package/build-types/h-stack/hook.d.ts.map +1 -1
  816. package/build-types/heading/hook.d.ts +69 -59
  817. package/build-types/heading/hook.d.ts.map +1 -1
  818. package/build-types/higher-order/navigate-regions/index.d.ts +1 -1
  819. package/build-types/higher-order/with-constrained-tabbing/index.d.ts +1 -1
  820. package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
  821. package/build-types/higher-order/with-fallback-styles/index.d.ts +1 -1
  822. package/build-types/higher-order/with-filters/index.d.ts +2 -2
  823. package/build-types/higher-order/with-focus-outside/index.d.ts +1 -1
  824. package/build-types/higher-order/with-notices/index.d.ts +2 -2
  825. package/build-types/higher-order/with-spoken-messages/index.d.ts +1 -1
  826. package/build-types/icon/index.d.ts +1 -1
  827. package/build-types/icon/index.d.ts.map +1 -1
  828. package/build-types/input-control/backdrop.d.ts +1 -1
  829. package/build-types/input-control/backdrop.d.ts.map +1 -1
  830. package/build-types/input-control/index.d.ts +1 -1
  831. package/build-types/input-control/index.d.ts.map +1 -1
  832. package/build-types/input-control/input-base.d.ts +1 -1
  833. package/build-types/input-control/input-base.d.ts.map +1 -1
  834. package/build-types/input-control/input-field.d.ts +1 -1
  835. package/build-types/input-control/input-field.d.ts.map +1 -1
  836. package/build-types/input-control/label.d.ts +1 -1
  837. package/build-types/input-control/label.d.ts.map +1 -1
  838. package/build-types/input-control/stories/index.story.d.ts +2 -1
  839. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  840. package/build-types/input-control/styles/input-control-styles.d.ts +8 -8
  841. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  842. package/build-types/input-control/utils.d.ts.map +1 -1
  843. package/build-types/isolated-event-container/index.d.ts +1 -1
  844. package/build-types/isolated-event-container/index.d.ts.map +1 -1
  845. package/build-types/item-group/item/hook.d.ts +70 -60
  846. package/build-types/item-group/item/hook.d.ts.map +1 -1
  847. package/build-types/item-group/item-group/hook.d.ts +69 -59
  848. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  849. package/build-types/keyboard-shortcuts/index.d.ts +1 -1
  850. package/build-types/keyboard-shortcuts/index.d.ts.map +1 -1
  851. package/build-types/menu-group/index.d.ts +1 -1
  852. package/build-types/menu-group/index.d.ts.map +1 -1
  853. package/build-types/menu-item/index.d.ts +1 -1
  854. package/build-types/menu-item/index.d.ts.map +1 -1
  855. package/build-types/menu-item/stories/index.story.d.ts +4 -4
  856. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  857. package/build-types/menu-items-choice/index.d.ts +1 -1
  858. package/build-types/menu-items-choice/index.d.ts.map +1 -1
  859. package/build-types/modal/aria-helper.d.ts.map +1 -1
  860. package/build-types/modal/index.d.ts.map +1 -1
  861. package/build-types/navigable-container/container.d.ts +1 -1
  862. package/build-types/navigable-container/menu.d.ts +2 -2
  863. package/build-types/navigable-container/menu.d.ts.map +1 -1
  864. package/build-types/navigable-container/tabbable.d.ts +2 -2
  865. package/build-types/navigable-container/tabbable.d.ts.map +1 -1
  866. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  867. package/build-types/navigation/group/index.d.ts +1 -1
  868. package/build-types/navigation/group/index.d.ts.map +1 -1
  869. package/build-types/navigation/index.d.ts +1 -1
  870. package/build-types/navigation/index.d.ts.map +1 -1
  871. package/build-types/navigation/item/base-content.d.ts +1 -1
  872. package/build-types/navigation/item/base-content.d.ts.map +1 -1
  873. package/build-types/navigation/item/base.d.ts +1 -1
  874. package/build-types/navigation/item/base.d.ts.map +1 -1
  875. package/build-types/navigation/item/index.d.ts +1 -1
  876. package/build-types/navigation/item/index.d.ts.map +1 -1
  877. package/build-types/navigation/menu/index.d.ts +1 -1
  878. package/build-types/navigation/menu/index.d.ts.map +1 -1
  879. package/build-types/navigation/menu/menu-title-search.d.ts +1 -1
  880. package/build-types/navigation/menu/menu-title.d.ts +1 -1
  881. package/build-types/navigation/menu/menu-title.d.ts.map +1 -1
  882. package/build-types/navigation/menu/search-no-results-found.d.ts +1 -1
  883. package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -1
  884. package/build-types/navigation/styles/navigation-styles.d.ts +11 -11
  885. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  886. package/build-types/navigator/navigator-back-button/hook.d.ts +70 -61
  887. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  888. package/build-types/navigator/navigator-button/hook.d.ts +70 -61
  889. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  890. package/build-types/notice/index.d.ts +1 -1
  891. package/build-types/notice/index.d.ts.map +1 -1
  892. package/build-types/notice/list.d.ts +1 -1
  893. package/build-types/notice/list.d.ts.map +1 -1
  894. package/build-types/number-control/index.d.ts +1 -1
  895. package/build-types/number-control/index.d.ts.map +1 -1
  896. package/build-types/number-control/stories/index.story.d.ts +1 -1
  897. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  898. package/build-types/palette-edit/index.d.ts +1 -1
  899. package/build-types/palette-edit/index.d.ts.map +1 -1
  900. package/build-types/palette-edit/styles.d.ts +1009 -19
  901. package/build-types/palette-edit/styles.d.ts.map +1 -1
  902. package/build-types/panel/body.d.ts +1 -1
  903. package/build-types/panel/body.d.ts.map +1 -1
  904. package/build-types/panel/header.d.ts +1 -1
  905. package/build-types/panel/header.d.ts.map +1 -1
  906. package/build-types/placeholder/index.d.ts +1 -1
  907. package/build-types/placeholder/index.d.ts.map +1 -1
  908. package/build-types/popover/index.d.ts +1 -1
  909. package/build-types/popover/index.d.ts.map +1 -1
  910. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  911. package/build-types/popover/stories/e2e/index.story.d.ts +2 -2
  912. package/build-types/popover/stories/e2e/index.story.d.ts.map +1 -1
  913. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  914. package/build-types/popover/test/utils/index.d.ts +1 -1
  915. package/build-types/popover/test/utils/index.d.ts.map +1 -1
  916. package/build-types/progress-bar/index.d.ts +1 -1
  917. package/build-types/progress-bar/index.d.ts.map +1 -1
  918. package/build-types/progress-bar/styles.d.ts +3 -3
  919. package/build-types/query-controls/author-select.d.ts +1 -1
  920. package/build-types/query-controls/author-select.d.ts.map +1 -1
  921. package/build-types/query-controls/category-select.d.ts +1 -1
  922. package/build-types/query-controls/category-select.d.ts.map +1 -1
  923. package/build-types/query-controls/index.d.ts +1 -1
  924. package/build-types/query-controls/index.d.ts.map +1 -1
  925. package/build-types/radio-control/index.d.ts +1 -1
  926. package/build-types/radio-control/index.d.ts.map +1 -1
  927. package/build-types/radio-group/index.d.ts +1 -1
  928. package/build-types/radio-group/index.d.ts.map +1 -1
  929. package/build-types/radio-group/radio.d.ts +1 -1
  930. package/build-types/radio-group/radio.d.ts.map +1 -1
  931. package/build-types/range-control/index.d.ts +1 -1
  932. package/build-types/range-control/index.d.ts.map +1 -1
  933. package/build-types/range-control/input-range.d.ts +1 -1
  934. package/build-types/range-control/mark.d.ts +1 -1
  935. package/build-types/range-control/mark.d.ts.map +1 -1
  936. package/build-types/range-control/rail.d.ts +1 -1
  937. package/build-types/range-control/rail.d.ts.map +1 -1
  938. package/build-types/range-control/styles/range-control-styles.d.ts +15 -15
  939. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  940. package/build-types/range-control/tooltip.d.ts +1 -1
  941. package/build-types/range-control/tooltip.d.ts.map +1 -1
  942. package/build-types/resizable-box/index.d.ts +3 -3
  943. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  944. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  945. package/build-types/resizable-box/resize-tooltip/label.d.ts +1 -1
  946. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  947. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +4 -4
  948. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  949. package/build-types/resizable-box/stories/index.story.d.ts +6 -6
  950. package/build-types/responsive-wrapper/index.d.ts +1 -1
  951. package/build-types/responsive-wrapper/index.d.ts.map +1 -1
  952. package/build-types/sandbox/index.d.ts +1 -1
  953. package/build-types/sandbox/index.d.ts.map +1 -1
  954. package/build-types/scrollable/hook.d.ts +69 -59
  955. package/build-types/scrollable/hook.d.ts.map +1 -1
  956. package/build-types/search-control/index.d.ts.map +1 -1
  957. package/build-types/search-control/styles.d.ts +1 -1
  958. package/build-types/select-control/chevron-down.d.ts +1 -1
  959. package/build-types/select-control/chevron-down.d.ts.map +1 -1
  960. package/build-types/select-control/index.d.ts.map +1 -1
  961. package/build-types/select-control/styles/select-control-styles.d.ts +3 -3
  962. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  963. package/build-types/shortcut/index.d.ts +1 -1
  964. package/build-types/shortcut/index.d.ts.map +1 -1
  965. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  966. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +1 -1
  967. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  968. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -1
  969. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
  970. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  971. package/build-types/slot-fill/index.d.ts +7 -7
  972. package/build-types/slot-fill/index.d.ts.map +1 -1
  973. package/build-types/slot-fill/provider.d.ts +1 -1
  974. package/build-types/slot-fill/provider.d.ts.map +1 -1
  975. package/build-types/slot-fill/slot.d.ts +1 -1
  976. package/build-types/slot-fill/slot.d.ts.map +1 -1
  977. package/build-types/slot-fill/types.d.ts +2 -2
  978. package/build-types/slot-fill/types.d.ts.map +1 -1
  979. package/build-types/snackbar/index.d.ts +2 -2
  980. package/build-types/snackbar/index.d.ts.map +1 -1
  981. package/build-types/snackbar/list.d.ts +1 -1
  982. package/build-types/snackbar/list.d.ts.map +1 -1
  983. package/build-types/spacer/hook.d.ts +69 -59
  984. package/build-types/spacer/hook.d.ts.map +1 -1
  985. package/build-types/spinner/index.d.ts +2 -2
  986. package/build-types/spinner/index.d.ts.map +1 -1
  987. package/build-types/spinner/styles.d.ts +3 -3
  988. package/build-types/style-provider/index.d.ts +1 -1
  989. package/build-types/style-provider/index.d.ts.map +1 -1
  990. package/build-types/surface/hook.d.ts +69 -59
  991. package/build-types/surface/hook.d.ts.map +1 -1
  992. package/build-types/tab-panel/index.d.ts +1 -1
  993. package/build-types/tab-panel/index.d.ts.map +1 -1
  994. package/build-types/tab-panel/stories/index.story.d.ts +4 -4
  995. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  996. package/build-types/tabs/index.d.ts +2 -2
  997. package/build-types/tabs/index.d.ts.map +1 -1
  998. package/build-types/tabs/styles.d.ts +3 -3
  999. package/build-types/tabs/tablist.d.ts +1 -1
  1000. package/build-types/tabs/tablist.d.ts.map +1 -1
  1001. package/build-types/text/get-line-height.d.ts.map +1 -1
  1002. package/build-types/text/hook.d.ts +68 -59
  1003. package/build-types/text/hook.d.ts.map +1 -1
  1004. package/build-types/text/stories/index.story.d.ts +3 -3
  1005. package/build-types/text/utils.d.ts.map +1 -1
  1006. package/build-types/text-control/index.d.ts +3 -3
  1007. package/build-types/text-control/index.d.ts.map +1 -1
  1008. package/build-types/text-highlight/index.d.ts +1 -1
  1009. package/build-types/text-highlight/index.d.ts.map +1 -1
  1010. package/build-types/textarea-control/index.d.ts +2 -2
  1011. package/build-types/textarea-control/index.d.ts.map +1 -1
  1012. package/build-types/textarea-control/styles/textarea-control-styles.d.ts +1 -1
  1013. package/build-types/theme/color-algorithms.d.ts.map +1 -1
  1014. package/build-types/theme/index.d.ts +1 -1
  1015. package/build-types/theme/index.d.ts.map +1 -1
  1016. package/build-types/theme/stories/index.story.d.ts +1 -1
  1017. package/build-types/theme/styles.d.ts +1 -1
  1018. package/build-types/tip/index.d.ts +1 -1
  1019. package/build-types/tip/index.d.ts.map +1 -1
  1020. package/build-types/toggle-control/index.d.ts +2 -2
  1021. package/build-types/toggle-control/index.d.ts.map +1 -1
  1022. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  1023. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  1024. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +1 -1
  1025. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  1026. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +1 -1
  1027. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  1028. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +1 -1
  1029. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
  1030. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  1031. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -1
  1032. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  1033. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +2 -2
  1034. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  1035. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  1036. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  1037. package/build-types/toolbar/stories/index.story.d.ts +3 -3
  1038. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  1039. package/build-types/toolbar/toolbar/index.d.ts +1 -1
  1040. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  1041. package/build-types/toolbar/toolbar/toolbar-container.d.ts +1 -1
  1042. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  1043. package/build-types/toolbar/toolbar-button/index.d.ts +5 -51
  1044. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  1045. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +1 -1
  1046. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
  1047. package/build-types/toolbar/toolbar-group/index.d.ts +1 -1
  1048. package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
  1049. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +1 -1
  1050. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
  1051. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +1 -1
  1052. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
  1053. package/build-types/tools-panel/styles.d.ts +1 -1
  1054. package/build-types/tools-panel/tools-panel/hook.d.ts +71 -61
  1055. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  1056. package/build-types/tools-panel/tools-panel-header/hook.d.ts +70 -60
  1057. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  1058. package/build-types/tools-panel/tools-panel-item/hook.d.ts +69 -59
  1059. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  1060. package/build-types/tools-panel/types.d.ts +1 -1
  1061. package/build-types/tools-panel/types.d.ts.map +1 -1
  1062. package/build-types/tree-grid/index.d.ts +1 -1
  1063. package/build-types/tree-grid/index.d.ts.map +1 -1
  1064. package/build-types/tree-grid/item.d.ts +1 -1
  1065. package/build-types/tree-grid/item.d.ts.map +1 -1
  1066. package/build-types/tree-grid/roving-tab-index-item.d.ts +1 -1
  1067. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  1068. package/build-types/tree-grid/roving-tab-index.d.ts +1 -1
  1069. package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -1
  1070. package/build-types/tree-grid/row.d.ts +1 -1
  1071. package/build-types/tree-grid/row.d.ts.map +1 -1
  1072. package/build-types/tree-grid/stories/index.story.d.ts +1 -1
  1073. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  1074. package/build-types/tree-select/index.d.ts +1 -1
  1075. package/build-types/tree-select/index.d.ts.map +1 -1
  1076. package/build-types/truncate/hook.d.ts +69 -59
  1077. package/build-types/truncate/hook.d.ts.map +1 -1
  1078. package/build-types/unit-control/index.d.ts +1 -1
  1079. package/build-types/unit-control/index.d.ts.map +1 -1
  1080. package/build-types/unit-control/styles/unit-control-styles.d.ts +3 -3
  1081. package/build-types/unit-control/unit-select-control.d.ts +1 -1
  1082. package/build-types/utils/colors.d.ts.map +1 -1
  1083. package/build-types/utils/font-size.d.ts.map +1 -1
  1084. package/build-types/utils/get-valid-children.d.ts.map +1 -1
  1085. package/build-types/utils/input/base.d.ts.map +1 -1
  1086. package/build-types/utils/strings.d.ts.map +1 -1
  1087. package/build-types/utils/use-responsive-value.d.ts.map +1 -1
  1088. package/build-types/v-stack/hook.d.ts +69 -59
  1089. package/build-types/v-stack/hook.d.ts.map +1 -1
  1090. package/build-types/v-stack/stories/index.story.d.ts +1 -1
  1091. package/build-types/view/component.d.ts +255 -7
  1092. package/build-types/view/component.d.ts.map +1 -1
  1093. package/build-types/z-stack/styles.d.ts +2 -2
  1094. package/package.json +22 -22
  1095. package/src/alignment-matrix-control/icon.tsx +2 -2
  1096. package/src/alignment-matrix-control/index.tsx +5 -6
  1097. package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.ts +4 -3
  1098. package/src/alignment-matrix-control/utils.tsx +6 -2
  1099. package/src/angle-picker-control/index.tsx +2 -2
  1100. package/src/animate/index.tsx +4 -7
  1101. package/src/autocomplete/autocompleter-ui.tsx +5 -3
  1102. package/src/autocomplete/index.tsx +21 -7
  1103. package/src/autocomplete/style.scss +10 -4
  1104. package/src/base-control/README.md +1 -1
  1105. package/src/base-control/hooks.ts +1 -5
  1106. package/src/base-control/index.tsx +2 -5
  1107. package/src/base-control/test/index.tsx +3 -3
  1108. package/src/base-control/types.ts +1 -2
  1109. package/src/border-control/types.ts +4 -0
  1110. package/src/box-control/test/index.tsx +22 -0
  1111. package/src/button/index.tsx +2 -2
  1112. package/src/button/style.scss +4 -6
  1113. package/src/button-group/index.tsx +2 -2
  1114. package/src/card/test/__snapshots__/index.tsx.snap +44 -47
  1115. package/src/checkbox-control/index.tsx +46 -37
  1116. package/src/checkbox-control/style.scss +12 -1
  1117. package/src/checkbox-control/test/__snapshots__/index.tsx.snap +27 -26
  1118. package/src/checkbox-control/test/index.tsx +5 -0
  1119. package/src/circular-option-picker/circular-option-picker-actions.tsx +3 -3
  1120. package/src/circular-option-picker/circular-option-picker-option-group.tsx +2 -2
  1121. package/src/circular-option-picker/circular-option-picker-option.tsx +2 -2
  1122. package/src/circular-option-picker/circular-option-picker.tsx +2 -5
  1123. package/src/circular-option-picker/style.scss +1 -2
  1124. package/src/clipboard-button/index.tsx +2 -2
  1125. package/src/color-indicator/index.tsx +2 -2
  1126. package/src/color-palette/index.tsx +2 -2
  1127. package/src/color-picker/hex-input.tsx +3 -1
  1128. package/src/color-picker/hue-picker.native.js +6 -2
  1129. package/src/color-picker/index.native.js +9 -3
  1130. package/src/color-picker/saturation-picker.native.js +6 -2
  1131. package/src/color-picker/use-deprecated-props.ts +9 -3
  1132. package/src/combobox-control/README.md +1 -1
  1133. package/src/combobox-control/index.tsx +8 -5
  1134. package/src/combobox-control/stories/index.story.tsx +28 -0
  1135. package/src/combobox-control/types.ts +1 -0
  1136. package/src/context/context-connect.ts +6 -2
  1137. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +3 -3
  1138. package/src/custom-gradient-picker/gradient-bar/index.tsx +2 -2
  1139. package/src/custom-gradient-picker/index.tsx +2 -2
  1140. package/src/custom-select-control/index.js +3 -6
  1141. package/src/custom-select-control-v2/README.md +0 -4
  1142. package/src/custom-select-control-v2/legacy-component/index.tsx +3 -1
  1143. package/src/custom-select-control-v2/stories/default.story.tsx +1 -1
  1144. package/src/custom-select-control-v2/stories/legacy.story.tsx +1 -1
  1145. package/src/dimension-control/index.tsx +2 -5
  1146. package/src/drop-zone/index.tsx +68 -68
  1147. package/src/dropdown/index.tsx +2 -2
  1148. package/src/dropdown/styles.ts +3 -1
  1149. package/src/dropdown-menu/index.native.js +6 -12
  1150. package/src/dropdown-menu/index.tsx +9 -16
  1151. package/src/duotone-picker/utils.ts +3 -1
  1152. package/src/elevation/hook.ts +6 -3
  1153. package/src/elevation/test/__snapshots__/index.tsx.snap +18 -24
  1154. package/src/external-link/index.tsx +2 -2
  1155. package/src/flex/test/__snapshots__/index.tsx.snap +4 -4
  1156. package/src/focal-point-picker/controls.tsx +3 -1
  1157. package/src/focal-point-picker/focal-point.tsx +2 -4
  1158. package/src/focal-point-picker/index.tsx +22 -12
  1159. package/src/focal-point-picker/styles/focal-point-picker-style.ts +4 -3
  1160. package/src/focal-point-picker/test/{index.js → index.tsx} +44 -17
  1161. package/src/focal-point-picker/test/{media.js → media.tsx} +18 -13
  1162. package/src/focal-point-picker/tooltip/index.native.js +1 -7
  1163. package/src/focal-point-picker/utils.ts +3 -1
  1164. package/src/font-size-picker/README.md +1 -0
  1165. package/src/font-size-picker/index.tsx +4 -2
  1166. package/src/font-size-picker/stories/index.story.tsx +0 -1
  1167. package/src/font-size-picker/types.ts +2 -0
  1168. package/src/form-toggle/index.tsx +2 -2
  1169. package/src/form-token-field/index.tsx +10 -8
  1170. package/src/form-token-field/style.scss +9 -0
  1171. package/src/form-token-field/suggestions-list.tsx +16 -10
  1172. package/src/form-token-field/token-input.tsx +2 -2
  1173. package/src/form-token-field/token.tsx +2 -2
  1174. package/src/guide/index.tsx +2 -2
  1175. package/src/higher-order/navigate-regions/style.scss +3 -3
  1176. package/src/input-control/index.tsx +3 -6
  1177. package/src/input-control/input-field.tsx +3 -1
  1178. package/src/input-control/label.tsx +3 -1
  1179. package/src/input-control/stories/index.story.tsx +31 -1
  1180. package/src/input-control/styles/input-control-styles.tsx +12 -4
  1181. package/src/input-control/test/index.js +10 -6
  1182. package/src/input-control/utils.ts +3 -2
  1183. package/src/item-group/item/hook.ts +1 -10
  1184. package/src/item-group/test/__snapshots__/index.js.snap +16 -16
  1185. package/src/menu-group/index.tsx +2 -2
  1186. package/src/menu-item/index.tsx +3 -3
  1187. package/src/mobile/color-settings/utils.native.js +1 -1
  1188. package/src/mobile/gradient/index.native.js +3 -1
  1189. package/src/mobile/keyboard-aware-flat-list/index.android.js +11 -2
  1190. package/src/mobile/keyboard-aware-flat-list/index.ios.js +30 -19
  1191. package/src/mobile/keyboard-aware-flat-list/shared.native.js +26 -0
  1192. package/src/mobile/keyboard-aware-flat-list/styles.native.scss +8 -0
  1193. package/src/modal/aria-helper.ts +8 -3
  1194. package/src/modal/index.tsx +10 -6
  1195. package/src/modal/test/index.tsx +11 -4
  1196. package/src/navigation/back-button/index.tsx +2 -5
  1197. package/src/navigation/group/index.tsx +2 -2
  1198. package/src/navigation/index.tsx +3 -3
  1199. package/src/navigation/item/base.tsx +2 -2
  1200. package/src/navigation/item/index.tsx +2 -2
  1201. package/src/navigation/menu/index.tsx +2 -2
  1202. package/src/navigation/styles/navigation-styles.tsx +4 -3
  1203. package/src/notice/index.tsx +5 -10
  1204. package/src/notice/list.tsx +2 -2
  1205. package/src/number-control/index.tsx +2 -2
  1206. package/src/palette-edit/index.tsx +10 -8
  1207. package/src/palette-edit/styles.ts +2 -3
  1208. package/src/panel/body.tsx +5 -3
  1209. package/src/panel/index.tsx +2 -2
  1210. package/src/panel/row.tsx +2 -2
  1211. package/src/panel/style.scss +1 -0
  1212. package/src/placeholder/index.tsx +3 -3
  1213. package/src/placeholder/style.scss +12 -35
  1214. package/src/popover/index.tsx +4 -3
  1215. package/src/popover/overlay-middlewares.tsx +3 -1
  1216. package/src/popover/stories/index.story.tsx +0 -2
  1217. package/src/query-controls/author-select.tsx +3 -1
  1218. package/src/radio-control/index.tsx +2 -2
  1219. package/src/range-control/index.tsx +3 -3
  1220. package/src/range-control/mark.tsx +3 -3
  1221. package/src/range-control/rail.tsx +1 -1
  1222. package/src/range-control/styles/range-control-styles.ts +5 -3
  1223. package/src/range-control/tooltip.tsx +2 -2
  1224. package/src/resizable-box/index.tsx +10 -10
  1225. package/src/resizable-box/resize-tooltip/index.tsx +5 -3
  1226. package/src/resizable-box/resize-tooltip/label.tsx +3 -1
  1227. package/src/resizable-box/resize-tooltip/utils.ts +12 -4
  1228. package/src/responsive-wrapper/index.tsx +2 -2
  1229. package/src/search-control/index.tsx +2 -5
  1230. package/src/select-control/index.tsx +5 -3
  1231. package/src/select-control/styles/select-control-styles.ts +3 -1
  1232. package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +2 -1
  1233. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +1 -1
  1234. package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +1 -1
  1235. package/src/slot-fill/bubbles-virtually/use-slot.ts +1 -1
  1236. package/src/slot-fill/types.ts +2 -2
  1237. package/src/snackbar/index.tsx +5 -8
  1238. package/src/snackbar/list.tsx +2 -2
  1239. package/src/spinner/index.tsx +2 -2
  1240. package/src/surface/test/__snapshots__/index.tsx.snap +10 -10
  1241. package/src/tab-panel/index.tsx +2 -2
  1242. package/src/text/get-line-height.ts +6 -2
  1243. package/src/text/utils.ts +6 -2
  1244. package/src/text-control/index.tsx +2 -2
  1245. package/src/theme/color-algorithms.ts +6 -2
  1246. package/src/theme/stories/index.story.tsx +1 -1
  1247. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +18 -26
  1248. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +3 -1
  1249. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +7 -6
  1250. package/src/toolbar/toolbar/index.tsx +2 -2
  1251. package/src/toolbar/toolbar/style.scss +2 -14
  1252. package/src/toolbar/toolbar-button/index.tsx +3 -3
  1253. package/src/toolbar/toolbar-group/index.tsx +2 -2
  1254. package/src/tools-panel/tools-panel/hook.ts +9 -6
  1255. package/src/tools-panel/tools-panel-item/hook.ts +12 -8
  1256. package/src/tools-panel/types.ts +1 -0
  1257. package/src/tree-grid/roving-tab-index-item.tsx +3 -1
  1258. package/src/truncate/hook.ts +1 -1
  1259. package/src/unit-control/index.tsx +7 -3
  1260. package/src/unit-control/unit-select-control.tsx +2 -2
  1261. package/src/utils/colors.js +21 -7
  1262. package/src/utils/font-size.ts +3 -1
  1263. package/src/utils/get-valid-children.ts +3 -1
  1264. package/src/utils/input/base.js +4 -3
  1265. package/src/utils/strings.ts +11 -59
  1266. package/src/utils/test/strings.js +62 -0
  1267. package/src/utils/theme-variables.scss +4 -0
  1268. package/src/utils/use-responsive-value.ts +2 -1
  1269. package/src/view/component.tsx +18 -11
  1270. package/tsconfig.json +1 -2
  1271. package/tsconfig.tsbuildinfo +1 -1
  1272. package/build/slot-fill/bubbles-virtually/observable-map.js +0 -68
  1273. package/build/slot-fill/bubbles-virtually/observable-map.js.map +0 -1
  1274. package/build/view/types.js +0 -6
  1275. package/build/view/types.js.map +0 -1
  1276. package/build-module/slot-fill/bubbles-virtually/observable-map.js +0 -60
  1277. package/build-module/slot-fill/bubbles-virtually/observable-map.js.map +0 -1
  1278. package/build-module/view/types.js +0 -2
  1279. package/build-module/view/types.js.map +0 -1
  1280. package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts +0 -19
  1281. package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts.map +0 -1
  1282. package/build-types/view/types.d.ts +0 -8
  1283. package/build-types/view/types.d.ts.map +0 -1
  1284. package/src/slot-fill/bubbles-virtually/observable-map.ts +0 -79
  1285. package/src/slot-fill/test/observable-map.js +0 -83
  1286. package/src/utils/hooks/stories/use-cx.js +0 -157
  1287. package/src/view/types.ts +0 -6
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_primitives","_element","_a11y","_icon","PlaceholderIllustration","_react","createElement","SVG","className","fill","xmlns","viewBox","preserveAspectRatio","Path","vectorEffect","d","Placeholder","props","icon","children","label","instructions","notices","preview","isColumnLayout","withIllustration","additionalProps","resizeListener","width","useResizeObserver","modifierClassNames","classes","classnames","fieldsetClasses","useEffect","speak","default","_default","exports"],"sources":["@wordpress/components/src/placeholder/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useResizeObserver } from '@wordpress/compose';\nimport { SVG, Path } from '@wordpress/primitives';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport Icon from '../icon';\nimport type { PlaceholderProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst PlaceholderIllustration = (\n\t<SVG\n\t\tclassName=\"components-placeholder__illustration\"\n\t\tfill=\"none\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 60 60\"\n\t\tpreserveAspectRatio=\"none\"\n\t>\n\t\t<Path vectorEffect=\"non-scaling-stroke\" d=\"M60 60 0 0\" />\n\t</SVG>\n);\n\n/**\n * Renders a placeholder. Normally used by blocks to render their empty state.\n *\n * ```jsx\n * import { Placeholder } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPlaceholder = () => <Placeholder icon={ more } label=\"Placeholder\" />;\n * ```\n */\nexport function Placeholder(\n\tprops: WordPressComponentProps< PlaceholderProps, 'div', false >\n) {\n\tconst {\n\t\ticon,\n\t\tchildren,\n\t\tlabel,\n\t\tinstructions,\n\t\tclassName,\n\t\tnotices,\n\t\tpreview,\n\t\tisColumnLayout,\n\t\twithIllustration,\n\t\t...additionalProps\n\t} = props;\n\tconst [ resizeListener, { width } ] = useResizeObserver();\n\n\t// Since `useResizeObserver` will report a width of `null` until after the\n\t// first render, avoid applying any modifier classes until width is known.\n\tlet modifierClassNames;\n\tif ( typeof width === 'number' ) {\n\t\tmodifierClassNames = {\n\t\t\t'is-large': width >= 480,\n\t\t\t'is-medium': width >= 160 && width < 480,\n\t\t\t'is-small': width < 160,\n\t\t};\n\t}\n\n\tconst classes = classnames(\n\t\t'components-placeholder',\n\t\tclassName,\n\t\tmodifierClassNames,\n\t\twithIllustration ? 'has-illustration' : null\n\t);\n\n\tconst fieldsetClasses = classnames( 'components-placeholder__fieldset', {\n\t\t'is-column-layout': isColumnLayout,\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( instructions ) {\n\t\t\tspeak( instructions );\n\t\t}\n\t}, [ instructions ] );\n\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ withIllustration ? PlaceholderIllustration : null }\n\t\t\t{ resizeListener }\n\t\t\t{ notices }\n\t\t\t{ preview && (\n\t\t\t\t<div className=\"components-placeholder__preview\">\n\t\t\t\t\t{ preview }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t{ !! instructions && (\n\t\t\t\t<div className=\"components-placeholder__instructions\">\n\t\t\t\t\t{ instructions }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className={ fieldsetClasses }>{ children }</div>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QA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AgB,GAAG,kBAAkB,GAAG,IACzC,CAAC;EAED,MAAMQ,eAAe,GAAG,IAAAD,mBAAU,EAAE,kCAAkC,EAAE;IACvE,kBAAkB,EAAER;EACrB,CAAE,CAAC;EAEH,IAAAU,kBAAS,EAAE,MAAM;IAChB,IAAKb,YAAY,EAAG;MACnB,IAAAc,WAAK,EAAEd,YAAa,CAAC;IACtB;EACD,CAAC,EAAE,CAAEA,YAAY,CAAG,CAAC;EAErB,OACC,IAAAhB,MAAA,CAAAC,aAAA;IAAA,GAAUoB,eAAe;IAAGlB,SAAS,EAAGuB;EAAS,GAC9CN,gBAAgB,GAAGrB,uBAAuB,GAAG,IAAI,EACjDuB,cAAc,EACdL,OAAO,EACPC,OAAO,IACR,IAAAlB,MAAA,CAAAC,aAAA;IAAKE,SAAS,EAAC;EAAiC,GAC7Ce,OACE,CACL,EACD,IAAAlB,MAAA,CAAAC,aAAA;IAAKE,SAAS,EAAC;EAA+B,GAC7C,IAAAH,MAAA,CAAAC,aAAA,EAACH,KAAA,CAAAiC,OAAI;IAAClB,IAAI,EAAGA;EAAM,CAAE,CAAC,EACpBE,KACE,CAAC,EACJ,CAAC,CAAEC,YAAY,IAChB,IAAAhB,MAAA,CAAAC,aAAA;IAAKE,SAAS,EAAC;EAAsC,GAClDa,YACE,CACL,EACD,IAAAhB,MAAA,CAAAC,aAAA;IAAKE,SAAS,EAAGyB;EAAiB,GAAGd,QAAe,CAChD,CAAC;AAER;AAAC,IAAAkB,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEcpB,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_compose","_primitives","_element","_a11y","_icon","PlaceholderIllustration","_react","createElement","SVG","className","fill","xmlns","viewBox","preserveAspectRatio","Path","vectorEffect","d","Placeholder","props","icon","children","label","instructions","notices","preview","isColumnLayout","withIllustration","additionalProps","resizeListener","width","useResizeObserver","modifierClassNames","classes","clsx","fieldsetClasses","useEffect","speak","default","_default","exports"],"sources":["@wordpress/components/src/placeholder/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useResizeObserver } from '@wordpress/compose';\nimport { SVG, Path } from '@wordpress/primitives';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport Icon from '../icon';\nimport type { PlaceholderProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst PlaceholderIllustration = (\n\t<SVG\n\t\tclassName=\"components-placeholder__illustration\"\n\t\tfill=\"none\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 60 60\"\n\t\tpreserveAspectRatio=\"none\"\n\t>\n\t\t<Path vectorEffect=\"non-scaling-stroke\" d=\"M60 60 0 0\" />\n\t</SVG>\n);\n\n/**\n * Renders a placeholder. Normally used by blocks to render their empty state.\n *\n * ```jsx\n * import { Placeholder } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPlaceholder = () => <Placeholder icon={ more } label=\"Placeholder\" />;\n * ```\n */\nexport function Placeholder(\n\tprops: WordPressComponentProps< PlaceholderProps, 'div', false >\n) {\n\tconst {\n\t\ticon,\n\t\tchildren,\n\t\tlabel,\n\t\tinstructions,\n\t\tclassName,\n\t\tnotices,\n\t\tpreview,\n\t\tisColumnLayout,\n\t\twithIllustration,\n\t\t...additionalProps\n\t} = props;\n\tconst [ resizeListener, { width } ] = useResizeObserver();\n\n\t// Since `useResizeObserver` will report a width of `null` until after the\n\t// first render, avoid applying any modifier classes until width is known.\n\tlet modifierClassNames;\n\tif ( typeof width === 'number' ) {\n\t\tmodifierClassNames = {\n\t\t\t'is-large': width >= 480,\n\t\t\t'is-medium': width >= 160 && width < 480,\n\t\t\t'is-small': width < 160,\n\t\t};\n\t}\n\n\tconst classes = clsx(\n\t\t'components-placeholder',\n\t\tclassName,\n\t\tmodifierClassNames,\n\t\twithIllustration ? 'has-illustration' : null\n\t);\n\n\tconst fieldsetClasses = clsx( 'components-placeholder__fieldset', {\n\t\t'is-column-layout': isColumnLayout,\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( instructions ) {\n\t\t\tspeak( instructions );\n\t\t}\n\t}, [ instructions ] );\n\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ withIllustration ? PlaceholderIllustration : null }\n\t\t\t{ resizeListener }\n\t\t\t{ notices }\n\t\t\t{ preview && (\n\t\t\t\t<div className=\"components-placeholder__preview\">\n\t\t\t\t\t{ preview }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t{ !! instructions && (\n\t\t\t\t<div className=\"components-placeholder__instructions\">\n\t\t\t\t\t{ instructions }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className={ fieldsetClasses }>{ children }</div>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,KAAA,GAAAN,sBAAA,CAAAC,OAAA;AAhBA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAKA,MAAMM,uBAAuB,GAC5B,IAAAC,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAAO,GAAG;EACHC,SAAS,EAAC,sCAAsC;EAChDC,IAAI,EAAC,MAAM;EACXC,KAAK,EAAC,4BAA4B;EAClCC,OAAO,EAAC,WAAW;EACnBC,mBAAmB,EAAC;AAAM,GAE1B,IAAAP,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAAa,IAAI;EAACC,YAAY,EAAC,oBAAoB;EAACC,C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ce,OACE,CACL,EACD,IAAAlB,MAAA,CAAAC,aAAA;IAAKE,SAAS,EAAC;EAA+B,GAC7C,IAAAH,MAAA,CAAAC,aAAA,EAACH,KAAA,CAAAiC,OAAI;IAAClB,IAAI,EAAGA;EAAM,CAAE,CAAC,EACpBE,KACE,CAAC,EACJ,CAAC,CAAEC,YAAY,IAChB,IAAAhB,MAAA,CAAAC,aAAA;IAAKE,SAAS,EAAC;EAAsC,GAClDa,YACE,CACL,EACD,IAAAhB,MAAA,CAAAC,aAAA;IAAKE,SAAS,EAAGyB;EAAiB,GAAGd,QAAe,CAChD,CAAC;AAER;AAAC,IAAAkB,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEcpB,WAAW","ignoreList":[]}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = exports.SLOT_NAME = exports.Popover = void 0;
8
8
  var _react = require("react");
9
- var _classnames = _interopRequireDefault(require("classnames"));
9
+ var _clsx = _interopRequireDefault(require("clsx"));
10
10
  var _reactDom = require("@floating-ui/react-dom");
11
11
  var _framerMotion = require("framer-motion");
12
12
  var _element = require("@wordpress/element");
@@ -159,7 +159,9 @@ const UnforwardedPopover = (props, forwardedRef) => {
159
159
  } = (_refs$floating$curren = refs.floating.current) !== null && _refs$floating$curren !== void 0 ? _refs$floating$curren : {};
160
160
 
161
161
  // Only HTMLElement instances have the `style` property.
162
- if (!(firstElementChild instanceof HTMLElement)) return;
162
+ if (!(firstElementChild instanceof HTMLElement)) {
163
+ return;
164
+ }
163
165
 
164
166
  // Reduce the height of the popover to the available space.
165
167
  Object.assign(firstElementChild.style, {
@@ -274,7 +276,7 @@ const UnforwardedPopover = (props, forwardedRef) => {
274
276
  // the popover, add the `is-positioned` class to signal that all transitions have finished.
275
277
  const isPositioned = (!shouldAnimate || animationFinished) && x !== null && y !== null;
276
278
  let content = (0, _react.createElement)(_framerMotion.motion.div, {
277
- className: (0, _classnames.default)(className, {
279
+ className: (0, _clsx.default)(className, {
278
280
  'is-expanded': isExpanded,
279
281
  'is-positioned': isPositioned,
280
282
  // Use the 'alternate' classname for 'toolbar' variant for back compat.
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_reactDom","_framerMotion","_element","_compose","_icons","_deprecated","_primitives","_button","_scrollLock","_slotFill","_utils","_context","_overlayMiddlewares","_styleProvider","SLOT_NAME","exports","ArrowTriangle","_react","createElement","SVG","xmlns","viewBox","className","role","Path","d","vectorEffect","slotNameContext","createContext","undefined","fallbackContainerClassname","getPopoverFallbackContainer","container","document","body","querySelector","append","UnforwardedPopover","props","forwardedRef","animate","headerTitle","constrainTabbing","onClose","children","noArrow","position","placement","placementProp","offset","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","flip","resize","shift","inline","variant","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","useContextSystem","computedFlipProp","computedResizeProp","deprecated","since","version","alternative","computedVariant","arrowRef","useRef","fallbackReferenceElement","setFallbackReferenceElement","useState","anchorRefFallback","useCallback","node","isMobileViewport","useViewportMatch","isExpanded","hasArrow","normalizedPlacementFromProps","positionToPlacement","middleware","overlayMiddlewares","offsetMiddleware","flipMiddleware","size","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","current","HTMLElement","Object","assign","style","maxHeight","availableHeight","overflow","shiftMiddleware","crossAxis","limiter","limitShift","padding","arrow","element","slotName","useContext","slot","useSlot","onDialogClose","type","event","dialogRef","dialogProps","useDialog","__unstableOnClose","x","y","strategy","update","computedPlacement","middlewareData","arrowData","useFloating","whileElementsMounted","referenceParam","floatingParam","updateParam","autoUpdate","layoutShift","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","useLayoutEffect","resultingReferenceElement","getReferenceElement","setReference","mergedFloatingRef","useMergeRefs","setFloating","left","computePopoverPosition","shouldReduceMotion","useReducedMotion","shouldAnimate","animationFinished","setAnimationFinished","motionInlineStyles","otherMotionProps","useMemo","placementToMotionAnimationProps","animationProps","onAnimationComplete","isPositioned","content","motion","div","classnames","ref","tabIndex","default","icon","close","onClick","split","join","Number","isFinite","shouldRenderWithinSlot","hasAnchor","Fill","name","createPortal","StyleProvider","Fragment","Popover","contextConnect","PopoverSlot","Slot","bubblesVirtually","forwardRef","__unstableSlotNameProvider","Provider","_default"],"sources":["@wordpress/components/src/popover/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport classnames from 'classnames';\nimport {\n\tuseFloating,\n\tflip as flipMiddleware,\n\tshift as shiftMiddleware,\n\tlimitShift,\n\tautoUpdate,\n\tarrow,\n\toffset as offsetMiddleware,\n\tsize,\n} from '@floating-ui/react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport type { HTMLMotionProps, MotionProps } from 'framer-motion';\n// eslint-disable-next-line no-restricted-imports\nimport { motion } from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tuseCallback,\n\tcreatePortal,\n} from '@wordpress/element';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\nimport { Path, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport {\n\tcomputePopoverPosition,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceElement,\n} from './utils';\nimport { contextConnect, useContextSystem } from '../context';\nimport type { WordPressComponentProps } from '../context';\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { overlayMiddlewares } from './overlay-middlewares';\nimport { StyleProvider } from '../style-provider';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nexport const SLOT_NAME = 'Popover';\n\n// An SVG displaying a triangle facing down, filled with a solid\n// color and bordered in such a way to create an arrow-like effect.\n// Keeping the SVG's viewbox squared simplify the arrow positioning\n// calculations.\nconst ArrowTriangle = () => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox={ `0 0 100 100` }\n\t\tclassName=\"components-popover__triangle\"\n\t\trole=\"presentation\"\n\t>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-bg\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t/>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-border\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t/>\n\t</SVG>\n);\n\nconst slotNameContext = createContext< string | undefined >( undefined );\n\nconst fallbackContainerClassname = 'components-popover__fallback-container';\nconst getPopoverFallbackContainer = () => {\n\tlet container = document.body.querySelector(\n\t\t'.' + fallbackContainerClassname\n\t);\n\tif ( ! container ) {\n\t\tcontainer = document.createElement( 'div' );\n\t\tcontainer.className = fallbackContainerClassname;\n\t\tdocument.body.append( container );\n\t}\n\n\treturn container;\n};\n\nconst UnforwardedPopover = (\n\tprops: Omit<\n\t\tWordPressComponentProps< PopoverProps, 'div', false >,\n\t\t// To avoid overlaps between the standard HTML attributes and the props\n\t\t// expected by `framer-motion`, omit all framer motion props from popover\n\t\t// props (except for `animate` and `children`, which are re-defined in `PopoverProps`).\n\t\tkeyof Omit< MotionProps, 'animate' | 'children' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\n\t\tconstrainTabbing,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tposition,\n\t\tplacement: placementProp = 'bottom-start',\n\t\toffset: offsetProp = 0,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchor,\n\t\texpandOnMobile,\n\t\tonFocusOutside,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\tflip = true,\n\t\tresize = true,\n\t\tshift = false,\n\t\tinline = false,\n\t\tvariant,\n\n\t\t// Deprecated props\n\t\t__unstableForcePosition,\n\t\tanchorRef,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tisAlternate,\n\n\t\t// Rest\n\t\t...contentProps\n\t} = useContextSystem( props, 'Popover' );\n\n\tlet computedFlipProp = flip;\n\tlet computedResizeProp = resize;\n\tif ( __unstableForcePosition !== undefined ) {\n\t\tdeprecated( '`__unstableForcePosition` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`flip={ false }` and `resize={ false }`',\n\t\t} );\n\n\t\t// Back-compat, set the `flip` and `resize` props\n\t\t// to `false` to replicate `__unstableForcePosition`.\n\t\tcomputedFlipProp = ! __unstableForcePosition;\n\t\tcomputedResizeProp = ! __unstableForcePosition;\n\t}\n\n\tif ( anchorRef !== undefined ) {\n\t\tdeprecated( '`anchorRef` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( anchorRect !== undefined ) {\n\t\tdeprecated( '`anchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( getAnchorRect !== undefined ) {\n\t\tdeprecated( '`getAnchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tconst computedVariant = isAlternate ? 'toolbar' : variant;\n\tif ( isAlternate !== undefined ) {\n\t\tdeprecated( '`isAlternate` prop in wp.components.Popover', {\n\t\t\tsince: '6.2',\n\t\t\talternative: \"`variant` prop with the `'toolbar'` value\",\n\t\t} );\n\t}\n\n\tconst arrowRef = useRef< HTMLElement | null >( null );\n\n\tconst [ fallbackReferenceElement, setFallbackReferenceElement ] =\n\t\tuseState< HTMLSpanElement | null >( null );\n\n\tconst anchorRefFallback: RefCallback< HTMLSpanElement > = useCallback(\n\t\t( node ) => {\n\t\t\tsetFallbackReferenceElement( node );\n\t\t},\n\t\t[]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst hasArrow = ! isExpanded && ! noArrow;\n\tconst normalizedPlacementFromProps = position\n\t\t? positionToPlacement( position )\n\t\t: placementProp;\n\n\tconst middleware = [\n\t\t...( placementProp === 'overlay' ? overlayMiddlewares() : [] ),\n\t\toffsetMiddleware( offsetProp ),\n\t\tcomputedFlipProp && flipMiddleware(),\n\t\tcomputedResizeProp &&\n\t\t\tsize( {\n\t\t\t\tapply( sizeProps ) {\n\t\t\t\t\tconst { firstElementChild } = refs.floating.current ?? {};\n\n\t\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) )\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\t\tmaxHeight: `${ sizeProps.availableHeight }px`,\n\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t} ),\n\t\tshift &&\n\t\t\tshiftMiddleware( {\n\t\t\t\tcrossAxis: true,\n\t\t\t\tlimiter: limitShift(),\n\t\t\t\tpadding: 1, // Necessary to avoid flickering at the edge of the viewport.\n\t\t\t} ),\n\t\tarrow( { element: arrowRef } ),\n\t];\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\n\tlet onDialogClose;\n\n\tif ( onClose || onFocusOutside ) {\n\t\tonDialogClose = ( type: string | undefined, event: SyntheticEvent ) => {\n\t\t\t// Ideally the popover should have just a single onClose prop and\n\t\t\t// not three props that potentially do the same thing.\n\t\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\t\tonFocusOutside( event );\n\t\t\t} else if ( onClose ) {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tconstrainTabbing,\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\t// @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst {\n\t\t// Positioning coordinates\n\t\tx,\n\t\ty,\n\t\t// Object with \"regular\" refs to both \"reference\" and \"floating\"\n\t\trefs,\n\t\t// Type of CSS position property to use (absolute or fixed)\n\t\tstrategy,\n\t\tupdate,\n\t\tplacement: computedPlacement,\n\t\tmiddlewareData: { arrow: arrowData },\n\t} = useFloating( {\n\t\tplacement:\n\t\t\tnormalizedPlacementFromProps === 'overlay'\n\t\t\t\t? undefined\n\t\t\t\t: normalizedPlacementFromProps,\n\t\tmiddleware,\n\t\twhileElementsMounted: ( referenceParam, floatingParam, updateParam ) =>\n\t\t\tautoUpdate( referenceParam, floatingParam, updateParam, {\n\t\t\t\tlayoutShift: false,\n\t\t\t\tanimationFrame: true,\n\t\t\t} ),\n\t} );\n\n\tconst arrowCallbackRef = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\tarrowRef.current = node;\n\t\t\tupdate();\n\t\t},\n\t\t[ update ]\n\t);\n\n\t// When any of the possible anchor \"sources\" change,\n\t// recompute the reference element (real or virtual) and its owner document.\n\n\tconst anchorRefTop = ( anchorRef as PopoverAnchorRefTopBottom | undefined )\n\t\t?.top;\n\tconst anchorRefBottom = (\n\t\tanchorRef as PopoverAnchorRefTopBottom | undefined\n\t )?.bottom;\n\tconst anchorRefStartContainer = ( anchorRef as Range | undefined )\n\t\t?.startContainer;\n\tconst anchorRefCurrent = ( anchorRef as PopoverAnchorRefReference )\n\t\t?.current;\n\n\tuseLayoutEffect( () => {\n\t\tconst resultingReferenceElement = getReferenceElement( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t} );\n\n\t\trefs.setReference( resultingReferenceElement );\n\t}, [\n\t\tanchor,\n\t\tanchorRef,\n\t\tanchorRefTop,\n\t\tanchorRefBottom,\n\t\tanchorRefStartContainer,\n\t\tanchorRefCurrent,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tfallbackReferenceElement,\n\t\trefs,\n\t] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\trefs.setFloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\tconst style = isExpanded\n\t\t? undefined\n\t\t: {\n\t\t\t\tposition: strategy,\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t// be overridden by the return value of the\n\t\t\t\t// `placementToMotionAnimationProps` function.\n\t\t\t\tx: computePopoverPosition( x ),\n\t\t\t\ty: computePopoverPosition( y ),\n\t\t };\n\n\tconst shouldReduceMotion = useReducedMotion();\n\tconst shouldAnimate = animate && ! isExpanded && ! shouldReduceMotion;\n\n\tconst [ animationFinished, setAnimationFinished ] = useState( false );\n\n\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t() => placementToMotionAnimationProps( computedPlacement ),\n\t\t[ computedPlacement ]\n\t);\n\n\tconst animationProps: HTMLMotionProps< 'div' > = shouldAnimate\n\t\t? {\n\t\t\t\tstyle: {\n\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t...style,\n\t\t\t\t},\n\t\t\t\tonAnimationComplete: () => setAnimationFinished( true ),\n\t\t\t\t...otherMotionProps,\n\t\t }\n\t\t: {\n\t\t\t\tanimate: false,\n\t\t\t\tstyle,\n\t\t };\n\n\t// When Floating UI has finished positioning and Framer Motion has finished animating\n\t// the popover, add the `is-positioned` class to signal that all transitions have finished.\n\tconst isPositioned =\n\t\t( ! shouldAnimate || animationFinished ) && x !== null && y !== null;\n\n\tlet content = (\n\t\t<motion.div\n\t\t\tclassName={ classnames( className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': isPositioned,\n\t\t\t\t// Use the 'alternate' classname for 'toolbar' variant for back compat.\n\t\t\t\t[ `is-${\n\t\t\t\t\tcomputedVariant === 'toolbar'\n\t\t\t\t\t\t? 'alternate'\n\t\t\t\t\t\t: computedVariant\n\t\t\t\t}` ]: computedVariant,\n\t\t\t} ) }\n\t\t\t{ ...animationProps }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t>\n\t\t\t{ /* Prevents scroll on the document */ }\n\t\t\t{ isExpanded && <ScrollLock /> }\n\t\t\t{ isExpanded && (\n\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"components-popover__close\"\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-popover__content\">{ children }</div>\n\t\t\t{ hasArrow && (\n\t\t\t\t<div\n\t\t\t\t\tref={ arrowCallbackRef }\n\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t'components-popover__arrow',\n\t\t\t\t\t\t`is-${ computedPlacement.split( '-' )[ 0 ] }`,\n\t\t\t\t\t].join( ' ' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tleft:\n\t\t\t\t\t\t\ttypeof arrowData?.x !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.x )\n\t\t\t\t\t\t\t\t? `${ arrowData.x }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\ttop:\n\t\t\t\t\t\t\ttypeof arrowData?.y !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.y )\n\t\t\t\t\t\t\t\t? `${ arrowData.y }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<ArrowTriangle />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</motion.div>\n\t);\n\n\tconst shouldRenderWithinSlot = slot.ref && ! inline;\n\tconst hasAnchor = anchorRef || anchorRect || anchor;\n\n\tif ( shouldRenderWithinSlot ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t} else if ( ! inline ) {\n\t\tcontent = createPortal(\n\t\t\t<StyleProvider document={ document }>{ content }</StyleProvider>,\n\t\t\tgetPopoverFallbackContainer()\n\t\t);\n\t}\n\n\tif ( hasAnchor ) {\n\t\treturn content;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<span ref={ anchorRefFallback } />\n\t\t\t{ content }\n\t\t</>\n\t);\n};\n\n/**\n * `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.\n *\n * ```jsx\n * import { Button, Popover } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyPopover = () => {\n * \tconst [ isVisible, setIsVisible ] = useState( false );\n * \tconst toggleVisible = () => {\n * \t\tsetIsVisible( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<Button variant=\"secondary\" onClick={ toggleVisible }>\n * \t\t\tToggle Popover!\n * \t\t\t{ isVisible && <Popover>Popover is toggled!</Popover> }\n * \t\t</Button>\n * \t);\n * };\n * ```\n *\n */\nexport const Popover = contextConnect( UnforwardedPopover, 'Popover' );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\tbubblesVirtually\n\t\t\tname={ name }\n\t\t\tclassName=\"popover-slot\"\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\n// @ts-expect-error For Legacy Reasons\nPopover.Slot = forwardRef( PopoverSlot );\n// @ts-expect-error For Legacy Reasons\nPopover.__unstableSlotNameProvider = slotNameContext.Provider;\n\nexport default Popover;\n"],"mappings":";;;;;;;;AAIA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAaA,IAAAE,aAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAWA,IAAAI,QAAA,GAAAJ,OAAA;AAMA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAKA,IAAAQ,OAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,WAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAMA,IAAAY,QAAA,GAAAZ,OAAA;AAOA,IAAAa,mBAAA,GAAAb,OAAA;AACA,IAAAc,cAAA,GAAAd,OAAA;AAhEA;AACA;AACA;;AAaA;;AAEA;;AAGA;AACA;AACA;;AAsBA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACO,MAAMe,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,SAAS;;AAElC;AACA;AACA;AACA;AACA,MAAME,aAAa,GAAGA,CAAA,KACrB,IAAAC,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAa,GAAG;EACHC,KAAK,EAAC,4BAA4B;EAClCC,OAAO,EAAI,aAAc;EACzBC,SAAS,EAAC,8BAA8B;EACxCC,IAAI,E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
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_reactDom","_framerMotion","_element","_compose","_icons","_deprecated","_primitives","_button","_scrollLock","_slotFill","_utils","_context","_overlayMiddlewares","_styleProvider","SLOT_NAME","exports","ArrowTriangle","_react","createElement","SVG","xmlns","viewBox","className","role","Path","d","vectorEffect","slotNameContext","createContext","undefined","fallbackContainerClassname","getPopoverFallbackContainer","container","document","body","querySelector","append","UnforwardedPopover","props","forwardedRef","animate","headerTitle","constrainTabbing","onClose","children","noArrow","position","placement","placementProp","offset","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","flip","resize","shift","inline","variant","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","useContextSystem","computedFlipProp","computedResizeProp","deprecated","since","version","alternative","computedVariant","arrowRef","useRef","fallbackReferenceElement","setFallbackReferenceElement","useState","anchorRefFallback","useCallback","node","isMobileViewport","useViewportMatch","isExpanded","hasArrow","normalizedPlacementFromProps","positionToPlacement","middleware","overlayMiddlewares","offsetMiddleware","flipMiddleware","size","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","current","HTMLElement","Object","assign","style","maxHeight","availableHeight","overflow","shiftMiddleware","crossAxis","limiter","limitShift","padding","arrow","element","slotName","useContext","slot","useSlot","onDialogClose","type","event","dialogRef","dialogProps","useDialog","__unstableOnClose","x","y","strategy","update","computedPlacement","middlewareData","arrowData","useFloating","whileElementsMounted","referenceParam","floatingParam","updateParam","autoUpdate","layoutShift","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","useLayoutEffect","resultingReferenceElement","getReferenceElement","setReference","mergedFloatingRef","useMergeRefs","setFloating","left","computePopoverPosition","shouldReduceMotion","useReducedMotion","shouldAnimate","animationFinished","setAnimationFinished","motionInlineStyles","otherMotionProps","useMemo","placementToMotionAnimationProps","animationProps","onAnimationComplete","isPositioned","content","motion","div","clsx","ref","tabIndex","default","icon","close","onClick","split","join","Number","isFinite","shouldRenderWithinSlot","hasAnchor","Fill","name","createPortal","StyleProvider","Fragment","Popover","contextConnect","PopoverSlot","Slot","bubblesVirtually","forwardRef","__unstableSlotNameProvider","Provider","_default"],"sources":["@wordpress/components/src/popover/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport clsx from 'clsx';\nimport {\n\tuseFloating,\n\tflip as flipMiddleware,\n\tshift as shiftMiddleware,\n\tlimitShift,\n\tautoUpdate,\n\tarrow,\n\toffset as offsetMiddleware,\n\tsize,\n} from '@floating-ui/react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport type { HTMLMotionProps, MotionProps } from 'framer-motion';\n// eslint-disable-next-line no-restricted-imports\nimport { motion } from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tuseCallback,\n\tcreatePortal,\n} from '@wordpress/element';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\nimport { Path, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport {\n\tcomputePopoverPosition,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceElement,\n} from './utils';\nimport { contextConnect, useContextSystem } from '../context';\nimport type { WordPressComponentProps } from '../context';\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { overlayMiddlewares } from './overlay-middlewares';\nimport { StyleProvider } from '../style-provider';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nexport const SLOT_NAME = 'Popover';\n\n// An SVG displaying a triangle facing down, filled with a solid\n// color and bordered in such a way to create an arrow-like effect.\n// Keeping the SVG's viewbox squared simplify the arrow positioning\n// calculations.\nconst ArrowTriangle = () => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox={ `0 0 100 100` }\n\t\tclassName=\"components-popover__triangle\"\n\t\trole=\"presentation\"\n\t>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-bg\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t/>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-border\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t/>\n\t</SVG>\n);\n\nconst slotNameContext = createContext< string | undefined >( undefined );\n\nconst fallbackContainerClassname = 'components-popover__fallback-container';\nconst getPopoverFallbackContainer = () => {\n\tlet container = document.body.querySelector(\n\t\t'.' + fallbackContainerClassname\n\t);\n\tif ( ! container ) {\n\t\tcontainer = document.createElement( 'div' );\n\t\tcontainer.className = fallbackContainerClassname;\n\t\tdocument.body.append( container );\n\t}\n\n\treturn container;\n};\n\nconst UnforwardedPopover = (\n\tprops: Omit<\n\t\tWordPressComponentProps< PopoverProps, 'div', false >,\n\t\t// To avoid overlaps between the standard HTML attributes and the props\n\t\t// expected by `framer-motion`, omit all framer motion props from popover\n\t\t// props (except for `animate` and `children`, which are re-defined in `PopoverProps`).\n\t\tkeyof Omit< MotionProps, 'animate' | 'children' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\n\t\tconstrainTabbing,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tposition,\n\t\tplacement: placementProp = 'bottom-start',\n\t\toffset: offsetProp = 0,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchor,\n\t\texpandOnMobile,\n\t\tonFocusOutside,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\tflip = true,\n\t\tresize = true,\n\t\tshift = false,\n\t\tinline = false,\n\t\tvariant,\n\n\t\t// Deprecated props\n\t\t__unstableForcePosition,\n\t\tanchorRef,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tisAlternate,\n\n\t\t// Rest\n\t\t...contentProps\n\t} = useContextSystem( props, 'Popover' );\n\n\tlet computedFlipProp = flip;\n\tlet computedResizeProp = resize;\n\tif ( __unstableForcePosition !== undefined ) {\n\t\tdeprecated( '`__unstableForcePosition` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`flip={ false }` and `resize={ false }`',\n\t\t} );\n\n\t\t// Back-compat, set the `flip` and `resize` props\n\t\t// to `false` to replicate `__unstableForcePosition`.\n\t\tcomputedFlipProp = ! __unstableForcePosition;\n\t\tcomputedResizeProp = ! __unstableForcePosition;\n\t}\n\n\tif ( anchorRef !== undefined ) {\n\t\tdeprecated( '`anchorRef` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( anchorRect !== undefined ) {\n\t\tdeprecated( '`anchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( getAnchorRect !== undefined ) {\n\t\tdeprecated( '`getAnchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tconst computedVariant = isAlternate ? 'toolbar' : variant;\n\tif ( isAlternate !== undefined ) {\n\t\tdeprecated( '`isAlternate` prop in wp.components.Popover', {\n\t\t\tsince: '6.2',\n\t\t\talternative: \"`variant` prop with the `'toolbar'` value\",\n\t\t} );\n\t}\n\n\tconst arrowRef = useRef< HTMLElement | null >( null );\n\n\tconst [ fallbackReferenceElement, setFallbackReferenceElement ] =\n\t\tuseState< HTMLSpanElement | null >( null );\n\n\tconst anchorRefFallback: RefCallback< HTMLSpanElement > = useCallback(\n\t\t( node ) => {\n\t\t\tsetFallbackReferenceElement( node );\n\t\t},\n\t\t[]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst hasArrow = ! isExpanded && ! noArrow;\n\tconst normalizedPlacementFromProps = position\n\t\t? positionToPlacement( position )\n\t\t: placementProp;\n\n\tconst middleware = [\n\t\t...( placementProp === 'overlay' ? overlayMiddlewares() : [] ),\n\t\toffsetMiddleware( offsetProp ),\n\t\tcomputedFlipProp && flipMiddleware(),\n\t\tcomputedResizeProp &&\n\t\t\tsize( {\n\t\t\t\tapply( sizeProps ) {\n\t\t\t\t\tconst { firstElementChild } = refs.floating.current ?? {};\n\n\t\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\t\tmaxHeight: `${ sizeProps.availableHeight }px`,\n\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t} ),\n\t\tshift &&\n\t\t\tshiftMiddleware( {\n\t\t\t\tcrossAxis: true,\n\t\t\t\tlimiter: limitShift(),\n\t\t\t\tpadding: 1, // Necessary to avoid flickering at the edge of the viewport.\n\t\t\t} ),\n\t\tarrow( { element: arrowRef } ),\n\t];\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\n\tlet onDialogClose;\n\n\tif ( onClose || onFocusOutside ) {\n\t\tonDialogClose = ( type: string | undefined, event: SyntheticEvent ) => {\n\t\t\t// Ideally the popover should have just a single onClose prop and\n\t\t\t// not three props that potentially do the same thing.\n\t\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\t\tonFocusOutside( event );\n\t\t\t} else if ( onClose ) {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tconstrainTabbing,\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\t// @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst {\n\t\t// Positioning coordinates\n\t\tx,\n\t\ty,\n\t\t// Object with \"regular\" refs to both \"reference\" and \"floating\"\n\t\trefs,\n\t\t// Type of CSS position property to use (absolute or fixed)\n\t\tstrategy,\n\t\tupdate,\n\t\tplacement: computedPlacement,\n\t\tmiddlewareData: { arrow: arrowData },\n\t} = useFloating( {\n\t\tplacement:\n\t\t\tnormalizedPlacementFromProps === 'overlay'\n\t\t\t\t? undefined\n\t\t\t\t: normalizedPlacementFromProps,\n\t\tmiddleware,\n\t\twhileElementsMounted: ( referenceParam, floatingParam, updateParam ) =>\n\t\t\tautoUpdate( referenceParam, floatingParam, updateParam, {\n\t\t\t\tlayoutShift: false,\n\t\t\t\tanimationFrame: true,\n\t\t\t} ),\n\t} );\n\n\tconst arrowCallbackRef = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\tarrowRef.current = node;\n\t\t\tupdate();\n\t\t},\n\t\t[ update ]\n\t);\n\n\t// When any of the possible anchor \"sources\" change,\n\t// recompute the reference element (real or virtual) and its owner document.\n\n\tconst anchorRefTop = ( anchorRef as PopoverAnchorRefTopBottom | undefined )\n\t\t?.top;\n\tconst anchorRefBottom = (\n\t\tanchorRef as PopoverAnchorRefTopBottom | undefined\n\t )?.bottom;\n\tconst anchorRefStartContainer = ( anchorRef as Range | undefined )\n\t\t?.startContainer;\n\tconst anchorRefCurrent = ( anchorRef as PopoverAnchorRefReference )\n\t\t?.current;\n\n\tuseLayoutEffect( () => {\n\t\tconst resultingReferenceElement = getReferenceElement( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t} );\n\n\t\trefs.setReference( resultingReferenceElement );\n\t}, [\n\t\tanchor,\n\t\tanchorRef,\n\t\tanchorRefTop,\n\t\tanchorRefBottom,\n\t\tanchorRefStartContainer,\n\t\tanchorRefCurrent,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tfallbackReferenceElement,\n\t\trefs,\n\t] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\trefs.setFloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\tconst style = isExpanded\n\t\t? undefined\n\t\t: {\n\t\t\t\tposition: strategy,\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t// be overridden by the return value of the\n\t\t\t\t// `placementToMotionAnimationProps` function.\n\t\t\t\tx: computePopoverPosition( x ),\n\t\t\t\ty: computePopoverPosition( y ),\n\t\t };\n\n\tconst shouldReduceMotion = useReducedMotion();\n\tconst shouldAnimate = animate && ! isExpanded && ! shouldReduceMotion;\n\n\tconst [ animationFinished, setAnimationFinished ] = useState( false );\n\n\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t() => placementToMotionAnimationProps( computedPlacement ),\n\t\t[ computedPlacement ]\n\t);\n\n\tconst animationProps: HTMLMotionProps< 'div' > = shouldAnimate\n\t\t? {\n\t\t\t\tstyle: {\n\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t...style,\n\t\t\t\t},\n\t\t\t\tonAnimationComplete: () => setAnimationFinished( true ),\n\t\t\t\t...otherMotionProps,\n\t\t }\n\t\t: {\n\t\t\t\tanimate: false,\n\t\t\t\tstyle,\n\t\t };\n\n\t// When Floating UI has finished positioning and Framer Motion has finished animating\n\t// the popover, add the `is-positioned` class to signal that all transitions have finished.\n\tconst isPositioned =\n\t\t( ! shouldAnimate || animationFinished ) && x !== null && y !== null;\n\n\tlet content = (\n\t\t<motion.div\n\t\t\tclassName={ clsx( className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': isPositioned,\n\t\t\t\t// Use the 'alternate' classname for 'toolbar' variant for back compat.\n\t\t\t\t[ `is-${\n\t\t\t\t\tcomputedVariant === 'toolbar'\n\t\t\t\t\t\t? 'alternate'\n\t\t\t\t\t\t: computedVariant\n\t\t\t\t}` ]: computedVariant,\n\t\t\t} ) }\n\t\t\t{ ...animationProps }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t>\n\t\t\t{ /* Prevents scroll on the document */ }\n\t\t\t{ isExpanded && <ScrollLock /> }\n\t\t\t{ isExpanded && (\n\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"components-popover__close\"\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-popover__content\">{ children }</div>\n\t\t\t{ hasArrow && (\n\t\t\t\t<div\n\t\t\t\t\tref={ arrowCallbackRef }\n\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t'components-popover__arrow',\n\t\t\t\t\t\t`is-${ computedPlacement.split( '-' )[ 0 ] }`,\n\t\t\t\t\t].join( ' ' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tleft:\n\t\t\t\t\t\t\ttypeof arrowData?.x !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.x )\n\t\t\t\t\t\t\t\t? `${ arrowData.x }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\ttop:\n\t\t\t\t\t\t\ttypeof arrowData?.y !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.y )\n\t\t\t\t\t\t\t\t? `${ arrowData.y }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<ArrowTriangle />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</motion.div>\n\t);\n\n\tconst shouldRenderWithinSlot = slot.ref && ! inline;\n\tconst hasAnchor = anchorRef || anchorRect || anchor;\n\n\tif ( shouldRenderWithinSlot ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t} else if ( ! inline ) {\n\t\tcontent = createPortal(\n\t\t\t<StyleProvider document={ document }>{ content }</StyleProvider>,\n\t\t\tgetPopoverFallbackContainer()\n\t\t);\n\t}\n\n\tif ( hasAnchor ) {\n\t\treturn content;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<span ref={ anchorRefFallback } />\n\t\t\t{ content }\n\t\t</>\n\t);\n};\n\n/**\n * `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.\n *\n * ```jsx\n * import { Button, Popover } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyPopover = () => {\n * \tconst [ isVisible, setIsVisible ] = useState( false );\n * \tconst toggleVisible = () => {\n * \t\tsetIsVisible( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<Button variant=\"secondary\" onClick={ toggleVisible }>\n * \t\t\tToggle Popover!\n * \t\t\t{ isVisible && <Popover>Popover is toggled!</Popover> }\n * \t\t</Button>\n * \t);\n * };\n * ```\n *\n */\nexport const Popover = contextConnect( UnforwardedPopover, 'Popover' );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\tbubblesVirtually\n\t\t\tname={ name }\n\t\t\tclassName=\"popover-slot\"\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\n// @ts-expect-error For Legacy Reasons\nPopover.Slot = forwardRef( PopoverSlot );\n// @ts-expect-error For Legacy Reasons\nPopover.__unstableSlotNameProvider = slotNameContext.Provider;\n\nexport default Popover;\n"],"mappings":";;;;;;;;AAIA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAaA,IAAAE,aAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAWA,IAAAI,QAAA,GAAAJ,OAAA;AAMA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAKA,IAAAQ,OAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,WAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAMA,IAAAY,QAAA,GAAAZ,OAAA;AAOA,IAAAa,mBAAA,GAAAb,OAAA;AACA,IAAAc,cAAA,GAAAd,OAAA;AAhEA;AACA;AACA;;AAaA;;AAEA;;AAGA;AACA;AACA;;AAsBA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACO,MAAMe,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,SAAS;;AAElC;AACA;AACA;AACA;AACA,MAAME,aAAa,GAAGA,CAAA,KACrB,IAAAC,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAa,GAAG;EACHC,KAAK,EAAC,4BAA4B;EAClCC,OAAO,EAAI,aAAc;EACzBC,SAAS,EAAC,8BAA8B;EACxCC,IAAI,EAAC;AAAc,GAEnB,IAAAN,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAkB,IAAI;EACJF,SAAS,EAAC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Ae,CAAC;EACrD,CAAC,MAAM,IAAK,CAAE/G,MAAM,EAAG;IACtB+G,OAAO,GAAG,IAAAkB,qBAAY,EACrB,IAAA3K,MAAA,CAAAC,aAAA,EAACL,cAAA,CAAAgL,aAAa;MAAC5J,QAAQ,EAAGA;IAAU,GAAGyI,OAAwB,CAAC,EAChE3I,2BAA2B,CAAC,CAC7B,CAAC;EACF;EAEA,IAAK0J,SAAS,EAAG;IAChB,OAAOf,OAAO;EACf;EAEA,OACC,IAAAzJ,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAA6K,QAAA,QACC,IAAA7K,MAAA,CAAAC,aAAA;IAAM4J,GAAG,EAAG9F;EAAmB,CAAE,CAAC,EAChC0F,OACD,CAAC;AAEL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMqB,OAAO,GAAAhL,OAAA,CAAAgL,OAAA,GAAG,IAAAC,uBAAc,EAAE3J,kBAAkB,EAAE,SAAU,CAAC;AAEtE,SAAS4J,WAAWA,CACnB;EAAEN,IAAI,GAAG7K;AAA6B,CAAC,EACvCgK,GAAwB,EACvB;EACD,OACC,IAAA7J,MAAA,CAAAC,aAAA,EAACT,SAAA,CAAAyL,IAAI;IACJC,gBAAgB;IAChBR,IAAI,EAAGA,IAAM;IACbrK,SAAS,EAAC,cAAc;IACxBwJ,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;;AAEA;AACAiB,OAAO,CAACG,IAAI,GAAG,IAAAE,mBAAU,EAAEH,WAAY,CAAC;AACxC;AACAF,OAAO,CAACM,0BAA0B,GAAG1K,eAAe,CAAC2K,QAAQ;AAAC,IAAAC,QAAA,GAAAxL,OAAA,CAAAiK,OAAA,GAE/Ce,OAAO","ignoreList":[]}
@@ -28,7 +28,9 @@ function overlayMiddlewares() {
28
28
  } = (_elements$floating = elements.floating) !== null && _elements$floating !== void 0 ? _elements$floating : {};
29
29
 
30
30
  // Only HTMLElement instances have the `style` property.
31
- if (!(firstElementChild instanceof HTMLElement)) return;
31
+ if (!(firstElementChild instanceof HTMLElement)) {
32
+ return;
33
+ }
32
34
 
33
35
  // Reduce the height of the popover to the available space.
34
36
  Object.assign(firstElementChild.style, {
@@ -1 +1 @@
1
- {"version":3,"names":["_reactDom","require","overlayMiddlewares","name","fn","rects","reference","size","apply","elements","_elements$floating","firstElementChild","floating","HTMLElement","Object","assign","style","width","height"],"sources":["@wordpress/components/src/popover/overlay-middlewares.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { MiddlewareState } from '@floating-ui/react-dom';\nimport { size } from '@floating-ui/react-dom';\n\nexport function overlayMiddlewares() {\n\treturn [\n\t\t{\n\t\t\tname: 'overlay',\n\t\t\tfn( { rects }: MiddlewareState ) {\n\t\t\t\treturn rects.reference;\n\t\t\t},\n\t\t},\n\t\tsize( {\n\t\t\tapply( { rects, elements } ) {\n\t\t\t\tconst { firstElementChild } = elements.floating ?? {};\n\n\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) return;\n\n\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\twidth: `${ rects.reference.width }px`,\n\t\t\t\t\theight: `${ rects.reference.height }px`,\n\t\t\t\t} );\n\t\t\t},\n\t\t} ),\n\t];\n}\n"],"mappings":";;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAJA;AACA;AACA;;AAIO,SAASC,kBAAkBA,CAAA,EAAG;EACpC,OAAO,CACN;IACCC,IAAI,EAAE,SAAS;IACfC,EAAEA,CAAE;MAAEC;IAAuB,CAAC,EAAG;MAChC,OAAOA,KAAK,CAACC,SAAS;IACvB;EACD,CAAC,EACD,IAAAC,cAAI,EAAE;IACLC,KAAKA,CAAE;MAAEH,KAAK;MAAEI;IAAS,CAAC,EAAG;MAAA,IAAAC,kBAAA;MAC5B,MAAM;QAAEC;MAAkB,CAAC,IAAAD,kBAAA,GAAGD,QAAQ,CAACG,QAAQ,cAAAF,kBAAA,cAAAA,kBAAA,GAAI,CAAC,CAAC;;MAErD;MACA,IAAK,EAAIC,iBAAiB,YAAYE,WAAW,CAAE,EAAG;;MAEtD;MACAC,MAAM,CAACC,MAAM,CAAEJ,iBAAiB,CAACK,KAAK,EAAE;QACvCC,KAAK,EAAG,GAAGZ,KAAK,CAACC,SAAS,CAACW,KAAO,IAAG;QACrCC,MAAM,EAAG,GAAGb,KAAK,CAACC,SAAS,CAACY,MAAQ;MACrC,CAAE,CAAC;IACJ;EACD,CAAE,CAAC,CACH;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_reactDom","require","overlayMiddlewares","name","fn","rects","reference","size","apply","elements","_elements$floating","firstElementChild","floating","HTMLElement","Object","assign","style","width","height"],"sources":["@wordpress/components/src/popover/overlay-middlewares.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { MiddlewareState } from '@floating-ui/react-dom';\nimport { size } from '@floating-ui/react-dom';\n\nexport function overlayMiddlewares() {\n\treturn [\n\t\t{\n\t\t\tname: 'overlay',\n\t\t\tfn( { rects }: MiddlewareState ) {\n\t\t\t\treturn rects.reference;\n\t\t\t},\n\t\t},\n\t\tsize( {\n\t\t\tapply( { rects, elements } ) {\n\t\t\t\tconst { firstElementChild } = elements.floating ?? {};\n\n\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\twidth: `${ rects.reference.width }px`,\n\t\t\t\t\theight: `${ rects.reference.height }px`,\n\t\t\t\t} );\n\t\t\t},\n\t\t} ),\n\t];\n}\n"],"mappings":";;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAJA;AACA;AACA;;AAIO,SAASC,kBAAkBA,CAAA,EAAG;EACpC,OAAO,CACN;IACCC,IAAI,EAAE,SAAS;IACfC,EAAEA,CAAE;MAAEC;IAAuB,CAAC,EAAG;MAChC,OAAOA,KAAK,CAACC,SAAS;IACvB;EACD,CAAC,EACD,IAAAC,cAAI,EAAE;IACLC,KAAKA,CAAE;MAAEH,KAAK;MAAEI;IAAS,CAAC,EAAG;MAAA,IAAAC,kBAAA;MAC5B,MAAM;QAAEC;MAAkB,CAAC,IAAAD,kBAAA,GAAGD,QAAQ,CAACG,QAAQ,cAAAF,kBAAA,cAAAA,kBAAA,GAAI,CAAC,CAAC;;MAErD;MACA,IAAK,EAAIC,iBAAiB,YAAYE,WAAW,CAAE,EAAG;QACrD;MACD;;MAEA;MACAC,MAAM,CAACC,MAAM,CAAEJ,iBAAiB,CAACK,KAAK,EAAE;QACvCC,KAAK,EAAG,GAAGZ,KAAK,CAACC,SAAS,CAACW,KAAO,IAAG;QACrCC,MAAM,EAAG,GAAGb,KAAK,CAACC,SAAS,CAACY,MAAQ;MACrC,CAAE,CAAC;IACJ;EACD,CAAE,CAAC,CACH;AACF","ignoreList":[]}
@@ -20,7 +20,9 @@ function AuthorSelect({
20
20
  selectedAuthorId,
21
21
  onChange: onChangeProp
22
22
  }) {
23
- if (!authorList) return null;
23
+ if (!authorList) {
24
+ return null;
25
+ }
24
26
  const termsTree = (0, _terms.buildTermsTree)(authorList);
25
27
  return (0, _react.createElement)(_treeSelect.default, {
26
28
  label,
@@ -1 +1 @@
1
- {"version":3,"names":["_terms","require","_treeSelect","_interopRequireDefault","AuthorSelect","__next40pxDefaultSize","label","noOptionLabel","authorList","selectedAuthorId","onChange","onChangeProp","termsTree","buildTermsTree","_react","createElement","default","tree","selectedId","undefined","String","__nextHasNoMarginBottom"],"sources":["@wordpress/components/src/query-controls/author-select.tsx"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { buildTermsTree } from './terms';\nimport TreeSelect from '../tree-select';\nimport type { AuthorSelectProps } from './types';\n\nexport default function AuthorSelect( {\n\t__next40pxDefaultSize,\n\tlabel,\n\tnoOptionLabel,\n\tauthorList,\n\tselectedAuthorId,\n\tonChange: onChangeProp,\n}: AuthorSelectProps ) {\n\tif ( ! authorList ) return null;\n\tconst termsTree = buildTermsTree( authorList );\n\treturn (\n\t\t<TreeSelect\n\t\t\t{ ...{\n\t\t\t\tlabel,\n\t\t\t\tnoOptionLabel,\n\t\t\t\tonChange: onChangeProp,\n\t\t\t} }\n\t\t\ttree={ termsTree }\n\t\t\tselectedId={\n\t\t\t\tselectedAuthorId !== undefined\n\t\t\t\t\t? String( selectedAuthorId )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAJA;AACA;AACA;;AAKe,SAASG,YAAYA,CAAE;EACrCC,qBAAqB;EACrBC,KAAK;EACLC,aAAa;EACbC,UAAU;EACVC,gBAAgB;EAChBC,QAAQ,EAAEC;AACQ,CAAC,EAAG;EACtB,IAAK,CAAEH,UAAU,EAAG,OAAO,IAAI;EAC/B,MAAMI,SAAS,GAAG,IAAAC,qBAAc,EAAEL,UAAW,CAAC;EAC9C,OACC,IAAAM,MAAA,CAAAC,aAAA,EAACb,WAAA,CAAAc,OAAU;IAETV,KAAK;IACLC,aAAa;IACbG,QAAQ,EAAEC,YAAY;IAEvBM,IAAI,EAAGL,SAAW;IAClBM,UAAU,EACTT,gBAAgB,KAAKU,SAAS,GAC3BC,MAAM,CAAEX,gBAAiB,CAAC,GAC1BU,SACH;IACDE,uBAAuB;IACvBhB,qBAAqB,EAAGA;EAAuB,CAC/C,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["_terms","require","_treeSelect","_interopRequireDefault","AuthorSelect","__next40pxDefaultSize","label","noOptionLabel","authorList","selectedAuthorId","onChange","onChangeProp","termsTree","buildTermsTree","_react","createElement","default","tree","selectedId","undefined","String","__nextHasNoMarginBottom"],"sources":["@wordpress/components/src/query-controls/author-select.tsx"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { buildTermsTree } from './terms';\nimport TreeSelect from '../tree-select';\nimport type { AuthorSelectProps } from './types';\n\nexport default function AuthorSelect( {\n\t__next40pxDefaultSize,\n\tlabel,\n\tnoOptionLabel,\n\tauthorList,\n\tselectedAuthorId,\n\tonChange: onChangeProp,\n}: AuthorSelectProps ) {\n\tif ( ! authorList ) {\n\t\treturn null;\n\t}\n\tconst termsTree = buildTermsTree( authorList );\n\treturn (\n\t\t<TreeSelect\n\t\t\t{ ...{\n\t\t\t\tlabel,\n\t\t\t\tnoOptionLabel,\n\t\t\t\tonChange: onChangeProp,\n\t\t\t} }\n\t\t\ttree={ termsTree }\n\t\t\tselectedId={\n\t\t\t\tselectedAuthorId !== undefined\n\t\t\t\t\t? String( selectedAuthorId )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAJA;AACA;AACA;;AAKe,SAASG,YAAYA,CAAE;EACrCC,qBAAqB;EACrBC,KAAK;EACLC,aAAa;EACbC,UAAU;EACVC,gBAAgB;EAChBC,QAAQ,EAAEC;AACQ,CAAC,EAAG;EACtB,IAAK,CAAEH,UAAU,EAAG;IACnB,OAAO,IAAI;EACZ;EACA,MAAMI,SAAS,GAAG,IAAAC,qBAAc,EAAEL,UAAW,CAAC;EAC9C,OACC,IAAAM,MAAA,CAAAC,aAAA,EAACb,WAAA,CAAAc,OAAU;IAETV,KAAK;IACLC,aAAa;IACbG,QAAQ,EAAEC,YAAY;IAEvBM,IAAI,EAAGL,SAAW;IAClBM,UAAU,EACTT,gBAAgB,KAAKU,SAAS,GAC3BC,MAAM,CAAEX,gBAAiB,CAAC,GAC1BU,SACH;IACDE,uBAAuB;IACvBhB,qBAAqB,EAAGA;EAAuB,CAC/C,CAAC;AAEJ","ignoreList":[]}
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.RadioControl = RadioControl;
8
8
  exports.default = void 0;
9
9
  var _react = require("react");
10
- var _classnames = _interopRequireDefault(require("classnames"));
10
+ var _clsx = _interopRequireDefault(require("clsx"));
11
11
  var _compose = require("@wordpress/compose");
12
12
  var _baseControl = _interopRequireDefault(require("../base-control"));
13
13
  var _vStack = require("../v-stack");
@@ -71,7 +71,7 @@ function RadioControl(props) {
71
71
  id: id,
72
72
  hideLabelFromVision: hideLabelFromVision,
73
73
  help: help,
74
- className: (0, _classnames.default)(className, 'components-radio-control')
74
+ className: (0, _clsx.default)(className, 'components-radio-control')
75
75
  }, (0, _react.createElement)(_vStack.VStack, {
76
76
  spacing: 1
77
77
  }, options.map((option, index) => (0, _react.createElement)("div", {
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_baseControl","_vStack","RadioControl","props","label","className","selected","help","onChange","hideLabelFromVision","options","additionalProps","instanceId","useInstanceId","id","onChangeValue","event","target","value","length","_react","createElement","default","__nextHasNoMarginBottom","classnames","VStack","spacing","map","option","index","key","type","name","checked","undefined","htmlFor","_default","exports"],"sources":["@wordpress/components/src/radio-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n * const [ option, setOption ] = useState( 'a' );\n *\n * return (\n * <RadioControl\n * label=\"User type\"\n * help=\"The type of the current user\"\n * selected={ option }\n * options={ [\n * { label: 'Author', value: 'a' },\n * { label: 'Editor', value: 'e' },\n * ] }\n * onChange={ ( value ) => setOption( value ) }\n * />\n * );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( RadioControl );\n\tconst id = `inspector-radio-control-${ instanceId }`;\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\thelp={ help }\n\t\t\tclassName={ classnames( className, 'components-radio-control' ) }\n\t\t>\n\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ `${ id }-${ index }` }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ `${ id }-${ index }` }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t!! help ? `${ id }__help` : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tclassName=\"components-radio-control__label\"\n\t\t\t\t\t\t\thtmlFor={ `${ id }-${ index }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default RadioControl;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,OAAA,GAAAH,OAAA;AAjBA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,YAAYA,CAC3BC,KAAmE,EAClE;EACD,MAAM;IACLC,KAAK;IACLC,SAAS;IACTC,QAAQ;IACRC,IAAI;IACJC,QAAQ;IACRC,mBAAmB;IACnBC,OAAO,GAAG,EAAE;IACZ,GAAGC;EACJ,CAAC,GAAGR,KAAK;EACT,MAAMS,UAAU,GAAG,IAAAC,sBAAa,EAAEX,YAAa,CAAC;EAChD,MAAMY,EAAE,GAAI,2BAA2BF,UAAY,EAAC;EACpD,MAAMG,aAAa,GAAKC,KAAsC,IAC7DR,QAAQ,CAAEQ,KAAK,CAACC,MAAM,CAACC,KAAM,CAAC;EAE/B,IAAK,CAAER,OAAO,EAAES,MAAM,EAAG;IACxB,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACrB,YAAA,CAAAsB,OAAW;IACXC,uBAAuB;IACvBnB,KAAK,EAAGA,KAAO;IACfU,EAAE,EAAGA,EAAI;IACTL,mBAAmB,EAAGA,mBAAqB;IAC3CF,IAAI,EAAGA,IAAM;IACbF,SAAS,EAAG,IAAAmB,mBAAU,EAAEnB,SAAS,EAAE,0BAA2B;EAAG,GAEjE,IAAAe,MAAA,CAAAC,aAAA,EAACpB,OAAA,CAAAwB,MAAM;IAACC,OAAO,EAAG;EAAG,GAClBhB,OAAO,CAACiB,GAAG,CAAE,CAAEC,MAAM,EAAEC,KAAK,KAC7B,IAAAT,MAAA,CAAAC,aAAA;IACCS,GAAG,EAAI,GAAGhB,EAAI,IAAIe,KAAO,EAAG;IAC5BxB,SAAS,EAAC;EAAkC,GAE5C,IAAAe,MAAA,CAAAC,aAAA;IACCP,EAAE,EAAI,GAAGA,EAAI,IAAIe,KAAO,EAAG;IAC3BxB,SAAS,EAAC,iCAAiC;IAC3C0B,IAAI,EAAC,OAAO;IACZC,IAAI,EAAGlB,EAAI;IACXI,KAAK,EAAGU,MAAM,CAACV,KAAO;IACtBV,QAAQ,EAAGO,aAAe;IAC1BkB,OAAO,EAAGL,MAAM,CAACV,KAAK,KAAKZ,QAAU;IACrC,oBACC,CAAC,CAAEC,IAAI,GAAI,GAAGO,EAAI,QAAO,GAAGoB,SAC5B;IAAA,GACIvB;EAAe,CACpB,CAAC,EACF,IAAAS,MAAA,CAAAC,aAAA;IACChB,SAAS,EAAC,iCAAiC;IAC3C8B,OAAO,EAAI,GAAGrB,EAAI,IAAIe,KAAO;EAAG,GAE9BD,MAAM,CAACxB,KACH,CACH,CACJ,CACK,CACI,CAAC;AAEhB;AAAC,IAAAgC,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEcpB,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_compose","_baseControl","_vStack","RadioControl","props","label","className","selected","help","onChange","hideLabelFromVision","options","additionalProps","instanceId","useInstanceId","id","onChangeValue","event","target","value","length","_react","createElement","default","__nextHasNoMarginBottom","clsx","VStack","spacing","map","option","index","key","type","name","checked","undefined","htmlFor","_default","exports"],"sources":["@wordpress/components/src/radio-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n * const [ option, setOption ] = useState( 'a' );\n *\n * return (\n * <RadioControl\n * label=\"User type\"\n * help=\"The type of the current user\"\n * selected={ option }\n * options={ [\n * { label: 'Author', value: 'a' },\n * { label: 'Editor', value: 'e' },\n * ] }\n * onChange={ ( value ) => setOption( value ) }\n * />\n * );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( RadioControl );\n\tconst id = `inspector-radio-control-${ instanceId }`;\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\thelp={ help }\n\t\t\tclassName={ clsx( className, 'components-radio-control' ) }\n\t\t>\n\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ `${ id }-${ index }` }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ `${ id }-${ index }` }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t!! help ? `${ id }__help` : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tclassName=\"components-radio-control__label\"\n\t\t\t\t\t\t\thtmlFor={ `${ id }-${ index }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default RadioControl;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,OAAA,GAAAH,OAAA;AAjBA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,YAAYA,CAC3BC,KAAmE,EAClE;EACD,MAAM;IACLC,KAAK;IACLC,SAAS;IACTC,QAAQ;IACRC,IAAI;IACJC,QAAQ;IAC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;EAAe,CACpB,CAAC,EACF,IAAAS,MAAA,CAAAC,aAAA;IACChB,SAAS,EAAC,iCAAiC;IAC3C8B,OAAO,EAAI,GAAGrB,EAAI,IAAIe,KAAO;EAAG,GAE9BD,MAAM,CAACxB,KACH,CACH,CACJ,CACK,CACI,CAAC;AAEhB;AAAC,IAAAgC,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEcpB,YAAY","ignoreList":[]}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = exports.RangeControl = void 0;
8
8
  var _react = require("react");
9
- var _classnames = _interopRequireDefault(require("classnames"));
9
+ var _clsx = _interopRequireDefault(require("clsx"));
10
10
  var _i18n = require("@wordpress/i18n");
11
11
  var _element = require("@wordpress/element");
12
12
  var _compose = require("@wordpress/compose");
@@ -95,8 +95,8 @@ function UnforwardedRangeControl(props, forwardedRef) {
95
95
  const rangeFillValue = isValueReset ? (max - min) / 2 + min : value;
96
96
  const fillValue = isValueReset ? 50 : (value - min) / (max - min) * 100;
97
97
  const fillValueOffset = `${(0, _math.clamp)(fillValue, 0, 100)}%`;
98
- const classes = (0, _classnames.default)('components-range-control', className);
99
- const wrapperClasses = (0, _classnames.default)('components-range-control__wrapper', !!marks && 'is-marked');
98
+ const classes = (0, _clsx.default)('components-range-control', className);
99
+ const wrapperClasses = (0, _clsx.default)('components-range-control__wrapper', !!marks && 'is-marked');
100
100
  const id = (0, _compose.useInstanceId)(UnforwardedRangeControl, 'inspector-range-control');
101
101
  const describedBy = !!help ? `${id}__help` : undefined;
102
102
  const enableTooltip = hasTooltip !== false && Number.isFinite(value);
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_i18n","_element","_compose","_baseControl","_button","_icon","_utils","_utils2","_math","_inputRange","_rail","_tooltip","_rangeControlStyles","_space","noop","UnforwardedRangeControl","props","forwardedRef","__nextHasNoMarginBottom","afterIcon","allowReset","beforeIcon","className","color","colorProp","COLORS","theme","accent","currentInput","disabled","help","hideLabelFromVision","initialPosition","isShiftStepEnabled","label","marks","max","min","onBlur","onChange","onFocus","onMouseLeave","onMouseMove","railColor","renderTooltipContent","v","resetFallbackValue","__next40pxDefaultSize","shiftStep","showTooltip","showTooltipProp","step","trackColor","value","valueProp","withInputField","otherProps","setValue","useControlledRangeValue","initial","isResetPendent","useRef","hasTooltip","hasInputField","setShowTooltip","useState","isFocused","setIsFocused","inputRef","isCurrentlyFocused","current","matches","isThumbFocused","isValueReset","currentValue","undefined","inputSliderValue","rangeFillValue","fillValue","fillValueOffset","clamp","classes","classnames","wrapperClasses","id","useInstanceId","describedBy","enableTooltip","Number","isFinite","handleOnRangeChange","event","nextValue","parseFloat","target","handleOnChange","next","isNaN","floatClamp","handleOnInputNumberBlur","handleOnReset","resetValue","onChangeResetValue","handleShowTooltip","handleHideTooltip","handleOnBlur","handleOnFocus","offsetStyle","isRTL","_react","createElement","default","Root","BeforeIconWrapper","icon","Wrapper","ref","useMergeRefs","Track","style","width","ThumbWrapper","Thumb","tooltipPosition","show","AfterIconWrapper","InputNumber","inputMode","size","__unstableInputWidth","space","ActionRightWrapper","variant","onClick","__","RangeControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/range-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport {\n\tActionRightWrapper,\n\tAfterIconWrapper,\n\tBeforeIconWrapper,\n\tInputNumber,\n\tRoot,\n\tTrack,\n\tThumbWrapper,\n\tThumb,\n\tWrapper,\n} from './styles/range-control-styles';\n\nimport type { RangeControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { space } from '../utils/space';\n\nconst noop = () => {};\n\nfunction UnforwardedRangeControl(\n\tprops: WordPressComponentProps< RangeControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tafterIcon,\n\t\tallowReset = false,\n\t\tbeforeIcon,\n\t\tclassName,\n\t\tcolor: colorProp = COLORS.theme.accent,\n\t\tcurrentInput,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tinitialPosition,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmarks = false,\n\t\tmax = 100,\n\t\tmin = 0,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonFocus = noop,\n\t\tonMouseLeave = noop,\n\t\tonMouseMove = noop,\n\t\trailColor,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tresetFallbackValue,\n\t\t__next40pxDefaultSize = false,\n\t\tshiftStep = 10,\n\t\tshowTooltip: showTooltipProp,\n\t\tstep = 1,\n\t\ttrackColor,\n\t\tvalue: valueProp,\n\t\twithInputField = true,\n\t\t...otherProps\n\t} = props;\n\n\tconst [ value, setValue ] = useControlledRangeValue( {\n\t\tmin,\n\t\tmax,\n\t\tvalue: valueProp ?? null,\n\t\tinitial: initialPosition,\n\t} );\n\tconst isResetPendent = useRef( false );\n\n\tlet hasTooltip = showTooltipProp;\n\tlet hasInputField = withInputField;\n\n\tif ( step === 'any' ) {\n\t\t// The tooltip and number input field are hidden when the step is \"any\"\n\t\t// because the decimals get too lengthy to fit well.\n\t\thasTooltip = false;\n\t\thasInputField = false;\n\t}\n\n\tconst [ showTooltip, setShowTooltip ] = useState( hasTooltip );\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst isCurrentlyFocused = inputRef.current?.matches( ':focus' );\n\tconst isThumbFocused = ! disabled && isFocused;\n\n\tconst isValueReset = value === null;\n\tconst currentValue = value !== undefined ? value : currentInput;\n\n\tconst inputSliderValue = isValueReset ? '' : currentValue;\n\tconst rangeFillValue = isValueReset ? ( max - min ) / 2 + min : value;\n\n\tconst fillValue = isValueReset\n\t\t? 50\n\t\t: ( ( value - min ) / ( max - min ) ) * 100;\n\tconst fillValueOffset = `${ clamp( fillValue, 0, 100 ) }%`;\n\n\tconst classes = classnames( 'components-range-control', className );\n\n\tconst wrapperClasses = classnames(\n\t\t'components-range-control__wrapper',\n\t\t!! marks && 'is-marked'\n\t);\n\n\tconst id = useInstanceId(\n\t\tUnforwardedRangeControl,\n\t\t'inspector-range-control'\n\t);\n\tconst describedBy = !! help ? `${ id }__help` : undefined;\n\tconst enableTooltip = hasTooltip !== false && Number.isFinite( value );\n\n\tconst handleOnRangeChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = parseFloat( event.target.value );\n\t\tsetValue( nextValue );\n\t\tonChange( nextValue );\n\t};\n\n\tconst handleOnChange = ( next?: string ) => {\n\t\t// @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n\t\t// potentially receive a NaN when next is undefined.\n\t\tlet nextValue = parseFloat( next );\n\t\tsetValue( nextValue );\n\n\t\t/*\n\t\t * Calls onChange only when nextValue is numeric\n\t\t * otherwise may queue a reset for the blur event.\n\t\t */\n\t\tif ( ! isNaN( nextValue ) ) {\n\t\t\tif ( nextValue < min || nextValue > max ) {\n\t\t\t\tnextValue = floatClamp( nextValue, min, max ) as number;\n\t\t\t}\n\n\t\t\tonChange( nextValue );\n\t\t\tisResetPendent.current = false;\n\t\t} else if ( allowReset ) {\n\t\t\tisResetPendent.current = true;\n\t\t}\n\t};\n\n\tconst handleOnInputNumberBlur = () => {\n\t\tif ( isResetPendent.current ) {\n\t\t\thandleOnReset();\n\t\t\tisResetPendent.current = false;\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tlet resetValue: number | null = parseFloat( `${ resetFallbackValue }` );\n\t\tlet onChangeResetValue: number | undefined = resetValue;\n\n\t\tif ( isNaN( resetValue ) ) {\n\t\t\tresetValue = null;\n\t\t\tonChangeResetValue = undefined;\n\t\t}\n\n\t\tsetValue( resetValue );\n\n\t\t/**\n\t\t * Previously, this callback would always receive undefined as\n\t\t * an argument. This behavior is unexpected, specifically\n\t\t * when resetFallbackValue is defined.\n\t\t *\n\t\t * The value of undefined is not ideal. Passing it through\n\t\t * to internal <input /> elements would change it from a\n\t\t * controlled component to an uncontrolled component.\n\t\t *\n\t\t * For now, to minimize unexpected regressions, we're going to\n\t\t * preserve the undefined callback argument, except when a\n\t\t * resetFallbackValue is defined.\n\t\t */\n\t\tonChange( onChangeResetValue );\n\t};\n\n\tconst handleShowTooltip = () => setShowTooltip( true );\n\tconst handleHideTooltip = () => setShowTooltip( false );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused( false );\n\t\thandleHideTooltip();\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused( true );\n\t\thandleShowTooltip();\n\t};\n\n\tconst offsetStyle = {\n\t\t[ isRTL() ? 'right' : 'left' ]: fillValueOffset,\n\t};\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tclassName={ classes }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ `${ id }` }\n\t\t\thelp={ help }\n\t\t>\n\t\t\t<Root\n\t\t\t\tclassName=\"components-range-control__root\"\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t{ beforeIcon && (\n\t\t\t\t\t<BeforeIconWrapper>\n\t\t\t\t\t\t<Icon icon={ beforeIcon } />\n\t\t\t\t\t</BeforeIconWrapper>\n\t\t\t\t) }\n\t\t\t\t<Wrapper\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\t\tcolor={ colorProp }\n\t\t\t\t\tmarks={ !! marks }\n\t\t\t\t>\n\t\t\t\t\t<InputRange\n\t\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t\tclassName=\"components-range-control__slider\"\n\t\t\t\t\t\tdescribedBy={ describedBy }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tid={ `${ id }` }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\t\tonChange={ handleOnRangeChange }\n\t\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\t\tonMouseMove={ onMouseMove }\n\t\t\t\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\t\t\t\tref={ useMergeRefs( [ inputRef, forwardedRef ] ) }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ inputSliderValue ?? undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeRail\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tmarks={ marks }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\trailColor={ railColor }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ rangeFillValue }\n\t\t\t\t\t/>\n\t\t\t\t\t<Track\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tclassName=\"components-range-control__track\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tstyle={ { width: fillValueOffset } }\n\t\t\t\t\t\ttrackColor={ trackColor }\n\t\t\t\t\t/>\n\t\t\t\t\t<ThumbWrapper\n\t\t\t\t\t\tclassName=\"components-range-control__thumb-wrapper\"\n\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thumb\n\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\tisFocused={ isThumbFocused }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ThumbWrapper>\n\t\t\t\t\t{ enableTooltip && (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tclassName=\"components-range-control__tooltip\"\n\t\t\t\t\t\t\tinputRef={ inputRef }\n\t\t\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\t\t\trenderTooltipContent={ renderTooltipContent }\n\t\t\t\t\t\t\tshow={ isCurrentlyFocused || showTooltip }\n\t\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Wrapper>\n\t\t\t\t{ afterIcon && (\n\t\t\t\t\t<AfterIconWrapper>\n\t\t\t\t\t\t<Icon icon={ afterIcon } />\n\t\t\t\t\t</AfterIconWrapper>\n\t\t\t\t) }\n\t\t\t\t{ hasInputField && (\n\t\t\t\t\t<InputNumber\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tclassName=\"components-range-control__number\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tisShiftStepEnabled={ isShiftStepEnabled }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnInputNumberBlur }\n\t\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\t\tshiftStep={ shiftStep }\n\t\t\t\t\t\tsize={\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t? '__unstable-large'\n\t\t\t\t\t\t\t\t: 'default'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t\t\t__next40pxDefaultSize ? space( 20 ) : space( 16 )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if the `null` value is necessary\n\t\t\t\t\t\tvalue={ inputSliderValue }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ allowReset && (\n\t\t\t\t\t<ActionRightWrapper>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-range-control__reset\"\n\t\t\t\t\t\t\tdisabled={ disabled || value === undefined }\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</ActionRightWrapper>\n\t\t\t\t) }\n\t\t\t</Root>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <RangeControl\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={50}\n * label=\"Opacity\"\n * max={100}\n * min={0}\n * onChange={() => {}}\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef( UnforwardedRangeControl );\n\nexport default RangeControl;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK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AACA;AACA;AACO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,mBAAU,EAAE1H,uBAAwB,CAAC;AAAC,IAAA2H,QAAA,GAAAF,OAAA,CAAAzB,OAAA,GAEnDwB,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_compose","_baseControl","_button","_icon","_utils","_utils2","_math","_inputRange","_rail","_tooltip","_rangeControlStyles","_space","noop","UnforwardedRangeControl","props","forwardedRef","__nextHasNoMarginBottom","afterIcon","allowReset","beforeIcon","className","color","colorProp","COLORS","theme","accent","currentInput","disabled","help","hideLabelFromVision","initialPosition","isShiftStepEnabled","label","marks","max","min","onBlur","onChange","onFocus","onMouseLeave","onMouseMove","railColor","renderTooltipContent","v","resetFallbackValue","__next40pxDefaultSize","shiftStep","showTooltip","showTooltipProp","step","trackColor","value","valueProp","withInputField","otherProps","setValue","useControlledRangeValue","initial","isResetPendent","useRef","hasTooltip","hasInputField","setShowTooltip","useState","isFocused","setIsFocused","inputRef","isCurrentlyFocused","current","matches","isThumbFocused","isValueReset","currentValue","undefined","inputSliderValue","rangeFillValue","fillValue","fillValueOffset","clamp","classes","clsx","wrapperClasses","id","useInstanceId","describedBy","enableTooltip","Number","isFinite","handleOnRangeChange","event","nextValue","parseFloat","target","handleOnChange","next","isNaN","floatClamp","handleOnInputNumberBlur","handleOnReset","resetValue","onChangeResetValue","handleShowTooltip","handleHideTooltip","handleOnBlur","handleOnFocus","offsetStyle","isRTL","_react","createElement","default","Root","BeforeIconWrapper","icon","Wrapper","ref","useMergeRefs","Track","style","width","ThumbWrapper","Thumb","tooltipPosition","show","AfterIconWrapper","InputNumber","inputMode","size","__unstableInputWidth","space","ActionRightWrapper","variant","onClick","__","RangeControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/range-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport {\n\tActionRightWrapper,\n\tAfterIconWrapper,\n\tBeforeIconWrapper,\n\tInputNumber,\n\tRoot,\n\tTrack,\n\tThumbWrapper,\n\tThumb,\n\tWrapper,\n} from './styles/range-control-styles';\n\nimport type { RangeControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { space } from '../utils/space';\n\nconst noop = () => {};\n\nfunction UnforwardedRangeControl(\n\tprops: WordPressComponentProps< RangeControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tafterIcon,\n\t\tallowReset = false,\n\t\tbeforeIcon,\n\t\tclassName,\n\t\tcolor: colorProp = COLORS.theme.accent,\n\t\tcurrentInput,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tinitialPosition,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmarks = false,\n\t\tmax = 100,\n\t\tmin = 0,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonFocus = noop,\n\t\tonMouseLeave = noop,\n\t\tonMouseMove = noop,\n\t\trailColor,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tresetFallbackValue,\n\t\t__next40pxDefaultSize = false,\n\t\tshiftStep = 10,\n\t\tshowTooltip: showTooltipProp,\n\t\tstep = 1,\n\t\ttrackColor,\n\t\tvalue: valueProp,\n\t\twithInputField = true,\n\t\t...otherProps\n\t} = props;\n\n\tconst [ value, setValue ] = useControlledRangeValue( {\n\t\tmin,\n\t\tmax,\n\t\tvalue: valueProp ?? null,\n\t\tinitial: initialPosition,\n\t} );\n\tconst isResetPendent = useRef( false );\n\n\tlet hasTooltip = showTooltipProp;\n\tlet hasInputField = withInputField;\n\n\tif ( step === 'any' ) {\n\t\t// The tooltip and number input field are hidden when the step is \"any\"\n\t\t// because the decimals get too lengthy to fit well.\n\t\thasTooltip = false;\n\t\thasInputField = false;\n\t}\n\n\tconst [ showTooltip, setShowTooltip ] = useState( hasTooltip );\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst isCurrentlyFocused = inputRef.current?.matches( ':focus' );\n\tconst isThumbFocused = ! disabled && isFocused;\n\n\tconst isValueReset = value === null;\n\tconst currentValue = value !== undefined ? value : currentInput;\n\n\tconst inputSliderValue = isValueReset ? '' : currentValue;\n\tconst rangeFillValue = isValueReset ? ( max - min ) / 2 + min : value;\n\n\tconst fillValue = isValueReset\n\t\t? 50\n\t\t: ( ( value - min ) / ( max - min ) ) * 100;\n\tconst fillValueOffset = `${ clamp( fillValue, 0, 100 ) }%`;\n\n\tconst classes = clsx( 'components-range-control', className );\n\n\tconst wrapperClasses = clsx(\n\t\t'components-range-control__wrapper',\n\t\t!! marks && 'is-marked'\n\t);\n\n\tconst id = useInstanceId(\n\t\tUnforwardedRangeControl,\n\t\t'inspector-range-control'\n\t);\n\tconst describedBy = !! help ? `${ id }__help` : undefined;\n\tconst enableTooltip = hasTooltip !== false && Number.isFinite( value );\n\n\tconst handleOnRangeChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = parseFloat( event.target.value );\n\t\tsetValue( nextValue );\n\t\tonChange( nextValue );\n\t};\n\n\tconst handleOnChange = ( next?: string ) => {\n\t\t// @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n\t\t// potentially receive a NaN when next is undefined.\n\t\tlet nextValue = parseFloat( next );\n\t\tsetValue( nextValue );\n\n\t\t/*\n\t\t * Calls onChange only when nextValue is numeric\n\t\t * otherwise may queue a reset for the blur event.\n\t\t */\n\t\tif ( ! isNaN( nextValue ) ) {\n\t\t\tif ( nextValue < min || nextValue > max ) {\n\t\t\t\tnextValue = floatClamp( nextValue, min, max ) as number;\n\t\t\t}\n\n\t\t\tonChange( nextValue );\n\t\t\tisResetPendent.current = false;\n\t\t} else if ( allowReset ) {\n\t\t\tisResetPendent.current = true;\n\t\t}\n\t};\n\n\tconst handleOnInputNumberBlur = () => {\n\t\tif ( isResetPendent.current ) {\n\t\t\thandleOnReset();\n\t\t\tisResetPendent.current = false;\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tlet resetValue: number | null = parseFloat( `${ resetFallbackValue }` );\n\t\tlet onChangeResetValue: number | undefined = resetValue;\n\n\t\tif ( isNaN( resetValue ) ) {\n\t\t\tresetValue = null;\n\t\t\tonChangeResetValue = undefined;\n\t\t}\n\n\t\tsetValue( resetValue );\n\n\t\t/**\n\t\t * Previously, this callback would always receive undefined as\n\t\t * an argument. This behavior is unexpected, specifically\n\t\t * when resetFallbackValue is defined.\n\t\t *\n\t\t * The value of undefined is not ideal. Passing it through\n\t\t * to internal <input /> elements would change it from a\n\t\t * controlled component to an uncontrolled component.\n\t\t *\n\t\t * For now, to minimize unexpected regressions, we're going to\n\t\t * preserve the undefined callback argument, except when a\n\t\t * resetFallbackValue is defined.\n\t\t */\n\t\tonChange( onChangeResetValue );\n\t};\n\n\tconst handleShowTooltip = () => setShowTooltip( true );\n\tconst handleHideTooltip = () => setShowTooltip( false );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused( false );\n\t\thandleHideTooltip();\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused( true );\n\t\thandleShowTooltip();\n\t};\n\n\tconst offsetStyle = {\n\t\t[ isRTL() ? 'right' : 'left' ]: fillValueOffset,\n\t};\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tclassName={ classes }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ `${ id }` }\n\t\t\thelp={ help }\n\t\t>\n\t\t\t<Root\n\t\t\t\tclassName=\"components-range-control__root\"\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t{ beforeIcon && (\n\t\t\t\t\t<BeforeIconWrapper>\n\t\t\t\t\t\t<Icon icon={ beforeIcon } />\n\t\t\t\t\t</BeforeIconWrapper>\n\t\t\t\t) }\n\t\t\t\t<Wrapper\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\t\tcolor={ colorProp }\n\t\t\t\t\tmarks={ !! marks }\n\t\t\t\t>\n\t\t\t\t\t<InputRange\n\t\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t\tclassName=\"components-range-control__slider\"\n\t\t\t\t\t\tdescribedBy={ describedBy }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tid={ `${ id }` }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\t\tonChange={ handleOnRangeChange }\n\t\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\t\tonMouseMove={ onMouseMove }\n\t\t\t\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\t\t\t\tref={ useMergeRefs( [ inputRef, forwardedRef ] ) }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ inputSliderValue ?? undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeRail\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tmarks={ marks }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\trailColor={ railColor }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ rangeFillValue }\n\t\t\t\t\t/>\n\t\t\t\t\t<Track\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tclassName=\"components-range-control__track\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tstyle={ { width: fillValueOffset } }\n\t\t\t\t\t\ttrackColor={ trackColor }\n\t\t\t\t\t/>\n\t\t\t\t\t<ThumbWrapper\n\t\t\t\t\t\tclassName=\"components-range-control__thumb-wrapper\"\n\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thumb\n\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\tisFocused={ isThumbFocused }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ThumbWrapper>\n\t\t\t\t\t{ enableTooltip && (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tclassName=\"components-range-control__tooltip\"\n\t\t\t\t\t\t\tinputRef={ inputRef }\n\t\t\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\t\t\trenderTooltipContent={ renderTooltipContent }\n\t\t\t\t\t\t\tshow={ isCurrentlyFocused || showTooltip }\n\t\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Wrapper>\n\t\t\t\t{ afterIcon && (\n\t\t\t\t\t<AfterIconWrapper>\n\t\t\t\t\t\t<Icon icon={ afterIcon } />\n\t\t\t\t\t</AfterIconWrapper>\n\t\t\t\t) }\n\t\t\t\t{ hasInputField && (\n\t\t\t\t\t<InputNumber\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tclassName=\"components-range-control__number\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tisShiftStepEnabled={ isShiftStepEnabled }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnInputNumberBlur }\n\t\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\t\tshiftStep={ shiftStep }\n\t\t\t\t\t\tsize={\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t? '__unstable-large'\n\t\t\t\t\t\t\t\t: 'default'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t\t\t__next40pxDefaultSize ? space( 20 ) : space( 16 )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if the `null` value is necessary\n\t\t\t\t\t\tvalue={ inputSliderValue }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ allowReset && (\n\t\t\t\t\t<ActionRightWrapper>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-range-control__reset\"\n\t\t\t\t\t\t\tdisabled={ disabled || value === undefined }\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</ActionRightWrapper>\n\t\t\t\t) }\n\t\t\t</Root>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <RangeControl\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={50}\n * label=\"Opacity\"\n * max={100}\n * min={0}\n * onChange={() => {}}\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef( UnforwardedRangeControl );\n\nexport default RangeControl;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,KAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,KAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,QAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,mBAAA,GAAAb,OAAA;AAcA,IAAAc,MAAA,GAAAd,OAAA;AAvCA;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;;AA0BA,MAAMe,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,SAASC,uBAAuBA,CAC/BC,KAAmE,EACnEC,YAA8C,EAC7C;EACD,MAAM;IACLC,uBAAuB,GAAG,KAAK;IAC/BC,SAAS;IACTC,UAAU,GAAG,KAAK;IAClBC,UAAU;IACVC,SAAS;IACTC,KAAK,EAAEC,SAAS,GAAGC,aAAM,CAACC,KAAK,CAACC,MAAM;IACtCC,YAAY;IACZC,QAAQ,GAAG,KAAK;IAChBC,IAAI;IACJC,mBAAmB,GAAG,KAAK;IAC3BC,eAAe;IACfC,kBAAkB,GAAG,IAAI;IACzBC,KAAK;IACLC,KAAK,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AA,CAAAC,aAAA,EAAC1G,OAAA,CAAA2G,OAAM;IACNzF,SAAS,EAAC,iCAAiC;IAC3CO,QAAQ,EAAGA,QAAQ,IAAIwB,KAAK,KAAKsB,SAAW;IAC5CyD,OAAO,EAAC,WAAW;IACnBJ,IAAI,EAAC,OAAO;IACZK,OAAO,EAAGjC;EAAe,GAEvB,IAAAkC,QAAE,EAAE,OAAQ,CACP,CACW,CAEhB,CACM,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,mBAAU,EAAE1H,uBAAwB,CAAC;AAAC,IAAA2H,QAAA,GAAAF,OAAA,CAAAzB,OAAA,GAEnDwB,YAAY","ignoreList":[]}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = RangeMark;
8
8
  var _react = require("react");
9
- var _classnames = _interopRequireDefault(require("classnames"));
9
+ var _clsx = _interopRequireDefault(require("clsx"));
10
10
  var _rangeControlStyles = require("./styles/range-control-styles");
11
11
  /**
12
12
  * External dependencies
@@ -24,8 +24,8 @@ function RangeMark(props) {
24
24
  style = {},
25
25
  ...otherProps
26
26
  } = props;
27
- const classes = (0, _classnames.default)('components-range-control__mark', isFilled && 'is-filled', className);
28
- const labelClasses = (0, _classnames.default)('components-range-control__mark-label', isFilled && 'is-filled');
27
+ const classes = (0, _clsx.default)('components-range-control__mark', isFilled && 'is-filled', className);
28
+ const labelClasses = (0, _clsx.default)('components-range-control__mark-label', isFilled && 'is-filled');
29
29
  return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_rangeControlStyles.Mark, {
30
30
  ...otherProps,
31
31
  "aria-hidden": "true",
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_rangeControlStyles","RangeMark","props","className","isFilled","label","style","otherProps","classes","classnames","labelClasses","_react","createElement","Fragment","Mark","MarkLabel"],"sources":["@wordpress/components/src/range-control/mark.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport { Mark, MarkLabel } from './styles/range-control-styles';\n\nimport type { RangeMarkProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function RangeMark(\n\tprops: WordPressComponentProps< RangeMarkProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisFilled = false,\n\t\tlabel,\n\t\tstyle = {},\n\t\t...otherProps\n\t} = props;\n\n\tconst classes = classnames(\n\t\t'components-range-control__mark',\n\t\tisFilled && 'is-filled',\n\t\tclassName\n\t);\n\tconst labelClasses = classnames(\n\t\t'components-range-control__mark-label',\n\t\tisFilled && 'is-filled'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<Mark\n\t\t\t\t{ ...otherProps }\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={ classes }\n\t\t\t\tisFilled={ isFilled }\n\t\t\t\tstyle={ style }\n\t\t\t/>\n\t\t\t{ label && (\n\t\t\t\t<MarkLabel\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclassName={ labelClasses }\n\t\t\t\t\tisFilled={ isFilled }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</MarkLabel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,mBAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAMe,SAASE,SAASA,CAChCC,KAAwD,EACvD;EACD,MAAM;IACLC,SAAS;IACTC,QAAQ,GAAG,KAAK;IAChBC,KAAK;IACLC,KAAK,GAAG,CAAC,CAAC;IACV,GAAGC;EACJ,CAAC,GAAGL,KAAK;EAET,MAAMM,OAAO,GAAG,IAAAC,mBAAU,EACzB,gCAAgC,EAChCL,QAAQ,IAAI,WAAW,EACvBD,SACD,CAAC;EACD,MAAMO,YAAY,GAAG,IAAAD,mBAAU,EAC9B,sCAAsC,EACtCL,QAAQ,IAAI,WACb,CAAC;EAED,OACC,IAAAO,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACZ,mBAAA,CAAAc,IAAI;IAAA,GACCP,UAAU;IACf,eAAY,MAAM;IAClBJ,SAAS,EAAGK,OAAS;IACrBJ,QAAQ,EAAGA,QAAU;IACrBE,KAAK,EAAGA;EAAO,CACf,CAAC,EACAD,KAAK,IACN,IAAAM,MAAA,CAAAC,aAAA,EAACZ,mBAAA,CAAAe,SAAS;IACT,eAAY,MAAM;IAClBZ,SAAS,EAAGO,YAAc;IAC1BN,QAAQ,EAAGA,QAAU;IACrBE,KAAK,EAAGA;EAAO,GAEbD,KACQ,CAEX,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_rangeControlStyles","RangeMark","props","className","isFilled","label","style","otherProps","classes","clsx","labelClasses","_react","createElement","Fragment","Mark","MarkLabel"],"sources":["@wordpress/components/src/range-control/mark.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport { Mark, MarkLabel } from './styles/range-control-styles';\n\nimport type { RangeMarkProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function RangeMark(\n\tprops: WordPressComponentProps< RangeMarkProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisFilled = false,\n\t\tlabel,\n\t\tstyle = {},\n\t\t...otherProps\n\t} = props;\n\n\tconst classes = clsx(\n\t\t'components-range-control__mark',\n\t\tisFilled && 'is-filled',\n\t\tclassName\n\t);\n\tconst labelClasses = clsx(\n\t\t'components-range-control__mark-label',\n\t\tisFilled && 'is-filled'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<Mark\n\t\t\t\t{ ...otherProps }\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={ classes }\n\t\t\t\tisFilled={ isFilled }\n\t\t\t\tstyle={ style }\n\t\t\t/>\n\t\t\t{ label && (\n\t\t\t\t<MarkLabel\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclassName={ labelClasses }\n\t\t\t\t\tisFilled={ isFilled }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</MarkLabel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,mBAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAMe,SAASE,SAASA,CAChCC,KAAwD,EACvD;EACD,MAAM;IACLC,SAAS;IACTC,QAAQ,GAAG,KAAK;IAChBC,KAAK;IACLC,KAAK,GAAG,CAAC,CAAC;IACV,GAAGC;EACJ,CAAC,GAAGL,KAAK;EAET,MAAMM,OAAO,GAAG,IAAAC,aAAI,EACnB,gCAAgC,EAChCL,QAAQ,IAAI,WAAW,EACvBD,SACD,CAAC;EACD,MAAMO,YAAY,GAAG,IAAAD,aAAI,EACxB,sCAAsC,EACtCL,QAAQ,IAAI,WACb,CAAC;EAED,OACC,IAAAO,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACZ,mBAAA,CAAAc,IAAI;IAAA,GACCP,UAAU;IACf,eAAY,MAAM;IAClBJ,SAAS,EAAGK,OAAS;IACrBJ,QAAQ,EAAGA,QAAU;IACrBE,KAAK,EAAGA;EAAO,CACf,CAAC,EACAD,KAAK,IACN,IAAAM,MAAA,CAAAC,aAAA,EAACZ,mBAAA,CAAAe,SAAS;IACT,eAAY,MAAM;IAClBZ,SAAS,EAAGO,YAAc;IAC1BN,QAAQ,EAAGA,QAAU;IACrBE,KAAK,EAAGA;EAAO,GAEbD,KACQ,CAEX,CAAC;AAEL","ignoreList":[]}
@@ -82,7 +82,7 @@ function useMarks({
82
82
  const count = 1 + Math.round(range / step);
83
83
  while (count > marks.push({
84
84
  value: step * marks.length + min
85
- }));
85
+ })) {}
86
86
  }
87
87
  const placedMarks = [];
88
88
  marks.forEach((mark, index) => {
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_mark","_interopRequireDefault","_rangeControlStyles","RangeRail","props","disabled","marks","min","max","step","value","restProps","_react","createElement","Fragment","Rail","Marks","stepProp","marksData","useMarks","MarksWrapper","className","map","mark","default","key","range","Array","isArray","count","Math","round","push","length","placedMarks","forEach","index","isFilled","offset","offsetStyle","isRTL","style"],"sources":["@wordpress/components/src/range-control/rail.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport RangeMark from './mark';\nimport { MarksWrapper, Rail } from './styles/range-control-styles';\n\nimport type { WordPressComponentProps } from '../context';\nimport type {\n\tMarksProps,\n\tRangeMarkProps,\n\tRailProps,\n\tUseMarksArgs,\n} from './types';\n\nexport default function RangeRail(\n\tprops: WordPressComponentProps< RailProps, 'span' >\n) {\n\tconst {\n\t\tdisabled = false,\n\t\tmarks = false,\n\t\tmin = 0,\n\t\tmax = 100,\n\t\tstep = 1,\n\t\tvalue = 0,\n\t\t...restProps\n\t} = props;\n\n\treturn (\n\t\t<>\n\t\t\t<Rail disabled={ disabled } { ...restProps } />\n\t\t\t{ marks && (\n\t\t\t\t<Marks\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tmarks={ marks }\n\t\t\t\t\tmin={ min }\n\t\t\t\t\tmax={ max }\n\t\t\t\t\tstep={ step }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction Marks( props: WordPressComponentProps< MarksProps, 'span' > ) {\n\tconst {\n\t\tdisabled = false,\n\t\tmarks = false,\n\t\tmin = 0,\n\t\tmax = 100,\n\t\tstep: stepProp = 1,\n\t\tvalue = 0,\n\t} = props;\n\n\tconst step = stepProp === 'any' ? 1 : stepProp;\n\tconst marksData = useMarks( { marks, min, max, step, value } );\n\n\treturn (\n\t\t<MarksWrapper\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"components-range-control__marks\"\n\t\t>\n\t\t\t{ marksData.map( ( mark ) => (\n\t\t\t\t<RangeMark\n\t\t\t\t\t{ ...mark }\n\t\t\t\t\tkey={ mark.key }\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</MarksWrapper>\n\t);\n}\n\nfunction useMarks( {\n\tmarks,\n\tmin = 0,\n\tmax = 100,\n\tstep = 1,\n\tvalue = 0,\n}: UseMarksArgs ) {\n\tif ( ! marks ) {\n\t\treturn [];\n\t}\n\n\tconst range = max - min;\n\tif ( ! Array.isArray( marks ) ) {\n\t\tmarks = [];\n\t\tconst count = 1 + Math.round( range / step );\n\t\twhile ( count > marks.push( { value: step * marks.length + min } ) );\n\t}\n\n\tconst placedMarks: RangeMarkProps[] = [];\n\tmarks.forEach( ( mark, index ) => {\n\t\tif ( mark.value < min || mark.value > max ) {\n\t\t\treturn;\n\t\t}\n\t\tconst key = `mark-${ index }`;\n\t\tconst isFilled = mark.value <= value;\n\t\tconst offset = `${ ( ( mark.value - min ) / range ) * 100 }%`;\n\n\t\tconst offsetStyle = {\n\t\t\t[ isRTL() ? 'right' : 'left' ]: offset,\n\t\t};\n\n\t\tplacedMarks.push( {\n\t\t\t...mark,\n\t\t\tisFilled,\n\t\t\tkey,\n\t\t\tstyle: offsetStyle,\n\t\t} );\n\t} );\n\n\treturn placedMarks;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAC,sBAAA,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GAAK,GAAK,GAAE;IAE7D,MAAMa,WAAW,GAAG;MACnB,CAAE,IAAAC,WAAK,EAAC,CAAC,GAAG,OAAO,GAAG,MAAM,GAAIF;IACjC,CAAC;IAEDJ,WAAW,CAACF,IAAI,CAAE;MACjB,GAAGT,IAAI;MACPc,QAAQ;MACRZ,GAAG;MACHgB,KAAK,EAAEF;IACR,CAAE,CAAC;EACJ,CAAE,CAAC;EAEH,OAAOL,WAAW;AACnB","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_mark","_interopRequireDefault","_rangeControlStyles","RangeRail","props","disabled","marks","min","max","step","value","restProps","_react","createElement","Fragment","Rail","Marks","stepProp","marksData","useMarks","MarksWrapper","className","map","mark","default","key","range","Array","isArray","count","Math","round","push","length","placedMarks","forEach","index","isFilled","offset","offsetStyle","isRTL","style"],"sources":["@wordpress/components/src/range-control/rail.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport RangeMark from './mark';\nimport { MarksWrapper, Rail } from './styles/range-control-styles';\n\nimport type { WordPressComponentProps } from '../context';\nimport type {\n\tMarksProps,\n\tRangeMarkProps,\n\tRailProps,\n\tUseMarksArgs,\n} from './types';\n\nexport default function RangeRail(\n\tprops: WordPressComponentProps< RailProps, 'span' >\n) {\n\tconst {\n\t\tdisabled = false,\n\t\tmarks = false,\n\t\tmin = 0,\n\t\tmax = 100,\n\t\tstep = 1,\n\t\tvalue = 0,\n\t\t...restProps\n\t} = props;\n\n\treturn (\n\t\t<>\n\t\t\t<Rail disabled={ disabled } { ...restProps } />\n\t\t\t{ marks && (\n\t\t\t\t<Marks\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tmarks={ marks }\n\t\t\t\t\tmin={ min }\n\t\t\t\t\tmax={ max }\n\t\t\t\t\tstep={ step }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction Marks( props: WordPressComponentProps< MarksProps, 'span' > ) {\n\tconst {\n\t\tdisabled = false,\n\t\tmarks = false,\n\t\tmin = 0,\n\t\tmax = 100,\n\t\tstep: stepProp = 1,\n\t\tvalue = 0,\n\t} = props;\n\n\tconst step = stepProp === 'any' ? 1 : stepProp;\n\tconst marksData = useMarks( { marks, min, max, step, value } );\n\n\treturn (\n\t\t<MarksWrapper\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"components-range-control__marks\"\n\t\t>\n\t\t\t{ marksData.map( ( mark ) => (\n\t\t\t\t<RangeMark\n\t\t\t\t\t{ ...mark }\n\t\t\t\t\tkey={ mark.key }\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</MarksWrapper>\n\t);\n}\n\nfunction useMarks( {\n\tmarks,\n\tmin = 0,\n\tmax = 100,\n\tstep = 1,\n\tvalue = 0,\n}: UseMarksArgs ) {\n\tif ( ! marks ) {\n\t\treturn [];\n\t}\n\n\tconst range = max - min;\n\tif ( ! Array.isArray( marks ) ) {\n\t\tmarks = [];\n\t\tconst count = 1 + Math.round( range / step );\n\t\twhile ( count > marks.push( { value: step * marks.length + min } ) ) {}\n\t}\n\n\tconst placedMarks: RangeMarkProps[] = [];\n\tmarks.forEach( ( mark, index ) => {\n\t\tif ( mark.value < min || mark.value > max ) {\n\t\t\treturn;\n\t\t}\n\t\tconst key = `mark-${ index }`;\n\t\tconst isFilled = mark.value <= value;\n\t\tconst offset = `${ ( ( mark.value - min ) / range ) * 100 }%`;\n\n\t\tconst offsetStyle = {\n\t\t\t[ isRTL() ? 'right' : 'left' ]: offset,\n\t\t};\n\n\t\tplacedMarks.push( {\n\t\t\t...mark,\n\t\t\tisFilled,\n\t\t\tkey,\n\t\t\tstyle: offsetStyle,\n\t\t} );\n\t} );\n\n\treturn placedMarks;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,I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