@transferwise/components 46.96.0 → 46.97.0
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/main.css +16 -1
- package/build/progressBar/ProgressBar.js.map +1 -1
- package/build/progressBar/ProgressBar.mjs.map +1 -1
- package/build/styles/inputs/Input.css +2 -0
- package/build/styles/inputs/TextArea.css +2 -0
- package/build/styles/main.css +16 -1
- package/build/styles/popover/Popover.css +2 -0
- package/build/styles/statusIcon/StatusIcon.css +12 -1
- package/build/types/progressBar/ProgressBar.d.ts +3 -3
- package/build/types/progressBar/ProgressBar.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/inputs/Input.css +2 -0
- package/src/inputs/TextArea.css +2 -0
- package/src/main.css +16 -1
- package/src/popover/Popover.css +2 -0
- package/src/progressBar/ProgressBar.spec.tsx +33 -8
- package/src/progressBar/ProgressBar.story.tsx +15 -0
- package/src/progressBar/ProgressBar.tsx +3 -3
- package/src/statusIcon/StatusIcon.css +12 -1
- package/src/statusIcon/StatusIcon.less +11 -1
- package/src/statusIcon/StatusIcon.story.tsx +37 -30
- package/src/title/Title.test.story.tsx +25 -0
package/build/main.css
CHANGED
|
@@ -2585,6 +2585,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2585
2585
|
line-height: 1.2;
|
|
2586
2586
|
line-height: var(--line-height-title);
|
|
2587
2587
|
letter-spacing: 0;
|
|
2588
|
+
-webkit-hyphens: auto;
|
|
2589
|
+
hyphens: auto;
|
|
2588
2590
|
margin-bottom: 0;
|
|
2589
2591
|
margin-bottom: initial;
|
|
2590
2592
|
font-size: 1.375rem;
|
|
@@ -4021,6 +4023,8 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4021
4023
|
line-height: 1.2;
|
|
4022
4024
|
line-height: var(--line-height-title);
|
|
4023
4025
|
letter-spacing: 0;
|
|
4026
|
+
-webkit-hyphens: auto;
|
|
4027
|
+
hyphens: auto;
|
|
4024
4028
|
margin-bottom: 0;
|
|
4025
4029
|
margin-bottom: initial;
|
|
4026
4030
|
font-weight: 600;
|
|
@@ -4435,7 +4439,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4435
4439
|
}
|
|
4436
4440
|
}
|
|
4437
4441
|
.status-circle .light {
|
|
4438
|
-
color: var(--color-contrast);
|
|
4442
|
+
color: var(--color-contrast-overlay);
|
|
4443
|
+
}
|
|
4444
|
+
.np-theme-personal--bright-green .status-circle .light {
|
|
4445
|
+
color: var(--color-white);
|
|
4439
4446
|
}
|
|
4440
4447
|
.status-circle .dark {
|
|
4441
4448
|
color: #37517e;
|
|
@@ -4453,6 +4460,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4453
4460
|
.status-circle.error {
|
|
4454
4461
|
background-color: var(--color-sentiment-negative);
|
|
4455
4462
|
}
|
|
4463
|
+
.status-circle.negative .status-icon,
|
|
4464
|
+
.status-circle.error .status-icon {
|
|
4465
|
+
color: var(--color-sentiment-negative-secondary);
|
|
4466
|
+
}
|
|
4456
4467
|
.status-circle.neutral {
|
|
4457
4468
|
background-color: #5d7079;
|
|
4458
4469
|
background-color: var(--color-content-secondary);
|
|
@@ -4461,6 +4472,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4461
4472
|
.status-circle.success {
|
|
4462
4473
|
background-color: var(--color-sentiment-positive);
|
|
4463
4474
|
}
|
|
4475
|
+
.status-circle.positive .status-icon,
|
|
4476
|
+
.status-circle.success .status-icon {
|
|
4477
|
+
color: var(--color-sentiment-positive-secondary);
|
|
4478
|
+
}
|
|
4464
4479
|
.tw-stepper {
|
|
4465
4480
|
padding-bottom: 24px;
|
|
4466
4481
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sources":["../../src/progressBar/ProgressBar.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\n\nimport Body from '../body';\nimport { Typography } from '../common';\nimport Progress from '../progress';\nimport Title from '../title/Title';\n\nexport type ProgressBarProps = {\n className?: string;\n description?:
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sources":["../../src/progressBar/ProgressBar.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\n\nimport Body from '../body';\nimport { Typography } from '../common';\nimport Progress from '../progress';\nimport Title from '../title/Title';\n\nexport type ProgressBarProps = {\n className?: string;\n description?: React.ReactNode;\n id: string;\n title: React.ReactNode;\n progress: { value: number; max: number };\n textEnd: React.ReactNode;\n};\n\nconst ProgressBar = ({\n className,\n description,\n id,\n title,\n progress,\n textEnd,\n}: ProgressBarProps) => {\n const { isModern } = useTheme();\n return (\n <div className={clsx('np-progress-bar', className)}>\n <label className=\"np-progress-bar__title m-b-1\" htmlFor={id}>\n <Title\n type={Typography.TITLE_BODY}\n className={isModern ? `m-b-1 text-primary` : `text-primary`}\n >\n {title}\n </Title>\n {description && <Body>{description}</Body>}\n </label>\n <Progress id={id} progress={progress} />\n <Body\n as=\"p\"\n type={Typography.BODY_DEFAULT_BOLD}\n className=\"d-flex justify-content-end text-primary m-b-0\"\n >\n {textEnd}\n </Body>\n </div>\n );\n};\n\nexport default ProgressBar;\n"],"names":["ProgressBar","className","description","id","title","progress","textEnd","isModern","useTheme","_jsxs","clsx","children","htmlFor","_jsx","Title","type","Typography","TITLE_BODY","Body","Progress","as","BODY_DEFAULT_BOLD"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBMA,MAAAA,WAAW,GAAGA,CAAC;EACnBC,SAAS;EACTC,WAAW;EACXC,EAAE;EACFC,KAAK;EACLC,QAAQ;AACRC,EAAAA,OAAAA;AAAO,CACU,KAAI;EACrB,MAAM;AAAEC,IAAAA,QAAAA;GAAU,GAAGC,0BAAQ,EAAE,CAAA;AAC/B,EAAA,oBACEC,eAAA,CAAA,KAAA,EAAA;AAAKR,IAAAA,SAAS,EAAES,SAAI,CAAC,iBAAiB,EAAET,SAAS,CAAE;AAAAU,IAAAA,QAAA,gBACjDF,eAAA,CAAA,OAAA,EAAA;AAAOR,MAAAA,SAAS,EAAC,8BAA8B;AAACW,MAAAA,OAAO,EAAET,EAAG;MAAAQ,QAAA,EAAA,cAC1DE,cAAA,CAACC,aAAK,EAAA;QACJC,IAAI,EAAEC,qBAAU,CAACC,UAAW;AAC5BhB,QAAAA,SAAS,EAAEM,QAAQ,GAAG,CAAA,kBAAA,CAAoB,GAAG,CAAe,YAAA,CAAA;AAAAI,QAAAA,QAAA,EAE3DP,KAAAA;AAAK,OACD,CACP,EAACF,WAAW,iBAAIW,cAAA,CAACK,YAAI,EAAA;AAAAP,QAAAA,QAAA,EAAET,WAAAA;AAAW,OAAO,CAAC,CAAA;AAAA,KACrC,CACP,eAAAW,cAAA,CAACM,gBAAQ,EAAA;AAAChB,MAAAA,EAAE,EAAEA,EAAG;AAACE,MAAAA,QAAQ,EAAEA,QAAAA;AAAS,KACrC,CAAA,eAAAQ,cAAA,CAACK,YAAI,EAAA;AACHE,MAAAA,EAAE,EAAC,GAAG;MACNL,IAAI,EAAEC,qBAAU,CAACK,iBAAkB;AACnCpB,MAAAA,SAAS,EAAC,+CAA+C;AAAAU,MAAAA,QAAA,EAExDL,OAAAA;AAAO,KACJ,CACR,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.mjs","sources":["../../src/progressBar/ProgressBar.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\n\nimport Body from '../body';\nimport { Typography } from '../common';\nimport Progress from '../progress';\nimport Title from '../title/Title';\n\nexport type ProgressBarProps = {\n className?: string;\n description?:
|
|
1
|
+
{"version":3,"file":"ProgressBar.mjs","sources":["../../src/progressBar/ProgressBar.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\n\nimport Body from '../body';\nimport { Typography } from '../common';\nimport Progress from '../progress';\nimport Title from '../title/Title';\n\nexport type ProgressBarProps = {\n className?: string;\n description?: React.ReactNode;\n id: string;\n title: React.ReactNode;\n progress: { value: number; max: number };\n textEnd: React.ReactNode;\n};\n\nconst ProgressBar = ({\n className,\n description,\n id,\n title,\n progress,\n textEnd,\n}: ProgressBarProps) => {\n const { isModern } = useTheme();\n return (\n <div className={clsx('np-progress-bar', className)}>\n <label className=\"np-progress-bar__title m-b-1\" htmlFor={id}>\n <Title\n type={Typography.TITLE_BODY}\n className={isModern ? `m-b-1 text-primary` : `text-primary`}\n >\n {title}\n </Title>\n {description && <Body>{description}</Body>}\n </label>\n <Progress id={id} progress={progress} />\n <Body\n as=\"p\"\n type={Typography.BODY_DEFAULT_BOLD}\n className=\"d-flex justify-content-end text-primary m-b-0\"\n >\n {textEnd}\n </Body>\n </div>\n );\n};\n\nexport default ProgressBar;\n"],"names":["ProgressBar","className","description","id","title","progress","textEnd","isModern","useTheme","_jsxs","clsx","children","htmlFor","_jsx","Title","type","Typography","TITLE_BODY","Body","Progress","as","BODY_DEFAULT_BOLD"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBMA,MAAAA,WAAW,GAAGA,CAAC;EACnBC,SAAS;EACTC,WAAW;EACXC,EAAE;EACFC,KAAK;EACLC,QAAQ;AACRC,EAAAA,OAAAA;AAAO,CACU,KAAI;EACrB,MAAM;AAAEC,IAAAA,QAAAA;GAAU,GAAGC,QAAQ,EAAE,CAAA;AAC/B,EAAA,oBACEC,IAAA,CAAA,KAAA,EAAA;AAAKR,IAAAA,SAAS,EAAES,IAAI,CAAC,iBAAiB,EAAET,SAAS,CAAE;AAAAU,IAAAA,QAAA,gBACjDF,IAAA,CAAA,OAAA,EAAA;AAAOR,MAAAA,SAAS,EAAC,8BAA8B;AAACW,MAAAA,OAAO,EAAET,EAAG;MAAAQ,QAAA,EAAA,cAC1DE,GAAA,CAACC,KAAK,EAAA;QACJC,IAAI,EAAEC,UAAU,CAACC,UAAW;AAC5BhB,QAAAA,SAAS,EAAEM,QAAQ,GAAG,CAAA,kBAAA,CAAoB,GAAG,CAAe,YAAA,CAAA;AAAAI,QAAAA,QAAA,EAE3DP,KAAAA;AAAK,OACD,CACP,EAACF,WAAW,iBAAIW,GAAA,CAACK,IAAI,EAAA;AAAAP,QAAAA,QAAA,EAAET,WAAAA;AAAW,OAAO,CAAC,CAAA;AAAA,KACrC,CACP,eAAAW,GAAA,CAACM,QAAQ,EAAA;AAAChB,MAAAA,EAAE,EAAEA,EAAG;AAACE,MAAAA,QAAQ,EAAEA,QAAAA;AAAS,KACrC,CAAA,eAAAQ,GAAA,CAACK,IAAI,EAAA;AACHE,MAAAA,EAAE,EAAC,GAAG;MACNL,IAAI,EAAEC,UAAU,CAACK,iBAAkB;AACnCpB,MAAAA,SAAS,EAAC,+CAA+C;AAAAU,MAAAA,QAAA,EAExDL,OAAAA;AAAO,KACJ,CACR,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
package/build/styles/main.css
CHANGED
|
@@ -2585,6 +2585,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2585
2585
|
line-height: 1.2;
|
|
2586
2586
|
line-height: var(--line-height-title);
|
|
2587
2587
|
letter-spacing: 0;
|
|
2588
|
+
-webkit-hyphens: auto;
|
|
2589
|
+
hyphens: auto;
|
|
2588
2590
|
margin-bottom: 0;
|
|
2589
2591
|
margin-bottom: initial;
|
|
2590
2592
|
font-size: 1.375rem;
|
|
@@ -4021,6 +4023,8 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4021
4023
|
line-height: 1.2;
|
|
4022
4024
|
line-height: var(--line-height-title);
|
|
4023
4025
|
letter-spacing: 0;
|
|
4026
|
+
-webkit-hyphens: auto;
|
|
4027
|
+
hyphens: auto;
|
|
4024
4028
|
margin-bottom: 0;
|
|
4025
4029
|
margin-bottom: initial;
|
|
4026
4030
|
font-weight: 600;
|
|
@@ -4435,7 +4439,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4435
4439
|
}
|
|
4436
4440
|
}
|
|
4437
4441
|
.status-circle .light {
|
|
4438
|
-
color: var(--color-contrast);
|
|
4442
|
+
color: var(--color-contrast-overlay);
|
|
4443
|
+
}
|
|
4444
|
+
.np-theme-personal--bright-green .status-circle .light {
|
|
4445
|
+
color: var(--color-white);
|
|
4439
4446
|
}
|
|
4440
4447
|
.status-circle .dark {
|
|
4441
4448
|
color: #37517e;
|
|
@@ -4453,6 +4460,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4453
4460
|
.status-circle.error {
|
|
4454
4461
|
background-color: var(--color-sentiment-negative);
|
|
4455
4462
|
}
|
|
4463
|
+
.status-circle.negative .status-icon,
|
|
4464
|
+
.status-circle.error .status-icon {
|
|
4465
|
+
color: var(--color-sentiment-negative-secondary);
|
|
4466
|
+
}
|
|
4456
4467
|
.status-circle.neutral {
|
|
4457
4468
|
background-color: #5d7079;
|
|
4458
4469
|
background-color: var(--color-content-secondary);
|
|
@@ -4461,6 +4472,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4461
4472
|
.status-circle.success {
|
|
4462
4473
|
background-color: var(--color-sentiment-positive);
|
|
4463
4474
|
}
|
|
4475
|
+
.status-circle.positive .status-icon,
|
|
4476
|
+
.status-circle.success .status-icon {
|
|
4477
|
+
color: var(--color-sentiment-positive-secondary);
|
|
4478
|
+
}
|
|
4464
4479
|
.tw-stepper {
|
|
4465
4480
|
padding-bottom: 24px;
|
|
4466
4481
|
width: 100%;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
.status-circle .light {
|
|
2
|
-
color: var(--color-contrast);
|
|
2
|
+
color: var(--color-contrast-overlay);
|
|
3
|
+
}
|
|
4
|
+
.np-theme-personal--bright-green .status-circle .light {
|
|
5
|
+
color: var(--color-white);
|
|
3
6
|
}
|
|
4
7
|
.status-circle .dark {
|
|
5
8
|
color: #37517e;
|
|
@@ -17,6 +20,10 @@
|
|
|
17
20
|
.status-circle.error {
|
|
18
21
|
background-color: var(--color-sentiment-negative);
|
|
19
22
|
}
|
|
23
|
+
.status-circle.negative .status-icon,
|
|
24
|
+
.status-circle.error .status-icon {
|
|
25
|
+
color: var(--color-sentiment-negative-secondary);
|
|
26
|
+
}
|
|
20
27
|
.status-circle.neutral {
|
|
21
28
|
background-color: #5d7079;
|
|
22
29
|
background-color: var(--color-content-secondary);
|
|
@@ -25,3 +32,7 @@
|
|
|
25
32
|
.status-circle.success {
|
|
26
33
|
background-color: var(--color-sentiment-positive);
|
|
27
34
|
}
|
|
35
|
+
.status-circle.positive .status-icon,
|
|
36
|
+
.status-circle.success .status-icon {
|
|
37
|
+
color: var(--color-sentiment-positive-secondary);
|
|
38
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export type ProgressBarProps = {
|
|
2
2
|
className?: string;
|
|
3
|
-
description?:
|
|
3
|
+
description?: React.ReactNode;
|
|
4
4
|
id: string;
|
|
5
|
-
title:
|
|
5
|
+
title: React.ReactNode;
|
|
6
6
|
progress: {
|
|
7
7
|
value: number;
|
|
8
8
|
max: number;
|
|
9
9
|
};
|
|
10
|
-
textEnd:
|
|
10
|
+
textEnd: React.ReactNode;
|
|
11
11
|
};
|
|
12
12
|
declare const ProgressBar: ({ className, description, id, title, progress, textEnd, }: ProgressBarProps) => import("react").JSX.Element;
|
|
13
13
|
export default ProgressBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/progressBar/ProgressBar.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/progressBar/ProgressBar.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,WAAW,8DAOd,gBAAgB,gCAuBlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.97.0",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@testing-library/jest-dom": "^6.4.6",
|
|
69
69
|
"@testing-library/react": "^16.0.0",
|
|
70
70
|
"@testing-library/user-event": "^14.5.2",
|
|
71
|
-
"@transferwise/icons": "^3.
|
|
71
|
+
"@transferwise/icons": "^3.21.0",
|
|
72
72
|
"@tsconfig/recommended": "^1.0.7",
|
|
73
73
|
"@types/babel__core": "^7.20.5",
|
|
74
74
|
"@types/commonmark": "^0.27.9",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@wise/eslint-config": "^12.3.0",
|
|
85
85
|
"babel-plugin-formatjs": "^10.5.16",
|
|
86
86
|
"enzyme": "^3.11.0",
|
|
87
|
-
"eslint": "^9.
|
|
87
|
+
"eslint": "^9.26.0",
|
|
88
88
|
"gulp": "^5.0.0",
|
|
89
89
|
"jest": "^29.7.0",
|
|
90
90
|
"jest-environment-jsdom": "^29.7.0",
|
|
@@ -95,12 +95,12 @@
|
|
|
95
95
|
"rollup-preserve-directives": "^1.1.1",
|
|
96
96
|
"storybook": "^8.2.2",
|
|
97
97
|
"@transferwise/less-config": "3.1.1",
|
|
98
|
+
"@transferwise/neptune-css": "14.24.3",
|
|
98
99
|
"@wise/components-theming": "1.6.2",
|
|
99
|
-
"@transferwise/neptune-css": "14.24.2",
|
|
100
100
|
"@wise/wds-configs": "0.0.0"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
|
-
"@transferwise/icons": "^3.
|
|
103
|
+
"@transferwise/icons": "^3.21.0",
|
|
104
104
|
"@transferwise/neptune-css": "^14.24",
|
|
105
105
|
"@wise/art": "^2.16",
|
|
106
106
|
"@wise/components-theming": "^1.0.0",
|
package/src/inputs/Input.css
CHANGED
package/src/inputs/TextArea.css
CHANGED
package/src/main.css
CHANGED
|
@@ -2585,6 +2585,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2585
2585
|
line-height: 1.2;
|
|
2586
2586
|
line-height: var(--line-height-title);
|
|
2587
2587
|
letter-spacing: 0;
|
|
2588
|
+
-webkit-hyphens: auto;
|
|
2589
|
+
hyphens: auto;
|
|
2588
2590
|
margin-bottom: 0;
|
|
2589
2591
|
margin-bottom: initial;
|
|
2590
2592
|
font-size: 1.375rem;
|
|
@@ -4021,6 +4023,8 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4021
4023
|
line-height: 1.2;
|
|
4022
4024
|
line-height: var(--line-height-title);
|
|
4023
4025
|
letter-spacing: 0;
|
|
4026
|
+
-webkit-hyphens: auto;
|
|
4027
|
+
hyphens: auto;
|
|
4024
4028
|
margin-bottom: 0;
|
|
4025
4029
|
margin-bottom: initial;
|
|
4026
4030
|
font-weight: 600;
|
|
@@ -4435,7 +4439,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4435
4439
|
}
|
|
4436
4440
|
}
|
|
4437
4441
|
.status-circle .light {
|
|
4438
|
-
color: var(--color-contrast);
|
|
4442
|
+
color: var(--color-contrast-overlay);
|
|
4443
|
+
}
|
|
4444
|
+
.np-theme-personal--bright-green .status-circle .light {
|
|
4445
|
+
color: var(--color-white);
|
|
4439
4446
|
}
|
|
4440
4447
|
.status-circle .dark {
|
|
4441
4448
|
color: #37517e;
|
|
@@ -4453,6 +4460,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4453
4460
|
.status-circle.error {
|
|
4454
4461
|
background-color: var(--color-sentiment-negative);
|
|
4455
4462
|
}
|
|
4463
|
+
.status-circle.negative .status-icon,
|
|
4464
|
+
.status-circle.error .status-icon {
|
|
4465
|
+
color: var(--color-sentiment-negative-secondary);
|
|
4466
|
+
}
|
|
4456
4467
|
.status-circle.neutral {
|
|
4457
4468
|
background-color: #5d7079;
|
|
4458
4469
|
background-color: var(--color-content-secondary);
|
|
@@ -4461,6 +4472,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4461
4472
|
.status-circle.success {
|
|
4462
4473
|
background-color: var(--color-sentiment-positive);
|
|
4463
4474
|
}
|
|
4475
|
+
.status-circle.positive .status-icon,
|
|
4476
|
+
.status-circle.success .status-icon {
|
|
4477
|
+
color: var(--color-sentiment-positive-secondary);
|
|
4478
|
+
}
|
|
4464
4479
|
.tw-stepper {
|
|
4465
4480
|
padding-bottom: 24px;
|
|
4466
4481
|
width: 100%;
|
package/src/popover/Popover.css
CHANGED
|
@@ -3,15 +3,15 @@ import { render, screen } from '../test-utils';
|
|
|
3
3
|
import ProgressBar from './ProgressBar';
|
|
4
4
|
|
|
5
5
|
describe('ProgressBar', () => {
|
|
6
|
-
const props = {
|
|
7
|
-
description: 'description',
|
|
8
|
-
title: 'title',
|
|
9
|
-
progress: { value: 50, max: 100 },
|
|
10
|
-
textEnd: 'textEnd',
|
|
11
|
-
className: 'className',
|
|
12
|
-
id: 'id',
|
|
13
|
-
};
|
|
14
6
|
describe('by default', () => {
|
|
7
|
+
const props = {
|
|
8
|
+
description: 'description',
|
|
9
|
+
title: 'title',
|
|
10
|
+
progress: { value: 50, max: 100 },
|
|
11
|
+
textEnd: 'textEnd',
|
|
12
|
+
className: 'className',
|
|
13
|
+
id: 'id',
|
|
14
|
+
};
|
|
15
15
|
beforeEach(() => {
|
|
16
16
|
render(<ProgressBar {...props} />);
|
|
17
17
|
});
|
|
@@ -28,4 +28,29 @@ describe('ProgressBar', () => {
|
|
|
28
28
|
expect(screen.getByText('textEnd')).toBeInTheDocument();
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
|
+
describe('with custom React node type as props', () => {
|
|
32
|
+
const props = {
|
|
33
|
+
description: <span>Custom Description</span>,
|
|
34
|
+
title: <span>Custom Title</span>,
|
|
35
|
+
progress: { value: 50, max: 100 },
|
|
36
|
+
textEnd: <span>Custom TextEnd</span>,
|
|
37
|
+
className: 'className',
|
|
38
|
+
id: 'id',
|
|
39
|
+
};
|
|
40
|
+
beforeEach(() => {
|
|
41
|
+
render(<ProgressBar {...props} />);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('renders the custom title', () => {
|
|
45
|
+
expect(screen.getByText('Custom Title')).toBeInTheDocument();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('renders the custom description', () => {
|
|
49
|
+
expect(screen.getByText('Custom Description')).toBeInTheDocument();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('renders the custom textEnd', () => {
|
|
53
|
+
expect(screen.getByText('Custom TextEnd')).toBeInTheDocument();
|
|
54
|
+
});
|
|
55
|
+
});
|
|
31
56
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
|
|
3
3
|
import ProgressBar from './ProgressBar';
|
|
4
|
+
import Info from '../info';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
component: ProgressBar,
|
|
@@ -19,3 +20,17 @@ export const Basic: Story = {
|
|
|
19
20
|
textEnd: '200 GBP to go',
|
|
20
21
|
},
|
|
21
22
|
};
|
|
23
|
+
|
|
24
|
+
export const WithInfoTooltip: Story = {
|
|
25
|
+
args: {
|
|
26
|
+
description: <span>1,000 GBP</span>,
|
|
27
|
+
id: 'progress-bar-id',
|
|
28
|
+
title: (
|
|
29
|
+
<span>
|
|
30
|
+
Total limit <Info content="This is the total limit of your Wise account" />
|
|
31
|
+
</span>
|
|
32
|
+
),
|
|
33
|
+
progress: { value: 800, max: 1000 },
|
|
34
|
+
textEnd: <span>200 GBP remaining</span>,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -8,11 +8,11 @@ import Title from '../title/Title';
|
|
|
8
8
|
|
|
9
9
|
export type ProgressBarProps = {
|
|
10
10
|
className?: string;
|
|
11
|
-
description?:
|
|
11
|
+
description?: React.ReactNode;
|
|
12
12
|
id: string;
|
|
13
|
-
title:
|
|
13
|
+
title: React.ReactNode;
|
|
14
14
|
progress: { value: number; max: number };
|
|
15
|
-
textEnd:
|
|
15
|
+
textEnd: React.ReactNode;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
const ProgressBar = ({
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
.status-circle .light {
|
|
2
|
-
color: var(--color-contrast);
|
|
2
|
+
color: var(--color-contrast-overlay);
|
|
3
|
+
}
|
|
4
|
+
.np-theme-personal--bright-green .status-circle .light {
|
|
5
|
+
color: var(--color-white);
|
|
3
6
|
}
|
|
4
7
|
.status-circle .dark {
|
|
5
8
|
color: #37517e;
|
|
@@ -17,6 +20,10 @@
|
|
|
17
20
|
.status-circle.error {
|
|
18
21
|
background-color: var(--color-sentiment-negative);
|
|
19
22
|
}
|
|
23
|
+
.status-circle.negative .status-icon,
|
|
24
|
+
.status-circle.error .status-icon {
|
|
25
|
+
color: var(--color-sentiment-negative-secondary);
|
|
26
|
+
}
|
|
20
27
|
.status-circle.neutral {
|
|
21
28
|
background-color: #5d7079;
|
|
22
29
|
background-color: var(--color-content-secondary);
|
|
@@ -25,3 +32,7 @@
|
|
|
25
32
|
.status-circle.success {
|
|
26
33
|
background-color: var(--color-sentiment-positive);
|
|
27
34
|
}
|
|
35
|
+
.status-circle.positive .status-icon,
|
|
36
|
+
.status-circle.success .status-icon {
|
|
37
|
+
color: var(--color-sentiment-positive-secondary);
|
|
38
|
+
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
.status-circle {
|
|
2
2
|
.light {
|
|
3
|
-
color: var(--color-contrast);
|
|
3
|
+
color: var(--color-contrast-overlay);
|
|
4
|
+
|
|
5
|
+
.np-theme-personal--bright-green & {
|
|
6
|
+
color: var(--color-white);
|
|
7
|
+
}
|
|
4
8
|
}
|
|
5
9
|
|
|
6
10
|
.dark {
|
|
@@ -22,6 +26,9 @@
|
|
|
22
26
|
.status-circle.negative,
|
|
23
27
|
.status-circle.error {
|
|
24
28
|
background-color: var(--color-sentiment-negative);
|
|
29
|
+
.status-icon {
|
|
30
|
+
color: var(--color-sentiment-negative-secondary);
|
|
31
|
+
}
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
.status-circle.neutral {
|
|
@@ -31,4 +38,7 @@
|
|
|
31
38
|
.status-circle.positive,
|
|
32
39
|
.status-circle.success {
|
|
33
40
|
background-color: var(--color-sentiment-positive);
|
|
41
|
+
.status-icon {
|
|
42
|
+
color: var(--color-sentiment-positive-secondary);
|
|
43
|
+
}
|
|
34
44
|
}
|
|
@@ -3,6 +3,7 @@ import { Meta, StoryObj } from '@storybook/react';
|
|
|
3
3
|
import { Sentiment, Size } from '../common';
|
|
4
4
|
|
|
5
5
|
import StatusIcon from './StatusIcon';
|
|
6
|
+
import { storyConfig } from '../test-utils';
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
component: StatusIcon,
|
|
@@ -28,36 +29,42 @@ export const Presentational: Story = {
|
|
|
28
29
|
},
|
|
29
30
|
};
|
|
30
31
|
|
|
31
|
-
export const Variants
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
32
|
+
export const Variants = storyConfig(
|
|
33
|
+
{
|
|
34
|
+
parameters: {
|
|
35
|
+
padding: '0',
|
|
36
|
+
},
|
|
37
|
+
render: () => (
|
|
38
|
+
<span style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '400px' }}>
|
|
39
|
+
{[
|
|
40
|
+
Sentiment.POSITIVE,
|
|
41
|
+
Sentiment.NEGATIVE,
|
|
42
|
+
Sentiment.WARNING,
|
|
43
|
+
Sentiment.NEUTRAL,
|
|
44
|
+
Sentiment.PENDING,
|
|
45
|
+
].map((sentiment) => {
|
|
46
|
+
return (
|
|
47
|
+
<span
|
|
48
|
+
key={sentiment}
|
|
49
|
+
style={{
|
|
50
|
+
display: 'flex',
|
|
51
|
+
justifyContent: 'space-between',
|
|
52
|
+
flexDirection: 'column',
|
|
53
|
+
minHeight: '150px',
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
{([16, 24, 32, 40, 48, 56, 72] as const).map((size) => {
|
|
58
|
+
return <StatusIcon key={size} size={size} sentiment={sentiment} />;
|
|
59
|
+
})}
|
|
60
|
+
</span>
|
|
61
|
+
);
|
|
62
|
+
})}
|
|
63
|
+
</span>
|
|
64
|
+
),
|
|
65
|
+
},
|
|
66
|
+
{ variants: ['default', 'dark', 'bright-green', 'forest-green'] },
|
|
67
|
+
);
|
|
61
68
|
|
|
62
69
|
export const LegacySizes: Story = {
|
|
63
70
|
render: () => (
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Typography } from '../common/propsValues/typography';
|
|
2
|
+
import Modal from '../modal';
|
|
3
|
+
import { lorem1000 } from '../test-utils';
|
|
4
|
+
|
|
5
|
+
import Title from './Title';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: Title,
|
|
9
|
+
title: 'Typography/Title/Tests',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const Hyphenation = () => {
|
|
13
|
+
return (
|
|
14
|
+
<Modal
|
|
15
|
+
open
|
|
16
|
+
body={
|
|
17
|
+
<Title type={Typography.TITLE_SCREEN} style={{ maxWidth: '600px' }}>
|
|
18
|
+
This Screen Title is mostly one very long word and it hyphenates{' '}
|
|
19
|
+
{lorem1000.replaceAll(' ', '')}
|
|
20
|
+
</Title>
|
|
21
|
+
}
|
|
22
|
+
onClose={() => {}}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
};
|