@jackcrane/ui 0.1.10 → 0.1.12
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 +1045 -218
- package/dist/jcui.es.js +1046 -219
- 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;
|
|
@@ -795,7 +1094,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
795
1094
|
inherits: true;
|
|
796
1095
|
initial-value: transparent;
|
|
797
1096
|
}
|
|
798
|
-
.
|
|
1097
|
+
._trigger_7ctf7_7 {
|
|
799
1098
|
display: inline-flex;
|
|
800
1099
|
align-items: center;
|
|
801
1100
|
justify-content: space-between;
|
|
@@ -808,29 +1107,38 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
808
1107
|
color: var(--button-color, inherit);
|
|
809
1108
|
cursor: pointer;
|
|
810
1109
|
}
|
|
811
|
-
.
|
|
1110
|
+
._trigger_7ctf7_7:hover {
|
|
812
1111
|
--dropdown-bg: var(--secondary-color-100);
|
|
813
1112
|
}
|
|
814
|
-
.
|
|
1113
|
+
._trigger_7ctf7_7:active {
|
|
815
1114
|
--dropdown-bg: var(--secondary-color-200);
|
|
816
1115
|
}
|
|
817
|
-
.
|
|
1116
|
+
._pageBackground_7ctf7_29 {
|
|
1117
|
+
--dropdown-bg: var(--body-bg);
|
|
1118
|
+
--button-bg: var(--body-bg);
|
|
1119
|
+
}
|
|
1120
|
+
._pageBackground_7ctf7_29:hover,
|
|
1121
|
+
._pageBackground_7ctf7_29:active {
|
|
1122
|
+
--dropdown-bg: var(--body-bg);
|
|
1123
|
+
--button-bg: var(--body-bg);
|
|
1124
|
+
}
|
|
1125
|
+
._large_7ctf7_40 {
|
|
818
1126
|
font-size: 1.25rem;
|
|
819
1127
|
padding: 0.75rem 1.25rem;
|
|
820
1128
|
}
|
|
821
|
-
.
|
|
1129
|
+
._small_7ctf7_45 {
|
|
822
1130
|
font-size: 0.75rem;
|
|
823
1131
|
padding: 0.25rem 0.5rem;
|
|
824
1132
|
}
|
|
825
|
-
.
|
|
1133
|
+
._disabled_7ctf7_50 {
|
|
826
1134
|
opacity: 0.5;
|
|
827
1135
|
cursor: not-allowed;
|
|
828
1136
|
}
|
|
829
|
-
.
|
|
1137
|
+
._icon_7ctf7_55 {
|
|
830
1138
|
opacity: 0.65;
|
|
831
1139
|
font-size: 0.85rem;
|
|
832
1140
|
}
|
|
833
|
-
.
|
|
1141
|
+
._content_7ctf7_60 {
|
|
834
1142
|
background-color: var(--body-bg);
|
|
835
1143
|
border: var(--border-thickness) solid var(--border-color);
|
|
836
1144
|
--button-bg: var(--body-bg);
|
|
@@ -844,26 +1152,26 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
844
1152
|
will-change: transform, opacity;
|
|
845
1153
|
transform: translateY(-1px);
|
|
846
1154
|
}
|
|
847
|
-
.
|
|
1155
|
+
._content_7ctf7_60[data-state="closed"] ._viewport_7ctf7_75 {
|
|
848
1156
|
animation: none;
|
|
849
1157
|
}
|
|
850
|
-
.
|
|
851
|
-
animation:
|
|
1158
|
+
._content_7ctf7_60[data-state="open"][data-side="bottom"] ._viewport_7ctf7_75 {
|
|
1159
|
+
animation: _slideUpAndFade_7ctf7_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
852
1160
|
transform-origin: top center;
|
|
853
1161
|
}
|
|
854
|
-
.
|
|
855
|
-
animation:
|
|
1162
|
+
._content_7ctf7_60[data-state="open"][data-side="top"] ._viewport_7ctf7_75 {
|
|
1163
|
+
animation: _slideDownAndFade_7ctf7_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
856
1164
|
transform-origin: bottom center;
|
|
857
1165
|
}
|
|
858
|
-
.
|
|
859
|
-
animation:
|
|
1166
|
+
._content_7ctf7_60[data-state="open"][data-side="left"] ._viewport_7ctf7_75 {
|
|
1167
|
+
animation: _slideRightAndFade_7ctf7_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
860
1168
|
transform-origin: right center;
|
|
861
1169
|
}
|
|
862
|
-
.
|
|
863
|
-
animation:
|
|
1170
|
+
._content_7ctf7_60[data-state="open"][data-side="right"] ._viewport_7ctf7_75 {
|
|
1171
|
+
animation: _slideLeftAndFade_7ctf7_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
864
1172
|
transform-origin: left center;
|
|
865
1173
|
}
|
|
866
|
-
.
|
|
1174
|
+
._viewport_7ctf7_75 {
|
|
867
1175
|
display: flex;
|
|
868
1176
|
flex-direction: column;
|
|
869
1177
|
animation-duration: 180ms;
|
|
@@ -872,7 +1180,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
872
1180
|
will-change: transform, opacity;
|
|
873
1181
|
transform: none;
|
|
874
1182
|
}
|
|
875
|
-
.
|
|
1183
|
+
._item_7ctf7_109 {
|
|
876
1184
|
display: flex;
|
|
877
1185
|
align-items: center;
|
|
878
1186
|
justify-content: flex-start;
|
|
@@ -885,91 +1193,91 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
885
1193
|
background: transparent;
|
|
886
1194
|
text-decoration: none;
|
|
887
1195
|
}
|
|
888
|
-
.
|
|
1196
|
+
._item_7ctf7_109[data-highlighted] {
|
|
889
1197
|
background-color: var(--secondary-color-100);
|
|
890
1198
|
}
|
|
891
|
-
.
|
|
1199
|
+
._item_7ctf7_109[data-disabled] {
|
|
892
1200
|
opacity: 0.5;
|
|
893
1201
|
cursor: not-allowed;
|
|
894
1202
|
}
|
|
895
|
-
.
|
|
1203
|
+
._itemLabel_7ctf7_132 {
|
|
896
1204
|
flex: 1;
|
|
897
1205
|
}
|
|
898
|
-
.
|
|
1206
|
+
._itemIcon_7ctf7_136 {
|
|
899
1207
|
display: inline-flex;
|
|
900
1208
|
align-items: center;
|
|
901
1209
|
justify-content: center;
|
|
902
1210
|
width: 1.25rem;
|
|
903
1211
|
height: 1.25rem;
|
|
904
1212
|
}
|
|
905
|
-
.
|
|
1213
|
+
._itemIcon_7ctf7_136 svg {
|
|
906
1214
|
height: 1.25rem;
|
|
907
1215
|
}
|
|
908
|
-
.
|
|
1216
|
+
._separator_7ctf7_148 {
|
|
909
1217
|
height: var(--border-thickness);
|
|
910
1218
|
background-color: var(--border-color);
|
|
911
1219
|
}
|
|
912
|
-
.
|
|
1220
|
+
._arrow_7ctf7_153 {
|
|
913
1221
|
fill: var(--body-bg);
|
|
914
1222
|
stroke: var(--border-color);
|
|
915
1223
|
stroke-width: var(--border-thickness);
|
|
916
1224
|
stroke-linejoin: round;
|
|
917
1225
|
}
|
|
918
|
-
.
|
|
1226
|
+
._primary_7ctf7_160 {
|
|
919
1227
|
--dropdown-bg: var(--primary-color-100);
|
|
920
1228
|
--border-color: var(--primary-color-300);
|
|
921
1229
|
--button-color: var(--primary-color-800);
|
|
922
1230
|
--border-accent-color: var(--primary-color-600);
|
|
923
1231
|
}
|
|
924
|
-
.
|
|
1232
|
+
._primary_7ctf7_160:hover {
|
|
925
1233
|
--dropdown-bg: var(--primary-color-200);
|
|
926
1234
|
}
|
|
927
|
-
.
|
|
1235
|
+
._success_7ctf7_171 {
|
|
928
1236
|
--dropdown-bg: var(--success-color-100);
|
|
929
1237
|
--border-color: var(--success-color-300);
|
|
930
1238
|
--button-color: var(--success-color-800);
|
|
931
1239
|
--border-accent-color: var(--success-color-600);
|
|
932
1240
|
}
|
|
933
|
-
.
|
|
1241
|
+
._success_7ctf7_171:hover {
|
|
934
1242
|
--dropdown-bg: var(--success-color-200);
|
|
935
1243
|
}
|
|
936
|
-
.
|
|
1244
|
+
._warning_7ctf7_182 {
|
|
937
1245
|
--dropdown-bg: var(--warning-color-100);
|
|
938
1246
|
--border-color: var(--warning-color-300);
|
|
939
1247
|
--button-color: var(--warning-color-800);
|
|
940
1248
|
--border-accent-color: var(--warning-color-600);
|
|
941
1249
|
}
|
|
942
|
-
.
|
|
1250
|
+
._warning_7ctf7_182:hover {
|
|
943
1251
|
--dropdown-bg: var(--warning-color-200);
|
|
944
1252
|
}
|
|
945
|
-
.
|
|
1253
|
+
._danger_7ctf7_193 {
|
|
946
1254
|
--dropdown-bg: var(--danger-color-100);
|
|
947
1255
|
--border-color: var(--danger-color-300);
|
|
948
1256
|
--button-color: var(--danger-color-800);
|
|
949
1257
|
--border-accent-color: var(--danger-color-600);
|
|
950
1258
|
}
|
|
951
|
-
.
|
|
1259
|
+
._danger_7ctf7_193:hover {
|
|
952
1260
|
--dropdown-bg: var(--danger-color-200);
|
|
953
1261
|
}
|
|
954
|
-
.
|
|
1262
|
+
._info_7ctf7_204 {
|
|
955
1263
|
--dropdown-bg: var(--info-color-100);
|
|
956
1264
|
--border-color: var(--info-color-300);
|
|
957
1265
|
--button-color: var(--info-color-800);
|
|
958
1266
|
--border-accent-color: var(--info-color-600);
|
|
959
1267
|
}
|
|
960
|
-
.
|
|
1268
|
+
._info_7ctf7_204:hover {
|
|
961
1269
|
--dropdown-bg: var(--info-color-200);
|
|
962
1270
|
}
|
|
963
|
-
.
|
|
1271
|
+
._secondary_7ctf7_215 {
|
|
964
1272
|
--dropdown-bg: var(--secondary-color-100);
|
|
965
1273
|
--border-color: var(--secondary-color-300);
|
|
966
1274
|
--button-color: var(--secondary-color-800);
|
|
967
1275
|
--border-accent-color: var(--secondary-color-600);
|
|
968
1276
|
}
|
|
969
|
-
.
|
|
1277
|
+
._secondary_7ctf7_215:hover {
|
|
970
1278
|
--dropdown-bg: var(--secondary-color-200);
|
|
971
1279
|
}
|
|
972
|
-
@keyframes
|
|
1280
|
+
@keyframes _slideUpAndFade_7ctf7_1 {
|
|
973
1281
|
from {
|
|
974
1282
|
opacity: 0;
|
|
975
1283
|
transform: translateY(2px);
|
|
@@ -979,7 +1287,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
979
1287
|
transform: translateY(0);
|
|
980
1288
|
}
|
|
981
1289
|
}
|
|
982
|
-
@keyframes
|
|
1290
|
+
@keyframes _slideRightAndFade_7ctf7_1 {
|
|
983
1291
|
from {
|
|
984
1292
|
opacity: 0;
|
|
985
1293
|
transform: translateX(-2px);
|
|
@@ -989,7 +1297,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
989
1297
|
transform: translateX(0);
|
|
990
1298
|
}
|
|
991
1299
|
}
|
|
992
|
-
@keyframes
|
|
1300
|
+
@keyframes _slideDownAndFade_7ctf7_1 {
|
|
993
1301
|
from {
|
|
994
1302
|
opacity: 0;
|
|
995
1303
|
transform: translateY(-2px);
|
|
@@ -999,7 +1307,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
999
1307
|
transform: translateY(0);
|
|
1000
1308
|
}
|
|
1001
1309
|
}
|
|
1002
|
-
@keyframes
|
|
1310
|
+
@keyframes _slideLeftAndFade_7ctf7_1 {
|
|
1003
1311
|
from {
|
|
1004
1312
|
opacity: 0;
|
|
1005
1313
|
transform: translateX(2px);
|
|
@@ -1095,7 +1403,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1095
1403
|
--button-color: var(--body-color);
|
|
1096
1404
|
}
|
|
1097
1405
|
/* modal.module.css */
|
|
1098
|
-
@keyframes
|
|
1406
|
+
@keyframes _overlayIn_cozou_1 {
|
|
1099
1407
|
from {
|
|
1100
1408
|
opacity: 0;
|
|
1101
1409
|
}
|
|
@@ -1103,7 +1411,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1103
1411
|
opacity: 1;
|
|
1104
1412
|
}
|
|
1105
1413
|
}
|
|
1106
|
-
@keyframes
|
|
1414
|
+
@keyframes _overlayOut_cozou_1 {
|
|
1107
1415
|
from {
|
|
1108
1416
|
opacity: 1;
|
|
1109
1417
|
}
|
|
@@ -1111,7 +1419,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1111
1419
|
opacity: 0;
|
|
1112
1420
|
}
|
|
1113
1421
|
}
|
|
1114
|
-
@keyframes
|
|
1422
|
+
@keyframes _panelIn_cozou_1 {
|
|
1115
1423
|
from {
|
|
1116
1424
|
opacity: 0;
|
|
1117
1425
|
transform: translateX(400px);
|
|
@@ -1121,7 +1429,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1121
1429
|
transform: translateX(0);
|
|
1122
1430
|
}
|
|
1123
1431
|
}
|
|
1124
|
-
@keyframes
|
|
1432
|
+
@keyframes _panelOut_cozou_1 {
|
|
1125
1433
|
from {
|
|
1126
1434
|
opacity: 1;
|
|
1127
1435
|
transform: translateX(0);
|
|
@@ -1131,23 +1439,23 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1131
1439
|
transform: translateX(100%);
|
|
1132
1440
|
}
|
|
1133
1441
|
}
|
|
1134
|
-
.
|
|
1442
|
+
._overlay_cozou_43 {
|
|
1135
1443
|
position: fixed;
|
|
1136
1444
|
inset: 0;
|
|
1137
1445
|
z-index: 98;
|
|
1138
1446
|
}
|
|
1139
|
-
.
|
|
1447
|
+
._overlayBackdrop_cozou_49 {
|
|
1140
1448
|
position: absolute;
|
|
1141
1449
|
inset: 0;
|
|
1142
1450
|
background: color-mix(in srgb, var(--body-bg) 50%, transparent);
|
|
1143
1451
|
}
|
|
1144
|
-
.
|
|
1145
|
-
animation:
|
|
1452
|
+
._overlay_cozou_43[data-state="open"] {
|
|
1453
|
+
animation: _overlayIn_cozou_1 160ms ease-out;
|
|
1146
1454
|
}
|
|
1147
|
-
.
|
|
1148
|
-
animation:
|
|
1455
|
+
._overlay_cozou_43[data-state="closed"] {
|
|
1456
|
+
animation: _overlayOut_cozou_1 120ms ease-in;
|
|
1149
1457
|
}
|
|
1150
|
-
.
|
|
1458
|
+
._content_cozou_63 {
|
|
1151
1459
|
position: fixed;
|
|
1152
1460
|
top: 10px;
|
|
1153
1461
|
right: 10px;
|
|
@@ -1160,19 +1468,20 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
1160
1468
|
display: flex;
|
|
1161
1469
|
flex-direction: column;
|
|
1162
1470
|
}
|
|
1163
|
-
.
|
|
1164
|
-
animation:
|
|
1471
|
+
._content_cozou_63[data-state="open"] {
|
|
1472
|
+
animation: _panelIn_cozou_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
1165
1473
|
}
|
|
1166
|
-
.
|
|
1167
|
-
animation:
|
|
1474
|
+
._content_cozou_63[data-state="closed"] {
|
|
1475
|
+
animation: _panelOut_cozou_1 140ms ease-in;
|
|
1168
1476
|
}
|
|
1169
|
-
.
|
|
1477
|
+
._title_cozou_88 {
|
|
1170
1478
|
margin: 0;
|
|
1171
1479
|
}
|
|
1172
|
-
.
|
|
1480
|
+
._body_cozou_92 {
|
|
1173
1481
|
flex: 1;
|
|
1482
|
+
padding-top: 1rem;
|
|
1174
1483
|
}
|
|
1175
|
-
.
|
|
1484
|
+
._footer_cozou_97 {
|
|
1176
1485
|
margin: -12px;
|
|
1177
1486
|
margin-top: 0px;
|
|
1178
1487
|
padding: 12px;
|
|
@@ -1593,7 +1902,7 @@ hr {
|
|
|
1593
1902
|
padding-left: 0.5rem;
|
|
1594
1903
|
padding-right: 0.5rem;
|
|
1595
1904
|
width: 100%;
|
|
1596
|
-
}`)),document.head.appendChild(
|
|
1905
|
+
}`)),document.head.appendChild(n)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
1597
1906
|
"use strict";
|
|
1598
1907
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
1599
1908
|
const React = require("react");
|
|
@@ -1932,35 +2241,35 @@ function clsx() {
|
|
|
1932
2241
|
return n2;
|
|
1933
2242
|
}
|
|
1934
2243
|
const button = "_button_105y0_7";
|
|
1935
|
-
const pageBackground$
|
|
1936
|
-
const large$
|
|
1937
|
-
const small$
|
|
1938
|
-
const disabled$
|
|
1939
|
-
const primary$
|
|
1940
|
-
const success$
|
|
1941
|
-
const warning$
|
|
1942
|
-
const danger$
|
|
1943
|
-
const info$
|
|
1944
|
-
const secondary$
|
|
1945
|
-
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 = {
|
|
1946
2255
|
button,
|
|
1947
|
-
pageBackground: pageBackground$
|
|
1948
|
-
large: large$
|
|
1949
|
-
small: small$
|
|
1950
|
-
disabled: disabled$
|
|
1951
|
-
primary: primary$
|
|
1952
|
-
success: success$
|
|
1953
|
-
warning: warning$
|
|
1954
|
-
danger: danger$
|
|
1955
|
-
info: info$
|
|
1956
|
-
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
|
|
1957
2266
|
};
|
|
1958
2267
|
const chamfer$1 = "_chamfer_1o5rm_1";
|
|
1959
|
-
const disabled$
|
|
2268
|
+
const disabled$6 = "_disabled_1o5rm_15";
|
|
1960
2269
|
const chamferOnHover = "_chamferOnHover_1o5rm_60";
|
|
1961
2270
|
const chamferStyles = {
|
|
1962
2271
|
chamfer: chamfer$1,
|
|
1963
|
-
disabled: disabled$
|
|
2272
|
+
disabled: disabled$6,
|
|
1964
2273
|
chamferOnHover
|
|
1965
2274
|
};
|
|
1966
2275
|
const hatch$1 = "_hatch_owfoz_1";
|
|
@@ -1975,10 +2284,10 @@ const ThemeContext = React.createContext({
|
|
|
1975
2284
|
});
|
|
1976
2285
|
const useJCUITheme = () => React.useContext(ThemeContext);
|
|
1977
2286
|
const loader = "_loader_1y0fe_1";
|
|
1978
|
-
const styles$
|
|
2287
|
+
const styles$b = {
|
|
1979
2288
|
loader
|
|
1980
2289
|
};
|
|
1981
|
-
const Loader = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$
|
|
2290
|
+
const Loader = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$b.loader, ...props });
|
|
1982
2291
|
function Button({
|
|
1983
2292
|
children: children2,
|
|
1984
2293
|
variant,
|
|
@@ -1992,15 +2301,15 @@ function Button({
|
|
|
1992
2301
|
"button",
|
|
1993
2302
|
{
|
|
1994
2303
|
className: clsx(
|
|
1995
|
-
styles$
|
|
1996
|
-
!variant && styles$
|
|
1997
|
-
styles$
|
|
2304
|
+
styles$c.button,
|
|
2305
|
+
!variant && styles$c.pageBackground,
|
|
2306
|
+
styles$c[variant],
|
|
1998
2307
|
chamfer2 && chamferStyles.chamfer,
|
|
1999
|
-
size2 === "large" && styles$
|
|
2000
|
-
size2 === "small" && styles$
|
|
2308
|
+
size2 === "large" && styles$c.large,
|
|
2309
|
+
size2 === "small" && styles$c.small,
|
|
2001
2310
|
disabled2 && chamferStyles.disabled,
|
|
2002
2311
|
disabled2 && hatchStyles.hatch,
|
|
2003
|
-
disabled2 && styles$
|
|
2312
|
+
disabled2 && styles$c.disabled
|
|
2004
2313
|
),
|
|
2005
2314
|
disabled: disabled2,
|
|
2006
2315
|
...props,
|
|
@@ -2109,32 +2418,32 @@ function requireClassnames() {
|
|
|
2109
2418
|
var classnamesExports = requireClassnames();
|
|
2110
2419
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
2111
2420
|
const card = "_card_et6fi_1";
|
|
2112
|
-
const pageBackground$
|
|
2421
|
+
const pageBackground$3 = "_pageBackground_et6fi_11";
|
|
2113
2422
|
const title$1 = "_title_et6fi_18";
|
|
2114
2423
|
const body$1 = "_body_et6fi_25";
|
|
2115
2424
|
const footer$1 = "_footer_et6fi_30";
|
|
2116
|
-
const large$
|
|
2117
|
-
const small$
|
|
2118
|
-
const primary$
|
|
2119
|
-
const success$
|
|
2120
|
-
const warning$
|
|
2121
|
-
const danger$
|
|
2122
|
-
const info$
|
|
2123
|
-
const secondary$
|
|
2124
|
-
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 = {
|
|
2125
2434
|
card,
|
|
2126
|
-
pageBackground: pageBackground$
|
|
2435
|
+
pageBackground: pageBackground$3,
|
|
2127
2436
|
title: title$1,
|
|
2128
2437
|
body: body$1,
|
|
2129
2438
|
footer: footer$1,
|
|
2130
|
-
large: large$
|
|
2131
|
-
small: small$
|
|
2132
|
-
primary: primary$
|
|
2133
|
-
success: success$
|
|
2134
|
-
warning: warning$
|
|
2135
|
-
danger: danger$
|
|
2136
|
-
info: info$
|
|
2137
|
-
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
|
|
2138
2447
|
};
|
|
2139
2448
|
function Card({
|
|
2140
2449
|
children: children2,
|
|
@@ -2151,21 +2460,21 @@ function Card({
|
|
|
2151
2460
|
"div",
|
|
2152
2461
|
{
|
|
2153
2462
|
className: classNames(
|
|
2154
|
-
styles$
|
|
2155
|
-
!variant && styles$
|
|
2156
|
-
styles$
|
|
2463
|
+
styles$a.card,
|
|
2464
|
+
!variant && styles$a.pageBackground,
|
|
2465
|
+
styles$a[variant],
|
|
2157
2466
|
chamfer2 && chamferStyles.chamfer,
|
|
2158
|
-
size2 === "large" && styles$
|
|
2159
|
-
size2 === "small" && styles$
|
|
2467
|
+
size2 === "large" && styles$a.large,
|
|
2468
|
+
size2 === "small" && styles$a.small
|
|
2160
2469
|
),
|
|
2161
2470
|
...props,
|
|
2162
2471
|
children: [
|
|
2163
|
-
title2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classNames(styles$
|
|
2164
|
-
/* @__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 }),
|
|
2165
2474
|
footerHeight > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2166
2475
|
"div",
|
|
2167
2476
|
{
|
|
2168
|
-
className: classNames(hatchStyles.hatch, styles$
|
|
2477
|
+
className: classNames(hatchStyles.hatch, styles$a.footer),
|
|
2169
2478
|
style: { flexBasis: footerHeight },
|
|
2170
2479
|
children: footer2
|
|
2171
2480
|
}
|
|
@@ -2896,34 +3205,34 @@ function getState$2(checked) {
|
|
|
2896
3205
|
return isIndeterminate$1(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
2897
3206
|
}
|
|
2898
3207
|
const wrapper$1 = "_wrapper_178xv_25";
|
|
2899
|
-
const disabled$
|
|
2900
|
-
const root$
|
|
3208
|
+
const disabled$5 = "_disabled_178xv_34";
|
|
3209
|
+
const root$3 = "_root_178xv_39";
|
|
2901
3210
|
const indicator$1 = "_indicator_178xv_76";
|
|
2902
|
-
const large$
|
|
2903
|
-
const small$
|
|
3211
|
+
const large$5 = "_large_178xv_94";
|
|
3212
|
+
const small$5 = "_small_178xv_99";
|
|
2904
3213
|
const disabledBox = "_disabledBox_178xv_104";
|
|
2905
|
-
const label$
|
|
2906
|
-
const primary$
|
|
2907
|
-
const secondary$
|
|
2908
|
-
const success$
|
|
2909
|
-
const warning$
|
|
2910
|
-
const danger$
|
|
2911
|
-
const info$
|
|
2912
|
-
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 = {
|
|
2913
3222
|
wrapper: wrapper$1,
|
|
2914
|
-
disabled: disabled$
|
|
2915
|
-
root: root$
|
|
3223
|
+
disabled: disabled$5,
|
|
3224
|
+
root: root$3,
|
|
2916
3225
|
indicator: indicator$1,
|
|
2917
|
-
large: large$
|
|
2918
|
-
small: small$
|
|
3226
|
+
large: large$5,
|
|
3227
|
+
small: small$5,
|
|
2919
3228
|
disabledBox,
|
|
2920
|
-
label: label$
|
|
2921
|
-
primary: primary$
|
|
2922
|
-
secondary: secondary$
|
|
2923
|
-
success: success$
|
|
2924
|
-
warning: warning$
|
|
2925
|
-
danger: danger$
|
|
2926
|
-
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
|
|
2927
3236
|
};
|
|
2928
3237
|
const CheckIcon = () => /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { viewBox: "0 0 24 24", fill: "none", role: "presentation", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2929
3238
|
"polyline",
|
|
@@ -2946,32 +3255,32 @@ function Checkbox({
|
|
|
2946
3255
|
...props
|
|
2947
3256
|
}) {
|
|
2948
3257
|
const labelContent = label2 ?? children2;
|
|
2949
|
-
const variantClass = variant && styles$
|
|
2950
|
-
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;
|
|
2951
3260
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2952
3261
|
"label",
|
|
2953
3262
|
{
|
|
2954
|
-
className: clsx(styles$
|
|
3263
|
+
className: clsx(styles$9.wrapper, variantClass, disabled2 && styles$9.disabled),
|
|
2955
3264
|
children: [
|
|
2956
3265
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2957
3266
|
Checkbox$1,
|
|
2958
3267
|
{
|
|
2959
3268
|
className: clsx(
|
|
2960
|
-
styles$
|
|
3269
|
+
styles$9.root,
|
|
2961
3270
|
variantClass,
|
|
2962
3271
|
sizeClass,
|
|
2963
3272
|
chamfer2 && chamferStyles.chamfer,
|
|
2964
3273
|
disabled2 && chamferStyles.disabled,
|
|
2965
3274
|
disabled2 && hatchStyles.hatch,
|
|
2966
|
-
disabled2 && styles$
|
|
3275
|
+
disabled2 && styles$9.disabledBox,
|
|
2967
3276
|
className
|
|
2968
3277
|
),
|
|
2969
3278
|
disabled: disabled2,
|
|
2970
3279
|
...props,
|
|
2971
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckboxIndicator, { className: styles$
|
|
3280
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckboxIndicator, { className: styles$9.indicator, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, {}) })
|
|
2972
3281
|
}
|
|
2973
3282
|
),
|
|
2974
|
-
labelContent && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$
|
|
3283
|
+
labelContent && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$9.label, children: labelContent })
|
|
2975
3284
|
]
|
|
2976
3285
|
}
|
|
2977
3286
|
);
|
|
@@ -4421,13 +4730,13 @@ function* selection_iterator() {
|
|
|
4421
4730
|
}
|
|
4422
4731
|
}
|
|
4423
4732
|
}
|
|
4424
|
-
var root$
|
|
4733
|
+
var root$2 = [null];
|
|
4425
4734
|
function Selection$1(groups, parents) {
|
|
4426
4735
|
this._groups = groups;
|
|
4427
4736
|
this._parents = parents;
|
|
4428
4737
|
}
|
|
4429
4738
|
function selection() {
|
|
4430
|
-
return new Selection$1([[document.documentElement]], root$
|
|
4739
|
+
return new Selection$1([[document.documentElement]], root$2);
|
|
4431
4740
|
}
|
|
4432
4741
|
function selection_selection() {
|
|
4433
4742
|
return this;
|
|
@@ -4471,7 +4780,7 @@ Selection$1.prototype = selection.prototype = {
|
|
|
4471
4780
|
[Symbol.iterator]: selection_iterator
|
|
4472
4781
|
};
|
|
4473
4782
|
function select(selector2) {
|
|
4474
|
-
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);
|
|
4475
4784
|
}
|
|
4476
4785
|
function sourceEvent(event) {
|
|
4477
4786
|
let sourceEvent2;
|
|
@@ -13821,7 +14130,7 @@ let nextClipId = 0;
|
|
|
13821
14130
|
function getClipId() {
|
|
13822
14131
|
return `plot-clip-${++nextClipId}`;
|
|
13823
14132
|
}
|
|
13824
|
-
function styles$
|
|
14133
|
+
function styles$8(mark, {
|
|
13825
14134
|
title: title2,
|
|
13826
14135
|
href,
|
|
13827
14136
|
ariaLabel: variaLabel,
|
|
@@ -14187,7 +14496,7 @@ class Mark {
|
|
|
14187
14496
|
this.facetAnchor = maybeFacetAnchor(facetAnchor);
|
|
14188
14497
|
channels = maybeNamed(channels);
|
|
14189
14498
|
if (extraChannels !== void 0) channels = { ...maybeChannels(extraChannels), ...channels };
|
|
14190
|
-
if (defaults2 !== void 0) channels = { ...styles$
|
|
14499
|
+
if (defaults2 !== void 0) channels = { ...styles$8(this, options, defaults2), ...channels };
|
|
14191
14500
|
this.channels = Object.fromEntries(
|
|
14192
14501
|
Object.entries(channels).map(([name, channel]) => {
|
|
14193
14502
|
if (isOptions(channel.value)) {
|
|
@@ -19213,33 +19522,33 @@ const RadarChart = ({
|
|
|
19213
19522
|
});
|
|
19214
19523
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ObservablePlot, { options, className, style });
|
|
19215
19524
|
};
|
|
19216
|
-
const input = "_input_1ymvl_7";
|
|
19217
|
-
const pageBackground = "_pageBackground_1ymvl_24";
|
|
19218
|
-
const large$
|
|
19219
|
-
const small$
|
|
19220
|
-
const disabled$
|
|
19221
|
-
const primary$
|
|
19222
|
-
const success$
|
|
19223
|
-
const warning$
|
|
19224
|
-
const danger$
|
|
19225
|
-
const info$
|
|
19226
|
-
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";
|
|
19227
19536
|
const field = "_field_1ymvl_106";
|
|
19228
|
-
const label$
|
|
19229
|
-
const styles$
|
|
19230
|
-
input,
|
|
19231
|
-
pageBackground,
|
|
19232
|
-
large: large$
|
|
19233
|
-
small: small$
|
|
19234
|
-
disabled: disabled$
|
|
19235
|
-
primary: primary$
|
|
19236
|
-
success: success$
|
|
19237
|
-
warning: warning$
|
|
19238
|
-
danger: danger$
|
|
19239
|
-
info: info$
|
|
19240
|
-
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,
|
|
19241
19550
|
field,
|
|
19242
|
-
label: label$
|
|
19551
|
+
label: label$2
|
|
19243
19552
|
};
|
|
19244
19553
|
function Input({
|
|
19245
19554
|
variant,
|
|
@@ -19250,28 +19559,28 @@ function Input({
|
|
|
19250
19559
|
...props
|
|
19251
19560
|
}) {
|
|
19252
19561
|
const inputId = React.useId();
|
|
19253
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$
|
|
19254
|
-
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 }),
|
|
19255
19564
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19256
19565
|
"div",
|
|
19257
19566
|
{
|
|
19258
19567
|
className: classNames(
|
|
19259
19568
|
chamfer2 && chamferStyles.chamfer,
|
|
19260
|
-
!variant && styles$
|
|
19261
|
-
styles$
|
|
19569
|
+
!variant && styles$7.pageBackground,
|
|
19570
|
+
styles$7[variant]
|
|
19262
19571
|
),
|
|
19263
19572
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19264
19573
|
"input",
|
|
19265
19574
|
{
|
|
19266
19575
|
id: inputId,
|
|
19267
19576
|
className: classNames(
|
|
19268
|
-
styles$
|
|
19269
|
-
!variant && styles$
|
|
19270
|
-
styles$
|
|
19271
|
-
size2 === "large" && styles$
|
|
19272
|
-
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,
|
|
19273
19582
|
disabled2 && chamferStyles.disabled,
|
|
19274
|
-
disabled2 && styles$
|
|
19583
|
+
disabled2 && styles$7.disabled,
|
|
19275
19584
|
disabled2 && hatchStyles.hatch
|
|
19276
19585
|
),
|
|
19277
19586
|
disabled: disabled2,
|
|
@@ -19286,6 +19595,520 @@ function Input({
|
|
|
19286
19595
|
)
|
|
19287
19596
|
] });
|
|
19288
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
|
+
});
|
|
19289
20112
|
function createCollection(name) {
|
|
19290
20113
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
19291
20114
|
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
|
|
@@ -25571,30 +26394,32 @@ var Portal2 = DropdownMenuPortal;
|
|
|
25571
26394
|
var Content2 = DropdownMenuContent;
|
|
25572
26395
|
var Item2 = DropdownMenuItem;
|
|
25573
26396
|
var Separator2 = DropdownMenuSeparator;
|
|
25574
|
-
const trigger = "
|
|
25575
|
-
const
|
|
25576
|
-
const
|
|
25577
|
-
const
|
|
25578
|
-
const
|
|
25579
|
-
const
|
|
25580
|
-
const
|
|
25581
|
-
const
|
|
25582
|
-
const
|
|
25583
|
-
const
|
|
25584
|
-
const
|
|
25585
|
-
const
|
|
25586
|
-
const
|
|
25587
|
-
const
|
|
25588
|
-
const
|
|
25589
|
-
const
|
|
25590
|
-
const
|
|
25591
|
-
const
|
|
25592
|
-
const
|
|
25593
|
-
const
|
|
25594
|
-
const
|
|
25595
|
-
const
|
|
26397
|
+
const trigger = "_trigger_7ctf7_7";
|
|
26398
|
+
const pageBackground = "_pageBackground_7ctf7_29";
|
|
26399
|
+
const large = "_large_7ctf7_40";
|
|
26400
|
+
const small = "_small_7ctf7_45";
|
|
26401
|
+
const disabled = "_disabled_7ctf7_50";
|
|
26402
|
+
const icon = "_icon_7ctf7_55";
|
|
26403
|
+
const content$2 = "_content_7ctf7_60";
|
|
26404
|
+
const viewport = "_viewport_7ctf7_75";
|
|
26405
|
+
const slideUpAndFade = "_slideUpAndFade_7ctf7_1";
|
|
26406
|
+
const slideDownAndFade = "_slideDownAndFade_7ctf7_1";
|
|
26407
|
+
const slideRightAndFade = "_slideRightAndFade_7ctf7_1";
|
|
26408
|
+
const slideLeftAndFade = "_slideLeftAndFade_7ctf7_1";
|
|
26409
|
+
const item = "_item_7ctf7_109";
|
|
26410
|
+
const itemLabel = "_itemLabel_7ctf7_132";
|
|
26411
|
+
const itemIcon = "_itemIcon_7ctf7_136";
|
|
26412
|
+
const separator = "_separator_7ctf7_148";
|
|
26413
|
+
const arrow = "_arrow_7ctf7_153";
|
|
26414
|
+
const primary$2 = "_primary_7ctf7_160";
|
|
26415
|
+
const success$2 = "_success_7ctf7_171";
|
|
26416
|
+
const warning$2 = "_warning_7ctf7_182";
|
|
26417
|
+
const danger$2 = "_danger_7ctf7_193";
|
|
26418
|
+
const info$2 = "_info_7ctf7_204";
|
|
26419
|
+
const secondary$2 = "_secondary_7ctf7_215";
|
|
25596
26420
|
const styles$3 = {
|
|
25597
26421
|
trigger,
|
|
26422
|
+
pageBackground,
|
|
25598
26423
|
large,
|
|
25599
26424
|
small,
|
|
25600
26425
|
disabled,
|
|
@@ -25637,6 +26462,7 @@ function Dropdown({
|
|
|
25637
26462
|
}) {
|
|
25638
26463
|
const triggerClassName = clsx(
|
|
25639
26464
|
styles$3.trigger,
|
|
26465
|
+
!variant && styles$3.pageBackground,
|
|
25640
26466
|
variant && styles$3[variant],
|
|
25641
26467
|
chamfer2 && chamferStyles.chamfer,
|
|
25642
26468
|
size2 === "large" && styles$3.large,
|
|
@@ -26525,12 +27351,12 @@ var Overlay = DialogOverlay;
|
|
|
26525
27351
|
var Content = DialogContent;
|
|
26526
27352
|
var Title = DialogTitle;
|
|
26527
27353
|
var Close = DialogClose;
|
|
26528
|
-
const overlay = "
|
|
26529
|
-
const overlayBackdrop = "
|
|
26530
|
-
const content$1 = "
|
|
26531
|
-
const title = "
|
|
26532
|
-
const body = "
|
|
26533
|
-
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";
|
|
26534
27360
|
const styles$1 = {
|
|
26535
27361
|
overlay,
|
|
26536
27362
|
overlayBackdrop,
|
|
@@ -26921,6 +27747,7 @@ exports.Card = Card;
|
|
|
26921
27747
|
exports.Checkbox = Checkbox;
|
|
26922
27748
|
exports.ColorSwitcher = ColorSwitcher;
|
|
26923
27749
|
exports.Dropdown = Dropdown;
|
|
27750
|
+
exports.FileUpload = FileUpload;
|
|
26924
27751
|
exports.Hatch = Hatch;
|
|
26925
27752
|
exports.Input = Input;
|
|
26926
27753
|
exports.JCUIProvider = JCUIProvider;
|