@dnanpm/styleguide 3.12.3 → 4.0.1

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 (157) hide show
  1. package/build/cjs/components/Button/Button.d.ts +1 -7
  2. package/build/cjs/components/Button/Button.js +3 -3
  3. package/build/cjs/components/ButtonArrow/ButtonArrow.d.ts +1 -7
  4. package/build/cjs/components/ButtonArrow/ButtonArrow.js +2 -2
  5. package/build/cjs/components/ButtonIcon/ButtonIcon.js +3 -3
  6. package/build/cjs/components/Chip/Chip.d.ts +2 -18
  7. package/build/cjs/components/Chip/Chip.js +2 -2
  8. package/build/cjs/components/Drawer/Drawer.d.ts +0 -7
  9. package/build/cjs/components/Drawer/Drawer.js +1 -1
  10. package/build/cjs/components/Footer/Components/FooterComponents.js +0 -1
  11. package/build/cjs/components/Hero/Hero.js +3 -2
  12. package/build/cjs/components/Icon/Icon.d.ts +2 -8
  13. package/build/cjs/components/Icon/Icon.js +3 -10
  14. package/build/cjs/components/Input/Input.d.ts +1 -10
  15. package/build/cjs/components/LabelText/LabelText.d.ts +1 -6
  16. package/build/cjs/components/MainHeaderNavigation/ChildComponents/LanguageSelector.js +10 -9
  17. package/build/cjs/components/MainHeaderNavigation/ChildComponents/LoginTooltip.js +2 -2
  18. package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +2 -4
  19. package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +4 -6
  20. package/build/cjs/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.js +4 -8
  21. package/build/cjs/components/MainHeaderNavigation/ChildComponents/PageSearch.js +2 -2
  22. package/build/cjs/components/MainHeaderNavigation/MainHeaderNavigation.d.ts +1 -7
  23. package/build/cjs/components/MainHeaderNavigation/MainHeaderNavigation.js +1 -3
  24. package/build/cjs/components/MainHeaderNavigation/context/NavContext.d.ts +0 -1
  25. package/build/cjs/components/MainHeaderNavigation/context/NavContext.js +0 -1
  26. package/build/cjs/components/Modal/Modal.d.ts +0 -5
  27. package/build/cjs/components/ReadMore/ReadMore.d.ts +0 -20
  28. package/build/cjs/components/ReadMore/ReadMore.js +2 -8
  29. package/build/cjs/components/Tab/Tab.d.ts +2 -30
  30. package/build/cjs/components/Tab/Tab.js +2 -33
  31. package/build/cjs/components/Tabs/Tabs.d.ts +1 -9
  32. package/build/cjs/components/Tabs/Tabs.js +9 -17
  33. package/build/cjs/components/Tooltip/Tooltip.js +1 -1
  34. package/build/cjs/components/index.d.ts +0 -4
  35. package/build/cjs/hooks/useCloseOutsideOrElementClicked.js +1 -1
  36. package/build/cjs/index.js +0 -8
  37. package/build/cjs/themes/themeComponents/navigation.js +0 -4
  38. package/build/es/components/Button/Button.d.ts +1 -7
  39. package/build/es/components/Button/Button.js +3 -3
  40. package/build/es/components/ButtonArrow/ButtonArrow.d.ts +1 -7
  41. package/build/es/components/ButtonArrow/ButtonArrow.js +2 -2
  42. package/build/es/components/ButtonIcon/ButtonIcon.js +3 -3
  43. package/build/es/components/Chip/Chip.d.ts +2 -18
  44. package/build/es/components/Chip/Chip.js +2 -2
  45. package/build/es/components/Drawer/Drawer.d.ts +0 -7
  46. package/build/es/components/Drawer/Drawer.js +1 -1
  47. package/build/es/components/Footer/Components/FooterComponents.js +0 -1
  48. package/build/es/components/Hero/Hero.js +3 -2
  49. package/build/es/components/Icon/Icon.d.ts +2 -8
  50. package/build/es/components/Icon/Icon.js +3 -10
  51. package/build/es/components/Input/Input.d.ts +1 -10
  52. package/build/es/components/LabelText/LabelText.d.ts +1 -6
  53. package/build/es/components/MainHeaderNavigation/ChildComponents/LanguageSelector.js +11 -10
  54. package/build/es/components/MainHeaderNavigation/ChildComponents/LoginTooltip.js +2 -2
  55. package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +2 -4
  56. package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +4 -6
  57. package/build/es/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.js +5 -9
  58. package/build/es/components/MainHeaderNavigation/ChildComponents/PageSearch.js +2 -2
  59. package/build/es/components/MainHeaderNavigation/MainHeaderNavigation.d.ts +1 -7
  60. package/build/es/components/MainHeaderNavigation/MainHeaderNavigation.js +1 -3
  61. package/build/es/components/MainHeaderNavigation/context/NavContext.d.ts +0 -1
  62. package/build/es/components/MainHeaderNavigation/context/NavContext.js +0 -1
  63. package/build/es/components/Modal/Modal.d.ts +0 -5
  64. package/build/es/components/ReadMore/ReadMore.d.ts +0 -20
  65. package/build/es/components/ReadMore/ReadMore.js +2 -8
  66. package/build/es/components/Tab/Tab.d.ts +2 -30
  67. package/build/es/components/Tab/Tab.js +2 -33
  68. package/build/es/components/Tabs/Tabs.d.ts +1 -9
  69. package/build/es/components/Tabs/Tabs.js +9 -17
  70. package/build/es/components/Tooltip/Tooltip.js +1 -1
  71. package/build/es/components/index.d.ts +0 -4
  72. package/build/es/hooks/useCloseOutsideOrElementClicked.js +1 -1
  73. package/build/es/index.js +0 -4
  74. package/build/es/themes/themeComponents/navigation.js +1 -3
  75. package/package.json +14 -14
  76. package/build/cjs/components/ButtonRound/ButtonRound.d.ts +0 -10
  77. package/build/cjs/components/ButtonRound/ButtonRound.js +0 -37
  78. package/build/cjs/components/Icons/index.js +0 -224
  79. package/build/cjs/components/MainNavigation/ChildComponents/BusinessMenu.d.ts +0 -3
  80. package/build/cjs/components/MainNavigation/ChildComponents/BusinessMenu.js +0 -59
  81. package/build/cjs/components/MainNavigation/ChildComponents/DesktopMenu.d.ts +0 -3
  82. package/build/cjs/components/MainNavigation/ChildComponents/DesktopMenu.js +0 -259
  83. package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +0 -10
  84. package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +0 -168
  85. package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.d.ts +0 -4
  86. package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.js +0 -38
  87. package/build/cjs/components/MainNavigation/ChildComponents/LinkModifier.d.ts +0 -9
  88. package/build/cjs/components/MainNavigation/ChildComponents/LinkModifier.js +0 -38
  89. package/build/cjs/components/MainNavigation/ChildComponents/LoginTooltip.d.ts +0 -6
  90. package/build/cjs/components/MainNavigation/ChildComponents/LoginTooltip.js +0 -23
  91. package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenu.d.ts +0 -24
  92. package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +0 -104
  93. package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +0 -6
  94. package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +0 -62
  95. package/build/cjs/components/MainNavigation/ChildComponents/MinicartTooltip.d.ts +0 -7
  96. package/build/cjs/components/MainNavigation/ChildComponents/MinicartTooltip.js +0 -26
  97. package/build/cjs/components/MainNavigation/ChildComponents/MobileMenu.d.ts +0 -3
  98. package/build/cjs/components/MainNavigation/ChildComponents/MobileMenu.js +0 -193
  99. package/build/cjs/components/MainNavigation/ChildComponents/PageSearch.d.ts +0 -6
  100. package/build/cjs/components/MainNavigation/ChildComponents/PageSearch.js +0 -23
  101. package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.d.ts +0 -13
  102. package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.js +0 -74
  103. package/build/cjs/components/MainNavigation/MainNavigation.d.ts +0 -38
  104. package/build/cjs/components/MainNavigation/MainNavigation.js +0 -319
  105. package/build/cjs/components/MainNavigation/context/MobileMenuContext.d.ts +0 -6
  106. package/build/cjs/components/MainNavigation/context/MobileMenuContext.js +0 -11
  107. package/build/cjs/components/MainNavigation/context/NavContext.d.ts +0 -29
  108. package/build/cjs/components/MainNavigation/context/NavContext.js +0 -46
  109. package/build/cjs/components/MainNavigation/globalNavStyles.d.ts +0 -13
  110. package/build/cjs/components/MainNavigation/globalNavStyles.js +0 -94
  111. package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.d.ts +0 -90
  112. package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.js +0 -207
  113. package/build/cjs/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.d.ts +0 -10
  114. package/build/cjs/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.js +0 -34
  115. package/build/cjs/components/TooltipMenu/TooltipMenu.d.ts +0 -45
  116. package/build/cjs/components/TooltipMenu/TooltipMenu.js +0 -76
  117. package/build/es/components/ButtonRound/ButtonRound.d.ts +0 -10
  118. package/build/es/components/ButtonRound/ButtonRound.js +0 -29
  119. package/build/es/components/Icons/index.js +0 -109
  120. package/build/es/components/MainNavigation/ChildComponents/BusinessMenu.d.ts +0 -3
  121. package/build/es/components/MainNavigation/ChildComponents/BusinessMenu.js +0 -51
  122. package/build/es/components/MainNavigation/ChildComponents/DesktopMenu.d.ts +0 -3
  123. package/build/es/components/MainNavigation/ChildComponents/DesktopMenu.js +0 -251
  124. package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +0 -10
  125. package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +0 -159
  126. package/build/es/components/MainNavigation/ChildComponents/LanguageSelector.d.ts +0 -4
  127. package/build/es/components/MainNavigation/ChildComponents/LanguageSelector.js +0 -30
  128. package/build/es/components/MainNavigation/ChildComponents/LinkModifier.d.ts +0 -9
  129. package/build/es/components/MainNavigation/ChildComponents/LinkModifier.js +0 -29
  130. package/build/es/components/MainNavigation/ChildComponents/LoginTooltip.d.ts +0 -6
  131. package/build/es/components/MainNavigation/ChildComponents/LoginTooltip.js +0 -15
  132. package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenu.d.ts +0 -24
  133. package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +0 -96
  134. package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +0 -6
  135. package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +0 -57
  136. package/build/es/components/MainNavigation/ChildComponents/MinicartTooltip.d.ts +0 -7
  137. package/build/es/components/MainNavigation/ChildComponents/MinicartTooltip.js +0 -18
  138. package/build/es/components/MainNavigation/ChildComponents/MobileMenu.d.ts +0 -3
  139. package/build/es/components/MainNavigation/ChildComponents/MobileMenu.js +0 -185
  140. package/build/es/components/MainNavigation/ChildComponents/PageSearch.d.ts +0 -6
  141. package/build/es/components/MainNavigation/ChildComponents/PageSearch.js +0 -15
  142. package/build/es/components/MainNavigation/ChildComponents/Ribbon.d.ts +0 -13
  143. package/build/es/components/MainNavigation/ChildComponents/Ribbon.js +0 -66
  144. package/build/es/components/MainNavigation/MainNavigation.d.ts +0 -38
  145. package/build/es/components/MainNavigation/MainNavigation.js +0 -311
  146. package/build/es/components/MainNavigation/context/MobileMenuContext.d.ts +0 -6
  147. package/build/es/components/MainNavigation/context/MobileMenuContext.js +0 -7
  148. package/build/es/components/MainNavigation/context/NavContext.d.ts +0 -29
  149. package/build/es/components/MainNavigation/context/NavContext.js +0 -42
  150. package/build/es/components/MainNavigation/globalNavStyles.d.ts +0 -13
  151. package/build/es/components/MainNavigation/globalNavStyles.js +0 -89
  152. package/build/es/components/SecondaryNavigation/SecondaryNavigation.d.ts +0 -90
  153. package/build/es/components/SecondaryNavigation/SecondaryNavigation.js +0 -199
  154. package/build/es/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.d.ts +0 -10
  155. package/build/es/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.js +0 -31
  156. package/build/es/components/TooltipMenu/TooltipMenu.d.ts +0 -45
  157. package/build/es/components/TooltipMenu/TooltipMenu.js +0 -68
