@wordpress/components 21.1.2-next.4d3b314fd5.0 → 21.3.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 (401) hide show
  1. package/CHANGELOG.md +48 -3
  2. package/CONTRIBUTING.md +20 -0
  3. package/build/border-box-control/border-box-control/component.js +2 -0
  4. package/build/border-box-control/border-box-control/component.js.map +1 -1
  5. package/build/border-box-control/border-box-control/hook.js +4 -1
  6. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  7. package/build/border-box-control/utils.js +42 -2
  8. package/build/border-box-control/utils.js.map +1 -1
  9. package/build/border-control/border-control/component.js +2 -0
  10. package/build/border-control/border-control/component.js.map +1 -1
  11. package/build/combobox-control/index.js +0 -1
  12. package/build/combobox-control/index.js.map +1 -1
  13. package/build/custom-select-control/index.js +4 -2
  14. package/build/custom-select-control/index.js.map +1 -1
  15. package/build/disabled/index.js +6 -26
  16. package/build/disabled/index.js.map +1 -1
  17. package/build/font-size-picker/index.js +47 -56
  18. package/build/font-size-picker/index.js.map +1 -1
  19. package/build/font-size-picker/styles.js +65 -0
  20. package/build/font-size-picker/styles.js.map +1 -0
  21. package/build/font-size-picker/types.js +6 -0
  22. package/build/font-size-picker/types.js.map +1 -0
  23. package/build/font-size-picker/utils.js +18 -16
  24. package/build/font-size-picker/utils.js.map +1 -1
  25. package/build/form-token-field/suggestions-list.js +5 -5
  26. package/build/form-token-field/suggestions-list.js.map +1 -1
  27. package/build/form-token-field/token-input.js +20 -1
  28. package/build/form-token-field/token-input.js.map +1 -1
  29. package/build/higher-order/with-fallback-styles/index.js +1 -1
  30. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  31. package/build/index.js +14 -6
  32. package/build/index.js.map +1 -1
  33. package/build/modal/aria-helper.js +2 -3
  34. package/build/modal/aria-helper.js.map +1 -1
  35. package/build/modal/index.js +42 -11
  36. package/build/modal/index.js.map +1 -1
  37. package/build/modal/types.js +6 -0
  38. package/build/modal/types.js.map +1 -0
  39. package/build/navigator/index.js +8 -8
  40. package/build/navigator/index.js.map +1 -1
  41. package/build/navigator/navigator-back-button/component.js +5 -4
  42. package/build/navigator/navigator-back-button/component.js.map +1 -1
  43. package/build/navigator/navigator-back-button/index.js +1 -1
  44. package/build/navigator/navigator-back-button/index.js.map +1 -1
  45. package/build/navigator/navigator-button/component.js +5 -4
  46. package/build/navigator/navigator-button/component.js.map +1 -1
  47. package/build/navigator/navigator-button/index.js +1 -1
  48. package/build/navigator/navigator-button/index.js.map +1 -1
  49. package/build/navigator/navigator-provider/component.js +10 -7
  50. package/build/navigator/navigator-provider/component.js.map +1 -1
  51. package/build/navigator/navigator-provider/index.js +1 -1
  52. package/build/navigator/navigator-provider/index.js.map +1 -1
  53. package/build/navigator/navigator-screen/component.js +30 -26
  54. package/build/navigator/navigator-screen/component.js.map +1 -1
  55. package/build/navigator/navigator-screen/index.js +1 -1
  56. package/build/navigator/navigator-screen/index.js.map +1 -1
  57. package/build/resizable-box/resize-tooltip/utils.js +12 -14
  58. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  59. package/build/sandbox/index.js +68 -67
  60. package/build/sandbox/index.js.map +1 -1
  61. package/build/sandbox/index.native.js +66 -63
  62. package/build/sandbox/index.native.js.map +1 -1
  63. package/build/search-control/index.native.js +6 -2
  64. package/build/search-control/index.native.js.map +1 -1
  65. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +8 -2
  66. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  67. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +31 -41
  68. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  69. package/build/slot-fill/bubbles-virtually/use-slot-fills.js +39 -0
  70. package/build/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -0
  71. package/build/slot-fill/bubbles-virtually/use-slot.js +13 -4
  72. package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  73. package/build/slot-fill/index.js +8 -0
  74. package/build/slot-fill/index.js.map +1 -1
  75. package/build/tab-panel/index.js +4 -4
  76. package/build/tab-panel/index.js.map +1 -1
  77. package/build/theme/index.js +62 -0
  78. package/build/theme/index.js.map +1 -0
  79. package/build/theme/styles.js +33 -0
  80. package/build/theme/styles.js.map +1 -0
  81. package/build/theme/types.js +6 -0
  82. package/build/theme/types.js.map +1 -0
  83. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +8 -8
  84. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  85. package/build/tools-panel/tools-panel/hook.js +3 -3
  86. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  87. package/build/tools-panel/tools-panel-item/hook.js +6 -6
  88. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  89. package/build/tooltip/index.js +4 -1
  90. package/build/tooltip/index.js.map +1 -1
  91. package/build/tooltip/index.native.js +17 -4
  92. package/build/tooltip/index.native.js.map +1 -1
  93. package/build-module/border-box-control/border-box-control/component.js +2 -0
  94. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  95. package/build-module/border-box-control/border-box-control/hook.js +4 -1
  96. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  97. package/build-module/border-box-control/utils.js +36 -1
  98. package/build-module/border-box-control/utils.js.map +1 -1
  99. package/build-module/border-control/border-control/component.js +2 -0
  100. package/build-module/border-control/border-control/component.js.map +1 -1
  101. package/build-module/combobox-control/index.js +0 -1
  102. package/build-module/combobox-control/index.js.map +1 -1
  103. package/build-module/custom-select-control/index.js +2 -1
  104. package/build-module/custom-select-control/index.js.map +1 -1
  105. package/build-module/disabled/index.js +7 -26
  106. package/build-module/disabled/index.js.map +1 -1
  107. package/build-module/font-size-picker/index.js +46 -54
  108. package/build-module/font-size-picker/index.js.map +1 -1
  109. package/build-module/font-size-picker/styles.js +54 -0
  110. package/build-module/font-size-picker/styles.js.map +1 -0
  111. package/build-module/font-size-picker/types.js +2 -0
  112. package/build-module/font-size-picker/types.js.map +1 -0
  113. package/build-module/font-size-picker/utils.js +22 -16
  114. package/build-module/font-size-picker/utils.js.map +1 -1
  115. package/build-module/form-token-field/suggestions-list.js +5 -5
  116. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  117. package/build-module/form-token-field/token-input.js +21 -2
  118. package/build-module/form-token-field/token-input.js.map +1 -1
  119. package/build-module/higher-order/with-fallback-styles/index.js +2 -2
  120. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  121. package/build-module/index.js +3 -2
  122. package/build-module/index.js.map +1 -1
  123. package/build-module/modal/aria-helper.js +2 -3
  124. package/build-module/modal/aria-helper.js.map +1 -1
  125. package/build-module/modal/index.js +44 -12
  126. package/build-module/modal/index.js.map +1 -1
  127. package/build-module/modal/types.js +2 -0
  128. package/build-module/modal/types.js.map +1 -0
  129. package/build-module/navigator/index.js +4 -4
  130. package/build-module/navigator/index.js.map +1 -1
  131. package/build-module/navigator/navigator-back-button/component.js +3 -3
  132. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  133. package/build-module/navigator/navigator-back-button/index.js +1 -1
  134. package/build-module/navigator/navigator-back-button/index.js.map +1 -1
  135. package/build-module/navigator/navigator-button/component.js +3 -3
  136. package/build-module/navigator/navigator-button/component.js.map +1 -1
  137. package/build-module/navigator/navigator-button/index.js +1 -1
  138. package/build-module/navigator/navigator-button/index.js.map +1 -1
  139. package/build-module/navigator/navigator-provider/component.js +8 -6
  140. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  141. package/build-module/navigator/navigator-provider/index.js +1 -1
  142. package/build-module/navigator/navigator-provider/index.js.map +1 -1
  143. package/build-module/navigator/navigator-screen/component.js +18 -25
  144. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  145. package/build-module/navigator/navigator-screen/index.js +1 -1
  146. package/build-module/navigator/navigator-screen/index.js.map +1 -1
  147. package/build-module/resizable-box/resize-tooltip/utils.js +13 -15
  148. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  149. package/build-module/sandbox/index.js +69 -67
  150. package/build-module/sandbox/index.js.map +1 -1
  151. package/build-module/sandbox/index.native.js +57 -53
  152. package/build-module/sandbox/index.native.js.map +1 -1
  153. package/build-module/search-control/index.native.js +6 -2
  154. package/build-module/search-control/index.native.js.map +1 -1
  155. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +7 -2
  156. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  157. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +30 -42
  158. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  159. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js +27 -0
  160. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -0
  161. package/build-module/slot-fill/bubbles-virtually/use-slot.js +13 -5
  162. package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  163. package/build-module/slot-fill/index.js +1 -0
  164. package/build-module/slot-fill/index.js.map +1 -1
  165. package/build-module/tab-panel/index.js +4 -4
  166. package/build-module/tab-panel/index.js.map +1 -1
  167. package/build-module/theme/index.js +52 -0
  168. package/build-module/theme/index.js.map +1 -0
  169. package/build-module/theme/styles.js +25 -0
  170. package/build-module/theme/styles.js.map +1 -0
  171. package/build-module/theme/types.js +2 -0
  172. package/build-module/theme/types.js.map +1 -0
  173. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +7 -7
  174. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  175. package/build-module/tools-panel/tools-panel/hook.js +3 -3
  176. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  177. package/build-module/tools-panel/tools-panel-item/hook.js +6 -6
  178. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  179. package/build-module/tooltip/index.js +4 -1
  180. package/build-module/tooltip/index.js.map +1 -1
  181. package/build-module/tooltip/index.native.js +17 -4
  182. package/build-module/tooltip/index.native.js.map +1 -1
  183. package/build-style/style-rtl.css +27 -120
  184. package/build-style/style.css +27 -120
  185. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  186. package/build-types/border-box-control/border-box-control/hook.d.ts +1 -0
  187. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  188. package/build-types/border-box-control/utils.d.ts +1 -3
  189. package/build-types/border-box-control/utils.d.ts.map +1 -1
  190. package/build-types/border-control/border-control/component.d.ts +1 -0
  191. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  192. package/build-types/border-control/border-control/hook.d.ts +1 -0
  193. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  194. package/build-types/border-control/stories/index.d.ts +6 -0
  195. package/build-types/border-control/stories/index.d.ts.map +1 -1
  196. package/build-types/border-control/types.d.ts +4 -0
  197. package/build-types/border-control/types.d.ts.map +1 -1
  198. package/build-types/confirm-dialog/types.d.ts +5 -1
  199. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  200. package/build-types/custom-select-control/index.d.ts +13 -0
  201. package/build-types/custom-select-control/index.d.ts.map +1 -0
  202. package/build-types/custom-select-control/styles.d.ts +9 -0
  203. package/build-types/custom-select-control/styles.d.ts.map +1 -0
  204. package/build-types/disabled/index.d.ts.map +1 -1
  205. package/build-types/font-size-picker/index.d.ts +5 -0
  206. package/build-types/font-size-picker/index.d.ts.map +1 -0
  207. package/build-types/font-size-picker/stories/e2e/index.d.ts +16 -0
  208. package/build-types/font-size-picker/stories/e2e/index.d.ts.map +1 -0
  209. package/build-types/font-size-picker/stories/index.d.ts +31 -0
  210. package/build-types/font-size-picker/stories/index.d.ts.map +1 -0
  211. package/build-types/font-size-picker/styles.d.ts +27 -0
  212. package/build-types/font-size-picker/styles.d.ts.map +1 -0
  213. package/build-types/font-size-picker/test/index.d.ts +2 -0
  214. package/build-types/font-size-picker/test/index.d.ts.map +1 -0
  215. package/build-types/font-size-picker/test/utils.d.ts +2 -0
  216. package/build-types/font-size-picker/test/utils.d.ts.map +1 -0
  217. package/build-types/font-size-picker/types.d.ts +93 -0
  218. package/build-types/font-size-picker/types.d.ts.map +1 -0
  219. package/build-types/font-size-picker/utils.d.ts +41 -0
  220. package/build-types/font-size-picker/utils.d.ts.map +1 -0
  221. package/build-types/form-token-field/token-input.d.ts.map +1 -1
  222. package/build-types/modal/aria-helper.d.ts +4 -4
  223. package/build-types/modal/aria-helper.d.ts.map +1 -1
  224. package/build-types/modal/index.d.ts +35 -2
  225. package/build-types/modal/index.d.ts.map +1 -1
  226. package/build-types/modal/stories/index.d.ts +9 -0
  227. package/build-types/modal/stories/index.d.ts.map +1 -0
  228. package/build-types/modal/test/aria-helper.d.ts +2 -0
  229. package/build-types/modal/test/aria-helper.d.ts.map +1 -0
  230. package/build-types/modal/test/index.d.ts +2 -0
  231. package/build-types/modal/test/index.d.ts.map +1 -0
  232. package/build-types/modal/types.d.ts +134 -0
  233. package/build-types/modal/types.d.ts.map +1 -0
  234. package/build-types/navigator/index.d.ts +4 -4
  235. package/build-types/navigator/index.d.ts.map +1 -1
  236. package/build-types/navigator/navigator-back-button/component.d.ts +4 -2
  237. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  238. package/build-types/navigator/navigator-back-button/hook.d.ts +1 -0
  239. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  240. package/build-types/navigator/navigator-back-button/index.d.ts +1 -1
  241. package/build-types/navigator/navigator-back-button/index.d.ts.map +1 -1
  242. package/build-types/navigator/navigator-button/component.d.ts +4 -2
  243. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  244. package/build-types/navigator/navigator-button/hook.d.ts +1 -0
  245. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  246. package/build-types/navigator/navigator-button/index.d.ts +1 -1
  247. package/build-types/navigator/navigator-button/index.d.ts.map +1 -1
  248. package/build-types/navigator/navigator-provider/component.d.ts +2 -2
  249. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  250. package/build-types/navigator/navigator-provider/index.d.ts +1 -1
  251. package/build-types/navigator/navigator-provider/index.d.ts.map +1 -1
  252. package/build-types/navigator/navigator-screen/component.d.ts +2 -2
  253. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  254. package/build-types/navigator/navigator-screen/index.d.ts +1 -1
  255. package/build-types/navigator/navigator-screen/index.d.ts.map +1 -1
  256. package/build-types/navigator/stories/index.d.ts +9 -0
  257. package/build-types/navigator/stories/index.d.ts.map +1 -0
  258. package/build-types/navigator/test/index.d.ts +2 -0
  259. package/build-types/navigator/test/index.d.ts.map +1 -0
  260. package/build-types/navigator/types.d.ts +4 -1
  261. package/build-types/navigator/types.d.ts.map +1 -1
  262. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +2 -2
  263. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  264. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  265. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +2 -0
  266. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -0
  267. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  268. package/build-types/slot-fill/index.d.ts +1 -0
  269. package/build-types/slot-fill/index.d.ts.map +1 -1
  270. package/build-types/tab-panel/index.d.ts.map +1 -1
  271. package/build-types/theme/index.d.ts +31 -0
  272. package/build-types/theme/index.d.ts.map +1 -0
  273. package/build-types/theme/stories/index.d.ts +13 -0
  274. package/build-types/theme/stories/index.d.ts.map +1 -0
  275. package/build-types/theme/styles.d.ts +10 -0
  276. package/build-types/theme/styles.d.ts.map +1 -0
  277. package/build-types/theme/test/index.d.ts +2 -0
  278. package/build-types/theme/test/index.d.ts.map +1 -0
  279. package/build-types/theme/types.d.ts +21 -0
  280. package/build-types/theme/types.d.ts.map +1 -0
  281. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +1 -1
  282. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  283. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  284. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  285. package/build-types/tooltip/index.d.ts.map +1 -1
  286. package/package.json +19 -18
  287. package/src/alignment-matrix-control/test/index.js +17 -62
  288. package/src/base-field/test/index.js +4 -6
  289. package/src/border-box-control/border-box-control/component.tsx +2 -0
  290. package/src/border-box-control/border-box-control/hook.ts +4 -0
  291. package/src/border-box-control/test/index.js +7 -2
  292. package/src/border-box-control/test/utils.js +48 -0
  293. package/src/border-box-control/utils.ts +44 -1
  294. package/src/border-control/border-control/README.md +6 -0
  295. package/src/border-control/border-control/component.tsx +2 -0
  296. package/src/border-control/types.ts +4 -0
  297. package/src/button/style.scss +25 -25
  298. package/src/button/test/index.js +3 -5
  299. package/src/combobox-control/index.js +0 -5
  300. package/src/combobox-control/test/index.js +1 -1
  301. package/src/confirm-dialog/types.ts +6 -0
  302. package/src/custom-select-control/index.js +2 -1
  303. package/src/date-time/time/test/index.tsx +2 -6
  304. package/src/disabled/index.tsx +11 -33
  305. package/src/disabled/test/index.tsx +14 -82
  306. package/src/dropdown/test/index.js +4 -3
  307. package/src/font-size-picker/{index.js → index.tsx} +114 -80
  308. package/src/font-size-picker/stories/e2e/{index.js → index.tsx} +13 -4
  309. package/src/font-size-picker/stories/{index.js → index.tsx} +42 -36
  310. package/src/font-size-picker/styles.ts +46 -0
  311. package/src/font-size-picker/test/{index.js → index.tsx} +3 -3
  312. package/src/font-size-picker/test/{utils.js → utils.ts} +11 -7
  313. package/src/font-size-picker/types.ts +98 -0
  314. package/src/font-size-picker/{utils.js → utils.ts} +52 -28
  315. package/src/form-file-upload/test/index.tsx +1 -1
  316. package/src/form-token-field/suggestions-list.tsx +5 -5
  317. package/src/form-token-field/test/index.tsx +22 -1
  318. package/src/form-token-field/token-input.tsx +25 -3
  319. package/src/higher-order/with-fallback-styles/index.js +6 -2
  320. package/src/higher-order/with-focus-outside/test/index.js +44 -45
  321. package/src/higher-order/with-focus-return/test/index.js +34 -30
  322. package/src/higher-order/with-notices/test/index.js +1 -1
  323. package/src/index.js +3 -1
  324. package/src/input-control/test/index.js +2 -2
  325. package/src/item-group/test/index.js +2 -2
  326. package/src/menu-item/test/index.js +0 -3
  327. package/src/mobile/bottom-sheet/test/range-cell.native.js +16 -14
  328. package/src/modal/README.md +53 -54
  329. package/src/modal/{aria-helper.js → aria-helper.ts} +5 -7
  330. package/src/modal/{index.js → index.tsx} +48 -12
  331. package/src/modal/stories/{index.js → index.tsx} +47 -42
  332. package/src/modal/test/{aria-helper.js → aria-helper.ts} +0 -0
  333. package/src/modal/test/{index.js → index.tsx} +13 -3
  334. package/src/modal/types.ts +144 -0
  335. package/src/navigation/test/index.js +1 -1
  336. package/src/navigator/index.ts +4 -4
  337. package/src/navigator/navigator-back-button/component.tsx +4 -4
  338. package/src/navigator/navigator-back-button/index.ts +1 -1
  339. package/src/navigator/navigator-button/component.tsx +4 -4
  340. package/src/navigator/navigator-button/index.ts +1 -1
  341. package/src/navigator/navigator-provider/component.tsx +6 -4
  342. package/src/navigator/navigator-provider/index.ts +1 -1
  343. package/src/navigator/navigator-screen/component.tsx +27 -26
  344. package/src/navigator/navigator-screen/index.ts +1 -1
  345. package/src/navigator/stories/index.tsx +210 -0
  346. package/src/navigator/test/index.tsx +509 -0
  347. package/src/navigator/types.ts +2 -0
  348. package/src/notice/test/__snapshots__/index.js.snap +39 -38
  349. package/src/notice/test/index.js +15 -36
  350. package/src/notice/test/list.js +6 -14
  351. package/src/number-control/test/index.js +3 -2
  352. package/src/panel/test/body.js +2 -2
  353. package/src/placeholder/style.scss +7 -2
  354. package/src/resizable-box/resize-tooltip/utils.ts +13 -13
  355. package/src/sandbox/index.js +75 -54
  356. package/src/sandbox/index.native.js +75 -52
  357. package/src/sandbox/test/index.js +7 -10
  358. package/src/search-control/index.native.js +6 -0
  359. package/src/shortcut/test/index.tsx +1 -1
  360. package/src/slot-fill/bubbles-virtually/slot-fill-context.js +6 -2
  361. package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +53 -58
  362. package/src/slot-fill/bubbles-virtually/use-slot-fills.js +24 -0
  363. package/src/slot-fill/bubbles-virtually/use-slot.js +11 -6
  364. package/src/slot-fill/index.js +1 -0
  365. package/src/style.scss +4 -1
  366. package/src/tab-panel/index.tsx +4 -7
  367. package/src/text-highlight/test/index.tsx +1 -3
  368. package/src/theme/README.md +34 -0
  369. package/src/theme/index.tsx +51 -0
  370. package/src/theme/stories/index.tsx +47 -0
  371. package/src/theme/styles.ts +28 -0
  372. package/src/theme/test/index.tsx +101 -0
  373. package/src/theme/types.ts +21 -0
  374. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +1 -0
  375. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +9 -7
  376. package/src/toolbar/test/index.js +2 -2
  377. package/src/toolbar-group/test/index.js +6 -10
  378. package/src/tools-panel/test/index.js +4 -6
  379. package/src/tools-panel/tools-panel/hook.ts +2 -9
  380. package/src/tools-panel/tools-panel-item/hook.ts +17 -3
  381. package/src/tooltip/index.js +3 -0
  382. package/src/tooltip/index.native.js +15 -0
  383. package/src/tooltip/test/index.native.js +1 -2
  384. package/src/tree-grid/test/__snapshots__/cell.js.snap +1 -3
  385. package/src/tree-grid/test/__snapshots__/roving-tab-index-item.js.snap +17 -15
  386. package/src/tree-grid/test/__snapshots__/row.js.snap +25 -21
  387. package/src/tree-grid/test/cell.js +4 -4
  388. package/src/tree-grid/test/roving-tab-index-item.js +8 -8
  389. package/src/tree-grid/test/roving-tab-index.js +3 -3
  390. package/src/tree-grid/test/row.js +20 -16
  391. package/src/truncate/test/index.tsx +4 -4
  392. package/src/ui/shortcut/test/index.js +2 -1
  393. package/src/ui/spinner/test/index.js +14 -13
  394. package/src/ui/tooltip/test/index.js +16 -14
  395. package/src/utils/theme-variables.scss +8 -0
  396. package/src/visually-hidden/README.md +4 -0
  397. package/tsconfig.json +0 -2
  398. package/tsconfig.tsbuildinfo +1 -1
  399. package/src/font-size-picker/style.scss +0 -78
  400. package/src/navigator/stories/index.js +0 -194
  401. package/src/navigator/test/index.js +0 -407
