@wordpress/components 28.8.6 → 28.10.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 (894) hide show
  1. package/CHANGELOG.md +44 -5
  2. package/build/alignment-matrix-control/icon.js.map +1 -1
  3. package/build/alignment-matrix-control/types.js.map +1 -1
  4. package/build/alignment-matrix-control/utils.js.map +1 -1
  5. package/build/angle-picker-control/angle-circle.js.map +1 -1
  6. package/build/autocomplete/autocompleter-ui.js +3 -3
  7. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  8. package/build/autocomplete/get-default-use-items.js.map +1 -1
  9. package/build/autocomplete/index.js +5 -1
  10. package/build/autocomplete/index.js.map +1 -1
  11. package/build/base-control/hooks.js.map +1 -1
  12. package/build/base-control/index.js.map +1 -1
  13. package/build/border-box-control/border-box-control/component.js +3 -14
  14. package/build/border-box-control/border-box-control/component.js.map +1 -1
  15. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  16. package/build/border-box-control/styles.js.map +1 -1
  17. package/build/border-box-control/utils.js.map +1 -1
  18. package/build/border-control/border-control/component.js +1 -2
  19. package/build/border-control/border-control/component.js.map +1 -1
  20. package/build/border-control/border-control/hook.js.map +1 -1
  21. package/build/border-control/border-control-dropdown/component.js +2 -14
  22. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  23. package/build/border-control/styles.js +13 -13
  24. package/build/border-control/styles.js.map +1 -1
  25. package/build/border-control/types.js.map +1 -1
  26. package/build/box-control/axial-input-controls.js.map +1 -1
  27. package/build/box-control/icon.js.map +1 -1
  28. package/build/box-control/index.js +4 -4
  29. package/build/box-control/index.js.map +1 -1
  30. package/build/box-control/input-controls.js.map +1 -1
  31. package/build/box-control/types.js.map +1 -1
  32. package/build/button/index.native.js +1 -1
  33. package/build/button/index.native.js.map +1 -1
  34. package/build/card/card/component.js +1 -1
  35. package/build/card/card/component.js.map +1 -1
  36. package/build/card/styles.js.map +1 -1
  37. package/build/color-palette/index.js.map +1 -1
  38. package/build/color-palette/index.native.js +2 -1
  39. package/build/color-palette/index.native.js.map +1 -1
  40. package/build/color-picker/styles.js.map +1 -1
  41. package/build/combobox-control/index.js +1 -1
  42. package/build/combobox-control/index.js.map +1 -1
  43. package/build/composite/legacy/index.js.map +1 -1
  44. package/build/context/context-connect.js +1 -0
  45. package/build/context/context-connect.js.map +1 -1
  46. package/build/context/context-system-provider.js +1 -1
  47. package/build/context/context-system-provider.js.map +1 -1
  48. package/build/context/get-styled-class-name-from-key.js.map +1 -1
  49. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  50. package/build/custom-gradient-picker/index.js.map +1 -1
  51. package/build/custom-gradient-picker/serializer.js.map +1 -1
  52. package/build/custom-gradient-picker/utils.js.map +1 -1
  53. package/build/custom-select-control-v2/styles.js.map +1 -1
  54. package/build/dashicon/index.js.map +1 -1
  55. package/build/date-time/date/styles.js.map +1 -1
  56. package/build/date-time/time/timezone.js.map +1 -1
  57. package/build/draggable/index.js.map +1 -1
  58. package/build/drop-zone/index.js.map +1 -1
  59. package/build/dropdown-menu-v2/styles.js.map +1 -1
  60. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  61. package/build/duotone-picker/utils.js.map +1 -1
  62. package/build/elevation/hook.js.map +1 -1
  63. package/build/external-link/index.js +20 -23
  64. package/build/external-link/index.js.map +1 -1
  65. package/build/focal-point-picker/index.js.map +1 -1
  66. package/build/focal-point-picker/index.native.js.map +1 -1
  67. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  68. package/build/font-size-picker/index.js.map +1 -1
  69. package/build/form-token-field/index.js +2 -1
  70. package/build/form-token-field/index.js.map +1 -1
  71. package/build/form-token-field/suggestions-list.js.map +1 -1
  72. package/build/form-token-field/token-input.js.map +1 -1
  73. package/build/form-token-field/token.js +1 -1
  74. package/build/form-token-field/token.js.map +1 -1
  75. package/build/gradient-picker/index.js.map +1 -1
  76. package/build/grid/hook.js.map +1 -1
  77. package/build/guide/page-control.js +1 -1
  78. package/build/guide/page-control.js.map +1 -1
  79. package/build/h-stack/hook.js.map +1 -1
  80. package/build/heading/hook.js.map +1 -1
  81. package/build/index.js +36 -5
  82. package/build/index.js.map +1 -1
  83. package/build/input-control/index.js.map +1 -1
  84. package/build/input-control/input-base.js.map +1 -1
  85. package/build/input-control/styles/input-control-styles.js.map +1 -1
  86. package/build/item-group/styles.js.map +1 -1
  87. package/build/menu-group/index.js.map +1 -1
  88. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  89. package/build/mobile/bottom-sheet/cell.native.js +4 -4
  90. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  91. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  92. package/build/mobile/bottom-sheet/range-cell.native.js +1 -1
  93. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  94. package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  95. package/build/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  96. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  97. package/build/mobile/bottom-sheet/switch-cell.native.js +4 -4
  98. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  99. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  100. package/build/mobile/gradient/index.native.js.map +1 -1
  101. package/build/mobile/image/index.native.js.map +1 -1
  102. package/build/mobile/link-picker/index.native.js +1 -1
  103. package/build/mobile/link-picker/index.native.js.map +1 -1
  104. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  105. package/build/mobile/picker/index.android.js.map +1 -1
  106. package/build/mobile/segmented-control/index.native.js.map +1 -1
  107. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  108. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  109. package/build/modal/aria-helper.js +2 -1
  110. package/build/modal/aria-helper.js.map +1 -1
  111. package/build/modal/index.js +2 -1
  112. package/build/modal/index.js.map +1 -1
  113. package/build/modal/use-modal-exit-animation.js.map +1 -1
  114. package/build/navigation/group/index.js.map +1 -1
  115. package/build/navigation/item/base.js.map +1 -1
  116. package/build/navigation/menu/index.js.map +1 -1
  117. package/build/navigation/menu/menu-title-search.js +2 -2
  118. package/build/navigation/menu/menu-title-search.js.map +1 -1
  119. package/build/navigation/menu/menu-title.js.map +1 -1
  120. package/build/navigation/styles/navigation-styles.js.map +1 -1
  121. package/build/navigator/index.js +128 -32
  122. package/build/navigator/index.js.map +1 -1
  123. package/build/navigator/legacy.js +179 -0
  124. package/build/navigator/legacy.js.map +1 -0
  125. package/build/navigator/{navigator-provider → navigator}/component.js +5 -40
  126. package/build/navigator/navigator/component.js.map +1 -0
  127. package/build/navigator/navigator-back-button/component.js +2 -38
  128. package/build/navigator/navigator-back-button/component.js.map +1 -1
  129. package/build/navigator/navigator-back-button/hook.js +1 -1
  130. package/build/navigator/navigator-back-button/hook.js.map +1 -1
  131. package/build/navigator/navigator-button/component.js +2 -37
  132. package/build/navigator/navigator-button/component.js.map +1 -1
  133. package/build/navigator/navigator-button/hook.js +1 -1
  134. package/build/navigator/navigator-button/hook.js.map +1 -1
  135. package/build/navigator/navigator-screen/component.js +40 -62
  136. package/build/navigator/navigator-screen/component.js.map +1 -1
  137. package/build/navigator/navigator-screen/use-screen-animate-presence.js +114 -0
  138. package/build/navigator/navigator-screen/use-screen-animate-presence.js.map +1 -0
  139. package/build/navigator/navigator-to-parent-button/component.js +3 -7
  140. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  141. package/build/navigator/styles.js +78 -35
  142. package/build/navigator/styles.js.map +1 -1
  143. package/build/navigator/types.js.map +1 -1
  144. package/build/navigator/use-navigator.js +4 -1
  145. package/build/navigator/use-navigator.js.map +1 -1
  146. package/build/number-control/styles/number-control-styles.js.map +1 -1
  147. package/build/palette-edit/index.js +1 -1
  148. package/build/palette-edit/index.js.map +1 -1
  149. package/build/popover/index.js +1 -1
  150. package/build/popover/index.js.map +1 -1
  151. package/build/popover/overlay-middlewares.js.map +1 -1
  152. package/build/popover/utils.js.map +1 -1
  153. package/build/progress-bar/index.js.map +1 -1
  154. package/build/progress-bar/styles.js.map +1 -1
  155. package/build/query-controls/index.js.map +1 -1
  156. package/build/query-controls/index.native.js.map +1 -1
  157. package/build/radio-control/index.js.map +1 -1
  158. package/build/radio-control/index.native.js.map +1 -1
  159. package/build/range-control/index.js.map +1 -1
  160. package/build/range-control/index.native.js.map +1 -1
  161. package/build/range-control/rail.js.map +1 -1
  162. package/build/range-control/styles/range-control-styles.js +32 -32
  163. package/build/range-control/styles/range-control-styles.js.map +1 -1
  164. package/build/range-control/tooltip.js +1 -1
  165. package/build/range-control/tooltip.js.map +1 -1
  166. package/build/range-control/utils.js.map +1 -1
  167. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  168. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  169. package/build/responsive-wrapper/index.js.map +1 -1
  170. package/build/sandbox/index.js.map +1 -1
  171. package/build/sandbox/index.native.js.map +1 -1
  172. package/build/search-control/index.js +11 -2
  173. package/build/search-control/index.js.map +1 -1
  174. package/build/search-control/index.native.js.map +1 -1
  175. package/build/search-control/types.js.map +1 -1
  176. package/build/select-control/index.js.map +1 -1
  177. package/build/select-control/index.native.js.map +1 -1
  178. package/build/slot-fill/index.js.map +1 -1
  179. package/build/spinner/styles.js.map +1 -1
  180. package/build/style-provider/index.js +1 -0
  181. package/build/style-provider/index.js.map +1 -1
  182. package/build/surface/hook.js.map +1 -1
  183. package/build/surface/styles.js.map +1 -1
  184. package/build/tab-panel/index.js.map +1 -1
  185. package/build/tabs/index.js.map +1 -1
  186. package/build/tabs/styles.js +30 -12
  187. package/build/tabs/styles.js.map +1 -1
  188. package/build/tabs/tab.js +7 -2
  189. package/build/tabs/tab.js.map +1 -1
  190. package/build/tabs/tablist.js +71 -39
  191. package/build/tabs/tablist.js.map +1 -1
  192. package/build/tabs/tabpanel.js.map +1 -1
  193. package/build/tabs/use-track-overflow.js +73 -0
  194. package/build/tabs/use-track-overflow.js.map +1 -0
  195. package/build/text/get-line-height.js.map +1 -1
  196. package/build/text/styles/text-mixins.native.js.map +1 -1
  197. package/build/text/utils.js.map +1 -1
  198. package/build/text-control/index.native.js.map +1 -1
  199. package/build/text-highlight/index.js.map +1 -1
  200. package/build/textarea-control/index.js.map +1 -1
  201. package/build/theme/color-algorithms.js.map +1 -1
  202. package/build/theme/styles.js.map +1 -1
  203. package/build/toggle-control/index.js.map +1 -1
  204. package/build/toggle-control/index.native.js.map +1 -1
  205. package/build/toggle-group-control/toggle-group-control/as-button-group.js +4 -2
  206. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  207. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +13 -2
  208. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  209. package/build/toggle-group-control/toggle-group-control/component.js +15 -8
  210. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  211. package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
  212. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  213. package/build/toggle-group-control/toggle-group-control-option-base/component.js +13 -20
  214. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  215. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +8 -9
  216. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  217. package/build/toggle-group-control/types.js.map +1 -1
  218. package/build/toolbar/toolbar/index.js.map +1 -1
  219. package/build/tools-panel/styles.js.map +1 -1
  220. package/build/unit-control/index.js.map +1 -1
  221. package/build/unit-control/utils.js.map +1 -1
  222. package/build/utils/breakpoint.js.map +1 -1
  223. package/build/utils/colors-values.js.map +1 -1
  224. package/build/utils/config-values.js.map +1 -1
  225. package/build/utils/element-rect.js +22 -13
  226. package/build/utils/element-rect.js.map +1 -1
  227. package/build/utils/font-size.js.map +1 -1
  228. package/build/utils/hooks/use-animated-offset-rect.js +80 -0
  229. package/build/utils/hooks/use-animated-offset-rect.js.map +1 -0
  230. package/build/utils/hooks/use-cx.js.map +1 -1
  231. package/build/utils/hooks/use-on-value-update.js +3 -7
  232. package/build/utils/hooks/use-on-value-update.js.map +1 -1
  233. package/build/utils/math.js +2 -2
  234. package/build/utils/math.js.map +1 -1
  235. package/build/utils/space.js.map +1 -1
  236. package/build/utils/unit-values.js.map +1 -1
  237. package/build/utils/use-responsive-value.js.map +1 -1
  238. package/build-module/alignment-matrix-control/cell.js +1 -2
  239. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  240. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  241. package/build-module/alignment-matrix-control/types.js.map +1 -1
  242. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  243. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  244. package/build-module/angle-picker-control/index.js +1 -2
  245. package/build-module/angle-picker-control/index.js.map +1 -1
  246. package/build-module/autocomplete/autocompleter-ui.js +4 -6
  247. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  248. package/build-module/autocomplete/autocompleter-ui.native.js +1 -2
  249. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  250. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  251. package/build-module/autocomplete/index.js +6 -4
  252. package/build-module/autocomplete/index.js.map +1 -1
  253. package/build-module/base-control/hooks.js.map +1 -1
  254. package/build-module/base-control/index.js +1 -2
  255. package/build-module/base-control/index.js.map +1 -1
  256. package/build-module/base-control/index.native.js +1 -2
  257. package/build-module/base-control/index.native.js.map +1 -1
  258. package/build-module/border-box-control/border-box-control/component.js +4 -16
  259. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  260. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  261. package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -2
  262. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  263. package/build-module/border-box-control/styles.js.map +1 -1
  264. package/build-module/border-box-control/utils.js.map +1 -1
  265. package/build-module/border-control/border-control/component.js +2 -4
  266. package/build-module/border-control/border-control/component.js.map +1 -1
  267. package/build-module/border-control/border-control/hook.js.map +1 -1
  268. package/build-module/border-control/border-control-dropdown/component.js +3 -17
  269. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  270. package/build-module/border-control/styles.js +13 -13
  271. package/build-module/border-control/styles.js.map +1 -1
  272. package/build-module/border-control/types.js.map +1 -1
  273. package/build-module/box-control/all-input-control.js +1 -3
  274. package/build-module/box-control/all-input-control.js.map +1 -1
  275. package/build-module/box-control/axial-input-controls.js +1 -3
  276. package/build-module/box-control/axial-input-controls.js.map +1 -1
  277. package/build-module/box-control/icon.js +1 -2
  278. package/build-module/box-control/icon.js.map +1 -1
  279. package/build-module/box-control/index.js +5 -6
  280. package/build-module/box-control/index.js.map +1 -1
  281. package/build-module/box-control/input-controls.js +1 -3
  282. package/build-module/box-control/input-controls.js.map +1 -1
  283. package/build-module/box-control/types.js.map +1 -1
  284. package/build-module/button/index.js +1 -3
  285. package/build-module/button/index.js.map +1 -1
  286. package/build-module/button/index.native.js +2 -3
  287. package/build-module/button/index.native.js.map +1 -1
  288. package/build-module/card/card/component.js +2 -3
  289. package/build-module/card/card/component.js.map +1 -1
  290. package/build-module/card/styles.js.map +1 -1
  291. package/build-module/checkbox-control/index.js +1 -2
  292. package/build-module/checkbox-control/index.js.map +1 -1
  293. package/build-module/circular-option-picker/circular-option-picker-option.js +1 -2
  294. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  295. package/build-module/circular-option-picker/circular-option-picker.js +1 -2
  296. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  297. package/build-module/color-indicator/index.native.js +1 -2
  298. package/build-module/color-indicator/index.native.js.map +1 -1
  299. package/build-module/color-palette/index.js +1 -2
  300. package/build-module/color-palette/index.js.map +1 -1
  301. package/build-module/color-palette/index.native.js +3 -4
  302. package/build-module/color-palette/index.native.js.map +1 -1
  303. package/build-module/color-picker/component.js +1 -2
  304. package/build-module/color-picker/component.js.map +1 -1
  305. package/build-module/color-picker/hsl-input.js +1 -3
  306. package/build-module/color-picker/hsl-input.js.map +1 -1
  307. package/build-module/color-picker/hsv-color-picker.native.js +1 -2
  308. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -1
  309. package/build-module/color-picker/hue-picker.native.js +1 -2
  310. package/build-module/color-picker/hue-picker.native.js.map +1 -1
  311. package/build-module/color-picker/index.native.js +1 -3
  312. package/build-module/color-picker/index.native.js.map +1 -1
  313. package/build-module/color-picker/input-with-slider.js +1 -2
  314. package/build-module/color-picker/input-with-slider.js.map +1 -1
  315. package/build-module/color-picker/rgb-input.js +1 -3
  316. package/build-module/color-picker/rgb-input.js.map +1 -1
  317. package/build-module/color-picker/saturation-picker.native.js +1 -2
  318. package/build-module/color-picker/saturation-picker.native.js.map +1 -1
  319. package/build-module/color-picker/styles.js.map +1 -1
  320. package/build-module/combobox-control/index.js +2 -3
  321. package/build-module/combobox-control/index.js.map +1 -1
  322. package/build-module/composite/legacy/index.js.map +1 -1
  323. package/build-module/confirm-dialog/component.js +1 -3
  324. package/build-module/confirm-dialog/component.js.map +1 -1
  325. package/build-module/context/context-connect.js +1 -0
  326. package/build-module/context/context-connect.js.map +1 -1
  327. package/build-module/context/context-system-provider.js +1 -1
  328. package/build-module/context/context-system-provider.js.map +1 -1
  329. package/build-module/context/get-styled-class-name-from-key.js.map +1 -1
  330. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +1 -3
  331. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  332. package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -2
  333. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  334. package/build-module/custom-gradient-picker/index.js +1 -2
  335. package/build-module/custom-gradient-picker/index.js.map +1 -1
  336. package/build-module/custom-gradient-picker/index.native.js +1 -3
  337. package/build-module/custom-gradient-picker/index.native.js.map +1 -1
  338. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  339. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  340. package/build-module/custom-select-control/index.js +1 -3
  341. package/build-module/custom-select-control/index.js.map +1 -1
  342. package/build-module/custom-select-control-v2/custom-select.js +1 -2
  343. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  344. package/build-module/custom-select-control-v2/item.js +1 -2
  345. package/build-module/custom-select-control-v2/item.js.map +1 -1
  346. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  347. package/build-module/dashicon/index.js.map +1 -1
  348. package/build-module/date-time/date/index.js +1 -2
  349. package/build-module/date-time/date/index.js.map +1 -1
  350. package/build-module/date-time/date/styles.js.map +1 -1
  351. package/build-module/date-time/date-time/index.js +1 -3
  352. package/build-module/date-time/date-time/index.js.map +1 -1
  353. package/build-module/date-time/time/index.js +1 -2
  354. package/build-module/date-time/time/index.js.map +1 -1
  355. package/build-module/date-time/time/time-input/index.js +1 -2
  356. package/build-module/date-time/time/time-input/index.js.map +1 -1
  357. package/build-module/date-time/time/timezone.js.map +1 -1
  358. package/build-module/dimension-control/index.js +1 -3
  359. package/build-module/dimension-control/index.js.map +1 -1
  360. package/build-module/draggable/index.js +1 -3
  361. package/build-module/draggable/index.js.map +1 -1
  362. package/build-module/drop-zone/index.js +1 -2
  363. package/build-module/drop-zone/index.js.map +1 -1
  364. package/build-module/dropdown/index.js +1 -2
  365. package/build-module/dropdown/index.js.map +1 -1
  366. package/build-module/dropdown/index.native.js +1 -2
  367. package/build-module/dropdown/index.native.js.map +1 -1
  368. package/build-module/dropdown-menu/index.js +1 -2
  369. package/build-module/dropdown-menu/index.js.map +1 -1
  370. package/build-module/dropdown-menu/index.native.js +1 -2
  371. package/build-module/dropdown-menu/index.native.js.map +1 -1
  372. package/build-module/dropdown-menu-v2/checkbox-item.js +1 -2
  373. package/build-module/dropdown-menu-v2/checkbox-item.js.map +1 -1
  374. package/build-module/dropdown-menu-v2/index.js +1 -3
  375. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  376. package/build-module/dropdown-menu-v2/item.js +1 -2
  377. package/build-module/dropdown-menu-v2/item.js.map +1 -1
  378. package/build-module/dropdown-menu-v2/radio-item.js +1 -2
  379. package/build-module/dropdown-menu-v2/radio-item.js.map +1 -1
  380. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  381. package/build-module/duotone-picker/color-list-picker/index.js +1 -3
  382. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  383. package/build-module/duotone-picker/duotone-picker.js +1 -2
  384. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  385. package/build-module/duotone-picker/utils.js.map +1 -1
  386. package/build-module/elevation/hook.js.map +1 -1
  387. package/build-module/external-link/index.js +21 -25
  388. package/build-module/external-link/index.js.map +1 -1
  389. package/build-module/external-link/index.native.js +1 -2
  390. package/build-module/external-link/index.native.js.map +1 -1
  391. package/build-module/focal-point-picker/controls.js +1 -2
  392. package/build-module/focal-point-picker/controls.js.map +1 -1
  393. package/build-module/focal-point-picker/focal-point.native.js +1 -2
  394. package/build-module/focal-point-picker/focal-point.native.js.map +1 -1
  395. package/build-module/focal-point-picker/grid.js +1 -2
  396. package/build-module/focal-point-picker/grid.js.map +1 -1
  397. package/build-module/focal-point-picker/index.js +1 -2
  398. package/build-module/focal-point-picker/index.js.map +1 -1
  399. package/build-module/focal-point-picker/index.native.js +1 -2
  400. package/build-module/focal-point-picker/index.native.js.map +1 -1
  401. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  402. package/build-module/focal-point-picker/tooltip/index.native.js +1 -2
  403. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  404. package/build-module/font-size-picker/index.js +1 -2
  405. package/build-module/font-size-picker/index.js.map +1 -1
  406. package/build-module/font-size-picker/index.native.js +1 -3
  407. package/build-module/font-size-picker/index.native.js.map +1 -1
  408. package/build-module/form-file-upload/index.js +1 -2
  409. package/build-module/form-file-upload/index.js.map +1 -1
  410. package/build-module/form-toggle/index.js +1 -2
  411. package/build-module/form-toggle/index.js.map +1 -1
  412. package/build-module/form-token-field/index.js +3 -3
  413. package/build-module/form-token-field/index.js.map +1 -1
  414. package/build-module/form-token-field/suggestions-list.js +1 -2
  415. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  416. package/build-module/form-token-field/token-input.js.map +1 -1
  417. package/build-module/form-token-field/token.js +2 -3
  418. package/build-module/form-token-field/token.js.map +1 -1
  419. package/build-module/gradient-picker/index.js +1 -2
  420. package/build-module/gradient-picker/index.js.map +1 -1
  421. package/build-module/grid/hook.js.map +1 -1
  422. package/build-module/guide/index.js +1 -2
  423. package/build-module/guide/index.js.map +1 -1
  424. package/build-module/guide/page-control.js +1 -1
  425. package/build-module/guide/page-control.js.map +1 -1
  426. package/build-module/h-stack/hook.js.map +1 -1
  427. package/build-module/heading/hook.js.map +1 -1
  428. package/build-module/higher-order/with-fallback-styles/index.js +3 -4
  429. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  430. package/build-module/index.js +14 -4
  431. package/build-module/index.js.map +1 -1
  432. package/build-module/input-control/index.js.map +1 -1
  433. package/build-module/input-control/input-base.js +1 -2
  434. package/build-module/input-control/input-base.js.map +1 -1
  435. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  436. package/build-module/item-group/styles.js.map +1 -1
  437. package/build-module/keyboard-shortcuts/index.js +1 -3
  438. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  439. package/build-module/menu-group/index.js +1 -2
  440. package/build-module/menu-group/index.js.map +1 -1
  441. package/build-module/menu-item/index.js +1 -2
  442. package/build-module/menu-item/index.js.map +1 -1
  443. package/build-module/menu-items-choice/index.js +1 -2
  444. package/build-module/menu-items-choice/index.js.map +1 -1
  445. package/build-module/mobile/badge/index.native.js +1 -3
  446. package/build-module/mobile/badge/index.native.js.map +1 -1
  447. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -2
  448. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  449. package/build-module/mobile/bottom-sheet/cell.native.js +5 -6
  450. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  451. package/build-module/mobile/bottom-sheet/color-cell.native.js +1 -2
  452. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  453. package/build-module/mobile/bottom-sheet/index.native.js +1 -3
  454. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  455. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -2
  456. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  457. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -2
  458. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  459. package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
  460. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  461. package/build-module/mobile/bottom-sheet/range-text-input.native.js +1 -2
  462. package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  463. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +2 -3
  464. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  465. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js +1 -2
  466. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
  467. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js +1 -2
  468. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
  469. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
  470. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  471. package/build-module/mobile/bottom-sheet/switch-cell.native.js +4 -4
  472. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  473. package/build-module/mobile/bottom-sheet-select-control/index.native.js +1 -3
  474. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  475. package/build-module/mobile/bottom-sheet-text-control/index.native.js +1 -3
  476. package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  477. package/build-module/mobile/color-settings/gradient-picker-screen.native.js +1 -2
  478. package/build-module/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
  479. package/build-module/mobile/color-settings/index.native.js +1 -2
  480. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  481. package/build-module/mobile/color-settings/palette.screen.native.js +1 -3
  482. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  483. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  484. package/build-module/mobile/focal-point-settings-panel/index.native.js +1 -2
  485. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  486. package/build-module/mobile/gradient/index.native.js +1 -2
  487. package/build-module/mobile/gradient/index.native.js.map +1 -1
  488. package/build-module/mobile/html-text-input/index.native.js +1 -2
  489. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  490. package/build-module/mobile/image/icon-retry.native.js +1 -2
  491. package/build-module/mobile/image/icon-retry.native.js.map +1 -1
  492. package/build-module/mobile/image/image-editing-button.native.js +1 -2
  493. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  494. package/build-module/mobile/image/index.native.js +1 -3
  495. package/build-module/mobile/image/index.native.js.map +1 -1
  496. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +1 -2
  497. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  498. package/build-module/mobile/link-picker/index.native.js +2 -3
  499. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  500. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  501. package/build-module/mobile/link-settings/index.native.js +1 -3
  502. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  503. package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -2
  504. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  505. package/build-module/mobile/picker/index.android.js +1 -2
  506. package/build-module/mobile/picker/index.android.js.map +1 -1
  507. package/build-module/mobile/segmented-control/index.native.js +1 -2
  508. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  509. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  510. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  511. package/build-module/modal/aria-helper.js +2 -1
  512. package/build-module/modal/aria-helper.js.map +1 -1
  513. package/build-module/modal/index.js +3 -4
  514. package/build-module/modal/index.js.map +1 -1
  515. package/build-module/modal/use-modal-exit-animation.js.map +1 -1
  516. package/build-module/navigation/back-button/index.js +1 -2
  517. package/build-module/navigation/back-button/index.js.map +1 -1
  518. package/build-module/navigation/group/index.js +1 -2
  519. package/build-module/navigation/group/index.js.map +1 -1
  520. package/build-module/navigation/item/base-content.js +1 -3
  521. package/build-module/navigation/item/base-content.js.map +1 -1
  522. package/build-module/navigation/item/base.js.map +1 -1
  523. package/build-module/navigation/item/index.js +1 -2
  524. package/build-module/navigation/item/index.js.map +1 -1
  525. package/build-module/navigation/menu/index.js +1 -2
  526. package/build-module/navigation/menu/index.js.map +1 -1
  527. package/build-module/navigation/menu/menu-title-search.js +2 -2
  528. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  529. package/build-module/navigation/menu/menu-title.js +1 -2
  530. package/build-module/navigation/menu/menu-title.js.map +1 -1
  531. package/build-module/navigation/menu/search-no-results-found.js +1 -2
  532. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  533. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  534. package/build-module/navigator/index.js +130 -5
  535. package/build-module/navigator/index.js.map +1 -1
  536. package/build-module/navigator/legacy.js +167 -0
  537. package/build-module/navigator/legacy.js.map +1 -0
  538. package/build-module/navigator/{navigator-provider → navigator}/component.js +4 -39
  539. package/build-module/navigator/navigator/component.js.map +1 -0
  540. package/build-module/navigator/navigator-back-button/component.js +1 -37
  541. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  542. package/build-module/navigator/navigator-back-button/hook.js +1 -1
  543. package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
  544. package/build-module/navigator/navigator-button/component.js +1 -36
  545. package/build-module/navigator/navigator-button/component.js.map +1 -1
  546. package/build-module/navigator/navigator-button/hook.js +1 -1
  547. package/build-module/navigator/navigator-button/hook.js.map +1 -1
  548. package/build-module/navigator/navigator-screen/component.js +39 -61
  549. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  550. package/build-module/navigator/navigator-screen/use-screen-animate-presence.js +106 -0
  551. package/build-module/navigator/navigator-screen/use-screen-animate-presence.js.map +1 -0
  552. package/build-module/navigator/navigator-to-parent-button/component.js +2 -6
  553. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  554. package/build-module/navigator/styles.js +77 -33
  555. package/build-module/navigator/styles.js.map +1 -1
  556. package/build-module/navigator/types.js.map +1 -1
  557. package/build-module/navigator/use-navigator.js +4 -1
  558. package/build-module/navigator/use-navigator.js.map +1 -1
  559. package/build-module/notice/index.js +1 -2
  560. package/build-module/notice/index.js.map +1 -1
  561. package/build-module/notice/index.native.js +1 -3
  562. package/build-module/notice/index.native.js.map +1 -1
  563. package/build-module/number-control/index.js +1 -3
  564. package/build-module/number-control/index.js.map +1 -1
  565. package/build-module/number-control/styles/number-control-styles.js.map +1 -1
  566. package/build-module/palette-edit/index.js +2 -4
  567. package/build-module/palette-edit/index.js.map +1 -1
  568. package/build-module/panel/actions.native.js +1 -2
  569. package/build-module/panel/actions.native.js.map +1 -1
  570. package/build-module/panel/body.js +1 -2
  571. package/build-module/panel/body.js.map +1 -1
  572. package/build-module/panel/body.native.js +1 -2
  573. package/build-module/panel/body.native.js.map +1 -1
  574. package/build-module/panel/header.js +1 -2
  575. package/build-module/panel/header.js.map +1 -1
  576. package/build-module/panel/index.js +1 -2
  577. package/build-module/panel/index.js.map +1 -1
  578. package/build-module/placeholder/index.js +1 -2
  579. package/build-module/placeholder/index.js.map +1 -1
  580. package/build-module/popover/index.js +2 -4
  581. package/build-module/popover/index.js.map +1 -1
  582. package/build-module/popover/overlay-middlewares.js.map +1 -1
  583. package/build-module/popover/utils.js.map +1 -1
  584. package/build-module/progress-bar/index.js +1 -2
  585. package/build-module/progress-bar/index.js.map +1 -1
  586. package/build-module/progress-bar/styles.js.map +1 -1
  587. package/build-module/query-controls/index.js.map +1 -1
  588. package/build-module/query-controls/index.native.js +1 -3
  589. package/build-module/query-controls/index.native.js.map +1 -1
  590. package/build-module/radio-control/index.js +1 -2
  591. package/build-module/radio-control/index.js.map +1 -1
  592. package/build-module/radio-control/index.native.js +1 -2
  593. package/build-module/radio-control/index.native.js.map +1 -1
  594. package/build-module/range-control/index.js +1 -2
  595. package/build-module/range-control/index.js.map +1 -1
  596. package/build-module/range-control/index.native.js.map +1 -1
  597. package/build-module/range-control/mark.js +1 -3
  598. package/build-module/range-control/mark.js.map +1 -1
  599. package/build-module/range-control/rail.js +1 -3
  600. package/build-module/range-control/rail.js.map +1 -1
  601. package/build-module/range-control/styles/range-control-styles.js +32 -32
  602. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  603. package/build-module/range-control/tooltip.js +1 -1
  604. package/build-module/range-control/tooltip.js.map +1 -1
  605. package/build-module/range-control/utils.js.map +1 -1
  606. package/build-module/resizable-box/index.js +1 -2
  607. package/build-module/resizable-box/index.js.map +1 -1
  608. package/build-module/resizable-box/resize-tooltip/index.js +1 -2
  609. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  610. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  611. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  612. package/build-module/responsive-wrapper/index.js.map +1 -1
  613. package/build-module/sandbox/index.js +1 -2
  614. package/build-module/sandbox/index.js.map +1 -1
  615. package/build-module/sandbox/index.native.js +1 -2
  616. package/build-module/sandbox/index.native.js.map +1 -1
  617. package/build-module/search-control/index.js +11 -2
  618. package/build-module/search-control/index.js.map +1 -1
  619. package/build-module/search-control/index.native.js +1 -2
  620. package/build-module/search-control/index.native.js.map +1 -1
  621. package/build-module/search-control/types.js.map +1 -1
  622. package/build-module/select-control/index.js.map +1 -1
  623. package/build-module/select-control/index.native.js.map +1 -1
  624. package/build-module/slot-fill/index.js +1 -3
  625. package/build-module/slot-fill/index.js.map +1 -1
  626. package/build-module/slot-fill/slot.js +1 -2
  627. package/build-module/slot-fill/slot.js.map +1 -1
  628. package/build-module/snackbar/index.js +1 -2
  629. package/build-module/snackbar/index.js.map +1 -1
  630. package/build-module/snackbar/list.js +1 -2
  631. package/build-module/snackbar/list.js.map +1 -1
  632. package/build-module/spinner/index.js +1 -2
  633. package/build-module/spinner/index.js.map +1 -1
  634. package/build-module/spinner/styles.js.map +1 -1
  635. package/build-module/style-provider/index.js +1 -0
  636. package/build-module/style-provider/index.js.map +1 -1
  637. package/build-module/surface/hook.js.map +1 -1
  638. package/build-module/surface/styles.js.map +1 -1
  639. package/build-module/tab-panel/index.js +1 -2
  640. package/build-module/tab-panel/index.js.map +1 -1
  641. package/build-module/tabs/index.js.map +1 -1
  642. package/build-module/tabs/styles.js +28 -6
  643. package/build-module/tabs/styles.js.map +1 -1
  644. package/build-module/tabs/tab.js +9 -4
  645. package/build-module/tabs/tab.js.map +1 -1
  646. package/build-module/tabs/tablist.js +72 -40
  647. package/build-module/tabs/tablist.js.map +1 -1
  648. package/build-module/tabs/tabpanel.js.map +1 -1
  649. package/build-module/tabs/use-track-overflow.js +67 -0
  650. package/build-module/tabs/use-track-overflow.js.map +1 -0
  651. package/build-module/text/get-line-height.js.map +1 -1
  652. package/build-module/text/styles/text-mixins.native.js.map +1 -1
  653. package/build-module/text/utils.js.map +1 -1
  654. package/build-module/text-control/index.native.js.map +1 -1
  655. package/build-module/text-highlight/index.js +1 -2
  656. package/build-module/text-highlight/index.js.map +1 -1
  657. package/build-module/textarea-control/index.js.map +1 -1
  658. package/build-module/theme/color-algorithms.js.map +1 -1
  659. package/build-module/theme/styles.js.map +1 -1
  660. package/build-module/tip/index.js +1 -2
  661. package/build-module/tip/index.js.map +1 -1
  662. package/build-module/toggle-control/index.js +1 -2
  663. package/build-module/toggle-control/index.js.map +1 -1
  664. package/build-module/toggle-control/index.native.js.map +1 -1
  665. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +4 -2
  666. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  667. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +14 -3
  668. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  669. package/build-module/toggle-group-control/toggle-group-control/component.js +17 -12
  670. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  671. package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
  672. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  673. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +16 -25
  674. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  675. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +7 -8
  676. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  677. package/build-module/toggle-group-control/types.js.map +1 -1
  678. package/build-module/toolbar/toolbar/index.js.map +1 -1
  679. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js +2 -2
  680. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
  681. package/build-module/toolbar/toolbar-group/index.js +1 -2
  682. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  683. package/build-module/tools-panel/styles.js.map +1 -1
  684. package/build-module/tools-panel/tools-panel/component.js +1 -2
  685. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  686. package/build-module/tools-panel/tools-panel-header/component.js +1 -3
  687. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  688. package/build-module/tooltip/index.js +1 -2
  689. package/build-module/tooltip/index.js.map +1 -1
  690. package/build-module/tooltip/index.native.js +1 -3
  691. package/build-module/tooltip/index.native.js.map +1 -1
  692. package/build-module/tree-grid/cell.js +1 -2
  693. package/build-module/tree-grid/cell.js.map +1 -1
  694. package/build-module/unit-control/index.js.map +1 -1
  695. package/build-module/unit-control/index.native.js +1 -3
  696. package/build-module/unit-control/index.native.js.map +1 -1
  697. package/build-module/unit-control/utils.js.map +1 -1
  698. package/build-module/utils/breakpoint.js.map +1 -1
  699. package/build-module/utils/colors-values.js.map +1 -1
  700. package/build-module/utils/config-values.js.map +1 -1
  701. package/build-module/utils/element-rect.js +22 -12
  702. package/build-module/utils/element-rect.js.map +1 -1
  703. package/build-module/utils/font-size.js.map +1 -1
  704. package/build-module/utils/hooks/use-animated-offset-rect.js +74 -0
  705. package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -0
  706. package/build-module/utils/hooks/use-cx.js.map +1 -1
  707. package/build-module/utils/hooks/use-on-value-update.js +3 -6
  708. package/build-module/utils/hooks/use-on-value-update.js.map +1 -1
  709. package/build-module/utils/math.js +2 -2
  710. package/build-module/utils/math.js.map +1 -1
  711. package/build-module/utils/space.js.map +1 -1
  712. package/build-module/utils/unit-values.js.map +1 -1
  713. package/build-module/utils/use-responsive-value.js.map +1 -1
  714. package/build-style/style-rtl.css +30 -14
  715. package/build-style/style.css +30 -14
  716. package/build-types/alignment-matrix-control/types.d.ts +2 -0
  717. package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
  718. package/build-types/autocomplete/index.d.ts.map +1 -1
  719. package/build-types/border-box-control/border-box-control/component.d.ts +5 -15
  720. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  721. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +2 -1
  722. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  723. package/build-types/border-box-control/stories/index.story.d.ts +3 -2
  724. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  725. package/build-types/border-control/border-control/component.d.ts +3 -2
  726. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  727. package/build-types/border-control/border-control-dropdown/component.d.ts +2 -1
  728. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  729. package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
  730. package/build-types/border-control/stories/index.story.d.ts +15 -30
  731. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  732. package/build-types/border-control/styles.d.ts.map +1 -1
  733. package/build-types/border-control/types.d.ts +12 -7
  734. package/build-types/border-control/types.d.ts.map +1 -1
  735. package/build-types/box-control/index.d.ts +4 -4
  736. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  737. package/build-types/box-control/types.d.ts +3 -3
  738. package/build-types/composite/stories/index.story.d.ts +22 -0
  739. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  740. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  741. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  742. package/build-types/index.d.ts +23 -4
  743. package/build-types/index.d.ts.map +1 -1
  744. package/build-types/modal/aria-helper.d.ts.map +1 -1
  745. package/build-types/navigator/index.d.ts +171 -5
  746. package/build-types/navigator/index.d.ts.map +1 -1
  747. package/build-types/navigator/legacy.d.ts +226 -0
  748. package/build-types/navigator/legacy.d.ts.map +1 -0
  749. package/build-types/navigator/navigator/component.d.ts +3 -0
  750. package/build-types/navigator/navigator/component.d.ts.map +1 -0
  751. package/build-types/navigator/navigator-back-button/component.d.ts +0 -35
  752. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  753. package/build-types/navigator/navigator-button/component.d.ts +0 -34
  754. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  755. package/build-types/navigator/navigator-screen/component.d.ts +0 -35
  756. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  757. package/build-types/navigator/navigator-screen/use-screen-animate-presence.d.ts +16 -0
  758. package/build-types/navigator/navigator-screen/use-screen-animate-presence.d.ts.map +1 -0
  759. package/build-types/navigator/navigator-to-parent-button/component.d.ts +0 -4
  760. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  761. package/build-types/navigator/stories/index.story.d.ts +5 -5
  762. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  763. package/build-types/navigator/styles.d.ts +20 -7
  764. package/build-types/navigator/styles.d.ts.map +1 -1
  765. package/build-types/navigator/types.d.ts +19 -1
  766. package/build-types/navigator/types.d.ts.map +1 -1
  767. package/build-types/navigator/use-navigator.d.ts +4 -1
  768. package/build-types/navigator/use-navigator.d.ts.map +1 -1
  769. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  770. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  771. package/build-types/search-control/index.d.ts.map +1 -1
  772. package/build-types/search-control/stories/index.story.d.ts +0 -8
  773. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  774. package/build-types/search-control/types.d.ts +3 -0
  775. package/build-types/search-control/types.d.ts.map +1 -1
  776. package/build-types/select-control/stories/index.story.d.ts +7 -0
  777. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  778. package/build-types/tabs/stories/index.story.d.ts +2 -1
  779. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  780. package/build-types/tabs/styles.d.ts +7 -0
  781. package/build-types/tabs/styles.d.ts.map +1 -1
  782. package/build-types/tabs/tab.d.ts.map +1 -1
  783. package/build-types/tabs/tablist.d.ts.map +1 -1
  784. package/build-types/tabs/use-track-overflow.d.ts +17 -0
  785. package/build-types/tabs/use-track-overflow.d.ts.map +1 -0
  786. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +2 -2
  787. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  788. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +2 -2
  789. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  790. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  791. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  792. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  793. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +0 -1
  794. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  795. package/build-types/toggle-group-control/types.d.ts +2 -1
  796. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  797. package/build-types/utils/element-rect.d.ts +8 -0
  798. package/build-types/utils/element-rect.d.ts.map +1 -1
  799. package/build-types/utils/hooks/use-animated-offset-rect.d.ts +62 -0
  800. package/build-types/utils/hooks/use-animated-offset-rect.d.ts.map +1 -0
  801. package/build-types/utils/hooks/use-on-value-update.d.ts.map +1 -1
  802. package/package.json +20 -20
  803. package/schemas/docs-manifest.json +38 -0
  804. package/src/alignment-matrix-control/README.md +46 -36
  805. package/src/alignment-matrix-control/docs-manifest.json +12 -0
  806. package/src/alignment-matrix-control/types.ts +2 -0
  807. package/src/angle-picker-control/README.md +36 -23
  808. package/src/angle-picker-control/docs-manifest.json +5 -0
  809. package/src/autocomplete/index.tsx +4 -1
  810. package/src/border-box-control/border-box-control/README.md +22 -26
  811. package/src/border-box-control/border-box-control/component.tsx +3 -14
  812. package/src/border-box-control/stories/index.story.tsx +2 -1
  813. package/src/border-control/border-control/README.md +26 -36
  814. package/src/border-control/border-control/component.tsx +1 -2
  815. package/src/border-control/border-control-dropdown/component.tsx +1 -15
  816. package/src/border-control/stories/index.story.tsx +4 -10
  817. package/src/border-control/styles.ts +0 -1
  818. package/src/border-control/test/index.js +2 -15
  819. package/src/border-control/types.ts +12 -7
  820. package/src/box-control/README.md +9 -12
  821. package/src/box-control/index.tsx +4 -4
  822. package/src/box-control/stories/index.story.tsx +1 -1
  823. package/src/box-control/types.ts +3 -3
  824. package/src/button/style.scss +5 -1
  825. package/src/composite/legacy/test/index.tsx +22 -21
  826. package/src/composite/stories/index.story.tsx +42 -0
  827. package/src/composite/test/index.tsx +629 -38
  828. package/src/dropdown/stories/index.story.tsx +1 -0
  829. package/src/dropdown/style.scss +10 -13
  830. package/src/dropdown-menu/stories/index.story.tsx +3 -0
  831. package/src/index.ts +19 -1
  832. package/src/menu-group/style.scss +4 -1
  833. package/src/menu-items-choice/style.scss +2 -0
  834. package/src/modal/aria-helper.ts +1 -0
  835. package/src/navigator/README.md +176 -0
  836. package/src/navigator/index.tsx +131 -0
  837. package/src/navigator/legacy.ts +169 -0
  838. package/src/navigator/{navigator-provider → navigator}/component.tsx +6 -44
  839. package/src/navigator/navigator-back-button/component.tsx +1 -37
  840. package/src/navigator/navigator-back-button/hook.ts +1 -1
  841. package/src/navigator/navigator-button/component.tsx +1 -36
  842. package/src/navigator/navigator-button/hook.ts +1 -1
  843. package/src/navigator/navigator-screen/component.tsx +48 -76
  844. package/src/navigator/navigator-screen/use-screen-animate-presence.ts +177 -0
  845. package/src/navigator/navigator-to-parent-button/component.tsx +2 -7
  846. package/src/navigator/stories/index.story.tsx +55 -54
  847. package/src/navigator/styles.ts +112 -41
  848. package/src/navigator/test/index.tsx +47 -47
  849. package/src/navigator/types.ts +19 -1
  850. package/src/navigator/use-navigator.ts +4 -1
  851. package/src/range-control/styles/range-control-styles.ts +19 -10
  852. package/src/range-control/tooltip.tsx +1 -1
  853. package/src/search-control/README.md +2 -0
  854. package/src/search-control/index.tsx +9 -2
  855. package/src/search-control/stories/index.story.tsx +0 -15
  856. package/src/search-control/test/index.tsx +4 -1
  857. package/src/search-control/types.ts +3 -0
  858. package/src/select-control/stories/index.story.tsx +14 -1
  859. package/src/tabs/stories/index.story.tsx +106 -0
  860. package/src/tabs/styles.ts +161 -58
  861. package/src/tabs/tab.tsx +8 -2
  862. package/src/tabs/tablist.tsx +72 -39
  863. package/src/tabs/use-track-overflow.ts +76 -0
  864. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +208 -44
  865. package/src/toggle-group-control/test/index.tsx +26 -0
  866. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +18 -10
  867. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +30 -12
  868. package/src/toggle-group-control/toggle-group-control/component.tsx +19 -6
  869. package/src/toggle-group-control/toggle-group-control/styles.ts +41 -0
  870. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +15 -28
  871. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +0 -11
  872. package/src/toggle-group-control/types.ts +3 -1
  873. package/src/tools-panel/tools-panel/README.md +10 -10
  874. package/src/utils/element-rect.ts +32 -15
  875. package/src/utils/hooks/use-animated-offset-rect.ts +107 -0
  876. package/src/utils/hooks/use-on-value-update.ts +3 -6
  877. package/tsconfig.tsbuildinfo +1 -1
  878. package/build/navigator/navigator-provider/component.js.map +0 -1
  879. package/build/utils/hooks/use-event.js +0 -41
  880. package/build/utils/hooks/use-event.js.map +0 -1
  881. package/build-module/navigator/navigator-provider/component.js.map +0 -1
  882. package/build-module/utils/hooks/use-event.js +0 -35
  883. package/build-module/utils/hooks/use-event.js.map +0 -1
  884. package/build-types/navigator/navigator-provider/component.d.ts +0 -37
  885. package/build-types/navigator/navigator-provider/component.d.ts.map +0 -1
  886. package/build-types/utils/hooks/use-event.d.ts +0 -20
  887. package/build-types/utils/hooks/use-event.d.ts.map +0 -1
  888. package/src/navigator/index.ts +0 -6
  889. package/src/navigator/navigator-back-button/README.md +0 -15
  890. package/src/navigator/navigator-button/README.md +0 -38
  891. package/src/navigator/navigator-provider/README.md +0 -94
  892. package/src/navigator/navigator-screen/README.md +0 -33
  893. package/src/navigator/navigator-to-parent-button/README.md +0 -17
  894. package/src/utils/hooks/use-event.ts +0 -38
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useInstanceId","useMergeRefs","__","Icon","search","closeSmall","forwardRef","useMemo","useRef","Button","ContextSystemProvider","StyledInputControl","SuffixItemWrapper","jsx","_jsx","SuffixItem","searchRef","value","onChange","onClose","icon","onReset","current","focus","size","label","onClick","UnforwardedSearchControl","__nextHasNoMarginBottom","className","placeholder","hideLabelFromVision","restProps","forwardedRef","disabled","instanceId","SearchControl","contextValue","BaseControl","_overrides","__associatedWPComponentName","InputBase","isBorderless","children","__next40pxDefaultSize","id","ref","type","nextValue","autoComplete","suffix"],"sources":["@wordpress/components/src/search-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useMemo, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { SearchControlProps, SuffixItemProps } from './types';\nimport type { ForwardedRef } from 'react';\nimport { ContextSystemProvider } from '../context';\nimport { StyledInputControl, SuffixItemWrapper } from './styles';\n\nfunction SuffixItem( {\n\tsearchRef,\n\tvalue,\n\tonChange,\n\tonClose,\n}: SuffixItemProps ) {\n\tif ( ! onClose && ! value ) {\n\t\treturn <Icon icon={ search } />;\n\t}\n\n\tconst onReset = () => {\n\t\tonChange( '' );\n\t\tsearchRef.current?.focus();\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\tsize=\"small\"\n\t\t\ticon={ closeSmall }\n\t\t\tlabel={ onClose ? __( 'Close search' ) : __( 'Reset search' ) }\n\t\t\tonClick={ onClose ?? onReset }\n\t\t/>\n\t);\n}\n\nfunction UnforwardedSearchControl(\n\t{\n\t\t__nextHasNoMarginBottom = false,\n\t\tclassName,\n\t\tonChange,\n\t\tvalue,\n\t\tlabel = __( 'Search' ),\n\t\tplaceholder = __( 'Search' ),\n\t\thideLabelFromVision = true,\n\t\tonClose,\n\t\tsize = 'default',\n\t\t...restProps\n\t}: Omit<\n\t\tWordPressComponentProps< SearchControlProps, 'input', false >,\n\t\t// TODO: Background styling currently doesn't support a disabled state. Needs design work.\n\t\t'disabled'\n\t>,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\t// @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.\n\t// Work with the design team (@WordPress/gutenberg-design) if you need this feature.\n\tdelete restProps.disabled;\n\n\tconst searchRef = useRef< HTMLInputElement >( null );\n\tconst instanceId = useInstanceId(\n\t\tSearchControl,\n\t\t'components-search-control'\n\t);\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tBaseControl: {\n\t\t\t\t// Overrides the underlying BaseControl `__nextHasNoMarginBottom` via the context system\n\t\t\t\t// to provide backwards compatibile margin for SearchControl.\n\t\t\t\t// (In a standard InputControl, the BaseControl `__nextHasNoMarginBottom` is always set to true.)\n\t\t\t\t_overrides: { __nextHasNoMarginBottom },\n\t\t\t\t__associatedWPComponentName: 'SearchControl',\n\t\t\t},\n\t\t\t// `isBorderless` is still experimental and not a public prop for InputControl yet.\n\t\t\tInputBase: { isBorderless: true },\n\t\t} ),\n\t\t[ __nextHasNoMarginBottom ]\n\t);\n\n\treturn (\n\t\t<ContextSystemProvider value={ contextValue }>\n\t\t\t<StyledInputControl\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tid={ instanceId }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tlabel={ label }\n\t\t\t\tref={ useMergeRefs( [ searchRef, forwardedRef ] ) }\n\t\t\t\ttype=\"search\"\n\t\t\t\tsize={ size }\n\t\t\t\tclassName={ clsx( 'components-search-control', className ) }\n\t\t\t\tonChange={ ( nextValue?: string ) =>\n\t\t\t\t\tonChange( nextValue ?? '' )\n\t\t\t\t}\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t\tvalue={ value ?? '' }\n\t\t\t\tsuffix={\n\t\t\t\t\t<SuffixItemWrapper size={ size }>\n\t\t\t\t\t\t<SuffixItem\n\t\t\t\t\t\t\tsearchRef={ searchRef }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SuffixItemWrapper>\n\t\t\t\t}\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n * const [ searchInput, setSearchInput ] = useState( '' );\n *\n * return (\n * <SearchControl\n * __nextHasNoMarginBottom\n * value={ searchInput }\n * onChange={ setSearchInput }\n * />\n * );\n * }\n * ```\n */\nexport const SearchControl = forwardRef( UnforwardedSearchControl );\n\nexport default SearchControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,aAAa,EAAEC,YAAY,QAAQ,oBAAoB;AAChE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,MAAM,EAAEC,UAAU,QAAQ,kBAAkB;AAC3D,SAASC,UAAU,EAAEC,OAAO,EAAEC,MAAM,QAAQ,oBAAoB;;AAEhE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAI9B,SAASC,qBAAqB,QAAQ,YAAY;AAClD,SAASC,kBAAkB,EAAEC,iBAAiB,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjE,SAASC,UAAUA,CAAE;EACpBC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC;AACgB,CAAC,EAAG;EACpB,IAAK,CAAEA,OAAO,IAAI,CAAEF,KAAK,EAAG;IAC3B,oBAAOH,IAAA,CAACX,IAAI;MAACiB,IAAI,EAAGhB;IAAQ,CAAE,CAAC;EAChC;EAEA,MAAMiB,OAAO,GAAGA,CAAA,KAAM;IACrBH,QAAQ,CAAE,EAAG,CAAC;IACdF,SAAS,CAACM,OAAO,EAAEC,KAAK,CAAC,CAAC;EAC3B,CAAC;EAED,oBACCT,IAAA,CAACL,MAAM;IACNe,IAAI,EAAC,OAAO;IACZJ,IAAI,EAAGf,UAAY;IACnBoB,KAAK,EAAGN,OAAO,GAAGjB,EAAE,CAAE,cAAe,CAAC,GAAGA,EAA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X,QAAQ,EAAK8B,SAAkB,IAC9B9B,QAAQ,CAAE8B,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAG,CAC1B;MACDC,YAAY,EAAC,KAAK;MAClBnB,WAAW,EAAGA,WAAa;MAC3Bb,KAAK,EAAGA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAI;MACrBiC,MAAM,eACLpC,IAAA,CAACF,iBAAiB;QAACY,IAAI,EAAGA,IAAM;QAAAmB,QAAA,eAC/B7B,IAAA,CAACC,UAAU;UACVC,SAAS,EAAGA,SAAW;UACvBC,KAAK,EAAGA,KAAO;UACfC,QAAQ,EAAGA,QAAU;UACrBC,OAAO,EAAGA;QAAS,CACnB;MAAC,CACgB,CACnB;MAAA,GACIa;IAAS,CACd;EAAC,CACoB,CAAC;AAE1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,aAAa,GAAG9B,UAAU,CAAEqB,wBAAyB,CAAC;AAEnE,eAAeS,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useInstanceId","useMergeRefs","__","Icon","search","closeSmall","forwardRef","useMemo","useRef","deprecated","Button","ContextSystemProvider","StyledInputControl","SuffixItemWrapper","jsx","_jsx","SuffixItem","searchRef","value","onChange","onClose","icon","since","onReset","current","focus","size","label","onClick","UnforwardedSearchControl","__nextHasNoMarginBottom","className","placeholder","hideLabelFromVision","restProps","forwardedRef","disabled","filteredRestProps","instanceId","SearchControl","contextValue","BaseControl","_overrides","__associatedWPComponentName","InputBase","isBorderless","children","__next40pxDefaultSize","id","ref","type","nextValue","autoComplete","suffix"],"sources":["@wordpress/components/src/search-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useMemo, useRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { SearchControlProps, SuffixItemProps } from './types';\nimport type { ForwardedRef } from 'react';\nimport { ContextSystemProvider } from '../context';\nimport { StyledInputControl, SuffixItemWrapper } from './styles';\n\nfunction SuffixItem( {\n\tsearchRef,\n\tvalue,\n\tonChange,\n\tonClose,\n}: SuffixItemProps ) {\n\tif ( ! onClose && ! value ) {\n\t\treturn <Icon icon={ search } />;\n\t}\n\n\tif ( onClose ) {\n\t\tdeprecated( '`onClose` prop in wp.components.SearchControl', {\n\t\t\tsince: '6.8',\n\t\t} );\n\t}\n\n\tconst onReset = () => {\n\t\tonChange( '' );\n\t\tsearchRef.current?.focus();\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\tsize=\"small\"\n\t\t\ticon={ closeSmall }\n\t\t\tlabel={ onClose ? __( 'Close search' ) : __( 'Reset search' ) }\n\t\t\tonClick={ onClose ?? onReset }\n\t\t/>\n\t);\n}\n\nfunction UnforwardedSearchControl(\n\t{\n\t\t__nextHasNoMarginBottom = false,\n\t\tclassName,\n\t\tonChange,\n\t\tvalue,\n\t\tlabel = __( 'Search' ),\n\t\tplaceholder = __( 'Search' ),\n\t\thideLabelFromVision = true,\n\t\tonClose,\n\t\tsize = 'default',\n\t\t...restProps\n\t}: Omit<\n\t\tWordPressComponentProps< SearchControlProps, 'input', false >,\n\t\t// TODO: Background styling currently doesn't support a disabled state. Needs design work.\n\t\t'disabled'\n\t>,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\t// @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.\n\t// Work with the design team (@WordPress/gutenberg-design) if you need this feature.\n\tconst { disabled, ...filteredRestProps } = restProps;\n\n\tconst searchRef = useRef< HTMLInputElement >( null );\n\tconst instanceId = useInstanceId(\n\t\tSearchControl,\n\t\t'components-search-control'\n\t);\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tBaseControl: {\n\t\t\t\t// Overrides the underlying BaseControl `__nextHasNoMarginBottom` via the context system\n\t\t\t\t// to provide backwards compatibile margin for SearchControl.\n\t\t\t\t// (In a standard InputControl, the BaseControl `__nextHasNoMarginBottom` is always set to true.)\n\t\t\t\t_overrides: { __nextHasNoMarginBottom },\n\t\t\t\t__associatedWPComponentName: 'SearchControl',\n\t\t\t},\n\t\t\t// `isBorderless` is still experimental and not a public prop for InputControl yet.\n\t\t\tInputBase: { isBorderless: true },\n\t\t} ),\n\t\t[ __nextHasNoMarginBottom ]\n\t);\n\n\treturn (\n\t\t<ContextSystemProvider value={ contextValue }>\n\t\t\t<StyledInputControl\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tid={ instanceId }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tlabel={ label }\n\t\t\t\tref={ useMergeRefs( [ searchRef, forwardedRef ] ) }\n\t\t\t\ttype=\"search\"\n\t\t\t\tsize={ size }\n\t\t\t\tclassName={ clsx( 'components-search-control', className ) }\n\t\t\t\tonChange={ ( nextValue?: string ) =>\n\t\t\t\t\tonChange( nextValue ?? '' )\n\t\t\t\t}\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t\tvalue={ value ?? '' }\n\t\t\t\tsuffix={\n\t\t\t\t\t<SuffixItemWrapper size={ size }>\n\t\t\t\t\t\t<SuffixItem\n\t\t\t\t\t\t\tsearchRef={ searchRef }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SuffixItemWrapper>\n\t\t\t\t}\n\t\t\t\t{ ...filteredRestProps }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n * const [ searchInput, setSearchInput ] = useState( '' );\n *\n * return (\n * <SearchControl\n * __nextHasNoMarginBottom\n * value={ searchInput }\n * onChange={ setSearchInput }\n * />\n * );\n * }\n * ```\n */\nexport const SearchControl = forwardRef( UnforwardedSearchControl );\n\nexport default SearchControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,aAAa,EAAEC,YAAY,QAAQ,oBAAoB;AAChE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,MAAM,EAAEC,UAAU,QAAQ,kBAAkB;AAC3D,SAASC,UAAU,EAAEC,OAAO,EAAEC,MAAM,QAAQ,oBAAoB;AAChE,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAI9B,SAASC,qBAAqB,QAAQ,YAAY;AAClD,SAASC,kBAAkB,EAAEC,iBAAiB,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjE,SAASC,UAAUA,CAAE;EACpBC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC;AACgB,CAAC,EAAG;EACpB,IAAK,CAAEA,OAAO,IAAI,CAAEF,KAAK,EAAG;IAC3B,oBAAOH,IAAA,CAACZ,IAAI;MAACkB,IAAI,EAAGjB;IAAQ,CAAE,CAAC;EAChC;EAEA,IAAKgB,OAAO,EAAG;IACdX,UAAU,CAAE,+CAA+C,EAAE;MAC5Da,KAAK,EAAE;IACR,CAAE,CAAC;EACJ;EAEA,MAAMC,OAAO,GAAGA,CAAA,KAAM;IACrBJ,QAAQ,CAAE,EAAG,CAAC;IACdF,SAAS,CAACO,OAAO,EAAEC,KAAK,CAAC,CAAC;EAC3B,CAAC;EAED,oBACCV,IAAA,CAACL,MAAM;IACNg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SAAS,EAAEkB,YAAY,CAAG,CAAG;MACnDe,IAAI,EAAC,QAAQ;MACbxB,IAAI,EAAGA,IAAM;MACbK,SAAS,EAAGhC,IAAI,CAAE,2BAA2B,EAAEgC,SAAU,CAAG;MAC5DZ,QAAQ,EAAKgC,SAAkB,IAC9BhC,QAAQ,CAAEgC,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAG,CAC1B;MACDC,YAAY,EAAC,KAAK;MAClBpB,WAAW,EAAGA,WAAa;MAC3Bd,KAAK,EAAGA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAI;MACrBmC,MAAM,eACLtC,IAAA,CAACF,iBAAiB;QAACa,IAAI,EAAGA,IAAM;QAAAoB,QAAA,eAC/B/B,IAAA,CAACC,UAAU;UACVC,SAAS,EAAGA,SAAW;UACvBC,KAAK,EAAGA,KAAO;UACfC,QAAQ,EAAGA,QAAU;UACrBC,OAAO,EAAGA;QAAS,CACnB;MAAC,CACgB,CACnB;MAAA,GACIiB;IAAiB,CACtB;EAAC,CACoB,CAAC;AAE1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,aAAa,GAAGjC,UAAU,CAAEuB,wBAAyB,CAAC;AAEnE,eAAeU,aAAa","ignoreList":[]}
@@ -19,8 +19,7 @@ import Button from '../button';
19
19
  import Gridicons from '../mobile/gridicons';
20
20
 
21
21
  // Merge platform specific styles with the default styles.
22
- import { jsx as _jsx } from "react/jsx-runtime";
23
- import { jsxs as _jsxs } from "react/jsx-runtime";
22
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
23
  const baseStyles = {
25
24
  ...allStyles
26
25
  };
@@ -1 +1 @@
1
- {"version":3,"names":["TextInput","Text","View","TouchableOpacity","Platform","useColorScheme","Keyboard","useState","useRef","useMemo","useEffect","useCallback","__","Icon","cancelCircleFilled","cancelCircleFilledIcon","arrowLeft","arrowLeftIcon","close","closeIcon","allStyles","platformStyles","Button","Gridicons","jsx","_jsx","jsxs","_jsxs","baseStyles","selector","selectModifiedStyles","styles","modifier","modifierMatcher","RegExp","modifierSelectors","Object","keys","filter","match","reduce","modifiedStyles","modifierSelector","blockElementSelector","split","mergeStyles","updateStyles","selectors","forEach","SearchControl","value","onChange","placeholder","isActive","setIsActive","currentStyles","setCurrentStyles","isDark","inputRef","onCancelTimer","isIOS","OS","darkStyles","activeStyles","activeDarkStyles","futureStyles","mergeFutureStyles","shouldUseConditions","shouldUseModified","every","should","updatedStyles","clearInput","onPress","current","focus","onFocus","onCancel","clearTimeout","setTimeout","blur","onKeyboardDidHide","keyboardHideSubscription","addListener","remove","containerStyle","innerContainerStyle","inputContainerStyle","formInputStyle","placeholderStyle","inputButtonStyle","inputButtonLeftStyle","inputButtonRightStyle","cancelButtonStyle","cancelButtonTextStyle","iconStyle","rightIconStyle","renderLeftButton","button","label","icon","onClick","style","search","fill","color","children","renderRightButton","renderCancel","accessible","accessibilityRole","accessibilityLabel","accessibilityHint","activeOpacity","ref","placeholderTextColor","onChangeText"],"sources":["@wordpress/components/src/search-control/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tTextInput,\n\tText,\n\tView,\n\tTouchableOpacity,\n\tPlatform,\n\tuseColorScheme,\n\tKeyboard,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tuseRef,\n\tuseMemo,\n\tuseEffect,\n\tuseCallback,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tIcon,\n\tcancelCircleFilled as cancelCircleFilledIcon,\n\tarrowLeft as arrowLeftIcon,\n\tclose as closeIcon,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport allStyles from './style.scss';\nimport platformStyles from './platform-style.scss';\nimport Button from '../button';\nimport Gridicons from '../mobile/gridicons';\n\n// Merge platform specific styles with the default styles.\nconst baseStyles = { ...allStyles };\nfor ( const selector in platformStyles ) {\n\tbaseStyles[ selector ] = {\n\t\t...baseStyles[ selector ],\n\t\t...platformStyles[ selector ],\n\t};\n}\n\nfunction selectModifiedStyles( styles, modifier ) {\n\tconst modifierMatcher = new RegExp( `--${ modifier }$` );\n\tconst modifierSelectors = Object.keys( styles ).filter( ( selector ) =>\n\t\tselector.match( modifierMatcher )\n\t);\n\n\treturn modifierSelectors.reduce( ( modifiedStyles, modifierSelector ) => {\n\t\tconst blockElementSelector = modifierSelector.split( '--' )[ 0 ];\n\t\tmodifiedStyles[ blockElementSelector ] = styles[ modifierSelector ];\n\t\treturn modifiedStyles;\n\t}, {} );\n}\n\nfunction mergeStyles( styles, updateStyles, selectors ) {\n\tselectors.forEach( ( selector ) => {\n\t\tstyles[ selector ] = {\n\t\t\t...styles[ selector ],\n\t\t\t...updateStyles[ selector ],\n\t\t};\n\t} );\n\n\treturn styles;\n}\n\nfunction SearchControl( {\n\tvalue,\n\tonChange,\n\tplaceholder = __( 'Search blocks' ),\n} ) {\n\tconst [ isActive, setIsActive ] = useState( false );\n\tconst [ currentStyles, setCurrentStyles ] = useState( baseStyles );\n\n\tconst isDark = useColorScheme() === 'dark';\n\tconst inputRef = useRef();\n\tconst onCancelTimer = useRef();\n\n\tconst isIOS = Platform.OS === 'ios';\n\n\tconst darkStyles = useMemo( () => {\n\t\treturn selectModifiedStyles( baseStyles, 'dark' );\n\t}, [] );\n\n\tconst activeStyles = useMemo( () => {\n\t\treturn selectModifiedStyles( baseStyles, 'active' );\n\t}, [] );\n\n\tconst activeDarkStyles = useMemo( () => {\n\t\treturn selectModifiedStyles( baseStyles, 'active-dark' );\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tlet futureStyles = { ...baseStyles };\n\n\t\tfunction mergeFutureStyles( modifiedStyles, shouldUseConditions ) {\n\t\t\tconst shouldUseModified = shouldUseConditions.every(\n\t\t\t\t( should ) => should\n\t\t\t);\n\n\t\t\tconst updatedStyles = shouldUseModified\n\t\t\t\t? modifiedStyles\n\t\t\t\t: futureStyles;\n\n\t\t\tconst selectors = Object.keys( modifiedStyles );\n\n\t\t\tfutureStyles = mergeStyles(\n\t\t\t\tfutureStyles,\n\t\t\t\tupdatedStyles,\n\t\t\t\tselectors\n\t\t\t);\n\t\t}\n\n\t\tmergeFutureStyles( activeStyles, [ isActive ] );\n\t\tmergeFutureStyles( darkStyles, [ isDark ] );\n\t\tmergeFutureStyles( activeDarkStyles, [ isActive, isDark ] );\n\n\t\tsetCurrentStyles( futureStyles );\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ isActive, isDark ] );\n\n\tconst clearInput = useCallback( () => {\n\t\tonChange( '' );\n\t}, [ onChange ] );\n\n\tconst onPress = useCallback( () => {\n\t\tsetIsActive( true );\n\t\tinputRef.current?.focus();\n\t}, [] );\n\n\tconst onFocus = useCallback( () => {\n\t\tsetIsActive( true );\n\t}, [] );\n\n\tconst onCancel = useCallback( () => {\n\t\tclearTimeout( onCancelTimer.current );\n\t\tonCancelTimer.current = setTimeout( () => {\n\t\t\tinputRef.current?.blur();\n\t\t\tclearInput();\n\t\t\tsetIsActive( false );\n\t\t}, 0 );\n\t}, [ clearInput ] );\n\n\tconst onKeyboardDidHide = useCallback( () => {\n\t\tif ( ! isIOS ) {\n\t\t\tonCancel();\n\t\t}\n\t}, [ isIOS, onCancel ] );\n\n\tuseEffect( () => {\n\t\tconst keyboardHideSubscription = Keyboard.addListener(\n\t\t\t'keyboardDidHide',\n\t\t\tonKeyboardDidHide\n\t\t);\n\t\treturn () => {\n\t\t\tclearTimeout( onCancelTimer.current );\n\t\t\tkeyboardHideSubscription.remove();\n\t\t};\n\t}, [ onKeyboardDidHide ] );\n\n\tconst {\n\t\t'search-control__container': containerStyle,\n\t\t'search-control__inner-container': innerContainerStyle,\n\t\t'search-control__input-container': inputContainerStyle,\n\t\t'search-control__form-input': formInputStyle,\n\t\t'search-control__form-input-placeholder': placeholderStyle,\n\t\t'search-control__input-button': inputButtonStyle,\n\t\t'search-control__input-button-left': inputButtonLeftStyle,\n\t\t'search-control__input-button-right': inputButtonRightStyle,\n\t\t'search-control__cancel-button': cancelButtonStyle,\n\t\t'search-control__cancel-button-text': cancelButtonTextStyle,\n\t\t'search-control__icon': iconStyle,\n\t\t'search-control__right-icon': rightIconStyle,\n\t} = currentStyles;\n\n\tfunction renderLeftButton() {\n\t\tconst button =\n\t\t\t! isIOS && isActive ? (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ __( 'Cancel search' ) }\n\t\t\t\t\ticon={ arrowLeftIcon }\n\t\t\t\t\tonClick={ onCancel }\n\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<Icon icon={ Gridicons.search } fill={ iconStyle?.color } />\n\t\t\t);\n\n\t\treturn (\n\t\t\t<View style={ [ inputButtonStyle, inputButtonLeftStyle ] }>\n\t\t\t\t{ button }\n\t\t\t</View>\n\t\t);\n\t}\n\n\tfunction renderRightButton() {\n\t\tlet button;\n\n\t\t// Add a View element to properly center the input placeholder via flexbox.\n\t\tif ( isIOS && ! isActive ) {\n\t\t\tbutton = <View />;\n\t\t}\n\n\t\tif ( !! value ) {\n\t\t\tbutton = (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ __( 'Clear search' ) }\n\t\t\t\t\ticon={ isIOS ? cancelCircleFilledIcon : closeIcon }\n\t\t\t\t\tonClick={ clearInput }\n\t\t\t\t\tstyle={ [ iconStyle, rightIconStyle ] }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<View style={ [ inputButtonStyle, inputButtonRightStyle ] }>\n\t\t\t\t{ button }\n\t\t\t</View>\n\t\t);\n\t}\n\n\tfunction renderCancel() {\n\t\tif ( ! isIOS ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<View style={ cancelButtonStyle }>\n\t\t\t\t<Text\n\t\t\t\t\tonPress={ onCancel }\n\t\t\t\t\tstyle={ cancelButtonTextStyle }\n\t\t\t\t\taccessible\n\t\t\t\t\taccessibilityRole=\"button\"\n\t\t\t\t\taccessibilityLabel={ __( 'Cancel search' ) }\n\t\t\t\t\taccessibilityHint={ __( 'Cancel search' ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</Text>\n\t\t\t</View>\n\t\t);\n\t}\n\n\treturn (\n\t\t<TouchableOpacity\n\t\t\tstyle={ containerStyle }\n\t\t\tonPress={ onPress }\n\t\t\tactiveOpacity={ 1 }\n\t\t>\n\t\t\t<View style={ innerContainerStyle }>\n\t\t\t\t<View style={ inputContainerStyle }>\n\t\t\t\t\t{ renderLeftButton() }\n\t\t\t\t\t<TextInput\n\t\t\t\t\t\tref={ inputRef }\n\t\t\t\t\t\tstyle={ formInputStyle }\n\t\t\t\t\t\tplaceholderTextColor={ placeholderStyle?.color }\n\t\t\t\t\t\tonChangeText={ onChange }\n\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\t/>\n\t\t\t\t\t{ renderRightButton() }\n\t\t\t\t</View>\n\t\t\t\t{ isActive && renderCancel() }\n\t\t\t</View>\n\t\t</TouchableOpacity>\n\t);\n}\n\nexport default SearchControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,SAAS,EACTC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,QAAQ,EACRC,cAAc,EACdC,QAAQ,QACF,cAAc;;AAErB;AACA;AACA;AACA,SACCC,QAAQ,EACRC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,WAAW,QACL,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,IAAI,EACJC,kBAAkB,IAAIC,sBAAsB,EAC5CC,SAAS,IAAIC,aAAa,EAC1BC,KAAK,IAAIC,SAAS,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BwC,aAAa,EAAG,CAAG;IAAAP,QAAA,eAEnB/E,KAAA,CAACzB,IAAI;MAACoG,KAAK,EAAGhB,mBAAqB;MAAAoB,QAAA,gBAClC/E,KAAA,CAACzB,IAAI;QAACoG,KAAK,EAAGf,mBAAqB;QAAAmB,QAAA,GAChCT,gBAAgB,CAAC,CAAC,eACpBxE,IAAA,CAACzB,SAAS;UACTkH,GAAG,EAAGxD,QAAU;UAChB4C,KAAK,EAAGd,cAAgB;UACxB2B,oBAAoB,EAAG1B,gBAAgB,EAAEgB,KAAO;UAChDW,YAAY,EAAGjE,QAAU;UACzByB,OAAO,EAAGA,OAAS;UACnB1B,KAAK,EAAGA,KAAO;UACfE,WAAW,EAAGA;QAAa,CAC3B,CAAC,EACAuD,iBAAiB,CAAC,CAAC;MAAA,CAChB,CAAC,EACLtD,QAAQ,IAAIuD,YAAY,CAAC,CAAC;IAAA,CACvB;EAAC,CACU,CAAC;AAErB;AAEA,eAAe3D,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["TextInput","Text","View","TouchableOpacity","Platform","useColorScheme","Keyboard","useState","useRef","useMemo","useEffect","useCallback","__","Icon","cancelCircleFilled","cancelCircleFilledIcon","arrowLeft","arrowLeftIcon","close","closeIcon","allStyles","platformStyles","Button","Gridicons","jsx","_jsx","jsxs","_jsxs","baseStyles","selector","selectModifiedStyles","styles","modifier","modifierMatcher","RegExp","modifierSelectors","Object","keys","filter","match","reduce","modifiedStyles","modifierSelector","blockElementSelector","split","mergeStyles","updateStyles","selectors","forEach","SearchControl","value","onChange","placeholder","isActive","setIsActive","currentStyles","setCurrentStyles","isDark","inputRef","onCancelTimer","isIOS","OS","darkStyles","activeStyles","activeDarkStyles","futureStyles","mergeFutureStyles","shouldUseConditions","shouldUseModified","every","should","updatedStyles","clearInput","onPress","current","focus","onFocus","onCancel","clearTimeout","setTimeout","blur","onKeyboardDidHide","keyboardHideSubscription","addListener","remove","containerStyle","innerContainerStyle","inputContainerStyle","formInputStyle","placeholderStyle","inputButtonStyle","inputButtonLeftStyle","inputButtonRightStyle","cancelButtonStyle","cancelButtonTextStyle","iconStyle","rightIconStyle","renderLeftButton","button","label","icon","onClick","style","search","fill","color","children","renderRightButton","renderCancel","accessible","accessibilityRole","accessibilityLabel","accessibilityHint","activeOpacity","ref","placeholderTextColor","onChangeText"],"sources":["@wordpress/components/src/search-control/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tTextInput,\n\tText,\n\tView,\n\tTouchableOpacity,\n\tPlatform,\n\tuseColorScheme,\n\tKeyboard,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tuseRef,\n\tuseMemo,\n\tuseEffect,\n\tuseCallback,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tIcon,\n\tcancelCircleFilled as cancelCircleFilledIcon,\n\tarrowLeft as arrowLeftIcon,\n\tclose as closeIcon,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport allStyles from './style.scss';\nimport platformStyles from './platform-style.scss';\nimport Button from '../button';\nimport Gridicons from '../mobile/gridicons';\n\n// Merge platform specific styles with the default styles.\nconst baseStyles = { ...allStyles };\nfor ( const selector in platformStyles ) {\n\tbaseStyles[ selector ] = {\n\t\t...baseStyles[ selector ],\n\t\t...platformStyles[ selector ],\n\t};\n}\n\nfunction selectModifiedStyles( styles, modifier ) {\n\tconst modifierMatcher = new RegExp( `--${ modifier }$` );\n\tconst modifierSelectors = Object.keys( styles ).filter( ( selector ) =>\n\t\tselector.match( modifierMatcher )\n\t);\n\n\treturn modifierSelectors.reduce( ( modifiedStyles, modifierSelector ) => {\n\t\tconst blockElementSelector = modifierSelector.split( '--' )[ 0 ];\n\t\tmodifiedStyles[ blockElementSelector ] = styles[ modifierSelector ];\n\t\treturn modifiedStyles;\n\t}, {} );\n}\n\nfunction mergeStyles( styles, updateStyles, selectors ) {\n\tselectors.forEach( ( selector ) => {\n\t\tstyles[ selector ] = {\n\t\t\t...styles[ selector ],\n\t\t\t...updateStyles[ selector ],\n\t\t};\n\t} );\n\n\treturn styles;\n}\n\nfunction SearchControl( {\n\tvalue,\n\tonChange,\n\tplaceholder = __( 'Search blocks' ),\n} ) {\n\tconst [ isActive, setIsActive ] = useState( false );\n\tconst [ currentStyles, setCurrentStyles ] = useState( baseStyles );\n\n\tconst isDark = useColorScheme() === 'dark';\n\tconst inputRef = useRef();\n\tconst onCancelTimer = useRef();\n\n\tconst isIOS = Platform.OS === 'ios';\n\n\tconst darkStyles = useMemo( () => {\n\t\treturn selectModifiedStyles( baseStyles, 'dark' );\n\t}, [] );\n\n\tconst activeStyles = useMemo( () => {\n\t\treturn selectModifiedStyles( baseStyles, 'active' );\n\t}, [] );\n\n\tconst activeDarkStyles = useMemo( () => {\n\t\treturn selectModifiedStyles( baseStyles, 'active-dark' );\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tlet futureStyles = { ...baseStyles };\n\n\t\tfunction mergeFutureStyles( modifiedStyles, shouldUseConditions ) {\n\t\t\tconst shouldUseModified = shouldUseConditions.every(\n\t\t\t\t( should ) => should\n\t\t\t);\n\n\t\t\tconst updatedStyles = shouldUseModified\n\t\t\t\t? modifiedStyles\n\t\t\t\t: futureStyles;\n\n\t\t\tconst selectors = Object.keys( modifiedStyles );\n\n\t\t\tfutureStyles = mergeStyles(\n\t\t\t\tfutureStyles,\n\t\t\t\tupdatedStyles,\n\t\t\t\tselectors\n\t\t\t);\n\t\t}\n\n\t\tmergeFutureStyles( activeStyles, [ isActive ] );\n\t\tmergeFutureStyles( darkStyles, [ isDark ] );\n\t\tmergeFutureStyles( activeDarkStyles, [ isActive, isDark ] );\n\n\t\tsetCurrentStyles( futureStyles );\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ isActive, isDark ] );\n\n\tconst clearInput = useCallback( () => {\n\t\tonChange( '' );\n\t}, [ onChange ] );\n\n\tconst onPress = useCallback( () => {\n\t\tsetIsActive( true );\n\t\tinputRef.current?.focus();\n\t}, [] );\n\n\tconst onFocus = useCallback( () => {\n\t\tsetIsActive( true );\n\t}, [] );\n\n\tconst onCancel = useCallback( () => {\n\t\tclearTimeout( onCancelTimer.current );\n\t\tonCancelTimer.current = setTimeout( () => {\n\t\t\tinputRef.current?.blur();\n\t\t\tclearInput();\n\t\t\tsetIsActive( false );\n\t\t}, 0 );\n\t}, [ clearInput ] );\n\n\tconst onKeyboardDidHide = useCallback( () => {\n\t\tif ( ! isIOS ) {\n\t\t\tonCancel();\n\t\t}\n\t}, [ isIOS, onCancel ] );\n\n\tuseEffect( () => {\n\t\tconst keyboardHideSubscription = Keyboard.addListener(\n\t\t\t'keyboardDidHide',\n\t\t\tonKeyboardDidHide\n\t\t);\n\t\treturn () => {\n\t\t\tclearTimeout( onCancelTimer.current );\n\t\t\tkeyboardHideSubscription.remove();\n\t\t};\n\t}, [ onKeyboardDidHide ] );\n\n\tconst {\n\t\t'search-control__container': containerStyle,\n\t\t'search-control__inner-container': innerContainerStyle,\n\t\t'search-control__input-container': inputContainerStyle,\n\t\t'search-control__form-input': formInputStyle,\n\t\t'search-control__form-input-placeholder': placeholderStyle,\n\t\t'search-control__input-button': inputButtonStyle,\n\t\t'search-control__input-button-left': inputButtonLeftStyle,\n\t\t'search-control__input-button-right': inputButtonRightStyle,\n\t\t'search-control__cancel-button': cancelButtonStyle,\n\t\t'search-control__cancel-button-text': cancelButtonTextStyle,\n\t\t'search-control__icon': iconStyle,\n\t\t'search-control__right-icon': rightIconStyle,\n\t} = currentStyles;\n\n\tfunction renderLeftButton() {\n\t\tconst button =\n\t\t\t! isIOS && isActive ? (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ __( 'Cancel search' ) }\n\t\t\t\t\ticon={ arrowLeftIcon }\n\t\t\t\t\tonClick={ onCancel }\n\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<Icon icon={ Gridicons.search } fill={ iconStyle?.color } />\n\t\t\t);\n\n\t\treturn (\n\t\t\t<View style={ [ inputButtonStyle, inputButtonLeftStyle ] }>\n\t\t\t\t{ button }\n\t\t\t</View>\n\t\t);\n\t}\n\n\tfunction renderRightButton() {\n\t\tlet button;\n\n\t\t// Add a View element to properly center the input placeholder via flexbox.\n\t\tif ( isIOS && ! isActive ) {\n\t\t\tbutton = <View />;\n\t\t}\n\n\t\tif ( !! value ) {\n\t\t\tbutton = (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ __( 'Clear search' ) }\n\t\t\t\t\ticon={ isIOS ? cancelCircleFilledIcon : closeIcon }\n\t\t\t\t\tonClick={ clearInput }\n\t\t\t\t\tstyle={ [ iconStyle, rightIconStyle ] }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<View style={ [ inputButtonStyle, inputButtonRightStyle ] }>\n\t\t\t\t{ button }\n\t\t\t</View>\n\t\t);\n\t}\n\n\tfunction renderCancel() {\n\t\tif ( ! isIOS ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<View style={ cancelButtonStyle }>\n\t\t\t\t<Text\n\t\t\t\t\tonPress={ onCancel }\n\t\t\t\t\tstyle={ cancelButtonTextStyle }\n\t\t\t\t\taccessible\n\t\t\t\t\taccessibilityRole=\"button\"\n\t\t\t\t\taccessibilityLabel={ __( 'Cancel search' ) }\n\t\t\t\t\taccessibilityHint={ __( 'Cancel search' ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</Text>\n\t\t\t</View>\n\t\t);\n\t}\n\n\treturn (\n\t\t<TouchableOpacity\n\t\t\tstyle={ containerStyle }\n\t\t\tonPress={ onPress }\n\t\t\tactiveOpacity={ 1 }\n\t\t>\n\t\t\t<View style={ innerContainerStyle }>\n\t\t\t\t<View style={ inputContainerStyle }>\n\t\t\t\t\t{ renderLeftButton() }\n\t\t\t\t\t<TextInput\n\t\t\t\t\t\tref={ inputRef }\n\t\t\t\t\t\tstyle={ formInputStyle }\n\t\t\t\t\t\tplaceholderTextColor={ placeholderStyle?.color }\n\t\t\t\t\t\tonChangeText={ onChange }\n\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\t/>\n\t\t\t\t\t{ renderRightButton() }\n\t\t\t\t</View>\n\t\t\t\t{ isActive && renderCancel() }\n\t\t\t</View>\n\t\t</TouchableOpacity>\n\t);\n}\n\nexport default SearchControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,SAAS,EACTC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,QAAQ,EACRC,cAAc,EACdC,QAAQ,QACF,cAAc;;AAErB;AACA;AACA;AACA,SACCC,QAAQ,EACRC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,WAAW,QACL,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,IAAI,EACJC,kBAAkB,IAAIC,sBAAsB,EAC5CC,SAAS,IAAIC,aAAa,EAC1BC,KAAK,IAAIC,SAAS,QACZ,kBAAkB;;AAEzB;AACA;AACA;AACA,OAAOC,SAAS,MAAM,cAAc;AACpC,OAAOC,cAAc,MAAM,uBAAuB;AAClD,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,SAAS,MAAM,qBAAqB;;AAE3C;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,MAAMC,UAAU,GAAG;EAAE,GAAGR;AAAU,CAAC;AACnC,KAAM,MAAMS,QAAQ,IAAIR,cAAc,EAAG;EACxCO,UAAU,CAAEC,QAAQ,CAAE,GAAG;IACxB,GAAGD,UAAU,CAAEC,QAAQ,CAAE;IACzB,GAAGR,cAAc,CAAEQ,QAAQ;EAC5B,CAAC;AACF;AAEA,SAASC,oBAAoBA,CAAEC,MAAM,EAA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,CAAC,EACLtD,QAAQ,IAAIuD,YAAY,CAAC,CAAC;IAAA,CACvB;EAAC,CACU,CAAC;AAErB;AAEA,eAAe3D,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/search-control/types.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { InputControlProps } from '../input-control/types';\n\nexport type SearchControlProps = Pick< InputControlProps, 'help' | 'value' > & {\n\t/**\n\t * @deprecated This is now the default.\n\t * @ignore\n\t */\n\t__next40pxDefaultSize?: InputControlProps[ '__next40pxDefaultSize' ];\n\t/**\n\t * Start opting into the new margin-free styles that will become the default in a future version.\n\t *\n\t * @default false\n\t */\n\t__nextHasNoMarginBottom?: boolean;\n\t/**\n\t * If true, the label will only be visible to screen readers.\n\t *\n\t * @default true\n\t */\n\thideLabelFromVision?: InputControlProps[ 'hideLabelFromVision' ];\n\t/**\n\t * The accessible label for the input.\n\t *\n\t * A label should always be provided as an accessibility best practice,\n\t * even when a placeholder is defined and `hideLabelFromVision` is `true`.\n\t *\n\t * @default 'Search'\n\t */\n\tlabel?: string;\n\t/**\n\t * A function that receives the value of the input when the value is changed.\n\t */\n\tonChange: ( value: string ) => void;\n\t/**\n\t * When an `onClose` callback is provided, the search control will render a close button\n\t * that will trigger the given callback.\n\t *\n\t * Use this if you want the button to trigger your own logic to close the search field entirely,\n\t * rather than just clearing the input value.\n\t */\n\tonClose?: () => void;\n\t/** @ignore */\n\tonDrag?: InputControlProps[ 'onDrag' ];\n\t/** @ignore */\n\tonDragStart?: InputControlProps[ 'onDragStart' ];\n\t/** @ignore */\n\tonDragEnd?: InputControlProps[ 'onDragEnd' ];\n\t/**\n\t * A placeholder for the input.\n\t *\n\t * @default 'Search'\n\t */\n\tplaceholder?: InputControlProps[ 'placeholder' ];\n\t/**\n\t * The size of the component\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'compact';\n};\n\nexport type SuffixItemProps = Pick<\n\tSearchControlProps,\n\t'value' | 'onChange' | 'onClose'\n> & {\n\tsearchRef: React.RefObject< HTMLInputElement >;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/search-control/types.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { InputControlProps } from '../input-control/types';\n\nexport type SearchControlProps = Pick< InputControlProps, 'help' | 'value' > & {\n\t/**\n\t * @deprecated This is now the default.\n\t * @ignore\n\t */\n\t__next40pxDefaultSize?: InputControlProps[ '__next40pxDefaultSize' ];\n\t/**\n\t * Start opting into the new margin-free styles that will become the default in a future version.\n\t *\n\t * @default false\n\t */\n\t__nextHasNoMarginBottom?: boolean;\n\t/**\n\t * If true, the label will only be visible to screen readers.\n\t *\n\t * @default true\n\t */\n\thideLabelFromVision?: InputControlProps[ 'hideLabelFromVision' ];\n\t/**\n\t * The accessible label for the input.\n\t *\n\t * A label should always be provided as an accessibility best practice,\n\t * even when a placeholder is defined and `hideLabelFromVision` is `true`.\n\t *\n\t * @default 'Search'\n\t */\n\tlabel?: string;\n\t/**\n\t * A function that receives the value of the input when the value is changed.\n\t */\n\tonChange: ( value: string ) => void;\n\t/**\n\t * When an `onClose` callback is provided, the search control will render a close button\n\t * that will trigger the given callback.\n\t *\n\t * Use this if you want the button to trigger your own logic to close the search field entirely,\n\t * rather than just clearing the input value.\n\t *\n\t * @deprecated\n\t * @ignore\n\t */\n\tonClose?: () => void;\n\t/** @ignore */\n\tonDrag?: InputControlProps[ 'onDrag' ];\n\t/** @ignore */\n\tonDragStart?: InputControlProps[ 'onDragStart' ];\n\t/** @ignore */\n\tonDragEnd?: InputControlProps[ 'onDragEnd' ];\n\t/**\n\t * A placeholder for the input.\n\t *\n\t * @default 'Search'\n\t */\n\tplaceholder?: InputControlProps[ 'placeholder' ];\n\t/**\n\t * The size of the component\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'compact';\n};\n\nexport type SuffixItemProps = Pick<\n\tSearchControlProps,\n\t'value' | 'onChange' | 'onClose'\n> & {\n\tsearchRef: React.RefObject< HTMLInputElement >;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useInstanceId","forwardRef","BaseControl","Select","StyledInputBase","SelectControlChevronDown","useDeprecated36pxDefaultSizeProp","jsx","_jsx","useUniqueId","idProp","instanceId","SelectControl","id","SelectOptions","options","map","label","value","optionProps","index","key","children","UnforwardedSelectControl","props","ref","className","disabled","help","hideLabelFromVision","multiple","onChange","size","valueProp","labelPosition","prefix","suffix","variant","__next40pxDefaultSize","__nextHasNoMarginBottom","restProps","helpId","undefined","length","handleOnChange","event","selectedOptions","Array","from","target","filter","selected","newValues","classes","__associatedWPComponentName","isBorderless","__unstableInputWidth","selectSize"],"sources":["@wordpress/components/src/select-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { Select, StyledInputBase } from './styles/select-control-styles';\nimport type { WordPressComponentProps } from '../context';\nimport type { SelectControlProps } from './types';\nimport SelectControlChevronDown from './chevron-down';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( SelectControl );\n\tconst id = `inspector-select-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nfunction SelectOptions( {\n\toptions,\n}: {\n\toptions: NonNullable< SelectControlProps[ 'options' ] >;\n} ) {\n\treturn options.map( ( { id, label, value, ...optionProps }, index ) => {\n\t\tconst key = id || `${ label }-${ value }-${ index }`;\n\n\t\treturn (\n\t\t\t<option key={ key } value={ value } { ...optionProps }>\n\t\t\t\t{ label }\n\t\t\t</option>\n\t\t);\n\t} );\n}\n\nfunction UnforwardedSelectControl< V extends string >(\n\tprops: WordPressComponentProps< SelectControlProps< V >, 'select', false >,\n\tref: React.ForwardedRef< HTMLSelectElement >\n) {\n\tconst {\n\t\tclassName,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision,\n\t\tid: idProp,\n\t\tlabel,\n\t\tmultiple = false,\n\t\tonChange,\n\t\toptions = [],\n\t\tsize = 'default',\n\t\tvalue: valueProp,\n\t\tlabelPosition = 'top',\n\t\tchildren,\n\t\tprefix,\n\t\tsuffix,\n\t\tvariant = 'default',\n\t\t__next40pxDefaultSize = false,\n\t\t__nextHasNoMarginBottom = false,\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\tconst id = useUniqueId( idProp );\n\tconst helpId = help ? `${ id }__help` : undefined;\n\n\t// Disable reason: A select with an onchange throws a warning.\n\tif ( ! options?.length && ! children ) {\n\t\treturn null;\n\t}\n\n\tconst handleOnChange = (\n\t\tevent: React.ChangeEvent< HTMLSelectElement >\n\t) => {\n\t\tif ( props.multiple ) {\n\t\t\tconst selectedOptions = Array.from( event.target.options ).filter(\n\t\t\t\t( { selected } ) => selected\n\t\t\t);\n\t\t\tconst newValues = selectedOptions.map(\n\t\t\t\t( { value } ) => value as V\n\t\t\t);\n\t\t\tprops.onChange?.( newValues, { event } );\n\t\t\treturn;\n\t\t}\n\n\t\tprops.onChange?.( event.target.value as V, { event } );\n\t};\n\n\tconst classes = clsx( 'components-select-control', className );\n\n\treturn (\n\t\t<BaseControl\n\t\t\thelp={ help }\n\t\t\tid={ id }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"SelectControl\"\n\t\t>\n\t\t\t<StyledInputBase\n\t\t\t\tclassName={ classes }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tid={ id }\n\t\t\t\tisBorderless={ variant === 'minimal' }\n\t\t\t\tlabel={ label }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={\n\t\t\t\t\tsuffix || ( ! multiple && <SelectControlChevronDown /> )\n\t\t\t\t}\n\t\t\t\tprefix={ prefix }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\t__unstableInputWidth={\n\t\t\t\t\tvariant === 'minimal' ? 'auto' : undefined\n\t\t\t\t}\n\t\t\t\tvariant={ variant }\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t<Select\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\taria-describedby={ helpId }\n\t\t\t\t\tclassName=\"components-select-control__input\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tid={ id }\n\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\tvalue={ valueProp }\n\t\t\t\t\tvariant={ variant }\n\t\t\t\t>\n\t\t\t\t\t{ children || <SelectOptions options={ options } /> }\n\t\t\t\t</Select>\n\t\t\t</StyledInputBase>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * `SelectControl` allows users to select from a single or multiple option menu.\n * It functions as a wrapper around the browser's native `<select>` element.\n *\n * ```jsx\n * import { SelectControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MySelectControl = () => {\n * const [ size, setSize ] = useState( '50%' );\n *\n * return (\n * <SelectControl\n * __nextHasNoMarginBottom\n * label=\"Size\"\n * value={ size }\n * options={ [\n * { label: 'Big', value: '100%' },\n * { label: 'Medium', value: '50%' },\n * { label: 'Small', value: '25%' },\n * ] }\n * onChange={ setSize }\n * />\n * );\n * };\n * ```\n */\nexport const SelectControl = forwardRef( UnforwardedSelectControl ) as <\n\tV extends string,\n>(\n\tprops: WordPressComponentProps<\n\t\tSelectControlProps< V >,\n\t\t'select',\n\t\tfalse\n\t> & { ref?: React.Ref< HTMLSelectElement > }\n) => React.JSX.Element | null;\n\nexport default S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B1B,QAAQ,EAAGA,QAAU;MACrBE,mBAAmB,EAAGA,mBAAqB;MAC3ChB,EAAE,EAAGA,EAAI;MACT0C,YAAY,EAAGlB,OAAO,KAAK,SAAW;MACtCpB,KAAK,EAAGA,KAAO;MACfe,IAAI,EAAGA,IAAM;MACbI,MAAM,EACLA,MAAM,IAAM,CAAEN,QAAQ,iBAAItB,IAAA,CAACH,wBAAwB,IAAE,CACrD;MACD8B,MAAM,EAAGA,MAAQ;MACjBD,aAAa,EAAGA,aAAe;MAC/BsB,oBAAoB,EACnBnB,OAAO,KAAK,SAAS,GAAG,MAAM,GAAGK,SACjC;MACDL,OAAO,EAAGA,OAAS;MACnBC,qBAAqB,EAAGA,qBAAuB;MAAAhB,QAAA,eAE/Cd,IAAA,CAACL,MAAM;QAAA,GACDqC,SAAS;QACdF,qBAAqB,EAAGA,qBAAuB;QAC/C,oBAAmBG,MAAQ;QAC3Bf,SAAS,EAAC,kCAAkC;QAC5CC,QAAQ,EAAGA,QAAU;QACrBd,EAAE,EAAGA,EAAI;QACTiB,QAAQ,EAAGA,QAAU;QACrBC,QAAQ,EAAGa,cAAgB;QAC3BnB,GAAG,EAAGA,GAAK;QACXgC,UAAU,EAAGzB,IAAM;QACnBd,KAAK,EAAGe,SAAW;QACnBI,OAAO,EAAGA,OAAS;QAAAf,QAAA,EAEjBA,QAAQ,iBAAId,IAAA,CAACM,aAAa;UAACC,OAAO,EAAGA;QAAS,CAAE;MAAC,CAC5C;IAAC,CACO;EAAC,CACN,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMH,aAAa,GAAGX,UAAU,CAAEsB,wBAAyB,CAQrC;AAE7B,eAAeX,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useInstanceId","forwardRef","BaseControl","Select","StyledInputBase","SelectControlChevronDown","useDeprecated36pxDefaultSizeProp","jsx","_jsx","useUniqueId","idProp","instanceId","SelectControl","id","SelectOptions","options","map","label","value","optionProps","index","key","children","UnforwardedSelectControl","props","ref","className","disabled","help","hideLabelFromVision","multiple","onChange","size","valueProp","labelPosition","prefix","suffix","variant","__next40pxDefaultSize","__nextHasNoMarginBottom","restProps","helpId","undefined","length","handleOnChange","event","selectedOptions","Array","from","target","filter","selected","newValues","classes","__associatedWPComponentName","isBorderless","__unstableInputWidth","selectSize"],"sources":["@wordpress/components/src/select-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { Select, StyledInputBase } from './styles/select-control-styles';\nimport type { WordPressComponentProps } from '../context';\nimport type { SelectControlProps } from './types';\nimport SelectControlChevronDown from './chevron-down';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( SelectControl );\n\tconst id = `inspector-select-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nfunction SelectOptions( {\n\toptions,\n}: {\n\toptions: NonNullable< SelectControlProps[ 'options' ] >;\n} ) {\n\treturn options.map( ( { id, label, value, ...optionProps }, index ) => {\n\t\tconst key = id || `${ label }-${ value }-${ index }`;\n\n\t\treturn (\n\t\t\t<option key={ key } value={ value } { ...optionProps }>\n\t\t\t\t{ label }\n\t\t\t</option>\n\t\t);\n\t} );\n}\n\nfunction UnforwardedSelectControl< V extends string >(\n\tprops: WordPressComponentProps< SelectControlProps< V >, 'select', false >,\n\tref: React.ForwardedRef< HTMLSelectElement >\n) {\n\tconst {\n\t\tclassName,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision,\n\t\tid: idProp,\n\t\tlabel,\n\t\tmultiple = false,\n\t\tonChange,\n\t\toptions = [],\n\t\tsize = 'default',\n\t\tvalue: valueProp,\n\t\tlabelPosition = 'top',\n\t\tchildren,\n\t\tprefix,\n\t\tsuffix,\n\t\tvariant = 'default',\n\t\t__next40pxDefaultSize = false,\n\t\t__nextHasNoMarginBottom = false,\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\tconst id = useUniqueId( idProp );\n\tconst helpId = help ? `${ id }__help` : undefined;\n\n\t// Disable reason: A select with an onchange throws a warning.\n\tif ( ! options?.length && ! children ) {\n\t\treturn null;\n\t}\n\n\tconst handleOnChange = (\n\t\tevent: React.ChangeEvent< HTMLSelectElement >\n\t) => {\n\t\tif ( props.multiple ) {\n\t\t\tconst selectedOptions = Array.from( event.target.options ).filter(\n\t\t\t\t( { selected } ) => selected\n\t\t\t);\n\t\t\tconst newValues = selectedOptions.map(\n\t\t\t\t( { value } ) => value as V\n\t\t\t);\n\t\t\tprops.onChange?.( newValues, { event } );\n\t\t\treturn;\n\t\t}\n\n\t\tprops.onChange?.( event.target.value as V, { event } );\n\t};\n\n\tconst classes = clsx( 'components-select-control', className );\n\n\treturn (\n\t\t<BaseControl\n\t\t\thelp={ help }\n\t\t\tid={ id }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"SelectControl\"\n\t\t>\n\t\t\t<StyledInputBase\n\t\t\t\tclassName={ classes }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tid={ id }\n\t\t\t\tisBorderless={ variant === 'minimal' }\n\t\t\t\tlabel={ label }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={\n\t\t\t\t\tsuffix || ( ! multiple && <SelectControlChevronDown /> )\n\t\t\t\t}\n\t\t\t\tprefix={ prefix }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\t__unstableInputWidth={\n\t\t\t\t\tvariant === 'minimal' ? 'auto' : undefined\n\t\t\t\t}\n\t\t\t\tvariant={ variant }\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t<Select\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\taria-describedby={ helpId }\n\t\t\t\t\tclassName=\"components-select-control__input\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tid={ id }\n\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\tvalue={ valueProp }\n\t\t\t\t\tvariant={ variant }\n\t\t\t\t>\n\t\t\t\t\t{ children || <SelectOptions options={ options } /> }\n\t\t\t\t</Select>\n\t\t\t</StyledInputBase>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * `SelectControl` allows users to select from a single or multiple option menu.\n * It functions as a wrapper around the browser's native `<select>` element.\n *\n * ```jsx\n * import { SelectControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MySelectControl = () => {\n * const [ size, setSize ] = useState( '50%' );\n *\n * return (\n * <SelectControl\n * __nextHasNoMarginBottom\n * label=\"Size\"\n * value={ size }\n * options={ [\n * { label: 'Big', value: '100%' },\n * { label: 'Medium', value: '50%' },\n * { label: 'Small', value: '25%' },\n * ] }\n * onChange={ setSize }\n * />\n * );\n * };\n * ```\n */\nexport const SelectControl = forwardRef( UnforwardedSelectControl ) as <\n\tV extends string,\n>(\n\tprops: WordPressComponentProps<\n\t\tSelectControlProps< V >,\n\t\t'select',\n\t\tfalse\n\t> & { ref?: React.Ref< HTMLSelectElement > }\n) => React.JSX.Element | null;\n\nexport default SelectControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C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,IAAI,EAAGA,IAAM;MACbI,MAAM,EACLA,MAAM,IAAM,CAAEN,QAAQ,iBAAItB,IAAA,CAACH,wBAAwB,IAAE,CACrD;MACD8B,MAAM,EAAGA,MAAQ;MACjBD,aAAa,EAAGA,aAAe;MAC/BsB,oBAAoB,EACnBnB,OAAO,KAAK,SAAS,GAAG,MAAM,GAAGK,SACjC;MACDL,OAAO,EAAGA,OAAS;MACnBC,qBAAqB,EAAGA,qBAAuB;MAAAhB,QAAA,eAE/Cd,IAAA,CAACL,MAAM;QAAA,GACDqC,SAAS;QACdF,qBAAqB,EAAGA,qBAAuB;QAC/C,oBAAmBG,MAAQ;QAC3Bf,SAAS,EAAC,kCAAkC;QAC5CC,QAAQ,EAAGA,QAAU;QACrBd,EAAE,EAAGA,EAAI;QACTiB,QAAQ,EAAGA,QAAU;QACrBC,QAAQ,EAAGa,cAAgB;QAC3BnB,GAAG,EAAGA,GAAK;QACXgC,UAAU,EAAGzB,IAAM;QACnBd,KAAK,EAAGe,SAAW;QACnBI,OAAO,EAAGA,OAAS;QAAAf,QAAA,EAEjBA,QAAQ,iBAAId,IAAA,CAACM,aAAa;UAACC,OAAO,EAAGA;QAAS,CAAE;MAAC,CAC5C;IAAC,CACO;EAAC,CACN,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMH,aAAa,GAAGX,UAAU,CAAEsB,wBAAyB,CAQrC;AAE7B,eAAeX,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["memo","PickerCell","jsx","_jsx","SelectControl","help","instanceId","label","multiple","onChange","options","className","hideLabelFromVision","props","id","onChangeValue","undefined"],"sources":["@wordpress/components/src/select-control/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { memo } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport PickerCell from '../mobile/bottom-sheet/picker-cell';\n\nexport const SelectControl = memo(\n\t( {\n\t\thelp,\n\t\tinstanceId,\n\t\tlabel,\n\t\tmultiple = false,\n\t\tonChange,\n\t\toptions = [],\n\t\tclassName,\n\t\thideLabelFromVision,\n\t\t...props\n\t} ) => {\n\t\tconst id = `inspector-select-control-${ instanceId }`;\n\n\t\treturn (\n\t\t\t<PickerCell\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tid={ id }\n\t\t\t\thelp={ help }\n\t\t\t\tclassName={ className }\n\t\t\t\tonChangeValue={ onChange }\n\t\t\t\taria-describedby={ !! help ? `${ id }__help` : undefined }\n\t\t\t\tmultiple={ multiple }\n\t\t\t\toptions={ options }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n);\n\nexport default SelectControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,oBAAoB;AACzC;AACA;AACA;AACA,OAAOC,UAAU,MAAM,oCAAoC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,OAAO,MAAMC,aAAa,GAAGJ,IAAI,CAChC,CAAE;EACDK,IAAI;EACJC,UAAU;EACVC,KAAK;EACLC,QAAQ,GAAG,KAAK;EAChBC,QAAQ;EACRC,OAAO,GAAG,EAAE;EACZC,SAAS;EACTC,mBAAmB;EACnB,GAAGC;AACJ,CAAC,KAAM;EACN,MAAMC,EAAE,GAAI,4BAA4BR,UAAY,EAAC;EAErD,oBACCH,IAAA,CAACF,UAAU;IACVM,KAAK,EAAGA,KAAO;IACfK,mBAAmB,EAAGA,mBAAqB;IAC3CE,EAAE,EAAGA,EAAI;IACTT,IAAI,EAAGA,IAAM;IACbM,SAAS,EAAGA,SAAW;IACvBI,aAAa,EAAGN,QAAU;IAC1B,oBAAmB,CAAC,CAAEJ,IAAI,GAAI,GAAGS,EAAI,QAAO,GAAGE,SAAW;IAC1DR,QAAQ,EAAGA,QAAU;IACrBE,OAAO,EAAGA,OAAS;IAAA,GACdG;EAAK,CACV,CAAC;AAEJ,CACD,CAAC;AAED,eAAeT,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["memo","PickerCell","jsx","_jsx","SelectControl","help","instanceId","label","multiple","onChange","options","className","hideLabelFromVision","props","id","onChangeValue","undefined"],"sources":["@wordpress/components/src/select-control/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { memo } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport PickerCell from '../mobile/bottom-sheet/picker-cell';\n\nexport const SelectControl = memo(\n\t( {\n\t\thelp,\n\t\tinstanceId,\n\t\tlabel,\n\t\tmultiple = false,\n\t\tonChange,\n\t\toptions = [],\n\t\tclassName,\n\t\thideLabelFromVision,\n\t\t...props\n\t} ) => {\n\t\tconst id = `inspector-select-control-${ instanceId }`;\n\n\t\treturn (\n\t\t\t<PickerCell\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tid={ id }\n\t\t\t\thelp={ help }\n\t\t\t\tclassName={ className }\n\t\t\t\tonChangeValue={ onChange }\n\t\t\t\taria-describedby={ !! help ? `${ id }__help` : undefined }\n\t\t\t\tmultiple={ multiple }\n\t\t\t\toptions={ options }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n);\n\nexport default SelectControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,oBAAoB;AACzC;AACA;AACA;AACA,OAAOC,UAAU,MAAM,oCAAoC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,OAAO,MAAMC,aAAa,GAAGJ,IAAI,CAChC,CAAE;EACDK,IAAI;EACJC,UAAU;EACVC,KAAK;EACLC,QAAQ,GAAG,KAAK;EAChBC,QAAQ;EACRC,OAAO,GAAG,EAAE;EACZC,SAAS;EACTC,mBAAmB;EACnB,GAAGC;AACJ,CAAC,KAAM;EACN,MAAMC,EAAE,GAAG,4BAA6BR,UAAU,EAAG;EAErD,oBACCH,IAAA,CAACF,UAAU;IACVM,KAAK,EAAGA,KAAO;IACfK,mBAAmB,EAAGA,mBAAqB;IAC3CE,EAAE,EAAGA,EAAI;IACTT,IAAI,EAAGA,IAAM;IACbM,SAAS,EAAGA,SAAW;IACvBI,aAAa,EAAGN,QAAU;IAC1B,oBAAmB,CAAC,CAAEJ,IAAI,GAAG,GAAIS,EAAE,QAAS,GAAGE,SAAW;IAC1DR,QAAQ,EAAGA,QAAU;IACrBE,OAAO,EAAGA,OAAS;IAAA,GACdG;EAAK,CACV,CAAC;AAEJ,CACD,CAAC;AAED,eAAeT,aAAa","ignoreList":[]}
@@ -17,9 +17,7 @@ import BubblesVirtuallySlot from './bubbles-virtually/slot';
17
17
  import BubblesVirtuallySlotFillProvider from './bubbles-virtually/slot-fill-provider';
18
18
  import SlotFillProvider from './provider';
19
19
  import SlotFillContext from './bubbles-virtually/slot-fill-context';
20
- import { jsx as _jsx } from "react/jsx-runtime";
21
- import { Fragment as _Fragment } from "react/jsx-runtime";
22
- import { jsxs as _jsxs } from "react/jsx-runtime";
20
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
23
21
  export { default as useSlot } from './bubbles-virtually/use-slot';
24
22
  export { default as useSlotFills } from './bubbles-virtually/use-slot-fills';
25
23
  export function Fill(props) {
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","useContext","BaseFill","BaseSlot","BubblesVirtuallyFill","BubblesVirtuallySlot","BubblesVirtuallySlotFillProvider","SlotFillProvider","SlotFillContext","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","default","useSlot","useSlotFills","Fill","props","children","UnforwardedSlot","ref","bubblesVirtually","restProps","Slot","Provider","passthrough","parent","isDefault","displayName","createSlotFill","key","baseName","description","FillComponent","name","SlotComponent","__unstableName","createPrivateSlotFill","privateKey","Symbol","privateSlotFill"],"sources":["@wordpress/components/src/slot-fill/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseFill from './fill';\nimport BaseSlot from './slot';\nimport BubblesVirtuallyFill from './bubbles-virtually/fill';\nimport BubblesVirtuallySlot from './bubbles-virtually/slot';\nimport BubblesVirtuallySlotFillProvider from './bubbles-virtually/slot-fill-provider';\nimport SlotFillProvider from './provider';\nimport SlotFillContext from './bubbles-virtually/slot-fill-context';\nimport type { WordPressComponentProps } from '../context';\n\nexport { default as useSlot } from './bubbles-virtually/use-slot';\nexport { default as useSlotFills } from './bubbles-virtually/use-slot-fills';\nimport type {\n\tDistributiveOmit,\n\tFillComponentProps,\n\tSlotComponentProps,\n\tSlotFillProviderProps,\n\tSlotKey,\n} from './types';\n\nexport function Fill( props: FillComponentProps ) {\n\t// We're adding both Fills here so they can register themselves before\n\t// their respective slot has been registered. Only the Fill that has a slot\n\t// will render. The other one will return null.\n\treturn (\n\t\t<>\n\t\t\t<BaseFill { ...props } />\n\t\t\t<BubblesVirtuallyFill { ...props } />\n\t\t</>\n\t);\n}\n\nexport function UnforwardedSlot(\n\tprops: SlotComponentProps &\n\t\tOmit< WordPressComponentProps< {}, 'div' >, 'className' >,\n\tref: ForwardedRef< any >\n) {\n\tconst { bubblesVirtually, ...restProps } = props;\n\tif ( bubblesVirtually ) {\n\t\treturn <BubblesVirtuallySlot { ...restProps } ref={ ref } />;\n\t}\n\treturn <BaseSlot { ...restProps } />;\n}\nexport const Slot = forwardRef( UnforwardedSlot );\n\nexport function Provider( {\n\tchildren,\n\tpassthrough = false,\n}: SlotFillProviderProps ) {\n\tconst parent = useContext( SlotFillContext );\n\tif ( ! parent.isDefault && passthrough ) {\n\t\treturn <>{ children }</>;\n\t}\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<BubblesVirtuallySlotFillProvider>\n\t\t\t\t{ children }\n\t\t\t</BubblesVirtuallySlotFillProvider>\n\t\t</SlotFillProvider>\n\t);\n}\nProvider.displayName = 'SlotFillProvider';\n\nexport function createSlotFill( key: SlotKey ) {\n\tconst baseName = typeof key === 'symbol' ? key.description : key;\n\tconst FillComponent = ( props: Omit< FillComponentProps, 'name' > ) => (\n\t\t<Fill name={ key } { ...props } />\n\t);\n\tFillComponent.displayName = `${ baseName }Fill`;\n\n\tconst SlotComponent = (\n\t\tprops: DistributiveOmit< SlotComponentProps, 'name' >\n\t) => <Slot name={ key } { ...props } />;\n\tSlotComponent.displayName = `${ baseName }Slot`;\n\tSlotComponent.__unstableName = key;\n\n\treturn {\n\t\tFill: FillComponent,\n\t\tSlot: SlotComponent,\n\t};\n}\n\nexport const createPrivateSlotFill = ( name: string ) => {\n\tconst privateKey = Symbol( name );\n\tconst privateSlotFill = createSlotFill( privateKey );\n\n\treturn { privateKey, ...privateSlotFill };\n};\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;;AAE3D;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,QAAQ;AAC7B,OAAOC,QAAQ,MAAM,QAAQ;AAC7B,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,gCAAgC,MAAM,wCAAwC;AACrF,OAAOC,gBAAgB,MAAM,YAAY;AACzC,OAAOC,eAAe,MAAM,uCAAuC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAGpE,SAASC,OAAO,IAAIC,OAAO,QAAQ,8BAA8B;AACjE,SAASD,OAAO,IAAIE,YAAY,QAAQ,oCAAoC;AAS5E,OAAO,SAASC,IAAIA,CAAEC,KAAyB,EAAG;EACjD;EACA;EACA;EACA,oBACCL,KAAA,CAAAF,SAAA;IAAAQ,QAAA,gBACCV,IAAA,CAACR,QAAQ;M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,WAAW,GAAI,GAAGG,QAAU,MAAK;EAE/C,MAAMI,aAAa,GAClBlB,KAAqD,iBACjDT,IAAA,CAACe,IAAI;IAACW,IAAI,EAAGJ,GAAK;IAAA,GAAMb;EAAK,CAAI,CAAC;EACvCkB,aAAa,CAACP,WAAW,GAAI,GAAGG,QAAU,MAAK;EAC/CI,aAAa,CAACC,cAAc,GAAGN,GAAG;EAElC,OAAO;IACNd,IAAI,EAAEiB,aAAa;IACnBV,IAAI,EAAEY;EACP,CAAC;AACF;AAEA,OAAO,MAAME,qBAAqB,GAAKH,IAAY,IAAM;EACxD,MAAMI,UAAU,GAAGC,MAAM,CAAEL,IAAK,CAAC;EACjC,MAAMM,eAAe,GAAGX,cAAc,CAAES,UAAW,CAAC;EAEpD,OAAO;IAAEA,UAAU;IAAE,GAAGE;EAAgB,CAAC;AAC1C,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","useContext","BaseFill","BaseSlot","BubblesVirtuallyFill","BubblesVirtuallySlot","BubblesVirtuallySlotFillProvider","SlotFillProvider","SlotFillContext","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","default","useSlot","useSlotFills","Fill","props","children","UnforwardedSlot","ref","bubblesVirtually","restProps","Slot","Provider","passthrough","parent","isDefault","displayName","createSlotFill","key","baseName","description","FillComponent","name","SlotComponent","__unstableName","createPrivateSlotFill","privateKey","Symbol","privateSlotFill"],"sources":["@wordpress/components/src/slot-fill/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseFill from './fill';\nimport BaseSlot from './slot';\nimport BubblesVirtuallyFill from './bubbles-virtually/fill';\nimport BubblesVirtuallySlot from './bubbles-virtually/slot';\nimport BubblesVirtuallySlotFillProvider from './bubbles-virtually/slot-fill-provider';\nimport SlotFillProvider from './provider';\nimport SlotFillContext from './bubbles-virtually/slot-fill-context';\nimport type { WordPressComponentProps } from '../context';\n\nexport { default as useSlot } from './bubbles-virtually/use-slot';\nexport { default as useSlotFills } from './bubbles-virtually/use-slot-fills';\nimport type {\n\tDistributiveOmit,\n\tFillComponentProps,\n\tSlotComponentProps,\n\tSlotFillProviderProps,\n\tSlotKey,\n} from './types';\n\nexport function Fill( props: FillComponentProps ) {\n\t// We're adding both Fills here so they can register themselves before\n\t// their respective slot has been registered. Only the Fill that has a slot\n\t// will render. The other one will return null.\n\treturn (\n\t\t<>\n\t\t\t<BaseFill { ...props } />\n\t\t\t<BubblesVirtuallyFill { ...props } />\n\t\t</>\n\t);\n}\n\nexport function UnforwardedSlot(\n\tprops: SlotComponentProps &\n\t\tOmit< WordPressComponentProps< {}, 'div' >, 'className' >,\n\tref: ForwardedRef< any >\n) {\n\tconst { bubblesVirtually, ...restProps } = props;\n\tif ( bubblesVirtually ) {\n\t\treturn <BubblesVirtuallySlot { ...restProps } ref={ ref } />;\n\t}\n\treturn <BaseSlot { ...restProps } />;\n}\nexport const Slot = forwardRef( UnforwardedSlot );\n\nexport function Provider( {\n\tchildren,\n\tpassthrough = false,\n}: SlotFillProviderProps ) {\n\tconst parent = useContext( SlotFillContext );\n\tif ( ! parent.isDefault && passthrough ) {\n\t\treturn <>{ children }</>;\n\t}\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<BubblesVirtuallySlotFillProvider>\n\t\t\t\t{ children }\n\t\t\t</BubblesVirtuallySlotFillProvider>\n\t\t</SlotFillProvider>\n\t);\n}\nProvider.displayName = 'SlotFillProvider';\n\nexport function createSlotFill( key: SlotKey ) {\n\tconst baseName = typeof key === 'symbol' ? key.description : key;\n\tconst FillComponent = ( props: Omit< FillComponentProps, 'name' > ) => (\n\t\t<Fill name={ key } { ...props } />\n\t);\n\tFillComponent.displayName = `${ baseName }Fill`;\n\n\tconst SlotComponent = (\n\t\tprops: DistributiveOmit< SlotComponentProps, 'name' >\n\t) => <Slot name={ key } { ...props } />;\n\tSlotComponent.displayName = `${ baseName }Slot`;\n\tSlotComponent.__unstableName = key;\n\n\treturn {\n\t\tFill: FillComponent,\n\t\tSlot: SlotComponent,\n\t};\n}\n\nexport const createPrivateSlotFill = ( name: string ) => {\n\tconst privateKey = Symbol( name );\n\tconst privateSlotFill = createSlotFill( privateKey );\n\n\treturn { privateKey, ...privateSlotFill };\n};\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;;AAE3D;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,QAAQ;AAC7B,OAAOC,QAAQ,MAAM,QAAQ;AAC7B,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,gCAAgC,MAAM,wCAAwC;AACrF,OAAOC,gBAAgB,MAAM,YAAY;AACzC,OAAOC,eAAe,MAAM,uCAAuC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAGpE,SAASC,OAAO,IAAIC,OAAO,QAAQ,8BAA8B;AACjE,SAASD,OAAO,IAAIE,YAAY,QAAQ,oCAAoC;AAS5E,OAAO,SAASC,IAAIA,CAAEC,KAAyB,EAAG;EACjD;EACA;EACA;EACA,oBACCL,KAAA,CAAAF,SAAA;IAAAQ,QAAA,gBACCV,IAAA,CAACR,QAAQ;MAAA,GAAMiB;IAAK,CAAI,CAAC,eACzBT,IAAA,CAACN,oBAAoB;MAAA,GAAMe;IAAK,CAAI,CAAC;EAAA,CACpC,CAAC;AAEL;AAEA,OAAO,SAASE,eAAeA,CAC9BF,KAC0D,EAC1DG,GAAwB,EACvB;EACD,MAAM;IAAEC,gBAAgB;IAAE,GAAGC;EAAU,CAAC,GAAGL,KAAK;EAChD,IAAKI,gBAAgB,EAAG;IACvB,oBAAOb,IAAA,CAACL,oBAAoB;MAAA,GAAMmB,SAAS;MAAGF,GAA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AME,qBAAqB,GAAKH,IAAY,IAAM;EACxD,MAAMI,UAAU,GAAGC,MAAM,CAAEL,IAAK,CAAC;EACjC,MAAMM,eAAe,GAAGX,cAAc,CAAES,UAAW,CAAC;EAEpD,OAAO;IAAEA,UAAU;IAAE,GAAGE;EAAgB,CAAC;AAC1C,CAAC","ignoreList":[]}
@@ -11,8 +11,7 @@ import { Children, Component, cloneElement, isEmptyElement } from '@wordpress/el
11
11
  * Internal dependencies
12
12
  */
13
13
  import SlotFillContext from './context';
14
- import { Fragment as _Fragment } from "react/jsx-runtime";
15
- import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
16
15
  /**
17
16
  * Whether the argument is a function.
18
17
  *
@@ -1 +1 @@
1
- {"version":3,"names":["Children","Component","cloneElement","isEmptyElement","SlotFillContext","Fragment","_Fragment","jsx","_jsx","isFunction","maybeFunc","SlotComponent","constructor","props","isUnmounted","componentDidMount","registerSlot","name","componentWillUnmount","unregisterSlot","componentDidUpdate","prevProps","forceUpdate","render","_getFills","children","fillProps","getFills","fills","map","fill","fillChildren","child","childIndex","childKey","key","filter","element","Slot","Consumer"],"sources":["@wordpress/components/src/slot-fill/slot.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactElement, ReactNode, Key } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tChildren,\n\tComponent,\n\tcloneElement,\n\tisEmptyElement,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport type { BaseSlotComponentProps, SlotComponentProps } from './types';\n\n/**\n * Whether the argument is a function.\n *\n * @param maybeFunc The argument to check.\n * @return True if the argument is a function, false otherwise.\n */\nfunction isFunction( maybeFunc: any ): maybeFunc is Function {\n\treturn typeof maybeFunc === 'function';\n}\n\nclass SlotComponent extends Component< BaseSlotComponentProps > {\n\tprivate isUnmounted: boolean;\n\n\tconstructor( props: BaseSlotComponentProps ) {\n\t\tsuper( props );\n\n\t\tthis.isUnmounted = false;\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { registerSlot } = this.props;\n\t\tthis.isUnmounted = false;\n\t\tregisterSlot( this.props.name, this );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tconst { unregisterSlot } = this.props;\n\t\tthis.isUnmounted = true;\n\t\tunregisterSlot( this.props.name, this );\n\t}\n\n\tcomponentDidUpdate( prevProps: BaseSlotComponentProps ) {\n\t\tconst { name, unregisterSlot, registerSlot } = this.props;\n\n\t\tif ( prevProps.name !== name ) {\n\t\t\tunregisterSlot( prevProps.name, this );\n\t\t\tregisterSlot( name, this );\n\t\t}\n\t}\n\n\tforceUpdate() {\n\t\tif ( this.isUnmounted ) {\n\t\t\treturn;\n\t\t}\n\t\tsuper.forceUpdate();\n\t}\n\n\trender() {\n\t\tconst { children, name, fillProps = {}, getFills } = this.props;\n\t\tconst fills: ReactNode[] = ( getFills( name, this ) ?? [] )\n\t\t\t.map( ( fill ) => {\n\t\t\t\tconst fillChildren = isFunction( fill.children )\n\t\t\t\t\t? fill.children( fillProps )\n\t\t\t\t\t: fill.children;\n\t\t\t\treturn Children.map( fillChildren, ( child, childIndex ) => {\n\t\t\t\t\tif ( ! child || typeof child === 'string' ) {\n\t\t\t\t\t\treturn child;\n\t\t\t\t\t}\n\t\t\t\t\tlet childKey: Key = childIndex;\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof child === 'object' &&\n\t\t\t\t\t\t'key' in child &&\n\t\t\t\t\t\tchild?.key\n\t\t\t\t\t) {\n\t\t\t\t\t\tchildKey = child.key;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn cloneElement( child as ReactElement, {\n\t\t\t\t\t\tkey: childKey,\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t} )\n\t\t\t.filter(\n\t\t\t\t// In some cases fills are rendered only when some conditions apply.\n\t\t\t\t// This ensures that we only use non-empty fills when rendering, i.e.,\n\t\t\t\t// it allows us to render wrappers only when the fills are actually present.\n\t\t\t\t( element ) => ! isEmptyElement( element )\n\t\t\t);\n\n\t\treturn <>{ isFunction( children ) ? children( fills ) : fills }</>;\n\t}\n}\n\nconst Slot = ( props: Omit< SlotComponentProps, 'bubblesVirtually' > ) => (\n\t<SlotFillContext.Consumer>\n\t\t{ ( { registerSlot, unregisterSlot, getFills } ) => (\n\t\t\t<SlotComponent\n\t\t\t\t{ ...props }\n\t\t\t\tregisterSlot={ registerSlot }\n\t\t\t\tunregisterSlot={ unregisterSlot }\n\t\t\t\tgetFills={ getFills }\n\t\t\t/>\n\t\t) }\n\t</SlotFillContext.Consumer>\n);\n\nexport default Slot;\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SACCA,QAAQ,EACRC,SAAS,EACTC,YAAY,EACZC,cAAc,QACR,oBAAoB;;AAE3B;AACA;AACA;AACA,OAAOC,eAAe,MAAM,WAAW;AAAC,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGxC;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAAEC,SAAc,EAA0B;EAC5D,OAAO,OAAOA,SAAS,KAAK,UAAU;AACvC;AAEA,MAAMC,aAAa,SAASV,SAAS,CAA2B;EAG/DW,WAAWA,CAAEC,KAA6B,EAAG;IAC5C,KAAK,CAAEA,KAAM,CAAC;IAEd,IAAI,CAACC,WAAW,GAAG,KAAK;EACzB;EAEAC,iBAAiBA,CAAA,EAAG;IACnB,MAAM;MAAEC;IAAa,CAAC,GAAG,IAAI,CAACH,KAAK;IACnC,IAAI,CAACC,WAAW,GAAG,KAAK;IACxBE,YAAY,CAAE,IAAI,CAACH,KAAK,CAACI,IAAI,EAAE,IAAK,CAAC;EACtC;EAEAC,oBAAoBA,CAAA,EAAG;IACtB,MAAM;MAAEC;IAAe,CAAC,GAAG,IAAI,CAACN,KAAK;IACrC,IAAI,CAACC,WAAW,GAAG,IAAI;IACvBK,cAAc,CAAE,IAAI,CAACN,KAA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,GAAG;QACrB;QAEA,OAAOjC,YAAY,CAAE8B,KAAK,EAAkB;UAC3CG,GAAG,EAAED;QACN,CAAE,CAAC;MACJ,CAAE,CAAC;IACJ,CAAE,CAAC,CACFE,MAAM;IACN;IACA;IACA;IACEC,OAAO,IAAM,CAAElC,cAAc,CAAEkC,OAAQ,CAC1C,CAAC;IAEF,oBAAO7B,IAAA,CAAAF,SAAA;MAAAmB,QAAA,EAAIhB,UAAU,CAAEgB,QAAS,CAAC,GAAGA,QAAQ,CAAEG,KAAM,CAAC,GAAGA;IAAK,CAAI,CAAC;EACnE;AACD;AAEA,MAAMU,IAAI,GAAKzB,KAAqD,iBACnEL,IAAA,CAACJ,eAAe,CAACmC,QAAQ;EAAAd,QAAA,EACtBA,CAAE;IAAET,YAAY;IAAEG,cAAc;IAAEQ;EAAS,CAAC,kBAC7CnB,IAAA,CAACG,aAAa;IAAA,GACRE,KAAK;IACVG,YAAY,EAAGA,YAAc;IAC7BG,cAAc,EAAGA,cAAgB;IACjCQ,QAAQ,EAAGA;EAAU,CACrB;AACD,CACwB,CAC1B;AAED,eAAeW,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["Children","Component","cloneElement","isEmptyElement","SlotFillContext","Fragment","_Fragment","jsx","_jsx","isFunction","maybeFunc","SlotComponent","constructor","props","isUnmounted","componentDidMount","registerSlot","name","componentWillUnmount","unregisterSlot","componentDidUpdate","prevProps","forceUpdate","render","_getFills","children","fillProps","getFills","fills","map","fill","fillChildren","child","childIndex","childKey","key","filter","element","Slot","Consumer"],"sources":["@wordpress/components/src/slot-fill/slot.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactElement, ReactNode, Key } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tChildren,\n\tComponent,\n\tcloneElement,\n\tisEmptyElement,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport type { BaseSlotComponentProps, SlotComponentProps } from './types';\n\n/**\n * Whether the argument is a function.\n *\n * @param maybeFunc The argument to check.\n * @return True if the argument is a function, false otherwise.\n */\nfunction isFunction( maybeFunc: any ): maybeFunc is Function {\n\treturn typeof maybeFunc === 'function';\n}\n\nclass SlotComponent extends Component< BaseSlotComponentProps > {\n\tprivate isUnmounted: boolean;\n\n\tconstructor( props: BaseSlotComponentProps ) {\n\t\tsuper( props );\n\n\t\tthis.isUnmounted = false;\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { registerSlot } = this.props;\n\t\tthis.isUnmounted = false;\n\t\tregisterSlot( this.props.name, this );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tconst { unregisterSlot } = this.props;\n\t\tthis.isUnmounted = true;\n\t\tunregisterSlot( this.props.name, this );\n\t}\n\n\tcomponentDidUpdate( prevProps: BaseSlotComponentProps ) {\n\t\tconst { name, unregisterSlot, registerSlot } = this.props;\n\n\t\tif ( prevProps.name !== name ) {\n\t\t\tunregisterSlot( prevProps.name, this );\n\t\t\tregisterSlot( name, this );\n\t\t}\n\t}\n\n\tforceUpdate() {\n\t\tif ( this.isUnmounted ) {\n\t\t\treturn;\n\t\t}\n\t\tsuper.forceUpdate();\n\t}\n\n\trender() {\n\t\tconst { children, name, fillProps = {}, getFills } = this.props;\n\t\tconst fills: ReactNode[] = ( getFills( name, this ) ?? [] )\n\t\t\t.map( ( fill ) => {\n\t\t\t\tconst fillChildren = isFunction( fill.children )\n\t\t\t\t\t? fill.children( fillProps )\n\t\t\t\t\t: fill.children;\n\t\t\t\treturn Children.map( fillChildren, ( child, childIndex ) => {\n\t\t\t\t\tif ( ! child || typeof child === 'string' ) {\n\t\t\t\t\t\treturn child;\n\t\t\t\t\t}\n\t\t\t\t\tlet childKey: Key = childIndex;\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof child === 'object' &&\n\t\t\t\t\t\t'key' in child &&\n\t\t\t\t\t\tchild?.key\n\t\t\t\t\t) {\n\t\t\t\t\t\tchildKey = child.key;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn cloneElement( child as ReactElement, {\n\t\t\t\t\t\tkey: childKey,\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t} )\n\t\t\t.filter(\n\t\t\t\t// In some cases fills are rendered only when some conditions apply.\n\t\t\t\t// This ensures that we only use non-empty fills when rendering, i.e.,\n\t\t\t\t// it allows us to render wrappers only when the fills are actually present.\n\t\t\t\t( element ) => ! isEmptyElement( element )\n\t\t\t);\n\n\t\treturn <>{ isFunction( children ) ? children( fills ) : fills }</>;\n\t}\n}\n\nconst Slot = ( props: Omit< SlotComponentProps, 'bubblesVirtually' > ) => (\n\t<SlotFillContext.Consumer>\n\t\t{ ( { registerSlot, unregisterSlot, getFills } ) => (\n\t\t\t<SlotComponent\n\t\t\t\t{ ...props }\n\t\t\t\tregisterSlot={ registerSlot }\n\t\t\t\tunregisterSlot={ unregisterSlot }\n\t\t\t\tgetFills={ getFills }\n\t\t\t/>\n\t\t) }\n\t</SlotFillContext.Consumer>\n);\n\nexport default Slot;\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SACCA,QAAQ,EACRC,SAAS,EACTC,YAAY,EACZC,cAAc,QACR,oBAAoB;;AAE3B;AACA;AACA;AACA,OAAOC,eAAe,MAAM,WAAW;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAGxC;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAAEC,SAAc,EAA0B;EAC5D,OAAO,OAAOA,SAAS,KAAK,UAAU;AACvC;AAEA,MAAMC,aAAa,SAASV,SAAS,CAA2B;EAG/DW,WAAWA,CAAEC,KAA6B,EAAG;IAC5C,KAAK,CAAEA,KAAM,CAAC;IAEd,IAAI,CAACC,WAAW,GAAG,KAAK;EACzB;EAEAC,iBAAiBA,CAAA,EAAG;IACnB,MAAM;MAAEC;IAAa,CAAC,GAAG,IAAI,CAACH,KAAK;IACnC,IAAI,CAACC,WAAW,GAAG,KAAK;IACxBE,YAAY,C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OAAOA,KAAK,KAAK,QAAQ,EAAG;UAC3C,OAAOA,KAAK;QACb;QACA,IAAIE,QAAa,GAAGD,UAAU;QAC9B,IACC,OAAOD,KAAK,KAAK,QAAQ,IACzB,KAAK,IAAIA,KAAK,IACdA,KAAK,EAAEG,GAAG,EACT;UACDD,QAAQ,GAAGF,KAAK,CAACG,GAAG;QACrB;QAEA,OAAOjC,YAAY,CAAE8B,KAAK,EAAkB;UAC3CG,GAAG,EAAED;QACN,CAAE,CAAC;MACJ,CAAE,CAAC;IACJ,CAAE,CAAC,CACFE,MAAM;IACN;IACA;IACA;IACEC,OAAO,IAAM,CAAElC,cAAc,CAAEkC,OAAQ,CAC1C,CAAC;IAEF,oBAAO7B,IAAA,CAAAF,SAAA;MAAAmB,QAAA,EAAIhB,UAAU,CAAEgB,QAAS,CAAC,GAAGA,QAAQ,CAAEG,KAAM,CAAC,GAAGA;IAAK,CAAI,CAAC;EACnE;AACD;AAEA,MAAMU,IAAI,GAAKzB,KAAqD,iBACnEL,IAAA,CAACJ,eAAe,CAACmC,QAAQ;EAAAd,QAAA,EACtBA,CAAE;IAAET,YAAY;IAAEG,cAAc;IAAEQ;EAAS,CAAC,kBAC7CnB,IAAA,CAACG,aAAa;IAAA,GACRE,KAAK;IACVG,YAAY,EAAGA,YAAc;IAC7BG,cAAc,EAAGA,cAAgB;IACjCQ,QAAQ,EAAGA;EAAU,CACrB;AACD,CACwB,CAC1B;AAED,eAAeW,IAAI","ignoreList":[]}
@@ -16,8 +16,7 @@ import warning from '@wordpress/warning';
16
16
  * Internal dependencies
17
17
  */
18
18
  import Button from '../button';
19
- import { jsx as _jsx } from "react/jsx-runtime";
20
- import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
20
  const NOTICE_TIMEOUT = 10000;
22
21
 
23
22
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","speak","useEffect","useLayoutEffect","useRef","forwardRef","renderToString","__","warning","Button","jsx","_jsx","jsxs","_jsxs","NOTICE_TIMEOUT","useSpokenMessage","message","politeness","spokenMessage","UnforwardedSnackbar","className","children","actions","onRemove","icon","explicitDismiss","onDismiss","listRef","ref","dismissMe","event","preventDefault","current","focus","onActionClick","onClick","stopPropagation","callbacksRef","timeoutHandle","setTimeout","clearTimeout","classes","length","globalThis","SCRIPT_DEBUG","snackbarContentClassnames","undefined","tabIndex","role","onKeyPress","map","label","url","index","href","variant","Snackbar"],"sources":["@wordpress/components/src/snackbar/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, KeyboardEvent, MouseEvent } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport {\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tforwardRef,\n\trenderToString,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { SnackbarProps } from './types';\nimport type { NoticeAction } from '../notice/types';\nimport type { WordPressComponentProps } from '../context';\n\nconst NOTICE_TIMEOUT = 10000;\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n *\n * @param message Message to announce.\n * @param politeness Politeness to announce.\n */\nfunction useSpokenMessage(\n\tmessage: SnackbarProps[ 'spokenMessage' ],\n\tpoliteness: NonNullable< SnackbarProps[ 'politeness' ] >\n) {\n\tconst spokenMessage =\n\t\ttypeof message === 'string' ? message : renderToString( message );\n\n\tuseEffect( () => {\n\t\tif ( spokenMessage ) {\n\t\t\tspeak( spokenMessage, politeness );\n\t\t}\n\t}, [ spokenMessage, politeness ] );\n}\n\nfunction UnforwardedSnackbar(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tspokenMessage = children,\n\t\tpoliteness = 'polite',\n\t\tactions = [],\n\t\tonRemove,\n\t\ticon = null,\n\t\texplicitDismiss = false,\n\t\t// onDismiss is a callback executed when the snackbar is dismissed.\n\t\t// It is distinct from onRemove, which _looks_ like a callback but is\n\t\t// actually the function to call to remove the snackbar from the UI.\n\t\tonDismiss,\n\t\tlistRef,\n\t}: WordPressComponentProps< SnackbarProps, 'div' >,\n\tref: ForwardedRef< any >\n) {\n\tfunction dismissMe( event: KeyboardEvent | MouseEvent ) {\n\t\tif ( event && event.preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\t// Prevent focus loss by moving it to the list element.\n\t\tlistRef?.current?.focus();\n\n\t\tonDismiss?.();\n\t\tonRemove?.();\n\t}\n\n\tfunction onActionClick(\n\t\tevent: MouseEvent< HTMLButtonElement >,\n\t\tonClick: NoticeAction[ 'onClick' ]\n\t) {\n\t\tevent.stopPropagation();\n\n\t\tonRemove?.();\n\n\t\tif ( onClick ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\tuseSpokenMessage( spokenMessage, politeness );\n\n\t// The `onDismiss/onRemove` can have unstable references,\n\t// trigger side-effect cleanup, and reset timers.\n\tconst callbacksRef = useRef( { onDismiss, onRemove } );\n\tuseLayoutEffect( () => {\n\t\tcallbacksRef.current = { onDismiss, onRemove };\n\t} );\n\n\tuseEffect( () => {\n\t\t// Only set up the timeout dismiss if we're not explicitly dismissing.\n\t\tconst timeoutHandle = setTimeout( () => {\n\t\t\tif ( ! explicitDismiss ) {\n\t\t\t\tcallbacksRef.current.onDismiss?.();\n\t\t\t\tcallbacksRef.current.onRemove?.();\n\t\t\t}\n\t\t}, NOTICE_TIMEOUT );\n\n\t\treturn () => clearTimeout( timeoutHandle );\n\t}, [ explicitDismiss ] );\n\n\tconst classes = clsx( className, 'components-snackbar', {\n\t\t'components-snackbar-explicit-dismiss': !! explicitDismiss,\n\t} );\n\tif ( actions && actions.length > 1 ) {\n\t\t// We need to inform developers that snackbar only accepts 1 action.\n\t\twarning(\n\t\t\t'Snackbar can only have one action. Use Notice if your message requires many actions.'\n\t\t);\n\t\t// return first element only while keeping it inside an array\n\t\tactions = [ actions[ 0 ] ];\n\t}\n\n\tconst snackbarContentClassnames = clsx( 'components-snackbar__content', {\n\t\t'components-snackbar__content-with-icon': !! icon,\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tclassName={ classes }\n\t\t\tonClick={ ! explicitDismiss ? dismissMe : undefined }\n\t\t\ttabIndex={ 0 }\n\t\t\trole={ ! explicitDismiss ? 'button' : undefined }\n\t\t\tonKeyPress={ ! explicitDismiss ? dismissMe : undefined }\n\t\t\taria-label={\n\t\t\t\t! explicitDismiss ? __( 'Dismiss this notice' ) : undefined\n\t\t\t}\n\t\t\tdata-testid=\"snackbar\"\n\t\t>\n\t\t\t<div className={ snackbarContentClassnames }>\n\t\t\t\t{ icon && (\n\t\t\t\t\t<div className=\"components-snackbar__icon\">{ icon }</div>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ actions.map( ( { label, onClick, url }, index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ (\n\t\t\t\t\t\t\t\tevent: MouseEvent< HTMLButtonElement >\n\t\t\t\t\t\t\t) => onActionClick( event, onClick ) }\n\t\t\t\t\t\t\tclassName=\"components-snackbar__action\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t\t{ explicitDismiss && (\n\t\t\t\t\t<span\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\taria-label={ __( 'Dismiss this notice' ) }\n\t\t\t\t\t\ttabIndex={ 0 }\n\t\t\t\t\t\tclassName=\"components-snackbar__dismiss-button\"\n\t\t\t\t\t\tonClick={ dismissMe }\n\t\t\t\t\t\tonKeyPress={ dismissMe }\n\t\t\t\t\t>\n\t\t\t\t\t\t&#x2715;\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\n/**\n * A Snackbar displays a succinct message that is cleared out after a small delay.\n *\n * It can also offer the user options, like viewing a published post.\n * But these options should also be available elsewhere in the UI.\n *\n * ```jsx\n * const MySnackbarNotice = () => (\n * <Snackbar>Post published successfully.</Snackbar>\n * );\n * ```\n */\nexport const Snackbar = forwardRef( UnforwardedSnackbar );\n\nexport default Snackbar;\n"],"mappings":"AAAA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SACCC,SAAS,EACTC,eAAe,EACfC,MAAM,EACNC,UAAU,EACVC,cAAc,QACR,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,OAAOC,OAAO,MAAM,oBAAoB;;AAExC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAK/B,MAAMC,cAAc,GAAG,KAAK;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CACxBC,OAAyC,EACzCC,UAAwD,EACvD;EACD,MAAMC,aAAa,GAClB,OAAOF,OAAO,KAAK,QAAQ,GAAGA,OAAO,GAAGV,cAAc,CAAEU,OAAQ,CAAC;EAElEd,SAAS,CAAE,MAAM;IAChB,IAAKgB,aAAa,EAAG;MACpBjB,KAAK,CAAEiB,aAAa,EAAED,UAAW,CAAC;IACnC;EACD,CAAC,EAAE,CAAEC,aAAa,EAAED,UAAU,CAAG,CAAC;AACnC;AAEA,SAASE,mBAAmBA,CAC3B;EACCC,SAAS;EACTC,QAAQ;EACRH,aAAa,GAAGG,QAAQ;EACxBJ,UAAU,GAAG,QAAQ;EACrBK,OAAO,GAAG,EAAE;EACZC,QAAQ;EACRC,IAAI,GAAG,IAAI;EACXC,eAAe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IAAI,EAAC,QAAQ;QACb,cAAazC,EAAE,CAAE,qBAAsB,CAAG;QAC1CwC,QAAQ,EAAG,CAAG;QACd3B,SAAS,EAAC,qCAAqC;QAC/Ce,OAAO,EAAGN,SAAW;QACrBoB,UAAU,EAAGpB,SAAW;QAAAR,QAAA,EACxB;MAED,CAAM,CACN;IAAA,CACG;EAAC,CACF,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMmC,QAAQ,GAAGnD,UAAU,CAAEc,mBAAoB,CAAC;AAEzD,eAAeqC,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["clsx","speak","useEffect","useLayoutEffect","useRef","forwardRef","renderToString","__","warning","Button","jsx","_jsx","jsxs","_jsxs","NOTICE_TIMEOUT","useSpokenMessage","message","politeness","spokenMessage","UnforwardedSnackbar","className","children","actions","onRemove","icon","explicitDismiss","onDismiss","listRef","ref","dismissMe","event","preventDefault","current","focus","onActionClick","onClick","stopPropagation","callbacksRef","timeoutHandle","setTimeout","clearTimeout","classes","length","globalThis","SCRIPT_DEBUG","snackbarContentClassnames","undefined","tabIndex","role","onKeyPress","map","label","url","index","href","variant","Snackbar"],"sources":["@wordpress/components/src/snackbar/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, KeyboardEvent, MouseEvent } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport {\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tforwardRef,\n\trenderToString,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { SnackbarProps } from './types';\nimport type { NoticeAction } from '../notice/types';\nimport type { WordPressComponentProps } from '../context';\n\nconst NOTICE_TIMEOUT = 10000;\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n *\n * @param message Message to announce.\n * @param politeness Politeness to announce.\n */\nfunction useSpokenMessage(\n\tmessage: SnackbarProps[ 'spokenMessage' ],\n\tpoliteness: NonNullable< SnackbarProps[ 'politeness' ] >\n) {\n\tconst spokenMessage =\n\t\ttypeof message === 'string' ? message : renderToString( message );\n\n\tuseEffect( () => {\n\t\tif ( spokenMessage ) {\n\t\t\tspeak( spokenMessage, politeness );\n\t\t}\n\t}, [ spokenMessage, politeness ] );\n}\n\nfunction UnforwardedSnackbar(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tspokenMessage = children,\n\t\tpoliteness = 'polite',\n\t\tactions = [],\n\t\tonRemove,\n\t\ticon = null,\n\t\texplicitDismiss = false,\n\t\t// onDismiss is a callback executed when the snackbar is dismissed.\n\t\t// It is distinct from onRemove, which _looks_ like a callback but is\n\t\t// actually the function to call to remove the snackbar from the UI.\n\t\tonDismiss,\n\t\tlistRef,\n\t}: WordPressComponentProps< SnackbarProps, 'div' >,\n\tref: ForwardedRef< any >\n) {\n\tfunction dismissMe( event: KeyboardEvent | MouseEvent ) {\n\t\tif ( event && event.preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\t// Prevent focus loss by moving it to the list element.\n\t\tlistRef?.current?.focus();\n\n\t\tonDismiss?.();\n\t\tonRemove?.();\n\t}\n\n\tfunction onActionClick(\n\t\tevent: MouseEvent< HTMLButtonElement >,\n\t\tonClick: NoticeAction[ 'onClick' ]\n\t) {\n\t\tevent.stopPropagation();\n\n\t\tonRemove?.();\n\n\t\tif ( onClick ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\tuseSpokenMessage( spokenMessage, politeness );\n\n\t// The `onDismiss/onRemove` can have unstable references,\n\t// trigger side-effect cleanup, and reset timers.\n\tconst callbacksRef = useRef( { onDismiss, onRemove } );\n\tuseLayoutEffect( () => {\n\t\tcallbacksRef.current = { onDismiss, onRemove };\n\t} );\n\n\tuseEffect( () => {\n\t\t// Only set up the timeout dismiss if we're not explicitly dismissing.\n\t\tconst timeoutHandle = setTimeout( () => {\n\t\t\tif ( ! explicitDismiss ) {\n\t\t\t\tcallbacksRef.current.onDismiss?.();\n\t\t\t\tcallbacksRef.current.onRemove?.();\n\t\t\t}\n\t\t}, NOTICE_TIMEOUT );\n\n\t\treturn () => clearTimeout( timeoutHandle );\n\t}, [ explicitDismiss ] );\n\n\tconst classes = clsx( className, 'components-snackbar', {\n\t\t'components-snackbar-explicit-dismiss': !! explicitDismiss,\n\t} );\n\tif ( actions && actions.length > 1 ) {\n\t\t// We need to inform developers that snackbar only accepts 1 action.\n\t\twarning(\n\t\t\t'Snackbar can only have one action. Use Notice if your message requires many actions.'\n\t\t);\n\t\t// return first element only while keeping it inside an array\n\t\tactions = [ actions[ 0 ] ];\n\t}\n\n\tconst snackbarContentClassnames = clsx( 'components-snackbar__content', {\n\t\t'components-snackbar__content-with-icon': !! icon,\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tclassName={ classes }\n\t\t\tonClick={ ! explicitDismiss ? dismissMe : undefined }\n\t\t\ttabIndex={ 0 }\n\t\t\trole={ ! explicitDismiss ? 'button' : undefined }\n\t\t\tonKeyPress={ ! explicitDismiss ? dismissMe : undefined }\n\t\t\taria-label={\n\t\t\t\t! explicitDismiss ? __( 'Dismiss this notice' ) : undefined\n\t\t\t}\n\t\t\tdata-testid=\"snackbar\"\n\t\t>\n\t\t\t<div className={ snackbarContentClassnames }>\n\t\t\t\t{ icon && (\n\t\t\t\t\t<div className=\"components-snackbar__icon\">{ icon }</div>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ actions.map( ( { label, onClick, url }, index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ (\n\t\t\t\t\t\t\t\tevent: MouseEvent< HTMLButtonElement >\n\t\t\t\t\t\t\t) => onActionClick( event, onClick ) }\n\t\t\t\t\t\t\tclassName=\"components-snackbar__action\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t\t{ explicitDismiss && (\n\t\t\t\t\t<span\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\taria-label={ __( 'Dismiss this notice' ) }\n\t\t\t\t\t\ttabIndex={ 0 }\n\t\t\t\t\t\tclassName=\"components-snackbar__dismiss-button\"\n\t\t\t\t\t\tonClick={ dismissMe }\n\t\t\t\t\t\tonKeyPress={ dismissMe }\n\t\t\t\t\t>\n\t\t\t\t\t\t&#x2715;\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\n/**\n * A Snackbar displays a succinct message that is cleared out after a small delay.\n *\n * It can also offer the user options, like viewing a published post.\n * But these options should also be available elsewhere in the UI.\n *\n * ```jsx\n * const MySnackbarNotice = () => (\n * <Snackbar>Post published successfully.</Snackbar>\n * );\n * ```\n */\nexport const Snackbar = forwardRef( UnforwardedSnackbar );\n\nexport default Snackbar;\n"],"mappings":"AAAA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SACCC,SAAS,EACTC,eAAe,EACfC,MAAM,EACNC,UAAU,EACVC,cAAc,QACR,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,OAAOC,OAAO,MAAM,oBAAoB;;AAExC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAK/B,MAAMC,cAAc,GAAG,KAAK;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CACxBC,OAAyC,EACzCC,UAAw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,2BAA2B;QAAAC,QAAA,EAAGG;MAAI,CAAO,CACxD,EACCH,QAAQ,EACRC,OAAO,CAAC4B,GAAG,CAAE,CAAE;QAAEC,KAAK;QAAEhB,OAAO;QAAEiB;MAAI,CAAC,EAAEC,KAAK,KAAM;QACpD,oBACC1C,IAAA,CAACF,MAAM;UAEN6C,IAAI,EAAGF,GAAK;UACZG,OAAO,EAAC,UAAU;UAClBpB,OAAO,EACNL,KAAsC,IAClCI,aAAa,CAAEJ,KAAK,EAAEK,OAAQ,CAAG;UACtCf,SAAS,EAAC,6BAA6B;UAAAC,QAAA,EAErC8B;QAAK,GARDE,KASC,CAAC;MAEX,CAAE,CAAC,EACD5B,eAAe,iBAChBd,IAAA;QACCqC,IAAI,EAAC,QAAQ;QACb,cAAazC,EAAE,CAAE,qBAAsB,CAAG;QAC1CwC,QAAQ,EAAG,CAAG;QACd3B,SAAS,EAAC,qCAAqC;QAC/Ce,OAAO,EAAGN,SAAW;QACrBoB,UAAU,EAAGpB,SAAW;QAAAR,QAAA,EACxB;MAED,CAAM,CACN;IAAA,CACG;EAAC,CACF,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMmC,QAAQ,GAAGnD,UAAU,CAAEc,mBAAoB,CAAC;AAEzD,eAAeqC,QAAQ","ignoreList":[]}
@@ -14,8 +14,7 @@ import { useRef } from '@wordpress/element';
14
14
  */
15
15
  import Snackbar from '.';
16
16
  import { __unstableMotion as motion, __unstableAnimatePresence as AnimatePresence } from '../animation';
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
18
  const SNACKBAR_VARIANTS = {
20
19
  init: {
21
20
  height: 0,
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useReducedMotion","useRef","Snackbar","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","jsx","_jsx","jsxs","_jsxs","SNACKBAR_VARIANTS","init","height","opacity","open","transition","type","duration","ease","delay","exit","SnackbarList","notices","className","children","onRemove","listRef","isReducedMotion","removeNotice","notice","id","tabIndex","ref","map","content","restNotice","div","layout","initial","animate","variants","undefined"],"sources":["@wordpress/components/src/snackbar/list.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Snackbar from '.';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '../animation';\nimport type { SnackbarListProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst SNACKBAR_VARIANTS = {\n\tinit: {\n\t\theight: 0,\n\t\topacity: 0,\n\t},\n\topen: {\n\t\theight: 'auto',\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\theight: { type: 'tween', duration: 0.3, ease: [ 0, 0, 0.2, 1 ] },\n\t\t\topacity: {\n\t\t\t\ttype: 'tween',\n\t\t\t\tduration: 0.25,\n\t\t\t\tdelay: 0.05,\n\t\t\t\tease: [ 0, 0, 0.2, 1 ],\n\t\t\t},\n\t\t},\n\t},\n\texit: {\n\t\topacity: 0,\n\t\ttransition: {\n\t\t\ttype: 'tween',\n\t\t\tduration: 0.1,\n\t\t\tease: [ 0, 0, 0.2, 1 ],\n\t\t},\n\t},\n};\n\n/**\n * Renders a list of notices.\n *\n * ```jsx\n * const MySnackbarListNotice = () => (\n * <SnackbarList\n * notices={ notices }\n * onRemove={ removeNotice }\n * />\n * );\n * ```\n */\nexport function SnackbarList( {\n\tnotices,\n\tclassName,\n\tchildren,\n\tonRemove,\n}: WordPressComponentProps< SnackbarListProps, 'div' > ) {\n\tconst listRef = useRef< HTMLDivElement | null >( null );\n\tconst isReducedMotion = useReducedMotion();\n\tclassName = clsx( 'components-snackbar-list', className );\n\tconst removeNotice =\n\t\t( notice: SnackbarListProps[ 'notices' ][ number ] ) => () =>\n\t\t\tonRemove?.( notice.id );\n\treturn (\n\t\t<div\n\t\t\tclassName={ className }\n\t\t\ttabIndex={ -1 }\n\t\t\tref={ listRef }\n\t\t\tdata-testid=\"snackbar-list\"\n\t\t>\n\t\t\t{ children }\n\t\t\t<AnimatePresence>\n\t\t\t\t{ notices.map( ( notice ) => {\n\t\t\t\t\tconst { content, ...restNotice } = notice;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tlayout={ ! isReducedMotion } // See https://www.framer.com/docs/animation/#layout-animations\n\t\t\t\t\t\t\tinitial=\"init\"\n\t\t\t\t\t\t\tanimate=\"open\"\n\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\t\t\tvariants={\n\t\t\t\t\t\t\t\tisReducedMotion ? undefined : SNACKBAR_VARIANTS\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"components-snackbar-list__notice-container\">\n\t\t\t\t\t\t\t\t<Snackbar\n\t\t\t\t\t\t\t\t\t{ ...restNotice }\n\t\t\t\t\t\t\t\t\tonRemove={ removeNotice( notice ) }\n\t\t\t\t\t\t\t\t\tlistRef={ listRef }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ notice.content }\n\t\t\t\t\t\t\t\t</Snackbar>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</AnimatePresence>\n\t\t</div>\n\t);\n}\n\nexport default SnackbarList;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,MAAM,QAAQ,oBAAoB;;AAE3C;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,GAAG;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MAAM,CAACC,EAAG,CAAC;EACzB,oBACCrB,KAAA;IACCc,SAAS,EAAGA,SAAW;IACvBQ,QAAQ,EAAG,CAAC,CAAG;IACfC,GAAG,EAAGN,OAAS;IACf,eAAY,eAAe;IAAAF,QAAA,GAEzBA,QAAQ,eACVjB,IAAA,CAACF,eAAe;MAAAmB,QAAA,EACbF,OAAO,CAACW,GAAG,CAAIJ,MAAM,IAAM;QAC5B,MAAM;UAAEK,OAAO;UAAE,GAAGC;QAAW,CAAC,GAAGN,MAAM;QAEzC,oBACCtB,IAAA,CAACJ,MAAM,CAACiC,GAAG;UACVC,MAAM,EAAG,CAAEV,eAAiB,CAAC;UAAA;UAC7BW,OAAO,EAAC,MAAM;UACdC,OAAO,EAAC,MAAM;UACdnB,IAAI,EAAC,MAAM;UAEXoB,QAAQ,EACPb,eAAe,GAAGc,SAAS,GAAG/B,iBAC9B;UAAAc,QAAA,eAEDjB,IAAA;YAAKgB,SAAS,EAAC,4CAA4C;YAAAC,QAAA,eAC1DjB,IAAA,CAACN,QAAQ;cAAA,GACHkC,UAAU;cACfV,QAAQ,EAAGG,YAAY,CAAEC,MAAO,CAAG;cACnCH,OAAO,EAAGA,OAAS;cAAAF,QAAA,EAEjBK,MAAM,CAACK;YAAO,CACP;UAAC,CACP;QAAC,GAbAL,MAAM,CAACC,EAcF,CAAC;MAEf,CAAE;IAAC,CACa,CAAC;EAAA,CACd,CAAC;AAER;AAEA,eAAeT,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useReducedMotion","useRef","Snackbar","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","jsx","_jsx","jsxs","_jsxs","SNACKBAR_VARIANTS","init","height","opacity","open","transition","type","duration","ease","delay","exit","SnackbarList","notices","className","children","onRemove","listRef","isReducedMotion","removeNotice","notice","id","tabIndex","ref","map","content","restNotice","div","layout","initial","animate","variants","undefined"],"sources":["@wordpress/components/src/snackbar/list.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Snackbar from '.';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '../animation';\nimport type { SnackbarListProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst SNACKBAR_VARIANTS = {\n\tinit: {\n\t\theight: 0,\n\t\topacity: 0,\n\t},\n\topen: {\n\t\theight: 'auto',\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\theight: { type: 'tween', duration: 0.3, ease: [ 0, 0, 0.2, 1 ] },\n\t\t\topacity: {\n\t\t\t\ttype: 'tween',\n\t\t\t\tduration: 0.25,\n\t\t\t\tdelay: 0.05,\n\t\t\t\tease: [ 0, 0, 0.2, 1 ],\n\t\t\t},\n\t\t},\n\t},\n\texit: {\n\t\topacity: 0,\n\t\ttransition: {\n\t\t\ttype: 'tween',\n\t\t\tduration: 0.1,\n\t\t\tease: [ 0, 0, 0.2, 1 ],\n\t\t},\n\t},\n};\n\n/**\n * Renders a list of notices.\n *\n * ```jsx\n * const MySnackbarListNotice = () => (\n * <SnackbarList\n * notices={ notices }\n * onRemove={ removeNotice }\n * />\n * );\n * ```\n */\nexport function SnackbarList( {\n\tnotices,\n\tclassName,\n\tchildren,\n\tonRemove,\n}: WordPressComponentProps< SnackbarListProps, 'div' > ) {\n\tconst listRef = useRef< HTMLDivElement | null >( null );\n\tconst isReducedMotion = useReducedMotion();\n\tclassName = clsx( 'components-snackbar-list', className );\n\tconst removeNotice =\n\t\t( notice: SnackbarListProps[ 'notices' ][ number ] ) => () =>\n\t\t\tonRemove?.( notice.id );\n\treturn (\n\t\t<div\n\t\t\tclassName={ className }\n\t\t\ttabIndex={ -1 }\n\t\t\tref={ listRef }\n\t\t\tdata-testid=\"snackbar-list\"\n\t\t>\n\t\t\t{ children }\n\t\t\t<AnimatePresence>\n\t\t\t\t{ notices.map( ( notice ) => {\n\t\t\t\t\tconst { content, ...restNotice } = notice;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tlayout={ ! isReducedMotion } // See https://www.framer.com/docs/animation/#layout-animations\n\t\t\t\t\t\t\tinitial=\"init\"\n\t\t\t\t\t\t\tanimate=\"open\"\n\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\t\t\tvariants={\n\t\t\t\t\t\t\t\tisReducedMotion ? undefined : SNACKBAR_VARIANTS\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"components-snackbar-list__notice-container\">\n\t\t\t\t\t\t\t\t<Snackbar\n\t\t\t\t\t\t\t\t\t{ ...restNotice }\n\t\t\t\t\t\t\t\t\tonRemove={ removeNotice( notice ) }\n\t\t\t\t\t\t\t\t\tlistRef={ listRef }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ notice.content }\n\t\t\t\t\t\t\t\t</Snackbar>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</AnimatePresence>\n\t\t</div>\n\t);\n}\n\nexport default SnackbarList;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,MAAM,QAAQ,oBAAoB;;AAE3C;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,GAAG;AACxB,SACCC,gBAAgB,IAAIC,MAAM,EAC1BC,yBAAyB,IAAIC,eAAe,QACtC,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAItB,MAAMC,iBAAiB,GAAG;EACzBC,IAAI,EAAE;IACLC,MAAM,EAAE,CAAC;IACTC,OAAO,EAAE;EACV,CAAC;E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IJ,MAAM,IAAM;QAC5B,MAAM;UAAEK,OAAO;UAAE,GAAGC;QAAW,CAAC,GAAGN,MAAM;QAEzC,oBACCtB,IAAA,CAACJ,MAAM,CAACiC,GAAG;UACVC,MAAM,EAAG,CAAEV,eAAiB,CAAC;UAAA;UAC7BW,OAAO,EAAC,MAAM;UACdC,OAAO,EAAC,MAAM;UACdnB,IAAI,EAAC,MAAM;UAEXoB,QAAQ,EACPb,eAAe,GAAGc,SAAS,GAAG/B,iBAC9B;UAAAc,QAAA,eAEDjB,IAAA;YAAKgB,SAAS,EAAC,4CAA4C;YAAAC,QAAA,eAC1DjB,IAAA,CAACN,QAAQ;cAAA,GACHkC,UAAU;cACfV,QAAQ,EAAGG,YAAY,CAAEC,MAAO,CAAG;cACnCH,OAAO,EAAGA,OAAS;cAAAF,QAAA,EAEjBK,MAAM,CAACK;YAAO,CACP;UAAC,CACP;QAAC,GAbAL,MAAM,CAACC,EAcF,CAAC;MAEf,CAAE;IAAC,CACa,CAAC;EAAA,CACd,CAAC;AAER;AAEA,eAAeT,YAAY","ignoreList":[]}
@@ -10,8 +10,7 @@ import { StyledSpinner, SpinnerTrack, SpinnerIndicator } from './styles';
10
10
  * WordPress dependencies
11
11
  */
12
12
  import { forwardRef } from '@wordpress/element';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
14
  export function UnforwardedSpinner({
16
15
  className,
17
16
  ...props
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","StyledSpinner","SpinnerTrack","SpinnerIndicator","forwardRef","jsx","_jsx","jsxs","_jsxs","UnforwardedSpinner","className","props","forwardedRef","viewBox","width","height","xmlns","role","focusable","ref","children","cx","cy","r","vectorEffect","d","Spinner"],"sources":["@wordpress/components/src/spinner/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { StyledSpinner, SpinnerTrack, SpinnerIndicator } from './styles';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\nexport function UnforwardedSpinner(\n\t{ className, ...props }: WordPressComponentProps< {}, 'svg', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\treturn (\n\t\t<StyledSpinner\n\t\t\tclassName={ clsx( 'components-spinner', className ) }\n\t\t\tviewBox=\"0 0 100 100\"\n\t\t\twidth=\"16\"\n\t\t\theight=\"16\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\trole=\"presentation\"\n\t\t\tfocusable=\"false\"\n\t\t\t{ ...props }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ /* Gray circular background */ }\n\t\t\t<SpinnerTrack\n\t\t\t\tcx=\"50\"\n\t\t\t\tcy=\"50\"\n\t\t\t\tr=\"50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\n\t\t\t{ /* Theme-colored arc */ }\n\t\t\t<SpinnerIndicator\n\t\t\t\td=\"m 50 0 a 50 50 0 0 1 50 50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\t\t</StyledSpinner>\n\t);\n}\n/**\n * `Spinner` is a component used to notify users that their action is being processed.\n *\n * ```js\n * import { Spinner } from '@wordpress/components';\n *\n * function Example() {\n * return <Spinner />;\n * }\n * ```\n */\nexport const Spinner = forwardRef( UnforwardedSpinner );\nexport default Spinner;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAGvB;AACA;AACA;AACA,SAASC,aAAa,EAAEC,YAAY,EAAEC,gBAAgB,QAAQ,UAAU;AAGxE;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEhD,OAAO,SAASC,kBAAkBA,CACjC;EAAEC,SAAS;EAAE,GAAGC;AAAmD,CAAC,EACpEC,YAAiC,EAChC;EACD,oBACCJ,KAAA,CAACP,aAAa;IACbS,SAAS,EAAGV,IAAI,CAAE,oBAAoB,EAAEU,SAAU,CAAG;IACrDG,OAAO,EAAC,aAAa;IACrBC,KAAK,EAAC,IAAI;IACVC,MAAM,EAAC,IAAI;IACXC,KAAK,EAAC,4BAA4B;IAClCC,IAAI,EAAC,cAAc;IACnBC,SAAS,EAAC,OAAO;IAAA,GACZP,KAAK;IACVQ,GAAG,EAAGP,YAAc;IAAAQ,QAAA,gBAGpBd,IAAA,CAACJ,YAAY;MACZmB,EAAE,EAAC,IAAI;MACPC,EAAE,EAAC,IAAI;MACPC,CAAC,EAAC,IAAI;MACNC,YAAY,EAAC;IAAoB,CACjC,CAAC,eAGFlB,IAAA,CAACH,gBAAgB;MAChBsB,CAAC,EAAC,4BAA4B;MAC9BD,YAAY,EAAC;IAAoB,CACjC,CAAC;EAAA,CACY,CAAC;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,OAAO,GAAGtB,UAAU,CAAEK,kBAAmB,CAAC;AACvD,eAAeiB,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["clsx","StyledSpinner","SpinnerTrack","SpinnerIndicator","forwardRef","jsx","_jsx","jsxs","_jsxs","UnforwardedSpinner","className","props","forwardedRef","viewBox","width","height","xmlns","role","focusable","ref","children","cx","cy","r","vectorEffect","d","Spinner"],"sources":["@wordpress/components/src/spinner/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { StyledSpinner, SpinnerTrack, SpinnerIndicator } from './styles';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\nexport function UnforwardedSpinner(\n\t{ className, ...props }: WordPressComponentProps< {}, 'svg', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\treturn (\n\t\t<StyledSpinner\n\t\t\tclassName={ clsx( 'components-spinner', className ) }\n\t\t\tviewBox=\"0 0 100 100\"\n\t\t\twidth=\"16\"\n\t\t\theight=\"16\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\trole=\"presentation\"\n\t\t\tfocusable=\"false\"\n\t\t\t{ ...props }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ /* Gray circular background */ }\n\t\t\t<SpinnerTrack\n\t\t\t\tcx=\"50\"\n\t\t\t\tcy=\"50\"\n\t\t\t\tr=\"50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\n\t\t\t{ /* Theme-colored arc */ }\n\t\t\t<SpinnerIndicator\n\t\t\t\td=\"m 50 0 a 50 50 0 0 1 50 50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\t\t</StyledSpinner>\n\t);\n}\n/**\n * `Spinner` is a component used to notify users that their action is being processed.\n *\n * ```js\n * import { Spinner } from '@wordpress/components';\n *\n * function Example() {\n * return <Spinner />;\n * }\n * ```\n */\nexport const Spinner = forwardRef( UnforwardedSpinner );\nexport default Spinner;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAGvB;AACA;AACA;AACA,SAASC,aAAa,EAAEC,YAAY,EAAEC,gBAAgB,QAAQ,UAAU;AAGxE;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhD,OAAO,SAASC,kBAAkBA,CACjC;EAAEC,SAAS;EAAE,GAAGC;AAAmD,CAAC,EACpEC,YAAiC,EAChC;EACD,oBACCJ,KAAA,CAACP,aAAa;IACbS,SAAS,EAAGV,IAAI,CAAE,oBAAoB,EAAEU,SAAU,CAAG;IACrDG,OAAO,EAAC,aAAa;IACrBC,KAAK,EAAC,IAAI;IACVC,MAAM,EAAC,IAAI;IACXC,KAAK,EAAC,4BAA4B;IAClCC,IAAI,EAAC,cAAc;IACnBC,SAAS,EAAC,OAAO;IAAA,GACZP,KAAK;IACVQ,GAAG,EAAGP,YAAc;IAAAQ,QAAA,gBAGpBd,IAAA,CAACJ,YAAY;MACZmB,EAAE,EAAC,IAAI;MACPC,EAAE,EAAC,IAAI;MACPC,CAAC,EAAC,IAAI;MACNC,YAAY,EAAC;IAAoB,CACjC,CAAC,eAGFlB,IAAA,CAACH,gBAAgB;MAChBsB,CAAC,EAAC,4BAA4B;MAC9BD,YAAY,EAAC;IAAoB,CACjC,CAAC;EAAA,CACY,CAAC;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,OAAO,GAAGtB,UAAU,CAAEK,kBAAmB,CAAC;AACvD,eAAeiB,OAAO","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["css","keyframes","COLORS","CONFIG","spinAnimation","StyledSpinner","_styled","process","env","NODE_ENV","target","label","spinnerSize","theme","accent","commonPathProps","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","SpinnerTrack","gray","SpinnerIndicator"],"sources":["@wordpress/components/src/spinner/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css, keyframes } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\nconst spinAnimation = keyframes`\n\tfrom {\n\t\ttransform: rotate(0deg);\n\t}\n\tto {\n\t\ttransform: rotate(360deg);\n\t}\n `;\n\nexport const StyledSpinner = styled.svg`\n\twidth: ${ CONFIG.spinnerSize }px;\n\theight: ${ CONFIG.spinnerSize }px;\n\tdisplay: inline-block;\n\tmargin: 5px 11px 0;\n\tposition: relative;\n\tcolor: ${ COLORS.theme.accent };\n\toverflow: visible;\n\topacity: 1;\n\tbackground-color: transparent;\n`;\n\nconst commonPathProps = css`\n\tfill: transparent;\n\tstroke-width: 1.5px;\n`;\n\nexport const SpinnerTrack = styled.circle`\n\t${ commonPathProps };\n\tstroke: ${ COLORS.gray[ 300 ] };\n`;\n\nexport const SpinnerIndicator = styled.path`\n\t${ commonPathProps };\n\tstroke: currentColor;\n\tstroke-linecap: round;\n\ttransform-origin: 50% 50%;\n\tanimation: 1.4s linear infinite both ${ spinAnimation };\n`;\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,SAASA,GAAG,EAAEC,SAAS,QAAQ,gBAAgB;;AAE/C;AACA;AACA;AACA,SAASC,MAAM,EAAEC,MAAM,QAAQ,UAAU;AAEzC,MAAMC,aAAa,GAAGH,SAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AAEF,OAAO,MAAMI,aAAa,gBAAAC,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,aACfR,MAAM,CAACS,WAAW,gBACjBT,MAAM,CAACS,WAAW,wEAInBV,MAAM,CAACW,KAAK,CAACC,MAAM,iEAAAP,OAAA,CAAAC,GAAA,CAAAC,QAAA,wsDAI7B;AAED,MAAMM,eAAe,GAAAR,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAO,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAGpB;AAED,OAAO,MAAMC,YAAY,gBAAAf,OAAA,WAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GACrBI,eAAe,cACPb,MAAM,CAACoB,IAAI,CAAE,GAAG,CAAE,SAAAf,OAAA,CAAAC,GAAA,CAAAC,QAAA,wsDAC7B;AAED,OAAO,MAAMc,gBAAgB,gBAAAjB,OAAA,SAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GACzBI,eAAe,6GAIsBX,aAAa,SAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA,wsDACrD","ignoreList":[]}
1
+ {"version":3,"names":["css","keyframes","COLORS","CONFIG","spinAnimation","StyledSpinner","_styled","process","env","NODE_ENV","target","label","spinnerSize","theme","accent","commonPathProps","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","SpinnerTrack","gray","SpinnerIndicator"],"sources":["@wordpress/components/src/spinner/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css, keyframes } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\nconst spinAnimation = keyframes`\n\tfrom {\n\t\ttransform: rotate(0deg);\n\t}\n\tto {\n\t\ttransform: rotate(360deg);\n\t}\n `;\n\nexport const StyledSpinner = styled.svg`\n\twidth: ${ CONFIG.spinnerSize }px;\n\theight: ${ CONFIG.spinnerSize }px;\n\tdisplay: inline-block;\n\tmargin: 5px 11px 0;\n\tposition: relative;\n\tcolor: ${ COLORS.theme.accent };\n\toverflow: visible;\n\topacity: 1;\n\tbackground-color: transparent;\n`;\n\nconst commonPathProps = css`\n\tfill: transparent;\n\tstroke-width: 1.5px;\n`;\n\nexport const SpinnerTrack = styled.circle`\n\t${ commonPathProps };\n\tstroke: ${ COLORS.gray[ 300 ] };\n`;\n\nexport const SpinnerIndicator = styled.path`\n\t${ commonPathProps };\n\tstroke: currentColor;\n\tstroke-linecap: round;\n\ttransform-origin: 50% 50%;\n\tanimation: 1.4s linear infinite both ${ spinAnimation };\n`;\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,SAASA,GAAG,EAAEC,SAAS,QAAQ,gBAAgB;;AAE/C;AACA;AACA;AACA,SAASC,MAAM,EAAEC,MAAM,QAAQ,UAAU;AAEzC,MAAMC,aAAa,GAAGH,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AAEF,OAAO,MAAMI,aAAa,gBAAAC,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,aACfR,MAAM,CAACS,WAAW,gBACjBT,MAAM,CAACS,WAAW,wEAInBV,MAAM,CAACW,KAAK,CAACC,MAAM,iEAAAP,OAAA,CAAAC,GAAA,CAAAC,QAAA,wsDAI7B;AAED,MAAMM,eAAe,GAAAR,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAO,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAGpB;AAED,OAAO,MAAMC,YAAY,gBAAAf,OAAA,WAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GACrBI,eAAe,cACPb,MAAM,CAACoB,IAAI,CAAE,GAAG,CAAE,SAAAf,OAAA,CAAAC,GAAA,CAAAC,QAAA,wsDAC7B;AAED,OAAO,MAAMc,gBAAgB,gBAAAjB,OAAA,SAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GACzBI,eAAe,6GAIsBX,aAAa,SAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA,wsDACrD","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * External dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["CacheProvider","createCache","uuid","jsx","_jsx","uuidCache","Set","containerCacheMap","WeakMap","memoizedCreateCacheWithContainer","container","has","get","key","v4","replace","add","cache","set","StyleProvider","props","children","document","head","value"],"sources":["@wordpress/components/src/style-provider/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nimport * as uuid from 'uuid';\n\n/**\n * Internal dependencies\n */\nimport type { StyleProviderProps } from './types';\n\nconst uuidCache = new Set();\n// Use a weak map so that when the container is detached it's automatically\n// dereferenced to avoid memory leak.\nconst containerCacheMap = new WeakMap();\n\nconst memoizedCreateCacheWithContainer = ( container: HTMLElement ) => {\n\tif ( containerCacheMap.has( container ) ) {\n\t\treturn containerCacheMap.get( container );\n\t}\n\n\t// Emotion only accepts alphabetical and hyphenated keys so we just\n\t// strip the numbers from the UUID. It _should_ be fine.\n\tlet key = uuid.v4().replace( /[0-9]/g, '' );\n\twhile ( uuidCache.has( key ) ) {\n\t\tkey = uuid.v4().replace( /[0-9]/g, '' );\n\t}\n\tuuidCache.add( key );\n\n\tconst cache = createCache( { container, key } );\n\tcontainerCacheMap.set( container, cache );\n\treturn cache;\n};\n\nexport function StyleProvider( props: StyleProviderProps ) {\n\tconst { children, document } = props;\n\n\tif ( ! document ) {\n\t\treturn null;\n\t}\n\n\tconst cache = memoizedCreateCacheWithContainer( document.head );\n\n\treturn <CacheProvider value={ cache }>{ children }</CacheProvider>;\n}\n\nexport default StyleProvider;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,gBAAgB;AAC9C,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAO,KAAKC,IAAI,MAAM,MAAM;;AAE5B;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAKA,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAC,CAAC;AAC3B;AACA;AACA,MAAMC,iBAAiB,GAAG,IAAIC,OAAO,CAAC,CAAC;AAEvC,MAAMC,gCAAgC,GAAKC,SAAsB,IAAM;EACtE,IAAKH,iBAAiB,CAACI,GAAG,CAAED,SAAU,CAAC,EAAG;IACzC,OAAOH,iBAAiB,CAACK,GAAG,CAAEF,SAAU,CAAC;EAC1C;;EAEA;EACA;EACA,IAAIG,GAAG,GAAGX,IAAI,CAACY,EAAE,CAAC,CAAC,CAACC,OAAO,CAAE,QAAQ,EAAE,EAAG,CAAC;EAC3C,OAAQV,SAAS,CAACM,GAAG,CAAEE,GAAI,CAAC,EAAG;IAC9BA,GAAG,GAAGX,IAAI,CAACY,EAAE,CAAC,CAAC,CAACC,OAAO,CAAE,QAAQ,EAAE,EAAG,CAAC;EACxC;EACAV,SAAS,CAACW,GAAG,CAAEH,GAAI,CAAC;EAEpB,MAAMI,KAAK,GAAGhB,WAAW,CAAE;IAAES,SAAS;IAAEG;EAAI,CAAE,CAAC;EAC/CN,iBAAiB,CAACW,GAAG,CAAER,SAAS,EAAEO,KAAM,CAAC;EACzC,OAAOA,KAAK;AACb,CAAC;AAED,OAAO,SAASE,aAAaA,CAAEC,KAAyB,EAAG;EAC1D,MAAM;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAEpC,IAAK,CAAEE,QAAQ,EAAG;IACjB,OAAO,IAAI;EACZ;EAEA,MAAML,KAAK,GAAGR,gCAAgC,CAAEa,QAAQ,CAACC,IAAK,CAAC;EAE/D,oBAAOnB,IAAA,CAACJ,aAAa;IAACwB,KAAK,EAAGP,KAAO;IAAAI,QAAA,EAAGA;EAAQ,CAAiB,CAAC;AACnE;AAEA,eAAeF,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["CacheProvider","createCache","uuid","jsx","_jsx","uuidCache","Set","containerCacheMap","WeakMap","memoizedCreateCacheWithContainer","container","has","get","key","v4","replace","add","cache","set","StyleProvider","props","children","document","head","value"],"sources":["@wordpress/components/src/style-provider/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nimport * as uuid from 'uuid';\n\n/**\n * Internal dependencies\n */\nimport type { StyleProviderProps } from './types';\n\nconst uuidCache = new Set();\n// Use a weak map so that when the container is detached it's automatically\n// dereferenced to avoid memory leak.\nconst containerCacheMap = new WeakMap();\n\nconst memoizedCreateCacheWithContainer = ( container: HTMLElement ) => {\n\tif ( containerCacheMap.has( container ) ) {\n\t\treturn containerCacheMap.get( container );\n\t}\n\n\t// Emotion only accepts alphabetical and hyphenated keys so we just\n\t// strip the numbers from the UUID. It _should_ be fine.\n\tlet key = uuid.v4().replace( /[0-9]/g, '' );\n\twhile ( uuidCache.has( key ) ) {\n\t\tkey = uuid.v4().replace( /[0-9]/g, '' );\n\t}\n\tuuidCache.add( key );\n\n\tconst cache = createCache( { container, key } );\n\tcontainerCacheMap.set( container, cache );\n\treturn cache;\n};\n\nexport function StyleProvider( props: StyleProviderProps ) {\n\tconst { children, document } = props;\n\n\tif ( ! document ) {\n\t\treturn null;\n\t}\n\n\tconst cache = memoizedCreateCacheWithContainer( document.head );\n\n\treturn <CacheProvider value={ cache }>{ children }</CacheProvider>;\n}\n\nexport default StyleProvider;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,gBAAgB;AAC9C,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAO,KAAKC,IAAI,MAAM,MAAM;;AAE5B;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAKA,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAC,CAAC;AAC3B;AACA;AACA,MAAMC,iBAAiB,GAAG,IAAIC,OAAO,CAAC,CAAC;AAEvC,MAAMC,gCAAgC,GAAKC,SAAsB,IAAM;EACtE,IAAKH,iBAAiB,CAACI,GAAG,CAAED,SAAU,CAAC,EAAG;IACzC,OAAOH,iBAAiB,CAACK,GAAG,CAAEF,SAAU,CAAC;EAC1C;;EAEA;EACA;EACA,IAAIG,GAAG,GAAGX,IAAI,CAACY,EAAE,CAAC,CAAC,CAACC,OAAO,CAAE,QAAQ,EAAE,EAAG,CAAC;EAC3C,OAAQV,SAAS,CAACM,GAAG,CAAEE,GAAI,CAAC,EAAG;IAC9BA,GAAG,GAAGX,IAAI,CAACY,EAAE,CAAC,CAAC,CAACC,OAAO,CAAE,QAAQ,EAAE,EAAG,CAAC;EACxC;EACAV,SAAS,CAACW,GAAG,CAAEH,GAAI,CAAC;EAEpB,MAAMI,KAAK,GAAGhB,WAAW,CAAE;IAAES,SAAS;IAAEG;EAAI,CAAE,CAAC;EAC/CN,iBAAiB,CAACW,GAAG,CAAER,SAAS,EAAEO,KAAM,CAAC;EACzC,OAAOA,KAAK;AACb,CAAC;AAED,OAAO,SAASE,aAAaA,CAAEC,KAAyB,EAAG;EAC1D,MAAM;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAEpC,IAAK,CAAEE,QAAQ,EAAG;IACjB,OAAO,IAAI;EACZ;EAEA,MAAML,KAAK,GAAGR,gCAAgC,CAAEa,QAAQ,CAACC,IAAK,CAAC;EAE/D,oBAAOnB,IAAA,CAACJ,aAAa;IAACwB,KAAK,EAAGP,KAAO;IAAAI,QAAA,EAAGA;EAAQ,CAAiB,CAAC;AACnE;AAEA,eAAeF,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","useContextSystem","styles","useCx","useSurface","props","backgroundSize","borderBottom","borderLeft","borderRight","borderTop","className","variant","otherProps","cx","classes","sx","borders","getBorders","Surface","getVariant"],"sources":["@wordpress/components/src/surface/hook.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { SurfaceProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport function useSurface(\n\tprops: WordPressComponentProps< SurfaceProps, 'div' >\n) {\n\tconst {\n\t\tbackgroundSize = 12,\n\t\tborderBottom = false,\n\t\tborderLeft = false,\n\t\tborderRight = false,\n\t\tborderTop = false,\n\t\tclassName,\n\t\tvariant = 'primary',\n\t\t...otherProps\n\t} = useContextSystem( props, 'Surface' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst sx = {\n\t\t\tborders: styles.getBorders( {\n\t\t\t\tborderBottom,\n\t\t\t\tborderLeft,\n\t\t\t\tborderRight,\n\t\t\t\tborderTop,\n\t\t\t} ),\n\t\t};\n\n\t\treturn cx(\n\t\t\tstyles.Surface,\n\t\t\tsx.borders,\n\t\t\tstyles.getVariant(\n\t\t\t\tvariant,\n\t\t\t\t`${ backgroundSize }px`,\n\t\t\t\t`${ backgroundSize - 1 }px`\n\t\t\t),\n\t\t\tclassName\n\t\t);\n\t}, [\n\t\tbackgroundSize,\n\t\tborderBottom,\n\t\tborderLeft,\n\t\tborderRight,\n\t\tborderTop,\n\t\tclassName,\n\t\tcx,\n\t\tvariant,\n\t] );\n\n\treturn { ...otherProps, className: classes };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,SAASC,KAAK,QAAQ,uBAAuB;AAI7C,OAAO,SAASC,UAAUA,CACzBC,KAAqD,EACpD;EACD,MAAM;IACLC,cAAc,GAAG,EAAE;IACnBC,YAAY,GAAG,KAAK;IACpBC,UAAU,GAAG,KAAK;IAClBC,WAAW,GAAG,KAAK;IACnBC,SAAS,GAAG,KAAK;IACjBC,SAAS;IACTC,OAAO,GAAG,SAAS;IACnB,GAAGC;EACJ,CAAC,GAAGZ,gBAAgB,CAAEI,KAAK,EAAE,SAAU,CAAC;EAExC,MAAMS,EAAE,GAAGX,KAAK,CAAC,CAAC;EAElB,MAAMY,OAAO,GAAGf,OAAO,CAAE,MAAM;IAC9B,MAAMgB,EAAE,GAAG;MACVC,OAAO,EAAEf,MAAM,CAACgB,UAAU,CAAE;QAC3BX,YAAY;QACZC,UAAU;QACVC,WAAW;QACXC;MACD,CAAE;IACH,CAAC;IAED,OAAOI,EAAE,CACRZ,MAAM,CAACiB,OAAO,EACdH,EAAE,CAACC,OAAO,EACVf,MAAM,CAACkB,UAAU,CAChBR,OAAO,EACN,GAAGN,cAAgB,IAAG,EACtB,GAAGA,cAAc,GAAG,CAAG,IACzB,CAAC,EACDK,SACD,CAAC;EACF,CAAC,EAAE,CACFL,cAAc,EACdC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,SAAS,EACTG,EAAE,EACFF,OAAO,CACN,CAAC;EAEH,OAAO;IAAE,GAAGC,UAAU;IAAEF,SAAS,EAAEI;EAAQ,CAAC;AAC7C","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","useContextSystem","styles","useCx","useSurface","props","backgroundSize","borderBottom","borderLeft","borderRight","borderTop","className","variant","otherProps","cx","classes","sx","borders","getBorders","Surface","getVariant"],"sources":["@wordpress/components/src/surface/hook.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { SurfaceProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport function useSurface(\n\tprops: WordPressComponentProps< SurfaceProps, 'div' >\n) {\n\tconst {\n\t\tbackgroundSize = 12,\n\t\tborderBottom = false,\n\t\tborderLeft = false,\n\t\tborderRight = false,\n\t\tborderTop = false,\n\t\tclassName,\n\t\tvariant = 'primary',\n\t\t...otherProps\n\t} = useContextSystem( props, 'Surface' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst sx = {\n\t\t\tborders: styles.getBorders( {\n\t\t\t\tborderBottom,\n\t\t\t\tborderLeft,\n\t\t\t\tborderRight,\n\t\t\t\tborderTop,\n\t\t\t} ),\n\t\t};\n\n\t\treturn cx(\n\t\t\tstyles.Surface,\n\t\t\tsx.borders,\n\t\t\tstyles.getVariant(\n\t\t\t\tvariant,\n\t\t\t\t`${ backgroundSize }px`,\n\t\t\t\t`${ backgroundSize - 1 }px`\n\t\t\t),\n\t\t\tclassName\n\t\t);\n\t}, [\n\t\tbackgroundSize,\n\t\tborderBottom,\n\t\tborderLeft,\n\t\tborderRight,\n\t\tborderTop,\n\t\tclassName,\n\t\tcx,\n\t\tvariant,\n\t] );\n\n\treturn { ...otherProps, className: classes };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,SAASC,KAAK,QAAQ,uBAAuB;AAI7C,OAAO,SAASC,UAAUA,CACzBC,KAAqD,EACpD;EACD,MAAM;IACLC,cAAc,GAAG,EAAE;IACnBC,YAAY,GAAG,KAAK;IACpBC,UAAU,GAAG,KAAK;IAClBC,WAAW,GAAG,KAAK;IACnBC,SAAS,GAAG,KAAK;IACjBC,SAAS;IACTC,OAAO,GAAG,SAAS;IACnB,GAAGC;EACJ,CAAC,GAAGZ,gBAAgB,CAAEI,KAAK,EAAE,SAAU,CAAC;EAExC,MAAMS,EAAE,GAAGX,KAAK,CAAC,CAAC;EAElB,MAAMY,OAAO,GAAGf,OAAO,CAAE,MAAM;IAC9B,MAAMgB,EAAE,GAAG;MACVC,OAAO,EAAEf,MAAM,CAACgB,UAAU,CAAE;QAC3BX,YAAY;QACZC,UAAU;QACVC,WAAW;QACXC;MACD,CAAE;IACH,CAAC;IAED,OAAOI,EAAE,CACRZ,MAAM,CAACiB,OAAO,EACdH,EAAE,CAACC,OAAO,EACVf,MAAM,CAACkB,UAAU,CAChBR,OAAO,EACP,GAAIN,cAAc,IAAK,EACvB,GAAIA,cAAc,GAAG,CAAC,IACvB,CAAC,EACDK,SACD,CAAC;EACF,CAAC,EAAE,CACFL,cAAc,EACdC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,SAAS,EACTG,EAAE,EACFF,OAAO,CACN,CAAC;EAEH,OAAO;IAAE,GAAGC,UAAU;IAAEF,SAAS,EAAEI;EAAQ,CAAC;AAC7C","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["css","CONFIG","COLORS","Surface","surfaceColor","gray","process","env","NODE_ENV","background","surfaceBackgroundColor","getBorders","borderBottom","borderLeft","borderRight","borderTop","borderStyle","surfaceBorderColor","undefined","primary","secondary","surfaceBackgroundTintColor","tertiary","surfaceBackgroundTertiaryColor","customBackgroundSize","surfaceBackgroundSize","join","dottedBackground1","surfaceBackgroundSizeDotted","dottedBackground2","dottedBackgroundCombined","surfaceBorderBoldColor","getDotted","gridBackground1","surfaceBorderSubtleColor","gridBackground2","gridBackgroundCombined","getGrid","getVariant","variant"],"sources":["@wordpress/components/src/surface/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG, COLORS } from '../utils';\nimport type { SurfaceVariant, SurfaceProps } from './types';\n\nexport const Surface = css`\n\tbackground-color: ${ CONFIG.surfaceColor };\n\tcolor: ${ COLORS.gray[ 900 ] };\n\tposition: relative;\n`;\n\nexport const background = css`\n\tbackground-color: ${ CONFIG.surfaceBackgroundColor };\n`;\n\nexport function getBorders( {\n\tborderBottom,\n\tborderLeft,\n\tborderRight,\n\tborderTop,\n}: Pick<\n\tSurfaceProps,\n\t'borderBottom' | 'borderLeft' | 'borderRight' | 'borderTop'\n> ) {\n\tconst borderStyle = `1px solid ${ CONFIG.surfaceBorderColor }`;\n\n\treturn css( {\n\t\tborderBottom: borderBottom ? borderStyle : undefined,\n\t\tborderLeft: borderLeft ? borderStyle : undefined,\n\t\tborderRight: borderRight ? borderStyle : undefined,\n\t\tborderTop: borderTop ? borderStyle : undefined,\n\t} );\n}\n\nexport const primary = css``;\n\nexport const secondary = css`\n\tbackground: ${ CONFIG.surfaceBackgroundTintColor };\n`;\n\nexport const tertiary = css`\n\tbackground: ${ CONFIG.surfaceBackgroundTertiaryColor };\n`;\n\nconst customBackgroundSize = ( surfaceBackgroundSize: string ) =>\n\t[ surfaceBackgroundSize, surfaceBackgroundSize ].join( ' ' );\n\nconst dottedBackground1 = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t'90deg',\n\t\t[ CONFIG.surfaceBackgroundColor, surfaceBackgroundSizeDotted ].join(\n\t\t\t' '\n\t\t),\n\t\t'transparent 1%',\n\t].join( ',' );\n\nconst dottedBackground2 = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t[ CONFIG.surfaceBackgroundColor, surfaceBackgroundSizeDotted ].join(\n\t\t\t' '\n\t\t),\n\t\t'transparent 1%',\n\t].join( ',' );\n\nconst dottedBackgroundCombined = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t`linear-gradient( ${ dottedBackground1(\n\t\t\tsurfaceBackgroundSizeDotted\n\t\t) } ) center`,\n\t\t`linear-gradient( ${ dottedBackground2(\n\t\t\tsurfaceBackgroundSizeDotted\n\t\t) } ) center`,\n\t\tCONFIG.surfaceBorderBoldColor,\n\t].join( ',' );\n\nexport const getDotted = (\n\tsurfaceBackgroundSize: string,\n\tsurfaceBackgroundSizeDotted: string\n) => css`\n\tbackground: ${ dottedBackgroundCombined( surfaceBackgroundSizeDotted ) };\n\tbackground-size: ${ customBackgroundSize( surfaceBackgroundSize ) };\n`;\n\nconst gridBackground1 = [\n\t`${ CONFIG.surfaceBorderSubtleColor } 1px`,\n\t'transparent 1px',\n].join( ',' );\n\nconst gridBackground2 = [\n\t'90deg',\n\t`${ CONFIG.surfaceBorderSubtleColor } 1px`,\n\t'transparent 1px',\n].join( ',' );\n\nconst gridBackgroundCombined = [\n\t`linear-gradient( ${ gridBackground1 } )`,\n\t`linear-gradient( ${ gridBackground2 } )`,\n].join( ',' );\n\nexport const getGrid = ( surfaceBackgroundSize: string ) => {\n\treturn css`\n\t\tbackground: ${ CONFIG.surfaceBackgroundColor };\n\t\tbackground-image: ${ gridBackgroundCombined };\n\t\tbackground-size: ${ customBackgroundSize( surfaceBackgroundSize ) };\n\t`;\n};\n\nexport const getVariant = (\n\tvariant: SurfaceVariant,\n\tsurfaceBackgroundSize: string,\n\tsurfaceBackgroundSizeDotted: string\n) => {\n\tswitch ( variant ) {\n\t\tcase 'dotted': {\n\t\t\treturn getDotted(\n\t\t\t\tsurfaceBackgroundSize,\n\t\t\t\tsurfaceBackgroundSizeDotted\n\t\t\t);\n\t\t}\n\t\tcase 'grid': {\n\t\t\treturn getGrid( surfaceBackgroundSize );\n\t\t}\n\t\tcase 'primary': {\n\t\t\treturn primary;\n\t\t}\n\t\tcase 'secondary': {\n\t\t\treturn secondary;\n\t\t}\n\t\tcase 'tertiary': {\n\t\t\treturn tertiary;\n\t\t}\n\t}\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,GAAG,QAAQ,gBAAgB;;AAEpC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,MAAM,QAAQ,UAAU;AAGzC,OAAO,MAAMC,OAAO,gBAAGH,GAAG,sBACJC,MAAM,CAACG,YAAY,aAC9BF,MAAM,CAACG,IAAI,CAAE,GAAG,CAAE,2BAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,6CAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,u9JAE5B;AAED,OAAO,MAAMC,UAAU,gBAAGT,GAAG,sBACPC,MAAM,CAACS,sBAAsB,SAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA,gDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,u9JAClD;AAED,OAAO,SAASG,UAAUA,CAAE;EAC3BC,YAAY;EACZC,UAAU;EACVC,WAAW;EACXC;AAID,CAAC,EAAG;EACH,MAAMC,WAAW,GAAI,aAAaf,MAAM,CAACgB,kBAAoB,EAAC;EAE9D,oBAAOjB,GAAG,CAAE;IACXY,YAAY,EAAEA,YAAY,GAAGI,WAAW,GAAGE,SAAS;IACpDL,UAAU,EAAEA,UAAU,GAAGG,WAAW,GAAGE,SAAS;IAChDJ,WAAW,EAAEA,WAAW,GAAGE,WAAW,GAAGE,SAAS;IAClDH,SA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ACf;IACA,KAAK,WAAW;MAAE;QACjB,OAAOC,SAAS;MACjB;IACA,KAAK,UAAU;MAAE;QAChB,OAAOE,QAAQ;MAChB;EACD;AACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["css","CONFIG","COLORS","Surface","surfaceColor","gray","process","env","NODE_ENV","background","surfaceBackgroundColor","getBorders","borderBottom","borderLeft","borderRight","borderTop","borderStyle","surfaceBorderColor","undefined","primary","secondary","surfaceBackgroundTintColor","tertiary","surfaceBackgroundTertiaryColor","customBackgroundSize","surfaceBackgroundSize","join","dottedBackground1","surfaceBackgroundSizeDotted","dottedBackground2","dottedBackgroundCombined","surfaceBorderBoldColor","getDotted","gridBackground1","surfaceBorderSubtleColor","gridBackground2","gridBackgroundCombined","getGrid","getVariant","variant"],"sources":["@wordpress/components/src/surface/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG, COLORS } from '../utils';\nimport type { SurfaceVariant, SurfaceProps } from './types';\n\nexport const Surface = css`\n\tbackground-color: ${ CONFIG.surfaceColor };\n\tcolor: ${ COLORS.gray[ 900 ] };\n\tposition: relative;\n`;\n\nexport const background = css`\n\tbackground-color: ${ CONFIG.surfaceBackgroundColor };\n`;\n\nexport function getBorders( {\n\tborderBottom,\n\tborderLeft,\n\tborderRight,\n\tborderTop,\n}: Pick<\n\tSurfaceProps,\n\t'borderBottom' | 'borderLeft' | 'borderRight' | 'borderTop'\n> ) {\n\tconst borderStyle = `1px solid ${ CONFIG.surfaceBorderColor }`;\n\n\treturn css( {\n\t\tborderBottom: borderBottom ? borderStyle : undefined,\n\t\tborderLeft: borderLeft ? borderStyle : undefined,\n\t\tborderRight: borderRight ? borderStyle : undefined,\n\t\tborderTop: borderTop ? borderStyle : undefined,\n\t} );\n}\n\nexport const primary = css``;\n\nexport const secondary = css`\n\tbackground: ${ CONFIG.surfaceBackgroundTintColor };\n`;\n\nexport const tertiary = css`\n\tbackground: ${ CONFIG.surfaceBackgroundTertiaryColor };\n`;\n\nconst customBackgroundSize = ( surfaceBackgroundSize: string ) =>\n\t[ surfaceBackgroundSize, surfaceBackgroundSize ].join( ' ' );\n\nconst dottedBackground1 = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t'90deg',\n\t\t[ CONFIG.surfaceBackgroundColor, surfaceBackgroundSizeDotted ].join(\n\t\t\t' '\n\t\t),\n\t\t'transparent 1%',\n\t].join( ',' );\n\nconst dottedBackground2 = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t[ CONFIG.surfaceBackgroundColor, surfaceBackgroundSizeDotted ].join(\n\t\t\t' '\n\t\t),\n\t\t'transparent 1%',\n\t].join( ',' );\n\nconst dottedBackgroundCombined = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t`linear-gradient( ${ dottedBackground1(\n\t\t\tsurfaceBackgroundSizeDotted\n\t\t) } ) center`,\n\t\t`linear-gradient( ${ dottedBackground2(\n\t\t\tsurfaceBackgroundSizeDotted\n\t\t) } ) center`,\n\t\tCONFIG.surfaceBorderBoldColor,\n\t].join( ',' );\n\nexport const getDotted = (\n\tsurfaceBackgroundSize: string,\n\tsurfaceBackgroundSizeDotted: string\n) => css`\n\tbackground: ${ dottedBackgroundCombined( surfaceBackgroundSizeDotted ) };\n\tbackground-size: ${ customBackgroundSize( surfaceBackgroundSize ) };\n`;\n\nconst gridBackground1 = [\n\t`${ CONFIG.surfaceBorderSubtleColor } 1px`,\n\t'transparent 1px',\n].join( ',' );\n\nconst gridBackground2 = [\n\t'90deg',\n\t`${ CONFIG.surfaceBorderSubtleColor } 1px`,\n\t'transparent 1px',\n].join( ',' );\n\nconst gridBackgroundCombined = [\n\t`linear-gradient( ${ gridBackground1 } )`,\n\t`linear-gradient( ${ gridBackground2 } )`,\n].join( ',' );\n\nexport const getGrid = ( surfaceBackgroundSize: string ) => {\n\treturn css`\n\t\tbackground: ${ CONFIG.surfaceBackgroundColor };\n\t\tbackground-image: ${ gridBackgroundCombined };\n\t\tbackground-size: ${ customBackgroundSize( surfaceBackgroundSize ) };\n\t`;\n};\n\nexport const getVariant = (\n\tvariant: SurfaceVariant,\n\tsurfaceBackgroundSize: string,\n\tsurfaceBackgroundSizeDotted: string\n) => {\n\tswitch ( variant ) {\n\t\tcase 'dotted': {\n\t\t\treturn getDotted(\n\t\t\t\tsurfaceBackgroundSize,\n\t\t\t\tsurfaceBackgroundSizeDotted\n\t\t\t);\n\t\t}\n\t\tcase 'grid': {\n\t\t\treturn getGrid( surfaceBackgroundSize );\n\t\t}\n\t\tcase 'primary': {\n\t\t\treturn primary;\n\t\t}\n\t\tcase 'secondary': {\n\t\t\treturn secondary;\n\t\t}\n\t\tcase 'tertiary': {\n\t\t\treturn tertiary;\n\t\t}\n\t}\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,GAAG,QAAQ,gBAAgB;;AAEpC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,MAAM,QAAQ,UAAU;AAGzC,OAAO,MAAMC,OAAO,gBAAGH,GAAG,sBACJC,MAAM,CAACG,YAAY,aAC9BF,MAAM,CAACG,IAAI,CAAE,GAAG,CAAE,2BAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,6CAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,u9JAE5B;AAED,OAAO,MAAMC,UAAU,gBAAGT,GAAG,sBACPC,MAAM,CAACS,sBAAsB,SAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA,gDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,u9JAClD;AAED,OAAO,SAASG,UAAUA,CAAE;EAC3BC,YAAY;EACZC,UAAU;EACVC,WAAW;EACXC;AAID,CAAC,EAAG;EACH,MAAMC,WAAW,GAAG,aAAcf,MAAM,CAACgB,kBAAkB,EAAG;EAE9D,oBAAOjB,GAAG,CAAE;IACXY,YAAY,EAAEA,YAAY,GAAGI,WAAW,GAAGE,SAAS;IACpDL,UAAU,EAAEA,UAAU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ACZ,OAAOS,OAAO,CAAEZ,qBAAsB,CAAC;MACxC;IACA,KAAK,SAAS;MAAE;QACf,OAAON,OAAO;MACf;IACA,KAAK,WAAW;MAAE;QACjB,OAAOC,SAAS;MACjB;IACA,KAAK,UAAU;MAAE;QAChB,OAAOE,QAAQ;MAChB;EACD;AACD,CAAC","ignoreList":[]}
@@ -15,8 +15,7 @@ import { useInstanceId, usePrevious } from '@wordpress/compose';
15
15
  */
16
16
 
17
17
  import Button from '../button';
18
- import { jsx as _jsx } from "react/jsx-runtime";
19
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
19
  // Separate the actual tab name from the instance ID. This is
21
20
  // necessary because Ariakit internally uses the element ID when
22
21
  // a new tab is selected, but our implementation looks specifically