@transferwise/components 0.0.0-experimental-7bd726b → 0.0.0-experimental-812a5b7
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/listItem/ListItem.js +17 -9
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +17 -9
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.js +2 -5
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.js.map +1 -1
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.mjs +2 -5
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.js +1 -2
- package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +1 -2
- package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
- package/build/main.css +4 -7
- package/build/statusIcon/StatusIcon.js +2 -3
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +2 -3
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/listItem/ListItem.css +4 -7
- package/build/styles/listItem/Prompt/InlinePrompt/InlinePrompt.css +1 -1
- package/build/styles/listItem/Prompt/ListItemPrompt.css +1 -1
- package/build/styles/main.css +4 -7
- package/build/types/listItem/ListItem.d.ts.map +1 -1
- package/build/types/listItem/Prompt/InlinePrompt/InlinePrompt.d.ts.map +1 -1
- package/build/types/listItem/Prompt/ListItemPrompt.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +1 -2
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/listItem/ListItem.css +4 -7
- package/src/listItem/ListItem.less +5 -7
- package/src/listItem/ListItem.spec.tsx +33 -0
- package/src/listItem/ListItem.tsx +25 -11
- package/src/listItem/Navigation/ListItemNavigation.story.tsx +0 -22
- package/src/listItem/Prompt/InlinePrompt/InlinePrompt.css +1 -1
- package/src/listItem/Prompt/InlinePrompt/InlinePrompt.less +1 -1
- package/src/listItem/Prompt/InlinePrompt/InlinePrompt.tsx +3 -15
- package/src/listItem/Prompt/ListItemPrompt.css +1 -1
- package/src/listItem/Prompt/ListItemPrompt.spec.tsx +34 -5
- package/src/listItem/Prompt/ListItemPrompt.tsx +1 -2
- package/src/listItem/_stories/ListItem.disabled.story.tsx +86 -59
- package/src/main.css +4 -7
- package/src/statusIcon/StatusIcon.tsx +2 -8
package/build/main.css
CHANGED
|
@@ -3049,7 +3049,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3049
3049
|
}
|
|
3050
3050
|
.wds-inline-prompt--muted {
|
|
3051
3051
|
opacity: 0.93;
|
|
3052
|
-
|
|
3052
|
+
filter: grayscale(1);
|
|
3053
3053
|
}
|
|
3054
3054
|
.wds-inline-prompt a,
|
|
3055
3055
|
.wds-inline-prompt button {
|
|
@@ -3356,10 +3356,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3356
3356
|
.wds-list-item-control-wrapper {
|
|
3357
3357
|
grid-area: control;
|
|
3358
3358
|
}
|
|
3359
|
-
.wds-list-item-control-wrapper-disabled {
|
|
3360
|
-
opacity: 0.45;
|
|
3361
|
-
mix-blend-mode: luminosity;
|
|
3362
|
-
}
|
|
3363
3359
|
.wds-list-item-navigation .tw-icon-chevron-right {
|
|
3364
3360
|
color: #c9cbce;
|
|
3365
3361
|
color: var(--color-interactive-secondary);
|
|
@@ -3370,7 +3366,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3370
3366
|
.wds-list-item.disabled {
|
|
3371
3367
|
opacity: 1;
|
|
3372
3368
|
opacity: initial;
|
|
3373
|
-
filter: initial;
|
|
3374
3369
|
}
|
|
3375
3370
|
.wds-list-item.disabled,
|
|
3376
3371
|
.wds-list-item.disabled label {
|
|
@@ -3388,7 +3383,9 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3388
3383
|
.wds-list-item.disabled .wds-list-item-body,
|
|
3389
3384
|
.wds-list-item.disabled .wds-list-item-additional-info {
|
|
3390
3385
|
opacity: 0.93;
|
|
3391
|
-
|
|
3386
|
+
}
|
|
3387
|
+
.wds-list-item.disabled--has-prompt-reason .wds-list-item-prompt {
|
|
3388
|
+
opacity: 0.93;
|
|
3392
3389
|
}
|
|
3393
3390
|
.wds-list-item-spotlight {
|
|
3394
3391
|
padding-left: 12px;
|
|
@@ -39,8 +39,7 @@ const mapLegacySize = {
|
|
|
39
39
|
const StatusIcon = ({
|
|
40
40
|
sentiment: sentiment$1 = 'neutral',
|
|
41
41
|
size: sizeProp = 40,
|
|
42
|
-
iconLabel
|
|
43
|
-
className
|
|
42
|
+
iconLabel
|
|
44
43
|
}) => {
|
|
45
44
|
const intl = reactIntl.useIntl();
|
|
46
45
|
const iconMetaBySentiment = {
|
|
@@ -89,7 +88,7 @@ const StatusIcon = ({
|
|
|
89
88
|
as: "span",
|
|
90
89
|
size: isTinyViewport && size < 40 ? 32 : size,
|
|
91
90
|
"data-testid": "status-icon",
|
|
92
|
-
className: clsx.clsx('status-circle', sentiment$1
|
|
91
|
+
className: clsx.clsx('status-circle', sentiment$1),
|
|
93
92
|
children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
94
93
|
className: clsx.clsx('status-icon', iconColor),
|
|
95
94
|
title: iconLabel === null ? undefined : iconLabel || defaultIconLabel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.js","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint, Status } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconSentiment = Sentiment | Status.PENDING;\n\nexport type StatusIconProps = {\n sentiment?: `${StatusIconSentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n /**\n * Override for the sentiment's-derived, default, accessible\n * name announced by the screen readers. <br />\n * Using `null` will render the icon purely presentational.\n * */\n iconLabel?: string | null;\n
|
|
1
|
+
{"version":3,"file":"StatusIcon.js","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint, Status } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconSentiment = Sentiment | Status.PENDING;\n\nexport type StatusIconProps = {\n sentiment?: `${StatusIconSentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n /**\n * Override for the sentiment's-derived, default, accessible\n * name announced by the screen readers. <br />\n * Using `null` will render the icon purely presentational.\n * */\n iconLabel?: string | null;\n};\n\nconst mapLegacySize = {\n [String(Size.SMALL)]: 16,\n [String(Size.MEDIUM)]: 40,\n [String(Size.LARGE)]: 48,\n} satisfies Record<string, CircleProps['size']>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: StatusIconProps) => {\n const intl = useIntl();\n\n const iconMetaBySentiment: Record<\n `${Sentiment}` | Status.PENDING,\n {\n Icon: React.ElementType;\n defaultIconLabel: string;\n }\n > = {\n [Sentiment.NEGATIVE]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.POSITIVE]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n [Sentiment.WARNING]: {\n Icon: Alert,\n defaultIconLabel: intl.formatMessage(messages.warningLabel),\n },\n [Status.PENDING]: {\n Icon: ClockBorderless,\n defaultIconLabel: intl.formatMessage(messages.pendingLabel),\n },\n [Sentiment.NEUTRAL]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n // deprecated\n [Sentiment.ERROR]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.INFO]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n [Sentiment.SUCCESS]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n };\n const { Icon, defaultIconLabel } = iconMetaBySentiment[sentiment];\n\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n return (\n <Circle\n as=\"span\"\n size={isTinyViewport && size < 40 ? 32 : size}\n data-testid=\"status-icon\"\n className={clsx('status-circle', sentiment)}\n >\n <Icon\n className={clsx('status-icon', iconColor)}\n title={iconLabel === null ? undefined : iconLabel || defaultIconLabel}\n />\n </Circle>\n );\n};\n\nexport default StatusIcon;\n"],"names":["mapLegacySize","String","Size","SMALL","MEDIUM","LARGE","StatusIcon","sentiment","size","sizeProp","iconLabel","intl","useIntl","iconMetaBySentiment","Sentiment","NEGATIVE","Icon","Cross","defaultIconLabel","formatMessage","messages","errorLabel","POSITIVE","Check","successLabel","WARNING","Alert","warningLabel","Status","PENDING","ClockBorderless","pendingLabel","NEUTRAL","Info","informationLabel","ERROR","INFO","SUCCESS","iconColor","isTinyViewport","useMedia","Breakpoint","ZOOM_400","_jsx","Circle","as","className","clsx","children","title","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAMA,aAAa,GAAG;AACpB,EAAA,CAACC,MAAM,CAACC,SAAI,CAACC,KAAK,CAAC,GAAG,EAAE;AACxB,EAAA,CAACF,MAAM,CAACC,SAAI,CAACE,MAAM,CAAC,GAAG,EAAE;AACzB,EAAA,CAACH,MAAM,CAACC,SAAI,CAACG,KAAK,CAAC,GAAG;CACuB;AAE/C,MAAMC,UAAU,GAAGA,CAAC;AAAEC,aAAAA,WAAS,GAAG,SAAS;EAAEC,IAAI,EAAEC,QAAQ,GAAG,EAAE;AAAEC,EAAAA;AAAS,CAAmB,KAAI;AAChG,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;AAEtB,EAAA,MAAMC,mBAAmB,GAMrB;IACF,CAACC,mBAAS,CAACC,QAAQ,GAAG;AACpBC,MAAAA,IAAI,EAAEC,WAAK;AACXC,MAAAA,gBAAgB,EAAEP,IAAI,CAACQ,aAAa,CAACC,2BAAQ,CAACC,UAAU;KACzD;IACD,CAACP,mBAAS,CAACQ,QAAQ,GAAG;AACpBN,MAAAA,IAAI,EAAEO,WAAK;AACXL,MAAAA,gBAAgB,EAAEP,IAAI,CAACQ,aAAa,CAACC,2BAAQ,CAACI,YAAY;KAC3D;IACD,CAACV,mBAAS,CAACW,OAAO,GAAG;AACnBT,MAAAA,IAAI,EAAEU,WAAK;AACXR,MAAAA,gBAAgB,EAAEP,IAAI,CAACQ,aAAa,CAACC,2BAAQ,CAACO,YAAY;KAC3D;IACD,CAACC,aAAM,CAACC,OAAO,GAAG;AAChBb,MAAAA,IAAI,EAAEc,qBAAe;AACrBZ,MAAAA,gBAAgB,EAAEP,IAAI,CAACQ,aAAa,CAACC,2BAAQ,CAACW,YAAY;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WAAS,CAAE;IAAAyC,QAAA,eAE5CL,cAAA,CAAC3B,IAAI,EAAA;AACH8B,MAAAA,SAAS,EAAEC,SAAI,CAAC,aAAa,EAAET,SAAS,CAAE;MAC1CW,KAAK,EAAEvC,SAAS,KAAK,IAAI,GAAGwC,SAAS,GAAGxC,SAAS,IAAIQ;KAAiB;AAE1E,GAAQ,CAAC;AAEb;;;;"}
|
|
@@ -35,8 +35,7 @@ const mapLegacySize = {
|
|
|
35
35
|
const StatusIcon = ({
|
|
36
36
|
sentiment = 'neutral',
|
|
37
37
|
size: sizeProp = 40,
|
|
38
|
-
iconLabel
|
|
39
|
-
className
|
|
38
|
+
iconLabel
|
|
40
39
|
}) => {
|
|
41
40
|
const intl = useIntl();
|
|
42
41
|
const iconMetaBySentiment = {
|
|
@@ -85,7 +84,7 @@ const StatusIcon = ({
|
|
|
85
84
|
as: "span",
|
|
86
85
|
size: isTinyViewport && size < 40 ? 32 : size,
|
|
87
86
|
"data-testid": "status-icon",
|
|
88
|
-
className: clsx('status-circle', sentiment
|
|
87
|
+
className: clsx('status-circle', sentiment),
|
|
89
88
|
children: /*#__PURE__*/jsx(Icon, {
|
|
90
89
|
className: clsx('status-icon', iconColor),
|
|
91
90
|
title: iconLabel === null ? undefined : iconLabel || defaultIconLabel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.mjs","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint, Status } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconSentiment = Sentiment | Status.PENDING;\n\nexport type StatusIconProps = {\n sentiment?: `${StatusIconSentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n /**\n * Override for the sentiment's-derived, default, accessible\n * name announced by the screen readers. <br />\n * Using `null` will render the icon purely presentational.\n * */\n iconLabel?: string | null;\n
|
|
1
|
+
{"version":3,"file":"StatusIcon.mjs","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint, Status } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconSentiment = Sentiment | Status.PENDING;\n\nexport type StatusIconProps = {\n sentiment?: `${StatusIconSentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n /**\n * Override for the sentiment's-derived, default, accessible\n * name announced by the screen readers. <br />\n * Using `null` will render the icon purely presentational.\n * */\n iconLabel?: string | null;\n};\n\nconst mapLegacySize = {\n [String(Size.SMALL)]: 16,\n [String(Size.MEDIUM)]: 40,\n [String(Size.LARGE)]: 48,\n} satisfies Record<string, CircleProps['size']>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: StatusIconProps) => {\n const intl = useIntl();\n\n const iconMetaBySentiment: Record<\n `${Sentiment}` | Status.PENDING,\n {\n Icon: React.ElementType;\n defaultIconLabel: string;\n }\n > = {\n [Sentiment.NEGATIVE]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.POSITIVE]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n [Sentiment.WARNING]: {\n Icon: Alert,\n defaultIconLabel: intl.formatMessage(messages.warningLabel),\n },\n [Status.PENDING]: {\n Icon: ClockBorderless,\n defaultIconLabel: intl.formatMessage(messages.pendingLabel),\n },\n [Sentiment.NEUTRAL]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n // deprecated\n [Sentiment.ERROR]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.INFO]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n [Sentiment.SUCCESS]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n };\n const { Icon, defaultIconLabel } = iconMetaBySentiment[sentiment];\n\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n return (\n <Circle\n as=\"span\"\n size={isTinyViewport && size < 40 ? 32 : size}\n data-testid=\"status-icon\"\n className={clsx('status-circle', sentiment)}\n >\n <Icon\n className={clsx('status-icon', iconColor)}\n title={iconLabel === null ? undefined : iconLabel || defaultIconLabel}\n />\n </Circle>\n );\n};\n\nexport default StatusIcon;\n"],"names":["mapLegacySize","String","Size","SMALL","MEDIUM","LARGE","StatusIcon","sentiment","size","sizeProp","iconLabel","intl","useIntl","iconMetaBySentiment","Sentiment","NEGATIVE","Icon","Cross","defaultIconLabel","formatMessage","messages","errorLabel","POSITIVE","Check","successLabel","WARNING","Alert","warningLabel","Status","PENDING","ClockBorderless","pendingLabel","NEUTRAL","Info","informationLabel","ERROR","INFO","SUCCESS","iconColor","isTinyViewport","useMedia","Breakpoint","ZOOM_400","_jsx","Circle","as","className","clsx","children","title","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM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,GAAQ,CAAC;AAEb;;;;"}
|
|
@@ -405,7 +405,7 @@
|
|
|
405
405
|
}
|
|
406
406
|
.wds-inline-prompt--muted {
|
|
407
407
|
opacity: 0.93;
|
|
408
|
-
|
|
408
|
+
filter: grayscale(1);
|
|
409
409
|
}
|
|
410
410
|
.wds-inline-prompt a,
|
|
411
411
|
.wds-inline-prompt button {
|
|
@@ -712,10 +712,6 @@
|
|
|
712
712
|
.wds-list-item-control-wrapper {
|
|
713
713
|
grid-area: control;
|
|
714
714
|
}
|
|
715
|
-
.wds-list-item-control-wrapper-disabled {
|
|
716
|
-
opacity: 0.45;
|
|
717
|
-
mix-blend-mode: luminosity;
|
|
718
|
-
}
|
|
719
715
|
.wds-list-item-navigation .tw-icon-chevron-right {
|
|
720
716
|
color: #c9cbce;
|
|
721
717
|
color: var(--color-interactive-secondary);
|
|
@@ -726,7 +722,6 @@
|
|
|
726
722
|
.wds-list-item.disabled {
|
|
727
723
|
opacity: 1;
|
|
728
724
|
opacity: initial;
|
|
729
|
-
filter: initial;
|
|
730
725
|
}
|
|
731
726
|
.wds-list-item.disabled,
|
|
732
727
|
.wds-list-item.disabled label {
|
|
@@ -744,7 +739,9 @@
|
|
|
744
739
|
.wds-list-item.disabled .wds-list-item-body,
|
|
745
740
|
.wds-list-item.disabled .wds-list-item-additional-info {
|
|
746
741
|
opacity: 0.93;
|
|
747
|
-
|
|
742
|
+
}
|
|
743
|
+
.wds-list-item.disabled--has-prompt-reason .wds-list-item-prompt {
|
|
744
|
+
opacity: 0.93;
|
|
748
745
|
}
|
|
749
746
|
.wds-list-item-spotlight {
|
|
750
747
|
padding-left: 12px;
|
package/build/styles/main.css
CHANGED
|
@@ -3049,7 +3049,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3049
3049
|
}
|
|
3050
3050
|
.wds-inline-prompt--muted {
|
|
3051
3051
|
opacity: 0.93;
|
|
3052
|
-
|
|
3052
|
+
filter: grayscale(1);
|
|
3053
3053
|
}
|
|
3054
3054
|
.wds-inline-prompt a,
|
|
3055
3055
|
.wds-inline-prompt button {
|
|
@@ -3356,10 +3356,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3356
3356
|
.wds-list-item-control-wrapper {
|
|
3357
3357
|
grid-area: control;
|
|
3358
3358
|
}
|
|
3359
|
-
.wds-list-item-control-wrapper-disabled {
|
|
3360
|
-
opacity: 0.45;
|
|
3361
|
-
mix-blend-mode: luminosity;
|
|
3362
|
-
}
|
|
3363
3359
|
.wds-list-item-navigation .tw-icon-chevron-right {
|
|
3364
3360
|
color: #c9cbce;
|
|
3365
3361
|
color: var(--color-interactive-secondary);
|
|
@@ -3370,7 +3366,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3370
3366
|
.wds-list-item.disabled {
|
|
3371
3367
|
opacity: 1;
|
|
3372
3368
|
opacity: initial;
|
|
3373
|
-
filter: initial;
|
|
3374
3369
|
}
|
|
3375
3370
|
.wds-list-item.disabled,
|
|
3376
3371
|
.wds-list-item.disabled label {
|
|
@@ -3388,7 +3383,9 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3388
3383
|
.wds-list-item.disabled .wds-list-item-body,
|
|
3389
3384
|
.wds-list-item.disabled .wds-list-item-additional-info {
|
|
3390
3385
|
opacity: 0.93;
|
|
3391
|
-
|
|
3386
|
+
}
|
|
3387
|
+
.wds-list-item.disabled--has-prompt-reason .wds-list-item-prompt {
|
|
3388
|
+
opacity: 0.93;
|
|
3392
3389
|
}
|
|
3393
3390
|
.wds-list-item-spotlight {
|
|
3394
3391
|
padding-left: 12px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/listItem/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,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;AAEF,eAAO,MAAM,YAAY,GAAI,6DAO1B,iBAAiB,
|
|
1
|
+
{"version":3,"file":"InlinePrompt.d.ts","sourceRoot":"","sources":["../../../../../src/listItem/Prompt/InlinePrompt/InlinePrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAO5C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,CAAC,EAAE,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;IACjG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,6DAO1B,iBAAiB,gCA4BnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemPrompt.d.ts","sourceRoot":"","sources":["../../../../src/listItem/Prompt/ListItemPrompt.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEtE,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,CAAC;AAE9F;;;;;GAKG;AACH,eAAO,MAAM,MAAM;8BAAiD,mBAAmB;;
|
|
1
|
+
{"version":3,"file":"ListItemPrompt.d.ts","sourceRoot":"","sources":["../../../../src/listItem/Prompt/ListItemPrompt.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEtE,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,CAAC;AAE9F;;;;;GAKG;AACH,eAAO,MAAM,MAAM;8BAAiD,mBAAmB;;CActF,CAAC;AAGF,eAAe,MAAM,CAAC"}
|
|
@@ -13,8 +13,7 @@ export type StatusIconProps = {
|
|
|
13
13
|
* Using `null` will render the icon purely presentational.
|
|
14
14
|
* */
|
|
15
15
|
iconLabel?: string | null;
|
|
16
|
-
className?: string;
|
|
17
16
|
};
|
|
18
|
-
declare const StatusIcon: ({ sentiment, size: sizeProp, iconLabel
|
|
17
|
+
declare const StatusIcon: ({ sentiment, size: sizeProp, iconLabel }: StatusIconProps) => import("react").JSX.Element;
|
|
19
18
|
export default StatusIcon;
|
|
20
19
|
//# sourceMappingURL=StatusIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.d.ts","sourceRoot":"","sources":["../../../src/statusIcon/StatusIcon.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,EAAE,MAAM,WAAW,CAAC;AAMlG;;GAEG;AACH,KAAK,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,GAAG,mBAAmB,EAAE,CAAC;IACrC,IAAI,CAAC,EAAE,WAAW,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACtD;;;;SAIK;IACL,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusIcon.d.ts","sourceRoot":"","sources":["../../../src/statusIcon/StatusIcon.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,EAAE,MAAM,WAAW,CAAC;AAMlG;;GAEG;AACH,KAAK,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,GAAG,mBAAmB,EAAE,CAAC;IACrC,IAAI,CAAC,EAAE,WAAW,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACtD;;;;SAIK;IACL,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAQF,QAAA,MAAM,UAAU,GAAI,0CAA2D,eAAe,gCA8D7F,CAAC;AAEF,eAAe,UAAU,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-812a5b7",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"storybook": "^9.1.3",
|
|
84
84
|
"storybook-addon-tag-badges": "^2.0.2",
|
|
85
85
|
"storybook-addon-test-codegen": "^2.0.1",
|
|
86
|
-
"@transferwise/neptune-css": "14.24.5",
|
|
87
86
|
"@transferwise/less-config": "3.1.2",
|
|
87
|
+
"@transferwise/neptune-css": "14.24.5",
|
|
88
88
|
"@wise/components-theming": "1.6.4",
|
|
89
89
|
"@wise/wds-configs": "0.0.0"
|
|
90
90
|
},
|
|
@@ -405,7 +405,7 @@
|
|
|
405
405
|
}
|
|
406
406
|
.wds-inline-prompt--muted {
|
|
407
407
|
opacity: 0.93;
|
|
408
|
-
|
|
408
|
+
filter: grayscale(1);
|
|
409
409
|
}
|
|
410
410
|
.wds-inline-prompt a,
|
|
411
411
|
.wds-inline-prompt button {
|
|
@@ -712,10 +712,6 @@
|
|
|
712
712
|
.wds-list-item-control-wrapper {
|
|
713
713
|
grid-area: control;
|
|
714
714
|
}
|
|
715
|
-
.wds-list-item-control-wrapper-disabled {
|
|
716
|
-
opacity: 0.45;
|
|
717
|
-
mix-blend-mode: luminosity;
|
|
718
|
-
}
|
|
719
715
|
.wds-list-item-navigation .tw-icon-chevron-right {
|
|
720
716
|
color: #c9cbce;
|
|
721
717
|
color: var(--color-interactive-secondary);
|
|
@@ -726,7 +722,6 @@
|
|
|
726
722
|
.wds-list-item.disabled {
|
|
727
723
|
opacity: 1;
|
|
728
724
|
opacity: initial;
|
|
729
|
-
filter: initial;
|
|
730
725
|
}
|
|
731
726
|
.wds-list-item.disabled,
|
|
732
727
|
.wds-list-item.disabled label {
|
|
@@ -744,7 +739,9 @@
|
|
|
744
739
|
.wds-list-item.disabled .wds-list-item-body,
|
|
745
740
|
.wds-list-item.disabled .wds-list-item-additional-info {
|
|
746
741
|
opacity: 0.93;
|
|
747
|
-
|
|
742
|
+
}
|
|
743
|
+
.wds-list-item.disabled--has-prompt-reason .wds-list-item-prompt {
|
|
744
|
+
opacity: 0.93;
|
|
748
745
|
}
|
|
749
746
|
.wds-list-item-spotlight {
|
|
750
747
|
padding-left: 12px;
|
|
@@ -210,11 +210,6 @@
|
|
|
210
210
|
|
|
211
211
|
&-control-wrapper {
|
|
212
212
|
grid-area: control;
|
|
213
|
-
|
|
214
|
-
&-disabled {
|
|
215
|
-
opacity: .45;
|
|
216
|
-
mix-blend-mode: luminosity;
|
|
217
|
-
}
|
|
218
213
|
}
|
|
219
214
|
|
|
220
215
|
&-navigation {
|
|
@@ -229,7 +224,6 @@
|
|
|
229
224
|
|
|
230
225
|
&.disabled {
|
|
231
226
|
opacity: unset;
|
|
232
|
-
filter: unset;
|
|
233
227
|
|
|
234
228
|
&, label {
|
|
235
229
|
cursor: not-allowed;
|
|
@@ -247,9 +241,13 @@
|
|
|
247
241
|
.wds-list-item-body,
|
|
248
242
|
.wds-list-item-additional-info {
|
|
249
243
|
opacity: .93;
|
|
250
|
-
mix-blend-mode: luminosity;
|
|
251
244
|
}
|
|
245
|
+
}
|
|
252
246
|
|
|
247
|
+
&.disabled--has-prompt-reason {
|
|
248
|
+
.wds-list-item-prompt{
|
|
249
|
+
opacity: .93;
|
|
250
|
+
}
|
|
253
251
|
}
|
|
254
252
|
|
|
255
253
|
&-spotlight {
|
|
@@ -14,6 +14,7 @@ describe('ListItem', () => {
|
|
|
14
14
|
const additionalInfo = '__additionalInfo__';
|
|
15
15
|
const additionalInfoAction = '__infoAction__';
|
|
16
16
|
const prompt = '__prompt__';
|
|
17
|
+
const disabledPromptMessage = '__disabledPromptMessage__';
|
|
17
18
|
const promptAction = '__promptAction__';
|
|
18
19
|
const promptWithLink = (
|
|
19
20
|
<>
|
|
@@ -1511,4 +1512,36 @@ describe('ListItem', () => {
|
|
|
1511
1512
|
expect(listItem.querySelector('.wds-list-item-spotlight__border')).not.toBeInTheDocument();
|
|
1512
1513
|
});
|
|
1513
1514
|
});
|
|
1515
|
+
|
|
1516
|
+
describe('disable states', () => {
|
|
1517
|
+
describe('short-lived', () => {
|
|
1518
|
+
it('should override existing prompt if disabled and disabledPromptMessage are set', () => {
|
|
1519
|
+
render(
|
|
1520
|
+
<ListItem
|
|
1521
|
+
title="Test Title"
|
|
1522
|
+
prompt={<ListItem.Prompt>{prompt}</ListItem.Prompt>}
|
|
1523
|
+
disabled
|
|
1524
|
+
disabledPromptMessage={disabledPromptMessage}
|
|
1525
|
+
/>,
|
|
1526
|
+
);
|
|
1527
|
+
expect(screen.queryByText(prompt)).not.toBeInTheDocument();
|
|
1528
|
+
expect(screen.getByText(disabledPromptMessage)).toBeInTheDocument();
|
|
1529
|
+
expect(screen.getByTestId('InlinePrompt_Muted').parentNode?.parentNode).toHaveAttribute(
|
|
1530
|
+
'id',
|
|
1531
|
+
expect.stringMatching(/_prompt$/),
|
|
1532
|
+
);
|
|
1533
|
+
});
|
|
1534
|
+
|
|
1535
|
+
it('should render muted prompt if disabled and disabledPromptMessage are set', () => {
|
|
1536
|
+
render(
|
|
1537
|
+
<ListItem title="Test Title" disabled disabledPromptMessage={disabledPromptMessage} />,
|
|
1538
|
+
);
|
|
1539
|
+
expect(screen.getByText(disabledPromptMessage)).toBeInTheDocument();
|
|
1540
|
+
expect(screen.getByTestId('InlinePrompt_Muted').parentNode?.parentNode).toHaveAttribute(
|
|
1541
|
+
'id',
|
|
1542
|
+
expect.stringMatching(/_prompt$/),
|
|
1543
|
+
);
|
|
1544
|
+
});
|
|
1545
|
+
});
|
|
1546
|
+
});
|
|
1514
1547
|
});
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type PropsWithChildren,
|
|
7
7
|
type ReactNode,
|
|
8
8
|
} from 'react';
|
|
9
|
-
import { Typography } from '../common';
|
|
9
|
+
import { Sentiment, Typography } from '../common';
|
|
10
10
|
import Body from '../body';
|
|
11
11
|
import { AdditionalInfo } from './AdditionalInfo';
|
|
12
12
|
import { IconButton, type ListItemIconButtonProps } from './IconButton';
|
|
@@ -136,7 +136,7 @@ export const ListItem = ({
|
|
|
136
136
|
...(valueTitle ? { valueTitle: `${idPrefix}_value-title` } : {}),
|
|
137
137
|
...(valueSubtitle ? { valueSubtitle: `${idPrefix}_value-subtitle` } : {}),
|
|
138
138
|
control: `${idPrefix}_control`,
|
|
139
|
-
...(prompt ? { prompt: `${idPrefix}_prompt` } : {}),
|
|
139
|
+
...(prompt || (disabled && disabledPromptMessage) ? { prompt: `${idPrefix}_prompt` } : {}),
|
|
140
140
|
...(additionalInfo ? { additionalInfo: `${idPrefix}_additional-info` } : {}),
|
|
141
141
|
};
|
|
142
142
|
|
|
@@ -186,7 +186,7 @@ export const ListItem = ({
|
|
|
186
186
|
const hasMedia = Boolean(media);
|
|
187
187
|
const hasControl = Boolean(control);
|
|
188
188
|
const hasInfo = Boolean(additionalInfo);
|
|
189
|
-
const hasPrompt = Boolean(prompt);
|
|
189
|
+
const hasPrompt = Boolean(prompt) || (disabled && Boolean(disabledPromptMessage));
|
|
190
190
|
|
|
191
191
|
/* eslint-disable functional/immutable-data */
|
|
192
192
|
if (hasMedia && hasControl) {
|
|
@@ -235,6 +235,7 @@ export const ListItem = ({
|
|
|
235
235
|
[`wds-list-item-spotlight wds-list-item-spotlight-${spotlight}`]:
|
|
236
236
|
isFullyInteractive && !!spotlight,
|
|
237
237
|
disabled: disabled && !isPartiallyInteractive,
|
|
238
|
+
'disabled--has-prompt-reason': !disabledPromptMessage && disabled && !isPartiallyInteractive,
|
|
238
239
|
},
|
|
239
240
|
className,
|
|
240
241
|
)}
|
|
@@ -258,6 +259,7 @@ export const ListItem = ({
|
|
|
258
259
|
subtitle,
|
|
259
260
|
additionalInfo,
|
|
260
261
|
disabled,
|
|
262
|
+
disabledPromptMessage,
|
|
261
263
|
prompt,
|
|
262
264
|
controlType,
|
|
263
265
|
controlProps,
|
|
@@ -338,7 +340,6 @@ export const ListItem = ({
|
|
|
338
340
|
'wds-list-item-button-control': controlType === 'button',
|
|
339
341
|
'wds-list-item-button-control--hasPrompt':
|
|
340
342
|
controlType === 'button' && Boolean(prompt),
|
|
341
|
-
'wds-list-item-control-wrapper-disabled': disabled,
|
|
342
343
|
})}
|
|
343
344
|
style={
|
|
344
345
|
{
|
|
@@ -360,13 +361,17 @@ type ViewProps = PropsWithChildren<{
|
|
|
360
361
|
controlType?: ListItemTypes;
|
|
361
362
|
controlProps?: ListItemControlProps;
|
|
362
363
|
}> &
|
|
363
|
-
Pick<
|
|
364
|
+
Pick<
|
|
365
|
+
ListItemProps,
|
|
366
|
+
'subtitle' | 'additionalInfo' | 'prompt' | 'disabled' | 'disabledPromptMessage' | 'className'
|
|
367
|
+
>;
|
|
364
368
|
|
|
365
369
|
function View({
|
|
366
370
|
children,
|
|
367
371
|
additionalInfo,
|
|
368
372
|
prompt,
|
|
369
373
|
disabled,
|
|
374
|
+
disabledPromptMessage,
|
|
370
375
|
isPartiallyInteractive,
|
|
371
376
|
controlType = 'non-interactive',
|
|
372
377
|
controlProps,
|
|
@@ -377,12 +382,21 @@ function View({
|
|
|
377
382
|
|
|
378
383
|
const isHrefProvided = isLinkControl && !!(controlProps as ListItemNavigationProps)?.href;
|
|
379
384
|
|
|
380
|
-
const renderExtras = () =>
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
385
|
+
const renderExtras = () => {
|
|
386
|
+
const resolvedPrompt =
|
|
387
|
+
disabled && disabledPromptMessage && !prompt ? (
|
|
388
|
+
<Prompt sentiment={Sentiment.NEUTRAL}>{disabledPromptMessage}</Prompt>
|
|
389
|
+
) : (
|
|
390
|
+
prompt
|
|
391
|
+
);
|
|
392
|
+
|
|
393
|
+
return (
|
|
394
|
+
<>
|
|
395
|
+
{additionalInfo}
|
|
396
|
+
{resolvedPrompt}
|
|
397
|
+
</>
|
|
398
|
+
);
|
|
399
|
+
};
|
|
386
400
|
|
|
387
401
|
if (isLinkControl && isHrefProvided) {
|
|
388
402
|
return (
|
|
@@ -90,25 +90,3 @@ export const AsButton: Story = {
|
|
|
90
90
|
);
|
|
91
91
|
},
|
|
92
92
|
};
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Unlike other controls, the Navigation control has a custom disabled state
|
|
96
|
-
* for improved discoverability, accessibility and overall UX.
|
|
97
|
-
*/
|
|
98
|
-
export const Disabled: Story = {
|
|
99
|
-
render: (args) => {
|
|
100
|
-
return (
|
|
101
|
-
<List>
|
|
102
|
-
<ListItem
|
|
103
|
-
disabled
|
|
104
|
-
control={<ListItem.Navigation {...args} />}
|
|
105
|
-
title="This option is disabled"
|
|
106
|
-
subtitle={lorem10}
|
|
107
|
-
additionalInfo={INFO.nonInteractive}
|
|
108
|
-
prompt={PROMPTS.interactive}
|
|
109
|
-
media={MEDIA.avatarSingle}
|
|
110
|
-
/>
|
|
111
|
-
</List>
|
|
112
|
-
);
|
|
113
|
-
},
|
|
114
|
-
};
|
|
@@ -28,24 +28,12 @@ export const InlinePrompt = ({
|
|
|
28
28
|
}: InlinePromptProps) => {
|
|
29
29
|
const renderMedia = () => {
|
|
30
30
|
if (muted) {
|
|
31
|
-
return
|
|
32
|
-
<BackslashCircle
|
|
33
|
-
size={16}
|
|
34
|
-
className="wds-inline-prompt__media"
|
|
35
|
-
data-testid="InlinePrompt_Muted"
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
31
|
+
return <BackslashCircle size={16} data-testid="InlinePrompt_Muted" />;
|
|
38
32
|
}
|
|
39
33
|
if (loading) {
|
|
40
|
-
return
|
|
41
|
-
<ProcessIndicator
|
|
42
|
-
data-testid="InlinePrompt_ProcessIndicator"
|
|
43
|
-
size="xxs"
|
|
44
|
-
className="wds-inline-prompt__media"
|
|
45
|
-
/>
|
|
46
|
-
);
|
|
34
|
+
return <ProcessIndicator data-testid="InlinePrompt_ProcessIndicator" size="xxs" />;
|
|
47
35
|
}
|
|
48
|
-
return <StatusIcon size={16} sentiment={sentiment}
|
|
36
|
+
return <StatusIcon size={16} sentiment={sentiment} />;
|
|
49
37
|
};
|
|
50
38
|
|
|
51
39
|
return (
|
|
@@ -34,10 +34,39 @@ describe('ListItem.Prompt', () => {
|
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
render(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
describe('muted state', () => {
|
|
38
|
+
it('does not render backslash-cross icon when parent ListItem is disabled and disabledPromptMessage is not', () => {
|
|
39
|
+
render(
|
|
40
|
+
<ListItem
|
|
41
|
+
title="Test Title"
|
|
42
|
+
disabled
|
|
43
|
+
prompt={<ListItem.Prompt>Message</ListItem.Prompt>}
|
|
44
|
+
/>,
|
|
45
|
+
);
|
|
46
|
+
expect(screen.queryByTestId('InlinePrompt_Muted')).not.toBeInTheDocument();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('does not renders backslash-cross icon when parent ListItem is not disabled but disabledPromptMessage is set', () => {
|
|
50
|
+
render(
|
|
51
|
+
<ListItem
|
|
52
|
+
title="Test Title"
|
|
53
|
+
disabledPromptMessage="Test reason"
|
|
54
|
+
prompt={<ListItem.Prompt>Message</ListItem.Prompt>}
|
|
55
|
+
/>,
|
|
56
|
+
);
|
|
57
|
+
expect(screen.queryByTestId('InlinePrompt_Muted')).not.toBeInTheDocument();
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('renders backslash-cross icon when parent ListItem is disabled and disabledPromptMessage is provided', () => {
|
|
61
|
+
render(
|
|
62
|
+
<ListItem
|
|
63
|
+
title="Test Title"
|
|
64
|
+
disabled
|
|
65
|
+
disabledPromptMessage="Test reason"
|
|
66
|
+
prompt={<ListItem.Prompt>Message</ListItem.Prompt>}
|
|
67
|
+
/>,
|
|
68
|
+
);
|
|
69
|
+
expect(screen.getByTestId('InlinePrompt_Muted')).toBeInTheDocument();
|
|
70
|
+
});
|
|
42
71
|
});
|
|
43
72
|
});
|