@wordpress/components 19.15.0 → 20.0.1-next.d6164808d3.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 (1147) hide show
  1. package/CHANGELOG.md +154 -0
  2. package/build/alignment-matrix-control/index.js +1 -1
  3. package/build/alignment-matrix-control/index.js.map +1 -1
  4. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +9 -9
  5. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  6. package/build/angle-picker-control/index.js +5 -2
  7. package/build/angle-picker-control/index.js.map +1 -1
  8. package/build/angle-picker-control/styles/angle-picker-control-styles.js +14 -4
  9. package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  10. package/build/autocomplete/index.js +9 -11
  11. package/build/autocomplete/index.js.map +1 -1
  12. package/build/base-control/index.js +6 -3
  13. package/build/base-control/index.js.map +1 -1
  14. package/build/base-control/styles/base-control-styles.js +8 -8
  15. package/build/base-control/styles/base-control-styles.js.map +1 -1
  16. package/build/base-field/styles.js +5 -5
  17. package/build/base-field/styles.js.map +1 -1
  18. package/build/border-control/border-control/component.js +38 -25
  19. package/build/border-control/border-control/component.js.map +1 -1
  20. package/build/border-control/border-control/hook.js +4 -7
  21. package/build/border-control/border-control/hook.js.map +1 -1
  22. package/build/border-control/border-control-dropdown/component.js +13 -7
  23. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  24. package/build/border-control/border-control-dropdown/hook.js +0 -4
  25. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  26. package/build/border-control/styles.js +29 -60
  27. package/build/border-control/styles.js.map +1 -1
  28. package/build/box-control/all-input-control.js +2 -27
  29. package/build/box-control/all-input-control.js.map +1 -1
  30. package/build/box-control/axial-input-controls.js +1 -1
  31. package/build/box-control/axial-input-controls.js.map +1 -1
  32. package/build/box-control/index.js +10 -5
  33. package/build/box-control/index.js.map +1 -1
  34. package/build/box-control/styles/box-control-styles.js +17 -9
  35. package/build/box-control/styles/box-control-styles.js.map +1 -1
  36. package/build/box-control/styles/box-control-visualizer-styles.js +8 -8
  37. package/build/box-control/styles/box-control-visualizer-styles.js.map +1 -1
  38. package/build/box-control/utils.js +37 -8
  39. package/build/box-control/utils.js.map +1 -1
  40. package/build/color-list-picker/index.js +16 -5
  41. package/build/color-list-picker/index.js.map +1 -1
  42. package/build/color-palette/index.js +36 -14
  43. package/build/color-palette/index.js.map +1 -1
  44. package/build/color-palette/index.native.js +3 -3
  45. package/build/color-palette/index.native.js.map +1 -1
  46. package/build/color-picker/hex-input.js +2 -1
  47. package/build/color-picker/hex-input.js.map +1 -1
  48. package/build/color-picker/input-with-slider.js +3 -2
  49. package/build/color-picker/input-with-slider.js.map +1 -1
  50. package/build/color-picker/styles.js +10 -15
  51. package/build/color-picker/styles.js.map +1 -1
  52. package/build/combobox-control/index.js +26 -17
  53. package/build/combobox-control/index.js.map +1 -1
  54. package/build/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/constants.js +0 -0
  55. package/build/custom-gradient-picker/gradient-bar/constants.js.map +1 -0
  56. package/build/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/control-points.js +34 -41
  57. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -0
  58. package/build/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/index.js +0 -1
  59. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -0
  60. package/build/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/utils.js +0 -0
  61. package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -0
  62. package/build/custom-gradient-picker/index.js +19 -4
  63. package/build/custom-gradient-picker/index.js.map +1 -1
  64. package/build/custom-select-control/index.js +43 -13
  65. package/build/custom-select-control/index.js.map +1 -1
  66. package/build/custom-select-control/styles.js +34 -0
  67. package/build/custom-select-control/styles.js.map +1 -0
  68. package/build/date-time/constants.js +9 -0
  69. package/build/date-time/constants.js.map +1 -0
  70. package/build/date-time/date/index.js +175 -186
  71. package/build/date-time/date/index.js.map +1 -1
  72. package/build/date-time/date/styles.js +59 -40
  73. package/build/date-time/date/styles.js.map +1 -1
  74. package/build/date-time/date-time/index.js +5 -2
  75. package/build/date-time/date-time/index.js.map +1 -1
  76. package/build/date-time/time/index.js +28 -19
  77. package/build/date-time/time/index.js.map +1 -1
  78. package/build/date-time/time/styles.js +17 -24
  79. package/build/date-time/time/styles.js.map +1 -1
  80. package/build/date-time/utils.js +27 -0
  81. package/build/date-time/utils.js.map +1 -0
  82. package/build/dimension-control/index.js +2 -6
  83. package/build/dimension-control/index.js.map +1 -1
  84. package/build/disabled/index.js +28 -11
  85. package/build/disabled/index.js.map +1 -1
  86. package/build/disabled/styles/disabled-styles.js +3 -3
  87. package/build/disabled/styles/disabled-styles.js.map +1 -1
  88. package/build/disabled/types.js +6 -0
  89. package/build/disabled/types.js.map +1 -0
  90. package/build/divider/component.js +0 -1
  91. package/build/divider/component.js.map +1 -1
  92. package/build/divider/index.js.map +1 -1
  93. package/build/divider/styles.js +5 -5
  94. package/build/divider/styles.js.map +1 -1
  95. package/build/dropdown/dropdown-content-wrapper.js +60 -0
  96. package/build/dropdown/dropdown-content-wrapper.js.map +1 -0
  97. package/build/dropdown/index.js +5 -6
  98. package/build/dropdown/index.js.map +1 -1
  99. package/build/dropdown/styles.js +42 -0
  100. package/build/dropdown/styles.js.map +1 -0
  101. package/build/dropdown/types.js +6 -0
  102. package/build/dropdown/types.js.map +1 -0
  103. package/build/duotone-picker/custom-duotone-bar.js +2 -2
  104. package/build/duotone-picker/custom-duotone-bar.js.map +1 -1
  105. package/build/duotone-picker/duotone-picker.js +9 -1
  106. package/build/duotone-picker/duotone-picker.js.map +1 -1
  107. package/build/duotone-picker/duotone-swatch.js +13 -3
  108. package/build/duotone-picker/duotone-swatch.js.map +1 -1
  109. package/build/elevation/component.js +15 -15
  110. package/build/elevation/component.js.map +1 -1
  111. package/build/elevation/hook.js +5 -17
  112. package/build/elevation/hook.js.map +1 -1
  113. package/build/elevation/index.js.map +1 -1
  114. package/build/elevation/styles.js +1 -1
  115. package/build/elevation/styles.js.map +1 -1
  116. package/build/external-link/index.js +6 -0
  117. package/build/external-link/index.js.map +1 -1
  118. package/build/flex/flex/component.js +20 -26
  119. package/build/flex/flex/component.js.map +1 -1
  120. package/build/flex/flex/hook.js +6 -16
  121. package/build/flex/flex/hook.js.map +1 -1
  122. package/build/flex/flex/index.js.map +1 -1
  123. package/build/flex/flex-block/component.js +18 -12
  124. package/build/flex/flex-block/component.js.map +1 -1
  125. package/build/flex/flex-block/hook.js +0 -4
  126. package/build/flex/flex-block/hook.js.map +1 -1
  127. package/build/flex/flex-block/index.js.map +1 -1
  128. package/build/flex/flex-item/component.js +18 -12
  129. package/build/flex/flex-item/component.js.map +1 -1
  130. package/build/flex/flex-item/hook.js +1 -5
  131. package/build/flex/flex-item/hook.js.map +1 -1
  132. package/build/flex/flex-item/index.js.map +1 -1
  133. package/build/flex/index.js.map +1 -1
  134. package/build/flex/styles.js +5 -5
  135. package/build/flex/styles.js.map +1 -1
  136. package/build/focal-point-picker/index.js +4 -6
  137. package/build/focal-point-picker/index.js.map +1 -1
  138. package/build/focal-point-picker/styles/focal-point-picker-style.js +22 -22
  139. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  140. package/build/focal-point-picker/styles/focal-point-style.js +5 -5
  141. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  142. package/build/font-size-picker/index.js +56 -18
  143. package/build/font-size-picker/index.js.map +1 -1
  144. package/build/font-size-picker/utils.js +32 -22
  145. package/build/font-size-picker/utils.js.map +1 -1
  146. package/build/form-token-field/index.js +17 -7
  147. package/build/form-token-field/index.js.map +1 -1
  148. package/build/form-token-field/suggestions-list.js +19 -6
  149. package/build/form-token-field/suggestions-list.js.map +1 -1
  150. package/build/gradient-picker/index.js +15 -3
  151. package/build/gradient-picker/index.js.map +1 -1
  152. package/build/guide/index.js +5 -3
  153. package/build/guide/index.js.map +1 -1
  154. package/build/guide/page-control.js +3 -7
  155. package/build/guide/page-control.js.map +1 -1
  156. package/build/index.js +31 -1
  157. package/build/index.js.map +1 -1
  158. package/build/input-control/index.js +7 -0
  159. package/build/input-control/index.js.map +1 -1
  160. package/build/input-control/input-base.js +24 -3
  161. package/build/input-control/input-base.js.map +1 -1
  162. package/build/input-control/input-prefix-wrapper.js +54 -0
  163. package/build/input-control/input-prefix-wrapper.js.map +1 -0
  164. package/build/input-control/input-suffix-wrapper.js +54 -0
  165. package/build/input-control/input-suffix-wrapper.js.map +1 -0
  166. package/build/input-control/reducer/actions.js +3 -1
  167. package/build/input-control/reducer/actions.js.map +1 -1
  168. package/build/input-control/reducer/reducer.js +28 -11
  169. package/build/input-control/reducer/reducer.js.map +1 -1
  170. package/build/input-control/reducer/state.js.map +1 -1
  171. package/build/input-control/styles/input-control-styles.js +61 -42
  172. package/build/input-control/styles/input-control-styles.js.map +1 -1
  173. package/build/item-group/styles.js +10 -10
  174. package/build/item-group/styles.js.map +1 -1
  175. package/build/mobile/bottom-sheet/index.native.js +3 -6
  176. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  177. package/build/mobile/global-styles-context/utils.native.js +26 -4
  178. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  179. package/build/mobile/image/index.native.js +9 -5
  180. package/build/mobile/image/index.native.js.map +1 -1
  181. package/build/mobile/link-picker/link-picker-screen.native.js +10 -4
  182. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  183. package/build/mobile/media-edit/index.native.js +1 -7
  184. package/build/mobile/media-edit/index.native.js.map +1 -1
  185. package/build/mobile/picker/index.android.js +3 -3
  186. package/build/mobile/picker/index.android.js.map +1 -1
  187. package/build/mobile/picker/index.ios.js +16 -3
  188. package/build/mobile/picker/index.ios.js.map +1 -1
  189. package/build/modal/index.js +1 -3
  190. package/build/modal/index.js.map +1 -1
  191. package/build/navigable-container/container.js +9 -8
  192. package/build/navigable-container/container.js.map +1 -1
  193. package/build/navigator/navigator-back-button/hook.js +0 -4
  194. package/build/navigator/navigator-back-button/hook.js.map +1 -1
  195. package/build/navigator/navigator-button/hook.js +0 -4
  196. package/build/navigator/navigator-button/hook.js.map +1 -1
  197. package/build/notice/list.js +10 -6
  198. package/build/notice/list.js.map +1 -1
  199. package/build/palette-edit/index.js +1 -0
  200. package/build/palette-edit/index.js.map +1 -1
  201. package/build/palette-edit/styles.js +10 -10
  202. package/build/palette-edit/styles.js.map +1 -1
  203. package/build/placeholder/index.js +11 -14
  204. package/build/placeholder/index.js.map +1 -1
  205. package/build/placeholder/types.js +6 -0
  206. package/build/placeholder/types.js.map +1 -0
  207. package/build/popover/index.js +202 -145
  208. package/build/popover/index.js.map +1 -1
  209. package/build/popover/utils.js +178 -0
  210. package/build/popover/utils.js.map +1 -0
  211. package/build/radio-control/index.js +1 -3
  212. package/build/radio-control/index.js.map +1 -1
  213. package/build/range-control/index.js +3 -0
  214. package/build/range-control/index.js.map +1 -1
  215. package/build/range-control/styles/range-control-styles.js +51 -45
  216. package/build/range-control/styles/range-control-styles.js.map +1 -1
  217. package/build/range-control/utils.js +1 -1
  218. package/build/range-control/utils.js.map +1 -1
  219. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
  220. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  221. package/build/sandbox/index.native.js +13 -2
  222. package/build/sandbox/index.native.js.map +1 -1
  223. package/build/scroll-lock/index.js +35 -6
  224. package/build/scroll-lock/index.js.map +1 -1
  225. package/build/select-control/chevron-down.js +30 -0
  226. package/build/select-control/chevron-down.js.map +1 -0
  227. package/build/select-control/index.js +8 -10
  228. package/build/select-control/index.js.map +1 -1
  229. package/build/select-control/styles/select-control-styles.js +54 -19
  230. package/build/select-control/styles/select-control-styles.js.map +1 -1
  231. package/build/shortcut/index.js +4 -13
  232. package/build/shortcut/index.js.map +1 -1
  233. package/build/shortcut/types.js +6 -0
  234. package/build/shortcut/types.js.map +1 -0
  235. package/build/snackbar/list.js +5 -3
  236. package/build/snackbar/list.js.map +1 -1
  237. package/build/spacer/component.js +3 -1
  238. package/build/spacer/component.js.map +1 -1
  239. package/build/spinner/index.js +2 -0
  240. package/build/spinner/index.js.map +1 -1
  241. package/build/style-provider/index.js +10 -7
  242. package/build/style-provider/index.js.map +1 -1
  243. package/build/style-provider/types.js +6 -0
  244. package/build/style-provider/types.js.map +1 -0
  245. package/build/text/hook.js +5 -8
  246. package/build/text/hook.js.map +1 -1
  247. package/build/text/styles.js +7 -7
  248. package/build/text/styles.js.map +1 -1
  249. package/build/toggle-group-control/toggle-group-control/component.js +19 -8
  250. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  251. package/build/toggle-group-control/toggle-group-control/styles.js +22 -4
  252. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  253. package/build/toggle-group-control/toggle-group-control-option/component.js +15 -5
  254. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  255. package/build/toggle-group-control/toggle-group-control-option-base/component.js +5 -1
  256. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  257. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +20 -9
  258. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  259. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +26 -7
  260. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  261. package/build/tools-panel/styles.js +13 -10
  262. package/build/tools-panel/styles.js.map +1 -1
  263. package/build/tools-panel/tools-panel/hook.js +1 -1
  264. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  265. package/build/tooltip/index.js +51 -14
  266. package/build/tooltip/index.js.map +1 -1
  267. package/build/tree-select/index.js +2 -2
  268. package/build/tree-select/index.js.map +1 -1
  269. package/build/ui/context/context-connect.js +1 -3
  270. package/build/ui/context/context-connect.js.map +1 -1
  271. package/build/ui/context/use-context-system.js +7 -2
  272. package/build/ui/context/use-context-system.js.map +1 -1
  273. package/build/ui/tooltip/styles.js +4 -4
  274. package/build/ui/tooltip/styles.js.map +1 -1
  275. package/build/ui/utils/space.js +7 -1
  276. package/build/ui/utils/space.js.map +1 -1
  277. package/build/unit-control/index.js +2 -3
  278. package/build/unit-control/index.js.map +1 -1
  279. package/build/unit-control/styles/unit-control-styles.js +38 -29
  280. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  281. package/build/utils/base-label.js +24 -0
  282. package/build/utils/base-label.js.map +1 -0
  283. package/build/utils/box-sizing.js +22 -0
  284. package/build/utils/box-sizing.js.map +1 -0
  285. package/build/utils/colors-values.js +52 -142
  286. package/build/utils/colors-values.js.map +1 -1
  287. package/build/utils/config-values.js +1 -1
  288. package/build/utils/config-values.js.map +1 -1
  289. package/build/utils/input/input-control.js +1 -1
  290. package/build/utils/input/input-control.js.map +1 -1
  291. package/build/utils/rtl.js +6 -5
  292. package/build/utils/rtl.js.map +1 -1
  293. package/build/utils/strings.js +50 -0
  294. package/build/utils/strings.js.map +1 -0
  295. package/build/utils/style-mixins.js +16 -0
  296. package/build/utils/style-mixins.js.map +1 -1
  297. package/build-module/alignment-matrix-control/index.js +1 -1
  298. package/build-module/alignment-matrix-control/index.js.map +1 -1
  299. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +9 -9
  300. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  301. package/build-module/angle-picker-control/index.js +5 -2
  302. package/build-module/angle-picker-control/index.js.map +1 -1
  303. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +13 -4
  304. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  305. package/build-module/autocomplete/index.js +9 -10
  306. package/build-module/autocomplete/index.js.map +1 -1
  307. package/build-module/base-control/index.js +7 -5
  308. package/build-module/base-control/index.js.map +1 -1
  309. package/build-module/base-control/styles/base-control-styles.js +9 -9
  310. package/build-module/base-control/styles/base-control-styles.js.map +1 -1
  311. package/build-module/base-field/styles.js +5 -5
  312. package/build-module/base-field/styles.js.map +1 -1
  313. package/build-module/border-control/border-control/component.js +37 -25
  314. package/build-module/border-control/border-control/component.js.map +1 -1
  315. package/build-module/border-control/border-control/hook.js +4 -7
  316. package/build-module/border-control/border-control/hook.js.map +1 -1
  317. package/build-module/border-control/border-control-dropdown/component.js +12 -7
  318. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  319. package/build-module/border-control/border-control-dropdown/hook.js +0 -4
  320. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  321. package/build-module/border-control/styles.js +30 -54
  322. package/build-module/border-control/styles.js.map +1 -1
  323. package/build-module/box-control/all-input-control.js +3 -28
  324. package/build-module/box-control/all-input-control.js.map +1 -1
  325. package/build-module/box-control/axial-input-controls.js +1 -1
  326. package/build-module/box-control/axial-input-controls.js.map +1 -1
  327. package/build-module/box-control/index.js +4 -4
  328. package/build-module/box-control/index.js.map +1 -1
  329. package/build-module/box-control/styles/box-control-styles.js +18 -10
  330. package/build-module/box-control/styles/box-control-styles.js.map +1 -1
  331. package/build-module/box-control/styles/box-control-visualizer-styles.js +8 -8
  332. package/build-module/box-control/styles/box-control-visualizer-styles.js.map +1 -1
  333. package/build-module/box-control/utils.js +35 -7
  334. package/build-module/box-control/utils.js.map +1 -1
  335. package/build-module/color-list-picker/index.js +13 -5
  336. package/build-module/color-list-picker/index.js.map +1 -1
  337. package/build-module/color-palette/index.js +32 -12
  338. package/build-module/color-palette/index.js.map +1 -1
  339. package/build-module/color-palette/index.native.js +4 -4
  340. package/build-module/color-palette/index.native.js.map +1 -1
  341. package/build-module/color-picker/hex-input.js +2 -1
  342. package/build-module/color-picker/hex-input.js.map +1 -1
  343. package/build-module/color-picker/input-with-slider.js +3 -2
  344. package/build-module/color-picker/input-with-slider.js.map +1 -1
  345. package/build-module/color-picker/styles.js +10 -16
  346. package/build-module/color-picker/styles.js.map +1 -1
  347. package/build-module/combobox-control/index.js +24 -15
  348. package/build-module/combobox-control/index.js.map +1 -1
  349. package/build-module/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/constants.js +0 -0
  350. package/build-module/custom-gradient-picker/gradient-bar/constants.js.map +1 -0
  351. package/build-module/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/control-points.js +34 -41
  352. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -0
  353. package/build-module/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/index.js +0 -1
  354. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -0
  355. package/build-module/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/utils.js +0 -0
  356. package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -0
  357. package/build-module/custom-gradient-picker/index.js +16 -3
  358. package/build-module/custom-gradient-picker/index.js.map +1 -1
  359. package/build-module/custom-select-control/index.js +41 -16
  360. package/build-module/custom-select-control/index.js.map +1 -1
  361. package/build-module/custom-select-control/styles.js +22 -0
  362. package/build-module/custom-select-control/styles.js.map +1 -0
  363. package/build-module/date-time/constants.js +2 -0
  364. package/build-module/date-time/constants.js.map +1 -0
  365. package/build-module/date-time/date/index.js +178 -184
  366. package/build-module/date-time/date/index.js.map +1 -1
  367. package/build-module/date-time/date/styles.js +47 -38
  368. package/build-module/date-time/date/styles.js.map +1 -1
  369. package/build-module/date-time/date-time/index.js +4 -2
  370. package/build-module/date-time/date-time/index.js.map +1 -1
  371. package/build-module/date-time/time/index.js +26 -19
  372. package/build-module/date-time/time/index.js.map +1 -1
  373. package/build-module/date-time/time/styles.js +15 -21
  374. package/build-module/date-time/time/styles.js.map +1 -1
  375. package/build-module/date-time/utils.js +19 -0
  376. package/build-module/date-time/utils.js.map +1 -0
  377. package/build-module/dimension-control/index.js +1 -5
  378. package/build-module/dimension-control/index.js.map +1 -1
  379. package/build-module/disabled/index.js +28 -11
  380. package/build-module/disabled/index.js.map +1 -1
  381. package/build-module/disabled/styles/disabled-styles.js +3 -3
  382. package/build-module/disabled/styles/disabled-styles.js.map +1 -1
  383. package/build-module/disabled/types.js +2 -0
  384. package/build-module/disabled/types.js.map +1 -0
  385. package/build-module/divider/component.js +0 -1
  386. package/build-module/divider/component.js.map +1 -1
  387. package/build-module/divider/index.js.map +1 -1
  388. package/build-module/divider/styles.js +5 -5
  389. package/build-module/divider/styles.js.map +1 -1
  390. package/build-module/dropdown/dropdown-content-wrapper.js +47 -0
  391. package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -0
  392. package/build-module/dropdown/index.js +5 -6
  393. package/build-module/dropdown/index.js.map +1 -1
  394. package/build-module/dropdown/styles.js +31 -0
  395. package/build-module/dropdown/styles.js.map +1 -0
  396. package/build-module/dropdown/types.js +2 -0
  397. package/build-module/dropdown/types.js.map +1 -0
  398. package/build-module/duotone-picker/custom-duotone-bar.js +1 -1
  399. package/build-module/duotone-picker/custom-duotone-bar.js.map +1 -1
  400. package/build-module/duotone-picker/duotone-picker.js +7 -1
  401. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  402. package/build-module/duotone-picker/duotone-swatch.js +11 -3
  403. package/build-module/duotone-picker/duotone-swatch.js.map +1 -1
  404. package/build-module/elevation/component.js +15 -15
  405. package/build-module/elevation/component.js.map +1 -1
  406. package/build-module/elevation/hook.js +5 -17
  407. package/build-module/elevation/hook.js.map +1 -1
  408. package/build-module/elevation/index.js.map +1 -1
  409. package/build-module/elevation/styles.js +1 -1
  410. package/build-module/elevation/styles.js.map +1 -1
  411. package/build-module/external-link/index.js +6 -0
  412. package/build-module/external-link/index.js.map +1 -1
  413. package/build-module/flex/flex/component.js +20 -26
  414. package/build-module/flex/flex/component.js.map +1 -1
  415. package/build-module/flex/flex/hook.js +6 -15
  416. package/build-module/flex/flex/hook.js.map +1 -1
  417. package/build-module/flex/flex/index.js.map +1 -1
  418. package/build-module/flex/flex-block/component.js +18 -12
  419. package/build-module/flex/flex-block/component.js.map +1 -1
  420. package/build-module/flex/flex-block/hook.js +0 -4
  421. package/build-module/flex/flex-block/hook.js.map +1 -1
  422. package/build-module/flex/flex-block/index.js.map +1 -1
  423. package/build-module/flex/flex-item/component.js +18 -12
  424. package/build-module/flex/flex-item/component.js.map +1 -1
  425. package/build-module/flex/flex-item/hook.js +1 -5
  426. package/build-module/flex/flex-item/hook.js.map +1 -1
  427. package/build-module/flex/flex-item/index.js.map +1 -1
  428. package/build-module/flex/index.js.map +1 -1
  429. package/build-module/flex/styles.js +5 -5
  430. package/build-module/flex/styles.js.map +1 -1
  431. package/build-module/focal-point-picker/index.js +4 -5
  432. package/build-module/focal-point-picker/index.js.map +1 -1
  433. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +22 -22
  434. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  435. package/build-module/focal-point-picker/styles/focal-point-style.js +5 -5
  436. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  437. package/build-module/font-size-picker/index.js +51 -18
  438. package/build-module/font-size-picker/index.js.map +1 -1
  439. package/build-module/font-size-picker/utils.js +31 -23
  440. package/build-module/font-size-picker/utils.js.map +1 -1
  441. package/build-module/form-token-field/index.js +17 -8
  442. package/build-module/form-token-field/index.js.map +1 -1
  443. package/build-module/form-token-field/suggestions-list.js +19 -6
  444. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  445. package/build-module/gradient-picker/index.js +14 -3
  446. package/build-module/gradient-picker/index.js.map +1 -1
  447. package/build-module/guide/index.js +5 -3
  448. package/build-module/guide/index.js.map +1 -1
  449. package/build-module/guide/page-control.js +3 -6
  450. package/build-module/guide/page-control.js.map +1 -1
  451. package/build-module/index.js +4 -1
  452. package/build-module/index.js.map +1 -1
  453. package/build-module/input-control/index.js +6 -0
  454. package/build-module/input-control/index.js.map +1 -1
  455. package/build-module/input-control/input-base.js +25 -5
  456. package/build-module/input-control/input-base.js.map +1 -1
  457. package/build-module/input-control/input-prefix-wrapper.js +41 -0
  458. package/build-module/input-control/input-prefix-wrapper.js.map +1 -0
  459. package/build-module/input-control/input-suffix-wrapper.js +41 -0
  460. package/build-module/input-control/input-suffix-wrapper.js.map +1 -0
  461. package/build-module/input-control/reducer/actions.js +1 -0
  462. package/build-module/input-control/reducer/actions.js.map +1 -1
  463. package/build-module/input-control/reducer/reducer.js +28 -11
  464. package/build-module/input-control/reducer/reducer.js.map +1 -1
  465. package/build-module/input-control/reducer/state.js.map +1 -1
  466. package/build-module/input-control/styles/input-control-styles.js +58 -42
  467. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  468. package/build-module/item-group/styles.js +10 -10
  469. package/build-module/item-group/styles.js.map +1 -1
  470. package/build-module/mobile/bottom-sheet/index.native.js +3 -5
  471. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  472. package/build-module/mobile/global-styles-context/utils.native.js +24 -4
  473. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  474. package/build-module/mobile/image/index.native.js +12 -8
  475. package/build-module/mobile/image/index.native.js.map +1 -1
  476. package/build-module/mobile/link-picker/link-picker-screen.native.js +11 -4
  477. package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  478. package/build-module/mobile/media-edit/index.native.js +1 -6
  479. package/build-module/mobile/media-edit/index.native.js.map +1 -1
  480. package/build-module/mobile/picker/index.android.js +3 -3
  481. package/build-module/mobile/picker/index.android.js.map +1 -1
  482. package/build-module/mobile/picker/index.ios.js +14 -3
  483. package/build-module/mobile/picker/index.ios.js.map +1 -1
  484. package/build-module/modal/index.js +1 -2
  485. package/build-module/modal/index.js.map +1 -1
  486. package/build-module/navigable-container/container.js +9 -7
  487. package/build-module/navigable-container/container.js.map +1 -1
  488. package/build-module/navigator/navigator-back-button/hook.js +0 -4
  489. package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
  490. package/build-module/navigator/navigator-button/hook.js +0 -4
  491. package/build-module/navigator/navigator-button/hook.js.map +1 -1
  492. package/build-module/notice/list.js +10 -5
  493. package/build-module/notice/list.js.map +1 -1
  494. package/build-module/palette-edit/index.js +1 -0
  495. package/build-module/palette-edit/index.js.map +1 -1
  496. package/build-module/palette-edit/styles.js +10 -10
  497. package/build-module/palette-edit/styles.js.map +1 -1
  498. package/build-module/placeholder/index.js +10 -15
  499. package/build-module/placeholder/index.js.map +1 -1
  500. package/build-module/placeholder/types.js +2 -0
  501. package/build-module/placeholder/types.js.map +1 -0
  502. package/build-module/popover/index.js +202 -147
  503. package/build-module/popover/index.js.map +1 -1
  504. package/build-module/popover/utils.js +164 -0
  505. package/build-module/popover/utils.js.map +1 -0
  506. package/build-module/radio-control/index.js +1 -2
  507. package/build-module/radio-control/index.js.map +1 -1
  508. package/build-module/range-control/index.js +3 -0
  509. package/build-module/range-control/index.js.map +1 -1
  510. package/build-module/range-control/styles/range-control-styles.js +51 -45
  511. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  512. package/build-module/range-control/utils.js +1 -1
  513. package/build-module/range-control/utils.js.map +1 -1
  514. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
  515. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  516. package/build-module/sandbox/index.native.js +13 -3
  517. package/build-module/sandbox/index.native.js.map +1 -1
  518. package/build-module/scroll-lock/index.js +32 -6
  519. package/build-module/scroll-lock/index.js.map +1 -1
  520. package/build-module/select-control/chevron-down.js +21 -0
  521. package/build-module/select-control/chevron-down.js.map +1 -0
  522. package/build-module/select-control/index.js +8 -9
  523. package/build-module/select-control/index.js.map +1 -1
  524. package/build-module/select-control/styles/select-control-styles.js +48 -17
  525. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  526. package/build-module/shortcut/index.js +4 -13
  527. package/build-module/shortcut/index.js.map +1 -1
  528. package/build-module/shortcut/types.js +2 -0
  529. package/build-module/shortcut/types.js.map +1 -0
  530. package/build-module/snackbar/list.js +5 -2
  531. package/build-module/snackbar/list.js.map +1 -1
  532. package/build-module/spacer/component.js +3 -1
  533. package/build-module/spacer/component.js.map +1 -1
  534. package/build-module/spinner/index.js +2 -0
  535. package/build-module/spinner/index.js.map +1 -1
  536. package/build-module/style-provider/index.js +10 -5
  537. package/build-module/style-provider/index.js.map +1 -1
  538. package/build-module/style-provider/types.js +2 -0
  539. package/build-module/style-provider/types.js.map +1 -0
  540. package/build-module/text/hook.js +5 -7
  541. package/build-module/text/hook.js.map +1 -1
  542. package/build-module/text/styles.js +7 -7
  543. package/build-module/text/styles.js.map +1 -1
  544. package/build-module/toggle-group-control/toggle-group-control/component.js +17 -7
  545. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  546. package/build-module/toggle-group-control/toggle-group-control/styles.js +16 -3
  547. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  548. package/build-module/toggle-group-control/toggle-group-control-option/component.js +17 -3
  549. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  550. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +5 -1
  551. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  552. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +16 -7
  553. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  554. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +27 -5
  555. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  556. package/build-module/tools-panel/styles.js +12 -11
  557. package/build-module/tools-panel/styles.js.map +1 -1
  558. package/build-module/tools-panel/tools-panel/hook.js +1 -1
  559. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  560. package/build-module/tooltip/index.js +53 -16
  561. package/build-module/tooltip/index.js.map +1 -1
  562. package/build-module/tree-select/index.js +3 -3
  563. package/build-module/tree-select/index.js.map +1 -1
  564. package/build-module/ui/context/context-connect.js +1 -2
  565. package/build-module/ui/context/context-connect.js.map +1 -1
  566. package/build-module/ui/context/use-context-system.js +7 -2
  567. package/build-module/ui/context/use-context-system.js.map +1 -1
  568. package/build-module/ui/tooltip/styles.js +4 -4
  569. package/build-module/ui/tooltip/styles.js.map +1 -1
  570. package/build-module/ui/utils/space.js +7 -1
  571. package/build-module/ui/utils/space.js.map +1 -1
  572. package/build-module/unit-control/index.js +2 -2
  573. package/build-module/unit-control/index.js.map +1 -1
  574. package/build-module/unit-control/styles/unit-control-styles.js +39 -30
  575. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  576. package/build-module/utils/base-label.js +18 -0
  577. package/build-module/utils/base-label.js.map +1 -0
  578. package/build-module/utils/box-sizing.js +16 -0
  579. package/build-module/utils/box-sizing.js.map +1 -0
  580. package/build-module/utils/colors-values.js +52 -141
  581. package/build-module/utils/colors-values.js.map +1 -1
  582. package/build-module/utils/config-values.js +1 -1
  583. package/build-module/utils/config-values.js.map +1 -1
  584. package/build-module/utils/input/input-control.js +1 -1
  585. package/build-module/utils/input/input-control.js.map +1 -1
  586. package/build-module/utils/rtl.js +6 -4
  587. package/build-module/utils/rtl.js.map +1 -1
  588. package/build-module/utils/strings.js +37 -0
  589. package/build-module/utils/strings.js.map +1 -0
  590. package/build-module/utils/style-mixins.js +2 -0
  591. package/build-module/utils/style-mixins.js.map +1 -1
  592. package/build-style/style-rtl.css +236 -1281
  593. package/build-style/style.css +237 -1281
  594. package/build-types/base-control/index.d.ts +4 -3
  595. package/build-types/base-control/index.d.ts.map +1 -1
  596. package/build-types/base-control/stories/index.d.ts +1 -1
  597. package/build-types/base-control/stories/index.d.ts.map +1 -1
  598. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  599. package/build-types/base-control/types.d.ts +0 -1
  600. package/build-types/base-control/types.d.ts.map +1 -1
  601. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  602. package/build-types/border-control/border-control/hook.d.ts +1 -1
  603. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  604. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  605. package/build-types/border-control/border-control-dropdown/hook.d.ts +0 -1
  606. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  607. package/build-types/border-control/stories/index.d.ts.map +1 -1
  608. package/build-types/border-control/styles.d.ts +1 -4
  609. package/build-types/border-control/styles.d.ts.map +1 -1
  610. package/build-types/card/card-divider/hook.d.ts +1 -1
  611. package/build-types/color-palette/index.d.ts +3 -1
  612. package/build-types/color-palette/index.d.ts.map +1 -1
  613. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  614. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  615. package/build-types/color-picker/styles.d.ts +2 -2
  616. package/build-types/color-picker/styles.d.ts.map +1 -1
  617. package/build-types/date-time/constants.d.ts +2 -0
  618. package/build-types/date-time/constants.d.ts.map +1 -0
  619. package/build-types/date-time/date/index.d.ts +3 -1
  620. package/build-types/date-time/date/index.d.ts.map +1 -1
  621. package/build-types/date-time/date/styles.d.ts +22 -8
  622. package/build-types/date-time/date/styles.d.ts.map +1 -1
  623. package/build-types/date-time/date/test/index.d.ts +1 -1
  624. package/build-types/date-time/date/test/index.d.ts.map +1 -1
  625. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  626. package/build-types/date-time/time/index.d.ts.map +1 -1
  627. package/build-types/date-time/time/styles.d.ts +0 -4
  628. package/build-types/date-time/time/styles.d.ts.map +1 -1
  629. package/build-types/date-time/utils.d.ts +8 -0
  630. package/build-types/date-time/utils.d.ts.map +1 -0
  631. package/build-types/disabled/index.d.ts +35 -28
  632. package/build-types/disabled/index.d.ts.map +1 -1
  633. package/build-types/disabled/stories/index.d.ts +13 -0
  634. package/build-types/disabled/stories/index.d.ts.map +1 -0
  635. package/build-types/disabled/styles/disabled-styles.d.ts +2 -1
  636. package/build-types/disabled/styles/disabled-styles.d.ts.map +1 -1
  637. package/build-types/disabled/test/index.d.ts +2 -0
  638. package/build-types/disabled/test/index.d.ts.map +1 -0
  639. package/build-types/disabled/types.d.ts +14 -0
  640. package/build-types/disabled/types.d.ts.map +1 -0
  641. package/build-types/divider/component.d.ts +2 -3
  642. package/build-types/divider/component.d.ts.map +1 -1
  643. package/build-types/divider/index.d.ts +1 -1
  644. package/build-types/divider/index.d.ts.map +1 -1
  645. package/build-types/divider/styles.d.ts +6 -2
  646. package/build-types/divider/styles.d.ts.map +1 -1
  647. package/build-types/divider/test/index.d.ts +2 -0
  648. package/build-types/divider/test/index.d.ts.map +1 -0
  649. package/build-types/divider/types.d.ts +18 -10
  650. package/build-types/divider/types.d.ts.map +1 -1
  651. package/build-types/dropdown/dropdown-content-wrapper.d.ts +23 -0
  652. package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -0
  653. package/build-types/dropdown/index.d.ts.map +1 -1
  654. package/build-types/dropdown/styles.d.ts +7 -0
  655. package/build-types/dropdown/styles.d.ts.map +1 -0
  656. package/build-types/dropdown/types.d.ts +9 -0
  657. package/build-types/dropdown/types.d.ts.map +1 -0
  658. package/build-types/elevation/component.d.ts +11 -10
  659. package/build-types/elevation/component.d.ts.map +1 -1
  660. package/build-types/elevation/hook.d.ts +6 -7
  661. package/build-types/elevation/hook.d.ts.map +1 -1
  662. package/build-types/elevation/index.d.ts +2 -2
  663. package/build-types/elevation/index.d.ts.map +1 -1
  664. package/build-types/elevation/stories/index.d.ts +22 -0
  665. package/build-types/elevation/stories/index.d.ts.map +1 -0
  666. package/build-types/elevation/styles.d.ts +1 -1
  667. package/build-types/elevation/styles.d.ts.map +1 -1
  668. package/build-types/elevation/test/index.d.ts +2 -0
  669. package/build-types/elevation/test/index.d.ts.map +1 -0
  670. package/build-types/elevation/types.d.ts +12 -19
  671. package/build-types/elevation/types.d.ts.map +1 -1
  672. package/build-types/external-link/index.d.ts.map +1 -1
  673. package/build-types/flex/flex/component.d.ts +16 -21
  674. package/build-types/flex/flex/component.d.ts.map +1 -1
  675. package/build-types/flex/flex/hook.d.ts +5 -2
  676. package/build-types/flex/flex/hook.d.ts.map +1 -1
  677. package/build-types/flex/flex/index.d.ts +2 -2
  678. package/build-types/flex/flex/index.d.ts.map +1 -1
  679. package/build-types/flex/flex-block/component.d.ts +14 -7
  680. package/build-types/flex/flex-block/component.d.ts.map +1 -1
  681. package/build-types/flex/flex-block/hook.d.ts +6 -3
  682. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  683. package/build-types/flex/flex-block/index.d.ts +2 -2
  684. package/build-types/flex/flex-block/index.d.ts.map +1 -1
  685. package/build-types/flex/flex-item/component.d.ts +14 -7
  686. package/build-types/flex/flex-item/component.d.ts.map +1 -1
  687. package/build-types/flex/flex-item/hook.d.ts +6 -3
  688. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  689. package/build-types/flex/flex-item/index.d.ts +2 -2
  690. package/build-types/flex/flex-item/index.d.ts.map +1 -1
  691. package/build-types/flex/index.d.ts +3 -3
  692. package/build-types/flex/index.d.ts.map +1 -1
  693. package/build-types/flex/stories/index.d.ts +13 -0
  694. package/build-types/flex/stories/index.d.ts.map +1 -0
  695. package/build-types/flex/styles.d.ts +5 -5
  696. package/build-types/flex/styles.d.ts.map +1 -1
  697. package/build-types/flex/test/index.d.ts +2 -0
  698. package/build-types/flex/test/index.d.ts.map +1 -0
  699. package/build-types/flex/types.d.ts +17 -10
  700. package/build-types/flex/types.d.ts.map +1 -1
  701. package/build-types/form-token-field/index.d.ts.map +1 -1
  702. package/build-types/form-token-field/stories/index.d.ts +7 -0
  703. package/build-types/form-token-field/stories/index.d.ts.map +1 -1
  704. package/build-types/form-token-field/suggestions-list.d.ts +1 -1
  705. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  706. package/build-types/form-token-field/types.d.ts +22 -3
  707. package/build-types/form-token-field/types.d.ts.map +1 -1
  708. package/build-types/input-control/index.d.ts +1 -1
  709. package/build-types/input-control/index.d.ts.map +1 -1
  710. package/build-types/input-control/input-base.d.ts +1 -1
  711. package/build-types/input-control/input-base.d.ts.map +1 -1
  712. package/build-types/input-control/input-prefix-wrapper.d.ts +19 -0
  713. package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -0
  714. package/build-types/input-control/input-suffix-wrapper.d.ts +19 -0
  715. package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -0
  716. package/build-types/input-control/reducer/actions.d.ts +3 -1
  717. package/build-types/input-control/reducer/actions.d.ts.map +1 -1
  718. package/build-types/input-control/reducer/reducer.d.ts +2 -2
  719. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  720. package/build-types/input-control/reducer/state.d.ts +2 -2
  721. package/build-types/input-control/reducer/state.d.ts.map +1 -1
  722. package/build-types/input-control/stories/index.d.ts +10 -0
  723. package/build-types/input-control/stories/index.d.ts.map +1 -1
  724. package/build-types/input-control/styles/input-control-styles.d.ts +21 -0
  725. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  726. package/build-types/input-control/types.d.ts +45 -3
  727. package/build-types/input-control/types.d.ts.map +1 -1
  728. package/build-types/navigator/navigator-back-button/hook.d.ts +0 -3
  729. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  730. package/build-types/navigator/navigator-button/hook.d.ts +0 -3
  731. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  732. package/build-types/placeholder/index.d.ts +16 -0
  733. package/build-types/placeholder/index.d.ts.map +1 -0
  734. package/build-types/placeholder/stories/index.d.ts +12 -0
  735. package/build-types/placeholder/stories/index.d.ts.map +1 -0
  736. package/build-types/placeholder/test/index.d.ts +2 -0
  737. package/build-types/placeholder/test/index.d.ts.map +1 -0
  738. package/build-types/placeholder/types.d.ts +47 -0
  739. package/build-types/placeholder/types.d.ts.map +1 -0
  740. package/build-types/popover/index.d.ts +2 -2
  741. package/build-types/popover/index.d.ts.map +1 -1
  742. package/build-types/popover/utils.d.ts +27 -0
  743. package/build-types/popover/utils.d.ts.map +1 -0
  744. package/build-types/radio-control/index.d.ts.map +1 -1
  745. package/build-types/range-control/index.d.ts +2 -2
  746. package/build-types/range-control/index.d.ts.map +1 -1
  747. package/build-types/range-control/styles/range-control-styles.d.ts +5 -2
  748. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  749. package/build-types/range-control/types.d.ts +6 -4
  750. package/build-types/range-control/types.d.ts.map +1 -1
  751. package/build-types/range-control/utils.d.ts.map +1 -1
  752. package/build-types/scroll-lock/index.d.ts +32 -3
  753. package/build-types/scroll-lock/index.d.ts.map +1 -1
  754. package/build-types/scroll-lock/stories/index.d.ts +9 -0
  755. package/build-types/scroll-lock/stories/index.d.ts.map +1 -0
  756. package/build-types/scroll-lock/test/index.d.ts +2 -0
  757. package/build-types/scroll-lock/test/index.d.ts.map +1 -0
  758. package/build-types/select-control/chevron-down.d.ts +4 -0
  759. package/build-types/select-control/chevron-down.d.ts.map +1 -0
  760. package/build-types/select-control/index.d.ts.map +1 -1
  761. package/build-types/select-control/styles/select-control-styles.d.ts +9 -1
  762. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  763. package/build-types/select-control/types.d.ts +1 -1
  764. package/build-types/select-control/types.d.ts.map +1 -1
  765. package/build-types/shortcut/index.d.ts +5 -24
  766. package/build-types/shortcut/index.d.ts.map +1 -1
  767. package/build-types/shortcut/test/index.d.ts +2 -0
  768. package/build-types/shortcut/test/index.d.ts.map +1 -0
  769. package/build-types/shortcut/types.d.ts +14 -0
  770. package/build-types/shortcut/types.d.ts.map +1 -0
  771. package/build-types/spacer/component.d.ts +3 -1
  772. package/build-types/spacer/component.d.ts.map +1 -1
  773. package/build-types/spinner/index.d.ts.map +1 -1
  774. package/build-types/style-provider/index.d.ts +7 -4
  775. package/build-types/style-provider/index.d.ts.map +1 -1
  776. package/build-types/style-provider/types.d.ts +15 -0
  777. package/build-types/style-provider/types.d.ts.map +1 -0
  778. package/build-types/text/hook.d.ts.map +1 -1
  779. package/build-types/toggle-group-control/stories/index.d.ts +25 -0
  780. package/build-types/toggle-group-control/stories/index.d.ts.map +1 -0
  781. package/build-types/toggle-group-control/test/index.d.ts +2 -0
  782. package/build-types/toggle-group-control/test/index.d.ts.map +1 -0
  783. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +6 -3
  784. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  785. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +6 -1
  786. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  787. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +6 -7
  788. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  789. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  790. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +4 -1
  791. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  792. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +11 -9
  793. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  794. package/build-types/toggle-group-control/types.d.ts +27 -8
  795. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  796. package/build-types/tools-panel/styles.d.ts +1 -1
  797. package/build-types/tools-panel/styles.d.ts.map +1 -1
  798. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  799. package/build-types/tooltip/index.d.ts.map +1 -1
  800. package/build-types/tree-select/index.d.ts.map +1 -1
  801. package/build-types/tree-select/types.d.ts +1 -0
  802. package/build-types/tree-select/types.d.ts.map +1 -1
  803. package/build-types/ui/context/context-connect.d.ts +3 -0
  804. package/build-types/ui/context/context-connect.d.ts.map +1 -1
  805. package/build-types/ui/context/use-context-system.d.ts.map +1 -1
  806. package/build-types/ui/form-group/use-form-group.d.ts +2 -2
  807. package/build-types/ui/tooltip/styles.d.ts.map +1 -1
  808. package/build-types/ui/utils/space.d.ts +7 -1
  809. package/build-types/ui/utils/space.d.ts.map +1 -1
  810. package/build-types/unit-control/index.d.ts +4 -3
  811. package/build-types/unit-control/index.d.ts.map +1 -1
  812. package/build-types/unit-control/stories/index.d.ts.map +1 -1
  813. package/build-types/unit-control/styles/unit-control-styles.d.ts +0 -1
  814. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  815. package/build-types/unit-control/types.d.ts +7 -9
  816. package/build-types/unit-control/types.d.ts.map +1 -1
  817. package/build-types/utils/base-label.d.ts +2 -0
  818. package/build-types/utils/base-label.d.ts.map +1 -0
  819. package/build-types/utils/box-sizing.d.ts +2 -0
  820. package/build-types/utils/box-sizing.d.ts.map +1 -0
  821. package/build-types/utils/colors-values.d.ts +18 -97
  822. package/build-types/utils/colors-values.d.ts.map +1 -1
  823. package/build-types/utils/rtl.d.ts.map +1 -1
  824. package/build-types/utils/strings.d.ts +2 -0
  825. package/build-types/utils/strings.d.ts.map +1 -0
  826. package/build-types/utils/style-mixins.d.ts +2 -0
  827. package/package.json +22 -21
  828. package/src/alignment-matrix-control/index.js +1 -1
  829. package/src/alignment-matrix-control/stories/index.js +49 -24
  830. package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.js +1 -3
  831. package/src/angle-picker-control/index.js +7 -2
  832. package/src/angle-picker-control/stories/index.js +8 -5
  833. package/src/angle-picker-control/styles/angle-picker-control-styles.js +12 -3
  834. package/src/autocomplete/index.js +9 -18
  835. package/src/base-control/index.tsx +5 -3
  836. package/src/base-control/stories/index.tsx +1 -0
  837. package/src/base-control/styles/base-control-styles.ts +11 -2
  838. package/src/base-control/types.ts +0 -1
  839. package/src/base-field/styles.js +1 -1
  840. package/src/base-field/test/__snapshots__/index.js.snap +2 -2
  841. package/src/border-control/border-control/component.tsx +41 -32
  842. package/src/border-control/border-control/hook.ts +4 -9
  843. package/src/border-control/border-control-dropdown/component.tsx +50 -45
  844. package/src/border-control/border-control-dropdown/hook.ts +0 -5
  845. package/src/border-control/stories/index.tsx +3 -0
  846. package/src/border-control/styles.ts +25 -70
  847. package/src/border-control/test/index.js +19 -8
  848. package/src/box-control/all-input-control.js +3 -27
  849. package/src/box-control/axial-input-controls.js +1 -1
  850. package/src/box-control/index.js +5 -6
  851. package/src/box-control/styles/box-control-styles.js +1 -2
  852. package/src/box-control/styles/box-control-visualizer-styles.js +0 -1
  853. package/src/box-control/test/index.js +8 -8
  854. package/src/box-control/utils.js +38 -13
  855. package/src/button/test/index.js +188 -146
  856. package/src/card/test/__snapshots__/index.js.snap +8 -8
  857. package/src/color-list-picker/index.js +15 -3
  858. package/src/color-list-picker/style.scss +11 -0
  859. package/src/color-palette/index.js +51 -24
  860. package/src/color-palette/index.native.js +10 -6
  861. package/src/color-palette/stories/index.js +1 -1
  862. package/src/color-palette/style.scss +5 -0
  863. package/src/color-palette/test/__snapshots__/index.js.snap +17 -3
  864. package/src/color-palette/test/utils.ts +19 -1
  865. package/src/color-picker/hex-input.tsx +2 -1
  866. package/src/color-picker/input-with-slider.tsx +2 -1
  867. package/src/color-picker/styles.ts +3 -11
  868. package/src/combobox-control/README.md +7 -0
  869. package/src/combobox-control/index.js +25 -15
  870. package/src/combobox-control/stories/index.js +57 -7
  871. package/src/combobox-control/style.scss +0 -1
  872. package/src/confirm-dialog/README.md +1 -1
  873. package/src/confirm-dialog/test/index.js +85 -62
  874. package/src/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/constants.js +0 -0
  875. package/src/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/control-points.js +54 -50
  876. package/src/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/index.js +0 -3
  877. package/src/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/test/utils.js +0 -0
  878. package/src/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/utils.js +0 -0
  879. package/src/custom-gradient-picker/index.js +18 -3
  880. package/src/custom-gradient-picker/stories/index.js +4 -3
  881. package/src/custom-gradient-picker/style.scss +30 -39
  882. package/src/custom-select-control/README.md +10 -0
  883. package/src/custom-select-control/index.js +54 -29
  884. package/src/custom-select-control/stories/index.js +7 -2
  885. package/src/custom-select-control/style.scss +2 -43
  886. package/src/custom-select-control/styles.ts +28 -0
  887. package/src/custom-select-control/test/index.js +4 -1
  888. package/src/date-time/constants.ts +1 -0
  889. package/src/date-time/date/index.tsx +289 -184
  890. package/src/date-time/date/styles.ts +86 -27
  891. package/src/date-time/date/test/index.tsx +18 -28
  892. package/src/date-time/date-time/index.tsx +3 -2
  893. package/src/date-time/time/index.tsx +30 -24
  894. package/src/date-time/time/styles.ts +3 -6
  895. package/src/date-time/utils.ts +17 -0
  896. package/src/dimension-control/index.js +1 -5
  897. package/src/disabled/index.tsx +80 -0
  898. package/src/disabled/stories/index.tsx +87 -0
  899. package/src/disabled/styles/{disabled-styles.js → disabled-styles.tsx} +0 -0
  900. package/src/disabled/test/index.tsx +174 -0
  901. package/src/disabled/types.ts +13 -0
  902. package/src/divider/README.md +12 -5
  903. package/src/divider/component.tsx +2 -3
  904. package/src/divider/index.ts +1 -1
  905. package/src/divider/stories/index.tsx +4 -4
  906. package/src/divider/styles.ts +7 -7
  907. package/src/divider/test/__snapshots__/{index.js.snap → index.tsx.snap} +7 -7
  908. package/src/divider/test/index.tsx +40 -0
  909. package/src/divider/types.ts +21 -15
  910. package/src/draggable/README.md +1 -1
  911. package/src/dropdown/dropdown-content-wrapper.tsx +59 -0
  912. package/src/dropdown/index.js +3 -5
  913. package/src/dropdown/stories/index.js +60 -69
  914. package/src/dropdown/styles.ts +38 -0
  915. package/src/dropdown/types.ts +8 -0
  916. package/src/dropdown-menu/stories/index.js +13 -2
  917. package/src/duotone-picker/custom-duotone-bar.js +1 -1
  918. package/src/duotone-picker/duotone-picker.js +34 -26
  919. package/src/duotone-picker/duotone-swatch.js +12 -5
  920. package/src/duotone-picker/stories/duotone-picker.js +66 -0
  921. package/src/duotone-picker/stories/duotone-swatch.js +32 -0
  922. package/src/elevation/README.md +16 -14
  923. package/src/elevation/component.tsx +48 -0
  924. package/src/elevation/{hook.js → hook.ts} +20 -17
  925. package/src/elevation/{index.js → index.ts} +0 -0
  926. package/src/elevation/stories/index.tsx +85 -0
  927. package/src/elevation/{styles.js → styles.ts} +0 -0
  928. package/src/elevation/test/__snapshots__/{index.js.snap → index.tsx.snap} +19 -13
  929. package/src/elevation/test/index.tsx +64 -0
  930. package/src/elevation/types.ts +12 -19
  931. package/src/external-link/index.tsx +10 -0
  932. package/src/flex/flex/README.md +20 -18
  933. package/src/flex/flex/component.tsx +59 -0
  934. package/src/flex/flex/{hook.js → hook.ts} +14 -13
  935. package/src/flex/flex/{index.js → index.ts} +0 -0
  936. package/src/flex/flex-block/README.md +3 -7
  937. package/src/flex/flex-block/component.tsx +41 -0
  938. package/src/flex/flex-block/{hook.js → hook.ts} +5 -5
  939. package/src/flex/flex-block/{index.js → index.ts} +0 -0
  940. package/src/flex/flex-item/README.md +6 -9
  941. package/src/flex/flex-item/component.tsx +41 -0
  942. package/src/flex/flex-item/{hook.js → hook.ts} +10 -7
  943. package/src/flex/flex-item/{index.js → index.ts} +0 -0
  944. package/src/flex/{index.js → index.ts} +0 -0
  945. package/src/flex/stories/index.tsx +81 -0
  946. package/src/flex/{styles.js → styles.ts} +0 -0
  947. package/src/flex/test/__snapshots__/{index.js.snap → index.tsx.snap} +49 -9
  948. package/src/flex/test/index.tsx +84 -0
  949. package/src/flex/types.ts +17 -10
  950. package/src/focal-point-picker/index.js +10 -5
  951. package/src/focal-point-picker/styles/focal-point-picker-style.js +0 -5
  952. package/src/focal-point-picker/styles/focal-point-style.js +0 -2
  953. package/src/focal-point-picker/test/index.js +78 -45
  954. package/src/font-size-picker/index.js +160 -132
  955. package/src/font-size-picker/stories/index.js +7 -0
  956. package/src/font-size-picker/style.scss +8 -5
  957. package/src/font-size-picker/test/index.js +13 -6
  958. package/src/font-size-picker/test/{util.js → utils.js} +77 -1
  959. package/src/font-size-picker/utils.js +38 -23
  960. package/src/form-token-field/README.md +3 -1
  961. package/src/form-token-field/index.tsx +29 -12
  962. package/src/form-token-field/stories/index.tsx +22 -0
  963. package/src/form-token-field/style.scss +0 -5
  964. package/src/form-token-field/suggestions-list.tsx +21 -12
  965. package/src/form-token-field/test/index.js +32 -1
  966. package/src/form-token-field/types.ts +23 -2
  967. package/src/gradient-picker/index.js +22 -7
  968. package/src/gradient-picker/stories/index.js +56 -81
  969. package/src/guide/index.js +3 -1
  970. package/src/guide/page-control.js +1 -6
  971. package/src/guide/stories/index.js +12 -11
  972. package/src/guide/test/index.js +54 -37
  973. package/src/guide/test/page-control.js +14 -17
  974. package/src/higher-order/with-notices/test/index.js +4 -2
  975. package/src/higher-order/with-spoken-messages/test/index.js +1 -1
  976. package/src/index.js +7 -1
  977. package/src/input-control/index.tsx +6 -0
  978. package/src/input-control/input-base.tsx +28 -13
  979. package/src/input-control/input-prefix-wrapper.tsx +48 -0
  980. package/src/input-control/input-suffix-wrapper.tsx +48 -0
  981. package/src/input-control/reducer/actions.ts +3 -1
  982. package/src/input-control/reducer/reducer.ts +27 -10
  983. package/src/input-control/reducer/state.ts +7 -2
  984. package/src/input-control/stories/index.tsx +15 -2
  985. package/src/input-control/styles/input-control-styles.tsx +28 -12
  986. package/src/input-control/test/index.js +20 -4
  987. package/src/input-control/types.ts +52 -3
  988. package/src/item-group/styles.ts +3 -3
  989. package/src/menu-group/test/index.js +18 -7
  990. package/src/mobile/bottom-sheet/index.native.js +2 -4
  991. package/src/mobile/global-styles-context/utils.native.js +22 -4
  992. package/src/mobile/image/index.native.js +17 -8
  993. package/src/mobile/link-picker/link-picker-screen.native.js +12 -4
  994. package/src/mobile/media-edit/index.native.js +2 -7
  995. package/src/mobile/picker/index.android.js +10 -4
  996. package/src/mobile/picker/index.ios.js +16 -0
  997. package/src/mobile/picker/styles.native.scss +12 -4
  998. package/src/modal/index.js +1 -2
  999. package/src/modal/style.scss +5 -1
  1000. package/src/modal/test/index.js +11 -9
  1001. package/src/navigable-container/container.js +12 -18
  1002. package/src/navigable-container/test/menu.js +14 -11
  1003. package/src/navigator/navigator-back-button/hook.ts +0 -3
  1004. package/src/navigator/navigator-button/hook.ts +0 -3
  1005. package/src/notice/list.js +12 -10
  1006. package/src/palette-edit/index.js +1 -0
  1007. package/src/palette-edit/styles.js +6 -5
  1008. package/src/panel/style.scss +4 -1
  1009. package/src/placeholder/README.md +49 -9
  1010. package/src/placeholder/{index.js → index.tsx} +27 -23
  1011. package/src/placeholder/stories/index.tsx +64 -0
  1012. package/src/placeholder/style.scss +65 -24
  1013. package/src/placeholder/test/index.tsx +174 -0
  1014. package/src/placeholder/types.ts +48 -0
  1015. package/src/popover/README.md +7 -0
  1016. package/src/popover/index.js +256 -157
  1017. package/src/popover/stories/index.js +213 -96
  1018. package/src/popover/style.scss +61 -7
  1019. package/src/popover/test/__snapshots__/index.js.snap +6 -6
  1020. package/src/popover/test/index.js +138 -23
  1021. package/src/popover/utils.js +107 -0
  1022. package/src/radio-control/index.tsx +1 -2
  1023. package/src/range-control/README.md +1 -1
  1024. package/src/range-control/index.tsx +3 -0
  1025. package/src/range-control/styles/range-control-styles.ts +9 -16
  1026. package/src/range-control/test/index.tsx +30 -0
  1027. package/src/range-control/types.ts +9 -4
  1028. package/src/range-control/utils.ts +4 -1
  1029. package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +1 -1
  1030. package/src/sandbox/index.native.js +14 -1
  1031. package/src/scroll-lock/README.md +1 -1
  1032. package/src/scroll-lock/{index.js → index.tsx} +34 -7
  1033. package/src/scroll-lock/stories/index.tsx +96 -0
  1034. package/src/scroll-lock/test/index.tsx +26 -0
  1035. package/src/select-control/chevron-down.tsx +25 -0
  1036. package/src/select-control/index.tsx +7 -11
  1037. package/src/select-control/styles/select-control-styles.ts +54 -22
  1038. package/src/select-control/types.ts +1 -0
  1039. package/src/shortcut/{index.js → index.tsx} +5 -9
  1040. package/src/shortcut/test/__snapshots__/index.tsx.snap +15 -0
  1041. package/src/shortcut/test/index.tsx +41 -0
  1042. package/src/shortcut/types.ts +10 -0
  1043. package/src/slot-fill/test/slot.js +5 -5
  1044. package/src/snackbar/list.js +3 -2
  1045. package/src/spacer/component.tsx +3 -1
  1046. package/src/spinner/index.tsx +2 -0
  1047. package/src/style-provider/index.tsx +41 -0
  1048. package/src/style-provider/types.ts +15 -0
  1049. package/src/style.scss +0 -2
  1050. package/src/text/hook.js +5 -3
  1051. package/src/text/styles.js +1 -1
  1052. package/src/text/test/index.tsx +1 -1
  1053. package/src/toggle-group-control/stories/index.tsx +127 -0
  1054. package/src/toggle-group-control/test/__snapshots__/{index.js.snap → index.tsx.snap} +56 -26
  1055. package/src/toggle-group-control/test/{index.js → index.tsx} +2 -4
  1056. package/src/toggle-group-control/toggle-group-control/README.md +2 -0
  1057. package/src/toggle-group-control/toggle-group-control/component.tsx +20 -11
  1058. package/src/toggle-group-control/toggle-group-control/styles.ts +30 -7
  1059. package/src/toggle-group-control/toggle-group-control-option/component.tsx +19 -3
  1060. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +3 -0
  1061. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +17 -3
  1062. package/src/toggle-group-control/toggle-group-control-option-icon/README.md +6 -8
  1063. package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +30 -7
  1064. package/src/toggle-group-control/types.ts +74 -53
  1065. package/src/toolbar/test/index.js +4 -4
  1066. package/src/toolbar-group/test/index.js +9 -15
  1067. package/src/tools-panel/styles.ts +9 -18
  1068. package/src/tools-panel/test/index.js +3 -2
  1069. package/src/tools-panel/tools-panel/README.md +94 -21
  1070. package/src/tools-panel/tools-panel/hook.ts +6 -1
  1071. package/src/tooltip/index.js +56 -10
  1072. package/src/tooltip/stories/index.js +28 -13
  1073. package/src/tooltip/style.scss +1 -1
  1074. package/src/tooltip/test/index.js +188 -172
  1075. package/src/tree-select/index.tsx +5 -4
  1076. package/src/tree-select/types.ts +4 -0
  1077. package/src/ui/context/context-connect.ts +3 -2
  1078. package/src/ui/context/test/context-system-provider.js +101 -1
  1079. package/src/ui/context/use-context-system.js +7 -2
  1080. package/src/ui/tooltip/styles.js +1 -0
  1081. package/src/ui/tooltip/test/__snapshots__/index.js.snap +1 -0
  1082. package/src/ui/utils/space.ts +7 -1
  1083. package/src/unit-control/index.tsx +2 -2
  1084. package/src/unit-control/stories/index.tsx +16 -23
  1085. package/src/unit-control/styles/unit-control-styles.ts +100 -46
  1086. package/src/unit-control/test/__snapshots__/index.tsx.snap +4 -4
  1087. package/src/unit-control/types.ts +12 -9
  1088. package/src/utils/base-label.ts +13 -0
  1089. package/src/utils/box-sizing.ts +14 -0
  1090. package/src/utils/colors-values.js +42 -137
  1091. package/src/utils/config-values.js +1 -1
  1092. package/src/utils/input/input-control.js +6 -6
  1093. package/src/utils/rtl.js +6 -2
  1094. package/src/utils/strings.ts +72 -0
  1095. package/src/utils/style-mixins.js +2 -0
  1096. package/src/utils/test/strings.js +15 -0
  1097. package/tsconfig.json +1 -0
  1098. package/tsconfig.tsbuildinfo +1 -1
  1099. package/build/custom-gradient-bar/constants.js.map +0 -1
  1100. package/build/custom-gradient-bar/control-points.js.map +0 -1
  1101. package/build/custom-gradient-bar/index.js.map +0 -1
  1102. package/build/custom-gradient-bar/utils.js.map +0 -1
  1103. package/build/date-time/date/utils.js +0 -34
  1104. package/build/date-time/date/utils.js.map +0 -1
  1105. package/build/swatch/index.js +0 -39
  1106. package/build/swatch/index.js.map +0 -1
  1107. package/build-module/custom-gradient-bar/constants.js.map +0 -1
  1108. package/build-module/custom-gradient-bar/control-points.js.map +0 -1
  1109. package/build-module/custom-gradient-bar/index.js.map +0 -1
  1110. package/build-module/custom-gradient-bar/utils.js.map +0 -1
  1111. package/build-module/date-time/date/utils.js +0 -22
  1112. package/build-module/date-time/date/utils.js.map +0 -1
  1113. package/build-module/swatch/index.js +0 -28
  1114. package/build-module/swatch/index.js.map +0 -1
  1115. package/build-types/date-time/date/test/utils.d.ts +0 -2
  1116. package/build-types/date-time/date/test/utils.d.ts.map +0 -1
  1117. package/build-types/date-time/date/utils.d.ts +0 -15
  1118. package/build-types/date-time/date/utils.d.ts.map +0 -1
  1119. package/src/date-time/date/datepicker.scss +0 -863
  1120. package/src/date-time/date/style.scss +0 -85
  1121. package/src/date-time/date/test/utils.ts +0 -32
  1122. package/src/date-time/date/utils.ts +0 -20
  1123. package/src/date-time/style.scss +0 -1
  1124. package/src/disabled/index.js +0 -55
  1125. package/src/disabled/stories/index.js +0 -61
  1126. package/src/disabled/test/index.js +0 -240
  1127. package/src/divider/test/index.js +0 -41
  1128. package/src/elevation/component.js +0 -43
  1129. package/src/elevation/stories/index.js +0 -148
  1130. package/src/elevation/test/index.js +0 -51
  1131. package/src/flex/flex/component.js +0 -60
  1132. package/src/flex/flex-block/component.js +0 -30
  1133. package/src/flex/flex-item/component.js +0 -30
  1134. package/src/flex/stories/index.js +0 -29
  1135. package/src/flex/test/index.js +0 -77
  1136. package/src/menu-group/test/__snapshots__/index.js.snap +0 -23
  1137. package/src/placeholder/stories/index.js +0 -44
  1138. package/src/placeholder/test/index.js +0 -163
  1139. package/src/popover/stories/_utils.js +0 -64
  1140. package/src/scroll-lock/stories/index.js +0 -71
  1141. package/src/scroll-lock/test/index.js +0 -53
  1142. package/src/shortcut/test/index.js +0 -37
  1143. package/src/style-provider/index.js +0 -31
  1144. package/src/swatch/index.js +0 -19
  1145. package/src/swatch/style.scss +0 -21
  1146. package/src/toggle-group-control/stories/index.js +0 -187
  1147. package/src/tools-panel/test/__snapshots__/index.js.snap +0 -219
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/tooltip/index.js"],"names":["TOOLTIP_DELAY","eventCatcher","getDisabledElement","eventHandlers","child","childrenWithPopover","children","getRegularElement","addPopoverToGrandchildren","grandchildren","isOver","position","text","shortcut","emitToChild","eventName","event","Children","count","only","props","disabled","Tooltip","delay","isMouseDown","setIsMouseDown","setIsOver","delayedSetIsOver","createMouseDown","document","addEventListener","cancelIsMouseDown","createMouseUp","removeEventListener","createMouseEvent","type","createToggleIsOver","isDelayed","currentTarget","cancel","_isOver","clearOnUnmount","process","env","NODE_ENV","console","error","onMouseEnter","onMouseLeave","onClick","onFocus","onBlur","onMouseDown","getElementWithPopover","popoverData"],"mappings":";;;;;;;;;AASA;;AALA;;AAYA;;AAKA;;AACA;;AAtBA;;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACO,MAAMA,aAAa,GAAG,GAAtB;;AAEP,MAAMC,YAAY,G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AAwC;AACvC,QAAK,kBAAkBoC,OAAO,CAACC,GAAR,CAAYC,QAAnC,EAA8C;AAC7C;AACAC,MAAAA,OAAO,CAACC,KAAR,CACC,4DADD;AAGA;;AAED,WAAOxC,QAAP;AACA;;AAED,QAAMH,aAAa,GAAG;AACrB4C,IAAAA,YAAY,EAAEX,kBAAkB,CAAE,cAAF,EAAkB,IAAlB,CADX;AAErBY,IAAAA,YAAY,EAAEZ,kBAAkB,CAAE,cAAF,CAFX;AAGrBa,IAAAA,OAAO,EAAEb,kBAAkB,CAAE,SAAF,CAHN;AAIrBc,IAAAA,OAAO,EAAEd,kBAAkB,CAAE,SAAF,CAJN;AAKrBe,IAAAA,MAAM,EAAEf,kBAAkB,CAAE,QAAF,CALL;AAMrBgB,IAAAA,WAAW,EAAElB,gBAAgB,CAAE,WAAF;AANR,GAAtB;;AASA,QAAM9B,KAAK,GAAGa,kBAASE,IAAT,CAAeb,QAAf,CAAd;;AACA,QAAM;AAAEA,IAAAA,QAAQ,EAAEG,aAAZ;AAA2BY,IAAAA;AAA3B,MAAwCjB,KAAK,CAACgB,KAApD;AACA,QAAMiC,qBAAqB,GAAGhC,QAAQ,GACnCnB,kBADmC,GAEnCK,iBAFH;AAIA,QAAM+C,WAAW,GAAG;AACnB5C,IAAAA,MADmB;AAEnBC,IAAAA,QAFmB;AAGnBC,IAAAA,IAHmB;AAInBC,IAAAA;AAJmB,GAApB;AAMA,QAAMR,mBAAmB,GAAGG,yBAAyB,CAAE;AACtDC,IAAAA,aADsD;AAEtD,OAAG6C;AAFmD,GAAF,CAArD;AAKA,SAAOD,qBAAqB,CAAE;AAC7BjD,IAAAA,KAD6B;AAE7BD,IAAAA,aAF6B;AAG7BE,IAAAA;AAH6B,GAAF,CAA5B;AAKA;;eAEciB,O","sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport { includes } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tChildren,\n\tcloneElement,\n\tconcatChildren,\n\tuseEffect,\n\tuseState,\n} from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Popover from '../popover';\nimport Shortcut from '../shortcut';\n\n/**\n * Time over children to wait before showing tooltip\n *\n * @type {number}\n */\nexport const TOOLTIP_DELAY = 700;\n\nconst eventCatcher = <div className=\"event-catcher\" />;\n\nconst getDisabledElement = ( { eventHandlers, child, childrenWithPopover } ) =>\n\tcloneElement(\n\t\t<span className=\"disabled-element-wrapper\">\n\t\t\t{ cloneElement( eventCatcher, eventHandlers ) }\n\t\t\t{ cloneElement( child, {\n\t\t\t\tchildren: childrenWithPopover,\n\t\t\t} ) }\n\t\t</span>,\n\t\teventHandlers\n\t);\n\nconst getRegularElement = ( { child, eventHandlers, childrenWithPopover } ) =>\n\tcloneElement( child, {\n\t\t...eventHandlers,\n\t\tchildren: childrenWithPopover,\n\t} );\n\nconst addPopoverToGrandchildren = ( {\n\tgrandchildren,\n\tisOver,\n\tposition,\n\ttext,\n\tshortcut,\n} ) =>\n\tconcatChildren(\n\t\tgrandchildren,\n\t\tisOver && (\n\t\t\t<Popover\n\t\t\t\tfocusOnMount={ false }\n\t\t\t\tposition={ position }\n\t\t\t\tclassName=\"components-tooltip\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tanimate={ false }\n\t\t\t\toffset={ 12 }\n\t\t\t\t__unstableShift\n\t\t\t>\n\t\t\t\t{ text }\n\t\t\t\t<Shortcut\n\t\t\t\t\tclassName=\"components-tooltip__shortcut\"\n\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t/>\n\t\t\t</Popover>\n\t\t)\n\t);\n\nconst emitToChild = ( children, eventName, event ) => {\n\tif ( Children.count( children ) !== 1 ) {\n\t\treturn;\n\t}\n\n\tconst child = Children.only( children );\n\n\t// If the underlying element is disabled, do not emit the event.\n\tif ( child.props.disabled ) {\n\t\treturn;\n\t}\n\n\tif ( typeof child.props[ eventName ] === 'function' ) {\n\t\tchild.props[ eventName ]( event );\n\t}\n};\n\nfunction Tooltip( props ) {\n\tconst {\n\t\tchildren,\n\t\tposition = 'bottom middle',\n\t\ttext,\n\t\tshortcut,\n\t\tdelay = TOOLTIP_DELAY,\n\t} = props;\n\t/**\n\t * Whether a mouse is currently pressed, used in determining whether\n\t * to handle a focus event as displaying the tooltip immediately.\n\t *\n\t * @type {boolean}\n\t */\n\tconst [ isMouseDown, setIsMouseDown ] = useState( false );\n\tconst [ isOver, setIsOver ] = useState( false );\n\tconst delayedSetIsOver = useDebounce( setIsOver, delay );\n\n\tconst createMouseDown = ( event ) => {\n\t\t// Preserve original child callback behavior.\n\t\temitToChild( children, 'onMouseDown', event );\n\n\t\t// On mouse down, the next `mouseup` should revert the value of the\n\t\t// instance property and remove its own event handler. The bind is\n\t\t// made on the document since the `mouseup` might not occur within\n\t\t// the bounds of the element.\n\t\tdocument.addEventListener( 'mouseup', cancelIsMouseDown );\n\t\tsetIsMouseDown( true );\n\t};\n\n\tconst createMouseUp = ( event ) => {\n\t\temitToChild( children, 'onMouseUp', event );\n\t\tdocument.removeEventListener( 'mouseup', cancelIsMouseDown );\n\t\tsetIsMouseDown( false );\n\t};\n\n\tconst createMouseEvent = ( type ) => {\n\t\tif ( type === 'mouseUp' ) return createMouseUp;\n\t\tif ( type === 'mouseDown' ) return createMouseDown;\n\t};\n\n\t/**\n\t * Prebound `isInMouseDown` handler, created as a constant reference to\n\t * assure ability to remove in component unmount.\n\t *\n\t * @type {Function}\n\t */\n\tconst cancelIsMouseDown = createMouseEvent( 'mouseUp' );\n\n\tconst createToggleIsOver = ( eventName, isDelayed ) => {\n\t\treturn ( event ) => {\n\t\t\t// Preserve original child callback behavior.\n\t\t\temitToChild( children, eventName, event );\n\n\t\t\t// Mouse events behave unreliably in React for disabled elements,\n\t\t\t// firing on mouseenter but not mouseleave. Further, the default\n\t\t\t// behavior for disabled elements in some browsers is to ignore\n\t\t\t// mouse events. Don't bother trying to to handle them.\n\t\t\t//\n\t\t\t// See: https://github.com/facebook/react/issues/4251\n\t\t\tif ( event.currentTarget.disabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// A focus event will occur as a result of a mouse click, but it\n\t\t\t// should be disambiguated between interacting with the button and\n\t\t\t// using an explicit focus shift as a cue to display the tooltip.\n\t\t\tif ( 'focus' === event.type && isMouseDown ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Needed in case unsetting is over while delayed set pending, i.e.\n\t\t\t// quickly blur/mouseleave before delayedSetIsOver is called.\n\t\t\tdelayedSetIsOver.cancel();\n\n\t\t\tconst _isOver = includes( [ 'focus', 'mouseenter' ], event.type );\n\t\t\tif ( _isOver === isOver ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isDelayed ) {\n\t\t\t\tdelayedSetIsOver( _isOver );\n\t\t\t} else {\n\t\t\t\tsetIsOver( _isOver );\n\t\t\t}\n\t\t};\n\t};\n\tconst clearOnUnmount = () => {\n\t\tdelayedSetIsOver.cancel();\n\t\tdocument.removeEventListener( 'mouseup', cancelIsMouseDown );\n\t};\n\n\tuseEffect( () => clearOnUnmount, [] );\n\n\tif ( Children.count( children ) !== 1 ) {\n\t\tif ( 'development' === process.env.NODE_ENV ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(\n\t\t\t\t'Tooltip should be called with only a single child element.'\n\t\t\t);\n\t\t}\n\n\t\treturn children;\n\t}\n\n\tconst eventHandlers = {\n\t\tonMouseEnter: createToggleIsOver( 'onMouseEnter', true ),\n\t\tonMouseLeave: createToggleIsOver( 'onMouseLeave' ),\n\t\tonClick: createToggleIsOver( 'onClick' ),\n\t\tonFocus: createToggleIsOver( 'onFocus' ),\n\t\tonBlur: createToggleIsOver( 'onBlur' ),\n\t\tonMouseDown: createMouseEvent( 'mouseDown' ),\n\t};\n\n\tconst child = Children.only( children );\n\tconst { children: grandchildren, disabled } = child.props;\n\tconst getElementWithPopover = disabled\n\t\t? getDisabledElement\n\t\t: getRegularElement;\n\n\tconst popoverData = {\n\t\tisOver,\n\t\tposition,\n\t\ttext,\n\t\tshortcut,\n\t};\n\tconst childrenWithPopover = addPopoverToGrandchildren( {\n\t\tgrandchildren,\n\t\t...popoverData,\n\t} );\n\n\treturn getElementWithPopover( {\n\t\tchild,\n\t\teventHandlers,\n\t\tchildrenWithPopover,\n\t} );\n}\n\nexport default Tooltip;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/tooltip/index.js"],"names":["TOOLTIP_DELAY","eventCatcher","getDisabledElement","eventHandlers","child","childrenWithPopover","mergedRefs","children","ref","getRegularElement","addPopoverToGrandchildren","anchorRef","grandchildren","isOver","offset","position","shortcut","text","emitToChild","eventName","event","Children","count","only","props","disabled","Tooltip","delay","isMouseDown","setIsMouseDown","setIsOver","delayedSetIsOver","childRef","existingChildRef","toArray","mergedChildRefs","createMouseDown","target","tagName","document","addEventListener","cancelIsMouseDown","createMouseUp","removeEventListener","createMouseEvent","type","createToggleIsOver","isDelayed","currentTarget","cancel","_isOver","clearOnUnmount","process","env","NODE_ENV","console","error","onMouseEnter","onMouseLeave","onClick","onFocus","onBlur","onMouseDown","getElementWithPopover","popoverData"],"mappings":";;;;;;;;;AASA;;AALA;;AAaA;;AAKA;;AACA;;AAvBA;;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAWA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACO,MAAMA,aAAa,GAAG,GAAtB;;AAEP,MAAMC,YAAY,GAAG;AAAK,EAAA,SAAS,EAAC;AAAf,EAArB;;AAEA,MAAMC,kBAAkB,GAAG,QAKpB;AAAA,MALsB;AAC5BC,IAAAA,aAD4B;AAE5BC,IAAAA,KAF4B;AAG5BC,IAAAA,mBAH4B;AAI5BC,IAAAA;AAJ4B,GAKtB;AACN,SAAO,2BACN;AAAM,IAAA,SAAS,EAAC;AAAhB,KACG,2BAAcL,YAAd,EAA4BE,aAA5B,CADH,EAEG,2BAAcC,KAAd,EAAqB;AACtBG,IAAAA,QAAQ,EAAEF,mBADY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B,IAAAA,MAFmB;AAGnBC,IAAAA,MAAM,EAAE,CAHW;AAInBC,IAAAA,QAJmB;AAKnBC,IAAAA,QALmB;AAMnBC,IAAAA;AANmB,GAApB;AAQA,QAAMZ,mBAAmB,GAAGK,yBAAyB,CAAE;AACtDE,IAAAA,aADsD;AAEtD,OAAGoD;AAFmD,GAAF,CAArD;AAKA,SAAOD,qBAAqB,CAAE;AAC7B3D,IAAAA,KAD6B;AAE7BD,IAAAA,aAF6B;AAG7BE,IAAAA,mBAH6B;AAI7BC,IAAAA,UAAU,EAAE6B;AAJiB,GAAF,CAA5B;AAMA;;eAEcT,O","sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport { includes } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tChildren,\n\tcloneElement,\n\tconcatChildren,\n\tuseEffect,\n\tuseState,\n\tuseRef,\n} from '@wordpress/element';\nimport { useDebounce, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Popover from '../popover';\nimport Shortcut from '../shortcut';\n\n/**\n * Time over children to wait before showing tooltip\n *\n * @type {number}\n */\nexport const TOOLTIP_DELAY = 700;\n\nconst eventCatcher = <div className=\"event-catcher\" />;\n\nconst getDisabledElement = ( {\n\teventHandlers,\n\tchild,\n\tchildrenWithPopover,\n\tmergedRefs,\n} ) => {\n\treturn cloneElement(\n\t\t<span className=\"disabled-element-wrapper\">\n\t\t\t{ cloneElement( eventCatcher, eventHandlers ) }\n\t\t\t{ cloneElement( child, {\n\t\t\t\tchildren: childrenWithPopover,\n\t\t\t\tref: mergedRefs,\n\t\t\t} ) }\n\t\t</span>,\n\t\t{ ...eventHandlers }\n\t);\n};\n\nconst getRegularElement = ( {\n\tchild,\n\teventHandlers,\n\tchildrenWithPopover,\n\tmergedRefs,\n} ) => {\n\treturn cloneElement( child, {\n\t\t...eventHandlers,\n\t\tchildren: childrenWithPopover,\n\t\tref: mergedRefs,\n\t} );\n};\n\nconst addPopoverToGrandchildren = ( {\n\tanchorRef,\n\tgrandchildren,\n\tisOver,\n\toffset,\n\tposition,\n\tshortcut,\n\ttext,\n} ) =>\n\tconcatChildren(\n\t\tgrandchildren,\n\t\tisOver && (\n\t\t\t<Popover\n\t\t\t\tfocusOnMount={ false }\n\t\t\t\tposition={ position }\n\t\t\t\tclassName=\"components-tooltip\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tanimate={ false }\n\t\t\t\toffset={ offset }\n\t\t\t\tanchorRef={ anchorRef }\n\t\t\t\t__unstableShift\n\t\t\t>\n\t\t\t\t{ text }\n\t\t\t\t<Shortcut\n\t\t\t\t\tclassName=\"components-tooltip__shortcut\"\n\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t/>\n\t\t\t</Popover>\n\t\t)\n\t);\n\nconst emitToChild = ( children, eventName, event ) => {\n\tif ( Children.count( children ) !== 1 ) {\n\t\treturn;\n\t}\n\n\tconst child = Children.only( children );\n\n\t// If the underlying element is disabled, do not emit the event.\n\tif ( child.props.disabled ) {\n\t\treturn;\n\t}\n\n\tif ( typeof child.props[ eventName ] === 'function' ) {\n\t\tchild.props[ eventName ]( event );\n\t}\n};\n\nfunction Tooltip( props ) {\n\tconst {\n\t\tchildren,\n\t\tposition = 'bottom middle',\n\t\ttext,\n\t\tshortcut,\n\t\tdelay = TOOLTIP_DELAY,\n\t} = props;\n\t/**\n\t * Whether a mouse is currently pressed, used in determining whether\n\t * to handle a focus event as displaying the tooltip immediately.\n\t *\n\t * @type {boolean}\n\t */\n\tconst [ isMouseDown, setIsMouseDown ] = useState( false );\n\tconst [ isOver, setIsOver ] = useState( false );\n\tconst delayedSetIsOver = useDebounce( setIsOver, delay );\n\n\t// Create a reference to the Tooltip's child, to be passed to the Popover\n\t// so that the Tooltip can be correctly positioned. Also, merge with the\n\t// existing ref for the first child, so that its ref is preserved.\n\tconst childRef = useRef( null );\n\tconst existingChildRef = Children.toArray( children )[ 0 ]?.ref;\n\tconst mergedChildRefs = useMergeRefs( [ childRef, existingChildRef ] );\n\n\tconst createMouseDown = ( event ) => {\n\t\t// In firefox, the mouse down event is also fired when the select\n\t\t// list is chosen.\n\t\t// Cancel further processing because re-rendering of child components\n\t\t// causes onChange to be triggered with the old value.\n\t\t// See https://github.com/WordPress/gutenberg/pull/42483\n\t\tif ( event.target.tagName === 'OPTION' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Preserve original child callback behavior.\n\t\temitToChild( children, 'onMouseDown', event );\n\n\t\t// On mouse down, the next `mouseup` should revert the value of the\n\t\t// instance property and remove its own event handler. The bind is\n\t\t// made on the document since the `mouseup` might not occur within\n\t\t// the bounds of the element.\n\t\tdocument.addEventListener( 'mouseup', cancelIsMouseDown );\n\t\tsetIsMouseDown( true );\n\t};\n\n\tconst createMouseUp = ( event ) => {\n\t\t// In firefox, the mouse up event is also fired when the select\n\t\t// list is chosen.\n\t\t// Cancel further processing because re-rendering of child components\n\t\t// causes onChange to be triggered with the old value.\n\t\t// See https://github.com/WordPress/gutenberg/pull/42483\n\t\tif ( event.target.tagName === 'OPTION' ) {\n\t\t\treturn;\n\t\t}\n\n\t\temitToChild( children, 'onMouseUp', event );\n\t\tdocument.removeEventListener( 'mouseup', cancelIsMouseDown );\n\t\tsetIsMouseDown( false );\n\t};\n\n\tconst createMouseEvent = ( type ) => {\n\t\tif ( type === 'mouseUp' ) return createMouseUp;\n\t\tif ( type === 'mouseDown' ) return createMouseDown;\n\t};\n\n\t/**\n\t * Prebound `isInMouseDown` handler, created as a constant reference to\n\t * assure ability to remove in component unmount.\n\t *\n\t * @type {Function}\n\t */\n\tconst cancelIsMouseDown = createMouseEvent( 'mouseUp' );\n\n\tconst createToggleIsOver = ( eventName, isDelayed ) => {\n\t\treturn ( event ) => {\n\t\t\t// Preserve original child callback behavior.\n\t\t\temitToChild( children, eventName, event );\n\n\t\t\t// Mouse events behave unreliably in React for disabled elements,\n\t\t\t// firing on mouseenter but not mouseleave. Further, the default\n\t\t\t// behavior for disabled elements in some browsers is to ignore\n\t\t\t// mouse events. Don't bother trying to handle them.\n\t\t\t//\n\t\t\t// See: https://github.com/facebook/react/issues/4251\n\t\t\tif ( event.currentTarget.disabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// A focus event will occur as a result of a mouse click, but it\n\t\t\t// should be disambiguated between interacting with the button and\n\t\t\t// using an explicit focus shift as a cue to display the tooltip.\n\t\t\tif ( 'focus' === event.type && isMouseDown ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Needed in case unsetting is over while delayed set pending, i.e.\n\t\t\t// quickly blur/mouseleave before delayedSetIsOver is called.\n\t\t\tdelayedSetIsOver.cancel();\n\n\t\t\tconst _isOver = includes( [ 'focus', 'mouseenter' ], event.type );\n\t\t\tif ( _isOver === isOver ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isDelayed ) {\n\t\t\t\tdelayedSetIsOver( _isOver );\n\t\t\t} else {\n\t\t\t\tsetIsOver( _isOver );\n\t\t\t}\n\t\t};\n\t};\n\tconst clearOnUnmount = () => {\n\t\tdelayedSetIsOver.cancel();\n\t\tdocument.removeEventListener( 'mouseup', cancelIsMouseDown );\n\t};\n\n\tuseEffect( () => clearOnUnmount, [] );\n\n\tif ( Children.count( children ) !== 1 ) {\n\t\tif ( 'development' === process.env.NODE_ENV ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(\n\t\t\t\t'Tooltip should be called with only a single child element.'\n\t\t\t);\n\t\t}\n\n\t\treturn children;\n\t}\n\n\tconst eventHandlers = {\n\t\tonMouseEnter: createToggleIsOver( 'onMouseEnter', true ),\n\t\tonMouseLeave: createToggleIsOver( 'onMouseLeave' ),\n\t\tonClick: createToggleIsOver( 'onClick' ),\n\t\tonFocus: createToggleIsOver( 'onFocus' ),\n\t\tonBlur: createToggleIsOver( 'onBlur' ),\n\t\tonMouseDown: createMouseEvent( 'mouseDown' ),\n\t};\n\n\tconst child = Children.only( children );\n\tconst { children: grandchildren, disabled } = child.props;\n\tconst getElementWithPopover = disabled\n\t\t? getDisabledElement\n\t\t: getRegularElement;\n\n\tconst popoverData = {\n\t\tanchorRef: childRef,\n\t\tisOver,\n\t\toffset: 4,\n\t\tposition,\n\t\tshortcut,\n\t\ttext,\n\t};\n\tconst childrenWithPopover = addPopoverToGrandchildren( {\n\t\tgrandchildren,\n\t\t...popoverData,\n\t} );\n\n\treturn getElementWithPopover( {\n\t\tchild,\n\t\teventHandlers,\n\t\tchildrenWithPopover,\n\t\tmergedRefs: mergedChildRefs,\n\t} );\n}\n\nexport default Tooltip;\n"]}
@@ -94,10 +94,10 @@ function TreeSelect(_ref) {
94
94
  ...props
95
95
  } = _ref;
