@ultraviolet/plus 0.5.5 → 0.5.7

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 (27) hide show
  1. package/README.md +0 -1
  2. package/dist/@ultraviolet/icons/dist/components/Icon/index.js +21 -24
  3. package/dist/index.d.ts +2 -2
  4. package/dist/src/components/CodeEditor/CodeEditor.js +35 -47
  5. package/dist/src/components/ContentCard/Skeleton.js +34 -49
  6. package/dist/src/components/ContentCard/index.js +52 -92
  7. package/dist/src/components/ContentCardGroup/Card.js +70 -106
  8. package/dist/src/components/ContentCardGroup/SkeletonCard.js +8 -17
  9. package/dist/src/components/ContentCardGroup/index.js +19 -31
  10. package/dist/src/components/EstimateCost/Components/CustomUnitInput.js +9 -13
  11. package/dist/src/components/EstimateCost/Components/Item.js +70 -86
  12. package/dist/src/components/EstimateCost/Components/LineThrough.js +4 -7
  13. package/dist/src/components/EstimateCost/Components/NumberInput.js +7 -8
  14. package/dist/src/components/EstimateCost/Components/Region.js +17 -21
  15. package/dist/src/components/EstimateCost/Components/Regular.js +14 -24
  16. package/dist/src/components/EstimateCost/Components/Strong.js +16 -28
  17. package/dist/src/components/EstimateCost/Components/Unit.js +6 -7
  18. package/dist/src/components/EstimateCost/Components/UnitInput.js +74 -95
  19. package/dist/src/components/EstimateCost/Components/Zone.js +17 -21
  20. package/dist/src/components/EstimateCost/EstimateCost.js +64 -74
  21. package/dist/src/components/EstimateCost/EstimateCostContent.js +41 -55
  22. package/dist/src/components/EstimateCost/EstimateCostProvider.js +6 -7
  23. package/dist/src/components/EstimateCost/OverlayComponent.js +23 -36
  24. package/dist/src/components/EstimateCost/OverlayContext.js +7 -10
  25. package/dist/src/components/EstimateCost/componentStyle.js +45 -96
  26. package/dist/src/components/EstimateCost/helper.js +8 -9
  27. package/package.json +6 -6
package/README.md CHANGED
@@ -18,7 +18,6 @@ $ pnpm add @ultraviolet/plus
18
18
 
