@wordpress/components 21.2.0 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (831) hide show
  1. package/CHANGELOG.md +99 -3
  2. package/CONTRIBUTING.md +20 -0
  3. package/build/angle-picker-control/index.js +1 -1
  4. package/build/angle-picker-control/index.js.map +1 -1
  5. package/build/autocomplete/autocompleter-ui.js +28 -2
  6. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  7. package/build/border-box-control/border-box-control/component.js +65 -15
  8. package/build/border-box-control/border-box-control/component.js.map +1 -1
  9. package/build/border-box-control/border-box-control/hook.js +11 -4
  10. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  11. package/build/border-box-control/border-box-control-linked-button/hook.js +3 -3
  12. package/build/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
  13. package/build/border-box-control/border-box-control-split-controls/component.js +3 -3
  14. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  15. package/build/border-box-control/border-box-control-split-controls/hook.js +8 -11
  16. package/build/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
  17. package/build/border-box-control/border-box-control-visualizer/hook.js +3 -7
  18. package/build/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
  19. package/build/border-box-control/styles.js +34 -34
  20. package/build/border-box-control/styles.js.map +1 -1
  21. package/build/border-control/border-control/component.js +7 -4
  22. package/build/border-control/border-control/component.js.map +1 -1
  23. package/build/border-control/border-control/hook.js +12 -5
  24. package/build/border-control/border-control/hook.js.map +1 -1
  25. package/build/border-control/border-control-dropdown/hook.js +5 -5
  26. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  27. package/build/border-control/styles.js +19 -34
  28. package/build/border-control/styles.js.map +1 -1
  29. package/build/box-control/index.js +6 -2
  30. package/build/box-control/index.js.map +1 -1
  31. package/build/circular-option-picker/index.js +14 -14
  32. package/build/circular-option-picker/index.js.map +1 -1
  33. package/build/color-palette/index.js +83 -30
  34. package/build/color-palette/index.js.map +1 -1
  35. package/build/color-palette/styles.js +3 -3
  36. package/build/color-palette/styles.js.map +1 -1
  37. package/build/color-palette/types.js +6 -0
  38. package/build/color-palette/types.js.map +1 -0
  39. package/build/color-picker/input-with-slider.js +1 -1
  40. package/build/color-picker/input-with-slider.js.map +1 -1
  41. package/build/custom-gradient-picker/gradient-bar/index.js +1 -3
  42. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  43. package/build/custom-select-control/index.js +8 -4
  44. package/build/custom-select-control/index.js.map +1 -1
  45. package/build/date-time/date-time/index.js +2 -0
  46. package/build/date-time/date-time/index.js.map +1 -1
  47. package/build/date-time/time/index.js +4 -4
  48. package/build/date-time/time/index.js.map +1 -1
  49. package/build/disabled/index.js +14 -27
  50. package/build/disabled/index.js.map +1 -1
  51. package/build/external-link/index.js +13 -2
  52. package/build/external-link/index.js.map +1 -1
  53. package/build/focusable-iframe/index.js +0 -1
  54. package/build/focusable-iframe/index.js.map +1 -1
  55. package/build/font-size-picker/index.js +62 -49
  56. package/build/font-size-picker/index.js.map +1 -1
  57. package/build/font-size-picker/styles.js +5 -13
  58. package/build/font-size-picker/styles.js.map +1 -1
  59. package/build/font-size-picker/utils.js +1 -22
  60. package/build/font-size-picker/utils.js.map +1 -1
  61. package/build/form-file-upload/index.js.map +1 -1
  62. package/build/form-token-field/suggestions-list.js +5 -5
  63. package/build/form-token-field/suggestions-list.js.map +1 -1
  64. package/build/higher-order/with-fallback-styles/index.js +1 -1
  65. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  66. package/build/higher-order/with-filters/index.js +1 -7
  67. package/build/higher-order/with-filters/index.js.map +1 -1
  68. package/build/index.js +15 -7
  69. package/build/index.js.map +1 -1
  70. package/build/input-control/index.js +2 -0
  71. package/build/input-control/index.js.map +1 -1
  72. package/build/input-control/input-base.js +1 -1
  73. package/build/input-control/input-base.js.map +1 -1
  74. package/build/input-control/styles/input-control-styles.js +21 -21
  75. package/build/input-control/styles/input-control-styles.js.map +1 -1
  76. package/build/isolated-event-container/index.js +5 -9
  77. package/build/isolated-event-container/index.js.map +1 -1
  78. package/build/item-group/styles.js +10 -10
  79. package/build/item-group/styles.js.map +1 -1
  80. package/build/modal/aria-helper.js +2 -3
  81. package/build/modal/aria-helper.js.map +1 -1
  82. package/build/modal/index.js +42 -11
  83. package/build/modal/index.js.map +1 -1
  84. package/build/modal/types.js +6 -0
  85. package/build/modal/types.js.map +1 -0
  86. package/build/navigator/index.js +8 -8
  87. package/build/navigator/index.js.map +1 -1
  88. package/build/navigator/navigator-back-button/component.js +5 -4
  89. package/build/navigator/navigator-back-button/component.js.map +1 -1
  90. package/build/navigator/navigator-back-button/index.js +1 -1
  91. package/build/navigator/navigator-back-button/index.js.map +1 -1
  92. package/build/navigator/navigator-button/component.js +5 -4
  93. package/build/navigator/navigator-button/component.js.map +1 -1
  94. package/build/navigator/navigator-button/index.js +1 -1
  95. package/build/navigator/navigator-button/index.js.map +1 -1
  96. package/build/navigator/navigator-provider/component.js +10 -7
  97. package/build/navigator/navigator-provider/component.js.map +1 -1
  98. package/build/navigator/navigator-provider/index.js +1 -1
  99. package/build/navigator/navigator-provider/index.js.map +1 -1
  100. package/build/navigator/navigator-screen/component.js +11 -8
  101. package/build/navigator/navigator-screen/component.js.map +1 -1
  102. package/build/navigator/navigator-screen/index.js +1 -1
  103. package/build/navigator/navigator-screen/index.js.map +1 -1
  104. package/build/number-control/index.js +82 -22
  105. package/build/number-control/index.js.map +1 -1
  106. package/build/number-control/styles/number-control-styles.js +36 -6
  107. package/build/number-control/styles/number-control-styles.js.map +1 -1
  108. package/build/popover/index.js +15 -29
  109. package/build/popover/index.js.map +1 -1
  110. package/build/radio-group/index.js +7 -1
  111. package/build/radio-group/index.js.map +1 -1
  112. package/build/{radio → radio-group/radio}/index.js +7 -1
  113. package/build/radio-group/radio/index.js.map +1 -0
  114. package/build/{radio-context → radio-group/radio-context}/index.js +0 -0
  115. package/build/radio-group/radio-context/index.js.map +1 -0
  116. package/build/sandbox/index.js +55 -59
  117. package/build/sandbox/index.js.map +1 -1
  118. package/build/sandbox/index.native.js +63 -62
  119. package/build/sandbox/index.native.js.map +1 -1
  120. package/build/slot-fill/bubbles-virtually/fill.js +9 -5
  121. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  122. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  123. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  124. package/build/slot-fill/bubbles-virtually/slot.js +13 -8
  125. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  126. package/build/slot-fill/bubbles-virtually/use-slot.js +15 -9
  127. package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  128. package/build/slot-fill/fill.js +12 -4
  129. package/build/slot-fill/fill.js.map +1 -1
  130. package/build/slot-fill/use-slot.js +3 -1
  131. package/build/slot-fill/use-slot.js.map +1 -1
  132. package/build/snackbar/index.js +1 -1
  133. package/build/snackbar/index.js.map +1 -1
  134. package/build/tab-panel/index.js +5 -9
  135. package/build/tab-panel/index.js.map +1 -1
  136. package/build/text-control/index.js +0 -2
  137. package/build/text-control/index.js.map +1 -1
  138. package/build/theme/index.js +62 -0
  139. package/build/theme/index.js.map +1 -0
  140. package/build/theme/styles.js +33 -0
  141. package/build/theme/styles.js.map +1 -0
  142. package/build/theme/types.js +6 -0
  143. package/build/theme/types.js.map +1 -0
  144. package/build/toggle-control/index.js +15 -3
  145. package/build/toggle-control/index.js.map +1 -1
  146. package/build/toggle-group-control/toggle-group-control/as-button-group.js +90 -0
  147. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -0
  148. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +90 -0
  149. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -0
  150. package/build/toggle-group-control/toggle-group-control/component.js +21 -50
  151. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  152. package/build/toggle-group-control/toggle-group-control/styles.js +8 -8
  153. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  154. package/build/toggle-group-control/toggle-group-control-option-base/component.js +39 -17
  155. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  156. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +23 -23
  157. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  158. package/build/toolbar-dropdown-menu/index.js +1 -1
  159. package/build/toolbar-dropdown-menu/index.js.map +1 -1
  160. package/build/tools-panel/tools-panel/hook.js +3 -3
  161. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  162. package/build/tools-panel/tools-panel-item/hook.js +6 -6
  163. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  164. package/build/tooltip/index.js +4 -1
  165. package/build/tooltip/index.js.map +1 -1
  166. package/build/tooltip/index.native.js +17 -4
  167. package/build/tooltip/index.native.js.map +1 -1
  168. package/build/ui/context/context-system-provider.js +9 -22
  169. package/build/ui/context/context-system-provider.js.map +1 -1
  170. package/build/unit-control/index.js +7 -9
  171. package/build/unit-control/index.js.map +1 -1
  172. package/build/unit-control/styles/unit-control-styles.js +15 -25
  173. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  174. package/build/utils/config-values.js +0 -1
  175. package/build/utils/config-values.js.map +1 -1
  176. package/build/utils/hooks/use-update-effect.js +5 -1
  177. package/build/utils/hooks/use-update-effect.js.map +1 -1
  178. package/build-module/angle-picker-control/index.js +1 -1
  179. package/build-module/angle-picker-control/index.js.map +1 -1
  180. package/build-module/autocomplete/autocompleter-ui.js +29 -3
  181. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  182. package/build-module/border-box-control/border-box-control/component.js +63 -13
  183. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  184. package/build-module/border-box-control/border-box-control/hook.js +11 -4
  185. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  186. package/build-module/border-box-control/border-box-control-linked-button/hook.js +3 -3
  187. package/build-module/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
  188. package/build-module/border-box-control/border-box-control-split-controls/component.js +3 -3
  189. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  190. package/build-module/border-box-control/border-box-control-split-controls/hook.js +9 -10
  191. package/build-module/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
  192. package/build-module/border-box-control/border-box-control-visualizer/hook.js +4 -6
  193. package/build-module/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
  194. package/build-module/border-box-control/styles.js +26 -28
  195. package/build-module/border-box-control/styles.js.map +1 -1
  196. package/build-module/border-control/border-control/component.js +7 -4
  197. package/build-module/border-control/border-control/component.js.map +1 -1
  198. package/build-module/border-control/border-control/hook.js +12 -5
  199. package/build-module/border-control/border-control/hook.js.map +1 -1
  200. package/build-module/border-control/border-control-dropdown/hook.js +5 -5
  201. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  202. package/build-module/border-control/styles.js +20 -36
  203. package/build-module/border-control/styles.js.map +1 -1
  204. package/build-module/box-control/index.js +6 -2
  205. package/build-module/box-control/index.js.map +1 -1
  206. package/build-module/circular-option-picker/index.js +14 -14
  207. package/build-module/circular-option-picker/index.js.map +1 -1
  208. package/build-module/color-palette/index.js +81 -28
  209. package/build-module/color-palette/index.js.map +1 -1
  210. package/build-module/color-palette/styles.js +3 -3
  211. package/build-module/color-palette/styles.js.map +1 -1
  212. package/build-module/color-palette/types.js +2 -0
  213. package/build-module/color-palette/types.js.map +1 -0
  214. package/build-module/color-picker/input-with-slider.js +1 -1
  215. package/build-module/color-picker/input-with-slider.js.map +1 -1
  216. package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -2
  217. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  218. package/build-module/custom-select-control/index.js +8 -4
  219. package/build-module/custom-select-control/index.js.map +1 -1
  220. package/build-module/date-time/date-time/index.js +2 -0
  221. package/build-module/date-time/date-time/index.js.map +1 -1
  222. package/build-module/date-time/time/index.js +4 -4
  223. package/build-module/date-time/time/index.js.map +1 -1
  224. package/build-module/disabled/index.js +15 -27
  225. package/build-module/disabled/index.js.map +1 -1
  226. package/build-module/external-link/index.js +13 -2
  227. package/build-module/external-link/index.js.map +1 -1
  228. package/build-module/focusable-iframe/index.js +0 -1
  229. package/build-module/focusable-iframe/index.js.map +1 -1
  230. package/build-module/font-size-picker/index.js +66 -51
  231. package/build-module/font-size-picker/index.js.map +1 -1
  232. package/build-module/font-size-picker/styles.js +5 -13
  233. package/build-module/font-size-picker/styles.js.map +1 -1
  234. package/build-module/font-size-picker/utils.js +1 -20
  235. package/build-module/font-size-picker/utils.js.map +1 -1
  236. package/build-module/form-file-upload/index.js.map +1 -1
  237. package/build-module/form-token-field/suggestions-list.js +5 -5
  238. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  239. package/build-module/higher-order/with-fallback-styles/index.js +2 -2
  240. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  241. package/build-module/higher-order/with-filters/index.js +1 -6
  242. package/build-module/higher-order/with-filters/index.js.map +1 -1
  243. package/build-module/index.js +4 -3
  244. package/build-module/index.js.map +1 -1
  245. package/build-module/input-control/index.js +2 -0
  246. package/build-module/input-control/index.js.map +1 -1
  247. package/build-module/input-control/input-base.js +1 -1
  248. package/build-module/input-control/input-base.js.map +1 -1
  249. package/build-module/input-control/styles/input-control-styles.js +21 -21
  250. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  251. package/build-module/isolated-event-container/index.js +7 -9
  252. package/build-module/isolated-event-container/index.js.map +1 -1
  253. package/build-module/item-group/styles.js +10 -10
  254. package/build-module/item-group/styles.js.map +1 -1
  255. package/build-module/modal/aria-helper.js +2 -3
  256. package/build-module/modal/aria-helper.js.map +1 -1
  257. package/build-module/modal/index.js +44 -12
  258. package/build-module/modal/index.js.map +1 -1
  259. package/build-module/modal/types.js +2 -0
  260. package/build-module/modal/types.js.map +1 -0
  261. package/build-module/navigator/index.js +4 -4
  262. package/build-module/navigator/index.js.map +1 -1
  263. package/build-module/navigator/navigator-back-button/component.js +3 -3
  264. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  265. package/build-module/navigator/navigator-back-button/index.js +1 -1
  266. package/build-module/navigator/navigator-back-button/index.js.map +1 -1
  267. package/build-module/navigator/navigator-button/component.js +3 -3
  268. package/build-module/navigator/navigator-button/component.js.map +1 -1
  269. package/build-module/navigator/navigator-button/index.js +1 -1
  270. package/build-module/navigator/navigator-button/index.js.map +1 -1
  271. package/build-module/navigator/navigator-provider/component.js +8 -6
  272. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  273. package/build-module/navigator/navigator-provider/index.js +1 -1
  274. package/build-module/navigator/navigator-provider/index.js.map +1 -1
  275. package/build-module/navigator/navigator-screen/component.js +9 -7
  276. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  277. package/build-module/navigator/navigator-screen/index.js +1 -1
  278. package/build-module/navigator/navigator-screen/index.js.map +1 -1
  279. package/build-module/number-control/index.js +81 -26
  280. package/build-module/number-control/index.js.map +1 -1
  281. package/build-module/number-control/styles/number-control-styles.js +30 -4
  282. package/build-module/number-control/styles/number-control-styles.js.map +1 -1
  283. package/build-module/popover/index.js +15 -29
  284. package/build-module/popover/index.js.map +1 -1
  285. package/build-module/radio-group/index.js +6 -1
  286. package/build-module/radio-group/index.js.map +1 -1
  287. package/build-module/{radio → radio-group/radio}/index.js +6 -1
  288. package/build-module/radio-group/radio/index.js.map +1 -0
  289. package/build-module/{radio-context → radio-group/radio-context}/index.js +0 -0
  290. package/build-module/radio-group/radio-context/index.js.map +1 -0
  291. package/build-module/sandbox/index.js +56 -59
  292. package/build-module/sandbox/index.js.map +1 -1
  293. package/build-module/sandbox/index.native.js +54 -52
  294. package/build-module/sandbox/index.native.js.map +1 -1
  295. package/build-module/slot-fill/bubbles-virtually/fill.js +9 -5
  296. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  297. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  298. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  299. package/build-module/slot-fill/bubbles-virtually/slot.js +13 -8
  300. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  301. package/build-module/slot-fill/bubbles-virtually/use-slot.js +15 -9
  302. package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  303. package/build-module/slot-fill/fill.js +12 -4
  304. package/build-module/slot-fill/fill.js.map +1 -1
  305. package/build-module/slot-fill/use-slot.js +3 -1
  306. package/build-module/slot-fill/use-slot.js.map +1 -1
  307. package/build-module/snackbar/index.js +1 -1
  308. package/build-module/snackbar/index.js.map +1 -1
  309. package/build-module/tab-panel/index.js +5 -9
  310. package/build-module/tab-panel/index.js.map +1 -1
  311. package/build-module/text-control/index.js +0 -2
  312. package/build-module/text-control/index.js.map +1 -1
  313. package/build-module/theme/index.js +52 -0
  314. package/build-module/theme/index.js.map +1 -0
  315. package/build-module/theme/styles.js +25 -0
  316. package/build-module/theme/styles.js.map +1 -0
  317. package/build-module/theme/types.js +2 -0
  318. package/build-module/theme/types.js.map +1 -0
  319. package/build-module/toggle-control/index.js +15 -3
  320. package/build-module/toggle-control/index.js.map +1 -1
  321. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +76 -0
  322. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -0
  323. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +75 -0
  324. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -0
  325. package/build-module/toggle-group-control/toggle-group-control/component.js +19 -49
  326. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  327. package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -6
  328. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  329. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +39 -17
  330. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  331. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +21 -18
  332. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  333. package/build-module/toolbar-dropdown-menu/index.js +1 -1
  334. package/build-module/toolbar-dropdown-menu/index.js.map +1 -1
  335. package/build-module/tools-panel/tools-panel/hook.js +3 -3
  336. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  337. package/build-module/tools-panel/tools-panel-item/hook.js +6 -6
  338. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  339. package/build-module/tooltip/index.js +4 -1
  340. package/build-module/tooltip/index.js.map +1 -1
  341. package/build-module/tooltip/index.native.js +17 -4
  342. package/build-module/tooltip/index.native.js.map +1 -1
  343. package/build-module/ui/context/context-system-provider.js +6 -20
  344. package/build-module/ui/context/context-system-provider.js.map +1 -1
  345. package/build-module/unit-control/index.js +8 -10
  346. package/build-module/unit-control/index.js.map +1 -1
  347. package/build-module/unit-control/styles/unit-control-styles.js +8 -24
  348. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  349. package/build-module/utils/config-values.js +0 -1
  350. package/build-module/utils/config-values.js.map +1 -1
  351. package/build-module/utils/hooks/use-update-effect.js +5 -1
  352. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  353. package/build-style/style-rtl.css +45 -61
  354. package/build-style/style.css +43 -59
  355. package/build-types/base-field/hook.d.ts +11 -11
  356. package/build-types/border-box-control/border-box-control/component.d.ts +53 -4
  357. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  358. package/build-types/border-box-control/border-box-control/hook.d.ts +14 -12
  359. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  360. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +12 -12
  361. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  362. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +1 -1
  363. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  364. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +12 -12
  365. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  366. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +12 -12
  367. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  368. package/build-types/border-box-control/stories/index.d.ts +17 -0
  369. package/build-types/border-box-control/stories/index.d.ts.map +1 -0
  370. package/build-types/border-box-control/styles.d.ts +7 -6
  371. package/build-types/border-box-control/styles.d.ts.map +1 -1
  372. package/build-types/border-box-control/types.d.ts +12 -16
  373. package/build-types/border-box-control/types.d.ts.map +1 -1
  374. package/build-types/border-control/border-control/component.d.ts +2 -1
  375. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  376. package/build-types/border-control/border-control/hook.d.ts +14 -13
  377. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  378. package/build-types/border-control/border-control-dropdown/component.d.ts +1 -1
  379. package/build-types/border-control/border-control-dropdown/hook.d.ts +11 -11
  380. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  381. package/build-types/border-control/border-control-style-picker/hook.d.ts +11 -11
  382. package/build-types/border-control/stories/index.d.ts +12 -6
  383. package/build-types/border-control/stories/index.d.ts.map +1 -1
  384. package/build-types/border-control/styles.d.ts +3 -3
  385. package/build-types/border-control/styles.d.ts.map +1 -1
  386. package/build-types/border-control/types.d.ts +11 -9
  387. package/build-types/border-control/types.d.ts.map +1 -1
  388. package/build-types/card/card/hook.d.ts +12 -12
  389. package/build-types/card/card-body/hook.d.ts +12 -12
  390. package/build-types/card/card-divider/hook.d.ts +13 -13
  391. package/build-types/card/card-footer/hook.d.ts +12 -12
  392. package/build-types/card/card-header/hook.d.ts +12 -12
  393. package/build-types/card/card-media/hook.d.ts +12 -12
  394. package/build-types/card/stories/index.d.ts.map +1 -1
  395. package/build-types/circular-option-picker/index.d.ts +4 -24
  396. package/build-types/circular-option-picker/index.d.ts.map +1 -1
  397. package/build-types/color-palette/index.d.ts +33 -18
  398. package/build-types/color-palette/index.d.ts.map +1 -1
  399. package/build-types/color-palette/stories/index.d.ts +21 -0
  400. package/build-types/color-palette/stories/index.d.ts.map +1 -0
  401. package/build-types/color-palette/styles.d.ts +3 -2
  402. package/build-types/color-palette/styles.d.ts.map +1 -1
  403. package/build-types/color-palette/test/index.d.ts +2 -0
  404. package/build-types/color-palette/test/index.d.ts.map +1 -0
  405. package/build-types/color-palette/types.d.ts +86 -0
  406. package/build-types/color-palette/types.d.ts.map +1 -0
  407. package/build-types/color-picker/styles.d.ts +5 -4
  408. package/build-types/color-picker/styles.d.ts.map +1 -1
  409. package/build-types/confirm-dialog/component.d.ts +4 -4
  410. package/build-types/confirm-dialog/types.d.ts +5 -1
  411. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  412. package/build-types/custom-select-control/index.d.ts +1 -12
  413. package/build-types/custom-select-control/index.d.ts.map +1 -1
  414. package/build-types/custom-select-control/styles.d.ts +3 -1
  415. package/build-types/custom-select-control/styles.d.ts.map +1 -1
  416. package/build-types/date-time/date/styles.d.ts +3 -3
  417. package/build-types/date-time/date-time/index.d.ts +2 -0
  418. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  419. package/build-types/date-time/date-time/styles.d.ts +3 -3
  420. package/build-types/date-time/stories/date-time.d.ts.map +1 -1
  421. package/build-types/date-time/time/styles.d.ts +8 -4
  422. package/build-types/date-time/time/styles.d.ts.map +1 -1
  423. package/build-types/disabled/index.d.ts +8 -1
  424. package/build-types/disabled/index.d.ts.map +1 -1
  425. package/build-types/elevation/hook.d.ts +12 -12
  426. package/build-types/external-link/index.d.ts.map +1 -1
  427. package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
  428. package/build-types/external-link/test/index.d.ts +2 -0
  429. package/build-types/external-link/test/index.d.ts.map +1 -0
  430. package/build-types/flex/flex/hook.d.ts +12 -12
  431. package/build-types/flex/flex-block/hook.d.ts +12 -12
  432. package/build-types/flex/flex-item/hook.d.ts +12 -12
  433. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +2 -2
  434. package/build-types/focal-point-picker/styles/focal-point-style.d.ts +3 -3
  435. package/build-types/focusable-iframe/index.d.ts.map +1 -1
  436. package/build-types/font-size-picker/index.d.ts.map +1 -1
  437. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  438. package/build-types/font-size-picker/types.d.ts +1 -1
  439. package/build-types/font-size-picker/utils.d.ts +0 -8
  440. package/build-types/font-size-picker/utils.d.ts.map +1 -1
  441. package/build-types/form-file-upload/index.d.ts.map +1 -1
  442. package/build-types/form-file-upload/types.d.ts +5 -4
  443. package/build-types/form-file-upload/types.d.ts.map +1 -1
  444. package/build-types/grid/hook.d.ts +12 -12
  445. package/build-types/h-stack/component.d.ts +1 -1
  446. package/build-types/h-stack/hook.d.ts +12 -12
  447. package/build-types/heading/hook.d.ts +12 -12
  448. package/build-types/input-control/index.d.ts +1 -1
  449. package/build-types/input-control/index.d.ts.map +1 -1
  450. package/build-types/input-control/input-base.d.ts +5 -2
  451. package/build-types/input-control/input-base.d.ts.map +1 -1
  452. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  453. package/build-types/input-control/types.d.ts +3 -8
  454. package/build-types/input-control/types.d.ts.map +1 -1
  455. package/build-types/input-control/utils.d.ts +1 -1
  456. package/build-types/isolated-event-container/index.d.ts +3 -2
  457. package/build-types/isolated-event-container/index.d.ts.map +1 -1
  458. package/build-types/item-group/item/hook.d.ts +13 -13
  459. package/build-types/item-group/item-group/hook.d.ts +13 -13
  460. package/build-types/modal/aria-helper.d.ts +4 -4
  461. package/build-types/modal/aria-helper.d.ts.map +1 -1
  462. package/build-types/modal/index.d.ts +35 -2
  463. package/build-types/modal/index.d.ts.map +1 -1
  464. package/build-types/modal/stories/index.d.ts +9 -0
  465. package/build-types/modal/stories/index.d.ts.map +1 -0
  466. package/build-types/modal/test/aria-helper.d.ts +2 -0
  467. package/build-types/modal/test/aria-helper.d.ts.map +1 -0
  468. package/build-types/modal/test/index.d.ts +2 -0
  469. package/build-types/modal/test/index.d.ts.map +1 -0
  470. package/build-types/modal/types.d.ts +134 -0
  471. package/build-types/modal/types.d.ts.map +1 -0
  472. package/build-types/navigator/index.d.ts +4 -4
  473. package/build-types/navigator/index.d.ts.map +1 -1
  474. package/build-types/navigator/navigator-back-button/component.d.ts +4 -2
  475. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  476. package/build-types/navigator/navigator-back-button/hook.d.ts +14 -13
  477. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  478. package/build-types/navigator/navigator-back-button/index.d.ts +1 -1
  479. package/build-types/navigator/navigator-back-button/index.d.ts.map +1 -1
  480. package/build-types/navigator/navigator-button/component.d.ts +4 -2
  481. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  482. package/build-types/navigator/navigator-button/hook.d.ts +14 -13
  483. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  484. package/build-types/navigator/navigator-button/index.d.ts +1 -1
  485. package/build-types/navigator/navigator-button/index.d.ts.map +1 -1
  486. package/build-types/navigator/navigator-provider/component.d.ts +2 -2
  487. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  488. package/build-types/navigator/navigator-provider/index.d.ts +1 -1
  489. package/build-types/navigator/navigator-provider/index.d.ts.map +1 -1
  490. package/build-types/navigator/navigator-screen/component.d.ts +2 -2
  491. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  492. package/build-types/navigator/navigator-screen/index.d.ts +1 -1
  493. package/build-types/navigator/navigator-screen/index.d.ts.map +1 -1
  494. package/build-types/navigator/stories/index.d.ts +9 -0
  495. package/build-types/navigator/stories/index.d.ts.map +1 -0
  496. package/build-types/navigator/test/index.d.ts +2 -0
  497. package/build-types/navigator/test/index.d.ts.map +1 -0
  498. package/build-types/navigator/types.d.ts +4 -1
  499. package/build-types/navigator/types.d.ts.map +1 -1
  500. package/build-types/number-control/index.d.ts +2 -4
  501. package/build-types/number-control/index.d.ts.map +1 -1
  502. package/build-types/number-control/styles/number-control-styles.d.ts +5 -0
  503. package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
  504. package/build-types/number-control/types.d.ts +12 -0
  505. package/build-types/number-control/types.d.ts.map +1 -1
  506. package/build-types/popover/index.d.ts +1 -1
  507. package/build-types/popover/index.d.ts.map +1 -1
  508. package/build-types/popover/stories/e2e/index.d.ts +1 -1
  509. package/build-types/popover/stories/index.d.ts +2 -0
  510. package/build-types/popover/stories/index.d.ts.map +1 -1
  511. package/build-types/popover/types.d.ts +18 -14
  512. package/build-types/popover/types.d.ts.map +1 -1
  513. package/build-types/radio-group/index.d.ts +10 -0
  514. package/build-types/radio-group/index.d.ts.map +1 -0
  515. package/build-types/radio-group/radio/index.d.ts +7 -0
  516. package/build-types/radio-group/radio/index.d.ts.map +1 -0
  517. package/build-types/{radio-context → radio-group/radio-context}/index.d.ts +0 -0
  518. package/build-types/radio-group/radio-context/index.d.ts.map +1 -0
  519. package/build-types/range-control/index.d.ts +1 -1
  520. package/build-types/range-control/styles/range-control-styles.d.ts +2 -1
  521. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  522. package/build-types/resizable-box/index.d.ts +1 -1
  523. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  524. package/build-types/resizable-box/resize-tooltip/label.d.ts +1 -1
  525. package/build-types/scrollable/hook.d.ts +12 -12
  526. package/build-types/search-control/index.d.ts +2 -2
  527. package/build-types/search-control/stories/index.d.ts +4 -4
  528. package/build-types/select-control/stories/index.d.ts.map +1 -1
  529. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  530. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  531. package/build-types/slot-fill/fill.d.ts.map +1 -1
  532. package/build-types/slot-fill/use-slot.d.ts.map +1 -1
  533. package/build-types/spacer/hook.d.ts +12 -12
  534. package/build-types/spinner/index.d.ts +1 -1
  535. package/build-types/surface/hook.d.ts +12 -12
  536. package/build-types/tab-panel/index.d.ts.map +1 -1
  537. package/build-types/text/hook.d.ts +12 -12
  538. package/build-types/text-control/index.d.ts +2 -4
  539. package/build-types/text-control/index.d.ts.map +1 -1
  540. package/build-types/text-control/stories/index.d.ts.map +1 -1
  541. package/build-types/theme/index.d.ts +31 -0
  542. package/build-types/theme/index.d.ts.map +1 -0
  543. package/build-types/theme/stories/index.d.ts +13 -0
  544. package/build-types/theme/stories/index.d.ts.map +1 -0
  545. package/build-types/theme/styles.d.ts +10 -0
  546. package/build-types/theme/styles.d.ts.map +1 -0
  547. package/build-types/theme/test/index.d.ts +2 -0
  548. package/build-types/theme/test/index.d.ts.map +1 -0
  549. package/build-types/theme/types.d.ts +21 -0
  550. package/build-types/theme/types.d.ts.map +1 -0
  551. package/build-types/toggle-control/index.d.ts.map +1 -1
  552. package/build-types/toggle-control/types.d.ts +2 -1
  553. package/build-types/toggle-control/types.d.ts.map +1 -1
  554. package/build-types/toggle-group-control/stories/index.d.ts +2 -2
  555. package/build-types/toggle-group-control/stories/index.d.ts.map +1 -1
  556. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +6 -0
  557. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -0
  558. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +6 -0
  559. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -0
  560. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +2 -2
  561. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  562. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +2 -2
  563. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  564. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  565. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +4 -7
  566. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  567. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  568. package/build-types/toggle-group-control/types.d.ts +19 -14
  569. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  570. package/build-types/tools-panel/tools-panel/hook.d.ts +12 -12
  571. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  572. package/build-types/tools-panel/tools-panel-header/hook.d.ts +12 -12
  573. package/build-types/tools-panel/tools-panel-item/hook.d.ts +12 -12
  574. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  575. package/build-types/tooltip/index.d.ts.map +1 -1
  576. package/build-types/truncate/hook.d.ts +12 -12
  577. package/build-types/ui/context/context-system-provider.d.ts.map +1 -1
  578. package/build-types/ui/control-group/hook.d.ts +12 -12
  579. package/build-types/ui/control-label/component.d.ts +1 -1
  580. package/build-types/ui/control-label/hook.d.ts +12 -12
  581. package/build-types/ui/form-group/form-group.d.ts +4 -4
  582. package/build-types/ui/form-group/use-form-group.d.ts +28 -28
  583. package/build-types/unit-control/index.d.ts +2 -2
  584. package/build-types/unit-control/index.d.ts.map +1 -1
  585. package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -5
  586. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  587. package/build-types/unit-control/types.d.ts +3 -3
  588. package/build-types/unit-control/types.d.ts.map +1 -1
  589. package/build-types/utils/config-values.d.ts +0 -1
  590. package/build-types/utils/hooks/use-update-effect.d.ts.map +1 -1
  591. package/build-types/utils/types.d.ts +0 -14
  592. package/build-types/utils/types.d.ts.map +1 -1
  593. package/build-types/v-stack/component.d.ts +2 -2
  594. package/build-types/v-stack/hook.d.ts +12 -12
  595. package/build-types/v-stack/stories/index.d.ts +2 -2
  596. package/package.json +17 -17
  597. package/src/angle-picker-control/index.js +1 -1
  598. package/src/angle-picker-control/stories/index.js +3 -0
  599. package/src/autocomplete/autocompleter-ui.js +29 -2
  600. package/src/autocomplete/test/index.js +89 -0
  601. package/src/base-field/test/index.js +4 -6
  602. package/src/border-box-control/border-box-control/README.md +8 -0
  603. package/src/border-box-control/border-box-control/component.tsx +66 -13
  604. package/src/border-box-control/border-box-control/hook.ts +11 -2
  605. package/src/border-box-control/border-box-control-linked-button/hook.ts +3 -6
  606. package/src/border-box-control/border-box-control-split-controls/component.tsx +3 -6
  607. package/src/border-box-control/border-box-control-split-controls/hook.ts +11 -14
  608. package/src/border-box-control/border-box-control-visualizer/hook.ts +4 -7
  609. package/src/border-box-control/stories/index.tsx +90 -0
  610. package/src/border-box-control/styles.ts +28 -22
  611. package/src/border-box-control/test/index.js +291 -121
  612. package/src/border-box-control/types.ts +12 -16
  613. package/src/border-control/border-control/README.md +14 -0
  614. package/src/border-control/border-control/component.tsx +6 -3
  615. package/src/border-control/border-control/hook.ts +10 -6
  616. package/src/border-control/border-control-dropdown/hook.ts +5 -7
  617. package/src/border-control/stories/index.tsx +12 -14
  618. package/src/border-control/styles.ts +20 -23
  619. package/src/border-control/test/index.js +139 -96
  620. package/src/border-control/types.ts +11 -9
  621. package/src/box-control/README.md +14 -0
  622. package/src/box-control/index.js +4 -0
  623. package/src/box-control/stories/index.js +8 -27
  624. package/src/button/README.md +2 -15
  625. package/src/button/stories/index.js +109 -178
  626. package/src/button/style.scss +40 -77
  627. package/src/button/test/index.js +3 -5
  628. package/src/card/stories/index.tsx +27 -31
  629. package/src/card/test/__snapshots__/index.tsx.snap +36 -35
  630. package/src/card/test/index.tsx +2 -6
  631. package/src/circular-option-picker/index.js +14 -20
  632. package/src/color-palette/README.md +51 -49
  633. package/src/color-palette/{index.js → index.tsx} +132 -51
  634. package/src/color-palette/stories/{index.js → index.tsx} +38 -27
  635. package/src/color-palette/style.scss +2 -2
  636. package/src/color-palette/{styles.js → styles.ts} +0 -0
  637. package/src/color-palette/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
  638. package/src/color-palette/test/{index.js → index.tsx} +1 -1
  639. package/src/color-palette/types.ts +93 -0
  640. package/src/color-picker/input-with-slider.tsx +1 -1
  641. package/src/combobox-control/test/index.js +1 -1
  642. package/src/confirm-dialog/types.ts +6 -0
  643. package/src/custom-gradient-picker/gradient-bar/index.js +1 -3
  644. package/src/custom-select-control/README.md +14 -0
  645. package/src/custom-select-control/index.js +22 -15
  646. package/src/date-time/date-time/index.tsx +2 -0
  647. package/src/date-time/stories/date-time.tsx +4 -0
  648. package/src/date-time/time/index.tsx +4 -4
  649. package/src/date-time/time/test/index.tsx +2 -6
  650. package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -0
  651. package/src/disabled/README.md +2 -0
  652. package/src/disabled/index.tsx +19 -34
  653. package/src/disabled/test/index.tsx +9 -82
  654. package/src/dropdown/test/index.js +4 -3
  655. package/src/external-link/index.tsx +14 -6
  656. package/src/external-link/test/index.tsx +106 -0
  657. package/src/focusable-iframe/index.js +0 -1
  658. package/src/font-size-picker/README.md +3 -3
  659. package/src/font-size-picker/index.tsx +153 -143
  660. package/src/font-size-picker/styles.ts +3 -1
  661. package/src/font-size-picker/test/index.tsx +447 -174
  662. package/src/font-size-picker/test/utils.ts +6 -50
  663. package/src/font-size-picker/types.ts +1 -1
  664. package/src/font-size-picker/utils.ts +1 -23
  665. package/src/form-file-upload/README.md +1 -3
  666. package/src/form-file-upload/index.tsx +1 -0
  667. package/src/form-file-upload/test/index.tsx +1 -1
  668. package/src/form-file-upload/types.ts +5 -4
  669. package/src/form-toggle/test/__snapshots__/index.tsx.snap +15 -13
  670. package/src/form-toggle/test/index.tsx +1 -1
  671. package/src/form-token-field/suggestions-list.tsx +5 -5
  672. package/src/h-stack/test/__snapshots__/index.tsx.snap +36 -30
  673. package/src/h-stack/test/index.tsx +3 -3
  674. package/src/higher-order/with-fallback-styles/index.js +6 -2
  675. package/src/higher-order/with-filters/index.js +4 -9
  676. package/src/higher-order/with-focus-outside/test/index.js +44 -45
  677. package/src/higher-order/with-focus-return/test/index.js +34 -30
  678. package/src/higher-order/with-notices/test/index.js +1 -1
  679. package/src/index.js +4 -2
  680. package/src/input-control/index.tsx +2 -0
  681. package/src/input-control/input-base.tsx +3 -3
  682. package/src/input-control/styles/input-control-styles.tsx +1 -0
  683. package/src/input-control/test/index.js +2 -2
  684. package/src/input-control/types.ts +4 -11
  685. package/src/isolated-event-container/index.tsx +32 -0
  686. package/src/item-group/styles.ts +1 -1
  687. package/src/item-group/test/__snapshots__/index.js.snap +90 -85
  688. package/src/item-group/test/index.js +8 -18
  689. package/src/menu-item/test/index.js +0 -3
  690. package/src/mobile/bottom-sheet/test/range-cell.native.js +16 -14
  691. package/src/modal/README.md +53 -54
  692. package/src/modal/{aria-helper.js → aria-helper.ts} +5 -7
  693. package/src/modal/{index.js → index.tsx} +48 -12
  694. package/src/modal/stories/{index.js → index.tsx} +47 -42
  695. package/src/modal/test/{aria-helper.js → aria-helper.ts} +0 -0
  696. package/src/modal/test/{index.js → index.tsx} +13 -3
  697. package/src/modal/types.ts +144 -0
  698. package/src/navigation/test/index.js +1 -1
  699. package/src/navigator/index.ts +4 -4
  700. package/src/navigator/navigator-back-button/component.tsx +4 -4
  701. package/src/navigator/navigator-back-button/index.ts +1 -1
  702. package/src/navigator/navigator-button/component.tsx +4 -4
  703. package/src/navigator/navigator-button/index.ts +1 -1
  704. package/src/navigator/navigator-provider/component.tsx +6 -4
  705. package/src/navigator/navigator-provider/index.ts +1 -1
  706. package/src/navigator/navigator-screen/component.tsx +17 -6
  707. package/src/navigator/navigator-screen/index.ts +1 -1
  708. package/src/navigator/stories/index.tsx +210 -0
  709. package/src/navigator/test/index.tsx +509 -0
  710. package/src/navigator/types.ts +2 -0
  711. package/src/notice/test/__snapshots__/index.js.snap +39 -38
  712. package/src/notice/test/index.js +15 -36
  713. package/src/notice/test/list.js +6 -14
  714. package/src/number-control/README.md +9 -4
  715. package/src/number-control/index.tsx +100 -33
  716. package/src/number-control/styles/number-control-styles.js +26 -1
  717. package/src/number-control/test/index.js +53 -2
  718. package/src/number-control/types.ts +12 -0
  719. package/src/panel/test/body.js +2 -2
  720. package/src/placeholder/style.scss +5 -0
  721. package/src/popover/README.md +12 -7
  722. package/src/popover/index.tsx +20 -30
  723. package/src/popover/stories/index.tsx +29 -1
  724. package/src/popover/style.scss +9 -0
  725. package/src/popover/types.ts +18 -15
  726. package/src/radio-group/README.md +4 -0
  727. package/src/radio-group/index.js +6 -1
  728. package/src/{radio → radio-group/radio}/index.js +6 -1
  729. package/src/{radio-context → radio-group/radio-context}/index.js +0 -0
  730. package/src/radio-group/stories/index.js +11 -2
  731. package/src/sandbox/index.js +62 -47
  732. package/src/sandbox/index.native.js +72 -52
  733. package/src/sandbox/test/index.js +8 -11
  734. package/src/select-control/stories/index.tsx +9 -4
  735. package/src/shortcut/test/index.tsx +1 -1
  736. package/src/slot-fill/bubbles-virtually/fill.js +5 -5
  737. package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +5 -3
  738. package/src/slot-fill/bubbles-virtually/slot.js +10 -8
  739. package/src/slot-fill/bubbles-virtually/use-slot.js +15 -9
  740. package/src/slot-fill/fill.js +12 -2
  741. package/src/slot-fill/use-slot.js +3 -0
  742. package/src/snackbar/index.js +1 -1
  743. package/src/style.scss +4 -0
  744. package/src/surface/test/__snapshots__/index.tsx.snap +58 -46
  745. package/src/surface/test/index.tsx +6 -16
  746. package/src/tab-panel/index.tsx +5 -9
  747. package/src/tab-panel/test/index.tsx +78 -1
  748. package/src/text/test/__snapshots__/index.tsx.snap +19 -15
  749. package/src/text/test/index.tsx +2 -2
  750. package/src/text-control/index.tsx +0 -2
  751. package/src/text-control/stories/index.tsx +5 -6
  752. package/src/text-highlight/test/index.tsx +1 -3
  753. package/src/theme/README.md +34 -0
  754. package/src/theme/index.tsx +51 -0
  755. package/src/theme/stories/index.tsx +47 -0
  756. package/src/theme/styles.ts +28 -0
  757. package/src/theme/test/index.tsx +101 -0
  758. package/src/theme/types.ts +21 -0
  759. package/src/toggle-control/README.md +6 -4
  760. package/src/toggle-control/index.tsx +13 -2
  761. package/src/toggle-control/types.ts +2 -4
  762. package/src/toggle-group-control/stories/index.tsx +4 -4
  763. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +219 -160
  764. package/src/toggle-group-control/test/index.tsx +129 -2
  765. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +103 -0
  766. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +99 -0
  767. package/src/toggle-group-control/toggle-group-control/component.tsx +29 -74
  768. package/src/toggle-group-control/toggle-group-control/styles.ts +12 -10
  769. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +49 -25
  770. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +39 -19
  771. package/src/toggle-group-control/types.ts +75 -63
  772. package/src/toolbar/test/index.js +2 -2
  773. package/src/toolbar-dropdown-menu/index.js +1 -1
  774. package/src/toolbar-group/test/index.js +6 -10
  775. package/src/tools-panel/stories/index.js +0 -1
  776. package/src/tools-panel/stories/tools-panel-with-item-group-slot.js +0 -1
  777. package/src/tools-panel/test/index.js +4 -6
  778. package/src/tools-panel/tools-panel/hook.ts +2 -9
  779. package/src/tools-panel/tools-panel-item/hook.ts +17 -3
  780. package/src/tooltip/index.js +3 -0
  781. package/src/tooltip/index.native.js +15 -0
  782. package/src/tooltip/test/index.native.js +1 -2
  783. package/src/tree-grid/test/__snapshots__/cell.js.snap +20 -20
  784. package/src/tree-grid/test/__snapshots__/roving-tab-index-item.js.snap +17 -15
  785. package/src/tree-grid/test/__snapshots__/roving-tab-index.js.snap +3 -1
  786. package/src/tree-grid/test/__snapshots__/row.js.snap +33 -25
  787. package/src/tree-grid/test/cell.js +4 -4
  788. package/src/tree-grid/test/roving-tab-index-item.js +8 -8
  789. package/src/tree-grid/test/roving-tab-index.js +3 -3
  790. package/src/tree-grid/test/row.js +20 -16
  791. package/src/truncate/test/index.tsx +4 -4
  792. package/src/ui/context/context-system-provider.js +5 -18
  793. package/src/ui/context/test/__snapshots__/context-system-provider.js.snap +23 -17
  794. package/src/ui/context/test/context-system-provider.js +3 -3
  795. package/src/ui/control-group/test/__snapshots__/index.js.snap +18 -16
  796. package/src/ui/control-group/test/index.js +1 -1
  797. package/src/ui/control-label/test/__snapshots__/index.js.snap +27 -21
  798. package/src/ui/control-label/test/index.js +3 -3
  799. package/src/ui/form-group/test/__snapshots__/index.js.snap +34 -30
  800. package/src/ui/form-group/test/index.js +2 -2
  801. package/src/ui/shortcut/test/__snapshots__/index.js.snap +1 -1
  802. package/src/ui/shortcut/test/index.js +3 -2
  803. package/src/ui/spinner/test/__snapshots__/index.js.snap +75 -73
  804. package/src/ui/spinner/test/index.js +10 -13
  805. package/src/ui/tooltip/test/index.js +16 -14
  806. package/src/unit-control/index.tsx +29 -30
  807. package/src/unit-control/styles/unit-control-styles.ts +6 -12
  808. package/src/unit-control/test/utils.ts +43 -0
  809. package/src/unit-control/types.ts +5 -6
  810. package/src/utils/config-values.js +0 -1
  811. package/src/utils/hooks/use-update-effect.js +5 -1
  812. package/src/utils/theme-variables.scss +8 -0
  813. package/src/utils/types.ts +0 -15
  814. package/src/v-stack/test/__snapshots__/index.tsx.snap +36 -30
  815. package/src/v-stack/test/index.tsx +3 -3
  816. package/src/view/test/__snapshots__/index.js.snap +34 -24
  817. package/src/view/test/index.js +5 -5
  818. package/src/visually-hidden/README.md +4 -0
  819. package/tsconfig.json +0 -2
  820. package/tsconfig.tsbuildinfo +1 -1
  821. package/build/radio/index.js.map +0 -1
  822. package/build/radio-context/index.js.map +0 -1
  823. package/build-module/radio/index.js.map +0 -1
  824. package/build-module/radio-context/index.js.map +0 -1
  825. package/build-types/radio-context/index.d.ts.map +0 -1
  826. package/src/border-box-control/stories/index.js +0 -106
  827. package/src/form-file-upload/stories/index.js +0 -51
  828. package/src/isolated-event-container/index.js +0 -28
  829. package/src/navigator/stories/index.js +0 -194
  830. package/src/navigator/test/index.js +0 -472
  831. package/src/radio/stories/index.js +0 -20
