@yamada-ui/react 2.3.4-dev-20261116075346 → 2.3.4-dev-20261116083009

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 (55) hide show
  1. package/dist/cjs/components/checkbox/use-checkbox-group.cjs +6 -15
  2. package/dist/cjs/components/checkbox/use-checkbox-group.cjs.map +1 -1
  3. package/dist/cjs/components/checkbox/use-checkbox.cjs +7 -16
  4. package/dist/cjs/components/checkbox/use-checkbox.cjs.map +1 -1
  5. package/dist/esm/components/checkbox/use-checkbox-group.js +6 -15
  6. package/dist/esm/components/checkbox/use-checkbox-group.js.map +1 -1
  7. package/dist/esm/components/checkbox/use-checkbox.js +7 -16
  8. package/dist/esm/components/checkbox/use-checkbox.js.map +1 -1
  9. package/dist/types/components/accordion/accordion.style.d.ts +1 -1
  10. package/dist/types/components/alert/alert.style.d.ts +1 -1
  11. package/dist/types/components/autocomplete/autocomplete.style.d.ts +1 -1
  12. package/dist/types/components/avatar/avatar.d.ts +1 -1
  13. package/dist/types/components/breadcrumb/breadcrumb.style.d.ts +1 -1
  14. package/dist/types/components/bubble/bubble.style.d.ts +1 -1
  15. package/dist/types/components/calendar/calendar.style.d.ts +2 -2
  16. package/dist/types/components/carousel/carousel.style.d.ts +2 -2
  17. package/dist/types/components/checkbox/checkbox.d.ts +1 -1
  18. package/dist/types/components/checkbox-card/checkbox-card.d.ts +3 -3
  19. package/dist/types/components/checkbox-card/checkbox-card.style.d.ts +1 -1
  20. package/dist/types/components/color-picker/color-picker.style.d.ts +1 -1
  21. package/dist/types/components/color-selector/color-selector.style.d.ts +2 -2
  22. package/dist/types/components/data-list/data-list.style.d.ts +1 -1
  23. package/dist/types/components/date-picker/date-picker.style.d.ts +1 -1
  24. package/dist/types/components/dropzone/dropzone.d.ts +1 -1
  25. package/dist/types/components/dropzone/dropzone.style.d.ts +1 -1
  26. package/dist/types/components/empty-state/empty-state.style.d.ts +2 -2
  27. package/dist/types/components/flip/flip.d.ts +1 -1
  28. package/dist/types/components/flip/flip.style.d.ts +1 -1
  29. package/dist/types/components/form/form.style.d.ts +1 -1
  30. package/dist/types/components/icon/icon.d.ts +1 -1
  31. package/dist/types/components/list/list.style.d.ts +2 -2
  32. package/dist/types/components/loading/loading.d.ts +1 -1
  33. package/dist/types/components/marquee/marquee.style.d.ts +1 -1
  34. package/dist/types/components/native-accordion/native-accordion.style.d.ts +2 -2
  35. package/dist/types/components/native-select/native-select.style.d.ts +1 -1
  36. package/dist/types/components/notice/notice.style.d.ts +1 -1
  37. package/dist/types/components/number-input/number-input.style.d.ts +1 -1
  38. package/dist/types/components/pagination/pagination.style.d.ts +1 -1
  39. package/dist/types/components/password-input/password-input.style.d.ts +1 -1
  40. package/dist/types/components/pin-input/pin-input.style.d.ts +1 -1
  41. package/dist/types/components/radio/radio.d.ts +1 -1
  42. package/dist/types/components/radio-card/radio-card.d.ts +3 -3
  43. package/dist/types/components/radio-card/radio-card.style.d.ts +1 -1
  44. package/dist/types/components/rating/rating.style.d.ts +2 -2
  45. package/dist/types/components/reorder/reorder.style.d.ts +1 -1
  46. package/dist/types/components/resizable/resizable.style.d.ts +2 -2
  47. package/dist/types/components/segmented-control/segmented-control.style.d.ts +2 -2
  48. package/dist/types/components/select/select.style.d.ts +1 -1
  49. package/dist/types/components/steps/steps.style.d.ts +1 -1
  50. package/dist/types/components/tag/tag.style.d.ts +1 -1
  51. package/dist/types/components/timeline/timeline.d.ts +1 -1
  52. package/dist/types/components/timeline/timeline.style.d.ts +1 -1
  53. package/dist/types/components/toggle/toggle.d.ts +1 -1
  54. package/dist/types/components/tree/tree.style.d.ts +1 -1
  55. package/package.json +1 -1
