@ztwoint/z-ui 0.1.89 → 0.1.90
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/stepper/stepper.types.d.ts +1 -1
- package/dist/components/stepper-item/stepper-item.d.ts +1 -1
- package/dist/components/stepper-item/stepper-item.js +19 -18
- package/dist/types/components/stepper/stepper.types.d.ts +1 -1
- package/dist/types/components/stepper-item/stepper-item.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const z2StepperItemVariants: (props?: ({
|
|
4
|
-
state?: "disabled" | "active" | "completed" | null | undefined;
|
|
4
|
+
state?: "disabled" | "active" | "completed" | "completed-disabled" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
6
6
|
export interface Z2StepperItemProps extends React.HTMLAttributes<HTMLButtonElement>, VariantProps<typeof z2StepperItemVariants> {
|
|
7
7
|
label: string;
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { cn as
|
|
5
|
-
import
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { cva as u } from "class-variance-authority";
|
|
4
|
+
import { cn as a } from "../../lib/utils.js";
|
|
5
|
+
import d from "../assets/icons/circle-check-filled.js";
|
|
6
6
|
import o from "../assets/icons/media-record.js";
|
|
7
|
-
const
|
|
7
|
+
const f = u("w-fit flex items-center select-none gap-2", {
|
|
8
8
|
variants: {
|
|
9
9
|
state: {
|
|
10
10
|
active: "cursor-pointer",
|
|
11
11
|
completed: "opacity-100 cursor-pointer",
|
|
12
|
-
disabled: "cursor-not-allowed"
|
|
12
|
+
disabled: "cursor-not-allowed",
|
|
13
|
+
"completed-disabled": "cursor-not-allowed"
|
|
13
14
|
}
|
|
14
15
|
},
|
|
15
16
|
defaultVariants: {
|
|
16
17
|
state: "active"
|
|
17
18
|
}
|
|
18
|
-
}), h = "rounded-full transition-colors w-4 h-4 border-none", b =
|
|
19
|
-
({ label:
|
|
20
|
-
let
|
|
21
|
-
return e === "completed" ? (
|
|
19
|
+
}), h = "rounded-full transition-colors w-4 h-4 border-none", b = p.forwardRef(
|
|
20
|
+
({ label: t, state: e = "active", className: n, ...s }, m) => {
|
|
21
|
+
let l, r;
|
|
22
|
+
return e === "completed" ? (l = /* @__PURE__ */ i(d, { fill: "var(--blue-500)", width: 16, height: 16 }), r = "text-neutral-primary leading-none-medium-sm") : e === "completed-disabled" ? (l = /* @__PURE__ */ i(d, { fill: "var(--neutral-500)", width: 16, height: 16 }), r = "text-neutral-secondary leading-none-medium-sm") : e === "active" ? (l = /* @__PURE__ */ i(o, { fill: "var(--blue-500)", width: 16, height: 16 }), r = "text-neutral-primary leading-none-medium-sm") : (l = /* @__PURE__ */ i(o, { fill: "var(--neutral-500)", width: 16, height: 16 }), r = "text-neutral-secondary leading-none-medium-sm"), /* @__PURE__ */ c(
|
|
22
23
|
"button",
|
|
23
24
|
{
|
|
24
|
-
ref:
|
|
25
|
-
className:
|
|
26
|
-
"aria-disabled": e === "disabled",
|
|
25
|
+
ref: m,
|
|
26
|
+
className: a(f({ state: e }), n),
|
|
27
|
+
"aria-disabled": e === "disabled" || e === "completed-disabled",
|
|
27
28
|
title: e || "disabled",
|
|
28
|
-
disabled: e === "disabled",
|
|
29
|
-
"aria-label":
|
|
29
|
+
disabled: e === "disabled" || e === "completed-disabled",
|
|
30
|
+
"aria-label": t,
|
|
30
31
|
...s,
|
|
31
32
|
children: [
|
|
32
|
-
/* @__PURE__ */ i("span", { className: h, children:
|
|
33
|
-
/* @__PURE__ */ i("span", { className:
|
|
33
|
+
/* @__PURE__ */ i("span", { className: h, children: l }),
|
|
34
|
+
/* @__PURE__ */ i("span", { className: a(r), children: t })
|
|
34
35
|
]
|
|
35
36
|
}
|
|
36
37
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const z2StepperItemVariants: (props?: ({
|
|
4
|
-
state?: "disabled" | "active" | "completed" | null | undefined;
|
|
4
|
+
state?: "disabled" | "active" | "completed" | "completed-disabled" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface Z2StepperItemProps extends React.HTMLAttributes<HTMLButtonElement>, VariantProps<typeof z2StepperItemVariants> {
|
|
7
7
|
label: string;
|