@@ -127,7 +127,6 @@ Whether the button is disabled. If `true`, this will force a `button` element to
127
127
 
128
128
  - Type: `Boolean`
129
129
  - Required: No
130
- - Default: `false`
131
130
 
132
131
  #### href
133
132
 
@@ -135,7 +134,6 @@ If provided, renders `a` instead of `button`.
135
134
 
136
135
  - Type: `String`
137
136
  - Required: No
138
- - Default: `undefined`
139
137
 
140
138
  #### variant
141
139
 
@@ -143,7 +141,6 @@ Specifies the button's style. The accepted values are `'primary'` (the primary b
143
141
 
144
142
  - Type: `String`
145
143
  - Required: No
146
- - Default: `undefined`
147
144
 
148
145
  #### isDestructive
149
146
 
@@ -151,7 +148,6 @@ Renders a red text-based button style to indicate destructive behavior.
151
148
 
152
149
  - Type: `Boolean`
153
150
  - Required: No
154
- - Default: `false`
155
151
 
156
152
  #### isSmall
157
153
 
@@ -159,7 +155,6 @@ Decreases the size of the button.
159
155
 
160
156
  - Type: `Boolean`
161
157
  - Required: No
162
- - Default: `false`
163
158
 
164
159
  #### isPressed
165
160
 
