@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,7 +1,7 @@
1
- import { jsxs as L, jsx as C } from "react/jsx-runtime";
2
- function e({ title: i = "badge 13", ...t }) {
3
- return /* @__PURE__ */ L("svg", { height: "22", width: "27", viewBox: "0 0 27 22", xmlns: "http://www.w3.org/2000/svg", ...t, children: [
4
- /* @__PURE__ */ C("title", { children: i }),
1
+ import { jsxs as t, jsx as C } from "react/jsx-runtime";
2
+ function e({ title: L = "Z2-Logo", ...i }) {
3
+ return /* @__PURE__ */ t("svg", { height: "22", width: "27", viewBox: "0 0 27 22", xmlns: "http://www.w3.org/2000/svg", ...i, children: [
4
+ /* @__PURE__ */ C("title", { children: L }),
5
5
  /* @__PURE__ */ C("g", { fill: "none", children: /* @__PURE__ */ C(
6
6
  "path",
7
7
  {
@@ -1,5 +1,5 @@
1
+ import { default as React } from 'react';
1
2
  import { 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;
@@ -1,9 +1,9 @@
1
1
  import { jsx as e, jsxs as x, Fragment as g } from "react/jsx-runtime";
2
- import { Slot as O } from "@radix-ui/react-slot";
3
- import { cva as z } from "class-variance-authority";
4
- import * as w from "react";
2
+ import O from "react";
3
+ import { Slot as z } from "@radix-ui/react-slot";
4
+ import { cva as w } from "class-variance-authority";
5
5
  import { cn as d } from "../../lib/utils.js";
6
- const N = z(
6
+ const N = w(
7
7
  "box-border h-7.5 leading-none-medium-sm flex items-center justify-center whitespace-nowrap rounded-lg select-none hover:cursor-pointer active:outline-none border-solid",
8
8
  {
9
9
  variants: {
@@ -70,7 +70,7 @@ const N = z(
70
70
  iconOnly: !1
71
71
  }
72
72
  }
73
- ), k = w.forwardRef(
73
+ ), k = O.forwardRef(
74
74
  ({
75
75
  className: i,
76
76
  shade: c,
@@ -83,7 +83,7 @@ const N = z(
83
83
  children: l,
84
84
  ...p
85
85
  }, y) => {
86
- const v = o ? O : "button", r = m || l, n = !r && !!(a || t), u = n ? a || t : null, h = d(
86
+ const v = o ? z : "button", r = m || l, n = !r && !!(a || t), u = n ? a || t : null, h = d(
87
87
  N({ shade: c, size: b, variant: f, iconOnly: n, className: i })
88
88
  ), s = "w-3.5 h-3.5";
89
89
  return /* @__PURE__ */ e(v, { className: h, ref: y, ...p, children: o ? l : n ? u ? /* @__PURE__ */ e("span", { className: s, children: u }) : null : /* @__PURE__ */ x(g, { children: [
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_ACCEPT: string[];
@@ -0,0 +1,42 @@
1
+ import { default as 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 { default as React } from 'react';
2
+ export declare const UploadIconComponent: React.FC;
3
+ export default UploadIconComponent;
@@ -1,26 +1,26 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import c from "react";
3
- import { Button as i } from "../../button/button.js";
4
- import { cn as v } from "../../../lib/utils.js";
5
- const d = c.forwardRef(
6
- ({ leftIcon: t, label: r, rightIcon: a, onClick: o, className: l, isActive: m, asChild: e, children: n, ...s }, u) => /* @__PURE__ */ f(
7
- i,
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import v from "react";
3
+ import { Button as f } from "../../button/button.js";
4
+ import { cn as c } from "../../../lib/utils.js";
5
+ const d = v.forwardRef(
6
+ ({ leftIcon: r, label: t, rightIcon: a, onClick: o, className: m, isActive: l, asChild: e, children: n, ...i }, s) => /* @__PURE__ */ u(
7
+ f,
8
8
  {
9
9
  variant: "ghost",
10
10
  shade: "neutralGhost",
11
11
  size: "large",
12
- leftIcon: t,
12
+ leftIcon: r,
13
13
  rightIcon: a,
14
- label: r,
14
+ label: t,
15
15
  onClick: o,
16
- className: v(
17
- "text-inverted hover:surface-neutral-elevated active:surface-neutral-elevated ",
18
- m && "surface-neutral-elevated",
19
- l
16
+ className: c(
17
+ "text-inverted-primary hover:text-inverted-primary hover:surface-neutral-elevated active:surface-neutral-elevated ",
18
+ l && "surface-neutral-elevated",
19
+ m
20
20
  ),
21
21
  asChild: e,
22
- ...s,
23
- ref: u,
22
+ ...i,
23
+ ref: s,
24
24
  children: e ? n : null
25
25
  }
26
26
  )
@@ -3,18 +3,30 @@
3
3
  background-color: var(--color-neutral-00);
4
4
  }
5
5
 
6
- @utility bg-neutral-secondary {
6
+ @utility bg-neutral-on-top {
7
+ background-color: var(--color-neutral-00);
8
+ }
9
+
10
+ @utility bg-neutral-light {
11
+ background-color: var(--color-neutral-25);
12
+ }
13
+
14
+ @utility bg-neutral-high {
15
+ background-color: var(--color-neutral-100);
16
+ }
17
+
18
+ @utility bg-neutral-medium {
7
19
  background-color: var(--color-neutral-50);
8
20
  }
9
21
 
10
- @utility bg-neutral-elevated {
11
- background-color: var(--color-neutral-75);
22
+ @utility bg-neutral-inverted-elevated {
23
+ background-color: var(--color-alpha-two-100);
12
24
  }
13
25
 
14
- @utility bg-neutral-attention {
15
- background-color: var(--color-neutral-200);
26
+ @utility bg-neutral-inverted-attention {
27
+ background-color: var(--color-alpha-two-200);
16
28
  }
17
29
 
18
- @utility bg-neutral-transparent {
19
- background-color: var(--color-alpha-two-00);
30
+ @utility bg-neutral-inverted-brand {
31
+ background-color: #001534;
20
32
  }
@@ -1,5 +1,6 @@
1
1
  @theme {
2
2
  --color-neutral-00: #ffffff;
3
+ --color-neutral-25: #fafafa;
3
4
  --color-neutral-50: #f6f6f6;
4
5
  --color-neutral-100: #e7e7e7;
5
6
  --color-neutral-150: #e0e0e0;
@@ -134,4 +135,7 @@
134
135
  --color-purple-alt-800: #c5adfb;
135
136
  --color-purple-alt-900: #dccefc;
136
137
  --color-purple-alt-950: #f3efff;
138
+
139
+ --shadow-custom:
140
+ 0px 2px 4px 0px var(--color-alpha-one-50), 0px 0px 0px 0.5px var(--color-neutral-150);
137
141
  }
@@ -15,7 +15,6 @@
15
15
  @import './colors/components/tab.css';
16
16
  @import './colors/components/alert.css';
17
17
 
18
-
19
18
  @theme {
20
19
  --font-family-sans: 'Inter Variable', sans-serif;
21
20
  --font-family-display: 'Inter Variable', sans-serif;