@@ -45,12 +45,10 @@ const useCheckboxGroup = (props = {}) => {
45
45
  return {
46
46
  max,
47
47
  value,
48
- getInputProps: (0, react.useCallback)((props = {}) => {
48
+ getInputProps: (0, react.useCallback)(({ disabled, ...props } = {}) => {
49
49
  const checked = !(0, require_utils_index.utils_exports.isUndefined)(value) && ((0, require_utils_index.utils_exports.isString)(props.value) || (0, require_utils_index.utils_exports.isNumber)(props.value)) && value.includes(props.value);
50
50
  const trulyDisabled = !checked && (0, require_utils_index.utils_exports.isNumber)(max) && value.length >= max;
51
- return {
52
- ...dataProps,
53
- ...ariaProps,
51
+ return require_props.mergeProps(dataProps, ariaProps, {
54
52
  type: "checkbox",
55
53
  style: require_dom.visuallyHiddenAttributes.style,
56
54
  "aria-checked": checked,
@@ -58,14 +56,10 @@ const useCheckboxGroup = (props = {}) => {
58
56
  "data-checked": (0, require_utils_index.utils_exports.dataAttr)(checked),
59
57
  "data-disabled": (0, require_utils_index.utils_exports.dataAttr)(trulyDisabled),
60
58
  checked,
59
+ disabled: Boolean(disabled || trulyDisabled),
61
60
  readOnly,
62
- required,
63
- ...props,
64
- disabled: Boolean(props.disabled || trulyDisabled),
65
- onBlur: (0, require_utils_index.utils_exports.handlerAll)(props.onBlur, eventProps.onBlur),
66
- onChange: (0, require_utils_index.utils_exports.handlerAll)(props.onChange, onChange),
67
- onFocus: (0, require_utils_index.utils_exports.handlerAll)(props.onFocus, eventProps.onFocus)
68
- };
61
+ required
62
+ }, props, eventProps, { onChange })();
69
63
  }, [
70
64
  ariaProps,
71
65
  dataProps,
@@ -76,10 +70,7 @@ const useCheckboxGroup = (props = {}) => {
76
70
  required,
77
71
  value
78
72
  ]),
79
- getLabelProps: (0, react.useCallback)((props) => ({
80
- ...dataProps,
81
- ...props
82
- }), [dataProps]),
73
+ getLabelProps: (0, react.useCallback)((props = {}) => require_props.mergeProps(dataProps, props)(), [dataProps]),
83
74
  getRootProps,
84
75
  onChange
85
76
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-checkbox-group.cjs","names":["createContext","useFieldProps","useControllableState","useCallback","mergeProps","visuallyHiddenAttributes"],"sources":["../../../../src/components/checkbox/use-checkbox-group.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport {\n ariaAttr,\n createContext,\n dataAttr,\n handlerAll,\n isNumber,\n isObject,\n isString,\n isUndefined,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\ninterface CheckboxGroupContext extends Omit<\n UseCheckboxGroupReturn,\n \"getRootProps\"\n> {}\n\nconst [CheckboxGroupContext, useCheckboxGroupContext] =\n createContext<CheckboxGroupContext>({\n name: \"CheckboxGroupContext\",\n strict: false,\n })\n\nexport { CheckboxGroupContext, useCheckboxGroupContext }\n\nexport interface UseCheckboxGroupProps<Y extends string = string>\n extends Omit<HTMLProps, \"defaultValue\" | \"onChange\" | \"value\">, FieldProps {\n /**\n * The initial value of the checkbox group.\n *\n * @default []\n */\n defaultValue?: Y[]\n /**\n * The maximum number of checkboxes that can be checked.\n */\n max?: number\n /**\n * The value of the checkbox group.\n */\n value?: Y[]\n /**\n * The callback fired when any children checkbox is checked or unchecked.\n */\n onChange?: (value: Y[]) => void\n}\n\nexport const useCheckboxGroup = <Y extends string = string>(\n props: UseCheckboxGroupProps<Y> = {},\n) => {\n const {\n context: { labelId } = {},\n props: {\n defaultValue = [],\n disabled,\n max,\n readOnly,\n required,\n value: valueProp,\n onChange: onChangeProp,\n ...rest\n },\n ariaProps: { \"aria-describedby\": ariaDescribedby, ...ariaProps },\n dataProps,\n eventProps,\n } = useFieldProps(props)\n const interactive = !(readOnly || disabled)\n const [value, setValue] = useControllableState({\n defaultValue,\n value: valueProp,\n onChange: onChangeProp,\n })\n\n const onChange = useCallback(\n (valueOrEv: ChangeEvent<HTMLInputElement> | Y) => {\n if (!interactive) return\n\n if (isObject(valueOrEv)) valueOrEv = valueOrEv.target.value as Y\n\n setValue((prev) => {\n if (prev.includes(valueOrEv))\n return prev.filter((prevValue) => prevValue !== valueOrEv)\n else if (!isNumber(max) || prev.length < max)\n return [...prev, valueOrEv]\n else return prev\n })\n },\n [interactive, max, setValue],\n )\n\n const getRootProps: PropGetter = useCallback(\n (props = {}) =>\n mergeProps(\n dataProps,\n {\n \"aria-describedby\": ariaDescribedby,\n \"aria-labelledby\": labelId,\n role: \"group\",\n },\n rest,\n props,\n )(),\n [ariaDescribedby, dataProps, labelId, rest],\n )\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) => {\n const checked =\n !isUndefined(value) &&\n (isString(props.value) || isNumber(props.value)) &&\n value.includes(props.value as Y)\n const trulyDisabled = !checked && isNumber(max) && value.length >= max\n\n return {\n ...dataProps,\n ...ariaProps,\n type: \"checkbox\",\n style: visuallyHiddenAttributes.style,\n \"aria-checked\": checked,\n \"aria-disabled\": ariaAttr(trulyDisabled),\n \"data-checked\": dataAttr(checked),\n \"data-disabled\": dataAttr(trulyDisabled),\n checked,\n readOnly,\n required,\n ...props,\n disabled: Boolean(props.disabled || trulyDisabled),\n onBlur: handlerAll(props.onBlur, eventProps.onBlur),\n onChange: handlerAll(props.onChange, onChange),\n onFocus: handlerAll(props.onFocus, eventProps.onFocus),\n }\n },\n [\n ariaProps,\n dataProps,\n eventProps,\n max,\n onChange,\n readOnly,\n required,\n value,\n ],\n )\n\n const getLabelProps: PropGetter<\"label\"> = useCallback(\n (props) => ({\n ...dataProps,\n ...props,\n }),\n [dataProps],\n )\n\n return {\n max,\n value,\n getInputProps,\n getLabelProps,\n getRootProps,\n onChange,\n }\n}\n\nexport type UseCheckboxGroupReturn = ReturnType<typeof useCheckboxGroup>\n"],"mappings":";;;;;;;;;AA0BA,MAAM,CAAC,sBAAsB,2BAC3BA,gBAAAA,cAAoC;CAClC,MAAM;CACN,QAAQ;AACV,CAAC;AA0BH,MAAa,oBACX,QAAkC,CAAC,MAChC;CACH,MAAM,EACJ,SAAS,EAAE,YAAY,CAAC,GACxB,OAAO,EACL,eAAe,CAAC,GAChB,UACA,KACA,UACA,UACA,OAAO,WACP,UAAU,cACV,GAAG,QAEL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AA,yBAAyB;IAChC,gBAAgB;IAChB,kBAAA,GAAA,oBAAA,cAAiB,SAAA,CAAS,aAAa;IACvC,iBAAA,GAAA,oBAAA,cAAgB,SAAA,CAAS,OAAO;IAChC,kBAAA,GAAA,oBAAA,cAAiB,SAAA,CAAS,aAAa;IACvC;IACA;IACA;IACA,GAAG;IACH,UAAU,QAAQ,MAAM,YAAY,aAAa;IACjD,SAAA,GAAA,oBAAA,cAAQ,WAAA,CAAW,MAAM,QAAQ,WAAW,MAAM;IAClD,WAAA,GAAA,oBAAA,cAAU,WAAA,CAAW,MAAM,UAAU,QAAQ;IAC7C,UAAA,GAAA,oBAAA,cAAS,WAAA,CAAW,MAAM,SAAS,WAAW,OAAO;GACvD;EACF,GACA;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAcY;EACZ,gBAAA,GAZyCF,MAAAA,YAAAA,EACxC,WAAW;GACV,GAAG;GACH,GAAG;EACL,IACA,CAAC,SAAS,CAOE;EACZ;EACA;CACF;AACF"}
1
+ {"version":3,"file":"use-checkbox-group.cjs","names":["createContext","useFieldProps","useControllableState","useCallback","mergeProps","visuallyHiddenAttributes"],"sources":["../../../../src/components/checkbox/use-checkbox-group.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport {\n ariaAttr,\n createContext,\n dataAttr,\n isNumber,\n isObject,\n isString,\n isUndefined,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\ninterface CheckboxGroupContext extends Omit<\n UseCheckboxGroupReturn,\n \"getRootProps\"\n> {}\n\nconst [CheckboxGroupContext, useCheckboxGroupContext] =\n createContext<CheckboxGroupContext>({\n name: \"CheckboxGroupContext\",\n strict: false,\n })\n\nexport { CheckboxGroupContext, useCheckboxGroupContext }\n\nexport interface UseCheckboxGroupProps<Y extends string = string>\n extends Omit<HTMLProps, \"defaultValue\" | \"onChange\" | \"value\">, FieldProps {\n /**\n * The initial value of the checkbox group.\n *\n * @default []\n */\n defaultValue?: Y[]\n /**\n * The maximum number of checkboxes that can be checked.\n */\n max?: number\n /**\n * The value of the checkbox group.\n */\n value?: Y[]\n /**\n * The callback fired when any children checkbox is checked or unchecked.\n */\n onChange?: (value: Y[]) => void\n}\n\nexport const useCheckboxGroup = <Y extends string = string>(\n props: UseCheckboxGroupProps<Y> = {},\n) => {\n const {\n context: { labelId } = {},\n props: {\n defaultValue = [],\n disabled,\n max,\n readOnly,\n required,\n value: valueProp,\n onChange: onChangeProp,\n ...rest\n },\n ariaProps: { \"aria-describedby\": ariaDescribedby, ...ariaProps },\n dataProps,\n eventProps,\n } = useFieldProps(props)\n const interactive = !(readOnly || disabled)\n const [value, setValue] = useControllableState({\n defaultValue,\n value: valueProp,\n onChange: onChangeProp,\n })\n\n const onChange = useCallback(\n (valueOrEv: ChangeEvent<HTMLInputElement> | Y) => {\n if (!interactive) return\n\n if (isObject(valueOrEv)) valueOrEv = valueOrEv.target.value as Y\n\n setValue((prev) => {\n if (prev.includes(valueOrEv))\n return prev.filter((prevValue) => prevValue !== valueOrEv)\n else if (!isNumber(max) || prev.length < max)\n return [...prev, valueOrEv]\n else return prev\n })\n },\n [interactive, max, setValue],\n )\n\n const getRootProps: PropGetter = useCallback(\n (props = {}) =>\n mergeProps(\n dataProps,\n {\n \"aria-describedby\": ariaDescribedby,\n \"aria-labelledby\": labelId,\n role: \"group\",\n },\n rest,\n props,\n )(),\n [ariaDescribedby, dataProps, labelId, rest],\n )\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n ({ disabled, ...props } = {}) => {\n const checked =\n !isUndefined(value) &&\n (isString(props.value) || isNumber(props.value)) &&\n value.includes(props.value as Y)\n const trulyDisabled = !checked && isNumber(max) && value.length >= max\n\n return mergeProps(\n dataProps,\n ariaProps,\n {\n type: \"checkbox\",\n style: visuallyHiddenAttributes.style,\n \"aria-checked\": checked,\n \"aria-disabled\": ariaAttr(trulyDisabled),\n \"data-checked\": dataAttr(checked),\n \"data-disabled\": dataAttr(trulyDisabled),\n checked,\n disabled: Boolean(disabled || trulyDisabled),\n readOnly,\n required,\n },\n props,\n eventProps,\n { onChange },\n )()\n },\n [\n ariaProps,\n dataProps,\n eventProps,\n max,\n onChange,\n readOnly,\n required,\n value,\n ],\n )\n\n const getLabelProps: PropGetter<\"label\"> = useCallback(\n (props = {}) => mergeProps(dataProps, props)(),\n [dataProps],\n )\n\n return {\n max,\n value,\n getInputProps,\n getLabelProps,\n getRootProps,\n onChange,\n }\n}\n\nexport type UseCheckboxGroupReturn = ReturnType<typeof useCheckboxGroup>\n"],"mappings":";;;;;;;;;AAyBA,MAAM,CAAC,sBAAsB,2BAC3BA,gBAAAA,cAAoC;CAClC,MAAM;CACN,QAAQ;AACV,CAAC;AA0BH,MAAa,oBACX,QAAkC,CAAC,MAChC;CACH,MAAM,EACJ,SAAS,EAAE,YAAY,CAAC,GACxB,OAAO,EACL,eAAe,CAAC,GAChB,UACA,KACA,UACA,UACA,OAAO,WACP,UAAU,cACV,GAAG,QAEL,WAAW,EAAE,oBAAoB,iBAAiB,GAAG,aACrD,WACA,eACEC,wBAAAA,cAAc,KAAK;CACvB,MAAM,cAAc,EAAE,YAAY;CAClC,MAAM,CAAC,OAAO,YAAYC,2CAAAA,qBAAqB;EAC7C;EACA,OAAO;EACP,UAAU;CACZ,CAAC;CAED,MAAM,YAAA,GAAWC,MAAAA,YAAAA,EACd,cAAiD;EAChD,IAAI,CAAC,aAAa;EAElB,KAAA,GAAA,oBAAA,cAAI,SAAA,CAAS,SAAS,GAAG,YAAY,UAAU,OAAO;EAEtD,UAAU,SAAS;GACjB,IAAI,KAAK,SAAS,SAAS,GACzB,OAAO,KAAK,QAAQ,cAAc,cAAc,SAAS;QACtD,IAAI,EAAA,GAAA,oBAAA,cAAC,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SAAS,CAOE;EACZ;EACA;CACF;AACF"}
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
  const require_dom = require("../../utils/dom.cjs");
3
- const require_ref = require("../../utils/ref.cjs");
4
3
  const require_props = require("../../core/components/props.cjs");
5
4
  const require_hooks_use_controllable_state_index = require("../../hooks/use-controllable-state/index.cjs");
6
5
  const require_utils_index = require("../../utils/index.cjs");
@@ -39,8 +38,7 @@ const useCheckbox = ({ "aria-describedby": ariaDescribedbyProp, ...props } = {})
39
38
  setChecked
40
39
  ]);
41
40
  const getRootProps = (0, react.useCallback)((props = {}) => {
42
- const merged = require_props.mergeProps({
43
- ...dataProps,
41
+ const merged = require_props.mergeProps(dataProps, {
44
42
  "data-checked": (0, require_utils_index.utils_exports.dataAttr)(checked),
45
43
  "data-indeterminate": (0, require_utils_index.utils_exports.dataAttr)(indeterminate)
46
44
  }, rest, props)();
@@ -53,11 +51,9 @@ const useCheckbox = ({ "aria-describedby": ariaDescribedbyProp, ...props } = {})
53
51
  getLabelProps
54
52
  ]);
55
53
  const getInputProps = (0, react.useCallback)((props = {}) => {
56
- const sharedProps = require_props.mergeProps({
57
- ...dataProps,
58
- ...ariaProps,
54
+ const sharedProps = require_props.mergeProps({ ref }, dataProps, ariaProps, {
59
55
  id,
60
- ref: require_ref.mergeRefs(ref, indeterminateRef),
56
+ ref: indeterminateRef,
61
57
  type: "checkbox",
62
58
  name,
63
59
  style: require_dom.visuallyHiddenAttributes.style,
@@ -74,10 +70,7 @@ const useCheckbox = ({ "aria-describedby": ariaDescribedbyProp, ...props } = {})
74
70
  required,
75
71
  tabIndex,
76
72
  value
77
- }, props, {
78
- ...eventProps,
79
- onChange
80
- })();
73
+ }, props, eventProps, { onChange })();
81
74
  return getGroupInputProps?.(sharedProps) ?? sharedProps;
82
75
  }, [
83
76
  dataProps,
@@ -104,13 +97,11 @@ const useCheckbox = ({ "aria-describedby": ariaDescribedbyProp, ...props } = {})
104
97
  return {
105
98
  checked,
106
99
  indeterminate,
107
- getIndicatorProps: (0, react.useCallback)((props = {}) => ({
108
- ...dataProps,
100
+ getIndicatorProps: (0, react.useCallback)((props = {}) => require_props.mergeProps(dataProps, {
109
101
  "aria-hidden": "true",
110
102
  "data-checked": (0, require_utils_index.utils_exports.dataAttr)(checked),
111
- "data-indeterminate": (0, require_utils_index.utils_exports.dataAttr)(indeterminate),
112
- ...props
113
- }), [
103
+ "data-indeterminate": (0, require_utils_index.utils_exports.dataAttr)(indeterminate)
104
+ }, props)(), [
114
105
  dataProps,
115
106
  checked,
116
107
  indeterminate
@@ -1 +1 @@
1
- {"version":3,"file":"use-checkbox.cjs","names":["useCheckboxGroupContext","useId","useFieldProps","useControllableEventState","useCallback","mergeProps","mergeRefs","visuallyHiddenAttributes"],"sources":["../../../../src/components/checkbox/use-checkbox.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent, ChangeEventHandler, FocusEventHandler } from \"react\"\nimport type { HTMLProps, HTMLRefAttributes, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback, useId } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useControllableEventState } from \"../../hooks/use-controllable-state\"\nimport {\n ariaAttr,\n dataAttr,\n isNumber,\n isUndefined,\n mergeRefs,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\nimport { useCheckboxGroupContext } from \"./use-checkbox-group\"\n\nexport interface UseCheckboxProps<Y extends string = string>\n extends\n Omit<HTMLProps<\"label\">, \"onBlur\" | \"onChange\" | \"onFocus\" | \"ref\">,\n HTMLRefAttributes<\"input\">,\n FieldProps {\n /**\n * If `true`, the checkbox will be checked.\n */\n checked?: boolean\n /**\n * If `true`, the checkbox will be initially checked.\n *\n * @default false\n */\n defaultChecked?: boolean\n /**\n * id assigned to input.\n */\n id?: string\n /**\n * If `true`, the checkbox will be indeterminate.\n *\n * @default false\n */\n indeterminate?: boolean\n /**\n * The name of the input field in a checkbox.\n */\n name?: string\n /**\n * The value of the checkbox.\n */\n value?: Y\n /**\n * The callback invoked when the checkbox is blurred.\n */\n onBlur?: FocusEventHandler<HTMLInputElement>\n /**\n * The callback invoked when the checked state changes.\n */\n onChange?: ChangeEventHandler<HTMLInputElement>\n /**\n * The callback invoked when the checkbox is focused.\n */\n onFocus?: FocusEventHandler<HTMLInputElement>\n}\n\nexport const useCheckbox = <Y extends string = string>({\n \"aria-describedby\": ariaDescribedbyProp,\n ...props\n}: UseCheckboxProps<Y> = {}) => {\n const group = useCheckboxGroupContext()\n const {\n max,\n value: groupValue,\n getInputProps: getGroupInputProps,\n getLabelProps,\n } = group ?? {}\n const uuid = useId()\n const {\n props: {\n id,\n ref,\n name,\n \"aria-controls\": ariaControls,\n \"aria-labelledby\": ariaLabelledby,\n checked: checkedProp,\n defaultChecked = false,\n disabled,\n indeterminate = false,\n readOnly,\n required,\n tabIndex,\n value,\n onChange: onChangeProp,\n ...rest\n },\n ariaProps: { \"aria-describedby\": ariaDescribedby, ...ariaProps },\n dataProps,\n eventProps,\n } = useFieldProps({\n id: group ? uuid : undefined,\n ...props,\n notSupportReadOnly: true,\n })\n const resolvedAriaDescribedby = group ? ariaDescribedbyProp : ariaDescribedby\n const resolvedChecked =\n !isUndefined(groupValue) && !isUndefined(value)\n ? groupValue.includes(value)\n : checkedProp\n const [checked, setChecked] = useControllableEventState({\n defaultValue: defaultChecked,\n value: resolvedChecked,\n onChange: onChangeProp,\n })\n const trulyDisabled =\n !checked && isNumber(max) && group && group.value.length >= max\n const interactive = !(readOnly || trulyDisabled)\n const indeterminateRef = useCallback(\n (el: HTMLInputElement | null) => {\n if (el) el.indeterminate = indeterminate\n },\n [indeterminate],\n )\n\n const onChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n if (!interactive) return (ev.defaultPrevented = true)\n\n if (indeterminate) ev.target.checked = true\n\n setChecked(ev)\n },\n [interactive, indeterminate, setChecked],\n )\n\n const getRootProps: PropGetter<\"label\"> = useCallback(\n (props = {}) => {\n const merged = mergeProps(\n {\n ...dataProps,\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n },\n rest,\n props,\n )()\n\n return getLabelProps?.(merged) ?? merged\n },\n [dataProps, checked, indeterminate, rest, getLabelProps],\n )\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) => {\n const sharedProps = mergeProps(\n {\n ...dataProps,\n ...ariaProps,\n id,\n ref: mergeRefs(ref, indeterminateRef),\n type: \"checkbox\",\n name,\n style: visuallyHiddenAttributes.style,\n \"aria-checked\": indeterminate ? (\"mixed\" as const) : checked,\n \"aria-controls\": ariaControls,\n \"aria-describedby\": resolvedAriaDescribedby,\n \"aria-disabled\": ariaAttr(!interactive),\n \"aria-labelledby\": ariaLabelledby,\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n checked,\n disabled,\n readOnly,\n required,\n tabIndex,\n value,\n },\n props,\n { ...eventProps, onChange },\n )()\n\n return getGroupInputProps?.(sharedProps) ?? sharedProps\n },\n [\n dataProps,\n ariaProps,\n id,\n name,\n indeterminate,\n checked,\n ariaControls,\n resolvedAriaDescribedby,\n interactive,\n ariaLabelledby,\n disabled,\n readOnly,\n required,\n tabIndex,\n value,\n ref,\n indeterminateRef,\n eventProps,\n onChange,\n getGroupInputProps,\n ],\n )\n\n const getIndicatorProps: PropGetter = useCallback(\n (props = {}) => ({\n ...dataProps,\n \"aria-hidden\": \"true\",\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n ...props,\n }),\n [dataProps, checked, indeterminate],\n )\n\n return {\n checked,\n indeterminate,\n getIndicatorProps,\n getInputProps,\n getRootProps,\n onChange,\n }\n}\n\nexport type UseCheckboxReturn = ReturnType<typeof useCheckbox>\n"],"mappings":";;;;;;;;;;AAkEA,MAAa,eAA0C,EACrD,oBAAoB,qBACpB,GAAG,UACoB,CAAC,MAAM;CAC9B,MAAM,QAAQA,2BAAAA,wBAAwB;CACtC,MAAM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BAAA,cAAgB,SAAA,CAAS,OAAO;GAChC,uBAAA,GAAA,oBAAA,cAAsB,SAAA,CAAS,aAAa;EAC9C,GACA,MACA,KACF,CAAC,CAAC;EAEF,OAAO,gBAAgB,MAAM,KAAK;CACpC,GACA;EAAC;EAAW;EAAS;EAAe;EAAM;CAAa,CACzD;CAEA,MAAM,iBAAA,GAAqCD,MAAAA,YAAAA,EACxC,QAAQ,CAAC,MAAM;EACd,MAAM,cAAcC,cAAAA,WAClB;GACE,GAAG;GACH,GAAG;GACH;GACA,KAAKC,YAAAA,UAAU,KAAK,gBAAgB;GACpC,MAAM;GACN;GACA,OAAOC,YAAAA,yBAAyB;GAChC,gBAAgB,gBAAiB,UAAoB;GACrD,iBAAiB;GACjB,oBAAoB;GACpB,kBAAA,GAAA,oBAAA,cAAiB,SAAA,CAAS,CAAC,WAAW;GACtC,mBAAmB;GACnB,iBAAA,GAAA,oBAAA,cAAgB,SAAA,CAAS,OAAO;GAChC,uBAAA,GAAA,oBAAA,cAAsB,SAAA,CAAS,aAAa;GAC5C;GACA;GACA;GACA;GACA;GACA;EACF,GACA,OACA;GAAE,GAAG;GAAY;EAAS,CAC5B,CAAC,CAAC;EAEF,OAAO,qBAAqB,WAAW,KAAK;CAC9C,GACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAaA,OAAO;EACL;EACA;EACA,oBAAA,GAdoCH,MAAAA,YAAAA,EACnC,QAAQ,CAAC,OAAO;GACf,GAAG;GACH,eAAe;GACf,iBAAA,GAAA,oBAAA,cAAgB,SAAA,CAAS,OAAO;GAChC,uBAAA,GAAA,oBAAA,cAAsB,SAAA,CAAS,aAAa;GAC5C,GAAG;EACL,IACA;GAAC;GAAW;GAAS;EAAa,CAMlB;EAChB;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"use-checkbox.cjs","names":["useCheckboxGroupContext","useId","useFieldProps","useControllableEventState","useCallback","mergeProps","visuallyHiddenAttributes"],"sources":["../../../../src/components/checkbox/use-checkbox.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent, ChangeEventHandler, FocusEventHandler } from \"react\"\nimport type { HTMLProps, HTMLRefAttributes, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback, useId } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useControllableEventState } from \"../../hooks/use-controllable-state\"\nimport {\n ariaAttr,\n dataAttr,\n isNumber,\n isUndefined,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\nimport { useCheckboxGroupContext } from \"./use-checkbox-group\"\n\nexport interface UseCheckboxProps<Y extends string = string>\n extends\n Omit<HTMLProps<\"label\">, \"onBlur\" | \"onChange\" | \"onFocus\" | \"ref\">,\n HTMLRefAttributes<\"input\">,\n FieldProps {\n /**\n * If `true`, the checkbox will be checked.\n */\n checked?: boolean\n /**\n * If `true`, the checkbox will be initially checked.\n *\n * @default false\n */\n defaultChecked?: boolean\n /**\n * id assigned to input.\n */\n id?: string\n /**\n * If `true`, the checkbox will be indeterminate.\n *\n * @default false\n */\n indeterminate?: boolean\n /**\n * The name of the input field in a checkbox.\n */\n name?: string\n /**\n * The value of the checkbox.\n */\n value?: Y\n /**\n * The callback invoked when the checkbox is blurred.\n */\n onBlur?: FocusEventHandler<HTMLInputElement>\n /**\n * The callback invoked when the checked state changes.\n */\n onChange?: ChangeEventHandler<HTMLInputElement>\n /**\n * The callback invoked when the checkbox is focused.\n */\n onFocus?: FocusEventHandler<HTMLInputElement>\n}\n\nexport const useCheckbox = <Y extends string = string>({\n \"aria-describedby\": ariaDescribedbyProp,\n ...props\n}: UseCheckboxProps<Y> = {}) => {\n const group = useCheckboxGroupContext()\n const {\n max,\n value: groupValue,\n getInputProps: getGroupInputProps,\n getLabelProps,\n } = group ?? {}\n const uuid = useId()\n const {\n props: {\n id,\n ref,\n name,\n \"aria-controls\": ariaControls,\n \"aria-labelledby\": ariaLabelledby,\n checked: checkedProp,\n defaultChecked = false,\n disabled,\n indeterminate = false,\n readOnly,\n required,\n tabIndex,\n value,\n onChange: onChangeProp,\n ...rest\n },\n ariaProps: { \"aria-describedby\": ariaDescribedby, ...ariaProps },\n dataProps,\n eventProps,\n } = useFieldProps({\n id: group ? uuid : undefined,\n ...props,\n notSupportReadOnly: true,\n })\n const resolvedAriaDescribedby = group ? ariaDescribedbyProp : ariaDescribedby\n const resolvedChecked =\n !isUndefined(groupValue) && !isUndefined(value)\n ? groupValue.includes(value)\n : checkedProp\n const [checked, setChecked] = useControllableEventState({\n defaultValue: defaultChecked,\n value: resolvedChecked,\n onChange: onChangeProp,\n })\n const trulyDisabled =\n !checked && isNumber(max) && group && group.value.length >= max\n const interactive = !(readOnly || trulyDisabled)\n const indeterminateRef = useCallback(\n (el: HTMLInputElement | null) => {\n if (el) el.indeterminate = indeterminate\n },\n [indeterminate],\n )\n\n const onChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n if (!interactive) return (ev.defaultPrevented = true)\n\n if (indeterminate) ev.target.checked = true\n\n setChecked(ev)\n },\n [interactive, indeterminate, setChecked],\n )\n\n const getRootProps: PropGetter<\"label\"> = useCallback(\n (props = {}) => {\n const merged = mergeProps(\n dataProps,\n {\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n },\n rest,\n props,\n )()\n\n return getLabelProps?.(merged) ?? merged\n },\n [dataProps, checked, indeterminate, rest, getLabelProps],\n )\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) => {\n const sharedProps = mergeProps(\n { ref },\n dataProps,\n ariaProps,\n {\n id,\n ref: indeterminateRef,\n type: \"checkbox\",\n name,\n style: visuallyHiddenAttributes.style,\n \"aria-checked\": indeterminate ? (\"mixed\" as const) : checked,\n \"aria-controls\": ariaControls,\n \"aria-describedby\": resolvedAriaDescribedby,\n \"aria-disabled\": ariaAttr(!interactive),\n \"aria-labelledby\": ariaLabelledby,\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n checked,\n disabled,\n readOnly,\n required,\n tabIndex,\n value,\n },\n props,\n eventProps,\n { onChange },\n )()\n\n return getGroupInputProps?.(sharedProps) ?? sharedProps\n },\n [\n dataProps,\n ariaProps,\n id,\n name,\n indeterminate,\n checked,\n ariaControls,\n resolvedAriaDescribedby,\n interactive,\n ariaLabelledby,\n disabled,\n readOnly,\n required,\n tabIndex,\n value,\n ref,\n indeterminateRef,\n eventProps,\n onChange,\n getGroupInputProps,\n ],\n )\n\n const getIndicatorProps: PropGetter = useCallback(\n (props = {}) =>\n mergeProps(\n dataProps,\n {\n \"aria-hidden\": \"true\",\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n },\n props,\n )(),\n [dataProps, checked, indeterminate],\n )\n\n return {\n checked,\n indeterminate,\n getIndicatorProps,\n getInputProps,\n getRootProps,\n onChange,\n }\n}\n\nexport type UseCheckboxReturn = ReturnType<typeof useCheckbox>\n"],"mappings":";;;;;;;;;AAiEA,MAAa,eAA0C,EACrD,oBAAoB,qBACpB,GAAG,UACoB,CAAC,MAAM;CAC9B,MAAM,QAAQA,2BAAAA,wBAAwB;CACtC,MAAM,EACJ,KACA,OAAO,YACP,eAAe,oBACf,kBACE,SAAS,CAAC;CACd,MAAM,QAAA,GAAOC,MAAAA,MAAAA,CAAM;CACnB,MAAM,EACJ,OAAO,EACL,IACA,KACA,MACA,iBAAiB,cACjB,mBAAmB,gBACnB,SAAS,aACT,iBAAiB,OACjB,UACA,gBAAgB,OAChB,UACA,UACA,UACA,OACA,UAAU,cACV,GAAG,QAEL,WAAW,EAAE,oBAAoB,iBAAiB,GAAG,aACrD,WACA,eACEC,wBAAAA,cAAc;EAChB,IAAI,QAAQ,OAAO,KAAA;EACnB,GAAG;EACH,oBAAoB;CACtB,CAAC;CACD,MAAM,0BAA0B,QAAQ,sBAAsB;CAC9D,MA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B;GACpB,kBAAA,GAAA,oBAAA,cAAiB,SAAA,CAAS,CAAC,WAAW;GACtC,mBAAmB;GACnB,iBAAA,GAAA,oBAAA,cAAgB,SAAA,CAAS,OAAO;GAChC,uBAAA,GAAA,oBAAA,cAAsB,SAAA,CAAS,aAAa;GAC5C;GACA;GACA;GACA;GACA;GACA;EACF,GACA,OACA,YACA,EAAE,SAAS,CACb,CAAC,CAAC;EAEF,OAAO,qBAAqB,WAAW,KAAK;CAC9C,GACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAgBA,OAAO;EACL;EACA;EACA,oBAAA,GAjBoCF,MAAAA,YAAAA,EACnC,QAAQ,CAAC,MACRC,cAAAA,WACE,WACA;GACE,eAAe;GACf,iBAAA,GAAA,oBAAA,cAAgB,SAAA,CAAS,OAAO;GAChC,uBAAA,GAAA,oBAAA,cAAsB,SAAA,CAAS,aAAa;EAC9C,GACA,KACF,CAAC,CAAC,GACJ;GAAC;GAAW;GAAS;EAAa,CAMlB;EAChB;EACA;EACA;CACF;AACF"}
@@ -45,12 +45,10 @@ const useCheckboxGroup = (props = {}) => {
45
45
  return {
46
46
  max,
47
47
  value,
48
- getInputProps: useCallback((props = {}) => {
48
+ getInputProps: useCallback(({ disabled, ...props } = {}) => {
49
49
  const checked = !(0, utils_exports.isUndefined)(value) && ((0, utils_exports.isString)(props.value) || (0, utils_exports.isNumber)(props.value)) && value.includes(props.value);
50
50
  const trulyDisabled = !checked && (0, utils_exports.isNumber)(max) && value.length >= max;
51
- return {
52
- ...dataProps,
53
- ...ariaProps,
51
+ return mergeProps(dataProps, ariaProps, {
54
52
  type: "checkbox",
55
53
  style: visuallyHiddenAttributes.style,
56
54
  "aria-checked": checked,
@@ -58,14 +56,10 @@ const useCheckboxGroup = (props = {}) => {
58
56
  "data-checked": (0, utils_exports.dataAttr)(checked),
59
57
  "data-disabled": (0, utils_exports.dataAttr)(trulyDisabled),
60
58
  checked,
59
+ disabled: Boolean(disabled || trulyDisabled),
61
60
  readOnly,
62
- required,
63
- ...props,
64
- disabled: Boolean(props.disabled || trulyDisabled),
65
- onBlur: (0, utils_exports.handlerAll)(props.onBlur, eventProps.onBlur),
66
- onChange: (0, utils_exports.handlerAll)(props.onChange, onChange),
67
- onFocus: (0, utils_exports.handlerAll)(props.onFocus, eventProps.onFocus)
68
- };
61
+ required
62
+ }, props, eventProps, { onChange })();
69
63
  }, [
70
64
  ariaProps,
71
65
  dataProps,
@@ -76,10 +70,7 @@ const useCheckboxGroup = (props = {}) => {
76
70
  required,
77
71
  value
78
72
  ]),
79
- getLabelProps: useCallback((props) => ({
80
- ...dataProps,
81
- ...props
82
- }), [dataProps]),
73
+ getLabelProps: useCallback((props = {}) => mergeProps(dataProps, props)(), [dataProps]),
83
74
  getRootProps,
84
75
  onChange
85
76
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-checkbox-group.js","names":["createContext","isObject","isNumber","isUndefined","isString","ariaAttr","dataAttr","handlerAll"],"sources":["../../../../src/components/checkbox/use-checkbox-group.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport {\n ariaAttr,\n createContext,\n dataAttr,\n handlerAll,\n isNumber,\n isObject,\n isString,\n isUndefined,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\ninterface CheckboxGroupContext extends Omit<\n UseCheckboxGroupReturn,\n \"getRootProps\"\n> {}\n\nconst [CheckboxGroupContext, useCheckboxGroupContext] =\n createContext<CheckboxGroupContext>({\n name: \"CheckboxGroupContext\",\n strict: false,\n })\n\nexport { CheckboxGroupContext, useCheckboxGroupContext }\n\nexport interface UseCheckboxGroupProps<Y extends string = string>\n extends Omit<HTMLProps, \"defaultValue\" | \"onChange\" | \"value\">, FieldProps {\n /**\n * The initial value of the checkbox group.\n *\n * @default []\n */\n defaultValue?: Y[]\n /**\n * The maximum number of checkboxes that can be checked.\n */\n max?: number\n /**\n * The value of the checkbox group.\n */\n value?: Y[]\n /**\n * The callback fired when any children checkbox is checked or unchecked.\n */\n onChange?: (value: Y[]) => void\n}\n\nexport const useCheckboxGroup = <Y extends string = string>(\n props: UseCheckboxGroupProps<Y> = {},\n) => {\n const {\n context: { labelId } = {},\n props: {\n defaultValue = [],\n disabled,\n max,\n readOnly,\n required,\n value: valueProp,\n onChange: onChangeProp,\n ...rest\n },\n ariaProps: { \"aria-describedby\": ariaDescribedby, ...ariaProps },\n dataProps,\n eventProps,\n } = useFieldProps(props)\n const interactive = !(readOnly || disabled)\n const [value, setValue] = useControllableState({\n defaultValue,\n value: valueProp,\n onChange: onChangeProp,\n })\n\n const onChange = useCallback(\n (valueOrEv: ChangeEvent<HTMLInputElement> | Y) => {\n if (!interactive) return\n\n if (isObject(valueOrEv)) valueOrEv = valueOrEv.target.value as Y\n\n setValue((prev) => {\n if (prev.includes(valueOrEv))\n return prev.filter((prevValue) => prevValue !== valueOrEv)\n else if (!isNumber(max) || prev.length < max)\n return [...prev, valueOrEv]\n else return prev\n })\n },\n [interactive, max, setValue],\n )\n\n const getRootProps: PropGetter = useCallback(\n (props = {}) =>\n mergeProps(\n dataProps,\n {\n \"aria-describedby\": ariaDescribedby,\n \"aria-labelledby\": labelId,\n role: \"group\",\n },\n rest,\n props,\n )(),\n [ariaDescribedby, dataProps, labelId, rest],\n )\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) => {\n const checked =\n !isUndefined(value) &&\n (isString(props.value) || isNumber(props.value)) &&\n value.includes(props.value as Y)\n const trulyDisabled = !checked && isNumber(max) && value.length >= max\n\n return {\n ...dataProps,\n ...ariaProps,\n type: \"checkbox\",\n style: visuallyHiddenAttributes.style,\n \"aria-checked\": checked,\n \"aria-disabled\": ariaAttr(trulyDisabled),\n \"data-checked\": dataAttr(checked),\n \"data-disabled\": dataAttr(trulyDisabled),\n checked,\n readOnly,\n required,\n ...props,\n disabled: Boolean(props.disabled || trulyDisabled),\n onBlur: handlerAll(props.onBlur, eventProps.onBlur),\n onChange: handlerAll(props.onChange, onChange),\n onFocus: handlerAll(props.onFocus, eventProps.onFocus),\n }\n },\n [\n ariaProps,\n dataProps,\n eventProps,\n max,\n onChange,\n readOnly,\n required,\n value,\n ],\n )\n\n const getLabelProps: PropGetter<\"label\"> = useCallback(\n (props) => ({\n ...dataProps,\n ...props,\n }),\n [dataProps],\n )\n\n return {\n max,\n value,\n getInputProps,\n getLabelProps,\n getRootProps,\n onChange,\n }\n}\n\nexport type UseCheckboxGroupReturn = ReturnType<typeof useCheckboxGroup>\n"],"mappings":";;;;;;;;;AA0BA,MAAM,CAAC,sBAAsB,2BAC3BA,gBAAoC;CAClC,MAAM;CACN,QAAQ;AACV,CAAC;AA0BH,MAAa,oBACX,QAAkC,CAAC,MAChC;CACH,MAAM,EACJ,SAAS,EAAE,YAAY,CAAC,GACxB,OAAO,EACL,eAAe,CAAC,GAChB,UACA,KACA,UACA,UACA,OAAO,WACP,UAAU,cACV,GAAG,QAEL,WAAW,EAAE,oBAAoB,iBAAiB,GAAG,aACrD,WACA,eACE,cAAc,KAAK;CACvB,MAAM,cAAc,EAAE,YAAY;CAClC,MAAM,CAAC,OAAO,YAAY,qBAAqB;EAC7C;EACA,OAAO;EACP,UAAU;CACZ,CAAC;CAED,MAAM,WAAW,aACd,cAAiD;EAChD,IAAI,CAAC,aAAa;EAElB,KAAA,GAAIC,cAAAA,SAAAA,CAAS,SAAS,GAAG,YAAY,UAAU,OAAO;EAEtD,UAAU,SAAS;GACjB,IAAI,KAAK,SAAS,SAAS,GACzB,OAAO,KAAK,QAAQ,cAAc,cAAc,SAAS;QACtD,IAAI,EAAA,GAACC,cAAAA,SAAAA,CAAS,GAAG,KAAK,KAAK,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F"}
1
+ {"version":3,"file":"use-checkbox-group.js","names":["createContext","isObject","isNumber","isUndefined","isString","ariaAttr","dataAttr"],"sources":["../../../../src/components/checkbox/use-checkbox-group.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport {\n ariaAttr,\n createContext,\n dataAttr,\n isNumber,\n isObject,\n isString,\n isUndefined,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\ninterface CheckboxGroupContext extends Omit<\n UseCheckboxGroupReturn,\n \"getRootProps\"\n> {}\n\nconst [CheckboxGroupContext, useCheckboxGroupContext] =\n createContext<CheckboxGroupContext>({\n name: \"CheckboxGroupContext\",\n strict: false,\n })\n\nexport { CheckboxGroupContext, useCheckboxGroupContext }\n\nexport interface UseCheckboxGroupProps<Y extends string = string>\n extends Omit<HTMLProps, \"defaultValue\" | \"onChange\" | \"value\">, FieldProps {\n /**\n * The initial value of the checkbox group.\n *\n * @default []\n */\n defaultValue?: Y[]\n /**\n * The maximum number of checkboxes that can be checked.\n */\n max?: number\n /**\n * The value of the checkbox group.\n */\n value?: Y[]\n /**\n * The callback fired when any children checkbox is checked or unchecked.\n */\n onChange?: (value: Y[]) => void\n}\n\nexport const useCheckboxGroup = <Y extends string = string>(\n props: UseCheckboxGroupProps<Y> = {},\n) => {\n const {\n context: { labelId } = {},\n props: {\n defaultValue = [],\n disabled,\n max,\n readOnly,\n required,\n value: valueProp,\n onChange: onChangeProp,\n ...rest\n },\n ariaProps: { \"aria-describedby\": ariaDescribedby, ...ariaProps },\n dataProps,\n eventProps,\n } = useFieldProps(props)\n const interactive = !(readOnly || disabled)\n const [value, setValue] = useControllableState({\n defaultValue,\n value: valueProp,\n onChange: onChangeProp,\n })\n\n const onChange = useCallback(\n (valueOrEv: ChangeEvent<HTMLInputElement> | Y) => {\n if (!interactive) return\n\n if (isObject(valueOrEv)) valueOrEv = valueOrEv.target.value as Y\n\n setValue((prev) => {\n if (prev.includes(valueOrEv))\n return prev.filter((prevValue) => prevValue !== valueOrEv)\n else if (!isNumber(max) || prev.length < max)\n return [...prev, valueOrEv]\n else return prev\n })\n },\n [interactive, max, setValue],\n )\n\n const getRootProps: PropGetter = useCallback(\n (props = {}) =>\n mergeProps(\n dataProps,\n {\n \"aria-describedby\": ariaDescribedby,\n \"aria-labelledby\": labelId,\n role: \"group\",\n },\n rest,\n props,\n )(),\n [ariaDescribedby, dataProps, labelId, rest],\n )\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n ({ disabled, ...props } = {}) => {\n const checked =\n !isUndefined(value) &&\n (isString(props.value) || isNumber(props.value)) &&\n value.includes(props.value as Y)\n const trulyDisabled = !checked && isNumber(max) && value.length >= max\n\n return mergeProps(\n dataProps,\n ariaProps,\n {\n type: \"checkbox\",\n style: visuallyHiddenAttributes.style,\n \"aria-checked\": checked,\n \"aria-disabled\": ariaAttr(trulyDisabled),\n \"data-checked\": dataAttr(checked),\n \"data-disabled\": dataAttr(trulyDisabled),\n checked,\n disabled: Boolean(disabled || trulyDisabled),\n readOnly,\n required,\n },\n props,\n eventProps,\n { onChange },\n )()\n },\n [\n ariaProps,\n dataProps,\n eventProps,\n max,\n onChange,\n readOnly,\n required,\n value,\n ],\n )\n\n const getLabelProps: PropGetter<\"label\"> = useCallback(\n (props = {}) => mergeProps(dataProps, props)(),\n [dataProps],\n )\n\n return {\n max,\n value,\n getInputProps,\n getLabelProps,\n getRootProps,\n onChange,\n }\n}\n\nexport type UseCheckboxGroupReturn = ReturnType<typeof useCheckboxGroup>\n"],"mappings":";;;;;;;;;AAyBA,MAAM,CAAC,sBAAsB,2BAC3BA,gBAAoC;CAClC,MAAM;CACN,QAAQ;AACV,CAAC;AA0BH,MAAa,oBACX,QAAkC,CAAC,MAChC;CACH,MAA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,OAAO,yBAAyB;IAChC,gBAAgB;IAChB,kBAAA,GAAiBG,cAAAA,SAAAA,CAAS,aAAa;IACvC,iBAAA,GAAgBC,cAAAA,SAAAA,CAAS,OAAO;IAChC,kBAAA,GAAiBA,cAAAA,SAAAA,CAAS,aAAa;IACvC;IACA,UAAU,QAAQ,YAAY,aAAa;IAC3C;IACA;GACF,GACA,OACA,YACA,EAAE,SAAS,CACb,CAAC,CAAC;EACJ,GACA;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAWY;EACZ,eATyC,aACxC,QAAQ,CAAC,MAAM,WAAW,WAAW,KAAK,CAAC,CAAC,GAC7C,CAAC,SAAS,CAOE;EACZ;EACA;CACF;AACF"}
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
  import { visuallyHiddenAttributes } from "../../utils/dom.js";
3
- import { mergeRefs } from "../../utils/ref.js";
4
3
  import { mergeProps } from "../../core/components/props.js";
5
4
  import { useControllableEventState } from "../../hooks/use-controllable-state/index.js";
6
5
  import { utils_exports } from "../../utils/index.js";
@@ -39,8 +38,7 @@ const useCheckbox = ({ "aria-describedby": ariaDescribedbyProp, ...props } = {})
39
38
  setChecked
40
39
  ]);
41
40
  const getRootProps = useCallback((props = {}) => {
42
- const merged = mergeProps({
43
- ...dataProps,
41
+ const merged = mergeProps(dataProps, {
44
42
  "data-checked": (0, utils_exports.dataAttr)(checked),
45
43
  "data-indeterminate": (0, utils_exports.dataAttr)(indeterminate)
46
44
  }, rest, props)();
@@ -53,11 +51,9 @@ const useCheckbox = ({ "aria-describedby": ariaDescribedbyProp, ...props } = {})
53
51
  getLabelProps
54
52
  ]);
55
53
  const getInputProps = useCallback((props = {}) => {
56
- const sharedProps = mergeProps({
57
- ...dataProps,
58
- ...ariaProps,
54
+ const sharedProps = mergeProps({ ref }, dataProps, ariaProps, {
59
55
  id,
60
- ref: mergeRefs(ref, indeterminateRef),
56
+ ref: indeterminateRef,
61
57
  type: "checkbox",
62
58
  name,
63
59
  style: visuallyHiddenAttributes.style,
@@ -74,10 +70,7 @@ const useCheckbox = ({ "aria-describedby": ariaDescribedbyProp, ...props } = {})
74
70
  required,
75
71
  tabIndex,
76
72
  value
77
- }, props, {
78
- ...eventProps,
79
- onChange
80
- })();
73
+ }, props, eventProps, { onChange })();
81
74
  return getGroupInputProps?.(sharedProps) ?? sharedProps;
82
75
  }, [
83
76
  dataProps,
@@ -104,13 +97,11 @@ const useCheckbox = ({ "aria-describedby": ariaDescribedbyProp, ...props } = {})
104
97
  return {
105
98
  checked,
106
99
  indeterminate,
107
- getIndicatorProps: useCallback((props = {}) => ({
108
- ...dataProps,
100
+ getIndicatorProps: useCallback((props = {}) => mergeProps(dataProps, {
109
101
  "aria-hidden": "true",
110
102
  "data-checked": (0, utils_exports.dataAttr)(checked),
111
- "data-indeterminate": (0, utils_exports.dataAttr)(indeterminate),
112
- ...props
113
- }), [
103
+ "data-indeterminate": (0, utils_exports.dataAttr)(indeterminate)
104
+ }, props)(), [
114
105
  dataProps,
115
106
  checked,
116
107
  indeterminate
@@ -1 +1 @@
1
- {"version":3,"file":"use-checkbox.js","names":["isUndefined","isNumber","dataAttr","ariaAttr"],"sources":["../../../../src/components/checkbox/use-checkbox.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent, ChangeEventHandler, FocusEventHandler } from \"react\"\nimport type { HTMLProps, HTMLRefAttributes, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback, useId } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useControllableEventState } from \"../../hooks/use-controllable-state\"\nimport {\n ariaAttr,\n dataAttr,\n isNumber,\n isUndefined,\n mergeRefs,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\nimport { useCheckboxGroupContext } from \"./use-checkbox-group\"\n\nexport interface UseCheckboxProps<Y extends string = string>\n extends\n Omit<HTMLProps<\"label\">, \"onBlur\" | \"onChange\" | \"onFocus\" | \"ref\">,\n HTMLRefAttributes<\"input\">,\n FieldProps {\n /**\n * If `true`, the checkbox will be checked.\n */\n checked?: boolean\n /**\n * If `true`, the checkbox will be initially checked.\n *\n * @default false\n */\n defaultChecked?: boolean\n /**\n * id assigned to input.\n */\n id?: string\n /**\n * If `true`, the checkbox will be indeterminate.\n *\n * @default false\n */\n indeterminate?: boolean\n /**\n * The name of the input field in a checkbox.\n */\n name?: string\n /**\n * The value of the checkbox.\n */\n value?: Y\n /**\n * The callback invoked when the checkbox is blurred.\n */\n onBlur?: FocusEventHandler<HTMLInputElement>\n /**\n * The callback invoked when the checked state changes.\n */\n onChange?: ChangeEventHandler<HTMLInputElement>\n /**\n * The callback invoked when the checkbox is focused.\n */\n onFocus?: FocusEventHandler<HTMLInputElement>\n}\n\nexport const useCheckbox = <Y extends string = string>({\n \"aria-describedby\": ariaDescribedbyProp,\n ...props\n}: UseCheckboxProps<Y> = {}) => {\n const group = useCheckboxGroupContext()\n const {\n max,\n value: groupValue,\n getInputProps: getGroupInputProps,\n getLabelProps,\n } = group ?? {}\n const uuid = useId()\n const {\n props: {\n id,\n ref,\n name,\n \"aria-controls\": ariaControls,\n \"aria-labelledby\": ariaLabelledby,\n checked: checkedProp,\n defaultChecked = false,\n disabled,\n indeterminate = false,\n readOnly,\n required,\n tabIndex,\n value,\n onChange: onChangeProp,\n ...rest\n },\n ariaProps: { \"aria-describedby\": ariaDescribedby, ...ariaProps },\n dataProps,\n eventProps,\n } = useFieldProps({\n id: group ? uuid : undefined,\n ...props,\n notSupportReadOnly: true,\n })\n const resolvedAriaDescribedby = group ? ariaDescribedbyProp : ariaDescribedby\n const resolvedChecked =\n !isUndefined(groupValue) && !isUndefined(value)\n ? groupValue.includes(value)\n : checkedProp\n const [checked, setChecked] = useControllableEventState({\n defaultValue: defaultChecked,\n value: resolvedChecked,\n onChange: onChangeProp,\n })\n const trulyDisabled =\n !checked && isNumber(max) && group && group.value.length >= max\n const interactive = !(readOnly || trulyDisabled)\n const indeterminateRef = useCallback(\n (el: HTMLInputElement | null) => {\n if (el) el.indeterminate = indeterminate\n },\n [indeterminate],\n )\n\n const onChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n if (!interactive) return (ev.defaultPrevented = true)\n\n if (indeterminate) ev.target.checked = true\n\n setChecked(ev)\n },\n [interactive, indeterminate, setChecked],\n )\n\n const getRootProps: PropGetter<\"label\"> = useCallback(\n (props = {}) => {\n const merged = mergeProps(\n {\n ...dataProps,\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n },\n rest,\n props,\n )()\n\n return getLabelProps?.(merged) ?? merged\n },\n [dataProps, checked, indeterminate, rest, getLabelProps],\n )\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) => {\n const sharedProps = mergeProps(\n {\n ...dataProps,\n ...ariaProps,\n id,\n ref: mergeRefs(ref, indeterminateRef),\n type: \"checkbox\",\n name,\n style: visuallyHiddenAttributes.style,\n \"aria-checked\": indeterminate ? (\"mixed\" as const) : checked,\n \"aria-controls\": ariaControls,\n \"aria-describedby\": resolvedAriaDescribedby,\n \"aria-disabled\": ariaAttr(!interactive),\n \"aria-labelledby\": ariaLabelledby,\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n checked,\n disabled,\n readOnly,\n required,\n tabIndex,\n value,\n },\n props,\n { ...eventProps, onChange },\n )()\n\n return getGroupInputProps?.(sharedProps) ?? sharedProps\n },\n [\n dataProps,\n ariaProps,\n id,\n name,\n indeterminate,\n checked,\n ariaControls,\n resolvedAriaDescribedby,\n interactive,\n ariaLabelledby,\n disabled,\n readOnly,\n required,\n tabIndex,\n value,\n ref,\n indeterminateRef,\n eventProps,\n onChange,\n getGroupInputProps,\n ],\n )\n\n const getIndicatorProps: PropGetter = useCallback(\n (props = {}) => ({\n ...dataProps,\n \"aria-hidden\": \"true\",\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n ...props,\n }),\n [dataProps, checked, indeterminate],\n )\n\n return {\n checked,\n indeterminate,\n getIndicatorProps,\n getInputProps,\n getRootProps,\n onChange,\n }\n}\n\nexport type UseCheckboxReturn = ReturnType<typeof useCheckbox>\n"],"mappings":";;;;;;;;;;AAkEA,MAAa,eAA0C,EACrD,oBAAoB,qBACpB,GAAG,UACoB,CAAC,MAAM;CAC9B,MAAM,QAAQ,wBAAwB;CACtC,MAAM,EACJ,KACA,OAAO,YACP,eAAe,oBACf,kBACE,SAAS,CAAC;CACd,MAAM,OAAO,MAAM;CACnB,MAAM,EACJ,OAAO,EACL,IACA,KACA,MACA,iBAAiB,cACjB,mBAAmB,gBACnB,SAAS,aACT,iBAAiB,OACjB,UACA,gBAAgB,OAChB,UACA,UACA,UACA,OACA,UAAU,cACV,GAAG,QAEL,WAAW,EAAE,oBAAoB,iBAAiB,GAAG,aACrD,WACA,eACE,cAAc;EAChB,IAAI,QAAQ,OAAO,KAAA;EACnB,GAAG;EACH,oBAAoB;CACtB,CAAC;CACD,MAAM,0BAA0B,QAAQ,sBAAsB;CAC9D,MAAM,kBACJ,EAAA,GAACA,cAAAA,YAAAA,CAAY,UAAU,KAAK,EAAA,GAACA,cAAAA,YAAAA,CAAY,KAAK,IAC1C,WAAW,SAAS,KAAK,IACzB;CACN,MAAM,CAAC,SAAS,cAAc,0BAA0B;EACtD,cAAc;EACd,OAAO;EACP,UAAU;CACZ,CAAC;CACD,MAAM,gBACJ,CAAC,YAAA,GAAWC,cAAAA,SAAAA,CAAS,GAAG,KAAK,SAAS,MAAM,MAAM,UAAU;CAC9D,MAAM,cAAc,EAAE,YAAY;CAClC,MAAM,mBAAmB,aACtB,OAAgC;EAC/B,IAAI,IAAI,GAAG,gBAAgB;CAC7B,GACA,CAAC,aAAa,CAChB;CAEA,MAAM,WAAW,aACd,OAAsC;EACrC,IAAI,CAAC,aAAa,OAAQ,GAAG,mBAAmB;EAEhD,IAAI,eAAe,GAAG,OAAO,UAAU;EAEvC,WAAW,EAAE;CACf,GACA;EAAC;E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ndefined","isNumber","dataAttr","ariaAttr"],"sources":["../../../../src/components/checkbox/use-checkbox.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent, ChangeEventHandler, FocusEventHandler } from \"react\"\nimport type { HTMLProps, HTMLRefAttributes, PropGetter } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback, useId } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useControllableEventState } from \"../../hooks/use-controllable-state\"\nimport {\n ariaAttr,\n dataAttr,\n isNumber,\n isUndefined,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\nimport { useCheckboxGroupContext } from \"./use-checkbox-group\"\n\nexport interface UseCheckboxProps<Y extends string = string>\n extends\n Omit<HTMLProps<\"label\">, \"onBlur\" | \"onChange\" | \"onFocus\" | \"ref\">,\n HTMLRefAttributes<\"input\">,\n FieldProps {\n /**\n * If `true`, the checkbox will be checked.\n */\n checked?: boolean\n /**\n * If `true`, the checkbox will be initially checked.\n *\n * @default false\n */\n defaultChecked?: boolean\n /**\n * id assigned to input.\n */\n id?: string\n /**\n * If `true`, the checkbox will be indeterminate.\n *\n * @default false\n */\n indeterminate?: boolean\n /**\n * The name of the input field in a checkbox.\n */\n name?: string\n /**\n * The value of the checkbox.\n */\n value?: Y\n /**\n * The callback invoked when the checkbox is blurred.\n */\n onBlur?: FocusEventHandler<HTMLInputElement>\n /**\n * The callback invoked when the checked state changes.\n */\n onChange?: ChangeEventHandler<HTMLInputElement>\n /**\n * The callback invoked when the checkbox is focused.\n */\n onFocus?: FocusEventHandler<HTMLInputElement>\n}\n\nexport const useCheckbox = <Y extends string = string>({\n \"aria-describedby\": ariaDescribedbyProp,\n ...props\n}: UseCheckboxProps<Y> = {}) => {\n const group = useCheckboxGroupContext()\n const {\n max,\n value: groupValue,\n getInputProps: getGroupInputProps,\n getLabelProps,\n } = group ?? {}\n const uuid = useId()\n const {\n props: {\n id,\n ref,\n name,\n \"aria-controls\": ariaControls,\n \"aria-labelledby\": ariaLabelledby,\n checked: checkedProp,\n defaultChecked = false,\n disabled,\n indeterminate = false,\n readOnly,\n required,\n tabIndex,\n value,\n onChange: onChangeProp,\n ...rest\n },\n ariaProps: { \"aria-describedby\": ariaDescribedby, ...ariaProps },\n dataProps,\n eventProps,\n } = useFieldProps({\n id: group ? uuid : undefined,\n ...props,\n notSupportReadOnly: true,\n })\n const resolvedAriaDescribedby = group ? ariaDescribedbyProp : ariaDescribedby\n const resolvedChecked =\n !isUndefined(groupValue) && !isUndefined(value)\n ? groupValue.includes(value)\n : checkedProp\n const [checked, setChecked] = useControllableEventState({\n defaultValue: defaultChecked,\n value: resolvedChecked,\n onChange: onChangeProp,\n })\n const trulyDisabled =\n !checked && isNumber(max) && group && group.value.length >= max\n const interactive = !(readOnly || trulyDisabled)\n const indeterminateRef = useCallback(\n (el: HTMLInputElement | null) => {\n if (el) el.indeterminate = indeterminate\n },\n [indeterminate],\n )\n\n const onChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n if (!interactive) return (ev.defaultPrevented = true)\n\n if (indeterminate) ev.target.checked = true\n\n setChecked(ev)\n },\n [interactive, indeterminate, setChecked],\n )\n\n const getRootProps: PropGetter<\"label\"> = useCallback(\n (props = {}) => {\n const merged = mergeProps(\n dataProps,\n {\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n },\n rest,\n props,\n )()\n\n return getLabelProps?.(merged) ?? merged\n },\n [dataProps, checked, indeterminate, rest, getLabelProps],\n )\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) => {\n const sharedProps = mergeProps(\n { ref },\n dataProps,\n ariaProps,\n {\n id,\n ref: indeterminateRef,\n type: \"checkbox\",\n name,\n style: visuallyHiddenAttributes.style,\n \"aria-checked\": indeterminate ? (\"mixed\" as const) : checked,\n \"aria-controls\": ariaControls,\n \"aria-describedby\": resolvedAriaDescribedby,\n \"aria-disabled\": ariaAttr(!interactive),\n \"aria-labelledby\": ariaLabelledby,\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n checked,\n disabled,\n readOnly,\n required,\n tabIndex,\n value,\n },\n props,\n eventProps,\n { onChange },\n )()\n\n return getGroupInputProps?.(sharedProps) ?? sharedProps\n },\n [\n dataProps,\n ariaProps,\n id,\n name,\n indeterminate,\n checked,\n ariaControls,\n resolvedAriaDescribedby,\n interactive,\n ariaLabelledby,\n disabled,\n readOnly,\n required,\n tabIndex,\n value,\n ref,\n indeterminateRef,\n eventProps,\n onChange,\n getGroupInputProps,\n ],\n )\n\n const getIndicatorProps: PropGetter = useCallback(\n (props = {}) =>\n mergeProps(\n dataProps,\n {\n \"aria-hidden\": \"true\",\n \"data-checked\": dataAttr(checked),\n \"data-indeterminate\": dataAttr(indeterminate),\n },\n props,\n )(),\n [dataProps, checked, indeterminate],\n )\n\n return {\n checked,\n indeterminate,\n getIndicatorProps,\n getInputProps,\n getRootProps,\n onChange,\n }\n}\n\nexport type UseCheckboxReturn = ReturnType<typeof useCheckbox>\n"],"mappings":";;;;;;;;;AAiEA,MAAa,eAA0C,EACrD,oBAAoB,qBACpB,GAAG,UACoB,CAAC,MAAM;CAC9B,MAAM,QAAQ,wBAAwB;CACtC,MAAM,EACJ,KACA,OAAO,YACP,eAAe,oBACf,kBACE,SAAS,CAAC;CACd,MAAM,OAAO,MAAM;CACnB,MAAM,EACJ,OAAO,EACL,IACA,KACA,MACA,iBAAiB,cACjB,mBAAmB,gBACnB,SAAS,aACT,iBAAiB,OACjB,UACA,gBAAgB,OAChB,UACA,UACA,UACA,OACA,UAAU,cACV,GAAG,QAEL,WAAW,EAAE,oBAAoB,iBAAiB,GAAG,aACrD,WACA,eACE,cAAc;EAChB,IAAI,QAAQ,OAAO,KAAA;EACnB,GAAG;EACH,oBAAoB;CACtB,CAAC;CACD,MAAM,0BAA0B,QAAQ,sBAAsB;CAC9D,MAAM,kBACJ,EAAA,GAACA,cAAAA,YAAAA,CAAY,UAAU,KAA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ACA;EACF,GACA,OACA,YACA,EAAE,SAAS,CACb,CAAC,CAAC;EAEF,OAAO,qBAAqB,WAAW,KAAK;CAC9C,GACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAgBA,OAAO;EACL;EACA;EACA,mBAjBoC,aACnC,QAAQ,CAAC,MACR,WACE,WACA;GACE,eAAe;GACf,iBAAA,GAAgBA,cAAAA,SAAAA,CAAS,OAAO;GAChC,uBAAA,GAAsBA,cAAAA,SAAAA,CAAS,aAAa;EAC9C,GACA,KACF,CAAC,CAAC,GACJ;GAAC;GAAW;GAAS;EAAa,CAMlB;EAChB;EACA;EACA;CACF;AACF"}
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const accordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "root" | "item", CSSPropObject<CSSSlotObject<"button" | "panel" | "icon" | "root" | "item">>, CSSModifierObject<CSSSlotObject<"button" | "panel" | "icon" | "root" | "item">>, {
4
+ export declare const accordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "item" | "root", CSSPropObject<CSSSlotObject<"button" | "panel" | "icon" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"button" | "panel" | "icon" | "item" | "root">>, {
5
5
  panel: {
6
6
  button: {
7
7
  rounded: "l2";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const alertStyle: ComponentSlotStyle<"title" | "loading" | "icon" | "root" | "description", CSSPropObject<CSSSlotObject<"title" | "loading" | "icon" | "root" | "description">>, CSSModifierObject<CSSSlotObject<"title" | "loading" | "icon" | "root" | "description">>, {
4
+ export declare const alertStyle: ComponentSlotStyle<"title" | "loading" | "icon" | "description" | "root", CSSPropObject<CSSSlotObject<"title" | "loading" | "icon" | "description" | "root">>, CSSModifierObject<CSSSlotObject<"title" | "loading" | "icon" | "description" | "root">>, {
5
5
  island: {
6
6
  description: {
7
7
  color: "fg.muted";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "empty" | "indicator" | "field" | "valueText", CSSPropObject<CSSSlotObject<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "empty" | "indicator" | "field" | "valueText">>, {
4
+ export declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "field" | "root" | "empty" | "indicator" | "valueText", CSSPropObject<CSSSlotObject<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "field" | "root" | "empty" | "indicator" | "valueText">>, {
5
5
  xs: {
6
6
  empty: {
7
7
  gap: "1.5";
@@ -21,7 +21,7 @@ export interface AvatarProps extends HTMLStyledProps, ThemeProps<AvatarStyle>, U
21
21
  */
22
22
  imageProps?: AvatarImageProps;
23
23
  }
24
- declare const component: <H extends As | "fragment" = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "fallback" | "root", {
24
+ declare const component: <H extends "fragment" | As = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "fallback" | "root", {
25
25
  shape: {
26
26
  circle: {
27
27
  root: {
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const breadcrumbStyle: ComponentSlotStyle<"link" | "list" | "separator" | "ellipsis" | "root" | "item", CSSPropObject<CSSSlotObject<"link" | "list" | "separator" | "ellipsis" | "root" | "item">>, {
4
+ export declare const breadcrumbStyle: ComponentSlotStyle<"link" | "list" | "separator" | "ellipsis" | "item" | "root", CSSPropObject<CSSSlotObject<"link" | "list" | "separator" | "ellipsis" | "item" | "root">>, {
5
5
  sm: {
6
6
  list: {
7
7
  fontSize: "sm";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const bubbleStyle: ComponentSlotStyle<"content" | "group" | "root" | "item" | "reactions", CSSPropObject<CSSSlotObject<"content" | "group" | "root" | "item" | "reactions">>, {
4
+ export declare const bubbleStyle: ComponentSlotStyle<"content" | "group" | "item" | "root" | "reactions", CSSPropObject<CSSSlotObject<"content" | "group" | "item" | "root" | "reactions">>, {
5
5
  sm: {
6
6
  content: {
7
7
  "--space-y": "spaces.2";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "prev" | "root" | "month" | "week" | "day" | "months" | "years" | "weeks" | "weekday" | "control", {
4
+ export declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "prev" | "root" | "month" | "week" | "control" | "day" | "months" | "weekday" | "weeks" | "years", {
5
5
  /**
6
6
  * If `true`, the calendar will be fixed rows.
7
7
  *
@@ -73,5 +73,5 @@ export declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "ce
73
73
  "--font-size": "fontSizes.xl";
74
74
  };
75
75
  };
76
- }, CSSModifierObject<CSSSlotObject<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "prev" | "root" | "month" | "week" | "day" | "months" | "years" | "weeks" | "weekday" | "control">>>;
76
+ }, CSSModifierObject<CSSSlotObject<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "prev" | "root" | "month" | "week" | "control" | "day" | "months" | "weekday" | "weeks" | "years">>>;
77
77
  export type CalendarStyle = typeof calendarStyle;
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const carouselStyle: ComponentSlotStyle<"list" | "next" | "prev" | "root" | "trigger" | "item" | "indicator" | "indicators", CSSPropObject<CSSSlotObject<"list" | "next" | "prev" | "root" | "trigger" | "item" | "indicator" | "indicators">>, {
4
+ export declare const carouselStyle: ComponentSlotStyle<"list" | "next" | "prev" | "item" | "root" | "indicator" | "trigger" | "indicators", CSSPropObject<CSSSlotObject<"list" | "next" | "prev" | "item" | "root" | "indicator" | "trigger" | "indicators">>, {
5
5
  sm: {
6
6
  root: {
7
7
  h: "sm";
@@ -17,5 +17,5 @@ export declare const carouselStyle: ComponentSlotStyle<"list" | "next" | "prev"
17
17
  h: "lg";
18
18
  };
19
19
  };
20
- }, CSSModifierObject<CSSSlotObject<"list" | "next" | "prev" | "root" | "trigger" | "item" | "indicator" | "indicators">>>;
20
+ }, CSSModifierObject<CSSSlotObject<"list" | "next" | "prev" | "item" | "root" | "indicator" | "trigger" | "indicators">>>;
21
21
  export type CarouselStyle = typeof carouselStyle;
@@ -36,7 +36,7 @@ export interface CheckboxProps<Y extends string = string> extends Merge<HTMLStyl
36
36
  */
37
37
  rootProps?: HTMLStyledProps<"label">;
38
38
  }
39
- declare const component: <H extends As | "fragment" = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"label" | "group" | "root" | "indicator", {
39
+ declare const component: <H extends "fragment" | As = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"label" | "group" | "root" | "indicator", {
40
40
  shape: {
41
41
  rounded: {
42
42
  indicator: {
@@ -63,7 +63,7 @@ export interface CheckboxCardRootProps<Y extends string = string> extends Merge<
63
63
  */
64
64
  rootProps?: HTMLStyledProps<"label">;
65
65
  }
66
- declare const component: <H extends As | "fragment" = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"group" | "root" | "description" | "indicator" | "addon", {
66
+ declare const component: <H extends "fragment" | As = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"group" | "description" | "root" | "indicator" | "addon", {
67
67
  justify: {
68
68
  end: {
69
69
  addon: {
@@ -209,7 +209,7 @@ declare const component: <H extends As | "fragment" = "div", R extends import("@
209
209
  };
210
210
  };
211
211
  };
212
- }>>> | undefined, { name, className, ...options }?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ? import("react").FunctionComponent<R> : Component<Exclude<H, "fragment">, R>, CheckboxCardPropsContext: import("react").Context<Partial<CheckboxCardRootProps<string>> | undefined>, useCheckboxCardPropsContext: () => Partial<CheckboxCardRootProps<string>> | undefined, useRootComponentProps: <Y extends import("@yamada-ui/utils").Dict = {}, R extends keyof Y = keyof Y>(props: Y, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"group" | "root" | "description" | "indicator" | "addon", {
212
+ }>>> | undefined, { name, className, ...options }?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ? import("react").FunctionComponent<R> : Component<Exclude<H, "fragment">, R>, CheckboxCardPropsContext: import("react").Context<Partial<CheckboxCardRootProps<string>> | undefined>, useCheckboxCardPropsContext: () => Partial<CheckboxCardRootProps<string>> | undefined, useRootComponentProps: <Y extends import("@yamada-ui/utils").Dict = {}, R extends keyof Y = keyof Y>(props: Y, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"group" | "description" | "root" | "indicator" | "addon", {
213
213
  justify: {
214
214
  end: {
215
215
  addon: {
@@ -355,7 +355,7 @@ declare const component: <H extends As | "fragment" = "div", R extends import("@
355
355
  };
356
356
  };
357
357
  };
358
- }>>> | undefined, { className, withContext, transferProps }?: UseComponentPropsOptions<R>) => [CSSSlotObject, Merge<WithoutThemeProps<Y, ComponentSlotStyle<"group" | "root" | "description" | "indicator" | "addon", {
358
+ }>>> | undefined, { className, withContext, transferProps }?: UseComponentPropsOptions<R>) => [CSSSlotObject, Merge<WithoutThemeProps<Y, ComponentSlotStyle<"group" | "description" | "root" | "indicator" | "addon", {
359
359
  justify: {
360
360
  end: {
361
361
  addon: {
@@ -1,6 +1,6 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import "../../index.js";
3
- export declare const checkboxCardStyle: ComponentSlotStyle<"group" | "root" | "description" | "indicator" | "addon", {
3
+ export declare const checkboxCardStyle: ComponentSlotStyle<"group" | "description" | "root" | "indicator" | "addon", {
4
4
  /**
5
5
  * The justify indicator of the component
6
6
  *
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const colorPickerStyle: ComponentSlotStyle<"input" | "content" | "icon" | "colorSwatch" | "root" | "field" | "eyeDropper", CSSPropObject<CSSSlotObject<"input" | "content" | "icon" | "colorSwatch" | "root" | "field" | "eyeDropper">>, {
4
+ export declare const colorPickerStyle: ComponentSlotStyle<"input" | "content" | "icon" | "colorSwatch" | "eyeDropper" | "field" | "root", CSSPropObject<CSSSlotObject<"input" | "content" | "icon" | "colorSwatch" | "eyeDropper" | "field" | "root">>, {
5
5
  xs: {
6
6
  field: {
7
7
  fontSize: "1em";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const colorSelectorStyle: ComponentSlotStyle<"hueSlider" | "saturationSlider" | "root" | "eyeDropper" | "colorSwatchGroupLabel" | "alphaSlider" | "colorSwatchGroup" | "colorSwatchItem", {
4
+ export declare const colorSelectorStyle: ComponentSlotStyle<"hueSlider" | "saturationSlider" | "eyeDropper" | "root" | "colorSwatchGroupLabel" | "alphaSlider" | "colorSwatchGroup" | "colorSwatchItem", {
5
5
  /**
6
6
  * The shape of the thumb and color swatch.
7
7
  *
@@ -22,5 +22,5 @@ export declare const colorSelectorStyle: ComponentSlotStyle<"hueSlider" | "satur
22
22
  md: {};
23
23
  lg: {};
24
24
  xl: {};
25
- }, CSSModifierObject<CSSSlotObject<"hueSlider" | "saturationSlider" | "root" | "eyeDropper" | "colorSwatchGroupLabel" | "alphaSlider" | "colorSwatchGroup" | "colorSwatchItem">>>;
25
+ }, CSSModifierObject<CSSSlotObject<"hueSlider" | "saturationSlider" | "eyeDropper" | "root" | "colorSwatchGroupLabel" | "alphaSlider" | "colorSwatchGroup" | "colorSwatchItem">>>;
26
26
  export type ColorSelectorStyle = typeof colorSelectorStyle;
@@ -1,6 +1,6 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import "../../index.js";
3
- export declare const dataListStyle: ComponentSlotStyle<"term" | "root" | "item" | "description", {
3
+ export declare const dataListStyle: ComponentSlotStyle<"term" | "item" | "description" | "root", {
4
4
  /**
5
5
  * The orientation of the data list.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const datePickerStyle: ComponentSlotStyle<"input" | "content" | "separator" | "icon" | "root" | "field" | "adjust", CSSPropObject<CSSSlotObject<"input" | "content" | "separator" | "icon" | "root" | "field" | "adjust">>, {
4
+ export declare const datePickerStyle: ComponentSlotStyle<"input" | "content" | "separator" | "icon" | "field" | "root" | "adjust", CSSPropObject<CSSSlotObject<"input" | "content" | "separator" | "icon" | "field" | "root" | "adjust">>, {
5
5
  xs: {
6
6
  field: {
7
7
  fontSize: "1em";
@@ -33,7 +33,7 @@ declare const DropzonePropsContext: import("react").Context<Partial<DropzoneRoot
33
33
  *
34
34
  * @see https://yamada-ui.com/docs/components/dropzone
35
35
  */
36
- export declare const DropzoneRoot: Component<({ children, errorBorderColor, focusBorderColor, loadingScheme, inputProps, loadingProps, overlayProps, ...rest }: WithoutThemeProps<DropzoneRootProps, ComponentSlotStyle<"title" | "overlay" | "loading" | "icon" | "root" | "description", CSSPropObject<CSSSlotObject<"title" | "overlay" | "loading" | "icon" | "root" | "description">>, {
36
+ export declare const DropzoneRoot: Component<({ children, errorBorderColor, focusBorderColor, loadingScheme, inputProps, loadingProps, overlayProps, ...rest }: WithoutThemeProps<DropzoneRootProps, ComponentSlotStyle<"title" | "overlay" | "loading" | "icon" | "description" | "root", CSSPropObject<CSSSlotObject<"title" | "overlay" | "loading" | "icon" | "description" | "root">>, {
37
37
  xs: {
38
38
  root: {
39
39
  minH: "xs";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const dropzoneStyle: ComponentSlotStyle<"title" | "overlay" | "loading" | "icon" | "root" | "description", CSSPropObject<CSSSlotObject<"title" | "overlay" | "loading" | "icon" | "root" | "description">>, {
4
+ export declare const dropzoneStyle: ComponentSlotStyle<"title" | "overlay" | "loading" | "icon" | "description" | "root", CSSPropObject<CSSSlotObject<"title" | "overlay" | "loading" | "icon" | "description" | "root">>, {
5
5
  xs: {
6
6
  root: {
7
7
  minH: "xs";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const emptyState: ComponentSlotStyle<"title" | "content" | "root" | "description" | "indicator", CSSPropObject<CSSSlotObject<"title" | "content" | "root" | "description" | "indicator">>, {
4
+ export declare const emptyState: ComponentSlotStyle<"title" | "content" | "description" | "root" | "indicator", CSSPropObject<CSSSlotObject<"title" | "content" | "description" | "root" | "indicator">>, {
5
5
  sm: {
6
6
  content: {
7
7
  gap: "xs";
@@ -47,5 +47,5 @@ export declare const emptyState: ComponentSlotStyle<"title" | "content" | "root"
47
47
  fontSize: "xl";
48
48
  };
49
49
  };
50
- }, CSSModifierObject<CSSSlotObject<"title" | "content" | "root" | "description" | "indicator">>>;
50
+ }, CSSModifierObject<CSSSlotObject<"title" | "content" | "description" | "root" | "indicator">>>;
51
51
  export type EmptyState = typeof emptyState;
@@ -67,5 +67,5 @@ declare const FlipPropsContext: import("react").Context<Partial<FlipProps> | und
67
67
  *
68
68
  * @see https://yamada-ui.com/docs/components/flip
69
69
  */
70
- export declare const Flip: Component<({ defaultValue, delay, disabled, duration, from, orientation, readOnly, to, transition, value: valueProp, onChange, onClick: onClickProp, ...rest }: WithoutThemeProps<FlipProps, ComponentSlotStyle<"from" | "to" | "root" | "item", CSSPropObject<CSSSlotObject<"from" | "to" | "root" | "item">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "root" | "item">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "root" | "item">>>, keyof FlipProps>) => import("react").JSX.Element, FlipProps>;
70
+ export declare const Flip: Component<({ defaultValue, delay, disabled, duration, from, orientation, readOnly, to, transition, value: valueProp, onChange, onClick: onClickProp, ...rest }: WithoutThemeProps<FlipProps, ComponentSlotStyle<"from" | "to" | "item" | "root", CSSPropObject<CSSSlotObject<"from" | "to" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "item" | "root">>>, keyof FlipProps>) => import("react").JSX.Element, FlipProps>;
71
71
  export { FlipPropsContext, useFlipPropsContext };
@@ -1,5 +1,5 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const flipStyle: ComponentSlotStyle<"from" | "to" | "root" | "item", CSSPropObject<CSSSlotObject<"from" | "to" | "root" | "item">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "root" | "item">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "root" | "item">>>;
4
+ export declare const flipStyle: ComponentSlotStyle<"from" | "to" | "item" | "root", CSSPropObject<CSSSlotObject<"from" | "to" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"from" | "to" | "item" | "root">>>;
5
5
  export type FlipStyle = typeof flipStyle;
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const formStyle: ComponentSlotStyle<"body" | "footer" | "header" | "title" | "group" | "root" | "description" | "submitButton", CSSPropObject<CSSSlotObject<"body" | "footer" | "header" | "title" | "group" | "root" | "description" | "submitButton">>, {
4
+ export declare const formStyle: ComponentSlotStyle<"body" | "footer" | "header" | "title" | "group" | "description" | "root" | "submitButton", CSSPropObject<CSSSlotObject<"body" | "footer" | "header" | "title" | "group" | "description" | "root" | "submitButton">>, {
5
5
  sm: {
6
6
  body: {
7
7
  gap: "5";
@@ -6,7 +6,7 @@ import "../../index.js";
6
6
  import "../../core/index.js";
7
7
  import { IconStyle } from "./icon.style.js";
8
8
  export interface IconProps extends HTMLStyledProps<"svg">, ThemeProps<IconStyle> {}
9
- declare const component: <D extends As | "fragment" = "div", H extends import("@yamada-ui/utils").Dict = IconProps>(el: D | import("react").FC<H>, { name, className, ...options }?: ComponentOptions) => (initialProps?: InitialProps<H>, ...superProps: SuperProps<H>[]) => D extends "fragment" ? import("react").FunctionComponent<H> : Component<Exclude<D, "fragment">, H>, IconPropsContext: import("react").Context<Partial<IconProps> | undefined>, useIconPropsContext: () => Partial<IconProps> | undefined, withContext: <D extends As | "fragment" = "div", H extends IconProps = IconProps, R extends keyof H = keyof H>(el: D | import("react").FC<WithoutThemeProps<H, ComponentStyle<CSSPropObject<CSSObject>, CSSModifierObject, CSSModifierObject>, R>>, { name, className, withContext, transferProps, ...options }?: ComponentWithContextOptions<R>) => (initialProps?: InitialProps<H>, ...superProps: SuperWithoutThemeProps<H, ComponentStyle<CSSPropObject<CSSObject>, CSSModifierObject, CSSModifierObject>, R>[]) => D extends "fragment" ? import("react").FunctionComponent<H> : Component<Exclude<D, "fragment">, H>;
9
+ declare const component: <D extends "fragment" | As = "div", H extends import("@yamada-ui/utils").Dict = IconProps>(el: D | import("react").FC<H>, { name, className, ...options }?: ComponentOptions) => (initialProps?: InitialProps<H>, ...superProps: SuperProps<H>[]) => D extends "fragment" ? import("react").FunctionComponent<H> : Component<Exclude<D, "fragment">, H>, IconPropsContext: import("react").Context<Partial<IconProps> | undefined>, useIconPropsContext: () => Partial<IconProps> | undefined, withContext: <D extends "fragment" | As = "div", H extends IconProps = IconProps, R extends keyof H = keyof H>(el: D | import("react").FC<WithoutThemeProps<H, ComponentStyle<CSSPropObject<CSSObject>, CSSModifierObject, CSSModifierObject>, R>>, { name, className, withContext, transferProps, ...options }?: ComponentWithContextOptions<R>) => (initialProps?: InitialProps<H>, ...superProps: SuperWithoutThemeProps<H, ComponentStyle<CSSPropObject<CSSObject>, CSSModifierObject, CSSModifierObject>, R>[]) => D extends "fragment" ? import("react").FunctionComponent<H> : Component<Exclude<D, "fragment">, H>;
10
10
  /**
11
11
  * `Icon` is a general icon component that can be used in your projects.
12
12
  *
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const listStyle: ComponentSlotStyle<"icon" | "root" | "item", {
4
+ export declare const listStyle: ComponentSlotStyle<"icon" | "item" | "root", {
5
5
  styleType: {
6
6
  circle: {
7
7
  root: {
@@ -35,5 +35,5 @@ export declare const listStyle: ComponentSlotStyle<"icon" | "root" | "item", {
35
35
  };
36
36
  };
37
37
  };
38
- }, CSSModifierObject<CSSSlotObject<"icon" | "root" | "item">>, CSSModifierObject<CSSSlotObject<"icon" | "root" | "item">>>;
38
+ }, CSSModifierObject<CSSSlotObject<"icon" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"icon" | "item" | "root">>>;
39
39
  export type ListStyle = typeof listStyle;
@@ -17,5 +17,5 @@ export interface LoadingProps extends WithoutThemeProps<IconProps>, ThemeProps<L
17
17
  */
18
18
  secondaryColor?: CSSProps["color"];
19
19
  }
20
- declare const LoadingPropsContext: import("react").Context<Partial<LoadingProps> | undefined>, useLoadingPropsContext: () => Partial<LoadingProps> | undefined, withContext: <D extends As | "fragment" = "div", H extends LoadingProps = LoadingProps, R extends keyof H = keyof H>(el: D | import("react").FC<WithoutThemeProps<H, ComponentStyle<CSSPropObject<CSSObject>, CSSModifierObject, CSSModifierObject>, R>>, { name, className, withContext, transferProps, ...options }?: ComponentWithContextOptions<R>) => (initialProps?: InitialProps<H>, ...superProps: SuperWithoutThemeProps<H, ComponentStyle<CSSPropObject<CSSObject>, CSSModifierObject, CSSModifierObject>, R>[]) => D extends "fragment" ? import("react").FunctionComponent<H> : Component<Exclude<D, "fragment">, H>;
20
+ declare const LoadingPropsContext: import("react").Context<Partial<LoadingProps> | undefined>, useLoadingPropsContext: () => Partial<LoadingProps> | undefined, withContext: <D extends "fragment" | As = "div", H extends LoadingProps = LoadingProps, R extends keyof H = keyof H>(el: D | import("react").FC<WithoutThemeProps<H, ComponentStyle<CSSPropObject<CSSObject>, CSSModifierObject, CSSModifierObject>, R>>, { name, className, withContext, transferProps, ...options }?: ComponentWithContextOptions<R>) => (initialProps?: InitialProps<H>, ...superProps: SuperWithoutThemeProps<H, ComponentStyle<CSSPropObject<CSSObject>, CSSModifierObject, CSSModifierObject>, R>[]) => D extends "fragment" ? import("react").FunctionComponent<H> : Component<Exclude<D, "fragment">, H>;
21
21
  export { LoadingPropsContext, useLoadingPropsContext };
@@ -1,5 +1,5 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const marqueeStyle: ComponentSlotStyle<"content" | "group" | "root" | "item" | "edge", CSSPropObject<CSSSlotObject<"content" | "group" | "root" | "item" | "edge">>, CSSModifierObject<CSSSlotObject<"content" | "group" | "root" | "item" | "edge">>, CSSModifierObject<CSSSlotObject<"content" | "group" | "root" | "item" | "edge">>>;
4
+ export declare const marqueeStyle: ComponentSlotStyle<"content" | "group" | "item" | "root" | "edge", CSSPropObject<CSSSlotObject<"content" | "group" | "item" | "root" | "edge">>, CSSModifierObject<CSSSlotObject<"content" | "group" | "item" | "root" | "edge">>, CSSModifierObject<CSSSlotObject<"content" | "group" | "item" | "root" | "edge">>>;
5
5
  export type MarqueeStyle = typeof marqueeStyle;
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const nativeAccordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "root" | "item", {
4
+ export declare const nativeAccordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "item" | "root", {
5
5
  /**
6
6
  * If `true`, animate the accordion items when they are expanded or collapsed.
7
7
  *
@@ -31,7 +31,7 @@ export declare const nativeAccordionStyle: ComponentSlotStyle<"button" | "panel"
31
31
  };
32
32
  };
33
33
  };
34
- }, CSSModifierObject<CSSSlotObject<"button" | "panel" | "icon" | "root" | "item">>, {
34
+ }, CSSModifierObject<CSSSlotObject<"button" | "panel" | "icon" | "item" | "root">>, {
35
35
  panel: {
36
36
  button: {
37
37
  rounded: "l2";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const nativeSelectStyle: ComponentSlotStyle<"icon" | "root" | "field", CSSPropObject<CSSSlotObject<"icon" | "root" | "field">>, {
4
+ export declare const nativeSelectStyle: ComponentSlotStyle<"icon" | "field" | "root", CSSPropObject<CSSSlotObject<"icon" | "field" | "root">>, {
5
5
  xs: {
6
6
  field: {
7
7
  fontSize: "1em";
@@ -1,5 +1,5 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const noticeStyle: ComponentSlotStyle<"content" | "closeButton" | "root" | "item", CSSPropObject<CSSSlotObject<"content" | "closeButton" | "root" | "item">>, CSSModifierObject<CSSSlotObject<"content" | "closeButton" | "root" | "item">>, CSSModifierObject<CSSSlotObject<"content" | "closeButton" | "root" | "item">>>;
4
+ export declare const noticeStyle: ComponentSlotStyle<"content" | "closeButton" | "item" | "root", CSSPropObject<CSSSlotObject<"content" | "closeButton" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"content" | "closeButton" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"content" | "closeButton" | "item" | "root">>>;
5
5
  export type NoticeStyle = typeof noticeStyle;
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const numberInputStyle: ComponentSlotStyle<"button" | "root" | "field" | "control" | "decrement" | "increment", CSSPropObject<CSSSlotObject<"button" | "root" | "field" | "control" | "decrement" | "increment">>, {
4
+ export declare const numberInputStyle: ComponentSlotStyle<"button" | "field" | "root" | "control" | "decrement" | "increment", CSSPropObject<CSSSlotObject<"button" | "field" | "root" | "control" | "decrement" | "increment">>, {
5
5
  xs: {
6
6
  control: {
7
7
  boxSize: "calc({--height} - {spaces.2})";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const paginationStyle: ComponentSlotStyle<"text" | "root" | "item", CSSPropObject<CSSSlotObject<"text" | "root" | "item">>, {
4
+ export declare const paginationStyle: ComponentSlotStyle<"text" | "item" | "root", CSSPropObject<CSSSlotObject<"text" | "item" | "root">>, {
5
5
  xs: {
6
6
  item: {
7
7
  fontSize: "{font-size}";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const passwordInputStyle: ComponentSlotStyle<"button" | "root" | "field", CSSPropObject<CSSSlotObject<"button" | "root" | "field">>, {
4
+ export declare const passwordInputStyle: ComponentSlotStyle<"button" | "field" | "root", CSSPropObject<CSSSlotObject<"button" | "field" | "root">>, {
5
5
  xs: {
6
6
  button: {
7
7
  boxSize: "calc({--height} - {spaces.2})";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const pinInputStyle: ComponentSlotStyle<"root" | "field", CSSPropObject<CSSSlotObject<"root" | "field">>, {
4
+ export declare const pinInputStyle: ComponentSlotStyle<"field" | "root", CSSPropObject<CSSSlotObject<"field" | "root">>, {
5
5
  xs: {
6
6
  field: {
7
7
  boxSize: string | undefined;
@@ -28,7 +28,7 @@ export interface RadioProps<Y extends string = string> extends Merge<HTMLStyledP
28
28
  */
29
29
  rootProps?: HTMLStyledProps<"label">;
30
30
  }
31
- declare const component: <H extends As | "fragment" = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"label" | "group" | "root" | "indicator", {
31
+ declare const component: <H extends "fragment" | As = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"label" | "group" | "root" | "indicator", {
32
32
  shape: {
33
33
  circle: {
34
34
  indicator: {
@@ -55,7 +55,7 @@ export interface RadioCardRootProps<Y extends string = string> extends Merge<HTM
55
55
  */
56
56
  rootProps?: HTMLStyledProps<"label">;
57
57
  }
58
- declare const component: <H extends As | "fragment" = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"group" | "root" | "description" | "indicator" | "addon", {
58
+ declare const component: <H extends "fragment" | As = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"group" | "description" | "root" | "indicator" | "addon", {
59
59
  justify: {
60
60
  end: {
61
61
  addon: {
@@ -228,7 +228,7 @@ declare const component: <H extends As | "fragment" = "div", R extends import("@
228
228
  };
229
229
  };
230
230
  };
231
- }>>> | undefined, { name, className, ...options }?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ? import("react").FunctionComponent<R> : Component<Exclude<H, "fragment">, R>, RadioCardPropsContext: import("react").Context<Partial<RadioCardRootProps<string>> | undefined>, useRadioCardPropsContext: () => Partial<RadioCardRootProps<string>> | undefined, useRootComponentProps: <Y extends import("@yamada-ui/utils").Dict = {}, R extends keyof Y = keyof Y>(props: Y, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"group" | "root" | "description" | "indicator" | "addon", {
231
+ }>>> | undefined, { name, className, ...options }?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ? import("react").FunctionComponent<R> : Component<Exclude<H, "fragment">, R>, RadioCardPropsContext: import("react").Context<Partial<RadioCardRootProps<string>> | undefined>, useRadioCardPropsContext: () => Partial<RadioCardRootProps<string>> | undefined, useRootComponentProps: <Y extends import("@yamada-ui/utils").Dict = {}, R extends keyof Y = keyof Y>(props: Y, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"group" | "description" | "root" | "indicator" | "addon", {
232
232
  justify: {
233
233
  end: {
234
234
  addon: {
@@ -401,7 +401,7 @@ declare const component: <H extends As | "fragment" = "div", R extends import("@
401
401
  };
402
402
  };
403
403
  };
404
- }>>> | undefined, { className, withContext, transferProps }?: UseComponentPropsOptions<R>) => [CSSSlotObject, Merge<WithoutThemeProps<Y, ComponentSlotStyle<"group" | "root" | "description" | "indicator" | "addon", {
404
+ }>>> | undefined, { className, withContext, transferProps }?: UseComponentPropsOptions<R>) => [CSSSlotObject, Merge<WithoutThemeProps<Y, ComponentSlotStyle<"group" | "description" | "root" | "indicator" | "addon", {
405
405
  justify: {
406
406
  end: {
407
407
  addon: {
@@ -1,6 +1,6 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import "../../index.js";
3
- export declare const radioCardStyle: ComponentSlotStyle<"group" | "root" | "description" | "indicator" | "addon", {
3
+ export declare const radioCardStyle: ComponentSlotStyle<"group" | "description" | "root" | "indicator" | "addon", {
4
4
  /**
5
5
  * The justify indicator of the component
6
6
  *
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const ratingStyle: ComponentSlotStyle<"group" | "icon" | "root" | "item", CSSPropObject<CSSSlotObject<"group" | "icon" | "root" | "item">>, {
4
+ export declare const ratingStyle: ComponentSlotStyle<"group" | "icon" | "item" | "root", CSSPropObject<CSSSlotObject<"group" | "icon" | "item" | "root">>, {
5
5
  xs: {
6
6
  icon: {
7
7
  fontSize: "md";
@@ -27,5 +27,5 @@ export declare const ratingStyle: ComponentSlotStyle<"group" | "icon" | "root" |
27
27
  fontSize: "3xl";
28
28
  };
29
29
  };
30
- }, CSSModifierObject<CSSSlotObject<"group" | "icon" | "root" | "item">>>;
30
+ }, CSSModifierObject<CSSSlotObject<"group" | "icon" | "item" | "root">>>;
31
31
  export type RatingStyle = typeof ratingStyle;
@@ -1,6 +1,6 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import "../../index.js";
3
- export declare const reorderStyle: ComponentSlotStyle<"root" | "trigger" | "item", {
3
+ export declare const reorderStyle: ComponentSlotStyle<"item" | "root" | "trigger", {
4
4
  /**
5
5
  * The orientation of the reorder.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const resizableStyle: ComponentSlotStyle<"icon" | "root" | "trigger" | "item", {
4
+ export declare const resizableStyle: ComponentSlotStyle<"icon" | "item" | "root" | "trigger", {
5
5
  /**
6
6
  * The orientation of the resizable.
7
7
  *
@@ -19,7 +19,7 @@ export declare const resizableStyle: ComponentSlotStyle<"icon" | "root" | "trigg
19
19
  };
20
20
  };
21
21
  };
22
- }, CSSModifierObject<CSSSlotObject<"icon" | "root" | "trigger" | "item">>, {
22
+ }, CSSModifierObject<CSSSlotObject<"icon" | "item" | "root" | "trigger">>, {
23
23
  border: {
24
24
  icon: {
25
25
  bg: "colorScheme.muted";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import { CSSModifierObject, CSSSlotObject } from "../../core/css/index.type.js";
3
3
  import "../../index.js";
4
- export declare const segmentedControlStyle: ComponentSlotStyle<"root" | "item" | "indicator", {
4
+ export declare const segmentedControlStyle: ComponentSlotStyle<"item" | "root" | "indicator", {
5
5
  /**
6
6
  * If `true`, the segmented control will be full rounded.
7
7
  *
@@ -113,5 +113,5 @@ export declare const segmentedControlStyle: ComponentSlotStyle<"root" | "item" |
113
113
  };
114
114
  };
115
115
  };
116
- }, CSSModifierObject<CSSSlotObject<"root" | "item" | "indicator">>>;
116
+ }, CSSModifierObject<CSSSlotObject<"item" | "root" | "indicator">>>;
117
117
  export type SegmentedControlStyle = typeof segmentedControlStyle;
@@ -1,6 +1,6 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import "../../index.js";
3
- export declare const selectStyle: ComponentSlotStyle<"label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "indicator" | "field" | "valueText", {
3
+ export declare const selectStyle: ComponentSlotStyle<"label" | "option" | "content" | "group" | "separator" | "icon" | "field" | "root" | "indicator" | "valueText", {
4
4
  /**
5
5
  * If `true`, wrap the value text.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import "../../index.js";
3
- export declare const stepsStyle: ComponentSlotStyle<"title" | "list" | "separator" | "root" | "item" | "description" | "indicator", {
3
+ export declare const stepsStyle: ComponentSlotStyle<"title" | "list" | "separator" | "item" | "description" | "root" | "indicator", {
4
4
  /**
5
5
  * The orientation of the steps.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import "../../index.js";
3
- export declare const tagStyle: ComponentSlotStyle<"content" | "icon" | "closeButton" | "root" | "endIcon" | "startIcon", {
3
+ export declare const tagStyle: ComponentSlotStyle<"content" | "icon" | "closeButton" | "endIcon" | "startIcon" | "root", {
4
4
  /**
5
5
  * If `true`, the tag is full rounded. Else, it'll be slightly round.
6
6
  *
@@ -61,7 +61,7 @@ declare const TimelinePropsContext: import("react").Context<Partial<TimelineRoot
61
61
  *
62
62
  * @see https://yamada-ui.com/docs/components/timeline
63
63
  */
64
- export declare const TimelineRoot: Component<({ variant: variantProp, children, index, items, ...rest }: WithoutThemeProps<TimelineRootProps, ComponentSlotStyle<"title" | "content" | "root" | "item" | "description" | "indicator" | "connector", {
64
+ export declare const TimelineRoot: Component<({ variant: variantProp, children, index, items, ...rest }: WithoutThemeProps<TimelineRootProps, ComponentSlotStyle<"title" | "content" | "item" | "description" | "root" | "indicator" | "connector", {
65
65
  align: {
66
66
  center: {
67
67
  content: {
@@ -1,6 +1,6 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import "../../index.js";
3
- export declare const timelineStyle: ComponentSlotStyle<"title" | "content" | "root" | "item" | "description" | "indicator" | "connector", {
3
+ export declare const timelineStyle: ComponentSlotStyle<"title" | "content" | "item" | "description" | "root" | "indicator" | "connector", {
4
4
  /**
5
5
  * The alignment of the timeline.
6
6
  *
@@ -12,7 +12,7 @@ import { ToggleStyle } from "./toggle.style.js";
12
12
  import { UseToggleProps } from "./use-toggle.js";
13
13
  import { ReactElement } from "react";
14
14
  export interface ToggleProps<Y extends string = string> extends Omit<WithoutThemeProps<IconButtonProps, ToggleStyle>, "aria-label" | "onChange" | "ref" | "value">, UseToggleProps<Y>, Pick<UseInputBorderProps, "errorBorderColor">, ThemeProps<ToggleStyle> {}
15
- declare const component: <H extends As | "fragment" = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"group" | "root", {
15
+ declare const component: <H extends "fragment" | As = "div", R extends import("@yamada-ui/utils").Dict = import("@yamada-ui/utils").Dict<any>>(el: H | import("react").FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"group" | "root", {
16
16
  fullRounded: {
17
17
  true: {
18
18
  root: {
@@ -1,6 +1,6 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.type.js";
2
2
  import "../../index.js";
3
- export declare const treeStyle: ComponentSlotStyle<"label" | "checkbox" | "group" | "end" | "start" | "element" | "root" | "item" | "indicator", {
3
+ export declare const treeStyle: ComponentSlotStyle<"label" | "checkbox" | "group" | "end" | "start" | "element" | "item" | "root" | "indicator", {
4
4
  /**
5
5
  * The shape of the component
6
6
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yamada-ui/react",
3
3
  "type": "module",
4
- "version": "2.3.4-dev-20261116075346",
4
+ "version": "2.3.4-dev-20261116083009",
5
5
  "description": "React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion",
6
6
  "keywords": [
7
7
  "yamada",