@redsift/design-system 11.5.0 → 11.6.0-muiv5-alpha.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 (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 +11 -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":"styles.js","sources":["../../../src/components/icon-button/styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { StyledButton } from '../button';\nimport { IconButtonVariant, StyledIconButtonProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledIconButton = styled(StyledButton)<StyledIconButtonProps>`\n ${({ $variant }) => css`\n padding: ${$variant === IconButtonVariant.secondary ? '8px' : '9px'};\n `};\n\n ${({ $isLoading }) =>\n $isLoading\n ? css`\n & > .redsift-shield {\n position: relative;\n }\n `\n : ''}\n`;\n"],"names":["StyledIconButton","styled","StyledButton","_ref","$variant","css","IconButtonVariant","secondary","_ref2","$isLoading"],"mappings":";;;;AAIA;AACA;AACA;MACaA,gBAAgB,GAAGC,MAAM,CAACC,YAAY,CAAyB,CAAA;AAC5E,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,QAAAA;AAAS,GAAC,GAAAD,IAAA,CAAA;AAAA,EAAA,OAAKE,GAAI,CAAA;AAC1B,aAAeD,EAAAA,QAAQ,KAAKE,iBAAiB,CAACC,SAAS,GAAG,KAAK,GAAG,KAAM,CAAA;AACxE,EAAG,CAAA,CAAA;AAAA,CAAC,CAAA;AACJ;AACA,EAAA,EAAIC,KAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,UAAAA;AAAW,GAAC,GAAAD,KAAA,CAAA;EAAA,OACfC,UAAU,GACNJ,GAAI,CAAA;AACZ;AACA;AACA;AACA,QAAA,CAAS,GACD,EAAE,CAAA;AAAA,CAAC,CAAA;AACX;;;;"}
@@ -0,0 +1,56 @@
1
+ import { ComponentProps } from 'react';
2
+ import { ButtonsColorPalette, Theme } from '../../types/colors.js';
3
+ import { IconProps } from '../icon/types.js';
4
+ import { ValueOf } from '../../types/helpers.js';
5
+ import { StylingProps } from '../../types/styles.js';
6
+
7
+ /**
8
+ * Component variant.
9
+ */
10
+ declare const IconButtonVariant: {
11
+ readonly primary: "primary";
12
+ readonly secondary: "secondary";
13
+ readonly unstyled: "unstyled";
14
+ };
15
+ type IconButtonVariant = ValueOf<typeof IconButtonVariant>;
16
+ /**
17
+ * Component color.
18
+ */
19
+ type IconButtonColor = ButtonsColorPalette;
20
+ /**
21
+ * Component props.
22
+ */
23
+ interface IconButtonProps extends ComponentProps<'button'>, StylingProps {
24
+ /** Color variant. */
25
+ color?: IconButtonColor;
26
+ /**
27
+ * Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
28
+ * Can also be a ReactElement.
29
+ */
30
+ icon: IconProps['icon'];
31
+ /** Props to forward to the icon. */
32
+ iconProps?: Omit<IconProps, 'ref' | 'icon'>;
33
+ /** Whether the component is active or not. */
34
+ isActive?: boolean;
35
+ /** Whether the component is disabled or not. */
36
+ isDisabled?: boolean;
37
+ /** Whether the component is hovered or not. */
38
+ isHovered?: boolean;
39
+ /** Whether the component is in a loading state or not. */
40
+ isLoading?: boolean;
41
+ /** Theme. */
42
+ theme?: Theme;
43
+ /** Button variant. */
44
+ variant?: IconButtonVariant;
45
+ }
46
+ type StyledIconButtonProps = Omit<IconButtonProps, 'icon'> & {
47
+ $color: IconButtonProps['color'];
48
+ $isActive: IconButtonProps['isActive'];
49
+ $isDisabled: IconButtonProps['isDisabled'];
50
+ $isHovered: IconButtonProps['isHovered'];
51
+ $isLoading: IconButtonProps['isLoading'];
52
+ $theme: IconButtonProps['theme'];
53
+ $variant: IconButtonProps['variant'];
54
+ };
55
+
56
+ export { IconButtonColor, IconButtonProps, IconButtonVariant, StyledIconButtonProps };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Component variant.
3
+ */
4
+ const IconButtonVariant = {
5
+ primary: 'primary',
6
+ secondary: 'secondary',
7
+ unstyled: 'unstyled'
8
+ };
9
+
10
+ /**
11
+ * Component color.
12
+ */
13
+
14
+ /**
15
+ * Component props.
16
+ */
17
+
18
+ export { IconButtonVariant };
19
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../../src/components/icon-button/types.ts"],"sourcesContent":["import { ComponentProps } from 'react';\nimport { ButtonsColorPalette, StylingProps, Theme, ValueOf } from '../../types';\nimport { IconProps } from '../icon';\n\n/**\n * Component variant.\n */\nexport const IconButtonVariant = {\n primary: 'primary',\n secondary: 'secondary',\n unstyled: 'unstyled',\n} as const;\nexport type IconButtonVariant = ValueOf<typeof IconButtonVariant>;\n\n/**\n * Component color.\n */\nexport type IconButtonColor = ButtonsColorPalette;\n\n/**\n * Component props.\n */\nexport interface IconButtonProps extends ComponentProps<'button'>, StylingProps {\n /** Color variant. */\n color?: IconButtonColor;\n /**\n * Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />\n * Can also be a ReactElement.\n */\n icon: IconProps['icon'];\n /** Props to forward to the icon. */\n iconProps?: Omit<IconProps, 'ref' | 'icon'>;\n /** Whether the component is active or not. */\n isActive?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is hovered or not. */\n isHovered?: boolean;\n /** Whether the component is in a loading state or not. */\n isLoading?: boolean;\n /** Theme. */\n theme?: Theme;\n /** Button variant. */\n variant?: IconButtonVariant;\n}\n\nexport type StyledIconButtonProps = Omit<IconButtonProps, 'icon'> & {\n $color: IconButtonProps['color'];\n $isActive: IconButtonProps['isActive'];\n $isDisabled: IconButtonProps['isDisabled'];\n $isHovered: IconButtonProps['isHovered'];\n $isLoading: IconButtonProps['isLoading'];\n $theme: IconButtonProps['theme'];\n $variant: IconButtonProps['variant'];\n};\n"],"names":["IconButtonVariant","primary","secondary","unstyled"],"mappings":"AAIA;AACA;AACA;AACO,MAAMA,iBAAiB,GAAG;AAC/BC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,QAAQ,EAAE,UAAA;AACZ,EAAU;;AAGV;AACA;AACA;;AAGA;AACA;AACA;;;;"}
@@ -0,0 +1,13 @@
1
+ import { IconButtonLinkProps } from './types.js';
2
+ import { Comp } from '../../types/helpers.js';
3
+
4
+ /**
5
+ * The IconButtonLink is a semantic link that looks like an icon button.
6
+ *
7
+ * For a semantic button that looks like an icon button, please use the IconButton component.
8
+ * For a semantic link that looks like a link, please use the Link component.
9
+ * For a semantic button that looks like a link, please use the LinkButton component.
10
+ */
11
+ declare const IconButtonLink: Comp<IconButtonLinkProps, HTMLAnchorElement>;
12
+
13
+ export { IconButtonLink };
@@ -0,0 +1,76 @@
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 { StyledGradientBorder } from '../gradient-border/index.js';
5
+ import { StyledIconButton } from '../icon-button/styles.js';
6
+ import { IconButtonVariant } from '../icon-button/types.js';
7
+ import { useTheme } from '../theme/useTheme.js';
8
+ import { ButtonsColorPalette } from '../../types/colors.js';
9
+ import { ConditionalWrapper } from '../conditional-wrapper/ConditionalWrapper.js';
10
+ import { Icon } from '../icon/Icon.js';
11
+
12
+ const _excluded = ["as", "className", "color", "href", "icon", "iconProps", "isActive", "isDisabled", "isHovered", "target", "theme", "variant"];
13
+ const COMPONENT_NAME = 'IconButtonLink';
14
+ const CLASSNAME = 'redsift-icon-button-link';
15
+
16
+ /**
17
+ * The IconButtonLink is a semantic link that looks like an icon button.
18
+ *
19
+ * For a semantic button that looks like an icon button, please use the IconButton component.
20
+ * For a semantic link that looks like a link, please use the Link component.
21
+ * For a semantic button that looks like a link, please use the LinkButton component.
22
+ */
23
+ const IconButtonLink = /*#__PURE__*/forwardRef((props, ref) => {
24
+ const {
25
+ as,
26
+ className,
27
+ color: propsColor,
28
+ href,
29
+ icon,
30
+ iconProps,
31
+ isActive,
32
+ isDisabled,
33
+ isHovered,
34
+ target,
35
+ theme: propsTheme,
36
+ variant: propsVariant
37
+ } = props,
38
+ forwardedProps = _objectWithoutProperties(props, _excluded);
39
+ const theme = useTheme(propsTheme);
40
+ const color = Object.values(ButtonsColorPalette).includes(propsColor) ? propsColor : 'primary';
41
+ const variant = Object.values(IconButtonVariant).includes(propsVariant) ? propsVariant : 'unstyled';
42
+ const isGradient = color === ButtonsColorPalette.radar;
43
+ return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
44
+ condition: isGradient && variant === IconButtonVariant.secondary,
45
+ wrapper: children => /*#__PURE__*/React__default.createElement(StyledGradientBorder, {
46
+ $color: color,
47
+ $isActive: isActive,
48
+ $isDisabled: isDisabled,
49
+ $isHovered: isHovered,
50
+ $theme: theme
51
+ }, children)
52
+ }, /*#__PURE__*/React__default.createElement(StyledIconButton, _extends({
53
+ as: as || 'a',
54
+ role: "link",
55
+ tabIndex: !isDisabled ? 0 : undefined
56
+ }, forwardedProps, {
57
+ $color: color,
58
+ $isActive: isActive,
59
+ $isDisabled: isDisabled,
60
+ $isGradient: isGradient,
61
+ $isHovered: isHovered,
62
+ $theme: theme,
63
+ $variant: variant,
64
+ className: classNames(IconButtonLink.className, className),
65
+ href: !isDisabled ? href : undefined,
66
+ ref: ref,
67
+ target: target
68
+ }), /*#__PURE__*/React__default.createElement(Icon, _extends({}, iconProps, {
69
+ icon: icon
70
+ }))));
71
+ });
72
+ IconButtonLink.className = CLASSNAME;
73
+ IconButtonLink.displayName = COMPONENT_NAME;
74
+
75
+ export { IconButtonLink };
76
+ //# sourceMappingURL=IconButtonLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButtonLink.js","sources":["../../../src/components/icon-button-link/IconButtonLink.tsx"],"sourcesContent":["import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp, ButtonsColorPalette } from '../../types';\nimport { Icon } from '../icon';\nimport { IconButtonLinkProps } from './types';\nimport { useTheme } from '../theme';\nimport { ConditionalWrapper } from '../conditional-wrapper';\nimport { StyledGradientBorder } from '../gradient-border';\nimport { StyledIconButton } from '../icon-button/styles';\nimport { IconButtonVariant } from '../icon-button/types';\n\nconst COMPONENT_NAME = 'IconButtonLink';\nconst CLASSNAME = 'redsift-icon-button-link';\n\n/**\n * The IconButtonLink is a semantic link that looks like an icon button.\n *\n * For a semantic button that looks like an icon button, please use the IconButton component.\n * For a semantic link that looks like a link, please use the Link component.\n * For a semantic button that looks like a link, please use the LinkButton component.\n */\nexport const IconButtonLink: Comp<IconButtonLinkProps, HTMLAnchorElement> = forwardRef((props, ref) => {\n const {\n as,\n className,\n color: propsColor,\n href,\n icon,\n iconProps,\n isActive,\n isDisabled,\n isHovered,\n target,\n theme: propsTheme,\n variant: propsVariant,\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n const color = Object.values(ButtonsColorPalette).includes(propsColor!) ? propsColor : 'primary';\n const variant = Object.values(IconButtonVariant).includes(propsVariant!) ? propsVariant : 'unstyled';\n const isGradient = color === ButtonsColorPalette.radar;\n\n return (\n <ConditionalWrapper\n condition={isGradient && variant === IconButtonVariant.secondary}\n wrapper={(children) => (\n <StyledGradientBorder\n $color={color}\n $isActive={isActive}\n $isDisabled={isDisabled}\n $isHovered={isHovered}\n $theme={theme}\n >\n {children}\n </StyledGradientBorder>\n )}\n >\n <StyledIconButton\n as={(as || 'a') as any}\n role=\"link\"\n tabIndex={!isDisabled ? 0 : undefined}\n {...forwardedProps}\n $color={color}\n $isActive={isActive}\n $isDisabled={isDisabled}\n $isGradient={isGradient}\n $isHovered={isHovered}\n $theme={theme}\n $variant={variant}\n className={classNames(IconButtonLink.className, className)}\n href={!isDisabled ? href : undefined}\n ref={ref as RefObject<HTMLAnchorElement>}\n target={target}\n >\n <Icon {...iconProps} icon={icon} />\n </StyledIconButton>\n </ConditionalWrapper>\n );\n});\nIconButtonLink.className = CLASSNAME;\nIconButtonLink.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","IconButtonLink","forwardRef","props","ref","as","className","color","propsColor","href","icon","iconProps","isActive","isDisabled","isHovered","target","theme","propsTheme","variant","propsVariant","forwardedProps","_objectWithoutProperties","_excluded","useTheme","Object","values","ButtonsColorPalette","includes","IconButtonVariant","isGradient","radar","React","createElement","ConditionalWrapper","condition","secondary","wrapper","children","StyledGradientBorder","$color","$isActive","$isDisabled","$isHovered","$theme","StyledIconButton","_extends","role","tabIndex","undefined","$isGradient","$variant","classNames","Icon","displayName"],"mappings":";;;;;;;;;;;;AAWA,MAAMA,cAAc,GAAG,gBAAgB,CAAA;AACvC,MAAMC,SAAS,GAAG,0BAA0B,CAAA;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,cAA4D,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACrG,MAAM;MACJC,EAAE;MACFC,SAAS;AACTC,MAAAA,KAAK,EAAEC,UAAU;MACjBC,IAAI;MACJC,IAAI;MACJC,SAAS;MACTC,QAAQ;MACRC,UAAU;MACVC,SAAS;MACTC,MAAM;AACNC,MAAAA,KAAK,EAAEC,UAAU;AACjBC,MAAAA,OAAO,EAAEC,YAAAA;AAEX,KAAC,GAAGhB,KAAK;AADJiB,IAAAA,cAAc,GAAAC,wBAAA,CACflB,KAAK,EAAAmB,SAAA,CAAA,CAAA;AAET,EAAA,MAAMN,KAAK,GAAGO,QAAQ,CAACN,UAAU,CAAC,CAAA;AAClC,EAAA,MAAMV,KAAK,GAAGiB,MAAM,CAACC,MAAM,CAACC,mBAAmB,CAAC,CAACC,QAAQ,CAACnB,UAAW,CAAC,GAAGA,UAAU,GAAG,SAAS,CAAA;AAC/F,EAAA,MAAMU,OAAO,GAAGM,MAAM,CAACC,MAAM,CAACG,iBAAiB,CAAC,CAACD,QAAQ,CAACR,YAAa,CAAC,GAAGA,YAAY,G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gB,CAAAA,eAAAA,cAAA,CAAAC,aAAA,CAACoB,IAAI,EAAAP,QAAA,KAAKlC,SAAS,EAAA;AAAED,IAAAA,IAAI,EAAEA,IAAAA;GAAO,CAAA,CAClB,CACA,CAAC,CAAA;AAEzB,CAAC,EAAC;AACFT,cAAc,CAACK,SAAS,GAAGN,SAAS,CAAA;AACpCC,cAAc,CAACoD,WAAW,GAAGtD,cAAc;;;;"}
@@ -0,0 +1,18 @@
1
+ import { LinkProps } from '../link/types.js';
2
+ import { IconButtonProps } from '../icon-button/types.js';
3
+
4
+ /**
5
+ * Component props.
6
+ */
7
+ interface IconButtonLinkProps extends Omit<LinkProps, 'color'>, Pick<IconButtonProps, 'icon' | 'iconProps' | 'color' | 'isActive' | 'isDisabled' | 'isHovered' | 'variant' | 'theme'> {
8
+ }
9
+ type StyledIconButtonLinkProps = Omit<IconButtonLinkProps, 'isActive' | 'isDisabled' | 'variant' | 'color' | 'size'> & {
10
+ $isActive: IconButtonLinkProps['isActive'];
11
+ $isDisabled: IconButtonLinkProps['isDisabled'];
12
+ $isHovered: IconButtonLinkProps['isHovered'];
13
+ $variant: IconButtonLinkProps['variant'];
14
+ $theme: IconButtonLinkProps['theme'];
15
+ $color: IconButtonLinkProps['color'];
16
+ };
17
+
18
+ export { IconButtonLinkProps, StyledIconButtonLinkProps };
@@ -0,0 +1,10 @@
1
+ import { ItemProps } from './types.js';
2
+ import { Comp } from '../../types/helpers.js';
3
+
4
+ declare const RenderedListboxItem: Comp<Omit<ItemProps, 'value'> & Required<Pick<ItemProps, 'value'>>, HTMLElement>;
5
+ /**
6
+ * The Item component.
7
+ */
8
+ declare const Item: Comp<ItemProps, HTMLElement>;
9
+
10
+ export { Item, RenderedListboxItem };
@@ -0,0 +1,225 @@
1
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React__default, { forwardRef, useRef, useContext } from 'react';
3
+ import classNames from 'classnames';
4
+ import { StyledItem } from './styles.js';
5
+ import { useListboxItem } from '../listbox/useListboxItem.js';
6
+ import { useMenuItem } from './useMenuItem.js';
7
+ import { mdiCheckboxMarked, mdiCheckboxBlankOutline } from '@redsift/icons';
8
+ import { StyledGradientBorder } from '../gradient-border/index.js';
9
+ import { FocusWithinGroupContext } from '../focus-within-group/context.js';
10
+ import { useTheme } from '../theme/useTheme.js';
11
+ import { ButtonsColorPalette } from '../../types/colors.js';
12
+ import { ConditionalWrapper } from '../conditional-wrapper/ConditionalWrapper.js';
13
+ import { Flexbox } from '../flexbox/Flexbox.js';
14
+ import { Icon } from '../icon/Icon.js';
15
+ import { Text } from '../text/Text.js';
16
+ import { useId } from '../../utils/useId.js';
17
+ import { isComponent } from '../../utils/isComponent.js';
18
+
19
+ const _excluded = ["borderRadius", "children", "className", "color", "defaultSelected", "id", "isActive", "isDisabled", "isHovered", "isSelected", "hasBorder", "hasCheckbox", "theme", "value"],
20
+ _excluded2 = ["borderRadius", "children", "className", "color", "hasBorder", "id", "isActive", "isDisabled", "isHovered", "theme", "onClick"];
21
+ const COMPONENT_NAME = 'Item';
22
+ const CLASSNAME = 'redsift-item';
23
+ const RenderedListboxItem = /*#__PURE__*/forwardRef((props, ref) => {
24
+ const {
25
+ borderRadius = '0',
26
+ children,
27
+ className,
28
+ color: propsColor,
29
+ defaultSelected,
30
+ id: propsId,
31
+ isActive,
32
+ isDisabled: propsIsDisabled,
33
+ isHovered,
34
+ isSelected: propsIsSelected,
35
+ hasBorder,
36
+ hasCheckbox,
37
+ theme: propsTheme,
38
+ value
39
+ } = props,
40
+ forwardedProps = _objectWithoutProperties(props, _excluded);
41
+ const id = propsId !== null && propsId !== void 0 ? propsId : value;
42
+ const _ref = useRef();
43
+ const divRef = ref !== null && ref !== void 0 ? ref : _ref;
44
+ const {
45
+ tabIndex,
46
+ isFocused,
47
+ isSelected,
48
+ isDisabled,
49
+ handleKeyDown,
50
+ handleClick
51
+ } = useListboxItem({
52
+ domElementRef: divRef,
53
+ value,
54
+ id,
55
+ isDisabled: propsIsDisabled,
56
+ propsIsSelected: propsIsSelected !== null && propsIsSelected !== void 0 ? propsIsSelected : defaultSelected
57
+ });
58
+ const theme = useTheme(propsTheme);
59
+ const color = Object.values(ButtonsColorPalette).includes(propsColor) ? propsColor : 'primary';
60
+ const isGradient = color === ButtonsColorPalette.radar;
61
+ return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
62
+ condition: isGradient,
63
+ wrapper: children => /*#__PURE__*/React__default.createElement(StyledGradientBorder, {
64
+ $borderRadius: borderRadius,
65
+ $color: color,
66
+ $isActive: isActive,
67
+ $isDisabled: isDisabled,
68
+ $isHovered: isHovered,
69
+ $theme: theme,
70
+ width: "auto"
71
+ }, children)
72
+ }, /*#__PURE__*/React__default.createElement(StyledItem, _extends({
73
+ role: "option"
74
+ }, forwardedProps, {
75
+ id: id,
76
+ $borderRadius: borderRadius,
77
+ $color: color,
78
+ $hasBorder: hasBorder,
79
+ $hasCheckbox: hasCheckbox,
80
+ $isActive: isActive || isSelected,
81
+ $isDisabled: isDisabled,
82
+ $isGradient: isGradient,
83
+ $isHovered: isHovered || isFocused,
84
+ $theme: theme,
85
+ "aria-selected": isSelected,
86
+ "aria-disabled": isDisabled,
87
+ className: classNames(Item.className, className),
88
+ onClick: isDisabled ? undefined : handleClick,
89
+ ref: divRef,
90
+ onKeyDown: handleKeyDown,
91
+ tabIndex: tabIndex
92
+ }), hasCheckbox ? /*#__PURE__*/React__default.createElement(Flexbox, null, isSelected ? /*#__PURE__*/React__default.createElement(Icon, {
93
+ color: isDisabled ? 'grey' : color,
94
+ icon: mdiCheckboxMarked
95
+ }) : /*#__PURE__*/React__default.createElement(Icon, {
96
+ color: "question",
97
+ icon: mdiCheckboxBlankOutline
98
+ }), children ? children : /*#__PURE__*/React__default.createElement(Text, null, value)) : children !== null && children !== void 0 ? children : value));
99
+ });
100
+ const RenderedMenuItem = /*#__PURE__*/forwardRef((props, ref) => {
101
+ const {
102
+ borderRadius = '0',
103
+ children,
104
+ className,
105
+ color: propsColor,
106
+ hasBorder,
107
+ id: propsId,
108
+ isActive,
109
+ isDisabled: propsIsDisabled,
110
+ isHovered,
111
+ theme: propsTheme,
112
+ onClick
113
+ } = props,
114
+ forwardedProps = _objectWithoutProperties(props, _excluded2);
115
+ const [_id] = useId();
116
+ const id = propsId !== null && propsId !== void 0 ? propsId : _id;
117
+ const _ref = useRef();
118
+ const divRef = ref !== null && ref !== void 0 ? ref : _ref;
119
+ const linkRef = useRef(null);
120
+ const isLinkMenuItem = isComponent('Link')(children);
121
+ const {
122
+ tabIndex,
123
+ isFocused,
124
+ isDisabled,
125
+ handleKeyDown,
126
+ handleClick
127
+ } = useMenuItem({
128
+ domElementRef: divRef,
129
+ id,
130
+ isDisabled: propsIsDisabled,
131
+ onClick: onClick,
132
+ isLinkMenuItem,
133
+ linkRef
134
+ });
135
+ const theme = useTheme(propsTheme);
136
+ const color = Object.values(ButtonsColorPalette).includes(propsColor) ? propsColor : 'primary';
137
+ const isGradient = color === ButtonsColorPalette.radar;
138
+ return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
139
+ condition: isGradient,
140
+ wrapper: children => /*#__PURE__*/React__default.createElement(StyledGradientBorder, {
141
+ $borderRadius: borderRadius,
142
+ $color: color,
143
+ $isActive: isActive,
144
+ $isDisabled: isDisabled,
145
+ $isHovered: isHovered,
146
+ $theme: theme,
147
+ width: "auto"
148
+ }, children)
149
+ }, /*#__PURE__*/React__default.createElement(StyledItem, _extends({
150
+ as: "li",
151
+ role: isLinkMenuItem ? 'none' : 'menuitem'
152
+ }, forwardedProps, {
153
+ id: id,
154
+ $borderRadius: borderRadius,
155
+ $color: color,
156
+ $hasBorder: hasBorder,
157
+ $hasCheckbox: false,
158
+ $isActive: isActive,
159
+ $isDisabled: isDisabled,
160
+ $isGradient: isGradient,
161
+ $isHovered: isHovered || isFocused,
162
+ $theme: theme,
163
+ "aria-disabled": isDisabled,
164
+ className: classNames(Item.className, className),
165
+ onClick: isDisabled ? undefined : handleClick,
166
+ ref: divRef,
167
+ onKeyDown: handleKeyDown,
168
+ tabIndex: tabIndex
169
+ }), isLinkMenuItem ? /*#__PURE__*/React__default.cloneElement(children, {
170
+ role: 'menuitem',
171
+ ref: linkRef
172
+ }) : children));
173
+ });
174
+
175
+ /**
176
+ * The Item component.
177
+ */
178
+ const Item = /*#__PURE__*/forwardRef((props, ref) => {
179
+ const {
180
+ value
181
+ } = props;
182
+ const focusContext = useContext(FocusWithinGroupContext);
183
+ const isListbox = focusContext.state.listRole === 'listbox';
184
+ if (!focusContext.state.filter) {
185
+ return isListbox ? /*#__PURE__*/React__default.createElement(RenderedListboxItem, _extends({}, props, {
186
+ value: props.value,
187
+ ref: ref
188
+ })) : /*#__PURE__*/React__default.createElement(RenderedMenuItem, _extends({}, props, {
189
+ ref: ref
190
+ }));
191
+ }
192
+ const {
193
+ value: filterValue,
194
+ type,
195
+ caseSensitive
196
+ } = focusContext.state.filter;
197
+ if (!filterValue) {
198
+ return isListbox ? /*#__PURE__*/React__default.createElement(RenderedListboxItem, _extends({}, props, {
199
+ value: props.value,
200
+ ref: ref
201
+ })) : /*#__PURE__*/React__default.createElement(RenderedMenuItem, _extends({}, props, {
202
+ ref: ref
203
+ }));
204
+ } else if (caseSensitive && (type === 'startsWith' && value.startsWith(filterValue) || type === 'contains' && value.includes(filterValue) || type === 'endsWith' && value.endsWith(filterValue))) {
205
+ return isListbox ? /*#__PURE__*/React__default.createElement(RenderedListboxItem, _extends({}, props, {
206
+ value: props.value,
207
+ ref: ref
208
+ })) : /*#__PURE__*/React__default.createElement(RenderedMenuItem, _extends({}, props, {
209
+ ref: ref
210
+ }));
211
+ } else if (!caseSensitive && (type === 'startsWith' && value.toLowerCase().startsWith(filterValue.toLowerCase()) || type === 'contains' && value.toLowerCase().includes(filterValue.toLowerCase()) || type === 'endsWith' && value.toLowerCase().endsWith(filterValue.toLowerCase()))) {
212
+ return isListbox ? /*#__PURE__*/React__default.createElement(RenderedListboxItem, _extends({}, props, {
213
+ value: props.value,
214
+ ref: ref
215
+ })) : /*#__PURE__*/React__default.createElement(RenderedMenuItem, _extends({}, props, {
216
+ ref: ref
217
+ }));
218
+ }
219
+ return null;
220
+ });
221
+ Item.className = CLASSNAME;
222
+ Item.displayName = COMPONENT_NAME;
223
+
224
+ export { Item, RenderedListboxItem };
225
+ //# sourceMappingURL=Item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Item.js","sources":["../../../src/components/item/Item.tsx"],"sourcesContent":["import React, { forwardRef, RefObject, useContext, useRef } from 'react';\nimport classNames from 'classnames';\nimport { ButtonsColorPalette, Comp } from '../../types';\nimport { ItemProps } from './types';\nimport { StyledItem } from './styles';\nimport { useListboxItem } from '../listbox/useListboxItem';\nimport { FocusWithinGroupContext } from '../focus-within-group';\nimport { useMenuItem } from './useMenuItem';\nimport { isComponent, useId } from '../../utils';\nimport { useTheme } from '../theme';\nimport { Flexbox } from '../flexbox';\nimport { Icon } from '../icon';\nimport { Text } from '../text';\nimport { mdiCheckboxBlankOutline, mdiCheckboxMarked } from '@redsift/icons';\nimport { ConditionalWrapper } from '../conditional-wrapper';\nimport { StyledGradientBorder } from '../gradient-border';\n\nconst COMPONENT_NAME = 'Item';\nconst CLASSNAME = 'redsift-item';\n\nexport const RenderedListboxItem: Comp<Omit<ItemProps, 'value'> & Required<Pick<ItemProps, 'value'>>, HTMLElement> =\n forwardRef((props, ref) => {\n const {\n borderRadius = '0',\n children,\n className,\n color: propsColor,\n defaultSelected,\n id: propsId,\n isActive,\n isDisabled: propsIsDisabled,\n isHovered,\n isSelected: propsIsSelected,\n hasBorder,\n hasCheckbox,\n theme: propsTheme,\n value,\n ...forwardedProps\n } = props;\n const id = propsId ?? value;\n const _ref = useRef<HTMLElement>();\n const divRef = ref ?? _ref;\n\n const { tabIndex, isFocused, isSelected, isDisabled, handleKeyDown, handleClick } = useListboxItem({\n domElementRef: divRef as RefObject<Element>,\n value,\n id,\n isDisabled: propsIsDisabled!,\n propsIsSelected: propsIsSelected ?? defaultSelected,\n });\n\n const theme = useTheme(propsTheme);\n const color = Object.values(ButtonsColorPalette).includes(propsColor!) ? propsColor : 'primary';\n const isGradient = color === ButtonsColorPalette.radar;\n\n return (\n <ConditionalWrapper\n condition={isGradient}\n wrapper={(children) => (\n <StyledGradientBorder\n $borderRadius={borderRadius}\n $color={color}\n $isActive={isActive}\n $isDisabled={isDisabled}\n $isHovered={isHovered}\n $theme={theme}\n width=\"auto\"\n >\n {children}\n </StyledGradientBorder>\n )}\n >\n <StyledItem\n role=\"option\"\n {...forwardedProps}\n id={id}\n $borderRadius={borderRadius}\n $color={color}\n $hasBorder={hasBorder}\n $hasCheckbox={hasCheckbox}\n $isActive={isActive || isSelected}\n $isDisabled={isDisabled}\n $isGradient={isGradient}\n $isHovered={isHovered || isFocused}\n $theme={theme}\n aria-selected={isSelected}\n aria-disabled={isDisabled}\n className={classNames(Item.className, className)}\n onClick={isDisabled ? undefined : handleClick}\n ref={divRef as RefObject<HTMLElement>}\n onKeyDown={handleKeyDown}\n tabIndex={tabIndex}\n >\n {hasCheckbox ? (\n <Flexbox>\n {isSelected ? (\n <Icon color={isDisabled ? 'grey' : color} icon={mdiCheckboxMarked} />\n ) : (\n <Icon color=\"question\" icon={mdiCheckboxBlankOutline} />\n )}\n {children ? children : <Text>{value}</Text>}\n </Flexbox>\n ) : (\n children ?? value\n )}\n </StyledItem>\n </ConditionalWrapper>\n );\n });\n\nconst RenderedMenuItem: Comp<Omit<ItemProps, 'value'>, HTMLElement> = forwardRef((props, ref) => {\n const {\n borderRadius = '0',\n children,\n className,\n color: propsColor,\n hasBorder,\n id: propsId,\n isActive,\n isDisabled: propsIsDisabled,\n isHovered,\n theme: propsTheme,\n onClick,\n ...forwardedProps\n } = props;\n const [_id] = useId();\n const id = propsId ?? _id;\n const _ref = useRef<HTMLElement>();\n const divRef = ref ?? _ref;\n const linkRef = useRef<HTMLAnchorElement>(null);\n\n const isLinkMenuItem = isComponent('Link')(children);\n const { tabIndex, isFocused, isDisabled, handleKeyDown, handleClick } = useMenuItem({\n domElementRef: divRef as RefObject<Element>,\n id,\n isDisabled: propsIsDisabled!,\n onClick: onClick as any,\n isLinkMenuItem,\n linkRef,\n });\n\n const theme = useTheme(propsTheme);\n const color = Object.values(ButtonsColorPalette).includes(propsColor!) ? propsColor : 'primary';\n const isGradient = color === ButtonsColorPalette.radar;\n\n return (\n <ConditionalWrapper\n condition={isGradient}\n wrapper={(children) => (\n <StyledGradientBorder\n $borderRadius={borderRadius}\n $color={color}\n $isActive={isActive}\n $isDisabled={isDisabled}\n $isHovered={isHovered}\n $theme={theme}\n width=\"auto\"\n >\n {children}\n </StyledGradientBorder>\n )}\n >\n <StyledItem\n as=\"li\"\n role={isLinkMenuItem ? 'none' : 'menuitem'}\n {...forwardedProps}\n id={id}\n $borderRadius={borderRadius}\n $color={color}\n $hasBorder={hasBorder}\n $hasCheckbox={false}\n $isActive={isActive}\n $isDisabled={isDisabled}\n $isGradient={isGradient}\n $isHovered={isHovered || isFocused}\n $theme={theme}\n aria-disabled={isDisabled}\n className={classNames(Item.className, className)}\n onClick={isDisabled ? undefined : handleClick}\n ref={divRef}\n onKeyDown={handleKeyDown}\n tabIndex={tabIndex}\n >\n {isLinkMenuItem\n ? React.cloneElement(children, {\n role: 'menuitem',\n ref: linkRef,\n })\n : children}\n </StyledItem>\n </ConditionalWrapper>\n );\n});\n\n/**\n * The Item component.\n */\nexport const Item: Comp<ItemProps, HTMLElement> = forwardRef((props, ref) => {\n const { value } = props;\n const focusContext = useContext(FocusWithinGroupContext);\n const isListbox = focusContext.state.listRole === 'listbox';\n\n if (!focusContext.state.filter) {\n return isListbox ? (\n <RenderedListboxItem {...props} value={props.value!} ref={ref} />\n ) : (\n <RenderedMenuItem {...props} ref={ref} />\n );\n }\n\n const { value: filterValue, type, caseSensitive } = focusContext.state.filter;\n\n if (!filterValue) {\n return isListbox ? (\n <RenderedListboxItem {...props} value={props.value!} ref={ref} />\n ) : (\n <RenderedMenuItem {...props} ref={ref} />\n );\n } else if (\n caseSensitive &&\n ((type === 'startsWith' && value!.startsWith(filterValue)) ||\n (type === 'contains' && value!.includes(filterValue)) ||\n (type === 'endsWith' && value!.endsWith(filterValue)))\n ) {\n return isListbox ? (\n <RenderedListboxItem {...props} value={props.value!} ref={ref} />\n ) : (\n <RenderedMenuItem {...props} ref={ref} />\n );\n } else if (\n !caseSensitive &&\n ((type === 'startsWith' && value!.toLowerCase().startsWith(filterValue.toLowerCase())) ||\n (type === 'contains' && value!.toLowerCase().includes(filterValue.toLowerCase())) ||\n (type === 'endsWith' && value!.toLowerCase().endsWith(filterValue.toLowerCase())))\n ) {\n return isListbox ? (\n <RenderedListboxItem {...props} value={props.value!} ref={ref} />\n ) : (\n <RenderedMenuItem {...props} ref={ref} />\n );\n }\n\n return null;\n});\nItem.className = CLASSNAME;\nItem.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","RenderedListboxItem","forwardRef","props","ref","borderRadius","children","className","color","propsColor","defaultSelected","id","propsId","isActive","isDisabled","propsIsDisabled","isHovered","isSelected","propsIsSelected","hasBorder","hasCheckbox","theme","propsTheme","value","forwardedProps","_objectWithoutProperties","_excluded","_ref","useRef","divRef","tabIndex","isFocused","handleKeyDown","handleClick","useListboxItem","domElementRef","useTheme","Object","values","ButtonsColorPalette","includes","isGradient","radar","React","createElement","ConditionalWrapper","condition","wrapper","StyledGradientBorder","$borderRadius","$color","$isActive","$isDisabled","$isHovered","$theme","width","StyledItem","_extends","role","$hasBorder","$hasCheckbox","$isGradient","classNames","Item","onClick","undefined","onKeyDown","Flexbox","Icon","icon","mdiCheckboxMarked","mdiCheckboxBlankOutline","Text","RenderedMenuItem","_excluded2","_id","useId","linkRef","isLinkMenuItem","isComponent","useMenuItem","as","cloneElement","focusContext","useContext","FocusWithinGroupContext","isListbox","state","listRole","filter","filterValue","type","caseSensitive","startsWith","endsWith","toLowerCase","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;AA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WAAW,EAAE,CAAE,CAAC,EACpF;IACA,OAAOT,SAAS,gBACd3C,cAAA,CAAAC,aAAA,CAAC3C,mBAAmB,EAAAwD,QAAA,CAAA,EAAA,EAAKtD,KAAK,EAAA;MAAEoB,KAAK,EAAEpB,KAAK,CAACoB,KAAO;AAACnB,MAAAA,GAAG,EAAEA,GAAAA;KAAM,CAAA,CAAC,gBAEjEuC,cAAA,CAAAC,aAAA,CAAC6B,gBAAgB,EAAAhB,QAAA,CAAA,EAAA,EAAKtD,KAAK,EAAA;AAAEC,MAAAA,GAAG,EAAEA,GAAAA;AAAI,KAAA,CAAE,CACzC,CAAA;AACH,GAAA;AAEA,EAAA,OAAO,IAAI,CAAA;AACb,CAAC,EAAC;AACF2D,IAAI,CAACxD,SAAS,GAAGP,SAAS,CAAA;AAC1B+D,IAAI,CAACiC,WAAW,GAAGjG,cAAc;;;;"}
@@ -0,0 +1,20 @@
1
+ import * as styled_components from 'styled-components';
2
+ import { ItemProps } from './types.js';
3
+ import { Theme } from '../../types/colors.js';
4
+
5
+ /**
6
+ * Component style.
7
+ */
8
+ declare const StyledItem: styled_components.StyledComponent<"div", any, Omit<ItemProps, "color" | "onClick" | "value"> & {
9
+ $borderRadius: string | undefined;
10
+ $color: string | undefined;
11
+ $hasBorder: boolean | undefined;
12
+ $hasCheckbox: boolean | undefined;
13
+ $isActive: boolean | undefined;
14
+ $isDisabled: boolean | undefined;
15
+ $isGradient: boolean;
16
+ $isHovered: boolean | undefined;
17
+ $theme: Theme | undefined;
18
+ }, never>;
19
+
20
+ export { StyledItem };
@@ -0,0 +1,129 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { baseContainer } from '../shared/styles.js';
3
+
4
+ /**
5
+ * Component style.
6
+ */
7
+ const StyledItem = styled.div`
8
+ min-height: 36px;
9
+ position: relative;
10
+ width: 100%;
11
+ padding: 8px 16px;
12
+
13
+ ${baseContainer}
14
+
15
+ align-items: center;
16
+ background: none;
17
+ border: none;
18
+ box-sizing: border-box;
19
+ display: inline-flex;
20
+
21
+ > a {
22
+ display: inline-flex;
23
+ align-items: center;
24
+ text-decoration: none;
25
+ color: inherit;
26
+ }
27
+
28
+ ${_ref => {
29
+ let {
30
+ $color,
31
+ $isActive,
32
+ $isDisabled,
33
+ $isGradient,
34
+ $isHovered,
35
+ $hasBorder,
36
+ $theme
37
+ } = _ref;
38
+ return css`
39
+ ${!$isGradient ? css`
40
+ background-color: var(
41
+ --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled ? 'grey' : $color}-background-${$isActive ? 'active' : $isHovered || $isDisabled ? 'hover' : 'default'}
42
+ );
43
+ ` : css`
44
+ background: var(
45
+ --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled ? 'grey' : $color}-background-${$isActive ? 'active' : $isHovered || $isDisabled ? 'hover' : 'default'}
46
+ );
47
+ `}
48
+
49
+ ${$hasBorder ? css`
50
+ border: 1px solid
51
+ var(
52
+ --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled ? 'grey' : $color}-text-${$isActive ? 'active' : $isHovered || $isDisabled ? 'hover' : 'default'}
53
+ );
54
+ ` : ''}
55
+ `;
56
+ }}
57
+
58
+ &:hover {
59
+ outline: none;
60
+
61
+ ${_ref2 => {
62
+ let {
63
+ $color,
64
+ $isDisabled,
65
+ $isGradient,
66
+ $hasBorder,
67
+ $theme
68
+ } = _ref2;
69
+ return css`
70
+ cursor: ${$isDisabled ? 'default' : 'pointer'};
71
+
72
+ ${!$isDisabled ? css`
73
+ ${!$isGradient ? css`
74
+ background-color: var(
75
+ --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-background-hover
76
+ );
77
+
78
+ ${$hasBorder ? css`
79
+ border: 1px solid
80
+ var(--redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-hover);
81
+ ` : ''}
82
+ ` : css`
83
+ background: var(
84
+ --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-background-hover
85
+ );
86
+ `}
87
+ ` : ''}
88
+ `;
89
+ }};
90
+ }
91
+
92
+ &:active {
93
+ outline: none;
94
+
95
+ ${_ref3 => {
96
+ let {
97
+ $color,
98
+ $hasBorder,
99
+ $isHovered,
100
+ $isDisabled,
101
+ $isGradient,
102
+ $theme
103
+ } = _ref3;
104
+ return css`
105
+ ${!$isDisabled ? css`
106
+ ${!$isGradient ? css`
107
+ background-color: var(
108
+ --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled ? 'grey' : $color}-background-${$isHovered ? 'hover' : 'active'}
109
+ );
110
+
111
+ ${$hasBorder ? css`
112
+ border: 1px solid
113
+ var(
114
+ --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled ? 'grey' : $color}-text-${$isHovered ? 'hover' : 'active'}
115
+ );
116
+ ` : ''}
117
+ ` : css`
118
+ background: var(
119
+ --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled ? 'grey' : $color}-background-${$isHovered ? 'hover' : 'active'}
120
+ );
121
+ `}
122
+ ` : ''}
123
+ `;
124
+ }};
125
+ }
126
+ `;
127
+
128
+ export { StyledItem };
129
+ //# sourceMappingURL=styles.js.map