@transferwise/components 0.0.0-experimental-fa9fbe9 → 0.0.0-experimental-162ecb1

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.
Files changed (152) hide show
  1. package/build/common/hooks/useResizeObserver.js +3 -3
  2. package/build/common/hooks/useResizeObserver.js.map +1 -1
  3. package/build/common/hooks/useResizeObserver.mjs +3 -3
  4. package/build/common/hooks/useResizeObserver.mjs.map +1 -1
  5. package/build/criticalBanner/CriticalCommsBanner.js +0 -3
  6. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  7. package/build/criticalBanner/CriticalCommsBanner.mjs +0 -3
  8. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  9. package/build/field/Field.js +2 -3
  10. package/build/field/Field.js.map +1 -1
  11. package/build/field/Field.mjs +2 -3
  12. package/build/field/Field.mjs.map +1 -1
  13. package/build/i18n/en.json +0 -2
  14. package/build/i18n/en.json.js +0 -2
  15. package/build/i18n/en.json.js.map +1 -1
  16. package/build/i18n/en.json.mjs +0 -2
  17. package/build/i18n/en.json.mjs.map +1 -1
  18. package/build/index.js +0 -2
  19. package/build/index.js.map +1 -1
  20. package/build/index.mjs +0 -1
  21. package/build/index.mjs.map +1 -1
  22. package/build/listItem/Prompt/ListItemPrompt.js +2 -3
  23. package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
  24. package/build/listItem/Prompt/ListItemPrompt.mjs +2 -3
  25. package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
  26. package/build/logo/Logo.js +70 -25
  27. package/build/logo/Logo.js.map +1 -1
  28. package/build/logo/Logo.mjs +72 -27
  29. package/build/logo/Logo.mjs.map +1 -1
  30. package/build/logo/logo-assets.js +68 -97
  31. package/build/logo/logo-assets.js.map +1 -1
  32. package/build/logo/logo-assets.mjs +62 -90
  33. package/build/logo/logo-assets.mjs.map +1 -1
  34. package/build/main.css +32 -224
  35. package/build/prompt/ActionPrompt/ActionPrompt.js +40 -8
  36. package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
  37. package/build/prompt/ActionPrompt/ActionPrompt.mjs +40 -8
  38. package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
  39. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +4 -11
  40. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
  41. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +4 -11
  42. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
  43. package/build/styles/logo/Logo.css +3 -24
  44. package/build/styles/main.css +32 -224
  45. package/build/table/Table.js +6 -5
  46. package/build/table/Table.js.map +1 -1
  47. package/build/table/Table.mjs +6 -5
  48. package/build/table/Table.mjs.map +1 -1
  49. package/build/typeahead/Typeahead.js +2 -3
  50. package/build/typeahead/Typeahead.js.map +1 -1
  51. package/build/typeahead/Typeahead.mjs +2 -3
  52. package/build/typeahead/Typeahead.mjs.map +1 -1
  53. package/build/types/common/hooks/useResizeObserver.d.ts +1 -1
  54. package/build/types/common/hooks/useResizeObserver.d.ts.map +1 -1
  55. package/build/types/criticalBanner/CriticalCommsBanner.d.ts +0 -3
  56. package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
  57. package/build/types/index.d.ts +2 -2
  58. package/build/types/index.d.ts.map +1 -1
  59. package/build/types/logo/Logo.d.ts +32 -1
  60. package/build/types/logo/Logo.d.ts.map +1 -1
  61. package/build/types/logo/logo-assets.d.ts +33 -9
  62. package/build/types/logo/logo-assets.d.ts.map +1 -1
  63. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +11 -2
  64. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
  65. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +3 -35
  66. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
  67. package/build/types/prompt/index.d.ts +0 -2
  68. package/build/types/prompt/index.d.ts.map +1 -1
  69. package/build/types/table/Table.d.ts.map +1 -1
  70. package/build/types/test-utils/index.d.ts +0 -4
  71. package/build/types/test-utils/index.d.ts.map +1 -1
  72. package/package.json +3 -3
  73. package/src/common/bottomSheet/BottomSheet.test.story.tsx +6 -5
  74. package/src/common/hooks/useResizeObserver.ts +2 -3
  75. package/src/criticalBanner/CriticalCommsBanner.story.tsx +0 -4
  76. package/src/criticalBanner/CriticalCommsBanner.test.story.tsx +1 -1
  77. package/src/criticalBanner/CriticalCommsBanner.tsx +0 -3
  78. package/src/i18n/en.json +0 -2
  79. package/src/index.ts +2 -2
  80. package/src/logo/Logo.css +3 -24
  81. package/src/logo/Logo.less +3 -30
  82. package/src/logo/Logo.story.tsx +123 -89
  83. package/src/logo/Logo.test.story.tsx +12 -23
  84. package/src/logo/Logo.tsx +87 -28
  85. package/src/logo/logo-assets.tsx +36 -92
  86. package/src/main.css +32 -224
  87. package/src/main.less +1 -3
  88. package/src/prompt/ActionPrompt/ActionPrompt.tsx +62 -9
  89. package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +40 -56
  90. package/src/prompt/index.ts +0 -4
  91. package/src/sentimentSurface/SentimentSurface.story.tsx +17 -43
  92. package/src/table/Table.story.tsx +1 -1
  93. package/src/table/Table.tsx +6 -5
  94. package/build/common/hooks/useContainerSize.js +0 -30
  95. package/build/common/hooks/useContainerSize.js.map +0 -1
  96. package/build/common/hooks/useContainerSize.mjs +0 -28
  97. package/build/common/hooks/useContainerSize.mjs.map +0 -1
  98. package/build/prompt/CriticalBanner/CriticalBanner.js +0 -142
  99. package/build/prompt/CriticalBanner/CriticalBanner.js.map +0 -1
  100. package/build/prompt/CriticalBanner/CriticalBanner.mjs +0 -140
  101. package/build/prompt/CriticalBanner/CriticalBanner.mjs.map +0 -1
  102. package/build/prompt/CriticalBanner/helpers.js +0 -29
  103. package/build/prompt/CriticalBanner/helpers.js.map +0 -1
  104. package/build/prompt/CriticalBanner/helpers.mjs +0 -26
  105. package/build/prompt/CriticalBanner/helpers.mjs.map +0 -1
  106. package/build/prompt/common/Expander/Expander.js +0 -35
  107. package/build/prompt/common/Expander/Expander.js.map +0 -1
  108. package/build/prompt/common/Expander/Expander.messages.js +0 -17
  109. package/build/prompt/common/Expander/Expander.messages.js.map +0 -1
  110. package/build/prompt/common/Expander/Expander.messages.mjs +0 -13
  111. package/build/prompt/common/Expander/Expander.messages.mjs.map +0 -1
  112. package/build/prompt/common/Expander/Expander.mjs +0 -33
  113. package/build/prompt/common/Expander/Expander.mjs.map +0 -1
  114. package/build/prompt/helpers/promptMedia.js +0 -52
  115. package/build/prompt/helpers/promptMedia.js.map +0 -1
  116. package/build/prompt/helpers/promptMedia.mjs +0 -50
  117. package/build/prompt/helpers/promptMedia.mjs.map +0 -1
  118. package/build/styles/prompt/CriticalBanner/CriticalBanner.css +0 -134
  119. package/build/styles/prompt/CriticalBanner/CriticalBanner.vars.css +0 -0
  120. package/build/styles/prompt/common/Expander/Expander.css +0 -8
  121. package/build/types/common/hooks/useContainerSize.d.ts +0 -14
  122. package/build/types/common/hooks/useContainerSize.d.ts.map +0 -1
  123. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts +0 -39
  124. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts.map +0 -1
  125. package/build/types/prompt/CriticalBanner/helpers.d.ts +0 -18
  126. package/build/types/prompt/CriticalBanner/helpers.d.ts.map +0 -1
  127. package/build/types/prompt/CriticalBanner/index.d.ts +0 -3
  128. package/build/types/prompt/CriticalBanner/index.d.ts.map +0 -1
  129. package/build/types/prompt/common/Expander/Expander.d.ts +0 -20
  130. package/build/types/prompt/common/Expander/Expander.d.ts.map +0 -1
  131. package/build/types/prompt/common/Expander/Expander.messages.d.ts +0 -14
  132. package/build/types/prompt/common/Expander/Expander.messages.d.ts.map +0 -1
  133. package/build/types/prompt/helpers/promptMedia.d.ts +0 -22
  134. package/build/types/prompt/helpers/promptMedia.d.ts.map +0 -1
  135. package/src/common/hooks/useContainerSize.test.tsx +0 -121
  136. package/src/common/hooks/useContainerSize.ts +0 -32
  137. package/src/prompt/CriticalBanner/CriticalBanner.accessibility.docs.mdx +0 -113
  138. package/src/prompt/CriticalBanner/CriticalBanner.css +0 -134
  139. package/src/prompt/CriticalBanner/CriticalBanner.less +0 -155
  140. package/src/prompt/CriticalBanner/CriticalBanner.story.tsx +0 -635
  141. package/src/prompt/CriticalBanner/CriticalBanner.test.story.tsx +0 -422
  142. package/src/prompt/CriticalBanner/CriticalBanner.tsx +0 -178
  143. package/src/prompt/CriticalBanner/CriticalBanner.vars.css +0 -0
  144. package/src/prompt/CriticalBanner/CriticalBanner.vars.less +0 -6
  145. package/src/prompt/CriticalBanner/helpers.ts +0 -39
  146. package/src/prompt/CriticalBanner/index.ts +0 -2
  147. package/src/prompt/common/Expander/Expander.css +0 -8
  148. package/src/prompt/common/Expander/Expander.less +0 -9
  149. package/src/prompt/common/Expander/Expander.messages.ts +0 -14
  150. package/src/prompt/common/Expander/Expander.test.tsx +0 -167
  151. package/src/prompt/common/Expander/Expander.tsx +0 -83
  152. package/src/prompt/helpers/promptMedia.tsx +0 -79
