@yamada-ui/file-button 0.2.4 → 0.2.5
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.
- package/dist/file-button.d.mts +32 -0
- package/dist/index.d.mts +5 -0
- package/package.json +5 -5
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { CSSUIProps } from '@yamada-ui/core';
|
|
3
|
+
import { ButtonProps } from '@yamada-ui/button';
|
|
4
|
+
import { FormControlOptions } from '@yamada-ui/form-control';
|
|
5
|
+
import { ReactNode, ForwardedRef } from 'react';
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
} & FormControlOptions;
|
|
13
|
+
type FileButtonOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* The border color when the button is invalid.
|
|
16
|
+
*/
|
|
17
|
+
errorBorderColor?: CSSUIProps<'unresponsive'>['borderColor'];
|
|
18
|
+
/**
|
|
19
|
+
* Function to be called when a file change event occurs.
|
|
20
|
+
*/
|
|
21
|
+
onChange?: (files: File[] | null) => void;
|
|
22
|
+
children?: ReactNode | ((props: Props) => ReactNode);
|
|
23
|
+
/**
|
|
24
|
+
* Ref to a reset function.
|
|
25
|
+
*/
|
|
26
|
+
resetRef?: ForwardedRef<() => void>;
|
|
27
|
+
};
|
|
28
|
+
type InputProps = Partial<Pick<HTMLInputElement, 'accept' | 'multiple'>>;
|
|
29
|
+
type FileButtonProps = Omit<ButtonProps, 'onChange' | 'children'> & InputProps & FileButtonOptions & FormControlOptions;
|
|
30
|
+
declare const FileButton: _yamada_ui_core.Component<"input", FileButtonProps>;
|
|
31
|
+
|
|
32
|
+
export { FileButton, FileButtonProps };
|
package/dist/index.d.mts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/file-button",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
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.
|
|
39
|
-
"@yamada-ui/utils": "0.1.
|
|
40
|
-
"@yamada-ui/form-control": "0.2.
|
|
41
|
-
"@yamada-ui/button": "0.2.
|
|
38
|
+
"@yamada-ui/core": "0.5.0",
|
|
39
|
+
"@yamada-ui/utils": "0.1.3",
|
|
40
|
+
"@yamada-ui/form-control": "0.2.5",
|
|
41
|
+
"@yamada-ui/button": "0.2.5"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"react": "^18.0.0",
|