@@ -167,7 +162,6 @@ Renders a pressed button style.
167
162
 
168
163
  - Type: `Boolean`
169
164
  - Required: No
170
- - Default: `false`
171
165
 
172
166
  #### isBusy
173
167
 
@@ -175,7 +169,6 @@ Indicates activity while a action is being performed.
175
169
 
176
170
  - Type: `Boolean`
177
171
  - Required: No
178
- - Default: `false`
179
172
 
180
173
  #### focus
181
174
 
@@ -183,7 +176,6 @@ Whether the button is focused.
183
176
 
184
177
  - Type: `Boolean`
185
178
  - Required: No
186
- - Default: `false`
187
179
 
188
180
  #### target
189
181
 
@@ -205,15 +197,13 @@ If provided, renders an [Icon](/packages/components/src/icon/README.md) componen
205
197
 
206
198
  - Type: `String|Function|WPComponent|null`
207
199
  - Required: No
208
- - Default: `null`
209
200
 
210
201
  #### iconSize
211
202
 
212
- If provided with `icon`, sets the icon size.
203
+ If provided with `icon`, sets the icon size. Please refer to the [Icon](/packages/components/src/icon/README.md) component for more details regarding the default value of its `size` prop.
213
204
 
214
205
  - Type: `Number`
215
206
  - Required: No
