@transferwise/components 46.160.8 → 46.161.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/build/Tag/Tag.js +45 -0
  2. package/build/Tag/Tag.js.map +1 -0
  3. package/build/Tag/Tag.mjs +41 -0
  4. package/build/Tag/Tag.mjs.map +1 -0
  5. package/build/index.js +2 -0
  6. package/build/index.js.map +1 -1
  7. package/build/index.mjs +1 -0
  8. package/build/index.mjs.map +1 -1
  9. package/build/main.css +31 -32
  10. package/build/styles/Tag/Tag.css +30 -0
  11. package/build/styles/css/neptune-core.css +1 -32
  12. package/build/styles/css/neptune.css +1 -32
  13. package/build/styles/main.css +31 -32
  14. package/build/styles/styles/less/neptune-core.css +1 -32
  15. package/build/styles/styles/less/neptune.css +1 -32
  16. package/build/types/Tag/Tag.d.ts +24 -0
  17. package/build/types/Tag/Tag.d.ts.map +1 -0
  18. package/build/types/Tag/Tag.types.d.ts +39 -0
  19. package/build/types/Tag/Tag.types.d.ts.map +1 -0
  20. package/build/types/Tag/index.d.ts +3 -0
  21. package/build/types/Tag/index.d.ts.map +1 -0
  22. package/build/types/index.d.ts +2 -0
  23. package/build/types/index.d.ts.map +1 -1
  24. package/package.json +3 -3
  25. package/src/Tag/Tag.css +30 -0
  26. package/src/Tag/Tag.less +31 -0
  27. package/src/Tag/Tag.test.tsx +70 -0
  28. package/src/Tag/Tag.tsx +71 -0
  29. package/src/Tag/Tag.types.ts +46 -0
  30. package/src/Tag/_stories/Tag.story.tsx +245 -0
  31. package/src/Tag/_stories/Tag.test.story.tsx +121 -0
  32. package/src/Tag/index.ts +2 -0
  33. package/src/index.ts +2 -0
  34. package/src/main.css +31 -32
  35. package/src/main.less +1 -0
  36. package/src/styles/less/core/_fonts.less +9 -29
  37. package/src/styles/less/core/_scaffolding.less +1 -12
  38. package/src/styles/less/neptune-core.css +1 -32
  39. package/src/styles/less/neptune.css +1 -32
  40. package/src/test-utils/assets/card-payment-bakery.webp +0 -0
  41. package/build/styles/fonts/TW-Averta-Bold.woff +0 -0
  42. package/build/styles/fonts/TW-Averta-Bold.woff2 +0 -0
  43. package/build/styles/fonts/TW-Averta-Regular.woff +0 -0
  44. package/build/styles/fonts/TW-Averta-Regular.woff2 +0 -0
  45. package/build/styles/fonts/TW-Averta-Semibold.woff +0 -0
  46. package/build/styles/fonts/TW-Averta-Semibold.woff2 +0 -0
  47. package/build/styles/fonts/TransferWise-IconFont.svg +0 -81
  48. package/build/styles/fonts/TransferWise-IconFont.woff +0 -0
  49. package/src/styles/fonts/TW-Averta-Bold.woff +0 -0
  50. package/src/styles/fonts/TW-Averta-Bold.woff2 +0 -0
  51. package/src/styles/fonts/TW-Averta-Regular.woff +0 -0
  52. package/src/styles/fonts/TW-Averta-Regular.woff2 +0 -0
  53. package/src/styles/fonts/TW-Averta-Semibold.woff +0 -0
  54. package/src/styles/fonts/TW-Averta-Semibold.woff2 +0 -0
  55. package/src/styles/fonts/TransferWise-IconFont.svg +0 -81
  56. package/src/styles/fonts/TransferWise-IconFont.woff +0 -0
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var clsx = require('clsx');
7
+ var componentsTheming = require('@wise/components-theming');
8
+ var SentimentSurface = require('../SentimentSurface/SentimentSurface.js');
9
+ var jsxRuntime = require('react/jsx-runtime');
10
+
11
+ const Tag = /*#__PURE__*/React.forwardRef(function Tag({
12
+ label,
13
+ sentiment = 'neutral',
14
+ size = 'small',
15
+ emphasis = 'base',
16
+ overMedia = false,
17
+ className,
18
+ id,
19
+ 'data-testid': dataTestId
20
+ }, ref) {
21
+ const {
22
+ theme,
23
+ screenMode
24
+ } = componentsTheming.useTheme();
25
+ return /*#__PURE__*/jsxRuntime.jsx(componentsTheming.ThemeProvider, {
26
+ theme: theme,
27
+ screenMode: overMedia ? 'dark' : screenMode,
28
+ className: "wds-tag-theme",
29
+ children: /*#__PURE__*/jsxRuntime.jsx(SentimentSurface.default
30
+ // @ts-expect-error - SentimentSurface forwardRef types don't expose ref in props
31
+ , {
32
+ ref: ref,
33
+ as: "span",
34
+ sentiment: sentiment,
35
+ emphasis: overMedia ? 'elevated' : emphasis,
36
+ id: id,
37
+ "data-testid": dataTestId,
38
+ className: clsx.clsx('wds-tag', `wds-tag--${size}`, `wds-tag--${sentiment}`, 'np-text-body-default-bold', className),
39
+ children: label
40
+ })
41
+ });
42
+ });
43
+
44
+ exports.default = Tag;
45
+ //# sourceMappingURL=Tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.js","sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport { ThemeProvider, useTheme } from '@wise/components-theming';\n\nimport SentimentSurface from '../SentimentSurface';\nimport { TagProps } from './Tag.types';\n\n/**\n * Tag is a small, non-interactive label that categorises or highlights a piece of content.\n *\n * @param {string} label - The text of the tag, kept to a word or two.\n * @param {Sentiment} [sentiment='neutral'] - Optional prop to set the sentiment type (negative, warning, neutral, success, proposition).\n * @param {TagSize} [size='small'] - Optional prop to set the size of the tag (small or large).\n * @param {Emphasis} [emphasis='base'] - Optional prop to specify the emphasis level (base or elevated).\n * @param {boolean} [overMedia=false] - If true, renders the tag for use over media, keeping the colours it uses in dark screen modes.\n * @param {string} [className] - Additional CSS classes to apply.\n * @param {string} [id] - Unique identifier for the component.\n * @param {string} [data-testid] - A unique string that appears as data attribute `data-testid` in the rendered code.\n *\n * @component\n * @example\n * ```tsx\n * <Tag sentiment=\"success\" label=\"Verified\" />\n * ```\n *\n * @see {@link https://storybook.wise.design/?path=/docs/tag--docs|Storybook Wise Design}\n */\nconst Tag = forwardRef<HTMLSpanElement, TagProps>(function Tag(\n {\n label,\n sentiment = 'neutral',\n size = 'small',\n emphasis = 'base',\n overMedia = false,\n className,\n id,\n 'data-testid': dataTestId,\n },\n ref,\n) {\n const { theme, screenMode } = useTheme();\n\n return (\n <ThemeProvider\n theme={theme}\n screenMode={overMedia ? 'dark' : screenMode}\n className=\"wds-tag-theme\"\n >\n <SentimentSurface\n // @ts-expect-error - SentimentSurface forwardRef types don't expose ref in props\n ref={ref}\n as=\"span\"\n sentiment={sentiment}\n emphasis={overMedia ? 'elevated' : emphasis}\n id={id}\n data-testid={dataTestId}\n className={clsx(\n 'wds-tag',\n `wds-tag--${size}`,\n `wds-tag--${sentiment}`,\n 'np-text-body-default-bold',\n className,\n )}\n >\n {label}\n </SentimentSurface>\n </ThemeProvider>\n );\n});\n\nexport default Tag;\n"],"names":["Tag","forwardRef","label","sentiment","size","emphasis","overMedia","className","id","dataTestId","ref","theme","screenMode","useTheme","_jsx","ThemeProvider","children","SentimentSurface","as","clsx"],"mappings":";;;;;;;;;;AA2BA,MAAMA,GAAG,gBAAGC,gBAAU,CAA4B,SAASD,GAAGA,CAC5D;EACEE,KAAK;AACLC,EAAAA,SAAS,GAAG,SAAS;AACrBC,EAAAA,IAAI,GAAG,OAAO;AACdC,EAAAA,QAAQ,GAAG,MAAM;AACjBC,EAAAA,SAAS,GAAG,KAAK;EACjBC,SAAS;EACTC,EAAE;AACF,EAAA,aAAa,EAAEC;AAAU,CAC1B,EACDC,GAAG,EAAA;EAEH,MAAM;IAAEC,KAAK;AAAEC,IAAAA;GAAY,GAAGC,0BAAQ,EAAE;EAExC,oBACEC,cAAA,CAACC,+BAAa,EAAA;AACZJ,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,UAAU,EAAEN,SAAS,GAAG,MAAM,GAAGM,UAAW;AAC5CL,IAAAA,SAAS,EAAC,eAAe;IAAAS,QAAA,eAEzBF,cAAA,CAACG;AACC;AAAA,MAAA;AACAP,MAAAA,GAAG,EAAEA,GAAI;AACTQ,MAAAA,EAAE,EAAC,MAAM;AACTf,MAAAA,SAAS,EAAEA,SAAU;AACrBE,MAAAA,QAAQ,EAAEC,SAAS,GAAG,UAAU,GAAGD,QAAS;AAC5CG,MAAAA,EAAE,EAAEA,EAAG;AACP,MAAA,aAAA,EAAaC,UAAW;AACxBF,MAAAA,SAAS,EAAEY,SAAI,CACb,SAAS,EACT,YAAYf,IAAI,CAAA,CAAE,EAClB,CAAA,SAAA,EAAYD,SAAS,CAAA,CAAE,EACvB,2BAA2B,EAC3BI,SAAS,CACT;AAAAS,MAAAA,QAAA,EAEDd;KACe;AACpB,GAAe,CAAC;AAEpB,CAAC;;;;"}
@@ -0,0 +1,41 @@
1
+ import { forwardRef } from 'react';
2
+ import { clsx } from 'clsx';
3
+ import { useTheme, ThemeProvider } from '@wise/components-theming';
4
+ import SentimentSurface from '../SentimentSurface/SentimentSurface.mjs';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ const Tag = /*#__PURE__*/forwardRef(function Tag({
8
+ label,
9
+ sentiment = 'neutral',
10
+ size = 'small',
11
+ emphasis = 'base',
12
+ overMedia = false,
13
+ className,
14
+ id,
15
+ 'data-testid': dataTestId
16
+ }, ref) {
17
+ const {
18
+ theme,
19
+ screenMode
20
+ } = useTheme();
21
+ return /*#__PURE__*/jsx(ThemeProvider, {
22
+ theme: theme,
23
+ screenMode: overMedia ? 'dark' : screenMode,
24
+ className: "wds-tag-theme",
25
+ children: /*#__PURE__*/jsx(SentimentSurface
26
+ // @ts-expect-error - SentimentSurface forwardRef types don't expose ref in props
27
+ , {
28
+ ref: ref,
29
+ as: "span",
30
+ sentiment: sentiment,
31
+ emphasis: overMedia ? 'elevated' : emphasis,
32
+ id: id,
33
+ "data-testid": dataTestId,
34
+ className: clsx('wds-tag', `wds-tag--${size}`, `wds-tag--${sentiment}`, 'np-text-body-default-bold', className),
35
+ children: label
36
+ })
37
+ });
38
+ });
39
+
40
+ export { Tag as default };
41
+ //# sourceMappingURL=Tag.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.mjs","sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport { ThemeProvider, useTheme } from '@wise/components-theming';\n\nimport SentimentSurface from '../SentimentSurface';\nimport { TagProps } from './Tag.types';\n\n/**\n * Tag is a small, non-interactive label that categorises or highlights a piece of content.\n *\n * @param {string} label - The text of the tag, kept to a word or two.\n * @param {Sentiment} [sentiment='neutral'] - Optional prop to set the sentiment type (negative, warning, neutral, success, proposition).\n * @param {TagSize} [size='small'] - Optional prop to set the size of the tag (small or large).\n * @param {Emphasis} [emphasis='base'] - Optional prop to specify the emphasis level (base or elevated).\n * @param {boolean} [overMedia=false] - If true, renders the tag for use over media, keeping the colours it uses in dark screen modes.\n * @param {string} [className] - Additional CSS classes to apply.\n * @param {string} [id] - Unique identifier for the component.\n * @param {string} [data-testid] - A unique string that appears as data attribute `data-testid` in the rendered code.\n *\n * @component\n * @example\n * ```tsx\n * <Tag sentiment=\"success\" label=\"Verified\" />\n * ```\n *\n * @see {@link https://storybook.wise.design/?path=/docs/tag--docs|Storybook Wise Design}\n */\nconst Tag = forwardRef<HTMLSpanElement, TagProps>(function Tag(\n {\n label,\n sentiment = 'neutral',\n size = 'small',\n emphasis = 'base',\n overMedia = false,\n className,\n id,\n 'data-testid': dataTestId,\n },\n ref,\n) {\n const { theme, screenMode } = useTheme();\n\n return (\n <ThemeProvider\n theme={theme}\n screenMode={overMedia ? 'dark' : screenMode}\n className=\"wds-tag-theme\"\n >\n <SentimentSurface\n // @ts-expect-error - SentimentSurface forwardRef types don't expose ref in props\n ref={ref}\n as=\"span\"\n sentiment={sentiment}\n emphasis={overMedia ? 'elevated' : emphasis}\n id={id}\n data-testid={dataTestId}\n className={clsx(\n 'wds-tag',\n `wds-tag--${size}`,\n `wds-tag--${sentiment}`,\n 'np-text-body-default-bold',\n className,\n )}\n >\n {label}\n </SentimentSurface>\n </ThemeProvider>\n );\n});\n\nexport default Tag;\n"],"names":["Tag","forwardRef","label","sentiment","size","emphasis","overMedia","className","id","dataTestId","ref","theme","screenMode","useTheme","_jsx","ThemeProvider","children","SentimentSurface","as","clsx"],"mappings":";;;;;;AA2BA,MAAMA,GAAG,gBAAGC,UAAU,CAA4B,SAASD,GAAGA,CAC5D;EACEE,KAAK;AACLC,EAAAA,SAAS,GAAG,SAAS;AACrBC,EAAAA,IAAI,GAAG,OAAO;AACdC,EAAAA,QAAQ,GAAG,MAAM;AACjBC,EAAAA,SAAS,GAAG,KAAK;EACjBC,SAAS;EACTC,EAAE;AACF,EAAA,aAAa,EAAEC;AAAU,CAC1B,EACDC,GAAG,EAAA;EAEH,MAAM;IAAEC,KAAK;AAAEC,IAAAA;GAAY,GAAGC,QAAQ,EAAE;EAExC,oBACEC,GAAA,CAACC,aAAa,EAAA;AACZJ,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,UAAU,EAAEN,SAAS,GAAG,MAAM,GAAGM,UAAW;AAC5CL,IAAAA,SAAS,EAAC,eAAe;IAAAS,QAAA,eAEzBF,GAAA,CAACG;AACC;AAAA,MAAA;AACAP,MAAAA,GAAG,EAAEA,GAAI;AACTQ,MAAAA,EAAE,EAAC,MAAM;AACTf,MAAAA,SAAS,EAAEA,SAAU;AACrBE,MAAAA,QAAQ,EAAEC,SAAS,GAAG,UAAU,GAAGD,QAAS;AAC5CG,MAAAA,EAAE,EAAEA,EAAG;AACP,MAAA,aAAA,EAAaC,UAAW;AACxBF,MAAAA,SAAS,EAAEY,IAAI,CACb,SAAS,EACT,YAAYf,IAAI,CAAA,CAAE,EAClB,CAAA,SAAA,EAAYD,SAAS,CAAA,CAAE,EACvB,2BAA2B,EAC3BI,SAAS,CACT;AAAAS,MAAAA,QAAA,EAEDd;KACe;AACpB,GAAe,CAAC;AAEpB,CAAC;;;;"}
package/build/index.js CHANGED
@@ -114,6 +114,7 @@ var Summary = require('./_deprecated/Summary/Summary.js');
114
114
  var Switch = require('./Switch/Switch.js');
