@transferwise/components 46.128.3 → 46.130.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 (121) hide show
  1. package/build/alert/Alert.js +1 -1
  2. package/build/alert/Alert.mjs +1 -1
  3. package/build/card/Card.js.map +1 -1
  4. package/build/card/Card.mjs.map +1 -1
  5. package/build/common/{card/Card.js → baseCard/BaseCard.js} +4 -4
  6. package/build/common/baseCard/BaseCard.js.map +1 -0
  7. package/build/common/{card/Card.mjs → baseCard/BaseCard.mjs} +4 -4
  8. package/build/common/baseCard/BaseCard.mjs.map +1 -0
  9. package/build/common/liveRegion/LiveRegion.js +42 -0
  10. package/build/common/liveRegion/LiveRegion.js.map +1 -0
  11. package/build/common/liveRegion/LiveRegion.mjs +40 -0
  12. package/build/common/liveRegion/LiveRegion.mjs.map +1 -0
  13. package/build/criticalBanner/CriticalCommsBanner.js +68 -3
  14. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  15. package/build/criticalBanner/CriticalCommsBanner.mjs +69 -4
  16. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  17. package/build/flowNavigation/FlowNavigation.js +1 -1
  18. package/build/flowNavigation/FlowNavigation.mjs +1 -1
  19. package/build/index.js +4 -4
  20. package/build/index.mjs +1 -1
  21. package/build/inputs/SelectInput.js +1 -1
  22. package/build/inputs/SelectInput.js.map +1 -1
  23. package/build/inputs/SelectInput.mjs +1 -1
  24. package/build/inputs/SelectInput.mjs.map +1 -1
  25. package/build/inputs/_ButtonInput.js +2 -2
  26. package/build/inputs/_ButtonInput.js.map +1 -1
  27. package/build/inputs/_ButtonInput.mjs +2 -2
  28. package/build/inputs/_ButtonInput.mjs.map +1 -1
  29. package/build/main.css +191 -165
  30. package/build/overlayHeader/OverlayHeader.js +1 -1
  31. package/build/overlayHeader/OverlayHeader.mjs +1 -1
  32. package/build/promoCard/PromoCard.js +2 -2
  33. package/build/promoCard/PromoCard.js.map +1 -1
  34. package/build/promoCard/PromoCard.mjs +2 -2
  35. package/build/promoCard/PromoCard.mjs.map +1 -1
  36. package/build/prompt/InfoPrompt/InfoPrompt.js +35 -29
  37. package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -1
  38. package/build/prompt/InfoPrompt/InfoPrompt.mjs +35 -29
  39. package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -1
  40. package/build/sentimentSurface/SentimentSurface.js +5 -1
  41. package/build/sentimentSurface/SentimentSurface.js.map +1 -1
  42. package/build/sentimentSurface/SentimentSurface.mjs +5 -1
  43. package/build/sentimentSurface/SentimentSurface.mjs.map +1 -1
  44. package/build/styles/criticalBanner/CriticalCommsBanner.css +33 -15
  45. package/build/styles/inputs/SelectInput.css +8 -0
  46. package/build/styles/listItem/ListItem.css +1 -1
  47. package/build/styles/main.css +191 -165
  48. package/build/styles/sentimentSurface/SentimentSurface.css +100 -100
  49. package/build/types/card/Card.d.ts +1 -1
  50. package/build/types/common/{card/Card.d.ts → baseCard/BaseCard.d.ts} +8 -8
  51. package/build/types/common/baseCard/BaseCard.d.ts.map +1 -0
  52. package/build/types/common/baseCard/index.d.ts +3 -0
  53. package/build/types/common/baseCard/index.d.ts.map +1 -0
  54. package/build/types/common/index.d.ts +2 -0
  55. package/build/types/common/index.d.ts.map +1 -1
  56. package/build/types/common/liveRegion/LiveRegion.d.ts +23 -0
  57. package/build/types/common/liveRegion/LiveRegion.d.ts.map +1 -0
  58. package/build/types/common/liveRegion/index.d.ts +3 -0
  59. package/build/types/common/liveRegion/index.d.ts.map +1 -0
  60. package/build/types/criticalBanner/CriticalCommsBanner.d.ts +4 -1
  61. package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
  62. package/build/types/criticalBanner/index.d.ts +1 -0
  63. package/build/types/criticalBanner/index.d.ts.map +1 -1
  64. package/build/types/index.d.ts +2 -1
  65. package/build/types/index.d.ts.map +1 -1
  66. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  67. package/build/types/promoCard/PromoCard.d.ts +3 -3
  68. package/build/types/promoCard/PromoCard.d.ts.map +1 -1
  69. package/build/types/prompt/InfoPrompt/InfoPrompt.d.ts +11 -2
  70. package/build/types/prompt/InfoPrompt/InfoPrompt.d.ts.map +1 -1
  71. package/build/types/sentimentSurface/SentimentSurface.d.ts.map +1 -1
  72. package/package.json +2 -2
  73. package/src/card/Card.story.tsx +3 -2
  74. package/src/card/Card.tsx +1 -1
  75. package/src/common/{card/Card.less → baseCard/BaseCard.less} +1 -1
  76. package/src/common/{card/Card.story.tsx → baseCard/BaseCard.story.tsx} +5 -5
  77. package/src/common/{card/Card.test.tsx → baseCard/BaseCard.test.tsx} +11 -12
  78. package/src/common/{card/Card.tsx → baseCard/BaseCard.tsx} +9 -9
  79. package/src/common/baseCard/index.ts +2 -0
  80. package/src/common/index.ts +2 -0
  81. package/src/common/liveRegion/LiveRegion.test.tsx +56 -0
  82. package/src/common/liveRegion/LiveRegion.tsx +49 -0
  83. package/src/common/liveRegion/index.ts +2 -0
  84. package/src/criticalBanner/CriticalCommsBanner.css +33 -15
  85. package/src/criticalBanner/CriticalCommsBanner.less +46 -36
  86. package/src/criticalBanner/CriticalCommsBanner.story.tsx +9 -15
  87. package/src/criticalBanner/CriticalCommsBanner.test.story.tsx +70 -0
  88. package/src/criticalBanner/CriticalCommsBanner.test.tsx +66 -0
  89. package/src/criticalBanner/CriticalCommsBanner.tsx +54 -5
  90. package/src/criticalBanner/index.ts +1 -0
  91. package/src/index.ts +2 -1
  92. package/src/inputs/SelectInput.css +8 -0
  93. package/src/inputs/SelectInput.story.tsx +2 -2
  94. package/src/inputs/SelectInput.test.story.tsx +57 -1
  95. package/src/inputs/SelectInput.test.tsx +33 -1
  96. package/src/inputs/SelectInput.tsx +2 -1
  97. package/src/inputs/_ButtonInput.less +8 -0
  98. package/src/inputs/_ButtonInput.tsx +1 -1
  99. package/src/listItem/ListItem.css +1 -1
  100. package/src/listItem/ListItem.less +4 -2
  101. package/src/listItem/_stories/Breakpoints/ListItem.noMedia.test.story.tsx +62 -0
  102. package/src/listItem/_stories/Breakpoints/ListItem.sideMedia.test.story.tsx +62 -0
  103. package/src/listItem/_stories/Breakpoints/ListItem.stackedMedia.test.story.tsx +62 -0
  104. package/src/listItem/_stories/ListItem.story.tsx +3 -2
  105. package/src/main.css +191 -165
  106. package/src/main.less +2 -2
  107. package/src/promoCard/PromoCard.tsx +6 -5
  108. package/src/prompt/InfoPrompt/InfoPrompt.test.story.tsx +119 -0
  109. package/src/prompt/InfoPrompt/InfoPrompt.tsx +47 -34
  110. package/src/sentimentSurface/SentimentSurface.css +100 -100
  111. package/src/sentimentSurface/SentimentSurface.less +50 -50
  112. package/src/sentimentSurface/SentimentSurface.test.story.tsx +19 -0
  113. package/src/sentimentSurface/SentimentSurface.tsx +3 -0
  114. package/build/common/card/Card.js.map +0 -1
  115. package/build/common/card/Card.mjs.map +0 -1
  116. package/build/types/common/card/Card.d.ts.map +0 -1
  117. package/build/types/common/card/index.d.ts +0 -3
  118. package/build/types/common/card/index.d.ts.map +0 -1
  119. package/src/common/card/index.ts +0 -2
  120. /package/build/styles/common/{card/Card.css → baseCard/BaseCard.css} +0 -0
  121. /package/src/common/{card/Card.css → baseCard/BaseCard.css} +0 -0
