@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
@@ -19,12 +19,12 @@ var _excluded = ["id", "variant", "shape", "action", "children", "useTransparent
19
19
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
20
20
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
21
  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; }
22
- var getBorderRadius = function getBorderRadius(props) {
23
- return props.borderRadius ? "".concat(props.borderRadius, "px") : '4px';
22
+ var getBorderRadius = function getBorderRadius(borderRadius) {
23
+ return borderRadius ? "".concat(borderRadius, "px") : '4px';
24
24
  };
25
- var getBorderRadiusStyle = function getBorderRadiusStyle(props) {
26
- var radius = getBorderRadius(props);
27
- switch (props.flatEdge) {
25
+ var getBorderRadiusStyle = function getBorderRadiusStyle(flatEdge, borderRadius) {
26
+ var radius = getBorderRadius(borderRadius);
27
+ switch (flatEdge) {
28
28
  case 'left':
29
29
  return "0px ".concat(radius, " ").concat(radius, " 0px");
30
30
  case 'right':
@@ -37,21 +37,23 @@ var getBorderRadiusStyle = function getBorderRadiusStyle(props) {
37
37
  var IconButtonContentStyles = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])([""])));
38
38
  exports.IconButtonContentStyles = IconButtonContentStyles;
39
39
  var IconButtonStyled = _styledComponents["default"].button(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n border-width: 0;\n cursor: pointer;\n height: 48px;\n width: 48px;\n background: transparent;\n position: relative;\n display: block;\n\n border-radius: ", ";\n ", " {\n height: 36px;\n width: 36px;\n border-radius: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n svg {\n height: ", ";\n width: ", ";\n padding: 0;\n }\n }\n &:only-child {\n margin: 0;\n }\n &:disabled {\n cursor: not-allowed;\n }\n\n &:focus {\n ", "\n }\n"])), function (props) {
40
- return props.borderRadius ? "".concat(props.borderRadius, "px") : '4px';
41
- }, IconButtonContentStyles, getBorderRadiusStyle, function (props) {
42
- return props.unsetIconSize ? 'unset' : '24px';
40
+ return props.$borderRadius ? "".concat(props.$borderRadius, "px") : '4px';
41
+ }, IconButtonContentStyles, function (props) {
42
+ return getBorderRadiusStyle(props.$flatEdge, props.$borderRadius);
43
+ }, function (props) {
44
+ return props.$unsetIconSize ? 'unset' : '24px';
43
45
  }, function (props) {
44
- return props.unsetIconSize ? 'unset' : '24px';
46
+ return props.$unsetIconSize ? 'unset' : '24px';
45
47
  }, function (props) {
46
- return props.invertFocus ? _styles.invertedFocusStyles : _styles.focusStyles;
48
+ return props.$invertFocus ? _styles.invertedFocusStyles : _styles.focusStyles;
47
49
  });
48
50
  exports.IconButtonStyled = IconButtonStyled;
49
51
  var IconButtonStyledPrimary = (0, _styledComponents["default"])(IconButtonStyled)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n ", " {\n background-color: ", ";\n\n svg {\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n }\n &:hover:not(:disabled),\n &.hover-state {\n ", " {\n background-color: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:active:not(:disabled),\n &.active-state {\n ", " {\n background: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:disabled {\n ", " {\n background-color: ", ";\n }\n svg {\n path {\n fill: ", ";\n }\n fill: ", ";\n }\n }\n"])), IconButtonContentStyles, function (props) {
50
- return props.useTransparentBackground ? 'transparent' : _styles.COLORS.getColor('primary_500', props.theme);
52
+ return props.$useTransparentBackground ? 'transparent' : _styles.COLORS.getColor('primary_500', props.theme);
51
53
  }, function (props) {
52
- return props.iconColor || _styles.COLORS.getColor('white', props.theme);
54
+ return props.$iconColor || _styles.COLORS.getColor('white', props.theme);
53
55
  }, function (props) {
54
- return props.iconColor || _styles.COLORS.getColor('white', props.theme);
56
+ return props.$iconColor || _styles.COLORS.getColor('white', props.theme);
55
57
  }, IconButtonContentStyles, function (props) {
56
58
  return _styles.COLORS.getColor('primary_700', props.theme);
57
59
  }, IconButtonContentStyles, IconButtonContentStyles, function (props) {
@@ -69,11 +71,11 @@ var IconButtonStyledPrimary = (0, _styledComponents["default"])(IconButtonStyled
69
71
  });
70
72
  exports.IconButtonStyledPrimary = IconButtonStyledPrimary;
71
73
  var IconButtonStyledSecondary = (0, _styledComponents["default"])(IconButtonStyled)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n ", " {\n background-color: ", ";\n\n svg {\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n }\n\n\n &:hover:not(:disabled) {\n ", " {\n background-color: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:active:not(:disabled),\n &.active-state {\n ", " {\n background: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n\n &:disabled {\n ", " {\n background-color: ", ";\n }\n svg {\n path {\n fill: ", ";\n }\n fill: ", ";\n }\n }\n"])), IconButtonContentStyles, function (props) {
72
- return props.useTransparentBackground ? 'transparent' : _styles.COLORS.getColor('white', props.theme);
74
+ return props.$useTransparentBackground ? 'transparent' : _styles.COLORS.getColor('white', props.theme);
73
75
  }, function (props) {
74
- return props.iconColor || _styles.COLORS.getColor('neutral_600', props.theme);
76
+ return props.$iconColor || _styles.COLORS.getColor('neutral_600', props.theme);
75
77
  }, function (props) {
76
- return props.iconColor || _styles.COLORS.getColor('neutral_600', props.theme);
78
+ return props.$iconColor || _styles.COLORS.getColor('neutral_600', props.theme);
77
79
  }, IconButtonContentStyles, function (props) {
78
80
  return _styles.COLORS.getColor('primary_20', props.theme);
79
81
  }, IconButtonContentStyles, IconButtonContentStyles, function (props) {
@@ -83,7 +85,7 @@ var IconButtonStyledSecondary = (0, _styledComponents["default"])(IconButtonStyl
83
85
  }, IconButtonContentStyles, IconButtonContentStyles, function (props) {
84
86
  return _styles.COLORS.getColor('primary_800', props.theme);
85
87
  }, IconButtonContentStyles, function (props) {
86
- return props.useTransparentBackground ? 'transparent' : _styles.COLORS.getColor('white', props.theme);
88
+ return props.$useTransparentBackground ? 'transparent' : _styles.COLORS.getColor('white', props.theme);
87
89
  }, function (props) {
88
90
  return _styles.COLORS.getColor('neutral_300', props.theme);
89
91
  }, function (props) {
@@ -123,21 +125,21 @@ var IconButton = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref)
123
125
  id: id,
124
126
  type: type !== null && type !== void 0 ? type : 'button',
125
127
  "data-testid": dataTestId,
126
- flatEdge: flatEdge,
128
+ $flatEdge: flatEdge,
127
129
  ref: ref,
128
130
  onClick: function onClick(event) {
129
131
  event.stopPropagation();
130
132
  action(event);
131
133
  },
132
134
  disabled: disabled,
133
- useTransparentBackground: useTransparentBackground,
134
- iconColor: iconColor,
135
- unsetIconSize: unsetIconSize,
135
+ $useTransparentBackground: useTransparentBackground,
136
+ $iconColor: iconColor,
137
+ $unsetIconSize: unsetIconSize,
136
138
  tabIndex: tabIndex,
137
- borderRadius: borderRadius || shape === 'circular' ? 18 : 0,
139
+ $borderRadius: borderRadius || shape === 'circular' ? 18 : 0,
138
140
  onMouseDown: !focusOnClick ? _common.defaultOnMouseDownHandler : undefined,
139
141
  hidden: hidden,
140
- invertFocus: invertFocus
142
+ $invertFocus: invertFocus
141
143
  }, rest), {}, {
142
144
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButtonContentStyles, {
143
145
  children: children
@@ -1 +1 @@
1
- {"version":3,"file":"Iconbutton.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_styles","_common","_TooltipWrapper","_jsxRuntime","_excluded","_templateObject","_templateObject2","_templateObject3","_templateObject4","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","getBorderRadius","props","borderRadius","concat","getBorderRadiusStyle","radius","flatEdge","IconButtonContentStyles","styled","div","_taggedTemplateLiteral2","exports","IconButtonStyled","button","unsetIconSize","invertFocus","invertedFocusStyles","focusStyles","IconButtonStyledPrimary","useTransparentBackground","COLORS","getColor","theme","iconColor","IconButtonStyledSecondary","IconButton","React","forwardRef","_ref","ref","id","variant","shape","action","children","disabled","tabIndex","type","hidden","dataTestId","focusOnClick","tooltip","rest","_objectWithoutProperties2","render","ButtonVariant","jsx","onClick","event","stopPropagation","onMouseDown","defaultOnMouseDownHandler","undefined","propTypes","_propTypes","oneOf","func","isRequired","bool","string","number","node","_default"],"sources":["../../src/Button/Iconbutton.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { BREAKPOINTS, COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\nimport { Testable } from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport TooltipWrapper from \"../Tooltips/TooltipWrapper\";\r\n\r\nexport interface HeaderItemProps {\r\n inMobileMenu?: boolean;\r\n useTransparentBackground?: boolean;\r\n iconColor?: string;\r\n unsetIconSize?: boolean;\r\n borderRadius?: number;\r\n shape?: string;\r\n flatEdge?: string;\r\n invertFocus?: boolean;\r\n shouldNotInteract?: boolean;\r\n}\r\n\r\nconst getBorderRadius = (props: HeaderItemProps) => (props.borderRadius ? `${props.borderRadius}px` : '4px');\r\n\r\nconst getBorderRadiusStyle = (props: HeaderItemProps) => {\r\n const radius = getBorderRadius(props);\r\n switch (props.flatEdge) {\r\n case 'left':\r\n return `0px ${radius} ${radius} 0px`;\r\n\r\n case 'right':\r\n return `${radius} 0px 0px ${radius}`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}`;\r\n }\r\n};\r\n\r\nexport const IconButtonContentStyles = styled.div``;\r\n\r\nexport const IconButtonStyled = styled.button<HeaderItemProps>`\r\n border-width: 0;\r\n cursor: pointer;\r\n height: 48px;\r\n width: 48px;\r\n background: transparent;\r\n position: relative;\r\n display: block;\r\n\r\n border-radius: ${(props) => (props.borderRadius ? `${props.borderRadius}px` : '4px')};\r\n ${IconButtonContentStyles} {\r\n height: 36px;\r\n width: 36px;\r\n border-radius: ${getBorderRadiusStyle};\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n svg {\r\n height: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n width: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n padding: 0;\r\n }\r\n }\r\n &:only-child {\r\n margin: 0;\r\n }\r\n &:disabled {\r\n cursor: not-allowed;\r\n }\r\n\r\n &:focus {\r\n ${(props) => (props.invertFocus ? invertedFocusStyles : focusStyles)}\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledPrimary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('primary_500', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('white', props.theme)};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n }\r\n &:hover:not(:disabled),\r\n &.hover-state {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledSecondary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n }\r\n }\r\n\r\n\r\n &:hover:not(:disabled) {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_100', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport interface IconButtonProps extends Testable, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onMouseDown'> {\r\n /** Variant of the button. Defaults to 'primary' */\r\n variant?: 'primary' | 'secondary';\r\n /** Shape of the button. Defaults to 'square' */\r\n shape?: 'square' | 'circular';\r\n /** Action that will get executed when button is clicked. */\r\n action: (event?: React.MouseEvent<HTMLButtonElement>) => void;\r\n /** Allows removing rounded corners on one of the edges of the button. */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** If set background filling color of the button will be transparent. */\r\n useTransparentBackground?: boolean;\r\n /** Custom fill color for SVG icon. */\r\n iconColor?: string;\r\n /** If set then the width and height of SVG icon will be set to 'unset', otherwise will be set to '24px' */\r\n unsetIconSize?: boolean;\r\n /** Sets border radius of the button. */\r\n borderRadius?: number;\r\n /** Content (icon) to show in the button. */\r\n children?: React.ReactNode;\r\n /** Invert color scheme of focus framing. */\r\n invertFocus?: boolean;\r\n /** If this flag is set, then blurs current focus, as a result will focus current IconButton when user clicks it. */\r\n focusOnClick?: boolean;\r\n /** Details of the tooltip to show. */\r\n tooltip?: Omit<TooltipProps, 'tabIndex'>;\r\n}\r\n\r\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\r\n (\r\n {\r\n id,\r\n variant,\r\n shape,\r\n action,\r\n children,\r\n useTransparentBackground,\r\n disabled,\r\n iconColor,\r\n unsetIconSize,\r\n tabIndex,\r\n flatEdge,\r\n borderRadius,\r\n type,\r\n hidden,\r\n invertFocus,\r\n dataTestId,\r\n focusOnClick,\r\n tooltip,\r\n ...rest\r\n }: IconButtonProps,\r\n ref,\r\n ) => {\r\n\r\n const render = () => {\r\n // Let's render button\r\n\r\n let ButtonVariant = IconButtonStyledPrimary;\r\n switch (variant) {\r\n case 'secondary':\r\n ButtonVariant = IconButtonStyledSecondary;\r\n break;\r\n }\r\n\r\n return <ButtonVariant\r\n id={id}\r\n type={type ?? 'button'}\r\n data-testid={dataTestId}\r\n flatEdge={flatEdge}\r\n ref={ref}\r\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\r\n event.stopPropagation();\r\n action(event);\r\n }}\r\n disabled={disabled}\r\n useTransparentBackground={useTransparentBackground}\r\n iconColor={iconColor}\r\n unsetIconSize={unsetIconSize}\r\n tabIndex={tabIndex}\r\n borderRadius={borderRadius || shape === 'circular' ? 18 : 0}\r\n onMouseDown={!focusOnClick ? defaultOnMouseDownHandler : undefined}\r\n hidden={hidden}\r\n invertFocus={invertFocus}\r\n {...rest}>\r\n <IconButtonContentStyles>{children}</IconButtonContentStyles>\r\n </ButtonVariant>;\r\n }\r\n\r\n return !tooltip\r\n ? render()\r\n : (\r\n <TooltipWrapper {...tooltip}>\r\n {render()}\r\n </TooltipWrapper>\r\n );\r\n },\r\n);\r\n\r\nexport default IconButton;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAGA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAwD,IAAAK,WAAA,GAAAL,OAAA;AAAA,IAAAM,SAAA;AAAA,IAAAC,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW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ledComponents","_styles","_common","_TooltipWrapper","_jsxRuntime","_excluded","_templateObject","_templateObject2","_templateObject3","_templateObject4","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","getBorderRadius","borderRadius","concat","getBorderRadiusStyle","flatEdge","radius","IconButtonContentStyles","styled","div","_taggedTemplateLiteral2","exports","IconButtonStyled","button","props","$borderRadius","$flatEdge","$unsetIconSize","$invertFocus","invertedFocusStyles","focusStyles","IconButtonStyledPrimary","$useTransparentBackground","COLORS","getColor","theme","$iconColor","IconButtonStyledSecondary","IconButton","React","forwardRef","_ref","ref","id","variant","shape","action","children","useTransparentBackground","disabled","iconColor","unsetIconSize","tabIndex","type","hidden","invertFocus","dataTestId","focusOnClick","tooltip","rest","_objectWithoutProperties2","render","ButtonVariant","jsx","onClick","event","stopPropagation","onMouseDown","defaultOnMouseDownHandler","undefined","propTypes","_propTypes","oneOf","func","isRequired","bool","string","number","node","_default"],"sources":["../../src/Button/Iconbutton.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { BREAKPOINTS, COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\nimport { Testable } from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport TooltipWrapper from \"../Tooltips/TooltipWrapper\";\r\n\r\nexport interface HeaderItemProps {\r\n inMobileMenu?: boolean;\r\n useTransparentBackground?: boolean;\r\n iconColor?: string;\r\n unsetIconSize?: boolean;\r\n borderRadius?: number;\r\n shape?: string;\r\n flatEdge?: string;\r\n invertFocus?: boolean;\r\n shouldNotInteract?: boolean;\r\n}\r\n\r\nconst getBorderRadius = (borderRadius?: number) => (borderRadius ? `${borderRadius}px` : '4px');\r\n\r\nconst getBorderRadiusStyle = ( flatEdge?: string, borderRadius?: number ) => {\r\n const radius = getBorderRadius(borderRadius);\r\n switch (flatEdge) {\r\n case 'left':\r\n return `0px ${radius} ${radius} 0px`;\r\n\r\n case 'right':\r\n return `${radius} 0px 0px ${radius}`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}`;\r\n }\r\n};\r\n\r\nexport const IconButtonContentStyles = styled.div``;\r\n\r\nexport const IconButtonStyled = styled.button<{$borderRadius?: number; $flatEdge?: string; $unsetIconSize?: boolean;\r\n $invertFocus?: boolean; $useTransparentBackground?: boolean; $iconColor?: string;}>`\r\n border-width: 0;\r\n cursor: pointer;\r\n height: 48px;\r\n width: 48px;\r\n background: transparent;\r\n position: relative;\r\n display: block;\r\n\r\n border-radius: ${(props) => (props.$borderRadius ? `${props.$borderRadius}px` : '4px')};\r\n ${IconButtonContentStyles} {\r\n height: 36px;\r\n width: 36px;\r\n border-radius: ${props => getBorderRadiusStyle(props.$flatEdge, props.$borderRadius)};\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n svg {\r\n height: ${(props) => (props.$unsetIconSize ? 'unset' : '24px')};\r\n width: ${(props) => (props.$unsetIconSize ? 'unset' : '24px')};\r\n padding: 0;\r\n }\r\n }\r\n &:only-child {\r\n margin: 0;\r\n }\r\n &:disabled {\r\n cursor: not-allowed;\r\n }\r\n\r\n &:focus {\r\n ${(props) => (props.$invertFocus ? invertedFocusStyles : focusStyles)}\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledPrimary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.$useTransparentBackground ? 'transparent' : COLORS.getColor('primary_500', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.$iconColor || COLORS.getColor('white', props.theme)};\r\n path {\r\n fill: ${(props) => props.$iconColor || COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n }\r\n &:hover:not(:disabled),\r\n &.hover-state {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledSecondary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.$useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.$iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n path {\r\n fill: ${(props) => props.$iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n }\r\n }\r\n\r\n\r\n &:hover:not(:disabled) {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_100', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.$useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport interface IconButtonProps extends Testable, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onMouseDown'> {\r\n /** Variant of the button. Defaults to 'primary' */\r\n variant?: 'primary' | 'secondary';\r\n /** Shape of the button. Defaults to 'square' */\r\n shape?: 'square' | 'circular';\r\n /** Action that will get executed when button is clicked. */\r\n action: (event?: React.MouseEvent<HTMLButtonElement>) => void;\r\n /** Allows removing rounded corners on one of the edges of the button. */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** If set background filling color of the button will be transparent. */\r\n useTransparentBackground?: boolean;\r\n /** Custom fill color for SVG icon. */\r\n iconColor?: string;\r\n /** If set then the width and height of SVG icon will be set to 'unset', otherwise will be set to '24px' */\r\n unsetIconSize?: boolean;\r\n /** Sets border radius of the button. */\r\n borderRadius?: number;\r\n /** Content (icon) to show in the button. */\r\n children?: React.ReactNode;\r\n /** Invert color scheme of focus framing. */\r\n invertFocus?: boolean;\r\n /** If this flag is set, then blurs current focus, as a result will focus current IconButton when user clicks it. */\r\n focusOnClick?: boolean;\r\n /** Details of the tooltip to show. */\r\n tooltip?: Omit<TooltipProps, 'tabIndex'>;\r\n}\r\n\r\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\r\n (\r\n {\r\n id,\r\n variant,\r\n shape,\r\n action,\r\n children,\r\n useTransparentBackground,\r\n disabled,\r\n iconColor,\r\n unsetIconSize,\r\n tabIndex,\r\n flatEdge,\r\n borderRadius,\r\n type,\r\n hidden,\r\n invertFocus,\r\n dataTestId,\r\n focusOnClick,\r\n tooltip,\r\n ...rest\r\n }: IconButtonProps,\r\n ref,\r\n ) => {\r\n\r\n const render = () => {\r\n // Let's render button\r\n\r\n let ButtonVariant = IconButtonStyledPrimary;\r\n switch (variant) {\r\n case 'secondary':\r\n ButtonVariant = IconButtonStyledSecondary;\r\n break;\r\n }\r\n\r\n return <ButtonVariant\r\n id={id}\r\n type={type ?? 'button'}\r\n data-testid={dataTestId}\r\n $flatEdge={flatEdge}\r\n ref={ref}\r\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\r\n event.stopPropagation();\r\n action(event);\r\n }}\r\n disabled={disabled}\r\n $useTransparentBackground={useTransparentBackground}\r\n $iconColor={iconColor}\r\n $unsetIconSize={unsetIconSize}\r\n tabIndex={tabIndex}\r\n $borderRadius={borderRadius || shape === 'circular' ? 18 : 0}\r\n onMouseDown={!focusOnClick ? defaultOnMouseDownHandler : undefined}\r\n hidden={hidden}\r\n $invertFocus={invertFocus}\r\n {...rest}>\r\n <IconButtonContentStyles>{children}</IconButtonContentStyles>\r\n </ButtonVariant>;\r\n }\r\n\r\n return !tooltip\r\n ? render()\r\n : (\r\n <TooltipWrapper {...tooltip}>\r\n {render()}\r\n </TooltipWrapper>\r\n );\r\n },\r\n);\r\n\r\nexport default IconButton;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAGA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAwD,IAAAK,WAAA,GAAAL,OAAA;AAAA,IAAAM,SAAA;AAAA,IAAAC,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WA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Y,EAAA2D,UAAA,YAAAM,MAAA;EAEZ9B,QAAQ,EAAAwB,UAAA,YAAAO,IAAA;EAERvB,WAAW,EAAAgB,UAAA,YAAAI,IAAA;EAEXlB,YAAY,EAAAc,UAAA,YAAAI;AAAA;AAAA,IAAAI,QAAA,GA2ECzC,UAAU;AAAAjB,OAAA,cAAA0D,QAAA","ignoreList":[]}
@@ -13,11 +13,32 @@ export interface HeaderItemProps {
13
13
  shouldNotInteract?: boolean;
14
14
  }
15
15
  export declare const IconButtonContentStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
16
- export declare const IconButtonStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, HeaderItemProps>> & string;
17
- export declare const IconButtonStyledPrimary: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof HeaderItemProps> & HeaderItemProps, "ref"> & {
16
+ export declare const IconButtonStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
17
+ $borderRadius?: number | undefined;
18
+ $flatEdge?: string | undefined;
19
+ $unsetIconSize?: boolean | undefined;
20
+ $invertFocus?: boolean | undefined;
21
+ $useTransparentBackground?: boolean | undefined;
22
+ $iconColor?: string | undefined;
23
+ }>> & string;
24
+ export declare const IconButtonStyledPrimary: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$borderRadius" | "$flatEdge" | "$unsetIconSize" | "$invertFocus" | "$useTransparentBackground" | "$iconColor"> & {
25
+ $borderRadius?: number | undefined;
26
+ $flatEdge?: string | undefined;
27
+ $unsetIconSize?: boolean | undefined;
28
+ $invertFocus?: boolean | undefined;
29
+ $useTransparentBackground?: boolean | undefined;
30
+ $iconColor?: string | undefined;
31
+ }, "ref"> & {
18
32
  ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
19
33
  }, never>> & string;
20
- export declare const IconButtonStyledSecondary: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof HeaderItemProps> & HeaderItemProps, "ref"> & {
34
+ export declare const IconButtonStyledSecondary: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$borderRadius" | "$flatEdge" | "$unsetIconSize" | "$invertFocus" | "$useTransparentBackground" | "$iconColor"> & {
35
+ $borderRadius?: number | undefined;
36
+ $flatEdge?: string | undefined;
37
+ $unsetIconSize?: boolean | undefined;
38
+ $invertFocus?: boolean | undefined;
39
+ $useTransparentBackground?: boolean | undefined;
40
+ $iconColor?: string | undefined;
41
+ }, "ref"> & {
21
42
  ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
22
43
  }, never>> & string;
23
44
  export interface IconButtonProps extends Testable, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onMouseDown'> {
@@ -12,12 +12,12 @@ import { COLORS, focusStyles, invertedFocusStyles } from '../styles';
12
12
  import { defaultOnMouseDownHandler } from '../common';
13
13
  import TooltipWrapper from "../Tooltips/TooltipWrapper";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
- var getBorderRadius = function getBorderRadius(props) {
16
- return props.borderRadius ? "".concat(props.borderRadius, "px") : '4px';
15
+ var getBorderRadius = function getBorderRadius(borderRadius) {
16
+ return borderRadius ? "".concat(borderRadius, "px") : '4px';
17
17
  };
18
- var getBorderRadiusStyle = function getBorderRadiusStyle(props) {
19
- var radius = getBorderRadius(props);
20
- switch (props.flatEdge) {
18
+ var getBorderRadiusStyle = function getBorderRadiusStyle(flatEdge, borderRadius) {
19
+ var radius = getBorderRadius(borderRadius);
20
+ switch (flatEdge) {
21
21
  case 'left':
22
22
  return "0px ".concat(radius, " ").concat(radius, " 0px");
23
23
  case 'right':
@@ -29,20 +29,22 @@ var getBorderRadiusStyle = function getBorderRadiusStyle(props) {
29
29
  };
30
30
  export var IconButtonContentStyles = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
31
31
  export var IconButtonStyled = styled.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-width: 0;\n cursor: pointer;\n height: 48px;\n width: 48px;\n background: transparent;\n position: relative;\n display: block;\n\n border-radius: ", ";\n ", " {\n height: 36px;\n width: 36px;\n border-radius: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n svg {\n height: ", ";\n width: ", ";\n padding: 0;\n }\n }\n &:only-child {\n margin: 0;\n }\n &:disabled {\n cursor: not-allowed;\n }\n\n &:focus {\n ", "\n }\n"])), function (props) {
32
- return props.borderRadius ? "".concat(props.borderRadius, "px") : '4px';
33
- }, IconButtonContentStyles, getBorderRadiusStyle, function (props) {
34
- return props.unsetIconSize ? 'unset' : '24px';
32
+ return props.$borderRadius ? "".concat(props.$borderRadius, "px") : '4px';
33
+ }, IconButtonContentStyles, function (props) {
34
+ return getBorderRadiusStyle(props.$flatEdge, props.$borderRadius);
35
+ }, function (props) {
36
+ return props.$unsetIconSize ? 'unset' : '24px';
35
37
  }, function (props) {
36
- return props.unsetIconSize ? 'unset' : '24px';
38
+ return props.$unsetIconSize ? 'unset' : '24px';
37
39
  }, function (props) {
38
- return props.invertFocus ? invertedFocusStyles : focusStyles;
40
+ return props.$invertFocus ? invertedFocusStyles : focusStyles;
39
41
  });
40
42
  export var IconButtonStyledPrimary = styled(IconButtonStyled)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", " {\n background-color: ", ";\n\n svg {\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n }\n &:hover:not(:disabled),\n &.hover-state {\n ", " {\n background-color: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:active:not(:disabled),\n &.active-state {\n ", " {\n background: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:disabled {\n ", " {\n background-color: ", ";\n }\n svg {\n path {\n fill: ", ";\n }\n fill: ", ";\n }\n }\n"])), IconButtonContentStyles, function (props) {
41
- return props.useTransparentBackground ? 'transparent' : COLORS.getColor('primary_500', props.theme);
43
+ return props.$useTransparentBackground ? 'transparent' : COLORS.getColor('primary_500', props.theme);
42
44
  }, function (props) {
43
- return props.iconColor || COLORS.getColor('white', props.theme);
45
+ return props.$iconColor || COLORS.getColor('white', props.theme);
44
46
  }, function (props) {
45
- return props.iconColor || COLORS.getColor('white', props.theme);
47
+ return props.$iconColor || COLORS.getColor('white', props.theme);
46
48
  }, IconButtonContentStyles, function (props) {
47
49
  return COLORS.getColor('primary_700', props.theme);
48
50
  }, IconButtonContentStyles, IconButtonContentStyles, function (props) {
@@ -59,11 +61,11 @@ export var IconButtonStyledPrimary = styled(IconButtonStyled)(_templateObject3 |
59
61
  return COLORS.getColor('white', props.theme);
60
62
  });
61
63
  export var IconButtonStyledSecondary = styled(IconButtonStyled)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", " {\n background-color: ", ";\n\n svg {\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n }\n\n\n &:hover:not(:disabled) {\n ", " {\n background-color: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:active:not(:disabled),\n &.active-state {\n ", " {\n background: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n\n &:disabled {\n ", " {\n background-color: ", ";\n }\n svg {\n path {\n fill: ", ";\n }\n fill: ", ";\n }\n }\n"])), IconButtonContentStyles, function (props) {
62
- return props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme);
64
+ return props.$useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme);
63
65
  }, function (props) {
64
- return props.iconColor || COLORS.getColor('neutral_600', props.theme);
66
+ return props.$iconColor || COLORS.getColor('neutral_600', props.theme);
65
67
  }, function (props) {
66
- return props.iconColor || COLORS.getColor('neutral_600', props.theme);
68
+ return props.$iconColor || COLORS.getColor('neutral_600', props.theme);
67
69
  }, IconButtonContentStyles, function (props) {
68
70
  return COLORS.getColor('primary_20', props.theme);
69
71
  }, IconButtonContentStyles, IconButtonContentStyles, function (props) {
@@ -73,7 +75,7 @@ export var IconButtonStyledSecondary = styled(IconButtonStyled)(_templateObject4
73
75
  }, IconButtonContentStyles, IconButtonContentStyles, function (props) {
74
76
  return COLORS.getColor('primary_800', props.theme);
75
77
  }, IconButtonContentStyles, function (props) {
76
- return props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme);
78
+ return props.$useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme);
77
79
  }, function (props) {
78
80
  return COLORS.getColor('neutral_300', props.theme);
79
81
  }, function (props) {
@@ -112,21 +114,21 @@ export var IconButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
112
114
  id: id,
113
115
  type: type !== null && type !== void 0 ? type : 'button',
114
116
  "data-testid": dataTestId,
115
- flatEdge: flatEdge,
117
+ $flatEdge: flatEdge,
116
118
  ref: ref,
117
119
  onClick: function onClick(event) {
118
120
  event.stopPropagation();
119
121
  action(event);
120
122
  },
121
123
  disabled: disabled,
122
- useTransparentBackground: useTransparentBackground,
123
- iconColor: iconColor,
124
- unsetIconSize: unsetIconSize,
124
+ $useTransparentBackground: useTransparentBackground,
125
+ $iconColor: iconColor,
126
+ $unsetIconSize: unsetIconSize,
125
127
  tabIndex: tabIndex,
126
- borderRadius: borderRadius || shape === 'circular' ? 18 : 0,
128
+ $borderRadius: borderRadius || shape === 'circular' ? 18 : 0,
127
129
  onMouseDown: !focusOnClick ? defaultOnMouseDownHandler : undefined,
128
130
  hidden: hidden,
129
- invertFocus: invertFocus
131
+ $invertFocus: invertFocus
130
132
  }, rest), {}, {
131
133
  children: /*#__PURE__*/_jsx(IconButtonContentStyles, {
132
134
  children: children
@@ -1 +1 @@
1
- {"version":3,"file":"Iconbutton.js","names":["React","styled","COLORS","focusStyles","invertedFocusStyles","defaultOnMouseDownHandler","TooltipWrapper","jsx","_jsx","getBorderRadius","props","borderRadius","concat","getBorderRadiusStyle","radius","flatEdge","IconButtonContentStyles","div","_templateObject","_taggedTemplateLiteral","IconButtonStyled","button","_templateObject2","unsetIconSize","invertFocus","IconButtonStyledPrimary","_templateObject3","useTransparentBackground","getColor","theme","iconColor","IconButtonStyledSecondary","_templateObject4","IconButton","forwardRef","_ref","ref","id","variant","shape","action","children","disabled","tabIndex","type","hidden","dataTestId","focusOnClick","tooltip","rest","_objectWithoutProperties","_excluded","render","ButtonVariant","_objectSpread","onClick","event","stopPropagation","onMouseDown","undefined","propTypes","_pt","oneOf","func","isRequired","bool","string","number","node"],"sources":["../../src/Button/Iconbutton.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { BREAKPOINTS, COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\nimport { Testable } from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport TooltipWrapper from \"../Tooltips/TooltipWrapper\";\r\n\r\nexport interface HeaderItemProps {\r\n inMobileMenu?: boolean;\r\n useTransparentBackground?: boolean;\r\n iconColor?: string;\r\n unsetIconSize?: boolean;\r\n borderRadius?: number;\r\n shape?: string;\r\n flatEdge?: string;\r\n invertFocus?: boolean;\r\n shouldNotInteract?: boolean;\r\n}\r\n\r\nconst getBorderRadius = (props: HeaderItemProps) => (props.borderRadius ? `${props.borderRadius}px` : '4px');\r\n\r\nconst getBorderRadiusStyle = (props: HeaderItemProps) => {\r\n const radius = getBorderRadius(props);\r\n switch (props.flatEdge) {\r\n case 'left':\r\n return `0px ${radius} ${radius} 0px`;\r\n\r\n case 'right':\r\n return `${radius} 0px 0px ${radius}`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}`;\r\n }\r\n};\r\n\r\nexport const IconButtonContentStyles = styled.div``;\r\n\r\nexport const IconButtonStyled = styled.button<HeaderItemProps>`\r\n border-width: 0;\r\n cursor: pointer;\r\n height: 48px;\r\n width: 48px;\r\n background: transparent;\r\n position: relative;\r\n display: block;\r\n\r\n border-radius: ${(props) => (props.borderRadius ? `${props.borderRadius}px` : '4px')};\r\n ${IconButtonContentStyles} {\r\n height: 36px;\r\n width: 36px;\r\n border-radius: ${getBorderRadiusStyle};\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n svg {\r\n height: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n width: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n padding: 0;\r\n }\r\n }\r\n &:only-child {\r\n margin: 0;\r\n }\r\n &:disabled {\r\n cursor: not-allowed;\r\n }\r\n\r\n &:focus {\r\n ${(props) => (props.invertFocus ? invertedFocusStyles : focusStyles)}\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledPrimary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('primary_500', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('white', props.theme)};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n }\r\n &:hover:not(:disabled),\r\n &.hover-state {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledSecondary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n }\r\n }\r\n\r\n\r\n &:hover:not(:disabled) {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_100', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport interface IconButtonProps extends Testable, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onMouseDown'> {\r\n /** Variant of the button. Defaults to 'primary' */\r\n variant?: 'primary' | 'secondary';\r\n /** Shape of the button. Defaults to 'square' */\r\n shape?: 'square' | 'circular';\r\n /** Action that will get executed when button is clicked. */\r\n action: (event?: React.MouseEvent<HTMLButtonElement>) => void;\r\n /** Allows removing rounded corners on one of the edges of the button. */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** If set background filling color of the button will be transparent. */\r\n useTransparentBackground?: boolean;\r\n /** Custom fill color for SVG icon. */\r\n iconColor?: string;\r\n /** If set then the width and height of SVG icon will be set to 'unset', otherwise will be set to '24px' */\r\n unsetIconSize?: boolean;\r\n /** Sets border radius of the button. */\r\n borderRadius?: number;\r\n /** Content (icon) to show in the button. */\r\n children?: React.ReactNode;\r\n /** Invert color scheme of focus framing. */\r\n invertFocus?: boolean;\r\n /** If this flag is set, then blurs current focus, as a result will focus current IconButton when user clicks it. */\r\n focusOnClick?: boolean;\r\n /** Details of the tooltip to show. */\r\n tooltip?: Omit<TooltipProps, 'tabIndex'>;\r\n}\r\n\r\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\r\n (\r\n {\r\n id,\r\n variant,\r\n shape,\r\n action,\r\n children,\r\n useTransparentBackground,\r\n disabled,\r\n iconColor,\r\n unsetIconSize,\r\n tabIndex,\r\n flatEdge,\r\n borderRadius,\r\n type,\r\n hidden,\r\n invertFocus,\r\n dataTestId,\r\n focusOnClick,\r\n tooltip,\r\n ...rest\r\n }: IconButtonProps,\r\n ref,\r\n ) => {\r\n\r\n const render = () => {\r\n // Let's render button\r\n\r\n let ButtonVariant = IconButtonStyledPrimary;\r\n switch (variant) {\r\n case 'secondary':\r\n ButtonVariant = IconButtonStyledSecondary;\r\n break;\r\n }\r\n\r\n return <ButtonVariant\r\n id={id}\r\n type={type ?? 'button'}\r\n data-testid={dataTestId}\r\n flatEdge={flatEdge}\r\n ref={ref}\r\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\r\n event.stopPropagation();\r\n action(event);\r\n }}\r\n disabled={disabled}\r\n useTransparentBackground={useTransparentBackground}\r\n iconColor={iconColor}\r\n unsetIconSize={unsetIconSize}\r\n tabIndex={tabIndex}\r\n borderRadius={borderRadius || shape === 'circular' ? 18 : 0}\r\n onMouseDown={!focusOnClick ? defaultOnMouseDownHandler : undefined}\r\n hidden={hidden}\r\n invertFocus={invertFocus}\r\n {...rest}>\r\n <IconButtonContentStyles>{children}</IconButtonContentStyles>\r\n </ButtonVariant>;\r\n }\r\n\r\n return !tooltip\r\n ? render()\r\n : (\r\n <TooltipWrapper {...tooltip}>\r\n {render()}\r\n </TooltipWrapper>\r\n );\r\n },\r\n);\r\n\r\nexport default IconButton;\r\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAAsBC,MAAM,EAAEC,WAAW,EAAEC,mBAAmB,QAAQ,WAAW;AACjF,SAASC,yBAAyB,QAAQ,WAAW;AAGrD,OAAOC,cAAc,MAAM,4BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAcxD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,KAAsB;EAAA,OAAMA,KAAK,CAACC,YAAY,MAAAC,MAAA,CAAMF,KAAK,CAACC,YAAY,UAAO,KAAK;AAAA,CAAC;AAE5G,IAAME,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAIH,KAAsB,EAAK;EACvD,IAAMI,MAAM,GAAGL,eAAe,CAACC,KAAK,CAAC;EACrC,QAAQA,KAAK,CAACK,QAAQ;IACpB,KAAK,MAAM;MACT,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AI,IAAA;EAEXlB,YAAY,EAAAc,GAAA,CAAAI;AAAA;AA2Ed,eAAehC,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"Iconbutton.js","names":["React","styled","COLORS","focusStyles","invertedFocusStyles","defaultOnMouseDownHandler","TooltipWrapper","jsx","_jsx","getBorderRadius","borderRadius","concat","getBorderRadiusStyle","flatEdge","radius","IconButtonContentStyles","div","_templateObject","_taggedTemplateLiteral","IconButtonStyled","button","_templateObject2","props","$borderRadius","$flatEdge","$unsetIconSize","$invertFocus","IconButtonStyledPrimary","_templateObject3","$useTransparentBackground","getColor","theme","$iconColor","IconButtonStyledSecondary","_templateObject4","IconButton","forwardRef","_ref","ref","id","variant","shape","action","children","useTransparentBackground","disabled","iconColor","unsetIconSize","tabIndex","type","hidden","invertFocus","dataTestId","focusOnClick","tooltip","rest","_objectWithoutProperties","_excluded","render","ButtonVariant","_objectSpread","onClick","event","stopPropagation","onMouseDown","undefined","propTypes","_pt","oneOf","func","isRequired","bool","string","number","node"],"sources":["../../src/Button/Iconbutton.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { BREAKPOINTS, COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\nimport { Testable } from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport TooltipWrapper from \"../Tooltips/TooltipWrapper\";\r\n\r\nexport interface HeaderItemProps {\r\n inMobileMenu?: boolean;\r\n useTransparentBackground?: boolean;\r\n iconColor?: string;\r\n unsetIconSize?: boolean;\r\n borderRadius?: number;\r\n shape?: string;\r\n flatEdge?: string;\r\n invertFocus?: boolean;\r\n shouldNotInteract?: boolean;\r\n}\r\n\r\nconst getBorderRadius = (borderRadius?: number) => (borderRadius ? `${borderRadius}px` : '4px');\r\n\r\nconst getBorderRadiusStyle = ( flatEdge?: string, borderRadius?: number ) => {\r\n const radius = getBorderRadius(borderRadius);\r\n switch (flatEdge) {\r\n case 'left':\r\n return `0px ${radius} ${radius} 0px`;\r\n\r\n case 'right':\r\n return `${radius} 0px 0px ${radius}`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}`;\r\n }\r\n};\r\n\r\nexport const IconButtonContentStyles = styled.div``;\r\n\r\nexport const IconButtonStyled = styled.button<{$borderRadius?: number; $flatEdge?: string; $unsetIconSize?: boolean;\r\n $invertFocus?: boolean; $useTransparentBackground?: boolean; $iconColor?: string;}>`\r\n border-width: 0;\r\n cursor: pointer;\r\n height: 48px;\r\n width: 48px;\r\n background: transparent;\r\n position: relative;\r\n display: block;\r\n\r\n border-radius: ${(props) => (props.$borderRadius ? `${props.$borderRadius}px` : '4px')};\r\n ${IconButtonContentStyles} {\r\n height: 36px;\r\n width: 36px;\r\n border-radius: ${props => getBorderRadiusStyle(props.$flatEdge, props.$borderRadius)};\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n svg {\r\n height: ${(props) => (props.$unsetIconSize ? 'unset' : '24px')};\r\n width: ${(props) => (props.$unsetIconSize ? 'unset' : '24px')};\r\n padding: 0;\r\n }\r\n }\r\n &:only-child {\r\n margin: 0;\r\n }\r\n &:disabled {\r\n cursor: not-allowed;\r\n }\r\n\r\n &:focus {\r\n ${(props) => (props.$invertFocus ? invertedFocusStyles : focusStyles)}\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledPrimary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.$useTransparentBackground ? 'transparent' : COLORS.getColor('primary_500', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.$iconColor || COLORS.getColor('white', props.theme)};\r\n path {\r\n fill: ${(props) => props.$iconColor || COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n }\r\n &:hover:not(:disabled),\r\n &.hover-state {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledSecondary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.$useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.$iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n path {\r\n fill: ${(props) => props.$iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n }\r\n }\r\n\r\n\r\n &:hover:not(:disabled) {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_100', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.$useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport interface IconButtonProps extends Testable, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onMouseDown'> {\r\n /** Variant of the button. Defaults to 'primary' */\r\n variant?: 'primary' | 'secondary';\r\n /** Shape of the button. Defaults to 'square' */\r\n shape?: 'square' | 'circular';\r\n /** Action that will get executed when button is clicked. */\r\n action: (event?: React.MouseEvent<HTMLButtonElement>) => void;\r\n /** Allows removing rounded corners on one of the edges of the button. */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** If set background filling color of the button will be transparent. */\r\n useTransparentBackground?: boolean;\r\n /** Custom fill color for SVG icon. */\r\n iconColor?: string;\r\n /** If set then the width and height of SVG icon will be set to 'unset', otherwise will be set to '24px' */\r\n unsetIconSize?: boolean;\r\n /** Sets border radius of the button. */\r\n borderRadius?: number;\r\n /** Content (icon) to show in the button. */\r\n children?: React.ReactNode;\r\n /** Invert color scheme of focus framing. */\r\n invertFocus?: boolean;\r\n /** If this flag is set, then blurs current focus, as a result will focus current IconButton when user clicks it. */\r\n focusOnClick?: boolean;\r\n /** Details of the tooltip to show. */\r\n tooltip?: Omit<TooltipProps, 'tabIndex'>;\r\n}\r\n\r\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\r\n (\r\n {\r\n id,\r\n variant,\r\n shape,\r\n action,\r\n children,\r\n useTransparentBackground,\r\n disabled,\r\n iconColor,\r\n unsetIconSize,\r\n tabIndex,\r\n flatEdge,\r\n borderRadius,\r\n type,\r\n hidden,\r\n invertFocus,\r\n dataTestId,\r\n focusOnClick,\r\n tooltip,\r\n ...rest\r\n }: IconButtonProps,\r\n ref,\r\n ) => {\r\n\r\n const render = () => {\r\n // Let's render button\r\n\r\n let ButtonVariant = IconButtonStyledPrimary;\r\n switch (variant) {\r\n case 'secondary':\r\n ButtonVariant = IconButtonStyledSecondary;\r\n break;\r\n }\r\n\r\n return <ButtonVariant\r\n id={id}\r\n type={type ?? 'button'}\r\n data-testid={dataTestId}\r\n $flatEdge={flatEdge}\r\n ref={ref}\r\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\r\n event.stopPropagation();\r\n action(event);\r\n }}\r\n disabled={disabled}\r\n $useTransparentBackground={useTransparentBackground}\r\n $iconColor={iconColor}\r\n $unsetIconSize={unsetIconSize}\r\n tabIndex={tabIndex}\r\n $borderRadius={borderRadius || shape === 'circular' ? 18 : 0}\r\n onMouseDown={!focusOnClick ? defaultOnMouseDownHandler : undefined}\r\n hidden={hidden}\r\n $invertFocus={invertFocus}\r\n {...rest}>\r\n <IconButtonContentStyles>{children}</IconButtonContentStyles>\r\n </ButtonVariant>;\r\n }\r\n\r\n return !tooltip\r\n ? render()\r\n : (\r\n <TooltipWrapper {...tooltip}>\r\n {render()}\r\n </TooltipWrapper>\r\n );\r\n },\r\n);\r\n\r\nexport default IconButton;\r\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAAsBC,MAAM,EAAEC,WAAW,EAAEC,mBAAmB,QAAQ,WAAW;AACjF,SAASC,yBAAyB,QAAQ,WAAW;AAGrD,OAAOC,cAAc,MAAM,4BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAcxD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,YAAqB;EAAA,OAAMA,YAAY,MAAAC,MAAA,CAAMD,YAAY,UAAO,KAAK;AAAA,CAAC;AAE/F,IAAME,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAKC,QAAiB,EAAEH,YAAqB,EAAM;EAC3E,IAAMI,MAAM,GAAGL,eAAe,CAACC,YAAY,CAAC;EAC5C,QAAQG,QAAQ;IACd,KAAK,MAAM;MACT,cAAAF,MAAA,CAAcG,MAAM,OAAAH,MAAA,CAAIG,MAAM;IAEhC,KAAK,OAAO;MACV,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AAAc,GAAA,CAAAI;AAAA;AA2Ed,eAAepC,UAAU","ignoreList":[]}
@@ -24,7 +24,7 @@ var CardBottomSectionNotesStyles = _styledComponents["default"].div(_templateObj
24
24
  });
25
25
  exports.CardBottomSectionNotesStyles = CardBottomSectionNotesStyles;
26
26
  var CardBottomSectionAuthorStyles = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 48px;\n\n div:first-child {\n flex-grow: 2;\n }\n\n svg, img {\n width: 80px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n ", "\n"])), function (props) {
27
- return props.disabled ? "\n color: ".concat(_index.COLORS.getColor('neutral_300', props.theme), ";\n svg, img {\n filter: grayscale(100%);\n }\n \n ") : '';
27
+ return props.$disabled ? "\n color: ".concat(_index.COLORS.getColor('neutral_300', props.theme), ";\n svg, img {\n filter: grayscale(100%);\n }\n \n ") : '';
28
28
  });
29
29
  exports.CardBottomSectionAuthorStyles = CardBottomSectionAuthorStyles;
30
30
  var CardBottomSectionDivider = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n border-top: 1px;\n border-top-color: ", ";\n border-top-style: solid;\n width: 100%;\n"])), function (props) {
@@ -96,7 +96,7 @@ var CardBottomSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
96
96
  })]
97
97
  })]
98
98
  }), (authorName || logo) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardBottomSectionAuthorStyles, {
99
- disabled: disabled,
99
+ $disabled: disabled,
100
100
  "data-testid": 'card-bottomSection-author',
101
101
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentXXS, {
102
102
  children: authorName
@@ -1 +1 @@
1
- {"version":3,"file":"CardBottomSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_index","_Button","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardBottomSectionProgressStyles","styled","div","_taggedTemplateLiteral2","exports","CardBottomSectionNotesStyles","props","COLORS","getColor","theme","CardBottomSectionAuthorStyles","disabled","concat","CardBottomSectionDivider","CardBottomSectionNoteLeftStyles","CardBottomSectionNoteRightStyles","CardBottomSectionButtonRowContainerStyles","CardBottomSectionContainer","CardBottomSection","forwardRef","_ref","ref","progressLevel","progressMax","_ref$progressType","progressType","LinearProgressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","authorName","logo","actions","_React$useState","useState","_React$useState2","_slicedToArray2","elRefs","setElRefs","useTheme","length","useEffect","Array","fill","map","createRef","useImperativeHandle","haveAtLeastSomething","undefined","jsxs","children","jsx","LinearProgress","size","Size","Small","type","variant","LinearProgressVariant","Normal","value","max","ComponentXXS","color","textStyle","ComponentTextStyle","Bold","x","index","IconButton","shape","action","onClick","icon","propTypes","_propTypes","number","string","node","arrayOf","isRequired","func","bool","_default"],"sources":["../../../src/Card/VerticalCard/CardBottomSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentTextStyle,\r\n ComponentXXS,\r\n LinearProgress,\r\n LinearProgressType,\r\n LinearProgressVariant,\r\n Size\r\n} from '../../index';\r\nimport {IconButton} from '../../Button';\r\n\r\nexport interface ActionItem {\r\n icon: React.ReactNode;\r\n onClick: () => void;\r\n}\r\n\r\nexport interface CardBottomSectionProps {\r\n /** Optional. Current progress level shown in the progress bar. */\r\n progressLevel?: number;\r\n /** Optional. Maximum level of progress in the progress bar. */\r\n progressMax?: number;\r\n /** Optional. Type of the progress bar. */\r\n progressType?: LinearProgressType;\r\n\r\n /** Optional. Note text shown on the left side of the section. */\r\n noteLeft?: string;\r\n /** Optional. Note icon shown on the left side of the section. */\r\n noteLeftIcon?: React.ReactNode;\r\n /** Optional. Note text shown on the right side of the section. */\r\n noteRight?: string;\r\n /** Optional. Note icon shown on the right side of the section. */\r\n noteRightIcon?: React.ReactNode;\r\n\r\n /** Author name shown at the bottom-left part of the section. */\r\n authorName?: string;\r\n /** Array of actions shown on the bottom-right corner of the section. */\r\n actions?: ActionItem[];\r\n /** Logo shown on the right side of the section, in front of AuthorName. */\r\n logo?: React.ReactNode;\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardBottomSectionProgressStyles = styled.div`\r\n padding: 8px 0;\r\n`;\r\n\r\nexport const CardBottomSectionNotesStyles = styled.div`\r\n height: 48px;\r\n position: relative;\r\n color: ${props => COLORS.getColor('neutral_500', props.theme)};\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nexport const CardBottomSectionAuthorStyles = styled.div<{ disabled?: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n height: 48px;\r\n\r\n div:first-child {\r\n flex-grow: 2;\r\n }\r\n\r\n svg, img {\r\n width: 80px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n\r\n ${props => props.disabled ? `\r\n color: ${COLORS.getColor('neutral_300', props.theme)};\r\n svg, img {\r\n filter: grayscale(100%);\r\n }\r\n \r\n ` : ''}\r\n`;\r\n\r\nexport const CardBottomSectionDivider = styled.div`\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n border-top-style: solid;\r\n width: 100%;\r\n`;\r\n\r\nexport const CardBottomSectionNoteLeftStyles = styled.div`\r\n position: absolute;\r\n left: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionNoteRightStyles = styled.div`\r\n position: absolute;\r\n right: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionButtonRowContainerStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n align-items: center;\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n border-top-style: solid;\r\n\r\n button:last-child {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n button:not(:last-child) {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n svg {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionContainer = styled.div`\r\n padding: 0px 16px 8px 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nconst CardBottomSection = React.forwardRef(({\r\n progressLevel,\r\n progressMax,\r\n progressType = LinearProgressType.Line,\r\n noteLeft,\r\n noteLeftIcon,\r\n noteRight,\r\n noteRightIcon,\r\n authorName,\r\n logo,\r\n actions,\r\n disabled\r\n }: CardBottomSectionProps,\r\n ref: React.Ref<React.RefObject<HTMLButtonElement>[]>) => {\r\n\r\n const [elRefs, setElRefs] = React.useState<React.RefObject<HTMLButtonElement>[]>([]);\r\n const theme = useTheme();\r\n const length = actions?.length || 0;\r\n\r\n React.useEffect(() => {\r\n setElRefs(Array(length || 0).fill(null).map(() => React.createRef<HTMLButtonElement>()));\r\n }, [length]);\r\n\r\n React.useImperativeHandle(ref, () => elRefs, [elRefs]);\r\n\r\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName;\r\n\r\n return (\r\n <CardBottomSectionContainer data-testid={'card-bottomSection'}>\r\n {haveAtLeastSomething && <CardBottomSectionDivider/>}\r\n {progressLevel != undefined && <CardBottomSectionProgressStyles>\r\n <LinearProgress size={Size.Small}\r\n type={progressType}\r\n variant={LinearProgressVariant.Normal}\r\n value={progressLevel}\r\n max={progressMax ?? progressLevel}/>\r\n </CardBottomSectionProgressStyles>}\r\n\r\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <CardBottomSectionNotesStyles>\r\n {(noteLeft || noteLeftIcon) && (\r\n <CardBottomSectionNoteLeftStyles>\r\n {noteLeftIcon}\r\n <ComponentXXS color={COLORS.getColor('neutral_500', theme)} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\r\n </CardBottomSectionNoteLeftStyles>\r\n )}\r\n {(noteRight || noteRightIcon) && (\r\n <CardBottomSectionNoteRightStyles>\r\n {noteRightIcon}\r\n <ComponentXXS color={COLORS.getColor('neutral_500', theme)} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\r\n </CardBottomSectionNoteRightStyles>\r\n )}\r\n </CardBottomSectionNotesStyles>}\r\n\r\n {(authorName || logo) && <CardBottomSectionAuthorStyles disabled={disabled} data-testid={'card-bottomSection-author'}>\r\n <ComponentXXS>{authorName}</ComponentXXS>\r\n {logo}\r\n </CardBottomSectionAuthorStyles>}\r\n\r\n {actions && <CardBottomSectionButtonRowContainerStyles>\r\n {actions.map((x, index) => (\r\n <IconButton ref={elRefs[index]}\r\n key={index}\r\n disabled={disabled}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={(e) => {\r\n x.onClick();\r\n }}>\r\n {x.icon}\r\n </IconButton>\r\n ))}\r\n </CardBottomSectionButtonRowContainerStyles>}\r\n </CardBottomSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardBottomSection;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AASA,IAAAG,OAAA,GAAAH,OAAA;AAAwC,IAAAI,WAAA,GAAAJ,OAAA;AAAA,IAAAK,eAAA,EAAAC,gBAAA,EAA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AEkB,MAAM,CAAC+B,KAAK,CAAE;UAEnB3D,QAAQ,EAAEA,QAAS;UACnBgD,OAAO,EAAC,WAAW;UACnBa,KAAK,EAAC,UAAU;UAChBC,MAAM,EAAE,SAAAA,OAAC5F,CAAC,EAAK;YACbwF,CAAC,CAACK,OAAO,CAAC,CAAC;UACb,CAAE;UAAAtB,QAAA,EACXiB,CAAC,CAACM;QAAI,GAPQL,KAQL,CAAC;MAAA,CACd;IAAC,CACuC,CAAC;EAAA,CAClB,CAAC;AAEjC,CAAC,CAAC;AAACpD,iBAAA,CAAA0D,SAAA;EAvMDtD,aAAa,EAAAuD,UAAA,YAAAC,MAAA;EAEbvD,WAAW,EAAAsD,UAAA,YAAAC,MAAA;EAKXlD,QAAQ,EAAAiD,UAAA,YAAAE,MAAA;EAERlD,YAAY,EAAAgD,UAAA,YAAAG,IAAA;EAEZlD,SAAS,EAAA+C,UAAA,YAAAE,MAAA;EAEThD,aAAa,EAAA8C,UAAA,YAAAG,IAAA;EAGbhD,UAAU,EAAA6C,UAAA,YAAAE,MAAA;EAEV7C,OAAO,EAAA2C,UAAA,YAAAI,OAAA,CAAAJ,UAAA,YAAAL,KAAA;IAxBPG,IAAI,EAAAE,UAAA,YAAAG,IAAA,CAAAE,UAAA;IACJR,OAAO,EAAAG,UAAA,YAAAM,IAAA,CAAAD;EAAA;EAyBPjD,IAAI,EAAA4C,UAAA,YAAAG,IAAA;EAEJrE,QAAQ,EAAAkE,UAAA,YAAAO;AAAA;AAAA,IAAAC,QAAA,GAmLKnE,iBAAiB;AAAAd,OAAA,cAAAiF,QAAA","ignoreList":[]}
1
+ {"version":3,"file":"CardBottomSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_index","_Button","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardBottomSectionProgressStyles","styled","div","_taggedTemplateLiteral2","exports","CardBottomSectionNotesStyles","props","COLORS","getColor","theme","CardBottomSectionAuthorStyles","$disabled","concat","CardBottomSectionDivider","CardBottomSectionNoteLeftStyles","CardBottomSectionNoteRightStyles","CardBottomSectionButtonRowContainerStyles","CardBottomSectionContainer","CardBottomSection","forwardRef","_ref","ref","progressLevel","progressMax","_ref$progressType","progressType","LinearProgressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","authorName","logo","actions","disabled","_React$useState","useState","_React$useState2","_slicedToArray2","elRefs","setElRefs","useTheme","length","useEffect","Array","fill","map","createRef","useImperativeHandle","haveAtLeastSomething","undefined","jsxs","children","jsx","LinearProgress","size","Size","Small","type","variant","LinearProgressVariant","Normal","value","max","ComponentXXS","color","textStyle","ComponentTextStyle","Bold","x","index","IconButton","shape","action","onClick","icon","propTypes","_propTypes","number","string","node","arrayOf","isRequired","func","bool","_default"],"sources":["../../../src/Card/VerticalCard/CardBottomSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentTextStyle,\r\n ComponentXXS,\r\n LinearProgress,\r\n LinearProgressType,\r\n LinearProgressVariant,\r\n Size\r\n} from '../../index';\r\nimport {IconButton} from '../../Button';\r\n\r\nexport interface ActionItem {\r\n icon: React.ReactNode;\r\n onClick: () => void;\r\n}\r\n\r\nexport interface CardBottomSectionProps {\r\n /** Optional. Current progress level shown in the progress bar. */\r\n progressLevel?: number;\r\n /** Optional. Maximum level of progress in the progress bar. */\r\n progressMax?: number;\r\n /** Optional. Type of the progress bar. */\r\n progressType?: LinearProgressType;\r\n\r\n /** Optional. Note text shown on the left side of the section. */\r\n noteLeft?: string;\r\n /** Optional. Note icon shown on the left side of the section. */\r\n noteLeftIcon?: React.ReactNode;\r\n /** Optional. Note text shown on the right side of the section. */\r\n noteRight?: string;\r\n /** Optional. Note icon shown on the right side of the section. */\r\n noteRightIcon?: React.ReactNode;\r\n\r\n /** Author name shown at the bottom-left part of the section. */\r\n authorName?: string;\r\n /** Array of actions shown on the bottom-right corner of the section. */\r\n actions?: ActionItem[];\r\n /** Logo shown on the right side of the section, in front of AuthorName. */\r\n logo?: React.ReactNode;\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardBottomSectionProgressStyles = styled.div`\r\n padding: 8px 0;\r\n`;\r\n\r\nexport const CardBottomSectionNotesStyles = styled.div`\r\n height: 48px;\r\n position: relative;\r\n color: ${props => COLORS.getColor('neutral_500', props.theme)};\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nexport const CardBottomSectionAuthorStyles = styled.div<{ $disabled?: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n height: 48px;\r\n\r\n div:first-child {\r\n flex-grow: 2;\r\n }\r\n\r\n svg, img {\r\n width: 80px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n\r\n ${props => props.$disabled ? `\r\n color: ${COLORS.getColor('neutral_300', props.theme)};\r\n svg, img {\r\n filter: grayscale(100%);\r\n }\r\n \r\n ` : ''}\r\n`;\r\n\r\nexport const CardBottomSectionDivider = styled.div`\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n border-top-style: solid;\r\n width: 100%;\r\n`;\r\n\r\nexport const CardBottomSectionNoteLeftStyles = styled.div`\r\n position: absolute;\r\n left: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionNoteRightStyles = styled.div`\r\n position: absolute;\r\n right: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionButtonRowContainerStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n align-items: center;\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n border-top-style: solid;\r\n\r\n button:last-child {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n button:not(:last-child) {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n svg {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionContainer = styled.div`\r\n padding: 0px 16px 8px 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nconst CardBottomSection = React.forwardRef(({\r\n progressLevel,\r\n progressMax,\r\n progressType = LinearProgressType.Line,\r\n noteLeft,\r\n noteLeftIcon,\r\n noteRight,\r\n noteRightIcon,\r\n authorName,\r\n logo,\r\n actions,\r\n disabled\r\n }: CardBottomSectionProps,\r\n ref: React.Ref<React.RefObject<HTMLButtonElement>[]>) => {\r\n\r\n const [elRefs, setElRefs] = React.useState<React.RefObject<HTMLButtonElement>[]>([]);\r\n const theme = useTheme();\r\n const length = actions?.length || 0;\r\n\r\n React.useEffect(() => {\r\n setElRefs(Array(length || 0).fill(null).map(() => React.createRef<HTMLButtonElement>()));\r\n }, [length]);\r\n\r\n React.useImperativeHandle(ref, () => elRefs, [elRefs]);\r\n\r\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName;\r\n\r\n return (\r\n <CardBottomSectionContainer data-testid={'card-bottomSection'}>\r\n {haveAtLeastSomething && <CardBottomSectionDivider/>}\r\n {progressLevel != undefined && <CardBottomSectionProgressStyles>\r\n <LinearProgress size={Size.Small}\r\n type={progressType}\r\n variant={LinearProgressVariant.Normal}\r\n value={progressLevel}\r\n max={progressMax ?? progressLevel}/>\r\n </CardBottomSectionProgressStyles>}\r\n\r\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <CardBottomSectionNotesStyles>\r\n {(noteLeft || noteLeftIcon) && (\r\n <CardBottomSectionNoteLeftStyles>\r\n {noteLeftIcon}\r\n <ComponentXXS color={COLORS.getColor('neutral_500', theme)} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\r\n </CardBottomSectionNoteLeftStyles>\r\n )}\r\n {(noteRight || noteRightIcon) && (\r\n <CardBottomSectionNoteRightStyles>\r\n {noteRightIcon}\r\n <ComponentXXS color={COLORS.getColor('neutral_500', theme)} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\r\n </CardBottomSectionNoteRightStyles>\r\n )}\r\n </CardBottomSectionNotesStyles>}\r\n\r\n {(authorName || logo) && <CardBottomSectionAuthorStyles $disabled={disabled} data-testid={'card-bottomSection-author'}>\r\n <ComponentXXS>{authorName}</ComponentXXS>\r\n {logo}\r\n </CardBottomSectionAuthorStyles>}\r\n\r\n {actions && <CardBottomSectionButtonRowContainerStyles>\r\n {actions.map((x, index) => (\r\n <IconButton ref={elRefs[index]}\r\n key={index}\r\n disabled={disabled}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={(e) => {\r\n x.onClick();\r\n }}>\r\n {x.icon}\r\n </IconButton>\r\n ))}\r\n </CardBottomSectionButtonRowContainerStyles>}\r\n </CardBottomSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardBottomSection;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AASA,IAAAG,OAAA,GAAAH,OAAA;AAAwC,IAAAI,WAAA,GAAAJ,OAAA;AAAA,IAAAK,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAAA,SAAAC,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KAAK,EAAC,UAAU;UAChBC,MAAM,EAAE,SAAAA,OAAC7F,CAAC,EAAK;YACbyF,CAAC,CAACK,OAAO,CAAC,CAAC;UACb,CAAE;UAAAtB,QAAA,EACXiB,CAAC,CAACM;QAAI,GAPQL,KAQL,CAAC;MAAA,CACd;IAAC,CACuC,CAAC;EAAA,CAClB,CAAC;AAEjC,CAAC,CAAC;AAACrD,iBAAA,CAAA2D,SAAA;EAvMDvD,aAAa,EAAAwD,UAAA,YAAAC,MAAA;EAEbxD,WAAW,EAAAuD,UAAA,YAAAC,MAAA;EAKXnD,QAAQ,EAAAkD,UAAA,YAAAE,MAAA;EAERnD,YAAY,EAAAiD,UAAA,YAAAG,IAAA;EAEZnD,SAAS,EAAAgD,UAAA,YAAAE,MAAA;EAETjD,aAAa,EAAA+C,UAAA,YAAAG,IAAA;EAGbjD,UAAU,EAAA8C,UAAA,YAAAE,MAAA;EAEV9C,OAAO,EAAA4C,UAAA,YAAAI,OAAA,CAAAJ,UAAA,YAAAL,KAAA;IAxBPG,IAAI,EAAAE,UAAA,YAAAG,IAAA,CAAAE,UAAA;IACJR,OAAO,EAAAG,UAAA,YAAAM,IAAA,CAAAD;EAAA;EAyBPlD,IAAI,EAAA6C,UAAA,YAAAG,IAAA;EAEJ9C,QAAQ,EAAA2C,UAAA,YAAAO;AAAA;AAAA,IAAAC,QAAA,GAmLKpE,iBAAiB;AAAAd,OAAA,cAAAkF,QAAA","ignoreList":[]}
@@ -31,7 +31,7 @@ export interface CardBottomSectionProps {
31
31
  export declare const CardBottomSectionProgressStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
32
32
  export declare const CardBottomSectionNotesStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
33
33
  export declare const CardBottomSectionAuthorStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
34
- disabled?: boolean | undefined;
34
+ $disabled?: boolean | undefined;
35
35
  }>> & string;
36
36
  export declare const CardBottomSectionDivider: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
37
37
  export declare const CardBottomSectionNoteLeftStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -13,7 +13,7 @@ export var CardBottomSectionNotesStyles = styled.div(_templateObject2 || (_templ
13
13
  return COLORS.getColor('neutral_500', props.theme);
14
14
  });
15
15
  export var CardBottomSectionAuthorStyles = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 48px;\n\n div:first-child {\n flex-grow: 2;\n }\n\n svg, img {\n width: 80px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n ", "\n"])), function (props) {
16
- return props.disabled ? "\n color: ".concat(COLORS.getColor('neutral_300', props.theme), ";\n svg, img {\n filter: grayscale(100%);\n }\n \n ") : '';
16
+ return props.$disabled ? "\n color: ".concat(COLORS.getColor('neutral_300', props.theme), ";\n svg, img {\n filter: grayscale(100%);\n }\n \n ") : '';
17
17
  });
18
18
  export var CardBottomSectionDivider = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-top: 1px;\n border-top-color: ", ";\n border-top-style: solid;\n width: 100%;\n"])), function (props) {
19
19
  return COLORS.getColor('neutral_100', props.theme);
@@ -79,7 +79,7 @@ var CardBottomSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
79
79
  })]
80
80
  })]
81
81
  }), (authorName || logo) && /*#__PURE__*/_jsxs(CardBottomSectionAuthorStyles, {
82
- disabled: disabled,
82
+ $disabled: disabled,
83
83
  "data-testid": 'card-bottomSection-author',
84
84
  children: [/*#__PURE__*/_jsx(ComponentXXS, {
85
85
  children: authorName