@laerdal/life-react-components 5.0.0-dev.1 → 5.0.0-dev.2

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 (240) hide show
  1. package/dist/Accordion/AccordionItem.cjs +1 -1
  2. package/dist/Accordion/AccordionItem.cjs.map +1 -1
  3. package/dist/Accordion/AccordionItem.js +1 -1
  4. package/dist/Accordion/AccordionItem.js.map +1 -1
  5. package/dist/Accordion/styles.cjs +3 -3
  6. package/dist/Accordion/styles.cjs.map +1 -1
  7. package/dist/Accordion/styles.d.ts +1 -1
  8. package/dist/Accordion/styles.js +3 -3
  9. package/dist/Accordion/styles.js.map +1 -1
  10. package/dist/AuthPage/AuthPage.cjs +1 -1
  11. package/dist/AuthPage/AuthPage.cjs.map +1 -1
  12. package/dist/AuthPage/AuthPage.js +1 -1
  13. package/dist/AuthPage/AuthPage.js.map +1 -1
  14. package/dist/AuthPage/ScreenSetsContainer.cjs +1 -1
  15. package/dist/AuthPage/ScreenSetsContainer.cjs.map +1 -1
  16. package/dist/AuthPage/ScreenSetsContainer.d.ts +1 -1
  17. package/dist/AuthPage/ScreenSetsContainer.js +1 -1
  18. package/dist/AuthPage/ScreenSetsContainer.js.map +1 -1
  19. package/dist/Banners/Banner.cjs +8 -8
  20. package/dist/Banners/Banner.cjs.map +1 -1
  21. package/dist/Banners/Banner.d.ts +8 -2
  22. package/dist/Banners/Banner.js +8 -8
  23. package/dist/Banners/Banner.js.map +1 -1
  24. package/dist/Banners/OverviewBanner.d.ts +4 -4
  25. package/dist/Breadcrumb/Breadcrumb.cjs +2 -2
  26. package/dist/Breadcrumb/Breadcrumb.cjs.map +1 -1
  27. package/dist/Breadcrumb/Breadcrumb.js +2 -2
  28. package/dist/Breadcrumb/Breadcrumb.js.map +1 -1
  29. package/dist/Breadcrumb/styles.cjs +5 -5
  30. package/dist/Breadcrumb/styles.cjs.map +1 -1
  31. package/dist/Breadcrumb/styles.d.ts +2 -2
  32. package/dist/Breadcrumb/styles.js +5 -5
  33. package/dist/Breadcrumb/styles.js.map +1 -1
  34. package/dist/Button/BackButton.cjs +2 -2
  35. package/dist/Button/BackButton.cjs.map +1 -1
  36. package/dist/Button/BackButton.js +2 -2
  37. package/dist/Button/BackButton.js.map +1 -1
  38. package/dist/Button/Button.cjs +1 -1
  39. package/dist/Button/Button.cjs.map +1 -1
  40. package/dist/Button/Button.js +1 -1
  41. package/dist/Button/Button.js.map +1 -1
  42. package/dist/Button/DualFunctionButton.cjs +5 -5
  43. package/dist/Button/DualFunctionButton.cjs.map +1 -1
  44. package/dist/Button/DualFunctionButton.js +5 -5
  45. package/dist/Button/DualFunctionButton.js.map +1 -1
  46. package/dist/Button/Iconbutton.cjs +25 -23
  47. package/dist/Button/Iconbutton.cjs.map +1 -1
  48. package/dist/Button/Iconbutton.d.ts +24 -3
  49. package/dist/Button/Iconbutton.js +25 -23
  50. package/dist/Button/Iconbutton.js.map +1 -1
  51. package/dist/Card/VerticalCard/CardBottomSection.cjs +2 -2
  52. package/dist/Card/VerticalCard/CardBottomSection.cjs.map +1 -1
  53. package/dist/Card/VerticalCard/CardBottomSection.d.ts +1 -1
  54. package/dist/Card/VerticalCard/CardBottomSection.js +2 -2
  55. package/dist/Card/VerticalCard/CardBottomSection.js.map +1 -1
  56. package/dist/Card/VerticalCard/CardMiddleSection.cjs +2 -2
  57. package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +1 -1
  58. package/dist/Card/VerticalCard/CardMiddleSection.d.ts +2 -2
  59. package/dist/Card/VerticalCard/CardMiddleSection.js +2 -2
  60. package/dist/Card/VerticalCard/CardMiddleSection.js.map +1 -1
  61. package/dist/Dropdown/BasicDropdown.cjs +9 -9
  62. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  63. package/dist/Dropdown/BasicDropdown.js +9 -9
  64. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  65. package/dist/Dropdown/CommonStyling.cjs +10 -10
  66. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  67. package/dist/Dropdown/CommonStyling.d.ts +9 -9
  68. package/dist/Dropdown/CommonStyling.js +10 -10
  69. package/dist/Dropdown/CommonStyling.js.map +1 -1
  70. package/dist/Dropdown/DropdownContent.cjs +41 -41
  71. package/dist/Dropdown/DropdownContent.cjs.map +1 -1
  72. package/dist/Dropdown/DropdownContent.d.ts +12 -12
  73. package/dist/Dropdown/DropdownContent.js +41 -41
  74. package/dist/Dropdown/DropdownContent.js.map +1 -1
  75. package/dist/Dropdown/DropdownFilter.cjs +8 -8
  76. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  77. package/dist/Dropdown/DropdownFilter.js +8 -8
  78. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  79. package/dist/Footer/Components/FooterDropdownLinks.cjs +3 -3
  80. package/dist/Footer/Components/FooterDropdownLinks.cjs.map +1 -1
  81. package/dist/Footer/Components/FooterDropdownLinks.js +3 -3
  82. package/dist/Footer/Components/FooterDropdownLinks.js.map +1 -1
  83. package/dist/Footer/Components/FooterNavSection.cjs +2 -2
  84. package/dist/Footer/Components/FooterNavSection.cjs.map +1 -1
  85. package/dist/Footer/Components/FooterNavSection.js +2 -2
  86. package/dist/Footer/Components/FooterNavSection.js.map +1 -1
  87. package/dist/Footer/SiteFooter.cjs +3 -3
  88. package/dist/Footer/SiteFooter.cjs.map +1 -1
  89. package/dist/Footer/SiteFooter.js +3 -3
  90. package/dist/Footer/SiteFooter.js.map +1 -1
  91. package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs +5 -5
  92. package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs.map +1 -1
  93. package/dist/GlobalNavigationBar/GlobalNavigationBar.js +5 -5
  94. package/dist/GlobalNavigationBar/GlobalNavigationBar.js.map +1 -1
  95. package/dist/GlobalNavigationBar/Logo.cjs +4 -4
  96. package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
  97. package/dist/GlobalNavigationBar/Logo.js +4 -4
  98. package/dist/GlobalNavigationBar/Logo.js.map +1 -1
  99. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs +2 -13
  100. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +1 -1
  101. package/dist/GlobalNavigationBar/desktop/MainMenu.js +2 -13
  102. package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +1 -1
  103. package/dist/GlobalNavigationBar/desktop/SubMenu.cjs +5 -5
  104. package/dist/GlobalNavigationBar/desktop/SubMenu.cjs.map +1 -1
  105. package/dist/GlobalNavigationBar/desktop/SubMenu.d.ts +2 -2
  106. package/dist/GlobalNavigationBar/desktop/SubMenu.js +5 -5
  107. package/dist/GlobalNavigationBar/desktop/SubMenu.js.map +1 -1
  108. package/dist/HyperLink/HyperLink.cjs +3 -3
  109. package/dist/HyperLink/HyperLink.cjs.map +1 -1
  110. package/dist/HyperLink/HyperLink.d.ts +2 -2
  111. package/dist/HyperLink/HyperLink.js +3 -3
  112. package/dist/HyperLink/HyperLink.js.map +1 -1
  113. package/dist/InputFields/Checkbox.cjs +4 -4
  114. package/dist/InputFields/Checkbox.cjs.map +1 -1
  115. package/dist/InputFields/Checkbox.d.ts +3 -3
  116. package/dist/InputFields/Checkbox.js +4 -4
  117. package/dist/InputFields/Checkbox.js.map +1 -1
  118. package/dist/InputFields/DatepickerField.cjs +9 -9
  119. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  120. package/dist/InputFields/DatepickerField.js +9 -9
  121. package/dist/InputFields/DatepickerField.js.map +1 -1
  122. package/dist/InputFields/Label.cjs +2 -2
  123. package/dist/InputFields/Label.cjs.map +1 -1
  124. package/dist/InputFields/Label.js +2 -2
  125. package/dist/InputFields/Label.js.map +1 -1
  126. package/dist/InputFields/NumberField.cjs +24 -24
  127. package/dist/InputFields/NumberField.cjs.map +1 -1
  128. package/dist/InputFields/NumberField.js +24 -24
  129. package/dist/InputFields/NumberField.js.map +1 -1
  130. package/dist/InputFields/PasswordField.cjs +4 -4
  131. package/dist/InputFields/PasswordField.cjs.map +1 -1
  132. package/dist/InputFields/PasswordField.js +4 -4
  133. package/dist/InputFields/PasswordField.js.map +1 -1
  134. package/dist/InputFields/SearchBar.cjs +2 -2
  135. package/dist/InputFields/SearchBar.cjs.map +1 -1
  136. package/dist/InputFields/SearchBar.js +2 -2
  137. package/dist/InputFields/SearchBar.js.map +1 -1
  138. package/dist/InputFields/TextField.cjs +5 -5
  139. package/dist/InputFields/TextField.cjs.map +1 -1
  140. package/dist/InputFields/TextField.js +5 -5
  141. package/dist/InputFields/TextField.js.map +1 -1
  142. package/dist/InputFields/Textarea.cjs +3 -3
  143. package/dist/InputFields/Textarea.cjs.map +1 -1
  144. package/dist/InputFields/Textarea.js +3 -3
  145. package/dist/InputFields/Textarea.js.map +1 -1
  146. package/dist/InputFields/components/SearchField.cjs.map +1 -1
  147. package/dist/InputFields/components/SearchField.d.ts +1 -1
  148. package/dist/InputFields/components/SearchField.js.map +1 -1
  149. package/dist/InputFields/styling.cjs +7 -7
  150. package/dist/InputFields/styling.cjs.map +1 -1
  151. package/dist/InputFields/styling.d.ts +9 -9
  152. package/dist/InputFields/styling.js +7 -7
  153. package/dist/InputFields/styling.js.map +1 -1
  154. package/dist/Layouts/index.cjs +11 -11
  155. package/dist/Layouts/index.cjs.map +1 -1
  156. package/dist/Layouts/index.d.ts +6 -6
  157. package/dist/Layouts/index.js +11 -11
  158. package/dist/Layouts/index.js.map +1 -1
  159. package/dist/LoadingPage/GlobalLoadingPage.cjs.map +1 -1
  160. package/dist/LoadingPage/GlobalLoadingPage.js.map +1 -1
  161. package/dist/MenuItem/MenuItem.cjs +8 -8
  162. package/dist/MenuItem/MenuItem.cjs.map +1 -1
  163. package/dist/MenuItem/MenuItem.d.ts +2 -2
  164. package/dist/MenuItem/MenuItem.js +8 -8
  165. package/dist/MenuItem/MenuItem.js.map +1 -1
  166. package/dist/Modals/ModalDialog.cjs +11 -11
  167. package/dist/Modals/ModalDialog.cjs.map +1 -1
  168. package/dist/Modals/ModalDialog.js +11 -11
  169. package/dist/Modals/ModalDialog.js.map +1 -1
  170. package/dist/Modals/ModalNote.cjs +8 -8
  171. package/dist/Modals/ModalNote.cjs.map +1 -1
  172. package/dist/Modals/ModalNote.js +8 -8
  173. package/dist/Modals/ModalNote.js.map +1 -1
  174. package/dist/Modals/ModalStyles.cjs +19 -19
  175. package/dist/Modals/ModalStyles.cjs.map +1 -1
  176. package/dist/Modals/ModalStyles.d.ts +17 -17
  177. package/dist/Modals/ModalStyles.js +19 -19
  178. package/dist/Modals/ModalStyles.js.map +1 -1
  179. package/dist/NotificationDot/NotificationDot.cjs +11 -12
  180. package/dist/NotificationDot/NotificationDot.cjs.map +1 -1
  181. package/dist/NotificationDot/NotificationDot.js +11 -12
  182. package/dist/NotificationDot/NotificationDot.js.map +1 -1
  183. package/dist/Popover/Popover.cjs +40 -40
  184. package/dist/Popover/Popover.cjs.map +1 -1
  185. package/dist/Popover/Popover.d.ts +9 -9
  186. package/dist/Popover/Popover.js +40 -40
  187. package/dist/Popover/Popover.js.map +1 -1
  188. package/dist/QuizButton/QuizButton.cjs +14 -14
  189. package/dist/QuizButton/QuizButton.cjs.map +1 -1
  190. package/dist/QuizButton/QuizButton.js +14 -14
  191. package/dist/QuizButton/QuizButton.js.map +1 -1
  192. package/dist/Table/Table.cjs +1 -1
  193. package/dist/Table/Table.cjs.map +1 -1
  194. package/dist/Table/Table.js +1 -1
  195. package/dist/Table/Table.js.map +1 -1
  196. package/dist/Table/TableBody.cjs +2 -2
  197. package/dist/Table/TableBody.cjs.map +1 -1
  198. package/dist/Table/TableBody.js +2 -2
  199. package/dist/Table/TableBody.js.map +1 -1
  200. package/dist/Table/TableStyles.cjs +4 -4
  201. package/dist/Table/TableStyles.cjs.map +1 -1
  202. package/dist/Table/TableStyles.d.ts +3 -3
  203. package/dist/Table/TableStyles.js +4 -4
  204. package/dist/Table/TableStyles.js.map +1 -1
  205. package/dist/Tabs/TabLink.cjs +3 -3
  206. package/dist/Tabs/TabLink.cjs.map +1 -1
  207. package/dist/Tabs/TabLink.js +3 -3
  208. package/dist/Tabs/TabLink.js.map +1 -1
  209. package/dist/Tabs/Tabs.cjs.map +1 -1
  210. package/dist/Tabs/Tabs.js.map +1 -1
  211. package/dist/Tag/Tag.cjs +6 -6
  212. package/dist/Tag/Tag.cjs.map +1 -1
  213. package/dist/Tag/Tag.js +6 -6
  214. package/dist/Tag/Tag.js.map +1 -1
  215. package/dist/Toasters/Toast.cjs +16 -16
  216. package/dist/Toasters/Toast.cjs.map +1 -1
  217. package/dist/Toasters/Toast.d.ts +6 -7
  218. package/dist/Toasters/Toast.js +16 -16
  219. package/dist/Toasters/Toast.js.map +1 -1
  220. package/dist/Toggles/ToggleSwitch.cjs +1 -1
  221. package/dist/Toggles/ToggleSwitch.cjs.map +1 -1
  222. package/dist/Toggles/ToggleSwitch.js +1 -1
  223. package/dist/Toggles/ToggleSwitch.js.map +1 -1
  224. package/dist/Toggles/TogglerStyles.cjs.map +1 -1
  225. package/dist/Toggles/TogglerStyles.d.ts +1 -1
  226. package/dist/Toggles/TogglerStyles.js.map +1 -1
  227. package/dist/Tooltips/TooltipOverflow.cjs +7 -7
  228. package/dist/Tooltips/TooltipOverflow.cjs.map +1 -1
  229. package/dist/Tooltips/TooltipOverflow.js +7 -7
  230. package/dist/Tooltips/TooltipOverflow.js.map +1 -1
  231. package/dist/Tooltips/TooltipStyles.cjs +29 -29
  232. package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
  233. package/dist/Tooltips/TooltipStyles.d.ts +9 -9
  234. package/dist/Tooltips/TooltipStyles.js +29 -29
  235. package/dist/Tooltips/TooltipStyles.js.map +1 -1
  236. package/dist/Tooltips/TooltipWrapper.cjs +7 -7
  237. package/dist/Tooltips/TooltipWrapper.cjs.map +1 -1
  238. package/dist/Tooltips/TooltipWrapper.js +7 -7
  239. package/dist/Tooltips/TooltipWrapper.js.map +1 -1
  240. package/package.json +1 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_","_jsxRuntime","_excluded","_templateObject","_templateObject2","_templateObject3","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","Container","styled","div","_taggedTemplateLiteral2","props","isLabelPresent","COLORS","getColor","theme","IconContainer","TextContainer","ComponentXSStyling","ComponentTextStyle","Bold","Tag","_ref","label","icon","_ref$variant","variant","className","rest","_objectWithoutProperties2","cls","concat","jsxs","children","jsx","propTypes","_propTypes","string","node","oneOf","_default","exports"],"sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';\r\n\r\nconst Container = styled.div<{variant: TagVariants, isLabelPresent: boolean}>`\r\n display: flex;\r\n padding: 4px;\r\n height: 24px;\r\n width: calc(100%);\r\n max-width: fit-content;\r\n align-items: center;\r\n justify-content: center;\r\n min-width: ${props=>props.isLabelPresent ? '64px' : ''};\r\n border-radius: 2px;\r\n box-sizing: border-box;\r\n\r\n &.neutral {\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n &.positive {\r\n background-color: ${props => COLORS.getColor('correct_100', props.theme)};\r\n color: ${props => COLORS.getColor('correct_600', props.theme)};\r\n }\r\n &.warning {\r\n background-color: ${props => COLORS.getColor('warning_100', props.theme)};\r\n color: ${props => COLORS.getColor('warning_600', props.theme)};\r\n }\r\n &.critical {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n &.accent1 {\r\n background-color: ${props => COLORS.getColor('accent1_100', props.theme)};\r\n color: ${props => COLORS.getColor('accent1_600', props.theme)};\r\n }\r\n &.accent2 {\r\n background-color: ${props => COLORS.getColor('accent2_100', props.theme)};\r\n color: ${props => COLORS.getColor('accent2_600', props.theme)};\r\n }\r\n\r\n`;\r\n\r\nconst IconContainer = styled.div<{variant: TagVariants}>`\r\n display: flex;\r\n width: 16px;\r\n height: 16px;\r\n svg {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n`;\r\n\r\nconst TextContainer = styled.div<{variant: TagVariants, icon: React.ReactNode}>`\r\n height: 16px;\r\n padding: 0 4px;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n overflow: hidden; \r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n`;\r\n\r\n\r\nexport type TagVariants = 'neutral' | 'positive' | 'warning' | 'critical' | 'accent1' | 'accent2';\r\n\r\nexport type TagProps = React.HTMLAttributes<HTMLDivElement> & {\r\n /** Optional. Label to be shown in the Tag. */\r\n label?: string;\r\n /** Optional. Icon to be shown in the tag. */\r\n icon?: React.ReactNode;\r\n /** Optional. Style Variant of the Tag. Defaults to 'neutral' */\r\n variant?: TagVariants;\r\n}\r\n\r\nconst Tag: React.FunctionComponent<TagProps> = ({label, icon, variant='neutral', className, ...rest}) => {\r\n const cls = `${className ?? ''} ${variant}`;\r\n return ( \r\n <Container variant={variant} isLabelPresent={!!label} className={cls} {...rest}>\r\n {icon && <IconContainer variant={variant} data-testid={'iconContainer'}>\r\n {icon}\r\n </IconContainer>\r\n }\r\n {label && <TextContainer variant={variant} icon={icon}>\r\n {label}\r\n </TextContainer>\r\n }\r\n </Container>\r\n );\r\n};\r\n\r\nexport default Tag;\r\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,CAAA,GAAAH,OAAA;AAAoE,IAAAI,WAAA,GAAAJ,OAAA;AAAA,IAAAK,SAAA;AAAA,IAA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AAAG,KAAA,EARiB,SAAS,EAAG,UAAU,EAAG,SAAS,EAAG,UAAU,EAAG,SAAS,EAAG,SAAS;AAAA;AAAA,IAAAC,QAAA,GA2BlFnB,GAAG;AAAAoB,OAAA,cAAAD,QAAA","ignoreList":[]}