@@ -5,11 +5,11 @@
5
5
  }
6
6
 
7
7
  &-negative {
8
- .np-theme-personal &,
9
- .np-theme-business &,
10
- .np-theme-platform &,
11
- .np-theme-personal--bright-green &,
12
- .np-theme-business--bright-green & {
8
+ .np-theme-personal&,
9
+ .np-theme-business&,
10
+ .np-theme-platform&,
11
+ .np-theme-personal--bright-green&,
12
+ .np-theme-business--bright-green& {
13
13
  &-base {
14
14
  .sentiment-surface-tokens(
15
15
  #CB272F, #B8232B, #A72027,
@@ -32,11 +32,11 @@
32
32
  }
33
33
  }
34
34
 
35
- .np-theme-personal--dark &,
36
- .np-theme-business--dark &,
37
- .np-theme-personal--forest-green &,
38
- .np-theme-business--forest-green &,
39
- .np-theme-platform--forest-green & {
35
+ .np-theme-personal--dark&,
36
+ .np-theme-business--dark&,
37
+ .np-theme-personal--forest-green&,
38
+ .np-theme-business--forest-green&,
39
+ .np-theme-platform--forest-green& {
40
40
  &-base {
41
41
  .sentiment-surface-tokens(
42
42
  #FFA8AD, #FFBDC0, #FFD1D3,
@@ -61,11 +61,11 @@
61
61
  }
62
62
 
63
63
  &-warning {
64
- .np-theme-personal &,
65
- .np-theme-business &,
66
- .np-theme-platform &,
67
- .np-theme-personal--bright-green &,
68
- .np-theme-business--bright-green & {
64
+ .np-theme-personal&,
65
+ .np-theme-business&,
66
+ .np-theme-platform&,
67
+ .np-theme-personal--bright-green&,
68
+ .np-theme-business--bright-green& {
69
69
  &-base {
70
70
  .sentiment-surface-tokens(
71
71
  #4A3B1C, #302612, #2C2311, // content-primary (default, hover, active)
@@ -88,11 +88,11 @@
88
88
  }
89
89
  }
90
90
 
91
- .np-theme-personal--dark &,
92
- .np-theme-business--dark &,
93
- .np-theme-personal--forest-green &,
94
- .np-theme-business--forest-green &,
95
- .np-theme-platform--forest-green & {
91
+ .np-theme-personal--dark&,
92
+ .np-theme-business--dark&,
93
+ .np-theme-personal--forest-green&,
94
+ .np-theme-business--forest-green&,
95
+ .np-theme-platform--forest-green& {
96
96
  &-base {
97
97
  .sentiment-surface-tokens(
98
98
  #FADC65, #F9D648, #F8CD20, // content-primary
@@ -116,11 +116,11 @@
116
116
  }
117
117
  }
118
118
  &-success {
119
- .np-theme-personal &,
120
- .np-theme-business &,
121
- .np-theme-platform &,
122
- .np-theme-personal--bright-green &,
123
- .np-theme-business--bright-green & {
119
+ .np-theme-personal&,
120
+ .np-theme-business&,
121
+ .np-theme-platform&,
122
+ .np-theme-personal--bright-green&,
123
+ .np-theme-business--bright-green& {
124
124
  &-base {
125
125
  .sentiment-surface-tokens(
126
126
  #054D28, #043A1E, #022614, // content-primary (default, hover, active)
@@ -143,11 +143,11 @@
143
143
  }
144
144
  }
145
145
 
146
- .np-theme-personal--dark &,
147
- .np-theme-business--dark &,
148
- .np-theme-personal--forest-green &,
149
- .np-theme-business--forest-green &,
150
- .np-theme-platform--forest-green & {
146
+ .np-theme-personal--dark&,
147
+ .np-theme-business--dark&,
148
+ .np-theme-personal--forest-green&,
149
+ .np-theme-business--forest-green&,
150
+ .np-theme-platform--forest-green& {
151
151
  &-base {
152
152
  .sentiment-surface-tokens(
153
153
  #BAE5A0, #C8EAB3, #D6F0C7, // content-primary
@@ -171,11 +171,11 @@
171
171
  }
172
172
  }
173
173
  &-neutral {
174
- .np-theme-personal &,
175
- .np-theme-business &,
176
- .np-theme-platform &,
177
- .np-theme-personal--bright-green &,
178
- .np-theme-business--bright-green & {
174
+ .np-theme-personal&,
175
+ .np-theme-business&,
176
+ .np-theme-platform&,
177
+ .np-theme-personal--bright-green&,
178
+ .np-theme-business--bright-green& {
179
179
  &-base {
180
180
  .sentiment-surface-tokens(
181
181
  #454745, #353635, #232423, // content-primary (default, hover, active)
@@ -198,11 +198,11 @@
198
198
  }
199
199
  }
200
200
 
201
- .np-theme-personal--dark &,
202
- .np-theme-business--dark &,
203
- .np-theme-personal--forest-green &,
204
- .np-theme-business--forest-green &,
205
- .np-theme-platform--forest-green & {
201
+ .np-theme-personal--dark&,
202
+ .np-theme-business--dark&,
203
+ .np-theme-personal--forest-green&,
204
+ .np-theme-business--forest-green&,
205
+ .np-theme-platform--forest-green& {
206
206
  &-base {
207
207
  .sentiment-surface-tokens(
208
208
  #F1F1ED, #E7E7E1, #DFDED5, // content-primary
@@ -226,11 +226,11 @@
226
226
  }
227
227
  }
228
228
  &-proposition {
229
- .np-theme-personal &,
230
- .np-theme-business &,
231
- .np-theme-platform &,
232
- .np-theme-personal--bright-green &,
233
- .np-theme-business--bright-green & {
229
+ .np-theme-personal&,
230
+ .np-theme-business&,
231
+ .np-theme-platform&,
232
+ .np-theme-personal--bright-green&,
233
+ .np-theme-business--bright-green& {
234
234
  &-base {
235
235
  .sentiment-surface-tokens(
236
236
  #0E0F0C, #0A2826, #074140, // content-primary (default, hover, active)
@@ -253,11 +253,11 @@
253
253
  }
254
254
  }
255
255
 
256
- .np-theme-personal--dark &,
257
- .np-theme-business--dark &,
258
- .np-theme-personal--forest-green &,
259
- .np-theme-business--forest-green &,
260
- .np-theme-platform--forest-green & {
256
+ .np-theme-personal--dark&,
257
+ .np-theme-business--dark&,
258
+ .np-theme-personal--forest-green&,
259
+ .np-theme-business--forest-green&,
260
+ .np-theme-platform--forest-green& {
261
261
  &-base {
262
262
  .sentiment-surface-tokens(
263
263
  #FFFFFF, #EAF9F9, #D5F4F4, // content-primary
@@ -56,6 +56,25 @@ export const NestedSentiments: Story = {
56
56
  ),
57
57
  };
58
58
 
59
+ export const NestedThemes: Story = {
60
+ render: () => (
61
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '24px' }}>
62
+ <ThemeProvider theme="forest-green" className="p-a-4">
63
+ Page is in Personal Forest Green Theme
64
+ <SentimentSurface sentiment="success" className="p-a-4">
65
+ Some Component with Success Sentiment
66
+ </SentimentSurface>
67
+ <ThemeProvider theme="personal" screenMode="light" className="p-a-4">
68
+ Island of Personal Light Theme
69
+ <SentimentSurface sentiment="success" className="p-a-4">
70
+ Some Component with Success Sentiment
71
+ </SentimentSurface>
72
+ </ThemeProvider>
73
+ </ThemeProvider>
74
+ </div>
75
+ ),
76
+ };
77
+
59
78
  const ButtonsGrid = () => (
60
79
  <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
61
80
  {emphasisLevels.map((emphasis) =>
@@ -5,6 +5,7 @@ import {
5
5
  SentimentSurfaceComponentProps,
6
6
  SentimentSurfaceComponent,
7
7
  } from './SentimentSurface.types';
8
+ import { useTheme } from '@wise/components-theming';
8
9
 
9
10
  /**
10
11
  * SentimentSurface is a polymorphic container component that exposes and, optionally, applies
@@ -53,7 +54,9 @@ const SentimentSurface: SentimentSurfaceComponent = forwardRef(function Sentimen
53
54
  ) {
54
55
  const Element = as ?? 'div';
55
56
  const BASE_CLASS = 'wds-sentiment-surface';
57
+ const { className: closestBrandTheme } = useTheme();
56
58
  const classNames = clsx(
59
+ closestBrandTheme,
57
60
  BASE_CLASS,
58
61
  `${BASE_CLASS}-${sentiment}-${emphasis}`,
59
62
  hasBaseStyles && `${BASE_CLASS}--hasBaseStyles`,
@@ -1 +0,0 @@
1
- {"version":3,"file":"Card.js","sources":["../../../src/common/card/Card.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { MouseEvent, type ReactNode, forwardRef, useRef } from 'react';\n\nimport { CloseButton } from '../closeButton';\nimport { stopPropagation } from '../domHelpers';\n\nexport interface CardProps {\n /** Content to display inside Card. */\n children: ReactNode;\n\n /** Optional prop to specify classNames onto the Card */\n className?: string;\n\n /** Optional prop to specify the ID on to Card */\n id?: string;\n\n /** Specify whether the Card is disabled, or not */\n isDisabled?: boolean;\n\n /** Specify whether the Card is sized small or not */\n isSmall?: boolean;\n\n /** Optionally specify Card onDismiss function */\n onDismiss?: () => void;\n\n /** Optional prop to specify the ID used for testing */\n testId?: string;\n}\n\n/**\n * Card component.\n *\n * A card is a container for content that is used to group related information.\n * It can be used to display information in a structured way, and can be\n * customized with various props to suit different use cases.\n *\n * @param {Object} props - The component props.\n * @param {ReactNode} children - The content to display inside the card.\n * @param {string} className - Optional class name(s) to add to the card container.\n * @param {string} id - Optional ID to add to the card container.\n * @param {boolean} isDisabled - Whether the card is disabled or not.\n * @param {boolean} isSmall - Whether the card is small or not.\n * @param {(event_: MouseEvent<HTMLButtonElement>) => void} onDismiss - Optional function to call when the card is dismissed.\n * @param {string} testId - Optional ID to add to the card container for testing purposes.\n * @returns {React.JSX.Element} - The card component.\n * @example\n * <Card>\n * <p>Hello World!</p>\n * </Card>\n */\nconst Card = forwardRef<HTMLDivElement, CardProps>(\n (\n {\n className,\n children = null,\n id,\n isDisabled = false,\n isSmall = false,\n onDismiss,\n testId,\n ...props\n },\n ref,\n ) => {\n const closeButtonReference = useRef(null);\n\n return (\n <div\n ref={ref}\n className={clsx(\n 'np-Card',\n {\n 'np-Card--small': !!isSmall,\n 'is-disabled': !!isDisabled,\n },\n className,\n )}\n id={id}\n data-testid={testId}\n {...props}\n >\n {onDismiss && (\n <CloseButton\n ref={closeButtonReference}\n className=\"np-Card-closeButton\"\n size={isSmall ? 'sm' : 'md'}\n isDisabled={isDisabled}\n testId=\"close-button\"\n onClick={(e) => {\n stopPropagation(e);\n onDismiss();\n }}\n />\n )}\n {children}\n </div>\n );\n },\n);\n\nCard.displayName = 'Card';\n\nexport default Card;\n"],"names":["Card","forwardRef","className","children","id","isDisabled","isSmall","onDismiss","testId","props","ref","closeButtonReference","useRef","_jsxs","clsx","_jsx","CloseButton","size","onClick","e","stopPropagation","displayName"],"mappings":";;;;;;;;;;AAkDA,MAAMA,IAAI,gBAAGC,gBAAU,CACrB,CACE;EACEC,SAAS;AACTC,EAAAA,QAAQ,GAAG,IAAI;EACfC,EAAE;AACFC,EAAAA,UAAU,GAAG,KAAK;AAClBC,EAAAA,OAAO,GAAG,KAAK;EACfC,SAAS;EACTC,MAAM;EACN,GAAGC;AAAK,CACT,EACDC,GAAG,KACD;AACF,EAAA,MAAMC,oBAAoB,GAAGC,YAAM,CAAC,IAAI,CAAC;AAEzC,EAAA,oBACEC,eAAA,CAAA,KAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAI;AACTR,IAAAA,SAAS,EAAEY,SAAI,CACb,SAAS,EACT;MACE,gBAAgB,EAAE,CAAC,CAACR,OAAO;MAC3B,aAAa,EAAE,CAAC,CAACD;KAClB,EACDH,SAAS,CACT;AACFE,IAAAA,EAAE,EAAEA,EAAG;AACP,IAAA,aAAA,EAAaI,MAAO;AAAA,IAAA,GAChBC,KAAK;AAAAN,IAAAA,QAAA,EAAA,CAERI,SAAS,iBACRQ,cAAA,CAACC,uBAAW,EAAA;AACVN,MAAAA,GAAG,EAAEC,oBAAqB;AAC1BT,MAAAA,SAAS,EAAC,qBAAqB;AAC/Be,MAAAA,IAAI,EAAEX,OAAO,GAAG,IAAI,GAAG,IAAK;AAC5BD,MAAAA,UAAU,EAAEA,UAAW;AACvBG,MAAAA,MAAM,EAAC,cAAc;MACrBU,OAAO,EAAGC,CAAC,IAAI;QACbC,gCAAe,CAACD,CAAC,CAAC;AAClBZ,QAAAA,SAAS,EAAE;AACb,MAAA;KAAE,CAEL,EACAJ,QAAQ;AAAA,GACN,CAAC;AAEV,CAAC;AAGHH,IAAI,CAACqB,WAAW,GAAG,MAAM;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Card.mjs","sources":["../../../src/common/card/Card.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { MouseEvent, type ReactNode, forwardRef, useRef } from 'react';\n\nimport { CloseButton } from '../closeButton';\nimport { stopPropagation } from '../domHelpers';\n\nexport interface CardProps {\n /** Content to display inside Card. */\n children: ReactNode;\n\n /** Optional prop to specify classNames onto the Card */\n className?: string;\n\n /** Optional prop to specify the ID on to Card */\n id?: string;\n\n /** Specify whether the Card is disabled, or not */\n isDisabled?: boolean;\n\n /** Specify whether the Card is sized small or not */\n isSmall?: boolean;\n\n /** Optionally specify Card onDismiss function */\n onDismiss?: () => void;\n\n /** Optional prop to specify the ID used for testing */\n testId?: string;\n}\n\n/**\n * Card component.\n *\n * A card is a container for content that is used to group related information.\n * It can be used to display information in a structured way, and can be\n * customized with various props to suit different use cases.\n *\n * @param {Object} props - The component props.\n * @param {ReactNode} children - The content to display inside the card.\n * @param {string} className - Optional class name(s) to add to the card container.\n * @param {string} id - Optional ID to add to the card container.\n * @param {boolean} isDisabled - Whether the card is disabled or not.\n * @param {boolean} isSmall - Whether the card is small or not.\n * @param {(event_: MouseEvent<HTMLButtonElement>) => void} onDismiss - Optional function to call when the card is dismissed.\n * @param {string} testId - Optional ID to add to the card container for testing purposes.\n * @returns {React.JSX.Element} - The card component.\n * @example\n * <Card>\n * <p>Hello World!</p>\n * </Card>\n */\nconst Card = forwardRef<HTMLDivElement, CardProps>(\n (\n {\n className,\n children = null,\n id,\n isDisabled = false,\n isSmall = false,\n onDismiss,\n testId,\n ...props\n },\n ref,\n ) => {\n const closeButtonReference = useRef(null);\n\n return (\n <div\n ref={ref}\n className={clsx(\n 'np-Card',\n {\n 'np-Card--small': !!isSmall,\n 'is-disabled': !!isDisabled,\n },\n className,\n )}\n id={id}\n data-testid={testId}\n {...props}\n >\n {onDismiss && (\n <CloseButton\n ref={closeButtonReference}\n className=\"np-Card-closeButton\"\n size={isSmall ? 'sm' : 'md'}\n isDisabled={isDisabled}\n testId=\"close-button\"\n onClick={(e) => {\n stopPropagation(e);\n onDismiss();\n }}\n />\n )}\n {children}\n </div>\n );\n },\n);\n\nCard.displayName = 'Card';\n\nexport default Card;\n"],"names":["Card","forwardRef","className","children","id","isDisabled","isSmall","onDismiss","testId","props","ref","closeButtonReference","useRef","_jsxs","clsx","_jsx","CloseButton","size","onClick","e","stopPropagation","displayName"],"mappings":";;;;;;AAkDA,MAAMA,IAAI,gBAAGC,UAAU,CACrB,CACE;EACEC,SAAS;AACTC,EAAAA,QAAQ,GAAG,IAAI;EACfC,EAAE;AACFC,EAAAA,UAAU,GAAG,KAAK;AAClBC,EAAAA,OAAO,GAAG,KAAK;EACfC,SAAS;EACTC,MAAM;EACN,GAAGC;AAAK,CACT,EACDC,GAAG,KACD;AACF,EAAA,MAAMC,oBAAoB,GAAGC,MAAM,CAAC,IAAI,CAAC;AAEzC,EAAA,oBACEC,IAAA,CAAA,KAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAI;AACTR,IAAAA,SAAS,EAAEY,IAAI,CACb,SAAS,EACT;MACE,gBAAgB,EAAE,CAAC,CAACR,OAAO;MAC3B,aAAa,EAAE,CAAC,CAACD;KAClB,EACDH,SAAS,CACT;AACFE,IAAAA,EAAE,EAAEA,EAAG;AACP,IAAA,aAAA,EAAaI,MAAO;AAAA,IAAA,GAChBC,KAAK;AAAAN,IAAAA,QAAA,EAAA,CAERI,SAAS,iBACRQ,GAAA,CAACC,WAAW,EAAA;AACVN,MAAAA,GAAG,EAAEC,oBAAqB;AAC1BT,MAAAA,SAAS,EAAC,qBAAqB;AAC/Be,MAAAA,IAAI,EAAEX,OAAO,GAAG,IAAI,GAAG,IAAK;AAC5BD,MAAAA,UAAU,EAAEA,UAAW;AACvBG,MAAAA,MAAM,EAAC,cAAc;MACrBU,OAAO,EAAGC,CAAC,IAAI;QACbC,eAAe,CAACD,CAAC,CAAC;AAClBZ,QAAAA,SAAS,EAAE;AACb,MAAA;KAAE,CAEL,EACAJ,QAAQ;AAAA,GACN,CAAC;AAEV,CAAC;AAGHH,IAAI,CAACqB,WAAW,GAAG,MAAM;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/common/card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAKvE,MAAM,WAAW,SAAS;IACxB,sCAAsC;IACtC,QAAQ,EAAE,SAAS,CAAC;IAEpB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,kDAAkD;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAEvB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,IAAI,sGAgDT,CAAC;AAIF,eAAe,IAAI,CAAC"}
@@ -1,3 +0,0 @@
1
- export { default } from './Card';
2
- export * from './Card';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,cAAc,QAAQ,CAAC"}
@@ -1,2 +0,0 @@
1
- export { default } from './Card';
2
- export * from './Card';