216
- - Default: `20 when a Dashicon is rendered, 24 for all other icons.`
217
207
 
218
208
  #### iconPosition
219
209
 
@@ -236,15 +226,13 @@ If provided, renders a [Tooltip](/packages/components/src/tooltip/README.md) com
236
226
 
237
227
  - Type: `Boolean`
238
228
  - Required: No
239
- - Default: `false`
240
229
 
241
230
  #### tooltipPosition
242
231
 
243
- If provided with`showTooltip`, sets the position of the tooltip.
232
+ If provided with`showTooltip`, sets the position of the tooltip. Please refer to the [Tooltip](/packages/components/src/tooltip/README.md) component for more details regarding the defaults.
244
233
 
245
234
  - Type: `String`
246
235
  - Require: No
247
- - Default:`top center`
248
236
 
249
237
  #### shortcut
250
238
 
@@ -252,7 +240,6 @@ If provided with `showTooltip`, appends the Shortcut label to the tooltip conten
252
240
 
253
241
  - Type: `String|Object`
254
242
  - Required: No
255
- - Default: `undefined`
256
243
 
257
244
  #### label
258
245
 
@@ -1,15 +1,10 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { text, number, boolean } from '@storybook/addon-knobs';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
9
4
  import {
10
5
  formatBold,
11
6
  formatItalic,
12
- link as linkIcon,
7
+ link,
13
8
  more,
14
9
  wordpress,
15
10
  } from '@wordpress/icons';
