@yamada-ui/file-button 0.3.30 → 0.3.31

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.
@@ -48,7 +48,7 @@ var FileButton = forwardRef(
48
48
  Component,
49
49
  {
50
50
  className: cx("ui-file-button", className),
51
- ...omitObject(rest, ["onChange"]),
51
+ ...omitObject(rest, ["onChange", "aria-readonly"]),
52
52
  onClick: handlerAll(rest.onClick, onClick),
53
53
  children
54
54
  }
@@ -61,6 +61,7 @@ var FileButton = forwardRef(
61
61
  {
62
62
  ref: mergeRefs(inputRef, ref),
63
63
  type: "file",
64
+ "aria-hidden": true,
64
65
  tabIndex: -1,
65
66
  id,
66
67
  name,
@@ -99,4 +100,4 @@ var FileButton = forwardRef(
99
100
  export {
100
101
  FileButton
101
102
  };
102
- //# sourceMappingURL=chunk-G5OJXMFY.mjs.map
103
+ //# sourceMappingURL=chunk-5W2ZT7JB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/file-button.tsx"],"sourcesContent":["import type { ButtonProps } from \"@yamada-ui/button\"\nimport { Button } from \"@yamada-ui/button\"\nimport type { ColorModeToken, CSS } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport type { FormControlOptions } from \"@yamada-ui/form-control\"\nimport {\n formControlProperties,\n useFormControlProps,\n} from \"@yamada-ui/form-control\"\nimport {\n assignRef,\n cx,\n handlerAll,\n isFunction,\n isNull,\n mergeRefs,\n omitObject,\n pickObject,\n} from \"@yamada-ui/utils\"\nimport type { ChangeEvent, ForwardedRef, ReactNode } from \"react\"\nimport { useCallback, useRef } from \"react\"\n\ntype Props = {\n onClick: () => void\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n} & FormControlOptions\n\ntype FileButtonOptions = {\n /**\n * The border color when the button is invalid.\n */\n errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, \"colors\">\n /**\n * Function to be called when a file change event occurs.\n */\n onChange?: (files: File[] | undefined) => void\n children?: ReactNode | ((props: Props) => ReactNode)\n /**\n * Ref to a reset function.\n */\n resetRef?: ForwardedRef<() => void>\n}\n\ntype InputProps = Partial<Pick<HTMLInputElement, \"accept\" | \"multiple\">>\n\nexport type FileButtonProps = Omit<ButtonProps, \"onChange\" | \"children\"> &\n InputProps &\n FileButtonOptions &\n FormControlOptions\n\nexport const FileButton = forwardRef<FileButtonProps, \"input\">(\n ({ className, resetRef, as: As, children, ...props }, ref) => {\n const { id, name, accept, multiple, form, ...rest } =\n useFormControlProps(props)\n\n const { disabled, readOnly, required, \"aria-invalid\": isInvalid } = rest\n\n const inputRef = useRef<HTMLInputElement>(null)\n\n const onClick = useCallback(() => {\n if (disabled || readOnly) return\n\n inputRef.current?.click()\n }, [disabled, readOnly])\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 rest.onChange?.(files)\n },\n [rest],\n )\n\n const onReset = useCallback(() => {\n if (inputRef.current) inputRef.current.value = \"\"\n }, [])\n\n if (!isFunction(children)) {\n const Component = As || Button\n\n children = (\n <Component\n className={cx(\"ui-file-button\", className)}\n {...omitObject(rest, [\"onChange\", \"aria-readonly\"])}\n onClick={handlerAll(rest.onClick, onClick)}\n >\n {children}\n </Component>\n ) as ReactNode\n }\n\n assignRef(resetRef, onReset)\n\n return (\n <>\n <ui.input\n ref={mergeRefs(inputRef, ref)}\n type=\"file\"\n aria-hidden\n tabIndex={-1}\n id={id}\n name={name}\n form={form}\n accept={accept}\n multiple={multiple}\n style={{\n border: \"0px\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n height: \"1px\",\n width: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\",\n }}\n onChange={onChange}\n {...pickObject(rest, formControlProperties)}\n />\n\n {isFunction(children)\n ? children({\n onClick,\n disabled,\n readOnly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,CAAC,YAAY,eAAe,CAAC;AAAA,UAClD,SAAS,WAAW,KAAK,SAAS,OAAO;AAAA,UAExC;AAAA;AAAA,MACH;AAAA,IAEJ;AAEA,cAAU,UAAU,OAAO;AAE3B,WACE,iCACE;AAAA;AAAA,QAAC,GAAG;AAAA,QAAH;AAAA,UACC,KAAK,UAAU,UAAU,GAAG;AAAA,UAC5B,MAAK;AAAA,UACL,eAAW;AAAA,UACX,UAAU;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,OAAO;AAAA,YACL,QAAQ;AAAA,YACR,MAAM;AAAA,YACN,QAAQ;AAAA,YACR,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,SAAS;AAAA,YACT,UAAU;AAAA,YACV,YAAY;AAAA,YACZ,UAAU;AAAA,UACZ;AAAA,UACA;AAAA,UACC,GAAG,WAAW,MAAM,qBAAqB;AAAA;AAAA,MAC5C;AAAA,MAEC,WAAW,QAAQ,IAChB,SAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ;AAAA,MACF,CAAC,IACD;AAAA,OACN;AAAA,EAEJ;AACF;","names":[]}
@@ -59,7 +59,7 @@ var FileButton = (0, import_core.forwardRef)(
59
59
  Component,
60
60
  {
61
61
  className: (0, import_utils.cx)("ui-file-button", className),
62
- ...(0, import_utils.omitObject)(rest, ["onChange"]),
62
+ ...(0, import_utils.omitObject)(rest, ["onChange", "aria-readonly"]),
63
63
  onClick: (0, import_utils.handlerAll)(rest.onClick, onClick),
64
64
  children
65
65
  }
@@ -72,6 +72,7 @@ var FileButton = (0, import_core.forwardRef)(
72
72
  {
73
73
  ref: (0, import_utils.mergeRefs)(inputRef, ref),
74
74
  type: "file",
75
+ "aria-hidden": true,
75
76
  tabIndex: -1,
76
77
  id,
77
78
  name,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/file-button.tsx"],"sourcesContent":["import type { ButtonProps } from \"@yamada-ui/button\"\nimport { Button } from \"@yamada-ui/button\"\nimport type { ColorModeToken, CSS } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport type { FormControlOptions } from \"@yamada-ui/form-control\"\nimport {\n formControlProperties,\n useFormControlProps,\n} from \"@yamada-ui/form-control\"\nimport {\n assignRef,\n cx,\n handlerAll,\n isFunction,\n isNull,\n mergeRefs,\n omitObject,\n pickObject,\n} from \"@yamada-ui/utils\"\nimport type { ChangeEvent, ForwardedRef, ReactNode } from \"react\"\nimport { useCallback, useRef } from \"react\"\n\ntype Props = {\n onClick: () => void\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n} & FormControlOptions\n\ntype FileButtonOptions = {\n /**\n * The border color when the button is invalid.\n */\n errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, \"colors\">\n /**\n * Function to be called when a file change event occurs.\n */\n onChange?: (files: File[] | undefined) => void\n children?: ReactNode | ((props: Props) => ReactNode)\n /**\n * Ref to a reset function.\n */\n resetRef?: ForwardedRef<() => void>\n}\n\ntype InputProps = Partial<Pick<HTMLInputElement, \"accept\" | \"multiple\">>\n\nexport type FileButtonProps = Omit<ButtonProps, \"onChange\" | \"children\"> &\n InputProps &\n FileButtonOptions &\n FormControlOptions\n\nexport const FileButton = forwardRef<FileButtonProps, \"input\">(\n ({ className, resetRef, as: As, children, ...props }, ref) => {\n const { id, name, accept, multiple, form, ...rest } =\n useFormControlProps(props)\n\n const { disabled, readOnly, required, \"aria-invalid\": isInvalid } = rest\n\n const inputRef = useRef<HTMLInputElement>(null)\n\n const onClick = useCallback(() => {\n if (disabled || readOnly) return\n\n inputRef.current?.click()\n }, [disabled, readOnly])\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 rest.onChange?.(files)\n },\n [rest],\n )\n\n const onReset = useCallback(() => {\n if (inputRef.current) inputRef.current.value = \"\"\n }, [])\n\n if (!isFunction(children)) {\n const Component = As || Button\n\n children = (\n <Component\n className={cx(\"ui-file-button\", className)}\n {...omitObject(rest, [\"onChange\"])}\n onClick={handlerAll(rest.onClick, onClick)}\n >\n {children}\n </Component>\n ) as ReactNode\n }\n\n assignRef(resetRef, onReset)\n\n return (\n <>\n <ui.input\n ref={mergeRefs(inputRef, ref)}\n type=\"file\"\n tabIndex={-1}\n id={id}\n name={name}\n form={form}\n accept={accept}\n multiple={multiple}\n style={{\n border: \"0px\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n height: \"1px\",\n width: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\",\n }}\n onChange={onChange}\n {...pickObject(rest, formControlProperties)}\n />\n\n {isFunction(children)\n ? children({\n onClick,\n disabled,\n readOnly,\n required,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n isInvalid,\n })\n : children}\n </>\n )\n },\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAuB;AAEvB,kBAA+B;AAE/B,0BAGO;AACP,mBASO;AAEP,mBAAoC;AAkE5B;AAlCD,IAAM,iBAAa;AAAA,EACxB,CAAC,EAAE,WAAW,UAAU,IAAI,IAAI,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC5D,UAAM,EAAE,IAAI,MAAM,QAAQ,UAAU,MAAM,GAAG,KAAK,QAChD,yCAAoB,KAAK;AAE3B,UAAM,EAAE,UAAU,UAAU,UAAU,gBAAgB,UAAU,IAAI;AAEpE,UAAM,eAAW,qBAAyB,IAAI;AAE9C,UAAM,cAAU,0BAAY,MAAM;AA7DtC;AA8DM,UAAI,YAAY;AAAU;AAE1B,qBAAS,YAAT,mBAAkB;AAAA,IACpB,GAAG,CAAC,UAAU,QAAQ,CAAC;AAEvB,UAAM,eAAW;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names":[]}
1
+ {"version":3,"sources":["../src/file-button.tsx"],"sourcesContent":["import type { ButtonProps } from \"@yamada-ui/button\"\nimport { Button } from \"@yamada-ui/button\"\nimport type { ColorModeToken, CSS } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport type { FormControlOptions } from \"@yamada-ui/form-control\"\nimport {\n formControlProperties,\n useFormControlProps,\n} from \"@yamada-ui/form-control\"\nimport {\n assignRef,\n cx,\n handlerAll,\n isFunction,\n isNull,\n mergeRefs,\n omitObject,\n pickObject,\n} from \"@yamada-ui/utils\"\nimport type { ChangeEvent, ForwardedRef, ReactNode } from \"react\"\nimport { useCallback, useRef } from \"react\"\n\ntype Props = {\n onClick: () => void\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n} & FormControlOptions\n\ntype FileButtonOptions = {\n /**\n * The border color when the button is invalid.\n */\n errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, \"colors\">\n /**\n * Function to be called when a file change event occurs.\n */\n onChange?: (files: File[] | undefined) => void\n children?: ReactNode | ((props: Props) => ReactNode)\n /**\n * Ref to a reset function.\n */\n resetRef?: ForwardedRef<() => void>\n}\n\ntype InputProps = Partial<Pick<HTMLInputElement, \"accept\" | \"multiple\">>\n\nexport type FileButtonProps = Omit<ButtonProps, \"onChange\" | \"children\"> &\n InputProps &\n FileButtonOptions &\n FormControlOptions\n\nexport const FileButton = forwardRef<FileButtonProps, \"input\">(\n ({ className, resetRef, as: As, children, ...props }, ref) => {\n const { id, name, accept, multiple, form, ...rest } =\n useFormControlProps(props)\n\n const { disabled, readOnly, required, \"aria-invalid\": isInvalid } = rest\n\n const inputRef = useRef<HTMLInputElement>(null)\n\n const onClick = useCallback(() => {\n if (disabled || readOnly) return\n\n inputRef.current?.click()\n }, [disabled, readOnly])\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 rest.onChange?.(files)\n },\n [rest],\n )\n\n const onReset = useCallback(() => {\n if (inputRef.current) inputRef.current.value = \"\"\n }, [])\n\n if (!isFunction(children)) {\n const Component = As || Button\n\n children = (\n <Component\n className={cx(\"ui-file-button\", className)}\n {...omitObject(rest, [\"onChange\", \"aria-readonly\"])}\n onClick={handlerAll(rest.onClick, onClick)}\n >\n {children}\n </Component>\n ) as ReactNode\n }\n\n assignRef(resetRef, onReset)\n\n return (\n <>\n <ui.input\n ref={mergeRefs(inputRef, ref)}\n type=\"file\"\n aria-hidden\n tabIndex={-1}\n id={id}\n name={name}\n form={form}\n accept={accept}\n multiple={multiple}\n style={{\n border: \"0px\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n height: \"1px\",\n width: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\",\n }}\n onChange={onChange}\n {...pickObject(rest, formControlProperties)}\n />\n\n {isFunction(children)\n ? children({\n onClick,\n disabled,\n readOnly,\n required,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n isInvalid,\n })\n : children}\n </>\n )\n },\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAuB;AAEvB,kBAA+B;AAE/B,0BAGO;AACP,mBASO;AAEP,mBAAoC;AAkE5B;AAlCD,IAAM,iBAAa;AAAA,EACxB,CAAC,EAAE,WAAW,UAAU,IAAI,IAAI,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC5D,UAAM,EAAE,IAAI,MAAM,QAAQ,UAAU,MAAM,GAAG,KAAK,QAChD,yCAAoB,KAAK;AAE3B,UAAM,EAAE,UAAU,UAAU,UAAU,gBAAgB,UAAU,IAAI;AAEpE,UAAM,eAAW,qBAAyB,IAAI;AAE9C,UAAM,cAAU,0BAAY,MAAM;AA7DtC;AA8DM,UAAI,YAAY;AAAU;AAE1B,qBAAS,YAAT,mBAAkB;AAAA,I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A,QACZ,YAAY;AAAA,QACZ;AAAA,MACF,CAAC,IACD;AAAA,OACN;AAAA,EAEJ;AACF;","names":[]}
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  FileButton
4
- } from "./chunk-G5OJXMFY.mjs";
4
+ } from "./chunk-5W2ZT7JB.mjs";
5
5
  export {
6
6
  FileButton
7
7
  };
package/dist/index.js CHANGED
@@ -61,7 +61,7 @@ var FileButton = (0, import_core.forwardRef)(
61
61
  Component,
62
62
  {
63
63
  className: (0, import_utils.cx)("ui-file-button", className),
64
- ...(0, import_utils.omitObject)(rest, ["onChange"]),
64
+ ...(0, import_utils.omitObject)(rest, ["onChange", "aria-readonly"]),
65
65
  onClick: (0, import_utils.handlerAll)(rest.onClick, onClick),
66
66
  children
67
67
  }
@@ -74,6 +74,7 @@ var FileButton = (0, import_core.forwardRef)(
74
74
  {
75
75
  ref: (0, import_utils.mergeRefs)(inputRef, ref),
76
76
  type: "file",
77
+ "aria-hidden": true,
77
78
  tabIndex: -1,
78
79
  id,
79
80
  name,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/file-button.tsx"],"sourcesContent":["export { FileButton } from \"./file-button\"\nexport type { FileButtonProps } from \"./file-button\"\n","import type { ButtonProps } from \"@yamada-ui/button\"\nimport { Button } from \"@yamada-ui/button\"\nimport type { ColorModeToken, CSS } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport type { FormControlOptions } from \"@yamada-ui/form-control\"\nimport {\n formControlProperties,\n useFormControlProps,\n} from \"@yamada-ui/form-control\"\nimport {\n assignRef,\n cx,\n handlerAll,\n isFunction,\n isNull,\n mergeRefs,\n omitObject,\n pickObject,\n} from \"@yamada-ui/utils\"\nimport type { ChangeEvent, ForwardedRef, ReactNode } from \"react\"\nimport { useCallback, useRef } from \"react\"\n\ntype Props = {\n onClick: () => void\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n} & FormControlOptions\n\ntype FileButtonOptions = {\n /**\n * The border color when the button is invalid.\n */\n errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, \"colors\">\n /**\n * Function to be called when a file change event occurs.\n */\n onChange?: (files: File[] | undefined) => void\n children?: ReactNode | ((props: Props) => ReactNode)\n /**\n * Ref to a reset function.\n */\n resetRef?: ForwardedRef<() => void>\n}\n\ntype InputProps = Partial<Pick<HTMLInputElement, \"accept\" | \"multiple\">>\n\nexport type FileButtonProps = Omit<ButtonProps, \"onChange\" | \"children\"> &\n InputProps &\n FileButtonOptions &\n FormControlOptions\n\nexport const FileButton = forwardRef<FileButtonProps, \"input\">(\n ({ className, resetRef, as: As, children, ...props }, ref) => {\n const { id, name, accept, multiple, form, ...rest } =\n useFormControlProps(props)\n\n const { disabled, readOnly, required, \"aria-invalid\": isInvalid } = rest\n\n const inputRef = useRef<HTMLInputElement>(null)\n\n const onClick = useCallback(() => {\n if (disabled || readOnly) return\n\n inputRef.current?.click()\n }, [disabled, readOnly])\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 rest.onChange?.(files)\n },\n [rest],\n )\n\n const onReset = useCallback(() => {\n if (inputRef.current) inputRef.current.value = \"\"\n }, [])\n\n if (!isFunction(children)) {\n const Component = As || Button\n\n children = (\n <Component\n className={cx(\"ui-file-button\", className)}\n {...omitObject(rest, [\"onChange\"])}\n onClick={handlerAll(rest.onClick, onClick)}\n >\n {children}\n </Component>\n ) as ReactNode\n }\n\n assignRef(resetRef, onReset)\n\n return (\n <>\n <ui.input\n ref={mergeRefs(inputRef, ref)}\n type=\"file\"\n tabIndex={-1}\n id={id}\n name={name}\n form={form}\n accept={accept}\n multiple={multiple}\n style={{\n border: \"0px\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n height: \"1px\",\n width: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\",\n }}\n onChange={onChange}\n {...pickObject(rest, formControlProperties)}\n />\n\n {isFunction(children)\n ? children({\n onClick,\n disabled,\n readOnly,\n required,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n isInvalid,\n })\n : children}\n </>\n )\n },\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,oBAAuB;AAEvB,kBAA+B;AAE/B,0BAGO;AACP,mBASO;AAEP,mBAAoC;AAkE5B;AAlCD,IAAM,iBAAa;AAAA,EACxB,CAAC,EAAE,WAAW,UAAU,IAAI,IAAI,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC5D,UAAM,EAAE,IAAI,MAAM,QAAQ,UAAU,MAAM,GAAG,KAAK,QAChD,yCAAoB,KAAK;AAE3B,UAAM,EAAE,UAAU,UAAU,UAAU,gBAAgB,UAAU,IAAI;AAEpE,UAAM,eAAW,qBAAyB,IAAI;AAE9C,UAAM,cAAU,0BAAY,MAAM;AA7DtC;AA8DM,UAAI,YAAY;AAAU;AAE1B,qBAAS,YAAT,mBAAkB;AAAA,IACpB,GAAG,CAAC,UAAU,QAAQ,CAAC;AAEvB,UAAM,eAAW;AAAA,MACf,CAAC,OAAsC;AApE7C;AAqEQ,cAAM,QAAQ,KAAC,qBAAO,GAAG,cAAc,KAAK,IACxC,MAAM,KAAK,GAAG,cAAc,KAAK,IACjC;AAEJ,mBAAK,aAAL,8BAAgB;AAAA,MAClB;AAAA,MACA,CAAC,IAAI;AAAA,IACP;AAEA,UAAM,cAAU,0BAAY,MAAM;AAChC,UAAI,SAAS;AAAS,iBAAS,QAAQ,QAAQ;AAAA,IACjD,GAAG,CAAC,CAAC;AAEL,QAAI,KAAC,yBAAW,QAAQ,GAAG;AACzB,YAAM,YAAY,MAAM;AAExB,iBACE;AAAA,QAAC;AAAA;AAAA,UACC,eAAW,iBAAG,kBAAkB,SAAS;AAAA,UACxC,OAAG,yBAAW,MAAM,CAAC,UAAU,CAAC;AAAA,UACjC,aAAS,yBAAW,KAAK,SAAS,OAAO;AAAA,UAExC;AAAA;AAAA,MACH;AAAA,IAEJ;AAEA,gCAAU,UAAU,OAAO;AAE3B,WACE,4EACE;AAAA;AAAA,QAAC,eAAG;AAAA,QAAH;AAAA,UACC,SAAK,wBAAU,UAAU,GAAG;AAAA,UAC5B,MAAK;AAAA,UACL,UAAU;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,OAAO;AAAA,YACL,QAAQ;AAAA,YACR,MAAM;AAAA,YACN,QAAQ;AAAA,YACR,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,SAAS;AAAA,YACT,UAAU;AAAA,YACV,YAAY;AAAA,YACZ,UAAU;AAAA,UACZ;AAAA,UACA;AAAA,UACC,OAAG,yBAAW,MAAM,yCAAqB;AAAA;AAAA,MAC5C;AAAA,UAEC,yBAAW,QAAQ,IAChB,SAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ;AAAA,MACF,CAAC,IACD;AAAA,OACN;AAAA,EAEJ;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/file-button.tsx"],"sourcesContent":["export { FileButton } from \"./file-button\"\nexport type { FileButtonProps } from \"./file-button\"\n","import type { ButtonProps } from \"@yamada-ui/button\"\nimport { Button } from \"@yamada-ui/button\"\nimport type { ColorModeToken, CSS } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport type { FormControlOptions } from \"@yamada-ui/form-control\"\nimport {\n formControlProperties,\n useFormControlProps,\n} from \"@yamada-ui/form-control\"\nimport {\n assignRef,\n cx,\n handlerAll,\n isFunction,\n isNull,\n mergeRefs,\n omitObject,\n pickObject,\n} from \"@yamada-ui/utils\"\nimport type { ChangeEvent, ForwardedRef, ReactNode } from \"react\"\nimport { useCallback, useRef } from \"react\"\n\ntype Props = {\n onClick: () => void\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n} & FormControlOptions\n\ntype FileButtonOptions = {\n /**\n * The border color when the button is invalid.\n */\n errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, \"colors\">\n /**\n * Function to be called when a file change event occurs.\n */\n onChange?: (files: File[] | undefined) => void\n children?: ReactNode | ((props: Props) => ReactNode)\n /**\n * Ref to a reset function.\n */\n resetRef?: ForwardedRef<() => void>\n}\n\ntype InputProps = Partial<Pick<HTMLInputElement, \"accept\" | \"multiple\">>\n\nexport type FileButtonProps = Omit<ButtonProps, \"onChange\" | \"children\"> &\n InputProps &\n FileButtonOptions &\n FormControlOptions\n\nexport const FileButton = forwardRef<FileButtonProps, \"input\">(\n ({ className, resetRef, as: As, children, ...props }, ref) => {\n const { id, name, accept, multiple, form, ...rest } =\n useFormControlProps(props)\n\n const { disabled, readOnly, required, \"aria-invalid\": isInvalid } = rest\n\n const inputRef = useRef<HTMLInputElement>(null)\n\n const onClick = useCallback(() => {\n if (disabled || readOnly) return\n\n inputRef.current?.click()\n }, [disabled, readOnly])\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 rest.onChange?.(files)\n },\n [rest],\n )\n\n const onReset = useCallback(() => {\n if (inputRef.current) inputRef.current.value = \"\"\n }, [])\n\n if (!isFunction(children)) {\n const Component = As || Button\n\n children = (\n <Component\n className={cx(\"ui-file-button\", className)}\n {...omitObject(rest, [\"onChange\", \"aria-readonly\"])}\n onClick={handlerAll(rest.onClick, onClick)}\n >\n {children}\n </Component>\n ) as ReactNode\n }\n\n assignRef(resetRef, onReset)\n\n return (\n <>\n <ui.input\n ref={mergeRefs(inputRef, ref)}\n type=\"file\"\n aria-hidden\n tabIndex={-1}\n id={id}\n name={name}\n form={form}\n accept={accept}\n multiple={multiple}\n style={{\n border: \"0px\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n height: \"1px\",\n width: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\",\n }}\n onChange={onChange}\n {...pickObject(rest, formControlProperties)}\n />\n\n {isFunction(children)\n ? children({\n onClick,\n disabled,\n readOnly,\n required,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n isInvalid,\n })\n : children}\n </>\n )\n },\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,oBAAuB;AAEvB,kBAA+B;AAE/B,0BAGO;AACP,mBASO;AAEP,mBAAoC;AAkE5B;AAlCD,IAAM,iBAAa;AAAA,EACxB,CAAC,EAAE,WAAW,UAAU,IAAI,IAAI,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC5D,UAAM,EAAE,IAAI,MAAM,QAAQ,UAAU,MAAM,GAAG,KAAK,QAChD,yCAAoB,KAAK;AAE3B,UAAM,EAAE,UAAU,UAAU,UAAU,gBAAgB,UAAU,IAAI;AAEpE,UAAM,eAAW,qBAAyB,IAAI;AAE9C,UAAM,cAAU,0BAAY,MAAM;AA7DtC;AA8DM,UAAI,YAAY;AAAU;AAE1B,qBAAS,YAAT,mBAAkB;AAAA,IACpB,GAAG,CAAC,UAAU,QAAQ,CAAC;AAEvB,UAAM,eAAW;AAAA,MACf,CAAC,OAAsC;AApE7C;AAqEQ,cAAM,QAAQ,KAAC,qBAAO,GAAG,cAAc,KAAK,IACxC,MAAM,KAAK,GAAG,cAAc,KAAK,IACjC;AAEJ,mBAAK,aAAL,8BAAgB;AAAA,MAClB;AAAA,MACA,CAAC,IAAI;AAAA,IACP;AAEA,UAAM,cAAU,0BAAY,MAAM;AAChC,UAAI,SAAS;AAAS,iBAAS,QAAQ,QAAQ;AAAA,IACjD,GAAG,CAAC,CAAC;AAEL,QAAI,KAAC,yBAAW,QAAQ,GAAG;AACzB,YAAM,YAAY,MAAM;AAExB,iBACE;AAAA,QAAC;AAAA;AAAA,UACC,eAAW,iBAAG,kBAAkB,SAAS;AAAA,UACxC,OAAG,yBAAW,MAAM,CAAC,YAAY,eAAe,CAAC;AAAA,UAClD,aAAS,yBAAW,KAAK,SAAS,OAAO;AAAA,UAExC;AAAA;AAAA,MACH;AAAA,IAEJ;AAEA,gCAAU,UAAU,OAAO;AAE3B,WACE,4EACE;AAAA;AAAA,QAAC,eAAG;AAAA,QAAH;AAAA,UACC,SAAK,wBAAU,UAAU,GAAG;AAAA,UAC5B,MAAK;AAAA,UACL,eAAW;AAAA,UACX,UAAU;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,OAAO;AAAA,YACL,QAAQ;AAAA,YACR,MAAM;AAAA,YACN,QAAQ;AAAA,YACR,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,SAAS;AAAA,YACT,UAAU;AAAA,YACV,YAAY;AAAA,YACZ,UAAU;AAAA,UACZ;AAAA,UACA;AAAA,UACC,OAAG,yBAAW,MAAM,yCAAqB;AAAA;AAAA,MAC5C;AAAA,UAEC,yBAAW,QAAQ,IAChB,SAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ;AAAA,MACF,CAAC,IACD;AAAA,OACN;AAAA,EAEJ;AACF;","names":[]}
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  FileButton
4
- } from "./chunk-G5OJXMFY.mjs";
4
+ } from "./chunk-5W2ZT7JB.mjs";
5
5
  export {
6
6
  FileButton
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/file-button",
3
- "version": "0.3.30",
3
+ "version": "0.3.31",
4
4
  "description": "Yamada UI file button component",
5
5
  "keywords": [
6
6
  "yamada",
@@ -35,10 +35,10 @@
35
35
  "url": "https://github.com/hirotomoyamada/yamada-ui/issues"
36
36
  },
37
37
  "dependencies": {
38
- "@yamada-ui/core": "0.14.2",
38
+ "@yamada-ui/core": "0.15.0",
39
39
  "@yamada-ui/utils": "0.5.0",
40
- "@yamada-ui/form-control": "0.3.27",
41
- "@yamada-ui/button": "0.4.3"
40
+ "@yamada-ui/form-control": "0.3.28",
41
+ "@yamada-ui/button": "0.4.4"
42
42
  },
43
43
  "devDependencies": {
44
44
  "react": "^18.0.0",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/file-button.tsx"],"sourcesContent":["import type { ButtonProps } from \"@yamada-ui/button\"\nimport { Button } from \"@yamada-ui/button\"\nimport type { ColorModeToken, CSS } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport type { FormControlOptions } from \"@yamada-ui/form-control\"\nimport {\n formControlProperties,\n useFormControlProps,\n} from \"@yamada-ui/form-control\"\nimport {\n assignRef,\n cx,\n handlerAll,\n isFunction,\n isNull,\n mergeRefs,\n omitObject,\n pickObject,\n} from \"@yamada-ui/utils\"\nimport type { ChangeEvent, ForwardedRef, ReactNode } from \"react\"\nimport { useCallback, useRef } from \"react\"\n\ntype Props = {\n onClick: () => void\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n} & FormControlOptions\n\ntype FileButtonOptions = {\n /**\n * The border color when the button is invalid.\n */\n errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, \"colors\">\n /**\n * Function to be called when a file change event occurs.\n */\n onChange?: (files: File[] | undefined) => void\n children?: ReactNode | ((props: Props) => ReactNode)\n /**\n * Ref to a reset function.\n */\n resetRef?: ForwardedRef<() => void>\n}\n\ntype InputProps = Partial<Pick<HTMLInputElement, \"accept\" | \"multiple\">>\n\nexport type FileButtonProps = Omit<ButtonProps, \"onChange\" | \"children\"> &\n InputProps &\n FileButtonOptions &\n FormControlOptions\n\nexport const FileButton = forwardRef<FileButtonProps, \"input\">(\n ({ className, resetRef, as: As, children, ...props }, ref) => {\n const { id, name, accept, multiple, form, ...rest } =\n useFormControlProps(props)\n\n const { disabled, readOnly, required, \"aria-invalid\": isInvalid } = rest\n\n const inputRef = useRef<HTMLInputElement>(null)\n\n const onClick = useCallback(() => {\n if (disabled || readOnly) return\n\n inputRef.current?.click()\n }, [disabled, readOnly])\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 rest.onChange?.(files)\n },\n [rest],\n )\n\n const onReset = useCallback(() => {\n if (inputRef.current) inputRef.current.value = \"\"\n }, [])\n\n if (!isFunction(children)) {\n const Component = As || Button\n\n children = (\n <Component\n className={cx(\"ui-file-button\", className)}\n {...omitObject(rest, [\"onChange\"])}\n onClick={handlerAll(rest.onClick, onClick)}\n >\n {children}\n </Component>\n ) as ReactNode\n }\n\n assignRef(resetRef, onReset)\n\n return (\n <>\n <ui.input\n ref={mergeRefs(inputRef, ref)}\n type=\"file\"\n tabIndex={-1}\n id={id}\n name={name}\n form={form}\n accept={accept}\n multiple={multiple}\n style={{\n border: \"0px\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n height: \"1px\",\n width: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\",\n }}\n onChange={onChange}\n {...pickObject(rest, formControlProperties)}\n />\n\n {isFunction(children)\n ? children({\n onClick,\n disabled,\n readOnly,\n required,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n isInvalid,\n })\n : children}\n </>\n )\n },\n)\n"],"mappings":";;;AACA,SAAS,cAAc;AAEvB,SAAS,IAAI,kBAAkB;AAE/B;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AA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