@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.es.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,9 +1902,9 @@ 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
|
import * as React from "react";
|
|
1607
|
-
import React__default, { useContext, createContext as createContext$1, useId as useId$1,
|
|
1907
|
+
import React__default, { useContext, createContext as createContext$1, useId as useId$1, forwardRef, useRef, useState, useMemo, useEffect, useLayoutEffect, useCallback, createElement } from "react";
|
|
1608
1908
|
import * as ReactDOM from "react-dom";
|
|
1609
1909
|
import ReactDOM__default from "react-dom";
|
|
1610
1910
|
function getDefaultExportFromCjs(x2) {
|
|
@@ -1923,35 +2223,35 @@ function clsx() {
|
|
|
1923
2223
|
return n2;
|
|
1924
2224
|
}
|
|
1925
2225
|
const button = "_button_105y0_7";
|
|
1926
|
-
const pageBackground$
|
|
1927
|
-
const large$
|
|
1928
|
-
const small$
|
|
1929
|
-
const disabled$
|
|
1930
|
-
const primary$
|
|
1931
|
-
const success$
|
|
1932
|
-
const warning$
|
|
1933
|
-
const danger$
|
|
1934
|
-
const info$
|
|
1935
|
-
const secondary$
|
|
1936
|
-
const styles$
|
|
2226
|
+
const pageBackground$4 = "_pageBackground_105y0_24";
|
|
2227
|
+
const large$7 = "_large_105y0_34";
|
|
2228
|
+
const small$7 = "_small_105y0_39";
|
|
2229
|
+
const disabled$7 = "_disabled_105y0_44";
|
|
2230
|
+
const primary$9 = "_primary_105y0_51";
|
|
2231
|
+
const success$9 = "_success_105y0_64";
|
|
2232
|
+
const warning$9 = "_warning_105y0_77";
|
|
2233
|
+
const danger$9 = "_danger_105y0_90";
|
|
2234
|
+
const info$9 = "_info_105y0_103";
|
|
2235
|
+
const secondary$9 = "_secondary_105y0_116";
|
|
2236
|
+
const styles$c = {
|
|
1937
2237
|
button,
|
|
1938
|
-
pageBackground: pageBackground$
|
|
1939
|
-
large: large$
|
|
1940
|
-
small: small$
|
|
1941
|
-
disabled: disabled$
|
|
1942
|
-
primary: primary$
|
|
1943
|
-
success: success$
|
|
1944
|
-
warning: warning$
|
|
1945
|
-
danger: danger$
|
|
1946
|
-
info: info$
|
|
1947
|
-
secondary: secondary$
|
|
2238
|
+
pageBackground: pageBackground$4,
|
|
2239
|
+
large: large$7,
|
|
2240
|
+
small: small$7,
|
|
2241
|
+
disabled: disabled$7,
|
|
2242
|
+
primary: primary$9,
|
|
2243
|
+
success: success$9,
|
|
2244
|
+
warning: warning$9,
|
|
2245
|
+
danger: danger$9,
|
|
2246
|
+
info: info$9,
|
|
2247
|
+
secondary: secondary$9
|
|
1948
2248
|
};
|
|
1949
2249
|
const chamfer$1 = "_chamfer_1o5rm_1";
|
|
1950
|
-
const disabled$
|
|
2250
|
+
const disabled$6 = "_disabled_1o5rm_15";
|
|
1951
2251
|
const chamferOnHover = "_chamferOnHover_1o5rm_60";
|
|
1952
2252
|
const chamferStyles = {
|
|
1953
2253
|
chamfer: chamfer$1,
|
|
1954
|
-
disabled: disabled$
|
|
2254
|
+
disabled: disabled$6,
|
|
1955
2255
|
chamferOnHover
|
|
1956
2256
|
};
|
|
1957
2257
|
const hatch$1 = "_hatch_owfoz_1";
|
|
@@ -1966,10 +2266,10 @@ const ThemeContext = createContext$1({
|
|
|
1966
2266
|
});
|
|
1967
2267
|
const useJCUITheme = () => useContext(ThemeContext);
|
|
1968
2268
|
const loader = "_loader_1y0fe_1";
|
|
1969
|
-
const styles$
|
|
2269
|
+
const styles$b = {
|
|
1970
2270
|
loader
|
|
1971
2271
|
};
|
|
1972
|
-
const Loader = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$
|
|
2272
|
+
const Loader = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$b.loader, ...props });
|
|
1973
2273
|
function Button({
|
|
1974
2274
|
children: children2,
|
|
1975
2275
|
variant,
|
|
@@ -1983,15 +2283,15 @@ function Button({
|
|
|
1983
2283
|
"button",
|
|
1984
2284
|
{
|
|
1985
2285
|
className: clsx(
|
|
1986
|
-
styles$
|
|
1987
|
-
!variant && styles$
|
|
1988
|
-
styles$
|
|
2286
|
+
styles$c.button,
|
|
2287
|
+
!variant && styles$c.pageBackground,
|
|
2288
|
+
styles$c[variant],
|
|
1989
2289
|
chamfer2 && chamferStyles.chamfer,
|
|
1990
|
-
size2 === "large" && styles$
|
|
1991
|
-
size2 === "small" && styles$
|
|
2290
|
+
size2 === "large" && styles$c.large,
|
|
2291
|
+
size2 === "small" && styles$c.small,
|
|
1992
2292
|
disabled2 && chamferStyles.disabled,
|
|
1993
2293
|
disabled2 && hatchStyles.hatch,
|
|
1994
|
-
disabled2 && styles$
|
|
2294
|
+
disabled2 && styles$c.disabled
|
|
1995
2295
|
),
|
|
1996
2296
|
disabled: disabled2,
|
|
1997
2297
|
...props,
|
|
@@ -2100,32 +2400,32 @@ function requireClassnames() {
|
|
|
2100
2400
|
var classnamesExports = requireClassnames();
|
|
2101
2401
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
2102
2402
|
const card = "_card_et6fi_1";
|
|
2103
|
-
const pageBackground$
|
|
2403
|
+
const pageBackground$3 = "_pageBackground_et6fi_11";
|
|
2104
2404
|
const title$1 = "_title_et6fi_18";
|
|
2105
2405
|
const body$1 = "_body_et6fi_25";
|
|
2106
2406
|
const footer$1 = "_footer_et6fi_30";
|
|
2107
|
-
const large$
|
|
2108
|
-
const small$
|
|
2109
|
-
const primary$
|
|
2110
|
-
const success$
|
|
2111
|
-
const warning$
|
|
2112
|
-
const danger$
|
|
2113
|
-
const info$
|
|
2114
|
-
const secondary$
|
|
2115
|
-
const styles$
|
|
2407
|
+
const large$6 = "_large_et6fi_37";
|
|
2408
|
+
const small$6 = "_small_et6fi_43";
|
|
2409
|
+
const primary$8 = "_primary_et6fi_51";
|
|
2410
|
+
const success$8 = "_success_et6fi_58";
|
|
2411
|
+
const warning$8 = "_warning_et6fi_65";
|
|
2412
|
+
const danger$8 = "_danger_et6fi_72";
|
|
2413
|
+
const info$8 = "_info_et6fi_79";
|
|
2414
|
+
const secondary$8 = "_secondary_et6fi_86";
|
|
2415
|
+
const styles$a = {
|
|
2116
2416
|
card,
|
|
2117
|
-
pageBackground: pageBackground$
|
|
2417
|
+
pageBackground: pageBackground$3,
|
|
2118
2418
|
title: title$1,
|
|
2119
2419
|
body: body$1,
|
|
2120
2420
|
footer: footer$1,
|
|
2121
|
-
large: large$
|
|
2122
|
-
small: small$
|
|
2123
|
-
primary: primary$
|
|
2124
|
-
success: success$
|
|
2125
|
-
warning: warning$
|
|
2126
|
-
danger: danger$
|
|
2127
|
-
info: info$
|
|
2128
|
-
secondary: secondary$
|
|
2421
|
+
large: large$6,
|
|
2422
|
+
small: small$6,
|
|
2423
|
+
primary: primary$8,
|
|
2424
|
+
success: success$8,
|
|
2425
|
+
warning: warning$8,
|
|
2426
|
+
danger: danger$8,
|
|
2427
|
+
info: info$8,
|
|
2428
|
+
secondary: secondary$8
|
|
2129
2429
|
};
|
|
2130
2430
|
function Card({
|
|
2131
2431
|
children: children2,
|
|
@@ -2142,21 +2442,21 @@ function Card({
|
|
|
2142
2442
|
"div",
|
|
2143
2443
|
{
|
|
2144
2444
|
className: classNames(
|
|
2145
|
-
styles$
|
|
2146
|
-
!variant && styles$
|
|
2147
|
-
styles$
|
|
2445
|
+
styles$a.card,
|
|
2446
|
+
!variant && styles$a.pageBackground,
|
|
2447
|
+
styles$a[variant],
|
|
2148
2448
|
chamfer2 && chamferStyles.chamfer,
|
|
2149
|
-
size2 === "large" && styles$
|
|
2150
|
-
size2 === "small" && styles$
|
|
2449
|
+
size2 === "large" && styles$a.large,
|
|
2450
|
+
size2 === "small" && styles$a.small
|
|
2151
2451
|
),
|
|
2152
2452
|
...props,
|
|
2153
2453
|
children: [
|
|
2154
|
-
title2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classNames(styles$
|
|
2155
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$
|
|
2454
|
+
title2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classNames(styles$a.title, hatchStyles.hatch), children: title2 }),
|
|
2455
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.body, children: children2 }),
|
|
2156
2456
|
footerHeight > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2157
2457
|
"div",
|
|
2158
2458
|
{
|
|
2159
|
-
className: classNames(hatchStyles.hatch, styles$
|
|
2459
|
+
className: classNames(hatchStyles.hatch, styles$a.footer),
|
|
2160
2460
|
style: { flexBasis: footerHeight },
|
|
2161
2461
|
children: footer2
|
|
2162
2462
|
}
|
|
@@ -2887,34 +3187,34 @@ function getState$2(checked) {
|
|
|
2887
3187
|
return isIndeterminate$1(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
2888
3188
|
}
|
|
2889
3189
|
const wrapper$1 = "_wrapper_178xv_25";
|
|
2890
|
-
const disabled$
|
|
2891
|
-
const root$
|
|
3190
|
+
const disabled$5 = "_disabled_178xv_34";
|
|
3191
|
+
const root$3 = "_root_178xv_39";
|
|
2892
3192
|
const indicator$1 = "_indicator_178xv_76";
|
|
2893
|
-
const large$
|
|
2894
|
-
const small$
|
|
3193
|
+
const large$5 = "_large_178xv_94";
|
|
3194
|
+
const small$5 = "_small_178xv_99";
|
|
2895
3195
|
const disabledBox = "_disabledBox_178xv_104";
|
|
2896
|
-
const label$
|
|
2897
|
-
const primary$
|
|
2898
|
-
const secondary$
|
|
2899
|
-
const success$
|
|
2900
|
-
const warning$
|
|
2901
|
-
const danger$
|
|
2902
|
-
const info$
|
|
2903
|
-
const styles$
|
|
3196
|
+
const label$3 = "_label_178xv_109";
|
|
3197
|
+
const primary$7 = "_primary_178xv_117";
|
|
3198
|
+
const secondary$7 = "_secondary_178xv_126";
|
|
3199
|
+
const success$7 = "_success_178xv_135";
|
|
3200
|
+
const warning$7 = "_warning_178xv_144";
|
|
3201
|
+
const danger$7 = "_danger_178xv_153";
|
|
3202
|
+
const info$7 = "_info_178xv_162";
|
|
3203
|
+
const styles$9 = {
|
|
2904
3204
|
wrapper: wrapper$1,
|
|
2905
|
-
disabled: disabled$
|
|
2906
|
-
root: root$
|
|
3205
|
+
disabled: disabled$5,
|
|
3206
|
+
root: root$3,
|
|
2907
3207
|
indicator: indicator$1,
|
|
2908
|
-
large: large$
|
|
2909
|
-
small: small$
|
|
3208
|
+
large: large$5,
|
|
3209
|
+
small: small$5,
|
|
2910
3210
|
disabledBox,
|
|
2911
|
-
label: label$
|
|
2912
|
-
primary: primary$
|
|
2913
|
-
secondary: secondary$
|
|
2914
|
-
success: success$
|
|
2915
|
-
warning: warning$
|
|
2916
|
-
danger: danger$
|
|
2917
|
-
info: info$
|
|
3211
|
+
label: label$3,
|
|
3212
|
+
primary: primary$7,
|
|
3213
|
+
secondary: secondary$7,
|
|
3214
|
+
success: success$7,
|
|
3215
|
+
warning: warning$7,
|
|
3216
|
+
danger: danger$7,
|
|
3217
|
+
info: info$7
|
|
2918
3218
|
};
|
|
2919
3219
|
const CheckIcon = () => /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { viewBox: "0 0 24 24", fill: "none", role: "presentation", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2920
3220
|
"polyline",
|
|
@@ -2937,32 +3237,32 @@ function Checkbox({
|
|
|
2937
3237
|
...props
|
|
2938
3238
|
}) {
|
|
2939
3239
|
const labelContent = label2 ?? children2;
|
|
2940
|
-
const variantClass = variant && styles$
|
|
2941
|
-
const sizeClass = size2 === "large" ? styles$
|
|
3240
|
+
const variantClass = variant && styles$9[variant];
|
|
3241
|
+
const sizeClass = size2 === "large" ? styles$9.large : size2 === "small" ? styles$9.small : null;
|
|
2942
3242
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2943
3243
|
"label",
|
|
2944
3244
|
{
|
|
2945
|
-
className: clsx(styles$
|
|
3245
|
+
className: clsx(styles$9.wrapper, variantClass, disabled2 && styles$9.disabled),
|
|
2946
3246
|
children: [
|
|
2947
3247
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2948
3248
|
Checkbox$1,
|
|
2949
3249
|
{
|
|
2950
3250
|
className: clsx(
|
|
2951
|
-
styles$
|
|
3251
|
+
styles$9.root,
|
|
2952
3252
|
variantClass,
|
|
2953
3253
|
sizeClass,
|
|
2954
3254
|
chamfer2 && chamferStyles.chamfer,
|
|
2955
3255
|
disabled2 && chamferStyles.disabled,
|
|
2956
3256
|
disabled2 && hatchStyles.hatch,
|
|
2957
|
-
disabled2 && styles$
|
|
3257
|
+
disabled2 && styles$9.disabledBox,
|
|
2958
3258
|
className
|
|
2959
3259
|
),
|
|
2960
3260
|
disabled: disabled2,
|
|
2961
3261
|
...props,
|
|
2962
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckboxIndicator, { className: styles$
|
|
3262
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckboxIndicator, { className: styles$9.indicator, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, {}) })
|
|
2963
3263
|
}
|
|
2964
3264
|
),
|
|
2965
|
-
labelContent && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$
|
|
3265
|
+
labelContent && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$9.label, children: labelContent })
|
|
2966
3266
|
]
|
|
2967
3267
|
}
|
|
2968
3268
|
);
|
|
@@ -4412,13 +4712,13 @@ function* selection_iterator() {
|
|
|
4412
4712
|
}
|
|
4413
4713
|
}
|
|
4414
4714
|
}
|
|
4415
|
-
var root$
|
|
4715
|
+
var root$2 = [null];
|
|
4416
4716
|
function Selection$1(groups, parents) {
|
|
4417
4717
|
this._groups = groups;
|
|
4418
4718
|
this._parents = parents;
|
|
4419
4719
|
}
|
|
4420
4720
|
function selection() {
|
|
4421
|
-
return new Selection$1([[document.documentElement]], root$
|
|
4721
|
+
return new Selection$1([[document.documentElement]], root$2);
|
|
4422
4722
|
}
|
|
4423
4723
|
function selection_selection() {
|
|
4424
4724
|
return this;
|
|
@@ -4462,7 +4762,7 @@ Selection$1.prototype = selection.prototype = {
|
|
|
4462
4762
|
[Symbol.iterator]: selection_iterator
|
|
4463
4763
|
};
|
|
4464
4764
|
function select(selector2) {
|
|
4465
|
-
return typeof selector2 === "string" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]], root$
|
|
4765
|
+
return typeof selector2 === "string" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]], root$2);
|
|
4466
4766
|
}
|
|
4467
4767
|
function sourceEvent(event) {
|
|
4468
4768
|
let sourceEvent2;
|
|
@@ -13812,7 +14112,7 @@ let nextClipId = 0;
|
|
|
13812
14112
|
function getClipId() {
|
|
13813
14113
|
return `plot-clip-${++nextClipId}`;
|
|
13814
14114
|
}
|
|
13815
|
-
function styles$
|
|
14115
|
+
function styles$8(mark, {
|
|
13816
14116
|
title: title2,
|
|
13817
14117
|
href,
|
|
13818
14118
|
ariaLabel: variaLabel,
|
|
@@ -14178,7 +14478,7 @@ class Mark {
|
|
|
14178
14478
|
this.facetAnchor = maybeFacetAnchor(facetAnchor);
|
|
14179
14479
|
channels = maybeNamed(channels);
|
|
14180
14480
|
if (extraChannels !== void 0) channels = { ...maybeChannels(extraChannels), ...channels };
|
|
14181
|
-
if (defaults2 !== void 0) channels = { ...styles$
|
|
14481
|
+
if (defaults2 !== void 0) channels = { ...styles$8(this, options, defaults2), ...channels };
|
|
14182
14482
|
this.channels = Object.fromEntries(
|
|
14183
14483
|
Object.entries(channels).map(([name, channel]) => {
|
|
14184
14484
|
if (isOptions(channel.value)) {
|
|
@@ -19204,33 +19504,33 @@ const RadarChart = ({
|
|
|
19204
19504
|
});
|
|
19205
19505
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ObservablePlot, { options, className, style });
|
|
19206
19506
|
};
|
|
19207
|
-
const input = "_input_1ymvl_7";
|
|
19208
|
-
const pageBackground$
|
|
19209
|
-
const large$
|
|
19210
|
-
const small$
|
|
19211
|
-
const disabled$
|
|
19212
|
-
const primary$
|
|
19213
|
-
const success$
|
|
19214
|
-
const warning$
|
|
19215
|
-
const danger$
|
|
19216
|
-
const info$
|
|
19217
|
-
const secondary$
|
|
19507
|
+
const input$1 = "_input_1ymvl_7";
|
|
19508
|
+
const pageBackground$2 = "_pageBackground_1ymvl_24";
|
|
19509
|
+
const large$4 = "_large_1ymvl_38";
|
|
19510
|
+
const small$4 = "_small_1ymvl_43";
|
|
19511
|
+
const disabled$4 = "_disabled_1ymvl_48";
|
|
19512
|
+
const primary$6 = "_primary_1ymvl_55";
|
|
19513
|
+
const success$6 = "_success_1ymvl_64";
|
|
19514
|
+
const warning$6 = "_warning_1ymvl_72";
|
|
19515
|
+
const danger$6 = "_danger_1ymvl_80";
|
|
19516
|
+
const info$6 = "_info_1ymvl_88";
|
|
19517
|
+
const secondary$6 = "_secondary_1ymvl_97";
|
|
19218
19518
|
const field = "_field_1ymvl_106";
|
|
19219
|
-
const label$
|
|
19220
|
-
const styles$
|
|
19221
|
-
input,
|
|
19222
|
-
pageBackground: pageBackground$
|
|
19223
|
-
large: large$
|
|
19224
|
-
small: small$
|
|
19225
|
-
disabled: disabled$
|
|
19226
|
-
primary: primary$
|
|
19227
|
-
success: success$
|
|
19228
|
-
warning: warning$
|
|
19229
|
-
danger: danger$
|
|
19230
|
-
info: info$
|
|
19231
|
-
secondary: secondary$
|
|
19519
|
+
const label$2 = "_label_1ymvl_112";
|
|
19520
|
+
const styles$7 = {
|
|
19521
|
+
input: input$1,
|
|
19522
|
+
pageBackground: pageBackground$2,
|
|
19523
|
+
large: large$4,
|
|
19524
|
+
small: small$4,
|
|
19525
|
+
disabled: disabled$4,
|
|
19526
|
+
primary: primary$6,
|
|
19527
|
+
success: success$6,
|
|
19528
|
+
warning: warning$6,
|
|
19529
|
+
danger: danger$6,
|
|
19530
|
+
info: info$6,
|
|
19531
|
+
secondary: secondary$6,
|
|
19232
19532
|
field,
|
|
19233
|
-
label: label$
|
|
19533
|
+
label: label$2
|
|
19234
19534
|
};
|
|
19235
19535
|
function Input({
|
|
19236
19536
|
variant,
|
|
@@ -19241,28 +19541,28 @@ function Input({
|
|
|
19241
19541
|
...props
|
|
19242
19542
|
}) {
|
|
19243
19543
|
const inputId = useId$1();
|
|
19244
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$
|
|
19245
|
-
label2 && /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: styles$
|
|
19544
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$7.field, children: [
|
|
19545
|
+
label2 && /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: styles$7.label, htmlFor: inputId, children: label2 }),
|
|
19246
19546
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19247
19547
|
"div",
|
|
19248
19548
|
{
|
|
19249
19549
|
className: classNames(
|
|
19250
19550
|
chamfer2 && chamferStyles.chamfer,
|
|
19251
|
-
!variant && styles$
|
|
19252
|
-
styles$
|
|
19551
|
+
!variant && styles$7.pageBackground,
|
|
19552
|
+
styles$7[variant]
|
|
19253
19553
|
),
|
|
19254
19554
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19255
19555
|
"input",
|
|
19256
19556
|
{
|
|
19257
19557
|
id: inputId,
|
|
19258
19558
|
className: classNames(
|
|
19259
|
-
styles$
|
|
19260
|
-
!variant && styles$
|
|
19261
|
-
styles$
|
|
19262
|
-
size2 === "large" && styles$
|
|
19263
|
-
size2 === "small" && styles$
|
|
19559
|
+
styles$7.input,
|
|
19560
|
+
!variant && styles$7.pageBackground,
|
|
19561
|
+
styles$7[variant],
|
|
19562
|
+
size2 === "large" && styles$7.large,
|
|
19563
|
+
size2 === "small" && styles$7.small,
|
|
19264
19564
|
disabled2 && chamferStyles.disabled,
|
|
19265
|
-
disabled2 && styles$
|
|
19565
|
+
disabled2 && styles$7.disabled,
|
|
19266
19566
|
disabled2 && hatchStyles.hatch
|
|
19267
19567
|
),
|
|
19268
19568
|
disabled: disabled2,
|
|
@@ -19277,6 +19577,520 @@ function Input({
|
|
|
19277
19577
|
)
|
|
19278
19578
|
] });
|
|
19279
19579
|
}
|
|
19580
|
+
const root$1 = "_root_i158m_7";
|
|
19581
|
+
const label$1 = "_label_i158m_14";
|
|
19582
|
+
const dropzone = "_dropzone_i158m_18";
|
|
19583
|
+
const pageBackground$1 = "_pageBackground_i158m_42";
|
|
19584
|
+
const input = "_input_i158m_54";
|
|
19585
|
+
const dropzoneContent = "_dropzoneContent_i158m_67";
|
|
19586
|
+
const dropzoneIcon = "_dropzoneIcon_i158m_74";
|
|
19587
|
+
const dropzoneText = "_dropzoneText_i158m_90";
|
|
19588
|
+
const dropzoneTitle = "_dropzoneTitle_i158m_96";
|
|
19589
|
+
const dropzoneHint = "_dropzoneHint_i158m_104";
|
|
19590
|
+
const helperText = "_helperText_i158m_109";
|
|
19591
|
+
const fileList = "_fileList_i158m_115";
|
|
19592
|
+
const fileItem = "_fileItem_i158m_121";
|
|
19593
|
+
const fileInfo = "_fileInfo_i158m_132";
|
|
19594
|
+
const filePreview = "_filePreview_i158m_140";
|
|
19595
|
+
const filePreviewImage = "_filePreviewImage_i158m_157";
|
|
19596
|
+
const fileMeta = "_fileMeta_i158m_163";
|
|
19597
|
+
const fileName = "_fileName_i158m_170";
|
|
19598
|
+
const fileSize = "_fileSize_i158m_177";
|
|
19599
|
+
const customFileRow = "_customFileRow_i158m_182";
|
|
19600
|
+
const customFile = "_customFile_i158m_182";
|
|
19601
|
+
const removeButton = "_removeButton_i158m_195";
|
|
19602
|
+
const trashIcon = "_trashIcon_i158m_222";
|
|
19603
|
+
const trashLid = "_trashLid_i158m_227";
|
|
19604
|
+
const large$3 = "_large_i158m_249";
|
|
19605
|
+
const small$3 = "_small_i158m_258";
|
|
19606
|
+
const hasFiles = "_hasFiles_i158m_271";
|
|
19607
|
+
const dragging = "_dragging_i158m_275";
|
|
19608
|
+
const disabled$3 = "_disabled_i158m_280";
|
|
19609
|
+
const primary$5 = "_primary_i158m_285";
|
|
19610
|
+
const success$5 = "_success_i158m_297";
|
|
19611
|
+
const warning$5 = "_warning_i158m_309";
|
|
19612
|
+
const danger$5 = "_danger_i158m_321";
|
|
19613
|
+
const info$5 = "_info_i158m_333";
|
|
19614
|
+
const secondary$5 = "_secondary_i158m_345";
|
|
19615
|
+
const styles$6 = {
|
|
19616
|
+
root: root$1,
|
|
19617
|
+
label: label$1,
|
|
19618
|
+
dropzone,
|
|
19619
|
+
pageBackground: pageBackground$1,
|
|
19620
|
+
input,
|
|
19621
|
+
dropzoneContent,
|
|
19622
|
+
dropzoneIcon,
|
|
19623
|
+
dropzoneText,
|
|
19624
|
+
dropzoneTitle,
|
|
19625
|
+
dropzoneHint,
|
|
19626
|
+
helperText,
|
|
19627
|
+
fileList,
|
|
19628
|
+
fileItem,
|
|
19629
|
+
fileInfo,
|
|
19630
|
+
filePreview,
|
|
19631
|
+
filePreviewImage,
|
|
19632
|
+
fileMeta,
|
|
19633
|
+
fileName,
|
|
19634
|
+
fileSize,
|
|
19635
|
+
customFileRow,
|
|
19636
|
+
customFile,
|
|
19637
|
+
removeButton,
|
|
19638
|
+
trashIcon,
|
|
19639
|
+
trashLid,
|
|
19640
|
+
large: large$3,
|
|
19641
|
+
small: small$3,
|
|
19642
|
+
hasFiles,
|
|
19643
|
+
dragging,
|
|
19644
|
+
disabled: disabled$3,
|
|
19645
|
+
primary: primary$5,
|
|
19646
|
+
success: success$5,
|
|
19647
|
+
warning: warning$5,
|
|
19648
|
+
danger: danger$5,
|
|
19649
|
+
info: info$5,
|
|
19650
|
+
secondary: secondary$5
|
|
19651
|
+
};
|
|
19652
|
+
const normalizeFiles = (value, multiple = false) => {
|
|
19653
|
+
if (!value) {
|
|
19654
|
+
return [];
|
|
19655
|
+
}
|
|
19656
|
+
if (typeof value === "string") {
|
|
19657
|
+
return [value];
|
|
19658
|
+
}
|
|
19659
|
+
if (typeof File !== "undefined" && value instanceof File) {
|
|
19660
|
+
return [value];
|
|
19661
|
+
}
|
|
19662
|
+
const normalized = Array.isArray(value) ? value.filter(Boolean) : typeof value?.length === "number" || typeof value?.[Symbol.iterator] === "function" ? Array.from(value).filter(Boolean) : [value];
|
|
19663
|
+
return multiple ? normalized : normalized.slice(0, 1);
|
|
19664
|
+
};
|
|
19665
|
+
const formatFileSize = (size2) => {
|
|
19666
|
+
if (typeof size2 !== "number" || Number.isNaN(size2)) {
|
|
19667
|
+
return null;
|
|
19668
|
+
}
|
|
19669
|
+
if (size2 < 1024) {
|
|
19670
|
+
return `${size2} B`;
|
|
19671
|
+
}
|
|
19672
|
+
if (size2 < 1024 * 1024) {
|
|
19673
|
+
return `${Math.round(size2 / 1024)} KB`;
|
|
19674
|
+
}
|
|
19675
|
+
return `${(size2 / (1024 * 1024)).toFixed(1)} MB`;
|
|
19676
|
+
};
|
|
19677
|
+
const isImageFile = (file) => {
|
|
19678
|
+
if (typeof File === "undefined") {
|
|
19679
|
+
return false;
|
|
19680
|
+
}
|
|
19681
|
+
return file instanceof File && typeof file.type === "string" ? file.type.startsWith("image/") : false;
|
|
19682
|
+
};
|
|
19683
|
+
const UploadIcon = () => /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", role: "presentation", "aria-hidden": true, children: [
|
|
19684
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
19685
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19686
|
+
"path",
|
|
19687
|
+
{
|
|
19688
|
+
d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",
|
|
19689
|
+
stroke: "currentColor",
|
|
19690
|
+
strokeWidth: "2",
|
|
19691
|
+
strokeLinecap: "round",
|
|
19692
|
+
strokeLinejoin: "round"
|
|
19693
|
+
}
|
|
19694
|
+
),
|
|
19695
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19696
|
+
"path",
|
|
19697
|
+
{
|
|
19698
|
+
d: "M7 9l5 -5l5 5",
|
|
19699
|
+
stroke: "currentColor",
|
|
19700
|
+
strokeWidth: "2",
|
|
19701
|
+
strokeLinecap: "round",
|
|
19702
|
+
strokeLinejoin: "round"
|
|
19703
|
+
}
|
|
19704
|
+
),
|
|
19705
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19706
|
+
"path",
|
|
19707
|
+
{
|
|
19708
|
+
d: "M12 4l0 12",
|
|
19709
|
+
stroke: "currentColor",
|
|
19710
|
+
strokeWidth: "2",
|
|
19711
|
+
strokeLinecap: "round",
|
|
19712
|
+
strokeLinejoin: "round"
|
|
19713
|
+
}
|
|
19714
|
+
)
|
|
19715
|
+
] });
|
|
19716
|
+
const FileIcon = () => /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", role: "presentation", "aria-hidden": true, children: [
|
|
19717
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19718
|
+
"path",
|
|
19719
|
+
{
|
|
19720
|
+
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",
|
|
19721
|
+
stroke: "currentColor",
|
|
19722
|
+
strokeWidth: "1.5",
|
|
19723
|
+
strokeLinejoin: "round"
|
|
19724
|
+
}
|
|
19725
|
+
),
|
|
19726
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14.5 3.5V8.5H19.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
19727
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19728
|
+
"path",
|
|
19729
|
+
{
|
|
19730
|
+
d: "M9.5 12H16",
|
|
19731
|
+
stroke: "currentColor",
|
|
19732
|
+
strokeWidth: "1.5",
|
|
19733
|
+
strokeLinecap: "round"
|
|
19734
|
+
}
|
|
19735
|
+
),
|
|
19736
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19737
|
+
"path",
|
|
19738
|
+
{
|
|
19739
|
+
d: "M9.5 15H14",
|
|
19740
|
+
stroke: "currentColor",
|
|
19741
|
+
strokeWidth: "1.5",
|
|
19742
|
+
strokeLinecap: "round"
|
|
19743
|
+
}
|
|
19744
|
+
)
|
|
19745
|
+
] });
|
|
19746
|
+
const TrashIcon = () => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
19747
|
+
"svg",
|
|
19748
|
+
{
|
|
19749
|
+
viewBox: "0 0 24 24",
|
|
19750
|
+
fill: "none",
|
|
19751
|
+
role: "presentation",
|
|
19752
|
+
"aria-hidden": true,
|
|
19753
|
+
className: styles$6.trashIcon,
|
|
19754
|
+
children: [
|
|
19755
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("g", { className: styles$6.trashLid, children: [
|
|
19756
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19757
|
+
"path",
|
|
19758
|
+
{
|
|
19759
|
+
d: "M4 7h16",
|
|
19760
|
+
stroke: "currentColor",
|
|
19761
|
+
strokeWidth: "1.75",
|
|
19762
|
+
strokeLinecap: "round",
|
|
19763
|
+
strokeLinejoin: "round"
|
|
19764
|
+
}
|
|
19765
|
+
),
|
|
19766
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19767
|
+
"path",
|
|
19768
|
+
{
|
|
19769
|
+
d: "M9 7V5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v2",
|
|
19770
|
+
stroke: "currentColor",
|
|
19771
|
+
strokeWidth: "1.75",
|
|
19772
|
+
strokeLinecap: "round",
|
|
19773
|
+
strokeLinejoin: "round"
|
|
19774
|
+
}
|
|
19775
|
+
)
|
|
19776
|
+
] }),
|
|
19777
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19778
|
+
"path",
|
|
19779
|
+
{
|
|
19780
|
+
d: "M10 11v6",
|
|
19781
|
+
stroke: "currentColor",
|
|
19782
|
+
strokeWidth: "1.75",
|
|
19783
|
+
strokeLinecap: "round",
|
|
19784
|
+
strokeLinejoin: "round"
|
|
19785
|
+
}
|
|
19786
|
+
),
|
|
19787
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19788
|
+
"path",
|
|
19789
|
+
{
|
|
19790
|
+
d: "M14 11v6",
|
|
19791
|
+
stroke: "currentColor",
|
|
19792
|
+
strokeWidth: "1.75",
|
|
19793
|
+
strokeLinecap: "round",
|
|
19794
|
+
strokeLinejoin: "round"
|
|
19795
|
+
}
|
|
19796
|
+
),
|
|
19797
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19798
|
+
"path",
|
|
19799
|
+
{
|
|
19800
|
+
d: "M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2 -2l1 -12",
|
|
19801
|
+
stroke: "currentColor",
|
|
19802
|
+
strokeWidth: "1.75",
|
|
19803
|
+
strokeLinecap: "round",
|
|
19804
|
+
strokeLinejoin: "round"
|
|
19805
|
+
}
|
|
19806
|
+
)
|
|
19807
|
+
]
|
|
19808
|
+
}
|
|
19809
|
+
);
|
|
19810
|
+
const FileUpload = forwardRef(function FileUpload2({
|
|
19811
|
+
label: label2,
|
|
19812
|
+
helperText: helperText2,
|
|
19813
|
+
placeholder = "Click to upload or drag and drop",
|
|
19814
|
+
dropHint,
|
|
19815
|
+
icon: icon2,
|
|
19816
|
+
files,
|
|
19817
|
+
onFilesChange,
|
|
19818
|
+
renderFile,
|
|
19819
|
+
showFileList = true,
|
|
19820
|
+
removable = true,
|
|
19821
|
+
onFileRemove,
|
|
19822
|
+
className,
|
|
19823
|
+
dropzoneClassName,
|
|
19824
|
+
variant,
|
|
19825
|
+
size: size2,
|
|
19826
|
+
chamfer: chamfer2 = true,
|
|
19827
|
+
disabled: disabled2,
|
|
19828
|
+
id: providedId,
|
|
19829
|
+
children: children2,
|
|
19830
|
+
...inputProps
|
|
19831
|
+
}, ref) {
|
|
19832
|
+
const autoId = useId$1();
|
|
19833
|
+
const inputId = providedId ?? `file-upload-${autoId}`;
|
|
19834
|
+
const inputRef = useRef(null);
|
|
19835
|
+
const dragCounterRef = useRef(0);
|
|
19836
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
19837
|
+
const [internalFiles, setInternalFiles] = useState([]);
|
|
19838
|
+
const multiple = Boolean(inputProps.multiple);
|
|
19839
|
+
const controlledFiles = useMemo(
|
|
19840
|
+
() => normalizeFiles(files, multiple),
|
|
19841
|
+
[files, multiple]
|
|
19842
|
+
);
|
|
19843
|
+
const selectedFiles = files === void 0 ? internalFiles : controlledFiles;
|
|
19844
|
+
const previewItems = useMemo(
|
|
19845
|
+
() => selectedFiles.map((file, index2) => {
|
|
19846
|
+
const name = typeof file?.name === "string" && file.name.length > 0 ? file.name : `File ${index2 + 1}`;
|
|
19847
|
+
return {
|
|
19848
|
+
file,
|
|
19849
|
+
name,
|
|
19850
|
+
previewUrl: isImageFile(file) ? URL.createObjectURL(file) : null,
|
|
19851
|
+
sizeText: formatFileSize(file?.size)
|
|
19852
|
+
};
|
|
19853
|
+
}),
|
|
19854
|
+
[selectedFiles]
|
|
19855
|
+
);
|
|
19856
|
+
useEffect(() => {
|
|
19857
|
+
return () => {
|
|
19858
|
+
previewItems.forEach(({ previewUrl }) => {
|
|
19859
|
+
if (previewUrl) {
|
|
19860
|
+
URL.revokeObjectURL(previewUrl);
|
|
19861
|
+
}
|
|
19862
|
+
});
|
|
19863
|
+
};
|
|
19864
|
+
}, [previewItems]);
|
|
19865
|
+
const setInputNode = (node) => {
|
|
19866
|
+
inputRef.current = node;
|
|
19867
|
+
if (typeof ref === "function") {
|
|
19868
|
+
ref(node);
|
|
19869
|
+
return;
|
|
19870
|
+
}
|
|
19871
|
+
if (ref) {
|
|
19872
|
+
ref.current = node;
|
|
19873
|
+
}
|
|
19874
|
+
};
|
|
19875
|
+
const commitFiles = (nextFiles, event) => {
|
|
19876
|
+
if (files === void 0) {
|
|
19877
|
+
setInternalFiles(nextFiles);
|
|
19878
|
+
}
|
|
19879
|
+
onFilesChange?.(nextFiles, event);
|
|
19880
|
+
};
|
|
19881
|
+
const handleInputChange = (event) => {
|
|
19882
|
+
const nextFiles = normalizeFiles(event.target.files, multiple);
|
|
19883
|
+
commitFiles(nextFiles, event);
|
|
19884
|
+
inputProps.onChange?.(event);
|
|
19885
|
+
};
|
|
19886
|
+
const syncFilesToInput = (nextFiles, triggerEvent) => {
|
|
19887
|
+
const inputNode = inputRef.current;
|
|
19888
|
+
if (!inputNode) {
|
|
19889
|
+
commitFiles(nextFiles, triggerEvent);
|
|
19890
|
+
return;
|
|
19891
|
+
}
|
|
19892
|
+
if (nextFiles.length === 0) {
|
|
19893
|
+
inputNode.value = "";
|
|
19894
|
+
}
|
|
19895
|
+
if (typeof DataTransfer !== "undefined") {
|
|
19896
|
+
try {
|
|
19897
|
+
const transfer = new DataTransfer();
|
|
19898
|
+
nextFiles.forEach((file) => {
|
|
19899
|
+
if (typeof File !== "undefined" && file instanceof File) {
|
|
19900
|
+
transfer.items.add(file);
|
|
19901
|
+
}
|
|
19902
|
+
});
|
|
19903
|
+
inputNode.files = transfer.files;
|
|
19904
|
+
inputNode.dispatchEvent(new Event("change", { bubbles: true }));
|
|
19905
|
+
return;
|
|
19906
|
+
} catch {
|
|
19907
|
+
}
|
|
19908
|
+
}
|
|
19909
|
+
if (nextFiles.length === 0) {
|
|
19910
|
+
inputNode.dispatchEvent(new Event("change", { bubbles: true }));
|
|
19911
|
+
return;
|
|
19912
|
+
}
|
|
19913
|
+
commitFiles(nextFiles, triggerEvent);
|
|
19914
|
+
};
|
|
19915
|
+
const handleDropzoneClick = () => {
|
|
19916
|
+
if (disabled2) {
|
|
19917
|
+
return;
|
|
19918
|
+
}
|
|
19919
|
+
inputRef.current?.click();
|
|
19920
|
+
};
|
|
19921
|
+
const handleDropzoneKeyDown = (event) => {
|
|
19922
|
+
if (disabled2) {
|
|
19923
|
+
return;
|
|
19924
|
+
}
|
|
19925
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
19926
|
+
event.preventDefault();
|
|
19927
|
+
inputRef.current?.click();
|
|
19928
|
+
}
|
|
19929
|
+
};
|
|
19930
|
+
const handleDragEnter = (event) => {
|
|
19931
|
+
event.preventDefault();
|
|
19932
|
+
event.stopPropagation();
|
|
19933
|
+
inputProps.onDragEnter?.(event);
|
|
19934
|
+
if (disabled2 || !event.dataTransfer?.types?.includes("Files")) {
|
|
19935
|
+
return;
|
|
19936
|
+
}
|
|
19937
|
+
dragCounterRef.current += 1;
|
|
19938
|
+
setIsDragging(true);
|
|
19939
|
+
};
|
|
19940
|
+
const handleDragOver = (event) => {
|
|
19941
|
+
event.preventDefault();
|
|
19942
|
+
event.stopPropagation();
|
|
19943
|
+
inputProps.onDragOver?.(event);
|
|
19944
|
+
if (disabled2) {
|
|
19945
|
+
return;
|
|
19946
|
+
}
|
|
19947
|
+
event.dataTransfer.dropEffect = "copy";
|
|
19948
|
+
};
|
|
19949
|
+
const handleDragLeave = (event) => {
|
|
19950
|
+
event.preventDefault();
|
|
19951
|
+
event.stopPropagation();
|
|
19952
|
+
inputProps.onDragLeave?.(event);
|
|
19953
|
+
if (disabled2) {
|
|
19954
|
+
return;
|
|
19955
|
+
}
|
|
19956
|
+
dragCounterRef.current -= 1;
|
|
19957
|
+
if (dragCounterRef.current <= 0) {
|
|
19958
|
+
dragCounterRef.current = 0;
|
|
19959
|
+
setIsDragging(false);
|
|
19960
|
+
}
|
|
19961
|
+
};
|
|
19962
|
+
const handleDrop = (event) => {
|
|
19963
|
+
event.preventDefault();
|
|
19964
|
+
event.stopPropagation();
|
|
19965
|
+
inputProps.onDrop?.(event);
|
|
19966
|
+
dragCounterRef.current = 0;
|
|
19967
|
+
setIsDragging(false);
|
|
19968
|
+
if (disabled2) {
|
|
19969
|
+
return;
|
|
19970
|
+
}
|
|
19971
|
+
const nextFiles = normalizeFiles(event.dataTransfer?.files, multiple);
|
|
19972
|
+
if (nextFiles.length === 0) {
|
|
19973
|
+
return;
|
|
19974
|
+
}
|
|
19975
|
+
syncFilesToInput(nextFiles, event);
|
|
19976
|
+
};
|
|
19977
|
+
const handleRemoveFile = (index2, event) => {
|
|
19978
|
+
event.preventDefault();
|
|
19979
|
+
event.stopPropagation();
|
|
19980
|
+
if (disabled2) {
|
|
19981
|
+
return;
|
|
19982
|
+
}
|
|
19983
|
+
const removedFile = selectedFiles[index2];
|
|
19984
|
+
const nextFiles = selectedFiles.filter((_2, currentIndex) => {
|
|
19985
|
+
return currentIndex !== index2;
|
|
19986
|
+
});
|
|
19987
|
+
syncFilesToInput(nextFiles, event);
|
|
19988
|
+
onFileRemove?.(removedFile, index2, event);
|
|
19989
|
+
};
|
|
19990
|
+
const hintText = dropHint ?? (multiple ? "Drop files here or click to add more." : "Drop a file here or click to browse.");
|
|
19991
|
+
const selectedSummary = selectedFiles.length > 0 ? `${selectedFiles.length} file${selectedFiles.length === 1 ? "" : "s"} selected` : placeholder;
|
|
19992
|
+
const dropzoneIcon2 = icon2 ?? /* @__PURE__ */ jsxRuntimeExports.jsx(UploadIcon, {});
|
|
19993
|
+
const fileFallbackIcon = icon2 ?? /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, {});
|
|
19994
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$6.root, className), children: [
|
|
19995
|
+
label2 && /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: styles$6.label, htmlFor: inputId, children: label2 }),
|
|
19996
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
19997
|
+
"div",
|
|
19998
|
+
{
|
|
19999
|
+
className: clsx(
|
|
20000
|
+
styles$6.dropzone,
|
|
20001
|
+
!variant && styles$6.pageBackground,
|
|
20002
|
+
variant && styles$6[variant],
|
|
20003
|
+
chamfer2 && chamferStyles.chamfer,
|
|
20004
|
+
size2 === "large" && styles$6.large,
|
|
20005
|
+
size2 === "small" && styles$6.small,
|
|
20006
|
+
disabled2 && styles$6.disabled,
|
|
20007
|
+
disabled2 && chamferStyles.disabled,
|
|
20008
|
+
disabled2 && hatchStyles.hatch,
|
|
20009
|
+
isDragging && styles$6.dragging,
|
|
20010
|
+
selectedFiles.length > 0 && styles$6.hasFiles,
|
|
20011
|
+
dropzoneClassName
|
|
20012
|
+
),
|
|
20013
|
+
onClick: handleDropzoneClick,
|
|
20014
|
+
onKeyDown: handleDropzoneKeyDown,
|
|
20015
|
+
onDragEnter: handleDragEnter,
|
|
20016
|
+
onDragOver: handleDragOver,
|
|
20017
|
+
onDragLeave: handleDragLeave,
|
|
20018
|
+
onDrop: handleDrop,
|
|
20019
|
+
role: "button",
|
|
20020
|
+
tabIndex: disabled2 ? -1 : 0,
|
|
20021
|
+
"aria-disabled": disabled2 || void 0,
|
|
20022
|
+
children: [
|
|
20023
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20024
|
+
"input",
|
|
20025
|
+
{
|
|
20026
|
+
ref: setInputNode,
|
|
20027
|
+
id: inputId,
|
|
20028
|
+
className: styles$6.input,
|
|
20029
|
+
type: "file",
|
|
20030
|
+
disabled: disabled2,
|
|
20031
|
+
...inputProps,
|
|
20032
|
+
onChange: handleInputChange
|
|
20033
|
+
}
|
|
20034
|
+
),
|
|
20035
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$6.dropzoneContent, children: [
|
|
20036
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.dropzoneIcon, "aria-hidden": true, children: dropzoneIcon2 }),
|
|
20037
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$6.dropzoneText, children: [
|
|
20038
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.dropzoneTitle, children: selectedSummary }),
|
|
20039
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.dropzoneHint, children: hintText })
|
|
20040
|
+
] })
|
|
20041
|
+
] }),
|
|
20042
|
+
children2
|
|
20043
|
+
]
|
|
20044
|
+
}
|
|
20045
|
+
),
|
|
20046
|
+
helperText2 && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$6.helperText, children: helperText2 }),
|
|
20047
|
+
showFileList && selectedFiles.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$6.fileList, children: previewItems.map((item2, index2) => {
|
|
20048
|
+
if (renderFile) {
|
|
20049
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$6.customFileRow, children: [
|
|
20050
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$6.customFile, children: renderFile(item2.file, index2) }),
|
|
20051
|
+
removable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20052
|
+
"button",
|
|
20053
|
+
{
|
|
20054
|
+
type: "button",
|
|
20055
|
+
className: styles$6.removeButton,
|
|
20056
|
+
onClick: (event) => handleRemoveFile(index2, event),
|
|
20057
|
+
"aria-label": `Remove ${item2.name}`,
|
|
20058
|
+
disabled: disabled2,
|
|
20059
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TrashIcon, {})
|
|
20060
|
+
}
|
|
20061
|
+
)
|
|
20062
|
+
] }, `${item2.name}-${index2}`);
|
|
20063
|
+
}
|
|
20064
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$6.fileItem, children: [
|
|
20065
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$6.fileInfo, children: [
|
|
20066
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.filePreview, "aria-hidden": true, children: item2.previewUrl ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20067
|
+
"img",
|
|
20068
|
+
{
|
|
20069
|
+
className: styles$6.filePreviewImage,
|
|
20070
|
+
src: item2.previewUrl,
|
|
20071
|
+
alt: ""
|
|
20072
|
+
}
|
|
20073
|
+
) : fileFallbackIcon }),
|
|
20074
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$6.fileMeta, children: [
|
|
20075
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.fileName, children: item2.name }),
|
|
20076
|
+
item2.sizeText && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$6.fileSize, children: item2.sizeText })
|
|
20077
|
+
] })
|
|
20078
|
+
] }),
|
|
20079
|
+
removable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20080
|
+
"button",
|
|
20081
|
+
{
|
|
20082
|
+
type: "button",
|
|
20083
|
+
className: styles$6.removeButton,
|
|
20084
|
+
onClick: (event) => handleRemoveFile(index2, event),
|
|
20085
|
+
"aria-label": `Remove ${item2.name}`,
|
|
20086
|
+
disabled: disabled2,
|
|
20087
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TrashIcon, {})
|
|
20088
|
+
}
|
|
20089
|
+
)
|
|
20090
|
+
] }, `${item2.name}-${index2}`);
|
|
20091
|
+
}) })
|
|
20092
|
+
] });
|
|
20093
|
+
});
|
|
19280
20094
|
function createCollection(name) {
|
|
19281
20095
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
19282
20096
|
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
|
|
@@ -26519,12 +27333,12 @@ var Overlay = DialogOverlay;
|
|
|
26519
27333
|
var Content = DialogContent;
|
|
26520
27334
|
var Title = DialogTitle;
|
|
26521
27335
|
var Close = DialogClose;
|
|
26522
|
-
const overlay = "
|
|
26523
|
-
const overlayBackdrop = "
|
|
26524
|
-
const content$1 = "
|
|
26525
|
-
const title = "
|
|
26526
|
-
const body = "
|
|
26527
|
-
const footer = "
|
|
27336
|
+
const overlay = "_overlay_cozou_43";
|
|
27337
|
+
const overlayBackdrop = "_overlayBackdrop_cozou_49";
|
|
27338
|
+
const content$1 = "_content_cozou_63";
|
|
27339
|
+
const title = "_title_cozou_88";
|
|
27340
|
+
const body = "_body_cozou_92";
|
|
27341
|
+
const footer = "_footer_cozou_97";
|
|
26528
27342
|
const styles$1 = {
|
|
26529
27343
|
overlay,
|
|
26530
27344
|
overlayBackdrop,
|
|
@@ -26535,39 +27349,65 @@ const styles$1 = {
|
|
|
26535
27349
|
};
|
|
26536
27350
|
const useModal = ({ title: title2, content: content2, footer: footer2 }) => {
|
|
26537
27351
|
const [open2, setOpen] = React.useState(false);
|
|
26538
|
-
const
|
|
26539
|
-
|
|
26540
|
-
|
|
26541
|
-
|
|
26542
|
-
|
|
26543
|
-
|
|
26544
|
-
|
|
26545
|
-
|
|
26546
|
-
|
|
26547
|
-
|
|
26548
|
-
|
|
26549
|
-
|
|
26550
|
-
|
|
26551
|
-
|
|
26552
|
-
|
|
26553
|
-
|
|
26554
|
-
|
|
26555
|
-
|
|
26556
|
-
|
|
26557
|
-
|
|
26558
|
-
|
|
26559
|
-
|
|
26560
|
-
|
|
26561
|
-
|
|
26562
|
-
|
|
26563
|
-
|
|
26564
|
-
|
|
26565
|
-
|
|
26566
|
-
|
|
26567
|
-
|
|
26568
|
-
|
|
26569
|
-
|
|
26570
|
-
|
|
27352
|
+
const modalConfigRef = React.useRef({
|
|
27353
|
+
open: open2,
|
|
27354
|
+
setOpen,
|
|
27355
|
+
title: title2,
|
|
27356
|
+
content: content2,
|
|
27357
|
+
footer: footer2
|
|
27358
|
+
});
|
|
27359
|
+
modalConfigRef.current = {
|
|
27360
|
+
open: open2,
|
|
27361
|
+
setOpen,
|
|
27362
|
+
title: title2,
|
|
27363
|
+
content: content2,
|
|
27364
|
+
footer: footer2
|
|
27365
|
+
};
|
|
27366
|
+
const Modal = React.useMemo(
|
|
27367
|
+
() => function Modal2() {
|
|
27368
|
+
const {
|
|
27369
|
+
open: isOpen,
|
|
27370
|
+
setOpen: onOpenChange,
|
|
27371
|
+
title: currentTitle,
|
|
27372
|
+
content: currentContent,
|
|
27373
|
+
footer: currentFooter
|
|
27374
|
+
} = modalConfigRef.current;
|
|
27375
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Root, { open: isOpen, onOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Portal, { children: [
|
|
27376
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { className: `${styles$1.overlay} ${hatchStyles.hatch}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1.overlayBackdrop }) }),
|
|
27377
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
27378
|
+
Content,
|
|
27379
|
+
{
|
|
27380
|
+
className: `${styles$1.content} ${chamferStyles.chamfer}`,
|
|
27381
|
+
children: [
|
|
27382
|
+
currentTitle && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
27383
|
+
"div",
|
|
27384
|
+
{
|
|
27385
|
+
style: {
|
|
27386
|
+
display: "flex",
|
|
27387
|
+
flexDirection: "row",
|
|
27388
|
+
justifyContent: "space-between",
|
|
27389
|
+
alignItems: "center",
|
|
27390
|
+
margin: -12,
|
|
27391
|
+
marginBottom: 0,
|
|
27392
|
+
padding: 12,
|
|
27393
|
+
borderBottom: "var(--border-thickness) solid var(--border-color)"
|
|
27394
|
+
},
|
|
27395
|
+
className: classNames(hatchStyles.hatch),
|
|
27396
|
+
children: [
|
|
27397
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Title, { className: styles$1.title, children: currentTitle }),
|
|
27398
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Close, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "small", variant: "danger", children: "Close" }) })
|
|
27399
|
+
]
|
|
27400
|
+
}
|
|
27401
|
+
),
|
|
27402
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1.body, children: currentContent }),
|
|
27403
|
+
currentFooter && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classNames(styles$1.footer, hatchStyles.hatch), children: currentFooter })
|
|
27404
|
+
]
|
|
27405
|
+
}
|
|
27406
|
+
)
|
|
27407
|
+
] }) });
|
|
27408
|
+
},
|
|
27409
|
+
[]
|
|
27410
|
+
);
|
|
26571
27411
|
const trigger2 = (node) => /* @__PURE__ */ jsxRuntimeExports.jsx(Trigger, { asChild: true, children: node });
|
|
26572
27412
|
return { Modal, trigger: trigger2, open: open2, setOpen };
|
|
26573
27413
|
};
|
|
@@ -26916,6 +27756,7 @@ export {
|
|
|
26916
27756
|
Checkbox,
|
|
26917
27757
|
ColorSwitcher,
|
|
26918
27758
|
Dropdown,
|
|
27759
|
+
FileUpload,
|
|
26919
27760
|
Hatch,
|
|
26920
27761
|
Input,
|
|
26921
27762
|
JCUIProvider,
|