@@ -23,142 +18,120 @@ import Button from '../';
23
18
  export default {
24
19
  title: 'Components/Button',
25
20
  component: Button,
21
+ argTypes: {
22
+ label: {
23
+ control: { type: 'text' },
24
+ description:
25
+ 'Sets the `aria-label` of the component, if none is provided. Sets the Tooltip content if `showTooltip` is provided.',
26
+ },
27
+ children: {
28
+ control: { type: 'text' },
29
+ },
30
+ href: {
31
+ control: { type: 'text' },
32
+ description: 'If provided, renders `a` instead of `button`.',
33
+ },
34
+ icon: {
35
+ control: { type: 'select' },
36
+ description:
37
+ 'If provided, renders an `Icon` component inside the button.',
38
+ options: [ 'wordpress', 'link', 'more' ],
39
+ mapping: {
40
+ wordpress,
41
+ link,
42
+ more,
43
+ },
44
+ },
45
+ iconSize: {
46
+ control: { type: 'number' },
47
+ description: 'If provided with `icon`, sets the icon size.',
48
+ },
49
+ iconPosition: {
50
+ control: { type: 'select' },
51
+ description:
52
+ 'If provided with `icon`, sets the position of icon relative to the `text`. Available options are `left|right`.',
53
+ options: [ 'left', 'right' ],
54
+ table: {
55
+ defaultValue: { summary: `left` },
56
+ },
57
+ },
58
+ isBusy: {
59
+ control: 'boolean',
60
+ description:
61
+ 'Indicates activity while a action is being performed.',
62
+ },
63
+ isDestructive: {
64
+ control: 'boolean',
65
+ description:
66
+ 'Renders a red text-based button style to indicate destructive behavior.',
67
+ },
68
+ isPressed: {
69
+ control: 'boolean',
70
+ description: 'Renders a pressed button style.',
71
+ },
72
+ isSmall: {
73
+ control: 'boolean',
74
+ description: 'Decreases the size of the button.',
75
+ },
76
+ disabled: {
77
+ control: 'boolean',
78
+ description:
79
+ 'Whether the button is disabled. If `true`, this will force a `button` element to be rendered.',
80
+ },
81
+ shortcut: {
82
+ control: { type: 'text' },
83
+ description:
84
+ 'If provided with `showTooltip`, appends the Shortcut label to the tooltip content. If an `Object` is provided, it should contain `display` and `ariaLabel` keys.',
85
+ },
86
+ showTooltip: {
87
+ control: 'boolean',
88
+ description:
89
+ 'If provided, renders a `Tooltip` component for the button.',
90
+ },
91
+ tooltipPosition: {
92
+ control: { type: 'text' },
93
+ description:
94
+ 'If provided with `showTooltip`, sets the position of the tooltip.',
95
+ },
96
+ text: {
97
+ control: { type: 'text' },
98
+ description:
99
+ 'If provided, displays the given text inside the button. If the button contains `children` elements, the text is displayed before them.',
100
+ },
101
+ target: {
102
+ control: { type: 'text' },
103
+ description:
104
+ 'If provided with `href`, sets the `target` attribute to the `a`.',
105
+ },
106
+ variant: {
107
+ control: { type: 'select' },
108
+ description: "Specifies the button's style.",
109
+ options: [ 'primary', 'secondary', 'tertiary', 'link' ],
110
+ },
111
+ __experimentalIsFocusable: {
112
+ control: 'boolean',
113
+ description: 'Makes the button focusable even when disabled',
114
+ },
115
+ },
26
116
  parameters: {
27
- knobs: { disable: false },
117
+ controls: { expanded: true },
118
+ docs: { source: { state: 'open' } },
28
119
  },
29
120
  };