@@ -1,12 +1,21 @@
1
1
  import { AriaAttributes, ReactNode } from 'react';
2
+ import { AvatarViewProps } from '../../avatarView';
2
3
  import { ButtonProps } from '../../button/Button.types';
3
4
  import { PrimitivePromptProps } from '../PrimitivePrompt';
4
- import { PromptMedia } from '../helpers/promptMedia';
5
+ import { BadgeAssetsProps } from '../../badge';
5
6
  export type ActionPromptProps = {
6
7
  title: ReactNode;
7
8
  description?: ReactNode;
8
9
  /** @default {} */
9
- media?: PromptMedia;
10
+ media?: {
11
+ imgSrc?: string;
12
+ avatar?: Pick<AvatarViewProps, 'imgSrc' | 'profileName' | 'profileType'> & {
13
+ asset?: AvatarViewProps['children'];
14
+ badge?: Pick<BadgeAssetsProps, 'flagCode'>;
15
+ };
16
+ 'aria-label'?: string;
17
+ 'aria-hidden'?: boolean;
18
+ };
10
19
  action: Pick<ButtonProps, 'onClick' | 'href' | 'target'> & {
11
20
  label: ButtonProps['children'];
12
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ActionPrompt.d.ts","sourceRoot":"","sources":["../../../../src/prompt/ActionPrompt/ActionPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAS,MAAM,OAAO,CAAC;AAMzD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAmB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,OAAO,EAAqB,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,kBAAkB;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC,GAAG;QACzD,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;KAChC,CAAC;IACF,eAAe,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC,GAAG;QACnE,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;KAChC,CAAC;IACF,YAAY,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;CAC7C,GAAG,IAAI,CAAC,oBAAoB,EAAE,IAAI,GAAG,WAAW,GAAG,aAAa,GAAG,WAAW,CAAC,GAAG;IAC/E;;;OAGG;IACH,SAAS,CAAC,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC;CAC/C,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,8IAY1B,iBAAiB,gCAkFnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ActionPrompt.d.ts","sourceRoot":"","sources":["../../../../src/prompt/ActionPrompt/ActionPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAS,MAAM,OAAO,CAAC;AAOzD,OAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAmB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI/C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,kBAAkB;IAClB,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,aAAa,GAAG,aAAa,CAAC,GAAG;YACzE,KAAK,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;YACpC,KAAK,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;SAC5C,CAAC;QACF,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC,GAAG;QACzD,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;KAChC,CAAC;IACF,eAAe,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC,GAAG;QACnE,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;KAChC,CAAC;IACF,YAAY,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;CAC7C,GAAG,IAAI,CAAC,oBAAoB,EAAE,IAAI,GAAG,WAAW,GAAG,aAAa,GAAG,WAAW,CAAC,GAAG;IAC/E;;;OAGG;IACH,SAAS,CAAC,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC;CAC/C,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,8IAY1B,iBAAiB,gCA2HnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,16 +1,11 @@
1
- import { Emphasis, Sentiment } from '../../sentimentSurface';
1
+ import { Sentiment } from '../../sentimentSurface';
2
2
  import { HTMLAttributes, ReactNode } from 'react';
3
3
  export type PrimitivePromptProps = HTMLAttributes<HTMLDivElement> & {
4
4
  /**
5
- * The sentiment determines the colour scheme.
5
+ * The sentiment determines the colour scheme
6
6
  * @default success
7
7
  */
8
8
  sentiment?: Sentiment;
9
- /**
10
- * The emphasis level affecting background and text contrast.
11
- * @default 'base
12
- */
13
- emphasis?: Emphasis;
14
9
  /**
15
10
  * Media to be displayed on the prompt (icon/image/etc).
16
11
  */
@@ -31,32 +26,5 @@ export type PrimitivePromptProps = HTMLAttributes<HTMLDivElement> & {
31
26
  /**
32
27
  * PrimitivePrompt is a low-level component that provides the structure, sentiment support and styling for various prompts.
33
28
  * Uses several css variables to handle styling from within the consuming component, e.g. --Prompt-padding. */
34
- export declare const PrimitivePrompt: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
35
- /**
36
- * The sentiment determines the colour scheme.
37
- * @default success
38
- */
39
- sentiment?: Sentiment;
40
- /**
41
- * The emphasis level affecting background and text contrast.
42
- * @default 'base
43
- */
44
- emphasis?: Emphasis;
45
- /**
46
- * Media to be displayed on the prompt (icon/image/etc).
47
- */
48
- media: ReactNode;
49
- /**
50
- * Any actions to be displayed on the prompt.
51
- */
52
- actions?: ReactNode;
53
- /**
54
- * Handler called when the close button is clicked. If not provided, then the close button is hidden.
55
- */
56
- onDismiss?: () => void;
57
- /**
58
- * Test ID for testing tools
59
- */
60
- 'data-testid'?: string;
61
- } & import("react").RefAttributes<HTMLDivElement>>;
29
+ export declare const PrimitivePrompt: ({ sentiment, media, actions, onDismiss, className, children, ...restProps }: PrimitivePromptProps) => import("react").JSX.Element;
62
30
  //# sourceMappingURL=PrimitivePrompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimitivePrompt.d.ts","sourceRoot":"","sources":["../../../../src/prompt/PrimitivePrompt/PrimitivePrompt.tsx"],"names":[],"mappings":"AAEA,OAAyB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAI/E,OAAO,EAAc,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAClE;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;8GAE8G;AAC9G,eAAO,MAAM,eAAe;IA/B1B;;;OAGG;gBACS,SAAS;IACrB;;;OAGG;eACQ,QAAQ;IACnB;;OAEG;WACI,SAAS;IAChB;;OAEG;cACO,SAAS;IACnB;;OAEG;gBACS,MAAM,IAAI;IACtB;;OAEG;oBACa,MAAM;kDAqDvB,CAAC"}
1
+ {"version":3,"file":"PrimitivePrompt.d.ts","sourceRoot":"","sources":["../../../../src/prompt/PrimitivePrompt/PrimitivePrompt.tsx"],"names":[],"mappings":"AAEA,OAAyB,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAIrE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAClE;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;8GAE8G;AAC9G,eAAO,MAAM,eAAe,GAAI,6EAQ7B,oBAAoB,gCA8BtB,CAAC"}
@@ -4,6 +4,4 @@ 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';
9
7
  //# 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;AAG1C,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,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"}
@@ -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,gCA4HZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
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,8 +26,6 @@ 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;
31
29
  "neptune.ExpressiveMoneyInput.currency.search.placeholder": string;
32
30
  "neptune.ExpressiveMoneyInput.currency.select.currency": string;
33
31
  "neptune.FlowNavigation.back": string;
@@ -113,8 +111,6 @@ declare function customRenderHook(callback: () => unknown, { locale, messages }?
113
111
  "neptune.DateLookup.selected": string;
114
112
  "neptune.DateLookup.twentyYears": string;
115
113
  "neptune.DateLookup.year": string;
116
- "neptune.Expander.collapseAriaLabel": string;
117
- "neptune.Expander.expandAriaLabel": string;
118
114
  "neptune.ExpressiveMoneyInput.currency.search.placeholder": string;
119
115
  "neptune.ExpressiveMoneyInput.currency.select.currency": string;
120
116
  "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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
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": "0.0.0-experimental-fa9fbe9",
3
+ "version": "0.0.0-experimental-162ecb1",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -87,8 +87,8 @@
87
87
  "storybook-addon-tag-badges": "^3.1.0",
88
88
  "storybook-addon-test-codegen": "^3.0.1",
89
89
  "@transferwise/less-config": "3.1.2",
90
- "@wise/components-theming": "1.10.1",
91
90
  "@transferwise/neptune-css": "14.27.1",
91
+ "@wise/components-theming": "1.10.1",
92
92
  "@wise/wds-configs": "0.0.0"
93
93
  },
94
94
  "peerDependencies": {
@@ -132,7 +132,7 @@
132
132
  "build:css": "gulp compileLess --dest=src",
133
133
  "build": "npm-run-all build:*",
134
134
  "build:clean": "rm -rf lib build",
135
- "build:crowdin-source-file": "formatjs extract 'src/**/*.messages.+(js|ts|tsx)' --out-file src/i18n/en.json --format simple && prettier --write src/i18n/*.json",
135
+ "build:crowdin-source-file": "formatjs extract 'src/**/*.messages.+(js|ts|tsx)' --out-file src/i18n/en.json --format simple",
136
136
  "build:js": "rollup --config --sourcemap",
137
137
  "build:copy-files": "cpx 'src/**/!(db)/*.{json,svg}' build",
138
138
  "build:copy-css": "cpx 'src/main.css' build/ & cpx 'src/**/*.css' build/styles/",
@@ -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 Alert from '../../alert';
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
- <Alert className="m-t-2" type="warning">
49
- Once the <code>BottomSheet</code> opens, the document underneath should be static and
50
- should not scroll.
51
- </Alert>
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
  </>
@@ -5,7 +5,6 @@ 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',
9
8
  ) {
10
9
  const handleCallback = useEffectEvent(callback);
11
10
  useEffect(() => {
@@ -13,11 +12,11 @@ export function useResizeObserver(
13
12
  const resizeObserver = new ResizeObserver(([entry]) => {
14
13
  handleCallback(entry);
15
14
  });
16
- resizeObserver.observe(ref.current, { box });
15
+ resizeObserver.observe(ref.current, { box: 'border-box' });
17
16
  return () => {
18
17
  resizeObserver.disconnect();
19
18
  };
20
19
  }
21
20
  return () => {};
22
- }, [handleCallback, ref, box]);
21
+ }, [handleCallback, ref]);
23
22
  }
@@ -1,13 +1,9 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import CriticalCommsBanner from '.';
3
3
 
4
- /**
5
- * @deprecated Use **`CriticalBanner`** component instead.
6
- */
7
4
  export default {
8
5
  component: CriticalCommsBanner,
9
6
  title: 'Prompts/CriticalCommsBanner',
10
- tags: ['deprecated'],
11
7
  } satisfies Meta<typeof CriticalCommsBanner>;
12
8
 
13
9
  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', 'deprecated'],
9
+ tags: ['!autodocs'],
10
10
  } satisfies Meta<typeof CriticalCommsBanner>;
