@ultraviolet/plus 0.5.4 → 0.5.6

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 +25 -25
  3. package/dist/index.d.ts +1 -1
  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 +42 -56
  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.
@@ -5,6 +5,9 @@ import capitalize$1 from '../../utils/capitalize.js';
5
5
  import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
6
6
 
7
7
  const ICONS = {
8
+ address: () => jsx("path", {
9
+ d: "M7.66667 4C8.10869 4 8.53262 4.17559 8.84518 4.48816C9.15774 4.80072 9.33333 5.22464 9.33333 5.66667C9.33333 5.88554 9.29022 6.10226 9.20647 6.30447C9.12271 6.50668 8.99994 6.69041 8.84518 6.84518C8.69041 6.99994 8.50668 7.12271 8.30447 7.20647C8.10226 7.29022 7.88554 7.33333 7.66667 7.33333C7.22464 7.33333 6.80072 7.15774 6.48816 6.84518C6.17559 6.53262 6 6.10869 6 5.66667C6 5.22464 6.17559 4.80072 6.48816 4.48816C6.80072 4.17559 7.22464 4 7.66667 4ZM7.66667 1C8.90434 1 10.0913 1.49167 10.9665 2.36683C11.8417 3.242 12.3333 4.42899 12.3333 5.66667C12.3333 9.16667 7.66667 14.3333 7.66667 14.3333C7.66667 14.3333 3 9.16667 3 5.66667C3 4.42899 3.49167 3.242 4.36683 2.36683C5.242 1.49167 6.42899 1 7.66667 1ZM7.66667 2.33333C6.78261 2.33333 5.93477 2.68452 5.30964 3.30964C4.68452 3.93477 4.33333 4.78261 4.33333 5.66667C4.33333 6.33333 4.33333 7.66667 7.66667 12.14C11 7.66667 11 6.33333 11 5.66667C11 4.78261 10.6488 3.93477 10.0237 3.30964C9.39857 2.68452 8.55072 2.33333 7.66667 2.33333Z"
10
+ }),
8
11
  alert: () => jsx("path", {
9
12
  d: "M11 15H13V17H11V15ZM11 7H13V13H11V7ZM12 2C6.47 2 2 6.5 2 12C2 14.6522 3.05357 17.1957 4.92893 19.0711C5.85752 19.9997 6.95991 20.7362 8.17317 21.2388C9.38642 21.7413 10.6868 22 12 22C14.6522 22 17.1957 20.9464 19.0711 19.0711C20.9464 17.1957 22 14.6522 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7362 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C9.87827 20 7.84344 19.1571 6.34315 17.6569C4.84285 16.1566 4 14.1217 4 12C4 9.87827 4.84285 7.84344 6.34315 6.34315C7.84344 4.84285 9.87827 4 12 4C14.1217 4 16.1566 4.84285 17.6569 6.34315C19.1571 7.84344 20 9.87827 20 12C20 14.1217 19.1571 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z"
10
13
  }),
@@ -319,7 +322,7 @@ const ICONS = {
319
322
  })
320
323
  };
321
324
  const customViewBoxes = [{
322
- icons: ['arrow-left-double', 'arrow-right-double', 'arrow-left', 'arrow-right', 'arrow-down', 'arrow-up', 'credentials', 'logout', 'organization', 'privacy', 'profile', 'support', 'switch_orga', 'credit-card', 'progress-check', 'id', 'reboot'],
325
+ icons: ['address', 'arrow-left-double', 'arrow-right-double', 'arrow-left', 'arrow-right', 'arrow-down', 'arrow-up', 'credentials', 'logout', 'organization', 'privacy', 'profile', 'support', 'switch_orga', 'credit-card', 'progress-check', 'id', 'reboot'],
323
326
  viewBox: '0 0 16 16'
324
327
  }, {
325
328
  icons: ['members'],
@@ -331,10 +334,9 @@ const customViewBoxes = [{
331
334
  icons: ['expand'],
332
335
  viewBox: '0 0 20 14'
333
336
  }];
334
- const sizeStyles = _ref => {
335
- let {
336
- size
337
- } = _ref;
337
+ const sizeStyles = ({
338
+ size
339
+ }) => {
338
340
  const pxSize = typeof size === 'number' && !Number.isNaN(size) ? `${size}px` : size;
339
341
  return /*#__PURE__*/css("height:", pxSize, ";width:", pxSize, ";min-width:", pxSize, ";min-height:", pxSize, ";");
340
342
  };
@@ -347,13 +349,12 @@ const PROMINENCES = {
347
349
  const StyledIcon = /*#__PURE__*/_styled('svg', {
348
350
  shouldForwardProp: prop => !['size', 'color', 'prominence', 'disabled'].includes(prop),
349
351
  target: "e1gt4cfo0"
350
- })("vertical-align:middle;fill:", _ref2 => {
351
- let {
352
- theme,
353
- color,
354
- prominence,
355
- disabled
356
- } = _ref2;
352
+ })("vertical-align:middle;fill:", ({
353
+ theme,
354
+ color,
355
+ prominence,
356
+ disabled
357
+ }) => {
357
358
  // stronger is available only for neutral color
358
359
  const definedProminence = color !== 'neutral' && prominence === 'stronger' ? capitalize$1(PROMINENCES.default) : capitalize$1(PROMINENCES[prominence]);
359
360
  theme.colors[color];
@@ -363,19 +364,18 @@ const StyledIcon = /*#__PURE__*/_styled('svg', {
363
364
  /**
364
365
  * Icon component is our set of system icons in the design system. All of them are SVGs.
365
366
  */
366
- const Icon = /*#__PURE__*/forwardRef((_ref3, ref) => {
367
- let {
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
- } = _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) => {
379
379
  const render = ICONS[name] || ICONS.alert;
380
380
  const defaultViewBox = useMemo(() => customViewBoxes.find(vB => vB.icons.includes(name))?.viewBox ?? '0 0 24 24', [name]);
381
381
  return jsx(StyledIcon, {
package/dist/index.d.ts CHANGED
@@ -235,7 +235,7 @@ declare const EstimateCost: {
235
235
  iteration?: Iteration | undefined;
236
236
  label?: ReactNode;
237
237
  labelTextVariant?: "body" | "caption" | "code" | "heading" | "bodySmall" | "bodySmallStrong" | "bodySmallStronger" | "bodyStrong" | "bodyStronger" | "captionSmall" | "captionSmallStrong" | "captionSmallStronger" | "captionStrong" | "captionStronger" | "headingLarge" | "headingSmall" | undefined;
238
- labelTextProminence?: "strong" | "default" | "stronger" | "weak" | undefined;
238
+ labelTextProminence?: "strong" | "weak" | "default" | "stronger" | undefined;
239
239
  longFractionDigits?: boolean | undefined;
240
240
  maxAmount?: number | undefined;
241
241
  monthlyPrice?: number | 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 };