@wordpress/components 23.2.0 → 23.3.1

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 (377) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/CONTRIBUTING.md +1 -1
  3. package/build/alignment-matrix-control/utils.js +2 -2
  4. package/build/alignment-matrix-control/utils.js.map +1 -1
  5. package/build/autocomplete/autocompleter-ui.js +1 -3
  6. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  7. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  8. package/build/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
  9. package/build/border-control/border-control-dropdown/component.js +8 -4
  10. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  11. package/build/button/deprecated.js +8 -6
  12. package/build/button/deprecated.js.map +1 -1
  13. package/build/button/index.js +52 -23
  14. package/build/button/index.js.map +1 -1
  15. package/build/button/types.js +6 -0
  16. package/build/button/types.js.map +1 -0
  17. package/build/color-list-picker/index.js.map +1 -1
  18. package/build/color-list-picker/types.js +6 -0
  19. package/build/color-list-picker/types.js.map +1 -0
  20. package/build/color-palette/index.js +9 -61
  21. package/build/color-palette/index.js.map +1 -1
  22. package/build/color-palette/index.native.js +24 -9
  23. package/build/color-palette/index.native.js.map +1 -1
  24. package/build/color-palette/utils.js +103 -0
  25. package/build/color-palette/utils.js.map +1 -0
  26. package/build/custom-gradient-picker/gradient-bar/utils.js +1 -1
  27. package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  28. package/build/date-time/date/index.js.map +1 -1
  29. package/build/dropdown/index.js +20 -8
  30. package/build/dropdown/index.js.map +1 -1
  31. package/build/form-token-field/token.js +1 -1
  32. package/build/form-token-field/token.js.map +1 -1
  33. package/build/gradient-picker/index.js +9 -1
  34. package/build/gradient-picker/index.js.map +1 -1
  35. package/build/h-stack/component.js +0 -1
  36. package/build/h-stack/component.js.map +1 -1
  37. package/build/input-control/input-field.js +4 -2
  38. package/build/input-control/input-field.js.map +1 -1
  39. package/build/keyboard-shortcuts/index.js +44 -16
  40. package/build/keyboard-shortcuts/index.js.map +1 -1
  41. package/build/keyboard-shortcuts/types.js +6 -0
  42. package/build/keyboard-shortcuts/types.js.map +1 -0
  43. package/build/modal/index.js +1 -1
  44. package/build/modal/index.js.map +1 -1
  45. package/build/notice/index.js +16 -18
  46. package/build/notice/index.js.map +1 -1
  47. package/build/notice/list.js +23 -8
  48. package/build/notice/list.js.map +1 -1
  49. package/build/notice/types.js +6 -0
  50. package/build/notice/types.js.map +1 -0
  51. package/build/number-control/index.js +1 -1
  52. package/build/number-control/index.js.map +1 -1
  53. package/build/query-controls/author-select.js +7 -3
  54. package/build/query-controls/author-select.js.map +1 -1
  55. package/build/query-controls/category-select.js +7 -3
  56. package/build/query-controls/category-select.js.map +1 -1
  57. package/build/query-controls/index.js +68 -20
  58. package/build/query-controls/index.js.map +1 -1
  59. package/build/query-controls/terms.js +4 -3
  60. package/build/query-controls/terms.js.map +1 -1
  61. package/build/query-controls/types.js +6 -0
  62. package/build/query-controls/types.js.map +1 -0
  63. package/build/slot-fill/bubbles-virtually/fill.js +1 -0
  64. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  65. package/build/slot-fill/slot.js +1 -0
  66. package/build/slot-fill/slot.js.map +1 -1
  67. package/build/slot-fill/use-slot.js +1 -11
  68. package/build/slot-fill/use-slot.js.map +1 -1
  69. package/build/snackbar/index.js.map +1 -1
  70. package/build/snackbar/list.js.map +1 -1
  71. package/build/tab-panel/index.js +36 -8
  72. package/build/tab-panel/index.js.map +1 -1
  73. package/build/tree-grid/index.js +1 -1
  74. package/build/tree-grid/index.js.map +1 -1
  75. package/build/tree-select/index.js +2 -6
  76. package/build/tree-select/index.js.map +1 -1
  77. package/build-module/alignment-matrix-control/utils.js +2 -2
  78. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  79. package/build-module/autocomplete/autocompleter-ui.js +1 -2
  80. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  81. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  82. package/build-module/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
  83. package/build-module/border-control/border-control-dropdown/component.js +7 -4
  84. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  85. package/build-module/button/deprecated.js +8 -5
  86. package/build-module/button/deprecated.js.map +1 -1
  87. package/build-module/button/index.js +51 -22
  88. package/build-module/button/index.js.map +1 -1
  89. package/build-module/button/types.js +2 -0
  90. package/build-module/button/types.js.map +1 -0
  91. package/build-module/color-list-picker/index.js.map +1 -1
  92. package/build-module/color-list-picker/types.js +2 -0
  93. package/build-module/color-list-picker/types.js.map +1 -0
  94. package/build-module/color-palette/index.js +7 -54
  95. package/build-module/color-palette/index.js.map +1 -1
  96. package/build-module/color-palette/index.native.js +24 -8
  97. package/build-module/color-palette/index.native.js.map +1 -1
  98. package/build-module/color-palette/utils.js +79 -0
  99. package/build-module/color-palette/utils.js.map +1 -0
  100. package/build-module/custom-gradient-picker/gradient-bar/utils.js +1 -1
  101. package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  102. package/build-module/date-time/date/index.js +1 -1
  103. package/build-module/date-time/date/index.js.map +1 -1
  104. package/build-module/dropdown/index.js +19 -8
  105. package/build-module/dropdown/index.js.map +1 -1
  106. package/build-module/form-token-field/token.js +1 -1
  107. package/build-module/form-token-field/token.js.map +1 -1
  108. package/build-module/gradient-picker/index.js +9 -2
  109. package/build-module/gradient-picker/index.js.map +1 -1
  110. package/build-module/h-stack/component.js +0 -1
  111. package/build-module/h-stack/component.js.map +1 -1
  112. package/build-module/input-control/input-field.js +4 -2
  113. package/build-module/input-control/input-field.js.map +1 -1
  114. package/build-module/keyboard-shortcuts/index.js +48 -16
  115. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  116. package/build-module/keyboard-shortcuts/types.js +2 -0
  117. package/build-module/keyboard-shortcuts/types.js.map +1 -0
  118. package/build-module/modal/index.js +1 -1
  119. package/build-module/modal/index.js.map +1 -1
  120. package/build-module/notice/index.js +14 -15
  121. package/build-module/notice/index.js.map +1 -1
  122. package/build-module/notice/list.js +23 -8
  123. package/build-module/notice/list.js.map +1 -1
  124. package/build-module/notice/types.js +2 -0
  125. package/build-module/notice/types.js.map +1 -0
  126. package/build-module/number-control/index.js +1 -1
  127. package/build-module/number-control/index.js.map +1 -1
  128. package/build-module/query-controls/author-select.js +7 -3
  129. package/build-module/query-controls/author-select.js.map +1 -1
  130. package/build-module/query-controls/category-select.js +8 -4
  131. package/build-module/query-controls/category-select.js.map +1 -1
  132. package/build-module/query-controls/index.js +64 -20
  133. package/build-module/query-controls/index.js.map +1 -1
  134. package/build-module/query-controls/terms.js +8 -4
  135. package/build-module/query-controls/terms.js.map +1 -1
  136. package/build-module/query-controls/types.js +2 -0
  137. package/build-module/query-controls/types.js.map +1 -0
  138. package/build-module/slot-fill/bubbles-virtually/fill.js +1 -0
  139. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  140. package/build-module/slot-fill/slot.js +1 -0
  141. package/build-module/slot-fill/slot.js.map +1 -1
  142. package/build-module/slot-fill/use-slot.js +2 -12
  143. package/build-module/slot-fill/use-slot.js.map +1 -1
  144. package/build-module/snackbar/index.js.map +1 -1
  145. package/build-module/snackbar/list.js.map +1 -1
  146. package/build-module/tab-panel/index.js +36 -8
  147. package/build-module/tab-panel/index.js.map +1 -1
  148. package/build-module/tree-grid/index.js +1 -1
  149. package/build-module/tree-grid/index.js.map +1 -1
  150. package/build-module/tree-select/index.js +2 -6
  151. package/build-module/tree-select/index.js.map +1 -1
  152. package/build-style/style-rtl.css +5 -0
  153. package/build-style/style.css +5 -0
  154. package/build-types/border-box-control/border-box-control/hook.d.ts +1 -1
  155. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts +1 -1
  156. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +171 -160
  157. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  158. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +1 -1
  159. package/build-types/border-control/border-control/hook.d.ts +1 -1
  160. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  161. package/build-types/border-control/border-control-dropdown/hook.d.ts +1 -1
  162. package/build-types/button/deprecated.d.ts +143 -7
  163. package/build-types/button/deprecated.d.ts.map +1 -1
  164. package/build-types/button/index.d.ts +20 -3
  165. package/build-types/button/index.d.ts.map +1 -1
  166. package/build-types/button/stories/index.d.ts +20 -0
  167. package/build-types/button/stories/index.d.ts.map +1 -0
  168. package/build-types/button/test/index.d.ts +2 -0
  169. package/build-types/button/test/index.d.ts.map +1 -0
  170. package/build-types/button/types.d.ts +134 -0
  171. package/build-types/button/types.d.ts.map +1 -0
  172. package/build-types/color-list-picker/index.d.ts +5 -0
  173. package/build-types/color-list-picker/index.d.ts.map +1 -0
  174. package/build-types/color-list-picker/types.d.ts +42 -0
  175. package/build-types/color-list-picker/types.d.ts.map +1 -0
  176. package/build-types/color-palette/index.d.ts +2 -4
  177. package/build-types/color-palette/index.d.ts.map +1 -1
  178. package/build-types/color-palette/stories/index.d.ts +2 -2
  179. package/build-types/color-palette/styles.d.ts +1 -1
  180. package/build-types/color-palette/types.d.ts +1 -1
  181. package/build-types/color-palette/types.d.ts.map +1 -1
  182. package/build-types/color-palette/utils.d.ts +14 -0
  183. package/build-types/color-palette/utils.d.ts.map +1 -0
  184. package/build-types/color-picker/styles.d.ts +2 -2
  185. package/build-types/date-time/date/index.d.ts.map +1 -1
  186. package/build-types/date-time/date/styles.d.ts +3 -3
  187. package/build-types/dropdown/index.d.ts +4 -4
  188. package/build-types/dropdown/index.d.ts.map +1 -1
  189. package/build-types/dropdown/stories/index.d.ts.map +1 -1
  190. package/build-types/dropdown/types.d.ts +9 -10
  191. package/build-types/dropdown/types.d.ts.map +1 -1
  192. package/build-types/font-size-picker/styles.d.ts +2 -2
  193. package/build-types/h-stack/component.d.ts +0 -1
  194. package/build-types/h-stack/component.d.ts.map +1 -1
  195. package/build-types/input-control/input-field.d.ts.map +1 -1
  196. package/build-types/keyboard-shortcuts/index.d.ts +38 -0
  197. package/build-types/keyboard-shortcuts/index.d.ts.map +1 -0
  198. package/build-types/keyboard-shortcuts/stories/index.d.ts +12 -0
  199. package/build-types/keyboard-shortcuts/stories/index.d.ts.map +1 -0
  200. package/build-types/keyboard-shortcuts/test/index.d.ts +2 -0
  201. package/build-types/keyboard-shortcuts/test/index.d.ts.map +1 -0
  202. package/build-types/keyboard-shortcuts/types.d.ts +48 -0
  203. package/build-types/keyboard-shortcuts/types.d.ts.map +1 -0
  204. package/build-types/modal/index.d.ts.map +1 -1
  205. package/build-types/navigator/navigator-back-button/component.d.ts +1 -1
  206. package/build-types/navigator/navigator-back-button/hook.d.ts +2 -2
  207. package/build-types/navigator/navigator-button/component.d.ts +1 -1
  208. package/build-types/navigator/navigator-button/hook.d.ts +2 -2
  209. package/build-types/notice/index.d.ts +16 -0
  210. package/build-types/notice/index.d.ts.map +1 -0
  211. package/build-types/notice/list.d.ts +32 -0
  212. package/build-types/notice/list.d.ts.map +1 -0
  213. package/build-types/notice/stories/index.d.ts +17 -0
  214. package/build-types/notice/stories/index.d.ts.map +1 -0
  215. package/build-types/notice/test/index.d.ts +2 -0
  216. package/build-types/notice/test/index.d.ts.map +1 -0
  217. package/build-types/notice/test/list.d.ts +2 -0
  218. package/build-types/notice/test/list.d.ts.map +1 -0
  219. package/build-types/notice/types.d.ts +128 -0
  220. package/build-types/notice/types.d.ts.map +1 -0
  221. package/build-types/number-control/styles/number-control-styles.d.ts +2 -2
  222. package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
  223. package/build-types/placeholder/stories/index.d.ts.map +1 -1
  224. package/build-types/query-controls/author-select.d.ts +4 -0
  225. package/build-types/query-controls/author-select.d.ts.map +1 -0
  226. package/build-types/query-controls/category-select.d.ts +4 -0
  227. package/build-types/query-controls/category-select.d.ts.map +1 -0
  228. package/build-types/query-controls/index.d.ts +30 -0
  229. package/build-types/query-controls/index.d.ts.map +1 -0
  230. package/build-types/query-controls/stories/index.d.ts +13 -0
  231. package/build-types/query-controls/stories/index.d.ts.map +1 -0
  232. package/build-types/query-controls/terms.d.ts +13 -0
  233. package/build-types/query-controls/terms.d.ts.map +1 -0
  234. package/build-types/query-controls/test/terms.d.ts +2 -0
  235. package/build-types/query-controls/test/terms.d.ts.map +1 -0
  236. package/build-types/query-controls/types.d.ts +131 -0
  237. package/build-types/query-controls/types.d.ts.map +1 -0
  238. package/build-types/range-control/index.d.ts +1 -1
  239. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  240. package/build-types/slot-fill/use-slot.d.ts.map +1 -1
  241. package/build-types/snackbar/index.d.ts +9 -2
  242. package/build-types/snackbar/index.d.ts.map +1 -1
  243. package/build-types/snackbar/list.d.ts.map +1 -1
  244. package/build-types/snackbar/types.d.ts +15 -88
  245. package/build-types/snackbar/types.d.ts.map +1 -1
  246. package/build-types/tab-panel/index.d.ts.map +1 -1
  247. package/build-types/tab-panel/types.d.ts +1 -1
  248. package/build-types/tab-panel/types.d.ts.map +1 -1
  249. package/build-types/toggle-group-control/stories/index.d.ts.map +1 -1
  250. package/build-types/tree-select/index.d.ts.map +1 -1
  251. package/build-types/ui/form-group/form-group.d.ts +2 -2
  252. package/package.json +18 -17
  253. package/src/alignment-matrix-control/utils.tsx +2 -2
  254. package/src/autocomplete/autocompleter-ui.js +1 -2
  255. package/src/autocomplete/test/index.js +1 -5
  256. package/src/border-box-control/border-box-control-linked-button/component.tsx +1 -1
  257. package/src/border-box-control/border-box-control-linked-button/hook.ts +1 -1
  258. package/src/border-control/border-control-dropdown/component.tsx +9 -8
  259. package/src/box-control/test/index.js +11 -35
  260. package/src/button/README.md +49 -55
  261. package/src/button/{deprecated.js → deprecated.tsx} +19 -4
  262. package/src/button/{index.js → index.tsx} +95 -34
  263. package/src/button/stories/index.tsx +106 -0
  264. package/src/button/style.scss +3 -2
  265. package/src/button/test/{index.js → index.tsx} +30 -7
  266. package/src/button/types.ts +138 -0
  267. package/src/checkbox-control/test/index.tsx +1 -5
  268. package/src/color-list-picker/{index.js → index.tsx} +3 -2
  269. package/src/color-list-picker/types.ts +46 -0
  270. package/src/color-palette/README.md +1 -1
  271. package/src/color-palette/index.native.js +11 -4
  272. package/src/color-palette/index.tsx +11 -67
  273. package/src/color-palette/test/index.tsx +4 -14
  274. package/src/color-palette/test/utils.ts +1 -1
  275. package/src/color-palette/types.ts +1 -1
  276. package/src/color-palette/utils.ts +98 -0
  277. package/src/color-picker/test/index.js +6 -15
  278. package/src/combobox-control/test/index.js +1 -6
  279. package/src/confirm-dialog/test/index.js +9 -29
  280. package/src/custom-gradient-picker/gradient-bar/utils.js +1 -1
  281. package/src/date-time/date/index.tsx +2 -1
  282. package/src/date-time/date/test/index.tsx +2 -8
  283. package/src/date-time/time/test/index.tsx +9 -29
  284. package/src/dimension-control/test/index.test.js +2 -8
  285. package/src/disabled/test/index.tsx +1 -5
  286. package/src/draggable/test/index.native.js +4 -4
  287. package/src/dropdown/README.md +1 -8
  288. package/src/dropdown/index.tsx +17 -6
  289. package/src/dropdown/stories/index.tsx +3 -3
  290. package/src/dropdown/test/index.tsx +2 -8
  291. package/src/dropdown/types.ts +9 -10
  292. package/src/dropdown-menu/README.md +1 -1
  293. package/src/dropdown-menu/stories/index.js +96 -27
  294. package/src/dropdown-menu/test/index.js +2 -8
  295. package/src/external-link/test/index.tsx +1 -6
  296. package/src/focal-point-picker/test/index.js +3 -11
  297. package/src/font-size-picker/test/index.tsx +14 -44
  298. package/src/form-file-upload/test/index.tsx +2 -17
  299. package/src/form-toggle/test/index.tsx +1 -5
  300. package/src/form-token-field/test/index.tsx +80 -163
  301. package/src/form-token-field/token.tsx +1 -1
  302. package/src/gradient-picker/index.js +15 -4
  303. package/src/guide/test/index.js +5 -17
  304. package/src/h-stack/component.tsx +0 -1
  305. package/src/higher-order/with-filters/test/index.js +24 -24
  306. package/src/higher-order/with-focus-outside/test/index.js +11 -25
  307. package/src/higher-order/with-focus-return/test/index.js +1 -5
  308. package/src/input-control/input-field.tsx +3 -1
  309. package/src/input-control/test/index.js +1 -6
  310. package/src/isolated-event-container/test/index.js +2 -8
  311. package/src/keyboard-shortcuts/README.md +1 -1
  312. package/src/keyboard-shortcuts/index.tsx +93 -0
  313. package/src/keyboard-shortcuts/stories/index.tsx +60 -0
  314. package/src/keyboard-shortcuts/test/{index.js → index.tsx} +16 -6
  315. package/src/keyboard-shortcuts/types.ts +51 -0
  316. package/src/modal/index.tsx +1 -2
  317. package/src/navigable-container/test/navigable-menu.js +5 -17
  318. package/src/navigable-container/test/tababble-container.js +3 -11
  319. package/src/navigation/test/index.js +3 -11
  320. package/src/navigator/test/index.tsx +6 -20
  321. package/src/notice/README.md +89 -42
  322. package/src/notice/{index.js → index.tsx} +28 -20
  323. package/src/notice/list.tsx +72 -0
  324. package/src/notice/stories/index.tsx +119 -0
  325. package/src/notice/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
  326. package/src/notice/test/{index.js → index.tsx} +7 -4
  327. package/src/notice/test/{list.js → list.tsx} +0 -0
  328. package/src/notice/types.ts +136 -0
  329. package/src/number-control/index.tsx +1 -1
  330. package/src/number-control/test/index.tsx +28 -86
  331. package/src/panel/test/body.js +2 -8
  332. package/src/placeholder/stories/index.tsx +1 -0
  333. package/src/query-controls/README.md +56 -56
  334. package/src/query-controls/author-select.tsx +37 -0
  335. package/src/query-controls/category-select.tsx +46 -0
  336. package/src/query-controls/index.tsx +192 -0
  337. package/src/query-controls/stories/index.tsx +205 -0
  338. package/src/query-controls/terms.ts +57 -0
  339. package/src/query-controls/test/{terms.js → terms.ts} +36 -20
  340. package/src/query-controls/types.ts +150 -0
  341. package/src/select-control/test/select-control.tsx +1 -6
  342. package/src/slot-fill/bubbles-virtually/fill.js +1 -0
  343. package/src/slot-fill/slot.js +1 -1
  344. package/src/slot-fill/use-slot.js +6 -16
  345. package/src/snackbar/index.tsx +6 -5
  346. package/src/snackbar/list.tsx +4 -2
  347. package/src/snackbar/types.ts +18 -92
  348. package/src/tab-panel/index.tsx +38 -16
  349. package/src/tab-panel/style.scss +8 -0
  350. package/src/tab-panel/test/index.tsx +35 -7
  351. package/src/tab-panel/types.ts +1 -1
  352. package/src/theme/test/index.tsx +4 -4
  353. package/src/toggle-group-control/stories/index.tsx +1 -0
  354. package/src/toggle-group-control/test/index.tsx +7 -23
  355. package/src/toolbar/stories/index.js +75 -72
  356. package/src/tools-panel/stories/index.js +3 -0
  357. package/src/tools-panel/test/index.js +1 -1
  358. package/src/tree-grid/index.js +1 -1
  359. package/src/tree-select/index.tsx +3 -6
  360. package/src/ui/context/test/context-connect.tsx +2 -0
  361. package/src/ui/context/test/wordpress-component.tsx +2 -0
  362. package/src/unit-control/test/index.tsx +21 -74
  363. package/src/utils/hooks/test/use-latest-ref.js +15 -18
  364. package/tsconfig.json +1 -4
  365. package/tsconfig.tsbuildinfo +1 -1
  366. package/build-types/radio-context/index.d.ts +0 -6
  367. package/build-types/radio-context/index.d.ts.map +0 -1
  368. package/src/button/stories/index.js +0 -179
  369. package/src/keyboard-shortcuts/index.js +0 -56
  370. package/src/notice/list.js +0 -48
  371. package/src/notice/stories/index.js +0 -46
  372. package/src/query-controls/author-select.js +0 -23
  373. package/src/query-controls/category-select.js +0 -31
  374. package/src/query-controls/index.js +0 -122
  375. package/src/query-controls/terms.js +0 -40
  376. package/src/toolbar/stories/toolbar-button.js +0 -32
  377. package/src/toolbar/stories/toolbar-group.js +0 -33
