@wordpress/components 19.13.0 → 19.14.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 (398) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/build/alignment-matrix-control/utils.js +1 -7
  3. package/build/alignment-matrix-control/utils.js.map +1 -1
  4. package/build/autocomplete/autocompleter-ui.js +4 -2
  5. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  6. package/build/autocomplete/autocompleter-ui.native.js +9 -3
  7. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  8. package/build/autocomplete/index.js +4 -2
  9. package/build/autocomplete/index.js.map +1 -1
  10. package/build/border-box-control/border-box-control/component.js +2 -1
  11. package/build/border-box-control/border-box-control/component.js.map +1 -1
  12. package/build/border-box-control/border-box-control-split-controls/component.js +2 -1
  13. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  14. package/build/border-control/border-control/component.js +40 -4
  15. package/build/border-control/border-control/component.js.map +1 -1
  16. package/build/box-control/utils.js +3 -3
  17. package/build/box-control/utils.js.map +1 -1
  18. package/build/color-indicator/index.js +27 -10
  19. package/build/color-indicator/index.js.map +1 -1
  20. package/build/color-indicator/types.js +6 -0
  21. package/build/color-indicator/types.js.map +1 -0
  22. package/build/color-palette/index.js +2 -1
  23. package/build/color-palette/index.js.map +1 -1
  24. package/build/color-picker/component.js +6 -9
  25. package/build/color-picker/component.js.map +1 -1
  26. package/build/color-picker/input-with-slider.js +1 -2
  27. package/build/color-picker/input-with-slider.js.map +1 -1
  28. package/build/color-picker/styles.js +34 -16
  29. package/build/color-picker/styles.js.map +1 -1
  30. package/build/custom-gradient-picker/index.js +8 -8
  31. package/build/custom-gradient-picker/index.js.map +1 -1
  32. package/build/custom-gradient-picker/index.native.js +8 -9
  33. package/build/custom-gradient-picker/index.native.js.map +1 -1
  34. package/build/custom-gradient-picker/serializer.js +4 -7
  35. package/build/custom-gradient-picker/serializer.js.map +1 -1
  36. package/build/date-time/date/index.js +3 -1
  37. package/build/date-time/date/index.js.map +1 -1
  38. package/build/date-time/date-time/index.js +3 -1
  39. package/build/date-time/date-time/index.js.map +1 -1
  40. package/build/duotone-picker/duotone-picker.js +42 -29
  41. package/build/duotone-picker/duotone-picker.js.map +1 -1
  42. package/build/elevation/hook.js +13 -13
  43. package/build/elevation/hook.js.map +1 -1
  44. package/build/focal-point-picker/index.native.js +4 -4
  45. package/build/focal-point-picker/index.native.js.map +1 -1
  46. package/build/form-toggle/index.js +28 -5
  47. package/build/form-toggle/index.js.map +1 -1
  48. package/build/form-toggle/types.js +6 -0
  49. package/build/form-toggle/types.js.map +1 -0
  50. package/build/h-stack/utils.js +3 -3
  51. package/build/h-stack/utils.js.map +1 -1
  52. package/build/heading/component.js +0 -1
  53. package/build/heading/component.js.map +1 -1
  54. package/build/heading/hook.js.map +1 -1
  55. package/build/heading/types.js +6 -0
  56. package/build/heading/types.js.map +1 -0
  57. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +0 -1
  58. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  59. package/build/mobile/link-picker/index.native.js +4 -4
  60. package/build/mobile/link-picker/index.native.js.map +1 -1
  61. package/build/mobile/segmented-control/index.native.js +2 -4
  62. package/build/mobile/segmented-control/index.native.js.map +1 -1
  63. package/build/navigation/group/index.js +4 -7
  64. package/build/navigation/group/index.js.map +1 -1
  65. package/build/navigation/item/base.js +3 -3
  66. package/build/navigation/item/base.js.map +1 -1
  67. package/build/navigation/item/use-navigation-tree-item.js +2 -1
  68. package/build/navigation/item/use-navigation-tree-item.js.map +1 -1
  69. package/build/navigation/menu/menu-title-search.js +1 -7
  70. package/build/navigation/menu/menu-title-search.js.map +1 -1
  71. package/build/navigation/menu/search-no-results-found.js +1 -7
  72. package/build/navigation/menu/search-no-results-found.js.map +1 -1
  73. package/build/navigation/use-navigation-tree-nodes.js +18 -10
  74. package/build/navigation/use-navigation-tree-nodes.js.map +1 -1
  75. package/build/navigation/utils.js +4 -2
  76. package/build/navigation/utils.js.map +1 -1
  77. package/build/range-control/index.js +3 -3
  78. package/build/range-control/index.js.map +1 -1
  79. package/build/range-control/utils.js +3 -7
  80. package/build/range-control/utils.js.map +1 -1
  81. package/build/spacer/component.js +5 -5
  82. package/build/spacer/component.js.map +1 -1
  83. package/build/spinner/index.js +26 -13
  84. package/build/spinner/index.js.map +1 -1
  85. package/build/spinner/styles.js +10 -10
  86. package/build/spinner/styles.js.map +1 -1
  87. package/build/truncate/component.js +7 -8
  88. package/build/truncate/component.js.map +1 -1
  89. package/build/truncate/hook.js +3 -10
  90. package/build/truncate/hook.js.map +1 -1
  91. package/build/truncate/index.js.map +1 -1
  92. package/build/truncate/styles.js +1 -1
  93. package/build/truncate/styles.js.map +1 -1
  94. package/build/truncate/utils.js +3 -16
  95. package/build/truncate/utils.js.map +1 -1
  96. package/build/utils/math.js +17 -7
  97. package/build/utils/math.js.map +1 -1
  98. package/build/v-stack/component.js +9 -9
  99. package/build/v-stack/component.js.map +1 -1
  100. package/build/v-stack/hook.js +0 -5
  101. package/build/v-stack/hook.js.map +1 -1
  102. package/build/v-stack/index.js.map +1 -1
  103. package/build-module/alignment-matrix-control/utils.js +1 -6
  104. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  105. package/build-module/autocomplete/autocompleter-ui.js +4 -2
  106. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  107. package/build-module/autocomplete/autocompleter-ui.native.js +9 -3
  108. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  109. package/build-module/autocomplete/index.js +4 -2
  110. package/build-module/autocomplete/index.js.map +1 -1
  111. package/build-module/border-box-control/border-box-control/component.js +2 -1
  112. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  113. package/build-module/border-box-control/border-box-control-split-controls/component.js +2 -1
  114. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  115. package/build-module/border-control/border-control/component.js +38 -3
  116. package/build-module/border-control/border-control/component.js.map +1 -1
  117. package/build-module/box-control/utils.js +4 -4
  118. package/build-module/box-control/utils.js.map +1 -1
  119. package/build-module/color-indicator/index.js +29 -8
  120. package/build-module/color-indicator/index.js.map +1 -1
  121. package/build-module/color-indicator/types.js +2 -0
  122. package/build-module/color-indicator/types.js.map +1 -0
  123. package/build-module/color-palette/index.js +2 -1
  124. package/build-module/color-palette/index.js.map +1 -1
  125. package/build-module/color-picker/component.js +7 -8
  126. package/build-module/color-picker/component.js.map +1 -1
  127. package/build-module/color-picker/input-with-slider.js +1 -2
  128. package/build-module/color-picker/input-with-slider.js.map +1 -1
  129. package/build-module/color-picker/styles.js +28 -14
  130. package/build-module/color-picker/styles.js.map +1 -1
  131. package/build-module/custom-gradient-picker/index.js +8 -7
  132. package/build-module/custom-gradient-picker/index.js.map +1 -1
  133. package/build-module/custom-gradient-picker/index.native.js +8 -8
  134. package/build-module/custom-gradient-picker/index.native.js.map +1 -1
  135. package/build-module/custom-gradient-picker/serializer.js +4 -6
  136. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  137. package/build-module/date-time/date/index.js +3 -1
  138. package/build-module/date-time/date/index.js.map +1 -1
  139. package/build-module/date-time/date-time/index.js +3 -1
  140. package/build-module/date-time/date-time/index.js.map +1 -1
  141. package/build-module/duotone-picker/duotone-picker.js +42 -29
  142. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  143. package/build-module/elevation/hook.js +12 -12
  144. package/build-module/elevation/hook.js.map +1 -1
  145. package/build-module/focal-point-picker/index.native.js +1 -1
  146. package/build-module/focal-point-picker/index.native.js.map +1 -1
  147. package/build-module/form-toggle/index.js +30 -6
  148. package/build-module/form-toggle/index.js.map +1 -1
  149. package/build-module/form-toggle/types.js +2 -0
  150. package/build-module/form-toggle/types.js.map +1 -0
  151. package/build-module/h-stack/utils.js +3 -3
  152. package/build-module/h-stack/utils.js.map +1 -1
  153. package/build-module/heading/component.js +0 -1
  154. package/build-module/heading/component.js.map +1 -1
  155. package/build-module/heading/hook.js.map +1 -1
  156. package/build-module/heading/types.js +2 -0
  157. package/build-module/heading/types.js.map +1 -0
  158. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +0 -1
  159. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  160. package/build-module/mobile/link-picker/index.native.js +4 -3
  161. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  162. package/build-module/mobile/segmented-control/index.native.js +2 -3
  163. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  164. package/build-module/navigation/group/index.js +3 -6
  165. package/build-module/navigation/group/index.js.map +1 -1
  166. package/build-module/navigation/item/base.js +2 -2
  167. package/build-module/navigation/item/base.js.map +1 -1
  168. package/build-module/navigation/item/use-navigation-tree-item.js +2 -1
  169. package/build-module/navigation/item/use-navigation-tree-item.js.map +1 -1
  170. package/build-module/navigation/menu/menu-title-search.js +1 -6
  171. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  172. package/build-module/navigation/menu/search-no-results-found.js +1 -6
  173. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  174. package/build-module/navigation/use-navigation-tree-nodes.js +18 -9
  175. package/build-module/navigation/use-navigation-tree-nodes.js.map +1 -1
  176. package/build-module/navigation/utils.js +2 -2
  177. package/build-module/navigation/utils.js.map +1 -1
  178. package/build-module/range-control/index.js +1 -1
  179. package/build-module/range-control/index.js.map +1 -1
  180. package/build-module/range-control/utils.js +1 -5
  181. package/build-module/range-control/utils.js.map +1 -1
  182. package/build-module/spacer/component.js +3 -4
  183. package/build-module/spacer/component.js.map +1 -1
  184. package/build-module/spinner/index.js +22 -13
  185. package/build-module/spinner/index.js.map +1 -1
  186. package/build-module/spinner/styles.js +10 -10
  187. package/build-module/spinner/styles.js.map +1 -1
  188. package/build-module/truncate/component.js +7 -8
  189. package/build-module/truncate/component.js.map +1 -1
  190. package/build-module/truncate/hook.js +3 -10
  191. package/build-module/truncate/hook.js.map +1 -1
  192. package/build-module/truncate/index.js.map +1 -1
  193. package/build-module/truncate/styles.js +1 -1
  194. package/build-module/truncate/styles.js.map +1 -1
  195. package/build-module/truncate/utils.js +3 -16
  196. package/build-module/truncate/utils.js.map +1 -1
  197. package/build-module/utils/math.js +15 -6
  198. package/build-module/utils/math.js.map +1 -1
  199. package/build-module/v-stack/component.js +9 -9
  200. package/build-module/v-stack/component.js.map +1 -1
  201. package/build-module/v-stack/hook.js +0 -5
  202. package/build-module/v-stack/hook.js.map +1 -1
  203. package/build-module/v-stack/index.js.map +1 -1
  204. package/build-style/style-rtl.css +16 -0
  205. package/build-style/style.css +16 -0
  206. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  207. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  208. package/build-types/border-control/border-control/component.d.ts +36 -2
  209. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  210. package/build-types/border-control/stories/index.d.ts +33 -0
  211. package/build-types/border-control/stories/index.d.ts.map +1 -0
  212. package/build-types/color-indicator/index.d.ts +16 -5
  213. package/build-types/color-indicator/index.d.ts.map +1 -1
  214. package/build-types/color-indicator/stories/index.d.ts +12 -0
  215. package/build-types/color-indicator/stories/index.d.ts.map +1 -0
  216. package/build-types/color-indicator/test/index.d.ts +2 -0
  217. package/build-types/color-indicator/test/index.d.ts.map +1 -0
  218. package/build-types/color-indicator/types.d.ts +12 -0
  219. package/build-types/color-indicator/types.d.ts.map +1 -0
  220. package/build-types/color-palette/index.d.ts.map +1 -1
  221. package/build-types/color-palette/styles.d.ts +4 -2
  222. package/build-types/color-palette/styles.d.ts.map +1 -1
  223. package/build-types/color-picker/component.d.ts.map +1 -1
  224. package/build-types/color-picker/styles.d.ts +17 -0
  225. package/build-types/color-picker/styles.d.ts.map +1 -1
  226. package/build-types/date-time/date/index.d.ts +1 -1
  227. package/build-types/date-time/date/index.d.ts.map +1 -1
  228. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  229. package/build-types/date-time/types.d.ts +6 -0
  230. package/build-types/date-time/types.d.ts.map +1 -1
  231. package/build-types/form-toggle/index.d.ts +29 -0
  232. package/build-types/form-toggle/index.d.ts.map +1 -0
  233. package/build-types/form-toggle/stories/index.d.ts +12 -0
  234. package/build-types/form-toggle/stories/index.d.ts.map +1 -0
  235. package/build-types/form-toggle/test/index.d.ts +2 -0
  236. package/build-types/form-toggle/test/index.d.ts.map +1 -0
  237. package/build-types/form-toggle/types.d.ts +22 -0
  238. package/build-types/form-toggle/types.d.ts.map +1 -0
  239. package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts +3 -0
  240. package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts.map +1 -1
  241. package/build-types/heading/component.d.ts +1 -2
  242. package/build-types/heading/component.d.ts.map +1 -1
  243. package/build-types/heading/hook.d.ts +1 -28
  244. package/build-types/heading/hook.d.ts.map +1 -1
  245. package/build-types/heading/stories/index.d.ts.map +1 -1
  246. package/build-types/heading/test/index.d.ts +2 -0
  247. package/build-types/heading/test/index.d.ts.map +1 -0
  248. package/build-types/heading/types.d.ts +16 -0
  249. package/build-types/heading/types.d.ts.map +1 -0
  250. package/build-types/range-control/utils.d.ts.map +1 -1
  251. package/build-types/spacer/component.d.ts +2 -3
  252. package/build-types/spacer/component.d.ts.map +1 -1
  253. package/build-types/spacer/stories/index.d.ts +12 -0
  254. package/build-types/spacer/stories/index.d.ts.map +1 -0
  255. package/build-types/spinner/index.d.ts +16 -15
  256. package/build-types/spinner/index.d.ts.map +1 -1
  257. package/build-types/spinner/stories/index.d.ts +13 -0
  258. package/build-types/spinner/stories/index.d.ts.map +1 -0
  259. package/build-types/spinner/styles.d.ts +4 -3
  260. package/build-types/spinner/styles.d.ts.map +1 -1
  261. package/build-types/text/types.d.ts +1 -1
  262. package/build-types/text/types.d.ts.map +1 -1
  263. package/build-types/truncate/component.d.ts +3 -3
  264. package/build-types/truncate/component.d.ts.map +1 -1
  265. package/build-types/truncate/hook.d.ts +5 -2
  266. package/build-types/truncate/hook.d.ts.map +1 -1
  267. package/build-types/truncate/index.d.ts +2 -2
  268. package/build-types/truncate/index.d.ts.map +1 -1
  269. package/build-types/truncate/stories/index.d.ts +13 -0
  270. package/build-types/truncate/stories/index.d.ts.map +1 -0
  271. package/build-types/truncate/styles.d.ts +1 -1
  272. package/build-types/truncate/styles.d.ts.map +1 -1
  273. package/build-types/truncate/test/index.d.ts +2 -0
  274. package/build-types/truncate/test/index.d.ts.map +1 -0
  275. package/build-types/truncate/types.d.ts +22 -11
  276. package/build-types/truncate/types.d.ts.map +1 -1
  277. package/build-types/truncate/utils.d.ts +17 -28
  278. package/build-types/truncate/utils.d.ts.map +1 -1
  279. package/build-types/ui/form-group/use-form-group.d.ts +2 -2
  280. package/build-types/utils/math.d.ts +10 -0
  281. package/build-types/utils/math.d.ts.map +1 -1
  282. package/build-types/v-stack/component.d.ts +5 -4
  283. package/build-types/v-stack/component.d.ts.map +1 -1
  284. package/build-types/v-stack/hook.d.ts +5 -3
  285. package/build-types/v-stack/hook.d.ts.map +1 -1
  286. package/build-types/v-stack/index.d.ts +2 -2
  287. package/build-types/v-stack/index.d.ts.map +1 -1
  288. package/build-types/v-stack/stories/index.d.ts +9 -0
  289. package/build-types/v-stack/stories/index.d.ts.map +1 -0
  290. package/build-types/v-stack/test/index.d.ts +2 -0
  291. package/build-types/v-stack/test/index.d.ts.map +1 -0
  292. package/build-types/v-stack/types.d.ts +21 -1
  293. package/build-types/v-stack/types.d.ts.map +1 -1
  294. package/package.json +18 -17
  295. package/src/alignment-matrix-control/utils.js +1 -6
  296. package/src/autocomplete/autocompleter-ui.js +4 -1
  297. package/src/autocomplete/autocompleter-ui.native.js +8 -2
  298. package/src/autocomplete/index.js +4 -8
  299. package/src/border-box-control/border-box-control/component.tsx +1 -0
  300. package/src/border-box-control/border-box-control-split-controls/component.tsx +1 -0
  301. package/src/border-control/border-control/component.tsx +41 -4
  302. package/src/border-control/stories/index.tsx +150 -0
  303. package/src/box-control/utils.js +4 -4
  304. package/src/color-indicator/README.md +7 -9
  305. package/src/color-indicator/index.tsx +47 -0
  306. package/src/color-indicator/stories/index.tsx +37 -0
  307. package/src/color-indicator/test/__snapshots__/index.tsx.snap +11 -0
  308. package/src/color-indicator/test/{index.js → index.tsx} +4 -4
  309. package/src/color-indicator/types.ts +12 -0
  310. package/src/color-palette/index.js +5 -1
  311. package/src/color-picker/component.tsx +12 -11
  312. package/src/color-picker/input-with-slider.tsx +2 -2
  313. package/src/color-picker/styles.ts +20 -1
  314. package/src/custom-gradient-picker/index.js +4 -11
  315. package/src/custom-gradient-picker/index.native.js +3 -11
  316. package/src/custom-gradient-picker/serializer.js +5 -11
  317. package/src/date-time/README.md +7 -0
  318. package/src/date-time/date/index.tsx +2 -0
  319. package/src/date-time/date-time/index.tsx +2 -0
  320. package/src/date-time/types.ts +7 -0
  321. package/src/dimension-control/README.md +5 -2
  322. package/src/dimension-control/test/index.test.js +7 -7
  323. package/src/duotone-picker/duotone-picker.js +58 -37
  324. package/src/duotone-picker/style.scss +19 -0
  325. package/src/elevation/hook.js +8 -8
  326. package/src/flex/flex/README.md +5 -10
  327. package/src/flex/flex-item/README.md +1 -1
  328. package/src/focal-point-picker/index.native.js +1 -1
  329. package/src/form-toggle/README.md +10 -11
  330. package/src/form-toggle/index.tsx +71 -0
  331. package/src/form-toggle/stories/index.tsx +52 -0
  332. package/src/form-toggle/test/__snapshots__/index.tsx.snap +54 -0
  333. package/src/form-toggle/test/index.tsx +102 -0
  334. package/src/form-toggle/types.ts +22 -0
  335. package/src/form-token-field/test/index.js +6 -9
  336. package/src/form-token-field/test/lib/token-field-wrapper.tsx +2 -2
  337. package/src/h-stack/utils.js +3 -3
  338. package/src/heading/README.md +4 -3
  339. package/src/heading/component.tsx +2 -2
  340. package/src/heading/hook.ts +1 -42
  341. package/src/heading/stories/index.tsx +5 -1
  342. package/src/heading/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
  343. package/src/heading/test/index.tsx +68 -0
  344. package/src/heading/types.ts +29 -0
  345. package/src/input-control/test/index.js +106 -31
  346. package/src/mobile/bottom-sheet/keyboard-avoiding-view.native.js +2 -7
  347. package/src/mobile/link-picker/index.native.js +2 -3
  348. package/src/mobile/segmented-control/index.native.js +6 -5
  349. package/src/navigation/group/index.js +8 -3
  350. package/src/navigation/item/base.js +3 -2
  351. package/src/navigation/item/use-navigation-tree-item.js +2 -0
  352. package/src/navigation/menu/menu-title-search.js +3 -6
  353. package/src/navigation/menu/search-no-results-found.js +3 -6
  354. package/src/navigation/use-navigation-tree-nodes.js +11 -10
  355. package/src/navigation/utils.js +2 -2
  356. package/src/number-control/stories/index.js +24 -24
  357. package/src/range-control/index.js +1 -1
  358. package/src/range-control/utils.js +1 -4
  359. package/src/slot-fill/test/slot.js +2 -3
  360. package/src/spacer/component.tsx +3 -4
  361. package/src/spacer/stories/index.tsx +70 -0
  362. package/src/spinner/{index.js → index.tsx} +23 -9
  363. package/src/spinner/stories/index.tsx +32 -0
  364. package/src/spinner/{styles.js → styles.ts} +0 -0
  365. package/src/style.scss +1 -0
  366. package/src/text/types.ts +1 -1
  367. package/src/truncate/README.md +16 -12
  368. package/src/truncate/{component.js → component.tsx} +13 -9
  369. package/src/truncate/{hook.js → hook.ts} +8 -10
  370. package/src/truncate/{index.js → index.ts} +0 -0
  371. package/src/truncate/stories/index.tsx +49 -0
  372. package/src/truncate/{styles.js → styles.ts} +0 -0
  373. package/src/truncate/test/{index.js → index.tsx} +4 -4
  374. package/src/truncate/types.ts +28 -10
  375. package/src/truncate/{utils.js → utils.ts} +19 -19
  376. package/src/utils/math.js +14 -5
  377. package/src/utils/test/math.js +22 -1
  378. package/src/v-stack/README.md +6 -18
  379. package/src/v-stack/{component.js → component.tsx} +15 -10
  380. package/src/v-stack/{hook.js → hook.ts} +5 -6
  381. package/src/v-stack/{index.js → index.ts} +0 -0
  382. package/src/v-stack/stories/index.tsx +41 -0
  383. package/src/v-stack/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
  384. package/src/v-stack/test/{index.js → index.tsx} +0 -0
  385. package/src/v-stack/types.ts +21 -1
  386. package/tsconfig.json +1 -0
  387. package/tsconfig.tsbuildinfo +1 -1
  388. package/src/border-control/stories/index.js +0 -119
  389. package/src/color-indicator/index.js +0 -16
  390. package/src/color-indicator/stories/index.js +0 -22
  391. package/src/color-indicator/test/__snapshots__/index.js.snap +0 -13
  392. package/src/form-toggle/index.js +0 -38
  393. package/src/form-toggle/stories/index.js +0 -28
  394. package/src/form-toggle/test/index.js +0 -74
  395. package/src/heading/test/index.js +0 -67
  396. package/src/spacer/stories/index.js +0 -59
  397. package/src/spinner/stories/index.js +0 -43
  398. package/src/truncate/stories/index.js +0 -38
