@jackcrane/ui 0.1.11 → 0.1.13
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/components/FileUpload/file-upload.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/jcui.cjs.js +1028 -187
- package/dist/jcui.es.js +1029 -188
- package/package.json +1 -1
package/dist/jcui.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var
|
|
1
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var n=document.createElement("style");n.appendChild(document.createTextNode(`@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");@property --button-bg {
|
|
2
2
|
syntax: "<color>";
|
|
3
3
|
inherits: true;
|
|
4
4
|
initial-value: transparent;
|
|
@@ -535,6 +535,305 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
535
535
|
}
|
|
536
536
|
._label_1ymvl_112 {
|
|
537
537
|
}
|
|
538
|
+
@property --upload-bg {
|
|
539
|
+
syntax: "<color>";
|
|
540
|
+
inherits: true;
|
|
541
|
+
initial-value: transparent;
|
|
542
|
+
}
|
|
543
|
+
._root_i158m_7 {
|
|
544
|
+
display: flex;
|
|
545
|
+
flex-direction: column;
|
|
546
|
+
gap: 0.5rem;
|
|
547
|
+
width: 100%;
|
|
548
|
+
}
|
|
549
|
+
._label_i158m_14 {
|
|
550
|
+
font-size: 0.875rem;
|
|
551
|
+
}
|
|
552
|
+
._dropzone_i158m_18 {
|
|
553
|
+
position: relative;
|
|
554
|
+
display: flex;
|
|
555
|
+
align-items: center;
|
|
556
|
+
justify-content: space-between;
|
|
557
|
+
min-height: 0;
|
|
558
|
+
width: 100%;
|
|
559
|
+
border: var(--border-thickness) solid var(--border-color);
|
|
560
|
+
background-color: var(--upload-bg, transparent);
|
|
561
|
+
color: var(--upload-color, inherit);
|
|
562
|
+
cursor: pointer;
|
|
563
|
+
padding: 0.5rem 1rem;
|
|
564
|
+
gap: 0.75rem;
|
|
565
|
+
}
|
|
566
|
+
._dropzone_i158m_18:hover {
|
|
567
|
+
--upload-bg: var(--secondary-color-100);
|
|
568
|
+
}
|
|
569
|
+
._dropzone_i158m_18:focus-within {
|
|
570
|
+
--upload-bg: var(--secondary-color-100);
|
|
571
|
+
border-color: var(--border-accent-color, var(--border-color));
|
|
572
|
+
}
|
|
573
|
+
._pageBackground_i158m_42 {
|
|
574
|
+
--upload-bg: var(--body-bg);
|
|
575
|
+
}
|
|
576
|
+
._pageBackground_i158m_42:hover {
|
|
577
|
+
--upload-bg: var(--body-bg);
|
|
578
|
+
}
|
|
579
|
+
._pageBackground_i158m_42:focus-within {
|
|
580
|
+
--upload-bg: var(--body-bg);
|
|
581
|
+
}
|
|
582
|
+
._input_i158m_54 {
|
|
583
|
+
position: absolute;
|
|
584
|
+
width: 1px;
|
|
585
|
+
height: 1px;
|
|
586
|
+
margin: -1px;
|
|
587
|
+
padding: 0;
|
|
588
|
+
border: 0;
|
|
589
|
+
white-space: nowrap;
|
|
590
|
+
overflow: hidden;
|
|
591
|
+
clip: rect(0 0 0 0);
|
|
592
|
+
clip-path: inset(100%);
|
|
593
|
+
}
|
|
594
|
+
._dropzoneContent_i158m_67 {
|
|
595
|
+
display: flex;
|
|
596
|
+
align-items: center;
|
|
597
|
+
gap: 0.5rem;
|
|
598
|
+
min-width: 0;
|
|
599
|
+
}
|
|
600
|
+
._dropzoneIcon_i158m_74 {
|
|
601
|
+
width: auto;
|
|
602
|
+
height: auto;
|
|
603
|
+
display: inline-flex;
|
|
604
|
+
align-items: center;
|
|
605
|
+
justify-content: center;
|
|
606
|
+
opacity: 0.9;
|
|
607
|
+
flex-shrink: 0;
|
|
608
|
+
line-height: 0;
|
|
609
|
+
}
|
|
610
|
+
._dropzoneIcon_i158m_74 svg {
|
|
611
|
+
width: 1rem;
|
|
612
|
+
height: 1rem;
|
|
613
|
+
}
|
|
614
|
+
._dropzoneText_i158m_90 {
|
|
615
|
+
display: flex;
|
|
616
|
+
flex-direction: column;
|
|
617
|
+
min-width: 0;
|
|
618
|
+
}
|
|
619
|
+
._dropzoneTitle_i158m_96 {
|
|
620
|
+
font-size: 0.95rem;
|
|
621
|
+
font-weight: 600;
|
|
622
|
+
white-space: nowrap;
|
|
623
|
+
overflow: hidden;
|
|
624
|
+
text-overflow: ellipsis;
|
|
625
|
+
}
|
|
626
|
+
._dropzoneHint_i158m_104 {
|
|
627
|
+
font-size: 0.78rem;
|
|
628
|
+
opacity: 0.75;
|
|
629
|
+
}
|
|
630
|
+
._helperText_i158m_109 {
|
|
631
|
+
margin: 0;
|
|
632
|
+
font-size: 0.78rem;
|
|
633
|
+
opacity: 0.75;
|
|
634
|
+
}
|
|
635
|
+
._fileList_i158m_115 {
|
|
636
|
+
display: flex;
|
|
637
|
+
flex-direction: column;
|
|
638
|
+
gap: 0.4rem;
|
|
639
|
+
}
|
|
640
|
+
._fileItem_i158m_121 {
|
|
641
|
+
display: flex;
|
|
642
|
+
align-items: center;
|
|
643
|
+
justify-content: space-between;
|
|
644
|
+
gap: 0.5rem;
|
|
645
|
+
width: 100%;
|
|
646
|
+
padding: 0.5rem 1rem;
|
|
647
|
+
border: var(--border-thickness) solid var(--border-color);
|
|
648
|
+
background-color: var(--body-bg);
|
|
649
|
+
}
|
|
650
|
+
._fileInfo_i158m_132 {
|
|
651
|
+
display: flex;
|
|
652
|
+
align-items: center;
|
|
653
|
+
gap: 0.6rem;
|
|
654
|
+
min-width: 0;
|
|
655
|
+
flex: 1;
|
|
656
|
+
}
|
|
657
|
+
._filePreview_i158m_140 {
|
|
658
|
+
width: 2rem;
|
|
659
|
+
height: 2rem;
|
|
660
|
+
border: var(--border-thickness) solid var(--border-color);
|
|
661
|
+
display: inline-flex;
|
|
662
|
+
align-items: center;
|
|
663
|
+
justify-content: center;
|
|
664
|
+
overflow: hidden;
|
|
665
|
+
flex-shrink: 0;
|
|
666
|
+
background-color: var(--secondary-color-100);
|
|
667
|
+
}
|
|
668
|
+
._filePreview_i158m_140 svg {
|
|
669
|
+
width: 1.125rem;
|
|
670
|
+
height: 1.125rem;
|
|
671
|
+
}
|
|
672
|
+
._filePreviewImage_i158m_157 {
|
|
673
|
+
width: 100%;
|
|
674
|
+
height: 100%;
|
|
675
|
+
object-fit: cover;
|
|
676
|
+
}
|
|
677
|
+
._fileMeta_i158m_163 {
|
|
678
|
+
display: flex;
|
|
679
|
+
flex-direction: column;
|
|
680
|
+
min-width: 0;
|
|
681
|
+
flex: 1;
|
|
682
|
+
}
|
|
683
|
+
._fileName_i158m_170 {
|
|
684
|
+
font-size: 0.875rem;
|
|
685
|
+
white-space: nowrap;
|
|
686
|
+
overflow: hidden;
|
|
687
|
+
text-overflow: ellipsis;
|
|
688
|
+
}
|
|
689
|
+
._fileSize_i158m_177 {
|
|
690
|
+
font-size: 0.75rem;
|
|
691
|
+
opacity: 0.7;
|
|
692
|
+
}
|
|
693
|
+
._customFileRow_i158m_182 {
|
|
694
|
+
display: flex;
|
|
695
|
+
align-items: center;
|
|
696
|
+
gap: 0.5rem;
|
|
697
|
+
width: 100%;
|
|
698
|
+
}
|
|
699
|
+
._customFile_i158m_182 {
|
|
700
|
+
width: auto;
|
|
701
|
+
min-width: 0;
|
|
702
|
+
flex: 1;
|
|
703
|
+
}
|
|
704
|
+
._removeButton_i158m_195 {
|
|
705
|
+
display: inline-flex;
|
|
706
|
+
align-items: center;
|
|
707
|
+
justify-content: center;
|
|
708
|
+
width: 1.5rem;
|
|
709
|
+
height: 1.5rem;
|
|
710
|
+
padding: 0;
|
|
711
|
+
border: none;
|
|
712
|
+
background: transparent;
|
|
713
|
+
color: color-mix(in srgb, currentColor 75%, transparent);
|
|
714
|
+
cursor: pointer;
|
|
715
|
+
flex-shrink: 0;
|
|
716
|
+
}
|
|
717
|
+
._removeButton_i158m_195:hover {
|
|
718
|
+
color: inherit;
|
|
719
|
+
}
|
|
720
|
+
._removeButton_i158m_195:active {
|
|
721
|
+
color: inherit;
|
|
722
|
+
}
|
|
723
|
+
._removeButton_i158m_195:disabled {
|
|
724
|
+
opacity: 0.5;
|
|
725
|
+
cursor: not-allowed;
|
|
726
|
+
}
|
|
727
|
+
._trashIcon_i158m_222 {
|
|
728
|
+
width: 1.15rem;
|
|
729
|
+
height: 1.15rem;
|
|
730
|
+
}
|
|
731
|
+
._trashLid_i158m_227 {
|
|
732
|
+
transform-box: fill-box;
|
|
733
|
+
transform-origin: right center;
|
|
734
|
+
transition: transform 160ms ease;
|
|
735
|
+
}
|
|
736
|
+
._removeButton_i158m_195:hover ._trashLid_i158m_227,
|
|
737
|
+
._removeButton_i158m_195:focus-visible ._trashLid_i158m_227 {
|
|
738
|
+
transform: translate(0.5px, -1.5px) rotate(18deg);
|
|
739
|
+
}
|
|
740
|
+
@media (prefers-reduced-motion: reduce) {
|
|
741
|
+
._trashLid_i158m_227 {
|
|
742
|
+
transition: none;
|
|
743
|
+
}
|
|
744
|
+
._removeButton_i158m_195:hover ._trashLid_i158m_227,
|
|
745
|
+
._removeButton_i158m_195:focus-visible ._trashLid_i158m_227 {
|
|
746
|
+
transform: none;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
._large_i158m_249 {
|
|
750
|
+
min-height: 0;
|
|
751
|
+
padding: 0.75rem 1.25rem;
|
|
752
|
+
}
|
|
753
|
+
._large_i158m_249 ._dropzoneTitle_i158m_96 {
|
|
754
|
+
font-size: 1.05rem;
|
|
755
|
+
}
|
|
756
|
+
._small_i158m_258 {
|
|
757
|
+
min-height: 0;
|
|
758
|
+
padding: 0.25rem 0.5rem;
|
|
759
|
+
}
|
|
760
|
+
._small_i158m_258 ._dropzoneTitle_i158m_96 {
|
|
761
|
+
font-size: 0.8rem;
|
|
762
|
+
}
|
|
763
|
+
._small_i158m_258 ._dropzoneHint_i158m_104 {
|
|
764
|
+
font-size: 0.7rem;
|
|
765
|
+
}
|
|
766
|
+
._hasFiles_i158m_271 {
|
|
767
|
+
border-style: solid;
|
|
768
|
+
}
|
|
769
|
+
._dragging_i158m_275 {
|
|
770
|
+
--upload-bg: var(--secondary-color-200);
|
|
771
|
+
border-color: var(--border-accent-color, var(--border-color));
|
|
772
|
+
}
|
|
773
|
+
._disabled_i158m_280 {
|
|
774
|
+
opacity: 0.5;
|
|
775
|
+
cursor: not-allowed;
|
|
776
|
+
}
|
|
777
|
+
._primary_i158m_285 {
|
|
778
|
+
--upload-bg: var(--primary-color-100);
|
|
779
|
+
--border-color: var(--primary-color-300);
|
|
780
|
+
--upload-color: var(--primary-color-800);
|
|
781
|
+
--border-accent-color: var(--primary-color-600);
|
|
782
|
+
}
|
|
783
|
+
._primary_i158m_285:hover,
|
|
784
|
+
._primary_i158m_285:focus-within {
|
|
785
|
+
--upload-bg: var(--primary-color-200);
|
|
786
|
+
}
|
|
787
|
+
._success_i158m_297 {
|
|
788
|
+
--upload-bg: var(--success-color-100);
|
|
789
|
+
--border-color: var(--success-color-300);
|
|
790
|
+
--upload-color: var(--success-color-800);
|
|
791
|
+
--border-accent-color: var(--success-color-600);
|
|
792
|
+
}
|
|
793
|
+
._success_i158m_297:hover,
|
|
794
|
+
._success_i158m_297:focus-within {
|
|
795
|
+
--upload-bg: var(--success-color-200);
|
|
796
|
+
}
|
|
797
|
+
._warning_i158m_309 {
|
|
798
|
+
--upload-bg: var(--warning-color-100);
|
|
799
|
+
--border-color: var(--warning-color-300);
|
|
800
|
+
--upload-color: var(--warning-color-800);
|
|
801
|
+
--border-accent-color: var(--warning-color-600);
|
|
802
|
+
}
|
|
803
|
+
._warning_i158m_309:hover,
|
|
804
|
+
._warning_i158m_309:focus-within {
|
|
805
|
+
--upload-bg: var(--warning-color-200);
|
|
806
|
+
}
|
|
807
|
+
._danger_i158m_321 {
|
|
808
|
+
--upload-bg: var(--danger-color-100);
|
|
809
|
+
--border-color: var(--danger-color-300);
|
|
810
|
+
--upload-color: var(--danger-color-800);
|
|
811
|
+
--border-accent-color: var(--danger-color-600);
|
|
812
|
+
}
|
|
813
|
+
._danger_i158m_321:hover,
|
|
814
|
+
._danger_i158m_321:focus-within {
|
|
815
|
+
--upload-bg: var(--danger-color-200);
|
|
816
|
+
}
|
|
817
|
+
._info_i158m_333 {
|
|
818
|
+
--upload-bg: var(--info-color-100);
|
|
819
|
+
--border-color: var(--info-color-300);
|
|
820
|
+
--upload-color: var(--info-color-800);
|
|
821
|
+
--border-accent-color: var(--info-color-600);
|
|
822
|
+
}
|
|
823
|
+
._info_i158m_333:hover,
|
|
824
|
+
._info_i158m_333:focus-within {
|
|
825
|
+
--upload-bg: var(--info-color-200);
|
|
826
|
+
}
|
|
827
|
+
._secondary_i158m_345 {
|
|
828
|
+
--upload-bg: var(--secondary-color-100);
|
|
829
|
+
--border-color: var(--secondary-color-300);
|
|
830
|
+
--upload-color: var(--secondary-color-800);
|
|
831
|
+
--border-accent-color: var(--secondary-color-600);
|
|
832
|
+
}
|
|
833
|
+
._secondary_i158m_345:hover,
|
|
834
|
+
._secondary_i158m_345:focus-within {
|
|
835
|
+
--upload-bg: var(--secondary-color-200);
|
|
836
|
+
}
|
|
538
837
|
@property --radio-hover-bg {
|
|
539
838
|
syntax: "<color>";
|
|
540
839
|
inherits: true;
|
|
@@ -1104,7 +1403,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1104
1403
|
--button-color: var(--body-color);
|
|
1105
1404
|
}
|
|
1106
1405
|
/* modal.module.css */
|
|
1107
|
-
@keyframes
|
|
1406
|
+
@keyframes _overlayIn_cozou_1 {
|
|
1108
1407
|
from {
|
|
1109
1408
|
opacity: 0;
|
|
1110
1409
|
}
|
|
@@ -1112,7 +1411,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1112
1411
|
opacity: 1;
|
|
1113
1412
|
}
|
|
1114
1413
|
}
|
|
1115
|
-
@keyframes
|
|
1414
|
+
@keyframes _overlayOut_cozou_1 {
|
|
1116
1415
|
from {
|
|
1117
1416
|
opacity: 1;
|
|
1118
1417
|
}
|
|
@@ -1120,7 +1419,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1120
1419
|
opacity: 0;
|
|
1121
1420
|
}
|
|
1122
1421
|
}
|
|
1123
|
-
@keyframes
|
|
1422
|
+
@keyframes _panelIn_cozou_1 {
|
|
1124
1423
|
from {
|
|
1125
1424
|
opacity: 0;
|
|
1126
1425
|
transform: translateX(400px);
|
|
@@ -1130,7 +1429,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1130
1429
|
transform: translateX(0);
|
|
1131
1430
|
}
|
|
1132
1431
|
}
|
|
1133
|
-
@keyframes
|
|
1432
|
+
@keyframes _panelOut_cozou_1 {
|
|
1134
1433
|
from {
|
|
1135
1434
|
opacity: 1;
|
|
1136
1435
|
transform: translateX(0);
|
|
@@ -1140,23 +1439,23 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1140
1439
|
transform: translateX(100%);
|
|
1141
1440
|
}
|
|
1142
1441
|
}
|
|
1143
|
-
.
|
|
1442
|
+
._overlay_cozou_43 {
|
|
1144
1443
|
position: fixed;
|
|
1145
1444
|
inset: 0;
|
|
1146
1445
|
z-index: 98;
|
|
1147
1446
|
}
|
|
1148
|
-
.
|
|
1447
|
+
._overlayBackdrop_cozou_49 {
|
|
1149
1448
|
position: absolute;
|
|
1150
1449
|
inset: 0;
|
|
1151
1450
|
background: color-mix(in srgb, var(--body-bg) 50%, transparent);
|
|
1152
1451
|
}
|
|
1153
|
-
.
|
|
1154
|
-
animation:
|
|
1452
|
+
._overlay_cozou_43[data-state="open"] {
|
|
1453
|
+
animation: _overlayIn_cozou_1 160ms ease-out;
|
|
1155
1454
|
}
|
|
1156
|
-
.
|
|
1157
|
-
animation:
|
|
1455
|
+
._overlay_cozou_43[data-state="closed"] {
|
|
1456
|
+
animation: _overlayOut_cozou_1 120ms ease-in;
|
|
1158
1457
|
}
|
|
1159
|
-
.
|
|
1458
|
+
._content_cozou_63 {
|
|
1160
1459
|
position: fixed;
|
|
1161
1460
|
top: 10px;
|
|
1162
1461
|
right: 10px;
|
|
@@ -1169,19 +1468,20 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1169
1468
|
display: flex;
|
|
1170
1469
|
flex-direction: column;
|
|
1171
1470
|
}
|
|
1172
|
-
.
|
|
1173
|
-
animation:
|
|
1471
|
+
._content_cozou_63[data-state="open"] {
|
|
1472
|
+
animation: _panelIn_cozou_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
1174
1473
|
}
|
|
1175
|
-
.
|
|
1176
|
-
animation:
|
|
1474
|
+
._content_cozou_63[data-state="closed"] {
|
|
1475
|
+
animation: _panelOut_cozou_1 140ms ease-in;
|
|
1177
1476
|
}
|
|
1178
|
-
.
|
|
1477
|
+
._title_cozou_88 {
|
|
1179
1478
|
margin: 0;
|
|
1180
1479
|
}
|
|
1181
|
-
.
|
|
1480
|
+
._body_cozou_92 {
|
|
1182
1481
|
flex: 1;
|
|
1482
|
+
padding-top: 1rem;
|
|
1183
1483
|
}
|
|
1184
|
-
.
|
|
1484
|
+
._footer_cozou_97 {
|
|
1185
1485
|
margin: -12px;
|
|
1186
1486
|
margin-top: 0px;
|
|
1187
1487
|
padding: 12px;
|
|
@@ -1602,7 +1902,7 @@ hr {
|
|
|
1602
1902
|
padding-left: 0.5rem;
|
|
1603
1903
|
padding-right: 0.5rem;
|
|
1604
1904
|
width: 100%;
|
|
1605
|
-
}`)),document.head.appendChild(
|
|
1905
|
+
}`)),document.head.appendChild(n)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
1606
1906
|
"use strict";
|
|
1607
1907
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
1608
1908
|
const React = require("react");
|
|
@@ -1941,35 +2241,35 @@ function clsx() {
|
|
|
1941
2241
|
return n2;
|
|
1942
2242
|
}
|
|
1943
2243
|
const button = "_button_105y0_7";
|
|
1944
|
-
const pageBackground$
|
|
1945
|
-
const large$
|
|
1946
|
-
const small$
|
|
1947
|
-
const disabled$
|
|
1948
|
-
const primary$
|
|
1949
|
-
const success$
|
|
1950
|
-
const warning$
|
|
1951
|
-
const danger$
|
|
1952
|
-
const info$
|
|
1953
|
-
const secondary$
|
|
1954
|
-
const styles$
|
|
2244
|
+
const pageBackground$4 = "_pageBackground_105y0_24";
|
|
2245
|
+
const large$7 = "_large_105y0_34";
|
|
2246
|
+
const small$7 = "_small_105y0_39";
|
|
2247
|
+
const disabled$7 = "_disabled_105y0_44";
|
|
2248
|
+
const primary$9 = "_primary_105y0_51";
|
|
2249
|
+
const success$9 = "_success_105y0_64";
|
|
2250
|
+
const warning$9 = "_warning_105y0_77";
|
|
2251
|
+
const danger$9 = "_danger_105y0_90";
|
|
2252
|
+
const info$9 = "_info_105y0_103";
|
|
2253
|
+
const secondary$9 = "_secondary_105y0_116";
|
|
2254
|
+
const styles$c = {
|
|
1955
2255
|
button,
|
|
1956
|
-
pageBackground: pageBackground$
|
|
1957
|
-
large: large$
|
|
1958
|
-
small: small$
|
|
1959
|
-
disabled: disabled$
|
|
1960
|
-
primary: primary$
|
|
1961
|
-
success: success$
|
|
1962
|
-
warning: warning$
|
|
1963
|
-
danger: danger$
|
|
1964
|
-
info: info$
|
|
1965
|
-
secondary: secondary$
|
|
2256
|
+
pageBackground: pageBackground$4,
|
|
2257
|
+
large: large$7,
|
|
2258
|
+
small: small$7,
|
|
2259
|
+
disabled: disabled$7,
|
|
2260
|
+
primary: primary$9,
|
|
2261
|
+
success: success$9,
|
|
2262
|
+
warning: warning$9,
|
|
2263
|
+
danger: danger$9,
|
|
2264
|
+
info: info$9,
|
|
2265
|
+
secondary: secondary$9
|
|
1966
2266
|
};
|
|
1967
2267
|
const chamfer$1 = "_chamfer_1o5rm_1";
|
|
1968
|
-
const disabled$
|
|
2268
|
+
const disabled$6 = "_disabled_1o5rm_15";
|
|
1969
2269
|
const chamferOnHover = "_chamferOnHover_1o5rm_60";
|
|
1970
2270
|
const chamferStyles = {
|
|
1971
2271
|
chamfer: chamfer$1,
|
|
1972
|
-
disabled: disabled$
|
|
2272
|
+
disabled: disabled$6,
|
|
1973
2273
|
chamferOnHover
|
|
1974
2274
|
};
|
|
1975
2275
|
const hatch$1 = "_hatch_owfoz_1";
|
|
@@ -1984,10 +2284,10 @@ const ThemeContext = React.createContext({
|
|
|
1984
2284
|
});
|
|
1985
2285
|
const useJCUITheme = () => React.useContext(ThemeContext);
|
|
1986
2286
|
const loader = "_loader_1y0fe_1";
|
|
1987
|
-
const styles$
|
|
2287
|
+
const styles$b = {
|
|
1988
2288
|
loader
|
|
1989
2289
|
};
|
|
1990
|
-
const Loader = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$
|
|
2290
|
+
const Loader = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$b.loader, ...props });
|
|
1991
2291
|
function Button({
|
|
1992
2292
|
children: children2,
|
|
1993
2293
|
variant,
|
|
@@ -2001,15 +2301,15 @@ function Button({
|
|
|
2001
2301
|
"button",
|
|
2002
2302
|
{
|
|
2003
2303
|
className: clsx(
|
|
2004
|
-
styles$
|
|
2005
|
-
!variant && styles$
|
|
2006
|
-
styles$
|
|
2304
|
+
styles$c.button,
|
|
2305
|
+
!variant && styles$c.pageBackground,
|
|
2306
|
+
styles$c[variant],
|
|
2007
2307
|
chamfer2 && chamferStyles.chamfer,
|
|
2008
|
-
size2 === "large" && styles$
|
|
2009
|
-
size2 === "small" && styles$
|
|
2308
|
+
size2 === "large" && styles$c.large,
|
|
2309
|
+
size2 === "small" && styles$c.small,
|
|
2010
2310
|
disabled2 && chamferStyles.disabled,
|
|
2011
2311
|
disabled2 && hatchStyles.hatch,
|
|
2012
|
-
disabled2 && styles$
|
|
2312
|
+
disabled2 && styles$c.disabled
|
|
2013
2313
|
),
|
|
2014
2314
|
disabled: disabled2,
|
|
2015
2315
|
...props,
|
|
@@ -2118,32 +2418,32 @@ function requireClassnames() {
|
|
|
2118
2418
|
var classnamesExports = requireClassnames();
|
|
2119
2419
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
2120
2420
|
const card = "_card_et6fi_1";
|
|
2121
|
-
const pageBackground$
|
|
2421
|
+
const pageBackground$3 = "_pageBackground_et6fi_11";
|
|
2122
2422
|
const title$1 = "_title_et6fi_18";
|
|
2123
2423
|
const body$1 = "_body_et6fi_25";
|
|
2124
2424
|
const footer$1 = "_footer_et6fi_30";
|
|
2125
|
-
const large$
|
|
2126
|
-
const small$
|
|
2127
|
-
const primary$
|
|
2128
|
-
const success$
|
|
2129
|
-
const warning$
|
|
2130
|
-
const danger$
|
|
2131
|
-
const info$
|
|
2132
|
-
const secondary$
|
|
2133
|
-
const styles$
|
|
2425
|
+
const large$6 = "_large_et6fi_37";
|
|
2426
|
+
const small$6 = "_small_et6fi_43";
|
|
2427
|
+
const primary$8 = "_primary_et6fi_51";
|
|
2428
|
+
const success$8 = "_success_et6fi_58";
|
|
2429
|
+
const warning$8 = "_warning_et6fi_65";
|
|
2430
|
+
const danger$8 = "_danger_et6fi_72";
|
|
2431
|
+
const info$8 = "_info_et6fi_79";
|
|
2432
|
+
const secondary$8 = "_secondary_et6fi_86";
|
|
2433
|
+
const styles$a = {
|
|
2134
2434
|
card,
|
|
2135
|
-
pageBackground: pageBackground$
|
|
2435
|
+
pageBackground: pageBackground$3,
|
|
2136
2436
|
title: title$1,
|
|
2137
2437
|
body: body$1,
|
|
2138
2438
|
footer: footer$1,
|
|
2139
|
-
large: large$
|
|
2140
|
-
small: small$
|
|
2141
|
-
primary: primary$
|
|
2142
|
-
success: success$
|
|
2143
|
-
warning: warning$
|
|
2144
|
-
danger: danger$
|
|
2145
|
-
info: info$
|
|
2146
|
-
secondary: secondary$
|
|
2439
|
+
large: large$6,
|
|
2440
|
+
small: small$6,
|
|
2441
|
+
primary: primary$8,
|
|
2442
|
+
success: success$8,
|
|
2443
|
+
warning: warning$8,
|
|
2444
|
+
danger: danger$8,
|
|
2445
|
+
info: info$8,
|
|
2446
|
+
secondary: secondary$8
|
|
2147
2447
|
};
|
|
2148
2448
|
function Card({
|
|
2149
2449
|
children: children2,
|
|
@@ -2160,21 +2460,21 @@ function Card({
|
|
|
2160
2460
|
"div",
|
|
2161
2461
|
{
|
|
2162
2462
|
className: classNames(
|
|
2163
|
-
styles$
|
|
2164
|
-
!variant && styles$
|
|
2165
|
-
styles$
|
|
2463
|
+
styles$a.card,
|
|
2464
|
+
!variant && styles$a.pageBackground,
|
|
2465
|
+
styles$a[variant],
|
|
2166
2466
|
chamfer2 && chamferStyles.chamfer,
|
|
2167
|
-
size2 === "large" && styles$
|
|
2168
|
-
size2 === "small" && styles$
|
|
2467
|
+
size2 === "large" && styles$a.large,
|
|
2468
|
+
size2 === "small" && styles$a.small
|
|
2169
2469
|
),
|
|
2170
2470
|
...props,
|
|
2171
2471
|
children: [
|
|
2172
|
-
title2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classNames(styles$
|
|
2173
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$
|
|
2472
|
+
title2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classNames(styles$a.title, hatchStyles.hatch), children: title2 }),
|
|
2473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.body, children: children2 }),
|
|
2174
2474
|
footerHeight > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2175
2475
|
"div",
|
|
2176
2476
|
{
|
|
2177
|
-
className: classNames(hatchStyles.hatch, styles$
|
|
2477
|
+
className: classNames(hatchStyles.hatch, styles$a.footer),
|
|
2178
2478
|
style: { flexBasis: footerHeight },
|
|
2179
2479
|
children: footer2
|
|
2180
2480
|
}
|
|
@@ -2905,34 +3205,34 @@ function getState$2(checked) {
|
|
|
2905
3205
|
return isIndeterminate$1(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
2906
3206
|
}
|
|
2907
3207
|
const wrapper$1 = "_wrapper_178xv_25";
|
|
2908
|
-
const disabled$
|
|
2909
|
-
const root$
|
|
3208
|
+
const disabled$5 = "_disabled_178xv_34";
|
|
3209
|
+
const root$3 = "_root_178xv_39";
|
|
2910
3210
|
const indicator$1 = "_indicator_178xv_76";
|
|
2911
|
-
const large$
|
|
2912
|
-
const small$
|
|
3211
|
+
const large$5 = "_large_178xv_94";
|
|
3212
|
+
const small$5 = "_small_178xv_99";
|
|
2913
3213
|
const disabledBox = "_disabledBox_178xv_104";
|
|
2914
|
-
const label$
|
|
2915
|
-
const primary$
|
|
2916
|
-
const secondary$
|
|
2917
|
-
const success$
|
|
2918
|
-
const warning$
|
|
2919
|
-
const danger$
|
|
2920
|
-
const info$
|
|
2921
|
-
const styles$
|
|
3214
|
+
const label$3 = "_label_178xv_109";
|
|
3215
|
+
const primary$7 = "_primary_178xv_117";
|
|
3216
|
+
const secondary$7 = "_secondary_178xv_126";
|
|
3217
|
+
const success$7 = "_success_178xv_135";
|
|
3218
|
+
const warning$7 = "_warning_178xv_144";
|
|
3219
|
+
const danger$7 = "_danger_178xv_153";
|
|
3220
|
+
const info$7 = "_info_178xv_162";
|
|
3221
|
+
const styles$9 = {
|
|
2922
3222
|
wrapper: wrapper$1,
|
|
2923
|
-
disabled: disabled$
|
|
2924
|
-
root: root$
|
|
3223
|
+
disabled: disabled$5,
|
|
3224
|
+
root: root$3,
|
|
2925
3225
|
indicator: indicator$1,
|
|
2926
|
-
large: large$
|
|
2927
|
-
small: small$
|
|
3226
|
+
large: large$5,
|
|
3227
|
+
small: small$5,
|
|
2928
3228
|
disabledBox,
|
|
2929
|
-
label: label$
|
|
2930
|
-
primary: primary$
|
|
2931
|
-
secondary: secondary$
|
|
2932
|
-
success: success$
|
|
2933
|
-
warning: warning$
|
|
2934
|
-
danger: danger$
|
|
2935
|
-
info: info$
|
|
3229
|
+
label: label$3,
|
|
3230
|
+
primary: primary$7,
|
|
3231
|
+
secondary: secondary$7,
|
|
3232
|
+
success: success$7,
|
|
3233
|
+
warning: warning$7,
|
|
3234
|
+
danger: danger$7,
|
|
3235
|
+
info: info$7
|
|
2936
3236
|
};
|
|
2937
3237
|
const CheckIcon = () => /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { viewBox: "0 0 24 24", fill: "none", role: "presentation", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2938
3238
|
"polyline",
|
|
@@ -2955,32 +3255,32 @@ function Checkbox({
|
|
|
2955
3255
|
...props
|
|
2956
3256
|
}) {
|
|
2957
3257
|
const labelContent = label2 ?? children2;
|
|
2958
|
-
const variantClass = variant && styles$
|
|
2959
|
-
const sizeClass = size2 === "large" ? styles$
|
|
3258
|
+
const variantClass = variant && styles$9[variant];
|
|
3259
|
+
const sizeClass = size2 === "large" ? styles$9.large : size2 === "small" ? styles$9.small : null;
|
|
2960
3260
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2961
3261
|
"label",
|
|
2962
3262
|
{
|
|
2963
|
-
className: clsx(styles$
|
|
3263
|
+
className: clsx(styles$9.wrapper, variantClass, disabled2 && styles$9.disabled),
|
|
2964
3264
|
children: [
|
|
2965
3265
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2966
3266
|
Checkbox$1,
|
|
2967
3267
|
{
|
|
2968
3268
|
className: clsx(
|
|
2969
|
-
styles$
|
|
3269
|
+
styles$9.root,
|
|
2970
3270
|
variantClass,
|
|
2971
3271
|
sizeClass,
|
|
2972
3272
|
chamfer2 && chamferStyles.chamfer,
|
|
2973
3273
|
disabled2 && chamferStyles.disabled,
|
|
2974
3274
|
disabled2 && hatchStyles.hatch,
|
|
2975
|
-
disabled2 && styles$
|
|
3275
|
+
disabled2 && styles$9.disabledBox,
|
|
2976
3276
|
className
|
|
2977
3277
|
),
|
|
2978
3278
|
disabled: disabled2,
|
|
2979
3279
|
...props,
|
|
2980
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckboxIndicator, { className: styles$
|
|
3280
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckboxIndicator, { className: styles$9.indicator, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, {}) })
|
|
2981
3281
|
}
|
|
2982
3282
|
),
|
|
2983
|
-
labelContent && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$
|
|
3283
|
+
labelContent && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$9.label, children: labelContent })
|
|
2984
3284
|
]
|
|
2985
3285
|
}
|
|
2986
3286
|
);
|
|
@@ -4430,13 +4730,13 @@ function* selection_iterator() {
|
|
|
4430
4730
|
}
|
|
4431
4731
|
}
|
|
4432
4732
|
}
|
|
4433
|
-
var root$
|
|
4733
|
+
var root$2 = [null];
|
|
4434
4734
|
function Selection$1(groups, parents) {
|
|
4435
4735
|
this._groups = groups;
|
|
4436
4736
|
this._parents = parents;
|
|
4437
4737
|
}
|
|
4438
4738
|
function selection() {
|
|
4439
|
-
return new Selection$1([[document.documentElement]], root$
|
|
4739
|
+
return new Selection$1([[document.documentElement]], root$2);
|
|
4440
4740
|
}
|
|
4441
4741
|
function selection_selection() {
|
|
4442
4742
|
return this;
|
|
@@ -4480,7 +4780,7 @@ Selection$1.prototype = selection.prototype = {
|
|
|
4480
4780
|
[Symbol.iterator]: selection_iterator
|
|
4481
4781
|
};
|
|
4482
4782
|
function select(selector2) {
|
|
4483
|
-
return typeof selector2 === "string" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]], root$
|
|
4783
|
+
return typeof selector2 === "string" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]], root$2);
|
|
4484
4784
|
}
|
|
4485
4785
|
function sourceEvent(event) {
|
|
4486
4786
|
let sourceEvent2;
|
|
@@ -13830,7 +14130,7 @@ let nextClipId = 0;
|
|
|
13830
14130
|
function getClipId() {
|
|
13831
14131
|
return `plot-clip-${++nextClipId}`;
|
|
13832
14132
|
}
|
|
13833
|
-
function styles$
|
|
14133
|
+
function styles$8(mark, {
|
|
13834
14134
|
title: title2,
|
|
13835
14135
|
href,
|
|
13836
14136
|
ariaLabel: variaLabel,
|
|
@@ -14196,7 +14496,7 @@ class Mark {
|
|
|
14196
14496
|
this.facetAnchor = maybeFacetAnchor(facetAnchor);
|
|
14197
14497
|
channels = maybeNamed(channels);
|
|
14198
14498
|
if (extraChannels !== void 0) channels = { ...maybeChannels(extraChannels), ...channels };
|
|
14199
|
-
if (defaults2 !== void 0) channels = { ...styles$
|
|
14499
|
+
if (defaults2 !== void 0) channels = { ...styles$8(this, options, defaults2), ...channels };
|
|
14200
14500
|
this.channels = Object.fromEntries(
|
|
14201
14501
|
Object.entries(channels).map(([name, channel]) => {
|
|
14202
14502
|
if (isOptions(channel.value)) {
|
|
@@ -19222,33 +19522,33 @@ const RadarChart = ({
|
|
|
19222
19522
|
});
|
|
19223
19523
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ObservablePlot, { options, className, style });
|
|
19224
19524
|
};
|
|
19225
|
-
const input = "_input_1ymvl_7";
|
|
19226
|
-
const pageBackground$
|
|
19227
|
-
const large$
|
|
19228
|
-
const small$
|
|
19229
|
-
const disabled$
|
|
19230
|
-
const primary$
|
|
19231
|
-
const success$
|
|
19232
|
-
const warning$
|
|
19233
|
-
const danger$
|
|
19234
|
-
const info$
|
|
19235
|
-
const secondary$
|
|
19525
|
+
const input$1 = "_input_1ymvl_7";
|
|
19526
|
+
const pageBackground$2 = "_pageBackground_1ymvl_24";
|
|
19527
|
+
const large$4 = "_large_1ymvl_38";
|
|
19528
|
+
const small$4 = "_small_1ymvl_43";
|
|
19529
|
+
const disabled$4 = "_disabled_1ymvl_48";
|
|
19530
|
+
const primary$6 = "_primary_1ymvl_55";
|
|
19531
|
+
const success$6 = "_success_1ymvl_64";
|
|
19532
|
+
const warning$6 = "_warning_1ymvl_72";
|
|
19533
|
+
const danger$6 = "_danger_1ymvl_80";
|
|
19534
|
+
const info$6 = "_info_1ymvl_88";
|
|
19535
|
+
const secondary$6 = "_secondary_1ymvl_97";
|
|
19236
19536
|
const field = "_field_1ymvl_106";
|
|
19237
|
-
const label$
|
|
19238
|
-
const styles$
|
|
19239
|
-
input,
|
|
19240
|
-
pageBackground: pageBackground$
|
|
19241
|
-
large: large$
|
|
19242
|
-
small: small$
|
|
19243
|
-
disabled: disabled$
|
|
19244
|
-
primary: primary$
|
|
19245
|
-
success: success$
|
|
19246
|
-
warning: warning$
|
|
19247
|
-
danger: danger$
|
|
19248
|
-
info: info$
|
|
19249
|
-
secondary: secondary$
|
|
19537
|
+
const label$2 = "_label_1ymvl_112";
|
|
19538
|
+
const styles$7 = {
|
|
19539
|
+
input: input$1,
|
|
19540
|
+
pageBackground: pageBackground$2,
|
|
19541
|
+
large: large$4,
|
|
19542
|
+
small: small$4,
|
|
19543
|
+
disabled: disabled$4,
|
|
19544
|
+
primary: primary$6,
|
|
19545
|
+
success: success$6,
|
|
19546
|
+
warning: warning$6,
|
|
19547
|
+
danger: danger$6,
|
|
19548
|
+
info: info$6,
|
|
19549
|
+
secondary: secondary$6,
|
|
19250
19550
|
field,
|
|
19251
|
-
label: label$
|
|
19551
|
+
label: label$2
|
|
19252
19552
|
};
|
|
19253
19553
|
function Input({
|
|
19254
19554
|
variant,
|
|
@@ -19259,28 +19559,28 @@ function Input({
|
|
|
19259
19559
|
...props
|
|
19260
19560
|
}) {
|
|
19261
19561
|
const inputId = React.useId();
|
|
19262
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$
|
|
19263
|
-
label2 && /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: styles$
|
|
19562
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$7.field, children: [
|
|
19563
|
+
label2 && /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: styles$7.label, htmlFor: inputId, children: label2 }),
|
|
19264
19564
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19265
19565
|
"div",
|
|
19266
19566
|
{
|
|
19267
19567
|
className: classNames(
|
|
19268
19568
|
chamfer2 && chamferStyles.chamfer,
|
|
19269
|
-
!variant && styles$
|
|
19270
|
-
styles$
|
|
19569
|
+
!variant && styles$7.pageBackground,
|
|
19570
|
+
styles$7[variant]
|
|
19271
19571
|
),
|
|
19272
19572
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19273
19573
|
"input",
|
|
19274
19574
|
{
|
|
19275
19575
|
id: inputId,
|
|
19276
19576
|
className: classNames(
|
|
19277
|
-
styles$
|
|
19278
|
-
!variant && styles$
|
|
19279
|
-
styles$
|
|
19280
|
-
size2 === "large" && styles$
|
|
19281
|
-
size2 === "small" && styles$
|
|
19577
|
+
styles$7.input,
|
|
19578
|
+
!variant && styles$7.pageBackground,
|
|
19579
|
+
styles$7[variant],
|
|
19580
|
+
size2 === "large" && styles$7.large,
|
|
19581
|
+
size2 === "small" && styles$7.small,
|
|
19282
19582
|
disabled2 && chamferStyles.disabled,
|
|
19283
|
-
disabled2 && styles$
|
|
19583
|
+
disabled2 && styles$7.disabled,
|
|
19284
19584
|
disabled2 && hatchStyles.hatch
|
|
19285
19585
|
),
|
|
19286
19586
|
disabled: disabled2,
|
|
@@ -19295,6 +19595,520 @@ function Input({
|
|
|
19295
19595
|
)
|
|
19296
19596
|
] });
|
|
19297
19597
|
}
|
|
19598
|
+
const root$1 = "_root_i158m_7";
|
|
19599
|
+
const label$1 = "_label_i158m_14";
|
|
19600
|
+
const dropzone = "_dropzone_i158m_18";
|
|
19601
|
+
const pageBackground$1 = "_pageBackground_i158m_42";
|
|
19602
|
+
const input = "_input_i158m_54";
|
|
19603
|
+
const dropzoneContent = "_dropzoneContent_i158m_67";
|
|
19604
|
+
const dropzoneIcon = "_dropzoneIcon_i158m_74";
|
|
19605
|
+
const dropzoneText = "_dropzoneText_i158m_90";
|
|
19606
|
+
const dropzoneTitle = "_dropzoneTitle_i158m_96";
|
|
19607
|
+
const dropzoneHint = "_dropzoneHint_i158m_104";
|
|
19608
|
+
const helperText = "_helperText_i158m_109";
|
|
19609
|
+
const fileList = "_fileList_i158m_115";
|
|
19610
|
+
const fileItem = "_fileItem_i158m_121";
|
|
19611
|
+
const fileInfo = "_fileInfo_i158m_132";
|
|
19612
|
+
const filePreview = "_filePreview_i158m_140";
|
|
19613
|
+
const filePreviewImage = "_filePreviewImage_i158m_157";
|
|
19614
|
+
const fileMeta = "_fileMeta_i158m_163";
|
|
19615
|
+
const fileName = "_fileName_i158m_170";
|
|
19616
|
+
const fileSize = "_fileSize_i158m_177";
|
|
19617
|
+
const customFileRow = "_customFileRow_i158m_182";
|
|
19618
|
+
const customFile = "_customFile_i158m_182";
|
|
19619
|
+
const removeButton = "_removeButton_i158m_195";
|
|
19620
|
+
const trashIcon = "_trashIcon_i158m_222";
|
|
19621
|
+
const trashLid = "_trashLid_i158m_227";
|
|
19622
|
+
const large$3 = "_large_i158m_249";
|
|
19623
|
+
const small$3 = "_small_i158m_258";
|
|
19624
|
+
const hasFiles = "_hasFiles_i158m_271";
|
|
19625
|
+
const dragging = "_dragging_i158m_275";
|
|
19626
|
+
const disabled$3 = "_disabled_i158m_280";
|
|
19627
|
+
const primary$5 = "_primary_i158m_285";
|
|
19628
|
+
const success$5 = "_success_i158m_297";
|
|
19629
|
+
const warning$5 = "_warning_i158m_309";
|
|
19630
|
+
const danger$5 = "_danger_i158m_321";
|
|
19631
|
+
const info$5 = "_info_i158m_333";
|
|
19632
|
+
const secondary$5 = "_secondary_i158m_345";
|
|
19633
|
+
const styles$6 = {
|
|
19634
|
+
root: root$1,
|
|
19635
|
+
label: label$1,
|
|
19636
|
+
dropzone,
|
|
19637
|
+
pageBackground: pageBackground$1,
|
|
19638
|
+
input,
|
|
19639
|
+
dropzoneContent,
|
|
19640
|
+
dropzoneIcon,
|
|
19641
|
+
dropzoneText,
|
|
19642
|
+
dropzoneTitle,
|
|
19643
|
+
dropzoneHint,
|
|
19644
|
+
helperText,
|
|
19645
|
+
fileList,
|
|
19646
|
+
fileItem,
|
|
19647
|
+
fileInfo,
|
|
19648
|
+
filePreview,
|
|
19649
|
+
filePreviewImage,
|
|
19650
|
+
fileMeta,
|
|
19651
|
+
fileName,
|
|
19652
|
+
fileSize,
|
|
19653
|
+
customFileRow,
|
|
19654
|
+
customFile,
|
|
19655
|
+
removeButton,
|
|
19656
|
+
trashIcon,
|
|
19657
|
+
trashLid,
|
|
19658
|
+
large: large$3,
|
|
19659
|
+
small: small$3,
|
|
19660
|
+
hasFiles,
|
|
19661
|
+
dragging,
|
|
19662
|
+
disabled: disabled$3,
|
|
19663
|
+
primary: primary$5,
|
|
19664
|
+
success: success$5,
|
|
19665
|
+
warning: warning$5,
|
|
19666
|
+
danger: danger$5,
|
|
19667
|
+
info: info$5,
|
|
19668
|
+
secondary: secondary$5
|
|
19669
|
+
};
|
|
19670
|
+
const normalizeFiles = (value, multiple = false) => {
|
|
19671
|
+
if (!value) {
|
|
19672
|
+
return [];
|
|
19673
|
+
}
|
|
19674
|
+
if (typeof value === "string") {
|
|
19675
|
+
return [value];
|
|
19676
|
+
}
|
|
19677
|
+
if (typeof File !== "undefined" && value instanceof File) {
|
|
19678
|
+
return [value];
|
|
19679
|
+
}
|
|
19680
|
+
const normalized = Array.isArray(value) ? value.filter(Boolean) : typeof value?.length === "number" || typeof value?.[Symbol.iterator] === "function" ? Array.from(value).filter(Boolean) : [value];
|
|
19681
|
+
return multiple ? normalized : normalized.slice(0, 1);
|
|
19682
|
+
};
|
|
19683
|
+
const formatFileSize = (size2) => {
|
|
19684
|
+
if (typeof size2 !== "number" || Number.isNaN(size2)) {
|
|
19685
|
+
return null;
|
|
19686
|
+
}
|
|
19687
|
+
if (size2 < 1024) {
|
|
19688
|
+
return `${size2} B`;
|
|
19689
|
+
}
|
|
19690
|
+
if (size2 < 1024 * 1024) {
|
|
19691
|
+
return `${Math.round(size2 / 1024)} KB`;
|
|
19692
|
+
}
|
|
19693
|
+
return `${(size2 / (1024 * 1024)).toFixed(1)} MB`;
|
|
19694
|
+
};
|
|
19695
|
+
const isImageFile = (file) => {
|
|
19696
|
+
if (typeof File === "undefined") {
|
|
19697
|
+
return false;
|
|
19698
|
+
}
|
|
19699
|
+
return file instanceof File && typeof file.type === "string" ? file.type.startsWith("image/") : false;
|
|
19700
|
+
};
|
|
19701
|
+
const UploadIcon = () => /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", role: "presentation", "aria-hidden": true, children: [
|
|
19702
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
19703
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19704
|
+
"path",
|
|
19705
|
+
{
|
|
19706
|
+
d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",
|
|
19707
|
+
stroke: "currentColor",
|
|
19708
|
+
strokeWidth: "2",
|
|
19709
|
+
strokeLinecap: "round",
|
|
19710
|
+
strokeLinejoin: "round"
|
|
19711
|
+
}
|
|
19712
|
+
),
|
|
19713
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19714
|
+
"path",
|
|
19715
|
+
{
|
|
19716
|
+
d: "M7 9l5 -5l5 5",
|
|
19717
|
+
stroke: "currentColor",
|
|
19718
|
+
strokeWidth: "2",
|
|
19719
|
+
strokeLinecap: "round",
|
|
19720
|
+
strokeLinejoin: "round"
|
|
19721
|
+
}
|
|
19722
|
+
),
|
|
19723
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19724
|
+
"path",
|
|
19725
|
+
{
|
|
19726
|
+
d: "M12 4l0 12",
|
|
19727
|
+
stroke: "currentColor",
|
|
19728
|
+
strokeWidth: "2",
|
|
19729
|
+
strokeLinecap: "round",
|
|
19730
|
+
strokeLinejoin: "round"
|
|
19731
|
+
}
|
|
19732
|
+
)
|
|
19733
|
+
] });
|
|
19734
|
+
const FileIcon = () => /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", role: "presentation", "aria-hidden": true, children: [
|
|
19735
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19736
|
+
"path",
|
|
19737
|
+
{
|
|
19738
|
+
d: "M8 3.5H14.5L19.5 8.5V20.5H8C6.9 20.5 6 19.6 6 18.5V5.5C6 4.4 6.9 3.5 8 3.5Z",
|
|
19739
|
+
stroke: "currentColor",
|
|
19740
|
+
strokeWidth: "1.5",
|
|
19741
|
+
strokeLinejoin: "round"
|
|
19742
|
+
}
|
|
19743
|
+
),
|
|
19744
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14.5 3.5V8.5H19.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
19745
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19746
|
+
"path",
|
|
19747
|
+
{
|
|
19748
|
+
d: "M9.5 12H16",
|
|
19749
|
+
stroke: "currentColor",
|
|
19750
|
+
strokeWidth: "1.5",
|
|
19751
|
+
strokeLinecap: "round"
|
|
19752
|
+
}
|
|
19753
|
+
),
|
|
19754
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19755
|
+
"path",
|
|
19756
|
+
{
|
|
19757
|
+
d: "M9.5 15H14",
|
|
19758
|
+
stroke: "currentColor",
|
|
19759
|
+
strokeWidth: "1.5",
|
|
19760
|
+
strokeLinecap: "round"
|
|
19761
|
+
}
|
|
19762
|
+
)
|
|
19763
|
+
] });
|
|
19764
|
+
const TrashIcon = () => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
19765
|
+
"svg",
|
|
19766
|
+
{
|
|
19767
|
+
viewBox: "0 0 24 24",
|
|
19768
|
+
fill: "none",
|
|
19769
|
+
role: "presentation",
|
|
19770
|
+
"aria-hidden": true,
|
|
19771
|
+
className: styles$6.trashIcon,
|
|
19772
|
+
children: [
|
|
19773
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("g", { className: styles$6.trashLid, children: [
|
|
19774
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19775
|
+
"path",
|
|
19776
|
+
{
|
|
19777
|
+
d: "M4 7h16",
|
|
19778
|
+
stroke: "currentColor",
|
|
19779
|
+
strokeWidth: "1.75",
|
|
19780
|
+
strokeLinecap: "round",
|
|
19781
|
+
strokeLinejoin: "round"
|
|
19782
|
+
}
|
|
19783
|
+
),
|
|
19784
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19785
|
+
"path",
|
|
19786
|
+
{
|
|
19787
|
+
d: "M9 7V5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v2",
|
|
19788
|
+
stroke: "currentColor",
|
|
19789
|
+
strokeWidth: "1.75",
|
|
19790
|
+
strokeLinecap: "round",
|
|
19791
|
+
strokeLinejoin: "round"
|
|
19792
|
+
}
|
|
19793
|
+
)
|
|
19794
|
+
] }),
|
|
19795
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19796
|
+
"path",
|
|
19797
|
+
{
|
|
19798
|
+
d: "M10 11v6",
|
|
19799
|
+
stroke: "currentColor",
|
|
19800
|
+
strokeWidth: "1.75",
|
|
19801
|
+
strokeLinecap: "round",
|
|
19802
|
+
strokeLinejoin: "round"
|
|
19803
|
+
}
|
|
19804
|
+
),
|
|
19805
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19806
|
+
"path",
|
|
19807
|
+
{
|
|
19808
|
+
d: "M14 11v6",
|
|
19809
|
+
stroke: "currentColor",
|
|
19810
|
+
strokeWidth: "1.75",
|
|
19811
|
+
strokeLinecap: "round",
|
|
19812
|
+
strokeLinejoin: "round"
|
|
19813
|
+
}
|
|
19814
|
+
),
|
|
19815
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19816
|
+
"path",
|
|
19817
|
+
{
|
|
19818
|
+
d: "M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2 -2l1 -12",
|
|
19819
|
+
stroke: "currentColor",
|
|
19820
|
+
strokeWidth: "1.75",
|
|
19821
|
+
strokeLinecap: "round",
|
|
19822
|
+
strokeLinejoin: "round"
|
|
19823
|
+
}
|
|
19824
|
+
)
|
|
19825
|
+
]
|
|
19826
|
+
}
|
|
19827
|
+
);
|
|
19828
|
+
const FileUpload = React.forwardRef(function FileUpload2({
|
|
19829
|
+
label: label2,
|
|
19830
|
+
helperText: helperText2,
|
|
19831
|
+
placeholder = "Click to upload or drag and drop",
|
|
19832
|
+
dropHint,
|
|
19833
|
+
icon: icon2,
|
|
19834
|
+
files,
|
|
19835
|
+
onFilesChange,
|
|
19836
|
+
renderFile,
|
|
19837
|
+
showFileList = true,
|
|
19838
|
+
removable = true,
|
|
19839
|
+
onFileRemove,
|
|
19840
|
+
className,
|
|
19841
|
+
dropzoneClassName,
|
|
19842
|
+
variant,
|
|
19843
|
+
size: size2,
|
|
19844
|
+
chamfer: chamfer2 = true,
|
|
19845
|
+
disabled: disabled2,
|
|
19846
|
+
id: providedId,
|
|
19847
|
+
children: children2,
|
|
19848
|
+
...inputProps
|
|
19849
|
+
}, ref) {
|
|
19850
|
+
const autoId = React.useId();
|
|
19851
|
+
const inputId = providedId ?? `file-upload-${autoId}`;
|
|
19852
|
+
const inputRef = React.useRef(null);
|
|
19853
|
+
const dragCounterRef = React.useRef(0);
|
|
19854
|
+
const [isDragging, setIsDragging] = React.useState(false);
|
|
19855
|
+
const [internalFiles, setInternalFiles] = React.useState([]);
|
|
19856
|
+
const multiple = Boolean(inputProps.multiple);
|
|
19857
|
+
const controlledFiles = React.useMemo(
|
|
19858
|
+
() => normalizeFiles(files, multiple),
|
|
19859
|
+
[files, multiple]
|
|
19860
|
+
);
|
|
19861
|
+
const selectedFiles = files === void 0 ? internalFiles : controlledFiles;
|
|
19862
|
+
const previewItems = React.useMemo(
|
|
19863
|
+
() => selectedFiles.map((file, index2) => {
|
|
19864
|
+
const name = typeof file?.name === "string" && file.name.length > 0 ? file.name : `File ${index2 + 1}`;
|
|
19865
|
+
return {
|
|
19866
|
+
file,
|
|
19867
|
+
name,
|
|
19868
|
+
previewUrl: isImageFile(file) ? URL.createObjectURL(file) : null,
|
|
19869
|
+
sizeText: formatFileSize(file?.size)
|
|
19870
|
+
};
|
|
19871
|
+
}),
|
|
19872
|
+
[selectedFiles]
|
|
19873
|
+
);
|
|
19874
|
+
React.useEffect(() => {
|
|
19875
|
+
return () => {
|
|
19876
|
+
previewItems.forEach(({ previewUrl }) => {
|
|
19877
|
+
if (previewUrl) {
|
|
19878
|
+
URL.revokeObjectURL(previewUrl);
|
|
19879
|
+
}
|
|
19880
|
+
});
|
|
19881
|
+
};
|
|
19882
|
+
}, [previewItems]);
|
|
19883
|
+
const setInputNode = (node) => {
|
|
19884
|
+
inputRef.current = node;
|
|
19885
|
+
if (typeof ref === "function") {
|
|
19886
|
+
ref(node);
|
|
19887
|
+
return;
|
|
19888
|
+
}
|
|
19889
|
+
if (ref) {
|
|
19890
|
+
ref.current = node;
|
|
19891
|
+
}
|
|
19892
|
+
};
|
|
19893
|
+
const commitFiles = (nextFiles, event) => {
|
|
19894
|
+
if (files === void 0) {
|
|
19895
|
+
setInternalFiles(nextFiles);
|
|
19896
|
+
}
|
|
19897
|
+
onFilesChange?.(nextFiles, event);
|
|
19898
|
+
};
|
|
19899
|
+
const handleInputChange = (event) => {
|
|
19900
|
+
const nextFiles = normalizeFiles(event.target.files, multiple);
|
|
19901
|
+
commitFiles(nextFiles, event);
|
|
19902
|
+
inputProps.onChange?.(event);
|
|
19903
|
+
};
|
|
19904
|
+
const syncFilesToInput = (nextFiles, triggerEvent) => {
|
|
19905
|
+
const inputNode = inputRef.current;
|
|
19906
|
+
if (!inputNode) {
|
|
19907
|
+
commitFiles(nextFiles, triggerEvent);
|
|
19908
|
+
return;
|
|
19909
|
+
}
|
|
19910
|
+
if (nextFiles.length === 0) {
|
|
19911
|
+
inputNode.value = "";
|
|
19912
|
+
}
|
|
19913
|
+
if (typeof DataTransfer !== "undefined") {
|
|
19914
|
+
try {
|
|
19915
|
+
const transfer = new DataTransfer();
|
|
19916
|
+
nextFiles.forEach((file) => {
|
|
19917
|
+
if (typeof File !== "undefined" && file instanceof File) {
|
|
19918
|
+
transfer.items.add(file);
|
|
19919
|
+
}
|
|
19920
|
+
});
|
|
19921
|
+
inputNode.files = transfer.files;
|
|
19922
|
+
inputNode.dispatchEvent(new Event("change", { bubbles: true }));
|
|
19923
|
+
return;
|
|
19924
|
+
} catch {
|
|
19925
|
+
}
|
|
19926
|
+
}
|
|
19927
|
+
if (nextFiles.length === 0) {
|
|
19928
|
+
inputNode.dispatchEvent(new Event("change", { bubbles: true }));
|
|
19929
|
+
return;
|
|
19930
|
+
}
|
|
19931
|
+
commitFiles(nextFiles, triggerEvent);
|
|
19932
|
+
};
|
|
19933
|
+
const handleDropzoneClick = () => {
|
|
19934
|
+
if (disabled2) {
|
|
19935
|
+
return;
|
|
19936
|
+
}
|
|
19937
|
+
inputRef.current?.click();
|
|
19938
|
+
};
|
|
19939
|
+
const handleDropzoneKeyDown = (event) => {
|
|
19940
|
+
if (disabled2) {
|
|
19941
|
+
return;
|
|
19942
|
+
}
|
|
19943
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
19944
|
+
event.preventDefault();
|
|
19945
|
+
inputRef.current?.click();
|
|
19946
|
+
}
|
|
19947
|
+
};
|
|
19948
|
+
const handleDragEnter = (event) => {
|
|
19949
|
+
event.preventDefault();
|
|
19950
|
+
event.stopPropagation();
|
|
19951
|
+
inputProps.onDragEnter?.(event);
|
|
19952
|
+
if (disabled2 || !event.dataTransfer?.types?.includes("Files")) {
|
|
19953
|
+
return;
|
|
19954
|
+
}
|
|
19955
|
+
dragCounterRef.current += 1;
|
|
19956
|
+
setIsDragging(true);
|
|
19957
|
+
};
|
|
19958
|
+
const handleDragOver = (event) => {
|
|
19959
|
+
event.preventDefault();
|
|
19960
|
+
event.stopPropagation();
|
|
19961
|
+
inputProps.onDragOver?.(event);
|
|
19962
|
+
if (disabled2) {
|
|
19963
|
+
return;
|
|
19964
|
+
}
|
|
19965
|
+
event.dataTransfer.dropEffect = "copy";
|
|
19966
|
+
};
|
|
19967
|
+
const handleDragLeave = (event) => {
|
|
19968
|
+
event.preventDefault();
|
|
19969
|
+
event.stopPropagation();
|
|
19970
|
+
inputProps.onDragLeave?.(event);
|
|
19971
|
+
if (disabled2) {
|
|
19972
|
+
return;
|
|
19973
|
+
}
|
|
19974
|
+
dragCounterRef.current -= 1;
|
|
19975
|
+
if (dragCounterRef.current <= 0) {
|
|
19976
|
+
dragCounterRef.current = 0;
|
|
19977
|
+
setIsDragging(false);
|
|
19978
|
+
}
|
|
19979
|
+
};
|
|
19980
|
+
const handleDrop = (event) => {
|
|
19981
|
+
event.preventDefault();
|
|
19982
|
+
event.stopPropagation();
|
|
19983
|
+
inputProps.onDrop?.(event);
|
|
19984
|
+
dragCounterRef.current = 0;
|
|
19985
|
+
setIsDragging(false);
|
|
19986
|
+
if (disabled2) {
|
|
19987
|
+
return;
|
|
19988
|
+
}
|
|
19989
|
+
const nextFiles = normalizeFiles(event.dataTransfer?.files, multiple);
|
|
19990
|
+
if (nextFiles.length === 0) {
|
|
19991
|
+
return;
|
|
19992
|
+
}
|
|
19993
|
+
syncFilesToInput(nextFiles, event);
|
|
19994
|
+
};
|
|
19995
|
+
const handleRemoveFile = (index2, event) => {
|
|
19996
|
+
event.preventDefault();
|
|
19997
|
+
event.stopPropagation();
|
|
19998
|
+
if (disabled2) {
|
|
19999
|
+
return;
|
|
20000
|
+
}
|
|
20001
|
+
const removedFile = selectedFiles[index2];
|
|
20002
|
+
const nextFiles = selectedFiles.filter((_2, currentIndex) => {
|
|
20003
|
+
return currentIndex !== index2;
|
|
20004
|
+
});
|
|
20005
|
+
syncFilesToInput(nextFiles, event);
|
|
20006
|
+
onFileRemove?.(removedFile, index2, event);
|
|
20007
|
+
};
|
|
20008
|
+
const hintText = dropHint ?? (multiple ? "Drop files here or click to add more." : "Drop a file here or click to browse.");
|
|
20009
|
+
const selectedSummary = selectedFiles.length > 0 ? `${selectedFiles.length} file${selectedFiles.length === 1 ? "" : "s"} selected` : placeholder;
|
|
20010
|
+
const dropzoneIcon2 = icon2 ?? /* @__PURE__ */ jsxRuntimeExports.jsx(UploadIcon, {});
|
|
20011
|
+
const fileFallbackIcon = icon2 ?? /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, {});
|
|
20012
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$6.root, className), children: [
|
|
20013
|
+
label2 && /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: styles$6.label, htmlFor: inputId, children: label2 }),
|
|
20014
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
20015
|
+
"div",
|
|
20016
|
+
{
|
|
20017
|
+
className: clsx(
|
|
20018
|
+
styles$6.dropzone,
|
|
20019
|
+
!variant && styles$6.pageBackground,
|
|
20020
|
+
variant && styles$6[variant],
|
|
20021
|
+
chamfer2 && chamferStyles.chamfer,
|
|
20022
|
+
size2 === "large" && styles$6.large,
|
|
20023
|
+
size2 === "small" && styles$6.small,
|
|
20024
|
+
disabled2 && styles$6.disabled,
|
|
20025
|
+
disabled2 && chamferStyles.disabled,
|
|
20026
|
+
disabled2 && hatchStyles.hatch,
|
|
20027
|
+
isDragging && styles$6.dragging,
|
|
20028
|
+
selectedFiles.length > 0 && styles$6.hasFiles,
|
|
20029
|
+
dropzoneClassName
|
|
20030
|
+
),
|
|
20031
|
+
onClick: handleDropzoneClick,
|
|
20032
|
+
onKeyDown: handleDropzoneKeyDown,
|
|
20033
|
+
onDragEnter: handleDragEnter,
|
|
20034
|
+
onDragOver: handleDragOver,
|
|
20035
|
+
onDragLeave: handleDragLeave,
|
|
20036
|
+
onDrop: handleDrop,
|
|
20037
|
+
role: "button",
|
|
20038
|
+
tabIndex: disabled2 ? -1 : 0,
|
|
20039
|
+
"aria-disabled": disabled2 || void 0,
|
|
20040
|
+
children: [
|
|
20041
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20042
|
+
"input",
|
|
20043
|
+
{
|
|
20044
|
+
ref: setInputNode,
|
|
20045
|
+
id: inputId,
|
|
20046
|
+
className: styles$6.input,
|
|
20047
|
+
type: "file",
|
|
20048
|
+
disabled: disabled2,
|
|
20049
|
+
...inputProps,
|
|
20050
|
+
onChange: handleInputChange
|
|
20051
|
+
}
|
|
20052
|
+
),
|
|
20053
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$6.dropzoneContent, children: [
|
|
20054
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.dropzoneIcon, "aria-hidden": true, children: dropzoneIcon2 }),
|
|
20055
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$6.dropzoneText, children: [
|
|
20056
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.dropzoneTitle, children: selectedSummary }),
|
|
20057
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.dropzoneHint, children: hintText })
|
|
20058
|
+
] })
|
|
20059
|
+
] }),
|
|
20060
|
+
children2
|
|
20061
|
+
]
|
|
20062
|
+
}
|
|
20063
|
+
),
|
|
20064
|
+
helperText2 && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$6.helperText, children: helperText2 }),
|
|
20065
|
+
showFileList && selectedFiles.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$6.fileList, children: previewItems.map((item2, index2) => {
|
|
20066
|
+
if (renderFile) {
|
|
20067
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$6.customFileRow, children: [
|
|
20068
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$6.customFile, children: renderFile(item2.file, index2) }),
|
|
20069
|
+
removable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20070
|
+
"button",
|
|
20071
|
+
{
|
|
20072
|
+
type: "button",
|
|
20073
|
+
className: styles$6.removeButton,
|
|
20074
|
+
onClick: (event) => handleRemoveFile(index2, event),
|
|
20075
|
+
"aria-label": `Remove ${item2.name}`,
|
|
20076
|
+
disabled: disabled2,
|
|
20077
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TrashIcon, {})
|
|
20078
|
+
}
|
|
20079
|
+
)
|
|
20080
|
+
] }, `${item2.name}-${index2}`);
|
|
20081
|
+
}
|
|
20082
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$6.fileItem, children: [
|
|
20083
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$6.fileInfo, children: [
|
|
20084
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.filePreview, "aria-hidden": true, children: item2.previewUrl ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20085
|
+
"img",
|
|
20086
|
+
{
|
|
20087
|
+
className: styles$6.filePreviewImage,
|
|
20088
|
+
src: item2.previewUrl,
|
|
20089
|
+
alt: ""
|
|
20090
|
+
}
|
|
20091
|
+
) : fileFallbackIcon }),
|
|
20092
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$6.fileMeta, children: [
|
|
20093
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.fileName, children: item2.name }),
|
|
20094
|
+
item2.sizeText && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.fileSize, children: item2.sizeText })
|
|
20095
|
+
] })
|
|
20096
|
+
] }),
|
|
20097
|
+
removable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20098
|
+
"button",
|
|
20099
|
+
{
|
|
20100
|
+
type: "button",
|
|
20101
|
+
className: styles$6.removeButton,
|
|
20102
|
+
onClick: (event) => handleRemoveFile(index2, event),
|
|
20103
|
+
"aria-label": `Remove ${item2.name}`,
|
|
20104
|
+
disabled: disabled2,
|
|
20105
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TrashIcon, {})
|
|
20106
|
+
}
|
|
20107
|
+
)
|
|
20108
|
+
] }, `${item2.name}-${index2}`);
|
|
20109
|
+
}) })
|
|
20110
|
+
] });
|
|
20111
|
+
});
|
|
19298
20112
|
function createCollection(name) {
|
|
19299
20113
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
19300
20114
|
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
|
|
@@ -26537,12 +27351,12 @@ var Overlay = DialogOverlay;
|
|
|
26537
27351
|
var Content = DialogContent;
|
|
26538
27352
|
var Title = DialogTitle;
|
|
26539
27353
|
var Close = DialogClose;
|
|
26540
|
-
const overlay = "
|
|
26541
|
-
const overlayBackdrop = "
|
|
26542
|
-
const content$1 = "
|
|
26543
|
-
const title = "
|
|
26544
|
-
const body = "
|
|
26545
|
-
const footer = "
|
|
27354
|
+
const overlay = "_overlay_cozou_43";
|
|
27355
|
+
const overlayBackdrop = "_overlayBackdrop_cozou_49";
|
|
27356
|
+
const content$1 = "_content_cozou_63";
|
|
27357
|
+
const title = "_title_cozou_88";
|
|
27358
|
+
const body = "_body_cozou_92";
|
|
27359
|
+
const footer = "_footer_cozou_97";
|
|
26546
27360
|
const styles$1 = {
|
|
26547
27361
|
overlay,
|
|
26548
27362
|
overlayBackdrop,
|
|
@@ -26553,39 +27367,65 @@ const styles$1 = {
|
|
|
26553
27367
|
};
|
|
26554
27368
|
const useModal = ({ title: title2, content: content2, footer: footer2 }) => {
|
|
26555
27369
|
const [open2, setOpen] = React__namespace.useState(false);
|
|
26556
|
-
const
|
|
26557
|
-
|
|
26558
|
-
|
|
26559
|
-
|
|
26560
|
-
|
|
26561
|
-
|
|
26562
|
-
|
|
26563
|
-
|
|
26564
|
-
|
|
26565
|
-
|
|
26566
|
-
|
|
26567
|
-
|
|
26568
|
-
|
|
26569
|
-
|
|
26570
|
-
|
|
26571
|
-
|
|
26572
|
-
|
|
26573
|
-
|
|
26574
|
-
|
|
26575
|
-
|
|
26576
|
-
|
|
26577
|
-
|
|
26578
|
-
|
|
26579
|
-
|
|
26580
|
-
|
|
26581
|
-
|
|
26582
|
-
|
|
26583
|
-
|
|
26584
|
-
|
|
26585
|
-
|
|
26586
|
-
|
|
26587
|
-
|
|
26588
|
-
|
|
27370
|
+
const modalConfigRef = React__namespace.useRef({
|
|
27371
|
+
open: open2,
|
|
27372
|
+
setOpen,
|
|
27373
|
+
title: title2,
|
|
27374
|
+
content: content2,
|
|
27375
|
+
footer: footer2
|
|
27376
|
+
});
|
|
27377
|
+
modalConfigRef.current = {
|
|
27378
|
+
open: open2,
|
|
27379
|
+
setOpen,
|
|
27380
|
+
title: title2,
|
|
27381
|
+
content: content2,
|
|
27382
|
+
footer: footer2
|
|
27383
|
+
};
|
|
27384
|
+
const Modal = React__namespace.useMemo(
|
|
27385
|
+
() => function Modal2() {
|
|
27386
|
+
const {
|
|
27387
|
+
open: isOpen,
|
|
27388
|
+
setOpen: onOpenChange,
|
|
27389
|
+
title: currentTitle,
|
|
27390
|
+
content: currentContent,
|
|
27391
|
+
footer: currentFooter
|
|
27392
|
+
} = modalConfigRef.current;
|
|
27393
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Root, { open: isOpen, onOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Portal, { children: [
|
|
27394
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { className: `${styles$1.overlay} ${hatchStyles.hatch}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1.overlayBackdrop }) }),
|
|
27395
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
27396
|
+
Content,
|
|
27397
|
+
{
|
|
27398
|
+
className: `${styles$1.content} ${chamferStyles.chamfer}`,
|
|
27399
|
+
children: [
|
|
27400
|
+
currentTitle && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
27401
|
+
"div",
|
|
27402
|
+
{
|
|
27403
|
+
style: {
|
|
27404
|
+
display: "flex",
|
|
27405
|
+
flexDirection: "row",
|
|
27406
|
+
justifyContent: "space-between",
|
|
27407
|
+
alignItems: "center",
|
|
27408
|
+
margin: -12,
|
|
27409
|
+
marginBottom: 0,
|
|
27410
|
+
padding: 12,
|
|
27411
|
+
borderBottom: "var(--border-thickness) solid var(--border-color)"
|
|
27412
|
+
},
|
|
27413
|
+
className: classNames(hatchStyles.hatch),
|
|
27414
|
+
children: [
|
|
27415
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Title, { className: styles$1.title, children: currentTitle }),
|
|
27416
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Close, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "small", variant: "danger", children: "Close" }) })
|
|
27417
|
+
]
|
|
27418
|
+
}
|
|
27419
|
+
),
|
|
27420
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1.body, children: currentContent }),
|
|
27421
|
+
currentFooter && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classNames(styles$1.footer, hatchStyles.hatch), children: currentFooter })
|
|
27422
|
+
]
|
|
27423
|
+
}
|
|
27424
|
+
)
|
|
27425
|
+
] }) });
|
|
27426
|
+
},
|
|
27427
|
+
[]
|
|
27428
|
+
);
|
|
26589
27429
|
const trigger2 = (node) => /* @__PURE__ */ jsxRuntimeExports.jsx(Trigger, { asChild: true, children: node });
|
|
26590
27430
|
return { Modal, trigger: trigger2, open: open2, setOpen };
|
|
26591
27431
|
};
|
|
@@ -26933,6 +27773,7 @@ exports.Card = Card;
|
|
|
26933
27773
|
exports.Checkbox = Checkbox;
|
|
26934
27774
|
exports.ColorSwitcher = ColorSwitcher;
|
|
26935
27775
|
exports.Dropdown = Dropdown;
|
|
27776
|
+
exports.FileUpload = FileUpload;
|
|
26936
27777
|
exports.Hatch = Hatch;
|
|
26937
27778
|
exports.Input = Input;
|
|
26938
27779
|
exports.JCUIProvider = JCUIProvider;
|