@wordpress/components 28.3.0 → 28.5.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 (1233) hide show
  1. package/CHANGELOG.md +70 -1
  2. package/CONTRIBUTING.md +1 -1
  3. package/build/autocomplete/autocompleter-ui.js +2 -0
  4. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  5. package/build/autocomplete/types.js.map +1 -1
  6. package/build/base-control/styles/base-control-styles.js +8 -8
  7. package/build/base-control/styles/base-control-styles.js.map +1 -1
  8. package/build/base-control/types.js.map +1 -1
  9. package/build/border-control/styles.js +18 -24
  10. package/build/border-control/styles.js.map +1 -1
  11. package/build/button/index.js +9 -7
  12. package/build/button/index.js.map +1 -1
  13. package/build/button/types.js.map +1 -1
  14. package/build/checkbox-control/index.js +1 -0
  15. package/build/checkbox-control/index.js.map +1 -1
  16. package/build/color-palette/index.js +1 -1
  17. package/build/color-palette/index.js.map +1 -1
  18. package/build/color-picker/component.js +8 -17
  19. package/build/color-picker/component.js.map +1 -1
  20. package/build/combobox-control/index.js +9 -0
  21. package/build/combobox-control/index.js.map +1 -1
  22. package/build/custom-select-control/index.js +141 -167
  23. package/build/custom-select-control/index.js.map +1 -1
  24. package/build/custom-select-control/types.js +6 -0
  25. package/build/custom-select-control/types.js.map +1 -0
  26. package/build/custom-select-control-v2/custom-select.js +4 -1
  27. package/build/custom-select-control-v2/custom-select.js.map +1 -1
  28. package/build/custom-select-control-v2/index.js +35 -7
  29. package/build/custom-select-control-v2/index.js.map +1 -1
  30. package/build/custom-select-control-v2/styles.js +25 -9
  31. package/build/custom-select-control-v2/styles.js.map +1 -1
  32. package/build/custom-select-control-v2/types.js.map +1 -1
  33. package/build/date-time/index.js +0 -7
  34. package/build/date-time/index.js.map +1 -1
  35. package/build/date-time/time/index.js +66 -38
  36. package/build/date-time/time/index.js.map +1 -1
  37. package/build/date-time/time/styles.js +11 -11
  38. package/build/date-time/time/styles.js.map +1 -1
  39. package/build/date-time/{time-input → time/time-input}/index.js +7 -7
  40. package/build/date-time/time/time-input/index.js.map +1 -0
  41. package/build/dropdown-menu-v2/styles.js +14 -14
  42. package/build/dropdown-menu-v2/styles.js.map +1 -1
  43. package/build/focal-point-picker/index.js +1 -0
  44. package/build/focal-point-picker/index.js.map +1 -1
  45. package/build/font-size-picker/font-size-picker-select.js +4 -4
  46. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  47. package/build/font-size-picker/index.js +36 -24
  48. package/build/font-size-picker/index.js.map +1 -1
  49. package/build/font-size-picker/types.js.map +1 -1
  50. package/build/form-toggle/index.js +24 -24
  51. package/build/form-toggle/index.js.map +1 -1
  52. package/build/form-token-field/index.js +8 -0
  53. package/build/form-token-field/index.js.map +1 -1
  54. package/build/guide/index.js +2 -0
  55. package/build/guide/index.js.map +1 -1
  56. package/build/heading/types.js.map +1 -1
  57. package/build/index.js +2 -2
  58. package/build/index.js.map +1 -1
  59. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  60. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  61. package/build/modal/index.js +18 -11
  62. package/build/modal/index.js.map +1 -1
  63. package/build/private-apis.js +0 -4
  64. package/build/private-apis.js.map +1 -1
  65. package/build/query-controls/index.js +1 -1
  66. package/build/query-controls/index.js.map +1 -1
  67. package/build/radio-control/index.js +34 -7
  68. package/build/radio-control/index.js.map +1 -1
  69. package/build/radio-control/types.js.map +1 -1
  70. package/build/range-control/index.js +1 -0
  71. package/build/range-control/index.js.map +1 -1
  72. package/build/select-control/index.js +25 -8
  73. package/build/select-control/index.js.map +1 -1
  74. package/build/select-control/styles/select-control-styles.js +42 -11
  75. package/build/select-control/styles/select-control-styles.js.map +1 -1
  76. package/build/select-control/types.js.map +1 -1
  77. package/build/tabs/styles.js +3 -3
  78. package/build/tabs/styles.js.map +1 -1
  79. package/build/tabs/tablist.js +4 -189
  80. package/build/tabs/tablist.js.map +1 -1
  81. package/build/text-control/index.js +1 -0
  82. package/build/text-control/index.js.map +1 -1
  83. package/build/textarea-control/index.js +1 -0
  84. package/build/textarea-control/index.js.map +1 -1
  85. package/build/toggle-control/index.js +36 -28
  86. package/build/toggle-control/index.js.map +1 -1
  87. package/build/toggle-group-control/toggle-group-control/component.js +6 -1
  88. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  89. package/build/toggle-group-control/toggle-group-control-option/component.js +6 -1
  90. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  91. package/build/toggle-group-control/toggle-group-control-option-base/component.js +3 -0
  92. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  93. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  94. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  95. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +14 -14
  96. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  97. package/build/tools-panel/tools-panel-header/component.js +1 -1
  98. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  99. package/build/tooltip/index.js +12 -1
  100. package/build/tooltip/index.js.map +1 -1
  101. package/build/tree-select/index.js +1 -1
  102. package/build/tree-select/index.js.map +1 -1
  103. package/build/utils/config-values.js +6 -0
  104. package/build/utils/config-values.js.map +1 -1
  105. package/build/utils/element-rect.js +157 -0
  106. package/build/utils/element-rect.js.map +1 -0
  107. package/build/utils/hooks/use-event.js +41 -0
  108. package/build/utils/hooks/use-event.js.map +1 -0
  109. package/build/utils/hooks/use-on-value-update.js +46 -0
  110. package/build/utils/hooks/use-on-value-update.js.map +1 -0
  111. package/build-module/autocomplete/autocompleter-ui.js +2 -0
  112. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  113. package/build-module/autocomplete/types.js.map +1 -1
  114. package/build-module/base-control/styles/base-control-styles.js +8 -8
  115. package/build-module/base-control/styles/base-control-styles.js.map +1 -1
  116. package/build-module/base-control/types.js.map +1 -1
  117. package/build-module/border-control/styles.js +13 -23
  118. package/build-module/border-control/styles.js.map +1 -1
  119. package/build-module/button/index.js +9 -7
  120. package/build-module/button/index.js.map +1 -1
  121. package/build-module/button/types.js.map +1 -1
  122. package/build-module/checkbox-control/index.js +1 -0
  123. package/build-module/checkbox-control/index.js.map +1 -1
  124. package/build-module/color-palette/index.js +1 -1
  125. package/build-module/color-palette/index.js.map +1 -1
  126. package/build-module/color-picker/component.js +9 -18
  127. package/build-module/color-picker/component.js.map +1 -1
  128. package/build-module/combobox-control/index.js +9 -0
  129. package/build-module/combobox-control/index.js.map +1 -1
  130. package/build-module/custom-select-control/index.js +140 -166
  131. package/build-module/custom-select-control/index.js.map +1 -1
  132. package/build-module/custom-select-control/types.js +2 -0
  133. package/build-module/custom-select-control/types.js.map +1 -0
  134. package/build-module/custom-select-control-v2/custom-select.js +4 -1
  135. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  136. package/build-module/custom-select-control-v2/index.js +27 -1
  137. package/build-module/custom-select-control-v2/index.js.map +1 -1
  138. package/build-module/custom-select-control-v2/styles.js +26 -10
  139. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  140. package/build-module/custom-select-control-v2/types.js.map +1 -1
  141. package/build-module/date-time/index.js +1 -2
  142. package/build-module/date-time/index.js.map +1 -1
  143. package/build-module/date-time/time/index.js +66 -38
  144. package/build-module/date-time/time/index.js.map +1 -1
  145. package/build-module/date-time/time/styles.js +11 -11
  146. package/build-module/date-time/time/styles.js.map +1 -1
  147. package/build-module/date-time/{time-input → time/time-input}/index.js +7 -7
  148. package/build-module/date-time/time/time-input/index.js.map +1 -0
  149. package/build-module/dropdown-menu-v2/styles.js +14 -14
  150. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  151. package/build-module/focal-point-picker/index.js +1 -0
  152. package/build-module/focal-point-picker/index.js.map +1 -1
  153. package/build-module/font-size-picker/font-size-picker-select.js +3 -3
  154. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  155. package/build-module/font-size-picker/index.js +36 -24
  156. package/build-module/font-size-picker/index.js.map +1 -1
  157. package/build-module/font-size-picker/types.js.map +1 -1
  158. package/build-module/form-toggle/index.js +23 -22
  159. package/build-module/form-toggle/index.js.map +1 -1
  160. package/build-module/form-token-field/index.js +8 -0
  161. package/build-module/form-token-field/index.js.map +1 -1
  162. package/build-module/guide/index.js +2 -0
  163. package/build-module/guide/index.js.map +1 -1
  164. package/build-module/heading/types.js.map +1 -1
  165. package/build-module/index.js +1 -1
  166. package/build-module/index.js.map +1 -1
  167. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  168. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  169. package/build-module/modal/index.js +17 -11
  170. package/build-module/modal/index.js.map +1 -1
  171. package/build-module/private-apis.js +0 -4
  172. package/build-module/private-apis.js.map +1 -1
  173. package/build-module/query-controls/index.js +1 -1
  174. package/build-module/query-controls/index.js.map +1 -1
  175. package/build-module/radio-control/index.js +35 -9
  176. package/build-module/radio-control/index.js.map +1 -1
  177. package/build-module/radio-control/types.js.map +1 -1
  178. package/build-module/range-control/index.js +1 -0
  179. package/build-module/range-control/index.js.map +1 -1
  180. package/build-module/select-control/index.js +25 -8
  181. package/build-module/select-control/index.js.map +1 -1
  182. package/build-module/select-control/styles/select-control-styles.js +41 -6
  183. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  184. package/build-module/select-control/types.js.map +1 -1
  185. package/build-module/tabs/styles.js +3 -3
  186. package/build-module/tabs/styles.js.map +1 -1
  187. package/build-module/tabs/tablist.js +3 -188
  188. package/build-module/tabs/tablist.js.map +1 -1
  189. package/build-module/text-control/index.js +1 -0
  190. package/build-module/text-control/index.js.map +1 -1
  191. package/build-module/textarea-control/index.js +1 -0
  192. package/build-module/textarea-control/index.js.map +1 -1
  193. package/build-module/toggle-control/index.js +35 -27
  194. package/build-module/toggle-control/index.js.map +1 -1
  195. package/build-module/toggle-group-control/toggle-group-control/component.js +6 -1
  196. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  197. package/build-module/toggle-group-control/toggle-group-control-option/component.js +6 -1
  198. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  199. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +3 -0
  200. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  201. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  202. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  203. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +14 -14
  204. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  205. package/build-module/tools-panel/tools-panel-header/component.js +1 -1
  206. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  207. package/build-module/tooltip/index.js +13 -2
  208. package/build-module/tooltip/index.js.map +1 -1
  209. package/build-module/tree-select/index.js +1 -1
  210. package/build-module/tree-select/index.js.map +1 -1
  211. package/build-module/utils/config-values.js +6 -0
  212. package/build-module/utils/config-values.js.map +1 -1
  213. package/build-module/utils/element-rect.js +147 -0
  214. package/build-module/utils/element-rect.js.map +1 -0
  215. package/build-module/utils/hooks/use-event.js +35 -0
  216. package/build-module/utils/hooks/use-event.js.map +1 -0
  217. package/build-module/utils/hooks/use-on-value-update.js +39 -0
  218. package/build-module/utils/hooks/use-on-value-update.js.map +1 -0
  219. package/build-style/style-rtl.css +126 -123
  220. package/build-style/style.css +126 -123
  221. package/build-types/alignment-matrix-control/cell.d.ts +0 -1
  222. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
  223. package/build-types/alignment-matrix-control/icon.d.ts +0 -1
  224. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
  225. package/build-types/alignment-matrix-control/index.d.ts +0 -1
  226. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  227. package/build-types/alignment-matrix-control/stories/index.story.d.ts +0 -1
  228. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  229. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +8 -9
  230. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +1 -1
  231. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts +10 -11
  232. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -1
  233. package/build-types/angle-picker-control/angle-circle.d.ts +0 -1
  234. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
  235. package/build-types/angle-picker-control/index.d.ts +0 -1
  236. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  237. package/build-types/angle-picker-control/stories/index.story.d.ts +0 -1
  238. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  239. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +7 -8
  240. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
  241. package/build-types/animate/index.d.ts +0 -1
  242. package/build-types/animate/index.d.ts.map +1 -1
  243. package/build-types/animate/types.d.ts +0 -1
  244. package/build-types/animate/types.d.ts.map +1 -1
  245. package/build-types/autocomplete/autocompleter-ui.d.ts +0 -1
  246. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  247. package/build-types/autocomplete/index.d.ts +2 -3
  248. package/build-types/autocomplete/index.d.ts.map +1 -1
  249. package/build-types/autocomplete/types.d.ts +2 -3
  250. package/build-types/autocomplete/types.d.ts.map +1 -1
  251. package/build-types/base-control/hooks.d.ts +3 -4
  252. package/build-types/base-control/hooks.d.ts.map +1 -1
  253. package/build-types/base-control/index.d.ts +0 -1
  254. package/build-types/base-control/index.d.ts.map +1 -1
  255. package/build-types/base-control/stories/index.story.d.ts +0 -1
  256. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  257. package/build-types/base-control/styles/base-control-styles.d.ts +10 -11
  258. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  259. package/build-types/base-control/types.d.ts +1 -1
  260. package/build-types/border-box-control/border-box-control/component.d.ts +4 -5
  261. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  262. package/build-types/border-box-control/border-box-control/hook.d.ts +14 -16
  263. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  264. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts +0 -1
  265. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts.map +1 -1
  266. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +12 -14
  267. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  268. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +5 -6
  269. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  270. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +14 -16
  271. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  272. package/build-types/border-box-control/border-box-control-visualizer/component.d.ts +1 -2
  273. package/build-types/border-box-control/border-box-control-visualizer/component.d.ts.map +1 -1
  274. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +9 -11
  275. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  276. package/build-types/border-box-control/stories/index.story.d.ts +4 -5
  277. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  278. package/build-types/border-box-control/styles.d.ts +3 -3
  279. package/build-types/border-box-control/utils.d.ts.map +1 -1
  280. package/build-types/border-control/border-control/component.d.ts +14 -15
  281. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  282. package/build-types/border-control/border-control/hook.d.ts +17 -19
  283. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  284. package/build-types/border-control/border-control-dropdown/component.d.ts +6 -7
  285. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  286. package/build-types/border-control/border-control-dropdown/hook.d.ts +12 -14
  287. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  288. package/build-types/border-control/border-control-style-picker/component.d.ts +2 -3
  289. package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
  290. package/build-types/border-control/stories/index.story.d.ts +84 -85
  291. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  292. package/build-types/border-control/styles.d.ts +2 -2
  293. package/build-types/border-control/styles.d.ts.map +1 -1
  294. package/build-types/box-control/all-input-control.d.ts +0 -1
  295. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  296. package/build-types/box-control/axial-input-controls.d.ts +0 -1
  297. package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
  298. package/build-types/box-control/icon.d.ts +0 -1
  299. package/build-types/box-control/icon.d.ts.map +1 -1
  300. package/build-types/box-control/index.d.ts +0 -1
  301. package/build-types/box-control/index.d.ts.map +1 -1
  302. package/build-types/box-control/input-controls.d.ts +0 -1
  303. package/build-types/box-control/input-controls.d.ts.map +1 -1
  304. package/build-types/box-control/linked-button.d.ts +0 -1
  305. package/build-types/box-control/linked-button.d.ts.map +1 -1
  306. package/build-types/box-control/stories/index.story.d.ts +312 -350
  307. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  308. package/build-types/box-control/styles/box-control-icon-styles.d.ts +16 -17
  309. package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -1
  310. package/build-types/box-control/styles/box-control-styles.d.ts +44 -45
  311. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
  312. package/build-types/box-control/types.d.ts +0 -1
  313. package/build-types/box-control/types.d.ts.map +1 -1
  314. package/build-types/button/deprecated.d.ts +69 -70
  315. package/build-types/button/deprecated.d.ts.map +1 -1
  316. package/build-types/button/index.d.ts.map +1 -1
  317. package/build-types/button/stories/e2e/index.story.d.ts +0 -1
  318. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  319. package/build-types/button/stories/index.story.d.ts +0 -1
  320. package/build-types/button/stories/index.story.d.ts.map +1 -1
  321. package/build-types/button/types.d.ts +9 -2
  322. package/build-types/button/types.d.ts.map +1 -1
  323. package/build-types/button-group/index.d.ts +0 -1
  324. package/build-types/button-group/index.d.ts.map +1 -1
  325. package/build-types/card/card/component.d.ts +5 -6
  326. package/build-types/card/card/component.d.ts.map +1 -1
  327. package/build-types/card/card/hook.d.ts +10 -12
  328. package/build-types/card/card/hook.d.ts.map +1 -1
  329. package/build-types/card/card-body/component.d.ts +4 -5
  330. package/build-types/card/card-body/component.d.ts.map +1 -1
  331. package/build-types/card/card-body/hook.d.ts +10 -12
  332. package/build-types/card/card-body/hook.d.ts.map +1 -1
  333. package/build-types/card/card-divider/component.d.ts +4 -5
  334. package/build-types/card/card-divider/component.d.ts.map +1 -1
  335. package/build-types/card/card-divider/hook.d.ts +15 -17
  336. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  337. package/build-types/card/card-footer/component.d.ts +5 -6
  338. package/build-types/card/card-footer/component.d.ts.map +1 -1
  339. package/build-types/card/card-footer/hook.d.ts +10 -12
  340. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  341. package/build-types/card/card-header/component.d.ts +4 -5
  342. package/build-types/card/card-header/component.d.ts.map +1 -1
  343. package/build-types/card/card-header/hook.d.ts +10 -12
  344. package/build-types/card/card-header/hook.d.ts.map +1 -1
  345. package/build-types/card/card-media/component.d.ts +0 -1
  346. package/build-types/card/card-media/component.d.ts.map +1 -1
  347. package/build-types/card/card-media/hook.d.ts +10 -12
  348. package/build-types/card/card-media/hook.d.ts.map +1 -1
  349. package/build-types/card/context.d.ts +0 -1
  350. package/build-types/card/context.d.ts.map +1 -1
  351. package/build-types/card/stories/index.story.d.ts +3 -22
  352. package/build-types/card/stories/index.story.d.ts.map +1 -1
  353. package/build-types/checkbox-control/index.d.ts +1 -1
  354. package/build-types/checkbox-control/index.d.ts.map +1 -1
  355. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +0 -1
  356. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
  357. package/build-types/circular-option-picker/circular-option-picker-context.d.ts +0 -1
  358. package/build-types/circular-option-picker/circular-option-picker-context.d.ts.map +1 -1
  359. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts +0 -1
  360. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -1
  361. package/build-types/circular-option-picker/circular-option-picker-option.d.ts +0 -1
  362. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  363. package/build-types/circular-option-picker/circular-option-picker.d.ts +0 -1
  364. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  365. package/build-types/clipboard-button/index.d.ts +0 -1
  366. package/build-types/clipboard-button/index.d.ts.map +1 -1
  367. package/build-types/color-indicator/index.d.ts +0 -1
  368. package/build-types/color-indicator/index.d.ts.map +1 -1
  369. package/build-types/color-palette/index.d.ts +0 -1
  370. package/build-types/color-palette/index.d.ts.map +1 -1
  371. package/build-types/color-palette/stories/index.story.d.ts +0 -1
  372. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  373. package/build-types/color-palette/styles.d.ts +7 -8
  374. package/build-types/color-palette/styles.d.ts.map +1 -1
  375. package/build-types/color-palette/utils.d.ts +1 -1
  376. package/build-types/color-palette/utils.d.ts.map +1 -1
  377. package/build-types/color-picker/color-copy-button.d.ts +0 -1
  378. package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
  379. package/build-types/color-picker/color-input.d.ts +0 -1
  380. package/build-types/color-picker/color-input.d.ts.map +1 -1
  381. package/build-types/color-picker/component.d.ts +5 -6
  382. package/build-types/color-picker/component.d.ts.map +1 -1
  383. package/build-types/color-picker/hex-input.d.ts +0 -1
  384. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  385. package/build-types/color-picker/hsl-input.d.ts +0 -1
  386. package/build-types/color-picker/hsl-input.d.ts.map +1 -1
  387. package/build-types/color-picker/input-with-slider.d.ts +0 -1
  388. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  389. package/build-types/color-picker/legacy-adapter.d.ts +0 -1
  390. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
  391. package/build-types/color-picker/picker.d.ts +0 -1
  392. package/build-types/color-picker/picker.d.ts.map +1 -1
  393. package/build-types/color-picker/rgb-input.d.ts +0 -1
  394. package/build-types/color-picker/rgb-input.d.ts.map +1 -1
  395. package/build-types/color-picker/stories/index.story.d.ts +2 -9
  396. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  397. package/build-types/color-picker/styles.d.ts +55 -54
  398. package/build-types/color-picker/styles.d.ts.map +1 -1
  399. package/build-types/combobox-control/index.d.ts +1 -1
  400. package/build-types/combobox-control/index.d.ts.map +1 -1
  401. package/build-types/combobox-control/stories/index.story.d.ts +41 -41
  402. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  403. package/build-types/combobox-control/styles.d.ts +1 -2
  404. package/build-types/combobox-control/styles.d.ts.map +1 -1
  405. package/build-types/combobox-control/types.d.ts +0 -1
  406. package/build-types/combobox-control/types.d.ts.map +1 -1
  407. package/build-types/composite/current/stories/utils.d.ts +0 -1
  408. package/build-types/composite/current/stories/utils.d.ts.map +1 -1
  409. package/build-types/composite/legacy/index.d.ts +0 -1
  410. package/build-types/composite/legacy/index.d.ts.map +1 -1
  411. package/build-types/composite/legacy/stories/utils.d.ts +0 -1
  412. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  413. package/build-types/confirm-dialog/component.d.ts +0 -1
  414. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  415. package/build-types/confirm-dialog/stories/index.story.d.ts +0 -1
  416. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  417. package/build-types/context/context-system-provider.d.ts +1 -1
  418. package/build-types/context/context-system-provider.d.ts.map +1 -1
  419. package/build-types/context/get-styled-class-name-from-key.d.ts +9 -1
  420. package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
  421. package/build-types/context/use-context-system.d.ts +1 -1
  422. package/build-types/context/use-context-system.d.ts.map +1 -1
  423. package/build-types/context/utils.d.ts.map +1 -1
  424. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +0 -1
  425. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  426. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +0 -1
  427. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
  428. package/build-types/custom-gradient-picker/index.d.ts +0 -1
  429. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  430. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -3
  431. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts.map +1 -1
  432. package/build-types/custom-gradient-picker/types.d.ts +0 -1
  433. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  434. package/build-types/custom-gradient-picker/utils.d.ts.map +1 -1
  435. package/build-types/custom-select-control/index.d.ts +3 -2
  436. package/build-types/custom-select-control/index.d.ts.map +1 -1
  437. package/build-types/custom-select-control/stories/index.story.d.ts +6 -42
  438. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  439. package/build-types/custom-select-control/test/index.d.ts.map +1 -0
  440. package/build-types/custom-select-control/types.d.ts +122 -0
  441. package/build-types/custom-select-control/types.d.ts.map +1 -0
  442. package/build-types/custom-select-control-v2/custom-select.d.ts +0 -1
  443. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  444. package/build-types/custom-select-control-v2/index.d.ts +7 -4
  445. package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
  446. package/build-types/custom-select-control-v2/item.d.ts +0 -1
  447. package/build-types/custom-select-control-v2/item.d.ts.map +1 -1
  448. package/build-types/custom-select-control-v2/stories/{default.story.d.ts → index.story.d.ts} +10 -11
  449. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -0
  450. package/build-types/custom-select-control-v2/styles.d.ts +30 -43
  451. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  452. package/build-types/custom-select-control-v2/types.d.ts +0 -106
  453. package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
  454. package/build-types/dashicon/index.d.ts +0 -1
  455. package/build-types/dashicon/index.d.ts.map +1 -1
  456. package/build-types/date-time/date/index.d.ts +0 -1
  457. package/build-types/date-time/date/index.d.ts.map +1 -1
  458. package/build-types/date-time/date/styles.d.ts +17 -18
  459. package/build-types/date-time/date/styles.d.ts.map +1 -1
  460. package/build-types/date-time/date-time/index.d.ts +1 -2
  461. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  462. package/build-types/date-time/date-time/styles.d.ts +3 -4
  463. package/build-types/date-time/date-time/styles.d.ts.map +1 -1
  464. package/build-types/date-time/index.d.ts +1 -2
  465. package/build-types/date-time/index.d.ts.map +1 -1
  466. package/build-types/date-time/stories/time.story.d.ts +5 -0
  467. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  468. package/build-types/date-time/time/index.d.ts +3 -1
  469. package/build-types/date-time/time/index.d.ts.map +1 -1
  470. package/build-types/date-time/time/styles.d.ts +64 -65
  471. package/build-types/date-time/time/styles.d.ts.map +1 -1
  472. package/build-types/date-time/{time-input → time/time-input}/index.d.ts +1 -2
  473. package/build-types/date-time/time/time-input/index.d.ts.map +1 -0
  474. package/build-types/date-time/time/time-input/test/index.d.ts.map +1 -0
  475. package/build-types/date-time/time/timezone.d.ts +0 -1
  476. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  477. package/build-types/date-time/types.d.ts +0 -1
  478. package/build-types/date-time/types.d.ts.map +1 -1
  479. package/build-types/date-time/utils.d.ts +3 -4
  480. package/build-types/date-time/utils.d.ts.map +1 -1
  481. package/build-types/dimension-control/index.d.ts +0 -1
  482. package/build-types/dimension-control/index.d.ts.map +1 -1
  483. package/build-types/disabled/index.d.ts +0 -1
  484. package/build-types/disabled/index.d.ts.map +1 -1
  485. package/build-types/disabled/types.d.ts +0 -1
  486. package/build-types/disabled/types.d.ts.map +1 -1
  487. package/build-types/disclosure/index.d.ts +0 -1
  488. package/build-types/disclosure/index.d.ts.map +1 -1
  489. package/build-types/disclosure/types.d.ts +0 -1
  490. package/build-types/disclosure/types.d.ts.map +1 -1
  491. package/build-types/divider/component.d.ts +4 -5
  492. package/build-types/divider/component.d.ts.map +1 -1
  493. package/build-types/divider/styles.d.ts +6 -7
  494. package/build-types/divider/styles.d.ts.map +1 -1
  495. package/build-types/draggable/index.d.ts +0 -1
  496. package/build-types/draggable/index.d.ts.map +1 -1
  497. package/build-types/drop-zone/index.d.ts +0 -1
  498. package/build-types/drop-zone/index.d.ts.map +1 -1
  499. package/build-types/drop-zone/provider.d.ts +0 -1
  500. package/build-types/drop-zone/provider.d.ts.map +1 -1
  501. package/build-types/drop-zone/stories/index.story.d.ts +0 -1
  502. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  503. package/build-types/dropdown/dropdown-content-wrapper.d.ts +0 -1
  504. package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -1
  505. package/build-types/dropdown/index.d.ts +0 -1
  506. package/build-types/dropdown/index.d.ts.map +1 -1
  507. package/build-types/dropdown/stories/index.story.d.ts +5 -6
  508. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  509. package/build-types/dropdown/styles.d.ts +2 -3
  510. package/build-types/dropdown/styles.d.ts.map +1 -1
  511. package/build-types/dropdown-menu/index.d.ts +0 -1
  512. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  513. package/build-types/dropdown-menu/stories/index.story.d.ts +3 -4
  514. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  515. package/build-types/dropdown-menu-v2/index.d.ts +0 -1
  516. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  517. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  518. package/build-types/dropdown-menu-v2/styles.d.ts +41 -60
  519. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  520. package/build-types/dropdown-menu-v2/types.d.ts +0 -1
  521. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  522. package/build-types/duotone-picker/color-list-picker/index.d.ts +0 -1
  523. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  524. package/build-types/duotone-picker/custom-duotone-bar.d.ts +0 -1
  525. package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
  526. package/build-types/duotone-picker/duotone-picker.d.ts +0 -1
  527. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  528. package/build-types/duotone-picker/duotone-swatch.d.ts +0 -1
  529. package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -1
  530. package/build-types/elevation/component.d.ts +0 -1
  531. package/build-types/elevation/component.d.ts.map +1 -1
  532. package/build-types/elevation/hook.d.ts +9 -11
  533. package/build-types/elevation/hook.d.ts.map +1 -1
  534. package/build-types/external-link/index.d.ts +0 -1
  535. package/build-types/external-link/index.d.ts.map +1 -1
  536. package/build-types/flex/context.d.ts +2 -3
  537. package/build-types/flex/context.d.ts.map +1 -1
  538. package/build-types/flex/flex/component.d.ts +0 -1
  539. package/build-types/flex/flex/component.d.ts.map +1 -1
  540. package/build-types/flex/flex/hook.d.ts +9 -11
  541. package/build-types/flex/flex/hook.d.ts.map +1 -1
  542. package/build-types/flex/flex-block/component.d.ts +0 -1
  543. package/build-types/flex/flex-block/component.d.ts.map +1 -1
  544. package/build-types/flex/flex-block/hook.d.ts +9 -11
  545. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  546. package/build-types/flex/flex-item/component.d.ts +0 -1
  547. package/build-types/flex/flex-item/component.d.ts.map +1 -1
  548. package/build-types/flex/flex-item/hook.d.ts +9 -11
  549. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  550. package/build-types/focal-point-picker/controls.d.ts +0 -1
  551. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  552. package/build-types/focal-point-picker/focal-point.d.ts +0 -1
  553. package/build-types/focal-point-picker/focal-point.d.ts.map +1 -1
  554. package/build-types/focal-point-picker/grid.d.ts +0 -1
  555. package/build-types/focal-point-picker/grid.d.ts.map +1 -1
  556. package/build-types/focal-point-picker/index.d.ts +1 -1
  557. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  558. package/build-types/focal-point-picker/media.d.ts +0 -1
  559. package/build-types/focal-point-picker/media.d.ts.map +1 -1
  560. package/build-types/focal-point-picker/stories/index.story.d.ts +32 -33
  561. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  562. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +26 -27
  563. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  564. package/build-types/focal-point-picker/styles/focal-point-style.d.ts +2 -3
  565. package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
  566. package/build-types/focusable-iframe/index.d.ts +0 -1
  567. package/build-types/focusable-iframe/index.d.ts.map +1 -1
  568. package/build-types/font-size-picker/font-size-picker-select.d.ts +0 -1
  569. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  570. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts +0 -1
  571. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  572. package/build-types/font-size-picker/index.d.ts +0 -1
  573. package/build-types/font-size-picker/index.d.ts.map +1 -1
  574. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +0 -1
  575. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  576. package/build-types/font-size-picker/styles.d.ts +9 -10
  577. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  578. package/build-types/font-size-picker/types.d.ts +6 -5
  579. package/build-types/font-size-picker/types.d.ts.map +1 -1
  580. package/build-types/form-file-upload/index.d.ts +0 -1
  581. package/build-types/form-file-upload/index.d.ts.map +1 -1
  582. package/build-types/form-file-upload/stories/index.story.d.ts +0 -1
  583. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  584. package/build-types/form-toggle/index.d.ts +2 -5
  585. package/build-types/form-toggle/index.d.ts.map +1 -1
  586. package/build-types/form-token-field/index.d.ts +0 -1
  587. package/build-types/form-token-field/index.d.ts.map +1 -1
  588. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  589. package/build-types/form-token-field/styles.d.ts +1 -2
  590. package/build-types/form-token-field/styles.d.ts.map +1 -1
  591. package/build-types/form-token-field/suggestions-list.d.ts +0 -1
  592. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  593. package/build-types/form-token-field/token.d.ts +0 -1
  594. package/build-types/form-token-field/token.d.ts.map +1 -1
  595. package/build-types/gradient-picker/index.d.ts +0 -1
  596. package/build-types/gradient-picker/index.d.ts.map +1 -1
  597. package/build-types/gradient-picker/types.d.ts +0 -1
  598. package/build-types/gradient-picker/types.d.ts.map +1 -1
  599. package/build-types/grid/component.d.ts +0 -1
  600. package/build-types/grid/component.d.ts.map +1 -1
  601. package/build-types/grid/hook.d.ts +9 -11
  602. package/build-types/grid/hook.d.ts.map +1 -1
  603. package/build-types/guide/icons.d.ts +0 -1
  604. package/build-types/guide/icons.d.ts.map +1 -1
  605. package/build-types/guide/index.d.ts +0 -1
  606. package/build-types/guide/index.d.ts.map +1 -1
  607. package/build-types/guide/page-control.d.ts +0 -1
  608. package/build-types/guide/page-control.d.ts.map +1 -1
  609. package/build-types/guide/page.d.ts +0 -1
  610. package/build-types/guide/page.d.ts.map +1 -1
  611. package/build-types/h-stack/component.d.ts +2 -3
  612. package/build-types/h-stack/component.d.ts.map +1 -1
  613. package/build-types/h-stack/hook.d.ts +9 -11
  614. package/build-types/h-stack/hook.d.ts.map +1 -1
  615. package/build-types/heading/component.d.ts +5 -6
  616. package/build-types/heading/component.d.ts.map +1 -1
  617. package/build-types/heading/hook.d.ts +9 -11
  618. package/build-types/heading/hook.d.ts.map +1 -1
  619. package/build-types/heading/types.d.ts +1 -1
  620. package/build-types/heading/types.d.ts.map +1 -1
  621. package/build-types/higher-order/navigate-regions/index.d.ts +1 -2
  622. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  623. package/build-types/higher-order/with-constrained-tabbing/index.d.ts +0 -1
  624. package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
  625. package/build-types/higher-order/with-fallback-styles/index.d.ts +3 -4
  626. package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -1
  627. package/build-types/higher-order/with-filters/index.d.ts +4 -5
  628. package/build-types/higher-order/with-filters/index.d.ts.map +1 -1
  629. package/build-types/higher-order/with-focus-outside/index.d.ts +0 -1
  630. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  631. package/build-types/higher-order/with-focus-return/index.d.ts +0 -1
  632. package/build-types/higher-order/with-focus-return/index.d.ts.map +1 -1
  633. package/build-types/higher-order/with-notices/index.d.ts +0 -1
  634. package/build-types/higher-order/with-notices/index.d.ts.map +1 -1
  635. package/build-types/higher-order/with-notices/types.d.ts +0 -1
  636. package/build-types/higher-order/with-notices/types.d.ts.map +1 -1
  637. package/build-types/higher-order/with-spoken-messages/index.d.ts +0 -1
  638. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  639. package/build-types/index.d.ts +1 -1
  640. package/build-types/index.d.ts.map +1 -1
  641. package/build-types/input-control/backdrop.d.ts +0 -1
  642. package/build-types/input-control/backdrop.d.ts.map +1 -1
  643. package/build-types/input-control/input-base.d.ts +0 -1
  644. package/build-types/input-control/input-base.d.ts.map +1 -1
  645. package/build-types/input-control/input-field.d.ts +0 -1
  646. package/build-types/input-control/input-field.d.ts.map +1 -1
  647. package/build-types/input-control/input-prefix-wrapper.d.ts +0 -1
  648. package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -1
  649. package/build-types/input-control/input-suffix-wrapper.d.ts +0 -1
  650. package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -1
  651. package/build-types/input-control/label.d.ts +0 -1
  652. package/build-types/input-control/label.d.ts.map +1 -1
  653. package/build-types/input-control/reducer/reducer.d.ts +9 -9
  654. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  655. package/build-types/input-control/stories/index.story.d.ts +0 -1
  656. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  657. package/build-types/input-control/styles/input-control-styles.d.ts +13 -13
  658. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  659. package/build-types/isolated-event-container/index.d.ts +0 -1
  660. package/build-types/isolated-event-container/index.d.ts.map +1 -1
  661. package/build-types/item-group/context.d.ts +0 -1
  662. package/build-types/item-group/context.d.ts.map +1 -1
  663. package/build-types/item-group/item/component.d.ts +0 -1
  664. package/build-types/item-group/item/component.d.ts.map +1 -1
  665. package/build-types/item-group/item/hook.d.ts +10 -12
  666. package/build-types/item-group/item/hook.d.ts.map +1 -1
  667. package/build-types/item-group/item-group/component.d.ts +0 -1
  668. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  669. package/build-types/item-group/item-group/hook.d.ts +11 -13
  670. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  671. package/build-types/item-group/styles.d.ts +1 -1
  672. package/build-types/item-group/types.d.ts +0 -1
  673. package/build-types/item-group/types.d.ts.map +1 -1
  674. package/build-types/keyboard-shortcuts/index.d.ts +0 -1
  675. package/build-types/keyboard-shortcuts/index.d.ts.map +1 -1
  676. package/build-types/keyboard-shortcuts/types.d.ts +0 -1
  677. package/build-types/keyboard-shortcuts/types.d.ts.map +1 -1
  678. package/build-types/menu-group/index.d.ts +0 -1
  679. package/build-types/menu-group/index.d.ts.map +1 -1
  680. package/build-types/menu-item/index.d.ts +8 -9
  681. package/build-types/menu-item/index.d.ts.map +1 -1
  682. package/build-types/menu-item/stories/index.story.d.ts +32 -33
  683. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  684. package/build-types/menu-items-choice/index.d.ts +0 -1
  685. package/build-types/menu-items-choice/index.d.ts.map +1 -1
  686. package/build-types/modal/index.d.ts +0 -1
  687. package/build-types/modal/index.d.ts.map +1 -1
  688. package/build-types/navigable-container/container.d.ts +8 -8
  689. package/build-types/navigable-container/menu.d.ts +7 -7
  690. package/build-types/navigable-container/tabbable.d.ts +6 -6
  691. package/build-types/navigation/back-button/index.d.ts +0 -1
  692. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  693. package/build-types/navigation/context.d.ts +0 -1
  694. package/build-types/navigation/context.d.ts.map +1 -1
  695. package/build-types/navigation/group/context.d.ts +0 -1
  696. package/build-types/navigation/group/context.d.ts.map +1 -1
  697. package/build-types/navigation/group/index.d.ts +0 -1
  698. package/build-types/navigation/group/index.d.ts.map +1 -1
  699. package/build-types/navigation/index.d.ts +0 -1
  700. package/build-types/navigation/index.d.ts.map +1 -1
  701. package/build-types/navigation/item/base-content.d.ts +0 -1
  702. package/build-types/navigation/item/base-content.d.ts.map +1 -1
  703. package/build-types/navigation/item/base.d.ts +0 -1
  704. package/build-types/navigation/item/base.d.ts.map +1 -1
  705. package/build-types/navigation/item/index.d.ts +0 -1
  706. package/build-types/navigation/item/index.d.ts.map +1 -1
  707. package/build-types/navigation/menu/context.d.ts +0 -1
  708. package/build-types/navigation/menu/context.d.ts.map +1 -1
  709. package/build-types/navigation/menu/index.d.ts +0 -1
  710. package/build-types/navigation/menu/index.d.ts.map +1 -1
  711. package/build-types/navigation/menu/menu-title-search.d.ts +0 -1
  712. package/build-types/navigation/menu/menu-title-search.d.ts.map +1 -1
  713. package/build-types/navigation/menu/menu-title.d.ts +0 -1
  714. package/build-types/navigation/menu/menu-title.d.ts.map +1 -1
  715. package/build-types/navigation/menu/search-no-results-found.d.ts +0 -1
  716. package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -1
  717. package/build-types/navigation/styles/navigation-styles.d.ts +27 -28
  718. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  719. package/build-types/navigation/types.d.ts +0 -1
  720. package/build-types/navigation/types.d.ts.map +1 -1
  721. package/build-types/navigation/use-navigation-tree-nodes.d.ts +0 -1
  722. package/build-types/navigation/use-navigation-tree-nodes.d.ts.map +1 -1
  723. package/build-types/navigator/context.d.ts +0 -1
  724. package/build-types/navigator/context.d.ts.map +1 -1
  725. package/build-types/navigator/navigator-back-button/component.d.ts +17 -18
  726. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  727. package/build-types/navigator/navigator-back-button/hook.d.ts +29 -31
  728. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  729. package/build-types/navigator/navigator-button/component.d.ts +18 -19
  730. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  731. package/build-types/navigator/navigator-button/hook.d.ts +29 -31
  732. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  733. package/build-types/navigator/navigator-provider/component.d.ts +0 -1
  734. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  735. package/build-types/navigator/navigator-screen/component.d.ts +0 -1
  736. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  737. package/build-types/navigator/navigator-to-parent-button/component.d.ts +17 -18
  738. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  739. package/build-types/navigator/stories/index.story.d.ts +4 -4
  740. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  741. package/build-types/notice/index.d.ts +0 -1
  742. package/build-types/notice/index.d.ts.map +1 -1
  743. package/build-types/notice/list.d.ts +0 -1
  744. package/build-types/notice/list.d.ts.map +1 -1
  745. package/build-types/number-control/index.d.ts +12 -13
  746. package/build-types/number-control/index.d.ts.map +1 -1
  747. package/build-types/number-control/stories/index.story.d.ts +12 -13
  748. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  749. package/build-types/number-control/styles/number-control-styles.d.ts +2 -3
  750. package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
  751. package/build-types/palette-edit/index.d.ts +0 -1
  752. package/build-types/palette-edit/index.d.ts.map +1 -1
  753. package/build-types/palette-edit/styles.d.ts +18 -20
  754. package/build-types/palette-edit/styles.d.ts.map +1 -1
  755. package/build-types/panel/body.d.ts +0 -1
  756. package/build-types/panel/body.d.ts.map +1 -1
  757. package/build-types/panel/header.d.ts +0 -1
  758. package/build-types/panel/header.d.ts.map +1 -1
  759. package/build-types/panel/index.d.ts +0 -1
  760. package/build-types/panel/index.d.ts.map +1 -1
  761. package/build-types/panel/row.d.ts +0 -1
  762. package/build-types/panel/row.d.ts.map +1 -1
  763. package/build-types/panel/types.d.ts +0 -1
  764. package/build-types/panel/types.d.ts.map +1 -1
  765. package/build-types/placeholder/index.d.ts +0 -1
  766. package/build-types/placeholder/index.d.ts.map +1 -1
  767. package/build-types/popover/index.d.ts +0 -1
  768. package/build-types/popover/index.d.ts.map +1 -1
  769. package/build-types/popover/overlay-middlewares.d.ts +1 -11
  770. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  771. package/build-types/popover/stories/e2e/index.story.d.ts +0 -1
  772. package/build-types/popover/stories/e2e/index.story.d.ts.map +1 -1
  773. package/build-types/popover/stories/index.story.d.ts +6 -6
  774. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  775. package/build-types/popover/test/utils/index.d.ts +0 -1
  776. package/build-types/popover/test/utils/index.d.ts.map +1 -1
  777. package/build-types/popover/utils.d.ts +3 -3
  778. package/build-types/popover/utils.d.ts.map +1 -1
  779. package/build-types/private-apis.d.ts.map +1 -1
  780. package/build-types/progress-bar/index.d.ts +0 -1
  781. package/build-types/progress-bar/index.d.ts.map +1 -1
  782. package/build-types/progress-bar/stories/index.story.d.ts +0 -1
  783. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  784. package/build-types/progress-bar/styles.d.ts +6 -7
  785. package/build-types/progress-bar/styles.d.ts.map +1 -1
  786. package/build-types/query-controls/author-select.d.ts +0 -1
  787. package/build-types/query-controls/author-select.d.ts.map +1 -1
  788. package/build-types/query-controls/category-select.d.ts +0 -1
  789. package/build-types/query-controls/category-select.d.ts.map +1 -1
  790. package/build-types/query-controls/index.d.ts +0 -1
  791. package/build-types/query-controls/index.d.ts.map +1 -1
  792. package/build-types/radio-control/index.d.ts +0 -1
  793. package/build-types/radio-control/index.d.ts.map +1 -1
  794. package/build-types/radio-control/stories/index.story.d.ts +1 -0
  795. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  796. package/build-types/radio-control/test/index.d.ts +2 -0
  797. package/build-types/radio-control/test/index.d.ts.map +1 -0
  798. package/build-types/radio-control/types.d.ts +4 -0
  799. package/build-types/radio-control/types.d.ts.map +1 -1
  800. package/build-types/radio-group/context.d.ts +2 -3
  801. package/build-types/radio-group/context.d.ts.map +1 -1
  802. package/build-types/radio-group/index.d.ts +0 -1
  803. package/build-types/radio-group/index.d.ts.map +1 -1
  804. package/build-types/radio-group/radio.d.ts +0 -1
  805. package/build-types/radio-group/radio.d.ts.map +1 -1
  806. package/build-types/radio-group/types.d.ts +0 -1
  807. package/build-types/radio-group/types.d.ts.map +1 -1
  808. package/build-types/range-control/index.d.ts +29 -29
  809. package/build-types/range-control/index.d.ts.map +1 -1
  810. package/build-types/range-control/input-range.d.ts +0 -1
  811. package/build-types/range-control/input-range.d.ts.map +1 -1
  812. package/build-types/range-control/mark.d.ts +0 -1
  813. package/build-types/range-control/mark.d.ts.map +1 -1
  814. package/build-types/range-control/rail.d.ts +0 -1
  815. package/build-types/range-control/rail.d.ts.map +1 -1
  816. package/build-types/range-control/styles/range-control-styles.d.ts +48 -49
  817. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  818. package/build-types/range-control/tooltip.d.ts +0 -1
  819. package/build-types/range-control/tooltip.d.ts.map +1 -1
  820. package/build-types/resizable-box/index.d.ts +7 -20
  821. package/build-types/resizable-box/index.d.ts.map +1 -1
  822. package/build-types/resizable-box/resize-tooltip/label.d.ts +0 -1
  823. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  824. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +7 -8
  825. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  826. package/build-types/resizable-box/resize-tooltip/utils.d.ts +0 -1
  827. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  828. package/build-types/resizable-box/stories/index.story.d.ts +32 -39
  829. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  830. package/build-types/responsive-wrapper/index.d.ts +0 -1
  831. package/build-types/responsive-wrapper/index.d.ts.map +1 -1
  832. package/build-types/responsive-wrapper/types.d.ts +0 -1
  833. package/build-types/responsive-wrapper/types.d.ts.map +1 -1
  834. package/build-types/sandbox/index.d.ts +0 -1
  835. package/build-types/sandbox/index.d.ts.map +1 -1
  836. package/build-types/sandbox/types.d.ts +0 -1
  837. package/build-types/sandbox/types.d.ts.map +1 -1
  838. package/build-types/scrollable/component.d.ts +0 -1
  839. package/build-types/scrollable/component.d.ts.map +1 -1
  840. package/build-types/scrollable/hook.d.ts +9 -11
  841. package/build-types/scrollable/hook.d.ts.map +1 -1
  842. package/build-types/search-control/index.d.ts +0 -1
  843. package/build-types/search-control/index.d.ts.map +1 -1
  844. package/build-types/search-control/stories/index.story.d.ts +0 -1
  845. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  846. package/build-types/search-control/styles.d.ts +3 -4
  847. package/build-types/search-control/styles.d.ts.map +1 -1
  848. package/build-types/search-control/types.d.ts +0 -1
  849. package/build-types/search-control/types.d.ts.map +1 -1
  850. package/build-types/select-control/chevron-down.d.ts +0 -1
  851. package/build-types/select-control/chevron-down.d.ts.map +1 -1
  852. package/build-types/select-control/index.d.ts +4 -2
  853. package/build-types/select-control/index.d.ts.map +1 -1
  854. package/build-types/select-control/stories/index.story.d.ts +9 -3
  855. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  856. package/build-types/select-control/styles/select-control-styles.d.ts +7 -8
  857. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  858. package/build-types/select-control/types.d.ts +33 -27
  859. package/build-types/select-control/types.d.ts.map +1 -1
  860. package/build-types/shortcut/index.d.ts +0 -1
  861. package/build-types/shortcut/index.d.ts.map +1 -1
  862. package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -1
  863. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  864. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -1
  865. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  866. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -1
  867. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  868. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -2
  869. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  870. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  871. package/build-types/slot-fill/context.d.ts +0 -1
  872. package/build-types/slot-fill/context.d.ts.map +1 -1
  873. package/build-types/slot-fill/index.d.ts +4 -4
  874. package/build-types/slot-fill/index.d.ts.map +1 -1
  875. package/build-types/slot-fill/provider.d.ts +0 -1
  876. package/build-types/slot-fill/provider.d.ts.map +1 -1
  877. package/build-types/slot-fill/slot.d.ts +1 -2
  878. package/build-types/slot-fill/slot.d.ts.map +1 -1
  879. package/build-types/slot-fill/use-slot.d.ts +0 -1
  880. package/build-types/slot-fill/use-slot.d.ts.map +1 -1
  881. package/build-types/snackbar/index.d.ts +5 -6
  882. package/build-types/snackbar/index.d.ts.map +1 -1
  883. package/build-types/snackbar/list.d.ts +0 -1
  884. package/build-types/snackbar/list.d.ts.map +1 -1
  885. package/build-types/spacer/component.d.ts +0 -1
  886. package/build-types/spacer/component.d.ts.map +1 -1
  887. package/build-types/spacer/hook.d.ts +9 -11
  888. package/build-types/spacer/hook.d.ts.map +1 -1
  889. package/build-types/spinner/styles.d.ts +6 -7
  890. package/build-types/spinner/styles.d.ts.map +1 -1
  891. package/build-types/style-provider/index.d.ts +0 -1
  892. package/build-types/style-provider/index.d.ts.map +1 -1
  893. package/build-types/surface/component.d.ts +0 -1
  894. package/build-types/surface/component.d.ts.map +1 -1
  895. package/build-types/surface/hook.d.ts +10 -12
  896. package/build-types/surface/hook.d.ts.map +1 -1
  897. package/build-types/surface/types.d.ts +0 -1
  898. package/build-types/surface/types.d.ts.map +1 -1
  899. package/build-types/tab-panel/index.d.ts +0 -1
  900. package/build-types/tab-panel/index.d.ts.map +1 -1
  901. package/build-types/tab-panel/stories/index.story.d.ts +0 -1
  902. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  903. package/build-types/tabs/context.d.ts +0 -1
  904. package/build-types/tabs/context.d.ts.map +1 -1
  905. package/build-types/tabs/index.d.ts +0 -1
  906. package/build-types/tabs/index.d.ts.map +1 -1
  907. package/build-types/tabs/styles.d.ts +12 -19
  908. package/build-types/tabs/styles.d.ts.map +1 -1
  909. package/build-types/tabs/tab.d.ts +0 -1
  910. package/build-types/tabs/tab.d.ts.map +1 -1
  911. package/build-types/tabs/tablist.d.ts +0 -1
  912. package/build-types/tabs/tablist.d.ts.map +1 -1
  913. package/build-types/tabs/tabpanel.d.ts +0 -1
  914. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  915. package/build-types/tabs/types.d.ts +0 -1
  916. package/build-types/tabs/types.d.ts.map +1 -1
  917. package/build-types/text/component.d.ts +0 -1
  918. package/build-types/text/component.d.ts.map +1 -1
  919. package/build-types/text/hook.d.ts +9 -9
  920. package/build-types/text/stories/index.story.d.ts +0 -1
  921. package/build-types/text/stories/index.story.d.ts.map +1 -1
  922. package/build-types/text/utils.d.ts +0 -1
  923. package/build-types/text/utils.d.ts.map +1 -1
  924. package/build-types/text-control/index.d.ts +3 -3
  925. package/build-types/text-control/index.d.ts.map +1 -1
  926. package/build-types/text-highlight/index.d.ts +0 -1
  927. package/build-types/text-highlight/index.d.ts.map +1 -1
  928. package/build-types/textarea-control/index.d.ts +2 -2
  929. package/build-types/textarea-control/index.d.ts.map +1 -1
  930. package/build-types/textarea-control/styles/textarea-control-styles.d.ts +2 -3
  931. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
  932. package/build-types/theme/color-algorithms.d.ts +1 -9
  933. package/build-types/theme/color-algorithms.d.ts.map +1 -1
  934. package/build-types/theme/index.d.ts +0 -1
  935. package/build-types/theme/index.d.ts.map +1 -1
  936. package/build-types/theme/stories/index.story.d.ts +0 -1
  937. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  938. package/build-types/theme/styles.d.ts +2 -3
  939. package/build-types/theme/styles.d.ts.map +1 -1
  940. package/build-types/tip/index.d.ts +0 -1
  941. package/build-types/tip/index.d.ts.map +1 -1
  942. package/build-types/toggle-control/index.d.ts +3 -9
  943. package/build-types/toggle-control/index.d.ts.map +1 -1
  944. package/build-types/toggle-control/stories/index.story.d.ts +0 -1
  945. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  946. package/build-types/toggle-group-control/context.d.ts +0 -1
  947. package/build-types/toggle-group-control/context.d.ts.map +1 -1
  948. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +0 -1
  949. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  950. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +0 -1
  951. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  952. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +14 -10
  953. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  954. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +5 -6
  955. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  956. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +6 -2
  957. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  958. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -2
  959. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  960. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +5 -6
  961. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  962. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +14 -15
  963. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  964. package/build-types/toolbar/stories/index.story.d.ts +0 -1
  965. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  966. package/build-types/toolbar/toolbar/index.d.ts +0 -1
  967. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  968. package/build-types/toolbar/toolbar/toolbar-container.d.ts +0 -1
  969. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  970. package/build-types/toolbar/toolbar-button/index.d.ts +0 -1
  971. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  972. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +0 -1
  973. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
  974. package/build-types/toolbar/toolbar-context/index.d.ts +0 -1
  975. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  976. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +0 -1
  977. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  978. package/build-types/toolbar/toolbar-group/index.d.ts +0 -1
  979. package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
  980. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +0 -1
  981. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
  982. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +1 -2
  983. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
  984. package/build-types/toolbar/toolbar-item/index.d.ts +2 -3
  985. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  986. package/build-types/tools-panel/context.d.ts +0 -1
  987. package/build-types/tools-panel/context.d.ts.map +1 -1
  988. package/build-types/tools-panel/styles.d.ts +2 -3
  989. package/build-types/tools-panel/styles.d.ts.map +1 -1
  990. package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
  991. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  992. package/build-types/tools-panel/tools-panel/hook.d.ts +10 -12
  993. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  994. package/build-types/tools-panel/tools-panel-header/component.d.ts +0 -1
  995. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  996. package/build-types/tools-panel/tools-panel-header/hook.d.ts +11 -13
  997. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  998. package/build-types/tools-panel/tools-panel-item/component.d.ts +3 -4
  999. package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
  1000. package/build-types/tools-panel/tools-panel-item/hook.d.ts +9 -11
  1001. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  1002. package/build-types/tooltip/index.d.ts +0 -1
  1003. package/build-types/tooltip/index.d.ts.map +1 -1
  1004. package/build-types/tooltip/stories/index.story.d.ts +0 -1
  1005. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  1006. package/build-types/tooltip/test/utils/index.d.ts +1 -5
  1007. package/build-types/tooltip/test/utils/index.d.ts.map +1 -1
  1008. package/build-types/tooltip/types.d.ts +0 -1
  1009. package/build-types/tooltip/types.d.ts.map +1 -1
  1010. package/build-types/tree-grid/cell.d.ts +0 -1
  1011. package/build-types/tree-grid/cell.d.ts.map +1 -1
  1012. package/build-types/tree-grid/index.d.ts +0 -1
  1013. package/build-types/tree-grid/index.d.ts.map +1 -1
  1014. package/build-types/tree-grid/item.d.ts +0 -1
  1015. package/build-types/tree-grid/item.d.ts.map +1 -1
  1016. package/build-types/tree-grid/roving-tab-index-context.d.ts +0 -1
  1017. package/build-types/tree-grid/roving-tab-index-context.d.ts.map +1 -1
  1018. package/build-types/tree-grid/roving-tab-index-item.d.ts +0 -1
  1019. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  1020. package/build-types/tree-grid/roving-tab-index.d.ts +0 -1
  1021. package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -1
  1022. package/build-types/tree-grid/row.d.ts +0 -1
  1023. package/build-types/tree-grid/row.d.ts.map +1 -1
  1024. package/build-types/tree-grid/stories/index.story.d.ts +0 -1
  1025. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  1026. package/build-types/tree-grid/types.d.ts +0 -1
  1027. package/build-types/tree-grid/types.d.ts.map +1 -1
  1028. package/build-types/tree-select/index.d.ts +1 -1
  1029. package/build-types/tree-select/index.d.ts.map +1 -1
  1030. package/build-types/truncate/component.d.ts +0 -1
  1031. package/build-types/truncate/component.d.ts.map +1 -1
  1032. package/build-types/truncate/hook.d.ts +9 -11
  1033. package/build-types/truncate/hook.d.ts.map +1 -1
  1034. package/build-types/truncate/utils.d.ts.map +1 -1
  1035. package/build-types/unit-control/index.d.ts +7 -8
  1036. package/build-types/unit-control/index.d.ts.map +1 -1
  1037. package/build-types/unit-control/styles/unit-control-styles.d.ts +17 -18
  1038. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  1039. package/build-types/unit-control/unit-select-control.d.ts +0 -1
  1040. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  1041. package/build-types/unit-control/utils.d.ts.map +1 -1
  1042. package/build-types/utils/breakpoint.d.ts +1 -10
  1043. package/build-types/utils/breakpoint.d.ts.map +1 -1
  1044. package/build-types/utils/config-values.d.ts +6 -0
  1045. package/build-types/utils/element-rect.d.ts +111 -0
  1046. package/build-types/utils/element-rect.d.ts.map +1 -0
  1047. package/build-types/utils/font.d.ts +1 -6
  1048. package/build-types/utils/font.d.ts.map +1 -1
  1049. package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
  1050. package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
  1051. package/build-types/utils/hooks/use-controlled-value.d.ts +0 -1
  1052. package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
  1053. package/build-types/utils/hooks/use-event.d.ts +20 -0
  1054. package/build-types/utils/hooks/use-event.d.ts.map +1 -0
  1055. package/build-types/utils/hooks/use-on-value-update.d.ts +19 -0
  1056. package/build-types/utils/hooks/use-on-value-update.d.ts.map +1 -0
  1057. package/build-types/utils/hooks/use-update-effect.d.ts +1 -1
  1058. package/build-types/utils/math.d.ts.map +1 -1
  1059. package/build-types/utils/rtl.d.ts +2 -2
  1060. package/build-types/utils/values.d.ts +2 -2
  1061. package/build-types/utils/values.d.ts.map +1 -1
  1062. package/build-types/utils/with-ignore-ime-events.d.ts +0 -1
  1063. package/build-types/utils/with-ignore-ime-events.d.ts.map +1 -1
  1064. package/build-types/v-stack/component.d.ts +2 -3
  1065. package/build-types/v-stack/component.d.ts.map +1 -1
  1066. package/build-types/v-stack/hook.d.ts +9 -11
  1067. package/build-types/v-stack/hook.d.ts.map +1 -1
  1068. package/build-types/v-stack/stories/index.story.d.ts +2 -3
  1069. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  1070. package/build-types/view/component.d.ts +0 -2
  1071. package/build-types/view/component.d.ts.map +1 -1
  1072. package/build-types/visually-hidden/component.d.ts +0 -1
  1073. package/build-types/visually-hidden/component.d.ts.map +1 -1
  1074. package/build-types/z-stack/component.d.ts +0 -1
  1075. package/build-types/z-stack/component.d.ts.map +1 -1
  1076. package/build-types/z-stack/styles.d.ts +4 -5
  1077. package/build-types/z-stack/styles.d.ts.map +1 -1
  1078. package/package.json +20 -21
  1079. package/src/alignment-matrix-control/test/index.tsx +1 -3
  1080. package/src/autocomplete/README.md +2 -2
  1081. package/src/autocomplete/autocompleter-ui.tsx +2 -0
  1082. package/src/autocomplete/style.scss +0 -6
  1083. package/src/autocomplete/types.ts +2 -3
  1084. package/src/base-control/README.md +1 -1
  1085. package/src/base-control/styles/base-control-styles.ts +1 -1
  1086. package/src/base-control/types.ts +1 -1
  1087. package/src/border-control/styles.ts +0 -5
  1088. package/src/button/README.md +1 -1
  1089. package/src/button/index.tsx +9 -7
  1090. package/src/button/stories/e2e/index.story.tsx +103 -21
  1091. package/src/button/style.scss +49 -21
  1092. package/src/button/test/index.tsx +35 -44
  1093. package/src/button/types.ts +9 -2
  1094. package/src/card/card/README.md +1 -1
  1095. package/src/card/stories/index.story.tsx +43 -42
  1096. package/src/checkbox-control/README.md +8 -0
  1097. package/src/checkbox-control/index.tsx +1 -0
  1098. package/src/checkbox-control/style.scss +3 -1
  1099. package/src/circular-option-picker/test/index.tsx +1 -4
  1100. package/src/color-palette/index.tsx +22 -20
  1101. package/src/color-picker/component.tsx +12 -22
  1102. package/src/color-picker/stories/index.story.tsx +2 -22
  1103. package/src/combobox-control/README.md +9 -0
  1104. package/src/combobox-control/index.tsx +11 -0
  1105. package/src/combobox-control/test/index.tsx +127 -1
  1106. package/src/composite/legacy/test/index.tsx +2 -18
  1107. package/src/custom-select-control/README.md +34 -32
  1108. package/src/custom-select-control/index.tsx +206 -0
  1109. package/src/custom-select-control/stories/index.story.tsx +26 -18
  1110. package/src/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.tsx +90 -77
  1111. package/src/custom-select-control/types.ts +123 -0
  1112. package/src/custom-select-control-v2/custom-select.tsx +2 -0
  1113. package/src/custom-select-control-v2/index.tsx +26 -1
  1114. package/src/custom-select-control-v2/stories/{default.story.tsx → index.story.tsx} +1 -1
  1115. package/src/custom-select-control-v2/styles.ts +29 -3
  1116. package/src/custom-select-control-v2/test/index.tsx +15 -19
  1117. package/src/custom-select-control-v2/types.ts +0 -109
  1118. package/src/date-time/index.ts +1 -2
  1119. package/src/date-time/stories/time.story.tsx +17 -0
  1120. package/src/date-time/time/index.tsx +46 -16
  1121. package/src/date-time/time/styles.ts +1 -0
  1122. package/src/date-time/{time-input → time/time-input}/index.tsx +9 -9
  1123. package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -0
  1124. package/src/disabled/README.md +1 -1
  1125. package/src/dropdown/stories/index.story.tsx +55 -50
  1126. package/src/dropdown-menu/stories/index.story.tsx +52 -55
  1127. package/src/dropdown-menu-v2/stories/index.story.tsx +0 -12
  1128. package/src/dropdown-menu-v2/styles.ts +18 -17
  1129. package/src/dropdown-menu-v2/test/index.tsx +1 -4
  1130. package/src/focal-point-picker/README.md +9 -0
  1131. package/src/focal-point-picker/index.tsx +1 -0
  1132. package/src/font-size-picker/README.md +1 -1
  1133. package/src/font-size-picker/font-size-picker-select.tsx +3 -3
  1134. package/src/font-size-picker/index.tsx +68 -64
  1135. package/src/font-size-picker/test/index.tsx +128 -53
  1136. package/src/font-size-picker/types.ts +6 -5
  1137. package/src/form-toggle/index.tsx +23 -21
  1138. package/src/form-toggle/style.scss +14 -9
  1139. package/src/form-token-field/README.md +2 -1
  1140. package/src/form-token-field/index.tsx +9 -0
  1141. package/src/form-token-field/stories/index.story.tsx +2 -0
  1142. package/src/guide/index.tsx +2 -0
  1143. package/src/heading/types.ts +1 -4
  1144. package/src/higher-order/navigate-regions/style.scss +3 -15
  1145. package/src/index.ts +1 -1
  1146. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  1147. package/src/modal/index.tsx +21 -20
  1148. package/src/navigator/stories/index.story.tsx +240 -242
  1149. package/src/notice/test/__snapshots__/index.tsx.snap +1 -1
  1150. package/src/placeholder/style.scss +11 -2
  1151. package/src/popover/stories/index.story.tsx +155 -153
  1152. package/src/private-apis.ts +0 -4
  1153. package/src/query-controls/index.tsx +5 -1
  1154. package/src/radio-control/index.tsx +48 -7
  1155. package/src/radio-control/stories/index.story.tsx +23 -0
  1156. package/src/radio-control/style.scss +32 -3
  1157. package/src/radio-control/test/index.tsx +274 -0
  1158. package/src/radio-control/types.ts +4 -0
  1159. package/src/range-control/README.md +8 -0
  1160. package/src/range-control/index.tsx +1 -0
  1161. package/src/resizable-box/resize-tooltip/README.md +1 -1
  1162. package/src/select-control/README.md +16 -1
  1163. package/src/select-control/index.tsx +40 -22
  1164. package/src/select-control/stories/index.story.tsx +6 -0
  1165. package/src/select-control/styles/select-control-styles.ts +24 -1
  1166. package/src/select-control/test/select-control.tsx +148 -4
  1167. package/src/select-control/types.ts +76 -65
  1168. package/src/style.scss +1 -1
  1169. package/src/tab-panel/test/index.tsx +1 -8
  1170. package/src/tabs/styles.ts +10 -2
  1171. package/src/tabs/tablist.tsx +3 -243
  1172. package/src/tabs/test/index.tsx +68 -84
  1173. package/src/text-control/README.md +1 -0
  1174. package/src/text-control/index.tsx +1 -0
  1175. package/src/text-control/style.scss +5 -0
  1176. package/src/textarea-control/README.md +8 -0
  1177. package/src/textarea-control/index.tsx +1 -0
  1178. package/src/toggle-control/README.md +9 -0
  1179. package/src/toggle-control/index.tsx +37 -25
  1180. package/src/toggle-control/style.scss +12 -0
  1181. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +42 -12
  1182. package/src/toggle-group-control/test/index.tsx +112 -4
  1183. package/src/toggle-group-control/toggle-group-control/README.md +13 -1
  1184. package/src/toggle-group-control/toggle-group-control/component.tsx +6 -1
  1185. package/src/toggle-group-control/toggle-group-control-option/README.md +6 -1
  1186. package/src/toggle-group-control/toggle-group-control-option/component.tsx +6 -1
  1187. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +6 -1
  1188. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +5 -0
  1189. package/src/toggle-group-control/toggle-group-control-option-icon/README.md +1 -1
  1190. package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +14 -14
  1191. package/src/tools-panel/tools-panel-header/component.tsx +1 -1
  1192. package/src/tooltip/index.tsx +15 -2
  1193. package/src/tooltip/test/index.tsx +0 -5
  1194. package/src/tooltip/test/utils/index.tsx +5 -5
  1195. package/src/tree-select/README.md +9 -0
  1196. package/src/tree-select/index.tsx +1 -1
  1197. package/src/utils/config-values.js +6 -0
  1198. package/src/utils/element-rect.ts +197 -0
  1199. package/src/utils/hooks/use-event.ts +38 -0
  1200. package/src/utils/hooks/use-on-value-update.ts +42 -0
  1201. package/tsconfig.tsbuildinfo +1 -1
  1202. package/build/custom-select-control-v2/default-component/index.js +0 -42
  1203. package/build/custom-select-control-v2/default-component/index.js.map +0 -1
  1204. package/build/custom-select-control-v2/legacy-component/index.js +0 -131
  1205. package/build/custom-select-control-v2/legacy-component/index.js.map +0 -1
  1206. package/build/date-time/time-input/index.js.map +0 -1
  1207. package/build-module/custom-select-control-v2/default-component/index.js +0 -31
  1208. package/build-module/custom-select-control-v2/default-component/index.js.map +0 -1
  1209. package/build-module/custom-select-control-v2/legacy-component/index.js +0 -122
  1210. package/build-module/custom-select-control-v2/legacy-component/index.js.map +0 -1
  1211. package/build-module/date-time/time-input/index.js.map +0 -1
  1212. package/build-types/custom-select-control-v2/default-component/index.d.ts +0 -9
  1213. package/build-types/custom-select-control-v2/default-component/index.d.ts.map +0 -1
  1214. package/build-types/custom-select-control-v2/legacy-component/index.d.ts +0 -5
  1215. package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +0 -1
  1216. package/build-types/custom-select-control-v2/legacy-component/test/index.d.ts.map +0 -1
  1217. package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +0 -1
  1218. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts +0 -14
  1219. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts.map +0 -1
  1220. package/build-types/date-time/stories/time-input.story.d.ts +0 -12
  1221. package/build-types/date-time/stories/time-input.story.d.ts.map +0 -1
  1222. package/build-types/date-time/time-input/index.d.ts.map +0 -1
  1223. package/build-types/date-time/time-input/test/index.d.ts.map +0 -1
  1224. package/src/custom-select-control/index.js +0 -240
  1225. package/src/custom-select-control/style.scss +0 -75
  1226. package/src/custom-select-control/test/index.js +0 -665
  1227. package/src/custom-select-control-v2/default-component/index.tsx +0 -29
  1228. package/src/custom-select-control-v2/legacy-component/index.tsx +0 -153
  1229. package/src/custom-select-control-v2/stories/legacy.story.tsx +0 -72
  1230. package/src/date-time/stories/time-input.story.tsx +0 -36
  1231. /package/build-types/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.d.ts +0 -0
  1232. /package/build-types/date-time/{time-input → time/time-input}/test/index.d.ts +0 -0
  1233. /package/src/date-time/{time-input → time/time-input}/test/index.tsx +0 -0
