@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.
@@ -1,4 +1,4 @@
1
- export type StepperState = 'active' | 'completed' | 'disabled';
1
+ export type StepperState = 'active' | 'completed' | 'disabled' | 'completed-disabled';
2
2
  export type StepperItemType = {
3
3
  id: string;
4
4
  label: string;
@@ -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 m, jsx as i } from "react/jsx-runtime";
2
- import * as c from "react";
3
- import { cva as p } from "class-variance-authority";
4
- import { cn as l } from "../../lib/utils.js";
5
- import f from "../assets/icons/circle-check-filled.js";
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 u = p("w-fit flex items-center select-none gap-2", {
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 = c.forwardRef(
19
- ({ label: a, state: e = "active", className: n, ...s }, d) => {
20
- let r, t;
21
- return e === "completed" ? (r = /* @__PURE__ */ i(f, { fill: "var(--blue-500)", width: 16, height: 16 }), t = "text-neutral-primary leading-none-medium-sm") : e === "active" ? (r = /* @__PURE__ */ i(o, { fill: "var(--blue-500)", width: 16, height: 16 }), t = "text-neutral-primary leading-none-medium-sm") : (r = /* @__PURE__ */ i(o, { fill: "var(--neutral-500)", width: 16, height: 16 }), t = "text-neutral-secondary leading-none-medium-sm"), /* @__PURE__ */ m(
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: d,
25
- className: l(u({ state: e }), n),
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": a,
29
+ disabled: e === "disabled" || e === "completed-disabled",
30
+ "aria-label": t,
30
31
  ...s,
31
32
  children: [
32
- /* @__PURE__ */ i("span", { className: h, children: r }),
33
- /* @__PURE__ */ i("span", { className: l(t), children: a })
33
+ /* @__PURE__ */ i("span", { className: h, children: l }),
34
+ /* @__PURE__ */ i("span", { className: a(r), children: t })
34
35
  ]
35
36
  }
36
37
  );
@@ -1,4 +1,4 @@
1
- export type StepperState = 'active' | 'completed' | 'disabled';
1
+ export type StepperState = 'active' | 'completed' | 'disabled' | 'completed-disabled';
2
2
  export type StepperItemType = {
3
3
  id: string;
4
4
  label: string;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztwoint/z-ui",
3
- "version": "0.1.89",
3
+ "version": "0.1.90",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",