@ztwoint/z-ui 0.1.13 → 0.1.14
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/components/assets/icons/upload.d.ts +8 -0
- package/dist/components/assets/icons/z2-icon.js +4 -4
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +6 -6
- package/dist/components/file-upload-area/file-upload-area.const.d.ts +1 -0
- package/dist/components/file-upload-area/file-upload-area.d.ts +42 -0
- package/dist/components/file-upload-area/text-preset.d.ts +4 -0
- package/dist/components/file-upload-area/upload-icon-component.d.ts +3 -0
- package/dist/components/nav-header/nav-item/nav-item.js +15 -15
- package/dist/css/config/colors/backgrounds.css +19 -7
- package/dist/css/config/colors/defaults.css +4 -0
- package/dist/css/config/config.css +0 -1
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/types/components/assets/icons/upload.d.ts +8 -0
- package/dist/types/components/button/button.d.ts +1 -1
- package/dist/types/components/file-upload-area/file-upload-area.const.d.ts +1 -0
- package/dist/types/components/file-upload-area/file-upload-area.d.ts +42 -0
- package/dist/types/components/file-upload-area/text-preset.d.ts +4 -0
- package/dist/types/components/file-upload-area/upload-icon-component.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
type IconProps = SVGProps<SVGSVGElement> & {
|
|
3
|
+
secondaryfill?: string;
|
|
4
|
+
strokewidth?: number;
|
|
5
|
+
title?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function Upload({ fill, secondaryfill, strokewidth, width, height, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Upload;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "stroke" | "ghost" | "filled" | null | undefined;
|
|
5
5
|
shade?: "danger" | "neutral" | "brand" | "neutralGhost" | null | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_ACCEPT: string[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type FileUploadAreaProps = {
|
|
3
|
+
onFilesSelected: (files: File[]) => void;
|
|
4
|
+
accept?: string[];
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* FileUploadArea component provides a drag-and-drop and click-to-upload area for file selection.
|
|
11
|
+
*
|
|
12
|
+
* Features:
|
|
13
|
+
* - Drag and drop file upload
|
|
14
|
+
* - Click to open file dialog
|
|
15
|
+
* - Supports multiple file formats (default: CSV, XLS, XLSX)
|
|
16
|
+
* - Supports multiple file selection
|
|
17
|
+
* - Disabled state (blocks all interaction and changes style)
|
|
18
|
+
* - Custom className for styling
|
|
19
|
+
* - Accessible and keyboard-navigable
|
|
20
|
+
*
|
|
21
|
+
* @component
|
|
22
|
+
* @param {FileUploadAreaProps} props - The props for FileUploadArea
|
|
23
|
+
* @returns {JSX.Element}
|
|
24
|
+
*
|
|
25
|
+
* @example <caption>Default usage</caption>
|
|
26
|
+
* <FileUploadArea onFilesSelected={files => console.log(files)} />
|
|
27
|
+
*
|
|
28
|
+
* @example <caption>Custom formats and single file</caption>
|
|
29
|
+
* <FileUploadArea
|
|
30
|
+
* onFilesSelected={files => console.log(files)}
|
|
31
|
+
* accept={[".pdf", ".docx"]}
|
|
32
|
+
* multiple={false}
|
|
33
|
+
* />
|
|
34
|
+
*
|
|
35
|
+
* @example <caption>Disabled</caption>
|
|
36
|
+
* <FileUploadArea onFilesSelected={() => {}} disabled />
|
|
37
|
+
*
|
|
38
|
+
* @example <caption>Async handler</caption>
|
|
39
|
+
* <FileUploadArea onFilesSelected={async files => await uploadFiles(files)} />
|
|
40
|
+
*/
|
|
41
|
+
export declare const FileUploadArea: React.FC<FileUploadAreaProps>;
|
|
42
|
+
export default FileUploadArea;
|