@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
|
|
1
|
+
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import * as h from "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Z2RadioGroupItem as
|
|
5
|
-
import { CheckIcon as
|
|
6
|
-
import { Z2TextPreset as
|
|
7
|
-
function
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
|
|
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:
|
|
25
|
+
disabled: s,
|
|
26
26
|
className: l,
|
|
27
|
-
itemClassName:
|
|
27
|
+
itemClassName: u,
|
|
28
28
|
endIcon: a
|
|
29
29
|
}) {
|
|
30
|
-
const
|
|
31
|
-
return /* @__PURE__ */
|
|
30
|
+
const e = h.useRef(null);
|
|
31
|
+
return /* @__PURE__ */ f(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
34
|
-
onClick: (
|
|
35
|
-
if (
|
|
36
|
-
const
|
|
37
|
-
|
|
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:
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
//
|
|
45
|
-
"has-[&[data-state=checked]]:border-stroke-solid-active
|
|
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__ */
|
|
50
|
-
|
|
49
|
+
/* @__PURE__ */ r(
|
|
50
|
+
p,
|
|
51
51
|
{
|
|
52
|
-
ref:
|
|
52
|
+
ref: e,
|
|
53
53
|
value: n,
|
|
54
54
|
id: c,
|
|
55
|
-
disabled:
|
|
56
|
-
className:
|
|
57
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
61
|
-
a ? /* @__PURE__ */
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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
|
-
|
|
107
|
+
f as Z2TabsContent,
|
|
108
108
|
c as Z2TabsList,
|
|
109
|
-
|
|
109
|
+
p as Z2TabsTrigger
|
|
110
110
|
};
|