@@ -1,19 +1,20 @@
1
+ import type { ForwardedRef } from 'react';
2
+ import type { WordPressComponentProps } from '../ui/context';
3
+ export declare function UnforwardedSpinner({ className, ...props }: WordPressComponentProps<{}, 'svg', false>, forwardedRef: ForwardedRef<any>): JSX.Element;
1
4
  /**
2
- * @typedef OwnProps
5
+ * `Spinner` is a component used to notify users that their action is being processed.
3
6
  *
4
- * @property {string} [className] Class name
5
- */
6
- /** @typedef {import('react').ComponentPropsWithoutRef<'svg'> & OwnProps} Props */
7
- /**
8
- * @param {Props} props
9
- * @return {JSX.Element} Element
7
+ * @example
8
+ * ```js
9
+ * import { Spinner } from '@wordpress/components';
10
+ *
11
+ * function Example() {
12
+ * return <Spinner />;
13
+ * }
14
+ * ```
10
15
  */
11
- export default function Spinner({ className, ...props }: Props): JSX.Element;
12
- export type OwnProps = {
13
- /**
14
- * Class name
15
- */
16
- className?: string | undefined;
17
- };
18
- export type Props = import('react').ComponentPropsWithoutRef<'svg'> & OwnProps;
16
+ export declare const Spinner: import("react").ForwardRefExoticComponent<Pick<Omit<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "type" | "origin" | "children" | "style" | "clipPath" | "filter" | "mask" | "path" | "className" | "color" | "height" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "target" | "width" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "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" | "onChange" | "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" | "key"> & {
17
+ ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
18
+ }, "children" | "as">, "string" | "type" | "origin" | "style" | "clipPath" | "filter" | "mask" | "path" | "className" | "color" | "height" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "target" | "width" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "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" | "onChange" | "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" | "key"> & import("react").RefAttributes<any>>;
19
+ export default Spinner;
19
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spinner/index.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,kFAAkF;AAElF;;;GAGG;AACH,yDAHW,KAAK,GACJ,WAAW,CA2BtB;;;;;;;oBA/Ba,OAAO,OAAO,EAAE,wBAAwB,CAAC,KAAK,CAAC,GAAG,QAAQ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spinner/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAM1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAO7D,wBAAgB,kBAAkB,CACjC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,CAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAE,EACpE,YAAY,EAAE,YAAY,CAAE,GAAG,CAAE,eA2BjC;AACD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO;;ihPAAmC,CAAC;AACxD,eAAe,OAAO,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentStory, ComponentMeta } from '@storybook/react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import Spinner from '../';
9
+ declare const meta: ComponentMeta<typeof Spinner>;
10
+ export default meta;
11
+ export declare const Default: ComponentStory<typeof Spinner>;
12
+ export declare const CustomSize: ComponentStory<typeof Spinner>;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/spinner/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,OAAO,MAAM,KAAK,CAAC;AAG1B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,OAAO,CASxC,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,OAAO,CAAwB,CAAC;AAG7E,eAAO,MAAM,UAAU,EAAE,cAAc,CAAE,OAAO,OAAO,CAAwB,CAAC"}
@@ -1,12 +1,13 @@
1
- export const StyledSpinner: import("@emotion/styled").StyledComponent<{
1
+ /// <reference types="react" />
2
+ export declare const StyledSpinner: import("@emotion/styled").StyledComponent<{
2
3
  theme?: import("@emotion/react").Theme | undefined;
3
4
  as?: import("react").ElementType<any> | undefined;
4
5
  }, import("react").SVGProps<SVGSVGElement>, {}>;
5
- export const SpinnerTrack: import("@emotion/styled").StyledComponent<{
6
+ export declare const SpinnerTrack: import("@emotion/styled").StyledComponent<{
6
7
  theme?: import("@emotion/react").Theme | undefined;
7
8
  as?: import("react").ElementType<any> | undefined;
8
9
  }, import("react").SVGProps<SVGCircleElement>, {}>;
9
- export const SpinnerIndicator: import("@emotion/styled").StyledComponent<{
10
+ export declare const SpinnerIndicator: import("@emotion/styled").StyledComponent<{
10
11
  theme?: import("@emotion/react").Theme | undefined;
11
12
  as?: import("react").ElementType<any> | undefined;
12
13
  }, import("react").SVGProps<SVGPathElement>, {}>;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/spinner/styles.js"],"names":[],"mappings":"AAoBA;;;gDAQE;AAOF;;;mDAGE;AAEF;;;iDAME"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/spinner/styles.ts"],"names":[],"mappings":";AAoBA,eAAO,MAAM,aAAa;;;+CAQzB,CAAC;AAOF,eAAO,MAAM,YAAY;;;kDAGxB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;gDAM5B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import type { Props as TruncateProps } from '../truncate/types';
4
+ import type { TruncateProps } from '../truncate/types';
5
5
  /**
6
6
  * External dependencies
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/text/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,oBAAY,QAAQ,GACjB,MAAM,GACN,SAAS,GACT,UAAU,GACV,YAAY,GACZ,aAAa,GACb,OAAO,CAAC;AAEX,aAAK,WAAW,GAAG,OAAO,CAAC;AAE3B,aAAK,UAAU,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEtE,MAAM,WAAW,KAAM,SAAQ,aAAa;IAC3C;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAE,WAAW,CAAE,CAAC;IACrC;;OAEG;IACH,gCAAgC,CAAC,EAC9B,OAAO,GACP,OAAO,GACP,QAAQ,GACR,OAAO,GACP,QAAQ,CAAC;IACZ;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAE,SAAS,CAAE,CAAC;IACrC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAE,UAAU,CAAE,CAAC;IAC7E;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,CAAE,YAAY,CAAE,CAAC;IAC3C;;OAEG;IACH,sBAAsB,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;IAClD;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAE,UAAU,CAAE,GAAG,QAAQ,CAAC;IAC9C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,aAAa,CAAE,YAAY,CAAE,GAAG,UAAU,CAAC;IACpD;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAE,eAAe,CAAE,CAAC;IACjD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/text/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,oBAAY,QAAQ,GACjB,MAAM,GACN,SAAS,GACT,UAAU,GACV,YAAY,GACZ,aAAa,GACb,OAAO,CAAC;AAEX,aAAK,WAAW,GAAG,OAAO,CAAC;AAE3B,aAAK,UAAU,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEtE,MAAM,WAAW,KAAM,SAAQ,aAAa;IAC3C;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAE,WAAW,CAAE,CAAC;IACrC;;OAEG;IACH,gCAAgC,CAAC,EAC9B,OAAO,GACP,OAAO,GACP,QAAQ,GACR,OAAO,GACP,QAAQ,CAAC;IACZ;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAE,SAAS,CAAE,CAAC;IACrC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAE,UAAU,CAAE,CAAC;IAC7E;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,CAAE,YAAY,CAAE,CAAC;IAC3C;;OAEG;IACH,sBAAsB,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;IAClD;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAE,UAAU,CAAE,GAAG,QAAQ,CAAC;IAC9C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,aAAa,CAAE,YAAY,CAAE,GAAG,UAAU,CAAC;IACpD;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAE,eAAe,CAAE,CAAC;IACjD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B"}
@@ -1,11 +1,10 @@
1
- export default ConnectedTruncate;
1
+ import type { TruncateProps } from './types';
2
2
  /**
3
3
  * `Truncate` is a typography primitive that trims text content.
4
4
  * For almost all cases, it is recommended that `Text`, `Heading`, or
5
5
  * `Subheading` is used to render text content. However,`Truncate` is
6
6
  * available for custom implementations.
7
7
  *
8
- * @example
9
8
  * ```jsx
10
9
  * import { __experimentalTruncate as Truncate } from `@wordpress/components`;
11
10
  *
@@ -20,5 +19,6 @@ export default ConnectedTruncate;
20
19
  * }
21
20
  * ```
22
21
  */
23
- declare const ConnectedTruncate: import("../ui/context").WordPressComponent<"span", import("./types").Props, true>;
22
+ export declare const Truncate: import("../ui/context").WordPressComponent<"span", TruncateProps, true>;
23
+ export default Truncate;
24
24
  //# sourceMappingURL=component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/truncate/component.js"],"names":[],"mappings":";AAiBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,mHAAiE"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/truncate/component.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAW7C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,QAAQ,yEAAoD,CAAC;AAE1E,eAAe,QAAQ,CAAC"}
@@ -1,7 +1,10 @@
1
+ /// <reference types="react" />
1
2
  /**
2
- * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'span'>} props
3
+ * Internal dependencies
3
4
  */
4
- export default function useTruncate(props: import('../ui/context').WordPressComponentProps<import('./types').Props, 'span'>): {
5
+ import { WordPressComponentProps } from '../ui/context';
6
+ import type { TruncateProps } from './types';
7
+ export default function useTruncate(props: WordPressComponentProps<TruncateProps, 'span'>): {
5
8
  className: string;
6
9
  children: string;
7
10
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/truncate/hook.js"],"names":[],"mappings":"AAkBA;;GAEG;AACH,2CAFW,OAAO,eAAe,EAAE,uBAAuB,CAAC,OAAO,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6C1F"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/truncate/hook.ts"],"names":[],"mappings":";AAUA;;GAEG;AACH,OAAO,EAAoB,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAI1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,CAAC,OAAO,UAAU,WAAW,CAClC,KAAK,EAAE,uBAAuB,CAAE,aAAa,EAAE,MAAM,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CvD"}
@@ -1,3 +1,3 @@
1
- export { default as Truncate } from "./component";
2
- export { default as useTruncate } from "./hook";
1
+ export { default as Truncate } from './component';
2
+ export { default as useTruncate } from './hook';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/truncate/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/truncate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import { Truncate } from '..';
9
+ declare const meta: ComponentMeta<typeof Truncate>;
10
+ export default meta;
11
+ export declare const Default: ComponentStory<typeof Truncate>;
12
+ export declare const CharacterCount: ComponentStory<typeof Truncate>;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/truncate/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE9B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,QAAQ,CAazC,CAAC;AACF,eAAe,IAAI,CAAC;AASpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,QAAQ,CAAwB,CAAC;AAM9E,eAAO,MAAM,cAAc,EAAE,cAAc,CAAE,OAAO,QAAQ,CAE3D,CAAC"}
@@ -1,2 +1,2 @@
1
- export const Truncate: import("@emotion/utils").SerializedStyles;
1
+ export declare const Truncate: import("@emotion/utils").SerializedStyles;
2
2
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/truncate/styles.js"],"names":[],"mappings":"AAKA,iEAKE"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/truncate/styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,2CAKpB,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/truncate/test/index.tsx"],"names":[],"mappings":""}
@@ -1,14 +1,19 @@
1
- /// <reference types="react" />
2
- export declare type TruncateEllisizeMode = 'auto' | 'head' | 'tail' | 'middle' | 'none';
3
- export interface Props {
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ReactNode } from 'react';
5
+ export declare type TruncateEllipsizeMode = 'auto' | 'head' | 'tail' | 'middle' | 'none';
6
+ export declare type TruncateProps = {
4
7
  /**
5
- * The ellipsis string when `truncate` is set.
8
+ * The ellipsis string when truncating the text by the `limit` prop's value.
6
9
  *
7
- * @default '...'
10
+ * @default ''
8
11
  */
9
12
  ellipsis?: string;
10
13
  /**
11
- * Determines where to truncate. For example, we can truncate text right in the middle. To do this, we need to set `ellipsizeMode` to `middle` and a text `limit`.
14
+ * Determines where to truncate. For example, we can truncate text right in
15
+ * the middle. To do this, we need to set `ellipsizeMode` to `middle` and a
16
+ * text `limit`.
12
17
  *
13
18
  * * `auto`: Trims content at the end automatically without a `limit`.
14
19
  * * `head`: Trims content at the beginning. Requires a `limit`.
@@ -17,20 +22,26 @@ export interface Props {
17
22
  *
18
23
  * @default 'auto'
19
24
  */
20
- ellipsizeMode?: TruncateEllisizeMode;
25
+ ellipsizeMode?: TruncateEllipsizeMode;
21
26
  /**
22
- * Determines the max characters when `truncate` is set.
27
+ * Determines the max number of characters to be displayed before the rest
28
+ * of the text gets truncated. Requires `ellipsizeMode` to assume values
29
+ * different from `auto` and `none`.
23
30
  *
24
31
  * @default 0
25
32
  */
26
33
  limit?: number;
27
34
  /**
28
- * Clamps the text content to the specified `numberOfLines`, adding the `ellipsis` at the end.
35
+ * Clamps the text content to the specified `numberOfLines`, adding an
36
+ * ellipsis at the end. Note: this feature ignores the value of the
37
+ * `ellipsis` prop and always displays the default `…` ellipsis.
38
+ *
39
+ * @default 0
29
40
  */
30
41
  numberOfLines?: number;
31
42
  /**
32
43
  * The children elements.
33
44
  */
34
- children: React.ReactNode;
35
- }
45
+ children: ReactNode;
46
+ };
36
47
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/truncate/types.ts"],"names":[],"mappings":";AAAA,oBAAY,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEhF,MAAM,WAAW,KAAK;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/truncate/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,oBAAY,qBAAqB,GAC9B,MAAM,GACN,MAAM,GACN,MAAM,GACN,QAAQ,GACR,MAAM,CAAC;AAEV,oBAAY,aAAa,GAAG;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACpB,CAAC"}
@@ -1,29 +1,18 @@
1
- /**
2
- * @param {string} word
3
- * @param {number} headLength
4
- * @param {number} tailLength
5
- * @param {string} ellipsis
6
- */
7
- export function truncateMiddle(word: string, headLength: number, tailLength: number, ellipsis: string): string;
8
- /**
9
- *
10
- * @param {string} words
11
- * @param {typeof TRUNCATE_DEFAULT_PROPS} props
12
- */
13
- export function truncateContent(words: string | undefined, props: typeof TRUNCATE_DEFAULT_PROPS): string;
14
- export const TRUNCATE_ELLIPSIS: "…";
15
- export namespace TRUNCATE_TYPE {
16
- const auto: string;
17
- const head: string;
18
- const middle: string;
19
- const tail: string;
20
- const none: string;
21
- }
22
- export namespace TRUNCATE_DEFAULT_PROPS {
23
- export { TRUNCATE_ELLIPSIS as ellipsis };
24
- import ellipsizeMode = TRUNCATE_TYPE.auto;
25
- export { ellipsizeMode };
26
- export const limit: number;
27
- export const numberOfLines: number;
28
- }
1
+ import type { TruncateProps } from './types';
2
+ export declare const TRUNCATE_ELLIPSIS = "\u2026";
3
+ export declare const TRUNCATE_TYPE: {
4
+ readonly auto: "auto";
5
+ readonly head: "head";
6
+ readonly middle: "middle";
7
+ readonly tail: "tail";
8
+ readonly none: "none";
9
+ };
10
+ export declare const TRUNCATE_DEFAULT_PROPS: {
11
+ ellipsis: string;
12
+ ellipsizeMode: "auto";
13
+ limit: number;
14
+ numberOfLines: number;
15
+ };
16
+ export declare function truncateMiddle(word: string, headLength: number, tailLength: number, ellipsis: string): string;
17
+ export declare function truncateContent(words: string | undefined, props: Omit<TruncateProps, 'children'>): string;
29
18
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/truncate/utils.js"],"names":[],"mappings":"AAuBA;;;;;GAKG;AACH,qCALW,MAAM,cACN,MAAM,cACN,MAAM,YACN,MAAM,UA8BhB;AAED;;;;GAIG;AACH,kEAFW,6BAA6B,UAiCvC;AA1FD,oCAAqC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/truncate/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,iBAAiB,WAAM,CAAC;AACrC,eAAO,MAAM,aAAa;;;;;;CAMhB,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;CAKlC,CAAC;AAIF,wBAAgB,cAAc,CAC7B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,UA+BhB;AAED,wBAAgB,eAAe,CAC9B,KAAK,oBAAa,EAClB,KAAK,EAAE,IAAI,CAAE,aAAa,EAAE,UAAU,CAAE,UAgCxC"}
@@ -32,7 +32,7 @@ export function useFormGroup(props: import('../context').WordPressComponentProps
32
32
  letterSpacing?: import("csstype").Property.LetterSpacing<string | number> | undefined;
33
33
  highlightWords?: string[] | undefined;
34
34
  ellipsis?: string | undefined;
35
- ellipsizeMode?: import("../../truncate/types").TruncateEllisizeMode | undefined;
35
+ ellipsizeMode?: import("../../truncate/types").TruncateEllipsizeMode | undefined;
36
36
  limit?: number | undefined;
37
37
  numberOfLines?: number | undefined;
38
38
  spacing?: import("csstype").Property.Width<string | number> | undefined;
@@ -332,7 +332,7 @@ export function useFormGroup(props: import('../context').WordPressComponentProps
332
332
  letterSpacing?: import("csstype").Property.LetterSpacing<string | number> | undefined;
333
333
  highlightWords?: string[] | undefined;
334
334
  ellipsis?: string | undefined;
335
- ellipsizeMode?: import("../../truncate/types").TruncateEllisizeMode | undefined;
335
+ ellipsizeMode?: import("../../truncate/types").TruncateEllipsizeMode | undefined;
336
336
  limit?: number | undefined;
337
337
  numberOfLines?: number | undefined;
338
338
  spacing?: import("csstype").Property.Width<string | number> | undefined;
@@ -22,6 +22,16 @@ export function add(...args: Array<number | string>): number;
22
22
  * @return {number} The difference of the values.
23
23
  */
24
24
  export function subtract(...args: Array<number | string>): number;
25
+ /**
26
+ * Clamps a value based on a min/max range.
27
+ *
28
+ * @param {number} value The value.
29
+ * @param {number} min The minimum range.
30
+ * @param {number} max The maximum range.
31
+ *
32
+ * @return {number} The clamped value.
33
+ */
34
+ export function clamp(value: number, min: number, max: number): number;
25
35
  /**
26
36
  * Clamps a value based on a min/max range with rounding
27
37
  *
@@ -1 +1 @@
1
- {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/utils/math.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,iCAJW,OAAO,GAEN,MAAM,CAMjB;AAED;;;;;;GAMG;AACH,6BAJW,MAAM,MAAM,GAAC,MAAM,CAAC,GAEnB,MAAM,CAQjB;AAED;;;;;;GAMG;AACH,kCAJW,MAAM,MAAM,GAAC,MAAM,CAAC,GAEnB,MAAM,CAWjB;AAcD;;;;;;;;;GASG;AACH,mCAPW,MAAM,QACN,MAAM,QACN,MAAM,SACN,MAAM,GAEL,MAAM,CAiBjB;AAED;;;;;;GAMG;AACH,6IAFY,MAAM,CAIjB"}
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/utils/math.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,iCAJW,OAAO,GAEN,MAAM,CAMjB;AAED;;;;;;GAMG;AACH,6BAJW,MAAM,MAAM,GAAC,MAAM,CAAC,GAEnB,MAAM,CAQjB;AAED;;;;;;GAMG;AACH,kCAJW,MAAM,MAAM,GAAC,MAAM,CAAC,GAEnB,MAAM,CAWjB;AAcD;;;;;;;;GAQG;AACH,6BANW,MAAM,OACN,MAAM,OACN,MAAM,GAEL,MAAM,CAKjB;AAED;;;;;;;;;GASG;AACH,mCAPW,MAAM,QACN,MAAM,QACN,MAAM,SACN,MAAM,GAEL,MAAM,CAiBjB;AAED;;;;;;GAMG;AACH,6IAFY,MAAM,CAIjB"}
@@ -1,10 +1,10 @@
1
- export default ConnectedVStack;
1
+ import type { VStackProps } from './types';
2
2
  /**
3
- * `VStack` (or Vertical Stack) is a layout component that arranges child elements in a vertical line.
3
+ * `VStack` (or Vertical Stack) is a layout component that arranges child
4
+ * elements in a vertical line.
4
5
  *
5
6
  * `VStack` can render anything inside.
6
7
  *
7
- * @example
8
8
  * ```jsx
9
9
  * import {
10
10
  * __experimentalText as Text,
@@ -22,5 +22,6 @@ export default ConnectedVStack;
22
22
  * }
23
23
  * ```
24
24
  */
25
- declare const ConnectedVStack: import("../ui/context").WordPressComponent<"div", import("./types").Props, true>;
25
+ export declare const VStack: import("../ui/context").WordPressComponent<"div", VStackProps, true>;
26
+ export default VStack;
26
27
  //# sourceMappingURL=component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/v-stack/component.js"],"names":[],"mappings":";AAiBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,gHAA2D"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/v-stack/component.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAW3C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,MAAM,sEAAgD,CAAC;AAEpE,eAAe,MAAM,CAAC"}
@@ -1,8 +1,10 @@
1
+ /// <reference types="react" />
1
2
  /**
2
- *
3
- * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'div'>} props
3
+ * Internal dependencies
4
4
  */
5
- export function useVStack(props: import('../ui/context').WordPressComponentProps<import('./types').Props, 'div'>): {
5
+ import { WordPressComponentProps } from '../ui/context';
6
+ import type { VStackProps } from './types';
7
+ export declare function useVStack(props: WordPressComponentProps<VStackProps, 'div'>): {
6
8
  className: string;
7
9
  isColumn: boolean;
8
10
  children: import("react").ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/v-stack/hook.js"],"names":[],"mappings":"AAMA;;;GAGG;AACH,iCAFW,OAAO,eAAe,EAAE,uBAAuB,CAAC,OAAO,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAezF"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/v-stack/hook.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAoB,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,SAAS,CACxB,KAAK,EAAE,uBAAuB,CAAE,WAAW,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcpD"}
@@ -1,3 +1,3 @@
1
- export { default as VStack } from "./component";
2
- export { useVStack } from "./hook";
1
+ export { default as VStack } from './component';
2
+ export { useVStack } from './hook';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v-stack/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v-stack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+ import { VStack } from '..';
6
+ declare const meta: ComponentMeta<typeof VStack>;
7
+ export default meta;
8
+ export declare const Default: ComponentStory<import("../../ui/context").WordPressComponent<"div", import("../types").VStackProps, true>>;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v-stack/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMtE,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAE5B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,MAAM,CAcvC,CAAC;AACF,eAAe,IAAI,CAAC;AAcpB,eAAO,MAAM,OAAO,4GAAsB,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/v-stack/test/index.tsx"],"names":[],"mappings":""}
@@ -6,8 +6,28 @@ import type { CSSProperties } from 'react';
6
6
  * Internal dependencies
7
7
  */
8
8
  import type { HStackAlignment, Props as HStackProps } from '../h-stack/types';
9
- export declare type Props = HStackProps & {
9
+ export declare type VStackProps = HStackProps & {
10
+ /**
11
+ * Determines how the child elements are aligned.
12
+ *
13
+ * - `top`: Aligns content to the top.
14
+ * - `topLeft`: Aligns content to the top/left.
15
+ * - `topRight`: Aligns content to the top/right.
16
+ * - `left`: Aligns content to the left.
17
+ * - `center`: Aligns content to the center.
18
+ * - `right`: Aligns content to the right.
19
+ * - `bottom`: Aligns content to the bottom.
20
+ * - `bottomLeft`: Aligns content to the bottom/left.
21
+ * - `bottomRight`: Aligns content to the bottom/right.
22
+ * - `edge`: Aligns content to the edges of the container.
23
+ * - `stretch`: Stretches content to the edges of the container.
24
+ */
10
25
  alignment?: HStackAlignment | CSSProperties['alignItems'];
26
+ /**
27
+ * The amount of space between each child element. Spacing in between each
28
+ * child can be adjusted by using `spacing`. The value of `spacing` works as
29
+ * a multiplier to the library's grid system (base of `4px`).
30
+ */
11
31
  spacing?: CSSProperties['width'];
12
32
  };
13
33
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/v-stack/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE9E,oBAAY,KAAK,GAAG,WAAW,GAAG;IACjC,SAAS,CAAC,EAAE,eAAe,GAAG,aAAa,CAAE,YAAY,CAAE,CAAC;IAC5D,OAAO,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;CACnC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/v-stack/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE9E,oBAAY,WAAW,GAAG,WAAW,GAAG;IACvC;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,EAAE,eAAe,GAAG,aAAa,CAAE,YAAY,CAAE,CAAC;IAC5D;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;CACnC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "19.13.0",
3
+ "version": "19.14.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -38,21 +38,21 @@
38
38
  "@emotion/utils": "1.0.0",
39
39
  "@floating-ui/react-dom": "0.6.3",
40
40
  "@use-gesture/react": "^10.2.6",
41
- "@wordpress/a11y": "^3.11.0",
42
- "@wordpress/compose": "^5.9.0",
43
- "@wordpress/date": "^4.11.0",
44
- "@wordpress/deprecated": "^3.11.0",
45
- "@wordpress/dom": "^3.11.0",
46
- "@wordpress/element": "^4.9.0",
47
- "@wordpress/escape-html": "^2.11.0",
48
- "@wordpress/hooks": "^3.11.0",
49
- "@wordpress/i18n": "^4.11.0",
50
- "@wordpress/icons": "^9.2.0",
51
- "@wordpress/is-shallow-equal": "^4.11.0",
52
- "@wordpress/keycodes": "^3.11.0",
53
- "@wordpress/primitives": "^3.9.0",
54
- "@wordpress/rich-text": "^5.9.0",
55
- "@wordpress/warning": "^2.11.0",
41
+ "@wordpress/a11y": "^3.12.0",
42
+ "@wordpress/compose": "^5.10.0",
43
+ "@wordpress/date": "^4.12.0",
44
+ "@wordpress/deprecated": "^3.12.0",
45
+ "@wordpress/dom": "^3.12.0",
46
+ "@wordpress/element": "^4.10.0",
47
+ "@wordpress/escape-html": "^2.12.0",
48
+ "@wordpress/hooks": "^3.12.0",
49
+ "@wordpress/i18n": "^4.12.0",
50
+ "@wordpress/icons": "^9.3.0",
51
+ "@wordpress/is-shallow-equal": "^4.12.0",
52
+ "@wordpress/keycodes": "^3.12.0",
53
+ "@wordpress/primitives": "^3.10.0",
54
+ "@wordpress/rich-text": "^5.10.0",
55
+ "@wordpress/warning": "^2.12.0",
56
56
  "classnames": "^2.3.1",
57
57
  "colord": "^2.7.0",
58
58
  "dom-scroll-into-view": "^1.2.1",
@@ -67,6 +67,7 @@
67
67
  "react-colorful": "^5.3.1",
68
68
  "react-dates": "^21.8.0",
69
69
  "reakit": "^1.3.8",
70
+ "remove-accents": "^0.4.2",
70
71
  "uuid": "^8.3.0"
71
72
  },
72
73
  "peerDependencies": {
@@ -76,5 +77,5 @@
76
77
  "publishConfig": {
77
78
  "access": "public"
78
79
  },
79
- "gitHead": "48d5f37dfb52d2e77c8eeb662f9874cf141b8c6b"
80
+ "gitHead": "a80eeb62ec7cb1418b9915c277e084a29d6665e3"
80
81
  }