@@ -1,9 +1,145 @@
1
- declare var _default: import("react").ForwardRefExoticComponent<Pick<{
2
- [x: string]: any;
3
- labelPosition: any;
4
- size: any;
5
- tooltip: any;
6
- label: any;
7
- }, string | number> & import("react").RefAttributes<any>>;
1
+ /// <reference types="react" />
2
+ import type { DeprecatedIconButtonProps } from './types';
3
+ declare const _default: import("react").ForwardRefExoticComponent<((Pick<{
4
+ children?: import("react").ReactNode;
5
+ describedBy?: string | undefined;
6
+ focus?: boolean | undefined;
7
+ icon?: import("../icon").IconType<unknown> | null | undefined;
8
+ iconPosition?: "left" | "right" | undefined;
9
+ iconSize?: number | undefined;
10
+ isBusy?: boolean | undefined;
11
+ isDestructive?: boolean | undefined;
12
+ isPressed?: boolean | undefined;
13
+ isSmall?: boolean | undefined;
14
+ label?: string | undefined;
15
+ shortcut?: string | {
16
+ display: string;
17
+ ariaLabel: string;
18
+ } | undefined;
19
+ showTooltip?: boolean | undefined;
20
+ text?: string | undefined;
21
+ tooltipPosition?: ("bottom" | "top" | "middle") | "bottom left" | "bottom right" | "bottom center" | "top left" | "top right" | "top center" | "middle left" | "middle right" | "middle center" | "bottom left left" | "bottom left right" | "bottom left bottom" | "bottom left top" | "bottom right left" | "bottom right right" | "bottom right bottom" | "bottom right top" | "bottom center left" | "bottom center right" | "bottom center bottom" | "bottom center top" | "top left left" | "top left right" | "top left bottom" | "top left top" | "top right left" | "top right right" | "top right bottom" | "top right top" | "top center left" | "top center right" | "top center bottom" | "top center top" | "middle left left" | "middle left right" | "middle left bottom" | "middle left top" | "middle right left" | "middle right right" | "middle right bottom" | "middle right top" | "middle center left" | "middle center right" | "middle center bottom" | "middle center top" | undefined;
22
+ variant?: "link" | "primary" | "secondary" | "tertiary" | undefined;
23
+ __experimentalIsFocusable?: boolean | undefined;
24
+ } & {
25
+ disabled?: boolean | undefined;
26
+ } & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, "disabled" | "as" | keyof {
27
+ children?: import("react").ReactNode;
28
+ describedBy?: string | undefined;
29
+ focus?: boolean | undefined;
30
+ icon?: import("../icon").IconType<unknown> | null | undefined;
31
+ iconPosition?: "left" | "right" | undefined;
32
+ iconSize?: number | undefined;
33
+ isBusy?: boolean | undefined;
34
+ isDestructive?: boolean | undefined;
35
+ isPressed?: boolean | undefined;
36
+ isSmall?: boolean | undefined;
37
+ label?: string | undefined;
38
+ shortcut?: string | {
39
+ display: string;
40
+ ariaLabel: string;
41
+ } | undefined;
42
+ showTooltip?: boolean | undefined;
43
+ text?: string | undefined;
44
+ tooltipPosition?: ("bottom" | "top" | "middle") | "bottom left" | "bottom right" | "bottom center" | "top left" | "top right" | "top center" | "middle left" | "middle right" | "middle center" | "bottom left left" | "bottom left right" | "bottom left bottom" | "bottom left top" | "bottom right left" | "bottom right right" | "bottom right bottom" | "bottom right top" | "bottom center left" | "bottom center right" | "bottom center bottom" | "bottom center top" | "top left left" | "top left right" | "top left bottom" | "top left top" | "top right left" | "top right right" | "top right bottom" | "top right top" | "top center left" | "top center right" | "top center bottom" | "top center top" | "middle left left" | "middle left right" | "middle left bottom" | "middle left top" | "middle right left" | "middle right right" | "middle right bottom" | "middle right top" | "middle center left" | "middle center right" | "middle center bottom" | "middle center top" | undefined;
45
+ variant?: "link" | "primary" | "secondary" | "tertiary" | undefined;
46
+ __experimentalIsFocusable?: boolean | undefined;
47
+ }> & import("react").RefAttributes<any>, "defaultValue" | "onChange" | "value" | "name" | "color" | "translate" | "hidden" | "style" | "disabled" | "key" | "form" | "slot" | "title" | "type" | "id" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | keyof {
48
+ children?: import("react").ReactNode;
49
+ describedBy?: string | undefined;
50
+ focus?: boolean | undefined;
51
+ icon?: import("../icon").IconType<unknown> | null | undefined;
52
+ iconPosition?: "left" | "right" | undefined;
53
+ iconSize?: number | undefined;
54
+ isBusy?: boolean | undefined;
55
+ isDestructive?: boolean | undefined;
56
+ isPressed?: boolean | undefined;
57
+ isSmall?: boolean | undefined;
58
+ label?: string | undefined;
59
+ shortcut?: string | {
60
+ display: string;
61
+ ariaLabel: string;
62
+ } | undefined;
63
+ showTooltip?: boolean | undefined;
64
+ text?: string | undefined;
65
+ tooltipPosition?: ("bottom" | "top" | "middle") | "bottom left" | "bottom right" | "bottom center" | "top left" | "top right" | "top center" | "middle left" | "middle right" | "middle center" | "bottom left left" | "bottom left right" | "bottom left bottom" | "bottom left top" | "bottom right left" | "bottom right right" | "bottom right bottom" | "bottom right top" | "bottom center left" | "bottom center right" | "bottom center bottom" | "bottom center top" | "top left left" | "top left right" | "top left bottom" | "top left top" | "top right left" | "top right right" | "top right bottom" | "top right top" | "top center left" | "top center right" | "top center bottom" | "top center top" | "middle left left" | "middle left right" | "middle left bottom" | "middle left top" | "middle right left" | "middle right right" | "middle right bottom" | "middle right top" | "middle center left" | "middle center right" | "middle center bottom" | "middle center top" | undefined;
66
+ variant?: "link" | "primary" | "secondary" | "tertiary" | undefined;
67
+ __experimentalIsFocusable?: boolean | undefined;
68
+ }> | Pick<{
69
+ children?: import("react").ReactNode;
70
+ describedBy?: string | undefined;
71
+ focus?: boolean | undefined;
72
+ icon?: import("../icon").IconType<unknown> | null | undefined;
73
+ iconPosition?: "left" | "right" | undefined;
74
+ iconSize?: number | undefined;
75
+ isBusy?: boolean | undefined;
76
+ isDestructive?: boolean | undefined;
77
+ isPressed?: boolean | undefined;
78
+ isSmall?: boolean | undefined;
79
+ label?: string | undefined;
80
+ shortcut?: string | {
81
+ display: string;
82
+ ariaLabel: string;
83
+ } | undefined;
84
+ showTooltip?: boolean | undefined;
85
+ text?: string | undefined;
86
+ tooltipPosition?: ("bottom" | "top" | "middle") | "bottom left" | "bottom right" | "bottom center" | "top left" | "top right" | "top center" | "middle left" | "middle right" | "middle center" | "bottom left left" | "bottom left right" | "bottom left bottom" | "bottom left top" | "bottom right left" | "bottom right right" | "bottom right bottom" | "bottom right top" | "bottom center left" | "bottom center right" | "bottom center bottom" | "bottom center top" | "top left left" | "top left right" | "top left bottom" | "top left top" | "top right left" | "top right right" | "top right bottom" | "top right top" | "top center left" | "top center right" | "top center bottom" | "top center top" | "middle left left" | "middle left right" | "middle left bottom" | "middle left top" | "middle right left" | "middle right right" | "middle right bottom" | "middle right top" | "middle center left" | "middle center right" | "middle center bottom" | "middle center top" | undefined;
87
+ variant?: "link" | "primary" | "secondary" | "tertiary" | undefined;
88
+ __experimentalIsFocusable?: boolean | undefined;
89
+ } & {
90
+ disabled?: false | undefined;
91
+ href: string;
92
+ target?: string | undefined;
93
+ } & Omit<Pick<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>>, "as" | keyof {
94
+ children?: import("react").ReactNode;
95
+ describedBy?: string | undefined;
96
+ focus?: boolean | undefined;
97
+ icon?: import("../icon").IconType<unknown> | null | undefined;
98
+ iconPosition?: "left" | "right" | undefined;
99
+ iconSize?: number | undefined;
100
+ isBusy?: boolean | undefined;
101
+ isDestructive?: boolean | undefined;
102
+ isPressed?: boolean | undefined;
103
+ isSmall?: boolean | undefined;
104
+ label?: string | undefined;
105
+ shortcut?: string | {
106
+ display: string;
107
+ ariaLabel: string;
108
+ } | undefined;
109
+ showTooltip?: boolean | undefined;
110
+ text?: string | undefined;
111
+ tooltipPosition?: ("bottom" | "top" | "middle") | "bottom left" | "bottom right" | "bottom center" | "top left" | "top right" | "top center" | "middle left" | "middle right" | "middle center" | "bottom left left" | "bottom left right" | "bottom left bottom" | "bottom left top" | "bottom right left" | "bottom right right" | "bottom right bottom" | "bottom right top" | "bottom center left" | "bottom center right" | "bottom center bottom" | "bottom center top" | "top left left" | "top left right" | "top left bottom" | "top left top" | "top right left" | "top right right" | "top right bottom" | "top right top" | "top center left" | "top center right" | "top center bottom" | "top center top" | "middle left left" | "middle left right" | "middle left bottom" | "middle left top" | "middle right left" | "middle right right" | "middle right bottom" | "middle right top" | "middle center left" | "middle center right" | "middle center bottom" | "middle center top" | undefined;
112
+ variant?: "link" | "primary" | "secondary" | "tertiary" | undefined;
113
+ __experimentalIsFocusable?: boolean | undefined;
114
+ } | keyof {
115
+ disabled?: false | undefined;
116
+ href: string;
117
+ target?: string | undefined;
118
+ }> & import("react").RefAttributes<any>, "defaultValue" | "onChange" | "color" | "translate" | "hidden" | "style" | "key" | "slot" | "title" | "type" | "download" | "id" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "media" | keyof {
119
+ children?: import("react").ReactNode;
120
+ describedBy?: string | undefined;
121
+ focus?: boolean | undefined;
122
+ icon?: import("../icon").IconType<unknown> | null | undefined;
123
+ iconPosition?: "left" | "right" | undefined;
124
+ iconSize?: number | undefined;
125
+ isBusy?: boolean | undefined;
126
+ isDestructive?: boolean | undefined;
127
+ isPressed?: boolean | undefined;
128
+ isSmall?: boolean | undefined;
129
+ label?: string | undefined;
130
+ shortcut?: string | {
131
+ display: string;
132
+ ariaLabel: string;
133
+ } | undefined;
134
+ showTooltip?: boolean | undefined;
135
+ text?: string | undefined;
136
+ tooltipPosition?: ("bottom" | "top" | "middle") | "bottom left" | "bottom right" | "bottom center" | "top left" | "top right" | "top center" | "middle left" | "middle right" | "middle center" | "bottom left left" | "bottom left right" | "bottom left bottom" | "bottom left top" | "bottom right left" | "bottom right right" | "bottom right bottom" | "bottom right top" | "bottom center left" | "bottom center right" | "bottom center bottom" | "bottom center top" | "top left left" | "top left right" | "top left bottom" | "top left top" | "top right left" | "top right right" | "top right bottom" | "top right top" | "top center left" | "top center right" | "top center bottom" | "top center top" | "middle left left" | "middle left right" | "middle left bottom" | "middle left top" | "middle right left" | "middle right right" | "middle right bottom" | "middle right top" | "middle center left" | "middle center right" | "middle center bottom" | "middle center top" | undefined;
137
+ variant?: "link" | "primary" | "secondary" | "tertiary" | undefined;
138
+ __experimentalIsFocusable?: boolean | undefined;
139
+ } | "hrefLang" | "ping" | "rel" | "referrerPolicy" | keyof {
140
+ disabled?: false | undefined;
141
+ href: string;
142
+ target?: string | undefined;
143
+ }>) & DeprecatedIconButtonProps) & import("react").RefAttributes<any>>;
8
144
  export default _default;
