@transferwise/components 0.0.0-experimental-c575215 → 0.0.0-experimental-20970b7
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.
- package/build/button/Button.js +6 -8
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs +7 -9
- package/build/button/Button.mjs.map +1 -1
- package/build/button/Button.resolver.js +5 -16
- package/build/button/Button.resolver.js.map +1 -1
- package/build/button/Button.resolver.mjs +5 -16
- package/build/button/Button.resolver.mjs.map +1 -1
- package/build/button/LegacyButton.js.map +1 -1
- package/build/button/LegacyButton.mjs.map +1 -1
- package/build/main.css +7 -27
- package/build/styles/button/Button.css +7 -27
- package/build/styles/button/Button.vars.css +7 -15
- package/build/styles/main.css +7 -27
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/button/Button.resolver.d.ts +4 -4
- package/build/types/button/Button.resolver.d.ts.map +1 -1
- package/build/types/button/Button.types.d.ts +8 -16
- package/build/types/button/Button.types.d.ts.map +1 -1
- package/build/types/button/LegacyButton.d.ts +1 -1
- package/package.json +3 -3
- package/src/button/Button.css +7 -27
- package/src/button/Button.less +4 -5
- package/src/button/Button.resolver.tsx +8 -15
- package/src/button/Button.spec.tsx +3 -3
- package/src/button/Button.story.tsx +90 -13
- package/src/button/Button.tsx +7 -5
- package/src/button/Button.types.ts +9 -18
- package/src/button/Button.vars.css +7 -15
- package/src/button/Button.vars.less +8 -16
- package/src/button/LegacyButton.story.tsx +1 -1
- package/src/button/LegacyButton.tsx +1 -1
- package/src/main.css +7 -27
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { fn } from '@storybook/test';
|
|
3
3
|
import Button from './Button.resolver';
|
|
4
|
-
import { Freeze, ArrowRight } from '@transferwise/icons';
|
|
4
|
+
import { Freeze, ArrowRight, ArrowLeft } from '@transferwise/icons';
|
|
5
|
+
import { ButtonApperance, ButtonPriority, ButtonType } from './Button.types';
|
|
5
6
|
|
|
6
7
|
const withContainer = (Story: any) => (
|
|
7
8
|
<div style={{ display: 'flex', flexDirection: 'initial', justifyContent: 'center' }}>
|
|
@@ -22,7 +23,7 @@ const meta: Meta<typeof Button> = {
|
|
|
22
23
|
size: {
|
|
23
24
|
type: {
|
|
24
25
|
name: 'enum',
|
|
25
|
-
value: ['
|
|
26
|
+
value: ['sm', 'md', 'lg'],
|
|
26
27
|
},
|
|
27
28
|
},
|
|
28
29
|
href: {
|
|
@@ -36,7 +37,7 @@ const meta: Meta<typeof Button> = {
|
|
|
36
37
|
value: ['primary', 'secondary', 'tertiary', 'minimal'],
|
|
37
38
|
},
|
|
38
39
|
},
|
|
39
|
-
|
|
40
|
+
appearance: {
|
|
40
41
|
type: {
|
|
41
42
|
name: 'enum',
|
|
42
43
|
value: ['default', 'negative'],
|
|
@@ -63,24 +64,24 @@ const meta: Meta<typeof Button> = {
|
|
|
63
64
|
},
|
|
64
65
|
},
|
|
65
66
|
args: {
|
|
66
|
-
|
|
67
|
+
children: 'Button text',
|
|
67
68
|
as: 'button',
|
|
68
|
-
|
|
69
|
-
priority: 'primary',
|
|
70
|
-
sentiment: 'default',
|
|
69
|
+
href: undefined,
|
|
71
70
|
disabled: false,
|
|
72
71
|
loading: false,
|
|
73
|
-
|
|
72
|
+
size: 'md',
|
|
74
73
|
iconStart: undefined,
|
|
75
74
|
iconEnd: undefined,
|
|
75
|
+
priority: 'primary',
|
|
76
|
+
appearance: 'default',
|
|
76
77
|
avatars: undefined,
|
|
78
|
+
useNewButton: true,
|
|
77
79
|
onClick: fn(),
|
|
78
80
|
onBlur: fn(),
|
|
79
81
|
onFocus: fn(),
|
|
80
82
|
onKeyDown: fn(),
|
|
81
83
|
onMouseEnter: fn(),
|
|
82
84
|
onMouseLeave: fn(),
|
|
83
|
-
children: 'Button text',
|
|
84
85
|
},
|
|
85
86
|
tags: ['autodocs'],
|
|
86
87
|
decorators: [withContainer],
|
|
@@ -141,12 +142,12 @@ export const Minimal: Story = {
|
|
|
141
142
|
|
|
142
143
|
export const Negative: Story = {
|
|
143
144
|
args: {
|
|
144
|
-
|
|
145
|
+
appearance: 'negative',
|
|
145
146
|
},
|
|
146
147
|
parameters: {
|
|
147
148
|
docs: {
|
|
148
149
|
description: {
|
|
149
|
-
story: 'A Button with negative
|
|
150
|
+
story: 'A Button with negative appearance.',
|
|
150
151
|
},
|
|
151
152
|
},
|
|
152
153
|
},
|
|
@@ -154,13 +155,13 @@ export const Negative: Story = {
|
|
|
154
155
|
|
|
155
156
|
export const NegativeSecondary: Story = {
|
|
156
157
|
args: {
|
|
157
|
-
|
|
158
|
+
appearance: 'negative',
|
|
158
159
|
priority: 'secondary',
|
|
159
160
|
},
|
|
160
161
|
parameters: {
|
|
161
162
|
docs: {
|
|
162
163
|
description: {
|
|
163
|
-
story: 'A Button with negative
|
|
164
|
+
story: 'A Button with negative appearance and secondary priority.',
|
|
164
165
|
},
|
|
165
166
|
},
|
|
166
167
|
},
|
|
@@ -312,3 +313,79 @@ export const WithAvatarAndIcon: Story = {
|
|
|
312
313
|
},
|
|
313
314
|
},
|
|
314
315
|
};
|
|
316
|
+
|
|
317
|
+
const buttonTypes = ['button', 'submit', 'reset'] as const;
|
|
318
|
+
const buttonPriorities = ['primary', 'secondary', 'tertiary', 'minimal'] as const;
|
|
319
|
+
const buttonAppearances = ['default', 'negative'] as const;
|
|
320
|
+
const buttonSizes = ['sm', 'md', 'lg'] as const;
|
|
321
|
+
|
|
322
|
+
export const AllVariants: Story = {
|
|
323
|
+
render: () => (
|
|
324
|
+
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '16px' }}>
|
|
325
|
+
{buttonTypes.map((type) =>
|
|
326
|
+
buttonPriorities.map((priority) =>
|
|
327
|
+
buttonAppearances.map((appearance) =>
|
|
328
|
+
buttonSizes.map((size) => (
|
|
329
|
+
<div
|
|
330
|
+
key={`${type}-${priority}-${appearance}-${size}`}
|
|
331
|
+
style={{ marginBottom: '16px' }}
|
|
332
|
+
>
|
|
333
|
+
<Button
|
|
334
|
+
useNewButton
|
|
335
|
+
type={type as ButtonType}
|
|
336
|
+
priority={priority as ButtonPriority}
|
|
337
|
+
appearance={appearance as ButtonApperance}
|
|
338
|
+
size={size}
|
|
339
|
+
iconStart={ArrowLeft}
|
|
340
|
+
iconEnd={ArrowRight}
|
|
341
|
+
avatars={[{ asset: <Freeze /> }]}
|
|
342
|
+
block
|
|
343
|
+
href="https://wise.com"
|
|
344
|
+
target="_blank"
|
|
345
|
+
>
|
|
346
|
+
{`${type.charAt(0).toUpperCase() + type.slice(1)} ${priority} ${appearance} ${size}`}
|
|
347
|
+
</Button>
|
|
348
|
+
<Button
|
|
349
|
+
useNewButton
|
|
350
|
+
type={type}
|
|
351
|
+
priority={priority}
|
|
352
|
+
appearance={appearance}
|
|
353
|
+
size={size}
|
|
354
|
+
iconStart={ArrowLeft}
|
|
355
|
+
iconEnd={ArrowRight}
|
|
356
|
+
avatars={[{ asset: <Freeze /> }]}
|
|
357
|
+
block
|
|
358
|
+
disabled
|
|
359
|
+
>
|
|
360
|
+
{`${type.charAt(0).toUpperCase() + type.slice(1)} ${priority} ${appearance} ${size} Disabled`}
|
|
361
|
+
</Button>
|
|
362
|
+
<Button
|
|
363
|
+
useNewButton
|
|
364
|
+
type={type}
|
|
365
|
+
priority={priority}
|
|
366
|
+
appearance={appearance}
|
|
367
|
+
size={size}
|
|
368
|
+
iconStart={ArrowLeft}
|
|
369
|
+
iconEnd={ArrowRight}
|
|
370
|
+
avatars={[{ asset: <Freeze /> }]}
|
|
371
|
+
block
|
|
372
|
+
loading
|
|
373
|
+
>
|
|
374
|
+
{`${type.charAt(0).toUpperCase() + type.slice(1)} ${priority} ${appearance} ${size} Loading`}
|
|
375
|
+
</Button>
|
|
376
|
+
</div>
|
|
377
|
+
)),
|
|
378
|
+
),
|
|
379
|
+
),
|
|
380
|
+
)}
|
|
381
|
+
</div>
|
|
382
|
+
),
|
|
383
|
+
parameters: {
|
|
384
|
+
docs: {
|
|
385
|
+
description: {
|
|
386
|
+
story:
|
|
387
|
+
'A comprehensive showcase of all possible Button variants, including combinations of type, priority, appearance, size, icons, avatars, block, loading, disabled, and href.',
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
};
|
package/src/button/Button.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
2
|
-
import { forwardRef } from 'react';
|
|
2
|
+
import { forwardRef, useMemo } from 'react';
|
|
3
3
|
import { ButtonProps as NewButtonProps } from './Button.types';
|
|
4
4
|
import { PrimitiveAnchor, PrimitiveButton } from '../primitives';
|
|
5
5
|
import AvatarLayout from '../avatarLayout';
|
|
@@ -12,11 +12,11 @@ const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, NewButtonProps>
|
|
|
12
12
|
as = 'button',
|
|
13
13
|
children,
|
|
14
14
|
className,
|
|
15
|
-
size = '
|
|
15
|
+
size = 'md',
|
|
16
16
|
href,
|
|
17
17
|
disabled = false,
|
|
18
18
|
priority = 'primary',
|
|
19
|
-
|
|
19
|
+
appearance = 'default',
|
|
20
20
|
iconStart: IconStart,
|
|
21
21
|
iconEnd: IconEnd,
|
|
22
22
|
avatars,
|
|
@@ -27,7 +27,9 @@ const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, NewButtonProps>
|
|
|
27
27
|
},
|
|
28
28
|
ref,
|
|
29
29
|
) => {
|
|
30
|
-
const sizeClass =
|
|
30
|
+
const sizeClass = useMemo(() => {
|
|
31
|
+
return size === 'sm' ? 'small' : size === 'md' ? 'medium' : size === 'lg' ? 'large' : '';
|
|
32
|
+
}, [size]);
|
|
31
33
|
|
|
32
34
|
const classNames = clsx(
|
|
33
35
|
'wds-Button',
|
|
@@ -38,7 +40,7 @@ const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, NewButtonProps>
|
|
|
38
40
|
[`wds-Button--loading`]: loading,
|
|
39
41
|
[`wds-Button--${sizeClass}`]: size,
|
|
40
42
|
[`wds-Button--${priority}`]: priority,
|
|
41
|
-
[`wds-Button--${
|
|
43
|
+
[`wds-Button--${appearance}`]: appearance,
|
|
42
44
|
},
|
|
43
45
|
className,
|
|
44
46
|
);
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
} from '../primitives';
|
|
8
8
|
import type { SingleAvatarType } from '../avatarLayout';
|
|
9
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type ButtonApperance = 'default' | 'negative';
|
|
11
11
|
export type ButtonPriority = 'primary' | 'secondary' | 'tertiary' | 'minimal';
|
|
12
12
|
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
13
13
|
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
@@ -17,18 +17,15 @@ export type ButtonRefType = PrimitiveButtonElementRef | PrimitiveAnchorElementRe
|
|
|
17
17
|
* Common properties for the Button component.
|
|
18
18
|
*/
|
|
19
19
|
export interface CommonButtonProps {
|
|
20
|
-
/**
|
|
21
|
-
* If set, toggles the new Button API
|
|
22
|
-
* @default false
|
|
23
|
-
* */
|
|
24
|
-
v2?: boolean;
|
|
25
|
-
|
|
26
20
|
/** The HTML element to render */
|
|
27
21
|
as?: 'button' | 'a' | null;
|
|
28
22
|
|
|
29
23
|
/** Additional class name(s) to apply to the button */
|
|
30
24
|
className?: string;
|
|
31
25
|
|
|
26
|
+
/** Content to be displayed inside the button */
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
|
|
32
29
|
/** Whether the button is disabled */
|
|
33
30
|
disabled?: boolean;
|
|
34
31
|
|
|
@@ -40,23 +37,20 @@ export interface CommonButtonProps {
|
|
|
40
37
|
/** Whether the button should take up the full width of its container */
|
|
41
38
|
block?: boolean;
|
|
42
39
|
|
|
43
|
-
/**
|
|
44
|
-
* Size of the button
|
|
45
|
-
* @default lg
|
|
46
|
-
* */
|
|
40
|
+
/** Size of the button */
|
|
47
41
|
size?: ButtonSize;
|
|
48
42
|
|
|
49
43
|
/**
|
|
50
44
|
* Priority of the button
|
|
51
|
-
* @default
|
|
45
|
+
* @default 'primary'
|
|
52
46
|
*/
|
|
53
47
|
priority?: ButtonPriority;
|
|
54
48
|
|
|
55
49
|
/**
|
|
56
|
-
*
|
|
57
|
-
* @default default
|
|
50
|
+
* Appearance of the button
|
|
51
|
+
* @default 'default'
|
|
58
52
|
*/
|
|
59
|
-
|
|
53
|
+
appearance?: ButtonApperance;
|
|
60
54
|
|
|
61
55
|
/** Icon to be displayed on the left side of the button */
|
|
62
56
|
iconStart?: React.ElementType;
|
|
@@ -69,9 +63,6 @@ export interface CommonButtonProps {
|
|
|
69
63
|
|
|
70
64
|
/** Optional property to provide component Ref */
|
|
71
65
|
ref?: ButtonRefType;
|
|
72
|
-
|
|
73
|
-
/** Content to be displayed inside the button */
|
|
74
|
-
children?: ReactNode;
|
|
75
66
|
}
|
|
76
67
|
|
|
77
68
|
export type ButtonElementProps = PrimitiveButtonProps & CommonButtonProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
.wds-Button {
|
|
2
2
|
--Button-background: var(--color-interactive-accent);
|
|
3
3
|
--Button-background-hover: var(--color-interactive-accent-hover);
|
|
4
4
|
--Button-background-active: var(--color-interactive-accent-active);
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
--Button-size-medium-padding: var(--size-8) var(--size-12);
|
|
14
14
|
--Button-size-large-padding: var(--size-12) var(--size-16);
|
|
15
15
|
--Button-avatar-border-color: var(--color-border-neutral);
|
|
16
|
-
--Button-transition-duration: 150ms;
|
|
17
|
-
--Button-transition-easing: ease-in-out;
|
|
18
16
|
--Button-secondary-background: var(--color-interactive-neutral);
|
|
19
17
|
--Button-secondary-background-hover: var(--color-interactive-neutral-hover);
|
|
20
18
|
--Button-secondary-background-active: var(--color-interactive-neutral-active);
|
|
@@ -31,29 +29,23 @@
|
|
|
31
29
|
--Button-primary-negative-background-hover: var(--color-sentiment-negative-primary-hover);
|
|
32
30
|
--Button-primary-negative-background-active: var(--color-sentiment-negative-primary-active);
|
|
33
31
|
--Button-primary-negative-color: var(--color-contrast);
|
|
34
|
-
--Button-primary-
|
|
32
|
+
--Button-primary-negative-avatar-border-color: rgba(255,255,255,0.2);
|
|
35
33
|
--Button-secondary-negative-background: var(--color-sentiment-negative-secondary);
|
|
36
34
|
--Button-secondary-negative-background-hover: var(--color-sentiment-negative-secondary-hover);
|
|
37
35
|
--Button-secondary-negative-background-active: var(--color-sentiment-negative-secondary-active);
|
|
38
36
|
--Button-secondary-negative-color: var(--color-sentiment-negative-primary);
|
|
39
|
-
--Button-secondary-
|
|
37
|
+
--Button-secondary-negative-avatar-border-color: rgba(168,32,13,0.12157);
|
|
40
38
|
}
|
|
41
39
|
.np-theme-personal--dark .wds-Button {
|
|
42
|
-
--Button-primary-
|
|
40
|
+
--Button-primary-negative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
43
41
|
}
|
|
44
42
|
.np-theme-personal--forest-green .wds-Button {
|
|
45
|
-
--
|
|
46
|
-
--
|
|
47
|
-
--color-interactive-neutral-active: rgba(236,255,224,0.2);
|
|
48
|
-
--color-sentiment-negative-secondary: rgba(255,196,194,0.2);
|
|
49
|
-
--color-sentiment-negative-secondary-hover: rgba(255,220,219,0.2);
|
|
50
|
-
--color-sentiment-negative-secondary-active: rgba(255,235,235,0.2);
|
|
51
|
-
--Button-primary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
52
|
-
--Button-secondary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
43
|
+
--Button-primary-negative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
44
|
+
--Button-secondary-negative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
53
45
|
}
|
|
54
46
|
.np-theme-personal--bright-green .wds-Button {
|
|
55
47
|
--color-contrast: #FFFFFF;
|
|
56
48
|
--Button-secondary-color: var(--color-interactive-control);
|
|
57
49
|
--Button-secondary-negative-color: var(--color-contrast);
|
|
58
|
-
--Button-secondary-
|
|
50
|
+
--Button-secondary-negative-avatar-border-color: var(--Button-primary-negative-avatar-border-color);
|
|
59
51
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
.wds-Button {
|
|
2
2
|
--Button-background: var(--color-interactive-accent);
|
|
3
3
|
--Button-background-hover: var(--color-interactive-accent-hover);
|
|
4
4
|
--Button-background-active: var(--color-interactive-accent-active);
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
--Button-size-medium-padding: var(--size-8) var(--size-12);
|
|
14
14
|
--Button-size-large-padding: var(--size-12) var(--size-16);
|
|
15
15
|
--Button-avatar-border-color: var(--color-border-neutral);
|
|
16
|
-
--Button-transition-duration: 150ms;
|
|
17
|
-
--Button-transition-easing: ease-in-out;
|
|
18
16
|
|
|
19
17
|
--Button-secondary-background: var(--color-interactive-neutral);
|
|
20
18
|
--Button-secondary-background-hover: var(--color-interactive-neutral-hover);
|
|
@@ -35,31 +33,25 @@
|
|
|
35
33
|
--Button-primary-negative-background-hover: var(--color-sentiment-negative-primary-hover);
|
|
36
34
|
--Button-primary-negative-background-active: var(--color-sentiment-negative-primary-active);
|
|
37
35
|
--Button-primary-negative-color: var(--color-contrast);
|
|
38
|
-
--Button-primary-
|
|
36
|
+
--Button-primary-negative-avatar-border-color: #FFFFFF33;
|
|
39
37
|
|
|
40
38
|
--Button-secondary-negative-background: var(--color-sentiment-negative-secondary);
|
|
41
39
|
--Button-secondary-negative-background-hover: var(--color-sentiment-negative-secondary-hover);
|
|
42
40
|
--Button-secondary-negative-background-active: var(--color-sentiment-negative-secondary-active);
|
|
43
41
|
--Button-secondary-negative-color: var(--color-sentiment-negative-primary);
|
|
44
|
-
--Button-secondary-
|
|
42
|
+
--Button-secondary-negative-avatar-border-color: #A8200D1F;
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
.np-theme-personal--dark {
|
|
48
46
|
.wds-Button {
|
|
49
|
-
--Button-primary-
|
|
47
|
+
--Button-primary-negative-avatar-border-color: #0E0F0C1F;
|
|
50
48
|
}
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
.np-theme-personal--forest-green {
|
|
54
52
|
.wds-Button {
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--color-interactive-neutral-active: #ECFFE033;
|
|
58
|
-
--color-sentiment-negative-secondary: #FFC4C233;
|
|
59
|
-
--color-sentiment-negative-secondary-hover: #FFDCDB33;
|
|
60
|
-
--color-sentiment-negative-secondary-active: #FFEBEB33;
|
|
61
|
-
--Button-primary-netative-avatar-border-color: #0E0F0C1F;
|
|
62
|
-
--Button-secondary-netative-avatar-border-color: #0E0F0C1F;
|
|
53
|
+
--Button-primary-negative-avatar-border-color: #0E0F0C1F;
|
|
54
|
+
--Button-secondary-negative-avatar-border-color: #0E0F0C1F;
|
|
63
55
|
}
|
|
64
56
|
}
|
|
65
57
|
|
|
@@ -68,6 +60,6 @@
|
|
|
68
60
|
--color-contrast: #FFFFFF;
|
|
69
61
|
--Button-secondary-color: var(--color-interactive-control);
|
|
70
62
|
--Button-secondary-negative-color: var(--color-contrast);
|
|
71
|
-
--Button-secondary-
|
|
63
|
+
--Button-secondary-negative-avatar-border-color: var(--Button-primary-negative-avatar-border-color);
|
|
72
64
|
}
|
|
73
|
-
}
|
|
65
|
+
}
|
|
@@ -56,7 +56,7 @@ export type LegacyButtonProps = ButtonProps | AnchorProps;
|
|
|
56
56
|
export type ButtonReferenceType = HTMLButtonElement | HTMLAnchorElement;
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* @deprecated make sure you use new Button component via `<Button
|
|
59
|
+
* @deprecated make sure you use new Button component via `<Button useNewButton .. />` and new props
|
|
60
60
|
*/
|
|
61
61
|
const LegacyButton = forwardRef<ButtonReferenceType, LegacyButtonProps>(
|
|
62
62
|
(
|
package/src/main.css
CHANGED
|
@@ -716,7 +716,7 @@ div.critical-comms .critical-comms-body {
|
|
|
716
716
|
.np-btn.disabled[class] {
|
|
717
717
|
pointer-events: auto;
|
|
718
718
|
}
|
|
719
|
-
|
|
719
|
+
.wds-Button {
|
|
720
720
|
--Button-background: var(--color-interactive-accent);
|
|
721
721
|
--Button-background-hover: var(--color-interactive-accent-hover);
|
|
722
722
|
--Button-background-active: var(--color-interactive-accent-active);
|
|
@@ -731,8 +731,6 @@ div.critical-comms .critical-comms-body {
|
|
|
731
731
|
--Button-size-medium-padding: var(--size-8) var(--size-12);
|
|
732
732
|
--Button-size-large-padding: var(--size-12) var(--size-16);
|
|
733
733
|
--Button-avatar-border-color: var(--color-border-neutral);
|
|
734
|
-
--Button-transition-duration: 150ms;
|
|
735
|
-
--Button-transition-easing: ease-in-out;
|
|
736
734
|
--Button-secondary-background: var(--color-interactive-neutral);
|
|
737
735
|
--Button-secondary-background-hover: var(--color-interactive-neutral-hover);
|
|
738
736
|
--Button-secondary-background-active: var(--color-interactive-neutral-active);
|
|
@@ -749,31 +747,25 @@ div.critical-comms .critical-comms-body {
|
|
|
749
747
|
--Button-primary-negative-background-hover: var(--color-sentiment-negative-primary-hover);
|
|
750
748
|
--Button-primary-negative-background-active: var(--color-sentiment-negative-primary-active);
|
|
751
749
|
--Button-primary-negative-color: var(--color-contrast);
|
|
752
|
-
--Button-primary-
|
|
750
|
+
--Button-primary-negative-avatar-border-color: rgba(255,255,255,0.2);
|
|
753
751
|
--Button-secondary-negative-background: var(--color-sentiment-negative-secondary);
|
|
754
752
|
--Button-secondary-negative-background-hover: var(--color-sentiment-negative-secondary-hover);
|
|
755
753
|
--Button-secondary-negative-background-active: var(--color-sentiment-negative-secondary-active);
|
|
756
754
|
--Button-secondary-negative-color: var(--color-sentiment-negative-primary);
|
|
757
|
-
--Button-secondary-
|
|
755
|
+
--Button-secondary-negative-avatar-border-color: rgba(168,32,13,0.12157);
|
|
758
756
|
}
|
|
759
757
|
.np-theme-personal--dark .wds-Button {
|
|
760
|
-
--Button-primary-
|
|
758
|
+
--Button-primary-negative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
761
759
|
}
|
|
762
760
|
.np-theme-personal--forest-green .wds-Button {
|
|
763
|
-
--
|
|
764
|
-
--
|
|
765
|
-
--color-interactive-neutral-active: rgba(236,255,224,0.2);
|
|
766
|
-
--color-sentiment-negative-secondary: rgba(255,196,194,0.2);
|
|
767
|
-
--color-sentiment-negative-secondary-hover: rgba(255,220,219,0.2);
|
|
768
|
-
--color-sentiment-negative-secondary-active: rgba(255,235,235,0.2);
|
|
769
|
-
--Button-primary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
770
|
-
--Button-secondary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
761
|
+
--Button-primary-negative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
762
|
+
--Button-secondary-negative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
771
763
|
}
|
|
772
764
|
.np-theme-personal--bright-green .wds-Button {
|
|
773
765
|
--color-contrast: #FFFFFF;
|
|
774
766
|
--Button-secondary-color: var(--color-interactive-control);
|
|
775
767
|
--Button-secondary-negative-color: var(--color-contrast);
|
|
776
|
-
--Button-secondary-
|
|
768
|
+
--Button-secondary-negative-avatar-border-color: var(--Button-primary-negative-avatar-border-color);
|
|
777
769
|
}
|
|
778
770
|
/* Button Styles */
|
|
779
771
|
.wds-Button {
|
|
@@ -783,13 +775,9 @@ div.critical-comms .critical-comms-body {
|
|
|
783
775
|
align-items: center;
|
|
784
776
|
justify-content: center;
|
|
785
777
|
vertical-align: middle;
|
|
786
|
-
font-weight: 600;
|
|
787
778
|
font-weight: var(--Button-font-weight);
|
|
788
|
-
font-size: 1rem;
|
|
789
779
|
font-size: var(--Button-font-size);
|
|
790
|
-
letter-spacing: -0.011em;
|
|
791
780
|
letter-spacing: var(--Button-letter-spacing);
|
|
792
|
-
line-height: 24px;
|
|
793
781
|
line-height: var(--Button-line-height);
|
|
794
782
|
text-align: center;
|
|
795
783
|
-webkit-text-decoration: none;
|
|
@@ -799,30 +787,23 @@ div.critical-comms .critical-comms-body {
|
|
|
799
787
|
-webkit-appearance: none;
|
|
800
788
|
-moz-appearance: none;
|
|
801
789
|
appearance: none;
|
|
802
|
-
background-color: #00a2dd;
|
|
803
790
|
background-color: var(--Button-background);
|
|
804
791
|
border: none;
|
|
805
|
-
border-radius: 9999px;
|
|
806
792
|
border-radius: var(--Button-border-radius);
|
|
807
793
|
color: var(--Button-color);
|
|
808
794
|
cursor: pointer;
|
|
809
|
-
padding: 8px 12px;
|
|
810
795
|
padding: var(--Button-padding);
|
|
811
|
-
transition: color, background-color 150ms ease-in-out;
|
|
812
|
-
transition: color, background-color var(--Button-transition-duration) var(--Button-transition-easing);
|
|
813
796
|
}
|
|
814
797
|
.wds-Button:focus {
|
|
815
798
|
-webkit-text-decoration: none;
|
|
816
799
|
text-decoration: none;
|
|
817
800
|
}
|
|
818
801
|
.wds-Button:hover {
|
|
819
|
-
background-color: #008fc9;
|
|
820
802
|
background-color: var(--Button-background-hover);
|
|
821
803
|
-webkit-text-decoration: none;
|
|
822
804
|
text-decoration: none;
|
|
823
805
|
}
|
|
824
806
|
.wds-Button:active {
|
|
825
|
-
background-color: #0081ba;
|
|
826
807
|
background-color: var(--Button-background-active);
|
|
827
808
|
-webkit-text-decoration: none;
|
|
828
809
|
text-decoration: none;
|
|
@@ -837,7 +818,6 @@ div.critical-comms .critical-comms-body {
|
|
|
837
818
|
.wds-Button:disabled:hover,
|
|
838
819
|
.wds-Button.wds-Button--disabled:active,
|
|
839
820
|
.wds-Button:disabled:active {
|
|
840
|
-
background-color: #00a2dd;
|
|
841
821
|
background-color: var(--Button-background);
|
|
842
822
|
}
|
|
843
823
|
.wds-Button--secondary {
|