@ztwoint/z-ui 0.1.12 → 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.
Files changed (74) hide show
  1. package/dist/components/alert/alert.const.d.ts +9 -0
  2. package/dist/components/alert/alert.const.js +48 -0
  3. package/dist/components/alert/alert.d.ts +15 -0
  4. package/dist/components/alert/alert.js +68 -0
  5. package/dist/components/alert/icons/circles-icon.d.ts +6 -0
  6. package/dist/components/alert/icons/circles-icon.js +57 -0
  7. package/dist/components/alert/index.d.ts +2 -0
  8. package/dist/components/assets/icons/left-arrow.d.ts +7 -0
  9. package/dist/components/assets/icons/left-arrow.js +38 -0
  10. package/dist/components/assets/icons/octagon-warning-Copy.d.ts +7 -0
  11. package/dist/components/assets/icons/upload.d.ts +8 -0
  12. package/dist/components/assets/icons/x.d.ts +7 -0
  13. package/dist/components/assets/icons/x.js +33 -0
  14. package/dist/components/assets/icons/z2-icon.js +4 -4
  15. package/dist/components/button/button.d.ts +4 -4
  16. package/dist/components/button/button.js +6 -6
  17. package/dist/components/file-upload-area/file-upload-area.const.d.ts +1 -0
  18. package/dist/components/file-upload-area/file-upload-area.d.ts +42 -0
  19. package/dist/components/file-upload-area/text-preset.d.ts +4 -0
  20. package/dist/components/file-upload-area/upload-icon-component.d.ts +3 -0
  21. package/dist/components/nav-header/nav-item/nav-item.js +15 -15
  22. package/dist/css/config/colors/backgrounds.css +19 -7
  23. package/dist/css/config/colors/components/alert.css +58 -57
  24. package/dist/css/config/colors/defaults.css +4 -0
  25. package/dist/css/config/colors/text.css +2 -2
  26. package/dist/css/config/config.css +1 -0
  27. package/dist/css/styles/tailwind.css +1 -1
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.js +64 -58
  30. package/dist/types/components/alert/alert.const.d.ts +9 -0
  31. package/dist/types/components/alert/alert.d.ts +15 -0
  32. package/dist/types/components/alert/icons/circles-icon.d.ts +6 -0
  33. package/dist/types/components/alert/index.d.ts +2 -0
  34. package/dist/types/components/assets/icons/left-arrow.d.ts +7 -0
  35. package/dist/types/components/assets/icons/octagon-warning-Copy.d.ts +7 -0
  36. package/dist/types/components/assets/icons/upload.d.ts +8 -0
  37. package/dist/types/components/assets/icons/x.d.ts +7 -0
  38. package/dist/types/components/button/button.d.ts +4 -4
  39. package/dist/types/components/file-upload-area/file-upload-area.const.d.ts +1 -0
  40. package/dist/types/components/file-upload-area/file-upload-area.d.ts +42 -0
  41. package/dist/types/components/file-upload-area/text-preset.d.ts +4 -0
  42. package/dist/types/components/file-upload-area/upload-icon-component.d.ts +3 -0
  43. package/dist/types/index.d.ts +1 -0
  44. package/package.json +1 -1
  45. package/dist/components/button/__tests__/Button.test.d.ts +0 -1
  46. package/dist/components/button/button.stories.d.ts +0 -35
  47. package/dist/components/collapsible-side-nav-bar/side-nav-bar.stories.d.ts +0 -6
  48. package/dist/components/country-flags/__tests__/country-flags.test.d.ts +0 -1
  49. package/dist/components/country-flags/country-flags.stories.d.ts +0 -11
  50. package/dist/components/dialog/dialog.stories.d.ts +0 -10
  51. package/dist/components/input/__tests__/Input.test.d.ts +0 -1
  52. package/dist/components/nav-header/nav-header.stories.d.ts +0 -7
  53. package/dist/components/nav-header/nav-item/nav-item.stories.d.ts +0 -12
  54. package/dist/components/stepper/stepper-item/stepper-item.stories.d.ts +0 -11
  55. package/dist/components/stepper/stepper.stories.d.ts +0 -11
  56. package/dist/components/tab/__tests__/tab.test.d.ts +0 -1
  57. package/dist/components/tab/tab.stories.d.ts +0 -16
  58. package/dist/components/tooltip/tooltip.stories.d.ts +0 -10
  59. package/dist/tokens/typography/typography.stories.d.ts +0 -12
  60. package/dist/types/components/button/__tests__/Button.test.d.ts +0 -1
  61. package/dist/types/components/button/button.stories.d.ts +0 -35
  62. package/dist/types/components/collapsible-side-nav-bar/side-nav-bar.stories.d.ts +0 -6
  63. package/dist/types/components/country-flags/__tests__/country-flags.test.d.ts +0 -1
  64. package/dist/types/components/country-flags/country-flags.stories.d.ts +0 -11
  65. package/dist/types/components/dialog/dialog.stories.d.ts +0 -10
  66. package/dist/types/components/input/__tests__/Input.test.d.ts +0 -1
  67. package/dist/types/components/nav-header/nav-header.stories.d.ts +0 -7
  68. package/dist/types/components/nav-header/nav-item/nav-item.stories.d.ts +0 -12
  69. package/dist/types/components/stepper/stepper-item/stepper-item.stories.d.ts +0 -11
  70. package/dist/types/components/stepper/stepper.stories.d.ts +0 -11
  71. package/dist/types/components/tab/__tests__/tab.test.d.ts +0 -1
  72. package/dist/types/components/tab/tab.stories.d.ts +0 -16
  73. package/dist/types/components/tooltip/tooltip.stories.d.ts +0 -10
  74. package/dist/types/tokens/typography/typography.stories.d.ts +0 -12