9
145
  //# sourceMappingURL=deprecated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../../src/button/deprecated.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../../src/button/deprecated.tsx"],"names":[],"mappings":";AAeA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BzD,wBAAmD"}
@@ -1,4 +1,21 @@
1
- export function Button(props: any, ref: any): JSX.Element;
2
- declare var _default: import("react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any>>;
3
- export default _default;
1
+ import type { ForwardedRef } from 'react';
2
+ import type { ButtonProps } from './types';
3
+ export declare function UnforwardedButton(props: ButtonProps, ref: ForwardedRef<any>): JSX.Element;
4
+ /**
5
+ * Lets users take actions and make choices with a single click or tap.
6
+ *
7
+ * ```jsx
8
+ * import { Button } from '@wordpress/components';
9
+ * const Mybutton = () => (
10
+ * <Button
11
+ * variant="primary"
12
+ * onClick={ handleClick }
13
+ * >
14
+ * Click here
15
+ * </Button>
16
+ * );
17
+ * ```
18
+ */
19
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<any>>;
20
+ export default Button;
4
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/button/index.js"],"names":[],"mappings":"AAiEA,0DA4IC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/button/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEX,YAAY,EAIZ,MAAM,OAAO,CAAC;AAef,OAAO,KAAK,EAAE,WAAW,EAAyB,MAAM,SAAS,CAAC;AA+ClE,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,YAAY,CAAE,GAAG,CAAE,eAgLxB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,MAAM,6FAAkC,CAAC;AACtD,eAAe,MAAM,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import './style.css';
9
+ import Button from '..';
10
+ declare const meta: ComponentMeta<typeof Button>;
11
+ export default meta;
12
+ export declare const Default: ComponentStory<typeof Button>;
13
+ export declare const Primary: ComponentStory<typeof Button>;
14
+ export declare const Secondary: ComponentStory<typeof Button>;
15
+ export declare const Tertiary: ComponentStory<typeof Button>;
16
+ export declare const Link: ComponentStory<typeof Button>;
17
+ export declare const IsDestructive: ComponentStory<typeof Button>;
18
+ export declare const Icon: ComponentStory<typeof Button>;
19
+ export declare const GroupedIcons: ComponentStory<typeof Button>;
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/button/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AActE;;GAEG;AACH,OAAO,aAAa,CAAC;AACrB,OAAO,MAAM,MAAM,IAAI,CAAC;AAExB,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,MAAM,CAoBvC,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,MAAM,CAAwB,CAAC;AAK5E,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,MAAM,CAAwB,CAAC;AAM5E,eAAO,MAAM,SAAS,EAAE,cAAc,CAAE,OAAO,MAAM,CAAwB,CAAC;AAM9E,eAAO,MAAM,QAAQ,EAAE,cAAc,CAAE,OAAO,MAAM,CAAwB,CAAC;AAM7E,eAAO,MAAM,IAAI,EAAE,cAAc,CAAE,OAAO,MAAM,CAAwB,CAAC;AAMzE,eAAO,MAAM,aAAa,EAAE,cAAc,CAAE,OAAO,MAAM,CAExD,CAAC;AAMF,eAAO,MAAM,IAAI,EAAE,cAAc,CAAE,OAAO,MAAM,CAAwB,CAAC;AAMzE,eAAO,MAAM,YAAY,EAAE,cAAc,CAAE,OAAO,MAAM,CAYvD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/button/test/index.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,134 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ReactNode } from 'react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import type { Props as IconProps } from '../icon';
9
+ import type { PopoverProps } from '../popover/types';
10
+ import type { WordPressComponentProps } from '../ui/context/wordpress-component';
11
+ export declare type ButtonProps = WordPressComponentProps<BaseButtonProps & _ButtonProps, 'button', false> | WordPressComponentProps<BaseButtonProps & AnchorProps, 'a', false>;
12
+ declare type BaseButtonProps = {
13
+ /**
14
+ * The button's children.
15
+ */
16
+ children?: ReactNode;
17
+ /**
18
+ * An accessible description for the button.
19
+ */
20
+ describedBy?: string;
21
+ /**
22
+ * Whether the button is focused.
23
+ */
24
+ focus?: boolean;
25
+ /**
26
+ * If provided, renders an Icon component inside the button.
27
+ */
28
+ icon?: IconProps<unknown>['icon'];
29
+ /**
30
+ * If provided with `icon`, sets the position of icon relative to the `text`.
31
+ *
32
+ * @default 'left'
33
+ */
34
+ iconPosition?: 'left' | 'right';
35
+ /**
36
+ * If provided with `icon`, sets the icon size.
37
+ * Please refer to the Icon component for more details regarding
38
+ * the default value of its `size` prop.
39
+ */
40
+ iconSize?: IconProps<unknown>['size'];
41
+ /**
42
+ * Indicates activity while a action is being performed.
43
+ */
44
+ isBusy?: boolean;
45
+ /**
46
+ * Renders a red text-based button style to indicate destructive behavior.
47
+ */
48
+ isDestructive?: boolean;
49
+ /**
50
+ * Renders a pressed button style.
51
+ */
52
+ isPressed?: boolean;
53
+ /**
54
+ * Decreases the size of the button.
55
+ */
56
+ isSmall?: boolean;
57
+ /**
58
+ * Sets the `aria-label` of the component, if none is provided.
59
+ * Sets the Tooltip content if `showTooltip` is provided.
60
+ */
61
+ label?: string;
62
+ /**
63
+ * If provided with `showTooltip`, appends the Shortcut label to the tooltip content.
64
+ * If an object is provided, it should contain `display` and `ariaLabel` keys.
65
+ */
66
+ shortcut?: string | {
67
+ display: string;
68
+ ariaLabel: string;
69
+ };
70
+ /**
71
+ * If provided, renders a Tooltip component for the button.
72
+ */
73
+ showTooltip?: boolean;
74
+ /**
75
+ * If provided, displays the given text inside the button. If the button contains children elements, the text is displayed before them.
76
+ */
77
+ text?: string;
78
+ /**
79
+ * If provided with `showTooltip`, sets the position of the tooltip.
80
+ * Please refer to the Tooltip component for more details regarding the defaults.
81
+ */
82
+ tooltipPosition?: PopoverProps['position'];
83
+ /**
84
+ * Specifies the button's style.
85
+ * The accepted values are:
86
+ * 'primary' (the primary button styles)
87
+ * 'secondary' (the default button styles)
88
+ * 'tertiary' (the text-based button styles)
89
+ * 'link' (the link button styles)
90
+ */
91
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'link';
92
+ /**
93
+ * Whether this is focusable.
94
+ */
95
+ __experimentalIsFocusable?: boolean;
96
+ };
97
+ declare type _ButtonProps = {
98
+ /**
99
+ * Whether the button is disabled.
100
+ * If `true`, this will force a `button` element to be rendered.
101
+ */
102
+ disabled?: boolean;
103
+ };
104
+ declare type AnchorProps = {
105
+ /**
106
+ * Whether the button is disabled.
107
+ * If `true`, this will force a `button` element to be rendered.
108
+ */
109
+ disabled?: false;
110
+ /**
111
+ * If provided, renders `a` instead of `button`.
112
+ */
113
+ href: string;
114
+ /**
115
+ * If provided with `href`, sets the `target` attribute to the `a`.
116
+ */
117
+ target?: string;
118
+ };
119
+ export declare type DeprecatedButtonProps = {
120
+ isDefault?: boolean;
121
+ isLink?: boolean;
122
+ isPrimary?: boolean;
123
+ isSecondary?: boolean;
124
+ isTertiary?: boolean;
125
+ };
126
+ export declare type DeprecatedIconButtonProps = {
127
+ labelPosition: ButtonProps['tooltipPosition'];
128
+ showTooltip?: boolean;
129
+ size: ButtonProps['iconSize'];
130
+ label: ButtonProps['label'];
131
+ tooltip: ButtonProps['label'];
132
+ };
133
+ export {};
134
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/button/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAEjF,oBAAY,WAAW,GACpB,uBAAuB,CAAE,eAAe,GAAG,YAAY,EAAE,QAAQ,EAAE,KAAK,CAAE,GAC1E,uBAAuB,CAAE,eAAe,GAAG,WAAW,EAAE,GAAG,EAAE,KAAK,CAAE,CAAC;AAExE,aAAK,eAAe,GAAG;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAE,OAAO,CAAE,CAAE,MAAM,CAAE,CAAC;IACtC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAE,OAAO,CAAE,CAAE,MAAM,CAAE,CAAC;IAC1C;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,eAAe,CAAC,EAAE,YAAY,CAAE,UAAU,CAAE,CAAC;IAC7C;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;IACxD;;OAEG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,aAAK,YAAY,GAAG;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,aAAK,WAAW,GAAG;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,oBAAY,yBAAyB,GAAG;IACvC,aAAa,EAAE,WAAW,CAAE,iBAAiB,CAAE,CAAC;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,WAAW,CAAE,UAAU,CAAE,CAAC;IAChC,KAAK,EAAE,WAAW,CAAE,OAAO,CAAE,CAAC;IAC9B,OAAO,EAAE,WAAW,CAAE,OAAO,CAAE,CAAC;CAChC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { ColorListPickerProps } from './types';
3
+ declare function ColorListPicker({ colors, labels, value, disableCustomColors, enableAlpha, onChange, }: ColorListPickerProps): JSX.Element;
4
+ export default ColorListPicker;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/color-list-picker/index.tsx"],"names":[],"mappings":";AAcA,OAAO,KAAK,EAAE,oBAAoB,EAAoB,MAAM,SAAS,CAAC;AA4CtE,iBAAS,eAAe,CAAE,EACzB,MAAM,EACN,MAAM,EACN,KAAU,EACV,mBAAmB,EACnB,WAAW,EACX,QAAQ,GACR,EAAE,oBAAoB,eAoBtB;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { CSSProperties } from 'react';
5
+ export declare type ColorListPickerProps = {
6
+ /**
7
+ * A list of predifened colors. Each color is an object with a `name` and a
8
+ * `color` value.
9
+ * The `name` is a string used to identify the color in the UI.
10
+ * The `color` is a valid CSS color string.
11
+ */
12
+ colors: Array<{
13
+ name: string;
14
+ color: NonNullable<CSSProperties['color']>;
15
+ }>;
16
+ /**
17
+ * A list of labels for each of the options displayed in the UI.
18
+ */
19
+ labels: Array<string>;
20
+ /**
21
+ * An array containing the currently selected colors.
22
+ */
23
+ value?: Array<string | undefined>;
24
+ /**
25
+ * Controls whether the custom color picker is displayed.
26
+ */
27
+ disableCustomColors?: boolean;
28
+ /**
29
+ * Controls whether the ColorPalette should show an alpha channel control.
30
+ */
31
+ enableAlpha?: boolean;
32
+ /**
33
+ * A function that receives the updated color value.
34
+ */
35
+ onChange: (newValue: Array<string | undefined>) => void;
36
+ };
37
+ export declare type ColorOptionProps = Pick<ColorListPickerProps, 'colors' | 'disableCustomColors' | 'enableAlpha'> & {
38
+ label: ColorListPickerProps['labels'][number];
39
+ value: string | undefined;
40
+ onChange: (newValue: string | undefined) => void;
41
+ };
42
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/color-list-picker/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,oBAAY,oBAAoB,GAAG;IAClC;;;;;OAKG;IACH,MAAM,EAAE,KAAK,CAAE;QACd,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,WAAW,CAAE,aAAa,CAAE,OAAO,CAAE,CAAE,CAAC;KAC/C,CAAE,CAAC;IACJ;;OAEG;IACH,MAAM,EAAE,KAAK,CAAE,MAAM,CAAE,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAE,MAAM,GAAG,SAAS,CAAE,CAAC;IACpC;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,CAAE,QAAQ,EAAE,KAAK,CAAE,MAAM,GAAG,SAAS,CAAE,KAAM,IAAI,CAAC;CAC5D,CAAC;AAEF,oBAAY,gBAAgB,GAAG,IAAI,CAClC,oBAAoB,EACpB,QAAQ,GAAG,qBAAqB,GAAG,aAAa,CAChD,GAAG;IACH,KAAK,EAAE,oBAAoB,CAAE,QAAQ,CAAE,CAAE,MAAM,CAAE,CAAC;IAClD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,CAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,KAAM,IAAI,CAAC;CACnD,CAAC"}
@@ -1,8 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { ColorObject, ColorPaletteProps, CustomColorPickerDropdownProps, PaletteObject } from './types';
2
+ import type { ColorObject, CustomColorPickerDropdownProps, PaletteObject } from './types';
3
3
  export declare function CustomColorPickerDropdown({ isRenderedInSidebar, popoverProps: receivedPopoverProps, ...props }: CustomColorPickerDropdownProps): JSX.Element;