@@ -58,6 +58,10 @@ export declare type LabelProps = {
58
58
  label?: string;
59
59
  };
60
60
  export declare type BorderControlProps = ColorProps & LabelProps & {
61
+ /**
62
+ * This controls whether unit selection should be disabled.
63
+ */
64
+ disableUnits?: boolean;
61
65
  /**
62
66
  * This controls whether to include border style options within the
63
67
  * `BorderDropdown` sub-component.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/border-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,oBAAY,MAAM,GAAG;IACpB,KAAK,CAAC,EAAE,aAAa,CAAE,aAAa,CAAE,CAAC;IACvC,KAAK,CAAC,EAAE,aAAa,CAAE,aAAa,CAAE,CAAC;IACvC,KAAK,CAAC,EAAE,aAAa,CAAE,aAAa,CAAE,CAAC;CACvC,CAAC;AAEF,oBAAY,KAAK,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;CAChC,CAAC;AAEF,oBAAY,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,EAAE,CAAC;CAChB,CAAC;AAEF,oBAAY,MAAM,GAAG,WAAW,EAAE,GAAG,KAAK,EAAE,CAAC;AAE7C,oBAAY,UAAU,GAAG;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C;;;OAGG;IACH,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC5C,CAAC;AAEF,oBAAY,UAAU,GAAG;IACxB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,kBAAkB,GAAG,UAAU,GAC1C,UAAU,GAAG;IACZ;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,EAAE,CAAE,KAAK,CAAC,EAAE,MAAM,KAAM,IAAI,CAAC;IACrC;;OAEG;IACH,sBAAsB,CAAC,EAAE,IAAI,CAAE,YAAY,EAAE,UAAU,CAAE,CAAC;IAC1D;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEH,oBAAY,aAAa,GAAG,UAAU,GAAG;IACxC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,sBAAsB,CAAC,EAAE,IAAI,CAAE,YAAY,EAAE,UAAU,CAAE,CAAC;IAC1D;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,CAAE,SAAS,CAAC,EAAE,MAAM,KAAM,IAAI,CAAC;IACzC;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,oBAAY,gBAAgB,GAAG,UAAU,GAAG;IAC3C;;OAEG;IACH,QAAQ,EAAE,CAAE,KAAK,CAAC,EAAE,MAAM,KAAM,IAAI,CAAC;IACrC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/border-control/types.ts"],"names":[],"mappings":"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"}
@@ -2,7 +2,11 @@
2
2
  * External dependencies
3
3
  */
4
4
  import type { MouseEvent, KeyboardEvent, ReactNode } from 'react';
5
- export declare type DialogInputEvent = KeyboardEvent<HTMLDivElement> | MouseEvent<HTMLButtonElement>;
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import type { ModalProps } from '../modal/types';
9
+ export declare type DialogInputEvent = Parameters<ModalProps['onRequestClose']>[0] | KeyboardEvent<HTMLDivElement> | MouseEvent<HTMLButtonElement>;
6
10
  declare type BaseProps = {
7
11
  children: ReactNode;
8
12
  onConfirm: (event: DialogInputEvent) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/confirm-dialog/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,oBAAY,gBAAgB,GACzB,aAAa,CAAE,cAAc,CAAE,GAC/B,UAAU,CAAE,iBAAiB,CAAE,CAAC;AAEnC,aAAK,SAAS,GAAG;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,CAAE,KAAK,EAAE,gBAAgB,KAAM,IAAI,CAAC;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,aAAK,eAAe,GAAG,SAAS,GAAG;IAClC,QAAQ,EAAE,CAAE,KAAK,EAAE,gBAAgB,KAAM,IAAI,CAAC;IAC9C,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,aAAK,iBAAiB,GAAG,SAAS,GAAG;IACpC,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,gBAAgB,KAAM,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,oBAAY,QAAQ,GAAG,eAAe,GAAG,iBAAiB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/confirm-dialog/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,oBAAY,gBAAgB,GACzB,UAAU,CAAE,UAAU,CAAE,gBAAgB,CAAE,CAAE,CAAE,CAAC,CAAE,GACjD,aAAa,CAAE,cAAc,CAAE,GAC/B,UAAU,CAAE,iBAAiB,CAAE,CAAC;AAEnC,aAAK,SAAS,GAAG;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,CAAE,KAAK,EAAE,gBAAgB,KAAM,IAAI,CAAC;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,aAAK,eAAe,GAAG,SAAS,GAAG;IAClC,QAAQ,EAAE,CAAE,KAAK,EAAE,gBAAgB,KAAM,IAAI,CAAC;IAC9C,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,aAAK,iBAAiB,GAAG,SAAS,GAAG;IACpC,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,gBAAgB,KAAM,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,oBAAY,QAAQ,GAAG,eAAe,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,13 @@
1
+ export default function CustomSelectControl({ __next36pxDefaultSize, __nextUnconstrainedWidth, className, hideLabelFromVision, label, describedBy, options: items, onChange: onSelectedItemChange, size, value: _selectedItem, }: {
2
+ __next36pxDefaultSize?: boolean | undefined;
3
+ __nextUnconstrainedWidth?: boolean | undefined;
4
+ className: any;
5
+ hideLabelFromVision: any;
6
+ label: any;
7
+ describedBy: any;
8
+ options: any;
9
+ onChange: any;
10
+ size?: string | undefined;
11
+ value: any;
12
+ }): JSX.Element;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/custom-select-control/index.js"],"names":[],"mappings":"AA+DA;;;;;;;;;;;gBAyKC"}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ declare type BackCompatMinWidthProps = {
3
+ __nextUnconstrainedWidth: boolean;
4
+ };
5
+ export declare const InputBaseWithBackCompatMinWidth: import("@emotion/styled").StyledComponent<import("../input-control/types").InputBaseProps & import("react").RefAttributes<HTMLDivElement> & {
6
+ theme?: import("@emotion/react").Theme | undefined;
7
+ } & BackCompatMinWidthProps, {}, {}>;
8
+ export {};
9
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/custom-select-control/styles.ts"],"names":[],"mappings":";AAYA,aAAK,uBAAuB,GAAG;IAC9B,wBAAwB,EAAE,OAAO,CAAC;CAClC,CAAC;AAWF,eAAO,MAAM,+BAA+B;;oCAE3C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/disabled/index.tsx"],"names":[],"mappings":";AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAe7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,iBAAS,QAAQ,CAAE,EAClB,SAAS,EACT,QAAQ,EACR,UAAiB,EACjB,GAAG,KAAK,EACR,EAAE,uBAAuB,CAAE,aAAa,EAAE,KAAK,CAAE,eA0BjD;kBA/BQ,QAAQ;;;;AAoCjB,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/disabled/index.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAM7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,iBAAS,QAAQ,CAAE,EAClB,SAAS,EACT,QAAQ,EACR,UAAiB,EACjB,GAAG,KAAK,EACR,EAAE,uBAAuB,CAAE,aAAa,EAAE,KAAK,CAAE,eAmBjD;kBAxBQ,QAAQ;;;;AA6BjB,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { FontSizePickerProps } from './types';
3
+ export declare const FontSizePicker: import("react").ForwardRefExoticComponent<FontSizePickerProps & import("react").RefAttributes<any>>;
4
+ export default FontSizePicker;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/font-size-picker/index.tsx"],"names":[],"mappings":";AAmCA,OAAO,KAAK,EACX,mBAAmB,EAGnB,MAAM,SAAS,CAAC;AA+SjB,eAAO,MAAM,cAAc,qGAA0C,CAAC;AAEtE,eAAe,cAAc,CAAC"}
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * External dependencies
4
+ */
5
+ import type { ComponentStory } from '@storybook/react';
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import FontSizePicker from '../..';
10
+ declare const _default: {
11
+ title: string;
12
+ component: import("react").ForwardRefExoticComponent<import("../../types").FontSizePickerProps & import("react").RefAttributes<any>>;
13
+ };
14
+ export default _default;
15
+ export declare const Default: ComponentStory<typeof FontSizePicker>;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/font-size-picker/stories/e2e/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOvD;;GAEG;AACH,OAAO,cAAc,MAAM,OAAO,CAAC;;;;;AAEnC,wBAGE;AAgBF,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,cAAc,CACxB,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import FontSizePicker from '../';
9
+ declare const meta: ComponentMeta<typeof FontSizePicker>;
10
+ export default meta;
11
+ export declare const Default: ComponentStory<typeof FontSizePicker>;
12
+ export declare const WithSlider: ComponentStory<typeof FontSizePicker>;
13
+ /**
14
+ * With custom font sizes disabled via the `disableCustomFontSizes` prop, the user will
15
+ * only be able to pick one of the predefined sizes passed in `fontSizes`.
16
+ */
17
+ export declare const WithCustomSizesDisabled: ComponentStory<typeof FontSizePicker>;
18
+ /**
19
+ * When there are more than 5 font size options, the UI is no longer a toggle group.
20
+ */
21
+ export declare const WithMoreFontSizes: ComponentStory<typeof FontSizePicker>;
22
+ /**
23
+ * When units like `px` are specified explicitly, it will be shown as a label hint.
24
+ */
25
+ export declare const WithUnits: ComponentStory<typeof FontSizePicker>;
26
+ /**
27
+ * The label hint will not be shown if it is a complex CSS value. Some examples of complex CSS values
28
+ * in this context are CSS functions like `calc()`, `clamp()`, and `var()`.
29
+ */
30
+ export declare const WithComplexCSSValues: ComponentStory<typeof FontSizePicker>;
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/font-size-picker/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,cAAc,MAAM,KAAK,CAAC;AAEjC,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,cAAc,CAW/C,CAAC;AACF,eAAe,IAAI,CAAC;AAsCpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,cAAc,CACxB,CAAC;AAyBpC,eAAO,MAAM,UAAU,EAAE,cAAc,CAAE,OAAO,cAAc,CAC3B,CAAC;AAQpC;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,cAAc,CAAE,OAAO,cAAc,CACxC,CAAC;AAMpC;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAE,OAAO,cAAc,CAClC,CAAC;AAsCpC;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,cAAc,CAAE,OAAO,cAAc,CACtB,CAAC;AAUxC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAE,OAAO,cAAc,CACjC,CAAC"}
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import type { FontSizePickerProps } from './types';
3
+ export declare const Container: import("@emotion/styled").StyledComponent<{
4
+ theme?: import("@emotion/react").Theme | undefined;
5
+ as?: import("react").ElementType<any> | undefined;
6
+ }, import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, {}>;
7
+ export declare const HeaderLabel: import("@emotion/styled").StyledComponent<import("../base-control/types").BaseControlVisualLabelProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>>, "children" | "as"> & {
8
+ as?: keyof JSX.IntrinsicElements | undefined;
9
+ } & {
10
+ theme?: import("@emotion/react").Theme | undefined;
11
+ }, {}, {}>;
12
+ export declare const HeaderHint: import("@emotion/styled").StyledComponent<{
13
+ theme?: import("@emotion/react").Theme | undefined;
14
+ as?: import("react").ElementType<any> | undefined;
15
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
16
+ export declare const Controls: import("@emotion/styled").StyledComponent<{
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any> | undefined;
19
+ } & {
20
+ __nextHasNoMarginBottom: boolean;
21
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
22
+ export declare const ResetButton: import("@emotion/styled").StyledComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any> & {
23
+ theme?: import("@emotion/react").Theme | undefined;
24
+ } & {
25
+ size: FontSizePickerProps['size'];
26
+ }, {}, {}>;
27
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/font-size-picker/styles.ts"],"names":[],"mappings":";AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,SAAS;;;2HAIrB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;UAKvB,CAAC;AAEF,eAAO,MAAM,UAAU;;;2GAEtB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;6BACK,OAAO;yGAIhC,CAAC;AAEF,eAAO,MAAM,WAAW;;;UACjB,mBAAmB,CAAE,MAAM,CAAE;UAMnC,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/font-size-picker/test/index.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/font-size-picker/test/utils.ts"],"names":[],"mappings":""}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ReactNode } from 'react';
5
+ export declare type FontSizePickerProps = {
6
+ /**
7
+ * If `true`, it will not be possible to choose a custom fontSize. The user
8
+ * will be forced to pick one of the pre-defined sizes passed in fontSizes.
9
+ *
10
+ * @default false
11
+ */
12
+ disableCustomFontSizes?: boolean;
13
+ /**
14
+ * If no value exists, this prop defines the starting position for the font
15
+ * size picker slider. Only relevant if `withSlider` is `true`.
16
+ */
17
+ fallbackFontSize?: number;
18
+ /**
19
+ * An array of font size objects. The object should contain properties size,
20
+ * name, and slug.
21
+ */
22
+ fontSizes?: FontSize[];
23
+ /**
24
+ * A function that receives the new font size value.
25
+ * If onChange is called without any parameter, it should reset the value,
26
+ * attending to what reset means in that context, e.g., set the font size to
27
+ * undefined or set the font size a starting value.
28
+ */
29
+ onChange?: (value: number | string | undefined) => void;
30
+ /**
31
+ * The current font size value.
32
+ */
33
+ value?: number | string;
34
+ /**
35
+ * If `true`, the UI will contain a slider, instead of a numeric text input
36
+ * field. If `false`, no slider will be present.
37
+ *
38
+ * @default false
39
+ */
40
+ withSlider?: boolean;
41
+ /**
42
+ * If `true`, a reset button will be displayed alongside the input field
43
+ * when a custom font size is active. Has no effect when
44
+ * `disableCustomFontSizes` or `withSlider` is `true`.
45
+ *
46
+ * @default true
47
+ */
48
+ withReset?: boolean;
49
+ /**
50
+ * Start opting into the new margin-free styles that will become the default
51
+ * in a future version, currently scheduled to be WordPress 6.4. (The prop
52
+ * can be safely removed once this happens.)
53
+ *
54
+ * @default false
55
+ */
56
+ __nextHasNoMarginBottom?: boolean;
57
+ /**
58
+ * Size of the control.
59
+ *
60
+ * @default default
61
+ */
62
+ size?: 'default' | '__unstable-large';
63
+ };
64
+ export declare type FontSize = {
65
+ /**
66
+ * The property `size` contains a number with the font size value, in `px` or
67
+ * a string specifying the font size CSS property that should be used eg:
68
+ * "13px", "1em", or "clamp(12px, 5vw, 100px)".
69
+ */
70
+ size: number | string;
71
+ /**
72
+ * The `name` property includes a label for that font size e.g.: `Small`.
73
+ */
74
+ name?: string;
75
+ /**
76
+ * The `slug` property is a string with a unique identifier for the font
77
+ * size. Used for the class generation process.
78
+ */
79
+ slug: string;
80
+ };
81
+ export declare type FontSizeOption = Omit<FontSize, 'size'> & Partial<Pick<FontSize, 'size'>>;
82
+ export declare type FontSizeSelectOption = Pick<FontSizeOption, 'size'> & {
83
+ key: string;
84
+ name?: string;
85
+ __experimentalHint: ReactNode;
86
+ };
87
+ export declare type FontSizeToggleGroupOption = {
88
+ key: string;
89
+ value: number | string;
90
+ label: string;
91
+ name: string;
92
+ };
93
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/font-size-picker/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,oBAAY,mBAAmB,GAAG;IACjC;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,KAAM,IAAI,CAAC;IAC1D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,kBAAkB,CAAC;CACtC,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACtB;;;;OAIG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,oBAAY,cAAc,GAAG,IAAI,CAAE,QAAQ,EAAE,MAAM,CAAE,GACpD,OAAO,CAAE,IAAI,CAAE,QAAQ,EAAE,MAAM,CAAE,CAAE,CAAC;AAErC,oBAAY,oBAAoB,GAAG,IAAI,CAAE,cAAc,EAAE,MAAM,CAAE,GAAG;IACnE,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,SAAS,CAAC;CAC9B,CAAC;AAEF,oBAAY,yBAAyB,GAAG;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACb,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { FontSize, FontSizeOption, FontSizeSelectOption, FontSizeToggleGroupOption, FontSizePickerProps } from './types';
5
+ export declare const CUSTOM_FONT_SIZE = "custom";
6
+ /**
7
+ * Helper util to split a font size to its numeric value
8
+ * and its `unit`, if exists.
9
+ *
10
+ * @param size Font size.
11
+ * @return An array with the numeric value and the unit if exists.
12
+ */
13
+ export declare function splitValueAndUnitFromSize(size: NonNullable<FontSizePickerProps['value']>): string[];
14
+ /**
15
+ * Some themes use css vars for their font sizes, so until we
16
+ * have the way of calculating them don't display them.
17
+ *
18
+ * @param value The value that is checked.
19
+ * @return Whether the value is a simple css value.
20
+ */
21
+ export declare function isSimpleCssValue(value: NonNullable<FontSizePickerProps['value']>): boolean;
22
+ /**
23
+ * Return font size options in the proper format depending
24
+ * on the currently used control (select, toggle group).
25
+ *
26
+ * @param useSelectControl Whether to use a select control.
27
+ * @param optionsArray Array of available font sizes objects.
28
+ * @param disableCustomFontSizes Flag that indicates if custom font sizes are disabled.
29
+ * @return Array of font sizes in proper format for the used control.
30
+ */
31
+ export declare function getFontSizeOptions(useSelectControl: boolean, optionsArray: FontSize[], disableCustomFontSizes: boolean): FontSizeSelectOption[] | FontSizeToggleGroupOption[] | null;
32
+ /**
33
+ * Build options for the toggle group options.
34
+ *
35
+ * @param optionsArray An array of font size options.
36
+ * @param labelAliases An array of alternative labels.
37
+ * @return Remapped optionsArray.
38
+ */
39
+ export declare function getToggleGroupOptions(optionsArray: FontSize[], labelAliases?: string[]): FontSizeToggleGroupOption[];
40
+ export declare function getSelectedOption(fontSizes: FontSize[], value: FontSizePickerProps['value']): FontSizeOption;
41
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/font-size-picker/utils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,MAAM,SAAS,CAAC;AAOjB,eAAO,MAAM,gBAAgB,WAAW,CAAC;AAwBzC;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACxC,IAAI,EAAE,WAAW,CAAE,mBAAmB,CAAE,OAAO,CAAE,CAAE,YAYnD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,WAAW,CAAE,mBAAmB,CAAE,OAAO,CAAE,CAAE,WAIpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CACjC,gBAAgB,EAAE,OAAO,EACzB,YAAY,EAAE,QAAQ,EAAE,EACxB,sBAAsB,EAAE,OAAO,GAC7B,oBAAoB,EAAE,GAAG,yBAAyB,EAAE,GAAG,IAAI,CAO7D;AAoBD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACpC,YAAY,EAAE,QAAQ,EAAE,EACxB,YAAY,GAAE,MAAM,EAAuB,GACzC,yBAAyB,EAAE,CAS7B;AAED,wBAAgB,iBAAiB,CAChC,SAAS,EAAE,QAAQ,EAAE,EACrB,KAAK,EAAE,mBAAmB,CAAE,OAAO,CAAE,GACnC,cAAc,CAQhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"token-input.d.ts","sourceRoot":"","sources":["../../src/form-token-field/token-input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,OAAO,CAAC;AAOvD;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,uBAAuB,CAAE,eAAe,EAAE,OAAO,EAAE,KAAK,CAAE,EACjE,GAAG,EAAE,YAAY,CAAE,gBAAgB,CAAE,eAoDrC;AAED,eAAO,MAAM,UAAU,uVAAsC,CAAC;AAE9D,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"token-input.d.ts","sourceRoot":"","sources":["../../src/form-token-field/token-input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAe,YAAY,EAAqB,MAAM,OAAO,CAAC;AAO1E;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,uBAAuB,CAAE,eAAe,EAAE,OAAO,EAAE,KAAK,CAAE,EACjE,GAAG,EAAE,YAAY,CAAE,gBAAgB,CAAE,eA0ErC;AAED,eAAO,MAAM,UAAU,uVAAsC,CAAC;AAE9D,eAAe,UAAU,CAAC"}
@@ -8,9 +8,9 @@
8
8
  * we should consider removing these helper functions in favor of
9
9
  * `aria-modal="true"`.
10
10
  *
11
- * @param {Element} unhiddenElement The element that should not be hidden.
11
+ * @param {HTMLDivElement} unhiddenElement The element that should not be hidden.
12
12
  */
13
- export function hideApp(unhiddenElement: Element): void;
13
+ export declare function hideApp(unhiddenElement?: HTMLDivElement): void;
14
14
  /**
15
15
  * Determines if the passed element should not be hidden from screen readers.
16
16
  *
@@ -18,10 +18,10 @@ export function hideApp(unhiddenElement: Element): void;
18
18
  *
19
19
  * @return {boolean} Whether the element should not be hidden from screen-readers.
20
20
  */
21
- export function elementShouldBeHidden(element: HTMLElement): boolean;
21
+ export declare function elementShouldBeHidden(element: Element): boolean;
22
22
  /**
23
23
  * Makes all elements in the body that have been hidden by `hideApp`
24
24
  * visible again to screen-readers.
25
25
  */
26
- export function showApp(): void;
26
+ export declare function showApp(): void;
27
27
  //# sourceMappingURL=aria-helper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aria-helper.d.ts","sourceRoot":"","sources":["../../src/modal/aria-helper.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;GAWG;AACH,yCAFW,OAAO,QAiBjB;AAED;;;;;;GAMG;AACH,+CAJW,WAAW,GAEV,OAAO,CAUlB;AAED;;;GAGG;AACH,gCASC"}
1
+ {"version":3,"file":"aria-helper.d.ts","sourceRoot":"","sources":["../../src/modal/aria-helper.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAE,eAAe,CAAC,EAAE,cAAc,QAexD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAE,OAAO,EAAE,OAAO,WAQtD;AAED;;;GAGG;AACH,wBAAgB,OAAO,SAStB"}
@@ -1,3 +1,36 @@
1
- declare var _default: import("react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any>>;
2
- export default _default;
1
+ /// <reference types="react" />
2
+ import type { ModalProps } from './types';
3
+ /**
4
+ * Modals give users information and choices related to a task they’re trying to
5
+ * accomplish. They can contain critical information, require decisions, or
6
+ * involve multiple tasks.
7
+ *
8
+ * ```jsx
9
+ * import { Button, Modal } from '@wordpress/components';
10
+ * import { useState } from '@wordpress/element';
11
+ *
12
+ * const MyModal = () => {
13
+ * const [ isOpen, setOpen ] = useState( false );
14
+ * const openModal = () => setOpen( true );
15
+ * const closeModal = () => setOpen( false );
16
+ *
17
+ * return (
18
+ * <>
19
+ * <Button variant="secondary" onClick={ openModal }>
20
+ * Open Modal
21
+ * </Button>
22
+ * { isOpen && (
23
+ * <Modal title="This is my modal" onRequestClose={ closeModal }>
24
+ * <Button variant="secondary" onClick={ closeModal }>
25
+ * My custom close button
26
+ * </Button>
27
+ * </Modal>
28
+ * ) }
29
+ * </>
30
+ * );
31
+ * };
32
+ * ```
33
+ */
34
+ export declare const Modal: import("react").ForwardRefExoticComponent<ModalProps & import("react").RefAttributes<HTMLDivElement>>;
35
+ export default Modal;
3
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modal/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modal/index.tsx"],"names":[],"mappings":";AAkCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA+K1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,KAAK,uGAAiC,CAAC;AAEpD,eAAe,KAAK,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentStory, ComponentMeta } from '@storybook/react';
5
+ import Modal from '../';
6
+ declare const meta: ComponentMeta<typeof Modal>;
7
+ export default meta;
8
+ export declare const Default: ComponentStory<typeof Modal>;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modal/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAWtE,OAAO,KAAK,MAAM,KAAK,CAAC;AAGxB,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,KAAK,CAuBtC,CAAC;AACF,eAAe,IAAI,CAAC;AA6CpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,KAAK,CAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=aria-helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aria-helper.d.ts","sourceRoot":"","sources":["../../../src/modal/test/aria-helper.ts"],"names":[],"mappings":""}
@@ -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/modal/test/index.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,134 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { AriaRole, CSSProperties, ReactNode, KeyboardEventHandler, KeyboardEvent, SyntheticEvent } from 'react';
5
+ /**
6
+ * WordPress dependencies
7
+ */
8
+ import type { useFocusOnMount } from '@wordpress/compose';
9
+ export declare type ModalProps = {
10
+ aria?: {
11
+ /**
12
+ * If this property is added, it will be added to the modal content
13
+ * `div` as `aria-describedby`.
14
+ */
15
+ describedby?: string;
16
+ /**
17
+ * If this property is added, it will be added to the modal content
18
+ * `div` as `aria-labelledby`. Use this when you are rendering the title
19
+ * yourself within the modal's content area instead of using the `title`
20
+ * prop. This ensures the title is usable by assistive technology.
21
+ *
22
+ * Titles are required for accessibility reasons, see `contentLabel` and
23
+ * `title` for other ways to provide a title.
24
+ */
25
+ labelledby?: string;
26
+ };
27
+ /**
28
+ * Class name added to the body element when the modal is open.
29
+ *
30
+ * @default 'modal-open'
31
+ */
32
+ bodyOpenClassName?: string;
33
+ /**
34
+ * The children elements.
35
+ */
36
+ children: ReactNode;
37
+ /**
38
+ * If this property is added, it will an additional class name to the modal
39
+ * content `div`.
40
+ */
41
+ className?: string;
42
+ /**
43
+ * Label on the close button.
44
+ */
45
+ closeButtonLabel?: string;
46
+ /**
47
+ * If this property is added, it will be added to the modal content `div` as
48
+ * `aria-label`.
49
+ *
50
+ * Titles are required for accessibility reasons, see `aria.labelledby` and
51
+ * `title` for other ways to provide a title.
52
+ */
53
+ contentLabel?: string;
54
+ /**
55
+ * If this property is true, it will focus the first tabbable element
56
+ * rendered in the modal.
57
+ *
58
+ * @default true
59
+ */
60
+ focusOnMount?: Parameters<typeof useFocusOnMount>[0];
61
+ /**
62
+ * If this property is added, an icon will be added before the title.
63
+ */
64
+ icon?: JSX.Element;
65
+ /**
66
+ * If this property is set to false, the modal will not display a close icon
67
+ * and cannot be dismissed.
68
+ *
69
+ * @default true
70
+ */
71
+ isDismissible?: boolean;
72
+ /**
73
+ * This property when set to `true` will render a full screen modal.
74
+ *
75
+ * @default false
76
+ */
77
+ isFullScreen?: boolean;
78
+ /**
79
+ * Handle the key down on the modal frame `div`.
80
+ */
81
+ onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
82
+ /**
83
+ * This function is called to indicate that the modal should be closed.
84
+ */
85
+ onRequestClose: (event?: KeyboardEvent<HTMLDivElement> | SyntheticEvent) => void;
86
+ /**
87
+ * If this property is added, it will an additional class name to the modal
88
+ * overlay `div`.
89
+ */
90
+ overlayClassName?: string;
91
+ /**
92
+ * If this property is added, it will override the default role of the
93
+ * modal.
94
+ *
95
+ * @default 'dialog'
96
+ */
97
+ role?: AriaRole;
98
+ /**
99
+ * If this property is added, it will determine whether the modal requests
100
+ * to close when a mouse click occurs outside of the modal content.
101
+ *
102
+ * @default true
103
+ */
104
+ shouldCloseOnClickOutside?: boolean;
105
+ /**
106
+ * If this property is added, it will determine whether the modal requests
107
+ * to close when the escape key is pressed.
108
+ *
109
+ * @default true
110
+ */
111
+ shouldCloseOnEsc?: boolean;
112
+ /**
113
+ * If this property is added, it will be added to the modal frame `div`.
114
+ */
115
+ style?: CSSProperties;
116
+ /**
117
+ * This property is used as the modal header's title.
118
+ *
119
+ * Titles are required for accessibility reasons, see `aria.labelledby` and
120
+ * `contentLabel` for other ways to provide a title.
121
+ */
122
+ title?: string;
123
+ /**
124
+ * When set to `true`, the Modal's header (including the icon, title and
125
+ * close button) will not be rendered.
126
+ *
127
+ * _Warning_: This property is still experimental. “Experimental” means this
128
+ * is an early implementation subject to drastic and breaking changes.
129
+ *
130
+ * @default false
131
+ */
132
+ __experimentalHideHeader?: boolean;
133
+ };
134
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/modal/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACX,QAAQ,EACR,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,MAAM,OAAO,CAAC;AAEf;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,oBAAY,UAAU,GAAG;IACxB,IAAI,CAAC,EAAE;QACN;;;WAGG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB;;;;;;;;WAQG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,UAAU,CAAE,OAAO,eAAe,CAAE,CAAE,CAAC,CAAE,CAAC;IACzD;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,oBAAoB,CAAE,cAAc,CAAE,CAAC;IACnD;;OAEG;IACH,cAAc,EAAE,CACf,KAAK,CAAC,EAAE,aAAa,CAAE,cAAc,CAAE,GAAG,cAAc,KACpD,IAAI,CAAC;IACV;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;;;OAKG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;OAQG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC"}
@@ -1,6 +1,6 @@
1
- export { default as NavigatorProvider } from './navigator-provider';
2
- export { default as NavigatorScreen } from './navigator-screen';
3
- export { default as NavigatorButton } from './navigator-button';
4
- export { default as NavigatorBackButton } from './navigator-back-button';
1
+ export { NavigatorProvider } from './navigator-provider';
2
+ export { NavigatorScreen } from './navigator-screen';
3
+ export { NavigatorButton } from './navigator-button';
4
+ export { NavigatorBackButton } from './navigator-back-button';
5
5
  export { default as useNavigator } from './use-navigator';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -33,8 +33,10 @@
33
33
  * );
34
34
  * ```
35
35
  */
36
- declare const ConnectedNavigatorBackButton: import("../../ui/context").WordPressComponent<"button", Omit<{}, "href"> & {
36
+ export declare const NavigatorBackButton: import("../../ui/context").WordPressComponent<"button", Omit<{
37
+ variant?: "link" | "secondary" | "tertiary" | "primary" | undefined;
38
+ }, "href"> & {
37
39
  children: import("react").ReactNode;
38
40
  } & import("react").RefAttributes<any>, true>;
39
- export default ConnectedNavigatorBackButton;
41
+ export default NavigatorBackButton;
40
42
  //# sourceMappingURL=component.d.ts.map