@transferwise/components 0.0.0-experimental-358e009 → 0.0.0-experimental-49ac695
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 +97 -77
- package/build/prompt/InlinePrompt/InlinePrompt.js +8 -10
- package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.mjs +9 -11
- package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +45 -0
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -0
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +43 -0
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -0
- package/build/styles/main.css +97 -77
- package/build/styles/prompt/InlinePrompt/InlinePrompt.css +2 -23
- package/build/styles/prompt/PrimitivePrompt/PrimitivePrompt.css +41 -0
- package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts +1 -1
- package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts.map +1 -1
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +30 -0
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -0
- package/build/types/prompt/PrimitivePrompt/index.d.ts +3 -0
- package/build/types/prompt/PrimitivePrompt/index.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/listItem/ListItem.spec.tsx +6 -8
- package/src/main.css +97 -77
- package/src/main.less +2 -1
- package/src/prompt/InlinePrompt/InlinePrompt.css +2 -23
- package/src/prompt/InlinePrompt/InlinePrompt.less +3 -18
- package/src/prompt/InlinePrompt/InlinePrompt.spec.tsx +6 -6
- package/src/prompt/InlinePrompt/InlinePrompt.tsx +6 -7
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.css +41 -0
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.less +37 -0
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +70 -0
- package/src/prompt/PrimitivePrompt/index.ts +2 -0
package/build/main.css
CHANGED
|
@@ -920,83 +920,6 @@
|
|
|
920
920
|
.np-theme-personal .tw-avatar--outlined:not(.disabled):not(:disabled):hover {
|
|
921
921
|
border-color: var(--color-interactive-primary-hover);
|
|
922
922
|
}
|
|
923
|
-
.wds-inline-prompt {
|
|
924
|
-
display: inline-flex;
|
|
925
|
-
text-align: left;
|
|
926
|
-
padding-top: calc(8px / 2);
|
|
927
|
-
padding-top: calc(var(--padding-x-small) / 2);
|
|
928
|
-
padding-bottom: calc(8px / 2);
|
|
929
|
-
padding-bottom: calc(var(--padding-x-small) / 2);
|
|
930
|
-
padding-left: calc(8px - 1px);
|
|
931
|
-
padding-left: calc(var(--padding-x-small) - 1px);
|
|
932
|
-
padding-right: 8px;
|
|
933
|
-
padding-right: var(--padding-x-small);
|
|
934
|
-
border-radius: 10px;
|
|
935
|
-
border-radius: var(--radius-small);
|
|
936
|
-
word-break: break-word;
|
|
937
|
-
word-wrap: break-word;
|
|
938
|
-
}
|
|
939
|
-
.wds-inline-prompt:has(a),
|
|
940
|
-
.wds-inline-prompt:has(button) {
|
|
941
|
-
position: relative;
|
|
942
|
-
z-index: 1;
|
|
943
|
-
}
|
|
944
|
-
.wds-inline-prompt:has(a):hover,
|
|
945
|
-
.wds-inline-prompt:has(button):hover {
|
|
946
|
-
background-color: var(--color-sentiment-background-surface-hover);
|
|
947
|
-
}
|
|
948
|
-
.wds-inline-prompt:has(a):active,
|
|
949
|
-
.wds-inline-prompt:has(button):active {
|
|
950
|
-
background-color: var(--color-sentiment-background-surface-active);
|
|
951
|
-
}
|
|
952
|
-
.wds-inline-prompt--full-width {
|
|
953
|
-
width: 100%;
|
|
954
|
-
}
|
|
955
|
-
.wds-inline-prompt--muted {
|
|
956
|
-
opacity: 0.93;
|
|
957
|
-
filter: grayscale(1);
|
|
958
|
-
}
|
|
959
|
-
.wds-inline-prompt a,
|
|
960
|
-
.wds-inline-prompt button {
|
|
961
|
-
color: var(--color-sentiment-content-primary);
|
|
962
|
-
text-underline-offset: calc(4px / 2);
|
|
963
|
-
text-underline-offset: calc(var(--size-4) / 2);
|
|
964
|
-
}
|
|
965
|
-
.wds-inline-prompt a:hover,
|
|
966
|
-
.wds-inline-prompt button:hover {
|
|
967
|
-
color: var(--color-sentiment-content-primary-hover);
|
|
968
|
-
}
|
|
969
|
-
.wds-inline-prompt a:active,
|
|
970
|
-
.wds-inline-prompt button:active {
|
|
971
|
-
color: var(--color-sentiment-content-primary-active);
|
|
972
|
-
}
|
|
973
|
-
.wds-inline-prompt a:first-of-type:before,
|
|
974
|
-
.wds-inline-prompt button:first-of-type:before {
|
|
975
|
-
content: "";
|
|
976
|
-
position: absolute;
|
|
977
|
-
inset: 0;
|
|
978
|
-
}
|
|
979
|
-
.wds-inline-prompt__media-wrapper {
|
|
980
|
-
padding-right: calc(12px / 2);
|
|
981
|
-
padding-right: calc(var(--size-12) / 2);
|
|
982
|
-
padding-top: calc(4px - 1px);
|
|
983
|
-
padding-top: calc(var(--size-4) - 1px);
|
|
984
|
-
padding-bottom: calc(4px - 1px);
|
|
985
|
-
padding-bottom: calc(var(--size-4) - 1px);
|
|
986
|
-
}
|
|
987
|
-
.wds-inline-prompt__media-wrapper .tw-icon-tags,
|
|
988
|
-
.wds-inline-prompt__media-wrapper .tw-icon-confetti {
|
|
989
|
-
color: var(--color-sentiment-content-primary);
|
|
990
|
-
}
|
|
991
|
-
.wds-inline-prompt .wds-inline-prompt-process-indicator {
|
|
992
|
-
width: 16px;
|
|
993
|
-
width: var(--size-16);
|
|
994
|
-
height: 16px;
|
|
995
|
-
height: var(--size-16);
|
|
996
|
-
}
|
|
997
|
-
.wds-inline-prompt .wds-inline-prompt-process-indicator .process-circle {
|
|
998
|
-
stroke: currentColor;
|
|
999
|
-
}
|
|
1000
923
|
.np-dot {
|
|
1001
924
|
--np-dot-size: 14px;
|
|
1002
925
|
position: relative;
|
|
@@ -5412,6 +5335,103 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
5412
5335
|
.np-CardGroup .np-Card.np-Card--promoCard {
|
|
5413
5336
|
max-width: 100%;
|
|
5414
5337
|
}
|
|
5338
|
+
.wds-prompt {
|
|
5339
|
+
border-radius: 10px;
|
|
5340
|
+
border-radius: var(--radius-small);
|
|
5341
|
+
display: flex;
|
|
5342
|
+
word-wrap: break-word;
|
|
5343
|
+
padding: 8px;
|
|
5344
|
+
padding: var(--Prompt-padding, var(--padding-x-small));
|
|
5345
|
+
text-align: left;
|
|
5346
|
+
word-break: break-word;
|
|
5347
|
+
}
|
|
5348
|
+
.wds-prompt__content-wrapper {
|
|
5349
|
+
display: grid;
|
|
5350
|
+
grid-gap: 16px;
|
|
5351
|
+
grid-gap: var(--Prompt-gap, var(--size-16));
|
|
5352
|
+
gap: 16px;
|
|
5353
|
+
gap: var(--Prompt-gap, var(--size-16));
|
|
5354
|
+
grid-template-columns: auto 1fr;
|
|
5355
|
+
width: 100%;
|
|
5356
|
+
}
|
|
5357
|
+
.wds-prompt__media-wrapper {
|
|
5358
|
+
align-self: flex-start;
|
|
5359
|
+
padding-top: calc(4px - 1px);
|
|
5360
|
+
padding-top: calc(var(--size-4) - 1px);
|
|
5361
|
+
}
|
|
5362
|
+
.wds-prompt__media-wrapper .tw-icon-tags,
|
|
5363
|
+
.wds-prompt__media-wrapper .tw-icon-confetti {
|
|
5364
|
+
color: var(--color-sentiment-content-primary);
|
|
5365
|
+
}
|
|
5366
|
+
.wds-prompt__actions-wrapper {
|
|
5367
|
+
display: flex;
|
|
5368
|
+
flex-wrap: wrap;
|
|
5369
|
+
gap: 8px;
|
|
5370
|
+
gap: var(--Prompt-actions-gap, var(--size-8));
|
|
5371
|
+
grid-column-start: 2;
|
|
5372
|
+
}
|
|
5373
|
+
@media (max-width: 991px) {
|
|
5374
|
+
.wds-prompt__actions-wrapper {
|
|
5375
|
+
grid-column: span 2;
|
|
5376
|
+
width: 100%;
|
|
5377
|
+
}
|
|
5378
|
+
}
|
|
5379
|
+
.wds-inline-prompt {
|
|
5380
|
+
--Prompt-gap: calc(var(--size-12) / 2);
|
|
5381
|
+
--Prompt-padding: calc(var(--padding-x-small) / 2) var(--padding-x-small);
|
|
5382
|
+
display: inline-flex;
|
|
5383
|
+
border-radius: 10px;
|
|
5384
|
+
border-radius: var(--radius-small);
|
|
5385
|
+
}
|
|
5386
|
+
.wds-inline-prompt:has(a),
|
|
5387
|
+
.wds-inline-prompt:has(button) {
|
|
5388
|
+
position: relative;
|
|
5389
|
+
z-index: 1;
|
|
5390
|
+
}
|
|
5391
|
+
.wds-inline-prompt:has(a):hover,
|
|
5392
|
+
.wds-inline-prompt:has(button):hover {
|
|
5393
|
+
background-color: var(--color-sentiment-background-surface-hover);
|
|
5394
|
+
}
|
|
5395
|
+
.wds-inline-prompt:has(a):active,
|
|
5396
|
+
.wds-inline-prompt:has(button):active {
|
|
5397
|
+
background-color: var(--color-sentiment-background-surface-active);
|
|
5398
|
+
}
|
|
5399
|
+
.wds-inline-prompt--full-width {
|
|
5400
|
+
width: 100%;
|
|
5401
|
+
}
|
|
5402
|
+
.wds-inline-prompt--muted {
|
|
5403
|
+
opacity: 0.93;
|
|
5404
|
+
filter: grayscale(1);
|
|
5405
|
+
}
|
|
5406
|
+
.wds-inline-prompt a,
|
|
5407
|
+
.wds-inline-prompt button {
|
|
5408
|
+
color: var(--color-sentiment-content-primary);
|
|
5409
|
+
text-underline-offset: calc(4px / 2);
|
|
5410
|
+
text-underline-offset: calc(var(--size-4) / 2);
|
|
5411
|
+
}
|
|
5412
|
+
.wds-inline-prompt a:hover,
|
|
5413
|
+
.wds-inline-prompt button:hover {
|
|
5414
|
+
color: var(--color-sentiment-content-primary-hover);
|
|
5415
|
+
}
|
|
5416
|
+
.wds-inline-prompt a:active,
|
|
5417
|
+
.wds-inline-prompt button:active {
|
|
5418
|
+
color: var(--color-sentiment-content-primary-active);
|
|
5419
|
+
}
|
|
5420
|
+
.wds-inline-prompt a:first-of-type:before,
|
|
5421
|
+
.wds-inline-prompt button:first-of-type:before {
|
|
5422
|
+
content: "";
|
|
5423
|
+
position: absolute;
|
|
5424
|
+
inset: 0;
|
|
5425
|
+
}
|
|
5426
|
+
.wds-inline-prompt .wds-inline-prompt-process-indicator {
|
|
5427
|
+
width: 16px;
|
|
5428
|
+
width: var(--size-16);
|
|
5429
|
+
height: 16px;
|
|
5430
|
+
height: var(--size-16);
|
|
5431
|
+
}
|
|
5432
|
+
.wds-inline-prompt .wds-inline-prompt-process-indicator .process-circle {
|
|
5433
|
+
stroke: currentColor;
|
|
5434
|
+
}
|
|
5415
5435
|
.wds-radio-group .np-radio:last-child label {
|
|
5416
5436
|
margin-bottom: 0;
|
|
5417
5437
|
}
|
|
@@ -28,7 +28,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
28
28
|
var ProcessIndicator = require('../../processIndicator/ProcessIndicator.js');
|
|
29
29
|
var StatusIcon = require('../../statusIcon/StatusIcon.js');
|
|
30
30
|
var Body = require('../../body/Body.js');
|
|
31
|
-
var
|
|
31
|
+
var PrimitivePrompt = require('../PrimitivePrompt/PrimitivePrompt.js');
|
|
32
32
|
|
|
33
33
|
const InlinePrompt = ({
|
|
34
34
|
sentiment: sentiment$1 = sentiment.Sentiment.POSITIVE,
|
|
@@ -40,7 +40,7 @@ const InlinePrompt = ({
|
|
|
40
40
|
mediaLabel,
|
|
41
41
|
width = 'auto',
|
|
42
42
|
'data-testid': dataTestId,
|
|
43
|
-
...
|
|
43
|
+
...restProps
|
|
44
44
|
}) => {
|
|
45
45
|
const surfaceSentiment = sentiment$1 === sentiment.Sentiment.POSITIVE ? 'success' : sentiment$1;
|
|
46
46
|
const renderMedia = () => {
|
|
@@ -69,21 +69,19 @@ const InlinePrompt = ({
|
|
|
69
69
|
iconLabel: mediaLabel
|
|
70
70
|
});
|
|
71
71
|
};
|
|
72
|
-
return /*#__PURE__*/jsxRuntime.
|
|
72
|
+
return /*#__PURE__*/jsxRuntime.jsx(PrimitivePrompt.PrimitivePrompt, {
|
|
73
73
|
sentiment: surfaceSentiment,
|
|
74
|
+
media: renderMedia(),
|
|
74
75
|
"data-testid": dataTestId,
|
|
75
|
-
className: clsx.clsx('wds-inline-prompt',
|
|
76
|
+
className: clsx.clsx('wds-inline-prompt', {
|
|
76
77
|
'wds-inline-prompt--full-width': width === 'full',
|
|
77
78
|
'wds-inline-prompt--muted': muted,
|
|
78
79
|
'wds-inline-prompt--loading': loading
|
|
79
80
|
}, className),
|
|
80
|
-
...
|
|
81
|
-
children:
|
|
82
|
-
className: "wds-inline-prompt__media-wrapper",
|
|
83
|
-
children: renderMedia()
|
|
84
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
81
|
+
...restProps,
|
|
82
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
85
83
|
children: children
|
|
86
|
-
})
|
|
84
|
+
})
|
|
87
85
|
});
|
|
88
86
|
};
|
|
89
87
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlinePrompt.js","sources":["../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"sourcesContent":["import { Sentiment } from '../../common';\nimport { BackslashCircle, GiftBox } from '@transferwise/icons';\nimport ProcessIndicator from '../../processIndicator';\nimport StatusIcon from '../../statusIcon';\nimport { clsx } from 'clsx';\nimport Body from '../../body';\nimport
|
|
1
|
+
{"version":3,"file":"InlinePrompt.js","sources":["../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"sourcesContent":["import { Sentiment } from '../../common';\nimport { BackslashCircle, GiftBox } from '@transferwise/icons';\nimport ProcessIndicator from '../../processIndicator';\nimport StatusIcon from '../../statusIcon';\nimport { clsx } from 'clsx';\nimport Body from '../../body';\nimport { PrimitivePrompt } from '../PrimitivePrompt';\n\nexport type InlinePromptProps = {\n /**\n * The sentiment determines the colour scheme\n */\n sentiment?:\n | `${Sentiment.POSITIVE | Sentiment.NEGATIVE | Sentiment.NEUTRAL | Sentiment.WARNING}`\n | 'proposition';\n /**\n * Replaces the icon with a spinner while waiting for the short-lived action to finish.\n * @default false\n */\n loading?: boolean;\n /**\n * While prompts cannot be fully (visually and functionally) disabled, this prop should be enabled\n * they are associated with actually disabled component (e.g. a disabled list item or input).\n * @default false\n */\n muted?: boolean;\n /**\n * Icon override for all sentiments. If the sentiment uses StatusIcon by default, it will be\n * replaced by a plain icon.\n */\n media?: React.ReactNode;\n /**\n * Override for the sentiment's-derived, default, accessible name announced by the screen readers.\n */\n mediaLabel?: string;\n /**\n * Defines the sizing strategy of the prompt component - either hugging the content or taking full width of the container.\n * @default auto\n */\n width?: 'auto' | 'full';\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: React.ReactNode;\n};\n\n/**\n * Inline prompts appear alongside a specific component on the screen. They help the user stay\n * informed, fix something, or get more out of what they're doing. <br />\n *\n * **NB:** It should be used in favour of `InlineAlert` which will be soon deprecated.\n */\nexport const InlinePrompt = ({\n sentiment = Sentiment.POSITIVE,\n muted = false,\n loading = false,\n className,\n children,\n media = null,\n mediaLabel,\n width = 'auto',\n 'data-testid': dataTestId,\n ...restProps\n}: InlinePromptProps) => {\n const surfaceSentiment = sentiment === Sentiment.POSITIVE ? 'success' : sentiment;\n\n const renderMedia = () => {\n if (muted) {\n return <BackslashCircle size={16} data-testid=\"InlinePrompt_Muted\" title={mediaLabel} />;\n }\n\n if (loading) {\n return (\n <ProcessIndicator\n data-testid=\"InlinePrompt_ProcessIndicator\"\n size=\"xxs\"\n className=\"wds-inline-prompt-process-indicator\"\n />\n );\n }\n\n if (sentiment === 'proposition') {\n return media || <GiftBox title={mediaLabel} />;\n }\n\n return media || <StatusIcon size={16} sentiment={sentiment} iconLabel={mediaLabel} />;\n };\n\n return (\n <PrimitivePrompt\n sentiment={surfaceSentiment}\n media={renderMedia()}\n data-testid={dataTestId}\n className={clsx(\n 'wds-inline-prompt',\n {\n 'wds-inline-prompt--full-width': width === 'full',\n 'wds-inline-prompt--muted': muted,\n 'wds-inline-prompt--loading': loading,\n },\n className,\n )}\n {...restProps}\n >\n <Body>{children}</Body>\n </PrimitivePrompt>\n );\n};\n"],"names":["InlinePrompt","sentiment","Sentiment","POSITIVE","muted","loading","className","children","media","mediaLabel","width","dataTestId","restProps","surfaceSentiment","renderMedia","_jsx","BackslashCircle","size","title","ProcessIndicator","GiftBox","StatusIcon","iconLabel","PrimitivePrompt","clsx","Body"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDO,MAAMA,YAAY,GAAGA,CAAC;aAC3BC,WAAS,GAAGC,mBAAS,CAACC,QAAQ;AAC9BC,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,OAAO,GAAG,KAAK;EACfC,SAAS;EACTC,QAAQ;AACRC,EAAAA,KAAK,GAAG,IAAI;EACZC,UAAU;AACVC,EAAAA,KAAK,GAAG,MAAM;AACd,EAAA,aAAa,EAAEC,UAAU;EACzB,GAAGC;AAAS,CACM,KAAI;EACtB,MAAMC,gBAAgB,GAAGZ,WAAS,KAAKC,mBAAS,CAACC,QAAQ,GAAG,SAAS,GAAGF,WAAS;EAEjF,MAAMa,WAAW,GAAGA,MAAK;AACvB,IAAA,IAAIV,KAAK,EAAE;MACT,oBAAOW,cAAA,CAACC,qBAAe,EAAA;AAACC,QAAAA,IAAI,EAAE,EAAG;AAAC,QAAA,aAAA,EAAY,oBAAoB;AAACC,QAAAA,KAAK,EAAET;AAAW,QAAG;AAC1F,IAAA;AAEA,IAAA,IAAIJ,OAAO,EAAE;MACX,oBACEU,cAAA,CAACI,wBAAgB,EAAA;AACf,QAAA,aAAA,EAAY,+BAA+B;AAC3CF,QAAAA,IAAI,EAAC,KAAK;AACVX,QAAAA,SAAS,EAAC;AAAqC,OAAA,CAC/C;AAEN,IAAA;IAEA,IAAIL,WAAS,KAAK,aAAa,EAAE;AAC/B,MAAA,OAAOO,KAAK,iBAAIO,cAAA,CAACK,aAAO,EAAA;AAACF,QAAAA,KAAK,EAAET;AAAW,OAAA,CAAG;AAChD,IAAA;AAEA,IAAA,OAAOD,KAAK,iBAAIO,cAAA,CAACM,kBAAU,EAAA;AAACJ,MAAAA,IAAI,EAAE,EAAG;AAAChB,MAAAA,SAAS,EAAEA,WAAU;AAACqB,MAAAA,SAAS,EAAEb;AAAW,KAAA,CAAG;EACvF,CAAC;EAED,oBACEM,cAAA,CAACQ,+BAAe,EAAA;AACdtB,IAAAA,SAAS,EAAEY,gBAAiB;IAC5BL,KAAK,EAAEM,WAAW,EAAG;AACrB,IAAA,aAAA,EAAaH,UAAW;AACxBL,IAAAA,SAAS,EAAEkB,SAAI,CACb,mBAAmB,EACnB;MACE,+BAA+B,EAAEd,KAAK,KAAK,MAAM;AACjD,MAAA,0BAA0B,EAAEN,KAAK;AACjC,MAAA,4BAA4B,EAAEC;KAC/B,EACDC,SAAS,CACT;AAAA,IAAA,GACEM,SAAS;IAAAL,QAAA,eAEbQ,cAAA,CAACU,YAAI,EAAA;AAAAlB,MAAAA,QAAA,EAAEA;KAAe;AACxB,GAAiB,CAAC;AAEtB;;;;"}
|
|
@@ -22,11 +22,11 @@ import { clsx } from 'clsx';
|
|
|
22
22
|
import 'react';
|
|
23
23
|
import 'react-intl';
|
|
24
24
|
import '../../common/closeButton/CloseButton.messages.mjs';
|
|
25
|
-
import {
|
|
25
|
+
import { jsx } from 'react/jsx-runtime';
|
|
26
26
|
import ProcessIndicator from '../../processIndicator/ProcessIndicator.mjs';
|
|
27
27
|
import StatusIcon from '../../statusIcon/StatusIcon.mjs';
|
|
28
28
|
import Body from '../../body/Body.mjs';
|
|
29
|
-
import
|
|
29
|
+
import { PrimitivePrompt } from '../PrimitivePrompt/PrimitivePrompt.mjs';
|
|
30
30
|
|
|
31
31
|
const InlinePrompt = ({
|
|
32
32
|
sentiment = Sentiment.POSITIVE,
|
|
@@ -38,7 +38,7 @@ const InlinePrompt = ({
|
|
|
38
38
|
mediaLabel,
|
|
39
39
|
width = 'auto',
|
|
40
40
|
'data-testid': dataTestId,
|
|
41
|
-
...
|
|
41
|
+
...restProps
|
|
42
42
|
}) => {
|
|
43
43
|
const surfaceSentiment = sentiment === Sentiment.POSITIVE ? 'success' : sentiment;
|
|
44
44
|
const renderMedia = () => {
|
|
@@ -67,21 +67,19 @@ const InlinePrompt = ({
|
|
|
67
67
|
iconLabel: mediaLabel
|
|
68
68
|
});
|
|
69
69
|
};
|
|
70
|
-
return /*#__PURE__*/
|
|
70
|
+
return /*#__PURE__*/jsx(PrimitivePrompt, {
|
|
71
71
|
sentiment: surfaceSentiment,
|
|
72
|
+
media: renderMedia(),
|
|
72
73
|
"data-testid": dataTestId,
|
|
73
|
-
className: clsx('wds-inline-prompt',
|
|
74
|
+
className: clsx('wds-inline-prompt', {
|
|
74
75
|
'wds-inline-prompt--full-width': width === 'full',
|
|
75
76
|
'wds-inline-prompt--muted': muted,
|
|
76
77
|
'wds-inline-prompt--loading': loading
|
|
77
78
|
}, className),
|
|
78
|
-
...
|
|
79
|
-
children:
|
|
80
|
-
className: "wds-inline-prompt__media-wrapper",
|
|
81
|
-
children: renderMedia()
|
|
82
|
-
}), /*#__PURE__*/jsx(Body, {
|
|
79
|
+
...restProps,
|
|
80
|
+
children: /*#__PURE__*/jsx(Body, {
|
|
83
81
|
children: children
|
|
84
|
-
})
|
|
82
|
+
})
|
|
85
83
|
});
|
|
86
84
|
};
|
|
87
85
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlinePrompt.mjs","sources":["../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"sourcesContent":["import { Sentiment } from '../../common';\nimport { BackslashCircle, GiftBox } from '@transferwise/icons';\nimport ProcessIndicator from '../../processIndicator';\nimport StatusIcon from '../../statusIcon';\nimport { clsx } from 'clsx';\nimport Body from '../../body';\nimport
|
|
1
|
+
{"version":3,"file":"InlinePrompt.mjs","sources":["../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"sourcesContent":["import { Sentiment } from '../../common';\nimport { BackslashCircle, GiftBox } from '@transferwise/icons';\nimport ProcessIndicator from '../../processIndicator';\nimport StatusIcon from '../../statusIcon';\nimport { clsx } from 'clsx';\nimport Body from '../../body';\nimport { PrimitivePrompt } from '../PrimitivePrompt';\n\nexport type InlinePromptProps = {\n /**\n * The sentiment determines the colour scheme\n */\n sentiment?:\n | `${Sentiment.POSITIVE | Sentiment.NEGATIVE | Sentiment.NEUTRAL | Sentiment.WARNING}`\n | 'proposition';\n /**\n * Replaces the icon with a spinner while waiting for the short-lived action to finish.\n * @default false\n */\n loading?: boolean;\n /**\n * While prompts cannot be fully (visually and functionally) disabled, this prop should be enabled\n * they are associated with actually disabled component (e.g. a disabled list item or input).\n * @default false\n */\n muted?: boolean;\n /**\n * Icon override for all sentiments. If the sentiment uses StatusIcon by default, it will be\n * replaced by a plain icon.\n */\n media?: React.ReactNode;\n /**\n * Override for the sentiment's-derived, default, accessible name announced by the screen readers.\n */\n mediaLabel?: string;\n /**\n * Defines the sizing strategy of the prompt component - either hugging the content or taking full width of the container.\n * @default auto\n */\n width?: 'auto' | 'full';\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: React.ReactNode;\n};\n\n/**\n * Inline prompts appear alongside a specific component on the screen. They help the user stay\n * informed, fix something, or get more out of what they're doing. <br />\n *\n * **NB:** It should be used in favour of `InlineAlert` which will be soon deprecated.\n */\nexport const InlinePrompt = ({\n sentiment = Sentiment.POSITIVE,\n muted = false,\n loading = false,\n className,\n children,\n media = null,\n mediaLabel,\n width = 'auto',\n 'data-testid': dataTestId,\n ...restProps\n}: InlinePromptProps) => {\n const surfaceSentiment = sentiment === Sentiment.POSITIVE ? 'success' : sentiment;\n\n const renderMedia = () => {\n if (muted) {\n return <BackslashCircle size={16} data-testid=\"InlinePrompt_Muted\" title={mediaLabel} />;\n }\n\n if (loading) {\n return (\n <ProcessIndicator\n data-testid=\"InlinePrompt_ProcessIndicator\"\n size=\"xxs\"\n className=\"wds-inline-prompt-process-indicator\"\n />\n );\n }\n\n if (sentiment === 'proposition') {\n return media || <GiftBox title={mediaLabel} />;\n }\n\n return media || <StatusIcon size={16} sentiment={sentiment} iconLabel={mediaLabel} />;\n };\n\n return (\n <PrimitivePrompt\n sentiment={surfaceSentiment}\n media={renderMedia()}\n data-testid={dataTestId}\n className={clsx(\n 'wds-inline-prompt',\n {\n 'wds-inline-prompt--full-width': width === 'full',\n 'wds-inline-prompt--muted': muted,\n 'wds-inline-prompt--loading': loading,\n },\n className,\n )}\n {...restProps}\n >\n <Body>{children}</Body>\n </PrimitivePrompt>\n );\n};\n"],"names":["InlinePrompt","sentiment","Sentiment","POSITIVE","muted","loading","className","children","media","mediaLabel","width","dataTestId","restProps","surfaceSentiment","renderMedia","_jsx","BackslashCircle","size","title","ProcessIndicator","GiftBox","StatusIcon","iconLabel","PrimitivePrompt","clsx","Body"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDO,MAAMA,YAAY,GAAGA,CAAC;EAC3BC,SAAS,GAAGC,SAAS,CAACC,QAAQ;AAC9BC,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,OAAO,GAAG,KAAK;EACfC,SAAS;EACTC,QAAQ;AACRC,EAAAA,KAAK,GAAG,IAAI;EACZC,UAAU;AACVC,EAAAA,KAAK,GAAG,MAAM;AACd,EAAA,aAAa,EAAEC,UAAU;EACzB,GAAGC;AAAS,CACM,KAAI;EACtB,MAAMC,gBAAgB,GAAGZ,SAAS,KAAKC,SAAS,CAACC,QAAQ,GAAG,SAAS,GAAGF,SAAS;EAEjF,MAAMa,WAAW,GAAGA,MAAK;AACvB,IAAA,IAAIV,KAAK,EAAE;MACT,oBAAOW,GAAA,CAACC,eAAe,EAAA;AAACC,QAAAA,IAAI,EAAE,EAAG;AAAC,QAAA,aAAA,EAAY,oBAAoB;AAACC,QAAAA,KAAK,EAAET;AAAW,QAAG;AAC1F,IAAA;AAEA,IAAA,IAAIJ,OAAO,EAAE;MACX,oBACEU,GAAA,CAACI,gBAAgB,EAAA;AACf,QAAA,aAAA,EAAY,+BAA+B;AAC3CF,QAAAA,IAAI,EAAC,KAAK;AACVX,QAAAA,SAAS,EAAC;AAAqC,OAAA,CAC/C;AAEN,IAAA;IAEA,IAAIL,SAAS,KAAK,aAAa,EAAE;AAC/B,MAAA,OAAOO,KAAK,iBAAIO,GAAA,CAACK,OAAO,EAAA;AAACF,QAAAA,KAAK,EAAET;AAAW,OAAA,CAAG;AAChD,IAAA;AAEA,IAAA,OAAOD,KAAK,iBAAIO,GAAA,CAACM,UAAU,EAAA;AAACJ,MAAAA,IAAI,EAAE,EAAG;AAAChB,MAAAA,SAAS,EAAEA,SAAU;AAACqB,MAAAA,SAAS,EAAEb;AAAW,KAAA,CAAG;EACvF,CAAC;EAED,oBACEM,GAAA,CAACQ,eAAe,EAAA;AACdtB,IAAAA,SAAS,EAAEY,gBAAiB;IAC5BL,KAAK,EAAEM,WAAW,EAAG;AACrB,IAAA,aAAA,EAAaH,UAAW;AACxBL,IAAAA,SAAS,EAAEkB,IAAI,CACb,mBAAmB,EACnB;MACE,+BAA+B,EAAEd,KAAK,KAAK,MAAM;AACjD,MAAA,0BAA0B,EAAEN,KAAK;AACjC,MAAA,4BAA4B,EAAEC;KAC/B,EACDC,SAAS,CACT;AAAA,IAAA,GACEM,SAAS;IAAAL,QAAA,eAEbQ,GAAA,CAACU,IAAI,EAAA;AAAAlB,MAAAA,QAAA,EAAEA;KAAe;AACxB,GAAiB,CAAC;AAEtB;;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var icons = require('@transferwise/icons');
|
|
4
|
+
var clsx = require('clsx');
|
|
5
|
+
var SentimentSurface = require('../../sentimentSurface/SentimentSurface.js');
|
|
6
|
+
var IconButton = require('../../iconButton/IconButton.js');
|
|
7
|
+
var reactIntl = require('react-intl');
|
|
8
|
+
var CloseButton_messages = require('../../common/closeButton/CloseButton.messages.js');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
|
|
11
|
+
const PrimitivePrompt = ({
|
|
12
|
+
sentiment = 'success',
|
|
13
|
+
media,
|
|
14
|
+
actions,
|
|
15
|
+
onDismiss,
|
|
16
|
+
className,
|
|
17
|
+
children,
|
|
18
|
+
...restProps
|
|
19
|
+
}) => {
|
|
20
|
+
const intl = reactIntl.useIntl();
|
|
21
|
+
return /*#__PURE__*/jsxRuntime.jsxs(SentimentSurface.default, {
|
|
22
|
+
sentiment: sentiment,
|
|
23
|
+
className: clsx.clsx('wds-prompt', `wds-prompt--${sentiment}`, className),
|
|
24
|
+
...restProps,
|
|
25
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
26
|
+
className: "wds-prompt__content-wrapper",
|
|
27
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
28
|
+
className: clsx.clsx('wds-prompt__media-wrapper'),
|
|
29
|
+
children: media
|
|
30
|
+
}), children, actions && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
31
|
+
className: "wds-prompt__actions-wrapper",
|
|
32
|
+
children: actions
|
|
33
|
+
})]
|
|
34
|
+
}), onDismiss && /*#__PURE__*/jsxRuntime.jsx(IconButton.default, {
|
|
35
|
+
size: 24,
|
|
36
|
+
priority: "secondary",
|
|
37
|
+
"aria-label": intl.formatMessage(CloseButton_messages.default.ariaLabel),
|
|
38
|
+
onClick: onDismiss,
|
|
39
|
+
children: /*#__PURE__*/jsxRuntime.jsx(icons.Cross, {})
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.PrimitivePrompt = PrimitivePrompt;
|
|
45
|
+
//# sourceMappingURL=PrimitivePrompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimitivePrompt.js","sources":["../../../src/prompt/PrimitivePrompt/PrimitivePrompt.tsx"],"sourcesContent":["import { Cross } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport SentimentSurface, { Sentiment } from '../../sentimentSurface';\nimport IconButton from '../../iconButton';\nimport { useIntl } from 'react-intl';\nimport closeBtnMessages from '../../common/closeButton/CloseButton.messages';\nimport { ReactNode } from 'react';\n\nexport type PrimitivePromptProps = {\n /**\n * The sentiment determines the colour scheme\n * @default success\n */\n sentiment?: Sentiment;\n /**\n * Media to be displayed on the prompt (icon/image/etc).\n */\n media: ReactNode;\n /**\n * Any actions to be displayed on the prompt.\n */\n actions?: ReactNode;\n /**\n * Handler called when the close button is clicked. If not provided, then the close button is hidden.\n */\n onDismiss?: () => void;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: ReactNode;\n};\n\n/**\n * PrimitivePrompt is a low-level component that provides the structure, sentiment support and styling for various prompts.\n * Uses several css variables to handle styling from within the consuming component, e.g. --Prompt-padding. */\nexport const PrimitivePrompt = ({\n sentiment = 'success',\n media,\n actions,\n onDismiss,\n className,\n children,\n ...restProps\n}: PrimitivePromptProps) => {\n const intl = useIntl();\n\n return (\n <SentimentSurface\n sentiment={sentiment}\n className={clsx('wds-prompt', `wds-prompt--${sentiment}`, className)}\n {...restProps}\n >\n <div className=\"wds-prompt__content-wrapper\">\n <div className={clsx('wds-prompt__media-wrapper')}>{media}</div>\n {children}\n {actions && <div className=\"wds-prompt__actions-wrapper\">{actions}</div>}\n </div>\n {onDismiss && (\n <IconButton\n size={24}\n priority=\"secondary\"\n aria-label={intl.formatMessage(closeBtnMessages.ariaLabel)}\n onClick={onDismiss}\n >\n <Cross />\n </IconButton>\n )}\n </SentimentSurface>\n );\n};\n"],"names":["PrimitivePrompt","sentiment","media","actions","onDismiss","className","children","restProps","intl","useIntl","_jsxs","SentimentSurface","clsx","_jsx","IconButton","size","priority","formatMessage","closeBtnMessages","ariaLabel","onClick","Cross"],"mappings":";;;;;;;;;;AAmCO,MAAMA,eAAe,GAAGA,CAAC;AAC9BC,EAAAA,SAAS,GAAG,SAAS;EACrBC,KAAK;EACLC,OAAO;EACPC,SAAS;EACTC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAS,CACS,KAAI;AACzB,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;EAEtB,oBACEC,eAAA,CAACC,wBAAgB,EAAA;AACfV,IAAAA,SAAS,EAAEA,SAAU;IACrBI,SAAS,EAAEO,SAAI,CAAC,YAAY,EAAE,eAAeX,SAAS,CAAA,CAAE,EAAEI,SAAS,CAAE;AAAA,IAAA,GACjEE,SAAS;AAAAD,IAAAA,QAAA,gBAEbI,eAAA,CAAA,KAAA,EAAA;AAAKL,MAAAA,SAAS,EAAC,6BAA6B;AAAAC,MAAAA,QAAA,gBAC1CO,cAAA,CAAA,KAAA,EAAA;AAAKR,QAAAA,SAAS,EAAEO,SAAI,CAAC,2BAA2B,CAAE;AAAAN,QAAAA,QAAA,EAAEJ;AAAK,OAAM,CAC/D,EAACI,QAAQ,EACRH,OAAO,iBAAIU,cAAA,CAAA,KAAA,EAAA;AAAKR,QAAAA,SAAS,EAAC,6BAA6B;AAAAC,QAAAA,QAAA,EAAEH;AAAO,OAAM,CAAC;AAAA,KACrE,CACL,EAACC,SAAS,iBACRS,cAAA,CAACC,kBAAU,EAAA;AACTC,MAAAA,IAAI,EAAE,EAAG;AACTC,MAAAA,QAAQ,EAAC,WAAW;AACpB,MAAA,YAAA,EAAYR,IAAI,CAACS,aAAa,CAACC,4BAAgB,CAACC,SAAS,CAAE;AAC3DC,MAAAA,OAAO,EAAEhB,SAAU;AAAAE,MAAAA,QAAA,eAEnBO,cAAA,CAACQ,WAAK,EAAA,EAAA;AACR,KAAY,CACb;AAAA,GACe,CAAC;AAEvB;;;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Cross } from '@transferwise/icons';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import SentimentSurface from '../../sentimentSurface/SentimentSurface.mjs';
|
|
4
|
+
import IconButton from '../../iconButton/IconButton.mjs';
|
|
5
|
+
import { useIntl } from 'react-intl';
|
|
6
|
+
import closeBtnMessages from '../../common/closeButton/CloseButton.messages.mjs';
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
const PrimitivePrompt = ({
|
|
10
|
+
sentiment = 'success',
|
|
11
|
+
media,
|
|
12
|
+
actions,
|
|
13
|
+
onDismiss,
|
|
14
|
+
className,
|
|
15
|
+
children,
|
|
16
|
+
...restProps
|
|
17
|
+
}) => {
|
|
18
|
+
const intl = useIntl();
|
|
19
|
+
return /*#__PURE__*/jsxs(SentimentSurface, {
|
|
20
|
+
sentiment: sentiment,
|
|
21
|
+
className: clsx('wds-prompt', `wds-prompt--${sentiment}`, className),
|
|
22
|
+
...restProps,
|
|
23
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
24
|
+
className: "wds-prompt__content-wrapper",
|
|
25
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
26
|
+
className: clsx('wds-prompt__media-wrapper'),
|
|
27
|
+
children: media
|
|
28
|
+
}), children, actions && /*#__PURE__*/jsx("div", {
|
|
29
|
+
className: "wds-prompt__actions-wrapper",
|
|
30
|
+
children: actions
|
|
31
|
+
})]
|
|
32
|
+
}), onDismiss && /*#__PURE__*/jsx(IconButton, {
|
|
33
|
+
size: 24,
|
|
34
|
+
priority: "secondary",
|
|
35
|
+
"aria-label": intl.formatMessage(closeBtnMessages.ariaLabel),
|
|
36
|
+
onClick: onDismiss,
|
|
37
|
+
children: /*#__PURE__*/jsx(Cross, {})
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { PrimitivePrompt };
|
|
43
|
+
//# sourceMappingURL=PrimitivePrompt.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimitivePrompt.mjs","sources":["../../../src/prompt/PrimitivePrompt/PrimitivePrompt.tsx"],"sourcesContent":["import { Cross } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport SentimentSurface, { Sentiment } from '../../sentimentSurface';\nimport IconButton from '../../iconButton';\nimport { useIntl } from 'react-intl';\nimport closeBtnMessages from '../../common/closeButton/CloseButton.messages';\nimport { ReactNode } from 'react';\n\nexport type PrimitivePromptProps = {\n /**\n * The sentiment determines the colour scheme\n * @default success\n */\n sentiment?: Sentiment;\n /**\n * Media to be displayed on the prompt (icon/image/etc).\n */\n media: ReactNode;\n /**\n * Any actions to be displayed on the prompt.\n */\n actions?: ReactNode;\n /**\n * Handler called when the close button is clicked. If not provided, then the close button is hidden.\n */\n onDismiss?: () => void;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: ReactNode;\n};\n\n/**\n * PrimitivePrompt is a low-level component that provides the structure, sentiment support and styling for various prompts.\n * Uses several css variables to handle styling from within the consuming component, e.g. --Prompt-padding. */\nexport const PrimitivePrompt = ({\n sentiment = 'success',\n media,\n actions,\n onDismiss,\n className,\n children,\n ...restProps\n}: PrimitivePromptProps) => {\n const intl = useIntl();\n\n return (\n <SentimentSurface\n sentiment={sentiment}\n className={clsx('wds-prompt', `wds-prompt--${sentiment}`, className)}\n {...restProps}\n >\n <div className=\"wds-prompt__content-wrapper\">\n <div className={clsx('wds-prompt__media-wrapper')}>{media}</div>\n {children}\n {actions && <div className=\"wds-prompt__actions-wrapper\">{actions}</div>}\n </div>\n {onDismiss && (\n <IconButton\n size={24}\n priority=\"secondary\"\n aria-label={intl.formatMessage(closeBtnMessages.ariaLabel)}\n onClick={onDismiss}\n >\n <Cross />\n </IconButton>\n )}\n </SentimentSurface>\n );\n};\n"],"names":["PrimitivePrompt","sentiment","media","actions","onDismiss","className","children","restProps","intl","useIntl","_jsxs","SentimentSurface","clsx","_jsx","IconButton","size","priority","formatMessage","closeBtnMessages","ariaLabel","onClick","Cross"],"mappings":";;;;;;;;AAmCO,MAAMA,eAAe,GAAGA,CAAC;AAC9BC,EAAAA,SAAS,GAAG,SAAS;EACrBC,KAAK;EACLC,OAAO;EACPC,SAAS;EACTC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAS,CACS,KAAI;AACzB,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;EAEtB,oBACEC,IAAA,CAACC,gBAAgB,EAAA;AACfV,IAAAA,SAAS,EAAEA,SAAU;IACrBI,SAAS,EAAEO,IAAI,CAAC,YAAY,EAAE,eAAeX,SAAS,CAAA,CAAE,EAAEI,SAAS,CAAE;AAAA,IAAA,GACjEE,SAAS;AAAAD,IAAAA,QAAA,gBAEbI,IAAA,CAAA,KAAA,EAAA;AAAKL,MAAAA,SAAS,EAAC,6BAA6B;AAAAC,MAAAA,QAAA,gBAC1CO,GAAA,CAAA,KAAA,EAAA;AAAKR,QAAAA,SAAS,EAAEO,IAAI,CAAC,2BAA2B,CAAE;AAAAN,QAAAA,QAAA,EAAEJ;AAAK,OAAM,CAC/D,EAACI,QAAQ,EACRH,OAAO,iBAAIU,GAAA,CAAA,KAAA,EAAA;AAAKR,QAAAA,SAAS,EAAC,6BAA6B;AAAAC,QAAAA,QAAA,EAAEH;AAAO,OAAM,CAAC;AAAA,KACrE,CACL,EAACC,SAAS,iBACRS,GAAA,CAACC,UAAU,EAAA;AACTC,MAAAA,IAAI,EAAE,EAAG;AACTC,MAAAA,QAAQ,EAAC,WAAW;AACpB,MAAA,YAAA,EAAYR,IAAI,CAACS,aAAa,CAACC,gBAAgB,CAACC,SAAS,CAAE;AAC3DC,MAAAA,OAAO,EAAEhB,SAAU;AAAAE,MAAAA,QAAA,eAEnBO,GAAA,CAACQ,KAAK,EAAA,EAAA;AACR,KAAY,CACb;AAAA,GACe,CAAC;AAEvB;;;;"}
|
package/build/styles/main.css
CHANGED
|
@@ -920,83 +920,6 @@
|
|
|
920
920
|
.np-theme-personal .tw-avatar--outlined:not(.disabled):not(:disabled):hover {
|
|
921
921
|
border-color: var(--color-interactive-primary-hover);
|
|
922
922
|
}
|
|
923
|
-
.wds-inline-prompt {
|
|
924
|
-
display: inline-flex;
|
|
925
|
-
text-align: left;
|
|
926
|
-
padding-top: calc(8px / 2);
|
|
927
|
-
padding-top: calc(var(--padding-x-small) / 2);
|
|
928
|
-
padding-bottom: calc(8px / 2);
|
|
929
|
-
padding-bottom: calc(var(--padding-x-small) / 2);
|
|
930
|
-
padding-left: calc(8px - 1px);
|
|
931
|
-
padding-left: calc(var(--padding-x-small) - 1px);
|
|
932
|
-
padding-right: 8px;
|
|
933
|
-
padding-right: var(--padding-x-small);
|
|
934
|
-
border-radius: 10px;
|
|
935
|
-
border-radius: var(--radius-small);
|
|
936
|
-
word-break: break-word;
|
|
937
|
-
word-wrap: break-word;
|
|
938
|
-
}
|
|
939
|
-
.wds-inline-prompt:has(a),
|
|
940
|
-
.wds-inline-prompt:has(button) {
|
|
941
|
-
position: relative;
|
|
942
|
-
z-index: 1;
|
|
943
|
-
}
|
|
944
|
-
.wds-inline-prompt:has(a):hover,
|
|
945
|
-
.wds-inline-prompt:has(button):hover {
|
|
946
|
-
background-color: var(--color-sentiment-background-surface-hover);
|
|
947
|
-
}
|
|
948
|
-
.wds-inline-prompt:has(a):active,
|
|
949
|
-
.wds-inline-prompt:has(button):active {
|
|
950
|
-
background-color: var(--color-sentiment-background-surface-active);
|
|
951
|
-
}
|
|
952
|
-
.wds-inline-prompt--full-width {
|
|
953
|
-
width: 100%;
|
|
954
|
-
}
|
|
955
|
-
.wds-inline-prompt--muted {
|
|
956
|
-
opacity: 0.93;
|
|
957
|
-
filter: grayscale(1);
|
|
958
|
-
}
|
|
959
|
-
.wds-inline-prompt a,
|
|
960
|
-
.wds-inline-prompt button {
|
|
961
|
-
color: var(--color-sentiment-content-primary);
|
|
962
|
-
text-underline-offset: calc(4px / 2);
|
|
963
|
-
text-underline-offset: calc(var(--size-4) / 2);
|
|
964
|
-
}
|
|
965
|
-
.wds-inline-prompt a:hover,
|
|
966
|
-
.wds-inline-prompt button:hover {
|
|
967
|
-
color: var(--color-sentiment-content-primary-hover);
|
|
968
|
-
}
|
|
969
|
-
.wds-inline-prompt a:active,
|
|
970
|
-
.wds-inline-prompt button:active {
|
|
971
|
-
color: var(--color-sentiment-content-primary-active);
|
|
972
|
-
}
|
|
973
|
-
.wds-inline-prompt a:first-of-type:before,
|
|
974
|
-
.wds-inline-prompt button:first-of-type:before {
|
|
975
|
-
content: "";
|
|
976
|
-
position: absolute;
|
|
977
|
-
inset: 0;
|
|
978
|
-
}
|
|
979
|
-
.wds-inline-prompt__media-wrapper {
|
|
980
|
-
padding-right: calc(12px / 2);
|
|
981
|
-
padding-right: calc(var(--size-12) / 2);
|
|
982
|
-
padding-top: calc(4px - 1px);
|
|
983
|
-
padding-top: calc(var(--size-4) - 1px);
|
|
984
|
-
padding-bottom: calc(4px - 1px);
|
|
985
|
-
padding-bottom: calc(var(--size-4) - 1px);
|
|
986
|
-
}
|
|
987
|
-
.wds-inline-prompt__media-wrapper .tw-icon-tags,
|
|
988
|
-
.wds-inline-prompt__media-wrapper .tw-icon-confetti {
|
|
989
|
-
color: var(--color-sentiment-content-primary);
|
|
990
|
-
}
|
|
991
|
-
.wds-inline-prompt .wds-inline-prompt-process-indicator {
|
|
992
|
-
width: 16px;
|
|
993
|
-
width: var(--size-16);
|
|
994
|
-
height: 16px;
|
|
995
|
-
height: var(--size-16);
|
|
996
|
-
}
|
|
997
|
-
.wds-inline-prompt .wds-inline-prompt-process-indicator .process-circle {
|
|
998
|
-
stroke: currentColor;
|
|
999
|
-
}
|
|
1000
923
|
.np-dot {
|
|
1001
924
|
--np-dot-size: 14px;
|
|
1002
925
|
position: relative;
|
|
@@ -5412,6 +5335,103 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
5412
5335
|
.np-CardGroup .np-Card.np-Card--promoCard {
|
|
5413
5336
|
max-width: 100%;
|
|
5414
5337
|
}
|
|
5338
|
+
.wds-prompt {
|
|
5339
|
+
border-radius: 10px;
|
|
5340
|
+
border-radius: var(--radius-small);
|
|
5341
|
+
display: flex;
|
|
5342
|
+
word-wrap: break-word;
|
|
5343
|
+
padding: 8px;
|
|
5344
|
+
padding: var(--Prompt-padding, var(--padding-x-small));
|
|
5345
|
+
text-align: left;
|
|
5346
|
+
word-break: break-word;
|
|
5347
|
+
}
|
|
5348
|
+
.wds-prompt__content-wrapper {
|
|
5349
|
+
display: grid;
|
|
5350
|
+
grid-gap: 16px;
|
|
5351
|
+
grid-gap: var(--Prompt-gap, var(--size-16));
|
|
5352
|
+
gap: 16px;
|
|
5353
|
+
gap: var(--Prompt-gap, var(--size-16));
|
|
5354
|
+
grid-template-columns: auto 1fr;
|
|
5355
|
+
width: 100%;
|
|
5356
|
+
}
|
|
5357
|
+
.wds-prompt__media-wrapper {
|
|
5358
|
+
align-self: flex-start;
|
|
5359
|
+
padding-top: calc(4px - 1px);
|
|
5360
|
+
padding-top: calc(var(--size-4) - 1px);
|
|
5361
|
+
}
|
|
5362
|
+
.wds-prompt__media-wrapper .tw-icon-tags,
|
|
5363
|
+
.wds-prompt__media-wrapper .tw-icon-confetti {
|
|
5364
|
+
color: var(--color-sentiment-content-primary);
|
|
5365
|
+
}
|
|
5366
|
+
.wds-prompt__actions-wrapper {
|
|
5367
|
+
display: flex;
|
|
5368
|
+
flex-wrap: wrap;
|
|
5369
|
+
gap: 8px;
|
|
5370
|
+
gap: var(--Prompt-actions-gap, var(--size-8));
|
|
5371
|
+
grid-column-start: 2;
|
|
5372
|
+
}
|
|
5373
|
+
@media (max-width: 991px) {
|
|
5374
|
+
.wds-prompt__actions-wrapper {
|
|
5375
|
+
grid-column: span 2;
|
|
5376
|
+
width: 100%;
|
|
5377
|
+
}
|
|
5378
|
+
}
|
|
5379
|
+
.wds-inline-prompt {
|
|
5380
|
+
--Prompt-gap: calc(var(--size-12) / 2);
|
|
5381
|
+
--Prompt-padding: calc(var(--padding-x-small) / 2) var(--padding-x-small);
|
|
5382
|
+
display: inline-flex;
|
|
5383
|
+
border-radius: 10px;
|
|
5384
|
+
border-radius: var(--radius-small);
|
|
5385
|
+
}
|
|
5386
|
+
.wds-inline-prompt:has(a),
|
|
5387
|
+
.wds-inline-prompt:has(button) {
|
|
5388
|
+
position: relative;
|
|
5389
|
+
z-index: 1;
|
|
5390
|
+
}
|
|
5391
|
+
.wds-inline-prompt:has(a):hover,
|
|
5392
|
+
.wds-inline-prompt:has(button):hover {
|
|
5393
|
+
background-color: var(--color-sentiment-background-surface-hover);
|
|
5394
|
+
}
|
|
5395
|
+
.wds-inline-prompt:has(a):active,
|
|
5396
|
+
.wds-inline-prompt:has(button):active {
|
|
5397
|
+
background-color: var(--color-sentiment-background-surface-active);
|
|
5398
|
+
}
|
|
5399
|
+
.wds-inline-prompt--full-width {
|
|
5400
|
+
width: 100%;
|
|
5401
|
+
}
|
|
5402
|
+
.wds-inline-prompt--muted {
|
|
5403
|
+
opacity: 0.93;
|
|
5404
|
+
filter: grayscale(1);
|
|
5405
|
+
}
|
|
5406
|
+
.wds-inline-prompt a,
|
|
5407
|
+
.wds-inline-prompt button {
|
|
5408
|
+
color: var(--color-sentiment-content-primary);
|
|
5409
|
+
text-underline-offset: calc(4px / 2);
|
|
5410
|
+
text-underline-offset: calc(var(--size-4) / 2);
|
|
5411
|
+
}
|
|
5412
|
+
.wds-inline-prompt a:hover,
|
|
5413
|
+
.wds-inline-prompt button:hover {
|
|
5414
|
+
color: var(--color-sentiment-content-primary-hover);
|
|
5415
|
+
}
|
|
5416
|
+
.wds-inline-prompt a:active,
|
|
5417
|
+
.wds-inline-prompt button:active {
|
|
5418
|
+
color: var(--color-sentiment-content-primary-active);
|
|
5419
|
+
}
|
|
5420
|
+
.wds-inline-prompt a:first-of-type:before,
|
|
5421
|
+
.wds-inline-prompt button:first-of-type:before {
|
|
5422
|
+
content: "";
|
|
5423
|
+
position: absolute;
|
|
5424
|
+
inset: 0;
|
|
5425
|
+
}
|
|
5426
|
+
.wds-inline-prompt .wds-inline-prompt-process-indicator {
|
|
5427
|
+
width: 16px;
|
|
5428
|
+
width: var(--size-16);
|
|
5429
|
+
height: 16px;
|
|
5430
|
+
height: var(--size-16);
|
|
5431
|
+
}
|
|
5432
|
+
.wds-inline-prompt .wds-inline-prompt-process-indicator .process-circle {
|
|
5433
|
+
stroke: currentColor;
|
|
5434
|
+
}
|
|
5415
5435
|
.wds-radio-group .np-radio:last-child label {
|
|
5416
5436
|
margin-bottom: 0;
|
|
5417
5437
|
}
|