@dnanpm/styleguide 1.8.1 → 2.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 (161) hide show
  1. package/build/cjs/components/Accordion/Accordion.d.ts +50 -0
  2. package/build/cjs/components/Accordion/Accordion.js +52 -0
  3. package/build/cjs/components/Accordion/AccordionItem.d.ts +30 -0
  4. package/build/cjs/components/Accordion/AccordionItem.js +77 -0
  5. package/build/cjs/components/AmountSelector/AmountSelector.js +5 -6
  6. package/build/cjs/components/Buttons/ButtonBasicStyles.d.ts +37 -30
  7. package/build/cjs/components/Buttons/ButtonBasicStyles.js +10 -14
  8. package/build/cjs/components/Buttons/ButtonDefault.js +6 -2
  9. package/build/cjs/components/Buttons/ButtonIconPrimaryStyles.d.ts +37 -30
  10. package/build/cjs/components/Buttons/ButtonIconStyles.d.ts +37 -30
  11. package/build/cjs/components/Buttons/ButtonPrimary.js +6 -2
  12. package/build/cjs/components/Buttons/ButtonPrimaryStyles.d.ts +37 -30
  13. package/build/cjs/components/Buttons/ButtonSecondary.js +7 -3
  14. package/build/cjs/components/Buttons/ButtonSecondaryStyles.d.ts +37 -30
  15. package/build/cjs/components/Buttons/ButtonTertiary.js +7 -3
  16. package/build/cjs/components/Buttons/ButtonTertiaryStyles.d.ts +37 -30
  17. package/build/cjs/components/Buttons/CloseButton.d.ts +37 -30
  18. package/build/cjs/components/Card/Card.js +4 -2
  19. package/build/cjs/components/Card/CardRow.js +3 -3
  20. package/build/cjs/components/Checkbox/Checkbox.d.ts +38 -12
  21. package/build/cjs/components/Checkbox/Checkbox.js +37 -70
  22. package/build/cjs/components/DnaLogo/DnaLogo.d.ts +37 -40
  23. package/build/cjs/components/Footer/Components/FooterComponents.js +3 -2
  24. package/build/cjs/components/Helper/Helper.js +2 -1
  25. package/build/cjs/components/Icon/Icon.d.ts +39 -30
  26. package/build/cjs/components/Icon/Icons.d.ts +1 -4
  27. package/build/cjs/components/Icon/Icons.js +3 -7
  28. package/build/cjs/components/Input/Input.d.ts +102 -13
  29. package/build/cjs/components/Input/Input.js +57 -58
  30. package/build/cjs/components/Label/Label.js +2 -3
  31. package/build/cjs/components/LabelText/LabelText.d.ts +38 -30
  32. package/build/cjs/components/LabelText/LabelText.js +1 -1
  33. package/build/cjs/components/MainNavigation/ChildComponents/BusinessMenu.js +4 -10
  34. package/build/cjs/components/MainNavigation/ChildComponents/DesktopMenu.js +18 -12
  35. package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +37 -30
  36. package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.js +2 -2
  37. package/build/cjs/components/MainNavigation/ChildComponents/LinkModifier.js +2 -2
  38. package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +37 -30
  39. package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +1 -4
  40. package/build/cjs/components/MainNavigation/ChildComponents/MobileMenu.js +1 -1
  41. package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.js +1 -1
  42. package/build/cjs/components/MainNavigation/MainNavigation.js +1 -17
  43. package/build/cjs/components/MainNavigation/globalNavStyles.d.ts +148 -120
  44. package/build/cjs/components/Notification/Notification.d.ts +36 -17
  45. package/build/cjs/components/Notification/Notification.js +25 -48
  46. package/build/cjs/components/NotificationBadge/NotificationBadge.d.ts +37 -30
  47. package/build/cjs/components/NotificationBadge/NotificationBadge.js +1 -1
  48. package/build/cjs/components/PixelLoader/PixelLoaderStyles.d.ts +74 -60
  49. package/build/cjs/components/ProgressIndicator/ProgressIndicator.js +3 -3
  50. package/build/cjs/components/RadioButton/RadioButton.d.ts +33 -17
  51. package/build/cjs/components/RadioButton/RadioButton.js +12 -57
  52. package/build/cjs/components/ReadMore/ReadMore.js +2 -7
  53. package/build/cjs/components/Ribbon/Ribbon.d.ts +57 -0
  54. package/build/cjs/components/Ribbon/Ribbon.js +80 -0
  55. package/build/cjs/components/Search/Search.js +2 -1
  56. package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.js +2 -2
  57. package/build/cjs/components/Selectbox/Selectbox.d.ts +102 -13
  58. package/build/cjs/components/Selectbox/Selectbox.js +40 -49
  59. package/build/cjs/components/Tabs/Tab.d.ts +37 -30
  60. package/build/cjs/components/Tabs/Tab.js +3 -2
  61. package/build/cjs/components/Tabs/Tabs.d.ts +40 -30
  62. package/build/cjs/components/Textarea/Textarea.js +4 -3
  63. package/build/cjs/components/Tooltip/Tooltip.d.ts +37 -30
  64. package/build/cjs/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.d.ts +74 -60
  65. package/build/cjs/components/index.d.ts +4 -1
  66. package/build/cjs/hooks/useElementDimensions.d.ts +5 -0
  67. package/build/cjs/hooks/useElementDimensions.js +37 -0
  68. package/build/cjs/index.js +6 -0
  69. package/build/cjs/themes/globalStyles.d.ts +174 -60
  70. package/build/cjs/themes/globalStyles.js +132 -142
  71. package/build/cjs/themes/styled.d.ts +259 -210
  72. package/build/cjs/themes/theme.d.ts +37 -30
  73. package/build/cjs/themes/themeComponents/buttons.d.ts +1 -6
  74. package/build/cjs/themes/themeComponents/buttons.js +1 -6
  75. package/build/cjs/themes/themeComponents/fontFamily.d.ts +3 -1
  76. package/build/cjs/themes/themeComponents/fontFamily.js +3 -1
  77. package/build/cjs/themes/themeComponents/fontSize.d.ts +18 -15
  78. package/build/cjs/themes/themeComponents/fontSize.js +20 -14
  79. package/build/cjs/themes/themeComponents/lineHeight.d.ts +19 -12
  80. package/build/cjs/themes/themeComponents/lineHeight.js +21 -11
  81. package/build/es/components/Accordion/Accordion.d.ts +50 -0
  82. package/build/es/components/Accordion/Accordion.js +44 -0
  83. package/build/es/components/Accordion/AccordionItem.d.ts +30 -0
  84. package/build/es/components/Accordion/AccordionItem.js +68 -0
  85. package/build/es/components/AmountSelector/AmountSelector.js +5 -6
  86. package/build/es/components/Buttons/ButtonBasicStyles.d.ts +37 -30
  87. package/build/es/components/Buttons/ButtonBasicStyles.js +10 -14
  88. package/build/es/components/Buttons/ButtonDefault.js +6 -2
  89. package/build/es/components/Buttons/ButtonIconPrimaryStyles.d.ts +37 -30
  90. package/build/es/components/Buttons/ButtonIconStyles.d.ts +37 -30
  91. package/build/es/components/Buttons/ButtonPrimary.js +6 -2
  92. package/build/es/components/Buttons/ButtonPrimaryStyles.d.ts +37 -30
  93. package/build/es/components/Buttons/ButtonSecondary.js +7 -3
  94. package/build/es/components/Buttons/ButtonSecondaryStyles.d.ts +37 -30
  95. package/build/es/components/Buttons/ButtonTertiary.js +7 -3
  96. package/build/es/components/Buttons/ButtonTertiaryStyles.d.ts +37 -30
  97. package/build/es/components/Buttons/CloseButton.d.ts +37 -30
  98. package/build/es/components/Card/Card.js +4 -2
  99. package/build/es/components/Card/CardRow.js +3 -3
  100. package/build/es/components/Checkbox/Checkbox.d.ts +38 -12
  101. package/build/es/components/Checkbox/Checkbox.js +39 -72
  102. package/build/es/components/DnaLogo/DnaLogo.d.ts +37 -40
  103. package/build/es/components/Footer/Components/FooterComponents.js +3 -2
  104. package/build/es/components/Helper/Helper.js +2 -1
  105. package/build/es/components/Icon/Icon.d.ts +39 -30
  106. package/build/es/components/Icon/Icons.d.ts +1 -4
  107. package/build/es/components/Icon/Icons.js +3 -7
  108. package/build/es/components/Input/Input.d.ts +102 -13
  109. package/build/es/components/Input/Input.js +57 -58
  110. package/build/es/components/Label/Label.js +2 -3
  111. package/build/es/components/LabelText/LabelText.d.ts +38 -30
  112. package/build/es/components/LabelText/LabelText.js +1 -1
  113. package/build/es/components/MainNavigation/ChildComponents/BusinessMenu.js +4 -10
  114. package/build/es/components/MainNavigation/ChildComponents/DesktopMenu.js +18 -12
  115. package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +37 -30
  116. package/build/es/components/MainNavigation/ChildComponents/LanguageSelector.js +2 -2
  117. package/build/es/components/MainNavigation/ChildComponents/LinkModifier.js +2 -2
  118. package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +37 -30
  119. package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +2 -5
  120. package/build/es/components/MainNavigation/ChildComponents/MobileMenu.js +1 -1
  121. package/build/es/components/MainNavigation/ChildComponents/Ribbon.js +1 -1
  122. package/build/es/components/MainNavigation/MainNavigation.js +2 -17
  123. package/build/es/components/MainNavigation/globalNavStyles.d.ts +148 -120
  124. package/build/es/components/Notification/Notification.d.ts +36 -17
  125. package/build/es/components/Notification/Notification.js +25 -48
  126. package/build/es/components/NotificationBadge/NotificationBadge.d.ts +37 -30
  127. package/build/es/components/NotificationBadge/NotificationBadge.js +1 -1
  128. package/build/es/components/PixelLoader/PixelLoaderStyles.d.ts +74 -60
  129. package/build/es/components/ProgressIndicator/ProgressIndicator.js +3 -3
  130. package/build/es/components/RadioButton/RadioButton.d.ts +33 -17
  131. package/build/es/components/RadioButton/RadioButton.js +12 -57
  132. package/build/es/components/ReadMore/ReadMore.js +2 -7
  133. package/build/es/components/Ribbon/Ribbon.d.ts +57 -0
  134. package/build/es/components/Ribbon/Ribbon.js +71 -0
  135. package/build/es/components/Search/Search.js +2 -1
  136. package/build/es/components/SecondaryNavigation/SecondaryNavigation.js +2 -2
  137. package/build/es/components/Selectbox/Selectbox.d.ts +102 -13
  138. package/build/es/components/Selectbox/Selectbox.js +40 -49
  139. package/build/es/components/Tabs/Tab.d.ts +37 -30
  140. package/build/es/components/Tabs/Tab.js +3 -2
  141. package/build/es/components/Tabs/Tabs.d.ts +40 -30
  142. package/build/es/components/Textarea/Textarea.js +4 -3
  143. package/build/es/components/Tooltip/Tooltip.d.ts +37 -30
  144. package/build/es/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.d.ts +74 -60
  145. package/build/es/components/index.d.ts +4 -1
  146. package/build/es/hooks/useElementDimensions.d.ts +5 -0
  147. package/build/es/hooks/useElementDimensions.js +33 -0
  148. package/build/es/index.js +3 -0
  149. package/build/es/themes/globalStyles.d.ts +174 -60
  150. package/build/es/themes/globalStyles.js +134 -145
  151. package/build/es/themes/styled.d.ts +259 -210
  152. package/build/es/themes/theme.d.ts +37 -30
  153. package/build/es/themes/themeComponents/buttons.d.ts +1 -6
  154. package/build/es/themes/themeComponents/buttons.js +1 -6
  155. package/build/es/themes/themeComponents/fontFamily.d.ts +3 -1
  156. package/build/es/themes/themeComponents/fontFamily.js +3 -1
  157. package/build/es/themes/themeComponents/fontSize.d.ts +18 -15
  158. package/build/es/themes/themeComponents/fontSize.js +20 -14
  159. package/build/es/themes/themeComponents/lineHeight.d.ts +19 -12
  160. package/build/es/themes/themeComponents/lineHeight.js +21 -11
  161. package/package.json +3 -4