11
11
 
12
12
  type Story = StoryObj<typeof CriticalCommsBanner>;
@@ -51,9 +51,6 @@ 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
- */
57
54
  function CriticalCommsBanner({
58
55
  title,
59
56
  subtitle,
package/src/i18n/en.json CHANGED
@@ -16,8 +16,6 @@
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",
21
19
  "neptune.ExpressiveMoneyInput.currency.search.placeholder": "Type a currency / country",
22
20
  "neptune.ExpressiveMoneyInput.currency.select.currency": "Select currency",
23
21
  "neptune.FlowNavigation.back": "back to previous step",
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, CriticalBannerProps } from './prompt';
39
+ export type { InlinePromptProps, ActionPromptProps } 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, CriticalBanner } from './prompt';
178
+ export { InfoPrompt, InlinePrompt, ActionPrompt } 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,5 @@
1
1
  .np-logo {
2
- display: inline-block;
3
- }
4
- .np-theme-personal--forest-green .np-logo-svg path,
5
- .np-theme-personal--bright-green .np-logo-svg path {
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
- }
2
+ color: var(--color-interactive-primary);
3
+ width: var(--wds-logo-width);
4
+ height: var(--wds-logo-height);
26
5
  }
@@ -1,32 +1,5 @@
1
1
  .np-logo {
2
- display: inline-block;
3
- }
4
-
5
- .np-logo-svg {
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
- }
2
+ color: var(--color-interactive-primary);
3
+ width: var(--wds-logo-width);
4
+ height: var(--wds-logo-height);
32
5
  }