30
121
 
31
- export const _default = () => {
32
- const label = text( 'Label', 'Default Button' );
33
-
34
- return <Button>{ label }</Button>;
35
- };
36
-
37
- export const primary = () => {
38
- const label = text( 'Label', 'Primary Button' );
39
-
40
- return <Button variant="primary">{ label }</Button>;
41
- };
42
-
43
- export const secondary = () => {
44
- const label = text( 'Label', 'Secondary Button' );
45
-
46
- return <Button variant="secondary">{ label }</Button>;
47
- };
48
-
49
- export const tertiary = () => {
50
- const label = text( 'Label', 'Tertiary Button' );
51
-
52
- return <Button variant="tertiary">{ label }</Button>;
53
- };
54
-
55
- export const isDestructive = () => {
56
- const label = text( 'Label', 'Destructive Button' );
57
- const isSmall = boolean( 'isSmall', false );
58
- const disabled = boolean( 'disabled', false );
122
+ function Template( { children, ...props } ) {
123
+ return <Button { ...props }>{ children }</Button>;
124
+ }
59
125
 
60
- return (
61
- <Button isDestructive isSmall={ isSmall } disabled={ disabled }>
62
- { label }
63
- </Button>
64
- );
65
- };
66
-
67
- export const isPrimaryDestructive = () => {
68
- const label = text( 'Label', 'Destructive Primary Button' );
69
- const isSmall = boolean( 'isSmall', false );
70
- const disabled = boolean( 'disabled', false );
71
-
72
- return (
73
- <Button
74
- variant="primary"
75
- isDestructive
76
- isSmall={ isSmall }
77
- disabled={ disabled }
78
- >
79
- { label }
80
- </Button>
81
- );
82
- };
83
-
84
- export const small = () => {
85
- const label = text( 'Label', 'Small Button' );
86
-
87
- return <Button isSmall>{ label }</Button>;
88
- };
89
-
90
- export const pressed = () => {
91
- const label = text( 'Label', 'Pressed Button' );
92
-
93
- return <Button isPressed>{ label }</Button>;
126
+ export const Default = Template.bind( {} );
127
+ Default.args = {
128
+ children: 'Code is poetry',
94
129
  };
95
130
 
96
- export const disabled = () => {
97
- const label = text( 'Label', 'Disabled Button' );
98
-
99
- return <Button disabled>{ label }</Button>;
100
- };
101
-
102
- export const disabledFocusable = () => {
103
- const label = text( 'Label', 'Disabled Button' );
104
-
105
- return (
106
- <Button disabled __experimentalIsFocusable>
107
- { label }
108
- </Button>
109
- );
110
- };
111
-
112
- export const link = () => {
113
- const label = text( 'Label', 'Link Button' );
114
-
115
- return (
116
- <Button href="https://wordpress.org/" target="_blank">
117
- { label }
118
- </Button>
119
- );
120
- };
121
-
122
- export const disabledLink = () => {
123
- const label = text( 'Label', 'Disabled Link Button' );
124
-
125
- return (
126
- <Button href="https://wordpress.org/" target="_blank" disabled>
127
- { label }
128
- </Button>
129
- );
130
- };
131
-
132
- export const destructiveLink = () => {
133
- const label = text( 'Label', 'Destructive Link' );
134
-
135
- return (
136
- <Button isDestructive variant="link">
137
- { label }
138
- </Button>
139
- );
140
- };
141
-
142
- export const icon = () => {
143
- const label = text( 'Label', 'Code is poetry' );
144
- const size = number( 'Size', 24 );
145
-
146
- return <Button icon={ wordpress } label={ label } iconSize={ size } />;
147
- };
148
-
149
- export const disabledFocusableIcon = () => {
150
- const label = text( 'Label', 'Code is poetry' );
151
- const size = number( 'Size', 24 );
152
-
153
- return (
154
- <Button
155
- icon={ wordpress }
156
- label={ label }
157
- iconSize={ size }
158
- disabled
159
- __experimentalIsFocusable
160
- />
161
- );
131
+ export const Icon = Template.bind( {} );
132
+ Icon.args = {
133
+ label: 'Code is poetry',
134
+ icon: 'wordpress',
162
135
  };
163
136
 
164
137
  export const groupedIcons = () => {
@@ -170,49 +143,7 @@ export const groupedIcons = () => {
170
143
  <GroupContainer>
171
144
  <Button icon={ formatBold } label="Bold" />
172
145
  <Button icon={ formatItalic } label="Italic" />
173
- <Button icon={ linkIcon } label="Link" />
146
+ <Button icon={ link } label="Link" />
174
147
  </GroupContainer>
175
148
  );
176
149
  };
177
-
178
- export const buttons = () => {
179
- return (
180
- <div style={ { padding: '20px' } }>
181
- <h2>Small Buttons</h2>
182
- <div className="story-buttons-container">
183
- <Button isSmall>Button</Button>
184
- <Button variant="primary" isSmall>
185
- Primary Button
186
- </Button>
187
- <Button variant="secondary" isSmall>
188
- Secondary Button
189
- </Button>
190
- <Button variant="tertiary" isSmall>
191
- Tertiary Button
192
- </Button>
193
- <Button isSmall icon={ more } />
194
- <Button isSmall variant="primary" icon={ more } />
195
- <Button isSmall variant="secondary" icon={ more } />
196
- <Button isSmall variant="tertiary" icon={ more } />
197
- <Button isSmall variant="primary" icon={ more }>
198
- Icon & Text
199
- </Button>
200
- </div>
201
-
202
- <h2>Regular Buttons</h2>
203
- <div className="story-buttons-container">
204
- <Button>Button</Button>
205
- <Button variant="primary">Primary Button</Button>
206
- <Button variant="secondary">Secondary Button</Button>
207
- <Button variant="tertiary">Tertiary Button</Button>
208
- <Button icon={ more } />
209
- <Button variant="primary" icon={ more } />
210
- <Button variant="secondary" icon={ more } />
211
- <Button variant="tertiary" icon={ more } />
212
- <Button variant="primary" icon={ more }>
213
- Icon & Text
214
- </Button>
215
- </div>
216
- </div>
217
- );
218
- };
@@ -20,7 +20,7 @@
20
20
 
21
21
  &[aria-expanded="true"],
22
22
  &:hover {
23
- color: var(--wp-admin-theme-color);
23
+ color: $components-color-accent;
24
24
  }
25
25
 
26
26
  // Unset some hovers, instead of adding :not specificity.
@@ -31,7 +31,7 @@
31
31
  // Focus.
32
32
  // See https://github.com/WordPress/gutenberg/issues/13267 for more context on these selectors.
33
33
  &:focus:not(:disabled) {
34
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
34
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) $components-color-accent;
35
35
 
36
36
  // Windows High Contrast mode will show this outline, but not the box-shadow.
37
37
  outline: 3px solid transparent;
@@ -43,7 +43,7 @@
43
43
 
44
44
  &.is-primary {
45
45
  white-space: nowrap;
46
- background: var(--wp-admin-theme-color);
46
+ background: $components-color-accent;
47
47
  color: $white;
48
48
  text-decoration: none;
49
49
  text-shadow: none;
@@ -52,18 +52,18 @@
52
52
  outline: 1px solid transparent;
53
53
 
54
54
  &:hover:not(:disabled) {
55
- background: var(--wp-admin-theme-color-darker-10);
55
+ background: $components-color-accent-darker-10;
56
56
  color: $white;
57
57
  }
58
58
 
59
59
  &:active:not(:disabled) {
60
- background: var(--wp-admin-theme-color-darker-20);
61
- border-color: var(--wp-admin-theme-color-darker-20);
60
+ background: $components-color-accent-darker-20;
61
+ border-color: $components-color-accent-darker-20;
62
62
  color: $white;
63
63
  }
64
64
 
65
65
  &:focus:not(:disabled) {
66
- box-shadow: inset 0 0 0 1px $white, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
66
+ box-shadow: inset 0 0 0 1px $white, 0 0 0 var(--wp-admin-border-width-focus) $components-color-accent;
67
67
  }
68
68
 
69
69
  &:disabled,
@@ -72,15 +72,15 @@
72
72
  &[aria-disabled="true"]:enabled, // This catches a situation where a Button is aria-disabled, but not disabled.
73
73
  &[aria-disabled="true"]:active:enabled {
74
74
  color: rgba($white, 0.4);
75
- background: var(--wp-admin-theme-color);
76
- border-color: var(--wp-admin-theme-color);
75
+ background: $components-color-accent;
76
+ border-color: $components-color-accent;
77
77
  opacity: 1;
78
78
  outline: none;
79
79
 
80
80
  &:focus:enabled {
81
81
  box-shadow:
82
82
  0 0 0 $border-width $white,
83
- 0 0 0 3px var(--wp-admin-theme-color);
83
+ 0 0 0 3px $components-color-accent;
84
84
  }
85
85
  }
86
86
 
@@ -93,13 +93,13 @@
93
93
  /* stylelint-disable */
94
94
  background-image: linear-gradient(
95
95
  -45deg,
96
- var(--wp-admin-theme-color) 33%,
97
- var(--wp-admin-theme-color-darker-20) 33%,
98
- var(--wp-admin-theme-color-darker-20) 70%,
99
- var(--wp-admin-theme-color) 70%
96
+ $components-color-accent 33%,
97
+ $components-color-accent-darker-20 33%,
98
+ $components-color-accent-darker-20 70%,
99
+ $components-color-accent 70%
100
100
  );
101
101
  /* stylelint-enable */
102
- border-color: var(--wp-admin-theme-color);
102
+ border-color: $components-color-accent;
103
103
  }
104
104
  }
105
105
 
@@ -114,13 +114,13 @@
114
114
 
115
115
  &:active:not(:disabled) {
116
116
  background: $gray-300;
117
- color: var(--wp-admin-theme-color-darker-10);
117
+ color: $components-color-accent-darker-10;
118
118
  box-shadow: none;
119
119
  }
120
120
 
121
121
  &:hover:not(:disabled) {
122
- color: var(--wp-admin-theme-color-darker-10);
123
- box-shadow: inset 0 0 0 $border-width var(--wp-admin-theme-color-darker-10);
122
+ color: $components-color-accent-darker-10;
123
+ box-shadow: inset 0 0 0 $border-width $components-color-accent-darker-10;
124
124
  }
125
125
 
126
126
  &:disabled,
@@ -140,10 +140,10 @@
140
140
  */
141
141
 
142
142
  &.is-secondary {
143
- box-shadow: inset 0 0 0 $border-width var(--wp-admin-theme-color);
143
+ box-shadow: inset 0 0 0 $border-width $components-color-accent;
144
144
  outline: 1px solid transparent; // Shown in high contrast mode.
145
145
  white-space: nowrap;
146
- color: var(--wp-admin-theme-color);
146
+ color: $components-color-accent;
147
147
  background: transparent;
148
148
  }
149
149
 
@@ -153,7 +153,7 @@
153
153
 
154
154
  &.is-tertiary {
155
155
  white-space: nowrap;
156
- color: var(--wp-admin-theme-color);
156
+ color: $components-color-accent;
157
157
  background: transparent;
158
158
  padding: $grid-unit-15 * 0.5; // This reduces the horizontal padding on tertiary/text buttons, so as to space them optically.
159
159
 
@@ -171,52 +171,30 @@
171
171
  /**
172
172
  * Destructive buttons.
173
173
  */
174
-
175
174
  &.is-destructive {
176
- color: $alert-red;
177
- box-shadow: inset 0 0 0 $border-width $alert-red;
178
-
179
- &:hover:not(:disabled) {
180
- color: darken($alert-red, 20%);
181
- box-shadow: inset 0 0 0 $border-width darken($alert-red, 20%);
182
- }
183
-
184
- &:focus:not(:disabled) {
185
- color: var(--wp-admin-theme-color);
186
- }
187
-
188
- &:active:not(:disabled) {
189
- background: $gray-400;
190
- }
191
- }
175
+ --wp-components-color-accent: #{$alert-red};
176
+ --wp-components-color-accent-darker-10: #{darken($alert-red, 10%)};
177
+ --wp-components-color-accent-darker-20: #{darken($alert-red, 20%)};
192
178
 
193
- &.is-destructive.is-primary {
194
- color: #fff;
195
- background: $alert-red;
196
- box-shadow: inset 0 0 0 $border-width $alert-red;
197
-
198
- &:hover:not(:disabled) {
199
- color: #fff;
200
- background: darken($alert-red, 20%);
201
- box-shadow: inset 0 0 0 $border-width darken($alert-red, 20%);
202
- }
203
- }
179
+ // Only the default variant is styled differently from the non-destructive counterparts.
180
+ &:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link) {
181
+ color: $alert-red;
182
+ box-shadow: inset 0 0 0 $border-width $alert-red;
204
183
 
205
- &.is-destructive.is-tertiary {
206
- box-shadow: none;
184
+ &:hover:not(:disabled) {
185
+ color: darken($alert-red, 20%);
186
+ }
207
187
 
208
- &:hover:not(:disabled) {
209
- box-shadow: inset 0 0 0 $border-width $alert-red;
210
- color: $alert-red;
211
- }
188
+ &:focus:not(:disabled) {
189
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) $alert-red;
190
+ }
212
191
 
213
- &:focus:not(:disabled) {
214
- box-shadow: inset 0 0 0 1px $white, 0 0 0 var(--wp-admin-border-width-focus) $alert-red;
215
- color: $alert-red;
192
+ &:active:not(:disabled) {
193
+ background: $gray-400;
194
+ }
216
195
  }
217
196
  }
218
197
 
219
-
220
198
  /**
221
199
  * Link buttons.
222
200
  */
@@ -230,7 +208,7 @@
230
208
  background: none;
231
209
  outline: none;
232
210
  text-align: left;
233
- color: var(--wp-admin-theme-color);
211
+ color: $components-color-accent;
234
212
  text-decoration: underline;
235
213
  transition-property: border, background, color;
236
214
  transition-duration: 0.05s;
@@ -241,21 +219,6 @@
241
219
  &:focus {
242
220
  border-radius: $radius-block-ui;
243
221
  }
244
-
245
- // Link buttons that are red to indicate destructive behavior.
246
- &.is-destructive {
247
- color: $alert-red;
248
-
249
- &:active:not(:disabled),
250
- &:hover:not(:disabled) {
251
- color: darken($alert-red, 20%);
252
- background: none;
253
- }
254
-
255
- &:focus:not(:disabled) {
256
- color: var(--wp-admin-theme-color);
257
- }
258
- }
259
222
  }
