@yamada-ui/checkbox 0.2.7 → 0.2.9

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.
@@ -64,12 +64,10 @@ var useCheckboxGroup = ({
64
64
  );
65
65
  return { value, setValue, onChange, getCheckboxProps };
66
66
  };
67
- var [CheckboxGroupProvider, useCheckboxGroupContext] = (0, import_utils.createContext)(
68
- {
69
- strict: false,
70
- name: "CheckboxGroupContext"
71
- }
72
- );
67
+ var [CheckboxGroupProvider, useCheckboxGroupContext] = (0, import_utils.createContext)({
68
+ strict: false,
69
+ name: "CheckboxGroupContext"
70
+ });
73
71
  var CheckboxGroup = (0, import_react.forwardRef)(
74
72
  ({
75
73
  className,
@@ -2,7 +2,7 @@ import {
2
2
  CheckboxGroup,
3
3
  useCheckboxGroup,
4
4
  useCheckboxGroupContext
5
- } from "./chunk-VWDV5UM7.mjs";
5
+ } from "./chunk-64UAKYE3.mjs";
6
6
  export {
7
7
  CheckboxGroup,
8
8
  useCheckboxGroup,
package/dist/checkbox.js CHANGED
@@ -72,12 +72,10 @@ var useCheckboxGroup = ({
72
72
  );
73
73
  return { value, setValue, onChange, getCheckboxProps };
74
74
  };
75
- var [CheckboxGroupProvider, useCheckboxGroupContext] = (0, import_utils.createContext)(
76
- {
77
- strict: false,
78
- name: "CheckboxGroupContext"
79
- }
80
- );
75
+ var [CheckboxGroupProvider, useCheckboxGroupContext] = (0, import_utils.createContext)({
76
+ strict: false,
77
+ name: "CheckboxGroupContext"
78
+ });
81
79
  var CheckboxGroup = (0, import_react.forwardRef)(
82
80
  ({
83
81
  className,
@@ -250,7 +248,15 @@ var useCheckbox = (props) => {
250
248
  onMouseEnter: (0, import_utils2.handlerAll)(props2.onMouseEnter, () => setHovered(true)),
251
249
  onMouseLeave: (0, import_utils2.handlerAll)(props2.onMouseLeave, () => setHovered(false))
252
250
  }),
253
- [isActive, checked, isFocused, isHovered, isFocusVisible, isIndeterminate, rest]
251
+ [
252
+ isActive,
253
+ checked,
254
+ isFocused,
255
+ isHovered,
256
+ isFocusVisible,
257
+ isIndeterminate,
258
+ rest
259
+ ]
254
260
  );
255
261
  const getInputProps = (0, import_react2.useCallback)(
256
262
  (props2 = {}, ref = null) => ({
@@ -410,7 +416,13 @@ var Checkbox = (0, import_react2.forwardRef)(
410
416
  "tabIndex"
411
417
  ]),
412
418
  children: [
413
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core.ui.input, { className: "ui-checkbox-input", ...getInputProps(inputProps, ref) }),
419
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
420
+ import_core.ui.input,
421
+ {
422
+ className: "ui-checkbox-input",
423
+ ...getInputProps(inputProps, ref)
424
+ }
425
+ ),
414
426
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
415
427
  import_core.ui.span,
416
428
  {
@@ -422,7 +434,9 @@ var Checkbox = (0, import_react2.forwardRef)(
422
434
  userSelect: "none",
423
435
  ...styles.icon
424
436
  },
425
- ...getIconProps((0, import_utils2.omitObject)(iconProps != null ? iconProps : { children: void 0 }, ["children"])),
437
+ ...getIconProps(
438
+ (0, import_utils2.omitObject)(iconProps != null ? iconProps : { children: void 0 }, ["children"])
439
+ ),
426
440
  children: cloneIcon
427
441
  }
428
442
  ),
@@ -441,8 +455,17 @@ var Checkbox = (0, import_react2.forwardRef)(
441
455
  }
442
456
  );
443
457
  Checkbox.displayName = "Checkbox";
444
- var CheckboxIcon = ({ isIndeterminate, isChecked, ...rest }) => {
445
- const iconProps = (0, import_utils2.omitObject)(rest, ["isRequired", "isReadOnly", "isDisabled", "isInvalid"]);
458
+ var CheckboxIcon = ({
459
+ isIndeterminate,
460
+ isChecked,
461
+ ...rest
462
+ }) => {
463
+ const iconProps = (0, import_utils2.omitObject)(rest, [
464
+ "isRequired",
465
+ "isReadOnly",
466
+ "isDisabled",
467
+ "isInvalid"
468
+ ]);
446
469
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_motion.AnimatePresence, { initial: false, children: isIndeterminate || isChecked ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
447
470
  import_core.ui.div,
448
471
  {
package/dist/checkbox.mjs CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  Checkbox,
3
3
  CheckboxIcon,
4
4
  useCheckbox
5
- } from "./chunk-WVRSPWMY.mjs";
6
- import "./chunk-VWDV5UM7.mjs";
5
+ } from "./chunk-QF3OEAIT.mjs";
6
+ import "./chunk-64UAKYE3.mjs";
7
7
  export {
8
8
  Checkbox,
9
9
  CheckboxIcon,
@@ -44,12 +44,10 @@ var useCheckboxGroup = ({
44
44
  );
45
45
  return { value, setValue, onChange, getCheckboxProps };
46
46
  };
47
- var [CheckboxGroupProvider, useCheckboxGroupContext] = createContext(
48
- {
49
- strict: false,
50
- name: "CheckboxGroupContext"
51
- }
52
- );
47
+ var [CheckboxGroupProvider, useCheckboxGroupContext] = createContext({
48
+ strict: false,
49
+ name: "CheckboxGroupContext"
50
+ });
53
51
  var CheckboxGroup = forwardRef(
54
52
  ({
55
53
  className,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCheckboxGroupContext
3
- } from "./chunk-VWDV5UM7.mjs";
3
+ } from "./chunk-64UAKYE3.mjs";
4
4
 
5
5
  // src/checkbox.tsx
6
6
  import {
@@ -153,7 +153,15 @@ var useCheckbox = (props) => {
153
153
  onMouseEnter: handlerAll(props2.onMouseEnter, () => setHovered(true)),
154
154
  onMouseLeave: handlerAll(props2.onMouseLeave, () => setHovered(false))
155
155
  }),
156
- [isActive, checked, isFocused, isHovered, isFocusVisible, isIndeterminate, rest]
156
+ [
157
+ isActive,
158
+ checked,
159
+ isFocused,
160
+ isHovered,
161
+ isFocusVisible,
162
+ isIndeterminate,
163
+ rest
164
+ ]
157
165
  );
158
166
  const getInputProps = useCallback(
159
167
  (props2 = {}, ref = null) => ({
@@ -313,7 +321,13 @@ var Checkbox = forwardRef(
313
321
  "tabIndex"
314
322
  ]),
315
323
  children: [
316
- /* @__PURE__ */ jsx(ui.input, { className: "ui-checkbox-input", ...getInputProps(inputProps, ref) }),
324
+ /* @__PURE__ */ jsx(
325
+ ui.input,
326
+ {
327
+ className: "ui-checkbox-input",
328
+ ...getInputProps(inputProps, ref)
329
+ }
330
+ ),
317
331
  /* @__PURE__ */ jsx(
318
332
  ui.span,
319
333
  {
@@ -325,7 +339,9 @@ var Checkbox = forwardRef(
325
339
  userSelect: "none",
326
340
  ...styles.icon
327
341
  },
328
- ...getIconProps(omitObject(iconProps != null ? iconProps : { children: void 0 }, ["children"])),
342
+ ...getIconProps(
343
+ omitObject(iconProps != null ? iconProps : { children: void 0 }, ["children"])
344
+ ),
329
345
  children: cloneIcon
330
346
  }
331
347
  ),
@@ -344,8 +360,17 @@ var Checkbox = forwardRef(
344
360
  }
345
361
  );
346
362
  Checkbox.displayName = "Checkbox";
347
- var CheckboxIcon = ({ isIndeterminate, isChecked, ...rest }) => {
348
- const iconProps = omitObject(rest, ["isRequired", "isReadOnly", "isDisabled", "isInvalid"]);
363
+ var CheckboxIcon = ({
364
+ isIndeterminate,
365
+ isChecked,
366
+ ...rest
367
+ }) => {
368
+ const iconProps = omitObject(rest, [
369
+ "isRequired",
370
+ "isReadOnly",
371
+ "isDisabled",
372
+ "isInvalid"
373
+ ]);
349
374
  return /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: isIndeterminate || isChecked ? /* @__PURE__ */ jsx(
350
375
  ui.div,
351
376
  {
package/dist/index.js CHANGED
@@ -76,12 +76,10 @@ var useCheckboxGroup = ({
76
76
  );
77
77
  return { value, setValue, onChange, getCheckboxProps };
78
78
  };
79
- var [CheckboxGroupProvider, useCheckboxGroupContext] = (0, import_utils.createContext)(
80
- {
81
- strict: false,
82
- name: "CheckboxGroupContext"
83
- }
84
- );
79
+ var [CheckboxGroupProvider, useCheckboxGroupContext] = (0, import_utils.createContext)({
80
+ strict: false,
81
+ name: "CheckboxGroupContext"
82
+ });
85
83
  var CheckboxGroup = (0, import_react.forwardRef)(
86
84
  ({
87
85
  className,
@@ -254,7 +252,15 @@ var useCheckbox = (props) => {
254
252
  onMouseEnter: (0, import_utils2.handlerAll)(props2.onMouseEnter, () => setHovered(true)),
255
253
  onMouseLeave: (0, import_utils2.handlerAll)(props2.onMouseLeave, () => setHovered(false))
256
254
  }),
257
- [isActive, checked, isFocused, isHovered, isFocusVisible, isIndeterminate, rest]
255
+ [
256
+ isActive,
257
+ checked,
258
+ isFocused,
259
+ isHovered,
260
+ isFocusVisible,
261
+ isIndeterminate,
262
+ rest
263
+ ]
258
264
  );
259
265
  const getInputProps = (0, import_react2.useCallback)(
260
266
  (props2 = {}, ref = null) => ({
@@ -414,7 +420,13 @@ var Checkbox = (0, import_react2.forwardRef)(
414
420
  "tabIndex"
415
421
  ]),
416
422
  children: [
417
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core.ui.input, { className: "ui-checkbox-input", ...getInputProps(inputProps, ref) }),
423
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
424
+ import_core.ui.input,
425
+ {
426
+ className: "ui-checkbox-input",
427
+ ...getInputProps(inputProps, ref)
428
+ }
429
+ ),
418
430
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
419
431
  import_core.ui.span,
420
432
  {
@@ -426,7 +438,9 @@ var Checkbox = (0, import_react2.forwardRef)(
426
438
  userSelect: "none",
427
439
  ...styles.icon
428
440
  },
429
- ...getIconProps((0, import_utils2.omitObject)(iconProps != null ? iconProps : { children: void 0 }, ["children"])),
441
+ ...getIconProps(
442
+ (0, import_utils2.omitObject)(iconProps != null ? iconProps : { children: void 0 }, ["children"])
443
+ ),
430
444
  children: cloneIcon
431
445
  }
432
446
  ),
@@ -445,8 +459,17 @@ var Checkbox = (0, import_react2.forwardRef)(
445
459
  }
446
460
  );
447
461
  Checkbox.displayName = "Checkbox";
448
- var CheckboxIcon = ({ isIndeterminate, isChecked, ...rest }) => {
449
- const iconProps = (0, import_utils2.omitObject)(rest, ["isRequired", "isReadOnly", "isDisabled", "isInvalid"]);
462
+ var CheckboxIcon = ({
463
+ isIndeterminate,
464
+ isChecked,
465
+ ...rest
466
+ }) => {
467
+ const iconProps = (0, import_utils2.omitObject)(rest, [
468
+ "isRequired",
469
+ "isReadOnly",
470
+ "isDisabled",
471
+ "isInvalid"
472
+ ]);
450
473
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_motion.AnimatePresence, { initial: false, children: isIndeterminate || isChecked ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
451
474
  import_core.ui.div,
452
475
  {
package/dist/index.mjs CHANGED
@@ -2,11 +2,11 @@ import {
2
2
  Checkbox,
3
3
  CheckboxIcon,
4
4
  useCheckbox
5
- } from "./chunk-WVRSPWMY.mjs";
5
+ } from "./chunk-QF3OEAIT.mjs";
6
6
  import {
7
7
  CheckboxGroup,
8
8
  useCheckboxGroup
9
- } from "./chunk-VWDV5UM7.mjs";
9
+ } from "./chunk-64UAKYE3.mjs";
10
10
  export {
11
11
  Checkbox,
12
12
  CheckboxGroup,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/checkbox",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "Yamada UI checkbox component",
5
5
  "keywords": [
6
6
  "yamada",
@@ -35,13 +35,13 @@
35
35
  "url": "https://github.com/hirotomoyamada/yamada-ui/issues"
36
36
  },
37
37
  "dependencies": {
38
- "@yamada-ui/core": "0.5.1",
39
- "@yamada-ui/utils": "0.1.3",
40
- "@yamada-ui/layouts": "0.2.6",
41
- "@yamada-ui/form-control": "0.2.6",
42
- "@yamada-ui/motion": "0.3.4",
43
- "@yamada-ui/use-focus-visible": "0.1.3",
44
- "@yamada-ui/use-controllable-state": "0.1.4"
38
+ "@yamada-ui/core": "0.5.3",
39
+ "@yamada-ui/utils": "0.1.4",
40
+ "@yamada-ui/layouts": "0.2.8",
41
+ "@yamada-ui/form-control": "0.2.8",
42
+ "@yamada-ui/motion": "0.3.6",
43
+ "@yamada-ui/use-focus-visible": "0.1.4",
44
+ "@yamada-ui/use-controllable-state": "0.1.5"
45
45
  },
46
46
  "devDependencies": {
47
47
  "react": "^18.0.0",