1
+ {"version":3,"file":"Tag.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_","_jsxRuntime","_excluded","_templateObject","_templateObject2","_templateObject3","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","Container","styled","div","_taggedTemplateLiteral2","props","$isLabelPresent","COLORS","getColor","theme","IconContainer","TextContainer","ComponentXSStyling","ComponentTextStyle","Bold","Tag","_ref","label","icon","_ref$variant","variant","className","rest","_objectWithoutProperties2","cls","concat","jsxs","$variant","children","jsx","$icon","propTypes","_propTypes","string","node","oneOf","_default","exports"],"sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';\r\n\r\nconst Container = styled.div<{$variant: TagVariants, $isLabelPresent: boolean}>`\r\n display: flex;\r\n padding: 4px;\r\n height: 24px;\r\n width: calc(100%);\r\n max-width: fit-content;\r\n align-items: center;\r\n justify-content: center;\r\n min-width: ${props=>props.$isLabelPresent ? '64px' : ''};\r\n border-radius: 2px;\r\n box-sizing: border-box;\r\n\r\n &.neutral {\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n &.positive {\r\n background-color: ${props => COLORS.getColor('correct_100', props.theme)};\r\n color: ${props => COLORS.getColor('correct_600', props.theme)};\r\n }\r\n &.warning {\r\n background-color: ${props => COLORS.getColor('warning_100', props.theme)};\r\n color: ${props => COLORS.getColor('warning_600', props.theme)};\r\n }\r\n &.critical {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n &.accent1 {\r\n background-color: ${props => COLORS.getColor('accent1_100', props.theme)};\r\n color: ${props => COLORS.getColor('accent1_600', props.theme)};\r\n }\r\n &.accent2 {\r\n background-color: ${props => COLORS.getColor('accent2_100', props.theme)};\r\n color: ${props => COLORS.getColor('accent2_600', props.theme)};\r\n }\r\n\r\n`;\r\n\r\nconst IconContainer = styled.div<{$variant: TagVariants}>`\r\n display: flex;\r\n width: 16px;\r\n height: 16px;\r\n svg {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n`;\r\n\r\nconst TextContainer = styled.div<{$variant: TagVariants, $icon: React.ReactNode}>`\r\n height: 16px;\r\n padding: 0 4px;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n overflow: hidden; \r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n`;\r\n\r\n\r\nexport type TagVariants = 'neutral' | 'positive' | 'warning' | 'critical' | 'accent1' | 'accent2';\r\n\r\nexport type TagProps = React.HTMLAttributes<HTMLDivElement> & {\r\n /** Optional. Label to be shown in the Tag. */\r\n label?: string;\r\n /** Optional. Icon to be shown in the tag. */\r\n icon?: React.ReactNode;\r\n /** Optional. Style Variant of the Tag. Defaults to 'neutral' */\r\n variant?: TagVariants;\r\n}\r\n\r\nconst Tag: React.FunctionComponent<TagProps> = ({label, icon, variant='neutral', className, ...rest}) => {\r\n const cls = `${className ?? ''} ${variant}`;\r\n return ( \r\n <Container $variant={variant} $isLabelPresent={!!label} className={cls} {...rest}>\r\n {icon && <IconContainer $variant={variant} data-testid={'iconContainer'}>\r\n {icon}\r\n </IconContainer>\r\n }\r\n {label && <TextContainer $variant={variant} $icon={icon}>\r\n {label}\r\n </TextContainer>\r\n }\r\n </Container>\r\n );\r\n};\r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AAEP,OAAQ;MAACU,KAAK,EAAEZ,IAAK;MAAAU,QAAA,EACnDX;IAAK,CACO,CAAC;EAAA,EAET,CAAC;AAEhB,CAAC;AAACF,GAAA,CAAAgB,SAAA;EArBAd,KAAK,EAAAe,UAAA,YAAAC,MAAA;EAELf,IAAI,EAAAc,UAAA,YAAAE,IAAA;EAEJd,OAAO,EAAAY,UAAA,YAAAG,KAAA,EARiB,SAAS,EAAG,UAAU,EAAG,SAAS,EAAG,UAAU,EAAG,SAAS,EAAG,SAAS;AAAA;AAAA,IAAAC,QAAA,GA2BlFrB,GAAG;AAAAsB,OAAA,cAAAD,QAAA","ignoreList":[]}
package/dist/Tag/Tag.js CHANGED
@@ -12,7 +12,7 @@ import { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
14
  var Container = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n padding: 4px;\n height: 24px;\n width: calc(100%);\n max-width: fit-content;\n align-items: center;\n justify-content: center;\n min-width: ", ";\n border-radius: 2px;\n box-sizing: border-box;\n\n &.neutral {\n background-color: ", ";\n color: ", ";\n }\n &.positive {\n background-color: ", ";\n color: ", ";\n }\n &.warning {\n background-color: ", ";\n color: ", ";\n }\n &.critical {\n background-color: ", ";\n color: ", ";\n }\n &.accent1 {\n background-color: ", ";\n color: ", ";\n }\n &.accent2 {\n background-color: ", ";\n color: ", ";\n }\n\n"])), function (props) {
15
- return props.isLabelPresent ? '64px' : '';
15
+ return props.$isLabelPresent ? '64px' : '';
16
16
  }, function (props) {
17
17
  return COLORS.getColor('neutral_100', props.theme);
18
18
  }, function (props) {
@@ -49,17 +49,17 @@ var Tag = function Tag(_ref) {
49
49
  rest = _objectWithoutProperties(_ref, _excluded);
50
50
  var cls = "".concat(className !== null && className !== void 0 ? className : '', " ").concat(variant);
51
51
  return /*#__PURE__*/_jsxs(Container, _objectSpread(_objectSpread({
52
- variant: variant,
53
- isLabelPresent: !!label,
52
+ $variant: variant,
53
+ $isLabelPresent: !!label,
54
54
  className: cls
55
55
  }, rest), {}, {
56
56
  children: [icon && /*#__PURE__*/_jsx(IconContainer, {
57
- variant: variant,
57
+ $variant: variant,
58
58
  "data-testid": 'iconContainer',
59
59
  children: icon
60
60
  }), label && /*#__PURE__*/_jsx(TextContainer, {
61
- variant: variant,
62
- icon: icon,
61
+ $variant: variant,
62
+ $icon: icon,
63
63
  children: label
64
64
  })]
65
65
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","names":["React","styled","COLORS","ComponentTextStyle","ComponentXSStyling","jsx","_jsx","jsxs","_jsxs","Container","div","_templateObject","_taggedTemplateLiteral","props","isLabelPresent","getColor","theme","IconContainer","_templateObject2","TextContainer","_templateObject3","Bold","Tag","_ref","label","icon","_ref$variant","variant","className","rest","_objectWithoutProperties","_excluded","cls","concat","_objectSpread","children","propTypes","_pt","string","node","oneOf"],"sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';\r\n\r\nconst Container = styled.div<{variant: TagVariants, isLabelPresent: boolean}>`\r\n display: flex;\r\n padding: 4px;\r\n height: 24px;\r\n width: calc(100%);\r\n max-width: fit-content;\r\n align-items: center;\r\n justify-content: center;\r\n min-width: ${props=>props.isLabelPresent ? '64px' : ''};\r\n border-radius: 2px;\r\n box-sizing: border-box;\r\n\r\n &.neutral {\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n &.positive {\r\n background-color: ${props => COLORS.getColor('correct_100', props.theme)};\r\n color: ${props => COLORS.getColor('correct_600', props.theme)};\r\n }\r\n &.warning {\r\n background-color: ${props => COLORS.getColor('warning_100', props.theme)};\r\n color: ${props => COLORS.getColor('warning_600', props.theme)};\r\n }\r\n &.critical {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n &.accent1 {\r\n background-color: ${props => COLORS.getColor('accent1_100', props.theme)};\r\n color: ${props => COLORS.getColor('accent1_600', props.theme)};\r\n }\r\n &.accent2 {\r\n background-color: ${props => COLORS.getColor('accent2_100', props.theme)};\r\n color: ${props => COLORS.getColor('accent2_600', props.theme)};\r\n }\r\n\r\n`;\r\n\r\nconst IconContainer = styled.div<{variant: TagVariants}>`\r\n display: flex;\r\n width: 16px;\r\n height: 16px;\r\n svg {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n`;\r\n\r\nconst TextContainer = styled.div<{variant: TagVariants, icon: React.ReactNode}>`\r\n height: 16px;\r\n padding: 0 4px;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n overflow: hidden; \r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n`;\r\n\r\n\r\nexport type TagVariants = 'neutral' | 'positive' | 'warning' | 'critical' | 'accent1' | 'accent2';\r\n\r\nexport type TagProps = React.HTMLAttributes<HTMLDivElement> & {\r\n /** Optional. Label to be shown in the Tag. */\r\n label?: string;\r\n /** Optional. Icon to be shown in the tag. */\r\n icon?: React.ReactNode;\r\n /** Optional. Style Variant of the Tag. Defaults to 'neutral' */\r\n variant?: TagVariants;\r\n}\r\n\r\nconst Tag: React.FunctionComponent<TagProps> = ({label, icon, variant='neutral', className, ...rest}) => {\r\n const cls = `${className ?? ''} ${variant}`;\r\n return ( \r\n <Container variant={variant} isLabelPresent={!!label} className={cls} {...rest}>\r\n {icon && <IconContainer variant={variant} data-testid={'iconContainer'}>\r\n {icon}\r\n </IconContainer>\r\n }\r\n {label && <TextContainer variant={variant} icon={icon}>\r\n {label}\r\n </TextContainer>\r\n }\r\n </Container>\r\n );\r\n};\r\n\r\nexport default Tag;\r\n"],"mappings":";;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAO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W,aAAa;MAACU,OAAO,EAAEA,OAAQ;MAAC,eAAa,eAAgB;MAAAQ,QAAA,EAClEV;IAAI,CACQ,CAAC,EAEjBD,KAAK,iBAAIlB,IAAA,CAACa,aAAa;MAACQ,OAAO,EAAEA,OAAQ;MAACF,IAAI,EAAEA,IAAK;MAAAU,QAAA,EACjDX;IAAK,CACO,CAAC;EAAA,EAET,CAAC;AAEhB,CAAC;AAACF,GAAA,CAAAc,SAAA;EArBAZ,KAAK,EAAAa,GAAA,CAAAC,MAAA;EAELb,IAAI,EAAAY,GAAA,CAAAE,IAAA;EAEJZ,OAAO,EAAAU,GAAA,CAAAG,KAAA,EARiB,SAAS,EAAG,UAAU,EAAG,SAAS,EAAG,UAAU,EAAG,SAAS,EAAG,SAAS;AAAA;AA2BjG,eAAelB,GAAG","ignoreList":[]}
1
+ {"version":3,"file":"Tag.js","names":["React","styled","COLORS","ComponentTextStyle","ComponentXSStyling","jsx","_jsx","jsxs","_jsxs","Container","div","_templateObject","_taggedTemplateLiteral","props","$isLabelPresent","getColor","theme","IconContainer","_templateObject2","TextContainer","_templateObject3","Bold","Tag","_ref","label","icon","_ref$variant","variant","className","rest","_objectWithoutProperties","_excluded","cls","concat","_objectSpread","$variant","children","$icon","propTypes","_pt","string","node","oneOf"],"sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';\r\n\r\nconst Container = styled.div<{$variant: TagVariants, $isLabelPresent: boolean}>`\r\n display: flex;\r\n padding: 4px;\r\n height: 24px;\r\n width: calc(100%);\r\n max-width: fit-content;\r\n align-items: center;\r\n justify-content: center;\r\n min-width: ${props=>props.$isLabelPresent ? '64px' : ''};\r\n border-radius: 2px;\r\n box-sizing: border-box;\r\n\r\n &.neutral {\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n &.positive {\r\n background-color: ${props => COLORS.getColor('correct_100', props.theme)};\r\n color: ${props => COLORS.getColor('correct_600', props.theme)};\r\n }\r\n &.warning {\r\n background-color: ${props => COLORS.getColor('warning_100', props.theme)};\r\n color: ${props => COLORS.getColor('warning_600', props.theme)};\r\n }\r\n &.critical {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n &.accent1 {\r\n background-color: ${props => COLORS.getColor('accent1_100', props.theme)};\r\n color: ${props => COLORS.getColor('accent1_600', props.theme)};\r\n }\r\n &.accent2 {\r\n background-color: ${props => COLORS.getColor('accent2_100', props.theme)};\r\n color: ${props => COLORS.getColor('accent2_600', props.theme)};\r\n }\r\n\r\n`;\r\n\r\nconst IconContainer = styled.div<{$variant: TagVariants}>`\r\n display: flex;\r\n width: 16px;\r\n height: 16px;\r\n svg {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n`;\r\n\r\nconst TextContainer = styled.div<{$variant: TagVariants, $icon: React.ReactNode}>`\r\n height: 16px;\r\n padding: 0 4px;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n overflow: hidden; \r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n`;\r\n\r\n\r\nexport type TagVariants = 'neutral' | 'positive' | 'warning' | 'critical' | 'accent1' | 'accent2';\r\n\r\nexport type TagProps = React.HTMLAttributes<HTMLDivElement> & {\r\n /** Optional. Label to be shown in the Tag. */\r\n label?: string;\r\n /** Optional. Icon to be shown in the tag. */\r\n icon?: React.ReactNode;\r\n /** Optional. Style Variant of the Tag. Defaults to 'neutral' */\r\n variant?: TagVariants;\r\n}\r\n\r\nconst Tag: React.FunctionComponent<TagProps> = ({label, icon, variant='neutral', className, ...rest}) => {\r\n const cls = `${className ?? ''} ${variant}`;\r\n return ( \r\n <Container $variant={variant} $isLabelPresent={!!label} className={cls} {...rest}>\r\n {icon && <IconContainer $variant={variant} data-testid={'iconContainer'}>\r\n {icon}\r\n </IconContainer>\r\n }\r\n {label && <TextContainer $variant={variant} $icon={icon}>\r\n {label}\r\n </TextContainer>\r\n }\r\n </Container>\r\n );\r\n};\r\n\r\nexport default Tag;\r\n"],"mappings":";;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAASC,MAAM,EAAEC,kBAAkB,EAAEC,kBAAkB,QAAQ,IAAI;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEpE,IAAMC,SAAS,GAAGR,MAAM,CAACS,GAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,sBAAA,koBAQb,UAAAC,KAAK;EAAA,OAAEA,KAAK,CAACC,eAAe,GAAG,MAAM,GAAG,EAAE;AAAA,GAKjC,UAAAD,KAAK;EAAA,OAAIX,MAAM,CAACa,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAC/D,UAAAH,KAAK;EAAA,OAAIX,MAAM,CAACa,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAGzC,UAAAH,KAAK;EAAA,OAAIX,MAAM,CAACa,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAC/D,UAAAH,KAAK;EAAA,OAAIX,MAAM,CAACa,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAGzC,UAAAH,KAAK;EAAA,OAAIX,MAAM,CAACa,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAC/D,UAAAH,KAAK;EAAA,OAAIX,MAAM,CAACa,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAGzC,UAAAH,KAAK;EAAA,OAAIX,MAAM,CAACa,QAAQ,CAAC,cAAc,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAChE,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AAA,CAACC,SAAS,EAAAyB,aAAA,CAAAA,aAAA;IAACC,QAAQ,EAAER,OAAQ;IAACb,eAAe,EAAE,CAAC,CAACU,KAAM;IAACI,SAAS,EAAEI;EAAI,GAAKH,IAAI;IAAAO,QAAA,GAC7EX,IAAI,iBAAInB,IAAA,CAACW,aAAa;MAACkB,QAAQ,EAAER,OAAQ;MAAC,eAAa,eAAgB;MAAAS,QAAA,EACnEX;IAAI,CACQ,CAAC,EAEjBD,KAAK,iBAAIlB,IAAA,CAACa,aAAa;MAACgB,QAAQ,EAAER,OAAQ;MAACU,KAAK,EAAEZ,IAAK;MAAAW,QAAA,EACnDZ;IAAK,CACO,CAAC;EAAA,EAET,CAAC;AAEhB,CAAC;AAACF,GAAA,CAAAgB,SAAA;EArBAd,KAAK,EAAAe,GAAA,CAAAC,MAAA;EAELf,IAAI,EAAAc,GAAA,CAAAE,IAAA;EAEJd,OAAO,EAAAY,GAAA,CAAAG,KAAA,EARiB,SAAS,EAAG,UAAU,EAAG,SAAS,EAAG,UAAU,EAAG,SAAS,EAAG,SAAS;AAAA;AA2BjG,eAAepB,GAAG","ignoreList":[]}
@@ -25,7 +25,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
25
25
  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) { (0, _defineProperty2["default"])(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; }
26
26
  var LoaderAnimationKeyframes = (0, _styledComponents.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n 0% {\n background-position: right;\n }\n 100% {\n background-position: left;\n }\n"])));
27
27
  var Loader = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 4px;\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n\n animation: ", " ", "ms cubic-bezier(0.18, 0.39, 0.35, 1);\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n"])), LoaderAnimationKeyframes, function (props) {
28
- return props.duration;
28
+ return props.$duration;
29
29
  }, _types.ToastColor[_types.ToastColor.BLACK], function (props) {
30
30
  return _styles.COLORS.getColor('neutral_200', props.theme);
31
31
  }, function (props) {
@@ -52,17 +52,17 @@ var Loader = _styledComponents["default"].div(_templateObject2 || (_templateObje
52
52
  return _styles.COLORS.getColor('critical_500', props.theme);
53
53
  });
54
54
  var ToastContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n box-shadow: ", ";\n border-radius: 4px;\n\n animation: ", " ", " ", ";\n transform: ", ";\n\n transition: all 300ms cubic-bezier(0.64, 0.04, 0.35, 1);\n\n padding: 0 ", " ", " 16px;\n\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 16px;\n justify-content: left;\n\n position: relative;\n\n width: max-content;\n min-height: 48px;\n box-sizing: border-box;\n\n ", "\n\n & a {\n display: inline;\n ", "\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n color: ", ";\n\n & a {\n ", "\n }\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n"])), _styles.BOXSHADOWS.BOXSHADOW_L2, function (props) {
55
- return props.animation.keyframes;
55
+ return props.animation.$keyframes;
56
56
  }, function (props) {
57
- return props.animation.duration;
57
+ return props.animation.$duration;
58
58
  }, function (props) {
59
- return props.animation.bezier;
59
+ return props.animation.$bezier;
60
60
  }, function (props) {
61
- return props.animation.transform;
61
+ return props.animation.$transform;
62
62
  }, function (props) {
63
- return props.withClose ? '0' : '16px';
63
+ return props.$withClose ? '0' : '16px';
64
64
  }, function (props) {
65
- return props.withLoader ? '4px' : '0';
65
+ return props.$withLoader ? '4px' : '0';
66
66
  }, function (props) {
67
67
  return (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.getColor('white', props.theme));
68
68
  }, _HyperLink.HyperLinkInvertedStyling, _types.ToastColor[_types.ToastColor.BLACK], function (props) {
@@ -162,15 +162,15 @@ var Toast = function Toast(_ref) {
162
162
  var fromX = dimensions.width * direction.fromWidth;
163
163
  var toX = dimensions.width * direction.toWidth;
164
164
  var prop = {
165
- duration: animation.duration,
166
- bezier: animation.bezier,
167
- transform: "translateY(".concat(toY, ") translateX(").concat(toX, ")"),
168
- keyframes: (0, _styledComponents.keyframes)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n 0% {\n transform: translateY(", "px) translateX(", "px);\n }\n 100% {\n transform: translateY(", "px) translateX(", "px);\n }"])), fromY, fromX, toY, toX)
165
+ $duration: animation.duration,
166
+ $bezier: animation.bezier,
167
+ $transform: "translateY(".concat(toY, ") translateX(").concat(toX, ")"),
168
+ $keyframes: (0, _styledComponents.keyframes)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n 0% {\n transform: translateY(", "px) translateX(", "px);\n }\n 100% {\n transform: translateY(", "px) translateX(", "px);\n }"])), fromY, fromX, toY, toX)
169
169
  };
170
170
  if (!dimensions.height) {
171
171
  prop = _objectSpread(_objectSpread({}, prop), {
172
- transform: 'translateY(-1000vh) translateX(-1000vw)',
173
- keyframes: (0, _styledComponents.keyframes)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])([""])))
172
+ $transform: 'translateY(-1000vh) translateX(-1000vw)',
173
+ $keyframes: (0, _styledComponents.keyframes)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])([""])))
174
174
  });
