@tapizlabs/ui 0.1.1
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/CHANGELOG.md +16 -0
- package/FRAMEWORK_BOUNDARY.md +47 -0
- package/LICENSE +21 -0
- package/README.md +333 -0
- package/dist/fonts.d.ts +2 -0
- package/dist/fonts.js +18 -0
- package/dist/fonts.js.map +1 -0
- package/dist/index.d.ts +576 -0
- package/dist/index.js +2028 -0
- package/dist/index.js.map +1 -0
- package/dist/theme.css +774 -0
- package/package.json +69 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,2028 @@
|
|
|
1
|
+
// src/components/icons/BaseIcons.tsx
|
|
2
|
+
var base = (_d, size, style) => ({
|
|
3
|
+
width: size,
|
|
4
|
+
height: size,
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
fill: "none",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
strokeWidth: 1.75,
|
|
9
|
+
strokeLinecap: "round",
|
|
10
|
+
strokeLinejoin: "round",
|
|
11
|
+
style
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// src/components/icons/NavigationIcons.tsx
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
var Clipboard = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
17
|
+
/* @__PURE__ */ jsx("rect", { x: "8", y: "2", width: "8", height: "4", rx: "1" }),
|
|
18
|
+
/* @__PURE__ */ jsx("path", { d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }),
|
|
19
|
+
/* @__PURE__ */ jsx("path", { d: "M12 11h4M12 16h4M8 11h.01M8 16h.01" })
|
|
20
|
+
] });
|
|
21
|
+
var Home = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
22
|
+
/* @__PURE__ */ jsx("path", { d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
|
|
23
|
+
/* @__PURE__ */ jsx("polyline", { points: "9 22 9 12 15 12 15 22" })
|
|
24
|
+
] });
|
|
25
|
+
var Scan = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
26
|
+
/* @__PURE__ */ jsx("path", { d: "M3 7V5a2 2 0 0 1 2-2h2M17 3h2a2 2 0 0 1 2 2v2M21 17v2a2 2 0 0 1-2 2h-2M7 21H5a2 2 0 0 1-2-2v-2" }),
|
|
27
|
+
/* @__PURE__ */ jsx("line", { x1: "7", y1: "12", x2: "17", y2: "12" })
|
|
28
|
+
] });
|
|
29
|
+
var Users = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
30
|
+
/* @__PURE__ */ jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
|
|
31
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "7", r: "4" }),
|
|
32
|
+
/* @__PURE__ */ jsx("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75" })
|
|
33
|
+
] });
|
|
34
|
+
var Book = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
35
|
+
/* @__PURE__ */ jsx("path", { d: "M4 19.5A2.5 2.5 0 0 1 6.5 17H20" }),
|
|
36
|
+
/* @__PURE__ */ jsx("path", { d: "M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z" })
|
|
37
|
+
] });
|
|
38
|
+
var Calendar = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
39
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
|
|
40
|
+
/* @__PURE__ */ jsx("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
41
|
+
] });
|
|
42
|
+
var CheckSquare = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
43
|
+
/* @__PURE__ */ jsx("polyline", { points: "9 11 12 14 22 4" }),
|
|
44
|
+
/* @__PURE__ */ jsx("path", { d: "M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11" })
|
|
45
|
+
] });
|
|
46
|
+
var BarChart = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
47
|
+
/* @__PURE__ */ jsx("line", { x1: "18", y1: "20", x2: "18", y2: "10" }),
|
|
48
|
+
/* @__PURE__ */ jsx("line", { x1: "12", y1: "20", x2: "12", y2: "4" }),
|
|
49
|
+
/* @__PURE__ */ jsx("line", { x1: "6", y1: "20", x2: "6", y2: "14" }),
|
|
50
|
+
/* @__PURE__ */ jsx("line", { x1: "2", y1: "20", x2: "22", y2: "20" })
|
|
51
|
+
] });
|
|
52
|
+
var Table = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
53
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
54
|
+
/* @__PURE__ */ jsx("path", { d: "M3 9h18M9 21V9" })
|
|
55
|
+
] });
|
|
56
|
+
var Report = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
57
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
58
|
+
/* @__PURE__ */ jsx("polyline", { points: "14 2 14 8 20 8" }),
|
|
59
|
+
/* @__PURE__ */ jsx("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
|
|
60
|
+
/* @__PURE__ */ jsx("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
|
|
61
|
+
/* @__PURE__ */ jsx("polyline", { points: "10 9 9 9 8 9" })
|
|
62
|
+
] });
|
|
63
|
+
var QrCode = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
64
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "7", height: "7" }),
|
|
65
|
+
/* @__PURE__ */ jsx("rect", { x: "14", y: "3", width: "7", height: "7" }),
|
|
66
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "14", width: "7", height: "7" }),
|
|
67
|
+
/* @__PURE__ */ jsx("path", { d: "M14 14h3v3h-3zM17 17h3v3h-3zM14 17h3" })
|
|
68
|
+
] });
|
|
69
|
+
var Layers = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
70
|
+
/* @__PURE__ */ jsx("polygon", { points: "12 2 2 7 12 12 22 7 12 2" }),
|
|
71
|
+
/* @__PURE__ */ jsx("polyline", { points: "2 12 12 17 22 12" }),
|
|
72
|
+
/* @__PURE__ */ jsx("polyline", { points: "2 17 12 22 22 17" })
|
|
73
|
+
] });
|
|
74
|
+
var OfficeHours = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
75
|
+
/* @__PURE__ */ jsx("path", { d: "M8 3h8" }),
|
|
76
|
+
/* @__PURE__ */ jsx("path", { d: "M9 2v2M15 2v2" }),
|
|
77
|
+
/* @__PURE__ */ jsx("rect", { x: "4", y: "5", width: "16", height: "15", rx: "2" }),
|
|
78
|
+
/* @__PURE__ */ jsx("path", { d: "M4 10h16" }),
|
|
79
|
+
/* @__PURE__ */ jsx("path", { d: "M12 13v4" }),
|
|
80
|
+
/* @__PURE__ */ jsx("path", { d: "M12 13l2.5-1.5" })
|
|
81
|
+
] });
|
|
82
|
+
var FileUpload = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
83
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
84
|
+
/* @__PURE__ */ jsx("polyline", { points: "14 2 14 8 20 8" }),
|
|
85
|
+
/* @__PURE__ */ jsx("polyline", { points: "12 18 12 12" }),
|
|
86
|
+
/* @__PURE__ */ jsx("polyline", { points: "9 15 12 12 15 15" })
|
|
87
|
+
] });
|
|
88
|
+
var University = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
89
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3l9 3H3l9-3z" }),
|
|
90
|
+
/* @__PURE__ */ jsx("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
|
|
91
|
+
/* @__PURE__ */ jsx("line", { x1: "5", y1: "6", x2: "5", y2: "18" }),
|
|
92
|
+
/* @__PURE__ */ jsx("line", { x1: "10", y1: "6", x2: "10", y2: "18" }),
|
|
93
|
+
/* @__PURE__ */ jsx("line", { x1: "14", y1: "6", x2: "14", y2: "18" }),
|
|
94
|
+
/* @__PURE__ */ jsx("line", { x1: "19", y1: "6", x2: "19", y2: "18" }),
|
|
95
|
+
/* @__PURE__ */ jsx("line", { x1: "2", y1: "18", x2: "22", y2: "18" }),
|
|
96
|
+
/* @__PURE__ */ jsx("line", { x1: "2", y1: "21", x2: "22", y2: "21" })
|
|
97
|
+
] });
|
|
98
|
+
var Faculty = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, strokeWidth: 1.5, children: [
|
|
99
|
+
/* @__PURE__ */ jsx("rect", { x: "7", y: "2", width: "10", height: "19" }),
|
|
100
|
+
/* @__PURE__ */ jsx("rect", { x: "2", y: "8", width: "5", height: "13" }),
|
|
101
|
+
/* @__PURE__ */ jsx("rect", { x: "17", y: "8", width: "5", height: "13" }),
|
|
102
|
+
/* @__PURE__ */ jsx("rect", { x: "9", y: "4", width: "2.5", height: "2.5" }),
|
|
103
|
+
/* @__PURE__ */ jsx("rect", { x: "12.5", y: "4", width: "2.5", height: "2.5" }),
|
|
104
|
+
/* @__PURE__ */ jsx("rect", { x: "9", y: "8", width: "2.5", height: "2.5" }),
|
|
105
|
+
/* @__PURE__ */ jsx("rect", { x: "12.5", y: "8", width: "2.5", height: "2.5" }),
|
|
106
|
+
/* @__PURE__ */ jsx("rect", { x: "10", y: "15", width: "4", height: "6" }),
|
|
107
|
+
/* @__PURE__ */ jsx("line", { x1: "1", y1: "21", x2: "23", y2: "21" })
|
|
108
|
+
] });
|
|
109
|
+
var GraduationCap = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
110
|
+
/* @__PURE__ */ jsx("path", { d: "M22 10v6M2 10l10-5 10 5-10 5z" }),
|
|
111
|
+
/* @__PURE__ */ jsx("path", { d: "M6 12v5c0 1.657 2.686 3 6 3s6-1.343 6-3v-5" })
|
|
112
|
+
] });
|
|
113
|
+
var Globe = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, children: [
|
|
114
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
115
|
+
/* @__PURE__ */ jsx("path", { d: "M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
|
|
116
|
+
] });
|
|
117
|
+
var CreditCard = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, strokeWidth: 1.8, children: [
|
|
118
|
+
/* @__PURE__ */ jsx("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }),
|
|
119
|
+
/* @__PURE__ */ jsx("path", { d: "M2 10h20" })
|
|
120
|
+
] });
|
|
121
|
+
var HelpCircle = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, strokeWidth: 1.8, children: [
|
|
122
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
123
|
+
/* @__PURE__ */ jsx("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
124
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "17", r: ".5", fill: "currentColor", stroke: "none" })
|
|
125
|
+
] });
|
|
126
|
+
var NavQrAttendance = ({ size = 15, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, strokeWidth: 1.8, children: [
|
|
127
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "7", height: "7", rx: "1.5" }),
|
|
128
|
+
/* @__PURE__ */ jsx("rect", { x: "5.5", y: "5.5", width: "2", height: "2", rx: ".4", fill: "currentColor", stroke: "none" }),
|
|
129
|
+
/* @__PURE__ */ jsx("rect", { x: "14", y: "3", width: "7", height: "7", rx: "1.5" }),
|
|
130
|
+
/* @__PURE__ */ jsx("rect", { x: "16.5", y: "5.5", width: "2", height: "2", rx: ".4", fill: "currentColor", stroke: "none" }),
|
|
131
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "14", width: "7", height: "7", rx: "1.5" }),
|
|
132
|
+
/* @__PURE__ */ jsx("rect", { x: "5.5", y: "16.5", width: "2", height: "2", rx: ".4", fill: "currentColor", stroke: "none" }),
|
|
133
|
+
/* @__PURE__ */ jsx("polyline", { points: "14,16 16,18 20,13" })
|
|
134
|
+
] });
|
|
135
|
+
var NavScoresheet = ({ size = 15, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, strokeWidth: 1.3, children: [
|
|
136
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
137
|
+
/* @__PURE__ */ jsx("path", { d: "M3 9h18M3 14h18M9 9v9M15 9v9" })
|
|
138
|
+
] });
|
|
139
|
+
var NavAnalytics = ({ size = 15, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, strokeWidth: 1.8, children: [
|
|
140
|
+
/* @__PURE__ */ jsx("path", { d: "M3 3v18h18" }),
|
|
141
|
+
/* @__PURE__ */ jsx("path", { d: "M7 16l4-5 4 3 5-6" })
|
|
142
|
+
] });
|
|
143
|
+
var NavSecurity = ({ size = 15, className, style }) => /* @__PURE__ */ jsxs("svg", { ...base(null, size, style), className, strokeWidth: 1.8, children: [
|
|
144
|
+
/* @__PURE__ */ jsx("path", { d: "M12 2L4 6v6c0 5.25 3.5 9.74 8 11 4.5-1.26 8-5.75 8-11V6L12 2Z" }),
|
|
145
|
+
/* @__PURE__ */ jsx("path", { d: "M9 12l2 2 4-4" })
|
|
146
|
+
] });
|
|
147
|
+
|
|
148
|
+
// src/components/icons/ActionIcons.tsx
|
|
149
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
150
|
+
var Edit = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
151
|
+
/* @__PURE__ */ jsx2("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
152
|
+
/* @__PURE__ */ jsx2("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
|
|
153
|
+
] });
|
|
154
|
+
var Trash = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
155
|
+
/* @__PURE__ */ jsx2("polyline", { points: "3 6 5 6 21 6" }),
|
|
156
|
+
/* @__PURE__ */ jsx2("path", { d: "M19 6l-1 14H6L5 6M10 11v6M14 11v6M9 6V4h6v2" })
|
|
157
|
+
] });
|
|
158
|
+
var Plus = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
159
|
+
/* @__PURE__ */ jsx2("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
160
|
+
/* @__PURE__ */ jsx2("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
161
|
+
] });
|
|
162
|
+
var Download = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
163
|
+
/* @__PURE__ */ jsx2("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
164
|
+
/* @__PURE__ */ jsx2("polyline", { points: "7 10 12 15 17 10" }),
|
|
165
|
+
/* @__PURE__ */ jsx2("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
|
|
166
|
+
] });
|
|
167
|
+
var Refresh = ({ size = 15, className, spinning, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className: `${spinning ? "animate-spin" : ""} ${className ?? ""}`, children: [
|
|
168
|
+
/* @__PURE__ */ jsx2("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
169
|
+
/* @__PURE__ */ jsx2("path", { d: "M3 3v5h5" })
|
|
170
|
+
] });
|
|
171
|
+
var UserPlus = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
172
|
+
/* @__PURE__ */ jsx2("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
173
|
+
/* @__PURE__ */ jsx2("circle", { cx: "9", cy: "7", r: "4" }),
|
|
174
|
+
/* @__PURE__ */ jsx2("line", { x1: "19", y1: "8", x2: "19", y2: "14" }),
|
|
175
|
+
/* @__PURE__ */ jsx2("line", { x1: "22", y1: "11", x2: "16", y2: "11" })
|
|
176
|
+
] });
|
|
177
|
+
var UserMinus = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
178
|
+
/* @__PURE__ */ jsx2("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
179
|
+
/* @__PURE__ */ jsx2("circle", { cx: "9", cy: "7", r: "4" }),
|
|
180
|
+
/* @__PURE__ */ jsx2("line", { x1: "22", y1: "11", x2: "16", y2: "11" })
|
|
181
|
+
] });
|
|
182
|
+
var UserCog = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
183
|
+
/* @__PURE__ */ jsx2("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
184
|
+
/* @__PURE__ */ jsx2("circle", { cx: "9", cy: "7", r: "4" }),
|
|
185
|
+
/* @__PURE__ */ jsx2("circle", { cx: "19", cy: "19", r: "2" }),
|
|
186
|
+
/* @__PURE__ */ jsx2("path", { d: "M19 15v2M19 21v2M15.27 16.27l1.42 1.42M22.31 21.31l-1.42-1.42M15 19h2M21 19h2M15.27 21.73l1.42-1.42M22.31 16.69l-1.42 1.42" })
|
|
187
|
+
] });
|
|
188
|
+
var Check = ({ size = 16, className, style }) => /* @__PURE__ */ jsx2("svg", { ...base(null, size, style), strokeWidth: 2, className, children: /* @__PURE__ */ jsx2("polyline", { points: "20 6 9 17 4 12" }) });
|
|
189
|
+
var X = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), strokeWidth: 2.5, className, children: [
|
|
190
|
+
/* @__PURE__ */ jsx2("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
191
|
+
/* @__PURE__ */ jsx2("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
192
|
+
] });
|
|
193
|
+
var Menu = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), strokeWidth: 2, className, children: [
|
|
194
|
+
/* @__PURE__ */ jsx2("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
|
|
195
|
+
/* @__PURE__ */ jsx2("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
|
|
196
|
+
/* @__PURE__ */ jsx2("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
|
|
197
|
+
] });
|
|
198
|
+
var Grid = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), strokeWidth: 2, className, children: [
|
|
199
|
+
/* @__PURE__ */ jsx2("rect", { x: "3", y: "3", width: "7", height: "7" }),
|
|
200
|
+
/* @__PURE__ */ jsx2("rect", { x: "14", y: "3", width: "7", height: "7" }),
|
|
201
|
+
/* @__PURE__ */ jsx2("rect", { x: "3", y: "14", width: "7", height: "7" }),
|
|
202
|
+
/* @__PURE__ */ jsx2("rect", { x: "14", y: "14", width: "7", height: "7" })
|
|
203
|
+
] });
|
|
204
|
+
var History = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
205
|
+
/* @__PURE__ */ jsx2("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
206
|
+
/* @__PURE__ */ jsx2("path", { d: "M3 3v5h5" }),
|
|
207
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 7v5l4 2" })
|
|
208
|
+
] });
|
|
209
|
+
var RotateCcw = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
210
|
+
/* @__PURE__ */ jsx2("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
211
|
+
/* @__PURE__ */ jsx2("path", { d: "M3 3v5h5" })
|
|
212
|
+
] });
|
|
213
|
+
var Pdf = ({ size = 14, className, style }) => /* @__PURE__ */ jsx2(
|
|
214
|
+
"svg",
|
|
215
|
+
{
|
|
216
|
+
width: size,
|
|
217
|
+
height: size,
|
|
218
|
+
viewBox: "0 0 1920 1920",
|
|
219
|
+
fill: "currentColor",
|
|
220
|
+
style,
|
|
221
|
+
className,
|
|
222
|
+
children: /* @__PURE__ */ jsxs2("g", { fillRule: "evenodd", children: [
|
|
223
|
+
/* @__PURE__ */ jsx2("path", { d: "M1251.654 0c44.499 0 88.207 18.07 119.718 49.581l329.223 329.224c31.963 31.962 49.581 74.54 49.581 119.717V1920H169V0Zm-66.183 112.941H281.94V1807.06h1355.294V564.706H1185.47V112.94Zm112.94 23.379v315.445h315.445L1298.412 136.32Z" }),
|
|
224
|
+
/* @__PURE__ */ jsx2("path", { d: "M900.497 677.67c26.767 0 50.372 12.65 67.991 37.835 41.901 59.068 38.965 121.976 23.492 206.682-5.308 29.14.113 58.617 16.263 83.125 22.814 34.786 55.68 82.673 87.981 123.219 23.718 29.93 60.198 45.854 97.13 40.885 23.718-3.276 52.292-5.986 81.656-5.986 131.012 0 121.186 46.757 133.045 89.675 6.55 25.976 3.275 48.678-10.165 65.506-16.715 22.701-51.162 34.447-101.534 34.447-55.793 0-74.202-9.487-122.767-24.96-27.445-8.81-55.906-10.617-83.69-3.275-55.453 14.456-146.936 36.48-223.284 46.983-40.772 5.647-77.816 26.654-102.438 60.875-55.454 76.8-106.842 148.518-188.273 148.518-21.007 0-40.32-7.567-56.244-22.701-23.492-23.492-33.544-49.581-28.574-79.85 13.778-92.95 128.075-144.79 196.066-182.625 16.037-8.923 28.687-22.589 36.592-39.53l107.86-233.223c7.68-16.377 10.051-34.56 7.228-52.518-12.537-79.059-31.06-211.99 18.748-272.075 10.955-13.44 26.09-21.007 42.917-21.007Zm20.556 339.953c-43.257 126.607-119.718 264.282-129.996 280.32 92.273-43.37 275.916-65.28 275.916-65.28-92.386-88.998-145.92-215.04-145.92-215.04Z" })
|
|
225
|
+
] })
|
|
226
|
+
}
|
|
227
|
+
);
|
|
228
|
+
var Printer = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
229
|
+
/* @__PURE__ */ jsx2("path", { d: "M6 9V3h12v6" }),
|
|
230
|
+
/* @__PURE__ */ jsx2("path", { d: "M6 21h12v-6H6v6z" }),
|
|
231
|
+
/* @__PURE__ */ jsx2("path", { d: "M18 9H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2z" }),
|
|
232
|
+
/* @__PURE__ */ jsx2("circle", { cx: "17", cy: "13", r: "1" }),
|
|
233
|
+
/* @__PURE__ */ jsx2("path", { d: "M8 13h3" })
|
|
234
|
+
] });
|
|
235
|
+
var ExternalLink = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
236
|
+
/* @__PURE__ */ jsx2("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
237
|
+
/* @__PURE__ */ jsx2("polyline", { points: "15 3 21 3 21 9" }),
|
|
238
|
+
/* @__PURE__ */ jsx2("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
239
|
+
] });
|
|
240
|
+
var Image = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs2("svg", { ...base(null, size, style), className, children: [
|
|
241
|
+
/* @__PURE__ */ jsx2("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
242
|
+
/* @__PURE__ */ jsx2("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
|
|
243
|
+
/* @__PURE__ */ jsx2("polyline", { points: "21 15 16 10 5 21" })
|
|
244
|
+
] });
|
|
245
|
+
var Star = ({ size = 14, className, style }) => /* @__PURE__ */ jsx2(
|
|
246
|
+
"svg",
|
|
247
|
+
{
|
|
248
|
+
width: size,
|
|
249
|
+
height: size,
|
|
250
|
+
viewBox: "0 0 24 24",
|
|
251
|
+
fill: "currentColor",
|
|
252
|
+
style,
|
|
253
|
+
className,
|
|
254
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" })
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
var AppleIcon = ({ size = 20, className, style }) => /* @__PURE__ */ jsx2(
|
|
258
|
+
"svg",
|
|
259
|
+
{
|
|
260
|
+
width: size,
|
|
261
|
+
height: size,
|
|
262
|
+
viewBox: "0 0 814 1000",
|
|
263
|
+
fill: "currentColor",
|
|
264
|
+
style,
|
|
265
|
+
className,
|
|
266
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76 0-103.7 40.8-165.9 40.8s-105-38.8-155.8-103.2C115.1 757.2 61.9 645.7 61.9 540.4c0-168.3 109.8-257.3 217.3-257.3 59.7 0 109.7 39.9 147.6 39.9 36 0 92.8-42.3 158.8-42.3 25.7 0 108.2 2.6 168.3 78.2zm-104.5-166.2c31.4-37.9 54.3-91.1 54.3-144.3 0-7.1-.6-14.3-1.9-20.1-51.5 1.9-112.4 34.3-149.6 77.2-28.8 32.1-55.8 85.9-55.8 140.3 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 46.5 0 102.8-31.4 137.5-72.5z" })
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
var GooglePlayIcon = ({ size = 20, className, style }) => /* @__PURE__ */ jsx2(
|
|
270
|
+
"svg",
|
|
271
|
+
{
|
|
272
|
+
width: size,
|
|
273
|
+
height: size,
|
|
274
|
+
viewBox: "0 0 512 512",
|
|
275
|
+
fill: "currentColor",
|
|
276
|
+
style,
|
|
277
|
+
className,
|
|
278
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M325.3 234.3L104.6 13l280.8 161.2-60.1 60.1zM47 0C34 6.8 25.3 19.2 25.3 35.3v441.3c0 16.1 8.7 28.5 21.7 35.3l2.4 1.4 247.2-247v-5.8L47 0zm425.6 225.6l-58.9-34.1-65.7 64.5 65.7 64.5 60.1-34.1c17.1-9.8 17.1-25.9.8-60.8zM104.6 499l280.8-161.2-60.1-60.1L104.6 499z" })
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
// src/components/icons/AuthIcons.tsx
|
|
283
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
284
|
+
var Mail = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs3("svg", { ...base(null, size, style), className, children: [
|
|
285
|
+
/* @__PURE__ */ jsx3("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
|
|
286
|
+
/* @__PURE__ */ jsx3("path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" })
|
|
287
|
+
] });
|
|
288
|
+
var LockIcon = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs3("svg", { ...base(null, size, style), className, children: [
|
|
289
|
+
/* @__PURE__ */ jsx3("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2" }),
|
|
290
|
+
/* @__PURE__ */ jsx3("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
291
|
+
] });
|
|
292
|
+
var TwoFAIcon = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs3(
|
|
293
|
+
"svg",
|
|
294
|
+
{
|
|
295
|
+
...base(null, size, style),
|
|
296
|
+
className,
|
|
297
|
+
viewBox: "0 0 24 24",
|
|
298
|
+
fill: "none",
|
|
299
|
+
stroke: "currentColor",
|
|
300
|
+
strokeWidth: "2",
|
|
301
|
+
strokeLinecap: "round",
|
|
302
|
+
strokeLinejoin: "round",
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ jsx3("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2", ry: "2" }),
|
|
305
|
+
/* @__PURE__ */ jsx3("line", { x1: "12", y1: "18", x2: "12.01", y2: "18" }),
|
|
306
|
+
/* @__PURE__ */ jsx3("circle", { cx: "10", cy: "10", r: "1.5" }),
|
|
307
|
+
/* @__PURE__ */ jsx3("line", { x1: "11", y1: "10", x2: "16", y2: "10" }),
|
|
308
|
+
/* @__PURE__ */ jsx3("line", { x1: "13", y1: "7.5", x2: "13", y2: "6" }),
|
|
309
|
+
/* @__PURE__ */ jsx3("line", { x1: "15", y1: "8.5", x2: "15", y2: "7.5" })
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
);
|
|
313
|
+
var FingerprintIcon = ({ size = 20, className, style }) => /* @__PURE__ */ jsxs3(
|
|
314
|
+
"svg",
|
|
315
|
+
{
|
|
316
|
+
...base(null, size, style),
|
|
317
|
+
className,
|
|
318
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
319
|
+
viewBox: "0 0 24 24",
|
|
320
|
+
fill: "none",
|
|
321
|
+
stroke: "currentColor",
|
|
322
|
+
strokeWidth: "2.5",
|
|
323
|
+
strokeLinecap: "round",
|
|
324
|
+
strokeLinejoin: "round",
|
|
325
|
+
children: [
|
|
326
|
+
/* @__PURE__ */ jsx3("path", { d: "M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4" }),
|
|
327
|
+
/* @__PURE__ */ jsx3("path", { d: "M14 13.12c0 2.38 0 6.38-1 8.88" }),
|
|
328
|
+
/* @__PURE__ */ jsx3("path", { d: "M17.29 21.02c.12-.6.43-2.3.5-3.02" }),
|
|
329
|
+
/* @__PURE__ */ jsx3("path", { d: "M2 12a10 10 0 0 1 18-6" }),
|
|
330
|
+
/* @__PURE__ */ jsx3("path", { d: "M2 16h.01" }),
|
|
331
|
+
/* @__PURE__ */ jsx3("path", { d: "M21.8 16c.2-2 .131-5.354 0-6" }),
|
|
332
|
+
/* @__PURE__ */ jsx3("path", { d: "M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2" }),
|
|
333
|
+
/* @__PURE__ */ jsx3("path", { d: "M8.65 22c.21-.66.45-1.32.57-2" }),
|
|
334
|
+
/* @__PURE__ */ jsx3("path", { d: "M9 6.8a6 6 0 0 1 9 5.2v2" })
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
);
|
|
338
|
+
var Eye = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs3("svg", { ...base(null, size, style), className, children: [
|
|
339
|
+
/* @__PURE__ */ jsx3("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z" }),
|
|
340
|
+
/* @__PURE__ */ jsx3("circle", { cx: "12", cy: "12", r: "3" })
|
|
341
|
+
] });
|
|
342
|
+
var EyeOff = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs3("svg", { ...base(null, size, style), className, children: [
|
|
343
|
+
/* @__PURE__ */ jsx3("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-10-8-10-8a18.45 18.45 0 0 1 5.06-5.94" }),
|
|
344
|
+
/* @__PURE__ */ jsx3("path", { d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 10 8 10 8a18.5 18.5 0 0 1-2.16 3.19" }),
|
|
345
|
+
/* @__PURE__ */ jsx3("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
|
|
346
|
+
] });
|
|
347
|
+
var User = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs3("svg", { ...base(null, size, style), className, children: [
|
|
348
|
+
/* @__PURE__ */ jsx3("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
|
|
349
|
+
/* @__PURE__ */ jsx3("circle", { cx: "12", cy: "7", r: "4" })
|
|
350
|
+
] });
|
|
351
|
+
var UserCheck = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs3("svg", { ...base(null, size, style), className, children: [
|
|
352
|
+
/* @__PURE__ */ jsx3("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
353
|
+
/* @__PURE__ */ jsx3("circle", { cx: "9", cy: "7", r: "4" }),
|
|
354
|
+
/* @__PURE__ */ jsx3("polyline", { points: "16 11 18 13 22 9" })
|
|
355
|
+
] });
|
|
356
|
+
var Hash = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs3("svg", { ...base(null, size, style), className, children: [
|
|
357
|
+
/* @__PURE__ */ jsx3("line", { x1: "4", y1: "9", x2: "20", y2: "9" }),
|
|
358
|
+
/* @__PURE__ */ jsx3("line", { x1: "4", y1: "15", x2: "20", y2: "15" }),
|
|
359
|
+
/* @__PURE__ */ jsx3("line", { x1: "10", y1: "3", x2: "8", y2: "21" }),
|
|
360
|
+
/* @__PURE__ */ jsx3("line", { x1: "16", y1: "3", x2: "14", y2: "21" })
|
|
361
|
+
] });
|
|
362
|
+
var LogOut = ({ size = 20, className, style }) => /* @__PURE__ */ jsxs3(
|
|
363
|
+
"svg",
|
|
364
|
+
{
|
|
365
|
+
...base(null, size, style),
|
|
366
|
+
className,
|
|
367
|
+
viewBox: "0 0 24 24",
|
|
368
|
+
fill: "none",
|
|
369
|
+
stroke: "currentColor",
|
|
370
|
+
strokeWidth: "1.75",
|
|
371
|
+
strokeLinecap: "round",
|
|
372
|
+
strokeLinejoin: "round",
|
|
373
|
+
children: [
|
|
374
|
+
/* @__PURE__ */ jsx3("line", { x1: "15", y1: "12", x2: "5", y2: "12" }),
|
|
375
|
+
/* @__PURE__ */ jsx3("polyline", { points: "9 8 5 12 9 16" }),
|
|
376
|
+
/* @__PURE__ */ jsx3("path", { d: "M19 4 h-4 v16 h4 Z" })
|
|
377
|
+
]
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
|
|
381
|
+
// src/components/icons/FeedbackIcons.tsx
|
|
382
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
383
|
+
var Alert = ({ size = 15, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), strokeWidth: 2, className, children: [
|
|
384
|
+
/* @__PURE__ */ jsx4("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
|
|
385
|
+
/* @__PURE__ */ jsx4("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
386
|
+
/* @__PURE__ */ jsx4("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
387
|
+
] });
|
|
388
|
+
var Info = ({ size = 15, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, children: [
|
|
389
|
+
/* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "10" }),
|
|
390
|
+
/* @__PURE__ */ jsx4("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
391
|
+
/* @__PURE__ */ jsx4("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
392
|
+
] });
|
|
393
|
+
var CheckCircle = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), strokeWidth: 2, className, children: [
|
|
394
|
+
/* @__PURE__ */ jsx4("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
395
|
+
/* @__PURE__ */ jsx4("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
396
|
+
] });
|
|
397
|
+
var Ban = ({ size = 15, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, children: [
|
|
398
|
+
/* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "10" }),
|
|
399
|
+
/* @__PURE__ */ jsx4("line", { x1: "4.93", y1: "4.93", x2: "19.07", y2: "19.07" })
|
|
400
|
+
] });
|
|
401
|
+
var ArrowRight = ({ size = 16, className, style }) => /* @__PURE__ */ jsx4("svg", { ...base(null, size, style), strokeWidth: 2, className, children: /* @__PURE__ */ jsx4("path", { d: "M5 12h14M12 5l7 7-7 7" }) });
|
|
402
|
+
var ArrowLeft = ({ size = 16, className, style }) => /* @__PURE__ */ jsx4("svg", { ...base(null, size, style), strokeWidth: 2, className, children: /* @__PURE__ */ jsx4("path", { d: "M19 12H5M12 19l-7-7 7-7" }) });
|
|
403
|
+
var ChevronLeft = ({ size = 16, className, style }) => /* @__PURE__ */ jsx4("svg", { ...base(null, size, style), strokeWidth: 2, className, children: /* @__PURE__ */ jsx4("polyline", { points: "15 18 9 12 15 6" }) });
|
|
404
|
+
var ChevronRight = ({ size = 16, className, style }) => /* @__PURE__ */ jsx4("svg", { ...base(null, size, style), strokeWidth: 2, className, children: /* @__PURE__ */ jsx4("polyline", { points: "9 18 15 12 9 6" }) });
|
|
405
|
+
var ChevronDown = ({ size = 15, className, style }) => /* @__PURE__ */ jsx4("svg", { ...base(null, size, style), strokeWidth: 2, className, children: /* @__PURE__ */ jsx4("path", { d: "m6 9 6 6 6-6" }) });
|
|
406
|
+
var ChevronUp = ({ size = 15, className, style }) => /* @__PURE__ */ jsx4("svg", { ...base(null, size, style), className, children: /* @__PURE__ */ jsx4("polyline", { points: "18 15 12 9 6 15" }) });
|
|
407
|
+
var Search = ({ size = 15, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), strokeWidth: 2, className, children: [
|
|
408
|
+
/* @__PURE__ */ jsx4("circle", { cx: "11", cy: "11", r: "8" }),
|
|
409
|
+
/* @__PURE__ */ jsx4("path", { d: "M21 21l-4.35-4.35" })
|
|
410
|
+
] });
|
|
411
|
+
var Bell = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, children: [
|
|
412
|
+
/* @__PURE__ */ jsx4("path", { d: "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" }),
|
|
413
|
+
/* @__PURE__ */ jsx4("path", { d: "M13.73 21a2 2 0 0 1-3.46 0" })
|
|
414
|
+
] });
|
|
415
|
+
var Shield = ({ size = 16, className, style }) => /* @__PURE__ */ jsx4("svg", { ...base(null, size, style), className, children: /* @__PURE__ */ jsx4("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }) });
|
|
416
|
+
var Copy = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, children: [
|
|
417
|
+
/* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
|
|
418
|
+
/* @__PURE__ */ jsx4("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
419
|
+
] });
|
|
420
|
+
var Repeat = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), strokeWidth: 2, className, children: [
|
|
421
|
+
/* @__PURE__ */ jsx4("polyline", { points: "17 1 21 5 17 9" }),
|
|
422
|
+
/* @__PURE__ */ jsx4("path", { d: "M3 11V9a4 4 0 0 1 4-4h14" }),
|
|
423
|
+
/* @__PURE__ */ jsx4("polyline", { points: "7 23 3 19 7 15" }),
|
|
424
|
+
/* @__PURE__ */ jsx4("path", { d: "M21 13v2a4 4 0 0 1-4 4H3" })
|
|
425
|
+
] });
|
|
426
|
+
var FileText = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, children: [
|
|
427
|
+
/* @__PURE__ */ jsx4("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
428
|
+
/* @__PURE__ */ jsx4("polyline", { points: "14 2 14 8 20 8" }),
|
|
429
|
+
/* @__PURE__ */ jsx4("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
|
|
430
|
+
/* @__PURE__ */ jsx4("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
|
|
431
|
+
/* @__PURE__ */ jsx4("polyline", { points: "10 9 9 9 8 9" })
|
|
432
|
+
] });
|
|
433
|
+
var Trophy = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, children: [
|
|
434
|
+
/* @__PURE__ */ jsx4("path", { d: "M6 9H4.5a2.5 2.5 0 0 1 0-5H6" }),
|
|
435
|
+
/* @__PURE__ */ jsx4("path", { d: "M18 9h1.5a2.5 2.5 0 0 0 0-5H18" }),
|
|
436
|
+
/* @__PURE__ */ jsx4("path", { d: "M4 22h16" }),
|
|
437
|
+
/* @__PURE__ */ jsx4("path", { d: "M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22" }),
|
|
438
|
+
/* @__PURE__ */ jsx4("path", { d: "M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22" }),
|
|
439
|
+
/* @__PURE__ */ jsx4("path", { d: "M18 2H6v7a6 6 0 0 0 12 0V2Z" })
|
|
440
|
+
] });
|
|
441
|
+
var Monitor = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, children: [
|
|
442
|
+
/* @__PURE__ */ jsx4("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2", ry: "2" }),
|
|
443
|
+
/* @__PURE__ */ jsx4("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
|
|
444
|
+
/* @__PURE__ */ jsx4("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
|
|
445
|
+
] });
|
|
446
|
+
var Smartphone = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, children: [
|
|
447
|
+
/* @__PURE__ */ jsx4("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2", ry: "2" }),
|
|
448
|
+
/* @__PURE__ */ jsx4("line", { x1: "12", y1: "18", x2: "12.01", y2: "18" })
|
|
449
|
+
] });
|
|
450
|
+
var Tablet = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, children: [
|
|
451
|
+
/* @__PURE__ */ jsx4("rect", { x: "4", y: "2", width: "16", height: "20", rx: "2", ry: "2" }),
|
|
452
|
+
/* @__PURE__ */ jsx4("line", { x1: "12", y1: "18", x2: "12.01", y2: "18" })
|
|
453
|
+
] });
|
|
454
|
+
var ActivityMenu = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, children: [
|
|
455
|
+
/* @__PURE__ */ jsx4("rect", { x: "3", y: "8", width: "3", height: "8", rx: "1" }),
|
|
456
|
+
/* @__PURE__ */ jsx4("rect", { x: "9", y: "4", width: "3", height: "16", rx: "1" }),
|
|
457
|
+
/* @__PURE__ */ jsx4("rect", { x: "15", y: "6", width: "3", height: "12", rx: "1" })
|
|
458
|
+
] });
|
|
459
|
+
var Compare = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, children: [
|
|
460
|
+
/* @__PURE__ */ jsx4("rect", { x: "3", y: "3", width: "12", height: "12", rx: "1.5", fill: "none" }),
|
|
461
|
+
/* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "12", height: "12", rx: "1.5", fill: "none" }),
|
|
462
|
+
/* @__PURE__ */ jsx4("line", { x1: "3", y1: "21", x2: "21", y2: "3", stroke: "currentColor", strokeWidth: "1.2", strokeDasharray: "3 2" })
|
|
463
|
+
] });
|
|
464
|
+
var Intersect = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs4("svg", { ...base(null, size, style), className, strokeWidth: 1.75, children: [
|
|
465
|
+
/* @__PURE__ */ jsx4("circle", { cx: "9", cy: "12", r: "6" }),
|
|
466
|
+
/* @__PURE__ */ jsx4("circle", { cx: "15", cy: "12", r: "6" })
|
|
467
|
+
] });
|
|
468
|
+
var Megaphone = ({ size = 18, className, style }) => /* @__PURE__ */ jsx4("svg", { ...base(null, size, style), className, strokeWidth: 1.75, children: /* @__PURE__ */ jsx4("path", { d: "M3 11l19-9-9 19-2-8-8-2z" }) });
|
|
469
|
+
|
|
470
|
+
// src/components/icons/SettingsIcons.tsx
|
|
471
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
472
|
+
var Sun = ({ size = 15, className, style }) => /* @__PURE__ */ jsxs5("svg", { ...base(null, size, style), className, strokeWidth: 2, children: [
|
|
473
|
+
/* @__PURE__ */ jsx5("circle", { cx: "12", cy: "12", r: "5" }),
|
|
474
|
+
/* @__PURE__ */ jsx5("line", { x1: "12", y1: "1", x2: "12", y2: "3" }),
|
|
475
|
+
/* @__PURE__ */ jsx5("line", { x1: "12", y1: "21", x2: "12", y2: "23" }),
|
|
476
|
+
/* @__PURE__ */ jsx5("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }),
|
|
477
|
+
/* @__PURE__ */ jsx5("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }),
|
|
478
|
+
/* @__PURE__ */ jsx5("line", { x1: "1", y1: "12", x2: "3", y2: "12" }),
|
|
479
|
+
/* @__PURE__ */ jsx5("line", { x1: "21", y1: "12", x2: "23", y2: "12" }),
|
|
480
|
+
/* @__PURE__ */ jsx5("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }),
|
|
481
|
+
/* @__PURE__ */ jsx5("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })
|
|
482
|
+
] });
|
|
483
|
+
var Moon = ({ size = 15, className, style }) => /* @__PURE__ */ jsx5("svg", { ...base(null, size, style), className, strokeWidth: 2, children: /* @__PURE__ */ jsx5("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
|
|
484
|
+
var Gear = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs5("svg", { ...base(null, size, style), className, children: [
|
|
485
|
+
/* @__PURE__ */ jsx5("circle", { cx: "12", cy: "12", r: "3" }),
|
|
486
|
+
/* @__PURE__ */ jsx5("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
|
|
487
|
+
] });
|
|
488
|
+
var Clock = ({ size = 13, className, style }) => /* @__PURE__ */ jsxs5("svg", { ...base(null, size, style), className, children: [
|
|
489
|
+
/* @__PURE__ */ jsx5("circle", { cx: "12", cy: "12", r: "10" }),
|
|
490
|
+
/* @__PURE__ */ jsx5("polyline", { points: "12 6 12 12 16 14" })
|
|
491
|
+
] });
|
|
492
|
+
|
|
493
|
+
// src/components/icons/LogoIcons.tsx
|
|
494
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
495
|
+
var LogoMark = ({
|
|
496
|
+
size = 28,
|
|
497
|
+
className
|
|
498
|
+
}) => /* @__PURE__ */ jsxs6(
|
|
499
|
+
"svg",
|
|
500
|
+
{
|
|
501
|
+
width: size,
|
|
502
|
+
height: size,
|
|
503
|
+
className: `${className} w-[${size}px] h-[${size}px]`,
|
|
504
|
+
viewBox: "0 0 32 32",
|
|
505
|
+
fill: "none",
|
|
506
|
+
children: [
|
|
507
|
+
/* @__PURE__ */ jsx6("rect", { width: "32", height: "32", rx: "8", fill: "none" }),
|
|
508
|
+
/* @__PURE__ */ jsx6("path", { d: "M5 9 L5 5 L9 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square" }),
|
|
509
|
+
/* @__PURE__ */ jsx6("path", { d: "M23 5 L27 5 L27 9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square" }),
|
|
510
|
+
/* @__PURE__ */ jsx6("path", { d: "M5 23 L5 27 L9 27", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square" }),
|
|
511
|
+
/* @__PURE__ */ jsx6("path", { d: "M23 27 L27 27 L27 23", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square", className: "opacity-50" }),
|
|
512
|
+
/* @__PURE__ */ jsxs6("g", { fill: "currentColor", children: [
|
|
513
|
+
/* @__PURE__ */ jsx6("rect", { x: "15", y: "10", width: "2", height: "14" }),
|
|
514
|
+
/* @__PURE__ */ jsx6("rect", { x: "10", y: "10", width: "12", height: "2" })
|
|
515
|
+
] })
|
|
516
|
+
]
|
|
517
|
+
}
|
|
518
|
+
);
|
|
519
|
+
|
|
520
|
+
// src/components/icons/FormsIcons.tsx
|
|
521
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
522
|
+
var FormIcon = ({ size = 18, className, style }) => /* @__PURE__ */ jsxs7("svg", { ...base(null, size, style), className, children: [
|
|
523
|
+
/* @__PURE__ */ jsx7("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
524
|
+
/* @__PURE__ */ jsx7("path", { d: "M8 7h8M8 11h8M8 15h5" })
|
|
525
|
+
] });
|
|
526
|
+
var CalendarWeek = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs7("svg", { ...base(null, size, style), className, children: [
|
|
527
|
+
/* @__PURE__ */ jsx7("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
|
|
528
|
+
/* @__PURE__ */ jsx7("path", { d: "M16 2v4M8 2v4M3 10h18" }),
|
|
529
|
+
/* @__PURE__ */ jsx7("path", { d: "M8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01M16 18h.01" })
|
|
530
|
+
] });
|
|
531
|
+
var CalendarMonth = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs7("svg", { ...base(null, size, style), className, children: [
|
|
532
|
+
/* @__PURE__ */ jsx7("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
|
|
533
|
+
/* @__PURE__ */ jsx7("path", { d: "M16 2v4M8 2v4M3 10h18" }),
|
|
534
|
+
/* @__PURE__ */ jsx7("rect", { x: "7", y: "14", width: "4", height: "4", rx: "0.5" }),
|
|
535
|
+
/* @__PURE__ */ jsx7("rect", { x: "13", y: "14", width: "4", height: "4", rx: "0.5" }),
|
|
536
|
+
/* @__PURE__ */ jsx7("rect", { x: "7", y: "18", width: "4", height: "2", rx: "0.5" }),
|
|
537
|
+
/* @__PURE__ */ jsx7("rect", { x: "13", y: "18", width: "4", height: "2", rx: "0.5" })
|
|
538
|
+
] });
|
|
539
|
+
var NumberIcon = ({ size = 14, className, style }) => /* @__PURE__ */ jsx7("svg", { ...base(null, size, style), className, children: /* @__PURE__ */ jsx7("text", { x: "4", y: "18", fontSize: "18", fontWeight: "bold", fill: "currentColor", stroke: "none", children: "12" }) });
|
|
540
|
+
var TextIcon = ({ size = 14, className, style }) => /* @__PURE__ */ jsx7("svg", { ...base(null, size, style), className, children: /* @__PURE__ */ jsx7("text", { x: "6", y: "18", fontSize: "20", fontWeight: "bold", fill: "currentColor", stroke: "none", children: "T" }) });
|
|
541
|
+
var FormulaIcon = ({ size = 14, className, style }) => /* @__PURE__ */ jsxs7("svg", { ...base(null, size, style), className, children: [
|
|
542
|
+
/* @__PURE__ */ jsx7("text", { x: "3", y: "16", fontSize: "20", fontWeight: "bold", fill: "currentColor", stroke: "none", children: "\u0192" }),
|
|
543
|
+
/* @__PURE__ */ jsx7("text", { x: "12", y: "16", fontSize: "16", fill: "currentColor", stroke: "none", children: "x" })
|
|
544
|
+
] });
|
|
545
|
+
|
|
546
|
+
// src/components/icons/StatusIcons.tsx
|
|
547
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
548
|
+
var RefreshCw = ({ size = 15, className, spinning, style }) => /* @__PURE__ */ jsxs8("svg", { ...base(null, size, style), className: `${spinning ? "animate-spin" : ""} ${className ?? ""}`, children: [
|
|
549
|
+
/* @__PURE__ */ jsx8("path", { d: "M23 4v6h-6" }),
|
|
550
|
+
/* @__PURE__ */ jsx8("path", { d: "M1 20v-6h6" }),
|
|
551
|
+
/* @__PURE__ */ jsx8("path", { d: "M3.51 9a9 9 0 0 1 14.85-3.36L23 10" }),
|
|
552
|
+
/* @__PURE__ */ jsx8("path", { d: "M20.49 15a9 9 0 0 1-14.85 3.36L1 14" })
|
|
553
|
+
] });
|
|
554
|
+
var Database = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs8("svg", { ...base(null, size, style), className, children: [
|
|
555
|
+
/* @__PURE__ */ jsx8("ellipse", { cx: "12", cy: "5", rx: "9", ry: "3" }),
|
|
556
|
+
/* @__PURE__ */ jsx8("path", { d: "M21 12c0 1.66-4 3-9 3s-9-1.34-9-3" }),
|
|
557
|
+
/* @__PURE__ */ jsx8("path", { d: "M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5" })
|
|
558
|
+
] });
|
|
559
|
+
var Server = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs8("svg", { ...base(null, size, style), className, children: [
|
|
560
|
+
/* @__PURE__ */ jsx8("rect", { x: "2", y: "2", width: "20", height: "8", rx: "2", ry: "2" }),
|
|
561
|
+
/* @__PURE__ */ jsx8("rect", { x: "2", y: "14", width: "20", height: "8", rx: "2", ry: "2" }),
|
|
562
|
+
/* @__PURE__ */ jsx8("line", { x1: "6", y1: "6", x2: "6", y2: "6.01" }),
|
|
563
|
+
/* @__PURE__ */ jsx8("line", { x1: "6", y1: "18", x2: "6", y2: "18.01" })
|
|
564
|
+
] });
|
|
565
|
+
var Activity = ({ size = 16, className, style }) => /* @__PURE__ */ jsx8("svg", { ...base(null, size, style), className, children: /* @__PURE__ */ jsx8("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" }) });
|
|
566
|
+
var Cpu = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs8("svg", { ...base(null, size, style), className, children: [
|
|
567
|
+
/* @__PURE__ */ jsx8("rect", { x: "4", y: "4", width: "16", height: "16", rx: "2", ry: "2" }),
|
|
568
|
+
/* @__PURE__ */ jsx8("rect", { x: "9", y: "9", width: "6", height: "6" }),
|
|
569
|
+
/* @__PURE__ */ jsx8("line", { x1: "9", y1: "1", x2: "9", y2: "4" }),
|
|
570
|
+
/* @__PURE__ */ jsx8("line", { x1: "15", y1: "1", x2: "15", y2: "4" }),
|
|
571
|
+
/* @__PURE__ */ jsx8("line", { x1: "9", y1: "20", x2: "9", y2: "23" }),
|
|
572
|
+
/* @__PURE__ */ jsx8("line", { x1: "15", y1: "20", x2: "15", y2: "23" }),
|
|
573
|
+
/* @__PURE__ */ jsx8("line", { x1: "1", y1: "9", x2: "4", y2: "9" }),
|
|
574
|
+
/* @__PURE__ */ jsx8("line", { x1: "1", y1: "15", x2: "4", y2: "15" }),
|
|
575
|
+
/* @__PURE__ */ jsx8("line", { x1: "20", y1: "9", x2: "23", y2: "9" }),
|
|
576
|
+
/* @__PURE__ */ jsx8("line", { x1: "20", y1: "15", x2: "23", y2: "15" })
|
|
577
|
+
] });
|
|
578
|
+
var Zap = ({ size = 16, className, style }) => /* @__PURE__ */ jsx8("svg", { ...base(null, size, style), className, children: /* @__PURE__ */ jsx8("polygon", { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" }) });
|
|
579
|
+
var HardDrive = ({ size = 16, className, style }) => /* @__PURE__ */ jsxs8("svg", { ...base(null, size, style), className, children: [
|
|
580
|
+
/* @__PURE__ */ jsx8("line", { x1: "22", y1: "12", x2: "2", y2: "12" }),
|
|
581
|
+
/* @__PURE__ */ jsx8("path", { d: "M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }),
|
|
582
|
+
/* @__PURE__ */ jsx8("line", { x1: "6", y1: "16", x2: "6.01", y2: "16" }),
|
|
583
|
+
/* @__PURE__ */ jsx8("line", { x1: "10", y1: "16", x2: "10.01", y2: "16" })
|
|
584
|
+
] });
|
|
585
|
+
|
|
586
|
+
// src/components/icons/LayoutIcons.tsx
|
|
587
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
588
|
+
var SectionIcons = {
|
|
589
|
+
studenti: /* @__PURE__ */ jsx9(Users, { size: 13 }),
|
|
590
|
+
nastava: /* @__PURE__ */ jsx9(Book, { size: 13 }),
|
|
591
|
+
evidencija: /* @__PURE__ */ jsx9(CheckSquare, { size: 13 }),
|
|
592
|
+
analitika: /* @__PURE__ */ jsx9(BarChart, { size: 13 }),
|
|
593
|
+
forme: /* @__PURE__ */ jsx9(FormIcon, { size: 13 }),
|
|
594
|
+
nastavaS: /* @__PURE__ */ jsx9(CalendarWeek, { size: 13 }),
|
|
595
|
+
evidencijaS: /* @__PURE__ */ jsx9(CheckSquare, { size: 13 })
|
|
596
|
+
};
|
|
597
|
+
var Icons = {
|
|
598
|
+
clipboard: /* @__PURE__ */ jsx9(Faculty, { size: 18 }),
|
|
599
|
+
postClipboard: /* @__PURE__ */ jsx9(Clipboard, { size: 18 }),
|
|
600
|
+
university: /* @__PURE__ */ jsx9(University, { size: 18 }),
|
|
601
|
+
users: /* @__PURE__ */ jsx9(Users, { size: 18 }),
|
|
602
|
+
book: /* @__PURE__ */ jsx9(Book, { size: 18 }),
|
|
603
|
+
layers: /* @__PURE__ */ jsx9(Layers, { size: 18 }),
|
|
604
|
+
officeHours: /* @__PURE__ */ jsx9(OfficeHours, { size: 18 }),
|
|
605
|
+
calendar: /* @__PURE__ */ jsx9(Calendar, { size: 18 }),
|
|
606
|
+
calendarAlt: /* @__PURE__ */ jsx9(CalendarWeek, { size: 18 }),
|
|
607
|
+
checkSquare: /* @__PURE__ */ jsx9(CheckSquare, { size: 18 }),
|
|
608
|
+
barChart: /* @__PURE__ */ jsx9(BarChart, { size: 18 }),
|
|
609
|
+
qrCode: /* @__PURE__ */ jsx9(QrCode, { size: 18 }),
|
|
610
|
+
home: /* @__PURE__ */ jsx9(Home, { size: 18 }),
|
|
611
|
+
scan: /* @__PURE__ */ jsx9(Scan, { size: 18 }),
|
|
612
|
+
lock: /* @__PURE__ */ jsx9(LockIcon, { size: 16 }),
|
|
613
|
+
logOut: /* @__PURE__ */ jsx9(LogOut, { size: 16 }),
|
|
614
|
+
logOutAlt: /* @__PURE__ */ jsx9(LogOut, { size: 16 }),
|
|
615
|
+
user: /* @__PURE__ */ jsx9(User, { size: 16 }),
|
|
616
|
+
cancel: /* @__PURE__ */ jsx9(X, { size: 16 }),
|
|
617
|
+
report: /* @__PURE__ */ jsx9(Report, { size: 18 }),
|
|
618
|
+
table: /* @__PURE__ */ jsx9(Table, { size: 18 }),
|
|
619
|
+
gear: /* @__PURE__ */ jsx9(Gear, { size: 16 }),
|
|
620
|
+
formIcon: /* @__PURE__ */ jsx9(FormIcon, { size: 18 }),
|
|
621
|
+
grades: /* @__PURE__ */ jsx9(BarChart, { size: 18 }),
|
|
622
|
+
activity: /* @__PURE__ */ jsx9(ActivityMenu, { size: 18 }),
|
|
623
|
+
zap: /* @__PURE__ */ jsx9(Zap, { size: 18 }),
|
|
624
|
+
compare: /* @__PURE__ */ jsx9(Compare, { size: 18 }),
|
|
625
|
+
intersect: /* @__PURE__ */ jsx9(Intersect, { size: 18 }),
|
|
626
|
+
repeat: /* @__PURE__ */ jsx9(Repeat, { size: 18 }),
|
|
627
|
+
info: /* @__PURE__ */ jsx9(Info, { size: 16 }),
|
|
628
|
+
todos: /* @__PURE__ */ jsx9(CheckSquare, { size: 18 }),
|
|
629
|
+
eyeOff: /* @__PURE__ */ jsx9(EyeOff, { size: 18 }),
|
|
630
|
+
userMinus: /* @__PURE__ */ jsx9(UserMinus, { size: 18 }),
|
|
631
|
+
fileText: /* @__PURE__ */ jsx9(FileText, { size: 18 }),
|
|
632
|
+
megaphone: /* @__PURE__ */ jsx9(Megaphone, { size: 18 }),
|
|
633
|
+
grid: /* @__PURE__ */ jsx9(Grid, { size: 18 }),
|
|
634
|
+
userCheck: /* @__PURE__ */ jsx9(UserCheck, { size: 18 }),
|
|
635
|
+
fm: /* @__PURE__ */ jsx9(UserCog, { size: 18 }),
|
|
636
|
+
history: /* @__PURE__ */ jsx9(History, { size: 18 }),
|
|
637
|
+
externalLink: /* @__PURE__ */ jsx9(ExternalLink, { size: 18 })
|
|
638
|
+
};
|
|
639
|
+
|
|
640
|
+
// src/components/forms/Button.tsx
|
|
641
|
+
import { createElement, isValidElement } from "react";
|
|
642
|
+
|
|
643
|
+
// src/components/feedback/Spinner.tsx
|
|
644
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
645
|
+
var Spinner = ({ size = "w-3 h-3", color = "text-primary-700" }) => /* @__PURE__ */ jsx10(
|
|
646
|
+
"svg",
|
|
647
|
+
{
|
|
648
|
+
className: `inline-block ${size} animate-spin ${color}`,
|
|
649
|
+
viewBox: "0 0 24 24",
|
|
650
|
+
fill: "none",
|
|
651
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
652
|
+
children: /* @__PURE__ */ jsx10(
|
|
653
|
+
"circle",
|
|
654
|
+
{
|
|
655
|
+
cx: "12",
|
|
656
|
+
cy: "12",
|
|
657
|
+
r: "10",
|
|
658
|
+
stroke: "currentColor",
|
|
659
|
+
strokeWidth: "3",
|
|
660
|
+
strokeLinecap: "round",
|
|
661
|
+
strokeDasharray: "31.4 31.4",
|
|
662
|
+
strokeDashoffset: "15.7"
|
|
663
|
+
}
|
|
664
|
+
)
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
|
|
668
|
+
// src/components/forms/Button.tsx
|
|
669
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
670
|
+
var TOKEN_BASE = "inline-flex items-center justify-center gap-2 cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed transition-all duration-150";
|
|
671
|
+
var variantClasses = {
|
|
672
|
+
primary: "btn-primary",
|
|
673
|
+
secondary: "btn-secondary",
|
|
674
|
+
danger: "btn-danger",
|
|
675
|
+
ghost: `${TOKEN_BASE} font-medium border border-transparent
|
|
676
|
+
text-[var(--color-txt-3)] hover:border-[var(--color-primary-300)] hover:text-[var(--color-primary-300)]`,
|
|
677
|
+
success: `${TOKEN_BASE} border border-[var(--color-good)] text-[var(--color-good)]
|
|
678
|
+
bg-transparent hover:bg-[rgba(77,214,163,0.08)]`,
|
|
679
|
+
warning: `${TOKEN_BASE} border border-[var(--color-warn)] text-[var(--color-warn)]
|
|
680
|
+
bg-transparent hover:bg-[rgba(255,122,77,0.08)]`,
|
|
681
|
+
info: `${TOKEN_BASE} border border-[var(--color-primary-300)] text-[var(--color-primary-300)]
|
|
682
|
+
bg-transparent hover:bg-[rgba(94,231,255,0.08)]`,
|
|
683
|
+
"muted-primary": `${TOKEN_BASE} border border-[var(--color-primary-300)] text-[var(--color-primary-300)]
|
|
684
|
+
bg-[rgba(94,231,255,0.06)] hover:bg-[rgba(94,231,255,0.12)]`,
|
|
685
|
+
"outline-primary": `${TOKEN_BASE} border border-[var(--color-primary-300)] text-[var(--color-primary-300)]
|
|
686
|
+
hover:bg-[rgba(94,231,255,0.08)]`,
|
|
687
|
+
"outline-secondary": `${TOKEN_BASE} border border-[var(--color-border-hi)] text-[var(--color-txt-2)]
|
|
688
|
+
hover:border-[var(--color-txt-2)] hover:text-[var(--color-txt-1)]`,
|
|
689
|
+
"outline-danger": `${TOKEN_BASE} border border-[var(--color-warn)] text-[var(--color-warn)]
|
|
690
|
+
hover:bg-[rgba(255,122,77,0.08)]`,
|
|
691
|
+
"outline-success": `${TOKEN_BASE} border border-[var(--color-good)] text-[var(--color-good)]
|
|
692
|
+
hover:bg-[rgba(77,214,163,0.08)]`,
|
|
693
|
+
link: "text-[var(--color-primary-300)] hover:text-[var(--color-primary-400)] disabled:opacity-40 disabled:cursor-not-allowed inline-flex items-center gap-1"
|
|
694
|
+
};
|
|
695
|
+
var sizeClasses = {
|
|
696
|
+
xs: "px-2 py-1 text-xs gap-1",
|
|
697
|
+
sm: "px-3 py-1.5 text-xs gap-1.5",
|
|
698
|
+
md: "px-4 py-2 text-sm gap-2",
|
|
699
|
+
lg: "px-5 py-2.5 text-sm gap-2",
|
|
700
|
+
xl: "px-6 py-3 text-base gap-2.5"
|
|
701
|
+
};
|
|
702
|
+
function Button({
|
|
703
|
+
children,
|
|
704
|
+
onClick,
|
|
705
|
+
disabled,
|
|
706
|
+
loading,
|
|
707
|
+
variant = "primary",
|
|
708
|
+
size = "md",
|
|
709
|
+
icon,
|
|
710
|
+
iconRight,
|
|
711
|
+
className = "",
|
|
712
|
+
type = "button",
|
|
713
|
+
title,
|
|
714
|
+
fullWidth
|
|
715
|
+
}) {
|
|
716
|
+
const isDisabled = disabled || loading;
|
|
717
|
+
const isLink = variant === "link";
|
|
718
|
+
const shouldApplySize = !isLink;
|
|
719
|
+
const renderedIcon = renderIcon(icon);
|
|
720
|
+
const renderedIconRight = renderIcon(iconRight);
|
|
721
|
+
return /* @__PURE__ */ jsxs9(
|
|
722
|
+
"button",
|
|
723
|
+
{
|
|
724
|
+
type,
|
|
725
|
+
onClick,
|
|
726
|
+
disabled: isDisabled,
|
|
727
|
+
title,
|
|
728
|
+
className: [
|
|
729
|
+
variantClasses[variant],
|
|
730
|
+
shouldApplySize ? sizeClasses[size] : "",
|
|
731
|
+
fullWidth ? "w-full" : "",
|
|
732
|
+
className
|
|
733
|
+
].filter(Boolean).join(" "),
|
|
734
|
+
children: [
|
|
735
|
+
loading ? /* @__PURE__ */ jsx11(Spinner, { color: variant === "primary" ? "text-black" : "text-[var(--color-txt-2)]" }) : renderedIcon ? /* @__PURE__ */ jsx11("span", { children: renderedIcon }) : null,
|
|
736
|
+
children,
|
|
737
|
+
!loading && renderedIconRight
|
|
738
|
+
]
|
|
739
|
+
}
|
|
740
|
+
);
|
|
741
|
+
}
|
|
742
|
+
function renderIcon(icon) {
|
|
743
|
+
if (!icon) return null;
|
|
744
|
+
if (isValidElement(icon)) return icon;
|
|
745
|
+
if (typeof icon === "function") {
|
|
746
|
+
return createElement(icon, { size: 14, strokeWidth: 1.75 });
|
|
747
|
+
}
|
|
748
|
+
return icon;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
// src/components/forms/Input.tsx
|
|
752
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
753
|
+
function Input({ className = "", invalid = false, ...props }) {
|
|
754
|
+
return /* @__PURE__ */ jsx12(
|
|
755
|
+
"input",
|
|
756
|
+
{
|
|
757
|
+
...props,
|
|
758
|
+
className: [
|
|
759
|
+
"input-field",
|
|
760
|
+
invalid ? "border-warn focus:border-warn" : "",
|
|
761
|
+
className
|
|
762
|
+
].filter(Boolean).join(" ")
|
|
763
|
+
}
|
|
764
|
+
);
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
// src/components/forms/Select.tsx
|
|
768
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
769
|
+
function Select({ className = "", invalid = false, ...props }) {
|
|
770
|
+
return /* @__PURE__ */ jsx13(
|
|
771
|
+
"select",
|
|
772
|
+
{
|
|
773
|
+
...props,
|
|
774
|
+
className: [
|
|
775
|
+
"input-field",
|
|
776
|
+
invalid ? "border-warn focus:border-warn" : "",
|
|
777
|
+
className
|
|
778
|
+
].filter(Boolean).join(" ")
|
|
779
|
+
}
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
// src/components/forms/Textarea.tsx
|
|
784
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
785
|
+
function Textarea({ className = "", invalid = false, ...props }) {
|
|
786
|
+
return /* @__PURE__ */ jsx14(
|
|
787
|
+
"textarea",
|
|
788
|
+
{
|
|
789
|
+
...props,
|
|
790
|
+
className: [
|
|
791
|
+
"input-field",
|
|
792
|
+
invalid ? "border-warn focus:border-warn" : "",
|
|
793
|
+
className
|
|
794
|
+
].filter(Boolean).join(" ")
|
|
795
|
+
}
|
|
796
|
+
);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
// src/components/forms/FieldLabel.tsx
|
|
800
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
801
|
+
function FieldLabel({ children, className = "", ...props }) {
|
|
802
|
+
return /* @__PURE__ */ jsx15("label", { ...props, className: `kicker mb-1 block ${className}`.trim(), children });
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
// src/components/forms/FieldHint.tsx
|
|
806
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
807
|
+
function FieldHint({ children, className = "", ...props }) {
|
|
808
|
+
return /* @__PURE__ */ jsx16("p", { ...props, className: `font-mono text-[10px] text-txt-4 ${className}`.trim(), children });
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
// src/components/forms/Checkbox.tsx
|
|
812
|
+
import { useId, useState } from "react";
|
|
813
|
+
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
814
|
+
var sizeMap = {
|
|
815
|
+
sm: { box: "w-3.5 h-3.5", icon: 10, text: "text-xs", gap: "gap-1.5" },
|
|
816
|
+
md: { box: "w-4 h-4", icon: 11, text: "text-sm", gap: "gap-2" },
|
|
817
|
+
lg: { box: "w-5 h-5", icon: 13, text: "text-base", gap: "gap-2.5" }
|
|
818
|
+
};
|
|
819
|
+
function Checkbox({
|
|
820
|
+
label,
|
|
821
|
+
size = "md",
|
|
822
|
+
className = "",
|
|
823
|
+
id: providedId,
|
|
824
|
+
checked,
|
|
825
|
+
defaultChecked,
|
|
826
|
+
onChange,
|
|
827
|
+
...props
|
|
828
|
+
}) {
|
|
829
|
+
const generatedId = useId();
|
|
830
|
+
const id = providedId ?? generatedId;
|
|
831
|
+
const s = sizeMap[size];
|
|
832
|
+
const isControlled = checked !== void 0;
|
|
833
|
+
const [internalChecked, setInternalChecked] = useState(defaultChecked ?? false);
|
|
834
|
+
const isChecked = isControlled ? checked : internalChecked;
|
|
835
|
+
const [focused, setFocused] = useState(false);
|
|
836
|
+
return /* @__PURE__ */ jsxs10(
|
|
837
|
+
"label",
|
|
838
|
+
{
|
|
839
|
+
htmlFor: id,
|
|
840
|
+
className: `inline-flex items-center ${s.gap} cursor-pointer select-none group ${props.disabled ? "opacity-50 cursor-not-allowed pointer-events-none" : ""} ${className}`,
|
|
841
|
+
children: [
|
|
842
|
+
/* @__PURE__ */ jsxs10("span", { className: "relative shrink-0", children: [
|
|
843
|
+
/* @__PURE__ */ jsx17(
|
|
844
|
+
"input",
|
|
845
|
+
{
|
|
846
|
+
...props,
|
|
847
|
+
id,
|
|
848
|
+
type: "checkbox",
|
|
849
|
+
checked: isControlled ? checked : internalChecked,
|
|
850
|
+
onChange: (e) => {
|
|
851
|
+
if (!isControlled) setInternalChecked(e.target.checked);
|
|
852
|
+
onChange?.(e);
|
|
853
|
+
},
|
|
854
|
+
onFocus: () => setFocused(true),
|
|
855
|
+
onBlur: () => setFocused(false),
|
|
856
|
+
className: "sr-only"
|
|
857
|
+
}
|
|
858
|
+
),
|
|
859
|
+
/* @__PURE__ */ jsx17(
|
|
860
|
+
"span",
|
|
861
|
+
{
|
|
862
|
+
className: `
|
|
863
|
+
flex items-center justify-center ${s.box}
|
|
864
|
+
border transition-all duration-150
|
|
865
|
+
${isChecked ? "bg-primary-300 border-primary-300" : "bg-ink-400 border-border-hi group-hover:border-primary-400"}
|
|
866
|
+
${focused ? "ring-1 ring-primary-300" : ""}
|
|
867
|
+
`,
|
|
868
|
+
children: isChecked && /* @__PURE__ */ jsx17(
|
|
869
|
+
"svg",
|
|
870
|
+
{
|
|
871
|
+
width: s.icon,
|
|
872
|
+
height: s.icon,
|
|
873
|
+
viewBox: "0 0 12 12",
|
|
874
|
+
fill: "none",
|
|
875
|
+
stroke: "#000",
|
|
876
|
+
strokeWidth: "2.2",
|
|
877
|
+
strokeLinecap: "square",
|
|
878
|
+
children: /* @__PURE__ */ jsx17("polyline", { points: "1.5,6 4.5,9.5 10.5,2.5" })
|
|
879
|
+
}
|
|
880
|
+
)
|
|
881
|
+
}
|
|
882
|
+
)
|
|
883
|
+
] }),
|
|
884
|
+
label && /* @__PURE__ */ jsx17("span", { className: `${s.text} text-txt-2 group-hover:text-txt-1 transition-colors duration-150`, children: label })
|
|
885
|
+
]
|
|
886
|
+
}
|
|
887
|
+
);
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
// src/components/forms/RadioButton.tsx
|
|
891
|
+
import { useId as useId2, useState as useState2 } from "react";
|
|
892
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
893
|
+
var sizeMap2 = {
|
|
894
|
+
sm: { outer: "w-3.5 h-3.5", inner: "w-1.5 h-1.5", text: "text-xs", gap: "gap-1.5" },
|
|
895
|
+
md: { outer: "w-4 h-4", inner: "w-2 h-2", text: "text-sm", gap: "gap-2" },
|
|
896
|
+
lg: { outer: "w-5 h-5", inner: "w-2.5 h-2.5", text: "text-base", gap: "gap-2.5" }
|
|
897
|
+
};
|
|
898
|
+
function RadioButton({
|
|
899
|
+
label,
|
|
900
|
+
size = "md",
|
|
901
|
+
className = "",
|
|
902
|
+
id: providedId,
|
|
903
|
+
checked,
|
|
904
|
+
defaultChecked,
|
|
905
|
+
onChange,
|
|
906
|
+
...props
|
|
907
|
+
}) {
|
|
908
|
+
const generatedId = useId2();
|
|
909
|
+
const id = providedId ?? generatedId;
|
|
910
|
+
const s = sizeMap2[size];
|
|
911
|
+
const isControlled = checked !== void 0;
|
|
912
|
+
const [internalChecked, setInternalChecked] = useState2(defaultChecked ?? false);
|
|
913
|
+
const isChecked = isControlled ? checked : internalChecked;
|
|
914
|
+
const [focused, setFocused] = useState2(false);
|
|
915
|
+
return /* @__PURE__ */ jsxs11(
|
|
916
|
+
"label",
|
|
917
|
+
{
|
|
918
|
+
htmlFor: id,
|
|
919
|
+
className: `inline-flex items-center ${s.gap} cursor-pointer select-none group ${props.disabled ? "opacity-50 cursor-not-allowed pointer-events-none" : ""} ${className}`,
|
|
920
|
+
children: [
|
|
921
|
+
/* @__PURE__ */ jsxs11("span", { className: "relative shrink-0", children: [
|
|
922
|
+
/* @__PURE__ */ jsx18(
|
|
923
|
+
"input",
|
|
924
|
+
{
|
|
925
|
+
...props,
|
|
926
|
+
id,
|
|
927
|
+
type: "radio",
|
|
928
|
+
checked: isControlled ? checked : internalChecked,
|
|
929
|
+
onChange: (e) => {
|
|
930
|
+
if (!isControlled) setInternalChecked(e.target.checked);
|
|
931
|
+
onChange?.(e);
|
|
932
|
+
},
|
|
933
|
+
onFocus: () => setFocused(true),
|
|
934
|
+
onBlur: () => setFocused(false),
|
|
935
|
+
className: "sr-only"
|
|
936
|
+
}
|
|
937
|
+
),
|
|
938
|
+
/* @__PURE__ */ jsx18(
|
|
939
|
+
"span",
|
|
940
|
+
{
|
|
941
|
+
className: `
|
|
942
|
+
flex items-center justify-center ${s.outer}
|
|
943
|
+
rounded-full border transition-all duration-150
|
|
944
|
+
${isChecked ? "bg-ink-400 border-primary-300 shadow-[0_0_0_1px_var(--color-primary-300)]" : "bg-ink-400 border-border-hi group-hover:border-primary-400"}
|
|
945
|
+
${focused ? "ring-1 ring-primary-300" : ""}
|
|
946
|
+
`,
|
|
947
|
+
children: isChecked && /* @__PURE__ */ jsx18("span", { className: `${s.inner} rounded-full bg-primary-300` })
|
|
948
|
+
}
|
|
949
|
+
)
|
|
950
|
+
] }),
|
|
951
|
+
label && /* @__PURE__ */ jsx18("span", { className: `${s.text} text-txt-2 group-hover:text-txt-1 transition-colors duration-150`, children: label })
|
|
952
|
+
]
|
|
953
|
+
}
|
|
954
|
+
);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
// src/components/feedback/PageSpinner.tsx
|
|
958
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
959
|
+
function PageSpinner() {
|
|
960
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex h-48 flex-col items-center justify-center gap-3", children: [
|
|
961
|
+
/* @__PURE__ */ jsx19(Spinner, { size: "w-8 h-8" }),
|
|
962
|
+
/* @__PURE__ */ jsx19("span", { className: "kicker", children: "loading" })
|
|
963
|
+
] });
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
// src/components/feedback/Toast.tsx
|
|
967
|
+
import { useEffect, useRef, useState as useState3 } from "react";
|
|
968
|
+
import { createPortal } from "react-dom";
|
|
969
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
970
|
+
function Toast({ message, ok, durationMs = 5e3 }) {
|
|
971
|
+
const [progress, setProgress] = useState3(100);
|
|
972
|
+
const [visible, setVisible] = useState3(false);
|
|
973
|
+
const startRef = useRef(null);
|
|
974
|
+
const rafRef = useRef(null);
|
|
975
|
+
useEffect(() => {
|
|
976
|
+
const id = requestAnimationFrame(() => setVisible(true));
|
|
977
|
+
return () => cancelAnimationFrame(id);
|
|
978
|
+
}, []);
|
|
979
|
+
useEffect(() => {
|
|
980
|
+
const tick = (now) => {
|
|
981
|
+
if (!startRef.current) startRef.current = now;
|
|
982
|
+
const elapsed = now - startRef.current;
|
|
983
|
+
setProgress(Math.max(0, 100 - elapsed / durationMs * 100));
|
|
984
|
+
if (elapsed < durationMs) rafRef.current = requestAnimationFrame(tick);
|
|
985
|
+
};
|
|
986
|
+
rafRef.current = requestAnimationFrame(tick);
|
|
987
|
+
return () => {
|
|
988
|
+
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
989
|
+
};
|
|
990
|
+
}, [durationMs]);
|
|
991
|
+
const transform = visible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-2 sm:translate-x-4 sm:translate-y-0";
|
|
992
|
+
const borderColor = ok ? "var(--color-good)" : "var(--color-warn)";
|
|
993
|
+
const accentColor = ok ? "var(--color-good)" : "var(--color-warn)";
|
|
994
|
+
return createPortal(
|
|
995
|
+
/* @__PURE__ */ jsx20("div", { className: "pointer-events-none fixed bottom-20 left-4 right-4 z-60 flex justify-center sm:bottom-auto sm:left-auto sm:right-5 sm:top-5 sm:justify-end", children: /* @__PURE__ */ jsxs13(
|
|
996
|
+
"div",
|
|
997
|
+
{
|
|
998
|
+
className: `${transform} pointer-events-auto relative flex w-full max-w-sm items-center gap-2.5 overflow-hidden px-4 py-3 text-sm font-medium transition-all duration-300 sm:w-auto sm:max-w-xs`,
|
|
999
|
+
style: {
|
|
1000
|
+
background: "var(--color-ink-300)",
|
|
1001
|
+
border: `1px solid ${borderColor}`,
|
|
1002
|
+
borderLeft: `3px solid ${borderColor}`,
|
|
1003
|
+
color: "var(--color-txt-1)"
|
|
1004
|
+
},
|
|
1005
|
+
children: [
|
|
1006
|
+
/* @__PURE__ */ jsx20("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center", style: { color: accentColor }, children: ok ? /* @__PURE__ */ jsx20(Check, { size: 12 }) : /* @__PURE__ */ jsx20(X, { size: 12 }) }),
|
|
1007
|
+
/* @__PURE__ */ jsx20("span", { className: "flex-1 text-[12px] leading-snug sm:text-[13px]", style: { fontFamily: "var(--font-mono)" }, children: message }),
|
|
1008
|
+
/* @__PURE__ */ jsx20(
|
|
1009
|
+
"div",
|
|
1010
|
+
{
|
|
1011
|
+
className: "absolute bottom-0 left-0 h-0.5 transition-none",
|
|
1012
|
+
style: { width: `${progress}%`, background: accentColor }
|
|
1013
|
+
}
|
|
1014
|
+
)
|
|
1015
|
+
]
|
|
1016
|
+
}
|
|
1017
|
+
) }),
|
|
1018
|
+
document.body
|
|
1019
|
+
);
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
// src/components/feedback/ToastProvider.tsx
|
|
1023
|
+
import { createContext, useContext, useMemo, useState as useState4 } from "react";
|
|
1024
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1025
|
+
var ToastContext = createContext(null);
|
|
1026
|
+
function ToastProvider({ children }) {
|
|
1027
|
+
const [toast, setToast] = useState4(null);
|
|
1028
|
+
const value = useMemo(() => ({
|
|
1029
|
+
hideToast: () => setToast(null),
|
|
1030
|
+
showToast: (message, ok, durationMs = 5e3) => {
|
|
1031
|
+
setToast({ message, ok, durationMs });
|
|
1032
|
+
window.setTimeout(() => setToast((current) => current?.message === message && current?.ok === ok ? null : current), durationMs);
|
|
1033
|
+
}
|
|
1034
|
+
}), []);
|
|
1035
|
+
return /* @__PURE__ */ jsxs14(ToastContext.Provider, { value, children: [
|
|
1036
|
+
children,
|
|
1037
|
+
toast ? /* @__PURE__ */ jsx21(Toast, { message: toast.message, ok: toast.ok, durationMs: toast.durationMs }) : null
|
|
1038
|
+
] });
|
|
1039
|
+
}
|
|
1040
|
+
function useToast() {
|
|
1041
|
+
const context = useContext(ToastContext);
|
|
1042
|
+
if (!context) {
|
|
1043
|
+
throw new Error("useToast must be used within ToastProvider");
|
|
1044
|
+
}
|
|
1045
|
+
return context;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
// src/components/feedback/FormError.tsx
|
|
1049
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1050
|
+
function FormError({ message, className = "" }) {
|
|
1051
|
+
if (!message) return null;
|
|
1052
|
+
return /* @__PURE__ */ jsxs15(
|
|
1053
|
+
"div",
|
|
1054
|
+
{
|
|
1055
|
+
className: `flex items-start gap-2 px-3 py-2.5 text-sm ${className}`,
|
|
1056
|
+
style: {
|
|
1057
|
+
background: "color-mix(in srgb, var(--color-warn) 8%, transparent)",
|
|
1058
|
+
border: "1px solid color-mix(in srgb, var(--color-warn) 25%, transparent)",
|
|
1059
|
+
borderLeft: "3px solid var(--color-warn)",
|
|
1060
|
+
color: "var(--color-warn)",
|
|
1061
|
+
animation: "var(--animate-scale-in)"
|
|
1062
|
+
},
|
|
1063
|
+
children: [
|
|
1064
|
+
/* @__PURE__ */ jsx22(Alert, { size: 14, className: "shrink-0 mt-0.5" }),
|
|
1065
|
+
/* @__PURE__ */ jsx22("span", { style: { fontFamily: "var(--font-mono)", fontSize: 12 }, children: message })
|
|
1066
|
+
]
|
|
1067
|
+
}
|
|
1068
|
+
);
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
// src/components/feedback/ErrorBoundary.tsx
|
|
1072
|
+
import { Component } from "react";
|
|
1073
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1074
|
+
var ErrorBoundary = class extends Component {
|
|
1075
|
+
constructor() {
|
|
1076
|
+
super(...arguments);
|
|
1077
|
+
this.state = { hasError: false };
|
|
1078
|
+
}
|
|
1079
|
+
static getDerivedStateFromError() {
|
|
1080
|
+
return { hasError: true };
|
|
1081
|
+
}
|
|
1082
|
+
componentDidCatch(error, info) {
|
|
1083
|
+
console.error("Unhandled UI error", error, info);
|
|
1084
|
+
}
|
|
1085
|
+
render() {
|
|
1086
|
+
if (this.state.hasError) {
|
|
1087
|
+
return this.props.fallback ?? /* @__PURE__ */ jsx23(DefaultErrorFallback, {});
|
|
1088
|
+
}
|
|
1089
|
+
return this.props.children;
|
|
1090
|
+
}
|
|
1091
|
+
};
|
|
1092
|
+
function DefaultErrorFallback({
|
|
1093
|
+
title = "Something went wrong",
|
|
1094
|
+
description = "An unexpected error occurred. Reload the page and try again.",
|
|
1095
|
+
label = "Tapiz UI \xB7 Runtime Error",
|
|
1096
|
+
reloadLabel = "Reload page"
|
|
1097
|
+
}) {
|
|
1098
|
+
return /* @__PURE__ */ jsxs16("div", { className: "fixed inset-0 flex flex-col items-center justify-center overflow-hidden bg-ink-100 px-6", children: [
|
|
1099
|
+
/* @__PURE__ */ jsx23(GridBg, {}),
|
|
1100
|
+
/* @__PURE__ */ jsx23(Spotlight, { color: "rgba(255,100,100,0.06)" }),
|
|
1101
|
+
/* @__PURE__ */ jsxs16("div", { className: "relative z-10 flex w-full max-w-sm animate-fade-in-up flex-col items-center gap-6 text-center", children: [
|
|
1102
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1103
|
+
/* @__PURE__ */ jsx23("div", { className: "font-mono text-[clamp(72px,16vw,120px)] font-bold leading-none tracking-[-0.04em] text-border-hi", children: "500" }),
|
|
1104
|
+
/* @__PURE__ */ jsx23("div", { className: "mt-1 h-0.5 w-full opacity-35 [background:linear-gradient(90deg,transparent,var(--color-warn),transparent)]" })
|
|
1105
|
+
] }),
|
|
1106
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-1.5", children: [
|
|
1107
|
+
/* @__PURE__ */ jsx23("p", { className: "text-base font-semibold text-txt-1", children: title }),
|
|
1108
|
+
/* @__PURE__ */ jsx23("p", { className: "font-mono text-[11px] leading-relaxed text-txt-3", children: description })
|
|
1109
|
+
] }),
|
|
1110
|
+
/* @__PURE__ */ jsx23("div", { className: "bg-[rgba(255,180,0,0.04)] px-2 py-1 font-mono text-[9px] uppercase tracking-[.2em] text-warn [border:1px_solid_rgba(255,180,0,0.2)]", children: label }),
|
|
1111
|
+
/* @__PURE__ */ jsx23("div", { className: "w-full", children: /* @__PURE__ */ jsxs16(
|
|
1112
|
+
"button",
|
|
1113
|
+
{
|
|
1114
|
+
type: "button",
|
|
1115
|
+
onClick: () => window.location.reload(),
|
|
1116
|
+
className: "btn-primary w-full py-2.5 text-xs",
|
|
1117
|
+
children: [
|
|
1118
|
+
reloadLabel,
|
|
1119
|
+
" \u2192"
|
|
1120
|
+
]
|
|
1121
|
+
}
|
|
1122
|
+
) })
|
|
1123
|
+
] })
|
|
1124
|
+
] });
|
|
1125
|
+
}
|
|
1126
|
+
function GridBg() {
|
|
1127
|
+
return /* @__PURE__ */ jsx23("div", { className: "pointer-events-none absolute inset-0 opacity-50 bg-[linear-gradient(var(--color-border)_1px,transparent_1px),linear-gradient(90deg,var(--color-border)_1px,transparent_1px)] bg-size-[32px_32px]" });
|
|
1128
|
+
}
|
|
1129
|
+
function Spotlight({ color }) {
|
|
1130
|
+
return /* @__PURE__ */ jsx23(
|
|
1131
|
+
"div",
|
|
1132
|
+
{
|
|
1133
|
+
className: "pointer-events-none absolute left-1/2 top-1/5 h-60 w-120 -translate-x-1/2",
|
|
1134
|
+
style: { background: `radial-gradient(ellipse at center, ${color} 0%, transparent 70%)` }
|
|
1135
|
+
}
|
|
1136
|
+
);
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
// src/components/modals/BaseModal.tsx
|
|
1140
|
+
import { useId as useId3 } from "react";
|
|
1141
|
+
import { createPortal as createPortal2 } from "react-dom";
|
|
1142
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1143
|
+
var sizeClass = {
|
|
1144
|
+
sm: "max-w-sm",
|
|
1145
|
+
md: "max-w-md",
|
|
1146
|
+
lg: "max-w-lg",
|
|
1147
|
+
xl: "max-w-2xl"
|
|
1148
|
+
};
|
|
1149
|
+
function BaseModal({
|
|
1150
|
+
isOpen,
|
|
1151
|
+
onClose,
|
|
1152
|
+
title,
|
|
1153
|
+
subtitle,
|
|
1154
|
+
children,
|
|
1155
|
+
icon,
|
|
1156
|
+
xShown = false,
|
|
1157
|
+
size = "md",
|
|
1158
|
+
closeLabel = "Close dialog"
|
|
1159
|
+
}) {
|
|
1160
|
+
const titleId = useId3();
|
|
1161
|
+
if (!isOpen) return null;
|
|
1162
|
+
return createPortal2(
|
|
1163
|
+
/* @__PURE__ */ jsx24(
|
|
1164
|
+
"div",
|
|
1165
|
+
{
|
|
1166
|
+
role: "dialog",
|
|
1167
|
+
"aria-modal": "true",
|
|
1168
|
+
"aria-labelledby": titleId,
|
|
1169
|
+
className: "fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
1170
|
+
style: { background: "rgba(5,6,8,0.75)", backdropFilter: "blur(2px)" },
|
|
1171
|
+
onClick: (e) => e.target === e.currentTarget && onClose(),
|
|
1172
|
+
children: /* @__PURE__ */ jsxs17(
|
|
1173
|
+
"div",
|
|
1174
|
+
{
|
|
1175
|
+
className: `w-full ${sizeClass[size]} p-6 space-y-4`,
|
|
1176
|
+
style: {
|
|
1177
|
+
background: "var(--color-ink-200)",
|
|
1178
|
+
border: "1px solid var(--color-border-hi)",
|
|
1179
|
+
borderTop: "2px solid var(--color-primary-300)",
|
|
1180
|
+
animation: "var(--animate-scale-in)"
|
|
1181
|
+
},
|
|
1182
|
+
children: [
|
|
1183
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-start justify-between", children: [
|
|
1184
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-3", children: [
|
|
1185
|
+
icon && /* @__PURE__ */ jsx24(
|
|
1186
|
+
"div",
|
|
1187
|
+
{
|
|
1188
|
+
className: "flex items-center justify-center w-10 h-10 shrink-0",
|
|
1189
|
+
style: { background: "var(--color-ink-300)", border: "1px solid var(--color-border-hi)", color: "var(--color-primary-300)" },
|
|
1190
|
+
children: icon
|
|
1191
|
+
}
|
|
1192
|
+
),
|
|
1193
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
1194
|
+
/* @__PURE__ */ jsx24("h3", { id: titleId, style: { fontFamily: "var(--font-display)", fontSize: 15, fontWeight: 600, color: "var(--color-txt-1)" }, children: title }),
|
|
1195
|
+
subtitle && /* @__PURE__ */ jsx24("p", { style: { fontFamily: "var(--font-mono)", fontSize: 10, color: "var(--color-primary-300)", marginTop: 2, letterSpacing: "0.1em" }, children: subtitle })
|
|
1196
|
+
] })
|
|
1197
|
+
] }),
|
|
1198
|
+
xShown && /* @__PURE__ */ jsx24(
|
|
1199
|
+
"button",
|
|
1200
|
+
{
|
|
1201
|
+
onClick: onClose,
|
|
1202
|
+
className: "w-7 h-7 flex items-center justify-center",
|
|
1203
|
+
style: { color: "var(--color-txt-3)", border: "1px solid transparent" },
|
|
1204
|
+
onMouseEnter: (e) => {
|
|
1205
|
+
e.currentTarget.style.color = "var(--color-txt-1)";
|
|
1206
|
+
e.currentTarget.style.borderColor = "var(--color-border-hi)";
|
|
1207
|
+
},
|
|
1208
|
+
onMouseLeave: (e) => {
|
|
1209
|
+
e.currentTarget.style.color = "var(--color-txt-3)";
|
|
1210
|
+
e.currentTarget.style.borderColor = "transparent";
|
|
1211
|
+
},
|
|
1212
|
+
"aria-label": closeLabel,
|
|
1213
|
+
title: closeLabel,
|
|
1214
|
+
children: /* @__PURE__ */ jsx24(X, { size: 14 })
|
|
1215
|
+
}
|
|
1216
|
+
)
|
|
1217
|
+
] }),
|
|
1218
|
+
children
|
|
1219
|
+
]
|
|
1220
|
+
}
|
|
1221
|
+
)
|
|
1222
|
+
}
|
|
1223
|
+
),
|
|
1224
|
+
document.body
|
|
1225
|
+
);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
// src/components/modals/ConfirmDialog.tsx
|
|
1229
|
+
import { createPortal as createPortal3 } from "react-dom";
|
|
1230
|
+
import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1231
|
+
function ConfirmDialog({
|
|
1232
|
+
title,
|
|
1233
|
+
description,
|
|
1234
|
+
message,
|
|
1235
|
+
confirmLabel,
|
|
1236
|
+
cancelLabel,
|
|
1237
|
+
loading = false,
|
|
1238
|
+
onConfirm,
|
|
1239
|
+
onCancel,
|
|
1240
|
+
icon,
|
|
1241
|
+
danger = false,
|
|
1242
|
+
open = true
|
|
1243
|
+
}) {
|
|
1244
|
+
const resolvedConfirm = confirmLabel ?? "Confirm";
|
|
1245
|
+
const resolvedCancel = cancelLabel ?? "Cancel";
|
|
1246
|
+
const resolvedDescription = description ?? message;
|
|
1247
|
+
if (!open) return null;
|
|
1248
|
+
return createPortal3(
|
|
1249
|
+
/* @__PURE__ */ jsx25(
|
|
1250
|
+
"div",
|
|
1251
|
+
{
|
|
1252
|
+
className: "fixed inset-0 z-300 flex items-center justify-center px-4",
|
|
1253
|
+
style: { background: "rgba(5,6,8,0.4)", backdropFilter: "blur(8px)" },
|
|
1254
|
+
onClick: onCancel,
|
|
1255
|
+
children: /* @__PURE__ */ jsx25(
|
|
1256
|
+
"div",
|
|
1257
|
+
{
|
|
1258
|
+
className: "relative w-full max-w-sm",
|
|
1259
|
+
style: {
|
|
1260
|
+
background: "var(--color-ink-200)",
|
|
1261
|
+
border: "1px solid var(--color-border-hi)",
|
|
1262
|
+
borderTop: danger ? "2px solid var(--color-danger, #f87171)" : "2px solid var(--color-primary-300)",
|
|
1263
|
+
animation: "var(--animate-scale-in)"
|
|
1264
|
+
},
|
|
1265
|
+
onClick: (e) => e.stopPropagation(),
|
|
1266
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "p-6 flex flex-col gap-4", children: [
|
|
1267
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-3", children: [
|
|
1268
|
+
icon && /* @__PURE__ */ jsx25(
|
|
1269
|
+
"div",
|
|
1270
|
+
{
|
|
1271
|
+
className: "flex items-center justify-center w-9 h-9 shrink-0",
|
|
1272
|
+
style: {
|
|
1273
|
+
background: danger ? "rgba(248,113,113,0.1)" : "rgba(94,231,255,0.08)",
|
|
1274
|
+
border: danger ? "1px solid rgba(248,113,113,0.25)" : "1px solid rgba(94,231,255,0.15)",
|
|
1275
|
+
color: danger ? "var(--color-danger, #f87171)" : "var(--color-primary-300)"
|
|
1276
|
+
},
|
|
1277
|
+
children: icon
|
|
1278
|
+
}
|
|
1279
|
+
),
|
|
1280
|
+
/* @__PURE__ */ jsx25("p", { className: "text-sm font-semibold", style: { color: "var(--color-txt-1)" }, children: title })
|
|
1281
|
+
] }),
|
|
1282
|
+
/* @__PURE__ */ jsx25("p", { className: "text-sm", style: { color: "var(--color-txt-3)" }, children: resolvedDescription }),
|
|
1283
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-end gap-2", children: [
|
|
1284
|
+
/* @__PURE__ */ jsx25(Button, { variant: "ghost", size: "sm", icon: /* @__PURE__ */ jsx25(X, { size: 13 }), onClick: onCancel, disabled: loading, children: resolvedCancel }),
|
|
1285
|
+
/* @__PURE__ */ jsx25(
|
|
1286
|
+
Button,
|
|
1287
|
+
{
|
|
1288
|
+
variant: danger ? "danger" : "primary",
|
|
1289
|
+
size: "sm",
|
|
1290
|
+
icon: danger ? /* @__PURE__ */ jsx25(Trash, { size: 13 }) : /* @__PURE__ */ jsx25(Check, { size: 13 }),
|
|
1291
|
+
onClick: onConfirm,
|
|
1292
|
+
loading,
|
|
1293
|
+
children: resolvedConfirm
|
|
1294
|
+
}
|
|
1295
|
+
)
|
|
1296
|
+
] })
|
|
1297
|
+
] })
|
|
1298
|
+
}
|
|
1299
|
+
)
|
|
1300
|
+
}
|
|
1301
|
+
),
|
|
1302
|
+
document.body
|
|
1303
|
+
);
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
// src/components/shared/Tooltip.tsx
|
|
1307
|
+
import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1308
|
+
function Tooltip({ text, children, position = "top", align = "center", width = "max-w-[200px]", wFull }) {
|
|
1309
|
+
const alignClass = align === "right" ? "right-0" : "left-1/2 -translate-x-1/2";
|
|
1310
|
+
return /* @__PURE__ */ jsxs19("span", { className: `group relative inline-flex items-center${wFull ? " w-full" : ""}`, children: [
|
|
1311
|
+
children,
|
|
1312
|
+
/* @__PURE__ */ jsxs19(
|
|
1313
|
+
"span",
|
|
1314
|
+
{
|
|
1315
|
+
className: `pointer-events-none absolute ${alignClass} z-60 ${width} w-max px-2.5 py-1.5
|
|
1316
|
+
text-center text-[11px] leading-snug
|
|
1317
|
+
opacity-0 group-hover:opacity-100 transition-opacity duration-150
|
|
1318
|
+
${position === "top" ? "bottom-full mb-2" : "top-full mt-2"}`,
|
|
1319
|
+
style: {
|
|
1320
|
+
background: "var(--color-ink-300)",
|
|
1321
|
+
border: "1px solid var(--color-border-hi)",
|
|
1322
|
+
color: "var(--color-txt-2)",
|
|
1323
|
+
fontFamily: "var(--font-mono)",
|
|
1324
|
+
letterSpacing: "0.04em"
|
|
1325
|
+
},
|
|
1326
|
+
children: [
|
|
1327
|
+
text,
|
|
1328
|
+
/* @__PURE__ */ jsx26(
|
|
1329
|
+
"span",
|
|
1330
|
+
{
|
|
1331
|
+
className: `absolute left-1/2 -translate-x-1/2 w-0 h-0 border-x-4 border-x-transparent
|
|
1332
|
+
${position === "top" ? "top-full border-t-4" : "bottom-full border-b-4"}`,
|
|
1333
|
+
style: position === "top" ? { borderTopColor: "var(--color-border-hi)" } : { borderBottomColor: "var(--color-border-hi)" }
|
|
1334
|
+
}
|
|
1335
|
+
)
|
|
1336
|
+
]
|
|
1337
|
+
}
|
|
1338
|
+
)
|
|
1339
|
+
] });
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
// src/components/shared/Card.tsx
|
|
1343
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1344
|
+
function Card({ children, className = "", hover = false, style }) {
|
|
1345
|
+
return /* @__PURE__ */ jsx27("div", { className: `card ${hover ? "card-hover transition-all" : ""} ${className}`, style, children });
|
|
1346
|
+
}
|
|
1347
|
+
function CardHeader({ children, className = "" }) {
|
|
1348
|
+
return /* @__PURE__ */ jsx27("div", { className: `border-b border-border px-5 py-3 ${className}`, children });
|
|
1349
|
+
}
|
|
1350
|
+
function CardBody({ children, className = "" }) {
|
|
1351
|
+
return /* @__PURE__ */ jsx27("div", { className: `p-5 ${className}`, children });
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
// src/components/shared/Skeleton.tsx
|
|
1355
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1356
|
+
function Skeleton({ className = "" }) {
|
|
1357
|
+
return /* @__PURE__ */ jsx28("div", { "aria-hidden": "true", className: `skeleton ${className}` });
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
// src/components/shared/SkeletonBlocks.tsx
|
|
1361
|
+
import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1362
|
+
function SkeletonCard({ className = "" }) {
|
|
1363
|
+
return /* @__PURE__ */ jsxs20("div", { className: `card ${className}`.trim(), children: [
|
|
1364
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "mb-3 h-4 w-2/5" }),
|
|
1365
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "mb-2 h-3 w-3/4" }),
|
|
1366
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "h-3 w-1/2" })
|
|
1367
|
+
] });
|
|
1368
|
+
}
|
|
1369
|
+
function SkeletonKpiCard({ delay = 0 }) {
|
|
1370
|
+
return /* @__PURE__ */ jsxs20(
|
|
1371
|
+
"div",
|
|
1372
|
+
{
|
|
1373
|
+
className: "card animate-pulse",
|
|
1374
|
+
style: {
|
|
1375
|
+
animationDelay: `${delay}ms`,
|
|
1376
|
+
minHeight: 142,
|
|
1377
|
+
display: "flex",
|
|
1378
|
+
flexDirection: "column",
|
|
1379
|
+
gap: 8,
|
|
1380
|
+
padding: "16px 18px",
|
|
1381
|
+
borderLeft: "3px solid var(--color-border-hi)"
|
|
1382
|
+
},
|
|
1383
|
+
children: [
|
|
1384
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "mb-1 h-2 w-24" }),
|
|
1385
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "h-8 w-16" }),
|
|
1386
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "mt-1 h-2 w-20" })
|
|
1387
|
+
]
|
|
1388
|
+
}
|
|
1389
|
+
);
|
|
1390
|
+
}
|
|
1391
|
+
function SkeletonBanner() {
|
|
1392
|
+
return /* @__PURE__ */ jsxs20(
|
|
1393
|
+
"div",
|
|
1394
|
+
{
|
|
1395
|
+
className: "animate-pulse overflow-hidden p-5",
|
|
1396
|
+
style: {
|
|
1397
|
+
background: "var(--color-ink-300)",
|
|
1398
|
+
border: "1px solid var(--color-border)",
|
|
1399
|
+
borderTop: "2px solid var(--color-border-hi)"
|
|
1400
|
+
},
|
|
1401
|
+
children: [
|
|
1402
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "mb-2 h-3 w-24" }),
|
|
1403
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "mb-3 h-6 w-48" }),
|
|
1404
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex gap-4", children: [
|
|
1405
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "h-4 w-28" }),
|
|
1406
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "h-4 w-24" }),
|
|
1407
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "h-4 w-20" })
|
|
1408
|
+
] })
|
|
1409
|
+
]
|
|
1410
|
+
}
|
|
1411
|
+
);
|
|
1412
|
+
}
|
|
1413
|
+
function SkeletonTableRow({ cols = 4 }) {
|
|
1414
|
+
const widths = ["w-24", "w-40", "w-32", "w-20", "w-16"];
|
|
1415
|
+
return /* @__PURE__ */ jsx29("tr", { className: "border-b border-border", children: Array.from({ length: cols }).map((_, i) => /* @__PURE__ */ jsx29("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsx29(Skeleton, { className: `h-4 ${widths[i % widths.length]}` }) }, i)) });
|
|
1416
|
+
}
|
|
1417
|
+
function SkeletonTable({ rows = 6, cols = 4 }) {
|
|
1418
|
+
return /* @__PURE__ */ jsx29("div", { className: "card overflow-hidden p-0", children: /* @__PURE__ */ jsx29("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs20("table", { className: "w-full text-sm", children: [
|
|
1419
|
+
/* @__PURE__ */ jsx29("thead", { children: /* @__PURE__ */ jsx29("tr", { className: "border-b border-border bg-ink-300", children: Array.from({ length: cols }).map((_, i) => /* @__PURE__ */ jsx29("th", { className: "px-4 py-3", children: /* @__PURE__ */ jsx29(Skeleton, { className: "h-3 w-16" }) }, i)) }) }),
|
|
1420
|
+
/* @__PURE__ */ jsx29("tbody", { children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsx29(SkeletonTableRow, { cols }, i)) })
|
|
1421
|
+
] }) }) });
|
|
1422
|
+
}
|
|
1423
|
+
function SkeletonPageHeader() {
|
|
1424
|
+
return /* @__PURE__ */ jsxs20("div", { className: "flex animate-pulse items-center justify-between", children: [
|
|
1425
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
1426
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "mb-2 h-7 w-40" }),
|
|
1427
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "h-4 w-24" })
|
|
1428
|
+
] }),
|
|
1429
|
+
/* @__PURE__ */ jsx29(Skeleton, { className: "h-9 w-32" })
|
|
1430
|
+
] });
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
// src/components/shared/Badge.tsx
|
|
1434
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1435
|
+
var variantClasses2 = {
|
|
1436
|
+
default: "border-primary-300 text-primary-300",
|
|
1437
|
+
success: "border-good text-good",
|
|
1438
|
+
warning: "border-signal-400 text-signal-400",
|
|
1439
|
+
danger: "border-warn text-warn",
|
|
1440
|
+
muted: "border-txt-3 text-txt-3"
|
|
1441
|
+
};
|
|
1442
|
+
function Badge({ children, variant = "default", className = "" }) {
|
|
1443
|
+
return /* @__PURE__ */ jsx30(
|
|
1444
|
+
"span",
|
|
1445
|
+
{
|
|
1446
|
+
className: `inline-flex items-center border px-2 py-0.5 font-mono text-[9px] font-bold uppercase tracking-widest ${variantClasses2[variant]} ${className}`,
|
|
1447
|
+
children
|
|
1448
|
+
}
|
|
1449
|
+
);
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
// src/components/shared/EmptyState.tsx
|
|
1453
|
+
import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1454
|
+
function EmptyState({ title, description, message, icon }) {
|
|
1455
|
+
const resolvedTitle = title ?? message ?? "No data";
|
|
1456
|
+
return /* @__PURE__ */ jsxs21("div", { className: "border border-border bg-ink-200 px-4 py-10 text-center", children: [
|
|
1457
|
+
/* @__PURE__ */ jsx31("div", { className: "mb-2 flex justify-center text-txt-4", children: icon ?? /* @__PURE__ */ jsx31(Info, { size: 22 }) }),
|
|
1458
|
+
/* @__PURE__ */ jsx31("p", { className: "font-mono text-[11px] tracking-widest text-txt-4", children: resolvedTitle }),
|
|
1459
|
+
description ? /* @__PURE__ */ jsx31("p", { className: "mt-1 font-mono text-[10px] text-txt-4 opacity-70", children: description }) : null
|
|
1460
|
+
] });
|
|
1461
|
+
}
|
|
1462
|
+
function ErrorState({
|
|
1463
|
+
title = "Failed to load",
|
|
1464
|
+
error
|
|
1465
|
+
}) {
|
|
1466
|
+
return /* @__PURE__ */ jsxs21("div", { className: "border border-warn bg-ink-200 px-4 py-10 text-center", children: [
|
|
1467
|
+
/* @__PURE__ */ jsx31("div", { className: "mb-2 flex justify-center text-warn", children: /* @__PURE__ */ jsx31(Info, { size: 22 }) }),
|
|
1468
|
+
/* @__PURE__ */ jsx31("p", { className: "font-mono text-[11px] tracking-widest text-warn", children: title }),
|
|
1469
|
+
error ? /* @__PURE__ */ jsx31("p", { className: "mt-1 font-mono text-[10px] text-txt-3", children: error.message }) : null
|
|
1470
|
+
] });
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
// src/components/shared/InfoBanner.tsx
|
|
1474
|
+
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1475
|
+
function InfoBanner(props) {
|
|
1476
|
+
if ("text" in props) {
|
|
1477
|
+
const { text, variant = "info", className: className2 = "" } = props;
|
|
1478
|
+
const styles = variant === "warn" ? "bg-warn/8 border-warn/25 text-warn" : variant === "lock" ? "bg-warn/8 border-warn/30 text-warn" : "bg-primary-500/10 border-primary-100 text-primary-500";
|
|
1479
|
+
const icon = variant === "lock" ? /* @__PURE__ */ jsx32(LockIcon, { size: 14, className: "mt-1 shrink-0" }) : /* @__PURE__ */ jsx32(Info, { size: 14, className: "mt-1 shrink-0" });
|
|
1480
|
+
return /* @__PURE__ */ jsxs22("div", { className: `flex items-start gap-2 border px-3 py-2.5 text-[13px] ${styles} ${className2}`, children: [
|
|
1481
|
+
icon,
|
|
1482
|
+
/* @__PURE__ */ jsx32("p", { style: { fontFamily: "var(--font-mono)" }, children: text })
|
|
1483
|
+
] });
|
|
1484
|
+
}
|
|
1485
|
+
const { title, description, className = "" } = props;
|
|
1486
|
+
return /* @__PURE__ */ jsxs22(
|
|
1487
|
+
"div",
|
|
1488
|
+
{
|
|
1489
|
+
className: `px-4 py-3 ${className}`,
|
|
1490
|
+
style: {
|
|
1491
|
+
background: "rgba(94,231,255,0.04)",
|
|
1492
|
+
border: "1px solid rgba(94,231,255,0.12)",
|
|
1493
|
+
borderLeft: "3px solid var(--color-primary-300)"
|
|
1494
|
+
},
|
|
1495
|
+
children: [
|
|
1496
|
+
/* @__PURE__ */ jsx32(
|
|
1497
|
+
"p",
|
|
1498
|
+
{
|
|
1499
|
+
className: "mb-0.5 font-mono text-[10px] font-semibold uppercase tracking-widest",
|
|
1500
|
+
style: { color: "var(--color-primary-300)" },
|
|
1501
|
+
children: title
|
|
1502
|
+
}
|
|
1503
|
+
),
|
|
1504
|
+
/* @__PURE__ */ jsx32("p", { className: "font-mono text-[11px] leading-relaxed", style: { color: "var(--color-txt-2)" }, children: description })
|
|
1505
|
+
]
|
|
1506
|
+
}
|
|
1507
|
+
);
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
// src/components/shared/PageHeader.tsx
|
|
1511
|
+
import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1512
|
+
function PageHeader({ title, subtitle, action, icon, className = "" }) {
|
|
1513
|
+
return /* @__PURE__ */ jsxs23(
|
|
1514
|
+
"div",
|
|
1515
|
+
{
|
|
1516
|
+
className: `mb-5 flex flex-col gap-3 border-b border-border pb-4 animate-fade-in-up sm:flex-row sm:items-start sm:justify-between ${className}`.trim(),
|
|
1517
|
+
children: [
|
|
1518
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
1519
|
+
subtitle ? /* @__PURE__ */ jsx33("div", { className: "kicker mb-1.5 text-primary-300!", children: subtitle }) : null,
|
|
1520
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2.5", children: [
|
|
1521
|
+
icon ? /* @__PURE__ */ jsx33("span", { className: "text-primary-300", children: icon }) : null,
|
|
1522
|
+
/* @__PURE__ */ jsx33("h2", { className: "font-(--font-display) text-[22px] tracking-[-0.03em] text-txt-1", children: title })
|
|
1523
|
+
] })
|
|
1524
|
+
] }),
|
|
1525
|
+
action ? /* @__PURE__ */ jsx33("div", { children: action }) : null
|
|
1526
|
+
]
|
|
1527
|
+
}
|
|
1528
|
+
);
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
// src/components/shared/SearchInput.tsx
|
|
1532
|
+
import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1533
|
+
function SearchInput({
|
|
1534
|
+
value,
|
|
1535
|
+
onChange,
|
|
1536
|
+
placeholder = "Search",
|
|
1537
|
+
wrapperClassName = "",
|
|
1538
|
+
wrapperStyle,
|
|
1539
|
+
inputClassName = "",
|
|
1540
|
+
iconClassName = "text-txt-4",
|
|
1541
|
+
clearable = true,
|
|
1542
|
+
clearTitle = "Clear search",
|
|
1543
|
+
...props
|
|
1544
|
+
}) {
|
|
1545
|
+
return /* @__PURE__ */ jsxs24("div", { className: `relative ${wrapperClassName}`.trim(), style: wrapperStyle, children: [
|
|
1546
|
+
/* @__PURE__ */ jsx34("span", { className: `pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 ${iconClassName}`.trim(), children: /* @__PURE__ */ jsx34(Search, { size: 15 }) }),
|
|
1547
|
+
/* @__PURE__ */ jsx34(
|
|
1548
|
+
Input,
|
|
1549
|
+
{
|
|
1550
|
+
...props,
|
|
1551
|
+
type: "text",
|
|
1552
|
+
value,
|
|
1553
|
+
onChange: (e) => onChange(e.target.value),
|
|
1554
|
+
placeholder,
|
|
1555
|
+
className: `pl-9 ${inputClassName}`.trim()
|
|
1556
|
+
}
|
|
1557
|
+
),
|
|
1558
|
+
clearable && value ? /* @__PURE__ */ jsx34(
|
|
1559
|
+
"button",
|
|
1560
|
+
{
|
|
1561
|
+
type: "button",
|
|
1562
|
+
onClick: () => onChange(""),
|
|
1563
|
+
className: "absolute right-2 top-1/2 -translate-y-1/2 rounded-lg p-1 text-txt-4 transition-colors hover:bg-ink-300 hover:text-txt-2",
|
|
1564
|
+
title: clearTitle,
|
|
1565
|
+
children: /* @__PURE__ */ jsx34(X, { size: 14 })
|
|
1566
|
+
}
|
|
1567
|
+
) : null
|
|
1568
|
+
] });
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
// src/components/shared/Pagination.tsx
|
|
1572
|
+
import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1573
|
+
function getPageNumbers(page, totalPages) {
|
|
1574
|
+
if (totalPages <= 7) return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
1575
|
+
const pages = [1];
|
|
1576
|
+
if (page > 3) pages.push("\u2026");
|
|
1577
|
+
for (let i = Math.max(2, page - 1); i <= Math.min(totalPages - 1, page + 1); i += 1) pages.push(i);
|
|
1578
|
+
if (page < totalPages - 2) pages.push("\u2026");
|
|
1579
|
+
pages.push(totalPages);
|
|
1580
|
+
return pages;
|
|
1581
|
+
}
|
|
1582
|
+
var defaultLabels = {
|
|
1583
|
+
showing: ({ from, to, total }) => `Showing ${from}-${to} of ${total}`,
|
|
1584
|
+
page: ({ page, totalPages }) => `Page ${page} of ${totalPages}`,
|
|
1585
|
+
prev: "Prev",
|
|
1586
|
+
next: "Next",
|
|
1587
|
+
prevTitle: "Previous page",
|
|
1588
|
+
nextTitle: "Next page"
|
|
1589
|
+
};
|
|
1590
|
+
function Pagination({ page, totalPages, onChange, totalItems, pageSize, labels }) {
|
|
1591
|
+
if (totalPages <= 1) return null;
|
|
1592
|
+
const copy = { ...defaultLabels, ...labels };
|
|
1593
|
+
const pageNumbers = getPageNumbers(page, totalPages);
|
|
1594
|
+
const from = pageSize ? (page - 1) * pageSize + 1 : null;
|
|
1595
|
+
const to = pageSize && totalItems ? Math.min(page * pageSize, totalItems) : null;
|
|
1596
|
+
return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col items-center justify-between gap-3 border-t border-border pt-3 sm:flex-row", children: [
|
|
1597
|
+
totalItems != null && from != null && to != null ? /* @__PURE__ */ jsx35("span", { className: "order-2 font-mono text-[12px] text-txt-4 sm:order-1", children: copy.showing({ from, to, total: totalItems }) }) : /* @__PURE__ */ jsx35("span", { className: "order-2 font-mono text-[11px] text-txt-4 sm:order-1", children: copy.page({ page, totalPages }) }),
|
|
1598
|
+
/* @__PURE__ */ jsxs25("div", { className: "order-1 flex items-center gap-1 sm:order-2", children: [
|
|
1599
|
+
/* @__PURE__ */ jsxs25(
|
|
1600
|
+
"button",
|
|
1601
|
+
{
|
|
1602
|
+
type: "button",
|
|
1603
|
+
onClick: () => onChange(Math.max(1, page - 1)),
|
|
1604
|
+
disabled: page === 1,
|
|
1605
|
+
title: copy.prevTitle,
|
|
1606
|
+
className: "flex items-center gap-1 border border-border px-2.5 py-1.5 font-mono text-[11px] text-txt-3 transition-colors hover:border-border-hi hover:text-txt-1 disabled:cursor-not-allowed disabled:opacity-30",
|
|
1607
|
+
children: [
|
|
1608
|
+
/* @__PURE__ */ jsx35(ChevronLeft, { size: 12 }),
|
|
1609
|
+
/* @__PURE__ */ jsx35("span", { className: "hidden sm:inline", children: copy.prev })
|
|
1610
|
+
]
|
|
1611
|
+
}
|
|
1612
|
+
),
|
|
1613
|
+
/* @__PURE__ */ jsx35("div", { className: "flex items-center gap-1", children: pageNumbers.map(
|
|
1614
|
+
(entry, index) => entry === "\u2026" ? /* @__PURE__ */ jsx35("span", { className: "w-7 text-center font-mono text-[11px] text-txt-4", children: "\u2026" }, `ellipsis-${index}`) : /* @__PURE__ */ jsx35(
|
|
1615
|
+
"button",
|
|
1616
|
+
{
|
|
1617
|
+
type: "button",
|
|
1618
|
+
onClick: () => onChange(entry),
|
|
1619
|
+
className: `h-7 w-7 border font-mono text-[11px] transition-colors ${page === entry ? "border-primary-300 bg-primary-300/10 text-primary-300" : "border-border text-txt-3 hover:border-border-hi hover:text-txt-1"}`,
|
|
1620
|
+
children: entry
|
|
1621
|
+
},
|
|
1622
|
+
entry
|
|
1623
|
+
)
|
|
1624
|
+
) }),
|
|
1625
|
+
/* @__PURE__ */ jsxs25(
|
|
1626
|
+
"button",
|
|
1627
|
+
{
|
|
1628
|
+
type: "button",
|
|
1629
|
+
onClick: () => onChange(Math.min(totalPages, page + 1)),
|
|
1630
|
+
disabled: page >= totalPages,
|
|
1631
|
+
title: copy.nextTitle,
|
|
1632
|
+
className: "flex items-center gap-1 border border-border px-2.5 py-1.5 font-mono text-[10px] text-txt-3 transition-colors hover:border-border-hi hover:text-txt-1 disabled:cursor-not-allowed disabled:opacity-30",
|
|
1633
|
+
children: [
|
|
1634
|
+
/* @__PURE__ */ jsx35("span", { className: "hidden sm:inline", children: copy.next }),
|
|
1635
|
+
/* @__PURE__ */ jsx35(ChevronRight, { size: 12 })
|
|
1636
|
+
]
|
|
1637
|
+
}
|
|
1638
|
+
)
|
|
1639
|
+
] })
|
|
1640
|
+
] });
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
// src/components/shared/SectionTitle.tsx
|
|
1644
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1645
|
+
function SectionTitle({ children, className = "" }) {
|
|
1646
|
+
return /* @__PURE__ */ jsx36("h3", { className: `mb-1 text-sm font-semibold text-txt-1 ${className}`.trim(), children });
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
// src/components/shared/StatusBadge.tsx
|
|
1650
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1651
|
+
var BASE = "inline-flex items-center border px-2 py-0.5 font-mono text-[9px] font-medium uppercase tracking-[0.15em]";
|
|
1652
|
+
var variantStyles = {
|
|
1653
|
+
default: "border-border-hi text-txt-2",
|
|
1654
|
+
active: "border-primary-300 text-primary-300",
|
|
1655
|
+
success: "border-good text-good",
|
|
1656
|
+
inactive: "border-txt-4 text-txt-4",
|
|
1657
|
+
warning: "border-warn text-warn",
|
|
1658
|
+
danger: "border-warn text-warn",
|
|
1659
|
+
pending: "border-txt-3 text-txt-3"
|
|
1660
|
+
};
|
|
1661
|
+
function StatusBadge({ label, variant = "default", className = "" }) {
|
|
1662
|
+
return /* @__PURE__ */ jsx37("span", { className: `${BASE} ${variantStyles[variant]} ${className}`.trim(), children: label });
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
// src/components/shared/ActionMenu.tsx
|
|
1666
|
+
import { useEffect as useEffect2, useRef as useRef2, useState as useState5 } from "react";
|
|
1667
|
+
import { Fragment, jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1668
|
+
var defaultMenuStyle = {
|
|
1669
|
+
background: "var(--color-ink-200)",
|
|
1670
|
+
border: "1px solid var(--color-border-hi)",
|
|
1671
|
+
borderTop: "2px solid var(--color-primary-300)",
|
|
1672
|
+
boxShadow: "0 16px 48px -8px rgba(0,0,0,0.45)",
|
|
1673
|
+
maxHeight: "min(320px, calc(100vh - 180px))"
|
|
1674
|
+
};
|
|
1675
|
+
var itemBaseClass = "flex w-full items-center gap-2.5 border-l-2 border-transparent px-4 py-2.5 text-left text-sm transition-colors duration-100 hover:border-[var(--color-primary-300)] disabled:cursor-not-allowed disabled:opacity-40";
|
|
1676
|
+
function ActionMenu({
|
|
1677
|
+
label,
|
|
1678
|
+
items,
|
|
1679
|
+
icon,
|
|
1680
|
+
buttonSize = "sm",
|
|
1681
|
+
buttonVariant = "secondary",
|
|
1682
|
+
buttonClassName = "",
|
|
1683
|
+
menuClassName = "absolute bottom-full right-0 z-50 mb-1 w-[min(20rem,calc(100vw-1.5rem))] max-w-[calc(100vw-1.5rem)] overflow-auto sm:min-w-52 sm:w-auto",
|
|
1684
|
+
menuStyle,
|
|
1685
|
+
fullWidth = false,
|
|
1686
|
+
closeLabel
|
|
1687
|
+
}) {
|
|
1688
|
+
const [open, setOpen] = useState5(false);
|
|
1689
|
+
const rootRef = useRef2(null);
|
|
1690
|
+
useEffect2(() => {
|
|
1691
|
+
function handleOutside(event) {
|
|
1692
|
+
if (rootRef.current && !rootRef.current.contains(event.target)) {
|
|
1693
|
+
setOpen(false);
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
document.addEventListener("mousedown", handleOutside);
|
|
1697
|
+
return () => document.removeEventListener("mousedown", handleOutside);
|
|
1698
|
+
}, []);
|
|
1699
|
+
return /* @__PURE__ */ jsxs26("div", { ref: rootRef, className: "relative", children: [
|
|
1700
|
+
/* @__PURE__ */ jsx38(
|
|
1701
|
+
Button,
|
|
1702
|
+
{
|
|
1703
|
+
size: buttonSize,
|
|
1704
|
+
variant: buttonVariant,
|
|
1705
|
+
icon,
|
|
1706
|
+
iconRight: /* @__PURE__ */ jsx38(ChevronDown, { size: 11 }),
|
|
1707
|
+
onClick: () => setOpen((value) => !value),
|
|
1708
|
+
className: buttonClassName,
|
|
1709
|
+
fullWidth,
|
|
1710
|
+
children: label
|
|
1711
|
+
}
|
|
1712
|
+
),
|
|
1713
|
+
open ? /* @__PURE__ */ jsxs26(Fragment, { children: [
|
|
1714
|
+
/* @__PURE__ */ jsx38(
|
|
1715
|
+
"button",
|
|
1716
|
+
{
|
|
1717
|
+
type: "button",
|
|
1718
|
+
className: "fixed inset-0 z-40 bg-black/10 backdrop-blur-[3px]",
|
|
1719
|
+
"aria-label": closeLabel ?? label,
|
|
1720
|
+
onClick: () => setOpen(false)
|
|
1721
|
+
}
|
|
1722
|
+
),
|
|
1723
|
+
/* @__PURE__ */ jsx38("div", { className: menuClassName, style: { ...defaultMenuStyle, ...menuStyle }, children: items.map((item, index) => /* @__PURE__ */ jsxs26("div", { children: [
|
|
1724
|
+
index > 0 && item.danger ? /* @__PURE__ */ jsx38("div", { style: { borderTop: "1px solid var(--color-border)" } }) : null,
|
|
1725
|
+
/* @__PURE__ */ jsxs26(
|
|
1726
|
+
"button",
|
|
1727
|
+
{
|
|
1728
|
+
type: "button",
|
|
1729
|
+
className: itemBaseClass,
|
|
1730
|
+
style: { color: item.danger ? "var(--color-warn)" : "var(--color-txt-2)" },
|
|
1731
|
+
disabled: item.disabled || item.loading,
|
|
1732
|
+
onClick: () => {
|
|
1733
|
+
setOpen(false);
|
|
1734
|
+
item.onSelect();
|
|
1735
|
+
},
|
|
1736
|
+
children: [
|
|
1737
|
+
item.loading ? /* @__PURE__ */ jsx38(Spinner, { color: "text-[var(--color-txt-3)]" }) : /* @__PURE__ */ jsx38("span", { className: item.danger ? "shrink-0 text-warn" : "shrink-0 text-primary-300", children: item.icon }),
|
|
1738
|
+
/* @__PURE__ */ jsx38("span", { children: item.label })
|
|
1739
|
+
]
|
|
1740
|
+
}
|
|
1741
|
+
)
|
|
1742
|
+
] }, item.key)) })
|
|
1743
|
+
] }) : null
|
|
1744
|
+
] });
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
// src/components/table/DataTable.tsx
|
|
1748
|
+
import { useMemo as useMemo2, useState as useState6 } from "react";
|
|
1749
|
+
|
|
1750
|
+
// src/components/table/DataTableRow.tsx
|
|
1751
|
+
import { memo } from "react";
|
|
1752
|
+
import { jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1753
|
+
var ALIGN_CLASS = {
|
|
1754
|
+
left: "text-left",
|
|
1755
|
+
center: "text-center",
|
|
1756
|
+
right: "text-right"
|
|
1757
|
+
};
|
|
1758
|
+
function DataTableRowInner({ row, columns, onRowClick, rowActions }) {
|
|
1759
|
+
const clickable = Boolean(onRowClick);
|
|
1760
|
+
return /* @__PURE__ */ jsxs27(
|
|
1761
|
+
"tr",
|
|
1762
|
+
{
|
|
1763
|
+
onClick: clickable ? () => onRowClick?.(row) : void 0,
|
|
1764
|
+
className: `border-b border-border transition-colors hover:bg-ink-300/30 ${clickable ? "cursor-pointer" : ""}`,
|
|
1765
|
+
children: [
|
|
1766
|
+
columns.map((column) => /* @__PURE__ */ jsx39(
|
|
1767
|
+
"td",
|
|
1768
|
+
{
|
|
1769
|
+
className: `px-3 py-2 text-xs text-txt-3 ${ALIGN_CLASS[column.align ?? "left"]} ${column.className ?? ""}`,
|
|
1770
|
+
children: column.cell(row)
|
|
1771
|
+
},
|
|
1772
|
+
column.id
|
|
1773
|
+
)),
|
|
1774
|
+
rowActions !== void 0 && /* @__PURE__ */ jsx39("td", { className: "px-3 py-2 text-right", children: rowActions(row) })
|
|
1775
|
+
]
|
|
1776
|
+
}
|
|
1777
|
+
);
|
|
1778
|
+
}
|
|
1779
|
+
var DataTableRow = memo(DataTableRowInner);
|
|
1780
|
+
|
|
1781
|
+
// src/components/table/DataTable.tsx
|
|
1782
|
+
import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1783
|
+
var ALIGN_CLASS2 = {
|
|
1784
|
+
left: "text-left",
|
|
1785
|
+
center: "text-center",
|
|
1786
|
+
right: "text-right"
|
|
1787
|
+
};
|
|
1788
|
+
function compareValues(a, b) {
|
|
1789
|
+
if (a == null && b == null) return 0;
|
|
1790
|
+
if (a == null) return -1;
|
|
1791
|
+
if (b == null) return 1;
|
|
1792
|
+
if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();
|
|
1793
|
+
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
1794
|
+
if (typeof a === "boolean" && typeof b === "boolean") return Number(a) - Number(b);
|
|
1795
|
+
return String(a).localeCompare(String(b));
|
|
1796
|
+
}
|
|
1797
|
+
function ariaSort(active, direction) {
|
|
1798
|
+
if (!active) return "none";
|
|
1799
|
+
return direction === "asc" ? "ascending" : "descending";
|
|
1800
|
+
}
|
|
1801
|
+
function DataTable({
|
|
1802
|
+
data,
|
|
1803
|
+
columns,
|
|
1804
|
+
rowKey,
|
|
1805
|
+
isLoading = false,
|
|
1806
|
+
emptyState,
|
|
1807
|
+
onRowClick,
|
|
1808
|
+
loadingRows = 8,
|
|
1809
|
+
rowActions,
|
|
1810
|
+
serverSort,
|
|
1811
|
+
footer,
|
|
1812
|
+
mobileCard
|
|
1813
|
+
}) {
|
|
1814
|
+
const [sort, setSort] = useState6(null);
|
|
1815
|
+
const sortedData = useMemo2(() => {
|
|
1816
|
+
if (serverSort) return data;
|
|
1817
|
+
if (!sort) return data;
|
|
1818
|
+
const column = columns.find((c) => c.id === sort.columnId);
|
|
1819
|
+
if (!column?.sortAccessor) return data;
|
|
1820
|
+
const accessor = column.sortAccessor;
|
|
1821
|
+
const factor = sort.direction === "asc" ? 1 : -1;
|
|
1822
|
+
return [...data].sort((a, b) => compareValues(accessor(a), accessor(b)) * factor);
|
|
1823
|
+
}, [data, columns, sort, serverSort]);
|
|
1824
|
+
const toggleSort = (columnId) => {
|
|
1825
|
+
if (serverSort) {
|
|
1826
|
+
serverSort.onSort(columnId);
|
|
1827
|
+
return;
|
|
1828
|
+
}
|
|
1829
|
+
setSort((prev) => {
|
|
1830
|
+
if (prev?.columnId !== columnId) return { columnId, direction: "asc" };
|
|
1831
|
+
return { columnId, direction: prev.direction === "asc" ? "desc" : "asc" };
|
|
1832
|
+
});
|
|
1833
|
+
};
|
|
1834
|
+
const hasActions = rowActions !== void 0;
|
|
1835
|
+
const colCount = columns.length + (hasActions ? 1 : 0);
|
|
1836
|
+
const tableClass = mobileCard !== void 0 ? "hidden md:table w-full text-sm table-collapse" : "w-full text-sm table-collapse";
|
|
1837
|
+
return /* @__PURE__ */ jsxs28("div", { className: "border border-border overflow-x-auto", children: [
|
|
1838
|
+
mobileCard !== void 0 && /* @__PURE__ */ jsx40("div", { className: "md:hidden", children: isLoading ? Array.from({ length: loadingRows }).map((_, i) => /* @__PURE__ */ jsx40("div", { className: "h-16 animate-pulse bg-ink-300" }, i)) : sortedData.length === 0 ? emptyState : sortedData.map((row) => /* @__PURE__ */ jsx40("div", { children: mobileCard(row) }, rowKey(row))) }),
|
|
1839
|
+
/* @__PURE__ */ jsxs28("table", { className: tableClass, children: [
|
|
1840
|
+
/* @__PURE__ */ jsx40("thead", { children: /* @__PURE__ */ jsxs28("tr", { className: "border-b border-border bg-ink-300", children: [
|
|
1841
|
+
columns.map((column) => {
|
|
1842
|
+
const baseClass = `px-3 py-2.5 ${ALIGN_CLASS2[column.align ?? "left"]} font-mono text-[11px] tracking-[.08em] text-txt-4 font-semibold whitespace-nowrap`;
|
|
1843
|
+
if (!column.sortable || !column.sortAccessor) {
|
|
1844
|
+
return /* @__PURE__ */ jsx40("th", { scope: "col", className: baseClass, children: column.header }, column.id);
|
|
1845
|
+
}
|
|
1846
|
+
const active = serverSort ? serverSort.field === column.id : sort?.columnId === column.id;
|
|
1847
|
+
const direction = serverSort ? serverSort.dir : sort?.direction ?? "asc";
|
|
1848
|
+
return /* @__PURE__ */ jsx40(
|
|
1849
|
+
"th",
|
|
1850
|
+
{
|
|
1851
|
+
scope: "col",
|
|
1852
|
+
"aria-sort": ariaSort(active, direction),
|
|
1853
|
+
className: baseClass,
|
|
1854
|
+
children: /* @__PURE__ */ jsxs28(
|
|
1855
|
+
"button",
|
|
1856
|
+
{
|
|
1857
|
+
type: "button",
|
|
1858
|
+
onClick: () => toggleSort(column.id),
|
|
1859
|
+
className: `inline-flex items-center gap-1 select-none transition-colors hover:text-txt-1 ${active ? "text-txt-1" : ""}`,
|
|
1860
|
+
children: [
|
|
1861
|
+
column.header,
|
|
1862
|
+
active && (direction === "asc" ? /* @__PURE__ */ jsx40(ChevronUp, { size: 12 }) : /* @__PURE__ */ jsx40(ChevronDown, { size: 12 }))
|
|
1863
|
+
]
|
|
1864
|
+
}
|
|
1865
|
+
)
|
|
1866
|
+
},
|
|
1867
|
+
column.id
|
|
1868
|
+
);
|
|
1869
|
+
}),
|
|
1870
|
+
hasActions && /* @__PURE__ */ jsx40("th", { scope: "col", className: "px-3 py-2.5 text-right font-mono text-[11px] tracking-[.08em] text-txt-4 font-semibold whitespace-nowrap" })
|
|
1871
|
+
] }) }),
|
|
1872
|
+
/* @__PURE__ */ jsx40("tbody", { children: isLoading ? Array.from({ length: loadingRows }).map((_, rowIndex) => /* @__PURE__ */ jsx40("tr", { className: "border-b border-border", children: Array.from({ length: colCount }).map((__, colIndex) => /* @__PURE__ */ jsx40("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx40("div", { className: "h-4 bg-ink-300 rounded animate-pulse w-24" }) }, colIndex)) }, rowIndex)) : sortedData.length === 0 ? /* @__PURE__ */ jsx40("tr", { children: /* @__PURE__ */ jsx40("td", { colSpan: colCount, className: "px-4 py-10 text-center text-txt-4 text-sm font-mono", children: emptyState }) }) : sortedData.map((row) => /* @__PURE__ */ jsx40(
|
|
1873
|
+
DataTableRow,
|
|
1874
|
+
{
|
|
1875
|
+
row,
|
|
1876
|
+
columns,
|
|
1877
|
+
onRowClick,
|
|
1878
|
+
rowActions
|
|
1879
|
+
},
|
|
1880
|
+
rowKey(row)
|
|
1881
|
+
)) })
|
|
1882
|
+
] }),
|
|
1883
|
+
footer !== void 0 && footer
|
|
1884
|
+
] });
|
|
1885
|
+
}
|
|
1886
|
+
export {
|
|
1887
|
+
ActionMenu,
|
|
1888
|
+
Activity,
|
|
1889
|
+
ActivityMenu,
|
|
1890
|
+
Alert,
|
|
1891
|
+
AppleIcon,
|
|
1892
|
+
ArrowLeft,
|
|
1893
|
+
ArrowRight,
|
|
1894
|
+
Badge,
|
|
1895
|
+
Ban,
|
|
1896
|
+
BarChart,
|
|
1897
|
+
BaseModal,
|
|
1898
|
+
Bell,
|
|
1899
|
+
Book,
|
|
1900
|
+
Button,
|
|
1901
|
+
Calendar,
|
|
1902
|
+
CalendarMonth,
|
|
1903
|
+
CalendarWeek,
|
|
1904
|
+
Card,
|
|
1905
|
+
CardBody,
|
|
1906
|
+
CardHeader,
|
|
1907
|
+
Check,
|
|
1908
|
+
CheckCircle,
|
|
1909
|
+
CheckSquare,
|
|
1910
|
+
Checkbox,
|
|
1911
|
+
ChevronDown,
|
|
1912
|
+
ChevronLeft,
|
|
1913
|
+
ChevronRight,
|
|
1914
|
+
ChevronUp,
|
|
1915
|
+
Clipboard,
|
|
1916
|
+
Clock,
|
|
1917
|
+
Compare,
|
|
1918
|
+
ConfirmDialog,
|
|
1919
|
+
Copy,
|
|
1920
|
+
Cpu,
|
|
1921
|
+
CreditCard,
|
|
1922
|
+
DataTable,
|
|
1923
|
+
Database,
|
|
1924
|
+
DefaultErrorFallback,
|
|
1925
|
+
Download,
|
|
1926
|
+
Edit,
|
|
1927
|
+
EmptyState,
|
|
1928
|
+
ErrorBoundary,
|
|
1929
|
+
ErrorState,
|
|
1930
|
+
ExternalLink,
|
|
1931
|
+
Eye,
|
|
1932
|
+
EyeOff,
|
|
1933
|
+
Faculty,
|
|
1934
|
+
FieldHint,
|
|
1935
|
+
FieldLabel,
|
|
1936
|
+
FileText,
|
|
1937
|
+
FileUpload,
|
|
1938
|
+
FingerprintIcon,
|
|
1939
|
+
FormError,
|
|
1940
|
+
FormIcon,
|
|
1941
|
+
FormulaIcon,
|
|
1942
|
+
Gear,
|
|
1943
|
+
Globe,
|
|
1944
|
+
GooglePlayIcon,
|
|
1945
|
+
GraduationCap,
|
|
1946
|
+
Grid,
|
|
1947
|
+
GridBg,
|
|
1948
|
+
HardDrive,
|
|
1949
|
+
Hash,
|
|
1950
|
+
HelpCircle,
|
|
1951
|
+
History,
|
|
1952
|
+
Home,
|
|
1953
|
+
Icons,
|
|
1954
|
+
Image,
|
|
1955
|
+
Info,
|
|
1956
|
+
InfoBanner,
|
|
1957
|
+
Input,
|
|
1958
|
+
Intersect,
|
|
1959
|
+
Layers,
|
|
1960
|
+
LockIcon,
|
|
1961
|
+
LogOut,
|
|
1962
|
+
LogoMark,
|
|
1963
|
+
Mail,
|
|
1964
|
+
Megaphone,
|
|
1965
|
+
Menu,
|
|
1966
|
+
Monitor,
|
|
1967
|
+
Moon,
|
|
1968
|
+
NavAnalytics,
|
|
1969
|
+
NavQrAttendance,
|
|
1970
|
+
NavScoresheet,
|
|
1971
|
+
NavSecurity,
|
|
1972
|
+
NumberIcon,
|
|
1973
|
+
OfficeHours,
|
|
1974
|
+
PageHeader,
|
|
1975
|
+
PageSpinner,
|
|
1976
|
+
Pagination,
|
|
1977
|
+
Pdf,
|
|
1978
|
+
Plus,
|
|
1979
|
+
Printer,
|
|
1980
|
+
QrCode,
|
|
1981
|
+
RadioButton,
|
|
1982
|
+
Refresh,
|
|
1983
|
+
RefreshCw,
|
|
1984
|
+
Repeat,
|
|
1985
|
+
Report,
|
|
1986
|
+
RotateCcw,
|
|
1987
|
+
Scan,
|
|
1988
|
+
Search,
|
|
1989
|
+
SearchInput,
|
|
1990
|
+
SectionIcons,
|
|
1991
|
+
SectionTitle,
|
|
1992
|
+
Select,
|
|
1993
|
+
Server,
|
|
1994
|
+
Shield,
|
|
1995
|
+
Skeleton,
|
|
1996
|
+
SkeletonBanner,
|
|
1997
|
+
SkeletonCard,
|
|
1998
|
+
SkeletonKpiCard,
|
|
1999
|
+
SkeletonPageHeader,
|
|
2000
|
+
SkeletonTable,
|
|
2001
|
+
Smartphone,
|
|
2002
|
+
Spinner,
|
|
2003
|
+
Spotlight,
|
|
2004
|
+
Star,
|
|
2005
|
+
StatusBadge,
|
|
2006
|
+
Sun,
|
|
2007
|
+
Table,
|
|
2008
|
+
Tablet,
|
|
2009
|
+
TextIcon,
|
|
2010
|
+
Textarea,
|
|
2011
|
+
Toast,
|
|
2012
|
+
ToastProvider,
|
|
2013
|
+
Tooltip,
|
|
2014
|
+
Trash,
|
|
2015
|
+
Trophy,
|
|
2016
|
+
TwoFAIcon,
|
|
2017
|
+
University,
|
|
2018
|
+
User,
|
|
2019
|
+
UserCheck,
|
|
2020
|
+
UserCog,
|
|
2021
|
+
UserMinus,
|
|
2022
|
+
UserPlus,
|
|
2023
|
+
Users,
|
|
2024
|
+
X,
|
|
2025
|
+
Zap,
|
|
2026
|
+
useToast
|
|
2027
|
+
};
|
|
2028
|
+
//# sourceMappingURL=index.js.map
|