@@ -0,0 +1,9 @@
1
+ export declare const alertVariants: (props?: ({
2
+ variant?: "success" | "warning" | "danger" | "accent" | "neutral" | null | undefined;
3
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
4
+ export declare const iconVariants: (props?: ({
5
+ variant?: "success" | "warning" | "danger" | "accent" | "neutral" | null | undefined;
6
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
7
+ export declare const buttonVariants: (props?: ({
8
+ appearance?: "stroke" | "ghost" | null | undefined;
9
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
@@ -0,0 +1,48 @@
1
+ import { cva as e } from "class-variance-authority";
2
+ const a = e(
3
+ "relative w-full rounded-lg border pl-2.5 pr-0.5 py-2.5 text-sm flex flex-col gap-2 items-start",
4
+ // Flex, column, gap for flexible content & action placement
5
+ {
6
+ variants: {
7
+ variant: {
8
+ success: "alert-success-stroke alert-success-bg alert-success-title alert-success-body",
9
+ warning: "alert-warning-stroke alert-warning-bg alert-warning-title alert-warning-body",
10
+ danger: "alert-danger-stroke alert-danger-bg alert-danger-title alert-danger-body",
11
+ accent: "alert-accent-stroke alert-accent-bg alert-accent-title alert-accent-body",
12
+ neutral: "alert-neutral-stroke alert-neutral-bg alert-neutral-title alert-neutral-body"
13
+ }
14
+ },
15
+ defaultVariants: {
16
+ variant: "accent"
17
+ }
18
+ }
19
+ ), r = e("h-5 w-5 flex-shrink-0", {
20
+ variants: {
21
+ variant: {
22
+ success: "alert-success-icon",
23
+ warning: "alert-warning-icon",
24
+ danger: "alert-danger-icon",
25
+ accent: "alert-accent-icon",
26
+ neutral: "alert-neutral-icon"
27
+ }
28
+ }
29
+ }), n = e(
30
+ "inline-flex items-center justify-center gap-1 rounded-md px-2 py-2 text-sm transition focus:outline-none focus:ring-2",
31
+ // Responsive and basic
32
+ {
33
+ variants: {
34
+ appearance: {
35
+ ghost: "bg-transparent hover:cursor-pointer",
36
+ stroke: "bg-(--color-neutral-00) hover:cursor-pointer"
37
+ }
38
+ },
39
+ defaultVariants: {
40
+ appearance: "ghost"
41
+ }
42
+ }
43
+ );
44
+ export {
45
+ a as alertVariants,
46
+ n as buttonVariants,
47
+ r as iconVariants
48
+ };
@@ -0,0 +1,15 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { alertVariants } from './alert.const';
3
+ import * as React from 'react';
4
+ export interface AlertProps extends React.ComponentProps<'div'>, VariantProps<typeof alertVariants> {
5
+ title?: string;
6
+ description?: string;
7
+ leadingIcon?: React.ReactNode;
8
+ showActions?: boolean;
9
+ onClose?: () => void;
10
+ onAction?: () => void;
11
+ actionLabel?: string;
12
+ }
13
+ export declare function Alert({ className, variant, title, description, leadingIcon, showActions, onClose, onAction, actionLabel, ...props }: AlertProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function AlertTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
15
+ export declare function AlertDescription({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,68 @@
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import * as x from "react";
3
+ import u from "../assets/icons/x.js";
4
+ import N from "../assets/icons/left-arrow.js";
5
+ import { cn as l } from "../../lib/utils.js";
6
+ import { iconVariants as c, buttonVariants as h, alertVariants as w } from "./alert.const.js";
7
+ function C({
8
+ className: a,
9
+ variant: r,
10
+ title: f,
11
+ description: o,
12
+ leadingIcon: t,
13
+ showActions: p = !1,
14
+ onClose: i,
15
+ onAction: m,
16
+ actionLabel: n,
17
+ ...d
18
+ }) {
19
+ return /* @__PURE__ */ e("div", { role: "alert", className: l(w({ variant: r }), a), ...d, children: /* @__PURE__ */ s("div", { className: "flex flex-row flex-wrap w-full items-start gap-1", children: [
20
+ t && /* @__PURE__ */ e("span", { className: l(c({ variant: r }), "flex-shrink-0"), children: (x.isValidElement(t), t) }),
21
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
22
+ f && /* @__PURE__ */ e(k, { className: "flex-shrink-0", children: f }),
23
+ /* @__PURE__ */ s("div", { className: "flex flex-row flex-wrap w-full items-center", children: [
24
+ o && /* @__PURE__ */ e(b, { className: "flex-shrink-1", children: o }),
25
+ p && (i || m) && /* @__PURE__ */ s("div", { className: "flex items-center self-end flex-shrink-0", children: [
26
+ i && /* @__PURE__ */ e(
27
+ "button",
28
+ {
29
+ type: "button",
30
+ onClick: i,
31
+ className: l(h({ appearance: "ghost" })),
32
+ "aria-label": "Close alert",
33
+ children: /* @__PURE__ */ e(u, { className: l(c({ variant: r }), "h-2.2 w-2.2") })
34
+ }
35
+ ),
36
+ m && /* @__PURE__ */ s(
37
+ "button",
38
+ {
39
+ type: "button",
40
+ onClick: m,
41
+ className: l(
42
+ h({ appearance: "stroke" }),
43
+ "shadow-[0_1px_2px_0_rgba(0,0,0,0.05)]"
44
+ ),
45
+ "aria-label": n,
46
+ children: [
47
+ /* @__PURE__ */ e(N, { className: l(c({ variant: r }), "h-2.2 w-2.2") }),
48
+ n && n
49
+ ]
50
+ }
51
+ )
52
+ ] })
53
+ ] })
54
+ ] }),
55
+ d.children
56
+ ] }) });
57
+ }
58
+ function k({ className: a, ...r }) {
59
+ return /* @__PURE__ */ e("div", { className: l("tracking-tight leading-none-medium-sm", a), ...r });
60
+ }
61
+ function b({ className: a, ...r }) {
62
+ return /* @__PURE__ */ e("div", { className: l("leading-none-regular-sm", a), ...r });
63
+ }
64
+ export {
65
+ C as Alert,
66
+ b as AlertDescription,
67
+ k as AlertTitle
68
+ };
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface CirclesIconProps extends React.SVGProps<SVGSVGElement> {
3
+ className?: string;
4
+ }
5
+ export declare function AlertCirclesIcon({ className, ...props }: CirclesIconProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,57 @@
1
+ import { jsxs as o, jsx as C } from "react/jsx-runtime";
2
+ function t({ className: l = "w-[14px] h-[14px]", ...r }) {
3
+ return /* @__PURE__ */ o(
4
+ "svg",
5
+ {
6
+ className: l,
7
+ width: "14",
8
+ height: "14",
9
+ viewBox: "0 0 14 14",
10
+ fill: "none",
11
+ xmlns: "http://www.w3.org/2000/svg",
12
+ ...r,
13
+ children: [
14
+ /* @__PURE__ */ C(
15
+ "path",
16
+ {
17
+ d: "M2.27466 10.8503C2.75791 10.8503 3.14966 11.2421 3.14966 11.7253C3.14943 12.2084 2.75776 12.6003 2.27466 12.6003C1.7917 12.6002 1.39989 12.2083 1.39966 11.7253C1.39966 11.2422 1.79156 10.8505 2.27466 10.8503Z",
18
+ fill: "currentColor"
19
+ }
20
+ ),
21
+ /* @__PURE__ */ C(
22
+ "path",
23
+ {
24
+ d: "M11.7253 10.8503C12.2084 10.8505 12.6003 11.2422 12.6003 11.7253C12.6001 12.2083 12.2083 12.6002 11.7253 12.6003C11.2422 12.6003 10.8506 12.2084 10.8503 11.7253C10.8503 11.2421 11.2421 10.8503 11.7253 10.8503Z",
25
+ fill: "currentColor"
26
+ }
27
+ ),
28
+ /* @__PURE__ */ C(
29
+ "path",
30
+ {
31
+ fillRule: "evenodd",
32
+ clipRule: "evenodd",
33
+ d: "M7 2.625C9.41625 2.625 11.375 4.58375 11.375 7C11.375 9.41625 9.41625 11.375 7 11.375C4.58375 11.375 2.625 9.41625 2.625 7C2.625 4.58375 4.58375 2.625 7 2.625ZM7 4.375C5.55025 4.375 4.375 5.55025 4.375 7C4.375 8.44975 5.55025 9.625 7 9.625C8.44975 9.625 9.625 8.44975 9.625 7C9.625 5.55025 8.44975 4.375 7 4.375Z",
34
+ fill: "currentColor"
35
+ }
36
+ ),
37
+ /* @__PURE__ */ C(
38
+ "path",
39
+ {
40
+ d: "M2.27466 1.40051C2.75791 1.40051 3.14966 1.79226 3.14966 2.27551C3.14943 2.75857 2.75776 3.15051 2.27466 3.15051C1.7917 3.15034 1.39989 2.75846 1.39966 2.27551C1.39966 1.79237 1.79156 1.40069 2.27466 1.40051Z",
41
+ fill: "currentColor"
42
+ }
43
+ ),
44
+ /* @__PURE__ */ C(
45
+ "path",
46
+ {
47
+ d: "M11.7253 1.40051C12.2084 1.40069 12.6003 1.79237 12.6003 2.27551C12.6001 2.75846 12.2083 3.15034 11.7253 3.15051C11.2422 3.15051 10.8506 2.75857 10.8503 2.27551C10.8503 1.79226 11.2421 1.40051 11.7253 1.40051Z",
48
+ fill: "currentColor"
49
+ }
50
+ )
51
+ ]
52
+ }
53
+ );
54
+ }
55
+ export {
56
+ t as AlertCirclesIcon
57
+ };
@@ -0,0 +1,2 @@
1
+ export { Alert, AlertTitle, AlertDescription, type AlertProps } from './alert';
2
+ export { AlertCirclesIcon } from './icons/circles-icon';
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ type IconProps = SVGProps<SVGSVGElement> & {
3
+ strokewidth?: number;
4
+ title?: string;
5
+ };
6
+ declare function ArrowLeftCopy({ fill, strokewidth, title, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
7
+ export default ArrowLeftCopy;
@@ -0,0 +1,38 @@
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ function d({
3
+ fill: o = "currentColor",
4
+ strokewidth: e = 1,
5
+ title: n = "",
6
+ ...i
7
+ }) {
8
+ return /* @__PURE__ */ t("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...i, children: [
9
+ /* @__PURE__ */ r("title", { children: n }),
10
+ /* @__PURE__ */ t("g", { fill: o, children: [
11
+ /* @__PURE__ */ r(
12
+ "path",
13
+ {
14
+ d: "M2.1 7h9.8",
15
+ fill: "none",
16
+ stroke: o,
17
+ strokeLinecap: "round",
18
+ strokeLinejoin: "round",
19
+ strokeWidth: e
20
+ }
21
+ ),
22
+ /* @__PURE__ */ r(
23
+ "path",
24
+ {
25
+ d: "M8.4 3.5l3.5 3.5-3.5 3.5",
26
+ fill: "none",
27
+ stroke: o,
28
+ strokeLinecap: "round",
29
+ strokeLinejoin: "round",
30
+ strokeWidth: e
31
+ }
32
+ )
33
+ ] })
34
+ ] });
35
+ }
36
+ export {
37
+ d as default
38
+ };
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ type IconProps = SVGProps<SVGSVGElement> & {
3
+ strokewidth?: number;
4
+ title?: string;
5
+ };
6
+ declare function OctagonWarningCopy({ fill, strokewidth, width, height, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
7
+ export default OctagonWarningCopy;
@@ -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;
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ type IconProps = SVGProps<SVGSVGElement> & {
3
+ strokewidth?: number;
4
+ title?: string;
5
+ };
6
+ declare function XmarkCopy({ fill, strokewidth, title, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
7
+ export default XmarkCopy;
@@ -0,0 +1,33 @@
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ function d({ fill: o = "currentColor", strokewidth: e = 1, title: t = "", ...i }) {
3
+ return /* @__PURE__ */ n("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...i, children: [
4
+ /* @__PURE__ */ r("title", { children: t }),
5
+ /* @__PURE__ */ n("g", { fill: o, children: [
6
+ /* @__PURE__ */ r(
7
+ "path",
8
+ {
9
+ d: "M3.5 3.5l7 7",
10
+ fill: "none",
11
+ stroke: o,
12
+ strokeLinecap: "round",
13
+ strokeLinejoin: "round",
14
+ strokeWidth: e
15
+ }
16
+ ),
17
+ /* @__PURE__ */ r(
18
+ "path",
19
+ {
20
+ d: "M3.5 10.5l7-7",
21
+ fill: "none",
22
+ stroke: o,
23
+ strokeLinecap: "round",
24
+ strokeLinejoin: "round",
25
+ strokeWidth: e
26
+ }
27
+ )
28
+ ] })
29
+ ] });
30
+ }
31
+ export {
32
+ d as default
33
+ };
@@ -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,9 +1,9 @@
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
- variant?: "filled" | "stroke" | "ghost" | null | undefined;
5
- shade?: "neutral" | "brand" | "danger" | "neutralGhost" | null | undefined;
6
- size?: "large" | "small" | null | undefined;
4
+ variant?: "stroke" | "ghost" | "filled" | null | undefined;
5
+ shade?: "danger" | "neutral" | "brand" | "neutralGhost" | null | undefined;
6
+ size?: "small" | "large" | null | undefined;
7
7
  iconOnly?: boolean | null | undefined;
8
8
  } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
9
9
  export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style' | 'type'>, Omit<VariantProps<typeof buttonVariants>, 'iconOnly'> {
@@ -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
  }