@redsift/design-system 11.6.0-muiv5-alpha.4 → 11.6.0-muiv5-alpha.5

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 (992) hide show
  1. package/_internal/Alert2.js +54 -0
  2. package/_internal/Alert2.js.map +1 -0
  3. package/_internal/AppBar.js +37 -0
  4. package/_internal/AppBar.js.map +1 -0
  5. package/_internal/AppContainer.js +96 -0
  6. package/_internal/AppContainer.js.map +1 -0
  7. package/_internal/AppContent.js +25 -0
  8. package/_internal/AppContent.js.map +1 -0
  9. package/_internal/Badge2.js +9 -0
  10. package/_internal/Badge2.js.map +1 -0
  11. package/_internal/BreadcrumbItem.js +9 -0
  12. package/_internal/BreadcrumbItem.js.map +1 -0
  13. package/_internal/Breadcrumbs2.js +29 -0
  14. package/_internal/Breadcrumbs2.js.map +1 -0
  15. package/_internal/Button2.js +30 -0
  16. package/_internal/Button2.js.map +1 -0
  17. package/_internal/ButtonGroup.js +41 -0
  18. package/_internal/ButtonGroup.js.map +1 -0
  19. package/_internal/ButtonLink.js +28 -0
  20. package/_internal/ButtonLink.js.map +1 -0
  21. package/_internal/Card2.js +35 -0
  22. package/_internal/Card2.js.map +1 -0
  23. package/_internal/CardActions.js +9 -0
  24. package/_internal/CardActions.js.map +1 -0
  25. package/_internal/CardBody.js +9 -0
  26. package/_internal/CardBody.js.map +1 -0
  27. package/_internal/CardHeader.js +9 -0
  28. package/_internal/CardHeader.js.map +1 -0
  29. package/_internal/Checkbox2.js +68 -0
  30. package/_internal/Checkbox2.js.map +1 -0
  31. package/_internal/CheckboxGroup.js +10 -0
  32. package/_internal/CheckboxGroup.js.map +1 -0
  33. package/_internal/ConditionalWrapper.js +14 -0
  34. package/_internal/ConditionalWrapper.js.map +1 -0
  35. package/_internal/DetailedCard.js +52 -0
  36. package/_internal/DetailedCard.js.map +1 -0
  37. package/_internal/DetailedCardCollapsibleSectionItems.js +9 -0
  38. package/_internal/DetailedCardCollapsibleSectionItems.js.map +1 -0
  39. package/_internal/DetailedCardHeader.js +9 -0
  40. package/_internal/DetailedCardHeader.js.map +1 -0
  41. package/_internal/DetailedCardSection.js +9 -0
  42. package/_internal/DetailedCardSection.js.map +1 -0
  43. package/_internal/DetailedCardSectionItem.js +9 -0
  44. package/_internal/DetailedCardSectionItem.js.map +1 -0
  45. package/_internal/Flexbox2.js +30 -0
  46. package/_internal/Flexbox2.js.map +1 -0
  47. package/_internal/Grid2.js +32 -0
  48. package/_internal/Grid2.js.map +1 -0
  49. package/_internal/GridItem.js +9 -0
  50. package/_internal/GridItem.js.map +1 -0
  51. package/_internal/Heading2.js +9 -0
  52. package/_internal/Heading2.js.map +1 -0
  53. package/_internal/Icon2.js +10 -0
  54. package/_internal/Icon2.js.map +1 -0
  55. package/_internal/IconButton.js +12 -0
  56. package/_internal/IconButton.js.map +1 -0
  57. package/_internal/IconButtonLink.js +28 -0
  58. package/_internal/IconButtonLink.js.map +1 -0
  59. package/_internal/Item2.js +82 -0
  60. package/_internal/Item2.js.map +1 -0
  61. package/_internal/Link2.js +26 -0
  62. package/_internal/Link2.js.map +1 -0
  63. package/_internal/LinkButton.js +23 -0
  64. package/_internal/LinkButton.js.map +1 -0
  65. package/_internal/Listbox2.js +274 -0
  66. package/_internal/Listbox2.js.map +1 -0
  67. package/_internal/Number2.js +69 -0
  68. package/_internal/Number2.js.map +1 -0
  69. package/_internal/NumberField.js +80 -0
  70. package/_internal/NumberField.js.map +1 -0
  71. package/_internal/Pill2.js +9 -0
  72. package/_internal/Pill2.js.map +1 -0
  73. package/_internal/ProgressBar.js +26 -0
  74. package/_internal/ProgressBar.js.map +1 -0
  75. package/_internal/Radio2.js +66 -0
  76. package/_internal/Radio2.js.map +1 -0
  77. package/_internal/RadioGroup.js +10 -0
  78. package/_internal/RadioGroup.js.map +1 -0
  79. package/_internal/Shield2.js +9 -0
  80. package/_internal/Shield2.js.map +1 -0
  81. package/_internal/SideNavigationMenu.js +9 -0
  82. package/_internal/SideNavigationMenu.js.map +1 -0
  83. package/_internal/SideNavigationMenuBar.js +9 -0
  84. package/_internal/SideNavigationMenuItem.js +9 -0
  85. package/_internal/SideNavigationMenuItem.js.map +1 -0
  86. package/_internal/Skeleton2.js +15 -0
  87. package/_internal/Skeleton2.js.map +1 -0
  88. package/_internal/SkeletonCircle.js +9 -0
  89. package/_internal/SkeletonCircle.js.map +1 -0
  90. package/_internal/SkeletonText.js +9 -0
  91. package/_internal/SkeletonText.js.map +1 -0
  92. package/_internal/Spinner2.js +43 -0
  93. package/_internal/Spinner2.js.map +1 -0
  94. package/_internal/Switch2.js +66 -0
  95. package/_internal/Switch2.js.map +1 -0
  96. package/_internal/SwitchGroup.js +10 -0
  97. package/_internal/SwitchGroup.js.map +1 -0
  98. package/_internal/Text2.js +9 -0
  99. package/_internal/Text2.js.map +1 -0
  100. package/_internal/TextArea.js +34 -0
  101. package/_internal/TextArea.js.map +1 -0
  102. package/_internal/TextField.js +29 -0
  103. package/_internal/TextField.js.map +1 -0
  104. package/_internal/_rollupPluginBabelHelpers.js +133 -0
  105. package/_internal/alert.js +5 -0
  106. package/_internal/alert.js.map +1 -0
  107. package/_internal/app-bar.js +8 -0
  108. package/_internal/app-bar.js.map +1 -0
  109. package/_internal/app-container.js +9 -0
  110. package/_internal/app-container.js.map +1 -0
  111. package/_internal/app-content.js +5 -0
  112. package/_internal/app-content.js.map +1 -0
  113. package/_internal/app-side-panel.js +11 -0
  114. package/_internal/app-side-panel.js.map +1 -0
  115. package/_internal/badge.js +6 -0
  116. package/_internal/badge.js.map +1 -0
  117. package/_internal/breadcrumb-item.js +5 -0
  118. package/_internal/breadcrumb-item.js.map +1 -0
  119. package/_internal/breadcrumbs.js +6 -0
  120. package/_internal/breadcrumbs.js.map +1 -0
  121. package/_internal/button-group.js +5 -0
  122. package/_internal/button-group.js.map +1 -0
  123. package/_internal/button-link.js +8 -0
  124. package/_internal/button-link.js.map +1 -0
  125. package/_internal/button.js +8 -0
  126. package/_internal/button.js.map +1 -0
  127. package/_internal/card-actions.js +5 -0
  128. package/_internal/card-actions.js.map +1 -0
  129. package/_internal/card-body.js +5 -0
  130. package/_internal/card-body.js.map +1 -0
  131. package/_internal/card-header.js +9 -0
  132. package/_internal/card-header.js.map +1 -0
  133. package/_internal/card.js +11 -0
  134. package/_internal/card.js.map +1 -0
  135. package/_internal/checkbox-group.js +6 -0
  136. package/_internal/checkbox-group.js.map +1 -0
  137. package/_internal/checkbox.js +6 -0
  138. package/_internal/checkbox.js.map +1 -0
  139. package/_internal/colors.js +102 -0
  140. package/_internal/colors.js.map +1 -0
  141. package/_internal/conditional-wrapper.js +2 -0
  142. package/_internal/conditional-wrapper.js.map +1 -0
  143. package/_internal/context.js +6 -0
  144. package/_internal/context.js.map +1 -0
  145. package/_internal/context2.js +300 -0
  146. package/_internal/context2.js.map +1 -0
  147. package/_internal/context3.js +6 -0
  148. package/_internal/context3.js.map +1 -0
  149. package/_internal/context4.js +6 -0
  150. package/_internal/context4.js.map +1 -0
  151. package/_internal/context5.js +6 -0
  152. package/_internal/context5.js.map +1 -0
  153. package/_internal/detailed-card-collapsible-section-items.js +4 -0
  154. package/_internal/detailed-card-collapsible-section-items.js.map +1 -0
  155. package/_internal/detailed-card-header.js +8 -0
  156. package/_internal/detailed-card-header.js.map +1 -0
  157. package/_internal/detailed-card-section-item.js +11 -0
  158. package/_internal/detailed-card-section-item.js.map +1 -0
  159. package/_internal/detailed-card-section.js +7 -0
  160. package/_internal/detailed-card-section.js.map +1 -0
  161. package/_internal/detailed-card.js +16 -0
  162. package/_internal/detailed-card.js.map +1 -0
  163. package/_internal/filterComponents.js +24 -0
  164. package/_internal/filterComponents.js.map +1 -0
  165. package/_internal/flexbox.js +5 -0
  166. package/_internal/flexbox.js.map +1 -0
  167. package/_internal/focus-within-group.js +3 -0
  168. package/_internal/focus-within-group.js.map +1 -0
  169. package/_internal/fonts.js +12 -0
  170. package/_internal/gradient-border.js +19 -0
  171. package/_internal/gradient-border.js.map +1 -0
  172. package/_internal/grid-item.js +5 -0
  173. package/_internal/grid-item.js.map +1 -0
  174. package/_internal/grid.js +6 -0
  175. package/_internal/grid.js.map +1 -0
  176. package/_internal/heading.js +7 -0
  177. package/_internal/heading.js.map +1 -0
  178. package/_internal/helpers.js +23 -0
  179. package/_internal/icon-button-link.js +8 -0
  180. package/_internal/icon-button-link.js.map +1 -0
  181. package/_internal/icon-button.js +7 -0
  182. package/_internal/icon-button.js.map +1 -0
  183. package/_internal/icon.js +6 -0
  184. package/_internal/icon.js.map +1 -0
  185. package/_internal/isComponent.js +15 -0
  186. package/_internal/isComponent.js.map +1 -0
  187. package/_internal/item.js +8 -0
  188. package/_internal/item.js.map +1 -0
  189. package/_internal/link-button.js +8 -0
  190. package/_internal/link-button.js.map +1 -0
  191. package/_internal/link.js +8 -0
  192. package/_internal/link.js.map +1 -0
  193. package/_internal/listbox.js +6 -0
  194. package/_internal/listbox.js.map +1 -0
  195. package/_internal/number-field.js +9 -0
  196. package/_internal/number-field.js.map +1 -0
  197. package/_internal/number.js +7 -0
  198. package/_internal/number.js.map +1 -0
  199. package/_internal/partitionComponents.js +26 -0
  200. package/_internal/pill.js +6 -0
  201. package/_internal/pill.js.map +1 -0
  202. package/_internal/progress-bar.js +5 -0
  203. package/_internal/progress-bar.js.map +1 -0
  204. package/_internal/radio-group.js +6 -0
  205. package/_internal/radio-group.js.map +1 -0
  206. package/_internal/radio.js +6 -0
  207. package/_internal/radio.js.map +1 -0
  208. package/_internal/redsift-design-tokens.js +1391 -0
  209. package/_internal/shared.js +5 -0
  210. package/_internal/shared.js.map +1 -0
  211. package/_internal/shield.js +6 -0
  212. package/_internal/shield.js.map +1 -0
  213. package/_internal/side-navigation-menu-bar.js +9 -0
  214. package/_internal/side-navigation-menu-bar.js.map +1 -0
  215. package/_internal/side-navigation-menu-item.js +8 -0
  216. package/_internal/side-navigation-menu-item.js.map +1 -0
  217. package/_internal/side-navigation-menu.js +8 -0
  218. package/_internal/side-navigation-menu.js.map +1 -0
  219. package/_internal/skeleton-circle.js +7 -0
  220. package/_internal/skeleton-circle.js.map +1 -0
  221. package/_internal/skeleton-text.js +7 -0
  222. package/_internal/skeleton-text.js.map +1 -0
  223. package/_internal/skeleton.js +8 -0
  224. package/_internal/skeleton.js.map +1 -0
  225. package/_internal/spinner.js +5 -0
  226. package/_internal/spinner.js.map +1 -0
  227. package/_internal/styles.js +17 -0
  228. package/_internal/styles.js.map +1 -0
  229. package/_internal/styles2.js +283 -0
  230. package/_internal/styles2.js.map +1 -0
  231. package/_internal/styles3.js +145 -0
  232. package/_internal/styles3.js.map +1 -0
  233. package/_internal/styles4.js +250 -0
  234. package/_internal/styles4.js.map +1 -0
  235. package/_internal/styles5.js +143 -0
  236. package/_internal/styles5.js.map +1 -0
  237. package/_internal/styles6.js +84 -0
  238. package/_internal/styles6.js.map +1 -0
  239. package/_internal/switch-group.js +6 -0
  240. package/_internal/switch-group.js.map +1 -0
  241. package/_internal/switch.js +6 -0
  242. package/_internal/switch.js.map +1 -0
  243. package/_internal/text-area.js +9 -0
  244. package/_internal/text-area.js.map +1 -0
  245. package/_internal/text-field.js +10 -0
  246. package/_internal/text-field.js.map +1 -0
  247. package/_internal/text.js +7 -0
  248. package/_internal/text.js.map +1 -0
  249. package/_internal/theme.js +4 -0
  250. package/_internal/theme.js.map +1 -0
  251. package/_internal/types.js +39 -0
  252. package/_internal/types.js.map +1 -0
  253. package/_internal/types10.js +20 -0
  254. package/_internal/types11.js +27 -0
  255. package/_internal/types12.js +35 -0
  256. package/_internal/types13.js +143 -0
  257. package/_internal/types14.js +11 -0
  258. package/_internal/types15.js +62 -0
  259. package/_internal/types16.js +56 -0
  260. package/_internal/types17.js +57 -0
  261. package/_internal/types18.js +40 -0
  262. package/_internal/types19.js +101 -0
  263. package/_internal/types2.js +37 -0
  264. package/_internal/types2.js.map +1 -0
  265. package/_internal/types20.js +47 -0
  266. package/_internal/types21.js +68 -0
  267. package/_internal/types22.js +52 -0
  268. package/_internal/types23.js +174 -0
  269. package/_internal/types24.js +18 -0
  270. package/_internal/types25.js +12 -0
  271. package/_internal/types26.js +36 -0
  272. package/_internal/types27.js +72 -0
  273. package/_internal/types28.js +73 -0
  274. package/_internal/types29.js +99 -0
  275. package/_internal/types3.js +23 -0
  276. package/_internal/types3.js.map +1 -0
  277. package/_internal/types4.js +67 -0
  278. package/_internal/types5.js +11 -0
  279. package/_internal/types6.js +11 -0
  280. package/_internal/types7.js +28 -0
  281. package/_internal/types8.js +72 -0
  282. package/_internal/types9.js +16 -0
  283. package/_internal/useAppSidePanel.js +12 -0
  284. package/_internal/useAppSidePanel.js.map +1 -0
  285. package/_internal/useFocusOnList.js +83 -0
  286. package/_internal/useFocusOnList.js.map +1 -0
  287. package/_internal/useFocusOnListItem.js +203 -0
  288. package/_internal/useFocusOnListItem.js.map +1 -0
  289. package/_internal/useFocusRing.js +669 -0
  290. package/_internal/useFocusRing.js.map +1 -0
  291. package/_internal/useId.js +42 -0
  292. package/_internal/useId.js.map +1 -0
  293. package/_internal/useIsLoaded.js +14 -0
  294. package/_internal/useListboxItem.js +32 -0
  295. package/_internal/useListboxItem.js.map +1 -0
  296. package/_internal/useMessageFormatter.js +143 -0
  297. package/_internal/useMessageFormatter.js.map +1 -0
  298. package/_internal/useNumberFormatter.js +239 -0
  299. package/_internal/useNumberFormatter.js.map +1 -0
  300. package/_internal/useSideNavigationMenuBar.js +9 -0
  301. package/_internal/useSideNavigationMenuBar.js.map +1 -0
  302. package/_internal/useTheme.js +13 -0
  303. package/_internal/useTheme.js.map +1 -0
  304. package/_internal/warnIfNoAccessibleLabelFound.js +20 -0
  305. package/index.js +1738 -122
  306. package/index.js.map +1 -1
  307. package/package.json +2 -7
  308. package/_virtual/_rollupPluginBabelHelpers.js +0 -133
  309. package/components/alert/Alert.d.ts +0 -9
  310. package/components/alert/Alert.js +0 -117
  311. package/components/alert/Alert.js.map +0 -1
  312. package/components/alert/intl/en-US.json.js +0 -7
  313. package/components/alert/intl/en-US.json.js.map +0 -1
  314. package/components/alert/intl/fr-FR.json.js +0 -7
  315. package/components/alert/intl/fr-FR.json.js.map +0 -1
  316. package/components/alert/intl/index.js +0 -10
  317. package/components/alert/intl/index.js.map +0 -1
  318. package/components/alert/styles.js +0 -54
  319. package/components/alert/styles.js.map +0 -1
  320. package/components/alert/types.d.ts +0 -49
  321. package/components/alert/types.js +0 -20
  322. package/components/alert/types.js.map +0 -1
  323. package/components/app-bar/AppBar.d.ts +0 -9
  324. package/components/app-bar/AppBar.js +0 -95
  325. package/components/app-bar/AppBar.js.map +0 -1
  326. package/components/app-bar/intl/en-US.json.js +0 -9
  327. package/components/app-bar/intl/en-US.json.js.map +0 -1
  328. package/components/app-bar/intl/fr-FR.json.js +0 -9
  329. package/components/app-bar/intl/fr-FR.json.js.map +0 -1
  330. package/components/app-bar/intl/index.js +0 -10
  331. package/components/app-bar/intl/index.js.map +0 -1
  332. package/components/app-bar/styles.js +0 -139
  333. package/components/app-bar/styles.js.map +0 -1
  334. package/components/app-bar/types.d.ts +0 -31
  335. package/components/app-container/AppContainer.d.ts +0 -11
  336. package/components/app-container/AppContainer.js +0 -117
  337. package/components/app-container/AppContainer.js.map +0 -1
  338. package/components/app-container/context.d.ts +0 -6
  339. package/components/app-container/context.js +0 -6
  340. package/components/app-container/context.js.map +0 -1
  341. package/components/app-container/styles.js +0 -30
  342. package/components/app-container/styles.js.map +0 -1
  343. package/components/app-container/types.d.ts +0 -51
  344. package/components/app-content/AppContent.d.ts +0 -9
  345. package/components/app-content/AppContent.js +0 -42
  346. package/components/app-content/AppContent.js.map +0 -1
  347. package/components/app-content/styles.js +0 -54
  348. package/components/app-content/styles.js.map +0 -1
  349. package/components/app-content/types.d.ts +0 -19
  350. package/components/app-side-panel/AppSidePanel.d.ts +0 -9
  351. package/components/app-side-panel/AppSidePanel.js +0 -86
  352. package/components/app-side-panel/AppSidePanel.js.map +0 -1
  353. package/components/app-side-panel/intl/en-US.json.js +0 -9
  354. package/components/app-side-panel/intl/en-US.json.js.map +0 -1
  355. package/components/app-side-panel/intl/fr-FR.json.js +0 -9
  356. package/components/app-side-panel/intl/fr-FR.json.js.map +0 -1
  357. package/components/app-side-panel/intl/index.js +0 -10
  358. package/components/app-side-panel/intl/index.js.map +0 -1
  359. package/components/app-side-panel/styles.js +0 -183
  360. package/components/app-side-panel/styles.js.map +0 -1
  361. package/components/app-side-panel/types.d.ts +0 -39
  362. package/components/app-side-panel/types.js +0 -15
  363. package/components/app-side-panel/types.js.map +0 -1
  364. package/components/app-side-panel/useAppSidePanel.d.ts +0 -6
  365. package/components/app-side-panel/useAppSidePanel.js +0 -23
  366. package/components/app-side-panel/useAppSidePanel.js.map +0 -1
  367. package/components/badge/Badge.d.ts +0 -9
  368. package/components/badge/Badge.js +0 -44
  369. package/components/badge/Badge.js.map +0 -1
  370. package/components/badge/styles.js +0 -93
  371. package/components/badge/styles.js.map +0 -1
  372. package/components/badge/types.d.ts +0 -37
  373. package/components/badge/types.js +0 -14
  374. package/components/badge/types.js.map +0 -1
  375. package/components/breadcrumb-item/BreadcrumbItem.d.ts +0 -9
  376. package/components/breadcrumb-item/BreadcrumbItem.js +0 -47
  377. package/components/breadcrumb-item/BreadcrumbItem.js.map +0 -1
  378. package/components/breadcrumb-item/styles.js +0 -48
  379. package/components/breadcrumb-item/styles.js.map +0 -1
  380. package/components/breadcrumb-item/types.d.ts +0 -23
  381. package/components/breadcrumbs/Breadcrumbs.d.ts +0 -13
  382. package/components/breadcrumbs/Breadcrumbs.js +0 -61
  383. package/components/breadcrumbs/Breadcrumbs.js.map +0 -1
  384. package/components/breadcrumbs/styles.js +0 -38
  385. package/components/breadcrumbs/styles.js.map +0 -1
  386. package/components/breadcrumbs/types.d.ts +0 -19
  387. package/components/button/Button.d.ts +0 -13
  388. package/components/button/Button.js +0 -92
  389. package/components/button/Button.js.map +0 -1
  390. package/components/button/styles.d.ts +0 -20
  391. package/components/button/styles.js +0 -219
  392. package/components/button/styles.js.map +0 -1
  393. package/components/button/types.d.ts +0 -67
  394. package/components/button/types.js +0 -19
  395. package/components/button/types.js.map +0 -1
  396. package/components/button-group/ButtonGroup.d.ts +0 -9
  397. package/components/button-group/ButtonGroup.js +0 -67
  398. package/components/button-group/ButtonGroup.js.map +0 -1
  399. package/components/button-group/styles.js +0 -103
  400. package/components/button-group/styles.js.map +0 -1
  401. package/components/button-group/types.d.ts +0 -36
  402. package/components/button-group/types.js +0 -19
  403. package/components/button-group/types.js.map +0 -1
  404. package/components/button-link/ButtonLink.d.ts +0 -13
  405. package/components/button-link/ButtonLink.js +0 -85
  406. package/components/button-link/ButtonLink.js.map +0 -1
  407. package/components/button-link/types.d.ts +0 -18
  408. package/components/card/Card.d.ts +0 -13
  409. package/components/card/Card.js +0 -81
  410. package/components/card/Card.js.map +0 -1
  411. package/components/card/intl/en-US.json.js +0 -9
  412. package/components/card/intl/en-US.json.js.map +0 -1
  413. package/components/card/intl/fr-FR.json.js +0 -9
  414. package/components/card/intl/fr-FR.json.js.map +0 -1
  415. package/components/card/intl/index.js +0 -10
  416. package/components/card/intl/index.js.map +0 -1
  417. package/components/card/styles.js +0 -63
  418. package/components/card/styles.js.map +0 -1
  419. package/components/card/types.d.ts +0 -25
  420. package/components/card-actions/CardActions.d.ts +0 -9
  421. package/components/card-actions/CardActions.js +0 -33
  422. package/components/card-actions/CardActions.js.map +0 -1
  423. package/components/card-actions/styles.js +0 -15
  424. package/components/card-actions/styles.js.map +0 -1
  425. package/components/card-actions/types.d.ts +0 -11
  426. package/components/card-body/CardBody.d.ts +0 -9
  427. package/components/card-body/CardBody.js +0 -28
  428. package/components/card-body/CardBody.js.map +0 -1
  429. package/components/card-body/styles.js +0 -18
  430. package/components/card-body/styles.js.map +0 -1
  431. package/components/card-body/types.d.ts +0 -11
  432. package/components/card-header/CardHeader.d.ts +0 -9
  433. package/components/card-header/CardHeader.js +0 -56
  434. package/components/card-header/CardHeader.js.map +0 -1
  435. package/components/card-header/styles.js +0 -31
  436. package/components/card-header/styles.js.map +0 -1
  437. package/components/card-header/types.d.ts +0 -28
  438. package/components/checkbox/Checkbox.d.ts +0 -11
  439. package/components/checkbox/Checkbox.js +0 -135
  440. package/components/checkbox/Checkbox.js.map +0 -1
  441. package/components/checkbox/styles.js +0 -113
  442. package/components/checkbox/styles.js.map +0 -1
  443. package/components/checkbox/types.d.ts +0 -60
  444. package/components/checkbox-group/CheckboxGroup.d.ts +0 -10
  445. package/components/checkbox-group/CheckboxGroup.js +0 -101
  446. package/components/checkbox-group/CheckboxGroup.js.map +0 -1
  447. package/components/checkbox-group/context.js +0 -6
  448. package/components/checkbox-group/context.js.map +0 -1
  449. package/components/checkbox-group/styles.js +0 -78
  450. package/components/checkbox-group/styles.js.map +0 -1
  451. package/components/checkbox-group/types.d.ts +0 -72
  452. package/components/checkbox-group/types.js +0 -18
  453. package/components/checkbox-group/types.js.map +0 -1
  454. package/components/conditional-wrapper/ConditionalWrapper.d.ts +0 -6
  455. package/components/conditional-wrapper/ConditionalWrapper.js +0 -13
  456. package/components/conditional-wrapper/ConditionalWrapper.js.map +0 -1
  457. package/components/conditional-wrapper/types.d.ts +0 -10
  458. package/components/detailed-card/DetailedCard.d.ts +0 -15
  459. package/components/detailed-card/DetailedCard.js +0 -170
  460. package/components/detailed-card/DetailedCard.js.map +0 -1
  461. package/components/detailed-card/intl/en-US.json.js +0 -7
  462. package/components/detailed-card/intl/en-US.json.js.map +0 -1
  463. package/components/detailed-card/intl/fr-FR.json.js +0 -7
  464. package/components/detailed-card/intl/fr-FR.json.js.map +0 -1
  465. package/components/detailed-card/intl/index.js +0 -10
  466. package/components/detailed-card/intl/index.js.map +0 -1
  467. package/components/detailed-card/styles.js +0 -49
  468. package/components/detailed-card/styles.js.map +0 -1
  469. package/components/detailed-card/types.d.ts +0 -49
  470. package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.d.ts +0 -9
  471. package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js +0 -33
  472. package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js.map +0 -1
  473. package/components/detailed-card-collapsible-section-items/styles.js +0 -35
  474. package/components/detailed-card-collapsible-section-items/styles.js.map +0 -1
  475. package/components/detailed-card-collapsible-section-items/types.d.ts +0 -16
  476. package/components/detailed-card-header/DetailedCardHeader.d.ts +0 -9
  477. package/components/detailed-card-header/DetailedCardHeader.js +0 -45
  478. package/components/detailed-card-header/DetailedCardHeader.js.map +0 -1
  479. package/components/detailed-card-header/styles.js +0 -26
  480. package/components/detailed-card-header/styles.js.map +0 -1
  481. package/components/detailed-card-header/types.d.ts +0 -20
  482. package/components/detailed-card-section/DetailedCardSection.d.ts +0 -9
  483. package/components/detailed-card-section/DetailedCardSection.js +0 -90
  484. package/components/detailed-card-section/DetailedCardSection.js.map +0 -1
  485. package/components/detailed-card-section/intl/en-US.json.js +0 -9
  486. package/components/detailed-card-section/intl/en-US.json.js.map +0 -1
  487. package/components/detailed-card-section/intl/fr-FR.json.js +0 -9
  488. package/components/detailed-card-section/intl/fr-FR.json.js.map +0 -1
  489. package/components/detailed-card-section/intl/index.js +0 -10
  490. package/components/detailed-card-section/intl/index.js.map +0 -1
  491. package/components/detailed-card-section/styles.js +0 -69
  492. package/components/detailed-card-section/styles.js.map +0 -1
  493. package/components/detailed-card-section/types.d.ts +0 -27
  494. package/components/detailed-card-section-item/DetailedCardSectionItem.d.ts +0 -9
  495. package/components/detailed-card-section-item/DetailedCardSectionItem.js +0 -64
  496. package/components/detailed-card-section-item/DetailedCardSectionItem.js.map +0 -1
  497. package/components/detailed-card-section-item/styles.js +0 -34
  498. package/components/detailed-card-section-item/styles.js.map +0 -1
  499. package/components/detailed-card-section-item/types.d.ts +0 -35
  500. package/components/flexbox/Flexbox.d.ts +0 -9
  501. package/components/flexbox/Flexbox.js +0 -44
  502. package/components/flexbox/Flexbox.js.map +0 -1
  503. package/components/flexbox/styles.js +0 -54
  504. package/components/flexbox/styles.js.map +0 -1
  505. package/components/flexbox/types.d.ts +0 -24
  506. package/components/focus-within-group/FocusWithinGroup.d.ts +0 -41
  507. package/components/focus-within-group/FocusWithinGroup.js +0 -91
  508. package/components/focus-within-group/FocusWithinGroup.js.map +0 -1
  509. package/components/focus-within-group/context.d.ts +0 -7
  510. package/components/focus-within-group/context.js +0 -21
  511. package/components/focus-within-group/context.js.map +0 -1
  512. package/components/focus-within-group/reducer.d.ts +0 -5
  513. package/components/focus-within-group/reducer.js +0 -419
  514. package/components/focus-within-group/reducer.js.map +0 -1
  515. package/components/focus-within-group/types.d.ts +0 -143
  516. package/components/focus-within-group/types.js +0 -42
  517. package/components/focus-within-group/types.js.map +0 -1
  518. package/components/focus-within-group/useFocusOnList.d.ts +0 -5
  519. package/components/focus-within-group/useFocusOnList.js +0 -44
  520. package/components/focus-within-group/useFocusOnList.js.map +0 -1
  521. package/components/focus-within-group/useFocusOnListItem.d.ts +0 -39
  522. package/components/focus-within-group/useFocusOnListItem.js +0 -148
  523. package/components/focus-within-group/useFocusOnListItem.js.map +0 -1
  524. package/components/gradient-border/index.d.ts +0 -14
  525. package/components/gradient-border/index.js +0 -38
  526. package/components/gradient-border/index.js.map +0 -1
  527. package/components/grid/Grid.d.ts +0 -13
  528. package/components/grid/Grid.js +0 -45
  529. package/components/grid/Grid.js.map +0 -1
  530. package/components/grid/styles.js +0 -55
  531. package/components/grid/styles.js.map +0 -1
  532. package/components/grid/types.d.ts +0 -22
  533. package/components/grid-item/GridItem.d.ts +0 -9
  534. package/components/grid-item/GridItem.js +0 -28
  535. package/components/grid-item/GridItem.js.map +0 -1
  536. package/components/grid-item/styles.js +0 -16
  537. package/components/grid-item/styles.js.map +0 -1
  538. package/components/grid-item/types.d.ts +0 -11
  539. package/components/heading/Heading.d.ts +0 -9
  540. package/components/heading/Heading.js +0 -50
  541. package/components/heading/Heading.js.map +0 -1
  542. package/components/heading/styles.js +0 -67
  543. package/components/heading/styles.js.map +0 -1
  544. package/components/heading/types.d.ts +0 -62
  545. package/components/heading/types.js +0 -26
  546. package/components/heading/types.js.map +0 -1
  547. package/components/icon/Icon.d.ts +0 -10
  548. package/components/icon/Icon.js +0 -116
  549. package/components/icon/Icon.js.map +0 -1
  550. package/components/icon/styles.js +0 -84
  551. package/components/icon/styles.js.map +0 -1
  552. package/components/icon/types.d.ts +0 -57
  553. package/components/icon/types.js +0 -18
  554. package/components/icon/types.js.map +0 -1
  555. package/components/icon-button/IconButton.d.ts +0 -12
  556. package/components/icon-button/IconButton.js +0 -81
  557. package/components/icon-button/IconButton.js.map +0 -1
  558. package/components/icon-button/styles.js +0 -31
  559. package/components/icon-button/styles.js.map +0 -1
  560. package/components/icon-button/types.d.ts +0 -56
  561. package/components/icon-button/types.js +0 -19
  562. package/components/icon-button/types.js.map +0 -1
  563. package/components/icon-button-link/IconButtonLink.d.ts +0 -13
  564. package/components/icon-button-link/IconButtonLink.js +0 -76
  565. package/components/icon-button-link/IconButtonLink.js.map +0 -1
  566. package/components/icon-button-link/types.d.ts +0 -18
  567. package/components/item/Item.d.ts +0 -10
  568. package/components/item/Item.js +0 -225
  569. package/components/item/Item.js.map +0 -1
  570. package/components/item/styles.d.ts +0 -20
  571. package/components/item/styles.js +0 -129
  572. package/components/item/styles.js.map +0 -1
  573. package/components/item/types.d.ts +0 -59
  574. package/components/item/useMenuItem.js +0 -55
  575. package/components/item/useMenuItem.js.map +0 -1
  576. package/components/link/Link.d.ts +0 -14
  577. package/components/link/Link.js +0 -67
  578. package/components/link/Link.js.map +0 -1
  579. package/components/link/styles.d.ts +0 -15
  580. package/components/link/styles.js +0 -145
  581. package/components/link/styles.js.map +0 -1
  582. package/components/link/types.d.ts +0 -40
  583. package/components/link-button/LinkButton.d.ts +0 -13
  584. package/components/link-button/LinkButton.js +0 -66
  585. package/components/link-button/LinkButton.js.map +0 -1
  586. package/components/link-button/types.d.ts +0 -13
  587. package/components/listbox/ActiveDescendantListbox.d.ts +0 -8
  588. package/components/listbox/ActiveDescendantListbox.js +0 -74
  589. package/components/listbox/ActiveDescendantListbox.js.map +0 -1
  590. package/components/listbox/Listbox.d.ts +0 -10
  591. package/components/listbox/Listbox.js +0 -110
  592. package/components/listbox/Listbox.js.map +0 -1
  593. package/components/listbox/RovingTabindexListbox.d.ts +0 -8
  594. package/components/listbox/RovingTabindexListbox.js +0 -30
  595. package/components/listbox/RovingTabindexListbox.js.map +0 -1
  596. package/components/listbox/context.d.ts +0 -7
  597. package/components/listbox/context.js +0 -15
  598. package/components/listbox/context.js.map +0 -1
  599. package/components/listbox/reducer.d.ts +0 -5
  600. package/components/listbox/reducer.js +0 -45
  601. package/components/listbox/reducer.js.map +0 -1
  602. package/components/listbox/styles.js +0 -44
  603. package/components/listbox/styles.js.map +0 -1
  604. package/components/listbox/types.d.ts +0 -101
  605. package/components/listbox/types.js +0 -32
  606. package/components/listbox/types.js.map +0 -1
  607. package/components/listbox/useListboxItem.d.ts +0 -12
  608. package/components/listbox/useListboxItem.js +0 -90
  609. package/components/listbox/useListboxItem.js.map +0 -1
  610. package/components/number/Number.d.ts +0 -9
  611. package/components/number/Number.js +0 -105
  612. package/components/number/Number.js.map +0 -1
  613. package/components/number/styles.js +0 -10
  614. package/components/number/styles.js.map +0 -1
  615. package/components/number/types.d.ts +0 -63
  616. package/components/number-field/NumberField.d.ts +0 -10
  617. package/components/number-field/NumberField.js +0 -216
  618. package/components/number-field/NumberField.js.map +0 -1
  619. package/components/number-field/styles.js +0 -240
  620. package/components/number-field/styles.js.map +0 -1
  621. package/components/number-field/types.d.ts +0 -74
  622. package/components/number-field/types.js +0 -14
  623. package/components/number-field/types.js.map +0 -1
  624. package/components/pill/Pill.d.ts +0 -9
  625. package/components/pill/Pill.js +0 -93
  626. package/components/pill/Pill.js.map +0 -1
  627. package/components/pill/styles.js +0 -305
  628. package/components/pill/styles.js.map +0 -1
  629. package/components/pill/types.d.ts +0 -47
  630. package/components/pill/types.js +0 -15
  631. package/components/pill/types.js.map +0 -1
  632. package/components/progress-bar/ProgressBar.d.ts +0 -9
  633. package/components/progress-bar/ProgressBar.js +0 -35
  634. package/components/progress-bar/ProgressBar.js.map +0 -1
  635. package/components/progress-bar/styles.js +0 -38
  636. package/components/progress-bar/styles.js.map +0 -1
  637. package/components/progress-bar/types.d.ts +0 -20
  638. package/components/radio/Radio.d.ts +0 -11
  639. package/components/radio/Radio.js +0 -128
  640. package/components/radio/Radio.js.map +0 -1
  641. package/components/radio/styles.js +0 -113
  642. package/components/radio/styles.js.map +0 -1
  643. package/components/radio/types.d.ts +0 -58
  644. package/components/radio-group/RadioGroup.d.ts +0 -10
  645. package/components/radio-group/RadioGroup.js +0 -89
  646. package/components/radio-group/RadioGroup.js.map +0 -1
  647. package/components/radio-group/context.js +0 -6
  648. package/components/radio-group/context.js.map +0 -1
  649. package/components/radio-group/styles.js +0 -78
  650. package/components/radio-group/styles.js.map +0 -1
  651. package/components/radio-group/types.d.ts +0 -68
  652. package/components/radio-group/types.js +0 -18
  653. package/components/radio-group/types.js.map +0 -1
  654. package/components/shared/styles.d.ts +0 -17
  655. package/components/shared/styles.js +0 -250
  656. package/components/shared/styles.js.map +0 -1
  657. package/components/shield/Shield.d.ts +0 -9
  658. package/components/shield/Shield.js +0 -136
  659. package/components/shield/Shield.js.map +0 -1
  660. package/components/shield/styles.js +0 -71
  661. package/components/shield/styles.js.map +0 -1
  662. package/components/shield/types.d.ts +0 -52
  663. package/components/shield/types.js +0 -25
  664. package/components/shield/types.js.map +0 -1
  665. package/components/side-navigation-menu/SideNavigationMenu.d.ts +0 -9
  666. package/components/side-navigation-menu/SideNavigationMenu.js +0 -367
  667. package/components/side-navigation-menu/SideNavigationMenu.js.map +0 -1
  668. package/components/side-navigation-menu/context.js +0 -6
  669. package/components/side-navigation-menu/context.js.map +0 -1
  670. package/components/side-navigation-menu/reducer.js +0 -26
  671. package/components/side-navigation-menu/reducer.js.map +0 -1
  672. package/components/side-navigation-menu/styles.js +0 -196
  673. package/components/side-navigation-menu/styles.js.map +0 -1
  674. package/components/side-navigation-menu/types.d.ts +0 -72
  675. package/components/side-navigation-menu/types.js +0 -21
  676. package/components/side-navigation-menu/types.js.map +0 -1
  677. package/components/side-navigation-menu-bar/SideNavigationMenuBar.d.ts +0 -9
  678. package/components/side-navigation-menu-bar/SideNavigationMenuBar.js +0 -217
  679. package/components/side-navigation-menu-bar/SideNavigationMenuBar.js.map +0 -1
  680. package/components/side-navigation-menu-bar/context.js +0 -6
  681. package/components/side-navigation-menu-bar/context.js.map +0 -1
  682. package/components/side-navigation-menu-bar/styles.js +0 -89
  683. package/components/side-navigation-menu-bar/styles.js.map +0 -1
  684. package/components/side-navigation-menu-bar/types.d.ts +0 -65
  685. package/components/side-navigation-menu-bar/types.js +0 -22
  686. package/components/side-navigation-menu-bar/types.js.map +0 -1
  687. package/components/side-navigation-menu-bar/useSideNavigationMenuBar.d.ts +0 -9
  688. package/components/side-navigation-menu-bar/useSideNavigationMenuBar.js +0 -70
  689. package/components/side-navigation-menu-bar/useSideNavigationMenuBar.js.map +0 -1
  690. package/components/side-navigation-menu-item/SideNavigationMenuItem.d.ts +0 -9
  691. package/components/side-navigation-menu-item/SideNavigationMenuItem.js +0 -115
  692. package/components/side-navigation-menu-item/SideNavigationMenuItem.js.map +0 -1
  693. package/components/side-navigation-menu-item/styles.js +0 -174
  694. package/components/side-navigation-menu-item/styles.js.map +0 -1
  695. package/components/side-navigation-menu-item/types.d.ts +0 -51
  696. package/components/skeleton/Skeleton.d.ts +0 -15
  697. package/components/skeleton/Skeleton.js +0 -42
  698. package/components/skeleton/Skeleton.js.map +0 -1
  699. package/components/skeleton/styles.js +0 -84
  700. package/components/skeleton/styles.js.map +0 -1
  701. package/components/skeleton/types.d.ts +0 -18
  702. package/components/skeleton-circle/SkeletonCircle.d.ts +0 -9
  703. package/components/skeleton-circle/SkeletonCircle.js +0 -36
  704. package/components/skeleton-circle/SkeletonCircle.js.map +0 -1
  705. package/components/skeleton-circle/styles.js +0 -26
  706. package/components/skeleton-circle/styles.js.map +0 -1
  707. package/components/skeleton-circle/types.d.ts +0 -12
  708. package/components/skeleton-text/SkeletonText.d.ts +0 -9
  709. package/components/skeleton-text/SkeletonText.js +0 -42
  710. package/components/skeleton-text/SkeletonText.js.map +0 -1
  711. package/components/skeleton-text/styles.js +0 -39
  712. package/components/skeleton-text/styles.js.map +0 -1
  713. package/components/skeleton-text/types.d.ts +0 -36
  714. package/components/skeleton-text/types.js +0 -20
  715. package/components/skeleton-text/types.js.map +0 -1
  716. package/components/spinner/Spinner.d.ts +0 -9
  717. package/components/spinner/Spinner.js +0 -82
  718. package/components/spinner/Spinner.js.map +0 -1
  719. package/components/spinner/images/spinner-grey-l1.svg.js +0 -4
  720. package/components/spinner/images/spinner-grey-l1.svg.js.map +0 -1
  721. package/components/spinner/images/spinner-grey-l2.svg.js +0 -4
  722. package/components/spinner/images/spinner-grey-l2.svg.js.map +0 -1
  723. package/components/spinner/images/spinner-grey-l3.svg.js +0 -4
  724. package/components/spinner/images/spinner-grey-l3.svg.js.map +0 -1
  725. package/components/spinner/images/spinner-primary-n.svg.js +0 -4
  726. package/components/spinner/images/spinner-primary-n.svg.js.map +0 -1
  727. package/components/spinner/intl/en-US.json.js +0 -7
  728. package/components/spinner/intl/en-US.json.js.map +0 -1
  729. package/components/spinner/intl/fr-FR.json.js +0 -7
  730. package/components/spinner/intl/fr-FR.json.js.map +0 -1
  731. package/components/spinner/intl/index.js +0 -10
  732. package/components/spinner/intl/index.js.map +0 -1
  733. package/components/spinner/styles.js +0 -13
  734. package/components/spinner/styles.js.map +0 -1
  735. package/components/spinner/types.d.ts +0 -38
  736. package/components/spinner/types.js +0 -16
  737. package/components/spinner/types.js.map +0 -1
  738. package/components/switch/Switch.d.ts +0 -11
  739. package/components/switch/Switch.js +0 -137
  740. package/components/switch/Switch.js.map +0 -1
  741. package/components/switch/styles.js +0 -187
  742. package/components/switch/styles.js.map +0 -1
  743. package/components/switch/types.d.ts +0 -58
  744. package/components/switch-group/SwitchGroup.d.ts +0 -10
  745. package/components/switch-group/SwitchGroup.js +0 -101
  746. package/components/switch-group/SwitchGroup.js.map +0 -1
  747. package/components/switch-group/context.js +0 -6
  748. package/components/switch-group/context.js.map +0 -1
  749. package/components/switch-group/styles.js +0 -78
  750. package/components/switch-group/styles.js.map +0 -1
  751. package/components/switch-group/types.d.ts +0 -72
  752. package/components/switch-group/types.js +0 -18
  753. package/components/switch-group/types.js.map +0 -1
  754. package/components/text/Text.d.ts +0 -9
  755. package/components/text/Text.js +0 -51
  756. package/components/text/Text.js.map +0 -1
  757. package/components/text/styles.js +0 -112
  758. package/components/text/styles.js.map +0 -1
  759. package/components/text/types.d.ts +0 -73
  760. package/components/text/types.js +0 -34
  761. package/components/text/types.js.map +0 -1
  762. package/components/text-area/TextArea.d.ts +0 -10
  763. package/components/text-area/TextArea.js +0 -165
  764. package/components/text-area/TextArea.js.map +0 -1
  765. package/components/text-area/styles.js +0 -240
  766. package/components/text-area/styles.js.map +0 -1
  767. package/components/text-area/types.d.ts +0 -28
  768. package/components/text-area/types.js +0 -14
  769. package/components/text-area/types.js.map +0 -1
  770. package/components/text-field/TextField.d.ts +0 -10
  771. package/components/text-field/TextField.js +0 -197
  772. package/components/text-field/TextField.js.map +0 -1
  773. package/components/text-field/intl/en-US.json.js +0 -8
  774. package/components/text-field/intl/en-US.json.js.map +0 -1
  775. package/components/text-field/intl/fr-FR.json.js +0 -8
  776. package/components/text-field/intl/fr-FR.json.js.map +0 -1
  777. package/components/text-field/intl/index.js +0 -10
  778. package/components/text-field/intl/index.js.map +0 -1
  779. package/components/text-field/styles.d.ts +0 -22
  780. package/components/text-field/styles.js +0 -252
  781. package/components/text-field/styles.js.map +0 -1
  782. package/components/text-field/types.d.ts +0 -99
  783. package/components/text-field/types.js +0 -18
  784. package/components/text-field/types.js.map +0 -1
  785. package/components/theme/context.d.ts +0 -11
  786. package/components/theme/context.js +0 -7
  787. package/components/theme/context.js.map +0 -1
  788. package/components/theme/useTheme.d.ts +0 -5
  789. package/components/theme/useTheme.js +0 -13
  790. package/components/theme/useTheme.js.map +0 -1
  791. package/hooks/useBoundingRect.d.ts +0 -8
  792. package/hooks/useBoundingRect.js +0 -17
  793. package/hooks/useBoundingRect.js.map +0 -1
  794. package/hooks/useComputeNumberOfRows.d.ts +0 -15
  795. package/hooks/useComputeNumberOfRows.js +0 -40
  796. package/hooks/useComputeNumberOfRows.js.map +0 -1
  797. package/hooks/useIsLoaded.d.ts +0 -5
  798. package/hooks/useIsLoaded.js +0 -14
  799. package/hooks/useWindowSize.d.ts +0 -8
  800. package/hooks/useWindowSize.js +0 -42
  801. package/hooks/useWindowSize.js.map +0 -1
  802. package/index.d.ts +0 -157
  803. package/react-aria/internationalized/date/DateFormatter.d.ts +0 -25
  804. package/react-aria/internationalized/date/DateFormatter.js +0 -187
  805. package/react-aria/internationalized/date/DateFormatter.js.map +0 -1
  806. package/react-aria/internationalized/message/MessageDictionary.d.ts +0 -7
  807. package/react-aria/internationalized/message/MessageDictionary.js +0 -82
  808. package/react-aria/internationalized/message/MessageDictionary.js.map +0 -1
  809. package/react-aria/internationalized/message/MessageFormatter.js +0 -38
  810. package/react-aria/internationalized/message/MessageFormatter.js.map +0 -1
  811. package/react-aria/internationalized/number/NumberFormatter.d.ts +0 -6
  812. package/react-aria/internationalized/number/NumberFormatter.js +0 -222
  813. package/react-aria/internationalized/number/NumberFormatter.js.map +0 -1
  814. package/react-aria/internationalized/number/NumberParser.js +0 -288
  815. package/react-aria/internationalized/number/NumberParser.js.map +0 -1
  816. package/react-aria/internationalized/string/LocalizedStringDictionary.d.ts +0 -21
  817. package/react-aria/internationalized/string/LocalizedStringDictionary.js +0 -118
  818. package/react-aria/internationalized/string/LocalizedStringDictionary.js.map +0 -1
  819. package/react-aria/internationalized/string/LocalizedStringFormatter.d.ts +0 -21
  820. package/react-aria/internationalized/string/LocalizedStringFormatter.js +0 -70
  821. package/react-aria/internationalized/string/LocalizedStringFormatter.js.map +0 -1
  822. package/react-aria/react-aria/button/useButton.js +0 -95
  823. package/react-aria/react-aria/button/useButton.js.map +0 -1
  824. package/react-aria/react-aria/focus/focusSafely.js +0 -33
  825. package/react-aria/react-aria/focus/focusSafely.js.map +0 -1
  826. package/react-aria/react-aria/focus/useFocusRing.js +0 -57
  827. package/react-aria/react-aria/focus/useFocusRing.js.map +0 -1
  828. package/react-aria/react-aria/focus/useFocusable.js +0 -47
  829. package/react-aria/react-aria/focus/useFocusable.js.map +0 -1
  830. package/react-aria/react-aria/form/useFormValidation.js +0 -112
  831. package/react-aria/react-aria/form/useFormValidation.js.map +0 -1
  832. package/react-aria/react-aria/i18n/context.d.ts +0 -19
  833. package/react-aria/react-aria/i18n/context.js +0 -41
  834. package/react-aria/react-aria/i18n/context.js.map +0 -1
  835. package/react-aria/react-aria/i18n/useCollator.d.ts +0 -8
  836. package/react-aria/react-aria/i18n/useCollator.js +0 -25
  837. package/react-aria/react-aria/i18n/useCollator.js.map +0 -1
  838. package/react-aria/react-aria/i18n/useDateFormatter.d.ts +0 -13
  839. package/react-aria/react-aria/i18n/useDateFormatter.js +0 -39
  840. package/react-aria/react-aria/i18n/useDateFormatter.js.map +0 -1
  841. package/react-aria/react-aria/i18n/useDefaultLocale.d.ts +0 -10
  842. package/react-aria/react-aria/i18n/useDefaultLocale.js +0 -67
  843. package/react-aria/react-aria/i18n/useDefaultLocale.js.map +0 -1
  844. package/react-aria/react-aria/i18n/useFilter.d.ts +0 -15
  845. package/react-aria/react-aria/i18n/useFilter.js +0 -58
  846. package/react-aria/react-aria/i18n/useFilter.js.map +0 -1
  847. package/react-aria/react-aria/i18n/useListFormatter.d.ts +0 -8
  848. package/react-aria/react-aria/i18n/useListFormatter.js +0 -20
  849. package/react-aria/react-aria/i18n/useListFormatter.js.map +0 -1
  850. package/react-aria/react-aria/i18n/useLocalizedStringFormatter.d.ts +0 -15
  851. package/react-aria/react-aria/i18n/useLocalizedStringFormatter.js +0 -38
  852. package/react-aria/react-aria/i18n/useLocalizedStringFormatter.js.map +0 -1
  853. package/react-aria/react-aria/i18n/useMessageFormatter.d.ts +0 -13
  854. package/react-aria/react-aria/i18n/useMessageFormatter.js +0 -32
  855. package/react-aria/react-aria/i18n/useMessageFormatter.js.map +0 -1
  856. package/react-aria/react-aria/i18n/useNumberFormatter.d.ts +0 -10
  857. package/react-aria/react-aria/i18n/useNumberFormatter.js +0 -21
  858. package/react-aria/react-aria/i18n/useNumberFormatter.js.map +0 -1
  859. package/react-aria/react-aria/i18n/utils.js +0 -49
  860. package/react-aria/react-aria/i18n/utils.js.map +0 -1
  861. package/react-aria/react-aria/interactions/context.js +0 -20
  862. package/react-aria/react-aria/interactions/context.js.map +0 -1
  863. package/react-aria/react-aria/interactions/createEventHandler.js +0 -48
  864. package/react-aria/react-aria/interactions/createEventHandler.js.map +0 -1
  865. package/react-aria/react-aria/interactions/textSelection.js +0 -85
  866. package/react-aria/react-aria/interactions/textSelection.js.map +0 -1
  867. package/react-aria/react-aria/interactions/useFocus.js +0 -53
  868. package/react-aria/react-aria/interactions/useFocus.js.map +0 -1
  869. package/react-aria/react-aria/interactions/useFocusVisible.js +0 -236
  870. package/react-aria/react-aria/interactions/useFocusVisible.js.map +0 -1
  871. package/react-aria/react-aria/interactions/useFocusWithin.js +0 -65
  872. package/react-aria/react-aria/interactions/useFocusWithin.js.map +0 -1
  873. package/react-aria/react-aria/interactions/useKeyboard.js +0 -27
  874. package/react-aria/react-aria/interactions/useKeyboard.js.map +0 -1
  875. package/react-aria/react-aria/interactions/usePress.js +0 -769
  876. package/react-aria/react-aria/interactions/usePress.js.map +0 -1
  877. package/react-aria/react-aria/interactions/useScrollWheel.js +0 -31
  878. package/react-aria/react-aria/interactions/useScrollWheel.js.map +0 -1
  879. package/react-aria/react-aria/interactions/utils.js +0 -116
  880. package/react-aria/react-aria/interactions/utils.js.map +0 -1
  881. package/react-aria/react-aria/label/useField.js +0 -42
  882. package/react-aria/react-aria/label/useField.js.map +0 -1
  883. package/react-aria/react-aria/label/useLabel.js +0 -42
  884. package/react-aria/react-aria/label/useLabel.js.map +0 -1
  885. package/react-aria/react-aria/live-announcer/LiveAnnouncer.js +0 -121
  886. package/react-aria/react-aria/live-announcer/LiveAnnouncer.js.map +0 -1
  887. package/react-aria/react-aria/numberfield/intl/en-US.json.js +0 -11
  888. package/react-aria/react-aria/numberfield/intl/en-US.json.js.map +0 -1
  889. package/react-aria/react-aria/numberfield/intl/fr-FR.json.js +0 -11
  890. package/react-aria/react-aria/numberfield/intl/fr-FR.json.js.map +0 -1
  891. package/react-aria/react-aria/numberfield/intl/index.js +0 -10
  892. package/react-aria/react-aria/numberfield/intl/index.js.map +0 -1
  893. package/react-aria/react-aria/numberfield/useNumberField.js +0 -294
  894. package/react-aria/react-aria/numberfield/useNumberField.js.map +0 -1
  895. package/react-aria/react-aria/spinbutton/intl/en-US.json.js +0 -7
  896. package/react-aria/react-aria/spinbutton/intl/en-US.json.js.map +0 -1
  897. package/react-aria/react-aria/spinbutton/intl/fr-FR.json.js +0 -7
  898. package/react-aria/react-aria/spinbutton/intl/fr-FR.json.js.map +0 -1
  899. package/react-aria/react-aria/spinbutton/intl/index.js +0 -10
  900. package/react-aria/react-aria/spinbutton/intl/index.js.map +0 -1
  901. package/react-aria/react-aria/spinbutton/useSpinButton.js +0 -168
  902. package/react-aria/react-aria/spinbutton/useSpinButton.js.map +0 -1
  903. package/react-aria/react-aria/ssr/SSRProvider.d.ts +0 -22
  904. package/react-aria/react-aria/ssr/SSRProvider.js +0 -157
  905. package/react-aria/react-aria/ssr/SSRProvider.js.map +0 -1
  906. package/react-aria/react-aria/textfield/useFormattedTextField.js +0 -142
  907. package/react-aria/react-aria/textfield/useFormattedTextField.js.map +0 -1
  908. package/react-aria/react-aria/textfield/useTextField.js +0 -156
  909. package/react-aria/react-aria/textfield/useTextField.js.map +0 -1
  910. package/react-aria/react-aria/utils/chain.js +0 -33
  911. package/react-aria/react-aria/utils/chain.js.map +0 -1
  912. package/react-aria/react-aria/utils/domHelpers.js +0 -14
  913. package/react-aria/react-aria/utils/domHelpers.js.map +0 -1
  914. package/react-aria/react-aria/utils/filterDOMProps.js +0 -45
  915. package/react-aria/react-aria/utils/filterDOMProps.js.map +0 -1
  916. package/react-aria/react-aria/utils/focusWithoutScrolling.js +0 -88
  917. package/react-aria/react-aria/utils/focusWithoutScrolling.js.map +0 -1
  918. package/react-aria/react-aria/utils/isVirtualEvent.js +0 -51
  919. package/react-aria/react-aria/utils/isVirtualEvent.js.map +0 -1
  920. package/react-aria/react-aria/utils/mergeProps.js +0 -48
  921. package/react-aria/react-aria/utils/mergeProps.js.map +0 -1
  922. package/react-aria/react-aria/utils/openLink.js +0 -55
  923. package/react-aria/react-aria/utils/openLink.js.map +0 -1
  924. package/react-aria/react-aria/utils/platform.js +0 -69
  925. package/react-aria/react-aria/utils/platform.js.map +0 -1
  926. package/react-aria/react-aria/utils/runAfterTransition.js +0 -100
  927. package/react-aria/react-aria/utils/runAfterTransition.js.map +0 -1
  928. package/react-aria/react-aria/utils/useDeepMemo.js +0 -16
  929. package/react-aria/react-aria/utils/useDeepMemo.js.map +0 -1
  930. package/react-aria/react-aria/utils/useEffectEvent.js +0 -31
  931. package/react-aria/react-aria/utils/useEffectEvent.js.map +0 -1
  932. package/react-aria/react-aria/utils/useEvent.js +0 -21
  933. package/react-aria/react-aria/utils/useEvent.js.map +0 -1
  934. package/react-aria/react-aria/utils/useFormReset.js +0 -23
  935. package/react-aria/react-aria/utils/useFormReset.js.map +0 -1
  936. package/react-aria/react-aria/utils/useGlobalListeners.js +0 -44
  937. package/react-aria/react-aria/utils/useGlobalListeners.js.map +0 -1
  938. package/react-aria/react-aria/utils/useId.js +0 -86
  939. package/react-aria/react-aria/utils/useId.js.map +0 -1
  940. package/react-aria/react-aria/utils/useLabels.js +0 -39
  941. package/react-aria/react-aria/utils/useLabels.js.map +0 -1
  942. package/react-aria/react-aria/utils/useLayoutEffect.js +0 -21
  943. package/react-aria/react-aria/utils/useLayoutEffect.js.map +0 -1
  944. package/react-aria/react-aria/utils/useSyncRef.js +0 -29
  945. package/react-aria/react-aria/utils/useSyncRef.js.map +0 -1
  946. package/react-aria/react-aria/utils/useValueEffect.js +0 -52
  947. package/react-aria/react-aria/utils/useValueEffect.js.map +0 -1
  948. package/react-aria/react-stately/form/useFormValidationState.js +0 -191
  949. package/react-aria/react-stately/form/useFormValidationState.js.map +0 -1
  950. package/react-aria/react-stately/numberfield/useNumberFieldState.js +0 -196
  951. package/react-aria/react-stately/numberfield/useNumberFieldState.js.map +0 -1
  952. package/react-aria/react-stately/utils/number.js +0 -56
  953. package/react-aria/react-stately/utils/number.js.map +0 -1
  954. package/react-aria/react-stately/utils/useControlledState.js +0 -68
  955. package/react-aria/react-stately/utils/useControlledState.js.map +0 -1
  956. package/react-aria/react-types/shared/locale.d.ts +0 -3
  957. package/types/colors.d.ts +0 -102
  958. package/types/colors.js +0 -64
  959. package/types/colors.js.map +0 -1
  960. package/types/fonts.d.ts +0 -12
  961. package/types/fonts.js +0 -10
  962. package/types/helpers.d.ts +0 -23
  963. package/types/products.d.ts +0 -40
  964. package/types/products.js +0 -38
  965. package/types/products.js.map +0 -1
  966. package/types/styles.d.ts +0 -283
  967. package/types/styles.js +0 -161
  968. package/types/styles.js.map +0 -1
  969. package/utils/filterComponents.d.ts +0 -12
  970. package/utils/filterComponents.js +0 -24
  971. package/utils/filterComponents.js.map +0 -1
  972. package/utils/getTextWidth.d.ts +0 -6
  973. package/utils/getTextWidth.js +0 -32
  974. package/utils/getTextWidth.js.map +0 -1
  975. package/utils/isComponent.d.ts +0 -12
  976. package/utils/isComponent.js +0 -15
  977. package/utils/isComponent.js.map +0 -1
  978. package/utils/partitionComponents.d.ts +0 -10
  979. package/utils/partitionComponents.js +0 -26
  980. package/utils/redsift-design-tokens.d.ts +0 -1389
  981. package/utils/redsift-design-tokens.js +0 -1391
  982. package/utils/useId.d.ts +0 -6
  983. package/utils/useId.js +0 -42
  984. package/utils/useId.js.map +0 -1
  985. package/utils/warnIfNoAccessibleLabelFound.d.ts +0 -11
  986. package/utils/warnIfNoAccessibleLabelFound.js +0 -20
  987. /package/{_virtual → _internal}/_rollupPluginBabelHelpers.js.map +0 -0
  988. /package/{types → _internal}/fonts.js.map +0 -0
  989. /package/{utils → _internal}/partitionComponents.js.map +0 -0
  990. /package/{utils → _internal}/redsift-design-tokens.js.map +0 -0
  991. /package/{hooks → _internal}/useIsLoaded.js.map +0 -0
  992. /package/{utils → _internal}/warnIfNoAccessibleLabelFound.js.map +0 -0
