@transferwise/components 0.0.0-experimental-fed4f10 → 0.0.0-experimental-8d08be7
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/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/common/propsValues/sentiment.js +1 -0
- package/build/common/propsValues/sentiment.js.map +1 -1
- package/build/common/propsValues/sentiment.mjs +1 -0
- package/build/common/propsValues/sentiment.mjs.map +1 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -1
- package/build/main.css +60 -188
- package/build/statusIcon/StatusIcon.js +2 -2
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +2 -2
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/inputs/Input.css +28 -2
- package/build/styles/inputs/TextArea.css +28 -2
- package/build/styles/main.css +60 -188
- package/build/styles/popover/Popover.css +28 -2
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs.map +1 -1
- package/build/types/alert/Alert.d.ts +2 -2
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +2 -2
- package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
- package/build/types/common/propsValues/sentiment.d.ts.map +1 -1
- package/build/types/index.d.ts +0 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +3 -2
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/test-utils/fake-data.d.ts +0 -1
- package/build/types/test-utils/fake-data.d.ts.map +1 -1
- package/build/types/title/Title.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/alert/Alert.story.tsx +5 -3
- package/src/alert/Alert.tsx +11 -2
- package/src/avatarWrapper/AvatarWrapper.story.tsx +2 -2
- package/src/avatarWrapper/AvatarWrapper.tsx +3 -2
- package/src/common/propsValues/sentiment.ts +1 -0
- package/src/index.ts +0 -2
- package/src/inputs/Input.css +28 -2
- package/src/inputs/TextArea.css +28 -2
- package/src/main.css +60 -188
- package/src/main.less +0 -1
- package/src/popover/Popover.css +28 -2
- package/src/statusIcon/StatusIcon.docs.mdx +1 -1
- package/src/statusIcon/StatusIcon.spec.tsx +10 -4
- package/src/statusIcon/StatusIcon.story.tsx +10 -5
- package/src/statusIcon/StatusIcon.tsx +6 -4
- package/src/test-utils/fake-data.ts +0 -3
- package/src/title/Title.test.story.tsx +19 -12
- package/src/title/Title.tsx +1 -0
- package/build/styles/item/Item.css +0 -184
- package/build/types/item/Item.d.ts +0 -40
- package/build/types/item/Item.d.ts.map +0 -1
- package/build/types/item/ItemAdditionalInfo.d.ts +0 -9
- package/build/types/item/ItemAdditionalInfo.d.ts.map +0 -1
- package/build/types/item/ItemCheckbox.d.ts +0 -4
- package/build/types/item/ItemCheckbox.d.ts.map +0 -1
- package/build/types/item/ItemIconButton.d.ts +0 -4
- package/build/types/item/ItemIconButton.d.ts.map +0 -1
- package/build/types/item/ItemImage.d.ts +0 -4
- package/build/types/item/ItemImage.d.ts.map +0 -1
- package/build/types/item/ItemNavigation.d.ts +0 -4
- package/build/types/item/ItemNavigation.d.ts.map +0 -1
- package/build/types/item/index.d.ts +0 -5
- package/build/types/item/index.d.ts.map +0 -1
- package/build/types/item/prompt/Prompt.d.ts +0 -12
- package/build/types/item/prompt/Prompt.d.ts.map +0 -1
- package/src/item/Item.css +0 -184
- package/src/item/Item.less +0 -178
- package/src/item/Item.story.tsx +0 -93
- package/src/item/Item.tsx +0 -165
- package/src/item/ItemAdditionalInfo.tsx +0 -31
- package/src/item/ItemCheckbox.tsx +0 -16
- package/src/item/ItemIconButton.tsx +0 -15
- package/src/item/ItemImage.tsx +0 -11
- package/src/item/ItemNavigation.tsx +0 -16
- package/src/item/index.ts +0 -4
- package/src/item/prompt/Prompt.spec.tsx +0 -77
- package/src/item/prompt/Prompt.story.tsx +0 -170
- package/src/item/prompt/Prompt.tsx +0 -44
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const lorem10 = "Lorem ipsum, dolor sit amet consectetur adipisicing elit. Iste, architecto?";
|
|
2
|
-
export declare const lorem20 = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorum non explicabo doloribus rerum saepe ut beatae adipisci rem vero optio.";
|
|
3
2
|
export declare const lorem40 = "Lorem ipsum dolor sit amet consectetur, adipisicing elit. Illo esse quod et iure deserunt facilis similique voluptatem reprehenderit mollitia inventore, ab voluptate dignissimos autem repellat accusamus perferendis sed pariatur tempore possimus ipsam praesentium ipsum? Nesciunt cumque repellendus impedit aliquam! Error?";
|
|
4
3
|
export declare const lorem100 = "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Ipsum quisquam fuga dolore veritatis assumenda rerum, non, sint aliquam, excepturi architecto temporibus quis? Quo, deleniti nobis, illo necessitatibus accusamus commodi error fuga culpa sequi, incidunt voluptatum tempore quisquam quos eos modi impedit sit! Eveniet libero optio assumenda rem accusantium quod quas, recusandae, incidunt mollitia harum dolorum. Dolor porro hic mollitia accusantium vel commodi, ipsam a suscipit iusto placeat numquam excepturi amet nostrum aliquid aperiam sequi deleniti asperiores fugit cumque ipsa voluptatem culpa non libero iste. Placeat rem dolore quisquam aperiam, eligendi facere quos minima totam a ut corporis culpa! Veniam, illo!";
|
|
5
4
|
export declare const lorem500 = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi commodi eos placeat aut quidem et error ex qui. Reprehenderit animi officiis magnam dicta, alias eligendi facilis sit fuga suscipit qui voluptatibus, quam harum beatae omnis sint sapiente dolorum cum officia dignissimos ab ipsa, deleniti voluptates exercitationem tempore! Fugit consequuntur ullam, similique tenetur corporis laborum sed sint, necessitatibus natus voluptatem, eius eveniet placeat quos quaerat officia officiis magni reprehenderit eaque! Dolorum odio iste vitae magnam, voluptatum pariatur unde, quod at adipisci reprehenderit dignissimos id modi quaerat rerum et dolorem. Rerum ratione beatae, repudiandae temporibus ipsam accusamus deserunt! Maiores, eos nisi laboriosam soluta rem minus expedita repudiandae accusamus aperiam rerum facere ducimus voluptas! Rerum fugit eum quasi. At sapiente quaerat, similique inventore quia magni cupiditate molestias odio voluptate quasi culpa ullam sit unde veritatis ut dicta ad nihil veniam accusamus eveniet vel placeat minus numquam nostrum! Delectus quas adipisci debitis cumque doloremque, nobis, obcaecati dolorem commodi possimus nesciunt vero? Excepturi saepe explicabo dolorem facere itaque optio, totam tempore earum culpa fugit ullam officia maiores dolores facilis voluptate consequuntur a voluptas, asperiores obcaecati voluptatem. Rerum suscipit quod nulla harum illum sequi praesentium tenetur neque architecto, molestias earum! Necessitatibus, ullam molestiae voluptas, esse dolorem officiis aut, inventore dolore provident beatae error nesciunt incidunt neque quam molestias iusto minus rem nam. Eum, provident id. Molestias vitae ex sequi veritatis totam minima labore quasi eligendi nemo, ipsa accusamus eaque quae maiores eum ipsam inventore illo voluptatem sapiente velit, quos aspernatur commodi quibusdam. A expedita, adipisci aut voluptatum repellat fugit saepe accusamus debitis, quis dolorem, incidunt corrupti magni? Inventore nulla fugit quisquam dolorum temporibus corporis error voluptates? Impedit possimus provident a vero exercitationem doloribus est voluptatibus distinctio, ipsum iste sit repellat sapiente tenetur deleniti ullam dolorem soluta accusantium! Ab, placeat rerum explicabo corporis impedit quam quos veritatis expedita hic veniam harum qui dolor neque! Laboriosam officiis, dignissimos corporis, ducimus iure nemo quisquam pariatur molestias repellat aliquam tempore impedit dolore tempora eaque accusamus fugiat facilis dolor sint laborum molestiae sapiente deserunt quasi obcaecati! Veniam, doloribus! Unde, fugiat odit sunt facere maiores nobis tempora, natus quam consectetur deleniti nesciunt perferendis aut praesentium. Libero, neque cumque beatae recusandae qui repudiandae sunt quod dolorum nemo voluptates et culpa temporibus perferendis est expedita vel laboriosam! Accusamus incidunt consectetur delectus voluptate sunt repudiandae deleniti ut consequuntur, facilis assumenda nostrum soluta unde repellat reiciendis ipsum quidem quam numquam optio voluptates eius. Molestias quibusdam assumenda earum atque ullam delectus explicabo recusandae quasi aperiam, est placeat? Officia molestiae accusamus rem placeat adipisci officiis harum vel. Neque sit qui alias magni illum! Ipsam, necessitatibus unde sit possimus ipsum quis neque voluptate reprehenderit tempore nobis quo sunt molestiae atque rerum similique natus minus eum? Maiores aspernatur ut ullam eos vitae aperiam odit deleniti eveniet delectus totam harum iste, blanditiis ab laboriosam mollitia. Esse incidunt odit voluptate minus cum molestiae reprehenderit minima voluptatibus id. Molestias aliquid repellendus dolores cupiditate, nemo reiciendis ad facilis quo est, a error culpa similique libero dolor labore! Facere laborum cupiditate iste laboriosam culpa consectetur.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fake-data.d.ts","sourceRoot":"","sources":["../../../src/test-utils/fake-data.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gFAC2D,CAAC;AAEhF,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"fake-data.d.ts","sourceRoot":"","sources":["../../../src/test-utils/fake-data.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gFAC2D,CAAC;AAEhF,eAAO,MAAM,OAAO,sUACiT,CAAC;AAEtU,eAAO,MAAM,QAAQ,+tBACysB,CAAC;AAE/tB,eAAO,MAAM,QAAQ,2uHACqtH,CAAC;AAE3uH,eAAO,MAAM,SAAS,28OACo7O,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/title/Title.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAa,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAc,OAAO,EAAE,MAAM,WAAW,CAAC;AAY5D,KAAK,KAAK,GAAG,mBAAmB,CAAC,kBAAkB,GAAG,eAAe,GAAG,gBAAgB,CAAC,GACvF,gBAAgB,CAAC,aAAa,CAAC,GAAG;IAChC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC7D;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEJ,iBAAS,KAAK,CAAC,EAAE,EAAE,EAAE,IAAmB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,+
|
|
1
|
+
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/title/Title.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAa,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAc,OAAO,EAAE,MAAM,WAAW,CAAC;AAY5D,KAAK,KAAK,GAAG,mBAAmB,CAAC,kBAAkB,GAAG,eAAe,GAAG,gBAAgB,CAAC,GACvF,gBAAgB,CAAC,aAAa,CAAC,GAAG;IAChC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC7D;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEJ,iBAAS,KAAK,CAAC,EAAE,EAAE,EAAE,IAAmB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,+BAUrE;AAED,eAAe,KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-8d08be7",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -94,14 +94,14 @@
|
|
|
94
94
|
"rollup": "^4.18.1",
|
|
95
95
|
"rollup-preserve-directives": "^1.1.1",
|
|
96
96
|
"storybook": "^8.2.2",
|
|
97
|
-
"@transferwise/less-config": "3.1.1",
|
|
98
|
-
"@transferwise/neptune-css": "14.24.3",
|
|
99
97
|
"@wise/components-theming": "1.6.2",
|
|
100
|
-
"@
|
|
98
|
+
"@transferwise/neptune-css": "0.0.0-experimental-8d08be7",
|
|
99
|
+
"@wise/wds-configs": "0.0.0",
|
|
100
|
+
"@transferwise/less-config": "3.1.1"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"@transferwise/icons": "^3.21.0",
|
|
104
|
-
"@transferwise/neptune-css": "
|
|
104
|
+
"@transferwise/neptune-css": "0.0.0-experimental-8d08be7",
|
|
105
105
|
"@wise/art": "^2.16",
|
|
106
106
|
"@wise/components-theming": "^1.0.0",
|
|
107
107
|
"react": ">=18",
|
|
@@ -4,7 +4,7 @@ import { action } from '@storybook/addon-actions';
|
|
|
4
4
|
import { ClockBorderless } from '@transferwise/icons';
|
|
5
5
|
|
|
6
6
|
import { lorem40 } from '../test-utils';
|
|
7
|
-
import { Sentiment } from '../common';
|
|
7
|
+
import { Sentiment, Status } from '../common';
|
|
8
8
|
import { Button, Field, SelectInput } from '..';
|
|
9
9
|
import Alert, { AlertArrowPosition, type AlertProps as FullAlertProps } from './Alert';
|
|
10
10
|
|
|
@@ -33,6 +33,7 @@ export default {
|
|
|
33
33
|
Sentiment.NEUTRAL,
|
|
34
34
|
Sentiment.WARNING,
|
|
35
35
|
Sentiment.PENDING,
|
|
36
|
+
Status.PENDING,
|
|
36
37
|
],
|
|
37
38
|
},
|
|
38
39
|
},
|
|
@@ -51,7 +52,8 @@ export const Variants: Story = {
|
|
|
51
52
|
{ type: Sentiment.NEGATIVE, title: 'Negative Title' },
|
|
52
53
|
{ type: Sentiment.NEUTRAL, title: 'Neutral Title' },
|
|
53
54
|
{ type: Sentiment.WARNING, title: 'Warning Title' },
|
|
54
|
-
{ type: Sentiment.PENDING, title: 'Pending Title' },
|
|
55
|
+
{ type: Sentiment.PENDING, title: 'Pending Sentiment Title' },
|
|
56
|
+
{ type: Status.PENDING, title: 'Pending Status Title' },
|
|
55
57
|
];
|
|
56
58
|
|
|
57
59
|
return (
|
|
@@ -59,7 +61,7 @@ export const Variants: Story = {
|
|
|
59
61
|
{variants.map((variant) => (
|
|
60
62
|
<Alert
|
|
61
63
|
key={variant.type}
|
|
62
|
-
type={variant.type}
|
|
64
|
+
type={variant.type as AlertProps['type']}
|
|
63
65
|
title={variant.title}
|
|
64
66
|
message={message}
|
|
65
67
|
action={
|
package/src/alert/Alert.tsx
CHANGED
|
@@ -2,7 +2,14 @@ import { clsx } from 'clsx';
|
|
|
2
2
|
import { useState, useRef, useEffect } from 'react';
|
|
3
3
|
|
|
4
4
|
import Body from '../body/Body';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
CloseButton,
|
|
7
|
+
Sentiment,
|
|
8
|
+
Size,
|
|
9
|
+
Status,
|
|
10
|
+
Typography,
|
|
11
|
+
WDS_LIVE_REGION_DELAY_MS,
|
|
12
|
+
} from '../common';
|
|
6
13
|
|
|
7
14
|
import StatusIcon from '../statusIcon';
|
|
8
15
|
import Title from '../title/Title';
|
|
@@ -26,8 +33,10 @@ type AlertTypeResolved = `${
|
|
|
26
33
|
| Sentiment.POSITIVE
|
|
27
34
|
| Sentiment.NEUTRAL
|
|
28
35
|
| Sentiment.WARNING
|
|
36
|
+
| Sentiment.NEGATIVE
|
|
37
|
+
// remove when all instances of Sentiment.PENDING have been updated to Status.PENDING
|
|
29
38
|
| Sentiment.PENDING
|
|
30
|
-
|
|
|
39
|
+
| Status.PENDING}`;
|
|
31
40
|
export type AlertType = AlertTypeResolved | AlertTypeDeprecated;
|
|
32
41
|
|
|
33
42
|
export enum AlertArrowPosition {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
|
|
3
|
-
import { ProfileType, Sentiment } from '../common';
|
|
3
|
+
import { ProfileType, Sentiment, Status } from '../common';
|
|
4
4
|
|
|
5
5
|
import AvatarWrapper from './AvatarWrapper';
|
|
6
6
|
|
|
@@ -96,7 +96,7 @@ export const All: Story = {
|
|
|
96
96
|
</div>
|
|
97
97
|
Default
|
|
98
98
|
<div>
|
|
99
|
-
<AvatarWrapper badgeStatusIcon={
|
|
99
|
+
<AvatarWrapper badgeStatusIcon={Status.PENDING} avatarProps={avatarProps} />
|
|
100
100
|
</div>
|
|
101
101
|
</div>
|
|
102
102
|
</div>
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
Size,
|
|
11
11
|
Sentiment,
|
|
12
12
|
getInitials,
|
|
13
|
+
Status,
|
|
13
14
|
} from '../common';
|
|
14
15
|
import StatusIcon from '../statusIcon/StatusIcon';
|
|
15
16
|
|
|
@@ -17,7 +18,7 @@ interface OptionalBadgeProps extends Omit<BadgeProps, 'badge'> {
|
|
|
17
18
|
url?: string;
|
|
18
19
|
ariaLabel?: string;
|
|
19
20
|
altText?: string;
|
|
20
|
-
statusIcon?: Sentiment;
|
|
21
|
+
statusIcon?: Sentiment | Status.PENDING;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
const OptionalBadge = ({
|
|
@@ -66,7 +67,7 @@ export type AvatarWrapperProps = {
|
|
|
66
67
|
| {
|
|
67
68
|
badgeUrl?: never;
|
|
68
69
|
badgeAltText?: never;
|
|
69
|
-
badgeStatusIcon: Sentiment;
|
|
70
|
+
badgeStatusIcon: Sentiment | Status.PENDING;
|
|
70
71
|
}
|
|
71
72
|
| {
|
|
72
73
|
badgeUrl?: never;
|
package/src/index.ts
CHANGED
|
@@ -109,7 +109,6 @@ export type {
|
|
|
109
109
|
TableCellStatus,
|
|
110
110
|
TableCellType,
|
|
111
111
|
} from './table';
|
|
112
|
-
export type { ItemProps, ItemAdditionalInfoProps, ItemCheckboxProps } from './item';
|
|
113
112
|
|
|
114
113
|
/**
|
|
115
114
|
* Components
|
|
@@ -212,7 +211,6 @@ export { default as Typeahead } from './typeahead';
|
|
|
212
211
|
export { default as Upload } from './upload';
|
|
213
212
|
export { default as UploadInput } from './uploadInput';
|
|
214
213
|
export { default as Table } from './table';
|
|
215
|
-
export { default as Item } from './table';
|
|
216
214
|
|
|
217
215
|
/**
|
|
218
216
|
* Hooks
|
package/src/inputs/Input.css
CHANGED
|
@@ -71,8 +71,6 @@
|
|
|
71
71
|
line-height: 1.2;
|
|
72
72
|
line-height: var(--line-height-title);
|
|
73
73
|
letter-spacing: 0;
|
|
74
|
-
-webkit-hyphens: auto;
|
|
75
|
-
hyphens: auto;
|
|
76
74
|
margin-bottom: 0;
|
|
77
75
|
margin-bottom: initial;
|
|
78
76
|
font-size: 1.375rem;
|
|
@@ -83,6 +81,34 @@
|
|
|
83
81
|
line-height: 125%;
|
|
84
82
|
height: 72px !important;
|
|
85
83
|
height: var(--size-72) !important;
|
|
84
|
+
}@supports (hyphenate-limit-chars: 1) {
|
|
85
|
+
.np-form-control--size-lg {
|
|
86
|
+
-webkit-hyphens: auto;
|
|
87
|
+
hyphens: auto;
|
|
88
|
+
hyphenate-limit-chars: 7 3;
|
|
89
|
+
}
|
|
90
|
+
@media (min-width: 768px) {
|
|
91
|
+
.np-form-control--size-lg {
|
|
92
|
+
hyphenate-limit-chars: 8 3;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
@media (min-width: 992px) {
|
|
96
|
+
.np-form-control--size-lg {
|
|
97
|
+
hyphenate-limit-chars: 10 4 3;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
101
|
+
.np-form-control--size-lg {
|
|
102
|
+
-webkit-hyphens: auto;
|
|
103
|
+
hyphens: auto;
|
|
104
|
+
-webkit-hyphenate-limit-before: 3;
|
|
105
|
+
-webkit-hyphenate-limit-after: 3;
|
|
106
|
+
}
|
|
107
|
+
@media (min-width: 992px) {
|
|
108
|
+
.np-form-control--size-lg {
|
|
109
|
+
-webkit-hyphenate-limit-before: 4;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
86
112
|
}.np-form-control--size-lg + p,
|
|
87
113
|
.np-form-control--size-lg + ul:not(.list-unstyled),
|
|
88
114
|
.np-form-control--size-lg + ol:not(.list-unstyled) {
|
package/src/inputs/TextArea.css
CHANGED
|
@@ -71,8 +71,6 @@
|
|
|
71
71
|
line-height: 1.2;
|
|
72
72
|
line-height: var(--line-height-title);
|
|
73
73
|
letter-spacing: 0;
|
|
74
|
-
-webkit-hyphens: auto;
|
|
75
|
-
hyphens: auto;
|
|
76
74
|
margin-bottom: 0;
|
|
77
75
|
margin-bottom: initial;
|
|
78
76
|
font-size: 1.375rem;
|
|
@@ -83,6 +81,34 @@
|
|
|
83
81
|
line-height: 125%;
|
|
84
82
|
height: 72px !important;
|
|
85
83
|
height: var(--size-72) !important;
|
|
84
|
+
}@supports (hyphenate-limit-chars: 1) {
|
|
85
|
+
.np-form-control--size-lg {
|
|
86
|
+
-webkit-hyphens: auto;
|
|
87
|
+
hyphens: auto;
|
|
88
|
+
hyphenate-limit-chars: 7 3;
|
|
89
|
+
}
|
|
90
|
+
@media (min-width: 768px) {
|
|
91
|
+
.np-form-control--size-lg {
|
|
92
|
+
hyphenate-limit-chars: 8 3;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
@media (min-width: 992px) {
|
|
96
|
+
.np-form-control--size-lg {
|
|
97
|
+
hyphenate-limit-chars: 10 4 3;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
101
|
+
.np-form-control--size-lg {
|
|
102
|
+
-webkit-hyphens: auto;
|
|
103
|
+
hyphens: auto;
|
|
104
|
+
-webkit-hyphenate-limit-before: 3;
|
|
105
|
+
-webkit-hyphenate-limit-after: 3;
|
|
106
|
+
}
|
|
107
|
+
@media (min-width: 992px) {
|
|
108
|
+
.np-form-control--size-lg {
|
|
109
|
+
-webkit-hyphenate-limit-before: 4;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
86
112
|
}.np-form-control--size-lg + p,
|
|
87
113
|
.np-form-control--size-lg + ul:not(.list-unstyled),
|
|
88
114
|
.np-form-control--size-lg + ol:not(.list-unstyled) {
|
package/src/main.css
CHANGED
|
@@ -2585,8 +2585,6 @@ 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;
|
|
2590
2588
|
margin-bottom: 0;
|
|
2591
2589
|
margin-bottom: initial;
|
|
2592
2590
|
font-size: 1.375rem;
|
|
@@ -2598,6 +2596,36 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2598
2596
|
height: 72px !important;
|
|
2599
2597
|
height: var(--size-72) !important;
|
|
2600
2598
|
}
|
|
2599
|
+
@supports (hyphenate-limit-chars: 1) {
|
|
2600
|
+
.np-form-control--size-lg {
|
|
2601
|
+
-webkit-hyphens: auto;
|
|
2602
|
+
hyphens: auto;
|
|
2603
|
+
hyphenate-limit-chars: 7 3;
|
|
2604
|
+
}
|
|
2605
|
+
@media (min-width: 768px) {
|
|
2606
|
+
.np-form-control--size-lg {
|
|
2607
|
+
hyphenate-limit-chars: 8 3;
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
@media (min-width: 992px) {
|
|
2611
|
+
.np-form-control--size-lg {
|
|
2612
|
+
hyphenate-limit-chars: 10 4 3;
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
2617
|
+
.np-form-control--size-lg {
|
|
2618
|
+
-webkit-hyphens: auto;
|
|
2619
|
+
hyphens: auto;
|
|
2620
|
+
-webkit-hyphenate-limit-before: 3;
|
|
2621
|
+
-webkit-hyphenate-limit-after: 3;
|
|
2622
|
+
}
|
|
2623
|
+
@media (min-width: 992px) {
|
|
2624
|
+
.np-form-control--size-lg {
|
|
2625
|
+
-webkit-hyphenate-limit-before: 4;
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2601
2629
|
.np-form-control--size-lg + p,
|
|
2602
2630
|
.np-form-control--size-lg + ul:not(.list-unstyled),
|
|
2603
2631
|
.np-form-control--size-lg + ol:not(.list-unstyled) {
|
|
@@ -2620,190 +2648,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2620
2648
|
border-radius: 9999px !important;
|
|
2621
2649
|
border-radius: var(--radius-full) !important;
|
|
2622
2650
|
}
|
|
2623
|
-
.np-item {
|
|
2624
|
-
padding: 16px;
|
|
2625
|
-
padding: var(--size-16);
|
|
2626
|
-
border-radius: 24px;
|
|
2627
|
-
border-radius: var(--radius-large);
|
|
2628
|
-
background-color: #ffffff;
|
|
2629
|
-
background-color: var(--color-background-screen);
|
|
2630
|
-
display: flex;
|
|
2631
|
-
gap: 16px;
|
|
2632
|
-
gap: var(--size-16);
|
|
2633
|
-
align-items: center;
|
|
2634
|
-
flex-direction: row;
|
|
2635
|
-
cursor: pointer;
|
|
2636
|
-
}
|
|
2637
|
-
.np-item:hover {
|
|
2638
|
-
background-color: var(--color-background-screen-hover);
|
|
2639
|
-
}
|
|
2640
|
-
.np-item:active {
|
|
2641
|
-
background-color: var(--color-background-screen-active);
|
|
2642
|
-
}
|
|
2643
|
-
.np-item-media {
|
|
2644
|
-
flex: 0 0 auto;
|
|
2645
|
-
align-items: flex-start;
|
|
2646
|
-
}
|
|
2647
|
-
.np-item-title {
|
|
2648
|
-
color: #37517e;
|
|
2649
|
-
color: var(--color-content-primary);
|
|
2650
|
-
}
|
|
2651
|
-
.np-item-additional-info {
|
|
2652
|
-
color: #768e9c;
|
|
2653
|
-
color: var(--color-content-tertiary);
|
|
2654
|
-
}
|
|
2655
|
-
.np-item-value {
|
|
2656
|
-
flex: 0 0 auto;
|
|
2657
|
-
}
|
|
2658
|
-
.np-item-control {
|
|
2659
|
-
flex: 0 0 auto;
|
|
2660
|
-
}
|
|
2661
|
-
.np-item-spotlight-active {
|
|
2662
|
-
background-color: rgba(134,167,189,0.10196);
|
|
2663
|
-
background-color: var(--color-background-neutral);
|
|
2664
|
-
}
|
|
2665
|
-
.np-item-spotlight-active:hover {
|
|
2666
|
-
background-color: var(--color-background-neutral-hover);
|
|
2667
|
-
}
|
|
2668
|
-
.np-item-spotlight-active:active {
|
|
2669
|
-
background-color: var(--color-background-neutral-active);
|
|
2670
|
-
}
|
|
2671
|
-
.np-item-spotlight-inactive {
|
|
2672
|
-
background-color: rgba(134, 167, 189, 0.025);
|
|
2673
|
-
border: 1px dashed rgba(0,0,0,0.10196);
|
|
2674
|
-
border: 1px dashed var(--color-border-neutral);
|
|
2675
|
-
}
|
|
2676
|
-
@supports (color: color-mix(in lch, red, blue)) {
|
|
2677
|
-
.np-item-spotlight-inactive {
|
|
2678
|
-
background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
|
|
2679
|
-
}
|
|
2680
|
-
}
|
|
2681
|
-
.np-item-spotlight-inactive:hover {
|
|
2682
|
-
background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
|
|
2683
|
-
}
|
|
2684
|
-
.np-item-spotlight-inactive:active {
|
|
2685
|
-
background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
|
|
2686
|
-
}
|
|
2687
|
-
.np-item-prompt {
|
|
2688
|
-
display: inline-flex;
|
|
2689
|
-
padding-top: calc(8px / 2);
|
|
2690
|
-
padding-top: calc(var(--padding-x-small) / 2);
|
|
2691
|
-
padding-bottom: calc(8px / 2);
|
|
2692
|
-
padding-bottom: calc(var(--padding-x-small) / 2);
|
|
2693
|
-
padding-left: calc(8px - 1px);
|
|
2694
|
-
padding-left: calc(var(--padding-x-small) - 1px);
|
|
2695
|
-
padding-right: 8px;
|
|
2696
|
-
padding-right: var(--padding-x-small);
|
|
2697
|
-
border-radius: 10px;
|
|
2698
|
-
border-radius: var(--radius-small);
|
|
2699
|
-
word-break: break-word;
|
|
2700
|
-
word-wrap: break-word;
|
|
2701
|
-
}
|
|
2702
|
-
.np-item-prompt .np-prompt-icon {
|
|
2703
|
-
padding-right: 6px;
|
|
2704
|
-
padding-top: 3px;
|
|
2705
|
-
padding-bottom: 3px;
|
|
2706
|
-
}
|
|
2707
|
-
.np-item-prompt .np-prompt-icon .tw-icon-tags,
|
|
2708
|
-
.np-item-prompt .np-prompt-icon .tw-icon-confetti {
|
|
2709
|
-
color: var(--color-sentiment-positive-primary);
|
|
2710
|
-
}
|
|
2711
|
-
.np-item-prompt a {
|
|
2712
|
-
text-underline-offset: calc(4px / 2);
|
|
2713
|
-
text-underline-offset: calc(var(--size-4) / 2);
|
|
2714
|
-
display: inline;
|
|
2715
|
-
}
|
|
2716
|
-
.np-item-prompt.np-prompt-interactive {
|
|
2717
|
-
-webkit-text-decoration: none;
|
|
2718
|
-
text-decoration: none;
|
|
2719
|
-
cursor: pointer;
|
|
2720
|
-
border: none;
|
|
2721
|
-
}
|
|
2722
|
-
.np-item-prompt.negative {
|
|
2723
|
-
background-color: var(--color-sentiment-negative-secondary);
|
|
2724
|
-
color: var(--color-sentiment-negative-primary);
|
|
2725
|
-
}
|
|
2726
|
-
.np-item-prompt.negative a {
|
|
2727
|
-
color: var(--color-sentiment-negative-primary);
|
|
2728
|
-
}
|
|
2729
|
-
.np-item-prompt.negative a:hover {
|
|
2730
|
-
color: var(--color-sentiment-negative-primary-hover);
|
|
2731
|
-
}
|
|
2732
|
-
.np-item-prompt.negative a:active {
|
|
2733
|
-
color: var(--color-sentiment-negative-primary-active);
|
|
2734
|
-
}
|
|
2735
|
-
.np-prompt-interactive.np-item-prompt.negative:hover {
|
|
2736
|
-
background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 95%, var(--color-sentiment-negative-primary));
|
|
2737
|
-
}
|
|
2738
|
-
.np-prompt-interactive.np-item-prompt.negative:active {
|
|
2739
|
-
background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 90%, var(--color-sentiment-negative-primary));
|
|
2740
|
-
}
|
|
2741
|
-
.np-item-prompt.positive,
|
|
2742
|
-
.np-item-prompt.discount,
|
|
2743
|
-
.np-item-prompt.savings {
|
|
2744
|
-
background-color: var(--color-sentiment-positive-secondary);
|
|
2745
|
-
color: var(--color-sentiment-positive-primary);
|
|
2746
|
-
}
|
|
2747
|
-
.np-item-prompt.positive a,
|
|
2748
|
-
.np-item-prompt.discount a,
|
|
2749
|
-
.np-item-prompt.savings a {
|
|
2750
|
-
color: var(--color-sentiment-positive-primary);
|
|
2751
|
-
}
|
|
2752
|
-
.np-item-prompt.positive a:hover,
|
|
2753
|
-
.np-item-prompt.discount a:hover,
|
|
2754
|
-
.np-item-prompt.savings a:hover {
|
|
2755
|
-
color: var(--color-sentiment-positive-primary-hover);
|
|
2756
|
-
}
|
|
2757
|
-
.np-item-prompt.positive a:active,
|
|
2758
|
-
.np-item-prompt.discount a:active,
|
|
2759
|
-
.np-item-prompt.savings a:active {
|
|
2760
|
-
color: var(--color-sentiment-positive-primary-active);
|
|
2761
|
-
}
|
|
2762
|
-
.np-prompt-interactive.np-item-prompt.positive:hover,
|
|
2763
|
-
.np-prompt-interactive.np-item-prompt.discount:hover,
|
|
2764
|
-
.np-prompt-interactive.np-item-prompt.savings:hover {
|
|
2765
|
-
background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 95%, var(--color-sentiment-positive-primary));
|
|
2766
|
-
}
|
|
2767
|
-
.np-prompt-interactive.np-item-prompt.positive:active,
|
|
2768
|
-
.np-prompt-interactive.np-item-prompt.discount:active,
|
|
2769
|
-
.np-prompt-interactive.np-item-prompt.savings:active {
|
|
2770
|
-
background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 90%, var(--color-sentiment-positive-primary));
|
|
2771
|
-
}
|
|
2772
|
-
.np-item-prompt.neutral {
|
|
2773
|
-
background-color: rgba(134,167,189,0.10196);
|
|
2774
|
-
background-color: var(--color-background-neutral);
|
|
2775
|
-
color: #37517e;
|
|
2776
|
-
color: var(--color-content-primary);
|
|
2777
|
-
}
|
|
2778
|
-
.np-item-prompt.neutral a {
|
|
2779
|
-
color: #37517e;
|
|
2780
|
-
color: var(--color-content-primary);
|
|
2781
|
-
}
|
|
2782
|
-
.np-prompt-interactive.np-item-prompt.neutral:hover {
|
|
2783
|
-
background-color: var(--color-background-neutral-hover);
|
|
2784
|
-
}
|
|
2785
|
-
.np-prompt-interactive.np-item-prompt.neutral:active {
|
|
2786
|
-
background-color: var(--color-background-neutral-active);
|
|
2787
|
-
}
|
|
2788
|
-
.np-item-prompt.warning {
|
|
2789
|
-
background-color: var(--color-sentiment-warning-secondary);
|
|
2790
|
-
color: var(--color-sentiment-warning-content);
|
|
2791
|
-
}
|
|
2792
|
-
.np-item-prompt.warning a {
|
|
2793
|
-
color: var(--color-sentiment-warning-content);
|
|
2794
|
-
}
|
|
2795
|
-
.np-item-prompt.warning a:hover {
|
|
2796
|
-
color: var(--color-sentiment-warning-content-hover);
|
|
2797
|
-
}
|
|
2798
|
-
.np-item-prompt.warning a:active {
|
|
2799
|
-
color: var(--color-sentiment-warning-content-active);
|
|
2800
|
-
}
|
|
2801
|
-
.np-prompt-interactive.np-item-prompt.warning:hover {
|
|
2802
|
-
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 90%, var(--color-sentiment-warning-primary));
|
|
2803
|
-
}
|
|
2804
|
-
.np-prompt-interactive.np-item-prompt.warning:active {
|
|
2805
|
-
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 80%, var(--color-sentiment-warning-primary));
|
|
2806
|
-
}
|
|
2807
2651
|
.np-field-control {
|
|
2808
2652
|
margin-top: 4px;
|
|
2809
2653
|
margin-top: var(--size-4);
|
|
@@ -4207,8 +4051,6 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4207
4051
|
line-height: 1.2;
|
|
4208
4052
|
line-height: var(--line-height-title);
|
|
4209
4053
|
letter-spacing: 0;
|
|
4210
|
-
-webkit-hyphens: auto;
|
|
4211
|
-
hyphens: auto;
|
|
4212
4054
|
margin-bottom: 0;
|
|
4213
4055
|
margin-bottom: initial;
|
|
4214
4056
|
font-weight: 600;
|
|
@@ -4218,6 +4060,36 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4218
4060
|
letter-spacing: -0.02em;
|
|
4219
4061
|
line-height: 122%;
|
|
4220
4062
|
}
|
|
4063
|
+
@supports (hyphenate-limit-chars: 1) {
|
|
4064
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
4065
|
+
-webkit-hyphens: auto;
|
|
4066
|
+
hyphens: auto;
|
|
4067
|
+
hyphenate-limit-chars: 7 3;
|
|
4068
|
+
}
|
|
4069
|
+
@media (min-width: 768px) {
|
|
4070
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
4071
|
+
hyphenate-limit-chars: 8 3;
|
|
4072
|
+
}
|
|
4073
|
+
}
|
|
4074
|
+
@media (min-width: 992px) {
|
|
4075
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
4076
|
+
hyphenate-limit-chars: 10 4 3;
|
|
4077
|
+
}
|
|
4078
|
+
}
|
|
4079
|
+
}
|
|
4080
|
+
@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
4081
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
4082
|
+
-webkit-hyphens: auto;
|
|
4083
|
+
hyphens: auto;
|
|
4084
|
+
-webkit-hyphenate-limit-before: 3;
|
|
4085
|
+
-webkit-hyphenate-limit-after: 3;
|
|
4086
|
+
}
|
|
4087
|
+
@media (min-width: 992px) {
|
|
4088
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
4089
|
+
-webkit-hyphenate-limit-before: 4;
|
|
4090
|
+
}
|
|
4091
|
+
}
|
|
4092
|
+
}
|
|
4221
4093
|
.np-popover__container.np-bottom-sheet .np-popover__title + p,
|
|
4222
4094
|
.np-popover__container.np-bottom-sheet .np-popover__title + ul:not(.list-unstyled),
|
|
4223
4095
|
.np-popover__container.np-bottom-sheet .np-popover__title + ol:not(.list-unstyled) {
|
package/src/main.less
CHANGED
package/src/popover/Popover.css
CHANGED
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
line-height: 1.2;
|
|
25
25
|
line-height: var(--line-height-title);
|
|
26
26
|
letter-spacing: 0;
|
|
27
|
-
-webkit-hyphens: auto;
|
|
28
|
-
hyphens: auto;
|
|
29
27
|
margin-bottom: 0;
|
|
30
28
|
margin-bottom: initial;
|
|
31
29
|
font-weight: 600;
|
|
@@ -34,6 +32,34 @@
|
|
|
34
32
|
font-size: var(--font-size-26);
|
|
35
33
|
letter-spacing: -0.02em;
|
|
36
34
|
line-height: 122%;
|
|
35
|
+
}@supports (hyphenate-limit-chars: 1) {
|
|
36
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
37
|
+
-webkit-hyphens: auto;
|
|
38
|
+
hyphens: auto;
|
|
39
|
+
hyphenate-limit-chars: 7 3;
|
|
40
|
+
}
|
|
41
|
+
@media (min-width: 768px) {
|
|
42
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
43
|
+
hyphenate-limit-chars: 8 3;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
@media (min-width: 992px) {
|
|
47
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
48
|
+
hyphenate-limit-chars: 10 4 3;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
52
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
53
|
+
-webkit-hyphens: auto;
|
|
54
|
+
hyphens: auto;
|
|
55
|
+
-webkit-hyphenate-limit-before: 3;
|
|
56
|
+
-webkit-hyphenate-limit-after: 3;
|
|
57
|
+
}
|
|
58
|
+
@media (min-width: 992px) {
|
|
59
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
60
|
+
-webkit-hyphenate-limit-before: 4;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
37
63
|
}.np-popover__container.np-bottom-sheet .np-popover__title + p,
|
|
38
64
|
.np-popover__container.np-bottom-sheet .np-popover__title + ul:not(.list-unstyled),
|
|
39
65
|
.np-popover__container.np-bottom-sheet .np-popover__title + ol:not(.list-unstyled) {
|
|
@@ -10,7 +10,7 @@ By default, the component offers accessible names for all the icons, to ensure t
|
|
|
10
10
|
Sentiment.NEGATIVE -> 'Error:'
|
|
11
11
|
Sentiment.POSITIVE -> 'Success:'
|
|
12
12
|
Sentiment.WARNING -> 'Warning:'
|
|
13
|
-
|
|
13
|
+
Status.PENDING -> 'Pending:'
|
|
14
14
|
Sentiment.NEUTRAL -> 'Information:'
|
|
15
15
|
|
|
16
16
|
// deprecated
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Sentiment, Size } from '../common';
|
|
1
|
+
import { Sentiment, Size, Status } from '../common';
|
|
2
2
|
import { render, cleanup, screen, mockMatchMedia } from '../test-utils';
|
|
3
3
|
|
|
4
4
|
import StatusIcon, { type StatusIconProps } from '.';
|
|
5
|
+
import { StatusIconSentiment } from './StatusIcon';
|
|
5
6
|
|
|
6
7
|
mockMatchMedia();
|
|
7
8
|
|
|
@@ -29,12 +30,13 @@ describe('StatusIcon', () => {
|
|
|
29
30
|
[Sentiment.NEGATIVE, Sentiment.NEGATIVE],
|
|
30
31
|
[Sentiment.NEUTRAL, Sentiment.NEUTRAL],
|
|
31
32
|
[Sentiment.PENDING, Sentiment.PENDING],
|
|
33
|
+
[Status.PENDING, Status.PENDING],
|
|
32
34
|
[Sentiment.POSITIVE, Sentiment.POSITIVE],
|
|
33
35
|
[Sentiment.WARNING, Sentiment.WARNING],
|
|
34
36
|
])(
|
|
35
37
|
"if prop 'sentiment' equals '%s' is passed, renders the status icon with class '%s'",
|
|
36
38
|
(sentiment, expectedClass) => {
|
|
37
|
-
renderStatusIcon({ sentiment });
|
|
39
|
+
renderStatusIcon({ sentiment: sentiment as StatusIconSentiment });
|
|
38
40
|
|
|
39
41
|
expect(screen.getByTestId('status-icon')).toHaveClass(expectedClass);
|
|
40
42
|
cleanup();
|
|
@@ -48,6 +50,10 @@ describe('StatusIcon', () => {
|
|
|
48
50
|
|
|
49
51
|
renderStatusIcon({ sentiment: Sentiment.PENDING });
|
|
50
52
|
expect(screen.getByTestId('clock-borderless-icon')).toHaveClass('dark');
|
|
53
|
+
cleanup();
|
|
54
|
+
|
|
55
|
+
renderStatusIcon({ sentiment: Status.PENDING });
|
|
56
|
+
expect(screen.getByTestId('clock-borderless-icon')).toHaveClass('dark');
|
|
51
57
|
});
|
|
52
58
|
|
|
53
59
|
it("'positive', 'negative', and 'neutral' sentiments generate 'light' colored icons", () => {
|
|
@@ -68,13 +74,13 @@ describe('StatusIcon', () => {
|
|
|
68
74
|
['Error', Sentiment.NEGATIVE],
|
|
69
75
|
['Success', Sentiment.POSITIVE],
|
|
70
76
|
['Warning', Sentiment.WARNING],
|
|
71
|
-
['Pending',
|
|
77
|
+
['Pending', Status.PENDING],
|
|
72
78
|
['Information', Sentiment.NEUTRAL],
|
|
73
79
|
['Error', Sentiment.ERROR],
|
|
74
80
|
['Information', Sentiment.INFO],
|
|
75
81
|
['Success', Sentiment.SUCCESS],
|
|
76
82
|
])("should set '%s' as an accessible name for the '%s' sentiment", (label, sentiment) => {
|
|
77
|
-
renderStatusIcon({ sentiment });
|
|
83
|
+
renderStatusIcon({ sentiment: sentiment as StatusIconSentiment });
|
|
78
84
|
|
|
79
85
|
expect(screen.getByLabelText(`${label}:`)).toBeInTheDocument();
|
|
80
86
|
});
|