@redsift/design-system 11.5.0 → 11.6.0-muiv5-alpha.1

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 (710) hide show
  1. package/_virtual/_rollupPluginBabelHelpers.js +133 -0
  2. package/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  3. package/_virtual/jsx-runtime.js +4 -0
  4. package/_virtual/jsx-runtime.js.map +1 -0
  5. package/_virtual/react-jsx-runtime.development.js +4 -0
  6. package/_virtual/react-jsx-runtime.development.js.map +1 -0
  7. package/_virtual/react-jsx-runtime.production.min.js +4 -0
  8. package/_virtual/react-jsx-runtime.production.min.js.map +1 -0
  9. package/components/alert/Alert.d.ts +9 -0
  10. package/components/alert/Alert.js +117 -0
  11. package/components/alert/Alert.js.map +1 -0
  12. package/components/alert/intl/en-US.json.js +7 -0
  13. package/components/alert/intl/en-US.json.js.map +1 -0
  14. package/components/alert/intl/fr-FR.json.js +7 -0
  15. package/components/alert/intl/fr-FR.json.js.map +1 -0
  16. package/components/alert/intl/index.js +10 -0
  17. package/components/alert/intl/index.js.map +1 -0
  18. package/components/alert/styles.js +54 -0
  19. package/components/alert/styles.js.map +1 -0
  20. package/components/alert/types.d.ts +49 -0
  21. package/components/alert/types.js +20 -0
  22. package/components/alert/types.js.map +1 -0
  23. package/components/app-bar/AppBar.d.ts +9 -0
  24. package/components/app-bar/AppBar.js +95 -0
  25. package/components/app-bar/AppBar.js.map +1 -0
  26. package/components/app-bar/intl/en-US.json.js +9 -0
  27. package/components/app-bar/intl/en-US.json.js.map +1 -0
  28. package/components/app-bar/intl/fr-FR.json.js +9 -0
  29. package/components/app-bar/intl/fr-FR.json.js.map +1 -0
  30. package/components/app-bar/intl/index.js +10 -0
  31. package/components/app-bar/intl/index.js.map +1 -0
  32. package/components/app-bar/styles.js +139 -0
  33. package/components/app-bar/styles.js.map +1 -0
  34. package/components/app-bar/types.d.ts +31 -0
  35. package/components/app-container/AppContainer.d.ts +11 -0
  36. package/components/app-container/AppContainer.js +117 -0
  37. package/components/app-container/AppContainer.js.map +1 -0
  38. package/components/app-container/context.d.ts +6 -0
  39. package/components/app-container/context.js +6 -0
  40. package/components/app-container/context.js.map +1 -0
  41. package/components/app-container/styles.js +30 -0
  42. package/components/app-container/styles.js.map +1 -0
  43. package/components/app-container/types.d.ts +51 -0
  44. package/components/app-content/AppContent.d.ts +9 -0
  45. package/components/app-content/AppContent.js +42 -0
  46. package/components/app-content/AppContent.js.map +1 -0
  47. package/components/app-content/styles.js +54 -0
  48. package/components/app-content/styles.js.map +1 -0
  49. package/components/app-content/types.d.ts +19 -0
  50. package/components/app-side-panel/AppSidePanel.d.ts +9 -0
  51. package/components/app-side-panel/AppSidePanel.js +86 -0
  52. package/components/app-side-panel/AppSidePanel.js.map +1 -0
  53. package/components/app-side-panel/intl/en-US.json.js +9 -0
  54. package/components/app-side-panel/intl/en-US.json.js.map +1 -0
  55. package/components/app-side-panel/intl/fr-FR.json.js +9 -0
  56. package/components/app-side-panel/intl/fr-FR.json.js.map +1 -0
  57. package/components/app-side-panel/intl/index.js +10 -0
  58. package/components/app-side-panel/intl/index.js.map +1 -0
  59. package/components/app-side-panel/styles.js +183 -0
  60. package/components/app-side-panel/styles.js.map +1 -0
  61. package/components/app-side-panel/types.d.ts +39 -0
  62. package/components/app-side-panel/types.js +15 -0
  63. package/components/app-side-panel/types.js.map +1 -0
  64. package/components/app-side-panel/useAppSidePanel.d.ts +6 -0
  65. package/components/app-side-panel/useAppSidePanel.js +23 -0
  66. package/components/app-side-panel/useAppSidePanel.js.map +1 -0
  67. package/components/badge/Badge.d.ts +9 -0
  68. package/components/badge/Badge.js +44 -0
  69. package/components/badge/Badge.js.map +1 -0
  70. package/components/badge/styles.js +93 -0
  71. package/components/badge/styles.js.map +1 -0
  72. package/components/badge/types.d.ts +37 -0
  73. package/components/badge/types.js +14 -0
  74. package/components/badge/types.js.map +1 -0
  75. package/components/breadcrumb-item/BreadcrumbItem.d.ts +9 -0
  76. package/components/breadcrumb-item/BreadcrumbItem.js +47 -0
  77. package/components/breadcrumb-item/BreadcrumbItem.js.map +1 -0
  78. package/components/breadcrumb-item/styles.js +48 -0
  79. package/components/breadcrumb-item/styles.js.map +1 -0
  80. package/components/breadcrumb-item/types.d.ts +23 -0
  81. package/components/breadcrumbs/Breadcrumbs.d.ts +13 -0
  82. package/components/breadcrumbs/Breadcrumbs.js +61 -0
  83. package/components/breadcrumbs/Breadcrumbs.js.map +1 -0
  84. package/components/breadcrumbs/styles.js +38 -0
  85. package/components/breadcrumbs/styles.js.map +1 -0
  86. package/components/breadcrumbs/types.d.ts +19 -0
  87. package/components/button/Button.d.ts +13 -0
  88. package/components/button/Button.js +92 -0
  89. package/components/button/Button.js.map +1 -0
  90. package/components/button/styles.d.ts +20 -0
  91. package/components/button/styles.js +219 -0
  92. package/components/button/styles.js.map +1 -0
  93. package/components/button/types.d.ts +67 -0
  94. package/components/button/types.js +19 -0
  95. package/components/button/types.js.map +1 -0
  96. package/components/button-group/ButtonGroup.d.ts +9 -0
  97. package/components/button-group/ButtonGroup.js +67 -0
  98. package/components/button-group/ButtonGroup.js.map +1 -0
  99. package/components/button-group/styles.js +103 -0
  100. package/components/button-group/styles.js.map +1 -0
  101. package/components/button-group/types.d.ts +36 -0
  102. package/components/button-group/types.js +19 -0
  103. package/components/button-group/types.js.map +1 -0
  104. package/components/button-link/ButtonLink.d.ts +13 -0
  105. package/components/button-link/ButtonLink.js +85 -0
  106. package/components/button-link/ButtonLink.js.map +1 -0
  107. package/components/button-link/types.d.ts +18 -0
  108. package/components/card/Card.d.ts +13 -0
  109. package/components/card/Card.js +81 -0
  110. package/components/card/Card.js.map +1 -0
  111. package/components/card/intl/en-US.json.js +9 -0
  112. package/components/card/intl/en-US.json.js.map +1 -0
  113. package/components/card/intl/fr-FR.json.js +9 -0
  114. package/components/card/intl/fr-FR.json.js.map +1 -0
  115. package/components/card/intl/index.js +10 -0
  116. package/components/card/intl/index.js.map +1 -0
  117. package/components/card/styles.js +63 -0
  118. package/components/card/styles.js.map +1 -0
  119. package/components/card/types.d.ts +25 -0
  120. package/components/card-actions/CardActions.d.ts +9 -0
  121. package/components/card-actions/CardActions.js +33 -0
  122. package/components/card-actions/CardActions.js.map +1 -0
  123. package/components/card-actions/styles.js +15 -0
  124. package/components/card-actions/styles.js.map +1 -0
  125. package/components/card-actions/types.d.ts +11 -0
  126. package/components/card-body/CardBody.d.ts +9 -0
  127. package/components/card-body/CardBody.js +28 -0
  128. package/components/card-body/CardBody.js.map +1 -0
  129. package/components/card-body/styles.js +18 -0
  130. package/components/card-body/styles.js.map +1 -0
  131. package/components/card-body/types.d.ts +11 -0
  132. package/components/card-header/CardHeader.d.ts +9 -0
  133. package/components/card-header/CardHeader.js +56 -0
  134. package/components/card-header/CardHeader.js.map +1 -0
  135. package/components/card-header/styles.js +31 -0
  136. package/components/card-header/styles.js.map +1 -0
  137. package/components/card-header/types.d.ts +28 -0
  138. package/components/checkbox/Checkbox.d.ts +11 -0
  139. package/components/checkbox/Checkbox.js +135 -0
  140. package/components/checkbox/Checkbox.js.map +1 -0
  141. package/components/checkbox/styles.js +113 -0
  142. package/components/checkbox/styles.js.map +1 -0
  143. package/components/checkbox/types.d.ts +60 -0
  144. package/components/checkbox-group/CheckboxGroup.d.ts +10 -0
  145. package/components/checkbox-group/CheckboxGroup.js +101 -0
  146. package/components/checkbox-group/CheckboxGroup.js.map +1 -0
  147. package/components/checkbox-group/context.js +6 -0
  148. package/components/checkbox-group/context.js.map +1 -0
  149. package/components/checkbox-group/styles.js +78 -0
  150. package/components/checkbox-group/styles.js.map +1 -0
  151. package/components/checkbox-group/types.d.ts +72 -0
  152. package/components/checkbox-group/types.js +18 -0
  153. package/components/checkbox-group/types.js.map +1 -0
  154. package/components/conditional-wrapper/ConditionalWrapper.d.ts +6 -0
  155. package/components/conditional-wrapper/ConditionalWrapper.js +13 -0
  156. package/components/conditional-wrapper/ConditionalWrapper.js.map +1 -0
  157. package/components/conditional-wrapper/types.d.ts +10 -0
  158. package/components/detailed-card/DetailedCard.d.ts +15 -0
  159. package/components/detailed-card/DetailedCard.js +170 -0
  160. package/components/detailed-card/DetailedCard.js.map +1 -0
  161. package/components/detailed-card/intl/en-US.json.js +7 -0
  162. package/components/detailed-card/intl/en-US.json.js.map +1 -0
  163. package/components/detailed-card/intl/fr-FR.json.js +7 -0
  164. package/components/detailed-card/intl/fr-FR.json.js.map +1 -0
  165. package/components/detailed-card/intl/index.js +10 -0
  166. package/components/detailed-card/intl/index.js.map +1 -0
  167. package/components/detailed-card/styles.js +49 -0
  168. package/components/detailed-card/styles.js.map +1 -0
  169. package/components/detailed-card/types.d.ts +40 -0
  170. package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.d.ts +9 -0
  171. package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js +33 -0
  172. package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js.map +1 -0
  173. package/components/detailed-card-collapsible-section-items/styles.js +35 -0
  174. package/components/detailed-card-collapsible-section-items/styles.js.map +1 -0
  175. package/components/detailed-card-collapsible-section-items/types.d.ts +16 -0
  176. package/components/detailed-card-header/DetailedCardHeader.d.ts +9 -0
  177. package/components/detailed-card-header/DetailedCardHeader.js +45 -0
  178. package/components/detailed-card-header/DetailedCardHeader.js.map +1 -0
  179. package/components/detailed-card-header/styles.js +26 -0
  180. package/components/detailed-card-header/styles.js.map +1 -0
  181. package/components/detailed-card-header/types.d.ts +20 -0
  182. package/components/detailed-card-section/DetailedCardSection.d.ts +9 -0
  183. package/components/detailed-card-section/DetailedCardSection.js +90 -0
  184. package/components/detailed-card-section/DetailedCardSection.js.map +1 -0
  185. package/components/detailed-card-section/intl/en-US.json.js +9 -0
  186. package/components/detailed-card-section/intl/en-US.json.js.map +1 -0
  187. package/components/detailed-card-section/intl/fr-FR.json.js +9 -0
  188. package/components/detailed-card-section/intl/fr-FR.json.js.map +1 -0
  189. package/components/detailed-card-section/intl/index.js +10 -0
  190. package/components/detailed-card-section/intl/index.js.map +1 -0
  191. package/components/detailed-card-section/styles.js +69 -0
  192. package/components/detailed-card-section/styles.js.map +1 -0
  193. package/components/detailed-card-section/types.d.ts +27 -0
  194. package/components/detailed-card-section-item/DetailedCardSectionItem.d.ts +9 -0
  195. package/components/detailed-card-section-item/DetailedCardSectionItem.js +64 -0
  196. package/components/detailed-card-section-item/DetailedCardSectionItem.js.map +1 -0
  197. package/components/detailed-card-section-item/styles.js +34 -0
  198. package/components/detailed-card-section-item/styles.js.map +1 -0
  199. package/components/detailed-card-section-item/types.d.ts +35 -0
  200. package/components/flexbox/Flexbox.d.ts +9 -0
  201. package/components/flexbox/Flexbox.js +44 -0
  202. package/components/flexbox/Flexbox.js.map +1 -0
  203. package/components/flexbox/styles.js +54 -0
  204. package/components/flexbox/styles.js.map +1 -0
  205. package/components/flexbox/types.d.ts +24 -0
  206. package/components/focus-within-group/FocusWithinGroup.d.ts +41 -0
  207. package/components/focus-within-group/FocusWithinGroup.js +91 -0
  208. package/components/focus-within-group/FocusWithinGroup.js.map +1 -0
  209. package/components/focus-within-group/context.d.ts +7 -0
  210. package/components/focus-within-group/context.js +21 -0
  211. package/components/focus-within-group/context.js.map +1 -0
  212. package/components/focus-within-group/reducer.d.ts +5 -0
  213. package/components/focus-within-group/reducer.js +419 -0
  214. package/components/focus-within-group/reducer.js.map +1 -0
  215. package/components/focus-within-group/types.d.ts +143 -0
  216. package/components/focus-within-group/types.js +42 -0
  217. package/components/focus-within-group/types.js.map +1 -0
  218. package/components/focus-within-group/useFocusOnList.d.ts +5 -0
  219. package/components/focus-within-group/useFocusOnList.js +44 -0
  220. package/components/focus-within-group/useFocusOnList.js.map +1 -0
  221. package/components/focus-within-group/useFocusOnListItem.d.ts +39 -0
  222. package/components/focus-within-group/useFocusOnListItem.js +148 -0
  223. package/components/focus-within-group/useFocusOnListItem.js.map +1 -0
  224. package/components/gradient-border/index.d.ts +14 -0
  225. package/components/gradient-border/index.js +38 -0
  226. package/components/gradient-border/index.js.map +1 -0
  227. package/components/grid/Grid.d.ts +13 -0
  228. package/components/grid/Grid.js +45 -0
  229. package/components/grid/Grid.js.map +1 -0
  230. package/components/grid/styles.js +55 -0
  231. package/components/grid/styles.js.map +1 -0
  232. package/components/grid/types.d.ts +22 -0
  233. package/components/grid-item/GridItem.d.ts +9 -0
  234. package/components/grid-item/GridItem.js +28 -0
  235. package/components/grid-item/GridItem.js.map +1 -0
  236. package/components/grid-item/styles.js +16 -0
  237. package/components/grid-item/styles.js.map +1 -0
  238. package/components/grid-item/types.d.ts +11 -0
  239. package/components/heading/Heading.d.ts +9 -0
  240. package/components/heading/Heading.js +50 -0
  241. package/components/heading/Heading.js.map +1 -0
  242. package/components/heading/styles.js +67 -0
  243. package/components/heading/styles.js.map +1 -0
  244. package/components/heading/types.d.ts +62 -0
  245. package/components/heading/types.js +26 -0
  246. package/components/heading/types.js.map +1 -0
  247. package/components/icon/Icon.d.ts +10 -0
  248. package/components/icon/Icon.js +116 -0
  249. package/components/icon/Icon.js.map +1 -0
  250. package/components/icon/styles.js +84 -0
  251. package/components/icon/styles.js.map +1 -0
  252. package/components/icon/types.d.ts +57 -0
  253. package/components/icon/types.js +18 -0
  254. package/components/icon/types.js.map +1 -0
  255. package/components/icon-button/IconButton.d.ts +12 -0
  256. package/components/icon-button/IconButton.js +81 -0
  257. package/components/icon-button/IconButton.js.map +1 -0
  258. package/components/icon-button/styles.js +31 -0
  259. package/components/icon-button/styles.js.map +1 -0
  260. package/components/icon-button/types.d.ts +56 -0
  261. package/components/icon-button/types.js +19 -0
  262. package/components/icon-button/types.js.map +1 -0
  263. package/components/icon-button-link/IconButtonLink.d.ts +13 -0
  264. package/components/icon-button-link/IconButtonLink.js +76 -0
  265. package/components/icon-button-link/IconButtonLink.js.map +1 -0
  266. package/components/icon-button-link/types.d.ts +18 -0
  267. package/components/item/Item.d.ts +10 -0
  268. package/components/item/Item.js +225 -0
  269. package/components/item/Item.js.map +1 -0
  270. package/components/item/styles.d.ts +20 -0
  271. package/components/item/styles.js +129 -0
  272. package/components/item/styles.js.map +1 -0
  273. package/components/item/types.d.ts +59 -0
  274. package/components/item/useMenuItem.js +55 -0
  275. package/components/item/useMenuItem.js.map +1 -0
  276. package/components/link/Link.d.ts +14 -0
  277. package/components/link/Link.js +67 -0
  278. package/components/link/Link.js.map +1 -0
  279. package/components/link/styles.d.ts +15 -0
  280. package/components/link/styles.js +145 -0
  281. package/components/link/styles.js.map +1 -0
  282. package/components/link/types.d.ts +40 -0
  283. package/components/link-button/LinkButton.d.ts +13 -0
  284. package/components/link-button/LinkButton.js +66 -0
  285. package/components/link-button/LinkButton.js.map +1 -0
  286. package/components/link-button/types.d.ts +13 -0
  287. package/components/listbox/ActiveDescendantListbox.d.ts +8 -0
  288. package/components/listbox/ActiveDescendantListbox.js +74 -0
  289. package/components/listbox/ActiveDescendantListbox.js.map +1 -0
  290. package/components/listbox/Listbox.d.ts +10 -0
  291. package/components/listbox/Listbox.js +110 -0
  292. package/components/listbox/Listbox.js.map +1 -0
  293. package/components/listbox/RovingTabindexListbox.d.ts +8 -0
  294. package/components/listbox/RovingTabindexListbox.js +30 -0
  295. package/components/listbox/RovingTabindexListbox.js.map +1 -0
  296. package/components/listbox/context.d.ts +7 -0
  297. package/components/listbox/context.js +15 -0
  298. package/components/listbox/context.js.map +1 -0
  299. package/components/listbox/reducer.d.ts +5 -0
  300. package/components/listbox/reducer.js +45 -0
  301. package/components/listbox/reducer.js.map +1 -0
  302. package/components/listbox/styles.js +44 -0
  303. package/components/listbox/styles.js.map +1 -0
  304. package/components/listbox/types.d.ts +101 -0
  305. package/components/listbox/types.js +32 -0
  306. package/components/listbox/types.js.map +1 -0
  307. package/components/listbox/useListboxItem.d.ts +12 -0
  308. package/components/listbox/useListboxItem.js +90 -0
  309. package/components/listbox/useListboxItem.js.map +1 -0
  310. package/components/number/Number.d.ts +9 -0
  311. package/components/number/Number.js +105 -0
  312. package/components/number/Number.js.map +1 -0
  313. package/components/number/styles.js +10 -0
  314. package/components/number/styles.js.map +1 -0
  315. package/components/number/types.d.ts +63 -0
  316. package/components/number-field/NumberField.d.ts +10 -0
  317. package/components/number-field/NumberField.js +216 -0
  318. package/components/number-field/NumberField.js.map +1 -0
  319. package/components/number-field/styles.js +240 -0
  320. package/components/number-field/styles.js.map +1 -0
  321. package/components/number-field/types.d.ts +74 -0
  322. package/components/number-field/types.js +14 -0
  323. package/components/number-field/types.js.map +1 -0
  324. package/components/pill/Pill.d.ts +9 -0
  325. package/components/pill/Pill.js +93 -0
  326. package/components/pill/Pill.js.map +1 -0
  327. package/components/pill/styles.js +305 -0
  328. package/components/pill/styles.js.map +1 -0
  329. package/components/pill/types.d.ts +47 -0
  330. package/components/pill/types.js +15 -0
  331. package/components/pill/types.js.map +1 -0
  332. package/components/progress-bar/ProgressBar.d.ts +9 -0
  333. package/components/progress-bar/ProgressBar.js +35 -0
  334. package/components/progress-bar/ProgressBar.js.map +1 -0
  335. package/components/progress-bar/styles.js +38 -0
  336. package/components/progress-bar/styles.js.map +1 -0
  337. package/components/progress-bar/types.d.ts +20 -0
  338. package/components/radio/Radio.d.ts +11 -0
  339. package/components/radio/Radio.js +128 -0
  340. package/components/radio/Radio.js.map +1 -0
  341. package/components/radio/styles.js +113 -0
  342. package/components/radio/styles.js.map +1 -0
  343. package/components/radio/types.d.ts +58 -0
  344. package/components/radio-group/RadioGroup.d.ts +10 -0
  345. package/components/radio-group/RadioGroup.js +89 -0
  346. package/components/radio-group/RadioGroup.js.map +1 -0
  347. package/components/radio-group/context.js +6 -0
  348. package/components/radio-group/context.js.map +1 -0
  349. package/components/radio-group/styles.js +78 -0
  350. package/components/radio-group/styles.js.map +1 -0
  351. package/components/radio-group/types.d.ts +68 -0
  352. package/components/radio-group/types.js +18 -0
  353. package/components/radio-group/types.js.map +1 -0
  354. package/components/shared/styles.d.ts +17 -0
  355. package/components/shared/styles.js +250 -0
  356. package/components/shared/styles.js.map +1 -0
  357. package/components/shield/Shield.d.ts +9 -0
  358. package/components/shield/Shield.js +136 -0
  359. package/components/shield/Shield.js.map +1 -0
  360. package/components/shield/styles.js +71 -0
  361. package/components/shield/styles.js.map +1 -0
  362. package/components/shield/types.d.ts +52 -0
  363. package/components/shield/types.js +25 -0
  364. package/components/shield/types.js.map +1 -0
  365. package/components/side-navigation-menu/SideNavigationMenu.d.ts +9 -0
  366. package/components/side-navigation-menu/SideNavigationMenu.js +367 -0
  367. package/components/side-navigation-menu/SideNavigationMenu.js.map +1 -0
  368. package/components/side-navigation-menu/context.js +6 -0
  369. package/components/side-navigation-menu/context.js.map +1 -0
  370. package/components/side-navigation-menu/reducer.js +26 -0
  371. package/components/side-navigation-menu/reducer.js.map +1 -0
  372. package/components/side-navigation-menu/styles.js +196 -0
  373. package/components/side-navigation-menu/styles.js.map +1 -0
  374. package/components/side-navigation-menu/types.d.ts +72 -0
  375. package/components/side-navigation-menu/types.js +21 -0
  376. package/components/side-navigation-menu/types.js.map +1 -0
  377. package/components/side-navigation-menu-bar/SideNavigationMenuBar.d.ts +9 -0
  378. package/components/side-navigation-menu-bar/SideNavigationMenuBar.js +217 -0
  379. package/components/side-navigation-menu-bar/SideNavigationMenuBar.js.map +1 -0
  380. package/components/side-navigation-menu-bar/context.js +6 -0
  381. package/components/side-navigation-menu-bar/context.js.map +1 -0
  382. package/components/side-navigation-menu-bar/styles.js +89 -0
  383. package/components/side-navigation-menu-bar/styles.js.map +1 -0
  384. package/components/side-navigation-menu-bar/types.d.ts +65 -0
  385. package/components/side-navigation-menu-bar/types.js +22 -0
  386. package/components/side-navigation-menu-bar/types.js.map +1 -0
  387. package/components/side-navigation-menu-bar/useSideNavigationMenuBar.d.ts +9 -0
  388. package/components/side-navigation-menu-bar/useSideNavigationMenuBar.js +70 -0
  389. package/components/side-navigation-menu-bar/useSideNavigationMenuBar.js.map +1 -0
  390. package/components/side-navigation-menu-item/SideNavigationMenuItem.d.ts +9 -0
  391. package/components/side-navigation-menu-item/SideNavigationMenuItem.js +115 -0
  392. package/components/side-navigation-menu-item/SideNavigationMenuItem.js.map +1 -0
  393. package/components/side-navigation-menu-item/styles.js +174 -0
  394. package/components/side-navigation-menu-item/styles.js.map +1 -0
  395. package/components/side-navigation-menu-item/types.d.ts +51 -0
  396. package/components/skeleton/Skeleton.d.ts +15 -0
  397. package/components/skeleton/Skeleton.js +42 -0
  398. package/components/skeleton/Skeleton.js.map +1 -0
  399. package/components/skeleton/styles.js +84 -0
  400. package/components/skeleton/styles.js.map +1 -0
  401. package/components/skeleton/types.d.ts +18 -0
  402. package/components/skeleton-circle/SkeletonCircle.d.ts +9 -0
  403. package/components/skeleton-circle/SkeletonCircle.js +36 -0
  404. package/components/skeleton-circle/SkeletonCircle.js.map +1 -0
  405. package/components/skeleton-circle/styles.js +26 -0
  406. package/components/skeleton-circle/styles.js.map +1 -0
  407. package/components/skeleton-circle/types.d.ts +12 -0
  408. package/components/skeleton-text/SkeletonText.d.ts +9 -0
  409. package/components/skeleton-text/SkeletonText.js +42 -0
  410. package/components/skeleton-text/SkeletonText.js.map +1 -0
  411. package/components/skeleton-text/styles.js +39 -0
  412. package/components/skeleton-text/styles.js.map +1 -0
  413. package/components/skeleton-text/types.d.ts +36 -0
  414. package/components/skeleton-text/types.js +20 -0
  415. package/components/skeleton-text/types.js.map +1 -0
  416. package/components/spinner/Spinner.d.ts +9 -0
  417. package/components/spinner/Spinner.js +82 -0
  418. package/components/spinner/Spinner.js.map +1 -0
  419. package/components/spinner/images/spinner-grey-l1.svg.js +4 -0
  420. package/components/spinner/images/spinner-grey-l1.svg.js.map +1 -0
  421. package/components/spinner/images/spinner-grey-l2.svg.js +4 -0
  422. package/components/spinner/images/spinner-grey-l2.svg.js.map +1 -0
  423. package/components/spinner/images/spinner-grey-l3.svg.js +4 -0
  424. package/components/spinner/images/spinner-grey-l3.svg.js.map +1 -0
  425. package/components/spinner/images/spinner-primary-n.svg.js +4 -0
  426. package/components/spinner/images/spinner-primary-n.svg.js.map +1 -0
  427. package/components/spinner/intl/en-US.json.js +7 -0
  428. package/components/spinner/intl/en-US.json.js.map +1 -0
  429. package/components/spinner/intl/fr-FR.json.js +7 -0
  430. package/components/spinner/intl/fr-FR.json.js.map +1 -0
  431. package/components/spinner/intl/index.js +10 -0
  432. package/components/spinner/intl/index.js.map +1 -0
  433. package/components/spinner/styles.js +13 -0
  434. package/components/spinner/styles.js.map +1 -0
  435. package/components/spinner/types.d.ts +38 -0
  436. package/components/spinner/types.js +16 -0
  437. package/components/spinner/types.js.map +1 -0
  438. package/components/switch/Switch.d.ts +11 -0
  439. package/components/switch/Switch.js +137 -0
  440. package/components/switch/Switch.js.map +1 -0
  441. package/components/switch/styles.js +187 -0
  442. package/components/switch/styles.js.map +1 -0
  443. package/components/switch/types.d.ts +58 -0
  444. package/components/switch-group/SwitchGroup.d.ts +10 -0
  445. package/components/switch-group/SwitchGroup.js +101 -0
  446. package/components/switch-group/SwitchGroup.js.map +1 -0
  447. package/components/switch-group/context.js +6 -0
  448. package/components/switch-group/context.js.map +1 -0
  449. package/components/switch-group/styles.js +78 -0
  450. package/components/switch-group/styles.js.map +1 -0
  451. package/components/switch-group/types.d.ts +72 -0
  452. package/components/switch-group/types.js +18 -0
  453. package/components/switch-group/types.js.map +1 -0
  454. package/components/text/Text.d.ts +9 -0
  455. package/components/text/Text.js +51 -0
  456. package/components/text/Text.js.map +1 -0
  457. package/components/text/styles.js +112 -0
  458. package/components/text/styles.js.map +1 -0
  459. package/components/text/types.d.ts +73 -0
  460. package/components/text/types.js +34 -0
  461. package/components/text/types.js.map +1 -0
  462. package/components/text-area/TextArea.d.ts +10 -0
  463. package/components/text-area/TextArea.js +165 -0
  464. package/components/text-area/TextArea.js.map +1 -0
  465. package/components/text-area/styles.js +240 -0
  466. package/components/text-area/styles.js.map +1 -0
  467. package/components/text-area/types.d.ts +28 -0
  468. package/components/text-area/types.js +14 -0
  469. package/components/text-area/types.js.map +1 -0
  470. package/components/text-field/TextField.d.ts +10 -0
  471. package/components/text-field/TextField.js +197 -0
  472. package/components/text-field/TextField.js.map +1 -0
  473. package/components/text-field/intl/en-US.json.js +8 -0
  474. package/components/text-field/intl/en-US.json.js.map +1 -0
  475. package/components/text-field/intl/fr-FR.json.js +8 -0
  476. package/components/text-field/intl/fr-FR.json.js.map +1 -0
  477. package/components/text-field/intl/index.js +10 -0
  478. package/components/text-field/intl/index.js.map +1 -0
  479. package/components/text-field/styles.d.ts +22 -0
  480. package/components/text-field/styles.js +252 -0
  481. package/components/text-field/styles.js.map +1 -0
  482. package/components/text-field/types.d.ts +99 -0
  483. package/components/text-field/types.js +18 -0
  484. package/components/text-field/types.js.map +1 -0
  485. package/components/theme/context.d.ts +11 -0
  486. package/components/theme/context.js +7 -0
  487. package/components/theme/context.js.map +1 -0
  488. package/components/theme/useTheme.d.ts +5 -0
  489. package/components/theme/useTheme.js +13 -0
  490. package/components/theme/useTheme.js.map +1 -0
  491. package/hooks/useBoundingRect.d.ts +8 -0
  492. package/hooks/useBoundingRect.js +17 -0
  493. package/hooks/useBoundingRect.js.map +1 -0
  494. package/hooks/useComputeNumberOfRows.d.ts +15 -0
  495. package/hooks/useComputeNumberOfRows.js +40 -0
  496. package/hooks/useComputeNumberOfRows.js.map +1 -0
  497. package/hooks/useIsLoaded.d.ts +5 -0
  498. package/hooks/useIsLoaded.js +14 -0
  499. package/hooks/useIsLoaded.js.map +1 -0
  500. package/hooks/useWindowSize.d.ts +8 -0
  501. package/hooks/useWindowSize.js +42 -0
  502. package/hooks/useWindowSize.js.map +1 -0
  503. package/index.d.ts +157 -4667
  504. package/index.js +121 -24514
  505. package/index.js.map +1 -1
  506. package/package.json +4 -3
  507. package/packages/popovers/src/components/tooltip/Tooltip.js +62 -0
  508. package/packages/popovers/src/components/tooltip/Tooltip.js.map +1 -0
  509. package/packages/popovers/src/components/tooltip/context.js +6 -0
  510. package/packages/popovers/src/components/tooltip/context.js.map +1 -0
  511. package/packages/popovers/src/components/tooltip/types.js +28 -0
  512. package/packages/popovers/src/components/tooltip/types.js.map +1 -0
  513. package/packages/popovers/src/components/tooltip/useTooltip.js +78 -0
  514. package/packages/popovers/src/components/tooltip/useTooltip.js.map +1 -0
  515. package/packages/popovers/src/components/tooltip/useTooltipContext.js +13 -0
  516. package/packages/popovers/src/components/tooltip/useTooltipContext.js.map +1 -0
  517. package/packages/popovers/src/components/tooltip-content/TooltipContent.js +80 -0
  518. package/packages/popovers/src/components/tooltip-content/TooltipContent.js.map +1 -0
  519. package/packages/popovers/src/components/tooltip-content/styles.js +128 -0
  520. package/packages/popovers/src/components/tooltip-content/styles.js.map +1 -0
  521. package/packages/popovers/src/components/tooltip-trigger/TooltipTrigger.js +47 -0
  522. package/packages/popovers/src/components/tooltip-trigger/TooltipTrigger.js.map +1 -0
  523. package/react-aria/internationalized/date/DateFormatter.d.ts +25 -0
  524. package/react-aria/internationalized/date/DateFormatter.js +187 -0
  525. package/react-aria/internationalized/date/DateFormatter.js.map +1 -0
  526. package/react-aria/internationalized/message/MessageDictionary.d.ts +7 -0
  527. package/react-aria/internationalized/message/MessageDictionary.js +82 -0
  528. package/react-aria/internationalized/message/MessageDictionary.js.map +1 -0
  529. package/react-aria/internationalized/message/MessageFormatter.js +38 -0
  530. package/react-aria/internationalized/message/MessageFormatter.js.map +1 -0
  531. package/react-aria/internationalized/number/NumberFormatter.d.ts +6 -0
  532. package/react-aria/internationalized/number/NumberFormatter.js +222 -0
  533. package/react-aria/internationalized/number/NumberFormatter.js.map +1 -0
  534. package/react-aria/internationalized/number/NumberParser.js +288 -0
  535. package/react-aria/internationalized/number/NumberParser.js.map +1 -0
  536. package/react-aria/internationalized/string/LocalizedStringDictionary.d.ts +21 -0
  537. package/react-aria/internationalized/string/LocalizedStringDictionary.js +118 -0
  538. package/react-aria/internationalized/string/LocalizedStringDictionary.js.map +1 -0
  539. package/react-aria/internationalized/string/LocalizedStringFormatter.d.ts +21 -0
  540. package/react-aria/internationalized/string/LocalizedStringFormatter.js +70 -0
  541. package/react-aria/internationalized/string/LocalizedStringFormatter.js.map +1 -0
  542. package/react-aria/react-aria/button/useButton.js +95 -0
  543. package/react-aria/react-aria/button/useButton.js.map +1 -0
  544. package/react-aria/react-aria/focus/focusSafely.js +33 -0
  545. package/react-aria/react-aria/focus/focusSafely.js.map +1 -0
  546. package/react-aria/react-aria/focus/useFocusRing.js +57 -0
  547. package/react-aria/react-aria/focus/useFocusRing.js.map +1 -0
  548. package/react-aria/react-aria/focus/useFocusable.js +47 -0
  549. package/react-aria/react-aria/focus/useFocusable.js.map +1 -0
  550. package/react-aria/react-aria/form/useFormValidation.js +112 -0
  551. package/react-aria/react-aria/form/useFormValidation.js.map +1 -0
  552. package/react-aria/react-aria/i18n/context.d.ts +19 -0
  553. package/react-aria/react-aria/i18n/context.js +41 -0
  554. package/react-aria/react-aria/i18n/context.js.map +1 -0
  555. package/react-aria/react-aria/i18n/useCollator.d.ts +8 -0
  556. package/react-aria/react-aria/i18n/useCollator.js +25 -0
  557. package/react-aria/react-aria/i18n/useCollator.js.map +1 -0
  558. package/react-aria/react-aria/i18n/useDateFormatter.d.ts +13 -0
  559. package/react-aria/react-aria/i18n/useDateFormatter.js +39 -0
  560. package/react-aria/react-aria/i18n/useDateFormatter.js.map +1 -0
  561. package/react-aria/react-aria/i18n/useDefaultLocale.d.ts +10 -0
  562. package/react-aria/react-aria/i18n/useDefaultLocale.js +67 -0
  563. package/react-aria/react-aria/i18n/useDefaultLocale.js.map +1 -0
  564. package/react-aria/react-aria/i18n/useFilter.d.ts +15 -0
  565. package/react-aria/react-aria/i18n/useFilter.js +58 -0
  566. package/react-aria/react-aria/i18n/useFilter.js.map +1 -0
  567. package/react-aria/react-aria/i18n/useListFormatter.d.ts +8 -0
  568. package/react-aria/react-aria/i18n/useListFormatter.js +20 -0
  569. package/react-aria/react-aria/i18n/useListFormatter.js.map +1 -0
  570. package/react-aria/react-aria/i18n/useLocalizedStringFormatter.d.ts +15 -0
  571. package/react-aria/react-aria/i18n/useLocalizedStringFormatter.js +38 -0
  572. package/react-aria/react-aria/i18n/useLocalizedStringFormatter.js.map +1 -0
  573. package/react-aria/react-aria/i18n/useMessageFormatter.d.ts +13 -0
  574. package/react-aria/react-aria/i18n/useMessageFormatter.js +32 -0
  575. package/react-aria/react-aria/i18n/useMessageFormatter.js.map +1 -0
  576. package/react-aria/react-aria/i18n/useNumberFormatter.d.ts +10 -0
  577. package/react-aria/react-aria/i18n/useNumberFormatter.js +21 -0
  578. package/react-aria/react-aria/i18n/useNumberFormatter.js.map +1 -0
  579. package/react-aria/react-aria/i18n/utils.js +49 -0
  580. package/react-aria/react-aria/i18n/utils.js.map +1 -0
  581. package/react-aria/react-aria/interactions/context.js +20 -0
  582. package/react-aria/react-aria/interactions/context.js.map +1 -0
  583. package/react-aria/react-aria/interactions/createEventHandler.js +48 -0
  584. package/react-aria/react-aria/interactions/createEventHandler.js.map +1 -0
  585. package/react-aria/react-aria/interactions/textSelection.js +85 -0
  586. package/react-aria/react-aria/interactions/textSelection.js.map +1 -0
  587. package/react-aria/react-aria/interactions/useFocus.js +53 -0
  588. package/react-aria/react-aria/interactions/useFocus.js.map +1 -0
  589. package/react-aria/react-aria/interactions/useFocusVisible.js +236 -0
  590. package/react-aria/react-aria/interactions/useFocusVisible.js.map +1 -0
  591. package/react-aria/react-aria/interactions/useFocusWithin.js +65 -0
  592. package/react-aria/react-aria/interactions/useFocusWithin.js.map +1 -0
  593. package/react-aria/react-aria/interactions/useKeyboard.js +27 -0
  594. package/react-aria/react-aria/interactions/useKeyboard.js.map +1 -0
  595. package/react-aria/react-aria/interactions/usePress.js +769 -0
  596. package/react-aria/react-aria/interactions/usePress.js.map +1 -0
  597. package/react-aria/react-aria/interactions/useScrollWheel.js +31 -0
  598. package/react-aria/react-aria/interactions/useScrollWheel.js.map +1 -0
  599. package/react-aria/react-aria/interactions/utils.js +116 -0
  600. package/react-aria/react-aria/interactions/utils.js.map +1 -0
  601. package/react-aria/react-aria/label/useField.js +42 -0
  602. package/react-aria/react-aria/label/useField.js.map +1 -0
  603. package/react-aria/react-aria/label/useLabel.js +42 -0
  604. package/react-aria/react-aria/label/useLabel.js.map +1 -0
  605. package/react-aria/react-aria/live-announcer/LiveAnnouncer.js +121 -0
  606. package/react-aria/react-aria/live-announcer/LiveAnnouncer.js.map +1 -0
  607. package/react-aria/react-aria/numberfield/intl/en-US.json.js +11 -0
  608. package/react-aria/react-aria/numberfield/intl/en-US.json.js.map +1 -0
  609. package/react-aria/react-aria/numberfield/intl/fr-FR.json.js +11 -0
  610. package/react-aria/react-aria/numberfield/intl/fr-FR.json.js.map +1 -0
  611. package/react-aria/react-aria/numberfield/intl/index.js +10 -0
  612. package/react-aria/react-aria/numberfield/intl/index.js.map +1 -0
  613. package/react-aria/react-aria/numberfield/useNumberField.js +294 -0
  614. package/react-aria/react-aria/numberfield/useNumberField.js.map +1 -0
  615. package/react-aria/react-aria/spinbutton/intl/en-US.json.js +7 -0
  616. package/react-aria/react-aria/spinbutton/intl/en-US.json.js.map +1 -0
  617. package/react-aria/react-aria/spinbutton/intl/fr-FR.json.js +7 -0
  618. package/react-aria/react-aria/spinbutton/intl/fr-FR.json.js.map +1 -0
  619. package/react-aria/react-aria/spinbutton/intl/index.js +10 -0
  620. package/react-aria/react-aria/spinbutton/intl/index.js.map +1 -0
  621. package/react-aria/react-aria/spinbutton/useSpinButton.js +168 -0
  622. package/react-aria/react-aria/spinbutton/useSpinButton.js.map +1 -0
  623. package/react-aria/react-aria/ssr/SSRProvider.d.ts +22 -0
  624. package/react-aria/react-aria/ssr/SSRProvider.js +157 -0
  625. package/react-aria/react-aria/ssr/SSRProvider.js.map +1 -0
  626. package/react-aria/react-aria/textfield/useFormattedTextField.js +142 -0
  627. package/react-aria/react-aria/textfield/useFormattedTextField.js.map +1 -0
  628. package/react-aria/react-aria/textfield/useTextField.js +156 -0
  629. package/react-aria/react-aria/textfield/useTextField.js.map +1 -0
  630. package/react-aria/react-aria/utils/chain.js +33 -0
  631. package/react-aria/react-aria/utils/chain.js.map +1 -0
  632. package/react-aria/react-aria/utils/domHelpers.js +14 -0
  633. package/react-aria/react-aria/utils/domHelpers.js.map +1 -0
  634. package/react-aria/react-aria/utils/filterDOMProps.js +45 -0
  635. package/react-aria/react-aria/utils/filterDOMProps.js.map +1 -0
  636. package/react-aria/react-aria/utils/focusWithoutScrolling.js +88 -0
  637. package/react-aria/react-aria/utils/focusWithoutScrolling.js.map +1 -0
  638. package/react-aria/react-aria/utils/isVirtualEvent.js +51 -0
  639. package/react-aria/react-aria/utils/isVirtualEvent.js.map +1 -0
  640. package/react-aria/react-aria/utils/mergeProps.js +48 -0
  641. package/react-aria/react-aria/utils/mergeProps.js.map +1 -0
  642. package/react-aria/react-aria/utils/openLink.js +55 -0
  643. package/react-aria/react-aria/utils/openLink.js.map +1 -0
  644. package/react-aria/react-aria/utils/platform.js +69 -0
  645. package/react-aria/react-aria/utils/platform.js.map +1 -0
  646. package/react-aria/react-aria/utils/runAfterTransition.js +100 -0
  647. package/react-aria/react-aria/utils/runAfterTransition.js.map +1 -0
  648. package/react-aria/react-aria/utils/useDeepMemo.js +16 -0
  649. package/react-aria/react-aria/utils/useDeepMemo.js.map +1 -0
  650. package/react-aria/react-aria/utils/useEffectEvent.js +31 -0
  651. package/react-aria/react-aria/utils/useEffectEvent.js.map +1 -0
  652. package/react-aria/react-aria/utils/useEvent.js +21 -0
  653. package/react-aria/react-aria/utils/useEvent.js.map +1 -0
  654. package/react-aria/react-aria/utils/useFormReset.js +23 -0
  655. package/react-aria/react-aria/utils/useFormReset.js.map +1 -0
  656. package/react-aria/react-aria/utils/useGlobalListeners.js +44 -0
  657. package/react-aria/react-aria/utils/useGlobalListeners.js.map +1 -0
  658. package/react-aria/react-aria/utils/useId.js +86 -0
  659. package/react-aria/react-aria/utils/useId.js.map +1 -0
  660. package/react-aria/react-aria/utils/useLabels.js +39 -0
  661. package/react-aria/react-aria/utils/useLabels.js.map +1 -0
  662. package/react-aria/react-aria/utils/useLayoutEffect.js +21 -0
  663. package/react-aria/react-aria/utils/useLayoutEffect.js.map +1 -0
  664. package/react-aria/react-aria/utils/useSyncRef.js +29 -0
  665. package/react-aria/react-aria/utils/useSyncRef.js.map +1 -0
  666. package/react-aria/react-aria/utils/useValueEffect.js +52 -0
  667. package/react-aria/react-aria/utils/useValueEffect.js.map +1 -0
  668. package/react-aria/react-stately/form/useFormValidationState.js +191 -0
  669. package/react-aria/react-stately/form/useFormValidationState.js.map +1 -0
  670. package/react-aria/react-stately/numberfield/useNumberFieldState.js +196 -0
  671. package/react-aria/react-stately/numberfield/useNumberFieldState.js.map +1 -0
  672. package/react-aria/react-stately/utils/number.js +56 -0
  673. package/react-aria/react-stately/utils/number.js.map +1 -0
  674. package/react-aria/react-stately/utils/useControlledState.js +68 -0
  675. package/react-aria/react-stately/utils/useControlledState.js.map +1 -0
  676. package/react-aria/react-types/shared/locale.d.ts +3 -0
  677. package/types/colors.d.ts +102 -0
  678. package/types/colors.js +64 -0
  679. package/types/colors.js.map +1 -0
  680. package/types/fonts.d.ts +12 -0
  681. package/types/fonts.js +10 -0
  682. package/types/fonts.js.map +1 -0
  683. package/types/helpers.d.ts +23 -0
  684. package/types/products.d.ts +40 -0
  685. package/types/products.js +38 -0
  686. package/types/products.js.map +1 -0
  687. package/types/styles.d.ts +283 -0
  688. package/types/styles.js +161 -0
  689. package/types/styles.js.map +1 -0
  690. package/utils/filterComponents.d.ts +12 -0
  691. package/utils/filterComponents.js +24 -0
  692. package/utils/filterComponents.js.map +1 -0
  693. package/utils/getTextWidth.d.ts +6 -0
  694. package/utils/getTextWidth.js +32 -0
  695. package/utils/getTextWidth.js.map +1 -0
  696. package/utils/isComponent.d.ts +12 -0
  697. package/utils/isComponent.js +15 -0
  698. package/utils/isComponent.js.map +1 -0
  699. package/utils/partitionComponents.d.ts +10 -0
  700. package/utils/partitionComponents.js +26 -0
  701. package/utils/partitionComponents.js.map +1 -0
  702. package/utils/redsift-design-tokens.d.ts +1389 -0
  703. package/utils/redsift-design-tokens.js +1391 -0
  704. package/utils/redsift-design-tokens.js.map +1 -0
  705. package/utils/useId.d.ts +6 -0
  706. package/utils/useId.js +42 -0
  707. package/utils/useId.js.map +1 -0
  708. package/utils/warnIfNoAccessibleLabelFound.d.ts +11 -0
  709. package/utils/warnIfNoAccessibleLabelFound.js +20 -0
  710. package/utils/warnIfNoAccessibleLabelFound.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../../src/components/focus-within-group/types.ts"],"sourcesContent":["import { ComponentProps } from 'react';\n\nexport enum EventKey {\n ArrowLeft = 'ArrowLeft',\n ArrowRight = 'ArrowRight',\n ArrowUp = 'ArrowUp',\n ArrowDown = 'ArrowDown',\n Home = 'Home',\n End = 'End',\n Enter = 'Enter',\n}\n\nexport type KeyDirection = 'horizontal' | 'vertical' | 'both';\n\nexport enum Navigation {\n PREVIOUS = 'PREVIOUS',\n NEXT = 'NEXT',\n VERY_FIRST = 'VERY_FIRST',\n VERY_LAST = 'VERY_LAST',\n PREVIOUS_ROW = 'PREVIOUS_ROW',\n NEXT_ROW = 'NEXT_ROW',\n FIRST_IN_ROW = 'FIRST_IN_ROW',\n LAST_IN_ROW = 'LAST_IN_ROW',\n}\n\nexport type TabStop = Readonly<{\n id: string;\n domElementRef: React.RefObject<Element>;\n isDisabled: boolean;\n rowIndex: number | null;\n value: string;\n}>;\n\nexport type RowStartMap = Map<Exclude<TabStop['rowIndex'], null>, number>;\n\nexport type FocusWithinGroupState = Readonly<{\n selectedId: string | null;\n allowFocusing: boolean;\n tabStops: readonly TabStop[];\n direction: KeyDirection;\n focusOnClick: boolean;\n focusOnInit: boolean;\n loopAround: boolean;\n rowStartMap: RowStartMap | null;\n focusType: 'roving-tabindex' | 'virtual-focus';\n listRole: 'listbox' | 'menu';\n activedescendant?: [string, string];\n filter?: {\n value: string;\n type: 'startsWith' | 'contains' | 'endsWith';\n caseSensitive?: boolean;\n };\n delayedAction?: BaseFocusWithinGroupAction;\n maxOptionsLength?: number;\n}>;\n\nexport type FocusWithinGroupOptions = Partial<\n Pick<\n FocusWithinGroupState,\n | 'direction'\n | 'focusOnClick'\n | 'focusOnInit'\n | 'loopAround'\n | 'focusType'\n | 'listRole'\n | 'activedescendant'\n | 'maxOptionsLength'\n >\n>;\n\nexport enum FocusWithinGroupActionType {\n REGISTER_TAB_STOP = 'REGISTER_TAB_STOP',\n UNREGISTER_TAB_STOP = 'UNREGISTER_TAB_STOP',\n KEY_DOWN_ON_ITEM = 'KEY_DOWN_ON_ITEM',\n CLICK_ON_ITEM = 'CLICK_ON_ITEM',\n KEY_DOWN_ON_LIST = 'KEY_DOWN_ON_LIST',\n FOCUS_ON_LIST = 'FOCUS_ON_LIST',\n BLUR_ON_LIST = 'BLUR_ON_LIST',\n TAB_STOP_UPDATED = 'TAB_STOP_UPDATED',\n OPTIONS_UPDATED = 'OPTIONS_UPDATED',\n FILTER_LIST = 'FILTER_LIST',\n DELAY_ACTION = 'DELAY_ACTION',\n}\n\nexport type BaseFocusWithinGroupAction =\n | {\n type: FocusWithinGroupActionType.REGISTER_TAB_STOP;\n payload: TabStop;\n }\n | {\n type: FocusWithinGroupActionType.UNREGISTER_TAB_STOP;\n payload: { id: TabStop['id'] };\n }\n | {\n type: FocusWithinGroupActionType.TAB_STOP_UPDATED;\n payload: {\n id: TabStop['id'];\n rowIndex: TabStop['rowIndex'];\n isDisabled: TabStop['isDisabled'];\n value: string;\n };\n }\n | {\n type: FocusWithinGroupActionType.KEY_DOWN_ON_ITEM;\n payload: {\n id: TabStop['id'];\n key: EventKey;\n ctrlKey: boolean;\n };\n }\n | {\n type: FocusWithinGroupActionType.CLICK_ON_ITEM;\n payload: { id: TabStop['id'] };\n }\n | {\n type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST;\n payload: {\n key: EventKey;\n ctrlKey: boolean;\n };\n }\n | {\n type: FocusWithinGroupActionType.FOCUS_ON_LIST;\n payload: { id: TabStop['id']; filter?: FocusWithinGroupState['filter'] };\n }\n | {\n type: FocusWithinGroupActionType.BLUR_ON_LIST;\n payload: {};\n }\n | {\n type: FocusWithinGroupActionType.OPTIONS_UPDATED;\n payload: FocusWithinGroupOptions;\n }\n | {\n type: FocusWithinGroupActionType.FILTER_LIST;\n payload: { filter: FocusWithinGroupState['filter'] };\n };\nexport type FocusWithinGroupAction =\n | BaseFocusWithinGroupAction\n | {\n type: FocusWithinGroupActionType.DELAY_ACTION;\n payload: BaseFocusWithinGroupAction;\n };\n\nexport type UseFocusWithinGroupProps = {\n tabIndex?: number;\n isFocused: boolean;\n handleKeyDown: (event: React.KeyboardEvent) => void;\n handleClick: () => void;\n};\n\nexport type UseFocusGroupProps = {\n activedescendant: [string, string] | undefined;\n handleKeyDown: (event: React.KeyboardEvent) => void;\n handleFocus: () => void;\n handleBlur: () => void;\n};\n\nexport type FocusWithinGroupContextProps = {\n state: FocusWithinGroupState;\n dispatch: React.Dispatch<FocusWithinGroupAction>;\n};\n\n/**\n * Component props.\n */\nexport interface FocusWithinGroupProps extends ComponentProps<'div'>, FocusWithinGroupOptions {}\n"],"names":["EventKey","Navigation","FocusWithinGroupActionType"],"mappings":"AAEYA,IAAAA,QAAQ,0BAARA,QAAQ,EAAA;EAARA,QAAQ,CAAA,WAAA,CAAA,GAAA,WAAA,CAAA;EAARA,QAAQ,CAAA,YAAA,CAAA,GAAA,YAAA,CAAA;EAARA,QAAQ,CAAA,SAAA,CAAA,GAAA,SAAA,CAAA;EAARA,QAAQ,CAAA,WAAA,CAAA,GAAA,WAAA,CAAA;EAARA,QAAQ,CAAA,MAAA,CAAA,GAAA,MAAA,CAAA;EAARA,QAAQ,CAAA,KAAA,CAAA,GAAA,KAAA,CAAA;EAARA,QAAQ,CAAA,OAAA,CAAA,GAAA,OAAA,CAAA;AAAA,EAAA,OAARA,QAAQ,CAAA;AAAA,CAAA,CAAA,EAAA,EAAA;AAYRC,IAAAA,UAAU,0BAAVA,UAAU,EAAA;EAAVA,UAAU,CAAA,UAAA,CAAA,GAAA,UAAA,CAAA;EAAVA,UAAU,CAAA,MAAA,CAAA,GAAA,MAAA,CAAA;EAAVA,UAAU,CAAA,YAAA,CAAA,GAAA,YAAA,CAAA;EAAVA,UAAU,CAAA,WAAA,CAAA,GAAA,WAAA,CAAA;EAAVA,UAAU,CAAA,cAAA,CAAA,GAAA,cAAA,CAAA;EAAVA,UAAU,CAAA,UAAA,CAAA,GAAA,UAAA,CAAA;EAAVA,UAAU,CAAA,cAAA,CAAA,GAAA,cAAA,CAAA;EAAVA,UAAU,CAAA,aAAA,CAAA,GAAA,aAAA,CAAA;AAAA,EAAA,OAAVA,UAAU,CAAA;AAAA,CAAA,CAAA,EAAA,EAAA;AAwDVC,IAAAA,0BAA0B,0BAA1BA,0BAA0B,EAAA;EAA1BA,0BAA0B,CAAA,mBAAA,CAAA,GAAA,mBAAA,CAAA;EAA1BA,0BAA0B,CAAA,qBAAA,CAAA,GAAA,qBAAA,CAAA;EAA1BA,0BAA0B,CAAA,kBAAA,CAAA,GAAA,kBAAA,CAAA;EAA1BA,0BAA0B,CAAA,eAAA,CAAA,GAAA,eAAA,CAAA;EAA1BA,0BAA0B,CAAA,kBAAA,CAAA,GAAA,kBAAA,CAAA;EAA1BA,0BAA0B,CAAA,eAAA,CAAA,GAAA,eAAA,CAAA;EAA1BA,0BAA0B,CAAA,cAAA,CAAA,GAAA,cAAA,CAAA;EAA1BA,0BAA0B,CAAA,kBAAA,CAAA,GAAA,kBAAA,CAAA;EAA1BA,0BAA0B,CAAA,iBAAA,CAAA,GAAA,iBAAA,CAAA;EAA1BA,0BAA0B,CAAA,aAAA,CAAA,GAAA,aAAA,CAAA;EAA1BA,0BAA0B,CAAA,cAAA,CAAA,GAAA,cAAA,CAAA;AAAA,EAAA,OAA1BA,0BAA0B,CAAA;AAAA,CAAA,CAAA,EAAA,EAAA;;AA6FtC;AACA;AACA;;;;"}
