@jackcrane/ui 0.1.7 → 0.1.9
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/Dropdown/dropdown.d.ts +10 -2
- package/dist/jcui.cjs.js +123 -99
- package/dist/jcui.es.js +123 -99
- package/package.json +1 -1
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
* @property {string} [value]
|
|
7
7
|
* @property {boolean} [disabled]
|
|
8
8
|
* @property {import("react").ReactNode} [icon]
|
|
9
|
-
* @property {() => void} [onSelect]
|
|
9
|
+
* @property {(value: string | undefined) => void} [onSelect]
|
|
10
|
+
* @property {(event: Event) => void} [onClick]
|
|
11
|
+
* @property {string} [href]
|
|
12
|
+
* @property {string} [target]
|
|
13
|
+
* @property {string} [rel]
|
|
10
14
|
* @property {"item" | "separator"} [type]
|
|
11
15
|
*/
|
|
12
16
|
/**
|
|
@@ -42,6 +46,10 @@ export type DropdownItem = {
|
|
|
42
46
|
value?: string;
|
|
43
47
|
disabled?: boolean;
|
|
44
48
|
icon?: import("react").ReactNode;
|
|
45
|
-
onSelect?: () => void;
|
|
49
|
+
onSelect?: (value: string | undefined) => void;
|
|
50
|
+
onClick?: (event: Event) => void;
|
|
51
|
+
href?: string;
|
|
52
|
+
target?: string;
|
|
53
|
+
rel?: string;
|
|
46
54
|
type?: "item" | "separator";
|
|
47
55
|
};
|
package/dist/jcui.cjs.js
CHANGED
|
@@ -209,7 +209,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
209
209
|
transform: rotate(360deg);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
.
|
|
212
|
+
._card_et6fi_1 {
|
|
213
213
|
border-width: var(--border-thickness);
|
|
214
214
|
border-style: solid;
|
|
215
215
|
font-size: 1rem;
|
|
@@ -218,64 +218,70 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
218
218
|
display: flex;
|
|
219
219
|
flex-direction: column;
|
|
220
220
|
}
|
|
221
|
-
.
|
|
221
|
+
._pageBackground_et6fi_11 {
|
|
222
|
+
--card-bg: var(--body-bg);
|
|
223
|
+
--button-bg: var(--body-bg);
|
|
224
|
+
--card-color: var(--body-color);
|
|
225
|
+
background-color: var(--body-bg);
|
|
226
|
+
}
|
|
227
|
+
._card_et6fi_1 ._title_et6fi_18 {
|
|
222
228
|
font-size: 1.25rem;
|
|
223
229
|
padding: 0.5rem 1rem;
|
|
224
230
|
border-bottom: var(--border-thickness) solid var(--border-color);
|
|
225
231
|
background-color: var(--card-bg);
|
|
226
232
|
}
|
|
227
|
-
.
|
|
233
|
+
._card_et6fi_1 ._body_et6fi_25 {
|
|
228
234
|
padding: 0.5rem 1rem;
|
|
229
235
|
width: 100%;
|
|
230
236
|
}
|
|
231
|
-
.
|
|
237
|
+
._card_et6fi_1 ._footer_et6fi_30 {
|
|
232
238
|
border-top: var(--border-thickness) solid var(--border-color);
|
|
233
239
|
flex: 1;
|
|
234
240
|
background-color: var(--card-bg);
|
|
235
241
|
padding: 0.5rem 1rem;
|
|
236
242
|
}
|
|
237
|
-
.
|
|
238
|
-
.
|
|
243
|
+
._large_et6fi_37 ._body_et6fi_25,
|
|
244
|
+
._large_et6fi_37 ._title_et6fi_18 {
|
|
239
245
|
font-size: 1.25rem;
|
|
240
246
|
padding: 0.75rem 1.25rem;
|
|
241
247
|
}
|
|
242
|
-
.
|
|
243
|
-
.
|
|
248
|
+
._small_et6fi_43 ._body_et6fi_25,
|
|
249
|
+
._small_et6fi_43 ._title_et6fi_18 {
|
|
244
250
|
font-size: 0.75rem;
|
|
245
251
|
padding: 0.25rem 0.5rem;
|
|
246
252
|
}
|
|
247
253
|
/* Variants */
|
|
248
|
-
.
|
|
254
|
+
._primary_et6fi_51 {
|
|
249
255
|
--card-bg: var(--primary-color-100);
|
|
250
256
|
--border-color: var(--primary-color-300);
|
|
251
257
|
--border-accent-color: var(--primary-color-600);
|
|
252
258
|
--card-color: var(--primary-color-800);
|
|
253
259
|
}
|
|
254
|
-
.
|
|
260
|
+
._success_et6fi_58 {
|
|
255
261
|
--card-bg: var(--success-color-100);
|
|
256
262
|
--border-color: var(--success-color-300);
|
|
257
263
|
--border-accent-color: var(--success-color-600);
|
|
258
264
|
--card-color: var(--success-color-800);
|
|
259
265
|
}
|
|
260
|
-
.
|
|
266
|
+
._warning_et6fi_65 {
|
|
261
267
|
--card-bg: var(--warning-color-100);
|
|
262
268
|
--border-color: var(--warning-color-300);
|
|
263
269
|
--border-accent-color: var(--warning-color-600);
|
|
264
270
|
--card-color: var(--warning-color-800);
|
|
265
271
|
}
|
|
266
|
-
.
|
|
272
|
+
._danger_et6fi_72 {
|
|
267
273
|
--card-bg: var(--danger-color-100);
|
|
268
274
|
--border-color: var(--danger-color-300);
|
|
269
275
|
--border-accent-color: var(--danger-color-600);
|
|
270
276
|
--card-color: var(--danger-color-800);
|
|
271
277
|
}
|
|
272
|
-
.
|
|
278
|
+
._info_et6fi_79 {
|
|
273
279
|
--card-bg: var(--info-color-100);
|
|
274
280
|
--border-color: var(--info-color-300);
|
|
275
281
|
--border-accent-color: var(--info-color-600);
|
|
276
282
|
--card-color: var(--info-color-800);
|
|
277
283
|
}
|
|
278
|
-
.
|
|
284
|
+
._secondary_et6fi_86 {
|
|
279
285
|
--card-bg: var(--secondary-color-100);
|
|
280
286
|
--border-color: var(--secondary-color-300);
|
|
281
287
|
--border-accent-color: var(--secondary-color-600);
|
|
@@ -789,7 +795,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
789
795
|
inherits: true;
|
|
790
796
|
initial-value: transparent;
|
|
791
797
|
}
|
|
792
|
-
.
|
|
798
|
+
._trigger_1q8xu_7 {
|
|
793
799
|
display: inline-flex;
|
|
794
800
|
align-items: center;
|
|
795
801
|
justify-content: space-between;
|
|
@@ -802,29 +808,29 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
802
808
|
color: var(--button-color, inherit);
|
|
803
809
|
cursor: pointer;
|
|
804
810
|
}
|
|
805
|
-
.
|
|
811
|
+
._trigger_1q8xu_7:hover {
|
|
806
812
|
--dropdown-bg: var(--secondary-color-100);
|
|
807
813
|
}
|
|
808
|
-
.
|
|
814
|
+
._trigger_1q8xu_7:active {
|
|
809
815
|
--dropdown-bg: var(--secondary-color-200);
|
|
810
816
|
}
|
|
811
|
-
.
|
|
817
|
+
._large_1q8xu_29 {
|
|
812
818
|
font-size: 1.25rem;
|
|
813
819
|
padding: 0.75rem 1.25rem;
|
|
814
820
|
}
|
|
815
|
-
.
|
|
821
|
+
._small_1q8xu_34 {
|
|
816
822
|
font-size: 0.75rem;
|
|
817
823
|
padding: 0.25rem 0.5rem;
|
|
818
824
|
}
|
|
819
|
-
.
|
|
825
|
+
._disabled_1q8xu_39 {
|
|
820
826
|
opacity: 0.5;
|
|
821
827
|
cursor: not-allowed;
|
|
822
828
|
}
|
|
823
|
-
.
|
|
829
|
+
._icon_1q8xu_44 {
|
|
824
830
|
opacity: 0.65;
|
|
825
831
|
font-size: 0.85rem;
|
|
826
832
|
}
|
|
827
|
-
.
|
|
833
|
+
._content_1q8xu_49 {
|
|
828
834
|
background-color: var(--body-bg);
|
|
829
835
|
border: var(--border-thickness) solid var(--border-color);
|
|
830
836
|
--button-bg: var(--body-bg);
|
|
@@ -838,26 +844,26 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
838
844
|
will-change: transform, opacity;
|
|
839
845
|
transform: translateY(-1px);
|
|
840
846
|
}
|
|
841
|
-
.
|
|
847
|
+
._content_1q8xu_49[data-state="closed"] ._viewport_1q8xu_64 {
|
|
842
848
|
animation: none;
|
|
843
849
|
}
|
|
844
|
-
.
|
|
845
|
-
animation:
|
|
850
|
+
._content_1q8xu_49[data-state="open"][data-side="bottom"] ._viewport_1q8xu_64 {
|
|
851
|
+
animation: _slideUpAndFade_1q8xu_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
846
852
|
transform-origin: top center;
|
|
847
853
|
}
|
|
848
|
-
.
|
|
849
|
-
animation:
|
|
854
|
+
._content_1q8xu_49[data-state="open"][data-side="top"] ._viewport_1q8xu_64 {
|
|
855
|
+
animation: _slideDownAndFade_1q8xu_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
850
856
|
transform-origin: bottom center;
|
|
851
857
|
}
|
|
852
|
-
.
|
|
853
|
-
animation:
|
|
858
|
+
._content_1q8xu_49[data-state="open"][data-side="left"] ._viewport_1q8xu_64 {
|
|
859
|
+
animation: _slideRightAndFade_1q8xu_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
854
860
|
transform-origin: right center;
|
|
855
861
|
}
|
|
856
|
-
.
|
|
857
|
-
animation:
|
|
862
|
+
._content_1q8xu_49[data-state="open"][data-side="right"] ._viewport_1q8xu_64 {
|
|
863
|
+
animation: _slideLeftAndFade_1q8xu_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
858
864
|
transform-origin: left center;
|
|
859
865
|
}
|
|
860
|
-
.
|
|
866
|
+
._viewport_1q8xu_64 {
|
|
861
867
|
display: flex;
|
|
862
868
|
flex-direction: column;
|
|
863
869
|
animation-duration: 180ms;
|
|
@@ -866,7 +872,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
866
872
|
will-change: transform, opacity;
|
|
867
873
|
transform: none;
|
|
868
874
|
}
|
|
869
|
-
.
|
|
875
|
+
._item_1q8xu_98 {
|
|
870
876
|
display: flex;
|
|
871
877
|
align-items: center;
|
|
872
878
|
justify-content: flex-start;
|
|
@@ -877,92 +883,93 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
877
883
|
cursor: pointer;
|
|
878
884
|
position: relative;
|
|
879
885
|
background: transparent;
|
|
886
|
+
text-decoration: none;
|
|
880
887
|
}
|
|
881
|
-
.
|
|
888
|
+
._item_1q8xu_98[data-highlighted] {
|
|
882
889
|
background-color: var(--secondary-color-100);
|
|
883
890
|
}
|
|
884
|
-
.
|
|
891
|
+
._item_1q8xu_98[data-disabled] {
|
|
885
892
|
opacity: 0.5;
|
|
886
893
|
cursor: not-allowed;
|
|
887
894
|
}
|
|
888
|
-
.
|
|
895
|
+
._itemLabel_1q8xu_121 {
|
|
889
896
|
flex: 1;
|
|
890
897
|
}
|
|
891
|
-
.
|
|
898
|
+
._itemIcon_1q8xu_125 {
|
|
892
899
|
display: inline-flex;
|
|
893
900
|
align-items: center;
|
|
894
901
|
justify-content: center;
|
|
895
902
|
width: 1.25rem;
|
|
896
903
|
height: 1.25rem;
|
|
897
904
|
}
|
|
898
|
-
.
|
|
905
|
+
._itemIcon_1q8xu_125 svg {
|
|
899
906
|
height: 1.25rem;
|
|
900
907
|
}
|
|
901
|
-
.
|
|
908
|
+
._separator_1q8xu_137 {
|
|
902
909
|
height: var(--border-thickness);
|
|
903
910
|
background-color: var(--border-color);
|
|
904
911
|
}
|
|
905
|
-
.
|
|
912
|
+
._arrow_1q8xu_142 {
|
|
906
913
|
fill: var(--body-bg);
|
|
907
914
|
stroke: var(--border-color);
|
|
908
915
|
stroke-width: var(--border-thickness);
|
|
909
916
|
stroke-linejoin: round;
|
|
910
917
|
}
|
|
911
|
-
.
|
|
918
|
+
._primary_1q8xu_149 {
|
|
912
919
|
--dropdown-bg: var(--primary-color-100);
|
|
913
920
|
--border-color: var(--primary-color-300);
|
|
914
921
|
--button-color: var(--primary-color-800);
|
|
915
922
|
--border-accent-color: var(--primary-color-600);
|
|
916
923
|
}
|
|
917
|
-
.
|
|
924
|
+
._primary_1q8xu_149:hover {
|
|
918
925
|
--dropdown-bg: var(--primary-color-200);
|
|
919
926
|
}
|
|
920
|
-
.
|
|
927
|
+
._success_1q8xu_160 {
|
|
921
928
|
--dropdown-bg: var(--success-color-100);
|
|
922
929
|
--border-color: var(--success-color-300);
|
|
923
930
|
--button-color: var(--success-color-800);
|
|
924
931
|
--border-accent-color: var(--success-color-600);
|
|
925
932
|
}
|
|
926
|
-
.
|
|
933
|
+
._success_1q8xu_160:hover {
|
|
927
934
|
--dropdown-bg: var(--success-color-200);
|
|
928
935
|
}
|
|
929
|
-
.
|
|
936
|
+
._warning_1q8xu_171 {
|
|
930
937
|
--dropdown-bg: var(--warning-color-100);
|
|
931
938
|
--border-color: var(--warning-color-300);
|
|
932
939
|
--button-color: var(--warning-color-800);
|
|
933
940
|
--border-accent-color: var(--warning-color-600);
|
|
934
941
|
}
|
|
935
|
-
.
|
|
942
|
+
._warning_1q8xu_171:hover {
|
|
936
943
|
--dropdown-bg: var(--warning-color-200);
|
|
937
944
|
}
|
|
938
|
-
.
|
|
945
|
+
._danger_1q8xu_182 {
|
|
939
946
|
--dropdown-bg: var(--danger-color-100);
|
|
940
947
|
--border-color: var(--danger-color-300);
|
|
941
948
|
--button-color: var(--danger-color-800);
|
|
942
949
|
--border-accent-color: var(--danger-color-600);
|
|
943
950
|
}
|
|
944
|
-
.
|
|
951
|
+
._danger_1q8xu_182:hover {
|
|
945
952
|
--dropdown-bg: var(--danger-color-200);
|
|
946
953
|
}
|
|
947
|
-
.
|
|
954
|
+
._info_1q8xu_193 {
|
|
948
955
|
--dropdown-bg: var(--info-color-100);
|
|
949
956
|
--border-color: var(--info-color-300);
|
|
950
957
|
--button-color: var(--info-color-800);
|
|
951
958
|
--border-accent-color: var(--info-color-600);
|
|
952
959
|
}
|
|
953
|
-
.
|
|
960
|
+
._info_1q8xu_193:hover {
|
|
954
961
|
--dropdown-bg: var(--info-color-200);
|
|
955
962
|
}
|
|
956
|
-
.
|
|
963
|
+
._secondary_1q8xu_204 {
|
|
957
964
|
--dropdown-bg: var(--secondary-color-100);
|
|
958
965
|
--border-color: var(--secondary-color-300);
|
|
959
966
|
--button-color: var(--secondary-color-800);
|
|
960
967
|
--border-accent-color: var(--secondary-color-600);
|
|
961
968
|
}
|
|
962
|
-
.
|
|
969
|
+
._secondary_1q8xu_204:hover {
|
|
963
970
|
--dropdown-bg: var(--secondary-color-200);
|
|
964
971
|
}
|
|
965
|
-
@keyframes
|
|
972
|
+
@keyframes _slideUpAndFade_1q8xu_1 {
|
|
966
973
|
from {
|
|
967
974
|
opacity: 0;
|
|
968
975
|
transform: translateY(2px);
|
|
@@ -972,7 +979,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
972
979
|
transform: translateY(0);
|
|
973
980
|
}
|
|
974
981
|
}
|
|
975
|
-
@keyframes
|
|
982
|
+
@keyframes _slideRightAndFade_1q8xu_1 {
|
|
976
983
|
from {
|
|
977
984
|
opacity: 0;
|
|
978
985
|
transform: translateX(-2px);
|
|
@@ -982,7 +989,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
982
989
|
transform: translateX(0);
|
|
983
990
|
}
|
|
984
991
|
}
|
|
985
|
-
@keyframes
|
|
992
|
+
@keyframes _slideDownAndFade_1q8xu_1 {
|
|
986
993
|
from {
|
|
987
994
|
opacity: 0;
|
|
988
995
|
transform: translateY(-2px);
|
|
@@ -992,7 +999,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
992
999
|
transform: translateY(0);
|
|
993
1000
|
}
|
|
994
1001
|
}
|
|
995
|
-
@keyframes
|
|
1002
|
+
@keyframes _slideLeftAndFade_1q8xu_1 {
|
|
996
1003
|
from {
|
|
997
1004
|
opacity: 0;
|
|
998
1005
|
transform: translateX(2px);
|
|
@@ -1925,7 +1932,7 @@ function clsx() {
|
|
|
1925
1932
|
return n2;
|
|
1926
1933
|
}
|
|
1927
1934
|
const button = "_button_105y0_7";
|
|
1928
|
-
const pageBackground$
|
|
1935
|
+
const pageBackground$2 = "_pageBackground_105y0_24";
|
|
1929
1936
|
const large$6 = "_large_105y0_34";
|
|
1930
1937
|
const small$6 = "_small_105y0_39";
|
|
1931
1938
|
const disabled$6 = "_disabled_105y0_44";
|
|
@@ -1937,7 +1944,7 @@ const info$8 = "_info_105y0_103";
|
|
|
1937
1944
|
const secondary$8 = "_secondary_105y0_116";
|
|
1938
1945
|
const styles$b = {
|
|
1939
1946
|
button,
|
|
1940
|
-
pageBackground: pageBackground$
|
|
1947
|
+
pageBackground: pageBackground$2,
|
|
1941
1948
|
large: large$6,
|
|
1942
1949
|
small: small$6,
|
|
1943
1950
|
disabled: disabled$6,
|
|
@@ -2101,20 +2108,22 @@ function requireClassnames() {
|
|
|
2101
2108
|
}
|
|
2102
2109
|
var classnamesExports = requireClassnames();
|
|
2103
2110
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
2104
|
-
const card = "
|
|
2105
|
-
const
|
|
2106
|
-
const
|
|
2107
|
-
const
|
|
2108
|
-
const
|
|
2109
|
-
const
|
|
2110
|
-
const
|
|
2111
|
-
const
|
|
2112
|
-
const
|
|
2113
|
-
const
|
|
2114
|
-
const
|
|
2115
|
-
const
|
|
2111
|
+
const card = "_card_et6fi_1";
|
|
2112
|
+
const pageBackground$1 = "_pageBackground_et6fi_11";
|
|
2113
|
+
const title$1 = "_title_et6fi_18";
|
|
2114
|
+
const body$1 = "_body_et6fi_25";
|
|
2115
|
+
const footer$1 = "_footer_et6fi_30";
|
|
2116
|
+
const large$5 = "_large_et6fi_37";
|
|
2117
|
+
const small$5 = "_small_et6fi_43";
|
|
2118
|
+
const primary$7 = "_primary_et6fi_51";
|
|
2119
|
+
const success$7 = "_success_et6fi_58";
|
|
2120
|
+
const warning$7 = "_warning_et6fi_65";
|
|
2121
|
+
const danger$7 = "_danger_et6fi_72";
|
|
2122
|
+
const info$7 = "_info_et6fi_79";
|
|
2123
|
+
const secondary$7 = "_secondary_et6fi_86";
|
|
2116
2124
|
const styles$9 = {
|
|
2117
2125
|
card,
|
|
2126
|
+
pageBackground: pageBackground$1,
|
|
2118
2127
|
title: title$1,
|
|
2119
2128
|
body: body$1,
|
|
2120
2129
|
footer: footer$1,
|
|
@@ -2143,6 +2152,7 @@ function Card({
|
|
|
2143
2152
|
{
|
|
2144
2153
|
className: classNames(
|
|
2145
2154
|
styles$9.card,
|
|
2155
|
+
!variant && styles$9.pageBackground,
|
|
2146
2156
|
styles$9[variant],
|
|
2147
2157
|
chamfer2 && chamferStyles.chamfer,
|
|
2148
2158
|
size2 === "large" && styles$9.large,
|
|
@@ -25561,28 +25571,28 @@ var Portal2 = DropdownMenuPortal;
|
|
|
25561
25571
|
var Content2 = DropdownMenuContent;
|
|
25562
25572
|
var Item2 = DropdownMenuItem;
|
|
25563
25573
|
var Separator2 = DropdownMenuSeparator;
|
|
25564
|
-
const trigger = "
|
|
25565
|
-
const large = "
|
|
25566
|
-
const small = "
|
|
25567
|
-
const disabled = "
|
|
25568
|
-
const icon = "
|
|
25569
|
-
const content$2 = "
|
|
25570
|
-
const viewport = "
|
|
25571
|
-
const slideUpAndFade = "
|
|
25572
|
-
const slideDownAndFade = "
|
|
25573
|
-
const slideRightAndFade = "
|
|
25574
|
-
const slideLeftAndFade = "
|
|
25575
|
-
const item = "
|
|
25576
|
-
const itemLabel = "
|
|
25577
|
-
const itemIcon = "
|
|
25578
|
-
const separator = "
|
|
25579
|
-
const arrow = "
|
|
25580
|
-
const primary$2 = "
|
|
25581
|
-
const success$2 = "
|
|
25582
|
-
const warning$2 = "
|
|
25583
|
-
const danger$2 = "
|
|
25584
|
-
const info$2 = "
|
|
25585
|
-
const secondary$2 = "
|
|
25574
|
+
const trigger = "_trigger_1q8xu_7";
|
|
25575
|
+
const large = "_large_1q8xu_29";
|
|
25576
|
+
const small = "_small_1q8xu_34";
|
|
25577
|
+
const disabled = "_disabled_1q8xu_39";
|
|
25578
|
+
const icon = "_icon_1q8xu_44";
|
|
25579
|
+
const content$2 = "_content_1q8xu_49";
|
|
25580
|
+
const viewport = "_viewport_1q8xu_64";
|
|
25581
|
+
const slideUpAndFade = "_slideUpAndFade_1q8xu_1";
|
|
25582
|
+
const slideDownAndFade = "_slideDownAndFade_1q8xu_1";
|
|
25583
|
+
const slideRightAndFade = "_slideRightAndFade_1q8xu_1";
|
|
25584
|
+
const slideLeftAndFade = "_slideLeftAndFade_1q8xu_1";
|
|
25585
|
+
const item = "_item_1q8xu_98";
|
|
25586
|
+
const itemLabel = "_itemLabel_1q8xu_121";
|
|
25587
|
+
const itemIcon = "_itemIcon_1q8xu_125";
|
|
25588
|
+
const separator = "_separator_1q8xu_137";
|
|
25589
|
+
const arrow = "_arrow_1q8xu_142";
|
|
25590
|
+
const primary$2 = "_primary_1q8xu_149";
|
|
25591
|
+
const success$2 = "_success_1q8xu_160";
|
|
25592
|
+
const warning$2 = "_warning_1q8xu_171";
|
|
25593
|
+
const danger$2 = "_danger_1q8xu_182";
|
|
25594
|
+
const info$2 = "_info_1q8xu_193";
|
|
25595
|
+
const secondary$2 = "_secondary_1q8xu_204";
|
|
25586
25596
|
const styles$3 = {
|
|
25587
25597
|
trigger,
|
|
25588
25598
|
large,
|
|
@@ -25640,7 +25650,8 @@ function Dropdown({
|
|
|
25640
25650
|
variant && styles$3[variant],
|
|
25641
25651
|
chamfer2 && chamferStyles.chamfer
|
|
25642
25652
|
);
|
|
25643
|
-
const handleItemSelect = (item2) => {
|
|
25653
|
+
const handleItemSelect = (item2, event) => {
|
|
25654
|
+
item2.onClick?.(event);
|
|
25644
25655
|
item2.onSelect?.(item2.value);
|
|
25645
25656
|
onItemSelect?.(item2.value, item2);
|
|
25646
25657
|
};
|
|
@@ -25678,16 +25689,29 @@ function Dropdown({
|
|
|
25678
25689
|
);
|
|
25679
25690
|
}
|
|
25680
25691
|
const itemKey = item2.key ?? item2.value ?? (typeof item2.label === "string" ? `${item2.label}-${index2}` : `item-${index2}`);
|
|
25681
|
-
|
|
25692
|
+
const itemContent = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
25693
|
+
item2.icon && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemIcon, "aria-hidden": true, children: item2.icon }),
|
|
25694
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemLabel, children: item2.label })
|
|
25695
|
+
] });
|
|
25696
|
+
if (item2.href && !item2.disabled) {
|
|
25697
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
25698
|
+
Item2,
|
|
25699
|
+
{
|
|
25700
|
+
asChild: true,
|
|
25701
|
+
onSelect: (event) => handleItemSelect(item2, event),
|
|
25702
|
+
className: styles$3.item,
|
|
25703
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: item2.href, target: item2.target, rel: item2.rel, children: itemContent })
|
|
25704
|
+
},
|
|
25705
|
+
itemKey
|
|
25706
|
+
);
|
|
25707
|
+
}
|
|
25708
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
25682
25709
|
Item2,
|
|
25683
25710
|
{
|
|
25684
|
-
onSelect: () => handleItemSelect(item2),
|
|
25711
|
+
onSelect: (event) => handleItemSelect(item2, event),
|
|
25685
25712
|
disabled: item2.disabled,
|
|
25686
25713
|
className: styles$3.item,
|
|
25687
|
-
children:
|
|
25688
|
-
item2.icon && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemIcon, "aria-hidden": true, children: item2.icon }),
|
|
25689
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemLabel, children: item2.label })
|
|
25690
|
-
]
|
|
25714
|
+
children: itemContent
|
|
25691
25715
|
},
|
|
25692
25716
|
itemKey
|
|
25693
25717
|
);
|
package/dist/jcui.es.js
CHANGED
|
@@ -209,7 +209,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
209
209
|
transform: rotate(360deg);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
.
|
|
212
|
+
._card_et6fi_1 {
|
|
213
213
|
border-width: var(--border-thickness);
|
|
214
214
|
border-style: solid;
|
|
215
215
|
font-size: 1rem;
|
|
@@ -218,64 +218,70 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
218
218
|
display: flex;
|
|
219
219
|
flex-direction: column;
|
|
220
220
|
}
|
|
221
|
-
.
|
|
221
|
+
._pageBackground_et6fi_11 {
|
|
222
|
+
--card-bg: var(--body-bg);
|
|
223
|
+
--button-bg: var(--body-bg);
|
|
224
|
+
--card-color: var(--body-color);
|
|
225
|
+
background-color: var(--body-bg);
|
|
226
|
+
}
|
|
227
|
+
._card_et6fi_1 ._title_et6fi_18 {
|
|
222
228
|
font-size: 1.25rem;
|
|
223
229
|
padding: 0.5rem 1rem;
|
|
224
230
|
border-bottom: var(--border-thickness) solid var(--border-color);
|
|
225
231
|
background-color: var(--card-bg);
|
|
226
232
|
}
|
|
227
|
-
.
|
|
233
|
+
._card_et6fi_1 ._body_et6fi_25 {
|
|
228
234
|
padding: 0.5rem 1rem;
|
|
229
235
|
width: 100%;
|
|
230
236
|
}
|
|
231
|
-
.
|
|
237
|
+
._card_et6fi_1 ._footer_et6fi_30 {
|
|
232
238
|
border-top: var(--border-thickness) solid var(--border-color);
|
|
233
239
|
flex: 1;
|
|
234
240
|
background-color: var(--card-bg);
|
|
235
241
|
padding: 0.5rem 1rem;
|
|
236
242
|
}
|
|
237
|
-
.
|
|
238
|
-
.
|
|
243
|
+
._large_et6fi_37 ._body_et6fi_25,
|
|
244
|
+
._large_et6fi_37 ._title_et6fi_18 {
|
|
239
245
|
font-size: 1.25rem;
|
|
240
246
|
padding: 0.75rem 1.25rem;
|
|
241
247
|
}
|
|
242
|
-
.
|
|
243
|
-
.
|
|
248
|
+
._small_et6fi_43 ._body_et6fi_25,
|
|
249
|
+
._small_et6fi_43 ._title_et6fi_18 {
|
|
244
250
|
font-size: 0.75rem;
|
|
245
251
|
padding: 0.25rem 0.5rem;
|
|
246
252
|
}
|
|
247
253
|
/* Variants */
|
|
248
|
-
.
|
|
254
|
+
._primary_et6fi_51 {
|
|
249
255
|
--card-bg: var(--primary-color-100);
|
|
250
256
|
--border-color: var(--primary-color-300);
|
|
251
257
|
--border-accent-color: var(--primary-color-600);
|
|
252
258
|
--card-color: var(--primary-color-800);
|
|
253
259
|
}
|
|
254
|
-
.
|
|
260
|
+
._success_et6fi_58 {
|
|
255
261
|
--card-bg: var(--success-color-100);
|
|
256
262
|
--border-color: var(--success-color-300);
|
|
257
263
|
--border-accent-color: var(--success-color-600);
|
|
258
264
|
--card-color: var(--success-color-800);
|
|
259
265
|
}
|
|
260
|
-
.
|
|
266
|
+
._warning_et6fi_65 {
|
|
261
267
|
--card-bg: var(--warning-color-100);
|
|
262
268
|
--border-color: var(--warning-color-300);
|
|
263
269
|
--border-accent-color: var(--warning-color-600);
|
|
264
270
|
--card-color: var(--warning-color-800);
|
|
265
271
|
}
|
|
266
|
-
.
|
|
272
|
+
._danger_et6fi_72 {
|
|
267
273
|
--card-bg: var(--danger-color-100);
|
|
268
274
|
--border-color: var(--danger-color-300);
|
|
269
275
|
--border-accent-color: var(--danger-color-600);
|
|
270
276
|
--card-color: var(--danger-color-800);
|
|
271
277
|
}
|
|
272
|
-
.
|
|
278
|
+
._info_et6fi_79 {
|
|
273
279
|
--card-bg: var(--info-color-100);
|
|
274
280
|
--border-color: var(--info-color-300);
|
|
275
281
|
--border-accent-color: var(--info-color-600);
|
|
276
282
|
--card-color: var(--info-color-800);
|
|
277
283
|
}
|
|
278
|
-
.
|
|
284
|
+
._secondary_et6fi_86 {
|
|
279
285
|
--card-bg: var(--secondary-color-100);
|
|
280
286
|
--border-color: var(--secondary-color-300);
|
|
281
287
|
--border-accent-color: var(--secondary-color-600);
|
|
@@ -789,7 +795,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
789
795
|
inherits: true;
|
|
790
796
|
initial-value: transparent;
|
|
791
797
|
}
|
|
792
|
-
.
|
|
798
|
+
._trigger_1q8xu_7 {
|
|
793
799
|
display: inline-flex;
|
|
794
800
|
align-items: center;
|
|
795
801
|
justify-content: space-between;
|
|
@@ -802,29 +808,29 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
802
808
|
color: var(--button-color, inherit);
|
|
803
809
|
cursor: pointer;
|
|
804
810
|
}
|
|
805
|
-
.
|
|
811
|
+
._trigger_1q8xu_7:hover {
|
|
806
812
|
--dropdown-bg: var(--secondary-color-100);
|
|
807
813
|
}
|
|
808
|
-
.
|
|
814
|
+
._trigger_1q8xu_7:active {
|
|
809
815
|
--dropdown-bg: var(--secondary-color-200);
|
|
810
816
|
}
|
|
811
|
-
.
|
|
817
|
+
._large_1q8xu_29 {
|
|
812
818
|
font-size: 1.25rem;
|
|
813
819
|
padding: 0.75rem 1.25rem;
|
|
814
820
|
}
|
|
815
|
-
.
|
|
821
|
+
._small_1q8xu_34 {
|
|
816
822
|
font-size: 0.75rem;
|
|
817
823
|
padding: 0.25rem 0.5rem;
|
|
818
824
|
}
|
|
819
|
-
.
|
|
825
|
+
._disabled_1q8xu_39 {
|
|
820
826
|
opacity: 0.5;
|
|
821
827
|
cursor: not-allowed;
|
|
822
828
|
}
|
|
823
|
-
.
|
|
829
|
+
._icon_1q8xu_44 {
|
|
824
830
|
opacity: 0.65;
|
|
825
831
|
font-size: 0.85rem;
|
|
826
832
|
}
|
|
827
|
-
.
|
|
833
|
+
._content_1q8xu_49 {
|
|
828
834
|
background-color: var(--body-bg);
|
|
829
835
|
border: var(--border-thickness) solid var(--border-color);
|
|
830
836
|
--button-bg: var(--body-bg);
|
|
@@ -838,26 +844,26 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
838
844
|
will-change: transform, opacity;
|
|
839
845
|
transform: translateY(-1px);
|
|
840
846
|
}
|
|
841
|
-
.
|
|
847
|
+
._content_1q8xu_49[data-state="closed"] ._viewport_1q8xu_64 {
|
|
842
848
|
animation: none;
|
|
843
849
|
}
|
|
844
|
-
.
|
|
845
|
-
animation:
|
|
850
|
+
._content_1q8xu_49[data-state="open"][data-side="bottom"] ._viewport_1q8xu_64 {
|
|
851
|
+
animation: _slideUpAndFade_1q8xu_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
846
852
|
transform-origin: top center;
|
|
847
853
|
}
|
|
848
|
-
.
|
|
849
|
-
animation:
|
|
854
|
+
._content_1q8xu_49[data-state="open"][data-side="top"] ._viewport_1q8xu_64 {
|
|
855
|
+
animation: _slideDownAndFade_1q8xu_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
850
856
|
transform-origin: bottom center;
|
|
851
857
|
}
|
|
852
|
-
.
|
|
853
|
-
animation:
|
|
858
|
+
._content_1q8xu_49[data-state="open"][data-side="left"] ._viewport_1q8xu_64 {
|
|
859
|
+
animation: _slideRightAndFade_1q8xu_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
854
860
|
transform-origin: right center;
|
|
855
861
|
}
|
|
856
|
-
.
|
|
857
|
-
animation:
|
|
862
|
+
._content_1q8xu_49[data-state="open"][data-side="right"] ._viewport_1q8xu_64 {
|
|
863
|
+
animation: _slideLeftAndFade_1q8xu_1 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
858
864
|
transform-origin: left center;
|
|
859
865
|
}
|
|
860
|
-
.
|
|
866
|
+
._viewport_1q8xu_64 {
|
|
861
867
|
display: flex;
|
|
862
868
|
flex-direction: column;
|
|
863
869
|
animation-duration: 180ms;
|
|
@@ -866,7 +872,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
866
872
|
will-change: transform, opacity;
|
|
867
873
|
transform: none;
|
|
868
874
|
}
|
|
869
|
-
.
|
|
875
|
+
._item_1q8xu_98 {
|
|
870
876
|
display: flex;
|
|
871
877
|
align-items: center;
|
|
872
878
|
justify-content: flex-start;
|
|
@@ -877,92 +883,93 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
877
883
|
cursor: pointer;
|
|
878
884
|
position: relative;
|
|
879
885
|
background: transparent;
|
|
886
|
+
text-decoration: none;
|
|
880
887
|
}
|
|
881
|
-
.
|
|
888
|
+
._item_1q8xu_98[data-highlighted] {
|
|
882
889
|
background-color: var(--secondary-color-100);
|
|
883
890
|
}
|
|
884
|
-
.
|
|
891
|
+
._item_1q8xu_98[data-disabled] {
|
|
885
892
|
opacity: 0.5;
|
|
886
893
|
cursor: not-allowed;
|
|
887
894
|
}
|
|
888
|
-
.
|
|
895
|
+
._itemLabel_1q8xu_121 {
|
|
889
896
|
flex: 1;
|
|
890
897
|
}
|
|
891
|
-
.
|
|
898
|
+
._itemIcon_1q8xu_125 {
|
|
892
899
|
display: inline-flex;
|
|
893
900
|
align-items: center;
|
|
894
901
|
justify-content: center;
|
|
895
902
|
width: 1.25rem;
|
|
896
903
|
height: 1.25rem;
|
|
897
904
|
}
|
|
898
|
-
.
|
|
905
|
+
._itemIcon_1q8xu_125 svg {
|
|
899
906
|
height: 1.25rem;
|
|
900
907
|
}
|
|
901
|
-
.
|
|
908
|
+
._separator_1q8xu_137 {
|
|
902
909
|
height: var(--border-thickness);
|
|
903
910
|
background-color: var(--border-color);
|
|
904
911
|
}
|
|
905
|
-
.
|
|
912
|
+
._arrow_1q8xu_142 {
|
|
906
913
|
fill: var(--body-bg);
|
|
907
914
|
stroke: var(--border-color);
|
|
908
915
|
stroke-width: var(--border-thickness);
|
|
909
916
|
stroke-linejoin: round;
|
|
910
917
|
}
|
|
911
|
-
.
|
|
918
|
+
._primary_1q8xu_149 {
|
|
912
919
|
--dropdown-bg: var(--primary-color-100);
|
|
913
920
|
--border-color: var(--primary-color-300);
|
|
914
921
|
--button-color: var(--primary-color-800);
|
|
915
922
|
--border-accent-color: var(--primary-color-600);
|
|
916
923
|
}
|
|
917
|
-
.
|
|
924
|
+
._primary_1q8xu_149:hover {
|
|
918
925
|
--dropdown-bg: var(--primary-color-200);
|
|
919
926
|
}
|
|
920
|
-
.
|
|
927
|
+
._success_1q8xu_160 {
|
|
921
928
|
--dropdown-bg: var(--success-color-100);
|
|
922
929
|
--border-color: var(--success-color-300);
|
|
923
930
|
--button-color: var(--success-color-800);
|
|
924
931
|
--border-accent-color: var(--success-color-600);
|
|
925
932
|
}
|
|
926
|
-
.
|
|
933
|
+
._success_1q8xu_160:hover {
|
|
927
934
|
--dropdown-bg: var(--success-color-200);
|
|
928
935
|
}
|
|
929
|
-
.
|
|
936
|
+
._warning_1q8xu_171 {
|
|
930
937
|
--dropdown-bg: var(--warning-color-100);
|
|
931
938
|
--border-color: var(--warning-color-300);
|
|
932
939
|
--button-color: var(--warning-color-800);
|
|
933
940
|
--border-accent-color: var(--warning-color-600);
|
|
934
941
|
}
|
|
935
|
-
.
|
|
942
|
+
._warning_1q8xu_171:hover {
|
|
936
943
|
--dropdown-bg: var(--warning-color-200);
|
|
937
944
|
}
|
|
938
|
-
.
|
|
945
|
+
._danger_1q8xu_182 {
|
|
939
946
|
--dropdown-bg: var(--danger-color-100);
|
|
940
947
|
--border-color: var(--danger-color-300);
|
|
941
948
|
--button-color: var(--danger-color-800);
|
|
942
949
|
--border-accent-color: var(--danger-color-600);
|
|
943
950
|
}
|
|
944
|
-
.
|
|
951
|
+
._danger_1q8xu_182:hover {
|
|
945
952
|
--dropdown-bg: var(--danger-color-200);
|
|
946
953
|
}
|
|
947
|
-
.
|
|
954
|
+
._info_1q8xu_193 {
|
|
948
955
|
--dropdown-bg: var(--info-color-100);
|
|
949
956
|
--border-color: var(--info-color-300);
|
|
950
957
|
--button-color: var(--info-color-800);
|
|
951
958
|
--border-accent-color: var(--info-color-600);
|
|
952
959
|
}
|
|
953
|
-
.
|
|
960
|
+
._info_1q8xu_193:hover {
|
|
954
961
|
--dropdown-bg: var(--info-color-200);
|
|
955
962
|
}
|
|
956
|
-
.
|
|
963
|
+
._secondary_1q8xu_204 {
|
|
957
964
|
--dropdown-bg: var(--secondary-color-100);
|
|
958
965
|
--border-color: var(--secondary-color-300);
|
|
959
966
|
--button-color: var(--secondary-color-800);
|
|
960
967
|
--border-accent-color: var(--secondary-color-600);
|
|
961
968
|
}
|
|
962
|
-
.
|
|
969
|
+
._secondary_1q8xu_204:hover {
|
|
963
970
|
--dropdown-bg: var(--secondary-color-200);
|
|
964
971
|
}
|
|
965
|
-
@keyframes
|
|
972
|
+
@keyframes _slideUpAndFade_1q8xu_1 {
|
|
966
973
|
from {
|
|
967
974
|
opacity: 0;
|
|
968
975
|
transform: translateY(2px);
|
|
@@ -972,7 +979,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
972
979
|
transform: translateY(0);
|
|
973
980
|
}
|
|
974
981
|
}
|
|
975
|
-
@keyframes
|
|
982
|
+
@keyframes _slideRightAndFade_1q8xu_1 {
|
|
976
983
|
from {
|
|
977
984
|
opacity: 0;
|
|
978
985
|
transform: translateX(-2px);
|
|
@@ -982,7 +989,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
982
989
|
transform: translateX(0);
|
|
983
990
|
}
|
|
984
991
|
}
|
|
985
|
-
@keyframes
|
|
992
|
+
@keyframes _slideDownAndFade_1q8xu_1 {
|
|
986
993
|
from {
|
|
987
994
|
opacity: 0;
|
|
988
995
|
transform: translateY(-2px);
|
|
@@ -992,7 +999,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
992
999
|
transform: translateY(0);
|
|
993
1000
|
}
|
|
994
1001
|
}
|
|
995
|
-
@keyframes
|
|
1002
|
+
@keyframes _slideLeftAndFade_1q8xu_1 {
|
|
996
1003
|
from {
|
|
997
1004
|
opacity: 0;
|
|
998
1005
|
transform: translateX(2px);
|
|
@@ -1907,7 +1914,7 @@ function clsx() {
|
|
|
1907
1914
|
return n2;
|
|
1908
1915
|
}
|
|
1909
1916
|
const button = "_button_105y0_7";
|
|
1910
|
-
const pageBackground$
|
|
1917
|
+
const pageBackground$2 = "_pageBackground_105y0_24";
|
|
1911
1918
|
const large$6 = "_large_105y0_34";
|
|
1912
1919
|
const small$6 = "_small_105y0_39";
|
|
1913
1920
|
const disabled$6 = "_disabled_105y0_44";
|
|
@@ -1919,7 +1926,7 @@ const info$8 = "_info_105y0_103";
|
|
|
1919
1926
|
const secondary$8 = "_secondary_105y0_116";
|
|
1920
1927
|
const styles$b = {
|
|
1921
1928
|
button,
|
|
1922
|
-
pageBackground: pageBackground$
|
|
1929
|
+
pageBackground: pageBackground$2,
|
|
1923
1930
|
large: large$6,
|
|
1924
1931
|
small: small$6,
|
|
1925
1932
|
disabled: disabled$6,
|
|
@@ -2083,20 +2090,22 @@ function requireClassnames() {
|
|
|
2083
2090
|
}
|
|
2084
2091
|
var classnamesExports = requireClassnames();
|
|
2085
2092
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
2086
|
-
const card = "
|
|
2087
|
-
const
|
|
2088
|
-
const
|
|
2089
|
-
const
|
|
2090
|
-
const
|
|
2091
|
-
const
|
|
2092
|
-
const
|
|
2093
|
-
const
|
|
2094
|
-
const
|
|
2095
|
-
const
|
|
2096
|
-
const
|
|
2097
|
-
const
|
|
2093
|
+
const card = "_card_et6fi_1";
|
|
2094
|
+
const pageBackground$1 = "_pageBackground_et6fi_11";
|
|
2095
|
+
const title$1 = "_title_et6fi_18";
|
|
2096
|
+
const body$1 = "_body_et6fi_25";
|
|
2097
|
+
const footer$1 = "_footer_et6fi_30";
|
|
2098
|
+
const large$5 = "_large_et6fi_37";
|
|
2099
|
+
const small$5 = "_small_et6fi_43";
|
|
2100
|
+
const primary$7 = "_primary_et6fi_51";
|
|
2101
|
+
const success$7 = "_success_et6fi_58";
|
|
2102
|
+
const warning$7 = "_warning_et6fi_65";
|
|
2103
|
+
const danger$7 = "_danger_et6fi_72";
|
|
2104
|
+
const info$7 = "_info_et6fi_79";
|
|
2105
|
+
const secondary$7 = "_secondary_et6fi_86";
|
|
2098
2106
|
const styles$9 = {
|
|
2099
2107
|
card,
|
|
2108
|
+
pageBackground: pageBackground$1,
|
|
2100
2109
|
title: title$1,
|
|
2101
2110
|
body: body$1,
|
|
2102
2111
|
footer: footer$1,
|
|
@@ -2125,6 +2134,7 @@ function Card({
|
|
|
2125
2134
|
{
|
|
2126
2135
|
className: classNames(
|
|
2127
2136
|
styles$9.card,
|
|
2137
|
+
!variant && styles$9.pageBackground,
|
|
2128
2138
|
styles$9[variant],
|
|
2129
2139
|
chamfer2 && chamferStyles.chamfer,
|
|
2130
2140
|
size2 === "large" && styles$9.large,
|
|
@@ -25543,28 +25553,28 @@ var Portal2 = DropdownMenuPortal;
|
|
|
25543
25553
|
var Content2 = DropdownMenuContent;
|
|
25544
25554
|
var Item2 = DropdownMenuItem;
|
|
25545
25555
|
var Separator2 = DropdownMenuSeparator;
|
|
25546
|
-
const trigger = "
|
|
25547
|
-
const large = "
|
|
25548
|
-
const small = "
|
|
25549
|
-
const disabled = "
|
|
25550
|
-
const icon = "
|
|
25551
|
-
const content$2 = "
|
|
25552
|
-
const viewport = "
|
|
25553
|
-
const slideUpAndFade = "
|
|
25554
|
-
const slideDownAndFade = "
|
|
25555
|
-
const slideRightAndFade = "
|
|
25556
|
-
const slideLeftAndFade = "
|
|
25557
|
-
const item = "
|
|
25558
|
-
const itemLabel = "
|
|
25559
|
-
const itemIcon = "
|
|
25560
|
-
const separator = "
|
|
25561
|
-
const arrow = "
|
|
25562
|
-
const primary$2 = "
|
|
25563
|
-
const success$2 = "
|
|
25564
|
-
const warning$2 = "
|
|
25565
|
-
const danger$2 = "
|
|
25566
|
-
const info$2 = "
|
|
25567
|
-
const secondary$2 = "
|
|
25556
|
+
const trigger = "_trigger_1q8xu_7";
|
|
25557
|
+
const large = "_large_1q8xu_29";
|
|
25558
|
+
const small = "_small_1q8xu_34";
|
|
25559
|
+
const disabled = "_disabled_1q8xu_39";
|
|
25560
|
+
const icon = "_icon_1q8xu_44";
|
|
25561
|
+
const content$2 = "_content_1q8xu_49";
|
|
25562
|
+
const viewport = "_viewport_1q8xu_64";
|
|
25563
|
+
const slideUpAndFade = "_slideUpAndFade_1q8xu_1";
|
|
25564
|
+
const slideDownAndFade = "_slideDownAndFade_1q8xu_1";
|
|
25565
|
+
const slideRightAndFade = "_slideRightAndFade_1q8xu_1";
|
|
25566
|
+
const slideLeftAndFade = "_slideLeftAndFade_1q8xu_1";
|
|
25567
|
+
const item = "_item_1q8xu_98";
|
|
25568
|
+
const itemLabel = "_itemLabel_1q8xu_121";
|
|
25569
|
+
const itemIcon = "_itemIcon_1q8xu_125";
|
|
25570
|
+
const separator = "_separator_1q8xu_137";
|
|
25571
|
+
const arrow = "_arrow_1q8xu_142";
|
|
25572
|
+
const primary$2 = "_primary_1q8xu_149";
|
|
25573
|
+
const success$2 = "_success_1q8xu_160";
|
|
25574
|
+
const warning$2 = "_warning_1q8xu_171";
|
|
25575
|
+
const danger$2 = "_danger_1q8xu_182";
|
|
25576
|
+
const info$2 = "_info_1q8xu_193";
|
|
25577
|
+
const secondary$2 = "_secondary_1q8xu_204";
|
|
25568
25578
|
const styles$3 = {
|
|
25569
25579
|
trigger,
|
|
25570
25580
|
large,
|
|
@@ -25622,7 +25632,8 @@ function Dropdown({
|
|
|
25622
25632
|
variant && styles$3[variant],
|
|
25623
25633
|
chamfer2 && chamferStyles.chamfer
|
|
25624
25634
|
);
|
|
25625
|
-
const handleItemSelect = (item2) => {
|
|
25635
|
+
const handleItemSelect = (item2, event) => {
|
|
25636
|
+
item2.onClick?.(event);
|
|
25626
25637
|
item2.onSelect?.(item2.value);
|
|
25627
25638
|
onItemSelect?.(item2.value, item2);
|
|
25628
25639
|
};
|
|
@@ -25660,16 +25671,29 @@ function Dropdown({
|
|
|
25660
25671
|
);
|
|
25661
25672
|
}
|
|
25662
25673
|
const itemKey = item2.key ?? item2.value ?? (typeof item2.label === "string" ? `${item2.label}-${index2}` : `item-${index2}`);
|
|
25663
|
-
|
|
25674
|
+
const itemContent = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
25675
|
+
item2.icon && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemIcon, "aria-hidden": true, children: item2.icon }),
|
|
25676
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemLabel, children: item2.label })
|
|
25677
|
+
] });
|
|
25678
|
+
if (item2.href && !item2.disabled) {
|
|
25679
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
25680
|
+
Item2,
|
|
25681
|
+
{
|
|
25682
|
+
asChild: true,
|
|
25683
|
+
onSelect: (event) => handleItemSelect(item2, event),
|
|
25684
|
+
className: styles$3.item,
|
|
25685
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: item2.href, target: item2.target, rel: item2.rel, children: itemContent })
|
|
25686
|
+
},
|
|
25687
|
+
itemKey
|
|
25688
|
+
);
|
|
25689
|
+
}
|
|
25690
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
25664
25691
|
Item2,
|
|
25665
25692
|
{
|
|
25666
|
-
onSelect: () => handleItemSelect(item2),
|
|
25693
|
+
onSelect: (event) => handleItemSelect(item2, event),
|
|
25667
25694
|
disabled: item2.disabled,
|
|
25668
25695
|
className: styles$3.item,
|
|
25669
|
-
children:
|
|
25670
|
-
item2.icon && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemIcon, "aria-hidden": true, children: item2.icon }),
|
|
25671
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemLabel, children: item2.label })
|
|
25672
|
-
]
|
|
25696
|
+
children: itemContent
|
|
25673
25697
|
},
|
|
25674
25698
|
itemKey
|
|
25675
25699
|
);
|