@aristobyte-ui/switch 1.0.111 → 1.0.112
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.d.mts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IconPropsType } from '@aristobyte-ui/utils';
|
|
1
3
|
|
|
2
|
-
|
|
4
|
+
interface ISwitch {
|
|
5
|
+
onChange?: () => void;
|
|
6
|
+
label?: string;
|
|
7
|
+
alignLabel?: "horizontal" | "vertical";
|
|
8
|
+
switchSize?: "xsm" | "sm" | "md" | "lg" | "xlg";
|
|
9
|
+
variant?: "default" | "primary" | "secondary" | "success" | "error" | "warning";
|
|
10
|
+
trackIcon?: {
|
|
11
|
+
checked?: {
|
|
12
|
+
component: (props: IconPropsType) => React.JSX.Element;
|
|
13
|
+
size?: number;
|
|
14
|
+
color?: string;
|
|
15
|
+
};
|
|
16
|
+
unchecked?: {
|
|
17
|
+
component: (props: IconPropsType) => React.JSX.Element;
|
|
18
|
+
size?: number;
|
|
19
|
+
color?: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
thumbIcon?: {
|
|
23
|
+
component: (props: IconPropsType) => React.JSX.Element;
|
|
24
|
+
size?: number;
|
|
25
|
+
color?: string;
|
|
26
|
+
};
|
|
27
|
+
checked?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
declare const Switch: React.FC<ISwitch>;
|
|
33
|
+
|
|
34
|
+
export { type ISwitch, Switch };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IconPropsType } from '@aristobyte-ui/utils';
|
|
1
3
|
|
|
2
|
-
|
|
4
|
+
interface ISwitch {
|
|
5
|
+
onChange?: () => void;
|
|
6
|
+
label?: string;
|
|
7
|
+
alignLabel?: "horizontal" | "vertical";
|
|
8
|
+
switchSize?: "xsm" | "sm" | "md" | "lg" | "xlg";
|
|
9
|
+
variant?: "default" | "primary" | "secondary" | "success" | "error" | "warning";
|
|
10
|
+
trackIcon?: {
|
|
11
|
+
checked?: {
|
|
12
|
+
component: (props: IconPropsType) => React.JSX.Element;
|
|
13
|
+
size?: number;
|
|
14
|
+
color?: string;
|
|
15
|
+
};
|
|
16
|
+
unchecked?: {
|
|
17
|
+
component: (props: IconPropsType) => React.JSX.Element;
|
|
18
|
+
size?: number;
|
|
19
|
+
color?: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
thumbIcon?: {
|
|
23
|
+
component: (props: IconPropsType) => React.JSX.Element;
|
|
24
|
+
size?: number;
|
|
25
|
+
color?: string;
|
|
26
|
+
};
|
|
27
|
+
checked?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
declare const Switch: React.FC<ISwitch>;
|
|
33
|
+
|
|
34
|
+
export { type ISwitch, Switch };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
7
13
|
var __copyProps = (to, from, except, desc) => {
|
|
8
14
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
15
|
for (let key of __getOwnPropNames(from))
|
|
@@ -12,9 +18,83 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
12
18
|
}
|
|
13
19
|
return to;
|
|
14
20
|
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
15
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
30
|
|
|
17
31
|
// index.ts
|
|
18
32
|
var index_exports = {};
|
|
33
|
+
__export(index_exports, {
|
|
34
|
+
Switch: () => Switch
|
|
35
|
+
});
|
|
19
36
|
module.exports = __toCommonJS(index_exports);
|
|
37
|
+
|
|
38
|
+
// components/Switch.tsx
|
|
39
|
+
var React = __toESM(require("react"));
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
+
var Switch = ({
|
|
42
|
+
onChange,
|
|
43
|
+
label,
|
|
44
|
+
alignLabel = "vertical",
|
|
45
|
+
checked,
|
|
46
|
+
switchSize = "md",
|
|
47
|
+
variant = "default",
|
|
48
|
+
disabled = false,
|
|
49
|
+
trackIcon,
|
|
50
|
+
thumbIcon,
|
|
51
|
+
className = "",
|
|
52
|
+
style = {}
|
|
53
|
+
}) => {
|
|
54
|
+
const id = React.useId();
|
|
55
|
+
const [isChecked, setIsChecked] = React.useState(!!checked);
|
|
56
|
+
const handleChange = () => {
|
|
57
|
+
setIsChecked((prev) => !prev);
|
|
58
|
+
if (onChange) onChange();
|
|
59
|
+
};
|
|
60
|
+
const baseClasses = [
|
|
61
|
+
"switch",
|
|
62
|
+
`switch-size-${switchSize}`,
|
|
63
|
+
`switch-variant-${variant}`,
|
|
64
|
+
`switch-align-label-${alignLabel}`,
|
|
65
|
+
disabled && "switch--disabled",
|
|
66
|
+
className
|
|
67
|
+
].filter(Boolean).join(" ");
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { htmlFor: id, className: baseClasses, style, children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
|
+
"input",
|
|
71
|
+
{
|
|
72
|
+
id,
|
|
73
|
+
type: "checkbox",
|
|
74
|
+
disabled,
|
|
75
|
+
checked: isChecked,
|
|
76
|
+
onChange: handleChange
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "switch__track relative rounded-full overflow-hidden transition-colors duration-300 ease-in-out", children: [
|
|
80
|
+
(trackIcon == null ? void 0 : trackIcon.checked) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "switch__track-icon switch__track-icon--checked absolute top-1/2 flex items-center justify-center transition-all duration-200 ease-out z-0", children: trackIcon.checked.component({
|
|
81
|
+
size: trackIcon.checked.size,
|
|
82
|
+
color: trackIcon.checked.color
|
|
83
|
+
}) }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "switch__thumb absolute top-1/2 left-0 bg-white rounded-full transform -translate-y-1/2 transition-all duration-200 ease-out flex items-center justify-center z-10", children: thumbIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "switch__thumb-icon flex items-center justify-center", children: thumbIcon.component({
|
|
85
|
+
size: thumbIcon.size,
|
|
86
|
+
color: thumbIcon.color
|
|
87
|
+
}) }) }),
|
|
88
|
+
(trackIcon == null ? void 0 : trackIcon.unchecked) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "switch__track-icon switch__track-icon--unchecked absolute top-1/2 flex items-center justify-center transition-all duration-200 ease-out z-0", children: trackIcon.unchecked.component({
|
|
89
|
+
size: trackIcon.unchecked.size,
|
|
90
|
+
color: trackIcon.unchecked.color
|
|
91
|
+
}) })
|
|
92
|
+
] }),
|
|
93
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "switch__label ml-2", children: label })
|
|
94
|
+
] });
|
|
95
|
+
};
|
|
96
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
+
0 && (module.exports = {
|
|
98
|
+
Switch
|
|
99
|
+
});
|
|
20
100
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../index.ts"],"sourcesContent":["export * from \"./components\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../index.ts","../components/Switch.tsx"],"sourcesContent":["export * from \"./components\";\n","\"use client\";\n\nimport * as React from \"react\";\nimport { type IconPropsType } from \"@aristobyte-ui/utils\";\n\nexport interface ISwitch {\n onChange?: () => void;\n label?: string;\n alignLabel?: \"horizontal\" | \"vertical\";\n switchSize?: \"xsm\" | \"sm\" | \"md\" | \"lg\" | \"xlg\";\n variant?:\n | \"default\"\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"error\"\n | \"warning\";\n trackIcon?: {\n checked?: {\n component: (props: IconPropsType) => React.JSX.Element;\n size?: number;\n color?: string;\n };\n unchecked?: {\n component: (props: IconPropsType) => React.JSX.Element;\n size?: number;\n color?: string;\n };\n };\n thumbIcon?: {\n component: (props: IconPropsType) => React.JSX.Element;\n size?: number;\n color?: string;\n };\n checked?: boolean;\n disabled?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport const Switch: React.FC<ISwitch> = ({\n onChange,\n label,\n alignLabel = \"vertical\",\n checked,\n switchSize = \"md\",\n variant = \"default\",\n disabled = false,\n trackIcon,\n thumbIcon,\n className = \"\",\n style = {},\n}) => {\n const id = React.useId();\n const [isChecked, setIsChecked] = React.useState<boolean>(!!checked);\n\n const handleChange = () => {\n setIsChecked((prev) => !prev);\n if (onChange) onChange();\n };\n\n const baseClasses = [\n \"switch\",\n `switch-size-${switchSize}`,\n `switch-variant-${variant}`,\n `switch-align-label-${alignLabel}`,\n disabled && \"switch--disabled\",\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <label htmlFor={id} className={baseClasses} style={style}>\n <input\n id={id}\n type=\"checkbox\"\n disabled={disabled}\n checked={isChecked}\n onChange={handleChange}\n />\n\n <span className=\"switch__track relative rounded-full overflow-hidden transition-colors duration-300 ease-in-out\">\n {trackIcon?.checked && (\n <span className=\"switch__track-icon switch__track-icon--checked absolute top-1/2 flex items-center justify-center transition-all duration-200 ease-out z-0\">\n {trackIcon.checked.component({\n size: trackIcon.checked.size,\n color: trackIcon.checked.color,\n })}\n </span>\n )}\n\n <span className=\"switch__thumb absolute top-1/2 left-0 bg-white rounded-full transform -translate-y-1/2 transition-all duration-200 ease-out flex items-center justify-center z-10\">\n {thumbIcon && (\n <span className=\"switch__thumb-icon flex items-center justify-center\">\n {thumbIcon.component({\n size: thumbIcon.size,\n color: thumbIcon.color,\n })}\n </span>\n )}\n </span>\n\n {trackIcon?.unchecked && (\n <span className=\"switch__track-icon switch__track-icon--unchecked absolute top-1/2 flex items-center justify-center transition-all duration-200 ease-out z-0\">\n {trackIcon.unchecked.component({\n size: trackIcon.unchecked.size,\n color: trackIcon.unchecked.color,\n })}\n </span>\n )}\n </span>\n\n {label && <span className=\"switch__label ml-2\">{label}</span>}\n </label>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,YAAuB;AAwEjB;AAlCC,IAAM,SAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA,aAAa;AAAA,EACb,UAAU;AAAA,EACV,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AACX,MAAM;AACJ,QAAM,KAAW,YAAM;AACvB,QAAM,CAAC,WAAW,YAAY,IAAU,eAAkB,CAAC,CAAC,OAAO;AAEnE,QAAM,eAAe,MAAM;AACzB,iBAAa,CAAC,SAAS,CAAC,IAAI;AAC5B,QAAI,SAAU,UAAS;AAAA,EACzB;AAEA,QAAM,cAAc;AAAA,IAClB;AAAA,IACA,eAAe,UAAU;AAAA,IACzB,kBAAkB,OAAO;AAAA,IACzB,sBAAsB,UAAU;AAAA,IAChC,YAAY;AAAA,IACZ;AAAA,EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,6CAAC,WAAM,SAAS,IAAI,WAAW,aAAa,OAC1C;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL;AAAA,QACA,SAAS;AAAA,QACT,UAAU;AAAA;AAAA,IACZ;AAAA,IAEA,6CAAC,UAAK,WAAU,kGACb;AAAA,8CAAW,YACV,4CAAC,UAAK,WAAU,6IACb,oBAAU,QAAQ,UAAU;AAAA,QAC3B,MAAM,UAAU,QAAQ;AAAA,QACxB,OAAO,UAAU,QAAQ;AAAA,MAC3B,CAAC,GACH;AAAA,MAGF,4CAAC,UAAK,WAAU,qKACb,uBACC,4CAAC,UAAK,WAAU,uDACb,oBAAU,UAAU;AAAA,QACnB,MAAM,UAAU;AAAA,QAChB,OAAO,UAAU;AAAA,MACnB,CAAC,GACH,GAEJ;AAAA,OAEC,uCAAW,cACV,4CAAC,UAAK,WAAU,+IACb,oBAAU,UAAU,UAAU;AAAA,QAC7B,MAAM,UAAU,UAAU;AAAA,QAC1B,OAAO,UAAU,UAAU;AAAA,MAC7B,CAAC,GACH;AAAA,OAEJ;AAAA,IAEC,SAAS,4CAAC,UAAK,WAAU,sBAAsB,iBAAM;AAAA,KACxD;AAEJ;","names":[]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,64 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
|
|
3
|
+
// components/Switch.tsx
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var Switch = ({
|
|
7
|
+
onChange,
|
|
8
|
+
label,
|
|
9
|
+
alignLabel = "vertical",
|
|
10
|
+
checked,
|
|
11
|
+
switchSize = "md",
|
|
12
|
+
variant = "default",
|
|
13
|
+
disabled = false,
|
|
14
|
+
trackIcon,
|
|
15
|
+
thumbIcon,
|
|
16
|
+
className = "",
|
|
17
|
+
style = {}
|
|
18
|
+
}) => {
|
|
19
|
+
const id = React.useId();
|
|
20
|
+
const [isChecked, setIsChecked] = React.useState(!!checked);
|
|
21
|
+
const handleChange = () => {
|
|
22
|
+
setIsChecked((prev) => !prev);
|
|
23
|
+
if (onChange) onChange();
|
|
24
|
+
};
|
|
25
|
+
const baseClasses = [
|
|
26
|
+
"switch",
|
|
27
|
+
`switch-size-${switchSize}`,
|
|
28
|
+
`switch-variant-${variant}`,
|
|
29
|
+
`switch-align-label-${alignLabel}`,
|
|
30
|
+
disabled && "switch--disabled",
|
|
31
|
+
className
|
|
32
|
+
].filter(Boolean).join(" ");
|
|
33
|
+
return /* @__PURE__ */ jsxs("label", { htmlFor: id, className: baseClasses, style, children: [
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
"input",
|
|
36
|
+
{
|
|
37
|
+
id,
|
|
38
|
+
type: "checkbox",
|
|
39
|
+
disabled,
|
|
40
|
+
checked: isChecked,
|
|
41
|
+
onChange: handleChange
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsxs("span", { className: "switch__track relative rounded-full overflow-hidden transition-colors duration-300 ease-in-out", children: [
|
|
45
|
+
(trackIcon == null ? void 0 : trackIcon.checked) && /* @__PURE__ */ jsx("span", { className: "switch__track-icon switch__track-icon--checked absolute top-1/2 flex items-center justify-center transition-all duration-200 ease-out z-0", children: trackIcon.checked.component({
|
|
46
|
+
size: trackIcon.checked.size,
|
|
47
|
+
color: trackIcon.checked.color
|
|
48
|
+
}) }),
|
|
49
|
+
/* @__PURE__ */ jsx("span", { className: "switch__thumb absolute top-1/2 left-0 bg-white rounded-full transform -translate-y-1/2 transition-all duration-200 ease-out flex items-center justify-center z-10", children: thumbIcon && /* @__PURE__ */ jsx("span", { className: "switch__thumb-icon flex items-center justify-center", children: thumbIcon.component({
|
|
50
|
+
size: thumbIcon.size,
|
|
51
|
+
color: thumbIcon.color
|
|
52
|
+
}) }) }),
|
|
53
|
+
(trackIcon == null ? void 0 : trackIcon.unchecked) && /* @__PURE__ */ jsx("span", { className: "switch__track-icon switch__track-icon--unchecked absolute top-1/2 flex items-center justify-center transition-all duration-200 ease-out z-0", children: trackIcon.unchecked.component({
|
|
54
|
+
size: trackIcon.unchecked.size,
|
|
55
|
+
color: trackIcon.unchecked.color
|
|
56
|
+
}) })
|
|
57
|
+
] }),
|
|
58
|
+
label && /* @__PURE__ */ jsx("span", { className: "switch__label ml-2", children: label })
|
|
59
|
+
] });
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
Switch
|
|
63
|
+
};
|
|
2
64
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../components/Switch.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { type IconPropsType } from \"@aristobyte-ui/utils\";\n\nexport interface ISwitch {\n onChange?: () => void;\n label?: string;\n alignLabel?: \"horizontal\" | \"vertical\";\n switchSize?: \"xsm\" | \"sm\" | \"md\" | \"lg\" | \"xlg\";\n variant?:\n | \"default\"\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"error\"\n | \"warning\";\n trackIcon?: {\n checked?: {\n component: (props: IconPropsType) => React.JSX.Element;\n size?: number;\n color?: string;\n };\n unchecked?: {\n component: (props: IconPropsType) => React.JSX.Element;\n size?: number;\n color?: string;\n };\n };\n thumbIcon?: {\n component: (props: IconPropsType) => React.JSX.Element;\n size?: number;\n color?: string;\n };\n checked?: boolean;\n disabled?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport const Switch: React.FC<ISwitch> = ({\n onChange,\n label,\n alignLabel = \"vertical\",\n checked,\n switchSize = \"md\",\n variant = \"default\",\n disabled = false,\n trackIcon,\n thumbIcon,\n className = \"\",\n style = {},\n}) => {\n const id = React.useId();\n const [isChecked, setIsChecked] = React.useState<boolean>(!!checked);\n\n const handleChange = () => {\n setIsChecked((prev) => !prev);\n if (onChange) onChange();\n };\n\n const baseClasses = [\n \"switch\",\n `switch-size-${switchSize}`,\n `switch-variant-${variant}`,\n `switch-align-label-${alignLabel}`,\n disabled && \"switch--disabled\",\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <label htmlFor={id} className={baseClasses} style={style}>\n <input\n id={id}\n type=\"checkbox\"\n disabled={disabled}\n checked={isChecked}\n onChange={handleChange}\n />\n\n <span className=\"switch__track relative rounded-full overflow-hidden transition-colors duration-300 ease-in-out\">\n {trackIcon?.checked && (\n <span className=\"switch__track-icon switch__track-icon--checked absolute top-1/2 flex items-center justify-center transition-all duration-200 ease-out z-0\">\n {trackIcon.checked.component({\n size: trackIcon.checked.size,\n color: trackIcon.checked.color,\n })}\n </span>\n )}\n\n <span className=\"switch__thumb absolute top-1/2 left-0 bg-white rounded-full transform -translate-y-1/2 transition-all duration-200 ease-out flex items-center justify-center z-10\">\n {thumbIcon && (\n <span className=\"switch__thumb-icon flex items-center justify-center\">\n {thumbIcon.component({\n size: thumbIcon.size,\n color: thumbIcon.color,\n })}\n </span>\n )}\n </span>\n\n {trackIcon?.unchecked && (\n <span className=\"switch__track-icon switch__track-icon--unchecked absolute top-1/2 flex items-center justify-center transition-all duration-200 ease-out z-0\">\n {trackIcon.unchecked.component({\n size: trackIcon.unchecked.size,\n color: trackIcon.unchecked.color,\n })}\n </span>\n )}\n </span>\n\n {label && <span className=\"switch__label ml-2\">{label}</span>}\n </label>\n );\n};\n"],"mappings":";;;AAEA,YAAY,WAAW;AAwEjB,cAQA,YARA;AAlCC,IAAM,SAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA,aAAa;AAAA,EACb,UAAU;AAAA,EACV,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AACX,MAAM;AACJ,QAAM,KAAW,YAAM;AACvB,QAAM,CAAC,WAAW,YAAY,IAAU,eAAkB,CAAC,CAAC,OAAO;AAEnE,QAAM,eAAe,MAAM;AACzB,iBAAa,CAAC,SAAS,CAAC,IAAI;AAC5B,QAAI,SAAU,UAAS;AAAA,EACzB;AAEA,QAAM,cAAc;AAAA,IAClB;AAAA,IACA,eAAe,UAAU;AAAA,IACzB,kBAAkB,OAAO;AAAA,IACzB,sBAAsB,UAAU;AAAA,IAChC,YAAY;AAAA,IACZ;AAAA,EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,qBAAC,WAAM,SAAS,IAAI,WAAW,aAAa,OAC1C;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL;AAAA,QACA,SAAS;AAAA,QACT,UAAU;AAAA;AAAA,IACZ;AAAA,IAEA,qBAAC,UAAK,WAAU,kGACb;AAAA,8CAAW,YACV,oBAAC,UAAK,WAAU,6IACb,oBAAU,QAAQ,UAAU;AAAA,QAC3B,MAAM,UAAU,QAAQ;AAAA,QACxB,OAAO,UAAU,QAAQ;AAAA,MAC3B,CAAC,GACH;AAAA,MAGF,oBAAC,UAAK,WAAU,qKACb,uBACC,oBAAC,UAAK,WAAU,uDACb,oBAAU,UAAU;AAAA,QACnB,MAAM,UAAU;AAAA,QAChB,OAAO,UAAU;AAAA,MACnB,CAAC,GACH,GAEJ;AAAA,OAEC,uCAAW,cACV,oBAAC,UAAK,WAAU,+IACb,oBAAU,UAAU,UAAU;AAAA,QAC7B,MAAM,UAAU,UAAU;AAAA,QAC1B,OAAO,UAAU,UAAU;AAAA,MAC7B,CAAC,GACH;AAAA,OAEJ;AAAA,IAEC,SAAS,oBAAC,UAAK,WAAU,sBAAsB,iBAAM;AAAA,KACxD;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aristobyte-ui/switch",
|
|
3
3
|
"description": "A fully typed, customizable Switch/toggle component for React with multiple sizes, variants, label alignments, and optional icons. Built to integrate seamlessly with AristoByteUI design tokens and SCSS modules.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.112",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"author": "AristoByte <info@aristobyte.com>",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"react-dom": "^19.1.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@aristobyte-ui/eslint-config": "^1.0.
|
|
62
|
-
"@aristobyte-ui/typescript-config": "^1.0.
|
|
61
|
+
"@aristobyte-ui/eslint-config": "^1.0.112",
|
|
62
|
+
"@aristobyte-ui/typescript-config": "^1.0.112",
|
|
63
63
|
"@turbo/gen": "^2.5.0",
|
|
64
64
|
"@types/node": "^24.3.0",
|
|
65
65
|
"@types/react": "19.1.0",
|