4
- export declare const extractColorNameFromCurrentValue: (currentValue?: ColorPaletteProps['value'], colors?: ColorPaletteProps['colors'], showMultiplePalettes?: boolean) => string;
5
- export declare const showTransparentBackground: (currentValue?: string | undefined) => boolean;
6
4
  /**
7
5
  * Allows the user to pick a color from a list of pre-defined color entries.
8
6
  *
@@ -35,7 +33,7 @@ export declare const ColorPalette: import("react").ForwardRefExoticComponent<Pic
35
33
  actions?: import("react").ReactNode;
36
34
  }, "onChange"> & {
37
35
  clearable?: boolean | undefined;
38
- colors?: (ColorObject | PaletteObject)[] | undefined;
36
+ colors?: ColorObject[] | PaletteObject[] | undefined;
39
37
  disableCustomColors?: boolean | undefined;
40
38
  enableAlpha?: boolean | undefined;
41
39
  value?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/color-palette/index.tsx"],"names":[],"mappings":";AAyBA,OAAO,KAAK,EACX,WAAW,EACX,iBAAiB,EACjB,8BAA8B,EAE9B,aAAa,EAEb,MAAM,SAAS,CAAC;AAoGjB,wBAAgB,yBAAyB,CAAE,EAC1C,mBAAmB,EACnB,YAAY,EAAE,oBAAoB,EAClC,GAAG,KAAK,EACR,EAAE,8BAA8B,eA4BhC;AAED,eAAO,MAAM,gCAAgC,kBAC7B,iBAAiB,CAAE,OAAO,CAAE,WACnC,iBAAiB,CAAE,QAAQ,CAAE,yBACf,OAAO,WA8B7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,gDAKrC,CAAC;AAuJF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;uCAAwC,CAAC;AAElE,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/color-palette/index.tsx"],"names":[],"mappings":";AAyBA,OAAO,KAAK,EACX,WAAW,EAEX,8BAA8B,EAE9B,aAAa,EAEb,MAAM,SAAS,CAAC;AA0GjB,wBAAgB,yBAAyB,CAAE,EAC1C,mBAAmB,EACnB,YAAY,EAAE,oBAAoB,EAClC,GAAG,KAAK,EACR,EAAE,8BAA8B,eA4BhC;AAmID;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;uCAAwC,CAAC;AAElE,eAAe,YAAY,CAAC"}
@@ -14,7 +14,7 @@ export declare const Default: ComponentStory<import("react").ForwardRefExoticCom
14
14
  actions?: import("react").ReactNode;
15
15
  }, "onChange"> & {
16
16
  clearable?: boolean | undefined;
17
- colors?: (import("../types").ColorObject | import("../types").PaletteObject)[] | undefined;
17
+ colors?: import("../types").ColorObject[] | import("../types").PaletteObject[] | undefined;
18
18
  disableCustomColors?: boolean | undefined;
19
19
  enableAlpha?: boolean | undefined;
20
20
  value?: string | undefined;
@@ -30,7 +30,7 @@ export declare const MultipleOrigins: ComponentStory<import("react").ForwardRefE
30
30
  actions?: import("react").ReactNode;
31
31
  }, "onChange"> & {
32
32
  clearable?: boolean | undefined;
33
- colors?: (import("../types").ColorObject | import("../types").PaletteObject)[] | undefined;
33
+ colors?: import("../types").ColorObject[] | import("../types").PaletteObject[] | undefined;
34
34
  disableCustomColors?: boolean | undefined;
35
35
  enableAlpha?: boolean | undefined;
36
36
  value?: string | undefined;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const ColorHeading: import("@emotion/styled").StyledComponent<Omit<import("../text/types").Props, "size"> & {
3
3
  level?: import("../heading/types").HeadingSize | undefined;
4
- } & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "key" | keyof import("react").HTMLAttributes<HTMLHeadingElement>>, "color" | "display" | "letterSpacing" | "lineHeight" | "ellipsis" | "weight" | "children" | "as" | "variant" | keyof import("react").RefAttributes<any> | "isBlock" | "align" | "ellipsizeMode" | "limit" | "numberOfLines" | "adjustLineHeightForInnerControls" | "isDestructive" | "highlightEscape" | "highlightCaseSensitive" | "highlightSanitize" | "optimizeReadabilityFor" | "truncate" | "upperCase" | "highlightWords" | "level"> & {
4
+ } & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "key" | keyof import("react").HTMLAttributes<HTMLHeadingElement>>, "color" | "display" | "letterSpacing" | "lineHeight" | "ellipsis" | "weight" | "children" | "as" | "isDestructive" | "variant" | keyof import("react").RefAttributes<any> | "isBlock" | "align" | "ellipsizeMode" | "limit" | "numberOfLines" | "adjustLineHeightForInnerControls" | "highlightEscape" | "highlightCaseSensitive" | "highlightSanitize" | "optimizeReadabilityFor" | "truncate" | "upperCase" | "highlightWords" | "level"> & {
5
5
  as?: keyof JSX.IntrinsicElements | undefined;
6
6
  } & {
7
7
  theme?: import("@emotion/react").Theme | undefined;
@@ -47,7 +47,7 @@ export declare type ColorPaletteProps = Pick<PaletteProps, 'onChange'> & {
47
47
  *
48
48
  * @default []
49
49
  */
