@transferwise/components 46.100.1 → 46.100.2
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 +1 -1
- package/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.mjs +1 -1
- package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
- package/build/dateLookup/DateLookup.js +3 -2
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.mjs +3 -2
- package/build/dateLookup/DateLookup.mjs.map +1 -1
- package/build/main.css +4 -94
- package/build/styles/accordion/Accordion.css +27 -16
- package/build/styles/avatar/Avatar.css +95 -50
- package/build/styles/inputs/Input.css +37 -21
- package/build/styles/inputs/TextArea.css +35 -20
- package/build/styles/loader/Loader.css +4 -90
- package/build/styles/main.css +4 -94
- package/build/styles/popover/Popover.css +19 -12
- package/build/styles/select/Select.css +131 -68
- package/build/styles/switch/Switch.css +27 -16
- package/build/styles/tile/Tile.css +31 -18
- package/build/types/dateLookup/DateLookup.d.ts +2 -2
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/test-utils/story-config.d.ts +2 -3
- package/build/types/test-utils/story-config.d.ts.map +1 -1
- package/package.json +20 -28
- package/src/accordion/Accordion.css +27 -16
- package/src/accordion/Accordion.story.tsx +1 -1
- package/src/actionButton/ActionButton.story.tsx +3 -2
- package/src/actionOption/ActionOption.story.tsx +2 -2
- package/src/alert/Alert.story.tsx +2 -2
- package/src/alert/Alert.tests.story.tsx +2 -2
- package/src/avatar/Avatar.css +95 -50
- package/src/avatar/Avatar.spec.tsx +1 -1
- package/src/avatar/Avatar.story.tsx +3 -2
- package/src/avatarLayout/AvatarLayout.story.tsx +1 -1
- package/src/avatarLayout/AvatarLayout.tsx +1 -1
- package/src/avatarView/AvatarView.story.tsx +1 -1
- package/src/avatarWrapper/AvatarWrapper.story.tsx +3 -2
- package/src/badge/Badge.story.tsx +49 -28
- package/src/button/Button.accessibility.docs.mdx +1 -1
- package/src/button/Button.story.tsx +2 -2
- package/src/button/Button.tests.story.tsx +2 -2
- package/src/button/LegacyButton.story.tsx +3 -2
- package/src/card/Card.story.tsx +2 -2
- package/src/carousel/Carousel.story.tsx +1 -1
- package/src/checkbox/Checkbox.story.tsx +2 -2
- package/src/checkboxButton/CheckboxButton.story.tsx +2 -2
- package/src/checkboxOption/CheckboxOption.story.tsx +35 -29
- package/src/chevron/Chevron.story.tsx +1 -1
- package/src/chips/Chips.story.tsx +1 -1
- package/src/circularButton/CircularButton.story.tsx +1 -1
- package/src/circularButton/CircularButton.tests.story.tsx +1 -1
- package/src/common/bottomSheet/BottomSheet.story.tsx +2 -2
- package/src/common/card/Card.story.tsx +1 -1
- package/src/common/circle/Circle.story.tsx +2 -2
- package/src/common/locale/index.spec.ts +28 -16
- package/src/common/responsivePanel/ResponsivePanel.spec.js +8 -29
- package/src/criticalBanner/CriticalCommsBanner.story.tsx +1 -1
- package/src/dateInput/DateInput.story.tsx +2 -2
- package/src/dateInput/DateInput.tests.story.tsx +2 -2
- package/src/dateLookup/DateLookup.spec.tsx +5 -5
- package/src/dateLookup/DateLookup.story.tsx +43 -71
- package/src/dateLookup/DateLookup.tests.story.tsx +3 -3
- package/src/dateLookup/DateLookup.tsx +4 -1
- package/src/decision/Decision.story.tsx +24 -49
- package/src/definitionList/DefinitionList.story.tsx +1 -1
- package/src/dimmer/Dimmer.story.tsx +2 -2
- package/src/divider/Divider.accessibility.docs.mdx +1 -1
- package/src/divider/Divider.story.tsx +1 -1
- package/src/drawer/Drawer.story.tsx +13 -7
- package/src/dropFade/DropFade.story.tsx +1 -1
- package/src/emphasis/Emphasis.spec.tsx +8 -8
- package/src/emphasis/Emphasis.story.tsx +1 -1
- package/src/field/Field.story.tsx +3 -3
- package/src/flowNavigation/FlowNavigation.story.tsx +305 -260
- package/src/iconButton/IconButton.story.tsx +2 -2
- package/src/image/Image.story.tsx +27 -54
- package/src/info/Info.story.tsx +2 -2
- package/src/inlineAlert/InlineAlert.story.tsx +1 -1
- package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.tsx +2 -2
- package/src/inputs/Input.css +37 -21
- package/src/inputs/InputGroup.story.tsx +1 -1
- package/src/inputs/SearchInput.story.tsx +1 -1
- package/src/inputs/SelectInput.docs.mdx +1 -1
- package/src/inputs/SelectInput.story.tsx +2 -2
- package/src/inputs/TextArea.css +35 -20
- package/src/instructionsList/InstructionsList.story.tsx +2 -2
- package/src/legacylistItem/LegacyListItem.story.tsx +1 -1
- package/src/loader/Loader.css +4 -90
- package/src/loader/Loader.story.tsx +1 -1
- package/src/logo/Logo.story.tsx +1 -1
- package/src/main.css +4 -94
- package/src/markdown/Markdown.story.tsx +1 -1
- package/src/modal/Modal.story.tsx +2 -2
- package/src/money/Money.story.tsx +1 -1
- package/src/moneyInput/MoneyInput.docs.mdx +1 -1
- package/src/moneyInput/MoneyInput.spec.tsx +8 -5
- package/src/moneyInput/MoneyInput.story.tsx +2 -2
- package/src/moneyInput/currencyFormatting.spec.ts +1 -1
- package/src/navigationOption/NavigationOption.story.tsx +265 -226
- package/src/nudge/Nudge.story.tsx +1 -1
- package/src/overlayHeader/OverlayHeader.story.tsx +32 -24
- package/src/phoneNumberInput/PhoneNumberInput.story.tsx +1 -1
- package/src/phoneNumberInput/utils/setDefaultPrefix/setDefaultPrefix.spec.ts +6 -3
- package/src/popover/Popover.css +19 -12
- package/src/popover/Popover.story.tsx +2 -2
- package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.story.tsx +2 -2
- package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.tests.story.tsx +2 -2
- package/src/primitives/PrimitiveButton/stories/PrimitiveButton.story.tsx +2 -2
- package/src/primitives/PrimitiveButton/stories/PrimitiveButton.tests.story.tsx +2 -2
- package/src/processIndicator/ProcessIndicator.story.tsx +1 -1
- package/src/progress/Progress.story.tsx +1 -1
- package/src/progressBar/ProgressBar.story.tsx +1 -1
- package/src/promoCard/PromoCard.story.tsx +1 -1
- package/src/promoCard/PromoCardGroup.story.tsx +1 -1
- package/src/provider/Provider.spec.tsx +2 -2
- package/src/provider/Provider.story.tsx +1 -1
- package/src/provider/direction/DirectionProvider.spec.tsx +1 -1
- package/src/provider/language/LanguageProvider.spec.tsx +1 -1
- package/src/provider/theme/ThemeProvider.story.tsx +1 -1
- package/src/radio/Radio.story.tsx +59 -42
- package/src/radioGroup/RadioGroup.story.tsx +2 -2
- package/src/radioOption/RadioOption.story.tsx +73 -38
- package/src/segmentedControl/SegmentedControl.story.tsx +1 -1
- package/src/select/Select.css +131 -68
- package/src/select/Select.story.tsx +385 -397
- package/src/slidingPanel/SlidingPanel.story.tsx +30 -13
- package/src/snackbar/Snackbar.story.tsx +50 -36
- package/src/snackbar/Snackbar.tests.story.tsx +3 -2
- package/src/statusIcon/StatusIcon.docs.mdx +1 -1
- package/src/statusIcon/StatusIcon.spec.tsx +8 -5
- package/src/statusIcon/StatusIcon.story.tsx +1 -1
- package/src/stepper/Stepper.story.tsx +2 -2
- package/src/stepper/Stepper.tests.story.tsx +2 -2
- package/src/sticky/Sticky.story.tsx +1 -1
- package/src/summary/Summary.story.tsx +18 -17
- package/src/switch/Switch.css +27 -16
- package/src/switch/Switch.story.tsx +2 -2
- package/src/switchOption/SwitchOption.story.tsx +1 -1
- package/src/table/Table.story.tsx +1 -1
- package/src/test-utils/story-config.ts +9 -6
- package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.story.tsx +2 -2
- package/src/tile/Tile.css +31 -18
- package/src/tile/Tile.story.tsx +43 -43
- package/src/tooltip/Tooltip.story.tsx +2 -2
- package/src/typeahead/Typeahead.story.tsx +2 -2
- package/src/upload/Upload.story.tsx +2 -2
- package/src/upload/Upload.tests.story.tsx +2 -2
- package/src/upload/utils/isTypeValid/isTypeValid.spec.ts +3 -1
- package/src/uploadInput/UploadInput.story.tsx +1 -1
- package/src/uploadInput/UploadInput.tests.story.tsx +3 -3
- package/src/withId/withId.docs.mdx +1 -1
- package/src/withId/withId.story.tsx +1 -1
- package/src/common/responsivePanel/__snapshots__/ResponsivePanel.spec.js.snap +0 -21
|
@@ -1,49 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
}@media (min-width: 768px) {
|
|
3
|
-
}.np-tile {
|
|
1
|
+
.np-tile {
|
|
4
2
|
min-width: 120px;
|
|
5
3
|
border-radius: 10px;
|
|
6
4
|
border-radius: var(--radius-small);
|
|
7
5
|
width: 100%;
|
|
8
|
-
}
|
|
6
|
+
}
|
|
7
|
+
.np-theme-personal .np-tile {
|
|
9
8
|
background-color: rgba(134,167,189,0.10196);
|
|
10
9
|
background-color: var(--color-background-neutral);
|
|
11
|
-
}
|
|
10
|
+
}
|
|
11
|
+
.np-theme-personal .np-tile .tw-avatar .tw-avatar__content {
|
|
12
12
|
background-color: var(--color-contrast);
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
|
+
.np-tile.decision {
|
|
14
15
|
margin-top: 0;
|
|
15
16
|
border: 1px solid rgba(0,0,0,0.10196);
|
|
16
17
|
border: 1px solid var(--color-border-neutral);
|
|
17
|
-
}
|
|
18
|
+
}
|
|
19
|
+
.np-theme-personal .np-tile.decision {
|
|
18
20
|
border: none;
|
|
19
|
-
}
|
|
21
|
+
}
|
|
22
|
+
.np-theme-personal .np-tile.decision:hover {
|
|
20
23
|
background-color: var(--color-background-neutral-hover);
|
|
21
|
-
}
|
|
24
|
+
}
|
|
25
|
+
.np-theme-personal .np-tile.decision:active {
|
|
22
26
|
background-color: var(--color-background-neutral-active);
|
|
23
|
-
}
|
|
27
|
+
}
|
|
28
|
+
.np-theme-personal .np-tile.decision .np-text-body-default {
|
|
24
29
|
color: #5d7079;
|
|
25
30
|
color: var(--color-content-secondary);
|
|
26
|
-
}
|
|
31
|
+
}
|
|
32
|
+
.np-tile.np-decision__tile--fixed-width {
|
|
27
33
|
width: 300px;
|
|
28
|
-
}
|
|
34
|
+
}
|
|
35
|
+
.np-tile__media {
|
|
29
36
|
width: 100%;
|
|
30
|
-
}
|
|
37
|
+
}
|
|
38
|
+
.np-tile__description {
|
|
31
39
|
color: #5d7079;
|
|
32
40
|
color: var(--color-content-secondary);
|
|
33
41
|
margin-top: 12px;
|
|
34
42
|
margin-top: var(--size-12);
|
|
35
43
|
display: inline-block;
|
|
36
|
-
}
|
|
44
|
+
}
|
|
45
|
+
.np-tile--small.np-decision__tile--fixed-width {
|
|
37
46
|
width: 260px;
|
|
38
|
-
}
|
|
47
|
+
}
|
|
48
|
+
.np-tile--small .np-tile__description {
|
|
39
49
|
margin-top: 4px;
|
|
40
50
|
margin-top: var(--size-4);
|
|
41
|
-
}
|
|
51
|
+
}
|
|
52
|
+
.np-tile:hover .tw-avatar {
|
|
42
53
|
pointer-events: none;
|
|
43
|
-
}
|
|
54
|
+
}
|
|
55
|
+
.np-tile:hover .tw-avatar .tw-avatar__content {
|
|
44
56
|
background-color: #ffffff;
|
|
45
57
|
background-color: var(--color-background-screen);
|
|
46
|
-
}
|
|
58
|
+
}
|
|
59
|
+
.np-tile__description {
|
|
47
60
|
color: #5d7079;
|
|
48
61
|
color: var(--color-content-secondary);
|
|
49
62
|
font-weight: 400;
|
|
@@ -74,9 +74,9 @@ declare class DateLookup extends PureComponent<DateLookupPropsWithInputAttribute
|
|
|
74
74
|
render(): import("react").JSX.Element;
|
|
75
75
|
}
|
|
76
76
|
export declare const DateLookupWithoutInputAttributes: typeof DateLookup;
|
|
77
|
-
declare const
|
|
77
|
+
declare const WrappedDateLookup: {
|
|
78
78
|
(props: Omit<DateLookupPropsWithInputAttributes, "inputAttributes">): import("react").JSX.Element;
|
|
79
79
|
displayName: string;
|
|
80
80
|
};
|
|
81
|
-
export default
|
|
81
|
+
export default WrappedDateLookup;
|
|
82
82
|
//# sourceMappingURL=DateLookup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateLookup.d.ts","sourceRoot":"","sources":["../../../src/dateLookup/DateLookup.tsx"],"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
|
+
import { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
export declare const viewports: {
|
|
3
3
|
mobile3: {
|
|
4
4
|
name: string;
|
|
@@ -17,7 +17,7 @@ export declare const viewports: {
|
|
|
17
17
|
type: string;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
interface StoryConfig {
|
|
20
|
+
export interface StoryConfig {
|
|
21
21
|
/**
|
|
22
22
|
* Creates variations of the component for the current story. Some
|
|
23
23
|
* padding is applied to the variants for spacing.
|
|
@@ -37,5 +37,4 @@ interface StoryConfig {
|
|
|
37
37
|
* Utility function for creating variants of a CSFv3 story.
|
|
38
38
|
*/
|
|
39
39
|
export declare const storyConfig: <Args>(storyObject: StoryObj<Args>, { variants }: StoryConfig) => StoryObj<Args>;
|
|
40
|
-
export {};
|
|
41
40
|
//# sourceMappingURL=story-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"story-config.d.ts","sourceRoot":"","sources":["../../../src/test-utils/story-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"story-config.d.ts","sourceRoot":"","sources":["../../../src/test-utils/story-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAarB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,CACP,SAAS,GACT,OAAO,GACP,MAAM,GACN,cAAc,GACd,cAAc,GACd,KAAK,GACL,QAAQ,GACR,MAAM,CACT,EAAE,CAAC;CACL;AAmBD;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,IAAI,EAC9B,aAAa,QAAQ,CAAC,IAAI,CAAC,EAC3B,cAAc,WAAW,KACxB,QAAQ,CAAC,IAAI,CAuBf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.100.
|
|
3
|
+
"version": "46.100.2",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -49,22 +49,12 @@
|
|
|
49
49
|
"@rollup/plugin-node-resolve": "^15.3.1",
|
|
50
50
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
51
51
|
"@rollup/plugin-url": "^8.0.2",
|
|
52
|
-
"@storybook/addon-a11y": "^
|
|
53
|
-
"@storybook/addon-
|
|
54
|
-
"@storybook/addon-essentials": "^8.6.14",
|
|
55
|
-
"@storybook/addon-interactions": "^8.6.14",
|
|
56
|
-
"@storybook/addon-knobs": "^8.0.1",
|
|
57
|
-
"@storybook/addon-viewport": "^8.6.14",
|
|
52
|
+
"@storybook/addon-a11y": "^9.0.18",
|
|
53
|
+
"@storybook/addon-docs": "^9.0.18",
|
|
58
54
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
|
|
59
|
-
"@storybook/
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@storybook/react": "^8.6.14",
|
|
63
|
-
"@storybook/react-webpack5": "^8.6.14",
|
|
64
|
-
"@storybook/test": "^8.6.14",
|
|
65
|
-
"@storybook/theming": "^8.6.14",
|
|
66
|
-
"@testing-library/dom": "^10.4.0",
|
|
67
|
-
"@testing-library/jest-dom": "^6.6.3",
|
|
55
|
+
"@storybook/react-webpack5": "^9.0.18",
|
|
56
|
+
"@testing-library/dom": "^10.4.1",
|
|
57
|
+
"@testing-library/jest-dom": "^6.6.4",
|
|
68
58
|
"@testing-library/react": "^16.3.0",
|
|
69
59
|
"@testing-library/user-event": "^14.6.1",
|
|
70
60
|
"@transferwise/icons": "^3.22.3",
|
|
@@ -79,21 +69,23 @@
|
|
|
79
69
|
"@types/react-dom": "^18.3.7",
|
|
80
70
|
"@types/react-transition-group": "4.4.12",
|
|
81
71
|
"@wise/art": "^2.23.0",
|
|
82
|
-
"@wise/eslint-config": "^
|
|
72
|
+
"@wise/eslint-config": "^13.0.0",
|
|
83
73
|
"babel-plugin-formatjs": "^10.5.39",
|
|
84
|
-
"eslint": "^9.
|
|
74
|
+
"eslint": "^9.32.0",
|
|
85
75
|
"gulp": "^5.0.1",
|
|
86
|
-
"jest": "^30.0.
|
|
76
|
+
"jest": "^30.0.5",
|
|
87
77
|
"jest-environment-jsdom": "^29.7.0",
|
|
88
78
|
"jest-fetch-mock": "^3.0.3",
|
|
89
79
|
"lodash.times": "^4.3.2",
|
|
90
80
|
"react-intl": "^7.1.11",
|
|
91
|
-
"rollup": "^4.
|
|
81
|
+
"rollup": "^4.46.1",
|
|
92
82
|
"rollup-preserve-directives": "^1.1.3",
|
|
93
|
-
"storybook": "^
|
|
83
|
+
"storybook": "^9.0.18",
|
|
84
|
+
"storybook-addon-tag-badges": "^2.0.1",
|
|
85
|
+
"storybook-addon-test-codegen": "^2.0.1",
|
|
94
86
|
"@transferwise/less-config": "3.1.2",
|
|
95
|
-
"@transferwise/neptune-css": "14.24.5",
|
|
96
87
|
"@wise/components-theming": "1.6.4",
|
|
88
|
+
"@transferwise/neptune-css": "14.24.5",
|
|
97
89
|
"@wise/wds-configs": "0.0.0"
|
|
98
90
|
},
|
|
99
91
|
"peerDependencies": {
|
|
@@ -106,15 +98,15 @@
|
|
|
106
98
|
"react-intl": "^5.10.0 || ^6"
|
|
107
99
|
},
|
|
108
100
|
"dependencies": {
|
|
109
|
-
"@babel/runtime": "^7.
|
|
110
|
-
"@floating-ui/react": "^0.27.
|
|
101
|
+
"@babel/runtime": "^7.28.2",
|
|
102
|
+
"@floating-ui/react": "^0.27.14",
|
|
111
103
|
"@headlessui/react": "^1.7.19",
|
|
112
104
|
"@popperjs/core": "^2.11.8",
|
|
113
|
-
"@react-aria/focus": "^3.
|
|
114
|
-
"@react-aria/overlays": "^3.
|
|
105
|
+
"@react-aria/focus": "^3.21.0",
|
|
106
|
+
"@react-aria/overlays": "^3.28.0",
|
|
115
107
|
"@react-spring/web": "~10.0.1",
|
|
116
|
-
"@transferwise/formatting": "^2.13.
|
|
117
|
-
"@transferwise/neptune-validation": "^3.3.
|
|
108
|
+
"@transferwise/formatting": "^2.13.4",
|
|
109
|
+
"@transferwise/neptune-validation": "^3.3.1",
|
|
118
110
|
"clsx": "^2.1.1",
|
|
119
111
|
"commonmark": "^0.31.2",
|
|
120
112
|
"core-js": "^3.44.0",
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
}@media (min-width: 768px) {
|
|
3
|
-
}.np-accordion-item {
|
|
1
|
+
.np-accordion-item {
|
|
4
2
|
display: block;
|
|
5
3
|
width: 100%;
|
|
6
|
-
}
|
|
4
|
+
}
|
|
5
|
+
.np-accordion-item--open .media {
|
|
7
6
|
border: 0 !important;
|
|
8
|
-
}
|
|
7
|
+
}
|
|
8
|
+
.np-accordion-item .decision:not(.disabled):not(:disabled):hover {
|
|
9
9
|
background-color: transparent;
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
|
+
.np-accordion-item.np-accordion-item--dark .media-body,
|
|
11
12
|
.np-accordion-item.np-accordion-item--dark .np-text-title-body {
|
|
12
13
|
color: #ffffff;
|
|
13
|
-
}
|
|
14
|
+
}
|
|
15
|
+
.np-accordion-item__content {
|
|
14
16
|
padding: 0 12px 24px 12px;
|
|
15
17
|
padding: 0 var(--size-12) var(--size-24) var(--size-12);
|
|
16
18
|
border-bottom: 1px solid rgba(0,0,0,0.10196);
|
|
17
19
|
border-bottom: 1px solid var(--color-border-neutral);
|
|
18
|
-
}
|
|
20
|
+
}
|
|
21
|
+
@media (min-width: 480px) {
|
|
19
22
|
.np-accordion-item__content.has-icon {
|
|
20
23
|
padding-left: 68px;
|
|
21
24
|
}
|
|
@@ -24,22 +27,28 @@
|
|
|
24
27
|
padding-left: 0;
|
|
25
28
|
padding-left: initial;
|
|
26
29
|
}
|
|
27
|
-
}
|
|
30
|
+
}
|
|
31
|
+
.np-accordion-item .np-option .np-option__title {
|
|
28
32
|
font-weight: 600;
|
|
29
33
|
font-weight: var(--font-weight-semi-bold);
|
|
30
|
-
}
|
|
34
|
+
}
|
|
35
|
+
.np-theme-personal .np-accordion-item--with-media .media {
|
|
31
36
|
display: flex;
|
|
32
37
|
align-items: center;
|
|
33
|
-
}
|
|
38
|
+
}
|
|
39
|
+
.np-theme-personal .np-accordion-item--with-icon .np-accordion-item__content {
|
|
34
40
|
padding: 0 56px 16px;
|
|
35
41
|
padding: 0 var(--size-56) var(--size-16);
|
|
36
|
-
}
|
|
42
|
+
}
|
|
43
|
+
.np-theme-personal .np-accordion-item--with-icon .media {
|
|
37
44
|
display: flex;
|
|
38
45
|
align-items: flex-start;
|
|
39
|
-
}
|
|
46
|
+
}
|
|
47
|
+
.np-theme-personal .np-accordion-item .decision__title {
|
|
40
48
|
font-size: 1.125rem;
|
|
41
49
|
font-size: var(--font-size-18);
|
|
42
|
-
}
|
|
50
|
+
}
|
|
51
|
+
.np-theme-personal .np-accordion-item .np-option .np-option__title {
|
|
43
52
|
margin-bottom: 0;
|
|
44
53
|
font-size: 1.125rem;
|
|
45
54
|
font-size: var(--font-size-18);
|
|
@@ -47,14 +56,16 @@
|
|
|
47
56
|
letter-spacing: var(--letter-spacing-negative-xs);
|
|
48
57
|
line-height: 1.5rem;
|
|
49
58
|
line-height: var(--line-height-24);
|
|
50
|
-
}
|
|
59
|
+
}
|
|
60
|
+
.np-theme-personal .np-accordion-item .np-option .circle-sm {
|
|
51
61
|
background-color: transparent;
|
|
52
62
|
width: 24px;
|
|
53
63
|
width: var(--size-24);
|
|
54
64
|
height: 24px;
|
|
55
65
|
height: var(--size-24);
|
|
56
66
|
border-radius: 0;
|
|
57
|
-
}
|
|
67
|
+
}
|
|
68
|
+
.np-theme-personal .np-accordion-item__content {
|
|
58
69
|
padding: 0 56px 16px 16px;
|
|
59
70
|
padding: 0 var(--size-56) var(--size-16) var(--size-16);
|
|
60
71
|
border-bottom: none;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
3
3
|
import { FastFlag as FastFlagIcon, CardWise as CardWiseIcon } from '@transferwise/icons';
|
|
4
4
|
|
|
5
5
|
import { Scroll, Size } from '../common';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
import { Settings } from '@transferwise/icons';
|
|
3
3
|
|
|
4
4
|
import { storyConfig } from '../test-utils/story-config';
|
|
@@ -12,7 +12,8 @@ import ActionButton from './ActionButton';
|
|
|
12
12
|
*/
|
|
13
13
|
export default {
|
|
14
14
|
component: ActionButton,
|
|
15
|
-
title: 'Actions/ActionButton
|
|
15
|
+
title: 'Actions/ActionButton',
|
|
16
|
+
tags: ['deprecated'],
|
|
16
17
|
} satisfies Meta<typeof ActionButton>;
|
|
17
18
|
|
|
18
19
|
type Story = StoryObj<typeof ActionButton>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { action } from '
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
1
|
+
import { action } from 'storybook/actions';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
3
3
|
import { FastFlag as FastFlagIcon } from '@transferwise/icons';
|
|
4
4
|
|
|
5
5
|
import { Nudge, Title, Typography } from '..';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import { action } from '
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
3
|
+
import { action } from 'storybook/actions';
|
|
4
4
|
import { ClockBorderless } from '@transferwise/icons';
|
|
5
5
|
|
|
6
6
|
import { lorem40 } from '../test-utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import { userEvent, within, expect, waitFor } from '
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
3
|
+
import { userEvent, within, expect, waitFor } from 'storybook/test';
|
|
4
4
|
import { Button, Field, SelectInput, Sentiment } from '..';
|
|
5
5
|
import Alert, { type AlertProps } from './Alert';
|
|
6
6
|
|
package/src/avatar/Avatar.css
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
}@media (min-width: 768px) {
|
|
3
|
-
}.tw-avatar {
|
|
1
|
+
.tw-avatar {
|
|
4
2
|
position: relative;
|
|
5
3
|
border-radius: 50%;
|
|
6
4
|
-webkit-user-select: none;
|
|
7
5
|
-moz-user-select: none;
|
|
8
6
|
user-select: none;
|
|
9
7
|
box-sizing: border-box;
|
|
10
|
-
}
|
|
8
|
+
}
|
|
9
|
+
.tw-avatar .tw-avatar__content {
|
|
11
10
|
align-items: center;
|
|
12
11
|
background-color: rgba(134,167,189,0.10196);
|
|
13
12
|
background-color: #86a7bd1a;
|
|
@@ -22,58 +21,73 @@
|
|
|
22
21
|
max-width: 100%;
|
|
23
22
|
overflow: hidden;
|
|
24
23
|
width: 100%;
|
|
25
|
-
}
|
|
24
|
+
}
|
|
25
|
+
.tw-avatar--outlined {
|
|
26
26
|
border: 1px solid #00a2dd;
|
|
27
27
|
border: 1px solid var(--color-interactive-accent);
|
|
28
28
|
cursor: pointer;
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
|
+
.tw-avatar--outlined:not(.disabled):not(:disabled):hover {
|
|
30
31
|
border-color: #008fc9;
|
|
31
32
|
border-color: var(--color-interactive-accent-hover);
|
|
32
|
-
}
|
|
33
|
+
}
|
|
34
|
+
.tw-avatar--thumbnail * {
|
|
33
35
|
width: 100%;
|
|
34
36
|
height: 100%;
|
|
35
37
|
-o-object-fit: cover;
|
|
36
38
|
object-fit: cover;
|
|
37
|
-
}
|
|
39
|
+
}
|
|
40
|
+
.tw-avatar--icon * {
|
|
38
41
|
max-height: 100%;
|
|
39
42
|
max-width: 100%;
|
|
40
|
-
}
|
|
43
|
+
}
|
|
44
|
+
.tw-avatar.tw-avatar--initials,
|
|
41
45
|
.tw-avatar.tw-avatar--emoji {
|
|
42
46
|
font-family: Arial, sans-serif;
|
|
43
47
|
font-weight: 600;
|
|
44
48
|
font-weight: var(--font-weight-semi-bold);
|
|
45
|
-
}
|
|
49
|
+
}
|
|
50
|
+
.tw-avatar.tw-avatar--initials,
|
|
46
51
|
.tw-avatar.tw-avatar--icon {
|
|
47
52
|
color: #37517e;
|
|
48
53
|
color: var(--color-content-primary);
|
|
49
|
-
}
|
|
54
|
+
}
|
|
55
|
+
.tw-avatar.tw-avatar--initials,
|
|
50
56
|
.tw-avatar.tw-avatar--emoji {
|
|
51
57
|
font-family: Arial, sans-serif;
|
|
52
|
-
}
|
|
58
|
+
}
|
|
59
|
+
.tw-avatar.tw-avatar--branded .tw-avatar__content {
|
|
53
60
|
font-family: 'Wise Sans', 'Inter', sans-serif;
|
|
54
61
|
font-family: var(--font-family-display);
|
|
55
62
|
font-feature-settings: "ss01";
|
|
56
63
|
color: var(--color-dark-charcoal);
|
|
57
64
|
line-height: 1;
|
|
58
|
-
}
|
|
65
|
+
}
|
|
66
|
+
.tw-avatar--24 {
|
|
59
67
|
min-width: 24px;
|
|
60
68
|
width: 24px;
|
|
61
69
|
height: 24px;
|
|
62
|
-
}
|
|
70
|
+
}
|
|
71
|
+
.tw-avatar--24.tw-avatar--emoji,
|
|
63
72
|
.tw-avatar--24.tw-avatar--icon {
|
|
64
73
|
font-size: 12px;
|
|
65
|
-
}
|
|
74
|
+
}
|
|
75
|
+
.tw-avatar--24.tw-avatar--initials {
|
|
66
76
|
font-size: 8.4px;
|
|
67
|
-
}
|
|
77
|
+
}
|
|
78
|
+
.tw-avatar--24.tw-avatar--branded {
|
|
68
79
|
font-size: 10.8px;
|
|
69
|
-
}
|
|
80
|
+
}
|
|
81
|
+
.tw-avatar--24.tw-avatar--outlined {
|
|
70
82
|
padding: 2px;
|
|
71
|
-
}
|
|
83
|
+
}
|
|
84
|
+
.tw-avatar--24.tw-avatar--outlined.tw-avatar--thumbnail::after {
|
|
72
85
|
top: 2px;
|
|
73
86
|
left: 2px;
|
|
74
87
|
right: 2px;
|
|
75
88
|
bottom: 2px;
|
|
76
|
-
}
|
|
89
|
+
}
|
|
90
|
+
.tw-avatar--24.tw-avatar--thumbnail::after {
|
|
77
91
|
position: absolute;
|
|
78
92
|
top: 0;
|
|
79
93
|
left: 0;
|
|
@@ -83,25 +97,32 @@
|
|
|
83
97
|
border: 1px solid var(--color-border-overlay);
|
|
84
98
|
content: "";
|
|
85
99
|
border-radius: 50%;
|
|
86
|
-
}
|
|
100
|
+
}
|
|
101
|
+
.tw-avatar--40 {
|
|
87
102
|
min-width: 40px;
|
|
88
103
|
width: 40px;
|
|
89
104
|
height: 40px;
|
|
90
|
-
}
|
|
105
|
+
}
|
|
106
|
+
.tw-avatar--40.tw-avatar--emoji,
|
|
91
107
|
.tw-avatar--40.tw-avatar--icon {
|
|
92
108
|
font-size: 20px;
|
|
93
|
-
}
|
|
109
|
+
}
|
|
110
|
+
.tw-avatar--40.tw-avatar--initials {
|
|
94
111
|
font-size: 14px;
|
|
95
|
-
}
|
|
112
|
+
}
|
|
113
|
+
.tw-avatar--40.tw-avatar--branded {
|
|
96
114
|
font-size: 18px;
|
|
97
|
-
}
|
|
115
|
+
}
|
|
116
|
+
.tw-avatar--40.tw-avatar--outlined {
|
|
98
117
|
padding: 2px;
|
|
99
|
-
}
|
|
118
|
+
}
|
|
119
|
+
.tw-avatar--40.tw-avatar--outlined.tw-avatar--thumbnail::after {
|
|
100
120
|
top: 2px;
|
|
101
121
|
left: 2px;
|
|
102
122
|
right: 2px;
|
|
103
123
|
bottom: 2px;
|
|
104
|
-
}
|
|
124
|
+
}
|
|
125
|
+
.tw-avatar--40.tw-avatar--thumbnail::after {
|
|
105
126
|
position: absolute;
|
|
106
127
|
top: 0;
|
|
107
128
|
left: 0;
|
|
@@ -111,25 +132,32 @@
|
|
|
111
132
|
border: 1px solid var(--color-border-overlay);
|
|
112
133
|
content: "";
|
|
113
134
|
border-radius: 50%;
|
|
114
|
-
}
|
|
135
|
+
}
|
|
136
|
+
.tw-avatar--48 {
|
|
115
137
|
min-width: 48px;
|
|
116
138
|
width: 48px;
|
|
117
139
|
height: 48px;
|
|
118
|
-
}
|
|
140
|
+
}
|
|
141
|
+
.tw-avatar--48.tw-avatar--emoji,
|
|
119
142
|
.tw-avatar--48.tw-avatar--icon {
|
|
120
143
|
font-size: 24px;
|
|
121
|
-
}
|
|
144
|
+
}
|
|
145
|
+
.tw-avatar--48.tw-avatar--initials {
|
|
122
146
|
font-size: 16.8px;
|
|
123
|
-
}
|
|
147
|
+
}
|
|
148
|
+
.tw-avatar--48.tw-avatar--branded {
|
|
124
149
|
font-size: 21.6px;
|
|
125
|
-
}
|
|
150
|
+
}
|
|
151
|
+
.tw-avatar--48.tw-avatar--outlined {
|
|
126
152
|
padding: 2px;
|
|
127
|
-
}
|
|
153
|
+
}
|
|
154
|
+
.tw-avatar--48.tw-avatar--outlined.tw-avatar--thumbnail::after {
|
|
128
155
|
top: 2px;
|
|
129
156
|
left: 2px;
|
|
130
157
|
right: 2px;
|
|
131
158
|
bottom: 2px;
|
|
132
|
-
}
|
|
159
|
+
}
|
|
160
|
+
.tw-avatar--48.tw-avatar--thumbnail::after {
|
|
133
161
|
position: absolute;
|
|
134
162
|
top: 0;
|
|
135
163
|
left: 0;
|
|
@@ -139,25 +167,32 @@
|
|
|
139
167
|
border: 1px solid var(--color-border-overlay);
|
|
140
168
|
content: "";
|
|
141
169
|
border-radius: 50%;
|
|
142
|
-
}
|
|
170
|
+
}
|
|
171
|
+
.tw-avatar--56 {
|
|
143
172
|
min-width: 56px;
|
|
144
173
|
width: 56px;
|
|
145
174
|
height: 56px;
|
|
146
|
-
}
|
|
175
|
+
}
|
|
176
|
+
.tw-avatar--56.tw-avatar--emoji,
|
|
147
177
|
.tw-avatar--56.tw-avatar--icon {
|
|
148
178
|
font-size: 28px;
|
|
149
|
-
}
|
|
179
|
+
}
|
|
180
|
+
.tw-avatar--56.tw-avatar--initials {
|
|
150
181
|
font-size: 19.6px;
|
|
151
|
-
}
|
|
182
|
+
}
|
|
183
|
+
.tw-avatar--56.tw-avatar--branded {
|
|
152
184
|
font-size: 25.2px;
|
|
153
|
-
}
|
|
185
|
+
}
|
|
186
|
+
.tw-avatar--56.tw-avatar--outlined {
|
|
154
187
|
padding: 2px;
|
|
155
|
-
}
|
|
188
|
+
}
|
|
189
|
+
.tw-avatar--56.tw-avatar--outlined.tw-avatar--thumbnail::after {
|
|
156
190
|
top: 2px;
|
|
157
191
|
left: 2px;
|
|
158
192
|
right: 2px;
|
|
159
193
|
bottom: 2px;
|
|
160
|
-
}
|
|
194
|
+
}
|
|
195
|
+
.tw-avatar--56.tw-avatar--thumbnail::after {
|
|
161
196
|
position: absolute;
|
|
162
197
|
top: 0;
|
|
163
198
|
left: 0;
|
|
@@ -167,25 +202,32 @@
|
|
|
167
202
|
border: 1px solid var(--color-border-overlay);
|
|
168
203
|
content: "";
|
|
169
204
|
border-radius: 50%;
|
|
170
|
-
}
|
|
205
|
+
}
|
|
206
|
+
.tw-avatar--72 {
|
|
171
207
|
min-width: 72px;
|
|
172
208
|
width: 72px;
|
|
173
209
|
height: 72px;
|
|
174
|
-
}
|
|
210
|
+
}
|
|
211
|
+
.tw-avatar--72.tw-avatar--emoji,
|
|
175
212
|
.tw-avatar--72.tw-avatar--icon {
|
|
176
213
|
font-size: 36px;
|
|
177
|
-
}
|
|
214
|
+
}
|
|
215
|
+
.tw-avatar--72.tw-avatar--initials {
|
|
178
216
|
font-size: 25.2px;
|
|
179
|
-
}
|
|
217
|
+
}
|
|
218
|
+
.tw-avatar--72.tw-avatar--branded {
|
|
180
219
|
font-size: 32.4px;
|
|
181
|
-
}
|
|
220
|
+
}
|
|
221
|
+
.tw-avatar--72.tw-avatar--outlined {
|
|
182
222
|
padding: 2px;
|
|
183
|
-
}
|
|
223
|
+
}
|
|
224
|
+
.tw-avatar--72.tw-avatar--outlined.tw-avatar--thumbnail::after {
|
|
184
225
|
top: 2px;
|
|
185
226
|
left: 2px;
|
|
186
227
|
right: 2px;
|
|
187
228
|
bottom: 2px;
|
|
188
|
-
}
|
|
229
|
+
}
|
|
230
|
+
.tw-avatar--72.tw-avatar--thumbnail::after {
|
|
189
231
|
position: absolute;
|
|
190
232
|
top: 0;
|
|
191
233
|
left: 0;
|
|
@@ -195,11 +237,14 @@
|
|
|
195
237
|
border: 1px solid var(--color-border-overlay);
|
|
196
238
|
content: "";
|
|
197
239
|
border-radius: 50%;
|
|
198
|
-
}
|
|
240
|
+
}
|
|
241
|
+
.tw-avatar img {
|
|
199
242
|
width: 100%;
|
|
200
243
|
height: 100%;
|
|
201
|
-
}
|
|
244
|
+
}
|
|
245
|
+
.np-theme-personal .tw-avatar--outlined {
|
|
202
246
|
border-color: var(--color-interactive-primary);
|
|
203
|
-
}
|
|
247
|
+
}
|
|
248
|
+
.np-theme-personal .tw-avatar--outlined:not(.disabled):not(:disabled):hover {
|
|
204
249
|
border-color: var(--color-interactive-primary-hover);
|
|
205
250
|
}
|
|
@@ -37,7 +37,7 @@ describe('Avatar', () => {
|
|
|
37
37
|
describe('branded avatar colors', () => {
|
|
38
38
|
it.each(avatarColorTestCases)(
|
|
39
39
|
'for seed of $key return background color of `$color.token`',
|
|
40
|
-
(item) => {
|
|
40
|
+
(item: { key: string | number; color: { hex: string; token: string } }) => {
|
|
41
41
|
render(<Avatar backgroundColorSeed={item.key.toString()}>JS</Avatar>);
|
|
42
42
|
|
|
43
43
|
expect(screen.getByText('JS')).toHaveStyle(`background-color: var(${item.color.token})`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
import * as wiseIcons from '@transferwise/icons';
|
|
3
3
|
import { Flag } from '@wise/art';
|
|
4
4
|
|
|
@@ -12,7 +12,8 @@ import Avatar, { AvatarType } from '.';
|
|
|
12
12
|
*/
|
|
13
13
|
export default {
|
|
14
14
|
component: Avatar,
|
|
15
|
-
title: 'Content/Avatar
|
|
15
|
+
title: 'Content/Avatar',
|
|
16
|
+
tags: ['deprecated'],
|
|
16
17
|
} satisfies Meta<typeof Avatar>;
|
|
17
18
|
|
|
18
19
|
type Story = StoryObj<typeof Avatar>;
|