96
96
  const options = (0, _element.useMemo)(() => {
97
- return (0, _lodash.compact)([noOptionLabel && {
97
+ return [noOptionLabel && {
98
98
  value: '',
99
99
  label: noOptionLabel
100
- }, ...getSelectOptions(tree)]);
100
+ }, ...getSelectOptions(tree)].filter(option => !!option);
101
101
  }, [noOptionLabel, tree]);
102
102
  return (0, _element.createElement)(_selectControl.SelectControl, (0, _extends2.default)({
103
103
  label,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/tree-select/index.tsx"],"names":["getSelectOptions","tree","level","flatMap","treeNode","value","id","label","repeat","name","children","TreeSelect","noOptionLabel","onChange","selectedId","props","options"],"mappings":";;;;;;;;;;AAQA;;;;AALA;;AASA;;AAZA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AAIA,SAASA,gBAAT,CAA2BC,IAA3B,EAAoE;AAAA,MAA3BC,KAA2B,uEAAnB,CAAmB;AACnE,SAAOD,IAAI,CAACE,OAAL,CAAgBC,QAAF,IAAgB,CACpC;AACCC,IAAAA,KAAK,EAAED,QAAQ,CAACE,EADjB;AAECC,IAAAA,KAAK,EACJ,SAASC,MAAT,CAAiBN,KAAK,GAAG,CAAzB,IAA+B,sBAAgBE,QAAQ,CAACK,IAAzB;AAHjC,GADoC,EAMpC,GAAGT,gBAAgB,CAAEI,QAAQ,CAACM,QAAT,IAAqB,EAAvB,EAA2BR,KAAK,GAAG,CAAnC,CANiB,CAA9B,CAAP;AAQA;AAED;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,SAASS,UAAT,OAOc;AAAA,MAPO;AAC3BJ,IAAAA,KAD2B;AAE3BK,IAAAA,aAF2B;AAG3BC,IAAAA,QAH2B;AAI3BC,IAAAA,UAJ2B;AAK3Bb,IAAAA,IAAI,GAAG,EALoB;AAM3B,OAAGc;AANwB,GAOP;AACpB,QAAMC,OAAO,GAAG,sBAAS,MAAM;AAC9B,WAAO,qBAAS,CACfJ,aAAa,IAAI;AAAEP,MAAAA,KAAK,EAAE,EAAT;AAAaE,MAAAA,KAAK,EAAEK;AAApB,KADF,EAEf,GAAGZ,gBAAgB,CAAEC,IAAF,CAFJ,CAAT,CAAP;AAIA,GALe,EAKb,CAAEW,aAAF,EAAiBX,IAAjB,CALa,CAAhB;AAOA,SACC,4BAAC,4BAAD;AACQM,IAAAA,KADR;AACeS,IAAAA,OADf;AACwBH,IAAAA,QADxB;AAEC,IAAA,KAAK,EAAGC;AAFT,KAGMC,KAHN,EADD;AAOA;;eAEcJ,U","sourcesContent":["/**\n * External dependencies\n */\nimport { unescape as unescapeString, compact } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport type { TreeSelectProps, Tree, SelectOptions } from './types';\n\nfunction getSelectOptions( tree: Tree[], level = 0 ): SelectOptions {\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 ) + unescapeString( 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 * @example\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 */\nexport function TreeSelect( {\n\tlabel,\n\tnoOptionLabel,\n\tonChange,\n\tselectedId,\n\ttree = [],\n\t...props\n}: TreeSelectProps ) {\n\tconst options = useMemo( () => {\n\t\treturn compact( [\n\t\t\tnoOptionLabel && { value: '', label: noOptionLabel },\n\t\t\t...getSelectOptions( tree ),\n\t\t] );\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{ ...props }\n\t\t/>\n\t);\n}\n\nexport default TreeSelect;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/tree-select/index.tsx"],"names":["getSelectOptions","tree","level","flatMap","treeNode","value","id","label","repeat","name","children","TreeSelect","noOptionLabel","onChange","selectedId","props","options","filter","option"],"mappings":";;;;;;;;;;AAQA;;;;AALA;;AASA;;AAZA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AAIA,SAASA,gBAAT,CAA2BC,IAA3B,EAAoE;AAAA,MAA3BC,KAA2B,uEAAnB,CAAmB;AACnE,SAAOD,IAAI,CAACE,OAAL,CAAgBC,QAAF,IAAgB,CACpC;AACCC,IAAAA,KAAK,EAAED,QAAQ,CAACE,EADjB;AAECC,IAAAA,KAAK,EACJ,SAASC,MAAT,CAAiBN,KAAK,GAAG,CAAzB,IAA+B,sBAAgBE,QAAQ,CAACK,IAAzB;AAHjC,GADoC,EAMpC,GAAGT,gBAAgB,CAAEI,QAAQ,CAACM,QAAT,IAAqB,EAAvB,EAA2BR,KAAK,GAAG,CAAnC,CANiB,CAA9B,CAAP;AAQA;AAED;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;;;AAEO,SAASS,UAAT,OAOc;AAAA,MAPO;AAC3BJ,IAAAA,KAD2B;AAE3BK,IAAAA,aAF2B;AAG3BC,IAAAA,QAH2B;AAI3BC,IAAAA,UAJ2B;AAK3Bb,IAAAA,IAAI,GAAG,EALoB;AAM3B,OAAGc;AANwB,GAOP;AACpB,QAAMC,OAAO,GAAG,sBAAS,MAAM;AAC9B,WAAO,CACNJ,aAAa,IAAI;AAAEP,MAAAA,KAAK,EAAE,EAAT;AAAaE,MAAAA,KAAK,EAAEK;AAApB,KADX,EAEN,GAAGZ,gBAAgB,CAAEC,IAAF,CAFb,EAGLgB,MAHK,CAGWC,MAAR,IAA8C,CAAC,CAAEA,MAHpD,CAAP;AAIA,GALe,EAKb,CAAEN,aAAF,EAAiBX,IAAjB,CALa,CAAhB;AAOA,SACC,4BAAC,4BAAD;AACQM,IAAAA,KADR;AACeS,IAAAA,OADf;AACwBH,IAAAA,QADxB;AAEC,IAAA,KAAK,EAAGC;AAFT,KAGMC,KAHN,EADD;AAOA;;eAEcJ,U","sourcesContent":["/**\n * External dependencies\n */\nimport { unescape as unescapeString } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport type { TreeSelectProps, Tree, SelectOptions, Truthy } from './types';\n\nfunction getSelectOptions( tree: Tree[], level = 0 ): SelectOptions {\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 ) + unescapeString( 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 * @example\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( {\n\tlabel,\n\tnoOptionLabel,\n\tonChange,\n\tselectedId,\n\ttree = [],\n\t...props\n}: TreeSelectProps ) {\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{ ...props }\n\t\t/>\n\t);\n}\n\nexport default TreeSelect;\n"]}
@@ -9,8 +9,6 @@ exports.contextConnect = contextConnect;
9
9
  exports.getConnectNamespace = getConnectNamespace;
10
10
  exports.hasConnectNamespace = hasConnectNamespace;
11
11
 
12
- var _lodash = require("lodash");
13
-
14
12
  var _element = require("@wordpress/element");
15
13
 
16
14
  var _warning = _interopRequireDefault(require("@wordpress/warning"));
@@ -76,7 +74,7 @@ function contextConnect(Component, namespace) {
76
74
 
77
75
  WrappedComponent.displayName = namespace; // @ts-ignore internal property
78
76
 
79
- WrappedComponent[_constants.CONNECT_STATIC_NAMESPACE] = (0, _lodash.uniq)(mergedNamespace); // @ts-ignore WordPressComponent property
77
+ WrappedComponent[_constants.CONNECT_STATIC_NAMESPACE] = [...new Set(mergedNamespace)]; // @ts-ignore WordPressComponent property
80
78
 
81
79
  WrappedComponent.selector = `.${(0, _getStyledClassNameFromKey.getStyledClassNameFromKey)(namespace)}`; // @ts-ignore
82
80
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/context/context-connect.ts"],"names":["contextConnect","Component","namespace","options","memo","memoProp","WrappedComponent","mergedNamespace","CONNECT_STATIC_NAMESPACE","Array","isArray","displayName","selector","getConnectNamespace","namespaces","type","hasConnectNamespace","match","includes","some","result"],"mappings":";;;;;;;;;;;AAGA;;AAMA;;AACA;;AAKA;;AACA;;AAhBA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAT,CACNC,SADM,EAENC,SAFM,EAI6B;AAAA,MADnCC,OACmC,uEADF,EACE;AACnC,QAAM;AAAEC,IAAAA,IAAI,EAAEC,QAAQ,GAAG;AAAnB,MAA6BF,OAAnC;AAEA,MAAIG,gBAAgB,GAAG,yBAAYL,SAAZ,CAAvB;;AACA,MAAKI,QAAL,EAAgB;AACf;AACAC,IAAAA,gBAAgB,GAAG,mBAAMA,gBAAN,CAAnB;AACA;;AAED,MAAK,OAAOJ,SAAP,KAAqB,WAA1B,EAAwC;AACvC,mHAAM,4CAAN;AACA,GAXkC,CAanC;;;AACA,MAAIK,eAAe,GAAGD,gBAAgB,CAAEE,mCAAF,CAAhB,IAAgD,CACrEN,SADqE,CAAtE;AAIA;AACD;AACA;;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AAiCiB,QAAjC,CAA2CD,KAA3C,CAAP;AACA;;AACD,MAAKR,KAAK,CAACC,OAAN,CAAeO,KAAf,CAAL,EAA8B;AAC7B,WAAOA,KAAK,CAACE,IAAN,CAAcC,MAAF,IAClBP,mBAAmB,CAAEZ,SAAF,CAAnB,CAAiCiB,QAAjC,CAA2CE,MAA3C,CADM,CAAP;AAGA;;AAED,SAAO,KAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { uniq } from 'lodash';\nimport type { ForwardedRef, ReactChild, ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, memo } from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { CONNECT_STATIC_NAMESPACE } from './constants';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\nimport type { WordPressComponentFromProps } from '.';\n\ntype ContextConnectOptions = {\n\t/** Defaults to `false`. */\n\tmemo?: boolean;\n};\n\n/**\n * Forwards ref (React.ForwardRef) and \"Connects\" (or registers) a component\n * within the Context system under a specified namespace.\n *\n * This is an (experimental) evolution of the initial connect() HOC.\n * The hope is that we can improve render performance by removing functional\n * component wrappers.\n *\n * @param Component The component to register into the Context system.\n * @param namespace The namespace to register the component under.\n * @param options\n * @return The connected WordPressComponent\n */\nexport function contextConnect< P >(\n\tComponent: ( props: P, ref: ForwardedRef< any > ) => JSX.Element | null,\n\tnamespace: string,\n\toptions: ContextConnectOptions = {}\n): WordPressComponentFromProps< P > {\n\tconst { memo: memoProp = false } = options;\n\n\tlet WrappedComponent = forwardRef( Component );\n\tif ( memoProp ) {\n\t\t// @ts-ignore\n\t\tWrappedComponent = memo( WrappedComponent );\n\t}\n\n\tif ( typeof namespace === 'undefined' ) {\n\t\twarn( 'contextConnect: Please provide a namespace' );\n\t}\n\n\t// @ts-ignore internal property\n\tlet mergedNamespace = WrappedComponent[ CONNECT_STATIC_NAMESPACE ] || [\n\t\tnamespace,\n\t];\n\n\t/**\n\t * Consolidate (merge) namespaces before attaching it to the WrappedComponent.\n\t */\n\tif ( Array.isArray( namespace ) ) {\n\t\tmergedNamespace = [ ...mergedNamespace, ...namespace ];\n\t}\n\tif ( typeof namespace === 'string' ) {\n\t\tmergedNamespace = [ ...mergedNamespace, namespace ];\n\t}\n\n\tWrappedComponent.displayName = namespace;\n\n\t// @ts-ignore internal property\n\tWrappedComponent[ CONNECT_STATIC_NAMESPACE ] = uniq( mergedNamespace );\n\n\t// @ts-ignore WordPressComponent property\n\tWrappedComponent.selector = `.${ getStyledClassNameFromKey( namespace ) }`;\n\n\t// @ts-ignore\n\treturn WrappedComponent;\n}\n\n/**\n * Attempts to retrieve the connected namespace from a component.\n *\n * @param Component The component to retrieve a namespace from.\n * @return The connected namespaces.\n */\nexport function getConnectNamespace(\n\tComponent: ReactChild | undefined | {}\n): string[] {\n\tif ( ! Component ) return [];\n\n\tlet namespaces = [];\n\n\t// @ts-ignore internal property\n\tif ( Component[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore internal property\n\t\tnamespaces = Component[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\t// @ts-ignore\n\tif ( Component.type && Component.type[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore\n\t\tnamespaces = Component.type[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\treturn namespaces;\n}\n\n/**\n * Checks to see if a component is connected within the Context system.\n *\n * @param Component The component to retrieve a namespace from.\n * @param match The namespace to check.\n */\nexport function hasConnectNamespace(\n\tComponent: ReactNode,\n\tmatch: string[] | string\n): boolean {\n\tif ( ! Component ) return false;\n\n\tif ( typeof match === 'string' ) {\n\t\treturn getConnectNamespace( Component ).includes( match );\n\t}\n\tif ( Array.isArray( match ) ) {\n\t\treturn match.some( ( result ) =>\n\t\t\tgetConnectNamespace( Component ).includes( result )\n\t\t);\n\t}\n\n\treturn false;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/ui/context/context-connect.ts"],"names":["contextConnect","Component","namespace","options","memo","memoProp","WrappedComponent","mergedNamespace","CONNECT_STATIC_NAMESPACE","Array","isArray","displayName","Set","selector","getConnectNamespace","namespaces","type","hasConnectNamespace","match","includes","some","result"],"mappings":";;;;;;;;;;;AAQA;;AACA;;AAKA;;AACA;;AAfA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAT,CACNC,SADM,EAENC,SAFM,EAI6B;AAAA,MADnCC,OACmC,uEADF,EACE;AACnC,QAAM;AAAEC,IAAAA,IAAI,EAAEC,QAAQ,GAAG;AAAnB,MAA6BF,OAAnC;AAEA,MAAIG,gBAAgB,GAAG,yBAAYL,SAAZ,CAAvB;;AACA,MAAKI,QAAL,EAAgB;AACf;AACAC,IAAAA,gBAAgB,GAAG,mBAAMA,gBAAN,CAAnB;AACA;;AAED,MAAK,OAAOJ,SAAP,KAAqB,WAA1B,EAAwC;AACvC,mHAAM,4CAAN;AACA,GAXkC,CAanC;;;AACA,MAAIK,eAAe,GAAGD,gBAAgB,CAAEE,mCAAF,CAAhB,IAAgD,CACrEN,SADqE,CAAtE;AAIA;AACD;AACA;;AACC,MAAKO,KAAK,CAACC,OAAN,CAAeR,SAAf,CAAL,EAAkC;AACjCK,IAAAA,eAAe,GAAG,CAAE,GAAGA,eAAL,EAAsB,GAAGL,SAAzB,CAAlB;AACA;;AACD,MAAK,OAAOA,SAAP,KAAqB,QAA1B,EAAqC;AACpCK,IAAAA,eAAe,GAAG,CAAE,GAAGA,eAAL,EAAsBL,SAAtB,CAAlB;AACA;;AAEDI,EAAAA,gBAAgB,CAACK,WAAjB,GAA+BT,SAA/B,CA5BmC,CA8BnC;;AACAI,EAAAA,gBAAgB,CAAEE,mCAAF,CAAhB,GAA+C,CAC9C,GAAG,IAAII,GAAJ,CAASL,eAAT,CAD2C,CAA/C,CA/BmC,CAmCnC;;AACAD,EAAAA,gBAAgB,CAACO,QAAjB,GAA6B,IAAI,0DAA2BX,SAA3B,CAAwC,EAAzE,CApCmC,CAsCnC;;AACA,SAAOI,gBAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASQ,mBAAT,CACNb,SADM,EAEK;AACX,MAAK,CAAEA,SAAP,EAAmB,OAAO,EAAP;AAEnB,MAAIc,UAAU,GAAG,EAAjB,CAHW,CAKX;;AACA,MAAKd,SAAS,CAAEO,mCAAF,CAAd,EAA6C;AAC5C;AACAO,IAAAA,UAAU,GAAGd,SAAS,CAAEO,mCAAF,CAAtB;AACA,GATU,CAWX;;;AACA,MAAKP,SAAS,CAACe,IAAV,IAAkBf,SAAS,CAACe,IAAV,CAAgBR,mCAAhB,CAAvB,EAAoE;AACnE;AACAO,IAAAA,UAAU,GAAGd,SAAS,CAACe,IAAV,CAAgBR,mCAAhB,CAAb;AACA;;AAED,SAAOO,UAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASE,mBAAT,CACNhB,SADM,EAENiB,KAFM,EAGI;AACV,MAAK,CAAEjB,SAAP,EAAmB,OAAO,KAAP;;AAEnB,MAAK,OAAOiB,KAAP,KAAiB,QAAtB,EAAiC;AAChC,WAAOJ,mBAAmB,CAAEb,SAAF,CAAnB,CAAiCkB,QAAjC,CAA2CD,KAA3C,CAAP;AACA;;AACD,MAAKT,KAAK,CAACC,OAAN,CAAeQ,KAAf,CAAL,EAA8B;AAC7B,WAAOA,KAAK,CAACE,IAAN,CAAcC,MAAF,IAClBP,mBAAmB,CAAEb,SAAF,CAAnB,CAAiCkB,QAAjC,CAA2CE,MAA3C,CADM,CAAP;AAGA;;AAED,SAAO,KAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, ReactChild, ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, memo } from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { CONNECT_STATIC_NAMESPACE } from './constants';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\nimport type { WordPressComponentFromProps } from '.';\n\ntype ContextConnectOptions = {\n\t/** Defaults to `false`. */\n\tmemo?: boolean;\n};\n\n/**\n * Forwards ref (React.ForwardRef) and \"Connects\" (or registers) a component\n * within the Context system under a specified namespace.\n *\n * This is an (experimental) evolution of the initial connect() HOC.\n * The hope is that we can improve render performance by removing functional\n * component wrappers.\n *\n * @param Component The component to register into the Context system.\n * @param namespace The namespace to register the component under.\n * @param options\n * @return The connected WordPressComponent\n */\nexport function contextConnect< P >(\n\tComponent: ( props: P, ref: ForwardedRef< any > ) => JSX.Element | null,\n\tnamespace: string,\n\toptions: ContextConnectOptions = {}\n): WordPressComponentFromProps< P > {\n\tconst { memo: memoProp = false } = options;\n\n\tlet WrappedComponent = forwardRef( Component );\n\tif ( memoProp ) {\n\t\t// @ts-ignore\n\t\tWrappedComponent = memo( WrappedComponent );\n\t}\n\n\tif ( typeof namespace === 'undefined' ) {\n\t\twarn( 'contextConnect: Please provide a namespace' );\n\t}\n\n\t// @ts-ignore internal property\n\tlet mergedNamespace = WrappedComponent[ CONNECT_STATIC_NAMESPACE ] || [\n\t\tnamespace,\n\t];\n\n\t/**\n\t * Consolidate (merge) namespaces before attaching it to the WrappedComponent.\n\t */\n\tif ( Array.isArray( namespace ) ) {\n\t\tmergedNamespace = [ ...mergedNamespace, ...namespace ];\n\t}\n\tif ( typeof namespace === 'string' ) {\n\t\tmergedNamespace = [ ...mergedNamespace, namespace ];\n\t}\n\n\tWrappedComponent.displayName = namespace;\n\n\t// @ts-ignore internal property\n\tWrappedComponent[ CONNECT_STATIC_NAMESPACE ] = [\n\t\t...new Set( mergedNamespace ),\n\t];\n\n\t// @ts-ignore WordPressComponent property\n\tWrappedComponent.selector = `.${ getStyledClassNameFromKey( namespace ) }`;\n\n\t// @ts-ignore\n\treturn WrappedComponent;\n}\n\n/**\n * Attempts to retrieve the connected namespace from a component.\n *\n * @param Component The component to retrieve a namespace from.\n * @return The connected namespaces.\n */\nexport function getConnectNamespace(\n\tComponent: ReactChild | undefined | {}\n): string[] {\n\tif ( ! Component ) return [];\n\n\tlet namespaces = [];\n\n\t// @ts-ignore internal property\n\tif ( Component[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore internal property\n\t\tnamespaces = Component[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\t// @ts-ignore\n\tif ( Component.type && Component.type[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore\n\t\tnamespaces = Component.type[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\treturn namespaces;\n}\n\n/**\n * Checks to see if a component is connected within the Context system.\n *\n * @param Component The component to retrieve a namespace from.\n * @param match The namespace to check.\n */\nexport function hasConnectNamespace(\n\tComponent: ReactNode,\n\tmatch: string[] | string\n): boolean {\n\tif ( ! Component ) return false;\n\n\tif ( typeof match === 'string' ) {\n\t\treturn getConnectNamespace( Component ).includes( match );\n\t}\n\tif ( Array.isArray( match ) ) {\n\t\treturn match.some( ( result ) =>\n\t\t\tgetConnectNamespace( Component ).includes( result )\n\t\t);\n\t}\n\n\treturn false;\n}\n"]}
@@ -75,10 +75,15 @@ function useContextSystem(props, namespace) {
75
75
  for (const key in overrideProps) {
76
76
  // @ts-ignore filling in missing props
77
77
  finalComponentProps[key] = overrideProps[key];
78
- } // @ts-ignore
78
+ } // Setting an `undefined` explicitly can cause unintended overwrites
79
+ // when a `cloneElement()` is involved.
79
80
 
80
81
 
81
- finalComponentProps.children = rendered;
82
+ if (rendered !== undefined) {
83
+ // @ts-ignore
84
+ finalComponentProps.children = rendered;
85
+ }
86
+
82
87
  finalComponentProps.className = classes;
83
88
  return finalComponentProps;
84
89
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/context/use-context-system.js"],"names":["useContextSystem","props","namespace","contextSystemProps","contextProps","finalComponentProps","_overrides","overrideProps","otherContextProps","initialMergedProps","Object","entries","length","assign","cx","classes","className","rendered","renderChildren","children","key"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,gBAAT,CAA2BC,KAA3B,EAAkCC,SAAlC,EAA8C;AACpD,QAAMC,kBAAkB,GAAG,kDAA3B;;AACA,MAAK,OAAOD,SAAP,KAAqB,WAA1B,EAAwC;AACvC,mHAAM,8CAAN;AACA;;AAED,QAAME,YAAY,GAAG,CAAAD,kBAAkB,SAAlB,IAAAA,kBAAkB,WAAlB,YAAAA,kBAAkB,CAAID,SAAJ,CAAlB,KAAqC,EAA1D;AAEA;;AACA;AACA;;AACA,QAAMG,mBAAmB,GAAG,EAC3B,GAAG,mCADwB;AAE3B,OAAG,yBAAcH,SAAd;AAFwB,GAA5B;AAIA;;AAEA,QAAM;AAAEI,IAAAA,UAAU,EAAEC,aAAd;AAA6B,OAAGC;AAAhC,MAAsDJ,YAA5D;AAEA,QAAMK,kBAAkB,GAAGC,MAAM,CAACC,OAAP,CAAgBH,iBAAhB,EAAoCI,MAApC,GACxBF,MAAM,CAACG,MAAP,CAAe,EAAf,EAAmBL,iBAAnB,EAAsCP,KAAtC,CADwB,GAExBA,KAFH;AAIA,QAAMa,EAAE,GAAG,mBAAX;AAEA,QAAMC,OAAO,GAAGD,EAAE,CACjB,0DAA2BZ,SAA3B,CADiB,EAEjBD,KAAK,CAACe,SAFW,CAAlB,CAzBoD,CA8BpD;;AACA,QAAMC,QAAQ,GACb,OAAOR,kBAAkB,CAACS,cAA1B,KAA6C,UAA7C,GACGT,kBAAkB,CAACS,cAAnB,CAAmCT,kBAAnC,CADH,GAEGA,kBAAkB,CAACU,QAHvB;;AAKA,OAAM,MAAMC,GAAZ,IAAmBX,kBAAnB,EAAwC;AACvC;AACAJ,IAAAA,mBAAmB,CAAEe,GAAF,CAAnB,GAA6BX,kBAAkB,CAAEW,GAAF,CAA/C;AACA;;AAED,OAAM,MAAMA,GAAZ,IAAmBb,aAAnB,EAAmC;AAClC;AACAF,IAAAA,mBAAmB,CAAEe,GAAF,CAAnB,GAA6Bb,aAAa,CAAEa,GAAF,CAA1C;AACA,GA5CmD,CA8CpD;;;AACAf,EAAAA,mBAAmB,CAACc,QAApB,GAA+BF,QAA/B;AACAZ,EAAAA,mBAAmB,CAACW,SAApB,GAAgCD,OAAhC;AAEA,SAAOV,mBAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { useComponentsContext } from './context-system-provider';\nimport { getNamespace, getConnectedNamespace } from './utils';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\nimport { useCx } from '../../utils/hooks/use-cx';\n\n/**\n * @template TProps\n * @typedef {TProps & { className: string }} ConnectedProps\n */\n\n/**\n * Custom hook that derives registered props from the Context system.\n * These derived props are then consolidated with incoming component props.\n *\n * @template {{ className?: string }} P\n * @param {P} props Incoming props from the component.\n * @param {string} namespace The namespace to register and to derive context props from.\n * @return {ConnectedProps<P>} The connected props.\n */\nexport function useContextSystem( props, namespace ) {\n\tconst contextSystemProps = useComponentsContext();\n\tif ( typeof namespace === 'undefined' ) {\n\t\twarn( 'useContextSystem: Please provide a namespace' );\n\t}\n\n\tconst contextProps = contextSystemProps?.[ namespace ] || {};\n\n\t/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {ConnectedProps<P>} */\n\t// @ts-ignore We fill in the missing properties below\n\tconst finalComponentProps = {\n\t\t...getConnectedNamespace(),\n\t\t...getNamespace( namespace ),\n\t};\n\t/* eslint-enable jsdoc/no-undefined-types */\n\n\tconst { _overrides: overrideProps, ...otherContextProps } = contextProps;\n\n\tconst initialMergedProps = Object.entries( otherContextProps ).length\n\t\t? Object.assign( {}, otherContextProps, props )\n\t\t: props;\n\n\tconst cx = useCx();\n\n\tconst classes = cx(\n\t\tgetStyledClassNameFromKey( namespace ),\n\t\tprops.className\n\t);\n\n\t// Provides the ability to customize the render of the component.\n\tconst rendered =\n\t\ttypeof initialMergedProps.renderChildren === 'function'\n\t\t\t? initialMergedProps.renderChildren( initialMergedProps )\n\t\t\t: initialMergedProps.children;\n\n\tfor ( const key in initialMergedProps ) {\n\t\t// @ts-ignore filling in missing props\n\t\tfinalComponentProps[ key ] = initialMergedProps[ key ];\n\t}\n\n\tfor ( const key in overrideProps ) {\n\t\t// @ts-ignore filling in missing props\n\t\tfinalComponentProps[ key ] = overrideProps[ key ];\n\t}\n\n\t// @ts-ignore\n\tfinalComponentProps.children = rendered;\n\tfinalComponentProps.className = classes;\n\n\treturn finalComponentProps;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/ui/context/use-context-system.js"],"names":["useContextSystem","props","namespace","contextSystemProps","contextProps","finalComponentProps","_overrides","overrideProps","otherContextProps","initialMergedProps","Object","entries","length","assign","cx","classes","className","rendered","renderChildren","children","key","undefined"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,gBAAT,CAA2BC,KAA3B,EAAkCC,SAAlC,EAA8C;AACpD,QAAMC,kBAAkB,GAAG,kDAA3B;;AACA,MAAK,OAAOD,SAAP,KAAqB,WAA1B,EAAwC;AACvC,mHAAM,8CAAN;AACA;;AAED,QAAME,YAAY,GAAG,CAAAD,kBAAkB,SAAlB,IAAAA,kBAAkB,WAAlB,YAAAA,kBAAkB,CAAID,SAAJ,CAAlB,KAAqC,EAA1D;AAEA;;AACA;AACA;;AACA,QAAMG,mBAAmB,GAAG,EAC3B,GAAG,mCADwB;AAE3B,OAAG,yBAAcH,SAAd;AAFwB,GAA5B;AAIA;;AAEA,QAAM;AAAEI,IAAAA,UAAU,EAAEC,aAAd;AAA6B,OAAGC;AAAhC,MAAsDJ,YAA5D;AAEA,QAAMK,kBAAkB,GAAGC,MAAM,CAACC,OAAP,CAAgBH,iBAAhB,EAAoCI,MAApC,GACxBF,MAAM,CAACG,MAAP,CAAe,EAAf,EAAmBL,iBAAnB,EAAsCP,KAAtC,CADwB,GAExBA,KAFH;AAIA,QAAMa,EAAE,GAAG,mBAAX;AAEA,QAAMC,OAAO,GAAGD,EAAE,CACjB,0DAA2BZ,SAA3B,CADiB,EAEjBD,KAAK,CAACe,SAFW,CAAlB,CAzBoD,CA8BpD;;AACA,QAAMC,QAAQ,GACb,OAAOR,kBAAkB,CAACS,cAA1B,KAA6C,UAA7C,GACGT,kBAAkB,CAACS,cAAnB,CAAmCT,kBAAnC,CADH,GAEGA,kBAAkB,CAACU,QAHvB;;AAKA,OAAM,MAAMC,GAAZ,IAAmBX,kBAAnB,EAAwC;AACvC;AACAJ,IAAAA,mBAAmB,CAAEe,GAAF,CAAnB,GAA6BX,kBAAkB,CAAEW,GAAF,CAA/C;AACA;;AAED,OAAM,MAAMA,GAAZ,IAAmBb,aAAnB,EAAmC;AAClC;AACAF,IAAAA,mBAAmB,CAAEe,GAAF,CAAnB,GAA6Bb,aAAa,CAAEa,GAAF,CAA1C;AACA,GA5CmD,CA8CpD;AACA;;;AACA,MAAKH,QAAQ,KAAKI,SAAlB,EAA8B;AAC7B;AACAhB,IAAAA,mBAAmB,CAACc,QAApB,GAA+BF,QAA/B;AACA;;AAEDZ,EAAAA,mBAAmB,CAACW,SAApB,GAAgCD,OAAhC;AAEA,SAAOV,mBAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { useComponentsContext } from './context-system-provider';\nimport { getNamespace, getConnectedNamespace } from './utils';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\nimport { useCx } from '../../utils/hooks/use-cx';\n\n/**\n * @template TProps\n * @typedef {TProps & { className: string }} ConnectedProps\n */\n\n/**\n * Custom hook that derives registered props from the Context system.\n * These derived props are then consolidated with incoming component props.\n *\n * @template {{ className?: string }} P\n * @param {P} props Incoming props from the component.\n * @param {string} namespace The namespace to register and to derive context props from.\n * @return {ConnectedProps<P>} The connected props.\n */\nexport function useContextSystem( props, namespace ) {\n\tconst contextSystemProps = useComponentsContext();\n\tif ( typeof namespace === 'undefined' ) {\n\t\twarn( 'useContextSystem: Please provide a namespace' );\n\t}\n\n\tconst contextProps = contextSystemProps?.[ namespace ] || {};\n\n\t/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {ConnectedProps<P>} */\n\t// @ts-ignore We fill in the missing properties below\n\tconst finalComponentProps = {\n\t\t...getConnectedNamespace(),\n\t\t...getNamespace( namespace ),\n\t};\n\t/* eslint-enable jsdoc/no-undefined-types */\n\n\tconst { _overrides: overrideProps, ...otherContextProps } = contextProps;\n\n\tconst initialMergedProps = Object.entries( otherContextProps ).length\n\t\t? Object.assign( {}, otherContextProps, props )\n\t\t: props;\n\n\tconst cx = useCx();\n\n\tconst classes = cx(\n\t\tgetStyledClassNameFromKey( namespace ),\n\t\tprops.className\n\t);\n\n\t// Provides the ability to customize the render of the component.\n\tconst rendered =\n\t\ttypeof initialMergedProps.renderChildren === 'function'\n\t\t\t? initialMergedProps.renderChildren( initialMergedProps )\n\t\t\t: initialMergedProps.children;\n\n\tfor ( const key in initialMergedProps ) {\n\t\t// @ts-ignore filling in missing props\n\t\tfinalComponentProps[ key ] = initialMergedProps[ key ];\n\t}\n\n\tfor ( const key in overrideProps ) {\n\t\t// @ts-ignore filling in missing props\n\t\tfinalComponentProps[ key ] = overrideProps[ key ];\n\t}\n\n\t// Setting an `undefined` explicitly can cause unintended overwrites\n\t// when a `cloneElement()` is involved.\n\tif ( rendered !== undefined ) {\n\t\t// @ts-ignore\n\t\tfinalComponentProps.children = rendered;\n\t}\n\n\tfinalComponentProps.className = classes;\n\n\treturn finalComponentProps;\n}\n"]}
@@ -27,14 +27,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
27
27
 
28
28
  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)."; }
29
29
 
30
- const TooltipContent = /*#__PURE__*/(0, _react.css)("z-index:", ZIndex.Tooltip, ";box-sizing:border-box;opacity:0;outline:none;transform-origin:top center;transition:opacity ", _configValues.default.transitionDurationFastest, " ease;&[data-enter]{opacity:1;}" + (process.env.NODE_ENV === "production" ? "" : ";label:TooltipContent;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdG9vbHRpcC9zdHlsZXMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZWlDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdG9vbHRpcC9zdHlsZXMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IFNob3J0Y3V0IH0gZnJvbSAnLi4vc2hvcnRjdXQnO1xuaW1wb3J0ICogYXMgWkluZGV4IGZyb20gJy4uLy4uL3V0aWxzL3otaW5kZXgnO1xuaW1wb3J0IENPTkZJRyBmcm9tICcuLi8uLi91dGlscy9jb25maWctdmFsdWVzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwQ29udGVudCA9IGNzc2Bcblx0ei1pbmRleDogJHsgWkluZGV4LlRvb2x0aXAgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0b3BhY2l0eTogMDtcblx0b3V0bGluZTogbm9uZTtcblx0dHJhbnNmb3JtLW9yaWdpbjogdG9wIGNlbnRlcjtcblx0dHJhbnNpdGlvbjogb3BhY2l0eSAkeyBDT05GSUcudHJhbnNpdGlvbkR1cmF0aW9uRmFzdGVzdCB9IGVhc2U7XG5cblx0JltkYXRhLWVudGVyXSB7XG5cdFx0b3BhY2l0eTogMTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2x0aXBQb3BvdmVyVmlldyA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQ6IHJnYmEoIDAsIDAsIDAsIDAuOCApO1xuXHRib3JkZXItcmFkaXVzOiAycHg7XG5cdGJveC1zaGFkb3c6IDAgMCAwIDFweCByZ2JhKCAyNTUsIDI1NSwgMjU1LCAwLjA0ICk7XG5cdGNvbG9yOiAkeyBDT0xPUlMud2hpdGUgfTtcblx0cGFkZGluZzogNHB4IDhweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBub091dGxpbmUgPSBjc3NgXG5cdG91dGxpbmU6IG5vbmU7XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcFNob3J0Y3V0ID0gc3R5bGVkKCBTaG9ydGN1dCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdG1hcmdpbi1sZWZ0OiAkeyBzcGFjZSggMSApIH07XG5gO1xuIl19 */");
30
+ const TooltipContent = /*#__PURE__*/(0, _react.css)("z-index:", ZIndex.Tooltip, ";box-sizing:border-box;opacity:0;outline:none;transform-origin:top center;transition:opacity ", _configValues.default.transitionDurationFastest, " ease;font-size:", _configValues.default.fontSize, ";&[data-enter]{opacity:1;}" + (process.env.NODE_ENV === "production" ? "" : ";label:TooltipContent;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdG9vbHRpcC9zdHlsZXMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZWlDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdG9vbHRpcC9zdHlsZXMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IFNob3J0Y3V0IH0gZnJvbSAnLi4vc2hvcnRjdXQnO1xuaW1wb3J0ICogYXMgWkluZGV4IGZyb20gJy4uLy4uL3V0aWxzL3otaW5kZXgnO1xuaW1wb3J0IENPTkZJRyBmcm9tICcuLi8uLi91dGlscy9jb25maWctdmFsdWVzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwQ29udGVudCA9IGNzc2Bcblx0ei1pbmRleDogJHsgWkluZGV4LlRvb2x0aXAgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0b3BhY2l0eTogMDtcblx0b3V0bGluZTogbm9uZTtcblx0dHJhbnNmb3JtLW9yaWdpbjogdG9wIGNlbnRlcjtcblx0dHJhbnNpdGlvbjogb3BhY2l0eSAkeyBDT05GSUcudHJhbnNpdGlvbkR1cmF0aW9uRmFzdGVzdCB9IGVhc2U7XG5cdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cblx0JltkYXRhLWVudGVyXSB7XG5cdFx0b3BhY2l0eTogMTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2x0aXBQb3BvdmVyVmlldyA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQ6IHJnYmEoIDAsIDAsIDAsIDAuOCApO1xuXHRib3JkZXItcmFkaXVzOiAycHg7XG5cdGJveC1zaGFkb3c6IDAgMCAwIDFweCByZ2JhKCAyNTUsIDI1NSwgMjU1LCAwLjA0ICk7XG5cdGNvbG9yOiAkeyBDT0xPUlMud2hpdGUgfTtcblx0cGFkZGluZzogNHB4IDhweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBub091dGxpbmUgPSBjc3NgXG5cdG91dGxpbmU6IG5vbmU7XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcFNob3J0Y3V0ID0gc3R5bGVkKCBTaG9ydGN1dCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdG1hcmdpbi1sZWZ0OiAkeyBzcGFjZSggMSApIH07XG5gO1xuIl19 */");
31
31
  exports.TooltipContent = TooltipContent;
32
32
  const TooltipPopoverView = (0, _base.default)("div", process.env.NODE_ENV === "production" ? {
33
33
  target: "e7tfjmw1"
34
34
  } : {
35
35
  target: "e7tfjmw1",
36
36
  label: "TooltipPopoverView"
37
- })("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-shadow:0 0 0 1px rgba( 255, 255, 255, 0.04 );color:", _colorsValues.COLORS.white, ";padding:4px 8px;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50c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CBjb25zdCBUb29sdGlwUG9wb3ZlclZpZXcgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogMnB4O1xuXHRib3gtc2hhZG93OiAwIDAgMCAxcHggcmdiYSggMjU1LCAyNTUsIDI1NSwgMC4wNCApO1xuXHRjb2xvcjogJHsgQ09MT1JTLndoaXRlIH07XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5gO1xuXG5leHBvcnQgY29uc3Qgbm9PdXRsaW5lID0gY3NzYFxuXHRvdXRsaW5lOiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2x0aXBTaG9ydGN1dCA9IHN0eWxlZCggU2hvcnRjdXQgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIDEgKSB9O1xuYDtcbiJdfQ== */"));
37
+ })("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-shadow:0 0 0 1px rgba( 255, 255, 255, 0.04 );color:", _colorsValues.COLORS.white, ";padding:4px 8px;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdG9vbHRpcC9zdHlsZXMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkI0QyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3VpL3Rvb2x0aXAvc3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1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gY29uc3Qgbm9PdXRsaW5lID0gY3NzYFxuXHRvdXRsaW5lOiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2x0aXBTaG9ydGN1dCA9IHN0eWxlZCggU2hvcnRjdXQgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIDEgKSB9O1xuYDtcbiJdfQ== */"));
38
38
  exports.TooltipPopoverView = TooltipPopoverView;
39
39
  const noOutline = process.env.NODE_ENV === "production" ? {
40
40
  name: "12mkfdx",
@@ -42,7 +42,7 @@ const noOutline = process.env.NODE_ENV === "production" ? {
42
42
  } : {
43
43
  name: "160q0w1-noOutline",
44
44
  styles: "outline:none;label:noOutline;",
45
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdG9vbHRpcC9zdHlsZXMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0M0QiIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3VpL3Rvb2x0aXAvc3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBTaG9ydGN1dCB9IGZyb20gJy4uL3Nob3J0Y3V0JztcbmltcG9ydCAqIGFzIFpJbmRleCBmcm9tICcuLi8uLi91dGlscy96LWluZGV4JztcbmltcG9ydCBDT05GSUcgZnJvbSAnLi4vLi4vdXRpbHMvY29uZmlnLXZhbHVlcyc7XG5pbXB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JRy5mb250U2l6ZSB9O1xuXG5cdCZbZGF0YS1lbnRlcl0ge1xuXHRcdG9wYWNpdHk6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwUG9wb3ZlclZpZXcgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogMnB4O1xuXHRib3gtc2hhZG93OiAwIDAgMCAxcHggcmdiYSggMjU1LCAyNTUsIDI1NSwgMC4wNCApO1xuXHRjb2xvcjogJHsgQ09MT1JTLndoaXRlIH07XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5gO1xuXG5leHBvcnQgY29uc3Qgbm9PdXRsaW5lID0gY3NzYFxuXHRvdXRsaW5lOiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2x0aXBTaG9ydGN1dCA9IHN0eWxlZCggU2hvcnRjdXQgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIDEgKSB9O1xuYDtcbiJdfQ== */",
46
46
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
47
47
  };
48
48
  exports.noOutline = noOutline;
@@ -51,6 +51,6 @@ const TooltipShortcut = ( /*#__PURE__*/0, _base.default)(_shortcut.Shortcut, pro
51
51
  } : {
52
52
  target: "e7tfjmw0",
53
53
  label: "TooltipShortcut"
54
- })("display:inline-block;margin-left:", (0, _space.space)(1), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdG9vbHRpcC9zdHlsZXMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBd0NpRCIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3VpL3Rvb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4O1xuXHRib3gtc2hhZG93OiAwIDAgMCAxcHggcmdiYSggMjU1LCAyNTUsIDI1NSwgMC4wNCApO1xuXHRjb2xvcjogJHsgQ09MT1JTLndoaXRlIH07XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5gO1xuXG5leHBvcnQgY29uc3Qgbm9PdXRsaW5lID0gY3NzYFxuXHRvdXRsaW5lOiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2x0aXBTaG9ydGN1dCA9IHN0eWxlZCggU2hvcnRjdXQgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIDEgKSB9O1xuYDtcbiJdfQ== */"));
54
+ })("display:inline-block;margin-left:", (0, _space.space)(1), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdG9vbHRpcC9zdHlsZXMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUNpRCIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3VpL3Rvb2x0aXAvc3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBTaG9ydGN1dCB9IGZyb20gJy4uL3Nob3J0Y3V0JztcbmltcG9ydCAqIGFzIFpJbmRleCBmcm9tICcuLi8uLi91dGlscy96LWluZGV4JztcbmltcG9ydCBDT05GSUcgZnJvbSAnLi4vLi4vdX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UoIDEgKSB9O1xuYDtcbiJdfQ== */"));
55
55
  exports.TooltipShortcut = TooltipShortcut;
56
56
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/tooltip/styles.js"],"names":["TooltipContent","css","ZIndex","Tooltip","CONFIG","transitionDurationFastest","TooltipPopoverView","COLORS","white","noOutline","TooltipShortcut","Shortcut"],"mappings":";;;;;;;;;;;AAGA;;AAMA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEO,MAAMA,cAAc,oBAAGC,UAAH,cACdC,MAAM,CAACC,OADO,mGAMHC,sBAAOC,yBANJ,80DAApB;;AAaA,MAAMC,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA,gHAIpBC,qBAAOC,KAJa,6vDAAxB;;AAQA,MAAMC,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAf;;AAIA,MAAMC,eAAe,GAAG,iCAAQC,kBAAR;AAAA;AAAA;AAAA;AAAA;AAAA,EAAH,sCAEX,kBAAO,CAAP,CAFW,6uDAArB","sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Shortcut } from '../shortcut';\nimport * as ZIndex from '../../utils/z-index';\nimport CONFIG from '../../utils/config-values';\nimport { space } from '../utils/space';\nimport { COLORS } from '../../utils/colors-values';\n\nexport const TooltipContent = css`\n\tz-index: ${ ZIndex.Tooltip };\n\tbox-sizing: border-box;\n\topacity: 0;\n\toutline: none;\n\ttransform-origin: top center;\n\ttransition: opacity ${ CONFIG.transitionDurationFastest } ease;\n\n\t&[data-enter] {\n\t\topacity: 1;\n\t}\n`;\n\nexport const TooltipPopoverView = styled.div`\n\tbackground: rgba( 0, 0, 0, 0.8 );\n\tborder-radius: 2px;\n\tbox-shadow: 0 0 0 1px rgba( 255, 255, 255, 0.04 );\n\tcolor: ${ COLORS.white };\n\tpadding: 4px 8px;\n`;\n\nexport const noOutline = css`\n\toutline: none;\n`;\n\nexport const TooltipShortcut = styled( Shortcut )`\n\tdisplay: inline-block;\n\tmargin-left: ${ space( 1 ) };\n`;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/ui/tooltip/styles.js"],"names":["TooltipContent","css","ZIndex","Tooltip","CONFIG","transitionDurationFastest","fontSize","TooltipPopoverView","COLORS","white","noOutline","TooltipShortcut","Shortcut"],"mappings":";;;;;;;;;;;AAGA;;AAMA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEO,MAAMA,cAAc,oBAAGC,UAAH,cACdC,MAAM,CAACC,OADO,mGAMHC,sBAAOC,yBANJ,sBAOZD,sBAAOE,QAPK,y3DAApB;;AAcA,MAAMC,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA,gHAIpBC,qBAAOC,KAJa,6yDAAxB;;AAQA,MAAMC,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAf;;AAIA,MAAMC,eAAe,GAAG,iCAAQC,kBAAR;AAAA;AAAA;AAAA;AAAA;AAAA,EAAH,sCAEX,kBAAO,CAAP,CAFW,6xDAArB","sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Shortcut } from '../shortcut';\nimport * as ZIndex from '../../utils/z-index';\nimport CONFIG from '../../utils/config-values';\nimport { space } from '../utils/space';\nimport { COLORS } from '../../utils/colors-values';\n\nexport const TooltipContent = css`\n\tz-index: ${ ZIndex.Tooltip };\n\tbox-sizing: border-box;\n\topacity: 0;\n\toutline: none;\n\ttransform-origin: top center;\n\ttransition: opacity ${ CONFIG.transitionDurationFastest } ease;\n\tfont-size: ${ CONFIG.fontSize };\n\n\t&[data-enter] {\n\t\topacity: 1;\n\t}\n`;\n\nexport const TooltipPopoverView = styled.div`\n\tbackground: rgba( 0, 0, 0, 0.8 );\n\tborder-radius: 2px;\n\tbox-shadow: 0 0 0 1px rgba( 255, 255, 255, 0.04 );\n\tcolor: ${ COLORS.white };\n\tpadding: 4px 8px;\n`;\n\nexport const noOutline = css`\n\toutline: none;\n`;\n\nexport const TooltipShortcut = styled( Shortcut )`\n\tdisplay: inline-block;\n\tmargin-left: ${ space( 1 ) };\n`;\n"]}
@@ -6,7 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.space = space;
7
7
 
8
8
  /**
9
- * A real number or something parsable as a number
9
+ * The argument value for the `space()` utility function.
10
+ *
11
+ * When this is a number or a numeric string, it will be interpreted as a
12
+ * multiplier for the grid base value (4px). For example, `space( 2 )` will be 8px.
13
+ *
14
+ * Otherwise, it will be interpreted as a literal CSS length value. For example,
15
+ * `space( 'auto' )` will be 'auto', and `space( '2px' )` will be 2px.
10
16
  */
11
17
  const GRID_BASE = '4px';
12
18
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/utils/space.ts"],"names":["GRID_BASE","space","value","undefined","asInt","Number","window","CSS","supports","toString","isNaN"],"mappings":";;;;;;;AAAA;AACA;AACA;AAGA,MAAMA,SAAS,GAAG,KAAlB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,SAASC,KAAT,CAAgBC,KAAhB,EAAyD;AAAA;;AAC/D,MAAK,OAAOA,KAAP,KAAiB,WAAtB,EAAoC;AACnC,WAAOC,SAAP;AACA,GAH8D,CAK/D;;;AACA,MAAK,CAAED,KAAP,EAAe;AACd,WAAO,GAAP;AACA;;AAED,QAAME,KAAK,GAAG,OAAOF,KAAP,KAAiB,QAAjB,GAA4BA,KAA5B,GAAoCG,MAAM,CAAEH,KAAF,CAAxD,CAV+D,CAY/D;;AACA,MACG,OAAOI,MAAP,KAAkB,WAAlB,mBACDA,MAAM,CAACC,GADN,gEACD,YAAYC,QADX,iDACD,uCAAwB,QAAxB,EAAkCN,KAAK,CAACO,QAAN,EAAlC,CADD,IAEAJ,MAAM,CAACK,KAAP,CAAcN,KAAd,CAHD,EAIE;AACD,WAAOF,KAAK,CAACO,QAAN,EAAP;AACA;;AAED,SAAQ,QAAQT,SAAW,MAAME,KAAO,GAAxC;AACA","sourcesContent":["/**\n * A real number or something parsable as a number\n */\nexport type SpaceInput = number | string;\n\nconst GRID_BASE = '4px';\n\n/**\n * A function that handles numbers, numeric strings, and unit values.\n *\n * When given a number or a numeric string, it will return the grid-based\n * value as a factor of GRID_BASE, defined above.\n *\n * When given a unit value or one of the named CSS values like `auto`,\n * it will simply return the value back.\n *\n * @param value A number, numeric string, or a unit value.\n */\nexport function space( value?: SpaceInput ): string | undefined {\n\tif ( typeof value === 'undefined' ) {\n\t\treturn undefined;\n\t}\n\n\t// Handle empty strings, if it's the number 0 this still works.\n\tif ( ! value ) {\n\t\treturn '0';\n\t}\n\n\tconst asInt = typeof value === 'number' ? value : Number( value );\n\n\t// Test if the input has a unit, was NaN, or was one of the named CSS values (like `auto`), in which case just use that value.\n\tif (\n\t\t( typeof window !== 'undefined' &&\n\t\t\twindow.CSS?.supports?.( 'margin', value.toString() ) ) ||\n\t\tNumber.isNaN( asInt )\n\t) {\n\t\treturn value.toString();\n\t}\n\n\treturn `calc(${ GRID_BASE } * ${ value })`;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/ui/utils/space.ts"],"names":["GRID_BASE","space","value","undefined","asInt","Number","window","CSS","supports","toString","isNaN"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAMA,SAAS,GAAG,KAAlB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,SAASC,KAAT,CAAgBC,KAAhB,EAAyD;AAAA;;AAC/D,MAAK,OAAOA,KAAP,KAAiB,WAAtB,EAAoC;AACnC,WAAOC,SAAP;AACA,GAH8D,CAK/D;;;AACA,MAAK,CAAED,KAAP,EAAe;AACd,WAAO,GAAP;AACA;;AAED,QAAME,KAAK,GAAG,OAAOF,KAAP,KAAiB,QAAjB,GAA4BA,KAA5B,GAAoCG,MAAM,CAAEH,KAAF,CAAxD,CAV+D,CAY/D;;AACA,MACG,OAAOI,MAAP,KAAkB,WAAlB,mBACDA,MAAM,CAACC,GADN,gEACD,YAAYC,QADX,iDACD,uCAAwB,QAAxB,EAAkCN,KAAK,CAACO,QAAN,EAAlC,CADD,IAEAJ,MAAM,CAACK,KAAP,CAAcN,KAAd,CAHD,EAIE;AACD,WAAOF,KAAK,CAACO,QAAN,EAAP;AACA;;AAED,SAAQ,QAAQT,SAAW,MAAME,KAAO,GAAxC;AACA","sourcesContent":["/**\n * The argument value for the `space()` utility function.\n *\n * When this is a number or a numeric string, it will be interpreted as a\n * multiplier for the grid base value (4px). For example, `space( 2 )` will be 8px.\n *\n * Otherwise, it will be interpreted as a literal CSS length value. For example,\n * `space( 'auto' )` will be 'auto', and `space( '2px' )` will be 2px.\n */\nexport type SpaceInput = number | string;\n\nconst GRID_BASE = '4px';\n\n/**\n * A function that handles numbers, numeric strings, and unit values.\n *\n * When given a number or a numeric string, it will return the grid-based\n * value as a factor of GRID_BASE, defined above.\n *\n * When given a unit value or one of the named CSS values like `auto`,\n * it will simply return the value back.\n *\n * @param value A number, numeric string, or a unit value.\n */\nexport function space( value?: SpaceInput ): string | undefined {\n\tif ( typeof value === 'undefined' ) {\n\t\treturn undefined;\n\t}\n\n\t// Handle empty strings, if it's the number 0 this still works.\n\tif ( ! value ) {\n\t\treturn '0';\n\t}\n\n\tconst asInt = typeof value === 'number' ? value : Number( value );\n\n\t// Test if the input has a unit, was NaN, or was one of the named CSS values (like `auto`), in which case just use that value.\n\tif (\n\t\t( typeof window !== 'undefined' &&\n\t\t\twindow.CSS?.supports?.( 'margin', value.toString() ) ) ||\n\t\tNumber.isNaN( asInt )\n\t) {\n\t\treturn value.toString();\n\t}\n\n\treturn `calc(${ GRID_BASE } * ${ value })`;\n}\n"]}
@@ -23,8 +23,6 @@ var _element = require("@wordpress/element");
23
23
 
24
24
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
25
25
 
26
- var _lodash = require("lodash");
27
-
28
26
  var _classnames = _interopRequireDefault(require("classnames"));
29
27
 
30
28
  var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
@@ -56,6 +54,7 @@ function UnforwardedUnitControl(unitControlProps, forwardedRef) {
56
54
  const {
57
55
  __unstableStateReducer: stateReducerProp,
58
56
  autoComplete = 'off',
57
+ children,
59
58
  className,
60
59
  disabled = false,
61
60
  disableUnits = false,
@@ -236,7 +235,7 @@ function UnforwardedUnitControl(unitControlProps, forwardedRef) {
236
235
  }, (0, _element.createElement)(_unitControlStyles.ValueInput, (0, _extends2.default)({
237
236
  "aria-label": label,
238
237
  type: isPressEnterToChange ? 'text' : 'number'
239
- }, (0, _lodash.omit)(props, ['children']), {
238
+ }, props, {
240
239
  autoComplete: autoComplete,
241
240
  className: classes,
242
241
  disabled: disabled,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/unit-control/index.tsx"],"names":["UnforwardedUnitControl","unitControlProps","forwardedRef","__unstableStateReducer","stateReducerProp","autoComplete","className","disabled","disableUnits","isPressEnterToChange","isResetValueOnUnitChange","isUnitSelectTabbable","label","onChange","onChangeProp","onUnitChange","size","style","unit","unitProp","units","unitsProp","CSS_UNITS","value","valueProp","onBlur","onBlurProp","props","since","hint","version","nonNullValueProp","undefined","parsedQuantity","parsedUnit","setUnit","length","initial","fallback","refParsedQuantity","classes","handleOnQuantityChange","nextQuantityValue","changeProps","onChangeValue","join","handleOnUnitChange","nextUnitValue","data","nextValue","default","mayUpdateUnit","event","isNaN","Number","currentTarget","current","validParsedQuantity","validParsedUnit","Array","isArray","find","option","handleOnBlur","handleOnKeyDown","key","unitControlStateReducer","state","action","nextState","type","inputControlActionTypes","COMMIT","toString","stateReducer","baseState","inputSuffix","step","activeUnit","UnitControl"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkBA;;;;AAPA;;AACA;;AAKA;;AAEA;;A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AQ,EAAGvB,sBAZZ;AAaC,IAAA,GAAG,EAAGvC,YAbP;AAcC,IAAA,IAAI,EAAGc,IAdR;AAeC,IAAA,MAAM,EAAG4D,WAfV;AAgBC,IAAA,KAAK,EAAG3C,cAAH,aAAGA,cAAH,cAAGA,cAAH,GAAqB,EAhB3B;AAiBC,IAAA,IAAI,EAAG4C,IAjBR;AAkBC,IAAA,sBAAsB,EAAGH;AAlB1B,KADD,CADD;AAwBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMK,WAAW,GAAG,yBAAY/E,sBAAZ,CAApB;;eAGQ+E,W","sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tFocusEventHandler,\n\tKeyboardEvent,\n\tForwardedRef,\n\tSyntheticEvent,\n\tChangeEvent,\n\tPointerEvent,\n} from 'react';\nimport { omit } from 'lodash';\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 '../ui/context';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { Root, 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 type { UnitControlProps, UnitControlOnChangeCallback } from './types';\nimport type { StateReducer } from '../input-control/reducer/state';\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: stateReducerProp,\n\t\tautoComplete = 'off',\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\tstyle,\n\t\tunit: unitProp,\n\t\tunits: unitsProp = CSS_UNITS,\n\t\tvalue: valueProp,\n\t\tonBlur: onBlurProp,\n\t\t...props\n\t} = 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 = useMemo(\n\t\t() => getUnitsWithCurrentUnit( nonNullValueProp, unitProp, unitsProp ),\n\t\t[ nonNullValueProp, unitProp, unitsProp ]\n\t);\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 ] );\n\n\t// Stores parsed value for hand-off in state reducer.\n\tconst refParsedQuantity = useRef< number | undefined >( undefined );\n\n\tconst classes = classnames( 'components-unit-control', className );\n\n\tconst handleOnQuantityChange = (\n\t\tnextQuantityValue: number | string | undefined,\n\t\tchangeProps: {\n\t\t\tevent:\n\t\t\t\t| ChangeEvent< HTMLInputElement >\n\t\t\t\t| PointerEvent< HTMLInputElement >;\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\tconst mayUpdateUnit = ( event: SyntheticEvent< HTMLInputElement > ) => {\n\t\tif ( ! isNaN( Number( event.currentTarget.value ) ) ) {\n\t\t\trefParsedQuantity.current = undefined;\n\t\t\treturn;\n\t\t}\n\t\tconst [ validParsedQuantity, validParsedUnit ] =\n\t\t\tgetValidParsedQuantityAndUnit(\n\t\t\t\tevent.currentTarget.value,\n\t\t\t\tunits,\n\t\t\t\tparsedQuantity,\n\t\t\t\tunit\n\t\t\t);\n\n\t\trefParsedQuantity.current = validParsedQuantity;\n\n\t\tif ( isPressEnterToChange && validParsedUnit !== unit ) {\n\t\t\tconst data = Array.isArray( units )\n\t\t\t\t? units.find( ( option ) => option.value === validParsedUnit )\n\t\t\t\t: undefined;\n\t\t\tconst changeProps = { event, data };\n\n\t\t\t// The `onChange` callback already gets called, no need to call it explicitely.\n\t\t\tonUnitChange?.( validParsedUnit, changeProps );\n\n\t\t\tsetUnit( validParsedUnit );\n\t\t}\n\t};\n\n\tconst handleOnBlur: FocusEventHandler< HTMLInputElement > = ( event ) => {\n\t\tmayUpdateUnit( event );\n\t\tonBlurProp?.( event );\n\t};\n\n\tconst handleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\tconst { key } = event;\n\t\tif ( key === 'Enter' ) {\n\t\t\tmayUpdateUnit( event );\n\t\t}\n\t};\n\n\t/**\n\t * \"Middleware\" function that intercepts updates from InputControl.\n\t * This allows us to tap into actions to transform the (next) state for\n\t * InputControl.\n\t *\n\t * @param state State from InputControl\n\t * @param action Action triggering state change\n\t * @return The updated state to apply to InputControl\n\t */\n\tconst unitControlStateReducer: StateReducer = ( state, action ) => {\n\t\tconst nextState = { ...state };\n\n\t\t/*\n\t\t * On commits (when pressing ENTER and on blur if\n\t\t * isPressEnterToChange is true), if a parse has been performed\n\t\t * then use that result to update the state.\n\t\t */\n\t\tif ( action.type === inputControlActionTypes.COMMIT ) {\n\t\t\tif ( refParsedQuantity.current !== undefined ) {\n\t\t\t\tnextState.value = (\n\t\t\t\t\trefParsedQuantity.current ?? ''\n\t\t\t\t).toString();\n\t\t\t\trefParsedQuantity.current = undefined;\n\t\t\t}\n\t\t}\n\n\t\treturn nextState;\n\t};\n\n\tlet stateReducer: StateReducer = unitControlStateReducer;\n\tif ( stateReducerProp ) {\n\t\tstateReducer = ( state, action ) => {\n\t\t\tconst baseState = unitControlStateReducer( state, action );\n\t\t\treturn stateReducerProp( baseState, action );\n\t\t};\n\t}\n\n\tconst inputSuffix = ! disableUnits ? (\n\t\t<UnitSelectControl\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={ size }\n\t\t\tunit={ unit }\n\t\t\tunits={ units }\n\t\t\tonBlur={ onBlurProp }\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<Root className=\"components-unit-control-wrapper\" style={ style }>\n\t\t\t<ValueInput\n\t\t\t\taria-label={ label }\n\t\t\t\ttype={ isPressEnterToChange ? 'text' : 'number' }\n\t\t\t\t{ ...omit( props, [ 'children' ] ) }\n\t\t\t\tautoComplete={ autoComplete }\n\t\t\t\tclassName={ classes }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tdisableUnits={ disableUnits }\n\t\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\t\tlabel={ label }\n\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\t\tonChange={ handleOnQuantityChange }\n\t\t\t\tref={ forwardedRef }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ inputSuffix }\n\t\t\t\tvalue={ parsedQuantity ?? '' }\n\t\t\t\tstep={ step }\n\t\t\t\t__unstableStateReducer={ stateReducer }\n\t\t\t/>\n\t\t</Root>\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 * @example\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"]}
1
+ {"version":3,"sources":["@wordpress/components/src/unit-control/index.tsx"],"names":["UnforwardedUnitControl","unitControlProps","forwardedRef","__unstableStateReducer","stateReducerProp","autoComplete","children","className","disabled","disableUnits","isPressEnterToChange","isResetValueOnUnitChange","isUnitSelectTabbable","label","onChange","onChangeProp","onUnitChange","size","style","unit","unitProp","units","unitsProp","CSS_UNITS","value","valueProp","onBlur","onBlurProp","props","since","hint","version","nonNullValueProp","undefined","parsedQuantity","parsedUnit","setUnit","length","initial","fallback","refParsedQuantity","classes","handleOnQuantityChange","nextQuantityValue","changeProps","onChangeValue","join","handleOnUnitChange","nextUnitValue","data","nextValue","default","mayUpdateUnit","event","isNaN","Number","currentTarget","current","validParsedQuantity","validParsedUnit","Array","isArray","find","option","handleOnBlur","handleOnKeyDown","key","unitControlStateReducer","state","action","nextState","type","inputControlActionTypes","COMMIT","toString","stateReducer","baseState","inputSuffix","step","activeUnit","UnitControl"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiBA;;;;AANA;;AAKA;;AAEA;;AAMA;;AACA;;AACA;;AACA;;AAMA;;;;;;AAjCA;AACA;AACA;;AAWA;AACA;AACA;AAsBA,SAASA,sBAAT,CACCC,gBADD,EAMCC,YAND,EAOE;AACD,QAAM;AACLC,IAAAA,sBAAsB,EAAEC,gBADnB;AAELC,IAAAA,YAAY,GAAG,KAFV;AAGLC,IAAAA,QAHK;AAILC,IAAAA,SAJK;AAKLC,IAAAA,QAAQ,GAAG,KALN;AAMLC,IAAAA,YAAY,GAAG,KANV;AAOLC,IAAAA,oBAAoB,GAAG,KAPlB;AAQLC,IAAAA,wBAAwB,GAAG,KARtB;AASLC,IAAAA,oBAAoB,GAAG,IATlB;AAULC,IAAAA,KAVK;AAWLC,IAAAA,QAAQ,EAAEC,YAXL;AAYLC,IAAAA,YAZK;AAaLC,IAAAA,IAAI,GAAG,SAbF;AAcLC,IAAAA,KAdK;AAeLC,IAAAA,IAAI,EAAEC,QAfD;AAgBLC,IAAAA,KAAK,EAAEC,SAAS,GAAGC,gBAhBd;AAiBLC,IA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,IAA3C,CAAnB;AACA2D,IAAAA,IAAI,uBAAGC,UAAH,aAAGA,UAAH,uBAAGA,UAAU,CAAED,IAAf,+DAAuB,CAA3B;AACA;;AAED,SACC,4BAAC,uBAAD;AAAM,IAAA,SAAS,EAAC,iCAAhB;AAAkD,IAAA,KAAK,EAAG5D;AAA1D,KACC,4BAAC,6BAAD;AACC,kBAAaL,KADd;AAEC,IAAA,IAAI,EAAGH,oBAAoB,GAAG,MAAH,GAAY;AAFxC,KAGMkB,KAHN;AAIC,IAAA,YAAY,EAAGvB,YAJhB;AAKC,IAAA,SAAS,EAAGoC,OALb;AAMC,IAAA,QAAQ,EAAGjC,QANZ;AAOC,IAAA,YAAY,EAAGC,YAPhB;AAQC,IAAA,oBAAoB,EAAGC,oBARxB;AASC,IAAA,KAAK,EAAGG,KATT;AAUC,IAAA,MAAM,EAAGmD,YAVV;AAWC,IAAA,SAAS,EAAGC,eAXb;AAYC,IAAA,QAAQ,EAAGvB,sBAZZ;AAaC,IAAA,GAAG,EAAGxC,YAbP;AAcC,IAAA,IAAI,EAAGe,IAdR;AAeC,IAAA,MAAM,EAAG4D,WAfV;AAgBC,IAAA,KAAK,EAAG3C,cAAH,aAAGA,cAAH,cAAGA,cAAH,GAAqB,EAhB3B;AAiBC,IAAA,IAAI,EAAG4C,IAjBR;AAkBC,IAAA,sBAAsB,EAAGH;AAlB1B,KADD,CADD;AAwBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMK,WAAW,GAAG,yBAAYhF,sBAAZ,CAApB;;eAGQgF,W","sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tFocusEventHandler,\n\tKeyboardEvent,\n\tForwardedRef,\n\tSyntheticEvent,\n\tChangeEvent,\n\tPointerEvent,\n} 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 '../ui/context';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { Root, 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 type { UnitControlProps, UnitControlOnChangeCallback } from './types';\nimport type { StateReducer } from '../input-control/reducer/state';\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: stateReducerProp,\n\t\tautoComplete = 'off',\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\tstyle,\n\t\tunit: unitProp,\n\t\tunits: unitsProp = CSS_UNITS,\n\t\tvalue: valueProp,\n\t\tonBlur: onBlurProp,\n\t\t...props\n\t} = 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 = useMemo(\n\t\t() => getUnitsWithCurrentUnit( nonNullValueProp, unitProp, unitsProp ),\n\t\t[ nonNullValueProp, unitProp, unitsProp ]\n\t);\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 ] );\n\n\t// Stores parsed value for hand-off in state reducer.\n\tconst refParsedQuantity = useRef< number | undefined >( undefined );\n\n\tconst classes = classnames( 'components-unit-control', className );\n\n\tconst handleOnQuantityChange = (\n\t\tnextQuantityValue: number | string | undefined,\n\t\tchangeProps: {\n\t\t\tevent:\n\t\t\t\t| ChangeEvent< HTMLInputElement >\n\t\t\t\t| PointerEvent< HTMLInputElement >;\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\tconst mayUpdateUnit = ( event: SyntheticEvent< HTMLInputElement > ) => {\n\t\tif ( ! isNaN( Number( event.currentTarget.value ) ) ) {\n\t\t\trefParsedQuantity.current = undefined;\n\t\t\treturn;\n\t\t}\n\t\tconst [ validParsedQuantity, validParsedUnit ] =\n\t\t\tgetValidParsedQuantityAndUnit(\n\t\t\t\tevent.currentTarget.value,\n\t\t\t\tunits,\n\t\t\t\tparsedQuantity,\n\t\t\t\tunit\n\t\t\t);\n\n\t\trefParsedQuantity.current = validParsedQuantity;\n\n\t\tif ( isPressEnterToChange && validParsedUnit !== unit ) {\n\t\t\tconst data = Array.isArray( units )\n\t\t\t\t? units.find( ( option ) => option.value === validParsedUnit )\n\t\t\t\t: undefined;\n\t\t\tconst changeProps = { event, data };\n\n\t\t\t// The `onChange` callback already gets called, no need to call it explicitely.\n\t\t\tonUnitChange?.( validParsedUnit, changeProps );\n\n\t\t\tsetUnit( validParsedUnit );\n\t\t}\n\t};\n\n\tconst handleOnBlur: FocusEventHandler< HTMLInputElement > = ( event ) => {\n\t\tmayUpdateUnit( event );\n\t\tonBlurProp?.( event );\n\t};\n\n\tconst handleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\tconst { key } = event;\n\t\tif ( key === 'Enter' ) {\n\t\t\tmayUpdateUnit( event );\n\t\t}\n\t};\n\n\t/**\n\t * \"Middleware\" function that intercepts updates from InputControl.\n\t * This allows us to tap into actions to transform the (next) state for\n\t * InputControl.\n\t *\n\t * @param state State from InputControl\n\t * @param action Action triggering state change\n\t * @return The updated state to apply to InputControl\n\t */\n\tconst unitControlStateReducer: StateReducer = ( state, action ) => {\n\t\tconst nextState = { ...state };\n\n\t\t/*\n\t\t * On commits (when pressing ENTER and on blur if\n\t\t * isPressEnterToChange is true), if a parse has been performed\n\t\t * then use that result to update the state.\n\t\t */\n\t\tif ( action.type === inputControlActionTypes.COMMIT ) {\n\t\t\tif ( refParsedQuantity.current !== undefined ) {\n\t\t\t\tnextState.value = (\n\t\t\t\t\trefParsedQuantity.current ?? ''\n\t\t\t\t).toString();\n\t\t\t\trefParsedQuantity.current = undefined;\n\t\t\t}\n\t\t}\n\n\t\treturn nextState;\n\t};\n\n\tlet stateReducer: StateReducer = unitControlStateReducer;\n\tif ( stateReducerProp ) {\n\t\tstateReducer = ( state, action ) => {\n\t\t\tconst baseState = unitControlStateReducer( state, action );\n\t\t\treturn stateReducerProp( baseState, action );\n\t\t};\n\t}\n\n\tconst inputSuffix = ! disableUnits ? (\n\t\t<UnitSelectControl\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={ size }\n\t\t\tunit={ unit }\n\t\t\tunits={ units }\n\t\t\tonBlur={ onBlurProp }\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<Root className=\"components-unit-control-wrapper\" style={ style }>\n\t\t\t<ValueInput\n\t\t\t\taria-label={ label }\n\t\t\t\ttype={ isPressEnterToChange ? 'text' : 'number' }\n\t\t\t\t{ ...props }\n\t\t\t\tautoComplete={ autoComplete }\n\t\t\t\tclassName={ classes }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tdisableUnits={ disableUnits }\n\t\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\t\tlabel={ label }\n\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\t\tonChange={ handleOnQuantityChange }\n\t\t\t\tref={ forwardedRef }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ inputSuffix }\n\t\t\t\tvalue={ parsedQuantity ?? '' }\n\t\t\t\tstep={ step }\n\t\t\t\t__unstableStateReducer={ stateReducer }\n\t\t\t/>\n\t\t</Root>\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 * @example\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"]}