reshaped 1.0.1 → 2.1.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 (727) hide show
  1. package/CHANGELOG.md +5 -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 +118 -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 +561 -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/Switch/Switch.d.ts +4 -0
  430. package/components/Switch/Switch.js +31 -0
  431. package/components/Switch/Switch.module.css +1 -0
  432. package/components/Switch/Switch.types.d.ts +26 -0
  433. package/components/Switch/Switch.types.js +1 -0
  434. package/components/Switch/index.d.ts +2 -0
  435. package/components/Switch/index.js +1 -0
  436. package/components/Switch/tests/Switch.stories.d.ts +9 -0
  437. package/components/Switch/tests/Switch.stories.js +53 -0
  438. package/components/Tabs/Tabs.d.ts +16 -0
  439. package/components/Tabs/Tabs.js +16 -0
  440. package/components/Tabs/Tabs.module.css +1 -0
  441. package/components/Tabs/Tabs.types.d.ts +61 -0
  442. package/components/Tabs/Tabs.types.js +1 -0
  443. package/components/Tabs/TabsContext.d.ts +18 -0
  444. package/components/Tabs/TabsContext.js +19 -0
  445. package/components/Tabs/TabsControlled.d.ts +4 -0
  446. package/components/Tabs/TabsControlled.js +16 -0
  447. package/components/Tabs/TabsItem.d.ts +11 -0
  448. package/components/Tabs/TabsItem.js +31 -0
  449. package/components/Tabs/TabsList.d.ts +4 -0
  450. package/components/Tabs/TabsList.js +163 -0
  451. package/components/Tabs/TabsPanel.d.ts +4 -0
  452. package/components/Tabs/TabsPanel.js +13 -0
  453. package/components/Tabs/TabsUncontrolled.d.ts +4 -0
  454. package/components/Tabs/TabsUncontrolled.js +18 -0
  455. package/components/Tabs/index.d.ts +2 -0
  456. package/components/Tabs/index.js +1 -0
  457. package/components/Tabs/tests/Tabs.stories.d.ts +13 -0
  458. package/components/Tabs/tests/Tabs.stories.js +251 -0
  459. package/components/Text/Text.d.ts +4 -0
  460. package/components/Text/Text.js +24 -0
  461. package/components/Text/Text.module.css +1 -0
  462. package/components/Text/Text.types.d.ts +15 -0
  463. package/components/Text/Text.types.js +1 -0
  464. package/components/Text/index.d.ts +2 -0
  465. package/components/Text/index.js +1 -0
  466. package/components/Text/tests/Text.stories.d.ts +11 -0
  467. package/components/Text/tests/Text.stories.js +117 -0
  468. package/components/TextArea/TextArea.d.ts +4 -0
  469. package/components/TextArea/TextArea.js +25 -0
  470. package/components/TextArea/TextArea.module.css +1 -0
  471. package/components/TextArea/TextArea.types.d.ts +28 -0
  472. package/components/TextArea/TextArea.types.js +1 -0
  473. package/components/TextArea/index.d.ts +2 -0
  474. package/components/TextArea/index.js +1 -0
  475. package/components/TextArea/tests/TextArea.stories.d.ts +11 -0
  476. package/components/TextArea/tests/TextArea.stories.js +72 -0
  477. package/components/TextField/TextField.d.ts +4 -0
  478. package/components/TextField/TextField.js +47 -0
  479. package/components/TextField/TextField.module.css +1 -0
  480. package/components/TextField/TextField.types.d.ts +42 -0
  481. package/components/TextField/TextField.types.js +1 -0
  482. package/components/TextField/index.d.ts +2 -0
  483. package/components/TextField/index.js +1 -0
  484. package/components/TextField/tests/TextField.stories.d.ts +14 -0
  485. package/components/TextField/tests/TextField.stories.js +100 -0
  486. package/components/Theme/GlobalColorMode.d.ts +4 -0
  487. package/components/Theme/GlobalColorMode.js +31 -0
  488. package/components/Theme/Theme.context.d.ts +4 -0
  489. package/components/Theme/Theme.context.js +14 -0
  490. package/components/Theme/Theme.d.ts +4 -0
  491. package/components/Theme/Theme.js +39 -0
  492. package/components/Theme/Theme.module.css +1 -0
  493. package/components/Theme/Theme.types.d.ts +24 -0
  494. package/components/Theme/Theme.types.js +1 -0
  495. package/components/Theme/index.d.ts +4 -0
  496. package/components/Theme/index.js +3 -0
  497. package/components/Theme/tests/Theme.stories.d.ts +7 -0
  498. package/components/Theme/tests/Theme.stories.js +40 -0
  499. package/components/Theme/useTheme.d.ts +8 -0
  500. package/components/Theme/useTheme.js +18 -0
  501. package/components/Timeline/Timeline.d.ts +7 -0
  502. package/components/Timeline/Timeline.js +21 -0
  503. package/components/Timeline/Timeline.module.css +1 -0
  504. package/components/Timeline/Timeline.types.d.ts +13 -0
  505. package/components/Timeline/Timeline.types.js +1 -0
  506. package/components/Timeline/index.d.ts +2 -0
  507. package/components/Timeline/index.js +1 -0
  508. package/components/Timeline/tests/Timeline.stories.d.ts +7 -0
  509. package/components/Timeline/tests/Timeline.stories.js +55 -0
  510. package/components/Toast/Toast.constants.d.ts +10 -0
  511. package/components/Toast/Toast.constants.js +20 -0
  512. package/components/Toast/Toast.context.d.ts +4 -0
  513. package/components/Toast/Toast.context.js +5 -0
  514. package/components/Toast/Toast.d.ts +6 -0
  515. package/components/Toast/Toast.js +55 -0
  516. package/components/Toast/Toast.module.css +1 -0
  517. package/components/Toast/Toast.types.d.ts +77 -0
  518. package/components/Toast/Toast.types.js +1 -0
  519. package/components/Toast/ToastContainer.d.ts +4 -0
  520. package/components/Toast/ToastContainer.js +97 -0
  521. package/components/Toast/ToastProvider.d.ts +4 -0
  522. package/components/Toast/ToastProvider.js +80 -0
  523. package/components/Toast/ToastRegion.d.ts +4 -0
  524. package/components/Toast/ToastRegion.js +63 -0
  525. package/components/Toast/index.d.ts +3 -0
  526. package/components/Toast/index.js +2 -0
  527. package/components/Toast/tests/Toast.stories.d.ts +13 -0
  528. package/components/Toast/tests/Toast.stories.js +304 -0
  529. package/components/Toast/useToast.d.ts +5 -0
  530. package/components/Toast/useToast.js +8 -0
  531. package/components/Tooltip/Tooltip.d.ts +4 -0
  532. package/components/Tooltip/Tooltip.js +15 -0
  533. package/components/Tooltip/Tooltip.module.css +1 -0
  534. package/components/Tooltip/Tooltip.types.d.ts +5 -0
  535. package/components/Tooltip/Tooltip.types.js +1 -0
  536. package/components/Tooltip/index.d.ts +2 -0
  537. package/components/Tooltip/index.js +1 -0
  538. package/components/Tooltip/tests/Tooltip.stories.d.ts +7 -0
  539. package/components/Tooltip/tests/Tooltip.stories.js +58 -0
  540. package/components/View/View.d.ts +7 -0
  541. package/components/View/View.js +135 -0
  542. package/components/View/View.module.css +1 -0
  543. package/components/View/View.types.d.ts +64 -0
  544. package/components/View/View.types.js +1 -0
  545. package/components/View/index.d.ts +2 -0
  546. package/components/View/index.js +1 -0
  547. package/components/View/tests/View.stories.d.ts +32 -0
  548. package/components/View/tests/View.stories.js +1015 -0
  549. package/components/_private/Flyout/Flyout.context.d.ts +6 -0
  550. package/components/_private/Flyout/Flyout.context.js +6 -0
  551. package/components/_private/Flyout/Flyout.d.ts +8 -0
  552. package/components/_private/Flyout/Flyout.js +14 -0
  553. package/components/_private/Flyout/Flyout.module.css +1 -0
  554. package/components/_private/Flyout/Flyout.types.d.ts +77 -0
  555. package/components/_private/Flyout/Flyout.types.js +1 -0
  556. package/components/_private/Flyout/FlyoutContent.d.ts +4 -0
  557. package/components/_private/Flyout/FlyoutContent.js +40 -0
  558. package/components/_private/Flyout/FlyoutControlled.d.ts +4 -0
  559. package/components/_private/Flyout/FlyoutControlled.js +214 -0
  560. package/components/_private/Flyout/FlyoutTrigger.d.ts +4 -0
  561. package/components/_private/Flyout/FlyoutTrigger.js +47 -0
  562. package/components/_private/Flyout/FlyoutUncontrolled.d.ts +4 -0
  563. package/components/_private/Flyout/FlyoutUncontrolled.js +19 -0
  564. package/components/_private/Flyout/index.d.ts +3 -0
  565. package/components/_private/Flyout/index.js +2 -0
  566. package/components/_private/Flyout/tests/Flyout.stories.d.ts +16 -0
  567. package/components/_private/Flyout/tests/Flyout.stories.js +133 -0
  568. package/components/_private/HiddenInput/HiddenInput.d.ts +4 -0
  569. package/components/_private/HiddenInput/HiddenInput.js +9 -0
  570. package/components/_private/HiddenInput/HiddenInput.module.css +1 -0
  571. package/components/_private/HiddenInput/HiddenInput.types.d.ts +15 -0
  572. package/components/_private/HiddenInput/HiddenInput.types.js +1 -0
  573. package/components/_private/HiddenInput/index.d.ts +2 -0
  574. package/components/_private/HiddenInput/index.js +1 -0
  575. package/components/_private/Portal/Portal.d.ts +8 -0
  576. package/components/_private/Portal/Portal.js +21 -0
  577. package/components/_private/Portal/Portal.types.d.ts +6 -0
  578. package/components/_private/Portal/Portal.types.js +1 -0
  579. package/components/_private/Portal/index.d.ts +2 -0
  580. package/components/_private/Portal/index.js +1 -0
  581. package/components/_private/Portal/tests/Portal.stories.d.ts +6 -0
  582. package/components/_private/Portal/tests/Portal.stories.js +18 -0
  583. package/config/postcss.d.ts +13 -0
  584. package/config/postcss.js +19 -0
  585. package/config/tailwind.d.ts +2 -0
  586. package/config/tailwind.js +91 -0
  587. package/constants/attributes.d.ts +2 -0
  588. package/constants/attributes.js +2 -0
  589. package/constants/keys.d.ts +10 -0
  590. package/constants/keys.js +10 -0
  591. package/constants/timeouts.d.ts +2 -0
  592. package/constants/timeouts.js +2 -0
  593. package/hooks/_private/useFlyout.d.ts +27 -0
  594. package/hooks/_private/useFlyout.js +269 -0
  595. package/hooks/_private/useIsDismissible.d.ts +8 -0
  596. package/hooks/_private/useIsDismissible.js +45 -0
  597. package/hooks/_private/useOnClickOutside.d.ts +3 -0
  598. package/hooks/_private/useOnClickOutside.js +29 -0
  599. package/hooks/_private/useSingletonEnvironment.d.ts +9 -0
  600. package/hooks/_private/useSingletonEnvironment.js +33 -0
  601. package/hooks/_private/useSingletonHotkeys.d.ts +34 -0
  602. package/hooks/_private/useSingletonHotkeys.js +191 -0
  603. package/hooks/_private/useSingletonKeyboardMode.d.ts +2 -0
  604. package/hooks/_private/useSingletonKeyboardMode.js +21 -0
  605. package/hooks/tests/useHotkeys.stories.d.ts +6 -0
  606. package/hooks/tests/useHotkeys.stories.js +25 -0
  607. package/hooks/tests/useResponsiveClientValue.stories.d.ts +6 -0
  608. package/hooks/tests/useResponsiveClientValue.stories.js +13 -0
  609. package/hooks/useElementId.d.ts +2 -0
  610. package/hooks/useElementId.js +8 -0
  611. package/hooks/useHotkeys.d.ts +8 -0
  612. package/hooks/useHotkeys.js +15 -0
  613. package/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  614. package/hooks/useIsomorphicLayoutEffect.js +4 -0
  615. package/hooks/useRTL.d.ts +2 -0
  616. package/hooks/useRTL.js +7 -0
  617. package/hooks/useResponsiveClientValue.d.ts +3 -0
  618. package/hooks/useResponsiveClientValue.js +43 -0
  619. package/hooks/useScrollLock.d.ts +6 -0
  620. package/hooks/useScrollLock.js +44 -0
  621. package/hooks/useToggle.d.ts +7 -0
  622. package/hooks/useToggle.js +16 -0
  623. package/icons/ArrowUpRight.d.ts +3 -0
  624. package/icons/ArrowUpRight.js +7 -0
  625. package/icons/Checkmark.d.ts +3 -0
  626. package/icons/Checkmark.js +6 -0
  627. package/icons/ChevronDown.d.ts +3 -0
  628. package/icons/ChevronDown.js +6 -0
  629. package/icons/ChevronLeft.d.ts +3 -0
  630. package/icons/ChevronLeft.js +6 -0
  631. package/icons/ChevronRight.d.ts +3 -0
  632. package/icons/ChevronRight.js +6 -0
  633. package/icons/ChevronVertical.d.ts +3 -0
  634. package/icons/ChevronVertical.js +5 -0
  635. package/icons/Close.d.ts +3 -0
  636. package/icons/Close.js +7 -0
  637. package/icons/DotsHorizontal.d.ts +3 -0
  638. package/icons/DotsHorizontal.js +6 -0
  639. package/icons/Mic.d.ts +3 -0
  640. package/icons/Mic.js +9 -0
  641. package/icons/Zap.d.ts +3 -0
  642. package/icons/Zap.js +6 -0
  643. package/index.d.ts +118 -0
  644. package/index.js +67 -0
  645. package/package.json +141 -4
  646. package/styles/aspectRatio/aspectRatio.module.css +1 -0
  647. package/styles/aspectRatio/index.d.ts +3 -0
  648. package/styles/aspectRatio/index.js +9 -0
  649. package/styles/aspectRatio/index.test.d.ts +1 -0
  650. package/styles/aspectRatio/index.test.js +24 -0
  651. package/styles/bleed/bleed.module.css +1 -0
  652. package/styles/bleed/index.d.ts +3 -0
  653. package/styles/bleed/index.js +13 -0
  654. package/styles/bleed/index.test.d.ts +1 -0
  655. package/styles/bleed/index.test.js +24 -0
  656. package/styles/height/height.module.css +1 -0
  657. package/styles/height/index.d.ts +3 -0
  658. package/styles/height/index.js +10 -0
  659. package/styles/height/index.test.d.ts +1 -0
  660. package/styles/height/index.test.js +27 -0
  661. package/styles/inset/index.d.ts +4 -0
  662. package/styles/inset/index.js +14 -0
  663. package/styles/inset/index.test.d.ts +1 -0
  664. package/styles/inset/index.test.js +27 -0
  665. package/styles/inset/inset.module.css +1 -0
  666. package/styles/maxHeight/index.d.ts +3 -0
  667. package/styles/maxHeight/index.js +10 -0
  668. package/styles/maxHeight/index.test.d.ts +1 -0
  669. package/styles/maxHeight/index.test.js +27 -0
  670. package/styles/maxHeight/maxHeight.module.css +1 -0
  671. package/styles/maxWidth/index.d.ts +3 -0
  672. package/styles/maxWidth/index.js +10 -0
  673. package/styles/maxWidth/index.test.d.ts +1 -0
  674. package/styles/maxWidth/index.test.js +27 -0
  675. package/styles/maxWidth/maxWidth.module.css +1 -0
  676. package/styles/padding/index.d.ts +3 -0
  677. package/styles/padding/index.js +9 -0
  678. package/styles/padding/index.test.d.ts +1 -0
  679. package/styles/padding/index.test.js +24 -0
  680. package/styles/padding/padding.module.css +1 -0
  681. package/styles/position/index.d.ts +3 -0
  682. package/styles/position/index.js +9 -0
  683. package/styles/position/index.test.d.ts +1 -0
  684. package/styles/position/index.test.js +21 -0
  685. package/styles/position/position.module.css +1 -0
  686. package/styles/radius/index.d.ts +3 -0
  687. package/styles/radius/index.js +10 -0
  688. package/styles/radius/index.test.d.ts +1 -0
  689. package/styles/radius/index.test.js +24 -0
  690. package/styles/radius/radius.module.css +1 -0
  691. package/styles/types.d.ts +19 -0
  692. package/styles/types.js +1 -0
  693. package/styles/width/index.d.ts +3 -0
  694. package/styles/width/index.js +10 -0
  695. package/styles/width/index.test.d.ts +1 -0
  696. package/styles/width/index.test.js +27 -0
  697. package/styles/width/width.module.css +1 -0
  698. package/themes/figma/theme.css +1 -0
  699. package/themes/fragments/twitter/theme.css +1 -0
  700. package/themes/media.css +5 -0
  701. package/themes/minimal/theme.css +1 -0
  702. package/themes/reshaped/theme.css +1 -0
  703. package/themes/slate/theme.css +1 -0
  704. package/types/config.d.ts +8 -0
  705. package/types/config.js +2 -0
  706. package/types/global.d.ts +29 -0
  707. package/types/global.js +1 -0
  708. package/utilities/Chain.d.ts +20 -0
  709. package/utilities/Chain.js +63 -0
  710. package/utilities/a11y.d.ts +36 -0
  711. package/utilities/a11y.js +175 -0
  712. package/utilities/animation.d.ts +4 -0
  713. package/utilities/animation.js +15 -0
  714. package/utilities/helpers.d.ts +15 -0
  715. package/utilities/helpers.js +121 -0
  716. package/utilities/storybook/Example.d.ts +13 -0
  717. package/utilities/storybook/Example.js +19 -0
  718. package/utilities/storybook/Example.module.css +1 -0
  719. package/utilities/storybook/Placeholder.d.ts +9 -0
  720. package/utilities/storybook/Placeholder.js +17 -0
  721. package/utilities/storybook/index.d.ts +2 -0
  722. package/utilities/storybook/index.js +2 -0
  723. package/utilities/testPresets.d.ts +25 -0
  724. package/utilities/testPresets.js +76 -0
  725. package/utilities/tests/Chain.test.d.ts +1 -0
  726. package/utilities/tests/Chain.test.js +45 -0
  727. package/README.md +0 -1
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import React from "react";
3
+ import { classNames } from "../../utilities/helpers.js";
4
+ import { focusableSelector } from "../../utilities/a11y.js";
5
+ import ToastContainer from "./ToastContainer.js";
6
+ import ToastContext from "./Toast.context.js";
7
+ import s from "./Toast.module.css";
8
+ const ToastRegion = (props) => {
9
+ const { position } = props;
10
+ const { queues, options } = React.useContext(ToastContext);
11
+ const [inspecting, setInspecting] = React.useState(false);
12
+ const ignoreHoverRef = React.useRef(false);
13
+ const rootRef = React.useRef(null);
14
+ const queue = queues[position];
15
+ const { width, expanded } = (options === null || options === void 0 ? void 0 : options[position]) || {};
16
+ const regionClassNames = classNames(s.region, s[`region--position-${position}`]);
17
+ const filteredLength = queue.filter((item) => item.status === "entered").length;
18
+ let hiddenCount = 0;
19
+ // If touch event was triggered – ignore hover events
20
+ const handleTouchStart = () => {
21
+ ignoreHoverRef.current = true;
22
+ };
23
+ const handleClick = (e) => {
24
+ let currentEl = e.target;
25
+ let isFocusable = false;
26
+ while (currentEl && currentEl !== rootRef.current && !isFocusable) {
27
+ isFocusable = currentEl.matches(focusableSelector);
28
+ currentEl = currentEl.parentElement;
29
+ }
30
+ // Change inspecting mode when clicking on static content
31
+ if (!isFocusable) {
32
+ setInspecting((prevInspecting) => !prevInspecting);
33
+ }
34
+ // Click is called last so we reset our hover events ignore
35
+ ignoreHoverRef.current = false;
36
+ };
37
+ const handleMouseEnter = () => {
38
+ if (ignoreHoverRef.current)
39
+ return;
40
+ setInspecting(true);
41
+ };
42
+ const handleMouseLeave = () => {
43
+ if (ignoreHoverRef.current)
44
+ return;
45
+ setInspecting(false);
46
+ };
47
+ React.useEffect(() => {
48
+ if (queue.length === 0)
49
+ setInspecting(false);
50
+ }, [queue.length]);
51
+ if (!queue.length)
52
+ return null;
53
+ return (
54
+ // We only use onClick for touch devices since touchend is not supported
55
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
56
+ React.createElement("ul", { role: "region", "aria-live": "polite", className: regionClassNames, ref: rootRef, onTouchStart: handleTouchStart, onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, style: { width } }, queue.map((data, index) => {
57
+ const visibleIndex = filteredLength - index + hiddenCount - 1;
58
+ if (data.status !== "entered")
59
+ hiddenCount += 1;
60
+ return (React.createElement(ToastContainer, Object.assign({ key: data.id }, data, { index: visibleIndex, inspected: inspecting || !!expanded })));
61
+ })));
62
+ };
63
+ export default ToastRegion;
@@ -0,0 +1,3 @@
1
+ export { default as useToast } from "./useToast";
2
+ export { default as ToastProvider } from "./ToastProvider";
3
+ export type { Props as ToastProps, ProviderProps as ToastProviderProps } from "./Toast.types";
@@ -0,0 +1,2 @@
1
+ export { default as useToast } from "./useToast.js";
2
+ export { default as ToastProvider } from "./ToastProvider.js";
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const base: () => React.JSX.Element;
7
+ export declare const size: () => React.JSX.Element;
8
+ export declare const position: () => React.JSX.Element;
9
+ export declare const color: () => React.JSX.Element;
10
+ export declare const timeout: () => React.JSX.Element;
11
+ export declare const regionOptions: () => React.JSX.Element;
12
+ export declare const slots: () => React.JSX.Element;
13
+ export declare const edgeCases: () => React.JSX.Element;
@@ -0,0 +1,304 @@
1
+ import React from "react";
2
+ import { Example } from "../../../utilities/storybook/index.js";
3
+ import { useToast } from "../index.js";
4
+ import Button from "../../Button/index.js";
5
+ import View from "../../View/index.js";
6
+ import Image from "../../Image/index.js";
7
+ import Text from "../../Text/index.js";
8
+ import Dismissible from "../../Dismissible/index.js";
9
+ import IconZap from "../../../icons/Zap.js";
10
+ export default { title: "Components/Toast" };
11
+ const Base = () => {
12
+ const toast = useToast();
13
+ return (<Button onClick={() => {
14
+ const id = toast.show({
15
+ icon: IconZap,
16
+ title: "Hey!",
17
+ text: "Event completed",
18
+ actionsSlot: [
19
+ <Button onClick={() => toast.hide(id)}>Undo</Button>,
20
+ <Button onClick={() => toast.hide(id)}>Show</Button>,
21
+ ],
22
+ });
23
+ }}>
24
+ Show toast
25
+ </Button>);
26
+ };
27
+ export const base = () => (<Example>
28
+ <Example.Item title="title, children, icon, actions">
29
+ <Base />
30
+ </Example.Item>
31
+ </Example>);
32
+ const Size = () => {
33
+ const toast = useToast();
34
+ const props = {
35
+ icon: IconZap,
36
+ title: "Hey!",
37
+ text: "Event completed",
38
+ actionsSlot: [<Button>Action</Button>],
39
+ };
40
+ return (<Example>
41
+ <Example.Item title="size: small">
42
+ <Button onClick={() => {
43
+ toast.show(Object.assign({}, props));
44
+ }}>
45
+ Show toast
46
+ </Button>
47
+ </Example.Item>
48
+ <Example.Item title="size: medium">
49
+ <Button onClick={() => {
50
+ toast.show(Object.assign(Object.assign({}, props), { size: "medium" }));
51
+ }}>
52
+ Show toast
53
+ </Button>
54
+ </Example.Item>
55
+ <Example.Item title="large">
56
+ <Button onClick={() => {
57
+ toast.show(Object.assign(Object.assign({}, props), { size: "large" }));
58
+ }}>
59
+ Show toast
60
+ </Button>
61
+ </Example.Item>
62
+ </Example>);
63
+ };
64
+ export const size = () => <Size />;
65
+ const Position = () => {
66
+ const toast = useToast();
67
+ return (<Example>
68
+ <Example.Item title="position: bottom-start">
69
+ <Button onClick={() => {
70
+ const id = toast.show({
71
+ text: "Event completed",
72
+ position: "bottom-start",
73
+ actionsSlot: <Button onClick={() => toast.hide(id)}>Close</Button>,
74
+ });
75
+ }}>
76
+ Show toast
77
+ </Button>
78
+ </Example.Item>
79
+ <Example.Item title="position: bottom">
80
+ <Button onClick={() => {
81
+ toast.show({
82
+ text: "Event completed",
83
+ position: "bottom",
84
+ });
85
+ }}>
86
+ Show toast
87
+ </Button>
88
+ </Example.Item>
89
+ <Example.Item title="position: bottom-end">
90
+ <Button onClick={() => {
91
+ toast.show({
92
+ text: "Event completed",
93
+ position: "bottom-end",
94
+ });
95
+ }}>
96
+ Show toast
97
+ </Button>
98
+ </Example.Item>
99
+ <Example.Item title="position: top-start">
100
+ <Button onClick={() => {
101
+ toast.show({
102
+ text: "Event completed",
103
+ position: "top-start",
104
+ });
105
+ }}>
106
+ Show toast
107
+ </Button>
108
+ </Example.Item>
109
+ <Example.Item title="position: top">
110
+ <Button onClick={() => {
111
+ toast.show({
112
+ text: "Event completed",
113
+ position: "top",
114
+ });
115
+ }}>
116
+ Show toast
117
+ </Button>
118
+ </Example.Item>
119
+ <Example.Item title="position: top-end">
120
+ <Button onClick={() => {
121
+ toast.show({
122
+ text: "Event completed",
123
+ position: "top-end",
124
+ });
125
+ }}>
126
+ Show toast
127
+ </Button>
128
+ </Example.Item>
129
+ </Example>);
130
+ };
131
+ export const position = () => <Position />;
132
+ const Color = () => {
133
+ const toast = useToast();
134
+ return (<Example>
135
+ <Example.Item title="color: inverted">
136
+ <Button onClick={() => {
137
+ const id = toast.show({
138
+ text: "Event completed",
139
+ color: "inverted",
140
+ title: "Hey!",
141
+ icon: IconZap,
142
+ actionsSlot: [<Button onClick={() => toast.hide(id)}>Close</Button>],
143
+ });
144
+ }}>
145
+ Show toast
146
+ </Button>
147
+ </Example.Item>
148
+ <Example.Item title="color: neutral">
149
+ <Button onClick={() => {
150
+ const id = toast.show({
151
+ text: "Event completed",
152
+ color: "neutral",
153
+ title: "Hey!",
154
+ icon: IconZap,
155
+ actionsSlot: [<Button onClick={() => toast.hide(id)}>Close</Button>],
156
+ });
157
+ }}>
158
+ Show toast
159
+ </Button>
160
+ </Example.Item>
161
+ <Example.Item title="color: primary">
162
+ <Button onClick={() => {
163
+ const id = toast.show({
164
+ text: "Event completed",
165
+ color: "primary",
166
+ title: "Hey!",
167
+ icon: IconZap,
168
+ actionsSlot: [<Button onClick={() => toast.hide(id)}>Close</Button>],
169
+ });
170
+ }}>
171
+ Show toast
172
+ </Button>
173
+ </Example.Item>
174
+ <Example.Item title="color: positive">
175
+ <Button onClick={() => {
176
+ const id = toast.show({
177
+ text: "Event completed",
178
+ color: "positive",
179
+ title: "Hey!",
180
+ icon: IconZap,
181
+ actionsSlot: [<Button onClick={() => toast.hide(id)}>Close</Button>],
182
+ });
183
+ }}>
184
+ Show toast
185
+ </Button>
186
+ </Example.Item>
187
+ <Example.Item title="color: critical">
188
+ <Button onClick={() => {
189
+ const id = toast.show({
190
+ text: "Event completed",
191
+ color: "critical",
192
+ title: "Hey!",
193
+ icon: IconZap,
194
+ actionsSlot: [<Button onClick={() => toast.hide(id)}>Close</Button>],
195
+ });
196
+ }}>
197
+ Show toast
198
+ </Button>
199
+ </Example.Item>
200
+ </Example>);
201
+ };
202
+ export const color = () => <Color />;
203
+ const Timeout = () => {
204
+ const toast = useToast();
205
+ return (<Example>
206
+ <Example.Item title="timeout: short">
207
+ <Button onClick={() => {
208
+ toast.show({
209
+ text: "Event completed",
210
+ timeout: "short",
211
+ });
212
+ }}>
213
+ Show toast
214
+ </Button>
215
+ </Example.Item>
216
+ <Example.Item title="timeout: long">
217
+ <Button onClick={() => {
218
+ toast.show({
219
+ text: "Event completed",
220
+ timeout: "long",
221
+ });
222
+ }}>
223
+ Show toast
224
+ </Button>
225
+ </Example.Item>
226
+ <Example.Item title="timeout: 0">
227
+ <Button onClick={() => {
228
+ toast.show({
229
+ text: "Event completed",
230
+ timeout: 0,
231
+ });
232
+ }}>
233
+ Show toast
234
+ </Button>
235
+ </Example.Item>
236
+ </Example>);
237
+ };
238
+ export const timeout = () => <Timeout />;
239
+ const Expanded = () => {
240
+ const toast = useToast();
241
+ return (<Example>
242
+ <Example.Item title="Custom width coming from Reshaped provider for bottom-start">
243
+ <Button onClick={() => {
244
+ toast.show({
245
+ text: "Event completed",
246
+ position: "bottom-start",
247
+ });
248
+ }}>
249
+ Show toast
250
+ </Button>
251
+ </Example.Item>
252
+ </Example>);
253
+ };
254
+ export const regionOptions = () => <Expanded />;
255
+ const Slots = () => {
256
+ const toast = useToast();
257
+ return (<Example>
258
+ <Example.Item title="always expanded, promotion banner">
259
+ <Button onClick={() => {
260
+ const id = toast.show({
261
+ children: (<View gap={3} direction="row">
262
+ <View aspectRatio={1}>
263
+ <Image height="100px" src="https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80" borderRadius="medium"/>
264
+ </View>
265
+ <View.Item grow>
266
+ <View gap={1}>
267
+ <Dismissible closeAriaLabel="Close notification" onClose={() => toast.hide(id)}>
268
+ <Text variant="body-2" weight="bold">
269
+ Look at this gradient!
270
+ </Text>
271
+ </Dismissible>
272
+ <Text variant="body-3">
273
+ If you start using more gradients, your product will become even more
274
+ succesful.
275
+ </Text>
276
+ </View>
277
+ </View.Item>
278
+ </View>),
279
+ color: "neutral",
280
+ position: "bottom-start",
281
+ timeout: 0,
282
+ });
283
+ }}>
284
+ Show toast
285
+ </Button>
286
+ </Example.Item>
287
+ </Example>);
288
+ };
289
+ export const slots = () => <Slots />;
290
+ const Multiline = () => {
291
+ const toast = useToast();
292
+ return (<Example>
293
+ <Example.Item title="Multiline, should support dynamic height">
294
+ <Button onClick={() => {
295
+ toast.show({
296
+ text: "Very long event completed notification message",
297
+ });
298
+ }}>
299
+ Show toast
300
+ </Button>
301
+ </Example.Item>
302
+ </Example>);
303
+ };
304
+ export const edgeCases = () => <Multiline />;
@@ -0,0 +1,5 @@
1
+ declare const useToast: () => {
2
+ show: (toast: import("./Toast.types").Props & import("./Toast.types").ShowOptions) => string;
3
+ hide: (id: string) => void;
4
+ };
5
+ export default useToast;
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import React from "react";
3
+ import ToastContext from "./Toast.context.js";
4
+ const useToast = () => {
5
+ const { add, hide } = React.useContext(ToastContext);
6
+ return React.useMemo(() => ({ show: add, hide }), [add, hide]);
7
+ };
8
+ export default useToast;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type * as T from "./Tooltip.types";
3
+ declare const Tooltip: (props: T.Props) => React.JSX.Element;
4
+ export default Tooltip;
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import React from "react";
3
+ import Theme from "../Theme/index.js";
4
+ import Text from "../Text/index.js";
5
+ import Flyout from "../_private/Flyout/index.js";
6
+ import s from "./Tooltip.module.css";
7
+ const Tooltip = (props) => {
8
+ const { id, text, children, onOpen, onClose, position = "bottom", active } = props;
9
+ return (React.createElement(Flyout, { id: id, active: active, position: position, onOpen: onOpen, onClose: onClose, triggerType: "hover" },
10
+ React.createElement(Flyout.Trigger, null, children),
11
+ React.createElement(Flyout.Content, null,
12
+ React.createElement(Theme, { colorMode: "inverted" },
13
+ React.createElement(Text, { variant: "caption-1", className: s.root }, text)))));
14
+ };
15
+ export default Tooltip;
@@ -0,0 +1 @@
1
+ .root{background:var(--rs-color-background-elevation-overlay);border-radius:var(--rs-unit-radius-small);box-shadow:var(--rs-shadow-overlay);color:var(--rs-color-foreground-neutral);max-width:360px;padding:var(--rs-unit-x1) var(--rs-unit-x2)}
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import type { FlyoutProps, FlyoutTriggerProps } from "../_private/Flyout";
3
+ export type Props = Pick<FlyoutProps, "id" | "position" | "onOpen" | "onClose" | "active"> & Pick<FlyoutTriggerProps, "children"> & {
4
+ text: React.ReactNode;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default } from "./Tooltip";
2
+ export type { Props as TooltipProps } from "./Tooltip.types";
@@ -0,0 +1 @@
1
+ export { default } from "./Tooltip.js";
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const position: () => React.JSX.Element;
7
+ export declare const controlled: () => React.JSX.Element;
@@ -0,0 +1,58 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import React from "react";
13
+ import { Example } from "../../../utilities/storybook/index.js";
14
+ import Tooltip from "../index.js";
15
+ import Button from "../../Button/index.js";
16
+ import View from "../../View/index.js";
17
+ export default { title: "Components/Tooltip" };
18
+ const Demo = (props) => {
19
+ const { position } = props, rest = __rest(props, ["position"]);
20
+ return (<Tooltip text={position} position={position} {...rest}>
21
+ {(attributes) => <Button attributes={attributes}>Show tooltip</Button>}
22
+ </Tooltip>);
23
+ };
24
+ export const position = () => (<Example>
25
+ <Example.Item title="position: bottom-start">
26
+ <Demo position="bottom-start"/>
27
+ </Example.Item>
28
+ <Example.Item title="position: bottom">
29
+ <Demo position="bottom"/>
30
+ </Example.Item>
31
+ <Example.Item title="position: bottom-end">
32
+ <Demo position="bottom-end"/>
33
+ </Example.Item>
34
+ <Example.Item title="position: top-start">
35
+ <Demo position="top-start"/>
36
+ </Example.Item>
37
+ <Example.Item title="position: top">
38
+ <Demo position="top"/>
39
+ </Example.Item>
40
+ <Example.Item title="position: top-end">
41
+ <Demo position="top-end"/>
42
+ </Example.Item>
43
+
44
+ <Example.Item title="position: start">
45
+ <View align="end">
46
+ <Demo position="start"/>
47
+ </View>
48
+ </Example.Item>
49
+
50
+ <Example.Item title="position: end">
51
+ <Demo position="end"/>
52
+ </Example.Item>
53
+ </Example>);
54
+ export const controlled = () => (<Example>
55
+ <Example.Item title="active, controlled, position: bottom">
56
+ <Demo position="bottom" active/>
57
+ </Example.Item>
58
+ </Example>);
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import type * as T from "./View.types";
3
+ declare const View: {
4
+ <As extends keyof JSX.IntrinsicElements = "div">(props: T.Props<As>): React.JSX.Element;
5
+ Item: <As_1 extends keyof JSX.IntrinsicElements = "div">(props: T.ItemProps<As_1>) => React.JSX.Element;
6
+ };
7
+ export default View;
@@ -0,0 +1,135 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import React from "react";
13
+ import { classNames, responsiveClassNames, responsiveVariables } from "../../utilities/helpers.js";
14
+ import Divider from "../Divider/index.js";
15
+ import Hidden from "../Hidden/index.js";
16
+ import s from "./View.module.css";
17
+ import getRadiusStyles from "../../styles/radius/index.js";
18
+ import getBleedStyles from "../../styles/bleed/index.js";
19
+ import getWidthStyles from "../../styles/width/index.js";
20
+ import getHeightStyles from "../../styles/height/index.js";
21
+ import getMaxWidthStyles from "../../styles/maxWidth/index.js";
22
+ import getMaxHeightStyles from "../../styles/maxHeight/index.js";
23
+ import getPositionStyles from "../../styles/position/index.js";
24
+ import getInsetStyles from "../../styles/inset/index.js";
25
+ import getAspectRatioStyles from "../../styles/aspectRatio/index.js";
26
+ const ViewItem = (props) => {
27
+ const { columns, grow, gapBefore, as: TagName = "div", order, children, className, attributes, } = props;
28
+ const itemClassNames = classNames(s.item, className, gapBefore === "auto" && s["item--gap-auto"], gapBefore !== undefined && s["item--gap-before"], ...responsiveClassNames(s, "item--grow", grow), ...responsiveClassNames(s, "item--columns", columns));
29
+ const itemVariables = Object.assign(Object.assign({}, responsiveVariables("--rs-view-item-order", order)), responsiveVariables("--rs-view-item-gap-before", gapBefore));
30
+ return (React.createElement(TagName, Object.assign({}, attributes, { style: Object.assign(Object.assign({}, attributes === null || attributes === void 0 ? void 0 : attributes.style), itemVariables), className: itemClassNames }), children));
31
+ };
32
+ const View = (props) => {
33
+ const {
34
+ /**
35
+ * Layout props
36
+ */
37
+ align, justify, wrap, gap, height, width, aspectRatio, maxHeight, maxWidth, padding, paddingInline, paddingBlock, paddingBottom, paddingEnd, paddingStart, paddingTop, bleed,
38
+ /**
39
+ * Style props
40
+ * */
41
+ animated, backgroundColor, borderColor, borderRadius, shadow, textAlign, overflow, position = "relative", inset, insetTop, insetBottom, insetStart, insetEnd, zIndex,
42
+ /**
43
+ * Item prop
44
+ */
45
+ grow,
46
+ /**
47
+ * Using any here to let TS save on type resolving, otherwise TS throws an error due to the type complexity
48
+ * It still resolves the attributes correctly based on the tag
49
+ */
50
+ as: TagName = "div", children, divided, className, attributes, } = props;
51
+ const isFlex = !!align || !!justify || !!gap || !!props.direction;
52
+ const direction = props.direction || (isFlex ? "column" : undefined);
53
+ const radiusStyles = getRadiusStyles(borderRadius);
54
+ const bleedStyles = getBleedStyles(bleed);
55
+ const widthStyles = getWidthStyles(width);
56
+ const heightStyles = getHeightStyles(height);
57
+ const maxWidthStyles = getMaxWidthStyles(maxWidth);
58
+ const maxHeightStyles = getMaxHeightStyles(maxHeight);
59
+ const positionStyles = getPositionStyles(position);
60
+ const insetStyles = getInsetStyles(inset);
61
+ const insetTopStyles = getInsetStyles(insetTop, "top");
62
+ const insetBottomStyles = getInsetStyles(insetBottom, "bottom");
63
+ const insetStartStyles = getInsetStyles(insetStart, "start");
64
+ const insetEndStyles = getInsetStyles(insetEnd, "end");
65
+ const aspectRatioStyles = getAspectRatioStyles(aspectRatio);
66
+ let renderedItemIndex = 0;
67
+ // If wrap is not defined, it can be set based on item grow and split usage
68
+ let nowrap;
69
+ const renderDivider = ({ className, key }) => {
70
+ const dividerClassName = classNames(s.divider, className);
71
+ let isDividerVertical = false;
72
+ if (typeof direction === "string" && direction.startsWith("row")) {
73
+ isDividerVertical = true;
74
+ }
75
+ else if (direction) {
76
+ const viewports = Object.keys(direction);
77
+ isDividerVertical = viewports.reduce((acc, viewport) => {
78
+ const viewportDirection = direction[viewport];
79
+ if (!viewportDirection)
80
+ return acc;
81
+ return Object.assign(Object.assign({}, acc), { [viewport]: viewportDirection.startsWith("row") });
82
+ }, {});
83
+ }
84
+ return (React.createElement("div", { className: dividerClassName, key: `${key}-divider` },
85
+ React.createElement(Divider, { vertical: isDividerVertical, blank: true })));
86
+ };
87
+ const renderItem = ({ className, child, index }) => {
88
+ var _a, _b;
89
+ const isItem = child.type === ViewItem;
90
+ const key = child.key || index;
91
+ const dividerElement = !!index && divided && renderDivider({ className, key });
92
+ let itemElement;
93
+ if (isItem) {
94
+ itemElement = React.cloneElement(child, {
95
+ className: classNames(className, child.props.className),
96
+ });
97
+ }
98
+ else if (className || !React.isValidElement(child)) {
99
+ itemElement = (React.createElement("div", { className: className, key: key }, child));
100
+ }
101
+ else {
102
+ itemElement = child;
103
+ }
104
+ // Passing grow here because it's responsive and nowrap should follow it
105
+ if (isItem && ((_a = child.props) === null || _a === void 0 ? void 0 : _a.grow))
106
+ nowrap = child.props.grow;
107
+ if (isItem && ((_b = child.props) === null || _b === void 0 ? void 0 : _b.gap) === "auto")
108
+ nowrap = true;
109
+ return [dividerElement, itemElement];
110
+ };
111
+ const formattedChildren = React.Children.map(children, (child, index) => {
112
+ if (!child)
113
+ return null;
114
+ // Ignore the indices of the items that rendered nothing
115
+ const renderedIndex = renderedItemIndex;
116
+ renderedItemIndex += 1;
117
+ if (child.type === Hidden && typeof child.props.children !== "function") {
118
+ const _a = child.props, { children: hiddenChild } = _a, hiddenProps = __rest(_a, ["children"]);
119
+ const key = child.key || index;
120
+ return (React.createElement(Hidden, Object.assign({}, hiddenProps, { key: key }), (className) => renderItem({ className, child: hiddenChild, index: renderedIndex })));
121
+ }
122
+ return renderItem({ child, index: renderedIndex });
123
+ });
124
+ // Classnames and attributes are written here so we can assign nowrap to the root element based on the children
125
+ const rootClassNames = classNames(s.root, className, radiusStyles === null || radiusStyles === void 0 ? void 0 : radiusStyles.classNames, positionStyles === null || positionStyles === void 0 ? void 0 : positionStyles.classNames, bleedStyles === null || bleedStyles === void 0 ? void 0 : bleedStyles.classNames, widthStyles === null || widthStyles === void 0 ? void 0 : widthStyles.classNames, heightStyles === null || heightStyles === void 0 ? void 0 : heightStyles.classNames, aspectRatioStyles === null || aspectRatioStyles === void 0 ? void 0 : aspectRatioStyles.classNames, maxWidthStyles === null || maxWidthStyles === void 0 ? void 0 : maxWidthStyles.classNames, maxHeightStyles === null || maxHeightStyles === void 0 ? void 0 : maxHeightStyles.classNames, insetStyles === null || insetStyles === void 0 ? void 0 : insetStyles.classNames, insetTopStyles === null || insetTopStyles === void 0 ? void 0 : insetTopStyles.classNames, insetBottomStyles === null || insetBottomStyles === void 0 ? void 0 : insetBottomStyles.classNames, insetStartStyles === null || insetStartStyles === void 0 ? void 0 : insetStartStyles.classNames, insetEndStyles === null || insetEndStyles === void 0 ? void 0 : insetEndStyles.classNames, textAlign && s[`--align-text-${textAlign}`], backgroundColor && s[`--bg-${backgroundColor}`], borderColor && s[`--bd-${borderColor}`], borderColor && s["--bd"], shadow && s[`--shadow-${shadow}`], overflow && s[`--overflow-${overflow}`], animated && s["--animated"], divided && s["--divided"], (padding !== undefined || paddingInline !== undefined || paddingBlock !== undefined) &&
126
+ s["--padding"], paddingBottom !== undefined && s["--padding-bottom"], paddingEnd !== undefined && s["--padding-end"], paddingStart !== undefined && s["--padding-start"], paddingTop !== undefined && s["--padding-top"], (isFlex || nowrap) && s["--flex"], ...responsiveClassNames(s, "--direction", direction), ...responsiveClassNames(s, "--align", align), ...responsiveClassNames(s, "--justify", justify),
127
+ // Wrap and nowrap are separate here because inverting any of them could result into a false value which will be ignored by classNames
128
+ ...responsiveClassNames(s, "--nowrap", nowrap || wrap === false), ...responsiveClassNames(s, "--wrap", wrap),
129
+ // Item classnames
130
+ ...responsiveClassNames(s, "item--grow", grow));
131
+ const rootVariables = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, attributes === null || attributes === void 0 ? void 0 : attributes.style), responsiveVariables("--rs-view-gap", gap)), responsiveVariables("--rs-view-p-vertical", paddingBlock || padding)), responsiveVariables("--rs-view-p-horizontal", paddingInline || padding)), responsiveVariables("--rs-view-p-bottom", paddingBottom)), responsiveVariables("--rs-view-p-top", paddingTop)), responsiveVariables("--rs-view-p-start", paddingStart)), responsiveVariables("--rs-view-p-end", paddingEnd)), bleedStyles === null || bleedStyles === void 0 ? void 0 : bleedStyles.variables), widthStyles === null || widthStyles === void 0 ? void 0 : widthStyles.variables), heightStyles === null || heightStyles === void 0 ? void 0 : heightStyles.variables), aspectRatioStyles === null || aspectRatioStyles === void 0 ? void 0 : aspectRatioStyles.variables), maxWidthStyles === null || maxWidthStyles === void 0 ? void 0 : maxWidthStyles.variables), maxHeightStyles === null || maxHeightStyles === void 0 ? void 0 : maxHeightStyles.variables), insetStyles === null || insetStyles === void 0 ? void 0 : insetStyles.variables), insetTopStyles === null || insetTopStyles === void 0 ? void 0 : insetTopStyles.variables), insetBottomStyles === null || insetBottomStyles === void 0 ? void 0 : insetBottomStyles.variables), insetStartStyles === null || insetStartStyles === void 0 ? void 0 : insetStartStyles.variables), insetEndStyles === null || insetEndStyles === void 0 ? void 0 : insetEndStyles.variables), (zIndex ? { "--rs-view-z": zIndex } : {}));
132
+ return (React.createElement(TagName, Object.assign({}, attributes, { className: rootClassNames, style: rootVariables }), formattedChildren));
133
+ };
134
+ View.Item = ViewItem;
135
+ export default View;