@@ -1,6 +1,7 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
 
3
- import Logo, { LogoType } from '.';
3
+ import Logo, { LogoType, LogoDisplay } from './Logo';
4
+ import { withVariantConfig } from '../../.storybook/helpers';
4
5
 
5
6
  /**
6
7
  * **Design guidance**: <a href="https://wise.design/foundations/logo" target="_blank">wise.design/foundations/logo</a>
@@ -10,13 +11,19 @@ const meta: Meta<typeof Logo> = {
10
11
  title: 'Content/Logo',
11
12
  args: {
12
13
  type: 'WISE',
13
- inverse: false,
14
+ display: 'responsive',
15
+ lockup: false,
16
+ secondary: false,
14
17
  },
15
18
  argTypes: {
16
19
  type: {
17
20
  control: 'radio',
18
21
  options: Object.values(LogoType),
19
22
  },
23
+ display: {
24
+ control: 'radio',
25
+ options: Object.values(LogoDisplay),
26
+ },
20
27
  },
21
28
  parameters: {
22
29
  docs: { toc: true },
@@ -29,18 +36,7 @@ type Story = StoryObj<typeof Logo>;
29
36
 
30
37
  /** Explore all props via the controls panel. */
31
38
  export const Playground: Story = {
32
- render: (args) => (
33
- <div
34
- style={{
35
- padding: '2rem',
36
- ...(args.inverse
37
- ? { backgroundColor: 'var(--color-background-screen-dark, #0e0f0c)' }
38
- : {}),
39
- }}
40
- >
41
- <Logo {...args} />
42
- </div>
43
- ),
39
+ render: (args) => <Logo {...args} />,
44
40
  };