115
115
  var SwitchOption = require('./_deprecated/SwitchOption/SwitchOption.js');
116
116
  var Tabs = require('./Tabs/Tabs.js');
117
+ var Tag = require('./Tag/Tag.js');
117
118
  var TextareaWithDisplayFormat = require('./TextareaWithDisplayFormat/TextareaWithDisplayFormat.js');
118
119
  var Title = require('./Title/Title.js');
119
120
  var Tile = require('./Tile/Tile.js');
@@ -284,6 +285,7 @@ exports.Summary = Summary.default;
284
285
  exports.Switch = Switch.default;
285
286
  exports.SwitchOption = SwitchOption.default;
286
287
  exports.Tabs = Tabs.default;
288
+ exports.Tag = Tag.default;
287
289
  exports.TextareaWithDisplayFormat = TextareaWithDisplayFormat.default;
288
290
  exports.Title = Title.default;
289
291
  exports.Tile = Tile.default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/build/index.mjs CHANGED
@@ -112,6 +112,7 @@ export { default as Summary } from './_deprecated/Summary/Summary.mjs';
112
112
  export { default as Switch } from './Switch/Switch.mjs';
113
113
  export { default as SwitchOption } from './_deprecated/SwitchOption/SwitchOption.mjs';
114
114
  export { default as Tabs } from './Tabs/Tabs.mjs';
