@ttoss/ui 6.0.2 → 6.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/esm/index.js +10 -5
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -237,9 +237,14 @@ var Checkbox = /* @__PURE__ */React4.forwardRef(({
|
|
|
237
237
|
...rest
|
|
238
238
|
}, ref) => {
|
|
239
239
|
const innerRef = React4.useRef(null);
|
|
240
|
-
React4.
|
|
241
|
-
|
|
242
|
-
|
|
240
|
+
const setRefs = React4.useCallback(element => {
|
|
241
|
+
innerRef.current = element;
|
|
242
|
+
if (typeof ref === "function") {
|
|
243
|
+
ref(element);
|
|
244
|
+
} else if (ref) {
|
|
245
|
+
ref.current = element;
|
|
246
|
+
}
|
|
247
|
+
}, [ref]);
|
|
243
248
|
React4.useEffect(() => {
|
|
244
249
|
if (innerRef.current) {
|
|
245
250
|
innerRef.current.indeterminate = indeterminate;
|
|
@@ -248,12 +253,12 @@ var Checkbox = /* @__PURE__ */React4.forwardRef(({
|
|
|
248
253
|
if (indeterminate) {
|
|
249
254
|
return /* @__PURE__ */React4.createElement("input", {
|
|
250
255
|
type: "checkbox",
|
|
251
|
-
ref:
|
|
256
|
+
ref: setRefs,
|
|
252
257
|
...rest
|
|
253
258
|
});
|
|
254
259
|
}
|
|
255
260
|
return /* @__PURE__ */React4.createElement(CheckBoxUi, {
|
|
256
|
-
ref:
|
|
261
|
+
ref: setRefs,
|
|
257
262
|
...rest
|
|
258
263
|
});
|
|
259
264
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"jest": "^30.2.0",
|
|
45
45
|
"react": "^19.2.0",
|
|
46
46
|
"tsup": "^8.5.1",
|
|
47
|
+
"@ttoss/react-icons": "^0.5.5",
|
|
47
48
|
"@ttoss/config": "^1.35.12",
|
|
48
|
-
"@ttoss/test-utils": "^4.0.1"
|
|
49
|
-
"@ttoss/react-icons": "^0.5.5"
|
|
49
|
+
"@ttoss/test-utils": "^4.0.1"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"React",
|