@@ -11,6 +11,8 @@ var _element = require("@wordpress/element");
11
11
  var _context = require("./context");
12
12
  var _styles = require("./styles");
13
13
  var _clsx = _interopRequireDefault(require("clsx"));
14
+ var _elementRect = require("../utils/element-rect");
15
+ var _useOnValueUpdate = require("../utils/hooks/use-on-value-update");
14
16
  var _jsxRuntime = require("react/jsx-runtime");
15
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -26,202 +28,15 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
26
28
  * Internal dependencies
27
29
  */
28
30
 
29
- // TODO: move these into a separate utility file, for use in other components
30
- // such as ToggleGroupControl.
31
-
32
- /**
33
- * Any function.
34
- */
35
-
36
- /**
37
- * Creates a stable callback function that has access to the latest state and
38
- * can be used within event handlers and effect callbacks. Throws when used in
39
- * the render phase.
40
- *
41
- * @example
42
- *
43
- * ```tsx
44
- * function Component(props) {
45
- * const onClick = useEvent(props.onClick);
46
- * React.useEffect(() => {}, [onClick]);
47
- * }
48
- * ```
49
- */
50
- function useEvent(callback) {
51
- const ref = (0, _element.useRef)(() => {
52
- throw new Error('Cannot call an event handler while rendering.');
53
- });
54
- (0, _element.useInsertionEffect)(() => {
55
- ref.current = callback;
56
- });
57
- return (0, _element.useCallback)((...args) => ref.current?.(...args), []);
58
- }
59
-
60
- /**
61
- * `useResizeObserver` options.
62
- */
63
-
64
- /**
65
- * Fires `onResize` when the target element is resized.
66
- *
67
- * **The element must not be stored in a ref**, else it won't be observed
68
- * or updated. Instead, it should be stored in a React state or equivalent.
69
- *
70
- * It sets up a `ResizeObserver` that tracks the element under the hood. The
71
- * target element can be changed dynamically, and the observer will be
72
- * updated accordingly.
73
- *
74
- * By default, `onResize` is called when the observer is set up, in addition
75
- * to when the element is resized. This behavior can be disabled with the
76
- * `fireOnObserve` option.
77
- *
78
- * @example
79
- *
80
- * ```tsx
81
- * const [ targetElement, setTargetElement ] = useState< HTMLElement | null >();
82
- *
83
- * useResizeObserver( targetElement, ( element ) => {
84
- * console.log( 'Element resized:', element );
85
- * } );
86
- *
87
- * <div ref={ setTargetElement } />;
88
- * ```
89
- */
90
- function useResizeObserver(
91
- /**
92
- * The target element to observe. It can be changed dynamically.
93
- */
94
- targetElement,
95
- /**
96
- * Callback to fire when the element is resized. It will also be
97
- * called when the observer is set up, unless `fireOnObserve` is
98
- * set to `false`.
99
- */
100
- onResize, {
101
- fireOnObserve = true
102
- } = {}) {
103
- const onResizeEvent = useEvent(onResize);
104
- const observedElementRef = (0, _element.useRef)();
105
- const resizeObserverRef = (0, _element.useRef)();
106
- (0, _element.useEffect)(() => {
107
- if (targetElement === observedElementRef.current) {
108
- return;
109
- }
110
- observedElementRef.current = targetElement;
111
-
112
- // Set up a ResizeObserver.
113
- if (!resizeObserverRef.current) {
114
- resizeObserverRef.current = new ResizeObserver(() => {
115
- if (observedElementRef.current) {
116
- onResizeEvent(observedElementRef.current);
117
- }
118
- });
119
- }
120
- const {
121
- current: resizeObserver
122
- } = resizeObserverRef;
123
-
124
- // Observe new element.
125
- if (targetElement) {
126
- if (fireOnObserve) {
127
- onResizeEvent(targetElement);
128
- }
129
- resizeObserver.observe(targetElement);
130
- }
131
- return () => {
132
- // Unobserve previous element.
133
- if (observedElementRef.current) {
134
- resizeObserver.unobserve(observedElementRef.current);
135
- }
136
- };
137
- }, [fireOnObserve, onResizeEvent, targetElement]);
138
- }
139
-
140
- /**
141
- * The position and dimensions of an element, relative to its offset parent.
142
- */
143
-
144
- /**
145
- * An `ElementOffsetRect` object with all values set to zero.
146
- */
147
- const NULL_ELEMENT_OFFSET_RECT = {
148
- left: 0,
149
- top: 0,
150
- width: 0,
151
- height: 0
152
- };
153
-
154
- /**
155
- * Returns the position and dimensions of an element, relative to its offset
156
- * parent. This is useful in contexts where `getBoundingClientRect` is not
157
- * suitable, such as when the element is transformed.
158
- *
159
- * **Note:** the `left` and `right` values are adjusted due to a limitation
160
- * in the way the browser calculates the offset position of the element,
161
- * which can cause unwanted scrollbars to appear. This adjustment makes the
162
- * values potentially inaccurate within a range of 1 pixel.
163
- */
164
- function getElementOffsetRect(element) {
165
- return {
166
- // The adjustments mentioned in the documentation above are necessary
167
- // because `offsetLeft` and `offsetTop` are rounded to the nearest pixel,
168
- // which can result in a position mismatch that causes unwanted overflow.
169
- // For context, see: https://github.com/WordPress/gutenberg/pull/61979
170
- left: Math.max(element.offsetLeft - 1, 0),
171
- top: Math.max(element.offsetTop - 1, 0),
172
- // This is a workaround to obtain these values with a sub-pixel precision,
173
- // since `offsetWidth` and `offsetHeight` are rounded to the nearest pixel.
174
- width: parseFloat(getComputedStyle(element).width),
175
- height: parseFloat(getComputedStyle(element).height)
176
- };
177
- }
178
-
179
- /**
180
- * Tracks the position and dimensions of an element, relative to its offset
181
- * parent. The element can be changed dynamically.
182
- */
183
- function useTrackElementOffsetRect(targetElement) {
184
- const [indicatorPosition, setIndicatorPosition] = (0, _element.useState)(NULL_ELEMENT_OFFSET_RECT);
185
- useResizeObserver(targetElement, element => setIndicatorPosition(getElementOffsetRect(element)));
186
- return indicatorPosition;
187
- }
188
-
189
- /**
190
- * Context object for the `onUpdate` callback of `useOnValueUpdate`.
191
- */
192
-
193
- /**
194
- * Calls the `onUpdate` callback when the `value` changes.
195
- */
196
- function useOnValueUpdate(
197
- /**
198
- * The value to watch for changes.
199
- */
200
- value,
201
- /**
202
- * Callback to fire when the value changes.
203
- */
204
- onUpdate) {
205
- const previousValueRef = (0, _element.useRef)(value);
206
- const updateCallbackEvent = useEvent(onUpdate);
207
- (0, _element.useEffect)(() => {
208
- if (previousValueRef.current !== value) {
209
- updateCallbackEvent({
210
- previousValue: previousValueRef.current
211
- });
212
- previousValueRef.current = value;
213
- }
214
- }, [updateCallbackEvent, value]);
215
- }
216
31
  const TabList = exports.TabList = (0, _element.forwardRef)(function TabList({
217
32
  children,
218
33
  ...otherProps
219
34
  }, ref) {
220
35
  const context = (0, _context.useTabsContext)();
221
36
  const selectedId = context?.store.useState('selectedId');
222
- const indicatorPosition = useTrackElementOffsetRect(context?.store.item(selectedId)?.element);
37
+ const indicatorPosition = (0, _elementRect.useTrackElementOffsetRect)(context?.store.item(selectedId)?.element);
223
38
  const [animationEnabled, setAnimationEnabled] = (0, _element.useState)(false);
224
- useOnValueUpdate(selectedId, ({
39
+ (0, _useOnValueUpdate.useOnValueUpdate)(selectedId, ({
225
40
  previousValue
226
41
  }) => previousValue && setAnimationEnabled(true));
227
42
  if (!context) {
@@ -1 +1 @@
1
- {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_warning","_interopRequireDefault","_element","_context","_styles","_clsx","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useEvent","callback","ref","useRef","Error","useInsertionEffect","current","useCallback","args","useResizeObserver","targetElement","onResize","fireOnObserve","onResizeEvent","observedElementRef","resizeObserverRef","useEffect","ResizeObserver","resizeObserver","observe","unobserve","NULL_ELEMENT_OFFSET_RECT","left","top","width","height","getElementOffsetRect","element","Math","max","offsetLeft","offsetTop","parseFloat","getComputedStyle","useTrackElementOffsetRect","indicatorPosition","setIndicatorPosition","useState","useOnValueUpdate","value","onUpdate","previousValueRef","updateCallbackEvent","previousValue","TabList","exports","forwardRef","children","otherProps","context","useTabsContext","selectedId","store","item","animationEnabled","setAnimationEnabled","globalThis","SCRIPT_DEBUG","warning","activeId","selectOnMove","setActiveId","onBlur","jsx","render","TabListWrapper","onTransitionEnd","event","pseudoElement","style","className","clsx"],"sources":["@wordpress/components/src/tabs/tablist.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport warning from '@wordpress/warning';\nimport {\n\tforwardRef,\n\tuseCallback,\n\tuseEffect,\n\tuseInsertionEffect,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { TabListProps } from './types';\nimport { useTabsContext } from './context';\nimport { TabListWrapper } from './styles';\nimport type { WordPressComponentProps } from '../context';\nimport clsx from 'clsx';\n\n// TODO: move these into a separate utility file, for use in other components\n// such as ToggleGroupControl.\n\n/**\n * Any function.\n */\ntype AnyFunction = ( ...args: any ) => any;\n\n/**\n * Creates a stable callback function that has access to the latest state and\n * can be used within event handlers and effect callbacks. Throws when used in\n * the render phase.\n *\n * @example\n *\n * ```tsx\n * function Component(props) {\n * const onClick = useEvent(props.onClick);\n * React.useEffect(() => {}, [onClick]);\n * }\n * ```\n */\nfunction useEvent< T extends AnyFunction >( callback?: T ) {\n\tconst ref = useRef< AnyFunction | undefined >( () => {\n\t\tthrow new Error( 'Cannot call an event handler while rendering.' );\n\t} );\n\tuseInsertionEffect( () => {\n\t\tref.current = callback;\n\t} );\n\treturn useCallback< AnyFunction >(\n\t\t( ...args ) => ref.current?.( ...args ),\n\t\t[]\n\t) as T;\n}\n\n/**\n * `useResizeObserver` options.\n */\ntype UseResizeObserverOptions = {\n\t/**\n\t * Whether to trigger the callback when an element's ResizeObserver is\n\t * first set up.\n\t *\n\t * @default true\n\t */\n\tfireOnObserve?: boolean;\n};\n\n/**\n * Fires `onResize` when the target element is resized.\n *\n * **The element must not be stored in a ref**, else it won't be observed\n * or updated. Instead, it should be stored in a React state or equivalent.\n *\n * It sets up a `ResizeObserver` that tracks the element under the hood. The\n * target element can be changed dynamically, and the observer will be\n * updated accordingly.\n *\n * By default, `onResize` is called when the observer is set up, in addition\n * to when the element is resized. This behavior can be disabled with the\n * `fireOnObserve` option.\n *\n * @example\n *\n * ```tsx\n * const [ targetElement, setTargetElement ] = useState< HTMLElement | null >();\n *\n * useResizeObserver( targetElement, ( element ) => {\n * console.log( 'Element resized:', element );\n * } );\n *\n * <div ref={ setTargetElement } />;\n * ```\n */\nfunction useResizeObserver(\n\t/**\n\t * The target element to observe. It can be changed dynamically.\n\t */\n\ttargetElement: HTMLElement | undefined | null,\n\n\t/**\n\t * Callback to fire when the element is resized. It will also be\n\t * called when the observer is set up, unless `fireOnObserve` is\n\t * set to `false`.\n\t */\n\tonResize: ( element: HTMLElement ) => void,\n\t{ fireOnObserve = true }: UseResizeObserverOptions = {}\n) {\n\tconst onResizeEvent = useEvent( onResize );\n\n\tconst observedElementRef = useRef< HTMLElement | null >();\n\tconst resizeObserverRef = useRef< ResizeObserver >();\n\n\tuseEffect( () => {\n\t\tif ( targetElement === observedElementRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tobservedElementRef.current = targetElement;\n\n\t\t// Set up a ResizeObserver.\n\t\tif ( ! resizeObserverRef.current ) {\n\t\t\tresizeObserverRef.current = new ResizeObserver( () => {\n\t\t\t\tif ( observedElementRef.current ) {\n\t\t\t\t\tonResizeEvent( observedElementRef.current );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\tconst { current: resizeObserver } = resizeObserverRef;\n\n\t\t// Observe new element.\n\t\tif ( targetElement ) {\n\t\t\tif ( fireOnObserve ) {\n\t\t\t\tonResizeEvent( targetElement );\n\t\t\t}\n\t\t\tresizeObserver.observe( targetElement );\n\t\t}\n\n\t\treturn () => {\n\t\t\t// Unobserve previous element.\n\t\t\tif ( observedElementRef.current ) {\n\t\t\t\tresizeObserver.unobserve( observedElementRef.current );\n\t\t\t}\n\t\t};\n\t}, [ fireOnObserve, onResizeEvent, targetElement ] );\n}\n\n/**\n * The position and dimensions of an element, relative to its offset parent.\n */\ntype ElementOffsetRect = {\n\t/**\n\t * The distance from the left edge of the offset parent to the left edge of\n\t * the element.\n\t */\n\tleft: number;\n\t/**\n\t * The distance from the top edge of the offset parent to the top edge of\n\t * the element.\n\t */\n\ttop: number;\n\t/**\n\t * The width of the element.\n\t */\n\twidth: number;\n\t/**\n\t * The height of the element.\n\t */\n\theight: number;\n};\n\n/**\n * An `ElementOffsetRect` object with all values set to zero.\n */\nconst NULL_ELEMENT_OFFSET_RECT = {\n\tleft: 0,\n\ttop: 0,\n\twidth: 0,\n\theight: 0,\n} satisfies ElementOffsetRect;\n\n/**\n * Returns the position and dimensions of an element, relative to its offset\n * parent. This is useful in contexts where `getBoundingClientRect` is not\n * suitable, such as when the element is transformed.\n *\n * **Note:** the `left` and `right` values are adjusted due to a limitation\n * in the way the browser calculates the offset position of the element,\n * which can cause unwanted scrollbars to appear. This adjustment makes the\n * values potentially inaccurate within a range of 1 pixel.\n */\nfunction getElementOffsetRect( element: HTMLElement ): ElementOffsetRect {\n\treturn {\n\t\t// The adjustments mentioned in the documentation above are necessary\n\t\t// because `offsetLeft` and `offsetTop` are rounded to the nearest pixel,\n\t\t// which can result in a position mismatch that causes unwanted overflow.\n\t\t// For context, see: https://github.com/WordPress/gutenberg/pull/61979\n\t\tleft: Math.max( element.offsetLeft - 1, 0 ),\n\t\ttop: Math.max( element.offsetTop - 1, 0 ),\n\t\t// This is a workaround to obtain these values with a sub-pixel precision,\n\t\t// since `offsetWidth` and `offsetHeight` are rounded to the nearest pixel.\n\t\twidth: parseFloat( getComputedStyle( element ).width ),\n\t\theight: parseFloat( getComputedStyle( element ).height ),\n\t};\n}\n\n/**\n * Tracks the position and dimensions of an element, relative to its offset\n * parent. The element can be changed dynamically.\n */\nfunction useTrackElementOffsetRect(\n\ttargetElement: HTMLElement | undefined | null\n) {\n\tconst [ indicatorPosition, setIndicatorPosition ] =\n\t\tuseState< ElementOffsetRect >( NULL_ELEMENT_OFFSET_RECT );\n\n\tuseResizeObserver( targetElement, ( element ) =>\n\t\tsetIndicatorPosition( getElementOffsetRect( element ) )\n\t);\n\n\treturn indicatorPosition;\n}\n\n/**\n * Context object for the `onUpdate` callback of `useOnValueUpdate`.\n */\ntype ValueUpdateContext< T > = {\n\tpreviousValue: T;\n};\n\n/**\n * Calls the `onUpdate` callback when the `value` changes.\n */\nfunction useOnValueUpdate< T >(\n\t/**\n\t * The value to watch for changes.\n\t */\n\tvalue: T,\n\t/**\n\t * Callback to fire when the value changes.\n\t */\n\tonUpdate: ( context: ValueUpdateContext< T > ) => void\n) {\n\tconst previousValueRef = useRef( value );\n\tconst updateCallbackEvent = useEvent( onUpdate );\n\tuseEffect( () => {\n\t\tif ( previousValueRef.current !== value ) {\n\t\t\tupdateCallbackEvent( {\n\t\t\t\tpreviousValue: previousValueRef.current,\n\t\t\t} );\n\t\t\tpreviousValueRef.current = value;\n\t\t}\n\t}, [ updateCallbackEvent, value ] );\n}\n\nexport const TabList = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< TabListProps, 'div', false >\n>( function TabList( { children, ...otherProps }, ref ) {\n\tconst context = useTabsContext();\n\n\tconst selectedId = context?.store.useState( 'selectedId' );\n\tconst indicatorPosition = useTrackElementOffsetRect(\n\t\tcontext?.store.item( selectedId )?.element\n\t);\n\n\tconst [ animationEnabled, setAnimationEnabled ] = useState( false );\n\tuseOnValueUpdate(\n\t\tselectedId,\n\t\t( { previousValue } ) => previousValue && setAnimationEnabled( true )\n\t);\n\n\tif ( ! context ) {\n\t\twarning( '`Tabs.TabList` must be wrapped in a `Tabs` component.' );\n\t\treturn null;\n\t}\n\tconst { store } = context;\n\n\tconst { activeId, selectOnMove } = store.useState();\n\tconst { setActiveId } = store;\n\n\tconst onBlur = () => {\n\t\tif ( ! selectOnMove ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// When automatic tab selection is on, make sure that the active tab is up\n\t\t// to date with the selected tab when leaving the tablist. This makes sure\n\t\t// that the selected tab will receive keyboard focus when tabbing back into\n\t\t// the tablist.\n\t\tif ( selectedId !== activeId ) {\n\t\t\tsetActiveId( selectedId );\n\t\t}\n\t};\n\n\treturn (\n\t\t<Ariakit.TabList\n\t\t\tref={ ref }\n\t\t\tstore={ store }\n\t\t\trender={\n\t\t\t\t<TabListWrapper\n\t\t\t\t\tonTransitionEnd={ ( event ) => {\n\t\t\t\t\t\tif ( event.pseudoElement === '::after' ) {\n\t\t\t\t\t\t\tsetAnimationEnabled( false );\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\tonBlur={ onBlur }\n\t\t\t{ ...otherProps }\n\t\t\tstyle={ {\n\t\t\t\t'--indicator-left': `${ indicatorPosition.left }px`,\n\t\t\t\t'--indicator-top': `${ indicatorPosition.top }px`,\n\t\t\t\t'--indicator-width': `${ indicatorPosition.width }px`,\n\t\t\t\t'--indicator-height': `${ indicatorPosition.height }px`,\n\t\t\t\t...otherProps.style,\n\t\t\t} }\n\t\t\tclassName={ clsx(\n\t\t\t\tanimationEnabled ? 'is-animation-enabled' : '',\n\t\t\t\totherProps.className\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</Ariakit.TabList>\n\t);\n} );\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAaA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAwB,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,E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AAQ,CAAC,CAAC;EACnD,MAAM;IAAEwB;EAAY,CAAC,GAAGT,KAAK;EAE7B,MAAMU,MAAM,GAAGA,CAAA,KAAM;IACpB,IAAK,CAAEF,YAAY,EAAG;MACrB;IACD;;IAEA;IACA;IACA;IACA;IACA,IAAKT,UAAU,KAAKQ,QAAQ,EAAG;MAC9BE,WAAW,CAAEV,UAAW,CAAC;IAC1B;EACD,CAAC;EAED,oBACC,IAAAxE,WAAA,CAAAoF,GAAA,EAAC7F,OAAO,CAAC0E,OAAO;IACf1C,GAAG,EAAGA,GAAK;IACXkD,KAAK,EAAGA,KAAO;IACfY,MAAM,eACL,IAAArF,WAAA,CAAAoF,GAAA,EAACtF,OAAA,CAAAwF,cAAc;MACdC,eAAe,EAAKC,KAAK,IAAM;QAC9B,IAAKA,KAAK,CAACC,aAAa,KAAK,SAAS,EAAG;UACxCb,mBAAmB,CAAE,KAAM,CAAC;QAC7B;MACD;IAAG,CACH,CACD;IACDO,MAAM,EAAGA,MAAQ;IAAA,GACZd,UAAU;IACfqB,KAAK,EAAG;MACP,kBAAkB,EAAG,GAAGlC,iBAAiB,CAACb,IAAM,IAAG;MACnD,iBAAiB,EAAG,GAAGa,iBAAiB,CAACZ,GAAK,IAAG;MACjD,mBAAmB,EAAG,GAAGY,iBAAiB,CAACX,KAAO,IAAG;MACrD,oBAAoB,EAAG,GAAGW,iBAAiB,CAACV,MAAQ,IAAG;MACvD,GAAGuB,UAAU,CAACqB;IACf,CAAG;IACHC,SAAS,EAAG,IAAAC,aAAI,EACfjB,gBAAgB,GAAG,sBAAsB,GAAG,EAAE,EAC9CN,UAAU,CAACsB,SACZ,CAAG;IAAAvB,QAAA,EAEDA;EAAQ,CACM,CAAC;AAEpB,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_warning","_interopRequireDefault","_element","_context","_styles","_clsx","_elementRect","_useOnValueUpdate","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TabList","exports","forwardRef","children","otherProps","ref","context","useTabsContext","selectedId","store","useState","indicatorPosition","useTrackElementOffsetRect","item","element","animationEnabled","setAnimationEnabled","useOnValueUpdate","previousValue","globalThis","SCRIPT_DEBUG","warning","activeId","selectOnMove","setActiveId","onBlur","jsx","render","TabListWrapper","onTransitionEnd","event","pseudoElement","style","left","top","width","height","className","clsx"],"sources":["@wordpress/components/src/tabs/tablist.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport warning from '@wordpress/warning';\nimport { forwardRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { TabListProps } from './types';\nimport { useTabsContext } from './context';\nimport { TabListWrapper } from './styles';\nimport type { WordPressComponentProps } from '../context';\nimport clsx from 'clsx';\nimport { useTrackElementOffsetRect } from '../utils/element-rect';\nimport { useOnValueUpdate } from '../utils/hooks/use-on-value-update';\n\nexport const TabList = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< TabListProps, 'div', false >\n>( function TabList( { children, ...otherProps }, ref ) {\n\tconst context = useTabsContext();\n\n\tconst selectedId = context?.store.useState( 'selectedId' );\n\tconst indicatorPosition = useTrackElementOffsetRect(\n\t\tcontext?.store.item( selectedId )?.element\n\t);\n\n\tconst [ animationEnabled, setAnimationEnabled ] = useState( false );\n\tuseOnValueUpdate(\n\t\tselectedId,\n\t\t( { previousValue } ) => previousValue && setAnimationEnabled( true )\n\t);\n\n\tif ( ! context ) {\n\t\twarning( '`Tabs.TabList` must be wrapped in a `Tabs` component.' );\n\t\treturn null;\n\t}\n\tconst { store } = context;\n\n\tconst { activeId, selectOnMove } = store.useState();\n\tconst { setActiveId } = store;\n\n\tconst onBlur = () => {\n\t\tif ( ! selectOnMove ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// When automatic tab selection is on, make sure that the active tab is up\n\t\t// to date with the selected tab when leaving the tablist. This makes sure\n\t\t// that the selected tab will receive keyboard focus when tabbing back into\n\t\t// the tablist.\n\t\tif ( selectedId !== activeId ) {\n\t\t\tsetActiveId( selectedId );\n\t\t}\n\t};\n\n\treturn (\n\t\t<Ariakit.TabList\n\t\t\tref={ ref }\n\t\t\tstore={ store }\n\t\t\trender={\n\t\t\t\t<TabListWrapper\n\t\t\t\t\tonTransitionEnd={ ( event ) => {\n\t\t\t\t\t\tif ( event.pseudoElement === '::after' ) {\n\t\t\t\t\t\t\tsetAnimationEnabled( false );\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\tonBlur={ onBlur }\n\t\t\t{ ...otherProps }\n\t\t\tstyle={ {\n\t\t\t\t'--indicator-left': `${ indicatorPosition.left }px`,\n\t\t\t\t'--indicator-top': `${ indicatorPosition.top }px`,\n\t\t\t\t'--indicator-width': `${ indicatorPosition.width }px`,\n\t\t\t\t'--indicator-height': `${ indicatorPosition.height }px`,\n\t\t\t\t...otherProps.style,\n\t\t\t} }\n\t\t\tclassName={ clsx(\n\t\t\t\tanimationEnabled ? 'is-animation-enabled' : '',\n\t\t\t\totherProps.className\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</Ariakit.TabList>\n\t);\n} );\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAMA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,iBAAA,GAAAR,OAAA;AAAsE,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,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AE,KAAM,CAAC;QAC7B;MACD;IAAG,CACH,CACD;IACDS,MAAM,EAAGA,MAAQ;IAAA,GACZrB,UAAU;IACf4B,KAAK,EAAG;MACP,kBAAkB,EAAG,GAAGrB,iBAAiB,CAACsB,IAAM,IAAG;MACnD,iBAAiB,EAAG,GAAGtB,iBAAiB,CAACuB,GAAK,IAAG;MACjD,mBAAmB,EAAG,GAAGvB,iBAAiB,CAACwB,KAAO,IAAG;MACrD,oBAAoB,EAAG,GAAGxB,iBAAiB,CAACyB,MAAQ,IAAG;MACvD,GAAGhC,UAAU,CAAC4B;IACf,CAAG;IACHK,SAAS,EAAG,IAAAC,aAAI,EACfvB,gBAAgB,GAAG,sBAAsB,GAAG,EAAE,EAC9CX,UAAU,CAACiC,SACZ,CAAG;IAAAlC,QAAA,EAEDA;EAAQ,CACM,CAAC;AAEpB,CAAE,CAAC","ignoreList":[]}
@@ -72,6 +72,7 @@ function UnforwardedTextControl(props, ref) {
72
72
  *
73
73
  * return (
74
74
  * <TextControl
75
+ * __nextHasNoMarginBottom
75
76
  * label="Additional CSS Class"
76
77
  * value={ className }
77
78
  * onChange={ ( value ) => setClassName( value ) }
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_compose","_element","_baseControl","_jsxRuntime","UnforwardedTextControl","props","ref","__nextHasNoMarginBottom","__next40pxDefaultSize","label","hideLabelFromVision","value","help","id","idProp","className","onChange","type","additionalProps","useInstanceId","TextControl","onChangeValue","event","target","jsx","default","children","clsx","undefined","exports","forwardRef","_default"],"sources":["@wordpress/components/src/text-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ChangeEvent, ForwardedRef } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { TextControlProps } from './types';\n\nfunction UnforwardedTextControl(\n\tprops: WordPressComponentProps< TextControlProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\t__next40pxDefaultSize = false,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tid: idProp,\n\t\tclassName,\n\t\tonChange,\n\t\ttype = 'text',\n\t\t...additionalProps\n\t} = props;\n\tconst id = useInstanceId( TextControl, 'inspector-text-control', idProp );\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<input\n\t\t\t\tclassName={ clsx( 'components-text-control__input', {\n\t\t\t\t\t'is-next-40px-default-size': __next40pxDefaultSize,\n\t\t\t\t} ) }\n\t\t\t\ttype={ type }\n\t\t\t\tid={ id }\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * TextControl components let users enter and edit text.\n *\n * ```jsx\n * import { TextControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextControl = () => {\n * const [ className, setClassName ] = useState( '' );\n *\n * return (\n * <TextControl\n * label=\"Additional CSS Class\"\n * value={ className }\n * onChange={ ( value ) => setClassName( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextControl = forwardRef( UnforwardedTextControl );\n\nexport default TextControl;\n"],"mappings":";;;;;;;AAIA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,Q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NY;IAAe,CACpB;EAAC,CACU,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,WAAW,GAAAS,OAAA,CAAAT,WAAA,GAAG,IAAAU,mBAAU,EAAE1B,sBAAuB,CAAC;AAAC,IAAA2B,QAAA,GAAAF,OAAA,CAAAJ,OAAA,GAEjDL,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_compose","_element","_baseControl","_jsxRuntime","UnforwardedTextControl","props","ref","__nextHasNoMarginBottom","__next40pxDefaultSize","label","hideLabelFromVision","value","help","id","idProp","className","onChange","type","additionalProps","useInstanceId","TextControl","onChangeValue","event","target","jsx","default","children","clsx","undefined","exports","forwardRef","_default"],"sources":["@wordpress/components/src/text-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ChangeEvent, ForwardedRef } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { TextControlProps } from './types';\n\nfunction UnforwardedTextControl(\n\tprops: WordPressComponentProps< TextControlProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\t__next40pxDefaultSize = false,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tid: idProp,\n\t\tclassName,\n\t\tonChange,\n\t\ttype = 'text',\n\t\t...additionalProps\n\t} = props;\n\tconst id = useInstanceId( TextControl, 'inspector-text-control', idProp );\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<input\n\t\t\t\tclassName={ clsx( 'components-text-control__input', {\n\t\t\t\t\t'is-next-40px-default-size': __next40pxDefaultSize,\n\t\t\t\t} ) }\n\t\t\t\ttype={ type }\n\t\t\t\tid={ id }\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * TextControl components let users enter and edit text.\n *\n * ```jsx\n * import { TextControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextControl = () => {\n * const [ className, setClassName ] = useState( '' );\n *\n * return (\n * <TextControl\n * __nextHasNoMarginBottom\n * label=\"Additional CSS Class\"\n * value={ className }\n * onChange={ ( value ) => setClassName( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextControl = forwardRef( UnforwardedTextControl );\n\nexport default TextControl;\n"],"mappings":";;;;;;;AAIA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAA0C,IAAAI,WAAA,GAAAJ,OAAA;AAf1C;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;;AAKA,SAASK,sBAAsBA,CAC9BC,KAAkE,EAClEC,GAAqC,EACpC;EACD,MAAM;IACLC,uBAAuB;IACvBC,qBAAqB,GAAG,KAAK;IAC7BC,KAAK;IACLC,mBAAmB;IACnBC,KAAK;IACLC,IAAI;IACJC,EAAE,EAAEC,MAAM;IACVC,SAAS;IACTC,QAAQ;IACRC,IAAI,GAAG,MAAM;IACb,GAAGC;EACJ,CAAC,GAAGb,KAAK;EACT,MAAMQ,EAAE,GAAG,IAAAM,sBAAa,EAAEC,WAAW,EAAE,wBAAwB,EAAEN,MAAO,CAAC;EACzE,MAAMO,aAAa,GAAKC,KAAsC,IAC7DN,QAAQ,CAAEM,KAAK,CAACC,MAAM,CAACZ,KAAM,CAAC;EAE/B,oBACC,IAAAR,WAAA,CAAAqB,GAAA,EAACtB,YAAA,CAAAuB,OAAW;IACXlB,uBAAuB,EAAGA,uBAAyB;IACnDE,KAAK,EAAGA,KAAO;IACfC,mBAAmB,EAAGA,mBAAqB;IAC3CG,EAAE,EAAGA,EAAI;IACTD,IAAI,EAAGA,IAAM;IACbG,SAAS,EAAGA,SAAW;IAAAW,QAAA,eAEvB,IAAAvB,WAAA,CAAAqB,GAAA;MACCT,SAAS,EAAG,IAAAY,aAAI,EAAE,gCAAgC,EAAE;QACnD,2BAA2B,EAAEnB;MAC9B,CAAE,CAAG;MACLS,IAAI,EAAGA,IAAM;MACbJ,EAAE,EAAGA,EAAI;MACTF,KAAK,EAAGA,KAAO;MACfK,QAAQ,EAAGK,aAAe;MAC1B,oBAAmB,CAAC,CAAET,IAAI,GAAGC,EAAE,GAAG,QAAQ,GAAGe,SAAW;MACxDtB,GAAG,EAAGA,GAAK;MAAA,GACNY;IAAe,CACpB;EAAC,CACU,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,WAAW,GAAAS,OAAA,CAAAT,WAAA,GAAG,IAAAU,mBAAU,EAAE1B,sBAAuB,CAAC;AAAC,IAAA2B,QAAA,GAAAF,OAAA,CAAAJ,OAAA,GAEjDL,WAAW","ignoreList":[]}
@@ -67,6 +67,7 @@ function UnforwardedTextareaControl(props, ref) {
67
67
  *
68
68
  * return (
69
69
  * <TextareaControl
70
+ * __nextHasNoMarginBottom
70
71
  * label="Text"
71
72
  * help="Enter some text"
72
73
  * value={ text }
@@ -1 +1 @@
1
- {"version":3,"names":["_compose","require","_element","_baseControl","_interopRequireDefault","_textareaControlStyles","_jsxRuntime","UnforwardedTextareaControl","props","ref","__nextHasNoMarginBottom","label","hideLabelFromVision","value","help","onChange","rows","className","additionalProps","instanceId","useInstanceId","TextareaControl","id","onChangeValue","event","target","jsx","default","children","StyledTextarea","undefined","exports","forwardRef","_default"],"sources":["@wordpress/components/src/textarea-control/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { StyledTextarea } from './styles/textarea-control-styles';\nimport type { TextareaControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnforwardedTextareaControl(\n\tprops: WordPressComponentProps< TextareaControlProps, 'textarea', false >,\n\tref: React.ForwardedRef< HTMLTextAreaElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tonChange,\n\t\trows = 4,\n\t\tclassName,\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( TextareaControl );\n\tconst id = `inspector-textarea-control-${ instanceId }`;\n\tconst onChangeValue = ( event: React.ChangeEvent< HTMLTextAreaElement > ) =>\n\t\tonChange( event.target.value );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<StyledTextarea\n\t\t\t\tclassName=\"components-textarea-control__input\"\n\t\t\t\tid={ id }\n\t\t\t\trows={ rows }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tvalue={ value }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * TextareaControls are TextControls that allow for multiple lines of text, and\n * wrap overflow text onto a new line. They are a fixed height and scroll\n * vertically when the cursor reaches the bottom of the field.\n *\n * ```jsx\n * import { TextareaControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextareaControl = () => {\n * const [ text, setText ] = useState( '' );\n *\n * return (\n * <TextareaControl\n * label=\"Text\"\n * help=\"Enter some text\"\n * value={ text }\n * onChange={ ( value ) => setText( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextareaControl = forwardRef( UnforwardedTextareaControl );\n\nexport default TextareaControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAJ,OAAA;AAAkE,IAAAK,WAAA,GAAAL,OAAA;AAVlE;AACA;AACA;;AAIA;AACA;AACA;;AAMA,SAASM,0BAA0BA,CAClCC,KAAyE,EACzEC,GAA8C,EAC7C;EACD,MAAM;IACLC,uBAAuB;IACvBC,KAAK;IACLC,mBAAmB;IACnBC,KAAK;IACLC,IAAI;IACJC,QAAQ;IACRC,IAAI,GAAG,CAAC;IACRC,SAAS;IACT,GAAGC;EACJ,CAAC,GAAGV,KAAK;EACT,MAAMW,UAAU,GAAG,IAAAC,sBAAa,EAAEC,eAAgB,CAAC;EACnD,MAAMC,EAAE,GAAI,8BAA8BH,UAAY,EAAC;EACvD,MAAMI,aAAa,GAAKC,KAA+C,IACtET,QAAQ,CAAES,KAAK,CAACC,MAAM,CAACZ,KAAM,CAAC;EAE/B,oBACC,IAAAP,WAAA,CAAAoB,GAAA,EAACvB,YAAA,CAAAwB,OAAW;IACXjB,uBAAuB,EAAGA,uBAAyB;IACnDC,KAAK,EAAGA,KAAO;IACfC,mBAAmB,EAAGA,mBAAqB;IAC3CU,EAAE,EAAGA,EAAI;IACTR,IAAI,EAAGA,IAAM;IACbG,SAAS,EAAGA,SAAW;IAAAW,QAAA,eAEvB,IAAAtB,WAAA,CAAAoB,GAAA,EAACrB,sBAAA,CAAAwB,cAAc;MACdZ,SAAS,EAAC,oCAAoC;MAC9CK,EAAE,EAAGA,EAAI;MACTN,IAAI,EAAGA,IAAM;MACbD,QAAQ,EAAGQ,aAAe;MAC1B,oBAAmB,CAAC,CAAET,IAAI,GAAGQ,EAAE,GAAG,QAAQ,GAAGQ,SAAW;MACxDjB,KAAK,EAAGA,KAAO;MACfJ,GAAG,EAAGA,GAAK;MAAA,GACNS;IAAe,CACpB;EAAC,CACU,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,eAAe,GAAAU,OAAA,CAAAV,eAAA,GAAG,IAAAW,mBAAU,EAAEzB,0BAA2B,CAAC;AAAC,IAAA0B,QAAA,GAAAF,OAAA,CAAAJ,OAAA,GAEzDN,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["_compose","require","_element","_baseControl","_interopRequireDefault","_textareaControlStyles","_jsxRuntime","UnforwardedTextareaControl","props","ref","__nextHasNoMarginBottom","label","hideLabelFromVision","value","help","onChange","rows","className","additionalProps","instanceId","useInstanceId","TextareaControl","id","onChangeValue","event","target","jsx","default","children","StyledTextarea","undefined","exports","forwardRef","_default"],"sources":["@wordpress/components/src/textarea-control/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { StyledTextarea } from './styles/textarea-control-styles';\nimport type { TextareaControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnforwardedTextareaControl(\n\tprops: WordPressComponentProps< TextareaControlProps, 'textarea', false >,\n\tref: React.ForwardedRef< HTMLTextAreaElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tonChange,\n\t\trows = 4,\n\t\tclassName,\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( TextareaControl );\n\tconst id = `inspector-textarea-control-${ instanceId }`;\n\tconst onChangeValue = ( event: React.ChangeEvent< HTMLTextAreaElement > ) =>\n\t\tonChange( event.target.value );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<StyledTextarea\n\t\t\t\tclassName=\"components-textarea-control__input\"\n\t\t\t\tid={ id }\n\t\t\t\trows={ rows }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tvalue={ value }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * TextareaControls are TextControls that allow for multiple lines of text, and\n * wrap overflow text onto a new line. They are a fixed height and scroll\n * vertically when the cursor reaches the bottom of the field.\n *\n * ```jsx\n * import { TextareaControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextareaControl = () => {\n * const [ text, setText ] = useState( '' );\n *\n * return (\n * <TextareaControl\n * __nextHasNoMarginBottom\n * label=\"Text\"\n * help=\"Enter some text\"\n * value={ text }\n * onChange={ ( value ) => setText( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextareaControl = forwardRef( UnforwardedTextareaControl );\n\nexport default TextareaControl;\n"],"mappings":";;;;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B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,eAAe,GAAAU,OAAA,CAAAV,eAAA,GAAG,IAAAW,mBAAU,EAAEzB,0BAA2B,CAAC;AAAC,IAAA0B,QAAA,GAAAF,OAAA,CAAAJ,OAAA,GAEzDN,eAAe","ignoreList":[]}
@@ -4,9 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.ToggleControl = ToggleControl;
8
- exports.default = void 0;
7
+ exports.default = exports.ToggleControl = void 0;
9
8
  var _react = require("@emotion/react");
9
+ var _clsx = _interopRequireDefault(require("clsx"));
10
10
  var _element = require("@wordpress/element");
11
11
  var _compose = require("@wordpress/compose");
12
12
  var _flex = require("../flex");
@@ -28,27 +28,7 @@ var _jsxRuntime = require("react/jsx-runtime");
28
28
  * Internal dependencies
29
29
  */
30
30
 
31
- /**
32
- * ToggleControl is used to generate a toggle user interface.
33
- *
34
- * ```jsx
35
- * import { ToggleControl } from '@wordpress/components';
36
- * import { useState } from '@wordpress/element';
37
- *
38
- * const MyToggleControl = () => {
39
- * const [ value, setValue ] = useState( false );
40
- *
41
- * return (
42
- * <ToggleControl
43
- * label="Fixed Background"
44
- * checked={ value }
45
- * onChange={ () => setValue( ( state ) => ! state ) }
46
- * />
47
- * );
48
- * };
49
- * ```
50
- */
51
- function ToggleControl({
31
+ function UnforwardedToggleControl({
52
32
  __nextHasNoMarginBottom,
53
33
  label,
54
34
  checked,
@@ -65,7 +45,7 @@ function ToggleControl({
65
45
  const cx = (0, _utils.useCx)();
66
46
  const classes = cx('components-toggle-control', className, !__nextHasNoMarginBottom && /*#__PURE__*/(0, _react.css)({
67
47
  marginBottom: (0, _space.space)(3)
68
- }, process.env.NODE_ENV === "production" ? "" : ";label:classes;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdG9nZ2xlLWNvbnRyb2wvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtFK0IiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy90b2dnbGUtY29udHJvbC9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IENoYW5nZUV2ZW50LCBGb3J3YXJkZWRSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBmb3J3YXJkUmVmIH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcbmltcG9ydCB7IHVzZUluc3RhbmNlSWQgfSBmcm9tICdAd29yZHByZXNzL2NvbXBvc2UnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBGbGV4QmxvY2sgfSBmcm9tICcuLi9mbGV4JztcbmltcG9ydCBGb3JtVG9nZ2xlIGZyb20gJy4uL2Zvcm0tdG9nZ2xlJztcbmltcG9ydCBCYXNlQ29udHJvbCBmcm9tICcuLi9iYXNlLWNvbnRyb2wnO1xuaW1wb3J0IHR5cGUgeyBXb3JkUHJlc3NDb21wb25lbnRQcm9wcyB9IGZyb20gJy4uL2NvbnRleHQvd29yZHByZXNzLWNvbXBvbmVudCc7XG5pbXBvcnQgdHlwZSB7IFRvZ2dsZUNvbnRyb2xQcm9wcyB9IGZyb20gJy4vdHlwZXMnO1xuaW1wb3J0IHsgSFN0YWNrI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ZGVmYXVsdCBmb3J3YXJkUmVmKCBUb2dnbGVDb250cm9sICk7XG4iXX0= */"));
48
+ }, process.env.NODE_ENV === "production" ? "" : ";label:classes;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdG9nZ2xlLWNvbnRyb2wvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQStDK0IiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy90b2dnbGUtY29udHJvbC9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IENoYW5nZUV2ZW50LCBGb3J3YXJkZWRSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgY2xzeCBmcm9tICdjbHN4JztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGZvcndhcmRSZWYgfSBmcm9tICdAd29yZHByZXNzL2VsZW1lbnQnO1xuaW1wb3J0IHsgdXNlSW5zdGFuY2VJZCB9IGZyb20gJ0B3b3JkcHJlc3MvY29tcG9zZSc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IEZsZXhCbG9jayB9IGZyb20gJy4uL2ZsZXgnO1xuaW1wb3J0IEZvcm1Ub2dnbGUgZnJvbSAnLi4vZm9ybS10b2dnbGUnO1xuaW1wb3J0IEJhc2VDb250cm9sIGZyb20gJy4uL2Jhc2UtY29udHJvbCc7XG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJ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SB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG4gKlxuICogY29uc3QgTXlUb2dnbGVDb250cm9sID0gKCkgPT4ge1xuICogICBjb25zdCBbIHZhbHVlLCBzZXRWYWx1ZSBdID0gdXNlU3RhdGUoIGZhbHNlICk7XG4gKlxuICogICByZXR1cm4gKFxuICogICAgIDxUb2dnbGVDb250cm9sXG4gKiAgICAgICBfX25leHRIYXNOb01hcmdpbkJvdHRvbVxuICogICAgICAgbGFiZWw9XCJGaXhlZCBCYWNrZ3JvdW5kXCJcbiAqICAgICAgIGNoZWNrZWQ9eyB2YWx1ZSB9XG4gKiAgICAgICBvbkNoYW5nZT17ICgpID0+IHNldFZhbHVlKCAoIHN0YXRlICkgPT4gISBzdGF0ZSApIH1cbiAqICAgICAvPlxuICogICApO1xuICogfTtcbiAqIGBgYFxuICovXG5leHBvcnQgY29uc3QgVG9nZ2xlQ29udHJvbCA9IGZvcndhcmRSZWYoIFVuZm9yd2FyZGVkVG9nZ2xlQ29udHJvbCApO1xuXG5leHBvcnQgZGVmYXVsdCBUb2dnbGVDb250cm9sO1xuIl19 */"));
69
49
  let describedBy, helpLabel;
70
50
  if (help) {
71
51
  if (typeof help === 'function') {
@@ -84,12 +64,15 @@ function ToggleControl({
84
64
  }
85
65
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_baseControl.default, {
86
66
  id: id,
87
- help: helpLabel,
67
+ help: helpLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
68
+ className: "components-toggle-control__help",
69
+ children: helpLabel
70
+ }),
88
71
  className: classes,
89
72
  __nextHasNoMarginBottom: true,
90
73
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hStack.HStack, {
91
74
  justify: "flex-start",
92
- spacing: 3,
75
+ spacing: 2,
93
76
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_formToggle.default, {
94
77
  id: id,
95
78
  checked: checked,
@@ -100,11 +83,36 @@ function ToggleControl({
100
83
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_flex.FlexBlock, {
101
84
  as: "label",
102
85
  htmlFor: id,
103
- className: "components-toggle-control__label",
86
+ className: (0, _clsx.default)('components-toggle-control__label', {
87
+ 'is-disabled': disabled
88
+ }),
104
89
  children: label
105
90
  })]
106
91
  })
107
92
  });
108
93
  }
109
- var _default = exports.default = (0, _element.forwardRef)(ToggleControl);
94
+
95
+ /**
96
+ * ToggleControl is used to generate a toggle user interface.
97
+ *
98
+ * ```jsx
99
+ * import { ToggleControl } from '@wordpress/components';
100
+ * import { useState } from '@wordpress/element';
101
+ *
102
+ * const MyToggleControl = () => {
103
+ * const [ value, setValue ] = useState( false );
104
+ *
105
+ * return (
106
+ * <ToggleControl
107
+ * __nextHasNoMarginBottom
108
+ * label="Fixed Background"
109
+ * checked={ value }
110
+ * onChange={ () => setValue( ( state ) => ! state ) }
111
+ * />
112
+ * );
113
+ * };
114
+ * ```
115
+ */
116
+ const ToggleControl = exports.ToggleControl = (0, _element.forwardRef)(UnforwardedToggleControl);
117
+ var _default = exports.default = ToggleControl;
110
118
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_element","_compose","_flex","_formToggle","_interopRequireDefault","_baseControl","_hStack","_utils","_space","_jsxRuntime","ToggleControl","__nextHasNoMarginBottom","label","checked","help","className","onChange","disabled","ref","onChangeToggle","event","target","instanceId","useInstanceId","id","cx","useCx","classes","css","marginBottom","space","process","env","NODE_ENV","describedBy","helpLabel","undefined","jsx","default","children","jsxs","HStack","justify","spacing","FlexBlock","as","htmlFor","_default","exports","forwardRef"],"sources":["@wordpress/components/src/toggle-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ChangeEvent, ForwardedRef } from 'react';\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../flex';\nimport FormToggle from '../form-toggle';\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { ToggleControlProps } from './types';\nimport { HStack } from '../h-stack';\nimport { useCx } from '../utils';\nimport { space } from '../utils/space';\n\n/**\n * ToggleControl is used to generate a toggle user interface.\n *\n * ```jsx\n * import { ToggleControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyToggleControl = () => {\n * const [ value, setValue ] = useState( false );\n *\n * return (\n * <ToggleControl\n * label=\"Fixed Background\"\n * checked={ value }\n * onChange={ () => setValue( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport function ToggleControl(\n\t{\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\tchecked,\n\t\thelp,\n\t\tclassName,\n\t\tonChange,\n\t\tdisabled,\n\t}: WordPressComponentProps< ToggleControlProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tfunction onChangeToggle( event: ChangeEvent< HTMLInputElement > ) {\n\t\tonChange( event.target.checked );\n\t}\n\tconst instanceId = useInstanceId( ToggleControl );\n\tconst id = `inspector-toggle-control-${ instanceId }`;\n\n\tconst cx = useCx();\n\tconst classes = cx(\n\t\t'components-toggle-control',\n\t\tclassName,\n\t\t! __nextHasNoMarginBottom && css( { marginBottom: space( 3 ) } )\n\t);\n\n\tlet describedBy, helpLabel;\n\tif ( help ) {\n\t\tif ( typeof help === 'function' ) {\n\t\t\t// `help` as a function works only for controlled components where\n\t\t\t// `checked` is passed down from parent component. Uncontrolled\n\t\t\t// component can show only a static help label.\n\t\t\tif ( checked !== undefined ) {\n\t\t\t\thelpLabel = help( checked );\n\t\t\t}\n\t\t} else {\n\t\t\thelpLabel = help;\n\t\t}\n\t\tif ( helpLabel ) {\n\t\t\tdescribedBy = id + '__help';\n\t\t}\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\tid={ id }\n\t\t\thelp={ helpLabel }\n\t\t\tclassName={ classes }\n\t\t\t__nextHasNoMarginBottom\n\t\t>\n\t\t\t<HStack justify=\"flex-start\" spacing={ 3 }>\n\t\t\t\t<FormToggle\n\t\t\t\t\tid={ id }\n\t\t\t\t\tchecked={ checked }\n\t\t\t\t\tonChange={ onChangeToggle }\n\t\t\t\t\taria-describedby={ describedBy }\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tref={ ref }\n\t\t\t\t/>\n\t\t\t\t<FlexBlock\n\t\t\t\t\tas=\"label\"\n\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\tclassName=\"components-toggle-control__label\"\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</FlexBlock>\n\t\t\t</HStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default forwardRef( ToggleControl );\n"],"mappings":";;;;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,YAAA,GAAAD,sBAAA,CAAAL,OAAA;AAGA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AAAuC,IAAAU,WAAA,GAAAV,OAAA;AAtBvC;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASW,aAAaA,CAC5B;EACCC,uBAAuB;EACvBC,KAAK;EACLC,OAAO;EACPC,IAAI;EACJC,SAAS;EACTC,QAAQ;EACRC;AAC8D,CAAC,EAChEC,GAAqC,EACpC;EACD,SAASC,cAAcA,CAAEC,KAAsC,EAAG;IACjEJ,QAAQ,CAAEI,KAAK,CAACC,MAAM,CAACR,OAAQ,CAAC;E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AAa;QAChCjB,QAAQ,EAAGA,QAAU;QACrBC,GAAG,EAAGA;MAAK,CACX,CAAC,eACF,IAAAT,WAAA,CAAA4B,GAAA,EAACnC,KAAA,CAAA0C,SAAS;QACTC,EAAE,EAAC,OAAO;QACVC,OAAO,EAAGtB,EAAI;QACdT,SAAS,EAAC,kCAAkC;QAAAwB,QAAA,EAE1C3B;MAAK,CACG,CAAC;IAAA,CACL;EAAC,CACG,CAAC;AAEhB;AAAC,IAAAmC,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAEc,IAAAW,mBAAU,EAAEvC,aAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_clsx","_interopRequireDefault","_element","_compose","_flex","_formToggle","_baseControl","_hStack","_utils","_space","_jsxRuntime","UnforwardedToggleControl","__nextHasNoMarginBottom","label","checked","help","className","onChange","disabled","ref","onChangeToggle","event","target","instanceId","useInstanceId","ToggleControl","id","cx","useCx","classes","css","marginBottom","space","process","env","NODE_ENV","describedBy","helpLabel","undefined","jsx","default","children","jsxs","HStack","justify","spacing","FlexBlock","as","htmlFor","clsx","exports","forwardRef","_default"],"sources":["@wordpress/components/src/toggle-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ChangeEvent, ForwardedRef } from 'react';\nimport { css } from '@emotion/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../flex';\nimport FormToggle from '../form-toggle';\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { ToggleControlProps } from './types';\nimport { HStack } from '../h-stack';\nimport { useCx } from '../utils';\nimport { space } from '../utils/space';\n\nfunction UnforwardedToggleControl(\n\t{\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\tchecked,\n\t\thelp,\n\t\tclassName,\n\t\tonChange,\n\t\tdisabled,\n\t}: WordPressComponentProps< ToggleControlProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tfunction onChangeToggle( event: ChangeEvent< HTMLInputElement > ) {\n\t\tonChange( event.target.checked );\n\t}\n\tconst instanceId = useInstanceId( ToggleControl );\n\tconst id = `inspector-toggle-control-${ instanceId }`;\n\n\tconst cx = useCx();\n\tconst classes = cx(\n\t\t'components-toggle-control',\n\t\tclassName,\n\t\t! __nextHasNoMarginBottom && css( { marginBottom: space( 3 ) } )\n\t);\n\n\tlet describedBy, helpLabel;\n\tif ( help ) {\n\t\tif ( typeof help === 'function' ) {\n\t\t\t// `help` as a function works only for controlled components where\n\t\t\t// `checked` is passed down from parent component. Uncontrolled\n\t\t\t// component can show only a static help label.\n\t\t\tif ( checked !== undefined ) {\n\t\t\t\thelpLabel = help( checked );\n\t\t\t}\n\t\t} else {\n\t\t\thelpLabel = help;\n\t\t}\n\t\tif ( helpLabel ) {\n\t\t\tdescribedBy = id + '__help';\n\t\t}\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\tid={ id }\n\t\t\thelp={\n\t\t\t\thelpLabel && (\n\t\t\t\t\t<span className=\"components-toggle-control__help\">\n\t\t\t\t\t\t{ helpLabel }\n\t\t\t\t\t</span>\n\t\t\t\t)\n\t\t\t}\n\t\t\tclassName={ classes }\n\t\t\t__nextHasNoMarginBottom\n\t\t>\n\t\t\t<HStack justify=\"flex-start\" spacing={ 2 }>\n\t\t\t\t<FormToggle\n\t\t\t\t\tid={ id }\n\t\t\t\t\tchecked={ checked }\n\t\t\t\t\tonChange={ onChangeToggle }\n\t\t\t\t\taria-describedby={ describedBy }\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tref={ ref }\n\t\t\t\t/>\n\t\t\t\t<FlexBlock\n\t\t\t\t\tas=\"label\"\n\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\tclassName={ clsx( 'components-toggle-control__label', {\n\t\t\t\t\t\t'is-disabled': disabled,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</FlexBlock>\n\t\t\t</HStack>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * ToggleControl is used to generate a toggle user interface.\n *\n * ```jsx\n * import { ToggleControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyToggleControl = () => {\n * const [ value, setValue ] = useState( false );\n *\n * return (\n * <ToggleControl\n * __nextHasNoMarginBottom\n * label=\"Fixed Background\"\n * checked={ value }\n * onChange={ () => setValue( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport const ToggleControl = forwardRef( UnforwardedToggleControl );\n\nexport default ToggleControl;\n"],"mappings":";;;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,YAAA,GAAAL,sBAAA,CAAAF,OAAA;AAGA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAAuC,IAAAW,WAAA,GAAAX,OAAA;AAvBvC;AACA;AACA;;AAKA;AACA;AACA;;AAIA;AACA;AACA;;AAUA,SAASY,wBAAwBA,CAChC;EACCC,uBAAuB;EACvBC,KAAK;EACLC,OAAO;EACPC,IAAI;EACJC,SAAS;EACTC,QAAQ;EACRC;AAC8D,CAAC,EAChEC,GAAqC,EACpC;EACD,SAASC,cAAcA,CAAEC,KAAsC,EAAG;IACjEJ,QAAQ,CAAEI,KAAK,CAACC,MAAM,CAACR,OAAQ,CAAC;EACjC;EACA,MAAMS,UAAU,GAAG,IAAAC,sBAAa,EAAEC,aAAc,CAAC;EACjD,MAAMC,EAAE,GAAI,4BAA4BH,UAA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gB,WAAa;QAChClB,QAAQ,EAAGA,QAAU;QACrBC,GAAG,EAAGA;MAAK,CACX,CAAC,eACF,IAAAT,WAAA,CAAA6B,GAAA,EAACnC,KAAA,CAAA0C,SAAS;QACTC,EAAE,EAAC,OAAO;QACVC,OAAO,EAAGtB,EAAI;QACdV,SAAS,EAAG,IAAAiC,aAAI,EAAE,kCAAkC,EAAE;UACrD,aAAa,EAAE/B;QAChB,CAAE,CAAG;QAAAuB,QAAA,EAEH5B;MAAK,CACG,CAAC;IAAA,CACL;EAAC,CACG,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMY,aAAa,GAAAyB,OAAA,CAAAzB,aAAA,GAAG,IAAA0B,mBAAU,EAAExC,wBAAyB,CAAC;AAAC,IAAAyC,QAAA,GAAAF,OAAA,CAAAV,OAAA,GAErDf,aAAa","ignoreList":[]}
@@ -101,7 +101,12 @@ function UnconnectedToggleGroupControl(props, forwardedRef) {
101
101
  *
102
102
  * function Example() {
103
103
  * return (
104
- * <ToggleGroupControl label="my label" value="vertical" isBlock>
104
+ * <ToggleGroupControl
105
+ * label="my label"
106
+ * value="vertical"
107
+ * isBlock
108
+ * __nextHasNoMarginBottom
109
+ * >
105
110
  * <ToggleGroupControlOption value="horizontal" label="Horizontal" />
106
111
  * <ToggleGroupControlOption value="vertical" label="Vertical" />
107
112
  * </ToggleGroupControl>
@@ -1 +1 @@
1
- {"version":3,"names":["_framerMotion","require","_compose","_element","_context","_hooks","_baseControl","_interopRequireDefault","_styles","_interopRequireWildcard","styles","_asRadioGroup","_asButtonGroup","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","UnconnectedToggleGroupControl","props","forwardedRef","__nextHasNoMarginBottom","__next40pxDefaultSize","className","isAdaptiveWidth","isBlock","isDeselectable","label","hideLabelFromVision","help","onChange","size","value","children","otherProps","useContextSystem","baseId","useInstanceId","ToggleGroupControl","normalizedSize","cx","useCx","classes","useMemo","toggleGroupControl","block","MainControl","ToggleGroupControlAsButtonGroup","ToggleGroupControlAsRadioGroup","jsxs","jsx","VisualLabelWrapper","VisualLabel","ref","LayoutGroup","id","exports","contextConnect","_default"],"sources":["@wordpress/components/src/toggle-group-control/toggle-group-control/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport { LayoutGroup } from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect, useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks';\nimport BaseControl from '../../base-control';\nimport type { ToggleGroupControlProps } from '../types';\nimport { VisualLabelWrapper } from './styles';\nimport * as styles from './styles';\nimport { ToggleGroupControlAsRadioGroup } from './as-radio-group';\nimport { ToggleGroupControlAsButtonGroup } from './as-button-group';\n\nfunction UnconnectedToggleGroupControl(\n\tprops: WordPressComponentProps< ToggleGroupControlProps, 'div', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\tclassName,\n\t\tisAdaptiveWidth = false,\n\t\tisBlock = false,\n\t\tisDeselectable = false,\n\t\tlabel,\n\t\thideLabelFromVision = false,\n\t\thelp,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tvalue,\n\t\tchildren,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ToggleGroupControl' );\n\n\tconst baseId = useInstanceId( ToggleGroupControl, 'toggle-group-control' );\n\tconst normalizedSize =\n\t\t__next40pxDefaultSize && size === 'default' ? '__unstable-large' : size;\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.toggleGroupControl( {\n\t\t\t\t\tisBlock,\n\t\t\t\t\tisDeselectable,\n\t\t\t\t\tsize: normalizedSize,\n\t\t\t\t} ),\n\t\t\t\tisBlock && styles.block,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isBlock, isDeselectable, normalizedSize ]\n\t);\n\n\tconst MainControl = isDeselectable\n\t\t? ToggleGroupControlAsButtonGroup\n\t\t: ToggleGroupControlAsRadioGroup;\n\n\treturn (\n\t\t<BaseControl\n\t\t\thelp={ help }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t>\n\t\t\t{ ! hideLabelFromVision && (\n\t\t\t\t<VisualLabelWrapper>\n\t\t\t\t\t<BaseControl.VisualLabel>{ label }</BaseControl.VisualLabel>\n\t\t\t\t</VisualLabelWrapper>\n\t\t\t) }\n\t\t\t<MainControl\n\t\t\t\t{ ...otherProps }\n\t\t\t\tclassName={ classes }\n\t\t\t\tisAdaptiveWidth={ isAdaptiveWidth }\n\t\t\t\tlabel={ label }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tref={ forwardedRef }\n\t\t\t\tsize={ normalizedSize }\n\t\t\t\tvalue={ value }\n\t\t\t>\n\t\t\t\t<LayoutGroup id={ baseId }>{ children }</LayoutGroup>\n\t\t\t</MainControl>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * `ToggleGroupControl` is a form component that lets users choose options\n * represented in horizontal segments. To render options for this control use\n * `ToggleGroupControlOption` component.\n *\n * This component is intended for selecting a single persistent value from a set of options,\n * similar to a how a radio button group would work. If you simply want a toggle to switch between views,\n * use a `TabPanel` instead.\n *\n * Only use this control when you know for sure the labels of items inside won't\n * wrap. For items with longer labels, you can consider a `SelectControl` or a\n * `CustomSelectControl` component instead.\n *\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOption as ToggleGroupControlOption,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl label=\"my label\" value=\"vertical\" isBlock>\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControl = contextConnect(\n\tUnconnectedToggleGroupControl,\n\t'ToggleGroupControl'\n);\n\nexport default ToggleGroupControl;\n"],"mappings":";;;;;;;AAIA,IAAAA,aAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAMA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAC,sBAAA,CAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAC,uBAAA,CAAAR,OAAA;AAA8C,IAAAS,MAAA,GAAAF,OAAA;AAE9C,IAAAG,aAAA,GAAAV,OAAA;AACA,IAAAW,cAAA,GAAAX,OAAA;AAAoE,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAa,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,kBAAkB,GAAAkB,OAAA,CAAAlB,kBAAA,GAAG,IAAAmB,uBAAc,EAC/CvC,6BAA6B,EAC7B,oBACD,CAAC;AAAC,IAAAwC,QAAA,GAAAF,OAAA,CAAApD,OAAA,GAEakC,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["_framerMotion","require","_compose","_element","_context","_hooks","_baseControl","_interopRequireDefault","_styles","_interopRequireWildcard","styles","_asRadioGroup","_asButtonGroup","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","UnconnectedToggleGroupControl","props","forwardedRef","__nextHasNoMarginBottom","__next40pxDefaultSize","className","isAdaptiveWidth","isBlock","isDeselectable","label","hideLabelFromVision","help","onChange","size","value","children","otherProps","useContextSystem","baseId","useInstanceId","ToggleGroupControl","normalizedSize","cx","useCx","classes","useMemo","toggleGroupControl","block","MainControl","ToggleGroupControlAsButtonGroup","ToggleGroupControlAsRadioGroup","jsxs","jsx","VisualLabelWrapper","VisualLabel","ref","LayoutGroup","id","exports","contextConnect","_default"],"sources":["@wordpress/components/src/toggle-group-control/toggle-group-control/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport { LayoutGroup } from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect, useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks';\nimport BaseControl from '../../base-control';\nimport type { ToggleGroupControlProps } from '../types';\nimport { VisualLabelWrapper } from './styles';\nimport * as styles from './styles';\nimport { ToggleGroupControlAsRadioGroup } from './as-radio-group';\nimport { ToggleGroupControlAsButtonGroup } from './as-button-group';\n\nfunction UnconnectedToggleGroupControl(\n\tprops: WordPressComponentProps< ToggleGroupControlProps, 'div', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\tclassName,\n\t\tisAdaptiveWidth = false,\n\t\tisBlock = false,\n\t\tisDeselectable = false,\n\t\tlabel,\n\t\thideLabelFromVision = false,\n\t\thelp,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tvalue,\n\t\tchildren,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ToggleGroupControl' );\n\n\tconst baseId = useInstanceId( ToggleGroupControl, 'toggle-group-control' );\n\tconst normalizedSize =\n\t\t__next40pxDefaultSize && size === 'default' ? '__unstable-large' : size;\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.toggleGroupControl( {\n\t\t\t\t\tisBlock,\n\t\t\t\t\tisDeselectable,\n\t\t\t\t\tsize: normalizedSize,\n\t\t\t\t} ),\n\t\t\t\tisBlock && styles.block,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isBlock, isDeselectable, normalizedSize ]\n\t);\n\n\tconst MainControl = isDeselectable\n\t\t? ToggleGroupControlAsButtonGroup\n\t\t: ToggleGroupControlAsRadioGroup;\n\n\treturn (\n\t\t<BaseControl\n\t\t\thelp={ help }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t>\n\t\t\t{ ! hideLabelFromVision && (\n\t\t\t\t<VisualLabelWrapper>\n\t\t\t\t\t<BaseControl.VisualLabel>{ label }</BaseControl.VisualLabel>\n\t\t\t\t</VisualLabelWrapper>\n\t\t\t) }\n\t\t\t<MainControl\n\t\t\t\t{ ...otherProps }\n\t\t\t\tclassName={ classes }\n\t\t\t\tisAdaptiveWidth={ isAdaptiveWidth }\n\t\t\t\tlabel={ label }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tref={ forwardedRef }\n\t\t\t\tsize={ normalizedSize }\n\t\t\t\tvalue={ value }\n\t\t\t>\n\t\t\t\t<LayoutGroup id={ baseId }>{ children }</LayoutGroup>\n\t\t\t</MainControl>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * `ToggleGroupControl` is a form component that lets users choose options\n * represented in horizontal segments. To render options for this control use\n * `ToggleGroupControlOption` component.\n *\n * This component is intended for selecting a single persistent value from a set of options,\n * similar to a how a radio button group would work. If you simply want a toggle to switch between views,\n * use a `TabPanel` instead.\n *\n * Only use this control when you know for sure the labels of items inside won't\n * wrap. For items with longer labels, you can consider a `SelectControl` or a\n * `CustomSelectControl` component instead.\n *\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOption as ToggleGroupControlOption,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl\n * label=\"my label\"\n * value=\"vertical\"\n * isBlock\n * __nextHasNoMarginBottom\n * >\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControl = contextConnect(\n\tUnconnectedToggleGroupControl,\n\t'ToggleGroupControl'\n);\n\nexport default ToggleGroupControl;\n"],"mappings":";;;;;;;AAIA,IAAAA,aAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAMA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAC,sBAAA,CAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAC,uBAAA,CAAAR,OAAA;AAA8C,IAAAS,MAAA,GAAAF,OAAA;AAE9C,IAAAG,aAAA,GAAAV,OAAA;AACA,IAAAW,cAAA,GAAAX,OAAA;AAAoE,IAAAY,WAAA,GAAAZ,OAAA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;MAAK,CAA2B;IAAC,CACzC,CACpB,eACD,IAAA9B,WAAA,CAAAqD,GAAA,EAACJ,WAAW;MAAA,GACNZ,UAAU;MACfX,SAAS,EAAGmB,OAAS;MACrBlB,eAAe,EAAGA,eAAiB;MACnCG,KAAK,EAAGA,KAAO;MACfG,QAAQ,EAAGA,QAAU;MACrBuB,GAAG,EAAGjC,YAAc;MACpBW,IAAI,EAAGQ,cAAgB;MACvBP,KAAK,EAAGA,KAAO;MAAAC,QAAA,eAEf,IAAApC,WAAA,CAAAqD,GAAA,EAAClE,aAAA,CAAAsE,WAAW;QAACC,EAAE,EAAGnB,MAAQ;QAAAH,QAAA,EAAGA;MAAQ,CAAe;IAAC,CACzC,CAAC;EAAA,CACF,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,kBAAkB,GAAAkB,OAAA,CAAAlB,kBAAA,GAAG,IAAAmB,uBAAc,EAC/CvC,6BAA6B,EAC7B,oBACD,CAAC;AAAC,IAAAwC,QAAA,GAAAF,OAAA,CAAApD,OAAA,GAEakC,kBAAkB","ignoreList":[]}
@@ -45,7 +45,12 @@ function UnforwardedToggleGroupControlOption(props, ref) {
45
45
  *
46
46
  * function Example() {
47
47
  * return (
48
- * <ToggleGroupControl label="my label" value="vertical" isBlock>
48
+ * <ToggleGroupControl
49
+ * label="my label"
50
+ * value="vertical"
51
+ * isBlock
52
+ * __nextHasNoMarginBottom
53
+ * >
49
54
  * <ToggleGroupControlOption value="horizontal" label="Horizontal" />
50
55
  * <ToggleGroupControlOption value="vertical" label="Vertical" />
51
56
  * </ToggleGroupControl>
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_toggleGroupControlOptionBase","_jsxRuntime","UnforwardedToggleGroupControlOption","props","ref","label","restProps","optionLabel","jsx","ToggleGroupControlOptionBase","children","ToggleGroupControlOption","exports","forwardRef","_default","default"],"sources":["@wordpress/components/src/toggle-group-control/toggle-group-control-option/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport type { ToggleGroupControlOptionProps } from '../types';\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\n\nfunction UnforwardedToggleGroupControlOption(\n\tprops: WordPressComponentProps<\n\t\tToggleGroupControlOptionProps,\n\t\t'button',\n\t\tfalse\n\t>,\n\tref: ForwardedRef< any >\n) {\n\tconst { label, ...restProps } = props;\n\tconst optionLabel = restProps[ 'aria-label' ] || label;\n\treturn (\n\t\t<ToggleGroupControlOptionBase\n\t\t\t{ ...restProps }\n\t\t\taria-label={ optionLabel }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ label }\n\t\t</ToggleGroupControlOptionBase>\n\t);\n}\n\n/**\n * `ToggleGroupControlOption` is a form component and is meant to be used as a\n * child of `ToggleGroupControl`.\n *\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOption as ToggleGroupControlOption,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl label=\"my label\" value=\"vertical\" isBlock>\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControlOption = forwardRef(\n\tUnforwardedToggleGroupControlOption\n);\n\nexport default ToggleGroupControlOption;\n"],"mappings":";;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAOA,IAAAC,6BAAA,GAAAD,OAAA;AAAmF,IAAAE,WAAA,GAAAF,OAAA;AAfnF;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAKA,SAASG,mCAAmCA,CAC3CC,KAIC,EACDC,GAAwB,EACvB;EACD,MAAM;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAGH,KAAK;EACrC,MAAMI,WAAW,GAAGD,SAAS,CAAE,YAAY,CAAE,IAAID,KAAK;EACtD,oBACC,IAAAJ,WAAA,CAAAO,GAAA,EAACR,6BAAA,CAAAS,4BAA4B;IAAA,GACvBH,SAAS;IACd,cAAaC,WAAa;IAC1BH,GAAG,EAAGA,GAAK;IAAAM,QAAA,EAETL;EAAK,CACsB,CAAC;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA,GAAG,IAAAE,mBAAU,EACjDX,mCACD,CAAC;AAAC,IAAAY,QAAA,GAAAF,OAAA,CAAAG,OAAA,GAEaJ,wBAAwB","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_toggleGroupControlOptionBase","_jsxRuntime","UnforwardedToggleGroupControlOption","props","ref","label","restProps","optionLabel","jsx","ToggleGroupControlOptionBase","children","ToggleGroupControlOption","exports","forwardRef","_default","default"],"sources":["@wordpress/components/src/toggle-group-control/toggle-group-control-option/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport type { ToggleGroupControlOptionProps } from '../types';\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\n\nfunction UnforwardedToggleGroupControlOption(\n\tprops: WordPressComponentProps<\n\t\tToggleGroupControlOptionProps,\n\t\t'button',\n\t\tfalse\n\t>,\n\tref: ForwardedRef< any >\n) {\n\tconst { label, ...restProps } = props;\n\tconst optionLabel = restProps[ 'aria-label' ] || label;\n\treturn (\n\t\t<ToggleGroupControlOptionBase\n\t\t\t{ ...restProps }\n\t\t\taria-label={ optionLabel }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ label }\n\t\t</ToggleGroupControlOptionBase>\n\t);\n}\n\n/**\n * `ToggleGroupControlOption` is a form component and is meant to be used as a\n * child of `ToggleGroupControl`.\n *\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOption as ToggleGroupControlOption,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl\n * label=\"my label\"\n * value=\"vertical\"\n * isBlock\n * __nextHasNoMarginBottom\n * >\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControlOption = forwardRef(\n\tUnforwardedToggleGroupControlOption\n);\n\nexport default ToggleGroupControlOption;\n"],"mappings":";;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAOA,IAAAC,6BAAA,GAAAD,OAAA;AAAmF,IAAAE,WAAA,GAAAF,OAAA;AAfnF;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAKA,SAASG,mCAAmCA,CAC3CC,KAIC,EACDC,GAAwB,EACvB;EACD,MAAM;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAGH,KAAK;EACrC,MAAMI,WAAW,GAAGD,SAAS,CAAE,YAAY,CAAE,IAAID,KAAK;EACtD,oBACC,IAAAJ,WAAA,CAAAO,GAAA,EAACR,6BAAA,CAAAS,4BAA4B;IAAA,GACvBH,SAAS;IACd,cAAaC,WAAa;IAC1BH,GAAG,EAAGA,GAAK;IAAAM,QAAA,EAETL;EAAK,CACsB,CAAC;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA,GAAG,IAAAE,mBAAU,EACjDX,mCACD,CAAC;AAAC,IAAAY,QAAA,GAAAF,OAAA,CAAAG,OAAA,GAEaJ,wBAAwB","ignoreList":[]}
@@ -73,6 +73,7 @@ function ToggleGroupControlOptionBase(props, forwardedRef) {
73
73
  children,
74
74
  showTooltip = false,
75
75
  onFocus: onFocusProp,
76
+ disabled,
76
77
  ...otherButtonProps
77
78
  } = buttonProps;
78
79
  const isPressed = toggleGroupControlContext.value === value;
@@ -105,6 +106,7 @@ function ToggleGroupControlOptionBase(props, forwardedRef) {
105
106
  text: otherButtonProps['aria-label'],
106
107
  children: isDeselectable ? /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
107
108
  ...commonProps,
109
+ disabled: disabled,
108
110
  onFocus: onFocusProp,
109
111
  "aria-pressed": isPressed,
110
112
  type: "button",
@@ -113,6 +115,7 @@ function ToggleGroupControlOptionBase(props, forwardedRef) {
113
115
  children: children
114
116
  })
115
117
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(Ariakit.Radio, {
118
+ disabled: disabled,
116
119
  render: /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
117
120
  type: "button",
118
121
  ...commonProps,