@khyxer/fastyui 1.0.2 → 1.0.3
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.js +2 -1
- package/dist/index.es.js +3 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1240,6 +1240,7 @@ function Checkbox({ checked: controlledChecked, defaultChecked = false, onChange
|
|
|
1240
1240
|
const checkboxRef = (0, react.useRef)(null);
|
|
1241
1241
|
const checkmarkRef = (0, react.useRef)(null);
|
|
1242
1242
|
const pathRef = (0, react.useRef)(null);
|
|
1243
|
+
const reactId = (0, react.useId)();
|
|
1243
1244
|
const handleChange = () => {
|
|
1244
1245
|
if (disabled) return;
|
|
1245
1246
|
const newChecked = !checked;
|
|
@@ -1292,7 +1293,7 @@ function Checkbox({ checked: controlledChecked, defaultChecked = false, onChange
|
|
|
1292
1293
|
});
|
|
1293
1294
|
}
|
|
1294
1295
|
}, [checked]);
|
|
1295
|
-
const checkboxId = id || `checkbox-${
|
|
1296
|
+
const checkboxId = id || `checkbox-${reactId}`;
|
|
1296
1297
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1297
1298
|
className: `${Checkbox_module_default.checkboxWrapper} ${disabled ? Checkbox_module_default.disabled : ""} ${className || ""}`,
|
|
1298
1299
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useRef, useState } from "react";
|
|
1
|
+
import { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useId, useRef, useState } from "react";
|
|
2
2
|
import gsap$1, { gsap } from "gsap";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
var Button_module_default = {
|
|
@@ -1215,6 +1215,7 @@ function Checkbox({ checked: controlledChecked, defaultChecked = false, onChange
|
|
|
1215
1215
|
const checkboxRef = useRef(null);
|
|
1216
1216
|
const checkmarkRef = useRef(null);
|
|
1217
1217
|
const pathRef = useRef(null);
|
|
1218
|
+
const reactId = useId();
|
|
1218
1219
|
const handleChange = () => {
|
|
1219
1220
|
if (disabled) return;
|
|
1220
1221
|
const newChecked = !checked;
|
|
@@ -1267,7 +1268,7 @@ function Checkbox({ checked: controlledChecked, defaultChecked = false, onChange
|
|
|
1267
1268
|
});
|
|
1268
1269
|
}
|
|
1269
1270
|
}, [checked]);
|
|
1270
|
-
const checkboxId = id || `checkbox-${
|
|
1271
|
+
const checkboxId = id || `checkbox-${reactId}`;
|
|
1271
1272
|
return /* @__PURE__ */ jsxs("div", {
|
|
1272
1273
|
className: `${Checkbox_module_default.checkboxWrapper} ${disabled ? Checkbox_module_default.disabled : ""} ${className || ""}`,
|
|
1273
1274
|
children: [/* @__PURE__ */ jsx("input", {
|