@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,7 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { get, omit } from 'lodash';
5
1
  /**
6
2
  * WordPress dependencies
7
3
  */
@@ -37,7 +33,7 @@ function CustomGradientPicker( { setColor, currentValue, isGradientColor } ) {
37
33
  }
38
34
 
39
35
  function getGradientColor( type ) {
40
- const orientation = get( gradientAST, [ 'orientation' ] );
36
+ const { orientation, ...restGradientAST } = gradientAST;
41
37
 
42
38
  if ( orientation ) {
43
39
  setGradientOrientation( orientation );
@@ -55,7 +51,7 @@ function CustomGradientPicker( { setColor, currentValue, isGradientColor } ) {
55
51
  type,
56
52
  }
57
53
  : {
58
- ...omit( gradientAST, [ 'orientation' ] ),
54
+ ...restGradientAST,
59
55
  type,
60
56
  }
61
57
  );
@@ -83,11 +79,7 @@ function CustomGradientPicker( { setColor, currentValue, isGradientColor } ) {
83
79
  }
84
80
 
85
81
  function getGradientAngle() {
86
- return get(
87
- gradientAST,
88
- [ 'orientation', 'value' ],
89
- DEFAULT_LINEAR_GRADIENT_ANGLE
90
- );
82
+ return gradientAST?.orientation?.value ?? DEFAULT_LINEAR_GRADIENT_ANGLE;
91
83
  }
92
84
  return (
93
85
  <>
@@ -1,8 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { compact, get } from 'lodash';
5
-
6
1
  export function serializeGradientColor( { type, value } ) {
7
2
  if ( type === 'literal' ) {
8
3
  return value;
@@ -40,13 +35,12 @@ export function serializeGradient( { type, orientation, colorStops } ) {
40
35
  const serializedColorStops = colorStops
41
36
  .sort( ( colorStop1, colorStop2 ) => {
42
37
  return (
43
- get( colorStop1, [ 'length', 'value' ], 0 ) -
44
- get( colorStop2, [ 'length', 'value' ], 0 )
38
+ ( colorStop1?.length?.value ?? 0 ) -
39
+ ( colorStop2?.length?.value ?? 0 )
45
40
  );
46
41
  } )
47
42
  .map( serializeGradientColorStop );
48
- return `${ type }(${ compact( [
49
- serializedOrientation,
50
- ...serializedColorStops,
51
- ] ).join( ',' ) })`;
43
+ return `${ type }(${ [ serializedOrientation, ...serializedColorStops ]
44
+ .filter( Boolean )
45
+ .join( ',' ) })`;
52
46
  }
@@ -77,6 +77,13 @@ List of events to show in the date picker. Each event will appear as a dot on th
77
77
  - Type: `Array`
78
78
  - Required: No
79
79
 
80
+ ### `startOfWeek`: `number`
81
+
82
+ The day that the week should start on. 0 for Sunday, 1 for Monday, etc.
83
+
84
+ - Required: No
85
+ - Default: 0
86
+
80
87
  ### `__nextRemoveHelpButton`: `boolean`
81
88
 
82
89
  Start opting in to not displaying a Help button which will become the default in a future version.
@@ -103,6 +103,7 @@ export function DatePicker( {
103
103
  events,
104
104
  isInvalidDate,
105
105
  onMonthPreviewed,
106
+ startOfWeek = 0,
106
107
  }: DatePickerProps ) {
107
108
  const nodeRef = useRef< HTMLDivElement >( null );
108
109
 
@@ -197,6 +198,7 @@ export function DatePicker( {
197
198
  isOutsideRange={ ( date ) => {
198
199
  return !! isInvalidDate && isInvalidDate( date.toDate() );
199
200
  } }
201
+ firstDayOfWeek={ startOfWeek }
200
202
  onPrevMonthClick={ onMonthPreviewedHandler }
201
203
  onNextMonthClick={ onMonthPreviewedHandler }
202
204
  renderDayContents={ ( day ) => (
@@ -34,6 +34,7 @@ function UnforwardedDateTimePicker(
34
34
  onMonthPreviewed = noop,
35
35
  onChange,
36
36
  events,
37
+ startOfWeek,
37
38
  __nextRemoveHelpButton = false,
38
39
  __nextRemoveResetButton = false,
39
40
  }: DateTimePickerProps,
@@ -76,6 +77,7 @@ function UnforwardedDateTimePicker(
76
77
  isInvalidDate={ isInvalidDate }
77
78
  events={ events }
78
79
  onMonthPreviewed={ onMonthPreviewed }
80
+ startOfWeek={ startOfWeek }
79
81
  />
80
82
  </>
81
83
  ) }
@@ -76,6 +76,13 @@ export type DatePickerProps = {
76
76
  * dot on the day of the event.
77
77
  */
78
78
  events?: DatePickerEvent[];
79
+
80
+ /**
81
+ * The day that the week should start on. 0 for Sunday, 1 for Monday, etc.
82
+ *
83
+ * @default 0
84
+ */
85
+ startOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
79
86
  };
80
87
 
81
88
  export type DateTimePickerProps = Omit< DatePickerProps, 'onChange' > &
@@ -11,12 +11,15 @@ This feature is still experimental. “Experimental” means this is an early im
11
11
  In a block's `edit` implementation, render a `<DimensionControl />` component.
12
12
 
13
13
  ```jsx
14
- import { partialRight } from 'lodash';
15
-
16
14
  import { registerBlockType } from '@wordpress/blocks';
17
15
  import { __ } from '@wordpress/i18n';
18
16
  import { DimensionControl } from '@wordpress/components';
19
17
 
18
+ const partialRight =
19
+ ( fn, ...partialArgs ) =>
20
+ ( ...args ) =>
21
+ fn( ...args, ...partialArgs );
22
+
20
23
  registerBlockType( 'my-plugin/my-block', {
21
24
  // ...
22
25
 
@@ -2,7 +2,6 @@
2
2
  * External dependencies
3
3
  */
4
4
  import { shallow, mount } from 'enzyme';
5
- import { uniqueId } from 'lodash';
6
5
 
7
6
  /**
8
7
  * WordPress dependencies
@@ -16,6 +15,7 @@ import { DimensionControl } from '../';
16
15
 
17
16
  describe( 'DimensionControl', () => {
18
17
  const onChangeHandler = jest.fn();
18
+ const instanceId = 1;
19
19
 
20
20
  afterEach( () => {
21
21
  onChangeHandler.mockClear();
@@ -25,7 +25,7 @@ describe( 'DimensionControl', () => {
25
25
  it( 'renders with defaults', () => {
26
26
  const wrapper = shallow(
27
27
  <DimensionControl
28
- instanceId={ uniqueId() }
28
+ instanceId={ instanceId }
29
29
  label={ 'Padding' }
30
30
  />
31
31
  );
@@ -35,7 +35,7 @@ describe( 'DimensionControl', () => {
35
35
  it( 'renders with icon and default icon label', () => {
36
36
  const wrapper = shallow(
37
37
  <DimensionControl
38
- instanceId={ uniqueId() }
38
+ instanceId={ instanceId }
39
39
  label={ 'Margin' }
40
40
  icon={ plus }
41
41
  />
@@ -46,7 +46,7 @@ describe( 'DimensionControl', () => {
46
46
  it( 'renders with icon and custom icon label', () => {
47
47
  const wrapper = shallow(
48
48
  <DimensionControl
49
- instanceId={ uniqueId() }
49
+ instanceId={ instanceId }
50
50
  label={ 'Margin' }
51
51
  icon={ plus }
52
52
  iconLabel={ 'Tablet Devices' }
@@ -76,7 +76,7 @@ describe( 'DimensionControl', () => {
76
76
 
77
77
  const wrapper = shallow(
78
78
  <DimensionControl
79
- instanceId={ uniqueId() }
79
+ instanceId={ instanceId }
80
80
  label={ 'Custom Dimension' }
81
81
  sizes={ customSizes }
82
82
  />
@@ -89,7 +89,7 @@ describe( 'DimensionControl', () => {
89
89
  it( 'should call onChange handler with correct args on size change', () => {
90
90
  const wrapper = mount(
91
91
  <DimensionControl
92
- instanceId={ uniqueId() }
92
+ instanceId={ instanceId }
93
93
  label={ 'Padding' }
94
94
  onChange={ onChangeHandler }
95
95
  />
@@ -121,7 +121,7 @@ describe( 'DimensionControl', () => {
121
121
  it( 'should call onChange handler with undefined value when no size is provided on change', () => {
122
122
  const wrapper = mount(
123
123
  <DimensionControl
124
- instanceId={ uniqueId() }
124
+ instanceId={ instanceId }
125
125
  label={ 'Padding' }
126
126
  onChange={ onChangeHandler }
127
127
  />
@@ -20,6 +20,7 @@ import { getDefaultColors, getGradientFromCSSColors } from './utils';
20
20
 
21
21
  function DuotonePicker( {
22
22
  clearable = true,
23
+ unsetable = true,
23
24
  colorPalette,
24
25
  duotonePalette,
25
26
  disableCustomColors,
@@ -32,43 +33,60 @@ function DuotonePicker( {
32
33
  [ colorPalette ]
33
34
  );
34
35
 
36
+ const isUnset = value === 'unset';
37
+
38
+ const unsetOption = (
39
+ <CircularOptionPicker.Option
40
+ key="unset"
41
+ value="unset"
42
+ isSelected={ isUnset }
43
+ tooltipText={ __( 'Unset' ) }
44
+ className="components-duotone-picker__color-indicator"
45
+ onClick={ () => {
46
+ onChange( isUnset ? undefined : 'unset' );
47
+ } }
48
+ />
49
+ );
50
+
51
+ const options = duotonePalette.map( ( { colors, slug, name } ) => {
52
+ const style = {
53
+ background: getGradientFromCSSColors( colors, '135deg' ),
54
+ color: 'transparent',
55
+ };
56
+ const tooltipText =
57
+ name ??
58
+ sprintf(
59
+ // translators: %s: duotone code e.g: "dark-grayscale" or "7f7f7f-ffffff".
60
+ __( 'Duotone code: %s' ),
61
+ slug
62
+ );
63
+ const label = name
64
+ ? sprintf(
65
+ // translators: %s: The name of the option e.g: "Dark grayscale".
66
+ __( 'Duotone: %s' ),
67
+ name
68
+ )
69
+ : tooltipText;
70
+ const isSelected = isEqual( colors, value );
71
+
72
+ return (
73
+ <CircularOptionPicker.Option
74
+ key={ slug }
75
+ value={ colors }
76
+ isSelected={ isSelected }
77
+ aria-label={ label }
78
+ tooltipText={ tooltipText }
79
+ style={ style }
80
+ onClick={ () => {
81
+ onChange( isSelected ? undefined : colors );
82
+ } }
83
+ />
84
+ );
85
+ } );
86
+
35
87
  return (
36
88
  <CircularOptionPicker
37
- options={ duotonePalette.map( ( { colors, slug, name } ) => {
38
- const style = {
39
- background: getGradientFromCSSColors( colors, '135deg' ),
40
- color: 'transparent',
41
- };
42
- const tooltipText =
43
- name ??
44
- sprintf(
45
- // translators: %s: duotone code e.g: "dark-grayscale" or "7f7f7f-ffffff".
46
- __( 'Duotone code: %s' ),
47
- slug
48
- );
49
- const label = name
50
- ? sprintf(
51
- // translators: %s: The name of the option e.g: "Dark grayscale".
52
- __( 'Duotone: %s' ),
53
- name
54
- )
55
- : tooltipText;
56
- const isSelected = isEqual( colors, value );
57
-
58
- return (
59
- <CircularOptionPicker.Option
60
- key={ slug }
61
- value={ colors }
62
- isSelected={ isSelected }
63
- aria-label={ label }
64
- tooltipText={ tooltipText }
65
- style={ style }
66
- onClick={ () => {
67
- onChange( isSelected ? undefined : colors );
68
- } }
69
- />
70
- );
71
- } ) }
89
+ options={ unsetable ? [ unsetOption, ...options ] : options }
72
90
  actions={
73
91
  !! clearable && (
74
92
  <CircularOptionPicker.ButtonAction
@@ -80,13 +98,16 @@ function DuotonePicker( {
80
98
  }
81
99
  >
82
100
  { ! disableCustomColors && ! disableCustomDuotone && (
83
- <CustomDuotoneBar value={ value } onChange={ onChange } />
101
+ <CustomDuotoneBar
102
+ value={ isUnset ? undefined : value }
103
+ onChange={ onChange }
104
+ />
84
105
  ) }
85
106
  { ! disableCustomDuotone && (
86
107
  <ColorListPicker
87
108
  labels={ [ __( 'Shadows' ), __( 'Highlights' ) ] }
88
109
  colors={ colorPalette }
89
- value={ value }
110
+ value={ isUnset ? undefined : value }
90
111
  disableCustomColors={ disableCustomColors }
91
112
  enableAlpha
92
113
  onChange={ ( newColors ) => {
@@ -0,0 +1,19 @@
1
+ .components-duotone-picker__color-indicator::before {
2
+ background: transparent;
3
+ }
4
+
5
+ .components-duotone-picker__color-indicator > .components-button {
6
+ // Show a diagonal line (crossed out) for empty swatches.
7
+ background: linear-gradient(-45deg, transparent 48%, $gray-300 48%, $gray-300 52%, transparent 52%);
8
+ color: transparent;
9
+
10
+ &.is-pressed:hover:not(:disabled) {
11
+ // Hover state has to be overridden too.
12
+ background: linear-gradient(-45deg, transparent 48%, $gray-300 48%, $gray-300 52%, transparent 52%);
13
+ color: transparent;
14
+ }
15
+
16
+ &:not([aria-disabled="true"]):active {
17
+ color: transparent;
18
+ }
19
+ }
@@ -2,7 +2,6 @@
2
2
  * External dependencies
3
3
  */
4
4
  import { css } from '@emotion/react';
5
- import { isNil } from 'lodash';
6
5
 
7
6
  /**
8
7
  * WordPress dependencies
@@ -16,6 +15,7 @@ import { useContextSystem } from '../ui/context';
16
15
  import * as styles from './styles';
17
16
  import { CONFIG, reduceMotion } from '../utils';
18
17
  import { useCx } from '../utils/hooks/use-cx';
18
+ import { isValueDefined } from '../utils/values';
19
19
 
20
20
  /**
21
21
  * @param {number} value
@@ -49,13 +49,13 @@ export function useElevation( props ) {
49
49
 
50
50
  const classes = useMemo( () => {
51
51
  /** @type {number | undefined} */
52
- let hoverValue = ! isNil( hover ) ? hover : value * 2;
52
+ let hoverValue = isValueDefined( hover ) ? hover : value * 2;
53
53
  /** @type {number | undefined} */
54
- let activeValue = ! isNil( active ) ? active : value / 2;
54
+ let activeValue = isValueDefined( active ) ? active : value / 2;
55
55
 
56
56
  if ( ! isInteractive ) {
57
- hoverValue = ! isNil( hover ) ? hover : undefined;
58
- activeValue = ! isNil( active ) ? active : undefined;
57
+ hoverValue = isValueDefined( hover ) ? hover : undefined;
58
+ activeValue = isValueDefined( active ) ? active : undefined;
59
59
  }
60
60
 
61
61
  const transition = `box-shadow ${ CONFIG.transitionDuration } ${ CONFIG.transitionTimingFunction }`;
@@ -76,7 +76,7 @@ export function useElevation( props ) {
76
76
  reduceMotion( 'transition' )
77
77
  );
78
78
 
79
- if ( ! isNil( hoverValue ) ) {
79
+ if ( isValueDefined( hoverValue ) ) {
80
80
  sx.hover = css`
81
81
  *:hover > & {
82
82
  box-shadow: ${ getBoxShadow( hoverValue ) };
@@ -84,7 +84,7 @@ export function useElevation( props ) {
84
84
  `;
85
85
  }
86
86
 
87
- if ( ! isNil( activeValue ) ) {
87
+ if ( isValueDefined( activeValue ) ) {
88
88
  sx.active = css`
89
89
  *:active > & {
90
90
  box-shadow: ${ getBoxShadow( activeValue ) };
@@ -92,7 +92,7 @@ export function useElevation( props ) {
92
92
  `;
93
93
  }
94
94
 
95
- if ( ! isNil( focus ) ) {
95
+ if ( isValueDefined( focus ) ) {
96
96
  sx.focus = css`
97
97
  *:focus > & {
98
98
  box-shadow: ${ getBoxShadow( focus ) };
@@ -1,9 +1,5 @@
1
1
  # Flex
2
2
 
3
- <div class="callout callout-alert">
4
- This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
5
- </div>
6
-
7
3
  `Flex` is a primitive layout component that adaptively aligns child content horizontally or vertically. `Flex` powers components like `HStack` and `VStack`.
8
4
 
9
5
  ## Usage
@@ -12,20 +8,19 @@ This feature is still experimental. “Experimental” means this is an early im
12
8
 
13
9
  ```jsx
14
10
  import {
15
- __experimentalFlex as Flex,
16
- __experimentalFlexBlock as FlexBlock,
17
- __experimentalFlexItem as FlexItem,
18
- __experimentalText as Text,
11
+ Flex,
12
+ FlexBlock,
13
+ FlexItem,
19
14
  } from '@wordpress/components';
20
15
 
21
16
  function Example() {
22
17
  return (
23
18
  <Flex>
24
19
  <FlexItem>
25
- <Text>Code</Text>
20
+ <p>Code</p>
26
21
  </FlexItem>
27
22
  <FlexBlock>
28
- <Text>Poetry</Text>
23
+ <p>Poetry</p>
29
24
  </FlexBlock>
30
25
  </Flex>
31
26
  );
@@ -8,7 +8,7 @@ A layout component to contain items of a fixed width within `Flex`.
8
8
 
9
9
  ## Usage
10
10
 
11
- See [`flex/README.md#usage`](/packages/components/src/flex/README.md#usage) for how to use `FlexItem`.
11
+ See [`flex/README.md#usage`](/packages/components/src/flex/flex/README.md#usage) for how to use `FlexItem`.
12
12
 
13
13
  ## Props
14
14
 
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import { Animated, PanResponder, View } from 'react-native';
5
5
  import Video from 'react-native-video';
6
- import { clamp } from 'lodash';
7
6
 
8
7
  /**
9
8
  * WordPress dependencies
@@ -24,6 +23,7 @@ import FocalPoint from './focal-point';
24
23
  import Tooltip from './tooltip';
25
24
  import styles from './style.scss';
26
25
  import { isVideoType } from './utils';
26
+ import { clamp } from '../utils/math';
27
27
 
28
28
  const MIN_POSITION_VALUE = 0;
29
29
  const MAX_POSITION_VALUE = 100;
@@ -60,10 +60,12 @@ import { useState } from '@wordpress/element';
60
60
  const MyFormToggle = () => {
61
61
  const [ isChecked, setChecked ] = useState( true );
62
62
 
63
- <FormToggle
64
- checked={ isChecked }
65
- onChange={ () => setChecked( ( state ) => ! state ) }
66
- />
63
+ return (
64
+ <FormToggle
65
+ checked={ isChecked }
66
+ onChange={ () => setChecked( ( state ) => ! state ) }
67
+ />
68
+ );
67
69
  };
68
70
  ```
69
71
 
@@ -71,26 +73,23 @@ const MyFormToggle = () => {
71
73
 
72
74
  The component accepts the following props:
73
75
 
74
- #### checked
76
+ #### `checked`: `boolean`
75
77
 
76
78
  If checked is true the toggle will be checked. If checked is false the toggle will be unchecked.
77
79
  If no value is passed the toggle will be unchecked.
78
80
 
79
- - Type: `Boolean`
80
81
  - Required: No
81
82
 
82
- #### disabled
83
+ #### `disabled`: `boolean`
83
84
 
84
85
  If disabled is true the toggle will be disabled and apply the appropriate styles.
85
86
 
86
- - Type: `Boolean`
87
87
  - Required: No
88
88
 
89
- #### onChange
89
+ #### `onChange`: `( event: ChangeEvent<HTMLInputElement> ) => void`
90
90
 
91
- A function that receives the checked state (boolean) as input.
91
+ A callback function invoked when the toggle is clicked.
92
92
 
93
- - Type: `function`
94
93
  - Required: Yes
95
94
 
96
95
  ## Related components
@@ -0,0 +1,71 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import classnames from 'classnames';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import type { FormToggleProps } from './types';
10
+ import type { WordPressComponentProps } from '../ui/context';
11
+
12
+ export const noop = () => {};
13
+
14
+ /**
15
+ * FormToggle switches a single setting on or off.
16
+ *
17
+ * ```jsx
18
+ * import { FormToggle } from '@wordpress/components';
19
+ * import { useState } from '@wordpress/element';
20
+ *
21
+ * const MyFormToggle = () => {
22
+ * const [ isChecked, setChecked ] = useState( true );
23
+ *
24
+ * return (
25
+ * <FormToggle
26
+ * checked={ isChecked }
27
+ * onChange={ () => setChecked( ( state ) => ! state ) }
28
+ * />
29
+ * );
30
+ * };
31
+ * ```
32
+ */
33
+ export function FormToggle(
34
+ // ref is omitted until we have `WordPressComponentPropsWithoutRef` or add
35
+ // ref forwarding to FormToggle.
36
+ props: Omit<
37
+ WordPressComponentProps< FormToggleProps, 'input', false >,
38
+ 'ref'
39
+ >
40
+ ) {
41
+ const {
42
+ className,
43
+ checked,
44
+ id,
45
+ disabled,
46
+ onChange = noop,
47
+ ...additionalProps
48
+ } = props;
49
+ const wrapperClasses = classnames( 'components-form-toggle', className, {
50
+ 'is-checked': checked,
51
+ 'is-disabled': disabled,
52
+ } );
53
+
54
+ return (
55
+ <span className={ wrapperClasses }>
56
+ <input
57
+ className="components-form-toggle__input"
58
+ id={ id }
59
+ type="checkbox"
60
+ checked={ checked }
61
+ onChange={ onChange }
62
+ disabled={ disabled }
63
+ { ...additionalProps }
64
+ />
65
+ <span className="components-form-toggle__track"></span>
66
+ <span className="components-form-toggle__thumb"></span>
67
+ </span>
68
+ );
69
+ }
70
+
71
+ export default FormToggle;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { useState } from '@wordpress/element';
10
+
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+ import { FormToggle } from '..';
15
+
16
+ const meta: ComponentMeta< typeof FormToggle > = {
17
+ component: FormToggle,
18
+ title: 'Components/FormToggle',
19
+ argTypes: {
20
+ onChange: {
21
+ action: 'onChange',
22
+ },
23
+ },
24
+ parameters: {
25
+ controls: {
26
+ expanded: true,
27
+ },
28
+ docs: { source: { state: 'open' } },
29
+ },
30
+ };
31
+ export default meta;
32
+
33
+ const Template: ComponentStory< typeof FormToggle > = ( {
34
+ onChange,
35
+ ...args
36
+ } ) => {
37
+ const [ isChecked, setChecked ] = useState( true );
38
+
39
+ return (
40
+ <FormToggle
41
+ { ...args }
42
+ checked={ isChecked }
43
+ onChange={ ( e ) => {
44
+ setChecked( ( state ) => ! state );
45
+ onChange( e );
46
+ } }
47
+ />
48
+ );
49
+ };
50
+
51
+ export const Default: ComponentStory< typeof FormToggle > = Template.bind( {} );
52
+ Default.args = {};