@laerdal/life-react-components 6.0.0-dev.1.full → 6.0.0-dev.12.full

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 (394) hide show
  1. package/dist/Accordion/ContentAccordion.cjs +40 -11
  2. package/dist/Accordion/ContentAccordion.cjs.map +1 -1
  3. package/dist/Accordion/ContentAccordion.js +40 -11
  4. package/dist/Accordion/ContentAccordion.js.map +1 -1
  5. package/dist/Accordion/__tests__/AccordionMenu.test.tsx +42 -0
  6. package/dist/Accordion/__tests__/ContentAccordion.test.tsx +150 -0
  7. package/dist/Accordion/styles.cjs +51 -13
  8. package/dist/Accordion/styles.cjs.map +1 -1
  9. package/dist/Accordion/styles.js +51 -13
  10. package/dist/Accordion/styles.js.map +1 -1
  11. package/dist/AuthPage/__tests__/AuthPage.test.tsx +27 -0
  12. package/dist/Banners/Banner.cjs +38 -34
  13. package/dist/Banners/Banner.cjs.map +1 -1
  14. package/dist/Banners/Banner.d.ts +2 -3
  15. package/dist/Banners/Banner.js +38 -34
  16. package/dist/Banners/Banner.js.map +1 -1
  17. package/dist/Banners/__tests__/Banner.test.tsx +47 -0
  18. package/dist/Banners/__tests__/OverviewBanner.test.tsx +20 -0
  19. package/dist/Banners/styles.cjs +8 -16
  20. package/dist/Banners/styles.cjs.map +1 -1
  21. package/dist/Banners/styles.js +8 -16
  22. package/dist/Banners/styles.js.map +1 -1
  23. package/dist/Breadcrumb/Breadcrumb.cjs +8 -2
  24. package/dist/Breadcrumb/Breadcrumb.cjs.map +1 -1
  25. package/dist/Breadcrumb/Breadcrumb.js +8 -2
  26. package/dist/Breadcrumb/Breadcrumb.js.map +1 -1
  27. package/dist/Breadcrumb/__tests__/Breadcrumb.test.tsx +78 -0
  28. package/dist/Breadcrumb/styles.cjs +15 -4
  29. package/dist/Breadcrumb/styles.cjs.map +1 -1
  30. package/dist/Breadcrumb/styles.js +15 -4
  31. package/dist/Breadcrumb/styles.js.map +1 -1
  32. package/dist/Button/BackButton.cjs +27 -6
  33. package/dist/Button/BackButton.cjs.map +1 -1
  34. package/dist/Button/BackButton.js +27 -6
  35. package/dist/Button/BackButton.js.map +1 -1
  36. package/dist/Button/Button.cjs +179 -47
  37. package/dist/Button/Button.cjs.map +1 -1
  38. package/dist/Button/Button.d.ts +2 -0
  39. package/dist/Button/Button.js +179 -47
  40. package/dist/Button/Button.js.map +1 -1
  41. package/dist/Button/Iconbutton.cjs +83 -21
  42. package/dist/Button/Iconbutton.cjs.map +1 -1
  43. package/dist/Button/Iconbutton.js +83 -21
  44. package/dist/Button/Iconbutton.js.map +1 -1
  45. package/dist/Button/__tests__/BackButton.test.tsx +32 -0
  46. package/dist/Button/__tests__/Button.test.tsx +45 -0
  47. package/dist/Button/__tests__/DualButton.test.tsx +119 -0
  48. package/dist/Card/HorizontalCard/HorizontalCard.cjs +20 -5
  49. package/dist/Card/HorizontalCard/HorizontalCard.cjs.map +1 -1
  50. package/dist/Card/HorizontalCard/HorizontalCard.js +20 -5
  51. package/dist/Card/HorizontalCard/HorizontalCard.js.map +1 -1
  52. package/dist/Card/HorizontalCard/HorizontalCardBody.cjs +12 -3
  53. package/dist/Card/HorizontalCard/HorizontalCardBody.cjs.map +1 -1
  54. package/dist/Card/HorizontalCard/HorizontalCardBody.js +12 -3
  55. package/dist/Card/HorizontalCard/HorizontalCardBody.js.map +1 -1
  56. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs +8 -2
  57. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs.map +1 -1
  58. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js +8 -2
  59. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js.map +1 -1
  60. package/dist/Card/HorizontalCard/__tests__/HorizontalCard.test.tsx +71 -0
  61. package/dist/Card/HorizontalCard/__tests__/VerticalCard.test.tsx +124 -0
  62. package/dist/Card/VerticalCard/Card.cjs +20 -5
  63. package/dist/Card/VerticalCard/Card.cjs.map +1 -1
  64. package/dist/Card/VerticalCard/Card.js +20 -5
  65. package/dist/Card/VerticalCard/Card.js.map +1 -1
  66. package/dist/Card/VerticalCard/CardBottomSection.cjs +72 -19
  67. package/dist/Card/VerticalCard/CardBottomSection.cjs.map +1 -1
  68. package/dist/Card/VerticalCard/CardBottomSection.d.ts +8 -1
  69. package/dist/Card/VerticalCard/CardBottomSection.js +73 -20
  70. package/dist/Card/VerticalCard/CardBottomSection.js.map +1 -1
  71. package/dist/Card/VerticalCard/CardMiddleSection.cjs +19 -4
  72. package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +1 -1
  73. package/dist/Card/VerticalCard/CardMiddleSection.js +19 -4
  74. package/dist/Card/VerticalCard/CardMiddleSection.js.map +1 -1
  75. package/dist/Card/VerticalCard/CardTopSection.cjs +9 -2
  76. package/dist/Card/VerticalCard/CardTopSection.cjs.map +1 -1
  77. package/dist/Card/VerticalCard/CardTopSection.js +9 -2
  78. package/dist/Card/VerticalCard/CardTopSection.js.map +1 -1
  79. package/dist/Card/__tests__/Card.test.tsx +146 -0
  80. package/dist/Chips/ChipStyles.cjs +4 -1
  81. package/dist/Chips/ChipStyles.cjs.map +1 -1
  82. package/dist/Chips/ChipStyles.js +4 -1
  83. package/dist/Chips/ChipStyles.js.map +1 -1
  84. package/dist/Chips/__tests__/ActionChip.test.tsx +94 -0
  85. package/dist/Chips/__tests__/ChoiceChips.test.tsx +79 -0
  86. package/dist/Chips/__tests__/FilterChip.test.tsx +95 -0
  87. package/dist/Chips/__tests__/InputChip.test.tsx +155 -0
  88. package/dist/ChipsInput/ChipInputField.cjs +16 -4
  89. package/dist/ChipsInput/ChipInputField.cjs.map +1 -1
  90. package/dist/ChipsInput/ChipInputField.js +16 -4
  91. package/dist/ChipsInput/ChipInputField.js.map +1 -1
  92. package/dist/ChipsInput/__tests__/ChipDropdownInput.test.tsx +100 -0
  93. package/dist/ChipsInput/__tests__/ChipInputFields.test.tsx +155 -0
  94. package/dist/Dropdown/BasicDropdown.cjs +12 -3
  95. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  96. package/dist/Dropdown/BasicDropdown.js +12 -3
  97. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  98. package/dist/Dropdown/CommonStyling.cjs +172 -42
  99. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  100. package/dist/Dropdown/CommonStyling.js +172 -42
  101. package/dist/Dropdown/CommonStyling.js.map +1 -1
  102. package/dist/Dropdown/DropdownContent.cjs +36 -10
  103. package/dist/Dropdown/DropdownContent.cjs.map +1 -1
  104. package/dist/Dropdown/DropdownContent.js +36 -10
  105. package/dist/Dropdown/DropdownContent.js.map +1 -1
  106. package/dist/Dropdown/DropdownFilter.cjs +12 -3
  107. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  108. package/dist/Dropdown/DropdownFilter.js +12 -3
  109. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  110. package/dist/Dropdown/__tests__/DropdownFilter.test.tsx +39 -0
  111. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs +4 -1
  112. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
  113. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js +4 -1
  114. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  115. package/dist/Footer/__tests__/Footer.test.tsx +182 -0
  116. package/dist/GlobalNavigationBar/__tests__/GlobalNavigationBar.tests.d.ts +1 -0
  117. package/dist/GlobalNavigationBar/__tests__/Logo.test.tsx +39 -0
  118. package/dist/GlobalNavigationBar/__tests__/Logo.tests.d.ts +1 -0
  119. package/dist/GlobalNavigationBar/desktop/UserMenu.cjs +4 -1
  120. package/dist/GlobalNavigationBar/desktop/UserMenu.cjs.map +1 -1
  121. package/dist/GlobalNavigationBar/desktop/UserMenu.js +4 -1
  122. package/dist/GlobalNavigationBar/desktop/UserMenu.js.map +1 -1
  123. package/dist/GlobalNavigationBar/desktop/__tests__/DesktopActions.test.tsx +108 -0
  124. package/dist/GlobalNavigationBar/desktop/__tests__/ExtendedMainMenu.test.tsx +28 -0
  125. package/dist/GlobalNavigationBar/desktop/__tests__/MainMenu.test.tsx +55 -0
  126. package/dist/GlobalNavigationBar/desktop/__tests__/RightSideNav.test.tsx +45 -0
  127. package/dist/GlobalNavigationBar/desktop/__tests__/UserMenu.test.tsx +125 -0
  128. package/dist/GlobalNavigationBar/mobile/__tests__/MobileMenu.test.tsx +317 -0
  129. package/dist/GlobalNavigationBar/mobile/__tests__/MobileMenuContent.test.tsx +294 -0
  130. package/dist/GlobalNavigationBar/mobile/__tests__/MobileMenuHeader.test.tsx +195 -0
  131. package/dist/HyperLink/styling.cjs +38 -8
  132. package/dist/HyperLink/styling.cjs.map +1 -1
  133. package/dist/HyperLink/styling.js +38 -8
  134. package/dist/HyperLink/styling.js.map +1 -1
  135. package/dist/InputFields/Checkbox.cjs +54 -14
  136. package/dist/InputFields/Checkbox.cjs.map +1 -1
  137. package/dist/InputFields/Checkbox.js +54 -14
  138. package/dist/InputFields/Checkbox.js.map +1 -1
  139. package/dist/InputFields/DatepickerField.cjs +149 -43
  140. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  141. package/dist/InputFields/DatepickerField.d.ts +1 -1
  142. package/dist/InputFields/DatepickerField.js +150 -44
  143. package/dist/InputFields/DatepickerField.js.map +1 -1
  144. package/dist/InputFields/DatepickerFieldHeader.cjs +20 -5
  145. package/dist/InputFields/DatepickerFieldHeader.cjs.map +1 -1
  146. package/dist/InputFields/DatepickerFieldHeader.js +20 -5
  147. package/dist/InputFields/DatepickerFieldHeader.js.map +1 -1
  148. package/dist/InputFields/Label.cjs +38 -11
  149. package/dist/InputFields/Label.cjs.map +1 -1
  150. package/dist/InputFields/Label.js +38 -11
  151. package/dist/InputFields/Label.js.map +1 -1
  152. package/dist/InputFields/NumberField.cjs +66 -16
  153. package/dist/InputFields/NumberField.cjs.map +1 -1
  154. package/dist/InputFields/NumberField.js +66 -16
  155. package/dist/InputFields/NumberField.js.map +1 -1
  156. package/dist/InputFields/PasswordField.cjs +4 -1
  157. package/dist/InputFields/PasswordField.cjs.map +1 -1
  158. package/dist/InputFields/PasswordField.d.ts +1 -1
  159. package/dist/InputFields/PasswordField.js +4 -1
  160. package/dist/InputFields/PasswordField.js.map +1 -1
  161. package/dist/InputFields/QuickSearch.cjs +30 -6
  162. package/dist/InputFields/QuickSearch.cjs.map +1 -1
  163. package/dist/InputFields/QuickSearch.js +30 -6
  164. package/dist/InputFields/QuickSearch.js.map +1 -1
  165. package/dist/InputFields/RadioButton.cjs +63 -15
  166. package/dist/InputFields/RadioButton.cjs.map +1 -1
  167. package/dist/InputFields/RadioButton.js +63 -15
  168. package/dist/InputFields/RadioButton.js.map +1 -1
  169. package/dist/InputFields/RichTextField.cjs +60 -15
  170. package/dist/InputFields/RichTextField.cjs.map +1 -1
  171. package/dist/InputFields/RichTextField.js +60 -15
  172. package/dist/InputFields/RichTextField.js.map +1 -1
  173. package/dist/InputFields/SearchBar.cjs +4 -1
  174. package/dist/InputFields/SearchBar.cjs.map +1 -1
  175. package/dist/InputFields/SearchBar.js +4 -1
  176. package/dist/InputFields/SearchBar.js.map +1 -1
  177. package/dist/InputFields/TextField.cjs +9 -3
  178. package/dist/InputFields/TextField.cjs.map +1 -1
  179. package/dist/InputFields/TextField.d.ts +1 -1
  180. package/dist/InputFields/TextField.js +9 -3
  181. package/dist/InputFields/TextField.js.map +1 -1
  182. package/dist/InputFields/Textarea.cjs +68 -17
  183. package/dist/InputFields/Textarea.cjs.map +1 -1
  184. package/dist/InputFields/Textarea.js +68 -17
  185. package/dist/InputFields/Textarea.js.map +1 -1
  186. package/dist/InputFields/__tests__/NumberField.test.tsx +67 -0
  187. package/dist/InputFields/__tests__/NumberInput.test.tsx +68 -0
  188. package/dist/InputFields/__tests__/QuickSearch.test.tsx +42 -0
  189. package/dist/InputFields/components/SearchBarInput.cjs +28 -7
  190. package/dist/InputFields/components/SearchBarInput.cjs.map +1 -1
  191. package/dist/InputFields/components/SearchBarInput.js +28 -7
  192. package/dist/InputFields/components/SearchBarInput.js.map +1 -1
  193. package/dist/InputFields/components/SearchField.cjs +60 -15
  194. package/dist/InputFields/components/SearchField.cjs.map +1 -1
  195. package/dist/InputFields/components/SearchField.js +60 -15
  196. package/dist/InputFields/components/SearchField.js.map +1 -1
  197. package/dist/InputFields/styling.cjs +95 -39
  198. package/dist/InputFields/styling.cjs.map +1 -1
  199. package/dist/InputFields/styling.d.ts +1 -2
  200. package/dist/InputFields/styling.js +95 -39
  201. package/dist/InputFields/styling.js.map +1 -1
  202. package/dist/LinearProgress/LinearProgress.cjs +161 -53
  203. package/dist/LinearProgress/LinearProgress.cjs.map +1 -1
  204. package/dist/LinearProgress/LinearProgress.js +161 -53
  205. package/dist/LinearProgress/LinearProgress.js.map +1 -1
  206. package/dist/LinearProgress/__tests__/LinearProgress.test.tsx +25 -0
  207. package/dist/List/ListRow.cjs +36 -9
  208. package/dist/List/ListRow.cjs.map +1 -1
  209. package/dist/List/ListRow.js +36 -9
  210. package/dist/List/ListRow.js.map +1 -1
  211. package/dist/List/__tests__/ListRow.test.tsx +18 -0
  212. package/dist/List/__tests__/ListRow.tests.d.ts +1 -0
  213. package/dist/LoadingIndicator/LoadingIndicator.cjs +4 -1
  214. package/dist/LoadingIndicator/LoadingIndicator.cjs.map +1 -1
  215. package/dist/LoadingIndicator/LoadingIndicator.js +4 -1
  216. package/dist/LoadingIndicator/LoadingIndicator.js.map +1 -1
  217. package/dist/LoadingPage/GlobalLoadingPage.cjs +4 -1
  218. package/dist/LoadingPage/GlobalLoadingPage.cjs.map +1 -1
  219. package/dist/LoadingPage/GlobalLoadingPage.js +4 -1
  220. package/dist/LoadingPage/GlobalLoadingPage.js.map +1 -1
  221. package/dist/LoadingPage/__tests__/GlobalLoadingPage.test.tsx +23 -0
  222. package/dist/MenuItem/MenuItem.cjs +101 -26
  223. package/dist/MenuItem/MenuItem.cjs.map +1 -1
  224. package/dist/MenuItem/MenuItem.js +101 -26
  225. package/dist/MenuItem/MenuItem.js.map +1 -1
  226. package/dist/Modals/Modal.cjs +4 -1
  227. package/dist/Modals/Modal.cjs.map +1 -1
  228. package/dist/Modals/Modal.js +4 -1
  229. package/dist/Modals/Modal.js.map +1 -1
  230. package/dist/Modals/ModalContent.cjs +24 -6
  231. package/dist/Modals/ModalContent.cjs.map +1 -1
  232. package/dist/Modals/ModalContent.js +24 -6
  233. package/dist/Modals/ModalContent.js.map +1 -1
  234. package/dist/Modals/ModalDialog.cjs +12 -3
  235. package/dist/Modals/ModalDialog.cjs.map +1 -1
  236. package/dist/Modals/ModalDialog.js +12 -3
  237. package/dist/Modals/ModalDialog.js.map +1 -1
  238. package/dist/Modals/ModalNote.cjs +16 -4
  239. package/dist/Modals/ModalNote.cjs.map +1 -1
  240. package/dist/Modals/ModalNote.js +16 -4
  241. package/dist/Modals/ModalNote.js.map +1 -1
  242. package/dist/Modals/ModalStyles.cjs +44 -11
  243. package/dist/Modals/ModalStyles.cjs.map +1 -1
  244. package/dist/Modals/ModalStyles.js +44 -11
  245. package/dist/Modals/ModalStyles.js.map +1 -1
  246. package/dist/Modals/__tests__/Modal.test.tsx +169 -0
  247. package/dist/Modals/__tests__/ModalContainer.test.tsx +77 -0
  248. package/dist/Modals/__tests__/ModalContent.test.tsx +126 -0
  249. package/dist/NavItem/NavItem.cjs +4 -1
  250. package/dist/NavItem/NavItem.cjs.map +1 -1
  251. package/dist/NavItem/NavItem.js +4 -1
  252. package/dist/NavItem/NavItem.js.map +1 -1
  253. package/dist/NavItem/__tests__/NavItem.test.ts +6 -0
  254. package/dist/NotificationDot/NotificationDot.cjs +17 -2
  255. package/dist/NotificationDot/NotificationDot.cjs.map +1 -1
  256. package/dist/NotificationDot/NotificationDot.js +17 -2
  257. package/dist/NotificationDot/NotificationDot.js.map +1 -1
  258. package/dist/NotificationDot/__tests__/NotificationDot.test.tsx +33 -0
  259. package/dist/Paginator/Paginator.cjs +76 -29
  260. package/dist/Paginator/Paginator.cjs.map +1 -1
  261. package/dist/Paginator/Paginator.js +76 -29
  262. package/dist/Paginator/Paginator.js.map +1 -1
  263. package/dist/Paginator/__tests__/Paginator.test.tsx +39 -0
  264. package/dist/Panel/Panel.cjs +4 -1
  265. package/dist/Panel/Panel.cjs.map +1 -1
  266. package/dist/Panel/Panel.js +4 -1
  267. package/dist/Panel/Panel.js.map +1 -1
  268. package/dist/Popover/Popover.cjs +22 -3
  269. package/dist/Popover/Popover.cjs.map +1 -1
  270. package/dist/Popover/Popover.js +22 -3
  271. package/dist/Popover/Popover.js.map +1 -1
  272. package/dist/Popover/__tests__/Popover.test.tsx +64 -0
  273. package/dist/ProfileButton/ProfileButton.cjs +9 -2
  274. package/dist/ProfileButton/ProfileButton.cjs.map +1 -1
  275. package/dist/ProfileButton/ProfileButton.js +9 -2
  276. package/dist/ProfileButton/ProfileButton.js.map +1 -1
  277. package/dist/ProfileButton/__tests__/ProfileButton.test.tsx +31 -0
  278. package/dist/QuizButton/__tests__/QuizButton.test.tsx +53 -0
  279. package/dist/SegmentControl/SegmentControl.cjs +46 -11
  280. package/dist/SegmentControl/SegmentControl.cjs.map +1 -1
  281. package/dist/SegmentControl/SegmentControl.js +46 -11
  282. package/dist/SegmentControl/SegmentControl.js.map +1 -1
  283. package/dist/SegmentControl/__tests__/SegmentControl.test.tsx +145 -0
  284. package/dist/SideMenu/SideMenuHeader.cjs +12 -3
  285. package/dist/SideMenu/SideMenuHeader.cjs.map +1 -1
  286. package/dist/SideMenu/SideMenuHeader.js +12 -3
  287. package/dist/SideMenu/SideMenuHeader.js.map +1 -1
  288. package/dist/SideMenu/__tests__/SideMenu.test.tsx +99 -0
  289. package/dist/Switcher/SwitcherMenuItem.cjs +4 -1
  290. package/dist/Switcher/SwitcherMenuItem.cjs.map +1 -1
  291. package/dist/Switcher/SwitcherMenuItem.js +4 -1
  292. package/dist/Switcher/SwitcherMenuItem.js.map +1 -1
  293. package/dist/Switcher/__tests__/SwitcherMenuItem.tsx +14 -0
  294. package/dist/Table/TableFooter.cjs +8 -2
  295. package/dist/Table/TableFooter.cjs.map +1 -1
  296. package/dist/Table/TableFooter.js +8 -2
  297. package/dist/Table/TableFooter.js.map +1 -1
  298. package/dist/Table/TableStyles.cjs +132 -33
  299. package/dist/Table/TableStyles.cjs.map +1 -1
  300. package/dist/Table/TableStyles.js +132 -33
  301. package/dist/Table/TableStyles.js.map +1 -1
  302. package/dist/Table/__tests__/Table.test.tsx +499 -0
  303. package/dist/Tabs/HorizontalTabs.cjs +68 -18
  304. package/dist/Tabs/HorizontalTabs.cjs.map +1 -1
  305. package/dist/Tabs/HorizontalTabs.js +68 -18
  306. package/dist/Tabs/HorizontalTabs.js.map +1 -1
  307. package/dist/Tabs/TabLink.cjs +4 -1
  308. package/dist/Tabs/TabLink.cjs.map +1 -1
  309. package/dist/Tabs/TabLink.js +4 -1
  310. package/dist/Tabs/TabLink.js.map +1 -1
  311. package/dist/Tabs/__tests__/HorizontalTabs.test.tsx +95 -0
  312. package/dist/Tabs/__tests__/TabLink.test.tsx +40 -0
  313. package/dist/Tabs/__tests__/TabLink.tests.d.ts +1 -0
  314. package/dist/Tabs/__tests__/Tablist.test.tsx +37 -0
  315. package/dist/Tabs/__tests__/Tablist.tests.d.ts +2 -0
  316. package/dist/Tag/Tag.cjs +2 -2
  317. package/dist/Tag/Tag.cjs.map +1 -1
  318. package/dist/Tag/Tag.js +2 -2
  319. package/dist/Tag/Tag.js.map +1 -1
  320. package/dist/Tag/__tests__/Tag.test.tsx +86 -0
  321. package/dist/Tile/Tile.cjs +8 -2
  322. package/dist/Tile/Tile.cjs.map +1 -1
  323. package/dist/Tile/Tile.js +8 -2
  324. package/dist/Tile/Tile.js.map +1 -1
  325. package/dist/Tile/TileCommonItems.cjs +8 -2
  326. package/dist/Tile/TileCommonItems.cjs.map +1 -1
  327. package/dist/Tile/TileCommonItems.js +8 -2
  328. package/dist/Tile/TileCommonItems.js.map +1 -1
  329. package/dist/Tile/TileFooter.cjs +4 -1
  330. package/dist/Tile/TileFooter.cjs.map +1 -1
  331. package/dist/Tile/TileFooter.js +4 -1
  332. package/dist/Tile/TileFooter.js.map +1 -1
  333. package/dist/Tile/TileHeader.cjs +12 -3
  334. package/dist/Tile/TileHeader.cjs.map +1 -1
  335. package/dist/Tile/TileHeader.js +12 -3
  336. package/dist/Tile/TileHeader.js.map +1 -1
  337. package/dist/Toasters/Toast.cjs +62 -13
  338. package/dist/Toasters/Toast.cjs.map +1 -1
  339. package/dist/Toasters/Toast.js +62 -13
  340. package/dist/Toasters/Toast.js.map +1 -1
  341. package/dist/Toasters/__tests__/Toast.test.tsx +74 -0
  342. package/dist/Toggles/ToggleButton.cjs +9 -3
  343. package/dist/Toggles/ToggleButton.cjs.map +1 -1
  344. package/dist/Toggles/ToggleButton.d.ts +1 -1
  345. package/dist/Toggles/ToggleButton.js +9 -3
  346. package/dist/Toggles/ToggleButton.js.map +1 -1
  347. package/dist/Toggles/TogglerStyles.cjs +22 -8
  348. package/dist/Toggles/TogglerStyles.cjs.map +1 -1
  349. package/dist/Toggles/TogglerStyles.js +22 -8
  350. package/dist/Toggles/TogglerStyles.js.map +1 -1
  351. package/dist/Toggles/__tests__/ToggleButton.test.tsx +53 -0
  352. package/dist/Toggles/__tests__/ToggleSwitch.test.tsx +87 -0
  353. package/dist/Tooltips/TooltipStyles.cjs +28 -6
  354. package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
  355. package/dist/Tooltips/TooltipStyles.js +28 -6
  356. package/dist/Tooltips/TooltipStyles.js.map +1 -1
  357. package/dist/Tooltips/__tests__/TooltipWrapper.test.tsx +16 -0
  358. package/dist/common/InputStyling.cjs +30 -7
  359. package/dist/common/InputStyling.cjs.map +1 -1
  360. package/dist/common/InputStyling.js +30 -7
  361. package/dist/common/InputStyling.js.map +1 -1
  362. package/dist/common/Link.cjs +45 -0
  363. package/dist/common/Link.cjs.map +1 -0
  364. package/dist/common/Link.d.ts +9 -0
  365. package/dist/common/Link.js +37 -0
  366. package/dist/common/Link.js.map +1 -0
  367. package/dist/common/NavigationHelper.cjs +30 -0
  368. package/dist/common/NavigationHelper.cjs.map +1 -0
  369. package/dist/common/NavigationHelper.d.ts +4 -0
  370. package/dist/common/NavigationHelper.js +23 -0
  371. package/dist/common/NavigationHelper.js.map +1 -0
  372. package/dist/custom.d.ts +2 -0
  373. package/dist/styles/colors.cjs +439 -84
  374. package/dist/styles/colors.cjs.map +1 -1
  375. package/dist/styles/colors.d.ts +200 -11
  376. package/dist/styles/colors.js +439 -84
  377. package/dist/styles/colors.js.map +1 -1
  378. package/dist/styles/global.cjs +19 -2
  379. package/dist/styles/global.cjs.map +1 -1
  380. package/dist/styles/global.d.ts +3 -2
  381. package/dist/styles/global.js +18 -3
  382. package/dist/styles/global.js.map +1 -1
  383. package/dist/styles/index.cjs +21 -9
  384. package/dist/styles/index.cjs.map +1 -1
  385. package/dist/styles/index.d.ts +2 -2
  386. package/dist/styles/index.js +18 -6
  387. package/dist/styles/index.js.map +1 -1
  388. package/dist/styles/react-datepicker.css +766 -0
  389. package/dist/utils/color-tokens.cjs +91 -0
  390. package/dist/utils/color-tokens.cjs.map +1 -0
  391. package/dist/utils/color-tokens.d.ts +19 -0
  392. package/dist/utils/color-tokens.js +82 -0
  393. package/dist/utils/color-tokens.js.map +1 -0
  394. package/package.json +144 -141
