@ztwoint/z-ui 0.1.83 → 0.1.85
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/dialog/dialog.js +5 -5
- package/dist/components/radio/z2-radio.js +72 -0
- package/dist/components/table/components/cell/avatar-cell.js +3 -2
- package/dist/components/table/table-provider.js +1 -0
- package/dist/components/table-card/table-card.js +14 -13
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +106 -102
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4,13 +4,13 @@ import { cn as l } from "../../lib/utils.js";
|
|
|
4
4
|
function c({ ...t }) {
|
|
5
5
|
return /* @__PURE__ */ e(o.Root, { "data-slot": "dialog", ...t });
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function u({ ...t }) {
|
|
8
8
|
return /* @__PURE__ */ e(o.Trigger, { "data-slot": "dialog-trigger", ...t });
|
|
9
9
|
}
|
|
10
10
|
function r({ ...t }) {
|
|
11
11
|
return /* @__PURE__ */ e(o.Portal, { "data-slot": "dialog-portal", ...t });
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function f({ ...t }) {
|
|
14
14
|
return /* @__PURE__ */ e(o.Close, { "data-slot": "dialog-close", ...t });
|
|
15
15
|
}
|
|
16
16
|
function s({
|
|
@@ -65,7 +65,7 @@ function x({ className: t, ...a }) {
|
|
|
65
65
|
"div",
|
|
66
66
|
{
|
|
67
67
|
"data-slot": "dialog-footer",
|
|
68
|
-
className: l("flex flex-col-reverse gap-2
|
|
68
|
+
className: l("flex flex-col-reverse gap-2", t),
|
|
69
69
|
...a
|
|
70
70
|
}
|
|
71
71
|
);
|
|
@@ -98,7 +98,7 @@ function Z({
|
|
|
98
98
|
}
|
|
99
99
|
export {
|
|
100
100
|
c as Z2Dialog,
|
|
101
|
-
|
|
101
|
+
f as Z2DialogClose,
|
|
102
102
|
m as Z2DialogContent,
|
|
103
103
|
Z as Z2DialogDescription,
|
|
104
104
|
x as Z2DialogFooter,
|
|
@@ -106,5 +106,5 @@ export {
|
|
|
106
106
|
s as Z2DialogOverlay,
|
|
107
107
|
r as Z2DialogPortal,
|
|
108
108
|
D as Z2DialogTitle,
|
|
109
|
-
|
|
109
|
+
u as Z2DialogTrigger
|
|
110
110
|
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "@radix-ui/react-radio-group";
|
|
3
|
+
import { cn as d } from "../../lib/utils.js";
|
|
4
|
+
function c({ ...e }) {
|
|
5
|
+
return /* @__PURE__ */ t(o.Root, { "data-slot": "radio-group", ...e });
|
|
6
|
+
}
|
|
7
|
+
function n({
|
|
8
|
+
className: e,
|
|
9
|
+
children: r,
|
|
10
|
+
size: a = "default",
|
|
11
|
+
...s
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ t(
|
|
14
|
+
o.Item,
|
|
15
|
+
{
|
|
16
|
+
"data-slot": "radio-group-item",
|
|
17
|
+
"data-size": a,
|
|
18
|
+
className: d(
|
|
19
|
+
// Base styles
|
|
20
|
+
"aspect-square rounded-full border-2 border-stroke-solid-high bg-surface-neutral-default",
|
|
21
|
+
"transition-all duration-200 ease-in-out relative",
|
|
22
|
+
"focus:outline-none",
|
|
23
|
+
// Size variants
|
|
24
|
+
"data-[size=sm]:size-3 data-[size=default]:size-4 data-[size=lg]:size-5",
|
|
25
|
+
// State styles
|
|
26
|
+
"hover:border-stroke-solid-hover hover:bg-surface-neutral-hover",
|
|
27
|
+
"data-[state=checked]:border-surface-accent-default data-[state=checked]:bg-surface-accent-default",
|
|
28
|
+
"data-[state=checked]:hover:border-surface-accent-hover data-[state=checked]:hover:bg-surface-accent-hover",
|
|
29
|
+
// Disabled state
|
|
30
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
31
|
+
"disabled:border-stroke-solid-light disabled:bg-surface-neutral-disabled",
|
|
32
|
+
"disabled:hover:border-stroke-solid-light disabled:hover:bg-surface-neutral-disabled",
|
|
33
|
+
"disabled:data-[state=checked]:border-stroke-solid-light disabled:data-[state=checked]:bg-surface-neutral-disabled",
|
|
34
|
+
e
|
|
35
|
+
),
|
|
36
|
+
...s,
|
|
37
|
+
children: r ?? /* @__PURE__ */ t(
|
|
38
|
+
i,
|
|
39
|
+
{
|
|
40
|
+
className: d(
|
|
41
|
+
"rounded-full bg-surface-neutral-default",
|
|
42
|
+
"transition-all duration-200 ease-in-out",
|
|
43
|
+
a === "sm" && "size-1.5",
|
|
44
|
+
a === "default" && "size-2",
|
|
45
|
+
a === "lg" && "size-2.5"
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
function i({
|
|
53
|
+
className: e,
|
|
54
|
+
...r
|
|
55
|
+
}) {
|
|
56
|
+
return /* @__PURE__ */ t(
|
|
57
|
+
o.Indicator,
|
|
58
|
+
{
|
|
59
|
+
"data-slot": "radio-group-indicator",
|
|
60
|
+
className: d(
|
|
61
|
+
"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",
|
|
62
|
+
e
|
|
63
|
+
),
|
|
64
|
+
...r
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
c as Z2RadioGroup,
|
|
70
|
+
i as Z2RadioGroupIndicator,
|
|
71
|
+
n as Z2RadioGroupItem
|
|
72
|
+
};
|
|
@@ -39,7 +39,8 @@ import "react-dom";
|
|
|
39
39
|
import "../../../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js";
|
|
40
40
|
import "../../../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js";
|
|
41
41
|
import "@radix-ui/react-slot";
|
|
42
|
-
|
|
42
|
+
import "@radix-ui/react-radio-group";
|
|
43
|
+
const T = ({
|
|
43
44
|
avatar: m,
|
|
44
45
|
value: a,
|
|
45
46
|
rightIcon: o,
|
|
@@ -77,5 +78,5 @@ const I = ({
|
|
|
77
78
|
}
|
|
78
79
|
);
|
|
79
80
|
export {
|
|
80
|
-
|
|
81
|
+
T as AvatarCell
|
|
81
82
|
};
|
|
@@ -44,6 +44,7 @@ import "react-dom";
|
|
|
44
44
|
import "../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js";
|
|
45
45
|
import "../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js";
|
|
46
46
|
import "@radix-ui/react-slot";
|
|
47
|
+
import "@radix-ui/react-radio-group";
|
|
47
48
|
import { TableHeaderWrapper as T } from "./components/table-header-wrapper.js";
|
|
48
49
|
import { TableHeaderContent as b } from "./components/table-header-content.js";
|
|
49
50
|
import { TableFooter as s } from "./components/table-footer.js";
|
|
@@ -39,15 +39,16 @@ import "react-dom";
|
|
|
39
39
|
import "../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js";
|
|
40
40
|
import "../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js";
|
|
41
41
|
import "@radix-ui/react-slot";
|
|
42
|
+
import "@radix-ui/react-radio-group";
|
|
42
43
|
import "../table/table.context.js";
|
|
43
|
-
const
|
|
44
|
+
const we = ({
|
|
44
45
|
dataSource: w,
|
|
45
46
|
schema: B,
|
|
46
47
|
loading: b,
|
|
47
48
|
emptyMessage: H,
|
|
48
49
|
className: j,
|
|
49
|
-
rounded:
|
|
50
|
-
bordered:
|
|
50
|
+
rounded: n = !0,
|
|
51
|
+
bordered: i = !0,
|
|
51
52
|
showHeader: g = !0,
|
|
52
53
|
headerClassName: k,
|
|
53
54
|
search: m,
|
|
@@ -85,8 +86,8 @@ const Fe = ({
|
|
|
85
86
|
{
|
|
86
87
|
className: d(
|
|
87
88
|
"flex-shrink-0",
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
i && "border-stroke-solid-medium border-1 border-b-0",
|
|
90
|
+
n && "rounded-t-xl",
|
|
90
91
|
k
|
|
91
92
|
),
|
|
92
93
|
children: [
|
|
@@ -132,11 +133,11 @@ const Fe = ({
|
|
|
132
133
|
sort: l == null ? void 0 : l.sort,
|
|
133
134
|
className: d(
|
|
134
135
|
"flex-1 min-h-0",
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
i && "border-stroke-solid-light border-1",
|
|
137
|
+
n && !(g && C) && "rounded-t-xl",
|
|
138
|
+
n && !(P && v) && "rounded-b-xl",
|
|
139
|
+
i && "[&_td:first-child]:border-l-0 [&_td:last-child]:border-r-0",
|
|
140
|
+
i && "[&_th:first-child]:border-l-0 [&_th:last-child]:border-r-0",
|
|
140
141
|
l == null ? void 0 : l.className
|
|
141
142
|
),
|
|
142
143
|
stickyHeader: l == null ? void 0 : l.stickyHeader
|
|
@@ -147,8 +148,8 @@ const Fe = ({
|
|
|
147
148
|
{
|
|
148
149
|
className: d(
|
|
149
150
|
"flex-shrink-0 border-stroke-solid-light border-t-[0.5px] mt-[-2px]",
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
i && "border",
|
|
152
|
+
n && "rounded-b-xl",
|
|
152
153
|
T
|
|
153
154
|
),
|
|
154
155
|
children: [
|
|
@@ -194,5 +195,5 @@ const Fe = ({
|
|
|
194
195
|
] });
|
|
195
196
|
};
|
|
196
197
|
export {
|
|
197
|
-
|
|
198
|
+
we as default
|
|
198
199
|
};
|