@@ -58,12 +58,7 @@ declare const _default: import("styled-components").StyledComponent<({ type, siz
58
58
  };
59
59
  breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
60
60
  button: {
61
- buttonBorderWidth: string;
62
- buttonPadding: string;
63
- smallButtonPadding: string;
64
- buttonLineHeight: string;
65
- buttonWidth: string;
66
- buttonSmallWidth: string;
61
+ border: string;
67
62
  };
68
63
  color: {
69
64
  black: string;
@@ -94,22 +89,27 @@ declare const _default: import("styled-components").StyledComponent<({ type, siz
94
89
  gray5: string;
95
90
  };
96
91
  fontFamily: {
97
- baseFontFamily: string;
92
+ default: string;
93
+ heading: string;
94
+ numerals: string;
98
95
  };
99
96
  fontSize: {
100
- defaultFontSize: string;
101
- smallFontSize: string;
102
- extraSmallFontSize: string;
103
- xsFontSize: string;
104
- xxsFontSize: string;
105
- h1FontSize: string;
106
- h2FontSize: string;
107
- h2MobileFontSize: string;
108
- h3FontSize: string;
109
- h4FontSize: string;
110
- h5FontSize: string;
111
- heroBannerTitleFontSize: string;
112
- heroBannerTitleMobileFontSize: string;
97
+ default: string;
98
+ xl: string;
99
+ l: string;
100
+ s: string;
101
+ xs: string;
102
+ h1XL: string;
103
+ h1L: string;
104
+ h1M: string;
105
+ h1S: string;
106
+ h2M: string;
107
+ h2S: string;
108
+ h3: string;
109
+ h4: string;
110
+ h5: string;
111
+ h1: string;
112
+ h2: string;
113
113
  };
114
114
  fontWeight: {
115
115
  book: number;
@@ -125,26 +125,23 @@ declare const _default: import("styled-components").StyledComponent<({ type, siz
125
125
  gutter: string;
126
126
  };
127
127
  lineHeight: {
128
- defaultLineHeight: string;
129
- paragraphLineHeight: string;
130
- heroBannerLineHeight: string;
131
- heroBannerMobileLineHeight: string;
132
- h1LineHeight: string;
133
- h2LineHeight: string;
134
- h2MobileLineHeight: string;
135
- h3LineHeight: string;
136
- h4LineHeight: string; /**
137
- * There are different types and color options for the DNA Logo, depending on the color of
138
- * the background and place where it is used.
139
- *
140
- * @default 'default'
141
- * @param {Type} default Default
142
- * @param {Type} white For use on hot pink background
143
- * @param {Type} logotype-pink For use in smaller spaces
144
- * @param {Type} logotype-white For use in smaller spaces and on pink background
145
- * @param {Type} logotype-black For specific uses only (see Brand Styleguide)
146
- */
147
- h5LineHeight: string;
128
+ default: string;
129
+ xl: string;
130
+ s: string;
131
+ xs: string;
132
+ xxs: string;
133
+ auto: string;
134
+ h1XL: string;
135
+ h1L: string;
136
+ h1M: string;
137
+ h1S: string;
138
+ h2M: string;
139
+ h2S: string;
140
+ h3: string;
141
+ h4: string;
142
+ h5: string;
143
+ h1: string;
144
+ h2: string;
148
145
  };
149
146
  media: Record<string | number, (l: TemplateStringsArray, ...p: any[]) => string>;
150
147
  }, Props, never>;
@@ -77,7 +77,8 @@ const CategoryHeader = styled['default'].h4 `
77
77
  border-top: 1px solid #cfcfcf;
78
78
  transition: border-bottom 0s linear ${props => (props.active ? '0s' : '0.3s')};
79
79
  border-bottom: 1px solid ${props => (props.active ? '#cfcfcf' : '#e7e7e7')};
80
- font-size: ${props => props.theme.fontSize.defaultFontSize};
80
+ font-size: ${props => props.theme.fontSize.default};
81
+ line-height: ${props => props.theme.lineHeight.default};
81
82
  color: ${props => props.theme.color.slateGray};
82
83
  align-content: center;
83
84
  &:hover,
@@ -139,7 +140,7 @@ const SmallText = styled['default'].p `
139
140
  margin-top: ${props => styledUtils.getMultipliedSize(props.theme.base.baseWidth, 0.2)};
140
141
  line-height: ${props => styledUtils.getMultipliedSize(props.theme.base.baseHeight, 2)};
141
142
  color: ${props => props.theme.color.slateGray};
142
- font-size: ${props => props.theme.fontSize.xsFontSize};
143
+ font-size: ${props => props.theme.fontSize.xs};
143
144
  `;
144
145
  const LanguageLinksContainer = styled['default'].div `
145
146
  text-align: center;
@@ -27,7 +27,8 @@ const HelperIcon = styled['default'].span `
27
27
  height: 1rem;
28
28
  min-width: 1rem;
29
29
  padding: 0 4px;
30
- font-size: ${p => p.theme.fontSize.extraSmallFontSize};
30
+ font-size: ${p => p.theme.fontSize.s};
31
+ line-height: ${p => p.theme.lineHeight.xs};
31
32
  `;
32
33
  const Helper = props => (React.createElement(Container, Object.assign({}, props),
33
34
  React.createElement(HelperIcon, null, "?")));
@@ -44,12 +44,7 @@ declare const _default: import("styled-components").StyledComponent<React.Functi
44
44
  };
45
45
  breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
46
46
  button: {
47
- buttonBorderWidth: string;
48
- buttonPadding: string;
49
- smallButtonPadding: string;
50
- buttonLineHeight: string;
51
- buttonWidth: string;
52
- buttonSmallWidth: string;
47
+ border: string;
53
48
  };
54
49
  color: {
55
50
  black: string;
@@ -88,22 +83,29 @@ declare const _default: import("styled-components").StyledComponent<React.Functi
88
83
  gray5: string;
89
84
  };
90
85
  fontFamily: {
91
- baseFontFamily: string;
86
+ default: string;
87
+ heading: string;
88
+ numerals: string;
92
89
  };
93
90
  fontSize: {
94
- defaultFontSize: string;
95
- smallFontSize: string;
96
- extraSmallFontSize: string;
97
- xsFontSize: string;
98
- xxsFontSize: string;
99
- h1FontSize: string;
100
- h2FontSize: string;
101
- h2MobileFontSize: string;
102
- h3FontSize: string;
103
- h4FontSize: string;
104
- h5FontSize: string;
105
- heroBannerTitleFontSize: string;
106
- heroBannerTitleMobileFontSize: string;
91
+ default: string;
92
+ xl: string;
93
+ l: string;
94
+ s: string;
95
+ xs: string;
96
+ h1XL: string;
97
+ h1L: string;
98
+ h1M: string;
99
+ h1S: string;
100
+ h2M: string;
101
+ h2S: string; /**
102
+ * Icon color, specified as a hex, or a color name (hotPink, waterBlue)
103
+ */
104
+ h3: string;
105
+ h4: string;
106
+ h5: string;
107
+ h1: string;
108
+ h2: string;
107
109
  };
108
110
  fontWeight: {
109
111
  book: number;
@@ -121,16 +123,23 @@ declare const _default: import("styled-components").StyledComponent<React.Functi
121
123
  * Indicates that this component is on right side of other contents and adds an appropriate left margin.
122
124
  */
123
125
  lineHeight: {
124
- defaultLineHeight: string;
125
- paragraphLineHeight: string;
126
- heroBannerLineHeight: string;
127
- heroBannerMobileLineHeight: string;
128
- h1LineHeight: string;
129
- h2LineHeight: string;
130
- h2MobileLineHeight: string;
131
- h3LineHeight: string;
132
- h4LineHeight: string;
133
- h5LineHeight: string;
126
+ default: string;
127
+ xl: string;
128
+ s: string;
129
+ xs: string;
130
+ xxs: string;
131
+ auto: string;
132
+ h1XL: string;
133
+ h1L: string;
134
+ h1M: string;
135
+ h1S: string;
136
+ h2M: string;
137
+ h2S: string;
138
+ h3: string;
139
+ h4: string;
140
+ h5: string;
141
+ h1: string;
142
+ h2: string;
134
143
  };
135
144
  media: Record<React.ReactText, (l: TemplateStringsArray, ...p: any[]) => string>;
136
145
  }, IconProps, never>;
@@ -55,10 +55,6 @@ export declare const devices: ({ size, color, ...props }: IconProps) => JSX.Elem
55
55
  export declare const diamond: ({ size, color, ...props }: IconProps) => JSX.Element;
56
56
  export declare const digibox: ({ size, color, ...props }: IconProps) => JSX.Element;
57
57
  export declare const digiboxRec: ({ size, color, ...props }: IconProps) => JSX.Element;
58
- /**
59
- * @deprecated
60
- */
61
- export declare const dna: ({ size, color, ...props }: IconProps) => JSX.Element;
62
58
  export declare const dnaTurvapaketti: ({ size, color, ...props }: IconProps) => JSX.Element;
63
59
  export declare const dnaTv: ({ size, color, ...props }: IconProps) => JSX.Element;
64
60
  export declare const document1: ({ size, color, ...props }: IconProps) => JSX.Element;
@@ -191,6 +187,7 @@ export declare const thriller: ({ size, color, ...props }: IconProps) => JSX.Ele
191
187
  export declare const thumbDown: ({ size, color, ...props }: IconProps) => JSX.Element;
192
188
  export declare const thumbUp: ({ size, color, ...props }: IconProps) => JSX.Element;
193
189
  export declare const tickets: ({ size, color, ...props }: IconProps) => JSX.Element;
190
+ export declare const tiktok: ({ size, color, ...props }: IconProps) => JSX.Element;
194
191
  export declare const top10: ({ size, color, ...props }: IconProps) => JSX.Element;
195
192
  export declare const top50: ({ size, color, ...props }: IconProps) => JSX.Element;
196
193
  export declare const trademark: ({ size, color, ...props }: IconProps) => JSX.Element;
@@ -134,12 +134,6 @@ const digibox = ({ size, color, ...props }) => (React__default['default'].create
134
134
  React__default['default'].createElement("path", { d: "M.714 39.5h114.901V0H.715v39.5zM7.257 6.6h101.914V33H7.257V6.6zm88.53 8.8c-2.379 0-4.362 2-4.362 4.4 0 2.5 1.884 4.5 4.363 4.5 2.478 0 4.46-1.9 4.46-4.4v-.1c-.098-2.4-2.081-4.4-4.46-4.4z", fillRule: "evenodd" })));
135
135
  const digiboxRec = ({ size, color, ...props }) => (React__default['default'].createElement("svg", Object.assign({ viewBox: "0 0 116 40", fill: color, width: size, height: size }, props),
136
136
  React__default['default'].createElement("path", { d: "M.286 39.5h114.9V0H.287v39.5zm6.444-33h102.112v26.4H6.73V6.5zm88.629 8.7c-2.38 0-4.362 2-4.362 4.4 0 2.4 1.884 4.4 4.263 4.4h.198c2.38 0 4.362-2 4.362-4.4-.099-2.4-2.082-4.3-4.461-4.4zm-69.297 1.4c0-2.4-1.884-4.3-4.263-4.3h-5.651v13.9h3.073V21h1.09l2.479 5.2h3.47l-2.875-5.6c1.685-.6 2.776-2.2 2.677-4zm-5.056 1.8H19.22V15h1.785c1.288 0 1.982.6 1.982 1.7 0 1-.793 1.7-1.784 1.7h-.198zm9.814 2.1h5.155v-2.6H30.82v-2.6h5.552v-3h-8.724v13.9h8.823v-3h-5.75c.1 0 .1-2.7.1-2.7zm14.078 2.9c-2.28 0-4.164-1.8-4.263-4.1-.1-2.3 1.784-4.2 4.065-4.3 1.685-.2 3.172.9 3.568 2.5l2.875-.8c-.495-2-2.28-4.7-6.443-4.7-3.966 0-7.138 3.3-7.04 7.3.1 4 3.272 7.2 7.238 7.1 3.073.2 5.75-1.8 6.543-4.8l-2.974-.8a3.447 3.447 0 0 1-3.57 2.6z", fillRule: "evenodd" })));
137
- /**
138
- * @deprecated
139
- */
140
- const dna = ({ size, color, ...props }) => (React__default['default'].createElement("svg", Object.assign({ viewBox: "-185 277 240 240", fill: color, width: size, height: size }, props),
141
- React__default['default'].createElement("path", { d: "M-185.2 277v240H55V277h-240.2zm81.6 136.6c0 14.3-11.4 25.7-25.4 25.7h-25.4v-85h25.4c14 0 25.4 11.4 25.4 25.7v33.6zm63.6 25.7h-15.2v-59.6c0-5.8-4.4-10.2-10.2-10.2h-10.5v69.8h-14.9v-85h25.4c14 0 25.4 11.4 25.4 25.4v59.6zm64.6 0H9.4V409h-20.7v30.4h-15.2v-60.1c0-14 11.4-25.4 25.4-25.4h.3c14 0 25.4 11.4 25.4 25.4v60z" }),
142
- React__default['default'].createElement("path", { d: "M-.8 369h-.3c-5.8 0-10.2 4.7-10.2 10.2v15.5H9.4v-15.5c0-5.6-4.7-10.2-10.2-10.2zm-128 .6h-10.8v54.6h10.8c5.6 0 10.2-4.7 10.2-10.2v-34.2c.1-5.9-4.6-10.2-10.2-10.2z" })));
143
137
  const dnaTurvapaketti = ({ size, color, ...props }) => (React__default['default'].createElement("svg", Object.assign({ viewBox: "0 0 78 102", fill: color, width: size, height: size }, props),
144
138
  React__default['default'].createElement("path", { d: "M65.9 11.4V0H0v90.2h11.5v11.4h66V11.4H65.9zM11.5 84.5H5.6V5.8h54.5v5.6H11.5v73.1zM45.2 78l-.7.2-.7-.2C26 71 26.5 60.5 26.5 59.4V38.6H29c2.4.1 4.8-.3 7.1-1.1 2.8-1 5.2-2.8 6.8-5.2l.5-.6h2l.5.6c1.8 2.4 4.2 4.2 7 5.2 2.3.8 4.7 1.1 7.1 1.1h2.5v20.8c0 1.1.5 11.6-17.3 18.6z", fillRule: "evenodd" })));
145
139
  const dnaTv = ({ size, color, ...props }) => (React__default['default'].createElement("svg", Object.assign({ viewBox: "0 0 105 72", fill: color, width: size, height: size }, props),
@@ -432,6 +426,8 @@ const thumbUp = ({ size, color, ...props }) => (React__default['default'].create
432
426
  React__default['default'].createElement("path", { d: "M30.642 36.214v48.335H0V36.214h30.642zM5.572 78.978H25.07V41.785H5.57v37.193zm82.5-49.435c7.692 0 13.928 6.236 13.928 13.928 0 1.42-.217 2.833-.645 4.189L90.123 83.279a11.143 11.143 0 0 1-10.626 7.792H63.744l-30.316-9.406V37.877l17.715-16.439a8.357 8.357 0 0 0 2.673-6.126v-4.17C53.816 4.99 58.804 0 64.958 0h.342c6.154 0 11.143 4.989 11.143 11.143v18.4h11.629zM38.999 77.56l25.59 7.94h14.908a5.571 5.571 0 0 0 5.313-3.896l11.232-35.62a8.357 8.357 0 0 0-7.97-10.87h-17.2V11.143A5.571 5.571 0 0 0 65.3 5.57h-.342a5.571 5.571 0 0 0-5.571 5.572v4.17c0 3.874-1.614 7.573-4.454 10.209L38.999 40.307V77.56zm-23.678-5.133a4.178 4.178 0 1 1 0-8.357 4.178 4.178 0 0 1 0 8.357z" })));
433
427
  const tickets = ({ size, color, ...props }) => (React__default['default'].createElement("svg", Object.assign({ viewBox: "0 0 99 100", fill: color, width: size, height: size }, props),
434
428
  React__default['default'].createElement("path", { d: "M76.329 5.9L49.005 7.3 46.233 0 0 18.2l29.898 77.4 10.197-4.1 43.56 7.9 14.652-81.7-21.483-4-.495-7.8zm-68.013 16l18.81-7.4 3.564 65L8.316 21.9zm28.71 56.7L33.66 14.7l11.187-.6 3.762-.2-1.188 7-10.395 57.7zM90.882 23L82.17 71.5l-2.277-.4-1.881-.4-1.188 6.5 3.465.6.693.1-.594 3.4-1.287 7.6-.594 3-12.375-2.3L51.678 87l-9.306-1.7.099-1 .198-.8 2.178-12.1 3.069.6 1.089-6.5-2.97-.6 5.841-32.4 2.178-12.2.693-3.8 15.939 2.9 6.534 1.2L90.882 23zM50.688 72.5l5.94 1.1 1.188-6.5-5.94-1.1-1.188 6.5zm9.9-4.8L59.4 74l4.95 1 1.089.1.099-.6.693-4.6.198-1.2-.693-.2-5.148-.8zm7.623 7.9l5.544 1.1h.396l.594-3.1.594-3.2-1.881-.4h-.198l-3.96-.7-1.089 6.3z", fillRule: "evenodd" })));
429
+ const tiktok = ({ size, color, ...props }) => (React__default['default'].createElement("svg", Object.assign({ viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: color, width: size, height: size }, props),
430
+ React__default['default'].createElement("path", { d: "M22.4442 5.93598C16.3531 5.35403 16.4695 0 16.4695 0H12.5419V16.9081C12.4429 18.7164 10.9478 20.1319 9.13677 20.1319C7.25334 20.1319 5.72652 18.6051 5.72652 16.7216C5.72652 14.8382 7.25334 13.3114 9.13677 13.3114C9.53425 13.3114 9.92868 13.3809 10.3022 13.5167L10.3408 9.05258C9.92504 8.98209 9.50412 8.94665 9.08246 8.94665C4.92559 8.94665 1.55579 12.3165 1.55579 16.4733C1.55579 20.6302 4.92559 24 9.08246 24C13.0974 24 16.4055 20.8487 16.6003 16.8385V8.03104C16.6003 8.03104 18.7585 9.89331 22.4442 9.97091V5.93598Z" })));
435
431
  const top10 = ({ size, color, ...props }) => (React__default['default'].createElement("svg", Object.assign({ viewBox: "0 0 72 73", fill: color, width: size, height: size }, props),
436
432
  React__default['default'].createElement("path", { d: "M.6 72.1h71.112V0H.6v72.1zM7.11 6.6h58.093v59H7.11v-59zm21.402 13.7H15.69v3.2h4.735v12.1h3.353V23.5h4.734v-3.2zM36.205 36c4.34 0 7.89-3.6 7.89-8s-3.55-8-7.89-8-7.89 3.6-7.89 8c-.099 4.3 3.255 7.9 7.496 8h.394zm0-12.7c2.565-.1 4.735 1.8 4.833 4.4.099 2.6-1.775 4.8-4.34 4.9-2.564.1-4.734-1.8-4.832-4.4V28c-.198-2.4 1.578-4.5 3.945-4.7h.394zm15.09-3h-5.818v15.4h3.452v-5.5h2.367c3.057 0 5.227-2 5.227-4.9 0-2.9-2.17-5-5.227-5zm-.394 6.8H48.93v-3.8h1.97c1.085-.1 1.973.6 2.072 1.7.098 1.1-.592 2-1.677 2.1H50.9zM24.863 42.2v2.3h3.353v9.2h3.452V39.6H28.71c-.296 1.4-1.677 2.6-3.847 2.6zm13.71-3c-1.874-.1-3.748.9-4.735 2.5a8.61 8.61 0 0 0-1.183 4.9c-.099 1.8.296 3.5 1.183 5a5.86 5.86 0 0 0 4.735 2.4c1.874.1 3.649-.8 4.734-2.4.986-1.5 1.38-3.3 1.282-5 .099-1.7-.394-3.5-1.282-4.9a5.233 5.233 0 0 0-4.734-2.5zm2.17 10.6c-.395.8-1.283 1.3-2.17 1.3-.888 0-1.677-.5-1.973-1.3-.395-1-.493-2.1-.493-3.1s.098-2 .493-3c.296-.8 1.085-1.4 1.973-1.3.887 0 1.775.5 2.17 1.3.394 1 .493 2 .493 3s-.198 2.1-.494 3.1z", fillRule: "evenodd" })));
437
433
  const top50 = ({ size, color, ...props }) => (React__default['default'].createElement("svg", Object.assign({ viewBox: "0 0 72 73", fill: color, width: size, height: size }, props),
@@ -841,7 +837,6 @@ exports.devices = devices;
841
837
  exports.diamond = diamond;
842
838
  exports.digibox = digibox;
843
839
  exports.digiboxRec = digiboxRec;
844
- exports.dna = dna;
845
840
  exports.dnaTurvapaketti = dnaTurvapaketti;
846
841
  exports.dnaTv = dnaTv;
847
842
  exports.document1 = document1;
@@ -1064,6 +1059,7 @@ exports.thriller = thriller;
1064
1059
  exports.thumbDown = thumbDown;
1065
1060
  exports.thumbUp = thumbUp;
1066
1061
  exports.tickets = tickets;
1062
+ exports.tiktok = tiktok;
1067
1063
  exports.top10 = top10;
1068
1064
  exports.top50 = top50;
1069
1065
  exports.trademark = trademark;
@@ -1,34 +1,123 @@
1
1
  import React from 'react';
2
- export interface InputFieldProps {
3
- label?: string;
2
+ declare type ComponentStatus = 'none' | 'success' | 'error' | 'comment';
3
+ declare type InputType = 'date' | 'email' | 'hidden' | 'month' | 'number' | 'password' | 'range' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';
4
+ interface Props {
5
+ /**
6
+ * Unique ID for the input element
7
+ */
8
+ id: string;
9
+ /**
10
+ * Name of the input element
11
+ */
4
12
  name: string;
13
+ /**
14
+ * Type of input element
15
+ *
16
+ * @default 'text'
17
+ * @param {InputType} date Used for entering a date (year, month and day)
18
+ * @param {InputType} email Used for entering an email address and supported with browser validation
19
+ * @param {InputType} hidden Input element is not displayed but its value is submitted with form regardless
20
+ * @param {InputType} month Used for entering a month and year, with no time zone
21
+ * @param {InputType} number Used for entering a number, it displays arrows and might have browser validation
22
+ * @param {InputType} password Used for entering value which is obscured for view
23
+ * @param {InputType} range Used for entering a not number by displaying a range widget
24
+ * @param {InputType} search Used for entering search strings
25
+ * @param {InputType} tel Used for entering a telephone number
26
+ * @param {InputType} text Single-line text field
27
+ * @param {InputType} time Used for entering a time value with no time zone
28
+ * @param {InputType} url Used for entering a URL and supported with browser validation
29
+ * @param {InputType} week Used for entering a week (week-year number and a week number with no time zone)
30
+ */
31
+ type?: InputType;
32
+ /**
33
+ * Default value of input element
34
+ */
5
35
  value?: string | number;
36
+ /**
37
+ * Text of the input element label
38
+ */
39
+ label?: string;
40
+ /**
41
+ * Text of placeholder for the input value
42
+ */
43
+ placeholder?: string;
44
+ /**
45
+ * Integer attribute indicating the sequence of keyboard navigation
46
+ */
47
+ tabIndex?: number;
48
+ /**
49
+ * On input change callback
50
+ */
51
+ onChange?: (...args: any[]) => any;
52
+ /**
53
+ * On input blur callback
54
+ */
6
55
  onBlur?: (...args: any[]) => any;
56
+ /**
57
+ * On input focus callback
58
+ */
7
59
  onFocus?: (...args: any[]) => any;
8
- onChange?: (...args: any[]) => any;
60
+ /**
61
+ * On input key press callback
62
+ */
9
63
  onKeyPress?: (...args: any[]) => any;
64
+ /**
65
+ * On input key down callback
66
+ */
10
67
  onKeyDown?: (...args: any[]) => any;
11
68
  /**
12
- * @default 'text'
69
+ * Allows user to change type of input between "password" and "text"
70
+ * When set to true, value of type property is ignored
71
+ *
72
+ * @default false
13
73
  */
14
- type?: 'date' | 'email' | 'hidden' | 'month' | 'number' | 'password' | 'range' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';
74
+ showPasswordToggle?: boolean;
15
75
  /**
16
- * @default 'text'
76
+ * Allows to define space separated string to describe type of autocomplete functionality the input should provide
77
+ * Use "off" to disable built-in browser autocomplete functionality
78
+ *
79
+ * For possible values refer to e.g.: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
80
+ */
81
+ autocomplete?: string;
82
+ /**
83
+ * Allows to disable the component functionality
84
+ *
85
+ * @default false
17
86
  */
18
- placeholder?: string;
19
- id?: string;
20
- required?: boolean;
21
87
  disabled?: boolean;
22
- showPasswordToggle?: boolean;
23
- tabIndex?: number;
24
88
  /**
89
+ * Allows to set input as mandatory
90
+ *
91
+ * @default false
92
+ */
93
+ required?: boolean;
94
+ /**
95
+ * Depending on the passed status, the styling and additional elements are shown
96
+ *
25
97
  * @default 'none'
98
+ * @param {ComponentStatus} none No specific styling
99
+ * @param {ComponentStatus} success Displays #e80c0c color code as bottom line color of input
100
+ * @param {ComponentStatus} error Displays #ff7800 color code as bottom line color of input and error message underneath the input
101
+ * @param {ComponentStatus} comment Displays comment message underneath the input
102
+ */
103
+ status?: ComponentStatus;
104
+ /**
105
+ * Text of the error message when input is in error state
26
106
  */
27
- status?: string;
28
107
  errorMessage?: string;
108
+ /**
109
+ * Text of the comment message when input is in comment state
110
+ */
29
111
  commentMessage?: string;
112
+ /**
113
+ * Allows to pass a custom className
114
+ */
115
+ className?: string;
116
+ /**
117
+ * Allows to pass testid string for testing purposes
118
+ */
30
119
  'data-testid'?: string;
31
120
  }
32
- declare const Input: React.FunctionComponent<InputFieldProps>;
121
+ declare const Input: React.FunctionComponent<Props>;
33
122
  /** @component */
34
123
  export default Input;
@@ -12,101 +12,101 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
12
12
 
13
13
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
14
 
15
- const Tag = styled['default'].input `
15
+ const FieldContainer = styled['default'].div `
16
+ color: ${props => (props.disabled ? props.theme.color.gray40 : props.theme.color.text)};
17
+ margin-bottom: ${props => styledUtils.getMultipliedSize(props.theme.base.baseWidth, 1)};
18
+
19
+ ${LabelText.LabelText} {
20
+ color: ${props => {
21
+ if (props.status === 'error') {
22
+ return props.theme.color[props.status];
23
+ }
24
+ }};
25
+ }
26
+ `;
27
+ const FieldWrapper = styled['default'].div `
28
+ position: relative;
29
+ border-bottom: 3px solid
30
+ ${props => props.status === 'success' || props.status === 'error'
31
+ ? props.theme.color[props.status]
32
+ : 'transparent'};
33
+
34
+ & svg {
35
+ color: ${props => props.theme.color.gray55};
36
+ position: absolute;
37
+ z-index: 1;
38
+ top: 0;
39
+ right: ${props => styledUtils.getMultipliedSize(props.theme.base.baseWidth, 1)};
40
+ height: ${props => styledUtils.getMultipliedSize(props.theme.base.baseHeight, 4)};
41
+ }
42
+ `;
43
+ const Mandatory = styled['default'].span `
44
+ color: ${props => props.theme.color.hotPink};
45
+ `;
46
+ const StyledInput = styled['default'].input `
16
47
  position: relative;
17
48
  display: inline-block;
18
49
  vertical-align: middle;
19
50
  padding: 0 ${props => styledUtils.getMultipliedSize(props.theme.base.baseWidth, 1)};
20
- font-size: ${props => props.theme.fontSize.defaultFontSize};
51
+ font-size: ${props => props.theme.fontSize.default};
21
52
  width: 100%;
22
53
  height: ${props => styledUtils.getMultipliedSize(props.theme.base.baseHeight, 4)};
23
54
  border: 1px solid ${props => props.theme.color.gray15};
55
+
24
56
  &::-ms-clear,
25
57
  &::-ms-reveal {
26
58
  display: none;
27
59
  }
60
+
28
61
  &:disabled,
29
62
  &[disabled] {
30
63
  background-color: ${props => props.theme.color.gray5};
31
64
  color: ${props => props.theme.color.gray40};
32
65
  }
66
+
33
67
  &:focus {
34
68
  outline: 0;
35
69
  box-shadow: 0 0 5px ${props => props.theme.color.gray25};
36
70
  }
71
+
37
72
  &:invalid {
38
73
  box-shadow: none;
39
74
  }
75
+
40
76
  &:placeholder {
41
77
  color: ${props => props.theme.color.gray25};
42
78
  }
43
79
  `;
44
- const Mandatory = styled['default'].span `
45
- color: ${props => props.theme.color.hotPink};
46
- `;
47
- const FieldWrapper = styled['default'].div `
48
- position: relative;
49
- svg {
50
- color: ${props => props.theme.color.gray55};
51
- position: absolute;
52
- z-index: 1;
53
- top: 0;
54
- right: ${props => styledUtils.getMultipliedSize(props.theme.base.baseWidth, 1)};
55
- height: ${props => styledUtils.getMultipliedSize(props.theme.base.baseHeight, 4)};
56
- }
57
- `;
58
- const FieldContainer = styled['default'].div `
59
- color: ${props => props && props.disabled ? props.theme.color.gray40 : props.theme.color.text};
60
- margin-bottom: ${props => styledUtils.getMultipliedSize(props.theme.base.baseWidth, 1)};
61
-
62
- ${FieldWrapper} {
63
- border-bottom: 3px solid;
64
- border-color: ${props => {
65
- if (props.status === 'success' || props.status === 'error') {
66
- return props.theme.color[props.status];
67
- }
68
- return 'transparent';
69
- }};
70
- }
71
-
72
- ${LabelText.LabelText} {
73
- color: ${props => {
74
- if (props.status === 'error') {
75
- return props.theme.color[props.status];
76
- }
77
- }}
78
- `;
79
80
  const ErrorMessage = styled['default'].div `
80
- line-height: 1.125rem;
81
- font-size: ${props => props.theme.fontSize.smallFontSize};
81
+ font-size: ${props => props.theme.fontSize.s};
82
+ line-height: ${props => props.theme.lineHeight.s};
82
83
  color: ${props => props.theme.color.error};
83
84
  margin-top: ${props => styledUtils.getMultipliedSize(props.theme.base.baseHeight, 0.5)};
84
85
  `;
85
86
  const CommentMessage = styled['default'](ErrorMessage) `
86
87
  color: ${props => props.theme.color.gray40};
87
88
  `;
88
- const Input = ({ id, label, name, required, disabled = false, type, onBlur, onFocus, onChange, onKeyPress, onKeyDown, status = 'none', value, placeholder, errorMessage, commentMessage, showPasswordToggle = false, 'data-testid': dataTestId, ...props }) => {
89
- const inputId = id || name;
89
+ const Input = ({ type = 'text', status = 'none', 'data-testid': dataTestId, ...props }) => {
90
90
  const inputRef = React__default['default'].useRef(null);
91
91
  const [showPassword, setShowPassword] = React__default['default'].useState(false);
92
92
  React__default['default'].useEffect(() => {
93
- if (showPasswordToggle && inputRef && inputRef.current) {
93
+ if (props.showPasswordToggle && inputRef && inputRef.current) {
94
94
  inputRef.current.type = showPassword ? 'text' : 'password';
95
95
  }
96
- }, [showPassword, showPasswordToggle]);
96
+ }, [showPassword, props.showPasswordToggle]);
97
97
  const togglePasswordVisibility = () => {
98
- if (showPasswordToggle) {
98
+ if (props.showPasswordToggle) {
99
99
  setShowPassword(!showPassword);
100
100
  }
101
101
  };
102
102
  const handleOnBlur = (e) => {
103
- if (onBlur) {
104
- onBlur(e.target.value, e);
103
+ if (props.onBlur) {
104
+ props.onBlur(e.target.value, e);
105
105
  }
106
106
  };
107
107
  const handleChange = (e) => {
108
- if (onChange) {
109
- onChange(e.target.value, e);
108
+ if (props.onChange) {
109
+ props.onChange(e.target.value, e);
110
110
  }
111
111
  };
112
112
  const onClick = (e) => {
@@ -115,17 +115,16 @@ const Input = ({ id, label, name, required, disabled = false, type, onBlur, onFo
115
115
  inputRef.current.focus();
116
116
  }
117
117
  };
118
- const renderField = () => (React__default['default'].createElement(Tag, Object.assign({ name: name, type: type, id: inputId, value: value, placeholder: placeholder, onChange: handleChange, onBlur: handleOnBlur, onFocus: onFocus, onClick: onClick, onKeyDown: onKeyDown, onKeyPress: onKeyPress, required: required, disabled: disabled, "aria-disabled": disabled, "aria-label": inputId, ref: inputRef, "data-testid": dataTestId }, props)));
119
- return (React__default['default'].createElement(FieldContainer, { disabled: disabled, status: status },
120
- label && (React__default['default'].createElement(LabelText.LabelText, { htmlFor: id, "data-testid": dataTestId && `${dataTestId}-label` },
121
- label,
118
+ return (React__default['default'].createElement(FieldContainer, { className: props.className, disabled: props.disabled, status: status },
119
+ props.label && (React__default['default'].createElement(LabelText.LabelText, { htmlFor: props.id, "data-testid": dataTestId && `${dataTestId}-label` },
120
+ props.label,
122
121
  " ",
123
- required && React__default['default'].createElement(Mandatory, null, "*"))),
124
- React__default['default'].createElement(FieldWrapper, null,
125
- renderField(),
126
- showPasswordToggle && (React__default['default'].createElement(Icon['default'], { onClick: togglePasswordVisibility, name: showPassword ? 'hlEyeOpen' : 'hlEyeClosed', size: "1.6em" }))),
127
- status === 'error' && errorMessage && (React__default['default'].createElement(ErrorMessage, { "data-testid": dataTestId && `${dataTestId}-error` }, errorMessage)),
128
- status === 'comment' && commentMessage && (React__default['default'].createElement(CommentMessage, { "data-testid": dataTestId && `${dataTestId}-comment` }, commentMessage))));
122
+ props.required && React__default['default'].createElement(Mandatory, null, "*"))),
123
+ React__default['default'].createElement(FieldWrapper, { status: status },
124
+ React__default['default'].createElement(StyledInput, { id: props.id, name: props.name, type: type, value: props.value, placeholder: props.placeholder, onChange: handleChange, onBlur: handleOnBlur, onFocus: props.onFocus, onClick: onClick, onKeyDown: props.onKeyDown, onKeyPress: props.onKeyPress, required: props.required, disabled: props.disabled, autoComplete: props.autocomplete, "aria-disabled": props.disabled, "aria-label": props.id, ref: inputRef, tabIndex: props.tabIndex, "data-testid": dataTestId }),
125
+ props.showPasswordToggle && (React__default['default'].createElement(Icon['default'], { onClick: togglePasswordVisibility, name: showPassword ? 'hlEyeOpen' : 'hlEyeClosed', size: "1.6em" }))),
126
+ status === 'error' && props.errorMessage && (React__default['default'].createElement(ErrorMessage, { "data-testid": dataTestId && `${dataTestId}-error` }, props.errorMessage)),
127
+ status === 'comment' && props.commentMessage && (React__default['default'].createElement(CommentMessage, { "data-testid": dataTestId && `${dataTestId}-comment` }, props.commentMessage))));
129
128
  };
130
129
 
131
130
  exports.default = Input;
@@ -15,9 +15,8 @@ const LabelStyle = styled['default'].span `
15
15
  min-width: 4.375rem;
16
16
  text-align: center;
17
17
  font-weight: ${props => props.theme.fontWeight.bold};
18
- font-size: ${props => props.smallerFont
19
- ? props.theme.fontSize.xsFontSize
20
- : props.theme.fontSize.extraSmallFontSize};
18
+ font-size: ${props => (props.smallerFont ? props.theme.fontSize.xs : '0.8125rem')};
19
+ line-height: ${props => props.theme.lineHeight.xxs};
21
20
  text-transform: uppercase;
22
21
  color: ${props => props && props.color === 'white' ? props.theme.color.black : props.theme.color.white};
23
22
  background: ${props => props.theme.color[props.color]};