@yklyklpackages/message-card 0.0.1 → 0.1.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.
- package/dist/components/MessageCard.d.ts.map +1 -1
- package/dist/components/hooks.d.ts +4 -8
- package/dist/components/hooks.d.ts.map +1 -1
- package/dist/components/theme/ScreenTheme375.d.ts +4 -0
- package/dist/components/theme/ScreenTheme375.d.ts.map +1 -0
- package/dist/components/theme/ThemeContext.d.ts.map +1 -1
- package/dist/components/theme/defaultTheme.d.ts.map +1 -1
- package/dist/components/utils/styleHelpers.d.ts.map +1 -1
- package/dist/index.cjs +356 -366
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +356 -366
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +350 -360
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/theme.d.ts +0 -4
- package/dist/components/theme.d.ts.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -20,61 +20,6 @@
|
|
|
20
20
|
}
|
|
21
21
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
22
22
|
const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
|
|
23
|
-
const theme = {
|
|
24
|
-
fontSize: {
|
|
25
|
-
"text-xs": "24",
|
|
26
|
-
"text-sm": "26",
|
|
27
|
-
"text-md": "28",
|
|
28
|
-
"text-lg": "32",
|
|
29
|
-
"text-xl": "36"
|
|
30
|
-
},
|
|
31
|
-
color: {
|
|
32
|
-
"color-primary": "#02B176",
|
|
33
|
-
"color-error": "#FF0F23",
|
|
34
|
-
"color-success": "#02B176",
|
|
35
|
-
"color-warning": "#B26B00",
|
|
36
|
-
"color-textPrimary": "#0C0C0D",
|
|
37
|
-
"color-textSecondary": "#4B4C4D",
|
|
38
|
-
"color-textTertiary": "#646566",
|
|
39
|
-
"color-textFourth": "#969899"
|
|
40
|
-
},
|
|
41
|
-
backgroundColor: {
|
|
42
|
-
"bg-error": "#FFF1F2",
|
|
43
|
-
"bg-success": "#E5F7F1",
|
|
44
|
-
"bg-warning": "#FFF9E0",
|
|
45
|
-
"bg-page": "#F0F2F5",
|
|
46
|
-
"bg-card": "#FFFFFF",
|
|
47
|
-
"bg-cardContent": "#F7FAFC"
|
|
48
|
-
},
|
|
49
|
-
fontWeight: {
|
|
50
|
-
"font-weight-normal": "400",
|
|
51
|
-
"font-weight-bold": "500"
|
|
52
|
-
},
|
|
53
|
-
space: {
|
|
54
|
-
"spacing-xs": "8",
|
|
55
|
-
"spacing-sm": "16",
|
|
56
|
-
"spacing-md": "24",
|
|
57
|
-
"spacing-lg": "32",
|
|
58
|
-
"spacing-xl": "48",
|
|
59
|
-
"spacing-xxl": "64"
|
|
60
|
-
},
|
|
61
|
-
borderRadius: {
|
|
62
|
-
"radius-none": "0",
|
|
63
|
-
"radius-decorate": "4",
|
|
64
|
-
"radius-comp": "16",
|
|
65
|
-
"radius-card": "20",
|
|
66
|
-
"radius-model": "24"
|
|
67
|
-
},
|
|
68
|
-
borderSize: {
|
|
69
|
-
"border-0": "0",
|
|
70
|
-
"border-1": "1",
|
|
71
|
-
"border-2": "2",
|
|
72
|
-
"border-3": "3",
|
|
73
|
-
"border-4": "4"
|
|
74
|
-
},
|
|
75
|
-
components: {}
|
|
76
|
-
// 暂时忽略 components 属性
|
|
77
|
-
};
|
|
78
23
|
var __defProp$v = Object.defineProperty;
|
|
79
24
|
var __defProps$r = Object.defineProperties;
|
|
80
25
|
var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
|
|
@@ -177,57 +122,51 @@
|
|
|
177
122
|
}
|
|
178
123
|
return defaultValue;
|
|
179
124
|
}
|
|
180
|
-
const defaultTheme$
|
|
125
|
+
const defaultTheme$2 = {
|
|
181
126
|
fontSize: {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
127
|
+
FontSizes_JDH_Headline1: 23,
|
|
128
|
+
FontSizes_JDH_Headline2: 17,
|
|
129
|
+
FontSizes_JDH_Title: 15,
|
|
130
|
+
FontSizes_JDH_Text: 14,
|
|
131
|
+
FontSizes_JDH_AccentText: 12,
|
|
132
|
+
FontSizes_JDH_TagText: 10
|
|
187
133
|
},
|
|
188
134
|
color: {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
135
|
+
Color_JDH_Primary: "#17CB8E",
|
|
136
|
+
Color_JDH_Accent1: "#FF8000",
|
|
137
|
+
Color_JDH_Accent2: "#73B0FF",
|
|
138
|
+
Color_JDH_Red_Danger: "#FF0F23",
|
|
139
|
+
Color_JDH_Red_Price: "#FF0F23",
|
|
140
|
+
Color_JDH_Red_Discount: "#FF0F23",
|
|
141
|
+
Color_JDH_Green_Success: "#67CC52",
|
|
142
|
+
Color_JDH_Gray_Headline: "#222222",
|
|
143
|
+
Color_JDH_Gray_Text: "#222222",
|
|
144
|
+
Color_JDH_Gray_SecondText: "#575859",
|
|
145
|
+
Color_JDH_Gray_AccentText: "#858687",
|
|
146
|
+
Color_JDH_Gray_DividingLine: "#D3D3D3",
|
|
147
|
+
Color_JDH_Gray_Background: "#F5F5F6",
|
|
148
|
+
Color_JDH_Gray_CardBackground: "#E5E9EB",
|
|
149
|
+
Color_JDH_Gray_Card: "#FFFFFF",
|
|
150
|
+
Color_JDH_Gray_Mask: "#00000080"
|
|
205
151
|
},
|
|
206
152
|
fontWeight: {
|
|
207
|
-
|
|
208
|
-
|
|
153
|
+
FontWeight_JDH_Normal: 400,
|
|
154
|
+
FontWeight_JDH_Medium: 500
|
|
209
155
|
},
|
|
210
156
|
space: {
|
|
211
|
-
xs:
|
|
212
|
-
sm:
|
|
213
|
-
md:
|
|
214
|
-
lg:
|
|
215
|
-
xl:
|
|
216
|
-
xxl:
|
|
157
|
+
"spacing-xs": 2,
|
|
158
|
+
"spacing-sm": 4,
|
|
159
|
+
"spacing-md": 8,
|
|
160
|
+
"spacing-lg": 10,
|
|
161
|
+
"spacing-xl": 12,
|
|
162
|
+
"spacing-xxl": 16
|
|
217
163
|
},
|
|
218
164
|
borderRadius: {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
},
|
|
225
|
-
borderSize: {
|
|
226
|
-
none: "0",
|
|
227
|
-
thin: "1",
|
|
228
|
-
base: "2",
|
|
229
|
-
thick: "3",
|
|
230
|
-
thicker: "4"
|
|
165
|
+
Radius_JDH_LargeExtra: 16,
|
|
166
|
+
Radius_JDH_Large: 12,
|
|
167
|
+
Radius_JDH_Medium: 8,
|
|
168
|
+
Radius_JDH_Small: 4,
|
|
169
|
+
Radius_JDH_Mini: 3
|
|
231
170
|
},
|
|
232
171
|
components: {}
|
|
233
172
|
};
|
|
@@ -250,23 +189,22 @@
|
|
|
250
189
|
return a;
|
|
251
190
|
};
|
|
252
191
|
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
253
|
-
const ThemeContext = React.createContext(defaultTheme$
|
|
192
|
+
const ThemeContext = React.createContext(defaultTheme$2);
|
|
254
193
|
const ThemeProvider = ({
|
|
255
|
-
theme
|
|
194
|
+
theme,
|
|
256
195
|
children
|
|
257
196
|
}) => {
|
|
258
197
|
const merged = React.useMemo(() => {
|
|
259
|
-
const base = defaultTheme$
|
|
198
|
+
const base = defaultTheme$2;
|
|
260
199
|
return __spreadProps$q(__spreadValues$r({}, base), {
|
|
261
|
-
fontSize: __spreadValues$r(__spreadValues$r({}, base.fontSize), (
|
|
262
|
-
color: __spreadValues$r(__spreadValues$r({}, base.color), (
|
|
263
|
-
backgroundColor: __spreadValues$r(__spreadValues$r({}, base.
|
|
264
|
-
fontWeight: __spreadValues$r(__spreadValues$r({}, base.fontWeight), (
|
|
265
|
-
space: __spreadValues$r(__spreadValues$r({}, base.space), (
|
|
266
|
-
borderRadius: __spreadValues$r(__spreadValues$r({}, base.borderRadius), (
|
|
267
|
-
borderSize: __spreadValues$r(__spreadValues$r({}, base.borderSize), (theme2 == null ? void 0 : theme2.borderSize) || {})
|
|
200
|
+
fontSize: __spreadValues$r(__spreadValues$r({}, base.fontSize), (theme == null ? void 0 : theme.fontSize) || {}),
|
|
201
|
+
color: __spreadValues$r(__spreadValues$r({}, base.color), (theme == null ? void 0 : theme.color) || {}),
|
|
202
|
+
backgroundColor: __spreadValues$r(__spreadValues$r({}, base.color), (theme == null ? void 0 : theme.color) || {}),
|
|
203
|
+
fontWeight: __spreadValues$r(__spreadValues$r({}, base.fontWeight), (theme == null ? void 0 : theme.fontWeight) || {}),
|
|
204
|
+
space: __spreadValues$r(__spreadValues$r({}, base.space), (theme == null ? void 0 : theme.space) || {}),
|
|
205
|
+
borderRadius: __spreadValues$r(__spreadValues$r({}, base.borderRadius), (theme == null ? void 0 : theme.borderRadius) || {})
|
|
268
206
|
});
|
|
269
|
-
}, [
|
|
207
|
+
}, [theme]);
|
|
270
208
|
return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: merged, children });
|
|
271
209
|
};
|
|
272
210
|
const useTheme$1 = () => React.useContext(ThemeContext);
|
|
@@ -2034,25 +1972,25 @@
|
|
|
2034
1972
|
}
|
|
2035
1973
|
return { marginBottom: isLast ? 0 : runStyle(gap, scale) };
|
|
2036
1974
|
};
|
|
2037
|
-
const resolveSpace = (val,
|
|
1975
|
+
const resolveSpace = (val, theme, scale = 1) => {
|
|
2038
1976
|
if (val == null) return void 0;
|
|
2039
1977
|
if (typeof val === "number") return runStyle(val, scale);
|
|
2040
1978
|
if (typeof val === "string") {
|
|
2041
1979
|
if (["xs", "sm", "md", "lg", "xl", "xxl"].includes(val)) {
|
|
2042
|
-
const themeVal =
|
|
1980
|
+
const themeVal = theme.space[val];
|
|
2043
1981
|
return runStyle(themeVal, scale);
|
|
2044
1982
|
}
|
|
2045
1983
|
return runStyle(val, scale);
|
|
2046
1984
|
}
|
|
2047
1985
|
return val;
|
|
2048
1986
|
};
|
|
2049
|
-
const paddingToStyle = (padding,
|
|
1987
|
+
const paddingToStyle = (padding, theme, scale = 1) => {
|
|
2050
1988
|
if (padding == null) return {};
|
|
2051
1989
|
if (typeof padding === "number" || typeof padding === "string") {
|
|
2052
|
-
return { padding: resolveSpace(padding,
|
|
1990
|
+
return { padding: resolveSpace(padding, theme, scale) };
|
|
2053
1991
|
}
|
|
2054
1992
|
if (Array.isArray(padding)) {
|
|
2055
|
-
const resolvedPadding = padding.map((p) => resolveSpace(p,
|
|
1993
|
+
const resolvedPadding = padding.map((p) => resolveSpace(p, theme, scale));
|
|
2056
1994
|
if (resolvedPadding.length === 1) {
|
|
2057
1995
|
const [p] = resolvedPadding;
|
|
2058
1996
|
return {
|
|
@@ -2089,13 +2027,13 @@
|
|
|
2089
2027
|
}
|
|
2090
2028
|
return {};
|
|
2091
2029
|
};
|
|
2092
|
-
const marginToStyle = (margin,
|
|
2030
|
+
const marginToStyle = (margin, theme, scale = 1) => {
|
|
2093
2031
|
if (margin == null) return {};
|
|
2094
2032
|
if (typeof margin === "number" || typeof margin === "string") {
|
|
2095
|
-
return { margin: resolveSpace(margin,
|
|
2033
|
+
return { margin: resolveSpace(margin, theme, scale) };
|
|
2096
2034
|
}
|
|
2097
2035
|
if (Array.isArray(margin)) {
|
|
2098
|
-
const resolvedMargin = margin.map((m) => resolveSpace(m,
|
|
2036
|
+
const resolvedMargin = margin.map((m) => resolveSpace(m, theme, scale));
|
|
2099
2037
|
if (resolvedMargin.length === 2) {
|
|
2100
2038
|
const [vertical, horizontal] = resolvedMargin;
|
|
2101
2039
|
return {
|
|
@@ -2126,20 +2064,20 @@
|
|
|
2126
2064
|
}
|
|
2127
2065
|
return {};
|
|
2128
2066
|
};
|
|
2129
|
-
const textStyleFromTheme = (
|
|
2067
|
+
const textStyleFromTheme = (theme, opts, scale = 1) => {
|
|
2130
2068
|
var _a, _b, _c, _d, _e, _f;
|
|
2131
2069
|
const style2 = {};
|
|
2132
2070
|
if (!opts) return style2;
|
|
2133
2071
|
let fontSizeValue;
|
|
2134
2072
|
if (opts.fontSize) {
|
|
2135
|
-
fontSizeValue = (_b = (_a =
|
|
2073
|
+
fontSizeValue = (_b = (_a = theme.fontSize) == null ? void 0 : _a[opts.fontSize]) != null ? _b : opts.fontSize;
|
|
2136
2074
|
style2.fontSize = runStyle(fontSizeValue, scale);
|
|
2137
2075
|
}
|
|
2138
2076
|
if (opts.color) {
|
|
2139
|
-
style2.color = (_d = (_c =
|
|
2077
|
+
style2.color = (_d = (_c = theme.color) == null ? void 0 : _c[opts.color]) != null ? _d : opts.color;
|
|
2140
2078
|
}
|
|
2141
2079
|
if (opts.fontWeight) {
|
|
2142
|
-
style2.fontWeight = (_f = (_e =
|
|
2080
|
+
style2.fontWeight = (_f = (_e = theme.fontWeight) == null ? void 0 : _e[opts.fontWeight]) != null ? _f : opts.fontWeight;
|
|
2143
2081
|
}
|
|
2144
2082
|
if (opts.textAlign) {
|
|
2145
2083
|
style2.textAlign = opts.textAlign;
|
|
@@ -2172,10 +2110,10 @@
|
|
|
2172
2110
|
}
|
|
2173
2111
|
}
|
|
2174
2112
|
if (opts.marginLeft) {
|
|
2175
|
-
style2.marginLeft = resolveSpace(opts.marginLeft,
|
|
2113
|
+
style2.marginLeft = resolveSpace(opts.marginLeft, theme, scale);
|
|
2176
2114
|
}
|
|
2177
2115
|
if (opts.marginRight) {
|
|
2178
|
-
style2.marginRight = resolveSpace(opts.marginRight,
|
|
2116
|
+
style2.marginRight = resolveSpace(opts.marginRight, theme, scale);
|
|
2179
2117
|
}
|
|
2180
2118
|
if (opts.style) {
|
|
2181
2119
|
Object.assign(style2, opts.style);
|
|
@@ -2203,28 +2141,20 @@
|
|
|
2203
2141
|
if (justifyContent) style2.justifyContent = justifyCenterMap[justifyContent];
|
|
2204
2142
|
return style2;
|
|
2205
2143
|
};
|
|
2206
|
-
const backgroundToStyle = (background,
|
|
2207
|
-
const backgroundMap = {
|
|
2208
|
-
"bg-error": theme2.backgroundColor["bg-error"],
|
|
2209
|
-
"bg-success": theme2.backgroundColor["bg-success"],
|
|
2210
|
-
"bg-warning": theme2.backgroundColor["bg-warning"],
|
|
2211
|
-
"bg-page": theme2.backgroundColor["bg-page"],
|
|
2212
|
-
"bg-card": theme2.backgroundColor["bg-card"],
|
|
2213
|
-
"bg-cardContent": theme2.backgroundColor["bg-cardContent"]
|
|
2214
|
-
};
|
|
2144
|
+
const backgroundToStyle = (background, theme) => {
|
|
2215
2145
|
const style2 = {};
|
|
2216
2146
|
if (background) {
|
|
2217
|
-
style2.backgroundColor =
|
|
2147
|
+
style2.backgroundColor = theme.color[background] || background;
|
|
2218
2148
|
}
|
|
2219
2149
|
return style2;
|
|
2220
2150
|
};
|
|
2221
|
-
const borderRadiusToStyle = (borderRadius,
|
|
2151
|
+
const borderRadiusToStyle = (borderRadius, theme, scale = 1) => {
|
|
2222
2152
|
const borderRadiusMap = {
|
|
2223
|
-
none:
|
|
2224
|
-
card:
|
|
2225
|
-
model:
|
|
2226
|
-
comp:
|
|
2227
|
-
decorate:
|
|
2153
|
+
none: theme.borderRadius.none,
|
|
2154
|
+
card: theme.borderRadius.card,
|
|
2155
|
+
model: theme.borderRadius.model,
|
|
2156
|
+
comp: theme.borderRadius.comp,
|
|
2157
|
+
decorate: theme.borderRadius.decorate
|
|
2228
2158
|
};
|
|
2229
2159
|
const style2 = {};
|
|
2230
2160
|
if (borderRadius) {
|
|
@@ -2232,16 +2162,13 @@
|
|
|
2232
2162
|
}
|
|
2233
2163
|
return style2;
|
|
2234
2164
|
};
|
|
2235
|
-
const borderToStyle = (border,
|
|
2165
|
+
const borderToStyle = (border, theme, scale = 1) => {
|
|
2236
2166
|
var _a, _b;
|
|
2237
2167
|
const style2 = {};
|
|
2238
2168
|
if (!border) return style2;
|
|
2239
2169
|
if (border.size) {
|
|
2240
2170
|
const resolveSize = (val) => {
|
|
2241
|
-
|
|
2242
|
-
const sizeKey = val;
|
|
2243
|
-
const sizeValue = (_b2 = (_a2 = theme2.borderSize) == null ? void 0 : _a2[sizeKey]) != null ? _b2 : val;
|
|
2244
|
-
return runStyle(sizeValue, scale);
|
|
2171
|
+
return runStyle(val, scale);
|
|
2245
2172
|
};
|
|
2246
2173
|
const size = border.size;
|
|
2247
2174
|
if (Array.isArray(size)) {
|
|
@@ -2281,26 +2208,26 @@
|
|
|
2281
2208
|
}
|
|
2282
2209
|
if (border.color) {
|
|
2283
2210
|
const colorKey = border.color;
|
|
2284
|
-
const colorValue = (_b = (_a =
|
|
2211
|
+
const colorValue = (_b = (_a = theme.color) == null ? void 0 : _a[colorKey]) != null ? _b : border.color;
|
|
2285
2212
|
style2.borderColor = colorValue;
|
|
2286
2213
|
}
|
|
2287
2214
|
return style2;
|
|
2288
2215
|
};
|
|
2289
|
-
const imageStyleFromProps = (props,
|
|
2290
|
-
const style2 = __spreadValues$p({}, borderRadiusToStyle(props == null ? void 0 : props.borderRadius,
|
|
2216
|
+
const imageStyleFromProps = (props, theme, scale = 1) => {
|
|
2217
|
+
const style2 = __spreadValues$p({}, borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale));
|
|
2291
2218
|
if (props.width != null) style2.width = runStyle(props.width, scale) || "100%";
|
|
2292
2219
|
if (props.height != null)
|
|
2293
2220
|
style2.height = runStyle(props.height, scale) || "auto";
|
|
2294
2221
|
if (props.fit) style2.objectFit = props.fit;
|
|
2295
2222
|
style2.display = props.display || "block";
|
|
2296
|
-
Object.assign(style2, marginToStyle(props == null ? void 0 : props.margin,
|
|
2223
|
+
Object.assign(style2, marginToStyle(props == null ? void 0 : props.margin, theme, scale));
|
|
2297
2224
|
if (props.style) Object.assign(style2, props.style);
|
|
2298
2225
|
return style2;
|
|
2299
2226
|
};
|
|
2300
|
-
const imageViewStyleFromProps = (props,
|
|
2227
|
+
const imageViewStyleFromProps = (props, theme, scale = 1) => {
|
|
2301
2228
|
const style2 = __spreadValues$p({
|
|
2302
2229
|
overflow: "hidden"
|
|
2303
|
-
}, borderRadiusToStyle(props == null ? void 0 : props.borderRadius,
|
|
2230
|
+
}, borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale));
|
|
2304
2231
|
return style2;
|
|
2305
2232
|
};
|
|
2306
2233
|
const fractionWidth = (percent) => ({
|
|
@@ -2323,7 +2250,7 @@
|
|
|
2323
2250
|
);
|
|
2324
2251
|
return style2;
|
|
2325
2252
|
};
|
|
2326
|
-
const buildLayoutContainerStyle = (props, direction,
|
|
2253
|
+
const buildLayoutContainerStyle = (props, direction, theme, scale = 1) => {
|
|
2327
2254
|
const style2 = __spreadValues$p(__spreadValues$p(__spreadValues$p(__spreadValues$p(__spreadValues$p({
|
|
2328
2255
|
display: "flex",
|
|
2329
2256
|
boxSizing: "border-box",
|
|
@@ -2331,13 +2258,13 @@
|
|
|
2331
2258
|
height: runStyle(props == null ? void 0 : props.height, scale) || "auto",
|
|
2332
2259
|
position: "relative",
|
|
2333
2260
|
flexDirection: direction || "column"
|
|
2334
|
-
}, justifyContentToStyle(props == null ? void 0 : props.alignItems, props == null ? void 0 : props.justifyContent)), backgroundToStyle(props == null ? void 0 : props.background,
|
|
2335
|
-
Object.assign(style2, paddingToStyle(props == null ? void 0 : props.padding,
|
|
2336
|
-
Object.assign(style2, marginToStyle(props == null ? void 0 : props.margin,
|
|
2261
|
+
}, justifyContentToStyle(props == null ? void 0 : props.alignItems, props == null ? void 0 : props.justifyContent)), backgroundToStyle(props == null ? void 0 : props.background, theme)), borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), borderToStyle(props == null ? void 0 : props.border, theme, scale)), baseContainerStyle(props, scale));
|
|
2262
|
+
Object.assign(style2, paddingToStyle(props == null ? void 0 : props.padding, theme, scale));
|
|
2263
|
+
Object.assign(style2, marginToStyle(props == null ? void 0 : props.margin, theme, scale));
|
|
2337
2264
|
return style2;
|
|
2338
2265
|
};
|
|
2339
|
-
const buildAbsoluteLayoutStyle = (props, direction,
|
|
2340
|
-
const style2 = __spreadProps$o(__spreadValues$p(__spreadValues$p({}, buildLayoutContainerStyle(props, direction,
|
|
2266
|
+
const buildAbsoluteLayoutStyle = (props, direction, theme, scale = 1) => {
|
|
2267
|
+
const style2 = __spreadProps$o(__spreadValues$p(__spreadValues$p({}, buildLayoutContainerStyle(props, direction, theme, scale)), borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), {
|
|
2341
2268
|
position: "absolute",
|
|
2342
2269
|
zIndex: 1
|
|
2343
2270
|
});
|
|
@@ -2468,12 +2395,12 @@
|
|
|
2468
2395
|
}) => {
|
|
2469
2396
|
const { scale } = useResponsive();
|
|
2470
2397
|
const { executeActions } = useAction$1();
|
|
2471
|
-
const
|
|
2398
|
+
const theme = useTheme$1();
|
|
2472
2399
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
2473
2400
|
const containerStyle = buildLayoutContainerStyle(
|
|
2474
2401
|
props,
|
|
2475
2402
|
"column",
|
|
2476
|
-
|
|
2403
|
+
theme,
|
|
2477
2404
|
scale
|
|
2478
2405
|
);
|
|
2479
2406
|
const items = React.Children.toArray(children);
|
|
@@ -2537,9 +2464,9 @@
|
|
|
2537
2464
|
}) => {
|
|
2538
2465
|
const { scale } = useResponsive();
|
|
2539
2466
|
const { executeActions } = useAction$1();
|
|
2540
|
-
const
|
|
2467
|
+
const theme = useTheme$1();
|
|
2541
2468
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
2542
|
-
const containerStyle = __spreadProps$m(__spreadValues$n({}, buildLayoutContainerStyle(props, "row",
|
|
2469
|
+
const containerStyle = __spreadProps$m(__spreadValues$n({}, buildLayoutContainerStyle(props, "row", theme, scale)), {
|
|
2543
2470
|
flexWrap: (props == null ? void 0 : props.flexWrap) || "nowrap"
|
|
2544
2471
|
});
|
|
2545
2472
|
const itemContainerStyle = (child, idx) => {
|
|
@@ -2597,12 +2524,12 @@
|
|
|
2597
2524
|
}) => {
|
|
2598
2525
|
const { scale } = useResponsive();
|
|
2599
2526
|
const { executeActions } = useAction$1();
|
|
2600
|
-
const
|
|
2527
|
+
const theme = useTheme$1();
|
|
2601
2528
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
2602
2529
|
const containerStyle = buildLayoutContainerStyle(
|
|
2603
2530
|
props,
|
|
2604
2531
|
"row",
|
|
2605
|
-
|
|
2532
|
+
theme,
|
|
2606
2533
|
scale
|
|
2607
2534
|
);
|
|
2608
2535
|
const items = React.Children.toArray(children).slice(0, 2);
|
|
@@ -2659,12 +2586,12 @@
|
|
|
2659
2586
|
}) => {
|
|
2660
2587
|
const { scale } = useResponsive();
|
|
2661
2588
|
const { executeActions } = useAction$1();
|
|
2662
|
-
const
|
|
2589
|
+
const theme = useTheme$1();
|
|
2663
2590
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
2664
2591
|
const containerStyle = buildLayoutContainerStyle(
|
|
2665
2592
|
props,
|
|
2666
2593
|
"row",
|
|
2667
|
-
|
|
2594
|
+
theme,
|
|
2668
2595
|
scale
|
|
2669
2596
|
);
|
|
2670
2597
|
const items = React.Children.toArray(children).slice(0, 3);
|
|
@@ -2720,12 +2647,12 @@
|
|
|
2720
2647
|
}) => {
|
|
2721
2648
|
const { scale } = useResponsive();
|
|
2722
2649
|
const { executeActions } = useAction$1();
|
|
2723
|
-
const
|
|
2650
|
+
const theme = useTheme$1();
|
|
2724
2651
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
2725
2652
|
const containerStyle = buildLayoutContainerStyle(
|
|
2726
2653
|
props,
|
|
2727
2654
|
"row",
|
|
2728
|
-
|
|
2655
|
+
theme,
|
|
2729
2656
|
scale
|
|
2730
2657
|
);
|
|
2731
2658
|
const items = React.Children.toArray(children).slice(0, 4);
|
|
@@ -2779,12 +2706,12 @@
|
|
|
2779
2706
|
}) => {
|
|
2780
2707
|
const { scale } = useResponsive();
|
|
2781
2708
|
const { executeActions } = useAction$1();
|
|
2782
|
-
const
|
|
2709
|
+
const theme = useTheme$1();
|
|
2783
2710
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
2784
2711
|
const containerStyle = buildLayoutContainerStyle(
|
|
2785
2712
|
props,
|
|
2786
2713
|
"row",
|
|
2787
|
-
|
|
2714
|
+
theme,
|
|
2788
2715
|
scale
|
|
2789
2716
|
);
|
|
2790
2717
|
const items = React.Children.toArray(children).slice(0, 2);
|
|
@@ -2844,12 +2771,12 @@
|
|
|
2844
2771
|
}) => {
|
|
2845
2772
|
const { scale } = useResponsive();
|
|
2846
2773
|
const { executeActions } = useAction$1();
|
|
2847
|
-
const
|
|
2774
|
+
const theme = useTheme$1();
|
|
2848
2775
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
2849
2776
|
const containerStyle = buildLayoutContainerStyle(
|
|
2850
2777
|
props,
|
|
2851
2778
|
"row",
|
|
2852
|
-
|
|
2779
|
+
theme,
|
|
2853
2780
|
scale
|
|
2854
2781
|
);
|
|
2855
2782
|
const items = React.Children.toArray(children).slice(0, 2);
|
|
@@ -2907,12 +2834,12 @@
|
|
|
2907
2834
|
}) => {
|
|
2908
2835
|
const { scale } = useResponsive();
|
|
2909
2836
|
const { executeActions } = useAction$1();
|
|
2910
|
-
const
|
|
2837
|
+
const theme = useTheme$1();
|
|
2911
2838
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
2912
2839
|
const containerStyle = buildLayoutContainerStyle(
|
|
2913
2840
|
props,
|
|
2914
2841
|
"row",
|
|
2915
|
-
|
|
2842
|
+
theme,
|
|
2916
2843
|
scale
|
|
2917
2844
|
);
|
|
2918
2845
|
const items = React.Children.toArray(children).slice(0, 3);
|
|
@@ -2975,12 +2902,12 @@
|
|
|
2975
2902
|
}
|
|
2976
2903
|
onClick(e);
|
|
2977
2904
|
};
|
|
2978
|
-
const
|
|
2905
|
+
const theme = useTheme$1();
|
|
2979
2906
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
2980
2907
|
const absoluteContainerStyle = buildAbsoluteLayoutStyle(
|
|
2981
2908
|
props,
|
|
2982
2909
|
"column",
|
|
2983
|
-
|
|
2910
|
+
theme,
|
|
2984
2911
|
scale
|
|
2985
2912
|
);
|
|
2986
2913
|
const items = React.Children.toArray(children);
|
|
@@ -3034,12 +2961,12 @@
|
|
|
3034
2961
|
}
|
|
3035
2962
|
onClick(e);
|
|
3036
2963
|
};
|
|
3037
|
-
const
|
|
2964
|
+
const theme = useTheme$1();
|
|
3038
2965
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
3039
2966
|
const containerStyle = buildLayoutContainerStyle(
|
|
3040
2967
|
props,
|
|
3041
2968
|
"column",
|
|
3042
|
-
|
|
2969
|
+
theme,
|
|
3043
2970
|
scale
|
|
3044
2971
|
);
|
|
3045
2972
|
const items = React.Children.toArray(children);
|
|
@@ -3164,11 +3091,11 @@
|
|
|
3164
3091
|
};
|
|
3165
3092
|
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
3166
3093
|
const TextRender = (props) => {
|
|
3167
|
-
const
|
|
3094
|
+
const theme = useTheme$1();
|
|
3168
3095
|
const { scale } = useResponsive();
|
|
3169
3096
|
const { executeActions } = useAction$1();
|
|
3170
3097
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
3171
|
-
const style2 = textStyleFromTheme(
|
|
3098
|
+
const style2 = textStyleFromTheme(theme, props, scale);
|
|
3172
3099
|
const handleClick = (e) => {
|
|
3173
3100
|
if (props.actions) {
|
|
3174
3101
|
void executeActions(props.actions);
|
|
@@ -3210,7 +3137,7 @@
|
|
|
3210
3137
|
return md.split(/\n\s*\n/).map((s) => s.trim()).filter(Boolean);
|
|
3211
3138
|
};
|
|
3212
3139
|
const MarkdownRender = (props) => {
|
|
3213
|
-
const
|
|
3140
|
+
const theme = useTheme$1();
|
|
3214
3141
|
const { executeActions } = useAction$1();
|
|
3215
3142
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
3216
3143
|
const content = props.content || "";
|
|
@@ -3229,8 +3156,8 @@
|
|
|
3229
3156
|
}, { onMouseEnter, onMouseLeave }), {
|
|
3230
3157
|
style: {
|
|
3231
3158
|
width: "100%",
|
|
3232
|
-
color:
|
|
3233
|
-
fontSize:
|
|
3159
|
+
color: theme.color["color-textPrimary"],
|
|
3160
|
+
fontSize: theme.fontSize["text-md"],
|
|
3234
3161
|
lineHeight: 1.6
|
|
3235
3162
|
},
|
|
3236
3163
|
dangerouslySetInnerHTML: { __html: content }
|
|
@@ -3257,14 +3184,14 @@
|
|
|
3257
3184
|
};
|
|
3258
3185
|
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
3259
3186
|
const ImageRender = (props) => {
|
|
3260
|
-
const
|
|
3187
|
+
const theme = useTheme$1();
|
|
3261
3188
|
const { scale } = useResponsive();
|
|
3262
3189
|
const { executeActions } = useAction$1();
|
|
3263
3190
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
3264
|
-
const viewStyle = imageViewStyleFromProps(props,
|
|
3191
|
+
const viewStyle = imageViewStyleFromProps(props, theme, scale);
|
|
3265
3192
|
const style2 = imageStyleFromProps(
|
|
3266
3193
|
__spreadValues$b({ width: props.width, height: props.height, fit: props.fit }, props),
|
|
3267
|
-
|
|
3194
|
+
theme,
|
|
3268
3195
|
scale
|
|
3269
3196
|
);
|
|
3270
3197
|
const handleClick = (e) => {
|
|
@@ -5459,8 +5386,8 @@
|
|
|
5459
5386
|
});
|
|
5460
5387
|
}
|
|
5461
5388
|
}
|
|
5462
|
-
var getComputedToken$1 = function getComputedToken2(originToken, overrideToken,
|
|
5463
|
-
var derivativeToken =
|
|
5389
|
+
var getComputedToken$1 = function getComputedToken2(originToken, overrideToken, theme, format2) {
|
|
5390
|
+
var derivativeToken = theme.getDerivativeToken(originToken);
|
|
5464
5391
|
var mergedDerivativeToken = _objectSpread2(_objectSpread2({}, derivativeToken), overrideToken);
|
|
5465
5392
|
if (format2) {
|
|
5466
5393
|
mergedDerivativeToken = format2(mergedDerivativeToken);
|
|
@@ -5468,7 +5395,7 @@
|
|
|
5468
5395
|
return mergedDerivativeToken;
|
|
5469
5396
|
};
|
|
5470
5397
|
var TOKEN_PREFIX = "token";
|
|
5471
|
-
function useCacheToken(
|
|
5398
|
+
function useCacheToken(theme, tokens) {
|
|
5472
5399
|
var option = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
5473
5400
|
var _useContext = React.useContext(StyleContext), instanceId = _useContext.cache.instanceId, container = _useContext.container;
|
|
5474
5401
|
var _option$salt = option.salt, salt = _option$salt === void 0 ? "" : _option$salt, _option$override = option.override, override = _option$override === void 0 ? EMPTY_OVERRIDE : _option$override, formatToken2 = option.formatToken, compute = option.getComputedToken, cssVar = option.cssVar;
|
|
@@ -5478,9 +5405,9 @@
|
|
|
5478
5405
|
var tokenStr = flattenToken(mergedToken);
|
|
5479
5406
|
var overrideTokenStr = flattenToken(override);
|
|
5480
5407
|
var cssVarStr = cssVar ? flattenToken(cssVar) : "";
|
|
5481
|
-
var cachedToken = useGlobalCache(TOKEN_PREFIX, [salt,
|
|
5408
|
+
var cachedToken = useGlobalCache(TOKEN_PREFIX, [salt, theme.id, tokenStr, overrideTokenStr, cssVarStr], function() {
|
|
5482
5409
|
var _cssVar$key;
|
|
5483
|
-
var mergedDerivativeToken = compute ? compute(mergedToken, override,
|
|
5410
|
+
var mergedDerivativeToken = compute ? compute(mergedToken, override, theme) : getComputedToken$1(mergedToken, override, theme, formatToken2);
|
|
5484
5411
|
var actualToken = _objectSpread2({}, mergedDerivativeToken);
|
|
5485
5412
|
var cssVarsStr = "";
|
|
5486
5413
|
if (!!cssVar) {
|
|
@@ -7739,7 +7666,7 @@
|
|
|
7739
7666
|
generateNeutralColorPalettes
|
|
7740
7667
|
})), genFontMapToken(token2.fontSize)), genSizeMapToken(token2)), genControlHeight(token2)), genCommonMapToken(token2));
|
|
7741
7668
|
}
|
|
7742
|
-
const defaultTheme = createTheme(derivative);
|
|
7669
|
+
const defaultTheme$1 = createTheme(derivative);
|
|
7743
7670
|
const defaultConfig = {
|
|
7744
7671
|
token: seedToken,
|
|
7745
7672
|
override: {
|
|
@@ -7784,7 +7711,7 @@
|
|
|
7784
7711
|
});
|
|
7785
7712
|
}
|
|
7786
7713
|
const dynamicStyleMark = `-ant-${Date.now()}-${Math.random()}`;
|
|
7787
|
-
function getStyle$1(globalPrefixCls2,
|
|
7714
|
+
function getStyle$1(globalPrefixCls2, theme) {
|
|
7788
7715
|
const variables = {};
|
|
7789
7716
|
const formatColor = (color2, updater) => {
|
|
7790
7717
|
let clone = color2.clone();
|
|
@@ -7802,9 +7729,9 @@
|
|
|
7802
7729
|
variables[`${type2}-color-deprecated-bg`] = colorPalettes[0];
|
|
7803
7730
|
variables[`${type2}-color-deprecated-border`] = colorPalettes[2];
|
|
7804
7731
|
};
|
|
7805
|
-
if (
|
|
7806
|
-
fillColor(
|
|
7807
|
-
const primaryColor = new FastColor(
|
|
7732
|
+
if (theme.primaryColor) {
|
|
7733
|
+
fillColor(theme.primaryColor, "primary");
|
|
7734
|
+
const primaryColor = new FastColor(theme.primaryColor);
|
|
7808
7735
|
const primaryColors = generate$1(primaryColor.toRgbString());
|
|
7809
7736
|
primaryColors.forEach((color2, index2) => {
|
|
7810
7737
|
variables[`primary-${index2 + 1}`] = color2;
|
|
@@ -7818,17 +7745,17 @@
|
|
|
7818
7745
|
variables["primary-color-active-deprecated-f-30"] = formatColor(primaryActiveColor, (c) => c.setA(c.a * 0.3));
|
|
7819
7746
|
variables["primary-color-active-deprecated-d-02"] = formatColor(primaryActiveColor, (c) => c.darken(2));
|
|
7820
7747
|
}
|
|
7821
|
-
if (
|
|
7822
|
-
fillColor(
|
|
7748
|
+
if (theme.successColor) {
|
|
7749
|
+
fillColor(theme.successColor, "success");
|
|
7823
7750
|
}
|
|
7824
|
-
if (
|
|
7825
|
-
fillColor(
|
|
7751
|
+
if (theme.warningColor) {
|
|
7752
|
+
fillColor(theme.warningColor, "warning");
|
|
7826
7753
|
}
|
|
7827
|
-
if (
|
|
7828
|
-
fillColor(
|
|
7754
|
+
if (theme.errorColor) {
|
|
7755
|
+
fillColor(theme.errorColor, "error");
|
|
7829
7756
|
}
|
|
7830
|
-
if (
|
|
7831
|
-
fillColor(
|
|
7757
|
+
if (theme.infoColor) {
|
|
7758
|
+
fillColor(theme.infoColor, "info");
|
|
7832
7759
|
}
|
|
7833
7760
|
const cssList = Object.keys(variables).map((key) => `--${globalPrefixCls2}-${key}: ${variables[key]};`);
|
|
7834
7761
|
return `
|
|
@@ -7837,8 +7764,8 @@
|
|
|
7837
7764
|
}
|
|
7838
7765
|
`.trim();
|
|
7839
7766
|
}
|
|
7840
|
-
function registerTheme(globalPrefixCls2,
|
|
7841
|
-
const style2 = getStyle$1(globalPrefixCls2,
|
|
7767
|
+
function registerTheme(globalPrefixCls2, theme) {
|
|
7768
|
+
const style2 = getStyle$1(globalPrefixCls2, theme);
|
|
7842
7769
|
if (canUseDom()) {
|
|
7843
7770
|
updateCSS(style2, `${dynamicStyleMark}-dynamic-theme`);
|
|
7844
7771
|
} else {
|
|
@@ -8392,7 +8319,7 @@
|
|
|
8392
8319
|
};
|
|
8393
8320
|
return function(prefixCls) {
|
|
8394
8321
|
var rootCls = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : prefixCls;
|
|
8395
|
-
var _useToken3 = useToken2(),
|
|
8322
|
+
var _useToken3 = useToken2(), theme = _useToken3.theme, realToken = _useToken3.realToken, hashId = _useToken3.hashId, token2 = _useToken3.token, cssVar = _useToken3.cssVar;
|
|
8396
8323
|
var _usePrefix = usePrefix(), rootPrefixCls = _usePrefix.rootPrefixCls, iconPrefixCls = _usePrefix.iconPrefixCls;
|
|
8397
8324
|
var csp = useCSP();
|
|
8398
8325
|
var type2 = cssVar ? "css" : "js";
|
|
@@ -8408,7 +8335,7 @@
|
|
|
8408
8335
|
}, [type2, component, cssVar === null || cssVar === void 0 ? void 0 : cssVar.prefix]);
|
|
8409
8336
|
var _genMaxMin = genMaxMin(type2), max2 = _genMaxMin.max, min2 = _genMaxMin.min;
|
|
8410
8337
|
var sharedConfig = {
|
|
8411
|
-
theme
|
|
8338
|
+
theme,
|
|
8412
8339
|
token: token2,
|
|
8413
8340
|
hashId,
|
|
8414
8341
|
nonce: function nonce() {
|
|
@@ -8748,8 +8675,8 @@
|
|
|
8748
8675
|
screenXXL: true,
|
|
8749
8676
|
screenXXLMin: true
|
|
8750
8677
|
};
|
|
8751
|
-
const getComputedToken = (originToken, overrideToken,
|
|
8752
|
-
const derivativeToken =
|
|
8678
|
+
const getComputedToken = (originToken, overrideToken, theme) => {
|
|
8679
|
+
const derivativeToken = theme.getDerivativeToken(originToken);
|
|
8753
8680
|
const {
|
|
8754
8681
|
override
|
|
8755
8682
|
} = overrideToken, components = __rest$f(overrideToken, ["override"]);
|
|
@@ -8777,12 +8704,12 @@
|
|
|
8777
8704
|
const {
|
|
8778
8705
|
token: rootDesignToken,
|
|
8779
8706
|
hashed,
|
|
8780
|
-
theme
|
|
8707
|
+
theme,
|
|
8781
8708
|
override,
|
|
8782
8709
|
cssVar
|
|
8783
8710
|
} = React.useContext(DesignTokenContext);
|
|
8784
8711
|
const salt = `${version$1}-${hashed || ""}`;
|
|
8785
|
-
const mergedTheme =
|
|
8712
|
+
const mergedTheme = theme || defaultTheme$1;
|
|
8786
8713
|
const [token2, hashId, realToken] = useCacheToken(mergedTheme, [seedToken, rootDesignToken], {
|
|
8787
8714
|
salt,
|
|
8788
8715
|
override,
|
|
@@ -8936,9 +8863,9 @@
|
|
|
8936
8863
|
};
|
|
8937
8864
|
},
|
|
8938
8865
|
useToken: () => {
|
|
8939
|
-
const [
|
|
8866
|
+
const [theme, realToken, hashId, token2, cssVar] = useToken();
|
|
8940
8867
|
return {
|
|
8941
|
-
theme
|
|
8868
|
+
theme,
|
|
8942
8869
|
realToken,
|
|
8943
8870
|
hashId,
|
|
8944
8871
|
token: token2,
|
|
@@ -8962,7 +8889,7 @@
|
|
|
8962
8889
|
getCompUnitless: () => unitless
|
|
8963
8890
|
});
|
|
8964
8891
|
const useResetIconStyle = (iconPrefixCls, csp) => {
|
|
8965
|
-
const [
|
|
8892
|
+
const [theme, token2] = useToken();
|
|
8966
8893
|
return useStyleRegister({
|
|
8967
8894
|
token: token2,
|
|
8968
8895
|
hashId: "",
|
|
@@ -8979,10 +8906,10 @@
|
|
|
8979
8906
|
} = fullClone$1;
|
|
8980
8907
|
const useEmptyId = () => "";
|
|
8981
8908
|
const useThemeKey = typeof useId$2 === "undefined" ? useEmptyId : useId$2;
|
|
8982
|
-
function useTheme(
|
|
8909
|
+
function useTheme(theme, parentTheme, config) {
|
|
8983
8910
|
var _a, _b;
|
|
8984
8911
|
const warning2 = devUseWarning("ConfigProvider");
|
|
8985
|
-
const themeConfig =
|
|
8912
|
+
const themeConfig = theme || {};
|
|
8986
8913
|
const parentThemeConfig = themeConfig.inherit === false || !parentTheme ? Object.assign(Object.assign({}, defaultConfig), {
|
|
8987
8914
|
hashed: (_a = parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.hashed) !== null && _a !== void 0 ? _a : defaultConfig.hashed,
|
|
8988
8915
|
cssVar: parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.cssVar
|
|
@@ -8995,12 +8922,12 @@
|
|
|
8995
8922
|
}
|
|
8996
8923
|
return useMemo(() => {
|
|
8997
8924
|
var _a2, _b2;
|
|
8998
|
-
if (!
|
|
8925
|
+
if (!theme) {
|
|
8999
8926
|
return parentTheme;
|
|
9000
8927
|
}
|
|
9001
8928
|
const mergedComponents = Object.assign({}, parentThemeConfig.components);
|
|
9002
|
-
Object.keys(
|
|
9003
|
-
mergedComponents[componentName] = Object.assign(Object.assign({}, mergedComponents[componentName]),
|
|
8929
|
+
Object.keys(theme.components || {}).forEach((componentName) => {
|
|
8930
|
+
mergedComponents[componentName] = Object.assign(Object.assign({}, mergedComponents[componentName]), theme.components[componentName]);
|
|
9004
8931
|
});
|
|
9005
8932
|
const cssVarKey = `css-var-${themeKey.replace(/:/g, "")}`;
|
|
9006
8933
|
const mergedCssVar = ((_a2 = themeConfig.cssVar) !== null && _a2 !== void 0 ? _a2 : parentThemeConfig.cssVar) && Object.assign(Object.assign(Object.assign({
|
|
@@ -9702,23 +9629,23 @@
|
|
|
9702
9629
|
function getGlobalPrefixCls() {
|
|
9703
9630
|
return globalPrefixCls || defaultPrefixCls;
|
|
9704
9631
|
}
|
|
9705
|
-
function isLegacyTheme(
|
|
9706
|
-
return Object.keys(
|
|
9632
|
+
function isLegacyTheme(theme) {
|
|
9633
|
+
return Object.keys(theme).some((key) => key.endsWith("Color"));
|
|
9707
9634
|
}
|
|
9708
9635
|
const setGlobalConfig = (props) => {
|
|
9709
9636
|
const {
|
|
9710
9637
|
prefixCls,
|
|
9711
9638
|
iconPrefixCls,
|
|
9712
|
-
theme
|
|
9639
|
+
theme,
|
|
9713
9640
|
holderRender
|
|
9714
9641
|
} = props;
|
|
9715
9642
|
if (prefixCls !== void 0) {
|
|
9716
9643
|
globalPrefixCls = prefixCls;
|
|
9717
9644
|
}
|
|
9718
|
-
if (
|
|
9719
|
-
if (isLegacyTheme(
|
|
9645
|
+
if (theme) {
|
|
9646
|
+
if (isLegacyTheme(theme)) {
|
|
9720
9647
|
process.env.NODE_ENV !== "production" ? warning$2(false, "ConfigProvider", "`config` of css variable theme is not work in v5. Please use new `theme` config instead.") : void 0;
|
|
9721
|
-
registerTheme(getGlobalPrefixCls(),
|
|
9648
|
+
registerTheme(getGlobalPrefixCls(), theme);
|
|
9722
9649
|
}
|
|
9723
9650
|
}
|
|
9724
9651
|
};
|
|
@@ -9742,7 +9669,7 @@
|
|
|
9742
9669
|
legacyLocale,
|
|
9743
9670
|
parentContext,
|
|
9744
9671
|
iconPrefixCls: customIconPrefixCls,
|
|
9745
|
-
theme
|
|
9672
|
+
theme,
|
|
9746
9673
|
componentDisabled,
|
|
9747
9674
|
segmented,
|
|
9748
9675
|
statistic: statistic2,
|
|
@@ -9818,7 +9745,7 @@
|
|
|
9818
9745
|
const iconPrefixCls = customIconPrefixCls || parentContext.iconPrefixCls || defaultIconPrefixCls;
|
|
9819
9746
|
const csp = customCsp || parentContext.csp;
|
|
9820
9747
|
useResetIconStyle(iconPrefixCls, csp);
|
|
9821
|
-
const mergedTheme = useTheme(
|
|
9748
|
+
const mergedTheme = useTheme(theme, parentContext.theme, {
|
|
9822
9749
|
prefixCls: getPrefixCls("")
|
|
9823
9750
|
});
|
|
9824
9751
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -9970,7 +9897,7 @@
|
|
|
9970
9897
|
components,
|
|
9971
9898
|
cssVar
|
|
9972
9899
|
} = _a, rest = __rest$e(_a, ["algorithm", "token", "components", "cssVar"]);
|
|
9973
|
-
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
|
|
9900
|
+
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme$1;
|
|
9974
9901
|
const parsedComponents = {};
|
|
9975
9902
|
Object.entries(components || {}).forEach(([componentName, componentToken]) => {
|
|
9976
9903
|
const parsedToken = Object.assign({}, componentToken);
|
|
@@ -9995,7 +9922,7 @@
|
|
|
9995
9922
|
cssVar
|
|
9996
9923
|
});
|
|
9997
9924
|
}, [mergedTheme]);
|
|
9998
|
-
if (
|
|
9925
|
+
if (theme) {
|
|
9999
9926
|
childNode = /* @__PURE__ */ React__namespace.createElement(DesignTokenContext.Provider, {
|
|
10000
9927
|
value: memoTheme
|
|
10001
9928
|
}, childNode);
|
|
@@ -27417,7 +27344,7 @@
|
|
|
27417
27344
|
};
|
|
27418
27345
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
27419
27346
|
const TextListRender = (props) => {
|
|
27420
|
-
const
|
|
27347
|
+
const theme = useTheme$1();
|
|
27421
27348
|
const { scale } = useResponsive();
|
|
27422
27349
|
const { executeActions } = useAction$1();
|
|
27423
27350
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
@@ -27453,17 +27380,17 @@
|
|
|
27453
27380
|
display: "flex",
|
|
27454
27381
|
flexDirection: "row",
|
|
27455
27382
|
alignItems: "flex-start",
|
|
27456
|
-
marginBottom: idx === items.length - 1 ? 0 : runStyle(
|
|
27383
|
+
marginBottom: idx === items.length - 1 ? 0 : runStyle(theme.space["spacing-xs"], scale)
|
|
27457
27384
|
},
|
|
27458
27385
|
children: [
|
|
27459
27386
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27460
27387
|
"span",
|
|
27461
27388
|
{
|
|
27462
27389
|
style: {
|
|
27463
|
-
color:
|
|
27464
|
-
fontSize:
|
|
27390
|
+
color: theme.color["color-textSecondary"],
|
|
27391
|
+
fontSize: theme.fontSize["text-md"],
|
|
27465
27392
|
lineHeight: 1.6,
|
|
27466
|
-
marginRight: runStyle(
|
|
27393
|
+
marginRight: runStyle(theme.space["spacing-xs"], scale),
|
|
27467
27394
|
minWidth: "1.5em",
|
|
27468
27395
|
textAlign: "right"
|
|
27469
27396
|
},
|
|
@@ -27474,8 +27401,8 @@
|
|
|
27474
27401
|
"span",
|
|
27475
27402
|
{
|
|
27476
27403
|
style: {
|
|
27477
|
-
color:
|
|
27478
|
-
fontSize:
|
|
27404
|
+
color: theme.color["color-textPrimary"],
|
|
27405
|
+
fontSize: theme.fontSize["text-md"],
|
|
27479
27406
|
lineHeight: 1.6
|
|
27480
27407
|
},
|
|
27481
27408
|
children: it.text
|
|
@@ -27486,7 +27413,7 @@
|
|
|
27486
27413
|
idx
|
|
27487
27414
|
);
|
|
27488
27415
|
}),
|
|
27489
|
-
props.children ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: runStyle(
|
|
27416
|
+
props.children ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: runStyle(theme.space["spacing-sm"], scale) }, children: props.children }) : null
|
|
27490
27417
|
]
|
|
27491
27418
|
})
|
|
27492
27419
|
);
|
|
@@ -27591,7 +27518,7 @@
|
|
|
27591
27518
|
var _a;
|
|
27592
27519
|
const { scale } = useResponsive();
|
|
27593
27520
|
const { executeActions } = useAction$1();
|
|
27594
|
-
const
|
|
27521
|
+
const theme = useTheme$1();
|
|
27595
27522
|
const handleClick = () => {
|
|
27596
27523
|
if (props == null ? void 0 : props.actions) {
|
|
27597
27524
|
void executeActions(props.actions);
|
|
@@ -27600,7 +27527,7 @@
|
|
|
27600
27527
|
const style2 = __spreadValues$4({
|
|
27601
27528
|
width: "100%",
|
|
27602
27529
|
height: props.height ? runStyle(props.height, scale) : "1px",
|
|
27603
|
-
backgroundColor: props.color ? ((_a =
|
|
27530
|
+
backgroundColor: props.color ? ((_a = theme.color) == null ? void 0 : _a[props.color]) || props.color : "#eeeeee",
|
|
27604
27531
|
margin: "8px 0"
|
|
27605
27532
|
}, props.style || {});
|
|
27606
27533
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: style2, onClick: handleClick });
|
|
@@ -27775,7 +27702,7 @@
|
|
|
27775
27702
|
};
|
|
27776
27703
|
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
27777
27704
|
const MessageContainer = (props) => {
|
|
27778
|
-
const { component, dataSources, theme
|
|
27705
|
+
const { component, dataSources, theme, onAction } = props;
|
|
27779
27706
|
const { template, referenceComponentList, data } = component;
|
|
27780
27707
|
const { editorMode: editorMode2 } = useForEditor({});
|
|
27781
27708
|
const [values, setValues] = React.useState({});
|
|
@@ -27874,8 +27801,8 @@
|
|
|
27874
27801
|
] })
|
|
27875
27802
|
}
|
|
27876
27803
|
);
|
|
27877
|
-
if (
|
|
27878
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { theme
|
|
27804
|
+
if (theme) {
|
|
27805
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { theme, children: content });
|
|
27879
27806
|
}
|
|
27880
27807
|
return content;
|
|
27881
27808
|
};
|
|
@@ -30840,7 +30767,7 @@
|
|
|
30840
30767
|
var ys = arrObjKeys(obj, inspect2);
|
|
30841
30768
|
var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
30842
30769
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
30843
|
-
var stringTag = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr
|
|
30770
|
+
var stringTag = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
30844
30771
|
var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
30845
30772
|
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
30846
30773
|
if (ys.length === 0) {
|
|
@@ -30865,25 +30792,25 @@
|
|
|
30865
30792
|
return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
|
|
30866
30793
|
}
|
|
30867
30794
|
function isArray$3(obj) {
|
|
30868
|
-
return toStr
|
|
30795
|
+
return toStr(obj) === "[object Array]" && canTrustToString(obj);
|
|
30869
30796
|
}
|
|
30870
30797
|
function isDate(obj) {
|
|
30871
|
-
return toStr
|
|
30798
|
+
return toStr(obj) === "[object Date]" && canTrustToString(obj);
|
|
30872
30799
|
}
|
|
30873
30800
|
function isRegExp$1(obj) {
|
|
30874
|
-
return toStr
|
|
30801
|
+
return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
30875
30802
|
}
|
|
30876
30803
|
function isError(obj) {
|
|
30877
|
-
return toStr
|
|
30804
|
+
return toStr(obj) === "[object Error]" && canTrustToString(obj);
|
|
30878
30805
|
}
|
|
30879
30806
|
function isString(obj) {
|
|
30880
|
-
return toStr
|
|
30807
|
+
return toStr(obj) === "[object String]" && canTrustToString(obj);
|
|
30881
30808
|
}
|
|
30882
30809
|
function isNumber(obj) {
|
|
30883
|
-
return toStr
|
|
30810
|
+
return toStr(obj) === "[object Number]" && canTrustToString(obj);
|
|
30884
30811
|
}
|
|
30885
30812
|
function isBoolean(obj) {
|
|
30886
|
-
return toStr
|
|
30813
|
+
return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
30887
30814
|
}
|
|
30888
30815
|
function isSymbol(obj) {
|
|
30889
30816
|
if (hasShammedSymbols) {
|
|
@@ -30919,7 +30846,7 @@
|
|
|
30919
30846
|
function has$3(obj, key) {
|
|
30920
30847
|
return hasOwn$1.call(obj, key);
|
|
30921
30848
|
}
|
|
30922
|
-
function toStr
|
|
30849
|
+
function toStr(obj) {
|
|
30923
30850
|
return objectToString.call(obj);
|
|
30924
30851
|
}
|
|
30925
30852
|
function nameOf(f) {
|
|
@@ -31228,7 +31155,7 @@
|
|
|
31228
31155
|
var uri = URIError;
|
|
31229
31156
|
var abs$1 = Math.abs;
|
|
31230
31157
|
var floor$1 = Math.floor;
|
|
31231
|
-
var max$
|
|
31158
|
+
var max$1 = Math.max;
|
|
31232
31159
|
var min$1 = Math.min;
|
|
31233
31160
|
var pow$1 = Math.pow;
|
|
31234
31161
|
var round$1 = Math.round;
|
|
@@ -31357,78 +31284,99 @@
|
|
|
31357
31284
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
31358
31285
|
return Object_getPrototypeOf;
|
|
31359
31286
|
}
|
|
31360
|
-
var
|
|
31361
|
-
var
|
|
31362
|
-
|
|
31363
|
-
|
|
31364
|
-
|
|
31365
|
-
var
|
|
31366
|
-
|
|
31367
|
-
|
|
31368
|
-
|
|
31369
|
-
|
|
31370
|
-
arr
|
|
31371
|
-
|
|
31372
|
-
|
|
31373
|
-
};
|
|
31374
|
-
var slicy = function slicy2(arrLike, offset) {
|
|
31375
|
-
var arr = [];
|
|
31376
|
-
for (var i = offset, j2 = 0; i < arrLike.length; i += 1, j2 += 1) {
|
|
31377
|
-
arr[j2] = arrLike[i];
|
|
31378
|
-
}
|
|
31379
|
-
return arr;
|
|
31380
|
-
};
|
|
31381
|
-
var joiny = function(arr, joiner) {
|
|
31382
|
-
var str = "";
|
|
31383
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
31384
|
-
str += arr[i];
|
|
31385
|
-
if (i + 1 < arr.length) {
|
|
31386
|
-
str += joiner;
|
|
31287
|
+
var implementation;
|
|
31288
|
+
var hasRequiredImplementation;
|
|
31289
|
+
function requireImplementation() {
|
|
31290
|
+
if (hasRequiredImplementation) return implementation;
|
|
31291
|
+
hasRequiredImplementation = 1;
|
|
31292
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
31293
|
+
var toStr2 = Object.prototype.toString;
|
|
31294
|
+
var max2 = Math.max;
|
|
31295
|
+
var funcType = "[object Function]";
|
|
31296
|
+
var concatty = function concatty2(a, b) {
|
|
31297
|
+
var arr = [];
|
|
31298
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
31299
|
+
arr[i] = a[i];
|
|
31387
31300
|
}
|
|
31388
|
-
|
|
31389
|
-
|
|
31390
|
-
|
|
31391
|
-
|
|
31392
|
-
|
|
31393
|
-
|
|
31394
|
-
|
|
31395
|
-
|
|
31396
|
-
|
|
31397
|
-
|
|
31398
|
-
|
|
31399
|
-
|
|
31400
|
-
|
|
31401
|
-
|
|
31402
|
-
|
|
31403
|
-
|
|
31404
|
-
if (
|
|
31405
|
-
|
|
31301
|
+
for (var j2 = 0; j2 < b.length; j2 += 1) {
|
|
31302
|
+
arr[j2 + a.length] = b[j2];
|
|
31303
|
+
}
|
|
31304
|
+
return arr;
|
|
31305
|
+
};
|
|
31306
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
31307
|
+
var arr = [];
|
|
31308
|
+
for (var i = offset, j2 = 0; i < arrLike.length; i += 1, j2 += 1) {
|
|
31309
|
+
arr[j2] = arrLike[i];
|
|
31310
|
+
}
|
|
31311
|
+
return arr;
|
|
31312
|
+
};
|
|
31313
|
+
var joiny = function(arr, joiner) {
|
|
31314
|
+
var str = "";
|
|
31315
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
31316
|
+
str += arr[i];
|
|
31317
|
+
if (i + 1 < arr.length) {
|
|
31318
|
+
str += joiner;
|
|
31406
31319
|
}
|
|
31407
|
-
return this;
|
|
31408
31320
|
}
|
|
31409
|
-
return
|
|
31410
|
-
that,
|
|
31411
|
-
concatty(args, arguments)
|
|
31412
|
-
);
|
|
31321
|
+
return str;
|
|
31413
31322
|
};
|
|
31414
|
-
|
|
31415
|
-
|
|
31416
|
-
|
|
31417
|
-
|
|
31418
|
-
|
|
31419
|
-
|
|
31420
|
-
|
|
31421
|
-
var
|
|
31323
|
+
implementation = function bind2(that) {
|
|
31324
|
+
var target = this;
|
|
31325
|
+
if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
|
|
31326
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
31327
|
+
}
|
|
31328
|
+
var args = slicy(arguments, 1);
|
|
31329
|
+
var bound;
|
|
31330
|
+
var binder = function() {
|
|
31331
|
+
if (this instanceof bound) {
|
|
31332
|
+
var result = target.apply(
|
|
31333
|
+
this,
|
|
31334
|
+
concatty(args, arguments)
|
|
31335
|
+
);
|
|
31336
|
+
if (Object(result) === result) {
|
|
31337
|
+
return result;
|
|
31338
|
+
}
|
|
31339
|
+
return this;
|
|
31340
|
+
}
|
|
31341
|
+
return target.apply(
|
|
31342
|
+
that,
|
|
31343
|
+
concatty(args, arguments)
|
|
31344
|
+
);
|
|
31422
31345
|
};
|
|
31423
|
-
|
|
31424
|
-
|
|
31425
|
-
|
|
31426
|
-
|
|
31427
|
-
|
|
31428
|
-
|
|
31429
|
-
|
|
31430
|
-
|
|
31431
|
-
|
|
31346
|
+
var boundLength = max2(0, target.length - args.length);
|
|
31347
|
+
var boundArgs = [];
|
|
31348
|
+
for (var i = 0; i < boundLength; i++) {
|
|
31349
|
+
boundArgs[i] = "$" + i;
|
|
31350
|
+
}
|
|
31351
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
31352
|
+
if (target.prototype) {
|
|
31353
|
+
var Empty2 = function Empty3() {
|
|
31354
|
+
};
|
|
31355
|
+
Empty2.prototype = target.prototype;
|
|
31356
|
+
bound.prototype = new Empty2();
|
|
31357
|
+
Empty2.prototype = null;
|
|
31358
|
+
}
|
|
31359
|
+
return bound;
|
|
31360
|
+
};
|
|
31361
|
+
return implementation;
|
|
31362
|
+
}
|
|
31363
|
+
var functionBind;
|
|
31364
|
+
var hasRequiredFunctionBind;
|
|
31365
|
+
function requireFunctionBind() {
|
|
31366
|
+
if (hasRequiredFunctionBind) return functionBind;
|
|
31367
|
+
hasRequiredFunctionBind = 1;
|
|
31368
|
+
var implementation2 = requireImplementation();
|
|
31369
|
+
functionBind = Function.prototype.bind || implementation2;
|
|
31370
|
+
return functionBind;
|
|
31371
|
+
}
|
|
31372
|
+
var functionCall;
|
|
31373
|
+
var hasRequiredFunctionCall;
|
|
31374
|
+
function requireFunctionCall() {
|
|
31375
|
+
if (hasRequiredFunctionCall) return functionCall;
|
|
31376
|
+
hasRequiredFunctionCall = 1;
|
|
31377
|
+
functionCall = Function.prototype.call;
|
|
31378
|
+
return functionCall;
|
|
31379
|
+
}
|
|
31432
31380
|
var functionApply;
|
|
31433
31381
|
var hasRequiredFunctionApply;
|
|
31434
31382
|
function requireFunctionApply() {
|
|
@@ -31438,14 +31386,14 @@
|
|
|
31438
31386
|
return functionApply;
|
|
31439
31387
|
}
|
|
31440
31388
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
31441
|
-
var bind$2 =
|
|
31389
|
+
var bind$2 = requireFunctionBind();
|
|
31442
31390
|
var $apply$1 = requireFunctionApply();
|
|
31443
|
-
var $call$2 =
|
|
31391
|
+
var $call$2 = requireFunctionCall();
|
|
31444
31392
|
var $reflectApply = reflectApply;
|
|
31445
31393
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
31446
|
-
var bind$1 =
|
|
31394
|
+
var bind$1 = requireFunctionBind();
|
|
31447
31395
|
var $TypeError$4 = type;
|
|
31448
|
-
var $call$1 =
|
|
31396
|
+
var $call$1 = requireFunctionCall();
|
|
31449
31397
|
var $actualApply = actualApply;
|
|
31450
31398
|
var callBindApplyHelpers = function callBindBasic2(args) {
|
|
31451
31399
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -31511,7 +31459,7 @@
|
|
|
31511
31459
|
hasRequiredHasown = 1;
|
|
31512
31460
|
var call2 = Function.prototype.call;
|
|
31513
31461
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
31514
|
-
var bind2 =
|
|
31462
|
+
var bind2 = requireFunctionBind();
|
|
31515
31463
|
hasown = bind2.call(call2, $hasOwn);
|
|
31516
31464
|
return hasown;
|
|
31517
31465
|
}
|
|
@@ -31526,7 +31474,7 @@
|
|
|
31526
31474
|
var $URIError = uri;
|
|
31527
31475
|
var abs = abs$1;
|
|
31528
31476
|
var floor = floor$1;
|
|
31529
|
-
var max = max$
|
|
31477
|
+
var max = max$1;
|
|
31530
31478
|
var min = min$1;
|
|
31531
31479
|
var pow = pow$1;
|
|
31532
31480
|
var round = round$1;
|
|
@@ -31560,7 +31508,7 @@
|
|
|
31560
31508
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
31561
31509
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
31562
31510
|
var $apply = requireFunctionApply();
|
|
31563
|
-
var $call =
|
|
31511
|
+
var $call = requireFunctionCall();
|
|
31564
31512
|
var needsEval = {};
|
|
31565
31513
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
31566
31514
|
var INTRINSICS = {
|
|
@@ -31731,7 +31679,7 @@
|
|
|
31731
31679
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
31732
31680
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
31733
31681
|
};
|
|
31734
|
-
var bind =
|
|
31682
|
+
var bind = requireFunctionBind();
|
|
31735
31683
|
var hasOwn = requireHasown();
|
|
31736
31684
|
var $concat = bind.call($call, Array.prototype.concat);
|
|
31737
31685
|
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
@@ -33738,7 +33686,8 @@
|
|
|
33738
33686
|
templateData: directTemplateData,
|
|
33739
33687
|
cardId: directCardId,
|
|
33740
33688
|
osName,
|
|
33741
|
-
isDev
|
|
33689
|
+
isDev,
|
|
33690
|
+
theme = {}
|
|
33742
33691
|
} = props;
|
|
33743
33692
|
const rawTemplateJson = directTemplateJson || ((_a = floor2 == null ? void 0 : floor2.cfg) == null ? void 0 : _a.templateJson);
|
|
33744
33693
|
const rawTemplateData = directTemplateData || ((_b = floor2 == null ? void 0 : floor2.cfg) == null ? void 0 : _b.templateData);
|
|
@@ -33788,7 +33737,8 @@
|
|
|
33788
33737
|
Render,
|
|
33789
33738
|
routerParams,
|
|
33790
33739
|
storageData,
|
|
33791
|
-
configData
|
|
33740
|
+
configData,
|
|
33741
|
+
theme
|
|
33792
33742
|
};
|
|
33793
33743
|
};
|
|
33794
33744
|
var __defProp = Object.defineProperty;
|
|
@@ -33810,7 +33760,7 @@
|
|
|
33810
33760
|
return a;
|
|
33811
33761
|
};
|
|
33812
33762
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
33813
|
-
const MessageCard = (props
|
|
33763
|
+
const MessageCard = (props) => {
|
|
33814
33764
|
const { floor: floor2, label, width = 375 } = props;
|
|
33815
33765
|
const responsiveValue = React.useMemo(() => {
|
|
33816
33766
|
return {
|
|
@@ -33824,44 +33774,84 @@
|
|
|
33824
33774
|
Render,
|
|
33825
33775
|
routerParams,
|
|
33826
33776
|
storageData,
|
|
33827
|
-
configData
|
|
33777
|
+
configData,
|
|
33778
|
+
theme
|
|
33828
33779
|
} = useMessageCardLogic(props);
|
|
33829
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ResponsiveContext.Provider, { value: responsiveValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33830
|
-
|
|
33831
|
-
{
|
|
33832
|
-
|
|
33833
|
-
|
|
33834
|
-
|
|
33835
|
-
|
|
33836
|
-
|
|
33837
|
-
|
|
33838
|
-
|
|
33839
|
-
|
|
33840
|
-
|
|
33841
|
-
|
|
33842
|
-
|
|
33843
|
-
|
|
33844
|
-
|
|
33845
|
-
|
|
33846
|
-
|
|
33847
|
-
|
|
33848
|
-
|
|
33849
|
-
|
|
33850
|
-
}),
|
|
33851
|
-
theme,
|
|
33852
|
-
onAction: (payload) => {
|
|
33853
|
-
console.info("onAction", payload);
|
|
33854
|
-
}
|
|
33855
|
-
}, props)
|
|
33856
|
-
)
|
|
33857
|
-
}
|
|
33858
|
-
) });
|
|
33780
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ResponsiveContext.Provider, { value: responsiveValue, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "message-card-wrapper", style: floor2 == null ? void 0 : floor2.style, id: label, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33781
|
+
Render,
|
|
33782
|
+
__spreadValues({
|
|
33783
|
+
component: __spreadProps(__spreadValues({}, templateJson), {
|
|
33784
|
+
data: __spreadProps(__spreadValues(__spreadValues({
|
|
33785
|
+
metadata: props.metadata,
|
|
33786
|
+
message: props.message,
|
|
33787
|
+
latest: props == null ? void 0 : props.latest,
|
|
33788
|
+
routerParams,
|
|
33789
|
+
storageData,
|
|
33790
|
+
configData
|
|
33791
|
+
}, templateData), props.data), {
|
|
33792
|
+
initProps: props
|
|
33793
|
+
})
|
|
33794
|
+
}),
|
|
33795
|
+
theme,
|
|
33796
|
+
onAction: (payload) => {
|
|
33797
|
+
console.info("onAction", payload);
|
|
33798
|
+
}
|
|
33799
|
+
}, props)
|
|
33800
|
+
) }) });
|
|
33859
33801
|
};
|
|
33860
33802
|
const MessageCard_default = React.forwardRef(MessageCard);
|
|
33803
|
+
const defaultTheme = {
|
|
33804
|
+
fontSize: {
|
|
33805
|
+
FontSizes_JDH_Headline1: 46,
|
|
33806
|
+
FontSizes_JDH_Headline2: 34,
|
|
33807
|
+
FontSizes_JDH_Title: 30,
|
|
33808
|
+
FontSizes_JDH_Text: 28,
|
|
33809
|
+
FontSizes_JDH_AccentText: 24,
|
|
33810
|
+
FontSizes_JDH_TagText: 20
|
|
33811
|
+
},
|
|
33812
|
+
color: {
|
|
33813
|
+
Color_JDH_Primary: "#17CB8E",
|
|
33814
|
+
Color_JDH_Accent1: "#FF8000",
|
|
33815
|
+
Color_JDH_Accent2: "#73B0FF",
|
|
33816
|
+
Color_JDH_Red_Danger: "#FF0F23",
|
|
33817
|
+
Color_JDH_Red_Price: "#FF0F23",
|
|
33818
|
+
Color_JDH_Red_Discount: "#FF0F23",
|
|
33819
|
+
Color_JDH_Green_Success: "#67CC52",
|
|
33820
|
+
Color_JDH_Gray_Headline: "#222222",
|
|
33821
|
+
Color_JDH_Gray_Text: "#222222",
|
|
33822
|
+
Color_JDH_Gray_SecondText: "#575859",
|
|
33823
|
+
Color_JDH_Gray_AccentText: "#858687",
|
|
33824
|
+
Color_JDH_Gray_DividingLine: "#D3D3D3",
|
|
33825
|
+
Color_JDH_Gray_Background: "#F5F5F6",
|
|
33826
|
+
Color_JDH_Gray_CardBackground: "#E5E9EB",
|
|
33827
|
+
Color_JDH_Gray_Card: "#FFFFFF",
|
|
33828
|
+
Color_JDH_Gray_Mask: "#00000080"
|
|
33829
|
+
},
|
|
33830
|
+
fontWeight: {
|
|
33831
|
+
FontWeight_JDH_Normal: 400,
|
|
33832
|
+
FontWeight_JDH_Medium: 500
|
|
33833
|
+
},
|
|
33834
|
+
space: {
|
|
33835
|
+
"spacing-xs": 4,
|
|
33836
|
+
"spacing-sm": 8,
|
|
33837
|
+
"spacing-md": 16,
|
|
33838
|
+
"spacing-lg": 20,
|
|
33839
|
+
"spacing-xl": 24,
|
|
33840
|
+
"spacing-xxl": 32
|
|
33841
|
+
},
|
|
33842
|
+
borderRadius: {
|
|
33843
|
+
Radius_JDH_LargeExtra: 32,
|
|
33844
|
+
Radius_JDH_Large: 24,
|
|
33845
|
+
Radius_JDH_Medium: 16,
|
|
33846
|
+
Radius_JDH_Small: 8,
|
|
33847
|
+
Radius_JDH_Mini: 6
|
|
33848
|
+
},
|
|
33849
|
+
components: {}
|
|
33850
|
+
};
|
|
33861
33851
|
exports2.MessageCard = MessageCard_default;
|
|
33862
33852
|
exports2.ThemeProvider = ThemeProvider;
|
|
33863
33853
|
exports2.default = MessageCard_default;
|
|
33864
|
-
exports2.defaultTheme = defaultTheme
|
|
33854
|
+
exports2.defaultTheme = defaultTheme;
|
|
33865
33855
|
exports2.isLayoutNode = isLayoutNode;
|
|
33866
33856
|
exports2.isRenderNode = isRenderNode;
|
|
33867
33857
|
exports2.useTheme = useTheme$1;
|