@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,9 +1,14 @@
1
1
  import * as React from 'react';
2
- import { LinearProgressType } from '../../index';
2
+ import { LinearProgressType, Size } from '../../index';
3
+ import { ButtonProps } from '../../Button';
3
4
  export interface ActionItem {
4
5
  icon: React.ReactNode;
5
6
  onClick: () => void;
6
7
  }
8
+ export type CardStandardButton = Pick<ButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {
9
+ buttonText: string;
10
+ size?: Size.Small | Size.Medium | Size.Large;
11
+ };
7
12
  export interface CardBottomSectionProps {
8
13
  /** Optional. Current progress level shown in the progress bar. */
9
14
  progressLevel?: number;
@@ -19,6 +24,8 @@ export interface CardBottomSectionProps {
19
24
  noteRight?: string;
20
25
  /** Optional. Note icon shown on the right side of the section. */
21
26
  noteRightIcon?: React.ReactNode;
27
+ /** Optional. Note icon/Hyperlink/button shown on the left side of the section. */
28
+ leftButton?: CardStandardButton;
22
29
  /** Author name shown at the bottom-left part of the section. */
23
30
  authorName?: string;
24
31
  /** Array of actions shown on the bottom-right corner of the section. */
@@ -1,8 +1,13 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
1
3
  import _pt from "prop-types";
4
+ const _excluded = ["buttonText"];
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2
7
  import * as React from 'react';
3
8
  import styled, { useTheme } from 'styled-components';
4
9
  import { COLORS, ComponentTextStyle, ComponentXXS, LinearProgress, LinearProgressType, LinearProgressVariant, Size } from '../../index';
5
- import { IconButton } from '../../Button';
10
+ import { Button, IconButton } from '../../Button';
6
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
12
  export const CardBottomSectionProgressStyles = styled.div`
8
13
  padding: 8px 0;
@@ -10,7 +15,10 @@ export const CardBottomSectionProgressStyles = styled.div`
10
15
  export const CardBottomSectionNotesStyles = styled.div`
11
16
  height: 48px;
12
17
  position: relative;
13
- color: ${props => COLORS.getColor('neutral_500', props.theme)};
18
+ color: ${props => COLORS.generateToken({
19
+ componentType: 'text',
20
+ defaultVariant: 'subtle'
21
+ }, props.theme)};
14
22
  display: flex;
15
23
  flex-direction: row;
16
24
  align-items: center;
@@ -32,7 +40,10 @@ export const CardBottomSectionAuthorStyles = styled.div`
32
40
  }
33
41
 
34
42
  ${props => props.$disabled ? `
35
- color: ${COLORS.getColor('neutral_300', props.theme)};
43
+ color: ${COLORS.generateToken({
44
+ componentType: 'text',
45
+ state: 'disabled'
46
+ }, props.theme)};
36
47
  svg, img {
37
48
  filter: grayscale(100%);
38
49
  }
@@ -41,7 +52,10 @@ export const CardBottomSectionAuthorStyles = styled.div`
41
52
  `;
42
53
  export const CardBottomSectionDivider = styled.div`
43
54
  border-top: 1px;
44
- border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};
55
+ border-top-color: ${props => COLORS.generateToken({
56
+ componentType: 'border',
57
+ defaultVariant: 'subtle'
58
+ }, props.theme)};
45
59
  border-top-style: solid;
46
60
  width: 100%;
47
61
  `;
@@ -77,7 +91,10 @@ export const CardBottomSectionButtonRowContainerStyles = styled.div`
77
91
  justify-content: flex-end;
78
92
  align-items: center;
79
93
  border-top: 1px;
80
- border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};
94
+ border-top-color: ${props => COLORS.generateToken({
95
+ componentType: 'border',
96
+ defaultVariant: 'subtle'
97
+ }, props.theme)};
81
98
  border-top-style: solid;
82
99
 
83
100
  button:last-child {
@@ -89,13 +106,25 @@ export const CardBottomSectionButtonRowContainerStyles = styled.div`
89
106
  }
90
107
 
91
108
  svg {
92
- color: ${props => COLORS.getColor('neutral_600', props.theme)};
109
+ color: ${props => COLORS.generateToken({
110
+ componentType: 'icon',
111
+ defaultVariant: 'subtle'
112
+ }, props.theme)};
93
113
  }
94
114
  `;
95
115
  export const CardBottomSectionContainer = styled.div`
96
116
  padding: 0px 16px 8px 16px;
97
117
  width: calc(100% - 32px);
98
118
  `;
119
+ const LeftItemContainer = styled.div`
120
+ flex: 1
121
+ `;
122
+ const RightItemContainer = styled.div`
123
+ display: flex;
124
+ flex-direction: row;
125
+ justify-content: flex-end;
126
+ color: ${props => COLORS.getColor('neutral_600', props.theme)};
127
+ `;
99
128
  const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
100
129
  let {
101
130
  progressLevel,
@@ -105,6 +134,7 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
105
134
  noteLeftIcon,
106
135
  noteRight,
107
136
  noteRightIcon,
137
+ leftButton,
108
138
  authorName,
109
139
  logo,
110
140
  actions,
@@ -117,7 +147,20 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
117
147
  setElRefs(Array(length || 0).fill(null).map(() => /*#__PURE__*/React.createRef()));
118
148
  }, [length]);
119
149
  React.useImperativeHandle(ref, () => elRefs, [elRefs]);