@@ -44,14 +44,13 @@ const StyledButtonIcon = styledComponents.styled(ButtonIcon.default) `
44
44
  /** @visibleName Read More */
45
45
  const ReadMore = (_a) => {
46
46
  var { collapsedSize = '10rem', 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["collapsedSize", 'data-testid']);
47
- const [expanded, setExpanded] = React.useState(props.seoInitExpanded === true || false);
47
+ const [expanded, setExpanded] = React.useState(false);
48
48
  const contentRef = React.useRef(null);
49
49
  const buttonRef = React.useRef(null);
50
50
  const userInteractedRef = React.useRef(false);
51
51
  // TODO: Remove once https://jira.dna.fi/browse/STYLE-662 is done
52
52
  const temporaryIsStatelessFlag = typeof props.isExpanded !== 'undefined';
53
53
  const temporaryStateManagement = temporaryIsStatelessFlag ? props.isExpanded : expanded;
54
- const temporaryButtonLabel = temporaryStateManagement ? props.showLessText : props.showMoreText;
55
54
  const handleOnClick = (event) => {
56
55
  if (props.onClick) {
57
56
  props.onClick(event);
@@ -61,11 +60,6 @@ const ReadMore = (_a) => {
61
60
  }
62
61
  userInteractedRef.current = true;
63
62
  };
64
- React.useEffect(() => {
65
- if (props.seoInitExpanded) {
66
- setExpanded(false);
67
- }
68
- }, [props.seoInitExpanded]);
69
63
  React.useEffect(() => {
70
64
  var _a, _b;
71
65
  if (userInteractedRef.current) {
@@ -92,7 +86,7 @@ const ReadMore = (_a) => {
92
86
  return (React__default.default.createElement(Container, { id: props.id, className: props.className, "data-testid": dataTestId, "aria-label": props.ariaLabel, role: "region" },
93
87
  React__default.default.createElement(Content, { ref: contentRef, "$isExpanded": temporaryStateManagement, "$collapsedSize": collapsedSize, "data-testid": dataTestId && `${dataTestId}-content`, "aria-hidden": temporaryStateManagement ? 'false' : 'true', tabIndex: temporaryStateManagement ? 0 : -1 }, React.Children.map(props.children, forceTabIndexOnTextLinks)),
94
88
  React__default.default.createElement(ButtonWrapper, { "$buttonPosition": props.buttonPosition },
95
- React__default.default.createElement(StyledButtonIcon, { ref: buttonRef, icon: temporaryStateManagement ? icons.ChevronUp : icons.ChevronDown, onClick: handleOnClick, "aria-expanded": temporaryStateManagement }, temporaryButtonLabel || props.buttonLabel))));
89
+ React__default.default.createElement(StyledButtonIcon, { ref: buttonRef, icon: temporaryStateManagement ? icons.ChevronUp : icons.ChevronDown, onClick: handleOnClick, "aria-expanded": temporaryStateManagement }, props.buttonLabel))));
96
90
  };
97
91
 
98
92
  exports.default = ReadMore;
@@ -1,10 +1,6 @@
1
1
  import type { MouseEvent, ReactNode } from 'react';
2
2
  import React from 'react';
3
3
  type Type = 'box' | 'panel' | 'underlined';
4
- /**
5
- * @deprecated Use `box`, `panel` or `underlined` types
6
- */
7
- type TypeDeprecated = 'default' | 'gray';
8
4
  export interface Props {
9
5
  /**
10
6
  * Unique ID for the component
@@ -21,45 +17,21 @@ export interface Props {
21
17
  * @param {Type} panel Content container remains unstyled
22
18
  * @param {Type} underlined Tab label is visually similar to anchor, with content container unstyled
23
19
  *
24
- * @param {TypeDeprecated} default DEPRECATED Use `box` type
25
- * @param {TypeDeprecated} gray DEPRECATED Use `box`, `panel` or `underlined` types
26
- *
27
20
  * @default 'box'
28
21
  */
29
- type?: Type | TypeDeprecated;
30
- /**
31
- * Style of the tab
32
- *
33
- * @deprecated Use `type` property
34
- */
35
- tabStyle?: Type;
22
+ type?: Type;
36
23
  /**
37
24
  * Content of the component
38
25
  */
39
26
  children?: ReactNode;
40
- /**
41
- * Allows to define currently active tab
42
- *
43
- * @deprecated Use `isActive` property
44
- */
45
- activeTab?: string;
46
27
  /**
47
28
  * Allows to set tab as active
48
29
  */
49
30
  isActive?: boolean;
50
- /**
51
- * Allows to enable updated internal state management.
52
- * Note: In updated internal state management, this component acts as truly stateless and can be controlled with `isActive` property.
53
- *
54
- * @deprecated Will be removed in next major release
55
- */
56
- isStateless?: boolean;
57
31
  /**
58
32
  * On tab label click callback
59
- *
60
- * @deprecated Parameter `tab` has been deprecated. Use `e` parameter instead
61
33
  */
62
- onClick?: (tab: string, e?: MouseEvent<HTMLElement>) => void;
34
+ onClick?: (label: string, e?: MouseEvent<HTMLElement>) => void;
63
35
  /**
64
36
  * Allows to pass testid string for testing purposes
65
37
  */
@@ -7,8 +7,6 @@ var React = require('react');
7
7
  var styledComponents = require('styled-components');
8
8
  var theme = require('../../themes/theme.js');
9
9
  var styledUtils = require('../../utils/styledUtils.js');
10
- var Box = require('../Box/Box.js');
11
- var Divider = require('../Divider/Divider.js');
12
10
 
13
11
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
14
12
 
@@ -64,26 +62,6 @@ const TabStyle = styledComponents.styled.li `
64
62
  background-color: transparent;
