reshaped 1.0.1 → 2.2.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 (744) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE.md +37 -0
  3. package/bin/clean.sh +2 -0
  4. package/bin/cli.js +78 -0
  5. package/bin/copy-release.sh +8 -0
  6. package/bundle.css +1 -0
  7. package/bundle.d.ts +120 -0
  8. package/bundle.js +27 -0
  9. package/cli/theming/definitions/base.d.ts +3 -0
  10. package/cli/theming/definitions/base.js +11 -0
  11. package/cli/theming/definitions/figma.d.ts +3 -0
  12. package/cli/theming/definitions/figma.js +180 -0
  13. package/cli/theming/definitions/minimal.d.ts +3 -0
  14. package/cli/theming/definitions/minimal.js +80 -0
  15. package/cli/theming/definitions/reshaped.d.ts +3 -0
  16. package/cli/theming/definitions/reshaped.js +188 -0
  17. package/cli/theming/definitions/slate.d.ts +3 -0
  18. package/cli/theming/definitions/slate.js +80 -0
  19. package/cli/theming/index.d.ts +4 -0
  20. package/cli/theming/index.js +140 -0
  21. package/cli/theming/reshaped.config.d.ts +3 -0
  22. package/cli/theming/reshaped.config.js +25 -0
  23. package/cli/theming/tokens/color/color.transforms.d.ts +4 -0
  24. package/cli/theming/tokens/color/color.transforms.js +20 -0
  25. package/cli/theming/tokens/color/color.types.d.ts +7 -0
  26. package/cli/theming/tokens/color/color.types.js +2 -0
  27. package/cli/theming/tokens/duration/duration.transforms.d.ts +4 -0
  28. package/cli/theming/tokens/duration/duration.transforms.js +11 -0
  29. package/cli/theming/tokens/duration/duration.types.d.ts +4 -0
  30. package/cli/theming/tokens/duration/duration.types.js +2 -0
  31. package/cli/theming/tokens/easing/easing.transforms.d.ts +4 -0
  32. package/cli/theming/tokens/easing/easing.transforms.js +11 -0
  33. package/cli/theming/tokens/easing/easing.types.d.ts +7 -0
  34. package/cli/theming/tokens/easing/easing.types.js +2 -0
  35. package/cli/theming/tokens/font/font.transforms.d.ts +4 -0
  36. package/cli/theming/tokens/font/font.transforms.js +36 -0
  37. package/cli/theming/tokens/font/font.types.d.ts +10 -0
  38. package/cli/theming/tokens/font/font.types.js +2 -0
  39. package/cli/theming/tokens/fontFamily/fontFamily.transforms.d.ts +4 -0
  40. package/cli/theming/tokens/fontFamily/fontFamily.transforms.js +11 -0
  41. package/cli/theming/tokens/fontFamily/fontFamily.types.d.ts +4 -0
  42. package/cli/theming/tokens/fontFamily/fontFamily.types.js +2 -0
  43. package/cli/theming/tokens/fontWeight/fontWeight.transforms.d.ts +4 -0
  44. package/cli/theming/tokens/fontWeight/fontWeight.transforms.js +11 -0
  45. package/cli/theming/tokens/fontWeight/fontWeight.types.d.ts +4 -0
  46. package/cli/theming/tokens/fontWeight/fontWeight.types.js +2 -0
  47. package/cli/theming/tokens/shadow/shadow.transforms.d.ts +4 -0
  48. package/cli/theming/tokens/shadow/shadow.transforms.js +20 -0
  49. package/cli/theming/tokens/shadow/shadow.types.d.ts +13 -0
  50. package/cli/theming/tokens/shadow/shadow.types.js +2 -0
  51. package/cli/theming/tokens/transforms.d.ts +11 -0
  52. package/cli/theming/tokens/transforms.js +26 -0
  53. package/cli/theming/tokens/types.d.ts +52 -0
  54. package/cli/theming/tokens/types.js +2 -0
  55. package/cli/theming/tokens/unit/unit.transforms.d.ts +4 -0
  56. package/cli/theming/tokens/unit/unit.transforms.js +11 -0
  57. package/cli/theming/tokens/unit/unit.types.d.ts +7 -0
  58. package/cli/theming/tokens/unit/unit.types.js +2 -0
  59. package/cli/theming/tokens/viewport/viewport.transforms.d.ts +4 -0
  60. package/cli/theming/tokens/viewport/viewport.transforms.js +18 -0
  61. package/cli/theming/tokens/viewport/viewport.types.d.ts +5 -0
  62. package/cli/theming/tokens/viewport/viewport.types.js +2 -0
  63. package/cli/theming/types.d.ts +14 -0
  64. package/cli/theming/types.js +2 -0
  65. package/cli/theming/utilities/css.d.ts +6 -0
  66. package/cli/theming/utilities/css.js +50 -0
  67. package/cli/theming/utilities/mergeDeep.d.ts +5 -0
  68. package/cli/theming/utilities/mergeDeep.js +24 -0
  69. package/cli/theming/utilities/mergeDefinitions.d.ts +5 -0
  70. package/cli/theming/utilities/mergeDefinitions.js +17 -0
  71. package/cli/theming/utilities/resolveTokenReference.d.ts +3 -0
  72. package/cli/theming/utilities/resolveTokenReference.js +16 -0
  73. package/cli/utilities/color.d.ts +15 -0
  74. package/cli/utilities/color.js +39 -0
  75. package/cli/utilities/string.d.ts +2 -0
  76. package/cli/utilities/string.js +11 -0
  77. package/cli/utilities/tests/color.test.d.ts +1 -0
  78. package/cli/utilities/tests/color.test.js +63 -0
  79. package/components/Accordion/Accordion.context.d.ts +4 -0
  80. package/components/Accordion/Accordion.context.js +9 -0
  81. package/components/Accordion/Accordion.d.ts +8 -0
  82. package/components/Accordion/Accordion.js +14 -0
  83. package/components/Accordion/Accordion.module.css +1 -0
  84. package/components/Accordion/Accordion.types.d.ts +39 -0
  85. package/components/Accordion/Accordion.types.js +1 -0
  86. package/components/Accordion/AccordionContent.d.ts +4 -0
  87. package/components/Accordion/AccordionContent.js +43 -0
  88. package/components/Accordion/AccordionControlled.d.ts +4 -0
  89. package/components/Accordion/AccordionControlled.js +23 -0
  90. package/components/Accordion/AccordionTrigger.d.ts +4 -0
  91. package/components/Accordion/AccordionTrigger.js +26 -0
  92. package/components/Accordion/AccordionUncontrolled.d.ts +4 -0
  93. package/components/Accordion/AccordionUncontrolled.js +24 -0
  94. package/components/Accordion/index.d.ts +2 -0
  95. package/components/Accordion/index.js +1 -0
  96. package/components/Accordion/tests/Accordion.stories.d.ts +9 -0
  97. package/components/Accordion/tests/Accordion.stories.js +119 -0
  98. package/components/ActionBar/ActionBar.d.ts +4 -0
  99. package/components/ActionBar/ActionBar.js +10 -0
  100. package/components/ActionBar/ActionBar.module.css +1 -0
  101. package/components/ActionBar/ActionBar.types.d.ts +10 -0
  102. package/components/ActionBar/ActionBar.types.js +1 -0
  103. package/components/ActionBar/index.d.ts +2 -0
  104. package/components/ActionBar/index.js +1 -0
  105. package/components/ActionBar/tests/ActionBar.stories.d.ts +8 -0
  106. package/components/ActionBar/tests/ActionBar.stories.js +43 -0
  107. package/components/Actionable/Actionable.d.ts +4 -0
  108. package/components/Actionable/Actionable.js +54 -0
  109. package/components/Actionable/Actionable.module.css +1 -0
  110. package/components/Actionable/Actionable.types.d.ts +18 -0
  111. package/components/Actionable/Actionable.types.js +1 -0
  112. package/components/Actionable/index.d.ts +2 -0
  113. package/components/Actionable/index.js +1 -0
  114. package/components/Actionable/tests/Actionable.stories.d.ts +9 -0
  115. package/components/Actionable/tests/Actionable.stories.js +56 -0
  116. package/components/Alert/Alert.d.ts +4 -0
  117. package/components/Alert/Alert.js +31 -0
  118. package/components/Alert/Alert.types.d.ts +14 -0
  119. package/components/Alert/Alert.types.js +1 -0
  120. package/components/Alert/index.d.ts +2 -0
  121. package/components/Alert/index.js +1 -0
  122. package/components/Alert/tests/Alert.stories.d.ts +8 -0
  123. package/components/Alert/tests/Alert.stories.js +78 -0
  124. package/components/Autocomplete/Autocomplete.d.ts +7 -0
  125. package/components/Autocomplete/Autocomplete.js +69 -0
  126. package/components/Autocomplete/Autocomplete.types.d.ts +17 -0
  127. package/components/Autocomplete/Autocomplete.types.js +1 -0
  128. package/components/Autocomplete/index.d.ts +2 -0
  129. package/components/Autocomplete/index.js +1 -0
  130. package/components/Autocomplete/tests/Autocomplete.stories.d.ts +6 -0
  131. package/components/Autocomplete/tests/Autocomplete.stories.js +21 -0
  132. package/components/Avatar/Avatar.d.ts +4 -0
  133. package/components/Avatar/Avatar.js +29 -0
  134. package/components/Avatar/Avatar.module.css +1 -0
  135. package/components/Avatar/Avatar.types.d.ts +30 -0
  136. package/components/Avatar/Avatar.types.js +1 -0
  137. package/components/Avatar/index.d.ts +2 -0
  138. package/components/Avatar/index.js +1 -0
  139. package/components/Avatar/tests/Avatar.stories.d.ts +9 -0
  140. package/components/Avatar/tests/Avatar.stories.js +83 -0
  141. package/components/Badge/Badge.d.ts +7 -0
  142. package/components/Badge/Badge.js +24 -0
  143. package/components/Badge/Badge.module.css +1 -0
  144. package/components/Badge/Badge.types.d.ts +39 -0
  145. package/components/Badge/Badge.types.js +1 -0
  146. package/components/Badge/BadgeContainer.d.ts +4 -0
  147. package/components/Badge/BadgeContainer.js +9 -0
  148. package/components/Badge/index.d.ts +2 -0
  149. package/components/Badge/index.js +1 -0
  150. package/components/Badge/tests/Badge.stories.d.ts +13 -0
  151. package/components/Badge/tests/Badge.stories.js +222 -0
  152. package/components/Breadcrumbs/Breadcrumbs.d.ts +7 -0
  153. package/components/Breadcrumbs/Breadcrumbs.js +54 -0
  154. package/components/Breadcrumbs/Breadcrumbs.types.d.ts +13 -0
  155. package/components/Breadcrumbs/Breadcrumbs.types.js +1 -0
  156. package/components/Breadcrumbs/index.d.ts +2 -0
  157. package/components/Breadcrumbs/index.js +1 -0
  158. package/components/Breadcrumbs/tests/Breadcrumbs.stories.d.ts +10 -0
  159. package/components/Breadcrumbs/tests/Breadcrumbs.stories.js +95 -0
  160. package/components/Button/Button.d.ts +3 -0
  161. package/components/Button/Button.js +37 -0
  162. package/components/Button/Button.module.css +1 -0
  163. package/components/Button/Button.types.d.ts +31 -0
  164. package/components/Button/Button.types.js +1 -0
  165. package/components/Button/ButtonAligner.d.ts +4 -0
  166. package/components/Button/ButtonAligner.js +13 -0
  167. package/components/Button/index.d.ts +2 -0
  168. package/components/Button/index.js +1 -0
  169. package/components/Button/tests/Button.stories.d.ts +15 -0
  170. package/components/Button/tests/Button.stories.js +565 -0
  171. package/components/Card/Card.d.ts +17 -0
  172. package/components/Card/Card.js +31 -0
  173. package/components/Card/Card.module.css +1 -0
  174. package/components/Card/Card.types.d.ts +16 -0
  175. package/components/Card/Card.types.js +1 -0
  176. package/components/Card/index.d.ts +2 -0
  177. package/components/Card/index.js +1 -0
  178. package/components/Card/tests/Card.stories.d.ts +12 -0
  179. package/components/Card/tests/Card.stories.js +83 -0
  180. package/components/Carousel/Carousel.d.ts +4 -0
  181. package/components/Carousel/Carousel.js +67 -0
  182. package/components/Carousel/Carousel.module.css +1 -0
  183. package/components/Carousel/Carousel.types.d.ts +28 -0
  184. package/components/Carousel/Carousel.types.js +5 -0
  185. package/components/Carousel/CarouselControl.d.ts +4 -0
  186. package/components/Carousel/CarouselControl.js +42 -0
  187. package/components/Carousel/index.d.ts +2 -0
  188. package/components/Carousel/index.js +1 -0
  189. package/components/Carousel/tests/Carousel.stories.d.ts +9 -0
  190. package/components/Carousel/tests/Carousel.stories.js +119 -0
  191. package/components/Checkbox/Checkbox.d.ts +4 -0
  192. package/components/Checkbox/Checkbox.js +44 -0
  193. package/components/Checkbox/Checkbox.module.css +1 -0
  194. package/components/Checkbox/Checkbox.types.d.ts +26 -0
  195. package/components/Checkbox/Checkbox.types.js +1 -0
  196. package/components/Checkbox/index.d.ts +2 -0
  197. package/components/Checkbox/index.js +1 -0
  198. package/components/Checkbox/tests/Checkbox.stories.d.ts +8 -0
  199. package/components/Checkbox/tests/Checkbox.stories.js +53 -0
  200. package/components/CheckboxGroup/CheckboxGroup.context.d.ts +5 -0
  201. package/components/CheckboxGroup/CheckboxGroup.context.js +5 -0
  202. package/components/CheckboxGroup/CheckboxGroup.d.ts +4 -0
  203. package/components/CheckboxGroup/CheckboxGroup.js +10 -0
  204. package/components/CheckboxGroup/CheckboxGroup.types.d.ts +28 -0
  205. package/components/CheckboxGroup/CheckboxGroup.types.js +1 -0
  206. package/components/CheckboxGroup/CheckboxGroupControlled.d.ts +4 -0
  207. package/components/CheckboxGroup/CheckboxGroupControlled.js +22 -0
  208. package/components/CheckboxGroup/CheckboxGroupUncontrolled.d.ts +4 -0
  209. package/components/CheckboxGroup/CheckboxGroupUncontrolled.js +16 -0
  210. package/components/CheckboxGroup/index.d.ts +3 -0
  211. package/components/CheckboxGroup/index.js +2 -0
  212. package/components/CheckboxGroup/tests/CheckboxGroup.stories.d.ts +7 -0
  213. package/components/CheckboxGroup/tests/CheckboxGroup.stories.js +44 -0
  214. package/components/Container/Container.d.ts +4 -0
  215. package/components/Container/Container.js +10 -0
  216. package/components/Container/Container.module.css +1 -0
  217. package/components/Container/Container.types.d.ts +9 -0
  218. package/components/Container/Container.types.js +1 -0
  219. package/components/Container/index.d.ts +2 -0
  220. package/components/Container/index.js +1 -0
  221. package/components/Container/tests/Container.stories.d.ts +7 -0
  222. package/components/Container/tests/Container.stories.js +28 -0
  223. package/components/Dismissible/Dismissible.d.ts +4 -0
  224. package/components/Dismissible/Dismissible.js +15 -0
  225. package/components/Dismissible/Dismissible.module.css +1 -0
  226. package/components/Dismissible/Dismissible.types.d.ts +20 -0
  227. package/components/Dismissible/Dismissible.types.js +1 -0
  228. package/components/Dismissible/index.d.ts +2 -0
  229. package/components/Dismissible/index.js +1 -0
  230. package/components/Dismissible/tests/Dismissible.stories.d.ts +8 -0
  231. package/components/Dismissible/tests/Dismissible.stories.js +44 -0
  232. package/components/Divider/Divider.d.ts +4 -0
  233. package/components/Divider/Divider.js +14 -0
  234. package/components/Divider/Divider.module.css +1 -0
  235. package/components/Divider/Divider.types.d.ts +7 -0
  236. package/components/Divider/Divider.types.js +1 -0
  237. package/components/Divider/index.d.ts +2 -0
  238. package/components/Divider/index.js +1 -0
  239. package/components/Divider/tests/Divider.stories.d.ts +7 -0
  240. package/components/Divider/tests/Divider.stories.js +36 -0
  241. package/components/DropdownMenu/DropdownMenu.d.ts +13 -0
  242. package/components/DropdownMenu/DropdownMenu.js +90 -0
  243. package/components/DropdownMenu/DropdownMenu.module.css +1 -0
  244. package/components/DropdownMenu/DropdownMenu.types.d.ts +16 -0
  245. package/components/DropdownMenu/DropdownMenu.types.js +1 -0
  246. package/components/DropdownMenu/index.d.ts +2 -0
  247. package/components/DropdownMenu/index.js +1 -0
  248. package/components/DropdownMenu/tests/DropdownMenu.stories.d.ts +11 -0
  249. package/components/DropdownMenu/tests/DropdownMenu.stories.js +138 -0
  250. package/components/FormControl/FormControl.context.d.ts +281 -0
  251. package/components/FormControl/FormControl.context.js +18 -0
  252. package/components/FormControl/FormControl.d.ts +9 -0
  253. package/components/FormControl/FormControl.js +68 -0
  254. package/components/FormControl/FormControl.module.css +1 -0
  255. package/components/FormControl/FormControl.types.d.ts +33 -0
  256. package/components/FormControl/FormControl.types.js +1 -0
  257. package/components/FormControl/index.d.ts +3 -0
  258. package/components/FormControl/index.js +2 -0
  259. package/components/FormControl/tests/FormControl.stories.d.ts +10 -0
  260. package/components/FormControl/tests/FormControl.stories.js +78 -0
  261. package/components/Hidden/Hidden.d.ts +4 -0
  262. package/components/Hidden/Hidden.js +11 -0
  263. package/components/Hidden/Hidden.module.css +1 -0
  264. package/components/Hidden/Hidden.types.d.ts +9 -0
  265. package/components/Hidden/Hidden.types.js +1 -0
  266. package/components/Hidden/index.d.ts +2 -0
  267. package/components/Hidden/index.js +1 -0
  268. package/components/Hidden/tests/Hidden.stories.d.ts +7 -0
  269. package/components/Hidden/tests/Hidden.stories.js +39 -0
  270. package/components/HiddenVisually/HiddenVisually.d.ts +4 -0
  271. package/components/HiddenVisually/HiddenVisually.js +7 -0
  272. package/components/HiddenVisually/HiddenVisually.module.css +1 -0
  273. package/components/HiddenVisually/HiddenVisually.types.d.ts +4 -0
  274. package/components/HiddenVisually/HiddenVisually.types.js +1 -0
  275. package/components/HiddenVisually/index.d.ts +2 -0
  276. package/components/HiddenVisually/index.js +1 -0
  277. package/components/HiddenVisually/tests/HiddenVisually.stories.d.ts +6 -0
  278. package/components/HiddenVisually/tests/HiddenVisually.stories.js +9 -0
  279. package/components/Hotkey/Hotkey.d.ts +4 -0
  280. package/components/Hotkey/Hotkey.js +10 -0
  281. package/components/Hotkey/Hotkey.module.css +1 -0
  282. package/components/Hotkey/Hotkey.types.d.ts +8 -0
  283. package/components/Hotkey/Hotkey.types.js +1 -0
  284. package/components/Hotkey/index.d.ts +2 -0
  285. package/components/Hotkey/index.js +1 -0
  286. package/components/Hotkey/tests/Hotkey.stories.d.ts +6 -0
  287. package/components/Hotkey/tests/Hotkey.stories.js +26 -0
  288. package/components/Icon/Icon.d.ts +4 -0
  289. package/components/Icon/Icon.js +15 -0
  290. package/components/Icon/Icon.module.css +1 -0
  291. package/components/Icon/Icon.types.d.ts +10 -0
  292. package/components/Icon/Icon.types.js +1 -0
  293. package/components/Icon/index.d.ts +2 -0
  294. package/components/Icon/index.js +1 -0
  295. package/components/Icon/tests/Icon.stories.d.ts +8 -0
  296. package/components/Icon/tests/Icon.stories.js +69 -0
  297. package/components/Image/Image.d.ts +4 -0
  298. package/components/Image/Image.js +37 -0
  299. package/components/Image/Image.module.css +1 -0
  300. package/components/Image/Image.types.d.ts +19 -0
  301. package/components/Image/Image.types.js +1 -0
  302. package/components/Image/index.d.ts +2 -0
  303. package/components/Image/index.js +1 -0
  304. package/components/Image/tests/Image.stories.d.ts +10 -0
  305. package/components/Image/tests/Image.stories.js +90 -0
  306. package/components/Link/Link.d.ts +7 -0
  307. package/components/Link/Link.js +13 -0
  308. package/components/Link/Link.module.css +1 -0
  309. package/components/Link/Link.types.d.ts +7 -0
  310. package/components/Link/Link.types.js +1 -0
  311. package/components/Link/index.d.ts +2 -0
  312. package/components/Link/index.js +1 -0
  313. package/components/Link/tests/Link.stories.d.ts +10 -0
  314. package/components/Link/tests/Link.stories.js +62 -0
  315. package/components/Loader/Loader.d.ts +4 -0
  316. package/components/Loader/Loader.js +11 -0
  317. package/components/Loader/Loader.module.css +1 -0
  318. package/components/Loader/Loader.types.d.ts +7 -0
  319. package/components/Loader/Loader.types.js +1 -0
  320. package/components/Loader/index.d.ts +2 -0
  321. package/components/Loader/index.js +1 -0
  322. package/components/Loader/tests/Loader.stories.d.ts +7 -0
  323. package/components/Loader/tests/Loader.stories.js +29 -0
  324. package/components/MenuItem/MenuItem.d.ts +3 -0
  325. package/components/MenuItem/MenuItem.js +22 -0
  326. package/components/MenuItem/MenuItem.module.css +1 -0
  327. package/components/MenuItem/MenuItem.types.d.ts +23 -0
  328. package/components/MenuItem/MenuItem.types.js +1 -0
  329. package/components/MenuItem/MenuItemAligner.d.ts +4 -0
  330. package/components/MenuItem/MenuItemAligner.js +9 -0
  331. package/components/MenuItem/index.d.ts +2 -0
  332. package/components/MenuItem/index.js +1 -0
  333. package/components/MenuItem/tests/MenuItem.stories.d.ts +12 -0
  334. package/components/MenuItem/tests/MenuItem.stories.js +122 -0
  335. package/components/Modal/Modal.d.ts +8 -0
  336. package/components/Modal/Modal.js +56 -0
  337. package/components/Modal/Modal.module.css +1 -0
  338. package/components/Modal/Modal.types.d.ts +26 -0
  339. package/components/Modal/Modal.types.js +1 -0
  340. package/components/Modal/index.d.ts +2 -0
  341. package/components/Modal/index.js +1 -0
  342. package/components/Modal/tests/Modal.stories.d.ts +11 -0
  343. package/components/Modal/tests/Modal.stories.js +145 -0
  344. package/components/Overlay/Overlay.d.ts +4 -0
  345. package/components/Overlay/Overlay.js +110 -0
  346. package/components/Overlay/Overlay.module.css +1 -0
  347. package/components/Overlay/Overlay.types.d.ts +12 -0
  348. package/components/Overlay/Overlay.types.js +1 -0
  349. package/components/Overlay/index.d.ts +2 -0
  350. package/components/Overlay/index.js +1 -0
  351. package/components/Overlay/tests/Overlay.stories.d.ts +6 -0
  352. package/components/Overlay/tests/Overlay.stories.js +27 -0
  353. package/components/Popover/Popover.d.ts +8 -0
  354. package/components/Popover/Popover.js +19 -0
  355. package/components/Popover/Popover.module.css +1 -0
  356. package/components/Popover/Popover.types.d.ts +7 -0
  357. package/components/Popover/Popover.types.js +1 -0
  358. package/components/Popover/index.d.ts +2 -0
  359. package/components/Popover/index.js +1 -0
  360. package/components/Popover/tests/Popover.stories.d.ts +10 -0
  361. package/components/Popover/tests/Popover.stories.js +99 -0
  362. package/components/Progress/Progress.d.ts +4 -0
  363. package/components/Progress/Progress.js +18 -0
  364. package/components/Progress/Progress.module.css +1 -0
  365. package/components/Progress/Progress.types.d.ts +11 -0
  366. package/components/Progress/Progress.types.js +1 -0
  367. package/components/Progress/index.d.ts +2 -0
  368. package/components/Progress/index.js +1 -0
  369. package/components/Progress/tests/Progress.stories.d.ts +9 -0
  370. package/components/Progress/tests/Progress.stories.js +55 -0
  371. package/components/Radio/Radio.d.ts +4 -0
  372. package/components/Radio/Radio.js +35 -0
  373. package/components/Radio/Radio.module.css +1 -0
  374. package/components/Radio/Radio.types.d.ts +25 -0
  375. package/components/Radio/Radio.types.js +1 -0
  376. package/components/Radio/index.d.ts +2 -0
  377. package/components/Radio/index.js +1 -0
  378. package/components/Radio/tests/Radio.stories.d.ts +8 -0
  379. package/components/Radio/tests/Radio.stories.js +42 -0
  380. package/components/RadioGroup/RadioGroup.context.d.ts +5 -0
  381. package/components/RadioGroup/RadioGroup.context.js +5 -0
  382. package/components/RadioGroup/RadioGroup.d.ts +4 -0
  383. package/components/RadioGroup/RadioGroup.js +10 -0
  384. package/components/RadioGroup/RadioGroup.types.d.ts +28 -0
  385. package/components/RadioGroup/RadioGroup.types.js +1 -0
  386. package/components/RadioGroup/RadioGroupControlled.d.ts +4 -0
  387. package/components/RadioGroup/RadioGroupControlled.js +14 -0
  388. package/components/RadioGroup/RadioGroupUncontrolled.d.ts +4 -0
  389. package/components/RadioGroup/RadioGroupUncontrolled.js +16 -0
  390. package/components/RadioGroup/index.d.ts +3 -0
  391. package/components/RadioGroup/index.js +2 -0
  392. package/components/RadioGroup/tests/RadioGroup.stories.d.ts +7 -0
  393. package/components/RadioGroup/tests/RadioGroup.stories.js +44 -0
  394. package/components/Reshaped/Reshaped.css +1 -0
  395. package/components/Reshaped/Reshaped.d.ts +5 -0
  396. package/components/Reshaped/Reshaped.js +26 -0
  397. package/components/Reshaped/Reshaped.module.css +1 -0
  398. package/components/Reshaped/Reshaped.types.d.ts +14 -0
  399. package/components/Reshaped/Reshaped.types.js +1 -0
  400. package/components/Reshaped/index.d.ts +2 -0
  401. package/components/Reshaped/index.js +1 -0
  402. package/components/Scrim/Scrim.d.ts +4 -0
  403. package/components/Scrim/Scrim.js +13 -0
  404. package/components/Scrim/Scrim.module.css +1 -0
  405. package/components/Scrim/Scrim.types.d.ts +11 -0
  406. package/components/Scrim/Scrim.types.js +1 -0
  407. package/components/Scrim/index.d.ts +2 -0
  408. package/components/Scrim/index.js +1 -0
  409. package/components/Scrim/tests/Scrim.stories.d.ts +7 -0
  410. package/components/Scrim/tests/Scrim.stories.js +40 -0
  411. package/components/Select/Select.d.ts +4 -0
  412. package/components/Select/Select.js +59 -0
  413. package/components/Select/Select.module.css +1 -0
  414. package/components/Select/Select.types.d.ts +49 -0
  415. package/components/Select/Select.types.js +1 -0
  416. package/components/Select/index.d.ts +2 -0
  417. package/components/Select/index.js +1 -0
  418. package/components/Select/tests/Select.stories.d.ts +14 -0
  419. package/components/Select/tests/Select.stories.js +165 -0
  420. package/components/Skeleton/Skeleton.d.ts +4 -0
  421. package/components/Skeleton/Skeleton.js +10 -0
  422. package/components/Skeleton/Skeleton.module.css +1 -0
  423. package/components/Skeleton/Skeleton.types.d.ts +6 -0
  424. package/components/Skeleton/Skeleton.types.js +1 -0
  425. package/components/Skeleton/index.d.ts +2 -0
  426. package/components/Skeleton/index.js +1 -0
  427. package/components/Skeleton/tests/Skeleton.stories.d.ts +7 -0
  428. package/components/Skeleton/tests/Skeleton.stories.js +38 -0
  429. package/components/Slider/Slider.d.ts +4 -0
  430. package/components/Slider/Slider.js +26 -0
  431. package/components/Slider/Slider.module.css +1 -0
  432. package/components/Slider/Slider.types.d.ts +78 -0
  433. package/components/Slider/Slider.types.js +1 -0
  434. package/components/Slider/SliderControlled.d.ts +4 -0
  435. package/components/Slider/SliderControlled.js +172 -0
  436. package/components/Slider/SliderThumb.d.ts +4 -0
  437. package/components/Slider/SliderThumb.js +21 -0
  438. package/components/Slider/SliderUncontrolled.d.ts +4 -0
  439. package/components/Slider/SliderUncontrolled.js +32 -0
  440. package/components/Slider/index.d.ts +2 -0
  441. package/components/Slider/index.js +1 -0
  442. package/components/Slider/tests/Slider.stories.d.ts +10 -0
  443. package/components/Slider/tests/Slider.stories.js +42 -0
  444. package/components/Switch/Switch.d.ts +4 -0
  445. package/components/Switch/Switch.js +31 -0
  446. package/components/Switch/Switch.module.css +1 -0
  447. package/components/Switch/Switch.types.d.ts +26 -0
  448. package/components/Switch/Switch.types.js +1 -0
  449. package/components/Switch/index.d.ts +2 -0
  450. package/components/Switch/index.js +1 -0
  451. package/components/Switch/tests/Switch.stories.d.ts +9 -0
  452. package/components/Switch/tests/Switch.stories.js +53 -0
  453. package/components/Tabs/Tabs.d.ts +16 -0
  454. package/components/Tabs/Tabs.js +16 -0
  455. package/components/Tabs/Tabs.module.css +1 -0
  456. package/components/Tabs/Tabs.types.d.ts +61 -0
  457. package/components/Tabs/Tabs.types.js +1 -0
  458. package/components/Tabs/TabsContext.d.ts +18 -0
  459. package/components/Tabs/TabsContext.js +19 -0
  460. package/components/Tabs/TabsControlled.d.ts +4 -0
  461. package/components/Tabs/TabsControlled.js +16 -0
  462. package/components/Tabs/TabsItem.d.ts +11 -0
  463. package/components/Tabs/TabsItem.js +31 -0
  464. package/components/Tabs/TabsList.d.ts +4 -0
  465. package/components/Tabs/TabsList.js +163 -0
  466. package/components/Tabs/TabsPanel.d.ts +4 -0
  467. package/components/Tabs/TabsPanel.js +13 -0
  468. package/components/Tabs/TabsUncontrolled.d.ts +4 -0
  469. package/components/Tabs/TabsUncontrolled.js +18 -0
  470. package/components/Tabs/index.d.ts +2 -0
  471. package/components/Tabs/index.js +1 -0
  472. package/components/Tabs/tests/Tabs.stories.d.ts +13 -0
  473. package/components/Tabs/tests/Tabs.stories.js +251 -0
  474. package/components/Text/Text.d.ts +4 -0
  475. package/components/Text/Text.js +24 -0
  476. package/components/Text/Text.module.css +1 -0
  477. package/components/Text/Text.types.d.ts +15 -0
  478. package/components/Text/Text.types.js +1 -0
  479. package/components/Text/index.d.ts +2 -0
  480. package/components/Text/index.js +1 -0
  481. package/components/Text/tests/Text.stories.d.ts +11 -0
  482. package/components/Text/tests/Text.stories.js +117 -0
  483. package/components/TextArea/TextArea.d.ts +4 -0
  484. package/components/TextArea/TextArea.js +25 -0
  485. package/components/TextArea/TextArea.module.css +1 -0
  486. package/components/TextArea/TextArea.types.d.ts +28 -0
  487. package/components/TextArea/TextArea.types.js +1 -0
  488. package/components/TextArea/index.d.ts +2 -0
  489. package/components/TextArea/index.js +1 -0
  490. package/components/TextArea/tests/TextArea.stories.d.ts +11 -0
  491. package/components/TextArea/tests/TextArea.stories.js +72 -0
  492. package/components/TextField/TextField.d.ts +4 -0
  493. package/components/TextField/TextField.js +47 -0
  494. package/components/TextField/TextField.module.css +1 -0
  495. package/components/TextField/TextField.types.d.ts +42 -0
  496. package/components/TextField/TextField.types.js +1 -0
  497. package/components/TextField/index.d.ts +2 -0
  498. package/components/TextField/index.js +1 -0
  499. package/components/TextField/tests/TextField.stories.d.ts +14 -0
  500. package/components/TextField/tests/TextField.stories.js +100 -0
  501. package/components/Theme/GlobalColorMode.d.ts +4 -0
  502. package/components/Theme/GlobalColorMode.js +31 -0
  503. package/components/Theme/Theme.context.d.ts +4 -0
  504. package/components/Theme/Theme.context.js +14 -0
  505. package/components/Theme/Theme.d.ts +4 -0
  506. package/components/Theme/Theme.js +39 -0
  507. package/components/Theme/Theme.module.css +1 -0
  508. package/components/Theme/Theme.types.d.ts +24 -0
  509. package/components/Theme/Theme.types.js +1 -0
  510. package/components/Theme/index.d.ts +4 -0
  511. package/components/Theme/index.js +3 -0
  512. package/components/Theme/tests/Theme.stories.d.ts +7 -0
  513. package/components/Theme/tests/Theme.stories.js +40 -0
  514. package/components/Theme/useTheme.d.ts +8 -0
  515. package/components/Theme/useTheme.js +18 -0
  516. package/components/Timeline/Timeline.d.ts +7 -0
  517. package/components/Timeline/Timeline.js +21 -0
  518. package/components/Timeline/Timeline.module.css +1 -0
  519. package/components/Timeline/Timeline.types.d.ts +13 -0
  520. package/components/Timeline/Timeline.types.js +1 -0
  521. package/components/Timeline/index.d.ts +2 -0
  522. package/components/Timeline/index.js +1 -0
  523. package/components/Timeline/tests/Timeline.stories.d.ts +7 -0
  524. package/components/Timeline/tests/Timeline.stories.js +55 -0
  525. package/components/Toast/Toast.constants.d.ts +10 -0
  526. package/components/Toast/Toast.constants.js +20 -0
  527. package/components/Toast/Toast.context.d.ts +4 -0
  528. package/components/Toast/Toast.context.js +5 -0
  529. package/components/Toast/Toast.d.ts +6 -0
  530. package/components/Toast/Toast.js +55 -0
  531. package/components/Toast/Toast.module.css +1 -0
  532. package/components/Toast/Toast.types.d.ts +77 -0
  533. package/components/Toast/Toast.types.js +1 -0
  534. package/components/Toast/ToastContainer.d.ts +4 -0
  535. package/components/Toast/ToastContainer.js +97 -0
  536. package/components/Toast/ToastProvider.d.ts +4 -0
  537. package/components/Toast/ToastProvider.js +80 -0
  538. package/components/Toast/ToastRegion.d.ts +4 -0
  539. package/components/Toast/ToastRegion.js +63 -0
  540. package/components/Toast/index.d.ts +3 -0
  541. package/components/Toast/index.js +2 -0
  542. package/components/Toast/tests/Toast.stories.d.ts +13 -0
  543. package/components/Toast/tests/Toast.stories.js +304 -0
  544. package/components/Toast/useToast.d.ts +5 -0
  545. package/components/Toast/useToast.js +8 -0
  546. package/components/Tooltip/Tooltip.d.ts +4 -0
  547. package/components/Tooltip/Tooltip.js +15 -0
  548. package/components/Tooltip/Tooltip.module.css +1 -0
  549. package/components/Tooltip/Tooltip.types.d.ts +5 -0
  550. package/components/Tooltip/Tooltip.types.js +1 -0
  551. package/components/Tooltip/index.d.ts +2 -0
  552. package/components/Tooltip/index.js +1 -0
  553. package/components/Tooltip/tests/Tooltip.stories.d.ts +7 -0
  554. package/components/Tooltip/tests/Tooltip.stories.js +58 -0
  555. package/components/View/View.d.ts +7 -0
  556. package/components/View/View.js +135 -0
  557. package/components/View/View.module.css +1 -0
  558. package/components/View/View.types.d.ts +64 -0
  559. package/components/View/View.types.js +1 -0
  560. package/components/View/index.d.ts +2 -0
  561. package/components/View/index.js +1 -0
  562. package/components/View/tests/View.stories.d.ts +32 -0
  563. package/components/View/tests/View.stories.js +1015 -0
  564. package/components/_private/Flyout/Flyout.context.d.ts +6 -0
  565. package/components/_private/Flyout/Flyout.context.js +6 -0
  566. package/components/_private/Flyout/Flyout.d.ts +8 -0
  567. package/components/_private/Flyout/Flyout.js +14 -0
  568. package/components/_private/Flyout/Flyout.module.css +1 -0
  569. package/components/_private/Flyout/Flyout.types.d.ts +77 -0
  570. package/components/_private/Flyout/Flyout.types.js +1 -0
  571. package/components/_private/Flyout/FlyoutContent.d.ts +4 -0
  572. package/components/_private/Flyout/FlyoutContent.js +40 -0
  573. package/components/_private/Flyout/FlyoutControlled.d.ts +4 -0
  574. package/components/_private/Flyout/FlyoutControlled.js +214 -0
  575. package/components/_private/Flyout/FlyoutTrigger.d.ts +4 -0
  576. package/components/_private/Flyout/FlyoutTrigger.js +47 -0
  577. package/components/_private/Flyout/FlyoutUncontrolled.d.ts +4 -0
  578. package/components/_private/Flyout/FlyoutUncontrolled.js +19 -0
  579. package/components/_private/Flyout/index.d.ts +3 -0
  580. package/components/_private/Flyout/index.js +2 -0
  581. package/components/_private/Flyout/tests/Flyout.stories.d.ts +16 -0
  582. package/components/_private/Flyout/tests/Flyout.stories.js +133 -0
  583. package/components/_private/HiddenInput/HiddenInput.d.ts +4 -0
  584. package/components/_private/HiddenInput/HiddenInput.js +9 -0
  585. package/components/_private/HiddenInput/HiddenInput.module.css +1 -0
  586. package/components/_private/HiddenInput/HiddenInput.types.d.ts +15 -0
  587. package/components/_private/HiddenInput/HiddenInput.types.js +1 -0
  588. package/components/_private/HiddenInput/index.d.ts +2 -0
  589. package/components/_private/HiddenInput/index.js +1 -0
  590. package/components/_private/Portal/Portal.d.ts +9 -0
  591. package/components/_private/Portal/Portal.js +21 -0
  592. package/components/_private/Portal/Portal.types.d.ts +6 -0
  593. package/components/_private/Portal/Portal.types.js +1 -0
  594. package/components/_private/Portal/index.d.ts +2 -0
  595. package/components/_private/Portal/index.js +1 -0
  596. package/components/_private/Portal/tests/Portal.stories.d.ts +6 -0
  597. package/components/_private/Portal/tests/Portal.stories.js +18 -0
  598. package/config/next.d.ts +5 -0
  599. package/config/next.js +8 -0
  600. package/config/postcss.d.ts +13 -0
  601. package/config/postcss.js +19 -0
  602. package/config/tailwind.d.ts +2 -0
  603. package/config/tailwind.js +91 -0
  604. package/constants/attributes.d.ts +2 -0
  605. package/constants/attributes.js +2 -0
  606. package/constants/keys.d.ts +10 -0
  607. package/constants/keys.js +10 -0
  608. package/constants/timeouts.d.ts +2 -0
  609. package/constants/timeouts.js +2 -0
  610. package/hooks/_private/useFlyout.d.ts +27 -0
  611. package/hooks/_private/useFlyout.js +269 -0
  612. package/hooks/_private/useIsDismissible.d.ts +8 -0
  613. package/hooks/_private/useIsDismissible.js +45 -0
  614. package/hooks/_private/useOnClickOutside.d.ts +3 -0
  615. package/hooks/_private/useOnClickOutside.js +29 -0
  616. package/hooks/_private/useSingletonEnvironment.d.ts +9 -0
  617. package/hooks/_private/useSingletonEnvironment.js +33 -0
  618. package/hooks/_private/useSingletonHotkeys.d.ts +34 -0
  619. package/hooks/_private/useSingletonHotkeys.js +191 -0
  620. package/hooks/_private/useSingletonKeyboardMode.d.ts +2 -0
  621. package/hooks/_private/useSingletonKeyboardMode.js +21 -0
  622. package/hooks/tests/useHotkeys.stories.d.ts +6 -0
  623. package/hooks/tests/useHotkeys.stories.js +25 -0
  624. package/hooks/tests/useResponsiveClientValue.stories.d.ts +6 -0
  625. package/hooks/tests/useResponsiveClientValue.stories.js +13 -0
  626. package/hooks/useElementId.d.ts +2 -0
  627. package/hooks/useElementId.js +8 -0
  628. package/hooks/useHotkeys.d.ts +8 -0
  629. package/hooks/useHotkeys.js +15 -0
  630. package/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  631. package/hooks/useIsomorphicLayoutEffect.js +4 -0
  632. package/hooks/useRTL.d.ts +2 -0
  633. package/hooks/useRTL.js +7 -0
  634. package/hooks/useResponsiveClientValue.d.ts +3 -0
  635. package/hooks/useResponsiveClientValue.js +43 -0
  636. package/hooks/useScrollLock.d.ts +6 -0
  637. package/hooks/useScrollLock.js +44 -0
  638. package/hooks/useToggle.d.ts +7 -0
  639. package/hooks/useToggle.js +16 -0
  640. package/icons/ArrowUpRight.d.ts +3 -0
  641. package/icons/ArrowUpRight.js +7 -0
  642. package/icons/Checkmark.d.ts +3 -0
  643. package/icons/Checkmark.js +6 -0
  644. package/icons/ChevronDown.d.ts +3 -0
  645. package/icons/ChevronDown.js +6 -0
  646. package/icons/ChevronLeft.d.ts +3 -0
  647. package/icons/ChevronLeft.js +6 -0
  648. package/icons/ChevronRight.d.ts +3 -0
  649. package/icons/ChevronRight.js +6 -0
  650. package/icons/ChevronVertical.d.ts +3 -0
  651. package/icons/ChevronVertical.js +5 -0
  652. package/icons/Close.d.ts +3 -0
  653. package/icons/Close.js +7 -0
  654. package/icons/DotsHorizontal.d.ts +3 -0
  655. package/icons/DotsHorizontal.js +6 -0
  656. package/icons/Mic.d.ts +3 -0
  657. package/icons/Mic.js +9 -0
  658. package/icons/Zap.d.ts +3 -0
  659. package/icons/Zap.js +6 -0
  660. package/index.d.ts +120 -0
  661. package/index.js +68 -0
  662. package/package.json +155 -4
  663. package/styles/aspectRatio/aspectRatio.module.css +1 -0
  664. package/styles/aspectRatio/index.d.ts +3 -0
  665. package/styles/aspectRatio/index.js +9 -0
  666. package/styles/aspectRatio/index.test.d.ts +1 -0
  667. package/styles/aspectRatio/index.test.js +24 -0
  668. package/styles/bleed/bleed.module.css +1 -0
  669. package/styles/bleed/index.d.ts +3 -0
  670. package/styles/bleed/index.js +13 -0
  671. package/styles/bleed/index.test.d.ts +1 -0
  672. package/styles/bleed/index.test.js +24 -0
  673. package/styles/height/height.module.css +1 -0
  674. package/styles/height/index.d.ts +3 -0
  675. package/styles/height/index.js +10 -0
  676. package/styles/height/index.test.d.ts +1 -0
  677. package/styles/height/index.test.js +27 -0
  678. package/styles/inset/index.d.ts +4 -0
  679. package/styles/inset/index.js +14 -0
  680. package/styles/inset/index.test.d.ts +1 -0
  681. package/styles/inset/index.test.js +27 -0
  682. package/styles/inset/inset.module.css +1 -0
  683. package/styles/maxHeight/index.d.ts +3 -0
  684. package/styles/maxHeight/index.js +10 -0
  685. package/styles/maxHeight/index.test.d.ts +1 -0
  686. package/styles/maxHeight/index.test.js +27 -0
  687. package/styles/maxHeight/maxHeight.module.css +1 -0
  688. package/styles/maxWidth/index.d.ts +3 -0
  689. package/styles/maxWidth/index.js +10 -0
  690. package/styles/maxWidth/index.test.d.ts +1 -0
  691. package/styles/maxWidth/index.test.js +27 -0
  692. package/styles/maxWidth/maxWidth.module.css +1 -0
  693. package/styles/padding/index.d.ts +3 -0
  694. package/styles/padding/index.js +9 -0
  695. package/styles/padding/index.test.d.ts +1 -0
  696. package/styles/padding/index.test.js +24 -0
  697. package/styles/padding/padding.module.css +1 -0
  698. package/styles/position/index.d.ts +3 -0
  699. package/styles/position/index.js +9 -0
  700. package/styles/position/index.test.d.ts +1 -0
  701. package/styles/position/index.test.js +21 -0
  702. package/styles/position/position.module.css +1 -0
  703. package/styles/radius/index.d.ts +3 -0
  704. package/styles/radius/index.js +10 -0
  705. package/styles/radius/index.test.d.ts +1 -0
  706. package/styles/radius/index.test.js +24 -0
  707. package/styles/radius/radius.module.css +1 -0
  708. package/styles/types.d.ts +19 -0
  709. package/styles/types.js +1 -0
  710. package/styles/width/index.d.ts +3 -0
  711. package/styles/width/index.js +10 -0
  712. package/styles/width/index.test.d.ts +1 -0
  713. package/styles/width/index.test.js +27 -0
  714. package/styles/width/width.module.css +1 -0
  715. package/themes/figma/theme.css +1 -0
  716. package/themes/fragments/twitter/theme.css +1 -0
  717. package/themes/media.css +5 -0
  718. package/themes/minimal/theme.css +1 -0
  719. package/themes/reshaped/theme.css +1 -0
  720. package/themes/slate/theme.css +1 -0
  721. package/types/config.d.ts +8 -0
  722. package/types/config.js +2 -0
  723. package/types/global.d.ts +29 -0
  724. package/types/global.js +1 -0
  725. package/utilities/Chain.d.ts +20 -0
  726. package/utilities/Chain.js +63 -0
  727. package/utilities/a11y.d.ts +36 -0
  728. package/utilities/a11y.js +175 -0
  729. package/utilities/animation.d.ts +4 -0
  730. package/utilities/animation.js +15 -0
  731. package/utilities/helpers.d.ts +16 -0
  732. package/utilities/helpers.js +130 -0
  733. package/utilities/storybook/Example.d.ts +13 -0
  734. package/utilities/storybook/Example.js +19 -0
  735. package/utilities/storybook/Example.module.css +1 -0
  736. package/utilities/storybook/Placeholder.d.ts +9 -0
  737. package/utilities/storybook/Placeholder.js +17 -0
  738. package/utilities/storybook/index.d.ts +2 -0
  739. package/utilities/storybook/index.js +2 -0
  740. package/utilities/testPresets.d.ts +25 -0
  741. package/utilities/testPresets.js +76 -0
  742. package/utilities/tests/Chain.test.d.ts +1 -0
  743. package/utilities/tests/Chain.test.js +45 -0
  744. package/README.md +0 -1
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ const useOnClickOutside = (refs, handler) => {
3
+ React.useEffect(() => {
4
+ if (!handler)
5
+ return;
6
+ const handleClick = (event) => {
7
+ let isInside = false;
8
+ refs.forEach((elRef) => {
9
+ if (!elRef.current ||
10
+ elRef.current === event.target ||
11
+ elRef.current.contains(event.target)) {
12
+ isInside = true;
13
+ }
14
+ });
15
+ if (isInside)
16
+ return;
17
+ handler(event);
18
+ };
19
+ // Using events that happen before click to handle cases when element is hidden on click
20
+ document.addEventListener("mousedown", handleClick);
21
+ document.addEventListener("touchstart", handleClick);
22
+ return () => {
23
+ document.removeEventListener("mousedown", handleClick);
24
+ document.removeEventListener("touchstart", handleClick);
25
+ };
26
+ // eslint-disable-next-line react-hooks/exhaustive-deps
27
+ }, [handler, ...refs]);
28
+ };
29
+ export default useOnClickOutside;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import type * as G from "../../types/global";
3
+ type Context = {
4
+ rtl: [boolean, (state: boolean) => void];
5
+ defaultViewport: G.Viewport;
6
+ };
7
+ export declare const SingletonEnvironmentContext: React.Context<Context>;
8
+ export declare const useSingletonRTL: (defaultRTL?: boolean) => [boolean, React.Dispatch<React.SetStateAction<boolean>>];
9
+ export {};
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ import useIsomorphicLayoutEffect from "../useIsomorphicLayoutEffect.js";
3
+ export const SingletonEnvironmentContext = React.createContext({
4
+ rtl: [false, () => { }],
5
+ defaultViewport: "s",
6
+ });
7
+ export const useSingletonRTL = (defaultRTL) => {
8
+ const state = React.useState(defaultRTL || false);
9
+ const [isRTL, setRTL] = state;
10
+ /**
11
+ * Handle changing dir attribute directly
12
+ */
13
+ useIsomorphicLayoutEffect(() => {
14
+ const observer = new MutationObserver((mutations) => {
15
+ mutations.forEach((mutation) => {
16
+ if (mutation.attributeName !== "dir")
17
+ return;
18
+ const nextRTL = mutation.target.dir === "rtl";
19
+ if (isRTL !== nextRTL)
20
+ setRTL(nextRTL);
21
+ });
22
+ });
23
+ observer.observe(document.documentElement, { attributes: true });
24
+ return () => observer.disconnect();
25
+ }, [isRTL]);
26
+ /**
27
+ * Handle setRTL usage
28
+ */
29
+ useIsomorphicLayoutEffect(() => {
30
+ document.documentElement.setAttribute("dir", isRTL ? "rtl" : "ltr");
31
+ }, [isRTL]);
32
+ return state;
33
+ };
@@ -0,0 +1,34 @@
1
+ import React from "react";
2
+ /**
3
+ * Types
4
+ */
5
+ type Callback = (e: KeyboardEvent) => void;
6
+ type PressedKeys = Record<string, KeyboardEvent>;
7
+ type Hotkeys = Record<string, Callback | null>;
8
+ type Context = {
9
+ isPressed: (key: string) => boolean;
10
+ addHotkeys: (hotkeys: Hotkeys, ref: React.RefObject<HTMLElement | null>) => (() => void) | undefined;
11
+ };
12
+ export declare class HotkeyStore {
13
+ hotkeyMap: Record<string, {
14
+ data: Set<{
15
+ callback: Callback;
16
+ ref: React.RefObject<HTMLElement | null>;
17
+ }>;
18
+ used: boolean;
19
+ }>;
20
+ getSize: () => number;
21
+ bindHotkeys: (hotkeys: Hotkeys, ref: React.RefObject<HTMLElement | null>) => void;
22
+ unbindHotkeys: (hotkeys: Hotkeys) => void;
23
+ handleKeyDown: (pressedMap: PressedKeys, e: KeyboardEvent) => void;
24
+ handleKeyUp: (e: KeyboardEvent) => void;
25
+ }
26
+ /**
27
+ * Components / Hooks
28
+ */
29
+ export declare const HotkeyContext: React.Context<Context>;
30
+ export declare const SingletonHotkeysProvider: (props: {
31
+ children: React.ReactNode;
32
+ }) => React.JSX.Element;
33
+ declare const useSingletonHotkeys: () => Context;
34
+ export default useSingletonHotkeys;
@@ -0,0 +1,191 @@
1
+ import React from "react";
2
+ /**
3
+ * Utilities
4
+ */
5
+ const COMBINATION_DELIMETER = "+";
6
+ const pressedMap = {};
7
+ const modifiedKeys = [];
8
+ const formatHotkey = (hotkey) => {
9
+ if (hotkey === " ")
10
+ return hotkey;
11
+ return hotkey.replace(/\s/g, "").toLowerCase();
12
+ };
13
+ // Normalize passed key combinations to turn them into a consistent ids
14
+ const getHotkeyId = (hotkey) => {
15
+ return formatHotkey(hotkey).split(COMBINATION_DELIMETER).sort().join(COMBINATION_DELIMETER);
16
+ };
17
+ const getEventKey = (e) => {
18
+ // Having alt pressed modifies e.key value, so relying on e.code for it
19
+ if (e.altKey && e.key !== "Alt") {
20
+ return e.code.toLowerCase().replace(/key|digit|numpad/, "");
21
+ }
22
+ return e.key.toLowerCase();
23
+ };
24
+ const getCombinations = (pressedKeys) => {
25
+ const result = [];
26
+ const hotkey = pressedKeys.join(COMBINATION_DELIMETER);
27
+ const id = getHotkeyId(hotkey);
28
+ const sortedKeys = id.split(COMBINATION_DELIMETER);
29
+ const f = (prefix, items) => {
30
+ items.forEach((item, i) => {
31
+ const nextId = prefix ? `${prefix}+${item}` : item;
32
+ result.push(nextId);
33
+ f(nextId, items.slice(i + 1));
34
+ });
35
+ };
36
+ f("", sortedKeys);
37
+ return result;
38
+ };
39
+ const walkPressedCombinations = (pressed, cb) => {
40
+ const pressedKeys = Object.keys(pressed);
41
+ if (!pressedKeys.length)
42
+ return;
43
+ getCombinations(pressedKeys).forEach((pressedId) => {
44
+ cb(pressedId);
45
+ });
46
+ };
47
+ const walkHotkeys = (hotkeys, cb) => {
48
+ Object.keys(hotkeys).forEach((key) => {
49
+ key.split(",").forEach((hotkey) => {
50
+ const data = hotkeys[key];
51
+ if (!data)
52
+ return;
53
+ cb(getHotkeyId(hotkey), data);
54
+ });
55
+ });
56
+ };
57
+ export class HotkeyStore {
58
+ constructor() {
59
+ this.hotkeyMap = {};
60
+ this.getSize = () => Object.keys(this.hotkeyMap).length;
61
+ this.bindHotkeys = (hotkeys, ref) => {
62
+ walkHotkeys(hotkeys, (id, hotkeyData) => {
63
+ if (!hotkeyData)
64
+ return;
65
+ if (!this.hotkeyMap[id]) {
66
+ this.hotkeyMap[id] = { data: new Set(), used: false };
67
+ }
68
+ this.hotkeyMap[id].data.add({ callback: hotkeyData, ref });
69
+ });
70
+ };
71
+ this.unbindHotkeys = (hotkeys) => {
72
+ walkHotkeys(hotkeys, (id, hotkeyCallback) => {
73
+ var _a, _b;
74
+ if (!hotkeyCallback)
75
+ return;
76
+ (_a = this.hotkeyMap[id]) === null || _a === void 0 ? void 0 : _a.data.forEach((data) => {
77
+ if (data.callback === hotkeyCallback) {
78
+ this.hotkeyMap[id].data.delete(data);
79
+ }
80
+ });
81
+ if (!((_b = this.hotkeyMap[id]) === null || _b === void 0 ? void 0 : _b.data.size)) {
82
+ delete this.hotkeyMap[id];
83
+ }
84
+ });
85
+ };
86
+ this.handleKeyDown = (pressedMap, e) => {
87
+ walkPressedCombinations(pressedMap, (pressedId) => {
88
+ const hotkeyData = this.hotkeyMap[pressedId];
89
+ if (!hotkeyData || hotkeyData.used)
90
+ return;
91
+ if (hotkeyData === null || hotkeyData === void 0 ? void 0 : hotkeyData.data.size) {
92
+ hotkeyData.data.forEach((data) => {
93
+ var _a;
94
+ if (((_a = data.ref) === null || _a === void 0 ? void 0 : _a.current) &&
95
+ !(e.target === data.ref.current || data.ref.current.contains(e.target))) {
96
+ return;
97
+ }
98
+ data.callback(pressedMap[pressedId]);
99
+ this.hotkeyMap[pressedId].used = true;
100
+ });
101
+ }
102
+ });
103
+ };
104
+ this.handleKeyUp = (e) => {
105
+ const id = getHotkeyId(e.key);
106
+ walkHotkeys(this.hotkeyMap, (hotkeyId, data) => {
107
+ const hotkeyIds = hotkeyId.split(COMBINATION_DELIMETER);
108
+ if (hotkeyIds.includes(id))
109
+ data.used = false;
110
+ });
111
+ };
112
+ }
113
+ }
114
+ const globalHotkeyStore = new HotkeyStore();
115
+ /**
116
+ * Components / Hooks
117
+ */
118
+ export const HotkeyContext = React.createContext({});
119
+ export const SingletonHotkeysProvider = (props) => {
120
+ const { children } = props;
121
+ // eslint-disable-next-line
122
+ const [_, setTriggerCount] = React.useState(0);
123
+ // Only handle key presses when there is at least one hook listening for hotkeys
124
+ const [hooksCount, setHooksCount] = React.useState(0);
125
+ const addPressedKey = React.useCallback((e) => {
126
+ if (e.repeat || hooksCount === 0)
127
+ return;
128
+ const eventKey = getEventKey(e);
129
+ pressedMap[eventKey] = e;
130
+ if (eventKey === "meta" || eventKey === "control") {
131
+ pressedMap.mod = e;
132
+ }
133
+ setTriggerCount(Object.keys(pressedMap).length);
134
+ // Key up won't trigger for other keys while Meta is pressed so we need to cache them
135
+ // and remove on Meta keyup
136
+ if (eventKey === "meta") {
137
+ modifiedKeys.push(...Object.keys(pressedMap));
138
+ }
139
+ if (pressedMap.Meta) {
140
+ modifiedKeys.push(eventKey);
141
+ }
142
+ }, [hooksCount]);
143
+ const removePressedKey = React.useCallback((e) => {
144
+ if (hooksCount === 0)
145
+ return;
146
+ const eventKey = getEventKey(e);
147
+ delete pressedMap[eventKey];
148
+ if (eventKey === "meta" || eventKey === "control") {
149
+ delete pressedMap.mod;
150
+ }
151
+ if (eventKey === "meta") {
152
+ modifiedKeys.forEach((key) => {
153
+ delete pressedMap[key];
154
+ });
155
+ }
156
+ setTriggerCount(Object.keys(pressedMap).length);
157
+ }, [hooksCount]);
158
+ const isPressed = (hotkey) => {
159
+ const keys = formatHotkey(hotkey).split(COMBINATION_DELIMETER);
160
+ if (keys.some((key) => !pressedMap[key]))
161
+ return false;
162
+ return true;
163
+ };
164
+ const addHotkeys = React.useCallback((hotkeys, ref) => {
165
+ setHooksCount((prev) => prev + 1);
166
+ globalHotkeyStore.bindHotkeys(hotkeys, ref);
167
+ return () => {
168
+ setHooksCount((prev) => prev - 1);
169
+ globalHotkeyStore.unbindHotkeys(hotkeys);
170
+ };
171
+ }, []);
172
+ const handleWindowKeyDown = React.useCallback((e) => {
173
+ addPressedKey(e);
174
+ globalHotkeyStore.handleKeyDown(pressedMap, e);
175
+ }, [addPressedKey]);
176
+ const handleWindowKeyUp = React.useCallback((e) => {
177
+ removePressedKey(e);
178
+ globalHotkeyStore.handleKeyUp(e);
179
+ }, [removePressedKey]);
180
+ React.useEffect(() => {
181
+ window.addEventListener("keydown", handleWindowKeyDown);
182
+ window.addEventListener("keyup", handleWindowKeyUp);
183
+ return () => {
184
+ window.removeEventListener("keydown", handleWindowKeyDown);
185
+ window.removeEventListener("keyup", handleWindowKeyUp);
186
+ };
187
+ }, [handleWindowKeyDown, handleWindowKeyUp]);
188
+ return (React.createElement(HotkeyContext.Provider, { value: { addHotkeys, isPressed } }, children));
189
+ };
190
+ const useSingletonHotkeys = () => React.useContext(HotkeyContext);
191
+ export default useSingletonHotkeys;
@@ -0,0 +1,2 @@
1
+ declare const useSingletonKeyboardMode: () => void;
2
+ export default useSingletonKeyboardMode;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { keyboardModeAttribute } from "../../constants/attributes.js";
3
+ const useSingletonKeyboardMode = () => {
4
+ React.useEffect(() => {
5
+ const handleKeyDown = (e) => {
6
+ if (e.metaKey || e.altKey || e.ctrlKey)
7
+ return;
8
+ document.documentElement.setAttribute(keyboardModeAttribute, "true");
9
+ };
10
+ const handleClick = () => {
11
+ document.documentElement.removeAttribute(keyboardModeAttribute);
12
+ };
13
+ window.addEventListener("keydown", handleKeyDown);
14
+ window.addEventListener("mousedown", handleClick);
15
+ return () => {
16
+ window.removeEventListener("keydown", handleKeyDown);
17
+ window.removeEventListener("mousedown", handleClick);
18
+ };
19
+ }, []);
20
+ };
21
+ export default useSingletonKeyboardMode;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const state: () => React.JSX.Element;
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import useHotkeys from "../useHotkeys.js";
3
+ import View from "../../components/View/index.js";
4
+ export default { title: "Hooks/useHotkeys" };
5
+ function Example() {
6
+ const { checkHotkeyState } = useHotkeys({
7
+ "shift + b + n": null,
8
+ });
9
+ const active = checkHotkeyState("shift + b + n");
10
+ const shiftActive = checkHotkeyState("shift");
11
+ const bActive = checkHotkeyState("b");
12
+ const nActive = checkHotkeyState("n");
13
+ return (<View animated gap={2} direction="row" backgroundColor={active ? "positive-faded" : undefined} padding={2} borderRadius="small">
14
+ <View paddingInline={4} paddingBlock={2} borderRadius="small" borderColor="neutral-faded" animated backgroundColor={shiftActive ? "neutral-faded" : "elevation-raised"} shadow={shiftActive ? undefined : "raised"}>
15
+ Shift
16
+ </View>
17
+ <View paddingInline={4} paddingBlock={2} borderRadius="small" borderColor="neutral-faded" animated backgroundColor={bActive ? "neutral-faded" : "elevation-raised"} shadow={bActive ? undefined : "raised"}>
18
+ b
19
+ </View>
20
+ <View paddingInline={4} paddingBlock={2} borderRadius="small" borderColor="neutral-faded" animated backgroundColor={nActive ? "neutral-faded" : "elevation-raised"} shadow={nActive ? undefined : "raised"}>
21
+ n
22
+ </View>
23
+ </View>);
24
+ }
25
+ export const state = () => <Example />;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const state: () => React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import useResponsiveClientValue from "../useResponsiveClientValue.js";
3
+ import View from "../../components/View/index.js";
4
+ export default { title: "Hooks/useResponsiveClientValue" };
5
+ function Example() {
6
+ const value = useResponsiveClientValue({
7
+ s: "neutral",
8
+ m: "critical",
9
+ l: "positive",
10
+ });
11
+ return <View width={25} height={25} backgroundColor={value}/>;
12
+ }
13
+ export const state = () => <Example />;
@@ -0,0 +1,2 @@
1
+ declare const useElementId: (id?: string) => string;
2
+ export default useElementId;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ const useElementId = (id) => {
3
+ const generatedId = React.useId();
4
+ if (id)
5
+ return id;
6
+ return generatedId;
7
+ };
8
+ export default useElementId;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ declare const useHotkeys: <Element_1 extends HTMLElement>(hotkeys: Record<string, ((e: KeyboardEvent) => void) | null>, deps?: unknown[], options?: {
3
+ ref?: React.RefObject<Element_1> | undefined;
4
+ } | undefined) => {
5
+ ref: React.RefObject<Element_1>;
6
+ checkHotkeyState: (key: string) => boolean;
7
+ };
8
+ export default useHotkeys;
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import React from "react";
3
+ import useSingletonHotkey from "./_private/useSingletonHotkeys.js";
4
+ const useHotkeys = (hotkeys, deps = [], options) => {
5
+ const { addHotkeys, isPressed } = useSingletonHotkey();
6
+ const generatedRef = React.useRef(null);
7
+ const elementRef = (options === null || options === void 0 ? void 0 : options.ref) || generatedRef;
8
+ React.useEffect(() => {
9
+ const remove = addHotkeys(hotkeys, elementRef);
10
+ return () => remove === null || remove === void 0 ? void 0 : remove();
11
+ // eslint-disable-next-line react-hooks/exhaustive-deps
12
+ }, [addHotkeys, Object.keys(hotkeys).join(","), ...deps]);
13
+ return { ref: elementRef, checkHotkeyState: isPressed };
14
+ };
15
+ export default useHotkeys;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const useIsomorphicLayoutEffect: typeof React.useEffect;
3
+ export default useIsomorphicLayoutEffect;
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ import React from "react";
3
+ const useIsomorphicLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
4
+ export default useIsomorphicLayoutEffect;
@@ -0,0 +1,2 @@
1
+ declare const useRTL: () => [boolean, (state: boolean) => void];
2
+ export default useRTL;
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import React from "react";
3
+ import { SingletonEnvironmentContext } from "./_private/useSingletonEnvironment.js";
4
+ const useRTL = () => {
5
+ return React.useContext(SingletonEnvironmentContext).rtl;
6
+ };
7
+ export default useRTL;
@@ -0,0 +1,3 @@
1
+ import type * as G from "../types/global";
2
+ declare const useResponsiveClientValue: <T extends unknown>(value: G.ResponsiveOnly<T>) => T | undefined;
3
+ export default useResponsiveClientValue;
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import React from "react";
3
+ import { SingletonEnvironmentContext } from "./_private/useSingletonEnvironment.js";
4
+ import useIsomorphicLayoutEffect from "./useIsomorphicLayoutEffect.js";
5
+ const breakpoints = {
6
+ m: 660,
7
+ l: 900,
8
+ xl: 1280,
9
+ };
10
+ const mediaQueries = {
11
+ s: `(max-width: ${breakpoints.m - 1}px)`,
12
+ m: `(min-width: ${breakpoints.m}px) and (max-width: ${breakpoints.l - 1}px)`,
13
+ l: `(min-width: ${breakpoints.l}px) and (max-width: ${breakpoints.xl - 1}px)`,
14
+ xl: `(min-width: ${breakpoints.xl}px)`,
15
+ };
16
+ const useResponsiveClientValue = (value) => {
17
+ const { defaultViewport } = React.useContext(SingletonEnvironmentContext);
18
+ const [viewport, setViewport] = React.useState(defaultViewport);
19
+ useIsomorphicLayoutEffect(() => {
20
+ const viewports = Object.keys(mediaQueries);
21
+ const matchers = viewports.map((viewport) => {
22
+ const mq = window.matchMedia(mediaQueries[viewport]);
23
+ return { mq, handler: () => mq.matches && setViewport(viewport) };
24
+ });
25
+ matchers.forEach(({ handler, mq }) => {
26
+ handler();
27
+ mq.addEventListener("change", handler);
28
+ });
29
+ return () => {
30
+ matchers.forEach(({ handler, mq }) => {
31
+ mq.removeEventListener("change", handler);
32
+ });
33
+ };
34
+ }, []);
35
+ if (viewport === "xl")
36
+ return value.xl || value.l || value.m || value.s;
37
+ if (viewport === "l")
38
+ return value.l || value.m || value.s;
39
+ if (viewport === "m")
40
+ return value.m || value.s;
41
+ return value.s;
42
+ };
43
+ export default useResponsiveClientValue;
@@ -0,0 +1,6 @@
1
+ declare const useScrollLock: () => {
2
+ scrollLocked: boolean;
3
+ lockScroll: () => void;
4
+ unlockScroll: () => void;
5
+ };
6
+ export default useScrollLock;
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import React from "react";
3
+ const getScrollbarWidth = (() => {
4
+ let scrollbarWidth;
5
+ return () => {
6
+ if (scrollbarWidth)
7
+ return scrollbarWidth;
8
+ const scrollDiv = document.createElement("div");
9
+ scrollDiv.style.position = "absolute";
10
+ scrollDiv.style.top = "-9999px";
11
+ scrollDiv.style.width = "50px";
12
+ scrollDiv.style.height = "50px";
13
+ scrollDiv.style.overflow = "scroll";
14
+ document.body.appendChild(scrollDiv);
15
+ scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
16
+ document.body.removeChild(scrollDiv);
17
+ return scrollbarWidth;
18
+ };
19
+ })();
20
+ const useScrollLock = () => {
21
+ const [locked, setLocked] = React.useState(false);
22
+ const overflowStyleRef = React.useRef();
23
+ const isOverflowingRef = React.useRef(false);
24
+ const lockScroll = React.useCallback(() => {
25
+ const { body } = document;
26
+ const rect = body.getBoundingClientRect();
27
+ isOverflowingRef.current = rect.left + rect.right < window.innerWidth;
28
+ overflowStyleRef.current = body.style.overflow;
29
+ body.style.overflow = "hidden";
30
+ if (isOverflowingRef.current) {
31
+ const scrollBarWidth = getScrollbarWidth();
32
+ document.body.style.paddingRight = `${scrollBarWidth}px`;
33
+ }
34
+ setLocked(true);
35
+ }, [setLocked, isOverflowingRef, overflowStyleRef]);
36
+ const unlockScroll = React.useCallback(() => {
37
+ document.body.style.overflow = overflowStyleRef.current || "";
38
+ if (isOverflowingRef.current)
39
+ document.body.style.paddingRight = "";
40
+ setLocked(false);
41
+ }, [setLocked, isOverflowingRef, overflowStyleRef]);
42
+ return { scrollLocked: locked, lockScroll, unlockScroll };
43
+ };
44
+ export default useScrollLock;
@@ -0,0 +1,7 @@
1
+ declare const useToggle: (defaultValue?: boolean) => {
2
+ active: boolean;
3
+ activate: () => void;
4
+ deactivate: () => void;
5
+ toggle: () => void;
6
+ };
7
+ export default useToggle;
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import React from "react";
3
+ const useToggle = (defaultValue) => {
4
+ const [active, setActive] = React.useState(defaultValue || false);
5
+ const activate = React.useCallback(() => {
6
+ setActive(true);
7
+ }, []);
8
+ const deactivate = React.useCallback(() => {
9
+ setActive(false);
10
+ }, []);
11
+ const toggle = React.useCallback(() => {
12
+ setActive((active) => !active);
13
+ }, []);
14
+ return { active, activate, deactivate, toggle };
15
+ };
16
+ export default useToggle;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const IconArrowUpRight: () => React.JSX.Element;
3
+ export default IconArrowUpRight;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ const IconArrowUpRight = () => {
3
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
4
+ React.createElement("line", { x1: "7", y1: "17", x2: "17", y2: "7" }),
5
+ React.createElement("polyline", { points: "7 7 17 7 17 17" })));
6
+ };
7
+ export default IconArrowUpRight;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const IconCheckmark: () => React.JSX.Element;
3
+ export default IconCheckmark;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ const IconCheckmark = () => {
3
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", stroke: "currentColor", fill: "none", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
4
+ React.createElement("polyline", { points: "20 6 9 17 4 12" })));
5
+ };
6
+ export default IconCheckmark;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const IconChevronDown: () => React.JSX.Element;
3
+ export default IconChevronDown;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ const IconChevronDown = () => {
3
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", stroke: "currentColor", fill: "none", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
4
+ React.createElement("polyline", { points: "6 9 12 15 18 9" })));
5
+ };
6
+ export default IconChevronDown;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const IconChevronLeft: () => React.JSX.Element;
3
+ export default IconChevronLeft;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ const IconChevronLeft = () => {
3
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
4
+ React.createElement("polyline", { points: "15 18 9 12 15 6" })));
5
+ };
6
+ export default IconChevronLeft;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const IconChevronRight: () => React.JSX.Element;
3
+ export default IconChevronRight;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ const IconChevronRight = () => {
3
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
4
+ React.createElement("polyline", { points: "9 18 15 12 9 6" })));
5
+ };
6
+ export default IconChevronRight;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const IconChevronVertical: () => React.JSX.Element;
3
+ export default IconChevronVertical;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ const IconChevronVertical = () => (React.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
3
+ React.createElement("path", { d: "M7 16L12 21L17 16", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
4
+ React.createElement("path", { d: "M17 8L12 3L7 8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })));
5
+ export default IconChevronVertical;