@ultraviolet/plus 0.2.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,87 +9,92 @@ 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;
|
|
12
|
+
})("display:block;text-align:left;padding:0;color:", _ref => {
|
|
13
13
|
let {
|
|
14
14
|
theme
|
|
15
15
|
} = _ref;
|
|
16
|
-
return theme.colors.neutral.
|
|
17
|
-
}, ";
|
|
16
|
+
return theme.colors.neutral.text;
|
|
17
|
+
}, ";text-decoration:none;border:1px solid ", _ref2 => {
|
|
18
18
|
let {
|
|
19
19
|
theme
|
|
20
20
|
} = _ref2;
|
|
21
|
-
return theme.
|
|
22
|
-
}, ";
|
|
21
|
+
return theme.colors.neutral.border;
|
|
22
|
+
}, ";border-radius:", _ref3 => {
|
|
23
23
|
let {
|
|
24
24
|
theme
|
|
25
25
|
} = _ref3;
|
|
26
|
+
return theme.radii.default;
|
|
27
|
+
}, ";background:", _ref4 => {
|
|
28
|
+
let {
|
|
29
|
+
theme
|
|
30
|
+
} = _ref4;
|
|
26
31
|
return theme.colors.neutral.background;
|
|
27
|
-
}, ";",
|
|
32
|
+
}, ";", _ref5 => {
|
|
28
33
|
let {
|
|
29
34
|
onClick,
|
|
30
35
|
href,
|
|
31
36
|
theme
|
|
32
|
-
} =
|
|
37
|
+
} = _ref5;
|
|
33
38
|
return onClick || href ? activeStyle(theme) : null;
|
|
34
39
|
}, ";overflow-wrap:break-word;");
|
|
35
40
|
const IconContainer = /*#__PURE__*/_styled("div", {
|
|
36
41
|
target: "e2ipnt4"
|
|
37
|
-
})("display:flex;width:fit-content;background:",
|
|
42
|
+
})("display:flex;width:fit-content;background:", _ref6 => {
|
|
38
43
|
let {
|
|
39
44
|
theme
|
|
40
|
-
} =
|
|
45
|
+
} = _ref6;
|
|
41
46
|
return theme.colors.neutral.backgroundWeak;
|
|
42
|
-
}, ";padding:",
|
|
47
|
+
}, ";padding:", _ref7 => {
|
|
43
48
|
let {
|
|
44
49
|
theme
|
|
45
|
-
} =
|
|
50
|
+
} = _ref7;
|
|
46
51
|
return theme.space['1'];
|
|
47
|
-
}, ";border-radius:",
|
|
52
|
+
}, ";border-radius:", _ref8 => {
|
|
48
53
|
let {
|
|
49
54
|
theme
|
|
50
|
-
} =
|
|
55
|
+
} = _ref8;
|
|
51
56
|
return theme.radii.default;
|
|
52
57
|
}, ";");
|
|
53
58
|
const StyledIconStack = /*#__PURE__*/_styled(Stack, {
|
|
54
59
|
shouldForwardProp: prop => prop !== 'direction',
|
|
55
60
|
target: "e2ipnt3"
|
|
56
|
-
})("padding:",
|
|
61
|
+
})("padding:", _ref9 => {
|
|
57
62
|
let {
|
|
58
63
|
theme,
|
|
59
64
|
direction
|
|
60
|
-
} =
|
|
65
|
+
} = _ref9;
|
|
61
66
|
return direction === 'column' ? `0 ${theme.space['3']} ${theme.space['3']} ${theme.space['3']}` : `${theme.space['3']} ${theme.space['3']} ${theme.space['3']} 0`;
|
|
62
67
|
}, ";");
|
|
63
68
|
const SubContainer = /*#__PURE__*/_styled(Stack, {
|
|
64
69
|
shouldForwardProp: prop => !['direction', 'href'].includes(prop),
|
|
65
70
|
target: "e2ipnt2"
|
|
66
|
-
})("padding:",
|
|
71
|
+
})("padding:", _ref10 => {
|
|
67
72
|
let {
|
|
68
73
|
theme,
|
|
69
74
|
direction
|
|
70
|
-
} =
|
|
75
|
+
} = _ref10;
|
|
71
76
|
return direction === 'column' ? `${theme.space['3']} ${theme.space['3']} 0 ${theme.space['3']}` : `${theme.space['3']} 0 ${theme.space['3']} ${theme.space['3']}`;
|
|
72
|
-
}, ";padding:",
|
|
77
|
+
}, ";padding:", _ref11 => {
|
|
73
78
|
let {
|
|
74
79
|
theme,
|
|
75
80
|
href
|
|
76
|
-
} =
|
|
81
|
+
} = _ref11;
|
|
77
82
|
return !href ? `${theme.space['3']}` : null;
|
|
78
83
|
}, ";height:fit-content;");
|
|
79
84
|
const Image = /*#__PURE__*/_styled('img', {
|
|
80
85
|
shouldForwardProp: prop => !['direction', 'subContainerHeight'].includes(prop),
|
|
81
86
|
target: "e2ipnt1"
|
|
82
|
-
})("object-fit:cover;border-radius:",
|
|
87
|
+
})("object-fit:cover;border-radius:", _ref12 => {
|
|
83
88
|
let {
|
|
84
89
|
theme,
|
|
85
90
|
direction
|
|
86
|
-
} =
|
|
91
|
+
} = _ref12;
|
|
87
92
|
return `${direction === 'column' ? `${theme.radii.default} ${theme.radii.default} 0 0` : `${theme.radii.default} 0 0 ${theme.radii.default}`}`;
|
|
88
|
-
}, ";",
|
|
93
|
+
}, ";", _ref13 => {
|
|
89
94
|
let {
|
|
90
95
|
direction,
|
|
91
96
|
subContainerHeight
|
|
92
|
-
} =
|
|
97
|
+
} = _ref13;
|
|
93
98
|
return direction === 'row' ? `max-height: ${subContainerHeight}px` : null;
|
|
94
99
|
}, ";");
|
|
95
100
|
const FullHeightStack = /*#__PURE__*/_styled(Stack, {
|
|
@@ -107,7 +112,7 @@ const FullHeightStack = /*#__PURE__*/_styled(Stack, {
|
|
|
107
112
|
* It can take different directions to display the image and the content. You can also add more content
|
|
108
113
|
* by passing children.
|
|
109
114
|
*/
|
|
110
|
-
const ContentCard = /*#__PURE__*/forwardRef((
|
|
115
|
+
const ContentCard = /*#__PURE__*/forwardRef((_ref14, ref) => {
|
|
111
116
|
let {
|
|
112
117
|
image,
|
|
113
118
|
direction = 'column',
|
|
@@ -121,7 +126,7 @@ const ContentCard = /*#__PURE__*/forwardRef((_ref13, ref) => {
|
|
|
121
126
|
onClick,
|
|
122
127
|
loading,
|
|
123
128
|
className
|
|
124
|
-
} =
|
|
129
|
+
} = _ref14;
|
|
125
130
|
const subContainerRef = /*#__PURE__*/createRef();
|
|
126
131
|
const [subContainerHeight, setSubContainerHeight] = useState(subContainerRef?.current?.offsetHeight);
|
|
127
132
|
const Container = useMemo(() => {
|
|
@@ -174,15 +179,18 @@ const ContentCard = /*#__PURE__*/forwardRef((_ref13, ref) => {
|
|
|
174
179
|
as: "small",
|
|
175
180
|
variant: "caption",
|
|
176
181
|
prominence: "weak",
|
|
182
|
+
sentiment: "neutral",
|
|
177
183
|
children: subtitle
|
|
178
184
|
}) : null, jsx(Text, {
|
|
179
185
|
as: "h3",
|
|
180
186
|
variant: "bodyStronger",
|
|
187
|
+
sentiment: "neutral",
|
|
181
188
|
children: title
|
|
182
189
|
})]
|
|
183
190
|
}), description ? jsx(Text, {
|
|
184
191
|
as: "p",
|
|
185
192
|
variant: "bodySmall",
|
|
193
|
+
sentiment: "neutral",
|
|
186
194
|
children: description
|
|
187
195
|
}) : null]
|
|
188
196
|
}), children ? jsx(Stack, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultraviolet/plus",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Ultraviolet Plus",
|
|
5
5
|
"homepage": "https://github.com/scaleway/ultraviolet#readme",
|
|
6
6
|
"repository": {
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/core": "7.23.2",
|
|
42
42
|
"@emotion/babel-plugin": "11.11.0",
|
|
43
|
-
"@types/react": "18.2.
|
|
44
|
-
"@types/react-dom": "18.2.
|
|
45
|
-
"@ultraviolet/icons": "2.4.
|
|
43
|
+
"@types/react": "18.2.31",
|
|
44
|
+
"@types/react-dom": "18.2.14",
|
|
45
|
+
"@ultraviolet/icons": "2.4.2"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@formatjs/ecma402-abstract": "1.17.2",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"intl-messageformat": "10.5.4",
|
|
55
55
|
"react-flatten-children": "1.1.2",
|
|
56
56
|
"react-intersection-observer": "9.5.2",
|
|
57
|
-
"@ultraviolet/themes": "1.
|
|
58
|
-
"@ultraviolet/ui": "1.
|
|
57
|
+
"@ultraviolet/themes": "1.3.0",
|
|
58
|
+
"@ultraviolet/ui": "1.21.1"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "rollup -c ../../rollup.config.mjs"
|