@@ -0,0 +1,43 @@
1
+ import { ComponentProps } from 'react';
2
+ import { V as ValueOf, C as Comp } from './helpers.js';
3
+ import { L as LayoutProps, S as SpacingProps, P as PositioningProps } from './styles2.js';
4
+ import { T as Theme } from './colors.js';
5
+
6
+ /**
7
+ * Component size.
8
+ */
9
+ declare const SpinnerSize: {
10
+ readonly xsmall: "xsmall";
11
+ readonly small: "small";
12
+ readonly medium: "medium";
13
+ readonly large: "large";
14
+ };
15
+ type SpinnerSize = ValueOf<typeof SpinnerSize>;
16
+ /**
17
+ * Component props.
18
+ */
19
+ interface SpinnerProps extends Omit<ComponentProps<'img'>, 'color'>, LayoutProps, SpacingProps, PositioningProps {
20
+ /** Indicates whether the element is exposed to an accessibility API. */
21
+ 'aria-hidden'?: boolean | 'false' | 'true';
22
+ /** A screen reader only label for the Spinner. */
23
+ 'aria-label'?: string;
24
+ /** Color variant. */
25
+ color?: 'primary' | 'grey-l1' | 'grey-l2' | 'grey-l3';
26
+ /** @deprecated: Whether the spinner is colored or not. */
27
+ isColored?: boolean;
28
+ /** Spinner size. */
29
+ size?: SpinnerSize;
30
+ /** Theme. */
31
+ theme?: Theme;
32
+ }
33
+ type StyledSpinnerProps = Omit<SpinnerProps, 'color'> & {
34
+ $size?: SpinnerProps['size'];
35
+ $theme?: SpinnerProps['theme'];
36
+ };
37
+
38
+ /**
39
+ * The Spinner component.
40
+ */
41
+ declare const Spinner: Comp<SpinnerProps, HTMLImageElement>;
42
+
43
+ export { Spinner as S, SpinnerSize as a, SpinnerProps as b, StyledSpinnerProps as c };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner2.js","sources":["../../src/react-aria/internationalized/string/LocalizedStringDictionary.ts","../../src/react-aria/internationalized/string/LocalizedStringFormatter.ts","../../src/react-aria/react-aria/i18n/useLocalizedStringFormatter.ts","../../src/components/spinner/intl/index.ts","../../src/components/spinner/types.ts","../../src/components/spinner/styles.ts","../../src/components/spinner/Spinner.tsx"],"sourcesContent":["/* eslint-disable prefer-const */\n// @ts-nocheck\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type { LocalizedString } from './LocalizedStringFormatter';\n\nexport type LocalizedStrings<K extends string, T extends LocalizedString> = {\n [lang: string]: Record<K, T>;\n};\n\nconst localeSymbol = Symbol.for('react-aria.i18n.locale');\nconst stringsSymbol = Symbol.for('react-aria.i18n.strings');\nlet cachedGlobalStrings: { [packageName: string]: LocalizedStringDictionary<any, any> } | null | undefined = undefined;\n\n/**\n * Stores a mapping of localized strings. Can be used to find the\n * closest available string for a given locale.\n */\nexport class LocalizedStringDictionary<K extends string = string, T extends LocalizedString = string> {\n private strings: LocalizedStrings<K, T>;\n private defaultLocale: string;\n\n constructor(messages: LocalizedStrings<K, T>, defaultLocale: string = 'en-US') {\n // Clone messages so we don't modify the original object.\n // Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin.\n this.strings = Object.fromEntries(Object.entries(messages).filter(([, v]) => v));\n this.defaultLocale = defaultLocale;\n }\n\n /** Returns a localized string for the given key and locale. */\n getStringForLocale(key: K, locale: string): T {\n let strings = this.getStringsForLocale(locale);\n let string = strings[key];\n if (!string) {\n throw new Error(`Could not find intl message ${key} in ${locale} locale`);\n }\n\n return string;\n }\n\n /** Returns all localized strings for the given locale. */\n getStringsForLocale(locale: string): Record<K, T> {\n let strings = this.strings[locale];\n if (!strings) {\n strings = getStringsForLocale(locale, this.strings, this.defaultLocale);\n this.strings[locale] = strings;\n }\n\n return strings;\n }\n\n static getGlobalDictionaryForPackage<K extends string = string, T extends LocalizedString = string>(\n packageName: string\n ): LocalizedStringDictionary<K, T> | null {\n if (typeof window === 'undefined') {\n return null;\n }\n\n let locale = window[localeSymbol];\n if (cachedGlobalStrings === undefined) {\n let globalStrings = window[stringsSymbol];\n if (!globalStrings) {\n return null;\n }\n\n cachedGlobalStrings = {};\n for (let pkg in globalStrings) {\n cachedGlobalStrings[pkg] = new LocalizedStringDictionary({ [locale]: globalStrings[pkg] }, locale);\n }\n }\n\n let dictionary = cachedGlobalStrings?.[packageName];\n if (!dictionary) {\n throw new Error(\n `Strings for package \"${packageName}\" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`\n );\n }\n\n return dictionary;\n }\n}\n\nfunction getStringsForLocale<K extends string, T extends LocalizedString>(\n locale: string,\n strings: LocalizedStrings<K, T>,\n defaultLocale = 'en-US'\n) {\n // If there is an exact match, use it.\n if (strings[locale]) {\n return strings[locale];\n }\n\n // Attempt to find the closest match by language.\n // For example, if the locale is fr-CA (French Canadian), but there is only\n // an fr-FR (France) set of strings, use that.\n // This could be replaced with Intl.LocaleMatcher once it is supported.\n // https://github.com/tc39/proposal-intl-localematcher\n let language = getLanguage(locale);\n if (strings[language]) {\n return strings[language];\n }\n\n for (let key in strings) {\n if (key.startsWith(language + '-')) {\n return strings[key];\n }\n }\n\n // Nothing close, use english.\n return strings[defaultLocale];\n}\n\nfunction getLanguage(locale: string) {\n // @ts-ignore\n if (Intl.Locale) {\n // @ts-ignore\n return new Intl.Locale(locale).language;\n }\n\n return locale.split('-')[0];\n}\n","/* eslint-disable prefer-const */\n// @ts-nocheck\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type { LocalizedStringDictionary } from './LocalizedStringDictionary';\n\nexport type Variables = Record<string, string | number | boolean> | undefined;\nexport type LocalizedString = string | ((args: Variables, formatter?: LocalizedStringFormatter<any, any>) => string);\ntype InternalString = string | (() => string);\n\nconst pluralRulesCache = new Map<string, Intl.PluralRules>();\nconst numberFormatCache = new Map<string, Intl.NumberFormat>();\n\n/**\n * Formats localized strings from a LocalizedStringDictionary. Supports interpolating variables,\n * selecting the correct pluralization, and formatting numbers for the locale.\n */\nexport class LocalizedStringFormatter<K extends string = string, T extends LocalizedString = string> {\n private locale: string;\n private strings: LocalizedStringDictionary<K, T>;\n\n constructor(locale: string, strings: LocalizedStringDictionary<K, T>) {\n this.locale = locale;\n this.strings = strings;\n }\n\n /** Formats a localized string for the given key with the provided variables. */\n format(key: K, variables?: Variables): string {\n let message = this.strings.getStringForLocale(key, this.locale);\n\n return typeof message === 'function' ? message(variables, this) : message;\n }\n\n protected plural(count: number, options: Record<string, InternalString>, type: Intl.PluralRuleType = 'cardinal') {\n let opt = options['=' + count];\n if (opt) {\n return typeof opt === 'function' ? opt() : opt;\n }\n\n let key = this.locale + ':' + type;\n let pluralRules = pluralRulesCache.get(key);\n if (!pluralRules) {\n pluralRules = new Intl.PluralRules(this.locale, { type });\n pluralRulesCache.set(key, pluralRules);\n }\n\n let selected = pluralRules.select(count);\n opt = options[selected] || options.other;\n return typeof opt === 'function' ? opt() : opt;\n }\n\n protected number(value: number) {\n let numberFormat = numberFormatCache.get(this.locale);\n if (!numberFormat) {\n numberFormat = new Intl.NumberFormat(this.locale);\n numberFormatCache.set(this.locale, numberFormat);\n }\n return numberFormat.format(value);\n }\n\n protected select(options: Record<string, InternalString>, value: string) {\n let opt = options[value] || options.other;\n return typeof opt === 'function' ? opt() : opt;\n }\n}\n","/* eslint-disable prefer-const */\n// @ts-nocheck\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n LocalizedString,\n LocalizedStringDictionary,\n LocalizedStringFormatter,\n LocalizedStrings,\n} from '../../internationalized/string';\nimport { useLocale } from './context';\nimport { useMemo } from 'react';\n\nconst cache = new WeakMap();\nfunction getCachedDictionary<K extends string, T extends LocalizedString>(\n strings: LocalizedStrings<K, T>\n): LocalizedStringDictionary<K, T> {\n let dictionary = cache.get(strings);\n if (!dictionary) {\n dictionary = new LocalizedStringDictionary(strings);\n cache.set(strings, dictionary);\n }\n\n return dictionary;\n}\n\n/**\n * Returns a cached LocalizedStringDictionary for the given strings.\n */\nexport function useLocalizedStringDictionary<K extends string = string, T extends LocalizedString = string>(\n strings: LocalizedStrings<K, T>,\n packageName?: string\n): LocalizedStringDictionary<K, T> {\n return (\n (packageName && LocalizedStringDictionary.getGlobalDictionaryForPackage(packageName)) ||\n getCachedDictionary(strings)\n );\n}\n\n/**\n * Provides localized string formatting for the current locale. Supports interpolating variables,\n * selecting the correct pluralization, and formatting numbers. Automatically updates when the locale changes.\n * @param strings - A mapping of languages to localized strings by key.\n */\nexport function useLocalizedStringFormatter<K extends string = string, T extends LocalizedString = string>(\n strings: LocalizedStrings<K, T>,\n packageName?: string\n): LocalizedStringFormatter<K, T> {\n let { locale } = useLocale();\n let dictionary = useLocalizedStringDictionary(strings, packageName);\n return useMemo(() => new LocalizedStringFormatter(locale, dictionary), [locale, dictionary]);\n}\n","import enUS from './en-US.json';\nimport frFR from './fr-FR.json';\n\nexport default {\n 'en-US': enUS,\n 'fr-FR': frFR,\n};\n","import { ComponentProps } from 'react';\nimport { LayoutProps, PositioningProps, SpacingProps, Theme, ValueOf } from '../../types';\n\n/**\n * Component size.\n */\nexport const SpinnerSize = {\n xsmall: 'xsmall',\n small: 'small',\n medium: 'medium',\n large: 'large',\n} as const;\nexport type SpinnerSize = ValueOf<typeof SpinnerSize>;\n\n/**\n * Component props.\n */\nexport interface SpinnerProps\n extends Omit<ComponentProps<'img'>, 'color'>,\n LayoutProps,\n SpacingProps,\n PositioningProps {\n /** Indicates whether the element is exposed to an accessibility API. */\n 'aria-hidden'?: boolean | 'false' | 'true';\n /** A screen reader only label for the Spinner. */\n 'aria-label'?: string;\n /** Color variant. */\n color?: 'primary' | 'grey-l1' | 'grey-l2' | 'grey-l3';\n /** @deprecated: Whether the spinner is colored or not. */\n isColored?: boolean;\n /** Spinner size. */\n size?: SpinnerSize;\n /** Theme. */\n theme?: Theme;\n}\n\nexport type StyledSpinnerProps = Omit<SpinnerProps, 'color'> & {\n $size?: SpinnerProps['size'];\n $theme?: SpinnerProps['theme'];\n};\n","import styled from 'styled-components';\nimport { baseStyling } from '../shared';\nimport { StyledSpinnerProps } from './types';\n\nexport const StyledSpinner = styled.img<StyledSpinnerProps>`\n ${baseStyling}\n\n display: inline;\n line-height: 0px;\n vertical-align: -0.125em;\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp } from '../../types';\n\nimport { useLocalizedStringFormatter } from '../../react-aria/react-aria/i18n';\nimport intlMessages from './intl';\n\nimport { SpinnerProps, SpinnerSize } from './types';\nimport { StyledSpinner } from './styles';\n\nimport spinnerPrimaryN from './images/spinner-primary-n.svg';\nimport spinnerGreyL1 from './images/spinner-grey-l1.svg';\nimport spinnerGreyL2 from './images/spinner-grey-l2.svg';\nimport spinnerGreyL3 from './images/spinner-grey-l3.svg';\nimport { useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'Spinner';\nconst CLASSNAME = 'redsift-shield';\n\nconst sizeToDimension = (size: SpinnerSize): { width: number; height: number } => {\n switch (size) {\n case SpinnerSize.xsmall:\n return { width: 15, height: 15 };\n case SpinnerSize.small:\n return { width: 24, height: 24 };\n case SpinnerSize.large:\n return { width: 56, height: 56 };\n case SpinnerSize.medium:\n default:\n return { width: 40, height: 40 };\n }\n};\n\n/**\n * The Spinner component.\n */\nexport const Spinner: Comp<SpinnerProps, HTMLImageElement> = forwardRef((props, ref) => {\n const {\n 'aria-hidden': ariaHidden,\n 'aria-label': ariaLabel,\n className,\n color: propsColor,\n isColored = true,\n size = SpinnerSize.medium,\n theme: propsTheme,\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n\n const color = propsColor ?? (isColored ? 'primary' : 'grey-l3');\n\n const { width, height } = sizeToDimension(size!);\n\n const stringFormatter = useLocalizedStringFormatter(intlMessages);\n\n return (\n <StyledSpinner\n alt={stringFormatter.format('loading')}\n {...forwardedProps}\n aria-hidden={ariaLabel ? (ariaHidden ? ariaHidden : undefined) : true}\n aria-label={ariaLabel}\n className={classNames(Spinner.className, className)}\n height={height}\n ref={ref as RefObject<HTMLImageElement>}\n src={\n color === 'primary'\n ? spinnerPrimaryN\n : color === 'grey-l1'\n ? spinnerGreyL1\n : color === 'grey-l2'\n ? spinnerGreyL2\n : spinnerGreyL3\n }\n width={width}\n $size={size}\n $theme={theme}\n />\n );\n});\nSpinner.className = CLASSNAME;\nSpinner.displayName = COMPONENT_NAME;\n"],"names":["localeSymbol","Symbol","for","stringsSymbol","cachedGlobalStrings","undefined","LocalizedStringDictionary","constructor","messages","defaultLocale","arguments","length","_defineProperty","strings","Object","fromEntries","entries","filter","_ref","v","getStringForLocale","key","locale","getStringsForLocale","string","Error","getGlobalDictionaryForPackage","packageName","_cachedGlobalStrings","window","globalStrings","pkg","dictionary","language","getLanguage","startsWith","Intl","Locale","split","pluralRulesCache","Map","numberFormatCache","LocalizedStringFormatter","format","variables","message","plural","count","options","type","opt","pluralRules","get","PluralRules","set","selected","select","other","number","value","numberFormat","NumberFormat","cache","WeakMap","getCachedDictionary","useLocalizedStringDictionary","useLocalizedStringFormatter","useLocale","useMemo","enUS","frFR","SpinnerSize","xsmall","small","medium","large","StyledSpinner","styled","img","baseStyling","COMPONENT_NAME","CLASSNAME","sizeToDimension","size","width","height","Spinner","forwardRef","props","ref","ariaHidden","ariaLabel","className","color","propsColor","isColored","theme","propsTheme","forwardedProps","_objectWithoutProperties","_excluded","useTheme","stringFormatter","intlMessages","React","createElement","_extends","alt","classNames","src","spinnerPrimaryN","spinnerGreyL1","spinnerGreyL2","spinnerGreyL3","$size","$theme","displayName"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,MAAMA,YAAY,GAAGC,MAAM,CAACC,GAAG,CAAC,wBAAwB,CAAC,CAAA;AACzD,MAAMC,aAAa,GAAGF,MAAM,CAACC,GAAG,CAAC,yBAAyB,CAAC,CAAA;AAC3D,IAAIE,mBAAsG,GAAGC,SAAS,CAAA;;AAEtH;AACA;AACA;AACA;AACO,MAAMC,yBAAyB,CAAgE;EAIpGC,WAAWA,CAACC,QAAgC,EAAmC;AAAA,IAAA,IAAjCC,aAAqB,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAL,SAAA,GAAAK,SAAA,CAAA,CAAA,CAAA,GAAG,OAAO,CAAA;IAAAE,eAAA,CAAA,IAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;IAAAA,eAAA,CAAA,IAAA,EAAA,eAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAC3E;AACA;AACA,IAAA,IAAI,CAACC,OAAO,GAAGC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO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P,EAAAA,SAAS,GAAID,UAAU,GAAGA,UAAU,GAAGrF,SAAS,GAAI,IAAK;AACtE,IAAA,YAAA,EAAYsF,SAAU;IACtBC,SAAS,EAAEgB,UAAU,CAACtB,OAAO,CAACM,SAAS,EAAEA,SAAS,CAAE;AACpDP,IAAAA,MAAM,EAAEA,MAAO;AACfI,IAAAA,GAAG,EAAEA,GAAmC;AACxCoB,IAAAA,GAAG,EACDhB,KAAK,KAAK,SAAS,GACfiB,eAAe,GACfjB,KAAK,KAAK,SAAS,GACnBkB,aAAa,GACblB,KAAK,KAAK,SAAS,GACnBmB,aAAa,GACbC,aACL;AACD7B,IAAAA,KAAK,EAAEA,KAAM;AACb8B,IAAAA,KAAK,EAAE/B,IAAK;AACZgC,IAAAA,MAAM,EAAEnB,KAAAA;AAAM,GAAA,CACf,CAAC,CAAA;AAEN,CAAC,EAAC;AACFV,OAAO,CAACM,SAAS,GAAGX,SAAS,CAAA;AAC7BK,OAAO,CAAC8B,WAAW,GAAGpC,cAAc;;;;"}
@@ -0,0 +1,66 @@
1
+ import { ComponentProps, MutableRefObject, ChangeEvent } from 'react';
2
+ import { S as SwitchGroupState } from './types27.js';
3
+ import { h as StylingProps } from './styles2.js';
4
+ import { T as Theme } from './colors.js';
5
+ import { C as Comp } from './helpers.js';
6
+
7
+ /**
8
+ * Component props.
9
+ */
10
+ interface SwitchProps extends Omit<ComponentProps<'label'>, 'onChange'>, StylingProps {
11
+ /** Whether the component can be autofocused. */
12
+ autoFocus?: boolean;
13
+ /**
14
+ * Default select status.
15
+ * Used for uncontrolled version.
16
+ */
17
+ defaultSelected?: boolean;
18
+ /** Custom props to pass to the input element. */
19
+ inputProps?: ComponentProps<'input'>;
20
+ /** Custom ref object to pass to the input element. */
21
+ inputRef?: MutableRefObject<HTMLInputElement>;
22
+ /** Whether the component should use the product colors or shades of grey. */
23
+ isColored?: boolean;
24
+ /** Whether the component is disabled or not. */
25
+ isDisabled?: boolean;
26
+ /** Whether the component is invalid or not. */
27
+ isInvalid?: boolean;
28
+ /** Whether the component is read only or not. */
29
+ isReadOnly?: boolean;
30
+ /** Whether the component is required or not. */
31
+ isRequired?: boolean;
32
+ /**
33
+ * Whether the component is selected or not.
34
+ * Used for controlled version.
35
+ */
36
+ isSelected?: boolean;
37
+ /** Name to pass to the input element. */
38
+ name?: HTMLInputElement['name'];
39
+ /** Method to handle component change. */
40
+ onChange?(isChecked: boolean, value?: string, name?: string, event?: ChangeEvent<HTMLInputElement>, state?: SwitchGroupState): void;
41
+ /** Theme. */
42
+ theme?: Theme;
43
+ /**
44
+ * Value to pass to the input element.
45
+ * Required within a group.
46
+ */
47
+ value?: HTMLInputElement['value'];
48
+ }
49
+ type StyledSwitchProps = Omit<SwitchProps, 'color' | 'isColored' | 'isDisabled' | 'isInvalid' | 'isSelected' | 'isRequired' | 'size'> & {
50
+ $isColored: SwitchProps['isColored'];
51
+ $isDisabled: SwitchProps['isDisabled'];
52
+ $isInvalid: SwitchProps['isInvalid'];
53
+ $isFocusVisible: boolean;
54
+ $isRequired: SwitchProps['isRequired'];
55
+ $isSelected: SwitchProps['isSelected'];
56
+ $theme: SwitchProps['theme'];
57
+ };
58
+
59
+ /**
60
+ * The Switch component.
61
+ * Works both inside a SwitchGroup or as standalone.
62
+ * Can be used as controlled or uncontrolled.
63
+ */
64
+ declare const Switch: Comp<SwitchProps, HTMLLabelElement>;
65
+
66
+ export { SwitchProps as S, StyledSwitchProps as a, Switch as b };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch2.js","sources":["../../src/components/switch/styles.ts","../../src/components/switch/Switch.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { baseStyling } from '../shared';\nimport { StyledSwitchProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledSwitch = styled.label<StyledSwitchProps>`\n height: fit-content;\n position: relative;\n width: fit-content;\n ${baseStyling}\n\n align-items: center;\n background: none;\n border: none;\n display: inline-flex;\n margin: 4px;\n\n input {\n height: 100%;\n margin: 0;\n opacity: 0;\n overflow: visible;\n padding: 0;\n position: absolute;\n width: 100%;\n }\n\n span.label {\n ${({ $isDisabled, $isInvalid, $theme }) =>\n $isDisabled\n ? css`\n color: var(--redsift-color-${$theme}-components-switch-text-disabled);\n `\n : $isInvalid\n ? css`\n color: var(--redsift-color-${$theme}-components-switch-text-invalid);\n `\n : css`\n color: var(--redsift-color-${$theme}-components-switch-text-default);\n `}\n\n font-family: var(--redsift-typography-body-font-family);\n font-size: var(--redsift-typography-body-font-size);\n font-weight: var(--redsift-typography-body-font-weight);\n line-height: var(--redsift-typography-body-line-height);\n padding-inline-start: 12px;\n padding-inline-end: 24px;\n }\n\n .redsift-switch__slide {\n height: 20px;\n position: relative;\n min-width: 40px;\n }\n\n .redsift-switch-slide__inner {\n ${({ $isColored, $isDisabled, $isInvalid, $isSelected, $theme }) =>\n $isDisabled\n ? css`\n background-color: var(\n --redsift-color-${$theme}-components-switch-background-disabled${$isSelected ? '-active' : ''}\n );\n `\n : $isInvalid\n ? css`\n background-color: var(\n --redsift-color-${$theme}-components-switch-background-invalid${$isSelected ? '-active' : ''}\n );\n `\n : css`\n background-color: ${$isColored\n ? `var(--redsift-color-${$theme}-components-switch-background-default${$isSelected ? '-active' : ''})`\n : `var(--redsift-color-${$theme}-components-switch-background-uncolored${$isSelected ? '-active' : ''})`};\n `}\n border-radius: 20px;\n height: 24px;\n position: absolute;\n top: calc(50% - 24px / 2);\n width: 46px;\n z-index: 2;\n }\n\n .redsift-switch-slide__knob-wrapper {\n border-radius: 50%;\n height: 20px;\n margin-inline-start: ${({ $isSelected }) => (!$isSelected ? '2px' : '24px')};\n position: absolute;\n top: -6px;\n width: 20px;\n }\n\n .redsift-switch-slide-knob-wrapper__elevation {\n ${({ $isDisabled, $isInvalid, $theme }) =>\n $isDisabled\n ? css`\n background-color: var(--redsift-color-${$theme}-components-switch-dot-disabled-hover);\n `\n : $isInvalid\n ? css`\n background-color: var(--redsift-color-${$theme}-components-switch-dot-invalid-hover);\n `\n : css`\n background-color: var(--redsift-color-${$theme}-components-switch-dot-default-hover);\n `}\n\n border-radius: 50%;\n height: 32px;\n margin-inline-start: ${({ $isSelected }) => (!$isSelected ? '-6px' : '-6px')};\n opacity: 0;\n position: absolute;\n width: 32px;\n z-index: 3;\n }\n\n .redsift-switch-slide-knob-wrapper__knob {\n ${({ $isDisabled, $isInvalid, $theme }) =>\n $isDisabled\n ? css`\n background-color: var(--redsift-color-${$theme}-components-switch-dot-disabled);\n `\n : $isInvalid\n ? css`\n background-color: var(--redsift-color-${$theme}-components-switch-dot-invalid);\n `\n : css`\n background-color: var(--redsift-color-${$theme}-components-switch-dot-default);\n `}\n border-radius: 50%;\n box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12);\n height: 20px;\n position: absolute;\n top: 6px;\n width: 20px;\n z-index: 4;\n }\n\n &:hover,\n &:focus-visible {\n outline: none;\n cursor: pointer;\n\n ${({ $isDisabled }) =>\n !$isDisabled\n ? css`\n .redsift-switch-slide-knob-wrapper__elevation {\n opacity: 0.5;\n }\n `\n : ''}\n }\n\n ${({ $isDisabled, $isFocusVisible }) =>\n $isFocusVisible && !$isDisabled\n ? css`\n .redsift-switch-slide-knob-wrapper__elevation {\n opacity: 0.5;\n }\n `\n : ''}\n`;\n","import React, {\n ComponentProps,\n forwardRef,\n MutableRefObject,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport classNames from 'classnames';\nimport { useFocusRing } from '../../react-aria/react-aria/focus';\nimport { Comp } from '../../types';\nimport { SwitchGroupContext } from '../switch-group/context';\nimport { warnIfNoAccessibleLabelFound } from '../../utils/warnIfNoAccessibleLabelFound';\nimport { SwitchProps } from './types';\nimport { StyledSwitch } from './styles';\nimport { useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'Switch';\nconst CLASSNAME = 'redsift-switch';\n\n/**\n * The Switch component.\n * Works both inside a SwitchGroup or as standalone.\n * Can be used as controlled or uncontrolled.\n */\nexport const Switch: Comp<SwitchProps, HTMLLabelElement> = forwardRef((props, ref) => {\n const groupState = useContext(SwitchGroupContext);\n\n let {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n autoFocus,\n children,\n className,\n defaultSelected,\n inputProps,\n inputRef,\n isColored = true,\n isDisabled,\n isInvalid,\n isReadOnly,\n isRequired,\n isSelected: propsIsSelected,\n name,\n onChange,\n theme: propsTheme,\n value,\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n\n const { isFocusVisible, focusProps } = useFocusRing({ autoFocus });\n isDisabled = isDisabled ?? groupState?.isDisabled;\n isReadOnly = isReadOnly ?? groupState?.isReadOnly;\n\n const [isSelected, setSelected] = useState(\n Boolean(propsIsSelected ?? defaultSelected ?? groupState?.value.includes(value as string))\n );\n const isControlled = propsIsSelected !== null && propsIsSelected !== undefined;\n\n useEffect(() => {\n setSelected(Boolean(propsIsSelected ?? defaultSelected));\n }, [propsIsSelected, defaultSelected]);\n\n useEffect(() => {\n if (groupState) {\n setSelected(groupState.value.includes(value as string));\n }\n }, [groupState?.value]);\n\n warnIfNoAccessibleLabelFound(props as ComponentProps<'label'>, [children], 'Switch');\n\n if (groupState) {\n if (propsIsSelected != null) {\n console.warn(\n 'isSelected is unsupported on individual <Switch> elements within a <SwitchGroup> unless the <Switch> is controlled. Please apply this prop to the group instead.'\n );\n }\n if (defaultSelected != null) {\n console.warn(\n 'defaultSelected is unsupported on individual <Switch> elements within a <SwitchGroup> unless the <Switch> is controlled. Please apply this prop to the group instead.'\n );\n }\n if (props.value == null) {\n console.warn(\n 'A <Switch> element within a <SwitchGroup> requires a `value` property unless the <Switch> is controlled.'\n );\n }\n }\n\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n if (isDisabled || isReadOnly) {\n return;\n }\n\n if (groupState) {\n if (!groupState.value.includes(value as string)) {\n groupState.addValue(value as string);\n } else {\n groupState.removeValue(value as string);\n }\n }\n\n if (isControlled) {\n onChange?.(!propsIsSelected, value, name, event, groupState!);\n } else {\n setSelected(!isSelected);\n onChange?.(!isSelected, value, name, event, groupState!);\n }\n },\n [onChange, groupState, isSelected, propsIsSelected]\n );\n\n return (\n <StyledSwitch\n {...forwardedProps}\n $isColored={isColored}\n $isDisabled={isDisabled}\n $isFocusVisible={isFocusVisible}\n $isInvalid={isInvalid || (isRequired && !(isSelected || (isControlled && propsIsSelected)))}\n $isRequired={isRequired}\n $isSelected={isSelected || (isControlled && propsIsSelected)}\n $theme={theme}\n className={classNames(Switch.className, className)}\n ref={ref as MutableRefObject<HTMLLabelElement>}\n >\n <div className={`${Switch.className}__slide`}>\n <div className={`${Switch.className}-slide__inner`} />\n <div className={`${Switch.className}-slide__knob-wrapper`}>\n <div className={`${Switch.className}-slide-knob-wrapper__elevation`} />\n <div className={`${Switch.className}-slide-knob-wrapper__knob`} />\n </div>\n </div>\n {children ? <span className=\"label\">{children}</span> : null}\n <input\n {...inputProps}\n {...focusProps}\n aria-checked={isSelected || (isControlled && propsIsSelected) ? 'true' : 'false'}\n aria-disabled={isDisabled}\n aria-invalid={isInvalid || (isRequired && !(isSelected || (isControlled && propsIsSelected)))}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-readonly={isReadOnly}\n aria-required={isRequired}\n autoFocus={autoFocus}\n checked={isSelected || (isControlled && propsIsSelected) ? true : false}\n disabled={isDisabled}\n name={name}\n onChange={handleChange}\n ref={inputRef as MutableRefObject<HTMLInputElement>}\n role=\"switch\"\n type=\"checkbox\"\n value={value}\n />\n </StyledSwitch>\n );\n});\nSwitch.className = CLASSNAME;\nSwitch.displayName = COMPONENT_NAME;\n"],"names":["StyledSwitch","styled","label","baseStyling","_ref","$isDisabled","$isInvalid","$theme","css","_ref2","$isColored","$isSelected","_ref3","_ref4","_ref5","_ref6","_ref7","_ref8","$isFocusVisible","COMPONENT_NAME","CLASSNAME","Switch","forwardRef","props","ref","_isDisabled","_isReadOnly","groupState","useContext","SwitchGroupContext","ariaLabel","ariaLabelledby","autoFocus","children","className","defaultSelected","inputProps","inputRef","isColored","isDisabled","isInvalid","isReadOnly","isRequired","isSelected","propsIsSelected","name","onChange","theme","propsTheme","value","forwardedProps","_objectWithoutProperties","_excluded","useTheme","isFocusVisible","focusProps","useFocusRing","setSelected","useState","Boolean","includes","isControlled","undefined","useEffect","warnIfNoAccessibleLabelFound","console","warn","handleChange","useCallback","event","addValue","removeValue","React","createElement","_extends","$isRequired","classNames","checked","disabled","role","type","displayName"],"mappings":";;;;;;;;;;AAIA;AACA;AACA;AACO,MAAMA,YAAY,GAAGC,MAAM,CAACC,KAAyB,CAAA;AAC5D;AACA;AACA;AACA,EAAA,EAAIC,WAAY,CAAA;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA,EAAMC,IAAA,IAAA;EAAA,IAAC;IAAEC,WAAW;IAAEC,UAAU;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAH,IAAA,CAAA;EAAA,OACpCC,WAAW,GACPG,GAAI,CAAA;AACd,uCAAA,EAAyCD,MAAO,CAAA;AAChD,UAAW,CAAA,GACDD,UAAU,GACVE,GAAI,CAAA;AACd,uCAAA,EAAyCD,MAAO,CAAA;AAChD,UAAA,CAAW,GACDC,GAAI,CAAA;AACd,uCAAA,EAAyCD,MAAO,CAAA;AAChD,UAAW,CAAA,CAAA;AAAA,CAAC,CAAA;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA,EAAME,KAAA,IAAA;EAAA,IAAC;IAAEC,UAAU;IAAEL,WAAW;IAAEC,UAAU;IAAEK,WAAW;AAAEJ,IAAAA,MAAAA;AAAO,GAAC,GAAAE,KAAA,CAAA;EAAA,OAC7DJ,WAAW,GACPG,GAAI,CAAA;AACd;AACA,8BAAA,EAAgC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QAAe,CAAC,GAAG,IAAI,eAC5DuC,cAAA,CAAAC,aAAA,CAAAC,OAAAA,EAAAA,QAAA,CACMtC,EAAAA,EAAAA,UAAU,EACVmB,UAAU,EAAA;IACd,cAAcZ,EAAAA,UAAU,IAAKkB,YAAY,IAAIjB,eAAgB,GAAG,MAAM,GAAG,OAAQ;AACjF,IAAA,eAAA,EAAeL,UAAW;IAC1B,cAAcC,EAAAA,SAAS,IAAKE,UAAU,IAAI,EAAEC,UAAU,IAAKkB,YAAY,IAAIjB,eAAgB,CAAG;AAC9F,IAAA,YAAA,EAAYd,SAAU;AACtB,IAAA,iBAAA,EAAiBC,cAAe;AAChC,IAAA,eAAA,EAAeU,UAAW;AAC1B,IAAA,eAAA,EAAeC,UAAW;AAC1BV,IAAAA,SAAS,EAAEA,SAAU;IACrB6C,OAAO,EAAElC,UAAU,IAAKkB,YAAY,IAAIjB,eAAgB,GAAG,IAAI,GAAG,KAAM;AACxEkC,IAAAA,QAAQ,EAAEvC,UAAW;AACrBM,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,QAAQ,EAAEqB,YAAa;AACvB3C,IAAAA,GAAG,EAAEa,QAA+C;AACpD0C,IAAAA,IAAI,EAAC,QAAQ;AACbC,IAAAA,IAAI,EAAC,UAAU;AACf/B,IAAAA,KAAK,EAAEA,KAAAA;AAAM,GAAA,CACd,CACW,CAAC,CAAA;AAEnB,CAAC,EAAC;AACF5B,MAAM,CAACa,SAAS,GAAGd,SAAS,CAAA;AAC5BC,MAAM,CAAC4D,WAAW,GAAG9D,cAAc;;;;"}
@@ -0,0 +1,10 @@
1
+ import { b as SwitchGroupProps } from './types27.js';
2
+ import { C as Comp } from './helpers.js';
3
+
4
+ /**
5
+ * The SwitchGroup component.
6
+ * Can be used as controlled or uncontrolled.
7
+ */
8
+ declare const SwitchGroup: Comp<SwitchGroupProps, HTMLDivElement>;
9
+
10
+ export { SwitchGroup as S };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwitchGroup.js","sources":["../../src/components/switch-group/types.ts","../../src/components/switch-group/styles.ts","../../src/components/switch-group/SwitchGroup.tsx"],"sourcesContent":["import { ComponentProps } from 'react';\nimport { ValueOf, StylingProps, Theme } from '../../types';\n\n/**\n * Context props.\n */\nexport type SwitchGroupState = {\n /** Adds a value to the set of selected values. */\n addValue(value: string): void;\n /** Whether the switch group is disabled or not. */\n readonly isDisabled: boolean;\n /** Whether the switch group is read only or not. */\n readonly isReadOnly: boolean;\n /** Removes a value from the set of selected values. */\n removeValue(value: string): void;\n /** Sets the selected values. */\n setValue(value: string[]): void;\n /** Current selected values. */\n readonly value: readonly string[];\n};\n\n/**\n * Component orientation.\n */\nexport const SwitchGroupOrientation = {\n horizontal: 'horizontal',\n vertical: 'vertical',\n} as const;\nexport type SwitchGroupOrientation = ValueOf<typeof SwitchGroupOrientation>;\n\n/**\n * Component props.\n */\nexport interface SwitchGroupProps extends Omit<ComponentProps<'div'>, 'onChange'>, StylingProps {\n /**\n * Default selected values.\n * Used for uncontrolled version.\n */\n defaultValues?: string[];\n /** Description of the switch group. */\n description?: string;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is invalid or not. */\n isInvalid?: boolean;\n /** Whether the component is read only or not. */\n isReadOnly?: boolean;\n /** Whether the component is required or not. */\n isRequired?: boolean;\n /** Label of the switch group. */\n label?: string;\n /** Method to handle component change. */\n onChange?(values: string[]): void;\n /** Method to handle component change. */\n orientation?: SwitchGroupOrientation;\n /** Theme. */\n theme?: Theme;\n /**\n * Currently selected values.\n * Used for controlled version.\n */\n value?: string[];\n}\n\nexport type StyledSwitchGroupProps = Omit<\n SwitchGroupProps,\n 'isDisabled' | 'isInvalid' | 'isReadOnly' | 'orientation' | 'isRequired'\n> & {\n $isDisabled: SwitchGroupProps['isDisabled'];\n $isInvalid: SwitchGroupProps['isInvalid'];\n $isReadOnly: SwitchGroupProps['isReadOnly'];\n $orientation: SwitchGroupProps['orientation'];\n $theme: SwitchGroupProps['theme'];\n};\n","import styled, { css } from 'styled-components';\nimport { baseStyling } from '../shared';\nimport { SwitchGroupOrientation, StyledSwitchGroupProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledSwitchGroup = styled.div<StyledSwitchGroupProps>`\n ${baseStyling}\n\n display: flex;\n flex-direction: column;\n\n ${({ $orientation }) =>\n $orientation === SwitchGroupOrientation.vertical\n ? `\n div.redsift-switch-group-switches {\n display: flex;\n flex-direction: column;\n }\n `\n : `\n div.redsift-switch-group-switches {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n }\n `}\n\n span.redsift-switch-group-label {\n font-family: var(--redsift-typography-body-font-family);\n font-weight: var(--redsift-typography-body-font-weight);\n font-size: var(--redsift-typography-body-font-size);\n line-height: var(--redsift-typography-body-line-height);\n\n ${({ $isDisabled, $isInvalid, $theme }) =>\n $isDisabled\n ? css`\n color: var(--redsift-color-${$theme}-components-checkbox-text-disabled);\n `\n : $isInvalid\n ? css`\n color: var(--redsift-color-${$theme}-components-checkbox-text-invalid);\n `\n : css`\n color: var(--redsift-color-${$theme}-components-checkbox-text-default);\n `}\n }\n\n span.redsift-switch-group-description {\n font-family: var(--redsift-typography-helper-font-family);\n font-weight: var(--redsift-typography-helper-font-weight);\n font-size: var(--redsift-typography-helper-font-size);\n line-height: var(--redsift-typography-helper-line-height);\n\n ${({ $isDisabled, $isInvalid, $theme }) =>\n $isDisabled\n ? css`\n color: var(--redsift-color-${$theme}-components-checkbox-text-disabled);\n `\n : $isInvalid\n ? css`\n color: var(--redsift-color-${$theme}-components-checkbox-text-invalid);\n `\n : css`\n color: var(--redsift-color-${$theme}-components-checkbox-text-default);\n `}\n }\n`;\n","import React, { forwardRef, RefObject, useEffect, useState } from 'react';\nimport classNames from 'classnames';\nimport { Comp, ColorPalette } from '../../types';\nimport { SwitchGroupOrientation, SwitchGroupProps } from './types';\nimport { SwitchGroupContext } from './context';\nimport { StyledSwitchGroup } from './styles';\nimport { ThemeProvider, useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'SwitchGroup';\nconst CLASSNAME = 'redsift-switch-group';\n\n/**\n * The SwitchGroup component.\n * Can be used as controlled or uncontrolled.\n */\nexport const SwitchGroup: Comp<SwitchGroupProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n children,\n className,\n color = ColorPalette.primary,\n defaultValues,\n description,\n isDisabled,\n isInvalid,\n isReadOnly,\n isRequired,\n label,\n onChange,\n orientation = SwitchGroupOrientation.vertical,\n theme: propsTheme,\n value,\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n\n const [selectedValues, setValue] = useState<string[]>(value || defaultValues || []);\n useEffect(() => {\n if (value) {\n state.setValue(value);\n }\n }, [value]);\n\n const state = {\n value: selectedValues,\n isDisabled: isDisabled || false,\n isReadOnly: isReadOnly || false,\n setValue(values: string[]) {\n if (isReadOnly || isDisabled) {\n return;\n }\n\n setValue(values);\n },\n addValue(value: string) {\n if (!selectedValues.includes(value)) {\n setValue(selectedValues.concat(value));\n if (onChange) {\n onChange(selectedValues.concat(value));\n }\n }\n },\n removeValue(value: string) {\n if (selectedValues.includes(value)) {\n setValue(selectedValues.filter((existingValue) => existingValue !== value));\n if (onChange) {\n onChange(selectedValues.filter((existingValue) => existingValue !== value));\n }\n }\n },\n };\n\n return (\n <ThemeProvider value={{ theme }}>\n <StyledSwitchGroup\n color={color}\n {...forwardedProps}\n $isDisabled={isDisabled}\n $isInvalid={isInvalid || (isRequired && selectedValues.length === 0)}\n $isReadOnly={isReadOnly}\n $orientation={orientation}\n $theme={theme}\n aria-disabled={isDisabled}\n className={classNames(SwitchGroup.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n role=\"group\"\n >\n <span className={`${SwitchGroup.className}-label`}>\n {label}\n {isRequired ? ' *' : null}\n </span>\n <div className={`${SwitchGroup.className}-switches`}>\n <SwitchGroupContext.Provider value={state}>{children}</SwitchGroupContext.Provider>\n </div>\n <span className={`${SwitchGroup.className}-description`}>{description}</span>\n </StyledSwitchGroup>\n </ThemeProvider>\n );\n});\nSwitchGroup.className = CLASSNAME;\nSwitchGroup.displayName = COMPONENT_NAME;\n"],"names":["SwitchGroupOrientation","horizontal","vertical","StyledSwitchGroup","styled","div","baseStyling","_ref","$orientation","_ref2","$isDisabled","$isInvalid","$theme","css","_ref3","COMPONENT_NAME","CLASSNAME","SwitchGroup","forwardRef","props","ref","children","className","color","ColorPalette","primary","defaultValues","description","isDisabled","isInvalid","isReadOnly","isRequired","label","onChange","orientation","theme","propsTheme","value","forwardedProps","_objectWithoutProperties","_excluded","useTheme","selectedValues","setValue","useState","useEffect","state","values","addValue","includes","concat","removeValue","filter","existingValue","React","createElement","ThemeProvider","_extends","length","$isReadOnly","classNames","role","SwitchGroupContext","Provider","displayName"],"mappings":";;;;;;;;;AAGA;AACA;AACA;;AAgBA;AACA;AACA;AACO,MAAMA,sBAAsB,GAAG;AACpCC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAA;AACZ,EAAU;;AAGV;AACA;AACA;;AC5BA;AACA;AACA;AACO,MAAMC,iBAAiB,GAAGC,MAAM,CAACC,GAA4B,CAAA;AACpE,EAAA,EAAIC,WAAY,CAAA;AAChB;AACA;AACA;AACA;AACA,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,YAAAA;AAAa,GAAC,GAAAD,IAAA,CAAA;AAAA,EAAA,OACjBC,YAAY,KAAKR,sBAAsB,CAACE,QAAQ,GAC3C,CAAA;AACT;AACA;AACA;AACA;AACA,EAAA,CAAG,GACM,CAAA;AACT;AACA;AACA;AACA;AACA;AACA,EAAG,CAAA,CAAA;AAAA,CAAC,CAAA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA,EAAMO,KAAA,IAAA;EAAA,IAAC;IAAEC,WAAW;IAAEC,UAAU;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAH,KAAA,CAAA;EAAA,OACpCC,WAAW,GACPG,GAAI,CAAA;AACd,uCAAA,E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,EAAA;AAAMjC,IAAAA,SAAS,EAAG,CAAA,EAAEL,WAAW,CAACK,SAAU,CAAA,YAAA,CAAA;GAAgBK,EAAAA,WAAkB,CAC3D,CACN,CAAC,CAAA;AAEpB,CAAC,EAAC;AACFV,WAAW,CAACK,SAAS,GAAGN,SAAS,CAAA;AACjCC,WAAW,CAAC+C,WAAW,GAAGjD,cAAc;;;;"}
@@ -0,0 +1,9 @@
1
+ import { b as TextProps } from './types28.js';
2
+ import { C as Comp } from './helpers.js';
3
+
4
+ /**
5
+ * The Text component.
6
+ */
7
+ declare const Text: Comp<TextProps, HTMLDivElement>;
8
+
9
+ export { Text as T };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text2.js","sources":["../../src/components/text/Text.tsx"],"sourcesContent":["import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp, FontFamily } from '../../types';\nimport { StyledText } from './styles';\nimport { TextProps } from './types';\nimport { useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'Text';\nconst CLASSNAME = 'redsift-text';\n\n/**\n * The Text component.\n */\nexport const Text: Comp<TextProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n as,\n children,\n className,\n color,\n fontFamily = FontFamily.poppins,\n fontSize,\n fontWeight,\n lineHeight,\n noWrap,\n theme: propsTheme,\n variant,\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n\n return (\n <StyledText\n as={as}\n {...forwardedProps}\n className={classNames(Text.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n $as={as}\n $color={color}\n $fontFamily={fontFamily}\n $fontSize={fontSize}\n $fontWeight={fontWeight}\n $lineHeight={lineHeight}\n $noWrap={noWrap}\n $theme={theme}\n $variant={variant}\n >\n {children}\n </StyledText>\n );\n});\nText.className = CLASSNAME;\nText.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","Text","forwardRef","props","ref","as","children","className","color","fontFamily","FontFamily","poppins","fontSize","fontWeight","lineHeight","noWrap","theme","propsTheme","variant","forwardedProps","_objectWithoutProperties","_excluded","useTheme","React","createElement","StyledText","_extends","classNames","$as","$color","$fontFamily","$fontSize","$fontWeight","$lineHeight","$noWrap","$theme","$variant","displayName"],"mappings":";;;;;;;;AAOA,MAAMA,cAAc,GAAG,MAAM,CAAA;AAC7B,MAAMC,SAAS,GAAG,cAAc,CAAA;;AAEhC;AACA;AACA;AACO,MAAMC,IAAqC,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC9E,MAAM;MACJC,EAAE;MACFC,QAAQ;MACRC,SAAS;MACTC,KAAK;MACLC,UAAU,GAAGC,UAAU,CAACC,OAAO;MAC/BC,QAAQ;MACRC,UAAU;MACVC,UAAU;MACVC,MAAM;AACNC,MAAAA,KAAK,EAAEC,UAAU;AACjBC,MAAAA,OAAAA;AAEF,KAAC,GAAGf,KAAK;AADJgB,IAAAA,cAAc,GAAAC,wBAAA,CACfjB,KAAK,EAAAkB,SAAA,CAAA,CAAA;AAET,EAAA,MAAML,KAAK,GAAGM,QAAQ,CAACL,UAAU,CAAC,CAAA;AAElC,EAAA,oBACEM,cAAA,CAAAC,aAAA,CAACC,UAAU,EAAAC,QAAA,CAAA;AACTrB,IAAAA,EAAE,EAAEA,EAAAA;AAAG,GAAA,EACHc,cAAc,EAAA;IAClBZ,SAAS,EAAEoB,UAAU,CAAC1B,IAAI,CAACM,SAAS,EAAEA,SAAS,CAAE;AACjDH,IAAAA,GAAG,EAAEA,GAAiC;AACtCwB,IAAAA,GAAG,EAAEvB,EAAG;AACRwB,IAAAA,MAAM,EAAErB,KAAM;AACdsB,IAAAA,WAAW,EAAErB,UAAW;AACxBsB,IAAAA,SAAS,EAAEnB,QAAS;AACpBoB,IAAAA,WAAW,EAAEnB,UAAW;AACxBoB,IAAAA,WAAW,EAAEnB,UAAW;AACxBoB,IAAAA,OAAO,EAAEnB,MAAO;AAChBoB,IAAAA,MAAM,EAAEnB,KAAM;AACdoB,IAAAA,QAAQ,EAAElB,OAAAA;AAAQ,GAAA,CAAA,EAEjBZ,QACS,CAAC,CAAA;AAEjB,CAAC,EAAC;AACFL,IAAI,CAACM,SAAS,GAAGP,SAAS,CAAA;AAC1BC,IAAI,CAACoC,WAAW,GAAGtC,cAAc;;;;"}
@@ -0,0 +1,34 @@
1
+ import { MutableRefObject, ComponentProps, ChangeEvent } from 'react';
2
+ import { b as TextFieldProps, S as StyledTextFieldProps } from './types29.js';
3
+ import { V as ValueOf, C as Comp } from './helpers.js';
4
+
5
+ /**
6
+ * Component variant.
7
+ */
8
+ declare const TextAreaVariant: {
9
+ readonly default: "default";
10
+ readonly underline: "underline";
11
+ };
12
+ type TextAreaVariant = ValueOf<typeof TextAreaVariant>;
13
+ /**
14
+ * Component props.
15
+ */
16
+ interface TextAreaProps extends Omit<TextFieldProps, 'onChange' | 'inputRef' | 'inputProps' | 'pills' | 'internal' | 'hasClearButton' | 'onClear'> {
17
+ /** Custom ref object to pass to the textarea element. */
18
+ textareaRef?: MutableRefObject<HTMLTextAreaElement>;
19
+ /** Custom props to pass to the textarea element. */
20
+ textareaProps?: ComponentProps<'textarea'>;
21
+ /** Method to handle component change. */
22
+ onChange?(value?: string, name?: string, event?: ChangeEvent<HTMLTextAreaElement>): void;
23
+ /** Minimum number of rows displayed in multiline mode (requires `multiline` to be enabled). */
24
+ minimumRows?: number;
25
+ }
26
+ type StyledTextAreaProps = StyledTextFieldProps;
27
+
28
+ /**
29
+ * The TextArea component.
30
+ * Can be used as controlled or uncontrolled.
31
+ */
32
+ declare const TextArea: Comp<TextAreaProps, HTMLDivElement>;
33
+
34
+ export { StyledTextAreaProps as S, TextAreaVariant as T, TextAreaProps as a, TextArea as b };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.js","sources":["../../src/hooks/useComputeNumberOfRows.ts","../../src/components/text-area/types.ts","../../src/components/text-area/styles.ts","../../src/components/text-area/TextArea.tsx"],"sourcesContent":["import { useState } from 'react';\n\n/**\n * Hook that allows to calculate the number of rows needed for a text area.\n * @param minimumRows Minimum number of rows that we want to display.\n * @return rows to be used and a callback to recalculate\n */\nexport const useComputeNumberOfRows = (\n minimumRows: number\n): {\n /** number of rows to be used on the text area */\n rows: number;\n /**\n * Callback in order to recalculate the number of rows due to a change on the text area\n */\n recomputeNumberOfRows(target: Element): void;\n} => {\n const [rows, setRows] = useState(minimumRows);\n\n const recompute = (target: Element) => {\n /**\n * HEAD's UP! This part is a little bit tricky. The idea here is to only\n * display the necessary rows on the textarea. In order to dynamically adjust\n * the height on that field, we need to:\n * 1. Set the current amount of rows to the minimum. That will make the scroll appear.\n * 2. With that, we will have the `scrollHeight`, meaning the height of the container adjusted to the current content\n * 3. With the scroll height, we can figure out how many rows we need to use by dividing the scroll height\n * by the line height.\n * 4. With that number, we can readjust the number of rows on the text area. We need to do that here, if we leave that to\n * the state change through React, there are some scenarios (resize, hitting ENTER or BACKSPACE which add or remove lines)\n * when we will not see the update and the rows will be resized to the minimum.\n * 5. In case there is any other update on the component that changes the UI, we need to keep the number of rows\n * on the state in order to allow React to re-render. Therefore, we save them using `useState`\n */\n // eslint-disable-next-line no-param-reassign\n (target as HTMLTextAreaElement).rows = minimumRows;\n let currentRows = target.scrollHeight / (target.clientHeight / minimumRows);\n currentRows = currentRows >= minimumRows ? currentRows : minimumRows;\n // eslint-disable-next-line no-param-reassign\n (target as HTMLTextAreaElement).rows = currentRows;\n\n setRows(currentRows);\n };\n\n return {\n recomputeNumberOfRows: recompute,\n rows,\n };\n};\n","import { ChangeEvent, ComponentProps, MutableRefObject } from 'react';\nimport { ValueOf } from '../../types';\nimport { StyledTextFieldProps, TextFieldProps } from '../text-field';\n\n/**\n * Component variant.\n */\nexport const TextAreaVariant = {\n default: 'default',\n underline: 'underline',\n} as const;\nexport type TextAreaVariant = ValueOf<typeof TextAreaVariant>;\n\n/**\n * Component props.\n */\nexport interface TextAreaProps\n extends Omit<\n TextFieldProps,\n 'onChange' | 'inputRef' | 'inputProps' | 'pills' | 'internal' | 'hasClearButton' | 'onClear'\n > {\n /** Custom ref object to pass to the textarea element. */\n textareaRef?: MutableRefObject<HTMLTextAreaElement>;\n /** Custom props to pass to the textarea element. */\n textareaProps?: ComponentProps<'textarea'>;\n /** Method to handle component change. */\n onChange?(value?: string, name?: string, event?: ChangeEvent<HTMLTextAreaElement>): void;\n /** Minimum number of rows displayed in multiline mode (requires `multiline` to be enabled). */\n minimumRows?: number;\n}\n\nexport type StyledTextAreaProps = StyledTextFieldProps;\n","import styled, { css } from 'styled-components';\nimport { baseStyling } from '../shared';\nimport { StyledTextAreaProps, TextAreaVariant } from './types';\nimport { Theme } from '@redsift/design-system/types';\n\n/**\n * Component style.\n */\nexport const StyledTextArea = styled.div<StyledTextAreaProps>`\n height: fit-content;\n position: relative;\n width: fit-content;\n margin: 0;\n min-width: 0;\n padding: 0;\n ${baseStyling}\n\n border: 0;\n display: inline-flex;\n flex-direction: column;\n vertical-align: top;\n\n ${({\n label,\n $hasLeftIcon,\n $hasContent,\n $isFocused,\n $isDisabled,\n $isInvalid,\n $color,\n $isGradient,\n $theme,\n $variant,\n }) => css`\n ${$isDisabled\n ? css`\n pointer-events: none;\n `\n : ''}\n\n .redsift-text-area__label {\n font-family: var(--redsift-typography-input-text-font-family);\n font-size: var(--redsift-typography-input-text-font-size);\n font-weight: var(--redsift-typography-input-text-font-weight);\n line-height: var(--redsift-typography-input-text-line-height);\n left: ${$hasLeftIcon && !$hasContent ? '32px' : '0'};\n overflow: hidden;\n pointer-events: none;\n position: absolute;\n text-overflow: ellipsis;\n top: ${$hasContent ? '-8px' : '-6px'};\n transform-origin: top left;\n transition: color 200ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms,\n max-width 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n white-space: nowrap;\n z-index: 1;\n\n ${!$hasContent\n ? css`\n max-width: calc(100% - 24px);\n transform: translate(${$variant === TextAreaVariant.underline ? '0px' : '14px'}, 16px) scale(1);\n `\n : css`\n max-width: calc(133% - 32px);\n transform: translate(${$variant === TextAreaVariant.underline ? '0px' : '14px'}, 1px) scale(0.733);\n `}\n\n ${!$isGradient\n ? css`\n color: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isInvalid\n ? 'error'\n : $isFocused\n ? $color\n : 'grey'}-text-${$isDisabled ? 'disabled' : 'default'}\n );\n `\n : css`\n background-color: var(--redsift-color-neutral-${$theme === Theme.dark ? 'x-dark-grey' : 'white'});\n ${$variant !== TextAreaVariant.underline\n ? css`\n padding-right: 7px;\n padding-left: 5px;\n `\n : ''}\n > span {\n background: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isInvalid\n ? 'error'\n : $isFocused\n ? $color\n : 'grey'}-text-${$isDisabled ? 'disabled' : 'default'}\n );\n background-clip: text;\n color: transparent;\n }\n `}\n }\n\n .redsift-text-area__text-area-wrapper {\n align-items: flex-start;\n box-sizing: border-box;\n cursor: text;\n display: inline-flex;\n min-height: 42px;\n position: relative;\n width: 100%;\n }\n\n .redsift-text-area-text-area-wrapper__text-area {\n textarea {\n background: transparent;\n display: block;\n border: none;\n outline: none;\n width: 100%;\n padding: 0;\n margin: 0;\n box-sizing: content-box;\n font-family: var(--redsift-typography-input-text-font-family);\n font-size: 14px;\n font-weight: var(--redsift-typography-input-text-font-weight);\n line-height: var(--redsift-typography-input-text-line-height);\n resize: none;\n\n ${$isDisabled\n ? css`\n color: var(--redsift-color-neutral-light-grey);\n `\n : css`\n color: var(--redsift-color-neutral-${$theme === Theme.dark ? 'white' : 'x-dark-grey'});\n `}\n }\n\n flex: 1 1 auto;\n padding-bottom: 9px;\n ${$variant !== TextAreaVariant.underline && !$hasLeftIcon\n ? css`\n padding-left: 16px;\n `\n : ''}\n padding-top: ${label ? '10px' : '9px'};\n padding-right: 8px;\n }\n\n .redsift-text-area-text-area-wrapper-pills-and-text-area__text-area::placeholder {\n color: var(--redsift-color-neutral-mid-grey);\n }\n\n .redsift-text-area-text-area-wrapper-pills-and-text-area__text-area:focus {\n outline: 0;\n }\n\n .redsift-text-area-text-area-wrapper__fieldset {\n border-style: solid;\n bottom: 0;\n left: 1px;\n margin: 0;\n min-width: 0%;\n overflow: hidden;\n padding: 0 8px;\n pointer-events: none;\n position: absolute;\n right: 0;\n text-align: left;\n top: -5px;\n\n ${!$isGradient || $isDisabled || !$isFocused || $isInvalid\n ? css`\n ${$variant === TextAreaVariant.underline\n ? css`\n border-bottom-width: 2px;\n `\n : css`\n border-radius: 4px;\n border-width: 2px;\n `}\n border-color: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isInvalid\n ? 'error'\n : $isFocused\n ? $color\n : 'grey'}-text-${$isDisabled ? 'disabled' : 'default'}\n );\n `\n : css`\n ${$variant === TextAreaVariant.underline\n ? css`\n border-bottom: 2px solid transparent;\n `\n : css`\n border: 2px solid transparent;\n border-radius: 4px;\n `}\n background: 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(--redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-default);\n `}\n }\n\n .redsift-text-area-text-area-wrapper-fieldset__legend {\n display: block;\n float: unset;\n font-size: 11px;\n height: 11px;\n overflow: hidden;\n padding: 0;\n visibility: hidden;\n white-space: nowrap;\n width: auto;\n\n ${!$hasContent\n ? css`\n max-width: 0.01px;\n transition: max-width 50ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n `\n : css`\n max-width: 100%;\n transition: max-width 100ms cubic-bezier(0, 0, 0.2, 1) 50ms;\n `}\n }\n\n .redsift-text-area-text-area-wrapper-fieldset__legend > span {\n display: inline-block;\n opacity: 0;\n padding-left: 5px;\n padding-right: 5px;\n visibility: visible;\n }\n\n .redsift-text-area-text-area-wrapper__toolbar {\n position: relative;\n top: 7px;\n }\n\n .redsift-icon-button {\n padding: 2px;\n height: 28px;\n width: 28px;\n }\n\n ${$variant !== TextAreaVariant.underline\n ? css`\n .redsift-icon.left {\n padding-left: 12px;\n padding-right: 8px;\n line-height: 28px;\n top: 10px;\n }\n\n .redsift-text-area-text-area-wrapper__toolbar {\n padding-right: 8px;\n }\n `\n : css`\n .redsift-icon.left {\n padding-right: 8px;\n top: 10px;\n }\n `}\n `}\n`;\n","import React, {\n ComponentProps,\n FocusEvent,\n forwardRef,\n MutableRefObject,\n useCallback,\n useEffect,\n useState,\n} from 'react';\nimport classNames from 'classnames';\nimport { useFocusRing } from '../../react-aria/react-aria/focus';\nimport { useFocusWithin } from '../../react-aria/react-aria/interactions';\nimport { ButtonsColorPalette, Comp } from '../../types';\nimport { warnIfNoAccessibleLabelFound } from '../../utils/warnIfNoAccessibleLabelFound';\nimport { TextAreaProps, TextAreaVariant } from './types';\nimport { StyledTextArea } from './styles';\nimport { Icon } from '../../components/icon';\nimport { useTheme } from '../theme';\nimport { useComputeNumberOfRows } from '../../hooks';\nimport { useId } from '../../utils';\nimport { Flexbox } from '../flexbox';\n\nconst COMPONENT_NAME = 'TextArea';\nconst CLASSNAME = 'redsift-text-area';\n\n/**\n * The TextArea component.\n * Can be used as controlled or uncontrolled.\n */\nexport const TextArea: Comp<TextAreaProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n after,\n autoFocus,\n className,\n color: propsColor,\n defaultValue = '',\n forceColor,\n isColored = true,\n isDisabled,\n isInvalid,\n isReadOnly,\n isRequired,\n label,\n leftIcon,\n minimumRows,\n name,\n onBlur: onBlurProps,\n onChange,\n onFocus: onFocusProps,\n placeholder,\n textareaProps,\n textareaRef: propsTextareaRef,\n theme: propsTheme,\n value: propsValue,\n variant = TextAreaVariant.default,\n width = '100%',\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n const color = Object.values(ButtonsColorPalette).includes(propsColor!) ? propsColor : isColored ? 'primary' : 'grey';\n const isGradient = color === ButtonsColorPalette.radar;\n\n const _textareaRef = React.useRef(null);\n const textareaRef = propsTextareaRef ?? _textareaRef;\n\n const {\n isFocusVisible,\n isFocused,\n focusProps: { onFocus, onBlur },\n } = useFocusRing({\n autoFocus,\n });\n const [isFocusWithin, setFocusWithin] = useState(Boolean(autoFocus));\n const { focusWithinProps } = useFocusWithin({\n onFocusWithinChange: (isFocusWithin) => setFocusWithin(isFocusWithin),\n });\n\n const [value, setValue] = useState(defaultValue);\n const isControlled = propsValue !== null && propsValue !== undefined;\n\n const [labelId] = useId();\n\n warnIfNoAccessibleLabelFound(props as ComponentProps<'label'>, [label], 'TextArea');\n\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (isDisabled || isReadOnly) {\n return;\n }\n\n if (onChange) {\n onChange(event.target.value, name, event);\n } else {\n setValue(event.target.value);\n }\n },\n [onChange]\n );\n\n const { rows, recomputeNumberOfRows } = useComputeNumberOfRows(minimumRows || 4);\n useEffect(() => {\n // Recompute the number of rows for the first rendering\n if (textareaRef && textareaRef.current) {\n recomputeNumberOfRows(textareaRef.current);\n }\n }, [textareaRef, recomputeNumberOfRows, value]);\n\n return (\n <StyledTextArea\n width={width}\n {...focusWithinProps}\n {...forwardedProps}\n $hasContent={isFocusWithin || Boolean(isControlled ? propsValue : value) || Boolean(placeholder)}\n $hasLeftIcon={Boolean(leftIcon)}\n $color={color}\n $isGradient={isGradient}\n $isDisabled={isDisabled}\n $isFocusVisible={isFocusVisible}\n $isInvalid={isInvalid || (isRequired && !(isControlled ? propsValue : value))}\n $isRequired={isRequired}\n $isFocused={Boolean(isFocused || forceColor)}\n $theme={theme}\n $variant={variant}\n className={classNames(TextArea.className, className)}\n ref={ref as MutableRefObject<HTMLDivElement>}\n >\n <fieldset aria-hidden=\"true\" className={`${TextArea.className}-text-area-wrapper__fieldset`}>\n <legend id={labelId} className={`${TextArea.className}-text-area-wrapper-fieldset__legend`}>\n {label ? <span>{label}</span> : null}\n </legend>\n </fieldset>\n {label ? (\n <label className={`${TextArea.className}__label`}>\n <span>{label}</span>\n </label>\n ) : null}\n <div className={`${TextArea.className}__text-area-wrapper`}>\n {leftIcon ? (\n <Icon color={isDisabled ? 'question' : 'black'} {...leftIcon} aria-hidden=\"true\" className=\"left\" />\n ) : null}\n <div className={`${TextArea.className}-text-area-wrapper__text-area`}>\n <textarea\n {...textareaProps}\n onBlur={(event) => {\n onBlur?.(event);\n onBlurProps?.(event as unknown as FocusEvent<HTMLDivElement, Element>);\n }}\n onFocus={(event) => {\n onFocus?.(event);\n onFocusProps?.(event as unknown as FocusEvent<HTMLDivElement, Element>);\n }}\n aria-disabled={isDisabled}\n aria-invalid={isInvalid || (isRequired && !(isControlled ? propsValue : value))}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby || (label ? labelId : undefined)}\n aria-readonly={isReadOnly}\n aria-required={isRequired}\n autoFocus={autoFocus}\n disabled={isDisabled}\n name={name}\n onChange={handleChange}\n placeholder={placeholder}\n ref={textareaRef as MutableRefObject<HTMLTextAreaElement>}\n value={isControlled ? propsValue : value}\n rows={rows}\n />\n </div>\n {after ? (\n <Flexbox className={`${TextArea.className}-text-area-wrapper__toolbar`} gap=\"8px\">\n {typeof after === 'function'\n ? after(\n isControlled ? propsValue : value,\n isDisabled,\n isInvalid || (isRequired && !(isControlled ? propsValue : value)),\n isRequired\n )\n : after}\n </Flexbox>\n ) : null}\n </div>\n </StyledTextArea>\n );\n});\nTextArea.className = CLASSNAME;\nTextArea.displayName = COMPONENT_NAME;\n"],"names":["useComputeNumberOfRows","minimumRows","rows","setRows","useState","recompute","target","currentRows","scrollHeight","clientHeight","recomputeNumberOfRows","TextAreaVariant","default","underline","StyledTextArea","styled","div","baseStyling","_ref","label","$hasLeftIcon","$hasContent","$isFocused","$isDisabled","$isInvalid","$color","$isGradient","$theme","$variant","css","Theme","dark","COMPONENT_NAME","CLASSNAME","TextArea","forwardRef","props","ref","ariaLabel","ariaLabelledby","after","autoFocus","className","color","propsColor","defaultValue","forceColor","isColored","isDisabled","isInvalid","isReadOnly","isRequired","leftIcon","name","onBlur","onBlurProps","onChange","onFocus","onFocusProps","placeholder","textareaProps","textareaRef","propsTextareaRef","theme","propsTheme","value","propsValue","variant","width","forwardedProps","_objectWithoutProperties","_excluded","useTheme","Object","values","ButtonsColorPalette","includes","isGradient","radar","_textareaRef","React","useRef","isFocusVisible","isFocused","focusProps","useFocusRing","isFocusWithin","setFocusWithin","Boolean","focusWithinProps","useFocusWithin","onFocusWithinChange","setValue","isControlled","undefined","labelId","useId","warnIfNoAccessibleLabelFound","handleChange","useCallback","event","useEffect","current","createElement","_extends","$isFocusVisible","$isRequired","classNames","id","Icon","disabled","Flexbox","gap","displayName"],"mappings":";;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACaA,MAAAA,sBAAsB,GACjCC,WAAmB,IAQhB;EACH,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGC,QAAQ,CAACH,WAAW,CAAC,CAAA;EAE7C,MAAMI,SAAS,GAAIC,MAAe,IAAK;AACrC;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI;IACCA,MAAM,CAAyBJ,IAAI,GAAGD,WAAW,CAAA;IAClD,IAAIM,WAAW,GAAGD,MAAM,CAACE,YAAY,IAAIF,MAAM,CAACG,YAAY,GAAGR,WAAW,CAAC,CAAA;AAC3EM,IAAAA,WAAW,GAAGA,WAAW,IAAIN,WAAW,GAAGM,WAAW,GAAGN,WAAW,CAAA;AACpE;IACCK,MAAM,CAAyBJ,IAAI,GAAGK,WAAW,CAAA;IAElDJ,OAAO,CAACI,WAAW,CAAC,CAAA;GACrB,CAAA;EAED,OAAO;AACLG,IAAAA,qBAAqB,EAAEL,SAAS;AAChCH,IAAAA,IAAAA;GACD,CAAA;AACH;;AC5CA;AACA;AACA;AACO,MAAMS,eAAe,GAAG;AAC7BC,EA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,EAAE0C,YAAa;AACvBvC,IAAAA,WAAW,EAAEA,WAAY;AACzBtB,IAAAA,GAAG,EAAEwB,WAAqD;AAC1DI,IAAAA,KAAK,EAAE4B,YAAY,GAAG3B,UAAU,GAAGD,KAAM;AACzC/D,IAAAA,IAAI,EAAEA,IAAAA;GACP,CAAA,CACE,CAAC,EACLsC,KAAK,gBACJwC,cAAA,CAAAuB,aAAA,CAACQ,OAAO,EAAA;AAACrE,IAAAA,SAAS,EAAG,CAAA,EAAER,QAAQ,CAACQ,SAAU,CAA6B,2BAAA,CAAA;AAACsE,IAAAA,GAAG,EAAC,KAAA;AAAK,GAAA,EAC9E,OAAOxE,KAAK,KAAK,UAAU,GACxBA,KAAK,CACHqD,YAAY,GAAG3B,UAAU,GAAGD,KAAK,EACjCjB,UAAU,EACVC,SAAS,IAAKE,UAAU,IAAI,EAAE0C,YAAY,GAAG3B,UAAU,GAAGD,KAAK,CAAE,EACjEd,UACF,CAAC,GACDX,KACG,CAAC,GACR,IACD,CACS,CAAC,CAAA;AAErB,CAAC,EAAC;AACFN,QAAQ,CAACQ,SAAS,GAAGT,SAAS,CAAA;AAC9BC,QAAQ,CAAC+E,WAAW,GAAGjF,cAAc;;;;"}
@@ -0,0 +1,29 @@
1
+ import * as styled_components from 'styled-components';
2
+ import { b as TextFieldProps, T as TextFieldVariant } from './types29.js';
3
+ import { T as Theme } from './colors.js';
4
+ import { C as Comp } from './helpers.js';
5
+
6
+ /**
7
+ * Component style.
8
+ */
9
+ declare const StyledTextField: styled_components.StyledComponent<"div", any, Omit<TextFieldProps, "color" | "onChange" | "isInvalid" | "isRequired" | "isDisabled" | "isColored"> & {
10
+ $color: string | undefined;
11
+ $isGradient: boolean;
12
+ $hasLeftIcon: boolean;
13
+ $hasContent: boolean;
14
+ $isDisabled: boolean | undefined;
15
+ $isInvalid: boolean | undefined;
16
+ $isFocused: boolean;
17
+ $isFocusVisible: boolean;
18
+ $isRequired: boolean | undefined;
19
+ $theme: Theme | undefined;
20
+ $variant: TextFieldVariant | undefined;
21
+ }, never>;
22
+
23
+ /**
24
+ * The TextField component.
25
+ * Can be used as controlled or uncontrolled.
26
+ */
27
+ declare const TextField: Comp<TextFieldProps, HTMLDivElement>;
28
+
29
+ export { StyledTextField as S, TextField as T };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextField.js","sources":["../../src/components/text-field/types.ts","../../src/components/text-field/styles.ts","../../src/components/text-field/intl/index.ts","../../src/components/text-field/TextField.tsx"],"sourcesContent":["import { ChangeEvent, ComponentProps, MutableRefObject, ReactNode } from 'react';\nimport { ButtonsColorPalette, StylingProps, Theme, ValueOf } from '../../types';\nimport { IconProps } from '../icon';\nimport { IconButtonProps } from '../icon-button';\nimport { PillProps } from '../pill';\n\n/**\n * Component variant.\n */\nexport const TextFieldVariant = {\n default: 'default',\n underline: 'underline',\n} as const;\nexport type TextFieldVariant = ValueOf<typeof TextFieldVariant>;\n\n/**\n * Component color.\n */\nexport type TextFieldColor = ButtonsColorPalette;\n\n/**\n * Component props.\n */\nexport interface TextFieldProps extends Omit<ComponentProps<'div'>, 'onChange'>, StylingProps {\n /** Whether the component can be autofocused. */\n autoFocus?: boolean;\n /** Color variant. */\n color?: TextFieldColor;\n /** Force color even when not focused. */\n forceColor?: boolean;\n /**\n * Default value.\n * Used for uncontrolled version.\n */\n defaultValue?: string;\n /** Whether the clear button is displayed or not. */\n hasClearButton?: boolean | Omit<Partial<IconButtonProps>, 'ref'>;\n /** Place for icon buttons between the clear button and the separator. */\n internal?:\n | ReactNode\n | ((value?: string, isDisabled?: boolean, isInvalid?: boolean, isRequired?: boolean) => ReactNode);\n /** Place for icon buttons after the separator. */\n after?: ReactNode | ((value?: string, isDisabled?: boolean, isInvalid?: boolean, isRequired?: boolean) => ReactNode);\n /** Custom props to pass to the input element. */\n inputProps?: ComponentProps<'input'>;\n /** Custom ref object to pass to the input element. */\n inputRef?: MutableRefObject<HTMLInputElement>;\n /** @deprecated Whether the component should use the product colors or shades of grey. */\n isColored?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is invalid or not. */\n isInvalid?: boolean;\n /** Whether the component is read only or not. */\n isReadOnly?: boolean;\n /** Whether the component is required or not. */\n isRequired?: boolean;\n /** Label */\n label?: string;\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 leftIcon?: Omit<IconProps, 'ref'>;\n /** Name to pass to the input element. */\n name?: string;\n /** Method to handle component change. */\n onChange?(value?: string, name?: string, event?: ChangeEvent<HTMLInputElement>): void;\n /** Method to handle component clear. */\n onClear?(): void;\n /** List of Pills. */\n pills?: Omit<PillProps, 'ref'>[];\n /** Placeholder. */\n placeholder?: string;\n /** Theme. */\n theme?: Theme;\n /** Input type. */\n type?: string;\n /**\n * Input value.\n * Used for controlled version.\n */\n value?: string;\n /** TextField variant. */\n variant?: TextFieldVariant;\n}\n\nexport type StyledTextFieldProps = Omit<\n TextFieldProps,\n 'color' | 'isColored' | 'isDisabled' | 'isInvalid' | 'isRequired' | 'onChange'\n> & {\n $color: TextFieldProps['color'];\n $isGradient: boolean;\n $hasLeftIcon: boolean;\n $hasContent: boolean;\n $isDisabled: TextFieldProps['isDisabled'];\n $isInvalid: TextFieldProps['isInvalid'];\n $isFocused: boolean;\n $isFocusVisible: boolean;\n $isRequired: TextFieldProps['isRequired'];\n $theme: TextFieldProps['theme'];\n $variant: TextFieldProps['variant'];\n};\n","import styled, { css } from 'styled-components';\nimport { baseStyling } from '../shared';\nimport { StyledTextFieldProps, TextFieldVariant } from './types';\nimport { Theme } from '@redsift/design-system/types';\n\n/**\n * Component style.\n */\nexport const StyledTextField = styled.div<StyledTextFieldProps>`\n height: fit-content;\n position: relative;\n width: fit-content;\n margin: 0;\n min-width: 0;\n padding: 0;\n ${baseStyling}\n\n border: 0;\n display: inline-flex;\n flex-direction: column;\n vertical-align: top;\n\n ${({\n label,\n $hasLeftIcon,\n $hasContent,\n $isFocused,\n $isDisabled,\n $isInvalid,\n $color,\n $isGradient,\n $theme,\n $variant,\n }) => css`\n ${$isDisabled\n ? css`\n pointer-events: none;\n `\n : ''}\n\n .redsift-text-field__label {\n font-family: var(--redsift-typography-input-text-font-family);\n font-size: var(--redsift-typography-input-text-font-size);\n font-weight: var(--redsift-typography-input-text-font-weight);\n line-height: var(--redsift-typography-input-text-line-height);\n left: ${$hasLeftIcon && !$hasContent ? '32px' : '0'};\n overflow: hidden;\n pointer-events: none;\n position: absolute;\n text-overflow: ellipsis;\n top: ${$hasContent ? '-8px' : '-7px'};\n transform-origin: top left;\n transition: color 200ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms,\n max-width 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n white-space: nowrap;\n z-index: 1;\n\n ${!$hasContent\n ? css`\n max-width: calc(100% - 24px);\n transform: translate(${$variant === TextFieldVariant.underline ? '0px' : '14px'}, 16px) scale(1);\n `\n : css`\n max-width: calc(133% - 32px);\n transform: translate(${$variant === TextFieldVariant.underline ? '0px' : '14px'}, 1px) scale(0.733);\n `}\n\n ${!$isGradient\n ? css`\n color: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isInvalid\n ? 'error'\n : $isFocused\n ? $color\n : 'grey'}-text-${$isDisabled ? 'disabled' : 'default'}\n );\n `\n : css`\n background-color: var(--redsift-color-neutral-${$theme === Theme.dark ? 'x-dark-grey' : 'white'});\n ${$variant !== TextFieldVariant.underline\n ? css`\n padding-right: 7px;\n padding-left: 5px;\n `\n : ''}\n > span {\n background: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isInvalid\n ? 'error'\n : $isFocused\n ? $color\n : 'grey'}-text-${$isDisabled ? 'disabled' : 'default'}\n );\n background-clip: text;\n color: transparent;\n }\n `}\n }\n\n .redsift-text-field__input-wrapper {\n align-items: flex-start;\n box-sizing: border-box;\n cursor: text;\n display: inline-flex;\n min-height: 42px;\n position: relative;\n }\n\n .redsift-text-field-input-wrapper__pills-and-input {\n align-items: flex-start;\n box-sizing: border-box;\n display: flex;\n flex-direction: column-reverse;\n flex-wrap: wrap;\n flex: 1 1 auto;\n padding-bottom: 7px;\n ${$variant !== TextFieldVariant.underline && !$hasLeftIcon\n ? css`\n padding-left: 16px;\n `\n : ''}\n padding-top: ${label ? '9px' : '7px'};\n\n .redsift-pill {\n margin: 3px 6px 3px 0;\n }\n }\n\n .redsift-text-field-input-wrapper-pills-and-input__input {\n background: none;\n border: 0;\n box-sizing: content-box;\n display: flex;\n flex: 1 1 auto;\n font-family: var(--redsift-typography-input-text-font-family);\n font-size: var(--redsift-typography-input-text-font-size);\n font-weight: var(--redsift-typography-input-text-font-weight);\n line-height: var(--redsift-typography-input-text-line-height);\n min-width: 0;\n min-width: 100px;\n padding: 2px 0;\n width: 100%;\n\n ${$isDisabled\n ? css`\n color: var(--redsift-color-grey-l2);\n `\n : css`\n color: var(--redsift-color-neutral-${$theme === Theme.dark ? 'white' : 'x-dark-grey'});\n `}\n }\n\n .redsift-text-field-input-wrapper-pills-and-input__input::placeholder {\n color: var(--redsift-color-neutral-mid-grey);\n }\n\n .redsift-text-field-input-wrapper-pills-and-input__input:focus {\n outline: 0;\n }\n\n .redsift-text-field-input-wrapper__fieldset {\n border-style: solid;\n bottom: 0;\n left: 1px;\n margin: 0;\n min-width: 0%;\n overflow: hidden;\n padding: 0 8px;\n pointer-events: none;\n position: absolute;\n right: 0;\n text-align: left;\n top: -5px;\n\n ${!$isGradient || $isDisabled || !$isFocused || $isInvalid\n ? css`\n ${$variant === TextFieldVariant.underline\n ? css`\n border-bottom-width: 2px;\n `\n : css`\n border-radius: 4px;\n border-width: 2px;\n `}\n border-color: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isInvalid\n ? 'error'\n : $isFocused\n ? $color\n : 'grey'}-text-${$isDisabled ? 'disabled' : 'default'}\n );\n `\n : css`\n ${$variant === TextFieldVariant.underline\n ? css`\n border-bottom: 2px solid transparent;\n `\n : css`\n border: 2px solid transparent;\n border-radius: 4px;\n `}\n background: 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(--redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-default);\n `}\n }\n\n .redsift-text-field-input-wrapper-fieldset__legend {\n display: block;\n float: unset;\n font-size: 11px;\n height: 11px;\n overflow: hidden;\n padding: 0;\n visibility: hidden;\n white-space: nowrap;\n width: auto;\n\n ${!$hasContent\n ? css`\n max-width: 0.01px;\n transition: max-width 50ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n `\n : css`\n max-width: 100%;\n transition: max-width 100ms cubic-bezier(0, 0, 0.2, 1) 50ms;\n `}\n }\n\n .redsift-text-field-input-wrapper-fieldset__legend > span {\n display: inline-block;\n opacity: 0;\n padding-left: 5px;\n padding-right: 5px;\n visibility: visible;\n }\n\n .redsift-text-field-input-wrapper__toolbar {\n position: relative;\n top: 9px;\n }\n\n .redsift-icon-button:not(.redsift-pill > .redsift-icon-button) {\n padding: 2px;\n position: relative;\n top: -2px;\n height: 28px;\n width: 28px;\n }\n\n ${$variant !== TextFieldVariant.underline\n ? css`\n .redsift-icon.left {\n padding-left: 12px;\n padding-right: 8px;\n line-height: 28px;\n }\n\n .redsift-text-field-input-wrapper__toolbar {\n padding-right: 8px;\n }\n `\n : css`\n .redsift-icon.left {\n padding-right: 8px;\n }\n `}\n\n .redsift-icon.left,\n .redsift-icon.right {\n top: 9px;\n }\n `}\n`;\n","import enUS from './en-US.json';\nimport frFR from './fr-FR.json';\n\nexport default {\n 'en-US': enUS,\n 'fr-FR': frFR,\n};\n","import React, { MouseEvent, ComponentProps, forwardRef, MutableRefObject, useCallback, useState } from 'react';\nimport classNames from 'classnames';\nimport { useFocusRing } from '../../react-aria/react-aria/focus';\nimport { useFocusWithin } from '../../react-aria/react-aria/interactions';\nimport { ButtonsColorPalette, Comp } from '../../types';\nimport { warnIfNoAccessibleLabelFound } from '../../utils/warnIfNoAccessibleLabelFound';\nimport { TextFieldProps, TextFieldVariant } from './types';\nimport { StyledTextField } from './styles';\nimport { Icon } from '../../components/icon';\nimport { mdiClose } from '@redsift/icons';\nimport { Flexbox } from '../flexbox';\nimport { IconButton } from '../icon-button';\nimport { Pill } from '../pill';\nimport { useTheme } from '../theme';\nimport { useMessageFormatter } from '@redsift/design-system/react-aria/react-aria/i18n';\nimport { useId } from '../../utils';\n\nimport intlMessages from './intl';\n\nconst COMPONENT_NAME = 'TextField';\nconst CLASSNAME = 'redsift-text-field';\n\n/**\n * The TextField component.\n * Can be used as controlled or uncontrolled.\n */\nexport const TextField: Comp<TextFieldProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n after,\n autoFocus,\n className,\n color: propsColor,\n defaultValue = '',\n forceColor,\n hasClearButton,\n inputProps,\n inputRef,\n internal,\n isColored = true,\n isDisabled,\n isInvalid,\n isReadOnly,\n isRequired,\n label,\n leftIcon,\n name,\n onBlur: onBlurProps,\n onChange,\n onClear,\n onFocus: onFocusProps,\n pills,\n placeholder,\n theme: propsTheme,\n type,\n value: propsValue,\n variant = TextFieldVariant.default,\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n const color = Object.values(ButtonsColorPalette).includes(propsColor!) ? propsColor : isColored ? 'primary' : 'grey';\n const isGradient = color === ButtonsColorPalette.radar;\n\n const format = useMessageFormatter(intlMessages);\n\n const {\n isFocusVisible,\n isFocused,\n focusProps: { onFocus, onBlur },\n } = useFocusRing({\n autoFocus,\n });\n const [isFocusWithin, setFocusWithin] = useState(Boolean(autoFocus));\n const { focusWithinProps } = useFocusWithin({\n onFocusWithinChange: (isFocusWithin) => setFocusWithin(isFocusWithin),\n });\n\n const [value, setValue] = useState(defaultValue);\n const isControlled = propsValue !== null && propsValue !== undefined;\n\n const [labelId] = useId();\n\n warnIfNoAccessibleLabelFound(props as ComponentProps<'label'>, [label], 'TextField');\n\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n if (isDisabled || isReadOnly) {\n return;\n }\n\n if (onChange) {\n onChange(event.target.value, name, event);\n } else {\n setValue(event.target.value);\n }\n },\n [onChange]\n );\n\n const handleClear = useCallback(() => {\n if (isDisabled || isReadOnly) {\n return;\n }\n\n if (onChange) {\n onChange('');\n }\n if (onClear) {\n onClear();\n }\n if (hasClearButton && hasClearButton !== true && hasClearButton.onClick) {\n hasClearButton.onClick({} as MouseEvent<HTMLButtonElement>);\n }\n setValue('');\n }, [onChange]);\n\n return (\n <StyledTextField\n {...focusWithinProps}\n {...forwardedProps}\n $hasContent={\n isFocusWithin ||\n Boolean(isControlled ? propsValue : value) ||\n Boolean(placeholder) ||\n Boolean(pills && pills.length > 0)\n }\n $hasLeftIcon={Boolean(leftIcon)}\n $color={color}\n $isGradient={isGradient}\n $isDisabled={isDisabled}\n $isFocusVisible={isFocusVisible}\n $isInvalid={isInvalid || (isRequired && !(isControlled ? propsValue : value))}\n $isRequired={isRequired}\n $isFocused={Boolean(isFocused || forceColor)}\n $theme={theme}\n $variant={variant}\n className={classNames(TextField.className, className)}\n ref={ref as MutableRefObject<HTMLDivElement>}\n >\n <fieldset aria-hidden=\"true\" className={`${TextField.className}-input-wrapper__fieldset`}>\n <legend id={labelId} className={`${TextField.className}-input-wrapper-fieldset__legend`}>\n {label ? <span>{label}</span> : null}\n </legend>\n </fieldset>\n {label ? (\n <label className={`${TextField.className}__label`}>\n <span>{label}</span>\n </label>\n ) : null}\n <div className={`${TextField.className}__input-wrapper`}>\n {leftIcon ? (\n <Icon color={isDisabled ? 'question' : 'black'} {...leftIcon} aria-hidden=\"true\" className=\"left\" />\n ) : null}\n <div className={`${TextField.className}-input-wrapper__pills-and-input`}>\n <input\n {...inputProps}\n onBlur={(event) => {\n onBlur?.(event);\n onBlurProps?.(event);\n }}\n onFocus={(event) => {\n onFocus?.(event);\n onFocusProps?.(event);\n }}\n aria-disabled={isDisabled}\n aria-invalid={isInvalid || (isRequired && !(isControlled ? propsValue : value))}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby || (label ? labelId : undefined)}\n aria-readonly={isReadOnly}\n aria-required={isRequired}\n autoFocus={autoFocus}\n className={`${TextField.className}-input-wrapper-pills-and-input__input`}\n disabled={isDisabled}\n name={name}\n onChange={handleChange}\n placeholder={placeholder}\n ref={inputRef as MutableRefObject<HTMLInputElement>}\n type={type}\n value={isControlled ? propsValue : value}\n />\n <div>\n {pills?.map((pill, index) => (\n <Pill theme={theme} key={`${labelId}-pill-${index}`} color=\"blue\" size=\"small\" {...pill} />\n ))}\n </div>\n </div>\n {hasClearButton || internal || after ? (\n <Flexbox className={`${TextField.className}-input-wrapper__toolbar`} gap=\"8px\">\n {hasClearButton ? (\n <IconButton\n theme={theme}\n aria-label={label ? format('clear-field', { label }) : format('clear')}\n color=\"grey\"\n isDisabled={isDisabled}\n icon={mdiClose}\n {...(hasClearButton !== true && hasClearButton)}\n onClick={handleClear}\n className=\"right clear\"\n />\n ) : null}\n {typeof internal === 'function'\n ? internal(\n isControlled ? propsValue : value,\n isDisabled,\n isInvalid || (isRequired && !(isControlled ? propsValue : value)),\n isRequired\n )\n : internal}\n {(hasClearButton || internal) && after ? (\n <span\n style={{\n borderLeft: '1px solid var(--redsift-color-neutral-mid-grey)',\n position: 'relative',\n top: '-2px',\n }}\n />\n ) : null}\n {typeof after === 'function'\n ? after(\n isControlled ? propsValue : value,\n isDisabled,\n isInvalid || (isRequired && !(isControlled ? propsValue : value)),\n isRequired\n )\n : after}\n </Flexbox>\n ) : null}\n </div>\n </StyledTextField>\n );\n});\nTextField.className = CLASSNAME;\nTextField.displayName = COMPONENT_NAME;\n"],"names":["TextFieldVariant","default","underline","StyledTextField","styled","div","baseStyling","_ref","label","$hasLeftIcon","$hasContent","$isFocused","$isDisabled","$isInvalid","$color","$isGradient","$theme","$variant","css","Theme","dark","enUS","frFR","COMPONENT_NAME","CLASSNAME","TextField","forwardRef","props","ref","ariaLabel","ariaLabelledby","after","autoFocus","className","color","propsColor","defaultValue","forceColor","hasClearButton","inputProps","inputRef","internal","isColored","isDisabled","isInvalid","isReadOnly","isRequired","leftIcon","name","onBlur","onBlurProps","onChange","onClear","onFocus","onFocusProps","pills","placeholder","theme","propsTheme","type","value","propsValue","variant","forwardedProps","_objectWithoutProperties","_excluded","useTheme","Object","values","ButtonsColorPalette","includes","isGradient","radar","format","useMessageFormatter","intlMessages","isFocusVisible","isFocused","focusProps","useFocusRing","isFocusWithin","setFocusWithin","useState","Boolean","focusWithinProps","useFocusWithin","onFocusWithinChange","setValue","isControlled","undefined","labelId","useId","warnIfNoAccessibleLabelFound","handleChange","useCallback","event","target","handleClear","onClick","React","createElement","_extends","length","$isFocusVisible","$isRequired","classNames","id","Icon","disabled","map","pill","index","Pill","key","size","Flexbox","gap","IconButton","icon","mdiClose","style","borderLeft","position","top","displayName"],"mappings":";;;;;;;;;;;;;;;;;AAMA;AACA;AACA;AACO,MAAMA,gBAAgB,GAAG;AAC9BC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAA;AACb,EAAU;;AAGV;AACA;AACA;;AAGA;AACA;AACA;;ACjBA;AACA;AACA;AACaC,MAAAA,eAAe,GAAGC,MAAM,CAACC,GAA0B,CAAA;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIC,WAAY,CAAA;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;IACDC,KAAK;IACLC,YAAY;IACZC,WAAW;IACXC,UAAU;IACVC,WAAW;IACXC,UAAU;IACVC,MAAM;IACNC,WAAW;IACXC,MAAM;AACNC,IAAAA,QAAAA;AACF,GAAC,GAAAV,IAAA,CAAA;AAAA,EAAA,OAAKW,GAAI,CAAA;AACZ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