@transferwise/components 0.0.0-experimental-43c52b9 → 0.0.0-experimental-ef0cf2e

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.
@@ -29,6 +29,12 @@ const labelByType = {
29
29
  WISE_BUSINESS: 'Wise Business',
30
30
  WISE_PLATFORM: 'Wise Platform'
31
31
  };
32
+ /**
33
+ * Renders the Wise wordmark logo. Responsive — shows the flag-only mark on small viewports
34
+ * and the full wordmark on ≥576px (small breakpoint and above).
35
+ *
36
+ * @see {@link https://wise.design/foundations/logo Design Spec}
37
+ */
32
38
  function Logo({
33
39
  className,
34
40
  inverse,
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.js","sources":["../../src/logo/Logo.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport {\n LogoWise,\n LogoWiseInverse,\n LogoWisePlatform,\n LogoWisePlatformInverse,\n LogoFlag,\n LogoFlagInverse,\n LogoFlagPlatform,\n LogoFlagPlatformInverse,\n} from './logo-assets';\n\nconst svgPaths = {\n WISE: LogoWise,\n WISE_BUSINESS: LogoWise,\n WISE_INVERSE: LogoWiseInverse,\n WISE_BUSINESS_INVERSE: LogoWiseInverse,\n WISE_PLATFORM: LogoWisePlatform,\n WISE_PLATFORM_INVERSE: LogoWisePlatformInverse,\n WISE_FLAG: LogoFlag,\n WISE_FLAG_INVERSE: LogoFlagInverse,\n WISE_FLAG_PLATFORM: LogoFlagPlatform,\n WISE_FLAG_PLATFORM_INVERSE: LogoFlagPlatformInverse,\n};\n\nexport enum LogoType {\n WISE = 'WISE',\n WISE_BUSINESS = 'WISE_BUSINESS',\n WISE_PLATFORM = 'WISE_PLATFORM',\n}\n\nexport interface LogoProps {\n /** Extra classes applied to Logo */\n className?: string;\n /** If true, will use dark colours for dark on light theme */\n inverse?: boolean;\n /**\n * What type of logo to display\n * @default 'WISE'\n */\n type?: `${LogoType}`;\n}\n\nconst labelByType = {\n WISE: 'Wise',\n WISE_BUSINESS: 'Wise Business',\n WISE_PLATFORM: 'Wise Platform',\n} satisfies Record<`${LogoType}`, string>;\n\nexport default function Logo({ className, inverse, type = 'WISE' }: LogoProps) {\n const LogoSm =\n svgPaths[`WISE_FLAG${type === 'WISE_PLATFORM' ? '_PLATFORM' : ''}${inverse ? '_INVERSE' : ''}`];\n const LogoMd = svgPaths[`${type}${inverse ? '_INVERSE' : ''}`];\n\n return (\n <span aria-label={labelByType[type]} role=\"img\" className={clsx(className, 'np-logo')}>\n <LogoSm className=\"np-logo-svg np-logo-svg--size-sm\" />\n <LogoMd className=\"np-logo-svg np-logo-svg--size-md\" />\n </span>\n );\n}\n"],"names":["svgPaths","WISE","LogoWise","WISE_BUSINESS","WISE_INVERSE","LogoWiseInverse","WISE_BUSINESS_INVERSE","WISE_PLATFORM","LogoWisePlatform","WISE_PLATFORM_INVERSE","LogoWisePlatformInverse","WISE_FLAG","LogoFlag","WISE_FLAG_INVERSE","LogoFlagInverse","WISE_FLAG_PLATFORM","LogoFlagPlatform","WISE_FLAG_PLATFORM_INVERSE","LogoFlagPlatformInverse","LogoType","labelByType","Logo","className","inverse","type","LogoSm","LogoMd","_jsxs","role","clsx","children","_jsx"],"mappings":";;;;;;;;AAaA,MAAMA,QAAQ,GAAG;AACfC,EAAAA,IAAI,EAAEC,mBAAQ;AACdC,EAAAA,aAAa,EAAED,mBAAQ;AACvBE,EAAAA,YAAY,EAAEC,0BAAe;AAC7BC,EAAAA,qBAAqB,EAAED,0BAAe;AACtCE,EAAAA,aAAa,EAAEC,2BAAgB;AAC/BC,EAAAA,qBAAqB,EAAEC,kCAAuB;AAC9CC,EAAAA,SAAS,EAAEC,mBAAQ;AACnBC,EAAAA,iBAAiB,EAAEC,0BAAe;AAClCC,EAAAA,kBAAkB,EAAEC,2BAAgB;AACpCC,EAAAA,0BAA0B,EAAEC;CAC7B;AAEWC;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/BA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AACjC,CAAC,EAJWA,gBAAQ,KAARA,gBAAQ,GAAA,EAAA,CAAA,CAAA;AAkBpB,MAAMC,WAAW,GAAG;AAClBnB,EAAAA,IAAI,EAAE,MAAM;AACZE,EAAAA,aAAa,EAAE,eAAe;AAC9BI,EAAAA,aAAa,EAAE;CACwB;AAE3B,SAAUc,IAAIA,CAAC;EAAEC,SAAS;EAAEC,OAAO;AAAEC,EAAAA,IAAI,GAAG;AAAM,CAAa,EAAA;AAC3E,EAAA,MAAMC,MAAM,GACVzB,QAAQ,CAAC,CAAA,SAAA,EAAYwB,IAAI,KAAK,eAAe,GAAG,WAAW,GAAG,EAAE,GAAGD,OAAO,GAAG,UAAU,GAAG,EAAE,EAAE,CAAC;AACjG,EAAA,MAAMG,MAAM,GAAG1B,QAAQ,CAAC,CAAA,EAAGwB,IAAI,CAAA,EAAGD,OAAO,GAAG,UAAU,GAAG,EAAE,EAAE,CAAC;AAE9D,EAAA,oBACEI,eAAA,CAAA,MAAA,EAAA;IAAM,YAAA,EAAYP,WAAW,CAACI,IAAI,CAAE;AAACI,IAAAA,IAAI,EAAC,KAAK;AAACN,IAAAA,SAAS,EAAEO,SAAI,CAACP,SAAS,EAAE,SAAS,CAAE;IAAAQ,QAAA,EAAA,cACpFC,cAAA,CAACN,MAAM,EAAA;AAACH,MAAAA,SAAS,EAAC;AAAkC,KAAA,CACpD,eAAAS,cAAA,CAACL,MAAM,EAAA;AAACJ,MAAAA,SAAS,EAAC;AAAkC,KAAA,CACtD;AAAA,GAAM,CAAC;AAEX;;;;"}
1
+ {"version":3,"file":"Logo.js","sources":["../../src/logo/Logo.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport {\n LogoWise,\n LogoWiseInverse,\n LogoWisePlatform,\n LogoWisePlatformInverse,\n LogoFlag,\n LogoFlagInverse,\n LogoFlagPlatform,\n LogoFlagPlatformInverse,\n} from './logo-assets';\n\nconst svgPaths = {\n WISE: LogoWise,\n WISE_BUSINESS: LogoWise,\n WISE_INVERSE: LogoWiseInverse,\n WISE_BUSINESS_INVERSE: LogoWiseInverse,\n WISE_PLATFORM: LogoWisePlatform,\n WISE_PLATFORM_INVERSE: LogoWisePlatformInverse,\n WISE_FLAG: LogoFlag,\n WISE_FLAG_INVERSE: LogoFlagInverse,\n WISE_FLAG_PLATFORM: LogoFlagPlatform,\n WISE_FLAG_PLATFORM_INVERSE: LogoFlagPlatformInverse,\n};\n\nexport enum LogoType {\n WISE = 'WISE',\n WISE_BUSINESS = 'WISE_BUSINESS',\n WISE_PLATFORM = 'WISE_PLATFORM',\n}\n\nexport interface LogoProps {\n /** Extra classes applied to Logo */\n className?: string;\n /**\n * Renders a light-coloured version suited for dark backgrounds.\n * @default false\n */\n inverse?: boolean;\n /**\n * What type of logo to display\n * @default 'WISE'\n */\n type?: `${LogoType}`;\n}\n\nconst labelByType = {\n WISE: 'Wise',\n WISE_BUSINESS: 'Wise Business',\n WISE_PLATFORM: 'Wise Platform',\n} satisfies Record<`${LogoType}`, string>;\n\n/**\n * Renders the Wise wordmark logo. Responsive — shows the flag-only mark on small viewports\n * and the full wordmark on ≥576px (small breakpoint and above).\n *\n * @see {@link https://wise.design/foundations/logo Design Spec}\n */\nexport default function Logo({ className, inverse, type = 'WISE' }: LogoProps) {\n const LogoSm =\n svgPaths[`WISE_FLAG${type === 'WISE_PLATFORM' ? '_PLATFORM' : ''}${inverse ? '_INVERSE' : ''}`];\n const LogoMd = svgPaths[`${type}${inverse ? '_INVERSE' : ''}`];\n\n return (\n <span aria-label={labelByType[type]} role=\"img\" className={clsx(className, 'np-logo')}>\n <LogoSm className=\"np-logo-svg np-logo-svg--size-sm\" />\n <LogoMd className=\"np-logo-svg np-logo-svg--size-md\" />\n </span>\n );\n}\n"],"names":["svgPaths","WISE","LogoWise","WISE_BUSINESS","WISE_INVERSE","LogoWiseInverse","WISE_BUSINESS_INVERSE","WISE_PLATFORM","LogoWisePlatform","WISE_PLATFORM_INVERSE","LogoWisePlatformInverse","WISE_FLAG","LogoFlag","WISE_FLAG_INVERSE","LogoFlagInverse","WISE_FLAG_PLATFORM","LogoFlagPlatform","WISE_FLAG_PLATFORM_INVERSE","LogoFlagPlatformInverse","LogoType","labelByType","Logo","className","inverse","type","LogoSm","LogoMd","_jsxs","role","clsx","children","_jsx"],"mappings":";;;;;;;;AAaA,MAAMA,QAAQ,GAAG;AACfC,EAAAA,IAAI,EAAEC,mBAAQ;AACdC,EAAAA,aAAa,EAAED,mBAAQ;AACvBE,EAAAA,YAAY,EAAEC,0BAAe;AAC7BC,EAAAA,qBAAqB,EAAED,0BAAe;AACtCE,EAAAA,aAAa,EAAEC,2BAAgB;AAC/BC,EAAAA,qBAAqB,EAAEC,kCAAuB;AAC9CC,EAAAA,SAAS,EAAEC,mBAAQ;AACnBC,EAAAA,iBAAiB,EAAEC,0BAAe;AAClCC,EAAAA,kBAAkB,EAAEC,2BAAgB;AACpCC,EAAAA,0BAA0B,EAAEC;CAC7B;AAEWC;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/BA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AACjC,CAAC,EAJWA,gBAAQ,KAARA,gBAAQ,GAAA,EAAA,CAAA,CAAA;AAqBpB,MAAMC,WAAW,GAAG;AAClBnB,EAAAA,IAAI,EAAE,MAAM;AACZE,EAAAA,aAAa,EAAE,eAAe;AAC9BI,EAAAA,aAAa,EAAE;CACwB;AAEzC;;;;;AAKG;AACW,SAAUc,IAAIA,CAAC;EAAEC,SAAS;EAAEC,OAAO;AAAEC,EAAAA,IAAI,GAAG;AAAM,CAAa,EAAA;AAC3E,EAAA,MAAMC,MAAM,GACVzB,QAAQ,CAAC,CAAA,SAAA,EAAYwB,IAAI,KAAK,eAAe,GAAG,WAAW,GAAG,EAAE,GAAGD,OAAO,GAAG,UAAU,GAAG,EAAE,EAAE,CAAC;AACjG,EAAA,MAAMG,MAAM,GAAG1B,QAAQ,CAAC,CAAA,EAAGwB,IAAI,CAAA,EAAGD,OAAO,GAAG,UAAU,GAAG,EAAE,EAAE,CAAC;AAE9D,EAAA,oBACEI,eAAA,CAAA,MAAA,EAAA;IAAM,YAAA,EAAYP,WAAW,CAACI,IAAI,CAAE;AAACI,IAAAA,IAAI,EAAC,KAAK;AAACN,IAAAA,SAAS,EAAEO,SAAI,CAACP,SAAS,EAAE,SAAS,CAAE;IAAAQ,QAAA,EAAA,cACpFC,cAAA,CAACN,MAAM,EAAA;AAACH,MAAAA,SAAS,EAAC;AAAkC,KAAA,CACpD,eAAAS,cAAA,CAACL,MAAM,EAAA;AAACJ,MAAAA,SAAS,EAAC;AAAkC,KAAA,CACtD;AAAA,GAAM,CAAC;AAEX;;;;"}
@@ -25,6 +25,12 @@ const labelByType = {
25
25
  WISE_BUSINESS: 'Wise Business',
26
26
  WISE_PLATFORM: 'Wise Platform'
27
27
  };
28
+ /**
29
+ * Renders the Wise wordmark logo. Responsive — shows the flag-only mark on small viewports
30
+ * and the full wordmark on ≥576px (small breakpoint and above).
31
+ *
32
+ * @see {@link https://wise.design/foundations/logo Design Spec}
33
+ */
28
34
  function Logo({
29
35
  className,
30
36
  inverse,
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.mjs","sources":["../../src/logo/Logo.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport {\n LogoWise,\n LogoWiseInverse,\n LogoWisePlatform,\n LogoWisePlatformInverse,\n LogoFlag,\n LogoFlagInverse,\n LogoFlagPlatform,\n LogoFlagPlatformInverse,\n} from './logo-assets';\n\nconst svgPaths = {\n WISE: LogoWise,\n WISE_BUSINESS: LogoWise,\n WISE_INVERSE: LogoWiseInverse,\n WISE_BUSINESS_INVERSE: LogoWiseInverse,\n WISE_PLATFORM: LogoWisePlatform,\n WISE_PLATFORM_INVERSE: LogoWisePlatformInverse,\n WISE_FLAG: LogoFlag,\n WISE_FLAG_INVERSE: LogoFlagInverse,\n WISE_FLAG_PLATFORM: LogoFlagPlatform,\n WISE_FLAG_PLATFORM_INVERSE: LogoFlagPlatformInverse,\n};\n\nexport enum LogoType {\n WISE = 'WISE',\n WISE_BUSINESS = 'WISE_BUSINESS',\n WISE_PLATFORM = 'WISE_PLATFORM',\n}\n\nexport interface LogoProps {\n /** Extra classes applied to Logo */\n className?: string;\n /** If true, will use dark colours for dark on light theme */\n inverse?: boolean;\n /**\n * What type of logo to display\n * @default 'WISE'\n */\n type?: `${LogoType}`;\n}\n\nconst labelByType = {\n WISE: 'Wise',\n WISE_BUSINESS: 'Wise Business',\n WISE_PLATFORM: 'Wise Platform',\n} satisfies Record<`${LogoType}`, string>;\n\nexport default function Logo({ className, inverse, type = 'WISE' }: LogoProps) {\n const LogoSm =\n svgPaths[`WISE_FLAG${type === 'WISE_PLATFORM' ? '_PLATFORM' : ''}${inverse ? '_INVERSE' : ''}`];\n const LogoMd = svgPaths[`${type}${inverse ? '_INVERSE' : ''}`];\n\n return (\n <span aria-label={labelByType[type]} role=\"img\" className={clsx(className, 'np-logo')}>\n <LogoSm className=\"np-logo-svg np-logo-svg--size-sm\" />\n <LogoMd className=\"np-logo-svg np-logo-svg--size-md\" />\n </span>\n );\n}\n"],"names":["svgPaths","WISE","LogoWise","WISE_BUSINESS","WISE_INVERSE","LogoWiseInverse","WISE_BUSINESS_INVERSE","WISE_PLATFORM","LogoWisePlatform","WISE_PLATFORM_INVERSE","LogoWisePlatformInverse","WISE_FLAG","LogoFlag","WISE_FLAG_INVERSE","LogoFlagInverse","WISE_FLAG_PLATFORM","LogoFlagPlatform","WISE_FLAG_PLATFORM_INVERSE","LogoFlagPlatformInverse","LogoType","labelByType","Logo","className","inverse","type","LogoSm","LogoMd","_jsxs","role","clsx","children","_jsx"],"mappings":";;;;AAaA,MAAMA,QAAQ,GAAG;AACfC,EAAAA,IAAI,EAAEC,QAAQ;AACdC,EAAAA,aAAa,EAAED,QAAQ;AACvBE,EAAAA,YAAY,EAAEC,eAAe;AAC7BC,EAAAA,qBAAqB,EAAED,eAAe;AACtCE,EAAAA,aAAa,EAAEC,gBAAgB;AAC/BC,EAAAA,qBAAqB,EAAEC,uBAAuB;AAC9CC,EAAAA,SAAS,EAAEC,QAAQ;AACnBC,EAAAA,iBAAiB,EAAEC,eAAe;AAClCC,EAAAA,kBAAkB,EAAEC,gBAAgB;AACpCC,EAAAA,0BAA0B,EAAEC;CAC7B;IAEWC;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/BA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AACjC,CAAC,EAJWA,QAAQ,KAARA,QAAQ,GAAA,EAAA,CAAA,CAAA;AAkBpB,MAAMC,WAAW,GAAG;AAClBnB,EAAAA,IAAI,EAAE,MAAM;AACZE,EAAAA,aAAa,EAAE,eAAe;AAC9BI,EAAAA,aAAa,EAAE;CACwB;AAE3B,SAAUc,IAAIA,CAAC;EAAEC,SAAS;EAAEC,OAAO;AAAEC,EAAAA,IAAI,GAAG;AAAM,CAAa,EAAA;AAC3E,EAAA,MAAMC,MAAM,GACVzB,QAAQ,CAAC,CAAA,SAAA,EAAYwB,IAAI,KAAK,eAAe,GAAG,WAAW,GAAG,EAAE,GAAGD,OAAO,GAAG,UAAU,GAAG,EAAE,EAAE,CAAC;AACjG,EAAA,MAAMG,MAAM,GAAG1B,QAAQ,CAAC,CAAA,EAAGwB,IAAI,CAAA,EAAGD,OAAO,GAAG,UAAU,GAAG,EAAE,EAAE,CAAC;AAE9D,EAAA,oBACEI,IAAA,CAAA,MAAA,EAAA;IAAM,YAAA,EAAYP,WAAW,CAACI,IAAI,CAAE;AAACI,IAAAA,IAAI,EAAC,KAAK;AAACN,IAAAA,SAAS,EAAEO,IAAI,CAACP,SAAS,EAAE,SAAS,CAAE;IAAAQ,QAAA,EAAA,cACpFC,GAAA,CAACN,MAAM,EAAA;AAACH,MAAAA,SAAS,EAAC;AAAkC,KAAA,CACpD,eAAAS,GAAA,CAACL,MAAM,EAAA;AAACJ,MAAAA,SAAS,EAAC;AAAkC,KAAA,CACtD;AAAA,GAAM,CAAC;AAEX;;;;"}
1
+ {"version":3,"file":"Logo.mjs","sources":["../../src/logo/Logo.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport {\n LogoWise,\n LogoWiseInverse,\n LogoWisePlatform,\n LogoWisePlatformInverse,\n LogoFlag,\n LogoFlagInverse,\n LogoFlagPlatform,\n LogoFlagPlatformInverse,\n} from './logo-assets';\n\nconst svgPaths = {\n WISE: LogoWise,\n WISE_BUSINESS: LogoWise,\n WISE_INVERSE: LogoWiseInverse,\n WISE_BUSINESS_INVERSE: LogoWiseInverse,\n WISE_PLATFORM: LogoWisePlatform,\n WISE_PLATFORM_INVERSE: LogoWisePlatformInverse,\n WISE_FLAG: LogoFlag,\n WISE_FLAG_INVERSE: LogoFlagInverse,\n WISE_FLAG_PLATFORM: LogoFlagPlatform,\n WISE_FLAG_PLATFORM_INVERSE: LogoFlagPlatformInverse,\n};\n\nexport enum LogoType {\n WISE = 'WISE',\n WISE_BUSINESS = 'WISE_BUSINESS',\n WISE_PLATFORM = 'WISE_PLATFORM',\n}\n\nexport interface LogoProps {\n /** Extra classes applied to Logo */\n className?: string;\n /**\n * Renders a light-coloured version suited for dark backgrounds.\n * @default false\n */\n inverse?: boolean;\n /**\n * What type of logo to display\n * @default 'WISE'\n */\n type?: `${LogoType}`;\n}\n\nconst labelByType = {\n WISE: 'Wise',\n WISE_BUSINESS: 'Wise Business',\n WISE_PLATFORM: 'Wise Platform',\n} satisfies Record<`${LogoType}`, string>;\n\n/**\n * Renders the Wise wordmark logo. Responsive — shows the flag-only mark on small viewports\n * and the full wordmark on ≥576px (small breakpoint and above).\n *\n * @see {@link https://wise.design/foundations/logo Design Spec}\n */\nexport default function Logo({ className, inverse, type = 'WISE' }: LogoProps) {\n const LogoSm =\n svgPaths[`WISE_FLAG${type === 'WISE_PLATFORM' ? '_PLATFORM' : ''}${inverse ? '_INVERSE' : ''}`];\n const LogoMd = svgPaths[`${type}${inverse ? '_INVERSE' : ''}`];\n\n return (\n <span aria-label={labelByType[type]} role=\"img\" className={clsx(className, 'np-logo')}>\n <LogoSm className=\"np-logo-svg np-logo-svg--size-sm\" />\n <LogoMd className=\"np-logo-svg np-logo-svg--size-md\" />\n </span>\n );\n}\n"],"names":["svgPaths","WISE","LogoWise","WISE_BUSINESS","WISE_INVERSE","LogoWiseInverse","WISE_BUSINESS_INVERSE","WISE_PLATFORM","LogoWisePlatform","WISE_PLATFORM_INVERSE","LogoWisePlatformInverse","WISE_FLAG","LogoFlag","WISE_FLAG_INVERSE","LogoFlagInverse","WISE_FLAG_PLATFORM","LogoFlagPlatform","WISE_FLAG_PLATFORM_INVERSE","LogoFlagPlatformInverse","LogoType","labelByType","Logo","className","inverse","type","LogoSm","LogoMd","_jsxs","role","clsx","children","_jsx"],"mappings":";;;;AAaA,MAAMA,QAAQ,GAAG;AACfC,EAAAA,IAAI,EAAEC,QAAQ;AACdC,EAAAA,aAAa,EAAED,QAAQ;AACvBE,EAAAA,YAAY,EAAEC,eAAe;AAC7BC,EAAAA,qBAAqB,EAAED,eAAe;AACtCE,EAAAA,aAAa,EAAEC,gBAAgB;AAC/BC,EAAAA,qBAAqB,EAAEC,uBAAuB;AAC9CC,EAAAA,SAAS,EAAEC,QAAQ;AACnBC,EAAAA,iBAAiB,EAAEC,eAAe;AAClCC,EAAAA,kBAAkB,EAAEC,gBAAgB;AACpCC,EAAAA,0BAA0B,EAAEC;CAC7B;IAEWC;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/BA,EAAAA,QAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AACjC,CAAC,EAJWA,QAAQ,KAARA,QAAQ,GAAA,EAAA,CAAA,CAAA;AAqBpB,MAAMC,WAAW,GAAG;AAClBnB,EAAAA,IAAI,EAAE,MAAM;AACZE,EAAAA,aAAa,EAAE,eAAe;AAC9BI,EAAAA,aAAa,EAAE;CACwB;AAEzC;;;;;AAKG;AACW,SAAUc,IAAIA,CAAC;EAAEC,SAAS;EAAEC,OAAO;AAAEC,EAAAA,IAAI,GAAG;AAAM,CAAa,EAAA;AAC3E,EAAA,MAAMC,MAAM,GACVzB,QAAQ,CAAC,CAAA,SAAA,EAAYwB,IAAI,KAAK,eAAe,GAAG,WAAW,GAAG,EAAE,GAAGD,OAAO,GAAG,UAAU,GAAG,EAAE,EAAE,CAAC;AACjG,EAAA,MAAMG,MAAM,GAAG1B,QAAQ,CAAC,CAAA,EAAGwB,IAAI,CAAA,EAAGD,OAAO,GAAG,UAAU,GAAG,EAAE,EAAE,CAAC;AAE9D,EAAA,oBACEI,IAAA,CAAA,MAAA,EAAA;IAAM,YAAA,EAAYP,WAAW,CAACI,IAAI,CAAE;AAACI,IAAAA,IAAI,EAAC,KAAK;AAACN,IAAAA,SAAS,EAAEO,IAAI,CAACP,SAAS,EAAE,SAAS,CAAE;IAAAQ,QAAA,EAAA,cACpFC,GAAA,CAACN,MAAM,EAAA;AAACH,MAAAA,SAAS,EAAC;AAAkC,KAAA,CACpD,eAAAS,GAAA,CAACL,MAAM,EAAA;AAACJ,MAAAA,SAAS,EAAC;AAAkC,KAAA,CACtD;AAAA,GAAM,CAAC;AAEX;;;;"}
package/build/main.css CHANGED
@@ -29430,7 +29430,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29430
29430
  margin-top: -2px;
29431
29431
  }
29432
29432
 
29433
- @container (min-width: 308.1px) {
29433
+ @container (width > 308px) {
29434
29434
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
29435
29435
  height: var(--wds-list-item-control-wrapper-height);
29436
29436
  align-content: center;
@@ -29527,7 +29527,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29527
29527
  }
29528
29528
  }
29529
29529
 
29530
- @container (min-width: 240.1px) and (max-width: 308px) {
29530
+ @container (240px < width <= 308px) {
29531
29531
  .wds-list-item-gridWrapper .wds-list-item-media-image {
29532
29532
  -o-object-position: bottom left;
29533
29533
  object-position: bottom left;
@@ -29659,7 +29659,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29659
29659
  }
29660
29660
  }
29661
29661
 
29662
- @container (max-width: 240px) {
29662
+ @container (width <= 240px) {
29663
29663
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
29664
29664
  align-content: start;
29665
29665
  }
@@ -29987,7 +29987,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29987
29987
  justify-content: center;
29988
29988
  }
29989
29989
 
29990
- @container (min-width: 309px) {
29990
+ @container (width > 308px) {
29991
29991
  .wds-list-item-titles,
29992
29992
  .wds-list-item-value {
29993
29993
  min-height: 100%;
@@ -9,7 +9,7 @@
9
9
  .wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-noInfo-hasPrompt:not(:has(.wds-list-item-subtitle-value, .wds-list-item-subtitle)) .wds-list-item-prompt {
10
10
  margin-top: -2px;
11
11
  }
12
- @container (min-width: 308.1px) {
12
+ @container (width > 308px) {
13
13
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
14
14
  height: var(--wds-list-item-control-wrapper-height);
15
15
  align-content: center;
@@ -105,7 +105,7 @@
105
105
  grid-template-areas: "body";
106
106
  }
107
107
  }
108
- @container (min-width: 240.1px) and (max-width: 308px) {
108
+ @container (240px < width <= 308px) {
109
109
  .wds-list-item-gridWrapper .wds-list-item-media-image {
110
110
  -o-object-position: bottom left;
111
111
  object-position: bottom left;
@@ -236,7 +236,7 @@
236
236
  margin-top: var(--size-4);
237
237
  }
238
238
  }
239
- @container (max-width: 240px) {
239
+ @container (width <= 240px) {
240
240
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
241
241
  align-content: start;
242
242
  }
@@ -531,7 +531,7 @@
531
531
  flex-direction: column;
532
532
  justify-content: center;
533
533
  }
534
- @container (min-width: 309px) {
534
+ @container (width > 308px) {
535
535
  .wds-list-item-titles,
536
536
  .wds-list-item-value {
537
537
  min-height: 100%;
@@ -9,7 +9,7 @@
9
9
  .wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-noInfo-hasPrompt:not(:has(.wds-list-item-subtitle-value, .wds-list-item-subtitle)) .wds-list-item-prompt {
10
10
  margin-top: -2px;
11
11
  }
12
- @container (min-width: 308.1px) {
12
+ @container (width > 308px) {
13
13
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
14
14
  height: var(--wds-list-item-control-wrapper-height);
15
15
  align-content: center;
@@ -105,7 +105,7 @@
105
105
  grid-template-areas: "body";
106
106
  }
107
107
  }
108
- @container (min-width: 240.1px) and (max-width: 308px) {
108
+ @container (240px < width <= 308px) {
109
109
  .wds-list-item-gridWrapper .wds-list-item-media-image {
110
110
  -o-object-position: bottom left;
111
111
  object-position: bottom left;
@@ -236,7 +236,7 @@
236
236
  margin-top: var(--size-4);
237
237
  }
238
238
  }
239
- @container (max-width: 240px) {
239
+ @container (width <= 240px) {
240
240
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
241
241
  align-content: start;
242
242
  }
@@ -29430,7 +29430,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29430
29430
  margin-top: -2px;
29431
29431
  }
29432
29432
 
29433
- @container (min-width: 308.1px) {
29433
+ @container (width > 308px) {
29434
29434
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
29435
29435
  height: var(--wds-list-item-control-wrapper-height);
29436
29436
  align-content: center;
@@ -29527,7 +29527,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29527
29527
  }
29528
29528
  }
29529
29529
 
29530
- @container (min-width: 240.1px) and (max-width: 308px) {
29530
+ @container (240px < width <= 308px) {
29531
29531
  .wds-list-item-gridWrapper .wds-list-item-media-image {
29532
29532
  -o-object-position: bottom left;
29533
29533
  object-position: bottom left;
@@ -29659,7 +29659,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29659
29659
  }
29660
29660
  }
29661
29661
 
29662
- @container (max-width: 240px) {
29662
+ @container (width <= 240px) {
29663
29663
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
29664
29664
  align-content: start;
29665
29665
  }
@@ -29987,7 +29987,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29987
29987
  justify-content: center;
29988
29988
  }
29989
29989
 
29990
- @container (min-width: 309px) {
29990
+ @container (width > 308px) {
29991
29991
  .wds-list-item-titles,
29992
29992
  .wds-list-item-value {
29993
29993
  min-height: 100%;
@@ -6,7 +6,10 @@ export declare enum LogoType {
6
6
  export interface LogoProps {
7
7
  /** Extra classes applied to Logo */
8
8
  className?: string;
9
- /** If true, will use dark colours for dark on light theme */
9
+ /**
10
+ * Renders a light-coloured version suited for dark backgrounds.
11
+ * @default false
12
+ */
10
13
  inverse?: boolean;
11
14
  /**
12
15
  * What type of logo to display
@@ -14,5 +17,11 @@ export interface LogoProps {
14
17
  */
15
18
  type?: `${LogoType}`;
16
19
  }
20
+ /**
21
+ * Renders the Wise wordmark logo. Responsive — shows the flag-only mark on small viewports
22
+ * and the full wordmark on ≥576px (small breakpoint and above).
23
+ *
24
+ * @see {@link https://wise.design/foundations/logo Design Spec}
25
+ */
17
26
  export default function Logo({ className, inverse, type }: LogoProps): import("react").JSX.Element;
18
27
  //# sourceMappingURL=Logo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../src/logo/Logo.tsx"],"names":[],"mappings":"AA0BA,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC;CACtB;AAQD,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAa,EAAE,EAAE,SAAS,+BAW5E"}
1
+ {"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../src/logo/Logo.tsx"],"names":[],"mappings":"AA0BA,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC;CACtB;AAQD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAa,EAAE,EAAE,SAAS,+BAW5E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-43c52b9",
3
+ "version": "0.0.0-experimental-ef0cf2e",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -9,7 +9,7 @@
9
9
  .wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-noInfo-hasPrompt:not(:has(.wds-list-item-subtitle-value, .wds-list-item-subtitle)) .wds-list-item-prompt {
10
10
  margin-top: -2px;
11
11
  }
12
- @container (min-width: 308.1px) {
12
+ @container (width > 308px) {
13
13
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
14
14
  height: var(--wds-list-item-control-wrapper-height);
15
15
  align-content: center;
@@ -105,7 +105,7 @@
105
105
  grid-template-areas: "body";
106
106
  }
107
107
  }
108
- @container (min-width: 240.1px) and (max-width: 308px) {
108
+ @container (240px < width <= 308px) {
109
109
  .wds-list-item-gridWrapper .wds-list-item-media-image {
110
110
  -o-object-position: bottom left;
111
111
  object-position: bottom left;
@@ -236,7 +236,7 @@
236
236
  margin-top: var(--size-4);
237
237
  }
238
238
  }
239
- @container (max-width: 240px) {
239
+ @container (width <= 240px) {
240
240
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
241
241
  align-content: start;
242
242
  }
@@ -531,7 +531,7 @@
531
531
  flex-direction: column;
532
532
  justify-content: center;
533
533
  }
534
- @container (min-width: 309px) {
534
+ @container (width > 308px) {
535
535
  .wds-list-item-titles,
536
536
  .wds-list-item-value {
537
537
  min-height: 100%;
@@ -9,7 +9,7 @@
9
9
  .wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-noInfo-hasPrompt:not(:has(.wds-list-item-subtitle-value, .wds-list-item-subtitle)) .wds-list-item-prompt {
10
10
  margin-top: -2px;
11
11
  }
12
- @container (min-width: 308.1px) {
12
+ @container (width > 308px) {
13
13
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
14
14
  height: var(--wds-list-item-control-wrapper-height);
15
15
  align-content: center;
@@ -105,7 +105,7 @@
105
105
  grid-template-areas: "body";
106
106
  }
107
107
  }
108
- @container (min-width: 240.1px) and (max-width: 308px) {
108
+ @container (240px < width <= 308px) {
109
109
  .wds-list-item-gridWrapper .wds-list-item-media-image {
110
110
  -o-object-position: bottom left;
111
111
  object-position: bottom left;
@@ -236,7 +236,7 @@
236
236
  margin-top: var(--size-4);
237
237
  }
238
238
  }
239
- @container (max-width: 240px) {
239
+ @container (width <= 240px) {
240
240
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
241
241
  align-content: start;
242
242
  }
@@ -14,8 +14,7 @@
14
14
  }
15
15
  }
16
16
 
17
- // 308px+
18
- @container (min-width: unit(@wds-list-item-cq-max + 0.1, px)) {
17
+ @container (width > @wds-list-item-cq-max) {
19
18
  .wds-list-item-control-wrapper {
20
19
  height: var(--wds-list-item-control-wrapper-height);
21
20
  align-content: center;
@@ -170,8 +169,9 @@
170
169
  }
171
170
  }
172
171
 
173
- // 240+ to 308px
174
- @container (min-width: unit(@wds-list-item-cq-min + 0.1, px)) and (max-width: unit(@wds-list-item-cq-max, px)) {
172
+ // LESS struggles with ranged container queries so
173
+ // we need to escape the interpolated expression.
174
+ @container (~"@{wds-list-item-cq-min} < width <= @{wds-list-item-cq-max}") {
175
175
  .wds-list-item-media-image{
176
176
  object-position: bottom left;
177
177
  }
@@ -406,8 +406,7 @@
406
406
  }
407
407
  }
408
408
 
409
- // 0 to 240px
410
- @container (max-width: unit(@wds-list-item-cq-min, px)) {
409
+ @container (width <= @wds-list-item-cq-min) {
411
410
  .wds-list-item-control-wrapper {
412
411
  align-content: start;
413
412
  }
@@ -189,7 +189,7 @@
189
189
  flex-direction: column;
190
190
  justify-content: center;
191
191
 
192
- @container (min-width: unit(@wds-list-item-cq-max + 1, px)) {
192
+ @container (width > @wds-list-item-cq-max) {
193
193
  min-height: var(--wds-list-item-value-min-height, 100%);
194
194
  }
195
195
  }
@@ -7,5 +7,5 @@
7
7
  // `packages/components/src/listItem/constants.ts`
8
8
  //
9
9
  // @see https://storybook.wise.design/?path=/story/content-listitem--responsiveness
10
- @wds-list-item-cq-min: 240;
11
- @wds-list-item-cq-max: 308;
10
+ @wds-list-item-cq-min: 240px;
11
+ @wds-list-item-cq-max: 308px;
@@ -225,3 +225,58 @@ export const ImageAlignment: StoryObj<PreviewStoryArgs> = {
225
225
  );
226
226
  },
227
227
  };
228
+
229
+ // Our container queries left 1px gap between breakpoint definitions.
230
+ // This test makes sure that LI placed in a parent of {width} still
231
+ // works fine, where: {breakpoint} < {width} < {breakpoint} + 1px
232
+ export const SubPixelWidths: StoryObj<PreviewStoryArgs> = {
233
+ parameters: {
234
+ controls: { disable: false },
235
+ },
236
+ args: {
237
+ title: lorem5,
238
+ subtitle: lorem10,
239
+ previewImageSize: 48,
240
+ previewWithLineGuides: true,
241
+ previewPrompt: false,
242
+ },
243
+ argTypes: previewArgTypes,
244
+ render: (args: PreviewStoryArgs) => {
245
+ const [props] = getPropsForPreview(args);
246
+
247
+ return (
248
+ <>
249
+ <List
250
+ style={{
251
+ display: 'grid',
252
+ gridTemplateColumns: '1fr 1fr',
253
+ width: `${2 * LISTITEM_CQ.MIN + 1}px`,
254
+ }}
255
+ >
256
+ <ListItem
257
+ {...props}
258
+ title={`This list item is ${LISTITEM_CQ.MIN + 0.5}px wide`}
259
+ subtitle="this translates to '@wds-list-item-cq-min + 0.5px'"
260
+ media={<ListItem.Image src={portraitImage} alt="portrait image" />}
261
+ />
262
+ <li />
263
+ </List>
264
+ <List
265
+ style={{
266
+ display: 'grid',
267
+ gridTemplateColumns: '1fr 1fr',
268
+ width: `${2 * LISTITEM_CQ.MAX + 1}px`,
269
+ }}
270
+ >
271
+ <ListItem
272
+ {...props}
273
+ title={`This list item is ${LISTITEM_CQ.MAX + 0.5}px wide`}
274
+ subtitle="this translates to '@wds-list-item-cq-max + 0.5px'"
275
+ media={<ListItem.Image src={portraitImage} alt="portrait image" />}
276
+ />
277
+ <li />
278
+ </List>
279
+ </>
280
+ );
281
+ },
282
+ };
@@ -2,36 +2,196 @@ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
 
3
3
  import Logo, { LogoType } from '.';
4
4
 
5
- export default {
5
+ /**
6
+ * **Design guidance**: <a href="https://wise.design/foundations/logo" target="_blank">wise.design/foundations/logo</a>
7
+ */
8
+ const meta: Meta<typeof Logo> = {
6
9
  component: Logo,
7
10
  title: 'Content/Logo',
8
- render: () => {
9
- return (
10
- <>
11
- <div>
11
+ args: {
12
+ type: 'WISE',
13
+ inverse: false,
14
+ },
15
+ argTypes: {
16
+ type: {
17
+ control: 'radio',
18
+ options: Object.values(LogoType),
19
+ },
20
+ },
21
+ parameters: {
22
+ docs: { toc: true },
23
+ },
24
+ };
25
+
26
+ export default meta;
27
+
28
+ type Story = StoryObj<typeof Logo>;
29
+
30
+ /** Explore all props via the controls panel. */
31
+ 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
+ ),
44
+ };
45
+
46
+ /**
47
+ * The three logo types: standard Wise, Wise Business, and Wise Platform. <br />
48
+ * `WISE_BUSINESS` renders the same SVG as `WISE` but with the accessible label "Wise Business".
49
+ */
50
+ export const Types: Story = {
51
+ argTypes: {
52
+ type: { table: { disable: true } },
53
+ },
54
+ render: (args) => (
55
+ <div
56
+ style={{
57
+ display: 'flex',
58
+ gap: '3rem',
59
+ alignItems: 'center',
60
+ padding: '2rem',
61
+ borderRadius: '8px',
62
+ ...(args.inverse
63
+ ? { backgroundColor: 'var(--color-background-screen-dark, #0e0f0c)' }
64
+ : {}),
65
+ }}
66
+ >
67
+ {Object.values(LogoType).map((type) => (
68
+ <div
69
+ key={type}
70
+ style={{
71
+ display: 'flex',
72
+ flexDirection: 'column',
73
+ alignItems: 'center',
74
+ gap: '0.5rem',
75
+ }}
76
+ >
77
+ <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>
86
+ </div>
87
+ ))}
88
+ </div>
89
+ ),
90
+ parameters: {
91
+ docs: {
92
+ source: {
93
+ code: `<Logo type="WISE" />
94
+ <Logo type="WISE_BUSINESS" />
95
+ <Logo type="WISE_PLATFORM" />`,
96
+ },
97
+ },
98
+ },
99
+ };
100
+
101
+ /**
102
+ * Below `576px` the flag-only mark is shown; at `576px` and above the full wordmark is displayed.
103
+ */
104
+ export const Responsive: Story = {
105
+ argTypes: {
106
+ type: { table: { disable: true } },
107
+ inverse: { table: { disable: true } },
108
+ },
109
+ 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' }}>
12
116
  {Object.values(LogoType).map((type) => (
13
- <div key={type} className="m-a-2">
14
- <Logo type={type} />
15
- </div>
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>
16
123
  ))}
17
124
  </div>
18
- <div className="bg--dark">
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' }}>
19
131
  {Object.values(LogoType).map((type) => (
20
- <div key={type} className="m-a-2">
21
- <Logo type={type} inverse />
22
- </div>
132
+ <Logo key={type} type={type} />
23
133
  ))}
24
134
  </div>
25
- </>
26
- );
135
+ </div>
136
+ </div>
137
+ ),
138
+ parameters: {
139
+ docs: {
140
+ source: { code: null },
141
+ },
27
142
  },
28
- } satisfies Meta<typeof Logo>;
29
-
30
- type Story = StoryObj<typeof Logo>;
143
+ };
31
144
 
32
- export const Basic: Story = {
33
- args: {
34
- type: 'WISE',
35
- inverse: false,
145
+ /**
146
+ * All logo types on a dark background using the `inverse` prop, which renders a
147
+ * light-coloured version suited for dark surfaces.
148
+ */
149
+ export const Inverse: Story = {
150
+ argTypes: {
151
+ type: { table: { disable: true } },
152
+ inverse: { table: { disable: true } },
153
+ },
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
+ render: (args) => (
171
+ <>
172
+ {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>
184
+ </div>
185
+ ))}
186
+ </>
187
+ ),
188
+ parameters: {
189
+ docs: {
190
+ source: {
191
+ code: `<Logo type="WISE" inverse />
192
+ <Logo type="WISE_BUSINESS" inverse />
193
+ <Logo type="WISE_PLATFORM" inverse />`,
194
+ },
195
+ },
36
196
  },
37
197
  };
@@ -1,5 +1,6 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import Logo from '.';
2
+
3
+ import Logo, { LogoType } from '.';
3
4
  import { withVariantConfig } from '../../.storybook/helpers';
4
5
 
5
6
  const meta: Meta<typeof Logo> = {
@@ -7,14 +8,46 @@ const meta: Meta<typeof Logo> = {
7
8
  tags: ['!autodocs', '!manifest'],
8
9
  title: 'Content/Logo/Tests',
9
10
  };
11
+
10
12
  export default meta;
11
13
 
12
14
  type Story = StoryObj<typeof Logo>;
13
15
 
14
- export const Mobile: Story = {
15
- args: {
16
- type: 'WISE',
17
- inverse: false,
18
- },
19
- ...withVariantConfig(['mobile']),
16
+ const AllVariants = () => (
17
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
18
+ <div style={{ display: 'flex', gap: '2rem', alignItems: 'center' }}>
19
+ {Object.values(LogoType).map((type) => (
20
+ <Logo key={type} type={type} />
21
+ ))}
22
+ </div>
23
+ <div
24
+ style={{
25
+ display: 'flex',
26
+ gap: '2rem',
27
+ alignItems: 'center',
28
+ backgroundColor: 'var(--color-content-primary)',
29
+ padding: '1rem',
30
+ borderRadius: '8px',
31
+ }}
32
+ >
33
+ {Object.values(LogoType).map((type) => (
34
+ <Logo key={type} type={type} inverse />
35
+ ))}
36
+ </div>
37
+ </div>
38
+ );
39
+
40
+ export const Variants: Story = {
41
+ render: () => <AllVariants />,
42
+ ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green']),
43
+ };
44
+
45
+ export const RTL: Story = {
46
+ render: () => <AllVariants />,
47
+ ...withVariantConfig(['rtl']),
48
+ };
49
+
50
+ export const Zoom400: Story = {
51
+ render: () => <AllVariants />,
52
+ ...withVariantConfig(['400%']),
20
53
  };
package/src/logo/Logo.tsx CHANGED
@@ -33,7 +33,10 @@ export enum LogoType {
33
33
  export interface LogoProps {
34
34
  /** Extra classes applied to Logo */
35
35
  className?: string;
36
- /** If true, will use dark colours for dark on light theme */
36
+ /**
37
+ * Renders a light-coloured version suited for dark backgrounds.
38
+ * @default false
39
+ */
37
40
  inverse?: boolean;
38
41
  /**
39
42
  * What type of logo to display
@@ -48,6 +51,12 @@ const labelByType = {
48
51
  WISE_PLATFORM: 'Wise Platform',
49
52
  } satisfies Record<`${LogoType}`, string>;
50
53
 
54
+ /**
55
+ * Renders the Wise wordmark logo. Responsive — shows the flag-only mark on small viewports
56
+ * and the full wordmark on ≥576px (small breakpoint and above).
57
+ *
58
+ * @see {@link https://wise.design/foundations/logo Design Spec}
59
+ */
51
60
  export default function Logo({ className, inverse, type = 'WISE' }: LogoProps) {
52
61
  const LogoSm =
53
62
  svgPaths[`WISE_FLAG${type === 'WISE_PLATFORM' ? '_PLATFORM' : ''}${inverse ? '_INVERSE' : ''}`];
package/src/main.css CHANGED
@@ -29430,7 +29430,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29430
29430
  margin-top: -2px;
29431
29431
  }
29432
29432
 
29433
- @container (min-width: 308.1px) {
29433
+ @container (width > 308px) {
29434
29434
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
29435
29435
  height: var(--wds-list-item-control-wrapper-height);
29436
29436
  align-content: center;
@@ -29527,7 +29527,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29527
29527
  }
29528
29528
  }
29529
29529
 
29530
- @container (min-width: 240.1px) and (max-width: 308px) {
29530
+ @container (240px < width <= 308px) {
29531
29531
  .wds-list-item-gridWrapper .wds-list-item-media-image {
29532
29532
  -o-object-position: bottom left;
29533
29533
  object-position: bottom left;
@@ -29659,7 +29659,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29659
29659
  }
29660
29660
  }
29661
29661
 
29662
- @container (max-width: 240px) {
29662
+ @container (width <= 240px) {
29663
29663
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
29664
29664
  align-content: start;
29665
29665
  }
@@ -29987,7 +29987,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29987
29987
  justify-content: center;
29988
29988
  }
29989
29989
 
29990
- @container (min-width: 309px) {
29990
+ @container (width > 308px) {
29991
29991
  .wds-list-item-titles,
29992
29992
  .wds-list-item-value {
29993
29993
  min-height: 100%;
@@ -1,67 +0,0 @@
1
- import List from '../../list';
2
-
3
- import { ListItem, type ListItemProps } from '../ListItem';
4
- import {
5
- InfoCircle,
6
- Documents,
7
- Warning,
8
- Home,
9
- Globe,
10
- People,
11
- Link as LinkIcon,
12
- } from '@transferwise/icons';
13
-
14
- export default {
15
- title: 'Aidan',
16
- };
17
-
18
- export const Testing = {
19
- render: () => {
20
- return (
21
- <div
22
- style={{
23
- display: 'flex',
24
- gap: 'var(--size-4)',
25
- flexDirection: 'row',
26
- width: '689px',
27
- // border: '1px solid black',
28
- }}
29
- >
30
- <div
31
- style={{
32
- flex: 1,
33
- }}
34
- >
35
- <div
36
- style={{
37
- border: '1px solid var(--color-border-neutral)',
38
- borderRadius: 'var(--radius-medium)',
39
- padding: 'var(--size-16)',
40
- display: 'flex',
41
- justifyContent: 'center',
42
- }}
43
- >
44
- <ListItem
45
- title="System maintenance"
46
- subtitle="Scheduled downtime"
47
- inverted
48
- control={
49
- <ListItem.IconButton partiallyInteractive>
50
- <InfoCircle />
51
- </ListItem.IconButton>
52
- }
53
- />
54
- </div>
55
- </div>
56
-
57
- <div
58
- style={{
59
- flex: 1,
60
- }}
61
- >
62
- <span>a</span>
63
- </div>
64
- </div>
65
- );
66
- },
67
- };