65
63
  `}
66
64
  `;
67
- const ContentContainer = styledComponents.styled.div `
68
- ${({ $type }) => {
69
- if ($type === 'box' || $type === 'default') {
70
- return `
71
- border-top-left-radius: 0;
72
- `;
73
- }
74
- if ($type === 'panel') {
75
- return `
76
- border-top: 1px solid ${theme.default.color.line.L03};
77
- `;
78
- }
79
- if ($type === 'underlined' || $type === 'gray') {
80
- return `
81
- margin-top: ${theme.default.grid.gutter};
82
- `;
83
- }
84
- return '';
85
- }}
86
- `;
87
65
  /** @visibleName Tab */
88
66
  const Tab = (_a) => {
89
67
  var { type = 'box', 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["type", 'data-testid']);
@@ -92,17 +70,8 @@ const Tab = (_a) => {
92
70
  props.onClick(props.label, e);
93
71
  }
94
72
  };
95
- const isActive = props.activeTab ? props.activeTab === props.label : props.isActive;
96
- return type === 'box' || type === 'default' || type === 'panel' ? (React__default.default.createElement(React__default.default.Fragment, null,
97
- React__default.default.createElement(TabLabel, { role: "tab", id: props.id, "$type": type, "aria-selected": isActive, "$isActive": isActive, onClick: onClickHandler, tabIndex: isActive ? 0 : -1 }, props.label),
98
- props.isStateless &&
99
- (props.children && (props.activeTab === props.label || props.isActive) ? (React__default.default.createElement(ContentContainer, { role: "tabpanel", "$type": props.tabStyle || type, as: (type === 'box' || type === 'default') && !props.tabStyle
100
- ? Box.default
101
- : undefined }, props.children)) : (React__default.default.createElement(Divider.default, { margin: "0" }))))) : (React__default.default.createElement(React__default.default.Fragment, null,
102
- React__default.default.createElement(TabStyle, { role: "tab", id: props.id, "$type": props.tabStyle || type, "aria-selected": isActive, "$isActive": isActive, onClick: onClickHandler, tabIndex: isActive ? 0 : -1 }, props.label),
103
- props.isStateless &&
104
- props.children &&
105
- (props.activeTab === props.label || props.isActive) && (React__default.default.createElement(ContentContainer, { role: "tabpanel", "$type": props.tabStyle || type }, props.children))));
73
+ const { isActive } = props;
74
+ return type === 'box' || type === 'panel' ? (React__default.default.createElement(TabLabel, { role: "tab", "data-testid": dataTestId, id: props.id, "$type": type, "aria-selected": isActive, "$isActive": isActive, onClick: onClickHandler, tabIndex: isActive ? 0 : -1 }, props.label)) : (React__default.default.createElement(TabStyle, { role: "tab", "data-testid": dataTestId, id: props.id, "$type": type, "aria-selected": isActive, "$isActive": isActive, onClick: onClickHandler, tabIndex: isActive ? 0 : -1 }, props.label));
106
75
  };
