@transferwise/components 46.136.1 → 46.137.1
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/common/hooks/useContainerSize.js +30 -0
- package/build/common/hooks/useContainerSize.js.map +1 -0
- package/build/common/hooks/useContainerSize.mjs +28 -0
- package/build/common/hooks/useContainerSize.mjs.map +1 -0
- package/build/common/hooks/useResizeObserver.js +3 -3
- package/build/common/hooks/useResizeObserver.js.map +1 -1
- package/build/common/hooks/useResizeObserver.mjs +3 -3
- package/build/common/hooks/useResizeObserver.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +3 -0
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +3 -0
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/field/Field.js +3 -2
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs +3 -2
- package/build/field/Field.mjs.map +1 -1
- package/build/i18n/cs.json +2 -0
- package/build/i18n/cs.json.js +2 -0
- package/build/i18n/cs.json.js.map +1 -1
- package/build/i18n/cs.json.mjs +2 -0
- package/build/i18n/cs.json.mjs.map +1 -1
- package/build/i18n/de.json +2 -0
- package/build/i18n/de.json.js +2 -0
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +2 -0
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/i18n/en.json +2 -0
- package/build/i18n/en.json.js +2 -0
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +2 -0
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/i18n/es.json +2 -0
- package/build/i18n/es.json.js +2 -0
- package/build/i18n/es.json.js.map +1 -1
- package/build/i18n/es.json.mjs +2 -0
- package/build/i18n/es.json.mjs.map +1 -1
- package/build/i18n/fr.json +2 -0
- package/build/i18n/fr.json.js +2 -0
- package/build/i18n/fr.json.js.map +1 -1
- package/build/i18n/fr.json.mjs +2 -0
- package/build/i18n/fr.json.mjs.map +1 -1
- package/build/i18n/hu.json +2 -0
- package/build/i18n/hu.json.js +2 -0
- package/build/i18n/hu.json.js.map +1 -1
- package/build/i18n/hu.json.mjs +2 -0
- package/build/i18n/hu.json.mjs.map +1 -1
- package/build/i18n/id.json +2 -0
- package/build/i18n/id.json.js +2 -0
- package/build/i18n/id.json.js.map +1 -1
- package/build/i18n/id.json.mjs +2 -0
- package/build/i18n/id.json.mjs.map +1 -1
- package/build/i18n/it.json +2 -0
- package/build/i18n/it.json.js +2 -0
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +2 -0
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/ja.json +2 -0
- package/build/i18n/ja.json.js +2 -0
- package/build/i18n/ja.json.js.map +1 -1
- package/build/i18n/ja.json.mjs +2 -0
- package/build/i18n/ja.json.mjs.map +1 -1
- package/build/i18n/nl.json +2 -0
- package/build/i18n/nl.json.js +2 -0
- package/build/i18n/nl.json.js.map +1 -1
- package/build/i18n/nl.json.mjs +2 -0
- package/build/i18n/nl.json.mjs.map +1 -1
- package/build/i18n/pl.json +2 -0
- package/build/i18n/pl.json.js +2 -0
- package/build/i18n/pl.json.js.map +1 -1
- package/build/i18n/pl.json.mjs +2 -0
- package/build/i18n/pl.json.mjs.map +1 -1
- package/build/i18n/pt.json +2 -0
- package/build/i18n/pt.json.js +2 -0
- package/build/i18n/pt.json.js.map +1 -1
- package/build/i18n/pt.json.mjs +2 -0
- package/build/i18n/pt.json.mjs.map +1 -1
- package/build/i18n/ro.json +2 -0
- package/build/i18n/ro.json.js +2 -0
- package/build/i18n/ro.json.js.map +1 -1
- package/build/i18n/ro.json.mjs +2 -0
- package/build/i18n/ro.json.mjs.map +1 -1
- package/build/i18n/ru.json +2 -0
- package/build/i18n/ru.json.js +2 -0
- package/build/i18n/ru.json.js.map +1 -1
- package/build/i18n/ru.json.mjs +2 -0
- package/build/i18n/ru.json.mjs.map +1 -1
- package/build/i18n/th.json +2 -0
- package/build/i18n/th.json.js +2 -0
- package/build/i18n/th.json.js.map +1 -1
- package/build/i18n/th.json.mjs +2 -0
- package/build/i18n/th.json.mjs.map +1 -1
- package/build/i18n/tr.json +2 -0
- package/build/i18n/tr.json.js +2 -0
- package/build/i18n/tr.json.js.map +1 -1
- package/build/i18n/tr.json.mjs +2 -0
- package/build/i18n/tr.json.mjs.map +1 -1
- package/build/i18n/zh-CN.json +2 -0
- package/build/i18n/zh-CN.json.js +2 -0
- package/build/i18n/zh-CN.json.js.map +1 -1
- package/build/i18n/zh-CN.json.mjs +2 -0
- package/build/i18n/zh-CN.json.mjs.map +1 -1
- package/build/i18n/zh-HK.json +2 -0
- package/build/i18n/zh-HK.json.js +2 -0
- package/build/i18n/zh-HK.json.js.map +1 -1
- package/build/i18n/zh-HK.json.mjs +2 -0
- package/build/i18n/zh-HK.json.mjs.map +1 -1
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -0
- package/build/index.mjs.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.js +3 -2
- package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +3 -2
- package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
- package/build/logo/Logo.js +77 -25
- package/build/logo/Logo.js.map +1 -1
- package/build/logo/Logo.mjs +79 -27
- package/build/logo/Logo.mjs.map +1 -1
- package/build/logo/logo-assets.js +68 -97
- package/build/logo/logo-assets.js.map +1 -1
- package/build/logo/logo-assets.mjs +62 -90
- package/build/logo/logo-assets.mjs.map +1 -1
- package/build/main.css +225 -59
- package/build/prompt/ActionPrompt/ActionPrompt.js +8 -40
- package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.mjs +8 -40
- package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
- package/build/prompt/CriticalBanner/CriticalBanner.js +143 -0
- package/build/prompt/CriticalBanner/CriticalBanner.js.map +1 -0
- package/build/prompt/CriticalBanner/CriticalBanner.mjs +141 -0
- package/build/prompt/CriticalBanner/CriticalBanner.mjs.map +1 -0
- package/build/prompt/CriticalBanner/helpers.js +29 -0
- package/build/prompt/CriticalBanner/helpers.js.map +1 -0
- package/build/prompt/CriticalBanner/helpers.mjs +26 -0
- package/build/prompt/CriticalBanner/helpers.mjs.map +1 -0
- package/build/prompt/InfoPrompt/InfoPrompt.js +3 -2
- package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.mjs +3 -2
- package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +11 -4
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +11 -4
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
- package/build/prompt/common/Expander/Expander.js +35 -0
- package/build/prompt/common/Expander/Expander.js.map +1 -0
- package/build/prompt/common/Expander/Expander.messages.js +17 -0
- package/build/prompt/common/Expander/Expander.messages.js.map +1 -0
- package/build/prompt/common/Expander/Expander.messages.mjs +13 -0
- package/build/prompt/common/Expander/Expander.messages.mjs.map +1 -0
- package/build/prompt/common/Expander/Expander.mjs +33 -0
- package/build/prompt/common/Expander/Expander.mjs.map +1 -0
- package/build/prompt/helpers/promptMedia.js +52 -0
- package/build/prompt/helpers/promptMedia.js.map +1 -0
- package/build/prompt/helpers/promptMedia.mjs +50 -0
- package/build/prompt/helpers/promptMedia.mjs.map +1 -0
- package/build/styles/css/neptune.css +0 -1
- package/build/styles/logo/Logo.css +3 -23
- package/build/styles/main.css +225 -59
- package/build/styles/prompt/CriticalBanner/CriticalBanner.css +134 -0
- package/build/styles/prompt/CriticalBanner/CriticalBanner.vars.css +0 -0
- package/build/styles/prompt/InfoPrompt/InfoPrompt.css +24 -0
- package/build/styles/prompt/common/Expander/Expander.css +8 -0
- package/build/styles/styles/less/neptune.css +0 -1
- package/build/typeahead/Typeahead.js +3 -2
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +3 -2
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/types/common/hooks/useContainerSize.d.ts +14 -0
- package/build/types/common/hooks/useContainerSize.d.ts.map +1 -0
- package/build/types/common/hooks/useResizeObserver.d.ts +1 -1
- package/build/types/common/hooks/useResizeObserver.d.ts.map +1 -1
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts +3 -0
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/logo/Logo.d.ts +33 -1
- package/build/types/logo/Logo.d.ts.map +1 -1
- package/build/types/logo/logo-assets.d.ts +33 -9
- package/build/types/logo/logo-assets.d.ts.map +1 -1
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +2 -11
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
- package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts +39 -0
- package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts.map +1 -0
- package/build/types/prompt/CriticalBanner/helpers.d.ts +18 -0
- package/build/types/prompt/CriticalBanner/helpers.d.ts.map +1 -0
- package/build/types/prompt/CriticalBanner/index.d.ts +3 -0
- package/build/types/prompt/CriticalBanner/index.d.ts.map +1 -0
- package/build/types/prompt/InfoPrompt/InfoPrompt.d.ts.map +1 -1
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +35 -3
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
- package/build/types/prompt/common/Expander/Expander.d.ts +20 -0
- package/build/types/prompt/common/Expander/Expander.d.ts.map +1 -0
- package/build/types/prompt/common/Expander/Expander.messages.d.ts +14 -0
- package/build/types/prompt/common/Expander/Expander.messages.d.ts.map +1 -0
- package/build/types/prompt/helpers/promptMedia.d.ts +22 -0
- package/build/types/prompt/helpers/promptMedia.d.ts.map +1 -0
- package/build/types/prompt/index.d.ts +2 -0
- package/build/types/prompt/index.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +4 -0
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/package.json +22 -18
- package/src/alert/Alert.story.tsx +30 -1
- package/src/avatarWrapper/AvatarWrapper.story.tsx +1 -1
- package/src/button/_stories/Button.story.tsx +11 -0
- package/src/common/hooks/useContainerSize.test.tsx +125 -0
- package/src/common/hooks/useContainerSize.ts +32 -0
- package/src/common/hooks/useResizeObserver.ts +3 -2
- package/src/criticalBanner/CriticalCommsBanner.story.tsx +4 -0
- package/src/criticalBanner/CriticalCommsBanner.test.story.tsx +1 -1
- package/src/criticalBanner/CriticalCommsBanner.tsx +3 -0
- package/src/i18n/cs.json +2 -0
- package/src/i18n/de.json +2 -0
- package/src/i18n/en.json +2 -0
- package/src/i18n/es.json +2 -0
- package/src/i18n/fr.json +2 -0
- package/src/i18n/hu.json +2 -0
- package/src/i18n/id.json +2 -0
- package/src/i18n/it.json +2 -0
- package/src/i18n/ja.json +2 -0
- package/src/i18n/nl.json +2 -0
- package/src/i18n/pl.json +2 -0
- package/src/i18n/pt.json +2 -0
- package/src/i18n/ro.json +2 -0
- package/src/i18n/ru.json +2 -0
- package/src/i18n/th.json +2 -0
- package/src/i18n/tr.json +2 -0
- package/src/i18n/zh-CN.json +2 -0
- package/src/i18n/zh-HK.json +2 -0
- package/src/index.ts +2 -2
- package/src/logo/Logo.css +3 -23
- package/src/logo/Logo.less +3 -29
- package/src/logo/Logo.story.tsx +117 -89
- package/src/logo/Logo.test.story.tsx +15 -24
- package/src/logo/Logo.tsx +90 -28
- package/src/logo/logo-assets.tsx +36 -92
- package/src/main.css +225 -59
- package/src/main.less +3 -1
- package/src/prompt/ActionPrompt/ActionPrompt.tsx +9 -62
- package/src/prompt/CriticalBanner/CriticalBanner.accessibility.docs.mdx +113 -0
- package/src/prompt/CriticalBanner/CriticalBanner.css +134 -0
- package/src/prompt/CriticalBanner/CriticalBanner.less +155 -0
- package/src/prompt/CriticalBanner/CriticalBanner.story.tsx +635 -0
- package/src/prompt/CriticalBanner/CriticalBanner.test.story.tsx +422 -0
- package/src/prompt/CriticalBanner/CriticalBanner.tsx +179 -0
- package/src/prompt/CriticalBanner/CriticalBanner.vars.css +0 -0
- package/src/prompt/CriticalBanner/CriticalBanner.vars.less +6 -0
- package/src/prompt/CriticalBanner/helpers.ts +39 -0
- package/src/prompt/CriticalBanner/index.ts +2 -0
- package/src/prompt/InfoPrompt/InfoPrompt.css +24 -0
- package/src/prompt/InfoPrompt/InfoPrompt.less +23 -0
- package/src/prompt/InfoPrompt/InfoPrompt.tsx +5 -1
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +56 -40
- package/src/prompt/common/Expander/Expander.css +8 -0
- package/src/prompt/common/Expander/Expander.less +9 -0
- package/src/prompt/common/Expander/Expander.messages.ts +14 -0
- package/src/prompt/common/Expander/Expander.test.tsx +167 -0
- package/src/prompt/common/Expander/Expander.tsx +83 -0
- package/src/prompt/helpers/promptMedia.tsx +79 -0
- package/src/prompt/index.ts +4 -0
- package/src/radio/Radio.story.tsx +1 -1
- package/src/section/Section.story.tsx +2 -8
- package/src/sentimentSurface/SentimentSurface.story.tsx +43 -17
- package/src/statusIcon/StatusIcon.test.tsx +0 -2
- package/src/styles/less/neptune.css +0 -1
|
@@ -4,20 +4,26 @@ import SentimentSurface from '../../sentimentSurface/SentimentSurface.mjs';
|
|
|
4
4
|
import IconButton from '../../iconButton/IconButton.mjs';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import closeBtnMessages from '../../common/closeButton/CloseButton.messages.mjs';
|
|
7
|
+
import { forwardRef } from 'react';
|
|
7
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
9
|
|
|
9
|
-
const PrimitivePrompt = ({
|
|
10
|
+
const PrimitivePrompt = /*#__PURE__*/forwardRef(({
|
|
10
11
|
sentiment = 'success',
|
|
12
|
+
emphasis = 'base',
|
|
11
13
|
media,
|
|
12
14
|
actions,
|
|
13
15
|
onDismiss,
|
|
14
16
|
className,
|
|
15
17
|
children,
|
|
16
18
|
...restProps
|
|
17
|
-
}) => {
|
|
19
|
+
}, ref) => {
|
|
18
20
|
const intl = useIntl();
|
|
19
|
-
return /*#__PURE__*/jsx(SentimentSurface
|
|
21
|
+
return /*#__PURE__*/jsx(SentimentSurface
|
|
22
|
+
// @ts-expect-error - SentimentSurface forwardRef types don't expose ref in props
|
|
23
|
+
, {
|
|
24
|
+
ref: ref,
|
|
20
25
|
sentiment: sentiment,
|
|
26
|
+
emphasis: emphasis,
|
|
21
27
|
className: clsx('wds-prompt', `wds-prompt--${sentiment}`, className),
|
|
22
28
|
...restProps,
|
|
23
29
|
children: /*#__PURE__*/jsxs("div", {
|
|
@@ -39,7 +45,8 @@ const PrimitivePrompt = ({
|
|
|
39
45
|
})]
|
|
40
46
|
})
|
|
41
47
|
});
|
|
42
|
-
};
|
|
48
|
+
});
|
|
49
|
+
PrimitivePrompt.displayName = 'PrimitivePrompt';
|
|
43
50
|
|
|
44
51
|
export { PrimitivePrompt };
|
|
45
52
|
//# sourceMappingURL=PrimitivePrompt.mjs.map
|
|
@@ -1 +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 { HTMLAttributes, ReactNode } from 'react';\n\nexport type PrimitivePromptProps = HTMLAttributes<HTMLDivElement> & {\n /**\n * The sentiment determines the colour scheme
|
|
1
|
+
{"version":3,"file":"PrimitivePrompt.mjs","sources":["../../../src/prompt/PrimitivePrompt/PrimitivePrompt.tsx"],"sourcesContent":["import { Cross } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport SentimentSurface, { Emphasis, Sentiment } from '../../sentimentSurface';\nimport IconButton from '../../iconButton';\nimport { useIntl } from 'react-intl';\nimport closeBtnMessages from '../../common/closeButton/CloseButton.messages';\nimport { forwardRef, HTMLAttributes, ReactNode } from 'react';\n\nexport type PrimitivePromptProps = HTMLAttributes<HTMLDivElement> & {\n /**\n * The sentiment determines the colour scheme.\n * @default success\n */\n sentiment?: Sentiment;\n /**\n * The emphasis level affecting background and text contrast.\n * @default 'base'\n */\n emphasis?: Emphasis;\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 /**\n * Test ID for testing tools\n */\n 'data-testid'?: string;\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 = forwardRef<HTMLDivElement, PrimitivePromptProps>(\n (\n {\n sentiment = 'success',\n emphasis = 'base',\n media,\n actions,\n onDismiss,\n className,\n children,\n ...restProps\n },\n ref,\n ) => {\n const intl = useIntl();\n\n return (\n <SentimentSurface\n // @ts-expect-error - SentimentSurface forwardRef types don't expose ref in props\n ref={ref}\n sentiment={sentiment}\n emphasis={emphasis}\n className={clsx('wds-prompt', `wds-prompt--${sentiment}`, className)}\n {...restProps}\n >\n <div\n className={clsx('wds-prompt__content-wrapper', {\n 'wds-prompt__content-wrapper--with-dismiss': !!onDismiss,\n })}\n >\n <div className={clsx('wds-prompt__media-wrapper')}>{media}</div>\n {children}\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 {actions && <div className=\"wds-prompt__actions-wrapper\">{actions}</div>}\n </div>\n </SentimentSurface>\n );\n },\n);\n\nPrimitivePrompt.displayName = 'PrimitivePrompt';\n"],"names":["PrimitivePrompt","forwardRef","sentiment","emphasis","media","actions","onDismiss","className","children","restProps","ref","intl","useIntl","_jsx","SentimentSurface","clsx","_jsxs","IconButton","size","priority","formatMessage","closeBtnMessages","ariaLabel","onClick","Cross","displayName"],"mappings":";;;;;;;;;AAwCO,MAAMA,eAAe,gBAAGC,UAAU,CACvC,CACE;AACEC,EAAAA,SAAS,GAAG,SAAS;AACrBC,EAAAA,QAAQ,GAAG,MAAM;EACjBC,KAAK;EACLC,OAAO;EACPC,SAAS;EACTC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAS,CACb,EACDC,GAAG,KACD;AACF,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;AAEtB,EAAA,oBACEC,GAAA,CAACC;AACC;AAAA,IAAA;AACAJ,IAAAA,GAAG,EAAEA,GAAI;AACTR,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,QAAQ,EAAEA,QAAS;IACnBI,SAAS,EAAEQ,IAAI,CAAC,YAAY,EAAE,eAAeb,SAAS,CAAA,CAAE,EAAEK,SAAS,CAAE;AAAA,IAAA,GACjEE,SAAS;AAAAD,IAAAA,QAAA,eAEbQ,IAAA,CAAA,KAAA,EAAA;AACET,MAAAA,SAAS,EAAEQ,IAAI,CAAC,6BAA6B,EAAE;QAC7C,2CAA2C,EAAE,CAAC,CAACT;AAChD,OAAA,CAAE;AAAAE,MAAAA,QAAA,gBAEHK,GAAA,CAAA,KAAA,EAAA;AAAKN,QAAAA,SAAS,EAAEQ,IAAI,CAAC,2BAA2B,CAAE;AAAAP,QAAAA,QAAA,EAAEJ;OAAW,CAC/D,EAACI,QAAQ,EACRF,SAAS,iBACRO,GAAA,CAACI,UAAU,EAAA;AACTC,QAAAA,IAAI,EAAE,EAAG;AACTC,QAAAA,QAAQ,EAAC,WAAW;AACpB,QAAA,YAAA,EAAYR,IAAI,CAACS,aAAa,CAACC,gBAAgB,CAACC,SAAS,CAAE;AAC3DC,QAAAA,OAAO,EAAEjB,SAAU;AAAAE,QAAAA,QAAA,eAEnBK,GAAA,CAACW,KAAK,EAAA,EAAA;AACR,OAAY,CACb,EACAnB,OAAO,iBAAIQ,GAAA,CAAA,KAAA,EAAA;AAAKN,QAAAA,SAAS,EAAC,6BAA6B;AAAAC,QAAAA,QAAA,EAAEH;AAAO,OAAM,CAAC;KACrE;AACP,GAAkB,CAAC;AAEvB,CAAC;AAGHL,eAAe,CAACyB,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('react');
|
|
4
|
+
var clsx = require('clsx');
|
|
5
|
+
var icons = require('@transferwise/icons');
|
|
6
|
+
var IconButton = require('../../../iconButton/IconButton.js');
|
|
7
|
+
var reactIntl = require('react-intl');
|
|
8
|
+
var Expander_messages = require('./Expander.messages.js');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
|
|
11
|
+
// Reusable toggle button component
|
|
12
|
+
const ExpanderToggle = ({
|
|
13
|
+
expanded,
|
|
14
|
+
onToggle,
|
|
15
|
+
size = 24,
|
|
16
|
+
className,
|
|
17
|
+
'data-testid': testId
|
|
18
|
+
}) => {
|
|
19
|
+
const intl = reactIntl.useIntl();
|
|
20
|
+
return /*#__PURE__*/jsxRuntime.jsx(IconButton.default, {
|
|
21
|
+
size: size,
|
|
22
|
+
priority: "secondary",
|
|
23
|
+
"aria-label": intl.formatMessage(expanded ? Expander_messages.default.collapseAriaLabel : Expander_messages.default.expandAriaLabel),
|
|
24
|
+
"aria-expanded": expanded,
|
|
25
|
+
className: clsx.clsx('wds-expander-toggle', {
|
|
26
|
+
'wds-expander-toggle--collapsed': !expanded
|
|
27
|
+
}, className),
|
|
28
|
+
"data-testid": testId,
|
|
29
|
+
onClick: onToggle,
|
|
30
|
+
children: /*#__PURE__*/jsxRuntime.jsx(icons.ChevronUp, {})
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.ExpanderToggle = ExpanderToggle;
|
|
35
|
+
//# sourceMappingURL=Expander.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Expander.js","sources":["../../../../src/prompt/common/Expander/Expander.tsx"],"sourcesContent":["import { useState, useCallback } from 'react';\nimport { clsx } from 'clsx';\nimport { ChevronUp } from '@transferwise/icons';\nimport IconButton from '../../../iconButton';\nimport { useIntl } from 'react-intl';\nimport messages from './Expander.messages';\n\nexport type ExpanderState = {\n expanded: boolean;\n toggle: () => void;\n setExpanded: (expanded: boolean) => void;\n};\n\n// Hook for managing expander state\nexport function useExpanderState(initialExpanded = true): ExpanderState {\n const [expanded, setExpanded] = useState(initialExpanded);\n\n const toggle = useCallback(() => {\n setExpanded((prev) => !prev);\n }, []);\n\n return {\n expanded,\n toggle,\n setExpanded,\n };\n}\n\n// Helper for conditional rendering based on expanded state\nexport function shouldShowWhenExpanded({\n expanded,\n hasContent,\n alwaysShow = false,\n}: {\n expanded: boolean;\n hasContent: boolean;\n alwaysShow?: boolean;\n}): boolean {\n if (alwaysShow) {\n return hasContent;\n }\n\n return expanded && hasContent;\n}\n\nexport type ExpanderToggleProps = {\n expanded: boolean;\n onToggle?: () => void;\n size?: 16 | 24 | 32 | 40 | 48 | 56 | 72;\n className?: string;\n 'data-testid'?: string;\n};\n\n// Reusable toggle button component\nexport const ExpanderToggle = ({\n expanded,\n onToggle,\n size = 24,\n className,\n 'data-testid': testId,\n}: ExpanderToggleProps) => {\n const intl = useIntl();\n\n return (\n <IconButton\n size={size}\n priority=\"secondary\"\n aria-label={intl.formatMessage(\n expanded ? messages.collapseAriaLabel : messages.expandAriaLabel,\n )}\n aria-expanded={expanded}\n className={clsx(\n 'wds-expander-toggle',\n { 'wds-expander-toggle--collapsed': !expanded },\n className,\n )}\n data-testid={testId}\n onClick={onToggle}\n >\n <ChevronUp />\n </IconButton>\n );\n};\n"],"names":["ExpanderToggle","expanded","onToggle","size","className","testId","intl","useIntl","_jsx","IconButton","priority","formatMessage","messages","collapseAriaLabel","expandAriaLabel","clsx","onClick","children","ChevronUp"],"mappings":";;;;;;;;;;AAqDA;AACO,MAAMA,cAAc,GAAGA,CAAC;EAC7BC,QAAQ;EACRC,QAAQ;AACRC,EAAAA,IAAI,GAAG,EAAE;EACTC,SAAS;AACT,EAAA,aAAa,EAAEC;AAAM,CACD,KAAI;AACxB,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;EAEtB,oBACEC,cAAA,CAACC,kBAAU,EAAA;AACTN,IAAAA,IAAI,EAAEA,IAAK;AACXO,IAAAA,QAAQ,EAAC,WAAW;AACpB,IAAA,YAAA,EAAYJ,IAAI,CAACK,aAAa,CAC5BV,QAAQ,GAAGW,yBAAQ,CAACC,iBAAiB,GAAGD,yBAAQ,CAACE,eAAe,CAChE;AACF,IAAA,eAAA,EAAeb,QAAS;AACxBG,IAAAA,SAAS,EAAEW,SAAI,CACb,qBAAqB,EACrB;AAAE,MAAA,gCAAgC,EAAE,CAACd;KAAU,EAC/CG,SAAS,CACT;AACF,IAAA,aAAA,EAAaC,MAAO;AACpBW,IAAAA,OAAO,EAAEd,QAAS;AAAAe,IAAAA,QAAA,eAElBT,cAAA,CAACU,eAAS,EAAA,EAAA;AACZ,GAAY,CAAC;AAEjB;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var reactIntl = require('react-intl');
|
|
6
|
+
|
|
7
|
+
var messages = reactIntl.defineMessages({
|
|
8
|
+
expandAriaLabel: {
|
|
9
|
+
id: "neptune.Expander.expandAriaLabel"
|
|
10
|
+
},
|
|
11
|
+
collapseAriaLabel: {
|
|
12
|
+
id: "neptune.Expander.collapseAriaLabel"
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
exports.default = messages;
|
|
17
|
+
//# sourceMappingURL=Expander.messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Expander.messages.js","sources":["../../../../src/prompt/common/Expander/Expander.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n expandAriaLabel: {\n id: 'neptune.Expander.expandAriaLabel',\n defaultMessage: 'Expand',\n description: 'Expand button for expander',\n },\n collapseAriaLabel: {\n id: 'neptune.Expander.collapseAriaLabel',\n defaultMessage: 'Collapse',\n description: 'Collapse button for expander',\n },\n});\n"],"names":["defineMessages","expandAriaLabel","id","collapseAriaLabel"],"mappings":";;;;;;AAEA,eAAeA,wBAAc,CAAC;AAC5BC,EAAAA,eAAe,EAAE;IACfC,EAAE,EAAA;GAGH;AACDC,EAAAA,iBAAiB,EAAE;IACjBD,EAAE,EAAA;AAGH;AACF,CAAA,CAAC;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
|
|
3
|
+
var messages = defineMessages({
|
|
4
|
+
expandAriaLabel: {
|
|
5
|
+
id: "neptune.Expander.expandAriaLabel"
|
|
6
|
+
},
|
|
7
|
+
collapseAriaLabel: {
|
|
8
|
+
id: "neptune.Expander.collapseAriaLabel"
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export { messages as default };
|
|
13
|
+
//# sourceMappingURL=Expander.messages.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Expander.messages.mjs","sources":["../../../../src/prompt/common/Expander/Expander.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n expandAriaLabel: {\n id: 'neptune.Expander.expandAriaLabel',\n defaultMessage: 'Expand',\n description: 'Expand button for expander',\n },\n collapseAriaLabel: {\n id: 'neptune.Expander.collapseAriaLabel',\n defaultMessage: 'Collapse',\n description: 'Collapse button for expander',\n },\n});\n"],"names":["defineMessages","expandAriaLabel","id","collapseAriaLabel"],"mappings":";;AAEA,eAAeA,cAAc,CAAC;AAC5BC,EAAAA,eAAe,EAAE;IACfC,EAAE,EAAA;GAGH;AACDC,EAAAA,iBAAiB,EAAE;IACjBD,EAAE,EAAA;AAGH;AACF,CAAA,CAAC;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { ChevronUp } from '@transferwise/icons';
|
|
4
|
+
import IconButton from '../../../iconButton/IconButton.mjs';
|
|
5
|
+
import { useIntl } from 'react-intl';
|
|
6
|
+
import messages from './Expander.messages.mjs';
|
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
// Reusable toggle button component
|
|
10
|
+
const ExpanderToggle = ({
|
|
11
|
+
expanded,
|
|
12
|
+
onToggle,
|
|
13
|
+
size = 24,
|
|
14
|
+
className,
|
|
15
|
+
'data-testid': testId
|
|
16
|
+
}) => {
|
|
17
|
+
const intl = useIntl();
|
|
18
|
+
return /*#__PURE__*/jsx(IconButton, {
|
|
19
|
+
size: size,
|
|
20
|
+
priority: "secondary",
|
|
21
|
+
"aria-label": intl.formatMessage(expanded ? messages.collapseAriaLabel : messages.expandAriaLabel),
|
|
22
|
+
"aria-expanded": expanded,
|
|
23
|
+
className: clsx('wds-expander-toggle', {
|
|
24
|
+
'wds-expander-toggle--collapsed': !expanded
|
|
25
|
+
}, className),
|
|
26
|
+
"data-testid": testId,
|
|
27
|
+
onClick: onToggle,
|
|
28
|
+
children: /*#__PURE__*/jsx(ChevronUp, {})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { ExpanderToggle };
|
|
33
|
+
//# sourceMappingURL=Expander.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Expander.mjs","sources":["../../../../src/prompt/common/Expander/Expander.tsx"],"sourcesContent":["import { useState, useCallback } from 'react';\nimport { clsx } from 'clsx';\nimport { ChevronUp } from '@transferwise/icons';\nimport IconButton from '../../../iconButton';\nimport { useIntl } from 'react-intl';\nimport messages from './Expander.messages';\n\nexport type ExpanderState = {\n expanded: boolean;\n toggle: () => void;\n setExpanded: (expanded: boolean) => void;\n};\n\n// Hook for managing expander state\nexport function useExpanderState(initialExpanded = true): ExpanderState {\n const [expanded, setExpanded] = useState(initialExpanded);\n\n const toggle = useCallback(() => {\n setExpanded((prev) => !prev);\n }, []);\n\n return {\n expanded,\n toggle,\n setExpanded,\n };\n}\n\n// Helper for conditional rendering based on expanded state\nexport function shouldShowWhenExpanded({\n expanded,\n hasContent,\n alwaysShow = false,\n}: {\n expanded: boolean;\n hasContent: boolean;\n alwaysShow?: boolean;\n}): boolean {\n if (alwaysShow) {\n return hasContent;\n }\n\n return expanded && hasContent;\n}\n\nexport type ExpanderToggleProps = {\n expanded: boolean;\n onToggle?: () => void;\n size?: 16 | 24 | 32 | 40 | 48 | 56 | 72;\n className?: string;\n 'data-testid'?: string;\n};\n\n// Reusable toggle button component\nexport const ExpanderToggle = ({\n expanded,\n onToggle,\n size = 24,\n className,\n 'data-testid': testId,\n}: ExpanderToggleProps) => {\n const intl = useIntl();\n\n return (\n <IconButton\n size={size}\n priority=\"secondary\"\n aria-label={intl.formatMessage(\n expanded ? messages.collapseAriaLabel : messages.expandAriaLabel,\n )}\n aria-expanded={expanded}\n className={clsx(\n 'wds-expander-toggle',\n { 'wds-expander-toggle--collapsed': !expanded },\n className,\n )}\n data-testid={testId}\n onClick={onToggle}\n >\n <ChevronUp />\n </IconButton>\n );\n};\n"],"names":["ExpanderToggle","expanded","onToggle","size","className","testId","intl","useIntl","_jsx","IconButton","priority","formatMessage","messages","collapseAriaLabel","expandAriaLabel","clsx","onClick","children","ChevronUp"],"mappings":";;;;;;;;AAqDA;AACO,MAAMA,cAAc,GAAGA,CAAC;EAC7BC,QAAQ;EACRC,QAAQ;AACRC,EAAAA,IAAI,GAAG,EAAE;EACTC,SAAS;AACT,EAAA,aAAa,EAAEC;AAAM,CACD,KAAI;AACxB,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;EAEtB,oBACEC,GAAA,CAACC,UAAU,EAAA;AACTN,IAAAA,IAAI,EAAEA,IAAK;AACXO,IAAAA,QAAQ,EAAC,WAAW;AACpB,IAAA,YAAA,EAAYJ,IAAI,CAACK,aAAa,CAC5BV,QAAQ,GAAGW,QAAQ,CAACC,iBAAiB,GAAGD,QAAQ,CAACE,eAAe,CAChE;AACF,IAAA,eAAA,EAAeb,QAAS;AACxBG,IAAAA,SAAS,EAAEW,IAAI,CACb,qBAAqB,EACrB;AAAE,MAAA,gCAAgC,EAAE,CAACd;KAAU,EAC/CG,SAAS,CACT;AACF,IAAA,aAAA,EAAaC,MAAO;AACpBW,IAAAA,OAAO,EAAEd,QAAS;AAAAe,IAAAA,QAAA,eAElBT,GAAA,CAACU,SAAS,EAAA,EAAA;AACZ,GAAY,CAAC;AAEjB;;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var icons = require('@transferwise/icons');
|
|
4
|
+
var AvatarView = require('../../avatarView/AvatarView.js');
|
|
5
|
+
var Image = require('../../image/Image.js');
|
|
6
|
+
var StatusIcon = require('../../statusIcon/StatusIcon.js');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function renderPromptMedia({
|
|
10
|
+
media,
|
|
11
|
+
sentiment,
|
|
12
|
+
mediaId,
|
|
13
|
+
imgClassName
|
|
14
|
+
}) {
|
|
15
|
+
if (media?.imgSrc) {
|
|
16
|
+
return /*#__PURE__*/jsxRuntime.jsx(Image.default, {
|
|
17
|
+
id: mediaId,
|
|
18
|
+
src: media.imgSrc,
|
|
19
|
+
className: imgClassName,
|
|
20
|
+
alt: media['aria-label'] ?? ''
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
if (media?.avatar) {
|
|
24
|
+
const badge = media.avatar.badge ? media.avatar.badge : sentiment === 'proposition' ? {} : {
|
|
25
|
+
status: sentiment
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/jsxRuntime.jsx(AvatarView.default, {
|
|
28
|
+
...media.avatar,
|
|
29
|
+
badge: badge,
|
|
30
|
+
"aria-label": media['aria-label'],
|
|
31
|
+
"aria-hidden": media['aria-hidden'],
|
|
32
|
+
id: mediaId,
|
|
33
|
+
size: 48,
|
|
34
|
+
children: media.avatar.asset
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return sentiment === 'proposition' ? /*#__PURE__*/jsxRuntime.jsx(AvatarView.default, {
|
|
38
|
+
id: mediaId,
|
|
39
|
+
size: 48,
|
|
40
|
+
"aria-label": media['aria-label'],
|
|
41
|
+
"aria-hidden": media['aria-hidden'],
|
|
42
|
+
children: /*#__PURE__*/jsxRuntime.jsx(icons.GiftBox, {})
|
|
43
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(StatusIcon.default, {
|
|
44
|
+
id: mediaId,
|
|
45
|
+
size: 48,
|
|
46
|
+
sentiment: sentiment,
|
|
47
|
+
iconLabel: media['aria-hidden'] ? null : media['aria-label']
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
exports.renderPromptMedia = renderPromptMedia;
|
|
52
|
+
//# sourceMappingURL=promptMedia.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptMedia.js","sources":["../../../src/prompt/helpers/promptMedia.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { GiftBox } from '@transferwise/icons';\n\nimport AvatarView, { AvatarViewProps } from '../../avatarView';\nimport Image from '../../image';\nimport StatusIcon from '../../statusIcon';\nimport { BadgeAssetsProps } from '../../badge';\nimport { PrimitivePromptProps } from '../PrimitivePrompt';\n\nexport type PromptMedia = {\n imgSrc?: string;\n avatar?: Pick<AvatarViewProps, 'imgSrc' | 'profileName' | 'profileType'> & {\n asset?: AvatarViewProps['children'];\n badge?: Pick<BadgeAssetsProps, 'flagCode'>;\n };\n 'aria-label'?: string;\n 'aria-hidden'?: boolean;\n};\n\ntype RenderPromptMediaOptions = {\n media: PromptMedia;\n sentiment: PrimitivePromptProps['sentiment'];\n mediaId: string;\n imgClassName: string;\n};\n\nexport function renderPromptMedia({\n media,\n sentiment,\n mediaId,\n imgClassName,\n}: RenderPromptMediaOptions): ReactNode {\n if (media?.imgSrc) {\n return (\n <Image\n id={mediaId}\n src={media.imgSrc}\n className={imgClassName}\n alt={media['aria-label'] ?? ''}\n />\n );\n }\n if (media?.avatar) {\n const badge = media.avatar.badge\n ? media.avatar.badge\n : sentiment === 'proposition'\n ? {}\n : { status: sentiment };\n return (\n <AvatarView\n {...media.avatar}\n badge={badge}\n aria-label={media['aria-label']}\n aria-hidden={media['aria-hidden']}\n id={mediaId}\n size={48}\n >\n {media.avatar.asset}\n </AvatarView>\n );\n }\n return sentiment === 'proposition' ? (\n <AvatarView\n id={mediaId}\n size={48}\n aria-label={media['aria-label']}\n aria-hidden={media['aria-hidden']}\n >\n <GiftBox />\n </AvatarView>\n ) : (\n <StatusIcon\n id={mediaId}\n size={48}\n sentiment={sentiment}\n iconLabel={media['aria-hidden'] ? null : media['aria-label']}\n />\n );\n}\n"],"names":["renderPromptMedia","media","sentiment","mediaId","imgClassName","imgSrc","_jsx","Image","id","src","className","alt","avatar","badge","status","AvatarView","size","children","asset","GiftBox","StatusIcon","iconLabel"],"mappings":";;;;;;;;AA0BM,SAAUA,iBAAiBA,CAAC;EAChCC,KAAK;EACLC,SAAS;EACTC,OAAO;AACPC,EAAAA;AAAY,CACa,EAAA;EACzB,IAAIH,KAAK,EAAEI,MAAM,EAAE;IACjB,oBACEC,cAAA,CAACC,aAAK,EAAA;AACJC,MAAAA,EAAE,EAAEL,OAAQ;MACZM,GAAG,EAAER,KAAK,CAACI,MAAO;AAClBK,MAAAA,SAAS,EAAEN,YAAa;AACxBO,MAAAA,GAAG,EAAEV,KAAK,CAAC,YAAY,CAAC,IAAI;AAAG,KAAA,CAC/B;AAEN,EAAA;EACA,IAAIA,KAAK,EAAEW,MAAM,EAAE;IACjB,MAAMC,KAAK,GAAGZ,KAAK,CAACW,MAAM,CAACC,KAAK,GAC5BZ,KAAK,CAACW,MAAM,CAACC,KAAK,GAClBX,SAAS,KAAK,aAAa,GACzB,EAAE,GACF;AAAEY,MAAAA,MAAM,EAAEZ;KAAW;IAC3B,oBACEI,cAAA,CAACS,kBAAU,EAAA;MAAA,GACLd,KAAK,CAACW,MAAM;AAChBC,MAAAA,KAAK,EAAEA,KAAM;MACb,YAAA,EAAYZ,KAAK,CAAC,YAAY,CAAE;MAChC,aAAA,EAAaA,KAAK,CAAC,aAAa,CAAE;AAClCO,MAAAA,EAAE,EAAEL,OAAQ;AACZa,MAAAA,IAAI,EAAE,EAAG;AAAAC,MAAAA,QAAA,EAERhB,KAAK,CAACW,MAAM,CAACM;AAAK,KACT,CAAC;AAEjB,EAAA;AACA,EAAA,OAAOhB,SAAS,KAAK,aAAa,gBAChCI,cAAA,CAACS,kBAAU,EAAA;AACTP,IAAAA,EAAE,EAAEL,OAAQ;AACZa,IAAAA,IAAI,EAAE,EAAG;IACT,YAAA,EAAYf,KAAK,CAAC,YAAY,CAAE;IAChC,aAAA,EAAaA,KAAK,CAAC,aAAa,CAAE;AAAAgB,IAAAA,QAAA,eAElCX,cAAA,CAACa,aAAO,EAAA,EAAA;AACV,GAAY,CAAC,gBAEbb,cAAA,CAACc,kBAAU,EAAA;AACTZ,IAAAA,EAAE,EAAEL,OAAQ;AACZa,IAAAA,IAAI,EAAE,EAAG;AACTd,IAAAA,SAAS,EAAEA,SAAU;IACrBmB,SAAS,EAAEpB,KAAK,CAAC,aAAa,CAAC,GAAG,IAAI,GAAGA,KAAK,CAAC,YAAY;AAAE,GAAA,CAEhE;AACH;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { GiftBox } from '@transferwise/icons';
|
|
2
|
+
import AvatarView from '../../avatarView/AvatarView.mjs';
|
|
3
|
+
import Image from '../../image/Image.mjs';
|
|
4
|
+
import StatusIcon from '../../statusIcon/StatusIcon.mjs';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function renderPromptMedia({
|
|
8
|
+
media,
|
|
9
|
+
sentiment,
|
|
10
|
+
mediaId,
|
|
11
|
+
imgClassName
|
|
12
|
+
}) {
|
|
13
|
+
if (media?.imgSrc) {
|
|
14
|
+
return /*#__PURE__*/jsx(Image, {
|
|
15
|
+
id: mediaId,
|
|
16
|
+
src: media.imgSrc,
|
|
17
|
+
className: imgClassName,
|
|
18
|
+
alt: media['aria-label'] ?? ''
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
if (media?.avatar) {
|
|
22
|
+
const badge = media.avatar.badge ? media.avatar.badge : sentiment === 'proposition' ? {} : {
|
|
23
|
+
status: sentiment
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/jsx(AvatarView, {
|
|
26
|
+
...media.avatar,
|
|
27
|
+
badge: badge,
|
|
28
|
+
"aria-label": media['aria-label'],
|
|
29
|
+
"aria-hidden": media['aria-hidden'],
|
|
30
|
+
id: mediaId,
|
|
31
|
+
size: 48,
|
|
32
|
+
children: media.avatar.asset
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return sentiment === 'proposition' ? /*#__PURE__*/jsx(AvatarView, {
|
|
36
|
+
id: mediaId,
|
|
37
|
+
size: 48,
|
|
38
|
+
"aria-label": media['aria-label'],
|
|
39
|
+
"aria-hidden": media['aria-hidden'],
|
|
40
|
+
children: /*#__PURE__*/jsx(GiftBox, {})
|
|
41
|
+
}) : /*#__PURE__*/jsx(StatusIcon, {
|
|
42
|
+
id: mediaId,
|
|
43
|
+
size: 48,
|
|
44
|
+
sentiment: sentiment,
|
|
45
|
+
iconLabel: media['aria-hidden'] ? null : media['aria-label']
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { renderPromptMedia };
|
|
50
|
+
//# sourceMappingURL=promptMedia.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptMedia.mjs","sources":["../../../src/prompt/helpers/promptMedia.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { GiftBox } from '@transferwise/icons';\n\nimport AvatarView, { AvatarViewProps } from '../../avatarView';\nimport Image from '../../image';\nimport StatusIcon from '../../statusIcon';\nimport { BadgeAssetsProps } from '../../badge';\nimport { PrimitivePromptProps } from '../PrimitivePrompt';\n\nexport type PromptMedia = {\n imgSrc?: string;\n avatar?: Pick<AvatarViewProps, 'imgSrc' | 'profileName' | 'profileType'> & {\n asset?: AvatarViewProps['children'];\n badge?: Pick<BadgeAssetsProps, 'flagCode'>;\n };\n 'aria-label'?: string;\n 'aria-hidden'?: boolean;\n};\n\ntype RenderPromptMediaOptions = {\n media: PromptMedia;\n sentiment: PrimitivePromptProps['sentiment'];\n mediaId: string;\n imgClassName: string;\n};\n\nexport function renderPromptMedia({\n media,\n sentiment,\n mediaId,\n imgClassName,\n}: RenderPromptMediaOptions): ReactNode {\n if (media?.imgSrc) {\n return (\n <Image\n id={mediaId}\n src={media.imgSrc}\n className={imgClassName}\n alt={media['aria-label'] ?? ''}\n />\n );\n }\n if (media?.avatar) {\n const badge = media.avatar.badge\n ? media.avatar.badge\n : sentiment === 'proposition'\n ? {}\n : { status: sentiment };\n return (\n <AvatarView\n {...media.avatar}\n badge={badge}\n aria-label={media['aria-label']}\n aria-hidden={media['aria-hidden']}\n id={mediaId}\n size={48}\n >\n {media.avatar.asset}\n </AvatarView>\n );\n }\n return sentiment === 'proposition' ? (\n <AvatarView\n id={mediaId}\n size={48}\n aria-label={media['aria-label']}\n aria-hidden={media['aria-hidden']}\n >\n <GiftBox />\n </AvatarView>\n ) : (\n <StatusIcon\n id={mediaId}\n size={48}\n sentiment={sentiment}\n iconLabel={media['aria-hidden'] ? null : media['aria-label']}\n />\n );\n}\n"],"names":["renderPromptMedia","media","sentiment","mediaId","imgClassName","imgSrc","_jsx","Image","id","src","className","alt","avatar","badge","status","AvatarView","size","children","asset","GiftBox","StatusIcon","iconLabel"],"mappings":";;;;;;AA0BM,SAAUA,iBAAiBA,CAAC;EAChCC,KAAK;EACLC,SAAS;EACTC,OAAO;AACPC,EAAAA;AAAY,CACa,EAAA;EACzB,IAAIH,KAAK,EAAEI,MAAM,EAAE;IACjB,oBACEC,GAAA,CAACC,KAAK,EAAA;AACJC,MAAAA,EAAE,EAAEL,OAAQ;MACZM,GAAG,EAAER,KAAK,CAACI,MAAO;AAClBK,MAAAA,SAAS,EAAEN,YAAa;AACxBO,MAAAA,GAAG,EAAEV,KAAK,CAAC,YAAY,CAAC,IAAI;AAAG,KAAA,CAC/B;AAEN,EAAA;EACA,IAAIA,KAAK,EAAEW,MAAM,EAAE;IACjB,MAAMC,KAAK,GAAGZ,KAAK,CAACW,MAAM,CAACC,KAAK,GAC5BZ,KAAK,CAACW,MAAM,CAACC,KAAK,GAClBX,SAAS,KAAK,aAAa,GACzB,EAAE,GACF;AAAEY,MAAAA,MAAM,EAAEZ;KAAW;IAC3B,oBACEI,GAAA,CAACS,UAAU,EAAA;MAAA,GACLd,KAAK,CAACW,MAAM;AAChBC,MAAAA,KAAK,EAAEA,KAAM;MACb,YAAA,EAAYZ,KAAK,CAAC,YAAY,CAAE;MAChC,aAAA,EAAaA,KAAK,CAAC,aAAa,CAAE;AAClCO,MAAAA,EAAE,EAAEL,OAAQ;AACZa,MAAAA,IAAI,EAAE,EAAG;AAAAC,MAAAA,QAAA,EAERhB,KAAK,CAACW,MAAM,CAACM;AAAK,KACT,CAAC;AAEjB,EAAA;AACA,EAAA,OAAOhB,SAAS,KAAK,aAAa,gBAChCI,GAAA,CAACS,UAAU,EAAA;AACTP,IAAAA,EAAE,EAAEL,OAAQ;AACZa,IAAAA,IAAI,EAAE,EAAG;IACT,YAAA,EAAYf,KAAK,CAAC,YAAY,CAAE;IAChC,aAAA,EAAaA,KAAK,CAAC,aAAa,CAAE;AAAAgB,IAAAA,QAAA,eAElCX,GAAA,CAACa,OAAO,EAAA,EAAA;AACV,GAAY,CAAC,gBAEbb,GAAA,CAACc,UAAU,EAAA;AACTZ,IAAAA,EAAE,EAAEL,OAAQ;AACZa,IAAAA,IAAI,EAAE,EAAG;AACTd,IAAAA,SAAS,EAAEA,SAAU;IACrBmB,SAAS,EAAEpB,KAAK,CAAC,aAAa,CAAC,GAAG,IAAI,GAAGA,KAAK,CAAC,YAAY;AAAE,GAAA,CAEhE;AACH;;;;"}
|
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
.np-logo {
|
|
2
2
|
display: inline-block;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
fill: var(--color-interactive-primary);
|
|
7
|
-
}
|
|
8
|
-
.np-theme-personal--dark .np-logo-svg path {
|
|
9
|
-
fill: var(--color-white);
|
|
10
|
-
}
|
|
11
|
-
.np-logo-svg--size-sm {
|
|
12
|
-
display: block;
|
|
13
|
-
}
|
|
14
|
-
@media (min-width: 576px) {
|
|
15
|
-
.np-logo-svg--size-sm {
|
|
16
|
-
display: none;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
.np-logo-svg--size-md {
|
|
20
|
-
display: none;
|
|
21
|
-
}
|
|
22
|
-
@media (min-width: 576px) {
|
|
23
|
-
.np-logo-svg--size-md {
|
|
24
|
-
display: block;
|
|
25
|
-
}
|
|
3
|
+
color: var(--color-interactive-primary);
|
|
4
|
+
width: var(--wds-logo-width);
|
|
5
|
+
height: var(--wds-logo-height);
|
|
26
6
|
}
|
package/build/styles/main.css
CHANGED
|
@@ -4456,7 +4456,6 @@ kbd kbd {
|
|
|
4456
4456
|
|
|
4457
4457
|
.text-underline {
|
|
4458
4458
|
text-decoration: underline;
|
|
4459
|
-
-webkit-text-decoration: underline !important;
|
|
4460
4459
|
text-decoration: underline !important;
|
|
4461
4460
|
text-underline-offset: 0.3em;
|
|
4462
4461
|
}
|
|
@@ -31067,35 +31066,9 @@ button.np-link {
|
|
|
31067
31066
|
|
|
31068
31067
|
.np-logo {
|
|
31069
31068
|
display: inline-block;
|
|
31070
|
-
|
|
31071
|
-
|
|
31072
|
-
|
|
31073
|
-
.np-theme-personal--bright-green .np-logo-svg path {
|
|
31074
|
-
fill: var(--color-interactive-primary);
|
|
31075
|
-
}
|
|
31076
|
-
|
|
31077
|
-
.np-theme-personal--dark .np-logo-svg path {
|
|
31078
|
-
fill: var(--color-white);
|
|
31079
|
-
}
|
|
31080
|
-
|
|
31081
|
-
.np-logo-svg--size-sm {
|
|
31082
|
-
display: block;
|
|
31083
|
-
}
|
|
31084
|
-
|
|
31085
|
-
@media (min-width: 576px) {
|
|
31086
|
-
.np-logo-svg--size-sm {
|
|
31087
|
-
display: none;
|
|
31088
|
-
}
|
|
31089
|
-
}
|
|
31090
|
-
|
|
31091
|
-
.np-logo-svg--size-md {
|
|
31092
|
-
display: none;
|
|
31093
|
-
}
|
|
31094
|
-
|
|
31095
|
-
@media (min-width: 576px) {
|
|
31096
|
-
.np-logo-svg--size-md {
|
|
31097
|
-
display: block;
|
|
31098
|
-
}
|
|
31069
|
+
color: var(--color-interactive-primary);
|
|
31070
|
+
width: var(--wds-logo-width);
|
|
31071
|
+
height: var(--wds-logo-height);
|
|
31099
31072
|
}
|
|
31100
31073
|
|
|
31101
31074
|
.tw-modal--scrollable {
|
|
@@ -32233,6 +32206,228 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
32233
32206
|
padding: 0;
|
|
32234
32207
|
}
|
|
32235
32208
|
|
|
32209
|
+
@media (max-width: 320px) {
|
|
32210
|
+
.wds-info-prompt .wds-prompt__media-wrapper {
|
|
32211
|
+
padding-top: 4px;
|
|
32212
|
+
padding-top: var(--size-4);
|
|
32213
|
+
}
|
|
32214
|
+
}
|
|
32215
|
+
|
|
32216
|
+
@media (max-width: 320px) {
|
|
32217
|
+
.wds-info-prompt .wds-prompt__media-wrapper:has(.wds-info-prompt__media > .tw-icon) {
|
|
32218
|
+
padding-top: 8px;
|
|
32219
|
+
padding-top: var(--size-8);
|
|
32220
|
+
}
|
|
32221
|
+
}
|
|
32222
|
+
|
|
32223
|
+
@media (max-width: 320px) {
|
|
32224
|
+
.wds-info-prompt .wds-prompt__media-wrapper:has(+ .wds-info-prompt__content .wds-info-prompt__title:first-child) {
|
|
32225
|
+
padding-top: 8px;
|
|
32226
|
+
padding-top: var(--size-8);
|
|
32227
|
+
}
|
|
32228
|
+
}
|
|
32229
|
+
|
|
32230
|
+
@media (max-width: 320px) {
|
|
32231
|
+
.wds-info-prompt .wds-prompt__media-wrapper:has(+ .wds-info-prompt__content .wds-info-prompt__title:first-child):has(.wds-info-prompt__media > .tw-icon) {
|
|
32232
|
+
padding-top: 12px;
|
|
32233
|
+
padding-top: var(--size-12);
|
|
32234
|
+
}
|
|
32235
|
+
}
|
|
32236
|
+
|
|
32237
|
+
.wds-action-prompt {
|
|
32238
|
+
--Prompt-padding: var(--size-16);
|
|
32239
|
+
--Prompt-actions-gap: var(--size-8);
|
|
32240
|
+
--Prompt-gap: var(--size-10) var(--size-16);
|
|
32241
|
+
--Prompt-border-radius: var(--radius-large);
|
|
32242
|
+
}
|
|
32243
|
+
|
|
32244
|
+
.wds-action-prompt--media-image {
|
|
32245
|
+
width: 48px;
|
|
32246
|
+
width: var(--size-48);
|
|
32247
|
+
height: 48px;
|
|
32248
|
+
height: var(--size-48);
|
|
32249
|
+
-o-object-fit: contain;
|
|
32250
|
+
object-fit: contain;
|
|
32251
|
+
}
|
|
32252
|
+
|
|
32253
|
+
@media (max-width: 767px) {
|
|
32254
|
+
.wds-action-prompt--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
|
|
32255
|
+
flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
|
|
32256
|
+
min-width: -moz-fit-content;
|
|
32257
|
+
min-width: fit-content;
|
|
32258
|
+
}
|
|
32259
|
+
}
|
|
32260
|
+
|
|
32261
|
+
.wds-action-prompt__content {
|
|
32262
|
+
max-width: calc(48px * 10);
|
|
32263
|
+
max-width: calc(var(--size-48) * 10);
|
|
32264
|
+
}
|
|
32265
|
+
|
|
32266
|
+
.wds-critical-banner {
|
|
32267
|
+
--Prompt-padding: var(--size-16);
|
|
32268
|
+
--Prompt-actions-gap: var(--size-8);
|
|
32269
|
+
--Prompt-gap: var(--size-10) var(--size-16);
|
|
32270
|
+
--Prompt-border-radius: 0;
|
|
32271
|
+
container-type: inline-size;
|
|
32272
|
+
--critical-banner-easing: cubic-bezier(0.9, 0, 0.7, 1);
|
|
32273
|
+
--critical-banner-duration: 150ms;
|
|
32274
|
+
/* Override PrimitivePrompt's --screen-sm-max actions behaviour:
|
|
32275
|
+
actions only go full-width below mobile-max token (container query) */
|
|
32276
|
+
}
|
|
32277
|
+
|
|
32278
|
+
.wds-critical-banner--media-image {
|
|
32279
|
+
width: 48px;
|
|
32280
|
+
width: var(--size-48);
|
|
32281
|
+
height: 48px;
|
|
32282
|
+
height: var(--size-48);
|
|
32283
|
+
-o-object-fit: contain;
|
|
32284
|
+
object-fit: contain;
|
|
32285
|
+
}
|
|
32286
|
+
|
|
32287
|
+
.wds-critical-banner__title {
|
|
32288
|
+
display: -webkit-box;
|
|
32289
|
+
-webkit-line-clamp: 8;
|
|
32290
|
+
line-clamp: 8;
|
|
32291
|
+
-webkit-box-orient: vertical;
|
|
32292
|
+
max-height: 192px;
|
|
32293
|
+
overflow: hidden;
|
|
32294
|
+
transition: max-height var(--critical-banner-duration) var(--critical-banner-easing);
|
|
32295
|
+
}
|
|
32296
|
+
|
|
32297
|
+
.wds-critical-banner--collapsed .wds-critical-banner__title {
|
|
32298
|
+
-webkit-line-clamp: 2;
|
|
32299
|
+
line-clamp: 2;
|
|
32300
|
+
max-height: 48px;
|
|
32301
|
+
}
|
|
32302
|
+
|
|
32303
|
+
.wds-critical-banner__description {
|
|
32304
|
+
max-height: 30vh;
|
|
32305
|
+
opacity: 1;
|
|
32306
|
+
overflow: hidden;
|
|
32307
|
+
transition: max-height var(--critical-banner-duration) var(--critical-banner-easing), opacity var(--critical-banner-duration) var(--critical-banner-easing);
|
|
32308
|
+
}
|
|
32309
|
+
|
|
32310
|
+
.wds-critical-banner--collapsed .wds-critical-banner__description--with-title {
|
|
32311
|
+
max-height: 0;
|
|
32312
|
+
opacity: 0;
|
|
32313
|
+
}
|
|
32314
|
+
|
|
32315
|
+
.wds-critical-banner--collapsed .wds-critical-banner__description:not(.wds-critical-banner__description--with-title) {
|
|
32316
|
+
display: -webkit-box;
|
|
32317
|
+
-webkit-line-clamp: 2;
|
|
32318
|
+
line-clamp: 2;
|
|
32319
|
+
-webkit-box-orient: vertical;
|
|
32320
|
+
overflow: hidden;
|
|
32321
|
+
}
|
|
32322
|
+
|
|
32323
|
+
.wds-critical-banner .wds-prompt__content-wrapper {
|
|
32324
|
+
grid-template-columns: auto 1fr auto;
|
|
32325
|
+
align-items: flex-start;
|
|
32326
|
+
transition: row-gap var(--critical-banner-duration) var(--critical-banner-easing);
|
|
32327
|
+
}
|
|
32328
|
+
|
|
32329
|
+
.wds-critical-banner--collapsed .wds-prompt__content-wrapper {
|
|
32330
|
+
row-gap: 0;
|
|
32331
|
+
}
|
|
32332
|
+
|
|
32333
|
+
.wds-critical-banner__text-wrapper {
|
|
32334
|
+
position: relative;
|
|
32335
|
+
display: flex;
|
|
32336
|
+
flex-direction: column;
|
|
32337
|
+
justify-content: center;
|
|
32338
|
+
align-items: flex-start;
|
|
32339
|
+
text-align: start;
|
|
32340
|
+
min-width: 0;
|
|
32341
|
+
max-width: 480px;
|
|
32342
|
+
height: 100%;
|
|
32343
|
+
padding-top: 3px;
|
|
32344
|
+
}
|
|
32345
|
+
|
|
32346
|
+
@media (max-width: 320px) {
|
|
32347
|
+
.wds-critical-banner__text-wrapper {
|
|
32348
|
+
padding-top: 0;
|
|
32349
|
+
}
|
|
32350
|
+
}
|
|
32351
|
+
|
|
32352
|
+
@container (max-width: 320px) {
|
|
32353
|
+
.wds-critical-banner__text-wrapper {
|
|
32354
|
+
padding-top: 0;
|
|
32355
|
+
}
|
|
32356
|
+
}
|
|
32357
|
+
|
|
32358
|
+
.wds-critical-banner--collapsed .wds-critical-banner__title,
|
|
32359
|
+
.wds-critical-banner--collapsed .wds-critical-banner__description {
|
|
32360
|
+
transform: translateY(0);
|
|
32361
|
+
}
|
|
32362
|
+
|
|
32363
|
+
.wds-critical-banner__toggle {
|
|
32364
|
+
flex-shrink: 0;
|
|
32365
|
+
transition: transform var(--critical-banner-duration) var(--critical-banner-easing);
|
|
32366
|
+
}
|
|
32367
|
+
|
|
32368
|
+
.wds-critical-banner__toggle--collapsed {
|
|
32369
|
+
transform: rotate(180deg);
|
|
32370
|
+
}
|
|
32371
|
+
|
|
32372
|
+
@container (min-width: 768px) {
|
|
32373
|
+
.wds-critical-banner__toggle {
|
|
32374
|
+
display: none;
|
|
32375
|
+
}
|
|
32376
|
+
}
|
|
32377
|
+
|
|
32378
|
+
.wds-critical-banner .wds-prompt__actions-wrapper {
|
|
32379
|
+
grid-column-start: 2;
|
|
32380
|
+
grid-column-end: 3;
|
|
32381
|
+
max-height: 200px;
|
|
32382
|
+
opacity: 1;
|
|
32383
|
+
overflow: visible;
|
|
32384
|
+
}
|
|
32385
|
+
|
|
32386
|
+
@container (max-width: 600px) {
|
|
32387
|
+
.wds-critical-banner .wds-prompt__actions-wrapper {
|
|
32388
|
+
grid-column: span 3;
|
|
32389
|
+
width: 100%;
|
|
32390
|
+
}
|
|
32391
|
+
.wds-critical-banner .wds-prompt__actions-wrapper .wds-Button {
|
|
32392
|
+
flex: 1 1 100%;
|
|
32393
|
+
width: 100%;
|
|
32394
|
+
}
|
|
32395
|
+
}
|
|
32396
|
+
|
|
32397
|
+
.wds-critical-banner--collapsed .wds-prompt__actions-wrapper {
|
|
32398
|
+
max-height: 0;
|
|
32399
|
+
opacity: 0;
|
|
32400
|
+
overflow: hidden;
|
|
32401
|
+
pointer-events: none;
|
|
32402
|
+
}
|
|
32403
|
+
|
|
32404
|
+
@container (max-width: 600px) {
|
|
32405
|
+
.wds-critical-banner--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
|
|
32406
|
+
flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
|
|
32407
|
+
min-width: -moz-fit-content;
|
|
32408
|
+
min-width: fit-content;
|
|
32409
|
+
}
|
|
32410
|
+
}
|
|
32411
|
+
|
|
32412
|
+
@media (prefers-reduced-motion: reduce) {
|
|
32413
|
+
.wds-critical-banner__description,
|
|
32414
|
+
.wds-critical-banner__title,
|
|
32415
|
+
.wds-critical-banner .wds-prompt__content-wrapper,
|
|
32416
|
+
.wds-critical-banner__toggle {
|
|
32417
|
+
transition: none !important;
|
|
32418
|
+
}
|
|
32419
|
+
}
|
|
32420
|
+
|
|
32421
|
+
.wds-expander-toggle {
|
|
32422
|
+
align-self: flex-start;
|
|
32423
|
+
flex-shrink: 0;
|
|
32424
|
+
transition: transform 0.2s ease-in-out;
|
|
32425
|
+
}
|
|
32426
|
+
|
|
32427
|
+
.wds-expander-toggle--collapsed {
|
|
32428
|
+
transform: rotate(180deg);
|
|
32429
|
+
}
|
|
32430
|
+
|
|
32236
32431
|
.wds-radio-group .np-radio:last-child label {
|
|
32237
32432
|
margin-bottom: 0;
|
|
32238
32433
|
}
|
|
@@ -34658,32 +34853,3 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
34658
34853
|
.np-list-item__action {
|
|
34659
34854
|
flex-shrink: 0;
|
|
34660
34855
|
}
|
|
34661
|
-
|
|
34662
|
-
.wds-action-prompt {
|
|
34663
|
-
--Prompt-padding: var(--size-16);
|
|
34664
|
-
--Prompt-actions-gap: var(--size-8);
|
|
34665
|
-
--Prompt-gap: var(--size-10) var(--size-16);
|
|
34666
|
-
--Prompt-border-radius: var(--radius-large);
|
|
34667
|
-
}
|
|
34668
|
-
|
|
34669
|
-
.wds-action-prompt--media-image {
|
|
34670
|
-
width: 48px;
|
|
34671
|
-
width: var(--size-48);
|
|
34672
|
-
height: 48px;
|
|
34673
|
-
height: var(--size-48);
|
|
34674
|
-
-o-object-fit: contain;
|
|
34675
|
-
object-fit: contain;
|
|
34676
|
-
}
|
|
34677
|
-
|
|
34678
|
-
@media (max-width: 767px) {
|
|
34679
|
-
.wds-action-prompt--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
|
|
34680
|
-
flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
|
|
34681
|
-
min-width: -moz-fit-content;
|
|
34682
|
-
min-width: fit-content;
|
|
34683
|
-
}
|
|
34684
|
-
}
|
|
34685
|
-
|
|
34686
|
-
.wds-action-prompt__content {
|
|
34687
|
-
max-width: calc(48px * 10);
|
|
34688
|
-
max-width: calc(var(--size-48) * 10);
|
|
34689
|
-
}
|