@ztwoint/z-ui 0.1.13 → 0.1.15
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/circle-check-filled.js +29 -0
- package/dist/components/assets/icons/media-record.js +34 -0
- package/dist/components/assets/icons/upload.d.ts +8 -0
- package/dist/components/assets/icons/upload.js +61 -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/dialog/dialog.js +110 -0
- package/dist/components/file-upload-area/file-upload-area.const.d.ts +1 -0
- package/dist/components/file-upload-area/file-upload-area.const.js +4 -0
- package/dist/components/file-upload-area/file-upload-area.d.ts +42 -0
- package/dist/components/file-upload-area/file-upload-area.js +71 -0
- package/dist/components/file-upload-area/text-preset.d.ts +4 -0
- package/dist/components/file-upload-area/text-preset.js +13 -0
- package/dist/components/file-upload-area/upload-icon-component.d.ts +3 -0
- package/dist/components/file-upload-area/upload-icon-component.js +7 -0
- package/dist/components/nav-header/nav-item/nav-item.js +15 -15
- package/dist/components/stepper/index.d.ts +2 -0
- package/dist/components/stepper/stepper-item/stepper-item.js +49 -0
- package/dist/components/stepper/stepper.js +50 -0
- 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/index.d.ts +3 -0
- package/dist/index.js +72 -56
- 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/dist/types/components/stepper/index.d.ts +2 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,3 +6,6 @@ export * from './components/country-flags/country-flags';
|
|
|
6
6
|
export * from './components/collapsible-side-nav-bar';
|
|
7
7
|
export * from './components/tab/tab';
|
|
8
8
|
export * from './components/tooltip/tooltip';
|
|
9
|
+
export * from './components/dialog/dialog';
|
|
10
|
+
export * from './components/file-upload-area/file-upload-area';
|
|
11
|
+
export * from './components/stepper';
|
package/dist/index.js
CHANGED
|
@@ -1,67 +1,83 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
import { Alert as
|
|
2
|
+
import { Alert as a, AlertDescription as p, AlertTitle as i } from "./components/alert/alert.js";
|
|
3
3
|
import { AlertCirclesIcon as m } from "./components/alert/icons/circles-icon.js";
|
|
4
|
-
import { Button as
|
|
5
|
-
import { NavHeader as
|
|
4
|
+
import { Button as l, buttonVariants as Z } from "./components/button/button.js";
|
|
5
|
+
import { NavHeader as n } from "./components/nav-header/nav-header.js";
|
|
6
6
|
import { NavItem as v } from "./components/nav-header/nav-item/nav-item.js";
|
|
7
|
-
import { Input as
|
|
8
|
-
import { CountryFlags as
|
|
9
|
-
import { Z2SideNavBarProvider as
|
|
10
|
-
import { Z2SideNavBar as
|
|
11
|
-
import { Z2SideNavBarHeader as
|
|
12
|
-
import { Z2SideNavBarContent as
|
|
13
|
-
import { Z2SideNavBarFooter as
|
|
14
|
-
import { Z2SideNavBarGroup as
|
|
7
|
+
import { Input as S } from "./components/input/input.js";
|
|
8
|
+
import { CountryFlags as C } from "./components/country-flags/country-flags.js";
|
|
9
|
+
import { Z2SideNavBarProvider as B } from "./components/collapsible-side-nav-bar/side-nav-bar-provider.js";
|
|
10
|
+
import { Z2SideNavBar as N, Z2SidebarVariants as T } from "./components/collapsible-side-nav-bar/side-nav-bar.js";
|
|
11
|
+
import { Z2SideNavBarHeader as c } from "./components/collapsible-side-nav-bar/side-nav-bar-header.js";
|
|
12
|
+
import { Z2SideNavBarContent as P } from "./components/collapsible-side-nav-bar/side-nav-bar-content.js";
|
|
13
|
+
import { Z2SideNavBarFooter as H } from "./components/collapsible-side-nav-bar/side-nav-bar-footer.js";
|
|
14
|
+
import { Z2SideNavBarGroup as F } from "./components/collapsible-side-nav-bar/side-nav-bar-group.js";
|
|
15
15
|
import { Z2SideNavBarItem as W } from "./components/collapsible-side-nav-bar/side-nav-bar-item.js";
|
|
16
16
|
import { Z2SideNavBarSeparator as h } from "./components/collapsible-side-nav-bar/side-nav-bar-separator.js";
|
|
17
|
-
import { useZ2SideNavBar as
|
|
18
|
-
import { Z2Popover as
|
|
19
|
-
import { ChevronUpIcon as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { SIDEBAR_WIDTH as
|
|
26
|
-
import { Z2Tabs as
|
|
27
|
-
import { Z2Tooltip as
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
17
|
+
import { useZ2SideNavBar as O } from "./components/collapsible-side-nav-bar/context.js";
|
|
18
|
+
import { Z2Popover as U } from "./components/collapsible-side-nav-bar/popover/popover.js";
|
|
19
|
+
import { ChevronUpIcon as G } from "./components/assets/icons/chevron-up-icon.js";
|
|
20
|
+
import { default as k } from "./components/assets/icons/sub-nav-indicator.js";
|
|
21
|
+
import { default as z } from "./components/assets/icons/circles-icon.js";
|
|
22
|
+
import { default as K } from "./components/assets/icons/database-copy.js";
|
|
23
|
+
import { default as Q } from "./components/assets/icons/window-left-copy.js";
|
|
24
|
+
import { default as Y } from "./components/assets/icons/sidebar-left-show-copy.js";
|
|
25
|
+
import { SIDEBAR_WIDTH as oo, SIDEBAR_WIDTH_COLLAPSED as ro } from "./components/collapsible-side-nav-bar/constants.js";
|
|
26
|
+
import { Z2Tabs as to, Z2TabsContent as ao, Z2TabsList as po, Z2TabsTrigger as io } from "./components/tab/tab.js";
|
|
27
|
+
import { Z2Tooltip as mo } from "./components/tooltip/tooltip.js";
|
|
28
|
+
import { Z2Dialog as lo, Z2DialogClose as Zo, Z2DialogContent as no, Z2DialogDescription as so, Z2DialogFooter as vo, Z2DialogHeader as Do, Z2DialogOverlay as So, Z2DialogPortal as go, Z2DialogTitle as Co, Z2DialogTrigger as uo } from "./components/dialog/dialog.js";
|
|
29
|
+
import { FileUploadArea as Io } from "./components/file-upload-area/file-upload-area.js";
|
|
30
|
+
import "./components/stepper/stepper.js";
|
|
31
|
+
import { Z2StepperItem as To } from "./components/stepper/stepper-item/stepper-item.js";
|
|
32
|
+
import { Z2PopoverTrigger as co } from "./components/collapsible-side-nav-bar/popover/popover-trigger.js";
|
|
33
|
+
import { Z2PopoverContent as Po } from "./components/collapsible-side-nav-bar/popover/popover-content.js";
|
|
30
34
|
export {
|
|
31
|
-
|
|
35
|
+
a as Alert,
|
|
32
36
|
m as AlertCirclesIcon,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
p as AlertDescription,
|
|
38
|
+
i as AlertTitle,
|
|
39
|
+
l as Button,
|
|
40
|
+
G as ChevronUpIcon,
|
|
41
|
+
z as CirclesIcon,
|
|
42
|
+
C as CountryFlags,
|
|
43
|
+
K as DatabaseCopy,
|
|
44
|
+
Io as FileUploadArea,
|
|
45
|
+
S as Input,
|
|
46
|
+
n as NavHeader,
|
|
42
47
|
v as NavItem,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
oo as SIDEBAR_WIDTH,
|
|
49
|
+
ro as SIDEBAR_WIDTH_COLLAPSED,
|
|
50
|
+
Y as SidebarLeftShowCopy,
|
|
51
|
+
k as SubNavIndicator,
|
|
52
|
+
Q as WindowLeftCopy,
|
|
53
|
+
lo as Z2Dialog,
|
|
54
|
+
Zo as Z2DialogClose,
|
|
55
|
+
no as Z2DialogContent,
|
|
56
|
+
so as Z2DialogDescription,
|
|
57
|
+
vo as Z2DialogFooter,
|
|
58
|
+
Do as Z2DialogHeader,
|
|
59
|
+
So as Z2DialogOverlay,
|
|
60
|
+
go as Z2DialogPortal,
|
|
61
|
+
Co as Z2DialogTitle,
|
|
62
|
+
uo as Z2DialogTrigger,
|
|
63
|
+
U as Z2Popover,
|
|
64
|
+
Po as Z2PopoverContent,
|
|
65
|
+
co as Z2PopoverTrigger,
|
|
66
|
+
N as Z2SideNavBar,
|
|
67
|
+
P as Z2SideNavBarContent,
|
|
68
|
+
H as Z2SideNavBarFooter,
|
|
69
|
+
F as Z2SideNavBarGroup,
|
|
70
|
+
c as Z2SideNavBarHeader,
|
|
56
71
|
W as Z2SideNavBarItem,
|
|
57
|
-
|
|
72
|
+
B as Z2SideNavBarProvider,
|
|
58
73
|
h as Z2SideNavBarSeparator,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
T as Z2SidebarVariants,
|
|
75
|
+
To as Z2StepperItem,
|
|
76
|
+
to as Z2Tabs,
|
|
77
|
+
ao as Z2TabsContent,
|
|
78
|
+
po as Z2TabsList,
|
|
79
|
+
io as Z2TabsTrigger,
|
|
80
|
+
mo as Z2Tooltip,
|
|
81
|
+
Z as buttonVariants,
|
|
82
|
+
O as useZ2SideNavBar
|
|
67
83
|
};
|
|
@@ -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;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,3 +7,6 @@ export * from './components/country-flags/country-flags';
|
|
|
7
7
|
export * from './components/collapsible-side-nav-bar';
|
|
8
8
|
export * from './components/tab/tab';
|
|
9
9
|
export * from './components/tooltip/tooltip';
|
|
10
|
+
export * from './components/dialog/dialog';
|
|
11
|
+
export * from './components/file-upload-area/file-upload-area';
|
|
12
|
+
export * from './components/stepper';
|