120
- const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName;
150
+ const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName || leftButton;
151
+ const renderLeftButton = () => {
152
+ if (leftButton) {
153
+ const {
154
+ buttonText
155
+ } = leftButton,
156
+ rest = _objectWithoutProperties(leftButton, _excluded);
157
+ return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
158
+ size: leftButton.size && [Size.XSmall, Size.XSmall, Size.XXSmall].includes(leftButton.size) ? Size.Small : leftButton.size == Size.Large ? Size.Large : Size.Medium
159
+ }, rest), {}, {
160
+ children: buttonText
161
+ }));
162
+ }
163
+ };
121
164
  return /*#__PURE__*/_jsxs(CardBottomSectionContainer, {
122
165
  "data-testid": 'card-bottomSection',
123
166
  children: [haveAtLeastSomething && /*#__PURE__*/_jsx(CardBottomSectionDivider, {}), progressLevel != undefined && /*#__PURE__*/_jsx(CardBottomSectionProgressStyles, {
@@ -131,13 +174,19 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
131
174
  }), (noteLeft || noteLeftIcon || noteRight || noteRightIcon) && /*#__PURE__*/_jsxs(CardBottomSectionNotesStyles, {
132
175
  children: [(noteLeft || noteLeftIcon) && /*#__PURE__*/_jsxs(CardBottomSectionNoteLeftStyles, {
133
176
  children: [noteLeftIcon, /*#__PURE__*/_jsx(ComponentXXS, {
134
- color: COLORS.getColor('neutral_500', theme),
177
+ color: COLORS.generateToken({
178
+ componentType: 'icon',
179
+ defaultVariant: 'subtle'
180
+ }, theme),
135
181
  textStyle: ComponentTextStyle.Bold,
136
182
  children: noteLeft
137
183
  })]
138
184
  }), (noteRight || noteRightIcon) && /*#__PURE__*/_jsxs(CardBottomSectionNoteRightStyles, {
139
185
  children: [noteRightIcon, /*#__PURE__*/_jsx(ComponentXXS, {
140
- color: COLORS.getColor('neutral_500', theme),
186
+ color: COLORS.generateToken({
187
+ componentType: 'icon',
188
+ defaultVariant: 'subtle'
189
+ }, theme),
141
190
  textStyle: ComponentTextStyle.Bold,
142
191
  children: noteRight
143
192
  })]
@@ -148,17 +197,21 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
148
197
  children: [/*#__PURE__*/_jsx(ComponentXXS, {
149
198
  children: authorName
150
199
  }), logo]
151
- }), actions && /*#__PURE__*/_jsx(CardBottomSectionButtonRowContainerStyles, {
152
- children: actions.map((x, index) => /*#__PURE__*/_jsx(IconButton, {
153
- ref: elRefs[index],
154
- disabled: disabled,
155
- variant: "secondary",
156
- shape: "circular",
157
- action: e => {
158
- x.onClick();
159
- },
160
- children: x.icon
161
- }, index))
200
+ }), (actions || leftButton) && /*#__PURE__*/_jsxs(CardBottomSectionButtonRowContainerStyles, {
201
+ children: [/*#__PURE__*/_jsx(LeftItemContainer, {
202
+ children: leftButton && renderLeftButton()
203
+ }), actions && /*#__PURE__*/_jsx(RightItemContainer, {
204
+ children: actions.map((x, index) => /*#__PURE__*/_jsx(IconButton, {
205
+ ref: elRefs[index],
206
+ disabled: disabled,
207
+ variant: "secondary",
208
+ shape: "circular",
209
+ action: e => {
210
+ x.onClick();
211
+ },
212
+ children: x.icon
213
+ }, index))
214
+ })]
162
215
  })]
163
216
  });
164
217
  });
@@ -1 +1 @@
1
- {"version":3,"file":"CardBottomSection.js","names":["React","styled","useTheme","COLORS","ComponentTextStyle","ComponentXXS","LinearProgress","LinearProgressType","LinearProgressVariant","Size","IconButton","jsx","_jsx","jsxs","_jsxs","CardBottomSectionProgressStyles","div","CardBottomSectionNotesStyles","props","getColor","theme","CardBottomSectionAuthorStyles","$disabled","CardBottomSectionDivider","CardBottomSectionNoteLeftStyles","CardBottomSectionNoteRightStyles","CardBottomSectionButtonRowContainerStyles","CardBottomSectionContainer","CardBottomSection","forwardRef","_ref","ref","progressLevel","progressMax","progressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","authorName","logo","actions","disabled","elRefs","setElRefs","useState","length","useEffect","Array","fill","map","createRef","useImperativeHandle","haveAtLeastSomething","undefined","children","size","Small","type","variant","Normal","value","max","color","textStyle","Bold","x","index","shape","action","e","onClick","icon","propTypes","_pt","number","string","node","arrayOf","isRequired","func","bool"],"sources":["../../../src/Card/VerticalCard/CardBottomSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentTextStyle,\r\n ComponentXXS,\r\n LinearProgress,\r\n LinearProgressType,\r\n LinearProgressVariant,\r\n Size\r\n} from '../../index';\r\nimport {IconButton} from '../../Button';\r\n\r\nexport interface ActionItem {\r\n icon: React.ReactNode;\r\n onClick: () => void;\r\n}\r\n\r\nexport interface CardBottomSectionProps {\r\n /** Optional. Current progress level shown in the progress bar. */\r\n progressLevel?: number;\r\n /** Optional. Maximum level of progress in the progress bar. */\r\n progressMax?: number;\r\n /** Optional. Type of the progress bar. */\r\n progressType?: LinearProgressType;\r\n\r\n /** Optional. Note text shown on the left side of the section. */\r\n noteLeft?: string;\r\n /** Optional. Note icon shown on the left side of the section. */\r\n noteLeftIcon?: React.ReactNode;\r\n /** Optional. Note text shown on the right side of the section. */\r\n noteRight?: string;\r\n /** Optional. Note icon shown on the right side of the section. */\r\n noteRightIcon?: React.ReactNode;\r\n\r\n /** Author name shown at the bottom-left part of the section. */\r\n authorName?: string;\r\n /** Array of actions shown on the bottom-right corner of the section. */\r\n actions?: ActionItem[];\r\n /** Logo shown on the right side of the section, in front of AuthorName. */\r\n logo?: React.ReactNode;\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardBottomSectionProgressStyles = styled.div`\r\n padding: 8px 0;\r\n`;\r\n\r\nexport const CardBottomSectionNotesStyles = styled.div`\r\n height: 48px;\r\n position: relative;\r\n color: ${props => COLORS.getColor('neutral_500', props.theme)};\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nexport const CardBottomSectionAuthorStyles = styled.div<{ $disabled?: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n height: 48px;\r\n\r\n div:first-child {\r\n flex-grow: 2;\r\n }\r\n\r\n svg, img {\r\n width: 80px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n\r\n ${props => props.$disabled ? `\r\n color: ${COLORS.getColor('neutral_300', props.theme)};\r\n svg, img {\r\n filter: grayscale(100%);\r\n }\r\n \r\n ` : ''}\r\n`;\r\n\r\nexport const CardBottomSectionDivider = styled.div`\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n border-top-style: solid;\r\n width: 100%;\r\n`;\r\n\r\nexport const CardBottomSectionNoteLeftStyles = styled.div`\r\n position: absolute;\r\n left: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionNoteRightStyles = styled.div`\r\n position: absolute;\r\n right: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionButtonRowContainerStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n align-items: center;\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n border-top-style: solid;\r\n\r\n button:last-child {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n button:not(:last-child) {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n svg {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionContainer = styled.div`\r\n padding: 0px 16px 8px 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nconst CardBottomSection = React.forwardRef(({\r\n progressLevel,\r\n progressMax,\r\n progressType = LinearProgressType.Line,\r\n noteLeft,\r\n noteLeftIcon,\r\n noteRight,\r\n noteRightIcon,\r\n authorName,\r\n logo,\r\n actions,\r\n disabled\r\n }: CardBottomSectionProps,\r\n ref: React.Ref<React.RefObject<HTMLButtonElement | null>[]>) => {\r\n\r\n const [elRefs, setElRefs] = React.useState<React.RefObject<HTMLButtonElement | null>[]>([]);\r\n const theme = useTheme();\r\n const length = actions?.length || 0;\r\n\r\n React.useEffect(() => {\r\n setElRefs(Array(length || 0).fill(null).map(() => React.createRef<HTMLButtonElement>()));\r\n }, [length]);\r\n\r\n React.useImperativeHandle(ref, () => elRefs, [elRefs]);\r\n\r\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName;\r\n\r\n return (\r\n <CardBottomSectionContainer data-testid={'card-bottomSection'}>\r\n {haveAtLeastSomething && <CardBottomSectionDivider/>}\r\n {progressLevel != undefined && <CardBottomSectionProgressStyles>\r\n <LinearProgress size={Size.Small}\r\n type={progressType}\r\n variant={LinearProgressVariant.Normal}\r\n value={progressLevel}\r\n max={progressMax ?? progressLevel}/>\r\n </CardBottomSectionProgressStyles>}\r\n\r\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <CardBottomSectionNotesStyles>\r\n {(noteLeft || noteLeftIcon) && (\r\n <CardBottomSectionNoteLeftStyles>\r\n {noteLeftIcon}\r\n <ComponentXXS color={COLORS.getColor('neutral_500', theme)} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\r\n </CardBottomSectionNoteLeftStyles>\r\n )}\r\n {(noteRight || noteRightIcon) && (\r\n <CardBottomSectionNoteRightStyles>\r\n {noteRightIcon}\r\n <ComponentXXS color={COLORS.getColor('neutral_500', theme)} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\r\n </CardBottomSectionNoteRightStyles>\r\n )}\r\n </CardBottomSectionNotesStyles>}\r\n\r\n {(authorName || logo) && <CardBottomSectionAuthorStyles $disabled={disabled} data-testid={'card-bottomSection-author'}>\r\n <ComponentXXS>{authorName}</ComponentXXS>\r\n {logo}\r\n </CardBottomSectionAuthorStyles>}\r\n\r\n {actions && <CardBottomSectionButtonRowContainerStyles>\r\n {actions.map((x, index) => (\r\n <IconButton ref={elRefs[index]}\r\n key={index}\r\n disabled={disabled}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={(e) => {\r\n x.onClick();\r\n }}>\r\n {x.icon}\r\n </IconButton>\r\n ))}\r\n </CardBottomSectionButtonRowContainerStyles>}\r\n </CardBottomSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardBottomSection;\r\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SACEC,MAAM,EACNC,kBAAkB,EAClBC,YAAY,EACZC,cAAc,EACdC,kBAAkB,EAClBC,qBAAqB,EACrBC,IAAI,QACC,aAAa;AACpB,SAAQC,UAAU,QAAO,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EA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AI;IAAA,CACwB,CAAC,EAE/BC,OAAO,iBAAI9B,IAAA,CAACc,yCAAyC;MAAA8B,QAAA,EACnDd,OAAO,CAACS,GAAG,CAAC,CAACgB,CAAC,EAAEC,KAAK,kBACpBxD,IAAA,CAACF,UAAU;QAACqB,GAAG,EAAEa,MAAM,CAACwB,KAAK,CAAE;QAEnBzB,QAAQ,EAAEA,QAAS;QACnBiB,OAAO,EAAC,WAAW;QACnBS,KAAK,EAAC,UAAU;QAChBC,MAAM,EAAGC,CAAC,IAAK;UACbJ,CAAC,CAACK,OAAO,CAAC,CAAC;QACb,CAAE;QAAAhB,QAAA,EACXW,CAAC,CAACM;MAAI,GAPQL,KAQL,CACb;IAAC,CACuC,CAAC;EAAA,CAClB,CAAC;AAEjC,CAAC,CAAC;AAACxC,iBAAA,CAAA8C,SAAA;EAvMD1C,aAAa,EAAA2C,GAAA,CAAAC,MAAA;EAEb3C,WAAW,EAAA0C,GAAA,CAAAC,MAAA;EAKXxC,QAAQ,EAAAuC,GAAA,CAAAE,MAAA;EAERxC,YAAY,EAAAsC,GAAA,CAAAG,IAAA;EAEZxC,SAAS,EAAAqC,GAAA,CAAAE,MAAA;EAETtC,aAAa,EAAAoC,GAAA,CAAAG,IAAA;EAGbtC,UAAU,EAAAmC,GAAA,CAAAE,MAAA;EAEVnC,OAAO,EAAAiC,GAAA,CAAAI,OAAA,CAAAJ,GAAA,CAAAN,KAAA;IAxBPI,IAAI,EAAAE,GAAA,CAAAG,IAAA,CAAAE,UAAA;IACJR,OAAO,EAAAG,GAAA,CAAAM,IAAA,CAAAD;EAAA;EAyBPvC,IAAI,EAAAkC,GAAA,CAAAG,IAAA;EAEJnC,QAAQ,EAAAgC,GAAA,CAAAO;AAAA;AAmLV,eAAetD,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"CardBottomSection.js","names":["React","styled","useTheme","COLORS","ComponentTextStyle","ComponentXXS","LinearProgress","LinearProgressType","LinearProgressVariant","Size","Button","IconButton","jsx","_jsx","jsxs","_jsxs","CardBottomSectionProgressStyles","div","CardBottomSectionNotesStyles","props","generateToken","componentType","defaultVariant","theme","CardBottomSectionAuthorStyles","$disabled","state","CardBottomSectionDivider","CardBottomSectionNoteLeftStyles","CardBottomSectionNoteRightStyles","CardBottomSectionButtonRowContainerStyles","CardBottomSectionContainer","LeftItemContainer","RightItemContainer","getColor","CardBottomSection","forwardRef","_ref","ref","progressLevel","progressMax","progressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","leftButton","authorName","logo","actions","disabled","elRefs","setElRefs","useState","length","useEffect","Array","fill","map","createRef","useImperativeHandle","haveAtLeastSomething","undefined","renderLeftButton","buttonText","rest","_objectWithoutProperties","_excluded","_objectSpread","size","XSmall","XXSmall","includes","Small","Large","Medium","children","type","variant","Normal","value","max","color","textStyle","Bold","x","index","shape","action","e","onClick","icon","propTypes","_pt","number","string","node","arrayOf","isRequired","func","bool"],"sources":["../../../src/Card/VerticalCard/CardBottomSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentTextStyle,\r\n ComponentXXS,\r\n LinearProgress,\r\n LinearProgressType,\r\n LinearProgressVariant,\r\n Size,\r\n} from '../../index';\r\nimport { Button, ButtonProps, IconButton } from '../../Button';\r\n\r\nexport interface ActionItem {\r\n icon: React.ReactNode;\r\n onClick: () => void;\r\n}\r\n\r\nexport type CardStandardButton = Pick<ButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\r\n buttonText: string;\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n}\r\n\r\nexport interface CardBottomSectionProps {\r\n /** Optional. Current progress level shown in the progress bar. */\r\n progressLevel?: number;\r\n /** Optional. Maximum level of progress in the progress bar. */\r\n progressMax?: number;\r\n /** Optional. Type of the progress bar. */\r\n progressType?: LinearProgressType;\r\n\r\n /** Optional. Note text shown on the left side of the section. */\r\n noteLeft?: string;\r\n /** Optional. Note icon shown on the left side of the section. */\r\n noteLeftIcon?: React.ReactNode;\r\n /** Optional. Note text shown on the right side of the section. */\r\n noteRight?: string;\r\n /** Optional. Note icon shown on the right side of the section. */\r\n noteRightIcon?: React.ReactNode;\r\n\r\n /** Optional. Note icon/Hyperlink/button shown on the left side of the section. */\r\n leftButton?: CardStandardButton;\r\n\r\n /** Author name shown at the bottom-left part of the section. */\r\n authorName?: string;\r\n /** Array of actions shown on the bottom-right corner of the section. */\r\n actions?: ActionItem[];\r\n /** Logo shown on the right side of the section, in front of AuthorName. */\r\n logo?: React.ReactNode;\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardBottomSectionProgressStyles = styled.div`\r\n padding: 8px 0;\r\n`;\r\n\r\nexport const CardBottomSectionNotesStyles = styled.div`\r\n height: 48px;\r\n position: relative;\r\n color: ${props => COLORS.generateToken({ componentType:'text', defaultVariant:'subtle' }, props.theme)};\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nexport const CardBottomSectionAuthorStyles = styled.div<{ $disabled?: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n height: 48px;\r\n\r\n div:first-child {\r\n flex-grow: 2;\r\n }\r\n\r\n svg, img {\r\n width: 80px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n\r\n ${props => props.$disabled ? `\r\n color: ${COLORS.generateToken({ componentType: 'text', state: 'disabled' }, props.theme)};\r\n svg, img {\r\n filter: grayscale(100%);\r\n }\r\n \r\n ` : ''}\r\n`;\r\n\r\nexport const CardBottomSectionDivider = styled.div`\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.generateToken({componentType:'border', defaultVariant:'subtle'}, props.theme)};\r\n border-top-style: solid;\r\n width: 100%;\r\n`;\r\n\r\nexport const CardBottomSectionNoteLeftStyles = styled.div`\r\n position: absolute;\r\n left: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionNoteRightStyles = styled.div`\r\n position: absolute;\r\n right: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionButtonRowContainerStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n align-items: center;\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.generateToken({componentType:'border', defaultVariant:'subtle'}, props.theme)};\r\n border-top-style: solid;\r\n\r\n button:last-child {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n button:not(:last-child) {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n svg {\r\n color: ${props => COLORS.generateToken({componentType:'icon', defaultVariant:'subtle' }, props.theme)};\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionContainer = styled.div`\r\n padding: 0px 16px 8px 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nconst LeftItemContainer = styled.div`\r\n flex: 1\r\n`;\r\n\r\nconst RightItemContainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n`;\r\n\r\nconst CardBottomSection = React.forwardRef(({\r\n progressLevel,\r\n progressMax,\r\n progressType = LinearProgressType.Line,\r\n noteLeft,\r\n noteLeftIcon,\r\n noteRight,\r\n noteRightIcon,\r\n leftButton,\r\n authorName,\r\n logo,\r\n actions,\r\n disabled\r\n}: CardBottomSectionProps,\r\n ref: React.Ref<React.RefObject<HTMLButtonElement | null>[]>) => {\r\n\r\n const [elRefs, setElRefs] = React.useState<React.RefObject<HTMLButtonElement | null>[]>([]);\r\n const theme = useTheme();\r\n const length = actions?.length || 0;\r\n\r\n React.useEffect(() => {\r\n setElRefs(Array(length || 0).fill(null).map(() => React.createRef<HTMLButtonElement>()));\r\n }, [length]);\r\n\r\n React.useImperativeHandle(ref, () => elRefs, [elRefs]);\r\n\r\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName || leftButton;\r\n\r\n const renderLeftButton = () => {\r\n if (leftButton){\r\n const {buttonText, ...rest} = leftButton;\r\n return (<Button \r\n size={ leftButton.size && [Size.XSmall, Size.XSmall, Size.XXSmall].includes(leftButton.size) ? Size.Small: \r\n leftButton.size == Size.Large ? Size.Large : Size.Medium}\r\n {...rest}>\r\n {buttonText}\r\n </Button>)\r\n }\r\n}\r\n\r\n return (\r\n <CardBottomSectionContainer data-testid={'card-bottomSection'}>\r\n {haveAtLeastSomething && <CardBottomSectionDivider/>}\r\n {progressLevel != undefined && <CardBottomSectionProgressStyles>\r\n <LinearProgress size={Size.Small}\r\n type={progressType}\r\n variant={LinearProgressVariant.Normal}\r\n value={progressLevel}\r\n max={progressMax ?? progressLevel}/>\r\n </CardBottomSectionProgressStyles>}\r\n\r\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <CardBottomSectionNotesStyles>\r\n {(noteLeft || noteLeftIcon) && (\r\n <CardBottomSectionNoteLeftStyles>\r\n {noteLeftIcon}\r\n <ComponentXXS color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\r\n </CardBottomSectionNoteLeftStyles>\r\n )}\r\n {(noteRight || noteRightIcon) && (\r\n <CardBottomSectionNoteRightStyles>\r\n {noteRightIcon}\r\n <ComponentXXS color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\r\n </CardBottomSectionNoteRightStyles>\r\n )}\r\n </CardBottomSectionNotesStyles>}\r\n\r\n {(authorName || logo) && <CardBottomSectionAuthorStyles $disabled={disabled} data-testid={'card-bottomSection-author'}>\r\n <ComponentXXS>{authorName}</ComponentXXS>\r\n {logo}\r\n </CardBottomSectionAuthorStyles>}\r\n\r\n {(actions || leftButton) && <CardBottomSectionButtonRowContainerStyles>\r\n <LeftItemContainer>\r\n {leftButton && renderLeftButton()}\r\n </LeftItemContainer>\r\n\r\n { actions && <RightItemContainer>{actions.map((x, index) => (\r\n <IconButton ref={elRefs[index]}\r\n key={index}\r\n disabled={disabled}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={(e) => {\r\n x.onClick();\r\n }}>\r\n {x.icon}\r\n </IconButton>\r\n ))}\r\n </RightItemContainer>\r\n }\r\n </CardBottomSectionButtonRowContainerStyles>}\r\n </CardBottomSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardBottomSection;\r\n"],"mappings":";;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SACEC,MAAM,EACNC,kBAAkB,EAClBC,YAAY,EACZC,cAAc,EACdC,kBAAkB,EAClBC,qBAAqB,EACrBC,IAAI,QACC,aAAa;AACpB,SAASC,MAAM,EAAeC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA0C/D,OAAO,MAAMC,+BAA+B,GAAGf,MAAM,CAACgB,GAAG;AACzD;AACA,CAAC;AAED,OAAO,MAAMC,4BAA4B,GAAGjB,MAAM,CAACgB,GAAG;AACtD;AACA;AACA,WAAWE,KAAK,IAAIhB,MAAM,CAACiB,aAAa,CAAC;EAAEC,aAAa,EAAC,MAAM;EAAEC,cAAc,EAAC;AAAS,CAAC,EAAEH,KAAK,CAACI,KAAK,CAAC;AACxG;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,6BAA6B,GAAGvB,MAAM,CAACgB,GAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO,EAAC,WAAW;UACnBS,KAAK,EAAC,UAAU;UAChBC,MAAM,EAAGC,CAAC,IAAK;YACbJ,CAAC,CAACK,OAAO,CAAC,CAAC;UACb,CAAE;UAAAd,QAAA,EACDS,CAAC,CAACM;QAAI,GAPFL,KAQK,CACb;MAAC,CACkB,CAAC;IAAA,CAEkB,CAAC;EAAA,CAClB,CAAC;AAEjC,CAAC,CAAC;AAACpD,iBAAA,CAAA0D,SAAA;EAxODtD,aAAa,EAAAuD,GAAA,CAAAC,MAAA;EAEbvD,WAAW,EAAAsD,GAAA,CAAAC,MAAA;EAKXpD,QAAQ,EAAAmD,GAAA,CAAAE,MAAA;EAERpD,YAAY,EAAAkD,GAAA,CAAAG,IAAA;EAEZpD,SAAS,EAAAiD,GAAA,CAAAE,MAAA;EAETlD,aAAa,EAAAgD,GAAA,CAAAG,IAAA;EAMbjD,UAAU,EAAA8C,GAAA,CAAAE,MAAA;EAEV9C,OAAO,EAAA4C,GAAA,CAAAI,OAAA,CAAAJ,GAAA,CAAAN,KAAA;IAhCPI,IAAI,EAAAE,GAAA,CAAAG,IAAA,CAAAE,UAAA;IACJR,OAAO,EAAAG,GAAA,CAAAM,IAAA,CAAAD;EAAA;EAiCPlD,IAAI,EAAA6C,GAAA,CAAAG,IAAA;EAEJ9C,QAAQ,EAAA2C,GAAA,CAAAO;AAAA;AAiNV,eAAelE,iBAAiB","ignoreList":[]}
@@ -50,7 +50,10 @@ const CardMiddleSectionCategoryStyles = exports.CardMiddleSectionCategoryStyles
50
50
  gap: 6px;
51
51
 
52
52
  svg {
53
- color: ${props => _index.COLORS.getColor('neutral_500', props.theme)};
53
+ color: ${props => _index.COLORS.generateToken({
54
+ componentType: 'text',
55
+ defaultVariant: 'subtle'
56
+ }, props.theme)};
54
57
  flex-grow: 0;
55
58
  flex-shrink: 0;
56
59
  }
@@ -76,17 +79,29 @@ const CardMiddleSection = _ref => {
76
79
  $bottomMargin: Boolean(categoryIcon || categoryLabel),
77
80
  children: [categoryIcon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentS, {
78
81
  textStyle: _index.ComponentTextStyle.Bold,
79
- color: _index.COLORS.getColor('neutral_500', theme),
82
+ color: _index.COLORS.generateToken({
83
+ componentType: 'text',
84
+ defaultVariant: 'subtle'
85
+ }, theme),
80
86
  children: categoryLabel
81
87
  })]
82
88
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentXL, {
83
89
  className: "titleBlock",
84
90
  textStyle: _index.ComponentTextStyle.Bold,
85
- color: disabled ? _index.COLORS.getColor('neutral_500', theme) : _index.COLORS.getColor('black', theme),
91
+ color: disabled ? _index.COLORS.generateToken({
92
+ componentType: 'text',
93
+ defaultVariant: 'subtle'
94
+ }, theme) : _index.COLORS.generateToken({
95
+ componentType: 'text',
96
+ defaultVariant: 'default'
97
+ }, theme),
86
98
  children: title
87
99
  }), description && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentS, {
88
100
  className: "descriptionBlock",
89
- color: _index.COLORS.getColor('neutral_600', theme),
101
+ color: _index.COLORS.generateToken({
102
+ componentType: 'text',
103
+ defaultVariant: 'subtle'
104
+ }, theme),
90
105
  children: description
91
106
  }), tags && /*#__PURE__*/(0, _jsxRuntime.jsx)(CardMiddleSectionTagsStyles, {
92
107
  children: tags.map((x, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Tag, {
@@ -1 +1 @@
1
- {"version":3,"file":"CardMiddleSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_index","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardMiddleSectionContainer","exports","styled","div","CardMiddleSectionColorBandStyles","props","$color","CardMiddleSectionTagsStyles","CardMiddleSectionCategoryStyles","COLORS","getColor","theme","CardMiddleSection","_ref","colorBandColor","categoryIcon","categoryLabel","title","description","tags","row2Tags","disabled","useTheme","jsxs","children","jsx","$extraTopMargin","Boolean","$bottomMargin","ComponentS","textStyle","ComponentTextStyle","Bold","color","ComponentXL","className","map","x","index","Tag","label","variant","icon","_default"],"sources":["../../../src/Card/VerticalCard/CardMiddleSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport { COLORS, ComponentS, ComponentTextStyle, ComponentXL, Tag, TagVariants } from '../../index';\r\nimport { ReactNode } from 'react';\r\n\r\nexport interface CardMiddleSectionProps {\r\n /** Color of the band to be shown on the top of middle section. */\r\n colorBandColor?: string;\r\n /** Icon to be shown on the left side of the categoryLabel. */\r\n categoryIcon?: React.ReactNode;\r\n /** Label to be shown at the top part of the middle section. */\r\n categoryLabel?: string;\r\n /** Main title of the Card component. */\r\n title: string;\r\n /** Description of the Card. */\r\n description?: string;\r\n /** Tags to be shown under the description. */\r\n tags?: CardTag[];\r\n /** Second row of tags if needed. */\r\n row2Tags?: CardTag[];\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport interface CardTag {\r\n label: string;\r\n variant?: TagVariants;\r\n icon?: ReactNode\r\n}\r\n\r\nexport const CardMiddleSectionContainer = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n width: calc(100% - 32px);\r\n position: relative;\r\n flex-direction: column;\r\n padding: 16px;\r\n gap: 8px;\r\n\r\n .descriptionBlock {\r\n padding: 2px 0;\r\n }\r\n\r\n .titleBlock {\r\n padding: 2px 0;\r\n }\r\n`;\r\n\r\nexport const CardMiddleSectionColorBandStyles = styled.div<{ $color: string }>`\r\n position: absolute;\r\n width: 100%;\r\n top: 0px;\r\n left: 0px;\r\n height: 8px;\r\n background-color: ${(props) => props.$color};\r\n`;\r\n\r\nexport const CardMiddleSectionTagsStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 4px 0;\r\n gap: 4px;\r\n flex-wrap: wrap;\r\n`;\r\n\r\nexport const CardMiddleSectionCategoryStyles = styled.div<{ $extraTopMargin: boolean; $bottomMargin: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n padding: none;\r\n gap: 6px;\r\n\r\n svg {\r\n color: ${props => COLORS.getColor('neutral_500', props.theme)};\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nconst CardMiddleSection: React.FunctionComponent<CardMiddleSectionProps> = ({\r\n colorBandColor,\r\n categoryIcon,\r\n categoryLabel,\r\n title,\r\n description,\r\n tags,\r\n row2Tags,\r\n disabled,\r\n}: CardMiddleSectionProps) => {\r\n const theme = useTheme();\r\n return (\r\n <CardMiddleSectionContainer data-testid={'card-middleSection'} >\r\n {colorBandColor && <CardMiddleSectionColorBandStyles $color={colorBandColor} />}\r\n {\r\n (categoryIcon || categoryLabel) &&\r\n <CardMiddleSectionCategoryStyles $extraTopMargin={Boolean(colorBandColor)} $bottomMargin={Boolean(categoryIcon || categoryLabel)}>\r\n {categoryIcon}\r\n <ComponentS textStyle={ComponentTextStyle.Bold} color={COLORS.getColor('neutral_500', theme)}>\r\n {categoryLabel}\r\n </ComponentS>\r\n </CardMiddleSectionCategoryStyles>\r\n }\r\n <ComponentXL className=\"titleBlock\" textStyle={ComponentTextStyle.Bold} color={disabled ? COLORS.getColor('neutral_500', theme) : COLORS.getColor('black', theme)}>\r\n {title}\r\n </ComponentXL>\r\n {description && (\r\n <ComponentS className=\"descriptionBlock\" color={COLORS.getColor('neutral_600', theme)}>\r\n {description}\r\n </ComponentS>\r\n )}\r\n {tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n {row2Tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {row2Tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon}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AAI,EAAEL,CAAC,CAACK;MAAK,GAArF,GAAGL,CAAC,CAACG,KAAK,IAAIF,KAAK,EAAoE,CAClG;IAAC,CACyB,CAC9B,EACAlB,QAAQ,iBACP,IAAAzC,WAAA,CAAA8C,GAAA,EAAClB,2BAA2B;MAAAiB,QAAA,EACzBJ,QAAQ,CAACgB,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,kBACrB,IAAA3D,WAAA,CAAA8C,GAAA,EAAC/C,MAAA,CAAA6D,GAAG;QAA6BC,KAAK,EAAEH,CAAC,CAACG,KAAM;QAACC,OAAO,EAAEJ,CAAC,CAACI,OAAO,IAAI,SAAU;QAACC,IAAI,EAAEL,CAAC,CAACK;MAAK,GAArF,GAAGL,CAAC,CAACG,KAAK,IAAIF,KAAK,EAAoE,CAClG;IAAC,CACyB,CAC9B;EAAA,CACyB,CAAC;AAEjC,CAAC;AAAC,IAAAK,QAAA,GAAA1C,OAAA,CAAAf,OAAA,GAEa0B,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"CardMiddleSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_index","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardMiddleSectionContainer","exports","styled","div","CardMiddleSectionColorBandStyles","props","$color","CardMiddleSectionTagsStyles","CardMiddleSectionCategoryStyles","COLORS","generateToken","componentType","defaultVariant","theme","CardMiddleSection","_ref","colorBandColor","categoryIcon","categoryLabel","title","description","tags","row2Tags","disabled","useTheme","jsxs","children","jsx","$extraTopMargin","Boolean","$bottomMargin","ComponentS","textStyle","ComponentTextStyle","Bold","color","ComponentXL","className","map","x","index","Tag","label","variant","icon","_default"],"sources":["../../../src/Card/VerticalCard/CardMiddleSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport { COLORS, ComponentS, ComponentTextStyle, ComponentXL, Tag, TagVariants } from '../../index';\r\nimport { ReactNode } from 'react';\r\n\r\nexport interface CardMiddleSectionProps {\r\n /** Color of the band to be shown on the top of middle section. */\r\n colorBandColor?: string;\r\n /** Icon to be shown on the left side of the categoryLabel. */\r\n categoryIcon?: React.ReactNode;\r\n /** Label to be shown at the top part of the middle section. */\r\n categoryLabel?: string;\r\n /** Main title of the Card component. */\r\n title: string;\r\n /** Description of the Card. */\r\n description?: string;\r\n /** Tags to be shown under the description. */\r\n tags?: CardTag[];\r\n /** Second row of tags if needed. */\r\n row2Tags?: CardTag[];\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport interface CardTag {\r\n label: string;\r\n variant?: TagVariants;\r\n icon?: ReactNode\r\n}\r\n\r\nexport const CardMiddleSectionContainer = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n width: calc(100% - 32px);\r\n position: relative;\r\n flex-direction: column;\r\n padding: 16px;\r\n gap: 8px;\r\n\r\n .descriptionBlock {\r\n padding: 2px 0;\r\n }\r\n\r\n .titleBlock {\r\n padding: 2px 0;\r\n }\r\n`;\r\n\r\nexport const CardMiddleSectionColorBandStyles = styled.div<{ $color: string }>`\r\n position: absolute;\r\n width: 100%;\r\n top: 0px;\r\n left: 0px;\r\n height: 8px;\r\n background-color: ${(props) => props.$color};\r\n`;\r\n\r\nexport const CardMiddleSectionTagsStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 4px 0;\r\n gap: 4px;\r\n flex-wrap: wrap;\r\n`;\r\n\r\nexport const CardMiddleSectionCategoryStyles = styled.div<{ $extraTopMargin: boolean; $bottomMargin: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n padding: none;\r\n gap: 6px;\r\n\r\n svg {\r\n color: ${props => COLORS.generateToken({ componentType: 'text', defaultVariant: 'subtle' }, props.theme)};\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nconst CardMiddleSection: React.FunctionComponent<CardMiddleSectionProps> = ({\r\n colorBandColor,\r\n categoryIcon,\r\n categoryLabel,\r\n title,\r\n description,\r\n tags,\r\n row2Tags,\r\n disabled,\r\n}: CardMiddleSectionProps) => {\r\n const theme = useTheme();\r\n return (\r\n <CardMiddleSectionContainer data-testid={'card-middleSection'} >\r\n {colorBandColor && <CardMiddleSectionColorBandStyles $color={colorBandColor} />}\r\n {\r\n (categoryIcon || categoryLabel) &&\r\n <CardMiddleSectionCategoryStyles $extraTopMargin={Boolean(colorBandColor)} $bottomMargin={Boolean(categoryIcon || categoryLabel)}>\r\n {categoryIcon}\r\n <ComponentS textStyle={ComponentTextStyle.Bold} color={COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, theme)}>\r\n {categoryLabel}\r\n </ComponentS>\r\n </CardMiddleSectionCategoryStyles>\r\n }\r\n <ComponentXL className=\"titleBlock\" textStyle={ComponentTextStyle.Bold} color={disabled ? COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, theme) \r\n : COLORS.generateToken({componentType:'text',defaultVariant:'default'}, theme)}>\r\n {title}\r\n </ComponentXL>\r\n {description && (\r\n <ComponentS className=\"descriptionBlock\" color={COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, theme)}>\r\n {description}\r\n </ComponentS>\r\n )}\r\n {tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n {row2Tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {row2Tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n </CardMiddleSectionContainer>\r\n );\r\n};\r\n\r\nexport default CardMiddleSection;\r\n"],"mappings":";;;;;;AAAA,IAAAA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AA+D,GAAG;QAA6BC,KAAK,EAAEH,CAAC,CAACG,KAAM;QAACC,OAAO,EAAEJ,CAAC,CAACI,OAAO,IAAI,SAAU;QAACC,IAAI,EAAEL,CAAC,CAACK;MAAK,GAArF,GAAGL,CAAC,CAACG,KAAK,IAAIF,KAAK,EAAoE,CAClG;IAAC,CACyB,CAC9B,EACAlB,QAAQ,iBACP,IAAA3C,WAAA,CAAAgD,GAAA,EAACpB,2BAA2B;MAAAmB,QAAA,EACzBJ,QAAQ,CAACgB,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,kBACrB,IAAA7D,WAAA,CAAAgD,GAAA,EAACjD,MAAA,CAAA+D,GAAG;QAA6BC,KAAK,EAAEH,CAAC,CAACG,KAAM;QAACC,OAAO,EAAEJ,CAAC,CAACI,OAAO,IAAI,SAAU;QAACC,IAAI,EAAEL,CAAC,CAACK;MAAK,GAArF,GAAGL,CAAC,CAACG,KAAK,IAAIF,KAAK,EAAoE,CAClG;IAAC,CACyB,CAC9B;EAAA,CACyB,CAAC;AAEjC,CAAC;AAAC,IAAAK,QAAA,GAAA5C,OAAA,CAAAf,OAAA,GAEa4B,iBAAiB","ignoreList":[]}
@@ -42,7 +42,10 @@ export const CardMiddleSectionCategoryStyles = styled.div`
42
42
  gap: 6px;
43
43
 
44
44
  svg {
45
- color: ${props => COLORS.getColor('neutral_500', props.theme)};
45
+ color: ${props => COLORS.generateToken({
46
+ componentType: 'text',
47
+ defaultVariant: 'subtle'
48
+ }, props.theme)};
46
49
  flex-grow: 0;
47
50
  flex-shrink: 0;
48
51
  }
@@ -68,17 +71,29 @@ const CardMiddleSection = _ref => {
68
71
  $bottomMargin: Boolean(categoryIcon || categoryLabel),
69
72
  children: [categoryIcon, /*#__PURE__*/_jsx(ComponentS, {
70
73
  textStyle: ComponentTextStyle.Bold,
71
- color: COLORS.getColor('neutral_500', theme),
74
+ color: COLORS.generateToken({
75
+ componentType: 'text',
76
+ defaultVariant: 'subtle'
77
+ }, theme),
72
78
  children: categoryLabel
73
79
  })]
74
80
  }), /*#__PURE__*/_jsx(ComponentXL, {
75
81
  className: "titleBlock",
76
82
  textStyle: ComponentTextStyle.Bold,
77
- color: disabled ? COLORS.getColor('neutral_500', theme) : COLORS.getColor('black', theme),
83
+ color: disabled ? COLORS.generateToken({
84
+ componentType: 'text',
85
+ defaultVariant: 'subtle'
86
+ }, theme) : COLORS.generateToken({
87
+ componentType: 'text',
88
+ defaultVariant: 'default'
89
+ }, theme),
78
90
  children: title
79
91
  }), description && /*#__PURE__*/_jsx(ComponentS, {
80
92
  className: "descriptionBlock",
81
- color: COLORS.getColor('neutral_600', theme),
93
+ color: COLORS.generateToken({
94
+ componentType: 'text',
95
+ defaultVariant: 'subtle'
96
+ }, theme),
82
97
  children: description
83
98
  }), tags && /*#__PURE__*/_jsx(CardMiddleSectionTagsStyles, {
84
99
  children: tags.map((x, index) => /*#__PURE__*/_jsx(Tag, {
@@ -1 +1 @@
1
- {"version":3,"file":"CardMiddleSection.js","names":["React","styled","useTheme","COLORS","ComponentS","ComponentTextStyle","ComponentXL","Tag","jsx","_jsx","jsxs","_jsxs","CardMiddleSectionContainer","div","CardMiddleSectionColorBandStyles","props","$color","CardMiddleSectionTagsStyles","CardMiddleSectionCategoryStyles","getColor","theme","CardMiddleSection","_ref","colorBandColor","categoryIcon","categoryLabel","title","description","tags","row2Tags","disabled","children","$extraTopMargin","Boolean","$bottomMargin","textStyle","Bold","color","className","map","x","index","label","variant","icon"],"sources":["../../../src/Card/VerticalCard/CardMiddleSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport { COLORS, ComponentS, ComponentTextStyle, ComponentXL, Tag, TagVariants } from '../../index';\r\nimport { ReactNode } from 'react';\r\n\r\nexport interface CardMiddleSectionProps {\r\n /** Color of the band to be shown on the top of middle section. */\r\n colorBandColor?: string;\r\n /** Icon to be shown on the left side of the categoryLabel. */\r\n categoryIcon?: React.ReactNode;\r\n /** Label to be shown at the top part of the middle section. */\r\n categoryLabel?: string;\r\n /** Main title of the Card component. */\r\n title: string;\r\n /** Description of the Card. */\r\n description?: string;\r\n /** Tags to be shown under the description. */\r\n tags?: CardTag[];\r\n /** Second row of tags if needed. */\r\n row2Tags?: CardTag[];\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport interface CardTag {\r\n label: string;\r\n variant?: TagVariants;\r\n icon?: ReactNode\r\n}\r\n\r\nexport const CardMiddleSectionContainer = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n width: calc(100% - 32px);\r\n position: relative;\r\n flex-direction: column;\r\n padding: 16px;\r\n gap: 8px;\r\n\r\n .descriptionBlock {\r\n padding: 2px 0;\r\n }\r\n\r\n .titleBlock {\r\n padding: 2px 0;\r\n }\r\n`;\r\n\r\nexport const CardMiddleSectionColorBandStyles = styled.div<{ $color: string }>`\r\n position: absolute;\r\n width: 100%;\r\n top: 0px;\r\n left: 0px;\r\n height: 8px;\r\n background-color: ${(props) => props.$color};\r\n`;\r\n\r\nexport const CardMiddleSectionTagsStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 4px 0;\r\n gap: 4px;\r\n flex-wrap: wrap;\r\n`;\r\n\r\nexport const CardMiddleSectionCategoryStyles = styled.div<{ $extraTopMargin: boolean; $bottomMargin: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n padding: none;\r\n gap: 6px;\r\n\r\n svg {\r\n color: ${props => COLORS.getColor('neutral_500', props.theme)};\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nconst CardMiddleSection: React.FunctionComponent<CardMiddleSectionProps> = ({\r\n colorBandColor,\r\n categoryIcon,\r\n categoryLabel,\r\n title,\r\n description,\r\n tags,\r\n row2Tags,\r\n disabled,\r\n}: CardMiddleSectionProps) => {\r\n const theme = useTheme();\r\n return (\r\n <CardMiddleSectionContainer data-testid={'card-middleSection'} >\r\n {colorBandColor && <CardMiddleSectionColorBandStyles $color={colorBandColor} />}\r\n {\r\n (categoryIcon || categoryLabel) &&\r\n <CardMiddleSectionCategoryStyles $extraTopMargin={Boolean(colorBandColor)} $bottomMargin={Boolean(categoryIcon || categoryLabel)}>\r\n {categoryIcon}\r\n <ComponentS textStyle={ComponentTextStyle.Bold} color={COLORS.getColor('neutral_500', theme)}>\r\n {categoryLabel}\r\n </ComponentS>\r\n </CardMiddleSectionCategoryStyles>\r\n }\r\n <ComponentXL className=\"titleBlock\" textStyle={ComponentTextStyle.Bold} color={disabled ? COLORS.getColor('neutral_500', theme) : COLORS.getColor('black', theme)}>\r\n {title}\r\n </ComponentXL>\r\n {description && (\r\n <ComponentS className=\"descriptionBlock\" color={COLORS.getColor('neutral_600', theme)}>\r\n {description}\r\n </ComponentS>\r\n )}\r\n {tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n {row2Tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {row2Tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n </CardMiddleSectionContainer>\r\n );\r\n};\r\n\r\nexport default CardMiddleSection;\r\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SAASC,MAAM,EAAEC,UAAU,EAAEC,kBAAkB,EAAEC,WAAW,EAAEC,GAAG,QAAqB,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA4BpG,OAAO,MAAMC,0BAA0B,GAAGX,MAAM,CAACY,GAAG;AACpD;AACA;AACA;AACA;AAC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
1
+ {"version":3,"file":"CardMiddleSection.js","names":["React","styled","useTheme","COLORS","ComponentS","ComponentTextStyle","ComponentXL","Tag","jsx","_jsx","jsxs","_jsxs","CardMiddleSectionContainer","div","CardMiddleSectionColorBandStyles","props","$color","CardMiddleSectionTagsStyles","CardMiddleSectionCategoryStyles","generateToken","componentType","defaultVariant","theme","CardMiddleSection","_ref","colorBandColor","categoryIcon","categoryLabel","title","description","tags","row2Tags","disabled","children","$extraTopMargin","Boolean","$bottomMargin","textStyle","Bold","color","className","map","x","index","label","variant","icon"],"sources":["../../../src/Card/VerticalCard/CardMiddleSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport { COLORS, ComponentS, ComponentTextStyle, ComponentXL, Tag, TagVariants } from '../../index';\r\nimport { ReactNode } from 'react';\r\n\r\nexport interface CardMiddleSectionProps {\r\n /** Color of the band to be shown on the top of middle section. */\r\n colorBandColor?: string;\r\n /** Icon to be shown on the left side of the categoryLabel. */\r\n categoryIcon?: React.ReactNode;\r\n /** Label to be shown at the top part of the middle section. */\r\n categoryLabel?: string;\r\n /** Main title of the Card component. */\r\n title: string;\r\n /** Description of the Card. */\r\n description?: string;\r\n /** Tags to be shown under the description. */\r\n tags?: CardTag[];\r\n /** Second row of tags if needed. */\r\n row2Tags?: CardTag[];\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport interface CardTag {\r\n label: string;\r\n variant?: TagVariants;\r\n icon?: ReactNode\r\n}\r\n\r\nexport const CardMiddleSectionContainer = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n width: calc(100% - 32px);\r\n position: relative;\r\n flex-direction: column;\r\n padding: 16px;\r\n gap: 8px;\r\n\r\n .descriptionBlock {\r\n padding: 2px 0;\r\n }\r\n\r\n .titleBlock {\r\n padding: 2px 0;\r\n }\r\n`;\r\n\r\nexport const CardMiddleSectionColorBandStyles = styled.div<{ $color: string }>`\r\n position: absolute;\r\n width: 100%;\r\n top: 0px;\r\n left: 0px;\r\n height: 8px;\r\n background-color: ${(props) => props.$color};\r\n`;\r\n\r\nexport const CardMiddleSectionTagsStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 4px 0;\r\n gap: 4px;\r\n flex-wrap: wrap;\r\n`;\r\n\r\nexport const CardMiddleSectionCategoryStyles = styled.div<{ $extraTopMargin: boolean; $bottomMargin: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n padding: none;\r\n gap: 6px;\r\n\r\n svg {\r\n color: ${props => COLORS.generateToken({ componentType: 'text', defaultVariant: 'subtle' }, props.theme)};\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nconst CardMiddleSection: React.FunctionComponent<CardMiddleSectionProps> = ({\r\n colorBandColor,\r\n categoryIcon,\r\n categoryLabel,\r\n title,\r\n description,\r\n tags,\r\n row2Tags,\r\n disabled,\r\n}: CardMiddleSectionProps) => {\r\n const theme = useTheme();\r\n return (\r\n <CardMiddleSectionContainer data-testid={'card-middleSection'} >\r\n {colorBandColor && <CardMiddleSectionColorBandStyles $color={colorBandColor} />}\r\n {\r\n (categoryIcon || categoryLabel) &&\r\n <CardMiddleSectionCategoryStyles $extraTopMargin={Boolean(colorBandColor)} $bottomMargin={Boolean(categoryIcon || categoryLabel)}>\r\n {categoryIcon}\r\n <ComponentS textStyle={ComponentTextStyle.Bold} color={COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, theme)}>\r\n {categoryLabel}\r\n </ComponentS>\r\n </CardMiddleSectionCategoryStyles>\r\n }\r\n <ComponentXL className=\"titleBlock\" textStyle={ComponentTextStyle.Bold} color={disabled ? COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, theme) \r\n : COLORS.generateToken({componentType:'text',defaultVariant:'default'}, theme)}>\r\n {title}\r\n </ComponentXL>\r\n {description && (\r\n <ComponentS className=\"descriptionBlock\" color={COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, theme)}>\r\n {description}\r\n </ComponentS>\r\n )}\r\n {tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n {row2Tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {row2Tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n </CardMiddleSectionContainer>\r\n );\r\n};\r\n\r\nexport default CardMiddleSection;\r\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SAASC,MAAM,EAAEC,UAAU,EAAEC,kBAAkB,EAAEC,WAAW,EAAEC,GAAG,QAAqB,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA4BpG,OAAO,MAAMC,0BAA0B,GAAGX,MAAM,CAACY,GAAG;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,gCAAgC,GAAGb,MAAM,CAACY,GAAuB;AAC9E;AACA;AACA;AACA;AACA;AACA,sBAAuBE,KAAK,IAAKA,KAAK,CAACC,MAAM;AAC7C,CAAC;AAED,OAAO,MAAMC,2BAA2B,GAAGhB,MAAM,CAACY,GAAG;AACrD;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMK,+BAA+B,GAAGjB,MAAM,CAACY,GAAyD;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAaE,KAAK,IAAIZ,MAAM,CAACgB,aAAa,CAAC;EAAEC,aAAa,EAAE,MAAM;EAAEC,c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AA,EAC9EL;IAAK,CACK,CAAC,EACbC,WAAW,iBACVpB,IAAA,CAACL,UAAU;MAACoC,SAAS,EAAC,kBAAkB;MAACD,KAAK,EAAEpC,MAAM,CAACgB,aAAa,CAAC;QAACC,aAAa,EAAC,MAAM;QAACC,cAAc,EAAC;MAAQ,CAAC,EAAEC,KAAK,CAAE;MAAAW,QAAA,EACzHJ;IAAW,CACF,CACb,EACAC,IAAI,iBACHrB,IAAA,CAACQ,2BAA2B;MAAAgB,QAAA,EACzBH,IAAI,CAACW,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,kBACjBlC,IAAA,CAACF,GAAG;QAA6BqC,KAAK,EAAEF,CAAC,CAACE,KAAM;QAACC,OAAO,EAAEH,CAAC,CAACG,OAAO,IAAI,SAAU;QAACC,IAAI,EAAEJ,CAAC,CAACI;MAAK,GAArF,GAAGJ,CAAC,CAACE,KAAK,IAAID,KAAK,EAAoE,CAClG;IAAC,CACyB,CAC9B,EACAZ,QAAQ,iBACPtB,IAAA,CAACQ,2BAA2B;MAAAgB,QAAA,EACzBF,QAAQ,CAACU,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,kBACrBlC,IAAA,CAACF,GAAG;QAA6BqC,KAAK,EAAEF,CAAC,CAACE,KAAM;QAACC,OAAO,EAAEH,CAAC,CAACG,OAAO,IAAI,SAAU;QAACC,IAAI,EAAEJ,CAAC,CAACI;MAAK,GAArF,GAAGJ,CAAC,CAACE,KAAK,IAAID,KAAK,EAAoE,CAClG;IAAC,CACyB,CAC9B;EAAA,CACyB,CAAC;AAEjC,CAAC;AAED,eAAepB,iBAAiB","ignoreList":[]}
@@ -124,9 +124,16 @@ const CardTopSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
124
124
  }), (highlightRibbonIcon || highlightRibbonText) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardTopSectionRibbonContainer, {
125
125
  "data-testid": 'card-topSection-ribbon',
126
126
  $color: highlightRibbonContentColor ?? '',
127
- $backgroundColor: disabled ? _index.COLORS.getColor('neutral_300', theme) : highlightRibbonBgColor ?? '',
127
+ $backgroundColor: disabled ? _index.COLORS.generateToken({
128
+ componentType: 'bg-fill',
129
+ state: 'disabled'
130
+ }, theme) : highlightRibbonBgColor ?? '',
128
131
  children: [highlightRibbonIcon, highlightRibbonText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.ComponentS, {
129
- color: highlightRibbonContentColor ?? '',
132
+ color: disabled ? _index.COLORS.generateToken({
133
+ componentType: 'text',
134
+ isOnFill: true,
135
+ state: 'disabled'
136
+ }, theme) : highlightRibbonContentColor ?? '',
130
137
  textStyle: _typography.ComponentTextStyle.Regular,
131
138
  children: highlightRibbonText
132
139
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"CardTopSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_typography","_Checkbox","_interopRequireDefault","_Tag","_index","_Image","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardTopSectionImageContainer","exports","styled","div","CardTopSectionTagContainer","CardTopSectionContainer","props","disabled","CardTopSectionRibbonContainer","$backgroundColor","$color","CardTopSectionCheckboxContainer","COLORS","getColor","theme","CardTopSection","forwardRef","_ref","ref","selected","setSelected","image","tagLabel","tagIcon","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","useTheme","jsxs","style","height","children","jsx","ImageWithFallbacks","fallbacks","fallbackSrc","src","alt","loader","width","select","Tag","label","variant","icon","ComponentS","color","textStyle","ComponentTextStyle","Regular","propTypes","_propTypes","bool","func","string","node","shape","isRequired","_default"],"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,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAA+C,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAX,wBAAAW,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,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EA1IDjC,QAAQ,EAAAkC,UAAA,CAAAnE,OAAA,CAAAoE,IAAA;EAERlC,WAAW,EAAAiC,UAAA,CAAAnE,OAAA,CAAAqE,IAAA;EAEXjC,QAAQ,EAAA+B,UAAA,CAAAnE,OAAA,CAAAsE,MAAA;EAERjC,OAAO,EAAA8B,UAAA,CAAAnE,OAAA,CAAAuE,IAAA;EAIP/B,mBAAmB,EAAA2B,UAAA,CAAAnE,OAAA,CAAAsE,MAAA;EAEnB/B,mBAAmB,EAAA4B,UAAA,CAAAnE,OAAA,CAAAuE,IAAA;EAEnB9B,2BAA2B,EAAA0B,UAAA,CAAAnE,OAAA,CAAAsE,MAAA;EAE3B5B,sBAAsB,EAAAyB,UAAA,CAAAnE,OAAA,CAAAsE,MAAA;EAEtBnC,KAAK,EAAAgC,UAAA,CAAAnE,OAAA,CAAAwE,KAAA;IAAKpB,GAAG,EAAAe,UAAA,CAAAnE,OAAA,CAAAsE,MAAA,CAAAG,UAAA;IAAUtB,WAAW,EAAAgB,UAAA,CAAAnE,OAAA,CAAAsE,MAAA;IAAWjB,GAAG,EAAAc,UAAA,CAAAnE,OAAA,CAAAsE,MAAA,CAAAG,UAAA;IAAU3B,MAAM,EAAAqB,UAAA,CAAAnE,OAAA,CAAAsE,MAAA;IAAWf,KAAK,EAAAY,UAAA,CAAAnE,OAAA,CAAAsE,MAAA;IAAWhB,MAAM,EAAAa,UAAA,CAAAnE,OAAA,CAAAoE;EAAA;EAEjG/C,QAAQ,EAAA8C,UAAA,CAAAnE,OAAA,CAAAoE;AAAA;AAAA,IAAAM,QAAA,GAAA3D,OAAA,CAAAf,OAAA,GAwHK6B,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"CardTopSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_typography","_Checkbox","_interopRequireDefault","_Tag","_index","_Image","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardTopSectionImageContainer","exports","styled","div","CardTopSectionTagContainer","CardTopSectionContainer","props","disabled","CardTopSectionRibbonContainer","$backgroundColor","$color","CardTopSectionCheckboxContainer","COLORS","getColor","theme","CardTopSection","forwardRef","_ref","ref","selected","setSelected","image","tagLabel","tagIcon","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","useTheme","jsxs","style","height","children","jsx","ImageWithFallbacks","fallbacks","fallbackSrc","src","alt","loader","width","select","Tag","label","variant","icon","generateToken","componentType","state","ComponentS","color","isOnFill","textStyle","ComponentTextStyle","Regular","propTypes","_propTypes","bool","func","string","node","shape","isRequired","_default"],"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,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAC,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lC,2BAA2B,EAAA8B,UAAA,CAAAvE,OAAA,CAAA0E,MAAA;EAE3BhC,sBAAsB,EAAA6B,UAAA,CAAAvE,OAAA,CAAA0E,MAAA;EAEtBvC,KAAK,EAAAoC,UAAA,CAAAvE,OAAA,CAAA4E,KAAA;IAAKxB,GAAG,EAAAmB,UAAA,CAAAvE,OAAA,CAAA0E,MAAA,CAAAG,UAAA;IAAU1B,WAAW,EAAAoB,UAAA,CAAAvE,OAAA,CAAA0E,MAAA;IAAWrB,GAAG,EAAAkB,UAAA,CAAAvE,OAAA,CAAA0E,MAAA,CAAAG,UAAA;IAAU/B,MAAM,EAAAyB,UAAA,CAAAvE,OAAA,CAAA0E,MAAA;IAAWnB,KAAK,EAAAgB,UAAA,CAAAvE,OAAA,CAAA0E,MAAA;IAAWpB,MAAM,EAAAiB,UAAA,CAAAvE,OAAA,CAAAwE;EAAA;EAEjGnD,QAAQ,EAAAkD,UAAA,CAAAvE,OAAA,CAAAwE;AAAA;AAAA,IAAAM,QAAA,GAAA/D,OAAA,CAAAf,OAAA,GAwHK6B,cAAc","ignoreList":[]}
@@ -115,9 +115,16 @@ const CardTopSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
115
115
  }), (highlightRibbonIcon || highlightRibbonText) && /*#__PURE__*/_jsxs(CardTopSectionRibbonContainer, {
116
116
  "data-testid": 'card-topSection-ribbon',
117
117
  $color: highlightRibbonContentColor ?? '',
118
- $backgroundColor: disabled ? COLORS.getColor('neutral_300', theme) : highlightRibbonBgColor ?? '',
118
+ $backgroundColor: disabled ? COLORS.generateToken({
119
+ componentType: 'bg-fill',
120
+ state: 'disabled'
121
+ }, theme) : highlightRibbonBgColor ?? '',
119
122
  children: [highlightRibbonIcon, highlightRibbonText && /*#__PURE__*/_jsx(ComponentS, {
120
- color: highlightRibbonContentColor ?? '',
123
+ color: disabled ? COLORS.generateToken({
124
+ componentType: 'text',
125
+ isOnFill: true,
126
+ state: 'disabled'
127
+ }, theme) : highlightRibbonContentColor ?? '',
121
128
  textStyle: ComponentTextStyle.Regular,
122
129
  children: highlightRibbonText
123
130
  })]