@transferwise/components 46.79.1 → 46.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/build/avatar/Avatar.js +3 -0
  2. package/build/avatar/Avatar.js.map +1 -1
  3. package/build/avatar/Avatar.mjs +3 -0
  4. package/build/avatar/Avatar.mjs.map +1 -1
  5. package/build/avatarView/AvatarView.js +175 -0
  6. package/build/avatarView/AvatarView.js.map +1 -0
  7. package/build/avatarView/AvatarView.mjs +173 -0
  8. package/build/avatarView/AvatarView.mjs.map +1 -0
  9. package/build/avatarView/NotificationDot.js +59 -0
  10. package/build/avatarView/NotificationDot.js.map +1 -0
  11. package/build/avatarView/NotificationDot.mjs +57 -0
  12. package/build/avatarView/NotificationDot.mjs.map +1 -0
  13. package/build/avatarWrapper/AvatarWrapper.js +10 -4
  14. package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
  15. package/build/avatarWrapper/AvatarWrapper.mjs +10 -4
  16. package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
  17. package/build/badge/Badge.js +16 -4
  18. package/build/badge/Badge.js.map +1 -1
  19. package/build/badge/Badge.mjs +15 -3
  20. package/build/badge/Badge.mjs.map +1 -1
  21. package/build/badge/BadgeAssets.js +60 -0
  22. package/build/badge/BadgeAssets.js.map +1 -0
  23. package/build/badge/BadgeAssets.mjs +58 -0
  24. package/build/badge/BadgeAssets.mjs.map +1 -0
  25. package/build/button/Button.js.map +1 -1
  26. package/build/button/Button.mjs.map +1 -1
  27. package/build/button/legacyUtils/legacyUtils.js.map +1 -1
  28. package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
  29. package/build/common/circle/Circle.js +19 -1
  30. package/build/common/circle/Circle.js.map +1 -1
  31. package/build/common/circle/Circle.mjs +19 -1
  32. package/build/common/circle/Circle.mjs.map +1 -1
  33. package/build/i18n/th.json +5 -0
  34. package/build/i18n/th.json.js +5 -0
  35. package/build/i18n/th.json.js.map +1 -1
  36. package/build/i18n/th.json.mjs +5 -0
  37. package/build/i18n/th.json.mjs.map +1 -1
  38. package/build/i18n/zh-HK.json +5 -0
  39. package/build/i18n/zh-HK.json.js +5 -0
  40. package/build/i18n/zh-HK.json.js.map +1 -1
  41. package/build/i18n/zh-HK.json.mjs +5 -0
  42. package/build/i18n/zh-HK.json.mjs.map +1 -1
  43. package/build/index.js +18 -13
  44. package/build/index.js.map +1 -1
  45. package/build/index.mjs +10 -7
  46. package/build/index.mjs.map +1 -1
  47. package/build/main.css +74 -5
  48. package/build/styles/avatarView/AvatarView.css +36 -0
  49. package/build/styles/avatarView/NotificationDot.css +20 -0
  50. package/build/styles/badge/Badge.css +6 -5
  51. package/build/styles/common/circle/Circle.css +32 -0
  52. package/build/styles/main.css +74 -5
  53. package/build/types/avatar/Avatar.d.ts +3 -0
  54. package/build/types/avatar/Avatar.d.ts.map +1 -1
  55. package/build/types/avatarView/AvatarView.d.ts +26 -0
  56. package/build/types/avatarView/AvatarView.d.ts.map +1 -0
  57. package/build/types/avatarView/NotificationDot.d.ts +8 -0
  58. package/build/types/avatarView/NotificationDot.d.ts.map +1 -0
  59. package/build/types/avatarView/index.d.ts +3 -0
  60. package/build/types/avatarView/index.d.ts.map +1 -0
  61. package/build/types/avatarWrapper/AvatarWrapper.d.ts +3 -0
  62. package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
  63. package/build/types/badge/Badge.d.ts +9 -4
  64. package/build/types/badge/Badge.d.ts.map +1 -1
  65. package/build/types/badge/BadgeAssets.d.ts +14 -0
  66. package/build/types/badge/BadgeAssets.d.ts.map +1 -0
  67. package/build/types/badge/index.d.ts +2 -0
  68. package/build/types/badge/index.d.ts.map +1 -1
  69. package/build/types/button/Button.d.ts +1 -1
  70. package/build/types/button/Button.d.ts.map +1 -1
  71. package/build/types/button/legacyUtils/legacyUtils.d.ts +2 -2
  72. package/build/types/button/legacyUtils/legacyUtils.d.ts.map +1 -1
  73. package/build/types/common/circle/Circle.d.ts +2 -0
  74. package/build/types/common/circle/Circle.d.ts.map +1 -1
  75. package/build/types/index.d.ts +3 -1
  76. package/build/types/index.d.ts.map +1 -1
  77. package/build/types/test-utils/index.d.ts +158 -0
  78. package/build/types/test-utils/index.d.ts.map +1 -0
  79. package/build/types/test-utils/jest.setup.d.ts +2 -0
  80. package/build/types/test-utils/jest.setup.d.ts.map +1 -0
  81. package/package.json +2 -1
  82. package/src/avatar/Avatar.tsx +3 -0
  83. package/src/avatarView/AvatarView.css +36 -0
  84. package/src/avatarView/AvatarView.less +27 -0
  85. package/src/avatarView/AvatarView.story.tsx +467 -0
  86. package/src/avatarView/AvatarView.tsx +171 -0
  87. package/src/avatarView/NotificationDot.css +20 -0
  88. package/src/avatarView/NotificationDot.less +24 -0
  89. package/src/avatarView/NotificationDot.tsx +35 -0
  90. package/src/avatarView/index.ts +2 -0
  91. package/src/avatarWrapper/AvatarWrapper.story.tsx +19 -0
  92. package/src/avatarWrapper/AvatarWrapper.tsx +3 -0
  93. package/src/badge/Badge.css +6 -5
  94. package/src/badge/Badge.less +4 -3
  95. package/src/badge/Badge.tsx +20 -6
  96. package/src/badge/BadgeAssets.tsx +61 -0
  97. package/src/badge/index.ts +3 -0
  98. package/src/button/{Button.spec.js → Button.spec.tsx} +3 -2
  99. package/src/button/Button.tsx +1 -1
  100. package/src/button/legacyUtils/{legacyUtils.spec.js → legacyUtils.spec.tsx} +1 -1
  101. package/src/button/legacyUtils/legacyUtils.ts +2 -2
  102. package/src/circularButton/CircularButton.spec.tsx +0 -36
  103. package/src/common/circle/Circle.css +32 -0
  104. package/src/common/circle/Circle.less +35 -0
  105. package/src/common/circle/Circle.tsx +24 -1
  106. package/src/flowNavigation/FlowNavigation.story.tsx +19 -52
  107. package/src/i18n/th.json +5 -0
  108. package/src/i18n/zh-HK.json +5 -0
  109. package/src/index.ts +3 -0
  110. package/src/listItem/ListItem.story.tsx +5 -47
  111. package/src/main.css +74 -5
  112. package/src/main.less +1 -0
  113. package/src/modal/{Modal.rtl.spec.js → Modal.rtl.spec.tsx} +8 -7
  114. package/src/overlayHeader/OverlayHeader.story.tsx +6 -14
  115. package/src/slidingPanel/SlidingPanel.spec.js +1 -1
  116. package/src/ssr.spec.tsx +264 -0
  117. package/src/test-utils/{index.js → index.tsx} +11 -6
  118. package/src/test-utils/{jest.setup.js → jest.setup.ts} +13 -8
  119. package/src/circularButton/__snapshots__/CircularButton.spec.tsx.snap +0 -381
  120. package/src/ssr.spec.js +0 -256
  121. /package/src/button/__snapshots__/{Button.spec.js.snap → Button.spec.tsx.snap} +0 -0
  122. /package/src/dimmer/{Dimmer.rtl.spec.js → Dimmer.rtl.spec.tsx} +0 -0
  123. /package/src/info/{Info.spec.js → Info.spec.jsx} +0 -0