115
+ export { default as Tag } from './Tag/Tag.mjs';
115
116
  export { default as TextareaWithDisplayFormat } from './TextareaWithDisplayFormat/TextareaWithDisplayFormat.mjs';
116
117
  export { default as Title } from './Title/Title.mjs';
117
118
  export { default as Tile } from './Tile/Tile.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/build/main.css CHANGED
@@ -2627,26 +2627,6 @@
2627
2627
  src: url("styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2") format("woff2");
2628
2628
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
2629
2629
  }
2630
- @font-face {
2631
- font-weight: 400;
2632
- font-weight: var(--font-weight-regular);
2633
- font-family: Averta;
2634
- src: url("styles/fonts/TW-Averta-Regular.woff2") format("woff2"), url("styles/fonts/TW-Averta-Regular.woff") format("woff");
2635
- font-display: swap;
2636
- }
2637
- @font-face {
2638
- font-weight: 600;
2639
- font-weight: var(--font-weight-semi-bold);
2640
- font-family: Averta;
2641
- src: url("styles/fonts/TW-Averta-Semibold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Semibold.woff") format("woff");
2642
- font-display: swap;
2643
- }
2644
- @font-face {
2645
- font-weight: 700;
2646
- font-weight: var(--font-weight-bold);
2647
- font-family: Averta;
2648
- src: url("styles/fonts/TW-Averta-Bold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Bold.woff") format("woff");
2649
- }
2650
2630
  @font-face {
2651
2631
  font-family: "Wise Sans";
2652
2632
  font-style: normal;
@@ -2831,7 +2811,6 @@ summary {
2831
2811
  }
2832
2812
  :root {
2833
2813
  --base-font-size: 16px;
2834
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif;
2835
2814
  --input-group-addon-padding: 12px 16px calc(12px - 2px);
2836
2815
  --btn-padding: 12px 24px calc(12px - 2px);
2837
2816
  --btn-xs-padding: 2px 8px calc(2px - 2px);
@@ -2847,18 +2826,8 @@ summary {
2847
2826
  --btn-sm-radius-base: 2px;
2848
2827
  --btn-lg-radius-base: 3px;
2849
2828
  }
2850
- .np-theme-light,
2851
- .np-theme-dark,
2852
- .np-theme-navy {
2853
- --font-family-regular: averta, avenir w02, avenir, helvetica, arial, sans-serif !important;
2854
- font-family: averta, avenir w02, avenir, helvetica, arial, sans-serif;
2855
- font-family: var(--font-family-regular);
2856
- line-height: 1.5;
2857
- line-height: var(--line-height-body);
2858
- }
2859
2829
  .np-theme-personal {
2860
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif !important;
2861
- font-family: "Inter", Helvetica, Arial, sans-serif;
2830
+ font-family: 'Inter', Helvetica, Arial, sans-serif;
2862
2831
  font-family: var(--font-family-regular);
2863
2832
  font-feature-settings: "calt";
2864
2833
  --input-group-addon-padding: 12px 16px;
@@ -27387,6 +27356,36 @@ button.np-link {
27387
27356
  margin-inline-end: 12px;
27388
27357
  margin-inline-end: var(--size-12);
27389
27358
  }
27359
+ .wds-tag {
27360
+ display: inline-block;
27361
+ max-inline-size: 240px;
27362
+ min-inline-size: 0;
27363
+ overflow: hidden;
27364
+ text-overflow: ellipsis;
27365
+ vertical-align: middle;
27366
+ white-space: nowrap;
27367
+ inline-size: -moz-fit-content;
27368
+ inline-size: fit-content;
27369
+ }
27370
+ .wds-tag--small {
27371
+ border-radius: 6px;
27372
+ font-size: 0.75rem;
27373
+ font-size: var(--font-size-12);
27374
+ padding-block: 1px;
27375
+ padding-inline: 4px;
27376
+ padding-inline: var(--size-4);
27377
+ }
27378
+ .wds-tag--large {
27379
+ border-radius: 8px;
27380
+ padding-block: 1px;
27381
+ padding-inline: 6px;
27382
+ }
27383
+ .wds-tag.wds-tag--proposition {
27384
+ color: var(--color-sentiment-interactive-primary);
27385
+ }
27386
+ .wds-tag-theme {
27387
+ display: contents;
27388
+ }
27390
27389
  .np-tile {
27391
27390
  min-inline-size: 120px;
27392
27391
  border-radius: 10px;
@@ -0,0 +1,30 @@
1
+ .wds-tag {
2
+ display: inline-block;
3
+ max-inline-size: 240px;
4
+ min-inline-size: 0;
5
+ overflow: hidden;
6
+ text-overflow: ellipsis;
7
+ vertical-align: middle;
8
+ white-space: nowrap;
9
+ inline-size: -moz-fit-content;
10
+ inline-size: fit-content;
11
+ }
12
+ .wds-tag--small {
13
+ border-radius: 6px;
14
+ font-size: 0.75rem;
15
+ font-size: var(--font-size-12);
16
+ padding-block: 1px;
17
+ padding-inline: 4px;
18
+ padding-inline: var(--size-4);
19
+ }
20
+ .wds-tag--large {
21
+ border-radius: 8px;
22
+ padding-block: 1px;
23
+ padding-inline: 6px;
24
+ }
25
+ .wds-tag.wds-tag--proposition {
26
+ color: var(--color-sentiment-interactive-primary);
27
+ }
28
+ .wds-tag-theme {
29
+ display: contents;
30
+ }
@@ -55,26 +55,6 @@
55
55
  src: url("styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2") format("woff2");
56
56
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
57
57
  }
58
- @font-face {
59
- font-weight: 400;
60
- font-weight: var(--font-weight-regular);
61
- font-family: Averta;
62
- src: url("styles/fonts/TW-Averta-Regular.woff2") format("woff2"), url("styles/fonts/TW-Averta-Regular.woff") format("woff");
63
- font-display: swap;
64
- }
65
- @font-face {
66
- font-weight: 600;
67
- font-weight: var(--font-weight-semi-bold);
68
- font-family: Averta;
69
- src: url("styles/fonts/TW-Averta-Semibold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Semibold.woff") format("woff");
70
- font-display: swap;
71
- }
72
- @font-face {
73
- font-weight: 700;
74
- font-weight: var(--font-weight-bold);
75
- font-family: Averta;
76
- src: url("styles/fonts/TW-Averta-Bold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Bold.woff") format("woff");
77
- }
78
58
  @font-face {
79
59
  font-family: "Wise Sans";
80
60
  font-style: normal;
@@ -259,7 +239,6 @@ summary {
259
239
  }
260
240
  :root {
261
241
  --base-font-size: 16px;
262
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif;
263
242
  --input-group-addon-padding: 12px 16px calc(12px - 2px);
264
243
  --btn-padding: 12px 24px calc(12px - 2px);
265
244
  --btn-xs-padding: 2px 8px calc(2px - 2px);
@@ -275,18 +254,8 @@ summary {
275
254
  --btn-sm-radius-base: 2px;
276
255
  --btn-lg-radius-base: 3px;
277
256
  }
278
- .np-theme-light,
279
- .np-theme-dark,
280
- .np-theme-navy {
281
- --font-family-regular: averta, avenir w02, avenir, helvetica, arial, sans-serif !important;
282
- font-family: averta, avenir w02, avenir, helvetica, arial, sans-serif;
283
- font-family: var(--font-family-regular);
284
- line-height: 1.5;
285
- line-height: var(--line-height-body);
286
- }
287
257
  .np-theme-personal {
288
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif !important;
289
- font-family: "Inter", Helvetica, Arial, sans-serif;
258
+ font-family: 'Inter', Helvetica, Arial, sans-serif;
290
259
  font-family: var(--font-family-regular);
291
260
  font-feature-settings: "calt";
292
261
  --input-group-addon-padding: 12px 16px;
@@ -2032,26 +2032,6 @@
2032
2032
  src: url("styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2") format("woff2");
2033
2033
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
2034
2034
  }
2035
- @font-face {
2036
- font-weight: 400;
2037
- font-weight: var(--font-weight-regular);
2038
- font-family: Averta;
2039
- src: url("styles/fonts/TW-Averta-Regular.woff2") format("woff2"), url("styles/fonts/TW-Averta-Regular.woff") format("woff");
2040
- font-display: swap;
2041
- }
2042
- @font-face {
2043
- font-weight: 600;
2044
- font-weight: var(--font-weight-semi-bold);
2045
- font-family: Averta;
2046
- src: url("styles/fonts/TW-Averta-Semibold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Semibold.woff") format("woff");
2047
- font-display: swap;
2048
- }
2049
- @font-face {
2050
- font-weight: 700;
2051
- font-weight: var(--font-weight-bold);
2052
- font-family: Averta;
2053
- src: url("styles/fonts/TW-Averta-Bold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Bold.woff") format("woff");
2054
- }
2055
2035
  @font-face {
2056
2036
  font-family: "Wise Sans";
2057
2037
  font-style: normal;
@@ -2236,7 +2216,6 @@ summary {
2236
2216
  }
2237
2217
  :root {
2238
2218
  --base-font-size: 16px;
2239
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif;
2240
2219
  --input-group-addon-padding: 12px 16px calc(12px - 2px);
2241
2220
  --btn-padding: 12px 24px calc(12px - 2px);
2242
2221
  --btn-xs-padding: 2px 8px calc(2px - 2px);
@@ -2252,18 +2231,8 @@ summary {
2252
2231
  --btn-sm-radius-base: 2px;
2253
2232
  --btn-lg-radius-base: 3px;
2254
2233
  }
2255
- .np-theme-light,
2256
- .np-theme-dark,
2257
- .np-theme-navy {
2258
- --font-family-regular: averta, avenir w02, avenir, helvetica, arial, sans-serif !important;
2259
- font-family: averta, avenir w02, avenir, helvetica, arial, sans-serif;
2260
- font-family: var(--font-family-regular);
2261
- line-height: 1.5;
2262
- line-height: var(--line-height-body);
2263
- }
2264
2234
  .np-theme-personal {
2265
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif !important;
2266
- font-family: "Inter", Helvetica, Arial, sans-serif;
2235
+ font-family: 'Inter', Helvetica, Arial, sans-serif;
2267
2236
  font-family: var(--font-family-regular);
2268
2237
  font-feature-settings: "calt";
2269
2238
  --input-group-addon-padding: 12px 16px;
@@ -2627,26 +2627,6 @@
2627
2627
  src: url("styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2") format("woff2");
2628
2628
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
2629
2629
  }
2630
- @font-face {
2631
- font-weight: 400;
2632
- font-weight: var(--font-weight-regular);
2633
- font-family: Averta;
2634
- src: url("styles/fonts/TW-Averta-Regular.woff2") format("woff2"), url("styles/fonts/TW-Averta-Regular.woff") format("woff");
2635
- font-display: swap;
2636
- }
2637
- @font-face {
2638
- font-weight: 600;
2639
- font-weight: var(--font-weight-semi-bold);
2640
- font-family: Averta;
2641
- src: url("styles/fonts/TW-Averta-Semibold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Semibold.woff") format("woff");
2642
- font-display: swap;
2643
- }
2644
- @font-face {
2645
- font-weight: 700;
2646
- font-weight: var(--font-weight-bold);
2647
- font-family: Averta;
2648
- src: url("styles/fonts/TW-Averta-Bold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Bold.woff") format("woff");
2649
- }
2650
2630
  @font-face {
2651
2631
  font-family: "Wise Sans";
2652
2632
  font-style: normal;
@@ -2831,7 +2811,6 @@ summary {
2831
2811
  }
2832
2812
  :root {
2833
2813
  --base-font-size: 16px;
2834
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif;
2835
2814
  --input-group-addon-padding: 12px 16px calc(12px - 2px);
2836
2815
  --btn-padding: 12px 24px calc(12px - 2px);
2837
2816
  --btn-xs-padding: 2px 8px calc(2px - 2px);
@@ -2847,18 +2826,8 @@ summary {
2847
2826
  --btn-sm-radius-base: 2px;
2848
2827
  --btn-lg-radius-base: 3px;
2849
2828
  }
2850
- .np-theme-light,
2851
- .np-theme-dark,
2852
- .np-theme-navy {
2853
- --font-family-regular: averta, avenir w02, avenir, helvetica, arial, sans-serif !important;
2854
- font-family: averta, avenir w02, avenir, helvetica, arial, sans-serif;
2855
- font-family: var(--font-family-regular);
2856
- line-height: 1.5;
2857
- line-height: var(--line-height-body);
2858
- }
2859
2829
  .np-theme-personal {
2860
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif !important;
2861
- font-family: "Inter", Helvetica, Arial, sans-serif;
2830
+ font-family: 'Inter', Helvetica, Arial, sans-serif;
2862
2831
  font-family: var(--font-family-regular);
2863
2832
  font-feature-settings: "calt";
2864
2833
  --input-group-addon-padding: 12px 16px;
@@ -27387,6 +27356,36 @@ button.np-link {
27387
27356
  margin-inline-end: 12px;
27388
27357
  margin-inline-end: var(--size-12);
27389
27358
  }
27359
+ .wds-tag {
27360
+ display: inline-block;
27361
+ max-inline-size: 240px;
27362
+ min-inline-size: 0;
27363
+ overflow: hidden;
27364
+ text-overflow: ellipsis;
27365
+ vertical-align: middle;
27366
+ white-space: nowrap;
27367
+ inline-size: -moz-fit-content;
27368
+ inline-size: fit-content;
27369
+ }
27370
+ .wds-tag--small {
27371
+ border-radius: 6px;
27372
+ font-size: 0.75rem;
27373
+ font-size: var(--font-size-12);
27374
+ padding-block: 1px;
27375
+ padding-inline: 4px;
27376
+ padding-inline: var(--size-4);
27377
+ }
27378
+ .wds-tag--large {
27379
+ border-radius: 8px;
27380
+ padding-block: 1px;
27381
+ padding-inline: 6px;
27382
+ }
27383
+ .wds-tag.wds-tag--proposition {
27384
+ color: var(--color-sentiment-interactive-primary);
27385
+ }
27386
+ .wds-tag-theme {
27387
+ display: contents;
27388
+ }
27390
27389
  .np-tile {
27391
27390
  min-inline-size: 120px;
27392
27391
  border-radius: 10px;
@@ -55,26 +55,6 @@
55
55
  src: url("styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2") format("woff2");
56
56
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
57
57
  }
58
- @font-face {
59
- font-weight: 400;
60
- font-weight: var(--font-weight-regular);
61
- font-family: Averta;
62
- src: url("styles/fonts/TW-Averta-Regular.woff2") format("woff2"), url("styles/fonts/TW-Averta-Regular.woff") format("woff");
63
- font-display: swap;
64
- }
65
- @font-face {
66
- font-weight: 600;
67
- font-weight: var(--font-weight-semi-bold);
68
- font-family: Averta;
69
- src: url("styles/fonts/TW-Averta-Semibold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Semibold.woff") format("woff");
70
- font-display: swap;
71
- }
72
- @font-face {
73
- font-weight: 700;
74
- font-weight: var(--font-weight-bold);
75
- font-family: Averta;
76
- src: url("styles/fonts/TW-Averta-Bold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Bold.woff") format("woff");
77
- }
78
58
  @font-face {
79
59
  font-family: "Wise Sans";
80
60
  font-style: normal;
@@ -259,7 +239,6 @@ summary {
259
239
  }
260
240
  :root {
261
241
  --base-font-size: 16px;
262
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif;
263
242
  --input-group-addon-padding: 12px 16px calc(12px - 2px);
264
243
  --btn-padding: 12px 24px calc(12px - 2px);
265
244
  --btn-xs-padding: 2px 8px calc(2px - 2px);
@@ -275,18 +254,8 @@ summary {
275
254
  --btn-sm-radius-base: 2px;
276
255
  --btn-lg-radius-base: 3px;
277
256
  }
278
- .np-theme-light,
279
- .np-theme-dark,
280
- .np-theme-navy {
281
- --font-family-regular: averta, avenir w02, avenir, helvetica, arial, sans-serif !important;
282
- font-family: averta, avenir w02, avenir, helvetica, arial, sans-serif;
283
- font-family: var(--font-family-regular);
284
- line-height: 1.5;
285
- line-height: var(--line-height-body);
286
- }
287
257
  .np-theme-personal {
288
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif !important;
289
- font-family: "Inter", Helvetica, Arial, sans-serif;
258
+ font-family: 'Inter', Helvetica, Arial, sans-serif;
290
259
  font-family: var(--font-family-regular);
291
260
  font-feature-settings: "calt";
292
261
  --input-group-addon-padding: 12px 16px;
@@ -2032,26 +2032,6 @@
2032
2032
  src: url("styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2") format("woff2");
2033
2033
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
2034
2034
  }
2035
- @font-face {
2036
- font-weight: 400;
2037
- font-weight: var(--font-weight-regular);
2038
- font-family: Averta;
2039
- src: url("styles/fonts/TW-Averta-Regular.woff2") format("woff2"), url("styles/fonts/TW-Averta-Regular.woff") format("woff");
2040
- font-display: swap;
2041
- }
2042
- @font-face {
2043
- font-weight: 600;
2044
- font-weight: var(--font-weight-semi-bold);
2045
- font-family: Averta;
2046
- src: url("styles/fonts/TW-Averta-Semibold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Semibold.woff") format("woff");
2047
- font-display: swap;
2048
- }
2049
- @font-face {
2050
- font-weight: 700;
2051
- font-weight: var(--font-weight-bold);
2052
- font-family: Averta;
2053
- src: url("styles/fonts/TW-Averta-Bold.woff2") format("woff2"), url("styles/fonts/TW-Averta-Bold.woff") format("woff");
2054
- }
2055
2035
  @font-face {
2056
2036
  font-family: "Wise Sans";
2057
2037
  font-style: normal;
@@ -2236,7 +2216,6 @@ summary {
2236
2216
  }
2237
2217
  :root {
2238
2218
  --base-font-size: 16px;
2239
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif;
2240
2219
  --input-group-addon-padding: 12px 16px calc(12px - 2px);
2241
2220
  --btn-padding: 12px 24px calc(12px - 2px);
2242
2221
  --btn-xs-padding: 2px 8px calc(2px - 2px);
@@ -2252,18 +2231,8 @@ summary {
2252
2231
  --btn-sm-radius-base: 2px;
2253
2232
  --btn-lg-radius-base: 3px;
2254
2233
  }
2255
- .np-theme-light,
2256
- .np-theme-dark,
2257
- .np-theme-navy {
2258
- --font-family-regular: averta, avenir w02, avenir, helvetica, arial, sans-serif !important;
2259
- font-family: averta, avenir w02, avenir, helvetica, arial, sans-serif;
2260
- font-family: var(--font-family-regular);
2261
- line-height: 1.5;
2262
- line-height: var(--line-height-body);
2263
- }
2264
2234
  .np-theme-personal {
2265
- --font-family-regular: "Inter", Helvetica, Arial, sans-serif !important;
2266
- font-family: "Inter", Helvetica, Arial, sans-serif;
2235
+ font-family: 'Inter', Helvetica, Arial, sans-serif;
2267
2236
  font-family: var(--font-family-regular);
2268
2237
  font-feature-settings: "calt";
2269
2238
  --input-group-addon-padding: 12px 16px;
@@ -0,0 +1,24 @@
1
+ import { TagProps } from './Tag.types';
2
+ /**
3
+ * Tag is a small, non-interactive label that categorises or highlights a piece of content.
4
+ *
5
+ * @param {string} label - The text of the tag, kept to a word or two.
6
+ * @param {Sentiment} [sentiment='neutral'] - Optional prop to set the sentiment type (negative, warning, neutral, success, proposition).
7
+ * @param {TagSize} [size='small'] - Optional prop to set the size of the tag (small or large).
8
+ * @param {Emphasis} [emphasis='base'] - Optional prop to specify the emphasis level (base or elevated).
9
+ * @param {boolean} [overMedia=false] - If true, renders the tag for use over media, keeping the colours it uses in dark screen modes.
10
+ * @param {string} [className] - Additional CSS classes to apply.
11
+ * @param {string} [id] - Unique identifier for the component.
12
+ * @param {string} [data-testid] - A unique string that appears as data attribute `data-testid` in the rendered code.
13
+ *
14
+ * @component
15
+ * @example
16
+ * ```tsx
17
+ * <Tag sentiment="success" label="Verified" />
18
+ * ```
19
+ *
20
+ * @see {@link https://storybook.wise.design/?path=/docs/tag--docs|Storybook Wise Design}
21
+ */
22
+ declare const Tag: import("react").ForwardRefExoticComponent<TagProps & import("react").RefAttributes<HTMLSpanElement>>;
23
+ export default Tag;
24
+ //# sourceMappingURL=Tag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/Tag/Tag.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,GAAG,sGAyCP,CAAC;AAEH,eAAe,GAAG,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { Emphasis, Sentiment } from '../SentimentSurface';
2
+ /**
3
+ * Sizes for the Tag component
4
+ */
5
+ export type TagSize = 'small' | 'large';
6
+ export interface TagProps {
7
+ /**
8
+ * The text of the tag, kept to a word or two
9
+ */
10
+ label: string;
11
+ /**
12
+ * The sentiment type that determines the colour scheme
13
+ * @default 'neutral'
14
+ */
15
+ sentiment?: Sentiment;
16
+ /**
17
+ * The size of the tag
18
+ * @default 'small'
19
+ */
20
+ size?: TagSize;
21
+ /**
22
+ * The emphasis level affecting background and text contrast
23
+ * @default 'base'
24
+ */
25
+ emphasis?: Emphasis;
26
+ /**
27
+ * If true, renders the tag for use over media such as a photo or a video, keeping the colours
28
+ * it uses in dark screen modes so that it stays legible over unpredictable artwork
29
+ * @default false
30
+ */
31
+ overMedia?: boolean;
32
+ className?: string;
33
+ id?: string;
34
+ /**
35
+ * A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests
36
+ */
37
+ 'data-testid'?: string;
38
+ }
39
+ //# sourceMappingURL=Tag.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.types.d.ts","sourceRoot":"","sources":["../../../src/Tag/Tag.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAExC,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,3 @@
1
+ export { default } from './Tag';
2
+ export type { TagProps, TagSize } from './Tag.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}