@ttoss/ui 6.0.1 → 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.
Files changed (2) hide show
  1. package/dist/esm/index.js +10 -5
  2. package/package.json +5 -5
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.useImperativeHandle(ref, () => {
241
- return innerRef.current;
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: innerRef,
256
+ ref: setRefs,
252
257
  ...rest
253
258
  });
254
259
  }
255
260
  return /* @__PURE__ */React4.createElement(CheckBoxUi, {
256
- ref: innerRef,
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.1",
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",
@@ -29,12 +29,12 @@
29
29
  "react-select": "^5.10.2",
30
30
  "react-tooltip": "^5.30.0",
31
31
  "theme-ui": "^0.17.2",
32
- "@ttoss/theme": "^2.7.1"
32
+ "@ttoss/theme": "^2.7.2"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@emotion/react": "^11",
36
36
  "react": ">=16.8.0",
37
- "@ttoss/react-icons": "^0.5.4"
37
+ "@ttoss/react-icons": "^0.5.5"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@emotion/react": "^11.14.0",
@@ -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/react-icons": "^0.5.4",
49
- "@ttoss/test-utils": "^4.0.0"
49
+ "@ttoss/test-utils": "^4.0.1"
50
50
  },
51
51
  "keywords": [
52
52
  "React",