45
41
 
46
42
  /**
@@ -59,9 +55,6 @@ export const Types: Story = {
59
55
  alignItems: 'center',
60
56
  padding: '2rem',
61
57
  borderRadius: '8px',
62
- ...(args.inverse
63
- ? { backgroundColor: 'var(--color-background-screen-dark, #0e0f0c)' }
64
- : {}),
65
58
  }}
66
59
  >
67
60
  {Object.values(LogoType).map((type) => (
@@ -75,14 +68,7 @@ export const Types: Story = {
75
68
  }}
76
69
  >
77
70
  <Logo {...args} type={type} />
78
- <span
79
- style={{
80
- fontSize: '12px',
81
- ...(args.inverse ? { color: 'rgba(255,255,255,0.6)' } : { opacity: 0.6 }),
82
- }}
83
- >
84
- {type}
85
- </span>
71
+ <span style={{ fontSize: '12px' }}>{type}</span>
86
72
  </div>
87
73
  ))}
88
74
  </div>
@@ -99,99 +85,147 @@ export const Types: Story = {
99
85
  };
100
86
 
101
87
  /**
102
- * Below `576px` the flag-only mark is shown; at `576px` and above the full wordmark is displayed.
88
+ * When `display` is `"compact"`, only the fast-flag mark is rendered regardless of type.
103
89
  */