@@ -1 +1 @@
1
- {"version":3,"file":"CardTopSection.js","names":["React","styled","useTheme","ComponentS","ComponentTextStyle","Checkbox","Tag","COLORS","ImageWithFallbacks","jsx","_jsx","jsxs","_jsxs","CardTopSectionImageContainer","div","CardTopSectionTagContainer","CardTopSectionContainer","props","disabled","CardTopSectionRibbonContainer","$backgroundColor","$color","CardTopSectionCheckboxContainer","getColor","theme","CardTopSection","forwardRef","_ref","ref","selected","setSelected","image","tagLabel","tagIcon","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","style","height","children","fallbacks","fallbackSrc","src","alt","loader","width","select","label","variant","icon","color","textStyle","Regular","propTypes","_pt","bool","func","string","node","shape","isRequired"],"sources":["../../../src/Card/VerticalCard/CardTopSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {ComponentS, ComponentTextStyle} from '../../styles/typography';\r\nimport Checkbox from '../../InputFields/Checkbox';\r\nimport {Tag, TagVariants} from '../../Tag';\r\n\r\nimport {COLORS} from '../../index';\r\nimport {ImageWithFallbacks} from \"../../Image\";\r\n\r\nexport interface CardTopSectionProps {\r\n /** Sets initial state of select Checkbox. */\r\n selected?: boolean;\r\n /** If this action is provided, then Checkbox will be shown on the top-right corner of the Card. */\r\n setSelected?: (arg0: boolean) => void;\r\n /** Label shown in the tag in the top-left corner of the Card. */\r\n tagLabel?: string;\r\n /** Icon shown in the tag in the top-left corner of the Card. */\r\n tagIcon?: React.ReactNode;\r\n /** Tag variant shown in the tag in the top-left corner of the Card. */\r\n tagVariant?: TagVariants;\r\n /** Text shown in the Ribbon, under the Image. */\r\n highlightRibbonText?: string;\r\n /** Icon shown in the Ribbon, under the Image. */\r\n highlightRibbonIcon?: React.ReactNode;\r\n /** Content color (text and image) of the Ribbon, under the Image. */\r\n highlightRibbonContentColor?: string;\r\n /** Background color of the Ribbon, shown under the Image. */\r\n highlightRibbonBgColor?: string;\r\n /** Details of the Image shown in the section. */\r\n image?: { src: string; fallbackSrc?: string; alt: string, height?: string; width?: string; loader?: boolean };\r\n /** This property is automatically set in the Card itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardTopSectionImageContainer = styled.div`\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n height: 100%;\r\n width: 100%;\r\n img{\r\n object-fit: cover;\r\n width: 100%;\r\n height: 100%;\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionTagContainer = styled.div`\r\n position: absolute;\r\n\r\n top: 16px;\r\n left: 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nexport const CardTopSectionContainer = styled.div<{ disabled?: boolean }>`\r\n position: relative;\r\n width: 100%;\r\n overflow: visible;\r\n\r\n ${props => props.disabled ? `\r\n img, svg {\r\n filter: grayscale(100%);\r\n }` : ''}\r\n`;\r\n\r\nexport const CardTopSectionRibbonContainer = styled.div<{ $color: string; $backgroundColor: string }>`\r\n min-height: calc(40px - 16px);\r\n background-color: ${props => props.$backgroundColor};\r\n width: calc(100% - 32px);\r\n position: absolute;\r\n bottom: 0px;\r\n left: 0px;\r\n padding: 8px 16px 8px 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n\r\n svg {\r\n color: ${props => props.$color};\r\n width: 24px;\r\n height: 24px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionCheckboxContainer = styled.div`\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 1;\r\n\r\n .checkbox-icon {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n`;\r\n\r\nconst CardTopSection = React.forwardRef(({\r\n selected,\r\n setSelected,\r\n image,\r\n tagLabel,\r\n tagIcon,\r\n tagVariant = 'positive',\r\n highlightRibbonIcon,\r\n highlightRibbonText,\r\n highlightRibbonContentColor,\r\n highlightRibbonBgColor,\r\n disabled\r\n }: CardTopSectionProps, ref: React.Ref<HTMLDivElement>) => {\r\n\r\n const theme = useTheme();\r\n return (\r\n <CardTopSectionContainer disabled={disabled} data-testid={'card-topSection'} style={{height: image?.height ?? 200}}>\r\n {\r\n image &&\r\n <CardTopSectionImageContainer>\r\n <ImageWithFallbacks fallbacks={image.fallbackSrc ?? ''} src={image.src} alt={image.alt} loader={image.loader ?? false} width={image.width} height={image.height}/>\r\n </CardTopSectionImageContainer>\r\n }\r\n {(!!selected || !!setSelected) && (\r\n <CardTopSectionCheckboxContainer data-testid={'card-topSection-checkbox'}>\r\n <Checkbox ref={ref}\r\n disabled={disabled}\r\n select={(selected: boolean) => setSelected && setSelected(selected)}\r\n selected={selected || false}/>\r\n </CardTopSectionCheckboxContainer>\r\n )}\r\n {(tagLabel || tagIcon) && (\r\n <CardTopSectionTagContainer>\r\n <Tag label={tagLabel} variant={tagVariant} icon={tagIcon}/>\r\n </CardTopSectionTagContainer>\r\n )}\r\n {(highlightRibbonIcon || highlightRibbonText) && (\r\n <CardTopSectionRibbonContainer data-testid={'card-topSection-ribbon'} $color={highlightRibbonContentColor ?? ''}\r\n $backgroundColor={disabled ? COLORS.getColor('neutral_300', theme) : highlightRibbonBgColor ?? ''}>\r\n {highlightRibbonIcon}\r\n {highlightRibbonText && (\r\n <ComponentS color={highlightRibbonContentColor ?? ''} textStyle={ComponentTextStyle.Regular}>\r\n {highlightRibbonText}\r\n </ComponentS>\r\n )}\r\n </CardTopSectionRibbonContainer>\r\n )}\r\n </CardTopSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardTopSection;\r\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SAAQC,UAAU,EAAEC,kBAAkB,QAAO,yBAAyB;AACtE,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,SAAQC,GAAG,QAAoB,WAAW;AAE1C,SAAQC,MAAM,QAAO,aAAa;AAClC,SAAQC,kBAAkB,QAAO,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA2B/C,OAAO,MAAMC,4BAA4B,GAAGZ,MAAM,CAACa,GAAG;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,0BAA0B,GAAGd,MAAM,CAACa,GAAG;AACpD;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAME,uBAAuB,GAAGf,MAAM,CAACa,GAA2B;AACzE;AACA;AACA;AACA;AACA,IAAIG,KAAK,IAAIA,K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EAAA2B,GAAA,CAAAC,IAAA;EAER3B,WAAW,EAAA0B,GAAA,CAAAE,IAAA;EAEX1B,QAAQ,EAAAwB,GAAA,CAAAG,MAAA;EAER1B,OAAO,EAAAuB,GAAA,CAAAI,IAAA;EAIPxB,mBAAmB,EAAAoB,GAAA,CAAAG,MAAA;EAEnBxB,mBAAmB,EAAAqB,GAAA,CAAAI,IAAA;EAEnBvB,2BAA2B,EAAAmB,GAAA,CAAAG,MAAA;EAE3BrB,sBAAsB,EAAAkB,GAAA,CAAAG,MAAA;EAEtB5B,KAAK,EAAAyB,GAAA,CAAAK,KAAA;IAAKjB,GAAG,EAAAY,GAAA,CAAAG,MAAA,CAAAG,UAAA;IAAUnB,WAAW,EAAAa,GAAA,CAAAG,MAAA;IAAWd,GAAG,EAAAW,GAAA,CAAAG,MAAA,CAAAG,UAAA;IAAUtB,MAAM,EAAAgB,GAAA,CAAAG,MAAA;IAAWZ,KAAK,EAAAS,GAAA,CAAAG,MAAA;IAAWb,MAAM,EAAAU,GAAA,CAAAC;EAAA;EAEjGvC,QAAQ,EAAAsC,GAAA,CAAAC;AAAA;AAwHV,eAAehC,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"CardTopSection.js","names":["React","styled","useTheme","ComponentS","ComponentTextStyle","Checkbox","Tag","COLORS","ImageWithFallbacks","jsx","_jsx","jsxs","_jsxs","CardTopSectionImageContainer","div","CardTopSectionTagContainer","CardTopSectionContainer","props","disabled","CardTopSectionRibbonContainer","$backgroundColor","$color","CardTopSectionCheckboxContainer","getColor","theme","CardTopSection","forwardRef","_ref","ref","selected","setSelected","image","tagLabel","tagIcon","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","style","height","children","fallbacks","fallbackSrc","src","alt","loader","width","select","label","variant","icon","generateToken","componentType","state","color","isOnFill","textStyle","Regular","propTypes","_pt","bool","func","string","node","shape","isRequired"],"sources":["../../../src/Card/VerticalCard/CardTopSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {ComponentS, ComponentTextStyle} from '../../styles/typography';\r\nimport Checkbox from '../../InputFields/Checkbox';\r\nimport {Tag, TagVariants} from '../../Tag';\r\n\r\nimport {COLORS} from '../../index';\r\nimport {ImageWithFallbacks} from \"../../Image\";\r\n\r\nexport interface CardTopSectionProps {\r\n /** Sets initial state of select Checkbox. */\r\n selected?: boolean;\r\n /** If this action is provided, then Checkbox will be shown on the top-right corner of the Card. */\r\n setSelected?: (arg0: boolean) => void;\r\n /** Label shown in the tag in the top-left corner of the Card. */\r\n tagLabel?: string;\r\n /** Icon shown in the tag in the top-left corner of the Card. */\r\n tagIcon?: React.ReactNode;\r\n /** Tag variant shown in the tag in the top-left corner of the Card. */\r\n tagVariant?: TagVariants;\r\n /** Text shown in the Ribbon, under the Image. */\r\n highlightRibbonText?: string;\r\n /** Icon shown in the Ribbon, under the Image. */\r\n highlightRibbonIcon?: React.ReactNode;\r\n /** Content color (text and image) of the Ribbon, under the Image. */\r\n highlightRibbonContentColor?: string;\r\n /** Background color of the Ribbon, shown under the Image. */\r\n highlightRibbonBgColor?: string;\r\n /** Details of the Image shown in the section. */\r\n image?: { src: string; fallbackSrc?: string; alt: string, height?: string; width?: string; loader?: boolean };\r\n /** This property is automatically set in the Card itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardTopSectionImageContainer = styled.div`\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n height: 100%;\r\n width: 100%;\r\n img{\r\n object-fit: cover;\r\n width: 100%;\r\n height: 100%;\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionTagContainer = styled.div`\r\n position: absolute;\r\n\r\n top: 16px;\r\n left: 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nexport const CardTopSectionContainer = styled.div<{ disabled?: boolean }>`\r\n position: relative;\r\n width: 100%;\r\n overflow: visible;\r\n\r\n ${props => props.disabled ? `\r\n img, svg {\r\n filter: grayscale(100%);\r\n }` : ''}\r\n`;\r\n\r\nexport const CardTopSectionRibbonContainer = styled.div<{ $color: string; $backgroundColor: string }>`\r\n min-height: calc(40px - 16px);\r\n background-color: ${props => props.$backgroundColor};\r\n width: calc(100% - 32px);\r\n position: absolute;\r\n bottom: 0px;\r\n left: 0px;\r\n padding: 8px 16px 8px 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n\r\n svg {\r\n color: ${props => props.$color};\r\n width: 24px;\r\n height: 24px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionCheckboxContainer = styled.div`\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 1;\r\n\r\n .checkbox-icon {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n`;\r\n\r\nconst CardTopSection = React.forwardRef(({\r\n selected,\r\n setSelected,\r\n image,\r\n tagLabel,\r\n tagIcon,\r\n tagVariant = 'positive',\r\n highlightRibbonIcon,\r\n highlightRibbonText,\r\n highlightRibbonContentColor,\r\n highlightRibbonBgColor,\r\n disabled\r\n }: CardTopSectionProps, ref: React.Ref<HTMLDivElement>) => {\r\n\r\n const theme = useTheme();\r\n return (\r\n <CardTopSectionContainer disabled={disabled} data-testid={'card-topSection'} style={{height: image?.height ?? 200}}>\r\n {\r\n image &&\r\n <CardTopSectionImageContainer>\r\n <ImageWithFallbacks fallbacks={image.fallbackSrc ?? ''} src={image.src} alt={image.alt} loader={image.loader ?? false} width={image.width} height={image.height}/>\r\n </CardTopSectionImageContainer>\r\n }\r\n {(!!selected || !!setSelected) && (\r\n <CardTopSectionCheckboxContainer data-testid={'card-topSection-checkbox'}>\r\n <Checkbox ref={ref}\r\n disabled={disabled}\r\n select={(selected: boolean) => setSelected && setSelected(selected)}\r\n selected={selected || false}/>\r\n </CardTopSectionCheckboxContainer>\r\n )}\r\n {(tagLabel || tagIcon) && (\r\n <CardTopSectionTagContainer>\r\n <Tag label={tagLabel} variant={tagVariant} icon={tagIcon}/>\r\n </CardTopSectionTagContainer>\r\n )}\r\n {(highlightRibbonIcon || highlightRibbonText) && (\r\n <CardTopSectionRibbonContainer data-testid={'card-topSection-ribbon'} $color={highlightRibbonContentColor ?? ''}\r\n $backgroundColor={disabled ? COLORS.generateToken({componentType:'bg-fill', state:'disabled'}, theme) : highlightRibbonBgColor ?? ''}>\r\n {highlightRibbonIcon}\r\n {highlightRibbonText && (\r\n <ComponentS color={disabled ? COLORS.generateToken({componentType:'text', isOnFill: true, state:'disabled'}, theme) : highlightRibbonContentColor ?? ''} textStyle={ComponentTextStyle.Regular}>\r\n {highlightRibbonText}\r\n </ComponentS>\r\n )}\r\n </CardTopSectionRibbonContainer>\r\n )}\r\n </CardTopSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardTopSection;\r\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SAAQC,UAAU,EAAEC,kBAAkB,QAAO,yBAAyB;AACtE,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,SAAQC,GAAG,QAAoB,WAAW;AAE1C,SAAQC,MAAM,QAAO,aAAa;AAClC,SAAQC,kBAAkB,QAAO,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA2B/C,OAAO,MAAMC,4BAA4B,GAAGZ,MAAM,CAACa,GAAG;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,0BAA0B,GAAGd,MAAM,CAACa,GAAG;AACpD;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAME,uBAAuB,GAAGf,MAAM,CAACa,GAA2B;AACzE;AACA;AACA;AACA;AACA,IAAIG,KAAK,IAAIA,K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BAA2B,IAAI,EAAG;QAACoB,SAAS,EAAErD,kBAAkB,CAACsD,OAAQ;QAAAjB,QAAA,EAC5LL;MAAmB,CACV,CACb;IAAA,CAC4B,CAChC;EAAA,CACsB,CAAC;AAE9B,CAAC,CAAC;AAACX,cAAA,CAAAkC,SAAA;EA1ID9B,QAAQ,EAAA+B,GAAA,CAAAC,IAAA;EAER/B,WAAW,EAAA8B,GAAA,CAAAE,IAAA;EAEX9B,QAAQ,EAAA4B,GAAA,CAAAG,MAAA;EAER9B,OAAO,EAAA2B,GAAA,CAAAI,IAAA;EAIP5B,mBAAmB,EAAAwB,GAAA,CAAAG,MAAA;EAEnB5B,mBAAmB,EAAAyB,GAAA,CAAAI,IAAA;EAEnB3B,2BAA2B,EAAAuB,GAAA,CAAAG,MAAA;EAE3BzB,sBAAsB,EAAAsB,GAAA,CAAAG,MAAA;EAEtBhC,KAAK,EAAA6B,GAAA,CAAAK,KAAA;IAAKrB,GAAG,EAAAgB,GAAA,CAAAG,MAAA,CAAAG,UAAA;IAAUvB,WAAW,EAAAiB,GAAA,CAAAG,MAAA;IAAWlB,GAAG,EAAAe,GAAA,CAAAG,MAAA,CAAAG,UAAA;IAAU1B,MAAM,EAAAoB,GAAA,CAAAG,MAAA;IAAWhB,KAAK,EAAAa,GAAA,CAAAG,MAAA;IAAWjB,MAAM,EAAAc,GAAA,CAAAC;EAAA;EAEjG3C,QAAQ,EAAA0C,GAAA,CAAAC;AAAA;AAwHV,eAAepC,cAAc","ignoreList":[]}
@@ -0,0 +1,146 @@
1
+ import React from 'react';
2
+ import { fireEvent, getByRole, render } from '../../test-utils';
3
+ import 'jest-styled-components';
4
+ import { Card } from '../..';
5
+ import { COLORS } from '../../styles';
6
+ import { SystemIcons } from '../../icons';
7
+
8
+ describe('<Card />',()=>{
9
+ it('renders top section', async () => {
10
+ const{getByTestId} = render(
11
+ <Card topSectionProps={{disabled: false}} disabled/>
12
+ );
13
+
14
+ expect(getByTestId('card-topSection')).toBeDefined();
15
+ //expect(getByTestId('card-middleSection')).toBeDefined();
16
+ });
17
+
18
+ it('renders middle section', async () => {
19
+ const{getByTestId} = render(
20
+ <Card middleSectionProps={{title:'title',disabled:false}} disabled/>
21
+ );
22
+
23
+ expect(getByTestId('card-middleSection')).toBeDefined();
24
+ });
25
+
26
+ it('renders bottom section', async () => {
27
+ const{getByTestId} = render(
28
+ <Card bottomSectionProps={{disabled:false}} disabled/>
29
+ );
30
+
31
+ expect(getByTestId('card-bottomSection')).toBeDefined();
32
+ });
33
+
34
+ it('fires card clicked event on click', async () => {
35
+ const cardClicked = jest.fn();
36
+ const{getByTestId} = render(
37
+ <Card bottomSectionProps={{disabled:false}} disabled={false} onCardClicked={cardClicked}/>
38
+ );
39
+
40
+ fireEvent.click(getByTestId('card-wrapper'));
41
+ expect(cardClicked).toBeCalledTimes(1);
42
+ });
43
+
44
+ it('fires card clicked event on keyDown', async () => {
45
+ const cardClicked = jest.fn();
46
+ const{getByTestId} = render(
47
+ <Card bottomSectionProps={{disabled:false}} disabled={false} onCardClicked={cardClicked}/>
48
+ );
49
+
50
+ fireEvent.keyDown(getByTestId('card-wrapper'), {key: 'Enter', code: 'Enter', charCode: 13});
51
+ expect(cardClicked).toBeCalledTimes(1);
52
+ });
53
+
54
+ it('renders tag in top section', async () => {
55
+ const{getByText} = render(
56
+ <Card topSectionProps={{disabled: false, tagLabel:'test_label'}} disabled/>
57
+ );
58
+
59
+ expect(getByText('test_label')).toBeDefined();
60
+ });
61
+
62
+ it('renders checkbox in top section', async () => {
63
+ const{getByTestId} = render(
64
+ <Card topSectionProps={{disabled: false, selected: true}} disabled/>
65
+ );
66
+
67
+ expect(getByTestId('card-topSection-checkbox')).toBeDefined();
68
+ });
69
+
70
+ it('renders highlight ribbon in top section', async () => {
71
+ const{getByTestId, getByText} = render(
72
+ <Card topSectionProps={{disabled: false, highlightRibbonText:'testRibbon', highlightRibbonBgColor:'red'}} disabled={false}/>
73
+ );
74
+
75
+ expect(getByText('testRibbon')).toBeDefined();
76
+ expect(getByTestId('card-topSection-ribbon')).toHaveStyleRule('background-color','red');
77
+ });
78
+
79
+ it('renders title ,description and category label in middle section', async () => {
80
+ const{getByText} = render(
81
+ <Card middleSectionProps={{title:'testTitle', disabled: false, description:'testDescription', categoryLabel:'testCatLabel'}} disabled={false}/>
82
+ );
83
+
84
+ expect(getByText('testTitle')).toBeDefined();
85
+ expect(getByText('testDescription')).toBeDefined();
86
+ expect(getByText('testCatLabel')).toBeDefined();
87
+ });
88
+
89
+ it('renders tags in middle section', async () => {
90
+ const{getByText} = render(
91
+ <Card middleSectionProps={{title:'testTitle', disabled: false, tags:[{label:'testTag'}], row2Tags:[{label:'testTag2'}]}} disabled={false}/>
92
+ );
93
+
94
+ expect(getByText('testTitle')).toBeDefined();
95
+ expect(getByText('testTag2')).toBeDefined();
96
+ });
97
+
98
+ it('renders note text in bottom section', async () => {
99
+ const{getByText} = render(
100
+ <Card bottomSectionProps={{disabled: false, noteLeft:'leftNote', noteRight:'rightNote'}} disabled={false}/>
101
+ );
102
+
103
+ expect(getByText('leftNote')).toBeDefined();
104
+ expect(getByText('rightNote')).toBeDefined();
105
+ });
106
+
107
+ it('renders author in bottom section', async () => {
108
+ const{getByText,getByTestId} = render(
109
+ <Card bottomSectionProps={{disabled: true, authorName:'testAuthor'}} disabled={true}/>
110
+ );
111
+
112
+ expect(getByText('testAuthor')).toBeDefined();
113
+ expect(getByTestId('card-bottomSection-author')).toBeDefined();
114
+ });
115
+
116
+ it('renders actions in bottom section', async () => {
117
+ const{getByText,getByTestId} = render(
118
+ <Card bottomSectionProps={{disabled: true, authorName:'testAuthor', actions:[{icon:<SystemIcons.Add/>,onClick:()=>{}}]}} disabled={true}/>
119
+ );
120
+
121
+ expect(getByText('testAuthor')).toBeDefined();
122
+ expect(getByTestId('card-bottomSection-author')).toBeDefined();
123
+ });
124
+
125
+ it('fires leftButton click event on click', async () => {
126
+ const leftButtonClicked = jest.fn();
127
+ const{getByRole} = render(
128
+ <Card bottomSectionProps={{disabled: true,
129
+ authorName:'testAuthor',
130
+ actions:[],
131
+ leftButton: {
132
+ variant: 'tertiary',
133
+ buttonText: 'button',
134
+ onClick: (e) => {
135
+ e.stopPropagation();
136
+ leftButtonClicked();
137
+ }
138
+ }
139
+ }}
140
+ disabled={true}/>
141
+ );
142
+
143
+ fireEvent.click(getByRole('button'));
144
+ expect(leftButtonClicked).toBeCalledTimes(1);
145
+ });
146
+ })
@@ -149,7 +149,10 @@ const ChipContainer = exports.ChipContainer = _styledComponents.default.div`
149
149
  }
150
150
 
151
151
  &.outline {
152
- color: ${props => _styles.COLORS.getColor('neutral_600', props.theme)};
152
+ color: ${props => _styles.COLORS.generateToken({
153
+ componentType: 'text',
154
+ defaultVariant: 'subtle'
155
+ }, props.theme)};
153
156
 
154
157
  ${ChipContent} {
155
158
  background-color: ${props => _styles.COLORS.getColor('white', props.theme)};
@@ -1 +1 @@
1
- {"version":3,"file":"ChipStyles.cjs","names":["_styledComponents","_interopRequireDefault","require","_styles","ChipContentContainer","exports","styled","div","ChipContent","ComponentXSStyling","ComponentTextStyle","Bold","ChipContainer","ComponentSStyling","ComponentMStyling","focusStyles","props","COLORS","getColor","theme"],"sources":["../../src/Chips/ChipStyles.ts"],"sourcesContent":["/**\r\n * Import third-party libraries.\r\n */\r\nimport styled from 'styled-components';\r\n\r\n/**\r\n * Import custom style properties.\r\n */\r\nimport { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, focusStyles } from '../styles';\r\n\r\nexport const ChipContentContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n min-height: 48px;\r\n width: max-content;\r\n`;\r\n\r\nexport const ChipContent = styled.div`\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n\r\n position: relative;\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n min-height: 24px;\r\n box-sizing: border-box;\r\n border-radius: 24px;\r\n padding: 4px 12px;\r\n\r\n .chip-icon {\r\n height: 16px;\r\n width: 16px;\r\n border-radius: 50%;\r\n\r\n svg {\r\n height: 16px;\r\n width: 16px;\r\n }\r\n }\r\n\r\n .icon-left {\r\n margin-left: -4px;\r\n }\r\n\r\n .icon-right {\r\n margin-right: -4px;\r\n }\r\n\r\n .action-right {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n width: 48px;\r\n right: -8px;\r\n }\r\n\r\n &.with-action-right {\r\n position: relative;\r\n padding-right: 28px;\r\n }\r\n`;\r\n\r\nexport const ChipContainer = styled.div`\r\n display: inline-block;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n &.medium {\r\n ${ChipContent} {\r\n gap: 6px;\r\n padding: 10px 16px;\r\n\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 20px;\r\n width: 20px;\r\n\r\n svg {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 38px;\r\n\r\n .action-right {\r\n right: -2px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n ${ChipContent} {\r\n gap: 8px;\r\n padding: 12px 20px;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 24px;\r\n width: 24px;\r\n\r\n svg {\r\n height: 24px;\r\n width: 24px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 48px;\r\n\r\n .action-right {\r\n right: 4px;\r\n }\r\n }\r\n }\r\n\r\n &.interactive:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &.default {\r\n color: ${props => COLORS.getColor('white', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_500', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.outline {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_200', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_300', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n box-shadow: none;\r\n }\r\n }\r\n\r\n //account for border\r\n &.small.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 2px 10px;\r\n }\r\n }\r\n\r\n &.medium.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 8px 14px;\r\n }\r\n }\r\n\r\n &.large.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 10px 18px;\r\n }\r\n }\r\n\r\n &.invalid {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:active:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n }\r\n\r\n .action-right:focus {\r\n ${focusStyles}\r\n }\r\n\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n\r\n &.invalid {\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n ${ChipContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n ${ChipContent} {\r\n border: none !important;\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)} !important;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n"],"mappings":";;;;;;;AAGA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,MAAME,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAGE,yBAAM,CAACC,GAAG;AAC9C;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,WAAW,GAAAH,OAAA,CAAAG,WAAA,GAAGF,yBAAM,CAACC,GAAG;AACrC,IAAI,IAAAE,0BAAkB,EAACC,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,aAAa,GAAAP,OAAA,CAAAO,aAAA,GAAGN,yBAAM,CAACC,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW;AACjB;AACA;AACA;AACA,QAAQ,IAAAK,yBAAiB,EAACH,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMH,WAAW;AACjB;AACA;AACA;AACA,QAAQ,IAAAM,yBAAiB,EAACJ,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,mBAAW;AACjB;AACA;AACA;AACA,aAAaC,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,OAAO,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC3D;AACA,MAAMX,WAAW;AACjB,0BAA0BQ,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E;AACA;AACA;AACA;AACA,MAAMX,WAAW;AACjB,0BAA0BQ,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E;AACA;AACA;AACA;AACA,MAAMX,WAAW;AACjB,0BAA0BQ,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E;AACA;AACA;AACA;AACA,aAAaH,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAA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,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,MAAMf,oBAAoB;AAC1B;AACA;AACA;AACA,MAAMI,WAAW;AACjB;AACA,0BAA0BQ,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E,eAAeH,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AACnE;AACA;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ChipStyles.cjs","names":["_styledComponents","_interopRequireDefault","require","_styles","ChipContentContainer","exports","styled","div","ChipContent","ComponentXSStyling","ComponentTextStyle","Bold","ChipContainer","ComponentSStyling","ComponentMStyling","focusStyles","props","COLORS","getColor","theme","generateToken","componentType","defaultVariant"],"sources":["../../src/Chips/ChipStyles.ts"],"sourcesContent":["/**\r\n * Import third-party libraries.\r\n */\r\nimport styled from 'styled-components';\r\n\r\n/**\r\n * Import custom style properties.\r\n */\r\nimport { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, focusStyles } from '../styles';\r\n\r\nexport const ChipContentContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n min-height: 48px;\r\n width: max-content;\r\n`;\r\n\r\nexport const ChipContent = styled.div`\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n\r\n position: relative;\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n min-height: 24px;\r\n box-sizing: border-box;\r\n border-radius: 24px;\r\n padding: 4px 12px;\r\n\r\n .chip-icon {\r\n height: 16px;\r\n width: 16px;\r\n border-radius: 50%;\r\n\r\n svg {\r\n height: 16px;\r\n width: 16px;\r\n }\r\n }\r\n\r\n .icon-left {\r\n margin-left: -4px;\r\n }\r\n\r\n .icon-right {\r\n margin-right: -4px;\r\n }\r\n\r\n .action-right {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n width: 48px;\r\n right: -8px;\r\n }\r\n\r\n &.with-action-right {\r\n position: relative;\r\n padding-right: 28px;\r\n }\r\n`;\r\n\r\nexport const ChipContainer = styled.div`\r\n display: inline-block;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n &.medium {\r\n ${ChipContent} {\r\n gap: 6px;\r\n padding: 10px 16px;\r\n\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 20px;\r\n width: 20px;\r\n\r\n svg {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 38px;\r\n\r\n .action-right {\r\n right: -2px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n ${ChipContent} {\r\n gap: 8px;\r\n padding: 12px 20px;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 24px;\r\n width: 24px;\r\n\r\n svg {\r\n height: 24px;\r\n width: 24px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 48px;\r\n\r\n .action-right {\r\n right: 4px;\r\n }\r\n }\r\n }\r\n\r\n &.interactive:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &.default {\r\n color: ${props => COLORS.getColor('white', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_500', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.outline {\r\n color: ${props => COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_200', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_300', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n box-shadow: none;\r\n }\r\n }\r\n\r\n //account for border\r\n &.small.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 2px 10px;\r\n }\r\n }\r\n\r\n &.medium.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 8px 14px;\r\n }\r\n }\r\n\r\n &.large.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 10px 18px;\r\n }\r\n }\r\n\r\n &.invalid {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:active:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n }\r\n\r\n .action-right:focus {\r\n ${focusStyles}\r\n }\r\n\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n\r\n &.invalid {\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n ${ChipContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n ${ChipContent} {\r\n border: none !important;\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)} !important;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n"],"mappings":";;;;;;;AAGA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,MAAME,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAGE,yBAAM,CAACC,GAAG;AAC9C;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,WAAW,GAAAH,OAAA,CAAAG,WAAA,GAAGF,yBAAM,CAACC,GAAG;AACrC,IAAI,IAAAE,0BAAkB,EAACC,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AA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A;AACA;AACA;AACA;AACA,MAAMf,oBAAoB;AAC1B;AACA;AACA;AACA,MAAMI,WAAW;AACjB;AACA,0BAA0BQ,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E,eAAeH,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AACnE;AACA;AACA,CAAC","ignoreList":[]}
@@ -141,7 +141,10 @@ export const ChipContainer = styled.div`
141
141
  }
