@laerdal/life-react-components 6.0.0-dev.27 → 6.0.0-dev.30

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 (50) hide show
  1. package/README.md +42 -0
  2. package/dist/Button/Button.cjs +469 -0
  3. package/dist/Button/Button.cjs.map +1 -0
  4. package/dist/Button/Button.d.ts +70 -0
  5. package/dist/Button/Button.js +461 -0
  6. package/dist/Button/Button.js.map +1 -0
  7. package/dist/Card/HorizontalCard/__tests__/VerticalCard.test.tsx +124 -0
  8. package/dist/Card/VerticalCard/Card.cjs +187 -0
  9. package/dist/Card/VerticalCard/Card.cjs.map +1 -0
  10. package/dist/Card/VerticalCard/Card.d.ts +25 -0
  11. package/dist/Card/VerticalCard/Card.js +178 -0
  12. package/dist/Card/VerticalCard/Card.js.map +1 -0
  13. package/dist/Card/VerticalCard/CardBottomSection.cjs +261 -0
  14. package/dist/Card/VerticalCard/CardBottomSection.cjs.map +1 -0
  15. package/dist/Card/VerticalCard/CardBottomSection.d.ts +53 -0
  16. package/dist/Card/VerticalCard/CardBottomSection.js +252 -0
  17. package/dist/Card/VerticalCard/CardBottomSection.js.map +1 -0
  18. package/dist/Card/VerticalCard/CardMiddleSection.cjs +145 -0
  19. package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +1 -0
  20. package/dist/Card/VerticalCard/CardMiddleSection.d.ts +42 -0
  21. package/dist/Card/VerticalCard/CardMiddleSection.js +136 -0
  22. package/dist/Card/VerticalCard/CardMiddleSection.js.map +1 -0
  23. package/dist/Card/VerticalCard/CardTopSection.cjs +165 -0
  24. package/dist/Card/VerticalCard/CardTopSection.cjs.map +1 -0
  25. package/dist/Card/VerticalCard/CardTopSection.d.ts +45 -0
  26. package/dist/Card/VerticalCard/CardTopSection.js +156 -0
  27. package/dist/Card/VerticalCard/CardTopSection.js.map +1 -0
  28. package/dist/Card/__tests__/Card.test.tsx +146 -0
  29. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs +0 -1
  30. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
  31. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js +0 -1
  32. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  33. package/dist/Footer/Components/FooterTop.cjs.map +1 -1
  34. package/dist/Footer/Components/FooterTop.js.map +1 -1
  35. package/dist/InputFields/RichTextField.cjs +3 -2
  36. package/dist/InputFields/RichTextField.cjs.map +1 -1
  37. package/dist/InputFields/RichTextField.d.ts +4 -5
  38. package/dist/InputFields/RichTextField.js +2 -1
  39. package/dist/InputFields/RichTextField.js.map +1 -1
  40. package/dist/InputFields/TextField.cjs +2 -5
  41. package/dist/InputFields/TextField.cjs.map +1 -1
  42. package/dist/InputFields/TextField.d.ts +0 -8
  43. package/dist/InputFields/TextField.js +2 -5
  44. package/dist/InputFields/TextField.js.map +1 -1
  45. package/dist/InputFields/styling.cjs +1 -4
  46. package/dist/InputFields/styling.cjs.map +1 -1
  47. package/dist/InputFields/styling.d.ts +0 -1
  48. package/dist/InputFields/styling.js +1 -4
  49. package/dist/InputFields/styling.js.map +1 -1
  50. package/package.json +4 -4
