@yamada-ui/react 2.3.4-dev-20261116083348 → 2.3.4-dev-20261116090244

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.
@@ -9,7 +9,7 @@ const require_use_field_props = require("../field/use-field-props.cjs");
9
9
  let react = require("react");
10
10
  // src/components/file-input/use-file-input.ts
11
11
  const useFileInput = (props) => {
12
- const { context: { labelId } = {}, props: { id, ref, form, name, accept, defaultValue, disabled, multiple, placeholder, readOnly, required, resetRef, value, onChange: onChangeProp, onClick: onClickProp, ...rest }, ariaProps, dataProps, eventProps } = require_use_field_props.useFieldProps({
12
+ const { context: { labelId } = {}, props: { id, ref, form, name, accept, defaultValue, disabled, multiple, placeholder, readOnly, required, resetRef, value, onChange: onChangeProp, ...rest }, ariaProps, dataProps, eventProps } = require_use_field_props.useFieldProps({
13
13
  ...props,
14
14
  notSupportReadOnly: true
15
15
  });
@@ -33,21 +33,14 @@ const useFileInput = (props) => {
33
33
  const files = !(0, require_utils_index.utils_exports.isNull)(ev.currentTarget.files) ? Array.from(ev.currentTarget.files) : void 0;
34
34
  setValues(files?.length ? files : void 0);
35
35
  }, [setValues]);
36
- const clickableProps = require_hooks_use_clickable_index.useClickable({
37
- ...ariaProps,
38
- ...dataProps,
39
- ...eventProps,
40
- ...rest,
36
+ const clickableProps = require_hooks_use_clickable_index.useClickable(require_props.mergeProps(ariaProps, dataProps, eventProps, rest, {
41
37
  disabled: !interactive,
42
38
  focusable: readOnly && !disabled,
43
39
  focusOnClick: interactive,
44
- onClick: (0, require_utils_index.utils_exports.handlerAll)(onClickProp, onClick)
45
- });
40
+ onClick
41
+ })());
46
42
  require_ref.assignRef(resetRef, onReset);
47
- const getInputProps = (0, react.useCallback)((props = {}) => require_props.mergeProps({
48
- ...require_dom.visuallyHiddenAttributes,
49
- ...ariaProps,
50
- ...dataProps,
43
+ const getInputProps = (0, react.useCallback)((props = {}) => require_props.mergeProps(require_dom.visuallyHiddenAttributes, ariaProps, dataProps, {
51
44
  id,
52
45
  ref: inputRef,
53
46
  form,
@@ -1 +1 @@
1
- {"version":3,"file":"use-file-input.cjs","names":["useFieldProps","useRef","useControllableState","useCallback","useClickable","mergeProps","visuallyHiddenAttributes"],"sources":["../../../../src/components/file-input/use-file-input.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent, RefObject } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { Dict } from \"../../utils\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback, useRef } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useClickable } from \"../../hooks/use-clickable\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport {\n assignRef,\n dataAttr,\n handlerAll,\n has,\n isNull,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\nexport type UseFileInputProps<Y extends \"button\" | \"input\" = \"input\"> =\n FieldProps &\n Omit<HTMLProps<Y>, \"defaultValue\" | \"onChange\" | \"ref\" | \"value\"> &\n Pick<HTMLProps<\"input\">, \"accept\" | \"multiple\" | \"placeholder\" | \"ref\"> & {\n /**\n * The initial value of the file input.\n */\n defaultValue?: File[]\n /**\n * Ref to a reset function.\n */\n resetRef?: RefObject<(() => void) | null>\n /**\n * The value of the file input.\n */\n value?: File[]\n /**\n * Function to be called when a file change event occurs.\n */\n onChange?: (files: File[] | undefined) => void\n }\n\nexport const useFileInput = <Y extends \"button\" | \"input\" = \"input\">(\n props: UseFileInputProps<Y>,\n) => {\n const {\n context: { labelId } = {},\n props: {\n id,\n ref,\n form,\n name,\n accept,\n defaultValue,\n disabled,\n multiple,\n placeholder,\n readOnly,\n required,\n resetRef,\n value,\n onChange: onChangeProp,\n onClick: onClickProp,\n ...rest\n },\n ariaProps,\n dataProps,\n eventProps,\n } = useFieldProps<HTMLElement, UseFileInputProps<Y>>({\n ...props,\n notSupportReadOnly: true,\n })\n const interactive = !(readOnly || disabled)\n const inputRef = useRef<HTMLInputElement>(null)\n const [values, setValues] = useControllableState<File[] | undefined>({\n defaultValue,\n value,\n onChange: onChangeProp,\n })\n const count = values?.length ?? 0\n\n const onClick = useCallback(() => {\n if (!interactive) return\n\n inputRef.current?.click()\n }, [interactive])\n\n const onReset = useCallback(() => {\n if (inputRef.current) inputRef.current.value = \"\"\n\n setValues(undefined)\n }, [setValues])\n\n const onChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n const files = !isNull(ev.currentTarget.files)\n ? Array.from(ev.currentTarget.files)\n : undefined\n\n setValues(files?.length ? files : undefined)\n },\n [setValues],\n )\n\n const clickableProps = useClickable<HTMLElement, Dict>({\n ...ariaProps,\n ...dataProps,\n ...eventProps,\n ...rest,\n disabled: !interactive,\n focusable: readOnly && !disabled,\n focusOnClick: interactive,\n onClick: handlerAll(onClickProp, onClick),\n })\n\n assignRef(resetRef, onReset)\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) =>\n mergeProps(\n {\n ...visuallyHiddenAttributes,\n ...ariaProps,\n ...dataProps,\n id,\n ref: inputRef,\n form,\n type: \"file\",\n name,\n accept,\n disabled,\n multiple,\n readOnly,\n required,\n },\n props,\n { ref, onChange },\n )(),\n [\n required,\n ariaProps,\n dataProps,\n id,\n form,\n name,\n accept,\n disabled,\n multiple,\n readOnly,\n ref,\n onChange,\n ],\n )\n\n const getFieldProps: PropGetter = useCallback(\n (props = {}) => {\n const hasLabel =\n has(props, [\"aria-label\", \"aria-labelledby\"], { truthy: true }) ||\n has(clickableProps, [\"aria-label\", \"aria-labelledby\"], { truthy: true })\n const hasPlaceholder = !!placeholder?.trim()\n const hasValues = !!count\n\n return mergeProps(\n {\n \"data-placeholder\": dataAttr(!count),\n ...clickableProps,\n \"aria-labelledby\":\n clickableProps[\"aria-labelledby\"] ??\n (!hasLabel && !hasPlaceholder && !hasValues ? labelId : undefined),\n tabIndex: interactive ? 0 : clickableProps.tabIndex,\n },\n props,\n )()\n },\n [clickableProps, count, interactive, labelId, placeholder],\n )\n\n return {\n disabled,\n interactive,\n readOnly,\n required,\n values,\n clickableProps,\n getFieldProps,\n getInputProps,\n }\n}\n\nexport type UseFileInputReturn = ReturnType<typeof useFileInput>\n"],"mappings":";;;;;;;;;;AA0CA,MAAa,gBACX,UACG;CACH,MAAM,EACJ,SAAS,EAAE,YAAY,CAAC,GACxB,OAAO,EACL,IACA,KACA,MACA,MACA,QACA,cACA,UACA,UACA,aACA,UACA,UACA,UACA,OACA,UAAU,cACV,SAAS,aACT,GAAG,QAEL,WACA,WACA,eACEA,wBAAAA,cAAiD;EACnD,GAAG;EACH,oBAAoB;CACtB,CAAC;CACD,MAAM,cAAc,EAAE,YAAY;CAClC,MAAM,YAAA,GAAWC,MAAAA,OAAAA,CAAyB,IAAI;CAC9C,MAAM,CAAC,QAAQ,aAAaC,2CAAAA,qBAAyC;EACnE;EACA;EACA,UAAU;CACZ,CAAC;CACD,MAAM,QAAQ,QAAQ,UAAU;CAEhC,MAAM,WAAA,GAAUC,MAAAA,YAAAA,OAAkB;EAChC,IAAI,CAAC,aAAa;EAElB,SAAS,SAAS,MAAM;CAC1B,GAAG,CAAC,WAAW,CAAC;CAEhB,MAAM,WAAA,GAAUA,MAAAA,YAAAA,OAAkB;EAChC,IAAI,SAAS,SAAS,SAAS,QAAQ,QAAQ;EAE/C,UAAU,KAAA,CAAS;CACrB,GAAG,CAAC,SAAS,CAAC;CAEd,MAAM,YAAA,GAAWA,MAAAA,YAAAA,EACd,OAAsC;EACrC,MAAM,QAAQ,EAAA,GAAA,oBAAA,cAAC,OAAA,CAAO,GAAG,cAAc,KAAK,IACxC,MAAM,KAAK,GAAG,cAAc,KAAK,IACjC,KAAA;EAEJ,UAAU,OAAO,SAAS,QAAQ,KAAA,CAAS;CAC7C,GACA,CAAC,SAAS,CACZ;CAEA,MAAM,iBAAiBC,kCAAAA,aAAgC;EACrD,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,UAAU,CAAC;EACX,WAAW,YAAY,CAAC;EACxB,cAAc;EACd,UAAA,GAAA,oBAAA,cAAS,WAAA,CAAW,aAAa,OAAO;CAC1C,CAAC;CAED,YAAA,UAAU,UAAU,OAAO;CAE3B,MAAM,iBAAA,GAAqCD,MAAAA,YAAAA,EACxC,QAAQ,CAAC,MACRE,cAAAA,WACE;EACE,GAAGC,YAAAA;EACH,GAAG;EACH,GAAG;EACH;EACA,KAAK;EACL;EACA,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;CACF,GACA,OACA;EAAE;EAAK;CAAS,CAClB,CAAC,CAAC,GACJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAyBA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA,gBAAA,GA9BgCH,MAAAA,YAAAA,EAC/B,QAAQ,CAAC,MAAM;GACd,MAAM,YAAA,GAAA,oBAAA,cACJ,IAAA,CAAI,OAAO,CAAC,cAAc,iBAAiB,GAAG,EAAE,QAAQ,KAAK,CAAC,MAAA,GAAA,oBAAA,cAC9D,IAAA,CAAI,gBAAgB,CAAC,cAAc,iBAAiB,GAAG,EAAE,QAAQ,KAAK,CAAC;GACzE,MAAM,iBAAiB,CAAC,CAAC,aAAa,KAAK;GAC3C,MAAM,YAAY,CAAC,CAAC;GAEpB,OAAOE,cAAAA,WACL;IACE,qBAAA,GAAA,oBAAA,cAAoB,SAAA,CAAS,CAAC,KAAK;IACnC,GAAG;IACH,mBACE,eAAe,uBACd,CAAC,YAAY,CAAC,kBAAkB,CAAC,YAAY,UAAU,KAAA;IAC1D,UAAU,cAAc,IAAI,eAAe;GAC7C,GACA,KACF,CAAC,CAAC;EACJ,GACA;GAAC;GAAgB;GAAO;GAAa;GAAS;EAAW,CAU7C;EACZ;CACF;AACF"}
1
+ {"version":3,"file":"use-file-input.cjs","names":["useFieldProps","useRef","useControllableState","useCallback","useClickable","mergeProps","visuallyHiddenAttributes"],"sources":["../../../../src/components/file-input/use-file-input.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent, RefObject } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { Dict } from \"../../utils\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback, useRef } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useClickable } from \"../../hooks/use-clickable\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport {\n assignRef,\n dataAttr,\n has,\n isNull,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\nexport type UseFileInputProps<Y extends \"button\" | \"input\" = \"input\"> =\n FieldProps &\n Omit<HTMLProps<Y>, \"defaultValue\" | \"onChange\" | \"ref\" | \"value\"> &\n Pick<HTMLProps<\"input\">, \"accept\" | \"multiple\" | \"placeholder\" | \"ref\"> & {\n /**\n * The initial value of the file input.\n */\n defaultValue?: File[]\n /**\n * Ref to a reset function.\n */\n resetRef?: RefObject<(() => void) | null>\n /**\n * The value of the file input.\n */\n value?: File[]\n /**\n * Function to be called when a file change event occurs.\n */\n onChange?: (files: File[] | undefined) => void\n }\n\nexport const useFileInput = <Y extends \"button\" | \"input\" = \"input\">(\n props: UseFileInputProps<Y>,\n) => {\n const {\n context: { labelId } = {},\n props: {\n id,\n ref,\n form,\n name,\n accept,\n defaultValue,\n disabled,\n multiple,\n placeholder,\n readOnly,\n required,\n resetRef,\n value,\n onChange: onChangeProp,\n ...rest\n },\n ariaProps,\n dataProps,\n eventProps,\n } = useFieldProps<HTMLElement, UseFileInputProps<Y>>({\n ...props,\n notSupportReadOnly: true,\n })\n const interactive = !(readOnly || disabled)\n const inputRef = useRef<HTMLInputElement>(null)\n const [values, setValues] = useControllableState<File[] | undefined>({\n defaultValue,\n value,\n onChange: onChangeProp,\n })\n const count = values?.length ?? 0\n\n const onClick = useCallback(() => {\n if (!interactive) return\n\n inputRef.current?.click()\n }, [interactive])\n\n const onReset = useCallback(() => {\n if (inputRef.current) inputRef.current.value = \"\"\n\n setValues(undefined)\n }, [setValues])\n\n const onChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n const files = !isNull(ev.currentTarget.files)\n ? Array.from(ev.currentTarget.files)\n : undefined\n\n setValues(files?.length ? files : undefined)\n },\n [setValues],\n )\n\n const clickableProps = useClickable<HTMLElement, Dict>(\n mergeProps(ariaProps, dataProps, eventProps, rest, {\n disabled: !interactive,\n focusable: readOnly && !disabled,\n focusOnClick: interactive,\n onClick,\n })(),\n )\n\n assignRef(resetRef, onReset)\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) =>\n mergeProps(\n visuallyHiddenAttributes,\n ariaProps,\n dataProps,\n {\n id,\n ref: inputRef,\n form,\n type: \"file\",\n name,\n accept,\n disabled,\n multiple,\n readOnly,\n required,\n },\n props,\n { ref, onChange },\n )(),\n [\n required,\n ariaProps,\n dataProps,\n id,\n form,\n name,\n accept,\n disabled,\n multiple,\n readOnly,\n ref,\n onChange,\n ],\n )\n\n const getFieldProps: PropGetter = useCallback(\n (props = {}) => {\n const hasLabel =\n has(props, [\"aria-label\", \"aria-labelledby\"], { truthy: true }) ||\n has(clickableProps, [\"aria-label\", \"aria-labelledby\"], { truthy: true })\n const hasPlaceholder = !!placeholder?.trim()\n const hasValues = !!count\n\n return mergeProps(\n {\n \"data-placeholder\": dataAttr(!count),\n ...clickableProps,\n \"aria-labelledby\":\n clickableProps[\"aria-labelledby\"] ??\n (!hasLabel && !hasPlaceholder && !hasValues ? labelId : undefined),\n tabIndex: interactive ? 0 : clickableProps.tabIndex,\n },\n props,\n )()\n },\n [clickableProps, count, interactive, labelId, placeholder],\n )\n\n return {\n disabled,\n interactive,\n readOnly,\n required,\n values,\n clickableProps,\n getFieldProps,\n getInputProps,\n }\n}\n\nexport type UseFileInputReturn = ReturnType<typeof useFileInput>\n"],"mappings":";;;;;;;;;;AAyCA,MAAa,gBACX,UACG;CACH,MAAM,EACJ,SAAS,EAAE,YAAY,CAAC,GACxB,OAAO,EACL,IACA,KACA,MACA,MACA,QACA,cACA,UACA,UACA,aACA,UACA,UACA,UACA,OACA,UAAU,cACV,GAAG,QAEL,WACA,WACA,eACEA,wBAAAA,cAAiD;EACnD,GAAG;EACH,oBAAoB;CACtB,CAAC;CACD,MAAM,cAAc,EAAE,YAAY;CAClC,MAAM,YAAA,GAAWC,MAAAA,OAAAA,CAAyB,IAAI;CAC9C,MAAM,CAAC,QAAQ,aAAaC,2CAAAA,qBAAyC;EACnE;EACA;EACA,UAAU;CACZ,CAAC;CACD,MAAM,QAAQ,QAAQ,UAAU;CAEhC,MAAM,WAAA,GAAUC,MAAAA,YAAAA,OAAkB;EAChC,IAAI,CAAC,aAAa;EAElB,SAAS,SAAS,MAAM;CAC1B,GAAG,CAAC,WAAW,CAAC;CAEhB,MAAM,WAAA,GAAUA,MAAAA,YAAAA,OAAkB;EAChC,IAAI,SAAS,SAAS,SAAS,QAAQ,QAAQ;EAE/C,UAAU,KAAA,CAAS;CACrB,GAAG,CAAC,SAAS,CAAC;CAEd,MAAM,YAAA,GAAWA,MAAAA,YAAAA,EACd,OAAsC;EACrC,MAAM,QAAQ,EAAA,GAAA,oBAAA,cAAC,OAAA,CAAO,GAAG,cAAc,KAAK,IACxC,MAAM,KAAK,GAAG,cAAc,KAAK,IACjC,KAAA;EAEJ,UAAU,OAAO,SAAS,QAAQ,KAAA,CAAS;CAC7C,GACA,CAAC,SAAS,CACZ;CAEA,MAAM,iBAAiBC,kCAAAA,aACrBC,cAAAA,WAAW,WAAW,WAAW,YAAY,MAAM;EACjD,UAAU,CAAC;EACX,WAAW,YAAY,CAAC;EACxB,cAAc;EACd;CACF,CAAC,CAAC,CAAC,CACL;CAEA,YAAA,UAAU,UAAU,OAAO;CAE3B,MAAM,iBAAA,GAAqCF,MAAAA,YAAAA,EACxC,QAAQ,CAAC,MACRE,cAAAA,WACEC,YAAAA,0BACA,WACA,WACA;EACE;EACA,KAAK;EACL;EACA,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;CACF,GACA,OACA;EAAE;EAAK;CAAS,CAClB,CAAC,CAAC,GACJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAyBA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA,gBAAA,GA9BgCH,MAAAA,YAAAA,EAC/B,QAAQ,CAAC,MAAM;GACd,MAAM,YAAA,GAAA,oBAAA,cACJ,IAAA,CAAI,OAAO,CAAC,cAAc,iBAAiB,GAAG,EAAE,QAAQ,KAAK,CAAC,MAAA,GAAA,oBAAA,cAC9D,IAAA,CAAI,gBAAgB,CAAC,cAAc,iBAAiB,GAAG,EAAE,QAAQ,KAAK,CAAC;GACzE,MAAM,iBAAiB,CAAC,CAAC,aAAa,KAAK;GAC3C,MAAM,YAAY,CAAC,CAAC;GAEpB,OAAOE,cAAAA,WACL;IACE,qBAAA,GAAA,oBAAA,cAAoB,SAAA,CAAS,CAAC,KAAK;IACnC,GAAG;IACH,mBACE,eAAe,uBACd,CAAC,YAAY,CAAC,kBAAkB,CAAC,YAAY,UAAU,KAAA;IAC1D,UAAU,cAAc,IAAI,eAAe;GAC7C,GACA,KACF,CAAC,CAAC;EACJ,GACA;GAAC;GAAgB;GAAO;GAAa;GAAS;EAAW,CAU7C;EACZ;CACF;AACF"}
@@ -9,7 +9,7 @@ import { useFieldProps } from "../field/use-field-props.js";
9
9
  import { useCallback, useRef } from "react";
10
10
  // src/components/file-input/use-file-input.ts
11
11
  const useFileInput = (props) => {
12
- const { context: { labelId } = {}, props: { id, ref, form, name, accept, defaultValue, disabled, multiple, placeholder, readOnly, required, resetRef, value, onChange: onChangeProp, onClick: onClickProp, ...rest }, ariaProps, dataProps, eventProps } = useFieldProps({
12
+ const { context: { labelId } = {}, props: { id, ref, form, name, accept, defaultValue, disabled, multiple, placeholder, readOnly, required, resetRef, value, onChange: onChangeProp, ...rest }, ariaProps, dataProps, eventProps } = useFieldProps({
13
13
  ...props,
14
14
  notSupportReadOnly: true
15
15
  });
@@ -33,21 +33,14 @@ const useFileInput = (props) => {
33
33
  const files = !(0, utils_exports.isNull)(ev.currentTarget.files) ? Array.from(ev.currentTarget.files) : void 0;
34
34
  setValues(files?.length ? files : void 0);
35
35
  }, [setValues]);
36
- const clickableProps = useClickable({
37
- ...ariaProps,
38
- ...dataProps,
39
- ...eventProps,
40
- ...rest,
36
+ const clickableProps = useClickable(mergeProps(ariaProps, dataProps, eventProps, rest, {
41
37
  disabled: !interactive,
42
38
  focusable: readOnly && !disabled,
43
39
  focusOnClick: interactive,
44
- onClick: (0, utils_exports.handlerAll)(onClickProp, onClick)
45
- });
40
+ onClick
41
+ })());
46
42
  assignRef(resetRef, onReset);
47
- const getInputProps = useCallback((props = {}) => mergeProps({
48
- ...visuallyHiddenAttributes,
49
- ...ariaProps,
50
- ...dataProps,
43
+ const getInputProps = useCallback((props = {}) => mergeProps(visuallyHiddenAttributes, ariaProps, dataProps, {
51
44
  id,
52
45
  ref: inputRef,
53
46
  form,
@@ -1 +1 @@
1
- {"version":3,"file":"use-file-input.js","names":["isNull","handlerAll","has","dataAttr"],"sources":["../../../../src/components/file-input/use-file-input.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent, RefObject } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { Dict } from \"../../utils\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback, useRef } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useClickable } from \"../../hooks/use-clickable\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport {\n assignRef,\n dataAttr,\n handlerAll,\n has,\n isNull,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\nexport type UseFileInputProps<Y extends \"button\" | \"input\" = \"input\"> =\n FieldProps &\n Omit<HTMLProps<Y>, \"defaultValue\" | \"onChange\" | \"ref\" | \"value\"> &\n Pick<HTMLProps<\"input\">, \"accept\" | \"multiple\" | \"placeholder\" | \"ref\"> & {\n /**\n * The initial value of the file input.\n */\n defaultValue?: File[]\n /**\n * Ref to a reset function.\n */\n resetRef?: RefObject<(() => void) | null>\n /**\n * The value of the file input.\n */\n value?: File[]\n /**\n * Function to be called when a file change event occurs.\n */\n onChange?: (files: File[] | undefined) => void\n }\n\nexport const useFileInput = <Y extends \"button\" | \"input\" = \"input\">(\n props: UseFileInputProps<Y>,\n) => {\n const {\n context: { labelId } = {},\n props: {\n id,\n ref,\n form,\n name,\n accept,\n defaultValue,\n disabled,\n multiple,\n placeholder,\n readOnly,\n required,\n resetRef,\n value,\n onChange: onChangeProp,\n onClick: onClickProp,\n ...rest\n },\n ariaProps,\n dataProps,\n eventProps,\n } = useFieldProps<HTMLElement, UseFileInputProps<Y>>({\n ...props,\n notSupportReadOnly: true,\n })\n const interactive = !(readOnly || disabled)\n const inputRef = useRef<HTMLInputElement>(null)\n const [values, setValues] = useControllableState<File[] | undefined>({\n defaultValue,\n value,\n onChange: onChangeProp,\n })\n const count = values?.length ?? 0\n\n const onClick = useCallback(() => {\n if (!interactive) return\n\n inputRef.current?.click()\n }, [interactive])\n\n const onReset = useCallback(() => {\n if (inputRef.current) inputRef.current.value = \"\"\n\n setValues(undefined)\n }, [setValues])\n\n const onChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n const files = !isNull(ev.currentTarget.files)\n ? Array.from(ev.currentTarget.files)\n : undefined\n\n setValues(files?.length ? files : undefined)\n },\n [setValues],\n )\n\n const clickableProps = useClickable<HTMLElement, Dict>({\n ...ariaProps,\n ...dataProps,\n ...eventProps,\n ...rest,\n disabled: !interactive,\n focusable: readOnly && !disabled,\n focusOnClick: interactive,\n onClick: handlerAll(onClickProp, onClick),\n })\n\n assignRef(resetRef, onReset)\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) =>\n mergeProps(\n {\n ...visuallyHiddenAttributes,\n ...ariaProps,\n ...dataProps,\n id,\n ref: inputRef,\n form,\n type: \"file\",\n name,\n accept,\n disabled,\n multiple,\n readOnly,\n required,\n },\n props,\n { ref, onChange },\n )(),\n [\n required,\n ariaProps,\n dataProps,\n id,\n form,\n name,\n accept,\n disabled,\n multiple,\n readOnly,\n ref,\n onChange,\n ],\n )\n\n const getFieldProps: PropGetter = useCallback(\n (props = {}) => {\n const hasLabel =\n has(props, [\"aria-label\", \"aria-labelledby\"], { truthy: true }) ||\n has(clickableProps, [\"aria-label\", \"aria-labelledby\"], { truthy: true })\n const hasPlaceholder = !!placeholder?.trim()\n const hasValues = !!count\n\n return mergeProps(\n {\n \"data-placeholder\": dataAttr(!count),\n ...clickableProps,\n \"aria-labelledby\":\n clickableProps[\"aria-labelledby\"] ??\n (!hasLabel && !hasPlaceholder && !hasValues ? labelId : undefined),\n tabIndex: interactive ? 0 : clickableProps.tabIndex,\n },\n props,\n )()\n },\n [clickableProps, count, interactive, labelId, placeholder],\n )\n\n return {\n disabled,\n interactive,\n readOnly,\n required,\n values,\n clickableProps,\n getFieldProps,\n getInputProps,\n }\n}\n\nexport type UseFileInputReturn = ReturnType<typeof useFileInput>\n"],"mappings":";;;;;;;;;;AA0CA,MAAa,gBACX,UACG;CACH,MAAM,EACJ,SAAS,EAAE,YAAY,CAAC,GACxB,OAAO,EACL,IACA,KACA,MACA,MACA,QACA,cACA,UACA,UACA,aACA,UACA,UACA,UACA,OACA,UAAU,cACV,SAAS,aACT,GAAG,QAEL,WACA,WACA,eACE,cAAiD;EACnD,GAAG;EACH,oBAAoB;CACtB,CAAC;CACD,MAAM,cAAc,EAAE,YAAY;CAClC,MAAM,WAAW,OAAyB,IAAI;CAC9C,MAAM,CAAC,QAAQ,aAAa,qBAAyC;EACnE;EACA;EACA,UAAU;CACZ,CAAC;CACD,MAAM,QAAQ,QAAQ,UAAU;CAEhC,MAAM,UAAU,kBAAkB;EAChC,IAAI,CAAC,aAAa;EAElB,SAAS,SAAS,MAAM;CAC1B,GAAG,CAAC,WAAW,CAAC;CAEhB,MAAM,UAAU,kBAAkB;EAChC,IAAI,SAAS,SAAS,SAAS,QAAQ,QAAQ;EAE/C,UAAU,KAAA,CAAS;CACrB,GAAG,CAAC,SAAS,CAAC;CAEd,MAAM,WAAW,aACd,OAAsC;EACrC,MAAM,QAAQ,EAAA,GAACA,cAAAA,OAAAA,CAAO,GAAG,cAAc,KAAK,IACxC,MAAM,KAAK,GAAG,cAAc,KAAK,IACjC,KAAA;EAEJ,UAAU,OAAO,SAAS,QAAQ,KAAA,CAAS;CAC7C,GACA,CAAC,SAAS,CACZ;CAEA,MAAM,iBAAiB,aAAgC;EACrD,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,UAAU,CAAC;EACX,WAAW,YAAY,CAAC;EACxB,cAAc;EACd,UAAA,GAASC,cAAAA,WAAAA,CAAW,aAAa,OAAO;CAC1C,CAAC;CAED,UAAU,UAAU,OAAO;CAE3B,MAAM,gBAAqC,aACxC,QAAQ,CAAC,MACR,WACE;EACE,GAAG;EACH,GAAG;EACH,GAAG;EACH;EACA,KAAK;EACL;EACA,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;CACF,GACA,OACA;EAAE;EAAK;CAAS,CAClB,CAAC,CAAC,GACJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAyBA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA,eA9BgC,aAC/B,QAAQ,CAAC,MAAM;GACd,MAAM,YAAA,GACJC,cAAAA,IAAAA,CAAI,OAAO,CAAC,cAAc,iBAAiB,GAAG,EAAE,QAAQ,KAAK,CAAC,MAAA,GAC9DA,cAAAA,IAAAA,CAAI,gBAAgB,CAAC,cAAc,iBAAiB,GAAG,EAAE,QAAQ,KAAK,CAAC;GACzE,MAAM,iBAAiB,CAAC,CAAC,aAAa,KAAK;GAC3C,MAAM,YAAY,CAAC,CAAC;GAEpB,OAAO,WACL;IACE,qBAAA,GAAoBC,cAAAA,SAAAA,CAAS,CAAC,KAAK;IACnC,GAAG;IACH,mBACE,eAAe,uBACd,CAAC,YAAY,CAAC,kBAAkB,CAAC,YAAY,UAAU,KAAA;IAC1D,UAAU,cAAc,IAAI,eAAe;GAC7C,GACA,KACF,CAAC,CAAC;EACJ,GACA;GAAC;GAAgB;GAAO;GAAa;GAAS;EAAW,CAU7C;EACZ;CACF;AACF"}
1
+ {"version":3,"file":"use-file-input.js","names":["isNull","has","dataAttr"],"sources":["../../../../src/components/file-input/use-file-input.ts"],"sourcesContent":["\"use client\"\n\nimport type { ChangeEvent, RefObject } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { Dict } from \"../../utils\"\nimport type { FieldProps } from \"../field\"\nimport { useCallback, useRef } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useClickable } from \"../../hooks/use-clickable\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport {\n assignRef,\n dataAttr,\n has,\n isNull,\n visuallyHiddenAttributes,\n} from \"../../utils\"\nimport { useFieldProps } from \"../field\"\n\nexport type UseFileInputProps<Y extends \"button\" | \"input\" = \"input\"> =\n FieldProps &\n Omit<HTMLProps<Y>, \"defaultValue\" | \"onChange\" | \"ref\" | \"value\"> &\n Pick<HTMLProps<\"input\">, \"accept\" | \"multiple\" | \"placeholder\" | \"ref\"> & {\n /**\n * The initial value of the file input.\n */\n defaultValue?: File[]\n /**\n * Ref to a reset function.\n */\n resetRef?: RefObject<(() => void) | null>\n /**\n * The value of the file input.\n */\n value?: File[]\n /**\n * Function to be called when a file change event occurs.\n */\n onChange?: (files: File[] | undefined) => void\n }\n\nexport const useFileInput = <Y extends \"button\" | \"input\" = \"input\">(\n props: UseFileInputProps<Y>,\n) => {\n const {\n context: { labelId } = {},\n props: {\n id,\n ref,\n form,\n name,\n accept,\n defaultValue,\n disabled,\n multiple,\n placeholder,\n readOnly,\n required,\n resetRef,\n value,\n onChange: onChangeProp,\n ...rest\n },\n ariaProps,\n dataProps,\n eventProps,\n } = useFieldProps<HTMLElement, UseFileInputProps<Y>>({\n ...props,\n notSupportReadOnly: true,\n })\n const interactive = !(readOnly || disabled)\n const inputRef = useRef<HTMLInputElement>(null)\n const [values, setValues] = useControllableState<File[] | undefined>({\n defaultValue,\n value,\n onChange: onChangeProp,\n })\n const count = values?.length ?? 0\n\n const onClick = useCallback(() => {\n if (!interactive) return\n\n inputRef.current?.click()\n }, [interactive])\n\n const onReset = useCallback(() => {\n if (inputRef.current) inputRef.current.value = \"\"\n\n setValues(undefined)\n }, [setValues])\n\n const onChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n const files = !isNull(ev.currentTarget.files)\n ? Array.from(ev.currentTarget.files)\n : undefined\n\n setValues(files?.length ? files : undefined)\n },\n [setValues],\n )\n\n const clickableProps = useClickable<HTMLElement, Dict>(\n mergeProps(ariaProps, dataProps, eventProps, rest, {\n disabled: !interactive,\n focusable: readOnly && !disabled,\n focusOnClick: interactive,\n onClick,\n })(),\n )\n\n assignRef(resetRef, onReset)\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}) =>\n mergeProps(\n visuallyHiddenAttributes,\n ariaProps,\n dataProps,\n {\n id,\n ref: inputRef,\n form,\n type: \"file\",\n name,\n accept,\n disabled,\n multiple,\n readOnly,\n required,\n },\n props,\n { ref, onChange },\n )(),\n [\n required,\n ariaProps,\n dataProps,\n id,\n form,\n name,\n accept,\n disabled,\n multiple,\n readOnly,\n ref,\n onChange,\n ],\n )\n\n const getFieldProps: PropGetter = useCallback(\n (props = {}) => {\n const hasLabel =\n has(props, [\"aria-label\", \"aria-labelledby\"], { truthy: true }) ||\n has(clickableProps, [\"aria-label\", \"aria-labelledby\"], { truthy: true })\n const hasPlaceholder = !!placeholder?.trim()\n const hasValues = !!count\n\n return mergeProps(\n {\n \"data-placeholder\": dataAttr(!count),\n ...clickableProps,\n \"aria-labelledby\":\n clickableProps[\"aria-labelledby\"] ??\n (!hasLabel && !hasPlaceholder && !hasValues ? labelId : undefined),\n tabIndex: interactive ? 0 : clickableProps.tabIndex,\n },\n props,\n )()\n },\n [clickableProps, count, interactive, labelId, placeholder],\n )\n\n return {\n disabled,\n interactive,\n readOnly,\n required,\n values,\n clickableProps,\n getFieldProps,\n getInputProps,\n }\n}\n\nexport type UseFileInputReturn = ReturnType<typeof useFileInput>\n"],"mappings":";;;;;;;;;;AAyCA,MAAa,gBACX,UACG;CACH,MAAM,EACJ,SAAS,EAAE,YAAY,CAAC,GACxB,OAAO,EACL,IACA,KACA,MACA,MACA,QACA,cACA,UACA,UACA,aACA,UACA,UACA,UACA,OACA,UAAU,cACV,GAAG,QAEL,WACA,WACA,eACE,cAAiD;EACnD,GAAG;EACH,oBAAoB;CACtB,CAAC;CACD,MAAM,cAAc,EAAE,YAAY;CAClC,MAAM,WAAW,OAAyB,IAAI;CAC9C,MAAM,CAAC,QAAQ,aAAa,qBAAyC;EACnE;EACA;EACA,UAAU;CACZ,CAAC;CACD,MAAM,QAAQ,QAAQ,UAAU;CAEhC,MAAM,UAAU,kBAAkB;EAChC,IAAI,CAAC,aAAa;EAElB,SAAS,SAAS,MAAM;CAC1B,GAAG,CAAC,WAAW,CAAC;CAEhB,MAAM,UAAU,kBAAkB;EAChC,IAAI,SAAS,SAAS,SAAS,QAAQ,QAAQ;EAE/C,UAAU,KAAA,CAAS;CACrB,GAAG,CAAC,SAAS,CAAC;CAEd,MAAM,WAAW,aACd,OAAsC;EACrC,MAAM,QAAQ,EAAA,GAACA,cAAAA,OAAAA,CAAO,GAAG,cAAc,KAAK,IACxC,MAAM,KAAK,GAAG,cAAc,KAAK,IACjC,KAAA;EAEJ,UAAU,OAAO,SAAS,QAAQ,KAAA,CAAS;CAC7C,GACA,CAAC,SAAS,CACZ;CAEA,MAAM,iBAAiB,aACrB,WAAW,WAAW,WAAW,YAAY,MAAM;EACjD,UAAU,CAAC;EACX,WAAW,YAAY,CAAC;EACxB,cAAc;EACd;CACF,CAAC,CAAC,CAAC,CACL;CAEA,UAAU,UAAU,OAAO;CAE3B,MAAM,gBAAqC,aACxC,QAAQ,CAAC,MACR,WACE,0BACA,WACA,WACA;EACE;EACA,KAAK;EACL;EACA,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;CACF,GACA,OACA;EAAE;EAAK;CAAS,CAClB,CAAC,CAAC,GACJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAyBA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA,eA9BgC,aAC/B,QAAQ,CAAC,MAAM;GACd,MAAM,YAAA,GACJC,cAAAA,IAAAA,CAAI,OAAO,CAAC,cAAc,iBAAiB,GAAG,EAAE,QAAQ,KAAK,CAAC,MAAA,GAC9DA,cAAAA,IAAAA,CAAI,gBAAgB,CAAC,cAAc,iBAAiB,GAAG,EAAE,QAAQ,KAAK,CAAC;GACzE,MAAM,iBAAiB,CAAC,CAAC,aAAa,KAAK;GAC3C,MAAM,YAAY,CAAC,CAAC;GAEpB,OAAO,WACL;IACE,qBAAA,GAAoBC,cAAAA,SAAAA,CAAS,CAAC,KAAK;IACnC,GAAG;IACH,mBACE,eAAe,uBACd,CAAC,YAAY,CAAC,kBAAkB,CAAC,YAAY,UAAU,KAAA;IAC1D,UAAU,cAAc,IAAI,eAAe;GAC7C,GACA,KACF,CAAC,CAAC;EACJ,GACA;GAAC;GAAgB;GAAO;GAAa;GAAS;EAAW,CAU7C;EACZ;CACF;AACF"}
@@ -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 { 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" | "weekday" | "day" | "months" | "years" | "weeks" | "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" | "weekday" | "day" | "months" | "years" | "weeks" | "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;
@@ -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" | "root" | "description" | "indicator" | "addon", {
67
67
  justify: {
68
68
  end: {
69
69
  addon: {
@@ -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" | "root" | "eyeDropper" | "field" | "colorSwatch", CSSPropObject<CSSSlotObject<"input" | "content" | "icon" | "root" | "eyeDropper" | "field" | "colorSwatch">>, {
4
+ export declare const colorPickerStyle: ComponentSlotStyle<"input" | "content" | "icon" | "colorSwatch" | "root" | "eyeDropper" | "field", CSSPropObject<CSSSlotObject<"input" | "content" | "icon" | "colorSwatch" | "root" | "eyeDropper" | "field">>, {
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<"root" | "eyeDropper" | "colorSwatchGroupLabel" | "alphaSlider" | "colorSwatchGroup" | "colorSwatchItem" | "hueSlider" | "saturationSlider", {
4
+ export declare const colorSelectorStyle: ComponentSlotStyle<"hueSlider" | "saturationSlider" | "root" | "eyeDropper" | "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<"root" | "eyeDropper
22
22
  md: {};
23
23
  lg: {};
24
24
  xl: {};
25
- }, CSSModifierObject<CSSSlotObject<"root" | "eyeDropper" | "colorSwatchGroupLabel" | "alphaSlider" | "colorSwatchGroup" | "colorSwatchItem" | "hueSlider" | "saturationSlider">>>;
25
+ }, CSSModifierObject<CSSSlotObject<"hueSlider" | "saturationSlider" | "root" | "eyeDropper" | "colorSwatchGroupLabel" | "alphaSlider" | "colorSwatchGroup" | "colorSwatchItem">>>;
26
26
  export type ColorSelectorStyle = typeof colorSelectorStyle;
@@ -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 drawerStyle: ComponentSlotStyle<"body" | "footer" | "header" | "title" | "content" | "overlay" | "root" | "closeButton" | "dragBar", {
4
+ export declare const drawerStyle: ComponentSlotStyle<"body" | "footer" | "header" | "title" | "content" | "overlay" | "closeButton" | "root" | "dragBar", {
5
5
  /**
6
6
  * The placement of the drawer.
7
7
  *
@@ -117,5 +117,5 @@ export declare const drawerStyle: ComponentSlotStyle<"body" | "footer" | "header
117
117
  rounded: "0";
118
118
  };
119
119
  };
120
- }, CSSModifierObject<CSSSlotObject<"body" | "footer" | "header" | "title" | "content" | "overlay" | "root" | "closeButton" | "dragBar">>>;
120
+ }, CSSModifierObject<CSSSlotObject<"body" | "footer" | "header" | "title" | "content" | "overlay" | "closeButton" | "root" | "dragBar">>>;
121
121
  export type DrawerStyle = typeof drawerStyle;
@@ -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 fileInputStyle: ComponentSlotStyle<"root" | "tag", CSSPropObject<CSSSlotObject<"root" | "tag">>, {
4
+ export declare const fileInputStyle: ComponentSlotStyle<"tag" | "root", CSSPropObject<CSSSlotObject<"tag" | "root">>, {
5
5
  xs: {
6
6
  root: {
7
7
  "&:has(~ [data-input-element])"?: {
@@ -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
  *
@@ -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,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 modalStyle: ComponentSlotStyle<"body" | "footer" | "header" | "title" | "content" | "overlay" | "root" | "closeButton", {
4
+ export declare const modalStyle: ComponentSlotStyle<"body" | "footer" | "header" | "title" | "content" | "overlay" | "closeButton" | "root", {
5
5
  /**
6
6
  * The placement of the modal.
7
7
  *
@@ -155,5 +155,5 @@ export declare const modalStyle: ComponentSlotStyle<"body" | "footer" | "header"
155
155
  p: "0";
156
156
  };
157
157
  };
158
- }, CSSModifierObject<CSSSlotObject<"body" | "footer" | "header" | "title" | "content" | "overlay" | "root" | "closeButton">>>;
158
+ }, CSSModifierObject<CSSSlotObject<"body" | "footer" | "header" | "title" | "content" | "overlay" | "closeButton" | "root">>>;
159
159
  export type ModalStyle = typeof modalStyle;
@@ -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" | "item" | "root" | "closeButton", CSSPropObject<CSSSlotObject<"content" | "item" | "root" | "closeButton">>, CSSModifierObject<CSSSlotObject<"content" | "item" | "root" | "closeButton">>, CSSModifierObject<CSSSlotObject<"content" | "item" | "root" | "closeButton">>>;
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;
@@ -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" | "root" | "description" | "indicator" | "addon", {
59
59
  justify: {
60
60
  end: {
61
61
  addon: {
@@ -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" | "endIcon" | "startIcon" | "root" | "closeButton", {
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
  *
@@ -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: {
@@ -123,7 +123,7 @@ declare const I18nContext: import("react").Context<I18nContext<{
123
123
  readonly toggle: {
124
124
  readonly "Toggle button": "Toggle button";
125
125
  };
126
- }, "progress" | "select" | "table" | "toggle" | "slider" | "colorSwatch" | "hueSlider" | "saturationSlider" | "tag" | "datePicker" | "autocomplete" | "avatar" | "breadcrumb" | "calendar" | "carousel" | "closeButton" | "colorPicker" | "colorSelector" | "numberInput" | "pagination" | "passwordInput" | "sidebar" | "stat" | "progress.Loading..." | "progress.{value} percent" | "select.Clear value" | "table.Clear sorting" | "table.Page size" | "table.Select all rows" | "table.Select row" | "table.Sort ascending" | "table.Sort descending" | "toggle.Toggle button" | "slider.Slider thumb" | "colorSwatch.Color swatch group" | "hueSlider.Blue" | "hueSlider.Cyan" | "hueSlider.Green" | "hueSlider.Magenta" | "hueSlider.Red" | "hueSlider.Yellow" | "saturationSlider.Saturation and brightness thumb" | "saturationSlider.Saturation {saturation}%, Brightness {brightness}%" | "tag.Close tag" | "datePicker.Clear value" | "autocomplete.Clear value" | "autocomplete.No results found" | "avatar.Avatar Icon" | "breadcrumb.Breadcrumb" | "breadcrumb.Ellipsis" | "calendar.Choose the month" | "calendar.Choose the year" | "calendar.Go to the next month" | "calendar.Go to the previous month" | "calendar.Today" | "carousel.Go to next slide" | "carousel.Go to previous slide" | "carousel.Go to {page} slide" | "carousel.Slides" | "carousel.{page} of {total}" | "closeButton.Close" | "colorPicker.Pick a color" | "colorSelector.Pick a color" | "numberInput.Decrease" | "numberInput.Increase" | "pagination.Go to first page" | "pagination.Go to last page" | "pagination.Go to next page" | "pagination.Go to page {value}" | "pagination.Go to previous page" | "pagination.Pagination" | "pagination.{value} / {total}" | "pagination.{value} of {total}" | "passwordInput.Password strength meter" | "passwordInput.Toggle password visibility" | "sidebar.Close sidebar" | "sidebar.Open sidebar" | "stat.Decreased by" | "stat.Increased by">>;
126
+ }, "progress" | "select" | "table" | "toggle" | "slider" | "autocomplete" | "avatar" | "breadcrumb" | "calendar" | "carousel" | "closeButton" | "colorPicker" | "colorSelector" | "colorSwatch" | "datePicker" | "hueSlider" | "numberInput" | "pagination" | "passwordInput" | "saturationSlider" | "sidebar" | "stat" | "tag" | "progress.Loading..." | "progress.{value} percent" | "select.Clear value" | "table.Clear sorting" | "table.Page size" | "table.Select all rows" | "table.Select row" | "table.Sort ascending" | "table.Sort descending" | "toggle.Toggle button" | "slider.Slider thumb" | "autocomplete.Clear value" | "autocomplete.No results found" | "avatar.Avatar Icon" | "breadcrumb.Breadcrumb" | "breadcrumb.Ellipsis" | "calendar.Choose the month" | "calendar.Choose the year" | "calendar.Go to the next month" | "calendar.Go to the previous month" | "calendar.Today" | "carousel.Go to next slide" | "carousel.Go to previous slide" | "carousel.Go to {page} slide" | "carousel.Slides" | "carousel.{page} of {total}" | "closeButton.Close" | "colorPicker.Pick a color" | "colorSelector.Pick a color" | "colorSwatch.Color swatch group" | "datePicker.Clear value" | "hueSlider.Blue" | "hueSlider.Cyan" | "hueSlider.Green" | "hueSlider.Magenta" | "hueSlider.Red" | "hueSlider.Yellow" | "numberInput.Decrease" | "numberInput.Increase" | "pagination.Go to first page" | "pagination.Go to last page" | "pagination.Go to next page" | "pagination.Go to page {value}" | "pagination.Go to previous page" | "pagination.Pagination" | "pagination.{value} / {total}" | "pagination.{value} of {total}" | "passwordInput.Password strength meter" | "passwordInput.Toggle password visibility" | "saturationSlider.Saturation and brightness thumb" | "saturationSlider.Saturation {saturation}%, Brightness {brightness}%" | "sidebar.Close sidebar" | "sidebar.Open sidebar" | "stat.Decreased by" | "stat.Increased by" | "tag.Close tag">>;
127
127
  export interface I18nProviderProps {
128
128
  children?: ReactNode;
129
129
  /**
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-20261116083348",
4
+ "version": "2.3.4-dev-20261116090244",
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",