19
19
  Checkout our [documentation website](https://storybook.ultraviolet.scaleway.com/).
20
20
 
21
-
22
21
  ## Contributing
23
22
 
24
23
  📝 You can participate in the development and [start contributing](/CONTRIBUTING.md) to it.
@@ -334,10 +334,9 @@ const customViewBoxes = [{
334
334
  icons: ['expand'],
335
335
  viewBox: '0 0 20 14'
336
336
  }];
337
- const sizeStyles = _ref => {
338
- let {
339
- size
340
- } = _ref;
337
+ const sizeStyles = ({
338
+ size
339
+ }) => {
341
340
  const pxSize = typeof size === 'number' && !Number.isNaN(size) ? `${size}px` : size;
342
341
  return /*#__PURE__*/css("height:", pxSize, ";width:", pxSize, ";min-width:", pxSize, ";min-height:", pxSize, ";");
343
342
  };
@@ -350,13 +349,12 @@ const PROMINENCES = {
350
349
  const StyledIcon = /*#__PURE__*/_styled('svg', {
351
350
  shouldForwardProp: prop => !['size', 'color', 'prominence', 'disabled'].includes(prop),
352
351
  target: "e1gt4cfo0"
353
- })("vertical-align:middle;fill:", _ref2 => {
354
- let {
355
- theme,
356
- color,
357
- prominence,
358
- disabled
359
- } = _ref2;
352
+ })("vertical-align:middle;fill:", ({
353
+ theme,
354
+ color,
355
+ prominence,
356
+ disabled
357
+ }) => {
360
358
  // stronger is available only for neutral color
361
359
  const definedProminence = color !== 'neutral' && prominence === 'stronger' ? capitalize$1(PROMINENCES.default) : capitalize$1(PROMINENCES[prominence]);
362
360
  theme.colors[color];
@@ -366,19 +364,18 @@ const StyledIcon = /*#__PURE__*/_styled('svg', {
366
364
  /**
367
365
  * Icon component is our set of system icons in the design system. All of them are SVGs.
368
366
  */
369
- const Icon = /*#__PURE__*/forwardRef((_ref3, ref) => {
370
- let {
371
- name = 'alert',
372
- color = 'currentColor',
373
- size = '1em',
374
- prominence = 'default',
375
- className,
376
- 'data-testid': dataTestId,
377
- stroke,
378
- cursor,
379
- strokeWidth,
380
- disabled
381
- } = _ref3;
367
+ const Icon = /*#__PURE__*/forwardRef(({
368
+ name = 'alert',
369
+ color = 'currentColor',
370
+ size = '1em',
371
+ prominence = 'default',
372
+ className,
373
+ 'data-testid': dataTestId,
374
+ stroke,
375
+ cursor,
376
+ strokeWidth,
377
+ disabled
378
+ }, ref) => {
382
379
  const render = ICONS[name] || ICONS.alert;
383
380
  const defaultViewBox = useMemo(() => customViewBoxes.find(vB => vB.icons.includes(name))?.viewBox ?? '0 0 24 24', [name]);
384
381
  return jsx(StyledIcon, {
package/dist/index.d.ts CHANGED
@@ -216,7 +216,7 @@ declare const EstimateCost: {
216
216
  ({ description, alert, alertVariant, defaultTimeUnit, timeUnits, hideOverlay, disableOverlayLeft, disableOverlayRight, hideTimeUnit, hideTotal, discount, OverlayRight, OverlayLeft, isBeta, commitmentFees, commitmentFeesContent, monthlyFees, monthlyFeesLabel, monthlyFeesContent, overlayUnit, children, locales, numberLocales, currency, }: EstimateCostProps): _emotion_react_jsx_runtime.JSX.Element;
217
217
  LineThrough: _emotion_styled.StyledComponent<{
218
218
  theme?: _emotion_react.Theme | undefined;
219
- as?: react.ElementType<any> | undefined;
219
+ as?: react.ElementType<any, keyof react.JSX.IntrinsicElements> | undefined;
220
220
  } & {
221
221
  isActive?: boolean | undefined;
222
222
  }, react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -284,7 +284,7 @@ declare const EstimateCost: {
284
284
  }) => _emotion_react_jsx_runtime.JSX.Element | null;
285
285
  Image: _emotion_styled.StyledComponent<{
286
286
  theme?: _emotion_react.Theme | undefined;
287
- as?: react.ElementType<any> | undefined;
287
+ as?: react.ElementType<any, keyof react.JSX.IntrinsicElements> | undefined;
288
288
  }, react.DetailedHTMLProps<react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
289
289
  Region: ({ label, image, shouldBeHidden, priceText, animated, isFirstElement, isLastElement, productsCallback, iteration, discount, noBorder, noPrice, }: {
290
290
  shouldBeHidden?: boolean | undefined;
@@ -7,52 +7,40 @@ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
7
7
 
8
8
  const StyledText = /*#__PURE__*/_styled(Text, {
9
9
  target: "e13pskxy0"
10
- })("background-color:", _ref => {
11
- let {
12
- theme
13
- } = _ref;
14
- return theme.colors.neutral.backgroundStrong;
15
- }, ";padding:", _ref2 => {
16
- let {
17
- theme
18
- } = _ref2;
19
- return `${theme.space['1']} ${theme.space['2']}`;
20
- }, ";border-radius:", _ref3 => {
21
- let {
22
- theme
23
- } = _ref3;
24
- return theme.radii.default;
25
- }, ";width:100%;");
26
- const CodeEditor = _ref4 => {
27
- let {
28
- title,
29
- value,
30
- onChange,
31
- extensions = 'javascript',
32
- onBlur,
33
- height,
34
- readOnly
35
- } = _ref4;
36
- return jsxs("div", {
37
- children: [title ? jsx(StyledText, {
38
- as: "h3",
39
- variant: "headingSmall",
40
- children: title
41
- }) : null, jsx(CodeMirror, {
42
- readOnly: readOnly,
43
- width: "100%",
44
- height: height,
45
- theme: material,
46
- onChange: onChange,
47
- value: value,
48
- extensions: [langs[extensions]()],
49
- onBlur: onBlur,
50
- basicSetup: {
51
- highlightActiveLine: false,
52
- highlightActiveLineGutter: false
53
- }
54
- })]
55
- });
56
- };
10
+ })("background-color:", ({
11
+ theme
12
+ }) => theme.colors.neutral.backgroundStrong, ";padding:", ({
13
+ theme
14
+ }) => `${theme.space['1']} ${theme.space['2']}`, ";border-radius:", ({
15
+ theme
16
+ }) => theme.radii.default, ";width:100%;");
17
+ const CodeEditor = ({
18
+ title,
19
+ value,
20
+ onChange,
21
+ extensions = 'javascript',
22
+ onBlur,
23
+ height,
24
+ readOnly
25
+ }) => jsxs("div", {
26
+ children: [title ? jsx(StyledText, {
27
+ as: "h3",
28
+ variant: "headingSmall",
29
+ children: title
30
+ }) : null, jsx(CodeMirror, {
31
+ readOnly: readOnly,
32
+ width: "100%",
33
+ height: height,
34
+ theme: material,
35
+ onChange: onChange,
36
+ value: value,
37
+ extensions: [langs[extensions]()],
38
+ onBlur: onBlur,
39
+ basicSetup: {
40
+ highlightActiveLine: false,
41
+ highlightActiveLineGutter: false
42
+ }
43
+ })]
44
+ });
57
45
 
58
46
  export { CodeEditor };
@@ -5,57 +5,42 @@ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
5
5
  const SkeletonImage = /*#__PURE__*/_styled(Skeleton$1, {
6
6
  shouldForwardProp: prop => !['height', 'width', 'direction'].includes(prop),
7
7
  target: "e1wwr9dc1"
8
- })("border-radius:", _ref => {
9
- let {
10
- theme,
11
- direction
12
- } = _ref;
13
- return `${direction === 'column' ? `${theme.radii.default} ${theme.radii.default} 0 0` : `${theme.radii.default} 0 0 ${theme.radii.default}`}`;
14
- }, ";width:", _ref2 => {
15
- let {
16
- width
17
- } = _ref2;
18
- return width;
19
- }, ";height:", _ref3 => {
20
- let {
21
- height
22
- } = _ref3;
23
- return height;
24
- }, ";");
8
+ })("border-radius:", ({
9
+ theme,
10
+ direction
11
+ }) => `${direction === 'column' ? `${theme.radii.default} ${theme.radii.default} 0 0` : `${theme.radii.default} 0 0 ${theme.radii.default}`}`, ";width:", ({
12
+ width
13
+ }) => width, ";height:", ({
14
+ height
15
+ }) => height, ";");
25
16
  const StyledStack = /*#__PURE__*/_styled(Stack, {
26
17
  target: "e1wwr9dc0"
27
- })("padding:", _ref4 => {
28
- let {
29
- theme
30
- } = _ref4;
31
- return theme.space['3'];
32
- }, ";");
33
- const Skeleton = _ref5 => {
34
- let {
35
- direction
36
- } = _ref5;
37
- return jsxs(Stack, {
38
- direction: direction,
39
- children: [jsx(SkeletonImage, {
40
- variant: "square",
41
- height: direction === 'column' ? '120px' : 'unset',
42
- width: direction === 'row' ? '220px' : undefined,
43
- direction: direction
44
- }), jsxs(StyledStack, {
45
- gap: 2,
46
- children: [jsx(Skeleton$1, {
47
- variant: "line"
48
- }), jsx(Skeleton$1, {
49
- variant: "line"
50
- }), jsx(Skeleton$1, {
51
- variant: "line"
52
- }), jsx(Skeleton$1, {
53
- variant: "line"
54
- }), jsx(Skeleton$1, {
55
- variant: "line"
56
- })]
18
+ })("padding:", ({
19
+ theme
20
+ }) => theme.space['3'], ";");
21
+ const Skeleton = ({
22
+ direction
23
+ }) => jsxs(Stack, {
24
+ direction: direction,
25
+ children: [jsx(SkeletonImage, {
26
+ variant: "square",
27
+ height: direction === 'column' ? '120px' : 'unset',
28
+ width: direction === 'row' ? '220px' : undefined,
29
+ direction: direction
30
+ }), jsxs(StyledStack, {
31
+ gap: 2,
32
+ children: [jsx(Skeleton$1, {
33
+ variant: "line"
34
+ }), jsx(Skeleton$1, {
35
+ variant: "line"
36
+ }), jsx(Skeleton$1, {
37
+ variant: "line"
38
+ }), jsx(Skeleton$1, {
39
+ variant: "line"
40
+ }), jsx(Skeleton$1, {
41
+ variant: "line"
57
42
  })]
58
- });
59
- };
43
+ })]
44
+ });
60
45
 
61
46
  export { Skeleton };
@@ -9,94 +9,55 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
9
9
  const activeStyle = theme => /*#__PURE__*/css("&:hover{border:1px solid ", theme.colors.primary.borderHover, ";box-shadow:", theme.shadows.defaultShadow, ";cursor:pointer;}");
10
10
  const Card = /*#__PURE__*/_styled("div", {
11
11
  target: "e2ipnt5"
12
- })("display:block;text-align:left;padding:0;color:", _ref => {
13
- let {
14
- theme
15
- } = _ref;
16
- return theme.colors.neutral.text;
17
- }, ";text-decoration:none;border:1px solid ", _ref2 => {
18
- let {
19
- theme
20
- } = _ref2;
21
- return theme.colors.neutral.border;
22
- }, ";border-radius:", _ref3 => {
23
- let {
24
- theme
25
- } = _ref3;
26
- return theme.radii.default;
27
- }, ";background:", _ref4 => {
28
- let {
29
- theme
30
- } = _ref4;
31
- return theme.colors.neutral.background;
32
- }, ";", _ref5 => {
33
- let {
34
- onClick,
35
- href,
36
- theme
37
- } = _ref5;
38
- return onClick || href ? activeStyle(theme) : null;
39
- }, ";overflow-wrap:break-word;");
12
+ })("display:block;text-align:left;padding:0;color:", ({
13
+ theme
14
+ }) => theme.colors.neutral.text, ";text-decoration:none;border:1px solid ", ({
15
+ theme
16
+ }) => theme.colors.neutral.border, ";border-radius:", ({
17
+ theme
18
+ }) => theme.radii.default, ";background:", ({
19
+ theme
20
+ }) => theme.colors.neutral.background, ";", ({
21
+ onClick,
22
+ href,
23
+ theme
24
+ }) => onClick || href ? activeStyle(theme) : null, ";overflow-wrap:break-word;");
40
25
  const IconContainer = /*#__PURE__*/_styled("div", {
41
26
  target: "e2ipnt4"
42
- })("display:flex;width:fit-content;background:", _ref6 => {
43
- let {
44
- theme
45
- } = _ref6;
46
- return theme.colors.neutral.backgroundWeak;
47
- }, ";padding:", _ref7 => {
48
- let {
49
- theme
50
- } = _ref7;
51
- return theme.space['1'];
52
- }, ";border-radius:", _ref8 => {
53
- let {
54
- theme
55
- } = _ref8;
56
- return theme.radii.default;
57
- }, ";");
27
+ })("display:flex;width:fit-content;background:", ({
28
+ theme
29
+ }) => theme.colors.neutral.backgroundWeak, ";padding:", ({
30
+ theme
31
+ }) => theme.space['1'], ";border-radius:", ({
32
+ theme
33
+ }) => theme.radii.default, ";");
58
34
  const StyledIconStack = /*#__PURE__*/_styled(Stack, {
59
35
  shouldForwardProp: prop => prop !== 'direction',
60
36
  target: "e2ipnt3"
61
- })("padding:", _ref9 => {
62
- let {
63
- theme,
64
- direction
65
- } = _ref9;
66
- return direction === 'column' ? `0 ${theme.space['3']} ${theme.space['3']} ${theme.space['3']}` : `${theme.space['3']} ${theme.space['3']} ${theme.space['3']} 0`;
67
- }, ";");
37
+ })("padding:", ({
38
+ theme,
39
+ direction
40
+ }) => direction === 'column' ? `0 ${theme.space['3']} ${theme.space['3']} ${theme.space['3']}` : `${theme.space['3']} ${theme.space['3']} ${theme.space['3']} 0`, ";");
68
41
  const SubContainer = /*#__PURE__*/_styled(Stack, {
69
42
  shouldForwardProp: prop => !['direction', 'href'].includes(prop),
70
43
  target: "e2ipnt2"
71
- })("padding:", _ref10 => {
72
- let {
73
- theme,
74
- direction
75
- } = _ref10;
76
- return direction === 'column' ? `${theme.space['3']} ${theme.space['3']} 0 ${theme.space['3']}` : `${theme.space['3']} 0 ${theme.space['3']} ${theme.space['3']}`;
77
- }, ";padding:", _ref11 => {
78
- let {
79
- theme,
80
- href
81
- } = _ref11;
82
- return !href ? `${theme.space['3']}` : null;
83
- }, ";height:fit-content;");
44
+ })("padding:", ({
45
+ theme,
46
+ direction
47
+ }) => direction === 'column' ? `${theme.space['3']} ${theme.space['3']} 0 ${theme.space['3']}` : `${theme.space['3']} 0 ${theme.space['3']} ${theme.space['3']}`, ";padding:", ({
48
+ theme,
49
+ href
50
+ }) => !href ? `${theme.space['3']}` : null, ";height:fit-content;");
84
51
  const Image = /*#__PURE__*/_styled('img', {
85
52
  shouldForwardProp: prop => !['direction', 'subContainerHeight'].includes(prop),
86
53
  target: "e2ipnt1"
87
- })("object-fit:cover;border-radius:", _ref12 => {
88
- let {
89
- theme,
90
- direction
91
- } = _ref12;
92
- return `${direction === 'column' ? `${theme.radii.default} ${theme.radii.default} 0 0` : `${theme.radii.default} 0 0 ${theme.radii.default}`}`;
93
- }, ";", _ref13 => {
94
- let {
95
- direction,
96
- subContainerHeight
97
- } = _ref13;
98
- return direction === 'row' ? `max-height: ${subContainerHeight}px` : null;
99
- }, ";");
54
+ })("object-fit:cover;border-radius:", ({
55
+ theme,
56
+ direction
57
+ }) => `${direction === 'column' ? `${theme.radii.default} ${theme.radii.default} 0 0` : `${theme.radii.default} 0 0 ${theme.radii.default}`}`, ";", ({
58
+ direction,
59
+ subContainerHeight
60
+ }) => direction === 'row' ? `max-height: ${subContainerHeight}px` : null, ";");
100
61
  const FullHeightStack = /*#__PURE__*/_styled(Stack, {
101
62
  target: "e2ipnt0"
102
63
  })(process.env.NODE_ENV === "production" ? {
@@ -112,21 +73,20 @@ const FullHeightStack = /*#__PURE__*/_styled(Stack, {
112
73
  * It can take different directions to display the image and the content. You can also add more content
113
74
  * by passing children.
114
75
  */
115
- const ContentCard = /*#__PURE__*/forwardRef((_ref14, ref) => {
116
- let {
117
- image,
118
- direction = 'column',
119
- icon,
120
- subtitle,
121
- title,
122
- description,
123
- children,
124
- href,
125
- target = '_blank',
126
- onClick,
127
- loading,
128
- className
129
- } = _ref14;
76
+ const ContentCard = /*#__PURE__*/forwardRef(({
77
+ image,
78
+ direction = 'column',
79
+ icon,
80
+ subtitle,
81
+ title,
82
+ description,
83
+ children,
84
+ href,
85
+ target = '_blank',
86
+ onClick,
87
+ loading,
88
+ className
89
+ }, ref) => {
130
90
  const subContainerRef = /*#__PURE__*/createRef();
131
91
  const [subContainerHeight, setSubContainerHeight] = useState(subContainerRef?.current?.offsetHeight);
132
92
  const Container = useMemo(() => {
@@ -17,65 +17,32 @@ const StyledStack = /*#__PURE__*/_styled(Stack, {
17
17
  });
18
18
  const IconWrapper = /*#__PURE__*/_styled("div", {
19
19
  target: "eqcw8nr2"
20
- })("display:inline-flex;background:", _ref => {
21
- let {
22
- theme
23
- } = _ref;
24
- return theme.colors.neutral.backgroundWeak;
25
- }, ";padding:", _ref2 => {
26
- let {
27
- theme
28
- } = _ref2;
29
- return theme.space['1'];
30
- }, ";border-radius:", _ref3 => {
31
- let {
32
- theme
33
- } = _ref3;
34
- return theme.radii.default;
35
- }, ";");
20
+ })("display:inline-flex;background:", ({
21
+ theme
22
+ }) => theme.colors.neutral.backgroundWeak, ";padding:", ({
23
+ theme
24
+ }) => theme.space['1'], ";border-radius:", ({
25
+ theme
26
+ }) => theme.radii.default, ";");
36
27
  const StyledWrapper = /*#__PURE__*/_styled("a", {
37
28
  target: "eqcw8nr1"
38
- })("padding:", _ref4 => {
39
- let {
40
- theme
41
- } = _ref4;
42
- return theme.space['3'];
43
- }, ";text-decoration:none;height:100%;&:not(:first-child){border-top:1px solid ", _ref5 => {
44
- let {
45
- theme
46
- } = _ref5;
47
- return theme.colors.neutral.border;
48
- }, ";}&:first-child{border-radius:", _ref6 => {
49
- let {
50
- theme
51
- } = _ref6;
52
- return theme.radii.default;
53
- }, " ", _ref7 => {
54
- let {
55
- theme
56
- } = _ref7;
57
- return theme.radii.default;
58
- }, " 0 0;}&:last-child{border-radius:0 0 ", _ref8 => {
59
- let {
60
- theme
61
- } = _ref8;
62
- return theme.radii.default;
63
- }, " ", _ref9 => {
64
- let {
65
- theme
66
- } = _ref9;
67
- return theme.radii.default;
68
- }, ";}& ", IconWrapper, "{background:", _ref10 => {
69
- let {
70
- theme
71
- } = _ref10;
72
- return theme.colors.neutral.backgroundWeak;
73
- }, ";}&:hover{background:", _ref11 => {
74
- let {
75
- theme
76
- } = _ref11;
77
- return theme.colors.neutral.backgroundHover;
78
- }, ";& ", IconWrapper, "{background:none;}}");
29
+ })("padding:", ({
30
+ theme
31
+ }) => theme.space['3'], ";text-decoration:none;height:100%;&:not(:first-child){border-top:1px solid ", ({
32
+ theme
33
+ }) => theme.colors.neutral.border, ";}&:first-child{border-radius:", ({
34
+ theme
35
+ }) => theme.radii.default, " ", ({
36
+ theme
37
+ }) => theme.radii.default, " 0 0;}&:last-child{border-radius:0 0 ", ({
38
+ theme
39
+ }) => theme.radii.default, " ", ({
40
+ theme
41
+ }) => theme.radii.default, ";}& ", IconWrapper, "{background:", ({
42
+ theme
43
+ }) => theme.colors.neutral.backgroundWeak, ";}&:hover{background:", ({
44
+ theme
45
+ }) => theme.colors.neutral.backgroundHover, ";& ", IconWrapper, "{background:none;}}");
79
46
  const FullHeightStack = /*#__PURE__*/_styled(Stack, {
80
47
  target: "eqcw8nr0"
81
48
  })(process.env.NODE_ENV === "production" ? {
@@ -86,56 +53,53 @@ const FullHeightStack = /*#__PURE__*/_styled(Stack, {
86
53
  styles: "height:100%",
87
54
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
88
55
  });
89
- const Card = /*#__PURE__*/forwardRef((_ref12, ref) => {
90
- let {
91
- title,
92
- subtitle,
93
- description,
94
- children,
95
- href,
96
- target = '_blank'
97
- } = _ref12;
98
- return jsx(StyledWrapper, {
99
- href: href,
100
- target: target,
101
- ref: ref,
102
- children: jsxs(FullHeightStack, {
103
- direction: "row",
104
- gap: 2,
105
- alignItems: "center",
106
- justifyContent: "space-between",
107
- children: [jsxs(StyledStack, {
108
- gap: "0.5",
109
- children: [jsxs("div", {
110
- children: [subtitle ? jsx(Text, {
111
- as: "h5",
112
- variant: "caption",
113
- prominence: "weak",
114
- sentiment: "neutral",
115
- oneLine: true,
116
- children: subtitle
117
- }) : null, jsx(Text, {
118
- as: "h3",
119
- variant: "bodyStrong",
120
- sentiment: "neutral",
121
- oneLine: true,
122
- children: title
123
- })]
124
- }), description ? jsx(Text, {
125
- as: "p",
126
- variant: "bodySmall",
56
+ const Card = /*#__PURE__*/forwardRef(({
57
+ title,
58
+ subtitle,
59
+ description,
60
+ children,
61
+ href,
62
+ target = '_blank'
63
+ }, ref) => jsx(StyledWrapper, {
64
+ href: href,
65
+ target: target,
66
+ ref: ref,
67
+ children: jsxs(FullHeightStack, {
68
+ direction: "row",
69
+ gap: 2,
70
+ alignItems: "center",
71
+ justifyContent: "space-between",
72
+ children: [jsxs(StyledStack, {
73
+ gap: "0.5",
74
+ children: [jsxs("div", {
75
+ children: [subtitle ? jsx(Text, {
76
+ as: "h5",
77
+ variant: "caption",
78
+ prominence: "weak",
127
79
  sentiment: "neutral",
128
80
  oneLine: true,
129
- children: description
130
- }) : null, children]
131
- }), jsx(IconWrapper, {
132
- children: jsx(Icon, {
133
- name: "open-in-new",
134
- color: "neutral"
135
- })
136
- })]
137
- })
138
- });
139
- });
81
+ children: subtitle
82
+ }) : null, jsx(Text, {
83
+ as: "h3",
84
+ variant: "bodyStrong",
85
+ sentiment: "neutral",
86
+ oneLine: true,
87
+ children: title
88
+ })]
89
+ }), description ? jsx(Text, {
90
+ as: "p",
91
+ variant: "bodySmall",
92
+ sentiment: "neutral",
93
+ oneLine: true,
94
+ children: description
95
+ }) : null, children]
96
+ }), jsx(IconWrapper, {
97
+ children: jsx(Icon, {
98
+ name: "open-in-new",
99
+ color: "neutral"
100
+ })
101
+ })]
102
+ })
103
+ }));
140
104
 
141
105
  export { Card };