@wordpress/components 25.15.1-next.79a6196f.0 → 26.0.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 (1422) hide show
  1. package/.stylelintrc.js +23 -0
  2. package/CHANGELOG.md +74 -2
  3. package/build/alignment-matrix-control/icon.js +1 -2
  4. package/build/alignment-matrix-control/icon.js.map +1 -1
  5. package/build/alignment-matrix-control/index.js +1 -2
  6. package/build/alignment-matrix-control/index.js.map +1 -1
  7. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +4 -8
  8. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +1 -1
  9. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +4 -8
  10. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  11. package/build/alignment-matrix-control/utils.js +3 -6
  12. package/build/alignment-matrix-control/utils.js.map +1 -1
  13. package/build/angle-picker-control/angle-circle.js +1 -2
  14. package/build/angle-picker-control/angle-circle.js.map +1 -1
  15. package/build/angle-picker-control/index.js +3 -15
  16. package/build/angle-picker-control/index.js.map +1 -1
  17. package/build/angle-picker-control/styles/angle-picker-control-styles.js +9 -27
  18. package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  19. package/build/angle-picker-control/types.js.map +1 -1
  20. package/build/animate/index.js +1 -2
  21. package/build/animate/index.js.map +1 -1
  22. package/build/autocomplete/autocompleter-ui.native.js +1 -2
  23. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  24. package/build/autocomplete/background-view.android.js +1 -2
  25. package/build/autocomplete/background-view.android.js.map +1 -1
  26. package/build/autocomplete/background-view.ios.js +1 -2
  27. package/build/autocomplete/background-view.ios.js.map +1 -1
  28. package/build/base-control/index.js +2 -4
  29. package/build/base-control/index.js.map +1 -1
  30. package/build/base-control/styles/base-control-styles.js +5 -10
  31. package/build/base-control/styles/base-control-styles.js.map +1 -1
  32. package/build/border-box-control/border-box-control/component.js +2 -4
  33. package/build/border-box-control/border-box-control/component.js.map +1 -1
  34. package/build/border-box-control/border-box-control/hook.js +5 -3
  35. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  36. package/build/border-box-control/border-box-control-linked-button/component.js +1 -2
  37. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  38. package/build/border-box-control/border-box-control-linked-button/hook.js +2 -2
  39. package/build/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
  40. package/build/border-box-control/border-box-control-split-controls/component.js +1 -2
  41. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  42. package/build/border-box-control/border-box-control-split-controls/hook.js +2 -2
  43. package/build/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
  44. package/build/border-box-control/border-box-control-visualizer/component.js +1 -2
  45. package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  46. package/build/border-box-control/border-box-control-visualizer/hook.js +2 -2
  47. package/build/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
  48. package/build/border-box-control/styles.js +3 -6
  49. package/build/border-box-control/styles.js.map +1 -1
  50. package/build/border-box-control/types.js.map +1 -1
  51. package/build/border-control/border-control/component.js +7 -5
  52. package/build/border-control/border-control/component.js.map +1 -1
  53. package/build/border-control/border-control/hook.js +20 -17
  54. package/build/border-control/border-control/hook.js.map +1 -1
  55. package/build/border-control/border-control-dropdown/component.js +3 -3
  56. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  57. package/build/border-control/border-control-dropdown/hook.js +2 -2
  58. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  59. package/build/border-control/border-control-style-picker/component.js +21 -50
  60. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  61. package/build/border-control/styles.js +16 -35
  62. package/build/border-control/styles.js.map +1 -1
  63. package/build/border-control/types.js.map +1 -1
  64. package/build/box-control/all-input-control.js +35 -29
  65. package/build/box-control/all-input-control.js.map +1 -1
  66. package/build/box-control/axial-input-controls.js +40 -54
  67. package/build/box-control/axial-input-controls.js.map +1 -1
  68. package/build/box-control/index.js +22 -26
  69. package/build/box-control/index.js.map +1 -1
  70. package/build/box-control/input-controls.js +45 -37
  71. package/build/box-control/input-controls.js.map +1 -1
  72. package/build/box-control/styles/box-control-icon-styles.js +6 -12
  73. package/build/box-control/styles/box-control-icon-styles.js.map +1 -1
  74. package/build/box-control/styles/box-control-styles.js +44 -112
  75. package/build/box-control/styles/box-control-styles.js.map +1 -1
  76. package/build/box-control/types.js.map +1 -1
  77. package/build/box-control/utils.js +125 -14
  78. package/build/box-control/utils.js.map +1 -1
  79. package/build/button/deprecated.js +1 -2
  80. package/build/button/deprecated.js.map +1 -1
  81. package/build/button/index.js +16 -20
  82. package/build/button/index.js.map +1 -1
  83. package/build/button/index.native.js +1 -3
  84. package/build/button/index.native.js.map +1 -1
  85. package/build/button/types.js.map +1 -1
  86. package/build/button-group/index.js +2 -4
  87. package/build/button-group/index.js.map +1 -1
  88. package/build/card/card/component.js +4 -6
  89. package/build/card/card/component.js.map +1 -1
  90. package/build/card/card/hook.js +2 -2
  91. package/build/card/card/hook.js.map +1 -1
  92. package/build/card/card-body/component.js +2 -4
  93. package/build/card/card-body/component.js.map +1 -1
  94. package/build/card/card-body/hook.js +2 -2
  95. package/build/card/card-body/hook.js.map +1 -1
  96. package/build/card/card-divider/component.js +2 -4
  97. package/build/card/card-divider/component.js.map +1 -1
  98. package/build/card/card-divider/hook.js +2 -2
  99. package/build/card/card-divider/hook.js.map +1 -1
  100. package/build/card/card-footer/component.js +2 -4
  101. package/build/card/card-footer/component.js.map +1 -1
  102. package/build/card/card-footer/hook.js +2 -2
  103. package/build/card/card-footer/hook.js.map +1 -1
  104. package/build/card/card-header/component.js +2 -4
  105. package/build/card/card-header/component.js.map +1 -1
  106. package/build/card/card-header/hook.js +2 -2
  107. package/build/card/card-header/hook.js.map +1 -1
  108. package/build/card/card-media/component.js +2 -4
  109. package/build/card/card-media/component.js.map +1 -1
  110. package/build/card/card-media/hook.js +2 -2
  111. package/build/card/card-media/hook.js.map +1 -1
  112. package/build/card/context.js +1 -2
  113. package/build/card/context.js.map +1 -1
  114. package/build/card/index.js +2 -2
  115. package/build/card/index.js.map +1 -1
  116. package/build/card/styles.js +14 -28
  117. package/build/card/styles.js.map +1 -1
  118. package/build/checkbox-control/index.js +1 -2
  119. package/build/checkbox-control/index.js.map +1 -1
  120. package/build/checkbox-control/types.js.map +1 -1
  121. package/build/circular-option-picker/circular-option-picker-context.js +1 -2
  122. package/build/circular-option-picker/circular-option-picker-context.js.map +1 -1
  123. package/build/circular-option-picker/circular-option-picker.js +1 -2
  124. package/build/circular-option-picker/circular-option-picker.js.map +1 -1
  125. package/build/circular-option-picker/index.js +1 -2
  126. package/build/circular-option-picker/index.js.map +1 -1
  127. package/build/color-control/index.native.js +1 -2
  128. package/build/color-control/index.native.js.map +1 -1
  129. package/build/color-indicator/index.js +2 -4
  130. package/build/color-indicator/index.js.map +1 -1
  131. package/build/color-indicator/index.native.js +1 -2
  132. package/build/color-indicator/index.native.js.map +1 -1
  133. package/build/color-palette/index.js +2 -4
  134. package/build/color-palette/index.js.map +1 -1
  135. package/build/color-palette/index.native.js +1 -2
  136. package/build/color-palette/index.native.js.map +1 -1
  137. package/build/color-palette/styles.js +1 -2
  138. package/build/color-palette/styles.js.map +1 -1
  139. package/build/color-picker/component.js +2 -4
  140. package/build/color-picker/component.js.map +1 -1
  141. package/build/color-picker/hsl-input.js +55 -33
  142. package/build/color-picker/hsl-input.js.map +1 -1
  143. package/build/color-picker/hsv-color-picker.native.js +1 -2
  144. package/build/color-picker/hsv-color-picker.native.js.map +1 -1
  145. package/build/color-picker/hue-picker.native.js +2 -2
  146. package/build/color-picker/hue-picker.native.js.map +1 -1
  147. package/build/color-picker/saturation-picker.native.js +2 -2
  148. package/build/color-picker/saturation-picker.native.js.map +1 -1
  149. package/build/color-picker/styles.js +8 -16
  150. package/build/color-picker/styles.js.map +1 -1
  151. package/build/combobox-control/index.js +2 -3
  152. package/build/combobox-control/index.js.map +1 -1
  153. package/build/combobox-control/styles.js +1 -2
  154. package/build/combobox-control/styles.js.map +1 -1
  155. package/build/composite/current/index.js +43 -0
  156. package/build/composite/current/index.js.map +1 -0
  157. package/build/composite/index.js +10 -24
  158. package/build/composite/index.js.map +1 -1
  159. package/build/composite/legacy/index.js +127 -0
  160. package/build/composite/legacy/index.js.map +1 -0
  161. package/build/composite/v2.js +10 -36
  162. package/build/composite/v2.js.map +1 -1
  163. package/build/confirm-dialog/component.js +6 -6
  164. package/build/confirm-dialog/component.js.map +1 -1
  165. package/build/confirm-dialog/styles.js +1 -2
  166. package/build/confirm-dialog/styles.js.map +1 -1
  167. package/build/context/constants.js +3 -6
  168. package/build/context/constants.js.map +1 -1
  169. package/build/context/context-system-provider.js +2 -4
  170. package/build/context/context-system-provider.js.map +1 -1
  171. package/build/context/get-styled-class-name-from-key.js +1 -2
  172. package/build/context/get-styled-class-name-from-key.js.map +1 -1
  173. package/build/context/wordpress-component.js.map +1 -1
  174. package/build/custom-gradient-picker/constants.js +5 -10
  175. package/build/custom-gradient-picker/constants.js.map +1 -1
  176. package/build/custom-gradient-picker/gradient-bar/constants.js +7 -14
  177. package/build/custom-gradient-picker/gradient-bar/constants.js.map +1 -1
  178. package/build/custom-gradient-picker/gradient-bar/control-points.js +1 -2
  179. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  180. package/build/custom-gradient-picker/index.js +2 -17
  181. package/build/custom-gradient-picker/index.js.map +1 -1
  182. package/build/custom-gradient-picker/index.native.js +1 -2
  183. package/build/custom-gradient-picker/index.native.js.map +1 -1
  184. package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js +2 -4
  185. package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
  186. package/build/custom-gradient-picker/types.js.map +1 -1
  187. package/build/custom-select-control/index.js +1 -1
  188. package/build/custom-select-control/index.js.map +1 -1
  189. package/build/custom-select-control/styles.js +1 -2
  190. package/build/custom-select-control/styles.js.map +1 -1
  191. package/build/custom-select-control-v2/index.js +9 -7
  192. package/build/custom-select-control-v2/index.js.map +1 -1
  193. package/build/custom-select-control-v2/styles.js +6 -10
  194. package/build/custom-select-control-v2/styles.js.map +1 -1
  195. package/build/dashicon/index.js +1 -2
  196. package/build/dashicon/index.js.map +1 -1
  197. package/build/dashicon/index.native.js +3 -4
  198. package/build/dashicon/index.native.js.map +1 -1
  199. package/build/date-time/constants.js +1 -2
  200. package/build/date-time/constants.js.map +1 -1
  201. package/build/date-time/date/index.js +1 -2
  202. package/build/date-time/date/index.js.map +1 -1
  203. package/build/date-time/date/styles.js +6 -12
  204. package/build/date-time/date/styles.js.map +1 -1
  205. package/build/date-time/date-time/index.js +2 -4
  206. package/build/date-time/date-time/index.js.map +1 -1
  207. package/build/date-time/date-time/styles.js +1 -2
  208. package/build/date-time/date-time/styles.js.map +1 -1
  209. package/build/date-time/index.js +1 -2
  210. package/build/date-time/index.js.map +1 -1
  211. package/build/date-time/time/index.js +1 -2
  212. package/build/date-time/time/index.js.map +1 -1
  213. package/build/date-time/time/styles.js +10 -20
  214. package/build/date-time/time/styles.js.map +1 -1
  215. package/build/date-time/time/timezone.js +2 -3
  216. package/build/date-time/time/timezone.js.map +1 -1
  217. package/build/dimension-control/index.js +3 -4
  218. package/build/dimension-control/index.js.map +1 -1
  219. package/build/dimension-control/sizes.js +1 -2
  220. package/build/dimension-control/sizes.js.map +1 -1
  221. package/build/disabled/index.js +1 -2
  222. package/build/disabled/index.js.map +1 -1
  223. package/build/disabled/index.native.js +1 -2
  224. package/build/disabled/index.native.js.map +1 -1
  225. package/build/disabled/styles/disabled-styles.js +1 -2
  226. package/build/disabled/styles/disabled-styles.js.map +1 -1
  227. package/build/disclosure/index.js +4 -6
  228. package/build/disclosure/index.js.map +1 -1
  229. package/build/divider/component.js +4 -6
  230. package/build/divider/component.js.map +1 -1
  231. package/build/divider/styles.js +1 -2
  232. package/build/divider/styles.js.map +1 -1
  233. package/build/draggable/index.js +1 -2
  234. package/build/draggable/index.js.map +1 -1
  235. package/build/draggable/index.native.js +3 -4
  236. package/build/draggable/index.native.js.map +1 -1
  237. package/build/drop-zone/index.js +1 -2
  238. package/build/drop-zone/index.js.map +1 -1
  239. package/build/dropdown/dropdown-content-wrapper.js +2 -4
  240. package/build/dropdown/dropdown-content-wrapper.js.map +1 -1
  241. package/build/dropdown/index.js +2 -4
  242. package/build/dropdown/index.js.map +1 -1
  243. package/build/dropdown/index.native.js +1 -2
  244. package/build/dropdown/index.native.js.map +1 -1
  245. package/build/dropdown/styles.js +1 -2
  246. package/build/dropdown/styles.js.map +1 -1
  247. package/build/dropdown-menu/index.js +2 -4
  248. package/build/dropdown-menu/index.js.map +1 -1
  249. package/build/dropdown-menu/index.native.js +1 -2
  250. package/build/dropdown-menu/index.native.js.map +1 -1
  251. package/build/dropdown-menu-v2/index.js +11 -20
  252. package/build/dropdown-menu-v2/index.js.map +1 -1
  253. package/build/dropdown-menu-v2/styles.js +29 -42
  254. package/build/dropdown-menu-v2/styles.js.map +1 -1
  255. package/build/duotone-picker/color-list-picker/index.js +1 -2
  256. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  257. package/build/duotone-picker/duotone-picker.js +1 -2
  258. package/build/duotone-picker/duotone-picker.js.map +1 -1
  259. package/build/duotone-picker/duotone-swatch.js +1 -2
  260. package/build/duotone-picker/duotone-swatch.js.map +1 -1
  261. package/build/elevation/component.js +2 -4
  262. package/build/elevation/component.js.map +1 -1
  263. package/build/elevation/hook.js +2 -2
  264. package/build/elevation/hook.js.map +1 -1
  265. package/build/elevation/styles.js +1 -2
  266. package/build/elevation/styles.js.map +1 -1
  267. package/build/external-link/index.js +3 -5
  268. package/build/external-link/index.js.map +1 -1
  269. package/build/external-link/index.native.js +1 -2
  270. package/build/external-link/index.native.js.map +1 -1
  271. package/build/external-link/styles/external-link-styles.js +1 -2
  272. package/build/external-link/styles/external-link-styles.js.map +1 -1
  273. package/build/flex/context.js +1 -2
  274. package/build/flex/context.js.map +1 -1
  275. package/build/flex/flex/component.js +2 -4
  276. package/build/flex/flex/component.js.map +1 -1
  277. package/build/flex/flex/hook.js +2 -2
  278. package/build/flex/flex/hook.js.map +1 -1
  279. package/build/flex/flex-block/component.js +2 -4
  280. package/build/flex/flex-block/component.js.map +1 -1
  281. package/build/flex/flex-item/component.js +2 -4
  282. package/build/flex/flex-item/component.js.map +1 -1
  283. package/build/flex/flex-item/hook.js +2 -2
  284. package/build/flex/flex-item/hook.js.map +1 -1
  285. package/build/flex/index.js +2 -2
  286. package/build/flex/index.js.map +1 -1
  287. package/build/flex/styles.js +5 -10
  288. package/build/flex/styles.js.map +1 -1
  289. package/build/focal-point-picker/index.js +3 -4
  290. package/build/focal-point-picker/index.js.map +1 -1
  291. package/build/focal-point-picker/index.native.js +1 -3
  292. package/build/focal-point-picker/index.native.js.map +1 -1
  293. package/build/focal-point-picker/styles/focal-point-picker-style.js +37 -54
  294. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  295. package/build/focal-point-picker/styles/focal-point-style.js +12 -4
  296. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  297. package/build/focal-point-picker/tooltip/index.native.js +1 -2
  298. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  299. package/build/focal-point-picker/utils.js +1 -2
  300. package/build/focal-point-picker/utils.js.map +1 -1
  301. package/build/font-size-picker/constants.js +2 -4
  302. package/build/font-size-picker/constants.js.map +1 -1
  303. package/build/font-size-picker/font-size-picker-select.js +1 -2
  304. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  305. package/build/font-size-picker/font-size-picker-toggle-group.js +2 -4
  306. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  307. package/build/font-size-picker/index.js +6 -22
  308. package/build/font-size-picker/index.js.map +1 -1
  309. package/build/font-size-picker/index.native.js +3 -4
  310. package/build/font-size-picker/index.native.js.map +1 -1
  311. package/build/font-size-picker/styles.js +17 -29
  312. package/build/font-size-picker/styles.js.map +1 -1
  313. package/build/font-size-picker/types.js.map +1 -1
  314. package/build/footer-message-control/index.native.js +1 -2
  315. package/build/footer-message-control/index.native.js.map +1 -1
  316. package/build/form-file-upload/index.js +1 -2
  317. package/build/form-file-upload/index.js.map +1 -1
  318. package/build/form-toggle/index.js +1 -2
  319. package/build/form-toggle/index.js.map +1 -1
  320. package/build/form-token-field/index.js +2 -7
  321. package/build/form-token-field/index.js.map +1 -1
  322. package/build/form-token-field/styles.js +1 -2
  323. package/build/form-token-field/styles.js.map +1 -1
  324. package/build/form-token-field/suggestions-list.js +1 -2
  325. package/build/form-token-field/suggestions-list.js.map +1 -1
  326. package/build/form-token-field/token-input.js +2 -4
  327. package/build/form-token-field/token-input.js.map +1 -1
  328. package/build/gradient-picker/index.js +19 -43
  329. package/build/gradient-picker/index.js.map +1 -1
  330. package/build/gradient-picker/types.js.map +1 -1
  331. package/build/grid/component.js +2 -4
  332. package/build/grid/component.js.map +1 -1
  333. package/build/guide/index.js +1 -2
  334. package/build/guide/index.js.map +1 -1
  335. package/build/h-stack/component.js +2 -4
  336. package/build/h-stack/component.js.map +1 -1
  337. package/build/heading/component.js +2 -4
  338. package/build/heading/component.js.map +1 -1
  339. package/build/higher-order/navigate-regions/index.js +1 -2
  340. package/build/higher-order/navigate-regions/index.js.map +1 -1
  341. package/build/higher-order/with-constrained-tabbing/index.js +1 -2
  342. package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
  343. package/build/higher-order/with-focus-outside/index.js +1 -2
  344. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  345. package/build/higher-order/with-focus-outside/index.native.js +1 -2
  346. package/build/higher-order/with-focus-outside/index.native.js.map +1 -1
  347. package/build/higher-order/with-focus-return/index.js +1 -2
  348. package/build/higher-order/with-focus-return/index.js.map +1 -1
  349. package/build/higher-order/with-notices/index.js +1 -2
  350. package/build/higher-order/with-notices/index.js.map +1 -1
  351. package/build/higher-order/with-spoken-messages/index.js +1 -2
  352. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  353. package/build/icon/index.js +1 -2
  354. package/build/icon/index.js.map +1 -1
  355. package/build/index.js +2 -2
  356. package/build/index.js.map +1 -1
  357. package/build/index.native.js +2 -2
  358. package/build/index.native.js.map +1 -1
  359. package/build/input-control/backdrop.js +3 -2
  360. package/build/input-control/backdrop.js.map +1 -1
  361. package/build/input-control/index.js +3 -5
  362. package/build/input-control/index.js.map +1 -1
  363. package/build/input-control/input-base.js +4 -3
  364. package/build/input-control/input-base.js.map +1 -1
  365. package/build/input-control/input-field.js +1 -2
  366. package/build/input-control/input-field.js.map +1 -1
  367. package/build/input-control/input-prefix-wrapper.js +2 -4
  368. package/build/input-control/input-prefix-wrapper.js.map +1 -1
  369. package/build/input-control/input-suffix-wrapper.js +2 -4
  370. package/build/input-control/input-suffix-wrapper.js.map +1 -1
  371. package/build/input-control/reducer/actions.js +11 -22
  372. package/build/input-control/reducer/actions.js.map +1 -1
  373. package/build/input-control/reducer/reducer.js +2 -2
  374. package/build/input-control/reducer/reducer.js.map +1 -1
  375. package/build/input-control/reducer/state.js +1 -2
  376. package/build/input-control/reducer/state.js.map +1 -1
  377. package/build/input-control/styles/input-control-styles.js +32 -37
  378. package/build/input-control/styles/input-control-styles.js.map +1 -1
  379. package/build/input-control/types.js.map +1 -1
  380. package/build/isolated-event-container/index.js +1 -2
  381. package/build/isolated-event-container/index.js.map +1 -1
  382. package/build/item-group/context.js +1 -2
  383. package/build/item-group/context.js.map +1 -1
  384. package/build/item-group/item/component.js +2 -4
  385. package/build/item-group/item/component.js.map +1 -1
  386. package/build/item-group/item/hook.js +2 -2
  387. package/build/item-group/item/hook.js.map +1 -1
  388. package/build/item-group/item-group/component.js +2 -4
  389. package/build/item-group/item-group/component.js.map +1 -1
  390. package/build/item-group/item-group/hook.js +2 -2
  391. package/build/item-group/item-group/hook.js.map +1 -1
  392. package/build/item-group/styles.js +13 -20
  393. package/build/item-group/styles.js.map +1 -1
  394. package/build/keyboard-shortcuts/index.js +1 -2
  395. package/build/keyboard-shortcuts/index.js.map +1 -1
  396. package/build/keyboard-shortcuts/index.native.js +1 -2
  397. package/build/keyboard-shortcuts/index.native.js.map +1 -1
  398. package/build/menu-group/index.js +1 -2
  399. package/build/menu-group/index.js.map +1 -1
  400. package/build/menu-item/index.js +2 -4
  401. package/build/menu-item/index.js.map +1 -1
  402. package/build/menu-items-choice/index.js +1 -2
  403. package/build/menu-items-choice/index.js.map +1 -1
  404. package/build/mobile/audio-player/index.native.js +1 -2
  405. package/build/mobile/audio-player/index.native.js.map +1 -1
  406. package/build/mobile/badge/index.native.js +1 -2
  407. package/build/mobile/badge/index.native.js.map +1 -1
  408. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js +1 -2
  409. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  410. package/build/mobile/bottom-sheet/bottom-sheet-navigation/bottom-sheet-navigation-context.native.js +1 -2
  411. package/build/mobile/bottom-sheet/bottom-sheet-navigation/bottom-sheet-navigation-context.native.js.map +1 -1
  412. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +3 -4
  413. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  414. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -2
  415. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  416. package/build/mobile/bottom-sheet/button.native.js +1 -2
  417. package/build/mobile/bottom-sheet/button.native.js.map +1 -1
  418. package/build/mobile/bottom-sheet/cell.native.js +1 -2
  419. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  420. package/build/mobile/bottom-sheet/chevron-back.native.js +1 -2
  421. package/build/mobile/bottom-sheet/chevron-back.native.js.map +1 -1
  422. package/build/mobile/bottom-sheet/footer-message-cell.native.js +1 -2
  423. package/build/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  424. package/build/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js +1 -2
  425. package/build/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js.map +1 -1
  426. package/build/mobile/bottom-sheet/index.native.js +1 -2
  427. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  428. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +1 -2
  429. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  430. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -2
  431. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  432. package/build/mobile/bottom-sheet/nav-bar/action-button.native.js +1 -2
  433. package/build/mobile/bottom-sheet/nav-bar/action-button.native.js.map +1 -1
  434. package/build/mobile/bottom-sheet/nav-bar/apply-button.native.js +1 -2
  435. package/build/mobile/bottom-sheet/nav-bar/apply-button.native.js.map +1 -1
  436. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -2
  437. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  438. package/build/mobile/bottom-sheet/nav-bar/heading.native.js +1 -2
  439. package/build/mobile/bottom-sheet/nav-bar/heading.native.js.map +1 -1
  440. package/build/mobile/bottom-sheet/nav-bar/index.native.js +1 -2
  441. package/build/mobile/bottom-sheet/nav-bar/index.native.js.map +1 -1
  442. package/build/mobile/bottom-sheet/range-cell.native.js +1 -2
  443. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  444. package/build/mobile/bottom-sheet/range-text-input.native.js +1 -2
  445. package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  446. package/build/mobile/bottom-sheet/ripple.native.js +1 -2
  447. package/build/mobile/bottom-sheet/ripple.native.js.map +1 -1
  448. package/build/mobile/bottom-sheet/stepper-cell/index.native.js +1 -2
  449. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  450. package/build/mobile/bottom-sheet/stepper-cell/stepper.android.js +1 -2
  451. package/build/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
  452. package/build/mobile/bottom-sheet/stepper-cell/stepper.ios.js +1 -2
  453. package/build/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
  454. package/build/mobile/bottom-sheet/sub-sheet/index.native.js +1 -2
  455. package/build/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  456. package/build/mobile/bottom-sheet-select-control/index.native.js +1 -2
  457. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  458. package/build/mobile/bottom-sheet-text-control/index.native.js +1 -2
  459. package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  460. package/build/mobile/color-settings/gradient-picker-screen.native.js +1 -2
  461. package/build/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
  462. package/build/mobile/color-settings/index.native.js +1 -2
  463. package/build/mobile/color-settings/index.native.js.map +1 -1
  464. package/build/mobile/color-settings/palette.screen.native.js +1 -2
  465. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  466. package/build/mobile/color-settings/picker-screen.native.js +1 -2
  467. package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
  468. package/build/mobile/color-settings/utils.native.js +1 -2
  469. package/build/mobile/color-settings/utils.native.js.map +1 -1
  470. package/build/mobile/cycle-select-control/index.native.js +1 -2
  471. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  472. package/build/mobile/dashicons/index.native.js +3 -6
  473. package/build/mobile/dashicons/index.native.js.map +1 -1
  474. package/build/mobile/focal-point-settings-panel/index.native.js +1 -2
  475. package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  476. package/build/mobile/global-styles-context/index.native.js +1 -2
  477. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  478. package/build/mobile/global-styles-context/utils.native.js +1 -2
  479. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  480. package/build/mobile/gradient/index.native.js +1 -2
  481. package/build/mobile/gradient/index.native.js.map +1 -1
  482. package/build/mobile/gridicons/index.native.js +8 -16
  483. package/build/mobile/gridicons/index.native.js.map +1 -1
  484. package/build/mobile/html-text-input/index.native.js +1 -2
  485. package/build/mobile/html-text-input/index.native.js.map +1 -1
  486. package/build/mobile/image/constants.js +1 -2
  487. package/build/mobile/image/constants.js.map +1 -1
  488. package/build/mobile/image/icon-customize.native.js +1 -2
  489. package/build/mobile/image/icon-customize.native.js.map +1 -1
  490. package/build/mobile/image/icon-retry.native.js +1 -2
  491. package/build/mobile/image/icon-retry.native.js.map +1 -1
  492. package/build/mobile/image/image-editing-button.native.js +1 -2
  493. package/build/mobile/image/image-editing-button.native.js.map +1 -1
  494. package/build/mobile/image/index.native.js +81 -7
  495. package/build/mobile/image/index.native.js.map +1 -1
  496. package/build/mobile/keyboard-avoiding-view/index.android.js +2 -4
  497. package/build/mobile/keyboard-avoiding-view/index.android.js.map +1 -1
  498. package/build/mobile/keyboard-avoiding-view/index.ios.js +1 -2
  499. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  500. package/build/mobile/keyboard-aware-flat-list/index.android.js +1 -2
  501. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  502. package/build/mobile/keyboard-aware-flat-list/index.ios.js +1 -2
  503. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  504. package/build/mobile/link-picker/link-picker-screen.native.js +1 -2
  505. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  506. package/build/mobile/link-settings/index.native.js +1 -2
  507. package/build/mobile/link-settings/index.native.js.map +1 -1
  508. package/build/mobile/link-settings/link-rel.native.js +1 -2
  509. package/build/mobile/link-settings/link-rel.native.js.map +1 -1
  510. package/build/mobile/link-settings/link-settings-navigation.native.js +1 -2
  511. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  512. package/build/mobile/link-settings/link-settings-screen.native.js +1 -2
  513. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  514. package/build/mobile/media-edit/index.native.js +3 -6
  515. package/build/mobile/media-edit/index.native.js.map +1 -1
  516. package/build/mobile/picker/index.ios.js +1 -2
  517. package/build/mobile/picker/index.ios.js.map +1 -1
  518. package/build/mobile/segmented-control/index.native.js +1 -2
  519. package/build/mobile/segmented-control/index.native.js.map +1 -1
  520. package/build/mobile/utils/alignments.native.js +3 -6
  521. package/build/mobile/utils/alignments.native.js.map +1 -1
  522. package/build/mobile/utils/get-px-from-css-unit.native.js +1 -2
  523. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  524. package/build/modal/index.js +4 -6
  525. package/build/modal/index.js.map +1 -1
  526. package/build/navigable-container/container.js +1 -2
  527. package/build/navigable-container/container.js.map +1 -1
  528. package/build/navigable-container/menu.js +2 -4
  529. package/build/navigable-container/menu.js.map +1 -1
  530. package/build/navigable-container/tabbable.js +2 -4
  531. package/build/navigable-container/tabbable.js.map +1 -1
  532. package/build/navigation/back-button/index.js +2 -4
  533. package/build/navigation/back-button/index.js.map +1 -1
  534. package/build/navigation/constants.js +2 -4
  535. package/build/navigation/constants.js.map +1 -1
  536. package/build/navigation/context.js +1 -2
  537. package/build/navigation/context.js.map +1 -1
  538. package/build/navigation/group/context.js +1 -2
  539. package/build/navigation/group/context.js.map +1 -1
  540. package/build/navigation/group/index.js +1 -2
  541. package/build/navigation/group/index.js.map +1 -1
  542. package/build/navigation/index.js +1 -2
  543. package/build/navigation/index.js.map +1 -1
  544. package/build/navigation/item/index.js +1 -2
  545. package/build/navigation/item/index.js.map +1 -1
  546. package/build/navigation/menu/context.js +1 -2
  547. package/build/navigation/menu/context.js.map +1 -1
  548. package/build/navigation/menu/index.js +1 -2
  549. package/build/navigation/menu/index.js.map +1 -1
  550. package/build/navigation/menu/menu-title-search.js +5 -8
  551. package/build/navigation/menu/menu-title-search.js.map +1 -1
  552. package/build/navigation/styles/navigation-styles.js +34 -47
  553. package/build/navigation/styles/navigation-styles.js.map +1 -1
  554. package/build/navigator/context.js +1 -2
  555. package/build/navigator/context.js.map +1 -1
  556. package/build/navigator/navigator-back-button/component.js +2 -4
  557. package/build/navigator/navigator-back-button/component.js.map +1 -1
  558. package/build/navigator/navigator-button/component.js +2 -4
  559. package/build/navigator/navigator-button/component.js.map +1 -1
  560. package/build/navigator/navigator-provider/component.js +4 -6
  561. package/build/navigator/navigator-provider/component.js.map +1 -1
  562. package/build/navigator/navigator-screen/component.js +4 -6
  563. package/build/navigator/navigator-screen/component.js.map +1 -1
  564. package/build/navigator/navigator-to-parent-button/component.js +2 -4
  565. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  566. package/build/navigator/styles.js +1 -2
  567. package/build/navigator/styles.js.map +1 -1
  568. package/build/navigator/use-navigator.js +1 -2
  569. package/build/navigator/use-navigator.js.map +1 -1
  570. package/build/notice/index.js +1 -2
  571. package/build/notice/index.js.map +1 -1
  572. package/build/notice/index.native.js +1 -2
  573. package/build/notice/index.native.js.map +1 -1
  574. package/build/notice/list.js +1 -2
  575. package/build/notice/list.js.map +1 -1
  576. package/build/notice/list.native.js +1 -2
  577. package/build/notice/list.native.js.map +1 -1
  578. package/build/number-control/index.js +5 -7
  579. package/build/number-control/index.js.map +1 -1
  580. package/build/number-control/styles/number-control-styles.js +3 -6
  581. package/build/number-control/styles/number-control-styles.js.map +1 -1
  582. package/build/palette-edit/index.js +11 -17
  583. package/build/palette-edit/index.js.map +1 -1
  584. package/build/palette-edit/styles.js +50 -51
  585. package/build/palette-edit/styles.js.map +1 -1
  586. package/build/panel/actions.native.js +1 -2
  587. package/build/panel/actions.native.js.map +1 -1
  588. package/build/panel/body.js +2 -4
  589. package/build/panel/body.js.map +1 -1
  590. package/build/panel/body.native.js +1 -2
  591. package/build/panel/body.native.js.map +1 -1
  592. package/build/panel/bottom-separator-cover.native.js +1 -2
  593. package/build/panel/bottom-separator-cover.native.js.map +1 -1
  594. package/build/panel/header.js +1 -2
  595. package/build/panel/header.js.map +1 -1
  596. package/build/panel/index.js +2 -4
  597. package/build/panel/index.js.map +1 -1
  598. package/build/panel/row.js +2 -4
  599. package/build/panel/row.js.map +1 -1
  600. package/build/placeholder/index.js +1 -2
  601. package/build/placeholder/index.js.map +1 -1
  602. package/build/popover/index.js +5 -6
  603. package/build/popover/index.js.map +1 -1
  604. package/build/popover/types.js.map +1 -1
  605. package/build/private-apis.js +1 -2
  606. package/build/private-apis.js.map +1 -1
  607. package/build/private-apis.native.js +1 -2
  608. package/build/private-apis.native.js.map +1 -1
  609. package/build/progress-bar/index.js +4 -6
  610. package/build/progress-bar/index.js.map +1 -1
  611. package/build/progress-bar/styles.js +4 -8
  612. package/build/progress-bar/styles.js.map +1 -1
  613. package/build/query-controls/index.js +5 -6
  614. package/build/query-controls/index.js.map +1 -1
  615. package/build/query-controls/index.native.js +4 -5
  616. package/build/query-controls/index.native.js.map +1 -1
  617. package/build/radio-control/index.js +1 -2
  618. package/build/radio-control/index.js.map +1 -1
  619. package/build/radio-control/index.native.js +1 -2
  620. package/build/radio-control/index.native.js.map +1 -1
  621. package/build/radio-group/context.js +1 -2
  622. package/build/radio-group/context.js.map +1 -1
  623. package/build/radio-group/index.js +4 -6
  624. package/build/radio-group/index.js.map +1 -1
  625. package/build/radio-group/radio.js +4 -6
  626. package/build/radio-group/radio.js.map +1 -1
  627. package/build/range-control/index.js +2 -4
  628. package/build/range-control/index.js.map +1 -1
  629. package/build/range-control/index.native.js +1 -2
  630. package/build/range-control/index.native.js.map +1 -1
  631. package/build/range-control/input-range.js +1 -2
  632. package/build/range-control/input-range.js.map +1 -1
  633. package/build/range-control/styles/range-control-styles.js +15 -30
  634. package/build/range-control/styles/range-control-styles.js.map +1 -1
  635. package/build/resizable-box/index.js +2 -4
  636. package/build/resizable-box/index.js.map +1 -1
  637. package/build/resizable-box/index.native.js +1 -2
  638. package/build/resizable-box/index.native.js.map +1 -1
  639. package/build/resizable-box/resize-tooltip/index.js +1 -2
  640. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  641. package/build/resizable-box/resize-tooltip/label.js +1 -2
  642. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  643. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +9 -12
  644. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  645. package/build/resizable-box/resize-tooltip/utils.js +1 -2
  646. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  647. package/build/responsive-wrapper/index.js +1 -2
  648. package/build/responsive-wrapper/index.js.map +1 -1
  649. package/build/sandbox/index.js +1 -2
  650. package/build/sandbox/index.js.map +1 -1
  651. package/build/sandbox/index.native.js +1 -2
  652. package/build/sandbox/index.native.js.map +1 -1
  653. package/build/scroll-lock/index.js +1 -2
  654. package/build/scroll-lock/index.js.map +1 -1
  655. package/build/scrollable/component.js +2 -4
  656. package/build/scrollable/component.js.map +1 -1
  657. package/build/scrollable/hook.js +2 -2
  658. package/build/scrollable/hook.js.map +1 -1
  659. package/build/scrollable/styles.js +7 -14
  660. package/build/scrollable/styles.js.map +1 -1
  661. package/build/search-control/index.js +68 -60
  662. package/build/search-control/index.js.map +1 -1
  663. package/build/search-control/index.native.js +1 -2
  664. package/build/search-control/index.native.js.map +1 -1
  665. package/build/search-control/styles.js +37 -0
  666. package/build/search-control/styles.js.map +1 -0
  667. package/build/search-control/types.js.map +1 -1
  668. package/build/select-control/chevron-down.js +1 -2
  669. package/build/select-control/chevron-down.js.map +1 -1
  670. package/build/select-control/index.js +3 -5
  671. package/build/select-control/index.js.map +1 -1
  672. package/build/select-control/index.native.js +2 -4
  673. package/build/select-control/index.native.js.map +1 -1
  674. package/build/select-control/styles/select-control-styles.js +4 -8
  675. package/build/select-control/styles/select-control-styles.js.map +1 -1
  676. package/build/shortcut/index.js +1 -2
  677. package/build/shortcut/index.js.map +1 -1
  678. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +1 -2
  679. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  680. package/build/slot-fill/bubbles-virtually/slot.js +1 -2
  681. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  682. package/build/slot-fill/bubbles-virtually/use-slot-fills.js +1 -1
  683. package/build/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
  684. package/build/slot-fill/context.js +2 -4
  685. package/build/slot-fill/context.js.map +1 -1
  686. package/build/slot-fill/index.js +1 -2
  687. package/build/slot-fill/index.js.map +1 -1
  688. package/build/slot-fill/provider.js +1 -2
  689. package/build/slot-fill/provider.js.map +1 -1
  690. package/build/slot-fill/slot.js +1 -2
  691. package/build/slot-fill/slot.js.map +1 -1
  692. package/build/slot-fill/use-slot.js +1 -2
  693. package/build/slot-fill/use-slot.js.map +1 -1
  694. package/build/snackbar/index.js +19 -9
  695. package/build/snackbar/index.js.map +1 -1
  696. package/build/snackbar/list.js +1 -2
  697. package/build/snackbar/list.js.map +1 -1
  698. package/build/spacer/component.js +2 -4
  699. package/build/spacer/component.js.map +1 -1
  700. package/build/spinner/index.js +2 -4
  701. package/build/spinner/index.js.map +1 -1
  702. package/build/spinner/styles.js +3 -6
  703. package/build/spinner/styles.js.map +1 -1
  704. package/build/style-provider/index.js +3 -4
  705. package/build/style-provider/index.js.map +1 -1
  706. package/build/surface/component.js +2 -4
  707. package/build/surface/component.js.map +1 -1
  708. package/build/surface/hook.js +2 -2
  709. package/build/surface/hook.js.map +1 -1
  710. package/build/surface/styles.js +5 -10
  711. package/build/surface/styles.js.map +1 -1
  712. package/build/tab-panel/index.js +4 -6
  713. package/build/tab-panel/index.js.map +1 -1
  714. package/build/tabs/context.js +1 -2
  715. package/build/tabs/context.js.map +1 -1
  716. package/build/tabs/index.js +23 -20
  717. package/build/tabs/index.js.map +1 -1
  718. package/build/tabs/styles.js +5 -8
  719. package/build/tabs/styles.js.map +1 -1
  720. package/build/tabs/tab.js +1 -2
  721. package/build/tabs/tab.js.map +1 -1
  722. package/build/tabs/tablist.js +25 -4
  723. package/build/tabs/tablist.js.map +1 -1
  724. package/build/tabs/tabpanel.js +1 -2
  725. package/build/tabs/tabpanel.js.map +1 -1
  726. package/build/text/component.js +2 -4
  727. package/build/text/component.js.map +1 -1
  728. package/build/text/hook.js +2 -2
  729. package/build/text/hook.js.map +1 -1
  730. package/build/text/index.native.js +1 -2
  731. package/build/text/index.native.js.map +1 -1
  732. package/build/text/styles/emotion-css.native.js +1 -2
  733. package/build/text/styles/emotion-css.native.js.map +1 -1
  734. package/build/text/styles/font-family.native.js +1 -2
  735. package/build/text/styles/font-family.native.js.map +1 -1
  736. package/build/text/styles.js +7 -14
  737. package/build/text/styles.js.map +1 -1
  738. package/build/text-control/index.js +2 -4
  739. package/build/text-control/index.js.map +1 -1
  740. package/build/text-control/index.native.js +1 -2
  741. package/build/text-control/index.native.js.map +1 -1
  742. package/build/text-highlight/index.js +1 -2
  743. package/build/text-highlight/index.js.map +1 -1
  744. package/build/textarea-control/index.js +2 -4
  745. package/build/textarea-control/index.js.map +1 -1
  746. package/build/textarea-control/index.native.js +1 -2
  747. package/build/textarea-control/index.native.js.map +1 -1
  748. package/build/textarea-control/styles/textarea-control-styles.js +1 -2
  749. package/build/textarea-control/styles/textarea-control-styles.js.map +1 -1
  750. package/build/theme/index.js +1 -2
  751. package/build/theme/index.js.map +1 -1
  752. package/build/theme/styles.js +12 -8
  753. package/build/theme/styles.js.map +1 -1
  754. package/build/tip/index.js +1 -2
  755. package/build/tip/index.js.map +1 -1
  756. package/build/toggle-control/index.js +1 -2
  757. package/build/toggle-control/index.js.map +1 -1
  758. package/build/toggle-control/index.native.js +1 -2
  759. package/build/toggle-control/index.native.js.map +1 -1
  760. package/build/toggle-group-control/context.js +1 -2
  761. package/build/toggle-group-control/context.js.map +1 -1
  762. package/build/toggle-group-control/toggle-group-control/as-button-group.js +1 -2
  763. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  764. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +3 -4
  765. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  766. package/build/toggle-group-control/toggle-group-control/component.js +7 -8
  767. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  768. package/build/toggle-group-control/toggle-group-control/styles.js +2 -4
  769. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  770. package/build/toggle-group-control/toggle-group-control/utils.js +7 -1
  771. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  772. package/build/toggle-group-control/toggle-group-control-option/component.js +2 -4
  773. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  774. package/build/toggle-group-control/toggle-group-control-option-base/component.js +3 -4
  775. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  776. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +4 -8
  777. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  778. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +2 -4
  779. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  780. package/build/toolbar/toolbar/index.js +2 -4
  781. package/build/toolbar/toolbar/index.js.map +1 -1
  782. package/build/toolbar/toolbar/toolbar-container.js +4 -6
  783. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  784. package/build/toolbar/toolbar/toolbar-container.native.js +1 -2
  785. package/build/toolbar/toolbar/toolbar-container.native.js.map +1 -1
  786. package/build/toolbar/toolbar-button/index.js +2 -4
  787. package/build/toolbar/toolbar-button/index.js.map +1 -1
  788. package/build/toolbar/toolbar-button/toolbar-button-container.js +1 -2
  789. package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
  790. package/build/toolbar/toolbar-context/index.js +1 -2
  791. package/build/toolbar/toolbar-context/index.js.map +1 -1
  792. package/build/toolbar/toolbar-dropdown-menu/index.js +1 -2
  793. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  794. package/build/toolbar/toolbar-group/index.js +1 -2
  795. package/build/toolbar/toolbar-group/index.js.map +1 -1
  796. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +1 -2
  797. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  798. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js +1 -2
  799. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  800. package/build/toolbar/toolbar-group/toolbar-group-container.js +1 -2
  801. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  802. package/build/toolbar/toolbar-group/toolbar-group-container.native.js +1 -2
  803. package/build/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -1
  804. package/build/toolbar/toolbar-item/index.js +3 -4
  805. package/build/toolbar/toolbar-item/index.js.map +1 -1
  806. package/build/toolbar/toolbar-item/index.native.js +1 -2
  807. package/build/toolbar/toolbar-item/index.native.js.map +1 -1
  808. package/build/tools-panel/context.js +1 -2
  809. package/build/tools-panel/context.js.map +1 -1
  810. package/build/tools-panel/styles.js +8 -16
  811. package/build/tools-panel/styles.js.map +1 -1
  812. package/build/tools-panel/tools-panel/component.js +2 -4
  813. package/build/tools-panel/tools-panel/component.js.map +1 -1
  814. package/build/tools-panel/tools-panel/hook.js +2 -2
  815. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  816. package/build/tools-panel/tools-panel-header/component.js +1 -2
  817. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  818. package/build/tools-panel/tools-panel-header/hook.js +2 -2
  819. package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
  820. package/build/tools-panel/tools-panel-item/component.js +2 -4
  821. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  822. package/build/tools-panel/tools-panel-item/hook.js +2 -2
  823. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  824. package/build/tooltip/index.js +19 -19
  825. package/build/tooltip/index.js.map +1 -1
  826. package/build/tooltip/index.native.js +1 -2
  827. package/build/tooltip/index.native.js.map +1 -1
  828. package/build/tooltip/types.js.map +1 -1
  829. package/build/tree-grid/cell.js +2 -4
  830. package/build/tree-grid/cell.js.map +1 -1
  831. package/build/tree-grid/index.js +2 -4
  832. package/build/tree-grid/index.js.map +1 -1
  833. package/build/tree-grid/item.js +2 -4
  834. package/build/tree-grid/item.js.map +1 -1
  835. package/build/tree-grid/roving-tab-index-context.js +1 -2
  836. package/build/tree-grid/roving-tab-index-context.js.map +1 -1
  837. package/build/tree-grid/roving-tab-index-item.js +2 -4
  838. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  839. package/build/tree-grid/row.js +2 -4
  840. package/build/tree-grid/row.js.map +1 -1
  841. package/build/tree-select/index.js +2 -3
  842. package/build/tree-select/index.js.map +1 -1
  843. package/build/truncate/component.js +2 -4
  844. package/build/truncate/component.js.map +1 -1
  845. package/build/truncate/hook.js +2 -2
  846. package/build/truncate/hook.js.map +1 -1
  847. package/build/truncate/styles.js +1 -2
  848. package/build/truncate/styles.js.map +1 -1
  849. package/build/truncate/utils.js +3 -6
  850. package/build/truncate/utils.js.map +1 -1
  851. package/build/unit-control/index.js +3 -5
  852. package/build/unit-control/index.js.map +1 -1
  853. package/build/unit-control/index.native.js +1 -2
  854. package/build/unit-control/index.native.js.map +1 -1
  855. package/build/unit-control/styles/unit-control-styles.js +3 -6
  856. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  857. package/build/unit-control/unit-select-control.js +1 -2
  858. package/build/unit-control/unit-select-control.js.map +1 -1
  859. package/build/unit-control/utils.js +3 -6
  860. package/build/unit-control/utils.js.map +1 -1
  861. package/build/utils/base-label.js +1 -2
  862. package/build/utils/base-label.js.map +1 -1
  863. package/build/utils/box-sizing.js +1 -2
  864. package/build/utils/box-sizing.js.map +1 -1
  865. package/build/utils/breakpoint-values.js +1 -2
  866. package/build/utils/breakpoint-values.js.map +1 -1
  867. package/build/utils/colors-values.js +44 -24
  868. package/build/utils/colors-values.js.map +1 -1
  869. package/build/utils/config-values.js +1 -2
  870. package/build/utils/config-values.js.map +1 -1
  871. package/build/utils/font-size.js +3 -6
  872. package/build/utils/font-size.js.map +1 -1
  873. package/build/utils/font-values.js +1 -2
  874. package/build/utils/font-values.js.map +1 -1
  875. package/build/utils/hooks/use-controlled-state.js +1 -2
  876. package/build/utils/hooks/use-controlled-state.js.map +1 -1
  877. package/build/utils/hooks/use-update-effect.js +2 -3
  878. package/build/utils/hooks/use-update-effect.js.map +1 -1
  879. package/build/utils/input/base.js +2 -4
  880. package/build/utils/input/base.js.map +1 -1
  881. package/build/utils/input/input-control.js +1 -2
  882. package/build/utils/input/input-control.js.map +1 -1
  883. package/build/utils/use-deprecated-props.js +1 -15
  884. package/build/utils/use-deprecated-props.js.map +1 -1
  885. package/build/utils/use-responsive-value.js +2 -3
  886. package/build/utils/use-responsive-value.js.map +1 -1
  887. package/build/v-stack/component.js +2 -4
  888. package/build/v-stack/component.js.map +1 -1
  889. package/build/view/component.js +2 -4
  890. package/build/view/component.js.map +1 -1
  891. package/build/visually-hidden/component.js +2 -4
  892. package/build/visually-hidden/component.js.map +1 -1
  893. package/build/visually-hidden/styles.js +1 -2
  894. package/build/visually-hidden/styles.js.map +1 -1
  895. package/build/z-stack/component.js +2 -4
  896. package/build/z-stack/component.js.map +1 -1
  897. package/build/z-stack/styles.js +2 -4
  898. package/build/z-stack/styles.js.map +1 -1
  899. package/build-module/angle-picker-control/index.js +3 -13
  900. package/build-module/angle-picker-control/index.js.map +1 -1
  901. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +5 -17
  902. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  903. package/build-module/angle-picker-control/types.js.map +1 -1
  904. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  905. package/build-module/border-box-control/border-box-control/hook.js +3 -1
  906. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  907. package/build-module/border-box-control/types.js.map +1 -1
  908. package/build-module/border-control/border-control/component.js +5 -1
  909. package/build-module/border-control/border-control/component.js.map +1 -1
  910. package/build-module/border-control/border-control/hook.js +18 -15
  911. package/build-module/border-control/border-control/hook.js.map +1 -1
  912. package/build-module/border-control/border-control-dropdown/component.js +2 -1
  913. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  914. package/build-module/border-control/border-control-style-picker/component.js +21 -48
  915. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  916. package/build-module/border-control/styles.js +14 -24
  917. package/build-module/border-control/styles.js.map +1 -1
  918. package/build-module/border-control/types.js.map +1 -1
  919. package/build-module/box-control/all-input-control.js +38 -28
  920. package/build-module/box-control/all-input-control.js.map +1 -1
  921. package/build-module/box-control/axial-input-controls.js +42 -57
  922. package/build-module/box-control/axial-input-controls.js.map +1 -1
  923. package/build-module/box-control/index.js +22 -25
  924. package/build-module/box-control/index.js.map +1 -1
  925. package/build-module/box-control/input-controls.js +47 -40
  926. package/build-module/box-control/input-controls.js.map +1 -1
  927. package/build-module/box-control/styles/box-control-styles.js +45 -105
  928. package/build-module/box-control/styles/box-control-styles.js.map +1 -1
  929. package/build-module/box-control/types.js.map +1 -1
  930. package/build-module/box-control/utils.js +121 -7
  931. package/build-module/box-control/utils.js.map +1 -1
  932. package/build-module/button/index.js +14 -16
  933. package/build-module/button/index.js.map +1 -1
  934. package/build-module/button/index.native.js +0 -1
  935. package/build-module/button/index.native.js.map +1 -1
  936. package/build-module/button/types.js.map +1 -1
  937. package/build-module/checkbox-control/types.js.map +1 -1
  938. package/build-module/color-picker/hsl-input.js +55 -33
  939. package/build-module/color-picker/hsl-input.js.map +1 -1
  940. package/build-module/combobox-control/index.js +1 -2
  941. package/build-module/combobox-control/index.js.map +1 -1
  942. package/build-module/composite/current/index.js +15 -0
  943. package/build-module/composite/current/index.js.map +1 -0
  944. package/build-module/composite/index.js +6 -15
  945. package/build-module/composite/index.js.map +1 -1
  946. package/build-module/composite/legacy/index.js +117 -0
  947. package/build-module/composite/legacy/index.js.map +1 -0
  948. package/build-module/composite/v2.js +3 -13
  949. package/build-module/composite/v2.js.map +1 -1
  950. package/build-module/confirm-dialog/component.js +2 -0
  951. package/build-module/confirm-dialog/component.js.map +1 -1
  952. package/build-module/context/wordpress-component.js.map +1 -1
  953. package/build-module/custom-gradient-picker/index.js +2 -15
  954. package/build-module/custom-gradient-picker/index.js.map +1 -1
  955. package/build-module/custom-gradient-picker/types.js.map +1 -1
  956. package/build-module/custom-select-control/index.js +1 -1
  957. package/build-module/custom-select-control/index.js.map +1 -1
  958. package/build-module/custom-select-control-v2/index.js +6 -3
  959. package/build-module/custom-select-control-v2/index.js.map +1 -1
  960. package/build-module/date-time/time/timezone.js +1 -1
  961. package/build-module/date-time/time/timezone.js.map +1 -1
  962. package/build-module/dropdown-menu-v2/styles.js +14 -14
  963. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  964. package/build-module/external-link/index.js +1 -1
  965. package/build-module/focal-point-picker/index.js +2 -2
  966. package/build-module/focal-point-picker/index.js.map +1 -1
  967. package/build-module/focal-point-picker/index.native.js +0 -1
  968. package/build-module/focal-point-picker/index.native.js.map +1 -1
  969. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +29 -37
  970. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  971. package/build-module/focal-point-picker/styles/focal-point-style.js +10 -2
  972. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  973. package/build-module/font-size-picker/font-size-picker-toggle-group.js +1 -2
  974. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  975. package/build-module/font-size-picker/index.js +3 -17
  976. package/build-module/font-size-picker/index.js.map +1 -1
  977. package/build-module/font-size-picker/styles.js +14 -20
  978. package/build-module/font-size-picker/styles.js.map +1 -1
  979. package/build-module/font-size-picker/types.js.map +1 -1
  980. package/build-module/form-token-field/index.js +1 -6
  981. package/build-module/form-token-field/index.js.map +1 -1
  982. package/build-module/form-token-field/suggestions-list.js +0 -1
  983. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  984. package/build-module/gradient-picker/index.js +18 -41
  985. package/build-module/gradient-picker/index.js.map +1 -1
  986. package/build-module/gradient-picker/types.js.map +1 -1
  987. package/build-module/input-control/backdrop.js +2 -0
  988. package/build-module/input-control/backdrop.js.map +1 -1
  989. package/build-module/input-control/index.js +1 -1
  990. package/build-module/input-control/index.js.map +1 -1
  991. package/build-module/input-control/input-base.js +6 -4
  992. package/build-module/input-control/input-base.js.map +1 -1
  993. package/build-module/input-control/styles/input-control-styles.js +25 -23
  994. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  995. package/build-module/input-control/types.js.map +1 -1
  996. package/build-module/isolated-event-container/index.js +0 -1
  997. package/build-module/isolated-event-container/index.js.map +1 -1
  998. package/build-module/item-group/styles.js +10 -10
  999. package/build-module/item-group/styles.js.map +1 -1
  1000. package/build-module/mobile/image/index.native.js +83 -8
  1001. package/build-module/mobile/image/index.native.js.map +1 -1
  1002. package/build-module/navigation/menu/menu-title-search.js +4 -6
  1003. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  1004. package/build-module/navigation/styles/navigation-styles.js +23 -24
  1005. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  1006. package/build-module/number-control/index.js +1 -1
  1007. package/build-module/number-control/index.js.map +1 -1
  1008. package/build-module/palette-edit/index.js +10 -15
  1009. package/build-module/palette-edit/index.js.map +1 -1
  1010. package/build-module/palette-edit/styles.js +43 -33
  1011. package/build-module/palette-edit/styles.js.map +1 -1
  1012. package/build-module/popover/index.js +2 -0
  1013. package/build-module/popover/index.js.map +1 -1
  1014. package/build-module/popover/types.js.map +1 -1
  1015. package/build-module/query-controls/index.js +5 -5
  1016. package/build-module/query-controls/index.js.map +1 -1
  1017. package/build-module/query-controls/index.native.js +4 -4
  1018. package/build-module/query-controls/index.native.js.map +1 -1
  1019. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
  1020. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  1021. package/build-module/search-control/index.js +67 -57
  1022. package/build-module/search-control/index.js.map +1 -1
  1023. package/build-module/search-control/styles.js +29 -0
  1024. package/build-module/search-control/styles.js.map +1 -0
  1025. package/build-module/search-control/types.js.map +1 -1
  1026. package/build-module/select-control/index.js +1 -1
  1027. package/build-module/select-control/index.js.map +1 -1
  1028. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js +1 -1
  1029. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
  1030. package/build-module/snackbar/index.js +18 -6
  1031. package/build-module/snackbar/index.js.map +1 -1
  1032. package/build-module/tabs/index.js +21 -17
  1033. package/build-module/tabs/index.js.map +1 -1
  1034. package/build-module/tabs/tablist.js +22 -0
  1035. package/build-module/tabs/tablist.js.map +1 -1
  1036. package/build-module/theme/styles.js +11 -2
  1037. package/build-module/theme/styles.js.map +1 -1
  1038. package/build-module/toggle-group-control/toggle-group-control/utils.js +7 -1
  1039. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  1040. package/build-module/tooltip/index.js +16 -13
  1041. package/build-module/tooltip/index.js.map +1 -1
  1042. package/build-module/tooltip/types.js.map +1 -1
  1043. package/build-module/tree-select/index.js +1 -1
  1044. package/build-module/tree-select/index.js.map +1 -1
  1045. package/build-module/unit-control/index.js +1 -1
  1046. package/build-module/unit-control/index.js.map +1 -1
  1047. package/build-module/utils/colors-values.js +42 -19
  1048. package/build-module/utils/colors-values.js.map +1 -1
  1049. package/build-module/utils/hooks/use-update-effect.js +1 -1
  1050. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  1051. package/build-module/utils/use-deprecated-props.js +1 -13
  1052. package/build-module/utils/use-deprecated-props.js.map +1 -1
  1053. package/build-module/utils/use-responsive-value.js +2 -3
  1054. package/build-module/utils/use-responsive-value.js.map +1 -1
  1055. package/build-style/style-rtl.css +28 -113
  1056. package/build-style/style.css +28 -113
  1057. package/build-types/angle-picker-control/index.d.ts +0 -1
  1058. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  1059. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +0 -6
  1060. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
  1061. package/build-types/angle-picker-control/types.d.ts +2 -0
  1062. package/build-types/angle-picker-control/types.d.ts.map +1 -1
  1063. package/build-types/border-box-control/border-box-control/component.d.ts +1 -0
  1064. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  1065. package/build-types/border-box-control/border-box-control/hook.d.ts +4 -4
  1066. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  1067. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +5 -5
  1068. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +4 -4
  1069. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +4 -4
  1070. package/build-types/border-box-control/stories/index.story.d.ts +2 -1
  1071. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  1072. package/build-types/border-box-control/types.d.ts +6 -0
  1073. package/build-types/border-box-control/types.d.ts.map +1 -1
  1074. package/build-types/border-control/border-control/component.d.ts +1 -0
  1075. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  1076. package/build-types/border-control/border-control/hook.d.ts +6 -4
  1077. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  1078. package/build-types/border-control/border-control-dropdown/component.d.ts +1 -0
  1079. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  1080. package/build-types/border-control/border-control-dropdown/hook.d.ts +5 -4
  1081. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  1082. package/build-types/border-control/border-control-style-picker/component.d.ts +3 -4
  1083. package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
  1084. package/build-types/border-control/stories/index.story.d.ts +12 -6
  1085. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  1086. package/build-types/border-control/styles.d.ts +0 -2
  1087. package/build-types/border-control/styles.d.ts.map +1 -1
  1088. package/build-types/border-control/types.d.ts +12 -1
  1089. package/build-types/border-control/types.d.ts.map +1 -1
  1090. package/build-types/box-control/all-input-control.d.ts +1 -1
  1091. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  1092. package/build-types/box-control/axial-input-controls.d.ts +1 -1
  1093. package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
  1094. package/build-types/box-control/index.d.ts +1 -1
  1095. package/build-types/box-control/index.d.ts.map +1 -1
  1096. package/build-types/box-control/input-controls.d.ts +1 -1
  1097. package/build-types/box-control/input-controls.d.ts.map +1 -1
  1098. package/build-types/box-control/stories/index.story.d.ts +42 -36
  1099. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  1100. package/build-types/box-control/styles/box-control-styles.d.ts +49 -23
  1101. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
  1102. package/build-types/box-control/types.d.ts +12 -12
  1103. package/build-types/box-control/types.d.ts.map +1 -1
  1104. package/build-types/box-control/utils.d.ts +2 -1
  1105. package/build-types/box-control/utils.d.ts.map +1 -1
  1106. package/build-types/button/deprecated.d.ts +3 -3
  1107. package/build-types/button/index.d.ts.map +1 -1
  1108. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  1109. package/build-types/button/types.d.ts +7 -3
  1110. package/build-types/button/types.d.ts.map +1 -1
  1111. package/build-types/card/card/hook.d.ts +4 -4
  1112. package/build-types/card/card-body/hook.d.ts +4 -4
  1113. package/build-types/card/card-divider/hook.d.ts +4 -4
  1114. package/build-types/card/card-footer/hook.d.ts +4 -4
  1115. package/build-types/card/card-header/hook.d.ts +4 -4
  1116. package/build-types/card/card-media/hook.d.ts +4 -4
  1117. package/build-types/card/stories/index.story.d.ts +2 -2
  1118. package/build-types/checkbox-control/stories/index.story.d.ts +11 -0
  1119. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  1120. package/build-types/checkbox-control/types.d.ts +2 -3
  1121. package/build-types/checkbox-control/types.d.ts.map +1 -1
  1122. package/build-types/color-palette/styles.d.ts +2 -2
  1123. package/build-types/color-picker/component.d.ts +1 -1
  1124. package/build-types/color-picker/hsl-input.d.ts.map +1 -1
  1125. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  1126. package/build-types/color-picker/styles.d.ts +3 -3
  1127. package/build-types/combobox-control/index.d.ts.map +1 -1
  1128. package/build-types/composite/current/index.d.ts +12 -0
  1129. package/build-types/composite/current/index.d.ts.map +1 -0
  1130. package/build-types/composite/current/stories/index.story.d.ts +13 -0
  1131. package/build-types/composite/current/stories/index.story.d.ts.map +1 -0
  1132. package/build-types/composite/current/stories/utils.d.ts +15 -0
  1133. package/build-types/composite/current/stories/utils.d.ts.map +1 -0
  1134. package/build-types/composite/index.d.ts +1 -14
  1135. package/build-types/composite/index.d.ts.map +1 -1
  1136. package/build-types/composite/legacy/index.d.ts +84 -0
  1137. package/build-types/composite/legacy/index.d.ts.map +1 -0
  1138. package/build-types/composite/legacy/stories/index.story.d.ts +12 -0
  1139. package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -0
  1140. package/build-types/composite/legacy/stories/utils.d.ts +15 -0
  1141. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -0
  1142. package/build-types/composite/legacy/test/index.d.ts.map +1 -0
  1143. package/build-types/composite/v2.d.ts +1 -11
  1144. package/build-types/composite/v2.d.ts.map +1 -1
  1145. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  1146. package/build-types/custom-gradient-picker/index.d.ts +1 -3
  1147. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  1148. package/build-types/custom-gradient-picker/types.d.ts +2 -0
  1149. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  1150. package/build-types/custom-select-control/index.d.ts.map +1 -1
  1151. package/build-types/custom-select-control/styles.d.ts +2 -2
  1152. package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
  1153. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  1154. package/build-types/custom-select-control-v2/test/index.d.ts +2 -0
  1155. package/build-types/custom-select-control-v2/test/index.d.ts.map +1 -0
  1156. package/build-types/date-time/date/styles.d.ts +3 -3
  1157. package/build-types/date-time/date-time/styles.d.ts +1 -1
  1158. package/build-types/date-time/time/styles.d.ts +4 -4
  1159. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  1160. package/build-types/elevation/hook.d.ts +4 -4
  1161. package/build-types/flex/flex/hook.d.ts +4 -4
  1162. package/build-types/flex/flex-block/hook.d.ts +4 -4
  1163. package/build-types/flex/flex-item/hook.d.ts +4 -4
  1164. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
  1165. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  1166. package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
  1167. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  1168. package/build-types/font-size-picker/index.d.ts.map +1 -1
  1169. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  1170. package/build-types/font-size-picker/styles.d.ts +1 -7
  1171. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  1172. package/build-types/font-size-picker/types.d.ts +3 -1
  1173. package/build-types/font-size-picker/types.d.ts.map +1 -1
  1174. package/build-types/form-token-field/index.d.ts.map +1 -1
  1175. package/build-types/gradient-picker/index.d.ts +1 -4
  1176. package/build-types/gradient-picker/index.d.ts.map +1 -1
  1177. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  1178. package/build-types/gradient-picker/types.d.ts +2 -0
  1179. package/build-types/gradient-picker/types.d.ts.map +1 -1
  1180. package/build-types/grid/hook.d.ts +4 -4
  1181. package/build-types/h-stack/hook.d.ts +4 -4
  1182. package/build-types/heading/component.d.ts +1 -1
  1183. package/build-types/heading/hook.d.ts +4 -4
  1184. package/build-types/input-control/backdrop.d.ts +2 -1
  1185. package/build-types/input-control/backdrop.d.ts.map +1 -1
  1186. package/build-types/input-control/index.d.ts.map +1 -1
  1187. package/build-types/input-control/input-base.d.ts +1 -3
  1188. package/build-types/input-control/input-base.d.ts.map +1 -1
  1189. package/build-types/input-control/styles/input-control-styles.d.ts +1 -0
  1190. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  1191. package/build-types/input-control/types.d.ts +7 -1
  1192. package/build-types/input-control/types.d.ts.map +1 -1
  1193. package/build-types/item-group/item/hook.d.ts +4 -4
  1194. package/build-types/item-group/item-group/hook.d.ts +4 -4
  1195. package/build-types/item-group/styles.d.ts.map +1 -1
  1196. package/build-types/menu-item/index.d.ts +1 -1
  1197. package/build-types/menu-item/stories/index.story.d.ts +4 -4
  1198. package/build-types/navigation/styles/navigation-styles.d.ts +6 -13
  1199. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  1200. package/build-types/navigator/navigator-back-button/hook.d.ts +4 -4
  1201. package/build-types/navigator/navigator-button/hook.d.ts +4 -4
  1202. package/build-types/number-control/index.d.ts +1 -1
  1203. package/build-types/number-control/index.d.ts.map +1 -1
  1204. package/build-types/number-control/stories/index.story.d.ts +1 -1
  1205. package/build-types/palette-edit/index.d.ts.map +1 -1
  1206. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  1207. package/build-types/palette-edit/styles.d.ts +17 -23
  1208. package/build-types/palette-edit/styles.d.ts.map +1 -1
  1209. package/build-types/popover/index.d.ts.map +1 -1
  1210. package/build-types/popover/types.d.ts +9 -0
  1211. package/build-types/popover/types.d.ts.map +1 -1
  1212. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  1213. package/build-types/range-control/index.d.ts +1 -1
  1214. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  1215. package/build-types/resizable-box/index.d.ts +1 -1
  1216. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  1217. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  1218. package/build-types/scrollable/hook.d.ts +4 -4
  1219. package/build-types/search-control/index.d.ts +4 -9
  1220. package/build-types/search-control/index.d.ts.map +1 -1
  1221. package/build-types/search-control/stories/index.story.d.ts +2 -18
  1222. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  1223. package/build-types/search-control/styles.d.ts +10 -0
  1224. package/build-types/search-control/styles.d.ts.map +1 -0
  1225. package/build-types/search-control/test/index.d.ts +2 -0
  1226. package/build-types/search-control/test/index.d.ts.map +1 -0
  1227. package/build-types/search-control/types.d.ts +34 -18
  1228. package/build-types/search-control/types.d.ts.map +1 -1
  1229. package/build-types/select-control/index.d.ts.map +1 -1
  1230. package/build-types/snackbar/index.d.ts.map +1 -1
  1231. package/build-types/spacer/hook.d.ts +4 -4
  1232. package/build-types/surface/hook.d.ts +4 -4
  1233. package/build-types/tabs/index.d.ts.map +1 -1
  1234. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  1235. package/build-types/tabs/tablist.d.ts.map +1 -1
  1236. package/build-types/text/hook.d.ts +4 -4
  1237. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  1238. package/build-types/theme/styles.d.ts.map +1 -1
  1239. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  1240. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts.map +1 -1
  1241. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  1242. package/build-types/toolbar/toolbar-button/index.d.ts +3 -3
  1243. package/build-types/tools-panel/tools-panel/hook.d.ts +4 -4
  1244. package/build-types/tools-panel/tools-panel-header/hook.d.ts +4 -4
  1245. package/build-types/tools-panel/tools-panel-item/hook.d.ts +4 -4
  1246. package/build-types/tooltip/index.d.ts +1 -1
  1247. package/build-types/tooltip/index.d.ts.map +1 -1
  1248. package/build-types/tooltip/stories/index.story.d.ts +1 -1
  1249. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  1250. package/build-types/tooltip/types.d.ts +1 -1
  1251. package/build-types/tooltip/types.d.ts.map +1 -1
  1252. package/build-types/tree-select/index.d.ts.map +1 -1
  1253. package/build-types/truncate/hook.d.ts +4 -4
  1254. package/build-types/unit-control/index.d.ts +1 -1
  1255. package/build-types/unit-control/index.d.ts.map +1 -1
  1256. package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
  1257. package/build-types/utils/colors-values.d.ts +28 -1
  1258. package/build-types/utils/colors-values.d.ts.map +1 -1
  1259. package/build-types/utils/hooks/use-update-effect.d.ts +1 -1
  1260. package/build-types/utils/use-deprecated-props.d.ts +1 -5
  1261. package/build-types/utils/use-deprecated-props.d.ts.map +1 -1
  1262. package/build-types/v-stack/hook.d.ts +4 -4
  1263. package/build-types/v-stack/stories/index.story.d.ts +1 -1
  1264. package/package.json +19 -20
  1265. package/src/angle-picker-control/README.md +0 -8
  1266. package/src/angle-picker-control/index.tsx +4 -23
  1267. package/src/angle-picker-control/stories/index.story.tsx +0 -3
  1268. package/src/angle-picker-control/styles/angle-picker-control-styles.tsx +0 -18
  1269. package/src/angle-picker-control/types.ts +2 -0
  1270. package/src/border-box-control/border-box-control/component.tsx +0 -1
  1271. package/src/border-box-control/border-box-control/hook.ts +5 -1
  1272. package/src/border-box-control/types.ts +6 -0
  1273. package/src/border-control/border-control/component.tsx +4 -0
  1274. package/src/border-control/border-control/hook.ts +22 -16
  1275. package/src/border-control/border-control-dropdown/component.tsx +2 -1
  1276. package/src/border-control/border-control-style-picker/component.tsx +31 -66
  1277. package/src/border-control/styles.ts +0 -15
  1278. package/src/border-control/types.ts +15 -1
  1279. package/src/box-control/all-input-control.tsx +57 -34
  1280. package/src/box-control/axial-input-controls.tsx +79 -69
  1281. package/src/box-control/index.tsx +47 -54
  1282. package/src/box-control/input-controls.tsx +114 -83
  1283. package/src/box-control/styles/box-control-styles.ts +21 -61
  1284. package/src/box-control/test/index.tsx +126 -18
  1285. package/src/box-control/types.ts +10 -21
  1286. package/src/box-control/utils.ts +43 -8
  1287. package/src/button/README.md +1 -1
  1288. package/src/button/index.tsx +21 -33
  1289. package/src/button/stories/e2e/index.story.tsx +6 -0
  1290. package/src/button/style.scss +17 -5
  1291. package/src/button/test/index.tsx +122 -0
  1292. package/src/button/types.ts +7 -3
  1293. package/src/card/test/__snapshots__/index.tsx.snap +3 -3
  1294. package/src/checkbox-control/README.md +1 -2
  1295. package/src/checkbox-control/stories/index.story.tsx +44 -0
  1296. package/src/checkbox-control/test/index.tsx +2 -2
  1297. package/src/checkbox-control/types.ts +2 -3
  1298. package/src/circular-option-picker/test/index.tsx +10 -16
  1299. package/src/color-picker/hsl-input.tsx +56 -30
  1300. package/src/color-picker/test/index.tsx +190 -16
  1301. package/src/combobox-control/index.tsx +1 -4
  1302. package/src/composite/current/index.ts +22 -0
  1303. package/src/composite/current/stories/index.story.tsx +86 -0
  1304. package/src/composite/current/stories/utils.tsx +61 -0
  1305. package/src/composite/index.ts +6 -21
  1306. package/src/composite/legacy/index.tsx +191 -0
  1307. package/src/composite/legacy/stories/index.story.tsx +205 -0
  1308. package/src/composite/legacy/stories/utils.tsx +67 -0
  1309. package/src/composite/legacy/test/index.tsx +579 -0
  1310. package/src/composite/v2.ts +3 -21
  1311. package/src/confirm-dialog/component.tsx +2 -0
  1312. package/src/context/wordpress-component.ts +1 -1
  1313. package/src/custom-gradient-picker/index.tsx +1 -22
  1314. package/src/custom-gradient-picker/stories/index.story.tsx +0 -3
  1315. package/src/custom-gradient-picker/style.scss +0 -7
  1316. package/src/custom-gradient-picker/types.ts +2 -0
  1317. package/src/custom-select-control/index.js +1 -5
  1318. package/src/custom-select-control-v2/index.tsx +7 -2
  1319. package/src/custom-select-control-v2/stories/index.story.tsx +1 -0
  1320. package/src/custom-select-control-v2/test/index.tsx +219 -0
  1321. package/src/date-time/time/timezone.tsx +1 -1
  1322. package/src/dimension-control/test/__snapshots__/index.test.js.snap +16 -16
  1323. package/src/divider/README.md +1 -1
  1324. package/src/dropdown-menu-v2/stories/index.story.tsx +1 -0
  1325. package/src/dropdown-menu-v2/styles.ts +1 -1
  1326. package/src/focal-point-picker/index.tsx +2 -2
  1327. package/src/focal-point-picker/styles/focal-point-picker-style.ts +26 -10
  1328. package/src/focal-point-picker/styles/focal-point-style.ts +21 -7
  1329. package/src/font-size-picker/README.md +0 -8
  1330. package/src/font-size-picker/font-size-picker-toggle-group.tsx +2 -9
  1331. package/src/font-size-picker/index.tsx +3 -21
  1332. package/src/font-size-picker/stories/index.story.tsx +0 -1
  1333. package/src/font-size-picker/styles.ts +0 -7
  1334. package/src/font-size-picker/test/index.tsx +16 -99
  1335. package/src/font-size-picker/types.ts +3 -1
  1336. package/src/form-token-field/index.tsx +1 -4
  1337. package/src/gradient-picker/README.md +0 -8
  1338. package/src/gradient-picker/index.tsx +32 -56
  1339. package/src/gradient-picker/stories/index.story.tsx +0 -1
  1340. package/src/gradient-picker/types.ts +2 -0
  1341. package/src/guide/style.scss +1 -1
  1342. package/src/input-control/backdrop.tsx +6 -1
  1343. package/src/input-control/index.tsx +1 -5
  1344. package/src/input-control/input-base.tsx +14 -7
  1345. package/src/input-control/styles/input-control-styles.tsx +6 -3
  1346. package/src/input-control/types.ts +10 -1
  1347. package/src/item-group/styles.ts +1 -4
  1348. package/src/mobile/image/index.native.js +117 -12
  1349. package/src/mobile/image/style.native.scss +6 -0
  1350. package/src/modal/style.scss +1 -1
  1351. package/src/navigation/menu/menu-title-search.tsx +6 -6
  1352. package/src/navigation/styles/navigation-styles.tsx +5 -27
  1353. package/src/number-control/index.tsx +1 -5
  1354. package/src/palette-edit/index.tsx +18 -16
  1355. package/src/palette-edit/stories/index.story.tsx +1 -0
  1356. package/src/palette-edit/{styles.js → styles.ts} +56 -13
  1357. package/src/palette-edit/test/index.tsx +326 -10
  1358. package/src/placeholder/style.scss +6 -5
  1359. package/src/popover/index.tsx +2 -0
  1360. package/src/popover/style.scss +1 -0
  1361. package/src/popover/test/index.tsx +250 -0
  1362. package/src/popover/types.ts +9 -0
  1363. package/src/progress-bar/stories/index.story.tsx +1 -0
  1364. package/src/query-controls/index.native.js +4 -4
  1365. package/src/query-controls/index.tsx +5 -5
  1366. package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +3 -3
  1367. package/src/search-control/README.md +23 -3
  1368. package/src/search-control/index.tsx +88 -70
  1369. package/src/search-control/stories/index.story.tsx +1 -1
  1370. package/src/search-control/styles.ts +42 -0
  1371. package/src/search-control/test/index.tsx +107 -0
  1372. package/src/search-control/types.ts +37 -22
  1373. package/src/select-control/index.tsx +1 -5
  1374. package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +1 -1
  1375. package/src/snackbar/index.tsx +19 -6
  1376. package/src/style.scss +0 -1
  1377. package/src/tabs/index.tsx +31 -27
  1378. package/src/tabs/stories/index.story.tsx +1 -0
  1379. package/src/tabs/tablist.tsx +19 -0
  1380. package/src/tabs/test/index.tsx +105 -47
  1381. package/src/theme/stories/index.story.tsx +1 -0
  1382. package/src/theme/styles.ts +3 -1
  1383. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +14 -14
  1384. package/src/toggle-group-control/test/index.tsx +73 -36
  1385. package/src/toggle-group-control/toggle-group-control/utils.ts +8 -3
  1386. package/src/toolbar/toolbar-button/README.md +2 -2
  1387. package/src/toolbar/toolbar-dropdown-menu/README.md +2 -2
  1388. package/src/toolbar/toolbar-item/README.md +2 -2
  1389. package/src/tooltip/index.tsx +29 -29
  1390. package/src/tooltip/test/index.tsx +32 -13
  1391. package/src/tooltip/types.ts +1 -1
  1392. package/src/tree-select/index.tsx +1 -5
  1393. package/src/unit-control/index.tsx +1 -5
  1394. package/src/utils/colors-values.js +45 -23
  1395. package/src/utils/hooks/use-update-effect.js +1 -1
  1396. package/src/utils/use-deprecated-props.ts +1 -18
  1397. package/tsconfig.tsbuildinfo +1 -1
  1398. package/build/border-control/border-control-style-picker/hook.js +0 -41
  1399. package/build/border-control/border-control-style-picker/hook.js.map +0 -1
  1400. package/build/box-control/styles/box-control-visualizer-styles.js +0 -93
  1401. package/build/box-control/styles/box-control-visualizer-styles.js.map +0 -1
  1402. package/build/box-control/unit-control.js +0 -76
  1403. package/build/box-control/unit-control.js.map +0 -1
  1404. package/build-module/border-control/border-control-style-picker/hook.js +0 -32
  1405. package/build-module/border-control/border-control-style-picker/hook.js.map +0 -1
  1406. package/build-module/box-control/styles/box-control-visualizer-styles.js +0 -86
  1407. package/build-module/box-control/styles/box-control-visualizer-styles.js.map +0 -1
  1408. package/build-module/box-control/unit-control.js +0 -68
  1409. package/build-module/box-control/unit-control.js.map +0 -1
  1410. package/build-types/border-control/border-control-style-picker/hook.d.ts +0 -267
  1411. package/build-types/border-control/border-control-style-picker/hook.d.ts.map +0 -1
  1412. package/build-types/box-control/styles/box-control-visualizer-styles.d.ts +0 -46
  1413. package/build-types/box-control/styles/box-control-visualizer-styles.d.ts.map +0 -1
  1414. package/build-types/box-control/unit-control.d.ts +0 -4
  1415. package/build-types/box-control/unit-control.d.ts.map +0 -1
  1416. package/build-types/composite/test/index.d.ts.map +0 -1
  1417. package/src/border-control/border-control-style-picker/hook.ts +0 -35
  1418. package/src/box-control/styles/box-control-visualizer-styles.ts +0 -75
  1419. package/src/box-control/unit-control.tsx +0 -74
  1420. package/src/composite/test/index.tsx +0 -576
  1421. package/src/search-control/style.scss +0 -71
  1422. /package/build-types/composite/{test → legacy/test}/index.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["_dom","require","_element","_keycodes","_rovingTabIndex","_interopRequireDefault","_row","_cell","_item","getRowFocusables","rowElement","focusablesInRow","focus","focusable","find","sequential","filter","closest","UnforwardedTreeGrid","children","onExpandRow","onCollapseRow","onFocusRow","applicationAriaLabel","props","ref","onKeyDown","useCallback","event","keyCode","metaKey","ctrlKey","altKey","hasModifierKeyPressed","UP","DOWN","LEFT","RIGHT","HOME","END","includes","stopPropagation","activeElement","document","currentTarget","treeGridElement","contains","activeRow","currentColumnIndex","indexOf","canExpandCollapse","cannotFocusNextColumn","getAttribute","nextIndex","Math","max","min","length","_activeRow$getAttribu","preventDefault","level","parseInt","rows","Array","from","querySelectorAll","parentRow","currentRowIndex","i","ariaLevel","focusableItems","nextRowIndex","focusablesInNextRow","_react","createElement","default","role","TreeGrid","forwardRef","exports","_default"],"sources":["@wordpress/components/src/tree-grid/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { forwardRef, useCallback } from '@wordpress/element';\nimport { UP, DOWN, LEFT, RIGHT, HOME, END } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexContainer from './roving-tab-index';\nimport type { TreeGridProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * Return focusables in a row element, excluding those from other branches\n * nested within the row.\n *\n * @param rowElement The DOM element representing the row.\n *\n * @return The array of focusables in the row.\n */\nfunction getRowFocusables( rowElement: HTMLElement ) {\n\tconst focusablesInRow = focus.focusable.find( rowElement, {\n\t\tsequential: true,\n\t} );\n\n\treturn focusablesInRow.filter( ( focusable ) => {\n\t\treturn focusable.closest( '[role=\"row\"]' ) === rowElement;\n\t} );\n}\n\n/**\n * Renders both a table and tbody element, used to create a tree hierarchy.\n *\n */\nfunction UnforwardedTreeGrid(\n\t{\n\t\tchildren,\n\t\tonExpandRow = () => {},\n\t\tonCollapseRow = () => {},\n\t\tonFocusRow = () => {},\n\t\tapplicationAriaLabel,\n\t\t...props\n\t}: WordPressComponentProps< TreeGridProps, 'table', false >,\n\t/** A ref to the underlying DOM table element. */\n\tref: React.ForwardedRef< HTMLTableElement >\n) {\n\tconst onKeyDown = useCallback(\n\t\t( event: React.KeyboardEvent< HTMLTableElement > ) => {\n\t\t\tconst { keyCode, metaKey, ctrlKey, altKey } = event;\n\n\t\t\t// The shift key is intentionally absent from the following list,\n\t\t\t// to enable shift + up/down to select items from the list.\n\t\t\tconst hasModifierKeyPressed = metaKey || ctrlKey || altKey;\n\n\t\t\tif (\n\t\t\t\thasModifierKeyPressed ||\n\t\t\t\t! ( [ UP, DOWN, LEFT, RIGHT, HOME, END ] as number[] ).includes(\n\t\t\t\t\tkeyCode\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The event will be handled, stop propagation.\n\t\t\tevent.stopPropagation();\n\n\t\t\tconst { activeElement } = document;\n\t\t\tconst { currentTarget: treeGridElement } = event;\n\n\t\t\tif (\n\t\t\t\t! activeElement ||\n\t\t\t\t! treeGridElement.contains( activeElement )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Calculate the columnIndex of the active element.\n\t\t\tconst activeRow =\n\t\t\t\tactiveElement.closest< HTMLElement >( '[role=\"row\"]' );\n\n\t\t\tif ( ! activeRow ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst focusablesInRow = getRowFocusables( activeRow );\n\t\t\tconst currentColumnIndex = focusablesInRow.indexOf(\n\t\t\t\tactiveElement as HTMLElement\n\t\t\t);\n\t\t\tconst canExpandCollapse = 0 === currentColumnIndex;\n\t\t\tconst cannotFocusNextColumn =\n\t\t\t\tcanExpandCollapse &&\n\t\t\t\t( activeRow.getAttribute( 'data-expanded' ) === 'false' ||\n\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'false' ) &&\n\t\t\t\tkeyCode === RIGHT;\n\n\t\t\tif ( ( [ LEFT, RIGHT ] as number[] ).includes( keyCode ) ) {\n\t\t\t\t// Calculate to the next element.\n\t\t\t\tlet nextIndex;\n\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\tnextIndex = Math.max( 0, currentColumnIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextIndex = Math.min(\n\t\t\t\t\t\tcurrentColumnIndex + 1,\n\t\t\t\t\t\tfocusablesInRow.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is at the left most column.\n\t\t\t\tif ( canExpandCollapse ) {\n\t\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\t\t// Left:\n\t\t\t\t\t\t// If a row is focused, and it is expanded, collapses the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'data-expanded' ) ===\n\t\t\t\t\t\t\t\t'true' ||\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'true'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonCollapseRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, moves to the parent row (if there is one).\n\t\t\t\t\t\tconst level = Math.max(\n\t\t\t\t\t\t\tparseInt(\n\t\t\t\t\t\t\t\tactiveRow?.getAttribute( 'aria-level' ) ?? '1',\n\t\t\t\t\t\t\t\t10\n\t\t\t\t\t\t\t) - 1,\n\t\t\t\t\t\t\t1\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst rows = Array.from(\n\t\t\t\t\t\t\ttreeGridElement.querySelectorAll< HTMLElement >(\n\t\t\t\t\t\t\t\t'[role=\"row\"]'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tlet parentRow = activeRow;\n\t\t\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\t\t\tfor ( let i = currentRowIndex; i >= 0; i-- ) {\n\t\t\t\t\t\t\tconst ariaLevel =\n\t\t\t\t\t\t\t\trows[ i ].getAttribute( 'aria-level' );\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tariaLevel !== null &&\n\t\t\t\t\t\t\t\tparseInt( ariaLevel, 10 ) === level\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tparentRow = rows[ i ];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgetRowFocusables( parentRow )?.[ 0 ]?.focus();\n\t\t\t\t\t}\n\t\t\t\t\tif ( keyCode === RIGHT ) {\n\t\t\t\t\t\t// Right:\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, expands the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'data-expanded' ) ===\n\t\t\t\t\t\t\t\t'false' ||\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) ===\n\t\t\t\t\t\t\t\t'false'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonExpandRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is expanded, focuses the next cell in the row.\n\t\t\t\t\t\tconst focusableItems = getRowFocusables( activeRow );\n\t\t\t\t\t\tif ( focusableItems.length > 0 ) {\n\t\t\t\t\t\t\tfocusableItems[ nextIndex ]?.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start reading text on continued use of left/right arrow\n\t\t\t\t\t// keys.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Focus the next element. If at most left column and row is collapsed, moving right is not allowed as this will expand. However, if row is collapsed, moving left is allowed.\n\t\t\t\tif ( cannotFocusNextColumn ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfocusablesInRow[ nextIndex ].focus();\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( ( [ UP, DOWN ] as number[] ).includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll< HTMLElement >(\n\t\t\t\t\t\t'[role=\"row\"]'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === UP ) {\n\t\t\t\t\tnextRowIndex = Math.max( 0, currentRowIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = Math.min(\n\t\t\t\t\t\tcurrentRowIndex + 1,\n\t\t\t\t\t\trows.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( ( [ HOME, END ] as number[] ).includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll< HTMLElement >(\n\t\t\t\t\t\t'[role=\"row\"]'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === HOME ) {\n\t\t\t\t\tnextRowIndex = 0;\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = rows.length - 1;\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ onExpandRow, onCollapseRow, onFocusRow ]\n\t);\n\n\t/* Disable reason: A treegrid is implemented using a table element. */\n\t/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */\n\treturn (\n\t\t<RovingTabIndexContainer>\n\t\t\t{\n\t\t\t\t// Prevent browser mode from triggering in NVDA by wrapping List View\n\t\t\t\t// in a role=application wrapper.\n\t\t\t\t// see: https://github.com/WordPress/gutenberg/issues/43729\n\t\t\t }\n\t\t\t<div role=\"application\" aria-label={ applicationAriaLabel }>\n\t\t\t\t<table\n\t\t\t\t\t{ ...props }\n\t\t\t\t\trole=\"treegrid\"\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\tref={ ref }\n\t\t\t\t>\n\t\t\t\t\t<tbody>{ children }</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</RovingTabIndexContainer>\n\t);\n\t/* eslint-enable jsx-a11y/no-noninteractive-element-to-interactive-role */\n}\n\n/**\n * `TreeGrid` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * A tree grid is a hierarchical 2 dimensional UI component, for example it could be\n * used to implement a file system browser.\n *\n * A tree grid allows the user to navigate using arrow keys.\n * Up/down to navigate vertically across rows, and left/right to navigate horizontally\n * between focusables in a row.\n *\n * The `TreeGrid` renders both a `table` and `tbody` element, and is intended to be used\n * with `TreeGridRow` (`tr`) and `TreeGridCell` (`td`) to build out a grid.\n *\n * ```jsx\n * function TreeMenu() {\n * \treturn (\n * \t\t<TreeGrid>\n * \t\t\t<TreeGridRow level={ 1 } positionInSet={ 1 } setSize={ 2 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t\t<TreeGridRow level={ 1 } positionInSet={ 2 } setSize={ 2 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t\t<TreeGridRow level={ 2 } positionInSet={ 1 } setSize={ 1 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t</TreeGrid>\n * \t);\n * }\n * ```\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGrid = forwardRef( UnforwardedTreeGrid );\n\nexport default TreeGrid;\nexport { default as TreeGridRow } from './row';\nexport { default as TreeGridCell } from './cell';\nexport { default as TreeGridItem } from './item';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AA4XA,IAAAK,IAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,KAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,KAAA,GAAAH,sBAAA,CAAAJ,OAAA;AAxYA;AACA;AACA;;AAKA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASQ,gBAAgBA,CAAEC,U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OACC,IAAAmD,MAAA,CAAAC,aAAA,EAACtE,eAAA,CAAAuE,OAAuB,QAMvB,IAAAF,MAAA,CAAAC,aAAA;IAAKE,IAAI,EAAC,aAAa;IAAC,cAAarD;EAAsB,GAC1D,IAAAkD,MAAA,CAAAC,aAAA;IAAA,GACMlD,KAAK;IACVoD,IAAI,EAAC,UAAU;IACflD,SAAS,EAAGA,SAAW;IACvBD,GAAG,EAAGA;EAAK,GAEX,IAAAgD,MAAA,CAAAC,aAAA,iBAASvD,QAAiB,CACpB,CACH,CACmB,CAAC;EAE3B;AACD;;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM0D,QAAQ,GAAG,IAAAC,mBAAU,EAAE5D,mBAAoB,CAAC;AAAC6D,OAAA,CAAAF,QAAA,GAAAA,QAAA;AAAA,IAAAG,QAAA,GAE3CH,QAAQ;AAAAE,OAAA,CAAAJ,OAAA,GAAAK,QAAA"}