142
142
 
143
143
  &.outline {
144
- color: ${props => COLORS.getColor('neutral_600', props.theme)};
144
+ color: ${props => COLORS.generateToken({
145
+ componentType: 'text',
146
+ defaultVariant: 'subtle'
147
+ }, props.theme)};
145
148
 
146
149
  ${ChipContent} {
147
150
  background-color: ${props => COLORS.getColor('white', props.theme)};
@@ -1 +1 @@
1
- {"version":3,"file":"ChipStyles.js","names":["styled","COLORS","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","focusStyles","ChipContentContainer","div","ChipContent","Bold","ChipContainer","props","getColor","theme"],"sources":["../../src/Chips/ChipStyles.ts"],"sourcesContent":["/**\r\n * Import third-party libraries.\r\n */\r\nimport styled from 'styled-components';\r\n\r\n/**\r\n * Import custom style properties.\r\n */\r\nimport { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, focusStyles } from '../styles';\r\n\r\nexport const ChipContentContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n min-height: 48px;\r\n width: max-content;\r\n`;\r\n\r\nexport const ChipContent = styled.div`\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n\r\n position: relative;\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n min-height: 24px;\r\n box-sizing: border-box;\r\n border-radius: 24px;\r\n padding: 4px 12px;\r\n\r\n .chip-icon {\r\n height: 16px;\r\n width: 16px;\r\n border-radius: 50%;\r\n\r\n svg {\r\n height: 16px;\r\n width: 16px;\r\n }\r\n }\r\n\r\n .icon-left {\r\n margin-left: -4px;\r\n }\r\n\r\n .icon-right {\r\n margin-right: -4px;\r\n }\r\n\r\n .action-right {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n width: 48px;\r\n right: -8px;\r\n }\r\n\r\n &.with-action-right {\r\n position: relative;\r\n padding-right: 28px;\r\n }\r\n`;\r\n\r\nexport const ChipContainer = styled.div`\r\n display: inline-block;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n &.medium {\r\n ${ChipContent} {\r\n gap: 6px;\r\n padding: 10px 16px;\r\n\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 20px;\r\n width: 20px;\r\n\r\n svg {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 38px;\r\n\r\n .action-right {\r\n right: -2px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n ${ChipContent} {\r\n gap: 8px;\r\n padding: 12px 20px;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 24px;\r\n width: 24px;\r\n\r\n svg {\r\n height: 24px;\r\n width: 24px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 48px;\r\n\r\n .action-right {\r\n right: 4px;\r\n }\r\n }\r\n }\r\n\r\n &.interactive:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &.default {\r\n color: ${props => COLORS.getColor('white', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_500', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.outline {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_200', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_300', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n box-shadow: none;\r\n }\r\n }\r\n\r\n //account for border\r\n &.small.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 2px 10px;\r\n }\r\n }\r\n\r\n &.medium.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 8px 14px;\r\n }\r\n }\r\n\r\n &.large.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 10px 18px;\r\n }\r\n }\r\n\r\n &.invalid {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:active:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n }\r\n\r\n .action-right:focus {\r\n ${focusStyles}\r\n }\r\n\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n\r\n &.invalid {\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n ${ChipContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n ${ChipContent} {\r\n border: none !important;\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)} !important;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,mBAAmB;;AAEtC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAEC,kBAAkB,EAAEC,WAAW,QAAQ,WAAW;AAE7H,OAAO,MAAMC,oBAAoB,GAAGP,MAAM,CAACQ,GAAG;AAC9C;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,WAAW,GAAGT,MAAM,CAACQ,GAAG;AACrC,IAAIH,kBAAkB,CAACD,kBAAkB,CAACM,IAAI,EAAE,IAAI,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,aAAa,GAAGX,MAAM,CAACQ,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW;AACjB;AACA;AACA;AACA,QAAQN,iBAAiB,CAACC,kBAAkB,CAACM,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMD,WAAW;AACjB;AACA;AACA;AACA,QAAQP,iBAAiB,CAACE,kBAAkB,CAACM,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMJ,WAAW;AACjB;AACA;AACA;AACA,aAAaM,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,OAAO,EAAED,KAAK,CAACE,KAAK,CAAC;AAC3D;AACA,MAAML,WAAW;AACjB,0BAA0BG,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E;AACA;AACA;AACA;AACA,MAAML,WAAW;AACjB,0BAA0BG,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E;AACA;AACA;AACA;AACA,MAAML,WAAW;AACjB,0BAA0BG,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E;AACA;AACA;AACA;AACA,aAAaF,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AACjE;AACA,MAAML,WAAW;AACjB,0BAA0BG,KAAK,IAAIX,MAA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B;AACA;AACA;AACA,MAAME,WAAW;AACjB;AACA,0BAA0BG,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E,eAAeF,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AACnE;AACA;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ChipStyles.js","names":["styled","COLORS","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","focusStyles","ChipContentContainer","div","ChipContent","Bold","ChipContainer","props","getColor","theme","generateToken","componentType","defaultVariant"],"sources":["../../src/Chips/ChipStyles.ts"],"sourcesContent":["/**\r\n * Import third-party libraries.\r\n */\r\nimport styled from 'styled-components';\r\n\r\n/**\r\n * Import custom style properties.\r\n */\r\nimport { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, focusStyles } from '../styles';\r\n\r\nexport const ChipContentContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n min-height: 48px;\r\n width: max-content;\r\n`;\r\n\r\nexport const ChipContent = styled.div`\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n\r\n position: relative;\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n min-height: 24px;\r\n box-sizing: border-box;\r\n border-radius: 24px;\r\n padding: 4px 12px;\r\n\r\n .chip-icon {\r\n height: 16px;\r\n width: 16px;\r\n border-radius: 50%;\r\n\r\n svg {\r\n height: 16px;\r\n width: 16px;\r\n }\r\n }\r\n\r\n .icon-left {\r\n margin-left: -4px;\r\n }\r\n\r\n .icon-right {\r\n margin-right: -4px;\r\n }\r\n\r\n .action-right {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n width: 48px;\r\n right: -8px;\r\n }\r\n\r\n &.with-action-right {\r\n position: relative;\r\n padding-right: 28px;\r\n }\r\n`;\r\n\r\nexport const ChipContainer = styled.div`\r\n display: inline-block;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n &.medium {\r\n ${ChipContent} {\r\n gap: 6px;\r\n padding: 10px 16px;\r\n\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 20px;\r\n width: 20px;\r\n\r\n svg {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 38px;\r\n\r\n .action-right {\r\n right: -2px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n ${ChipContent} {\r\n gap: 8px;\r\n padding: 12px 20px;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 24px;\r\n width: 24px;\r\n\r\n svg {\r\n height: 24px;\r\n width: 24px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 48px;\r\n\r\n .action-right {\r\n right: 4px;\r\n }\r\n }\r\n }\r\n\r\n &.interactive:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &.default {\r\n color: ${props => COLORS.getColor('white', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_500', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.outline {\r\n color: ${props => COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_200', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_300', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n box-shadow: none;\r\n }\r\n }\r\n\r\n //account for border\r\n &.small.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 2px 10px;\r\n }\r\n }\r\n\r\n &.medium.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 8px 14px;\r\n }\r\n }\r\n\r\n &.large.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 10px 18px;\r\n }\r\n }\r\n\r\n &.invalid {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:active:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n }\r\n\r\n .action-right:focus {\r\n ${focusStyles}\r\n }\r\n\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n\r\n &.invalid {\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n ${ChipContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n ${ChipContent} {\r\n border: none !important;\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)} !important;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,mBAAmB;;AAEtC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAEC,kBAAkB,EAAEC,WAAW,QAAQ,WAAW;AAE7H,OAAO,MAAMC,oBAAoB,GAAGP,MAAM,CAACQ,GAAG;AAC9C;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,WAAW,GAAGT,MAAM,CAACQ,GAAG;AACrC,IAAIH,kBAAkB,CAACD,kBAAkB,CAACM,IAAI,EAAE,IAAI,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,aAAa,GAAGX,MAAM,CAACQ,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW;AACjB;AACA;AACA;AACA,QAAQN,iBAAiB,CAACC,kBAAkB,CAACM,IAAI,EAAE,IAAI,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E;AACA;AACA,CAAC","ignoreList":[]}
@@ -0,0 +1,94 @@
1
+ import * as React from 'react';
2
+ import {ActionChip} from '../index';
3
+ import {act, fireEvent, render} from '../../test-utils';
4
+ import { SystemIcons } from '../../icons';
5
+
6
+ describe('ActionChip', () => {
7
+
8
+ it('should render', () => {
9
+ const wrapper = render(<ActionChip text={'label'}/>);
10
+
11
+ expect(wrapper.queryByText('label')).toBeInTheDocument();
12
+ });
13
+
14
+ it('should render icon', () => {
15
+ const wrapper = render(<ActionChip text={'label'} icon={<SystemIcons.Book/>}/>);
16
+
17
+ expect(wrapper.queryByLabelText('Book')).toBeInTheDocument();
18
+ });
19
+
20
+ it('should be focusable if it is not disabled and onClick is defined', () => {
21
+ const wrapper = render(<ActionChip text={'label'} icon={<SystemIcons.Book/>} onClick={jest.fn()}/>);
22
+
23
+ expect(wrapper.container.querySelector('[tabindex="0"]')).toBeInTheDocument();
24
+ });
25
+
26
+ it('should not be focusable if it is disabled', () => {
27
+ const wrapper = render(<ActionChip text={'label'} icon={<SystemIcons.Book/>} disabled={true} onClick={jest.fn()}/>);
28
+
29
+ expect(wrapper.container.querySelector('[tabindex="-1"]')).toBeInTheDocument();
30
+ });
31
+
32
+ it('should not be focusable if it is not interactive', () => {
33
+ const wrapper = render(<ActionChip text={'label'} icon={<SystemIcons.Book/>}/>);
34
+
35
+ expect(wrapper.container.querySelector('[tabindex="-1"]')).toBeInTheDocument();
36
+ });
37
+
38
+ it('should call onClick when its clicked', () => {
39
+ const onClickSpy = jest.fn();
40
+ const wrapper = render(<ActionChip text={'label'} icon={<SystemIcons.Book/>} onClick={onClickSpy}/>);
41
+
42
+ act(() => {
43
+ wrapper.getByText('label').click();
44
+ });
45
+
46
+ expect(onClickSpy).toHaveBeenCalled();
47
+ });
48
+
49
+ it('should call onClick when Enter is pressed', () => {
50
+ const onClickSpy = jest.fn();
51
+ const wrapper = render(<ActionChip text={'label'} icon={<SystemIcons.Book/>} onClick={onClickSpy}/>);
52
+
53
+ act(() => {
54
+ fireEvent.keyDown(wrapper.getByText('label'), {key: 'Enter', code: 'Enter'});
55
+ });
56
+
57
+ expect(onClickSpy).toHaveBeenCalled();
58
+ });
59
+
60
+ it('should call onClick when Space is pressed', () => {
61
+ const onClickSpy = jest.fn();
62
+ const wrapper = render(<ActionChip text={'label'} icon={<SystemIcons.Book/>} onClick={onClickSpy}/>);
63
+
64
+ act(() => {
65
+ fireEvent.keyDown(wrapper.getByText('label'), {key: ' '});
66
+ });
67
+
68
+ expect(onClickSpy).toHaveBeenCalled();
69
+ });
70
+
71
+ it('should not call onClick when its clicked if disabled', () => {
72
+ const onClickSpy = jest.fn();
73
+ const wrapper = render(<ActionChip text={'label'} icon={<SystemIcons.Book/>} disabled={true} onClick={onClickSpy}/>);
74
+
75
+ act(() => {
76
+ wrapper.getByText('label').click();
77
+ });
78
+
79
+ expect(onClickSpy).not.toHaveBeenCalled();
80
+ });
81
+
82
+ it('should not call onClick when Enter is pressed if disabled', () => {
83
+ const onClickSpy = jest.fn();
84
+ const wrapper = render(<ActionChip text={'label'} icon={<SystemIcons.Book/>} disabled={true} onClick={onClickSpy}/>);
85
+
86
+ act(() => {
87
+ fireEvent.keyDown(wrapper.getByText('label'), {key: 'Enter', code: 'Enter'});
88
+ });
89
+
90
+ expect(onClickSpy).not.toHaveBeenCalled();
91
+ });
92
+
93
+
94
+ });
@@ -0,0 +1,79 @@
1
+ import * as React from 'react';
2
+ import {ChoiceChips} from '../index';
3
+ import {render, act, fireEvent} from '../../test-utils';
4
+
5
+
6
+
7
+
8
+ describe('ChoiceChips', () => {
9
+
10
+ it('should render chips', () => {
11
+
12
+ const wrapper = render(<ChoiceChips selected={'1'}
13
+ values={[{value: '1', label: 'label'}, {value: '2', label: 'label 2'}]}/>);
14
+
15
+ expect(wrapper.queryAllByRole('radio')).toHaveLength(2);
16
+ expect(wrapper.queryByText('label')).toBeInTheDocument();
17
+ expect(wrapper.queryByText('label 2')).toBeInTheDocument();
18
+ });
19
+
20
+ it('should call onClick when chip is clicked', () => {
21
+ const onClickSpy = jest.fn();
22
+
23
+ const wrapper = render(<ChoiceChips selected={'1'}
24
+ onClick={onClickSpy}
25
+ values={[{value: '1', label: 'label'}, {value: '2', label: 'label 2'}]}/>);
26
+
27
+ act(() => {
28
+ wrapper.getByText('label 2').click()
29
+ });
30
+
31
+ expect(onClickSpy).toHaveBeenCalledWith({value: '2', label: 'label 2'});
32
+ });
33
+
34
+ it('should call onClick when enter is pressed on focused chip', () => {
35
+ const onClickSpy = jest.fn();
36
+
37
+ const wrapper = render(<ChoiceChips selected={'1'}
38
+ onClick={onClickSpy}
39
+ values={[{value: '1', label: 'label'}, {value: '2', label: 'label 2'}]}/>);
40
+
41
+ act(() => {
42
+ fireEvent.keyDown(wrapper.getByText('label 2'), {key: 'Enter', code: 'Enter'});
43
+ });
44
+
45
+ expect(onClickSpy).toHaveBeenCalledWith({value: '2', label: 'label 2'});
46
+ });
47
+
48
+ it('should not call onClick when chip is clicked if its disabled', () => {
49
+ const onClickSpy = jest.fn();
50
+
51
+ const wrapper = render(<ChoiceChips selected={'1'}
52
+ disabled={true}
53
+ onClick={onClickSpy}
54
+ values={[{value: '1', label: 'label'}, {value: '2', label: 'label 2'}]}/>);
55
+
56
+ act(() => {
57
+ wrapper.getByText('label 2').click()
58
+ });
59
+
60
+ expect(onClickSpy).not.toHaveBeenCalled();
61
+ });
62
+
63
+ it('should render selected chip with default class others with outline class', () => {
64
+ const onClickSpy = jest.fn();
65
+
66
+ const wrapper = render(<ChoiceChips selected={'1'}
67
+ onClick={onClickSpy}
68
+ values={[{value: '1', label: 'label'}, {value: '2', label: 'label 2'}]}/>);
69
+
70
+
71
+ act(() => {
72
+ wrapper.getByText('label 2').click()
73
+ });
74
+
75
+ expect(wrapper.queryAllByRole('radio')[0]).toHaveClass('outline');
76
+ expect(wrapper.queryAllByRole('radio')[1]).toHaveClass('default')
77
+ });
78
+
79
+ })
@@ -0,0 +1,95 @@
1
+ import * as React from 'react';
2
+ import {FilterChip} from '../index';
3
+ import {act, fireEvent, render} from '../../test-utils';
4
+
5
+
6
+
7
+
8
+ describe('FilterChip', () => {
9
+
10
+ it('should render', () => {
11
+ const wrapper = render(<FilterChip selected={false} text={'label'}/>);
12
+
13
+ expect(wrapper.queryByText('label')).toBeInTheDocument();
14
+ });
15
+
16
+ it('should render icon when selected', () => {
17
+ const wrapper = render(<FilterChip selected={true} text={'label'}/>);
18
+
19
+ expect(wrapper.queryByLabelText('Checkmark')).toBeInTheDocument();
20
+ });
21
+
22
+ it('should be focusable if it is not disabled and onClick is defined', () => {
23
+ const wrapper = render(<FilterChip selected={false} text={'label'} onClick={jest.fn()}/>);
24
+
25
+ expect(wrapper.container.querySelector('[tabindex="0"]')).toBeInTheDocument();
26
+ });
27
+
28
+ it('should not be focusable if it is disabled', () => {
29
+ const wrapper = render(<FilterChip selected={false} text={'label'} disabled={true} onClick={jest.fn()}/>);
30
+
31
+ expect(wrapper.container.querySelector('[tabindex="-1"]')).toBeInTheDocument();
32
+ });
33
+
34
+ it('should not be focusable if it is not interactive', () => {
35
+ const wrapper = render(<FilterChip selected={false} text={'label'}/>);
36
+
37
+ expect(wrapper.container.querySelector('[tabindex="-1"]')).toBeInTheDocument();
38
+ });
39
+
40
+ it('should call onClick when its clicked', () => {
41
+ const onClickSpy = jest.fn();
42
+ const wrapper = render(<FilterChip selected={false} text={'label'} onClick={onClickSpy}/>);
43
+
44
+ act(() => {
45
+ wrapper.getByText('label').click();
46
+ });
47
+
48
+ expect(onClickSpy).toHaveBeenCalled();
49
+ });
50
+
51
+ it('should call onClick when Enter is pressed', () => {
52
+ const onClickSpy = jest.fn();
53
+ const wrapper = render(<FilterChip selected={false} text={'label'} onClick={onClickSpy}/>);
54
+
55
+ act(() => {
56
+ fireEvent.keyDown(wrapper.getByText('label'), {key: 'Enter', code: 'Enter'});
57
+ });
58
+
59
+ expect(onClickSpy).toHaveBeenCalled();
60
+ });
61
+
62
+ it('should call onClick when Space is pressed', () => {
63
+ const onClickSpy = jest.fn();
64
+ const wrapper = render(<FilterChip selected={false} text={'label'} onClick={onClickSpy}/>);
65
+
66
+ act(() => {
67
+ fireEvent.keyDown(wrapper.getByText('label'), {key: ' ', code: 'Space'});
68
+ });
69
+
70
+ expect(onClickSpy).toHaveBeenCalled();
71
+ });
72
+
73
+ it('should not call onClick when its clicked if disabled', () => {
74
+ const onClickSpy = jest.fn();
75
+ const wrapper = render(<FilterChip selected={false} text={'label'} disabled={true} onClick={onClickSpy}/>);
76
+
77
+ act(() => {
78
+ wrapper.getByText('label').click();
79
+ });
80
+
81
+ expect(onClickSpy).not.toHaveBeenCalled();
82
+ });
83
+
84
+ it('should not call onClick when Enter is pressed if disabled', () => {
85
+ const onClickSpy = jest.fn();
86
+ const wrapper = render(<FilterChip selected={false} text={'label'} disabled={true} onClick={onClickSpy}/>);
87
+
88
+ act(() => {
89
+ fireEvent.keyDown(wrapper.getByText('label'), {key: 'Enter', code: 'Enter'});
90
+ });
91
+
92
+ expect(onClickSpy).not.toHaveBeenCalled();
93
+ });
94
+
95
+ });