lizaui 9.0.35 → 9.0.36
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/autocomplete/index.cjs.js +1 -1
- package/dist/autocomplete/index.es.js +1 -1
- package/dist/chunks/{scroll-area-pFCPZQfu.js → scroll-area-BuqtmF5b.js} +2 -2
- package/dist/chunks/{scroll-area-pFCPZQfu.js.map → scroll-area-BuqtmF5b.js.map} +1 -1
- package/dist/chunks/{scroll-area-CavnA07_.js → scroll-area-cc9CxDjf.js} +2 -2
- package/dist/chunks/{scroll-area-CavnA07_.js.map → scroll-area-cc9CxDjf.js.map} +1 -1
- package/dist/chunks/{select-DDjWBFlv.js → select-CCNqnAkO.js} +2 -2
- package/dist/chunks/{select-DDjWBFlv.js.map → select-CCNqnAkO.js.map} +1 -1
- package/dist/chunks/{select-BeLx-OSg.js → select-D8kh-w-4.js} +2 -2
- package/dist/chunks/{select-BeLx-OSg.js.map → select-D8kh-w-4.js.map} +1 -1
- package/dist/chunks/{textarea-C8t_W4nu.js → textarea-07phBdq4.js} +98 -401
- package/dist/chunks/textarea-07phBdq4.js.map +1 -0
- package/dist/chunks/{textarea-D8KQkXO4.js → textarea-DyGA1ivF.js} +97 -400
- package/dist/chunks/textarea-DyGA1ivF.js.map +1 -0
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/pagination/index.cjs.js +2 -2
- package/dist/pagination/index.es.js +2 -2
- package/dist/phone-input/index.cjs.js +2 -2
- package/dist/phone-input/index.es.js +2 -2
- package/dist/time-input/index.cjs.js +1 -1
- package/dist/time-input/index.es.js +1 -1
- package/dist/travel-calendar/index.cjs.js +1 -1
- package/dist/travel-calendar/index.es.js +1 -1
- package/dist/ui/index.cjs.js +3 -3
- package/dist/ui/index.es.js +6 -6
- package/package.json +1 -1
- package/dist/chunks/textarea-C8t_W4nu.js.map +0 -1
- package/dist/chunks/textarea-D8KQkXO4.js.map +0 -1
|
@@ -942,411 +942,108 @@ const SwitchClassProps = index.cva(["flex items-center cursor-pointer relative r
|
|
|
942
942
|
size: "md"
|
|
943
943
|
}
|
|
944
944
|
});
|
|
945
|
-
const Switch = (
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
if ($2[0] !== t0) {
|
|
965
|
-
({
|
|
966
|
-
id: t1,
|
|
967
|
-
color,
|
|
968
|
-
size: t2,
|
|
969
|
-
className,
|
|
970
|
-
disabled: t3,
|
|
971
|
-
label,
|
|
972
|
-
description,
|
|
973
|
-
positionLabel: t4,
|
|
974
|
-
required,
|
|
975
|
-
error,
|
|
976
|
-
touched,
|
|
977
|
-
value,
|
|
978
|
-
leftIcon,
|
|
979
|
-
rightIcon,
|
|
980
|
-
thumbIcon,
|
|
981
|
-
onChange,
|
|
982
|
-
...props2
|
|
983
|
-
} = t0);
|
|
984
|
-
$2[0] = t0;
|
|
985
|
-
$2[1] = className;
|
|
986
|
-
$2[2] = color;
|
|
987
|
-
$2[3] = description;
|
|
988
|
-
$2[4] = error;
|
|
989
|
-
$2[5] = label;
|
|
990
|
-
$2[6] = leftIcon;
|
|
991
|
-
$2[7] = onChange;
|
|
992
|
-
$2[8] = props2;
|
|
993
|
-
$2[9] = required;
|
|
994
|
-
$2[10] = rightIcon;
|
|
995
|
-
$2[11] = t1;
|
|
996
|
-
$2[12] = t2;
|
|
997
|
-
$2[13] = t3;
|
|
998
|
-
$2[14] = t4;
|
|
999
|
-
$2[15] = thumbIcon;
|
|
1000
|
-
$2[16] = touched;
|
|
1001
|
-
$2[17] = value;
|
|
1002
|
-
} else {
|
|
1003
|
-
className = $2[1];
|
|
1004
|
-
color = $2[2];
|
|
1005
|
-
description = $2[3];
|
|
1006
|
-
error = $2[4];
|
|
1007
|
-
label = $2[5];
|
|
1008
|
-
leftIcon = $2[6];
|
|
1009
|
-
onChange = $2[7];
|
|
1010
|
-
props2 = $2[8];
|
|
1011
|
-
required = $2[9];
|
|
1012
|
-
rightIcon = $2[10];
|
|
1013
|
-
t1 = $2[11];
|
|
1014
|
-
t2 = $2[12];
|
|
1015
|
-
t3 = $2[13];
|
|
1016
|
-
t4 = $2[14];
|
|
1017
|
-
thumbIcon = $2[15];
|
|
1018
|
-
touched = $2[16];
|
|
1019
|
-
value = $2[17];
|
|
1020
|
-
}
|
|
1021
|
-
const id = t1 === void 0 ? null : t1;
|
|
1022
|
-
const size = t2 === void 0 ? "md" : t2;
|
|
1023
|
-
const disabled = t3 === void 0 ? false : t3;
|
|
1024
|
-
const positionLabel = t4 === void 0 ? "end" : t4;
|
|
945
|
+
const Switch = ({
|
|
946
|
+
id = null,
|
|
947
|
+
color,
|
|
948
|
+
size = "md",
|
|
949
|
+
className,
|
|
950
|
+
disabled = false,
|
|
951
|
+
label,
|
|
952
|
+
description,
|
|
953
|
+
positionLabel = "end",
|
|
954
|
+
required,
|
|
955
|
+
error,
|
|
956
|
+
touched,
|
|
957
|
+
value,
|
|
958
|
+
leftIcon,
|
|
959
|
+
rightIcon,
|
|
960
|
+
thumbIcon,
|
|
961
|
+
onChange,
|
|
962
|
+
...props2
|
|
963
|
+
}) => {
|
|
1025
964
|
const switchId = React.useId();
|
|
1026
965
|
const resolvedId = id || switchId;
|
|
1027
966
|
const [valueCheck, setValueCheck] = React.useState(false);
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
setValueCheck(value);
|
|
1034
|
-
};
|
|
1035
|
-
t6 = [value];
|
|
1036
|
-
$2[18] = value;
|
|
1037
|
-
$2[19] = t5;
|
|
1038
|
-
$2[20] = t6;
|
|
1039
|
-
} else {
|
|
1040
|
-
t5 = $2[19];
|
|
1041
|
-
t6 = $2[20];
|
|
1042
|
-
}
|
|
1043
|
-
React.useEffect(t5, t6);
|
|
1044
|
-
let t7;
|
|
1045
|
-
let t8;
|
|
1046
|
-
if ($2[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1047
|
-
t7 = () => {
|
|
1048
|
-
const timeout = setTimeout(() => {
|
|
1049
|
-
setMounted(true);
|
|
1050
|
-
}, 50);
|
|
1051
|
-
return () => clearTimeout(timeout);
|
|
1052
|
-
};
|
|
1053
|
-
t8 = [];
|
|
1054
|
-
$2[21] = t7;
|
|
1055
|
-
$2[22] = t8;
|
|
1056
|
-
} else {
|
|
1057
|
-
t7 = $2[21];
|
|
1058
|
-
t8 = $2[22];
|
|
1059
|
-
}
|
|
1060
|
-
React.useEffect(t7, t8);
|
|
1061
|
-
let t9;
|
|
1062
|
-
if ($2[23] !== onChange) {
|
|
1063
|
-
t9 = (e) => {
|
|
1064
|
-
onChange(e.target.checked);
|
|
1065
|
-
};
|
|
1066
|
-
$2[23] = onChange;
|
|
1067
|
-
$2[24] = t9;
|
|
1068
|
-
} else {
|
|
1069
|
-
t9 = $2[24];
|
|
1070
|
-
}
|
|
1071
|
-
const handleChange = t9;
|
|
1072
|
-
let t10;
|
|
1073
|
-
if ($2[25] !== disabled || $2[26] !== onChange || $2[27] !== valueCheck) {
|
|
1074
|
-
t10 = () => {
|
|
1075
|
-
if (!disabled) {
|
|
1076
|
-
onChange(!valueCheck);
|
|
1077
|
-
}
|
|
967
|
+
const isMounted = React.useRef(false);
|
|
968
|
+
React.useEffect(() => {
|
|
969
|
+
isMounted.current = true;
|
|
970
|
+
return () => {
|
|
971
|
+
isMounted.current = false;
|
|
1078
972
|
};
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
}
|
|
1086
|
-
const handleClick =
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
let t16;
|
|
1105
|
-
let t17;
|
|
1106
|
-
if ($2[33] !== className || $2[34] !== color || $2[35] !== description || $2[36] !== disabled || $2[37] !== handleClick || $2[38] !== label || $2[39] !== positionLabel || $2[40] !== required || $2[41] !== resolvedId || $2[42] !== size || $2[43] !== valueCheck) {
|
|
1107
|
-
const classLabel = tailwindMerge.twMerge(clsx(!valueCheck && "bg-default-200", disabled && "bg-default-100 hover:bg-default-100"));
|
|
1108
|
-
let t182;
|
|
1109
|
-
if ($2[51] !== disabled || $2[52] !== required || $2[53] !== size) {
|
|
1110
|
-
t182 = tailwindMerge.twMerge("text-gray-500 leading-none", clsx({
|
|
1111
|
-
"text-sm": size === "sm" || size === "md",
|
|
1112
|
-
"after:content-['*'] after:ml-0.5 after:text-green-500": required,
|
|
1113
|
-
"after:text-gray-400 text-gray-400": disabled
|
|
1114
|
-
}));
|
|
1115
|
-
$2[51] = disabled;
|
|
1116
|
-
$2[52] = required;
|
|
1117
|
-
$2[53] = size;
|
|
1118
|
-
$2[54] = t182;
|
|
1119
|
-
} else {
|
|
1120
|
-
t182 = $2[54];
|
|
1121
|
-
}
|
|
1122
|
-
classText = t182;
|
|
1123
|
-
const t192 = disabled && "text-gray-400";
|
|
1124
|
-
let t202;
|
|
1125
|
-
if ($2[55] !== t192) {
|
|
1126
|
-
t202 = tailwindMerge.twMerge("text-xs text-gray-500 mt-1", t192);
|
|
1127
|
-
$2[55] = t192;
|
|
1128
|
-
$2[56] = t202;
|
|
1129
|
-
} else {
|
|
1130
|
-
t202 = $2[56];
|
|
1131
|
-
}
|
|
1132
|
-
classDescription = t202;
|
|
1133
|
-
if ($2[57] !== className) {
|
|
1134
|
-
t17 = tailwindMerge.twMerge(className);
|
|
1135
|
-
$2[57] = className;
|
|
1136
|
-
$2[58] = t17;
|
|
1137
|
-
} else {
|
|
1138
|
-
t17 = $2[58];
|
|
1139
|
-
}
|
|
1140
|
-
const t212 = description && label ? "items-start" : "items-center";
|
|
1141
|
-
if ($2[59] !== t212) {
|
|
1142
|
-
t15 = clsx("flex gap-2", t212);
|
|
1143
|
-
$2[59] = t212;
|
|
1144
|
-
$2[60] = t15;
|
|
1145
|
-
} else {
|
|
1146
|
-
t15 = $2[60];
|
|
1147
|
-
}
|
|
1148
|
-
if ($2[61] !== classDescription || $2[62] !== classText || $2[63] !== description || $2[64] !== handleClick || $2[65] !== label || $2[66] !== positionLabel) {
|
|
1149
|
-
t16 = positionLabel === "start" && (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { onClick: handleClick, className: "cursor-pointer", children: [
|
|
973
|
+
}, []);
|
|
974
|
+
React.useEffect(() => {
|
|
975
|
+
setValueCheck(value);
|
|
976
|
+
}, [value]);
|
|
977
|
+
const handleChange = (e) => {
|
|
978
|
+
onChange(e.target.checked);
|
|
979
|
+
};
|
|
980
|
+
const handleClick = () => {
|
|
981
|
+
if (!disabled) onChange(!valueCheck);
|
|
982
|
+
};
|
|
983
|
+
const classSpan = tailwindMerge.twMerge(
|
|
984
|
+
// Evitamos transición en el primer render si viene activo
|
|
985
|
+
isMounted.current ? "transition transform bg-white rounded-full shadow-sm flex justify-center items-center" : "transform bg-white rounded-full shadow-sm flex justify-center items-center",
|
|
986
|
+
clsx(size === "sm" && "w-4 h-4", size === "md" && "w-5 h-5", size === "lg" && "w-6 h-6", size === "sm" && valueCheck && "translate-x-4", size === "md" && valueCheck && "translate-x-5", size === "lg" && valueCheck && "translate-x-6")
|
|
987
|
+
);
|
|
988
|
+
const classLabel = tailwindMerge.twMerge(clsx(!valueCheck && "bg-default-200", disabled && "bg-default-100 hover:bg-default-100"));
|
|
989
|
+
const classText = tailwindMerge.twMerge("text-gray-500 leading-none", clsx({
|
|
990
|
+
"text-sm": size === "sm" || size === "md",
|
|
991
|
+
"after:content-['*'] after:ml-0.5 after:text-green-500": required,
|
|
992
|
+
"after:text-gray-400 text-gray-400": disabled
|
|
993
|
+
}));
|
|
994
|
+
const classDescription = tailwindMerge.twMerge("text-xs text-gray-500 mt-1", disabled && "text-gray-400");
|
|
995
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tailwindMerge.twMerge(className), children: [
|
|
996
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx("flex gap-2", description && label ? "items-start" : "items-center"), children: [
|
|
997
|
+
positionLabel === "start" && (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { onClick: handleClick, className: "cursor-pointer", children: [
|
|
1150
998
|
label && /* @__PURE__ */ jsxRuntime.jsx("p", { className: classText, children: label }),
|
|
1151
999
|
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: classDescription, children: description })
|
|
1152
|
-
] })
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
$2[68] = disabled;
|
|
1200
|
-
$2[69] = handleChange;
|
|
1201
|
-
$2[70] = props2;
|
|
1202
|
-
$2[71] = resolvedId;
|
|
1203
|
-
$2[72] = t18;
|
|
1204
|
-
$2[73] = valueCheck;
|
|
1205
|
-
$2[74] = t19;
|
|
1206
|
-
} else {
|
|
1207
|
-
t19 = $2[74];
|
|
1208
|
-
}
|
|
1209
|
-
let t20;
|
|
1210
|
-
if ($2[75] !== leftIcon || $2[76] !== mounted || $2[77] !== valueCheck) {
|
|
1211
|
-
t20 = leftIcon && /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { initial: {
|
|
1212
|
-
scale: valueCheck ? 1 : 0,
|
|
1213
|
-
opacity: valueCheck ? 1 : 0
|
|
1214
|
-
}, animate: {
|
|
1215
|
-
scale: valueCheck ? 1 : 0,
|
|
1216
|
-
opacity: valueCheck ? 1 : 0
|
|
1217
|
-
}, transition: mounted ? {
|
|
1218
|
-
type: "spring",
|
|
1219
|
-
bounce: 0
|
|
1220
|
-
} : {
|
|
1221
|
-
duration: 0
|
|
1222
|
-
}, className: "absolute left-1 top-1/2 -translate-y-1/2 text-neutral-400", children: leftIcon });
|
|
1223
|
-
$2[75] = leftIcon;
|
|
1224
|
-
$2[76] = mounted;
|
|
1225
|
-
$2[77] = valueCheck;
|
|
1226
|
-
$2[78] = t20;
|
|
1227
|
-
} else {
|
|
1228
|
-
t20 = $2[78];
|
|
1229
|
-
}
|
|
1230
|
-
let t21;
|
|
1231
|
-
if ($2[79] !== mounted || $2[80] !== rightIcon || $2[81] !== valueCheck) {
|
|
1232
|
-
t21 = rightIcon && /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { initial: {
|
|
1233
|
-
scale: !valueCheck ? 1 : 0,
|
|
1234
|
-
opacity: !valueCheck ? 1 : 0
|
|
1235
|
-
}, animate: {
|
|
1236
|
-
scale: !valueCheck ? 1 : 0,
|
|
1237
|
-
opacity: !valueCheck ? 1 : 0
|
|
1238
|
-
}, transition: mounted ? {
|
|
1239
|
-
type: "spring",
|
|
1240
|
-
bounce: 0
|
|
1241
|
-
} : {
|
|
1242
|
-
duration: 0
|
|
1243
|
-
}, className: "absolute right-1 top-1/2 -translate-y-1/2 text-neutral-400", children: rightIcon });
|
|
1244
|
-
$2[79] = mounted;
|
|
1245
|
-
$2[80] = rightIcon;
|
|
1246
|
-
$2[81] = valueCheck;
|
|
1247
|
-
$2[82] = t21;
|
|
1248
|
-
} else {
|
|
1249
|
-
t21 = $2[82];
|
|
1250
|
-
}
|
|
1251
|
-
let t22;
|
|
1252
|
-
if ($2[83] !== mounted || $2[84] !== thumbIcon) {
|
|
1253
|
-
t22 = thumbIcon && /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { initial: {
|
|
1254
|
-
scale: 1
|
|
1255
|
-
}, animate: {
|
|
1256
|
-
scale: 1
|
|
1257
|
-
}, transition: mounted ? {
|
|
1258
|
-
duration: 0.15
|
|
1259
|
-
} : {
|
|
1260
|
-
duration: 0
|
|
1261
|
-
}, className: "flex items-center justify-center", children: thumbIcon });
|
|
1262
|
-
$2[83] = mounted;
|
|
1263
|
-
$2[84] = thumbIcon;
|
|
1264
|
-
$2[85] = t22;
|
|
1265
|
-
} else {
|
|
1266
|
-
t22 = $2[85];
|
|
1267
|
-
}
|
|
1268
|
-
let t23;
|
|
1269
|
-
if ($2[86] !== classSpan || $2[87] !== t22) {
|
|
1270
|
-
t23 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: classSpan, children: t22 });
|
|
1271
|
-
$2[86] = classSpan;
|
|
1272
|
-
$2[87] = t22;
|
|
1273
|
-
$2[88] = t23;
|
|
1274
|
-
} else {
|
|
1275
|
-
t23 = $2[88];
|
|
1276
|
-
}
|
|
1277
|
-
let t24;
|
|
1278
|
-
if ($2[89] !== t13 || $2[90] !== t14 || $2[91] !== t19 || $2[92] !== t20 || $2[93] !== t21 || $2[94] !== t23) {
|
|
1279
|
-
t24 = /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: t13, className: t14, children: [
|
|
1280
|
-
t19,
|
|
1281
|
-
t20,
|
|
1282
|
-
t21,
|
|
1283
|
-
t23
|
|
1284
|
-
] });
|
|
1285
|
-
$2[89] = t13;
|
|
1286
|
-
$2[90] = t14;
|
|
1287
|
-
$2[91] = t19;
|
|
1288
|
-
$2[92] = t20;
|
|
1289
|
-
$2[93] = t21;
|
|
1290
|
-
$2[94] = t23;
|
|
1291
|
-
$2[95] = t24;
|
|
1292
|
-
} else {
|
|
1293
|
-
t24 = $2[95];
|
|
1294
|
-
}
|
|
1295
|
-
let t25;
|
|
1296
|
-
if ($2[96] !== classDescription || $2[97] !== classText || $2[98] !== description || $2[99] !== handleClick || $2[100] !== label || $2[101] !== positionLabel) {
|
|
1297
|
-
t25 = positionLabel === "end" && (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { onClick: handleClick, className: "cursor-pointer", children: [
|
|
1298
|
-
label && /* @__PURE__ */ jsxRuntime.jsx("p", { className: classText, children: label }),
|
|
1299
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: classDescription, children: description })
|
|
1300
|
-
] });
|
|
1301
|
-
$2[96] = classDescription;
|
|
1302
|
-
$2[97] = classText;
|
|
1303
|
-
$2[98] = description;
|
|
1304
|
-
$2[99] = handleClick;
|
|
1305
|
-
$2[100] = label;
|
|
1306
|
-
$2[101] = positionLabel;
|
|
1307
|
-
$2[102] = t25;
|
|
1308
|
-
} else {
|
|
1309
|
-
t25 = $2[102];
|
|
1310
|
-
}
|
|
1311
|
-
let t26;
|
|
1312
|
-
if ($2[103] !== t15 || $2[104] !== t16 || $2[105] !== t24 || $2[106] !== t25) {
|
|
1313
|
-
t26 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t15, children: [
|
|
1314
|
-
t16,
|
|
1315
|
-
t24,
|
|
1316
|
-
t25
|
|
1317
|
-
] });
|
|
1318
|
-
$2[103] = t15;
|
|
1319
|
-
$2[104] = t16;
|
|
1320
|
-
$2[105] = t24;
|
|
1321
|
-
$2[106] = t25;
|
|
1322
|
-
$2[107] = t26;
|
|
1323
|
-
} else {
|
|
1324
|
-
t26 = $2[107];
|
|
1325
|
-
}
|
|
1326
|
-
let t27;
|
|
1327
|
-
if ($2[108] !== disabled || $2[109] !== error || $2[110] !== touched) {
|
|
1328
|
-
t27 = !disabled && error && touched && /* @__PURE__ */ jsxRuntime.jsx(labelError.LabelError, { text: error });
|
|
1329
|
-
$2[108] = disabled;
|
|
1330
|
-
$2[109] = error;
|
|
1331
|
-
$2[110] = touched;
|
|
1332
|
-
$2[111] = t27;
|
|
1333
|
-
} else {
|
|
1334
|
-
t27 = $2[111];
|
|
1335
|
-
}
|
|
1336
|
-
let t28;
|
|
1337
|
-
if ($2[112] !== t17 || $2[113] !== t26 || $2[114] !== t27) {
|
|
1338
|
-
t28 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t17, children: [
|
|
1339
|
-
t26,
|
|
1340
|
-
t27
|
|
1341
|
-
] });
|
|
1342
|
-
$2[112] = t17;
|
|
1343
|
-
$2[113] = t26;
|
|
1344
|
-
$2[114] = t27;
|
|
1345
|
-
$2[115] = t28;
|
|
1346
|
-
} else {
|
|
1347
|
-
t28 = $2[115];
|
|
1348
|
-
}
|
|
1349
|
-
return t28;
|
|
1000
|
+
] }),
|
|
1001
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: resolvedId, className: utils.cn(SwitchClassProps({
|
|
1002
|
+
size,
|
|
1003
|
+
color
|
|
1004
|
+
}), classLabel), children: [
|
|
1005
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "checkbox", id: resolvedId, className: "sr-only peer", onChange: handleChange, disabled, checked: valueCheck, "data-state": valueCheck ? "checked" : "unchecked", ...props2 }),
|
|
1006
|
+
leftIcon && /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { initial: {
|
|
1007
|
+
scale: valueCheck ? 1 : 0,
|
|
1008
|
+
opacity: valueCheck ? 1 : 0
|
|
1009
|
+
}, animate: {
|
|
1010
|
+
scale: valueCheck ? 1 : 0,
|
|
1011
|
+
opacity: valueCheck ? 1 : 0
|
|
1012
|
+
}, transition: isMounted.current ? {
|
|
1013
|
+
type: "spring",
|
|
1014
|
+
bounce: 0
|
|
1015
|
+
} : {
|
|
1016
|
+
duration: 0
|
|
1017
|
+
}, className: "absolute left-1 top-1/2 -translate-y-1/2 text-neutral-400", children: leftIcon }),
|
|
1018
|
+
rightIcon && /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { initial: {
|
|
1019
|
+
scale: !valueCheck ? 1 : 0,
|
|
1020
|
+
opacity: !valueCheck ? 1 : 0
|
|
1021
|
+
}, animate: {
|
|
1022
|
+
scale: !valueCheck ? 1 : 0,
|
|
1023
|
+
opacity: !valueCheck ? 1 : 0
|
|
1024
|
+
}, transition: isMounted.current ? {
|
|
1025
|
+
type: "spring",
|
|
1026
|
+
bounce: 0
|
|
1027
|
+
} : {
|
|
1028
|
+
duration: 0
|
|
1029
|
+
}, className: "absolute right-1 top-1/2 -translate-y-1/2 text-neutral-400", children: rightIcon }),
|
|
1030
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: classSpan, children: thumbIcon && /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { initial: {
|
|
1031
|
+
scale: 1
|
|
1032
|
+
}, animate: {
|
|
1033
|
+
scale: 1
|
|
1034
|
+
}, transition: isMounted.current ? {
|
|
1035
|
+
duration: 0.15
|
|
1036
|
+
} : {
|
|
1037
|
+
duration: 0
|
|
1038
|
+
}, className: "flex items-center justify-center", children: thumbIcon }) })
|
|
1039
|
+
] }),
|
|
1040
|
+
positionLabel === "end" && (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { onClick: handleClick, className: "cursor-pointer", children: [
|
|
1041
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("p", { className: classText, children: label }),
|
|
1042
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: classDescription, children: description })
|
|
1043
|
+
] })
|
|
1044
|
+
] }),
|
|
1045
|
+
!disabled && error && touched && /* @__PURE__ */ jsxRuntime.jsx(labelError.LabelError, { text: error })
|
|
1046
|
+
] });
|
|
1350
1047
|
};
|
|
1351
1048
|
Switch.displayName = "Switch";
|
|
1352
1049
|
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
@@ -6124,4 +5821,4 @@ exports.useControllableState = useControllableState;
|
|
|
6124
5821
|
exports.useFocusGuards = useFocusGuards;
|
|
6125
5822
|
exports.useId = useId$1;
|
|
6126
5823
|
exports.useLayoutEffect2 = useLayoutEffect2;
|
|
6127
|
-
//# sourceMappingURL=textarea-
|
|
5824
|
+
//# sourceMappingURL=textarea-DyGA1ivF.js.map
|