1
+ {"version":3,"names":["_dom","require","_element","_keycodes","_rovingTabIndex","_interopRequireDefault","_row","_cell","_item","getRowFocusables","rowElement","focusablesInRow","focus","focusable","find","sequential","filter","closest","UnforwardedTreeGrid","children","onExpandRow","onCollapseRow","onFocusRow","applicationAriaLabel","props","ref","onKeyDown","useCallback","event","keyCode","metaKey","ctrlKey","altKey","hasModifierKeyPressed","UP","DOWN","LEFT","RIGHT","HOME","END","includes","stopPropagation","activeElement","document","currentTarget","treeGridElement","contains","activeRow","currentColumnIndex","indexOf","canExpandCollapse","cannotFocusNextColumn","getAttribute","nextIndex","Math","max","min","length","_activeRow$getAttribu","preventDefault","level","parseInt","rows","Array","from","querySelectorAll","parentRow","currentRowIndex","i","ariaLevel","focusableItems","nextRowIndex","focusablesInNextRow","_react","createElement","default","role","TreeGrid","exports","forwardRef","_default"],"sources":["@wordpress/components/src/tree-grid/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { forwardRef, useCallback } from '@wordpress/element';\nimport { UP, DOWN, LEFT, RIGHT, HOME, END } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexContainer from './roving-tab-index';\nimport type { TreeGridProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * Return focusables in a row element, excluding those from other branches\n * nested within the row.\n *\n * @param rowElement The DOM element representing the row.\n *\n * @return The array of focusables in the row.\n */\nfunction getRowFocusables( rowElement: HTMLElement ) {\n\tconst focusablesInRow = focus.focusable.find( rowElement, {\n\t\tsequential: true,\n\t} );\n\n\treturn focusablesInRow.filter( ( focusable ) => {\n\t\treturn focusable.closest( '[role=\"row\"]' ) === rowElement;\n\t} );\n}\n\n/**\n * Renders both a table and tbody element, used to create a tree hierarchy.\n *\n */\nfunction UnforwardedTreeGrid(\n\t{\n\t\tchildren,\n\t\tonExpandRow = () => {},\n\t\tonCollapseRow = () => {},\n\t\tonFocusRow = () => {},\n\t\tapplicationAriaLabel,\n\t\t...props\n\t}: WordPressComponentProps< TreeGridProps, 'table', false >,\n\t/** A ref to the underlying DOM table element. */\n\tref: React.ForwardedRef< HTMLTableElement >\n) {\n\tconst onKeyDown = useCallback(\n\t\t( event: React.KeyboardEvent< HTMLTableElement > ) => {\n\t\t\tconst { keyCode, metaKey, ctrlKey, altKey } = event;\n\n\t\t\t// The shift key is intentionally absent from the following list,\n\t\t\t// to enable shift + up/down to select items from the list.\n\t\t\tconst hasModifierKeyPressed = metaKey || ctrlKey || altKey;\n\n\t\t\tif (\n\t\t\t\thasModifierKeyPressed ||\n\t\t\t\t! ( [ UP, DOWN, LEFT, RIGHT, HOME, END ] as number[] ).includes(\n\t\t\t\t\tkeyCode\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The event will be handled, stop propagation.\n\t\t\tevent.stopPropagation();\n\n\t\t\tconst { activeElement } = document;\n\t\t\tconst { currentTarget: treeGridElement } = event;\n\n\t\t\tif (\n\t\t\t\t! activeElement ||\n\t\t\t\t! treeGridElement.contains( activeElement )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Calculate the columnIndex of the active element.\n\t\t\tconst activeRow =\n\t\t\t\tactiveElement.closest< HTMLElement >( '[role=\"row\"]' );\n\n\t\t\tif ( ! activeRow ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst focusablesInRow = getRowFocusables( activeRow );\n\t\t\tconst currentColumnIndex = focusablesInRow.indexOf(\n\t\t\t\tactiveElement as HTMLElement\n\t\t\t);\n\t\t\tconst canExpandCollapse = 0 === currentColumnIndex;\n\t\t\tconst cannotFocusNextColumn =\n\t\t\t\tcanExpandCollapse &&\n\t\t\t\t( activeRow.getAttribute( 'data-expanded' ) === 'false' ||\n\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'false' ) &&\n\t\t\t\tkeyCode === RIGHT;\n\n\t\t\tif ( ( [ LEFT, RIGHT ] as number[] ).includes( keyCode ) ) {\n\t\t\t\t// Calculate to the next element.\n\t\t\t\tlet nextIndex;\n\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\tnextIndex = Math.max( 0, currentColumnIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextIndex = Math.min(\n\t\t\t\t\t\tcurrentColumnIndex + 1,\n\t\t\t\t\t\tfocusablesInRow.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is at the left most column.\n\t\t\t\tif ( canExpandCollapse ) {\n\t\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\t\t// Left:\n\t\t\t\t\t\t// If a row is focused, and it is expanded, collapses the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'data-expanded' ) ===\n\t\t\t\t\t\t\t\t'true' ||\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'true'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonCollapseRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, moves to the parent row (if there is one).\n\t\t\t\t\t\tconst level = Math.max(\n\t\t\t\t\t\t\tparseInt(\n\t\t\t\t\t\t\t\tactiveRow?.getAttribute( 'aria-level' ) ?? '1',\n\t\t\t\t\t\t\t\t10\n\t\t\t\t\t\t\t) - 1,\n\t\t\t\t\t\t\t1\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst rows = Array.from(\n\t\t\t\t\t\t\ttreeGridElement.querySelectorAll< HTMLElement >(\n\t\t\t\t\t\t\t\t'[role=\"row\"]'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tlet parentRow = activeRow;\n\t\t\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\t\t\tfor ( let i = currentRowIndex; i >= 0; i-- ) {\n\t\t\t\t\t\t\tconst ariaLevel =\n\t\t\t\t\t\t\t\trows[ i ].getAttribute( 'aria-level' );\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tariaLevel !== null &&\n\t\t\t\t\t\t\t\tparseInt( ariaLevel, 10 ) === level\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tparentRow = rows[ i ];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgetRowFocusables( parentRow )?.[ 0 ]?.focus();\n\t\t\t\t\t}\n\t\t\t\t\tif ( keyCode === RIGHT ) {\n\t\t\t\t\t\t// Right:\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, expands the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'data-expanded' ) ===\n\t\t\t\t\t\t\t\t'false' ||\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) ===\n\t\t\t\t\t\t\t\t'false'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonExpandRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is expanded, focuses the next cell in the row.\n\t\t\t\t\t\tconst focusableItems = getRowFocusables( activeRow );\n\t\t\t\t\t\tif ( focusableItems.length > 0 ) {\n\t\t\t\t\t\t\tfocusableItems[ nextIndex ]?.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start reading text on continued use of left/right arrow\n\t\t\t\t\t// keys.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Focus the next element. If at most left column and row is collapsed, moving right is not allowed as this will expand. However, if row is collapsed, moving left is allowed.\n\t\t\t\tif ( cannotFocusNextColumn ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfocusablesInRow[ nextIndex ].focus();\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( ( [ UP, DOWN ] as number[] ).includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll< HTMLElement >(\n\t\t\t\t\t\t'[role=\"row\"]'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === UP ) {\n\t\t\t\t\tnextRowIndex = Math.max( 0, currentRowIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = Math.min(\n\t\t\t\t\t\tcurrentRowIndex + 1,\n\t\t\t\t\t\trows.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( ( [ HOME, END ] as number[] ).includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll< HTMLElement >(\n\t\t\t\t\t\t'[role=\"row\"]'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === HOME ) {\n\t\t\t\t\tnextRowIndex = 0;\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = rows.length - 1;\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ onExpandRow, onCollapseRow, onFocusRow ]\n\t);\n\n\t/* Disable reason: A treegrid is implemented using a table element. */\n\t/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */\n\treturn (\n\t\t<RovingTabIndexContainer>\n\t\t\t{\n\t\t\t\t// Prevent browser mode from triggering in NVDA by wrapping List View\n\t\t\t\t// in a role=application wrapper.\n\t\t\t\t// see: https://github.com/WordPress/gutenberg/issues/43729\n\t\t\t }\n\t\t\t<div role=\"application\" aria-label={ applicationAriaLabel }>\n\t\t\t\t<table\n\t\t\t\t\t{ ...props }\n\t\t\t\t\trole=\"treegrid\"\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\tref={ ref }\n\t\t\t\t>\n\t\t\t\t\t<tbody>{ children }</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</RovingTabIndexContainer>\n\t);\n\t/* eslint-enable jsx-a11y/no-noninteractive-element-to-interactive-role */\n}\n\n/**\n * `TreeGrid` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * A tree grid is a hierarchical 2 dimensional UI component, for example it could be\n * used to implement a file system browser.\n *\n * A tree grid allows the user to navigate using arrow keys.\n * Up/down to navigate vertically across rows, and left/right to navigate horizontally\n * between focusables in a row.\n *\n * The `TreeGrid` renders both a `table` and `tbody` element, and is intended to be used\n * with `TreeGridRow` (`tr`) and `TreeGridCell` (`td`) to build out a grid.\n *\n * ```jsx\n * function TreeMenu() {\n * \treturn (\n * \t\t<TreeGrid>\n * \t\t\t<TreeGridRow level={ 1 } positionInSet={ 1 } setSize={ 2 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t\t<TreeGridRow level={ 1 } positionInSet={ 2 } setSize={ 2 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t\t<TreeGridRow level={ 2 } positionInSet={ 1 } setSize={ 1 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t</TreeGrid>\n * \t);\n * }\n * ```\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGrid = forwardRef( UnforwardedTreeGrid );\n\nexport default TreeGrid;\nexport { default as TreeGridRow } from './row';\nexport { default as TreeGridCell } from './cell';\nexport { default as TreeGridItem } from './item';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,IAAA,GA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,CAACE,GAAG,CACzBR,kBAAkB,EAClBwB,mBAAmB,CAACf,MAAM,GAAG,CAC9B,CAAC;MACDe,mBAAmB,CAAEnB,SAAS,CAAE,CAACzC,KAAK,CAAC,CAAC;;MAExC;MACA;MACAU,UAAU,CAAEM,KAAK,EAAEmB,SAAS,EAAEe,IAAI,CAAES,YAAY,CAAG,CAAC;;MAEpD;MACA;MACA3C,KAAK,CAAC+B,cAAc,CAAC,CAAC;IACvB;EACD,CAAC,EACD,CAAEvC,WAAW,EAAEC,aAAa,EAAEC,UAAU,CACzC,CAAC;;EAED;EACA;EACA,OACC,IAAAmD,MAAA,CAAAC,aAAA,EAACtE,eAAA,CAAAuE,OAAuB,QAMvB,IAAAF,MAAA,CAAAC,aAAA;IAAKE,IAAI,EAAC,aAAa;IAAC,cAAarD;EAAsB,GAC1D,IAAAkD,MAAA,CAAAC,aAAA;IAAA,GACMlD,KAAK;IACVoD,IAAI,EAAC,UAAU;IACflD,SAAS,EAAGA,SAAW;IACvBD,GAAG,EAAGA;EAAK,GAEX,IAAAgD,MAAA,CAAAC,aAAA,iBAASvD,QAAiB,CACpB,CACH,CACmB,CAAC;EAE3B;AACD;;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM0D,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,mBAAU,EAAE7D,mBAAoB,CAAC;AAAC,IAAA8D,QAAA,GAAAF,OAAA,CAAAH,OAAA,GAE3CE,QAAQ"}
@@ -33,8 +33,6 @@ function UnforwardedTreeGridItem({
33
33
  *
34
34
  * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}
35
35
  */
36
- const TreeGridItem = (0, _element.forwardRef)(UnforwardedTreeGridItem);
37
- exports.TreeGridItem = TreeGridItem;
38
- var _default = TreeGridItem;
39
- exports.default = _default;
36
+ const TreeGridItem = exports.TreeGridItem = (0, _element.forwardRef)(UnforwardedTreeGridItem);
37
+ var _default = exports.default = TreeGridItem;
40
38
  //# sourceMappingURL=item.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_rovingTabIndexItem","_interopRequireDefault","UnforwardedTreeGridItem","children","props","ref","_react","createElement","default","TreeGridItem","forwardRef","exports","_default"],"sources":["@wordpress/components/src/tree-grid/item.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexItem from './roving-tab-index-item';\nimport type { RovingTabIndexItemProps } from './types';\n\nfunction UnforwardedTreeGridItem(\n\t{ children, ...props }: RovingTabIndexItemProps,\n\tref: React.ForwardedRef< any >\n) {\n\treturn (\n\t\t<RovingTabIndexItem ref={ ref } { ...props }>\n\t\t\t{ children }\n\t\t</RovingTabIndexItem>\n\t);\n}\n\n/**\n * `TreeGridItem` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridItem = forwardRef( UnforwardedTreeGridItem );\n\nexport default TreeGridItem;\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,mBAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,SAASG,uBAAuBA,CAC/B;EAAEC,QAAQ;EAAE,GAAGC;AAA+B,CAAC,EAC/CC,GAA8B,EAC7B;EACD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACP,mBAAA,CAAAQ,OAAkB;IAACH,GAAG,EAAGA,GAAK;IAAA,GAAMD;EAAK,GACvCD,QACiB,CAAC;AAEvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,YAAY,GAAG,IAAAC,mBAAU,EAAER,uBAAwB,CAAC;AAACS,OAAA,CAAAF,YAAA,GAAAA,YAAA;AAAA,IAAAG,QAAA,GAEnDH,YAAY;AAAAE,OAAA,CAAAH,OAAA,GAAAI,QAAA"}
1
+ {"version":3,"names":["_element","require","_rovingTabIndexItem","_interopRequireDefault","UnforwardedTreeGridItem","children","props","ref","_react","createElement","default","TreeGridItem","exports","forwardRef","_default"],"sources":["@wordpress/components/src/tree-grid/item.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexItem from './roving-tab-index-item';\nimport type { RovingTabIndexItemProps } from './types';\n\nfunction UnforwardedTreeGridItem(\n\t{ children, ...props }: RovingTabIndexItemProps,\n\tref: React.ForwardedRef< any >\n) {\n\treturn (\n\t\t<RovingTabIndexItem ref={ ref } { ...props }>\n\t\t\t{ children }\n\t\t</RovingTabIndexItem>\n\t);\n}\n\n/**\n * `TreeGridItem` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridItem = forwardRef( UnforwardedTreeGridItem );\n\nexport default TreeGridItem;\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,mBAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,SAASG,uBAAuBA,CAC/B;EAAEC,QAAQ;EAAE,GAAGC;AAA+B,CAAC,EAC/CC,GAA8B,EAC7B;EACD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACP,mBAAA,CAAAQ,OAAkB;IAACH,GAAG,EAAGA,GAAK;IAAA,GAAMD;EAAK,GACvCD,QACiB,CAAC;AAEvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,mBAAU,EAAET,uBAAwB,CAAC;AAAC,IAAAU,QAAA,GAAAF,OAAA,CAAAF,OAAA,GAEnDC,YAAY"}
@@ -12,6 +12,5 @@ var _element = require("@wordpress/element");
12
12
  const RovingTabIndexContext = (0, _element.createContext)(undefined);
13
13
  const useRovingTabIndexContext = () => (0, _element.useContext)(RovingTabIndexContext);
14
14
  exports.useRovingTabIndexContext = useRovingTabIndexContext;
15
- const RovingTabIndexProvider = RovingTabIndexContext.Provider;
16
- exports.RovingTabIndexProvider = RovingTabIndexProvider;
15
+ const RovingTabIndexProvider = exports.RovingTabIndexProvider = RovingTabIndexContext.Provider;
17
16
  //# sourceMappingURL=roving-tab-index-context.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","RovingTabIndexContext","createContext","undefined","useRovingTabIndexContext","useContext","exports","RovingTabIndexProvider","Provider"],"sources":["@wordpress/components/src/tree-grid/roving-tab-index-context.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nconst RovingTabIndexContext = createContext<\n\t| {\n\t\t\tlastFocusedElement: HTMLElement | undefined;\n\t\t\tsetLastFocusedElement: React.Dispatch<\n\t\t\t\tReact.SetStateAction< HTMLElement | undefined >\n\t\t\t>;\n\t }\n\t| undefined\n>( undefined );\nexport const useRovingTabIndexContext = () =>\n\tuseContext( RovingTabIndexContext );\nexport const RovingTabIndexProvider = RovingTabIndexContext.Provider;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAMC,qBAAqB,GAAG,IAAAC,sBAAa,EAQxCC,SAAU,CAAC;AACP,MAAMC,wBAAwB,GAAGA,CAAA,KACvC,IAAAC,mBAAU,EAAEJ,qBAAsB,CAAC;AAACK,OAAA,CAAAF,wBAAA,GAAAA,wBAAA;AAC9B,MAAMG,sBAAsB,GAAGN,qBAAqB,CAACO,QAAQ;AAACF,OAAA,CAAAC,sBAAA,GAAAA,sBAAA"}
1
+ {"version":3,"names":["_element","require","RovingTabIndexContext","createContext","undefined","useRovingTabIndexContext","useContext","exports","RovingTabIndexProvider","Provider"],"sources":["@wordpress/components/src/tree-grid/roving-tab-index-context.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nconst RovingTabIndexContext = createContext<\n\t| {\n\t\t\tlastFocusedElement: HTMLElement | undefined;\n\t\t\tsetLastFocusedElement: React.Dispatch<\n\t\t\t\tReact.SetStateAction< HTMLElement | undefined >\n\t\t\t>;\n\t }\n\t| undefined\n>( undefined );\nexport const useRovingTabIndexContext = () =>\n\tuseContext( RovingTabIndexContext );\nexport const RovingTabIndexProvider = RovingTabIndexContext.Provider;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAMC,qBAAqB,GAAG,IAAAC,sBAAa,EAQxCC,SAAU,CAAC;AACP,MAAMC,wBAAwB,GAAGA,CAAA,KACvC,IAAAC,mBAAU,EAAEJ,qBAAsB,CAAC;AAACK,OAAA,CAAAF,wBAAA,GAAAA,wBAAA;AAC9B,MAAMG,sBAAsB,GAAAD,OAAA,CAAAC,sBAAA,GAAGN,qBAAqB,CAACO,QAAQ"}
@@ -15,7 +15,7 @@ var _rovingTabIndexContext = require("./roving-tab-index-context");
15
15
  * Internal dependencies
16
16
  */
17
17
 
18
- const RovingTabIndexItem = (0, _element.forwardRef)(function UnforwardedRovingTabIndexItem({
18
+ const RovingTabIndexItem = exports.RovingTabIndexItem = (0, _element.forwardRef)(function UnforwardedRovingTabIndexItem({
19
19
  children,
20
20
  as: Component,
21
21
  ...props
@@ -51,7 +51,5 @@ const RovingTabIndexItem = (0, _element.forwardRef)(function UnforwardedRovingTa
51
51
  ...allProps
52
52
  }, children);
53
53
  });
54
- exports.RovingTabIndexItem = RovingTabIndexItem;
55
- var _default = RovingTabIndexItem;
56
- exports.default = _default;
54
+ var _default = exports.default = RovingTabIndexItem;
57
55
  //# sourceMappingURL=roving-tab-index-item.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_rovingTabIndexContext","RovingTabIndexItem","forwardRef","UnforwardedRovingTabIndexItem","children","as","Component","props","forwardedRef","localRef","useRef","ref","lastFocusedElement","setLastFocusedElement","useRovingTabIndexContext","tabIndex","current","undefined","onFocus","event","target","allProps","_react","createElement","exports","_default","default"],"sources":["@wordpress/components/src/tree-grid/roving-tab-index-item.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useRovingTabIndexContext } from './roving-tab-index-context';\nimport type { RovingTabIndexItemProps } from './types';\n\nexport const RovingTabIndexItem = forwardRef(\n\tfunction UnforwardedRovingTabIndexItem(\n\t\t{ children, as: Component, ...props }: RovingTabIndexItemProps,\n\t\tforwardedRef: React.ForwardedRef< any >\n\t) {\n\t\tconst localRef = useRef< any >();\n\t\tconst ref = forwardedRef || localRef;\n\t\t// @ts-expect-error - We actually want to throw an error if this is undefined.\n\t\tconst { lastFocusedElement, setLastFocusedElement } =\n\t\t\tuseRovingTabIndexContext();\n\t\tlet tabIndex;\n\n\t\tif ( lastFocusedElement ) {\n\t\t\ttabIndex =\n\t\t\t\tlastFocusedElement ===\n\t\t\t\t// TODO: The original implementation simply used `ref.current` here, assuming\n\t\t\t\t// that a forwarded ref would always be an object, which is not necessarily true.\n\t\t\t\t// This workaround maintains the original runtime behavior in a type-safe way,\n\t\t\t\t// but should be revisited.\n\t\t\t\t( 'current' in ref ? ref.current : undefined )\n\t\t\t\t\t? 0\n\t\t\t\t\t: -1;\n\t\t}\n\n\t\tconst onFocus: React.FocusEventHandler< HTMLElement > = ( event ) =>\n\t\t\tsetLastFocusedElement?.( event.target );\n\t\tconst allProps = { ref, tabIndex, onFocus, ...props };\n\n\t\tif ( typeof children === 'function' ) {\n\t\t\treturn children( allProps );\n\t\t}\n\n\t\tif ( ! Component ) return null;\n\n\t\treturn <Component { ...allProps }>{ children }</Component>;\n\t}\n);\n\nexport default RovingTabIndexItem;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,sBAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAIO,MAAME,kBAAkB,GAAG,IAAAC,mBAAU,EAC3C,SAASC,6BAA6BA,CACrC;EAAEC,QAAQ;EAAEC,EAAE,EAAEC,SAAS;EAAE,GAAGC;AAA+B,CAAC,EAC9DC,YAAuC,EACtC;EACD,MAAMC,QAAQ,GAAG,IAAAC,eAAM,EAAQ,CAAC;EAChC,MAAMC,GAAG,GAAGH,YAAY,IAAIC,QAAQ;EACpC;EACA,MAAM;IAAEG,kBAAkB;IAAEC;EAAsB,CAAC,GAClD,IAAAC,+CAAwB,EAAC,CAAC;EAC3B,IAAIC,QAAQ;EAEZ,IAAKH,kBAAkB,EAAG;IACzBG,QAAQ,GACPH,kBAAkB;IAClB;IACA;IACA;IACA;IACE,SAAS,IAAID,GAAG,GAAGA,GAAG,CAACK,OAAO,GAAGC,SAAS,CAAE,GAC3C,CAAC,GACD,CAAC,CAAC;EACP;EAEA,MAAMC,OAA+C,GAAKC,KAAK,IAC9DN,qBAAqB,GAAIM,KAAK,CAACC,MAAO,CAAC;EACxC,MAAMC,QAAQ,GAAG;IAAEV,GAAG;IAAEI,QAAQ;IAAEG,OAAO;IAAE,GAAGX;EAAM,CAAC;EAErD,IAAK,OAAOH,QAAQ,KAAK,UAAU,EAAG;IACrC,OAAOA,QAAQ,CAAEiB,QAAS,CAAC;EAC5B;EAEA,IAAK,CAAEf,SAAS,EAAG,OAAO,IAAI;EAE9B,OAAO,IAAAgB,MAAA,CAAAC,aAAA,EAACjB,SAAS;IAAA,GAAMe;EAAQ,GAAKjB,QAAqB,CAAC;AAC3D,CACD,CAAC;AAACoB,OAAA,CAAAvB,kBAAA,GAAAA,kBAAA;AAAA,IAAAwB,QAAA,GAEaxB,kBAAkB;AAAAuB,OAAA,CAAAE,OAAA,GAAAD,QAAA"}
1
+ {"version":3,"names":["_element","require","_rovingTabIndexContext","RovingTabIndexItem","exports","forwardRef","UnforwardedRovingTabIndexItem","children","as","Component","props","forwardedRef","localRef","useRef","ref","lastFocusedElement","setLastFocusedElement","useRovingTabIndexContext","tabIndex","current","undefined","onFocus","event","target","allProps","_react","createElement","_default","default"],"sources":["@wordpress/components/src/tree-grid/roving-tab-index-item.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useRovingTabIndexContext } from './roving-tab-index-context';\nimport type { RovingTabIndexItemProps } from './types';\n\nexport const RovingTabIndexItem = forwardRef(\n\tfunction UnforwardedRovingTabIndexItem(\n\t\t{ children, as: Component, ...props }: RovingTabIndexItemProps,\n\t\tforwardedRef: React.ForwardedRef< any >\n\t) {\n\t\tconst localRef = useRef< any >();\n\t\tconst ref = forwardedRef || localRef;\n\t\t// @ts-expect-error - We actually want to throw an error if this is undefined.\n\t\tconst { lastFocusedElement, setLastFocusedElement } =\n\t\t\tuseRovingTabIndexContext();\n\t\tlet tabIndex;\n\n\t\tif ( lastFocusedElement ) {\n\t\t\ttabIndex =\n\t\t\t\tlastFocusedElement ===\n\t\t\t\t// TODO: The original implementation simply used `ref.current` here, assuming\n\t\t\t\t// that a forwarded ref would always be an object, which is not necessarily true.\n\t\t\t\t// This workaround maintains the original runtime behavior in a type-safe way,\n\t\t\t\t// but should be revisited.\n\t\t\t\t( 'current' in ref ? ref.current : undefined )\n\t\t\t\t\t? 0\n\t\t\t\t\t: -1;\n\t\t}\n\n\t\tconst onFocus: React.FocusEventHandler< HTMLElement > = ( event ) =>\n\t\t\tsetLastFocusedElement?.( event.target );\n\t\tconst allProps = { ref, tabIndex, onFocus, ...props };\n\n\t\tif ( typeof children === 'function' ) {\n\t\t\treturn children( allProps );\n\t\t}\n\n\t\tif ( ! Component ) return null;\n\n\t\treturn <Component { ...allProps }>{ children }</Component>;\n\t}\n);\n\nexport default RovingTabIndexItem;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,sBAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAIO,MAAME,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,mBAAU,EAC3C,SAASC,6BAA6BA,CACrC;EAAEC,QAAQ;EAAEC,EAAE,EAAEC,SAAS;EAAE,GAAGC;AAA+B,CAAC,EAC9DC,YAAuC,EACtC;EACD,MAAMC,QAAQ,GAAG,IAAAC,eAAM,EAAQ,CAAC;EAChC,MAAMC,GAAG,GAAGH,YAAY,IAAIC,QAAQ;EACpC;EACA,MAAM;IAAEG,kBAAkB;IAAEC;EAAsB,CAAC,GAClD,IAAAC,+CAAwB,EAAC,CAAC;EAC3B,IAAIC,QAAQ;EAEZ,IAAKH,kBAAkB,EAAG;IACzBG,QAAQ,GACPH,kBAAkB;IAClB;IACA;IACA;IACA;IACE,SAAS,IAAID,GAAG,GAAGA,GAAG,CAACK,OAAO,GAAGC,SAAS,CAAE,GAC3C,CAAC,GACD,CAAC,CAAC;EACP;EAEA,MAAMC,OAA+C,GAAKC,KAAK,IAC9DN,qBAAqB,GAAIM,KAAK,CAACC,MAAO,CAAC;EACxC,MAAMC,QAAQ,GAAG;IAAEV,GAAG;IAAEI,QAAQ;IAAEG,OAAO;IAAE,GAAGX;EAAM,CAAC;EAErD,IAAK,OAAOH,QAAQ,KAAK,UAAU,EAAG;IACrC,OAAOA,QAAQ,CAAEiB,QAAS,CAAC;EAC5B;EAEA,IAAK,CAAEf,SAAS,EAAG,OAAO,IAAI;EAE9B,OAAO,IAAAgB,MAAA,CAAAC,aAAA,EAACjB,SAAS;IAAA,GAAMe;EAAQ,GAAKjB,QAAqB,CAAC;AAC3D,CACD,CAAC;AAAC,IAAAoB,QAAA,GAAAvB,OAAA,CAAAwB,OAAA,GAEazB,kBAAkB"}
@@ -36,8 +36,6 @@ function UnforwardedTreeGridRow({
36
36
  *
37
37
  * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}
38
38
  */
39
- const TreeGridRow = (0, _element.forwardRef)(UnforwardedTreeGridRow);
40
- exports.TreeGridRow = TreeGridRow;
41
- var _default = TreeGridRow;
42
- exports.default = _default;
39
+ const TreeGridRow = exports.TreeGridRow = (0, _element.forwardRef)(UnforwardedTreeGridRow);
40
+ var _default = exports.default = TreeGridRow;
43
41
  //# sourceMappingURL=row.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","UnforwardedTreeGridRow","children","level","positionInSet","setSize","isExpanded","props","ref","_react","createElement","role","TreeGridRow","forwardRef","exports","_default","default"],"sources":["@wordpress/components/src/tree-grid/row.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport type { TreeGridRowProps } from './types';\n\nfunction UnforwardedTreeGridRow(\n\t{\n\t\tchildren,\n\t\tlevel,\n\t\tpositionInSet,\n\t\tsetSize,\n\t\tisExpanded,\n\t\t...props\n\t}: WordPressComponentProps< TreeGridRowProps, 'tr', false >,\n\tref: React.ForwardedRef< HTMLTableRowElement >\n) {\n\treturn (\n\t\t<tr\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\trole=\"row\"\n\t\t\taria-level={ level }\n\t\t\taria-posinset={ positionInSet }\n\t\t\taria-setsize={ setSize }\n\t\t\taria-expanded={ isExpanded }\n\t\t>\n\t\t\t{ children }\n\t\t</tr>\n\t);\n}\n\n/**\n * `TreeGridRow` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridRow = forwardRef( UnforwardedTreeGridRow );\n\nexport default TreeGridRow;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AASA,SAASC,sBAAsBA,CAC9B;EACCC,QAAQ;EACRC,KAAK;EACLC,aAAa;EACbC,OAAO;EACPC,UAAU;EACV,GAAGC;AACsD,CAAC,EAC3DC,GAA8C,EAC7C;EACD,OACC,IAAAC,MAAA,CAAAC,aAAA;IAAA,GACMH,KAAK;IACVC,GAAG,EAAGA,GAAK;IACXG,IAAI,EAAC,KAAK;IACV,cAAaR,KAAO;IACpB,iBAAgBC,aAAe;IAC/B,gBAAeC,OAAS;IACxB,iBAAgBC;EAAY,GAE1BJ,QACC,CAAC;AAEP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMU,WAAW,GAAG,IAAAC,mBAAU,EAAEZ,sBAAuB,CAAC;AAACa,OAAA,CAAAF,WAAA,GAAAA,WAAA;AAAA,IAAAG,QAAA,GAEjDH,WAAW;AAAAE,OAAA,CAAAE,OAAA,GAAAD,QAAA"}
1
+ {"version":3,"names":["_element","require","UnforwardedTreeGridRow","children","level","positionInSet","setSize","isExpanded","props","ref","_react","createElement","role","TreeGridRow","exports","forwardRef","_default","default"],"sources":["@wordpress/components/src/tree-grid/row.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport type { TreeGridRowProps } from './types';\n\nfunction UnforwardedTreeGridRow(\n\t{\n\t\tchildren,\n\t\tlevel,\n\t\tpositionInSet,\n\t\tsetSize,\n\t\tisExpanded,\n\t\t...props\n\t}: WordPressComponentProps< TreeGridRowProps, 'tr', false >,\n\tref: React.ForwardedRef< HTMLTableRowElement >\n) {\n\treturn (\n\t\t<tr\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\trole=\"row\"\n\t\t\taria-level={ level }\n\t\t\taria-posinset={ positionInSet }\n\t\t\taria-setsize={ setSize }\n\t\t\taria-expanded={ isExpanded }\n\t\t>\n\t\t\t{ children }\n\t\t</tr>\n\t);\n}\n\n/**\n * `TreeGridRow` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridRow = forwardRef( UnforwardedTreeGridRow );\n\nexport default TreeGridRow;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AASA,SAASC,sBAAsBA,CAC9B;EACCC,QAAQ;EACRC,KAAK;EACLC,aAAa;EACbC,OAAO;EACPC,UAAU;EACV,GAAGC;AACsD,CAAC,EAC3DC,GAA8C,EAC7C;EACD,OACC,IAAAC,MAAA,CAAAC,aAAA;IAAA,GACMH,KAAK;IACVC,GAAG,EAAGA,GAAK;IACXG,IAAI,EAAC,KAAK;IACV,cAAaR,KAAO;IACpB,iBAAgBC,aAAe;IAC/B,gBAAeC,OAAS;IACxB,iBAAgBC;EAAY,GAE1BJ,QACC,CAAC;AAEP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMU,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,mBAAU,EAAEb,sBAAuB,CAAC;AAAC,IAAAc,QAAA,GAAAF,OAAA,CAAAG,OAAA,GAEjDJ,WAAW"}
@@ -81,7 +81,7 @@ function TreeSelect(props) {
81
81
  selectedId,
82
82
  tree = [],
83
83
  ...restProps
84
- } = (0, _useDeprecatedProps.useDeprecated36pxDefaultSizeProp)(props, 'wp.components.TreeSelect', '6.4');
84
+ } = (0, _useDeprecatedProps.useDeprecated36pxDefaultSizeProp)(props);
85
85
  const options = (0, _element.useMemo)(() => {
86
86
  return [noOptionLabel && {
87
87
  value: '',
@@ -96,6 +96,5 @@ function TreeSelect(props) {
96
96
  ...restProps
97
97
  });
98
98
  }
99
- var _default = TreeSelect;
100
- exports.default = _default;
99
+ var _default = exports.default = TreeSelect;
101
100
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_htmlEntities","_selectControl","_useDeprecatedProps","getSelectOptions","tree","level","flatMap","treeNode","value","id","label","repeat","decodeEntities","name","children","TreeSelect","props","noOptionLabel","onChange","selectedId","restProps","useDeprecated36pxDefaultSizeProp","options","useMemo","filter","option","_react","createElement","SelectControl","_default","exports","default"],"sources":["@wordpress/components/src/tree-select/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport type { TreeSelectProps, Tree, Truthy } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\n\nfunction getSelectOptions(\n\ttree: Tree[],\n\tlevel = 0\n): NonNullable< TreeSelectProps[ 'options' ] > {\n\treturn tree.flatMap( ( treeNode ) => [\n\t\t{\n\t\t\tvalue: treeNode.id,\n\t\t\tlabel:\n\t\t\t\t'\\u00A0'.repeat( level * 3 ) + decodeEntities( treeNode.name ),\n\t\t},\n\t\t...getSelectOptions( treeNode.children || [], level + 1 ),\n\t] );\n}\n\n/**\n * TreeSelect component is used to generate select input fields.\n *\n * ```jsx\n * import { TreeSelect } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTreeSelect = () => {\n * \tconst [ page, setPage ] = useState( 'p21' );\n *\n * \treturn (\n * \t\t<TreeSelect\n * \t\t\tlabel=\"Parent page\"\n * \t\t\tnoOptionLabel=\"No parent page\"\n * \t\t\tonChange={ ( newPage ) => setPage( newPage ) }\n * \t\t\tselectedId={ page }\n * \t\t\ttree={ [\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 1',\n * \t\t\t\t\tid: 'p1',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{ name: 'Descend 1 of page 1', id: 'p11' },\n * \t\t\t\t\t\t{ name: 'Descend 2 of page 1', id: 'p12' },\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 2',\n * \t\t\t\t\tid: 'p2',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{\n * \t\t\t\t\t\t\tname: 'Descend 1 of page 2',\n * \t\t\t\t\t\t\tid: 'p21',\n * \t\t\t\t\t\t\tchildren: [\n * \t\t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\t\tname: 'Descend 1 of Descend 1 of page 2',\n * \t\t\t\t\t\t\t\t\tid: 'p211',\n * \t\t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t],\n * \t\t\t\t\t\t},\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t] }\n * \t\t/>\n * \t);\n * }\n * ```\n */\n\nexport function TreeSelect( props: TreeSelectProps ) {\n\tconst {\n\t\tlabel,\n\t\tnoOptionLabel,\n\t\tonChange,\n\t\tselectedId,\n\t\ttree = [],\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp(\n\t\tprops,\n\t\t'wp.components.TreeSelect',\n\t\t'6.4'\n\t);\n\n\tconst options = useMemo( () => {\n\t\treturn [\n\t\t\tnoOptionLabel && { value: '', label: noOptionLabel },\n\t\t\t...getSelectOptions( tree ),\n\t\t].filter( < T, >( option: T ): option is Truthy< T > => !! option );\n\t}, [ noOptionLabel, tree ] );\n\n\treturn (\n\t\t<SelectControl\n\t\t\t{ ...{ label, options, onChange } }\n\t\t\tvalue={ selectedId }\n\t\t\t{ ...restProps }\n\t\t/>\n\t);\n}\n\nexport default TreeSelect;\n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C,MAAS,IAA6B,CAAC,CAAEA,MAAO,CAAC;EACpE,CAAC,EAAE,CAAER,aAAa,EAAEb,IAAI,CAAG,CAAC;EAE5B,OACC,IAAAsB,MAAA,CAAAC,aAAA,EAAC1B,cAAA,CAAA2B,aAAa;IACNlB,KAAK;IAAEY,OAAO;IAAEJ,QAAQ;IAC/BV,KAAK,EAAGW,UAAY;IAAA,GACfC;EAAS,CACd,CAAC;AAEJ;AAAC,IAAAS,QAAA,GAEcd,UAAU;AAAAe,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_element","require","_htmlEntities","_selectControl","_useDeprecatedProps","getSelectOptions","tree","level","flatMap","treeNode","value","id","label","repeat","decodeEntities","name","children","TreeSelect","props","noOptionLabel","onChange","selectedId","restProps","useDeprecated36pxDefaultSizeProp","options","useMemo","filter","option","_react","createElement","SelectControl","_default","exports","default"],"sources":["@wordpress/components/src/tree-select/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport type { TreeSelectProps, Tree, Truthy } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\n\nfunction getSelectOptions(\n\ttree: Tree[],\n\tlevel = 0\n): NonNullable< TreeSelectProps[ 'options' ] > {\n\treturn tree.flatMap( ( treeNode ) => [\n\t\t{\n\t\t\tvalue: treeNode.id,\n\t\t\tlabel:\n\t\t\t\t'\\u00A0'.repeat( level * 3 ) + decodeEntities( treeNode.name ),\n\t\t},\n\t\t...getSelectOptions( treeNode.children || [], level + 1 ),\n\t] );\n}\n\n/**\n * TreeSelect component is used to generate select input fields.\n *\n * ```jsx\n * import { TreeSelect } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTreeSelect = () => {\n * \tconst [ page, setPage ] = useState( 'p21' );\n *\n * \treturn (\n * \t\t<TreeSelect\n * \t\t\tlabel=\"Parent page\"\n * \t\t\tnoOptionLabel=\"No parent page\"\n * \t\t\tonChange={ ( newPage ) => setPage( newPage ) }\n * \t\t\tselectedId={ page }\n * \t\t\ttree={ [\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 1',\n * \t\t\t\t\tid: 'p1',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{ name: 'Descend 1 of page 1', id: 'p11' },\n * \t\t\t\t\t\t{ name: 'Descend 2 of page 1', id: 'p12' },\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 2',\n * \t\t\t\t\tid: 'p2',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{\n * \t\t\t\t\t\t\tname: 'Descend 1 of page 2',\n * \t\t\t\t\t\t\tid: 'p21',\n * \t\t\t\t\t\t\tchildren: [\n * \t\t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\t\tname: 'Descend 1 of Descend 1 of page 2',\n * \t\t\t\t\t\t\t\t\tid: 'p211',\n * \t\t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t],\n * \t\t\t\t\t\t},\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t] }\n * \t\t/>\n * \t);\n * }\n * ```\n */\n\nexport function TreeSelect( props: TreeSelectProps ) {\n\tconst {\n\t\tlabel,\n\t\tnoOptionLabel,\n\t\tonChange,\n\t\tselectedId,\n\t\ttree = [],\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst options = useMemo( () => {\n\t\treturn [\n\t\t\tnoOptionLabel && { value: '', label: noOptionLabel },\n\t\t\t...getSelectOptions( tree ),\n\t\t].filter( < T, >( option: T ): option is Truthy< T > => !! option );\n\t}, [ noOptionLabel, tree ] );\n\n\treturn (\n\t\t<SelectControl\n\t\t\t{ ...{ label, options, onChange } }\n\t\t\tvalue={ selectedId }\n\t\t\t{ ...restProps }\n\t\t/>\n\t);\n}\n\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,IAA6B,CAAC,CAAEA,MAAO,CAAC;EACpE,CAAC,EAAE,CAAER,aAAa,EAAEb,IAAI,CAAG,CAAC;EAE5B,OACC,IAAAsB,MAAA,CAAAC,aAAA,EAAC1B,cAAA,CAAA2B,aAAa;IACNlB,KAAK;IAAEY,OAAO;IAAEJ,QAAQ;IAC/BV,KAAK,EAAGW,UAAY;IAAA,GACfC;EAAS,CACd,CAAC;AAEJ;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEchB,UAAU"}
@@ -46,8 +46,6 @@ function UnconnectedTruncate(props, forwardedRef) {
46
46
  * }
47
47
  * ```
48
48
  */
49
- const Truncate = (0, _context.contextConnect)(UnconnectedTruncate, 'Truncate');
50
- exports.Truncate = Truncate;
51
- var _default = Truncate;
52
- exports.default = _default;
49
+ const Truncate = exports.Truncate = (0, _context.contextConnect)(UnconnectedTruncate, 'Truncate');
50
+ var _default = exports.default = Truncate;
53
51
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_context","require","_view","_hook","_interopRequireDefault","UnconnectedTruncate","props","forwardedRef","truncateProps","useTruncate","_react","createElement","View","as","ref","Truncate","contextConnect","exports","_default","default"],"sources":["@wordpress/components/src/truncate/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport useTruncate from './hook';\nimport type { TruncateProps } from './types';\n\nfunction UnconnectedTruncate(\n\tprops: WordPressComponentProps< TruncateProps, 'span' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst truncateProps = useTruncate( props );\n\n\treturn <View as=\"span\" { ...truncateProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Truncate` is a typography primitive that trims text content.\n * For almost all cases, it is recommended that `Text`, `Heading`, or\n * `Subheading` is used to render text content. However,`Truncate` is\n * available for custom implementations.\n *\n * ```jsx\n * import { __experimentalTruncate as Truncate } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Truncate>\n * \t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ex\n * \t\t\tneque, vulputate a diam et, luctus convallis lacus. Vestibulum ac\n * \t\t\tmollis mi. Morbi id elementum massa.\n * \t\t</Truncate>\n * \t);\n * }\n * ```\n */\nexport const Truncate = contextConnect( UnconnectedTruncate, 'Truncate' );\n\nexport default Truncate;\n"],"mappings":";;;;;;;;AASA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAXA;AACA;AACA;;AAGA;AACA;AACA;;AAOA,SAASI,mBAAmBA,CAC3BC,KAAuD,EACvDC,YAAiC,EAChC;EACD,MAAMC,aAAa,GAAG,IAAAC,aAAW,EAAEH,KAAM,CAAC;EAE1C,OAAO,IAAAI,MAAA,CAAAC,aAAA,EAACT,KAAA,CAAAU,IAAI;IAACC,EAAE,EAAC,MAAM;IAAA,GAAML,aAAa;IAAGM,GAAG,EAAGP;EAAc,CAAE,CAAC;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMQ,QAAQ,GAAG,IAAAC,uBAAc,EAAEX,mBAAmB,EAAE,UAAW,CAAC;AAACY,OAAA,CAAAF,QAAA,GAAAA,QAAA;AAAA,IAAAG,QAAA,GAE3DH,QAAQ;AAAAE,OAAA,CAAAE,OAAA,GAAAD,QAAA"}
1
+ {"version":3,"names":["_context","require","_view","_hook","_interopRequireDefault","UnconnectedTruncate","props","forwardedRef","truncateProps","useTruncate","_react","createElement","View","as","ref","Truncate","exports","contextConnect","_default","default"],"sources":["@wordpress/components/src/truncate/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport useTruncate from './hook';\nimport type { TruncateProps } from './types';\n\nfunction UnconnectedTruncate(\n\tprops: WordPressComponentProps< TruncateProps, 'span' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst truncateProps = useTruncate( props );\n\n\treturn <View as=\"span\" { ...truncateProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Truncate` is a typography primitive that trims text content.\n * For almost all cases, it is recommended that `Text`, `Heading`, or\n * `Subheading` is used to render text content. However,`Truncate` is\n * available for custom implementations.\n *\n * ```jsx\n * import { __experimentalTruncate as Truncate } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Truncate>\n * \t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ex\n * \t\t\tneque, vulputate a diam et, luctus convallis lacus. Vestibulum ac\n * \t\t\tmollis mi. Morbi id elementum massa.\n * \t\t</Truncate>\n * \t);\n * }\n * ```\n */\nexport const Truncate = contextConnect( UnconnectedTruncate, 'Truncate' );\n\nexport default Truncate;\n"],"mappings":";;;;;;;;AASA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAXA;AACA;AACA;;AAGA;AACA;AACA;;AAOA,SAASI,mBAAmBA,CAC3BC,KAAuD,EACvDC,YAAiC,EAChC;EACD,MAAMC,aAAa,GAAG,IAAAC,aAAW,EAAEH,KAAM,CAAC;EAE1C,OAAO,IAAAI,MAAA,CAAAC,aAAA,EAACT,KAAA,CAAAU,IAAI;IAACC,EAAE,EAAC,MAAM;IAAA,GAAML,aAAa;IAAGM,GAAG,EAAGP;EAAc,CAAE,CAAC;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMQ,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,uBAAc,EAAEZ,mBAAmB,EAAE,UAAW,CAAC;AAAC,IAAAa,QAAA,GAAAF,OAAA,CAAAG,OAAA,GAE3DJ,QAAQ"}
@@ -10,8 +10,8 @@ var _context = require("../context");
10
10
  var styles = _interopRequireWildcard(require("./styles"));
11
11
  var _utils = require("./utils");
12
12
  var _useCx = require("../utils/hooks/use-cx");
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
15
  /**
16
16
  * External dependencies
17
17
  */
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_element","_context","styles","_interopRequireWildcard","_utils","_useCx","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","useTruncate","props","className","children","ellipsis","TRUNCATE_ELLIPSIS","ellipsizeMode","TRUNCATE_TYPE","auto","limit","numberOfLines","otherProps","useContextSystem","cx","useCx","childrenAsText","toString","truncatedContent","truncateContent","shouldTruncate","classes","useMemo","truncateLines","css","process","env","NODE_ENV","Truncate"],"sources":["@wordpress/components/src/truncate/hook.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { TRUNCATE_ELLIPSIS, TRUNCATE_TYPE, truncateContent } from './utils';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { TruncateProps } from './types';\n\nexport default function useTruncate(\n\tprops: WordPressComponentProps< TruncateProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tchildren,\n\t\tellipsis = TRUNCATE_ELLIPSIS,\n\t\tellipsizeMode = TRUNCATE_TYPE.auto,\n\t\tlimit = 0,\n\t\tnumberOfLines = 0,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Truncate' );\n\n\tconst cx = useCx();\n\n\tlet childrenAsText;\n\tif ( typeof children === 'string' ) {\n\t\tchildrenAsText = children;\n\t} else if ( typeof children === 'number' ) {\n\t\tchildrenAsText = children.toString();\n\t}\n\n\tconst truncatedContent = childrenAsText\n\t\t? truncateContent( childrenAsText, {\n\t\t\t\tellipsis,\n\t\t\t\tellipsizeMode,\n\t\t\t\tlimit,\n\t\t\t\tnumberOfLines,\n\t\t } )\n\t\t: children;\n\n\tconst shouldTruncate =\n\t\t!! childrenAsText && ellipsizeMode === TRUNCATE_TYPE.auto;\n\n\tconst classes = useMemo( () => {\n\t\tconst truncateLines = css`\n\t\t\t-webkit-box-orient: vertical;\n\t\t\t-webkit-line-clamp: ${ numberOfLines };\n\t\t\tdisplay: -webkit-box;\n\t\t\toverflow: hidden;\n\t\t`;\n\n\t\treturn cx(\n\t\t\tshouldTruncate && ! numberOfLines && styles.Truncate,\n\t\t\tshouldTruncate && !! numberOfLines && truncateLines,\n\t\t\tclassName\n\t\t);\n\t}, [ className, cx, numberOfLines, shouldTruncate ] );\n\n\treturn { ...otherProps, className: classes, children: truncatedContent };\n}\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAMA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAA8C,SAAAO,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAA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Ac,GACpC,IAAAG,sBAAe,EAAEH,cAAc,EAAE;IACjCX,QAAQ;IACRE,aAAa;IACbG,KAAK;IACLC;EACA,CAAE,CAAC,GACHP,QAAQ;EAEX,MAAMgB,cAAc,GACnB,CAAC,CAAEJ,cAAc,IAAIT,aAAa,KAAKC,oBAAa,CAACC,IAAI;EAE1D,MAAMY,OAAO,GAAG,IAAAC,gBAAO,EAAE,MAAM;IAC9B,MAAMC,aAAa,oBAAGC,UAAG,qDAEDb,aAAa,6CAAAc,OAAA,CAAAC,GAAA,CAAAC,QAAA,mDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,2wFAGpC;IAED,OAAOb,EAAE,CACRM,cAAc,IAAI,CAAET,aAAa,IAAIpC,MAAM,CAACqD,QAAQ,EACpDR,cAAc,IAAI,CAAC,CAAET,aAAa,IAAIY,aAAa,EACnDpB,SACD,CAAC;EACF,CAAC,EAAE,CAAEA,SAAS,EAAEW,EAAE,EAAEH,aAAa,EAAES,cAAc,CAAG,CAAC;EAErD,OAAO;IAAE,GAAGR,UAAU;IAAET,SAAS,EAAEkB,OAAO;IAAEjB,QAAQ,EAAEc;EAAiB,CAAC;AACzE"}
1
+ {"version":3,"names":["_react","require","_element","_context","styles","_interopRequireWildcard","_utils","_useCx","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","useTruncate","props","className","children","ellipsis","TRUNCATE_ELLIPSIS","ellipsizeMode","TRUNCATE_TYPE","auto","limit","numberOfLines","otherProps","useContextSystem","cx","useCx","childrenAsText","toString","truncatedContent","truncateContent","shouldTruncate","classes","useMemo","truncateLines","css","process","env","NODE_ENV","Truncate"],"sources":["@wordpress/components/src/truncate/hook.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { TRUNCATE_ELLIPSIS, TRUNCATE_TYPE, truncateContent } from './utils';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { TruncateProps } from './types';\n\nexport default function useTruncate(\n\tprops: WordPressComponentProps< TruncateProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tchildren,\n\t\tellipsis = TRUNCATE_ELLIPSIS,\n\t\tellipsizeMode = TRUNCATE_TYPE.auto,\n\t\tlimit = 0,\n\t\tnumberOfLines = 0,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Truncate' );\n\n\tconst cx = useCx();\n\n\tlet childrenAsText;\n\tif ( typeof children === 'string' ) {\n\t\tchildrenAsText = children;\n\t} else if ( typeof children === 'number' ) {\n\t\tchildrenAsText = children.toString();\n\t}\n\n\tconst truncatedContent = childrenAsText\n\t\t? truncateContent( childrenAsText, {\n\t\t\t\tellipsis,\n\t\t\t\tellipsizeMode,\n\t\t\t\tlimit,\n\t\t\t\tnumberOfLines,\n\t\t } )\n\t\t: children;\n\n\tconst shouldTruncate =\n\t\t!! childrenAsText && ellipsizeMode === TRUNCATE_TYPE.auto;\n\n\tconst classes = useMemo( () => {\n\t\tconst truncateLines = css`\n\t\t\t-webkit-box-orient: vertical;\n\t\t\t-webkit-line-clamp: ${ numberOfLines };\n\t\t\tdisplay: -webkit-box;\n\t\t\toverflow: hidden;\n\t\t`;\n\n\t\treturn cx(\n\t\t\tshouldTruncate && ! numberOfLines && styles.Truncate,\n\t\t\tshouldTruncate && !! numberOfLines && truncateLines,\n\t\t\tclassName\n\t\t);\n\t}, [ className, cx, numberOfLines, shouldTruncate ] );\n\n\treturn { ...otherProps, className: classes, children: truncatedContent };\n}\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAMA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,u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AEkB,OAAO;IAAEjB,QAAQ,EAAEc;EAAiB,CAAC;AACzE"}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.Truncate = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
9
- const Truncate = process.env.NODE_ENV === "production" ? {
9
+ const Truncate = exports.Truncate = process.env.NODE_ENV === "production" ? {
10
10
  name: "hdknak",
11
11
  styles: "display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"
12
12
  } : {
@@ -15,5 +15,4 @@ const Truncate = process.env.NODE_ENV === "production" ? {
15
15
  map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdHJ1bmNhdGUvc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUsyQiIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3RydW5jYXRlL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuZXhwb3J0IGNvbnN0IFRydW5jYXRlID0gY3NzYFxuXHRkaXNwbGF5OiBibG9jaztcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5gO1xuIl19 */",
16
16
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
17
17
  };
18
- exports.Truncate = Truncate;
19
18
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_EMOTION_STRINGIFIED_CSS_ERROR__","Truncate","process","env","NODE_ENV","name","styles","map","toString","exports"],"sources":["@wordpress/components/src/truncate/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const Truncate = css`\n\tdisplay: block;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n`;\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAAqC,SAAAC,iCAAA;AAE9B,MAAMC,QAAQ,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAR;AAAA,CAKpB;AAACS,OAAA,CAAAR,QAAA,GAAAA,QAAA"}
1
+ {"version":3,"names":["_react","require","_EMOTION_STRINGIFIED_CSS_ERROR__","Truncate","exports","process","env","NODE_ENV","name","styles","map","toString"],"sources":["@wordpress/components/src/truncate/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const Truncate = css`\n\tdisplay: block;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n`;\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAAqC,SAAAC,iCAAA;AAE9B,MAAMC,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAAE,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAT;AAAA,CAKpB"}
@@ -11,17 +11,15 @@ var _values = require("../utils/values");
11
11
  * Internal dependencies
12
12
  */
13
13
 
14
- const TRUNCATE_ELLIPSIS = '…';
15
- exports.TRUNCATE_ELLIPSIS = TRUNCATE_ELLIPSIS;
16
- const TRUNCATE_TYPE = {
14
+ const TRUNCATE_ELLIPSIS = exports.TRUNCATE_ELLIPSIS = '…';
15
+ const TRUNCATE_TYPE = exports.TRUNCATE_TYPE = {
17
16
  auto: 'auto',
18
17
  head: 'head',
19
18
  middle: 'middle',
20
19
  tail: 'tail',
21
20
  none: 'none'
22
21
  };
23
- exports.TRUNCATE_TYPE = TRUNCATE_TYPE;
24
- const TRUNCATE_DEFAULT_PROPS = {
22
+ const TRUNCATE_DEFAULT_PROPS = exports.TRUNCATE_DEFAULT_PROPS = {
25
23
  ellipsis: TRUNCATE_ELLIPSIS,
26
24
  ellipsizeMode: TRUNCATE_TYPE.auto,
27
25
  limit: 0,
@@ -30,7 +28,6 @@ const TRUNCATE_DEFAULT_PROPS = {
30
28
 
31
29
  // Source
32
30
  // https://github.com/kahwee/truncate-middle
33
- exports.TRUNCATE_DEFAULT_PROPS = TRUNCATE_DEFAULT_PROPS;
34
31
  function truncateMiddle(word, headLength, tailLength, ellipsis) {
35
32
  if (typeof word !== 'string') {
36
33
  return '';
@@ -1 +1 @@
1
- {"version":3,"names":["_values","require","TRUNCATE_ELLIPSIS","exports","TRUNCATE_TYPE","auto","head","middle","tail","none","TRUNCATE_DEFAULT_PROPS","ellipsis","ellipsizeMode","limit","numberOfLines","truncateMiddle","word","headLength","tailLength","wordLength","length","frontLength","backLength","truncateStr","isValueDefined","slice","truncateContent","words","props","mergedProps","truncateHead","truncateTail","Math","floor","truncatedContent"],"sources":["@wordpress/components/src/truncate/utils.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { isValueDefined } from '../utils/values';\nimport type { TruncateProps } from './types';\n\nexport const TRUNCATE_ELLIPSIS = '…';\nexport const TRUNCATE_TYPE = {\n\tauto: 'auto',\n\thead: 'head',\n\tmiddle: 'middle',\n\ttail: 'tail',\n\tnone: 'none',\n} as const;\n\nexport const TRUNCATE_DEFAULT_PROPS = {\n\tellipsis: TRUNCATE_ELLIPSIS,\n\tellipsizeMode: TRUNCATE_TYPE.auto,\n\tlimit: 0,\n\tnumberOfLines: 0,\n};\n\n// Source\n// https://github.com/kahwee/truncate-middle\nexport function truncateMiddle(\n\tword: string,\n\theadLength: number,\n\ttailLength: number,\n\tellipsis: string\n) {\n\tif ( typeof word !== 'string' ) {\n\t\treturn '';\n\t}\n\tconst wordLength = word.length;\n\t// Setting default values\n\t// eslint-disable-next-line no-bitwise\n\tconst frontLength = ~~headLength; // Will cast to integer\n\t// eslint-disable-next-line no-bitwise\n\tconst backLength = ~~tailLength;\n\t/* istanbul ignore next */\n\tconst truncateStr = isValueDefined( ellipsis )\n\t\t? ellipsis\n\t\t: TRUNCATE_ELLIPSIS;\n\n\tif (\n\t\t( frontLength === 0 && backLength === 0 ) ||\n\t\tfrontLength >= wordLength ||\n\t\tbackLength >= wordLength ||\n\t\tfrontLength + backLength >= wordLength\n\t) {\n\t\treturn word;\n\t} else if ( backLength === 0 ) {\n\t\treturn word.slice( 0, frontLength ) + truncateStr;\n\t}\n\treturn (\n\t\tword.slice( 0, frontLength ) +\n\t\ttruncateStr +\n\t\tword.slice( wordLength - backLength )\n\t);\n}\n\nexport function truncateContent(\n\twords: string = '',\n\tprops: Omit< TruncateProps, 'children' >\n) {\n\tconst mergedProps = { ...TRUNCATE_DEFAULT_PROPS, ...props };\n\tconst { ellipsis, ellipsizeMode, limit } = mergedProps;\n\n\tif ( ellipsizeMode === TRUNCATE_TYPE.none ) {\n\t\treturn words;\n\t}\n\n\tlet truncateHead: number;\n\tlet truncateTail: number;\n\n\tswitch ( ellipsizeMode ) {\n\t\tcase TRUNCATE_TYPE.head:\n\t\t\ttruncateHead = 0;\n\t\t\ttruncateTail = limit;\n\t\t\tbreak;\n\t\tcase TRUNCATE_TYPE.middle:\n\t\t\ttruncateHead = Math.floor( limit / 2 );\n\t\t\ttruncateTail = Math.floor( limit / 2 );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttruncateHead = limit;\n\t\t\ttruncateTail = 0;\n\t}\n\n\tconst truncatedContent =\n\t\tellipsizeMode !== TRUNC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AKM,UAAU,KAAK,CAAC,EAAG;IAC9B,OAAON,IAAI,CAACS,KAAK,CAAE,CAAC,EAAEJ,WAAY,CAAC,GAAGE,WAAW;EAClD;EACA,OACCP,IAAI,CAACS,KAAK,CAAE,CAAC,EAAEJ,WAAY,CAAC,GAC5BE,WAAW,GACXP,IAAI,CAACS,KAAK,CAAEN,UAAU,GAAGG,UAAW,CAAC;AAEvC;AAEO,SAASI,eAAeA,CAC9BC,KAAa,GAAG,EAAE,EAClBC,KAAwC,EACvC;EACD,MAAMC,WAAW,GAAG;IAAE,GAAGnB,sBAAsB;IAAE,GAAGkB;EAAM,CAAC;EAC3D,MAAM;IAAEjB,QAAQ;IAAEC,aAAa;IAAEC;EAAM,CAAC,GAAGgB,WAAW;EAEtD,IAAKjB,aAAa,KAAKR,aAAa,CAACK,IAAI,EAAG;IAC3C,OAAOkB,KAAK;EACb;EAEA,IAAIG,YAAoB;EACxB,IAAIC,YAAoB;EAExB,QAASnB,aAAa;IACrB,KAAKR,aAAa,CAACE,IAAI;MACtBwB,YAAY,GAAG,CAAC;MAChBC,YAAY,GAAGlB,KAAK;MACpB;IACD,KAAKT,aAAa,CAACG,MAAM;MACxBuB,YAAY,GAAGE,IAAI,CAACC,KAAK,CAAEpB,KAAK,GAAG,CAAE,CAAC;MACtCkB,YAAY,GAAGC,IAAI,CAACC,KAAK,CAAEpB,KAAK,GAAG,CAAE,CAAC;MACtC;IACD;MACCiB,YAAY,GAAGjB,KAAK;MACpBkB,YAAY,GAAG,CAAC;EAClB;EAEA,MAAMG,gBAAgB,GACrBtB,aAAa,KAAKR,aAAa,CAACC,IAAI,GACjCU,cAAc,CAAEY,KAAK,EAAEG,YAAY,EAAEC,YAAY,EAAEpB,QAAS,CAAC,GAC7DgB,KAAK;EAET,OAAOO,gBAAgB;AACxB"}
1
+ {"version":3,"names":["_values","require","TRUNCATE_ELLIPSIS","exports","TRUNCATE_TYPE","auto","head","middle","tail","none","TRUNCATE_DEFAULT_PROPS","ellipsis","ellipsizeMode","limit","numberOfLines","truncateMiddle","word","headLength","tailLength","wordLength","length","frontLength","backLength","truncateStr","isValueDefined","slice","truncateContent","words","props","mergedProps","truncateHead","truncateTail","Math","floor","truncatedContent"],"sources":["@wordpress/components/src/truncate/utils.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { isValueDefined } from '../utils/values';\nimport type { TruncateProps } from './types';\n\nexport const TRUNCATE_ELLIPSIS = '…';\nexport const TRUNCATE_TYPE = {\n\tauto: 'auto',\n\thead: 'head',\n\tmiddle: 'middle',\n\ttail: 'tail',\n\tnone: 'none',\n} as const;\n\nexport const TRUNCATE_DEFAULT_PROPS = {\n\tellipsis: TRUNCATE_ELLIPSIS,\n\tellipsizeMode: TRUNCATE_TYPE.auto,\n\tlimit: 0,\n\tnumberOfLines: 0,\n};\n\n// Source\n// https://github.com/kahwee/truncate-middle\nexport function truncateMiddle(\n\tword: string,\n\theadLength: number,\n\ttailLength: number,\n\tellipsis: string\n) {\n\tif ( typeof word !== 'string' ) {\n\t\treturn '';\n\t}\n\tconst wordLength = word.length;\n\t// Setting default values\n\t// eslint-disable-next-line no-bitwise\n\tconst frontLength = ~~headLength; // Will cast to integer\n\t// eslint-disable-next-line no-bitwise\n\tconst backLength = ~~tailLength;\n\t/* istanbul ignore next */\n\tconst truncateStr = isValueDefined( ellipsis )\n\t\t? ellipsis\n\t\t: TRUNCATE_ELLIPSIS;\n\n\tif (\n\t\t( frontLength === 0 && backLength === 0 ) ||\n\t\tfrontLength >= wordLength ||\n\t\tbackLength >= wordLength ||\n\t\tfrontLength + backLength >= wordLength\n\t) {\n\t\treturn word;\n\t} else if ( backLength === 0 ) {\n\t\treturn word.slice( 0, frontLength ) + truncateStr;\n\t}\n\treturn (\n\t\tword.slice( 0, frontLength ) +\n\t\ttruncateStr +\n\t\tword.slice( wordLength - backLength )\n\t);\n}\n\nexport function truncateContent(\n\twords: string = '',\n\tprops: Omit< TruncateProps, 'children' >\n) {\n\tconst mergedProps = { ...TRUNCATE_DEFAULT_PROPS, ...props };\n\tconst { ellipsis, ellipsizeMode, limit } = mergedProps;\n\n\tif ( ellipsizeMode === TRUNCATE_TYPE.none ) {\n\t\treturn words;\n\t}\n\n\tlet truncateHead: number;\n\tlet truncateTail: number;\n\n\tswitch ( ellipsizeMode ) {\n\t\tcase TRUNCATE_TYPE.head:\n\t\t\ttruncateHead = 0;\n\t\t\ttruncateTail = limit;\n\t\t\tbreak;\n\t\tcase TRUNCATE_TYPE.middle:\n\t\t\ttruncateHead = Math.floor( limit / 2 );\n\t\t\ttruncateTail = Math.floor( limit / 2 );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttruncateHead = limit;\n\t\t\ttruncateTail = 0;\n\t}\n\n\tconst truncatedContent =\n\t\tellipsizeMode !== TRUNCATE_TYPE.auto\n\t\t\t? truncateMiddle( words, truncateHead, truncateTail, ellipsis )\n\t\t\t: words;\n\n\treturn truncatedContent;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAIO,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,GAAG;AAC7B,MAAME,aAAa,GAAAD,OAAA,CAAAC,aAAA,GAAG;EAC5BC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE;AACP,CAAU;AAEH,MAAMC,sBAAsB,GAAAP,OAAA,CAAAO,sBAAA,GAAG;EACrCC,QAAQ,EAAET,iBAAiB;EAC3BU,aAAa,EAAER,aAAa,CAACC,IAAI;EACjCQ,KAAK,EAAE,CAAC;EACRC,aAAa,EAAE;AAChB,CAAC;;AAED;AACA;AACO,SAASC,cAAcA,CAC7BC,IAAY,EACZC,UAAkB,EAClBC,UAAkB,EAClBP,QAAgB,EACf;EACD,IAAK,OAAOK,IAAI,KAAK,QAAQ,EAAG;IAC/B,OAAO,EAAE;EACV;EACA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G,CAAE,CAAC;MACtCkB,YAAY,GAAGC,IAAI,CAACC,KAAK,CAAEpB,KAAK,GAAG,CAAE,CAAC;MACtC;IACD;MACCiB,YAAY,GAAGjB,KAAK;MACpBkB,YAAY,GAAG,CAAC;EAClB;EAEA,MAAMG,gBAAgB,GACrBtB,aAAa,KAAKR,aAAa,CAACC,IAAI,GACjCU,cAAc,CAAEY,KAAK,EAAEG,YAAY,EAAEC,YAAY,EAAEpB,QAAS,CAAC,GAC7DgB,KAAK;EAET,OAAOO,gBAAgB;AACxB"}
@@ -57,7 +57,7 @@ function UnforwardedUnitControl(unitControlProps, forwardedRef) {
57
57
  value: valueProp,
58
58
  onFocus: onFocusProp,
59
59
  ...props
60
- } = (0, _useDeprecatedProps.useDeprecated36pxDefaultSizeProp)(unitControlProps, 'wp.components.UnitControl', '6.4');
60
+ } = (0, _useDeprecatedProps.useDeprecated36pxDefaultSizeProp)(unitControlProps);
61
61
  if ('unit' in unitControlProps) {
62
62
  (0, _deprecated.default)('UnitControl unit prop', {
63
63
  since: '5.6',
@@ -192,8 +192,6 @@ function UnforwardedUnitControl(unitControlProps, forwardedRef) {
192
192
  * };
193
193
  * ```
194
194
  */
195
- const UnitControl = (0, _element.forwardRef)(UnforwardedUnitControl);
196
- exports.UnitControl = UnitControl;
197
- var _default = UnitControl;
198
- exports.default = _default;
195
+ const UnitControl = exports.UnitControl = (0, _element.forwardRef)(UnforwardedUnitControl);
196
+ var _default = exports.default = UnitControl;
199
197
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_deprecated","_element","_i18n","_unitControlStyles","_unitSelectControl","_utils","_hooks","_strings","_useDeprecatedProps","UnforwardedUnitControl","unitControlProps","forwardedRef","__unstableStateReducer","autoComplete","children","className","disabled","disableUnits","isPressEnterToChange","isResetValueOnUnitChange","isUnitSelectTabbable","label","onChange","onChangeProp","onUnitChange","size","unit","unitProp","units","unitsProp","CSS_UNITS","value","valueProp","onFocus","onFocusProp","props","useDeprecated36pxDefaultSizeProp","deprecated","since","hint","version","nonNullValueProp","undefined","reFirstCharacterOfUnits","useMemo","list","getUnitsWithCurrentUnit","firstUnitValue","rest","firstCharacters","reduce","carry","first","escapeRegExp","substring","includes","RegExp","parsedQuantity","parsedUnit","getParsedQuantityAndUnit","setUnit","useControlledState","length","initial","fallback","useEffect","classes","classnames","handleOnQuantityChange","nextQuantityValue","changeProps","onChangeValue","getValidParsedQuantityAndUnit","join","handleOnUnitChange","nextUnitValue","data","nextValue","default","handleOnKeyDown","event","onKeyDown","metaKey","test","key","refInputSuffix","current","focus","useRef","inputSuffix","_react","createElement","ref","__","__next40pxDefaultSize","onBlur","step","_activeUnit$step","activeUnit","find","option","ValueInput","spinControls","suffix","type","UnitControl","forwardRef","exports","_default"],"sources":["@wordpress/components/src/unit-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { KeyboardEvent, ForwardedRef, SyntheticEvent } from 'react';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { ValueInput } from './styles/unit-control-styles';\nimport UnitSelectControl from './unit-select-control';\nimport {\n\tCSS_UNITS,\n\tgetParsedQuantityAndUnit,\n\tgetUnitsWithCurrentUnit,\n\tgetValidParsedQuantityAndUnit,\n} from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport { escapeRegExp } from '../utils/strings';\nimport type { UnitControlProps, UnitControlOnChangeCallback } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\n\nfunction UnforwardedUnitControl(\n\tunitControlProps: WordPressComponentProps<\n\t\tUnitControlProps,\n\t\t'input',\n\t\tfalse\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__unstableStateReducer,\n\t\tautoComplete = 'off',\n\t\t// @ts-expect-error Ensure that children is omitted from restProps\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\tdisableUnits = false,\n\t\tisPressEnterToChange = false,\n\t\tisResetValueOnUnitChange = false,\n\t\tisUnitSelectTabbable = true,\n\t\tlabel,\n\t\tonChange: onChangeProp,\n\t\tonUnitChange,\n\t\tsize = 'default',\n\t\tunit: unitProp,\n\t\tunits: unitsProp = CSS_UNITS,\n\t\tvalue: valueProp,\n\t\tonFocus: onFocusProp,\n\t\t...props\n\t} = useDeprecated36pxDefaultSizeProp(\n\t\tunitControlProps,\n\t\t'wp.components.UnitControl',\n\t\t'6.4'\n\t);\n\n\tif ( 'unit' in unitControlProps ) {\n\t\tdeprecated( 'UnitControl unit prop', {\n\t\t\tsince: '5.6',\n\t\t\thint: 'The unit should be provided within the `value` prop.',\n\t\t\tversion: '6.2',\n\t\t} );\n\t}\n\n\t// The `value` prop, in theory, should not be `null`, but the following line\n\t// ensures it fallback to `undefined` in case a consumer of `UnitControl`\n\t// still passes `null` as a `value`.\n\tconst nonNullValueProp = valueProp ?? undefined;\n\tconst [ units, reFirstCharacterOfUnits ] = useMemo( () => {\n\t\tconst list = getUnitsWithCurrentUnit(\n\t\t\tnonNullValueProp,\n\t\t\tunitProp,\n\t\t\tunitsProp\n\t\t);\n\t\tconst [ { value: firstUnitValue = '' } = {}, ...rest ] = list;\n\t\tconst firstCharacters = rest.reduce(\n\t\t\t( carry, { value } ) => {\n\t\t\t\tconst first = escapeRegExp( value?.substring( 0, 1 ) || '' );\n\t\t\t\treturn carry.includes( first )\n\t\t\t\t\t? carry\n\t\t\t\t\t: `${ carry }|${ first }`;\n\t\t\t},\n\t\t\tescapeRegExp( firstUnitValue.substring( 0, 1 ) )\n\t\t);\n\t\treturn [ list, new RegExp( `^(?:${ firstCharacters })$`, 'i' ) ];\n\t}, [ nonNullValueProp, unitProp, unitsProp ] );\n\tconst [ parsedQuantity, parsedUnit ] = getParsedQuantityAndUnit(\n\t\tnonNullValueProp,\n\t\tunitProp,\n\t\tunits\n\t);\n\n\tconst [ unit, setUnit ] = useControlledState< string | undefined >(\n\t\tunits.length === 1 ? units[ 0 ].value : unitProp,\n\t\t{\n\t\t\tinitial: parsedUnit,\n\t\t\tfallback: '',\n\t\t}\n\t);\n\n\tuseEffect( () => {\n\t\tif ( parsedUnit !== undefined ) {\n\t\t\tsetUnit( parsedUnit );\n\t\t}\n\t}, [ parsedUnit, setUnit ] );\n\n\tconst classes = classnames(\n\t\t'components-unit-control',\n\t\t// This class is added for legacy purposes to maintain it on the outer\n\t\t// wrapper. See: https://github.com/WordPress/gutenberg/pull/45139\n\t\t'components-unit-control-wrapper',\n\t\tclassName\n\t);\n\n\tconst handleOnQuantityChange = (\n\t\tnextQuantityValue: number | string | undefined,\n\t\tchangeProps: {\n\t\t\tevent: SyntheticEvent;\n\t\t}\n\t) => {\n\t\tif (\n\t\t\tnextQuantityValue === '' ||\n\t\t\ttypeof nextQuantityValue === 'undefined' ||\n\t\t\tnextQuantityValue === null\n\t\t) {\n\t\t\tonChangeProp?.( '', changeProps );\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Customizing the onChange callback.\n\t\t * This allows as to broadcast a combined value+unit to onChange.\n\t\t */\n\t\tconst onChangeValue = getValidParsedQuantityAndUnit(\n\t\t\tnextQuantityValue,\n\t\t\tunits,\n\t\t\tparsedQuantity,\n\t\t\tunit\n\t\t).join( '' );\n\n\t\tonChangeProp?.( onChangeValue, changeProps );\n\t};\n\n\tconst handleOnUnitChange: UnitControlOnChangeCallback = (\n\t\tnextUnitValue,\n\t\tchangeProps\n\t) => {\n\t\tconst { data } = changeProps;\n\n\t\tlet nextValue = `${ parsedQuantity ?? '' }${ nextUnitValue }`;\n\n\t\tif ( isResetValueOnUnitChange && data?.default !== undefined ) {\n\t\t\tnextValue = `${ data.default }${ nextUnitValue }`;\n\t\t}\n\n\t\tonChangeProp?.( nextValue, changeProps );\n\t\tonUnitChange?.( nextUnitValue, changeProps );\n\n\t\tsetUnit( nextUnitValue );\n\t};\n\n\tlet handleOnKeyDown;\n\tif ( ! disableUnits && isUnitSelectTabbable && units.length ) {\n\t\thandleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\t\tprops.onKeyDown?.( event );\n\t\t\t// Unless the meta key was pressed (to avoid interfering with\n\t\t\t// shortcuts, e.g. pastes), moves focus to the unit select if a key\n\t\t\t// matches the first character of a unit.\n\t\t\tif ( ! event.metaKey && reFirstCharacterOfUnits.test( event.key ) )\n\t\t\t\trefInputSuffix.current?.focus();\n\t\t};\n\t}\n\n\tconst refInputSuffix = useRef< HTMLSelectElement >( null );\n\tconst inputSuffix = ! disableUnits ? (\n\t\t<UnitSelectControl\n\t\t\tref={ refInputSuffix }\n\t\t\taria-label={ __( 'Select unit' ) }\n\t\t\tdisabled={ disabled }\n\t\t\tisUnitSelectTabbable={ isUnitSelectTabbable }\n\t\t\tonChange={ handleOnUnitChange }\n\t\t\tsize={\n\t\t\t\t[ 'small', 'compact' ].includes( size ) ||\n\t\t\t\t( size === 'default' && ! props.__next40pxDefaultSize )\n\t\t\t\t\t? 'small'\n\t\t\t\t\t: 'default'\n\t\t\t}\n\t\t\tunit={ unit }\n\t\t\tunits={ units }\n\t\t\tonFocus={ onFocusProp }\n\t\t\tonBlur={ unitControlProps.onBlur }\n\t\t/>\n\t) : null;\n\n\tlet step = props.step;\n\n\t/*\n\t * If no step prop has been passed, lookup the active unit and\n\t * try to get step from `units`, or default to a value of `1`\n\t */\n\tif ( ! step && units ) {\n\t\tconst activeUnit = units.find( ( option ) => option.value === unit );\n\t\tstep = activeUnit?.step ?? 1;\n\t}\n\n\treturn (\n\t\t<ValueInput\n\t\t\t{ ...props }\n\t\t\tautoComplete={ autoComplete }\n\t\t\tclassName={ classes }\n\t\t\tdisabled={ disabled }\n\t\t\tspinControls=\"none\"\n\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\tlabel={ label }\n\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\tonChange={ handleOnQuantityChange }\n\t\t\tref={ forwardedRef }\n\t\t\tsize={ size }\n\t\t\tsuffix={ inputSuffix }\n\t\t\ttype={ isPressEnterToChange ? 'text' : 'number' }\n\t\t\tvalue={ parsedQuantity ?? '' }\n\t\t\tstep={ step }\n\t\t\tonFocus={ onFocusProp }\n\t\t\t__unstableStateReducer={ __unstableStateReducer }\n\t\t/>\n\t);\n}\n\n/**\n * `UnitControl` allows the user to set a numeric quantity as well as a unit (e.g. `px`).\n *\n *\n * ```jsx\n * import { __experimentalUnitControl as UnitControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '10px' );\n *\n * return <UnitControl onChange={ setValue } value={ value } />;\n * };\n * ```\n */\nexport const UnitControl = forwardRef( UnforwardedUnitControl );\n\nexport { parseQuantityAndUnitFromRawValue, useCustomUnits } from './utils';\nexport default UnitControl;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAMA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAMA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAEA,IAAAS,mBAAA,GAAAT,OAAA;AA5BA;AACA;AACA;;AAIA;AACA;AACA;;AAsBA,SAASU,sBAAsBA,CAC9BC,gBAIC,EACDC,YAAiC,EAChC;EACD,MAAM;IACLC,sBAAsB;IACtBC,YAAY,GAAG,KAAK;IACpB;IACAC,QAAQ;IACRC,SAAS;IACTC,QAAQ,GAAG,KAAK;IAChBC,YAAY,GAAG,KAAK;IACpB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AAI,EAAGA,IAAM;IACb/D,OAAO,EAAGC,WAAa;IACvBtB,sBAAsB,EAAGA;EAAwB,CACjD,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM6F,WAAW,GAAG,IAAAC,mBAAU,EAAEjG,sBAAuB,CAAC;AAACkG,OAAA,CAAAF,WAAA,GAAAA,WAAA;AAAA,IAAAG,QAAA,GAGjDH,WAAW;AAAAE,OAAA,CAAA7B,OAAA,GAAA8B,QAAA"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_deprecated","_element","_i18n","_unitControlStyles","_unitSelectControl","_utils","_hooks","_strings","_useDeprecatedProps","UnforwardedUnitControl","unitControlProps","forwardedRef","__unstableStateReducer","autoComplete","children","className","disabled","disableUnits","isPressEnterToChange","isResetValueOnUnitChange","isUnitSelectTabbable","label","onChange","onChangeProp","onUnitChange","size","unit","unitProp","units","unitsProp","CSS_UNITS","value","valueProp","onFocus","onFocusProp","props","useDeprecated36pxDefaultSizeProp","deprecated","since","hint","version","nonNullValueProp","undefined","reFirstCharacterOfUnits","useMemo","list","getUnitsWithCurrentUnit","firstUnitValue","rest","firstCharacters","reduce","carry","first","escapeRegExp","substring","includes","RegExp","parsedQuantity","parsedUnit","getParsedQuantityAndUnit","setUnit","useControlledState","length","initial","fallback","useEffect","classes","classnames","handleOnQuantityChange","nextQuantityValue","changeProps","onChangeValue","getValidParsedQuantityAndUnit","join","handleOnUnitChange","nextUnitValue","data","nextValue","default","handleOnKeyDown","event","onKeyDown","metaKey","test","key","refInputSuffix","current","focus","useRef","inputSuffix","_react","createElement","ref","__","__next40pxDefaultSize","onBlur","step","_activeUnit$step","activeUnit","find","option","ValueInput","spinControls","suffix","type","UnitControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/unit-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { KeyboardEvent, ForwardedRef, SyntheticEvent } from 'react';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { ValueInput } from './styles/unit-control-styles';\nimport UnitSelectControl from './unit-select-control';\nimport {\n\tCSS_UNITS,\n\tgetParsedQuantityAndUnit,\n\tgetUnitsWithCurrentUnit,\n\tgetValidParsedQuantityAndUnit,\n} from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport { escapeRegExp } from '../utils/strings';\nimport type { UnitControlProps, UnitControlOnChangeCallback } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\n\nfunction UnforwardedUnitControl(\n\tunitControlProps: WordPressComponentProps<\n\t\tUnitControlProps,\n\t\t'input',\n\t\tfalse\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__unstableStateReducer,\n\t\tautoComplete = 'off',\n\t\t// @ts-expect-error Ensure that children is omitted from restProps\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\tdisableUnits = false,\n\t\tisPressEnterToChange = false,\n\t\tisResetValueOnUnitChange = false,\n\t\tisUnitSelectTabbable = true,\n\t\tlabel,\n\t\tonChange: onChangeProp,\n\t\tonUnitChange,\n\t\tsize = 'default',\n\t\tunit: unitProp,\n\t\tunits: unitsProp = CSS_UNITS,\n\t\tvalue: valueProp,\n\t\tonFocus: onFocusProp,\n\t\t...props\n\t} = useDeprecated36pxDefaultSizeProp( unitControlProps );\n\n\tif ( 'unit' in unitControlProps ) {\n\t\tdeprecated( 'UnitControl unit prop', {\n\t\t\tsince: '5.6',\n\t\t\thint: 'The unit should be provided within the `value` prop.',\n\t\t\tversion: '6.2',\n\t\t} );\n\t}\n\n\t// The `value` prop, in theory, should not be `null`, but the following line\n\t// ensures it fallback to `undefined` in case a consumer of `UnitControl`\n\t// still passes `null` as a `value`.\n\tconst nonNullValueProp = valueProp ?? undefined;\n\tconst [ units, reFirstCharacterOfUnits ] = useMemo( () => {\n\t\tconst list = getUnitsWithCurrentUnit(\n\t\t\tnonNullValueProp,\n\t\t\tunitProp,\n\t\t\tunitsProp\n\t\t);\n\t\tconst [ { value: firstUnitValue = '' } = {}, ...rest ] = list;\n\t\tconst firstCharacters = rest.reduce(\n\t\t\t( carry, { value } ) => {\n\t\t\t\tconst first = escapeRegExp( value?.substring( 0, 1 ) || '' );\n\t\t\t\treturn carry.includes( first )\n\t\t\t\t\t? carry\n\t\t\t\t\t: `${ carry }|${ first }`;\n\t\t\t},\n\t\t\tescapeRegExp( firstUnitValue.substring( 0, 1 ) )\n\t\t);\n\t\treturn [ list, new RegExp( `^(?:${ firstCharacters })$`, 'i' ) ];\n\t}, [ nonNullValueProp, unitProp, unitsProp ] );\n\tconst [ parsedQuantity, parsedUnit ] = getParsedQuantityAndUnit(\n\t\tnonNullValueProp,\n\t\tunitProp,\n\t\tunits\n\t);\n\n\tconst [ unit, setUnit ] = useControlledState< string | undefined >(\n\t\tunits.length === 1 ? units[ 0 ].value : unitProp,\n\t\t{\n\t\t\tinitial: parsedUnit,\n\t\t\tfallback: '',\n\t\t}\n\t);\n\n\tuseEffect( () => {\n\t\tif ( parsedUnit !== undefined ) {\n\t\t\tsetUnit( parsedUnit );\n\t\t}\n\t}, [ parsedUnit, setUnit ] );\n\n\tconst classes = classnames(\n\t\t'components-unit-control',\n\t\t// This class is added for legacy purposes to maintain it on the outer\n\t\t// wrapper. See: https://github.com/WordPress/gutenberg/pull/45139\n\t\t'components-unit-control-wrapper',\n\t\tclassName\n\t);\n\n\tconst handleOnQuantityChange = (\n\t\tnextQuantityValue: number | string | undefined,\n\t\tchangeProps: {\n\t\t\tevent: SyntheticEvent;\n\t\t}\n\t) => {\n\t\tif (\n\t\t\tnextQuantityValue === '' ||\n\t\t\ttypeof nextQuantityValue === 'undefined' ||\n\t\t\tnextQuantityValue === null\n\t\t) {\n\t\t\tonChangeProp?.( '', changeProps );\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Customizing the onChange callback.\n\t\t * This allows as to broadcast a combined value+unit to onChange.\n\t\t */\n\t\tconst onChangeValue = getValidParsedQuantityAndUnit(\n\t\t\tnextQuantityValue,\n\t\t\tunits,\n\t\t\tparsedQuantity,\n\t\t\tunit\n\t\t).join( '' );\n\n\t\tonChangeProp?.( onChangeValue, changeProps );\n\t};\n\n\tconst handleOnUnitChange: UnitControlOnChangeCallback = (\n\t\tnextUnitValue,\n\t\tchangeProps\n\t) => {\n\t\tconst { data } = changeProps;\n\n\t\tlet nextValue = `${ parsedQuantity ?? '' }${ nextUnitValue }`;\n\n\t\tif ( isResetValueOnUnitChange && data?.default !== undefined ) {\n\t\t\tnextValue = `${ data.default }${ nextUnitValue }`;\n\t\t}\n\n\t\tonChangeProp?.( nextValue, changeProps );\n\t\tonUnitChange?.( nextUnitValue, changeProps );\n\n\t\tsetUnit( nextUnitValue );\n\t};\n\n\tlet handleOnKeyDown;\n\tif ( ! disableUnits && isUnitSelectTabbable && units.length ) {\n\t\thandleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\t\tprops.onKeyDown?.( event );\n\t\t\t// Unless the meta key was pressed (to avoid interfering with\n\t\t\t// shortcuts, e.g. pastes), moves focus to the unit select if a key\n\t\t\t// matches the first character of a unit.\n\t\t\tif ( ! event.metaKey && reFirstCharacterOfUnits.test( event.key ) )\n\t\t\t\trefInputSuffix.current?.focus();\n\t\t};\n\t}\n\n\tconst refInputSuffix = useRef< HTMLSelectElement >( null );\n\tconst inputSuffix = ! disableUnits ? (\n\t\t<UnitSelectControl\n\t\t\tref={ refInputSuffix }\n\t\t\taria-label={ __( 'Select unit' ) }\n\t\t\tdisabled={ disabled }\n\t\t\tisUnitSelectTabbable={ isUnitSelectTabbable }\n\t\t\tonChange={ handleOnUnitChange }\n\t\t\tsize={\n\t\t\t\t[ 'small', 'compact' ].includes( size ) ||\n\t\t\t\t( size === 'default' && ! props.__next40pxDefaultSize )\n\t\t\t\t\t? 'small'\n\t\t\t\t\t: 'default'\n\t\t\t}\n\t\t\tunit={ unit }\n\t\t\tunits={ units }\n\t\t\tonFocus={ onFocusProp }\n\t\t\tonBlur={ unitControlProps.onBlur }\n\t\t/>\n\t) : null;\n\n\tlet step = props.step;\n\n\t/*\n\t * If no step prop has been passed, lookup the active unit and\n\t * try to get step from `units`, or default to a value of `1`\n\t */\n\tif ( ! step && units ) {\n\t\tconst activeUnit = units.find( ( option ) => option.value === unit );\n\t\tstep = activeUnit?.step ?? 1;\n\t}\n\n\treturn (\n\t\t<ValueInput\n\t\t\t{ ...props }\n\t\t\tautoComplete={ autoComplete }\n\t\t\tclassName={ classes }\n\t\t\tdisabled={ disabled }\n\t\t\tspinControls=\"none\"\n\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\tlabel={ label }\n\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\tonChange={ handleOnQuantityChange }\n\t\t\tref={ forwardedRef }\n\t\t\tsize={ size }\n\t\t\tsuffix={ inputSuffix }\n\t\t\ttype={ isPressEnterToChange ? 'text' : 'number' }\n\t\t\tvalue={ parsedQuantity ?? '' }\n\t\t\tstep={ step }\n\t\t\tonFocus={ onFocusProp }\n\t\t\t__unstableStateReducer={ __unstableStateReducer }\n\t\t/>\n\t);\n}\n\n/**\n * `UnitControl` allows the user to set a numeric quantity as well as a unit (e.g. `px`).\n *\n *\n * ```jsx\n * import { __experimentalUnitControl as UnitControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '10px' );\n *\n * return <UnitControl onChange={ setValue } value={ value } />;\n * };\n * ```\n */\nexport const UnitControl = forwardRef( UnforwardedUnitControl );\n\nexport { parseQuantityAndUnitFromRawValue, useCustomUnits } from './utils';\nexport default UnitControl;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,IAAAA,W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,gBAAA,GAAI,CAAC;EAC7B;EAEA,OACC,IAAAP,MAAA,CAAAC,aAAA,EAACxF,kBAAA,CAAAkG,UAAU;IAAA,GACLlE,KAAK;IACVtB,YAAY,EAAGA,YAAc;IAC7BE,SAAS,EAAGmD,OAAS;IACrBlD,QAAQ,EAAGA,QAAU;IACrBsF,YAAY,EAAC,MAAM;IACnBpF,oBAAoB,EAAGA,oBAAsB;IAC7CG,KAAK,EAAGA,KAAO;IACf4D,SAAS,EAAGF,eAAiB;IAC7BzD,QAAQ,EAAG8C,sBAAwB;IACnCwB,GAAG,EAAGjF,YAAc;IACpBc,IAAI,EAAGA,IAAM;IACb8E,MAAM,EAAGd,WAAa;IACtBe,IAAI,EAAGtF,oBAAoB,GAAG,MAAM,GAAG,QAAU;IACjDa,KAAK,EAAG0B,cAAc,aAAdA,cAAc,cAAdA,cAAc,GAAI,EAAI;IAC9BuC,IAAI,EAAGA,IAAM;IACb/D,OAAO,EAAGC,WAAa;IACvBtB,sBAAsB,EAAGA;EAAwB,CACjD,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM6F,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,mBAAU,EAAElG,sBAAuB,CAAC;AAAC,IAAAmG,QAAA,GAAAF,OAAA,CAAA5B,OAAA,GAGjD2B,WAAW"}
@@ -157,6 +157,5 @@ function UnitControl({
157
157
  ...props
158
158
  }, renderUnitPicker()));
159
159
  }
160
- var _default = (0, _element.memo)((0, _compose.withPreferredColorScheme)(UnitControl));
161
- exports.default = _default;
160
+ var _default = exports.default = (0, _element.memo)((0, _compose.withPreferredColorScheme)(UnitControl));
162
161
  //# sourceMappingURL=index.native.js.map