107
76
 
108
77
  exports.default = Tab;
@@ -1,7 +1,7 @@
1
1
  import type { MouseEvent, ReactNode } from 'react';
2
2
  import React from 'react';
3
3
  import type { Props as TabProps } from '../Tab/Tab';
4
- interface Props extends Omit<TabProps, 'label' | 'children' | 'activeTab' | 'onClick'> {
4
+ interface Props extends Omit<TabProps, 'label' | 'children' | 'activeTab' | 'onClick' | 'tabStyle' | 'isStateless'> {
5
5
  /**
6
6
  * Content of the component
7
7
  *
@@ -22,20 +22,12 @@ interface Props extends Omit<TabProps, 'label' | 'children' | 'activeTab' | 'onC
22
22
  * Allows to reduce gap between tabs in `underlined` type
23
23
  */
24
24
  isNarrowUnderlined?: boolean;
25
- /**
26
- * On tab change callback
27
- *
28
- * @deprecated Use `onClick` property
29
- */
30
- onChange?: (tab: string) => void;
31
25
  /**
32
26
  * Allows to pass common mouse click callback to all children
33
27
  */
34
28
  onClick?: (e: MouseEvent<HTMLElement>) => void;
35
29
  /**
36
30
  * Allows to pass a custom className
37
- *
38
- * @deprecated Prefix 'tabs' is deprecated and will be removed in next major version
39
31
  */
40
32
  className?: string;
41
33
  }
@@ -29,7 +29,7 @@ const Tablist = styledComponents.styled.ul `
29
29
  `}
30
30
 
