@jackcrane/ui 0.1.8 → 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 +86 -71
- package/dist/jcui.es.js +86 -71
- 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
|
@@ -795,7 +795,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
795
795
|
inherits: true;
|
|
796
796
|
initial-value: transparent;
|
|
797
797
|
}
|
|
798
|
-
.
|
|
798
|
+
._trigger_1q8xu_7 {
|
|
799
799
|
display: inline-flex;
|
|
800
800
|
align-items: center;
|
|
801
801
|
justify-content: space-between;
|
|
@@ -808,29 +808,29 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
808
808
|
color: var(--button-color, inherit);
|
|
809
809
|
cursor: pointer;
|
|
810
810
|
}
|
|
811
|
-
.
|
|
811
|
+
._trigger_1q8xu_7:hover {
|
|
812
812
|
--dropdown-bg: var(--secondary-color-100);
|
|
813
813
|
}
|
|
814
|
-
.
|
|
814
|
+
._trigger_1q8xu_7:active {
|
|
815
815
|
--dropdown-bg: var(--secondary-color-200);
|
|
816
816
|
}
|
|
817
|
-
.
|
|
817
|
+
._large_1q8xu_29 {
|
|
818
818
|
font-size: 1.25rem;
|
|
819
819
|
padding: 0.75rem 1.25rem;
|
|
820
820
|
}
|
|
821
|
-
.
|
|
821
|
+
._small_1q8xu_34 {
|
|
822
822
|
font-size: 0.75rem;
|
|
823
823
|
padding: 0.25rem 0.5rem;
|
|
824
824
|
}
|
|
825
|
-
.
|
|
825
|
+
._disabled_1q8xu_39 {
|
|
826
826
|
opacity: 0.5;
|
|
827
827
|
cursor: not-allowed;
|
|
828
828
|
}
|
|
829
|
-
.
|
|
829
|
+
._icon_1q8xu_44 {
|
|
830
830
|
opacity: 0.65;
|
|
831
831
|
font-size: 0.85rem;
|
|
832
832
|
}
|
|
833
|
-
.
|
|
833
|
+
._content_1q8xu_49 {
|
|
834
834
|
background-color: var(--body-bg);
|
|
835
835
|
border: var(--border-thickness) solid var(--border-color);
|
|
836
836
|
--button-bg: var(--body-bg);
|
|
@@ -844,26 +844,26 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
844
844
|
will-change: transform, opacity;
|
|
845
845
|
transform: translateY(-1px);
|
|
846
846
|
}
|
|
847
|
-
.
|
|
847
|
+
._content_1q8xu_49[data-state="closed"] ._viewport_1q8xu_64 {
|
|
848
848
|
animation: none;
|
|
849
849
|
}
|
|
850
|
-
.
|
|
851
|
-
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);
|
|
852
852
|
transform-origin: top center;
|
|
853
853
|
}
|
|
854
|
-
.
|
|
855
|
-
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);
|
|
856
856
|
transform-origin: bottom center;
|
|
857
857
|
}
|
|
858
|
-
.
|
|
859
|
-
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);
|
|
860
860
|
transform-origin: right center;
|
|
861
861
|
}
|
|
862
|
-
.
|
|
863
|
-
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);
|
|
864
864
|
transform-origin: left center;
|
|
865
865
|
}
|
|
866
|
-
.
|
|
866
|
+
._viewport_1q8xu_64 {
|
|
867
867
|
display: flex;
|
|
868
868
|
flex-direction: column;
|
|
869
869
|
animation-duration: 180ms;
|
|
@@ -872,7 +872,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
872
872
|
will-change: transform, opacity;
|
|
873
873
|
transform: none;
|
|
874
874
|
}
|
|
875
|
-
.
|
|
875
|
+
._item_1q8xu_98 {
|
|
876
876
|
display: flex;
|
|
877
877
|
align-items: center;
|
|
878
878
|
justify-content: flex-start;
|
|
@@ -883,92 +883,93 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
883
883
|
cursor: pointer;
|
|
884
884
|
position: relative;
|
|
885
885
|
background: transparent;
|
|
886
|
+
text-decoration: none;
|
|
886
887
|
}
|
|
887
|
-
.
|
|
888
|
+
._item_1q8xu_98[data-highlighted] {
|
|
888
889
|
background-color: var(--secondary-color-100);
|
|
889
890
|
}
|
|
890
|
-
.
|
|
891
|
+
._item_1q8xu_98[data-disabled] {
|
|
891
892
|
opacity: 0.5;
|
|
892
893
|
cursor: not-allowed;
|
|
893
894
|
}
|
|
894
|
-
.
|
|
895
|
+
._itemLabel_1q8xu_121 {
|
|
895
896
|
flex: 1;
|
|
896
897
|
}
|
|
897
|
-
.
|
|
898
|
+
._itemIcon_1q8xu_125 {
|
|
898
899
|
display: inline-flex;
|
|
899
900
|
align-items: center;
|
|
900
901
|
justify-content: center;
|
|
901
902
|
width: 1.25rem;
|
|
902
903
|
height: 1.25rem;
|
|
903
904
|
}
|
|
904
|
-
.
|
|
905
|
+
._itemIcon_1q8xu_125 svg {
|
|
905
906
|
height: 1.25rem;
|
|
906
907
|
}
|
|
907
|
-
.
|
|
908
|
+
._separator_1q8xu_137 {
|
|
908
909
|
height: var(--border-thickness);
|
|
909
910
|
background-color: var(--border-color);
|
|
910
911
|
}
|
|
911
|
-
.
|
|
912
|
+
._arrow_1q8xu_142 {
|
|
912
913
|
fill: var(--body-bg);
|
|
913
914
|
stroke: var(--border-color);
|
|
914
915
|
stroke-width: var(--border-thickness);
|
|
915
916
|
stroke-linejoin: round;
|
|
916
917
|
}
|
|
917
|
-
.
|
|
918
|
+
._primary_1q8xu_149 {
|
|
918
919
|
--dropdown-bg: var(--primary-color-100);
|
|
919
920
|
--border-color: var(--primary-color-300);
|
|
920
921
|
--button-color: var(--primary-color-800);
|
|
921
922
|
--border-accent-color: var(--primary-color-600);
|
|
922
923
|
}
|
|
923
|
-
.
|
|
924
|
+
._primary_1q8xu_149:hover {
|
|
924
925
|
--dropdown-bg: var(--primary-color-200);
|
|
925
926
|
}
|
|
926
|
-
.
|
|
927
|
+
._success_1q8xu_160 {
|
|
927
928
|
--dropdown-bg: var(--success-color-100);
|
|
928
929
|
--border-color: var(--success-color-300);
|
|
929
930
|
--button-color: var(--success-color-800);
|
|
930
931
|
--border-accent-color: var(--success-color-600);
|
|
931
932
|
}
|
|
932
|
-
.
|
|
933
|
+
._success_1q8xu_160:hover {
|
|
933
934
|
--dropdown-bg: var(--success-color-200);
|
|
934
935
|
}
|
|
935
|
-
.
|
|
936
|
+
._warning_1q8xu_171 {
|
|
936
937
|
--dropdown-bg: var(--warning-color-100);
|
|
937
938
|
--border-color: var(--warning-color-300);
|
|
938
939
|
--button-color: var(--warning-color-800);
|
|
939
940
|
--border-accent-color: var(--warning-color-600);
|
|
940
941
|
}
|
|
941
|
-
.
|
|
942
|
+
._warning_1q8xu_171:hover {
|
|
942
943
|
--dropdown-bg: var(--warning-color-200);
|
|
943
944
|
}
|
|
944
|
-
.
|
|
945
|
+
._danger_1q8xu_182 {
|
|
945
946
|
--dropdown-bg: var(--danger-color-100);
|
|
946
947
|
--border-color: var(--danger-color-300);
|
|
947
948
|
--button-color: var(--danger-color-800);
|
|
948
949
|
--border-accent-color: var(--danger-color-600);
|
|
949
950
|
}
|
|
950
|
-
.
|
|
951
|
+
._danger_1q8xu_182:hover {
|
|
951
952
|
--dropdown-bg: var(--danger-color-200);
|
|
952
953
|
}
|
|
953
|
-
.
|
|
954
|
+
._info_1q8xu_193 {
|
|
954
955
|
--dropdown-bg: var(--info-color-100);
|
|
955
956
|
--border-color: var(--info-color-300);
|
|
956
957
|
--button-color: var(--info-color-800);
|
|
957
958
|
--border-accent-color: var(--info-color-600);
|
|
958
959
|
}
|
|
959
|
-
.
|
|
960
|
+
._info_1q8xu_193:hover {
|
|
960
961
|
--dropdown-bg: var(--info-color-200);
|
|
961
962
|
}
|
|
962
|
-
.
|
|
963
|
+
._secondary_1q8xu_204 {
|
|
963
964
|
--dropdown-bg: var(--secondary-color-100);
|
|
964
965
|
--border-color: var(--secondary-color-300);
|
|
965
966
|
--button-color: var(--secondary-color-800);
|
|
966
967
|
--border-accent-color: var(--secondary-color-600);
|
|
967
968
|
}
|
|
968
|
-
.
|
|
969
|
+
._secondary_1q8xu_204:hover {
|
|
969
970
|
--dropdown-bg: var(--secondary-color-200);
|
|
970
971
|
}
|
|
971
|
-
@keyframes
|
|
972
|
+
@keyframes _slideUpAndFade_1q8xu_1 {
|
|
972
973
|
from {
|
|
973
974
|
opacity: 0;
|
|
974
975
|
transform: translateY(2px);
|
|
@@ -978,7 +979,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
978
979
|
transform: translateY(0);
|
|
979
980
|
}
|
|
980
981
|
}
|
|
981
|
-
@keyframes
|
|
982
|
+
@keyframes _slideRightAndFade_1q8xu_1 {
|
|
982
983
|
from {
|
|
983
984
|
opacity: 0;
|
|
984
985
|
transform: translateX(-2px);
|
|
@@ -988,7 +989,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
988
989
|
transform: translateX(0);
|
|
989
990
|
}
|
|
990
991
|
}
|
|
991
|
-
@keyframes
|
|
992
|
+
@keyframes _slideDownAndFade_1q8xu_1 {
|
|
992
993
|
from {
|
|
993
994
|
opacity: 0;
|
|
994
995
|
transform: translateY(-2px);
|
|
@@ -998,7 +999,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
998
999
|
transform: translateY(0);
|
|
999
1000
|
}
|
|
1000
1001
|
}
|
|
1001
|
-
@keyframes
|
|
1002
|
+
@keyframes _slideLeftAndFade_1q8xu_1 {
|
|
1002
1003
|
from {
|
|
1003
1004
|
opacity: 0;
|
|
1004
1005
|
transform: translateX(2px);
|
|
@@ -25570,28 +25571,28 @@ var Portal2 = DropdownMenuPortal;
|
|
|
25570
25571
|
var Content2 = DropdownMenuContent;
|
|
25571
25572
|
var Item2 = DropdownMenuItem;
|
|
25572
25573
|
var Separator2 = DropdownMenuSeparator;
|
|
25573
|
-
const trigger = "
|
|
25574
|
-
const large = "
|
|
25575
|
-
const small = "
|
|
25576
|
-
const disabled = "
|
|
25577
|
-
const icon = "
|
|
25578
|
-
const content$2 = "
|
|
25579
|
-
const viewport = "
|
|
25580
|
-
const slideUpAndFade = "
|
|
25581
|
-
const slideDownAndFade = "
|
|
25582
|
-
const slideRightAndFade = "
|
|
25583
|
-
const slideLeftAndFade = "
|
|
25584
|
-
const item = "
|
|
25585
|
-
const itemLabel = "
|
|
25586
|
-
const itemIcon = "
|
|
25587
|
-
const separator = "
|
|
25588
|
-
const arrow = "
|
|
25589
|
-
const primary$2 = "
|
|
25590
|
-
const success$2 = "
|
|
25591
|
-
const warning$2 = "
|
|
25592
|
-
const danger$2 = "
|
|
25593
|
-
const info$2 = "
|
|
25594
|
-
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";
|
|
25595
25596
|
const styles$3 = {
|
|
25596
25597
|
trigger,
|
|
25597
25598
|
large,
|
|
@@ -25649,7 +25650,8 @@ function Dropdown({
|
|
|
25649
25650
|
variant && styles$3[variant],
|
|
25650
25651
|
chamfer2 && chamferStyles.chamfer
|
|
25651
25652
|
);
|
|
25652
|
-
const handleItemSelect = (item2) => {
|
|
25653
|
+
const handleItemSelect = (item2, event) => {
|
|
25654
|
+
item2.onClick?.(event);
|
|
25653
25655
|
item2.onSelect?.(item2.value);
|
|
25654
25656
|
onItemSelect?.(item2.value, item2);
|
|
25655
25657
|
};
|
|
@@ -25687,16 +25689,29 @@ function Dropdown({
|
|
|
25687
25689
|
);
|
|
25688
25690
|
}
|
|
25689
25691
|
const itemKey = item2.key ?? item2.value ?? (typeof item2.label === "string" ? `${item2.label}-${index2}` : `item-${index2}`);
|
|
25690
|
-
|
|
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(
|
|
25691
25709
|
Item2,
|
|
25692
25710
|
{
|
|
25693
|
-
onSelect: () => handleItemSelect(item2),
|
|
25711
|
+
onSelect: (event) => handleItemSelect(item2, event),
|
|
25694
25712
|
disabled: item2.disabled,
|
|
25695
25713
|
className: styles$3.item,
|
|
25696
|
-
children:
|
|
25697
|
-
item2.icon && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemIcon, "aria-hidden": true, children: item2.icon }),
|
|
25698
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemLabel, children: item2.label })
|
|
25699
|
-
]
|
|
25714
|
+
children: itemContent
|
|
25700
25715
|
},
|
|
25701
25716
|
itemKey
|
|
25702
25717
|
);
|
package/dist/jcui.es.js
CHANGED
|
@@ -795,7 +795,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
795
795
|
inherits: true;
|
|
796
796
|
initial-value: transparent;
|
|
797
797
|
}
|
|
798
|
-
.
|
|
798
|
+
._trigger_1q8xu_7 {
|
|
799
799
|
display: inline-flex;
|
|
800
800
|
align-items: center;
|
|
801
801
|
justify-content: space-between;
|
|
@@ -808,29 +808,29 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
808
808
|
color: var(--button-color, inherit);
|
|
809
809
|
cursor: pointer;
|
|
810
810
|
}
|
|
811
|
-
.
|
|
811
|
+
._trigger_1q8xu_7:hover {
|
|
812
812
|
--dropdown-bg: var(--secondary-color-100);
|
|
813
813
|
}
|
|
814
|
-
.
|
|
814
|
+
._trigger_1q8xu_7:active {
|
|
815
815
|
--dropdown-bg: var(--secondary-color-200);
|
|
816
816
|
}
|
|
817
|
-
.
|
|
817
|
+
._large_1q8xu_29 {
|
|
818
818
|
font-size: 1.25rem;
|
|
819
819
|
padding: 0.75rem 1.25rem;
|
|
820
820
|
}
|
|
821
|
-
.
|
|
821
|
+
._small_1q8xu_34 {
|
|
822
822
|
font-size: 0.75rem;
|
|
823
823
|
padding: 0.25rem 0.5rem;
|
|
824
824
|
}
|
|
825
|
-
.
|
|
825
|
+
._disabled_1q8xu_39 {
|
|
826
826
|
opacity: 0.5;
|
|
827
827
|
cursor: not-allowed;
|
|
828
828
|
}
|
|
829
|
-
.
|
|
829
|
+
._icon_1q8xu_44 {
|
|
830
830
|
opacity: 0.65;
|
|
831
831
|
font-size: 0.85rem;
|
|
832
832
|
}
|
|
833
|
-
.
|
|
833
|
+
._content_1q8xu_49 {
|
|
834
834
|
background-color: var(--body-bg);
|
|
835
835
|
border: var(--border-thickness) solid var(--border-color);
|
|
836
836
|
--button-bg: var(--body-bg);
|
|
@@ -844,26 +844,26 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
844
844
|
will-change: transform, opacity;
|
|
845
845
|
transform: translateY(-1px);
|
|
846
846
|
}
|
|
847
|
-
.
|
|
847
|
+
._content_1q8xu_49[data-state="closed"] ._viewport_1q8xu_64 {
|
|
848
848
|
animation: none;
|
|
849
849
|
}
|
|
850
|
-
.
|
|
851
|
-
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);
|
|
852
852
|
transform-origin: top center;
|
|
853
853
|
}
|
|
854
|
-
.
|
|
855
|
-
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);
|
|
856
856
|
transform-origin: bottom center;
|
|
857
857
|
}
|
|
858
|
-
.
|
|
859
|
-
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);
|
|
860
860
|
transform-origin: right center;
|
|
861
861
|
}
|
|
862
|
-
.
|
|
863
|
-
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);
|
|
864
864
|
transform-origin: left center;
|
|
865
865
|
}
|
|
866
|
-
.
|
|
866
|
+
._viewport_1q8xu_64 {
|
|
867
867
|
display: flex;
|
|
868
868
|
flex-direction: column;
|
|
869
869
|
animation-duration: 180ms;
|
|
@@ -872,7 +872,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
872
872
|
will-change: transform, opacity;
|
|
873
873
|
transform: none;
|
|
874
874
|
}
|
|
875
|
-
.
|
|
875
|
+
._item_1q8xu_98 {
|
|
876
876
|
display: flex;
|
|
877
877
|
align-items: center;
|
|
878
878
|
justify-content: flex-start;
|
|
@@ -883,92 +883,93 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
883
883
|
cursor: pointer;
|
|
884
884
|
position: relative;
|
|
885
885
|
background: transparent;
|
|
886
|
+
text-decoration: none;
|
|
886
887
|
}
|
|
887
|
-
.
|
|
888
|
+
._item_1q8xu_98[data-highlighted] {
|
|
888
889
|
background-color: var(--secondary-color-100);
|
|
889
890
|
}
|
|
890
|
-
.
|
|
891
|
+
._item_1q8xu_98[data-disabled] {
|
|
891
892
|
opacity: 0.5;
|
|
892
893
|
cursor: not-allowed;
|
|
893
894
|
}
|
|
894
|
-
.
|
|
895
|
+
._itemLabel_1q8xu_121 {
|
|
895
896
|
flex: 1;
|
|
896
897
|
}
|
|
897
|
-
.
|
|
898
|
+
._itemIcon_1q8xu_125 {
|
|
898
899
|
display: inline-flex;
|
|
899
900
|
align-items: center;
|
|
900
901
|
justify-content: center;
|
|
901
902
|
width: 1.25rem;
|
|
902
903
|
height: 1.25rem;
|
|
903
904
|
}
|
|
904
|
-
.
|
|
905
|
+
._itemIcon_1q8xu_125 svg {
|
|
905
906
|
height: 1.25rem;
|
|
906
907
|
}
|
|
907
|
-
.
|
|
908
|
+
._separator_1q8xu_137 {
|
|
908
909
|
height: var(--border-thickness);
|
|
909
910
|
background-color: var(--border-color);
|
|
910
911
|
}
|
|
911
|
-
.
|
|
912
|
+
._arrow_1q8xu_142 {
|
|
912
913
|
fill: var(--body-bg);
|
|
913
914
|
stroke: var(--border-color);
|
|
914
915
|
stroke-width: var(--border-thickness);
|
|
915
916
|
stroke-linejoin: round;
|
|
916
917
|
}
|
|
917
|
-
.
|
|
918
|
+
._primary_1q8xu_149 {
|
|
918
919
|
--dropdown-bg: var(--primary-color-100);
|
|
919
920
|
--border-color: var(--primary-color-300);
|
|
920
921
|
--button-color: var(--primary-color-800);
|
|
921
922
|
--border-accent-color: var(--primary-color-600);
|
|
922
923
|
}
|
|
923
|
-
.
|
|
924
|
+
._primary_1q8xu_149:hover {
|
|
924
925
|
--dropdown-bg: var(--primary-color-200);
|
|
925
926
|
}
|
|
926
|
-
.
|
|
927
|
+
._success_1q8xu_160 {
|
|
927
928
|
--dropdown-bg: var(--success-color-100);
|
|
928
929
|
--border-color: var(--success-color-300);
|
|
929
930
|
--button-color: var(--success-color-800);
|
|
930
931
|
--border-accent-color: var(--success-color-600);
|
|
931
932
|
}
|
|
932
|
-
.
|
|
933
|
+
._success_1q8xu_160:hover {
|
|
933
934
|
--dropdown-bg: var(--success-color-200);
|
|
934
935
|
}
|
|
935
|
-
.
|
|
936
|
+
._warning_1q8xu_171 {
|
|
936
937
|
--dropdown-bg: var(--warning-color-100);
|
|
937
938
|
--border-color: var(--warning-color-300);
|
|
938
939
|
--button-color: var(--warning-color-800);
|
|
939
940
|
--border-accent-color: var(--warning-color-600);
|
|
940
941
|
}
|
|
941
|
-
.
|
|
942
|
+
._warning_1q8xu_171:hover {
|
|
942
943
|
--dropdown-bg: var(--warning-color-200);
|
|
943
944
|
}
|
|
944
|
-
.
|
|
945
|
+
._danger_1q8xu_182 {
|
|
945
946
|
--dropdown-bg: var(--danger-color-100);
|
|
946
947
|
--border-color: var(--danger-color-300);
|
|
947
948
|
--button-color: var(--danger-color-800);
|
|
948
949
|
--border-accent-color: var(--danger-color-600);
|
|
949
950
|
}
|
|
950
|
-
.
|
|
951
|
+
._danger_1q8xu_182:hover {
|
|
951
952
|
--dropdown-bg: var(--danger-color-200);
|
|
952
953
|
}
|
|
953
|
-
.
|
|
954
|
+
._info_1q8xu_193 {
|
|
954
955
|
--dropdown-bg: var(--info-color-100);
|
|
955
956
|
--border-color: var(--info-color-300);
|
|
956
957
|
--button-color: var(--info-color-800);
|
|
957
958
|
--border-accent-color: var(--info-color-600);
|
|
958
959
|
}
|
|
959
|
-
.
|
|
960
|
+
._info_1q8xu_193:hover {
|
|
960
961
|
--dropdown-bg: var(--info-color-200);
|
|
961
962
|
}
|
|
962
|
-
.
|
|
963
|
+
._secondary_1q8xu_204 {
|
|
963
964
|
--dropdown-bg: var(--secondary-color-100);
|
|
964
965
|
--border-color: var(--secondary-color-300);
|
|
965
966
|
--button-color: var(--secondary-color-800);
|
|
966
967
|
--border-accent-color: var(--secondary-color-600);
|
|
967
968
|
}
|
|
968
|
-
.
|
|
969
|
+
._secondary_1q8xu_204:hover {
|
|
969
970
|
--dropdown-bg: var(--secondary-color-200);
|
|
970
971
|
}
|
|
971
|
-
@keyframes
|
|
972
|
+
@keyframes _slideUpAndFade_1q8xu_1 {
|
|
972
973
|
from {
|
|
973
974
|
opacity: 0;
|
|
974
975
|
transform: translateY(2px);
|
|
@@ -978,7 +979,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
978
979
|
transform: translateY(0);
|
|
979
980
|
}
|
|
980
981
|
}
|
|
981
|
-
@keyframes
|
|
982
|
+
@keyframes _slideRightAndFade_1q8xu_1 {
|
|
982
983
|
from {
|
|
983
984
|
opacity: 0;
|
|
984
985
|
transform: translateX(-2px);
|
|
@@ -988,7 +989,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
988
989
|
transform: translateX(0);
|
|
989
990
|
}
|
|
990
991
|
}
|
|
991
|
-
@keyframes
|
|
992
|
+
@keyframes _slideDownAndFade_1q8xu_1 {
|
|
992
993
|
from {
|
|
993
994
|
opacity: 0;
|
|
994
995
|
transform: translateY(-2px);
|
|
@@ -998,7 +999,7 @@ div._chamfer_1o5rm_1:not(._disabled_1o5rm_15):focus-within {
|
|
|
998
999
|
transform: translateY(0);
|
|
999
1000
|
}
|
|
1000
1001
|
}
|
|
1001
|
-
@keyframes
|
|
1002
|
+
@keyframes _slideLeftAndFade_1q8xu_1 {
|
|
1002
1003
|
from {
|
|
1003
1004
|
opacity: 0;
|
|
1004
1005
|
transform: translateX(2px);
|
|
@@ -25552,28 +25553,28 @@ var Portal2 = DropdownMenuPortal;
|
|
|
25552
25553
|
var Content2 = DropdownMenuContent;
|
|
25553
25554
|
var Item2 = DropdownMenuItem;
|
|
25554
25555
|
var Separator2 = DropdownMenuSeparator;
|
|
25555
|
-
const trigger = "
|
|
25556
|
-
const large = "
|
|
25557
|
-
const small = "
|
|
25558
|
-
const disabled = "
|
|
25559
|
-
const icon = "
|
|
25560
|
-
const content$2 = "
|
|
25561
|
-
const viewport = "
|
|
25562
|
-
const slideUpAndFade = "
|
|
25563
|
-
const slideDownAndFade = "
|
|
25564
|
-
const slideRightAndFade = "
|
|
25565
|
-
const slideLeftAndFade = "
|
|
25566
|
-
const item = "
|
|
25567
|
-
const itemLabel = "
|
|
25568
|
-
const itemIcon = "
|
|
25569
|
-
const separator = "
|
|
25570
|
-
const arrow = "
|
|
25571
|
-
const primary$2 = "
|
|
25572
|
-
const success$2 = "
|
|
25573
|
-
const warning$2 = "
|
|
25574
|
-
const danger$2 = "
|
|
25575
|
-
const info$2 = "
|
|
25576
|
-
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";
|
|
25577
25578
|
const styles$3 = {
|
|
25578
25579
|
trigger,
|
|
25579
25580
|
large,
|
|
@@ -25631,7 +25632,8 @@ function Dropdown({
|
|
|
25631
25632
|
variant && styles$3[variant],
|
|
25632
25633
|
chamfer2 && chamferStyles.chamfer
|
|
25633
25634
|
);
|
|
25634
|
-
const handleItemSelect = (item2) => {
|
|
25635
|
+
const handleItemSelect = (item2, event) => {
|
|
25636
|
+
item2.onClick?.(event);
|
|
25635
25637
|
item2.onSelect?.(item2.value);
|
|
25636
25638
|
onItemSelect?.(item2.value, item2);
|
|
25637
25639
|
};
|
|
@@ -25669,16 +25671,29 @@ function Dropdown({
|
|
|
25669
25671
|
);
|
|
25670
25672
|
}
|
|
25671
25673
|
const itemKey = item2.key ?? item2.value ?? (typeof item2.label === "string" ? `${item2.label}-${index2}` : `item-${index2}`);
|
|
25672
|
-
|
|
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(
|
|
25673
25691
|
Item2,
|
|
25674
25692
|
{
|
|
25675
|
-
onSelect: () => handleItemSelect(item2),
|
|
25693
|
+
onSelect: (event) => handleItemSelect(item2, event),
|
|
25676
25694
|
disabled: item2.disabled,
|
|
25677
25695
|
className: styles$3.item,
|
|
25678
|
-
children:
|
|
25679
|
-
item2.icon && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemIcon, "aria-hidden": true, children: item2.icon }),
|
|
25680
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$3.itemLabel, children: item2.label })
|
|
25681
|
-
]
|
|
25696
|
+
children: itemContent
|
|
25682
25697
|
},
|
|
25683
25698
|
itemKey
|
|
25684
25699
|
);
|