50
- colors?: (PaletteObject | ColorObject)[];
50
+ colors?: PaletteObject[] | ColorObject[];
51
51
  /**
52
52
  * Whether to allow the user to pick a custom color on top of the predefined
53
53
  * choices (defined via the `colors` prop).
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/color-palette/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,oBAAY,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,CAAE,aAAa,CAAE,OAAO,CAAE,CAAE,CAAC;CAC/C,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAEF,aAAK,YAAY,GAAG;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,CAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAM,IAAI,CAAC;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,oBAAY,kBAAkB,GAAG,YAAY,GAAG;IAC/C,MAAM,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAEF,oBAAY,qBAAqB,GAAG,YAAY,GAAG;IAClD,MAAM,EAAE,aAAa,EAAE,CAAC;CACxB,CAAC;AAEF,oBAAY,8BAA8B,GAAG,aAAa,GAAG;IAC5D,mBAAmB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,oBAAY,iBAAiB,GAAG,IAAI,CAAE,YAAY,EAAE,UAAU,CAAE,GAAG;IAClE;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAE,aAAa,GAAG,WAAW,CAAE,EAAE,CAAC;IAC3C;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC5C,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/color-palette/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,oBAAY,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,CAAE,aAAa,CAAE,OAAO,CAAE,CAAE,CAAC;CAC/C,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAEF,aAAK,YAAY,GAAG;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,CAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAM,IAAI,CAAC;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,oBAAY,kBAAkB,GAAG,YAAY,GAAG;IAC/C,MAAM,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAEF,oBAAY,qBAAqB,GAAG,YAAY,GAAG;IAClD,MAAM,EAAE,aAAa,EAAE,CAAC;CACxB,CAAC;AAEF,oBAAY,8BAA8B,GAAG,aAAa,GAAG;IAC5D,mBAAmB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,oBAAY,iBAAiB,GAAG,IAAI,CAAE,YAAY,EAAE,UAAU,CAAE,GAAG;IAClE;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,aAAa,EAAE,GAAG,WAAW,EAAE,CAAC;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC5C,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { RefObject } from 'react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import type { ColorObject, ColorPaletteProps, PaletteObject } from './types';
9
+ export declare const extractColorNameFromCurrentValue: (currentValue?: ColorPaletteProps['value'], colors?: ColorPaletteProps['colors'], showMultiplePalettes?: boolean) => string;
10
+ export declare const showTransparentBackground: (currentValue?: string | undefined) => boolean;
11
+ export declare const isMultiplePaletteObject: (obj: PaletteObject | ColorObject) => obj is PaletteObject;
12
+ export declare const isMultiplePaletteArray: (arr: (PaletteObject | ColorObject)[]) => arr is PaletteObject[];
13
+ export declare const normalizeColorValue: (value: string | undefined, ref: RefObject<HTMLElement> | null) => string | undefined;
14
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/color-palette/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvC;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI7E,eAAO,MAAM,gCAAgC,kBAC7B,iBAAiB,CAAE,OAAO,CAAE,WACnC,iBAAiB,CAAE,QAAQ,CAAE,yBACf,OAAO,WA8B7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,gDAKrC,CAAC;AAIF,eAAO,MAAM,uBAAuB,QAC9B,aAAa,GAAG,WAAW,yBAEwC,CAAC;AAE1E,eAAO,MAAM,sBAAsB,QAC7B,CAAE,aAAa,GAAG,WAAW,CAAE,EAAE,2BAMtC,CAAC;AAEF,eAAO,MAAM,mBAAmB,UACxB,MAAM,GAAG,SAAS,OACpB,UAAW,WAAW,CAAE,GAAG,IAAI,uBAiBpC,CAAC"}
@@ -48,7 +48,7 @@ export declare const RangeControl: import("@emotion/styled").StyledComponent<Pic
48
48
  trackColor?: import("csstype").Property.Color | undefined;
49
49
  type?: "stepper" | undefined;
50
50
  withInputField?: boolean | undefined;
51
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "onChange" | "color" | "help" | "icon" | "disabled" | "children" | "label" | "as" | "type" | "onFocus" | "onBlur" | "onMouseLeave" | "onMouseMove" | "step" | "__nextHasNoMarginBottom" | "hideLabelFromVision" | "isShiftStepEnabled" | "shiftStep" | "showTooltip" | "marks" | "railColor" | "trackColor" | keyof import("../range-control/types").NumericProps | "renderTooltipContent" | "afterIcon" | "allowReset" | "beforeIcon" | "currentInput" | "initialPosition" | "resetFallbackValue" | "separatorType" | "withInputField"> & import("react").RefAttributes<HTMLInputElement> & {
51
+ } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "onChange" | "color" | "help" | "icon" | "disabled" | "children" | "label" | "as" | "type" | "onFocus" | "onBlur" | "onMouseLeave" | "onMouseMove" | "step" | "showTooltip" | "__nextHasNoMarginBottom" | "hideLabelFromVision" | "isShiftStepEnabled" | "shiftStep" | "marks" | "railColor" | "trackColor" | keyof import("../range-control/types").NumericProps | "renderTooltipContent" | "afterIcon" | "allowReset" | "beforeIcon" | "currentInput" | "initialPosition" | "resetFallbackValue" | "separatorType" | "withInputField"> & import("react").RefAttributes<HTMLInputElement> & {
52
52
  theme?: import("@emotion/react").Theme | undefined;
53
53
  }, {}, {}>;
54
54
  export declare const AuxiliaryColorArtefactWrapper: import("@emotion/styled").StyledComponent<{
@@ -72,7 +72,7 @@ export declare const ColorfulWrapper: import("@emotion/styled").StyledComponent<
72
72
  theme?: import("@emotion/react").Theme | undefined;
73
73
  as?: import("react").ElementType<any> | undefined;
74
74
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
75
- export declare const CopyButton: import("@emotion/styled").StyledComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any> & {
75
+ export declare const CopyButton: import("@emotion/styled").StyledComponent<(import("../button/types").ButtonProps & import("react").RefAttributes<any>) & {
76
76
  theme?: import("@emotion/react").Theme | undefined;
77
77
  }, {}, {}>;
78
78
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/date-time/date/index.tsx"],"names":[],"mappings":";AA2BA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAahD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAE,EAC3B,WAAW,EACX,QAAQ,EACR,MAAW,EACX,aAAa,EACb,gBAAgB,EAChB,WAAW,EAAE,YAAgB,GAC7B,EAAE,eAAe,eAkMjB;AAmGD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/date-time/date/index.tsx"],"names":[],"mappings":";AA4BA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAahD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAE,EAC3B,WAAW,EACX,QAAQ,EACR,MAAW,EACX,aAAa,EACb,gBAAgB,EAChB,WAAW,EAAE,YAAgB,GAC7B,EAAE,eAAe,eAkMjB;AAmGD,eAAe,UAAU,CAAC"}
@@ -13,7 +13,7 @@ export declare const Navigator: import("@emotion/styled").StyledComponent<Omit<i
13
13
  }, {}, {}>;
14
14
  export declare const NavigatorHeading: import("@emotion/styled").StyledComponent<Omit<import("../../text/types").Props, "size"> & {
15
15
  level?: import("../../heading/types").HeadingSize | undefined;
16
- } & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "key" | keyof import("react").HTMLAttributes<HTMLHeadingElement>>, "color" | "display" | "letterSpacing" | "lineHeight" | "ellipsis" | "weight" | "children" | "as" | "variant" | keyof import("react").RefAttributes<any> | "isBlock" | "align" | "ellipsizeMode" | "limit" | "numberOfLines" | "adjustLineHeightForInnerControls" | "isDestructive" | "highlightEscape" | "highlightCaseSensitive" | "highlightSanitize" | "optimizeReadabilityFor" | "truncate" | "upperCase" | "highlightWords" | "level"> & {
16
+ } & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "key" | keyof import("react").HTMLAttributes<HTMLHeadingElement>>, "color" | "display" | "letterSpacing" | "lineHeight" | "ellipsis" | "weight" | "children" | "as" | "isDestructive" | "variant" | keyof import("react").RefAttributes<any> | "isBlock" | "align" | "ellipsizeMode" | "limit" | "numberOfLines" | "adjustLineHeightForInnerControls" | "highlightEscape" | "highlightCaseSensitive" | "highlightSanitize" | "optimizeReadabilityFor" | "truncate" | "upperCase" | "highlightWords" | "level"> & {
17
17
  as?: keyof JSX.IntrinsicElements | undefined;
18
18
  } & {
19
19
  theme?: import("@emotion/react").Theme | undefined;
@@ -26,9 +26,9 @@ export declare const DayOfWeek: import("@emotion/styled").StyledComponent<{
26
26
  theme?: import("@emotion/react").Theme | undefined;
27
27
  as?: import("react").ElementType<any> | undefined;
28
28
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
29
- export declare const DayButton: import("@emotion/styled").StyledComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any> & {
29
+ export declare const DayButton: import("@emotion/styled").StyledComponent<((import("../../button/types").ButtonProps & import("react").RefAttributes<any>) & {
30
30
  theme?: import("@emotion/react").Theme | undefined;
31
- } & {
31
+ }) & {
32
32
  column: number;
33
33
  isSelected: boolean;
34
34
  isToday: boolean;