uibee 1.6.12 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/globals.css +147 -0
- package/dist/src/components/index.d.ts +6 -2
- package/dist/src/components/index.js +8 -2
- package/dist/src/components/logo/logo.d.ts +1 -0
- package/dist/src/components/logo/logo.js +7 -0
- package/dist/src/components/logo/logoSmall.d.ts +1 -0
- package/dist/src/components/logo/logoSmall.js +6 -0
- package/dist/src/components/toggle/language.d.ts +4 -0
- package/dist/src/components/toggle/language.js +29 -0
- package/dist/src/components/toggle/theme.d.ts +3 -0
- package/dist/src/components/toggle/theme.js +30 -0
- package/dist/src/scripts/rewriteAlias.js +21 -1
- package/package.json +1 -1
- package/src/components/index.ts +11 -3
- package/src/components/logo/logo.tsx +41 -0
- package/src/components/logo/logoSmall.tsx +19 -0
- package/src/components/toggle/language.tsx +45 -0
- package/src/components/toggle/theme.tsx +150 -0
- package/src/globals.css +10 -0
- package/src/scripts/rewriteAlias.ts +25 -1
- package/src/types/components.d.ts +4 -0
- package/tsconfig.json +9 -0
package/dist/globals.css
CHANGED
|
@@ -14,15 +14,23 @@
|
|
|
14
14
|
--color-yellow-300: oklch(90.5% 0.182 98.111);
|
|
15
15
|
--color-green-300: oklch(87.1% 0.15 154.449);
|
|
16
16
|
--color-blue-300: oklch(80.9% 0.105 251.813);
|
|
17
|
+
--color-gray-400: oklch(70.7% 0.022 261.325);
|
|
18
|
+
--color-black: #000;
|
|
19
|
+
--color-white: #fff;
|
|
17
20
|
--spacing: 0.25rem;
|
|
18
21
|
--container-3xs: 16rem;
|
|
19
22
|
--container-xs: 20rem;
|
|
20
23
|
--container-sm: 24rem;
|
|
21
24
|
--container-md: 28rem;
|
|
25
|
+
--container-2xl: 42rem;
|
|
22
26
|
--text-sm: 0.875rem;
|
|
23
27
|
--text-sm--line-height: calc(1.25 / 0.875);
|
|
28
|
+
--text-base: 1rem;
|
|
29
|
+
--text-base--line-height: calc(1.5 / 1);
|
|
24
30
|
--text-lg: 1.125rem;
|
|
25
31
|
--text-lg--line-height: calc(1.75 / 1.125);
|
|
32
|
+
--text-xl: 1.25rem;
|
|
33
|
+
--text-xl--line-height: calc(1.75 / 1.25);
|
|
26
34
|
--text-3xl: 1.875rem;
|
|
27
35
|
--text-3xl--line-height: calc(2.25 / 1.875);
|
|
28
36
|
--font-weight-medium: 500;
|
|
@@ -42,6 +50,7 @@
|
|
|
42
50
|
--color-login-800: #181818;
|
|
43
51
|
--color-login-700: #1a1a1a;
|
|
44
52
|
--color-login-600: #212121;
|
|
53
|
+
--color-login-300: #5e5e5e;
|
|
45
54
|
--color-login-200: #727272;
|
|
46
55
|
--color-login-100: #b0b0b0;
|
|
47
56
|
--color-login-50: #ededed;
|
|
@@ -258,6 +267,12 @@
|
|
|
258
267
|
.z-50 {
|
|
259
268
|
z-index: 50;
|
|
260
269
|
}
|
|
270
|
+
.mx-auto {
|
|
271
|
+
margin-inline: auto;
|
|
272
|
+
}
|
|
273
|
+
.-mt-0\.5 {
|
|
274
|
+
margin-top: calc(var(--spacing) * -0.5);
|
|
275
|
+
}
|
|
261
276
|
.mt-2 {
|
|
262
277
|
margin-top: calc(var(--spacing) * 2);
|
|
263
278
|
}
|
|
@@ -282,6 +297,9 @@
|
|
|
282
297
|
.flex {
|
|
283
298
|
display: flex;
|
|
284
299
|
}
|
|
300
|
+
.grid {
|
|
301
|
+
display: grid;
|
|
302
|
+
}
|
|
285
303
|
.hidden {
|
|
286
304
|
display: none;
|
|
287
305
|
}
|
|
@@ -300,6 +318,9 @@
|
|
|
300
318
|
.h-10 {
|
|
301
319
|
height: calc(var(--spacing) * 10);
|
|
302
320
|
}
|
|
321
|
+
.h-12 {
|
|
322
|
+
height: calc(var(--spacing) * 12);
|
|
323
|
+
}
|
|
303
324
|
.h-full {
|
|
304
325
|
height: 100%;
|
|
305
326
|
}
|
|
@@ -315,6 +336,9 @@
|
|
|
315
336
|
.w-10 {
|
|
316
337
|
width: calc(var(--spacing) * 10);
|
|
317
338
|
}
|
|
339
|
+
.w-\[4\.3rem\] {
|
|
340
|
+
width: 4.3rem;
|
|
341
|
+
}
|
|
318
342
|
.w-\[calc\(100\%-10px\)\] {
|
|
319
343
|
width: calc(100% - 10px);
|
|
320
344
|
}
|
|
@@ -330,6 +354,9 @@
|
|
|
330
354
|
.w-sm {
|
|
331
355
|
width: var(--container-sm);
|
|
332
356
|
}
|
|
357
|
+
.max-w-2xl {
|
|
358
|
+
max-width: var(--container-2xl);
|
|
359
|
+
}
|
|
333
360
|
.max-w-3xs {
|
|
334
361
|
max-width: var(--container-3xs);
|
|
335
362
|
}
|
|
@@ -351,14 +378,25 @@
|
|
|
351
378
|
.origin-\[0\] {
|
|
352
379
|
transform-origin: 0;
|
|
353
380
|
}
|
|
381
|
+
.origin-center {
|
|
382
|
+
transform-origin: center;
|
|
383
|
+
}
|
|
354
384
|
.translate-x-4 {
|
|
355
385
|
--tw-translate-x: calc(var(--spacing) * 4);
|
|
356
386
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
357
387
|
}
|
|
388
|
+
.translate-x-8 {
|
|
389
|
+
--tw-translate-x: calc(var(--spacing) * 8);
|
|
390
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
391
|
+
}
|
|
358
392
|
.-translate-y-1\/2 {
|
|
359
393
|
--tw-translate-y: calc(calc(1/2 * 100%) * -1);
|
|
360
394
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
361
395
|
}
|
|
396
|
+
.-translate-y-4 {
|
|
397
|
+
--tw-translate-y: calc(var(--spacing) * -4);
|
|
398
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
399
|
+
}
|
|
362
400
|
.-translate-y-5 {
|
|
363
401
|
--tw-translate-y: calc(var(--spacing) * -5);
|
|
364
402
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
@@ -375,9 +413,15 @@
|
|
|
375
413
|
--tw-scale-z: 100%;
|
|
376
414
|
scale: var(--tw-scale-x) var(--tw-scale-y);
|
|
377
415
|
}
|
|
416
|
+
.scale-\[1\.9\] {
|
|
417
|
+
scale: 1.9;
|
|
418
|
+
}
|
|
378
419
|
.transform {
|
|
379
420
|
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
|
380
421
|
}
|
|
422
|
+
.animate-jump {
|
|
423
|
+
animation: jump 0.4s 1;
|
|
424
|
+
}
|
|
381
425
|
.cursor-pointer {
|
|
382
426
|
cursor: pointer;
|
|
383
427
|
}
|
|
@@ -390,9 +434,15 @@
|
|
|
390
434
|
.flex-col-reverse {
|
|
391
435
|
flex-direction: column-reverse;
|
|
392
436
|
}
|
|
437
|
+
.flex-row {
|
|
438
|
+
flex-direction: row;
|
|
439
|
+
}
|
|
393
440
|
.flex-wrap {
|
|
394
441
|
flex-wrap: wrap;
|
|
395
442
|
}
|
|
443
|
+
.place-items-center {
|
|
444
|
+
place-items: center;
|
|
445
|
+
}
|
|
396
446
|
.items-center {
|
|
397
447
|
align-items: center;
|
|
398
448
|
}
|
|
@@ -402,6 +452,9 @@
|
|
|
402
452
|
.justify-center {
|
|
403
453
|
justify-content: center;
|
|
404
454
|
}
|
|
455
|
+
.justify-end {
|
|
456
|
+
justify-content: flex-end;
|
|
457
|
+
}
|
|
405
458
|
.gap-0\.5 {
|
|
406
459
|
gap: calc(var(--spacing) * 0.5);
|
|
407
460
|
}
|
|
@@ -448,6 +501,10 @@
|
|
|
448
501
|
border-style: var(--tw-border-style);
|
|
449
502
|
border-width: 0.10rem;
|
|
450
503
|
}
|
|
504
|
+
.border-none {
|
|
505
|
+
--tw-border-style: none;
|
|
506
|
+
border-style: none;
|
|
507
|
+
}
|
|
451
508
|
.border-login-200 {
|
|
452
509
|
border-color: var(--color-login-200);
|
|
453
510
|
}
|
|
@@ -475,9 +532,30 @@
|
|
|
475
532
|
.bg-transparent {
|
|
476
533
|
background-color: transparent;
|
|
477
534
|
}
|
|
535
|
+
.fill-\[var\(--foreground\)\] {
|
|
536
|
+
fill: var(--foreground);
|
|
537
|
+
}
|
|
538
|
+
.fill-black {
|
|
539
|
+
fill: var(--color-black);
|
|
540
|
+
}
|
|
541
|
+
.fill-login {
|
|
542
|
+
fill: var(--color-login);
|
|
543
|
+
}
|
|
544
|
+
.fill-none {
|
|
545
|
+
fill: none;
|
|
546
|
+
}
|
|
547
|
+
.fill-white {
|
|
548
|
+
fill: var(--color-white);
|
|
549
|
+
}
|
|
550
|
+
.stroke-\[var\(--color-login\)\] {
|
|
551
|
+
stroke: var(--color-login);
|
|
552
|
+
}
|
|
478
553
|
.stroke-3 {
|
|
479
554
|
stroke-width: 3;
|
|
480
555
|
}
|
|
556
|
+
.stroke-\[3\.5px\] {
|
|
557
|
+
stroke-width: 3.5px;
|
|
558
|
+
}
|
|
481
559
|
.object-contain {
|
|
482
560
|
object-fit: contain;
|
|
483
561
|
}
|
|
@@ -487,6 +565,9 @@
|
|
|
487
565
|
.p-2 {
|
|
488
566
|
padding: calc(var(--spacing) * 2);
|
|
489
567
|
}
|
|
568
|
+
.p-3 {
|
|
569
|
+
padding: calc(var(--spacing) * 3);
|
|
570
|
+
}
|
|
490
571
|
.p-8 {
|
|
491
572
|
padding: calc(var(--spacing) * 8);
|
|
492
573
|
}
|
|
@@ -548,6 +629,10 @@
|
|
|
548
629
|
font-size: var(--text-3xl);
|
|
549
630
|
line-height: var(--tw-leading, var(--text-3xl--line-height));
|
|
550
631
|
}
|
|
632
|
+
.text-base {
|
|
633
|
+
font-size: var(--text-base);
|
|
634
|
+
line-height: var(--tw-leading, var(--text-base--line-height));
|
|
635
|
+
}
|
|
551
636
|
.text-lg {
|
|
552
637
|
font-size: var(--text-lg);
|
|
553
638
|
line-height: var(--tw-leading, var(--text-lg--line-height));
|
|
@@ -556,6 +641,14 @@
|
|
|
556
641
|
font-size: var(--text-sm);
|
|
557
642
|
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
558
643
|
}
|
|
644
|
+
.text-xl {
|
|
645
|
+
font-size: var(--text-xl);
|
|
646
|
+
line-height: var(--tw-leading, var(--text-xl--line-height));
|
|
647
|
+
}
|
|
648
|
+
.leading-8 {
|
|
649
|
+
--tw-leading: calc(var(--spacing) * 8);
|
|
650
|
+
line-height: calc(var(--spacing) * 8);
|
|
651
|
+
}
|
|
559
652
|
.font-bold {
|
|
560
653
|
--tw-font-weight: var(--font-weight-bold);
|
|
561
654
|
font-weight: var(--font-weight-bold);
|
|
@@ -614,6 +707,12 @@
|
|
|
614
707
|
color: color-mix(in oklab, var(--color-yellow-300) 70%, transparent);
|
|
615
708
|
}
|
|
616
709
|
}
|
|
710
|
+
.opacity-0 {
|
|
711
|
+
opacity: 0%;
|
|
712
|
+
}
|
|
713
|
+
.opacity-100 {
|
|
714
|
+
opacity: 100%;
|
|
715
|
+
}
|
|
617
716
|
.shadow-md {
|
|
618
717
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
619
718
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -628,6 +727,16 @@
|
|
|
628
727
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
629
728
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
630
729
|
}
|
|
730
|
+
.transition-opacity {
|
|
731
|
+
transition-property: opacity;
|
|
732
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
733
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
734
|
+
}
|
|
735
|
+
.transition-transform {
|
|
736
|
+
transition-property: transform, translate, scale, rotate;
|
|
737
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
738
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
739
|
+
}
|
|
631
740
|
.duration-200 {
|
|
632
741
|
--tw-duration: 200ms;
|
|
633
742
|
transition-duration: 200ms;
|
|
@@ -636,6 +745,14 @@
|
|
|
636
745
|
--tw-duration: 300ms;
|
|
637
746
|
transition-duration: 300ms;
|
|
638
747
|
}
|
|
748
|
+
.duration-400 {
|
|
749
|
+
--tw-duration: 400ms;
|
|
750
|
+
transition-duration: 400ms;
|
|
751
|
+
}
|
|
752
|
+
.duration-1000 {
|
|
753
|
+
--tw-duration: 1000ms;
|
|
754
|
+
transition-duration: 1000ms;
|
|
755
|
+
}
|
|
639
756
|
.outline-none {
|
|
640
757
|
--tw-outline-style: none;
|
|
641
758
|
outline-style: none;
|
|
@@ -690,6 +807,26 @@
|
|
|
690
807
|
content: var(--tw-content);
|
|
691
808
|
}
|
|
692
809
|
}
|
|
810
|
+
.hover\:bg-gray-400\/10 {
|
|
811
|
+
&:hover {
|
|
812
|
+
@media (hover: hover) {
|
|
813
|
+
background-color: color-mix(in srgb, oklch(70.7% 0.022 261.325) 10%, transparent);
|
|
814
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
815
|
+
background-color: color-mix(in oklab, var(--color-gray-400) 10%, transparent);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
.hover\:bg-login-300\/20 {
|
|
821
|
+
&:hover {
|
|
822
|
+
@media (hover: hover) {
|
|
823
|
+
background-color: color-mix(in srgb, #5e5e5e 20%, transparent);
|
|
824
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
825
|
+
background-color: color-mix(in oklab, var(--color-login-300) 20%, transparent);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
693
830
|
.hover\:bg-login-600 {
|
|
694
831
|
&:hover {
|
|
695
832
|
@media (hover: hover) {
|
|
@@ -783,6 +920,11 @@ body {
|
|
|
783
920
|
background: var(--background);
|
|
784
921
|
font-family: Arial, Helvetica, sans-serif;
|
|
785
922
|
}
|
|
923
|
+
@keyframes jump {
|
|
924
|
+
40% {
|
|
925
|
+
transform: translateY(-0.3rem);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
786
928
|
@property --tw-translate-x {
|
|
787
929
|
syntax: "*";
|
|
788
930
|
inherits: false;
|
|
@@ -838,6 +980,10 @@ body {
|
|
|
838
980
|
inherits: false;
|
|
839
981
|
initial-value: solid;
|
|
840
982
|
}
|
|
983
|
+
@property --tw-leading {
|
|
984
|
+
syntax: "*";
|
|
985
|
+
inherits: false;
|
|
986
|
+
}
|
|
841
987
|
@property --tw-font-weight {
|
|
842
988
|
syntax: "*";
|
|
843
989
|
inherits: false;
|
|
@@ -935,6 +1081,7 @@ body {
|
|
|
935
1081
|
--tw-skew-x: initial;
|
|
936
1082
|
--tw-skew-y: initial;
|
|
937
1083
|
--tw-border-style: solid;
|
|
1084
|
+
--tw-leading: initial;
|
|
938
1085
|
--tw-font-weight: initial;
|
|
939
1086
|
--tw-tracking: initial;
|
|
940
1087
|
--tw-shadow: 0 0 #0000;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
export { default as LoginPage } from './login/loginPage';
|
|
2
|
-
export { default as Toaster, addToast } from './toast/toaster';
|
|
3
1
|
export { default as Input } from './inputs/input';
|
|
4
2
|
export { default as SwitchInput } from './inputs/switch';
|
|
5
3
|
export { default as TagInput } from './inputs/tag';
|
|
4
|
+
export { default as Logo } from './logo/logo';
|
|
5
|
+
export { default as LogoSmall } from './logo/logoSmall';
|
|
6
|
+
export { default as ThemeToggle } from './toggle/theme';
|
|
7
|
+
export { default as LanguageToggle } from './toggle/language';
|
|
8
|
+
export { default as LoginPage } from './login/loginPage';
|
|
9
|
+
export { default as Toaster, addToast } from './toast/toaster';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
export { default as LoginPage } from './login/loginPage';
|
|
2
|
-
export { default as Toaster, addToast } from './toast/toaster';
|
|
3
1
|
// Input components
|
|
4
2
|
export { default as Input } from './inputs/input';
|
|
5
3
|
export { default as SwitchInput } from './inputs/switch';
|
|
6
4
|
export { default as TagInput } from './inputs/tag';
|
|
5
|
+
// Logos
|
|
6
|
+
export { default as Logo } from './logo/logo';
|
|
7
|
+
export { default as LogoSmall } from './logo/logoSmall';
|
|
8
|
+
// Toggles
|
|
9
|
+
export { default as ThemeToggle } from './toggle/theme';
|
|
10
|
+
export { default as LanguageToggle } from './toggle/language';
|
|
11
|
+
export { default as LoginPage } from './login/loginPage';
|
|
12
|
+
export { default as Toaster, addToast } from './toast/toaster';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Logo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable @stylistic/max-len */
|
|
3
|
+
export default function Logo() {
|
|
4
|
+
const corner = 'fill-[var(--foreground)] transition-all duration-1000';
|
|
5
|
+
const letter = 'fill-none stroke-[var(--color-login)] stroke-[3.5px]';
|
|
6
|
+
return (_jsxs("svg", { className: 'block w-full max-w-2xl mx-auto', viewBox: '0 0 147.02299 59.20511', children: [_jsx("path", { className: corner, d: 'm 28.77713,58.37738 v 0.76465 H 25.531 v -5.61816 h 0.91309 v 4.85351 z' }), _jsx("path", { className: corner, d: 'm 30.47831,59.142 h -0.917 v -5.61813 h 0.917 z' }), _jsx("path", { className: corner, d: 'M 36.46268,53.52387 V 59.142 H 35.99881 A 0.36347,0.36347 0 0 1 35.6785,58.98185 L 32.59256,55.018 c 0.0078,0.07617 0.01368,0.15039 0.01758,0.22461 0.0039,0.07422 0.0059,0.14258 0.0059,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.09864,0.0059 0.3128,0.3128 0 0 1 0.07617,0.02148 0.22919,0.22919 0 0 1 0.0664,0.04688 0.63781,0.63781 0 0 1 0.06641,0.07812 l 3.08984,3.96779 c -0.0078,-0.08105 -0.01367,-0.16015 -0.01757,-0.23828 -0.0039,-0.07813 -0.0059,-0.15039 -0.0059,-0.21875 v -3.6631 z' }), _jsx("path", { className: corner, d: 'm 39.84549,57.1684 a 2.91264,2.91264 0 0 1 -0.11523,0.84765 1.748,1.748 0 0 1 -0.34375,0.64063 1.52483,1.52483 0 0 1 -0.56543,0.40527 2.00691,2.00691 0 0 1 -0.78223,0.14258 3.23707,3.23707 0 0 1 -0.40234,-0.0254 3.44454,3.44454 0 0 1 -0.41309,-0.0801 l 0.04688,-0.5459 a 0.2079,0.2079 0 0 1 0.06055,-0.125 0.19754,0.19754 0 0 1 0.14257,-0.0469 0.74035,0.74035 0 0 1 0.18067,0.0293 1.36468,1.36468 0 0 0 0.71387,-0.041 0.74722,0.74722 0 0 0 0.3125,-0.2207 0.9864,0.9864 0 0 0 0.1914,-0.38574 2.19551,2.19551 0 0 0 0.06445,-0.57227 v -3.667 h 0.90918 z' }), _jsx("path", { className: corner, d: 'm 44.6326,58.40473 -0.0039,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z' }), _jsx("path", { className: corner, d: 'M 46.53592,54.26117 V 56.06 h 2.19629 v 0.7373 h -2.19629 v 2.3447 h -0.917 v -5.61813 h 3.50391 v 0.7373 z' }), _jsx("path", { className: corner, d: 'm 55.25956,56.33344 a 3.18179,3.18179 0 0 1 -0.20215,1.15039 2.6634,2.6634 0 0 1 -0.57227,0.90722 2.59685,2.59685 0 0 1 -0.88476,0.59473 3.17156,3.17156 0 0 1 -2.29492,0 2.62415,2.62415 0 0 1 -0.88672,-0.59473 2.65327,2.65327 0 0 1 -0.57422,-0.90722 3.37717,3.37717 0 0 1 0,-2.30176 2.67118,2.67118 0 0 1 0.57422,-0.90918 2.61491,2.61491 0 0 1 0.88672,-0.59668 3.1717,3.1717 0 0 1 2.29492,0 2.58781,2.58781 0 0 1 0.88476,0.59668 2.68144,2.68144 0 0 1 0.57227,0.90918 3.1871,3.1871 0 0 1 0.20215,1.15137 z m -0.93164,0 a 2.706,2.706 0 0 0 -0.13086,-0.87012 1.821,1.821 0 0 0 -0.375,-0.65527 1.63008,1.63008 0 0 0 -0.59082,-0.41407 2.16795,2.16795 0 0 0 -1.55664,0 1.65415,1.65415 0 0 0 -0.59278,0.41407 1.84212,1.84212 0 0 0 -0.3789,0.65527 2.92611,2.92611 0 0 0 0,1.74316 1.83766,1.83766 0 0 0 0.3789,0.6543 1.64222,1.64222 0 0 0 0.59278,0.40918 2.19564,2.19564 0 0 0 1.55664,0 1.61838,1.61838 0 0 0 0.59082,-0.40918 1.81652,1.81652 0 0 0 0.375,-0.6543 2.71589,2.71589 0 0 0 0.13086,-0.87304 z' }), _jsx("path", { className: corner, d: 'm 60.534,59.142 h -0.81543 a 0.377,0.377 0 0 1 -0.35156,-0.1875 l -1.31055,-1.8916 a 0.4267,0.4267 0 0 0 -0.14453,-0.14063 0.50286,0.50286 0 0 0 -0.23437,-0.043 H 57.17072 V 59.142 H 56.2576 v -5.61813 h 1.6543 a 3.54427,3.54427 0 0 1 0.9541,0.11328 1.80649,1.80649 0 0 1 0.65723,0.32226 1.25606,1.25606 0 0 1 0.37988,0.501 1.76427,1.76427 0 0 1 0.03516,1.19727 1.50418,1.50418 0 0 1 -0.25293,0.46093 1.61283,1.61283 0 0 1 -0.40821,0.3584 2.04861,2.04861 0 0 1 -0.5498,0.23828 0.92346,0.92346 0 0 1 0.28906,0.28516 z m -2.64551,-2.92578 a 1.763,1.763 0 0 0 0.5459,-0.07617 1.11007,1.11007 0 0 0 0.39063,-0.21289 0.87892,0.87892 0 0 0 0.23437,-0.3252 1.10093,1.10093 0 0 0 0.07715,-0.41992 0.84276,0.84276 0 0 0 -0.30371,-0.70215 1.46527,1.46527 0 0 0 -0.9209,-0.24219 h -0.74121 v 1.97852 z' }), _jsx("path", { className: corner, d: 'm 64.72049,58.40473 -0.0039,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z' }), _jsx("path", { className: corner, d: 'M 70.35721,53.52387 V 59.142 H 69.89335 A 0.36347,0.36347 0 0 1 69.57303,58.98185 L 66.4871,55.018 c 0.0078,0.07617 0.01367,0.15039 0.01757,0.22461 0.0039,0.07422 0.0059,0.14258 0.0059,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.09864,0.0059 0.3128,0.3128 0 0 1 0.07617,0.02148 0.22936,0.22936 0 0 1 0.06641,0.04688 0.63869,0.63869 0 0 1 0.0664,0.07812 l 3.08985,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z' }), _jsx("path", { className: corner, d: 'm 72.6121,59.142 h -0.917 v -5.61813 h 0.917 z' }), _jsx("path", { className: corner, d: 'M 78.59794,53.52387 V 59.142 H 78.13358 A 0.36344,0.36344 0 0 1 77.81327,58.98185 L 74.72733,55.018 c 0.008,0.07617 0.0137,0.15039 0.0176,0.22461 0.004,0.07422 0.006,0.14258 0.006,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.713,0.713 0 0 1 0.0986,0.0059 0.31254,0.31254 0 0 1 0.0762,0.02148 0.22936,0.22936 0 0 1 0.0664,0.04688 0.63869,0.63869 0 0 1 0.0664,0.07812 l 3.08984,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z' }), _jsx("path", { className: corner, d: 'M 84.53544,56.37641 V 58.6 a 3.24425,3.24425 0 0 1 -1.9502,0.60449 3.419,3.419 0 0 1 -1.23535,-0.21289 2.7275,2.7275 0 0 1 -0.94141,-0.59277 2.59231,2.59231 0 0 1 -0.60156,-0.90723 3.08634,3.08634 0 0 1 -0.21,-1.1582 3.23536,3.23536 0 0 1 0.20215,-1.165 2.5484,2.5484 0 0 1 1.49414,-1.498 3.29189,3.29189 0 0 1 1.20215,-0.209 3.52605,3.52605 0 0 1 0.62988,0.05273 3.11559,3.11559 0 0 1 0.54,0.14649 2.535,2.535 0 0 1 0.84668,0.52246 l -0.26074,0.418 a 0.26545,0.26545 0 0 1 -0.16016,0.12109 0.27377,0.27377 0 0 1 -0.21094,-0.04688 c -0.0752,-0.04492 -0.15527,-0.09082 -0.24023,-0.14062 a 2.01137,2.01137 0 0 0 -0.29,-0.13867 2.127,2.127 0 0 0 -0.37891,-0.10547 2.72656,2.72656 0 0 0 -0.50683,-0.041 2.09434,2.09434 0 0 0 -0.80176,0.14649 1.70173,1.70173 0 0 0 -0.61035,0.418 1.84692,1.84692 0 0 0 -0.39063,0.65722 2.5766,2.5766 0 0 0 -0.13672,0.86231 2.62333,2.62333 0 0 0 0.14453,0.89844 1.88731,1.88731 0 0 0 0.41016,0.67187 1.74772,1.74772 0 0 0 0.6416,0.419 2.55647,2.55647 0 0 0 1.459,0.0703 2.80344,2.80344 0 0 0 0.53222,-0.207 V 57.07074 H 82.928 a 0.19287,0.19287 0 0 1 -0.13964,-0.04883 0.16848,0.16848 0 0 1 -0.0508,-0.12695 v -0.51855 z' }), _jsx("path", { className: corner, d: 'm 89.1243,58.40473 -0.004,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z' }), _jsx("path", { className: corner, d: 'M 94.761,53.52387 V 59.142 H 94.29713 A 0.36347,0.36347 0 0 1 93.97682,58.98185 L 90.8909,55.018 c 0.008,0.07617 0.0137,0.15039 0.0176,0.22461 0.004,0.07422 0.006,0.14258 0.006,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.0986,0.0059 0.3128,0.3128 0 0 1 0.0762,0.02148 0.22919,0.22919 0 0 1 0.0664,0.04688 0.63781,0.63781 0 0 1 0.0664,0.07812 l 3.08984,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z' }), _jsx("path", { className: corner, d: 'M 98.95829,54.26117 V 56.06 h 2.19629 v 0.7373 h -2.19629 v 2.3447 h -0.917 v -5.61813 h 3.5039 v 0.7373 z' }), _jsx("path", { className: corner, d: 'm 107.68192,56.33344 a 3.18158,3.18158 0 0 1 -0.20215,1.15039 2.66353,2.66353 0 0 1 -0.57226,0.90722 2.597,2.597 0 0 1 -0.88477,0.59473 3.17156,3.17156 0 0 1 -2.29492,0 2.62415,2.62415 0 0 1 -0.88672,-0.59473 2.65327,2.65327 0 0 1 -0.57422,-0.90722 3.37717,3.37717 0 0 1 0,-2.30176 2.67118,2.67118 0 0 1 0.57422,-0.90918 2.61491,2.61491 0 0 1 0.88672,-0.59668 3.1717,3.1717 0 0 1 2.29492,0 2.588,2.588 0 0 1 0.88477,0.59668 2.68157,2.68157 0 0 1 0.57226,0.90918 3.18689,3.18689 0 0 1 0.20215,1.15137 z m -0.93164,0 a 2.706,2.706 0 0 0 -0.13086,-0.87012 1.82066,1.82066 0 0 0 -0.375,-0.65527 1.63,1.63 0 0 0 -0.59082,-0.41407 2.16795,2.16795 0 0 0 -1.55664,0 1.65411,1.65411 0 0 0 -0.59277,0.41407 1.84214,1.84214 0 0 0 -0.37891,0.65527 2.92632,2.92632 0 0 0 0,1.74316 1.83768,1.83768 0 0 0 0.37891,0.6543 1.64218,1.64218 0 0 0 0.59277,0.40918 2.19564,2.19564 0 0 0 1.55664,0 1.61829,1.61829 0 0 0 0.59082,-0.40918 1.81623,1.81623 0 0 0 0.375,-0.6543 2.71589,2.71589 0 0 0 0.13086,-0.87304 z' }), _jsx("path", { className: corner, d: 'm 112.95731,59.142 h -0.81543 a 0.377,0.377 0 0 1 -0.35156,-0.1875 l -1.31055,-1.8916 a 0.4267,0.4267 0 0 0 -0.14453,-0.14063 0.50286,0.50286 0 0 0 -0.23437,-0.043 H 109.594 V 59.142 h -0.91309 v -5.61813 h 1.6543 a 3.54427,3.54427 0 0 1 0.9541,0.11328 1.80649,1.80649 0 0 1 0.65723,0.32226 1.25606,1.25606 0 0 1 0.37988,0.501 1.76427,1.76427 0 0 1 0.0352,1.19727 1.50418,1.50418 0 0 1 -0.25293,0.46093 1.61283,1.61283 0 0 1 -0.40821,0.3584 2.04861,2.04861 0 0 1 -0.5498,0.23828 0.92346,0.92346 0 0 1 0.28906,0.28516 z m -2.64551,-2.92578 a 1.763,1.763 0 0 0 0.5459,-0.07617 1.11007,1.11007 0 0 0 0.39063,-0.21289 0.87892,0.87892 0 0 0 0.23437,-0.3252 1.10093,1.10093 0 0 0 0.0772,-0.41992 0.84276,0.84276 0 0 0 -0.30371,-0.70215 1.46527,1.46527 0 0 0 -0.9209,-0.24219 H 109.594 v 1.97852 z' }), _jsx("path", { className: corner, d: 'm 116.4954,59.142 h -0.917 v -5.61813 h 0.917 z' }), _jsx("path", { className: corner, d: 'm 121.69559,54.28461 h -1.75195 V 59.142 h -0.9082 v -4.85739 h -1.75586 v -0.76074 h 4.416 z' }), _jsx("polyline", { className: letter, style: { strokeMiterlimit: 10 }, points: '47.871 98.1 33.189 98.1 33.189 83.418', transform: 'translate(-31.392,-41.894)' }), _jsx("polyline", { className: letter, style: { strokeMiterlimit: 10 }, points: '33.142 58.326 33.142 43.644 47.824 43.644', transform: 'translate(-31.392,-41.894)' }), _jsx("polyline", { className: letter, style: { strokeMiterlimit: 10 }, points: '161.983 98.122 176.665 98.122 176.665 83.44', transform: 'translate(-31.392,-41.894)' }), _jsx("polyline", { className: letter, style: { strokeMiterlimit: 10 }, points: '176.665 58.372 176.665 43.69 161.983 43.69', transform: 'translate(-31.392,-41.894)' }), _jsx("path", { className: corner, d: 'm 30.02449,40.19351 v 4.12842 H 12.4991 V 13.99038 h 4.92871 v 26.20313 z' }), _jsx("path", { className: corner, d: 'm 61.53523,29.1564 a 17.15942,17.15942 0 0 1 -1.09473,6.21338 14.35971,14.35971 0 0 1 -3.08593,4.89746 14.091,14.091 0 0 1 -4.78125,3.21191 17.1289,17.1289 0 0 1 -12.38575,0 13.98317,13.98317 0 0 1 -7.88867,-8.10937 18.18161,18.18161 0 0 1 0,-12.42725 14.39119,14.39119 0 0 1 3.09668,-4.90771 14.13157,14.13157 0 0 1 4.792,-3.22315 17.13565,17.13565 0 0 1 12.38575,0 14.02046,14.02046 0 0 1 4.78125,3.22315 14.47032,14.47032 0 0 1 3.08593,4.90771 17.16209,17.16209 0 0 1 1.09472,6.21387 z m -5.03418,0 a 14.62587,14.62587 0 0 0 -0.70508,-4.69727 9.9446,9.9446 0 0 0 -2.02246,-3.53906 8.80545,8.80545 0 0 0 -3.1914,-2.23242 11.719,11.719 0 0 0 -8.4043,0 8.90077,8.90077 0 0 0 -3.20117,2.23242 9.96735,9.96735 0 0 0 -2.043,3.53906 15.81644,15.81644 0 0 0 0,9.415 9.847,9.847 0 0 0 2.043,3.52832 8.85094,8.85094 0 0 0 3.20117,2.21192 11.87213,11.87213 0 0 0 8.4043,0 8.75623,8.75623 0 0 0 3.1914,-2.21192 9.82454,9.82454 0 0 0 2.02249,-3.52828 14.69371,14.69371 0 0 0 0.70505,-4.71777 z' }), _jsx("path", { className: corner, d: 'm 91.76082,29.38784 v 12.00635 a 17.5354,17.5354 0 0 1 -10.53125,3.26465 18.41512,18.41512 0 0 1 -6.667,-1.148 14.80254,14.80254 0 0 1 -5.08691,-3.20166 14.0148,14.0148 0 0 1 -3.24316,-4.897 16.691,16.691 0 0 1 -1.1377,-6.25586 17.42935,17.42935 0 0 1 1.09473,-6.2876 13.74023,13.74023 0 0 1 8.06738,-8.08838 17.7222,17.7222 0 0 1 6.48828,-1.127 19.10354,19.10354 0 0 1 3.40137,0.28418 16.85244,16.85244 0 0 1 2.917,0.79 13.68442,13.68442 0 0 1 2.48633,1.22168 13.95372,13.95372 0 0 1 2.085,1.60058 l -1.41113,2.25391 a 1.40229,1.40229 0 0 1 -0.86426,0.65283 1.47784,1.47784 0 0 1 -1.13672,-0.25244 q -0.6123,-0.35816 -1.2959,-0.7583 a 11.33129,11.33129 0 0 0 -1.56933,-0.748 11.53387,11.53387 0 0 0 -2.043,-0.56836 14.78335,14.78335 0 0 0 -2.73828,-0.22119 11.32128,11.32128 0 0 0 -4.32813,0.78955 9.26752,9.26752 0 0 0 -3.29687,2.25391 9.99164,9.99164 0 0 0 -2.10645,3.54931 13.90267,13.90267 0 0 0 -0.7373,4.65528 14.11731,14.11731 0 0 0 0.77929,4.855 10.1425,10.1425 0 0 0 2.21192,3.62305 9.43419,9.43419 0 0 0 3.46484,2.26416 13.81975,13.81975 0 0 0 7.87793,0.3789 15.14816,15.14816 0 0 0 2.875,-1.11621 v -6.02383 h -4.2334 a 1.04883,1.04883 0 0 1 -0.75879,-0.26367 0.90553,0.90553 0 0 1 -0.27343,-0.68457 v -2.80127 z' }), _jsx("path", { className: corner, d: 'M 102.546,44.32193 H 97.59581 V 13.99038 h 4.95019 z' }), _jsx("path", { className: corner, d: 'm 134.8575,13.99038 v 30.33155 h -2.50684 a 2.14219,2.14219 0 0 1 -0.96875,-0.2002 2.26108,2.26108 0 0 1 -0.75879,-0.66357 L 113.962,22.05777 q 0.063,0.61083 0.0947,1.21093 0.0322,0.60058 0.0322,1.106 v 19.94723 h -4.3398 V 13.99038 h 2.57031 a 3.89092,3.89092 0 0 1 0.53711,0.03174 1.53328,1.53328 0 0 1 0.41016,0.11572 1.18964,1.18964 0 0 1 0.35839,0.25293 4.01792,4.01792 0 0 1 0.3584,0.4209 l 16.68164,21.42188 q -0.063,-0.65259 -0.0947,-1.28467 -0.0308,-0.63208 -0.0312,-1.17969 V 13.99038 Z' })] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function LogoSmall(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export default function LogoSmall() {
|
|
3
|
+
const corner = 'fill-login';
|
|
4
|
+
const letter = 'fill-foreground transition-all duration-1000';
|
|
5
|
+
return (_jsxs("svg", { className: 'block h-full', viewBox: '0 0 100 100', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', children: [_jsx("path", { className: '', d: 'M0 0H6.6667V28.3333H0V0Z' }), _jsx("path", { className: corner, d: 'M28.3333 0V6.6667H0V0H28.3333Z' }), _jsx("path", { className: corner, d: 'M100 0V6.6667H71.6667V0H100Z' }), _jsx("path", { className: corner, d: 'M100 28.3333H93.3333V0H100V28.3333Z' }), _jsx("path", { className: corner, d: 'M0 100V93.3333H28.3333V100H0Z' }), _jsx("path", { className: corner, d: 'M0 71.6667H6.6667V100H0V71.6667Z' }), _jsx("path", { className: corner, d: 'M100 100H93.3333V71.6667H100V100Z' }), _jsx("path", { className: corner, d: 'M71.6667 100V93.3333H100V100H71.6667Z' }), _jsx("path", { className: letter, d: 'M31.6667 18.3333H43.3334V81.6666H31.6667V18.3333Z' }), _jsx("path", { className: letter, d: 'M31.6667 70H68.3334V81.6667H31.6667V70Z' })] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { getCookie, setCookie } from '../../utils/cookies/cookies';
|
|
5
|
+
import { useRouter } from 'next/navigation';
|
|
6
|
+
import { Globe } from 'lucide-react';
|
|
7
|
+
export default function LanguageToggle({ language }) {
|
|
8
|
+
const [lang, setLang] = useState(language);
|
|
9
|
+
const [jump, setJump] = useState(false);
|
|
10
|
+
const router = useRouter();
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const savedLang = getCookie('lang');
|
|
13
|
+
if (savedLang) {
|
|
14
|
+
setLang(savedLang);
|
|
15
|
+
}
|
|
16
|
+
}, []);
|
|
17
|
+
function handleClick() {
|
|
18
|
+
const newLang = lang === 'no' ? 'en' : 'no';
|
|
19
|
+
setCookie('lang', newLang);
|
|
20
|
+
setLang(newLang);
|
|
21
|
+
language = newLang;
|
|
22
|
+
setJump(true);
|
|
23
|
+
setTimeout(() => setJump(false), 400);
|
|
24
|
+
router.refresh();
|
|
25
|
+
}
|
|
26
|
+
const buttonClasses = `cursor-pointer p-2 leading-8 text-base w-[4.3rem] text-center rounded
|
|
27
|
+
bg-transparent border-none hover:bg-gray-400/10 flex flex-row items-center justify-center gap-1`;
|
|
28
|
+
return (_jsxs("button", { value: lang, onClick: handleClick, className: buttonClasses, children: [_jsx(Globe, { className: `text-xl leading-8 -mt-0.5 ${jump ? 'animate-jump' : ''}` }), ' ' + lang] }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { getCookie, setCookie } from '../../utils/cookies/cookies';
|
|
5
|
+
import { useRouter } from 'next/navigation';
|
|
6
|
+
export default function ThemeSwitch({ className }) {
|
|
7
|
+
const router = useRouter();
|
|
8
|
+
const [theme, setTheme] = useState('dark');
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
const savedTheme = getCookie('theme');
|
|
11
|
+
if (savedTheme) {
|
|
12
|
+
setTheme(savedTheme);
|
|
13
|
+
}
|
|
14
|
+
document.documentElement.classList.remove('dark', 'light');
|
|
15
|
+
document.documentElement.classList.add(theme);
|
|
16
|
+
}, [theme]);
|
|
17
|
+
function toggleTheme() {
|
|
18
|
+
const newTheme = theme === 'dark' ? 'light' : 'dark';
|
|
19
|
+
setCookie('theme', newTheme);
|
|
20
|
+
setTheme(newTheme);
|
|
21
|
+
router.refresh();
|
|
22
|
+
}
|
|
23
|
+
return (_jsx("div", { className: `grid place-items-center justify-end rounded-md hover:bg-login-300/20 w-fit ${className}`, children: _jsxs("label", { className: 'cursor-pointer', children: [_jsx("input", { type: 'checkbox', checked: theme === 'light', onChange: toggleTheme, className: 'sr-only' }), _jsx(ThemeIcon, { theme: theme })] }) }));
|
|
24
|
+
}
|
|
25
|
+
function ThemeIcon({ theme }) {
|
|
26
|
+
const sunrayClass = `fill-white transition-opacity duration-400 ${theme === 'light' ? 'opacity-0' : 'opacity-100'}`;
|
|
27
|
+
return (_jsxs("svg", { className: 'h-12 p-3', viewBox: '0 0 100 100', xmlns: 'http://www.w3.org/2000/svg', children: [_jsx("defs", { children: _jsxs("mask", { id: 'theme-toggle_clip-path', children: [_jsx("rect", { x: '0', y: '0', width: '100', height: '100', fill: 'white' }), _jsx("circle", { className: `transition-transform duration-400 ${theme === 'dark' ? 'translate-x-8 -translate-y-4' : ''}`, cx: '68', cy: '40', r: '18' })] }) }), _jsx("circle", { className: `origin-center transition-all duration-400 ${theme === 'light'
|
|
28
|
+
? 'scale-[1.9] fill-black'
|
|
29
|
+
: 'scale-100 fill-white'}`, mask: 'url(#theme-toggle_clip-path)', cx: '50', cy: '50', r: '23' }), _jsx("rect", { className: sunrayClass, x: '86', y: '47', width: '14', height: '6', rx: '3' }), _jsx("rect", { className: sunrayClass, y: '47', width: '14', height: '6', rx: '3' }), _jsx("rect", { className: sunrayClass, x: '47', y: '86', width: '6', height: '14', rx: '3' }), _jsx("rect", { className: sunrayClass, x: '75', y: '75', width: '6', height: '14', rx: '3', transform: 'rotate(-45 78 78)' }), _jsx("rect", { className: sunrayClass, x: '84.8995', y: '12', width: '6', height: '14', rx: '3', transform: 'rotate(45 84.8995 12)' }), _jsx("rect", { className: sunrayClass, x: '22.8995', y: '74', width: '6', height: '14', rx: '3', transform: 'rotate(45 22.8995 74)' }), _jsx("rect", { className: sunrayClass, x: '13', y: '16.2426', width: '6', height: '14', rx: '3', transform: 'rotate(-45 13 16.2426)' }), _jsx("rect", { className: sunrayClass, x: '47', y: '0', width: '6', height: '14', rx: '3' })] }));
|
|
30
|
+
}
|
|
@@ -3,15 +3,35 @@ import path from 'path';
|
|
|
3
3
|
import { globSync } from 'glob';
|
|
4
4
|
const DIST_DIR = path.resolve('dist');
|
|
5
5
|
const IMAGES_DIR = path.join(DIST_DIR, 'images');
|
|
6
|
+
const SRC_DIR = path.join(DIST_DIR, 'src');
|
|
6
7
|
const jsFiles = globSync(`${DIST_DIR}/**/*.js`, { nodir: true });
|
|
7
8
|
jsFiles.forEach((file) => {
|
|
8
9
|
let content = fs.readFileSync(file, 'utf-8');
|
|
9
10
|
const fileDir = path.dirname(file);
|
|
11
|
+
// Handle @images/* imports
|
|
10
12
|
content = content.replace(/from ['"]@images\/(.*?)['"]/g, (_, p1) => {
|
|
11
13
|
const targetPath = path.join(IMAGES_DIR, p1);
|
|
12
14
|
const relative = path.relative(fileDir, targetPath).replace(/\\/g, '/');
|
|
13
15
|
return `from '${relative}'`;
|
|
14
16
|
});
|
|
17
|
+
// Handle @utils/* imports
|
|
18
|
+
content = content.replace(/from ['"]@utils\/(.*?)['"]/g, (_, p1) => {
|
|
19
|
+
const targetPath = path.join(SRC_DIR, 'utils', p1);
|
|
20
|
+
const relative = path.relative(fileDir, targetPath).replace(/\\/g, '/');
|
|
21
|
+
return `from '${relative}'`;
|
|
22
|
+
});
|
|
23
|
+
// Handle @components/* imports
|
|
24
|
+
content = content.replace(/from ['"]@components\/(.*?)['"]/g, (_, p1) => {
|
|
25
|
+
const targetPath = path.join(SRC_DIR, 'components', p1);
|
|
26
|
+
const relative = path.relative(fileDir, targetPath).replace(/\\/g, '/');
|
|
27
|
+
return `from '${relative}'`;
|
|
28
|
+
});
|
|
29
|
+
// Handle @hooks/* imports
|
|
30
|
+
content = content.replace(/from ['"]@hooks\/(.*?)['"]/g, (_, p1) => {
|
|
31
|
+
const targetPath = path.join(SRC_DIR, 'hooks', p1);
|
|
32
|
+
const relative = path.relative(fileDir, targetPath).replace(/\\/g, '/');
|
|
33
|
+
return `from '${relative}'`;
|
|
34
|
+
});
|
|
15
35
|
const inlineImages = content.match(/src: ['"]images\/(.*?)['"]/g);
|
|
16
36
|
if (inlineImages) {
|
|
17
37
|
inlineImages.forEach((match) => {
|
|
@@ -27,5 +47,5 @@ jsFiles.forEach((file) => {
|
|
|
27
47
|
}
|
|
28
48
|
fs.writeFileSync(file, content, 'utf-8');
|
|
29
49
|
});
|
|
30
|
-
console.log('🐝
|
|
50
|
+
console.log('🐝 All path aliases rewritten');
|
|
31
51
|
console.log('🐝 Build complete');
|
package/package.json
CHANGED
package/src/components/index.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
export { default as LoginPage } from './login/loginPage'
|
|
2
|
-
export { default as Toaster, addToast } from './toast/toaster'
|
|
3
|
-
|
|
4
1
|
// Input components
|
|
5
2
|
export { default as Input } from './inputs/input'
|
|
6
3
|
export { default as SwitchInput } from './inputs/switch'
|
|
7
4
|
export { default as TagInput } from './inputs/tag'
|
|
5
|
+
|
|
6
|
+
// Logos
|
|
7
|
+
export { default as Logo } from './logo/logo'
|
|
8
|
+
export { default as LogoSmall } from './logo/logoSmall'
|
|
9
|
+
|
|
10
|
+
// Toggles
|
|
11
|
+
export { default as ThemeToggle } from './toggle/theme'
|
|
12
|
+
export { default as LanguageToggle } from './toggle/language'
|
|
13
|
+
|
|
14
|
+
export { default as LoginPage } from './login/loginPage'
|
|
15
|
+
export { default as Toaster, addToast } from './toast/toaster'
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* eslint-disable @stylistic/max-len */
|
|
2
|
+
|
|
3
|
+
export default function Logo() {
|
|
4
|
+
const corner = 'fill-[var(--foreground)] transition-all duration-1000'
|
|
5
|
+
const letter = 'fill-none stroke-[var(--color-login)] stroke-[3.5px]'
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<svg className='block w-full max-w-2xl mx-auto' viewBox='0 0 147.02299 59.20511'>
|
|
9
|
+
<path className={corner} d='m 28.77713,58.37738 v 0.76465 H 25.531 v -5.61816 h 0.91309 v 4.85351 z' />
|
|
10
|
+
<path className={corner} d='m 30.47831,59.142 h -0.917 v -5.61813 h 0.917 z'/>
|
|
11
|
+
<path className={corner} d='M 36.46268,53.52387 V 59.142 H 35.99881 A 0.36347,0.36347 0 0 1 35.6785,58.98185 L 32.59256,55.018 c 0.0078,0.07617 0.01368,0.15039 0.01758,0.22461 0.0039,0.07422 0.0059,0.14258 0.0059,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.09864,0.0059 0.3128,0.3128 0 0 1 0.07617,0.02148 0.22919,0.22919 0 0 1 0.0664,0.04688 0.63781,0.63781 0 0 1 0.06641,0.07812 l 3.08984,3.96779 c -0.0078,-0.08105 -0.01367,-0.16015 -0.01757,-0.23828 -0.0039,-0.07813 -0.0059,-0.15039 -0.0059,-0.21875 v -3.6631 z' />
|
|
12
|
+
<path className={corner} d='m 39.84549,57.1684 a 2.91264,2.91264 0 0 1 -0.11523,0.84765 1.748,1.748 0 0 1 -0.34375,0.64063 1.52483,1.52483 0 0 1 -0.56543,0.40527 2.00691,2.00691 0 0 1 -0.78223,0.14258 3.23707,3.23707 0 0 1 -0.40234,-0.0254 3.44454,3.44454 0 0 1 -0.41309,-0.0801 l 0.04688,-0.5459 a 0.2079,0.2079 0 0 1 0.06055,-0.125 0.19754,0.19754 0 0 1 0.14257,-0.0469 0.74035,0.74035 0 0 1 0.18067,0.0293 1.36468,1.36468 0 0 0 0.71387,-0.041 0.74722,0.74722 0 0 0 0.3125,-0.2207 0.9864,0.9864 0 0 0 0.1914,-0.38574 2.19551,2.19551 0 0 0 0.06445,-0.57227 v -3.667 h 0.90918 z' />
|
|
13
|
+
<path className={corner} d='m 44.6326,58.40473 -0.0039,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z' />
|
|
14
|
+
<path className={corner} d='M 46.53592,54.26117 V 56.06 h 2.19629 v 0.7373 h -2.19629 v 2.3447 h -0.917 v -5.61813 h 3.50391 v 0.7373 z' />
|
|
15
|
+
<path className={corner} d='m 55.25956,56.33344 a 3.18179,3.18179 0 0 1 -0.20215,1.15039 2.6634,2.6634 0 0 1 -0.57227,0.90722 2.59685,2.59685 0 0 1 -0.88476,0.59473 3.17156,3.17156 0 0 1 -2.29492,0 2.62415,2.62415 0 0 1 -0.88672,-0.59473 2.65327,2.65327 0 0 1 -0.57422,-0.90722 3.37717,3.37717 0 0 1 0,-2.30176 2.67118,2.67118 0 0 1 0.57422,-0.90918 2.61491,2.61491 0 0 1 0.88672,-0.59668 3.1717,3.1717 0 0 1 2.29492,0 2.58781,2.58781 0 0 1 0.88476,0.59668 2.68144,2.68144 0 0 1 0.57227,0.90918 3.1871,3.1871 0 0 1 0.20215,1.15137 z m -0.93164,0 a 2.706,2.706 0 0 0 -0.13086,-0.87012 1.821,1.821 0 0 0 -0.375,-0.65527 1.63008,1.63008 0 0 0 -0.59082,-0.41407 2.16795,2.16795 0 0 0 -1.55664,0 1.65415,1.65415 0 0 0 -0.59278,0.41407 1.84212,1.84212 0 0 0 -0.3789,0.65527 2.92611,2.92611 0 0 0 0,1.74316 1.83766,1.83766 0 0 0 0.3789,0.6543 1.64222,1.64222 0 0 0 0.59278,0.40918 2.19564,2.19564 0 0 0 1.55664,0 1.61838,1.61838 0 0 0 0.59082,-0.40918 1.81652,1.81652 0 0 0 0.375,-0.6543 2.71589,2.71589 0 0 0 0.13086,-0.87304 z' />
|
|
16
|
+
<path className={corner} d='m 60.534,59.142 h -0.81543 a 0.377,0.377 0 0 1 -0.35156,-0.1875 l -1.31055,-1.8916 a 0.4267,0.4267 0 0 0 -0.14453,-0.14063 0.50286,0.50286 0 0 0 -0.23437,-0.043 H 57.17072 V 59.142 H 56.2576 v -5.61813 h 1.6543 a 3.54427,3.54427 0 0 1 0.9541,0.11328 1.80649,1.80649 0 0 1 0.65723,0.32226 1.25606,1.25606 0 0 1 0.37988,0.501 1.76427,1.76427 0 0 1 0.03516,1.19727 1.50418,1.50418 0 0 1 -0.25293,0.46093 1.61283,1.61283 0 0 1 -0.40821,0.3584 2.04861,2.04861 0 0 1 -0.5498,0.23828 0.92346,0.92346 0 0 1 0.28906,0.28516 z m -2.64551,-2.92578 a 1.763,1.763 0 0 0 0.5459,-0.07617 1.11007,1.11007 0 0 0 0.39063,-0.21289 0.87892,0.87892 0 0 0 0.23437,-0.3252 1.10093,1.10093 0 0 0 0.07715,-0.41992 0.84276,0.84276 0 0 0 -0.30371,-0.70215 1.46527,1.46527 0 0 0 -0.9209,-0.24219 h -0.74121 v 1.97852 z' />
|
|
17
|
+
<path className={corner} d='m 64.72049,58.40473 -0.0039,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z' />
|
|
18
|
+
<path className={corner} d='M 70.35721,53.52387 V 59.142 H 69.89335 A 0.36347,0.36347 0 0 1 69.57303,58.98185 L 66.4871,55.018 c 0.0078,0.07617 0.01367,0.15039 0.01757,0.22461 0.0039,0.07422 0.0059,0.14258 0.0059,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.09864,0.0059 0.3128,0.3128 0 0 1 0.07617,0.02148 0.22936,0.22936 0 0 1 0.06641,0.04688 0.63869,0.63869 0 0 1 0.0664,0.07812 l 3.08985,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z' />
|
|
19
|
+
<path className={corner} d='m 72.6121,59.142 h -0.917 v -5.61813 h 0.917 z' />
|
|
20
|
+
<path className={corner} d='M 78.59794,53.52387 V 59.142 H 78.13358 A 0.36344,0.36344 0 0 1 77.81327,58.98185 L 74.72733,55.018 c 0.008,0.07617 0.0137,0.15039 0.0176,0.22461 0.004,0.07422 0.006,0.14258 0.006,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.713,0.713 0 0 1 0.0986,0.0059 0.31254,0.31254 0 0 1 0.0762,0.02148 0.22936,0.22936 0 0 1 0.0664,0.04688 0.63869,0.63869 0 0 1 0.0664,0.07812 l 3.08984,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z' />
|
|
21
|
+
<path className={corner} d='M 84.53544,56.37641 V 58.6 a 3.24425,3.24425 0 0 1 -1.9502,0.60449 3.419,3.419 0 0 1 -1.23535,-0.21289 2.7275,2.7275 0 0 1 -0.94141,-0.59277 2.59231,2.59231 0 0 1 -0.60156,-0.90723 3.08634,3.08634 0 0 1 -0.21,-1.1582 3.23536,3.23536 0 0 1 0.20215,-1.165 2.5484,2.5484 0 0 1 1.49414,-1.498 3.29189,3.29189 0 0 1 1.20215,-0.209 3.52605,3.52605 0 0 1 0.62988,0.05273 3.11559,3.11559 0 0 1 0.54,0.14649 2.535,2.535 0 0 1 0.84668,0.52246 l -0.26074,0.418 a 0.26545,0.26545 0 0 1 -0.16016,0.12109 0.27377,0.27377 0 0 1 -0.21094,-0.04688 c -0.0752,-0.04492 -0.15527,-0.09082 -0.24023,-0.14062 a 2.01137,2.01137 0 0 0 -0.29,-0.13867 2.127,2.127 0 0 0 -0.37891,-0.10547 2.72656,2.72656 0 0 0 -0.50683,-0.041 2.09434,2.09434 0 0 0 -0.80176,0.14649 1.70173,1.70173 0 0 0 -0.61035,0.418 1.84692,1.84692 0 0 0 -0.39063,0.65722 2.5766,2.5766 0 0 0 -0.13672,0.86231 2.62333,2.62333 0 0 0 0.14453,0.89844 1.88731,1.88731 0 0 0 0.41016,0.67187 1.74772,1.74772 0 0 0 0.6416,0.419 2.55647,2.55647 0 0 0 1.459,0.0703 2.80344,2.80344 0 0 0 0.53222,-0.207 V 57.07074 H 82.928 a 0.19287,0.19287 0 0 1 -0.13964,-0.04883 0.16848,0.16848 0 0 1 -0.0508,-0.12695 v -0.51855 z' />
|
|
22
|
+
<path className={corner} d='m 89.1243,58.40473 -0.004,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z' />
|
|
23
|
+
<path className={corner} d='M 94.761,53.52387 V 59.142 H 94.29713 A 0.36347,0.36347 0 0 1 93.97682,58.98185 L 90.8909,55.018 c 0.008,0.07617 0.0137,0.15039 0.0176,0.22461 0.004,0.07422 0.006,0.14258 0.006,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.0986,0.0059 0.3128,0.3128 0 0 1 0.0762,0.02148 0.22919,0.22919 0 0 1 0.0664,0.04688 0.63781,0.63781 0 0 1 0.0664,0.07812 l 3.08984,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z' />
|
|
24
|
+
<path className={corner} d='M 98.95829,54.26117 V 56.06 h 2.19629 v 0.7373 h -2.19629 v 2.3447 h -0.917 v -5.61813 h 3.5039 v 0.7373 z' />
|
|
25
|
+
<path className={corner} d='m 107.68192,56.33344 a 3.18158,3.18158 0 0 1 -0.20215,1.15039 2.66353,2.66353 0 0 1 -0.57226,0.90722 2.597,2.597 0 0 1 -0.88477,0.59473 3.17156,3.17156 0 0 1 -2.29492,0 2.62415,2.62415 0 0 1 -0.88672,-0.59473 2.65327,2.65327 0 0 1 -0.57422,-0.90722 3.37717,3.37717 0 0 1 0,-2.30176 2.67118,2.67118 0 0 1 0.57422,-0.90918 2.61491,2.61491 0 0 1 0.88672,-0.59668 3.1717,3.1717 0 0 1 2.29492,0 2.588,2.588 0 0 1 0.88477,0.59668 2.68157,2.68157 0 0 1 0.57226,0.90918 3.18689,3.18689 0 0 1 0.20215,1.15137 z m -0.93164,0 a 2.706,2.706 0 0 0 -0.13086,-0.87012 1.82066,1.82066 0 0 0 -0.375,-0.65527 1.63,1.63 0 0 0 -0.59082,-0.41407 2.16795,2.16795 0 0 0 -1.55664,0 1.65411,1.65411 0 0 0 -0.59277,0.41407 1.84214,1.84214 0 0 0 -0.37891,0.65527 2.92632,2.92632 0 0 0 0,1.74316 1.83768,1.83768 0 0 0 0.37891,0.6543 1.64218,1.64218 0 0 0 0.59277,0.40918 2.19564,2.19564 0 0 0 1.55664,0 1.61829,1.61829 0 0 0 0.59082,-0.40918 1.81623,1.81623 0 0 0 0.375,-0.6543 2.71589,2.71589 0 0 0 0.13086,-0.87304 z' />
|
|
26
|
+
<path className={corner} d='m 112.95731,59.142 h -0.81543 a 0.377,0.377 0 0 1 -0.35156,-0.1875 l -1.31055,-1.8916 a 0.4267,0.4267 0 0 0 -0.14453,-0.14063 0.50286,0.50286 0 0 0 -0.23437,-0.043 H 109.594 V 59.142 h -0.91309 v -5.61813 h 1.6543 a 3.54427,3.54427 0 0 1 0.9541,0.11328 1.80649,1.80649 0 0 1 0.65723,0.32226 1.25606,1.25606 0 0 1 0.37988,0.501 1.76427,1.76427 0 0 1 0.0352,1.19727 1.50418,1.50418 0 0 1 -0.25293,0.46093 1.61283,1.61283 0 0 1 -0.40821,0.3584 2.04861,2.04861 0 0 1 -0.5498,0.23828 0.92346,0.92346 0 0 1 0.28906,0.28516 z m -2.64551,-2.92578 a 1.763,1.763 0 0 0 0.5459,-0.07617 1.11007,1.11007 0 0 0 0.39063,-0.21289 0.87892,0.87892 0 0 0 0.23437,-0.3252 1.10093,1.10093 0 0 0 0.0772,-0.41992 0.84276,0.84276 0 0 0 -0.30371,-0.70215 1.46527,1.46527 0 0 0 -0.9209,-0.24219 H 109.594 v 1.97852 z' />
|
|
27
|
+
<path className={corner} d='m 116.4954,59.142 h -0.917 v -5.61813 h 0.917 z' />
|
|
28
|
+
<path className={corner} d='m 121.69559,54.28461 h -1.75195 V 59.142 h -0.9082 v -4.85739 h -1.75586 v -0.76074 h 4.416 z' />
|
|
29
|
+
<polyline className={letter} style={{strokeMiterlimit: 10}} points='47.871 98.1 33.189 98.1 33.189 83.418' transform='translate(-31.392,-41.894)' />
|
|
30
|
+
<polyline className={letter} style={{strokeMiterlimit: 10}} points='33.142 58.326 33.142 43.644 47.824 43.644' transform='translate(-31.392,-41.894)' />
|
|
31
|
+
<polyline className={letter} style={{strokeMiterlimit: 10}} points='161.983 98.122 176.665 98.122 176.665 83.44' transform='translate(-31.392,-41.894)' />
|
|
32
|
+
<polyline className={letter} style={{strokeMiterlimit: 10}} points='176.665 58.372 176.665 43.69 161.983 43.69' transform='translate(-31.392,-41.894)' />
|
|
33
|
+
<path className={corner} d='m 30.02449,40.19351 v 4.12842 H 12.4991 V 13.99038 h 4.92871 v 26.20313 z' />
|
|
34
|
+
<path className={corner} d='m 61.53523,29.1564 a 17.15942,17.15942 0 0 1 -1.09473,6.21338 14.35971,14.35971 0 0 1 -3.08593,4.89746 14.091,14.091 0 0 1 -4.78125,3.21191 17.1289,17.1289 0 0 1 -12.38575,0 13.98317,13.98317 0 0 1 -7.88867,-8.10937 18.18161,18.18161 0 0 1 0,-12.42725 14.39119,14.39119 0 0 1 3.09668,-4.90771 14.13157,14.13157 0 0 1 4.792,-3.22315 17.13565,17.13565 0 0 1 12.38575,0 14.02046,14.02046 0 0 1 4.78125,3.22315 14.47032,14.47032 0 0 1 3.08593,4.90771 17.16209,17.16209 0 0 1 1.09472,6.21387 z m -5.03418,0 a 14.62587,14.62587 0 0 0 -0.70508,-4.69727 9.9446,9.9446 0 0 0 -2.02246,-3.53906 8.80545,8.80545 0 0 0 -3.1914,-2.23242 11.719,11.719 0 0 0 -8.4043,0 8.90077,8.90077 0 0 0 -3.20117,2.23242 9.96735,9.96735 0 0 0 -2.043,3.53906 15.81644,15.81644 0 0 0 0,9.415 9.847,9.847 0 0 0 2.043,3.52832 8.85094,8.85094 0 0 0 3.20117,2.21192 11.87213,11.87213 0 0 0 8.4043,0 8.75623,8.75623 0 0 0 3.1914,-2.21192 9.82454,9.82454 0 0 0 2.02249,-3.52828 14.69371,14.69371 0 0 0 0.70505,-4.71777 z' />
|
|
35
|
+
<path className={corner} d='m 91.76082,29.38784 v 12.00635 a 17.5354,17.5354 0 0 1 -10.53125,3.26465 18.41512,18.41512 0 0 1 -6.667,-1.148 14.80254,14.80254 0 0 1 -5.08691,-3.20166 14.0148,14.0148 0 0 1 -3.24316,-4.897 16.691,16.691 0 0 1 -1.1377,-6.25586 17.42935,17.42935 0 0 1 1.09473,-6.2876 13.74023,13.74023 0 0 1 8.06738,-8.08838 17.7222,17.7222 0 0 1 6.48828,-1.127 19.10354,19.10354 0 0 1 3.40137,0.28418 16.85244,16.85244 0 0 1 2.917,0.79 13.68442,13.68442 0 0 1 2.48633,1.22168 13.95372,13.95372 0 0 1 2.085,1.60058 l -1.41113,2.25391 a 1.40229,1.40229 0 0 1 -0.86426,0.65283 1.47784,1.47784 0 0 1 -1.13672,-0.25244 q -0.6123,-0.35816 -1.2959,-0.7583 a 11.33129,11.33129 0 0 0 -1.56933,-0.748 11.53387,11.53387 0 0 0 -2.043,-0.56836 14.78335,14.78335 0 0 0 -2.73828,-0.22119 11.32128,11.32128 0 0 0 -4.32813,0.78955 9.26752,9.26752 0 0 0 -3.29687,2.25391 9.99164,9.99164 0 0 0 -2.10645,3.54931 13.90267,13.90267 0 0 0 -0.7373,4.65528 14.11731,14.11731 0 0 0 0.77929,4.855 10.1425,10.1425 0 0 0 2.21192,3.62305 9.43419,9.43419 0 0 0 3.46484,2.26416 13.81975,13.81975 0 0 0 7.87793,0.3789 15.14816,15.14816 0 0 0 2.875,-1.11621 v -6.02383 h -4.2334 a 1.04883,1.04883 0 0 1 -0.75879,-0.26367 0.90553,0.90553 0 0 1 -0.27343,-0.68457 v -2.80127 z' />
|
|
36
|
+
<path className={corner} d='M 102.546,44.32193 H 97.59581 V 13.99038 h 4.95019 z' />
|
|
37
|
+
<path className={corner} d='m 134.8575,13.99038 v 30.33155 h -2.50684 a 2.14219,2.14219 0 0 1 -0.96875,-0.2002 2.26108,2.26108 0 0 1 -0.75879,-0.66357 L 113.962,22.05777 q 0.063,0.61083 0.0947,1.21093 0.0322,0.60058 0.0322,1.106 v 19.94723 h -4.3398 V 13.99038 h 2.57031 a 3.89092,3.89092 0 0 1 0.53711,0.03174 1.53328,1.53328 0 0 1 0.41016,0.11572 1.18964,1.18964 0 0 1 0.35839,0.25293 4.01792,4.01792 0 0 1 0.3584,0.4209 l 16.68164,21.42188 q -0.063,-0.65259 -0.0947,-1.28467 -0.0308,-0.63208 -0.0312,-1.17969 V 13.99038 Z' />
|
|
38
|
+
</svg>
|
|
39
|
+
|
|
40
|
+
)
|
|
41
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default function LogoSmall() {
|
|
2
|
+
const corner = 'fill-login'
|
|
3
|
+
const letter = 'fill-foreground transition-all duration-1000'
|
|
4
|
+
|
|
5
|
+
return (
|
|
6
|
+
<svg className='block h-full' viewBox='0 0 100 100' fill='none' xmlns='http://www.w3.org/2000/svg'>
|
|
7
|
+
<path className='' d='M0 0H6.6667V28.3333H0V0Z'/>
|
|
8
|
+
<path className={corner} d='M28.3333 0V6.6667H0V0H28.3333Z'/>
|
|
9
|
+
<path className={corner} d='M100 0V6.6667H71.6667V0H100Z'/>
|
|
10
|
+
<path className={corner} d='M100 28.3333H93.3333V0H100V28.3333Z'/>
|
|
11
|
+
<path className={corner} d='M0 100V93.3333H28.3333V100H0Z'/>
|
|
12
|
+
<path className={corner} d='M0 71.6667H6.6667V100H0V71.6667Z'/>
|
|
13
|
+
<path className={corner} d='M100 100H93.3333V71.6667H100V100Z'/>
|
|
14
|
+
<path className={corner} d='M71.6667 100V93.3333H100V100H71.6667Z'/>
|
|
15
|
+
<path className={letter} d='M31.6667 18.3333H43.3334V81.6666H31.6667V18.3333Z'/>
|
|
16
|
+
<path className={letter} d='M31.6667 70H68.3334V81.6667H31.6667V70Z'/>
|
|
17
|
+
</svg>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState } from 'react'
|
|
4
|
+
import { getCookie, setCookie } from '@utils/cookies/cookies'
|
|
5
|
+
import { useRouter } from 'next/navigation'
|
|
6
|
+
import { Language } from 'uibee/components'
|
|
7
|
+
import { Globe } from 'lucide-react'
|
|
8
|
+
|
|
9
|
+
export default function LanguageToggle({language}: {language: Language}) {
|
|
10
|
+
const [lang, setLang] = useState<Language>(language)
|
|
11
|
+
const [jump, setJump] = useState(false)
|
|
12
|
+
|
|
13
|
+
const router = useRouter()
|
|
14
|
+
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const savedLang = getCookie('lang') as Language
|
|
17
|
+
if (savedLang) {
|
|
18
|
+
setLang(savedLang)
|
|
19
|
+
}
|
|
20
|
+
}, [])
|
|
21
|
+
|
|
22
|
+
function handleClick() {
|
|
23
|
+
const newLang = lang === 'no' ? 'en' : 'no'
|
|
24
|
+
setCookie('lang', newLang)
|
|
25
|
+
setLang(newLang)
|
|
26
|
+
language = newLang
|
|
27
|
+
setJump(true)
|
|
28
|
+
setTimeout(() => setJump(false), 400)
|
|
29
|
+
router.refresh()
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const buttonClasses = `cursor-pointer p-2 leading-8 text-base w-[4.3rem] text-center rounded
|
|
33
|
+
bg-transparent border-none hover:bg-gray-400/10 flex flex-row items-center justify-center gap-1`
|
|
34
|
+
|
|
35
|
+
return(
|
|
36
|
+
<button
|
|
37
|
+
value={lang}
|
|
38
|
+
onClick={handleClick}
|
|
39
|
+
className={buttonClasses}
|
|
40
|
+
>
|
|
41
|
+
<Globe className={`text-xl leading-8 -mt-0.5 ${jump ? 'animate-jump' : ''}`}/>
|
|
42
|
+
{' ' + lang}
|
|
43
|
+
</button>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState } from 'react'
|
|
4
|
+
import { getCookie, setCookie } from '@utils/cookies/cookies'
|
|
5
|
+
import { useRouter } from 'next/navigation'
|
|
6
|
+
|
|
7
|
+
export default function ThemeSwitch({className}: {className?: string}) {
|
|
8
|
+
const router = useRouter()
|
|
9
|
+
const [theme, setTheme] = useState<'dark' | 'light'>('dark')
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const savedTheme = getCookie('theme') as 'dark' | 'light'
|
|
13
|
+
if (savedTheme) {
|
|
14
|
+
setTheme(savedTheme)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
document.documentElement.classList.remove('dark', 'light')
|
|
18
|
+
document.documentElement.classList.add(theme)
|
|
19
|
+
}, [theme])
|
|
20
|
+
|
|
21
|
+
function toggleTheme() {
|
|
22
|
+
const newTheme = theme === 'dark' ? 'light' : 'dark'
|
|
23
|
+
setCookie('theme', newTheme)
|
|
24
|
+
setTheme(newTheme)
|
|
25
|
+
router.refresh()
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className={`grid place-items-center justify-end rounded-md hover:bg-login-300/20 w-fit ${className}`}>
|
|
30
|
+
<label className='cursor-pointer'>
|
|
31
|
+
<input
|
|
32
|
+
type='checkbox'
|
|
33
|
+
checked={theme === 'light'}
|
|
34
|
+
onChange={toggleTheme}
|
|
35
|
+
className='sr-only'
|
|
36
|
+
/>
|
|
37
|
+
<ThemeIcon theme={theme} />
|
|
38
|
+
</label>
|
|
39
|
+
</div>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function ThemeIcon({ theme }: { theme: 'dark' | 'light' }) {
|
|
44
|
+
const sunrayClass = `fill-white transition-opacity duration-400 ${
|
|
45
|
+
theme === 'light' ? 'opacity-0' : 'opacity-100'
|
|
46
|
+
}`
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<svg
|
|
50
|
+
className='h-12 p-3'
|
|
51
|
+
viewBox='0 0 100 100'
|
|
52
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
53
|
+
>
|
|
54
|
+
{/* Sun */}
|
|
55
|
+
<defs>
|
|
56
|
+
<mask id='theme-toggle_clip-path'>
|
|
57
|
+
<rect x='0' y='0' width='100' height='100' fill='white' />
|
|
58
|
+
<circle
|
|
59
|
+
className={`transition-transform duration-400 ${
|
|
60
|
+
theme === 'dark' ? 'translate-x-8 -translate-y-4' : ''
|
|
61
|
+
}`}
|
|
62
|
+
cx='68'
|
|
63
|
+
cy='40'
|
|
64
|
+
r='18'
|
|
65
|
+
/>
|
|
66
|
+
</mask>
|
|
67
|
+
</defs>
|
|
68
|
+
{/* Moon */}
|
|
69
|
+
<circle
|
|
70
|
+
className={`origin-center transition-all duration-400 ${
|
|
71
|
+
theme === 'light'
|
|
72
|
+
? 'scale-[1.9] fill-black'
|
|
73
|
+
: 'scale-100 fill-white'
|
|
74
|
+
}`}
|
|
75
|
+
mask={'url(#theme-toggle_clip-path)'}
|
|
76
|
+
cx='50'
|
|
77
|
+
cy='50'
|
|
78
|
+
r='23'
|
|
79
|
+
/>
|
|
80
|
+
{/* Sunrays */}
|
|
81
|
+
<rect
|
|
82
|
+
className={sunrayClass}
|
|
83
|
+
x='86'
|
|
84
|
+
y='47'
|
|
85
|
+
width='14'
|
|
86
|
+
height='6'
|
|
87
|
+
rx='3'
|
|
88
|
+
/>
|
|
89
|
+
<rect
|
|
90
|
+
className={sunrayClass}
|
|
91
|
+
y='47'
|
|
92
|
+
width='14'
|
|
93
|
+
height='6'
|
|
94
|
+
rx='3'
|
|
95
|
+
/>
|
|
96
|
+
<rect
|
|
97
|
+
className={sunrayClass}
|
|
98
|
+
x='47'
|
|
99
|
+
y='86'
|
|
100
|
+
width='6'
|
|
101
|
+
height='14'
|
|
102
|
+
rx='3'
|
|
103
|
+
/>
|
|
104
|
+
<rect
|
|
105
|
+
className={sunrayClass}
|
|
106
|
+
x='75'
|
|
107
|
+
y='75'
|
|
108
|
+
width='6'
|
|
109
|
+
height='14'
|
|
110
|
+
rx='3'
|
|
111
|
+
transform='rotate(-45 78 78)'
|
|
112
|
+
/>
|
|
113
|
+
<rect
|
|
114
|
+
className={sunrayClass}
|
|
115
|
+
x='84.8995'
|
|
116
|
+
y='12'
|
|
117
|
+
width='6'
|
|
118
|
+
height='14'
|
|
119
|
+
rx='3'
|
|
120
|
+
transform='rotate(45 84.8995 12)'
|
|
121
|
+
/>
|
|
122
|
+
<rect
|
|
123
|
+
className={sunrayClass}
|
|
124
|
+
x='22.8995'
|
|
125
|
+
y='74'
|
|
126
|
+
width='6'
|
|
127
|
+
height='14'
|
|
128
|
+
rx='3'
|
|
129
|
+
transform='rotate(45 22.8995 74)'
|
|
130
|
+
/>
|
|
131
|
+
<rect
|
|
132
|
+
className={sunrayClass}
|
|
133
|
+
x='13'
|
|
134
|
+
y='16.2426'
|
|
135
|
+
width='6'
|
|
136
|
+
height='14'
|
|
137
|
+
rx='3'
|
|
138
|
+
transform='rotate(-45 13 16.2426)'
|
|
139
|
+
/>
|
|
140
|
+
<rect
|
|
141
|
+
className={sunrayClass}
|
|
142
|
+
x='47'
|
|
143
|
+
y='0'
|
|
144
|
+
width='6'
|
|
145
|
+
height='14'
|
|
146
|
+
rx='3'
|
|
147
|
+
/>
|
|
148
|
+
</svg>
|
|
149
|
+
)
|
|
150
|
+
}
|
package/src/globals.css
CHANGED
|
@@ -4,18 +4,42 @@ import { globSync } from 'glob'
|
|
|
4
4
|
|
|
5
5
|
const DIST_DIR = path.resolve('dist')
|
|
6
6
|
const IMAGES_DIR = path.join(DIST_DIR, 'images')
|
|
7
|
+
const SRC_DIR = path.join(DIST_DIR, 'src')
|
|
7
8
|
|
|
8
9
|
const jsFiles = globSync(`${DIST_DIR}/**/*.js`, { nodir: true })
|
|
9
10
|
|
|
10
11
|
jsFiles.forEach((file) => {
|
|
11
12
|
let content = fs.readFileSync(file, 'utf-8')
|
|
12
13
|
const fileDir = path.dirname(file)
|
|
14
|
+
|
|
15
|
+
// Handle @images/* imports
|
|
13
16
|
content = content.replace(/from ['"]@images\/(.*?)['"]/g, (_, p1) => {
|
|
14
17
|
const targetPath = path.join(IMAGES_DIR, p1)
|
|
15
18
|
const relative = path.relative(fileDir, targetPath).replace(/\\/g, '/')
|
|
16
19
|
return `from '${relative}'`
|
|
17
20
|
})
|
|
18
21
|
|
|
22
|
+
// Handle @utils/* imports
|
|
23
|
+
content = content.replace(/from ['"]@utils\/(.*?)['"]/g, (_, p1) => {
|
|
24
|
+
const targetPath = path.join(SRC_DIR, 'utils', p1)
|
|
25
|
+
const relative = path.relative(fileDir, targetPath).replace(/\\/g, '/')
|
|
26
|
+
return `from '${relative}'`
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
// Handle @components/* imports
|
|
30
|
+
content = content.replace(/from ['"]@components\/(.*?)['"]/g, (_, p1) => {
|
|
31
|
+
const targetPath = path.join(SRC_DIR, 'components', p1)
|
|
32
|
+
const relative = path.relative(fileDir, targetPath).replace(/\\/g, '/')
|
|
33
|
+
return `from '${relative}'`
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
// Handle @hooks/* imports
|
|
37
|
+
content = content.replace(/from ['"]@hooks\/(.*?)['"]/g, (_, p1) => {
|
|
38
|
+
const targetPath = path.join(SRC_DIR, 'hooks', p1)
|
|
39
|
+
const relative = path.relative(fileDir, targetPath).replace(/\\/g, '/')
|
|
40
|
+
return `from '${relative}'`
|
|
41
|
+
})
|
|
42
|
+
|
|
19
43
|
const inlineImages = content.match(/src: ['"]images\/(.*?)['"]/g)
|
|
20
44
|
if (inlineImages) {
|
|
21
45
|
inlineImages.forEach((match) => {
|
|
@@ -33,5 +57,5 @@ jsFiles.forEach((file) => {
|
|
|
33
57
|
fs.writeFileSync(file, content, 'utf-8')
|
|
34
58
|
})
|
|
35
59
|
|
|
36
|
-
console.log('🐝
|
|
60
|
+
console.log('🐝 All path aliases rewritten')
|
|
37
61
|
console.log('🐝 Build complete')
|
|
@@ -27,6 +27,10 @@ declare module 'uibee/components' {
|
|
|
27
27
|
(event: ToastEventProps): void
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
export type Language = 'no' | 'en'
|
|
31
|
+
|
|
30
32
|
export default function LoginPage(props: LoginPageProps): JSX.Element;
|
|
31
33
|
export default function Toaster(props: { toasts: ToastProps[] }): JSX.Element;
|
|
34
|
+
export default function LanguageToggle(props: { lang: Language }): JSX.Element;
|
|
35
|
+
export default function ThemeSwitch(props: { className?: string }): JSX.Element;
|
|
32
36
|
}
|