@ztwoint/z-ui 0.1.132 → 0.1.135

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,12 +1,12 @@
1
- import { jsxs as m, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
2
  import * as h from "react";
3
- import { cn as s } from "../../lib/utils.js";
4
- import { Z2RadioGroupItem as b, Z2RadioGroupIndicator as p } from "../radio/z2-radio.js";
5
- import { CheckIcon as k } from "lucide-react";
6
- import { Z2TextPreset as x } from "../text-preset/text-preset.js";
7
- function v({ primaryText: t, supportText: o }) {
8
- return /* @__PURE__ */ e(
9
- x,
3
+ import { cn as i } from "../../lib/utils.js";
4
+ import { Z2RadioGroupItem as p, Z2RadioGroupIndicator as x } from "../radio/z2-radio.js";
5
+ import { CheckIcon as v } from "lucide-react";
6
+ import { Z2TextPreset as k } from "../text-preset/text-preset.js";
7
+ function g({ primaryText: t, supportText: o }) {
8
+ return /* @__PURE__ */ r(
9
+ k,
10
10
  {
11
11
  type: "L",
12
12
  multiline: !0,
@@ -22,43 +22,43 @@ function j({
22
22
  supportText: o,
23
23
  value: n,
24
24
  id: c,
25
- disabled: i,
25
+ disabled: s,
26
26
  className: l,
27
- itemClassName: d,
27
+ itemClassName: u,
28
28
  endIcon: a
29
29
  }) {
30
- const r = h.useRef(null);
31
- return /* @__PURE__ */ m(
30
+ const e = h.useRef(null);
31
+ return /* @__PURE__ */ f(
32
32
  "div",
33
33
  {
34
- onClick: (f) => {
35
- if (i) return;
36
- const u = f.target;
37
- r.current && !r.current.contains(u) && r.current.click();
34
+ onClick: (d) => {
35
+ if (s) return;
36
+ const m = d.target;
37
+ e.current && !e.current.contains(m) && e.current.click();
38
38
  },
39
- className: s(
40
- "group relative flex items-start justify-start cursor-pointer p-3.5 gap-3 border border-stroke-solid-light rounded-xl transition-colors overflow-hidden",
41
- "hover:border-stroke-solid-hover",
42
- // Left accent when checked (pseudo element)
43
- 'before:content-[""] before:absolute before:inset-y-0 before:left-0 before:w-1 before:rounded-l-xl before:bg-stroke-solid-active before:hidden has-[&[data-state=checked]]:before:block',
44
- // When the nested radio is checked, style the card
45
- "has-[&[data-state=checked]]:border-stroke-solid-active has-[&[data-state=checked]]:bg-surface-accent-default/10",
39
+ className: i(
40
+ // Base card styles (unchecked state)
41
+ "group relative flex items-start justify-start cursor-pointer p-3.5 gap-3 rounded-xl border border-stroke-solid-light bg-surface-neutral-default shadow-xs transition-colors",
42
+ // Hover state
43
+ "hover:border-stroke-solid-hover hover:bg-surface-neutral-hover hover:shadow-sm",
44
+ // Checked state styles (no left accent border)
45
+ "has-[&[data-state=checked]]:border-stroke-solid-active has-[&[data-state=checked]]:shadow-md",
46
46
  l
47
47
  ),
48
48
  children: [
49
- /* @__PURE__ */ e(
50
- b,
49
+ /* @__PURE__ */ r(
50
+ p,
51
51
  {
52
- ref: r,
52
+ ref: e,
53
53
  value: n,
54
54
  id: c,
55
- disabled: i,
56
- className: s(d),
57
- children: /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(k, { className: "size-2.5 text-surface-neutral-default" }) })
55
+ disabled: s,
56
+ className: i(u),
57
+ children: /* @__PURE__ */ r(x, { children: /* @__PURE__ */ r(v, { className: "size-2.5 text-surface-neutral-default" }) })
58
58
  }
59
59
  ),
60
- /* @__PURE__ */ e(v, { primaryText: t, supportText: o }),
61
- a ? /* @__PURE__ */ e("div", { className: "ml-auto flex-shrink-0 pointer-events-none", children: a }) : null
60
+ /* @__PURE__ */ r(g, { primaryText: t, supportText: o }),
61
+ a ? /* @__PURE__ */ r("div", { className: "ml-auto flex-shrink-0 pointer-events-none", children: a }) : null
62
62
  ]
63
63
  }
64
64
  );
@@ -28,7 +28,7 @@ function c({ className: a, ...t }) {
28
28
  }
29
29
  );
30
30
  }
31
- function f({
31
+ function p({
32
32
  className: a,
33
33
  icon: t,
34
34
  label: n,
@@ -46,9 +46,9 @@ function f({
46
46
  "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
47
47
  "group",
48
48
  // Underline pseudo-element using Tailwind's after: utilities
49
- 'after:content-[""] after:absolute after:left-1/2 after:bottom-0 after:-translate-x-1/2',
49
+ 'after:content-[""] after:absolute after:bottom-0',
50
50
  "after:w-[calc(100%-24px)] after:border-b after:border-stroke-solid-attention",
51
- "after:opacity-0 after:transition-opacity after:duration-200 after:ease-linear after:z-10",
51
+ "after:opacity-0 after:transition-opacity after:duration-200 after:ease-linear",
52
52
  // Active state - show underline
53
53
  "data-[state=active]:after:opacity-100",
54
54
  a
@@ -96,7 +96,7 @@ function f({
96
96
  }
97
97
  );
98
98
  }
99
- function p({
99
+ function f({
100
100
  className: a,
101
101
  ...t
102
102
  }) {
@@ -104,7 +104,7 @@ function p({
104
104
  }
105
105
  export {
106
106
  m as Z2Tabs,
107
- p as Z2TabsContent,
107
+ f as Z2TabsContent,
108
108
  c as Z2TabsList,
109
- f as Z2TabsTrigger
109
+ p as Z2TabsTrigger
110
110
  };