@@ -13,11 +13,26 @@ const MAP_ICON_SIZE = {
13
13
  56: 28,
14
14
  72: 36
15
15
  };
16
+ /**
17
+ * circle like components have custom typography styles for for default (Inter) font
18
+ *
19
+ * circle size : font size (px)
20
+ */
21
+ const MAP_FONT_SIZE = {
22
+ 16: 8,
23
+ 24: 12,
24
+ 32: 14,
25
+ 40: 18,
26
+ 48: 22,
27
+ 56: 26,
28
+ 72: 30
29
+ };
16
30
  const Circle = /*#__PURE__*/forwardRef(function Circle({
17
31
  as: Element = 'div',
18
32
  children,
19
33
  size = 48,
20
34
  fixedSize = false,
35
+ enableBorder = false,
21
36
  className,
22
37
  style,
23
38
  ...props
@@ -29,9 +44,12 @@ const Circle = /*#__PURE__*/forwardRef(function Circle({
29
44
  style: {
30
45
  '--circle-size': fixedSize ? `${size}px` : `var(--size-${size})`,
31
46
  '--circle-icon-size': isTinyViewport && !fixedSize ? `${MAP_ICON_SIZE[size] / 2}px` : `${MAP_ICON_SIZE[size]}px`,
47
+ '--circle-font-size': `${MAP_FONT_SIZE[size]}px`,
32
48
  ...style
33
49
  },
34
- className: clsx('np-circle', 'd-flex align-items-center justify-content-center', className),
50
+ className: clsx('np-circle', {
51
+ 'np-circle-border': enableBorder
52
+ }, 'd-flex align-items-center justify-content-center', className),
35
53
  children: children
36
54
  });
37
55
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Circle.mjs","sources":["../../../src/common/circle/Circle.tsx"],"sourcesContent":["import { HTMLAttributes, forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport { useMedia } from '../hooks/useMedia';\nimport { Breakpoint } from '../propsValues/breakpoint';\n\nexport type ShapeSize = 16 | 24 | 32 | 40 | 48 | 56 | 72;\n\nexport type Props = {\n /**\n * Modify underlying element, `div` by default\n */\n as?: React.ElementType;\n /**\n * Set size of the circle in px, `48` by default\n */\n size?: ShapeSize;\n /**\n * When `true` will use the fixed size (`48px`) instead of the CSS spacing variable (`--size-*`)\n * as those can be dynamic a at certain viewport sizes\n */\n fixedSize?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\n/**\n * circle like components has custom sizes for icons\n */\nconst MAP_ICON_SIZE = {\n 16: 12,\n 24: 16,\n 32: 18,\n 40: 20,\n 48: 24,\n 56: 28,\n 72: 36,\n};\n\nconst Circle = forwardRef(function Circle(\n {\n as: Element = 'div',\n children,\n size = 48,\n fixedSize = false,\n className,\n style,\n ...props\n }: Props,\n ref,\n) {\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n return (\n <Element\n {...props}\n ref={ref}\n style={{\n '--circle-size': fixedSize ? `${size}px` : `var(--size-${size})`,\n '--circle-icon-size':\n isTinyViewport && !fixedSize\n ? `${MAP_ICON_SIZE[size] / 2}px`\n : `${MAP_ICON_SIZE[size]}px`,\n ...style,\n }}\n className={clsx('np-circle', 'd-flex align-items-center justify-content-center', className)}\n >\n {children}\n </Element>\n );\n});\n\nexport default Circle;\n"],"names":["MAP_ICON_SIZE","Circle","forwardRef","as","Element","children","size","fixedSize","className","style","props","ref","isTinyViewport","useMedia","Breakpoint","ZOOM_400","_jsx","clsx"],"mappings":";;;;;;AA0BA,MAAMA,aAAa,GAAG;AACpB,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAA;CACL,CAAA;AAED,MAAMC,MAAM,gBAAGC,UAAU,CAAC,SAASD,MAAMA,CACvC;EACEE,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,QAAQ;AACRC,EAAAA,IAAI,GAAG,EAAE;AACTC,EAAAA,SAAS,GAAG,KAAK;EACjBC,SAAS;EACTC,KAAK;EACL,GAAGC,KAAAA;AAAK,CACF,EACRC,GAAG,EAAA;EAEH,MAAMC,cAAc,GAAGC,QAAQ,CAAC,eAAeC,UAAU,CAACC,QAAQ,CAAA,GAAA,CAAK,CAAC,CAAA;EACxE,oBACEC,GAAA,CAACZ,OAAO,EAAA;AAAA,IAAA,GACFM,KAAK;AACTC,IAAAA,GAAG,EAAEA,GAAI;AACTF,IAAAA,KAAK,EAAE;MACL,eAAe,EAAEF,SAAS,GAAG,CAAA,EAAGD,IAAI,CAAI,EAAA,CAAA,GAAG,CAAcA,WAAAA,EAAAA,IAAI,CAAG,CAAA,CAAA;MAChE,oBAAoB,EAClBM,cAAc,IAAI,CAACL,SAAS,GACxB,CAAA,EAAGP,aAAa,CAACM,IAAI,CAAC,GAAG,CAAC,IAAI,GAC9B,CAAA,EAAGN,aAAa,CAACM,IAAI,CAAC,CAAI,EAAA,CAAA;MAChC,GAAGG,KAAAA;KACH;IACFD,SAAS,EAAES,IAAI,CAAC,WAAW,EAAE,kDAAkD,EAAET,SAAS,CAAE;AAAAH,IAAAA,QAAA,EAE3FA,QAAAA;AAAQ,GACF,CAAC,CAAA;AAEd,CAAC;;;;"}
1
+ {"version":3,"file":"Circle.mjs","sources":["../../../src/common/circle/Circle.tsx"],"sourcesContent":["import { HTMLAttributes, forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport { useMedia } from '../hooks/useMedia';\nimport { Breakpoint } from '../propsValues/breakpoint';\n\nexport type ShapeSize = 16 | 24 | 32 | 40 | 48 | 56 | 72;\n\nexport type Props = {\n /**\n * Modify underlying element, `div` by default\n */\n as?: React.ElementType;\n /**\n * Set size of the circle in px, `48` by default\n */\n size?: ShapeSize;\n /**\n * When `true` will use the fixed size (`48px`) instead of the CSS spacing variable (`--size-*`)\n * as those can be dynamic a at certain viewport sizes\n */\n fixedSize?: boolean;\n enableBorder?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\n/**\n * circle like components has custom sizes for icons\n */\nconst MAP_ICON_SIZE = {\n 16: 12,\n 24: 16,\n 32: 18,\n 40: 20,\n 48: 24,\n 56: 28,\n 72: 36,\n};\n\n/**\n * circle like components have custom typography styles for for default (Inter) font\n *\n * circle size : font size (px)\n */\nconst MAP_FONT_SIZE = {\n 16: 8,\n 24: 12,\n 32: 14,\n 40: 18,\n 48: 22,\n 56: 26,\n 72: 30,\n};\n\nconst Circle = forwardRef(function Circle(\n {\n as: Element = 'div',\n children,\n size = 48,\n fixedSize = false,\n enableBorder = false,\n className,\n style,\n ...props\n }: Props,\n ref,\n) {\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n return (\n <Element\n {...props}\n ref={ref}\n style={{\n '--circle-size': fixedSize ? `${size}px` : `var(--size-${size})`,\n '--circle-icon-size':\n isTinyViewport && !fixedSize\n ? `${MAP_ICON_SIZE[size] / 2}px`\n : `${MAP_ICON_SIZE[size]}px`,\n '--circle-font-size': `${MAP_FONT_SIZE[size]}px`,\n ...style,\n }}\n className={clsx(\n 'np-circle',\n { 'np-circle-border': enableBorder },\n 'd-flex align-items-center justify-content-center',\n className,\n )}\n >\n {children}\n </Element>\n );\n});\n\nexport default Circle;\n"],"names":["MAP_ICON_SIZE","MAP_FONT_SIZE","Circle","forwardRef","as","Element","children","size","fixedSize","enableBorder","className","style","props","ref","isTinyViewport","useMedia","Breakpoint","ZOOM_400","_jsx","clsx"],"mappings":";;;;;;AA2BA,MAAMA,aAAa,GAAG;AACpB,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAA;CACL,CAAA;AAED;;;;AAIG;AACH,MAAMC,aAAa,GAAG;AACpB,EAAA,EAAE,EAAE,CAAC;AACL,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAA;CACL,CAAA;AAED,MAAMC,MAAM,gBAAGC,UAAU,CAAC,SAASD,MAAMA,CACvC;EACEE,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,QAAQ;AACRC,EAAAA,IAAI,GAAG,EAAE;AACTC,EAAAA,SAAS,GAAG,KAAK;AACjBC,EAAAA,YAAY,GAAG,KAAK;EACpBC,SAAS;EACTC,KAAK;EACL,GAAGC,KAAAA;AAAK,CACF,EACRC,GAAG,EAAA;EAEH,MAAMC,cAAc,GAAGC,QAAQ,CAAC,eAAeC,UAAU,CAACC,QAAQ,CAAA,GAAA,CAAK,CAAC,CAAA;EACxE,oBACEC,GAAA,CAACb,OAAO,EAAA;AAAA,IAAA,GACFO,KAAK;AACTC,IAAAA,GAAG,EAAEA,GAAI;AACTF,IAAAA,KAAK,EAAE;MACL,eAAe,EAAEH,SAAS,GAAG,CAAA,EAAGD,IAAI,CAAI,EAAA,CAAA,GAAG,CAAcA,WAAAA,EAAAA,IAAI,CAAG,CAAA,CAAA;MAChE,oBAAoB,EAClBO,cAAc,IAAI,CAACN,SAAS,GACxB,CAAA,EAAGR,aAAa,CAACO,IAAI,CAAC,GAAG,CAAC,IAAI,GAC9B,CAAA,EAAGP,aAAa,CAACO,IAAI,CAAC,CAAI,EAAA,CAAA;AAChC,MAAA,oBAAoB,EAAE,CAAGN,EAAAA,aAAa,CAACM,IAAI,CAAC,CAAI,EAAA,CAAA;MAChD,GAAGI,KAAAA;KACH;AACFD,IAAAA,SAAS,EAAES,IAAI,CACb,WAAW,EACX;AAAE,MAAA,kBAAkB,EAAEV,YAAAA;KAAc,EACpC,kDAAkD,EAClDC,SAAS,CACT;AAAAJ,IAAAA,QAAA,EAEDA,QAAAA;AAAQ,GACF,CAAC,CAAA;AAEd,CAAC;;;;"}
@@ -27,6 +27,11 @@
27
27
  "neptune.SelectInput.noResultsFound": "ไม่พบผลลัพธ์",
28
28
  "neptune.SelectOption.action.label": "เลือก",
29
29
  "neptune.SelectOption.selected.action.label": "เปลี่ยนตัวเลือกที่เลือกไว้",
30
+ "neptune.StatusIcon.iconLabel.error": "ข้อผิดพลาด:",
31
+ "neptune.StatusIcon.iconLabel.information": "ข้อมูล:",
32
+ "neptune.StatusIcon.iconLabel.pending": "รอดำเนินการ:",
33
+ "neptune.StatusIcon.iconLabel.success": "สำเร็จ:",
34
+ "neptune.StatusIcon.iconLabel.warning": "คำเตือน:",
30
35
  "neptune.Summary.statusDone": "รายการที่ทำแล้ว",
31
36
  "neptune.Summary.statusNotDone": "รายการที่ต้องทำ",
32
37
  "neptune.Summary.statusPending": "รายการที่รอดำเนินการ",
@@ -29,6 +29,11 @@ var th = {
29
29
  "neptune.SelectInput.noResultsFound": "ไม่พบผลลัพธ์",
30
30
  "neptune.SelectOption.action.label": "เลือก",
31
31
  "neptune.SelectOption.selected.action.label": "เปลี่ยนตัวเลือกที่เลือกไว้",
32
+ "neptune.StatusIcon.iconLabel.error": "ข้อผิดพลาด:",
33
+ "neptune.StatusIcon.iconLabel.information": "ข้อมูล:",
34
+ "neptune.StatusIcon.iconLabel.pending": "รอดำเนินการ:",
35
+ "neptune.StatusIcon.iconLabel.success": "สำเร็จ:",
36
+ "neptune.StatusIcon.iconLabel.warning": "คำเตือน:",
32
37
  "neptune.Summary.statusDone": "รายการที่ทำแล้ว",
33
38
  "neptune.Summary.statusNotDone": "รายการที่ต้องทำ",
34
39
  "neptune.Summary.statusPending": "รายการที่รอดำเนินการ",
@@ -1 +1 @@
1
- {"version":3,"file":"th.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"th.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -27,6 +27,11 @@ var th = {
27
27
  "neptune.SelectInput.noResultsFound": "ไม่พบผลลัพธ์",
28
28
  "neptune.SelectOption.action.label": "เลือก",
29
29
  "neptune.SelectOption.selected.action.label": "เปลี่ยนตัวเลือกที่เลือกไว้",
30
+ "neptune.StatusIcon.iconLabel.error": "ข้อผิดพลาด:",
31
+ "neptune.StatusIcon.iconLabel.information": "ข้อมูล:",
32
+ "neptune.StatusIcon.iconLabel.pending": "รอดำเนินการ:",
33
+ "neptune.StatusIcon.iconLabel.success": "สำเร็จ:",
34
+ "neptune.StatusIcon.iconLabel.warning": "คำเตือน:",
30
35
  "neptune.Summary.statusDone": "รายการที่ทำแล้ว",
31
36
  "neptune.Summary.statusNotDone": "รายการที่ต้องทำ",
32
37
  "neptune.Summary.statusPending": "รายการที่รอดำเนินการ",
@@ -1 +1 @@
1
- {"version":3,"file":"th.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"th.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -27,6 +27,11 @@
27
27
  "neptune.SelectInput.noResultsFound": "找不到任何結果",
28
28
  "neptune.SelectOption.action.label": "選擇",
29
29
  "neptune.SelectOption.selected.action.label": "更改已選選項",
30
+ "neptune.StatusIcon.iconLabel.error": "錯誤:",
31
+ "neptune.StatusIcon.iconLabel.information": "資訊:",
32
+ "neptune.StatusIcon.iconLabel.pending": "處理中:",
33
+ "neptune.StatusIcon.iconLabel.success": "成功:",
34
+ "neptune.StatusIcon.iconLabel.warning": "警告:",
30
35
  "neptune.Summary.statusDone": "已完成事項",
31
36
  "neptune.Summary.statusNotDone": "未完成事項",
32
37
  "neptune.Summary.statusPending": "待處理事項",
@@ -29,6 +29,11 @@ var zhHK = {
29
29
  "neptune.SelectInput.noResultsFound": "找不到任何結果",
30
30
  "neptune.SelectOption.action.label": "選擇",
31
31
  "neptune.SelectOption.selected.action.label": "更改已選選項",
32
+ "neptune.StatusIcon.iconLabel.error": "錯誤:",
33
+ "neptune.StatusIcon.iconLabel.information": "資訊:",
34
+ "neptune.StatusIcon.iconLabel.pending": "處理中:",
35
+ "neptune.StatusIcon.iconLabel.success": "成功:",
36
+ "neptune.StatusIcon.iconLabel.warning": "警告:",
32
37
  "neptune.Summary.statusDone": "已完成事項",
33
38
  "neptune.Summary.statusNotDone": "未完成事項",
34
39
  "neptune.Summary.statusPending": "待處理事項",
@@ -1 +1 @@
1
- {"version":3,"file":"zh-HK.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"zh-HK.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -27,6 +27,11 @@ var zhHK = {
27
27
  "neptune.SelectInput.noResultsFound": "找不到任何結果",
28
28
  "neptune.SelectOption.action.label": "選擇",
29
29
  "neptune.SelectOption.selected.action.label": "更改已選選項",
30
+ "neptune.StatusIcon.iconLabel.error": "錯誤:",
31
+ "neptune.StatusIcon.iconLabel.information": "資訊:",
32
+ "neptune.StatusIcon.iconLabel.pending": "處理中:",
33
+ "neptune.StatusIcon.iconLabel.success": "成功:",
34
+ "neptune.StatusIcon.iconLabel.warning": "警告:",
30
35
  "neptune.Summary.statusDone": "已完成事項",
31
36
  "neptune.Summary.statusNotDone": "未完成事項",
32
37
  "neptune.Summary.statusPending": "待處理事項",
@@ -1 +1 @@
1
- {"version":3,"file":"zh-HK.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"zh-HK.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/build/index.js CHANGED
@@ -8,8 +8,17 @@ var SelectOption = require('./selectOption/SelectOption.js');
8
8
  var Alert = require('./alert/Alert.js');
9
9
  var avatarTypes = require('./avatar/avatarTypes.js');
10
10
  var Avatar = require('./avatar/Avatar.js');
11
+ var AvatarView = require('./avatarView/AvatarView.js');
11
12
  var AvatarWrapper = require('./avatarWrapper/AvatarWrapper.js');
12
13
  var Badge = require('./badge/Badge.js');
14
+ var StatusIcon = require('./statusIcon/StatusIcon.js');
15
+ require('@wise/art');
16
+ require('react');
17
+ require('clsx');
18
+ var breakpoint = require('./common/propsValues/breakpoint.js');
19
+ require('react/jsx-runtime');
20
+ var Image = require('./image/Image.js');
21
+ require('@transferwise/icons');
13
22
  var Body = require('./body/Body.js');
14
23
  var Button = require('./button/Button.js');
15
24
  var Carousel = require('./carousel/Carousel.js');
@@ -37,7 +46,6 @@ var Emphasis = require('./emphasis/Emphasis.js');
37
46
  var Field = require('./field/Field.js');
38
47
  var FlowNavigation = require('./flowNavigation/FlowNavigation.js');
39
48
  var Header = require('./header/Header.js');
40
- var Image = require('./image/Image.js');
41
49
  var infoPresentations = require('./info/infoPresentations.js');
42
50
  var Info = require('./info/Info.js');
43
51
  var InlineAlert = require('./inlineAlert/InlineAlert.js');
@@ -84,7 +92,6 @@ var SlidingPanel = require('./slidingPanel/SlidingPanel.js');
84
92
  var Snackbar = require('./snackbar/Snackbar.js');
85
93
  var SnackbarContext = require('./snackbar/SnackbarContext.js');
86
94
  var SnackbarProvider = require('./snackbar/SnackbarProvider.js');
87
- var StatusIcon = require('./statusIcon/StatusIcon.js');
88
95
  var Stepper = require('./stepper/Stepper.js');
89
96
  var Sticky = require('./sticky/Sticky.js');
90
97
  var Summary = require('./summary/Summary.js');
@@ -98,7 +105,6 @@ var Typeahead = require('./typeahead/Typeahead.js');
98
105
  var Upload = require('./upload/Upload.js');
99
106
  var UploadInput = require('./uploadInput/UploadInput.js');
100
107
  require('@transferwise/neptune-validation');
101
- require('react');
102
108
  var useDirection = require('./common/hooks/useDirection/useDirection.js');
103
109
  var useLayout = require('./common/hooks/useLayout/useLayout.js');
104
110
  var useScreenSize = require('./common/hooks/useScreenSize.js');
@@ -107,7 +113,6 @@ var documentIosClick = require('./common/domHelpers/documentIosClick.js');
107
113
  var theme = require('./common/theme.js');
108
114
  var direction = require('./common/direction.js');
109
115
  var control = require('./common/propsValues/control.js');
110
- var breakpoint = require('./common/propsValues/breakpoint.js');
111
116
  var size = require('./common/propsValues/size.js');
112
117
  var typography = require('./common/propsValues/typography.js');
113
118
  var width = require('./common/propsValues/width.js');
@@ -124,11 +129,9 @@ var scroll = require('./common/propsValues/scroll.js');
124
129
  var markdownNodeType = require('./common/propsValues/markdownNodeType.js');
125
130
  var fileType = require('./common/fileType.js');
126
131
  var index = require('./common/locale/index.js');
127
- require('@transferwise/icons');
128
- require('clsx');
132
+ var colors = require('./common/colors.js');
129
133
  require('react-intl');
130
134
  require('./common/closeButton/CloseButton.messages.js');
131
- require('react/jsx-runtime');
132
135
  var index$1 = require('./i18n/index.js');
133
136
  var withId = require('./withId/withId.js');
134
137
 
@@ -148,8 +151,15 @@ Object.defineProperty(exports, "AvatarType", {
148
151
  get: function () { return avatarTypes.AvatarType; }
149
152
  });
150
153
  exports.Avatar = Avatar;
154
+ exports.AvatarView = AvatarView;
151
155
  exports.AvatarWrapper = AvatarWrapper;
152
156
  exports.Badge = Badge;
157
+ exports.StatusIcon = StatusIcon;
158
+ Object.defineProperty(exports, "Breakpoint", {
159
+ enumerable: true,
160
+ get: function () { return breakpoint.Breakpoint; }
161
+ });
162
+ exports.Image = Image.default;
153
163
  exports.Body = Body;
154
164
  exports.Button = Button;
155
165
  exports.Carousel = Carousel;
@@ -185,7 +195,6 @@ exports.Emphasis = Emphasis;
185
195
  exports.Field = Field.Field;
186
196
  exports.FlowNavigation = FlowNavigation;
187
197
  exports.Header = Header.Header;
188
- exports.Image = Image.default;
189
198
  Object.defineProperty(exports, "InfoPresentation", {
190
199
  enumerable: true,
191
200
  get: function () { return infoPresentations.InfoPresentation; }
@@ -242,7 +251,6 @@ exports.SnackbarPortal = Snackbar.default;
242
251
  exports.SnackbarConsumer = SnackbarContext.SnackbarConsumer;
243
252
  exports.SnackbarContext = SnackbarContext.SnackbarContext;
244
253
  exports.SnackbarProvider = SnackbarProvider;
245
- exports.StatusIcon = StatusIcon;
246
254
  exports.Stepper = Stepper;
247
255
  exports.Sticky = Sticky;
248
256
  exports.Summary = Summary;
@@ -281,10 +289,6 @@ Object.defineProperty(exports, "Priority", {
281
289
  enumerable: true,
282
290
  get: function () { return control.Priority; }
283
291
  });
284
- Object.defineProperty(exports, "Breakpoint", {
285
- enumerable: true,
286
- get: function () { return breakpoint.Breakpoint; }
287
- });
288
292
  Object.defineProperty(exports, "Size", {
289
293
  enumerable: true,
290
294
  get: function () { return size.Size; }
@@ -353,6 +357,7 @@ exports.adjustLocale = index.adjustLocale;
353
357
  exports.getCountryFromLocale = index.getCountryFromLocale;
354
358
  exports.getDirectionFromLocale = index.getDirectionFromLocale;
355
359
  exports.getLangFromLocale = index.getLangFromLocale;
360
+ exports.getBrandColorFromSeed = colors.getBrandColorFromSeed;
356
361
  exports.translations = index$1;
357
362
  exports.withId = withId;
358
363
  //# sourceMappingURL=index.js.map
@@ -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
@@ -6,8 +6,17 @@ export { default as SelectOption } from './selectOption/SelectOption.mjs';
6
6
  export { default as Alert, AlertArrowPosition } from './alert/Alert.mjs';
7
7
  export { AvatarType } from './avatar/avatarTypes.mjs';
8
8
  export { default as Avatar } from './avatar/Avatar.mjs';
9
+ export { default as AvatarView } from './avatarView/AvatarView.mjs';
9
10
  export { default as AvatarWrapper } from './avatarWrapper/AvatarWrapper.mjs';
10
11
  export { default as Badge } from './badge/Badge.mjs';
12
+ export { default as StatusIcon } from './statusIcon/StatusIcon.mjs';
13
+ import '@wise/art';
14
+ import 'react';
15
+ import 'clsx';
16
+ export { Breakpoint } from './common/propsValues/breakpoint.mjs';
17
+ import 'react/jsx-runtime';
18
+ export { default as Image } from './image/Image.mjs';
19
+ import '@transferwise/icons';
11
20
  export { default as Body } from './body/Body.mjs';
12
21
  export { default as Button } from './button/Button.mjs';
13
22
  export { default as Carousel } from './carousel/Carousel.mjs';
@@ -35,7 +44,6 @@ export { default as Emphasis } from './emphasis/Emphasis.mjs';
35
44
  export { Field } from './field/Field.mjs';
36
45
  export { default as FlowNavigation } from './flowNavigation/FlowNavigation.mjs';
37
46
  export { Header } from './header/Header.mjs';
38
- export { default as Image } from './image/Image.mjs';
39
47
  export { InfoPresentation } from './info/infoPresentations.mjs';
40
48
  export { default as Info } from './info/Info.mjs';
41
49
  export { default as InlineAlert } from './inlineAlert/InlineAlert.mjs';
@@ -82,7 +90,6 @@ export { default as SlidingPanel } from './slidingPanel/SlidingPanel.mjs';
82
90
  export { default as SnackbarPortal } from './snackbar/Snackbar.mjs';
83
91
  export { SnackbarConsumer, SnackbarContext } from './snackbar/SnackbarContext.mjs';
84
92
  export { default as SnackbarProvider } from './snackbar/SnackbarProvider.mjs';
85
- export { default as StatusIcon } from './statusIcon/StatusIcon.mjs';
86
93
  export { default as Stepper } from './stepper/Stepper.mjs';
87
94
  export { default as Sticky } from './sticky/Sticky.mjs';
88
95
  export { default as Summary } from './summary/Summary.mjs';
@@ -96,7 +103,6 @@ export { default as Typeahead } from './typeahead/Typeahead.mjs';
96
103
  export { default as Upload, UploadStep } from './upload/Upload.mjs';
97
104
  export { default as UploadInput } from './uploadInput/UploadInput.mjs';
98
105
  import '@transferwise/neptune-validation';
99
- import 'react';
100
106
  export { useDirection } from './common/hooks/useDirection/useDirection.mjs';
101
107
  export { useLayout } from './common/hooks/useLayout/useLayout.mjs';
102
108
  export { useScreenSize } from './common/hooks/useScreenSize.mjs';
@@ -105,7 +111,6 @@ export { isBrowser, isServerSide } from './common/domHelpers/documentIosClick.mj
105
111
  export { Theme } from './common/theme.mjs';
106
112
  export { Direction } from './common/direction.mjs';
107
113
  export { ControlType, Priority } from './common/propsValues/control.mjs';
108
- export { Breakpoint } from './common/propsValues/breakpoint.mjs';
109
114
  export { Size } from './common/propsValues/size.mjs';
110
115
  export { Typography } from './common/propsValues/typography.mjs';
111
116
  export { Width } from './common/propsValues/width.mjs';
@@ -122,11 +127,9 @@ export { Scroll } from './common/propsValues/scroll.mjs';
122
127
  export { MarkdownNodeType } from './common/propsValues/markdownNodeType.mjs';
123
128
  export { FileType } from './common/fileType.mjs';
124
129
  export { DEFAULT_LANG, DEFAULT_LOCALE, RTL_LANGUAGES, SUPPORTED_LANGUAGES, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale } from './common/locale/index.mjs';
125
- import '@transferwise/icons';
126
- import 'clsx';
130
+ export { getBrandColorFromSeed } from './common/colors.mjs';
127
131
  import 'react-intl';
128
132
  import './common/closeButton/CloseButton.messages.mjs';
129
- import 'react/jsx-runtime';
130
133
  export { default as translations } from './i18n/index.mjs';
131
134
  export { default as withId } from './withId/withId.mjs';
132
135
  //# sourceMappingURL=index.mjs.map
@@ -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
@@ -469,6 +469,42 @@ div.critical-comms .critical-comms-body {
469
469
  .np-theme-personal .tw-avatar--outlined:not(.disabled):not(:disabled):hover {
470
470
  border-color: var(--color-interactive-primary-hover);
471
471
  }
472
+ .np-notification-dot {
473
+ --np-notification-dot-size: 14px;
474
+ position: relative;
475
+ display: inline-block;
476
+ }
477
+ .np-notification-dot-mask {
478
+ -webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
479
+ mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
480
+ -webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
481
+ mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
482
+ }
483
+ .np-notification-dot-badge {
484
+ position: absolute;
485
+ width: var(--np-notification-dot-size);
486
+ height: var(--np-notification-dot-size);
487
+ background-color: var(--color-sentiment-negative);
488
+ border-radius: 9999px;
489
+ border-radius: var(--radius-full);
490
+ right: 0;
491
+ }
492
+ .np-avatar-view .np-avatar-view-content {
493
+ color: var(--color-interactive-primary);
494
+ }
495
+ .np-avatar-view-interactive {
496
+ cursor: pointer;
497
+ }
498
+ .np-avatar-view-interactive .np-circle {
499
+ background-color: rgba(134,167,189,0.10196);
500
+ background-color: var(--color-background-neutral);
501
+ }
502
+ .np-avatar-view-non-interactive .np-circle {
503
+ background-color: transparent;
504
+ }
505
+ .np-avatar-view-non-interactive .np-avatar-view-content .wds-flag {
506
+ box-shadow: none;
507
+ }
472
508
  .tw-badge {
473
509
  position: relative;
474
510
  display: inline-block;
@@ -476,6 +512,7 @@ div.critical-comms .critical-comms-body {
476
512
  --badge-mask: 2px;
477
513
  --badge-mask-offset: calc(var(--badge-size) / 2);
478
514
  --badge-border-color: rgba(255, 255, 255, 0.08);
515
+ --badge-content-position: 0px;
479
516
  }
480
517
  .tw-badge.tw-badge-lg {
481
518
  --badge-size: 24px;
@@ -485,8 +522,8 @@ div.critical-comms .critical-comms-body {
485
522
  --badge-border-color: rgba(0, 0, 0, 0.08);
486
523
  }
487
524
  .tw-badge > .tw-badge__children {
488
- -webkit-mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset)) left calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
489
- mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset)) left calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
525
+ -webkit-mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset) - var(--badge-content-position)) left calc(100% - var(--badge-mask-offset) - var(--badge-content-position)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
526
+ mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset) - var(--badge-content-position)) left calc(100% - var(--badge-mask-offset) - var(--badge-content-position)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
490
527
  }
491
528
  [dir="rtl"] .tw-badge > .tw-badge__children {
492
529
  -webkit-mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset)) right calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
@@ -496,8 +533,8 @@ div.critical-comms .critical-comms-body {
496
533
  position: absolute;
497
534
  width: var(--badge-size);
498
535
  height: var(--badge-size);
499
- bottom: 0;
500
- right: 0;
536
+ bottom: var(--badge-content-position);
537
+ right: var(--badge-content-position);
501
538
  box-sizing: border-box;
502
539
  border-radius: 50%;
503
540
  text-align: center;
@@ -510,7 +547,7 @@ div.critical-comms .critical-comms-body {
510
547
  user-select: none;
511
548
  }
512
549
  [dir="rtl"] .tw-badge > .tw-badge__content {
513
- left: 0;
550
+ left: var(--badge-content-position);
514
551
  right: auto;
515
552
  right: initial;
516
553
  }
@@ -1211,11 +1248,43 @@ div.critical-comms .critical-comms-body {
1211
1248
  width: var(--circle-size);
1212
1249
  height: var(--circle-size);
1213
1250
  flex-shrink: 0;
1251
+ --circle-border-color: var(--color-border-neutral);
1252
+ --circle-border-width: 1px;
1253
+ font-size: var(--circle-font-size);
1254
+ font-weight: 600;
1255
+ font-weight: var(--font-weight-semi-bold);
1256
+ line-height: 1;
1257
+ }
1258
+ .np-circle .np-display {
1259
+ font-size: var(--circle-font-size);
1214
1260
  }
1215
1261
  .np-circle .tw-icon > svg {
1216
1262
  height: var(--circle-icon-size);
1217
1263
  width: var(--circle-icon-size);
1218
1264
  }
1265
+ .np-circle img,
1266
+ .np-circle .wds-flag {
1267
+ border-radius: 9999px;
1268
+ border-radius: var(--radius-full);
1269
+ width: 100%;
1270
+ height: 100%;
1271
+ -o-object-fit: cover;
1272
+ object-fit: cover;
1273
+ }
1274
+ .np-circle-border {
1275
+ position: relative;
1276
+ }
1277
+ .np-circle-border::after {
1278
+ content: "";
1279
+ position: absolute;
1280
+ top: 0;
1281
+ left: 0;
1282
+ width: 100%;
1283
+ height: 100%;
1284
+ border-radius: 9999px;
1285
+ border-radius: var(--radius-full);
1286
+ box-shadow: inset 0 0 0 var(--circle-border-width) var(--circle-border-color);
1287
+ }
1219
1288
  .np-bottom-sheet {
1220
1289
  border-radius: 10px 10px 0 0;
1221
1290
  }
@@ -0,0 +1,36 @@
1
+ .np-notification-dot {
2
+ --np-notification-dot-size: 14px;
3
+ position: relative;
4
+ display: inline-block;
5
+ }
6
+ .np-notification-dot-mask {
7
+ -webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
8
+ mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
9
+ -webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
10
+ mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
11
+ }
12
+ .np-notification-dot-badge {
13
+ position: absolute;
14
+ width: var(--np-notification-dot-size);
15
+ height: var(--np-notification-dot-size);
16
+ background-color: var(--color-sentiment-negative);
17
+ border-radius: 9999px;
18
+ border-radius: var(--radius-full);
19
+ right: 0;
20
+ }
21
+ .np-avatar-view .np-avatar-view-content {
22
+ color: var(--color-interactive-primary);
23
+ }
24
+ .np-avatar-view-interactive {
25
+ cursor: pointer;
26
+ }
27
+ .np-avatar-view-interactive .np-circle {
28
+ background-color: rgba(134,167,189,0.10196);
29
+ background-color: var(--color-background-neutral);
30
+ }
31
+ .np-avatar-view-non-interactive .np-circle {
32
+ background-color: transparent;
33
+ }
34
+ .np-avatar-view-non-interactive .np-avatar-view-content .wds-flag {
35
+ box-shadow: none;
36
+ }
@@ -0,0 +1,20 @@
1
+ .np-notification-dot {
2
+ --np-notification-dot-size: 14px;
3
+ position: relative;
4
+ display: inline-block;
5
+ }
6
+ .np-notification-dot-mask {
7
+ -webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
8
+ mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
9
+ -webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
10
+ mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
11
+ }
12
+ .np-notification-dot-badge {
13
+ position: absolute;
14
+ width: var(--np-notification-dot-size);
15
+ height: var(--np-notification-dot-size);
16
+ background-color: var(--color-sentiment-negative);
17
+ border-radius: 9999px;
18
+ border-radius: var(--radius-full);
19
+ right: 0;
20
+ }
@@ -5,6 +5,7 @@
5
5
  --badge-mask: 2px;
6
6
  --badge-mask-offset: calc(var(--badge-size) / 2);
7
7
  --badge-border-color: rgba(255, 255, 255, 0.08);
8
+ --badge-content-position: 0px;
8
9
  }
9
10
  .tw-badge.tw-badge-lg {
10
11
  --badge-size: 24px;
@@ -14,8 +15,8 @@
14
15
  --badge-border-color: rgba(0, 0, 0, 0.08);
15
16
  }
16
17
  .tw-badge > .tw-badge__children {
17
- -webkit-mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset)) left calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
18
- mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset)) left calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
18
+ -webkit-mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset) - var(--badge-content-position)) left calc(100% - var(--badge-mask-offset) - var(--badge-content-position)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
19
+ mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset) - var(--badge-content-position)) left calc(100% - var(--badge-mask-offset) - var(--badge-content-position)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
19
20
  }
20
21
  [dir="rtl"] .tw-badge > .tw-badge__children {
21
22
  -webkit-mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset)) right calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
@@ -25,8 +26,8 @@
25
26
  position: absolute;
26
27
  width: var(--badge-size);
27
28
  height: var(--badge-size);
28
- bottom: 0;
29
- right: 0;
29
+ bottom: var(--badge-content-position);
30
+ right: var(--badge-content-position);
30
31
  box-sizing: border-box;
31
32
  border-radius: 50%;
32
33
  text-align: center;
@@ -39,7 +40,7 @@
39
40
  user-select: none;
40
41
  }
41
42
  [dir="rtl"] .tw-badge > .tw-badge__content {
42
- left: 0;
43
+ left: var(--badge-content-position);
43
44
  right: auto;
44
45
  right: initial;
45
46
  }
@@ -4,8 +4,40 @@
4
4
  width: var(--circle-size);
5
5
  height: var(--circle-size);
6
6
  flex-shrink: 0;
7
+ --circle-border-color: var(--color-border-neutral);
8
+ --circle-border-width: 1px;
9
+ font-size: var(--circle-font-size);
10
+ font-weight: 600;
11
+ font-weight: var(--font-weight-semi-bold);
12
+ line-height: 1;
13
+ }
14
+ .np-circle .np-display {
15
+ font-size: var(--circle-font-size);
7
16
  }
8
17
  .np-circle .tw-icon > svg {
9
18
  height: var(--circle-icon-size);
10
19
  width: var(--circle-icon-size);
11
20
  }
21
+ .np-circle img,
22
+ .np-circle .wds-flag {
23
+ border-radius: 9999px;
24
+ border-radius: var(--radius-full);
25
+ width: 100%;
26
+ height: 100%;
27
+ -o-object-fit: cover;
28
+ object-fit: cover;
29
+ }
30
+ .np-circle-border {
31
+ position: relative;
32
+ }
33
+ .np-circle-border::after {
34
+ content: "";
35
+ position: absolute;
36
+ top: 0;
37
+ left: 0;
38
+ width: 100%;
39
+ height: 100%;
40
+ border-radius: 9999px;
41
+ border-radius: var(--radius-full);
42
+ box-shadow: inset 0 0 0 var(--circle-border-width) var(--circle-border-color);
43
+ }