@class101/cdn-ui-system 0.0.11 → 0.0.12
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.
package/lib/Media/Image/Image.js
CHANGED
@@ -22,6 +22,7 @@ var Image = forwardRef((props, ref) => {
|
|
22
22
|
sizes,
|
23
23
|
width = "100%",
|
24
24
|
maxWidth,
|
25
|
+
maxHeight,
|
25
26
|
height = "100%",
|
26
27
|
objectFit = "cover"
|
27
28
|
} = _a, restProps = __objRest(_a, [
|
@@ -32,6 +33,7 @@ var Image = forwardRef((props, ref) => {
|
|
32
33
|
"sizes",
|
33
34
|
"width",
|
34
35
|
"maxWidth",
|
36
|
+
"maxHeight",
|
35
37
|
"height",
|
36
38
|
"objectFit"
|
37
39
|
]);
|
@@ -67,6 +69,7 @@ var Image = forwardRef((props, ref) => {
|
|
67
69
|
sizes: actualSizes,
|
68
70
|
width: "100%",
|
69
71
|
maxWidth,
|
72
|
+
maxHeight,
|
70
73
|
height: "100%",
|
71
74
|
objectFit,
|
72
75
|
verticalAlign: "top"
|
@@ -47,6 +47,15 @@ function useActualSizes({ sizes, width, maxWidth }) {
|
|
47
47
|
if (isDefined(sizes)) {
|
48
48
|
return appendCssUnit(sizes, "px");
|
49
49
|
}
|
50
|
+
if (Array.isArray(maxWidth)) {
|
51
|
+
return maxWidth.map((maxWidthItem, index) => {
|
52
|
+
const condition = breakpoints[Math.min(index, breakpoints.length - 1)];
|
53
|
+
if (typeof maxWidthItem === "number" || (maxWidthItem == null ? void 0 : maxWidthItem.slice(-2)) === "px") {
|
54
|
+
const result = appendCssUnit(maxWidthItem, "px");
|
55
|
+
return index < maxWidth.length - 1 ? `(min-width: ${condition}) ${result}` : result;
|
56
|
+
}
|
57
|
+
}).join(",");
|
58
|
+
}
|
50
59
|
if (typeof maxWidth === "number" || (maxWidth == null ? void 0 : maxWidth.slice(-2)) === "px") {
|
51
60
|
const result = appendCssUnit(maxWidth, "px");
|
52
61
|
return `(min-width: ${result}) ${result}`;
|
package/lib/Tab/Tab/Tab.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
nl2br
|
3
|
-
} from "../../../chunk-
|
3
|
+
} from "../../../chunk-WVIP3U54.js";
|
4
4
|
import {
|
5
5
|
React,
|
6
6
|
__objRest,
|
@@ -111,7 +111,11 @@ var Text = system()(propVariant({
|
|
111
111
|
skipForward: true
|
112
112
|
}))((_a) => {
|
113
113
|
var _b = _a, { children, as = "span", color = "gray.900" } = _b, restProps = __objRest(_b, ["children", "as", "color"]);
|
114
|
-
return /* @__PURE__ */ React.createElement(Box, __spreadProps(__spreadValues({
|
114
|
+
return /* @__PURE__ */ React.createElement(Box, __spreadProps(__spreadValues({
|
115
|
+
m: 0,
|
116
|
+
p: 0,
|
117
|
+
border: 0
|
118
|
+
}, restProps), {
|
115
119
|
as,
|
116
120
|
color
|
117
121
|
}), typeof children === "string" ? nl2br(children) : children);
|