@@ -0,0 +1,70 @@
1
+ import * as React from 'react';
2
+ import { Size } from '../types';
3
+ export declare const TextButtonContentContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const TextButtonPrimaryStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$size" | "$width" | "$flatEdge" | "$invertFocus" | "$iconOnly" | "$colorTheme"> & {
5
+ $iconOnly: boolean;
6
+ $size: Size;
7
+ $colorTheme: "teal" | "dark" | undefined;
8
+ $flatEdge: string | undefined;
9
+ $width: string;
10
+ $invertFocus: boolean | undefined;
11
+ }, never>> & string;
12
+ export declare const TextButtonSecondaryStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$size" | "$width" | "$flatEdge" | "$invertFocus" | "$iconOnly" | "$colorTheme"> & {
13
+ $iconOnly: boolean;
14
+ $size: Size;
15
+ $colorTheme: "teal" | "dark" | undefined;
16
+ $flatEdge: string | undefined;
17
+ $width: string;
18
+ $invertFocus: boolean | undefined;
19
+ }, never>, never>> & string;
20
+ export declare const TextButtonTertiaryStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$size" | "$width" | "$flatEdge" | "$invertFocus" | "$iconOnly" | "$colorTheme"> & {
21
+ $iconOnly: boolean;
22
+ $size: Size;
23
+ $colorTheme: "teal" | "dark" | undefined;
24
+ $flatEdge: string | undefined;
25
+ $width: string;
26
+ $invertFocus: boolean | undefined;
27
+ }, never>, never>> & string;
28
+ export declare const TextButtonPositiveStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$size" | "$width" | "$flatEdge" | "$invertFocus" | "$iconOnly" | "$colorTheme"> & {
29
+ $iconOnly: boolean;
30
+ $size: Size;
31
+ $colorTheme: "teal" | "dark" | undefined;
32
+ $flatEdge: string | undefined;
33
+ $width: string;
34
+ $invertFocus: boolean | undefined;
35
+ }, never>, never>> & string;
36
+ export declare const TextButtonCriticalStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$size" | "$width" | "$flatEdge" | "$invertFocus" | "$iconOnly" | "$colorTheme"> & {
37
+ $iconOnly: boolean;
38
+ $size: Size;
39
+ $colorTheme: "teal" | "dark" | undefined;
40
+ $flatEdge: string | undefined;
41
+ $width: string;
42
+ $invertFocus: boolean | undefined;
43
+ }, never>, never>> & string;
44
+ export interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
45
+ /** Look and feel variant of the component. Defaults to 'primary'. */
46
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'positive' | 'critical';
47
+ /** Can be used in order to remove rounded corners on right or left edge of the button. Used by 'DualFunctionButton'. Defaults to 'undefined' */
48
+ flatEdge?: 'right' | 'left' | 'none' | undefined;
49
+ /** Size of the component. Small, Medium or Large. Defaults to 'medium' */
50
+ size?: Size.Small | Size.Medium | Size.Large;
51
+ /** Color theme altering of the component. By default there is no altering applied. */
52
+ colorTheme?: 'teal' | 'dark';
53
+ /** Allows using inverted colors for outlining focus rect. Shown when component focused by keyboard. */
54
+ invertFocus?: boolean;
55
+ /** Can be used to set custom value for width style. Value is set for 'ButtonContent' container. */
56
+ width?: 'auto' | string;
57
+ /** If set, then 'opacity' of children container will be set to 0, and loading indicator will be shown. */
58
+ loading?: boolean;
59
+ /** TestId. Will be set to the top level button component. */
60
+ testId?: string;
61
+ /** Icon that will be shown on the left of the children. */
62
+ icon?: React.ReactNode;
63
+ /** Icon position in the button. Defaults to 'left' */
64
+ iconPosition?: 'left' | 'right';
65
+ }
66
+ /**
67
+ * TextButton component
68
+ */
69
+ declare const TextButton: React.ForwardRefExoticComponent<TextButtonProps & React.RefAttributes<HTMLButtonElement>>;
70
+ export default TextButton;
@@ -0,0 +1,461 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ import _pt from "prop-types";
4
+ const _excluded = ["children", "variant", "type", "size", "colorTheme", "invertFocus", "width", "testId", "disabled", "flatEdge", "icon", "iconPosition"],
5
+ _excluded2 = ["loading"];
6
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
+ import * as React from 'react';
9
+ import styled, { useTheme } from 'styled-components';
10
+ import { LoadingIndicator } from '../LoadingIndicator';
11
+ import { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles';
12
+ import { COLORS, focusStyles, invertedFocusStyles } from '../styles';
13
+ import { Size } from '../types';
14
+ import { defaultOnMouseDownHandler } from '../common';
15
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
+ const getBorderRadius = (flatEdge, radius) => {
17
+ switch (flatEdge) {
18
+ case 'left':
19
+ return `0px ${radius}px ${radius}px 0px`;
20
+ case 'right':
21
+ return `${radius}px 0px 0px ${radius}px`;
22
+ case 'none':
23
+ default:
24
+ return `${radius}px`;
25
+ }
26
+ };
27
+ export const TextButtonContentContainer = styled.div`
28
+ min-width: 64px;
29
+ `;
30
+ const TextButtonBaseStyled = styled.button``;
31
+ export const TextButtonPrimaryStyled = styled(TextButtonBaseStyled)`
32
+ border: none;
33
+ background-color: transparent;
34
+ cursor: pointer;
35
+ padding: 0;
36
+ margin: 0;
37
+ position: relative;
38
+ box-sizing: border-box;
39
+ &.loading-state {
40
+ cursor: wait;
41
+ }
42
+ ${TextButtonContentContainer} {
43
+ ${props => props.$size === Size.Large ? ComponentLStyling(ComponentTextStyle.Bold, props?.$colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.generateToken({
44
+ componentType: 'text',
45
+ isOnFill: true,
46
+ defaultVariant: 'primary'
47
+ }, props.theme)) : props.$size === Size.Small ? ComponentSStyling(ComponentTextStyle.Bold, props?.$colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.generateToken({
48
+ componentType: 'text',
49
+ isOnFill: true,
50
+ defaultVariant: 'primary'
51
+ }, props.theme)) : ComponentMStyling(ComponentTextStyle.Bold, props?.$colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.generateToken({
52
+ componentType: 'text',
53
+ isOnFill: true,
54
+ defaultVariant: 'primary'
55
+ }, props.theme))};
56
+
57
+ background-color: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({
58
+ componentType: 'bg-fill',
59
+ defaultVariant: 'primary'
60
+ }, props.theme)};
61
+ border-radius: ${props => getBorderRadius(props.$flatEdge, 8)};
62
+
63
+ width: ${props => props.$width};
64
+ position: relative;
65
+
66
+ min-height: ${props => props.$size === Size.Large ? '56px' : props.$size === Size.Small ? '32px' : '40px'};
67
+
68
+ box-sizing: border-box;
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ padding: ${props => props.$size === Size.Large ? '14px 16px' : props.$size === Size.Small ? '6px 8px' : '8px 12px'};
73
+
74
+ span.icon:not(.loading) {
75
+ pointer-events: none;
76
+ }
77
+
78
+ span.loading {
79
+ opacity: 0;
80
+ }
81
+
82
+ .icon {
83
+ margin: ${props => props.$size === Size.Medium ? props.$iconOnly ? '-2px -8px' : '' : props.$size === Size.Small ? props.$iconOnly ? '-2px -6px' : '' : ''};
84
+ width: ${props => props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px'};
85
+ height: ${props => props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px'};
86
+ svg {
87
+ width: ${props => props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px'} !important;
88
+ height: ${props => props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px'} !important;
89
+ }
90
+ }
91
+
92
+ .label {
93
+ margin: 0 4px;
94
+ }
95
+
96
+ div {
97
+ position: absolute;
98
+ width: 100%;
99
+ svg {
100
+ height: ${props => props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px'};
101
+ width: ${props => props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px'};
102
+ path {
103
+ fill: ${props => props.$colorTheme === 'dark' ? COLORS.getColor('primary', props.theme) : COLORS.generateToken({
104
+ componentType: 'icon',
105
+ isOnFill: true,
106
+ defaultVariant: 'primary'
107
+ }, props.theme)};
108
+ }
109
+ }
110
+ }
111
+ }
112
+ &:hover > ${TextButtonContentContainer},
113
+ &.hover-state > ${TextButtonContentContainer} {
114
+ background-color: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_100', props.theme) : COLORS.generateToken({
115
+ componentType: 'bg-fill',
116
+ state: 'hover',
117
+ defaultVariant: 'primary'
118
+ }, props.theme)};
119
+ color: ${props => props?.$colorTheme === 'dark' ? COLORS.getColor('primary_600', props.theme) : COLORS.generateToken({
120
+ componentType: 'text',
121
+ isOnFill: true,
122
+ defaultVariant: 'primary'
123
+ }, props.theme)};
124
+ }
125
+ &:active > ${TextButtonContentContainer},
126
+ &.active-state > ${TextButtonContentContainer} {
127
+ background-color: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_200', props.theme) : COLORS.generateToken({
128
+ componentType: 'bg-fill',
129
+ state: 'active',
130
+ defaultVariant: 'primary'
131
+ }, props.theme)};
132
+ color: ${props => props?.$colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.generateToken({
133
+ componentType: 'text',
134
+ isOnFill: true,
135
+ defaultVariant: 'primary'
136
+ }, props.theme)};
137
+ }
138
+
139
+ &:focus,
140
+ &.focus-state {
141
+ ${props => props.$invertFocus || props.$invertFocus === undefined && props.$colorTheme === 'dark' ? invertedFocusStyles : focusStyles}
142
+ }
143
+ &:disabled,
144
+ &.disabled-state {
145
+ cursor: not-allowed;
146
+ }
147
+ &:disabled > ${TextButtonContentContainer},
148
+ &.disabled-state > ${TextButtonContentContainer} {
149
+ pointer-events: none;
150
+ background-color: ${props => props.$colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.generateToken({
151
+ componentType: 'bg-fill',
152
+ state: 'disabled'
153
+ }, props.theme)};
154
+ color: ${props => props.$colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.generateToken({
155
+ componentType: 'text',
156
+ isOnFill: true,
157
+ state: 'disabled'
158
+ }, props.theme)};
159
+ }
160
+ `;
161
+ export const TextButtonSecondaryStyled = styled(TextButtonPrimaryStyled)`
162
+ ${TextButtonContentContainer} {
163
+ color: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({
164
+ componentType: 'text',
165
+ defaultVariant: 'primary'
166
+ }, props.theme)};
167
+ background-color: transparent;
168
+ div svg path {
169
+ fill: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : COLORS.generateToken({
170
+ componentType: 'icon',
171
+ defaultVariant: 'primary'
172
+ }, props.theme)};
173
+ }
174
+ box-shadow: inset 0 0 0 2px ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({
175
+ componentType: 'border',
176
+ defaultVariant: 'primary'
177
+ }, props.theme)};
178
+
179
+ padding: ${props => props.$size === Size.Large ? '12px 16px' : props.$size === Size.Small ? '4px 8px' : '6px 12px'};
180
+ }
181
+
182
+ &:hover > ${TextButtonContentContainer},
183
+ &.hover-state > ${TextButtonContentContainer} {
184
+ color: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_200', props.theme) : COLORS.generateToken({
185
+ componentType: 'text',
186
+ state: 'hover',
187
+ defaultVariant: 'primary'
188
+ }, props.theme)};
189
+ box-shadow: inset 0 0 0 2px ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_200', props.theme) : COLORS.generateToken({
190
+ componentType: 'border',
191
+ state: 'hover',
192
+ defaultVariant: 'primary'
193
+ }, props.theme)};
194
+
195
+ background-color: transparent;
196
+ div {
197
+ svg {
198
+ path {
199
+ fill: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : COLORS.generateToken({
200
+ componentType: 'text',
201
+ state: 'hover',
202
+ defaultVariant: 'primary'
203
+ }, props.theme)};
204
+ }
205
+ }
206
+ }
207
+ }
208
+ &:active > ${TextButtonContentContainer},
209
+ &.active-state > ${TextButtonContentContainer} {
210
+ color: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_300', props.theme) : COLORS.generateToken({
211
+ componentType: 'text',
212
+ state: 'active',
213
+ defaultVariant: 'primary'
214
+ }, props.theme)};
215
+ box-shadow: inset 0 0 0 2px ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_300', props.theme) : COLORS.generateToken({
216
+ componentType: 'border',
217
+ state: 'active',
218
+ defaultVariant: 'primary'
219
+ }, props.theme)};
220
+
221
+ background-color: transparent;
222
+ div {
223
+ svg {
224
+ path {
225
+ fill: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({
226
+ componentType: 'text',
227
+ state: 'hover',
228
+ defaultVariant: 'primary'
229
+ }, props.theme)};
230
+ }
231
+ }
232
+ }
233
+ }
234
+
235
+ &:disabled > ${TextButtonContentContainer},
236
+ &.disabled-state > ${TextButtonContentContainer} {
237
+ background-color: transparent;
238
+ color: ${props => props?.$colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.generateToken({
239
+ componentType: 'text',
240
+ state: 'disabled'
241
+ }, props.theme)};
242
+ box-shadow: inset 0 0 0 2px ${props => props?.$colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.generateToken({
243
+ componentType: 'border',
244
+ state: 'disabled'
245
+ }, props.theme)};
246
+ }
247
+ `;
248
+ export const TextButtonTertiaryStyled = styled(TextButtonPrimaryStyled)`
249
+ ${TextButtonContentContainer} {
250
+ color: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({
251
+ componentType: 'text',
252
+ defaultVariant: 'primary'
253
+ }, props.theme)};
254
+ background-color: transparent;
255
+
256
+ div svg path {
257
+ fill: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({
258
+ componentType: 'text',
259
+ defaultVariant: 'primary'
260
+ }, props.theme)};
261
+ }
262
+
263
+ padding: ${props => props.$size === Size.Large ? '12px 16px' : props.$size === Size.Small ? '4px 8px' : '6px 12px'};
264
+ }
265
+
266
+ &:hover > ${TextButtonContentContainer},
267
+ &.hover-state > ${TextButtonContentContainer} {
268
+ background-color: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_20', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.generateToken({
269
+ componentType: 'bg-surface',
270
+ state: 'hover'
271
+ }, props.theme)};
272
+ color: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({
273
+ componentType: 'text',
274
+ defaultVariant: 'primary'
275
+ }, props.theme)};
276
+
277
+ div {
278
+ svg {
279
+ path {
280
+ fill: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({
281
+ componentType: 'text',
282
+ defaultVariant: 'primary'
283
+ }, props.theme)};
284
+ }
285
+ }
286
+ }
287
+ }
288
+ &:active > ${TextButtonContentContainer},
289
+ &.active-state > ${TextButtonContentContainer} {
290
+ background-color: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_100', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('primary_600', props.theme) : COLORS.generateToken({
291
+ componentType: 'bg-surface',
292
+ state: 'active'
293
+ }, props.theme)};
294
+ color: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({
295
+ componentType: 'text',
296
+ defaultVariant: 'primary'
297
+ }, props.theme)};
298
+
299
+ div {
300
+ svg {
301
+ path {
302
+ fill: ${props => props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({
303
+ componentType: 'text',
304
+ defaultVariant: 'primary'
305
+ }, props.theme)};
306
+ }
307
+ }
308
+ }
309
+ }
310
+
311
+ &:disabled > ${TextButtonContentContainer},
312
+ &.disabled-state > ${TextButtonContentContainer} {
313
+ background-color: transparent !important;
314
+ color: ${props => COLORS.generateToken({
315
+ componentType: 'text',
316
+ isOnFill: true,
317
+ state: 'disabled'
318
+ }, props.theme)};
319
+ border-color: transparent !important;
320
+ }
321
+ `;
322
+ export const TextButtonPositiveStyled = styled(TextButtonPrimaryStyled)`
323
+ ${TextButtonContentContainer} {
324
+ color: white;
325
+ background-color: ${props => COLORS.getColor('positive_500', props.theme)};
326
+ }
327
+ &:hover > ${TextButtonContentContainer},
328
+ &.hover-state > ${TextButtonContentContainer} {
329
+ background-color: ${props => COLORS.getColor('positive_700', props.theme)};
330
+ }
331
+ &:active > ${TextButtonContentContainer},
332
+ &.active-state > ${TextButtonContentContainer} {
333
+ background-color: ${props => COLORS.getColor('positive_800', props.theme)};
334
+ }
335
+
336
+ &:disabled > ${TextButtonContentContainer},
337
+ &.disabled-state > ${TextButtonContentContainer} {
338
+ background-color: ${props => COLORS.getColor('neutral_100', props.theme)};
339
+ color: ${props => COLORS.getColor('neutral_300', props.theme)};
340
+ }
341
+ `;
342
+ export const TextButtonCriticalStyled = styled(TextButtonPrimaryStyled)`
343
+ ${TextButtonContentContainer} {
344
+ color: white;
345
+ background-color: ${props => COLORS.generateToken({
346
+ componentType: 'bg-fill',
347
+ defaultVariant: 'critical'
348
+ }, props.theme)};
349
+ }
350
+ &:hover > ${TextButtonContentContainer},
351
+ &.hover-state > ${TextButtonContentContainer} {
352
+ background-color: ${props => COLORS.generateToken({
353
+ componentType: 'bg-fill',
354
+ state: 'hover',
355
+ defaultVariant: 'critical'
356
+ }, props.theme)};
357
+ }
358
+ &:active > ${TextButtonContentContainer},
359
+ &.active-state > ${TextButtonContentContainer} {
360
+ background-color: ${props => COLORS.generateToken({
361
+ componentType: 'bg-fill',
362
+ state: 'active',
363
+ defaultVariant: 'critical'
364
+ }, props.theme)};
365
+ }
366
+
367
+ &:disabled > ${TextButtonContentContainer},
368
+ &.disabled-state > ${TextButtonContentContainer} {
369
+ background-color: ${props => COLORS.generateToken({
370
+ componentType: 'bg-fill',
371
+ state: 'disabled'
372
+ }, props.theme)};
373
+ color: ${props => COLORS.generateToken({
374
+ componentType: 'text',
375
+ isOnFill: true,
376
+ state: 'disabled'
377
+ }, props.theme)};
378
+ }
379
+ `;
380
+ /**
381
+ * TextButton component
382
+ */
383
+ const TextButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
384
+ let {
385
+ children = '',
386
+ variant = 'primary',
387
+ type = 'button',
388
+ size = Size.Medium,
389
+ colorTheme,
390
+ invertFocus,
391
+ width = 'auto',
392
+ testId,
393
+ disabled,
394
+ flatEdge,
395
+ icon,
396
+ iconPosition = 'left'
397
+ } = _ref,
398
+ props = _objectWithoutProperties(_ref, _excluded);
399
+ // Let's filter out properties that we don't need to render.
400
+ const {
401
+ loading
402
+ } = props,
403
+ renderProps = _objectWithoutProperties(props, _excluded2);
404
+ const theme = useTheme();
405
+ const renderIcon = () => /*#__PURE__*/_jsx(_Fragment, {
406
+ children: /*#__PURE__*/_jsx("span", {
407
+ className: (children ? 'extramargin ' : '') + (loading ? 'icon loading' : 'icon'),
408
+ children: icon
409
+ })
410
+ });
411
+ const renderContent = () => /*#__PURE__*/_jsxs(_Fragment, {
412
+ children: [icon && iconPosition == 'left' && renderIcon(), children && /*#__PURE__*/_jsx("span", {
413
+ className: loading ? 'label loading' : 'label',
414
+ children: children
415
+ }), icon && iconPosition == 'right' && renderIcon(), loading && /*#__PURE__*/_jsx(LoadingIndicator, {})]
416
+ });
417
+ let TextButtonStyled = TextButtonPrimaryStyled;
418
+ switch (variant) {
419
+ case 'secondary':
420
+ TextButtonStyled = TextButtonSecondaryStyled;
421
+ break;
422
+ case 'tertiary':
423
+ TextButtonStyled = TextButtonTertiaryStyled;
424
+ break;
425
+ case 'positive':
426
+ TextButtonStyled = TextButtonPositiveStyled;
427
+ break;
428
+ case 'critical':
429
+ TextButtonStyled = TextButtonCriticalStyled;
430
+ break;
431
+ }
432
+ return /*#__PURE__*/_jsx(TextButtonStyled, _objectSpread(_objectSpread({}, renderProps), {}, {
433
+ $size: size,
434
+ $colorTheme: colorTheme,
435
+ $invertFocus: invertFocus,
436
+ ref: ref,
437
+ disabled: disabled,
438
+ $iconOnly: !children,
439
+ type: type,
440
+ $flatEdge: flatEdge,
441
+ $width: width,
442
+ "data-testid": testId,
443
+ className: props.loading ? 'loading-state ' + props.className : ' ' + props.className,
444
+ onMouseDown: defaultOnMouseDownHandler,
445
+ children: /*#__PURE__*/_jsx(TextButtonContentContainer, {
446
+ children: renderContent()
447
+ })
448
+ }));
449
+ });
450
+ TextButton.propTypes = {
451
+ variant: _pt.oneOf(['primary', 'secondary', 'tertiary', 'positive', 'critical']),
452
+ colorTheme: _pt.oneOf(['teal', 'dark']),
453
+ invertFocus: _pt.bool,
454
+ width: _pt.oneOfType([_pt.oneOf(['auto']), _pt.string]),
455
+ loading: _pt.bool,
456
+ testId: _pt.string,
457
+ icon: _pt.node,
458
+ iconPosition: _pt.oneOf(['left', 'right'])
459
+ };
460
+ export default TextButton;
461
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","names":["React","styled","useTheme","LoadingIndicator","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","COLORS","focusStyles","invertedFocusStyles","Size","defaultOnMouseDownHandler","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","getBorderRadius","flatEdge","radius","TextButtonContentContainer","div","TextButtonBaseStyled","button","TextButtonPrimaryStyled","props","$size","Large","Bold","$colorTheme","getColor","theme","generateToken","componentType","isOnFill","defaultVariant","Small","$flatEdge","$width","Medium","$iconOnly","state","$invertFocus","undefined","TextButtonSecondaryStyled","TextButtonTertiaryStyled","TextButtonPositiveStyled","TextButtonCriticalStyled","TextButton","forwardRef","_ref","ref","children","variant","type","size","colorTheme","invertFocus","width","testId","disabled","icon","iconPosition","_objectWithoutProperties","_excluded","loading","renderProps","_excluded2","renderIcon","className","renderContent","TextButtonStyled","_objectSpread","onMouseDown","propTypes","_pt","oneOf","bool","oneOfType","string","node"],"sources":["../../src/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { css, useTheme } from 'styled-components';\r\nimport { LoadingIndicator } from '../LoadingIndicator';\r\nimport { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles';\r\nimport { COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { Size, Testable } from '../types';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\n\r\nconst getBorderRadius = (flatEdge: string | undefined, radius: number) => {\r\n switch (flatEdge) {\r\n case 'left':\r\n return `0px ${radius}px ${radius}px 0px`;\r\n\r\n case 'right':\r\n return `${radius}px 0px 0px ${radius}px`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}px`;\r\n }\r\n};\r\n\r\nexport const TextButtonContentContainer = styled.div`\r\n min-width: 64px;\r\n`;\r\n\r\nconst TextButtonBaseStyled = styled.button<{$iconOnly: boolean; $size: Size; $colorTheme: 'teal' | 'dark' | undefined; $flatEdge: string | undefined; $width: string; $invertFocus: boolean | undefined; }>``;\r\n\r\nexport const TextButtonPrimaryStyled = styled(TextButtonBaseStyled)`\r\n border: none;\r\n background-color: transparent;\r\n cursor: pointer;\r\n padding: 0;\r\n margin: 0;\r\n position: relative;\r\n box-sizing: border-box; \r\n &.loading-state {\r\n cursor: wait;\r\n }\r\n ${TextButtonContentContainer} {\r\n ${(props) =>\r\n props.$size === Size.Large\r\n ? ComponentLStyling(ComponentTextStyle.Bold, props?.$colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.generateToken({ componentType: 'text', isOnFill: true, defaultVariant: 'primary' }, props.theme))\r\n : props.$size === Size.Small\r\n ? ComponentSStyling(ComponentTextStyle.Bold, props?.$colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.generateToken({ componentType: 'text', isOnFill: true, defaultVariant: 'primary' }, props.theme))\r\n : ComponentMStyling(ComponentTextStyle.Bold, props?.$colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.generateToken({ componentType: 'text', isOnFill: true, defaultVariant: 'primary' }, props.theme))};\r\n\r\n background-color: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : \r\n COLORS.generateToken({ componentType: 'bg-fill', defaultVariant: 'primary' }, props.theme))};\r\n border-radius: ${(props) => getBorderRadius(props.$flatEdge, 8)};\r\n\r\n width: ${(props) => props.$width};\r\n position: relative;\r\n\r\n min-height: ${(props) => (props.$size === Size.Large ? '56px' : props.$size === Size.Small ? '32px' : '40px')};\r\n\r\n box-sizing: border-box;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: ${(props) => (props.$size === Size.Large ? '14px 16px' : props.$size === Size.Small ? '6px 8px' : '8px 12px')};\r\n\r\n span.icon:not(.loading) {\r\n pointer-events: none;\r\n }\r\n\r\n span.loading {\r\n opacity: 0;\r\n }\r\n\r\n .icon {\r\n margin: ${(props) => (props.$size === Size.Medium ? props.$iconOnly ? '-2px -8px' : '' : (props.$size === Size.Small ? props.$iconOnly ? '-2px -6px' : '' : '' ))};\r\n width: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')};\r\n height: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')};\r\n svg {\r\n width: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')} !important;\r\n height: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')} !important;\r\n }\r\n }\r\n\r\n .label {\r\n margin: 0 4px;\r\n }\r\n\r\n div {\r\n position: absolute;\r\n width: 100%;\r\n svg {\r\n height: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')};\r\n width: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')};\r\n path {\r\n fill: ${(props) => (props.$colorTheme === 'dark' ? COLORS.getColor('primary', props.theme) : COLORS.generateToken({ componentType: 'icon', isOnFill: true, defaultVariant: 'primary' }, props.theme))};\r\n }\r\n }\r\n }\r\n }\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n background-color: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_100', props.theme) : COLORS.generateToken({ componentType: 'bg-fill', state: 'hover', defaultVariant: 'primary' }, props.theme))};\r\n color: ${(props) => (props?.$colorTheme === 'dark' ? COLORS.getColor('primary_600', props.theme) : COLORS.generateToken({ componentType: 'text', isOnFill: true, defaultVariant: 'primary' }, props.theme))};\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n background-color: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_200', props.theme) : COLORS.generateToken({ componentType: 'bg-fill', state: 'active', defaultVariant: 'primary' }, props.theme))};\r\n color: ${(props) => (props?.$colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.generateToken({ componentType: 'text', isOnFill: true, defaultVariant: 'primary' }, props.theme))};\r\n }\r\n\r\n &:focus,\r\n &.focus-state {\r\n ${(props) => (props.$invertFocus || (props.$invertFocus === undefined && props.$colorTheme === 'dark') ? invertedFocusStyles : focusStyles)}\r\n }\r\n &:disabled,\r\n &.disabled-state {\r\n cursor: not-allowed;\r\n }\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n pointer-events: none;\r\n background-color: ${(props) => (props.$colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.generateToken({ componentType: 'bg-fill', state: 'disabled' }, props.theme))};\r\n color: ${(props) => (props.$colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.generateToken({ componentType: 'text', isOnFill: true, state: 'disabled' }, props.theme))};\r\n }\r\n`;\r\n\r\nexport const TextButtonSecondaryStyled = styled(TextButtonPrimaryStyled)`\r\n ${TextButtonContentContainer} {\r\n color: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme))};\r\n background-color: transparent;\r\n div svg path {\r\n fill: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : COLORS.generateToken({ componentType: 'icon', defaultVariant: 'primary' }, props.theme))};\r\n }\r\n box-shadow: inset 0 0 0 2px ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({ componentType: 'border', defaultVariant: 'primary' }, props.theme))};\r\n \r\n padding: ${(props) => (props.$size === Size.Large ? '12px 16px' : props.$size === Size.Small ? '4px 8px' : '6px 12px')};\r\n }\r\n\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n color: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_200', props.theme) : COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'primary' }, props.theme))};\r\n box-shadow: inset 0 0 0 2px ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_200', props.theme) : COLORS.generateToken({ componentType: 'border', state:'hover', defaultVariant: 'primary' }, props.theme))};\r\n \r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'primary' }, props.theme))};\r\n }\r\n }\r\n }\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n color: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_300', props.theme) : COLORS.generateToken({ componentType: 'text', state:'active', defaultVariant: 'primary' }, props.theme))};\r\n box-shadow: inset 0 0 0 2px ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('primary_300', props.theme) : COLORS.generateToken({ componentType: 'border', state:'active', defaultVariant: 'primary' }, props.theme))};\r\n \r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'primary' }, props.theme))};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n background-color: transparent;\r\n color: ${(props) => (props?.$colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.generateToken({ componentType: 'text', state:'disabled' }, props.theme))};\r\n box-shadow: inset 0 0 0 2px ${(props) => (props?.$colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.generateToken({ componentType: 'border', state:'disabled' }, props.theme))};\r\n }\r\n`;\r\n\r\nexport const TextButtonTertiaryStyled = styled(TextButtonPrimaryStyled)`\r\n${TextButtonContentContainer} {\r\n color: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme))};\r\n background-color: transparent;\r\n\r\n div svg path {\r\n fill: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme))};\r\n }\r\n\r\n padding: ${(props) => (props.$size === Size.Large ? '12px 16px' : props.$size === Size.Small ? '4px 8px' : '6px 12px')};\r\n }\r\n\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n background-color: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_20', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.generateToken({ componentType: 'bg-surface', state:'hover' }, props.theme))};\r\n color: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme))};\r\n\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme))};\r\n }\r\n }\r\n }\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n background-color: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_100', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('primary_600', props.theme) : COLORS.generateToken({ componentType: 'bg-surface', state: 'active' }, props.theme))};\r\n color: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme))};\r\n\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.$colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props.$colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme))};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n background-color: transparent !important;\r\n color: ${props => COLORS.generateToken({ componentType: 'text', isOnFill:true, state:'disabled' }, props.theme)};\r\n border-color: transparent !important;\r\n }\r\n`;\r\n\r\nexport const TextButtonPositiveStyled = styled(TextButtonPrimaryStyled)`\r\n ${TextButtonContentContainer} {\r\n color: white;\r\n background-color: ${props => COLORS.getColor('positive_500', props.theme)};\r\n }\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('positive_700', props.theme)};\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('positive_800', props.theme)};\r\n }\r\n\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n`;\r\n\r\nexport const TextButtonCriticalStyled = styled(TextButtonPrimaryStyled)`\r\n ${TextButtonContentContainer} {\r\n color: white;\r\n background-color: ${props => COLORS.generateToken({ componentType: 'bg-fill', defaultVariant: 'critical' }, props.theme)};\r\n }\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.generateToken({ componentType: 'bg-fill', state:'hover', defaultVariant: 'critical' }, props.theme)};\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.generateToken({ componentType: 'bg-fill', state:'active', defaultVariant: 'critical' }, props.theme)};\r\n }\r\n\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.generateToken({ componentType: 'bg-fill', state: 'disabled' }, props.theme)};\r\n color: ${props => COLORS.generateToken({ componentType: 'text', isOnFill: true, state: 'disabled' }, props.theme)}; \r\n }\r\n`;\r\n\r\nexport interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\r\n /** Look and feel variant of the component. Defaults to 'primary'. */\r\n variant?: 'primary' | 'secondary' | 'tertiary' | 'positive' | 'critical';\r\n /** Can be used in order to remove rounded corners on right or left edge of the button. Used by 'DualFunctionButton'. Defaults to 'undefined' */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** Size of the component. Small, Medium or Large. Defaults to 'medium' */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n /** Color theme altering of the component. By default there is no altering applied. */\r\n colorTheme?: 'teal' | 'dark';\r\n /** Allows using inverted colors for outlining focus rect. Shown when component focused by keyboard. */\r\n invertFocus?: boolean;\r\n /** Can be used to set custom value for width style. Value is set for 'ButtonContent' container. */\r\n width?: 'auto' | string;\r\n /** If set, then 'opacity' of children container will be set to 0, and loading indicator will be shown. */\r\n loading?: boolean;\r\n /** TestId. Will be set to the top level button component. */\r\n testId?: string;\r\n /** Icon that will be shown on the left of the children. */\r\n icon?: React.ReactNode;\r\n /** Icon position in the button. Defaults to 'left' */\r\n iconPosition?: 'left' | 'right';\r\n}\r\n\r\n/**\r\n * TextButton component\r\n */\r\nconst TextButton = React.forwardRef<HTMLButtonElement, TextButtonProps>(\r\n ({ children = '', variant = 'primary', type = 'button', size = Size.Medium, colorTheme, invertFocus, width: width = 'auto', testId, disabled, flatEdge, icon, iconPosition = 'left', ...props }, ref) => {\r\n // Let's filter out properties that we don't need to render.\r\n const { loading, ...renderProps } = props;\r\n\r\n const theme = useTheme();\r\n const renderIcon = () => (\r\n <><span className={(children ? 'extramargin ' : '') + (loading ? 'icon loading' : 'icon')}>{icon}</span></>\r\n )\r\n\r\n const renderContent = () => (\r\n <>\r\n {icon && iconPosition == 'left' && renderIcon()}\r\n {children && <span className={loading ? 'label loading' : 'label'}>{children}</span>}\r\n {icon && iconPosition == 'right' && renderIcon()}\r\n {loading && <LoadingIndicator />}\r\n </>\r\n );\r\n\r\n let TextButtonStyled = TextButtonPrimaryStyled;\r\n switch (variant) {\r\n case 'secondary':\r\n TextButtonStyled = TextButtonSecondaryStyled;\r\n break;\r\n case 'tertiary':\r\n TextButtonStyled = TextButtonTertiaryStyled;\r\n break;\r\n case 'positive':\r\n TextButtonStyled = TextButtonPositiveStyled;\r\n break;\r\n case 'critical':\r\n TextButtonStyled = TextButtonCriticalStyled;\r\n break;\r\n }\r\n\r\n return (\r\n <TextButtonStyled\r\n {...renderProps}\r\n $size={size}\r\n $colorTheme={colorTheme} \r\n $invertFocus={invertFocus} \r\n ref={ref}\r\n disabled={disabled}\r\n $iconOnly={!children}\r\n type={type}\r\n $flatEdge={flatEdge}\r\n $width={width}\r\n data-testid={testId}\r\n className={props.loading ? 'loading-state ' + props.className : ' ' + props.className}\r\n onMouseDown={defaultOnMouseDownHandler}>\r\n <TextButtonContentContainer>{renderContent()}</TextButtonContentContainer>\r\n </TextButtonStyled>\r\n );\r\n },\r\n);\r\n\r\nexport default TextButton;\r\n"],"mappings":";;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAASC,QAAQ,QAAQ,mBAAmB;AACzD,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,iBAAiB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,WAAW;AACvG,SAASC,MAAM,EAAEC,WAAW,EAAEC,mBAAmB,QAAQ,WAAW;AACpE,SAASC,IAAI,QAAkB,UAAU;AACzC,SAASC,yBAAyB,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtD,MAAMC,eAAe,GAAGA,CAACC,QAA4B,EAAEC,MAAc,KAAK;EACxE,QAAQD,QAAQ;IACd,KAAK,MAAM;MACT,OAAO,OAAOC,MAAM,MAAMA,MAAM,QAAQ;IAE1C,KAAK,OAAO;MACV,OAAO,GAAGA,MAAM,cAAcA,MAAM,IAAI;IAE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