104
- export const Responsive: Story = {
90
+ export const Compact: Story = {
105
91
  argTypes: {
106
92
  type: { table: { disable: true } },
107
- inverse: { table: { disable: true } },
93
+ display: { table: { disable: true } },
108
94
  },
109
95
  render: (args) => (
110
- <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
111
- <div>
112
- <span style={{ fontSize: '12px', opacity: 0.6, display: 'block', marginBottom: '0.5rem' }}>
113
- {'< 576px (flag only)'}
114
- </span>
115
- <div style={{ display: 'flex', gap: '3rem', alignItems: 'center' }}>
116
- {Object.values(LogoType).map((type) => (
117
- <span key={type} className="np-logo" style={{ display: 'inline-block' }}>
118
- <style>{`.responsive-sm .np-logo-svg--size-md { display: none !important; } .responsive-sm .np-logo-svg--size-sm { display: block !important; }`}</style>
119
- <span className="responsive-sm">
120
- <Logo type={type} />
121
- </span>
122
- </span>
123
- ))}
96
+ <div style={{ display: 'flex', gap: '3rem', alignItems: 'center', padding: '2rem' }}>
97
+ {Object.values(LogoType).map((type) => (
98
+ <div
99
+ key={type}
100
+ style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '0.5rem' }}
101
+ >
102
+ <Logo {...args} type={type} display="compact" />
103
+ <Logo {...args} type={type} secondary display="compact" />
104
+ <Logo {...args} type={type} lockup secondary display="compact" />
124
105
  </div>
125
- </div>
126
- <div>
127
- <span style={{ fontSize: '12px', opacity: 0.6, display: 'block', marginBottom: '0.5rem' }}>
128
- {'\u2265 576px (full wordmark)'}
129
- </span>
130
- <div style={{ display: 'flex', gap: '3rem', alignItems: 'center' }}>
131
- {Object.values(LogoType).map((type) => (
132
- <Logo key={type} type={type} />
133
- ))}
106
+ ))}
107
+ </div>
108
+ ),
109
+ parameters: {
110
+ docs: {
111
+ source: {
112
+ code: `<Logo display="compact" />
113
+ <Logo type="WISE_BUSINESS" lockup display="compact" />
114
+ <Logo type="WISE_PLATFORM" lockup display="compact" />
115
+
116
+ <Logo type="WISE_BUSINESS" lockup secondary display="compact" />
117
+ <Logo type="WISE_PLATFORM" lockup secondary display="compact" />`,
118
+ },
119
+ },
120
+ },
121
+ };
122
+
123
+ /**
124
+ * The `lockup` prop shows the product name alongside the wordmark.
125
+ * Only applies to `WISE_BUSINESS` and `WISE_PLATFORM` types.
126
+ */
127
+ export const Lockup: Story = {
128
+ argTypes: {
129
+ type: { table: { disable: true } },
130
+ lockup: { table: { disable: true } },
131
+ },
132
+ render: (args) => (
133
+ <div style={{ display: 'flex', gap: '3rem', alignItems: 'center', padding: '2rem' }}>
134
+ {Object.values(LogoType).map((type) => (
135
+ <div key={type} style={{ display: 'flex', gap: '3rem', alignItems: 'center' }}>
136
+ <div
137
+ style={{
138
+ display: 'flex',
139
+ flexDirection: 'column',
140
+ alignItems: 'center',
141
+ gap: '0.5rem',
142
+ }}
143
+ >
144
+ <Logo {...args} type={type} />
145
+ <span style={{ fontSize: '12px', opacity: 0.6 }}>{type}</span>
146
+ </div>
147
+ <div
148
+ style={{
149
+ display: 'flex',
150
+ flexDirection: 'column',
151
+ alignItems: 'center',
152
+ gap: '0.5rem',
153
+ }}
154
+ >
155
+ <Logo {...args} type={type} lockup />
156
+ <span style={{ fontSize: '12px', opacity: 0.6 }}>{type} lockup</span>
157
+ </div>
134
158
  </div>
135
- </div>
159
+ ))}
136
160
  </div>
137
161
  ),
138
162
  parameters: {
139
163
  docs: {
140
- source: { code: null },
164
+ source: {
165
+ code: `<Logo type="WISE_BUSINESS" lockup />
166
+ <Logo type="WISE_PLATFORM" lockup />`,
167
+ },
141
168
  },
142
169
  },
143
170
  };