260
223
 
261
224
  &:not([aria-disabled="true"]):active {
@@ -315,7 +278,7 @@
315
278
  }
316
279
 
317
280
  &.has-text {
318
- justify-content: left;
281
+ justify-content: start;
319
282
  }
320
283
 
321
284
  &.has-text svg {
@@ -333,7 +296,7 @@
333
296
  background: $gray-900;
334
297
 
335
298
  &:focus:not(:disabled) {
336
- box-shadow: inset 0 0 0 1px $white, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
299
+ box-shadow: inset 0 0 0 1px $white, 0 0 0 var(--wp-admin-border-width-focus) $components-color-accent;
337
300
 
338
301
  // Windows High Contrast mode will show this outline, but not the box-shadow.
339
302
  outline: 2px solid transparent;
@@ -27,7 +27,7 @@ describe( 'Button', () => {
27
27
  expect( button ).not.toHaveClass( 'is-large' );
28
28
  expect( button ).not.toHaveClass( 'is-primary' );
29
29
  expect( button ).not.toHaveClass( 'is-pressed' );
30
- expect( button ).not.toHaveAttribute( 'disabled' );
30
+ expect( button ).toBeEnabled();
31
31
  expect( button ).not.toHaveAttribute( 'aria-disabled' );
32
32
  expect( button ).toHaveAttribute( 'type', 'button' );
33
33
  } );
@@ -114,16 +114,14 @@ describe( 'Button', () => {
114
114
  it( 'should add a disabled prop to the button', () => {
115
115
  render( <Button disabled /> );
116
116
 
117
- expect( screen.getByRole( 'button' ) ).toHaveAttribute(
118
- 'disabled'
119
- );
117
+ expect( screen.getByRole( 'button' ) ).toBeDisabled();
120
118
  } );
121
119
 
122
120
  it( 'should add only aria-disabled attribute when disabled and isFocusable are true', () => {
123
121
  render( <Button disabled __experimentalIsFocusable /> );
124
122
  const button = screen.getByRole( 'button' );
125
123
 
126
- expect( button ).not.toHaveAttribute( 'disabled' );
124
+ expect( button ).toBeEnabled();
127
125
  expect( button ).toHaveAttribute( 'aria-disabled' );
128
126
  } );
129
127