31
31
  ${({ $type, $isNarrowUnderlined }) => {
32
- if ($type === 'box' || $type === 'default' || $type === 'panel') {
32
+ if ($type === 'box' || $type === 'panel') {
33
33
  return `
34
34
  margin: 0;
35
35
 
@@ -55,17 +55,12 @@ const Tablist = styledComponents.styled.ul `
55
55
  border-bottom: 1px solid ${theme.default.color.line.L02};
56
56
  `;
57
57
  }
58
- if ($type === 'gray') {
59
- return `
60
- gap: 1.25rem;
61
- `;
62
- }
63
58
  return '';
64
59
  }}
65
60
  `;
66
61
  const ContentContainer = styledComponents.styled.div `
67
62
  ${({ $type, $isFullWidth }) => {
68
- if ($type === 'box' || $type === 'default') {
63
+ if ($type === 'box') {
69
64
  return `
70
65
  border-top-left-radius: 0;
71
66
  ${$isFullWidth ? 'border-top-right-radius: 0;' : ''}
@@ -76,7 +71,7 @@ const ContentContainer = styledComponents.styled.div `
76
71
  border-top: 1px solid ${theme.default.color.line.L03};
77
72
  `;
78
73
  }
79
- if ($type === 'underlined' || $type === 'gray') {
74
+ if ($type === 'underlined') {
80
75
  return `
81
76
  margin-top: ${theme.default.grid.gutter};
82
77
  `;
@@ -92,9 +87,6 @@ const Tabs = (_a) => {
92
87
  const onClickTabItem = (tab, e) => {
93
88
  setActiveTab(tab);
94
89
  if (tab !== activeTab) {
95
- if (props.onChange) {
96
- props.onChange(tab);
97
- }
98
90
  if (props.onClick && e) {
99
91
  props.onClick(e);
100
92
  }
@@ -115,16 +107,16 @@ const Tabs = (_a) => {
115
107
  if (!tabs) {
116
108
  return null;
117
109
  }
118
- const outerActiveTab = tabs.find(child => child.props.isActive || child.props.activeTab === child.props.label);
110
+ const outerActiveTab = tabs.find(child => child.props.isActive);
119
111
  if (!activeTab) {
120
112
  setActiveTab((outerActiveTab === null || outerActiveTab === void 0 ? void 0 : outerActiveTab.props.label) || tabs[0].props.label);
121
113
  }
122
- return (React__default.default.createElement("div", { className: props.className ? `tabs ${props.className}` : 'tabs', "data-testid": dataTestId },
123
- React__default.default.createElement(Tablist, { role: "tablist", "$type": props.tabStyle || type, "$isFullWidth": props.isFullWidth, "$isNarrowUnderlined": props.isNarrowUnderlined, onKeyDown: onKeyDown }, React.Children.map(props.children, tab => React.isValidElement(tab) &&
124
- tab.type === Tab.default && (React__default.default.createElement(Tab.default, { id: tab.props.id, key: tab.props.label, label: tab.props.label, type: props.tabStyle || type, isActive: tab.props.isActive
114
+ return (React__default.default.createElement("div", { className: props.className, "data-testid": dataTestId },
115
+ React__default.default.createElement(Tablist, { role: "tablist", "$type": type, "$isFullWidth": props.isFullWidth, "$isNarrowUnderlined": props.isNarrowUnderlined, onKeyDown: onKeyDown }, React.Children.map(props.children, tab => React.isValidElement(tab) &&
116
+ tab.type === Tab.default && (React__default.default.createElement(Tab.default, { id: tab.props.id, key: tab.props.label, label: tab.props.label, type: type, isActive: tab.props.isActive
125
117
  ? tab.props.isActive
126
- : activeTab === tab.props.label, activeTab: tab.props.activeTab, onClick: onClickTabItem, className: tab.props.className, "data-testid": tab.props['data-testid'] })))),
127
- React__default.default.createElement(ContentContainer, { role: "tabpanel", "$type": props.tabStyle || type, "$isFullWidth": props.isFullWidth, as: (type === 'box' || type === 'default') && !props.tabStyle ? Box.default : undefined }, React.Children.map(props.children, tab => React.isValidElement(tab) &&
118
+ : activeTab === tab.props.label, onClick: onClickTabItem, className: tab.props.className, "data-testid": tab.props['data-testid'] })))),
119
+ React__default.default.createElement(ContentContainer, { role: "tabpanel", "$type": type, "$isFullWidth": props.isFullWidth, as: type === 'box' ? Box.default : undefined }, React.Children.map(props.children, tab => React.isValidElement(tab) &&
128
120
  tab.type === Tab.default &&
129
121
  (tab.props.isActive || tab.props.label === activeTab) &&
130
122
  tab.props.children))));
@@ -108,7 +108,7 @@ const Tooltip = (_a) => {
108
108
  scroll: true,
109
109
  };
110
110
  return (React__default.default.createElement(React__default.default.Fragment, null,
111
- !props.hideTriggerElement && (React__default.default.createElement(Helper, { "data-tooltip-id": props.id, "$isClickable": isClickable, className: props.className, "data-testid": dataTestId, type: "button", "data-tooltip-delay-hide": 500, "aria-describedby": props.id },
111
+ !props.hideTriggerElement && (React__default.default.createElement(Helper, { "data-tooltip-id": props.id, "$isClickable": isClickable, className: props.className, "data-testid": dataTestId, type: "button", "data-tooltip-delay-hide": 500 },
112
112
  React__default.default.createElement(Icon.default, { icon: icons.Info, size: "1rem", position: props.position, "aria-hidden": true }))),
113
113
  React__default.default.createElement(StyledReactTooltip, { id: props.id, place: props.placement, openOnClick: isClickable, clickable: isHoverable, "$isMultiline": props.isMultiline, disableStyleInjection: true, role: isHoverable ? 'dialog' : 'tooltip', openEvents: handleReactTooltipOpenEvents, globalCloseEvents: handleReactTooltipGlobalCloseEvents, closeEvents: handleReactTooltipCloseEvents, "data-testid": dataTestId && `${dataTestId}-content` }, props.children)));
114
114
  };
@@ -9,7 +9,6 @@ export { default as ButtonCard } from './ButtonCard/ButtonCard';
9
9
  export { default as ButtonClose } from './ButtonClose/ButtonClose';
10
10
  export { default as ButtonIcon } from './ButtonIcon/ButtonIcon';
11
11
  export { default as ButtonPrimary } from './ButtonPrimary/ButtonPrimary';
12
- export { default as ButtonRound } from './ButtonRound/ButtonRound';
13
12
  export { default as ButtonSecondary } from './ButtonSecondary/ButtonSecondary';
14
13
  export { default as Carousel } from './Carousel/Carousel';
15
14
  export { default as Checkbox } from './Checkbox/Checkbox';
@@ -31,7 +30,6 @@ export { default as Input } from './Input/Input';
31
30
  export { default as Label } from './Label/Label';
32
31
  export { default as LabelText } from './LabelText/LabelText';
33
32
  export { default as MainHeaderNavigation } from './MainHeaderNavigation/MainHeaderNavigation';
34
- export { default as MainNavigation } from './MainNavigation/MainNavigation';
35
33
  export { default as Modal } from './Modal/Modal';
36
34
  export { default as Notification } from './Notification/Notification';
37
35
  export { default as NotificationBadge } from './NotificationBadge/NotificationBadge';
@@ -45,7 +43,6 @@ export { default as ProgressIndicator } from './ProgressIndicator/ProgressIndica
45
43
  export { default as RadioButton } from './RadioButton/RadioButton';
46
44
  export { default as ReadMore } from './ReadMore/ReadMore';
47
45
  export { default as Search } from './Search/Search';
48
- export { default as SecondaryNavigation } from './SecondaryNavigation/SecondaryNavigation';
49
46
  export { default as Selectbox } from './Selectbox/Selectbox';
50
47
  export { default as Skeleton } from './Skeleton/Skeleton';
51
48
  export { default as Switch } from './Switch/Switch';
@@ -54,4 +51,3 @@ export { default as Tabs } from './Tabs/Tabs';
54
51
  export { default as Textarea } from './Textarea/Textarea';
55
52
  export { default as Toaster } from './Toaster/Toaster';
56
53
  export { default as Tooltip } from './Tooltip/Tooltip';
57
- export { default as TooltipMenu } from './TooltipMenu/TooltipMenu';
@@ -23,7 +23,7 @@ const useCloseOutsideOrElementClicked = ({ ref, closeWhenTagClicked }, callback)
23
23
  return tag === ((_b = target.tagName) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || tag === ((_c = parent.tagName) === null || _c === void 0 ? void 0 : _c.toLowerCase());
24
24
  });
25
25
  if ((ref.current && !ref.current.contains(target)) ||
26
- (isElementInList && !target.dataset.noClose)) {
26
+ (isElementInList && !target.closest('.no-close'))) {
27
27
  callback();
28
28
  }
29
29
  };
@@ -11,7 +11,6 @@ var ButtonCard = require('./components/ButtonCard/ButtonCard.js');
11
11
  var ButtonClose = require('./components/ButtonClose/ButtonClose.js');
12
12
  var ButtonIcon = require('./components/ButtonIcon/ButtonIcon.js');
13
13
  var ButtonPrimary = require('./components/ButtonPrimary/ButtonPrimary.js');
14
- var ButtonRound = require('./components/ButtonRound/ButtonRound.js');
15
14
  var ButtonSecondary = require('./components/ButtonSecondary/ButtonSecondary.js');
16
15
  var Carousel = require('./components/Carousel/Carousel.js');
17
16
  var Checkbox = require('./components/Checkbox/Checkbox.js');
@@ -141,7 +140,6 @@ var Input = require('./components/Input/Input.js');
141
140
  var Label = require('./components/Label/Label.js');
142
141
  var LabelText = require('./components/LabelText/LabelText.js');
143
142
  var MainHeaderNavigation = require('./components/MainHeaderNavigation/MainHeaderNavigation.js');
144
- var MainNavigation = require('./components/MainNavigation/MainNavigation.js');
145
143
  var Modal = require('./components/Modal/Modal.js');
146
144
  var Notification = require('./components/Notification/Notification.js');
147
145
  var NotificationBadge = require('./components/NotificationBadge/NotificationBadge.js');
@@ -155,7 +153,6 @@ var ProgressIndicator = require('./components/ProgressIndicator/ProgressIndicato
155
153
  var RadioButton = require('./components/RadioButton/RadioButton.js');
156
154
  var ReadMore = require('./components/ReadMore/ReadMore.js');
157
155
  var Search = require('./components/Search/Search.js');
158
- var SecondaryNavigation = require('./components/SecondaryNavigation/SecondaryNavigation.js');
159
156
  var Selectbox = require('./components/Selectbox/Selectbox.js');
160
157
  var Skeleton = require('./components/Skeleton/Skeleton.js');
161
158
  var Switch = require('./components/Switch/Switch.js');
@@ -164,7 +161,6 @@ var Tabs = require('./components/Tabs/Tabs.js');
164
161
  var Textarea = require('./components/Textarea/Textarea.js');
165
162
  var Toaster = require('./components/Toaster/Toaster.js');
166
163
  var Tooltip = require('./components/Tooltip/Tooltip.js');
167
- var TooltipMenu = require('./components/TooltipMenu/TooltipMenu.js');
168
164
  var createStyled = require('./utils/createStyled.js');
169
165
  var styledComponents = require('styled-components');
170
166
  var theme = require('./themes/theme.js');
@@ -184,7 +180,6 @@ exports.ButtonCard = ButtonCard.default;
184
180
  exports.ButtonClose = ButtonClose.default;
185
181
  exports.ButtonIcon = ButtonIcon.default;
186
182
  exports.ButtonPrimary = ButtonPrimary.default;
187
- exports.ButtonRound = ButtonRound.default;
188
183
  exports.ButtonSecondary = ButtonSecondary.default;
189
184
  exports.Carousel = Carousel.default;
190
185
  exports.Checkbox = Checkbox.default;
@@ -315,7 +310,6 @@ exports.Input = Input.default;
315
310
  exports.Label = Label.default;
316
311
  exports.LabelText = LabelText.default;
317
312
  exports.MainHeaderNavigation = MainHeaderNavigation.default;
318
- exports.MainNavigation = MainNavigation.default;
319
313
  exports.Modal = Modal.default;
320
314
  exports.Notification = Notification.default;
321
315
  exports.NotificationBadge = NotificationBadge.default;
@@ -329,7 +323,6 @@ exports.ProgressIndicator = ProgressIndicator.default;
329
323
  exports.RadioButton = RadioButton.default;
330
324
  exports.ReadMore = ReadMore.default;
331
325
  exports.Search = Search.default;
332
- exports.SecondaryNavigation = SecondaryNavigation.default;
333
326
  exports.Selectbox = Selectbox.default;
334
327
  exports.Skeleton = Skeleton.default;
335
328
  exports.Switch = Switch.default;
@@ -338,7 +331,6 @@ exports.Tabs = Tabs.default;
338
331
  exports.Textarea = Textarea.default;
339
332
  exports.Toaster = Toaster.default;
340
333
  exports.Tooltip = Tooltip.default;
341
- exports.TooltipMenu = TooltipMenu.default;
342
334
  exports.createStyled = createStyled.default;
343
335
  Object.defineProperty(exports, 'styled', {
344
336
  enumerable: true,
@@ -14,8 +14,6 @@ const headerLogoSize = '3.75rem';
14
14
  const mobileLogoSize = '3.75em';
15
15
  const desktopLogoSize = '5.25em';
16
16
  const menuItemMargin = '1rem';
17
- const ribbonHeight = '1.5625rem';
18
- const wideMenuBreakpoint = 1280;
19
17
  const IconContainerWidth = '3.75rem'; // 60px
20
18
  const IconContainerMinWidth = '2.5rem'; // 40px
21
19
  const navMaxHeight = '3.75rem'; // 60px
@@ -51,7 +49,5 @@ exports.mobileNavMaxWidth = mobileNavMaxWidth;
51
49
  exports.navIconSize = navIconSize;
52
50
  exports.navIconSizeMobile = navIconSizeMobile;
53
51
  exports.navMaxHeight = navMaxHeight;
54
- exports.ribbonHeight = ribbonHeight;
55
52
  exports.subMenuWidth = subMenuWidth;
56
53
  exports.subMenuWidthXl = subMenuWidthXl;
57
- exports.wideMenuBreakpoint = wideMenuBreakpoint;
@@ -75,12 +75,6 @@ export interface Props {
75
75
  * Allows to pass a custom className
76
76
  */
77
77
  className?: string;
78
- /**
79
- * Adds data attribute `data-no-close` to button and children wrapper
80
- *
81
- * @deprecated Nominated for removal due to proposed changes in functionality (https://jira.dna.fi/browse/STYLE-233)
82
- */
83
- 'data-no-close'?: string;
84
78
  /**
85
79
  * Adds data attribute `data-track-value` to button
86
80
  */
@@ -123,6 +117,6 @@ export declare const shade: {
123
117
  };
124
118
  };
125
119
  /** @visibleName Button */
126
- declare const Button: ({ type, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue, "aria-label": ariaLabel, ...props }: Props) => React.JSX.Element;
120
+ declare const Button: ({ type, "data-testid": dataTestId, "data-track-value": dataTrackValue, "aria-label": ariaLabel, ...props }: Props) => React.JSX.Element;
127
121
  /** @component */
128
122
  export default Button;
@@ -118,11 +118,11 @@ const Element = styled.button `
118
118
  /** @visibleName Button */
119
119
  const Button = (_a) => {
120
120
  var _b;
121
- var { type = 'submit', 'data-testid': dataTestId, 'data-no-close': dataNoClose, 'data-track-value': dataTrackValue, 'aria-label': ariaLabel } = _a, props = __rest(_a, ["type", 'data-testid', 'data-no-close', 'data-track-value', 'aria-label']);
122
- return (React__default.createElement(Element, Object.assign({ id: props.id, as: (_b = props.nextLink) !== null && _b !== void 0 ? _b : (props.href ? 'a' : undefined), type: props.href ? undefined : type, href: props.href, target: props.href ? props.target : undefined, rel: props.target === '_blank' ? 'noopener noreferrer' : undefined, onClick: props.onClick, onMouseDown: props.onMouseDown, "$small": props.small, "$darkBg": props.darkBg, "$fullWidth": props.fullWidth, "$loading": props.loading, tabIndex: props.loading ? -1 : 0, "data-loading": props.loading, className: props.className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue, "aria-label": ariaLabel }, props.dataAttributes, (!props.href && {
121
+ var { type = 'submit', 'data-testid': dataTestId, 'data-track-value': dataTrackValue, 'aria-label': ariaLabel } = _a, props = __rest(_a, ["type", 'data-testid', 'data-track-value', 'aria-label']);
122
+ return (React__default.createElement(Element, Object.assign({ id: props.id, as: (_b = props.nextLink) !== null && _b !== void 0 ? _b : (props.href ? 'a' : undefined), type: props.href ? undefined : type, href: props.href, target: props.href ? props.target : undefined, rel: props.target === '_blank' ? 'noopener noreferrer' : undefined, onClick: props.onClick, onMouseDown: props.onMouseDown, "$small": props.small, "$darkBg": props.darkBg, "$fullWidth": props.fullWidth, "$loading": props.loading, tabIndex: props.loading ? -1 : 0, "data-loading": props.loading, className: props.className, "data-testid": dataTestId, "data-track-value": dataTrackValue, "aria-label": ariaLabel }, props.dataAttributes, (!props.href && {
123
123
  name: props.name,
124
124
  disabled: props.disabled,
125
- })), props.loading ? (React__default.createElement(PixelLoader, { color: props.darkBg ? theme.color.default.white : theme.color.default.plum, label: props.loadingLabel })) : (React__default.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, props.children))));
125
+ })), props.loading ? (React__default.createElement(PixelLoader, { color: props.darkBg ? theme.color.default.white : theme.color.default.plum, label: props.loadingLabel })) : (React__default.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text` }, props.children))));
126
126
  };
127
127
 
128
128
  export { Button as default, shade };
@@ -24,7 +24,7 @@ type Props = ({
24
24
  */
25
25
  icon: ReactNode;
26
26
  direction?: never;
27
- }) & Omit<ButtonProps, 'children' | 'small' | 'fullWidth' | 'loading' | 'data-no-close' | 'href' | 'loadingLabel'> & {
27
+ }) & Omit<ButtonProps, 'children' | 'small' | 'fullWidth' | 'loading' | 'href' | 'nextLink' | 'loadingLabel'> & {
28
28
  /**
29
29
  * Allows to change the styling of component
30
30
  *
@@ -34,12 +34,6 @@ type Props = ({
34
34
  * @default 'primary'
35
35
  */
36
36
  variant?: ButtonArrowVariant;
37
- /**
38
- * Allows to change the type of resulting HTML element from button (`<button></button>`) to anchor (`<a href="..."></a>`)
39
- *
40
- * @deprecated Use `Button` component for href support
41
- */
42
- href?: string;
43
37
  };
44
38
  /** @visibleName Button Arrow */
45
39
  declare const ButtonArrow: ({ variant, "data-testid": dataTestId, "data-track-value": dataTrackValue, "aria-label": ariaLabel, ...props }: Props) => React.JSX.Element;
@@ -66,12 +66,12 @@ const ButtonArrow = (_a) => {
66
66
  let iconElement = null;
67
67
  if (props.direction) {
68
68
  const IconComponent = iconsMap[props.direction];
69
- iconElement = React__default.createElement(IconComponent, { size: "1rem" });
69
+ iconElement = React__default.createElement(IconComponent, { icon: iconsMap[props.direction], size: "1rem" });
70
70
  }
71
71
  else if (isValidElement(props.icon)) {
72
72
  iconElement = cloneElement(props.icon, { size: '1rem' });
73
73
  }
74
- return (React__default.createElement(Element, { id: props.id, href: props.href, name: props.name, type: props.type, onClick: props.onClick, onMouseDown: props.onMouseDown, darkBg: props.darkBg, disabled: props.disabled, className: props.className, "data-testid": dataTestId, "data-track-value": dataTrackValue, dataAttributes: props.dataAttributes, "aria-label": ariaLabel }, iconElement));
74
+ return (React__default.createElement(Element, { id: props.id, name: props.name, type: props.type, onClick: props.onClick, onMouseDown: props.onMouseDown, darkBg: props.darkBg, disabled: props.disabled, className: props.className, "data-testid": dataTestId, "data-track-value": dataTrackValue, dataAttributes: props.dataAttributes, "aria-label": ariaLabel }, iconElement));
75
75
  };
76
76
 
77
77
  export { ButtonArrow as default };
@@ -117,11 +117,11 @@ const ButtonElement = styled.button `
117
117
  `;
118
118
  /** @visibleName Button Icon */
119
119
  const ButtonIcon = forwardRef((_a, ref) => {
120
- var { icon = EditUnderline, 'data-testid': dataTestId, 'data-no-close': dataNoClose, 'data-track-value': dataTrackValue } = _a, props = __rest(_a, ["icon", 'data-testid', 'data-no-close', 'data-track-value']);
120
+ var { icon = EditUnderline, 'data-testid': dataTestId, 'data-track-value': dataTrackValue } = _a, props = __rest(_a, ["icon", 'data-testid', 'data-track-value']);
121
121
  const position = props.isReversed ? 'right' : 'left';
122
- return (React__default.createElement(ButtonElement, Object.assign({ ref: ref, id: props.id, name: props.name, type: props.type, onClick: props.onClick, onMouseDown: props.onMouseDown, "$small": props.small, "$darkBg": props.darkBg, "$loading": props.loading, tabIndex: props.loading ? -1 : 0, "data-loading": props.loading, disabled: props.disabled, "$hideChildrenMobile": props.hideChildrenMobile, "$isReversed": props.isReversed, className: props.className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue, "aria-expanded": props.ariaExpanded, "aria-label": props.ariaLabel, "$isLinkStyle": props.isLinkStyle }, props.dataAttributes), props.loading ? (React__default.createElement(PixelLoader, { color: props.darkBg ? theme.color.default.white : theme.color.default.black, label: props.loadingLabel })) : (React__default.createElement(React__default.Fragment, null,
122
+ return (React__default.createElement(ButtonElement, Object.assign({ ref: ref, id: props.id, name: props.name, type: props.type, onClick: props.onClick, onMouseDown: props.onMouseDown, "$small": props.small, "$darkBg": props.darkBg, "$loading": props.loading, tabIndex: props.loading ? -1 : 0, "data-loading": props.loading, disabled: props.disabled, "$hideChildrenMobile": props.hideChildrenMobile, "$isReversed": props.isReversed, className: props.className, "data-testid": dataTestId, "data-track-value": dataTrackValue, "aria-expanded": props.ariaExpanded, "aria-label": props.ariaLabel, "$isLinkStyle": props.isLinkStyle }, props.dataAttributes), props.loading ? (React__default.createElement(PixelLoader, { color: props.darkBg ? theme.color.default.white : theme.color.default.black, label: props.loadingLabel })) : (React__default.createElement(React__default.Fragment, null,
123
123
  React__default.createElement(Icon, { icon: icon, color: props.darkBg ? theme.color.default.white : theme.color.default.pink, size: props.small ? '1.25rem' : '1.5rem', position: props.children ? position : undefined, "aria-hidden": true }),
124
- props.children && (React__default.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, props.children))))));
124
+ props.children && (React__default.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text` }, props.children))))));
125
125
  });
126
126
 
127
127
  export { ButtonIcon as default };
@@ -1,7 +1,6 @@
1
1
  import type { MouseEvent, ReactNode } from 'react';
2
2
  import React from 'react';
3
- type ChipType = 'default' | 'info' | 'success' | 'warning' | 'error';
4
- type ChipVariant = 'outlined' | 'filled';
3
+ type ChipType = 'default' | 'success' | 'error';
5
4
  interface Props {
6
5
  /**
7
6
  * Unique ID for the component
@@ -11,27 +10,12 @@ interface Props {
11
10
  * Allows to change the color styling of component, depending on the passed type
12
11
  *
13
12
  * @param {ChipType} default Uses default color: `theme.color.line.L01`
14
- * @param {ChipType} info Changes color to default color (this type will be deprecated in the future)
15
13
  * @param {ChipType} success Uses `theme.color.notification.success` color for styling
16
- * @param {ChipType} warning Changes color to default color (this type will be deprecated in the future)
17
14
  * @param {ChipType} error Uses `theme.color.notification.error` color for styling
18
15
  *
19
- * @deprecated The 'info' and 'warning' types will be deprecated and removed in the next major release.
20
- *
21
16
  * @default 'default'
22
17
  */
23
18
  type?: ChipType;
24
- /**
25
- * Allows to change the appearance styling of component, depending on passed variant
26
- *
27
- * @param {ChipVariant} outlined
28
- * @param {ChipVariant} filled
29
- *
30
- * @deprecated The styles are now encapsulated within the component. The 'variant' prop will be removed in the next major release.
31
- *
32
- * @default 'outlined'
33
- */
34
- variant?: ChipVariant;
35
19
  /**
36
20
  * Content of the component
37
21
  */
@@ -58,6 +42,6 @@ interface Props {
58
42
  */
59
43
  ariaDescribedBy?: string;
60
44
  }
61
- declare const Chip: ({ type, variant, "data-testid": dataTestId, ...props }: Props) => React.JSX.Element;
45
+ declare const Chip: ({ type, "data-testid": dataTestId, ...props }: Props) => React.JSX.Element;
62
46
  /** @component */
63
47
  export default Chip;
@@ -48,9 +48,9 @@ const Element = styled.div `
48
48
  }
49
49
  `;
50
50
  const Chip = (_a) => {
51
- var { type = 'default', variant = 'outlined', 'data-testid': dataTestId } = _a, props = __rest(_a, ["type", "variant", 'data-testid']);
51
+ var { type = 'default', 'data-testid': dataTestId } = _a, props = __rest(_a, ["type", 'data-testid']);
52
52
  const label = props.ariaLabel || (typeof props.children === 'string' ? props.children : undefined);
53
- return (React__default.createElement(Element, { as: props.onClick ? 'button' : 'div', id: props.id, "$type": type, "$variant": variant, onClick: props.onClick, className: props.className, "data-testid": dataTestId, "aria-label": label, "aria-describedby": props.ariaDescribedBy, tabIndex: 0 }, props.children));
53
+ return (React__default.createElement(Element, { as: props.onClick ? 'button' : 'div', id: props.id, "$type": type, onClick: props.onClick, className: props.className, "data-testid": dataTestId, "aria-label": label, "aria-describedby": props.ariaDescribedBy, tabIndex: 0 }, props.children));
54
54
  };
55
55
 
56
56
  export { Chip as default };
@@ -60,13 +60,6 @@ interface Props {
60
60
  * @default 'right'
61
61
  */
62
62
  side?: Side;
63
- /**
64
- * Allows to pass a custom margin
65
- *
66
- * @default '0'
67
- * @deprecated Will be removed in the next major version
68
- */
69
- margin?: string;
70
63
  /**
71
64
  * Allows to pass a custom padding
72
65
  *
@@ -170,7 +170,7 @@ const Drawer = (_a) => {
170
170
  ReactModal.setAppElement(appElement);
171
171
  return (React__default.createElement(React__default.Fragment, null,
172
172
  React__default.createElement(StyledReactModal, { id: props.id, isOpen: props.isOpen, overlayElement: ModalOverlay, contentElement: ModalContent, onRequestClose: props.onRequestClose, portalClassName: props.className, contentLabel: props.contentLabel, shouldCloseOnEsc: isClosable, shouldCloseOnOverlayClick: isClosable, closeTimeoutMS: 300, "$size": size, "$side": side },
173
- React__default.createElement(StyledBox, { "data-testid": dataTestId, elevation: "extraHigh", margin: props.margin, padding: "0" },
173
+ React__default.createElement(StyledBox, { "data-testid": dataTestId, elevation: "extraHigh", padding: "0" },
174
174
  React__default.createElement(ContentContainer, null,
175
175
  React__default.createElement(Header, { "$variant": variant, "data-testid": dataTestId && `${dataTestId}-header` },
176
176
  React__default.createElement(Title, { "$size": size, "$variant": variant }, props.title),
@@ -7,7 +7,6 @@ import ButtonIcon from '../../ButtonIcon/ButtonIcon.js';
7
7
  import FooterContext from '../context/FooterContext.js';
8
8
  import BusinessMenu from '../../MainHeaderNavigation/ChildComponents/BusinessMenu.js';
9
9
 
10
- /* eslint-disable react/no-array-index-key */
11
10
  const linkHoverStyles = css `
12
11
  &:hover,
13
12
  &:focus,
@@ -166,8 +166,9 @@ const renderImage = (ImageComponent, imageProps) => {
166
166
  if (!imageProps)
167
167
  return null;
168
168
  if (typeof ImageComponent === 'string') {
169
- // eslint-disable-next-line jsx-a11y/alt-text, react/jsx-props-no-spreading
170
- return React__default.createElement("img", Object.assign({}, imageProps));
169
+ const { alt } = imageProps, rest = __rest(imageProps, ["alt"]);
170
+ // eslint-disable-next-line react/jsx-props-no-spreading
171
+ return React__default.createElement("img", Object.assign({ alt: alt }, rest));
171
172
  }
172
173
  // eslint-disable-next-line react/jsx-props-no-spreading
173
174
  return React__default.createElement(ImageComponent, Object.assign({}, imageProps));
@@ -23,13 +23,7 @@ export interface Props extends Partial<IconProps> {
23
23
  *
24
24
  * @type Icon
25
25
  */
26
- icon?: ComponentType<IconType>;
27
- /**
28
- * Icon name
29
- *
30
- * @deprecated Use property `icon`
31
- */
32
- name?: string;
26
+ icon: ComponentType<IconType>;
33
27
  /**
34
28
  * On Icon click callback
35
29
  */
@@ -61,6 +55,6 @@ export interface Props extends Partial<IconProps> {
61
55
  */
62
56
  'aria-hidden'?: boolean;
63
57
  }
64
- declare const Icon: ({ name, icon: IconParam, color, size, "data-testid": dataTestId, "aria-label": ariaLabel, "aria-hidden": ariaHidden, ...props }: Props) => React.JSX.Element;
58
+ declare const Icon: ({ icon: IconParam, color, size, "data-testid": dataTestId, "aria-label": ariaLabel, "aria-hidden": ariaHidden, ...props }: Props) => React.JSX.Element;
65
59
  /** @component */
66
60
  export default Icon;