@skyfall_ai/aegis 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/dist/index.css +4323 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +1736 -0
- package/dist/index.d.ts +1736 -0
- package/dist/index.js +3797 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3677 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +75 -0
- package/src/tokens/aegis-tokens.css +333 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3797 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var index_exports = {};
|
|
23
|
+
__export(index_exports, {
|
|
24
|
+
Accordion: () => Accordion,
|
|
25
|
+
Alert: () => Alert,
|
|
26
|
+
AppointmentCard: () => AppointmentCard,
|
|
27
|
+
Autocomplete: () => Autocomplete,
|
|
28
|
+
Avatar: () => Avatar,
|
|
29
|
+
Badge: () => Badge,
|
|
30
|
+
Banner: () => Banner,
|
|
31
|
+
Breadcrumbs: () => Breadcrumbs,
|
|
32
|
+
Button: () => Button,
|
|
33
|
+
Card: () => Card,
|
|
34
|
+
Checkbox: () => Checkbox,
|
|
35
|
+
CheckboxGroup: () => CheckboxGroup,
|
|
36
|
+
ClinicalBanner: () => ClinicalBanner,
|
|
37
|
+
CollapsiblePanel: () => CollapsiblePanel,
|
|
38
|
+
ConfirmDialog: () => ConfirmDialog,
|
|
39
|
+
DataGrid: () => DataGrid,
|
|
40
|
+
DatePicker: () => DatePicker,
|
|
41
|
+
DescriptionList: () => DescriptionList,
|
|
42
|
+
Divider: () => Divider,
|
|
43
|
+
Drawer: () => Drawer,
|
|
44
|
+
EmptyState: () => EmptyState,
|
|
45
|
+
FileUpload: () => FileUpload,
|
|
46
|
+
FormField: () => FormField,
|
|
47
|
+
HelperText: () => HelperText,
|
|
48
|
+
IconButton: () => IconButton,
|
|
49
|
+
Input: () => Input,
|
|
50
|
+
InsuranceCard: () => InsuranceCard,
|
|
51
|
+
LabResultRow: () => LabResultRow,
|
|
52
|
+
Label: () => Label,
|
|
53
|
+
List: () => List,
|
|
54
|
+
ListItem: () => ListItem,
|
|
55
|
+
MedicationRow: () => MedicationRow,
|
|
56
|
+
Modal: () => Modal,
|
|
57
|
+
MultiSelect: () => MultiSelect,
|
|
58
|
+
NumberField: () => NumberField,
|
|
59
|
+
OTPInput: () => OTPInput,
|
|
60
|
+
Pagination: () => Pagination,
|
|
61
|
+
PatientCard: () => PatientCard,
|
|
62
|
+
Popover: () => Popover,
|
|
63
|
+
ProgressBar: () => ProgressBar,
|
|
64
|
+
Radio: () => Radio,
|
|
65
|
+
RadioGroup: () => RadioGroup,
|
|
66
|
+
SearchField: () => SearchField,
|
|
67
|
+
Select: () => Select,
|
|
68
|
+
SideNav: () => SideNav,
|
|
69
|
+
Skeleton: () => Skeleton,
|
|
70
|
+
Slider: () => Slider,
|
|
71
|
+
Spinner: () => Spinner,
|
|
72
|
+
StatCard: () => StatCard,
|
|
73
|
+
StatusBadge: () => StatusBadge,
|
|
74
|
+
Stepper: () => Stepper,
|
|
75
|
+
Switch: () => Switch,
|
|
76
|
+
Table: () => Table,
|
|
77
|
+
TableBody: () => TableBody,
|
|
78
|
+
TableCell: () => TableCell,
|
|
79
|
+
TableHead: () => TableHead,
|
|
80
|
+
TableHeaderCell: () => TableHeaderCell,
|
|
81
|
+
TableRow: () => TableRow,
|
|
82
|
+
Tabs: () => Tabs,
|
|
83
|
+
Textarea: () => Textarea,
|
|
84
|
+
Timeline: () => Timeline,
|
|
85
|
+
Toast: () => Toast,
|
|
86
|
+
Tooltip: () => Tooltip,
|
|
87
|
+
TopNav: () => TopNav,
|
|
88
|
+
accentTeal: () => accentTeal,
|
|
89
|
+
border: () => border,
|
|
90
|
+
borderStyle: () => borderStyle,
|
|
91
|
+
borderWidth: () => borderWidth,
|
|
92
|
+
brandPrimary: () => brandPrimary,
|
|
93
|
+
cn: () => cn,
|
|
94
|
+
container: () => container,
|
|
95
|
+
controlSize: () => controlSize,
|
|
96
|
+
dataVis: () => dataVis,
|
|
97
|
+
duration: () => duration,
|
|
98
|
+
easing: () => easing,
|
|
99
|
+
focusRing: () => focusRing,
|
|
100
|
+
fontFamily: () => fontFamily,
|
|
101
|
+
fontSize: () => fontSize,
|
|
102
|
+
fontWeight: () => fontWeight,
|
|
103
|
+
grid: () => grid,
|
|
104
|
+
iconSize: () => iconSize,
|
|
105
|
+
lineHeight: () => lineHeight,
|
|
106
|
+
modalSize: () => modalSize,
|
|
107
|
+
neutral: () => neutral,
|
|
108
|
+
opacity: () => opacity,
|
|
109
|
+
radius: () => radius,
|
|
110
|
+
semantic: () => semantic,
|
|
111
|
+
shadow: () => shadow,
|
|
112
|
+
sidebarDefault: () => sidebarDefault,
|
|
113
|
+
space: () => space,
|
|
114
|
+
surface: () => surface,
|
|
115
|
+
text: () => text,
|
|
116
|
+
touchMin: () => touchMin,
|
|
117
|
+
tracking: () => tracking,
|
|
118
|
+
zIndex: () => zIndex
|
|
119
|
+
});
|
|
120
|
+
module.exports = __toCommonJS(index_exports);
|
|
121
|
+
|
|
122
|
+
// src/tokens/colors.ts
|
|
123
|
+
var brandPrimary = {
|
|
124
|
+
50: "#EEF4FF",
|
|
125
|
+
100: "#DCE8FF",
|
|
126
|
+
200: "#BED4FF",
|
|
127
|
+
300: "#8FB7FF",
|
|
128
|
+
400: "#5C92F2",
|
|
129
|
+
500: "#2F6FE4",
|
|
130
|
+
600: "#1F5CCD",
|
|
131
|
+
700: "#1849A6",
|
|
132
|
+
800: "#153B82",
|
|
133
|
+
900: "#112E63"
|
|
134
|
+
};
|
|
135
|
+
var accentTeal = {
|
|
136
|
+
50: "#EDF9F8",
|
|
137
|
+
100: "#D4F1EE",
|
|
138
|
+
200: "#A9E0D9",
|
|
139
|
+
300: "#77C9BE",
|
|
140
|
+
400: "#48AE9F",
|
|
141
|
+
500: "#2E8F83",
|
|
142
|
+
600: "#237368",
|
|
143
|
+
700: "#1D5D54"
|
|
144
|
+
};
|
|
145
|
+
var neutral = {
|
|
146
|
+
0: "#FFFFFF",
|
|
147
|
+
25: "#FCFDFE",
|
|
148
|
+
50: "#F6F8FA",
|
|
149
|
+
100: "#EDF1F5",
|
|
150
|
+
200: "#DCE3EA",
|
|
151
|
+
300: "#C1CBD6",
|
|
152
|
+
400: "#93A1B2",
|
|
153
|
+
500: "#66768A",
|
|
154
|
+
600: "#4B5B6C",
|
|
155
|
+
700: "#334155",
|
|
156
|
+
800: "#223042",
|
|
157
|
+
900: "#16202B"
|
|
158
|
+
};
|
|
159
|
+
var semantic = {
|
|
160
|
+
success: { 50: "#EEF8F1", 500: "#2F8F57", 700: "#1F6B3D" },
|
|
161
|
+
warning: { 50: "#FFF6E8", 500: "#B86A00", 700: "#8D4F00" },
|
|
162
|
+
error: { 50: "#FFF0F0", 500: "#C23A3A", 700: "#8F2626" },
|
|
163
|
+
info: { 50: "#EEF6FF", 500: "#2563B8", 700: "#1B4C8E" }
|
|
164
|
+
};
|
|
165
|
+
var text = {
|
|
166
|
+
primary: "#16202B",
|
|
167
|
+
secondary: "#4B5B6C",
|
|
168
|
+
muted: "#66768A",
|
|
169
|
+
inverse: "#FFFFFF"
|
|
170
|
+
};
|
|
171
|
+
var surface = {
|
|
172
|
+
canvas: "#FCFDFE",
|
|
173
|
+
default: "#FFFFFF",
|
|
174
|
+
subtle: "#F6F8FA",
|
|
175
|
+
raised: "#FFFFFF"
|
|
176
|
+
};
|
|
177
|
+
var border = {
|
|
178
|
+
default: "#DCE3EA",
|
|
179
|
+
strong: "#C1CBD6",
|
|
180
|
+
inverse: "#334155"
|
|
181
|
+
};
|
|
182
|
+
var dataVis = {
|
|
183
|
+
1: "#2F6FE4",
|
|
184
|
+
2: "#2E8F83",
|
|
185
|
+
3: "#7B61C9",
|
|
186
|
+
4: "#B86A00",
|
|
187
|
+
5: "#C23A3A",
|
|
188
|
+
gridline: "#DCE3EA",
|
|
189
|
+
axis: "#66768A"
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
// src/tokens/typography.ts
|
|
193
|
+
var fontFamily = {
|
|
194
|
+
sans: '"Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
|
195
|
+
mono: '"IBM Plex Mono", "SFMono-Regular", Consolas, monospace'
|
|
196
|
+
};
|
|
197
|
+
var fontWeight = {
|
|
198
|
+
regular: 400,
|
|
199
|
+
medium: 500,
|
|
200
|
+
semibold: 600,
|
|
201
|
+
bold: 700
|
|
202
|
+
};
|
|
203
|
+
var fontSize = {
|
|
204
|
+
"display-lg": "40px",
|
|
205
|
+
"display-md": "32px",
|
|
206
|
+
"heading-xl": "28px",
|
|
207
|
+
"heading-lg": "24px",
|
|
208
|
+
"heading-md": "20px",
|
|
209
|
+
"heading-sm": "18px",
|
|
210
|
+
"body-lg": "16px",
|
|
211
|
+
"body-md": "14px",
|
|
212
|
+
"body-sm": "13px",
|
|
213
|
+
"label-lg": "14px",
|
|
214
|
+
"label-md": "13px",
|
|
215
|
+
caption: "12px",
|
|
216
|
+
data: "14px",
|
|
217
|
+
code: "13px"
|
|
218
|
+
};
|
|
219
|
+
var lineHeight = {
|
|
220
|
+
"display-lg": "48px",
|
|
221
|
+
"display-md": "40px",
|
|
222
|
+
"heading-xl": "36px",
|
|
223
|
+
"heading-lg": "32px",
|
|
224
|
+
"heading-md": "28px",
|
|
225
|
+
"heading-sm": "26px",
|
|
226
|
+
"body-lg": "24px",
|
|
227
|
+
"body-md": "22px",
|
|
228
|
+
"body-sm": "20px",
|
|
229
|
+
"label-lg": "20px",
|
|
230
|
+
"label-md": "18px",
|
|
231
|
+
caption: "16px",
|
|
232
|
+
data: "20px",
|
|
233
|
+
code: "18px"
|
|
234
|
+
};
|
|
235
|
+
var tracking = {
|
|
236
|
+
tight: "-0.02em",
|
|
237
|
+
normal: "0em",
|
|
238
|
+
wide: "0.01em"
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
// src/tokens/spacing.ts
|
|
242
|
+
var space = {
|
|
243
|
+
0: "0",
|
|
244
|
+
1: "4px",
|
|
245
|
+
2: "8px",
|
|
246
|
+
3: "12px",
|
|
247
|
+
4: "16px",
|
|
248
|
+
5: "20px",
|
|
249
|
+
6: "24px",
|
|
250
|
+
8: "32px",
|
|
251
|
+
10: "40px",
|
|
252
|
+
12: "48px",
|
|
253
|
+
16: "64px",
|
|
254
|
+
20: "80px"
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// src/tokens/sizing.ts
|
|
258
|
+
var controlSize = {
|
|
259
|
+
sm: "32px",
|
|
260
|
+
md: "40px",
|
|
261
|
+
lg: "48px"
|
|
262
|
+
};
|
|
263
|
+
var iconSize = {
|
|
264
|
+
xs: "12px",
|
|
265
|
+
sm: "16px",
|
|
266
|
+
md: "20px",
|
|
267
|
+
lg: "24px"
|
|
268
|
+
};
|
|
269
|
+
var touchMin = "44px";
|
|
270
|
+
var modalSize = {
|
|
271
|
+
sm: "400px",
|
|
272
|
+
md: "560px",
|
|
273
|
+
lg: "720px",
|
|
274
|
+
xl: "880px"
|
|
275
|
+
};
|
|
276
|
+
var sidebarDefault = "280px";
|
|
277
|
+
|
|
278
|
+
// src/tokens/radius.ts
|
|
279
|
+
var radius = {
|
|
280
|
+
none: "0",
|
|
281
|
+
sm: "6px",
|
|
282
|
+
md: "10px",
|
|
283
|
+
lg: "14px",
|
|
284
|
+
xl: "18px",
|
|
285
|
+
full: "9999px"
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
// src/tokens/borders.ts
|
|
289
|
+
var borderWidth = {
|
|
290
|
+
none: "0",
|
|
291
|
+
hairline: "1px",
|
|
292
|
+
medium: "2px",
|
|
293
|
+
strong: "3px"
|
|
294
|
+
};
|
|
295
|
+
var borderStyle = {
|
|
296
|
+
default: "solid"
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
// src/tokens/shadows.ts
|
|
300
|
+
var shadow = {
|
|
301
|
+
none: "none",
|
|
302
|
+
xs: "0 1px 2px rgba(22, 32, 43, 0.05)",
|
|
303
|
+
sm: "0 1px 3px rgba(22, 32, 43, 0.06), 0 2px 8px rgba(22, 32, 43, 0.04)",
|
|
304
|
+
md: "0 2px 4px rgba(22, 32, 43, 0.04), 0 8px 20px rgba(22, 32, 43, 0.08)",
|
|
305
|
+
lg: "0 4px 8px rgba(22, 32, 43, 0.04), 0 16px 40px rgba(22, 32, 43, 0.12)",
|
|
306
|
+
xl: "0 8px 16px rgba(22, 32, 43, 0.06), 0 24px 56px rgba(22, 32, 43, 0.16)",
|
|
307
|
+
focus: "0 0 0 3px rgba(47, 111, 228, 0.28)",
|
|
308
|
+
focusError: "0 0 0 3px rgba(194, 58, 58, 0.2)",
|
|
309
|
+
focusSuccess: "0 0 0 3px rgba(47, 143, 87, 0.2)",
|
|
310
|
+
insetXs: "inset 0 1px 2px rgba(22, 32, 43, 0.06)",
|
|
311
|
+
insetSm: "inset 0 2px 4px rgba(22, 32, 43, 0.08)"
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
// src/tokens/motion.ts
|
|
315
|
+
var duration = {
|
|
316
|
+
fast: "120ms",
|
|
317
|
+
base: "180ms",
|
|
318
|
+
slow: "240ms"
|
|
319
|
+
};
|
|
320
|
+
var easing = {
|
|
321
|
+
standard: "cubic-bezier(0.2, 0, 0, 1)",
|
|
322
|
+
emphasized: "cubic-bezier(0.2, 0, 0, 1)",
|
|
323
|
+
exit: "cubic-bezier(0.4, 0, 1, 1)"
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
// src/tokens/opacity.ts
|
|
327
|
+
var opacity = {
|
|
328
|
+
disabled: 0.48,
|
|
329
|
+
subtle: 0.72,
|
|
330
|
+
overlay: 0.48,
|
|
331
|
+
scrimStrong: 0.64
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
// src/tokens/zIndex.ts
|
|
335
|
+
var zIndex = {
|
|
336
|
+
base: 0,
|
|
337
|
+
dropdown: 1e3,
|
|
338
|
+
sticky: 1100,
|
|
339
|
+
banner: 1200,
|
|
340
|
+
overlay: 1300,
|
|
341
|
+
modal: 1400,
|
|
342
|
+
toast: 1500,
|
|
343
|
+
tooltip: 1600
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
// src/tokens/layout.ts
|
|
347
|
+
var container = {
|
|
348
|
+
max: "1280px",
|
|
349
|
+
reading: "720px"
|
|
350
|
+
};
|
|
351
|
+
var grid = {
|
|
352
|
+
columns: 12,
|
|
353
|
+
gutter: "24px",
|
|
354
|
+
margin: {
|
|
355
|
+
desktop: "32px",
|
|
356
|
+
tablet: "24px",
|
|
357
|
+
mobile: "16px"
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
// src/tokens/focus.ts
|
|
362
|
+
var focusRing = {
|
|
363
|
+
width: "3px",
|
|
364
|
+
color: "rgba(47, 111, 228, 0.28)",
|
|
365
|
+
offset: "2px",
|
|
366
|
+
outlineColor: "#2F6FE4"
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
// src/components/Button/Button.tsx
|
|
370
|
+
var import_react = require("react");
|
|
371
|
+
|
|
372
|
+
// src/utils/cn.ts
|
|
373
|
+
function cn(...classes) {
|
|
374
|
+
return classes.filter(Boolean).join(" ");
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// src/components/Button/Button.module.css
|
|
378
|
+
var Button_default = {};
|
|
379
|
+
|
|
380
|
+
// src/components/Button/Button.tsx
|
|
381
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
382
|
+
var Button = (0, import_react.forwardRef)(
|
|
383
|
+
({
|
|
384
|
+
variant = "primary",
|
|
385
|
+
size = "md",
|
|
386
|
+
fullWidth = false,
|
|
387
|
+
loading = false,
|
|
388
|
+
disabled = false,
|
|
389
|
+
iconLeft,
|
|
390
|
+
iconRight,
|
|
391
|
+
children,
|
|
392
|
+
className,
|
|
393
|
+
...props
|
|
394
|
+
}, ref) => {
|
|
395
|
+
const isDisabled = disabled || loading;
|
|
396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
397
|
+
"button",
|
|
398
|
+
{
|
|
399
|
+
ref,
|
|
400
|
+
className: cn(
|
|
401
|
+
Button_default.button,
|
|
402
|
+
Button_default[variant],
|
|
403
|
+
Button_default[size],
|
|
404
|
+
fullWidth && Button_default.fullWidth,
|
|
405
|
+
loading && Button_default.loading,
|
|
406
|
+
className
|
|
407
|
+
),
|
|
408
|
+
disabled: isDisabled,
|
|
409
|
+
"aria-disabled": isDisabled || void 0,
|
|
410
|
+
"aria-busy": loading || void 0,
|
|
411
|
+
...props,
|
|
412
|
+
children: [
|
|
413
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Button_default.spinner, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeDasharray: "28", strokeDashoffset: "8" }) }) }),
|
|
414
|
+
iconLeft && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Button_default.iconLeft, "aria-hidden": "true", children: iconLeft }),
|
|
415
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Button_default.label, children }),
|
|
416
|
+
iconRight && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Button_default.iconRight, "aria-hidden": "true", children: iconRight })
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
}
|
|
421
|
+
);
|
|
422
|
+
Button.displayName = "Button";
|
|
423
|
+
|
|
424
|
+
// src/components/IconButton/IconButton.tsx
|
|
425
|
+
var import_react2 = require("react");
|
|
426
|
+
|
|
427
|
+
// src/components/IconButton/IconButton.module.css
|
|
428
|
+
var IconButton_default = {};
|
|
429
|
+
|
|
430
|
+
// src/components/IconButton/IconButton.tsx
|
|
431
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
432
|
+
var IconButton = (0, import_react2.forwardRef)(
|
|
433
|
+
({ icon, variant = "ghost", size = "md", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
434
|
+
"button",
|
|
435
|
+
{
|
|
436
|
+
ref,
|
|
437
|
+
className: cn(IconButton_default.iconButton, IconButton_default[variant], IconButton_default[size], className),
|
|
438
|
+
...props,
|
|
439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-hidden": "true", children: icon })
|
|
440
|
+
}
|
|
441
|
+
)
|
|
442
|
+
);
|
|
443
|
+
IconButton.displayName = "IconButton";
|
|
444
|
+
|
|
445
|
+
// src/components/Input/Input.tsx
|
|
446
|
+
var import_react3 = require("react");
|
|
447
|
+
|
|
448
|
+
// src/components/Input/Input.module.css
|
|
449
|
+
var Input_default = {};
|
|
450
|
+
|
|
451
|
+
// src/components/Input/Input.tsx
|
|
452
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
453
|
+
var Input = (0, import_react3.forwardRef)(
|
|
454
|
+
({ size = "md", error = false, fullWidth = false, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
455
|
+
"input",
|
|
456
|
+
{
|
|
457
|
+
ref,
|
|
458
|
+
className: cn(
|
|
459
|
+
Input_default.input,
|
|
460
|
+
Input_default[size],
|
|
461
|
+
error && Input_default.error,
|
|
462
|
+
fullWidth && Input_default.fullWidth,
|
|
463
|
+
className
|
|
464
|
+
),
|
|
465
|
+
"aria-invalid": error || void 0,
|
|
466
|
+
...props
|
|
467
|
+
}
|
|
468
|
+
)
|
|
469
|
+
);
|
|
470
|
+
Input.displayName = "Input";
|
|
471
|
+
|
|
472
|
+
// src/components/Textarea/Textarea.tsx
|
|
473
|
+
var import_react4 = require("react");
|
|
474
|
+
|
|
475
|
+
// src/components/Textarea/Textarea.module.css
|
|
476
|
+
var Textarea_default = {};
|
|
477
|
+
|
|
478
|
+
// src/components/Textarea/Textarea.tsx
|
|
479
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
480
|
+
var Textarea = (0, import_react4.forwardRef)(
|
|
481
|
+
({ error = false, fullWidth = false, resize = "vertical", className, style, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
482
|
+
"textarea",
|
|
483
|
+
{
|
|
484
|
+
ref,
|
|
485
|
+
className: cn(
|
|
486
|
+
Textarea_default.textarea,
|
|
487
|
+
error && Textarea_default.error,
|
|
488
|
+
fullWidth && Textarea_default.fullWidth,
|
|
489
|
+
className
|
|
490
|
+
),
|
|
491
|
+
"aria-invalid": error || void 0,
|
|
492
|
+
style: { ...style, resize },
|
|
493
|
+
...props
|
|
494
|
+
}
|
|
495
|
+
)
|
|
496
|
+
);
|
|
497
|
+
Textarea.displayName = "Textarea";
|
|
498
|
+
|
|
499
|
+
// src/components/Select/Select.tsx
|
|
500
|
+
var import_react5 = require("react");
|
|
501
|
+
|
|
502
|
+
// src/components/Select/Select.module.css
|
|
503
|
+
var Select_default = {};
|
|
504
|
+
|
|
505
|
+
// src/components/Select/Select.tsx
|
|
506
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
507
|
+
var Select = (0, import_react5.forwardRef)(
|
|
508
|
+
({ size = "md", error = false, fullWidth = false, className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cn(Select_default.wrapper, fullWidth && Select_default.fullWidth), children: [
|
|
509
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
510
|
+
"select",
|
|
511
|
+
{
|
|
512
|
+
ref,
|
|
513
|
+
className: cn(
|
|
514
|
+
Select_default.select,
|
|
515
|
+
Select_default[size],
|
|
516
|
+
error && Select_default.error,
|
|
517
|
+
fullWidth && Select_default.fullWidth,
|
|
518
|
+
className
|
|
519
|
+
),
|
|
520
|
+
"aria-invalid": error || void 0,
|
|
521
|
+
...props,
|
|
522
|
+
children
|
|
523
|
+
}
|
|
524
|
+
),
|
|
525
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: Select_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M4 6l4 4 4-4" }) }) })
|
|
526
|
+
] })
|
|
527
|
+
);
|
|
528
|
+
Select.displayName = "Select";
|
|
529
|
+
|
|
530
|
+
// src/components/Checkbox/Checkbox.tsx
|
|
531
|
+
var import_react6 = require("react");
|
|
532
|
+
|
|
533
|
+
// src/components/Checkbox/Checkbox.module.css
|
|
534
|
+
var Checkbox_default = {};
|
|
535
|
+
|
|
536
|
+
// src/components/Checkbox/Checkbox.tsx
|
|
537
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
538
|
+
var Checkbox = (0, import_react6.forwardRef)(
|
|
539
|
+
({ label, error = false, className, id, ...props }, ref) => {
|
|
540
|
+
const inputId = id || (label ? `checkbox-${label.replace(/\s+/g, "-").toLowerCase()}` : void 0);
|
|
541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: cn(Checkbox_default.wrapper, error && Checkbox_default.error, className), children: [
|
|
542
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
543
|
+
"input",
|
|
544
|
+
{
|
|
545
|
+
ref,
|
|
546
|
+
type: "checkbox",
|
|
547
|
+
className: Checkbox_default.input,
|
|
548
|
+
id: inputId,
|
|
549
|
+
"aria-invalid": error || void 0,
|
|
550
|
+
...props
|
|
551
|
+
}
|
|
552
|
+
),
|
|
553
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: Checkbox_default.control, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M2.5 6L5 8.5L9.5 3.5" }) }) }),
|
|
554
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: Checkbox_default.label, children: label })
|
|
555
|
+
] });
|
|
556
|
+
}
|
|
557
|
+
);
|
|
558
|
+
Checkbox.displayName = "Checkbox";
|
|
559
|
+
|
|
560
|
+
// src/components/Radio/Radio.tsx
|
|
561
|
+
var import_react7 = require("react");
|
|
562
|
+
|
|
563
|
+
// src/components/Radio/Radio.module.css
|
|
564
|
+
var Radio_default = {};
|
|
565
|
+
|
|
566
|
+
// src/components/Radio/Radio.tsx
|
|
567
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
568
|
+
var Radio = (0, import_react7.forwardRef)(
|
|
569
|
+
({ label, error = false, className, id, ...props }, ref) => {
|
|
570
|
+
const inputId = id || (label ? `radio-${label.replace(/\s+/g, "-").toLowerCase()}` : void 0);
|
|
571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: cn(Radio_default.wrapper, error && Radio_default.error, className), children: [
|
|
572
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
573
|
+
"input",
|
|
574
|
+
{
|
|
575
|
+
ref,
|
|
576
|
+
type: "radio",
|
|
577
|
+
className: Radio_default.input,
|
|
578
|
+
id: inputId,
|
|
579
|
+
"aria-invalid": error || void 0,
|
|
580
|
+
...props
|
|
581
|
+
}
|
|
582
|
+
),
|
|
583
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: Radio_default.control, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: Radio_default.dot }) }),
|
|
584
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: Radio_default.label, children: label })
|
|
585
|
+
] });
|
|
586
|
+
}
|
|
587
|
+
);
|
|
588
|
+
Radio.displayName = "Radio";
|
|
589
|
+
|
|
590
|
+
// src/components/Switch/Switch.tsx
|
|
591
|
+
var import_react8 = require("react");
|
|
592
|
+
|
|
593
|
+
// src/components/Switch/Switch.module.css
|
|
594
|
+
var Switch_default = {};
|
|
595
|
+
|
|
596
|
+
// src/components/Switch/Switch.tsx
|
|
597
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
598
|
+
var Switch = (0, import_react8.forwardRef)(
|
|
599
|
+
({ label, className, checked, defaultChecked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: cn(Switch_default.wrapper, className), children: [
|
|
600
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
601
|
+
"input",
|
|
602
|
+
{
|
|
603
|
+
ref,
|
|
604
|
+
type: "checkbox",
|
|
605
|
+
role: "switch",
|
|
606
|
+
className: Switch_default.input,
|
|
607
|
+
checked,
|
|
608
|
+
defaultChecked,
|
|
609
|
+
"aria-checked": checked,
|
|
610
|
+
...props
|
|
611
|
+
}
|
|
612
|
+
),
|
|
613
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: Switch_default.track, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: Switch_default.thumb }) }),
|
|
614
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: Switch_default.label, children: label })
|
|
615
|
+
] })
|
|
616
|
+
);
|
|
617
|
+
Switch.displayName = "Switch";
|
|
618
|
+
|
|
619
|
+
// src/components/Label/Label.module.css
|
|
620
|
+
var Label_default = {};
|
|
621
|
+
|
|
622
|
+
// src/components/Label/Label.tsx
|
|
623
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
624
|
+
function Label({ required, className, children, ...props }) {
|
|
625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: cn(Label_default.label, className), ...props, children: [
|
|
626
|
+
children,
|
|
627
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
628
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: Label_default.required, "aria-hidden": "true", children: " *" }),
|
|
629
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: Label_default.srOnly, children: " (required)" })
|
|
630
|
+
] })
|
|
631
|
+
] });
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
// src/components/HelperText/HelperText.module.css
|
|
635
|
+
var HelperText_default = {};
|
|
636
|
+
|
|
637
|
+
// src/components/HelperText/HelperText.tsx
|
|
638
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
639
|
+
function HelperText({ error = false, className, children, ...props }) {
|
|
640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
641
|
+
"p",
|
|
642
|
+
{
|
|
643
|
+
className: cn(HelperText_default.helperText, error && HelperText_default.error, className),
|
|
644
|
+
role: error ? "alert" : void 0,
|
|
645
|
+
...props,
|
|
646
|
+
children: [
|
|
647
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("svg", { className: HelperText_default.icon, width: "14", height: "14", viewBox: "0 0 14 14", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M7 0a7 7 0 110 14A7 7 0 017 0zm0 9.5a.75.75 0 100 1.5.75.75 0 000-1.5zM7 3a.75.75 0 00-.75.75v4a.75.75 0 001.5 0v-4A.75.75 0 007 3z" }) }),
|
|
648
|
+
children
|
|
649
|
+
]
|
|
650
|
+
}
|
|
651
|
+
);
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
// src/components/Card/Card.module.css
|
|
655
|
+
var Card_default = {};
|
|
656
|
+
|
|
657
|
+
// src/components/Card/Card.tsx
|
|
658
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
659
|
+
function Card({ elevation = "flat", padding = "md", className, children, ...props }) {
|
|
660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
661
|
+
"div",
|
|
662
|
+
{
|
|
663
|
+
className: cn(Card_default.card, Card_default[elevation], Card_default[`pad-${padding}`], className),
|
|
664
|
+
...props,
|
|
665
|
+
children
|
|
666
|
+
}
|
|
667
|
+
);
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
// src/components/Badge/Badge.module.css
|
|
671
|
+
var Badge_default = {};
|
|
672
|
+
|
|
673
|
+
// src/components/Badge/Badge.tsx
|
|
674
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
675
|
+
function Badge({ status = "neutral", className, children, ...props }) {
|
|
676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: cn(Badge_default.badge, Badge_default[status], className), ...props, children });
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// src/components/Alert/Alert.module.css
|
|
680
|
+
var Alert_default = {};
|
|
681
|
+
|
|
682
|
+
// src/components/Alert/Alert.tsx
|
|
683
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
684
|
+
var statusIcons = {
|
|
685
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm0 8a1 1 0 00-1 1v5a1 1 0 102 0V9a1 1 0 00-1-1zm0-3.5a1 1 0 100 2 1 1 0 000-2z" }) }),
|
|
686
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm4.3 7.3a1 1 0 00-1.4-1.4L8.5 10.3 7.1 8.9a1 1 0 10-1.4 1.4l2.1 2.1a1 1 0 001.4 0l5.1-5.1z" }) }),
|
|
687
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm0 13a1 1 0 100 2 1 1 0 000-2zm0-8a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" }) }),
|
|
688
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm3.5 6.5a1 1 0 00-1.4 0L10 8.6 7.9 6.5a1 1 0 10-1.4 1.4L8.6 10l-2.1 2.1a1 1 0 101.4 1.4L10 11.4l2.1 2.1a1 1 0 001.4-1.4L11.4 10l2.1-2.1a1 1 0 000-1.4z" }) })
|
|
689
|
+
};
|
|
690
|
+
function Alert({ status = "info", title, action, className, children, ...props }) {
|
|
691
|
+
const isUrgent = status === "error" || status === "warning";
|
|
692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
693
|
+
"div",
|
|
694
|
+
{
|
|
695
|
+
className: cn(Alert_default.alert, Alert_default[status], className),
|
|
696
|
+
role: isUrgent ? "alert" : "status",
|
|
697
|
+
...props,
|
|
698
|
+
children: [
|
|
699
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: Alert_default.icon, "aria-hidden": "true", children: statusIcons[status] }),
|
|
700
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: Alert_default.content, children: [
|
|
701
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: Alert_default.title, children: title }),
|
|
702
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: Alert_default.body, children })
|
|
703
|
+
] }),
|
|
704
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: Alert_default.action, children: action })
|
|
705
|
+
]
|
|
706
|
+
}
|
|
707
|
+
);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
// src/components/Tabs/Tabs.tsx
|
|
711
|
+
var import_react9 = require("react");
|
|
712
|
+
|
|
713
|
+
// src/components/Tabs/Tabs.module.css
|
|
714
|
+
var Tabs_default = {};
|
|
715
|
+
|
|
716
|
+
// src/components/Tabs/Tabs.tsx
|
|
717
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
718
|
+
function Tabs({ tabs, activeTab, onTabChange, className }) {
|
|
719
|
+
const [internalActive, setInternalActive] = (0, import_react9.useState)(tabs[0]?.id ?? "");
|
|
720
|
+
const tabListRef = (0, import_react9.useRef)(null);
|
|
721
|
+
const active = activeTab ?? internalActive;
|
|
722
|
+
const setActive = (0, import_react9.useCallback)(
|
|
723
|
+
(id) => {
|
|
724
|
+
if (!activeTab) setInternalActive(id);
|
|
725
|
+
onTabChange?.(id);
|
|
726
|
+
},
|
|
727
|
+
[activeTab, onTabChange]
|
|
728
|
+
);
|
|
729
|
+
const enabledTabs = tabs.filter((t) => !t.disabled);
|
|
730
|
+
const handleKeyDown = (0, import_react9.useCallback)(
|
|
731
|
+
(e) => {
|
|
732
|
+
const currentIndex = enabledTabs.findIndex((t) => t.id === active);
|
|
733
|
+
let nextIndex = currentIndex;
|
|
734
|
+
switch (e.key) {
|
|
735
|
+
case "ArrowRight":
|
|
736
|
+
nextIndex = (currentIndex + 1) % enabledTabs.length;
|
|
737
|
+
break;
|
|
738
|
+
case "ArrowLeft":
|
|
739
|
+
nextIndex = (currentIndex - 1 + enabledTabs.length) % enabledTabs.length;
|
|
740
|
+
break;
|
|
741
|
+
case "Home":
|
|
742
|
+
nextIndex = 0;
|
|
743
|
+
break;
|
|
744
|
+
case "End":
|
|
745
|
+
nextIndex = enabledTabs.length - 1;
|
|
746
|
+
break;
|
|
747
|
+
default:
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
e.preventDefault();
|
|
751
|
+
const nextTab = enabledTabs[nextIndex];
|
|
752
|
+
setActive(nextTab.id);
|
|
753
|
+
const button = tabListRef.current?.querySelector(`[data-tab-id="${nextTab.id}"]`);
|
|
754
|
+
button?.focus();
|
|
755
|
+
},
|
|
756
|
+
[active, enabledTabs, setActive]
|
|
757
|
+
);
|
|
758
|
+
const activePanel = tabs.find((t) => t.id === active);
|
|
759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn(Tabs_default.wrapper, className), children: [
|
|
760
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
761
|
+
"div",
|
|
762
|
+
{
|
|
763
|
+
ref: tabListRef,
|
|
764
|
+
role: "tablist",
|
|
765
|
+
className: Tabs_default.tabList,
|
|
766
|
+
onKeyDown: handleKeyDown,
|
|
767
|
+
children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
768
|
+
"button",
|
|
769
|
+
{
|
|
770
|
+
role: "tab",
|
|
771
|
+
"data-tab-id": tab.id,
|
|
772
|
+
id: `tab-${tab.id}`,
|
|
773
|
+
className: cn(Tabs_default.tab, tab.id === active && Tabs_default.active),
|
|
774
|
+
"aria-selected": tab.id === active,
|
|
775
|
+
"aria-controls": `panel-${tab.id}`,
|
|
776
|
+
tabIndex: tab.id === active ? 0 : -1,
|
|
777
|
+
disabled: tab.disabled,
|
|
778
|
+
onClick: () => setActive(tab.id),
|
|
779
|
+
children: tab.label
|
|
780
|
+
},
|
|
781
|
+
tab.id
|
|
782
|
+
))
|
|
783
|
+
}
|
|
784
|
+
),
|
|
785
|
+
activePanel && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
786
|
+
"div",
|
|
787
|
+
{
|
|
788
|
+
role: "tabpanel",
|
|
789
|
+
id: `panel-${activePanel.id}`,
|
|
790
|
+
"aria-labelledby": `tab-${activePanel.id}`,
|
|
791
|
+
className: Tabs_default.panel,
|
|
792
|
+
tabIndex: 0,
|
|
793
|
+
children: activePanel.content
|
|
794
|
+
},
|
|
795
|
+
activePanel.id
|
|
796
|
+
)
|
|
797
|
+
] });
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
// src/components/Modal/Modal.tsx
|
|
801
|
+
var import_react10 = require("react");
|
|
802
|
+
|
|
803
|
+
// src/components/Modal/Modal.module.css
|
|
804
|
+
var Modal_default = {};
|
|
805
|
+
|
|
806
|
+
// src/components/Modal/Modal.tsx
|
|
807
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
808
|
+
function Modal({ open, onClose, title, size = "md", footer, className, children }) {
|
|
809
|
+
const dialogRef = (0, import_react10.useRef)(null);
|
|
810
|
+
(0, import_react10.useEffect)(() => {
|
|
811
|
+
const dialog = dialogRef.current;
|
|
812
|
+
if (!dialog) return;
|
|
813
|
+
if (open && !dialog.open) {
|
|
814
|
+
dialog.showModal();
|
|
815
|
+
} else if (!open && dialog.open) {
|
|
816
|
+
dialog.close();
|
|
817
|
+
}
|
|
818
|
+
}, [open]);
|
|
819
|
+
(0, import_react10.useEffect)(() => {
|
|
820
|
+
const dialog = dialogRef.current;
|
|
821
|
+
if (!dialog) return;
|
|
822
|
+
const handleClose = () => onClose();
|
|
823
|
+
dialog.addEventListener("close", handleClose);
|
|
824
|
+
return () => dialog.removeEventListener("close", handleClose);
|
|
825
|
+
}, [onClose]);
|
|
826
|
+
const handleBackdropClick = (e) => {
|
|
827
|
+
if (e.target === dialogRef.current) {
|
|
828
|
+
onClose();
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
832
|
+
"dialog",
|
|
833
|
+
{
|
|
834
|
+
ref: dialogRef,
|
|
835
|
+
className: cn(Modal_default.dialog, Modal_default[size], className),
|
|
836
|
+
"aria-labelledby": "aegis-modal-title",
|
|
837
|
+
onClick: handleBackdropClick,
|
|
838
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: Modal_default.content, children: [
|
|
839
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("header", { className: Modal_default.header, children: [
|
|
840
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { id: "aegis-modal-title", className: Modal_default.title, children: title }),
|
|
841
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
842
|
+
"button",
|
|
843
|
+
{
|
|
844
|
+
className: Modal_default.close,
|
|
845
|
+
onClick: onClose,
|
|
846
|
+
"aria-label": "Close dialog",
|
|
847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", children: [
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("line", { x1: "5", y1: "5", x2: "15", y2: "15" }),
|
|
849
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("line", { x1: "15", y1: "5", x2: "5", y2: "15" })
|
|
850
|
+
] })
|
|
851
|
+
}
|
|
852
|
+
)
|
|
853
|
+
] }),
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: Modal_default.body, children }),
|
|
855
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("footer", { className: Modal_default.footer, children: footer })
|
|
856
|
+
] })
|
|
857
|
+
}
|
|
858
|
+
);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
// src/components/Table/Table.module.css
|
|
862
|
+
var Table_default = {};
|
|
863
|
+
|
|
864
|
+
// src/components/Table/Table.tsx
|
|
865
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
866
|
+
function Table({ density = "default", striped = false, className, children, ...props }) {
|
|
867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: Table_default.wrapper, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
868
|
+
"table",
|
|
869
|
+
{
|
|
870
|
+
className: cn(Table_default.table, Table_default[density], striped && Table_default.striped, className),
|
|
871
|
+
...props,
|
|
872
|
+
children
|
|
873
|
+
}
|
|
874
|
+
) });
|
|
875
|
+
}
|
|
876
|
+
function TableHead({ className, children, ...props }) {
|
|
877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { className: cn(Table_default.thead, className), ...props, children });
|
|
878
|
+
}
|
|
879
|
+
function TableBody({ className, children, ...props }) {
|
|
880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tbody", { className: cn(Table_default.tbody, className), ...props, children });
|
|
881
|
+
}
|
|
882
|
+
function TableRow({ className, children, ...props }) {
|
|
883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: cn(Table_default.tr, className), ...props, children });
|
|
884
|
+
}
|
|
885
|
+
function TableHeaderCell({ className, children, ...props }) {
|
|
886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { scope: "col", className: cn(Table_default.th, className), ...props, children });
|
|
887
|
+
}
|
|
888
|
+
function TableCell({ className, children, ...props }) {
|
|
889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: cn(Table_default.td, className), ...props, children });
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
893
|
+
var import_react11 = require("react");
|
|
894
|
+
|
|
895
|
+
// src/components/Tooltip/Tooltip.module.css
|
|
896
|
+
var Tooltip_default = {};
|
|
897
|
+
|
|
898
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
899
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
900
|
+
function Tooltip({ content, children, placement = "top", delay = 200, className }) {
|
|
901
|
+
const [visible, setVisible] = (0, import_react11.useState)(false);
|
|
902
|
+
const timeoutRef = (0, import_react11.useRef)();
|
|
903
|
+
const tooltipId = (0, import_react11.useRef)(`tooltip-${Math.random().toString(36).slice(2, 9)}`).current;
|
|
904
|
+
const show = () => {
|
|
905
|
+
timeoutRef.current = setTimeout(() => setVisible(true), delay);
|
|
906
|
+
};
|
|
907
|
+
const hide = () => {
|
|
908
|
+
clearTimeout(timeoutRef.current);
|
|
909
|
+
setVisible(false);
|
|
910
|
+
};
|
|
911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
912
|
+
"div",
|
|
913
|
+
{
|
|
914
|
+
className: cn(Tooltip_default.wrapper, className),
|
|
915
|
+
onMouseEnter: show,
|
|
916
|
+
onMouseLeave: hide,
|
|
917
|
+
onFocus: show,
|
|
918
|
+
onBlur: hide,
|
|
919
|
+
children: [
|
|
920
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { "aria-describedby": visible ? tooltipId : void 0, children }),
|
|
921
|
+
visible && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
922
|
+
"div",
|
|
923
|
+
{
|
|
924
|
+
id: tooltipId,
|
|
925
|
+
role: "tooltip",
|
|
926
|
+
className: cn(Tooltip_default.tooltip, Tooltip_default[placement]),
|
|
927
|
+
children: content
|
|
928
|
+
}
|
|
929
|
+
)
|
|
930
|
+
]
|
|
931
|
+
}
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
// src/components/Divider/Divider.module.css
|
|
936
|
+
var Divider_default = {};
|
|
937
|
+
|
|
938
|
+
// src/components/Divider/Divider.tsx
|
|
939
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
940
|
+
function Divider({ spacing = "md", className, ...props }) {
|
|
941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("hr", { className: cn(Divider_default.divider, Divider_default[spacing], className), ...props });
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
// src/components/Spinner/Spinner.module.css
|
|
945
|
+
var Spinner_default = {};
|
|
946
|
+
|
|
947
|
+
// src/components/Spinner/Spinner.tsx
|
|
948
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
949
|
+
function Spinner({ size = "md", label = "Loading", className, ...props }) {
|
|
950
|
+
const sizeMap = { sm: 16, md: 24, lg: 32 };
|
|
951
|
+
const s = sizeMap[size];
|
|
952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
953
|
+
"span",
|
|
954
|
+
{
|
|
955
|
+
className: cn(Spinner_default.spinner, className),
|
|
956
|
+
role: "status",
|
|
957
|
+
"aria-label": label,
|
|
958
|
+
"aria-live": "polite",
|
|
959
|
+
...props,
|
|
960
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
961
|
+
"svg",
|
|
962
|
+
{
|
|
963
|
+
width: s,
|
|
964
|
+
height: s,
|
|
965
|
+
viewBox: "0 0 24 24",
|
|
966
|
+
fill: "none",
|
|
967
|
+
className: Spinner_default.svg,
|
|
968
|
+
"aria-hidden": "true",
|
|
969
|
+
children: [
|
|
970
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
971
|
+
"circle",
|
|
972
|
+
{
|
|
973
|
+
cx: "12",
|
|
974
|
+
cy: "12",
|
|
975
|
+
r: "10",
|
|
976
|
+
stroke: "currentColor",
|
|
977
|
+
strokeWidth: "2.5",
|
|
978
|
+
strokeLinecap: "round",
|
|
979
|
+
opacity: "0.2"
|
|
980
|
+
}
|
|
981
|
+
),
|
|
982
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
983
|
+
"circle",
|
|
984
|
+
{
|
|
985
|
+
cx: "12",
|
|
986
|
+
cy: "12",
|
|
987
|
+
r: "10",
|
|
988
|
+
stroke: "currentColor",
|
|
989
|
+
strokeWidth: "2.5",
|
|
990
|
+
strokeLinecap: "round",
|
|
991
|
+
strokeDasharray: "50",
|
|
992
|
+
strokeDashoffset: "35"
|
|
993
|
+
}
|
|
994
|
+
)
|
|
995
|
+
]
|
|
996
|
+
}
|
|
997
|
+
)
|
|
998
|
+
}
|
|
999
|
+
);
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
// src/components/Skeleton/Skeleton.module.css
|
|
1003
|
+
var Skeleton_default = {};
|
|
1004
|
+
|
|
1005
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
1006
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1007
|
+
function Skeleton({
|
|
1008
|
+
variant = "text",
|
|
1009
|
+
width,
|
|
1010
|
+
height,
|
|
1011
|
+
lines = 1,
|
|
1012
|
+
className,
|
|
1013
|
+
style,
|
|
1014
|
+
...props
|
|
1015
|
+
}) {
|
|
1016
|
+
if (variant === "text" && lines > 1) {
|
|
1017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn(Skeleton_default.group, className), "aria-hidden": "true", ...props, children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1018
|
+
"div",
|
|
1019
|
+
{
|
|
1020
|
+
className: cn(Skeleton_default.skeleton, Skeleton_default.text),
|
|
1021
|
+
style: {
|
|
1022
|
+
width: i === lines - 1 ? "75%" : width ?? "100%",
|
|
1023
|
+
height: height ?? void 0,
|
|
1024
|
+
...style
|
|
1025
|
+
}
|
|
1026
|
+
},
|
|
1027
|
+
i
|
|
1028
|
+
)) });
|
|
1029
|
+
}
|
|
1030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1031
|
+
"div",
|
|
1032
|
+
{
|
|
1033
|
+
className: cn(Skeleton_default.skeleton, Skeleton_default[variant], className),
|
|
1034
|
+
"aria-hidden": "true",
|
|
1035
|
+
style: {
|
|
1036
|
+
width: width ?? (variant === "circular" ? 40 : "100%"),
|
|
1037
|
+
height: height ?? (variant === "circular" ? 40 : variant === "rectangular" ? 120 : void 0),
|
|
1038
|
+
...style
|
|
1039
|
+
},
|
|
1040
|
+
...props
|
|
1041
|
+
}
|
|
1042
|
+
);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
// src/components/StatusBadge/StatusBadge.module.css
|
|
1046
|
+
var StatusBadge_default = {};
|
|
1047
|
+
|
|
1048
|
+
// src/components/StatusBadge/StatusBadge.tsx
|
|
1049
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1050
|
+
var statusLabels = {
|
|
1051
|
+
active: "Active",
|
|
1052
|
+
inactive: "Inactive",
|
|
1053
|
+
pending: "Pending",
|
|
1054
|
+
critical: "Critical",
|
|
1055
|
+
discharged: "Discharged",
|
|
1056
|
+
scheduled: "Scheduled",
|
|
1057
|
+
cancelled: "Cancelled",
|
|
1058
|
+
"in-progress": "In Progress"
|
|
1059
|
+
};
|
|
1060
|
+
function StatusBadge({
|
|
1061
|
+
status,
|
|
1062
|
+
size = "md",
|
|
1063
|
+
dot = false,
|
|
1064
|
+
className,
|
|
1065
|
+
children,
|
|
1066
|
+
...props
|
|
1067
|
+
}) {
|
|
1068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1069
|
+
"span",
|
|
1070
|
+
{
|
|
1071
|
+
className: cn(StatusBadge_default.badge, StatusBadge_default[status], StatusBadge_default[size], className),
|
|
1072
|
+
...props,
|
|
1073
|
+
children: [
|
|
1074
|
+
dot && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: StatusBadge_default.dot, "aria-hidden": "true" }),
|
|
1075
|
+
children ?? statusLabels[status]
|
|
1076
|
+
]
|
|
1077
|
+
}
|
|
1078
|
+
);
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
// src/components/Avatar/Avatar.tsx
|
|
1082
|
+
var import_react12 = require("react");
|
|
1083
|
+
|
|
1084
|
+
// src/components/Avatar/Avatar.module.css
|
|
1085
|
+
var Avatar_default = {};
|
|
1086
|
+
|
|
1087
|
+
// src/components/Avatar/Avatar.tsx
|
|
1088
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1089
|
+
function getInitials(name) {
|
|
1090
|
+
const parts = name.trim().split(/\s+/);
|
|
1091
|
+
if (parts.length === 0) return "";
|
|
1092
|
+
if (parts.length === 1) return parts[0][0]?.toUpperCase() ?? "";
|
|
1093
|
+
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
1094
|
+
}
|
|
1095
|
+
function Avatar({
|
|
1096
|
+
src,
|
|
1097
|
+
alt,
|
|
1098
|
+
name,
|
|
1099
|
+
size = "md",
|
|
1100
|
+
status,
|
|
1101
|
+
className,
|
|
1102
|
+
...props
|
|
1103
|
+
}) {
|
|
1104
|
+
const [imgError, setImgError] = (0, import_react12.useState)(false);
|
|
1105
|
+
const showImage = src && !imgError;
|
|
1106
|
+
const initials = name ? getInitials(name) : "";
|
|
1107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1108
|
+
"span",
|
|
1109
|
+
{
|
|
1110
|
+
className: cn(Avatar_default.avatar, Avatar_default[size], className),
|
|
1111
|
+
role: "img",
|
|
1112
|
+
"aria-label": alt ?? name ?? "Avatar",
|
|
1113
|
+
...props,
|
|
1114
|
+
children: [
|
|
1115
|
+
showImage ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1116
|
+
"img",
|
|
1117
|
+
{
|
|
1118
|
+
src,
|
|
1119
|
+
alt: alt ?? name ?? "Avatar",
|
|
1120
|
+
className: Avatar_default.image,
|
|
1121
|
+
onError: () => setImgError(true)
|
|
1122
|
+
}
|
|
1123
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: Avatar_default.initials, "aria-hidden": "true", children: initials }),
|
|
1124
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: cn(Avatar_default.status, Avatar_default[`status-${status}`]), "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: Avatar_default.srOnly, children: status }) })
|
|
1125
|
+
]
|
|
1126
|
+
}
|
|
1127
|
+
);
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
// src/components/EmptyState/EmptyState.module.css
|
|
1131
|
+
var EmptyState_default = {};
|
|
1132
|
+
|
|
1133
|
+
// src/components/EmptyState/EmptyState.tsx
|
|
1134
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1135
|
+
function EmptyState({
|
|
1136
|
+
icon,
|
|
1137
|
+
title,
|
|
1138
|
+
description,
|
|
1139
|
+
action,
|
|
1140
|
+
className,
|
|
1141
|
+
...props
|
|
1142
|
+
}) {
|
|
1143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cn(EmptyState_default.container, className), ...props, children: [
|
|
1144
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: EmptyState_default.icon, "aria-hidden": "true", children: icon }),
|
|
1145
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h3", { className: EmptyState_default.title, children: title }),
|
|
1146
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: EmptyState_default.description, children: description }),
|
|
1147
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: EmptyState_default.action, children: action })
|
|
1148
|
+
] });
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// src/components/ProgressBar/ProgressBar.module.css
|
|
1152
|
+
var ProgressBar_default = {};
|
|
1153
|
+
|
|
1154
|
+
// src/components/ProgressBar/ProgressBar.tsx
|
|
1155
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1156
|
+
function ProgressBar({
|
|
1157
|
+
value,
|
|
1158
|
+
max = 100,
|
|
1159
|
+
size = "md",
|
|
1160
|
+
variant = "default",
|
|
1161
|
+
label,
|
|
1162
|
+
showValue = false,
|
|
1163
|
+
className,
|
|
1164
|
+
...props
|
|
1165
|
+
}) {
|
|
1166
|
+
const pct = Math.min(100, Math.max(0, value / max * 100));
|
|
1167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: cn(ProgressBar_default.container, className), ...props, children: [
|
|
1168
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: ProgressBar_default.header, children: [
|
|
1169
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: ProgressBar_default.label, children: label }),
|
|
1170
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: ProgressBar_default.value, children: [
|
|
1171
|
+
Math.round(pct),
|
|
1172
|
+
"%"
|
|
1173
|
+
] })
|
|
1174
|
+
] }),
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1176
|
+
"div",
|
|
1177
|
+
{
|
|
1178
|
+
className: cn(ProgressBar_default.track, ProgressBar_default[size]),
|
|
1179
|
+
role: "progressbar",
|
|
1180
|
+
"aria-valuenow": value,
|
|
1181
|
+
"aria-valuemin": 0,
|
|
1182
|
+
"aria-valuemax": max,
|
|
1183
|
+
"aria-label": label,
|
|
1184
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1185
|
+
"div",
|
|
1186
|
+
{
|
|
1187
|
+
className: cn(ProgressBar_default.fill, ProgressBar_default[variant]),
|
|
1188
|
+
style: { width: `${pct}%` }
|
|
1189
|
+
}
|
|
1190
|
+
)
|
|
1191
|
+
}
|
|
1192
|
+
)
|
|
1193
|
+
] });
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
// src/components/Pagination/Pagination.module.css
|
|
1197
|
+
var Pagination_default = {};
|
|
1198
|
+
|
|
1199
|
+
// src/components/Pagination/Pagination.tsx
|
|
1200
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1201
|
+
function getPageRange(current, total, siblings) {
|
|
1202
|
+
const totalNumbers = siblings * 2 + 3;
|
|
1203
|
+
const totalBlocks = totalNumbers + 2;
|
|
1204
|
+
if (total <= totalBlocks) {
|
|
1205
|
+
return Array.from({ length: total }, (_, i) => i + 1);
|
|
1206
|
+
}
|
|
1207
|
+
const leftSibling = Math.max(current - siblings, 1);
|
|
1208
|
+
const rightSibling = Math.min(current + siblings, total);
|
|
1209
|
+
const showLeftEllipsis = leftSibling > 2;
|
|
1210
|
+
const showRightEllipsis = rightSibling < total - 1;
|
|
1211
|
+
if (!showLeftEllipsis && showRightEllipsis) {
|
|
1212
|
+
const leftCount = 3 + 2 * siblings;
|
|
1213
|
+
const leftRange = Array.from({ length: leftCount }, (_, i) => i + 1);
|
|
1214
|
+
return [...leftRange, "ellipsis", total];
|
|
1215
|
+
}
|
|
1216
|
+
if (showLeftEllipsis && !showRightEllipsis) {
|
|
1217
|
+
const rightCount = 3 + 2 * siblings;
|
|
1218
|
+
const rightRange = Array.from({ length: rightCount }, (_, i) => total - rightCount + i + 1);
|
|
1219
|
+
return [1, "ellipsis", ...rightRange];
|
|
1220
|
+
}
|
|
1221
|
+
const middleRange = Array.from(
|
|
1222
|
+
{ length: rightSibling - leftSibling + 1 },
|
|
1223
|
+
(_, i) => leftSibling + i
|
|
1224
|
+
);
|
|
1225
|
+
return [1, "ellipsis", ...middleRange, "ellipsis", total];
|
|
1226
|
+
}
|
|
1227
|
+
function Pagination({
|
|
1228
|
+
currentPage,
|
|
1229
|
+
totalPages,
|
|
1230
|
+
onPageChange,
|
|
1231
|
+
siblingCount = 1,
|
|
1232
|
+
size = "md",
|
|
1233
|
+
className,
|
|
1234
|
+
...props
|
|
1235
|
+
}) {
|
|
1236
|
+
const pages = getPageRange(currentPage, totalPages, siblingCount);
|
|
1237
|
+
if (totalPages <= 1) return null;
|
|
1238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1239
|
+
"nav",
|
|
1240
|
+
{
|
|
1241
|
+
className: cn(Pagination_default.pagination, Pagination_default[size], className),
|
|
1242
|
+
"aria-label": "Pagination",
|
|
1243
|
+
...props,
|
|
1244
|
+
children: [
|
|
1245
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1246
|
+
"button",
|
|
1247
|
+
{
|
|
1248
|
+
className: cn(Pagination_default.button, Pagination_default.nav),
|
|
1249
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
1250
|
+
disabled: currentPage <= 1,
|
|
1251
|
+
"aria-label": "Previous page",
|
|
1252
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("polyline", { points: "10 4 6 8 10 12" }) })
|
|
1253
|
+
}
|
|
1254
|
+
),
|
|
1255
|
+
pages.map(
|
|
1256
|
+
(page, idx) => page === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: Pagination_default.ellipsis, "aria-hidden": "true", children: "\u2026" }, `ellipsis-${idx}`) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1257
|
+
"button",
|
|
1258
|
+
{
|
|
1259
|
+
className: cn(Pagination_default.button, page === currentPage && Pagination_default.active),
|
|
1260
|
+
onClick: () => onPageChange(page),
|
|
1261
|
+
"aria-current": page === currentPage ? "page" : void 0,
|
|
1262
|
+
"aria-label": `Page ${page}`,
|
|
1263
|
+
children: page
|
|
1264
|
+
},
|
|
1265
|
+
page
|
|
1266
|
+
)
|
|
1267
|
+
),
|
|
1268
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1269
|
+
"button",
|
|
1270
|
+
{
|
|
1271
|
+
className: cn(Pagination_default.button, Pagination_default.nav),
|
|
1272
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
1273
|
+
disabled: currentPage >= totalPages,
|
|
1274
|
+
"aria-label": "Next page",
|
|
1275
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("polyline", { points: "6 4 10 8 6 12" }) })
|
|
1276
|
+
}
|
|
1277
|
+
)
|
|
1278
|
+
]
|
|
1279
|
+
}
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
// src/components/DescriptionList/DescriptionList.module.css
|
|
1284
|
+
var DescriptionList_default = {};
|
|
1285
|
+
|
|
1286
|
+
// src/components/DescriptionList/DescriptionList.tsx
|
|
1287
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1288
|
+
function DescriptionList({
|
|
1289
|
+
items,
|
|
1290
|
+
layout = "vertical",
|
|
1291
|
+
columns = 2,
|
|
1292
|
+
className,
|
|
1293
|
+
style,
|
|
1294
|
+
...props
|
|
1295
|
+
}) {
|
|
1296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1297
|
+
"dl",
|
|
1298
|
+
{
|
|
1299
|
+
className: cn(DescriptionList_default.list, DescriptionList_default[layout], className),
|
|
1300
|
+
style: {
|
|
1301
|
+
...layout === "grid" ? { "--dl-columns": columns } : {},
|
|
1302
|
+
...style
|
|
1303
|
+
},
|
|
1304
|
+
...props,
|
|
1305
|
+
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: DescriptionList_default.item, children: [
|
|
1306
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("dt", { className: DescriptionList_default.term, children: item.label }),
|
|
1307
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("dd", { className: DescriptionList_default.definition, children: item.value })
|
|
1308
|
+
] }, i))
|
|
1309
|
+
}
|
|
1310
|
+
);
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
// src/components/Popover/Popover.tsx
|
|
1314
|
+
var import_react13 = require("react");
|
|
1315
|
+
|
|
1316
|
+
// src/components/Popover/Popover.module.css
|
|
1317
|
+
var Popover_default = {};
|
|
1318
|
+
|
|
1319
|
+
// src/components/Popover/Popover.tsx
|
|
1320
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1321
|
+
function Popover({
|
|
1322
|
+
trigger,
|
|
1323
|
+
content,
|
|
1324
|
+
open: controlledOpen,
|
|
1325
|
+
onOpenChange,
|
|
1326
|
+
placement = "bottom",
|
|
1327
|
+
align = "center",
|
|
1328
|
+
className,
|
|
1329
|
+
...props
|
|
1330
|
+
}) {
|
|
1331
|
+
const [internalOpen, setInternalOpen] = (0, import_react13.useState)(false);
|
|
1332
|
+
const isControlled = controlledOpen !== void 0;
|
|
1333
|
+
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
1334
|
+
const containerRef = (0, import_react13.useRef)(null);
|
|
1335
|
+
const contentRef = (0, import_react13.useRef)(null);
|
|
1336
|
+
const setOpen = (0, import_react13.useCallback)(
|
|
1337
|
+
(value) => {
|
|
1338
|
+
if (!isControlled) setInternalOpen(value);
|
|
1339
|
+
onOpenChange?.(value);
|
|
1340
|
+
},
|
|
1341
|
+
[isControlled, onOpenChange]
|
|
1342
|
+
);
|
|
1343
|
+
const toggle = (0, import_react13.useCallback)(() => setOpen(!isOpen), [isOpen, setOpen]);
|
|
1344
|
+
(0, import_react13.useEffect)(() => {
|
|
1345
|
+
if (!isOpen) return;
|
|
1346
|
+
const handleKeyDown = (e) => {
|
|
1347
|
+
if (e.key === "Escape") {
|
|
1348
|
+
setOpen(false);
|
|
1349
|
+
}
|
|
1350
|
+
};
|
|
1351
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
1352
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
1353
|
+
}, [isOpen, setOpen]);
|
|
1354
|
+
(0, import_react13.useEffect)(() => {
|
|
1355
|
+
if (!isOpen) return;
|
|
1356
|
+
const handleClick = (e) => {
|
|
1357
|
+
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
1358
|
+
setOpen(false);
|
|
1359
|
+
}
|
|
1360
|
+
};
|
|
1361
|
+
document.addEventListener("mousedown", handleClick);
|
|
1362
|
+
return () => document.removeEventListener("mousedown", handleClick);
|
|
1363
|
+
}, [isOpen, setOpen]);
|
|
1364
|
+
(0, import_react13.useEffect)(() => {
|
|
1365
|
+
if (isOpen && contentRef.current) {
|
|
1366
|
+
const firstFocusable = contentRef.current.querySelector(
|
|
1367
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
1368
|
+
);
|
|
1369
|
+
if (firstFocusable) {
|
|
1370
|
+
firstFocusable.focus();
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
}, [isOpen]);
|
|
1374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { ref: containerRef, className: cn(Popover_default.container, className), ...props, children: [
|
|
1375
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: Popover_default.trigger, onClick: toggle, children: trigger }),
|
|
1376
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1377
|
+
"div",
|
|
1378
|
+
{
|
|
1379
|
+
ref: contentRef,
|
|
1380
|
+
className: cn(Popover_default.content, Popover_default[placement], Popover_default[`align-${align}`]),
|
|
1381
|
+
role: "dialog",
|
|
1382
|
+
"aria-modal": "false",
|
|
1383
|
+
children: content
|
|
1384
|
+
}
|
|
1385
|
+
)
|
|
1386
|
+
] });
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
// src/components/Drawer/Drawer.tsx
|
|
1390
|
+
var import_react14 = require("react");
|
|
1391
|
+
|
|
1392
|
+
// src/components/Drawer/Drawer.module.css
|
|
1393
|
+
var Drawer_default = {};
|
|
1394
|
+
|
|
1395
|
+
// src/components/Drawer/Drawer.tsx
|
|
1396
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1397
|
+
function Drawer({
|
|
1398
|
+
open,
|
|
1399
|
+
onClose,
|
|
1400
|
+
title,
|
|
1401
|
+
size = "md",
|
|
1402
|
+
position = "right",
|
|
1403
|
+
footer,
|
|
1404
|
+
className,
|
|
1405
|
+
children
|
|
1406
|
+
}) {
|
|
1407
|
+
const dialogRef = (0, import_react14.useRef)(null);
|
|
1408
|
+
(0, import_react14.useEffect)(() => {
|
|
1409
|
+
const dialog = dialogRef.current;
|
|
1410
|
+
if (!dialog) return;
|
|
1411
|
+
if (open && !dialog.open) {
|
|
1412
|
+
dialog.showModal();
|
|
1413
|
+
} else if (!open && dialog.open) {
|
|
1414
|
+
dialog.close();
|
|
1415
|
+
}
|
|
1416
|
+
}, [open]);
|
|
1417
|
+
(0, import_react14.useEffect)(() => {
|
|
1418
|
+
const dialog = dialogRef.current;
|
|
1419
|
+
if (!dialog) return;
|
|
1420
|
+
const handleClose = () => onClose();
|
|
1421
|
+
dialog.addEventListener("close", handleClose);
|
|
1422
|
+
return () => dialog.removeEventListener("close", handleClose);
|
|
1423
|
+
}, [onClose]);
|
|
1424
|
+
const handleBackdropClick = (e) => {
|
|
1425
|
+
if (e.target === dialogRef.current) {
|
|
1426
|
+
onClose();
|
|
1427
|
+
}
|
|
1428
|
+
};
|
|
1429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1430
|
+
"dialog",
|
|
1431
|
+
{
|
|
1432
|
+
ref: dialogRef,
|
|
1433
|
+
className: cn(Drawer_default.dialog, Drawer_default[position], Drawer_default[size], className),
|
|
1434
|
+
"aria-labelledby": "aegis-drawer-title",
|
|
1435
|
+
onClick: handleBackdropClick,
|
|
1436
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: Drawer_default.panel, children: [
|
|
1437
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("header", { className: Drawer_default.header, children: [
|
|
1438
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h2", { id: "aegis-drawer-title", className: Drawer_default.title, children: title }),
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1440
|
+
"button",
|
|
1441
|
+
{
|
|
1442
|
+
className: Drawer_default.close,
|
|
1443
|
+
onClick: onClose,
|
|
1444
|
+
"aria-label": "Close drawer",
|
|
1445
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", "aria-hidden": "true", children: [
|
|
1446
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("line", { x1: "5", y1: "5", x2: "15", y2: "15" }),
|
|
1447
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("line", { x1: "15", y1: "5", x2: "5", y2: "15" })
|
|
1448
|
+
] })
|
|
1449
|
+
}
|
|
1450
|
+
)
|
|
1451
|
+
] }),
|
|
1452
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: Drawer_default.body, children }),
|
|
1453
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("footer", { className: Drawer_default.footer, children: footer })
|
|
1454
|
+
] })
|
|
1455
|
+
}
|
|
1456
|
+
);
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
// src/components/DataGrid/DataGrid.tsx
|
|
1460
|
+
var import_react15 = require("react");
|
|
1461
|
+
|
|
1462
|
+
// src/components/DataGrid/DataGrid.module.css
|
|
1463
|
+
var DataGrid_default = {};
|
|
1464
|
+
|
|
1465
|
+
// src/components/DataGrid/DataGrid.tsx
|
|
1466
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1467
|
+
function DataGrid({
|
|
1468
|
+
columns,
|
|
1469
|
+
data,
|
|
1470
|
+
selectable = false,
|
|
1471
|
+
onSelectionChange,
|
|
1472
|
+
selectedRows = [],
|
|
1473
|
+
sortColumn,
|
|
1474
|
+
sortDirection,
|
|
1475
|
+
onSort,
|
|
1476
|
+
loading = false,
|
|
1477
|
+
emptyMessage = "No data available",
|
|
1478
|
+
density = "default",
|
|
1479
|
+
stickyHeader = false,
|
|
1480
|
+
striped = false,
|
|
1481
|
+
onRowClick,
|
|
1482
|
+
className,
|
|
1483
|
+
...props
|
|
1484
|
+
}) {
|
|
1485
|
+
const allSelected = data.length > 0 && selectedRows.length === data.length;
|
|
1486
|
+
const someSelected = selectedRows.length > 0 && !allSelected;
|
|
1487
|
+
const handleSelectAll = (0, import_react15.useCallback)(() => {
|
|
1488
|
+
if (!onSelectionChange) return;
|
|
1489
|
+
if (allSelected) {
|
|
1490
|
+
onSelectionChange([]);
|
|
1491
|
+
} else {
|
|
1492
|
+
onSelectionChange(data.map((_, i) => i));
|
|
1493
|
+
}
|
|
1494
|
+
}, [allSelected, data, onSelectionChange]);
|
|
1495
|
+
const handleSelectRow = (0, import_react15.useCallback)(
|
|
1496
|
+
(index) => {
|
|
1497
|
+
if (!onSelectionChange) return;
|
|
1498
|
+
if (selectedRows.includes(index)) {
|
|
1499
|
+
onSelectionChange(selectedRows.filter((i) => i !== index));
|
|
1500
|
+
} else {
|
|
1501
|
+
onSelectionChange([...selectedRows, index]);
|
|
1502
|
+
}
|
|
1503
|
+
},
|
|
1504
|
+
[selectedRows, onSelectionChange]
|
|
1505
|
+
);
|
|
1506
|
+
const handleSort = (0, import_react15.useCallback)(
|
|
1507
|
+
(key) => {
|
|
1508
|
+
if (!onSort) return;
|
|
1509
|
+
const newDirection = sortColumn === key && sortDirection === "asc" ? "desc" : "asc";
|
|
1510
|
+
onSort(key, newDirection);
|
|
1511
|
+
},
|
|
1512
|
+
[sortColumn, sortDirection, onSort]
|
|
1513
|
+
);
|
|
1514
|
+
const tableDensity = density === "comfortable" ? "default" : density;
|
|
1515
|
+
const getAriaSort = (key) => {
|
|
1516
|
+
if (sortColumn !== key) return "none";
|
|
1517
|
+
return sortDirection === "asc" ? "ascending" : "descending";
|
|
1518
|
+
};
|
|
1519
|
+
const getValue = (row, key) => {
|
|
1520
|
+
return key.split(".").reduce((obj, k) => {
|
|
1521
|
+
if (obj && typeof obj === "object") return obj[k];
|
|
1522
|
+
return void 0;
|
|
1523
|
+
}, row);
|
|
1524
|
+
};
|
|
1525
|
+
const loadingRows = 5;
|
|
1526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1527
|
+
"div",
|
|
1528
|
+
{
|
|
1529
|
+
className: cn(DataGrid_default.container, stickyHeader && DataGrid_default.stickyHeader, className),
|
|
1530
|
+
"aria-busy": loading,
|
|
1531
|
+
...props,
|
|
1532
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1533
|
+
Table,
|
|
1534
|
+
{
|
|
1535
|
+
density: tableDensity,
|
|
1536
|
+
striped,
|
|
1537
|
+
className: cn(density === "comfortable" && DataGrid_default.comfortable),
|
|
1538
|
+
children: [
|
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TableRow, { children: [
|
|
1540
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableHeaderCell, { style: { width: 44 }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1541
|
+
"input",
|
|
1542
|
+
{
|
|
1543
|
+
type: "checkbox",
|
|
1544
|
+
checked: allSelected,
|
|
1545
|
+
ref: (el) => {
|
|
1546
|
+
if (el) el.indeterminate = someSelected;
|
|
1547
|
+
},
|
|
1548
|
+
onChange: handleSelectAll,
|
|
1549
|
+
"aria-label": "Select all rows",
|
|
1550
|
+
className: DataGrid_default.checkbox
|
|
1551
|
+
}
|
|
1552
|
+
) }),
|
|
1553
|
+
columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1554
|
+
TableHeaderCell,
|
|
1555
|
+
{
|
|
1556
|
+
style: {
|
|
1557
|
+
width: col.width,
|
|
1558
|
+
textAlign: col.align
|
|
1559
|
+
},
|
|
1560
|
+
"aria-sort": col.sortable ? getAriaSort(col.key) : void 0,
|
|
1561
|
+
children: col.sortable ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1562
|
+
"button",
|
|
1563
|
+
{
|
|
1564
|
+
className: DataGrid_default.sortButton,
|
|
1565
|
+
onClick: () => handleSort(col.key),
|
|
1566
|
+
style: { textAlign: col.align },
|
|
1567
|
+
children: [
|
|
1568
|
+
col.header,
|
|
1569
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: DataGrid_default.sortIcon, "aria-hidden": "true", children: sortColumn === col.key ? sortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("polyline", { points: "4 8 7 5 10 8" }) }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("polyline", { points: "4 6 7 9 10 6" }) }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", opacity: "0.3", children: [
|
|
1570
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("polyline", { points: "4 5 7 3 10 5" }),
|
|
1571
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("polyline", { points: "4 9 7 11 10 9" })
|
|
1572
|
+
] }) })
|
|
1573
|
+
]
|
|
1574
|
+
}
|
|
1575
|
+
) : col.header
|
|
1576
|
+
},
|
|
1577
|
+
col.key
|
|
1578
|
+
))
|
|
1579
|
+
] }) }),
|
|
1580
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableBody, { children: loading ? Array.from({ length: loadingRows }, (_, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TableRow, { children: [
|
|
1581
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Skeleton, { variant: "rectangular", width: 16, height: 16 }) }),
|
|
1582
|
+
columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Skeleton, { variant: "text", width: "80%" }) }, col.key))
|
|
1583
|
+
] }, `skeleton-${rowIdx}`)) : data.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("td", { colSpan: columns.length + (selectable ? 1 : 0), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(EmptyState, { title: emptyMessage }) }) }) : data.map((row, rowIdx) => {
|
|
1584
|
+
const isSelected = selectedRows.includes(rowIdx);
|
|
1585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1586
|
+
TableRow,
|
|
1587
|
+
{
|
|
1588
|
+
className: cn(
|
|
1589
|
+
isSelected && DataGrid_default.selectedRow,
|
|
1590
|
+
onRowClick && DataGrid_default.clickableRow
|
|
1591
|
+
),
|
|
1592
|
+
onClick: onRowClick ? () => onRowClick(row, rowIdx) : void 0,
|
|
1593
|
+
children: [
|
|
1594
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1595
|
+
"input",
|
|
1596
|
+
{
|
|
1597
|
+
type: "checkbox",
|
|
1598
|
+
checked: isSelected,
|
|
1599
|
+
onChange: (e) => {
|
|
1600
|
+
e.stopPropagation();
|
|
1601
|
+
handleSelectRow(rowIdx);
|
|
1602
|
+
},
|
|
1603
|
+
onClick: (e) => e.stopPropagation(),
|
|
1604
|
+
"aria-label": `Select row ${rowIdx + 1}`,
|
|
1605
|
+
className: DataGrid_default.checkbox
|
|
1606
|
+
}
|
|
1607
|
+
) }),
|
|
1608
|
+
columns.map((col) => {
|
|
1609
|
+
const value = getValue(row, col.key);
|
|
1610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { style: { textAlign: col.align }, children: col.render ? col.render(value, row, rowIdx) : value }, col.key);
|
|
1611
|
+
})
|
|
1612
|
+
]
|
|
1613
|
+
},
|
|
1614
|
+
rowIdx
|
|
1615
|
+
);
|
|
1616
|
+
}) })
|
|
1617
|
+
]
|
|
1618
|
+
}
|
|
1619
|
+
)
|
|
1620
|
+
}
|
|
1621
|
+
);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
// src/components/FormField/FormField.tsx
|
|
1625
|
+
var import_react16 = require("react");
|
|
1626
|
+
|
|
1627
|
+
// src/components/FormField/FormField.module.css
|
|
1628
|
+
var FormField_default = {};
|
|
1629
|
+
|
|
1630
|
+
// src/components/FormField/FormField.tsx
|
|
1631
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1632
|
+
function FormField({
|
|
1633
|
+
label,
|
|
1634
|
+
htmlFor,
|
|
1635
|
+
required,
|
|
1636
|
+
error,
|
|
1637
|
+
helperText,
|
|
1638
|
+
children,
|
|
1639
|
+
disabled,
|
|
1640
|
+
className
|
|
1641
|
+
}) {
|
|
1642
|
+
const generatedId = (0, import_react16.useId)();
|
|
1643
|
+
const descriptionId = `${generatedId}-description`;
|
|
1644
|
+
const hasDescription = Boolean(error || helperText);
|
|
1645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn(FormField_default.formField, disabled && FormField_default.disabled, className), children: [
|
|
1646
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Label, { htmlFor, required, children: label }),
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: FormField_default.control, "data-describedby": hasDescription ? descriptionId : void 0, children }),
|
|
1648
|
+
(error || helperText) && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(HelperText, { id: descriptionId, error: Boolean(error), children: error || helperText })
|
|
1649
|
+
] });
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
// src/components/SearchField/SearchField.tsx
|
|
1653
|
+
var import_react17 = require("react");
|
|
1654
|
+
|
|
1655
|
+
// src/components/SearchField/SearchField.module.css
|
|
1656
|
+
var SearchField_default = {};
|
|
1657
|
+
|
|
1658
|
+
// src/components/SearchField/SearchField.tsx
|
|
1659
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1660
|
+
var SearchField = (0, import_react17.forwardRef)(
|
|
1661
|
+
({
|
|
1662
|
+
size = "md",
|
|
1663
|
+
error = false,
|
|
1664
|
+
fullWidth = false,
|
|
1665
|
+
onClear,
|
|
1666
|
+
showClearButton = true,
|
|
1667
|
+
className,
|
|
1668
|
+
value,
|
|
1669
|
+
defaultValue,
|
|
1670
|
+
...props
|
|
1671
|
+
}, ref) => {
|
|
1672
|
+
const hasValue = Boolean(value || defaultValue);
|
|
1673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn(SearchField_default.wrapper, SearchField_default[size], fullWidth && SearchField_default.fullWidth, className), children: [
|
|
1674
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1675
|
+
"svg",
|
|
1676
|
+
{
|
|
1677
|
+
className: SearchField_default.searchIcon,
|
|
1678
|
+
width: "16",
|
|
1679
|
+
height: "16",
|
|
1680
|
+
viewBox: "0 0 16 16",
|
|
1681
|
+
fill: "none",
|
|
1682
|
+
stroke: "currentColor",
|
|
1683
|
+
strokeWidth: "2",
|
|
1684
|
+
strokeLinecap: "round",
|
|
1685
|
+
strokeLinejoin: "round",
|
|
1686
|
+
"aria-hidden": "true",
|
|
1687
|
+
children: [
|
|
1688
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("circle", { cx: "6.5", cy: "6.5", r: "5.5" }),
|
|
1689
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { d: "M11 11l4 4" })
|
|
1690
|
+
]
|
|
1691
|
+
}
|
|
1692
|
+
),
|
|
1693
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1694
|
+
"input",
|
|
1695
|
+
{
|
|
1696
|
+
ref,
|
|
1697
|
+
type: "search",
|
|
1698
|
+
role: "searchbox",
|
|
1699
|
+
className: cn(SearchField_default.input, error && SearchField_default.error),
|
|
1700
|
+
value,
|
|
1701
|
+
defaultValue,
|
|
1702
|
+
"aria-invalid": error || void 0,
|
|
1703
|
+
...props
|
|
1704
|
+
}
|
|
1705
|
+
),
|
|
1706
|
+
showClearButton && hasValue && onClear && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1707
|
+
"button",
|
|
1708
|
+
{
|
|
1709
|
+
type: "button",
|
|
1710
|
+
className: SearchField_default.clearButton,
|
|
1711
|
+
onClick: onClear,
|
|
1712
|
+
"aria-label": "Clear search",
|
|
1713
|
+
tabIndex: -1,
|
|
1714
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1715
|
+
"svg",
|
|
1716
|
+
{
|
|
1717
|
+
width: "14",
|
|
1718
|
+
height: "14",
|
|
1719
|
+
viewBox: "0 0 14 14",
|
|
1720
|
+
fill: "none",
|
|
1721
|
+
stroke: "currentColor",
|
|
1722
|
+
strokeWidth: "2",
|
|
1723
|
+
strokeLinecap: "round",
|
|
1724
|
+
"aria-hidden": "true",
|
|
1725
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { d: "M3 3l8 8M11 3l-8 8" })
|
|
1726
|
+
}
|
|
1727
|
+
)
|
|
1728
|
+
}
|
|
1729
|
+
)
|
|
1730
|
+
] });
|
|
1731
|
+
}
|
|
1732
|
+
);
|
|
1733
|
+
SearchField.displayName = "SearchField";
|
|
1734
|
+
|
|
1735
|
+
// src/components/NumberField/NumberField.tsx
|
|
1736
|
+
var import_react18 = require("react");
|
|
1737
|
+
|
|
1738
|
+
// src/components/NumberField/NumberField.module.css
|
|
1739
|
+
var NumberField_default = {};
|
|
1740
|
+
|
|
1741
|
+
// src/components/NumberField/NumberField.tsx
|
|
1742
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1743
|
+
var NumberField = (0, import_react18.forwardRef)(
|
|
1744
|
+
({
|
|
1745
|
+
value,
|
|
1746
|
+
onChange,
|
|
1747
|
+
min,
|
|
1748
|
+
max,
|
|
1749
|
+
step = 1,
|
|
1750
|
+
size = "md",
|
|
1751
|
+
error = false,
|
|
1752
|
+
disabled = false,
|
|
1753
|
+
prefix,
|
|
1754
|
+
suffix,
|
|
1755
|
+
className,
|
|
1756
|
+
...props
|
|
1757
|
+
}, ref) => {
|
|
1758
|
+
const clamp = (0, import_react18.useCallback)(
|
|
1759
|
+
(v) => {
|
|
1760
|
+
let clamped = v;
|
|
1761
|
+
if (min !== void 0) clamped = Math.max(min, clamped);
|
|
1762
|
+
if (max !== void 0) clamped = Math.min(max, clamped);
|
|
1763
|
+
return clamped;
|
|
1764
|
+
},
|
|
1765
|
+
[min, max]
|
|
1766
|
+
);
|
|
1767
|
+
const handleChange = (0, import_react18.useCallback)(
|
|
1768
|
+
(e) => {
|
|
1769
|
+
const raw = parseFloat(e.target.value);
|
|
1770
|
+
if (!isNaN(raw)) onChange?.(clamp(raw));
|
|
1771
|
+
},
|
|
1772
|
+
[onChange, clamp]
|
|
1773
|
+
);
|
|
1774
|
+
const increment = (0, import_react18.useCallback)(() => {
|
|
1775
|
+
if (disabled) return;
|
|
1776
|
+
const current = value ?? 0;
|
|
1777
|
+
onChange?.(clamp(current + step));
|
|
1778
|
+
}, [value, step, onChange, clamp, disabled]);
|
|
1779
|
+
const decrement = (0, import_react18.useCallback)(() => {
|
|
1780
|
+
if (disabled) return;
|
|
1781
|
+
const current = value ?? 0;
|
|
1782
|
+
onChange?.(clamp(current - step));
|
|
1783
|
+
}, [value, step, onChange, clamp, disabled]);
|
|
1784
|
+
const atMin = min !== void 0 && value !== void 0 && value <= min;
|
|
1785
|
+
const atMax = max !== void 0 && value !== void 0 && value >= max;
|
|
1786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1787
|
+
"div",
|
|
1788
|
+
{
|
|
1789
|
+
className: cn(
|
|
1790
|
+
NumberField_default.wrapper,
|
|
1791
|
+
NumberField_default[size],
|
|
1792
|
+
error && NumberField_default.error,
|
|
1793
|
+
disabled && NumberField_default.disabled,
|
|
1794
|
+
className
|
|
1795
|
+
),
|
|
1796
|
+
children: [
|
|
1797
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: NumberField_default.prefix, children: prefix }),
|
|
1798
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1799
|
+
"input",
|
|
1800
|
+
{
|
|
1801
|
+
ref,
|
|
1802
|
+
type: "number",
|
|
1803
|
+
className: NumberField_default.input,
|
|
1804
|
+
value: value ?? "",
|
|
1805
|
+
onChange: handleChange,
|
|
1806
|
+
min,
|
|
1807
|
+
max,
|
|
1808
|
+
step,
|
|
1809
|
+
disabled,
|
|
1810
|
+
"aria-invalid": error || void 0,
|
|
1811
|
+
...props
|
|
1812
|
+
}
|
|
1813
|
+
),
|
|
1814
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: NumberField_default.suffix, children: suffix }),
|
|
1815
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: NumberField_default.buttons, children: [
|
|
1816
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1817
|
+
"button",
|
|
1818
|
+
{
|
|
1819
|
+
type: "button",
|
|
1820
|
+
className: NumberField_default.button,
|
|
1821
|
+
onClick: increment,
|
|
1822
|
+
disabled: disabled || atMax,
|
|
1823
|
+
"aria-label": "Increment",
|
|
1824
|
+
tabIndex: -1,
|
|
1825
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { d: "M2 6.5L5 3.5L8 6.5" }) })
|
|
1826
|
+
}
|
|
1827
|
+
),
|
|
1828
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1829
|
+
"button",
|
|
1830
|
+
{
|
|
1831
|
+
type: "button",
|
|
1832
|
+
className: NumberField_default.button,
|
|
1833
|
+
onClick: decrement,
|
|
1834
|
+
disabled: disabled || atMin,
|
|
1835
|
+
"aria-label": "Decrement",
|
|
1836
|
+
tabIndex: -1,
|
|
1837
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { d: "M2 3.5L5 6.5L8 3.5" }) })
|
|
1838
|
+
}
|
|
1839
|
+
)
|
|
1840
|
+
] })
|
|
1841
|
+
]
|
|
1842
|
+
}
|
|
1843
|
+
);
|
|
1844
|
+
}
|
|
1845
|
+
);
|
|
1846
|
+
NumberField.displayName = "NumberField";
|
|
1847
|
+
|
|
1848
|
+
// src/components/CheckboxGroup/CheckboxGroup.tsx
|
|
1849
|
+
var import_react19 = require("react");
|
|
1850
|
+
|
|
1851
|
+
// src/components/CheckboxGroup/CheckboxGroup.module.css
|
|
1852
|
+
var CheckboxGroup_default = {};
|
|
1853
|
+
|
|
1854
|
+
// src/components/CheckboxGroup/CheckboxGroup.tsx
|
|
1855
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1856
|
+
function CheckboxGroup({
|
|
1857
|
+
label,
|
|
1858
|
+
name,
|
|
1859
|
+
options,
|
|
1860
|
+
value = [],
|
|
1861
|
+
onChange,
|
|
1862
|
+
error,
|
|
1863
|
+
orientation = "vertical",
|
|
1864
|
+
disabled = false,
|
|
1865
|
+
className
|
|
1866
|
+
}) {
|
|
1867
|
+
const handleChange = (0, import_react19.useCallback)(
|
|
1868
|
+
(optionValue, checked) => {
|
|
1869
|
+
if (!onChange) return;
|
|
1870
|
+
const next = checked ? [...value, optionValue] : value.filter((v) => v !== optionValue);
|
|
1871
|
+
onChange(next);
|
|
1872
|
+
},
|
|
1873
|
+
[value, onChange]
|
|
1874
|
+
);
|
|
1875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1876
|
+
"fieldset",
|
|
1877
|
+
{
|
|
1878
|
+
className: cn(CheckboxGroup_default.fieldset, className),
|
|
1879
|
+
disabled,
|
|
1880
|
+
children: [
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("legend", { className: CheckboxGroup_default.legend, children: label }),
|
|
1882
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn(CheckboxGroup_default.options, CheckboxGroup_default[orientation]), children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1883
|
+
Checkbox,
|
|
1884
|
+
{
|
|
1885
|
+
name,
|
|
1886
|
+
label: opt.label,
|
|
1887
|
+
value: opt.value,
|
|
1888
|
+
checked: value.includes(opt.value),
|
|
1889
|
+
onChange: (e) => handleChange(opt.value, e.target.checked),
|
|
1890
|
+
disabled: opt.disabled || disabled,
|
|
1891
|
+
error: Boolean(error)
|
|
1892
|
+
},
|
|
1893
|
+
opt.value
|
|
1894
|
+
)) }),
|
|
1895
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(HelperText, { error: true, children: error })
|
|
1896
|
+
]
|
|
1897
|
+
}
|
|
1898
|
+
);
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
// src/components/RadioGroup/RadioGroup.tsx
|
|
1902
|
+
var import_react20 = require("react");
|
|
1903
|
+
|
|
1904
|
+
// src/components/RadioGroup/RadioGroup.module.css
|
|
1905
|
+
var RadioGroup_default = {};
|
|
1906
|
+
|
|
1907
|
+
// src/components/RadioGroup/RadioGroup.tsx
|
|
1908
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1909
|
+
function RadioGroup({
|
|
1910
|
+
label,
|
|
1911
|
+
name,
|
|
1912
|
+
options,
|
|
1913
|
+
value,
|
|
1914
|
+
onChange,
|
|
1915
|
+
error,
|
|
1916
|
+
orientation = "vertical",
|
|
1917
|
+
disabled = false,
|
|
1918
|
+
className
|
|
1919
|
+
}) {
|
|
1920
|
+
const handleChange = (0, import_react20.useCallback)(
|
|
1921
|
+
(optionValue) => {
|
|
1922
|
+
onChange?.(optionValue);
|
|
1923
|
+
},
|
|
1924
|
+
[onChange]
|
|
1925
|
+
);
|
|
1926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1927
|
+
"fieldset",
|
|
1928
|
+
{
|
|
1929
|
+
className: cn(RadioGroup_default.fieldset, className),
|
|
1930
|
+
disabled,
|
|
1931
|
+
children: [
|
|
1932
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("legend", { className: RadioGroup_default.legend, children: label }),
|
|
1933
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn(RadioGroup_default.options, RadioGroup_default[orientation]), children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1934
|
+
Radio,
|
|
1935
|
+
{
|
|
1936
|
+
name,
|
|
1937
|
+
label: opt.label,
|
|
1938
|
+
value: opt.value,
|
|
1939
|
+
checked: value === opt.value,
|
|
1940
|
+
onChange: () => handleChange(opt.value),
|
|
1941
|
+
disabled: opt.disabled || disabled,
|
|
1942
|
+
error: Boolean(error)
|
|
1943
|
+
},
|
|
1944
|
+
opt.value
|
|
1945
|
+
)) }),
|
|
1946
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(HelperText, { error: true, children: error })
|
|
1947
|
+
]
|
|
1948
|
+
}
|
|
1949
|
+
);
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
// src/components/Slider/Slider.tsx
|
|
1953
|
+
var import_react21 = require("react");
|
|
1954
|
+
|
|
1955
|
+
// src/components/Slider/Slider.module.css
|
|
1956
|
+
var Slider_default = {};
|
|
1957
|
+
|
|
1958
|
+
// src/components/Slider/Slider.tsx
|
|
1959
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1960
|
+
var Slider = (0, import_react21.forwardRef)(
|
|
1961
|
+
({
|
|
1962
|
+
value,
|
|
1963
|
+
onChange,
|
|
1964
|
+
min = 0,
|
|
1965
|
+
max = 100,
|
|
1966
|
+
step = 1,
|
|
1967
|
+
disabled = false,
|
|
1968
|
+
size = "md",
|
|
1969
|
+
label,
|
|
1970
|
+
showValue = false,
|
|
1971
|
+
className,
|
|
1972
|
+
id,
|
|
1973
|
+
...props
|
|
1974
|
+
}, ref) => {
|
|
1975
|
+
const generatedId = (0, import_react21.useId)();
|
|
1976
|
+
const inputId = id || generatedId;
|
|
1977
|
+
const current = value ?? min;
|
|
1978
|
+
const percentage = (current - min) / (max - min) * 100;
|
|
1979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: cn(Slider_default.wrapper, Slider_default[size], disabled && Slider_default.disabled, className), children: [
|
|
1980
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: Slider_default.header, children: [
|
|
1981
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("label", { htmlFor: inputId, className: Slider_default.label, children: label }),
|
|
1982
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: Slider_default.value, "aria-hidden": "true", children: current })
|
|
1983
|
+
] }),
|
|
1984
|
+
!label && showValue && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: Slider_default.value, "aria-hidden": "true", children: current }),
|
|
1985
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1986
|
+
"input",
|
|
1987
|
+
{
|
|
1988
|
+
ref,
|
|
1989
|
+
id: inputId,
|
|
1990
|
+
type: "range",
|
|
1991
|
+
className: Slider_default.input,
|
|
1992
|
+
value,
|
|
1993
|
+
onChange: (e) => onChange?.(Number(e.target.value)),
|
|
1994
|
+
min,
|
|
1995
|
+
max,
|
|
1996
|
+
step,
|
|
1997
|
+
disabled,
|
|
1998
|
+
style: { "--slider-fill": `${percentage}%` },
|
|
1999
|
+
...props
|
|
2000
|
+
}
|
|
2001
|
+
)
|
|
2002
|
+
] });
|
|
2003
|
+
}
|
|
2004
|
+
);
|
|
2005
|
+
Slider.displayName = "Slider";
|
|
2006
|
+
|
|
2007
|
+
// src/components/FileUpload/FileUpload.tsx
|
|
2008
|
+
var import_react22 = require("react");
|
|
2009
|
+
|
|
2010
|
+
// src/components/FileUpload/FileUpload.module.css
|
|
2011
|
+
var FileUpload_default = {};
|
|
2012
|
+
|
|
2013
|
+
// src/components/FileUpload/FileUpload.tsx
|
|
2014
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2015
|
+
function formatFileSize(bytes) {
|
|
2016
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
2017
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
2018
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
2019
|
+
}
|
|
2020
|
+
function FileUpload({
|
|
2021
|
+
accept,
|
|
2022
|
+
multiple = false,
|
|
2023
|
+
maxSize,
|
|
2024
|
+
onFilesSelected,
|
|
2025
|
+
disabled = false,
|
|
2026
|
+
error,
|
|
2027
|
+
className
|
|
2028
|
+
}) {
|
|
2029
|
+
const inputRef = (0, import_react22.useRef)(null);
|
|
2030
|
+
const [isDragging, setIsDragging] = (0, import_react22.useState)(false);
|
|
2031
|
+
const [files, setFiles] = (0, import_react22.useState)([]);
|
|
2032
|
+
const [sizeError, setSizeError] = (0, import_react22.useState)(null);
|
|
2033
|
+
const processFiles = (0, import_react22.useCallback)(
|
|
2034
|
+
(fileList) => {
|
|
2035
|
+
if (!fileList) return;
|
|
2036
|
+
const selected = Array.from(fileList);
|
|
2037
|
+
if (maxSize) {
|
|
2038
|
+
const oversized = selected.filter((f) => f.size > maxSize);
|
|
2039
|
+
if (oversized.length > 0) {
|
|
2040
|
+
setSizeError(`File(s) exceed maximum size of ${formatFileSize(maxSize)}`);
|
|
2041
|
+
return;
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
setSizeError(null);
|
|
2045
|
+
setFiles(selected);
|
|
2046
|
+
onFilesSelected?.(selected);
|
|
2047
|
+
},
|
|
2048
|
+
[maxSize, onFilesSelected]
|
|
2049
|
+
);
|
|
2050
|
+
const handleClick = () => {
|
|
2051
|
+
if (!disabled) inputRef.current?.click();
|
|
2052
|
+
};
|
|
2053
|
+
const handleKeyDown = (e) => {
|
|
2054
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2055
|
+
e.preventDefault();
|
|
2056
|
+
handleClick();
|
|
2057
|
+
}
|
|
2058
|
+
};
|
|
2059
|
+
const handleDragOver = (e) => {
|
|
2060
|
+
e.preventDefault();
|
|
2061
|
+
if (!disabled) setIsDragging(true);
|
|
2062
|
+
};
|
|
2063
|
+
const handleDragLeave = (e) => {
|
|
2064
|
+
e.preventDefault();
|
|
2065
|
+
setIsDragging(false);
|
|
2066
|
+
};
|
|
2067
|
+
const handleDrop = (e) => {
|
|
2068
|
+
e.preventDefault();
|
|
2069
|
+
setIsDragging(false);
|
|
2070
|
+
if (!disabled) processFiles(e.dataTransfer.files);
|
|
2071
|
+
};
|
|
2072
|
+
const handleInputChange = (e) => {
|
|
2073
|
+
processFiles(e.target.files);
|
|
2074
|
+
};
|
|
2075
|
+
const removeFile = (index) => {
|
|
2076
|
+
const next = files.filter((_, i) => i !== index);
|
|
2077
|
+
setFiles(next);
|
|
2078
|
+
onFilesSelected?.(next);
|
|
2079
|
+
};
|
|
2080
|
+
const displayError = error || sizeError;
|
|
2081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: cn(FileUpload_default.container, className), children: [
|
|
2082
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2083
|
+
"div",
|
|
2084
|
+
{
|
|
2085
|
+
className: cn(
|
|
2086
|
+
FileUpload_default.dropzone,
|
|
2087
|
+
isDragging && FileUpload_default.dragging,
|
|
2088
|
+
disabled && FileUpload_default.disabled,
|
|
2089
|
+
displayError && FileUpload_default.error
|
|
2090
|
+
),
|
|
2091
|
+
role: "button",
|
|
2092
|
+
tabIndex: disabled ? -1 : 0,
|
|
2093
|
+
onClick: handleClick,
|
|
2094
|
+
onKeyDown: handleKeyDown,
|
|
2095
|
+
onDragOver: handleDragOver,
|
|
2096
|
+
onDragLeave: handleDragLeave,
|
|
2097
|
+
onDrop: handleDrop,
|
|
2098
|
+
"aria-label": `Upload file${multiple ? "s" : ""}`,
|
|
2099
|
+
"aria-disabled": disabled,
|
|
2100
|
+
children: [
|
|
2101
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2102
|
+
"svg",
|
|
2103
|
+
{
|
|
2104
|
+
className: FileUpload_default.icon,
|
|
2105
|
+
width: "32",
|
|
2106
|
+
height: "32",
|
|
2107
|
+
viewBox: "0 0 32 32",
|
|
2108
|
+
fill: "none",
|
|
2109
|
+
stroke: "currentColor",
|
|
2110
|
+
strokeWidth: "2",
|
|
2111
|
+
strokeLinecap: "round",
|
|
2112
|
+
strokeLinejoin: "round",
|
|
2113
|
+
"aria-hidden": "true",
|
|
2114
|
+
children: [
|
|
2115
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M16 20V8M16 8l-5 5M16 8l5 5" }),
|
|
2116
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M4 22v4a2 2 0 002 2h20a2 2 0 002-2v-4" })
|
|
2117
|
+
]
|
|
2118
|
+
}
|
|
2119
|
+
),
|
|
2120
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: FileUpload_default.text, children: [
|
|
2121
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: FileUpload_default.link, children: "Click to upload" }),
|
|
2122
|
+
" or drag and drop"
|
|
2123
|
+
] }),
|
|
2124
|
+
accept && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: FileUpload_default.hint, children: accept.replace(/,/g, ", ") }),
|
|
2125
|
+
maxSize && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: FileUpload_default.hint, children: [
|
|
2126
|
+
"Max size: ",
|
|
2127
|
+
formatFileSize(maxSize)
|
|
2128
|
+
] })
|
|
2129
|
+
]
|
|
2130
|
+
}
|
|
2131
|
+
),
|
|
2132
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2133
|
+
"input",
|
|
2134
|
+
{
|
|
2135
|
+
ref: inputRef,
|
|
2136
|
+
type: "file",
|
|
2137
|
+
className: FileUpload_default.input,
|
|
2138
|
+
accept,
|
|
2139
|
+
multiple,
|
|
2140
|
+
onChange: handleInputChange,
|
|
2141
|
+
disabled,
|
|
2142
|
+
tabIndex: -1,
|
|
2143
|
+
"aria-hidden": "true"
|
|
2144
|
+
}
|
|
2145
|
+
),
|
|
2146
|
+
files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: FileUpload_default.fileList, "aria-label": "Selected files", children: files.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("li", { className: FileUpload_default.fileItem, children: [
|
|
2147
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2148
|
+
"svg",
|
|
2149
|
+
{
|
|
2150
|
+
width: "16",
|
|
2151
|
+
height: "16",
|
|
2152
|
+
viewBox: "0 0 16 16",
|
|
2153
|
+
fill: "none",
|
|
2154
|
+
stroke: "currentColor",
|
|
2155
|
+
strokeWidth: "1.5",
|
|
2156
|
+
strokeLinecap: "round",
|
|
2157
|
+
strokeLinejoin: "round",
|
|
2158
|
+
"aria-hidden": "true",
|
|
2159
|
+
children: [
|
|
2160
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M9 1H4a1 1 0 00-1 1v12a1 1 0 001 1h8a1 1 0 001-1V5L9 1z" }),
|
|
2161
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M9 1v4h4" })
|
|
2162
|
+
]
|
|
2163
|
+
}
|
|
2164
|
+
),
|
|
2165
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: FileUpload_default.fileName, children: file.name }),
|
|
2166
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: FileUpload_default.fileSize, children: formatFileSize(file.size) }),
|
|
2167
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2168
|
+
"button",
|
|
2169
|
+
{
|
|
2170
|
+
type: "button",
|
|
2171
|
+
className: FileUpload_default.removeButton,
|
|
2172
|
+
onClick: () => removeFile(i),
|
|
2173
|
+
"aria-label": `Remove ${file.name}`,
|
|
2174
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M2 2l8 8M10 2l-8 8" }) })
|
|
2175
|
+
}
|
|
2176
|
+
)
|
|
2177
|
+
] }, `${file.name}-${i}`)) }),
|
|
2178
|
+
displayError && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(HelperText, { error: true, children: displayError })
|
|
2179
|
+
] });
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
// src/components/OTPInput/OTPInput.tsx
|
|
2183
|
+
var import_react23 = require("react");
|
|
2184
|
+
|
|
2185
|
+
// src/components/OTPInput/OTPInput.module.css
|
|
2186
|
+
var OTPInput_default = {};
|
|
2187
|
+
|
|
2188
|
+
// src/components/OTPInput/OTPInput.tsx
|
|
2189
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2190
|
+
function OTPInput({
|
|
2191
|
+
length = 6,
|
|
2192
|
+
value = "",
|
|
2193
|
+
onChange,
|
|
2194
|
+
error = false,
|
|
2195
|
+
disabled = false,
|
|
2196
|
+
autoFocus = false,
|
|
2197
|
+
className
|
|
2198
|
+
}) {
|
|
2199
|
+
const inputRefs = (0, import_react23.useRef)([]);
|
|
2200
|
+
(0, import_react23.useEffect)(() => {
|
|
2201
|
+
if (autoFocus && inputRefs.current[0]) {
|
|
2202
|
+
inputRefs.current[0].focus();
|
|
2203
|
+
}
|
|
2204
|
+
}, [autoFocus]);
|
|
2205
|
+
const focusInput = (0, import_react23.useCallback)((index) => {
|
|
2206
|
+
if (index >= 0 && index < length) {
|
|
2207
|
+
inputRefs.current[index]?.focus();
|
|
2208
|
+
inputRefs.current[index]?.select();
|
|
2209
|
+
}
|
|
2210
|
+
}, [length]);
|
|
2211
|
+
const updateValue = (0, import_react23.useCallback)(
|
|
2212
|
+
(newValue) => {
|
|
2213
|
+
onChange?.(newValue.slice(0, length));
|
|
2214
|
+
},
|
|
2215
|
+
[onChange, length]
|
|
2216
|
+
);
|
|
2217
|
+
const handleInput = (0, import_react23.useCallback)(
|
|
2218
|
+
(index, digit) => {
|
|
2219
|
+
if (!/^\d$/.test(digit)) return;
|
|
2220
|
+
const chars = value.split("");
|
|
2221
|
+
while (chars.length < length) chars.push("");
|
|
2222
|
+
chars[index] = digit;
|
|
2223
|
+
updateValue(chars.join(""));
|
|
2224
|
+
if (index < length - 1) {
|
|
2225
|
+
focusInput(index + 1);
|
|
2226
|
+
}
|
|
2227
|
+
},
|
|
2228
|
+
[value, length, updateValue, focusInput]
|
|
2229
|
+
);
|
|
2230
|
+
const handleKeyDown = (0, import_react23.useCallback)(
|
|
2231
|
+
(index, e) => {
|
|
2232
|
+
if (e.key === "Backspace") {
|
|
2233
|
+
e.preventDefault();
|
|
2234
|
+
const chars = value.split("");
|
|
2235
|
+
while (chars.length < length) chars.push("");
|
|
2236
|
+
if (chars[index]) {
|
|
2237
|
+
chars[index] = "";
|
|
2238
|
+
updateValue(chars.join(""));
|
|
2239
|
+
} else if (index > 0) {
|
|
2240
|
+
chars[index - 1] = "";
|
|
2241
|
+
updateValue(chars.join(""));
|
|
2242
|
+
focusInput(index - 1);
|
|
2243
|
+
}
|
|
2244
|
+
} else if (e.key === "ArrowLeft") {
|
|
2245
|
+
e.preventDefault();
|
|
2246
|
+
focusInput(index - 1);
|
|
2247
|
+
} else if (e.key === "ArrowRight") {
|
|
2248
|
+
e.preventDefault();
|
|
2249
|
+
focusInput(index + 1);
|
|
2250
|
+
}
|
|
2251
|
+
},
|
|
2252
|
+
[value, length, updateValue, focusInput]
|
|
2253
|
+
);
|
|
2254
|
+
const handlePaste = (0, import_react23.useCallback)(
|
|
2255
|
+
(e) => {
|
|
2256
|
+
e.preventDefault();
|
|
2257
|
+
const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, length);
|
|
2258
|
+
if (pasted) {
|
|
2259
|
+
updateValue(pasted);
|
|
2260
|
+
focusInput(Math.min(pasted.length, length - 1));
|
|
2261
|
+
}
|
|
2262
|
+
},
|
|
2263
|
+
[length, updateValue, focusInput]
|
|
2264
|
+
);
|
|
2265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn(OTPInput_default.wrapper, error && OTPInput_default.error, disabled && OTPInput_default.disabled, className), role: "group", "aria-label": "One-time password", children: Array.from({ length }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2266
|
+
"input",
|
|
2267
|
+
{
|
|
2268
|
+
ref: (el) => {
|
|
2269
|
+
inputRefs.current[i] = el;
|
|
2270
|
+
},
|
|
2271
|
+
type: "text",
|
|
2272
|
+
inputMode: "numeric",
|
|
2273
|
+
autoComplete: "one-time-code",
|
|
2274
|
+
maxLength: 1,
|
|
2275
|
+
className: OTPInput_default.digit,
|
|
2276
|
+
value: value[i] || "",
|
|
2277
|
+
onChange: (e) => {
|
|
2278
|
+
const v = e.target.value;
|
|
2279
|
+
if (v.length <= 1) handleInput(i, v);
|
|
2280
|
+
},
|
|
2281
|
+
onKeyDown: (e) => handleKeyDown(i, e),
|
|
2282
|
+
onPaste: handlePaste,
|
|
2283
|
+
onFocus: (e) => e.target.select(),
|
|
2284
|
+
disabled,
|
|
2285
|
+
"aria-label": `Digit ${i + 1} of ${length}`,
|
|
2286
|
+
"aria-invalid": error || void 0
|
|
2287
|
+
},
|
|
2288
|
+
i
|
|
2289
|
+
)) });
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
// src/components/DatePicker/DatePicker.tsx
|
|
2293
|
+
var import_react24 = require("react");
|
|
2294
|
+
|
|
2295
|
+
// src/components/DatePicker/DatePicker.module.css
|
|
2296
|
+
var DatePicker_default = {};
|
|
2297
|
+
|
|
2298
|
+
// src/components/DatePicker/DatePicker.tsx
|
|
2299
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2300
|
+
var DatePicker = (0, import_react24.forwardRef)(
|
|
2301
|
+
({ size = "md", error = false, fullWidth = false, className, min, max, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn(DatePicker_default.wrapper, DatePicker_default[size], fullWidth && DatePicker_default.fullWidth, className), children: [
|
|
2302
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2303
|
+
"input",
|
|
2304
|
+
{
|
|
2305
|
+
ref,
|
|
2306
|
+
type: "date",
|
|
2307
|
+
className: cn(DatePicker_default.input, error && DatePicker_default.error),
|
|
2308
|
+
min,
|
|
2309
|
+
max,
|
|
2310
|
+
"aria-invalid": error || void 0,
|
|
2311
|
+
...props
|
|
2312
|
+
}
|
|
2313
|
+
),
|
|
2314
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2315
|
+
"svg",
|
|
2316
|
+
{
|
|
2317
|
+
className: DatePicker_default.icon,
|
|
2318
|
+
width: "16",
|
|
2319
|
+
height: "16",
|
|
2320
|
+
viewBox: "0 0 16 16",
|
|
2321
|
+
fill: "none",
|
|
2322
|
+
stroke: "currentColor",
|
|
2323
|
+
strokeWidth: "1.5",
|
|
2324
|
+
strokeLinecap: "round",
|
|
2325
|
+
strokeLinejoin: "round",
|
|
2326
|
+
"aria-hidden": "true",
|
|
2327
|
+
children: [
|
|
2328
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("rect", { x: "2", y: "3", width: "12", height: "11", rx: "1" }),
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { d: "M5 1v3M11 1v3M2 7h12" })
|
|
2330
|
+
]
|
|
2331
|
+
}
|
|
2332
|
+
)
|
|
2333
|
+
] })
|
|
2334
|
+
);
|
|
2335
|
+
DatePicker.displayName = "DatePicker";
|
|
2336
|
+
|
|
2337
|
+
// src/components/MultiSelect/MultiSelect.tsx
|
|
2338
|
+
var import_react25 = require("react");
|
|
2339
|
+
|
|
2340
|
+
// src/components/MultiSelect/MultiSelect.module.css
|
|
2341
|
+
var MultiSelect_default = {};
|
|
2342
|
+
|
|
2343
|
+
// src/components/MultiSelect/MultiSelect.tsx
|
|
2344
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2345
|
+
function MultiSelect({
|
|
2346
|
+
options,
|
|
2347
|
+
value = [],
|
|
2348
|
+
onChange,
|
|
2349
|
+
placeholder = "Select...",
|
|
2350
|
+
disabled = false,
|
|
2351
|
+
error = false,
|
|
2352
|
+
size = "md",
|
|
2353
|
+
maxDisplayedTags,
|
|
2354
|
+
className
|
|
2355
|
+
}) {
|
|
2356
|
+
const [isOpen, setIsOpen] = (0, import_react25.useState)(false);
|
|
2357
|
+
const [focusedIndex, setFocusedIndex] = (0, import_react25.useState)(-1);
|
|
2358
|
+
const wrapperRef = (0, import_react25.useRef)(null);
|
|
2359
|
+
const listboxId = (0, import_react25.useId)();
|
|
2360
|
+
const toggle = (0, import_react25.useCallback)(
|
|
2361
|
+
(optionValue) => {
|
|
2362
|
+
if (!onChange) return;
|
|
2363
|
+
const next = value.includes(optionValue) ? value.filter((v) => v !== optionValue) : [...value, optionValue];
|
|
2364
|
+
onChange(next);
|
|
2365
|
+
},
|
|
2366
|
+
[value, onChange]
|
|
2367
|
+
);
|
|
2368
|
+
const removeTag = (0, import_react25.useCallback)(
|
|
2369
|
+
(optionValue) => {
|
|
2370
|
+
onChange?.(value.filter((v) => v !== optionValue));
|
|
2371
|
+
},
|
|
2372
|
+
[value, onChange]
|
|
2373
|
+
);
|
|
2374
|
+
const handleKeyDown = (0, import_react25.useCallback)(
|
|
2375
|
+
(e) => {
|
|
2376
|
+
if (disabled) return;
|
|
2377
|
+
switch (e.key) {
|
|
2378
|
+
case "Enter":
|
|
2379
|
+
case " ":
|
|
2380
|
+
e.preventDefault();
|
|
2381
|
+
if (isOpen && focusedIndex >= 0) {
|
|
2382
|
+
toggle(options[focusedIndex].value);
|
|
2383
|
+
} else {
|
|
2384
|
+
setIsOpen(!isOpen);
|
|
2385
|
+
}
|
|
2386
|
+
break;
|
|
2387
|
+
case "Escape":
|
|
2388
|
+
e.preventDefault();
|
|
2389
|
+
setIsOpen(false);
|
|
2390
|
+
break;
|
|
2391
|
+
case "ArrowDown":
|
|
2392
|
+
e.preventDefault();
|
|
2393
|
+
if (!isOpen) {
|
|
2394
|
+
setIsOpen(true);
|
|
2395
|
+
setFocusedIndex(0);
|
|
2396
|
+
} else {
|
|
2397
|
+
setFocusedIndex((prev) => Math.min(prev + 1, options.length - 1));
|
|
2398
|
+
}
|
|
2399
|
+
break;
|
|
2400
|
+
case "ArrowUp":
|
|
2401
|
+
e.preventDefault();
|
|
2402
|
+
setFocusedIndex((prev) => Math.max(prev - 1, 0));
|
|
2403
|
+
break;
|
|
2404
|
+
case "Backspace":
|
|
2405
|
+
if (value.length > 0) {
|
|
2406
|
+
onChange?.(value.slice(0, -1));
|
|
2407
|
+
}
|
|
2408
|
+
break;
|
|
2409
|
+
}
|
|
2410
|
+
},
|
|
2411
|
+
[disabled, isOpen, focusedIndex, options, value, onChange, toggle]
|
|
2412
|
+
);
|
|
2413
|
+
(0, import_react25.useEffect)(() => {
|
|
2414
|
+
if (!isOpen) return;
|
|
2415
|
+
const handleClick = (e) => {
|
|
2416
|
+
if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
|
|
2417
|
+
setIsOpen(false);
|
|
2418
|
+
}
|
|
2419
|
+
};
|
|
2420
|
+
document.addEventListener("mousedown", handleClick);
|
|
2421
|
+
return () => document.removeEventListener("mousedown", handleClick);
|
|
2422
|
+
}, [isOpen]);
|
|
2423
|
+
const selectedLabels = value.map((v) => options.find((o) => o.value === v)).filter(Boolean);
|
|
2424
|
+
const displayedTags = maxDisplayedTags ? selectedLabels.slice(0, maxDisplayedTags) : selectedLabels;
|
|
2425
|
+
const hiddenCount = maxDisplayedTags ? Math.max(0, selectedLabels.length - maxDisplayedTags) : 0;
|
|
2426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref: wrapperRef, className: cn(MultiSelect_default.wrapper, MultiSelect_default[size], className), children: [
|
|
2427
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2428
|
+
"div",
|
|
2429
|
+
{
|
|
2430
|
+
className: cn(
|
|
2431
|
+
MultiSelect_default.control,
|
|
2432
|
+
isOpen && MultiSelect_default.open,
|
|
2433
|
+
error && MultiSelect_default.error,
|
|
2434
|
+
disabled && MultiSelect_default.disabled
|
|
2435
|
+
),
|
|
2436
|
+
role: "combobox",
|
|
2437
|
+
"aria-expanded": isOpen,
|
|
2438
|
+
"aria-haspopup": "listbox",
|
|
2439
|
+
"aria-controls": listboxId,
|
|
2440
|
+
"aria-disabled": disabled,
|
|
2441
|
+
tabIndex: disabled ? -1 : 0,
|
|
2442
|
+
onClick: () => !disabled && setIsOpen(!isOpen),
|
|
2443
|
+
onKeyDown: handleKeyDown,
|
|
2444
|
+
children: [
|
|
2445
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: MultiSelect_default.tags, children: [
|
|
2446
|
+
displayedTags.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: MultiSelect_default.placeholder, children: placeholder }),
|
|
2447
|
+
displayedTags.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: MultiSelect_default.tag, children: [
|
|
2448
|
+
opt.label,
|
|
2449
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2450
|
+
"button",
|
|
2451
|
+
{
|
|
2452
|
+
type: "button",
|
|
2453
|
+
className: MultiSelect_default.tagRemove,
|
|
2454
|
+
onClick: (e) => {
|
|
2455
|
+
e.stopPropagation();
|
|
2456
|
+
removeTag(opt.value);
|
|
2457
|
+
},
|
|
2458
|
+
"aria-label": `Remove ${opt.label}`,
|
|
2459
|
+
tabIndex: -1,
|
|
2460
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { d: "M2 2l6 6M8 2l-6 6" }) })
|
|
2461
|
+
}
|
|
2462
|
+
)
|
|
2463
|
+
] }, opt.value)),
|
|
2464
|
+
hiddenCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: MultiSelect_default.moreTag, children: [
|
|
2465
|
+
"+",
|
|
2466
|
+
hiddenCount,
|
|
2467
|
+
" more"
|
|
2468
|
+
] })
|
|
2469
|
+
] }),
|
|
2470
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2471
|
+
"svg",
|
|
2472
|
+
{
|
|
2473
|
+
className: cn(MultiSelect_default.chevron, isOpen && MultiSelect_default.chevronOpen),
|
|
2474
|
+
width: "14",
|
|
2475
|
+
height: "14",
|
|
2476
|
+
viewBox: "0 0 14 14",
|
|
2477
|
+
fill: "none",
|
|
2478
|
+
stroke: "currentColor",
|
|
2479
|
+
strokeWidth: "2",
|
|
2480
|
+
strokeLinecap: "round",
|
|
2481
|
+
"aria-hidden": "true",
|
|
2482
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { d: "M3 5l4 4 4-4" })
|
|
2483
|
+
}
|
|
2484
|
+
)
|
|
2485
|
+
]
|
|
2486
|
+
}
|
|
2487
|
+
),
|
|
2488
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("ul", { id: listboxId, className: MultiSelect_default.dropdown, role: "listbox", "aria-multiselectable": "true", children: options.map((opt, i) => {
|
|
2489
|
+
const isSelected = value.includes(opt.value);
|
|
2490
|
+
const isFocused = i === focusedIndex;
|
|
2491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2492
|
+
"li",
|
|
2493
|
+
{
|
|
2494
|
+
className: cn(MultiSelect_default.option, isFocused && MultiSelect_default.optionFocused),
|
|
2495
|
+
role: "option",
|
|
2496
|
+
"aria-selected": isSelected,
|
|
2497
|
+
onClick: () => toggle(opt.value),
|
|
2498
|
+
children: [
|
|
2499
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn(MultiSelect_default.checkbox, isSelected && MultiSelect_default.checkboxChecked), "aria-hidden": "true", children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { d: "M2 5l2 2 4-4" }) }) }),
|
|
2500
|
+
opt.label
|
|
2501
|
+
]
|
|
2502
|
+
},
|
|
2503
|
+
opt.value
|
|
2504
|
+
);
|
|
2505
|
+
}) })
|
|
2506
|
+
] });
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
// src/components/Autocomplete/Autocomplete.tsx
|
|
2510
|
+
var import_react26 = require("react");
|
|
2511
|
+
|
|
2512
|
+
// src/components/Autocomplete/Autocomplete.module.css
|
|
2513
|
+
var Autocomplete_default = {};
|
|
2514
|
+
|
|
2515
|
+
// src/components/Autocomplete/Autocomplete.tsx
|
|
2516
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2517
|
+
function Autocomplete({
|
|
2518
|
+
options,
|
|
2519
|
+
value,
|
|
2520
|
+
onChange,
|
|
2521
|
+
onInputChange,
|
|
2522
|
+
placeholder = "Search...",
|
|
2523
|
+
disabled = false,
|
|
2524
|
+
error = false,
|
|
2525
|
+
size = "md",
|
|
2526
|
+
loading = false,
|
|
2527
|
+
noResultsText = "No results found",
|
|
2528
|
+
className
|
|
2529
|
+
}) {
|
|
2530
|
+
const selectedLabel = options.find((o) => o.value === value)?.label ?? "";
|
|
2531
|
+
const [inputValue, setInputValue] = (0, import_react26.useState)(selectedLabel);
|
|
2532
|
+
const [isOpen, setIsOpen] = (0, import_react26.useState)(false);
|
|
2533
|
+
const [focusedIndex, setFocusedIndex] = (0, import_react26.useState)(-1);
|
|
2534
|
+
const wrapperRef = (0, import_react26.useRef)(null);
|
|
2535
|
+
const inputRef = (0, import_react26.useRef)(null);
|
|
2536
|
+
const listboxId = (0, import_react26.useId)();
|
|
2537
|
+
(0, import_react26.useEffect)(() => {
|
|
2538
|
+
const label = options.find((o) => o.value === value)?.label ?? "";
|
|
2539
|
+
setInputValue(label);
|
|
2540
|
+
}, [value, options]);
|
|
2541
|
+
const filteredOptions = options.filter(
|
|
2542
|
+
(opt) => opt.label.toLowerCase().includes(inputValue.toLowerCase())
|
|
2543
|
+
);
|
|
2544
|
+
const handleInputChange = (0, import_react26.useCallback)(
|
|
2545
|
+
(e) => {
|
|
2546
|
+
const val = e.target.value;
|
|
2547
|
+
setInputValue(val);
|
|
2548
|
+
setIsOpen(true);
|
|
2549
|
+
setFocusedIndex(-1);
|
|
2550
|
+
onInputChange?.(val);
|
|
2551
|
+
},
|
|
2552
|
+
[onInputChange]
|
|
2553
|
+
);
|
|
2554
|
+
const selectOption = (0, import_react26.useCallback)(
|
|
2555
|
+
(opt) => {
|
|
2556
|
+
setInputValue(opt.label);
|
|
2557
|
+
onChange?.(opt.value);
|
|
2558
|
+
setIsOpen(false);
|
|
2559
|
+
setFocusedIndex(-1);
|
|
2560
|
+
inputRef.current?.focus();
|
|
2561
|
+
},
|
|
2562
|
+
[onChange]
|
|
2563
|
+
);
|
|
2564
|
+
const handleKeyDown = (0, import_react26.useCallback)(
|
|
2565
|
+
(e) => {
|
|
2566
|
+
switch (e.key) {
|
|
2567
|
+
case "ArrowDown":
|
|
2568
|
+
e.preventDefault();
|
|
2569
|
+
if (!isOpen) {
|
|
2570
|
+
setIsOpen(true);
|
|
2571
|
+
setFocusedIndex(0);
|
|
2572
|
+
} else {
|
|
2573
|
+
setFocusedIndex((prev) => Math.min(prev + 1, filteredOptions.length - 1));
|
|
2574
|
+
}
|
|
2575
|
+
break;
|
|
2576
|
+
case "ArrowUp":
|
|
2577
|
+
e.preventDefault();
|
|
2578
|
+
setFocusedIndex((prev) => Math.max(prev - 1, 0));
|
|
2579
|
+
break;
|
|
2580
|
+
case "Enter":
|
|
2581
|
+
e.preventDefault();
|
|
2582
|
+
if (isOpen && focusedIndex >= 0 && filteredOptions[focusedIndex]) {
|
|
2583
|
+
selectOption(filteredOptions[focusedIndex]);
|
|
2584
|
+
}
|
|
2585
|
+
break;
|
|
2586
|
+
case "Escape":
|
|
2587
|
+
e.preventDefault();
|
|
2588
|
+
setIsOpen(false);
|
|
2589
|
+
setFocusedIndex(-1);
|
|
2590
|
+
break;
|
|
2591
|
+
}
|
|
2592
|
+
},
|
|
2593
|
+
[isOpen, focusedIndex, filteredOptions, selectOption]
|
|
2594
|
+
);
|
|
2595
|
+
(0, import_react26.useEffect)(() => {
|
|
2596
|
+
if (!isOpen) return;
|
|
2597
|
+
const handleClick = (e) => {
|
|
2598
|
+
if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
|
|
2599
|
+
setIsOpen(false);
|
|
2600
|
+
}
|
|
2601
|
+
};
|
|
2602
|
+
document.addEventListener("mousedown", handleClick);
|
|
2603
|
+
return () => document.removeEventListener("mousedown", handleClick);
|
|
2604
|
+
}, [isOpen]);
|
|
2605
|
+
const activeDescendant = focusedIndex >= 0 && filteredOptions[focusedIndex] ? `${listboxId}-option-${focusedIndex}` : void 0;
|
|
2606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { ref: wrapperRef, className: cn(Autocomplete_default.wrapper, Autocomplete_default[size], className), children: [
|
|
2607
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2608
|
+
"input",
|
|
2609
|
+
{
|
|
2610
|
+
ref: inputRef,
|
|
2611
|
+
type: "text",
|
|
2612
|
+
className: cn(Autocomplete_default.input, error && Autocomplete_default.error),
|
|
2613
|
+
value: inputValue,
|
|
2614
|
+
onChange: handleInputChange,
|
|
2615
|
+
onFocus: () => setIsOpen(true),
|
|
2616
|
+
onKeyDown: handleKeyDown,
|
|
2617
|
+
placeholder,
|
|
2618
|
+
disabled,
|
|
2619
|
+
role: "combobox",
|
|
2620
|
+
"aria-expanded": isOpen,
|
|
2621
|
+
"aria-haspopup": "listbox",
|
|
2622
|
+
"aria-controls": listboxId,
|
|
2623
|
+
"aria-activedescendant": activeDescendant,
|
|
2624
|
+
"aria-autocomplete": "list",
|
|
2625
|
+
"aria-invalid": error || void 0,
|
|
2626
|
+
autoComplete: "off"
|
|
2627
|
+
}
|
|
2628
|
+
),
|
|
2629
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("ul", { id: listboxId, className: Autocomplete_default.dropdown, role: "listbox", children: [
|
|
2630
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("li", { className: Autocomplete_default.message, "aria-live": "polite", children: "Loading..." }),
|
|
2631
|
+
!loading && filteredOptions.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("li", { className: Autocomplete_default.message, children: noResultsText }),
|
|
2632
|
+
!loading && filteredOptions.map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2633
|
+
"li",
|
|
2634
|
+
{
|
|
2635
|
+
id: `${listboxId}-option-${i}`,
|
|
2636
|
+
className: cn(
|
|
2637
|
+
Autocomplete_default.option,
|
|
2638
|
+
i === focusedIndex && Autocomplete_default.optionFocused,
|
|
2639
|
+
opt.value === value && Autocomplete_default.optionSelected
|
|
2640
|
+
),
|
|
2641
|
+
role: "option",
|
|
2642
|
+
"aria-selected": opt.value === value,
|
|
2643
|
+
onClick: () => selectOption(opt),
|
|
2644
|
+
children: opt.label
|
|
2645
|
+
},
|
|
2646
|
+
opt.value
|
|
2647
|
+
))
|
|
2648
|
+
] })
|
|
2649
|
+
] });
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
// src/components/Stepper/Stepper.module.css
|
|
2653
|
+
var Stepper_default = {};
|
|
2654
|
+
|
|
2655
|
+
// src/components/Stepper/Stepper.tsx
|
|
2656
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2657
|
+
function Stepper({
|
|
2658
|
+
steps,
|
|
2659
|
+
activeStep,
|
|
2660
|
+
orientation = "horizontal",
|
|
2661
|
+
onStepClick,
|
|
2662
|
+
className
|
|
2663
|
+
}) {
|
|
2664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2665
|
+
"nav",
|
|
2666
|
+
{
|
|
2667
|
+
className: cn(Stepper_default.stepper, Stepper_default[orientation], className),
|
|
2668
|
+
"aria-label": "Progress",
|
|
2669
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("ol", { className: Stepper_default.list, children: steps.map((step, index) => {
|
|
2670
|
+
const isCompleted = index < activeStep;
|
|
2671
|
+
const isCurrent = index === activeStep;
|
|
2672
|
+
const isClickable = Boolean(onStepClick);
|
|
2673
|
+
const stepContent = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
2674
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2675
|
+
"span",
|
|
2676
|
+
{
|
|
2677
|
+
className: cn(
|
|
2678
|
+
Stepper_default.indicator,
|
|
2679
|
+
isCompleted && Stepper_default.indicatorCompleted,
|
|
2680
|
+
isCurrent && Stepper_default.indicatorCurrent
|
|
2681
|
+
),
|
|
2682
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2683
|
+
"svg",
|
|
2684
|
+
{
|
|
2685
|
+
width: "14",
|
|
2686
|
+
height: "14",
|
|
2687
|
+
viewBox: "0 0 14 14",
|
|
2688
|
+
fill: "none",
|
|
2689
|
+
stroke: "currentColor",
|
|
2690
|
+
strokeWidth: "2",
|
|
2691
|
+
strokeLinecap: "round",
|
|
2692
|
+
strokeLinejoin: "round",
|
|
2693
|
+
"aria-hidden": "true",
|
|
2694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M3 7l3 3 5-5" })
|
|
2695
|
+
}
|
|
2696
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { "aria-hidden": "true", children: index + 1 })
|
|
2697
|
+
}
|
|
2698
|
+
),
|
|
2699
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: Stepper_default.content, children: [
|
|
2700
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: cn(Stepper_default.label, isCurrent && Stepper_default.labelCurrent), children: step.label }),
|
|
2701
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: Stepper_default.description, children: step.description })
|
|
2702
|
+
] }),
|
|
2703
|
+
isCompleted && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: Stepper_default.srOnly, children: "(completed)" }),
|
|
2704
|
+
isCurrent && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: Stepper_default.srOnly, children: "(current step)" })
|
|
2705
|
+
] });
|
|
2706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("li", { className: cn(Stepper_default.step, index < steps.length - 1 && Stepper_default.stepWithConnector), children: [
|
|
2707
|
+
isClickable ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2708
|
+
"button",
|
|
2709
|
+
{
|
|
2710
|
+
type: "button",
|
|
2711
|
+
className: Stepper_default.stepButton,
|
|
2712
|
+
onClick: () => onStepClick?.(index),
|
|
2713
|
+
"aria-current": isCurrent ? "step" : void 0,
|
|
2714
|
+
children: stepContent
|
|
2715
|
+
}
|
|
2716
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2717
|
+
"div",
|
|
2718
|
+
{
|
|
2719
|
+
className: Stepper_default.stepButton,
|
|
2720
|
+
"aria-current": isCurrent ? "step" : void 0,
|
|
2721
|
+
children: stepContent
|
|
2722
|
+
}
|
|
2723
|
+
),
|
|
2724
|
+
index < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2725
|
+
"span",
|
|
2726
|
+
{
|
|
2727
|
+
className: cn(Stepper_default.connector, isCompleted && Stepper_default.connectorCompleted),
|
|
2728
|
+
"aria-hidden": "true"
|
|
2729
|
+
}
|
|
2730
|
+
)
|
|
2731
|
+
] }, index);
|
|
2732
|
+
}) })
|
|
2733
|
+
}
|
|
2734
|
+
);
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
// src/components/Accordion/Accordion.tsx
|
|
2738
|
+
var import_react27 = require("react");
|
|
2739
|
+
|
|
2740
|
+
// src/components/Accordion/Accordion.module.css
|
|
2741
|
+
var Accordion_default = {};
|
|
2742
|
+
|
|
2743
|
+
// src/components/Accordion/Accordion.tsx
|
|
2744
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2745
|
+
function AccordionPanel({
|
|
2746
|
+
item,
|
|
2747
|
+
isOpen,
|
|
2748
|
+
onToggle
|
|
2749
|
+
}) {
|
|
2750
|
+
const contentRef = (0, import_react27.useRef)(null);
|
|
2751
|
+
const [height, setHeight] = (0, import_react27.useState)(isOpen ? void 0 : 0);
|
|
2752
|
+
(0, import_react27.useEffect)(() => {
|
|
2753
|
+
if (!contentRef.current) return;
|
|
2754
|
+
if (isOpen) {
|
|
2755
|
+
setHeight(contentRef.current.scrollHeight);
|
|
2756
|
+
const timer = setTimeout(() => setHeight(void 0), 200);
|
|
2757
|
+
return () => clearTimeout(timer);
|
|
2758
|
+
} else {
|
|
2759
|
+
setHeight(contentRef.current.scrollHeight);
|
|
2760
|
+
requestAnimationFrame(() => {
|
|
2761
|
+
requestAnimationFrame(() => setHeight(0));
|
|
2762
|
+
});
|
|
2763
|
+
}
|
|
2764
|
+
}, [isOpen]);
|
|
2765
|
+
const triggerId = `accordion-trigger-${item.id}`;
|
|
2766
|
+
const panelId = `accordion-panel-${item.id}`;
|
|
2767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn(Accordion_default.item, isOpen && Accordion_default.open), children: [
|
|
2768
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h3", { className: Accordion_default.heading, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2769
|
+
"button",
|
|
2770
|
+
{
|
|
2771
|
+
type: "button",
|
|
2772
|
+
id: triggerId,
|
|
2773
|
+
className: Accordion_default.trigger,
|
|
2774
|
+
"aria-expanded": isOpen,
|
|
2775
|
+
"aria-controls": panelId,
|
|
2776
|
+
onClick: () => onToggle(item.id),
|
|
2777
|
+
children: [
|
|
2778
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: Accordion_default.triggerLabel, children: item.title }),
|
|
2779
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2780
|
+
"svg",
|
|
2781
|
+
{
|
|
2782
|
+
className: Accordion_default.chevron,
|
|
2783
|
+
width: "20",
|
|
2784
|
+
height: "20",
|
|
2785
|
+
viewBox: "0 0 20 20",
|
|
2786
|
+
fill: "none",
|
|
2787
|
+
stroke: "currentColor",
|
|
2788
|
+
strokeWidth: "2",
|
|
2789
|
+
strokeLinecap: "round",
|
|
2790
|
+
strokeLinejoin: "round",
|
|
2791
|
+
"aria-hidden": "true",
|
|
2792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("polyline", { points: "6 8 10 12 14 8" })
|
|
2793
|
+
}
|
|
2794
|
+
)
|
|
2795
|
+
]
|
|
2796
|
+
}
|
|
2797
|
+
) }),
|
|
2798
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2799
|
+
"div",
|
|
2800
|
+
{
|
|
2801
|
+
id: panelId,
|
|
2802
|
+
role: "region",
|
|
2803
|
+
"aria-labelledby": triggerId,
|
|
2804
|
+
className: Accordion_default.panel,
|
|
2805
|
+
style: { height: height !== void 0 ? `${height}px` : "auto" },
|
|
2806
|
+
hidden: !isOpen && height === 0,
|
|
2807
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { ref: contentRef, className: Accordion_default.panelContent, children: item.content })
|
|
2808
|
+
}
|
|
2809
|
+
)
|
|
2810
|
+
] });
|
|
2811
|
+
}
|
|
2812
|
+
function Accordion({ items, allowMultiple = false, defaultOpenIds = [], className }) {
|
|
2813
|
+
const [openIds, setOpenIds] = (0, import_react27.useState)(new Set(defaultOpenIds));
|
|
2814
|
+
const handleToggle = (0, import_react27.useCallback)(
|
|
2815
|
+
(id) => {
|
|
2816
|
+
setOpenIds((prev) => {
|
|
2817
|
+
const next = new Set(prev);
|
|
2818
|
+
if (next.has(id)) {
|
|
2819
|
+
next.delete(id);
|
|
2820
|
+
} else {
|
|
2821
|
+
if (!allowMultiple) {
|
|
2822
|
+
next.clear();
|
|
2823
|
+
}
|
|
2824
|
+
next.add(id);
|
|
2825
|
+
}
|
|
2826
|
+
return next;
|
|
2827
|
+
});
|
|
2828
|
+
},
|
|
2829
|
+
[allowMultiple]
|
|
2830
|
+
);
|
|
2831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: cn(Accordion_default.accordion, className), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2832
|
+
AccordionPanel,
|
|
2833
|
+
{
|
|
2834
|
+
item,
|
|
2835
|
+
isOpen: openIds.has(item.id),
|
|
2836
|
+
onToggle: handleToggle
|
|
2837
|
+
},
|
|
2838
|
+
item.id
|
|
2839
|
+
)) });
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2842
|
+
// src/components/Breadcrumbs/Breadcrumbs.module.css
|
|
2843
|
+
var Breadcrumbs_default = {};
|
|
2844
|
+
|
|
2845
|
+
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
2846
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2847
|
+
function Breadcrumbs({ items, separator = "/", className }) {
|
|
2848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("nav", { "aria-label": "Breadcrumb", className: cn(Breadcrumbs_default.nav, className), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("ol", { className: Breadcrumbs_default.list, children: items.map((item, index) => {
|
|
2849
|
+
const isLast = index === items.length - 1;
|
|
2850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("li", { className: Breadcrumbs_default.item, children: [
|
|
2851
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: Breadcrumbs_default.separator, "aria-hidden": "true", children: separator }),
|
|
2852
|
+
isLast ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: Breadcrumbs_default.current, "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("a", { href: item.href, className: Breadcrumbs_default.link, onClick: item.onClick, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2853
|
+
"button",
|
|
2854
|
+
{
|
|
2855
|
+
type: "button",
|
|
2856
|
+
className: Breadcrumbs_default.link,
|
|
2857
|
+
onClick: item.onClick,
|
|
2858
|
+
children: item.label
|
|
2859
|
+
}
|
|
2860
|
+
)
|
|
2861
|
+
] }, index);
|
|
2862
|
+
}) }) });
|
|
2863
|
+
}
|
|
2864
|
+
|
|
2865
|
+
// src/components/SideNav/SideNav.module.css
|
|
2866
|
+
var SideNav_default = {};
|
|
2867
|
+
|
|
2868
|
+
// src/components/SideNav/SideNav.tsx
|
|
2869
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2870
|
+
function NavItem({ item, collapsed, depth = 0 }) {
|
|
2871
|
+
const hasChildren = item.children && item.children.length > 0;
|
|
2872
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
2873
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: SideNav_default.icon, "aria-hidden": "true", children: item.icon }),
|
|
2874
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: SideNav_default.label, children: item.label })
|
|
2875
|
+
] });
|
|
2876
|
+
const commonProps = {
|
|
2877
|
+
className: cn(
|
|
2878
|
+
SideNav_default.navItem,
|
|
2879
|
+
item.active && SideNav_default.active,
|
|
2880
|
+
collapsed && SideNav_default.iconOnly,
|
|
2881
|
+
depth > 0 && SideNav_default.nested
|
|
2882
|
+
),
|
|
2883
|
+
...item.active ? { "aria-current": "page" } : {},
|
|
2884
|
+
...collapsed ? { title: item.label } : {}
|
|
2885
|
+
};
|
|
2886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("li", { children: [
|
|
2887
|
+
item.href ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("a", { href: item.href, onClick: item.onClick, ...commonProps, children: content }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("button", { type: "button", onClick: item.onClick, ...commonProps, children: content }),
|
|
2888
|
+
hasChildren && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("ul", { className: SideNav_default.subList, children: item.children.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(NavItem, { item: child, collapsed, depth: depth + 1 }, index)) })
|
|
2889
|
+
] });
|
|
2890
|
+
}
|
|
2891
|
+
function SideNav({ items, collapsed = false, onCollapse, className }) {
|
|
2892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("nav", { "aria-label": "Side navigation", className: cn(SideNav_default.sideNav, collapsed && SideNav_default.collapsed, className), children: [
|
|
2893
|
+
onCollapse && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2894
|
+
"button",
|
|
2895
|
+
{
|
|
2896
|
+
type: "button",
|
|
2897
|
+
className: SideNav_default.collapseToggle,
|
|
2898
|
+
onClick: () => onCollapse(!collapsed),
|
|
2899
|
+
"aria-label": collapsed ? "Expand navigation" : "Collapse navigation",
|
|
2900
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2901
|
+
"svg",
|
|
2902
|
+
{
|
|
2903
|
+
width: "20",
|
|
2904
|
+
height: "20",
|
|
2905
|
+
viewBox: "0 0 20 20",
|
|
2906
|
+
fill: "none",
|
|
2907
|
+
stroke: "currentColor",
|
|
2908
|
+
strokeWidth: "2",
|
|
2909
|
+
strokeLinecap: "round",
|
|
2910
|
+
strokeLinejoin: "round",
|
|
2911
|
+
"aria-hidden": "true",
|
|
2912
|
+
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("polyline", { points: "8 4 14 10 8 16" }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("polyline", { points: "12 4 6 10 12 16" })
|
|
2913
|
+
}
|
|
2914
|
+
)
|
|
2915
|
+
}
|
|
2916
|
+
),
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("ul", { className: SideNav_default.list, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(NavItem, { item, collapsed }, index)) })
|
|
2918
|
+
] });
|
|
2919
|
+
}
|
|
2920
|
+
|
|
2921
|
+
// src/components/TopNav/TopNav.module.css
|
|
2922
|
+
var TopNav_default = {};
|
|
2923
|
+
|
|
2924
|
+
// src/components/TopNav/TopNav.tsx
|
|
2925
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2926
|
+
function TopNav({ logo, children, actions, className, ...props }) {
|
|
2927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("header", { className: cn(TopNav_default.topNav, className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: TopNav_default.inner, children: [
|
|
2928
|
+
logo && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: TopNav_default.logo, children: logo }),
|
|
2929
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("nav", { "aria-label": "Main navigation", className: TopNav_default.nav, children }),
|
|
2930
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: TopNav_default.actions, children: actions })
|
|
2931
|
+
] }) });
|
|
2932
|
+
}
|
|
2933
|
+
|
|
2934
|
+
// src/components/StatCard/StatCard.module.css
|
|
2935
|
+
var StatCard_default = {};
|
|
2936
|
+
|
|
2937
|
+
// src/components/StatCard/StatCard.tsx
|
|
2938
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2939
|
+
var trendIcons = {
|
|
2940
|
+
up: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { d: "M8 3l5 5h-3v5H6V8H3l5-5z" }) }),
|
|
2941
|
+
down: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { d: "M8 13l5-5h-3V3H6v5H3l5 5z" }) }),
|
|
2942
|
+
neutral: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { d: "M2 7h12v2H2V7z" }) })
|
|
2943
|
+
};
|
|
2944
|
+
function StatCard({
|
|
2945
|
+
label,
|
|
2946
|
+
value,
|
|
2947
|
+
change,
|
|
2948
|
+
changeLabel,
|
|
2949
|
+
trend = "neutral",
|
|
2950
|
+
icon,
|
|
2951
|
+
className,
|
|
2952
|
+
...props
|
|
2953
|
+
}) {
|
|
2954
|
+
const formattedChange = change !== void 0 ? `${change > 0 ? "+" : ""}${change}%` : void 0;
|
|
2955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn(StatCard_default.card, className), ...props, children: [
|
|
2956
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: StatCard_default.header, children: [
|
|
2957
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: StatCard_default.label, children: label }),
|
|
2958
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: StatCard_default.icon, "aria-hidden": "true", children: icon })
|
|
2959
|
+
] }),
|
|
2960
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: StatCard_default.value, children: value }),
|
|
2961
|
+
formattedChange && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn(StatCard_default.trend, StatCard_default[trend]), children: [
|
|
2962
|
+
trendIcons[trend],
|
|
2963
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: formattedChange }),
|
|
2964
|
+
changeLabel && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: StatCard_default.changeLabel, children: changeLabel }),
|
|
2965
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: StatCard_default.srOnly, children: trend === "up" ? "increase" : trend === "down" ? "decrease" : "no change" })
|
|
2966
|
+
] })
|
|
2967
|
+
] });
|
|
2968
|
+
}
|
|
2969
|
+
|
|
2970
|
+
// src/components/List/List.tsx
|
|
2971
|
+
var import_react28 = require("react");
|
|
2972
|
+
|
|
2973
|
+
// src/components/List/List.module.css
|
|
2974
|
+
var List_default = {};
|
|
2975
|
+
|
|
2976
|
+
// src/components/List/List.tsx
|
|
2977
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2978
|
+
var List = (0, import_react28.forwardRef)(
|
|
2979
|
+
({ divided = false, padding = "md", className, children, ...props }, ref) => {
|
|
2980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2981
|
+
"ul",
|
|
2982
|
+
{
|
|
2983
|
+
ref,
|
|
2984
|
+
className: cn(List_default.list, divided && List_default.divided, List_default[`pad-${padding}`], className),
|
|
2985
|
+
...props,
|
|
2986
|
+
children
|
|
2987
|
+
}
|
|
2988
|
+
);
|
|
2989
|
+
}
|
|
2990
|
+
);
|
|
2991
|
+
List.displayName = "List";
|
|
2992
|
+
var ListItem = (0, import_react28.forwardRef)(
|
|
2993
|
+
({ onClick, selected, disabled, prefix, suffix, description, className, children, ...props }, ref) => {
|
|
2994
|
+
const isInteractive = !!onClick;
|
|
2995
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
2996
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: List_default.prefix, children: prefix }),
|
|
2997
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: List_default.content, children: [
|
|
2998
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: List_default.primary, children }),
|
|
2999
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: List_default.description, children: description })
|
|
3000
|
+
] }),
|
|
3001
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: List_default.suffix, children: suffix })
|
|
3002
|
+
] });
|
|
3003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3004
|
+
"li",
|
|
3005
|
+
{
|
|
3006
|
+
ref,
|
|
3007
|
+
className: cn(List_default.item, className),
|
|
3008
|
+
...props,
|
|
3009
|
+
children: isInteractive ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3010
|
+
"button",
|
|
3011
|
+
{
|
|
3012
|
+
type: "button",
|
|
3013
|
+
className: cn(List_default.interactive, selected && List_default.selected, disabled && List_default.disabled),
|
|
3014
|
+
onClick,
|
|
3015
|
+
disabled,
|
|
3016
|
+
"aria-selected": selected || void 0,
|
|
3017
|
+
"aria-disabled": disabled || void 0,
|
|
3018
|
+
children: content
|
|
3019
|
+
}
|
|
3020
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: cn(List_default.static, selected && List_default.selected, disabled && List_default.disabled), children: content })
|
|
3021
|
+
}
|
|
3022
|
+
);
|
|
3023
|
+
}
|
|
3024
|
+
);
|
|
3025
|
+
ListItem.displayName = "ListItem";
|
|
3026
|
+
|
|
3027
|
+
// src/components/CollapsiblePanel/CollapsiblePanel.tsx
|
|
3028
|
+
var import_react29 = require("react");
|
|
3029
|
+
|
|
3030
|
+
// src/components/CollapsiblePanel/CollapsiblePanel.module.css
|
|
3031
|
+
var CollapsiblePanel_default = {};
|
|
3032
|
+
|
|
3033
|
+
// src/components/CollapsiblePanel/CollapsiblePanel.tsx
|
|
3034
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3035
|
+
function CollapsiblePanel({
|
|
3036
|
+
title,
|
|
3037
|
+
defaultOpen = false,
|
|
3038
|
+
open: controlledOpen,
|
|
3039
|
+
onToggle,
|
|
3040
|
+
children,
|
|
3041
|
+
className
|
|
3042
|
+
}) {
|
|
3043
|
+
const [internalOpen, setInternalOpen] = (0, import_react29.useState)(defaultOpen);
|
|
3044
|
+
const isOpen = controlledOpen !== void 0 ? controlledOpen : internalOpen;
|
|
3045
|
+
const contentRef = (0, import_react29.useRef)(null);
|
|
3046
|
+
const [height, setHeight] = (0, import_react29.useState)(isOpen ? void 0 : 0);
|
|
3047
|
+
const panelId = (0, import_react29.useRef)(`collapsible-panel-${Math.random().toString(36).slice(2, 9)}`).current;
|
|
3048
|
+
const triggerId = `${panelId}-trigger`;
|
|
3049
|
+
(0, import_react29.useEffect)(() => {
|
|
3050
|
+
if (!contentRef.current) return;
|
|
3051
|
+
if (isOpen) {
|
|
3052
|
+
setHeight(contentRef.current.scrollHeight);
|
|
3053
|
+
const timer = setTimeout(() => setHeight(void 0), 200);
|
|
3054
|
+
return () => clearTimeout(timer);
|
|
3055
|
+
} else {
|
|
3056
|
+
setHeight(contentRef.current.scrollHeight);
|
|
3057
|
+
requestAnimationFrame(() => {
|
|
3058
|
+
requestAnimationFrame(() => setHeight(0));
|
|
3059
|
+
});
|
|
3060
|
+
}
|
|
3061
|
+
}, [isOpen]);
|
|
3062
|
+
const handleToggle = () => {
|
|
3063
|
+
const next = !isOpen;
|
|
3064
|
+
if (controlledOpen === void 0) {
|
|
3065
|
+
setInternalOpen(next);
|
|
3066
|
+
}
|
|
3067
|
+
onToggle?.(next);
|
|
3068
|
+
};
|
|
3069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn(CollapsiblePanel_default.panel, isOpen && CollapsiblePanel_default.open, className), children: [
|
|
3070
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
3071
|
+
"button",
|
|
3072
|
+
{
|
|
3073
|
+
type: "button",
|
|
3074
|
+
id: triggerId,
|
|
3075
|
+
className: CollapsiblePanel_default.trigger,
|
|
3076
|
+
"aria-expanded": isOpen,
|
|
3077
|
+
"aria-controls": panelId,
|
|
3078
|
+
onClick: handleToggle,
|
|
3079
|
+
children: [
|
|
3080
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3081
|
+
"svg",
|
|
3082
|
+
{
|
|
3083
|
+
className: CollapsiblePanel_default.chevron,
|
|
3084
|
+
width: "20",
|
|
3085
|
+
height: "20",
|
|
3086
|
+
viewBox: "0 0 20 20",
|
|
3087
|
+
fill: "none",
|
|
3088
|
+
stroke: "currentColor",
|
|
3089
|
+
strokeWidth: "2",
|
|
3090
|
+
strokeLinecap: "round",
|
|
3091
|
+
strokeLinejoin: "round",
|
|
3092
|
+
"aria-hidden": "true",
|
|
3093
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("polyline", { points: "8 4 14 10 8 16" })
|
|
3094
|
+
}
|
|
3095
|
+
),
|
|
3096
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: CollapsiblePanel_default.title, children: title })
|
|
3097
|
+
]
|
|
3098
|
+
}
|
|
3099
|
+
),
|
|
3100
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3101
|
+
"div",
|
|
3102
|
+
{
|
|
3103
|
+
id: panelId,
|
|
3104
|
+
role: "region",
|
|
3105
|
+
"aria-labelledby": triggerId,
|
|
3106
|
+
className: CollapsiblePanel_default.content,
|
|
3107
|
+
style: { height: height !== void 0 ? `${height}px` : "auto" },
|
|
3108
|
+
hidden: !isOpen && height === 0,
|
|
3109
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { ref: contentRef, className: CollapsiblePanel_default.contentInner, children })
|
|
3110
|
+
}
|
|
3111
|
+
)
|
|
3112
|
+
] });
|
|
3113
|
+
}
|
|
3114
|
+
|
|
3115
|
+
// src/components/PatientCard/PatientCard.module.css
|
|
3116
|
+
var PatientCard_default = {};
|
|
3117
|
+
|
|
3118
|
+
// src/components/PatientCard/PatientCard.tsx
|
|
3119
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3120
|
+
var statusLabels2 = {
|
|
3121
|
+
active: "Active",
|
|
3122
|
+
inactive: "Inactive",
|
|
3123
|
+
critical: "Critical"
|
|
3124
|
+
};
|
|
3125
|
+
function PatientCard({
|
|
3126
|
+
name,
|
|
3127
|
+
mrn,
|
|
3128
|
+
dob,
|
|
3129
|
+
age,
|
|
3130
|
+
gender,
|
|
3131
|
+
avatar,
|
|
3132
|
+
status = "active",
|
|
3133
|
+
allergies = [],
|
|
3134
|
+
primaryPhysician,
|
|
3135
|
+
className,
|
|
3136
|
+
...props
|
|
3137
|
+
}) {
|
|
3138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3139
|
+
"div",
|
|
3140
|
+
{
|
|
3141
|
+
className: cn(PatientCard_default.card, PatientCard_default[status], className),
|
|
3142
|
+
role: "region",
|
|
3143
|
+
"aria-label": `Patient card for ${name}`,
|
|
3144
|
+
...props,
|
|
3145
|
+
children: [
|
|
3146
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: PatientCard_default.header, children: [
|
|
3147
|
+
avatar && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: PatientCard_default.avatar, "aria-hidden": "true", children: avatar }),
|
|
3148
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: PatientCard_default.identity, children: [
|
|
3149
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: PatientCard_default.name, children: name }),
|
|
3150
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: PatientCard_default.mrn, children: [
|
|
3151
|
+
"MRN: ",
|
|
3152
|
+
mrn
|
|
3153
|
+
] })
|
|
3154
|
+
] }),
|
|
3155
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: cn(PatientCard_default.statusBadge, PatientCard_default[`status-${status}`]), children: statusLabels2[status] })
|
|
3156
|
+
] }),
|
|
3157
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: PatientCard_default.details, children: [
|
|
3158
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: PatientCard_default.field, children: [
|
|
3159
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: PatientCard_default.label, children: "DOB" }),
|
|
3160
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: PatientCard_default.value, children: dob })
|
|
3161
|
+
] }),
|
|
3162
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: PatientCard_default.field, children: [
|
|
3163
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: PatientCard_default.label, children: "Age" }),
|
|
3164
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: PatientCard_default.value, children: age })
|
|
3165
|
+
] }),
|
|
3166
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: PatientCard_default.field, children: [
|
|
3167
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: PatientCard_default.label, children: "Gender" }),
|
|
3168
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: PatientCard_default.value, children: gender })
|
|
3169
|
+
] }),
|
|
3170
|
+
primaryPhysician && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: PatientCard_default.field, children: [
|
|
3171
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: PatientCard_default.label, children: "PCP" }),
|
|
3172
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: PatientCard_default.value, children: primaryPhysician })
|
|
3173
|
+
] })
|
|
3174
|
+
] }),
|
|
3175
|
+
allergies.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: PatientCard_default.allergies, children: [
|
|
3176
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: PatientCard_default.allergiesLabel, children: "Allergies:" }),
|
|
3177
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("ul", { className: PatientCard_default.allergyList, children: allergies.map((allergy) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("li", { className: PatientCard_default.allergyItem, children: allergy }, allergy)) })
|
|
3178
|
+
] })
|
|
3179
|
+
]
|
|
3180
|
+
}
|
|
3181
|
+
);
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3184
|
+
// src/components/AppointmentCard/AppointmentCard.module.css
|
|
3185
|
+
var AppointmentCard_default = {};
|
|
3186
|
+
|
|
3187
|
+
// src/components/AppointmentCard/AppointmentCard.tsx
|
|
3188
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3189
|
+
var statusLabels3 = {
|
|
3190
|
+
scheduled: "Scheduled",
|
|
3191
|
+
"checked-in": "Checked In",
|
|
3192
|
+
"in-progress": "In Progress",
|
|
3193
|
+
completed: "Completed",
|
|
3194
|
+
cancelled: "Cancelled",
|
|
3195
|
+
"no-show": "No Show"
|
|
3196
|
+
};
|
|
3197
|
+
function AppointmentCard({
|
|
3198
|
+
patientName,
|
|
3199
|
+
date,
|
|
3200
|
+
time,
|
|
3201
|
+
type,
|
|
3202
|
+
provider,
|
|
3203
|
+
status,
|
|
3204
|
+
location,
|
|
3205
|
+
className,
|
|
3206
|
+
...props
|
|
3207
|
+
}) {
|
|
3208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
3209
|
+
"div",
|
|
3210
|
+
{
|
|
3211
|
+
className: cn(AppointmentCard_default.card, AppointmentCard_default[status], className),
|
|
3212
|
+
role: "region",
|
|
3213
|
+
"aria-label": `Appointment for ${patientName}`,
|
|
3214
|
+
...props,
|
|
3215
|
+
children: [
|
|
3216
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: AppointmentCard_default.statusBar, "aria-hidden": "true" }),
|
|
3217
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: AppointmentCard_default.content, children: [
|
|
3218
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: AppointmentCard_default.header, children: [
|
|
3219
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h3", { className: AppointmentCard_default.patientName, children: patientName }),
|
|
3220
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: cn(AppointmentCard_default.statusBadge, AppointmentCard_default[`badge-${status}`]), children: statusLabels3[status] })
|
|
3221
|
+
] }),
|
|
3222
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: AppointmentCard_default.type, children: type }),
|
|
3223
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: AppointmentCard_default.details, children: [
|
|
3224
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: AppointmentCard_default.field, children: [
|
|
3225
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("svg", { className: AppointmentCard_default.icon, width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { d: "M5 0a1 1 0 011 1v1h4V1a1 1 0 112 0v1h1.5A2.5 2.5 0 0116 4.5v9a2.5 2.5 0 01-2.5 2.5h-11A2.5 2.5 0 010 13.5v-9A2.5 2.5 0 012.5 2H4V1a1 1 0 011-1zM2 6v7.5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5V6H2z" }) }),
|
|
3226
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: date })
|
|
3227
|
+
] }),
|
|
3228
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: AppointmentCard_default.field, children: [
|
|
3229
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("svg", { className: AppointmentCard_default.icon, width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { d: "M8 0a8 8 0 110 16A8 8 0 018 0zm0 2a6 6 0 100 12A6 6 0 008 2zm.5 2a.5.5 0 01.5.5V8h2a.5.5 0 010 1H8a.5.5 0 01-.5-.5v-4a.5.5 0 01.5-.5z" }) }),
|
|
3230
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: time })
|
|
3231
|
+
] }),
|
|
3232
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: AppointmentCard_default.field, children: [
|
|
3233
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("svg", { className: AppointmentCard_default.icon, width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { d: "M8 0a5 5 0 014.9 5.9L8 14.5 3.1 5.9A5 5 0 018 0zm0 3a2 2 0 100 4 2 2 0 000-4z" }) }),
|
|
3234
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: provider })
|
|
3235
|
+
] }),
|
|
3236
|
+
location && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: AppointmentCard_default.field, children: [
|
|
3237
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("svg", { className: AppointmentCard_default.icon, width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { d: "M2 2a2 2 0 012-2h8a2 2 0 012 2v12a2 2 0 01-2 2H4a2 2 0 01-2-2V2zm2 0v12h8V2H4zm2 1h4v2H6V3z" }) }),
|
|
3238
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: location })
|
|
3239
|
+
] })
|
|
3240
|
+
] })
|
|
3241
|
+
] })
|
|
3242
|
+
]
|
|
3243
|
+
}
|
|
3244
|
+
);
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
// src/components/Timeline/Timeline.module.css
|
|
3248
|
+
var Timeline_default = {};
|
|
3249
|
+
|
|
3250
|
+
// src/components/Timeline/Timeline.tsx
|
|
3251
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3252
|
+
function Timeline({ items, className, ...props }) {
|
|
3253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("ol", { className: cn(Timeline_default.timeline, className), ...props, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
3254
|
+
"li",
|
|
3255
|
+
{
|
|
3256
|
+
className: cn(Timeline_default.item, Timeline_default[item.variant ?? "default"]),
|
|
3257
|
+
children: [
|
|
3258
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: Timeline_default.indicator, "aria-hidden": "true", children: [
|
|
3259
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: Timeline_default.icon, children: item.icon }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: Timeline_default.dot }),
|
|
3260
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: Timeline_default.line })
|
|
3261
|
+
] }),
|
|
3262
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: Timeline_default.content, children: [
|
|
3263
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: Timeline_default.title, children: item.title }),
|
|
3264
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: Timeline_default.description, children: item.description }),
|
|
3265
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("time", { className: Timeline_default.timestamp, children: item.timestamp })
|
|
3266
|
+
] })
|
|
3267
|
+
]
|
|
3268
|
+
},
|
|
3269
|
+
item.id
|
|
3270
|
+
)) });
|
|
3271
|
+
}
|
|
3272
|
+
|
|
3273
|
+
// src/components/ClinicalBanner/ClinicalBanner.module.css
|
|
3274
|
+
var ClinicalBanner_default = {};
|
|
3275
|
+
|
|
3276
|
+
// src/components/ClinicalBanner/ClinicalBanner.tsx
|
|
3277
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3278
|
+
var severityIcons = {
|
|
3279
|
+
critical: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm3.5 6.5a1 1 0 00-1.4 0L10 8.6 7.9 6.5a1 1 0 10-1.4 1.4L8.6 10l-2.1 2.1a1 1 0 101.4 1.4L10 11.4l2.1 2.1a1 1 0 001.4-1.4L11.4 10l2.1-2.1a1 1 0 000-1.4z" }) }),
|
|
3280
|
+
high: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm0 13a1 1 0 100 2 1 1 0 000-2zm0-8a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" }) }),
|
|
3281
|
+
moderate: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm0 8a1 1 0 00-1 1v5a1 1 0 102 0V9a1 1 0 00-1-1zm0-3.5a1 1 0 100 2 1 1 0 000-2z" }) }),
|
|
3282
|
+
low: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm0 8a1 1 0 00-1 1v5a1 1 0 102 0V9a1 1 0 00-1-1zm0-3.5a1 1 0 100 2 1 1 0 000-2z" }) })
|
|
3283
|
+
};
|
|
3284
|
+
function ClinicalBanner({
|
|
3285
|
+
severity,
|
|
3286
|
+
title,
|
|
3287
|
+
dismissible = false,
|
|
3288
|
+
onDismiss,
|
|
3289
|
+
children,
|
|
3290
|
+
className,
|
|
3291
|
+
...props
|
|
3292
|
+
}) {
|
|
3293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
3294
|
+
"div",
|
|
3295
|
+
{
|
|
3296
|
+
className: cn(ClinicalBanner_default.banner, ClinicalBanner_default[severity], className),
|
|
3297
|
+
role: "alert",
|
|
3298
|
+
...props,
|
|
3299
|
+
children: [
|
|
3300
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: ClinicalBanner_default.icon, "aria-hidden": "true", children: severityIcons[severity] }),
|
|
3301
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ClinicalBanner_default.content, children: [
|
|
3302
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: ClinicalBanner_default.title, children: title }),
|
|
3303
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ClinicalBanner_default.body, children })
|
|
3304
|
+
] }),
|
|
3305
|
+
dismissible && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3306
|
+
"button",
|
|
3307
|
+
{
|
|
3308
|
+
className: ClinicalBanner_default.dismiss,
|
|
3309
|
+
onClick: onDismiss,
|
|
3310
|
+
"aria-label": "Dismiss alert",
|
|
3311
|
+
type: "button",
|
|
3312
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", children: [
|
|
3313
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("line", { x1: "4", y1: "4", x2: "12", y2: "12" }),
|
|
3314
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("line", { x1: "12", y1: "4", x2: "4", y2: "12" })
|
|
3315
|
+
] })
|
|
3316
|
+
}
|
|
3317
|
+
)
|
|
3318
|
+
]
|
|
3319
|
+
}
|
|
3320
|
+
);
|
|
3321
|
+
}
|
|
3322
|
+
|
|
3323
|
+
// src/components/MedicationRow/MedicationRow.module.css
|
|
3324
|
+
var MedicationRow_default = {};
|
|
3325
|
+
|
|
3326
|
+
// src/components/MedicationRow/MedicationRow.tsx
|
|
3327
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3328
|
+
var statusLabels4 = {
|
|
3329
|
+
active: "Active",
|
|
3330
|
+
discontinued: "Discontinued",
|
|
3331
|
+
hold: "On Hold",
|
|
3332
|
+
prn: "PRN"
|
|
3333
|
+
};
|
|
3334
|
+
function MedicationRow({
|
|
3335
|
+
name,
|
|
3336
|
+
dosage,
|
|
3337
|
+
frequency,
|
|
3338
|
+
route,
|
|
3339
|
+
prescribedBy,
|
|
3340
|
+
startDate,
|
|
3341
|
+
endDate,
|
|
3342
|
+
status,
|
|
3343
|
+
className,
|
|
3344
|
+
...props
|
|
3345
|
+
}) {
|
|
3346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
3347
|
+
"div",
|
|
3348
|
+
{
|
|
3349
|
+
className: cn(MedicationRow_default.row, MedicationRow_default[status], className),
|
|
3350
|
+
...props,
|
|
3351
|
+
children: [
|
|
3352
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: MedicationRow_default.primary, children: [
|
|
3353
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: cn(MedicationRow_default.statusIndicator, MedicationRow_default[`indicator-${status}`]), "aria-hidden": "true" }),
|
|
3354
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: MedicationRow_default.name, children: name }),
|
|
3355
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: MedicationRow_default.dosage, children: dosage }),
|
|
3356
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: cn(MedicationRow_default.statusBadge, MedicationRow_default[`badge-${status}`]), children: statusLabels4[status] })
|
|
3357
|
+
] }),
|
|
3358
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: MedicationRow_default.secondary, children: [
|
|
3359
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: MedicationRow_default.detail, children: [
|
|
3360
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: MedicationRow_default.detailLabel, children: "Freq:" }),
|
|
3361
|
+
" ",
|
|
3362
|
+
frequency
|
|
3363
|
+
] }),
|
|
3364
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: MedicationRow_default.detail, children: [
|
|
3365
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: MedicationRow_default.detailLabel, children: "Route:" }),
|
|
3366
|
+
" ",
|
|
3367
|
+
route
|
|
3368
|
+
] }),
|
|
3369
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: MedicationRow_default.detail, children: [
|
|
3370
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: MedicationRow_default.detailLabel, children: "By:" }),
|
|
3371
|
+
" ",
|
|
3372
|
+
prescribedBy
|
|
3373
|
+
] }),
|
|
3374
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: MedicationRow_default.detail, children: [
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: MedicationRow_default.detailLabel, children: "Start:" }),
|
|
3376
|
+
" ",
|
|
3377
|
+
startDate
|
|
3378
|
+
] }),
|
|
3379
|
+
endDate && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: MedicationRow_default.detail, children: [
|
|
3380
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: MedicationRow_default.detailLabel, children: "End:" }),
|
|
3381
|
+
" ",
|
|
3382
|
+
endDate
|
|
3383
|
+
] })
|
|
3384
|
+
] })
|
|
3385
|
+
]
|
|
3386
|
+
}
|
|
3387
|
+
);
|
|
3388
|
+
}
|
|
3389
|
+
|
|
3390
|
+
// src/components/LabResultRow/LabResultRow.module.css
|
|
3391
|
+
var LabResultRow_default = {};
|
|
3392
|
+
|
|
3393
|
+
// src/components/LabResultRow/LabResultRow.tsx
|
|
3394
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3395
|
+
var statusLabels5 = {
|
|
3396
|
+
normal: "Normal",
|
|
3397
|
+
"abnormal-high": "High",
|
|
3398
|
+
"abnormal-low": "Low",
|
|
3399
|
+
critical: "Critical"
|
|
3400
|
+
};
|
|
3401
|
+
var statusArrow = {
|
|
3402
|
+
normal: "",
|
|
3403
|
+
"abnormal-high": "\u2191",
|
|
3404
|
+
"abnormal-low": "\u2193",
|
|
3405
|
+
critical: "\u2191\u2191"
|
|
3406
|
+
};
|
|
3407
|
+
function LabResultRow({
|
|
3408
|
+
testName,
|
|
3409
|
+
value,
|
|
3410
|
+
unit,
|
|
3411
|
+
referenceRange,
|
|
3412
|
+
status,
|
|
3413
|
+
collectedDate,
|
|
3414
|
+
className,
|
|
3415
|
+
...props
|
|
3416
|
+
}) {
|
|
3417
|
+
const isAbnormal = status !== "normal";
|
|
3418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
3419
|
+
"div",
|
|
3420
|
+
{
|
|
3421
|
+
className: cn(LabResultRow_default.row, LabResultRow_default[status], className),
|
|
3422
|
+
...props,
|
|
3423
|
+
children: [
|
|
3424
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: LabResultRow_default.testInfo, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: LabResultRow_default.testName, children: testName }) }),
|
|
3425
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: LabResultRow_default.result, children: [
|
|
3426
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: cn(LabResultRow_default.value, isAbnormal && LabResultRow_default.abnormalValue), children: [
|
|
3427
|
+
value,
|
|
3428
|
+
statusArrow[status] && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: LabResultRow_default.arrow, "aria-hidden": "true", children: [
|
|
3429
|
+
" ",
|
|
3430
|
+
statusArrow[status]
|
|
3431
|
+
] })
|
|
3432
|
+
] }),
|
|
3433
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: LabResultRow_default.unit, children: unit })
|
|
3434
|
+
] }),
|
|
3435
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: LabResultRow_default.range, children: [
|
|
3436
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: LabResultRow_default.rangeLabel, children: "Ref:" }),
|
|
3437
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: LabResultRow_default.rangeValue, children: referenceRange })
|
|
3438
|
+
] }),
|
|
3439
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: LabResultRow_default.meta, children: [
|
|
3440
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn(LabResultRow_default.statusBadge, LabResultRow_default[`badge-${status}`]), children: statusLabels5[status] }),
|
|
3441
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: LabResultRow_default.date, children: collectedDate })
|
|
3442
|
+
] })
|
|
3443
|
+
]
|
|
3444
|
+
}
|
|
3445
|
+
);
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
// src/components/InsuranceCard/InsuranceCard.module.css
|
|
3449
|
+
var InsuranceCard_default = {};
|
|
3450
|
+
|
|
3451
|
+
// src/components/InsuranceCard/InsuranceCard.tsx
|
|
3452
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3453
|
+
var statusLabels6 = {
|
|
3454
|
+
active: "Active",
|
|
3455
|
+
inactive: "Inactive",
|
|
3456
|
+
pending: "Pending"
|
|
3457
|
+
};
|
|
3458
|
+
function InsuranceCard({
|
|
3459
|
+
planName,
|
|
3460
|
+
memberId,
|
|
3461
|
+
groupNumber,
|
|
3462
|
+
planType,
|
|
3463
|
+
status,
|
|
3464
|
+
effectiveDate,
|
|
3465
|
+
expirationDate,
|
|
3466
|
+
className,
|
|
3467
|
+
...props
|
|
3468
|
+
}) {
|
|
3469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
3470
|
+
"div",
|
|
3471
|
+
{
|
|
3472
|
+
className: cn(InsuranceCard_default.card, className),
|
|
3473
|
+
role: "region",
|
|
3474
|
+
"aria-label": `Insurance: ${planName}`,
|
|
3475
|
+
...props,
|
|
3476
|
+
children: [
|
|
3477
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: InsuranceCard_default.header, children: [
|
|
3478
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: InsuranceCard_default.planInfo, children: [
|
|
3479
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h3", { className: InsuranceCard_default.planName, children: planName }),
|
|
3480
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: InsuranceCard_default.planType, children: planType })
|
|
3481
|
+
] }),
|
|
3482
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: cn(InsuranceCard_default.statusBadge, InsuranceCard_default[`status-${status}`]), children: statusLabels6[status] })
|
|
3483
|
+
] }),
|
|
3484
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: InsuranceCard_default.details, children: [
|
|
3485
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: InsuranceCard_default.field, children: [
|
|
3486
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: InsuranceCard_default.label, children: "Member ID" }),
|
|
3487
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: InsuranceCard_default.value, children: memberId })
|
|
3488
|
+
] }),
|
|
3489
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: InsuranceCard_default.field, children: [
|
|
3490
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: InsuranceCard_default.label, children: "Group #" }),
|
|
3491
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: InsuranceCard_default.value, children: groupNumber })
|
|
3492
|
+
] }),
|
|
3493
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: InsuranceCard_default.field, children: [
|
|
3494
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: InsuranceCard_default.label, children: "Effective" }),
|
|
3495
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: InsuranceCard_default.value, children: effectiveDate })
|
|
3496
|
+
] }),
|
|
3497
|
+
expirationDate && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: InsuranceCard_default.field, children: [
|
|
3498
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: InsuranceCard_default.label, children: "Expires" }),
|
|
3499
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: InsuranceCard_default.value, children: expirationDate })
|
|
3500
|
+
] })
|
|
3501
|
+
] })
|
|
3502
|
+
]
|
|
3503
|
+
}
|
|
3504
|
+
);
|
|
3505
|
+
}
|
|
3506
|
+
|
|
3507
|
+
// src/components/Toast/Toast.tsx
|
|
3508
|
+
var import_react30 = require("react");
|
|
3509
|
+
|
|
3510
|
+
// src/components/Toast/Toast.module.css
|
|
3511
|
+
var Toast_default = {};
|
|
3512
|
+
|
|
3513
|
+
// src/components/Toast/Toast.tsx
|
|
3514
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3515
|
+
var statusIcons2 = {
|
|
3516
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm0 8a1 1 0 00-1 1v5a1 1 0 102 0V9a1 1 0 00-1-1zm0-3.5a1 1 0 100 2 1 1 0 000-2z" }) }),
|
|
3517
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm4.3 7.3a1 1 0 00-1.4-1.4L8.5 10.3 7.1 8.9a1 1 0 10-1.4 1.4l2.1 2.1a1 1 0 001.4 0l5.1-5.1z" }) }),
|
|
3518
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm0 13a1 1 0 100 2 1 1 0 000-2zm0-8a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" }) }),
|
|
3519
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm3.5 6.5a1 1 0 00-1.4 0L10 8.6 7.9 6.5a1 1 0 10-1.4 1.4L8.6 10l-2.1 2.1a1 1 0 101.4 1.4L10 11.4l2.1 2.1a1 1 0 001.4-1.4L11.4 10l2.1-2.1a1 1 0 000-1.4z" }) })
|
|
3520
|
+
};
|
|
3521
|
+
function Toast({
|
|
3522
|
+
message,
|
|
3523
|
+
title,
|
|
3524
|
+
status = "info",
|
|
3525
|
+
action,
|
|
3526
|
+
onClose,
|
|
3527
|
+
duration: duration2 = 5e3,
|
|
3528
|
+
className
|
|
3529
|
+
}) {
|
|
3530
|
+
(0, import_react30.useEffect)(() => {
|
|
3531
|
+
if (duration2 <= 0) return;
|
|
3532
|
+
const timer = setTimeout(onClose, duration2);
|
|
3533
|
+
return () => clearTimeout(timer);
|
|
3534
|
+
}, [duration2, onClose]);
|
|
3535
|
+
const isUrgent = status === "error" || status === "warning";
|
|
3536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
3537
|
+
"div",
|
|
3538
|
+
{
|
|
3539
|
+
className: cn(Toast_default.toast, Toast_default[status], className),
|
|
3540
|
+
role: isUrgent ? "alert" : "status",
|
|
3541
|
+
children: [
|
|
3542
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: Toast_default.icon, "aria-hidden": "true", children: statusIcons2[status] }),
|
|
3543
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: Toast_default.content, children: [
|
|
3544
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: Toast_default.title, children: title }),
|
|
3545
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: Toast_default.message, children: message })
|
|
3546
|
+
] }),
|
|
3547
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: Toast_default.action, children: action }),
|
|
3548
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3549
|
+
"button",
|
|
3550
|
+
{
|
|
3551
|
+
className: Toast_default.close,
|
|
3552
|
+
onClick: onClose,
|
|
3553
|
+
"aria-label": "Dismiss notification",
|
|
3554
|
+
type: "button",
|
|
3555
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", children: [
|
|
3556
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("line", { x1: "4", y1: "4", x2: "12", y2: "12" }),
|
|
3557
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("line", { x1: "12", y1: "4", x2: "4", y2: "12" })
|
|
3558
|
+
] })
|
|
3559
|
+
}
|
|
3560
|
+
)
|
|
3561
|
+
]
|
|
3562
|
+
}
|
|
3563
|
+
);
|
|
3564
|
+
}
|
|
3565
|
+
|
|
3566
|
+
// src/components/ConfirmDialog/ConfirmDialog.tsx
|
|
3567
|
+
var import_react31 = require("react");
|
|
3568
|
+
|
|
3569
|
+
// src/components/ConfirmDialog/ConfirmDialog.module.css
|
|
3570
|
+
var ConfirmDialog_default = {};
|
|
3571
|
+
|
|
3572
|
+
// src/components/ConfirmDialog/ConfirmDialog.tsx
|
|
3573
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3574
|
+
function ConfirmDialog({
|
|
3575
|
+
open,
|
|
3576
|
+
onConfirm,
|
|
3577
|
+
onCancel,
|
|
3578
|
+
title,
|
|
3579
|
+
message,
|
|
3580
|
+
confirmLabel = "Confirm",
|
|
3581
|
+
cancelLabel = "Cancel",
|
|
3582
|
+
variant = "default",
|
|
3583
|
+
loading = false,
|
|
3584
|
+
className
|
|
3585
|
+
}) {
|
|
3586
|
+
const dialogRef = (0, import_react31.useRef)(null);
|
|
3587
|
+
const cancelRef = (0, import_react31.useRef)(null);
|
|
3588
|
+
(0, import_react31.useEffect)(() => {
|
|
3589
|
+
const dialog = dialogRef.current;
|
|
3590
|
+
if (!dialog) return;
|
|
3591
|
+
if (open && !dialog.open) {
|
|
3592
|
+
dialog.showModal();
|
|
3593
|
+
cancelRef.current?.focus();
|
|
3594
|
+
} else if (!open && dialog.open) {
|
|
3595
|
+
dialog.close();
|
|
3596
|
+
}
|
|
3597
|
+
}, [open]);
|
|
3598
|
+
(0, import_react31.useEffect)(() => {
|
|
3599
|
+
const dialog = dialogRef.current;
|
|
3600
|
+
if (!dialog) return;
|
|
3601
|
+
const handleClose = () => onCancel();
|
|
3602
|
+
dialog.addEventListener("close", handleClose);
|
|
3603
|
+
return () => dialog.removeEventListener("close", handleClose);
|
|
3604
|
+
}, [onCancel]);
|
|
3605
|
+
const handleBackdropClick = (e) => {
|
|
3606
|
+
if (e.target === dialogRef.current) {
|
|
3607
|
+
onCancel();
|
|
3608
|
+
}
|
|
3609
|
+
};
|
|
3610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3611
|
+
"dialog",
|
|
3612
|
+
{
|
|
3613
|
+
ref: dialogRef,
|
|
3614
|
+
className: cn(ConfirmDialog_default.dialog, className),
|
|
3615
|
+
"aria-labelledby": "aegis-confirm-title",
|
|
3616
|
+
"aria-describedby": "aegis-confirm-message",
|
|
3617
|
+
onClick: handleBackdropClick,
|
|
3618
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: ConfirmDialog_default.content, children: [
|
|
3619
|
+
variant === "danger" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: ConfirmDialog_default.dangerIcon, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { d: "M12 0a12 12 0 110 24 12 12 0 010-24zm0 15a1.25 1.25 0 100 2.5 1.25 1.25 0 000-2.5zm0-9a1 1 0 00-1 1v5.5a1 1 0 102 0V7a1 1 0 00-1-1z" }) }) }),
|
|
3620
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h2", { id: "aegis-confirm-title", className: ConfirmDialog_default.title, children: title }),
|
|
3621
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { id: "aegis-confirm-message", className: ConfirmDialog_default.message, children: typeof message === "string" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { children: message }) : message }),
|
|
3622
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: ConfirmDialog_default.actions, children: [
|
|
3623
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3624
|
+
"button",
|
|
3625
|
+
{
|
|
3626
|
+
ref: cancelRef,
|
|
3627
|
+
className: ConfirmDialog_default.cancelButton,
|
|
3628
|
+
onClick: onCancel,
|
|
3629
|
+
type: "button",
|
|
3630
|
+
disabled: loading,
|
|
3631
|
+
children: cancelLabel
|
|
3632
|
+
}
|
|
3633
|
+
),
|
|
3634
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3635
|
+
"button",
|
|
3636
|
+
{
|
|
3637
|
+
className: cn(ConfirmDialog_default.confirmButton, ConfirmDialog_default[variant]),
|
|
3638
|
+
onClick: onConfirm,
|
|
3639
|
+
type: "button",
|
|
3640
|
+
disabled: loading,
|
|
3641
|
+
"aria-busy": loading,
|
|
3642
|
+
children: loading ? "Loading..." : confirmLabel
|
|
3643
|
+
}
|
|
3644
|
+
)
|
|
3645
|
+
] })
|
|
3646
|
+
] })
|
|
3647
|
+
}
|
|
3648
|
+
);
|
|
3649
|
+
}
|
|
3650
|
+
|
|
3651
|
+
// src/components/Banner/Banner.module.css
|
|
3652
|
+
var Banner_default = {};
|
|
3653
|
+
|
|
3654
|
+
// src/components/Banner/Banner.tsx
|
|
3655
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3656
|
+
var statusIcons3 = {
|
|
3657
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm0 8a1 1 0 00-1 1v5a1 1 0 102 0V9a1 1 0 00-1-1zm0-3.5a1 1 0 100 2 1 1 0 000-2z" }) }),
|
|
3658
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm4.3 7.3a1 1 0 00-1.4-1.4L8.5 10.3 7.1 8.9a1 1 0 10-1.4 1.4l2.1 2.1a1 1 0 001.4 0l5.1-5.1z" }) }),
|
|
3659
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm0 13a1 1 0 100 2 1 1 0 000-2zm0-8a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" }) }),
|
|
3660
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M10 0a10 10 0 110 20 10 10 0 010-20zm3.5 6.5a1 1 0 00-1.4 0L10 8.6 7.9 6.5a1 1 0 10-1.4 1.4L8.6 10l-2.1 2.1a1 1 0 101.4 1.4L10 11.4l2.1 2.1a1 1 0 001.4-1.4L11.4 10l2.1-2.1a1 1 0 000-1.4z" }) })
|
|
3661
|
+
};
|
|
3662
|
+
function Banner({
|
|
3663
|
+
status = "info",
|
|
3664
|
+
dismissible = false,
|
|
3665
|
+
onDismiss,
|
|
3666
|
+
action,
|
|
3667
|
+
children,
|
|
3668
|
+
className,
|
|
3669
|
+
...props
|
|
3670
|
+
}) {
|
|
3671
|
+
const isUrgent = status === "error" || status === "warning";
|
|
3672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3673
|
+
"div",
|
|
3674
|
+
{
|
|
3675
|
+
className: cn(Banner_default.banner, Banner_default[status], className),
|
|
3676
|
+
role: isUrgent ? "alert" : "status",
|
|
3677
|
+
...props,
|
|
3678
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: Banner_default.inner, children: [
|
|
3679
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: Banner_default.icon, "aria-hidden": "true", children: statusIcons3[status] }),
|
|
3680
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: Banner_default.content, children }),
|
|
3681
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: Banner_default.action, children: action }),
|
|
3682
|
+
dismissible && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3683
|
+
"button",
|
|
3684
|
+
{
|
|
3685
|
+
className: Banner_default.dismiss,
|
|
3686
|
+
onClick: onDismiss,
|
|
3687
|
+
"aria-label": "Dismiss banner",
|
|
3688
|
+
type: "button",
|
|
3689
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", children: [
|
|
3690
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("line", { x1: "4", y1: "4", x2: "12", y2: "12" }),
|
|
3691
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("line", { x1: "12", y1: "4", x2: "4", y2: "12" })
|
|
3692
|
+
] })
|
|
3693
|
+
}
|
|
3694
|
+
)
|
|
3695
|
+
] })
|
|
3696
|
+
}
|
|
3697
|
+
);
|
|
3698
|
+
}
|
|
3699
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3700
|
+
0 && (module.exports = {
|
|
3701
|
+
Accordion,
|
|
3702
|
+
Alert,
|
|
3703
|
+
AppointmentCard,
|
|
3704
|
+
Autocomplete,
|
|
3705
|
+
Avatar,
|
|
3706
|
+
Badge,
|
|
3707
|
+
Banner,
|
|
3708
|
+
Breadcrumbs,
|
|
3709
|
+
Button,
|
|
3710
|
+
Card,
|
|
3711
|
+
Checkbox,
|
|
3712
|
+
CheckboxGroup,
|
|
3713
|
+
ClinicalBanner,
|
|
3714
|
+
CollapsiblePanel,
|
|
3715
|
+
ConfirmDialog,
|
|
3716
|
+
DataGrid,
|
|
3717
|
+
DatePicker,
|
|
3718
|
+
DescriptionList,
|
|
3719
|
+
Divider,
|
|
3720
|
+
Drawer,
|
|
3721
|
+
EmptyState,
|
|
3722
|
+
FileUpload,
|
|
3723
|
+
FormField,
|
|
3724
|
+
HelperText,
|
|
3725
|
+
IconButton,
|
|
3726
|
+
Input,
|
|
3727
|
+
InsuranceCard,
|
|
3728
|
+
LabResultRow,
|
|
3729
|
+
Label,
|
|
3730
|
+
List,
|
|
3731
|
+
ListItem,
|
|
3732
|
+
MedicationRow,
|
|
3733
|
+
Modal,
|
|
3734
|
+
MultiSelect,
|
|
3735
|
+
NumberField,
|
|
3736
|
+
OTPInput,
|
|
3737
|
+
Pagination,
|
|
3738
|
+
PatientCard,
|
|
3739
|
+
Popover,
|
|
3740
|
+
ProgressBar,
|
|
3741
|
+
Radio,
|
|
3742
|
+
RadioGroup,
|
|
3743
|
+
SearchField,
|
|
3744
|
+
Select,
|
|
3745
|
+
SideNav,
|
|
3746
|
+
Skeleton,
|
|
3747
|
+
Slider,
|
|
3748
|
+
Spinner,
|
|
3749
|
+
StatCard,
|
|
3750
|
+
StatusBadge,
|
|
3751
|
+
Stepper,
|
|
3752
|
+
Switch,
|
|
3753
|
+
Table,
|
|
3754
|
+
TableBody,
|
|
3755
|
+
TableCell,
|
|
3756
|
+
TableHead,
|
|
3757
|
+
TableHeaderCell,
|
|
3758
|
+
TableRow,
|
|
3759
|
+
Tabs,
|
|
3760
|
+
Textarea,
|
|
3761
|
+
Timeline,
|
|
3762
|
+
Toast,
|
|
3763
|
+
Tooltip,
|
|
3764
|
+
TopNav,
|
|
3765
|
+
accentTeal,
|
|
3766
|
+
border,
|
|
3767
|
+
borderStyle,
|
|
3768
|
+
borderWidth,
|
|
3769
|
+
brandPrimary,
|
|
3770
|
+
cn,
|
|
3771
|
+
container,
|
|
3772
|
+
controlSize,
|
|
3773
|
+
dataVis,
|
|
3774
|
+
duration,
|
|
3775
|
+
easing,
|
|
3776
|
+
focusRing,
|
|
3777
|
+
fontFamily,
|
|
3778
|
+
fontSize,
|
|
3779
|
+
fontWeight,
|
|
3780
|
+
grid,
|
|
3781
|
+
iconSize,
|
|
3782
|
+
lineHeight,
|
|
3783
|
+
modalSize,
|
|
3784
|
+
neutral,
|
|
3785
|
+
opacity,
|
|
3786
|
+
radius,
|
|
3787
|
+
semantic,
|
|
3788
|
+
shadow,
|
|
3789
|
+
sidebarDefault,
|
|
3790
|
+
space,
|
|
3791
|
+
surface,
|
|
3792
|
+
text,
|
|
3793
|
+
touchMin,
|
|
3794
|
+
tracking,
|
|
3795
|
+
zIndex
|
|
3796
|
+
});
|
|
3797
|
+
//# sourceMappingURL=index.js.map
|