@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.
@@ -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;
@@ -0,0 +1,4 @@
1
+ declare function TextPreset({ accept }: {
2
+ accept: string[];
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ export default TextPreset;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const UploadIconComponent: React.FC;
3
+ export default UploadIconComponent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztwoint/z-ui",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",