@vertz/ui-primitives 0.2.41 → 0.2.43
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,260 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
saveFocus,
|
|
3
|
-
trapFocus
|
|
4
|
-
} from "./chunk-e2v1c9ex.js";
|
|
5
|
-
import {
|
|
6
|
-
linkedIds
|
|
7
|
-
} from "./chunk-8y1jf6xr.js";
|
|
8
|
-
import {
|
|
9
|
-
setDataState,
|
|
10
|
-
setExpanded,
|
|
11
|
-
setHidden,
|
|
12
|
-
setHiddenAnimated
|
|
13
|
-
} from "./chunk-vevfhpc9.js";
|
|
14
|
-
|
|
15
|
-
// src/alert-dialog/alert-dialog.tsx
|
|
16
|
-
import { __discardMountFrame, __element, __flushMountFrame, __on, __pushMountFrame, __styleStr } from "@vertz/ui/internals";
|
|
17
|
-
import { signal } from "@vertz/ui";
|
|
18
|
-
function AlertDialogTriggerEl(triggerId, contentId, defaultOpen, onClick) {
|
|
19
|
-
const __mfDepth = __pushMountFrame();
|
|
20
|
-
try {
|
|
21
|
-
const __mfResult0 = (() => {
|
|
22
|
-
const __el0 = __element("button");
|
|
23
|
-
__el0.setAttribute("type", "button");
|
|
24
|
-
{
|
|
25
|
-
const __v = triggerId;
|
|
26
|
-
if (__v != null && __v !== false)
|
|
27
|
-
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
28
|
-
}
|
|
29
|
-
{
|
|
30
|
-
const __v = contentId;
|
|
31
|
-
if (__v != null && __v !== false)
|
|
32
|
-
__el0.setAttribute("aria-controls", __v === true ? "" : __v);
|
|
33
|
-
}
|
|
34
|
-
{
|
|
35
|
-
const __v = defaultOpen ? "true" : "false";
|
|
36
|
-
if (__v != null && __v !== false)
|
|
37
|
-
__el0.setAttribute("aria-expanded", __v === true ? "" : __v);
|
|
38
|
-
}
|
|
39
|
-
{
|
|
40
|
-
const __v = defaultOpen ? "open" : "closed";
|
|
41
|
-
if (__v != null && __v !== false)
|
|
42
|
-
__el0.setAttribute("data-state", __v === true ? "" : __v);
|
|
43
|
-
}
|
|
44
|
-
__on(__el0, "click", onClick);
|
|
45
|
-
return __el0;
|
|
46
|
-
})();
|
|
47
|
-
__flushMountFrame();
|
|
48
|
-
return __mfResult0;
|
|
49
|
-
} catch (__mfErr) {
|
|
50
|
-
__discardMountFrame(__mfDepth);
|
|
51
|
-
throw __mfErr;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function AlertDialogOverlayEl(defaultOpen) {
|
|
55
|
-
const __mfDepth = __pushMountFrame();
|
|
56
|
-
try {
|
|
57
|
-
const __mfResult0 = (() => {
|
|
58
|
-
const __el0 = __element("div");
|
|
59
|
-
__el0.setAttribute("data-alertdialog-overlay", "");
|
|
60
|
-
{
|
|
61
|
-
const __v = defaultOpen ? "false" : "true";
|
|
62
|
-
if (__v != null && __v !== false)
|
|
63
|
-
__el0.setAttribute("aria-hidden", __v === true ? "" : __v);
|
|
64
|
-
}
|
|
65
|
-
{
|
|
66
|
-
const __v = defaultOpen ? "open" : "closed";
|
|
67
|
-
if (__v != null && __v !== false)
|
|
68
|
-
__el0.setAttribute("data-state", __v === true ? "" : __v);
|
|
69
|
-
}
|
|
70
|
-
{
|
|
71
|
-
const __v = { display: defaultOpen ? "" : "none" };
|
|
72
|
-
if (__v != null && __v !== false)
|
|
73
|
-
__el0.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
74
|
-
}
|
|
75
|
-
return __el0;
|
|
76
|
-
})();
|
|
77
|
-
__flushMountFrame();
|
|
78
|
-
return __mfResult0;
|
|
79
|
-
} catch (__mfErr) {
|
|
80
|
-
__discardMountFrame(__mfDepth);
|
|
81
|
-
throw __mfErr;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
function AlertDialogContentEl(contentId, titleId, descriptionId, defaultOpen) {
|
|
85
|
-
const __mfDepth = __pushMountFrame();
|
|
86
|
-
try {
|
|
87
|
-
const __mfResult0 = (() => {
|
|
88
|
-
const __el0 = __element("div");
|
|
89
|
-
__el0.setAttribute("role", "alertdialog");
|
|
90
|
-
{
|
|
91
|
-
const __v = contentId;
|
|
92
|
-
if (__v != null && __v !== false)
|
|
93
|
-
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
94
|
-
}
|
|
95
|
-
__el0.setAttribute("aria-modal", "true");
|
|
96
|
-
{
|
|
97
|
-
const __v = titleId;
|
|
98
|
-
if (__v != null && __v !== false)
|
|
99
|
-
__el0.setAttribute("aria-labelledby", __v === true ? "" : __v);
|
|
100
|
-
}
|
|
101
|
-
{
|
|
102
|
-
const __v = descriptionId;
|
|
103
|
-
if (__v != null && __v !== false)
|
|
104
|
-
__el0.setAttribute("aria-describedby", __v === true ? "" : __v);
|
|
105
|
-
}
|
|
106
|
-
{
|
|
107
|
-
const __v = defaultOpen ? "false" : "true";
|
|
108
|
-
if (__v != null && __v !== false)
|
|
109
|
-
__el0.setAttribute("aria-hidden", __v === true ? "" : __v);
|
|
110
|
-
}
|
|
111
|
-
{
|
|
112
|
-
const __v = defaultOpen ? "open" : "closed";
|
|
113
|
-
if (__v != null && __v !== false)
|
|
114
|
-
__el0.setAttribute("data-state", __v === true ? "" : __v);
|
|
115
|
-
}
|
|
116
|
-
{
|
|
117
|
-
const __v = { display: defaultOpen ? "" : "none" };
|
|
118
|
-
if (__v != null && __v !== false)
|
|
119
|
-
__el0.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
120
|
-
}
|
|
121
|
-
return __el0;
|
|
122
|
-
})();
|
|
123
|
-
__flushMountFrame();
|
|
124
|
-
return __mfResult0;
|
|
125
|
-
} catch (__mfErr) {
|
|
126
|
-
__discardMountFrame(__mfDepth);
|
|
127
|
-
throw __mfErr;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
function AlertDialogTitleEl(titleId) {
|
|
131
|
-
const __mfDepth = __pushMountFrame();
|
|
132
|
-
try {
|
|
133
|
-
const __mfResult0 = (() => {
|
|
134
|
-
const __el0 = __element("h2");
|
|
135
|
-
{
|
|
136
|
-
const __v = titleId;
|
|
137
|
-
if (__v != null && __v !== false)
|
|
138
|
-
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
139
|
-
}
|
|
140
|
-
return __el0;
|
|
141
|
-
})();
|
|
142
|
-
__flushMountFrame();
|
|
143
|
-
return __mfResult0;
|
|
144
|
-
} catch (__mfErr) {
|
|
145
|
-
__discardMountFrame(__mfDepth);
|
|
146
|
-
throw __mfErr;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
function AlertDialogDescriptionEl(descriptionId) {
|
|
150
|
-
const __mfDepth = __pushMountFrame();
|
|
151
|
-
try {
|
|
152
|
-
const __mfResult0 = (() => {
|
|
153
|
-
const __el0 = __element("p");
|
|
154
|
-
{
|
|
155
|
-
const __v = descriptionId;
|
|
156
|
-
if (__v != null && __v !== false)
|
|
157
|
-
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
158
|
-
}
|
|
159
|
-
return __el0;
|
|
160
|
-
})();
|
|
161
|
-
__flushMountFrame();
|
|
162
|
-
return __mfResult0;
|
|
163
|
-
} catch (__mfErr) {
|
|
164
|
-
__discardMountFrame(__mfDepth);
|
|
165
|
-
throw __mfErr;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
function AlertDialogCancelBtn(onClick) {
|
|
169
|
-
const __mfDepth = __pushMountFrame();
|
|
170
|
-
try {
|
|
171
|
-
const __mfResult0 = (() => {
|
|
172
|
-
const __el0 = __element("button");
|
|
173
|
-
__el0.setAttribute("type", "button");
|
|
174
|
-
__on(__el0, "click", onClick);
|
|
175
|
-
return __el0;
|
|
176
|
-
})();
|
|
177
|
-
__flushMountFrame();
|
|
178
|
-
return __mfResult0;
|
|
179
|
-
} catch (__mfErr) {
|
|
180
|
-
__discardMountFrame(__mfDepth);
|
|
181
|
-
throw __mfErr;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
function AlertDialogActionBtn(onClick) {
|
|
185
|
-
const __mfDepth = __pushMountFrame();
|
|
186
|
-
try {
|
|
187
|
-
const __mfResult0 = (() => {
|
|
188
|
-
const __el0 = __element("button");
|
|
189
|
-
__el0.setAttribute("type", "button");
|
|
190
|
-
__on(__el0, "click", onClick);
|
|
191
|
-
return __el0;
|
|
192
|
-
})();
|
|
193
|
-
__flushMountFrame();
|
|
194
|
-
return __mfResult0;
|
|
195
|
-
} catch (__mfErr) {
|
|
196
|
-
__discardMountFrame(__mfDepth);
|
|
197
|
-
throw __mfErr;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
function AlertDialogRoot(options = {}) {
|
|
201
|
-
const { defaultOpen = false, onOpenChange, onAction } = options;
|
|
202
|
-
const ids = linkedIds("alertdialog");
|
|
203
|
-
const titleId = `${ids.contentId}-title`;
|
|
204
|
-
const descriptionId = `${ids.contentId}-description`;
|
|
205
|
-
const state = { open: signal(defaultOpen) };
|
|
206
|
-
let restoreFocus = null;
|
|
207
|
-
let removeTrap = null;
|
|
208
|
-
function show() {
|
|
209
|
-
if (state.open.peek())
|
|
210
|
-
return;
|
|
211
|
-
state.open.value = true;
|
|
212
|
-
setExpanded(trigger, true);
|
|
213
|
-
setHidden(overlay, false);
|
|
214
|
-
setHidden(content, false);
|
|
215
|
-
setDataState(trigger, "open");
|
|
216
|
-
setDataState(overlay, "open");
|
|
217
|
-
setDataState(content, "open");
|
|
218
|
-
restoreFocus = saveFocus();
|
|
219
|
-
removeTrap = trapFocus(content);
|
|
220
|
-
queueMicrotask(() => cancel.focus());
|
|
221
|
-
onOpenChange?.(true);
|
|
222
|
-
}
|
|
223
|
-
function hide() {
|
|
224
|
-
if (!state.open.peek())
|
|
225
|
-
return;
|
|
226
|
-
state.open.value = false;
|
|
227
|
-
setExpanded(trigger, false);
|
|
228
|
-
setDataState(trigger, "closed");
|
|
229
|
-
setDataState(overlay, "closed");
|
|
230
|
-
setDataState(content, "closed");
|
|
231
|
-
setHiddenAnimated(overlay, true);
|
|
232
|
-
setHiddenAnimated(content, true);
|
|
233
|
-
removeTrap?.();
|
|
234
|
-
removeTrap = null;
|
|
235
|
-
restoreFocus?.();
|
|
236
|
-
restoreFocus = null;
|
|
237
|
-
onOpenChange?.(false);
|
|
238
|
-
}
|
|
239
|
-
const trigger = AlertDialogTriggerEl(ids.triggerId, ids.contentId, defaultOpen, show);
|
|
240
|
-
const overlay = AlertDialogOverlayEl(defaultOpen);
|
|
241
|
-
const content = AlertDialogContentEl(ids.contentId, titleId, descriptionId, defaultOpen);
|
|
242
|
-
const title = AlertDialogTitleEl(titleId);
|
|
243
|
-
const description = AlertDialogDescriptionEl(descriptionId);
|
|
244
|
-
const cancel = AlertDialogCancelBtn(() => hide());
|
|
245
|
-
const action = AlertDialogActionBtn(() => {
|
|
246
|
-
onAction?.();
|
|
247
|
-
hide();
|
|
248
|
-
});
|
|
249
|
-
if (defaultOpen) {
|
|
250
|
-
restoreFocus = saveFocus();
|
|
251
|
-
removeTrap = trapFocus(content);
|
|
252
|
-
queueMicrotask(() => cancel.focus());
|
|
253
|
-
}
|
|
254
|
-
return { trigger, overlay, content, title, description, cancel, action, state, show, hide };
|
|
255
|
-
}
|
|
256
|
-
var AlertDialog = {
|
|
257
|
-
Root: AlertDialogRoot
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
export { AlertDialog };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
handleActivation
|
|
3
|
-
} from "./chunk-7867pr13.js";
|
|
4
|
-
import {
|
|
5
|
-
applyAttrs
|
|
6
|
-
} from "./chunk-2db2dnp3.js";
|
|
7
|
-
|
|
8
|
-
// src/button/button.tsx
|
|
9
|
-
import { __discardMountFrame, __element, __flushMountFrame, __on, __pushMountFrame } from "@vertz/ui/internals";
|
|
10
|
-
function ButtonRoot(options = {}) {
|
|
11
|
-
const __mfDepth = __pushMountFrame();
|
|
12
|
-
try {
|
|
13
|
-
const { disabled = false, onClick, ...attrs } = options;
|
|
14
|
-
const el = (() => {
|
|
15
|
-
const __el0 = __element("button");
|
|
16
|
-
__el0.setAttribute("type", "button");
|
|
17
|
-
{
|
|
18
|
-
const __v = disabled;
|
|
19
|
-
if (__v != null && __v !== false)
|
|
20
|
-
__el0.setAttribute("disabled", __v === true ? "" : __v);
|
|
21
|
-
}
|
|
22
|
-
{
|
|
23
|
-
const __v = disabled ? "true" : undefined;
|
|
24
|
-
if (__v != null && __v !== false)
|
|
25
|
-
__el0.setAttribute("aria-disabled", __v === true ? "" : __v);
|
|
26
|
-
}
|
|
27
|
-
__on(__el0, "click", () => {
|
|
28
|
-
if (disabled)
|
|
29
|
-
return;
|
|
30
|
-
onClick?.();
|
|
31
|
-
});
|
|
32
|
-
__on(__el0, "keydown", (event) => {
|
|
33
|
-
if (disabled)
|
|
34
|
-
return;
|
|
35
|
-
handleActivation(event, () => {
|
|
36
|
-
event.target.click();
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
return __el0;
|
|
40
|
-
})();
|
|
41
|
-
applyAttrs(el, attrs);
|
|
42
|
-
const __mfResult0 = el;
|
|
43
|
-
__flushMountFrame();
|
|
44
|
-
return __mfResult0;
|
|
45
|
-
} catch (__mfErr) {
|
|
46
|
-
__discardMountFrame(__mfDepth);
|
|
47
|
-
throw __mfErr;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
var Button = {
|
|
51
|
-
Root: ButtonRoot
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export { Button };
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
import {
|
|
5
|
-
createFloatingPosition,
|
|
6
|
-
resolveLayoutElement
|
|
7
|
-
} from "./chunk-vef3sepw.js";
|
|
8
|
-
import {
|
|
9
|
-
uniqueId
|
|
10
|
-
} from "./chunk-8y1jf6xr.js";
|
|
11
|
-
|
|
12
|
-
// src/hover-card/hover-card-composed.tsx
|
|
13
|
-
import { computed, signal } from "@vertz/ui";
|
|
14
|
-
import { __append, __attr, __child, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __on, __pushMountFrame, __styleStr } from "@vertz/ui/internals";
|
|
15
|
-
import { createContext, ref, useContext } from "@vertz/ui";
|
|
16
|
-
var HoverCardContext = createContext(undefined, "@vertz/ui-primitives::HoverCardContext");
|
|
17
|
-
function useHoverCardContext(componentName) {
|
|
18
|
-
const ctx = useContext(HoverCardContext);
|
|
19
|
-
if (!ctx) {
|
|
20
|
-
throw new Error(`<HoverCard.${componentName}> must be used inside <HoverCard>. ` + "Ensure it is a direct or nested child of the HoverCard root component.");
|
|
21
|
-
}
|
|
22
|
-
return ctx;
|
|
23
|
-
}
|
|
24
|
-
function HoverCardTrigger(__props) {
|
|
25
|
-
const __mfDepth = __pushMountFrame();
|
|
26
|
-
try {
|
|
27
|
-
const ctx = useHoverCardContext("Trigger");
|
|
28
|
-
const childNodes = computed(() => Array.isArray(__props.children) ? __props.children : [__props.children]);
|
|
29
|
-
const childEl = computed(() => childNodes.value.find((c) => c instanceof HTMLElement));
|
|
30
|
-
if (childEl.value) {
|
|
31
|
-
childEl.value.setAttribute("aria-haspopup", "dialog");
|
|
32
|
-
childEl.value.setAttribute("aria-expanded", ctx.isOpen() ? "true" : "false");
|
|
33
|
-
childEl.value.addEventListener("focus", () => ctx.showImmediate());
|
|
34
|
-
childEl.value.addEventListener("blur", () => ctx.hide());
|
|
35
|
-
}
|
|
36
|
-
const __mfResult0 = (() => {
|
|
37
|
-
const __el0 = __element("span");
|
|
38
|
-
ctx.triggerRef.current = __el0;
|
|
39
|
-
{
|
|
40
|
-
const __v = { display: "contents" };
|
|
41
|
-
if (__v != null && __v !== false)
|
|
42
|
-
__el0.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
43
|
-
}
|
|
44
|
-
__el0.setAttribute("data-hovercard-trigger", "");
|
|
45
|
-
__on(__el0, "mouseenter", () => ctx.show());
|
|
46
|
-
__on(__el0, "mouseleave", () => ctx.hide());
|
|
47
|
-
__on(__el0, "focusin", () => ctx.showImmediate());
|
|
48
|
-
__on(__el0, "focusout", () => ctx.hide());
|
|
49
|
-
__enterChildren(__el0);
|
|
50
|
-
__append(__el0, __child(() => __props.children));
|
|
51
|
-
__exitChildren();
|
|
52
|
-
return __el0;
|
|
53
|
-
})();
|
|
54
|
-
__flushMountFrame();
|
|
55
|
-
return __mfResult0;
|
|
56
|
-
} catch (__mfErr) {
|
|
57
|
-
__discardMountFrame(__mfDepth);
|
|
58
|
-
throw __mfErr;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function HoverCardContent(__props) {
|
|
62
|
-
const __mfDepth = __pushMountFrame();
|
|
63
|
-
try {
|
|
64
|
-
const ctx = useHoverCardContext("Content");
|
|
65
|
-
const isOpen = ctx.isOpen();
|
|
66
|
-
const __mfResult0 = (() => {
|
|
67
|
-
const __el0 = __element("div");
|
|
68
|
-
ctx.contentRef.current = __el0;
|
|
69
|
-
__el0.setAttribute("role", "dialog");
|
|
70
|
-
{
|
|
71
|
-
const __v = ctx.contentId;
|
|
72
|
-
if (__v != null && __v !== false)
|
|
73
|
-
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
74
|
-
}
|
|
75
|
-
__el0.setAttribute("data-hovercard-content", "");
|
|
76
|
-
{
|
|
77
|
-
const __v = isOpen ? "false" : "true";
|
|
78
|
-
if (__v != null && __v !== false)
|
|
79
|
-
__el0.setAttribute("aria-hidden", __v === true ? "" : __v);
|
|
80
|
-
}
|
|
81
|
-
{
|
|
82
|
-
const __v = isOpen ? "open" : "closed";
|
|
83
|
-
if (__v != null && __v !== false)
|
|
84
|
-
__el0.setAttribute("data-state", __v === true ? "" : __v);
|
|
85
|
-
}
|
|
86
|
-
{
|
|
87
|
-
const __v = { display: isOpen ? "" : "none" };
|
|
88
|
-
if (__v != null && __v !== false)
|
|
89
|
-
__el0.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
90
|
-
}
|
|
91
|
-
__attr(__el0, "class", () => cn(ctx.classes?.content, __props.className ?? __props.class));
|
|
92
|
-
__on(__el0, "mouseenter", () => ctx.cancelCloseTimer());
|
|
93
|
-
__on(__el0, "mouseleave", () => ctx.hide());
|
|
94
|
-
__on(__el0, "focusin", () => ctx.cancelCloseTimer());
|
|
95
|
-
__on(__el0, "focusout", () => ctx.hide());
|
|
96
|
-
__enterChildren(__el0);
|
|
97
|
-
__append(__el0, __child(() => __props.children));
|
|
98
|
-
__exitChildren();
|
|
99
|
-
return __el0;
|
|
100
|
-
})();
|
|
101
|
-
__flushMountFrame();
|
|
102
|
-
return __mfResult0;
|
|
103
|
-
} catch (__mfErr) {
|
|
104
|
-
__discardMountFrame(__mfDepth);
|
|
105
|
-
throw __mfErr;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
function ComposedHoverCardRoot(__props) {
|
|
109
|
-
const __mfDepth = __pushMountFrame();
|
|
110
|
-
try {
|
|
111
|
-
let cancelTimers = function() {
|
|
112
|
-
if (timers.open) {
|
|
113
|
-
clearTimeout(timers.open);
|
|
114
|
-
timers.open = null;
|
|
115
|
-
}
|
|
116
|
-
if (timers.close) {
|
|
117
|
-
clearTimeout(timers.close);
|
|
118
|
-
timers.close = null;
|
|
119
|
-
}
|
|
120
|
-
}, cancelCloseTimer = function() {
|
|
121
|
-
if (timers.close) {
|
|
122
|
-
clearTimeout(timers.close);
|
|
123
|
-
timers.close = null;
|
|
124
|
-
}
|
|
125
|
-
}, applyFloating = function() {
|
|
126
|
-
const triggerSpan = triggerRef.current;
|
|
127
|
-
const contentEl = contentRef.current;
|
|
128
|
-
if (!triggerSpan || !contentEl)
|
|
129
|
-
return;
|
|
130
|
-
const triggerEl = resolveLayoutElement(triggerSpan);
|
|
131
|
-
contentEl.style.position = "fixed";
|
|
132
|
-
const floatingOpts = __props.positioning ?? { placement: "bottom", offset: 4 };
|
|
133
|
-
const result = createFloatingPosition(triggerEl, contentEl, floatingOpts);
|
|
134
|
-
timers.floatingCleanup = result.cleanup;
|
|
135
|
-
}, cleanupFloating = function() {
|
|
136
|
-
timers.floatingCleanup?.();
|
|
137
|
-
timers.floatingCleanup = null;
|
|
138
|
-
}, show = function() {
|
|
139
|
-
cancelTimers();
|
|
140
|
-
if (isOpen.value)
|
|
141
|
-
return;
|
|
142
|
-
timers.open = setTimeout(() => {
|
|
143
|
-
timers.open = null;
|
|
144
|
-
isOpen.value = true;
|
|
145
|
-
applyFloating();
|
|
146
|
-
__props.onOpenChange?.(true);
|
|
147
|
-
}, __props.openDelay ?? 700);
|
|
148
|
-
}, showImmediate = function() {
|
|
149
|
-
cancelTimers();
|
|
150
|
-
isOpen.value = true;
|
|
151
|
-
applyFloating();
|
|
152
|
-
__props.onOpenChange?.(true);
|
|
153
|
-
}, hide = function() {
|
|
154
|
-
cancelTimers();
|
|
155
|
-
if (!isOpen.value)
|
|
156
|
-
return;
|
|
157
|
-
timers.close = setTimeout(() => {
|
|
158
|
-
timers.close = null;
|
|
159
|
-
isOpen.value = false;
|
|
160
|
-
cleanupFloating();
|
|
161
|
-
__props.onOpenChange?.(false);
|
|
162
|
-
}, __props.closeDelay ?? 300);
|
|
163
|
-
}, hideImmediate = function() {
|
|
164
|
-
cancelTimers();
|
|
165
|
-
isOpen.value = false;
|
|
166
|
-
cleanupFloating();
|
|
167
|
-
__props.onOpenChange?.(false);
|
|
168
|
-
};
|
|
169
|
-
const contentId = uniqueId("hovercard");
|
|
170
|
-
const triggerRef = ref();
|
|
171
|
-
const contentRef = ref();
|
|
172
|
-
const isOpen = signal(false, "isOpen");
|
|
173
|
-
const timers = { open: null, close: null, floatingCleanup: null };
|
|
174
|
-
const ctx = {
|
|
175
|
-
isOpen: () => isOpen.value,
|
|
176
|
-
contentId,
|
|
177
|
-
triggerRef,
|
|
178
|
-
contentRef,
|
|
179
|
-
classes: __props.classes,
|
|
180
|
-
show,
|
|
181
|
-
hide,
|
|
182
|
-
showImmediate,
|
|
183
|
-
hideImmediate,
|
|
184
|
-
cancelCloseTimer
|
|
185
|
-
};
|
|
186
|
-
const __mfResult0 = HoverCardContext.Provider({ get value() {
|
|
187
|
-
return ctx;
|
|
188
|
-
}, children: () => (() => {
|
|
189
|
-
const __el0 = __element("span");
|
|
190
|
-
{
|
|
191
|
-
const __v = { display: "contents" };
|
|
192
|
-
if (__v != null && __v !== false)
|
|
193
|
-
__el0.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
194
|
-
}
|
|
195
|
-
__el0.setAttribute("data-hovercard-root", "");
|
|
196
|
-
__enterChildren(__el0);
|
|
197
|
-
__append(__el0, __child(() => __props.children));
|
|
198
|
-
__exitChildren();
|
|
199
|
-
return __el0;
|
|
200
|
-
})() });
|
|
201
|
-
__flushMountFrame();
|
|
202
|
-
return __mfResult0;
|
|
203
|
-
} catch (__mfErr) {
|
|
204
|
-
__discardMountFrame(__mfDepth);
|
|
205
|
-
throw __mfErr;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
var ComposedHoverCard = Object.assign(ComposedHoverCardRoot, {
|
|
209
|
-
Trigger: HoverCardTrigger,
|
|
210
|
-
Content: HoverCardContent
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
export { ComposedHoverCard };
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
import {
|
|
5
|
-
uniqueId
|
|
6
|
-
} from "./chunk-8y1jf6xr.js";
|
|
7
|
-
import {
|
|
8
|
-
handleListNavigation
|
|
9
|
-
} from "./chunk-7867pr13.js";
|
|
10
|
-
|
|
11
|
-
// src/tabs/tabs-composed.tsx
|
|
12
|
-
import { computed, signal } from "@vertz/ui";
|
|
13
|
-
import { __append, __attr, __child, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __on, __pushMountFrame } from "@vertz/ui/internals";
|
|
14
|
-
import { createContext, useContext } from "@vertz/ui";
|
|
15
|
-
var TabsContext = createContext(undefined, "@vertz/ui-primitives::TabsContext");
|
|
16
|
-
function useTabsContext(componentName) {
|
|
17
|
-
const ctx = useContext(TabsContext);
|
|
18
|
-
if (!ctx) {
|
|
19
|
-
throw new Error(`<Tabs.${componentName}> must be used inside <Tabs>. ` + "Ensure it is a direct or nested child of the Tabs root component.");
|
|
20
|
-
}
|
|
21
|
-
return ctx;
|
|
22
|
-
}
|
|
23
|
-
function TabsList(__props) {
|
|
24
|
-
const __mfDepth = __pushMountFrame();
|
|
25
|
-
try {
|
|
26
|
-
const ctx = useTabsContext("List");
|
|
27
|
-
const __mfResult0 = (() => {
|
|
28
|
-
const __el0 = __element("div");
|
|
29
|
-
__el0.setAttribute("role", "tablist");
|
|
30
|
-
__el0.setAttribute("data-tabs-list", "");
|
|
31
|
-
{
|
|
32
|
-
const __v = ctx.orientation === "vertical" ? "vertical" : undefined;
|
|
33
|
-
if (__v != null && __v !== false)
|
|
34
|
-
__el0.setAttribute("aria-orientation", __v === true ? "" : __v);
|
|
35
|
-
}
|
|
36
|
-
__attr(__el0, "class", () => cn(ctx.classes?.list, __props.className ?? __props.class));
|
|
37
|
-
__on(__el0, "keydown", (event) => {
|
|
38
|
-
const list = event.currentTarget;
|
|
39
|
-
const triggers = [...list.querySelectorAll('[role="tab"]')];
|
|
40
|
-
const result = handleListNavigation(event, triggers, { orientation: ctx.orientation });
|
|
41
|
-
if (result) {
|
|
42
|
-
const value = result.getAttribute("data-value");
|
|
43
|
-
if (value)
|
|
44
|
-
ctx.select(value);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
__enterChildren(__el0);
|
|
48
|
-
__append(__el0, __child(() => __props.children));
|
|
49
|
-
__exitChildren();
|
|
50
|
-
return __el0;
|
|
51
|
-
})();
|
|
52
|
-
__flushMountFrame();
|
|
53
|
-
return __mfResult0;
|
|
54
|
-
} catch (__mfErr) {
|
|
55
|
-
__discardMountFrame(__mfDepth);
|
|
56
|
-
throw __mfErr;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function TabsTrigger(__props) {
|
|
60
|
-
const __mfDepth = __pushMountFrame();
|
|
61
|
-
try {
|
|
62
|
-
const ctx = useTabsContext("Trigger");
|
|
63
|
-
const isActive = computed(() => ctx.activeValue === __props.value);
|
|
64
|
-
const __mfResult0 = (() => {
|
|
65
|
-
const __el0 = __element("button");
|
|
66
|
-
__el0.setAttribute("type", "button");
|
|
67
|
-
__el0.setAttribute("role", "tab");
|
|
68
|
-
__attr(__el0, "id", () => ctx.getTriggerIdFor(__props.value));
|
|
69
|
-
__el0.setAttribute("data-tabs-trigger", "");
|
|
70
|
-
__attr(__el0, "data-value", () => __props.value);
|
|
71
|
-
__attr(__el0, "aria-controls", () => ctx.getPanelIdFor(__props.value));
|
|
72
|
-
__attr(__el0, "aria-selected", () => isActive.value ? "true" : "false");
|
|
73
|
-
__attr(__el0, "data-state", () => isActive.value ? "active" : "inactive");
|
|
74
|
-
__attr(__el0, "tabindex", () => isActive.value ? "0" : "-1");
|
|
75
|
-
__attr(__el0, "class", () => cn(ctx.classes?.trigger, __props.className ?? __props.class));
|
|
76
|
-
__on(__el0, "click", () => ctx.select(__props.value));
|
|
77
|
-
__enterChildren(__el0);
|
|
78
|
-
__append(__el0, __child(() => __props.children));
|
|
79
|
-
__exitChildren();
|
|
80
|
-
return __el0;
|
|
81
|
-
})();
|
|
82
|
-
__flushMountFrame();
|
|
83
|
-
return __mfResult0;
|
|
84
|
-
} catch (__mfErr) {
|
|
85
|
-
__discardMountFrame(__mfDepth);
|
|
86
|
-
throw __mfErr;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function TabsContent(__props) {
|
|
90
|
-
const __mfDepth = __pushMountFrame();
|
|
91
|
-
try {
|
|
92
|
-
const ctx = useTabsContext("Content");
|
|
93
|
-
const isActive = computed(() => ctx.activeValue === __props.value);
|
|
94
|
-
const __mfResult0 = (() => {
|
|
95
|
-
const __el0 = __element("div");
|
|
96
|
-
__el0.setAttribute("role", "tabpanel");
|
|
97
|
-
__attr(__el0, "id", () => ctx.getPanelIdFor(__props.value));
|
|
98
|
-
__el0.setAttribute("data-tabs-panel", "");
|
|
99
|
-
__attr(__el0, "data-value", () => __props.value);
|
|
100
|
-
__attr(__el0, "aria-labelledby", () => ctx.getTriggerIdFor(__props.value));
|
|
101
|
-
__el0.setAttribute("tabindex", "0");
|
|
102
|
-
__attr(__el0, "aria-hidden", () => isActive.value ? "false" : "true");
|
|
103
|
-
__attr(__el0, "data-state", () => isActive.value ? "active" : "inactive");
|
|
104
|
-
__attr(__el0, "style", () => ({ display: isActive.value ? "" : "none" }));
|
|
105
|
-
__attr(__el0, "class", () => cn(ctx.classes?.panel, __props.className ?? __props.class));
|
|
106
|
-
__enterChildren(__el0);
|
|
107
|
-
__append(__el0, __child(() => __props.children));
|
|
108
|
-
__exitChildren();
|
|
109
|
-
return __el0;
|
|
110
|
-
})();
|
|
111
|
-
__flushMountFrame();
|
|
112
|
-
return __mfResult0;
|
|
113
|
-
} catch (__mfErr) {
|
|
114
|
-
__discardMountFrame(__mfDepth);
|
|
115
|
-
throw __mfErr;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
function ComposedTabsRoot(__props) {
|
|
119
|
-
const __mfDepth = __pushMountFrame();
|
|
120
|
-
try {
|
|
121
|
-
let select = function(value) {
|
|
122
|
-
activeValue.value = value;
|
|
123
|
-
__props.onValueChange?.(value);
|
|
124
|
-
}, getTriggerIdFor = function(value) {
|
|
125
|
-
return `${baseId}-trigger-${value}`;
|
|
126
|
-
}, getPanelIdFor = function(value) {
|
|
127
|
-
return `${baseId}-panel-${value}`;
|
|
128
|
-
};
|
|
129
|
-
const baseId = uniqueId("tabs");
|
|
130
|
-
const activeValue = signal(__props.defaultValue ?? "", "activeValue");
|
|
131
|
-
const ctx = {
|
|
132
|
-
activeValue,
|
|
133
|
-
classes: __props.classes,
|
|
134
|
-
orientation: __props.orientation ?? "horizontal",
|
|
135
|
-
select,
|
|
136
|
-
getTriggerIdFor,
|
|
137
|
-
getPanelIdFor
|
|
138
|
-
};
|
|
139
|
-
const __mfResult0 = TabsContext.Provider({ get value() {
|
|
140
|
-
return ctx;
|
|
141
|
-
}, children: () => (() => {
|
|
142
|
-
const __el0 = __element("div");
|
|
143
|
-
__el0.setAttribute("data-tabs-root", "");
|
|
144
|
-
__enterChildren(__el0);
|
|
145
|
-
__append(__el0, __child(() => __props.children));
|
|
146
|
-
__exitChildren();
|
|
147
|
-
return __el0;
|
|
148
|
-
})() });
|
|
149
|
-
__flushMountFrame();
|
|
150
|
-
return __mfResult0;
|
|
151
|
-
} catch (__mfErr) {
|
|
152
|
-
__discardMountFrame(__mfDepth);
|
|
153
|
-
throw __mfErr;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
var ComposedTabs = Object.assign(ComposedTabsRoot, {
|
|
157
|
-
List: TabsList,
|
|
158
|
-
Trigger: TabsTrigger,
|
|
159
|
-
Content: TabsContent
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
export { ComposedTabs };
|