@transferwise/components 46.136.0 → 46.137.0
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/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/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 -58
- 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/logo/Logo.css +3 -23
- package/build/styles/main.css +225 -58
- 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/table/Table.js +6 -5
- package/build/table/Table.js.map +1 -1
- package/build/table/Table.mjs +6 -5
- package/build/table/Table.mjs.map +1 -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/table/Table.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 +7 -7
- package/src/common/bottomSheet/BottomSheet.test.story.tsx +6 -5
- 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/en.json +2 -0
- package/src/icons/Icons.story.tsx +43 -35
- 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 -58
- 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/sentimentSurface/SentimentSurface.story.tsx +43 -17
- package/src/table/Table.story.tsx +1 -1
- package/src/table/Table.tsx +6 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Expander.d.ts","sourceRoot":"","sources":["../../../../../src/prompt/common/Expander/Expander.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,WAAW,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C,CAAC;AAGF,wBAAgB,gBAAgB,CAAC,eAAe,UAAO,GAAG,aAAa,CAYtE;AAGD,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,UAAU,EACV,UAAkB,GACnB,EAAE;IACD,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,OAAO,CAMV;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAGF,eAAO,MAAM,cAAc,GAAI,iEAM5B,mBAAmB,gCAsBrB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
expandAriaLabel: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
collapseAriaLabel: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=Expander.messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Expander.messages.d.ts","sourceRoot":"","sources":["../../../../../src/prompt/common/Expander/Expander.messages.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,wBAWG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AvatarViewProps } from '../../avatarView';
|
|
3
|
+
import { BadgeAssetsProps } from '../../badge';
|
|
4
|
+
import { PrimitivePromptProps } from '../PrimitivePrompt';
|
|
5
|
+
export type PromptMedia = {
|
|
6
|
+
imgSrc?: string;
|
|
7
|
+
avatar?: Pick<AvatarViewProps, 'imgSrc' | 'profileName' | 'profileType'> & {
|
|
8
|
+
asset?: AvatarViewProps['children'];
|
|
9
|
+
badge?: Pick<BadgeAssetsProps, 'flagCode'>;
|
|
10
|
+
};
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
'aria-hidden'?: boolean;
|
|
13
|
+
};
|
|
14
|
+
type RenderPromptMediaOptions = {
|
|
15
|
+
media: PromptMedia;
|
|
16
|
+
sentiment: PrimitivePromptProps['sentiment'];
|
|
17
|
+
mediaId: string;
|
|
18
|
+
imgClassName: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function renderPromptMedia({ media, sentiment, mediaId, imgClassName, }: RenderPromptMediaOptions): ReactNode;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=promptMedia.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptMedia.d.ts","sourceRoot":"","sources":["../../../../src/prompt/helpers/promptMedia.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,aAAa,GAAG,aAAa,CAAC,GAAG;QACzE,KAAK,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;QACpC,KAAK,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;KAC5C,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,SAAS,EACT,OAAO,EACP,YAAY,GACb,EAAE,wBAAwB,GAAG,SAAS,CA+CtC"}
|
|
@@ -4,4 +4,6 @@ export type { ActionPromptProps } from './ActionPrompt';
|
|
|
4
4
|
export { ActionPrompt } from './ActionPrompt';
|
|
5
5
|
export type { InfoPromptProps, InfoPromptAction, InfoPromptMedia } from './InfoPrompt';
|
|
6
6
|
export { InfoPrompt } from './InfoPrompt';
|
|
7
|
+
export type { CriticalBannerProps } from './CriticalBanner';
|
|
8
|
+
export { CriticalBanner } from './CriticalBanner';
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/prompt/index.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/prompt/index.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/table/Table.tsx"],"names":[],"mappings":"AAEA,OAAoB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAiB,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAW3E,MAAM,WAAW,UAAU;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE;QACJ,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;QAC5B,IAAI,CAAC,EAAE,YAAY,EAAE,GAAG,qBAAqB,EAAE,CAAC;QAChD,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,GAAG,qBAAqB,KAAK,IAAI,CAAC;KACtE,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE;YACP,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CAAC;CACH;AAED,QAAA,MAAM,KAAK,GAAI,oFAOZ,UAAU,
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/table/Table.tsx"],"names":[],"mappings":"AAEA,OAAoB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAiB,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAW3E,MAAM,WAAW,UAAU;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE;QACJ,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;QAC5B,IAAI,CAAC,EAAE,YAAY,EAAE,GAAG,qBAAqB,EAAE,CAAC;QAChD,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,GAAG,qBAAqB,KAAK,IAAI,CAAC;KACtE,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE;YACP,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CAAC;CACH;AAED,QAAA,MAAM,KAAK,GAAI,oFAOZ,UAAU,gCA6HZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -26,6 +26,8 @@ declare function customRender(ui: ReactElement, { locale, messages, ...renderOpt
|
|
|
26
26
|
"neptune.DateLookup.selected": string;
|
|
27
27
|
"neptune.DateLookup.twentyYears": string;
|
|
28
28
|
"neptune.DateLookup.year": string;
|
|
29
|
+
"neptune.Expander.collapseAriaLabel": string;
|
|
30
|
+
"neptune.Expander.expandAriaLabel": string;
|
|
29
31
|
"neptune.ExpressiveMoneyInput.currency.search.placeholder": string;
|
|
30
32
|
"neptune.ExpressiveMoneyInput.currency.select.currency": string;
|
|
31
33
|
"neptune.FlowNavigation.back": string;
|
|
@@ -111,6 +113,8 @@ declare function customRenderHook(callback: () => unknown, { locale, messages }?
|
|
|
111
113
|
"neptune.DateLookup.selected": string;
|
|
112
114
|
"neptune.DateLookup.twentyYears": string;
|
|
113
115
|
"neptune.DateLookup.year": string;
|
|
116
|
+
"neptune.Expander.collapseAriaLabel": string;
|
|
117
|
+
"neptune.Expander.expandAriaLabel": string;
|
|
114
118
|
"neptune.ExpressiveMoneyInput.currency.search.placeholder": string;
|
|
115
119
|
"neptune.ExpressiveMoneyInput.currency.select.currency": string;
|
|
116
120
|
"neptune.FlowNavigation.back": string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test-utils/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAM,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAc,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAMxD;;;;GAIG;AACH,iBAAS,YAAY,CACnB,EAAE,EAAE,YAAY,EAChB,EAAE,MAAuB,EAAE,QAAa,EAAE,GAAG,aAAa,EAAE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test-utils/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAM,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAc,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAMxD;;;;GAIG;AACH,iBAAS,YAAY,CACnB,EAAE,EAAE,YAAY,EAChB,EAAE,MAAuB,EAAE,QAAa,EAAE,GAAG,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAK,GAChE,UAAU,CAAC,OAAO,MAAM,CAAC,CAK3B;AAED;;;GAGG;AACH,iBAAS,gBAAgB,CACvB,QAAQ,EAAE,MAAM,OAAO,EACvB,EAAE,MAAuB,EAAE,QAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAK,uEAKhD;AAED,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,gBAAgB,IAAI,UAAU,EAAE,SAAS,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.137.0",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@babel/preset-env": "^7.29.2",
|
|
44
44
|
"@babel/preset-react": "^7.28.5",
|
|
45
45
|
"@babel/preset-typescript": "^7.28.5",
|
|
46
|
-
"@formatjs/cli": "^6.14.
|
|
46
|
+
"@formatjs/cli": "^6.14.3",
|
|
47
47
|
"@rollup/plugin-babel": "^6.1.0",
|
|
48
48
|
"@rollup/plugin-json": "^6.1.0",
|
|
49
49
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
"jsdom-testing-mocks": "^1.16.0",
|
|
82
82
|
"lodash.times": "^4.3.2",
|
|
83
83
|
"react-intl": "^7.1.14",
|
|
84
|
-
"rollup": "^4.60.
|
|
84
|
+
"rollup": "^4.60.2",
|
|
85
85
|
"rollup-preserve-directives": "^1.1.3",
|
|
86
86
|
"storybook": "^10.3.5",
|
|
87
87
|
"storybook-addon-tag-badges": "^3.1.0",
|
|
88
88
|
"storybook-addon-test-codegen": "^3.0.1",
|
|
89
|
-
"@transferwise/neptune-css": "14.27.1",
|
|
90
89
|
"@transferwise/less-config": "3.1.2",
|
|
90
|
+
"@transferwise/neptune-css": "14.27.1",
|
|
91
91
|
"@wise/components-theming": "1.10.1",
|
|
92
92
|
"@wise/wds-configs": "0.0.0"
|
|
93
93
|
},
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
"@babel/runtime": "^7.29.2",
|
|
105
105
|
"@floating-ui/react": "^0.27.19",
|
|
106
106
|
"@headlessui/react": "^2.2.10",
|
|
107
|
-
"@react-aria/focus": "^3.
|
|
108
|
-
"@react-aria/overlays": "^3.
|
|
109
|
-
"@transferwise/formatting": "^2.14.
|
|
107
|
+
"@react-aria/focus": "^3.22.0",
|
|
108
|
+
"@react-aria/overlays": "^3.32.0",
|
|
109
|
+
"@transferwise/formatting": "^2.14.1",
|
|
110
110
|
"@transferwise/neptune-tokens": "^8.21.0",
|
|
111
111
|
"@transferwise/neptune-validation": "^3.3.3",
|
|
112
112
|
"clsx": "^2.1.1",
|
|
@@ -5,7 +5,7 @@ import { fireEvent, within } from 'storybook/test';
|
|
|
5
5
|
import { FastFlag } from '@transferwise/icons';
|
|
6
6
|
import { lorem10, lorem100, lorem500 } from '../../test-utils';
|
|
7
7
|
import { Typography } from '../propsValues/typography';
|
|
8
|
-
import
|
|
8
|
+
import { InfoPrompt } from '../../prompt/InfoPrompt';
|
|
9
9
|
import Body from '../../body';
|
|
10
10
|
import Button from '../../button';
|
|
11
11
|
import Title from '../../title';
|
|
@@ -45,10 +45,11 @@ export const SmoothScrollReset: Story = {
|
|
|
45
45
|
children: (
|
|
46
46
|
<>
|
|
47
47
|
<Title type={Typography.TITLE_SECTION}>Observe the document</Title>
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
<InfoPrompt
|
|
49
|
+
className="m-t-2"
|
|
50
|
+
sentiment="warning"
|
|
51
|
+
description="Once the BottomSheet opens, the document underneath should be static and should not scroll."
|
|
52
|
+
/>
|
|
52
53
|
<Body as="p">{lorem100}</Body>
|
|
53
54
|
<Body as="p">{lorem100}</Body>
|
|
54
55
|
</>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import React, { act } from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
|
|
4
|
+
import { mockResizeObserver } from '../../test-utils/window-mock';
|
|
5
|
+
|
|
6
|
+
import { useContainerSize } from './useContainerSize';
|
|
7
|
+
|
|
8
|
+
mockResizeObserver();
|
|
9
|
+
|
|
10
|
+
describe('useContainerSize', () => {
|
|
11
|
+
let resizeObserverCallback: ResizeObserverCallback | null = null;
|
|
12
|
+
const OriginalResizeObserver = global.ResizeObserver;
|
|
13
|
+
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
resizeObserverCallback = null;
|
|
16
|
+
|
|
17
|
+
// Capture the ResizeObserver callback for testing
|
|
18
|
+
global.ResizeObserver = jest.fn().mockImplementation((callback: ResizeObserverCallback) => {
|
|
19
|
+
resizeObserverCallback = callback;
|
|
20
|
+
const instance = new OriginalResizeObserver(callback);
|
|
21
|
+
return instance;
|
|
22
|
+
}) as unknown as typeof ResizeObserver;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
afterEach(() => {
|
|
26
|
+
global.ResizeObserver = OriginalResizeObserver;
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// Helper to create a test component
|
|
30
|
+
function TestComponent({
|
|
31
|
+
breakpoint,
|
|
32
|
+
onStateChange,
|
|
33
|
+
}: {
|
|
34
|
+
breakpoint: number;
|
|
35
|
+
onStateChange: (state: boolean) => void;
|
|
36
|
+
}) {
|
|
37
|
+
const [ref, isAboveBreakpoint] = useContainerSize(breakpoint);
|
|
38
|
+
|
|
39
|
+
// Call the callback whenever state changes
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
onStateChange(isAboveBreakpoint);
|
|
42
|
+
}, [isAboveBreakpoint, onStateChange]);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div ref={ref} data-testid="container">
|
|
46
|
+
Test
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Helper to simulate container resize
|
|
52
|
+
function simulateResize(width: number, options?: { noBorderBoxSize?: boolean }) {
|
|
53
|
+
const container = screen.getByTestId('container');
|
|
54
|
+
|
|
55
|
+
act(() => {
|
|
56
|
+
if (resizeObserverCallback) {
|
|
57
|
+
const entry = {
|
|
58
|
+
target: container,
|
|
59
|
+
borderBoxSize: options?.noBorderBoxSize
|
|
60
|
+
? undefined
|
|
61
|
+
: [{ inlineSize: width, blockSize: 100 }],
|
|
62
|
+
contentRect: {
|
|
63
|
+
width,
|
|
64
|
+
height: 100,
|
|
65
|
+
x: 0,
|
|
66
|
+
y: 0,
|
|
67
|
+
top: 0,
|
|
68
|
+
right: width,
|
|
69
|
+
bottom: 100,
|
|
70
|
+
left: 0,
|
|
71
|
+
toJSON: () => ({}),
|
|
72
|
+
},
|
|
73
|
+
contentBoxSize: [{ inlineSize: width, blockSize: 100 }],
|
|
74
|
+
devicePixelContentBoxSize: [{ inlineSize: width, blockSize: 100 }],
|
|
75
|
+
} as ResizeObserverEntry;
|
|
76
|
+
|
|
77
|
+
resizeObserverCallback([entry], {} as ResizeObserver);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
it('returns initial state as false', () => {
|
|
83
|
+
const onStateChange = jest.fn();
|
|
84
|
+
render(<TestComponent breakpoint={480} onStateChange={onStateChange} />);
|
|
85
|
+
|
|
86
|
+
// Initial call with false
|
|
87
|
+
expect(onStateChange).toHaveBeenCalledWith(false);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it('updates to true when container width is above breakpoint', () => {
|
|
91
|
+
const onStateChange = jest.fn();
|
|
92
|
+
render(<TestComponent breakpoint={480} onStateChange={onStateChange} />);
|
|
93
|
+
|
|
94
|
+
simulateResize(600);
|
|
95
|
+
expect(onStateChange).toHaveBeenCalledWith(true);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it('remains false when container width is below breakpoint', () => {
|
|
99
|
+
const onStateChange = jest.fn();
|
|
100
|
+
render(<TestComponent breakpoint={480} onStateChange={onStateChange} />);
|
|
101
|
+
|
|
102
|
+
simulateResize(400);
|
|
103
|
+
expect(onStateChange).toHaveBeenCalledWith(false);
|
|
104
|
+
expect(onStateChange).not.toHaveBeenCalledWith(true);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it('returns true when container width equals breakpoint', () => {
|
|
108
|
+
const onStateChange = jest.fn();
|
|
109
|
+
render(<TestComponent breakpoint={480} onStateChange={onStateChange} />);
|
|
110
|
+
|
|
111
|
+
simulateResize(480);
|
|
112
|
+
expect(onStateChange).toHaveBeenCalledWith(true);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
it('updates state when container crosses breakpoint from below to above', () => {
|
|
116
|
+
const onStateChange = jest.fn();
|
|
117
|
+
render(<TestComponent breakpoint={480} onStateChange={onStateChange} />);
|
|
118
|
+
|
|
119
|
+
simulateResize(400);
|
|
120
|
+
expect(onStateChange).toHaveBeenCalledWith(false);
|
|
121
|
+
|
|
122
|
+
simulateResize(600);
|
|
123
|
+
expect(onStateChange).toHaveBeenCalledWith(true);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useRef, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { useResizeObserver } from './useResizeObserver';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Hook that returns a ref and a boolean indicating if the container
|
|
7
|
+
* has a width >= the specified breakpoint.
|
|
8
|
+
*
|
|
9
|
+
* Useful for synchronizing React state with CSS container queries.
|
|
10
|
+
*
|
|
11
|
+
* Uses content-box measurements to match CSS container query behavior
|
|
12
|
+
* (excludes padding and border).
|
|
13
|
+
*
|
|
14
|
+
* @param breakpoint - Minimum width in pixels
|
|
15
|
+
* @returns [ref, isAboveBreakpoint] tuple
|
|
16
|
+
*/
|
|
17
|
+
export function useContainerSize(breakpoint: number): [React.RefObject<HTMLDivElement>, boolean] {
|
|
18
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
19
|
+
const [isAboveBreakpoint, setIsAboveBreakpoint] = useState(false);
|
|
20
|
+
|
|
21
|
+
useResizeObserver(
|
|
22
|
+
ref,
|
|
23
|
+
(entry) => {
|
|
24
|
+
// Use contentRect.width to match CSS container query box model (content-box)
|
|
25
|
+
const inlineSize = entry.contentRect.width;
|
|
26
|
+
setIsAboveBreakpoint(inlineSize >= breakpoint);
|
|
27
|
+
},
|
|
28
|
+
'content-box',
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
return [ref, isAboveBreakpoint];
|
|
32
|
+
}
|
|
@@ -5,6 +5,7 @@ import { useEffectEvent } from './useEffectEvent';
|
|
|
5
5
|
export function useResizeObserver(
|
|
6
6
|
ref: React.MutableRefObject<Element | null>,
|
|
7
7
|
callback: (entry: ResizeObserverEntry) => void,
|
|
8
|
+
box: ResizeObserverBoxOptions = 'border-box',
|
|
8
9
|
) {
|
|
9
10
|
const handleCallback = useEffectEvent(callback);
|
|
10
11
|
useEffect(() => {
|
|
@@ -12,11 +13,11 @@ export function useResizeObserver(
|
|
|
12
13
|
const resizeObserver = new ResizeObserver(([entry]) => {
|
|
13
14
|
handleCallback(entry);
|
|
14
15
|
});
|
|
15
|
-
resizeObserver.observe(ref.current, { box
|
|
16
|
+
resizeObserver.observe(ref.current, { box });
|
|
16
17
|
return () => {
|
|
17
18
|
resizeObserver.disconnect();
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
return () => {};
|
|
21
|
-
}, [handleCallback, ref]);
|
|
22
|
+
}, [handleCallback, ref, box]);
|
|
22
23
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
import CriticalCommsBanner from '.';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use **`CriticalBanner`** component instead.
|
|
6
|
+
*/
|
|
4
7
|
export default {
|
|
5
8
|
component: CriticalCommsBanner,
|
|
6
9
|
title: 'Prompts/CriticalCommsBanner',
|
|
10
|
+
tags: ['deprecated'],
|
|
7
11
|
} satisfies Meta<typeof CriticalCommsBanner>;
|
|
8
12
|
|
|
9
13
|
type Story = StoryObj<typeof CriticalCommsBanner>;
|
|
@@ -6,7 +6,7 @@ import { withVariantConfig } from '../../.storybook/helpers';
|
|
|
6
6
|
export default {
|
|
7
7
|
component: CriticalCommsBanner,
|
|
8
8
|
title: 'Prompts/CriticalCommsBanner/Tests',
|
|
9
|
-
tags: ['!autodocs'],
|
|
9
|
+
tags: ['!autodocs', 'deprecated'],
|
|
10
10
|
} satisfies Meta<typeof CriticalCommsBanner>;
|
|
11
11
|
|
|
12
12
|
type Story = StoryObj<typeof CriticalCommsBanner>;
|
|
@@ -51,6 +51,9 @@ const iconBySentiment: Record<CriticalCommsBannerSentiment, React.ReactNode> = {
|
|
|
51
51
|
),
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated `CriticalCommsBanner` component is deprecated and now replaced by the `CriticalBanner` component.
|
|
56
|
+
*/
|
|
54
57
|
function CriticalCommsBanner({
|
|
55
58
|
title,
|
|
56
59
|
subtitle,
|
package/src/i18n/en.json
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
"neptune.DateLookup.selected": "selected",
|
|
17
17
|
"neptune.DateLookup.twentyYears": "20 years",
|
|
18
18
|
"neptune.DateLookup.year": "year",
|
|
19
|
+
"neptune.Expander.collapseAriaLabel": "Collapse",
|
|
20
|
+
"neptune.Expander.expandAriaLabel": "Expand",
|
|
19
21
|
"neptune.ExpressiveMoneyInput.currency.search.placeholder": "Type a currency / country",
|
|
20
22
|
"neptune.ExpressiveMoneyInput.currency.select.currency": "Select currency",
|
|
21
23
|
"neptune.FlowNavigation.back": "back to previous step",
|
|
@@ -17,57 +17,65 @@ type IconComponent = React.FunctionComponent<{
|
|
|
17
17
|
title?: string;
|
|
18
18
|
}>;
|
|
19
19
|
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
const OLD_ICON_NAMES_MAP: Record<string, string> = {
|
|
21
|
+
Alert: 'Warning',
|
|
22
|
+
Ach: 'BankTransfer',
|
|
23
|
+
OfficeExpenses: 'Stationery',
|
|
24
|
+
Chat: 'SpeechBubble',
|
|
22
25
|
Holidays: 'Beach',
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
CardTransferwise: 'CardWise',
|
|
26
|
-
SalesAndRoyalties: 'CashRegister',
|
|
26
|
+
Cs: 'Headset',
|
|
27
|
+
Family: 'Heart',
|
|
27
28
|
Settings: 'Cog',
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
Lightning: 'LightningBolt',
|
|
30
|
+
Atm: 'InsertCard',
|
|
31
|
+
SalesAndRoyalties: 'CashRegister',
|
|
32
|
+
Tax: 'PercentageCircle',
|
|
33
|
+
Recipients: 'People',
|
|
34
|
+
Marketing: 'Target',
|
|
35
|
+
DriversLicense: 'Car',
|
|
36
|
+
PinCode: 'Dial',
|
|
37
|
+
Rent: 'Building',
|
|
38
|
+
Unlock: 'PadlockUnlocked',
|
|
39
|
+
Lock: 'Padlock',
|
|
40
|
+
CardNumber: 'CardDetail',
|
|
30
41
|
Invite: 'GiftBox',
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
42
|
+
Dont: 'SadEmoji',
|
|
43
|
+
CardTransferwise: 'CardWise',
|
|
44
|
+
ChipPin: 'Chip',
|
|
45
|
+
Profile: 'Person',
|
|
35
46
|
Home: 'House',
|
|
36
|
-
|
|
37
|
-
Atm: 'InsertCard',
|
|
47
|
+
PendingCircle: 'Clock',
|
|
38
48
|
Activity: 'List',
|
|
49
|
+
ExchangeRate: 'UpwardGraph',
|
|
50
|
+
ContractServices: 'Handshake',
|
|
51
|
+
Travel: 'Suitcase',
|
|
39
52
|
TwoStep: 'MobileLock',
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
EmailAndPhone: 'EmailAndMobile',
|
|
54
|
+
Insights: 'Bulb',
|
|
42
55
|
Salary: 'PayIn',
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
56
|
+
Picture: 'Image',
|
|
57
|
+
ECommerce: 'ShoppingBag',
|
|
58
|
+
Feedback: 'SpeechBubbleMessage',
|
|
59
|
+
Refresh: 'Reload',
|
|
60
|
+
CostOfGoodsSold: 'Boxes',
|
|
46
61
|
Expenses: 'PieChart',
|
|
62
|
+
Pending: 'SpeechBubblePending',
|
|
47
63
|
Help: 'QuestionMark',
|
|
48
64
|
HelpCircle: 'QuestionMarkCircle',
|
|
49
|
-
|
|
50
|
-
Dont: 'SadEmoji',
|
|
51
|
-
ECommerce: 'ShoppingBag',
|
|
52
|
-
Chat: 'SpeechBubble',
|
|
53
|
-
Pending: 'SpeechBubblePending',
|
|
54
|
-
Feedback: 'SpeechBubbleMessage',
|
|
65
|
+
CalendarSuccess: 'CalendarCheck',
|
|
55
66
|
Comments: 'SpeechBubbles',
|
|
56
|
-
OfficeExpenses: 'Stationery',
|
|
57
|
-
Travel: 'Suitcase',
|
|
58
|
-
Marketing: 'Target',
|
|
59
|
-
ExchangeRate: 'UpwardGraph',
|
|
60
67
|
OwnersWithdrawal: 'Withdrawal',
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
Do: 'HappyEmoji',
|
|
69
|
+
Emoji: 'HappyEmoji',
|
|
70
|
+
Balance: 'BarChart',
|
|
71
|
+
Investments: 'BarChart',
|
|
65
72
|
Verified: 'Check',
|
|
73
|
+
FacebookSquare: 'Facebook',
|
|
66
74
|
SoftwareAndWebHosting: 'SoftwareAndHosting',
|
|
67
75
|
};
|
|
68
76
|
|
|
69
77
|
const CANONICAL_TO_ALIASES: Record<string, string[]> = {};
|
|
70
|
-
for (const [alias, canonical] of Object.entries(
|
|
78
|
+
for (const [alias, canonical] of Object.entries(OLD_ICON_NAMES_MAP)) {
|
|
71
79
|
if (!CANONICAL_TO_ALIASES[canonical]) {
|
|
72
80
|
CANONICAL_TO_ALIASES[canonical] = [];
|
|
73
81
|
}
|
|
@@ -82,7 +90,7 @@ type IconEntry = {
|
|
|
82
90
|
};
|
|
83
91
|
|
|
84
92
|
const iconEntries: IconEntry[] = Object.entries(AllIcons as Record<string, IconComponent>)
|
|
85
|
-
.filter(([name]) => !
|
|
93
|
+
.filter(([name]) => !OLD_ICON_NAMES_MAP[name])
|
|
86
94
|
.map(([name, component]) => {
|
|
87
95
|
const aliases = CANONICAL_TO_ALIASES[name] ?? [];
|
|
88
96
|
return {
|
package/src/index.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type { HeaderProps } from './header';
|
|
|
36
36
|
export type { EmphasisProps } from './emphasis';
|
|
37
37
|
export type { FieldProps } from './field/Field';
|
|
38
38
|
export type { InfoProps } from './info';
|
|
39
|
-
export type { InlinePromptProps, ActionPromptProps } from './prompt';
|
|
39
|
+
export type { InlinePromptProps, ActionPromptProps, CriticalBannerProps } from './prompt';
|
|
40
40
|
export type { InfoPromptProps, InfoPromptAction, InfoPromptMedia } from './prompt';
|
|
41
41
|
export type { InputWithDisplayFormatProps } from './inputWithDisplayFormat';
|
|
42
42
|
export type { InputProps } from './inputs/Input';
|
|
@@ -175,7 +175,7 @@ export { default as Header } from './header';
|
|
|
175
175
|
export { default as Image } from './image';
|
|
176
176
|
export { default as Info } from './info';
|
|
177
177
|
export { default as InlineAlert } from './inlineAlert';
|
|
178
|
-
export { InfoPrompt, InlinePrompt, ActionPrompt } from './prompt';
|
|
178
|
+
export { InfoPrompt, InlinePrompt, ActionPrompt, CriticalBanner } from './prompt';
|
|
179
179
|
export { default as InputWithDisplayFormat } from './inputWithDisplayFormat';
|
|
180
180
|
export { Input } from './inputs/Input';
|
|
181
181
|
export { InputGroup } from './inputs/InputGroup';
|
package/src/logo/Logo.css
CHANGED
|
@@ -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/src/logo/Logo.less
CHANGED
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
.np-logo {
|
|
2
2
|
display: inline-block;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
path {
|
|
7
|
-
.np-theme-personal--forest-green &,
|
|
8
|
-
.np-theme-personal--bright-green & {
|
|
9
|
-
fill: var(--color-interactive-primary);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.np-theme-personal--dark & {
|
|
13
|
-
fill: var(--color-white);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&--size-sm {
|
|
18
|
-
display: block;
|
|
19
|
-
|
|
20
|
-
@media (--screen-sm) {
|
|
21
|
-
display: none;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&--size-md {
|
|
26
|
-
display: none;
|
|
27
|
-
|
|
28
|
-
@media (--screen-sm) {
|
|
29
|
-
display: block;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
3
|
+
color: var(--color-interactive-primary);
|
|
4
|
+
width: var(--wds-logo-width);
|
|
5
|
+
height: var(--wds-logo-height);
|
|
32
6
|
}
|