144
171
 
145
172
  /**
146
- * All logo types on a dark background using the `inverse` prop, which renders a
147
- * light-coloured version suited for dark surfaces.
173
+ * The `secondary` prop (combined with `lockup`) uses a stacked two-line layout.
174
+ * Only applies to `WISE_BUSINESS` and `WISE_PLATFORM` types.
148
175
  */
149
- export const Inverse: Story = {
176
+ export const Secondary: Story = {
150
177
  argTypes: {
151
178
  type: { table: { disable: true } },
152
- inverse: { table: { disable: true } },
179
+ lockup: { table: { disable: true } },
180
+ secondary: { table: { disable: true } },
153
181
  },
154
- decorators: [
155
- (Story) => (
156
- <div
157
- style={{
158
- display: 'flex',
159
- gap: '3rem',
160
- alignItems: 'center',
161
- backgroundColor: 'var(--color-background-screen-dark, #0e0f0c)',
162
- padding: '2rem',
163
- borderRadius: '8px',
164
- }}
165
- >
166
- <Story />
167
- </div>
168
- ),
169
- ],
170
182
  render: (args) => (
171
- <>
183
+ <div style={{ display: 'flex', gap: '3rem', alignItems: 'flex-end', padding: '2rem' }}>
172
184
  {Object.values(LogoType).map((type) => (
173
- <div
174
- key={type}
175
- style={{
176
- display: 'flex',
177
- flexDirection: 'column',
178
- alignItems: 'center',
179
- gap: '0.5rem',
180
- }}
181
- >
182
- <Logo type={type} inverse />
183
- <span style={{ fontSize: '12px', color: 'rgba(255,255,255,0.6)' }}>{type}</span>
185
+ <div key={type} style={{ display: 'flex', gap: '3rem', alignItems: 'flex-end' }}>
186
+ <div
187
+ style={{
188
+ display: 'flex',
189
+ flexDirection: 'column',
190
+ alignItems: 'center',
191
+ gap: '0.5rem',
192
+ }}
193
+ >
194
+ <Logo {...args} type={type} lockup secondary />
195
+ </div>
184
196
  </div>
185
197
  ))}
186
- </>
198
+ </div>
187
199
  ),
188
200
  parameters: {
189
201
  docs: {
190
202
  source: {
191
- code: `<Logo type="WISE" inverse />
192
- <Logo type="WISE_BUSINESS" inverse />
193
- <Logo type="WISE_PLATFORM" inverse />`,
203
+ code: `<Logo type="WISE_BUSINESS" lockup secondary />
204
+ <Logo type="WISE_PLATFORM" lockup secondary />`,
194
205
  },
195
206
  },
196
207
  },
197
208
  };
209
+
210
+ export const Full: Story = {
211
+ render: (args) => (
212
+ <div style={{ display: 'flex', gap: '3rem', alignItems: 'flex-end', padding: '2rem' }}>
213
+ {Object.values(LogoType).map((type) => (
214
+ <div key={type} style={{ display: 'flex', gap: '3rem', alignItems: 'flex-end' }}>
215
+ <div
216
+ style={{
217
+ display: 'flex',
218
+ flexDirection: 'column',
219
+ alignItems: 'center',
220
+ gap: '0.5rem',
221
+ }}
222
+ >
223
+ <Logo type={type} lockup display="full" />
224
+ <Logo type={type} lockup secondary display="full" />
225
+ </div>
226
+ </div>
227
+ ))}
228
+ </div>
229
+ ),
230
+ ...withVariantConfig(['mobile']),
231
+ };