@ztwoint/z-ui 0.1.11 → 0.1.13
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/alert/alert.const.d.ts +9 -0
- package/dist/components/alert/alert.const.js +48 -0
- package/dist/components/alert/alert.d.ts +15 -0
- package/dist/components/alert/alert.js +68 -0
- package/dist/components/alert/icons/circles-icon.d.ts +6 -0
- package/dist/components/alert/icons/circles-icon.js +57 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/assets/icons/circle-check-filled.d.ts +6 -0
- package/dist/components/assets/icons/left-arrow.d.ts +7 -0
- package/dist/components/assets/icons/left-arrow.js +38 -0
- package/dist/components/assets/icons/media-record.d.ts +6 -0
- package/dist/components/assets/icons/octagon-warning-Copy.d.ts +7 -0
- package/dist/components/assets/icons/x.d.ts +7 -0
- package/dist/components/assets/icons/x.js +33 -0
- package/dist/components/button/button.d.ts +3 -3
- package/dist/components/button/button.js +15 -15
- package/dist/components/stepper/stepper-item/stepper-item.d.ts +10 -0
- package/dist/components/stepper/stepper.d.ts +17 -0
- package/dist/css/config/colors/backgrounds.css +1 -1
- package/dist/css/config/colors/components/alert.css +58 -57
- package/dist/css/config/colors/components/button.css +5 -5
- package/dist/css/config/colors/defaults.css +59 -35
- package/dist/css/config/colors/icons.css +2 -2
- package/dist/css/config/colors/overlay.css +1 -1
- package/dist/css/config/colors/shape.css +6 -6
- package/dist/css/config/colors/stroke.css +26 -10
- package/dist/css/config/colors/surfaces.css +7 -7
- package/dist/css/config/colors/text.css +86 -23
- package/dist/css/config/config.css +2 -0
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +64 -58
- package/dist/types/components/alert/alert.const.d.ts +9 -0
- package/dist/types/components/alert/alert.d.ts +15 -0
- package/dist/types/components/alert/icons/circles-icon.d.ts +6 -0
- package/dist/types/components/alert/index.d.ts +2 -0
- package/dist/types/components/assets/icons/circle-check-filled.d.ts +6 -0
- package/dist/types/components/assets/icons/left-arrow.d.ts +7 -0
- package/dist/types/components/assets/icons/media-record.d.ts +6 -0
- package/dist/types/components/assets/icons/octagon-warning-Copy.d.ts +7 -0
- package/dist/types/components/assets/icons/x.d.ts +7 -0
- package/dist/types/components/button/button.d.ts +3 -3
- package/dist/types/components/stepper/stepper-item/stepper-item.d.ts +10 -0
- package/dist/types/components/stepper/stepper.d.ts +17 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/button/__tests__/Button.test.d.ts +0 -1
- package/dist/components/button/button.stories.d.ts +0 -26
- package/dist/components/collapsible-side-nav-bar/side-nav-bar.stories.d.ts +0 -6
- package/dist/components/country-flags/__tests__/country-flags.test.d.ts +0 -1
- package/dist/components/country-flags/country-flags.stories.d.ts +0 -11
- package/dist/components/dialog/dialog.stories.d.ts +0 -10
- package/dist/components/input/__tests__/Input.test.d.ts +0 -1
- package/dist/components/nav-header/nav-header.stories.d.ts +0 -7
- package/dist/components/nav-header/nav-item/nav-item.stories.d.ts +0 -12
- package/dist/components/tab/__tests__/tab.test.d.ts +0 -1
- package/dist/components/tab/tab.stories.d.ts +0 -16
- package/dist/components/tooltip/tooltip.stories.d.ts +0 -10
- package/dist/tokens/typography/typography.stories.d.ts +0 -12
- package/dist/types/components/button/__tests__/Button.test.d.ts +0 -1
- package/dist/types/components/button/button.stories.d.ts +0 -26
- package/dist/types/components/collapsible-side-nav-bar/side-nav-bar.stories.d.ts +0 -6
- package/dist/types/components/country-flags/__tests__/country-flags.test.d.ts +0 -1
- package/dist/types/components/country-flags/country-flags.stories.d.ts +0 -11
- package/dist/types/components/dialog/dialog.stories.d.ts +0 -10
- package/dist/types/components/input/__tests__/Input.test.d.ts +0 -1
- package/dist/types/components/nav-header/nav-header.stories.d.ts +0 -7
- package/dist/types/components/nav-header/nav-item/nav-item.stories.d.ts +0 -12
- package/dist/types/components/tab/__tests__/tab.test.d.ts +0 -1
- package/dist/types/components/tab/tab.stories.d.ts +0 -16
- package/dist/types/components/tooltip/tooltip.stories.d.ts +0 -10
- 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,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,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,9 +1,9 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
shade?: "
|
|
6
|
-
size?: "
|
|
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'> {
|
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as x, Fragment as g } from "react/jsx-runtime";
|
|
|
2
2
|
import { Slot as O } from "@radix-ui/react-slot";
|
|
3
3
|
import { cva as z } from "class-variance-authority";
|
|
4
4
|
import * as w from "react";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as d } from "../../lib/utils.js";
|
|
6
6
|
const N = z(
|
|
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
|
{
|
|
@@ -13,10 +13,10 @@ const N = z(
|
|
|
13
13
|
ghost: [""]
|
|
14
14
|
},
|
|
15
15
|
shade: {
|
|
16
|
-
neutral: "button-primary-neutral-surface-default border-black
|
|
17
|
-
brand: "button-primary-brand-surface-default border-(--color-accent-600) text-inverted hover:button-primary-brand-surface-hover active:button-primary-brand-surface-pressed disabled:button-primary-brand-surface-disabled disabled:text-
|
|
18
|
-
danger: "button-primary-danger-surface-default border-(--color-
|
|
19
|
-
neutralGhost: "text-
|
|
16
|
+
neutral: "button-primary-neutral-surface-default border-black disabled:border-none text-inverted-primary hover:button-primary-neutral-surface-hover active:button-primary-neutral-surface-pressed disabled:button-primary-neutral-surface-disabled disabled:text-neutral-muted",
|
|
17
|
+
brand: "button-primary-brand-surface-default border-(--color-accent-600) text-inverted-primary hover:button-primary-brand-surface-hover active:button-primary-brand-surface-pressed disabled:button-primary-brand-surface-disabled disabled:text-neutral-muted",
|
|
18
|
+
danger: "button-primary-danger-surface-default border-(--color-red-600) text-inverted-primary hover:button-primary-danger-surface-hover active:button-primary-danger-surface-pressed disabled:button-primary-danger-surface-disabled disabled:text-neutral-muted",
|
|
19
|
+
neutralGhost: "text-neutral-primary hover:text-neutral-secondary active:text-neutral-muted disabled:text-neutral-muted"
|
|
20
20
|
},
|
|
21
21
|
size: {
|
|
22
22
|
large: "gap-1",
|
|
@@ -72,24 +72,24 @@ const N = z(
|
|
|
72
72
|
}
|
|
73
73
|
), k = w.forwardRef(
|
|
74
74
|
({
|
|
75
|
-
className:
|
|
75
|
+
className: i,
|
|
76
76
|
shade: c,
|
|
77
77
|
size: b,
|
|
78
78
|
variant: f,
|
|
79
79
|
asChild: o = !1,
|
|
80
80
|
leftIcon: a,
|
|
81
81
|
rightIcon: t,
|
|
82
|
-
label:
|
|
82
|
+
label: m,
|
|
83
83
|
children: l,
|
|
84
|
-
...
|
|
85
|
-
},
|
|
86
|
-
const
|
|
87
|
-
N({ shade: c, size: b, variant: f, iconOnly:
|
|
88
|
-
),
|
|
89
|
-
return /* @__PURE__ */ e(
|
|
90
|
-
a && /* @__PURE__ */ e("span", { className:
|
|
84
|
+
...p
|
|
85
|
+
}, y) => {
|
|
86
|
+
const v = o ? O : "button", r = m || l, n = !r && !!(a || t), u = n ? a || t : null, h = d(
|
|
87
|
+
N({ shade: c, size: b, variant: f, iconOnly: n, className: i })
|
|
88
|
+
), s = "w-3.5 h-3.5";
|
|
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: [
|
|
90
|
+
a && /* @__PURE__ */ e("span", { className: d(s), children: a }),
|
|
91
91
|
r && /* @__PURE__ */ e("span", { children: r }),
|
|
92
|
-
t && /* @__PURE__ */ e("span", { className:
|
|
92
|
+
t && /* @__PURE__ */ e("span", { className: d(s), children: t })
|
|
93
93
|
] }) });
|
|
94
94
|
}
|
|
95
95
|
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const z2StepperItemVariants: (props?: ({
|
|
4
|
+
state?: "disabled" | "active" | "completed" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface Z2StepperItemProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof z2StepperItemVariants> {
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Z2StepperItem: React.ForwardRefExoticComponent<Z2StepperItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type StepperState = 'active' | 'completed' | 'disabled';
|
|
3
|
+
export type StepperItemType = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
state?: StepperState;
|
|
7
|
+
};
|
|
8
|
+
export type StepperHandle = {
|
|
9
|
+
handleNext: (label?: string) => void;
|
|
10
|
+
handlePrev: (label?: string) => void;
|
|
11
|
+
reset: () => void;
|
|
12
|
+
setStepState: (index: number, state: StepperState) => void;
|
|
13
|
+
};
|
|
14
|
+
declare const Z2Stepper: React.ForwardRefExoticComponent<{
|
|
15
|
+
items: StepperItemType[];
|
|
16
|
+
} & React.RefAttributes<StepperHandle>>;
|
|
17
|
+
export default Z2Stepper;
|
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
border-color: var(--color-
|
|
1
|
+
/* SUCCESS */
|
|
2
|
+
@utility alert-success-stroke {
|
|
3
|
+
border-color: var(--color-green-300);
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
background-color: var(--color-surface-neutral-default);
|
|
5
|
+
@utility alert-success-bg {
|
|
6
|
+
background-color: var(--color-green-50);
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
fill: var(--color-shape-neutral-default);
|
|
8
|
+
@utility alert-success-title {
|
|
9
|
+
color: var(--color-green-900);
|
|
12
10
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
color: var(--color-subtitle-primary);
|
|
11
|
+
@utility alert-success-body {
|
|
12
|
+
color: var(--color-green-900);
|
|
16
13
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
color: var(--color-subtitle-secondary);
|
|
14
|
+
@utility alert-success-icon {
|
|
15
|
+
color: var(--color-green-600);
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
/* WARNING */
|
|
23
|
-
|
|
24
|
-
border-color: var(--color-
|
|
19
|
+
@utility alert-warning-stroke {
|
|
20
|
+
border-color: var(--color-amber-400);
|
|
25
21
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
background-color: var(--color-warning-50);
|
|
22
|
+
@utility alert-warning-bg {
|
|
23
|
+
background-color: var(--color-amber-50);
|
|
29
24
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
fill: var(--color-warning-600);
|
|
25
|
+
@utility alert-warning-title {
|
|
26
|
+
color: var(--color-amber-900);
|
|
33
27
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
color: var(--color-warning-950);
|
|
28
|
+
@utility alert-warning-body {
|
|
29
|
+
color: var(--color-amber-900);
|
|
37
30
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
color: rgba(69, 44, 3, 0.8);
|
|
31
|
+
@utility alert-warning-icon {
|
|
32
|
+
color: var(--color-amber-600);
|
|
41
33
|
}
|
|
42
34
|
|
|
43
35
|
/* DANGER */
|
|
44
|
-
|
|
45
|
-
border-color: var(--color-
|
|
36
|
+
@utility alert-danger-stroke {
|
|
37
|
+
border-color: var(--color-red-400);
|
|
46
38
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
background-color: var(--color-danger-50);
|
|
39
|
+
@utility alert-danger-bg {
|
|
40
|
+
background-color: var(--color-red-50);
|
|
50
41
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
fill: var(--color-danger-600);
|
|
42
|
+
@utility alert-danger-title {
|
|
43
|
+
color: var(--color-red-900);
|
|
54
44
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
color: var(--color-danger-950);
|
|
45
|
+
@utility alert-danger-body {
|
|
46
|
+
color: var(--color-red-600);
|
|
58
47
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
color: rgba(62, 20, 17, 0.8);
|
|
48
|
+
@utility alert-danger-icon {
|
|
49
|
+
color: var(--color-red-600);
|
|
62
50
|
}
|
|
63
51
|
|
|
64
|
-
/*
|
|
65
|
-
|
|
66
|
-
border-color: var(--color-
|
|
52
|
+
/* ACCENT */
|
|
53
|
+
@utility alert-accent-stroke {
|
|
54
|
+
border-color: var(--color-accent-200);
|
|
67
55
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
background-color: var(--color-danger-100);
|
|
56
|
+
@utility alert-accent-bg {
|
|
57
|
+
background-color: var(--color-accent-50);
|
|
71
58
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
fill: var(--color-danger-600);
|
|
59
|
+
@utility alert-accent-title {
|
|
60
|
+
color: var(--color-accent-950);
|
|
75
61
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
62
|
+
@utility alert-accent-body {
|
|
63
|
+
color: var(--color-accent-950);
|
|
64
|
+
}
|
|
65
|
+
@utility alert-accent-icon {
|
|
66
|
+
color: var(--color-accent-600);
|
|
79
67
|
}
|
|
80
68
|
|
|
81
|
-
|
|
82
|
-
|
|
69
|
+
/* NEUTRAL */
|
|
70
|
+
@utility alert-neutral-stroke {
|
|
71
|
+
border-color: var(--color-neutral-800);
|
|
72
|
+
}
|
|
73
|
+
@utility alert-neutral-bg {
|
|
74
|
+
background-color: var(--color-neutral-25);
|
|
75
|
+
}
|
|
76
|
+
@utility alert-neutral-title {
|
|
77
|
+
color: var(--color-neutral-950);
|
|
78
|
+
}
|
|
79
|
+
@utility alert-neutral-body {
|
|
80
|
+
color: var(--color-neutral-950);
|
|
81
|
+
}
|
|
82
|
+
@utility alert-neutral-icon {
|
|
83
|
+
color: var(--color-neutral-950);
|
|
83
84
|
}
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
|
|
37
37
|
/* Type : Filled Style : Danger */
|
|
38
38
|
@utility button-primary-danger-surface-default {
|
|
39
|
-
background-color: var(--color-
|
|
39
|
+
background-color: var(--color-red-600);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
@utility button-primary-danger-surface-hover {
|
|
43
|
-
background-color: var(--color-
|
|
43
|
+
background-color: var(--color-red-700);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
@utility button-primary-danger-surface-pressed {
|
|
47
|
-
background-color: var(--color-
|
|
47
|
+
background-color: var(--color-red-500);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
@utility button-primary-danger-surface-disabled {
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
@utility text-default-danger {
|
|
85
|
-
color: var(--color-
|
|
85
|
+
color: var(--color-red-600);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
/* Shadow utility class */
|
|
89
89
|
@utility shadow-default {
|
|
90
90
|
box-shadow:
|
|
91
|
-
0px 1px 2px 0px var(--color-alpha-
|
|
91
|
+
0px 1px 2px 0px var(--color-alpha-one-50),
|
|
92
92
|
0px 0px 0px 0.5px var(--color-neutral-150);
|
|
93
93
|
}
|