@@ -0,0 +1,5 @@
1
+ import { UseFocusGroupProps } from './types.js';
2
+
3
+ declare function useFocusOnList(): UseFocusGroupProps;
4
+
5
+ export { useFocusOnList };
@@ -0,0 +1,44 @@
1
+ import { useContext, useCallback } from 'react';
2
+ import { FocusWithinGroupContext } from './context.js';
3
+ import { EventKey, FocusWithinGroupActionType } from './types.js';
4
+
5
+ function useFocusOnList() {
6
+ const context = useContext(FocusWithinGroupContext);
7
+ const handleKeyDown = useCallback(event => {
8
+ const key = EventKey[event.key];
9
+ if (!key) {
10
+ return;
11
+ }
12
+ context.dispatch({
13
+ type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,
14
+ payload: {
15
+ key,
16
+ ctrlKey: event.ctrlKey
17
+ }
18
+ });
19
+ event.preventDefault();
20
+ }, []);
21
+ const handleFocus = useCallback(() => {
22
+ context.dispatch({
23
+ type: FocusWithinGroupActionType.FOCUS_ON_LIST,
24
+ payload: {
25
+ id: context.state.selectedId
26
+ }
27
+ });
28
+ }, [context.state.selectedId]);
29
+ const handleBlur = useCallback(() => {
30
+ context.dispatch({
31
+ type: FocusWithinGroupActionType.BLUR_ON_LIST,
32
+ payload: {}
33
+ });
34
+ }, []);
35
+ return {
36
+ activedescendant: context.state.activedescendant,
37
+ handleKeyDown,
38
+ handleFocus,
39
+ handleBlur
40
+ };
41
+ }
42
+
43
+ export { useFocusOnList };
44
+ //# sourceMappingURL=useFocusOnList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFocusOnList.js","sources":["../../../src/components/focus-within-group/useFocusOnList.ts"],"sourcesContent":["import { useCallback, useContext, KeyboardEvent } from 'react';\nimport { FocusWithinGroupContext } from './context';\nimport { FocusWithinGroupActionType, EventKey, UseFocusGroupProps } from './types';\n\nexport function useFocusOnList(): UseFocusGroupProps {\n const context = useContext(FocusWithinGroupContext);\n\n const handleKeyDown = useCallback((event: KeyboardEvent) => {\n const key = EventKey[event.key as EventKey];\n if (!key) {\n return;\n }\n context.dispatch({\n type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST,\n payload: { key, ctrlKey: event.ctrlKey },\n });\n event.preventDefault();\n }, []);\n\n const handleFocus = useCallback(() => {\n context.dispatch({\n type: FocusWithinGroupActionType.FOCUS_ON_LIST,\n payload: {\n id: context.state.selectedId!,\n },\n });\n }, [context.state.selectedId]);\n\n const handleBlur = useCallback(() => {\n context.dispatch({\n type: FocusWithinGroupActionType.BLUR_ON_LIST,\n payload: {},\n });\n }, []);\n\n return {\n activedescendant: context.state.activedescendant,\n handleKeyDown,\n handleFocus,\n handleBlur,\n };\n}\n"],"names":["useFocusOnList","context","useContext","FocusWithinGroupContext","handleKeyDown","useCallback","event","key","EventKey","dispatch","type","FocusWithinGroupActionType","KEY_DOWN_ON_LIST","payload","ctrlKey","preventDefault","handleFocus","FOCUS_ON_LIST","id","state","selectedId","handleBlur","BLUR_ON_LIST","activedescendant"],"mappings":";;;;AAIO,SAASA,cAAcA,GAAuB;AACnD,EAAA,MAAMC,OAAO,GAAGC,UAAU,CAACC,uBAAuB,CAAC,CAAA;AAEnD,EAAA,MAAMC,aAAa,GAAGC,WAAW,CAAEC,KAAoB,IAAK;AAC1D,IAAA,MAAMC,GAAG,GAAGC,QAAQ,CAACF,KAAK,CAACC,GAAG,CAAa,CAAA;IAC3C,IAAI,CAACA,GAAG,EAAE;AACR,MAAA,OAAA;AACF,KAAA;IACAN,OAAO,CAACQ,QAAQ,CAAC;MACfC,IAAI,EAAEC,0BAA0B,CAACC,gBAAgB;AACjDC,MAAAA,OAAO,EAAE;QAAEN,GAAG;QAAEO,OAAO,EAAER,KAAK,CAACQ,OAAAA;AAAQ,OAAA;AACzC,KAAC,CAAC,CAAA;IACFR,KAAK,CAACS,cAAc,EAAE,CAAA;GACvB,EAAE,EAAE,CAAC,CAAA;AAEN,EAAA,MAAMC,WAAW,GAAGX,WAAW,CAAC,MAAM;IACpCJ,OAAO,CAACQ,QAAQ,CAAC;MACfC,IAAI,EAAEC,0BAA0B,CAACM,aAAa;AAC9CJ,MAAAA,OAAO,EAAE;AACPK,QAAAA,EAAE,EAAEjB,OAAO,CAACkB,KAAK,CAACC,UAAAA;AACpB,OAAA;AACF,KAAC,CAAC,CAAA;GACH,EAAE,CAACnB,OAAO,CAACkB,KAAK,CAACC,UAAU,CAAC,CAAC,CAAA;AAE9B,EAAA,MAAMC,UAAU,GAAGhB,WAAW,CAAC,MAAM;IACnCJ,OAAO,CAACQ,QAAQ,CAAC;MACfC,IAAI,EAAEC,0BAA0B,CAACW,YAAY;AAC7CT,MAAAA,OAAO,EAAE,EAAC;AACZ,KAAC,CAAC,CAAA;GACH,EAAE,EAAE,CAAC,CAAA;EAEN,OAAO;AACLU,IAAAA,gBAAgB,EAAEtB,OAAO,CAACkB,KAAK,CAACI,gBAAgB;IAChDnB,aAAa;IACbY,WAAW;AACXK,IAAAA,UAAAA;GACD,CAAA;AACH;;;;"}
@@ -0,0 +1,39 @@
1
+ import { RefObject } from 'react';
2
+ import { UseFocusWithinGroupProps } from './types.js';
3
+
4
+ declare function uniqueId(): string;
5
+ /**
6
+ * Includes the given DOM element in the current roving tabindex.
7
+ * @param {RefObject<Element>} domElementRef The DOM element to include.
8
+ * This must be the same DOM element for the lifetime of the containing
9
+ * component.
10
+ * @param {boolean} isDisabled Whether or not the DOM element is currently
11
+ * enabled. This value can be updated as appropriate throughout the lifetime
12
+ * of the containing component.
13
+ * @param {number?} rowIndex An optional integer value that must be
14
+ * populated if the roving tabindex is being used in a grid. In that case,
15
+ * set it to the zero-based index of the row that the given DOM element
16
+ * is currently part of. You can update this row index as appropriate
17
+ * throughout the lifetime of the containing component, for example if
18
+ * the shape of the grid can change dynamically.
19
+ * @returns A tuple of values to be applied by the containing
20
+ * component for the roving tabindex to work correctly.
21
+ * First tuple value: The tabIndex value to apply to the tab stop
22
+ * element.
23
+ * Second tuple value: Whether or not focus() should be invoked on the
24
+ * tab stop element.
25
+ * Third tuple value: The onKeyDown callback to apply to the tab
26
+ * stop element. If the key press is relevant to the hook then
27
+ * event.preventDefault() will be invoked on the event.
28
+ * Fourth tuple value: The onClick callback to apply to the tab
29
+ * stop element.
30
+ */
31
+ declare function useFocusOnListItem(props: {
32
+ domElementRef: RefObject<Element>;
33
+ isDisabled: boolean;
34
+ id?: string;
35
+ value?: string;
36
+ rowIndex?: number | null;
37
+ }): UseFocusWithinGroupProps;
38
+
39
+ export { uniqueId, useFocusOnListItem };
@@ -0,0 +1,148 @@
1
+ import { useRef, useContext, useEffect, useCallback } from 'react';
2
+ import { FocusWithinGroupContext } from './context.js';
3
+ import { FocusWithinGroupActionType, EventKey } from './types.js';
4
+
5
+ let counter = 0;
6
+ function uniqueId() {
7
+ return `rti_${++counter}`;
8
+ }
9
+
10
+ /**
11
+ * Includes the given DOM element in the current roving tabindex.
12
+ * @param {RefObject<Element>} domElementRef The DOM element to include.
13
+ * This must be the same DOM element for the lifetime of the containing
14
+ * component.
15
+ * @param {boolean} isDisabled Whether or not the DOM element is currently
16
+ * enabled. This value can be updated as appropriate throughout the lifetime
17
+ * of the containing component.
18
+ * @param {number?} rowIndex An optional integer value that must be
19
+ * populated if the roving tabindex is being used in a grid. In that case,
20
+ * set it to the zero-based index of the row that the given DOM element
21
+ * is currently part of. You can update this row index as appropriate
22
+ * throughout the lifetime of the containing component, for example if
23
+ * the shape of the grid can change dynamically.
24
+ * @returns A tuple of values to be applied by the containing
25
+ * component for the roving tabindex to work correctly.
26
+ * First tuple value: The tabIndex value to apply to the tab stop
27
+ * element.
28
+ * Second tuple value: Whether or not focus() should be invoked on the
29
+ * tab stop element.
30
+ * Third tuple value: The onKeyDown callback to apply to the tab
31
+ * stop element. If the key press is relevant to the hook then
32
+ * event.preventDefault() will be invoked on the event.
33
+ * Fourth tuple value: The onClick callback to apply to the tab
34
+ * stop element.
35
+ */
36
+ function useFocusOnListItem(props) {
37
+ var _context$state$active;
38
+ const {
39
+ domElementRef,
40
+ isDisabled,
41
+ id,
42
+ value,
43
+ rowIndex = null
44
+ } = props;
45
+ // Create a stable ID for the lifetime of the component:
46
+ const idRef = useRef(null);
47
+ function getId() {
48
+ if (id) {
49
+ return id;
50
+ }
51
+ if (!idRef.current) {
52
+ idRef.current = uniqueId();
53
+ }
54
+ return idRef.current;
55
+ }
56
+ const isMounted = useRef(false);
57
+ const context = useContext(FocusWithinGroupContext);
58
+
59
+ // Register the tab stop on mount and unregister it on unmount:
60
+ useEffect(() => {
61
+ const id = getId();
62
+ context.dispatch({
63
+ type: FocusWithinGroupActionType.REGISTER_TAB_STOP,
64
+ payload: {
65
+ id,
66
+ domElementRef,
67
+ rowIndex,
68
+ isDisabled,
69
+ value: value
70
+ }
71
+ });
72
+ return () => {
73
+ context.dispatch({
74
+ type: FocusWithinGroupActionType.UNREGISTER_TAB_STOP,
75
+ payload: {
76
+ id
77
+ }
78
+ });
79
+ };
80
+ }, []);
81
+
82
+ // Update the tab stop data if rowIndex or isDisabled change.
83
+ // The isMounted flag is used to prevent this effect running
84
+ // on mount, which is benign but redundant (as the
85
+ // REGISTER_TAB_STOP action would have just been dispatched).
86
+ useEffect(() => {
87
+ if (isMounted.current) {
88
+ context.dispatch({
89
+ type: FocusWithinGroupActionType.TAB_STOP_UPDATED,
90
+ payload: {
91
+ id: getId(),
92
+ rowIndex,
93
+ isDisabled,
94
+ value: value || ''
95
+ }
96
+ });
97
+ } else {
98
+ isMounted.current = true;
99
+ }
100
+ }, [rowIndex, isDisabled]);
101
+
102
+ // Create a stable callback function for handling key down events:
103
+ const handleKeyDown = useCallback(event => {
104
+ const key = EventKey[event.key];
105
+ if (!key) {
106
+ return;
107
+ }
108
+ context.dispatch({
109
+ type: FocusWithinGroupActionType.KEY_DOWN_ON_ITEM,
110
+ payload: {
111
+ id: getId(),
112
+ key,
113
+ ctrlKey: event.ctrlKey
114
+ }
115
+ });
116
+ event.preventDefault();
117
+ }, []);
118
+
119
+ // Create a stable callback function for handling click events:
120
+ const handleClick = useCallback(() => {
121
+ context.dispatch({
122
+ type: FocusWithinGroupActionType.CLICK_ON_ITEM,
123
+ payload: {
124
+ id: getId()
125
+ }
126
+ });
127
+ }, []);
128
+
129
+ // Determine if the current tab stop is the currently active one:
130
+ const selected = getId() === context.state.selectedId;
131
+ const tabIndex = context.state.focusType === 'roving-tabindex' ? selected ? 0 : -1 : undefined;
132
+ const isFocused = selected && context.state.allowFocusing;
133
+ useEffect(() => {
134
+ if (isFocused && domElementRef.current && context.state.focusType === 'roving-tabindex') {
135
+ var _current;
136
+ (_current = domElementRef.current) === null || _current === void 0 ? void 0 : _current.focus();
137
+ }
138
+ }, [isFocused]);
139
+ return {
140
+ tabIndex,
141
+ isFocused: context.state.focusType === 'roving-tabindex' ? isFocused && document.activeElement === domElementRef.current : selected && ((_context$state$active = context.state.activedescendant) === null || _context$state$active === void 0 ? void 0 : _context$state$active[0]) === getId(),
142
+ handleKeyDown,
143
+ handleClick
144
+ };
145
+ }
146
+
147
+ export { uniqueId, useFocusOnListItem };
148
+ //# sourceMappingURL=useFocusOnListItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFocusOnListItem.js","sources":["../../../src/components/focus-within-group/useFocusOnListItem.ts"],"sourcesContent":["import { useCallback, useRef, useContext, useEffect, RefObject, KeyboardEvent } from 'react';\nimport { FocusWithinGroupContext } from './context';\nimport { FocusWithinGroupActionType, EventKey, UseFocusWithinGroupProps } from './types';\n\nlet counter = 0;\n\nexport function uniqueId(): string {\n return `rti_${++counter}`;\n}\n\n/**\n * Includes the given DOM element in the current roving tabindex.\n * @param {RefObject<Element>} domElementRef The DOM element to include.\n * This must be the same DOM element for the lifetime of the containing\n * component.\n * @param {boolean} isDisabled Whether or not the DOM element is currently\n * enabled. This value can be updated as appropriate throughout the lifetime\n * of the containing component.\n * @param {number?} rowIndex An optional integer value that must be\n * populated if the roving tabindex is being used in a grid. In that case,\n * set it to the zero-based index of the row that the given DOM element\n * is currently part of. You can update this row index as appropriate\n * throughout the lifetime of the containing component, for example if\n * the shape of the grid can change dynamically.\n * @returns A tuple of values to be applied by the containing\n * component for the roving tabindex to work correctly.\n * First tuple value: The tabIndex value to apply to the tab stop\n * element.\n * Second tuple value: Whether or not focus() should be invoked on the\n * tab stop element.\n * Third tuple value: The onKeyDown callback to apply to the tab\n * stop element. If the key press is relevant to the hook then\n * event.preventDefault() will be invoked on the event.\n * Fourth tuple value: The onClick callback to apply to the tab\n * stop element.\n */\nexport function useFocusOnListItem(props: {\n domElementRef: RefObject<Element>;\n isDisabled: boolean;\n id?: string;\n value?: string;\n rowIndex?: number | null;\n}): UseFocusWithinGroupProps {\n const { domElementRef, isDisabled, id, value, rowIndex = null } = props;\n // Create a stable ID for the lifetime of the component:\n const idRef = useRef<string | null>(null);\n\n function getId() {\n if (id) {\n return id;\n }\n\n if (!idRef.current) {\n idRef.current = uniqueId();\n }\n return idRef.current;\n }\n\n const isMounted = useRef(false);\n const context = useContext(FocusWithinGroupContext);\n\n // Register the tab stop on mount and unregister it on unmount:\n useEffect(() => {\n const id = getId();\n context.dispatch({\n type: FocusWithinGroupActionType.REGISTER_TAB_STOP,\n payload: {\n id,\n domElementRef,\n rowIndex,\n isDisabled,\n value: value!,\n },\n });\n return (): void => {\n context.dispatch({\n type: FocusWithinGroupActionType.UNREGISTER_TAB_STOP,\n payload: { id },\n });\n };\n }, []);\n\n // Update the tab stop data if rowIndex or isDisabled change.\n // The isMounted flag is used to prevent this effect running\n // on mount, which is benign but redundant (as the\n // REGISTER_TAB_STOP action would have just been dispatched).\n useEffect(() => {\n if (isMounted.current) {\n context.dispatch({\n type: FocusWithinGroupActionType.TAB_STOP_UPDATED,\n payload: {\n id: getId(),\n rowIndex,\n isDisabled,\n value: value || '',\n },\n });\n } else {\n isMounted.current = true;\n }\n }, [rowIndex, isDisabled]);\n\n // Create a stable callback function for handling key down events:\n const handleKeyDown = useCallback((event: KeyboardEvent) => {\n const key = EventKey[event.key as EventKey];\n if (!key) {\n return;\n }\n context.dispatch({\n type: FocusWithinGroupActionType.KEY_DOWN_ON_ITEM,\n payload: { id: getId(), key, ctrlKey: event.ctrlKey },\n });\n event.preventDefault();\n }, []);\n\n // Create a stable callback function for handling click events:\n const handleClick = useCallback(() => {\n context.dispatch({\n type: FocusWithinGroupActionType.CLICK_ON_ITEM,\n payload: { id: getId() },\n });\n }, []);\n\n // Determine if the current tab stop is the currently active one:\n const selected = getId() === context.state.selectedId;\n\n const tabIndex = context.state.focusType === 'roving-tabindex' ? (selected ? 0 : -1) : undefined;\n const isFocused = selected && context.state.allowFocusing;\n\n useEffect(() => {\n if (isFocused && domElementRef.current && context.state.focusType === 'roving-tabindex') {\n (domElementRef as RefObject<SVGElement | HTMLElement>).current?.focus();\n }\n }, [isFocused]);\n\n return {\n tabIndex,\n isFocused:\n context.state.focusType === 'roving-tabindex'\n ? isFocused && document.activeElement === (domElementRef as RefObject<SVGElement | HTMLElement>).current\n : selected && context.state.activedescendant?.[0] === getId(),\n handleKeyDown,\n handleClick,\n };\n}\n"],"names":["counter","uniqueId","useFocusOnListItem","props","_context$state$active","domElementRef","isDisabled","id","value","rowIndex","idRef","useRef","getId","current","isMounted","context","useContext","FocusWithinGroupContext","useEffect","dispatch","type","FocusWithinGroupActionType","REGISTER_TAB_STOP","payload","UNREGISTER_TAB_STOP","TAB_STOP_UPDATED","handleKeyDown","useCallback","event","key","EventKey","KEY_DOWN_ON_ITEM","ctrlKey","preventDefault","handleClick","CLICK_ON_ITEM","selected","state","selectedId","tabIndex","focusType","undefined","isFocused","allowFocusing","_current","focus","document","activeElement","activedescendant"],"mappings":";;;;AAIA,IAAIA,OAAO,GAAG,CAAC,CAAA;AAER,SAASC,QAAQA,GAAW;EACjC,OAAQ,CAAA,IAAA,EAAM,EAAED,OAAQ,CAAC,CAAA,CAAA;AAC3B,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,kBAAkBA,CAACC,KAMlC,EAA4B;AAAA,EAAA,IAAAC,qBAAA,CAAA;EAC3B,MAAM;IAAEC,aAAa;IAAEC,UAAU;IAAEC,EAAE;IAAEC,KAAK;AAAEC,IAAAA,QAAQ,GAAG,IAAA;AAAK,GAAC,GAAGN,KAAK,CAAA;AACvE;AACA,EAAA,MAAMO,KAAK,GAAGC,MAAM,CAAgB,IAAI,CAAC,CAAA;EAEzC,SAASC,KAAKA,GAAG;AACf,IAAA,IAAIL,EAAE,EAAE;AACN,MAAA,OAAOA,EAAE,CAAA;AACX,KAAA;AAEA,IAAA,IAAI,CAACG,KAAK,CAACG,OAAO,EAAE;AAClBH,MAAAA,KAAK,CAACG,OAAO,GAAGZ,QAAQ,EAAE,CAAA;AAC5B,KAAA;IACA,OAAOS,KAAK,CAACG,OAAO,CAAA;AACtB,GAAA;AAEA,EAAA,MAAMC,SAAS,GAAGH,MAAM,CAAC,KAAK,CAAC,CAAA;AAC/B,EAAA,MAAMI,OAAO,GAAGC,UAAU,CAACC,uBAAuB,CAAC,CAAA;;AAEnD;AACAC,EAAAA,SAAS,CAAC,MAAM;AACd,IAAA,MAAMX,EAAE,GAAGK,KAAK,EAAE,CAAA;IAClBG,OAAO,CAACI,QAAQ,CAAC;MACfC,IAAI,EAAEC,0BAA0B,CAACC,iBAAiB;AAClDC,MAAAA,OAAO,EAAE;QACPhB,EAAE;QACFF,aAAa;QACbI,QAAQ;QACRH,UAAU;AACVE,QAAAA,KAAK,EAAEA,KAAAA;AACT,OAAA;AACF,KAAC,CAAC,CAAA;AACF,IAAA,OAAO,MAAY;MACjBO,OAAO,CAACI,QAAQ,CAAC;QACfC,IAAI,EAAEC,0BAA0B,CAACG,mBAAmB;AACpDD,QAAAA,OAAO,EAAE;AAAEhB,UAAAA,EAAAA;AAAG,SAAA;AAChB,OAAC,CAAC,CAAA;KACH,CAAA;GACF,EAAE,EAAE,CAAC,CAAA;;AAEN;AACA;AACA;AACA;AACAW,EAAAA,SAAS,CAAC,MAAM;IACd,IAAIJ,SAAS,CAACD,OAAO,EAAE;MACrBE,OAAO,CAACI,QAAQ,CAAC;QACfC,IAAI,EAAEC,0BAA0B,CAACI,gBAAgB;AACjDF,QAAAA,OAAO,EAAE;UACPhB,EAAE,EAAEK,KAAK,EAAE;UACXH,QAAQ;UACRH,UAAU;UACVE,KAAK,EAAEA,KAAK,IAAI,EAAA;AAClB,SAAA;AACF,OAAC,CAAC,CAAA;AACJ,KAAC,MAAM;MACLM,SAAS,CAACD,OAAO,GAAG,IAAI,CAAA;AAC1B,KAAA;AACF,GAAC,EAAE,CAACJ,QAAQ,EAAEH,UAAU,CAAC,CAAC,CAAA;;AAE1B;AACA,EAAA,MAAMoB,aAAa,GAAGC,WAAW,CAAEC,KAAoB,IAAK;AAC1D,IAAA,MAAMC,GAAG,GAAGC,QAAQ,CAACF,KAAK,CAACC,GAAG,CAAa,CAAA;IAC3C,IAAI,CAACA,GAAG,EAAE;AACR,MAAA,OAAA;AACF,KAAA;IACAd,OAAO,CAACI,QAAQ,CAAC;MACfC,IAAI,EAAEC,0BAA0B,CAACU,gBAAgB;AACjDR,MAAAA,OAAO,EAAE;QAAEhB,EAAE,EAAEK,KAAK,EAAE;QAAEiB,GAAG;QAAEG,OAAO,EAAEJ,KAAK,CAACI,OAAAA;AAAQ,OAAA;AACtD,KAAC,CAAC,CAAA;IACFJ,KAAK,CAACK,cAAc,EAAE,CAAA;GACvB,EAAE,EAAE,CAAC,CAAA;;AAEN;AACA,EAAA,MAAMC,WAAW,GAAGP,WAAW,CAAC,MAAM;IACpCZ,OAAO,CAACI,QAAQ,CAAC;MACfC,IAAI,EAAEC,0BAA0B,CAACc,aAAa;AAC9CZ,MAAAA,OAAO,EAAE;QAAEhB,EAAE,EAAEK,KAAK,EAAC;AAAE,OAAA;AACzB,KAAC,CAAC,CAAA;GACH,EAAE,EAAE,CAAC,CAAA;;AAEN;EACA,MAAMwB,QAAQ,GAAGxB,KAAK,EAAE,KAAKG,OAAO,CAACsB,KAAK,CAACC,UAAU,CAAA;AAErD,EAAA,MAAMC,QAAQ,GAAGxB,OAAO,CAACsB,KAAK,CAACG,SAAS,KAAK,iBAAiB,GAAIJ,QAAQ,GAAG,CAAC,GAAG,CAAC,CAAC,GAAIK,SAAS,CAAA;EAChG,MAAMC,SAAS,GAAGN,QAAQ,IAAIrB,OAAO,CAACsB,KAAK,CAACM,aAAa,CAAA;AAEzDzB,EAAAA,SAAS,CAAC,MAAM;AACd,IAAA,IAAIwB,SAAS,IAAIrC,aAAa,CAACQ,OAAO,IAAIE,OAAO,CAACsB,KAAK,CAACG,SAAS,KAAK,iBAAiB,EAAE;AAAA,MAAA,IAAAI,QAAA,CAAA;AACvF,MAAA,CAAAA,QAAA,GAACvC,aAAa,CAAyCQ,OAAO,MAAA,IAAA,IAAA+B,QAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAA9DA,QAAA,CAAgEC,KAAK,EAAE,CAAA;AACzE,KAAA;AACF,GAAC,EAAE,CAACH,SAAS,CAAC,CAAC,CAAA;EAEf,OAAO;IACLH,QAAQ;AACRG,IAAAA,SAAS,EACP3B,OAAO,CAACsB,KAAK,CAACG,SAAS,KAAK,iBAAiB,GACzCE,SAAS,IAAII,QAAQ,CAACC,aAAa,KAAM1C,aAAa,CAAyCQ,OAAO,GACtGuB,QAAQ,IAAI,EAAAhC,qBAAA,GAAAW,OAAO,CAACsB,KAAK,CAACW,gBAAgB,MAAA,IAAA,IAAA5C,qBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAA9BA,qBAAA,CAAiC,CAAC,CAAC,MAAKQ,KAAK,EAAE;IACjEc,aAAa;AACbQ,IAAAA,WAAAA;GACD,CAAA;AACH;;;;"}
@@ -0,0 +1,14 @@
1
+ import * as styled_components from 'styled-components';
2
+ import { ButtonProps } from '../button/types.js';
3
+
4
+ declare const StyledGradientBorder: styled_components.StyledComponent<"div", any, {
5
+ $borderRadius?: string | undefined;
6
+ $color?: ButtonProps['color'];
7
+ $isActive?: ButtonProps['isActive'];
8
+ $isDisabled?: ButtonProps['isDisabled'];
9
+ $isHovered?: ButtonProps['isHovered'];
10
+ $theme?: ButtonProps['theme'];
11
+ width?: string | undefined;
12
+ }, never>;
13
+
14
+ export { StyledGradientBorder };
@@ -0,0 +1,38 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { Theme } from '../../types/colors.js';
3
+
4
+ const StyledGradientBorder = styled.div`
5
+ ${_ref => {
6
+ let {
7
+ $borderRadius,
8
+ $color,
9
+ $isActive,
10
+ $isDisabled,
11
+ $isHovered,
12
+ $theme,
13
+ width
14
+ } = _ref;
15
+ return css`
16
+ background: transparent;
17
+ border-radius: ${$borderRadius !== null && $borderRadius !== void 0 ? $borderRadius : '4px'};
18
+ width: ${width !== null && width !== void 0 ? width : 'fit-content'};
19
+
20
+ ${!$isDisabled ? css`
21
+ border: 1px solid transparent;
22
+ background-clip: padding-box, border-box;
23
+ background-origin: border-box;
24
+ background-image: linear-gradient(
25
+ 90deg,
26
+ var(--redsift-color-neutral-${$theme === Theme.dark ? 'x-dark-grey' : 'white'}),
27
+ var(--redsift-color-neutral-${$theme === Theme.dark ? 'x-dark-grey' : 'white'})
28
+ ),
29
+ var(
30
+ --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-${$isDisabled ? 'disabled' : $isActive ? 'active' : $isHovered ? 'hover' : 'default'}
31
+ );
32
+ ` : ''}
33
+ `;
34
+ }};
35
+ `;
36
+
37
+ export { StyledGradientBorder };
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/gradient-border/index.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { ButtonProps } from '../button';\nimport { Theme } from '../../types';\n\nexport const StyledGradientBorder = styled.div<{\n $borderRadius?: string;\n $color?: ButtonProps['color'];\n $isActive?: ButtonProps['isActive'];\n $isDisabled?: ButtonProps['isDisabled'];\n $isHovered?: ButtonProps['isHovered'];\n $theme?: ButtonProps['theme'];\n width?: string;\n}>`\n ${({ $borderRadius, $color, $isActive, $isDisabled, $isHovered, $theme, width }) => css`\n background: transparent;\n border-radius: ${$borderRadius ?? '4px'};\n width: ${width ?? 'fit-content'};\n\n ${!$isDisabled\n ? css`\n border: 1px solid transparent;\n background-clip: padding-box, border-box;\n background-origin: border-box;\n background-image: linear-gradient(\n 90deg,\n var(--redsift-color-neutral-${$theme === Theme.dark ? 'x-dark-grey' : 'white'}),\n var(--redsift-color-neutral-${$theme === Theme.dark ? 'x-dark-grey' : 'white'})\n ),\n var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-${$isDisabled ? 'disabled' : $isActive ? 'active' : $isHovered ? 'hover' : 'default'}\n );\n `\n : ''}\n `};\n`;\n"],"names":["StyledGradientBorder","styled","div","_ref","$borderRadius","$color","$isActive","$isDisabled","$isHovered","$theme","width","css","Theme","dark"],"mappings":";;;AAIaA,MAAAA,oBAAoB,GAAGC,MAAM,CAACC,GAQxC,CAAA;AACH,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;IAAEC,aAAa;IAAEC,MAAM;IAAEC,SAAS;IAAEC,WAAW;IAAEC,UAAU;IAAEC,MAAM;AAAEC,IAAAA,KAAAA;AAAM,GAAC,GAAAP,IAAA,CAAA;AAAA,EAAA,OAAKQ,GAAI,CAAA;AAC1F;AACA,mBAAA,EAAqBP,aAAa,KAAbA,IAAAA,IAAAA,aAAa,KAAbA,KAAAA,CAAAA,GAAAA,aAAa,GAAI,KAAM,CAAA;AAC5C,WAAA,EAAaM,KAAK,KAALA,IAAAA,IAAAA,KAAK,KAALA,KAAAA,CAAAA,GAAAA,KAAK,GAAI,aAAc,CAAA;AACpC;AACA,IAAM,EAAA,CAACH,WAAW,GACVI,GAAI,CAAA;AACZ;AACA;AACA;AACA;AACA;AACA,0CAA4CF,EAAAA,MAAM,KAAKG,KAAK,CAACC,IAAI,GAAG,aAAa,GAAG,OAAQ,CAAA;AAC5F,0CAA4CJ,EAAAA,MAAM,KAAKG,KAAK,CAACC,IAAI,GAAG,aAAa,GAAG,OAAQ,CAAA;AAC5F;AACA;AACA,8BAAA,EAAgCJ,MAAO,CAAuCJ,qCAAAA,EAAAA,MAAO,CAAQE,MAAAA,EAAAA,WAAW,GAAG,UAAU,GAAGD,SAAS,GAAG,QAAQ,GAAGE,UAAU,GAAG,OAAO,GAAG,SAAU,CAAA;AAChL;AACA,QAAA,CAAS,GACD,EAAG,CAAA;AACX,EAAG,CAAA,CAAA;AAAA,CAAC,CAAA;AACJ;;;;"}
@@ -0,0 +1,13 @@
1
+ import { GridProps } from './types.js';
2
+ import { Comp } from '../../types/helpers.js';
3
+ import { GridItemProps } from '../grid-item/types.js';
4
+
5
+ /**
6
+ * The Grid component.
7
+ */
8
+ declare const BaseGrid: Comp<GridProps, HTMLDivElement>;
9
+ declare const Grid: Comp<GridProps, HTMLDivElement> & {
10
+ Item: Comp<GridItemProps, HTMLDivElement>;
11
+ };
12
+
13
+ export { BaseGrid, Grid };
@@ -0,0 +1,45 @@
1
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React__default, { forwardRef } from 'react';
3
+ import classNames from 'classnames';
4
+ import { StyledGrid } from './styles.js';
5
+ import { GridItem } from '../grid-item/GridItem.js';
6
+ import { useTheme } from '../theme/useTheme.js';
7
+ import { ThemeProvider } from '../theme/context.js';
8
+
9
+ const _excluded = ["children", "className", "divider", "gap", "theme"];
10
+ const COMPONENT_NAME = 'Grid';
11
+ const CLASSNAME = 'redsift-grid';
12
+
13
+ /**
14
+ * The Grid component.
15
+ */
16
+ const BaseGrid = /*#__PURE__*/forwardRef((props, ref) => {
17
+ const {
18
+ children,
19
+ className,
20
+ divider,
21
+ gap,
22
+ theme: propsTheme
23
+ } = props,
24
+ forwardedProps = _objectWithoutProperties(props, _excluded);
25
+ const theme = useTheme(propsTheme);
26
+ return /*#__PURE__*/React__default.createElement(ThemeProvider, {
27
+ value: {
28
+ theme
29
+ }
30
+ }, /*#__PURE__*/React__default.createElement(StyledGrid, _extends({}, forwardedProps, {
31
+ gap: divider ? `${divider.rowGap}px ${divider.colGap}px` : gap,
32
+ className: classNames(BaseGrid.className, className),
33
+ ref: ref,
34
+ $divider: divider,
35
+ $theme: theme
36
+ }), children));
37
+ });
38
+ BaseGrid.className = CLASSNAME;
39
+ BaseGrid.displayName = COMPONENT_NAME;
40
+ const Grid = Object.assign(BaseGrid, {
41
+ Item: GridItem
42
+ });
43
+
44
+ export { BaseGrid, Grid };
45
+ //# sourceMappingURL=Grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Grid.js","sources":["../../../src/components/grid/Grid.tsx"],"sourcesContent":["import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp } from '../../types';\nimport { StyledGrid } from './styles';\nimport { GridProps } from './types';\nimport { GridItem } from '../grid-item';\nimport { ThemeProvider, useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'Grid';\nconst CLASSNAME = 'redsift-grid';\n\n/**\n * The Grid component.\n */\nexport const BaseGrid: Comp<GridProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, divider, gap, theme: propsTheme, ...forwardedProps } = props;\n const theme = useTheme(propsTheme);\n\n return (\n <ThemeProvider value={{ theme }}>\n <StyledGrid\n {...forwardedProps}\n gap={divider ? `${divider.rowGap}px ${divider.colGap}px` : gap}\n className={classNames(BaseGrid.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n $divider={divider}\n $theme={theme}\n >\n {children}\n </StyledGrid>\n </ThemeProvider>\n );\n});\nBaseGrid.className = CLASSNAME;\nBaseGrid.displayName = COMPONENT_NAME;\n\nexport const Grid = Object.assign(BaseGrid, {\n Item: GridItem,\n});\n"],"names":["COMPONENT_NAME","CLASSNAME","BaseGrid","forwardRef","props","ref","children","className","divider","gap","theme","propsTheme","forwardedProps","_objectWithoutProperties","_excluded","useTheme","React","createElement","ThemeProvider","value","StyledGrid","_extends","rowGap","colGap","classNames","$divider","$theme","displayName","Grid","Object","assign","Item","GridItem"],"mappings":";;;;;;;;;AAQA,MAAMA,cAAc,GAAG,MAAM,CAAA;AAC7B,MAAMC,SAAS,GAAG,cAAc,CAAA;;AAEhC;AACA;AACA;AACO,MAAMC,QAAyC,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAClF,MAAM;MAAEC,QAAQ;MAAEC,SAAS;MAAEC,OAAO;MAAEC,GAAG;AAAEC,MAAAA,KAAK,EAAEC,UAAAA;AAA8B,KAAC,GAAGP,KAAK;AAAxBQ,IAAAA,cAAc,GAAAC,wBAAA,CAAKT,KAAK,EAAAU,SAAA,CAAA,CAAA;AACzF,EAAA,MAAMJ,KAAK,GAAGK,QAAQ,CAACJ,UAAU,CAAC,CAAA;AAElC,EAAA,oBACEK,cAAA,CAAAC,aAAA,CAACC,aAAa,EAAA;AAACC,IAAAA,KAAK,EAAE;AAAET,MAAAA,KAAAA;AAAM,KAAA;GAC5BM,eAAAA,cAAA,CAAAC,aAAA,CAACG,UAAU,EAAAC,QAAA,KACLT,cAAc,EAAA;AAClBH,IAAAA,GAAG,EAAED,OAAO,GAAI,CAAA,EAAEA,OAAO,CAACc,MAAO,CAAA,GAAA,EAAKd,OAAO,CAACe,MAAO,CAAA,EAAA,CAAG,GAAGd,GAAI;IAC/DF,SAAS,EAAEiB,UAAU,CAACtB,QAAQ,CAACK,SAAS,EAAEA,SAAS,CAAE;AACrDF,IAAAA,GAAG,EAAEA,GAAiC;AACtCoB,IAAAA,QAAQ,EAAEjB,OAAQ;AAClBkB,IAAAA,MAAM,EAAEhB,KAAAA;GAEPJ,CAAAA,EAAAA,QACS,CACC,CAAC,CAAA;AAEpB,CAAC,EAAC;AACFJ,QAAQ,CAACK,SAAS,GAAGN,SAAS,CAAA;AAC9BC,QAAQ,CAACyB,WAAW,GAAG3B,cAAc,CAAA;AAE9B,MAAM4B,IAAI,GAAGC,MAAM,CAACC,MAAM,CAAC5B,QAAQ,EAAE;AAC1C6B,EAAAA,IAAI,EAAEC,QAAAA;AACR,CAAC;;;;"}
@@ -0,0 +1,55 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { baseStyling, baseInternalSpacing, baseGrid, baseBorder } from '../shared/styles.js';
3
+
4
+ /**
5
+ * Component style.
6
+ */
7
+ const StyledGrid = styled.div`
8
+ display: ${_ref => {
9
+ let {
10
+ inline
11
+ } = _ref;
12
+ return inline ? 'inline-grid' : 'grid';
13
+ }};
14
+ flex: 1;
15
+
16
+ ${baseStyling}
17
+ ${baseInternalSpacing}
18
+ ${baseGrid}
19
+ ${baseBorder}
20
+
21
+ ${_ref2 => {
22
+ let {
23
+ $divider
24
+ } = _ref2;
25
+ return $divider ? css`
26
+ overflow: hidden;
27
+ > .redsift-grid-item:not(:empty) {
28
+ position: relative;
29
+
30
+ ::before {
31
+ content: '';
32
+ position: absolute;
33
+ background-color: var(--redsift-color-neutral-light-grey);
34
+ inline-size: 1px;
35
+ block-size: 100%;
36
+ inset-inline-start: calc(${Math.max(1, $divider.colGap / 2)}px * -1);
37
+ }
38
+
39
+ ::after {
40
+ content: '';
41
+ position: absolute;
42
+ background-color: var(--redsift-color-neutral-light-grey);
43
+ inline-size: 200vw;
44
+ block-size: 1px;
45
+ inset-inline-start: -100vw;
46
+ inset-block-start: calc(${Math.max(1, $divider.rowGap / 2)}px * -1);
47
+ z-index: 0;
48
+ }
49
+ }
50
+ ` : '';
51
+ }}
52
+ `;
53
+
54
+ export { StyledGrid };
55
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sources":["../../../src/components/grid/styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { baseBorder, baseGrid, baseInternalSpacing, baseStyling } from '../shared';\nimport { StyledGridProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledGrid = styled.div<StyledGridProps>`\n display: ${({ inline }) => (inline ? 'inline-grid' : 'grid')};\n flex: 1;\n\n ${baseStyling}\n ${baseInternalSpacing}\n ${baseGrid}\n ${baseBorder}\n\n ${({ $divider }) =>\n $divider\n ? css`\n overflow: hidden;\n > .redsift-grid-item:not(:empty) {\n position: relative;\n\n ::before {\n content: '';\n position: absolute;\n background-color: var(--redsift-color-neutral-light-grey);\n inline-size: 1px;\n block-size: 100%;\n inset-inline-start: calc(${Math.max(1, $divider.colGap / 2)}px * -1);\n }\n\n ::after {\n content: '';\n position: absolute;\n background-color: var(--redsift-color-neutral-light-grey);\n inline-size: 200vw;\n block-size: 1px;\n inset-inline-start: -100vw;\n inset-block-start: calc(${Math.max(1, $divider.rowGap / 2)}px * -1);\n z-index: 0;\n }\n }\n `\n : ''}\n`;\n"],"names":["StyledGrid","styled","div","_ref","inline","baseStyling","baseInternalSpacing","baseGrid","baseBorder","_ref2","$divider","css","Math","max","colGap","rowGap"],"mappings":";;;AAIA;AACA;AACA;AACaA,MAAAA,UAAU,GAAGC,MAAM,CAACC,GAAqB,CAAA;AACtD,WAAA,EAAaC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAD,IAAA,CAAA;AAAA,EAAA,OAAMC,MAAM,GAAG,aAAa,GAAG,MAAM,CAAA;AAAA,CAAE,CAAA;AAC/D;AACA;AACA,EAAA,EAAIC,WAAY,CAAA;AAChB,EAAA,EAAIC,mBAAoB,CAAA;AACxB,EAAA,EAAIC,QAAS,CAAA;AACb,EAAA,EAAIC,UAAW,CAAA;AACf;AACA,EAAA,EAAIC,KAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,QAAAA;AAAS,GAAC,GAAAD,KAAA,CAAA;EAAA,OACbC,QAAQ,GACJC,GAAI,CAAA;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAyCC,EAAAA,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,QAAQ,CAACI,MAAM,GAAG,CAAC,CAAE,CAAA;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAwCF,EAAAA,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,QAAQ,CAACK,MAAM,GAAG,CAAC,CAAE,CAAA;AACzE;AACA;AACA;AACA,QAAA,CAAS,GACD,EAAE,CAAA;AAAA,CAAC,CAAA;AACX;;;;"}
@@ -0,0 +1,22 @@
1
+ import { ComponentProps } from 'react';
2
+ import { StylingProps, InternalSpacingProps, GridLayoutProps, BorderProps } from '../../types/styles.js';
3
+ import { Theme } from '../../types/colors.js';
4
+
5
+ /**
6
+ * Component props.
7
+ */
8
+ interface GridProps extends ComponentProps<'div'>, StylingProps, InternalSpacingProps, GridLayoutProps, BorderProps {
9
+ /** Whether the grid has divider or not. The number of pixels defining the gap between columns and rows is mandatory. This replaces the grid gap property. */
10
+ divider?: {
11
+ colGap: number;
12
+ rowGap: number;
13
+ };
14
+ /** Theme. */
15
+ theme?: Theme;
16
+ }
17
+ type StyledGridProps = GridProps & {
18
+ $divider: GridProps['divider'];
19
+ $theme: GridProps['theme'];
20
+ };
21
+
22
+ export { GridProps, StyledGridProps };
@@ -0,0 +1,9 @@
1
+ import { GridItemProps } from './types.js';
2
+ import { Comp } from '../../types/helpers.js';
3
+
4
+ /**
5
+ * The GridItem component.
6
+ */
7
+ declare const GridItem: Comp<GridItemProps, HTMLDivElement>;
8
+
9
+ export { GridItem };
@@ -0,0 +1,28 @@
1
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React__default, { forwardRef } from 'react';
3
+ import classNames from 'classnames';
4
+ import { StyledGridItem } from './styles.js';
5
+
6
+ const _excluded = ["children", "className"];
7
+ const COMPONENT_NAME = 'GridItem';
8
+ const CLASSNAME = 'redsift-grid-item';
9
+
10
+ /**
11
+ * The GridItem component.
12
+ */
13
+ const GridItem = /*#__PURE__*/forwardRef((props, ref) => {
14
+ const {
15
+ children,
16
+ className
17
+ } = props,
18
+ forwardedProps = _objectWithoutProperties(props, _excluded);
19
+ return /*#__PURE__*/React__default.createElement(StyledGridItem, _extends({}, forwardedProps, {
20
+ className: classNames(GridItem.className, className),
21
+ ref: ref
22
+ }), children);
23
+ });
24
+ GridItem.className = CLASSNAME;
25
+ GridItem.displayName = COMPONENT_NAME;
26
+
27
+ export { GridItem };
28
+ //# sourceMappingURL=GridItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridItem.js","sources":["../../../src/components/grid-item/GridItem.tsx"],"sourcesContent":["import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp } from '../../types';\nimport { StyledGridItem } from './styles';\nimport { GridItemProps } from './types';\n\nconst COMPONENT_NAME = 'GridItem';\nconst CLASSNAME = 'redsift-grid-item';\n\n/**\n * The GridItem component.\n */\nexport const GridItem: Comp<GridItemProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, ...forwardedProps } = props;\n\n return (\n <StyledGridItem\n {...forwardedProps}\n className={classNames(GridItem.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n >\n {children}\n </StyledGridItem>\n );\n});\nGridItem.className = CLASSNAME;\nGridItem.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","GridItem","forwardRef","props","ref","children","className","forwardedProps","_objectWithoutProperties","_excluded","React","createElement","StyledGridItem","_extends","classNames","displayName"],"mappings":";;;;;;AAMA,MAAMA,cAAc,GAAG,UAAU,CAAA;AACjC,MAAMC,SAAS,GAAG,mBAAmB,CAAA;;AAErC;AACA;AACA;AACO,MAAMC,QAA6C,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACtF,MAAM;MAAEC,QAAQ;AAAEC,MAAAA,SAAAA;AAA6B,KAAC,GAAGH,KAAK;AAAxBI,IAAAA,cAAc,GAAAC,wBAAA,CAAKL,KAAK,EAAAM,SAAA,CAAA,CAAA;EAExD,oBACEC,cAAA,CAAAC,aAAA,CAACC,cAAc,EAAAC,QAAA,KACTN,cAAc,EAAA;IAClBD,SAAS,EAAEQ,UAAU,CAACb,QAAQ,CAACK,SAAS,EAAEA,SAAS,CAAE;AACrDF,IAAAA,GAAG,EAAEA,GAAAA;AAAiC,GAAA,CAAA,EAErCC,QACa,CAAC,CAAA;AAErB,CAAC,EAAC;AACFJ,QAAQ,CAACK,SAAS,GAAGN,SAAS,CAAA;AAC9BC,QAAQ,CAACc,WAAW,GAAGhB,cAAc;;;;"}
@@ -0,0 +1,16 @@
1
+ import styled from 'styled-components';
2
+ import { baseStyling, baseInternalSpacing, baseBorder } from '../shared/styles.js';
3
+
4
+ /**
5
+ * Component style.
6
+ */
7
+ const StyledGridItem = styled.div`
8
+ display: inherit;
9
+
10
+ ${baseStyling}
11
+ ${baseInternalSpacing}
12
+ ${baseBorder}
13
+ `;
14
+
15
+ export { StyledGridItem };
16
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sources":["../../../src/components/grid-item/styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { baseBorder, baseInternalSpacing, baseStyling } from '../shared';\nimport { StyledGridItemProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledGridItem = styled.div<StyledGridItemProps>`\n display: inherit;\n\n ${baseStyling}\n ${baseInternalSpacing}\n ${baseBorder}\n`;\n"],"names":["StyledGridItem","styled","div","baseStyling","baseInternalSpacing","baseBorder"],"mappings":";;;AAIA;AACA;AACA;AACaA,MAAAA,cAAc,GAAGC,MAAM,CAACC,GAAyB,CAAA;AAC9D;AACA;AACA,EAAA,EAAIC,WAAY,CAAA;AAChB,EAAA,EAAIC,mBAAoB,CAAA;AACxB,EAAA,EAAIC,UAAW,CAAA;AACf;;;;"}
@@ -0,0 +1,11 @@
1
+ import { ComponentProps } from 'react';
2
+ import { StylingProps, InternalSpacingProps, BorderProps } from '../../types/styles.js';
3
+
4
+ /**
5
+ * Component props.
6
+ */
7
+ interface GridItemProps extends ComponentProps<'div'>, StylingProps, InternalSpacingProps, BorderProps {
8
+ }
9
+ type StyledGridItemProps = GridItemProps;
10
+
11
+ export { GridItemProps, StyledGridItemProps };
@@ -0,0 +1,9 @@
1
+ import { HeadingProps } from './types.js';
2
+ import { Comp } from '../../types/helpers.js';
3
+
4
+ /**
5
+ * The Heading component.
6
+ */
7
+ declare const Heading: Comp<HeadingProps, HTMLDivElement>;
8
+
9
+ export { Heading };
@@ -0,0 +1,50 @@
1
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React__default, { forwardRef } from 'react';
3
+ import classNames from 'classnames';
4
+ import { StyledHeading } from './styles.js';
5
+ import { FontFamily } from '../../types/fonts.js';
6
+ import { useTheme } from '../theme/useTheme.js';
7
+
8
+ const _excluded = ["as", "children", "className", "color", "fontFamily", "fontSize", "fontWeight", "lineHeight", "noWrap", "theme", "variant"];
9
+ const COMPONENT_NAME = 'Heading';
10
+ const CLASSNAME = 'redsift-heading';
11
+
12
+ /**
13
+ * The Heading component.
14
+ */
15
+ const Heading = /*#__PURE__*/forwardRef((props, ref) => {
16
+ const {
17
+ as,
18
+ children,
19
+ className,
20
+ color,
21
+ fontFamily = FontFamily.poppins,
22
+ fontSize,
23
+ fontWeight,
24
+ lineHeight,
25
+ noWrap,
26
+ theme: propsTheme,
27
+ variant
28
+ } = props,
29
+ forwardedProps = _objectWithoutProperties(props, _excluded);
30
+ const theme = useTheme(propsTheme);
31
+ return /*#__PURE__*/React__default.createElement(StyledHeading, _extends({
32
+ as: as
33
+ }, forwardedProps, {
34
+ className: classNames(Heading.className, className),
35
+ ref: ref,
36
+ $noWrap: noWrap,
37
+ $theme: theme,
38
+ $color: color,
39
+ $fontFamily: fontFamily,
40
+ $fontSize: fontSize,
41
+ $fontWeight: fontWeight,
42
+ $lineHeight: lineHeight,
43
+ $variant: variant ? variant : as === 'span' ? 'body' : as
44
+ }), children);
45
+ });
46
+ Heading.className = CLASSNAME;
47
+ Heading.displayName = COMPONENT_NAME;
48
+
49
+ export { Heading };
50
+ //# sourceMappingURL=Heading.js.map