@vertz/ui-primitives 0.2.38 → 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-fdse46x5.js +21 -0
- 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-r3pffzss.js +0 -13
- 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,112 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
|
|
5
|
-
// src/empty-state/empty-state-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 EmptyStateContext = createContext(undefined, "@vertz/ui-primitives::EmptyStateContext");
|
|
9
|
-
function EmptyStateIcon(__props) {
|
|
10
|
-
const __mfDepth = __pushMountFrame();
|
|
11
|
-
try {
|
|
12
|
-
const ctx = useContext(EmptyStateContext);
|
|
13
|
-
const __mfResult0 = (() => {
|
|
14
|
-
const __el0 = __element("div");
|
|
15
|
-
__attr(__el0, "class", () => cn(ctx?.classes?.icon, __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 EmptyStateTitle(__props) {
|
|
29
|
-
const __mfDepth = __pushMountFrame();
|
|
30
|
-
try {
|
|
31
|
-
const ctx = useContext(EmptyStateContext);
|
|
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 EmptyStateDescription(__props) {
|
|
48
|
-
const __mfDepth = __pushMountFrame();
|
|
49
|
-
try {
|
|
50
|
-
const ctx = useContext(EmptyStateContext);
|
|
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 EmptyStateAction(__props) {
|
|
67
|
-
const __mfDepth = __pushMountFrame();
|
|
68
|
-
try {
|
|
69
|
-
const ctx = useContext(EmptyStateContext);
|
|
70
|
-
const __mfResult0 = (() => {
|
|
71
|
-
const __el0 = __element("div");
|
|
72
|
-
__attr(__el0, "class", () => cn(ctx?.classes?.action, __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 ComposedEmptyStateRoot(__props) {
|
|
86
|
-
const __mfDepth = __pushMountFrame();
|
|
87
|
-
try {
|
|
88
|
-
const __mfResult0 = EmptyStateContext.Provider({ get value() {
|
|
89
|
-
return { classes: __props.classes };
|
|
90
|
-
}, children: () => (() => {
|
|
91
|
-
const __el0 = __element("div");
|
|
92
|
-
__attr(__el0, "class", () => cn(__props.classes?.root, __props.className ?? __props.class));
|
|
93
|
-
__enterChildren(__el0);
|
|
94
|
-
__append(__el0, __child(() => __props.children));
|
|
95
|
-
__exitChildren();
|
|
96
|
-
return __el0;
|
|
97
|
-
})() });
|
|
98
|
-
__flushMountFrame();
|
|
99
|
-
return __mfResult0;
|
|
100
|
-
} catch (__mfErr) {
|
|
101
|
-
__discardMountFrame(__mfDepth);
|
|
102
|
-
throw __mfErr;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
var ComposedEmptyState = Object.assign(ComposedEmptyStateRoot, {
|
|
106
|
-
Icon: EmptyStateIcon,
|
|
107
|
-
Title: EmptyStateTitle,
|
|
108
|
-
Description: EmptyStateDescription,
|
|
109
|
-
Action: EmptyStateAction
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
export { ComposedEmptyState };
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createDismiss
|
|
3
|
-
} from "./chunk-a6wp8c32.js";
|
|
4
|
-
import {
|
|
5
|
-
createFloatingPosition
|
|
6
|
-
} from "./chunk-vef3sepw.js";
|
|
7
|
-
import {
|
|
8
|
-
setRovingTabindex
|
|
9
|
-
} from "./chunk-e2v1c9ex.js";
|
|
10
|
-
import {
|
|
11
|
-
linkedIds
|
|
12
|
-
} from "./chunk-8y1jf6xr.js";
|
|
13
|
-
import {
|
|
14
|
-
Keys,
|
|
15
|
-
handleListNavigation,
|
|
16
|
-
isKey
|
|
17
|
-
} from "./chunk-7867pr13.js";
|
|
18
|
-
import {
|
|
19
|
-
setDataState,
|
|
20
|
-
setExpanded,
|
|
21
|
-
setHidden,
|
|
22
|
-
setHiddenAnimated
|
|
23
|
-
} from "./chunk-vevfhpc9.js";
|
|
24
|
-
import {
|
|
25
|
-
applyAttrs
|
|
26
|
-
} from "./chunk-2db2dnp3.js";
|
|
27
|
-
|
|
28
|
-
// src/menubar/menubar.tsx
|
|
29
|
-
import { __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __insert, __on, __pushMountFrame, __styleStr } from "@vertz/ui/internals";
|
|
30
|
-
import { signal } from "@vertz/ui";
|
|
31
|
-
function MenubarRoot(options = {}) {
|
|
32
|
-
const __mfDepth = __pushMountFrame();
|
|
33
|
-
try {
|
|
34
|
-
let handleClickOutside = function(event) {
|
|
35
|
-
const target = event.target;
|
|
36
|
-
if (!root.contains(target)) {
|
|
37
|
-
closeAll();
|
|
38
|
-
}
|
|
39
|
-
}, closeAll = function() {
|
|
40
|
-
for (const [, menu] of menus) {
|
|
41
|
-
setExpanded(menu.trigger, false);
|
|
42
|
-
setDataState(menu.trigger, "closed");
|
|
43
|
-
setDataState(menu.content, "closed");
|
|
44
|
-
setHiddenAnimated(menu.content, true);
|
|
45
|
-
}
|
|
46
|
-
state.activeMenu.value = null;
|
|
47
|
-
if (positioning) {
|
|
48
|
-
floatingCleanup?.();
|
|
49
|
-
floatingCleanup = null;
|
|
50
|
-
dismissCleanup?.();
|
|
51
|
-
dismissCleanup = null;
|
|
52
|
-
} else {
|
|
53
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
54
|
-
}
|
|
55
|
-
}, openMenu = function(value) {
|
|
56
|
-
const current = state.activeMenu.peek();
|
|
57
|
-
if (current && current !== value) {
|
|
58
|
-
const prev = menus.get(current);
|
|
59
|
-
if (prev) {
|
|
60
|
-
setExpanded(prev.trigger, false);
|
|
61
|
-
setDataState(prev.trigger, "closed");
|
|
62
|
-
setDataState(prev.content, "closed");
|
|
63
|
-
setHiddenAnimated(prev.content, true);
|
|
64
|
-
}
|
|
65
|
-
if (positioning) {
|
|
66
|
-
floatingCleanup?.();
|
|
67
|
-
floatingCleanup = null;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
const menu = menus.get(value);
|
|
71
|
-
if (!menu)
|
|
72
|
-
return;
|
|
73
|
-
state.activeMenu.value = value;
|
|
74
|
-
setExpanded(menu.trigger, true);
|
|
75
|
-
setHidden(menu.content, false);
|
|
76
|
-
setDataState(menu.trigger, "open");
|
|
77
|
-
setDataState(menu.content, "open");
|
|
78
|
-
if (positioning) {
|
|
79
|
-
const result = createFloatingPosition(menu.trigger, menu.content, positioning);
|
|
80
|
-
floatingCleanup = result.cleanup;
|
|
81
|
-
if (!dismissCleanup) {
|
|
82
|
-
dismissCleanup = createDismiss({
|
|
83
|
-
onDismiss: closeAll,
|
|
84
|
-
insideElements: [root],
|
|
85
|
-
escapeKey: false
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
} else {
|
|
89
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
90
|
-
}
|
|
91
|
-
const firstItem = menu.items[0];
|
|
92
|
-
if (firstItem) {
|
|
93
|
-
firstItem.setAttribute("tabindex", "0");
|
|
94
|
-
firstItem.focus();
|
|
95
|
-
}
|
|
96
|
-
}, Menu = function(value, label) {
|
|
97
|
-
const ids = linkedIds("menubar-menu");
|
|
98
|
-
const menuItems = [];
|
|
99
|
-
const trigger = (() => {
|
|
100
|
-
const __el1 = __element("button");
|
|
101
|
-
__el1.setAttribute("type", "button");
|
|
102
|
-
__el1.setAttribute("role", "menuitem");
|
|
103
|
-
{
|
|
104
|
-
const __v = ids.triggerId;
|
|
105
|
-
if (__v != null && __v !== false)
|
|
106
|
-
__el1.setAttribute("id", __v === true ? "" : __v);
|
|
107
|
-
}
|
|
108
|
-
{
|
|
109
|
-
const __v = ids.contentId;
|
|
110
|
-
if (__v != null && __v !== false)
|
|
111
|
-
__el1.setAttribute("aria-controls", __v === true ? "" : __v);
|
|
112
|
-
}
|
|
113
|
-
__el1.setAttribute("aria-haspopup", "menu");
|
|
114
|
-
{
|
|
115
|
-
const __v = value;
|
|
116
|
-
if (__v != null && __v !== false)
|
|
117
|
-
__el1.setAttribute("data-value", __v === true ? "" : __v);
|
|
118
|
-
}
|
|
119
|
-
__el1.setAttribute("aria-expanded", "false");
|
|
120
|
-
__el1.setAttribute("data-state", "closed");
|
|
121
|
-
__on(__el1, "click", () => {
|
|
122
|
-
if (state.activeMenu.peek() === value) {
|
|
123
|
-
closeAll();
|
|
124
|
-
} else {
|
|
125
|
-
openMenu(value);
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
__on(__el1, "keydown", (event) => {
|
|
129
|
-
if (isKey(event, Keys.ArrowDown, Keys.Enter, Keys.Space)) {
|
|
130
|
-
event.preventDefault();
|
|
131
|
-
openMenu(value);
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
__enterChildren(__el1);
|
|
135
|
-
__insert(__el1, label ?? value);
|
|
136
|
-
__exitChildren();
|
|
137
|
-
return __el1;
|
|
138
|
-
})();
|
|
139
|
-
setRovingTabindex(triggers.concat(trigger), triggers.length);
|
|
140
|
-
const content = (() => {
|
|
141
|
-
const __el2 = __element("div");
|
|
142
|
-
__el2.setAttribute("role", "menu");
|
|
143
|
-
{
|
|
144
|
-
const __v = ids.contentId;
|
|
145
|
-
if (__v != null && __v !== false)
|
|
146
|
-
__el2.setAttribute("id", __v === true ? "" : __v);
|
|
147
|
-
}
|
|
148
|
-
__el2.setAttribute("aria-hidden", "true");
|
|
149
|
-
__el2.setAttribute("data-state", "closed");
|
|
150
|
-
{
|
|
151
|
-
const __v = { display: "none" };
|
|
152
|
-
if (__v != null && __v !== false)
|
|
153
|
-
__el2.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
154
|
-
}
|
|
155
|
-
__on(__el2, "keydown", (event) => {
|
|
156
|
-
if (isKey(event, Keys.Escape)) {
|
|
157
|
-
event.preventDefault();
|
|
158
|
-
event.stopPropagation();
|
|
159
|
-
closeAll();
|
|
160
|
-
trigger.focus();
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
if (isKey(event, Keys.Enter, Keys.Space)) {
|
|
164
|
-
event.preventDefault();
|
|
165
|
-
const active = document.activeElement;
|
|
166
|
-
const activeItem = menuItems.find((item) => item === active);
|
|
167
|
-
if (activeItem) {
|
|
168
|
-
const val = activeItem.getAttribute("data-value");
|
|
169
|
-
if (val !== null) {
|
|
170
|
-
onSelect?.(val);
|
|
171
|
-
closeAll();
|
|
172
|
-
trigger.focus();
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
if (isKey(event, Keys.ArrowLeft, Keys.ArrowRight)) {
|
|
178
|
-
event.preventDefault();
|
|
179
|
-
const triggerIdx = triggers.indexOf(trigger);
|
|
180
|
-
let nextIdx;
|
|
181
|
-
if (isKey(event, Keys.ArrowRight)) {
|
|
182
|
-
nextIdx = (triggerIdx + 1) % triggers.length;
|
|
183
|
-
} else {
|
|
184
|
-
nextIdx = (triggerIdx - 1 + triggers.length) % triggers.length;
|
|
185
|
-
}
|
|
186
|
-
const nextTrigger = triggers[nextIdx];
|
|
187
|
-
if (nextTrigger) {
|
|
188
|
-
nextTrigger.focus();
|
|
189
|
-
const nextValue = nextTrigger.getAttribute("data-value");
|
|
190
|
-
if (nextValue)
|
|
191
|
-
openMenu(nextValue);
|
|
192
|
-
}
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
handleListNavigation(event, menuItems, { orientation: "vertical" });
|
|
196
|
-
});
|
|
197
|
-
return __el2;
|
|
198
|
-
})();
|
|
199
|
-
function createItem(val, itemLabel) {
|
|
200
|
-
const item = (() => {
|
|
201
|
-
const __el3 = __element("div");
|
|
202
|
-
__el3.setAttribute("role", "menuitem");
|
|
203
|
-
{
|
|
204
|
-
const __v = val;
|
|
205
|
-
if (__v != null && __v !== false)
|
|
206
|
-
__el3.setAttribute("data-value", __v === true ? "" : __v);
|
|
207
|
-
}
|
|
208
|
-
__el3.setAttribute("tabindex", "-1");
|
|
209
|
-
__on(__el3, "click", () => {
|
|
210
|
-
onSelect?.(val);
|
|
211
|
-
closeAll();
|
|
212
|
-
trigger.focus();
|
|
213
|
-
});
|
|
214
|
-
__enterChildren(__el3);
|
|
215
|
-
__insert(__el3, itemLabel ?? val);
|
|
216
|
-
__exitChildren();
|
|
217
|
-
return __el3;
|
|
218
|
-
})();
|
|
219
|
-
menuItems.push(item);
|
|
220
|
-
return item;
|
|
221
|
-
}
|
|
222
|
-
function Item(val, itemLabel) {
|
|
223
|
-
return createItem(val, itemLabel);
|
|
224
|
-
}
|
|
225
|
-
function Group(groupLabel) {
|
|
226
|
-
const el = (() => {
|
|
227
|
-
const __el4 = __element("div");
|
|
228
|
-
__el4.setAttribute("role", "group");
|
|
229
|
-
{
|
|
230
|
-
const __v = groupLabel;
|
|
231
|
-
if (__v != null && __v !== false)
|
|
232
|
-
__el4.setAttribute("aria-label", __v === true ? "" : __v);
|
|
233
|
-
}
|
|
234
|
-
return __el4;
|
|
235
|
-
})();
|
|
236
|
-
return {
|
|
237
|
-
el,
|
|
238
|
-
Item: (val, l) => createItem(val, l)
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
function Separator() {
|
|
242
|
-
return (() => {
|
|
243
|
-
const __el5 = __element("hr");
|
|
244
|
-
__el5.setAttribute("data-v-id", "MenubarRoot");
|
|
245
|
-
__el5.setAttribute("role", "separator");
|
|
246
|
-
return __el5;
|
|
247
|
-
})();
|
|
248
|
-
}
|
|
249
|
-
triggers.push(trigger);
|
|
250
|
-
setRovingTabindex(triggers, 0);
|
|
251
|
-
menus.set(value, { trigger, content, items: menuItems });
|
|
252
|
-
return { trigger, content, Item, Group, Separator };
|
|
253
|
-
};
|
|
254
|
-
const { onSelect, positioning, ...attrs } = options;
|
|
255
|
-
const state = { activeMenu: signal(null) };
|
|
256
|
-
const triggers = [];
|
|
257
|
-
const menus = new Map;
|
|
258
|
-
let floatingCleanup = null;
|
|
259
|
-
let dismissCleanup = null;
|
|
260
|
-
const root = (() => {
|
|
261
|
-
const __el0 = __element("div");
|
|
262
|
-
__el0.setAttribute("role", "menubar");
|
|
263
|
-
__on(__el0, "keydown", (event) => {
|
|
264
|
-
if (isKey(event, Keys.ArrowLeft, Keys.ArrowRight, Keys.Home, Keys.End)) {
|
|
265
|
-
const focused = document.activeElement;
|
|
266
|
-
const triggerIndex = triggers.indexOf(focused);
|
|
267
|
-
if (triggerIndex >= 0) {
|
|
268
|
-
const result = handleListNavigation(event, triggers, { orientation: "horizontal" });
|
|
269
|
-
if (result && state.activeMenu.peek()) {
|
|
270
|
-
const newTrigger = result;
|
|
271
|
-
const menuValue = newTrigger.getAttribute("data-value");
|
|
272
|
-
if (menuValue)
|
|
273
|
-
openMenu(menuValue);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
return __el0;
|
|
279
|
-
})();
|
|
280
|
-
applyAttrs(root, attrs);
|
|
281
|
-
const __mfResult0 = { root, state, Menu };
|
|
282
|
-
__flushMountFrame();
|
|
283
|
-
return __mfResult0;
|
|
284
|
-
} catch (__mfErr) {
|
|
285
|
-
__discardMountFrame(__mfDepth);
|
|
286
|
-
throw __mfErr;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
var Menubar = {
|
|
290
|
-
Root: MenubarRoot
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
export { Menubar };
|
|
@@ -1,185 +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/tooltip/tooltip-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 TooltipContext = createContext(undefined, "@vertz/ui-primitives::TooltipContext");
|
|
17
|
-
function useTooltipContext(componentName) {
|
|
18
|
-
const ctx = useContext(TooltipContext);
|
|
19
|
-
if (!ctx) {
|
|
20
|
-
throw new Error(`<Tooltip.${componentName}> must be used inside <Tooltip>. ` + "Ensure it is a direct or nested child of the Tooltip root component.");
|
|
21
|
-
}
|
|
22
|
-
return ctx;
|
|
23
|
-
}
|
|
24
|
-
function TooltipTrigger(__props) {
|
|
25
|
-
const __mfDepth = __pushMountFrame();
|
|
26
|
-
try {
|
|
27
|
-
const ctx = useTooltipContext("Trigger");
|
|
28
|
-
const idx = ctx._triggerCount.value++;
|
|
29
|
-
if (idx > 0)
|
|
30
|
-
console.warn("Duplicate <Tooltip.Trigger> detected – only the first is used");
|
|
31
|
-
const childNodes = computed(() => Array.isArray(__props.children) ? __props.children : [__props.children]);
|
|
32
|
-
const childEl = computed(() => childNodes.value.find((c) => c instanceof HTMLElement));
|
|
33
|
-
if (childEl.value) {
|
|
34
|
-
childEl.value.setAttribute("aria-describedby", ctx.contentId);
|
|
35
|
-
}
|
|
36
|
-
const __mfResult0 = (() => {
|
|
37
|
-
const __el0 = __element("span");
|
|
38
|
-
{
|
|
39
|
-
const __v = { display: "contents" };
|
|
40
|
-
if (__v != null && __v !== false)
|
|
41
|
-
__el0.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
42
|
-
}
|
|
43
|
-
__el0.setAttribute("data-tooltip-trigger", "");
|
|
44
|
-
{
|
|
45
|
-
const __v = ctx.contentId;
|
|
46
|
-
if (__v != null && __v !== false)
|
|
47
|
-
__el0.setAttribute("aria-describedby", __v === true ? "" : __v);
|
|
48
|
-
}
|
|
49
|
-
__on(__el0, "mouseenter", () => ctx.show());
|
|
50
|
-
__on(__el0, "mouseleave", () => ctx.hide());
|
|
51
|
-
__on(__el0, "focus", () => ctx.show());
|
|
52
|
-
__on(__el0, "blur", () => ctx.hide());
|
|
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 TooltipContent(__props) {
|
|
66
|
-
const __mfDepth = __pushMountFrame();
|
|
67
|
-
try {
|
|
68
|
-
const ctx = useTooltipContext("Content");
|
|
69
|
-
const idx = ctx._contentCount.value++;
|
|
70
|
-
if (idx > 0)
|
|
71
|
-
console.warn("Duplicate <Tooltip.Content> detected – only the first is used");
|
|
72
|
-
const isOpen = ctx.isOpen();
|
|
73
|
-
const __mfResult0 = (() => {
|
|
74
|
-
const __el0 = __element("div");
|
|
75
|
-
ctx.contentRef.current = __el0;
|
|
76
|
-
__el0.setAttribute("role", "tooltip");
|
|
77
|
-
{
|
|
78
|
-
const __v = ctx.contentId;
|
|
79
|
-
if (__v != null && __v !== false)
|
|
80
|
-
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
81
|
-
}
|
|
82
|
-
__el0.setAttribute("data-tooltip-content", "");
|
|
83
|
-
{
|
|
84
|
-
const __v = isOpen ? "false" : "true";
|
|
85
|
-
if (__v != null && __v !== false)
|
|
86
|
-
__el0.setAttribute("aria-hidden", __v === true ? "" : __v);
|
|
87
|
-
}
|
|
88
|
-
{
|
|
89
|
-
const __v = isOpen ? "open" : "closed";
|
|
90
|
-
if (__v != null && __v !== false)
|
|
91
|
-
__el0.setAttribute("data-state", __v === true ? "" : __v);
|
|
92
|
-
}
|
|
93
|
-
{
|
|
94
|
-
const __v = { display: isOpen ? "" : "none" };
|
|
95
|
-
if (__v != null && __v !== false)
|
|
96
|
-
__el0.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
97
|
-
}
|
|
98
|
-
__attr(__el0, "class", () => cn(ctx.classes?.content, __props.className ?? __props.class));
|
|
99
|
-
__enterChildren(__el0);
|
|
100
|
-
__append(__el0, __child(() => __props.children));
|
|
101
|
-
__exitChildren();
|
|
102
|
-
return __el0;
|
|
103
|
-
})();
|
|
104
|
-
__flushMountFrame();
|
|
105
|
-
return __mfResult0;
|
|
106
|
-
} catch (__mfErr) {
|
|
107
|
-
__discardMountFrame(__mfDepth);
|
|
108
|
-
throw __mfErr;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function ComposedTooltipRoot(__props) {
|
|
112
|
-
const __mfDepth = __pushMountFrame();
|
|
113
|
-
try {
|
|
114
|
-
let applyPositioning = function() {
|
|
115
|
-
const content = contentRef.current;
|
|
116
|
-
const triggerSpan = content?.parentElement?.querySelector("[data-tooltip-trigger]");
|
|
117
|
-
if (!triggerSpan || !content)
|
|
118
|
-
return;
|
|
119
|
-
const trigger = resolveLayoutElement(triggerSpan);
|
|
120
|
-
content.style.position = "fixed";
|
|
121
|
-
const floatingOpts = __props.positioning ?? { placement: "top", offset: 4 };
|
|
122
|
-
const result = createFloatingPosition(trigger, content, floatingOpts);
|
|
123
|
-
state.floatingCleanup = result.cleanup;
|
|
124
|
-
}, show = function() {
|
|
125
|
-
if (state.showTimeout !== null)
|
|
126
|
-
return;
|
|
127
|
-
state.showTimeout = setTimeout(() => {
|
|
128
|
-
state.showTimeout = null;
|
|
129
|
-
isOpen.value = true;
|
|
130
|
-
applyPositioning();
|
|
131
|
-
}, __props.delay ?? 300);
|
|
132
|
-
}, hide = function() {
|
|
133
|
-
if (state.showTimeout !== null) {
|
|
134
|
-
clearTimeout(state.showTimeout);
|
|
135
|
-
state.showTimeout = null;
|
|
136
|
-
}
|
|
137
|
-
isOpen.value = false;
|
|
138
|
-
state.floatingCleanup?.();
|
|
139
|
-
state.floatingCleanup = null;
|
|
140
|
-
};
|
|
141
|
-
const contentId = uniqueId("tooltip");
|
|
142
|
-
const contentRef = ref();
|
|
143
|
-
const isOpen = signal(false, "isOpen");
|
|
144
|
-
const state = {
|
|
145
|
-
showTimeout: null,
|
|
146
|
-
floatingCleanup: null
|
|
147
|
-
};
|
|
148
|
-
const ctx = {
|
|
149
|
-
isOpen: () => isOpen.value,
|
|
150
|
-
contentId,
|
|
151
|
-
contentRef,
|
|
152
|
-
classes: __props.classes,
|
|
153
|
-
show,
|
|
154
|
-
hide,
|
|
155
|
-
_triggerCount: { value: 0 },
|
|
156
|
-
_contentCount: { value: 0 }
|
|
157
|
-
};
|
|
158
|
-
const __mfResult0 = TooltipContext.Provider({ get value() {
|
|
159
|
-
return ctx;
|
|
160
|
-
}, children: () => (() => {
|
|
161
|
-
const __el0 = __element("span");
|
|
162
|
-
{
|
|
163
|
-
const __v = { display: "contents" };
|
|
164
|
-
if (__v != null && __v !== false)
|
|
165
|
-
__el0.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
166
|
-
}
|
|
167
|
-
__el0.setAttribute("data-tooltip-root", "");
|
|
168
|
-
__enterChildren(__el0);
|
|
169
|
-
__append(__el0, __child(() => __props.children));
|
|
170
|
-
__exitChildren();
|
|
171
|
-
return __el0;
|
|
172
|
-
})() });
|
|
173
|
-
__flushMountFrame();
|
|
174
|
-
return __mfResult0;
|
|
175
|
-
} catch (__mfErr) {
|
|
176
|
-
__discardMountFrame(__mfDepth);
|
|
177
|
-
throw __mfErr;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
var ComposedTooltip = Object.assign(ComposedTooltipRoot, {
|
|
181
|
-
Trigger: TooltipTrigger,
|
|
182
|
-
Content: TooltipContent
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
export { ComposedTooltip };
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
|
|
5
|
-
// src/avatar/avatar-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 AvatarContext = createContext(undefined, "@vertz/ui-primitives::AvatarContext");
|
|
9
|
-
function AvatarImage(__props) {
|
|
10
|
-
const __mfDepth = __pushMountFrame();
|
|
11
|
-
try {
|
|
12
|
-
const ctx = useContext(AvatarContext);
|
|
13
|
-
const __mfResult0 = (() => {
|
|
14
|
-
const __el0 = __element("img");
|
|
15
|
-
__attr(__el0, "src", () => __props.src);
|
|
16
|
-
__attr(__el0, "alt", () => __props.alt);
|
|
17
|
-
__attr(__el0, "class", () => cn(ctx?.classes?.image, __props.className ?? __props.class));
|
|
18
|
-
return __el0;
|
|
19
|
-
})();
|
|
20
|
-
__flushMountFrame();
|
|
21
|
-
return __mfResult0;
|
|
22
|
-
} catch (__mfErr) {
|
|
23
|
-
__discardMountFrame(__mfDepth);
|
|
24
|
-
throw __mfErr;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function AvatarFallback(__props) {
|
|
28
|
-
const __mfDepth = __pushMountFrame();
|
|
29
|
-
try {
|
|
30
|
-
const ctx = useContext(AvatarContext);
|
|
31
|
-
const __mfResult0 = (() => {
|
|
32
|
-
const __el0 = __element("div");
|
|
33
|
-
__attr(__el0, "class", () => cn(ctx?.classes?.fallback, __props.className ?? __props.class));
|
|
34
|
-
__enterChildren(__el0);
|
|
35
|
-
__append(__el0, __child(() => __props.children));
|
|
36
|
-
__exitChildren();
|
|
37
|
-
return __el0;
|
|
38
|
-
})();
|
|
39
|
-
__flushMountFrame();
|
|
40
|
-
return __mfResult0;
|
|
41
|
-
} catch (__mfErr) {
|
|
42
|
-
__discardMountFrame(__mfDepth);
|
|
43
|
-
throw __mfErr;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function ComposedAvatarRoot(__props) {
|
|
47
|
-
const __mfDepth = __pushMountFrame();
|
|
48
|
-
try {
|
|
49
|
-
const __mfResult0 = AvatarContext.Provider({ get value() {
|
|
50
|
-
return { classes: __props.classes };
|
|
51
|
-
}, children: () => (() => {
|
|
52
|
-
const __el0 = __element("div");
|
|
53
|
-
__attr(__el0, "class", () => cn(__props.classes?.root, __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
|
-
var ComposedAvatar = Object.assign(ComposedAvatarRoot, {
|
|
67
|
-
Image: AvatarImage,
|
|
68
|
-
Fallback: AvatarFallback
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
export { ComposedAvatar };
|