@rafal.lemieszewski/tide-ui 0.87.7 → 0.87.9
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/cjs/components/fundamental/alert-dialog.cjs +1 -1
- package/dist/cjs/components/fundamental/alert.cjs +1 -1
- package/dist/cjs/components/fundamental/avatar.cjs +1 -1
- package/dist/cjs/components/fundamental/badge.cjs +1 -1
- package/dist/cjs/components/fundamental/breadcrumb.cjs +1 -1
- package/dist/cjs/components/fundamental/button-group.cjs +1 -1
- package/dist/cjs/components/fundamental/button.cjs +1 -1
- package/dist/cjs/components/fundamental/calendar.cjs +1 -1
- package/dist/cjs/components/fundamental/card.cjs +1 -1
- package/dist/cjs/components/fundamental/chart.cjs +1 -1
- package/dist/cjs/components/fundamental/checkbox.cjs +1 -1
- package/dist/cjs/components/fundamental/command.cjs +1 -1
- package/dist/cjs/components/fundamental/dialog.cjs +1 -1
- package/dist/cjs/components/fundamental/drawer.cjs +1 -1
- package/dist/cjs/components/fundamental/dropdown-menu.cjs +1 -1
- package/dist/cjs/components/fundamental/file-upload.cjs +1 -1
- package/dist/cjs/components/fundamental/hover-card.cjs +1 -1
- package/dist/cjs/components/fundamental/input-group.cjs +1 -1
- package/dist/cjs/components/fundamental/input.cjs +1 -1
- package/dist/cjs/components/fundamental/kbd.cjs +1 -1
- package/dist/cjs/components/fundamental/month-picker.cjs +1 -1
- package/dist/cjs/components/fundamental/popover.cjs +1 -1
- package/dist/cjs/components/fundamental/resizable.cjs +1 -1
- package/dist/cjs/components/fundamental/select.cjs +1 -1
- package/dist/cjs/components/fundamental/sheet.cjs +1 -1
- package/dist/cjs/components/fundamental/sidebar.cjs +1 -1
- package/dist/cjs/components/fundamental/skeleton.cjs +1 -1
- package/dist/cjs/components/fundamental/slider.cjs +1 -1
- package/dist/cjs/components/fundamental/spinner.cjs +1 -1
- package/dist/cjs/components/fundamental/switch.cjs +1 -1
- package/dist/cjs/components/fundamental/tabs.cjs +1 -1
- package/dist/cjs/components/fundamental/tag.cjs +3 -3
- package/dist/cjs/components/fundamental/textarea.cjs +1 -1
- package/dist/cjs/components/fundamental/toast.cjs +1 -1
- package/dist/cjs/components/fundamental/toggle.cjs +1 -1
- package/dist/cjs/components/fundamental/tooltip.cjs +1 -1
- package/dist/cjs/components/fundamental/tree.cjs +1 -1
- package/dist/cjs/components/product/activity-log.cjs +1 -1
- package/dist/cjs/components/product/app-frame.cjs +1 -1
- package/dist/cjs/components/product/attributes-list.cjs +1 -1
- package/dist/cjs/components/product/bookmarks.cjs +1 -1
- package/dist/cjs/components/product/data-table-settings-menu.cjs +1 -1
- package/dist/cjs/components/product/data-table.cjs +1 -1
- package/dist/cjs/components/product/filters.cjs +1 -1
- package/dist/cjs/components/product/linked-chart.cjs +1 -1
- package/dist/es/components/fundamental/alert-dialog.js +10 -10
- package/dist/es/components/fundamental/alert.js +1 -1
- package/dist/es/components/fundamental/avatar.js +23 -23
- package/dist/es/components/fundamental/badge.js +1 -1
- package/dist/es/components/fundamental/breadcrumb.js +23 -23
- package/dist/es/components/fundamental/button-group.js +14 -14
- package/dist/es/components/fundamental/button.js +28 -28
- package/dist/es/components/fundamental/calendar.js +20 -20
- package/dist/es/components/fundamental/card.js +26 -26
- package/dist/es/components/fundamental/chart.js +1 -1
- package/dist/es/components/fundamental/checkbox.js +3 -3
- package/dist/es/components/fundamental/command.js +36 -36
- package/dist/es/components/fundamental/dialog.js +7 -7
- package/dist/es/components/fundamental/drawer.js +1 -1
- package/dist/es/components/fundamental/dropdown-menu.js +111 -111
- package/dist/es/components/fundamental/file-upload.js +2 -2
- package/dist/es/components/fundamental/hover-card.js +6 -6
- package/dist/es/components/fundamental/input-group.js +2 -2
- package/dist/es/components/fundamental/input.js +1 -1
- package/dist/es/components/fundamental/kbd.js +5 -5
- package/dist/es/components/fundamental/month-picker.js +21 -21
- package/dist/es/components/fundamental/popover.js +7 -7
- package/dist/es/components/fundamental/resizable.js +1 -1
- package/dist/es/components/fundamental/select.js +21 -21
- package/dist/es/components/fundamental/sheet.js +40 -40
- package/dist/es/components/fundamental/sidebar.js +45 -45
- package/dist/es/components/fundamental/skeleton.js +19 -19
- package/dist/es/components/fundamental/slider.js +1 -1
- package/dist/es/components/fundamental/spinner.js +11 -11
- package/dist/es/components/fundamental/switch.js +7 -7
- package/dist/es/components/fundamental/tabs.js +30 -30
- package/dist/es/components/fundamental/tag.js +28 -28
- package/dist/es/components/fundamental/textarea.js +9 -9
- package/dist/es/components/fundamental/toast.js +11 -11
- package/dist/es/components/fundamental/toggle.js +7 -7
- package/dist/es/components/fundamental/tooltip.js +4 -4
- package/dist/es/components/fundamental/tree.js +17 -17
- package/dist/es/components/product/activity-log.js +41 -41
- package/dist/es/components/product/app-frame.js +3 -3
- package/dist/es/components/product/attributes-list.js +68 -68
- package/dist/es/components/product/bookmarks.js +148 -148
- package/dist/es/components/product/data-table-settings-menu.js +45 -45
- package/dist/es/components/product/data-table.js +822 -816
- package/dist/es/components/product/filters.js +5 -5
- package/dist/es/components/product/linked-chart.js +24 -24
- package/dist/es/style.css +1 -1
- package/dist/types/components/product/data-table.d.cts +3 -1
- package/dist/types/components/product/data-table.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as i, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as s from "@radix-ui/react-tabs";
|
|
4
4
|
import { cva as v } from "class-variance-authority";
|
|
5
5
|
import { cn as l } from "../../lib/utils.js";
|
|
6
6
|
const m = v(
|
|
@@ -8,7 +8,7 @@ const m = v(
|
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
pilled: "bg-[var(--color-surface-deepest)] p-[4px] rounded-m gap-[var(--space-2xs)]",
|
|
11
|
+
pilled: "bg-[var(--color-surface-deepest)] p-[4px] rounded-[var(--border-radius-m)] gap-[var(--space-2xs)]",
|
|
12
12
|
line: "border-b border-[var(--grey-100)] gap-[var(--space-s)] p-0"
|
|
13
13
|
},
|
|
14
14
|
size: {
|
|
@@ -44,7 +44,7 @@ const m = v(
|
|
|
44
44
|
fullWidth: !1
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
),
|
|
47
|
+
), f = v(
|
|
48
48
|
[
|
|
49
49
|
"inline-flex items-center justify-center whitespace-nowrap cursor-pointer gap-[var(--space-s)]",
|
|
50
50
|
"transition-all ring-offset-[var(--color-surface-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-border-focus)] focus-visible:ring-offset-2",
|
|
@@ -54,8 +54,8 @@ const m = v(
|
|
|
54
54
|
variants: {
|
|
55
55
|
variant: {
|
|
56
56
|
pilled: [
|
|
57
|
-
"rounded-s bg-transparent",
|
|
58
|
-
"data-[state=active]:bg-[var(--color-surface-primary)] data-[state=active]:text-[var(--color-text-brand-bold-selected)] data-[state=active]:[&_svg]:text-[var(--color-text-brand-bold-selected)] data-[state=active]:shadow-
|
|
57
|
+
"rounded-[var(--border-radius-s)] bg-transparent",
|
|
58
|
+
"data-[state=active]:bg-[var(--color-surface-primary)] data-[state=active]:text-[var(--color-text-brand-bold-selected)] data-[state=active]:[&_svg]:text-[var(--color-text-brand-bold-selected)] data-[state=active]:shadow-[var(--shadow-100)]",
|
|
59
59
|
"hover:bg-[var(--grey-alpha-50)] hover:text-[var(--color-text-primary)]",
|
|
60
60
|
"disabled:opacity-50"
|
|
61
61
|
],
|
|
@@ -101,41 +101,41 @@ const m = v(
|
|
|
101
101
|
fullWidth: !1
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
),
|
|
105
|
-
|
|
104
|
+
), x = /* @__PURE__ */ o.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ i(
|
|
105
|
+
s.Root,
|
|
106
106
|
{
|
|
107
|
-
ref:
|
|
107
|
+
ref: r,
|
|
108
108
|
className: l("flex flex-col gap-[var(--space-s)]", a),
|
|
109
109
|
...e
|
|
110
110
|
}
|
|
111
111
|
));
|
|
112
|
-
|
|
113
|
-
const u = /* @__PURE__ */ o.forwardRef(({ className: a, variant: e, size:
|
|
114
|
-
|
|
112
|
+
x.displayName = s.Root.displayName;
|
|
113
|
+
const u = /* @__PURE__ */ o.forwardRef(({ className: a, variant: e, size: r, fullWidth: t, ...d }, c) => /* @__PURE__ */ i(
|
|
114
|
+
s.List,
|
|
115
115
|
{
|
|
116
|
-
ref:
|
|
117
|
-
className: l(m({ variant: e, size:
|
|
118
|
-
...
|
|
116
|
+
ref: c,
|
|
117
|
+
className: l(m({ variant: e, size: r, fullWidth: t }), a),
|
|
118
|
+
...d
|
|
119
119
|
}
|
|
120
120
|
));
|
|
121
|
-
u.displayName =
|
|
122
|
-
const g = /* @__PURE__ */ o.forwardRef(({ className: a, variant: e, size:
|
|
123
|
-
|
|
121
|
+
u.displayName = s.List.displayName;
|
|
122
|
+
const g = /* @__PURE__ */ o.forwardRef(({ className: a, variant: e, size: r, fullWidth: t, icon: d, children: c, ...n }, p) => /* @__PURE__ */ b(
|
|
123
|
+
s.Trigger,
|
|
124
124
|
{
|
|
125
125
|
ref: p,
|
|
126
|
-
className: l(
|
|
126
|
+
className: l(f({ variant: e, size: r, fullWidth: t }), a),
|
|
127
127
|
...n,
|
|
128
128
|
children: [
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
d && /* @__PURE__ */ i("span", { className: "shrink-0", children: d }),
|
|
130
|
+
c
|
|
131
131
|
]
|
|
132
132
|
}
|
|
133
133
|
));
|
|
134
|
-
g.displayName =
|
|
135
|
-
const y = /* @__PURE__ */ o.forwardRef(({ className: a, ...e },
|
|
136
|
-
|
|
134
|
+
g.displayName = s.Trigger.displayName;
|
|
135
|
+
const y = /* @__PURE__ */ o.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ i(
|
|
136
|
+
s.Content,
|
|
137
137
|
{
|
|
138
|
-
ref:
|
|
138
|
+
ref: r,
|
|
139
139
|
className: l(
|
|
140
140
|
"mt-[var(--space-s)] ring-offset-[var(--color-surface-primary)] focus-visible:ring-2 focus-visible:ring-[var(--color-border-focus)] focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
141
141
|
a
|
|
@@ -143,28 +143,28 @@ const y = /* @__PURE__ */ o.forwardRef(({ className: a, ...e }, s) => /* @__PURE
|
|
|
143
143
|
...e
|
|
144
144
|
}
|
|
145
145
|
));
|
|
146
|
-
y.displayName =
|
|
146
|
+
y.displayName = s.Content.displayName;
|
|
147
147
|
const h = /* @__PURE__ */ o.forwardRef(
|
|
148
|
-
({ className: a, children: e, ...
|
|
148
|
+
({ className: a, children: e, ...r }, t) => /* @__PURE__ */ i(
|
|
149
149
|
"div",
|
|
150
150
|
{
|
|
151
|
-
ref:
|
|
151
|
+
ref: t,
|
|
152
152
|
className: l(
|
|
153
153
|
"text-caption-sm mb-[var(--space-s)] font-medium text-[var(--color-text-tertiary)]",
|
|
154
154
|
a
|
|
155
155
|
),
|
|
156
|
-
...
|
|
156
|
+
...r,
|
|
157
157
|
children: e
|
|
158
158
|
}
|
|
159
159
|
)
|
|
160
160
|
);
|
|
161
161
|
h.displayName = "TabsGroupLabel";
|
|
162
162
|
export {
|
|
163
|
-
|
|
163
|
+
x as Tabs,
|
|
164
164
|
y as TabsContent,
|
|
165
165
|
h as TabsGroupLabel,
|
|
166
166
|
u as TabsList,
|
|
167
167
|
g as TabsTrigger,
|
|
168
168
|
m as tabsListVariants,
|
|
169
|
-
|
|
169
|
+
f as tabsTriggerVariants
|
|
170
170
|
};
|
|
@@ -17,8 +17,8 @@ const E = {
|
|
|
17
17
|
success: "green",
|
|
18
18
|
warning: "orange",
|
|
19
19
|
destructive: "red"
|
|
20
|
-
}, Q = ({ width: n, interactive: s = !1, className:
|
|
21
|
-
const e = n - 0.5,
|
|
20
|
+
}, Q = ({ width: n, interactive: s = !1, className: l }) => {
|
|
21
|
+
const e = n - 0.5, a = `
|
|
22
22
|
M 11.8333 0.5
|
|
23
23
|
L ${e - 4} 0.5
|
|
24
24
|
Q ${e} 0.5 ${e} ${0.5 + 4}
|
|
@@ -40,12 +40,12 @@ const E = {
|
|
|
40
40
|
viewBox: `0 0 ${n} 24`,
|
|
41
41
|
fill: "none",
|
|
42
42
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
-
className: i("absolute inset-0 pointer-events-none overflow-visible",
|
|
43
|
+
className: i("absolute inset-0 pointer-events-none overflow-visible", l),
|
|
44
44
|
preserveAspectRatio: "none",
|
|
45
45
|
children: /* @__PURE__ */ t(
|
|
46
46
|
"path",
|
|
47
47
|
{
|
|
48
|
-
d:
|
|
48
|
+
d: a,
|
|
49
49
|
stroke: "var(--grey-100)",
|
|
50
50
|
className: i(
|
|
51
51
|
"fill-[var(--neutral-white)] transition-[fill]",
|
|
@@ -55,8 +55,8 @@ const E = {
|
|
|
55
55
|
)
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
|
-
}, _ = ({ width: n, interactive: s = !1, className:
|
|
59
|
-
const e = n - 0.5,
|
|
58
|
+
}, _ = ({ width: n, interactive: s = !1, className: l }) => {
|
|
59
|
+
const e = n - 0.5, a = `
|
|
60
60
|
M 11.1 0.5
|
|
61
61
|
L ${e - 4} 0.5
|
|
62
62
|
Q ${e} 0.5 ${e} ${0.5 + 4}
|
|
@@ -78,12 +78,12 @@ const E = {
|
|
|
78
78
|
viewBox: `0 0 ${n} 20`,
|
|
79
79
|
fill: "none",
|
|
80
80
|
xmlns: "http://www.w3.org/2000/svg",
|
|
81
|
-
className: i("absolute inset-0 pointer-events-none overflow-visible",
|
|
81
|
+
className: i("absolute inset-0 pointer-events-none overflow-visible", l),
|
|
82
82
|
preserveAspectRatio: "none",
|
|
83
83
|
children: /* @__PURE__ */ t(
|
|
84
84
|
"path",
|
|
85
85
|
{
|
|
86
|
-
d:
|
|
86
|
+
d: a,
|
|
87
87
|
stroke: "var(--grey-100)",
|
|
88
88
|
className: i(
|
|
89
89
|
"fill-[var(--neutral-white)] transition-[fill]",
|
|
@@ -112,24 +112,24 @@ const E = {
|
|
|
112
112
|
closeMargin: "ml-1",
|
|
113
113
|
paddingX: "px-[var(--space-s)]"
|
|
114
114
|
}
|
|
115
|
-
},
|
|
115
|
+
}, w = /* @__PURE__ */ p.forwardRef(
|
|
116
116
|
({
|
|
117
117
|
className: n,
|
|
118
118
|
size: s = "m",
|
|
119
|
-
variant:
|
|
119
|
+
variant: l = "triangular",
|
|
120
120
|
children: g,
|
|
121
121
|
intent: h,
|
|
122
122
|
color: e,
|
|
123
|
-
showDot:
|
|
123
|
+
showDot: a,
|
|
124
124
|
closable: f = !1,
|
|
125
125
|
onClose: x,
|
|
126
126
|
disabled: c = !1,
|
|
127
|
-
onClick:
|
|
127
|
+
onClick: b,
|
|
128
128
|
interactive: r = !1,
|
|
129
129
|
style: $,
|
|
130
130
|
...S
|
|
131
131
|
}, m) => {
|
|
132
|
-
const [y, N] = p.useState(0), v = p.useRef(null), o = j[s], u =
|
|
132
|
+
const [y, N] = p.useState(0), v = p.useRef(null), o = j[s], u = l === "triangular";
|
|
133
133
|
p.useEffect(() => {
|
|
134
134
|
if (u && v.current) {
|
|
135
135
|
const d = new ResizeObserver((B) => {
|
|
@@ -144,10 +144,10 @@ const E = {
|
|
|
144
144
|
const z = (d) => {
|
|
145
145
|
d.stopPropagation(), c || x?.();
|
|
146
146
|
}, L = () => {
|
|
147
|
-
!c && r &&
|
|
147
|
+
!c && r && b && b();
|
|
148
148
|
}, M = (d) => {
|
|
149
149
|
r && (d.key === "Enter" || d.key === " ") && (d.preventDefault(), L());
|
|
150
|
-
}, k = e || (h ? I[h] : void 0), R = k ? E[k] : void 0, O =
|
|
150
|
+
}, k = e || (h ? I[h] : void 0), R = k ? E[k] : void 0, O = a ?? k !== void 0, A = s === "s" ? _ : Q;
|
|
151
151
|
return /* @__PURE__ */ C(
|
|
152
152
|
"div",
|
|
153
153
|
{
|
|
@@ -185,7 +185,7 @@ const E = {
|
|
|
185
185
|
u && "pl-[12px]",
|
|
186
186
|
// notch width clearance
|
|
187
187
|
!u && [
|
|
188
|
-
"border border-[var(--grey-100)] rounded-m",
|
|
188
|
+
"border border-[var(--grey-100)] rounded-[var(--border-radius-m)]",
|
|
189
189
|
"bg-[var(--neutral-white)]",
|
|
190
190
|
r && "group-hover:bg-[var(--grey-25)]",
|
|
191
191
|
"transition-[background-color]"
|
|
@@ -210,7 +210,7 @@ const E = {
|
|
|
210
210
|
{
|
|
211
211
|
type: "button",
|
|
212
212
|
className: i(
|
|
213
|
-
"inline-flex items-center justify-center shrink-0 hover:bg-[var(--grey-alpha-50)] rounded-xs transition-colors",
|
|
213
|
+
"inline-flex items-center justify-center shrink-0 hover:bg-[var(--grey-alpha-50)] rounded-[var(--border-radius-xs)] transition-colors",
|
|
214
214
|
o.closeMargin,
|
|
215
215
|
o.closeSize
|
|
216
216
|
),
|
|
@@ -235,20 +235,20 @@ const E = {
|
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
);
|
|
238
|
-
|
|
238
|
+
w.displayName = "Tag";
|
|
239
239
|
const G = /* @__PURE__ */ p.forwardRef(
|
|
240
240
|
({
|
|
241
241
|
className: n,
|
|
242
242
|
tags: s,
|
|
243
|
-
onTagRemove:
|
|
243
|
+
onTagRemove: l,
|
|
244
244
|
onTagClick: g,
|
|
245
245
|
closable: h = !1,
|
|
246
246
|
interactive: e = !1,
|
|
247
|
-
size:
|
|
247
|
+
size: a = "m",
|
|
248
248
|
variant: f,
|
|
249
249
|
intent: x,
|
|
250
250
|
color: c,
|
|
251
|
-
showDot:
|
|
251
|
+
showDot: b,
|
|
252
252
|
maxVisible: r,
|
|
253
253
|
...$
|
|
254
254
|
}, S) => {
|
|
@@ -261,28 +261,28 @@ const G = /* @__PURE__ */ p.forwardRef(
|
|
|
261
261
|
...$,
|
|
262
262
|
children: [
|
|
263
263
|
N.map((o) => /* @__PURE__ */ t(
|
|
264
|
-
|
|
264
|
+
w,
|
|
265
265
|
{
|
|
266
266
|
intent: o.intent || x,
|
|
267
267
|
color: o.color || c,
|
|
268
|
-
size:
|
|
268
|
+
size: a,
|
|
269
269
|
variant: f,
|
|
270
270
|
closable: h,
|
|
271
271
|
interactive: e,
|
|
272
272
|
disabled: o.disabled,
|
|
273
|
-
showDot:
|
|
274
|
-
onClose:
|
|
273
|
+
showDot: b,
|
|
274
|
+
onClose: l ? () => l(o.id) : void 0,
|
|
275
275
|
onClick: g ? () => g(o.id) : void 0,
|
|
276
276
|
children: o.label
|
|
277
277
|
},
|
|
278
278
|
o.id
|
|
279
279
|
)),
|
|
280
|
-
v > 0 && /* @__PURE__ */ C(
|
|
280
|
+
v > 0 && /* @__PURE__ */ C(w, { size: a, variant: f, interactive: !0, onClick: () => y(!0), children: [
|
|
281
281
|
"+",
|
|
282
282
|
v,
|
|
283
283
|
" more"
|
|
284
284
|
] }),
|
|
285
|
-
m && r && /* @__PURE__ */ t(
|
|
285
|
+
m && r && /* @__PURE__ */ t(w, { size: a, variant: f, interactive: !0, onClick: () => y(!1), children: "Show less" })
|
|
286
286
|
]
|
|
287
287
|
}
|
|
288
288
|
);
|
|
@@ -290,6 +290,6 @@ const G = /* @__PURE__ */ p.forwardRef(
|
|
|
290
290
|
);
|
|
291
291
|
G.displayName = "TagGroup";
|
|
292
292
|
export {
|
|
293
|
-
|
|
293
|
+
w as Tag,
|
|
294
294
|
G as TagGroup
|
|
295
295
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { cva as
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
6
|
-
"flex min-h-[80px] w-full rounded-m border transition-colors placeholder:text-[var(--color-text-tertiary)] focus-visible:outline-none focus-visible:shadow-[0px_0px_0px_2px_rgba(0,95,133,0.2),0px_3px_4px_0px_rgba(0,14,20,0.03)] disabled:cursor-not-allowed disabled:opacity-50 resize-y",
|
|
3
|
+
import { cva as d } from "class-variance-authority";
|
|
4
|
+
import { cn as c } from "../../lib/utils.js";
|
|
5
|
+
const l = d(
|
|
6
|
+
"flex min-h-[80px] w-full rounded-[var(--border-radius-m)] border transition-colors placeholder:text-[var(--color-text-tertiary)] focus-visible:outline-none focus-visible:shadow-[0px_0px_0px_2px_rgba(0,95,133,0.2),0px_3px_4px_0px_rgba(0,14,20,0.03)] disabled:cursor-not-allowed disabled:opacity-50 resize-y",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
@@ -30,18 +30,18 @@ const p = c(
|
|
|
30
30
|
size: "m"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
),
|
|
33
|
+
), p = /* @__PURE__ */ s.forwardRef(
|
|
34
34
|
({ className: r, variant: e, size: o, ...a }, t) => /* @__PURE__ */ i(
|
|
35
35
|
"textarea",
|
|
36
36
|
{
|
|
37
|
-
className: l(
|
|
37
|
+
className: c(l({ variant: e, size: o }), r),
|
|
38
38
|
ref: t,
|
|
39
39
|
...a
|
|
40
40
|
}
|
|
41
41
|
)
|
|
42
42
|
);
|
|
43
|
-
|
|
43
|
+
p.displayName = "Textarea";
|
|
44
44
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
p as Textarea,
|
|
46
|
+
l as textareaVariants
|
|
47
47
|
};
|
|
@@ -2,9 +2,9 @@ import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { Toaster as s } from "sonner";
|
|
3
3
|
import { toast as C } from "sonner";
|
|
4
4
|
import { cn as r } from "../../lib/utils.js";
|
|
5
|
-
import { Spinner as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { CircleAlert as d, TriangleAlert as
|
|
5
|
+
import { Spinner as i } from "./spinner.js";
|
|
6
|
+
import { Icon as n } from "./icon.js";
|
|
7
|
+
import { CircleAlert as d, TriangleAlert as v, CircleCheck as m } from "lucide-react";
|
|
8
8
|
const a = ({ name: e, color: t, blurColor: c }) => /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
9
9
|
c && /* @__PURE__ */ o(
|
|
10
10
|
"div",
|
|
@@ -16,15 +16,15 @@ const a = ({ name: e, color: t, blurColor: c }) => /* @__PURE__ */ l("div", { cl
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
),
|
|
19
|
-
/* @__PURE__ */ o(
|
|
19
|
+
/* @__PURE__ */ o(n, { name: e, size: "m", className: t })
|
|
20
20
|
] }), h = ({ className: e, ...t }) => /* @__PURE__ */ o(
|
|
21
21
|
s,
|
|
22
22
|
{
|
|
23
23
|
className: r("toaster group", e),
|
|
24
24
|
icons: {
|
|
25
|
-
loading: /* @__PURE__ */ o(
|
|
26
|
-
success: /* @__PURE__ */ o(a, { name:
|
|
27
|
-
error: /* @__PURE__ */ o(a, { name:
|
|
25
|
+
loading: /* @__PURE__ */ o(i, { size: "m", variant: "primary", className: "mt-1" }),
|
|
26
|
+
success: /* @__PURE__ */ o(a, { name: m, color: "text-[var(--color-icon-success-bold)]", blurColor: "#1C741F" }),
|
|
27
|
+
error: /* @__PURE__ */ o(a, { name: v, color: "text-[var(--color-icon-error-bold)]", blurColor: "#D9493E" }),
|
|
28
28
|
warning: /* @__PURE__ */ o(a, { name: d, color: "text-[var(--color-icon-warning-bold)]", blurColor: "#E57F19" }),
|
|
29
29
|
info: null
|
|
30
30
|
},
|
|
@@ -37,9 +37,9 @@ const a = ({ name: e, color: t, blurColor: c }) => /* @__PURE__ */ l("div", { cl
|
|
|
37
37
|
// Background & borders
|
|
38
38
|
"bg-[var(--color-surface-primary)]",
|
|
39
39
|
"!border !border-[var(--color-border-primary-medium)] !border-solid",
|
|
40
|
-
"rounded-m",
|
|
40
|
+
"rounded-[var(--border-radius-m)]",
|
|
41
41
|
// Shadow
|
|
42
|
-
"shadow-
|
|
42
|
+
"shadow-[var(--shadow-400)]",
|
|
43
43
|
// Contain blur effect
|
|
44
44
|
"overflow-hidden",
|
|
45
45
|
// Flex layout
|
|
@@ -53,7 +53,7 @@ const a = ({ name: e, color: t, blurColor: c }) => /* @__PURE__ */ l("div", { cl
|
|
|
53
53
|
actionButton: r(
|
|
54
54
|
// Base button styling
|
|
55
55
|
"h-[var(--size-m)] px-[var(--space-m)]",
|
|
56
|
-
"rounded-s",
|
|
56
|
+
"rounded-[var(--border-radius-s)]",
|
|
57
57
|
"text-label-md",
|
|
58
58
|
// Primary action colors
|
|
59
59
|
"bg-[var(--color-background-blue-bold)]",
|
|
@@ -66,7 +66,7 @@ const a = ({ name: e, color: t, blurColor: c }) => /* @__PURE__ */ l("div", { cl
|
|
|
66
66
|
cancelButton: r(
|
|
67
67
|
// Base button styling
|
|
68
68
|
"h-[var(--size-m)] px-[var(--space-m)]",
|
|
69
|
-
"rounded-s",
|
|
69
|
+
"rounded-[var(--border-radius-s)]",
|
|
70
70
|
"text-label-md",
|
|
71
71
|
// Secondary action colors
|
|
72
72
|
"bg-[var(--color-background-neutral-subtlest)]",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as d from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-toggle";
|
|
4
|
-
import { cva as
|
|
4
|
+
import { cva as c } from "class-variance-authority";
|
|
5
5
|
import { cn as n } from "../../lib/utils.js";
|
|
6
|
-
const b =
|
|
6
|
+
const b = c(
|
|
7
7
|
"inline-flex items-center justify-center font-medium ring-offset-[var(--color-surface-primary)] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:transition-colors gap-[var(--space-s)] cursor-pointer",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
@@ -26,9 +26,9 @@ const b = d(
|
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
28
|
size: {
|
|
29
|
-
s: "text-label-sm rounded-s px-[var(--space-s)] py-[var(--space-xs)]",
|
|
30
|
-
m: "text-label-md rounded-m px-[var(--space-m)] py-[var(--dimension-150)]",
|
|
31
|
-
l: "text-label-md rounded-m px-[var(--space-l)] py-[var(--space-m)]"
|
|
29
|
+
s: "text-label-sm rounded-[var(--border-radius-s)] px-[var(--space-s)] py-[var(--space-xs)]",
|
|
30
|
+
m: "text-label-md rounded-[var(--border-radius-m)] px-[var(--space-m)] py-[var(--dimension-150)]",
|
|
31
|
+
l: "text-label-md rounded-[var(--border-radius-m)] px-[var(--space-l)] py-[var(--space-m)]"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
defaultVariants: {
|
|
@@ -36,7 +36,7 @@ const b = d(
|
|
|
36
36
|
size: "s"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
), i = /* @__PURE__ */
|
|
39
|
+
), i = /* @__PURE__ */ d.forwardRef(({ className: r, variant: a, size: t, ...o }, s) => /* @__PURE__ */ l(
|
|
40
40
|
e.Root,
|
|
41
41
|
{
|
|
42
42
|
ref: s,
|
|
@@ -5,16 +5,16 @@ import { cn as s } from "../../lib/utils.js";
|
|
|
5
5
|
const p = ({
|
|
6
6
|
delayDuration: t = 400,
|
|
7
7
|
...e
|
|
8
|
-
}) => /* @__PURE__ */ a(o.Provider, { delayDuration: t, ...e }), c = o.Root, f = o.Trigger, m = /* @__PURE__ */ d.forwardRef(({ className: t, sideOffset: e = 4, ...
|
|
8
|
+
}) => /* @__PURE__ */ a(o.Provider, { delayDuration: t, ...e }), c = o.Root, f = o.Trigger, m = /* @__PURE__ */ d.forwardRef(({ className: t, sideOffset: e = 4, ...r }, i) => /* @__PURE__ */ a(
|
|
9
9
|
o.Content,
|
|
10
10
|
{
|
|
11
|
-
ref:
|
|
11
|
+
ref: i,
|
|
12
12
|
sideOffset: e,
|
|
13
13
|
className: s(
|
|
14
|
-
"[&]:text-body-sm animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-w-[320px] overflow-hidden rounded-m bg-[var(--color-background-inverse)] px-[var(--space-m)] py-[var(--space-s)] text-[var(--color-text-inverse)] shadow-
|
|
14
|
+
"[&]:text-body-sm animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-w-[320px] overflow-hidden rounded-[var(--border-radius-m)] bg-[var(--color-background-inverse)] px-[var(--space-m)] py-[var(--space-s)] text-[var(--color-text-inverse)] shadow-[var(--shadow-400)]",
|
|
15
15
|
t
|
|
16
16
|
),
|
|
17
|
-
...
|
|
17
|
+
...r
|
|
18
18
|
}
|
|
19
19
|
));
|
|
20
20
|
m.displayName = o.Content.displayName;
|
|
@@ -9,15 +9,15 @@ const T = n.createContext(null), R = () => {
|
|
|
9
9
|
throw new Error("useTree must be used within a TreeProvider");
|
|
10
10
|
return e;
|
|
11
11
|
}, k = /* @__PURE__ */ n.forwardRef(
|
|
12
|
-
({ item: e, level:
|
|
12
|
+
({ item: e, level: d }, c) => {
|
|
13
13
|
const {
|
|
14
|
-
selectedItemId:
|
|
14
|
+
selectedItemId: l,
|
|
15
15
|
expandedItems: t,
|
|
16
16
|
handleExpand: h,
|
|
17
17
|
handleSelect: I,
|
|
18
18
|
defaultNodeIcon: b,
|
|
19
19
|
defaultLeafIcon: p
|
|
20
|
-
} = R(), a = t.has(e.id), f =
|
|
20
|
+
} = R(), a = t.has(e.id), f = l === e.id, o = e.children && e.children.length > 0, i = f && !o, v = n.useMemo(() => e.disabled ? p || g : f && e.selectedIcon ? e.selectedIcon : o ? a && e.openIcon ? e.openIcon : e.icon || b || S : e.icon || p || g, [
|
|
21
21
|
e.disabled,
|
|
22
22
|
e.selectedIcon,
|
|
23
23
|
e.openIcon,
|
|
@@ -37,12 +37,12 @@ const T = n.createContext(null), R = () => {
|
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
39
|
className: u(
|
|
40
|
-
"flex items-center gap-1 rounded-s py-1 pr-1 cursor-pointer transition-colors",
|
|
40
|
+
"flex items-center gap-1 rounded-[var(--border-radius-s)] py-1 pr-1 cursor-pointer transition-colors",
|
|
41
41
|
"hover:bg-[var(--color-background-neutral-subtlest-hovered)]",
|
|
42
42
|
i && "bg-[var(--color-background-blue-subtle-selected)] hover:bg-[var(--color-background-blue-subtle-selected-hovered)]",
|
|
43
43
|
e.disabled && "opacity-50 cursor-not-allowed"
|
|
44
44
|
),
|
|
45
|
-
style: { paddingLeft: `${
|
|
45
|
+
style: { paddingLeft: `${d * 16 + 8}px` },
|
|
46
46
|
onClick: y,
|
|
47
47
|
children: [
|
|
48
48
|
o ? /* @__PURE__ */ s(
|
|
@@ -85,7 +85,7 @@ const T = n.createContext(null), R = () => {
|
|
|
85
85
|
]
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
|
-
o && a && /* @__PURE__ */ s("div", { children: e.children?.map((r) => /* @__PURE__ */ s(k, { item: r, level:
|
|
88
|
+
o && a && /* @__PURE__ */ s("div", { children: e.children?.map((r) => /* @__PURE__ */ s(k, { item: r, level: d + 1 }, r.id)) })
|
|
89
89
|
] });
|
|
90
90
|
}
|
|
91
91
|
);
|
|
@@ -93,22 +93,22 @@ k.displayName = "TreeItem";
|
|
|
93
93
|
const L = /* @__PURE__ */ n.forwardRef(
|
|
94
94
|
({
|
|
95
95
|
data: e,
|
|
96
|
-
initialSelectedItemId:
|
|
96
|
+
initialSelectedItemId: d,
|
|
97
97
|
onSelectChange: c,
|
|
98
|
-
expandAll:
|
|
98
|
+
expandAll: l = !1,
|
|
99
99
|
defaultNodeIcon: t = S,
|
|
100
100
|
defaultLeafIcon: h = g,
|
|
101
101
|
className: I,
|
|
102
102
|
...b
|
|
103
103
|
}, p) => {
|
|
104
104
|
const [a, f] = n.useState(
|
|
105
|
-
|
|
105
|
+
d
|
|
106
106
|
), [o, m] = n.useState(
|
|
107
|
-
new Set(
|
|
107
|
+
new Set(l ? N(Array.isArray(e) ? e : [e]) : [])
|
|
108
108
|
);
|
|
109
109
|
n.useEffect(() => {
|
|
110
|
-
|
|
111
|
-
}, [e,
|
|
110
|
+
l && m(new Set(N(Array.isArray(e) ? e : [e])));
|
|
111
|
+
}, [e, l]);
|
|
112
112
|
const i = n.useCallback((r) => {
|
|
113
113
|
m((E) => {
|
|
114
114
|
const x = new Set(E);
|
|
@@ -149,12 +149,12 @@ const L = /* @__PURE__ */ n.forwardRef(
|
|
|
149
149
|
);
|
|
150
150
|
L.displayName = "Tree";
|
|
151
151
|
function N(e) {
|
|
152
|
-
const
|
|
153
|
-
function c(
|
|
154
|
-
for (const t of
|
|
155
|
-
|
|
152
|
+
const d = [];
|
|
153
|
+
function c(l) {
|
|
154
|
+
for (const t of l)
|
|
155
|
+
d.push(t.id), t.children && c(t.children);
|
|
156
156
|
}
|
|
157
|
-
return c(e),
|
|
157
|
+
return c(e), d;
|
|
158
158
|
}
|
|
159
159
|
export {
|
|
160
160
|
L as Tree
|