175
175
  }
176
176
  var theme = _types.ToastColor[(_opts$color = opts.color) !== null && _opts$color !== void 0 ? _opts$color : _types.ToastColor.BLACK];
@@ -184,9 +184,9 @@ var Toast = function Toast(_ref) {
184
184
  "data-testid": testId,
185
185
  animation: prop,
186
186
  ref: elementRef,
187
- withLoader: !!opts.autoClose,
187
+ $withLoader: !!opts.autoClose,
188
188
  className: theme,
189
- withClose: !!opts.showCloseButton,
189
+ $withClose: !!opts.showCloseButton,
190
190
  tabIndex: -1,
191
191
  children: [opts.icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(ToastIconContainer, {
192
192
  children: opts.icon
@@ -225,7 +225,7 @@ var Toast = function Toast(_ref) {
225
225
  })
226
226
  }), !!opts.autoClose && /*#__PURE__*/(0, _jsxRuntime.jsx)(Loader, {
227
227
  className: "loader ".concat(theme),
228
- duration: (_opts$delay = opts.delay) !== null && _opts$delay !== void 0 ? _opts$delay : 0
228
+ $duration: (_opts$delay = opts.delay) !== null && _opts$delay !== void 0 ? _opts$delay : 0
229
229
  })]
230
230
  });
