myshell-react-lib 0.1.12 → 0.1.13
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 +76 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +76 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -12237,12 +12237,38 @@ var switchSize = {
|
|
|
12237
12237
|
md: "w-[34px] h-5",
|
|
12238
12238
|
lg: "w-10 h-6"
|
|
12239
12239
|
};
|
|
12240
|
+
var switchVerticalSize = {
|
|
12241
|
+
sm: "h-7 w-4",
|
|
12242
|
+
md: "h-[34px] w-5",
|
|
12243
|
+
lg: "h-10 w-6"
|
|
12244
|
+
};
|
|
12240
12245
|
var switchRootVariants = (0, import_class_variance_authority17.cva)('peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cc-Focus-Rings-Brand-default focus-visible:ring-offset-2 data-[state=unchecked]:focus-visible:bg-cc-Switch-bg-default disabled:cursor-not-allowed disabled:opacity-30 data-[state="checked"]:bg-cc-Switch-bg-on data-[state="unchecked"]:bg-cc-Switch-bg-default', {
|
|
12241
12246
|
variants: {
|
|
12242
|
-
size: switchSize
|
|
12247
|
+
size: switchSize,
|
|
12248
|
+
vertical: {
|
|
12249
|
+
true: "justify-start"
|
|
12250
|
+
}
|
|
12243
12251
|
},
|
|
12252
|
+
compoundVariants: [
|
|
12253
|
+
{
|
|
12254
|
+
vertical: true,
|
|
12255
|
+
size: "sm",
|
|
12256
|
+
className: switchVerticalSize.sm
|
|
12257
|
+
},
|
|
12258
|
+
{
|
|
12259
|
+
vertical: true,
|
|
12260
|
+
size: "md",
|
|
12261
|
+
className: switchVerticalSize.md
|
|
12262
|
+
},
|
|
12263
|
+
{
|
|
12264
|
+
vertical: true,
|
|
12265
|
+
size: "lg",
|
|
12266
|
+
className: switchVerticalSize.lg
|
|
12267
|
+
}
|
|
12268
|
+
],
|
|
12244
12269
|
defaultVariants: {
|
|
12245
|
-
size: "lg"
|
|
12270
|
+
size: "lg",
|
|
12271
|
+
vertical: false
|
|
12246
12272
|
}
|
|
12247
12273
|
});
|
|
12248
12274
|
var switchThumbVariants = (0, import_class_variance_authority17.cva)("pointer-events-none block rounded-full bg-cc-Switch-fg-on ring-0 transition-transform data-[state=unchecked]:translate-x-0", {
|
|
@@ -12251,33 +12277,73 @@ var switchThumbVariants = (0, import_class_variance_authority17.cva)("pointer-ev
|
|
|
12251
12277
|
sm: "w-3 h-3 data-[state=checked]:translate-x-3",
|
|
12252
12278
|
md: "w-4 h-4 data-[state=checked]:translate-x-[14px]",
|
|
12253
12279
|
lg: "w-5 h-5 data-[state=checked]:translate-x-4"
|
|
12280
|
+
},
|
|
12281
|
+
vertical: {
|
|
12282
|
+
true: "data-[state=checked]:translate-x-0 data-[state=unchecked]:translate-x-0"
|
|
12254
12283
|
}
|
|
12255
12284
|
},
|
|
12285
|
+
compoundVariants: [
|
|
12286
|
+
{
|
|
12287
|
+
vertical: true,
|
|
12288
|
+
size: "sm",
|
|
12289
|
+
className: "data-[state=unchecked]:translate-y-3 data-[state=checked]:translate-y-0"
|
|
12290
|
+
},
|
|
12291
|
+
{
|
|
12292
|
+
vertical: true,
|
|
12293
|
+
size: "md",
|
|
12294
|
+
className: "data-[state=unchecked]:translate-y-[14px] data-[state=checked]:translate-y-0"
|
|
12295
|
+
},
|
|
12296
|
+
{
|
|
12297
|
+
vertical: true,
|
|
12298
|
+
size: "lg",
|
|
12299
|
+
className: "data-[state=unchecked]:translate-y-4 data-[state=checked]:translate-y-0"
|
|
12300
|
+
}
|
|
12301
|
+
],
|
|
12256
12302
|
defaultVariants: {
|
|
12257
|
-
size: "lg"
|
|
12303
|
+
size: "lg",
|
|
12304
|
+
vertical: false
|
|
12305
|
+
}
|
|
12306
|
+
});
|
|
12307
|
+
var switchThumbIconVariants = (0, import_class_variance_authority17.cva)("flex items-center justify-center", {
|
|
12308
|
+
variants: {
|
|
12309
|
+
size: {
|
|
12310
|
+
sm: "w-2 h-2",
|
|
12311
|
+
md: "w-3 h-3",
|
|
12312
|
+
lg: "w-4 h-4"
|
|
12313
|
+
}
|
|
12258
12314
|
}
|
|
12259
12315
|
});
|
|
12260
12316
|
var Switch = React36.forwardRef(function(_param, ref) {
|
|
12261
|
-
var className = _param.className, size = _param.size, label = _param.label, labelClassName = _param.labelClassName, props = _object_without_properties(_param, [
|
|
12317
|
+
var className = _param.className, size = _param.size, label = _param.label, labelClassName = _param.labelClassName, vertical = _param.vertical, icon = _param.icon, props = _object_without_properties(_param, [
|
|
12262
12318
|
"className",
|
|
12263
12319
|
"size",
|
|
12264
12320
|
"label",
|
|
12265
|
-
"labelClassName"
|
|
12321
|
+
"labelClassName",
|
|
12322
|
+
"vertical",
|
|
12323
|
+
"icon"
|
|
12266
12324
|
]);
|
|
12267
12325
|
var Component = label ? "div" : React36.Fragment;
|
|
12268
12326
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Component, {
|
|
12269
|
-
className: "flex items-center justify-center space-x-1.5 text-Colors-Text-Default",
|
|
12327
|
+
className: cn("flex items-center justify-center space-x-1.5 text-Colors-Text-Default", vertical && "flex-col space-x-0 space-y-1.5"),
|
|
12270
12328
|
children: [
|
|
12271
12329
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SwitchPrimitives.Root, _object_spread_props(_object_spread({
|
|
12272
12330
|
className: cn(switchRootVariants({
|
|
12273
|
-
size: size
|
|
12274
|
-
|
|
12331
|
+
size: size,
|
|
12332
|
+
vertical: vertical
|
|
12333
|
+
}), className, vertical && "flex-col")
|
|
12275
12334
|
}, props), {
|
|
12276
12335
|
ref: ref,
|
|
12277
12336
|
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SwitchPrimitives.Thumb, {
|
|
12278
12337
|
className: cn(switchThumbVariants({
|
|
12279
|
-
size: size
|
|
12280
|
-
|
|
12338
|
+
size: size,
|
|
12339
|
+
vertical: vertical
|
|
12340
|
+
}), "flex items-center justify-center"),
|
|
12341
|
+
children: icon && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon, {
|
|
12342
|
+
component: icon,
|
|
12343
|
+
className: switchThumbIconVariants({
|
|
12344
|
+
size: size
|
|
12345
|
+
})
|
|
12346
|
+
})
|
|
12281
12347
|
})
|
|
12282
12348
|
})),
|
|
12283
12349
|
label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", {
|