@transferwise/components 46.115.1 → 46.116.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/alert/Alert.js +2 -1
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +2 -1
- package/build/alert/Alert.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +1 -0
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +1 -0
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/main.css +428 -44
- package/build/mocks.js +7 -0
- package/build/mocks.js.map +1 -1
- package/build/mocks.mjs +7 -1
- package/build/mocks.mjs.map +1 -1
- package/build/sentimentSurface/SentimentSurface.js +43 -0
- package/build/sentimentSurface/SentimentSurface.js.map +1 -0
- package/build/sentimentSurface/SentimentSurface.mjs +39 -0
- package/build/sentimentSurface/SentimentSurface.mjs.map +1 -0
- package/build/sentimentSurface/classMap.js +17 -0
- package/build/sentimentSurface/classMap.js.map +1 -0
- package/build/sentimentSurface/classMap.mjs +14 -0
- package/build/sentimentSurface/classMap.mjs.map +1 -0
- package/build/statusIcon/StatusIcon.js +10 -1
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +10 -1
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/inputs/Input.css +2 -4
- package/build/styles/inputs/TextArea.css +2 -4
- package/build/styles/main.css +428 -44
- package/build/styles/popover/Popover.css +2 -4
- package/build/styles/sentimentSurface/SentimentSurface.css +420 -0
- package/build/styles/statusIcon/StatusIcon.css +4 -36
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts +2 -1
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
- package/build/types/mocks.d.ts +1 -0
- package/build/types/mocks.d.ts.map +1 -1
- package/build/types/sentimentSurface/SentimentSurface.d.ts +30 -0
- package/build/types/sentimentSurface/SentimentSurface.d.ts.map +1 -0
- package/build/types/sentimentSurface/SentimentSurface.types.d.ts +80 -0
- package/build/types/sentimentSurface/SentimentSurface.types.d.ts.map +1 -0
- package/build/types/sentimentSurface/classMap.d.ts +4 -0
- package/build/types/sentimentSurface/classMap.d.ts.map +1 -0
- package/build/types/sentimentSurface/index.d.ts +3 -0
- package/build/types/sentimentSurface/index.d.ts.map +1 -0
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/test-utils/window-mock.d.ts +1 -0
- package/build/types/test-utils/window-mock.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/alert/Alert.tsx +3 -1
- package/src/criticalBanner/CriticalCommsBanner.tsx +3 -2
- package/src/expressiveMoneyInput/ExpressiveMoneyInput.spec.tsx +229 -0
- package/src/expressiveMoneyInput/amountInput/AmountInput.spec.tsx +282 -0
- package/src/expressiveMoneyInput/currencySelector/CurrencySelector.spec.tsx +160 -0
- package/src/inputs/Input.css +2 -4
- package/src/inputs/SelectInput.spec.tsx +7 -1
- package/src/inputs/TextArea.css +2 -4
- package/src/main.css +428 -44
- package/src/main.less +2 -0
- package/src/mocks.ts +7 -0
- package/src/moneyInput/MoneyInput.spec.tsx +9 -1
- package/src/popover/Popover.css +2 -4
- package/src/provider/theme/ThemeProvider.story.tsx +78 -11
- package/src/sentimentSurface/SentimentSurface.css +420 -0
- package/src/sentimentSurface/SentimentSurface.docs.mdx +549 -0
- package/src/sentimentSurface/SentimentSurface.less +293 -0
- package/src/sentimentSurface/SentimentSurface.spec.tsx +140 -0
- package/src/sentimentSurface/SentimentSurface.story.tsx +303 -0
- package/src/sentimentSurface/SentimentSurface.tests.story.tsx +72 -0
- package/src/sentimentSurface/SentimentSurface.tsx +72 -0
- package/src/sentimentSurface/SentimentSurface.types.ts +104 -0
- package/src/sentimentSurface/classMap.ts +15 -0
- package/src/sentimentSurface/index.ts +8 -0
- package/src/statusIcon/StatusIcon.css +4 -36
- package/src/statusIcon/StatusIcon.less +3 -41
- package/src/statusIcon/StatusIcon.tsx +14 -1
- package/src/test-utils/jest.setup.ts +0 -5
- package/src/test-utils/window-mock.ts +5 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SentimentSurface.mjs","sources":["../../src/sentimentSurface/SentimentSurface.tsx"],"sourcesContent":["import { forwardRef, ElementType, ForwardedRef } from 'react';\nimport { clsx } from 'clsx';\n\nimport {\n SentimentSurfaceComponentProps,\n SentimentSurfaceComponent,\n} from './SentimentSurface.types';\nimport { getSentimentSurfaceClassName } from './classMap';\n\n/**\n * SentimentSurface is a polymorphic container component that applies contextual background colours\n * and text styling based on sentiment types (negative, warning, neutral, success, proposition).\n * It's designed to visually communicate the nature or importance of its content through colour.\n *\n * @param {ElementType} [as='div'] - Optional prop to override the HTML element rendered.\n * @param {Sentiment} sentiment - Required prop to set the sentiment type (negative, warning, neutral, success, proposition).\n * @param {Emphasis} [emphasis='base'] - Optional prop to specify the emphasis level (base or elevated).\n * @param {ReactNode} [children] - Content to render inside the surface.\n * @param {string} [className] - Additional CSS classes to apply.\n * @param {CSSProperties} [style] - Inline styles to apply.\n * @param {string} [id] - Unique identifier for the component.\n * @param {string} [testId] - A unique string that appears as data attribute `data-testid` in the rendered code.\n *\n * @component\n * @example\n * ```tsx\n * // Basic usage with negative sentiment\n * <SentimentSurface sentiment=\"negative\">\n * Your payment has failed\n * </SentimentSurface>\n * ```\n *\n * @see {@link SentimentSurface} for further information.\n * @see {@link https://storybook.wise.design/?path=/docs/sentiment-surface--docs|Storybook Wise Design}\n */\n// @ts-expect-error - Generic forwardRef limitation. See: https://fettblog.eu/typescript-react-generic-forward-refs/\nconst SentimentSurface: SentimentSurfaceComponent = forwardRef(function SentimentSurface<\n T extends ElementType = 'div',\n>(\n {\n as,\n sentiment,\n emphasis = 'base',\n className,\n style,\n children,\n id,\n testId,\n ...props\n }: SentimentSurfaceComponentProps<T>,\n ref: ForwardedRef<HTMLElement>,\n) {\n const Element = as ?? 'div';\n const classNames = clsx(getSentimentSurfaceClassName(sentiment, emphasis), className);\n const sentimentProps = {\n ref,\n id,\n 'data-testid': testId,\n className: classNames,\n style,\n ...props,\n };\n\n return (\n // @ts-expect-error - Generic forwardRef limitation. See: https://fettblog.eu/typescript-react-generic-forward-refs/\n <Element {...sentimentProps}>{children}</Element>\n );\n});\n\nSentimentSurface.displayName = 'SentimentSurface';\n\nexport default SentimentSurface;\n"],"names":["SentimentSurface","forwardRef","as","sentiment","emphasis","className","style","children","id","testId","props","ref","Element","classNames","clsx","getSentimentSurfaceClassName","sentimentProps","_jsx","displayName"],"mappings":";;;;;AAoCA,MAAMA,gBAAgB,gBAA8BC,UAAU,CAAC,SAASD,gBAAgBA,CAGtF;EACEE,EAAE;EACFC,SAAS;AACTC,EAAAA,QAAQ,GAAG,MAAM;EACjBC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC,EAAE;EACFC,MAAM;EACN,GAAGC;AAAK,CAC0B,EACpCC,GAA8B,EAAA;AAE9B,EAAA,MAAMC,OAAO,GAAGV,EAAE,IAAI,KAAK;AAC3B,EAAA,MAAMW,UAAU,GAAGC,IAAI,CAACC,4BAA4B,CAACZ,SAAS,EAAEC,QAAQ,CAAC,EAAEC,SAAS,CAAC;AACrF,EAAA,MAAMW,cAAc,GAAG;IACrBL,GAAG;IACHH,EAAE;AACF,IAAA,aAAa,EAAEC,MAAM;AACrBJ,IAAAA,SAAS,EAAEQ,UAAU;IACrBP,KAAK;IACL,GAAGI;GACJ;AAED,EAAA;AAAA;AACE;AACAO,IAAAA,GAAA,CAACL,OAAO,EAAA;AAAA,MAAA,GAAKI,cAAc;AAAAT,MAAAA,QAAA,EAAGA;KAAkB;AAAC;AAErD,CAAC;AAEDP,gBAAgB,CAACkB,WAAW,GAAG,kBAAkB;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const BASE_CLASS = 'wds-sentiment-surface';
|
|
4
|
+
const sentimentClassMap = {
|
|
5
|
+
negative: `${BASE_CLASS}-negative`,
|
|
6
|
+
warning: `${BASE_CLASS}-warning`,
|
|
7
|
+
neutral: `${BASE_CLASS}-neutral`,
|
|
8
|
+
success: `${BASE_CLASS}-success`,
|
|
9
|
+
proposition: `${BASE_CLASS}-proposition`
|
|
10
|
+
};
|
|
11
|
+
const getSentimentSurfaceClassName = (sentiment, emphasis) => {
|
|
12
|
+
return `${BASE_CLASS} ${sentimentClassMap[sentiment]}-${emphasis}`;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.getSentimentSurfaceClassName = getSentimentSurfaceClassName;
|
|
16
|
+
exports.sentimentClassMap = sentimentClassMap;
|
|
17
|
+
//# sourceMappingURL=classMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classMap.js","sources":["../../src/sentimentSurface/classMap.ts"],"sourcesContent":["import type { Sentiment, Emphasis } from './SentimentSurface.types';\n\nconst BASE_CLASS = 'wds-sentiment-surface';\n\nexport const sentimentClassMap: Record<Sentiment, string> = {\n negative: `${BASE_CLASS}-negative`,\n warning: `${BASE_CLASS}-warning`,\n neutral: `${BASE_CLASS}-neutral`,\n success: `${BASE_CLASS}-success`,\n proposition: `${BASE_CLASS}-proposition`,\n};\n\nexport const getSentimentSurfaceClassName = (sentiment: Sentiment, emphasis: Emphasis): string => {\n return `${BASE_CLASS} ${sentimentClassMap[sentiment]}-${emphasis}`;\n};\n"],"names":["BASE_CLASS","sentimentClassMap","negative","warning","neutral","success","proposition","getSentimentSurfaceClassName","sentiment","emphasis"],"mappings":";;AAEA,MAAMA,UAAU,GAAG,uBAAuB;AAEnC,MAAMC,iBAAiB,GAA8B;EAC1DC,QAAQ,EAAE,CAAA,EAAGF,UAAU,CAAA,SAAA,CAAW;EAClCG,OAAO,EAAE,CAAA,EAAGH,UAAU,CAAA,QAAA,CAAU;EAChCI,OAAO,EAAE,CAAA,EAAGJ,UAAU,CAAA,QAAA,CAAU;EAChCK,OAAO,EAAE,CAAA,EAAGL,UAAU,CAAA,QAAA,CAAU;EAChCM,WAAW,EAAE,GAAGN,UAAU,CAAA,YAAA;;MAGfO,4BAA4B,GAAGA,CAACC,SAAoB,EAAEC,QAAkB,KAAY;EAC/F,OAAO,CAAA,EAAGT,UAAU,CAAA,CAAA,EAAIC,iBAAiB,CAACO,SAAS,CAAC,CAAA,CAAA,EAAIC,QAAQ,CAAA,CAAE;AACpE;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const BASE_CLASS = 'wds-sentiment-surface';
|
|
2
|
+
const sentimentClassMap = {
|
|
3
|
+
negative: `${BASE_CLASS}-negative`,
|
|
4
|
+
warning: `${BASE_CLASS}-warning`,
|
|
5
|
+
neutral: `${BASE_CLASS}-neutral`,
|
|
6
|
+
success: `${BASE_CLASS}-success`,
|
|
7
|
+
proposition: `${BASE_CLASS}-proposition`
|
|
8
|
+
};
|
|
9
|
+
const getSentimentSurfaceClassName = (sentiment, emphasis) => {
|
|
10
|
+
return `${BASE_CLASS} ${sentimentClassMap[sentiment]}-${emphasis}`;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { getSentimentSurfaceClassName, sentimentClassMap };
|
|
14
|
+
//# sourceMappingURL=classMap.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classMap.mjs","sources":["../../src/sentimentSurface/classMap.ts"],"sourcesContent":["import type { Sentiment, Emphasis } from './SentimentSurface.types';\n\nconst BASE_CLASS = 'wds-sentiment-surface';\n\nexport const sentimentClassMap: Record<Sentiment, string> = {\n negative: `${BASE_CLASS}-negative`,\n warning: `${BASE_CLASS}-warning`,\n neutral: `${BASE_CLASS}-neutral`,\n success: `${BASE_CLASS}-success`,\n proposition: `${BASE_CLASS}-proposition`,\n};\n\nexport const getSentimentSurfaceClassName = (sentiment: Sentiment, emphasis: Emphasis): string => {\n return `${BASE_CLASS} ${sentimentClassMap[sentiment]}-${emphasis}`;\n};\n"],"names":["BASE_CLASS","sentimentClassMap","negative","warning","neutral","success","proposition","getSentimentSurfaceClassName","sentiment","emphasis"],"mappings":"AAEA,MAAMA,UAAU,GAAG,uBAAuB;AAEnC,MAAMC,iBAAiB,GAA8B;EAC1DC,QAAQ,EAAE,CAAA,EAAGF,UAAU,CAAA,SAAA,CAAW;EAClCG,OAAO,EAAE,CAAA,EAAGH,UAAU,CAAA,QAAA,CAAU;EAChCI,OAAO,EAAE,CAAA,EAAGJ,UAAU,CAAA,QAAA,CAAU;EAChCK,OAAO,EAAE,CAAA,EAAGL,UAAU,CAAA,QAAA,CAAU;EAChCM,WAAW,EAAE,GAAGN,UAAU,CAAA,YAAA;;MAGfO,4BAA4B,GAAGA,CAACC,SAAoB,EAAEC,QAAkB,KAAY;EAC/F,OAAO,CAAA,EAAGT,UAAU,CAAA,CAAA,EAAIC,iBAAiB,CAACO,SAAS,CAAC,CAAA,CAAA,EAAIC,QAAQ,CAAA,CAAE;AACpE;;;;"}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var icons = require('@transferwise/icons');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var reactIntl = require('react-intl');
|
|
8
|
+
var SentimentSurface = require('../sentimentSurface/SentimentSurface.js');
|
|
8
9
|
require('../common/theme.js');
|
|
9
10
|
require('../common/direction.js');
|
|
10
11
|
require('../common/propsValues/control.js');
|
|
@@ -84,8 +85,16 @@ const StatusIcon = ({
|
|
|
84
85
|
const iconColor = sentiment$1 === 'warning' || sentiment$1 === 'pending' ? 'dark' : 'light';
|
|
85
86
|
const isTinyViewport = useMedia.useMedia(`(max-width: ${breakpoint.Breakpoint.ZOOM_400}px)`);
|
|
86
87
|
const size = mapLegacySize[sizeProp] ?? sizeProp;
|
|
88
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
89
|
+
const SentimentSurfaceSetting = props => /*#__PURE__*/jsxRuntime.jsx(SentimentSurface.default, {
|
|
90
|
+
as: "span"
|
|
91
|
+
// @ts-expect-error sentiment and SentimentSurface types mismatch
|
|
92
|
+
,
|
|
93
|
+
sentiment: sentiment$1 === 'positive' ? 'success' : sentiment$1 === 'pending' ? 'warning' : sentiment$1,
|
|
94
|
+
...props
|
|
95
|
+
});
|
|
87
96
|
return /*#__PURE__*/jsxRuntime.jsx(Circle.default, {
|
|
88
|
-
as:
|
|
97
|
+
as: SentimentSurfaceSetting,
|
|
89
98
|
size: isTinyViewport && size < 40 ? 32 : size,
|
|
90
99
|
"data-testid": "status-icon",
|
|
91
100
|
className: clsx.clsx('status-circle', sentiment$1),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.js","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint, Status } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconSentiment = Sentiment | Status.PENDING;\n\nexport type StatusIconProps = {\n sentiment?: `${StatusIconSentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n /**\n * Override for the sentiment's-derived, default, accessible\n * name announced by the screen readers. <br />\n * Using `null` will render the icon purely presentational.\n * */\n iconLabel?: string | null;\n};\n\nconst mapLegacySize = {\n [String(Size.SMALL)]: 16,\n [String(Size.MEDIUM)]: 40,\n [String(Size.LARGE)]: 48,\n} satisfies Record<string, CircleProps['size']>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: StatusIconProps) => {\n const intl = useIntl();\n\n const iconMetaBySentiment: Record<\n `${Sentiment}` | Status.PENDING,\n {\n Icon: React.ElementType;\n defaultIconLabel: string;\n }\n > = {\n [Sentiment.NEGATIVE]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.POSITIVE]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n [Sentiment.WARNING]: {\n Icon: Alert,\n defaultIconLabel: intl.formatMessage(messages.warningLabel),\n },\n [Status.PENDING]: {\n Icon: ClockBorderless,\n defaultIconLabel: intl.formatMessage(messages.pendingLabel),\n },\n [Sentiment.NEUTRAL]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n // deprecated\n [Sentiment.ERROR]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.INFO]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n [Sentiment.SUCCESS]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n };\n const { Icon, defaultIconLabel } = iconMetaBySentiment[sentiment];\n\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n
|
|
1
|
+
{"version":3,"file":"StatusIcon.js","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\nimport { PropsWithChildren } from 'react';\n\nimport SentimentSurface from '../sentimentSurface';\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint, Status } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconSentiment = Sentiment | Status.PENDING;\n\nexport type StatusIconProps = {\n sentiment?: `${StatusIconSentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n /**\n * Override for the sentiment's-derived, default, accessible\n * name announced by the screen readers. <br />\n * Using `null` will render the icon purely presentational.\n * */\n iconLabel?: string | null;\n};\n\nconst mapLegacySize = {\n [String(Size.SMALL)]: 16,\n [String(Size.MEDIUM)]: 40,\n [String(Size.LARGE)]: 48,\n} satisfies Record<string, CircleProps['size']>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: StatusIconProps) => {\n const intl = useIntl();\n\n const iconMetaBySentiment: Record<\n `${Sentiment}` | Status.PENDING,\n {\n Icon: React.ElementType;\n defaultIconLabel: string;\n }\n > = {\n [Sentiment.NEGATIVE]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.POSITIVE]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n [Sentiment.WARNING]: {\n Icon: Alert,\n defaultIconLabel: intl.formatMessage(messages.warningLabel),\n },\n [Status.PENDING]: {\n Icon: ClockBorderless,\n defaultIconLabel: intl.formatMessage(messages.pendingLabel),\n },\n [Sentiment.NEUTRAL]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n // deprecated\n [Sentiment.ERROR]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.INFO]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n [Sentiment.SUCCESS]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n };\n const { Icon, defaultIconLabel } = iconMetaBySentiment[sentiment];\n\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n // eslint-disable-next-line react/no-unstable-nested-components\n const SentimentSurfaceSetting = (props: PropsWithChildren<Pick<CircleProps, 'className'>>) => (\n <SentimentSurface\n as=\"span\"\n // @ts-expect-error sentiment and SentimentSurface types mismatch\n sentiment={\n sentiment === 'positive' ? 'success' : sentiment === 'pending' ? 'warning' : sentiment\n }\n {...props}\n />\n );\n return (\n <Circle\n as={SentimentSurfaceSetting}\n size={isTinyViewport && size < 40 ? 32 : size}\n data-testid=\"status-icon\"\n className={clsx('status-circle', sentiment)}\n >\n <Icon\n className={clsx('status-icon', iconColor)}\n title={iconLabel === null ? undefined : iconLabel || defaultIconLabel}\n />\n </Circle>\n );\n};\n\nexport default StatusIcon;\n"],"names":["mapLegacySize","String","Size","SMALL","MEDIUM","LARGE","StatusIcon","sentiment","size","sizeProp","iconLabel","intl","useIntl","iconMetaBySentiment","Sentiment","NEGATIVE","Icon","Cross","defaultIconLabel","formatMessage","messages","errorLabel","POSITIVE","Check","successLabel","WARNING","Alert","warningLabel","Status","PENDING","ClockBorderless","pendingLabel","NEUTRAL","Info","informationLabel","ERROR","INFO","SUCCESS","iconColor","isTinyViewport","useMedia","Breakpoint","ZOOM_400","SentimentSurfaceSetting","props","_jsx","SentimentSurface","as","Circle","className","clsx","children","title","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAMA,aAAa,GAAG;AACpB,EAAA,CAACC,MAAM,CAACC,SAAI,CAACC,KAAK,CAAC,GAAG,EAAE;AACxB,EAAA,CAACF,MAAM,CAACC,SAAI,CAACE,MAAM,CAAC,GAAG,EAAE;AACzB,EAAA,CAACH,MAAM,CAACC,SAAI,CAACG,KAAK,CAAC,GAAG;CACuB;AAE/C,MAAMC,UAAU,GAAGA,CAAC;AAAEC,aAAAA,WAAS,GAAG,SAAS;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AiB;AAE1E,GAAQ,CAAC;AAEb;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Check, Info, Cross, ClockBorderless, Alert } from '@transferwise/icons';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
+
import SentimentSurface from '../sentimentSurface/SentimentSurface.mjs';
|
|
4
5
|
import '../common/theme.mjs';
|
|
5
6
|
import '../common/direction.mjs';
|
|
6
7
|
import '../common/propsValues/control.mjs';
|
|
@@ -80,8 +81,16 @@ const StatusIcon = ({
|
|
|
80
81
|
const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
|
|
81
82
|
const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
|
|
82
83
|
const size = mapLegacySize[sizeProp] ?? sizeProp;
|
|
84
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
85
|
+
const SentimentSurfaceSetting = props => /*#__PURE__*/jsx(SentimentSurface, {
|
|
86
|
+
as: "span"
|
|
87
|
+
// @ts-expect-error sentiment and SentimentSurface types mismatch
|
|
88
|
+
,
|
|
89
|
+
sentiment: sentiment === 'positive' ? 'success' : sentiment === 'pending' ? 'warning' : sentiment,
|
|
90
|
+
...props
|
|
91
|
+
});
|
|
83
92
|
return /*#__PURE__*/jsx(Circle, {
|
|
84
|
-
as:
|
|
93
|
+
as: SentimentSurfaceSetting,
|
|
85
94
|
size: isTinyViewport && size < 40 ? 32 : size,
|
|
86
95
|
"data-testid": "status-icon",
|
|
87
96
|
className: clsx('status-circle', sentiment),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.mjs","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint, Status } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconSentiment = Sentiment | Status.PENDING;\n\nexport type StatusIconProps = {\n sentiment?: `${StatusIconSentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n /**\n * Override for the sentiment's-derived, default, accessible\n * name announced by the screen readers. <br />\n * Using `null` will render the icon purely presentational.\n * */\n iconLabel?: string | null;\n};\n\nconst mapLegacySize = {\n [String(Size.SMALL)]: 16,\n [String(Size.MEDIUM)]: 40,\n [String(Size.LARGE)]: 48,\n} satisfies Record<string, CircleProps['size']>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: StatusIconProps) => {\n const intl = useIntl();\n\n const iconMetaBySentiment: Record<\n `${Sentiment}` | Status.PENDING,\n {\n Icon: React.ElementType;\n defaultIconLabel: string;\n }\n > = {\n [Sentiment.NEGATIVE]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.POSITIVE]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n [Sentiment.WARNING]: {\n Icon: Alert,\n defaultIconLabel: intl.formatMessage(messages.warningLabel),\n },\n [Status.PENDING]: {\n Icon: ClockBorderless,\n defaultIconLabel: intl.formatMessage(messages.pendingLabel),\n },\n [Sentiment.NEUTRAL]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n // deprecated\n [Sentiment.ERROR]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.INFO]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n [Sentiment.SUCCESS]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n };\n const { Icon, defaultIconLabel } = iconMetaBySentiment[sentiment];\n\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n
|
|
1
|
+
{"version":3,"file":"StatusIcon.mjs","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\nimport { PropsWithChildren } from 'react';\n\nimport SentimentSurface from '../sentimentSurface';\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint, Status } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconSentiment = Sentiment | Status.PENDING;\n\nexport type StatusIconProps = {\n sentiment?: `${StatusIconSentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n /**\n * Override for the sentiment's-derived, default, accessible\n * name announced by the screen readers. <br />\n * Using `null` will render the icon purely presentational.\n * */\n iconLabel?: string | null;\n};\n\nconst mapLegacySize = {\n [String(Size.SMALL)]: 16,\n [String(Size.MEDIUM)]: 40,\n [String(Size.LARGE)]: 48,\n} satisfies Record<string, CircleProps['size']>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: StatusIconProps) => {\n const intl = useIntl();\n\n const iconMetaBySentiment: Record<\n `${Sentiment}` | Status.PENDING,\n {\n Icon: React.ElementType;\n defaultIconLabel: string;\n }\n > = {\n [Sentiment.NEGATIVE]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.POSITIVE]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n [Sentiment.WARNING]: {\n Icon: Alert,\n defaultIconLabel: intl.formatMessage(messages.warningLabel),\n },\n [Status.PENDING]: {\n Icon: ClockBorderless,\n defaultIconLabel: intl.formatMessage(messages.pendingLabel),\n },\n [Sentiment.NEUTRAL]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n // deprecated\n [Sentiment.ERROR]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.INFO]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n [Sentiment.SUCCESS]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n };\n const { Icon, defaultIconLabel } = iconMetaBySentiment[sentiment];\n\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n // eslint-disable-next-line react/no-unstable-nested-components\n const SentimentSurfaceSetting = (props: PropsWithChildren<Pick<CircleProps, 'className'>>) => (\n <SentimentSurface\n as=\"span\"\n // @ts-expect-error sentiment and SentimentSurface types mismatch\n sentiment={\n sentiment === 'positive' ? 'success' : sentiment === 'pending' ? 'warning' : sentiment\n }\n {...props}\n />\n );\n return (\n <Circle\n as={SentimentSurfaceSetting}\n size={isTinyViewport && size < 40 ? 32 : size}\n data-testid=\"status-icon\"\n className={clsx('status-circle', sentiment)}\n >\n <Icon\n className={clsx('status-icon', iconColor)}\n title={iconLabel === null ? undefined : iconLabel || defaultIconLabel}\n />\n </Circle>\n );\n};\n\nexport default StatusIcon;\n"],"names":["mapLegacySize","String","Size","SMALL","MEDIUM","LARGE","StatusIcon","sentiment","size","sizeProp","iconLabel","intl","useIntl","iconMetaBySentiment","Sentiment","NEGATIVE","Icon","Cross","defaultIconLabel","formatMessage","messages","errorLabel","POSITIVE","Check","successLabel","WARNING","Alert","warningLabel","Status","PENDING","ClockBorderless","pendingLabel","NEUTRAL","Info","informationLabel","ERROR","INFO","SUCCESS","iconColor","isTinyViewport","useMedia","Breakpoint","ZOOM_400","SentimentSurfaceSetting","props","_jsx","SentimentSurface","as","Circle","className","clsx","children","title","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAMA,aAAa,GAAG;AACpB,EAAA,CAACC,MAAM,CAACC,IAAI,CAACC,KAAK,CAAC,GAAG,EAAE;AACxB,EAAA,CAACF,MAAM,CAACC,IAAI,CAACE,MAAM,CAAC,GAAG,EAAE;AACzB,EAAA,CAACH,MAAM,CAACC,IAAI,CAACG,KAAK,CAAC,GAAG;CACuB;AAE/C,MAAMC,UAAU,GAAGA,CAAC;AAAEC,EAAAA,SAAS,GAAG,SAAS;EAAEC,IAAI,EAAEC,QAAQ,GAAG,EAAE;AAAEC,EAAAA;AAAS,CAAmB,KAAI;AAChG,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;AAEtB,EAAA,MAAMC,mBAAmB,GAMrB;IACF,CAACC,SAAS,CAACC,QAAQ,GAAG;AACpBC,MAAAA,IAAI,EAAEC,KAAK;AACXC,MAAAA,gBAAgB,EAAEP,IAAI,CAACQ,aAAa,CAACC,QAAQ,CAACC,UAAU;KACzD;IACD,CAACP,SAAS,CAACQ,QAAQ,GAAG;AACpBN,MAAAA,IAAI,EAAEO,KAAK;AACXL,MAAAA,gBAAgB,EAAEP,IAAI,CAACQ,aAAa,CAACC,QAAQ,CAACI,YAAY;KAC3D;IACD,CAACV,SAAS,CAACW,OAAO,GAAG;AACnBT,MAAAA,IAAI,EAAEU,KAAK;AACXR,MAAAA,gBAAgB,EAAEP,IAAI,CAACQ,aAAa,CAACC,QAAQ,CAACO,YAAY;KAC3D;IACD,CAACC,MAAM,CAACC,OAAO,GAAG;AAChBb,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,SAAS,KAAK,UAAU,GAAG,SAAS,GAAGA,SAAS,KAAK,SAAS,GAAG,SAAS,GAAGA,SAC9E;IAAA,GACGqC;AAAK,GAAC,CAEb;EACD,oBACEC,GAAA,CAACG,MAAM,EAAA;AACLD,IAAAA,EAAE,EAAEJ,uBAAwB;IAC5BnC,IAAI,EAAE+B,cAAc,IAAI/B,IAAI,GAAG,EAAE,GAAG,EAAE,GAAGA,IAAK;AAC9C,IAAA,aAAA,EAAY,aAAa;AACzByC,IAAAA,SAAS,EAAEC,IAAI,CAAC,eAAe,EAAE3C,SAAS,CAAE;IAAA4C,QAAA,eAE5CN,GAAA,CAAC7B,IAAI,EAAA;AACHiC,MAAAA,SAAS,EAAEC,IAAI,CAAC,aAAa,EAAEZ,SAAS,CAAE;MAC1Cc,KAAK,EAAE1C,SAAS,KAAK,IAAI,GAAG2C,SAAS,GAAG3C,SAAS,IAAIQ;KAAiB;AAE1E,GAAQ,CAAC;AAEb;;;;"}
|
|
@@ -108,8 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
@supports (hyphenate-limit-chars: 1) {
|
|
110
110
|
.np-form-control--size-lg {
|
|
111
|
-
|
|
112
|
-
hyphens: auto;
|
|
111
|
+
hyphens: auto;
|
|
113
112
|
hyphenate-limit-chars: 7 3;
|
|
114
113
|
}
|
|
115
114
|
@media (min-width: 768px) {
|
|
@@ -125,8 +124,7 @@
|
|
|
125
124
|
}
|
|
126
125
|
@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
127
126
|
.np-form-control--size-lg {
|
|
128
|
-
|
|
129
|
-
hyphens: auto;
|
|
127
|
+
hyphens: auto;
|
|
130
128
|
-webkit-hyphenate-limit-before: 3;
|
|
131
129
|
-webkit-hyphenate-limit-after: 3;
|
|
132
130
|
}
|
|
@@ -108,8 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
@supports (hyphenate-limit-chars: 1) {
|
|
110
110
|
.np-form-control--size-lg {
|
|
111
|
-
|
|
112
|
-
hyphens: auto;
|
|
111
|
+
hyphens: auto;
|
|
113
112
|
hyphenate-limit-chars: 7 3;
|
|
114
113
|
}
|
|
115
114
|
@media (min-width: 768px) {
|
|
@@ -125,8 +124,7 @@
|
|
|
125
124
|
}
|
|
126
125
|
@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
127
126
|
.np-form-control--size-lg {
|
|
128
|
-
|
|
129
|
-
hyphens: auto;
|
|
127
|
+
hyphens: auto;
|
|
130
128
|
-webkit-hyphenate-limit-before: 3;
|
|
131
129
|
-webkit-hyphenate-limit-after: 3;
|
|
132
130
|
}
|