@vertz/ui-primitives 0.2.41 → 0.2.42
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/shared/chunk-06m8prfg.js +52 -0
- package/dist/shared/chunk-0n9jj8xr.js +24 -0
- package/dist/shared/chunk-1ben27xq.js +317 -0
- package/dist/shared/chunk-1j2mj0sa.js +45 -0
- package/dist/shared/chunk-250hj18f.js +243 -0
- package/dist/shared/chunk-2h4m9c71.js +38 -0
- package/dist/shared/chunk-2sbx20hv.js +128 -0
- package/dist/shared/chunk-2ye674gr.js +70 -0
- package/dist/shared/chunk-34d8385y.js +15 -0
- package/dist/shared/chunk-4d7bm8h0.js +113 -0
- package/dist/shared/chunk-4zjgxr7x.js +157 -0
- package/dist/shared/chunk-5c150wvr.js +140 -0
- package/dist/shared/chunk-5gycdypd.js +58 -0
- package/dist/shared/chunk-6mm7fhp8.js +105 -0
- package/dist/shared/chunk-6zmnqvh6.js +109 -0
- package/dist/shared/{chunk-yy3ft5mb.js → chunk-7amn5d71.js} +2 -2
- package/dist/shared/chunk-7pbff2hg.js +118 -0
- package/dist/shared/chunk-7zpjshwz.js +194 -0
- package/dist/shared/chunk-993ff51d.js +155 -0
- package/dist/shared/chunk-9pdt5aw7.js +24 -0
- package/dist/shared/chunk-a71m4xkv.js +106 -0
- package/dist/shared/chunk-aj8m39pk.js +127 -0
- package/dist/shared/chunk-ajawpc05.js +305 -0
- package/dist/shared/chunk-b7mzwqhj.js +125 -0
- package/dist/shared/chunk-bb887de4.js +200 -0
- package/dist/shared/chunk-bfsmbrxc.js +111 -0
- package/dist/shared/chunk-c2f63m5n.js +56 -0
- package/dist/shared/chunk-c5r3s5km.js +263 -0
- package/dist/shared/chunk-caba5bhd.js +427 -0
- package/dist/shared/chunk-crym07yc.js +264 -0
- package/dist/shared/{chunk-5964gmv0.js → chunk-csjtyvam.js} +62 -88
- package/dist/shared/chunk-d6rtejz3.js +128 -0
- package/dist/shared/chunk-dvaf0bmq.js +140 -0
- package/dist/shared/chunk-dwkv9ya6.js +22 -0
- package/dist/shared/chunk-e0ckxrjg.js +41 -0
- package/dist/shared/chunk-ennxcymj.js +225 -0
- package/dist/shared/{chunk-1jd1n0dt.js → chunk-ey38de46.js} +19 -47
- package/dist/shared/chunk-f0v1gs5e.js +52 -0
- package/dist/shared/chunk-f86rsf84.js +231 -0
- package/dist/shared/{chunk-3sahbk4d.js → chunk-fdse46x5.js} +6 -1
- package/dist/shared/chunk-gj4hrssn.js +135 -0
- package/dist/shared/chunk-gyvq4gk9.js +24 -0
- package/dist/shared/chunk-hbnps9sq.js +229 -0
- package/dist/shared/{chunk-fhss32ya.js → chunk-hdmpyeq9.js} +43 -132
- package/dist/shared/chunk-hgnkd4he.js +256 -0
- package/dist/shared/chunk-hpcyffm7.js +185 -0
- package/dist/shared/chunk-hpmvwx0h.js +99 -0
- package/dist/shared/chunk-hz0e504p.js +69 -0
- package/dist/shared/chunk-hzk4wfq9.js +43 -0
- package/dist/shared/chunk-j7znzkpa.js +48 -0
- package/dist/shared/chunk-j9kxgrnn.js +167 -0
- package/dist/shared/chunk-jetwnv0w.js +130 -0
- package/dist/shared/chunk-jjdg26c1.js +155 -0
- package/dist/shared/chunk-k0m4yh86.js +123 -0
- package/dist/shared/chunk-k43q9cjr.js +82 -0
- package/dist/shared/chunk-k9k8tbr5.js +119 -0
- package/dist/shared/chunk-meaj7br1.js +232 -0
- package/dist/shared/chunk-mgj0n08k.js +34 -0
- package/dist/shared/chunk-mjz4rp6c.js +46 -0
- package/dist/shared/chunk-n4rr5gme.js +239 -0
- package/dist/shared/chunk-nk55etpp.js +65 -0
- package/dist/shared/chunk-nkh1ks3k.js +264 -0
- package/dist/shared/chunk-pgvpvbpe.js +26 -0
- package/dist/shared/chunk-pma8gnv7.js +178 -0
- package/dist/shared/chunk-q7xv6xze.js +131 -0
- package/dist/shared/chunk-qey801nq.js +22 -0
- package/dist/shared/chunk-s6b4c3tj.js +58 -0
- package/dist/shared/chunk-sq27a4h0.js +36 -0
- package/dist/shared/chunk-taa5pj15.js +103 -0
- package/dist/shared/chunk-tc5rpvyx.js +127 -0
- package/dist/shared/chunk-tescm0b3.js +192 -0
- package/dist/shared/chunk-tkftdwnq.js +71 -0
- package/dist/shared/chunk-tqhnjcfp.js +116 -0
- package/dist/shared/chunk-vfknb5ht.js +183 -0
- package/dist/shared/chunk-vsc369w3.js +185 -0
- package/dist/shared/chunk-whq9s8v5.js +301 -0
- package/dist/shared/{chunk-hze1f32t.js → chunk-wrqddgaj.js} +1 -1
- package/dist/shared/chunk-yzbmkx4r.js +155 -0
- package/dist/shared/chunk-zaen0ajc.js +347 -0
- package/dist/src/accordion/accordion-composed.js +1 -1
- package/dist/src/accordion/accordion.js +1 -1
- package/dist/src/alert/alert-composed.js +1 -1
- package/dist/src/alert-dialog/alert-dialog-composed.js +1 -1
- package/dist/src/alert-dialog/alert-dialog.js +1 -1
- package/dist/src/avatar/avatar-composed.js +1 -1
- package/dist/src/badge/badge-composed.js +1 -1
- package/dist/src/badge/badge.js +1 -1
- package/dist/src/breadcrumb/breadcrumb-composed.js +1 -1
- package/dist/src/button/button-composed.js +1 -1
- package/dist/src/button/button.js +1 -1
- package/dist/src/calendar/calendar-composed.js +1 -1
- package/dist/src/calendar/calendar.js +1 -1
- package/dist/src/card/card-composed.js +1 -1
- package/dist/src/carousel/carousel-composed.js +1 -1
- package/dist/src/carousel/carousel.js +1 -1
- package/dist/src/checkbox/checkbox-composed.js +1 -1
- package/dist/src/checkbox/checkbox.js +1 -1
- package/dist/src/collapsible/collapsible-composed.js +1 -1
- package/dist/src/collapsible/collapsible.js +1 -1
- package/dist/src/combobox/combobox-composed.js +1 -1
- package/dist/src/combobox/combobox.js +1 -1
- package/dist/src/command/command-composed.js +1 -1
- package/dist/src/command/command.js +1 -1
- package/dist/src/composed/with-styles.js +1 -1
- package/dist/src/context-menu/context-menu-composed.js +1 -1
- package/dist/src/context-menu/context-menu.js +1 -1
- package/dist/src/date-picker/date-picker-composed.js +1 -1
- package/dist/src/date-picker/date-picker.js +1 -1
- package/dist/src/dialog/dialog-composed.js +1 -1
- package/dist/src/dialog/dialog-stack-parts.js +1 -1
- package/dist/src/dialog/dialog.js +1 -1
- package/dist/src/dropdown-menu/dropdown-menu-composed.js +1 -1
- package/dist/src/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/src/empty-state/empty-state-composed.js +1 -1
- package/dist/src/form-group/form-group-composed.js +1 -1
- package/dist/src/hover-card/hover-card-composed.js +1 -1
- package/dist/src/hover-card/hover-card.js +1 -1
- package/dist/src/input/input-composed.js +1 -1
- package/dist/src/label/label-composed.js +1 -1
- package/dist/src/list/list-composed.js +1 -1
- package/dist/src/menu/menu-composed.js +1 -1
- package/dist/src/menu/menu.js +1 -1
- package/dist/src/menubar/menubar-composed.js +1 -1
- package/dist/src/menubar/menubar.js +1 -1
- package/dist/src/navigation-menu/navigation-menu-composed.js +1 -1
- package/dist/src/navigation-menu/navigation-menu.js +1 -1
- package/dist/src/pagination/pagination-composed.js +1 -1
- package/dist/src/popover/popover-composed.js +1 -1
- package/dist/src/popover/popover.js +1 -1
- package/dist/src/progress/progress-composed.js +1 -1
- package/dist/src/progress/progress.js +1 -1
- package/dist/src/radio/radio-composed.js +1 -1
- package/dist/src/radio/radio.js +1 -1
- package/dist/src/resizable-panel/resizable-panel-composed.js +1 -1
- package/dist/src/resizable-panel/resizable-panel.js +1 -1
- package/dist/src/scroll-area/scroll-area-composed.js +1 -1
- package/dist/src/scroll-area/scroll-area.js +1 -1
- package/dist/src/select/select-composed.js +1 -1
- package/dist/src/select/select.js +1 -1
- package/dist/src/separator/separator-composed.js +1 -1
- package/dist/src/sheet/sheet-composed.js +1 -1
- package/dist/src/sheet/sheet.js +1 -1
- package/dist/src/skeleton/skeleton-composed.js +1 -1
- package/dist/src/slider/slider-composed.js +1 -1
- package/dist/src/slider/slider.js +1 -1
- package/dist/src/switch/switch-composed.js +1 -1
- package/dist/src/switch/switch.js +1 -1
- package/dist/src/table/table-composed.js +1 -1
- package/dist/src/tabs/tabs-composed.js +1 -1
- package/dist/src/tabs/tabs.js +1 -1
- package/dist/src/textarea/textarea-composed.js +1 -1
- package/dist/src/toast/toast.js +1 -1
- package/dist/src/toggle/toggle-composed.js +1 -1
- package/dist/src/toggle/toggle.js +1 -1
- package/dist/src/toggle-group/toggle-group-composed.js +1 -1
- package/dist/src/toggle-group/toggle-group.js +1 -1
- package/dist/src/tooltip/tooltip-composed.js +1 -1
- package/dist/src/tooltip/tooltip.js +1 -1
- package/package.json +3 -3
- package/dist/shared/chunk-144kbnmx.js +0 -95
- package/dist/shared/chunk-1ewxfgsa.js +0 -167
- package/dist/shared/chunk-1hm0mbke.js +0 -258
- package/dist/shared/chunk-22rt6ws9.js +0 -69
- package/dist/shared/chunk-2ssqz188.js +0 -162
- package/dist/shared/chunk-33he7ay9.js +0 -218
- package/dist/shared/chunk-3jack97k.js +0 -509
- package/dist/shared/chunk-75pegjs7.js +0 -26
- package/dist/shared/chunk-862x7dja.js +0 -398
- package/dist/shared/chunk-8pk1pn5h.js +0 -215
- package/dist/shared/chunk-8t0nm721.js +0 -152
- package/dist/shared/chunk-94twh4s4.js +0 -28
- package/dist/shared/chunk-9yb26c0w.js +0 -232
- package/dist/shared/chunk-a82r2pnq.js +0 -67
- package/dist/shared/chunk-axpbdpgx.js +0 -177
- package/dist/shared/chunk-b3j6mym6.js +0 -203
- package/dist/shared/chunk-b4zzg457.js +0 -410
- package/dist/shared/chunk-b9qxfcsy.js +0 -60
- package/dist/shared/chunk-bc2qqkhr.js +0 -194
- package/dist/shared/chunk-bv12nkdm.js +0 -149
- package/dist/shared/chunk-bvxc1ww4.js +0 -164
- package/dist/shared/chunk-czv0kqj4.js +0 -107
- package/dist/shared/chunk-d83ag07h.js +0 -189
- package/dist/shared/chunk-de18ashk.js +0 -134
- package/dist/shared/chunk-dvk4h36t.js +0 -140
- package/dist/shared/chunk-dxvnerw2.js +0 -353
- package/dist/shared/chunk-e399pzdq.js +0 -241
- package/dist/shared/chunk-e4qha9as.js +0 -180
- package/dist/shared/chunk-eb2d9v6k.js +0 -68
- package/dist/shared/chunk-ect26sp5.js +0 -353
- package/dist/shared/chunk-ev367pq3.js +0 -102
- package/dist/shared/chunk-fjykbv0v.js +0 -214
- package/dist/shared/chunk-gdddk6nh.js +0 -96
- package/dist/shared/chunk-ghkw5bjq.js +0 -55
- package/dist/shared/chunk-hfjtkytb.js +0 -310
- package/dist/shared/chunk-hpvjfj0j.js +0 -31
- package/dist/shared/chunk-jpyjk616.js +0 -52
- package/dist/shared/chunk-k6d53tne.js +0 -206
- package/dist/shared/chunk-knzg86am.js +0 -168
- package/dist/shared/chunk-ktbf6xrt.js +0 -179
- package/dist/shared/chunk-m8y2p66x.js +0 -252
- package/dist/shared/chunk-metxdt5x.js +0 -28
- package/dist/shared/chunk-mgae1d93.js +0 -157
- package/dist/shared/chunk-mtx2cfbx.js +0 -175
- package/dist/shared/chunk-n436p5cb.js +0 -260
- package/dist/shared/chunk-nj420k31.js +0 -54
- package/dist/shared/chunk-nsmvdxgp.js +0 -213
- package/dist/shared/chunk-pcms04vq.js +0 -162
- package/dist/shared/chunk-pqskzq8t.js +0 -79
- package/dist/shared/chunk-pwr60kyd.js +0 -321
- package/dist/shared/chunk-pzknpa1y.js +0 -327
- package/dist/shared/chunk-q77y3rg4.js +0 -189
- package/dist/shared/chunk-qhnany7w.js +0 -179
- package/dist/shared/chunk-rdr0rtpr.js +0 -131
- package/dist/shared/chunk-rj52ty6r.js +0 -147
- package/dist/shared/chunk-rnqc7735.js +0 -125
- package/dist/shared/chunk-rtk30950.js +0 -202
- package/dist/shared/chunk-s0xgd8vg.js +0 -266
- package/dist/shared/chunk-s415735j.js +0 -357
- package/dist/shared/chunk-s62e7jf4.js +0 -30
- package/dist/shared/chunk-snd8e6r8.js +0 -418
- package/dist/shared/chunk-spng4yb9.js +0 -73
- package/dist/shared/chunk-t887wwjc.js +0 -168
- package/dist/shared/chunk-tn0m98j8.js +0 -42
- package/dist/shared/chunk-v0b5pkcq.js +0 -30
- package/dist/shared/chunk-v5tj7veh.js +0 -284
- package/dist/shared/chunk-vkscwzpr.js +0 -294
- package/dist/shared/chunk-vv187snj.js +0 -112
- package/dist/shared/chunk-xv4wd0kf.js +0 -293
- package/dist/shared/chunk-y1hpsqzy.js +0 -185
- package/dist/shared/chunk-yfzddvxc.js +0 -71
- package/dist/shared/chunk-yzgzx2dh.js +0 -311
- package/dist/shared/chunk-z5j7ztf2.js +0 -467
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
|
|
5
|
-
// src/card/card-composed.tsx
|
|
6
|
-
import { __append, __attr, __child, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __pushMountFrame } from "@vertz/ui/internals";
|
|
7
|
-
import { createContext, useContext } from "@vertz/ui";
|
|
8
|
-
var CardContext = createContext(undefined, "@vertz/ui-primitives::CardContext");
|
|
9
|
-
function CardHeader(__props) {
|
|
10
|
-
const __mfDepth = __pushMountFrame();
|
|
11
|
-
try {
|
|
12
|
-
const ctx = useContext(CardContext);
|
|
13
|
-
const __mfResult0 = (() => {
|
|
14
|
-
const __el0 = __element("div");
|
|
15
|
-
__attr(__el0, "class", () => cn(ctx?.classes?.header, __props.className ?? __props.class));
|
|
16
|
-
__enterChildren(__el0);
|
|
17
|
-
__append(__el0, __child(() => __props.children));
|
|
18
|
-
__exitChildren();
|
|
19
|
-
return __el0;
|
|
20
|
-
})();
|
|
21
|
-
__flushMountFrame();
|
|
22
|
-
return __mfResult0;
|
|
23
|
-
} catch (__mfErr) {
|
|
24
|
-
__discardMountFrame(__mfDepth);
|
|
25
|
-
throw __mfErr;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function CardTitle(__props) {
|
|
29
|
-
const __mfDepth = __pushMountFrame();
|
|
30
|
-
try {
|
|
31
|
-
const ctx = useContext(CardContext);
|
|
32
|
-
const __mfResult0 = (() => {
|
|
33
|
-
const __el0 = __element("h3");
|
|
34
|
-
__attr(__el0, "class", () => cn(ctx?.classes?.title, __props.className ?? __props.class));
|
|
35
|
-
__enterChildren(__el0);
|
|
36
|
-
__append(__el0, __child(() => __props.children));
|
|
37
|
-
__exitChildren();
|
|
38
|
-
return __el0;
|
|
39
|
-
})();
|
|
40
|
-
__flushMountFrame();
|
|
41
|
-
return __mfResult0;
|
|
42
|
-
} catch (__mfErr) {
|
|
43
|
-
__discardMountFrame(__mfDepth);
|
|
44
|
-
throw __mfErr;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function CardDescription(__props) {
|
|
48
|
-
const __mfDepth = __pushMountFrame();
|
|
49
|
-
try {
|
|
50
|
-
const ctx = useContext(CardContext);
|
|
51
|
-
const __mfResult0 = (() => {
|
|
52
|
-
const __el0 = __element("p");
|
|
53
|
-
__attr(__el0, "class", () => cn(ctx?.classes?.description, __props.className ?? __props.class));
|
|
54
|
-
__enterChildren(__el0);
|
|
55
|
-
__append(__el0, __child(() => __props.children));
|
|
56
|
-
__exitChildren();
|
|
57
|
-
return __el0;
|
|
58
|
-
})();
|
|
59
|
-
__flushMountFrame();
|
|
60
|
-
return __mfResult0;
|
|
61
|
-
} catch (__mfErr) {
|
|
62
|
-
__discardMountFrame(__mfDepth);
|
|
63
|
-
throw __mfErr;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
function CardContent(__props) {
|
|
67
|
-
const __mfDepth = __pushMountFrame();
|
|
68
|
-
try {
|
|
69
|
-
const ctx = useContext(CardContext);
|
|
70
|
-
const __mfResult0 = (() => {
|
|
71
|
-
const __el0 = __element("div");
|
|
72
|
-
__attr(__el0, "class", () => cn(ctx?.classes?.content, __props.className ?? __props.class));
|
|
73
|
-
__enterChildren(__el0);
|
|
74
|
-
__append(__el0, __child(() => __props.children));
|
|
75
|
-
__exitChildren();
|
|
76
|
-
return __el0;
|
|
77
|
-
})();
|
|
78
|
-
__flushMountFrame();
|
|
79
|
-
return __mfResult0;
|
|
80
|
-
} catch (__mfErr) {
|
|
81
|
-
__discardMountFrame(__mfDepth);
|
|
82
|
-
throw __mfErr;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function CardFooter(__props) {
|
|
86
|
-
const __mfDepth = __pushMountFrame();
|
|
87
|
-
try {
|
|
88
|
-
const ctx = useContext(CardContext);
|
|
89
|
-
const __mfResult0 = (() => {
|
|
90
|
-
const __el0 = __element("div");
|
|
91
|
-
__attr(__el0, "class", () => cn(ctx?.classes?.footer, __props.className ?? __props.class));
|
|
92
|
-
__enterChildren(__el0);
|
|
93
|
-
__append(__el0, __child(() => __props.children));
|
|
94
|
-
__exitChildren();
|
|
95
|
-
return __el0;
|
|
96
|
-
})();
|
|
97
|
-
__flushMountFrame();
|
|
98
|
-
return __mfResult0;
|
|
99
|
-
} catch (__mfErr) {
|
|
100
|
-
__discardMountFrame(__mfDepth);
|
|
101
|
-
throw __mfErr;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
function CardAction(__props) {
|
|
105
|
-
const __mfDepth = __pushMountFrame();
|
|
106
|
-
try {
|
|
107
|
-
const ctx = useContext(CardContext);
|
|
108
|
-
const __mfResult0 = (() => {
|
|
109
|
-
const __el0 = __element("div");
|
|
110
|
-
__attr(__el0, "class", () => cn(ctx?.classes?.action, __props.className ?? __props.class));
|
|
111
|
-
__enterChildren(__el0);
|
|
112
|
-
__append(__el0, __child(() => __props.children));
|
|
113
|
-
__exitChildren();
|
|
114
|
-
return __el0;
|
|
115
|
-
})();
|
|
116
|
-
__flushMountFrame();
|
|
117
|
-
return __mfResult0;
|
|
118
|
-
} catch (__mfErr) {
|
|
119
|
-
__discardMountFrame(__mfDepth);
|
|
120
|
-
throw __mfErr;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function ComposedCardRoot(__props) {
|
|
124
|
-
const __mfDepth = __pushMountFrame();
|
|
125
|
-
try {
|
|
126
|
-
const __mfResult0 = CardContext.Provider({ get value() {
|
|
127
|
-
return { classes: __props.classes };
|
|
128
|
-
}, children: () => (() => {
|
|
129
|
-
const __el0 = __element("div");
|
|
130
|
-
__attr(__el0, "class", () => cn(__props.classes?.root, __props.className ?? __props.class));
|
|
131
|
-
__enterChildren(__el0);
|
|
132
|
-
__append(__el0, __child(() => __props.children));
|
|
133
|
-
__exitChildren();
|
|
134
|
-
return __el0;
|
|
135
|
-
})() });
|
|
136
|
-
__flushMountFrame();
|
|
137
|
-
return __mfResult0;
|
|
138
|
-
} catch (__mfErr) {
|
|
139
|
-
__discardMountFrame(__mfDepth);
|
|
140
|
-
throw __mfErr;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
var ComposedCard = Object.assign(ComposedCardRoot, {
|
|
144
|
-
Header: CardHeader,
|
|
145
|
-
Title: CardTitle,
|
|
146
|
-
Description: CardDescription,
|
|
147
|
-
Content: CardContent,
|
|
148
|
-
Footer: CardFooter,
|
|
149
|
-
Action: CardAction
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
export { ComposedCard };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
|
|
5
|
-
// src/separator/separator-composed.tsx
|
|
6
|
-
import { computed } from "@vertz/ui";
|
|
7
|
-
import { __attr, __discardMountFrame, __element, __flushMountFrame, __pushMountFrame } from "@vertz/ui/internals";
|
|
8
|
-
function ComposedSeparatorRoot(__props) {
|
|
9
|
-
const __mfDepth = __pushMountFrame();
|
|
10
|
-
try {
|
|
11
|
-
const orientationClass = computed(() => (__props.orientation ?? "horizontal") === "vertical" ? __props.classes?.vertical : __props.classes?.horizontal);
|
|
12
|
-
const __mfResult0 = (() => {
|
|
13
|
-
const __el0 = __element("hr");
|
|
14
|
-
__attr(__el0, "class", () => cn(__props.classes?.base, orientationClass.value, __props.className ?? __props.class));
|
|
15
|
-
__el0.setAttribute("role", "separator");
|
|
16
|
-
__attr(__el0, "aria-orientation", () => __props.orientation ?? "horizontal");
|
|
17
|
-
return __el0;
|
|
18
|
-
})();
|
|
19
|
-
__flushMountFrame();
|
|
20
|
-
return __mfResult0;
|
|
21
|
-
} catch (__mfErr) {
|
|
22
|
-
__discardMountFrame(__mfDepth);
|
|
23
|
-
throw __mfErr;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
var ComposedSeparator = ComposedSeparatorRoot;
|
|
27
|
-
|
|
28
|
-
export { ComposedSeparator };
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
import {
|
|
5
|
-
uniqueId
|
|
6
|
-
} from "./chunk-8y1jf6xr.js";
|
|
7
|
-
import {
|
|
8
|
-
Keys,
|
|
9
|
-
handleListNavigation,
|
|
10
|
-
isKey
|
|
11
|
-
} from "./chunk-7867pr13.js";
|
|
12
|
-
import {
|
|
13
|
-
setDataState,
|
|
14
|
-
setExpanded,
|
|
15
|
-
setHidden,
|
|
16
|
-
setHiddenAnimated
|
|
17
|
-
} from "./chunk-vevfhpc9.js";
|
|
18
|
-
|
|
19
|
-
// src/accordion/accordion-composed.tsx
|
|
20
|
-
import { computed, signal } from "@vertz/ui";
|
|
21
|
-
import { __append, __attr, __child, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __on, __pushMountFrame } from "@vertz/ui/internals";
|
|
22
|
-
import { createContext, ref, useContext } from "@vertz/ui";
|
|
23
|
-
var AccordionContext = createContext(undefined, "@vertz/ui-primitives::AccordionContext");
|
|
24
|
-
var AccordionItemContext = createContext(undefined, "@vertz/ui-primitives::AccordionItemContext");
|
|
25
|
-
function useAccordionContext(componentName) {
|
|
26
|
-
const ctx = useContext(AccordionContext);
|
|
27
|
-
if (!ctx) {
|
|
28
|
-
throw new Error(`<Accordion.${componentName}> must be used inside <Accordion>. ` + "Ensure it is a direct or nested child of the Accordion root component.");
|
|
29
|
-
}
|
|
30
|
-
return ctx;
|
|
31
|
-
}
|
|
32
|
-
function AccordionItem(__props) {
|
|
33
|
-
const __mfDepth = __pushMountFrame();
|
|
34
|
-
try {
|
|
35
|
-
const ctx = useAccordionContext("Item");
|
|
36
|
-
const baseId = uniqueId("accordion");
|
|
37
|
-
const triggerId = `${baseId}-trigger`;
|
|
38
|
-
const contentId = `${baseId}-content`;
|
|
39
|
-
const contentRef = ref();
|
|
40
|
-
const triggerRef = ref();
|
|
41
|
-
const itemCtx = {
|
|
42
|
-
value: __props.value,
|
|
43
|
-
triggerId,
|
|
44
|
-
contentId,
|
|
45
|
-
contentRef,
|
|
46
|
-
triggerRef,
|
|
47
|
-
classes: ctx.classes,
|
|
48
|
-
isOpen: () => ctx.isOpen(__props.value),
|
|
49
|
-
toggle: () => {
|
|
50
|
-
const prevHeight = contentRef.current?.scrollHeight ?? 0;
|
|
51
|
-
ctx.toggle(__props.value);
|
|
52
|
-
const nowOpen = ctx.isOpen(__props.value);
|
|
53
|
-
const contentEl = contentRef.current;
|
|
54
|
-
if (contentEl) {
|
|
55
|
-
contentEl.removeAttribute("data-initial");
|
|
56
|
-
if (nowOpen) {
|
|
57
|
-
setHidden(contentEl, false);
|
|
58
|
-
const height = contentEl.scrollHeight;
|
|
59
|
-
contentEl.style.setProperty("--accordion-content-height", `${height}px`);
|
|
60
|
-
setDataState(contentEl, "open");
|
|
61
|
-
} else {
|
|
62
|
-
contentEl.style.display = "";
|
|
63
|
-
contentEl.setAttribute("aria-hidden", "false");
|
|
64
|
-
contentEl.setAttribute("data-state", "open");
|
|
65
|
-
contentEl.style.setProperty("--accordion-content-height", `${prevHeight}px`);
|
|
66
|
-
contentEl.offsetHeight;
|
|
67
|
-
setDataState(contentEl, "closed");
|
|
68
|
-
setHiddenAnimated(contentEl, true);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
const triggerEl = triggerRef.current;
|
|
72
|
-
if (triggerEl) {
|
|
73
|
-
setExpanded(triggerEl, nowOpen);
|
|
74
|
-
setDataState(triggerEl, nowOpen ? "open" : "closed");
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
const __mfResult0 = AccordionItemContext.Provider({ get value() {
|
|
79
|
-
return itemCtx;
|
|
80
|
-
}, children: () => (() => {
|
|
81
|
-
const __el0 = __element("div");
|
|
82
|
-
__el0.setAttribute("data-accordion-item", "");
|
|
83
|
-
__attr(__el0, "data-value", () => __props.value);
|
|
84
|
-
{
|
|
85
|
-
const __v = cn(ctx.classes?.item);
|
|
86
|
-
if (__v != null && __v !== false)
|
|
87
|
-
__el0.setAttribute("class", __v === true ? "" : __v);
|
|
88
|
-
}
|
|
89
|
-
__enterChildren(__el0);
|
|
90
|
-
__append(__el0, __child(() => __props.children));
|
|
91
|
-
__exitChildren();
|
|
92
|
-
return __el0;
|
|
93
|
-
})() });
|
|
94
|
-
__flushMountFrame();
|
|
95
|
-
return __mfResult0;
|
|
96
|
-
} catch (__mfErr) {
|
|
97
|
-
__discardMountFrame(__mfDepth);
|
|
98
|
-
throw __mfErr;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
function AccordionTrigger(__props) {
|
|
102
|
-
const __mfDepth = __pushMountFrame();
|
|
103
|
-
try {
|
|
104
|
-
const ctx = useContext(AccordionItemContext);
|
|
105
|
-
if (!ctx) {
|
|
106
|
-
throw new Error("<Accordion.Trigger> must be used inside <Accordion.Item>. " + "Ensure it is a direct or nested child of an Accordion Item component.");
|
|
107
|
-
}
|
|
108
|
-
const initiallyOpen = computed(() => ctx.isOpen());
|
|
109
|
-
const __mfResult0 = (() => {
|
|
110
|
-
const __el0 = __element("button");
|
|
111
|
-
ctx.triggerRef.current = __el0;
|
|
112
|
-
__el0.setAttribute("type", "button");
|
|
113
|
-
__attr(__el0, "id", () => ctx.triggerId);
|
|
114
|
-
__el0.setAttribute("data-accordion-trigger", "");
|
|
115
|
-
__attr(__el0, "aria-controls", () => ctx.contentId);
|
|
116
|
-
__attr(__el0, "data-value", () => ctx.value);
|
|
117
|
-
__attr(__el0, "aria-expanded", () => initiallyOpen.value ? "true" : "false");
|
|
118
|
-
__attr(__el0, "data-state", () => initiallyOpen.value ? "open" : "closed");
|
|
119
|
-
__attr(__el0, "class", () => cn(ctx.classes?.trigger, __props.className ?? __props.class));
|
|
120
|
-
__on(__el0, "click", () => ctx.toggle());
|
|
121
|
-
__enterChildren(__el0);
|
|
122
|
-
__append(__el0, __child(() => __props.children));
|
|
123
|
-
__exitChildren();
|
|
124
|
-
return __el0;
|
|
125
|
-
})();
|
|
126
|
-
__flushMountFrame();
|
|
127
|
-
return __mfResult0;
|
|
128
|
-
} catch (__mfErr) {
|
|
129
|
-
__discardMountFrame(__mfDepth);
|
|
130
|
-
throw __mfErr;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
function AccordionContent(__props) {
|
|
134
|
-
const __mfDepth = __pushMountFrame();
|
|
135
|
-
try {
|
|
136
|
-
const ctx = useContext(AccordionItemContext);
|
|
137
|
-
if (!ctx) {
|
|
138
|
-
throw new Error("<Accordion.Content> must be used inside <Accordion.Item>. " + "Ensure it is a direct or nested child of an Accordion Item component.");
|
|
139
|
-
}
|
|
140
|
-
const el = computed(() => (() => {
|
|
141
|
-
const __el0 = __element("div");
|
|
142
|
-
ctx.contentRef.current = __el0;
|
|
143
|
-
__el0.setAttribute("role", "region");
|
|
144
|
-
__attr(__el0, "id", () => ctx.contentId);
|
|
145
|
-
__el0.setAttribute("data-accordion-content", "");
|
|
146
|
-
__attr(__el0, "aria-labelledby", () => ctx.triggerId);
|
|
147
|
-
__attr(__el0, "class", () => cn(ctx.classes?.content, __props.className ?? __props.class));
|
|
148
|
-
__enterChildren(__el0);
|
|
149
|
-
__append(__el0, (() => {
|
|
150
|
-
const __el1 = __element("div");
|
|
151
|
-
__el1.setAttribute("data-part", "content-inner");
|
|
152
|
-
__enterChildren(__el1);
|
|
153
|
-
__append(__el1, __child(() => __props.children));
|
|
154
|
-
__exitChildren();
|
|
155
|
-
return __el1;
|
|
156
|
-
})());
|
|
157
|
-
__exitChildren();
|
|
158
|
-
return __el0;
|
|
159
|
-
})());
|
|
160
|
-
const isOpen = computed(() => ctx.isOpen());
|
|
161
|
-
el.value.setAttribute("aria-hidden", isOpen.value ? "false" : "true");
|
|
162
|
-
el.value.setAttribute("data-state", isOpen.value ? "open" : "closed");
|
|
163
|
-
if (isOpen.value) {
|
|
164
|
-
el.value.setAttribute("data-initial", "");
|
|
165
|
-
} else {
|
|
166
|
-
el.value.style.display = "none";
|
|
167
|
-
}
|
|
168
|
-
const __mfResult0 = el.value;
|
|
169
|
-
__flushMountFrame();
|
|
170
|
-
return __mfResult0;
|
|
171
|
-
} catch (__mfErr) {
|
|
172
|
-
__discardMountFrame(__mfDepth);
|
|
173
|
-
throw __mfErr;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
function ComposedAccordionRoot(__props) {
|
|
177
|
-
const __mfDepth = __pushMountFrame();
|
|
178
|
-
try {
|
|
179
|
-
const multiple = computed(() => __props.type === "multiple");
|
|
180
|
-
const openValues = signal([...__props.defaultValue ?? []], "openValues");
|
|
181
|
-
const ctx = {
|
|
182
|
-
classes: __props.classes,
|
|
183
|
-
isOpen: (value) => openValues.value.includes(value),
|
|
184
|
-
toggle: (value) => {
|
|
185
|
-
const current = [...openValues.value];
|
|
186
|
-
const idx = current.indexOf(value);
|
|
187
|
-
if (idx >= 0) {
|
|
188
|
-
current.splice(idx, 1);
|
|
189
|
-
} else {
|
|
190
|
-
if (multiple.value) {
|
|
191
|
-
current.push(value);
|
|
192
|
-
} else {
|
|
193
|
-
current.length = 0;
|
|
194
|
-
current.push(value);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
openValues.value = current;
|
|
198
|
-
__props.onValueChange?.(current);
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
const __mfResult0 = AccordionContext.Provider({ get value() {
|
|
202
|
-
return ctx;
|
|
203
|
-
}, children: () => (() => {
|
|
204
|
-
const __el0 = __element("div");
|
|
205
|
-
__el0.setAttribute("data-orientation", "vertical");
|
|
206
|
-
__el0.setAttribute("data-accordion-root", "");
|
|
207
|
-
__on(__el0, "keydown", (event) => {
|
|
208
|
-
if (isKey(event, Keys.ArrowUp, Keys.ArrowDown, Keys.Home, Keys.End)) {
|
|
209
|
-
const root = event.currentTarget;
|
|
210
|
-
const triggers = [...root.querySelectorAll("[data-accordion-trigger]")];
|
|
211
|
-
handleListNavigation(event, triggers, { orientation: "vertical" });
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
__enterChildren(__el0);
|
|
215
|
-
__append(__el0, __child(() => __props.children));
|
|
216
|
-
__exitChildren();
|
|
217
|
-
return __el0;
|
|
218
|
-
})() });
|
|
219
|
-
__flushMountFrame();
|
|
220
|
-
return __mfResult0;
|
|
221
|
-
} catch (__mfErr) {
|
|
222
|
-
__discardMountFrame(__mfDepth);
|
|
223
|
-
throw __mfErr;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
var ComposedAccordion = Object.assign(ComposedAccordionRoot, {
|
|
227
|
-
Item: AccordionItem,
|
|
228
|
-
Trigger: AccordionTrigger,
|
|
229
|
-
Content: AccordionContent
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
export { ComposedAccordion };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
import {
|
|
5
|
-
uniqueId
|
|
6
|
-
} from "./chunk-8y1jf6xr.js";
|
|
7
|
-
import {
|
|
8
|
-
Keys,
|
|
9
|
-
isKey
|
|
10
|
-
} from "./chunk-7867pr13.js";
|
|
11
|
-
|
|
12
|
-
// src/switch/switch-composed.tsx
|
|
13
|
-
import { signal } from "@vertz/ui";
|
|
14
|
-
import { __append, __attr, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __on, __pushMountFrame } from "@vertz/ui/internals";
|
|
15
|
-
function ComposedSwitchRoot(__props) {
|
|
16
|
-
const __mfDepth = __pushMountFrame();
|
|
17
|
-
try {
|
|
18
|
-
let toggle = function() {
|
|
19
|
-
if (__props.disabled ?? false)
|
|
20
|
-
return;
|
|
21
|
-
checked.value = !checked.value;
|
|
22
|
-
__props.onCheckedChange?.(checked.value);
|
|
23
|
-
};
|
|
24
|
-
const checked = signal(__props.defaultChecked ?? false, "checked");
|
|
25
|
-
const __mfResult0 = (() => {
|
|
26
|
-
const __el0 = __element("button");
|
|
27
|
-
__el0.setAttribute("data-v-id", "ComposedSwitchRoot");
|
|
28
|
-
__el0.setAttribute("type", "button");
|
|
29
|
-
__el0.setAttribute("role", "switch");
|
|
30
|
-
{
|
|
31
|
-
const __v = uniqueId("switch");
|
|
32
|
-
if (__v != null && __v !== false)
|
|
33
|
-
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
34
|
-
}
|
|
35
|
-
__attr(__el0, "aria-checked", () => checked.value ? "true" : "false");
|
|
36
|
-
__attr(__el0, "data-state", () => checked.value ? "checked" : "unchecked");
|
|
37
|
-
__attr(__el0, "disabled", () => __props.disabled ?? false);
|
|
38
|
-
__attr(__el0, "aria-disabled", () => __props.disabled ?? false ? "true" : undefined);
|
|
39
|
-
__attr(__el0, "class", () => cn(__props.classes?.root));
|
|
40
|
-
__on(__el0, "click", toggle);
|
|
41
|
-
__on(__el0, "keydown", (e) => {
|
|
42
|
-
if (isKey(e, Keys.Space)) {
|
|
43
|
-
e.preventDefault();
|
|
44
|
-
toggle();
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
__enterChildren(__el0);
|
|
48
|
-
__append(__el0, (() => {
|
|
49
|
-
const __el1 = __element("span");
|
|
50
|
-
__el1.setAttribute("data-part", "thumb");
|
|
51
|
-
__attr(__el1, "data-state", () => checked.value ? "checked" : "unchecked");
|
|
52
|
-
__attr(__el1, "class", () => cn(__props.classes?.thumb));
|
|
53
|
-
return __el1;
|
|
54
|
-
})());
|
|
55
|
-
__exitChildren();
|
|
56
|
-
return __el0;
|
|
57
|
-
})();
|
|
58
|
-
__flushMountFrame();
|
|
59
|
-
return __mfResult0;
|
|
60
|
-
} catch (__mfErr) {
|
|
61
|
-
__discardMountFrame(__mfDepth);
|
|
62
|
-
throw __mfErr;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
var ComposedSwitch = ComposedSwitchRoot;
|
|
66
|
-
|
|
67
|
-
export { ComposedSwitch };
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
|
|
5
|
-
// src/carousel/carousel-composed.tsx
|
|
6
|
-
import { computed, signal } from "@vertz/ui";
|
|
7
|
-
import { __append, __attr, __child, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __on, __pushMountFrame } from "@vertz/ui/internals";
|
|
8
|
-
import { createContext, useContext } from "@vertz/ui";
|
|
9
|
-
var CarouselContext = createContext(undefined, "@vertz/ui-primitives::CarouselContext");
|
|
10
|
-
function CarouselSlide(__props) {
|
|
11
|
-
const __mfDepth = __pushMountFrame();
|
|
12
|
-
try {
|
|
13
|
-
const ctx = useContext(CarouselContext);
|
|
14
|
-
if (!ctx) {
|
|
15
|
-
throw new Error("<Carousel.Slide> must be used inside <Carousel>. " + "Ensure it is a direct or nested child of the Carousel root component.");
|
|
16
|
-
}
|
|
17
|
-
const index = computed(() => ctx.registerSlide());
|
|
18
|
-
const __mfResult0 = (() => {
|
|
19
|
-
const __el0 = __element("div");
|
|
20
|
-
__el0.setAttribute("role", "group");
|
|
21
|
-
__el0.setAttribute("aria-roledescription", "slide");
|
|
22
|
-
__el0.setAttribute("data-carousel-slide", "");
|
|
23
|
-
__attr(__el0, "aria-hidden", () => String(index.value !== ctx.currentIndex));
|
|
24
|
-
__attr(__el0, "aria-label", () => `Slide ${index.value + 1} of ${ctx.getSlideCount()}`);
|
|
25
|
-
__attr(__el0, "data-state", () => index.value === ctx.currentIndex ? "active" : "inactive");
|
|
26
|
-
__attr(__el0, "class", () => cn(ctx.classes?.slide, __props.className ?? __props.class));
|
|
27
|
-
__enterChildren(__el0);
|
|
28
|
-
__append(__el0, __child(() => __props.children));
|
|
29
|
-
__exitChildren();
|
|
30
|
-
return __el0;
|
|
31
|
-
})();
|
|
32
|
-
__flushMountFrame();
|
|
33
|
-
return __mfResult0;
|
|
34
|
-
} catch (__mfErr) {
|
|
35
|
-
__discardMountFrame(__mfDepth);
|
|
36
|
-
throw __mfErr;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function CarouselPrevious(__props) {
|
|
40
|
-
const __mfDepth = __pushMountFrame();
|
|
41
|
-
try {
|
|
42
|
-
const ctx = useContext(CarouselContext);
|
|
43
|
-
if (!ctx) {
|
|
44
|
-
throw new Error("<Carousel.Previous> must be used inside <Carousel>. " + "Ensure it is a direct or nested child of the Carousel root component.");
|
|
45
|
-
}
|
|
46
|
-
const __mfResult0 = (() => {
|
|
47
|
-
const __el0 = __element("button");
|
|
48
|
-
__el0.setAttribute("type", "button");
|
|
49
|
-
__el0.setAttribute("aria-label", "Previous slide");
|
|
50
|
-
__el0.setAttribute("data-carousel-prev", "");
|
|
51
|
-
__attr(__el0, "disabled", () => !ctx.loop && ctx.currentIndex <= 0);
|
|
52
|
-
__attr(__el0, "class", () => cn(ctx.classes?.prevButton));
|
|
53
|
-
__enterChildren(__el0);
|
|
54
|
-
__append(__el0, __child(() => __props.children ?? "‹"));
|
|
55
|
-
__exitChildren();
|
|
56
|
-
return __el0;
|
|
57
|
-
})();
|
|
58
|
-
__flushMountFrame();
|
|
59
|
-
return __mfResult0;
|
|
60
|
-
} catch (__mfErr) {
|
|
61
|
-
__discardMountFrame(__mfDepth);
|
|
62
|
-
throw __mfErr;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function CarouselNext(__props) {
|
|
66
|
-
const __mfDepth = __pushMountFrame();
|
|
67
|
-
try {
|
|
68
|
-
const ctx = useContext(CarouselContext);
|
|
69
|
-
if (!ctx) {
|
|
70
|
-
throw new Error("<Carousel.Next> must be used inside <Carousel>. " + "Ensure it is a direct or nested child of the Carousel root component.");
|
|
71
|
-
}
|
|
72
|
-
const __mfResult0 = (() => {
|
|
73
|
-
const __el0 = __element("button");
|
|
74
|
-
__el0.setAttribute("type", "button");
|
|
75
|
-
__el0.setAttribute("aria-label", "Next slide");
|
|
76
|
-
__el0.setAttribute("data-carousel-next", "");
|
|
77
|
-
__attr(__el0, "disabled", () => !ctx.loop && ctx.currentIndex >= ctx.getSlideCount() - 1);
|
|
78
|
-
__attr(__el0, "class", () => cn(ctx.classes?.nextButton));
|
|
79
|
-
__enterChildren(__el0);
|
|
80
|
-
__append(__el0, __child(() => __props.children ?? "›"));
|
|
81
|
-
__exitChildren();
|
|
82
|
-
return __el0;
|
|
83
|
-
})();
|
|
84
|
-
__flushMountFrame();
|
|
85
|
-
return __mfResult0;
|
|
86
|
-
} catch (__mfErr) {
|
|
87
|
-
__discardMountFrame(__mfDepth);
|
|
88
|
-
throw __mfErr;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
function ComposedCarouselRoot(__props) {
|
|
92
|
-
const __mfDepth = __pushMountFrame();
|
|
93
|
-
try {
|
|
94
|
-
let registerSlide = function() {
|
|
95
|
-
const idx = _reg.nextIdx++;
|
|
96
|
-
slideCount.value = _reg.nextIdx;
|
|
97
|
-
return idx;
|
|
98
|
-
}, goTo = function(index) {
|
|
99
|
-
const count = _reg.nextIdx;
|
|
100
|
-
if (count === 0)
|
|
101
|
-
return;
|
|
102
|
-
let next = index;
|
|
103
|
-
if (__props.loop ?? false) {
|
|
104
|
-
next = (index % count + count) % count;
|
|
105
|
-
} else {
|
|
106
|
-
next = Math.max(0, Math.min(count - 1, index));
|
|
107
|
-
}
|
|
108
|
-
if (next === currentIndex.value)
|
|
109
|
-
return;
|
|
110
|
-
currentIndex.value = next;
|
|
111
|
-
__props.onSlideChange?.(next);
|
|
112
|
-
}, handleClick = function(e) {
|
|
113
|
-
const target = e.target;
|
|
114
|
-
if (target.closest("[data-carousel-prev]"))
|
|
115
|
-
goTo(currentIndex.value - 1);
|
|
116
|
-
if (target.closest("[data-carousel-next]"))
|
|
117
|
-
goTo(currentIndex.value + 1);
|
|
118
|
-
}, handleKeydown = function(e) {
|
|
119
|
-
const prevKey = (__props.orientation ?? "horizontal") === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
120
|
-
const nextKey = (__props.orientation ?? "horizontal") === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
121
|
-
if (e.key === prevKey) {
|
|
122
|
-
e.preventDefault();
|
|
123
|
-
goTo(currentIndex.value - 1);
|
|
124
|
-
}
|
|
125
|
-
if (e.key === nextKey) {
|
|
126
|
-
e.preventDefault();
|
|
127
|
-
goTo(currentIndex.value + 1);
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
const currentIndex = signal(__props.defaultIndex ?? 0, "currentIndex");
|
|
131
|
-
const _reg = { nextIdx: 0 };
|
|
132
|
-
const slideCount = signal(0, "slideCount");
|
|
133
|
-
const ctx = {
|
|
134
|
-
registerSlide,
|
|
135
|
-
currentIndex,
|
|
136
|
-
getSlideCount: () => slideCount.value,
|
|
137
|
-
loop: __props.loop ?? false,
|
|
138
|
-
classes: __props.classes
|
|
139
|
-
};
|
|
140
|
-
const __mfResult0 = CarouselContext.Provider({ get value() {
|
|
141
|
-
return ctx;
|
|
142
|
-
}, children: () => (() => {
|
|
143
|
-
const __el0 = __element("div");
|
|
144
|
-
__el0.setAttribute("role", "region");
|
|
145
|
-
__el0.setAttribute("aria-roledescription", "carousel");
|
|
146
|
-
__el0.setAttribute("data-carousel-root", "");
|
|
147
|
-
__attr(__el0, "data-orientation", () => __props.orientation ?? "horizontal");
|
|
148
|
-
__attr(__el0, "class", () => cn(__props.classes?.root));
|
|
149
|
-
__on(__el0, "click", handleClick);
|
|
150
|
-
__on(__el0, "keydown", handleKeydown);
|
|
151
|
-
__enterChildren(__el0);
|
|
152
|
-
__append(__el0, (() => {
|
|
153
|
-
const __el1 = __element("div");
|
|
154
|
-
__el1.setAttribute("data-carousel-viewport", "");
|
|
155
|
-
__attr(__el1, "class", () => cn(__props.classes?.viewport));
|
|
156
|
-
__enterChildren(__el1);
|
|
157
|
-
__append(__el1, __child(() => __props.children));
|
|
158
|
-
__exitChildren();
|
|
159
|
-
return __el1;
|
|
160
|
-
})());
|
|
161
|
-
__exitChildren();
|
|
162
|
-
return __el0;
|
|
163
|
-
})() });
|
|
164
|
-
__flushMountFrame();
|
|
165
|
-
return __mfResult0;
|
|
166
|
-
} catch (__mfErr) {
|
|
167
|
-
__discardMountFrame(__mfDepth);
|
|
168
|
-
throw __mfErr;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
var ComposedCarousel = Object.assign(ComposedCarouselRoot, {
|
|
172
|
-
Slide: CarouselSlide,
|
|
173
|
-
Previous: CarouselPrevious,
|
|
174
|
-
Next: CarouselNext
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
export { ComposedCarousel };
|