ssovee-os-web-ui 0.1.46 → 0.1.47
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/index.cjs +17 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +7 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/dist/sdk.cjs +17 -2
- package/dist/sdk.cjs.map +1 -1
- package/dist/sdk.d.cts +6 -2
- package/dist/sdk.d.ts +6 -2
- package/dist/sdk.js +17 -2
- package/dist/sdk.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3206,12 +3206,27 @@ var useGridClasses = (windowSize, gridRules) => {
|
|
|
3206
3206
|
if (windowSize.width <= 640) return "mobile";
|
|
3207
3207
|
if (windowSize.width <= 1024) return "tablet";
|
|
3208
3208
|
return "desktop";
|
|
3209
|
-
}, [windowSize]);
|
|
3209
|
+
}, [windowSize.width]);
|
|
3210
3210
|
const gridClasses = React22.useMemo(() => {
|
|
3211
3211
|
const classes = {};
|
|
3212
|
+
const resolveSpan = (spanRules) => {
|
|
3213
|
+
const fallbackByDevice = {
|
|
3214
|
+
mobile: ["mobile", "tablet", "desktop"],
|
|
3215
|
+
tablet: ["tablet", "desktop", "mobile"],
|
|
3216
|
+
desktop: ["desktop", "tablet", "mobile"]
|
|
3217
|
+
};
|
|
3218
|
+
const orderedDevices = fallbackByDevice[deviceType];
|
|
3219
|
+
for (const device of orderedDevices) {
|
|
3220
|
+
const candidate = spanRules?.[device];
|
|
3221
|
+
if (candidate) {
|
|
3222
|
+
return candidate;
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
return "12";
|
|
3226
|
+
};
|
|
3212
3227
|
for (const element in gridRules) {
|
|
3213
3228
|
const classRules = gridRules[element];
|
|
3214
|
-
const colSpan = classRules["col-span"]
|
|
3229
|
+
const colSpan = resolveSpan(classRules["col-span"]);
|
|
3215
3230
|
classes[element] = `col-span-${deviceType}-${colSpan}`;
|
|
3216
3231
|
}
|
|
3217
3232
|
return classes;
|