@ztwoint/z-ui 0.1.46 → 0.1.49
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/alert/alert.const.d.ts +0 -3
- package/dist/components/alert/alert.const.js +16 -31
- package/dist/components/alert/alert.js +32 -44
- package/dist/components/assets/icons/check.d.ts +8 -0
- package/dist/components/assets/icons/check.js +17 -0
- package/dist/components/assets/icons/x-mark.d.ts +8 -0
- package/dist/components/assets/icons/x-mark.js +17 -0
- package/dist/components/button/button.d.ts +3 -3
- package/dist/components/button/button.js +58 -58
- package/dist/components/collapsible-side-nav-bar/side-nav-bar-header.js +17 -17
- package/dist/components/nav-header/nav-item/nav-item.d.ts +4 -2
- package/dist/components/nav-header/nav-item/nav-item.js +29 -28
- package/dist/components/select/z2-select.js +131 -78
- package/dist/components/table/components/cell/avatar-cell.d.ts +15 -0
- package/dist/components/table/components/cell/avatar-cell.js +74 -0
- package/dist/components/table/components/cell/boolean-cell.d.ts +1 -2
- package/dist/components/table/components/cell/boolean-cell.js +5 -5
- package/dist/components/table/components/cell/description-cell.d.ts +7 -0
- package/dist/components/table/components/cell/description-cell.js +16 -0
- package/dist/components/table/components/cell/index.d.ts +10 -1
- package/dist/components/table/components/cell/label-cell.d.ts +10 -0
- package/dist/components/table/components/cell/label-cell.js +47 -0
- package/dist/components/table/components/cell/link-cell.d.ts +10 -0
- package/dist/components/table/components/cell/link-cell.js +35 -0
- package/dist/components/table/components/cell/number-cell.d.ts +5 -3
- package/dist/components/table/components/cell/number-cell.js +40 -3
- package/dist/components/table/components/index.d.ts +1 -1
- package/dist/components/table/components/table-cell.d.ts +1 -1
- package/dist/components/table/components/table-cell.js +41 -32
- package/dist/components/table/components/table-filter/close-filter-confirm/filter-confirmation-dialog.d.ts +10 -0
- package/dist/components/table/components/table-filter/close-filter-confirm/filter-confirmation-dialog.js +33 -0
- package/dist/components/table/components/table-filter/close-filter-confirm/filter-confirmation-dialog.utils.d.ts +13 -0
- package/dist/components/table/components/table-filter/close-filter-confirm/filter-confirmation-dialog.utils.js +20 -0
- package/dist/components/table/components/table-filter/filters/boolean.js +52 -44
- package/dist/components/table/components/table-filter/selected-filters-display/selected-filters-display.utils.js +16 -16
- package/dist/components/table/components/table-filter/table-filter-button.js +88 -57
- package/dist/components/table/components/table-filter/table-filter-column-button.js +81 -51
- package/dist/components/table/components/table-filter/table-filter.context.d.ts +1 -0
- package/dist/components/table/components/table-filter/table-filter.hook.d.ts +1 -0
- package/dist/components/table/components/table-filter/table-filter.hook.js +17 -14
- package/dist/components/table/components/table-footer.js +6 -6
- package/dist/components/table/components/table-header/stories/basic-header.d.ts +1 -1
- package/dist/components/table/components/table-header/table-header.js +27 -33
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/table-provider.js +37 -8
- package/dist/components/table/table.const.d.ts +15 -9
- package/dist/components/table/table.const.js +15 -9
- package/dist/components/table/table.js +39 -34
- package/dist/components/table/table.type.d.ts +36 -5
- package/dist/components/table/table.utils.d.ts +1 -1
- package/dist/components/table/table.utils.js +5 -3
- package/dist/components/table-card/table-card.js +116 -89
- package/dist/components/tooltip/tooltip.js +24 -22
- package/dist/css/config/colors/backgrounds.css +8 -8
- package/dist/css/config/colors/components/avatar.css +12 -12
- package/dist/css/config/colors/components/badge.css +42 -42
- package/dist/css/config/colors/components/checkbox.css +2 -2
- package/dist/css/config/colors/components/featured-icon.css +18 -18
- package/dist/css/config/colors/components/progress-bar.css +2 -2
- package/dist/css/config/colors/components/radio-button.css +2 -2
- package/dist/css/config/colors/components/scroll-overlay.css +4 -4
- package/dist/css/config/colors/components/tab.css +7 -7
- package/dist/css/config/colors/components/toggle-switch.css +1 -1
- package/dist/css/config/colors/components/toggle.css +6 -6
- package/dist/css/config/colors/icons.css +20 -20
- package/dist/css/config/colors/overlay.css +1 -1
- package/dist/css/config/colors/semantic/alert.css +44 -0
- package/dist/css/config/colors/semantic/background.css +51 -0
- package/dist/css/config/colors/semantic/base.css +395 -0
- package/dist/css/config/colors/semantic/button.css +131 -0
- package/dist/css/config/colors/semantic/drop-shadow.css +30 -0
- package/dist/css/config/colors/semantic/dropdown.css +12 -0
- package/dist/css/config/colors/semantic/index.css +16 -0
- package/dist/css/config/colors/semantic/input.css +56 -0
- package/dist/css/config/colors/semantic/overlay.css +13 -0
- package/dist/css/config/colors/semantic/stroke.css +90 -0
- package/dist/css/config/colors/semantic/surface.css +135 -0
- package/dist/css/config/colors/semantic/text.css +113 -0
- package/dist/css/config/colors/semantic/tooltip.css +12 -0
- package/dist/css/config/colors/shape.css +40 -40
- package/dist/css/config/colors/stroke.css +19 -19
- package/dist/css/config/colors/surfaces.css +47 -47
- package/dist/css/config/colors/text.css +37 -37
- package/dist/css/config/components/index.css +0 -2
- package/dist/css/config/config-deprecated.css +3 -5
- package/dist/css/config/config.css +5 -3
- package/dist/css/config/other-variables.css +9 -0
- package/dist/css/config/shadows.css +15 -0
- package/dist/css/config/typography/2xl.css +7 -14
- package/dist/css/config/typography/3xl.css +7 -14
- package/dist/css/config/typography/4xl.css +7 -14
- package/dist/css/config/typography/base.css +7 -14
- package/dist/css/config/typography/lg.css +7 -14
- package/dist/css/config/typography/sm.css +7 -14
- package/dist/css/config/typography/xl.css +7 -14
- package/dist/css/config/typography/xs.css +7 -14
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/index.js +62 -64
- package/dist/types/components/alert/alert.const.d.ts +0 -3
- package/dist/types/components/assets/icons/check.d.ts +8 -0
- package/dist/types/components/assets/icons/x-mark.d.ts +8 -0
- package/dist/types/components/button/button.d.ts +3 -3
- package/dist/types/components/nav-header/nav-item/nav-item.d.ts +4 -2
- package/dist/types/components/table/components/cell/avatar-cell.d.ts +15 -0
- package/dist/types/components/table/components/cell/boolean-cell.d.ts +1 -2
- package/dist/types/components/table/components/cell/description-cell.d.ts +7 -0
- package/dist/types/components/table/components/cell/index.d.ts +10 -1
- package/dist/types/components/table/components/cell/label-cell.d.ts +10 -0
- package/dist/types/components/table/components/cell/link-cell.d.ts +10 -0
- package/dist/types/components/table/components/cell/number-cell.d.ts +5 -3
- package/dist/types/components/table/components/index.d.ts +1 -1
- package/dist/types/components/table/components/table-cell.d.ts +1 -1
- package/dist/types/components/table/components/table-filter/close-filter-confirm/filter-confirmation-dialog.d.ts +10 -0
- package/dist/types/components/table/components/table-filter/close-filter-confirm/filter-confirmation-dialog.utils.d.ts +13 -0
- package/dist/types/components/table/components/table-filter/table-filter.context.d.ts +1 -0
- package/dist/types/components/table/components/table-filter/table-filter.hook.d.ts +1 -0
- package/dist/types/components/table/components/table-header/stories/basic-header.d.ts +1 -1
- package/dist/types/components/table/index.d.ts +1 -1
- package/dist/types/components/table/table.const.d.ts +15 -9
- package/dist/types/components/table/table.type.d.ts +36 -5
- package/dist/types/components/table/table.utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/table/components/cell/text-cell.d.ts +0 -7
- package/dist/components/table/components/cell/text-cell.js +0 -5
- package/dist/css/config/colors/components/alert.css +0 -84
- package/dist/css/config/colors/components/button.css +0 -93
- package/dist/css/config/colors/components/select.css +0 -128
- package/dist/css/config/colors/components/text-button.css +0 -67
- package/dist/css/config/colors/defaults.css +0 -393
- package/dist/css/config/colors/semantic-colors.css +0 -353
- package/dist/css/config/components/button.css +0 -160
- package/dist/css/config/components/input.css +0 -56
- package/dist/node_modules/@heroicons/react/24/solid/esm/CheckCircleIcon.js +0 -26
- package/dist/node_modules/@heroicons/react/24/solid/esm/XCircleIcon.js +0 -26
- package/dist/types/components/table/components/cell/text-cell.d.ts +0 -7
- /package/dist/css/config/typography/{typography.css → index.css} +0 -0
|
@@ -1,105 +1,161 @@
|
|
|
1
1
|
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { ChevronDownIcon as
|
|
4
|
-
import { cn as
|
|
2
|
+
import * as a from "@radix-ui/react-select";
|
|
3
|
+
import { ChevronDownIcon as i, ChevronUpIcon as d } from "lucide-react";
|
|
4
|
+
import { cn as l } from "../../lib/utils.js";
|
|
5
5
|
import u from "../assets/icons/circle-check-filled.js";
|
|
6
|
-
function
|
|
7
|
-
return /* @__PURE__ */ t(
|
|
6
|
+
function h({ ...e }) {
|
|
7
|
+
return /* @__PURE__ */ t(a.Root, { "data-slot": "select", ...e });
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function b({
|
|
10
10
|
className: e,
|
|
11
|
-
...
|
|
11
|
+
...s
|
|
12
12
|
}) {
|
|
13
13
|
return /* @__PURE__ */ t(
|
|
14
|
-
|
|
14
|
+
a.Group,
|
|
15
15
|
{
|
|
16
16
|
"data-slot": "select-group",
|
|
17
|
-
className:
|
|
18
|
-
|
|
17
|
+
className: l(
|
|
18
|
+
// layout
|
|
19
|
+
"flex w-full flex-col items-start gap-1 relative rounded-none",
|
|
20
|
+
e
|
|
21
|
+
),
|
|
22
|
+
...s
|
|
19
23
|
}
|
|
20
24
|
);
|
|
21
25
|
}
|
|
22
|
-
function
|
|
26
|
+
function g({
|
|
23
27
|
className: e,
|
|
24
|
-
...
|
|
28
|
+
...s
|
|
25
29
|
}) {
|
|
26
30
|
return /* @__PURE__ */ t(
|
|
27
|
-
|
|
31
|
+
a.Value,
|
|
28
32
|
{
|
|
29
33
|
"data-slot": "select-value",
|
|
30
|
-
className:
|
|
31
|
-
|
|
34
|
+
className: l(
|
|
35
|
+
// layout + text alignment
|
|
36
|
+
"w-full self-center items-start text-left flex gap-1",
|
|
37
|
+
e
|
|
38
|
+
),
|
|
39
|
+
...s
|
|
32
40
|
}
|
|
33
41
|
);
|
|
34
42
|
}
|
|
35
|
-
function
|
|
43
|
+
function w({
|
|
36
44
|
className: e,
|
|
37
|
-
size:
|
|
38
|
-
children:
|
|
39
|
-
...
|
|
45
|
+
size: s = "default",
|
|
46
|
+
children: r,
|
|
47
|
+
...n
|
|
40
48
|
}) {
|
|
41
49
|
return /* @__PURE__ */ o(
|
|
42
|
-
|
|
50
|
+
a.Trigger,
|
|
43
51
|
{
|
|
44
52
|
"data-slot": "select-trigger",
|
|
45
|
-
"data-size":
|
|
46
|
-
className:
|
|
47
|
-
|
|
53
|
+
"data-size": s,
|
|
54
|
+
className: l(
|
|
55
|
+
// base layout
|
|
56
|
+
"h-7.5 flex items-center justify-center w-full self-stretch transition-all cursor-pointer",
|
|
57
|
+
"gap-[6px] p-2 rounded-md",
|
|
58
|
+
// size variants
|
|
59
|
+
"data-[size=sm]:gap-1 data-[size=sm]:p-[6px]",
|
|
60
|
+
"data-[size=sm]:h-6.5",
|
|
61
|
+
//text
|
|
62
|
+
"leading-none-medium-sm text-text-neutral-primary",
|
|
63
|
+
"hover:text-text-neutral-secondary",
|
|
64
|
+
"focus:text-text-neutral-secondary",
|
|
65
|
+
"data-[state=open]:text-text-neutral-secondary",
|
|
66
|
+
"data-[disabled]:text-text-neutral-muted",
|
|
67
|
+
// focus reset
|
|
68
|
+
"focus:outline-none outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring-default",
|
|
69
|
+
// surface + stroke (default)
|
|
70
|
+
"bg-input-surface-default box-shadow-button-default",
|
|
71
|
+
// hover
|
|
72
|
+
"hover:bg-input-surface-hover",
|
|
73
|
+
"hover:box-shadow-button-default-hover",
|
|
74
|
+
// focus
|
|
75
|
+
"focus:bg-input-surface-pressed",
|
|
76
|
+
"focus:box-shadow-button-default-pressed",
|
|
77
|
+
// open
|
|
78
|
+
"data-[state=open]:bg-input-surface-pressed",
|
|
79
|
+
"data-[state=open]:box-shadow-button-default-pressed",
|
|
80
|
+
// disabled
|
|
81
|
+
"data-[disabled]:bg-input-surface-disabled data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed",
|
|
82
|
+
e
|
|
83
|
+
),
|
|
84
|
+
...n,
|
|
48
85
|
children: [
|
|
49
|
-
|
|
50
|
-
/* @__PURE__ */ t(
|
|
86
|
+
r,
|
|
87
|
+
/* @__PURE__ */ t(a.Icon, { asChild: !0, children: /* @__PURE__ */ t(i, { className: "shrink-0 w-[14px] h-[14px] aspect-square text-text-neutral-muted" }) })
|
|
51
88
|
]
|
|
52
89
|
}
|
|
53
90
|
);
|
|
54
91
|
}
|
|
55
|
-
function
|
|
92
|
+
function v({
|
|
56
93
|
className: e,
|
|
57
|
-
children:
|
|
58
|
-
position:
|
|
59
|
-
...
|
|
94
|
+
children: s,
|
|
95
|
+
position: r = "popper",
|
|
96
|
+
...n
|
|
60
97
|
}) {
|
|
61
|
-
return /* @__PURE__ */ t(
|
|
62
|
-
|
|
98
|
+
return /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(
|
|
99
|
+
a.Content,
|
|
63
100
|
{
|
|
64
101
|
"data-slot": "select-content",
|
|
65
|
-
className:
|
|
102
|
+
className: l(
|
|
103
|
+
"min-w-[var(--radix-select-trigger-width)] flex flex-col items-start p-1 rounded-xl",
|
|
104
|
+
// background stack (overlay on top + base)
|
|
105
|
+
"bg-dropdown-surface",
|
|
106
|
+
// elevation + hairline stroke
|
|
107
|
+
"box-shadow-medium-10",
|
|
108
|
+
e
|
|
109
|
+
),
|
|
66
110
|
sideOffset: 10,
|
|
67
|
-
position:
|
|
68
|
-
...
|
|
69
|
-
children: /* @__PURE__ */ t(
|
|
111
|
+
position: r,
|
|
112
|
+
...n,
|
|
113
|
+
children: /* @__PURE__ */ t(a.Viewport, { className: "!w-full ", children: s })
|
|
70
114
|
}
|
|
71
115
|
) });
|
|
72
116
|
}
|
|
73
|
-
function
|
|
117
|
+
function N({
|
|
74
118
|
className: e,
|
|
75
|
-
...
|
|
119
|
+
...s
|
|
76
120
|
}) {
|
|
77
121
|
return /* @__PURE__ */ t(
|
|
78
|
-
|
|
122
|
+
a.Label,
|
|
79
123
|
{
|
|
80
124
|
"data-slot": "select-label",
|
|
81
|
-
className:
|
|
82
|
-
|
|
125
|
+
className: l(
|
|
126
|
+
"flex items-center gap-1 self-stretch text-text-neutral-secondary",
|
|
127
|
+
"px-2 pt-2 pb-1",
|
|
128
|
+
"leading-none-medium-sm",
|
|
129
|
+
e
|
|
130
|
+
),
|
|
131
|
+
...s
|
|
83
132
|
}
|
|
84
133
|
);
|
|
85
134
|
}
|
|
86
|
-
function
|
|
135
|
+
function S({ className: e, children: s, leftIcon: r, label: n, ...c }) {
|
|
87
136
|
return /* @__PURE__ */ o(
|
|
88
|
-
|
|
137
|
+
a.Item,
|
|
89
138
|
{
|
|
90
139
|
"data-slot": "select-item",
|
|
91
|
-
className:
|
|
92
|
-
|
|
140
|
+
className: l(
|
|
141
|
+
"border-none w-full relative self-stretch flex items-center justify-between gap-2 cursor-pointer outline-none rounded-md",
|
|
142
|
+
"data-[disabled]:pointer-events-none",
|
|
143
|
+
"p-2",
|
|
144
|
+
// hover/active surface
|
|
145
|
+
"data-[state=active]:surface-neutral-focused hover:surface-neutral-focused",
|
|
146
|
+
e
|
|
147
|
+
),
|
|
148
|
+
...c,
|
|
93
149
|
children: [
|
|
94
|
-
/* @__PURE__ */ t(
|
|
95
|
-
|
|
96
|
-
/* @__PURE__ */ t("div", { className: "flex-1 overflow-hidden text-ellipsis
|
|
150
|
+
/* @__PURE__ */ t(a.ItemText, { asChild: !0, children: /* @__PURE__ */ o("div", { className: "flex items-center justify-center gap-2 flex-1 overflow-hidden text-ellipsis leading-none-medium-sm", children: [
|
|
151
|
+
r && /* @__PURE__ */ t("div", { className: "flex w-3.5 h-3.5 items-center justify-center", children: r }),
|
|
152
|
+
/* @__PURE__ */ t("div", { className: "flex-1 overflow-hidden text-ellipsis leading-none-medium-sm", children: s || n })
|
|
97
153
|
] }) }),
|
|
98
154
|
/* @__PURE__ */ t(
|
|
99
|
-
|
|
155
|
+
a.ItemIndicator,
|
|
100
156
|
{
|
|
101
157
|
"data-slot": "select-item-indicator",
|
|
102
|
-
className: "
|
|
158
|
+
className: "flex w-[14px] h-[14px] items-center justify-center",
|
|
103
159
|
children: /* @__PURE__ */ t(u, { className: "w-4 h-4" })
|
|
104
160
|
}
|
|
105
161
|
)
|
|
@@ -107,59 +163,56 @@ function b({ className: e, children: l, leftIcon: s, label: a, ...i }) {
|
|
|
107
163
|
}
|
|
108
164
|
);
|
|
109
165
|
}
|
|
110
|
-
function
|
|
166
|
+
function y({
|
|
111
167
|
className: e,
|
|
112
|
-
...
|
|
168
|
+
...s
|
|
113
169
|
}) {
|
|
114
170
|
return /* @__PURE__ */ t(
|
|
115
|
-
|
|
171
|
+
a.Separator,
|
|
116
172
|
{
|
|
117
173
|
"data-slot": "select-separator",
|
|
118
|
-
className:
|
|
119
|
-
|
|
120
|
-
e
|
|
121
|
-
),
|
|
122
|
-
...l
|
|
174
|
+
className: l("border-t-[1px] border-solid border-stroke-solid-light my-1 mx-1", e),
|
|
175
|
+
...s
|
|
123
176
|
}
|
|
124
177
|
);
|
|
125
178
|
}
|
|
126
|
-
function
|
|
179
|
+
function Z({
|
|
127
180
|
className: e,
|
|
128
|
-
...
|
|
181
|
+
...s
|
|
129
182
|
}) {
|
|
130
183
|
return /* @__PURE__ */ t(
|
|
131
|
-
|
|
184
|
+
a.ScrollUpButton,
|
|
132
185
|
{
|
|
133
186
|
"data-slot": "select-scroll-up-button",
|
|
134
|
-
className:
|
|
135
|
-
...
|
|
187
|
+
className: l("flex cursor-default items-center justify-center py-1", e),
|
|
188
|
+
...s,
|
|
136
189
|
children: /* @__PURE__ */ t(d, { className: "size-4" })
|
|
137
190
|
}
|
|
138
191
|
);
|
|
139
192
|
}
|
|
140
|
-
function
|
|
193
|
+
function j({
|
|
141
194
|
className: e,
|
|
142
|
-
...
|
|
195
|
+
...s
|
|
143
196
|
}) {
|
|
144
197
|
return /* @__PURE__ */ t(
|
|
145
|
-
|
|
198
|
+
a.ScrollDownButton,
|
|
146
199
|
{
|
|
147
200
|
"data-slot": "select-scroll-down-button",
|
|
148
|
-
className:
|
|
149
|
-
...
|
|
150
|
-
children: /* @__PURE__ */ t(
|
|
201
|
+
className: l("flex cursor-default items-center justify-center py-1", e),
|
|
202
|
+
...s,
|
|
203
|
+
children: /* @__PURE__ */ t(i, { className: "size-4" })
|
|
151
204
|
}
|
|
152
205
|
);
|
|
153
206
|
}
|
|
154
207
|
export {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
208
|
+
h as Z2Select,
|
|
209
|
+
v as Z2SelectContent,
|
|
210
|
+
b as Z2SelectGroup,
|
|
211
|
+
S as Z2SelectItem,
|
|
212
|
+
N as Z2SelectLabel,
|
|
213
|
+
j as Z2SelectScrollDownButton,
|
|
214
|
+
Z as Z2SelectScrollUpButton,
|
|
215
|
+
y as Z2SelectSeparator,
|
|
216
|
+
w as Z2SelectTrigger,
|
|
217
|
+
g as Z2SelectValue
|
|
165
218
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { RootProps, LabelProps } from '../../../avatar/avatar';
|
|
3
|
+
import { CellValue } from '../../table.type';
|
|
4
|
+
export interface AvatarCellProps {
|
|
5
|
+
avatar: {
|
|
6
|
+
label: LabelProps['label'];
|
|
7
|
+
color: RootProps['color'];
|
|
8
|
+
};
|
|
9
|
+
value: CellValue;
|
|
10
|
+
rightIcon?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
helperText?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const AvatarCell: FC<AvatarCellProps>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "react";
|
|
4
|
+
import { cn as r } from "../../../../lib/utils.js";
|
|
5
|
+
import "../../../alert/alert.const.js";
|
|
6
|
+
import "../../../button/button.js";
|
|
7
|
+
import "../../../collapsible-side-nav-bar/side-nav-bar-provider.js";
|
|
8
|
+
import "../../../collapsible-side-nav-bar/side-nav-bar.js";
|
|
9
|
+
import "../../../collapsible-side-nav-bar/side-nav-bar-header.js";
|
|
10
|
+
import "../../../collapsible-side-nav-bar/side-nav-bar-content.js";
|
|
11
|
+
import "../../../collapsible-side-nav-bar/side-nav-bar-footer.js";
|
|
12
|
+
import "../../../collapsible-side-nav-bar/side-nav-bar-group.js";
|
|
13
|
+
import "../../../collapsible-side-nav-bar/side-nav-bar-item.js";
|
|
14
|
+
import "../../../collapsible-side-nav-bar/side-nav-bar-separator.js";
|
|
15
|
+
import "../../../collapsible-side-nav-bar/context.js";
|
|
16
|
+
import "../../../collapsible-side-nav-bar/popover/popover.js";
|
|
17
|
+
import "react-country-flag";
|
|
18
|
+
import "classnames";
|
|
19
|
+
import "@radix-ui/react-dialog";
|
|
20
|
+
import "../../../dropdown/z2-dropdown.js";
|
|
21
|
+
import "@radix-ui/react-dropdown-menu";
|
|
22
|
+
import "lucide-react";
|
|
23
|
+
import "../../../input/input.js";
|
|
24
|
+
import "../../../nav-header/nav-header.js";
|
|
25
|
+
import "../../../nav-header/nav-item/nav-item.js";
|
|
26
|
+
import "@radix-ui/react-select";
|
|
27
|
+
import "../../../stepper/stepper.js";
|
|
28
|
+
import "../../../stepper-item/stepper-item.js";
|
|
29
|
+
import "@radix-ui/react-tabs";
|
|
30
|
+
import "../../table-provider.js";
|
|
31
|
+
import { Avatar as p } from "../../../avatar/avatar.js";
|
|
32
|
+
import "../../table.context.js";
|
|
33
|
+
import "../../../tooltip/tooltip.js";
|
|
34
|
+
import "../../../badge/badge.js";
|
|
35
|
+
const V = ({
|
|
36
|
+
avatar: m,
|
|
37
|
+
value: a,
|
|
38
|
+
rightIcon: e,
|
|
39
|
+
className: s,
|
|
40
|
+
helperText: o,
|
|
41
|
+
description: l
|
|
42
|
+
}) => /* @__PURE__ */ i(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: r(
|
|
46
|
+
"flex flex-col gap-2.5 items-center hover:bg-background-neutral-light h-full min-w-full leading-none-medium-sm p-3",
|
|
47
|
+
s
|
|
48
|
+
),
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ i(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
className: r(
|
|
54
|
+
"text-text-neutral-primary flex justify-between gap-2.5 min-w-full items-center"
|
|
55
|
+
),
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-2 h-full", children: [
|
|
58
|
+
/* @__PURE__ */ t(p.Root, { size: "xxs", color: m.color, children: /* @__PURE__ */ t(p.Label, { label: m.label }) }),
|
|
59
|
+
a
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-2.5", children: [
|
|
62
|
+
o && /* @__PURE__ */ t("span", { className: "text-text-neutral-secondary", children: o }),
|
|
63
|
+
e && /* @__PURE__ */ t("span", { className: r("min-h-max min-w-max"), children: e })
|
|
64
|
+
] })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
l && /* @__PURE__ */ t("div", { className: "text-text-neutral-secondary w-full", children: l })
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
export {
|
|
73
|
+
V as AvatarCell
|
|
74
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Check as t } from "../../../assets/icons/check.js";
|
|
3
|
+
import { XMark as l } from "../../../assets/icons/x-mark.js";
|
|
4
|
+
const s = ({ value: e }) => e == null ? null : /* @__PURE__ */ r("div", { className: "flex items-center p-3 h-full", children: e ? /* @__PURE__ */ r(t, { className: "text-green-500 w-3.5 h-3.5" }) : /* @__PURE__ */ r(l, { className: "text-red-500 w-3.5 h-3.5" }) });
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as BooleanCell
|
|
7
7
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as l } from "../../../../lib/utils.js";
|
|
3
|
+
const i = ({ value: e, className: t }) => /* @__PURE__ */ r(
|
|
4
|
+
"div",
|
|
5
|
+
{
|
|
6
|
+
className: l(
|
|
7
|
+
"text-text-neutral-secondary p-3 w-full h-full items-center flex hover:bg-background-neutral-light",
|
|
8
|
+
"leading-[24px] text-[14px]",
|
|
9
|
+
t
|
|
10
|
+
),
|
|
11
|
+
children: e
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
export {
|
|
15
|
+
i as DescriptionCell
|
|
16
|
+
};
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
export { TextCell } from './text-cell';
|
|
2
1
|
export { NumberCell } from './number-cell';
|
|
3
2
|
export { BooleanCell } from './boolean-cell';
|
|
3
|
+
export { LinkCell } from './link-cell';
|
|
4
|
+
export { DescriptionCell } from './description-cell';
|
|
5
|
+
export { AvatarCell } from './avatar-cell';
|
|
6
|
+
export { LabelCell } from './label-cell';
|
|
7
|
+
export type { NumberCellProps } from './number-cell';
|
|
8
|
+
export type { BooleanCellProps } from './boolean-cell';
|
|
9
|
+
export type { LinkCellProps } from './link-cell';
|
|
10
|
+
export type { AvatarCellProps } from './avatar-cell';
|
|
11
|
+
export type { LabelCellProps } from './label-cell';
|
|
12
|
+
export type { DescriptionCellProps } from './description-cell';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CellValue } from '../../table.type';
|
|
2
|
+
export interface LabelCellProps {
|
|
3
|
+
value: CellValue;
|
|
4
|
+
rightIcon?: React.ReactNode;
|
|
5
|
+
leftIcon?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const LabelCell: React.FC<LabelCellProps>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsxs as e, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn as a } from "../../../../lib/utils.js";
|
|
4
|
+
const u = ({
|
|
5
|
+
value: i,
|
|
6
|
+
leftIcon: n,
|
|
7
|
+
rightIcon: t,
|
|
8
|
+
className: c,
|
|
9
|
+
helperText: m,
|
|
10
|
+
description: s
|
|
11
|
+
}) => {
|
|
12
|
+
const r = "min-h-max min-w-max";
|
|
13
|
+
return /* @__PURE__ */ e(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: a(
|
|
17
|
+
"flex flex-row gap-2.5 items-center hover:bg-background-neutral-light h-full min-w-full leading-none-medium-sm p-3",
|
|
18
|
+
s && "flex-col",
|
|
19
|
+
c
|
|
20
|
+
),
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ e(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: a(
|
|
26
|
+
"text-text-neutral-primary flex justify-between gap-2.5 min-w-full items-center"
|
|
27
|
+
),
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2.5 h-full", children: [
|
|
30
|
+
n && /* @__PURE__ */ l("span", { className: a(r), children: n }),
|
|
31
|
+
i
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2.5", children: [
|
|
34
|
+
m && /* @__PURE__ */ l("span", { className: "text-text-neutral-secondary", children: m }),
|
|
35
|
+
t && /* @__PURE__ */ l("span", { className: a(r), children: t })
|
|
36
|
+
] })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
s && /* @__PURE__ */ l("div", { className: "text-text-neutral-secondary w-full", children: s })
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
u as LabelCell
|
|
47
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CellValue } from '../../table.type';
|
|
2
|
+
export interface LinkCellProps {
|
|
3
|
+
value: CellValue;
|
|
4
|
+
href: string;
|
|
5
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
6
|
+
rightIcon?: React.ReactNode;
|
|
7
|
+
leftIcon?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const LinkCell: React.FC<LinkCellProps>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
4
|
+
const p = ({
|
|
5
|
+
value: i,
|
|
6
|
+
href: m,
|
|
7
|
+
target: t = "_self",
|
|
8
|
+
leftIcon: n,
|
|
9
|
+
rightIcon: r,
|
|
10
|
+
className: o
|
|
11
|
+
}) => {
|
|
12
|
+
const l = "min-h-max min-w-max";
|
|
13
|
+
return /* @__PURE__ */ s(
|
|
14
|
+
"a",
|
|
15
|
+
{
|
|
16
|
+
href: m,
|
|
17
|
+
target: t,
|
|
18
|
+
rel: "noopener noreferrer",
|
|
19
|
+
className: e(
|
|
20
|
+
"text-text-brand-secondary p-3 leading-none-medium-sm flex flex-row justify-between hover:bg-background-neutral-light gap-2.5 min-w-full min-h-full items-center",
|
|
21
|
+
o
|
|
22
|
+
),
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-2.5 h-full", children: [
|
|
25
|
+
n && /* @__PURE__ */ a("span", { className: e(l), children: n }),
|
|
26
|
+
i
|
|
27
|
+
] }),
|
|
28
|
+
r && /* @__PURE__ */ a("span", { className: e(l), children: r })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
p as LinkCell
|
|
35
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { CellValue } from '../../table.type';
|
|
2
|
-
|
|
3
|
-
interface NumberCellProps {
|
|
2
|
+
export interface NumberCellProps {
|
|
4
3
|
value: CellValue;
|
|
4
|
+
rightIcon?: React.ReactNode;
|
|
5
|
+
leftIcon?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
helperText?: string;
|
|
5
8
|
}
|
|
6
9
|
export declare const NumberCell: React.FC<NumberCellProps>;
|
|
7
|
-
export {};
|
|
@@ -1,5 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn as l } from "../../../../lib/utils.js";
|
|
4
|
+
const u = ({
|
|
5
|
+
value: r,
|
|
6
|
+
leftIcon: s,
|
|
7
|
+
rightIcon: n,
|
|
8
|
+
className: t,
|
|
9
|
+
helperText: i
|
|
10
|
+
}) => {
|
|
11
|
+
const m = "min-h-max min-w-max";
|
|
12
|
+
return /* @__PURE__ */ e(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
className: l(
|
|
16
|
+
"flex gap-2.5 items-center hover:bg-background-neutral-light h-full min-w-full leading-none-medium-sm p-3",
|
|
17
|
+
t
|
|
18
|
+
),
|
|
19
|
+
children: /* @__PURE__ */ a(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: l(
|
|
23
|
+
"text-text-neutral-primary flex justify-between gap-2.5 min-w-full items-center"
|
|
24
|
+
),
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2.5 h-full", children: [
|
|
27
|
+
s && /* @__PURE__ */ e("span", { className: l(m), children: s }),
|
|
28
|
+
i && /* @__PURE__ */ e("span", { className: "text-text-neutral-secondary", children: i })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2.5", children: [
|
|
31
|
+
r,
|
|
32
|
+
n && /* @__PURE__ */ e("span", { className: l(m), children: n })
|
|
33
|
+
] })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
};
|
|
3
40
|
export {
|
|
4
|
-
|
|
41
|
+
u as NumberCell
|
|
5
42
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { TableCell } from './table-cell';
|
|
2
|
-
export {
|
|
2
|
+
export { NumberCell, BooleanCell, AvatarCell, DescriptionCell, LabelCell, LinkCell } from './cell';
|
|
3
3
|
export { TableHeader } from './table-header';
|
|
4
4
|
export { TableRow } from './table-row';
|
|
5
5
|
export { TableEmptyState } from './table-empty-state';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CellValue, CellType, CellRenderer, TableProps } from '../table.type';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
interface TableCellProps {
|
|
4
|
-
value: CellValue
|
|
4
|
+
value: CellValue | Record<string, unknown>;
|
|
5
5
|
cellType: CellType;
|
|
6
6
|
cellRenderer?: CellRenderer;
|
|
7
7
|
customCells?: Record<string, CellRenderer>;
|