@rafal.lemieszewski/tide-ui 0.85.1 → 0.86.0
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/breadcrumb.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/country-dropdown.cjs +1 -1
- package/dist/cjs/components/fundamental/custom-icons.cjs +1 -1
- package/dist/cjs/components/fundamental/dialog.cjs +1 -1
- package/dist/cjs/components/fundamental/file-upload.cjs +1 -1
- package/dist/cjs/components/fundamental/icon.cjs +1 -1
- package/dist/cjs/components/fundamental/month-picker.cjs +1 -1
- package/dist/cjs/components/fundamental/pagination.cjs +1 -1
- package/dist/cjs/components/fundamental/select.cjs +1 -1
- package/dist/cjs/components/fundamental/separator.cjs +1 -1
- package/dist/cjs/components/fundamental/sidebar.cjs +1 -1
- package/dist/cjs/components/fundamental/toast.cjs +1 -1
- package/dist/cjs/components/fundamental/tree.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/fixture-status.cjs +1 -1
- package/dist/cjs/components/product/linked-chart.cjs +1 -1
- package/dist/cjs/components/product/view-mode-menu.cjs +1 -1
- package/dist/es/components/fundamental/button.js +10 -9
- package/dist/es/components/fundamental/calendar.js +18 -17
- package/dist/es/components/fundamental/custom-icons.js +283 -517
- package/dist/es/components/fundamental/dialog.js +25 -24
- package/dist/es/components/fundamental/file-upload.js +17 -16
- package/dist/es/components/fundamental/icon.js +112 -139
- package/dist/es/components/fundamental/month-picker.js +21 -20
- package/dist/es/components/fundamental/pagination.js +44 -43
- package/dist/es/components/fundamental/select.js +40 -39
- package/dist/es/components/fundamental/separator.js +11 -10
- package/dist/es/components/fundamental/sidebar.js +85 -84
- package/dist/es/components/fundamental/toast.js +8 -7
- package/dist/es/components/product/app-frame.js +83 -82
- package/dist/es/components/product/attributes-list.js +61 -60
- package/dist/es/components/product/bookmarks.js +170 -169
- package/dist/es/components/product/data-table-settings-menu.js +38 -37
- package/dist/es/components/product/data-table.js +374 -373
- package/dist/es/components/product/filters.js +93 -92
- package/dist/es/components/product/fixture-status.js +89 -87
- package/dist/es/components/product/linked-chart.js +54 -53
- package/dist/es/components/product/view-mode-menu.js +176 -175
- package/dist/types/components/core-index.d.cts +1 -1
- package/dist/types/components/core-index.d.ts +1 -1
- package/dist/types/components/fundamental/custom-icons.d.ts +32 -36
- package/dist/types/components/fundamental/dropdown-menu.d.ts +2 -1
- package/dist/types/components/fundamental/icon.d.ts +1 -3
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/components/product/fixture-status.d.ts +2 -2
- package/dist/types/lib/index.d.cts +1 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,9 +2,10 @@ import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import * as o from "@radix-ui/react-dialog";
|
|
4
4
|
import { cn as r } from "../../lib/utils.js";
|
|
5
|
-
import { Icon as
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { Icon as m } from "./icon.js";
|
|
6
|
+
import { X as n } from "lucide-react";
|
|
7
|
+
import { Button as p } from "./button.js";
|
|
8
|
+
const C = o.Root, z = o.Trigger, f = o.Portal, R = o.Close, d = /* @__PURE__ */ i.forwardRef(({ className: a, ...e }, s) => /* @__PURE__ */ t(
|
|
8
9
|
o.Overlay,
|
|
9
10
|
{
|
|
10
11
|
ref: s,
|
|
@@ -16,7 +17,7 @@ const D = o.Root, w = o.Trigger, p = o.Portal, C = o.Close, d = /* @__PURE__ */
|
|
|
16
17
|
}
|
|
17
18
|
));
|
|
18
19
|
d.displayName = o.Overlay.displayName;
|
|
19
|
-
const
|
|
20
|
+
const x = /* @__PURE__ */ i.forwardRef(({ className: a, children: e, ...s }, c) => /* @__PURE__ */ l(f, { children: [
|
|
20
21
|
/* @__PURE__ */ t(d, {}),
|
|
21
22
|
/* @__PURE__ */ l(
|
|
22
23
|
o.Content,
|
|
@@ -31,13 +32,13 @@ const f = /* @__PURE__ */ i.forwardRef(({ className: a, children: e, ...s }, c)
|
|
|
31
32
|
children: [
|
|
32
33
|
e,
|
|
33
34
|
/* @__PURE__ */ t(o.Close, { asChild: !0, children: /* @__PURE__ */ l(
|
|
34
|
-
|
|
35
|
+
p,
|
|
35
36
|
{
|
|
36
37
|
variant: "ghost",
|
|
37
38
|
size: "s",
|
|
38
39
|
className: "absolute top-3 right-3 h-8 w-8 p-0",
|
|
39
40
|
children: [
|
|
40
|
-
/* @__PURE__ */ t(
|
|
41
|
+
/* @__PURE__ */ t(m, { name: n, size: "m" }),
|
|
41
42
|
/* @__PURE__ */ t("span", { className: "sr-only", children: "Close" })
|
|
42
43
|
]
|
|
43
44
|
}
|
|
@@ -46,8 +47,8 @@ const f = /* @__PURE__ */ i.forwardRef(({ className: a, children: e, ...s }, c)
|
|
|
46
47
|
}
|
|
47
48
|
)
|
|
48
49
|
] }));
|
|
49
|
-
|
|
50
|
-
const
|
|
50
|
+
x.displayName = o.Content.displayName;
|
|
51
|
+
const v = ({
|
|
51
52
|
className: a,
|
|
52
53
|
...e
|
|
53
54
|
}) => /* @__PURE__ */ t(
|
|
@@ -60,13 +61,13 @@ const x = ({
|
|
|
60
61
|
...e
|
|
61
62
|
}
|
|
62
63
|
);
|
|
63
|
-
|
|
64
|
-
const
|
|
64
|
+
v.displayName = "DialogHeader";
|
|
65
|
+
const y = ({
|
|
65
66
|
className: a,
|
|
66
67
|
...e
|
|
67
68
|
}) => /* @__PURE__ */ t("div", { className: r("flex-1 overflow-y-auto px-[var(--space-2xl)] py-[var(--space-2xl)]", a), ...e });
|
|
68
|
-
|
|
69
|
-
const
|
|
69
|
+
y.displayName = "DialogBody";
|
|
70
|
+
const g = ({
|
|
70
71
|
className: a,
|
|
71
72
|
...e
|
|
72
73
|
}) => /* @__PURE__ */ t(
|
|
@@ -79,8 +80,8 @@ const y = ({
|
|
|
79
80
|
...e
|
|
80
81
|
}
|
|
81
82
|
);
|
|
82
|
-
|
|
83
|
-
const
|
|
83
|
+
g.displayName = "DialogFooter";
|
|
84
|
+
const b = /* @__PURE__ */ i.forwardRef(({ className: a, ...e }, s) => /* @__PURE__ */ t(
|
|
84
85
|
o.Title,
|
|
85
86
|
{
|
|
86
87
|
ref: s,
|
|
@@ -91,16 +92,16 @@ const g = /* @__PURE__ */ i.forwardRef(({ className: a, ...e }, s) => /* @__PURE
|
|
|
91
92
|
...e
|
|
92
93
|
}
|
|
93
94
|
));
|
|
94
|
-
|
|
95
|
+
b.displayName = o.Title.displayName;
|
|
95
96
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
C as Dialog,
|
|
98
|
+
y as DialogBody,
|
|
99
|
+
R as DialogClose,
|
|
100
|
+
x as DialogContent,
|
|
101
|
+
g as DialogFooter,
|
|
102
|
+
v as DialogHeader,
|
|
102
103
|
d as DialogOverlay,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
f as DialogPortal,
|
|
105
|
+
b as DialogTitle,
|
|
106
|
+
z as DialogTrigger
|
|
106
107
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as s, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "react";
|
|
3
3
|
import { cn as v } from "../../lib/utils.js";
|
|
4
|
-
import { cva as
|
|
4
|
+
import { cva as Q } from "class-variance-authority";
|
|
5
5
|
import { Button as P } from "./button.js";
|
|
6
6
|
import { Progress as Y } from "./progress.js";
|
|
7
7
|
import { Icon as z } from "./icon.js";
|
|
8
|
-
import {
|
|
8
|
+
import { X as Z } from "lucide-react";
|
|
9
|
+
import { Badge as _ } from "./badge.js";
|
|
9
10
|
const M = n.createContext(
|
|
10
11
|
null
|
|
11
12
|
), D = () => {
|
|
@@ -54,7 +55,7 @@ const M = n.createContext(
|
|
|
54
55
|
}
|
|
55
56
|
);
|
|
56
57
|
j.displayName = "FileUploadRoot";
|
|
57
|
-
const
|
|
58
|
+
const ee = Q(
|
|
58
59
|
"relative flex flex-col items-center justify-center rounded-l border-2 border-dashed p-6 text-center transition-colors duration-200",
|
|
59
60
|
{
|
|
60
61
|
variants: {
|
|
@@ -111,11 +112,11 @@ const _ = X(
|
|
|
111
112
|
};
|
|
112
113
|
if (h.type.startsWith("image/")) {
|
|
113
114
|
const C = new FileReader();
|
|
114
|
-
C.onload = (
|
|
115
|
-
const
|
|
116
|
-
(U) => U.id === R.id ? { ...U, preview:
|
|
115
|
+
C.onload = (H) => {
|
|
116
|
+
const J = l.map(
|
|
117
|
+
(U) => U.id === R.id ? { ...U, preview: H.target?.result } : U
|
|
117
118
|
);
|
|
118
|
-
i(
|
|
119
|
+
i(J);
|
|
119
120
|
}, C.readAsDataURL(h);
|
|
120
121
|
}
|
|
121
122
|
d.push(R);
|
|
@@ -128,9 +129,9 @@ const _ = X(
|
|
|
128
129
|
if (a.preventDefault(), a.stopPropagation(), g(!1), u) return;
|
|
129
130
|
const d = a.dataTransfer.files;
|
|
130
131
|
d.length > 0 && I(d);
|
|
131
|
-
},
|
|
132
|
+
}, X = () => {
|
|
132
133
|
u || y.current?.click();
|
|
133
|
-
},
|
|
134
|
+
}, q = (a) => {
|
|
134
135
|
const d = a.target.files;
|
|
135
136
|
d && I(d), a.target.value = "";
|
|
136
137
|
};
|
|
@@ -138,11 +139,11 @@ const _ = X(
|
|
|
138
139
|
"div",
|
|
139
140
|
{
|
|
140
141
|
ref: t,
|
|
141
|
-
className: v(
|
|
142
|
+
className: v(ee({ isDragActive: w, disabled: u }), r),
|
|
142
143
|
onDragOver: S,
|
|
143
144
|
onDragLeave: G,
|
|
144
145
|
onDrop: K,
|
|
145
|
-
onClick:
|
|
146
|
+
onClick: X,
|
|
146
147
|
role: "button",
|
|
147
148
|
tabIndex: u ? -1 : 0,
|
|
148
149
|
"aria-label": "Upload files",
|
|
@@ -157,7 +158,7 @@ const _ = X(
|
|
|
157
158
|
accept: p?.join(","),
|
|
158
159
|
disabled: u,
|
|
159
160
|
className: "hidden",
|
|
160
|
-
onChange:
|
|
161
|
+
onChange: q
|
|
161
162
|
}
|
|
162
163
|
),
|
|
163
164
|
e
|
|
@@ -225,7 +226,7 @@ W.displayName = "FileUploadItemPreview";
|
|
|
225
226
|
const $ = /* @__PURE__ */ n.forwardRef(({ className: r, file: e, ...o }, t) => /* @__PURE__ */ b("div", { ref: t, className: v("flex-1 space-y-1", r), ...o, children: [
|
|
226
227
|
/* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
|
|
227
228
|
/* @__PURE__ */ s("p", { className: "text-body-sm truncate font-medium", children: e.file.name }),
|
|
228
|
-
/* @__PURE__ */ s(
|
|
229
|
+
/* @__PURE__ */ s(_, { children: e.status })
|
|
229
230
|
] }),
|
|
230
231
|
/* @__PURE__ */ s("p", { className: "text-caption-sm text-[var(--color-text-secondary)]", children: E(e.file.size) }),
|
|
231
232
|
e.error && /* @__PURE__ */ s("p", { className: "text-caption-sm text-[var(--color-text-error-bold)]", children: e.error })
|
|
@@ -253,7 +254,7 @@ const T = /* @__PURE__ */ n.forwardRef(({ file: r, ...e }, o) => {
|
|
|
253
254
|
},
|
|
254
255
|
"aria-label": `Remove ${r.file.name}`,
|
|
255
256
|
...e,
|
|
256
|
-
children: /* @__PURE__ */ s(z, { name:
|
|
257
|
+
children: /* @__PURE__ */ s(z, { name: Z, className: "h-4 w-4" })
|
|
257
258
|
}
|
|
258
259
|
);
|
|
259
260
|
});
|
|
@@ -262,7 +263,7 @@ const E = (r) => {
|
|
|
262
263
|
if (r === 0) return "0 Bytes";
|
|
263
264
|
const e = 1024, o = ["Bytes", "KB", "MB", "GB"], t = Math.floor(Math.log(r) / Math.log(e));
|
|
264
265
|
return parseFloat((r / Math.pow(e, t)).toFixed(2)) + " " + o[t];
|
|
265
|
-
},
|
|
266
|
+
}, de = {
|
|
266
267
|
Root: j,
|
|
267
268
|
Dropzone: k,
|
|
268
269
|
Trigger: L,
|
|
@@ -274,7 +275,7 @@ const E = (r) => {
|
|
|
274
275
|
ItemDelete: T
|
|
275
276
|
};
|
|
276
277
|
export {
|
|
277
|
-
|
|
278
|
+
de as FileUpload,
|
|
278
279
|
k as FileUploadDropzone,
|
|
279
280
|
B as FileUploadItem,
|
|
280
281
|
T as FileUploadItemDelete,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import { customIcons as v } from "./custom-icons.js";
|
|
7
|
-
const Vr = {
|
|
1
|
+
import { jsx as e, jsxs as v } from "react/jsx-runtime";
|
|
2
|
+
import p from "react";
|
|
3
|
+
import { cn as l } from "../../lib/utils.js";
|
|
4
|
+
import { X as x, Weight as g, Users as C, User as f, Upload as k, Truck as m, TriangleAlert as A, Trash2 as b, Trash as y, TextCursorInput as z, Table2 as S, Star as D, SquarePlus as L, Sparkles as T, Ship as P, ShieldCheck as R, Share2 as I, Share as N, Settings as U, Send as M, Search as q, Route as E, RotateCcw as W, RefreshCw as B, PlusCircle as F, Plus as H, Pencil as j, PanelRightClose as X, PanelLeft as Z, Package as _, Navigation as G, MoreHorizontal as O, MessageSquare as $, MessageCircle as J, MapPin as K, Mail as Q, LogOut as V, Loader2 as Y, ListFilter as rr, Link as er, LayoutDashboard as or, Info as ir, Handshake as tr, Grid2X2Plus as nr, Filter as ar, FileText as cr, Eye as lr, ExternalLink as sr, Ellipsis as dr, Edit as hr, Download as wr, Dot as ur, CreditCard as vr, Copy as pr, Code as xr, CircleHelp as gr, CircleDollarSign as Cr, CircleCheckBig as fr, CircleCheck as kr, CircleAlert as mr, Circle as Ar, ChevronUp as br, ChevronRight as yr, ChevronLeft as zr, ChevronDown as Sr, CheckCircle as Dr, Check as Lr, CalendarDays as Tr, Bookmark as Pr, ArrowUpToLine as Rr, ArrowUp as Ir, ArrowRightToLine as Nr, ArrowRight as Ur, ArrowLeftToLine as Mr, ArrowLeft as qr, ArrowDownZA as Er, ArrowDownWideNarrow as Wr, ArrowDownToLine as Br, ArrowDownNarrowWide as Fr, ArrowDownAZ as Hr, ArrowDown10 as jr, ArrowDown01 as Xr, ArrowDown as Zr, Archive as _r, Anchor as Gr, AlertCircle as Or } from "lucide-react";
|
|
5
|
+
const $r = {
|
|
8
6
|
primary: "text-[var(--color-icon-primary)]",
|
|
9
7
|
secondary: "text-[var(--color-icon-secondary)]",
|
|
10
8
|
tertiary: "text-[var(--color-icon-tertiary)]",
|
|
@@ -21,7 +19,7 @@ const Vr = {
|
|
|
21
19
|
"on-action": "text-[var(--color-icon-on-action)]",
|
|
22
20
|
inverse: "text-[var(--color-icon-inverse)]",
|
|
23
21
|
violet: "text-[var(--violet-500)]"
|
|
24
|
-
},
|
|
22
|
+
}, Jr = {
|
|
25
23
|
s: "w-[var(--size-3xs)] h-[var(--size-3xs)]",
|
|
26
24
|
// 12px
|
|
27
25
|
m: "w-[var(--size-2xs)] h-[var(--size-2xs)]",
|
|
@@ -30,157 +28,132 @@ const Vr = {
|
|
|
30
28
|
// 20px
|
|
31
29
|
xl: "w-[var(--size-s)] h-[var(--size-s)]"
|
|
32
30
|
// 24px
|
|
33
|
-
},
|
|
34
|
-
"alert-circle":
|
|
35
|
-
anchor:
|
|
36
|
-
archive:
|
|
37
|
-
"arrow-down":
|
|
38
|
-
"arrow-down-0-1":
|
|
39
|
-
"arrow-down-1-0":
|
|
40
|
-
"arrow-down-a-z":
|
|
41
|
-
"arrow-down-narrow-wide":
|
|
42
|
-
"arrow-down-to-line":
|
|
43
|
-
"arrow-down-wide-narrow":
|
|
44
|
-
"arrow-down-z-a":
|
|
45
|
-
"arrow-left":
|
|
46
|
-
"arrow-left-to-line":
|
|
47
|
-
"arrow-right":
|
|
48
|
-
"arrow-right-to-line":
|
|
49
|
-
"arrow-up":
|
|
50
|
-
"arrow-up-to-line":
|
|
51
|
-
bookmark:
|
|
52
|
-
"calendar-days":
|
|
53
|
-
check:
|
|
54
|
-
"check-circle":
|
|
55
|
-
"chevron-down":
|
|
56
|
-
"chevron-left":
|
|
57
|
-
"chevron-right":
|
|
58
|
-
"chevron-up":
|
|
59
|
-
circle:
|
|
60
|
-
"circle-alert":
|
|
61
|
-
"circle-check":
|
|
62
|
-
"circle-check-big":
|
|
63
|
-
"circle-dollar-sign":
|
|
64
|
-
"circle-help":
|
|
65
|
-
code:
|
|
66
|
-
copy:
|
|
67
|
-
"credit-card":
|
|
68
|
-
dot:
|
|
69
|
-
download:
|
|
70
|
-
edit:
|
|
71
|
-
ellipsis:
|
|
72
|
-
"external-link":
|
|
73
|
-
eye:
|
|
74
|
-
"file-text":
|
|
75
|
-
filter:
|
|
76
|
-
"grid-2x2-plus":
|
|
77
|
-
handshake:
|
|
78
|
-
info:
|
|
79
|
-
"layout-dashboard":
|
|
80
|
-
link:
|
|
81
|
-
"list-filter":
|
|
82
|
-
"loader-2":
|
|
83
|
-
"log-out":
|
|
84
|
-
mail:
|
|
85
|
-
"map-pin":
|
|
86
|
-
"message-circle":
|
|
87
|
-
"message-square":
|
|
88
|
-
"more-horizontal":
|
|
89
|
-
navigation:
|
|
90
|
-
package:
|
|
91
|
-
"panel-left":
|
|
92
|
-
"panel-right-close":
|
|
93
|
-
pencil:
|
|
94
|
-
plus:
|
|
95
|
-
"plus-circle":
|
|
96
|
-
"refresh-cw":
|
|
97
|
-
"rotate-ccw":
|
|
98
|
-
route:
|
|
99
|
-
search:
|
|
100
|
-
send:
|
|
101
|
-
settings:
|
|
102
|
-
share:
|
|
103
|
-
"share-2":
|
|
104
|
-
"shield-check":
|
|
105
|
-
ship:
|
|
106
|
-
sparkles:
|
|
107
|
-
"square-plus":
|
|
108
|
-
star:
|
|
109
|
-
"table-2":
|
|
110
|
-
"text-cursor-input":
|
|
111
|
-
trash:
|
|
112
|
-
"trash-2":
|
|
113
|
-
"triangle-alert":
|
|
114
|
-
truck:
|
|
115
|
-
upload:
|
|
116
|
-
user:
|
|
117
|
-
users:
|
|
118
|
-
weight:
|
|
119
|
-
x
|
|
120
|
-
},
|
|
31
|
+
}, w = {
|
|
32
|
+
"alert-circle": Or,
|
|
33
|
+
anchor: Gr,
|
|
34
|
+
archive: _r,
|
|
35
|
+
"arrow-down": Zr,
|
|
36
|
+
"arrow-down-0-1": Xr,
|
|
37
|
+
"arrow-down-1-0": jr,
|
|
38
|
+
"arrow-down-a-z": Hr,
|
|
39
|
+
"arrow-down-narrow-wide": Fr,
|
|
40
|
+
"arrow-down-to-line": Br,
|
|
41
|
+
"arrow-down-wide-narrow": Wr,
|
|
42
|
+
"arrow-down-z-a": Er,
|
|
43
|
+
"arrow-left": qr,
|
|
44
|
+
"arrow-left-to-line": Mr,
|
|
45
|
+
"arrow-right": Ur,
|
|
46
|
+
"arrow-right-to-line": Nr,
|
|
47
|
+
"arrow-up": Ir,
|
|
48
|
+
"arrow-up-to-line": Rr,
|
|
49
|
+
bookmark: Pr,
|
|
50
|
+
"calendar-days": Tr,
|
|
51
|
+
check: Lr,
|
|
52
|
+
"check-circle": Dr,
|
|
53
|
+
"chevron-down": Sr,
|
|
54
|
+
"chevron-left": zr,
|
|
55
|
+
"chevron-right": yr,
|
|
56
|
+
"chevron-up": br,
|
|
57
|
+
circle: Ar,
|
|
58
|
+
"circle-alert": mr,
|
|
59
|
+
"circle-check": kr,
|
|
60
|
+
"circle-check-big": fr,
|
|
61
|
+
"circle-dollar-sign": Cr,
|
|
62
|
+
"circle-help": gr,
|
|
63
|
+
code: xr,
|
|
64
|
+
copy: pr,
|
|
65
|
+
"credit-card": vr,
|
|
66
|
+
dot: ur,
|
|
67
|
+
download: wr,
|
|
68
|
+
edit: hr,
|
|
69
|
+
ellipsis: dr,
|
|
70
|
+
"external-link": sr,
|
|
71
|
+
eye: lr,
|
|
72
|
+
"file-text": cr,
|
|
73
|
+
filter: ar,
|
|
74
|
+
"grid-2x2-plus": nr,
|
|
75
|
+
handshake: tr,
|
|
76
|
+
info: ir,
|
|
77
|
+
"layout-dashboard": or,
|
|
78
|
+
link: er,
|
|
79
|
+
"list-filter": rr,
|
|
80
|
+
"loader-2": Y,
|
|
81
|
+
"log-out": V,
|
|
82
|
+
mail: Q,
|
|
83
|
+
"map-pin": K,
|
|
84
|
+
"message-circle": J,
|
|
85
|
+
"message-square": $,
|
|
86
|
+
"more-horizontal": O,
|
|
87
|
+
navigation: G,
|
|
88
|
+
package: _,
|
|
89
|
+
"panel-left": Z,
|
|
90
|
+
"panel-right-close": X,
|
|
91
|
+
pencil: j,
|
|
92
|
+
plus: H,
|
|
93
|
+
"plus-circle": F,
|
|
94
|
+
"refresh-cw": B,
|
|
95
|
+
"rotate-ccw": W,
|
|
96
|
+
route: E,
|
|
97
|
+
search: q,
|
|
98
|
+
send: M,
|
|
99
|
+
settings: U,
|
|
100
|
+
share: N,
|
|
101
|
+
"share-2": I,
|
|
102
|
+
"shield-check": R,
|
|
103
|
+
ship: P,
|
|
104
|
+
sparkles: T,
|
|
105
|
+
"square-plus": L,
|
|
106
|
+
star: D,
|
|
107
|
+
"table-2": S,
|
|
108
|
+
"text-cursor-input": z,
|
|
109
|
+
trash: y,
|
|
110
|
+
"trash-2": b,
|
|
111
|
+
"triangle-alert": A,
|
|
112
|
+
truck: m,
|
|
113
|
+
upload: k,
|
|
114
|
+
user: f,
|
|
115
|
+
users: C,
|
|
116
|
+
weight: g,
|
|
117
|
+
x
|
|
118
|
+
}, Kr = /* @__PURE__ */ p.forwardRef(
|
|
121
119
|
({
|
|
122
120
|
name: r,
|
|
123
|
-
size:
|
|
124
|
-
color:
|
|
121
|
+
size: u = "m",
|
|
122
|
+
color: s,
|
|
125
123
|
className: i,
|
|
126
124
|
"aria-label": o,
|
|
127
125
|
...t
|
|
128
126
|
}, d) => {
|
|
129
|
-
const n =
|
|
127
|
+
const n = s ? $r[s] : "text-current", a = Jr[u], c = o ? { "aria-label": o, role: "img" } : { "aria-hidden": !0 };
|
|
130
128
|
if (typeof r != "string")
|
|
131
129
|
return /* @__PURE__ */ e(
|
|
132
130
|
r,
|
|
133
131
|
{
|
|
134
|
-
className:
|
|
135
|
-
...
|
|
132
|
+
className: l("shrink-0", a, n, i),
|
|
133
|
+
...c,
|
|
136
134
|
...t
|
|
137
135
|
}
|
|
138
136
|
);
|
|
139
|
-
if (r in
|
|
140
|
-
|
|
141
|
-
"svg",
|
|
142
|
-
{
|
|
143
|
-
ref: d,
|
|
144
|
-
viewBox: "0 0 24 24",
|
|
145
|
-
fill: "none",
|
|
146
|
-
className: s("shrink-0", c, n, i),
|
|
147
|
-
...l,
|
|
148
|
-
...t,
|
|
149
|
-
children: [
|
|
150
|
-
o && /* @__PURE__ */ e("title", { children: o }),
|
|
151
|
-
v[r]
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
);
|
|
155
|
-
if (r in p) {
|
|
156
|
-
const a = p[r];
|
|
137
|
+
if (r in w) {
|
|
138
|
+
const h = w[r];
|
|
157
139
|
return /* @__PURE__ */ e(
|
|
158
|
-
|
|
140
|
+
h,
|
|
159
141
|
{
|
|
160
142
|
ref: d,
|
|
161
|
-
className:
|
|
162
|
-
...
|
|
143
|
+
className: l("shrink-0", a, n, i),
|
|
144
|
+
...c,
|
|
163
145
|
...t
|
|
164
146
|
}
|
|
165
147
|
);
|
|
166
148
|
}
|
|
167
|
-
|
|
168
|
-
return w ? /* @__PURE__ */ e(
|
|
169
|
-
w,
|
|
170
|
-
{
|
|
171
|
-
ref: d,
|
|
172
|
-
className: s("shrink-0", c, n, i),
|
|
173
|
-
...l,
|
|
174
|
-
...t
|
|
175
|
-
}
|
|
176
|
-
) : (console.warn(`Icon "${r}" not found in custom icons or Lucide icons`), /* @__PURE__ */ u(
|
|
149
|
+
return console.warn(`Icon "${r}" not found in the static icon map. Use a component reference for tree-shaking or add to commonLucideIcons.`), /* @__PURE__ */ v(
|
|
177
150
|
"svg",
|
|
178
151
|
{
|
|
179
152
|
ref: d,
|
|
180
153
|
viewBox: "0 0 24 24",
|
|
181
154
|
fill: "none",
|
|
182
|
-
className:
|
|
183
|
-
...
|
|
155
|
+
className: l("shrink-0", a, n, i),
|
|
156
|
+
...c,
|
|
184
157
|
...t,
|
|
185
158
|
children: [
|
|
186
159
|
o && /* @__PURE__ */ e("title", { children: o }),
|
|
@@ -209,12 +182,12 @@ const Vr = {
|
|
|
209
182
|
)
|
|
210
183
|
]
|
|
211
184
|
}
|
|
212
|
-
)
|
|
185
|
+
);
|
|
213
186
|
}
|
|
214
187
|
);
|
|
215
|
-
|
|
188
|
+
Kr.displayName = "Icon";
|
|
216
189
|
export {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
190
|
+
Kr as Icon,
|
|
191
|
+
$r as iconColors,
|
|
192
|
+
Jr as iconSizes
|
|
220
193
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as d, jsxs as T } from "react/jsx-runtime";
|
|
2
2
|
import p from "react";
|
|
3
|
-
import { cva as
|
|
3
|
+
import { cva as K } from "class-variance-authority";
|
|
4
4
|
import { cn as u } from "../../lib/utils.js";
|
|
5
5
|
import { Button as k } from "./button.js";
|
|
6
6
|
import { Icon as w } from "./icon.js";
|
|
7
|
-
|
|
7
|
+
import { ChevronLeft as O, ChevronRight as Q } from "lucide-react";
|
|
8
|
+
K("", {
|
|
8
9
|
variants: {
|
|
9
10
|
size: {
|
|
10
11
|
default: "",
|
|
@@ -15,7 +16,7 @@ L("", {
|
|
|
15
16
|
size: "default"
|
|
16
17
|
}
|
|
17
18
|
});
|
|
18
|
-
const
|
|
19
|
+
const W = {
|
|
19
20
|
default: {
|
|
20
21
|
container: "gap-[var(--space-m)]",
|
|
21
22
|
navButton: "h-[var(--size-m)] w-[var(--size-m)]",
|
|
@@ -38,7 +39,7 @@ const O = {
|
|
|
38
39
|
monthButton: "px-1 py-[var(--space-xs)] [&]:text-caption-sm",
|
|
39
40
|
monthBorderRadius: "rounded-s"
|
|
40
41
|
}
|
|
41
|
-
}, n = (r) => new Date(r.getFullYear(), r.getMonth(), 1),
|
|
42
|
+
}, n = (r) => new Date(r.getFullYear(), r.getMonth(), 1), X = (r) => r.toLocaleDateString("en-US", { month: "short" }), Z = (r) => Array.from({ length: 12 }, (a, o) => new Date(r, o, 1)), $ = (r, a, o, l) => {
|
|
42
43
|
const f = n(r);
|
|
43
44
|
if (a) {
|
|
44
45
|
const i = n(a);
|
|
@@ -62,7 +63,7 @@ const O = {
|
|
|
62
63
|
return l > f;
|
|
63
64
|
const i = n(o).getTime();
|
|
64
65
|
return l > f && l < i;
|
|
65
|
-
}, v = (r, a) => !r || !a ? !1 : n(r).getTime() === n(a).getTime(),
|
|
66
|
+
}, v = (r, a) => !r || !a ? !1 : n(r).getTime() === n(a).getTime(), ee = /* @__PURE__ */ p.forwardRef(
|
|
66
67
|
({
|
|
67
68
|
value: r,
|
|
68
69
|
onChange: a,
|
|
@@ -71,17 +72,17 @@ const O = {
|
|
|
71
72
|
yearCount: f,
|
|
72
73
|
startYear: i,
|
|
73
74
|
minDate: g,
|
|
74
|
-
maxDate:
|
|
75
|
-
disabledDates:
|
|
76
|
-
className:
|
|
75
|
+
maxDate: C,
|
|
76
|
+
disabledDates: R,
|
|
77
|
+
className: Y,
|
|
77
78
|
monthLabelFormat: S,
|
|
78
79
|
yearLabelFormat: b,
|
|
79
80
|
enableNavigation: h = !1,
|
|
80
81
|
onYearNavigate: G
|
|
81
|
-
},
|
|
82
|
+
}, I) => {
|
|
82
83
|
const [c, M] = p.useState(null), [z, x] = p.useState(null), [y, N] = p.useState(
|
|
83
84
|
i || (/* @__PURE__ */ new Date()).getFullYear()
|
|
84
|
-
), s =
|
|
85
|
+
), s = W[l], A = f ?? (o === "single" ? 1 : 2), H = h ? y : i || (/* @__PURE__ */ new Date()).getFullYear(), D = Array.from({ length: A }, (e, t) => H + t), _ = () => {
|
|
85
86
|
const e = y - 1;
|
|
86
87
|
N(e), G?.(e);
|
|
87
88
|
}, E = () => {
|
|
@@ -103,7 +104,7 @@ const O = {
|
|
|
103
104
|
const [t, m] = r;
|
|
104
105
|
return B(e, t, m);
|
|
105
106
|
}, F = (e) => !c || !z ? !1 : B(e, c, z);
|
|
106
|
-
return /* @__PURE__ */ d("div", { ref:
|
|
107
|
+
return /* @__PURE__ */ d("div", { ref: I, className: u("flex flex-col", s.container, Y), children: /* @__PURE__ */ T("div", { className: u("flex items-center", s.yearGridGap), children: [
|
|
107
108
|
h && /* @__PURE__ */ d(
|
|
108
109
|
k,
|
|
109
110
|
{
|
|
@@ -111,13 +112,13 @@ const O = {
|
|
|
111
112
|
size: "s",
|
|
112
113
|
onClick: _,
|
|
113
114
|
className: u(s.navButton, "p-0 shrink-0"),
|
|
114
|
-
children: /* @__PURE__ */ d(w, { name:
|
|
115
|
+
children: /* @__PURE__ */ d(w, { name: O, className: s.navIcon })
|
|
115
116
|
}
|
|
116
117
|
),
|
|
117
118
|
/* @__PURE__ */ d("div", { className: u("flex flex-1", s.yearGridGap), children: D.map((e) => /* @__PURE__ */ T("div", { className: u("flex-1 flex flex-col", s.yearSectionGap), children: [
|
|
118
119
|
/* @__PURE__ */ d("div", { className: u(s.yearHeader, "text-[var(--color-text-primary)] text-center"), children: b ? b(e) : e }),
|
|
119
|
-
/* @__PURE__ */ d("div", { className: u("grid grid-cols-3", s.monthGridGap), children:
|
|
120
|
-
const m =
|
|
120
|
+
/* @__PURE__ */ d("div", { className: u("grid grid-cols-3", s.monthGridGap), children: Z(e).map((t) => {
|
|
121
|
+
const m = $(t, g, C, R), L = j(t), U = q(t), V = F(t), J = v(t, c);
|
|
121
122
|
return /* @__PURE__ */ d(
|
|
122
123
|
"button",
|
|
123
124
|
{
|
|
@@ -133,10 +134,10 @@ const O = {
|
|
|
133
134
|
"hover:bg-[var(--color-background-neutral-hovered)]",
|
|
134
135
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)]",
|
|
135
136
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
136
|
-
(
|
|
137
|
-
(
|
|
137
|
+
(U || V) && "bg-[var(--color-background-blue-subtle)] text-[var(--color-text-primary)]",
|
|
138
|
+
(L || J) && "!bg-[var(--color-background-blue-bold)] !text-[var(--color-text-on-action)]"
|
|
138
139
|
),
|
|
139
|
-
children: S ? S(t) :
|
|
140
|
+
children: S ? S(t) : X(t)
|
|
140
141
|
},
|
|
141
142
|
t.getTime()
|
|
142
143
|
);
|
|
@@ -149,13 +150,13 @@ const O = {
|
|
|
149
150
|
size: "s",
|
|
150
151
|
onClick: E,
|
|
151
152
|
className: u(s.navButton, "p-0 shrink-0"),
|
|
152
|
-
children: /* @__PURE__ */ d(w, { name:
|
|
153
|
+
children: /* @__PURE__ */ d(w, { name: Q, className: s.navIcon })
|
|
153
154
|
}
|
|
154
155
|
)
|
|
155
156
|
] }) });
|
|
156
157
|
}
|
|
157
158
|
);
|
|
158
|
-
|
|
159
|
+
ee.displayName = "MonthPicker";
|
|
159
160
|
export {
|
|
160
|
-
|
|
161
|
+
ee as MonthPicker
|
|
161
162
|
};
|