@otmc/ui 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +242 -79
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +258 -82
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/branding/Footer.tsx
|
|
2
2
|
import { Stack, Group, Text, Anchor, Tooltip, ActionIcon } from "@mantine/core";
|
|
3
|
+
import { Copyright } from "lucide-react";
|
|
3
4
|
import {
|
|
4
|
-
IconCopyright,
|
|
5
5
|
IconHeart,
|
|
6
6
|
IconBrandFacebook,
|
|
7
7
|
IconBrandGithub,
|
|
@@ -56,7 +56,7 @@ function Footer({
|
|
|
56
56
|
"Copyright",
|
|
57
57
|
" "
|
|
58
58
|
] }),
|
|
59
|
-
/* @__PURE__ */ jsx(
|
|
59
|
+
/* @__PURE__ */ jsx(Copyright, { size: 15, color: "var(--mantine-color-dimmed)" }),
|
|
60
60
|
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
|
|
61
61
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
62
62
|
" ",
|
|
@@ -266,17 +266,193 @@ function ThemeMenu({
|
|
|
266
266
|
] });
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
+
// src/components/ThemeSetting.tsx
|
|
270
|
+
import {
|
|
271
|
+
Box,
|
|
272
|
+
Card,
|
|
273
|
+
Divider,
|
|
274
|
+
Group as Group2,
|
|
275
|
+
SegmentedControl,
|
|
276
|
+
Stack as Stack2,
|
|
277
|
+
Text as Text2,
|
|
278
|
+
ThemeIcon,
|
|
279
|
+
Title
|
|
280
|
+
} from "@mantine/core";
|
|
281
|
+
import { TimeInput } from "@mantine/dates";
|
|
282
|
+
import {
|
|
283
|
+
IconClock,
|
|
284
|
+
IconDeviceLaptop,
|
|
285
|
+
IconMoon,
|
|
286
|
+
IconPalette,
|
|
287
|
+
IconSun
|
|
288
|
+
} from "@tabler/icons-react";
|
|
289
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
290
|
+
var DEFAULT_LABELS2 = {
|
|
291
|
+
title: "Appearance",
|
|
292
|
+
subtitle: "Control how the application looks and feels",
|
|
293
|
+
themeMode: "Theme mode",
|
|
294
|
+
themeModeHint: "Auto will switch between light and dark based on time of day",
|
|
295
|
+
currentlyActive: "Currently active:",
|
|
296
|
+
timeBasedSettings: "Time-based settings",
|
|
297
|
+
lightStartTime: "Light theme start time",
|
|
298
|
+
darkStartTime: "Dark theme start time",
|
|
299
|
+
light: "Light",
|
|
300
|
+
dark: "Dark",
|
|
301
|
+
system: "System",
|
|
302
|
+
timeBased: "Time-based"
|
|
303
|
+
};
|
|
304
|
+
var MODE_ICONS2 = {
|
|
305
|
+
light: /* @__PURE__ */ jsx4(IconSun, { size: 16 }),
|
|
306
|
+
dark: /* @__PURE__ */ jsx4(IconMoon, { size: 16 }),
|
|
307
|
+
auto: /* @__PURE__ */ jsx4(IconDeviceLaptop, { size: 16 }),
|
|
308
|
+
"time-based": /* @__PURE__ */ jsx4(IconClock, { size: 16 })
|
|
309
|
+
};
|
|
310
|
+
var MODE_ORDER = ["light", "dark", "auto", "time-based"];
|
|
311
|
+
function ThemeSetting({
|
|
312
|
+
modes = MODE_ORDER,
|
|
313
|
+
labels = {},
|
|
314
|
+
cardProps = {}
|
|
315
|
+
}) {
|
|
316
|
+
const {
|
|
317
|
+
theme,
|
|
318
|
+
timeBasedSettings,
|
|
319
|
+
setTheme,
|
|
320
|
+
setTimeBasedSettings,
|
|
321
|
+
currentTheme
|
|
322
|
+
} = useTheme();
|
|
323
|
+
const text = { ...DEFAULT_LABELS2, ...labels };
|
|
324
|
+
const isTimeBased = theme === "time-based";
|
|
325
|
+
const isDark = currentTheme === "dark";
|
|
326
|
+
const showTimeBased = modes.includes("time-based");
|
|
327
|
+
return /* @__PURE__ */ jsx4(
|
|
328
|
+
Card,
|
|
329
|
+
{
|
|
330
|
+
withBorder: true,
|
|
331
|
+
radius: "lg",
|
|
332
|
+
p: "25px",
|
|
333
|
+
bg: isDark ? "dark.8" : "gray.0",
|
|
334
|
+
style: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" },
|
|
335
|
+
...cardProps,
|
|
336
|
+
children: /* @__PURE__ */ jsxs3(Stack2, { gap: "lg", style: { flex: 1 }, children: [
|
|
337
|
+
/* @__PURE__ */ jsxs3(Box, { children: [
|
|
338
|
+
/* @__PURE__ */ jsxs3(Group2, { gap: "xs", children: [
|
|
339
|
+
/* @__PURE__ */ jsx4(ThemeIcon, { variant: "subtle", color: "blue.8", size: "md", radius: "md", children: /* @__PURE__ */ jsx4(IconPalette, { size: 25 }) }),
|
|
340
|
+
/* @__PURE__ */ jsx4(Title, { order: 4, children: text.title })
|
|
341
|
+
] }),
|
|
342
|
+
/* @__PURE__ */ jsx4(Text2, { size: "sm", c: "dimmed", children: text.subtitle })
|
|
343
|
+
] }),
|
|
344
|
+
/* @__PURE__ */ jsx4(Divider, {}),
|
|
345
|
+
/* @__PURE__ */ jsxs3(Box, { children: [
|
|
346
|
+
/* @__PURE__ */ jsx4(Text2, { fw: 500, mb: 6, children: text.themeMode }),
|
|
347
|
+
/* @__PURE__ */ jsx4(
|
|
348
|
+
SegmentedControl,
|
|
349
|
+
{
|
|
350
|
+
fullWidth: true,
|
|
351
|
+
value: theme,
|
|
352
|
+
radius: "lg",
|
|
353
|
+
color: "teal.8",
|
|
354
|
+
bg: isDark ? "dark.6" : "gray.3",
|
|
355
|
+
onChange: (value) => setTheme(value),
|
|
356
|
+
data: MODE_ORDER.filter((mode) => modes.includes(mode)).map(
|
|
357
|
+
(mode) => ({
|
|
358
|
+
value: mode,
|
|
359
|
+
label: /* @__PURE__ */ jsxs3(Group2, { gap: 6, children: [
|
|
360
|
+
MODE_ICONS2[mode],
|
|
361
|
+
/* @__PURE__ */ jsx4("span", { children: mode === "light" ? text.light : mode === "dark" ? text.dark : mode === "auto" ? text.system : text.timeBased })
|
|
362
|
+
] })
|
|
363
|
+
})
|
|
364
|
+
)
|
|
365
|
+
}
|
|
366
|
+
),
|
|
367
|
+
/* @__PURE__ */ jsx4(Text2, { size: "xs", c: "dimmed", mt: "xs", children: text.themeModeHint }),
|
|
368
|
+
/* @__PURE__ */ jsxs3(Text2, { size: "xs", mt: 4, children: [
|
|
369
|
+
text.currentlyActive,
|
|
370
|
+
" ",
|
|
371
|
+
/* @__PURE__ */ jsx4("b", { children: isDark ? text.dark : text.light })
|
|
372
|
+
] })
|
|
373
|
+
] }),
|
|
374
|
+
showTimeBased && /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
375
|
+
/* @__PURE__ */ jsx4(Divider, {}),
|
|
376
|
+
/* @__PURE__ */ jsxs3(
|
|
377
|
+
Box,
|
|
378
|
+
{
|
|
379
|
+
style: {
|
|
380
|
+
opacity: isTimeBased ? 1 : 0.45,
|
|
381
|
+
pointerEvents: isTimeBased ? "auto" : "none",
|
|
382
|
+
transition: "opacity 150ms ease"
|
|
383
|
+
},
|
|
384
|
+
children: [
|
|
385
|
+
/* @__PURE__ */ jsxs3(Group2, { gap: 6, mb: 6, children: [
|
|
386
|
+
/* @__PURE__ */ jsx4(IconClock, { size: 16 }),
|
|
387
|
+
/* @__PURE__ */ jsx4(Text2, { fw: 500, children: text.timeBasedSettings })
|
|
388
|
+
] }),
|
|
389
|
+
/* @__PURE__ */ jsxs3(Group2, { grow: true, children: [
|
|
390
|
+
/* @__PURE__ */ jsxs3(Box, { children: [
|
|
391
|
+
/* @__PURE__ */ jsx4(Text2, { size: "sm", mb: 4, children: text.lightStartTime }),
|
|
392
|
+
/* @__PURE__ */ jsx4(
|
|
393
|
+
TimeInput,
|
|
394
|
+
{
|
|
395
|
+
withSeconds: false,
|
|
396
|
+
radius: "13px",
|
|
397
|
+
value: timeBasedSettings.lightStartTime,
|
|
398
|
+
onChange: (event) => setTimeBasedSettings({
|
|
399
|
+
...timeBasedSettings,
|
|
400
|
+
lightStartTime: event.currentTarget.value
|
|
401
|
+
})
|
|
402
|
+
}
|
|
403
|
+
)
|
|
404
|
+
] }),
|
|
405
|
+
/* @__PURE__ */ jsxs3(Box, { children: [
|
|
406
|
+
/* @__PURE__ */ jsx4(Text2, { size: "sm", mb: 4, children: text.darkStartTime }),
|
|
407
|
+
/* @__PURE__ */ jsx4(
|
|
408
|
+
TimeInput,
|
|
409
|
+
{
|
|
410
|
+
withSeconds: false,
|
|
411
|
+
radius: "13px",
|
|
412
|
+
value: timeBasedSettings.darkStartTime,
|
|
413
|
+
onChange: (event) => setTimeBasedSettings({
|
|
414
|
+
...timeBasedSettings,
|
|
415
|
+
darkStartTime: event.currentTarget.value
|
|
416
|
+
})
|
|
417
|
+
}
|
|
418
|
+
)
|
|
419
|
+
] })
|
|
420
|
+
] }),
|
|
421
|
+
/* @__PURE__ */ jsxs3(Text2, { size: "xs", c: "dimmed", mt: "xs", children: [
|
|
422
|
+
text.light,
|
|
423
|
+
": ",
|
|
424
|
+
timeBasedSettings.lightStartTime,
|
|
425
|
+
" \u2192",
|
|
426
|
+
" ",
|
|
427
|
+
timeBasedSettings.darkStartTime,
|
|
428
|
+
/* @__PURE__ */ jsx4("br", {}),
|
|
429
|
+
text.dark,
|
|
430
|
+
": ",
|
|
431
|
+
timeBasedSettings.darkStartTime,
|
|
432
|
+
" \u2192",
|
|
433
|
+
" ",
|
|
434
|
+
timeBasedSettings.lightStartTime
|
|
435
|
+
] })
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
)
|
|
439
|
+
] })
|
|
440
|
+
] })
|
|
441
|
+
}
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
|
|
269
445
|
// src/modals/Information.tsx
|
|
270
446
|
import { useState as useState2 } from "react";
|
|
271
447
|
import {
|
|
272
448
|
Modal,
|
|
273
|
-
Stack as
|
|
274
|
-
Title,
|
|
275
|
-
Text as
|
|
276
|
-
Group as
|
|
277
|
-
Divider,
|
|
449
|
+
Stack as Stack3,
|
|
450
|
+
Title as Title2,
|
|
451
|
+
Text as Text3,
|
|
452
|
+
Group as Group3,
|
|
453
|
+
Divider as Divider2,
|
|
278
454
|
Badge,
|
|
279
|
-
ThemeIcon,
|
|
455
|
+
ThemeIcon as ThemeIcon2,
|
|
280
456
|
SimpleGrid,
|
|
281
457
|
Paper,
|
|
282
458
|
ActionIcon as ActionIcon3,
|
|
@@ -284,17 +460,16 @@ import {
|
|
|
284
460
|
useComputedColorScheme
|
|
285
461
|
} from "@mantine/core";
|
|
286
462
|
import {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
} from "@tabler/icons-react";
|
|
463
|
+
Award,
|
|
464
|
+
Calendar,
|
|
465
|
+
Check,
|
|
466
|
+
Copy,
|
|
467
|
+
Cpu,
|
|
468
|
+
Hash,
|
|
469
|
+
MapPin,
|
|
470
|
+
Tag,
|
|
471
|
+
User
|
|
472
|
+
} from "lucide-react";
|
|
298
473
|
|
|
299
474
|
// src/utils/commonUtils.ts
|
|
300
475
|
var copyToClipboard = async (text) => {
|
|
@@ -434,10 +609,10 @@ function formatHumanDate(date, options) {
|
|
|
434
609
|
}
|
|
435
610
|
|
|
436
611
|
// src/modals/Information.tsx
|
|
437
|
-
import { jsx as
|
|
438
|
-
var DEFAULT_TITLE = /* @__PURE__ */
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
/* @__PURE__ */
|
|
612
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
613
|
+
var DEFAULT_TITLE = /* @__PURE__ */ jsxs4(Group3, { gap: "xs", wrap: "nowrap", children: [
|
|
614
|
+
/* @__PURE__ */ jsx5(Cpu, { size: 20 }),
|
|
615
|
+
/* @__PURE__ */ jsx5("span", { children: "System Information" })
|
|
441
616
|
] });
|
|
442
617
|
function InformationContent({ info }) {
|
|
443
618
|
const colorScheme = useComputedColorScheme();
|
|
@@ -445,46 +620,46 @@ function InformationContent({ info }) {
|
|
|
445
620
|
const versionType = info.versionType ?? DEFAULT_VERSION_TYPE;
|
|
446
621
|
const cards = [
|
|
447
622
|
{
|
|
448
|
-
icon: /* @__PURE__ */
|
|
623
|
+
icon: /* @__PURE__ */ jsx5(User, { size: 18 }),
|
|
449
624
|
label: "Author",
|
|
450
625
|
value: author,
|
|
451
626
|
color: "blue"
|
|
452
627
|
},
|
|
453
628
|
{
|
|
454
|
-
icon: /* @__PURE__ */
|
|
629
|
+
icon: /* @__PURE__ */ jsx5(Award, { size: 18 }),
|
|
455
630
|
label: "License",
|
|
456
631
|
value: info.license ?? DEFAULT_LICENSE,
|
|
457
632
|
color: "orange"
|
|
458
633
|
},
|
|
459
634
|
{
|
|
460
|
-
icon: /* @__PURE__ */
|
|
635
|
+
icon: /* @__PURE__ */ jsx5(MapPin, { size: 18 }),
|
|
461
636
|
label: "Location",
|
|
462
637
|
value: info.location ?? DEFAULT_LOCATION,
|
|
463
638
|
color: "teal"
|
|
464
639
|
},
|
|
465
640
|
{
|
|
466
|
-
icon: /* @__PURE__ */
|
|
641
|
+
icon: /* @__PURE__ */ jsx5(Tag, { size: 18 }),
|
|
467
642
|
label: "Version Type",
|
|
468
643
|
value: versionType,
|
|
469
644
|
color: "red"
|
|
470
645
|
},
|
|
471
646
|
{
|
|
472
|
-
icon: /* @__PURE__ */
|
|
647
|
+
icon: /* @__PURE__ */ jsx5(Calendar, { size: 18 }),
|
|
473
648
|
label: "Build Time",
|
|
474
649
|
value: info.buildTime !== void 0 ? formatAbsoluteAndRelativeTime(info.buildTime) : UNKNOWN,
|
|
475
650
|
color: "green"
|
|
476
651
|
},
|
|
477
652
|
...info.metadata ?? []
|
|
478
653
|
];
|
|
479
|
-
return /* @__PURE__ */
|
|
480
|
-
/* @__PURE__ */
|
|
654
|
+
return /* @__PURE__ */ jsxs4(Stack3, { gap: "lg", children: [
|
|
655
|
+
/* @__PURE__ */ jsxs4(Stack3, { gap: "xs", align: "center", children: [
|
|
481
656
|
info.logo,
|
|
482
|
-
/* @__PURE__ */
|
|
483
|
-
/* @__PURE__ */
|
|
484
|
-
info.tagline && /* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ jsxs4(Stack3, { gap: 2, align: "center", children: [
|
|
658
|
+
/* @__PURE__ */ jsx5(Title2, { order: 2, children: info.name }),
|
|
659
|
+
info.tagline && /* @__PURE__ */ jsx5(Text3, { size: "sm", c: "dimmed", w: 600, ta: "center", children: info.tagline })
|
|
485
660
|
] }),
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
info.version && /* @__PURE__ */
|
|
661
|
+
/* @__PURE__ */ jsxs4(Group3, { gap: "xs", children: [
|
|
662
|
+
info.version && /* @__PURE__ */ jsxs4(
|
|
488
663
|
Badge,
|
|
489
664
|
{
|
|
490
665
|
size: "lg",
|
|
@@ -499,7 +674,7 @@ function InformationContent({ info }) {
|
|
|
499
674
|
]
|
|
500
675
|
}
|
|
501
676
|
),
|
|
502
|
-
/* @__PURE__ */
|
|
677
|
+
/* @__PURE__ */ jsxs4(
|
|
503
678
|
Badge,
|
|
504
679
|
{
|
|
505
680
|
size: "lg",
|
|
@@ -516,39 +691,39 @@ function InformationContent({ info }) {
|
|
|
516
691
|
)
|
|
517
692
|
] })
|
|
518
693
|
] }),
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
cards.map((card) => /* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ jsx5(Divider2, { label: "System Information", labelPosition: "center" }),
|
|
695
|
+
/* @__PURE__ */ jsxs4(SimpleGrid, { cols: { base: 1, sm: 2 }, children: [
|
|
696
|
+
cards.map((card) => /* @__PURE__ */ jsx5(
|
|
522
697
|
InfoCard,
|
|
523
698
|
{
|
|
524
|
-
icon: card.icon ?? /* @__PURE__ */
|
|
699
|
+
icon: card.icon ?? /* @__PURE__ */ jsx5(Award, { size: 18 }),
|
|
525
700
|
label: card.label,
|
|
526
701
|
value: card.value,
|
|
527
702
|
color: card.color ?? "gray"
|
|
528
703
|
},
|
|
529
704
|
card.label
|
|
530
705
|
)),
|
|
531
|
-
/* @__PURE__ */
|
|
706
|
+
/* @__PURE__ */ jsx5(
|
|
532
707
|
Paper,
|
|
533
708
|
{
|
|
534
709
|
withBorder: true,
|
|
535
710
|
p: "sm",
|
|
536
711
|
radius: "18px",
|
|
537
712
|
bg: colorScheme === "dark" ? "gray.9" : "gray.0",
|
|
538
|
-
children: /* @__PURE__ */
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
-
/* @__PURE__ */
|
|
542
|
-
/* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */
|
|
713
|
+
children: /* @__PURE__ */ jsxs4(Group3, { justify: "space-between", wrap: "nowrap", children: [
|
|
714
|
+
/* @__PURE__ */ jsxs4(Group3, { gap: "sm", flex: 1, children: [
|
|
715
|
+
/* @__PURE__ */ jsx5(ThemeIcon2, { variant: "light", color: "yellow", size: "lg", radius: "14px", children: /* @__PURE__ */ jsx5(Hash, { size: 18 }) }),
|
|
716
|
+
/* @__PURE__ */ jsxs4(Stack3, { gap: 2, children: [
|
|
717
|
+
/* @__PURE__ */ jsx5(Text3, { size: "xs", c: "dimmed", fw: 700, tt: "uppercase", children: "Build ID" }),
|
|
718
|
+
/* @__PURE__ */ jsx5(Text3, { size: "sm", fw: 500, truncate: true, children: info.buildId ?? UNKNOWN })
|
|
544
719
|
] })
|
|
545
720
|
] }),
|
|
546
|
-
info.buildId && /* @__PURE__ */
|
|
721
|
+
info.buildId && /* @__PURE__ */ jsx5(CopyBuildIdButton, { buildId: info.buildId })
|
|
547
722
|
] })
|
|
548
723
|
}
|
|
549
724
|
)
|
|
550
725
|
] }),
|
|
551
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ jsx5(
|
|
552
727
|
Footer,
|
|
553
728
|
{
|
|
554
729
|
copyright: info.copyright,
|
|
@@ -565,7 +740,7 @@ function InformationModal({
|
|
|
565
740
|
info,
|
|
566
741
|
title = DEFAULT_TITLE
|
|
567
742
|
}) {
|
|
568
|
-
return /* @__PURE__ */
|
|
743
|
+
return /* @__PURE__ */ jsx5(
|
|
569
744
|
Modal,
|
|
570
745
|
{
|
|
571
746
|
opened,
|
|
@@ -585,7 +760,7 @@ function InformationModal({
|
|
|
585
760
|
}
|
|
586
761
|
},
|
|
587
762
|
title,
|
|
588
|
-
children: /* @__PURE__ */
|
|
763
|
+
children: /* @__PURE__ */ jsx5(InformationContent, { info })
|
|
589
764
|
}
|
|
590
765
|
);
|
|
591
766
|
}
|
|
@@ -598,13 +773,13 @@ function CopyBuildIdButton({ buildId }) {
|
|
|
598
773
|
setTimeout(() => setCopied(false), 2e3);
|
|
599
774
|
}
|
|
600
775
|
};
|
|
601
|
-
return /* @__PURE__ */
|
|
776
|
+
return /* @__PURE__ */ jsx5(Tooltip3, { label: copied ? "Copied!" : "Copy ID", withArrow: true, children: /* @__PURE__ */ jsx5(
|
|
602
777
|
ActionIcon3,
|
|
603
778
|
{
|
|
604
779
|
variant: "subtle",
|
|
605
780
|
color: copied ? "teal" : "gray",
|
|
606
781
|
onClick: handleCopy,
|
|
607
|
-
children: copied ? /* @__PURE__ */
|
|
782
|
+
children: copied ? /* @__PURE__ */ jsx5(Check, { size: 16 }) : /* @__PURE__ */ jsx5(Copy, { size: 16 })
|
|
608
783
|
}
|
|
609
784
|
) });
|
|
610
785
|
}
|
|
@@ -615,24 +790,24 @@ function InfoCard({
|
|
|
615
790
|
color
|
|
616
791
|
}) {
|
|
617
792
|
const colorScheme = useComputedColorScheme();
|
|
618
|
-
return /* @__PURE__ */
|
|
619
|
-
/* @__PURE__ */
|
|
620
|
-
/* @__PURE__ */
|
|
621
|
-
/* @__PURE__ */
|
|
622
|
-
/* @__PURE__ */
|
|
793
|
+
return /* @__PURE__ */ jsx5(Paper, { withBorder: true, p: "md", radius: "18px", h: "100%", bg: colorScheme === "dark" ? "gray.9" : "gray.0", children: /* @__PURE__ */ jsxs4(Group3, { gap: "sm", align: "flex-start", children: [
|
|
794
|
+
/* @__PURE__ */ jsx5(ThemeIcon2, { color, variant: "light", size: "lg", radius: "14px", children: icon }),
|
|
795
|
+
/* @__PURE__ */ jsxs4(Stack3, { gap: 2, flex: 1, children: [
|
|
796
|
+
/* @__PURE__ */ jsx5(Text3, { size: "xs", c: "dimmed", fw: 700, tt: "uppercase", children: label }),
|
|
797
|
+
/* @__PURE__ */ jsx5(Text3, { size: "sm", fw: 500, lineClamp: 1, children: value })
|
|
623
798
|
] })
|
|
624
799
|
] }) });
|
|
625
800
|
}
|
|
626
801
|
|
|
627
802
|
// src/pages/NotFound.tsx
|
|
628
803
|
import {
|
|
629
|
-
Box,
|
|
804
|
+
Box as Box2,
|
|
630
805
|
Button,
|
|
631
806
|
Container,
|
|
632
|
-
Group as
|
|
807
|
+
Group as Group4,
|
|
633
808
|
Paper as Paper2,
|
|
634
|
-
Text as
|
|
635
|
-
Title as
|
|
809
|
+
Text as Text4,
|
|
810
|
+
Title as Title3,
|
|
636
811
|
Code,
|
|
637
812
|
Badge as Badge2
|
|
638
813
|
} from "@mantine/core";
|
|
@@ -642,15 +817,15 @@ import {
|
|
|
642
817
|
IconSearch,
|
|
643
818
|
IconFileOff
|
|
644
819
|
} from "@tabler/icons-react";
|
|
645
|
-
import { jsx as
|
|
820
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
646
821
|
function NotFound({
|
|
647
822
|
path,
|
|
648
823
|
onSearchClick,
|
|
649
824
|
onHomeClick
|
|
650
825
|
}) {
|
|
651
826
|
const currentPath = path || (typeof window !== "undefined" ? window.location.pathname : "/404");
|
|
652
|
-
return /* @__PURE__ */
|
|
653
|
-
|
|
827
|
+
return /* @__PURE__ */ jsx6(
|
|
828
|
+
Box2,
|
|
654
829
|
{
|
|
655
830
|
style: {
|
|
656
831
|
minHeight: "100vh",
|
|
@@ -658,9 +833,9 @@ function NotFound({
|
|
|
658
833
|
alignItems: "center",
|
|
659
834
|
background: "radial-gradient(circle at top left, rgba(34, 139, 230, 0.15), transparent 45%), radial-gradient(circle at bottom right, rgba(34, 211, 238, 0.12), transparent 45%), var(--mantine-color-body)"
|
|
660
835
|
},
|
|
661
|
-
children: /* @__PURE__ */
|
|
662
|
-
/* @__PURE__ */
|
|
663
|
-
|
|
836
|
+
children: /* @__PURE__ */ jsx6(Container, { size: "xl", py: 80, children: /* @__PURE__ */ jsxs5(Paper2, { radius: "xl", p: 48, withBorder: true, style: { borderColor: "var(--mantine-color-default-border)", textAlign: "center" }, children: [
|
|
837
|
+
/* @__PURE__ */ jsx6(
|
|
838
|
+
Box2,
|
|
664
839
|
{
|
|
665
840
|
mx: "auto",
|
|
666
841
|
mb: "xl",
|
|
@@ -674,11 +849,11 @@ function NotFound({
|
|
|
674
849
|
background: "linear-gradient(135deg, var(--mantine-color-blue-6), var(--mantine-color-cyan-6))",
|
|
675
850
|
boxShadow: "0 12px 32px rgba(34, 139, 230, 0.35)"
|
|
676
851
|
},
|
|
677
|
-
children: /* @__PURE__ */
|
|
852
|
+
children: /* @__PURE__ */ jsx6(IconFileOff, { size: 44, stroke: 1.5, color: "white" })
|
|
678
853
|
}
|
|
679
854
|
),
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
|
|
855
|
+
/* @__PURE__ */ jsx6(
|
|
856
|
+
Text4,
|
|
682
857
|
{
|
|
683
858
|
fz: { base: 72, sm: 100 },
|
|
684
859
|
fw: 900,
|
|
@@ -688,33 +863,33 @@ function NotFound({
|
|
|
688
863
|
children: "404"
|
|
689
864
|
}
|
|
690
865
|
),
|
|
691
|
-
/* @__PURE__ */
|
|
692
|
-
/* @__PURE__ */
|
|
693
|
-
/* @__PURE__ */
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ jsx6(Badge2, { variant: "light", color: "blue", size: "lg", mb: "xs", children: "NOT FOUND" }),
|
|
867
|
+
/* @__PURE__ */ jsx6(Title3, { order: 2, mt: "sm", mb: "xs", children: "Trang kh\xF4ng t\u1ED3n t\u1EA1i" }),
|
|
868
|
+
/* @__PURE__ */ jsx6(Text4, { c: "dimmed", size: "sm", maw: 440, mx: "auto", children: "Trang ho\u1EB7c \u0111\u01B0\u1EDDng d\u1EABn b\u1EA1n truy c\u1EADp kh\xF4ng t\u1ED3n t\u1EA1i ho\u1EB7c \u0111\xE3 \u0111\u01B0\u1EE3c di chuy\u1EC3n. Vui l\xF2ng ki\u1EC3m tra l\u1EA1i \u0111\u01B0\u1EDDng d\u1EABn ho\u1EB7c quay v\u1EC1 trang ch\u1EE7." }),
|
|
869
|
+
/* @__PURE__ */ jsx6(Box2, { mt: "lg", children: /* @__PURE__ */ jsx6(Code, { color: "blue", variant: "light", px: "md", py: 6, children: currentPath }) }),
|
|
870
|
+
/* @__PURE__ */ jsxs5(Group4, { gap: "sm", mt: "xl", justify: "center", children: [
|
|
871
|
+
/* @__PURE__ */ jsx6(
|
|
697
872
|
Button,
|
|
698
873
|
{
|
|
699
874
|
variant: "light",
|
|
700
|
-
leftSection: /* @__PURE__ */
|
|
875
|
+
leftSection: /* @__PURE__ */ jsx6(IconArrowLeft, { size: 16 }),
|
|
701
876
|
onClick: () => window.history.back(),
|
|
702
877
|
children: "Quay l\u1EA1i"
|
|
703
878
|
}
|
|
704
879
|
),
|
|
705
|
-
onSearchClick && /* @__PURE__ */
|
|
880
|
+
onSearchClick && /* @__PURE__ */ jsx6(
|
|
706
881
|
Button,
|
|
707
882
|
{
|
|
708
883
|
variant: "outline",
|
|
709
|
-
leftSection: /* @__PURE__ */
|
|
884
|
+
leftSection: /* @__PURE__ */ jsx6(IconSearch, { size: 16 }),
|
|
710
885
|
onClick: onSearchClick,
|
|
711
886
|
children: "T\xECm Docs"
|
|
712
887
|
}
|
|
713
888
|
),
|
|
714
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ jsx6(
|
|
715
890
|
Button,
|
|
716
891
|
{
|
|
717
|
-
leftSection: /* @__PURE__ */
|
|
892
|
+
leftSection: /* @__PURE__ */ jsx6(IconHome, { size: 16 }),
|
|
718
893
|
onClick: onHomeClick || (() => window.location.href = "/"),
|
|
719
894
|
children: "Trang ch\u1EE7"
|
|
720
895
|
}
|
|
@@ -737,6 +912,7 @@ export {
|
|
|
737
912
|
NotFound,
|
|
738
913
|
ThemeMenu,
|
|
739
914
|
ThemeProvider,
|
|
915
|
+
ThemeSetting,
|
|
740
916
|
UNKNOWN,
|
|
741
917
|
calculateRemainingTime,
|
|
742
918
|
copyToClipboard,
|