231
231
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_types","_styles","_Button","_HyperLink","_icons","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_enter","_leave","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","LoaderAnimationKeyframes","keyframes","_taggedTemplateLiteral2","Loader","styled","div","props","duration","ToastColor","BLACK","COLORS","getColor","theme","WHITE","BLUE","GREEN","ORANGE","RED","ToastContainer","BOXSHADOWS","BOXSHADOW_L2","animation","bezier","transform","withClose","withLoader","ComponentSStyling","ComponentTextStyle","Regular","HyperLinkInvertedStyling","HyperLinkDefaultStyling","exports","ToastActionButtons","ToastCloseButton","ToastTextContainer","span","ToastIconContainer","DEFAULT_OPTIONS","color","autoClose","delay","showCloseButton","position","ToastPosition","TOPLEFT","enterFrom","ToastEntryDirection","TOP","Toast","_ref","_opts$enterFrom","_opts$color","_opts$delay","content","remove","_ref$options","options","testId","Error","styledTheme","useTheme","removeRef","useRef","current","elementRef","_React$useState","useState","_React$useState2","_slicedToArray2","shouldRemove","setShouldRemove","_React$useState3","width","height","_React$useState4","dimensions","setDimensions","opts","useEffect","id","setTimeout","clearTimeout","undefined","_elementRef$current","_elementRef$current2","clientHeight","clientWidth","animations","direction","fromY","fromHeight","toY","toHeight","fromX","fromWidth","toX","toWidth","prop","concat","_elementRef$current3","focus","jsxs","ref","className","tabIndex","children","icon","jsx","action","map","Button","size","Size","Small","variant","type","ToastActionType","SECONDARY","colorTheme","invertFocus","onClick","handler","label","IconButton","shape","useTransparentBackground","event","SystemIcons","Close","propTypes","_propTypes","any","isRequired","bool","number","arrayOf","string","func","node","_default","enter","BOTTOM","LEFT","RIGHT","leave"],"sources":["../../src/Toasters/Toast.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { keyframes, useTheme } from 'styled-components';\r\nimport { ToastActionType, ToastColor, ToastEntryDirection, ToastPosition } from '../types';\r\nimport { BOXSHADOWS, COLORS} from '../styles';\r\nimport { Size } from '../types'\r\nimport { Button, IconButton } from '../Button';\r\nimport { ComponentSStyling, ComponentTextStyle } from '../styles';\r\nimport {HyperLinkDefaultStyling, HyperLinkInvertedStyling} from '../HyperLink';\r\nimport { SystemIcons } from '../icons';\r\n\r\nconst LoaderAnimationKeyframes = keyframes`\r\n 0% {\r\n background-position: right;\r\n }\r\n 100% {\r\n background-position: left;\r\n }\r\n`;\r\n\r\nconst Loader = styled.div<{ duration: number }>`\r\n position: absolute;\r\n bottom: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 4px;\r\n border-bottom-left-radius: 8px;\r\n border-bottom-right-radius: 8px;\r\n\r\n animation: ${LoaderAnimationKeyframes} ${(props) => props.duration}ms cubic-bezier(0.18, 0.39, 0.35, 1);\r\n\r\n &.${ToastColor[ToastColor.BLACK]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('neutral_200', props.theme)} 50%, ${props => COLORS.getColor('neutral_800', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('neutral_400', props.theme)} 50%, ${props => COLORS.getColor('white', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLUE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('accent1_200', props.theme)} 50%, ${props => COLORS.getColor('accent1_600', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.GREEN]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('correct_200', props.theme)} 50%, ${props => COLORS.getColor('correct_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.ORANGE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('warning_200', props.theme)} 50%, ${props => COLORS.getColor('warning_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.RED]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('critical_200', props.theme)} 50%, ${props => COLORS.getColor('critical_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n`;\r\n\r\nexport const ToastContainer = styled.div<{ animation: { duration: string; bezier: string; transform: string; keyframes: any }; withLoader: boolean; withClose: boolean }>`\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L2};\r\n border-radius: 4px;\r\n\r\n animation: ${(props) => props.animation.keyframes} ${(props) => props.animation.duration} ${(props) => props.animation.bezier};\r\n transform: ${(props) => props.animation.transform};\r\n\r\n transition: all 300ms cubic-bezier(0.64, 0.04, 0.35, 1);\r\n\r\n padding: 0 ${(props) => (props.withClose ? '0' : '16px')} ${(props) => (props.withLoader ? '4px' : '0')} 16px;\r\n\r\n margin-bottom: 8px;\r\n display: flex;\r\n align-items: center;\r\n gap: 16px;\r\n justify-content: left;\r\n\r\n position: relative;\r\n\r\n width: max-content;\r\n min-height: 48px;\r\n box-sizing: border-box;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Regular, COLORS.getColor('white', props.theme))}\r\n\r\n & a {\r\n display: inline;\r\n ${HyperLinkInvertedStyling}\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLACK]} {\r\n background-color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n color: ${props => COLORS.getColor('black', props.theme)};\r\n\r\n & a {\r\n ${HyperLinkDefaultStyling}\r\n }\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLUE]} {\r\n background-color: ${props => COLORS.getColor('accent1_600', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.GREEN]} {\r\n background-color: ${props => COLORS.getColor('correct_500', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.ORANGE]} {\r\n background-color: ${props => COLORS.getColor('warning_500', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.RED]} {\r\n background-color: ${props => COLORS.getColor('critical_500', props.theme)};\r\n }\r\n`;\r\n\r\nexport const ToastActionButtons = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n gap: 8px;\r\n align-items: center;\r\n\r\n & .action {\r\n height: unset;\r\n }\r\n`;\r\n\r\nexport const ToastCloseButton = styled.div`\r\n & > button {\r\n margin-left: 16px;\r\n\r\n & svg {\r\n padding: 0;\r\n }\r\n }\r\n\r\n button svg path{\r\n fill: ${props => COLORS.getColor('white', props.theme)} !important;\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n button svg path {\r\n fill: ${props => COLORS.getColor('neutral_600', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n\r\nexport const ToastTextContainer = styled.span`\r\n font-feature-settings: 'liga' off;\r\n width: 240px;\r\n display: flex;\r\n padding: 16px 0;\r\n`;\r\n\r\nexport const ToastIconContainer = styled.span`\r\n margin-right: -8px;\r\n`;\r\n\r\nexport type ToastOptions = {\r\n /** Optional. Color of the toast. Defaults to 'BLACK' */\r\n color?: ToastColor;\r\n /** Optional. If set Toast will automatically close after delay. Defaults to 'true' */\r\n autoClose?: boolean;\r\n /** Optional. Delay after which toast will disappear in milliseconds. Defaults to '5000' */\r\n delay?: number;\r\n /** Optional. If set then Close button will be shown on the right side of the Toast. Defaults to 'false' */\r\n showCloseButton?: boolean;\r\n\r\n /** Optional. Custom action to be available in the Toast, will be shown on the right side of the Toast. */\r\n action?: {\r\n label: string;\r\n handler: () => void;\r\n type?: ToastActionType;\r\n }[];\r\n /** Required. Position on the screen at which Toast will be shown */\r\n position: ToastPosition;\r\n /** Optional. From which side of the screen appearance animation will start. Defaults to 'TOP' */\r\n enterFrom?: ToastEntryDirection;\r\n /** Optional. Icon that will be shown on the left side of the Toast */\r\n icon?: React.ReactNode;\r\n};\r\n\r\ntype Props = {\r\n remove?: any;\r\n content: any;\r\n options?: ToastOptions;\r\n testId?: string;\r\n};\r\n\r\nconst DEFAULT_OPTIONS: ToastOptions = {\r\n color: ToastColor.BLACK,\r\n autoClose: true,\r\n delay: 5000,\r\n showCloseButton: false,\r\n position: ToastPosition.TOPLEFT,\r\n enterFrom: ToastEntryDirection.TOP,\r\n};\r\n\r\nconst Toast = ({ content, remove, options = DEFAULT_OPTIONS, testId }: Props) => {\r\n\r\n \r\n\r\n if(!remove)\r\n throw new Error('remove function is required when rendering Toast. Make sure that you are using useToast hook and ToastProvider for rendering Toasts');\r\n\r\n const styledTheme = useTheme();\r\n\r\n const removeRef = React.useRef();\r\n removeRef.current = remove;\r\n\r\n const elementRef = React.useRef<any>(null);\r\n\r\n const [shouldRemove, setShouldRemove] = React.useState(false);\r\n const [dimensions, setDimensions] = React.useState<{ width: number; height: number }>({ width: 0, height: 0 });\r\n\r\n const opts = { ...DEFAULT_OPTIONS, ...options };\r\n\r\n React.useEffect(() => {\r\n if (opts?.autoClose) {\r\n // @ts-ignore\r\n const id = setTimeout(() => setShouldRemove(true), opts.delay);\r\n return () => clearTimeout(id);\r\n }\r\n return undefined;\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if (shouldRemove) {\r\n // @ts-ignore\r\n const id = setTimeout(() => removeRef.current(), 200);\r\n return () => clearTimeout(id);\r\n }\r\n }, [shouldRemove]);\r\n\r\n React.useEffect(() => {\r\n setDimensions({ height: elementRef.current?.clientHeight, width: elementRef.current?.clientWidth });\r\n }, []);\r\n\r\n const animation = animations[shouldRemove ? 'leave' : 'enter'];\r\n const direction = animation[opts.enterFrom ?? ToastEntryDirection.TOP];\r\n\r\n const fromY = dimensions.height * direction.fromHeight;\r\n const toY = dimensions.height * direction.toHeight;\r\n const fromX = dimensions.width * direction.fromWidth;\r\n const toX = dimensions.width * direction.toWidth;\r\n\r\n let prop = {\r\n duration: animation.duration,\r\n bezier: animation.bezier,\r\n transform: `translateY(${toY}) translateX(${toX})`,\r\n keyframes: keyframes`\r\n 0% {\r\n transform: translateY(${fromY}px) translateX(${fromX}px);\r\n }\r\n 100% {\r\n transform: translateY(${toY}px) translateX(${toX}px);\r\n }`,\r\n };\r\n\r\n if (!dimensions.height) {\r\n prop = {\r\n ...prop,\r\n ...{\r\n transform: 'translateY(-1000vh) translateX(-1000vw)',\r\n keyframes: keyframes``,\r\n },\r\n };\r\n }\r\n\r\n const theme = ToastColor[opts.color ?? ToastColor.BLACK];\r\n\r\n if (!shouldRemove){\r\n setTimeout(() => elementRef?.current?.focus());\r\n }\r\n\r\n return (\r\n <ToastContainer data-testid={testId}\r\n animation={prop}\r\n ref={elementRef}\r\n withLoader={!!opts.autoClose}\r\n className={theme}\r\n withClose={!!opts.showCloseButton}\r\n tabIndex={-1}>\r\n {opts.icon && <ToastIconContainer>{opts.icon}</ToastIconContainer>}\r\n <ToastTextContainer className={'description'}>{content}</ToastTextContainer>\r\n {opts.action && (\r\n <ToastActionButtons>\r\n {opts.action.map((action, i) => (\r\n <Button\r\n size={Size.Small}\r\n variant={action.type === ToastActionType.SECONDARY ? 'secondary' : 'primary'}\r\n colorTheme={opts.color !== ToastColor.WHITE ? 'dark' : 'teal'}\r\n invertFocus={opts.color === ToastColor.BLACK}\r\n key={i}\r\n onClick={() => {\r\n setShouldRemove(true);\r\n action.handler();\r\n }}\r\n className={'action'}>\r\n {action.label}\r\n </Button>\r\n ))}\r\n </ToastActionButtons>\r\n )}\r\n {opts.showCloseButton && (\r\n <ToastCloseButton className={`close-button ${theme}`}>\r\n <IconButton variant={'secondary'}\r\n shape=\"circular\"\r\n useTransparentBackground={true}\r\n invertFocus={opts.color === ToastColor.BLACK}\r\n action={(event) => setShouldRemove(true)}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.getColor('neutral_600', styledTheme)} />\r\n </IconButton>\r\n </ToastCloseButton>\r\n )}\r\n {!!opts.autoClose && <Loader className={`loader ${theme}`} duration={opts.delay ?? 0} />}\r\n </ToastContainer>\r\n );\r\n};\r\n\r\nexport default Toast;\r\n\r\nconst animations = {\r\n enter: {\r\n bezier: 'cubic-bezier(0.22, 0.61, 0.35, 1)',\r\n duration: '300ms',\r\n [ToastEntryDirection.TOP]: {\r\n fromHeight: -1,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.BOTTOM]: {\r\n fromHeight: 1,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.LEFT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: -1,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.RIGHT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 1,\r\n toWidth: 0,\r\n },\r\n },\r\n leave: {\r\n bezier: 'cubic-bezier(0.5, 0.05, 0.67, 0.19)',\r\n duration: '205ms',\r\n [ToastEntryDirection.TOP]: {\r\n fromHeight: 0,\r\n toHeight: -1,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.BOTTOM]: {\r\n fromHeight: 0,\r\n toHeight: 1,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.LEFT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: -1,\r\n },\r\n [ToastEntryDirection.RIGHT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 1,\r\n },\r\n },\r\n};\r\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAAuC,IAAAO,WAAA,GAAAP,OAAA;AAAA,IAAAQ,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,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,GAAApI,MAAA;AAEL,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Toast.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_types","_styles","_Button","_HyperLink","_icons","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_enter","_leave","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","LoaderAnimationKeyframes","keyframes","_taggedTemplateLiteral2","Loader","styled","div","props","$duration","ToastColor","BLACK","COLORS","getColor","theme","WHITE","BLUE","GREEN","ORANGE","RED","ToastContainer","BOXSHADOWS","BOXSHADOW_L2","animation","$keyframes","$bezier","$transform","$withClose","$withLoader","ComponentSStyling","ComponentTextStyle","Regular","HyperLinkInvertedStyling","HyperLinkDefaultStyling","exports","ToastActionButtons","ToastCloseButton","ToastTextContainer","span","ToastIconContainer","DEFAULT_OPTIONS","color","autoClose","delay","showCloseButton","position","ToastPosition","TOPLEFT","enterFrom","ToastEntryDirection","TOP","Toast","_ref","_opts$enterFrom","_opts$color","_opts$delay","content","remove","_ref$options","options","testId","Error","styledTheme","useTheme","removeRef","useRef","current","elementRef","_React$useState","useState","_React$useState2","_slicedToArray2","shouldRemove","setShouldRemove","_React$useState3","width","height","_React$useState4","dimensions","setDimensions","opts","useEffect","id","setTimeout","clearTimeout","undefined","_elementRef$current","_elementRef$current2","clientHeight","clientWidth","animations","direction","fromY","fromHeight","toY","toHeight","fromX","fromWidth","toX","toWidth","prop","duration","bezier","concat","_elementRef$current3","focus","jsxs","ref","className","tabIndex","children","icon","jsx","action","map","Button","size","Size","Small","variant","type","ToastActionType","SECONDARY","colorTheme","invertFocus","onClick","handler","label","IconButton","shape","useTransparentBackground","event","SystemIcons","Close","propTypes","_propTypes","any","isRequired","bool","number","arrayOf","string","func","node","_default","enter","BOTTOM","LEFT","RIGHT","leave"],"sources":["../../src/Toasters/Toast.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { keyframes, useTheme } from 'styled-components';\r\nimport { ToastActionType, ToastColor, ToastEntryDirection, ToastPosition } from '../types';\r\nimport { BOXSHADOWS, COLORS} from '../styles';\r\nimport { Size } from '../types'\r\nimport { Button, IconButton } from '../Button';\r\nimport { ComponentSStyling, ComponentTextStyle } from '../styles';\r\nimport {HyperLinkDefaultStyling, HyperLinkInvertedStyling} from '../HyperLink';\r\nimport { SystemIcons } from '../icons';\r\n\r\nconst LoaderAnimationKeyframes = keyframes`\r\n 0% {\r\n background-position: right;\r\n }\r\n 100% {\r\n background-position: left;\r\n }\r\n`;\r\n\r\nconst Loader = styled.div<{ $duration: number }>`\r\n position: absolute;\r\n bottom: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 4px;\r\n border-bottom-left-radius: 8px;\r\n border-bottom-right-radius: 8px;\r\n\r\n animation: ${LoaderAnimationKeyframes} ${(props) => props.$duration}ms cubic-bezier(0.18, 0.39, 0.35, 1);\r\n\r\n &.${ToastColor[ToastColor.BLACK]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('neutral_200', props.theme)} 50%, ${props => COLORS.getColor('neutral_800', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('neutral_400', props.theme)} 50%, ${props => COLORS.getColor('white', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLUE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('accent1_200', props.theme)} 50%, ${props => COLORS.getColor('accent1_600', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.GREEN]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('correct_200', props.theme)} 50%, ${props => COLORS.getColor('correct_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.ORANGE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('warning_200', props.theme)} 50%, ${props => COLORS.getColor('warning_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.RED]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('critical_200', props.theme)} 50%, ${props => COLORS.getColor('critical_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n`;\r\n\r\nexport const ToastContainer = styled.div<{ animation: { $duration: string; $bezier: string; $transform: string; $keyframes: any }; $withLoader: boolean; $withClose: boolean }>`\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L2};\r\n border-radius: 4px;\r\n\r\n animation: ${(props) => props.animation.$keyframes} ${(props) => props.animation.$duration} ${(props) => props.animation.$bezier};\r\n transform: ${(props) => props.animation.$transform};\r\n\r\n transition: all 300ms cubic-bezier(0.64, 0.04, 0.35, 1);\r\n\r\n padding: 0 ${(props) => (props.$withClose ? '0' : '16px')} ${(props) => (props.$withLoader ? '4px' : '0')} 16px;\r\n\r\n margin-bottom: 8px;\r\n display: flex;\r\n align-items: center;\r\n gap: 16px;\r\n justify-content: left;\r\n\r\n position: relative;\r\n\r\n width: max-content;\r\n min-height: 48px;\r\n box-sizing: border-box;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Regular, COLORS.getColor('white', props.theme))}\r\n\r\n & a {\r\n display: inline;\r\n ${HyperLinkInvertedStyling}\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLACK]} {\r\n background-color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n color: ${props => COLORS.getColor('black', props.theme)};\r\n\r\n & a {\r\n ${HyperLinkDefaultStyling}\r\n }\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLUE]} {\r\n background-color: ${props => COLORS.getColor('accent1_600', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.GREEN]} {\r\n background-color: ${props => COLORS.getColor('correct_500', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.ORANGE]} {\r\n background-color: ${props => COLORS.getColor('warning_500', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.RED]} {\r\n background-color: ${props => COLORS.getColor('critical_500', props.theme)};\r\n }\r\n`;\r\n\r\nexport const ToastActionButtons = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n gap: 8px;\r\n align-items: center;\r\n\r\n & .action {\r\n height: unset;\r\n }\r\n`;\r\n\r\nexport const ToastCloseButton = styled.div`\r\n & > button {\r\n margin-left: 16px;\r\n\r\n & svg {\r\n padding: 0;\r\n }\r\n }\r\n\r\n button svg path{\r\n fill: ${props => COLORS.getColor('white', props.theme)} !important;\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n button svg path {\r\n fill: ${props => COLORS.getColor('neutral_600', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n\r\nexport const ToastTextContainer = styled.span`\r\n font-feature-settings: 'liga' off;\r\n width: 240px;\r\n display: flex;\r\n padding: 16px 0;\r\n`;\r\n\r\nexport const ToastIconContainer = styled.span`\r\n margin-right: -8px;\r\n`;\r\n\r\nexport type ToastOptions = {\r\n /** Optional. Color of the toast. Defaults to 'BLACK' */\r\n color?: ToastColor;\r\n /** Optional. If set Toast will automatically close after delay. Defaults to 'true' */\r\n autoClose?: boolean;\r\n /** Optional. Delay after which toast will disappear in milliseconds. Defaults to '5000' */\r\n delay?: number;\r\n /** Optional. If set then Close button will be shown on the right side of the Toast. Defaults to 'false' */\r\n showCloseButton?: boolean;\r\n\r\n /** Optional. Custom action to be available in the Toast, will be shown on the right side of the Toast. */\r\n action?: {\r\n label: string;\r\n handler: () => void;\r\n type?: ToastActionType;\r\n }[];\r\n /** Required. Position on the screen at which Toast will be shown */\r\n position: ToastPosition;\r\n /** Optional. From which side of the screen appearance animation will start. Defaults to 'TOP' */\r\n enterFrom?: ToastEntryDirection;\r\n /** Optional. Icon that will be shown on the left side of the Toast */\r\n icon?: React.ReactNode;\r\n};\r\n\r\ntype Props = {\r\n remove?: any;\r\n content: any;\r\n options?: ToastOptions;\r\n testId?: string;\r\n};\r\n\r\nconst DEFAULT_OPTIONS: ToastOptions = {\r\n color: ToastColor.BLACK,\r\n autoClose: true,\r\n delay: 5000,\r\n showCloseButton: false,\r\n position: ToastPosition.TOPLEFT,\r\n enterFrom: ToastEntryDirection.TOP,\r\n};\r\n\r\nconst Toast = ({ content, remove, options = DEFAULT_OPTIONS, testId }: Props) => {\r\n\r\n \r\n\r\n if(!remove)\r\n throw new Error('remove function is required when rendering Toast. Make sure that you are using useToast hook and ToastProvider for rendering Toasts');\r\n\r\n const styledTheme = useTheme();\r\n\r\n const removeRef = React.useRef();\r\n removeRef.current = remove;\r\n\r\n const elementRef = React.useRef<any>(null);\r\n\r\n const [shouldRemove, setShouldRemove] = React.useState(false);\r\n const [dimensions, setDimensions] = React.useState<{ width: number; height: number }>({ width: 0, height: 0 });\r\n\r\n const opts = { ...DEFAULT_OPTIONS, ...options };\r\n\r\n React.useEffect(() => {\r\n if (opts?.autoClose) {\r\n // @ts-ignore\r\n const id = setTimeout(() => setShouldRemove(true), opts.delay);\r\n return () => clearTimeout(id);\r\n }\r\n return undefined;\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if (shouldRemove) {\r\n // @ts-ignore\r\n const id = setTimeout(() => removeRef.current(), 200);\r\n return () => clearTimeout(id);\r\n }\r\n }, [shouldRemove]);\r\n\r\n React.useEffect(() => {\r\n setDimensions({ height: elementRef.current?.clientHeight, width: elementRef.current?.clientWidth });\r\n }, []);\r\n\r\n const animation = animations[shouldRemove ? 'leave' : 'enter'];\r\n const direction = animation[opts.enterFrom ?? ToastEntryDirection.TOP];\r\n\r\n const fromY = dimensions.height * direction.fromHeight;\r\n const toY = dimensions.height * direction.toHeight;\r\n const fromX = dimensions.width * direction.fromWidth;\r\n const toX = dimensions.width * direction.toWidth;\r\n\r\n let prop = {\r\n $duration: animation.duration,\r\n $bezier: animation.bezier,\r\n $transform: `translateY(${toY}) translateX(${toX})`,\r\n $keyframes: keyframes`\r\n 0% {\r\n transform: translateY(${fromY}px) translateX(${fromX}px);\r\n }\r\n 100% {\r\n transform: translateY(${toY}px) translateX(${toX}px);\r\n }`,\r\n };\r\n\r\n if (!dimensions.height) {\r\n prop = {\r\n ...prop,\r\n ...{\r\n $transform: 'translateY(-1000vh) translateX(-1000vw)',\r\n $keyframes: keyframes``,\r\n },\r\n };\r\n }\r\n\r\n const theme = ToastColor[opts.color ?? ToastColor.BLACK];\r\n\r\n if (!shouldRemove){\r\n setTimeout(() => elementRef?.current?.focus());\r\n }\r\n\r\n return (\r\n <ToastContainer data-testid={testId}\r\n animation={prop}\r\n ref={elementRef}\r\n $withLoader={!!opts.autoClose}\r\n className={theme}\r\n $withClose={!!opts.showCloseButton}\r\n tabIndex={-1}>\r\n {opts.icon && <ToastIconContainer>{opts.icon}</ToastIconContainer>}\r\n <ToastTextContainer className={'description'}>{content}</ToastTextContainer>\r\n {opts.action && (\r\n <ToastActionButtons>\r\n {opts.action.map((action, i) => (\r\n <Button\r\n size={Size.Small}\r\n variant={action.type === ToastActionType.SECONDARY ? 'secondary' : 'primary'}\r\n colorTheme={opts.color !== ToastColor.WHITE ? 'dark' : 'teal'}\r\n invertFocus={opts.color === ToastColor.BLACK}\r\n key={i}\r\n onClick={() => {\r\n setShouldRemove(true);\r\n action.handler();\r\n }}\r\n className={'action'}>\r\n {action.label}\r\n </Button>\r\n ))}\r\n </ToastActionButtons>\r\n )}\r\n {opts.showCloseButton && (\r\n <ToastCloseButton className={`close-button ${theme}`}>\r\n <IconButton variant={'secondary'}\r\n shape=\"circular\"\r\n useTransparentBackground={true}\r\n invertFocus={opts.color === ToastColor.BLACK}\r\n action={(event) => setShouldRemove(true)}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.getColor('neutral_600', styledTheme)} />\r\n </IconButton>\r\n </ToastCloseButton>\r\n )}\r\n {!!opts.autoClose && <Loader className={`loader ${theme}`} $duration={opts.delay ?? 0} />}\r\n </ToastContainer>\r\n );\r\n};\r\n\r\nexport default Toast;\r\n\r\nconst animations = {\r\n enter: {\r\n bezier: 'cubic-bezier(0.22, 0.61, 0.35, 1)',\r\n duration: '300ms',\r\n [ToastEntryDirection.TOP]: {\r\n fromHeight: -1,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.BOTTOM]: {\r\n fromHeight: 1,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.LEFT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: -1,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.RIGHT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 1,\r\n toWidth: 0,\r\n },\r\n },\r\n leave: {\r\n bezier: 'cubic-bezier(0.5, 0.05, 0.67, 0.19)',\r\n duration: '205ms',\r\n [ToastEntryDirection.TOP]: {\r\n fromHeight: 0,\r\n toHeight: -1,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.BOTTOM]: {\r\n fromHeight: 0,\r\n toHeight: 1,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.LEFT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: -1,\r\n },\r\n [ToastEntryDirection.RIGHT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 1,\r\n },\r\n },\r\n};\r\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,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IAAI,EAAG;IAC1BtD,UAAU,EAAE,CAAC;IACbE,QAAQ,EAAE,CAAC;IACXE,SAAS,EAAE,CAAC;IACZE,OAAO,EAAE,CAAC;EACZ,CAAC,OAAApG,gBAAA,aAAAjC,MAAA,EACAmF,0BAAmB,CAACmG,KAAK,EAAG;IAC3BvD,UAAU,EAAE,CAAC;IACbE,QAAQ,EAAE,CAAC;IACXE,SAAS,EAAE,CAAC;IACZE,OAAO,EAAE;EACX,CAAC,GAAArI,MAAA;AAEL,CAAC","ignoreList":[]}
@@ -1,15 +1,14 @@
1
1
  import * as React from 'react';
2
- import { keyframes } from 'styled-components';
3
2
  import { ToastActionType, ToastColor, ToastEntryDirection, ToastPosition } from '../types';
4
3
  export declare const ToastContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
5
4
  animation: {
6
- duration: string;
7
- bezier: string;
8
- transform: string;
9
- keyframes: any;
5
+ $duration: string;
6
+ $bezier: string;
7
+ $transform: string;
8
+ $keyframes: any;
10
9
  };
11
- withLoader: boolean;
12
- withClose: boolean;
10
+ $withLoader: boolean;
11
+ $withClose: boolean;
13
12
  }>> & string;
14
13
  export declare const ToastActionButtons: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
15
14
  export declare const ToastCloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -18,7 +18,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
18
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
19
  var LoaderAnimationKeyframes = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n background-position: right;\n }\n 100% {\n background-position: left;\n }\n"])));
20
20
  var Loader = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 4px;\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n\n animation: ", " ", "ms cubic-bezier(0.18, 0.39, 0.35, 1);\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n"])), LoaderAnimationKeyframes, function (props) {
21
- return props.duration;
21
+ return props.$duration;
22
22
  }, ToastColor[ToastColor.BLACK], function (props) {
23
23
  return COLORS.getColor('neutral_200', props.theme);
24
24
  }, function (props) {
@@ -45,17 +45,17 @@ var Loader = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateL
45
45
  return COLORS.getColor('critical_500', props.theme);
46
46
  });
47
47
  export var ToastContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-shadow: ", ";\n border-radius: 4px;\n\n animation: ", " ", " ", ";\n transform: ", ";\n\n transition: all 300ms cubic-bezier(0.64, 0.04, 0.35, 1);\n\n padding: 0 ", " ", " 16px;\n\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 16px;\n justify-content: left;\n\n position: relative;\n\n width: max-content;\n min-height: 48px;\n box-sizing: border-box;\n\n ", "\n\n & a {\n display: inline;\n ", "\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n color: ", ";\n\n & a {\n ", "\n }\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n"])), BOXSHADOWS.BOXSHADOW_L2, function (props) {
48
- return props.animation.keyframes;
48
+ return props.animation.$keyframes;
49
49
  }, function (props) {
50
- return props.animation.duration;
50
+ return props.animation.$duration;
51
51
  }, function (props) {
52
- return props.animation.bezier;
52
+ return props.animation.$bezier;
53
53
  }, function (props) {
54
- return props.animation.transform;
54
+ return props.animation.$transform;
55
55
  }, function (props) {
56
- return props.withClose ? '0' : '16px';
56
+ return props.$withClose ? '0' : '16px';
57
57
  }, function (props) {
58
- return props.withLoader ? '4px' : '0';
58
+ return props.$withLoader ? '4px' : '0';
59
59
  }, function (props) {
60
60
  return ComponentSStyling(ComponentTextStyle.Regular, COLORS.getColor('white', props.theme));
61
61
  }, HyperLinkInvertedStyling, ToastColor[ToastColor.BLACK], function (props) {
@@ -150,15 +150,15 @@ var Toast = function Toast(_ref) {
150
150
  var fromX = dimensions.width * direction.fromWidth;
151
151
  var toX = dimensions.width * direction.toWidth;
152
152
  var prop = {
153
- duration: animation.duration,
154
- bezier: animation.bezier,
155
- transform: "translateY(".concat(toY, ") translateX(").concat(toX, ")"),
156
- keyframes: keyframes(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n 0% {\n transform: translateY(", "px) translateX(", "px);\n }\n 100% {\n transform: translateY(", "px) translateX(", "px);\n }"])), fromY, fromX, toY, toX)
153
+ $duration: animation.duration,
154
+ $bezier: animation.bezier,
155
+ $transform: "translateY(".concat(toY, ") translateX(").concat(toX, ")"),
156
+ $keyframes: keyframes(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n 0% {\n transform: translateY(", "px) translateX(", "px);\n }\n 100% {\n transform: translateY(", "px) translateX(", "px);\n }"])), fromY, fromX, toY, toX)
157
157
  };
158
158
  if (!dimensions.height) {
159
159
  prop = _objectSpread(_objectSpread({}, prop), {
160
- transform: 'translateY(-1000vh) translateX(-1000vw)',
161
- keyframes: keyframes(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral([""])))
160
+ $transform: 'translateY(-1000vh) translateX(-1000vw)',
161
+ $keyframes: keyframes(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral([""])))
162
162
  });
163
163
  }
164
164
  var theme = ToastColor[(_opts$color = opts.color) !== null && _opts$color !== void 0 ? _opts$color : ToastColor.BLACK];
@@ -172,9 +172,9 @@ var Toast = function Toast(_ref) {
172
172
  "data-testid": testId,
173
173
  animation: prop,
174
174
  ref: elementRef,
175
- withLoader: !!opts.autoClose,
175
+ $withLoader: !!opts.autoClose,
176
176
  className: theme,
177
- withClose: !!opts.showCloseButton,
177
+ $withClose: !!opts.showCloseButton,
178
178
  tabIndex: -1,
179
179
  children: [opts.icon && /*#__PURE__*/_jsx(ToastIconContainer, {
180
180
  children: opts.icon
@@ -213,7 +213,7 @@ var Toast = function Toast(_ref) {
213
213
  })
214
214
  }), !!opts.autoClose && /*#__PURE__*/_jsx(Loader, {
215
215
  className: "loader ".concat(theme),
216
- duration: (_opts$delay = opts.delay) !== null && _opts$delay !== void 0 ? _opts$delay : 0
216
+ $duration: (_opts$delay = opts.delay) !== null && _opts$delay !== void 0 ? _opts$delay : 0
217
217
  })]
218
218
  });
219
219
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.js","names":["React","styled","keyframes","useTheme","ToastActionType","ToastColor","ToastEntryDirection","ToastPosition","BOXSHADOWS","COLORS","Size","Button","IconButton","ComponentSStyling","ComponentTextStyle","HyperLinkDefaultStyling","HyperLinkInvertedStyling","SystemIcons","jsx","_jsx","jsxs","_jsxs","LoaderAnimationKeyframes","_templateObject","_taggedTemplateLiteral","Loader","div","_templateObject2","props","duration","BLACK","getColor","theme","WHITE","BLUE","GREEN","ORANGE","RED","ToastContainer","_templateObject3","BOXSHADOW_L2","animation","bezier","transform","withClose","withLoader","Regular","ToastActionButtons","_templateObject4","ToastCloseButton","_templateObject5","ToastTextContainer","span","_templateObject6","ToastIconContainer","_templateObject7","DEFAULT_OPTIONS","color","autoClose","delay","showCloseButton","position","TOPLEFT","enterFrom","TOP","Toast","_ref","_opts$enterFrom","_opts$color","_opts$delay","content","remove","_ref$options","options","testId","Error","styledTheme","removeRef","useRef","current","elementRef","_React$useState","useState","_React$useState2","_slicedToArray","shouldRemove","setShouldRemove","_React$useState3","width","height","_React$useState4","dimensions","setDimensions","opts","_objectSpread","useEffect","id","setTimeout","clearTimeout","undefined","_elementRef$current","_elementRef$current2","clientHeight","clientWidth","animations","direction","fromY","fromHeight","toY","toHeight","fromX","fromWidth","toX","toWidth","prop","concat","_templateObject8","_templateObject9","_elementRef$current3","focus","ref","className","tabIndex","children","icon","action","map","i","size","Small","variant","type","SECONDARY","colorTheme","invertFocus","onClick","handler","label","shape","useTransparentBackground","event","Close","propTypes","_pt","any","isRequired","bool","number","arrayOf","string","func","node","enter","_enter","_defineProperty","BOTTOM","LEFT","RIGHT","leave","_leave"],"sources":["../../src/Toasters/Toast.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { keyframes, useTheme } from 'styled-components';\r\nimport { ToastActionType, ToastColor, ToastEntryDirection, ToastPosition } from '../types';\r\nimport { BOXSHADOWS, COLORS} from '../styles';\r\nimport { Size } from '../types'\r\nimport { Button, IconButton } from '../Button';\r\nimport { ComponentSStyling, ComponentTextStyle } from '../styles';\r\nimport {HyperLinkDefaultStyling, HyperLinkInvertedStyling} from '../HyperLink';\r\nimport { SystemIcons } from '../icons';\r\n\r\nconst LoaderAnimationKeyframes = keyframes`\r\n 0% {\r\n background-position: right;\r\n }\r\n 100% {\r\n background-position: left;\r\n }\r\n`;\r\n\r\nconst Loader = styled.div<{ duration: number }>`\r\n position: absolute;\r\n bottom: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 4px;\r\n border-bottom-left-radius: 8px;\r\n border-bottom-right-radius: 8px;\r\n\r\n animation: ${LoaderAnimationKeyframes} ${(props) => props.duration}ms cubic-bezier(0.18, 0.39, 0.35, 1);\r\n\r\n &.${ToastColor[ToastColor.BLACK]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('neutral_200', props.theme)} 50%, ${props => COLORS.getColor('neutral_800', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('neutral_400', props.theme)} 50%, ${props => COLORS.getColor('white', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLUE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('accent1_200', props.theme)} 50%, ${props => COLORS.getColor('accent1_600', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.GREEN]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('correct_200', props.theme)} 50%, ${props => COLORS.getColor('correct_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.ORANGE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('warning_200', props.theme)} 50%, ${props => COLORS.getColor('warning_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.RED]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('critical_200', props.theme)} 50%, ${props => COLORS.getColor('critical_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n`;\r\n\r\nexport const ToastContainer = styled.div<{ animation: { duration: string; bezier: string; transform: string; keyframes: any }; withLoader: boolean; withClose: boolean }>`\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L2};\r\n border-radius: 4px;\r\n\r\n animation: ${(props) => props.animation.keyframes} ${(props) => props.animation.duration} ${(props) => props.animation.bezier};\r\n transform: ${(props) => props.animation.transform};\r\n\r\n transition: all 300ms cubic-bezier(0.64, 0.04, 0.35, 1);\r\n\r\n padding: 0 ${(props) => (props.withClose ? '0' : '16px')} ${(props) => (props.withLoader ? '4px' : '0')} 16px;\r\n\r\n margin-bottom: 8px;\r\n display: flex;\r\n align-items: center;\r\n gap: 16px;\r\n justify-content: left;\r\n\r\n position: relative;\r\n\r\n width: max-content;\r\n min-height: 48px;\r\n box-sizing: border-box;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Regular, COLORS.getColor('white', props.theme))}\r\n\r\n & a {\r\n display: inline;\r\n ${HyperLinkInvertedStyling}\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLACK]} {\r\n background-color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n color: ${props => COLORS.getColor('black', props.theme)};\r\n\r\n & a {\r\n ${HyperLinkDefaultStyling}\r\n }\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLUE]} {\r\n background-color: ${props => COLORS.getColor('accent1_600', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.GREEN]} {\r\n background-color: ${props => COLORS.getColor('correct_500', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.ORANGE]} {\r\n background-color: ${props => COLORS.getColor('warning_500', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.RED]} {\r\n background-color: ${props => COLORS.getColor('critical_500', props.theme)};\r\n }\r\n`;\r\n\r\nexport const ToastActionButtons = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n gap: 8px;\r\n align-items: center;\r\n\r\n & .action {\r\n height: unset;\r\n }\r\n`;\r\n\r\nexport const ToastCloseButton = styled.div`\r\n & > button {\r\n margin-left: 16px;\r\n\r\n & svg {\r\n padding: 0;\r\n }\r\n }\r\n\r\n button svg path{\r\n fill: ${props => COLORS.getColor('white', props.theme)} !important;\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n button svg path {\r\n fill: ${props => COLORS.getColor('neutral_600', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n\r\nexport const ToastTextContainer = styled.span`\r\n font-feature-settings: 'liga' off;\r\n width: 240px;\r\n display: flex;\r\n padding: 16px 0;\r\n`;\r\n\r\nexport const ToastIconContainer = styled.span`\r\n margin-right: -8px;\r\n`;\r\n\r\nexport type ToastOptions = {\r\n /** Optional. Color of the toast. Defaults to 'BLACK' */\r\n color?: ToastColor;\r\n /** Optional. If set Toast will automatically close after delay. Defaults to 'true' */\r\n autoClose?: boolean;\r\n /** Optional. Delay after which toast will disappear in milliseconds. Defaults to '5000' */\r\n delay?: number;\r\n /** Optional. If set then Close button will be shown on the right side of the Toast. Defaults to 'false' */\r\n showCloseButton?: boolean;\r\n\r\n /** Optional. Custom action to be available in the Toast, will be shown on the right side of the Toast. */\r\n action?: {\r\n label: string;\r\n handler: () => void;\r\n type?: ToastActionType;\r\n }[];\r\n /** Required. Position on the screen at which Toast will be shown */\r\n position: ToastPosition;\r\n /** Optional. From which side of the screen appearance animation will start. Defaults to 'TOP' */\r\n enterFrom?: ToastEntryDirection;\r\n /** Optional. Icon that will be shown on the left side of the Toast */\r\n icon?: React.ReactNode;\r\n};\r\n\r\ntype Props = {\r\n remove?: any;\r\n content: any;\r\n options?: ToastOptions;\r\n testId?: string;\r\n};\r\n\r\nconst DEFAULT_OPTIONS: ToastOptions = {\r\n color: ToastColor.BLACK,\r\n autoClose: true,\r\n delay: 5000,\r\n showCloseButton: false,\r\n position: ToastPosition.TOPLEFT,\r\n enterFrom: ToastEntryDirection.TOP,\r\n};\r\n\r\nconst Toast = ({ content, remove, options = DEFAULT_OPTIONS, testId }: Props) => {\r\n\r\n \r\n\r\n if(!remove)\r\n throw new Error('remove function is required when rendering Toast. Make sure that you are using useToast hook and ToastProvider for rendering Toasts');\r\n\r\n const styledTheme = useTheme();\r\n\r\n const removeRef = React.useRef();\r\n removeRef.current = remove;\r\n\r\n const elementRef = React.useRef<any>(null);\r\n\r\n const [shouldRemove, setShouldRemove] = React.useState(false);\r\n const [dimensions, setDimensions] = React.useState<{ width: number; height: number }>({ width: 0, height: 0 });\r\n\r\n const opts = { ...DEFAULT_OPTIONS, ...options };\r\n\r\n React.useEffect(() => {\r\n if (opts?.autoClose) {\r\n // @ts-ignore\r\n const id = setTimeout(() => setShouldRemove(true), opts.delay);\r\n return () => clearTimeout(id);\r\n }\r\n return undefined;\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if (shouldRemove) {\r\n // @ts-ignore\r\n const id = setTimeout(() => removeRef.current(), 200);\r\n return () => clearTimeout(id);\r\n }\r\n }, [shouldRemove]);\r\n\r\n React.useEffect(() => {\r\n setDimensions({ height: elementRef.current?.clientHeight, width: elementRef.current?.clientWidth });\r\n }, []);\r\n\r\n const animation = animations[shouldRemove ? 'leave' : 'enter'];\r\n const direction = animation[opts.enterFrom ?? ToastEntryDirection.TOP];\r\n\r\n const fromY = dimensions.height * direction.fromHeight;\r\n const toY = dimensions.height * direction.toHeight;\r\n const fromX = dimensions.width * direction.fromWidth;\r\n const toX = dimensions.width * direction.toWidth;\r\n\r\n let prop = {\r\n duration: animation.duration,\r\n bezier: animation.bezier,\r\n transform: `translateY(${toY}) translateX(${toX})`,\r\n keyframes: keyframes`\r\n 0% {\r\n transform: translateY(${fromY}px) translateX(${fromX}px);\r\n }\r\n 100% {\r\n transform: translateY(${toY}px) translateX(${toX}px);\r\n }`,\r\n };\r\n\r\n if (!dimensions.height) {\r\n prop = {\r\n ...prop,\r\n ...{\r\n transform: 'translateY(-1000vh) translateX(-1000vw)',\r\n keyframes: keyframes``,\r\n },\r\n };\r\n }\r\n\r\n const theme = ToastColor[opts.color ?? ToastColor.BLACK];\r\n\r\n if (!shouldRemove){\r\n setTimeout(() => elementRef?.current?.focus());\r\n }\r\n\r\n return (\r\n <ToastContainer data-testid={testId}\r\n animation={prop}\r\n ref={elementRef}\r\n withLoader={!!opts.autoClose}\r\n className={theme}\r\n withClose={!!opts.showCloseButton}\r\n tabIndex={-1}>\r\n {opts.icon && <ToastIconContainer>{opts.icon}</ToastIconContainer>}\r\n <ToastTextContainer className={'description'}>{content}</ToastTextContainer>\r\n {opts.action && (\r\n <ToastActionButtons>\r\n {opts.action.map((action, i) => (\r\n <Button\r\n size={Size.Small}\r\n variant={action.type === ToastActionType.SECONDARY ? 'secondary' : 'primary'}\r\n colorTheme={opts.color !== ToastColor.WHITE ? 'dark' : 'teal'}\r\n invertFocus={opts.color === ToastColor.BLACK}\r\n key={i}\r\n onClick={() => {\r\n setShouldRemove(true);\r\n action.handler();\r\n }}\r\n className={'action'}>\r\n {action.label}\r\n </Button>\r\n ))}\r\n </ToastActionButtons>\r\n )}\r\n {opts.showCloseButton && (\r\n <ToastCloseButton className={`close-button ${theme}`}>\r\n <IconButton variant={'secondary'}\r\n shape=\"circular\"\r\n useTransparentBackground={true}\r\n invertFocus={opts.color === ToastColor.BLACK}\r\n action={(event) => setShouldRemove(true)}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.getColor('neutral_600', styledTheme)} />\r\n </IconButton>\r\n </ToastCloseButton>\r\n )}\r\n {!!opts.autoClose && <Loader className={`loader ${theme}`} duration={opts.delay ?? 0} />}\r\n </ToastContainer>\r\n );\r\n};\r\n\r\nexport default Toast;\r\n\r\nconst animations = {\r\n enter: {\r\n bezier: 'cubic-bezier(0.22, 0.61, 0.35, 1)',\r\n duration: '300ms',\r\n [ToastEntryDirection.TOP]: {\r\n fromHeight: -1,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.BOTTOM]: {\r\n fromHeight: 1,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.LEFT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: -1,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.RIGHT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 1,\r\n toWidth: 0,\r\n },\r\n },\r\n leave: {\r\n bezier: 'cubic-bezier(0.5, 0.05, 0.67, 0.19)',\r\n duration: '205ms',\r\n [ToastEntryDirection.TOP]: {\r\n fromHeight: 0,\r\n toHeight: -1,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.BOTTOM]: {\r\n fromHeight: 0,\r\n toHeight: 1,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.LEFT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: -1,\r\n },\r\n [ToastEntryDirection.RIGHT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 1,\r\n },\r\n },\r\n};\r\n"],"mappings":";;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,mBAAmB;AAC/D,SAASC,eAAe,EAAEC,UAAU,EAAEC,mBAAmB,EAAEC,aAAa,QAAQ,UAAU;AAC1F,SAASC,UAAU,EAAEC,MAAM,QAAO,WAAW;AAC7C,SAASC,IAAI,QAAQ,UAAU;AAC/B,SAASC,MAAM,EAAEC,UAAU,QAAQ,WAAW;AAC9C,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,WAAW;AACjE,SAAQC,uBAAuB,EAAEC,wBAAwB,QAAO,cAAc;AAC9E,SAASC,WAAW,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEvC,IAAMC,wBAAwB,GAAGpB,SAAS,CAAAqB,eAAA,KAAAA,eAAA,GAAAC,sBAAA,uGAOzC;AAED,IAAMC,MAAM,GAAGxB,MAAM,CAACyB,GAAG,CAAAC,gBAAA,KAAAA,gBAAA,GAAAH,sBAAA,w7BASVF,wBAAwB,EAAI,UAACM,KAAK;EAAA,OAAKA,KAAK,CAACC,QAAQ;AAAA,GAE9DxB,UAA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ACX,CAAC,GAAAwC,MAAA,CACF;EACDK,KAAK,GAAAC,MAAA;IACHrH,MAAM,EAAE,qCAAqC;IAC7Cb,QAAQ,EAAE;EAAO,GAAA6H,eAAA,CAAAK,MAAA,EAChBzJ,mBAAmB,CAAC0D,GAAG,EAAG;IACzB2C,UAAU,EAAE,CAAC;IACbE,QAAQ,EAAE,CAAC,CAAC;IACZE,SAAS,EAAE,CAAC;IACZE,OAAO,EAAE;EACX,CAAC,GAAAyC,eAAA,CAAAK,MAAA,EACAzJ,mBAAmB,CAACqJ,MAAM,EAAG;IAC5BhD,UAAU,EAAE,CAAC;IACbE,QAAQ,EAAE,CAAC;IACXE,SAAS,EAAE,CAAC;IACZE,OAAO,EAAE;EACX,CAAC,GAAAyC,eAAA,CAAAK,MAAA,EACAzJ,mBAAmB,CAACsJ,IAAI,EAAG;IAC1BjD,UAAU,EAAE,CAAC;IACbE,QAAQ,EAAE,CAAC;IACXE,SAAS,EAAE,CAAC;IACZE,OAAO,EAAE,CAAC;EACZ,CAAC,GAAAyC,eAAA,CAAAK,MAAA,EACAzJ,mBAAmB,CAACuJ,KAAK,EAAG;IAC3BlD,UAAU,EAAE,CAAC;IACbE,QAAQ,EAAE,CAAC;IACXE,SAAS,EAAE,CAAC;IACZE,OAAO,EAAE;EACX,CAAC,GAAA8C,MAAA;AAEL,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Toast.js","names":["React","styled","keyframes","useTheme","ToastActionType","ToastColor","ToastEntryDirection","ToastPosition","BOXSHADOWS","COLORS","Size","Button","IconButton","ComponentSStyling","ComponentTextStyle","HyperLinkDefaultStyling","HyperLinkInvertedStyling","SystemIcons","jsx","_jsx","jsxs","_jsxs","LoaderAnimationKeyframes","_templateObject","_taggedTemplateLiteral","Loader","div","_templateObject2","props","$duration","BLACK","getColor","theme","WHITE","BLUE","GREEN","ORANGE","RED","ToastContainer","_templateObject3","BOXSHADOW_L2","animation","$keyframes","$bezier","$transform","$withClose","$withLoader","Regular","ToastActionButtons","_templateObject4","ToastCloseButton","_templateObject5","ToastTextContainer","span","_templateObject6","ToastIconContainer","_templateObject7","DEFAULT_OPTIONS","color","autoClose","delay","showCloseButton","position","TOPLEFT","enterFrom","TOP","Toast","_ref","_opts$enterFrom","_opts$color","_opts$delay","content","remove","_ref$options","options","testId","Error","styledTheme","removeRef","useRef","current","elementRef","_React$useState","useState","_React$useState2","_slicedToArray","shouldRemove","setShouldRemove","_React$useState3","width","height","_React$useState4","dimensions","setDimensions","opts","_objectSpread","useEffect","id","setTimeout","clearTimeout","undefined","_elementRef$current","_elementRef$current2","clientHeight","clientWidth","animations","direction","fromY","fromHeight","toY","toHeight","fromX","fromWidth","toX","toWidth","prop","duration","bezier","concat","_templateObject8","_templateObject9","_elementRef$current3","focus","ref","className","tabIndex","children","icon","action","map","i","size","Small","variant","type","SECONDARY","colorTheme","invertFocus","onClick","handler","label","shape","useTransparentBackground","event","Close","propTypes","_pt","any","isRequired","bool","number","arrayOf","string","func","node","enter","_enter","_defineProperty","BOTTOM","LEFT","RIGHT","leave","_leave"],"sources":["../../src/Toasters/Toast.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { keyframes, useTheme } from 'styled-components';\r\nimport { ToastActionType, ToastColor, ToastEntryDirection, ToastPosition } from '../types';\r\nimport { BOXSHADOWS, COLORS} from '../styles';\r\nimport { Size } from '../types'\r\nimport { Button, IconButton } from '../Button';\r\nimport { ComponentSStyling, ComponentTextStyle } from '../styles';\r\nimport {HyperLinkDefaultStyling, HyperLinkInvertedStyling} from '../HyperLink';\r\nimport { SystemIcons } from '../icons';\r\n\r\nconst LoaderAnimationKeyframes = keyframes`\r\n 0% {\r\n background-position: right;\r\n }\r\n 100% {\r\n background-position: left;\r\n }\r\n`;\r\n\r\nconst Loader = styled.div<{ $duration: number }>`\r\n position: absolute;\r\n bottom: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 4px;\r\n border-bottom-left-radius: 8px;\r\n border-bottom-right-radius: 8px;\r\n\r\n animation: ${LoaderAnimationKeyframes} ${(props) => props.$duration}ms cubic-bezier(0.18, 0.39, 0.35, 1);\r\n\r\n &.${ToastColor[ToastColor.BLACK]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('neutral_200', props.theme)} 50%, ${props => COLORS.getColor('neutral_800', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('neutral_400', props.theme)} 50%, ${props => COLORS.getColor('white', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLUE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('accent1_200', props.theme)} 50%, ${props => COLORS.getColor('accent1_600', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.GREEN]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('correct_200', props.theme)} 50%, ${props => COLORS.getColor('correct_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.ORANGE]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('warning_200', props.theme)} 50%, ${props => COLORS.getColor('warning_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n\r\n &.${ToastColor[ToastColor.RED]} {\r\n background: linear-gradient(to right, ${props => COLORS.getColor('critical_200', props.theme)} 50%, ${props => COLORS.getColor('critical_500', props.theme)} 50%) left;\r\n background-size: 200% 100%;\r\n }\r\n`;\r\n\r\nexport const ToastContainer = styled.div<{ animation: { $duration: string; $bezier: string; $transform: string; $keyframes: any }; $withLoader: boolean; $withClose: boolean }>`\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L2};\r\n border-radius: 4px;\r\n\r\n animation: ${(props) => props.animation.$keyframes} ${(props) => props.animation.$duration} ${(props) => props.animation.$bezier};\r\n transform: ${(props) => props.animation.$transform};\r\n\r\n transition: all 300ms cubic-bezier(0.64, 0.04, 0.35, 1);\r\n\r\n padding: 0 ${(props) => (props.$withClose ? '0' : '16px')} ${(props) => (props.$withLoader ? '4px' : '0')} 16px;\r\n\r\n margin-bottom: 8px;\r\n display: flex;\r\n align-items: center;\r\n gap: 16px;\r\n justify-content: left;\r\n\r\n position: relative;\r\n\r\n width: max-content;\r\n min-height: 48px;\r\n box-sizing: border-box;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Regular, COLORS.getColor('white', props.theme))}\r\n\r\n & a {\r\n display: inline;\r\n ${HyperLinkInvertedStyling}\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLACK]} {\r\n background-color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n color: ${props => COLORS.getColor('black', props.theme)};\r\n\r\n & a {\r\n ${HyperLinkDefaultStyling}\r\n }\r\n }\r\n\r\n &.${ToastColor[ToastColor.BLUE]} {\r\n background-color: ${props => COLORS.getColor('accent1_600', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.GREEN]} {\r\n background-color: ${props => COLORS.getColor('correct_500', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.ORANGE]} {\r\n background-color: ${props => COLORS.getColor('warning_500', props.theme)};\r\n }\r\n\r\n &.${ToastColor[ToastColor.RED]} {\r\n background-color: ${props => COLORS.getColor('critical_500', props.theme)};\r\n }\r\n`;\r\n\r\nexport const ToastActionButtons = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n gap: 8px;\r\n align-items: center;\r\n\r\n & .action {\r\n height: unset;\r\n }\r\n`;\r\n\r\nexport const ToastCloseButton = styled.div`\r\n & > button {\r\n margin-left: 16px;\r\n\r\n & svg {\r\n padding: 0;\r\n }\r\n }\r\n\r\n button svg path{\r\n fill: ${props => COLORS.getColor('white', props.theme)} !important;\r\n }\r\n\r\n &.${ToastColor[ToastColor.WHITE]} {\r\n button svg path {\r\n fill: ${props => COLORS.getColor('neutral_600', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n\r\nexport const ToastTextContainer = styled.span`\r\n font-feature-settings: 'liga' off;\r\n width: 240px;\r\n display: flex;\r\n padding: 16px 0;\r\n`;\r\n\r\nexport const ToastIconContainer = styled.span`\r\n margin-right: -8px;\r\n`;\r\n\r\nexport type ToastOptions = {\r\n /** Optional. Color of the toast. Defaults to 'BLACK' */\r\n color?: ToastColor;\r\n /** Optional. If set Toast will automatically close after delay. Defaults to 'true' */\r\n autoClose?: boolean;\r\n /** Optional. Delay after which toast will disappear in milliseconds. Defaults to '5000' */\r\n delay?: number;\r\n /** Optional. If set then Close button will be shown on the right side of the Toast. Defaults to 'false' */\r\n showCloseButton?: boolean;\r\n\r\n /** Optional. Custom action to be available in the Toast, will be shown on the right side of the Toast. */\r\n action?: {\r\n label: string;\r\n handler: () => void;\r\n type?: ToastActionType;\r\n }[];\r\n /** Required. Position on the screen at which Toast will be shown */\r\n position: ToastPosition;\r\n /** Optional. From which side of the screen appearance animation will start. Defaults to 'TOP' */\r\n enterFrom?: ToastEntryDirection;\r\n /** Optional. Icon that will be shown on the left side of the Toast */\r\n icon?: React.ReactNode;\r\n};\r\n\r\ntype Props = {\r\n remove?: any;\r\n content: any;\r\n options?: ToastOptions;\r\n testId?: string;\r\n};\r\n\r\nconst DEFAULT_OPTIONS: ToastOptions = {\r\n color: ToastColor.BLACK,\r\n autoClose: true,\r\n delay: 5000,\r\n showCloseButton: false,\r\n position: ToastPosition.TOPLEFT,\r\n enterFrom: ToastEntryDirection.TOP,\r\n};\r\n\r\nconst Toast = ({ content, remove, options = DEFAULT_OPTIONS, testId }: Props) => {\r\n\r\n \r\n\r\n if(!remove)\r\n throw new Error('remove function is required when rendering Toast. Make sure that you are using useToast hook and ToastProvider for rendering Toasts');\r\n\r\n const styledTheme = useTheme();\r\n\r\n const removeRef = React.useRef();\r\n removeRef.current = remove;\r\n\r\n const elementRef = React.useRef<any>(null);\r\n\r\n const [shouldRemove, setShouldRemove] = React.useState(false);\r\n const [dimensions, setDimensions] = React.useState<{ width: number; height: number }>({ width: 0, height: 0 });\r\n\r\n const opts = { ...DEFAULT_OPTIONS, ...options };\r\n\r\n React.useEffect(() => {\r\n if (opts?.autoClose) {\r\n // @ts-ignore\r\n const id = setTimeout(() => setShouldRemove(true), opts.delay);\r\n return () => clearTimeout(id);\r\n }\r\n return undefined;\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if (shouldRemove) {\r\n // @ts-ignore\r\n const id = setTimeout(() => removeRef.current(), 200);\r\n return () => clearTimeout(id);\r\n }\r\n }, [shouldRemove]);\r\n\r\n React.useEffect(() => {\r\n setDimensions({ height: elementRef.current?.clientHeight, width: elementRef.current?.clientWidth });\r\n }, []);\r\n\r\n const animation = animations[shouldRemove ? 'leave' : 'enter'];\r\n const direction = animation[opts.enterFrom ?? ToastEntryDirection.TOP];\r\n\r\n const fromY = dimensions.height * direction.fromHeight;\r\n const toY = dimensions.height * direction.toHeight;\r\n const fromX = dimensions.width * direction.fromWidth;\r\n const toX = dimensions.width * direction.toWidth;\r\n\r\n let prop = {\r\n $duration: animation.duration,\r\n $bezier: animation.bezier,\r\n $transform: `translateY(${toY}) translateX(${toX})`,\r\n $keyframes: keyframes`\r\n 0% {\r\n transform: translateY(${fromY}px) translateX(${fromX}px);\r\n }\r\n 100% {\r\n transform: translateY(${toY}px) translateX(${toX}px);\r\n }`,\r\n };\r\n\r\n if (!dimensions.height) {\r\n prop = {\r\n ...prop,\r\n ...{\r\n $transform: 'translateY(-1000vh) translateX(-1000vw)',\r\n $keyframes: keyframes``,\r\n },\r\n };\r\n }\r\n\r\n const theme = ToastColor[opts.color ?? ToastColor.BLACK];\r\n\r\n if (!shouldRemove){\r\n setTimeout(() => elementRef?.current?.focus());\r\n }\r\n\r\n return (\r\n <ToastContainer data-testid={testId}\r\n animation={prop}\r\n ref={elementRef}\r\n $withLoader={!!opts.autoClose}\r\n className={theme}\r\n $withClose={!!opts.showCloseButton}\r\n tabIndex={-1}>\r\n {opts.icon && <ToastIconContainer>{opts.icon}</ToastIconContainer>}\r\n <ToastTextContainer className={'description'}>{content}</ToastTextContainer>\r\n {opts.action && (\r\n <ToastActionButtons>\r\n {opts.action.map((action, i) => (\r\n <Button\r\n size={Size.Small}\r\n variant={action.type === ToastActionType.SECONDARY ? 'secondary' : 'primary'}\r\n colorTheme={opts.color !== ToastColor.WHITE ? 'dark' : 'teal'}\r\n invertFocus={opts.color === ToastColor.BLACK}\r\n key={i}\r\n onClick={() => {\r\n setShouldRemove(true);\r\n action.handler();\r\n }}\r\n className={'action'}>\r\n {action.label}\r\n </Button>\r\n ))}\r\n </ToastActionButtons>\r\n )}\r\n {opts.showCloseButton && (\r\n <ToastCloseButton className={`close-button ${theme}`}>\r\n <IconButton variant={'secondary'}\r\n shape=\"circular\"\r\n useTransparentBackground={true}\r\n invertFocus={opts.color === ToastColor.BLACK}\r\n action={(event) => setShouldRemove(true)}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.getColor('neutral_600', styledTheme)} />\r\n </IconButton>\r\n </ToastCloseButton>\r\n )}\r\n {!!opts.autoClose && <Loader className={`loader ${theme}`} $duration={opts.delay ?? 0} />}\r\n </ToastContainer>\r\n );\r\n};\r\n\r\nexport default Toast;\r\n\r\nconst animations = {\r\n enter: {\r\n bezier: 'cubic-bezier(0.22, 0.61, 0.35, 1)',\r\n duration: '300ms',\r\n [ToastEntryDirection.TOP]: {\r\n fromHeight: -1,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.BOTTOM]: {\r\n fromHeight: 1,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.LEFT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: -1,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.RIGHT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 1,\r\n toWidth: 0,\r\n },\r\n },\r\n leave: {\r\n bezier: 'cubic-bezier(0.5, 0.05, 0.67, 0.19)',\r\n duration: '205ms',\r\n [ToastEntryDirection.TOP]: {\r\n fromHeight: 0,\r\n toHeight: -1,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.BOTTOM]: {\r\n fromHeight: 0,\r\n toHeight: 1,\r\n fromWidth: 0,\r\n toWidth: 0,\r\n },\r\n [ToastEntryDirection.LEFT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: -1,\r\n },\r\n [ToastEntryDirection.RIGHT]: {\r\n fromHeight: 0,\r\n toHeight: 0,\r\n fromWidth: 0,\r\n toWidth: 1,\r\n },\r\n },\r\n};\r\n"],"mappings":";;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,mBAAmB;AAC/D,SAASC,eAAe,EAAEC,UAAU,EAAEC,mBAAmB,EAAEC,aAAa,QAAQ,UAAU;AAC1F,SAASC,UAAU,EAAEC,MAAM,QAAO,WAAW;AAC7C,SAASC,IAAI,QAAQ,UAAU;AAC/B,SAASC,MAAM,EAAEC,UAAU,QAAQ,WAAW;AAC9C,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,WAAW;AACjE,SAAQC,uBAAuB,EAAEC,wBAAwB,QAAO,cAAc;AAC9E,SAASC,WAAW,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEvC,IAAMC,wBAAwB,GAAGpB,SAAS,CAAAqB,eAAA,KAAAA,eAAA,GAAAC,sBAAA,uGAOzC;AAED,IAAMC,MAAM,GAAGxB,MAAM,CAACyB,GAAG,CAAAC,gBAAA,KAAAA,gBAAA,GAAAH,sBAAA,w7BASVF,wBAAwB,EAAI,UAACM,K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,CAAC;IACXE,SAAS,EAAE,CAAC;IACZE,OAAO,EAAE;EACX,CAAC,GAAA0C,MAAA,CACF;EACDK,KAAK,GAAAC,MAAA;IACH7C,MAAM,EAAE,qCAAqC;IAC7CD,QAAQ,EAAE;EAAO,GAAAyC,eAAA,CAAAK,MAAA,EAChB5J,mBAAmB,CAAC2D,GAAG,EAAG;IACzB2C,UAAU,EAAE,CAAC;IACbE,QAAQ,EAAE,CAAC,CAAC;IACZE,SAAS,EAAE,CAAC;IACZE,OAAO,EAAE;EACX,CAAC,GAAA2C,eAAA,CAAAK,MAAA,EACA5J,mBAAmB,CAACwJ,MAAM,EAAG;IAC5BlD,UAAU,EAAE,CAAC;IACbE,QAAQ,EAAE,CAAC;IACXE,SAAS,EAAE,CAAC;IACZE,OAAO,EAAE;EACX,CAAC,GAAA2C,eAAA,CAAAK,MAAA,EACA5J,mBAAmB,CAACyJ,IAAI,EAAG;IAC1BnD,UAAU,EAAE,CAAC;IACbE,QAAQ,EAAE,CAAC;IACXE,SAAS,EAAE,CAAC;IACZE,OAAO,EAAE,CAAC;EACZ,CAAC,GAAA2C,eAAA,CAAAK,MAAA,EACA5J,mBAAmB,CAAC0J,KAAK,EAAG;IAC3BpD,UAAU,EAAE,CAAC;IACbE,QAAQ,EAAE,CAAC;IACXE,SAAS,EAAE,CAAC;IACZE,OAAO,EAAE;EACX,CAAC,GAAAgD,MAAA;AAEL,CAAC","ignoreList":[]}
@@ -67,7 +67,7 @@ var ToggleSwitch = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
67
67
  return (e.key === 'Enter' || e.key === ' ') && toggle();
68
68
  },
69
69
  className: size.toString().toLowerCase().concat(disabled ? ' disabled' : '').concat(className ? " ".concat(className) : ''),
70
- selected: selected,
70
+ $selected: selected,
71
71
  id: id,
72
72
  role: "switch",
73
73
  "aria-pressed": selected,