@transferwise/components 0.0.0-experimental-a656242 → 0.0.0-experimental-887f2e6
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/avatarLayout/AvatarLayout.js +9 -2
- package/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.mjs +9 -2
- package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
- package/build/avatarView/AvatarView.js +1 -12
- package/build/avatarView/AvatarView.js.map +1 -1
- package/build/avatarView/AvatarView.mjs +1 -12
- package/build/avatarView/AvatarView.mjs.map +1 -1
- package/build/button/Button.js +78 -79
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs +79 -80
- package/build/button/Button.mjs.map +1 -1
- package/build/button/Button.resolver.js +78 -0
- package/build/button/Button.resolver.js.map +1 -0
- package/build/button/Button.resolver.mjs +76 -0
- package/build/button/Button.resolver.mjs.map +1 -0
- package/build/button/LegacyButton.js +114 -0
- package/build/button/LegacyButton.js.map +1 -0
- package/build/button/LegacyButton.mjs +112 -0
- package/build/button/LegacyButton.mjs.map +1 -0
- package/build/circularButton/CircularButton.js +21 -18
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +22 -19
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +2 -2
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +1 -1
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/definitionList/DefinitionList.mjs.map +1 -1
- package/build/header/Header.js +2 -2
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +1 -1
- package/build/i18n/de.json +0 -1
- package/build/i18n/de.json.js +0 -1
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +0 -1
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/i18n/it.json +0 -1
- package/build/i18n/it.json.js +0 -1
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +0 -1
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/th.json +0 -1
- package/build/i18n/th.json.js +0 -1
- package/build/i18n/th.json.js.map +1 -1
- package/build/i18n/th.json.mjs +0 -1
- package/build/i18n/th.json.mjs.map +1 -1
- package/build/index.js +2 -2
- package/build/index.mjs +1 -1
- package/build/link/Link.js +8 -3
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.mjs +8 -3
- package/build/link/Link.mjs.map +1 -1
- package/build/main.css +416 -17
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js +1 -3
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js.map +1 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs +1 -3
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs.map +1 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js +1 -4
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js.map +1 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs +1 -4
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs.map +1 -1
- package/build/select/Select.js +5 -3
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +4 -2
- package/build/select/Select.mjs.map +1 -1
- package/build/styles/avatarLayout/AvatarLayout.css +11 -0
- package/build/styles/button/Button.css +240 -16
- package/build/styles/button/Button.vars.css +55 -0
- package/build/styles/button/LegacyButton.css +23 -0
- package/build/styles/circularButton/CircularButton.css +158 -17
- package/build/styles/main.css +416 -17
- package/build/types/avatarLayout/AvatarLayout.d.ts +1 -2
- package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
- package/build/types/avatarLayout/index.d.ts +1 -0
- package/build/types/avatarLayout/index.d.ts.map +1 -1
- package/build/types/avatarView/AvatarView.d.ts.map +1 -1
- package/build/types/button/Button.d.ts +1 -23
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/button/Button.resolver.d.ts +31 -0
- package/build/types/button/Button.resolver.d.ts.map +1 -0
- package/build/types/button/Button.types.d.ts +67 -0
- package/build/types/button/Button.types.d.ts.map +1 -0
- package/build/types/button/LegacyButton.d.ts +30 -0
- package/build/types/button/LegacyButton.d.ts.map +1 -0
- package/build/types/button/index.d.ts +2 -2
- package/build/types/button/index.d.ts.map +1 -1
- package/build/types/circularButton/CircularButton.d.ts +4 -11
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/definitionList/DefinitionList.d.ts +2 -1
- package/build/types/definitionList/DefinitionList.d.ts.map +1 -1
- package/build/types/link/Link.d.ts +2 -2
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.d.ts +1 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveButton/src/PrimitiveButton.d.ts.map +1 -1
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/upload/steps/completeStep/completeStep.js +2 -2
- package/build/upload/steps/completeStep/completeStep.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs +1 -1
- package/build/upload/steps/processingStep/processingStep.js +2 -2
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +1 -1
- package/build/uploadInput/UploadInput.js +3 -3
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +1 -1
- package/package.json +3 -3
- package/src/avatarLayout/AvatarLayout.css +11 -0
- package/src/avatarLayout/AvatarLayout.less +18 -1
- package/src/avatarLayout/AvatarLayout.tsx +11 -3
- package/src/avatarLayout/index.ts +1 -0
- package/src/avatarView/AvatarView.tsx +1 -15
- package/src/button/Button.css +240 -16
- package/src/button/Button.less +208 -14
- package/src/button/Button.resolver.tsx +120 -0
- package/src/button/Button.spec.tsx +54 -231
- package/src/button/Button.story.tsx +610 -137
- package/src/button/Button.tsx +88 -132
- package/src/button/Button.types.ts +88 -0
- package/src/button/Button.vars.css +55 -0
- package/src/button/Button.vars.less +69 -0
- package/src/button/LegacyButton.css +23 -0
- package/src/button/LegacyButton.less +24 -0
- package/src/button/LegacyButton.spec.tsx +146 -0
- package/src/button/LegacyButton.story.tsx +224 -0
- package/src/button/LegacyButton.tsx +161 -0
- package/src/button/index.ts +2 -3
- package/src/circularButton/CircularButton.css +158 -17
- package/src/circularButton/CircularButton.less +91 -22
- package/src/circularButton/CircularButton.story.tsx +24 -45
- package/src/circularButton/CircularButton.tsx +25 -38
- package/src/circularButton/_button-label-states.less +34 -0
- package/src/definitionList/DefinitionList.spec.js +91 -0
- package/src/definitionList/DefinitionList.story.tsx +57 -57
- package/src/definitionList/DefinitionList.tsx +1 -1
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +1 -1
- package/src/i18n/de.json +0 -1
- package/src/i18n/it.json +0 -1
- package/src/i18n/th.json +0 -1
- package/src/iconButton/IconButton.story.tsx +6 -6
- package/src/inputs/SelectInput.story.tsx +1 -1
- package/src/link/Link.tsx +15 -6
- package/src/main.css +416 -17
- package/src/main.less +1 -0
- package/src/primitives/PrimitiveAnchor/src/PrimitiveAnchor.tsx +1 -7
- package/src/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.ts +1 -1
- package/src/primitives/PrimitiveAnchor/test/PrimitiveAnchor.spec.tsx +1 -3
- package/src/primitives/PrimitiveButton/src/PrimitiveButton.tsx +1 -8
- package/src/primitives/PrimitiveButton/test/PrimitiveButton.spec.tsx +2 -5
- package/src/select/Select.tsx +1 -0
- package/src/slidingPanel/SlidingPanel.spec.js +56 -0
- package/src/button/__snapshots__/Button.spec.tsx.snap +0 -309
- package/src/slidingPanel/SlidingPanel.spec.tsx +0 -69
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable react/jsx-key */
|
|
2
2
|
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import { ArrowLeft
|
|
3
|
+
import { ArrowLeft } from '@transferwise/icons';
|
|
4
4
|
import IconButton, { Props } from './IconButton';
|
|
5
5
|
import { action } from '@storybook/addon-actions';
|
|
6
6
|
import Body from '../body';
|
|
@@ -24,7 +24,7 @@ const Template = ({ size, disabled }: Props) => {
|
|
|
24
24
|
type="default"
|
|
25
25
|
onClick={action('button click')}
|
|
26
26
|
>
|
|
27
|
-
<
|
|
27
|
+
<ArrowLeft />
|
|
28
28
|
</IconButton>
|
|
29
29
|
<IconButton
|
|
30
30
|
size={size}
|
|
@@ -34,7 +34,7 @@ const Template = ({ size, disabled }: Props) => {
|
|
|
34
34
|
type="default"
|
|
35
35
|
onClick={action('button click')}
|
|
36
36
|
>
|
|
37
|
-
<
|
|
37
|
+
<ArrowLeft />
|
|
38
38
|
</IconButton>
|
|
39
39
|
<IconButton
|
|
40
40
|
size={size}
|
|
@@ -54,7 +54,7 @@ const Template = ({ size, disabled }: Props) => {
|
|
|
54
54
|
type="default"
|
|
55
55
|
onClick={action('button click')}
|
|
56
56
|
>
|
|
57
|
-
<
|
|
57
|
+
<ArrowLeft />
|
|
58
58
|
</IconButton>
|
|
59
59
|
<IconButton
|
|
60
60
|
size={size}
|
|
@@ -64,7 +64,7 @@ const Template = ({ size, disabled }: Props) => {
|
|
|
64
64
|
type="negative"
|
|
65
65
|
onClick={action('button click')}
|
|
66
66
|
>
|
|
67
|
-
<
|
|
67
|
+
<ArrowLeft />
|
|
68
68
|
</IconButton>
|
|
69
69
|
<IconButton
|
|
70
70
|
size={size}
|
|
@@ -74,7 +74,7 @@ const Template = ({ size, disabled }: Props) => {
|
|
|
74
74
|
type="negative"
|
|
75
75
|
onClick={action('button click')}
|
|
76
76
|
>
|
|
77
|
-
<
|
|
77
|
+
<ArrowLeft />
|
|
78
78
|
</IconButton>
|
|
79
79
|
</>
|
|
80
80
|
);
|
|
@@ -5,7 +5,7 @@ import { Flag } from '@wise/art';
|
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import Button from '../button
|
|
8
|
+
import Button from '../button';
|
|
9
9
|
import { getMonthNames } from '../common/dateUtils';
|
|
10
10
|
import Drawer from '../drawer';
|
|
11
11
|
import { Field } from '../field/Field';
|
package/src/link/Link.tsx
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { NavigateAway as NavigateAwayIcon } from '@transferwise/icons';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
-
import { AnchorHTMLAttributes } from 'react';
|
|
4
3
|
import { useIntl } from 'react-intl';
|
|
4
|
+
import { PrimitiveAnchor } from '../primitives';
|
|
5
|
+
import type { PrimitiveAnchorProps } from '../primitives';
|
|
5
6
|
|
|
6
7
|
import { LinkLarge, LinkDefault } from '../common';
|
|
7
8
|
|
|
8
9
|
import messages from './Link.messages';
|
|
9
10
|
|
|
10
|
-
export type Props =
|
|
11
|
+
export type Props = PrimitiveAnchorProps & { type?: LinkLarge | LinkDefault };
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Standard Link component with navigate away icon
|
|
@@ -24,22 +25,30 @@ const Link = ({
|
|
|
24
25
|
onClick,
|
|
25
26
|
...props
|
|
26
27
|
}: Props) => {
|
|
28
|
+
const { formatMessage } = useIntl();
|
|
27
29
|
const isBlank = target === '_blank';
|
|
28
30
|
|
|
29
|
-
const
|
|
31
|
+
const classNames = clsx(
|
|
32
|
+
'np-link',
|
|
33
|
+
'd-inline-flex',
|
|
34
|
+
{
|
|
35
|
+
[`np-text-${type}`]: type,
|
|
36
|
+
},
|
|
37
|
+
className,
|
|
38
|
+
);
|
|
30
39
|
|
|
31
40
|
return (
|
|
32
|
-
<
|
|
41
|
+
<PrimitiveAnchor
|
|
33
42
|
href={href}
|
|
34
43
|
target={target}
|
|
35
|
-
className={
|
|
44
|
+
className={classNames}
|
|
36
45
|
aria-label={ariaLabel}
|
|
37
46
|
rel={isBlank ? 'noreferrer' : undefined}
|
|
38
47
|
onClick={onClick}
|
|
39
48
|
{...props}
|
|
40
49
|
>
|
|
41
50
|
{children} {isBlank && <NavigateAwayIcon title={formatMessage(messages.opensInNewTab)} />}
|
|
42
|
-
</
|
|
51
|
+
</PrimitiveAnchor>
|
|
43
52
|
);
|
|
44
53
|
};
|
|
45
54
|
|
package/src/main.css
CHANGED
|
@@ -518,10 +518,18 @@ div.critical-comms .critical-comms-body {
|
|
|
518
518
|
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) right calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
519
519
|
mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) right calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
520
520
|
}
|
|
521
|
+
[dir="rtl"] .np-avatar-layout-diagonal-mask {
|
|
522
|
+
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) left calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
523
|
+
mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) left calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
524
|
+
}
|
|
521
525
|
.np-avatar-layout-diagonal-child {
|
|
522
526
|
margin-left: calc(var(--np-avatar-layout-size) - var(--np-avatar-size) * 2);
|
|
523
527
|
margin-top: calc(var(--np-avatar-layout-size) - var(--np-avatar-size));
|
|
524
528
|
}
|
|
529
|
+
[dir="rtl"] .np-avatar-layout-diagonal-child {
|
|
530
|
+
margin-left: 0;
|
|
531
|
+
margin-right: calc(var(--np-avatar-layout-size) - var(--np-avatar-size) * 2);
|
|
532
|
+
}
|
|
525
533
|
.np-avatar-layout-horizontal {
|
|
526
534
|
width: calc(var(--np-avatar-size) * 2 - var(--np-avatar-offset) - 2px);
|
|
527
535
|
height: var(--np-avatar-layout-size);
|
|
@@ -535,6 +543,9 @@ div.critical-comms .critical-comms-body {
|
|
|
535
543
|
.np-avatar-layout-horizontal-child {
|
|
536
544
|
margin-left: calc(var(--np-avatar-offset) * -1);
|
|
537
545
|
}
|
|
546
|
+
[dir="rtl"] .np-avatar-layout-horizontal-child {
|
|
547
|
+
margin-right: calc(var(--np-avatar-offset) * -1);
|
|
548
|
+
}
|
|
538
549
|
.np-icon-button {
|
|
539
550
|
border: none;
|
|
540
551
|
}
|
|
@@ -705,6 +716,253 @@ div.critical-comms .critical-comms-body {
|
|
|
705
716
|
.np-btn.disabled[class] {
|
|
706
717
|
pointer-events: auto;
|
|
707
718
|
}
|
|
719
|
+
:root {
|
|
720
|
+
--Button-background: var(--color-interactive-accent);
|
|
721
|
+
--Button-background-hover: var(--color-interactive-accent-hover);
|
|
722
|
+
--Button-background-active: var(--color-interactive-accent-active);
|
|
723
|
+
--Button-color: var(--color-interactive-control);
|
|
724
|
+
--Button-padding: var(--size-8) var(--size-12);
|
|
725
|
+
--Button-border-radius: var(--radius-full);
|
|
726
|
+
--Button-size-small-padding: 5px var(--size-12);
|
|
727
|
+
--Button-size-medium-padding: var(--size-8) var(--size-12);
|
|
728
|
+
--Button-size-large-padding: var(--size-12) var(--size-16);
|
|
729
|
+
--Button-avatar-border-color: var(--color-border-neutral);
|
|
730
|
+
--Button-transition-duration: 150ms;
|
|
731
|
+
--Button-transition-easing: ease-in-out;
|
|
732
|
+
--Button-secondary-background: var(--color-interactive-neutral);
|
|
733
|
+
--Button-secondary-background-hover: var(--color-interactive-neutral-hover);
|
|
734
|
+
--Button-secondary-background-active: var(--color-interactive-neutral-active);
|
|
735
|
+
--Button-secondary-color: var(--color-interactive-primary);
|
|
736
|
+
--Button-tertiary-background: var(--color-background-neutral);
|
|
737
|
+
--Button-tertiary-background-hover: var(--color-background-neutral-hover);
|
|
738
|
+
--Button-tertiary-background-active: var(--color-background-neutral-active);
|
|
739
|
+
--Button-tertiary-color: var(--color-content-primary);
|
|
740
|
+
--Button-minimal-background: transparent;
|
|
741
|
+
--Button-minimal-background-hover: var(--color-background-screen-hover);
|
|
742
|
+
--Button-minimal-background-active: var(--color-background-screen-active);
|
|
743
|
+
--Button-minimal-color: var(--color-interactive-primary);
|
|
744
|
+
--Button-primary-negative-background: var(--color-sentiment-negative-primary);
|
|
745
|
+
--Button-primary-negative-background-hover: var(--color-sentiment-negative-primary-hover);
|
|
746
|
+
--Button-primary-negative-background-active: var(--color-sentiment-negative-primary-active);
|
|
747
|
+
--Button-primary-negative-color: var(--color-contrast);
|
|
748
|
+
--Button-primary-netative-avatar-border-color: rgba(255,255,255,0.2);
|
|
749
|
+
--Button-secondary-negative-background: var(--color-sentiment-negative-secondary);
|
|
750
|
+
--Button-secondary-negative-background-hover: var(--color-sentiment-negative-secondary-hover);
|
|
751
|
+
--Button-secondary-negative-background-active: var(--color-sentiment-negative-secondary-active);
|
|
752
|
+
--Button-secondary-negative-color: var(--color-sentiment-negative-primary);
|
|
753
|
+
--Button-secondary-netative-avatar-border-color: rgba(168,32,13,0.12157);
|
|
754
|
+
}
|
|
755
|
+
.np-theme-personal--dark .wds-Button {
|
|
756
|
+
--Button-primary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
757
|
+
}
|
|
758
|
+
.np-theme-personal--forest-green .wds-Button {
|
|
759
|
+
--color-interactive-neutral: rgba(159,232,112,0.2);
|
|
760
|
+
--color-interactive-neutral-hover: rgba(205,255,173,0.2);
|
|
761
|
+
--color-interactive-neutral-active: rgba(236,255,224,0.2);
|
|
762
|
+
--color-sentiment-negative-secondary: rgba(255,196,194,0.2);
|
|
763
|
+
--color-sentiment-negative-secondary-hover: rgba(255,220,219,0.2);
|
|
764
|
+
--color-sentiment-negative-secondary-active: rgba(255,235,235,0.2);
|
|
765
|
+
--Button-primary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
766
|
+
--Button-secondary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
767
|
+
}
|
|
768
|
+
.np-theme-personal--bright-green .wds-Button {
|
|
769
|
+
--color-contrast: #FFFFFF;
|
|
770
|
+
--Button-secondary-color: var(--color-interactive-control);
|
|
771
|
+
--Button-secondary-negative-color: var(--color-contrast);
|
|
772
|
+
--Button-secondary-netative-avatar-border-color: var(--Button-primary-netative-avatar-border-color);
|
|
773
|
+
}
|
|
774
|
+
/* Button Styles */
|
|
775
|
+
.wds-Button {
|
|
776
|
+
display: inline-flex;
|
|
777
|
+
flex: none;
|
|
778
|
+
width: auto;
|
|
779
|
+
align-items: center;
|
|
780
|
+
justify-content: center;
|
|
781
|
+
vertical-align: middle;
|
|
782
|
+
text-align: center;
|
|
783
|
+
-webkit-text-decoration: none;
|
|
784
|
+
text-decoration: none;
|
|
785
|
+
white-space: nowrap;
|
|
786
|
+
word-wrap: break-word;
|
|
787
|
+
-webkit-appearance: none;
|
|
788
|
+
-moz-appearance: none;
|
|
789
|
+
appearance: none;
|
|
790
|
+
background-color: #00a2dd;
|
|
791
|
+
background-color: var(--Button-background);
|
|
792
|
+
border: none;
|
|
793
|
+
border-radius: 9999px;
|
|
794
|
+
border-radius: var(--Button-border-radius);
|
|
795
|
+
color: var(--Button-color);
|
|
796
|
+
cursor: pointer;
|
|
797
|
+
padding: 8px 12px;
|
|
798
|
+
padding: var(--Button-padding);
|
|
799
|
+
transition: color, background-color 150ms ease-in-out;
|
|
800
|
+
transition: color, background-color var(--Button-transition-duration) var(--Button-transition-easing);
|
|
801
|
+
}
|
|
802
|
+
.wds-Button:focus {
|
|
803
|
+
-webkit-text-decoration: none;
|
|
804
|
+
text-decoration: none;
|
|
805
|
+
}
|
|
806
|
+
.wds-Button:hover {
|
|
807
|
+
background-color: #008fc9;
|
|
808
|
+
background-color: var(--Button-background-hover);
|
|
809
|
+
-webkit-text-decoration: none;
|
|
810
|
+
text-decoration: none;
|
|
811
|
+
}
|
|
812
|
+
.wds-Button:active {
|
|
813
|
+
background-color: #0081ba;
|
|
814
|
+
background-color: var(--Button-background-active);
|
|
815
|
+
-webkit-text-decoration: none;
|
|
816
|
+
text-decoration: none;
|
|
817
|
+
}
|
|
818
|
+
.wds-Button.wds-Button--disabled,
|
|
819
|
+
.wds-Button:disabled {
|
|
820
|
+
mix-blend-mode: luminosity;
|
|
821
|
+
opacity: 0.45;
|
|
822
|
+
cursor: not-allowed;
|
|
823
|
+
}
|
|
824
|
+
.wds-Button.wds-Button--disabled:hover,
|
|
825
|
+
.wds-Button:disabled:hover,
|
|
826
|
+
.wds-Button.wds-Button--disabled:active,
|
|
827
|
+
.wds-Button:disabled:active {
|
|
828
|
+
background-color: #00a2dd;
|
|
829
|
+
background-color: var(--Button-background);
|
|
830
|
+
}
|
|
831
|
+
.wds-Button--secondary {
|
|
832
|
+
--Button-background: var(--Button-secondary-background);
|
|
833
|
+
--Button-background-hover: var(--Button-secondary-background-hover);
|
|
834
|
+
--Button-background-active: var(--Button-secondary-background-active);
|
|
835
|
+
--Button-color: var(--Button-secondary-color);
|
|
836
|
+
}
|
|
837
|
+
.wds-Button--tertiary {
|
|
838
|
+
--Button-background: var(--Button-tertiary-background);
|
|
839
|
+
--Button-background-hover: var(--Button-tertiary-background-hover);
|
|
840
|
+
--Button-background-active: var(--Button-tertiary-background-active);
|
|
841
|
+
--Button-color: var(--Button-tertiary-color);
|
|
842
|
+
}
|
|
843
|
+
.wds-Button--tertiary .wds-Button-icon--end {
|
|
844
|
+
color: var(--color-interactive-primary);
|
|
845
|
+
}
|
|
846
|
+
.wds-Button--minimal {
|
|
847
|
+
--Button-background: var(--Button-minimal-background);
|
|
848
|
+
--Button-background-hover: var(--Button-minimal-background-hover);
|
|
849
|
+
--Button-background-active: var(--Button-minimal-background-active);
|
|
850
|
+
--Button-color: var(--Button-minimal-color);
|
|
851
|
+
-webkit-text-decoration: underline;
|
|
852
|
+
text-decoration: underline;
|
|
853
|
+
text-underline-offset: 3px;
|
|
854
|
+
text-decoration-thickness: 1px;
|
|
855
|
+
}
|
|
856
|
+
.wds-Button--minimal:hover,
|
|
857
|
+
.wds-Button--minimal:hover:active {
|
|
858
|
+
-webkit-text-decoration: underline;
|
|
859
|
+
text-decoration: underline;
|
|
860
|
+
}
|
|
861
|
+
.wds-Button--negative.wds-Button--primary {
|
|
862
|
+
--Button-background: var(--Button-primary-negative-background);
|
|
863
|
+
--Button-background-hover: var(--Button-primary-negative-background-hover);
|
|
864
|
+
--Button-background-active: var(--Button-primary-negative-background-active);
|
|
865
|
+
--Button-color: var(--Button-primary-negative-color);
|
|
866
|
+
--Button-avatar-border-color: var(--Button-primary-netative-avatar-border-color);
|
|
867
|
+
}
|
|
868
|
+
.wds-Button--negative.wds-Button--secondary {
|
|
869
|
+
--Button-background: var(--Button-secondary-negative-background);
|
|
870
|
+
--Button-background-hover: var(--Button-secondary-negative-background-hover);
|
|
871
|
+
--Button-background-active: var(--Button-secondary-negative-background-active);
|
|
872
|
+
--Button-color: var(--Button-secondary-negative-color);
|
|
873
|
+
--Button-avatar-border-color: var(--Button-secondary-netative-avatar-border-color);
|
|
874
|
+
}
|
|
875
|
+
.wds-Button--small {
|
|
876
|
+
--Button-padding: var(--Button-size-small-padding);
|
|
877
|
+
}
|
|
878
|
+
.wds-Button--small .wds-Button-icon--start {
|
|
879
|
+
margin-right: 4px;
|
|
880
|
+
margin-right: var(--size-4);
|
|
881
|
+
}
|
|
882
|
+
[dir="rtl"] .wds-Button--small .wds-Button-icon--start {
|
|
883
|
+
margin-right: 0;
|
|
884
|
+
margin-left: 4px;
|
|
885
|
+
margin-left: var(--size-4);
|
|
886
|
+
}
|
|
887
|
+
.wds-Button--medium {
|
|
888
|
+
--Button-padding: var(--Button-size-medium-padding);
|
|
889
|
+
}
|
|
890
|
+
.wds-Button--large {
|
|
891
|
+
--Button-padding: var(--Button-size-large-padding);
|
|
892
|
+
}
|
|
893
|
+
.wds-Button--block {
|
|
894
|
+
width: 100%;
|
|
895
|
+
}
|
|
896
|
+
.wds-Button-avatars {
|
|
897
|
+
display: inline-flex;
|
|
898
|
+
margin-right: 5px;
|
|
899
|
+
margin-left: calc(4px * -1);
|
|
900
|
+
margin-left: calc(var(--size-4) * -1);
|
|
901
|
+
}
|
|
902
|
+
[dir="rtl"] .wds-Button-avatars {
|
|
903
|
+
margin-right: 0;
|
|
904
|
+
margin-left: 5px;
|
|
905
|
+
}
|
|
906
|
+
.wds-Button-avatars .np-circle {
|
|
907
|
+
--circle-border-color: var(--Button-avatar-border-color);
|
|
908
|
+
}
|
|
909
|
+
.wds-Button-avatars .np-avatar-view .np-avatar-view-content {
|
|
910
|
+
color: var(--Button-color);
|
|
911
|
+
}
|
|
912
|
+
.wds-Button-icon {
|
|
913
|
+
display: inline-block;
|
|
914
|
+
}
|
|
915
|
+
.wds-Button-icon--start {
|
|
916
|
+
margin-right: 8px;
|
|
917
|
+
margin-right: var(--size-8);
|
|
918
|
+
}
|
|
919
|
+
[dir="rtl"] .wds-Button-icon--start {
|
|
920
|
+
margin-right: 0;
|
|
921
|
+
margin-left: 8px;
|
|
922
|
+
margin-left: var(--size-8);
|
|
923
|
+
}
|
|
924
|
+
.wds-Button-icon--end {
|
|
925
|
+
margin-left: 4px;
|
|
926
|
+
margin-left: var(--size-4);
|
|
927
|
+
}
|
|
928
|
+
[dir="rtl"] .wds-Button-icon--end {
|
|
929
|
+
margin-left: 0;
|
|
930
|
+
margin-right: 4px;
|
|
931
|
+
margin-right: var(--size-4);
|
|
932
|
+
}
|
|
933
|
+
.wds-Button-content {
|
|
934
|
+
position: relative;
|
|
935
|
+
}
|
|
936
|
+
.wds-Button-content--loading .wds-Button-label,
|
|
937
|
+
.wds-Button-content--loading .wds-Button-media,
|
|
938
|
+
.wds-Button-content--loading .wds-Button-icon {
|
|
939
|
+
visibility: hidden;
|
|
940
|
+
opacity: 0;
|
|
941
|
+
}
|
|
942
|
+
.wds-Button-label {
|
|
943
|
+
display: flex;
|
|
944
|
+
justify-content: center;
|
|
945
|
+
align-items: center;
|
|
946
|
+
position: relative;
|
|
947
|
+
}
|
|
948
|
+
.wds-Button-loader {
|
|
949
|
+
position: absolute;
|
|
950
|
+
display: flex;
|
|
951
|
+
justify-content: center;
|
|
952
|
+
align-items: center;
|
|
953
|
+
width: 100%;
|
|
954
|
+
height: 100%;
|
|
955
|
+
}
|
|
956
|
+
.wds-Button-loader .process-circle {
|
|
957
|
+
stroke: var(--Button-color);
|
|
958
|
+
}
|
|
959
|
+
/* RTL Styles */
|
|
960
|
+
[dir="rtl"] .wds-Button .tw-icon-chevron-right,[dir="rtl"] .wds-Button .tw-icon-arrow-right {
|
|
961
|
+
transform: rotate(180deg);
|
|
962
|
+
}
|
|
963
|
+
[dir="rtl"] .wds-Button .tw-icon-chevron-left,[dir="rtl"] .wds-Button .tw-icon-arrow-left {
|
|
964
|
+
transform: rotate(180deg);
|
|
965
|
+
}
|
|
708
966
|
.np-card {
|
|
709
967
|
overflow: hidden;
|
|
710
968
|
transition-property: transform, box-shadow;
|
|
@@ -1184,34 +1442,175 @@ div.critical-comms .critical-comms-body {
|
|
|
1184
1442
|
display: inline-flex;
|
|
1185
1443
|
flex-direction: column;
|
|
1186
1444
|
align-items: center;
|
|
1445
|
+
text-align: center;
|
|
1187
1446
|
cursor: pointer;
|
|
1447
|
+
position: relative;
|
|
1448
|
+
}
|
|
1449
|
+
.np-circular-btn .tw-icon {
|
|
1450
|
+
position: absolute;
|
|
1451
|
+
top: 16px;
|
|
1452
|
+
top: var(--size-16);
|
|
1453
|
+
pointer-events: none;
|
|
1454
|
+
color: white;
|
|
1455
|
+
transition: color 0.15s ease-in-out;
|
|
1456
|
+
width: 100%;
|
|
1457
|
+
left: 0;
|
|
1458
|
+
}
|
|
1459
|
+
[dir="rtl"] .np-circular-btn .tw-icon {
|
|
1460
|
+
right: 0;
|
|
1461
|
+
left: auto;
|
|
1462
|
+
left: initial;
|
|
1463
|
+
}
|
|
1464
|
+
@media (max-width: 320px) {
|
|
1465
|
+
.np-circular-btn .tw-icon {
|
|
1466
|
+
top: 12px;
|
|
1467
|
+
top: var(--size-12);
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
.np-circular-btn .tw-icon > svg {
|
|
1471
|
+
margin: 0 auto;
|
|
1472
|
+
}
|
|
1473
|
+
.np-theme-personal .np-circular-btn {
|
|
1474
|
+
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
1475
|
+
}
|
|
1476
|
+
.np-theme-personal .np-circular-btn .tw-icon,
|
|
1477
|
+
.np-theme-personal .np-circular-btn .tw-icon:hover,
|
|
1478
|
+
.np-theme-personal .np-circular-btn .tw-icon:active {
|
|
1479
|
+
color: var(--color-interactive-control);
|
|
1480
|
+
}
|
|
1481
|
+
.np-theme-personal .np-circular-btn.negative .tw-icon,
|
|
1482
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1483
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled):active .tw-icon {
|
|
1484
|
+
color: var(--color-contrast) !important;
|
|
1485
|
+
}
|
|
1486
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled) .tw-icon {
|
|
1487
|
+
color: var(--color-sentiment-negative) !important;
|
|
1488
|
+
}
|
|
1489
|
+
.np-circular-btn.accent .np-circular-btn__label {
|
|
1490
|
+
color: #00a2dd;
|
|
1491
|
+
color: var(--color-interactive-accent);
|
|
1492
|
+
}
|
|
1493
|
+
.np-circular-btn.accent:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1494
|
+
color: #008fc9;
|
|
1495
|
+
color: var(--color-interactive-accent-hover);
|
|
1496
|
+
}
|
|
1497
|
+
.np-circular-btn.accent:active .np-circular-btn__label,
|
|
1498
|
+
.np-circular-btn.accent input[type="button"]:active ~ .np-circular-btn__label {
|
|
1499
|
+
color: #0081ba;
|
|
1500
|
+
color: var(--color-interactive-accent-active);
|
|
1501
|
+
}
|
|
1502
|
+
.np-circular-btn.accent.secondary .tw-icon {
|
|
1503
|
+
color: #00a2dd;
|
|
1504
|
+
color: var(--color-interactive-accent);
|
|
1188
1505
|
}
|
|
1189
|
-
.np-circular-btn
|
|
1190
|
-
.np-circular-btn
|
|
1506
|
+
.np-circular-btn.accent.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1507
|
+
.np-circular-btn.accent.secondary input[type="button"]:active + .tw-icon {
|
|
1508
|
+
color: white;
|
|
1509
|
+
}
|
|
1510
|
+
.np-circular-btn.positive .np-circular-btn__label {
|
|
1511
|
+
color: #2ead4b;
|
|
1512
|
+
color: var(--color-interactive-positive);
|
|
1513
|
+
}
|
|
1514
|
+
.np-circular-btn.positive:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1515
|
+
color: #069939;
|
|
1516
|
+
color: var(--color-interactive-positive-hover);
|
|
1517
|
+
}
|
|
1518
|
+
.np-circular-btn.positive:active .np-circular-btn__label,
|
|
1519
|
+
.np-circular-btn.positive input[type="button"]:active ~ .np-circular-btn__label {
|
|
1520
|
+
color: #008b2b;
|
|
1521
|
+
color: var(--color-interactive-positive-active);
|
|
1522
|
+
}
|
|
1523
|
+
.np-circular-btn.positive.secondary .tw-icon {
|
|
1524
|
+
color: #2ead4b;
|
|
1525
|
+
color: var(--color-interactive-positive);
|
|
1526
|
+
}
|
|
1527
|
+
.np-circular-btn.positive.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1528
|
+
.np-circular-btn.positive.secondary input[type="button"]:active + .tw-icon {
|
|
1529
|
+
color: white;
|
|
1530
|
+
}
|
|
1531
|
+
.np-circular-btn.negative .np-circular-btn__label {
|
|
1532
|
+
color: #e74848;
|
|
1533
|
+
color: var(--color-interactive-negative);
|
|
1534
|
+
}
|
|
1535
|
+
.np-circular-btn.negative:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1536
|
+
color: #d03238;
|
|
1537
|
+
color: var(--color-interactive-negative-hover);
|
|
1538
|
+
}
|
|
1539
|
+
.np-circular-btn.negative:active .np-circular-btn__label,
|
|
1540
|
+
.np-circular-btn.negative input[type="button"]:active ~ .np-circular-btn__label {
|
|
1541
|
+
color: #bf1e2c;
|
|
1542
|
+
color: var(--color-interactive-negative-active);
|
|
1543
|
+
}
|
|
1544
|
+
.np-circular-btn.negative.secondary .tw-icon {
|
|
1545
|
+
color: #e74848;
|
|
1546
|
+
color: var(--color-interactive-negative);
|
|
1547
|
+
}
|
|
1548
|
+
.np-circular-btn.negative.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1549
|
+
.np-circular-btn.negative.secondary input[type="button"]:active + .tw-icon {
|
|
1550
|
+
color: white;
|
|
1551
|
+
}
|
|
1552
|
+
.np-theme-personal .np-circular-btn.accent .np-circular-btn__label {
|
|
1191
1553
|
color: var(--color-interactive-primary);
|
|
1192
1554
|
}
|
|
1193
|
-
.np-
|
|
1194
|
-
.np-circular-btn-secondary-default .np-circular-btn-label:not(.disabled):not(:disabled):hover {
|
|
1555
|
+
.np-theme-personal .np-circular-btn.accent:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1195
1556
|
color: var(--color-interactive-primary-hover);
|
|
1196
1557
|
}
|
|
1197
|
-
.np-
|
|
1198
|
-
.np-
|
|
1558
|
+
.np-theme-personal .np-circular-btn.accent:active .np-circular-btn__label,
|
|
1559
|
+
.np-theme-personal .np-circular-btn.accent input[type="button"]:active ~ .np-circular-btn__label {
|
|
1199
1560
|
color: var(--color-interactive-primary-active);
|
|
1200
1561
|
}
|
|
1201
|
-
.np-
|
|
1202
|
-
|
|
1203
|
-
color: var(--color-sentiment-negative-primary);
|
|
1562
|
+
.np-theme-personal .np-circular-btn.accent.secondary .tw-icon {
|
|
1563
|
+
color: var(--color-interactive-primary);
|
|
1204
1564
|
}
|
|
1205
|
-
.np-
|
|
1206
|
-
.np-
|
|
1207
|
-
color:
|
|
1565
|
+
.np-theme-personal .np-circular-btn.accent.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1566
|
+
.np-theme-personal .np-circular-btn.accent.secondary input[type="button"]:active + .tw-icon {
|
|
1567
|
+
color: white;
|
|
1568
|
+
color: var(--color-interactive-control);
|
|
1208
1569
|
}
|
|
1209
|
-
.np-
|
|
1210
|
-
|
|
1211
|
-
color: var(--color-sentiment-negative-primary-active);
|
|
1570
|
+
.np-theme-personal .np-circular-btn.accent.secondary:active input[type="button"] + .tw-icon {
|
|
1571
|
+
color: var(--color-interactive-control);
|
|
1212
1572
|
}
|
|
1213
|
-
.np-circular-btn-
|
|
1214
|
-
|
|
1573
|
+
.np-theme-personal .np-circular-btn.positive .np-circular-btn__label {
|
|
1574
|
+
color: var(--color-interactive-primary);
|
|
1575
|
+
}
|
|
1576
|
+
.np-theme-personal .np-circular-btn.positive:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1577
|
+
color: var(--color-interactive-primary-hover);
|
|
1578
|
+
}
|
|
1579
|
+
.np-theme-personal .np-circular-btn.positive:active .np-circular-btn__label,
|
|
1580
|
+
.np-theme-personal .np-circular-btn.positive input[type="button"]:active ~ .np-circular-btn__label {
|
|
1581
|
+
color: var(--color-interactive-primary-active);
|
|
1582
|
+
}
|
|
1583
|
+
.np-theme-personal .np-circular-btn.positive.secondary .tw-icon {
|
|
1584
|
+
color: var(--color-interactive-primary);
|
|
1585
|
+
}
|
|
1586
|
+
.np-theme-personal .np-circular-btn.positive.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1587
|
+
.np-theme-personal .np-circular-btn.positive.secondary input[type="button"]:active + .tw-icon {
|
|
1588
|
+
color: white;
|
|
1589
|
+
color: var(--color-interactive-control);
|
|
1590
|
+
}
|
|
1591
|
+
.np-theme-personal .np-circular-btn.positive.secondary:active input[type="button"] + .tw-icon {
|
|
1592
|
+
color: var(--color-interactive-control);
|
|
1593
|
+
}
|
|
1594
|
+
.np-theme-personal .np-circular-btn.negative .np-circular-btn__label {
|
|
1595
|
+
color: var(--color-sentiment-negative);
|
|
1596
|
+
}
|
|
1597
|
+
.np-theme-personal .np-circular-btn.negative:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
1598
|
+
color: var(--color-sentiment-negative-hover);
|
|
1599
|
+
}
|
|
1600
|
+
.np-theme-personal .np-circular-btn.negative:active .np-circular-btn__label,
|
|
1601
|
+
.np-theme-personal .np-circular-btn.negative input[type="button"]:active ~ .np-circular-btn__label {
|
|
1602
|
+
color: var(--color-sentiment-negative-active);
|
|
1603
|
+
}
|
|
1604
|
+
.np-theme-personal .np-circular-btn.negative.secondary .tw-icon {
|
|
1605
|
+
color: var(--color-sentiment-negative);
|
|
1606
|
+
}
|
|
1607
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
1608
|
+
.np-theme-personal .np-circular-btn.negative.secondary input[type="button"]:active + .tw-icon {
|
|
1609
|
+
color: white;
|
|
1610
|
+
color: var(--color-interactive-control);
|
|
1611
|
+
}
|
|
1612
|
+
.np-theme-personal .np-circular-btn.negative.secondary:active input[type="button"] + .tw-icon {
|
|
1613
|
+
color: var(--color-interactive-control);
|
|
1215
1614
|
}
|
|
1216
1615
|
.np-circle {
|
|
1217
1616
|
border-radius: 9999px;
|
package/src/main.less
CHANGED
|
@@ -30,13 +30,7 @@ const PrimitiveAnchor = forwardRef<HTMLAnchorElement, PrimitiveAnchorProps>(
|
|
|
30
30
|
},
|
|
31
31
|
ref,
|
|
32
32
|
) => {
|
|
33
|
-
const anchorClasses = clsx(
|
|
34
|
-
'wds-Anchor',
|
|
35
|
-
{
|
|
36
|
-
'wds-Anchor--disabled': disabled,
|
|
37
|
-
},
|
|
38
|
-
className,
|
|
39
|
-
);
|
|
33
|
+
const anchorClasses = clsx(className);
|
|
40
34
|
|
|
41
35
|
const handleClick = useCallback(
|
|
42
36
|
(event: React.MouseEvent<HTMLAnchorElement>) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import PrimitiveAnchor from '
|
|
2
|
+
import PrimitiveAnchor from '../src';
|
|
3
3
|
|
|
4
4
|
describe('PrimitiveAnchor', () => {
|
|
5
5
|
const defaultProps = {
|
|
@@ -27,7 +27,6 @@ describe('PrimitiveAnchor', () => {
|
|
|
27
27
|
renderAnchor(props);
|
|
28
28
|
|
|
29
29
|
const link = screen.getByRole('link');
|
|
30
|
-
expect(link).toHaveClass('wds-Anchor');
|
|
31
30
|
expect(link).toHaveClass('custom-class');
|
|
32
31
|
});
|
|
33
32
|
|
|
@@ -41,7 +40,6 @@ describe('PrimitiveAnchor', () => {
|
|
|
41
40
|
|
|
42
41
|
const link = screen.getByRole('link');
|
|
43
42
|
expect(link).toHaveAttribute('aria-disabled', 'true');
|
|
44
|
-
expect(link).toHaveClass('wds-Anchor--disabled');
|
|
45
43
|
expect(link).not.toHaveAttribute('href', 'https://example.com');
|
|
46
44
|
});
|
|
47
45
|
|
|
@@ -35,14 +35,7 @@ const PrimitiveButton = forwardRef<HTMLButtonElement, PrimitiveButtonProps>(
|
|
|
35
35
|
ref,
|
|
36
36
|
) => {
|
|
37
37
|
const intl = useIntl();
|
|
38
|
-
const classNames = clsx(
|
|
39
|
-
'wds-Button',
|
|
40
|
-
{
|
|
41
|
-
'wds-Button--disabled': disabled,
|
|
42
|
-
'wds-Button--loading': loading,
|
|
43
|
-
},
|
|
44
|
-
className,
|
|
45
|
-
);
|
|
38
|
+
const classNames = clsx(className);
|
|
46
39
|
|
|
47
40
|
const handleClick = useCallback(
|
|
48
41
|
(event: React.MouseEvent<HTMLButtonElement>) => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import PrimitiveButton from '..';
|
|
1
|
+
import { screen } from '@testing-library/react';
|
|
2
|
+
import PrimitiveButton from '../src';
|
|
4
3
|
import messages from '../../../i18n/commonMessages/Button.messages';
|
|
5
4
|
import { render } from '../../../test-utils';
|
|
6
5
|
|
|
@@ -36,7 +35,6 @@ describe('Button', () => {
|
|
|
36
35
|
renderButton(props);
|
|
37
36
|
|
|
38
37
|
const button = screen.getByRole('button');
|
|
39
|
-
expect(button).toHaveClass('wds-Button');
|
|
40
38
|
expect(button).toHaveClass('custom-class');
|
|
41
39
|
});
|
|
42
40
|
|
|
@@ -49,7 +47,6 @@ describe('Button', () => {
|
|
|
49
47
|
renderButton(props);
|
|
50
48
|
|
|
51
49
|
const button = screen.getByRole('button');
|
|
52
|
-
expect(button).toHaveClass('wds-Button--disabled');
|
|
53
50
|
expect(button).toBeDisabled();
|
|
54
51
|
});
|
|
55
52
|
|