@saas-ui/storybook-addon 1.0.0 → 1.0.1-next.0
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -1178,9 +1178,9 @@ var require_react_fast_compare = __commonJS({
|
|
1178
1178
|
}
|
1179
1179
|
if (a.constructor === RegExp)
|
1180
1180
|
return a.source === b.source && a.flags === b.flags;
|
1181
|
-
if (a.valueOf !== Object.prototype.valueOf)
|
1181
|
+
if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === "function" && typeof b.valueOf === "function")
|
1182
1182
|
return a.valueOf() === b.valueOf();
|
1183
|
-
if (a.toString !== Object.prototype.toString)
|
1183
|
+
if (a.toString !== Object.prototype.toString && typeof a.toString === "function" && typeof b.toString === "function")
|
1184
1184
|
return a.toString() === b.toString();
|
1185
1185
|
keys = Object.keys(a);
|
1186
1186
|
length2 = keys.length;
|
@@ -3190,6 +3190,9 @@ var trimSpace = (str) => str.trim();
|
|
3190
3190
|
function parseGradient(value, theme) {
|
3191
3191
|
if (value == null || globalSet.has(value))
|
3192
3192
|
return value;
|
3193
|
+
const prevent = isCSSFunction(value) || globalSet.has(value);
|
3194
|
+
if (!prevent)
|
3195
|
+
return `url('${value}')`;
|
3193
3196
|
const regex = /(^[a-z-A-Z]+)\((.*)\)/g;
|
3194
3197
|
const results = regex.exec(value);
|
3195
3198
|
const type = results == null ? void 0 : results[1];
|
@@ -3309,6 +3312,7 @@ var t = {
|
|
3309
3312
|
borderStyles: toConfig("borderStyles"),
|
3310
3313
|
colors: toConfig("colors"),
|
3311
3314
|
borders: toConfig("borders"),
|
3315
|
+
gradients: toConfig("gradients", transformFunctions.gradient),
|
3312
3316
|
radii: toConfig("radii", transformFunctions.px),
|
3313
3317
|
space: toConfig("space", pipe(transformFunctions.vh, transformFunctions.px)),
|
3314
3318
|
spaceT: toConfig("space", pipe(transformFunctions.vh, transformFunctions.px)),
|
@@ -3335,7 +3339,7 @@ var t = {
|
|
3335
3339
|
var background = {
|
3336
3340
|
background: t.colors("background"),
|
3337
3341
|
backgroundColor: t.colors("backgroundColor"),
|
3338
|
-
backgroundImage: t.
|
3342
|
+
backgroundImage: t.gradients("backgroundImage"),
|
3339
3343
|
backgroundSize: true,
|
3340
3344
|
backgroundPosition: true,
|
3341
3345
|
backgroundRepeat: true,
|
@@ -3348,7 +3352,7 @@ var background = {
|
|
3348
3352
|
bgPos: t.prop("backgroundPosition"),
|
3349
3353
|
bgRepeat: t.prop("backgroundRepeat"),
|
3350
3354
|
bgAttachment: t.prop("backgroundAttachment"),
|
3351
|
-
bgGradient: t.
|
3355
|
+
bgGradient: t.gradients("backgroundImage"),
|
3352
3356
|
bgClip: { transform: transformFunctions.bgClip }
|
3353
3357
|
};
|
3354
3358
|
Object.assign(background, {
|
@@ -3604,7 +3608,8 @@ var layout = {
|
|
3604
3608
|
scale: "breakpoints",
|
3605
3609
|
transform: (value, theme) => {
|
3606
3610
|
var _a2, _b, _c;
|
3607
|
-
const
|
3611
|
+
const breakpoint = (_c = (_b = (_a2 = theme.__breakpoints) == null ? void 0 : _a2.get(value)) == null ? void 0 : _b.minW) != null ? _c : value;
|
3612
|
+
const mq = `@media screen and (min-width: ${breakpoint})`;
|
3608
3613
|
return { [mq]: { display: "none" } };
|
3609
3614
|
}
|
3610
3615
|
},
|
@@ -3612,7 +3617,8 @@ var layout = {
|
|
3612
3617
|
scale: "breakpoints",
|
3613
3618
|
transform: (value, theme) => {
|
3614
3619
|
var _a2, _b, _c;
|
3615
|
-
const
|
3620
|
+
const breakpoint = (_c = (_b = (_a2 = theme.__breakpoints) == null ? void 0 : _a2.get(value)) == null ? void 0 : _b._minW) != null ? _c : value;
|
3621
|
+
const mq = `@media screen and (max-width: ${breakpoint})`;
|
3616
3622
|
return { [mq]: { display: "none" } };
|
3617
3623
|
}
|
3618
3624
|
},
|
@@ -1227,9 +1227,9 @@ var require_react_fast_compare = __commonJS({
|
|
1227
1227
|
}
|
1228
1228
|
if (a.constructor === RegExp)
|
1229
1229
|
return a.source === b.source && a.flags === b.flags;
|
1230
|
-
if (a.valueOf !== Object.prototype.valueOf)
|
1230
|
+
if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === "function" && typeof b.valueOf === "function")
|
1231
1231
|
return a.valueOf() === b.valueOf();
|
1232
|
-
if (a.toString !== Object.prototype.toString)
|
1232
|
+
if (a.toString !== Object.prototype.toString && typeof a.toString === "function" && typeof b.toString === "function")
|
1233
1233
|
return a.toString() === b.toString();
|
1234
1234
|
keys = Object.keys(a);
|
1235
1235
|
length2 = keys.length;
|
@@ -3255,6 +3255,9 @@ var trimSpace = (str) => str.trim();
|
|
3255
3255
|
function parseGradient(value, theme) {
|
3256
3256
|
if (value == null || globalSet.has(value))
|
3257
3257
|
return value;
|
3258
|
+
const prevent = isCSSFunction(value) || globalSet.has(value);
|
3259
|
+
if (!prevent)
|
3260
|
+
return `url('${value}')`;
|
3258
3261
|
const regex = /(^[a-z-A-Z]+)\((.*)\)/g;
|
3259
3262
|
const results = regex.exec(value);
|
3260
3263
|
const type = results == null ? void 0 : results[1];
|
@@ -3374,6 +3377,7 @@ var t = {
|
|
3374
3377
|
borderStyles: toConfig("borderStyles"),
|
3375
3378
|
colors: toConfig("colors"),
|
3376
3379
|
borders: toConfig("borders"),
|
3380
|
+
gradients: toConfig("gradients", transformFunctions.gradient),
|
3377
3381
|
radii: toConfig("radii", transformFunctions.px),
|
3378
3382
|
space: toConfig("space", pipe(transformFunctions.vh, transformFunctions.px)),
|
3379
3383
|
spaceT: toConfig("space", pipe(transformFunctions.vh, transformFunctions.px)),
|
@@ -3400,7 +3404,7 @@ var t = {
|
|
3400
3404
|
var background = {
|
3401
3405
|
background: t.colors("background"),
|
3402
3406
|
backgroundColor: t.colors("backgroundColor"),
|
3403
|
-
backgroundImage: t.
|
3407
|
+
backgroundImage: t.gradients("backgroundImage"),
|
3404
3408
|
backgroundSize: true,
|
3405
3409
|
backgroundPosition: true,
|
3406
3410
|
backgroundRepeat: true,
|
@@ -3413,7 +3417,7 @@ var background = {
|
|
3413
3417
|
bgPos: t.prop("backgroundPosition"),
|
3414
3418
|
bgRepeat: t.prop("backgroundRepeat"),
|
3415
3419
|
bgAttachment: t.prop("backgroundAttachment"),
|
3416
|
-
bgGradient: t.
|
3420
|
+
bgGradient: t.gradients("backgroundImage"),
|
3417
3421
|
bgClip: { transform: transformFunctions.bgClip }
|
3418
3422
|
};
|
3419
3423
|
Object.assign(background, {
|
@@ -3669,7 +3673,8 @@ var layout = {
|
|
3669
3673
|
scale: "breakpoints",
|
3670
3674
|
transform: (value, theme) => {
|
3671
3675
|
var _a2, _b, _c;
|
3672
|
-
const
|
3676
|
+
const breakpoint = (_c = (_b = (_a2 = theme.__breakpoints) == null ? void 0 : _a2.get(value)) == null ? void 0 : _b.minW) != null ? _c : value;
|
3677
|
+
const mq = `@media screen and (min-width: ${breakpoint})`;
|
3673
3678
|
return { [mq]: { display: "none" } };
|
3674
3679
|
}
|
3675
3680
|
},
|
@@ -3677,7 +3682,8 @@ var layout = {
|
|
3677
3682
|
scale: "breakpoints",
|
3678
3683
|
transform: (value, theme) => {
|
3679
3684
|
var _a2, _b, _c;
|
3680
|
-
const
|
3685
|
+
const breakpoint = (_c = (_b = (_a2 = theme.__breakpoints) == null ? void 0 : _a2.get(value)) == null ? void 0 : _b._minW) != null ? _c : value;
|
3686
|
+
const mq = `@media screen and (max-width: ${breakpoint})`;
|
3681
3687
|
return { [mq]: { display: "none" } };
|
3682
3688
|
}
|
3683
3689
|
},
|
package/dist/preset/register.cjs
CHANGED
@@ -1222,9 +1222,9 @@ var require_react_fast_compare = __commonJS({
|
|
1222
1222
|
}
|
1223
1223
|
if (a.constructor === RegExp)
|
1224
1224
|
return a.source === b.source && a.flags === b.flags;
|
1225
|
-
if (a.valueOf !== Object.prototype.valueOf)
|
1225
|
+
if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === "function" && typeof b.valueOf === "function")
|
1226
1226
|
return a.valueOf() === b.valueOf();
|
1227
|
-
if (a.toString !== Object.prototype.toString)
|
1227
|
+
if (a.toString !== Object.prototype.toString && typeof a.toString === "function" && typeof b.toString === "function")
|
1228
1228
|
return a.toString() === b.toString();
|
1229
1229
|
keys = Object.keys(a);
|
1230
1230
|
length2 = keys.length;
|
@@ -3303,6 +3303,9 @@ var trimSpace = (str) => str.trim();
|
|
3303
3303
|
function parseGradient(value, theme) {
|
3304
3304
|
if (value == null || globalSet.has(value))
|
3305
3305
|
return value;
|
3306
|
+
const prevent = isCSSFunction(value) || globalSet.has(value);
|
3307
|
+
if (!prevent)
|
3308
|
+
return `url('${value}')`;
|
3306
3309
|
const regex = /(^[a-z-A-Z]+)\((.*)\)/g;
|
3307
3310
|
const results = regex.exec(value);
|
3308
3311
|
const type = results == null ? void 0 : results[1];
|
@@ -3422,6 +3425,7 @@ var t = {
|
|
3422
3425
|
borderStyles: toConfig("borderStyles"),
|
3423
3426
|
colors: toConfig("colors"),
|
3424
3427
|
borders: toConfig("borders"),
|
3428
|
+
gradients: toConfig("gradients", transformFunctions.gradient),
|
3425
3429
|
radii: toConfig("radii", transformFunctions.px),
|
3426
3430
|
space: toConfig("space", pipe(transformFunctions.vh, transformFunctions.px)),
|
3427
3431
|
spaceT: toConfig("space", pipe(transformFunctions.vh, transformFunctions.px)),
|
@@ -3448,7 +3452,7 @@ var t = {
|
|
3448
3452
|
var background = {
|
3449
3453
|
background: t.colors("background"),
|
3450
3454
|
backgroundColor: t.colors("backgroundColor"),
|
3451
|
-
backgroundImage: t.
|
3455
|
+
backgroundImage: t.gradients("backgroundImage"),
|
3452
3456
|
backgroundSize: true,
|
3453
3457
|
backgroundPosition: true,
|
3454
3458
|
backgroundRepeat: true,
|
@@ -3461,7 +3465,7 @@ var background = {
|
|
3461
3465
|
bgPos: t.prop("backgroundPosition"),
|
3462
3466
|
bgRepeat: t.prop("backgroundRepeat"),
|
3463
3467
|
bgAttachment: t.prop("backgroundAttachment"),
|
3464
|
-
bgGradient: t.
|
3468
|
+
bgGradient: t.gradients("backgroundImage"),
|
3465
3469
|
bgClip: { transform: transformFunctions.bgClip }
|
3466
3470
|
};
|
3467
3471
|
Object.assign(background, {
|
@@ -3717,7 +3721,8 @@ var layout = {
|
|
3717
3721
|
scale: "breakpoints",
|
3718
3722
|
transform: (value, theme) => {
|
3719
3723
|
var _a2, _b, _c;
|
3720
|
-
const
|
3724
|
+
const breakpoint = (_c = (_b = (_a2 = theme.__breakpoints) == null ? void 0 : _a2.get(value)) == null ? void 0 : _b.minW) != null ? _c : value;
|
3725
|
+
const mq = `@media screen and (min-width: ${breakpoint})`;
|
3721
3726
|
return { [mq]: { display: "none" } };
|
3722
3727
|
}
|
3723
3728
|
},
|
@@ -3725,7 +3730,8 @@ var layout = {
|
|
3725
3730
|
scale: "breakpoints",
|
3726
3731
|
transform: (value, theme) => {
|
3727
3732
|
var _a2, _b, _c;
|
3728
|
-
const
|
3733
|
+
const breakpoint = (_c = (_b = (_a2 = theme.__breakpoints) == null ? void 0 : _a2.get(value)) == null ? void 0 : _b._minW) != null ? _c : value;
|
3734
|
+
const mq = `@media screen and (max-width: ${breakpoint})`;
|
3729
3735
|
return { [mq]: { display: "none" } };
|
3730
3736
|
}
|
3731
3737
|
},
|
package/dist/preset/register.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@saas-ui/storybook-addon",
|
3
|
-
"version": "1.0.0",
|
3
|
+
"version": "1.0.1-next.0",
|
4
4
|
"description": "The official Storybook Addon for Saas UI",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"module": "dist/index.mjs",
|
@@ -73,19 +73,23 @@
|
|
73
73
|
},
|
74
74
|
"homepage": "https://github.com/saas-ui/saas-ui#readme",
|
75
75
|
"devDependencies": {
|
76
|
-
"@chakra-ui/react": "^2.5.
|
76
|
+
"@chakra-ui/react": "^2.5.5",
|
77
77
|
"@chakra-ui/system": ">=2.3.8",
|
78
78
|
"@emotion/react": ">=11.1.5",
|
79
79
|
"@emotion/styled": ">=11.1.5",
|
80
|
-
"@saas-ui/react": "2.0.0-next.
|
81
|
-
"@saas-ui/theme
|
82
|
-
"@
|
83
|
-
"@storybook/
|
84
|
-
"@storybook/
|
80
|
+
"@saas-ui/react": "2.0.0-next.13",
|
81
|
+
"@saas-ui/theme": "2.0.0-next.7",
|
82
|
+
"@saas-ui/theme-glass": "0.3.2-next.2",
|
83
|
+
"@storybook/addons": "^7.0.2",
|
84
|
+
"@storybook/api": "^7.0.2",
|
85
|
+
"@storybook/components": "^7.0.2",
|
85
86
|
"framer-motion": ">=4.1.17",
|
86
|
-
"react": "^18.
|
87
|
+
"react": "^18.2.0",
|
87
88
|
"react-dom": ">=18.0.0",
|
88
|
-
"tsup": "^6.
|
89
|
+
"tsup": "^6.7.0"
|
90
|
+
},
|
91
|
+
"dependencies": {
|
92
|
+
"@chakra-ui/icons": "^2.0.18"
|
89
93
|
},
|
90
94
|
"peerDependencies": {
|
91
95
|
"@chakra-ui/react": ">=2.0.0",
|