@vertz/ui-primitives 0.2.23 → 0.2.24
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-pzx0vpq1.js → chunk-00fqgnq1.js} +6 -11
- package/dist/shared/chunk-1hm0mbke.js +258 -0
- package/dist/shared/{chunk-ww7k2azn.js → chunk-20kwns82.js} +5 -9
- package/dist/shared/chunk-3jack97k.js +509 -0
- package/dist/shared/{chunk-xs6gp369.js → chunk-455p0jbk.js} +3 -7
- package/dist/shared/chunk-4gyg71bn.js +178 -0
- package/dist/shared/chunk-4z006v1j.js +467 -0
- package/dist/shared/{chunk-b25npqer.js → chunk-585ysr70.js} +1 -1
- package/dist/shared/chunk-75pegjs7.js +26 -0
- package/dist/shared/{chunk-mr1tb0dp.js → chunk-7a2nqmeh.js} +1 -1
- package/dist/shared/chunk-7wem1bhb.js +252 -0
- package/dist/shared/{chunk-7cb3z0s8.js → chunk-8evj43jn.js} +5 -8
- package/dist/shared/chunk-8t0nm721.js +152 -0
- package/dist/shared/chunk-94twh4s4.js +28 -0
- package/dist/shared/chunk-98y1sw9y.js +398 -0
- package/dist/shared/chunk-9eedsnnk.js +164 -0
- package/dist/shared/{chunk-8c01c8mb.js → chunk-9hv3vc72.js} +0 -2
- package/dist/shared/chunk-aa3w85hn.js +321 -0
- package/dist/shared/chunk-axpbdpgx.js +177 -0
- package/dist/shared/chunk-b4zzg457.js +410 -0
- package/dist/shared/chunk-brk0drrk.js +202 -0
- package/dist/shared/chunk-czv0kqj4.js +107 -0
- package/dist/shared/chunk-d83ag07h.js +189 -0
- package/dist/shared/{chunk-3kwh27dv.js → chunk-de18ashk.js} +0 -1
- package/dist/shared/{chunk-cgb2j94g.js → chunk-dvk4h36t.js} +0 -1
- package/dist/shared/chunk-e6660g7e.js +179 -0
- package/dist/shared/{chunk-3h1mxp95.js → chunk-eq4d9b0w.js} +0 -1
- package/dist/shared/chunk-ev367pq3.js +102 -0
- package/dist/shared/{chunk-4894pmy6.js → chunk-f0wy7k56.js} +0 -1
- package/dist/shared/chunk-fjykbv0v.js +214 -0
- package/dist/shared/chunk-ghkw5bjq.js +55 -0
- package/dist/shared/chunk-gqb1n1hj.js +60 -0
- package/dist/shared/chunk-hfjtkytb.js +310 -0
- package/dist/shared/chunk-hpvjfj0j.js +31 -0
- package/dist/shared/chunk-hxmxvp56.js +67 -0
- package/dist/shared/chunk-j9m2f0rd.js +162 -0
- package/dist/shared/chunk-jpyjk616.js +52 -0
- package/dist/shared/{chunk-ttb2tt03.js → chunk-jsa3byag.js} +1 -1
- package/dist/shared/{chunk-9gfp3ffv.js → chunk-jzy1bkdk.js} +0 -1
- package/dist/shared/{chunk-f2vx4tpw.js → chunk-knzg86am.js} +5 -5
- package/dist/shared/chunk-kskxxc2q.js +228 -0
- package/dist/shared/chunk-metxdt5x.js +28 -0
- package/dist/shared/chunk-mhn2aazf.js +353 -0
- package/dist/shared/chunk-mtx2cfbx.js +175 -0
- package/dist/shared/chunk-nsmvdxgp.js +213 -0
- package/dist/shared/{chunk-pn6shbcs.js → chunk-pdzmg245.js} +1 -5
- package/dist/shared/chunk-pzknpa1y.js +327 -0
- package/dist/shared/chunk-q1ff3xp3.js +95 -0
- package/dist/shared/chunk-q7xbcj9q.js +7 -0
- package/dist/shared/{chunk-p0x7hgv6.js → chunk-qhnany7w.js} +0 -2
- package/dist/shared/chunk-qrm43tr3.js +357 -0
- package/dist/shared/{chunk-xa1b96mb.js → chunk-qsp7sfhp.js} +2 -2
- package/dist/shared/{chunk-j902w020.js → chunk-qwqnjjg8.js} +1 -1
- package/dist/shared/{chunk-h3v10x04.js → chunk-r0rz7z03.js} +6 -11
- package/dist/shared/chunk-r3ngaa64.js +418 -0
- package/dist/shared/chunk-r3pffzss.js +13 -0
- package/dist/shared/chunk-rrt62bp0.js +353 -0
- package/dist/shared/chunk-s24gkmna.js +131 -0
- package/dist/shared/chunk-s62e7jf4.js +30 -0
- package/dist/shared/chunk-spng4yb9.js +73 -0
- package/dist/shared/chunk-v0b5pkcq.js +30 -0
- package/dist/shared/chunk-v11kd39k.js +162 -0
- package/dist/shared/{chunk-0mcr52hc.js → chunk-vef3sepw.js} +17 -1
- package/dist/shared/chunk-vkscwzpr.js +294 -0
- package/dist/shared/chunk-vv187snj.js +112 -0
- package/dist/shared/chunk-wqsek87j.js +311 -0
- package/dist/shared/chunk-wtkxz2te.js +157 -0
- package/dist/shared/chunk-y1hpsqzy.js +185 -0
- package/dist/shared/chunk-yfzddvxc.js +71 -0
- package/dist/src/accordion/accordion-composed.d.ts +30 -0
- package/dist/src/accordion/accordion-composed.js +6 -0
- package/dist/src/accordion/accordion.js +1 -1
- package/dist/src/alert/alert-composed.d.ts +26 -0
- package/dist/src/alert/alert-composed.js +6 -0
- package/dist/src/alert-dialog/alert-dialog-composed.d.ts +40 -0
- package/dist/src/alert-dialog/alert-dialog-composed.js +6 -0
- package/dist/src/avatar/avatar-composed.d.ts +33 -0
- package/dist/src/avatar/avatar-composed.js +6 -0
- package/dist/src/badge/badge-composed.d.ts +33 -0
- package/dist/src/badge/badge-composed.js +6 -0
- package/dist/src/breadcrumb/breadcrumb-composed.d.ts +34 -0
- package/dist/src/breadcrumb/breadcrumb-composed.js +6 -0
- package/dist/src/button/button-composed.d.ts +34 -0
- package/dist/src/button/button-composed.js +6 -0
- package/dist/src/calendar/calendar-composed.d.ts +42 -0
- package/dist/src/calendar/calendar-composed.js +6 -0
- package/dist/src/calendar/calendar.js +1 -1
- package/dist/src/card/card-composed.d.ts +34 -0
- package/dist/src/card/card-composed.js +6 -0
- package/dist/src/carousel/carousel-composed.d.ts +32 -0
- package/dist/src/carousel/carousel-composed.js +6 -0
- package/dist/src/carousel/carousel.js +1 -1
- package/dist/src/checkbox/checkbox-composed.d.ts +18 -0
- package/dist/src/checkbox/checkbox-composed.js +6 -0
- package/dist/src/collapsible/collapsible-composed.d.ts +26 -0
- package/dist/src/collapsible/collapsible-composed.js +6 -0
- package/dist/src/combobox/combobox-composed.d.ts +30 -0
- package/dist/src/combobox/combobox-composed.js +6 -0
- package/dist/src/combobox/combobox.js +1 -1
- package/dist/src/command/command-composed.d.ts +67 -0
- package/dist/src/command/command-composed.js +6 -0
- package/dist/src/command/command.js +1 -1
- package/dist/src/composed/with-styles.d.ts +38 -0
- package/dist/src/composed/with-styles.js +6 -0
- package/dist/src/context-menu/context-menu-composed.d.ts +51 -0
- package/dist/src/context-menu/context-menu-composed.js +6 -0
- package/dist/src/context-menu/context-menu.js +1 -1
- package/dist/src/date-picker/date-picker-composed.d.ts +77 -0
- package/dist/src/date-picker/date-picker-composed.js +6 -0
- package/dist/src/date-picker/date-picker.js +1 -1
- package/dist/src/dialog/dialog-composed.d.ts +36 -0
- package/dist/src/dialog/dialog-composed.js +6 -0
- package/dist/src/dialog/dialog-stack-parts.d.ts +16 -0
- package/dist/src/dialog/dialog-stack-parts.js +18 -0
- package/dist/src/dropdown-menu/dropdown-menu-composed.d.ts +51 -0
- package/dist/src/dropdown-menu/dropdown-menu-composed.js +6 -0
- package/dist/src/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/src/empty-state/empty-state-composed.d.ts +30 -0
- package/dist/src/empty-state/empty-state-composed.js +6 -0
- package/dist/src/form-group/form-group-composed.d.ts +24 -0
- package/dist/src/form-group/form-group-composed.js +6 -0
- package/dist/src/hover-card/hover-card-composed.d.ts +38 -0
- package/dist/src/hover-card/hover-card-composed.js +6 -0
- package/dist/src/hover-card/hover-card.js +1 -1
- package/dist/src/index.d.ts +1284 -817
- package/dist/src/index.js +78 -6566
- package/dist/src/input/input-composed.d.ts +35 -0
- package/dist/src/input/input-composed.js +6 -0
- package/dist/src/label/label-composed.d.ts +32 -0
- package/dist/src/label/label-composed.js +6 -0
- package/dist/src/menu/menu-composed.d.ts +51 -0
- package/dist/src/menu/menu-composed.js +6 -0
- package/dist/src/menu/menu.js +1 -1
- package/dist/src/menubar/menubar-composed.d.ts +56 -0
- package/dist/src/menubar/menubar-composed.js +6 -0
- package/dist/src/menubar/menubar.js +1 -1
- package/dist/src/navigation-menu/navigation-menu-composed.d.ts +56 -0
- package/dist/src/navigation-menu/navigation-menu-composed.js +6 -0
- package/dist/src/navigation-menu/navigation-menu.js +1 -1
- package/dist/src/pagination/pagination-composed.d.ts +30 -0
- package/dist/src/pagination/pagination-composed.js +6 -0
- package/dist/src/popover/popover-composed.d.ts +36 -0
- package/dist/src/popover/popover-composed.js +6 -0
- package/dist/src/popover/popover.js +1 -1
- package/dist/src/progress/progress-composed.d.ts +17 -0
- package/dist/src/progress/progress-composed.js +6 -0
- package/dist/src/radio/radio-composed.d.ts +24 -0
- package/dist/src/radio/radio-composed.js +6 -0
- package/dist/src/radio/radio.js +1 -1
- package/dist/src/resizable-panel/resizable-panel-composed.d.ts +33 -0
- package/dist/src/resizable-panel/resizable-panel-composed.js +6 -0
- package/dist/src/resizable-panel/resizable-panel.js +1 -1
- package/dist/src/scroll-area/scroll-area-composed.d.ts +17 -0
- package/dist/src/scroll-area/scroll-area-composed.js +6 -0
- package/dist/src/scroll-area/scroll-area.js +1 -1
- package/dist/src/select/select-composed.d.ts +53 -0
- package/dist/src/select/select-composed.js +6 -0
- package/dist/src/select/select.js +1 -1
- package/dist/src/separator/separator-composed.d.ts +32 -0
- package/dist/src/separator/separator-composed.js +6 -0
- package/dist/src/sheet/sheet-composed.d.ts +34 -0
- package/dist/src/sheet/sheet-composed.js +6 -0
- package/dist/src/skeleton/skeleton-composed.d.ts +65 -0
- package/dist/src/skeleton/skeleton-composed.js +6 -0
- package/dist/src/slider/slider-composed.d.ts +22 -0
- package/dist/src/slider/slider-composed.js +6 -0
- package/dist/src/switch/switch-composed.d.ts +17 -0
- package/dist/src/switch/switch-composed.js +6 -0
- package/dist/src/table/table-composed.d.ts +34 -0
- package/dist/src/table/table-composed.js +6 -0
- package/dist/src/tabs/tabs-composed.d.ts +33 -0
- package/dist/src/tabs/tabs-composed.js +6 -0
- package/dist/src/tabs/tabs.js +1 -1
- package/dist/src/textarea/textarea-composed.d.ts +35 -0
- package/dist/src/textarea/textarea-composed.js +6 -0
- package/dist/src/toast/toast.js +1 -1
- package/dist/src/toggle/toggle-composed.d.ts +16 -0
- package/dist/src/toggle/toggle-composed.js +6 -0
- package/dist/src/toggle-group/toggle-group-composed.d.ts +24 -0
- package/dist/src/toggle-group/toggle-group-composed.js +6 -0
- package/dist/src/toggle-group/toggle-group.js +1 -1
- package/dist/src/tooltip/tooltip-composed.d.ts +36 -0
- package/dist/src/tooltip/tooltip-composed.js +6 -0
- package/dist/src/tooltip/tooltip.js +1 -1
- package/dist/src/utils.js +1 -1
- package/package.json +3 -3
- package/dist/shared/chunk-56reyd5r.js +0 -64
- package/dist/shared/chunk-mgr904ap.js +0 -370
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-q7xbcj9q.js";
|
|
4
|
+
|
|
5
|
+
// src/skeleton/skeleton-composed.tsx
|
|
6
|
+
import { computed } from "@vertz/ui";
|
|
7
|
+
import { __attr, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __insert, __pushMountFrame, __styleStr } from "@vertz/ui/internals";
|
|
8
|
+
function ComposedSkeletonRoot(props = {}) {
|
|
9
|
+
const __mfDepth = __pushMountFrame();
|
|
10
|
+
try {
|
|
11
|
+
const classes = computed(() => props.classes);
|
|
12
|
+
const className = computed(() => props.className);
|
|
13
|
+
const classProp = computed(() => props.class);
|
|
14
|
+
const width = computed(() => props.width);
|
|
15
|
+
const height = computed(() => props.height);
|
|
16
|
+
const __mfResult0 = (() => {
|
|
17
|
+
const __el0 = __element("div");
|
|
18
|
+
__attr(__el0, "class", () => cn(classes.value?.root, className.value ?? classProp.value));
|
|
19
|
+
__el0.setAttribute("aria-hidden", "true");
|
|
20
|
+
__attr(__el0, "style", () => ({
|
|
21
|
+
width: width.value || undefined,
|
|
22
|
+
height: height.value || undefined
|
|
23
|
+
}));
|
|
24
|
+
return __el0;
|
|
25
|
+
})();
|
|
26
|
+
__flushMountFrame();
|
|
27
|
+
return __mfResult0;
|
|
28
|
+
} catch (__mfErr) {
|
|
29
|
+
__discardMountFrame(__mfDepth);
|
|
30
|
+
throw __mfErr;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function SkeletonText(props = {}) {
|
|
34
|
+
const __mfDepth = __pushMountFrame();
|
|
35
|
+
try {
|
|
36
|
+
const lineCount = computed(() => props.lines ?? 3);
|
|
37
|
+
const lastWidth = computed(() => props.lastLineWidth ?? "75%");
|
|
38
|
+
const lineHeight = computed(() => props.height);
|
|
39
|
+
const lines = [];
|
|
40
|
+
for (let i = 0;i < lineCount.value; i++) {
|
|
41
|
+
lines.push((() => {
|
|
42
|
+
const __el0 = __element("div");
|
|
43
|
+
{
|
|
44
|
+
const __v = cn(props.classes?.line);
|
|
45
|
+
if (__v != null && __v !== false)
|
|
46
|
+
__el0.setAttribute("class", __v === true ? "" : __v);
|
|
47
|
+
}
|
|
48
|
+
__attr(__el0, "style", () => ({
|
|
49
|
+
width: i === lineCount.value - 1 ? lastWidth.value : undefined,
|
|
50
|
+
height: lineHeight.value || undefined
|
|
51
|
+
}));
|
|
52
|
+
return __el0;
|
|
53
|
+
})());
|
|
54
|
+
}
|
|
55
|
+
const __mfResult0 = (() => {
|
|
56
|
+
const __el1 = __element("div");
|
|
57
|
+
{
|
|
58
|
+
const __v = cn(props.classes?.root, props.className ?? props.class);
|
|
59
|
+
if (__v != null && __v !== false)
|
|
60
|
+
__el1.setAttribute("class", __v === true ? "" : __v);
|
|
61
|
+
}
|
|
62
|
+
__el1.setAttribute("aria-hidden", "true");
|
|
63
|
+
{
|
|
64
|
+
const __v = { gap: props.gap || undefined };
|
|
65
|
+
if (__v != null && __v !== false)
|
|
66
|
+
__el1.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
67
|
+
}
|
|
68
|
+
__enterChildren(__el1);
|
|
69
|
+
__insert(__el1, lines);
|
|
70
|
+
__exitChildren();
|
|
71
|
+
return __el1;
|
|
72
|
+
})();
|
|
73
|
+
__flushMountFrame();
|
|
74
|
+
return __mfResult0;
|
|
75
|
+
} catch (__mfErr) {
|
|
76
|
+
__discardMountFrame(__mfDepth);
|
|
77
|
+
throw __mfErr;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function SkeletonCircle(props = {}) {
|
|
81
|
+
const __mfDepth = __pushMountFrame();
|
|
82
|
+
try {
|
|
83
|
+
const size = computed(() => props.size ?? "2.5rem");
|
|
84
|
+
const __mfResult0 = (() => {
|
|
85
|
+
const __el0 = __element("div");
|
|
86
|
+
{
|
|
87
|
+
const __v = cn(props.classes?.root, props.className ?? props.class);
|
|
88
|
+
if (__v != null && __v !== false)
|
|
89
|
+
__el0.setAttribute("class", __v === true ? "" : __v);
|
|
90
|
+
}
|
|
91
|
+
__el0.setAttribute("aria-hidden", "true");
|
|
92
|
+
__attr(__el0, "style", () => ({ width: size.value, height: size.value }));
|
|
93
|
+
return __el0;
|
|
94
|
+
})();
|
|
95
|
+
__flushMountFrame();
|
|
96
|
+
return __mfResult0;
|
|
97
|
+
} catch (__mfErr) {
|
|
98
|
+
__discardMountFrame(__mfDepth);
|
|
99
|
+
throw __mfErr;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
var ComposedSkeleton = Object.assign(ComposedSkeletonRoot, {
|
|
103
|
+
Text: SkeletonText,
|
|
104
|
+
Circle: SkeletonCircle
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
export { ComposedSkeleton };
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-q7xbcj9q.js";
|
|
4
|
+
|
|
5
|
+
// src/table/table-composed.tsx
|
|
6
|
+
import { __append, __attr, __child, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __pushMountFrame, __styleStr } from "@vertz/ui/internals";
|
|
7
|
+
import { createContext, useContext } from "@vertz/ui";
|
|
8
|
+
var TableContext = createContext(undefined, "@vertz/ui-primitives::TableContext");
|
|
9
|
+
function TableHeader(__props) {
|
|
10
|
+
const __mfDepth = __pushMountFrame();
|
|
11
|
+
try {
|
|
12
|
+
const ctx = useContext(TableContext);
|
|
13
|
+
const __mfResult0 = (() => {
|
|
14
|
+
const __el0 = __element("thead");
|
|
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 TableBody(__props) {
|
|
29
|
+
const __mfDepth = __pushMountFrame();
|
|
30
|
+
try {
|
|
31
|
+
const ctx = useContext(TableContext);
|
|
32
|
+
const __mfResult0 = (() => {
|
|
33
|
+
const __el0 = __element("tbody");
|
|
34
|
+
__attr(__el0, "class", () => cn(ctx?.classes?.body, __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 TableRow(__props) {
|
|
48
|
+
const __mfDepth = __pushMountFrame();
|
|
49
|
+
try {
|
|
50
|
+
const ctx = useContext(TableContext);
|
|
51
|
+
const __mfResult0 = (() => {
|
|
52
|
+
const __el0 = __element("tr");
|
|
53
|
+
__attr(__el0, "class", () => cn(ctx?.classes?.row, __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 TableHead(__props) {
|
|
67
|
+
const __mfDepth = __pushMountFrame();
|
|
68
|
+
try {
|
|
69
|
+
const ctx = useContext(TableContext);
|
|
70
|
+
const __mfResult0 = (() => {
|
|
71
|
+
const __el0 = __element("th");
|
|
72
|
+
__el0.setAttribute("scope", "col");
|
|
73
|
+
__attr(__el0, "class", () => cn(ctx?.classes?.head, __props.className ?? __props.class));
|
|
74
|
+
__enterChildren(__el0);
|
|
75
|
+
__append(__el0, __child(() => __props.children));
|
|
76
|
+
__exitChildren();
|
|
77
|
+
return __el0;
|
|
78
|
+
})();
|
|
79
|
+
__flushMountFrame();
|
|
80
|
+
return __mfResult0;
|
|
81
|
+
} catch (__mfErr) {
|
|
82
|
+
__discardMountFrame(__mfDepth);
|
|
83
|
+
throw __mfErr;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function TableCell(__props) {
|
|
87
|
+
const __mfDepth = __pushMountFrame();
|
|
88
|
+
try {
|
|
89
|
+
const ctx = useContext(TableContext);
|
|
90
|
+
const __mfResult0 = (() => {
|
|
91
|
+
const __el0 = __element("td");
|
|
92
|
+
__attr(__el0, "class", () => cn(ctx?.classes?.cell, __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
|
+
function TableCaption(__props) {
|
|
106
|
+
const __mfDepth = __pushMountFrame();
|
|
107
|
+
try {
|
|
108
|
+
const ctx = useContext(TableContext);
|
|
109
|
+
const __mfResult0 = (() => {
|
|
110
|
+
const __el0 = __element("caption");
|
|
111
|
+
__attr(__el0, "class", () => cn(ctx?.classes?.caption, __props.className ?? __props.class));
|
|
112
|
+
__enterChildren(__el0);
|
|
113
|
+
__append(__el0, __child(() => __props.children));
|
|
114
|
+
__exitChildren();
|
|
115
|
+
return __el0;
|
|
116
|
+
})();
|
|
117
|
+
__flushMountFrame();
|
|
118
|
+
return __mfResult0;
|
|
119
|
+
} catch (__mfErr) {
|
|
120
|
+
__discardMountFrame(__mfDepth);
|
|
121
|
+
throw __mfErr;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function TableFooter(__props) {
|
|
125
|
+
const __mfDepth = __pushMountFrame();
|
|
126
|
+
try {
|
|
127
|
+
const ctx = useContext(TableContext);
|
|
128
|
+
const __mfResult0 = (() => {
|
|
129
|
+
const __el0 = __element("tfoot");
|
|
130
|
+
__attr(__el0, "class", () => cn(ctx?.classes?.footer, __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
|
+
function ComposedTableRoot(__props) {
|
|
144
|
+
const __mfDepth = __pushMountFrame();
|
|
145
|
+
try {
|
|
146
|
+
const __mfResult0 = TableContext.Provider({ get value() {
|
|
147
|
+
return { classes: __props.classes };
|
|
148
|
+
}, children: () => (() => {
|
|
149
|
+
const __el0 = __element("div");
|
|
150
|
+
{
|
|
151
|
+
const __v = { position: "relative", width: "100%", overflowX: "auto" };
|
|
152
|
+
if (__v != null && __v !== false)
|
|
153
|
+
__el0.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
154
|
+
}
|
|
155
|
+
__enterChildren(__el0);
|
|
156
|
+
__append(__el0, (() => {
|
|
157
|
+
const __el1 = __element("table");
|
|
158
|
+
{
|
|
159
|
+
const __v = { borderCollapse: "collapse" };
|
|
160
|
+
if (__v != null && __v !== false)
|
|
161
|
+
__el1.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
162
|
+
}
|
|
163
|
+
__attr(__el1, "class", () => cn(__props.classes?.root, __props.className ?? __props.class));
|
|
164
|
+
__enterChildren(__el1);
|
|
165
|
+
__append(__el1, __child(() => __props.children));
|
|
166
|
+
__exitChildren();
|
|
167
|
+
return __el1;
|
|
168
|
+
})());
|
|
169
|
+
__exitChildren();
|
|
170
|
+
return __el0;
|
|
171
|
+
})() });
|
|
172
|
+
__flushMountFrame();
|
|
173
|
+
return __mfResult0;
|
|
174
|
+
} catch (__mfErr) {
|
|
175
|
+
__discardMountFrame(__mfDepth);
|
|
176
|
+
throw __mfErr;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
var ComposedTable = Object.assign(ComposedTableRoot, {
|
|
180
|
+
Header: TableHeader,
|
|
181
|
+
Body: TableBody,
|
|
182
|
+
Row: TableRow,
|
|
183
|
+
Head: TableHead,
|
|
184
|
+
Cell: TableCell,
|
|
185
|
+
Caption: TableCaption,
|
|
186
|
+
Footer: TableFooter
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
export { ComposedTable };
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-q7xbcj9q.js";
|
|
4
|
+
import {
|
|
5
|
+
setDataState,
|
|
6
|
+
setExpanded,
|
|
7
|
+
setHidden,
|
|
8
|
+
setHiddenAnimated
|
|
9
|
+
} from "./chunk-vevfhpc9.js";
|
|
10
|
+
import {
|
|
11
|
+
linkedIds
|
|
12
|
+
} from "./chunk-8y1jf6xr.js";
|
|
13
|
+
|
|
14
|
+
// src/collapsible/collapsible-composed.tsx
|
|
15
|
+
import { __append, __attr, __child, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __on, __pushMountFrame, __styleStr } from "@vertz/ui/internals";
|
|
16
|
+
import { createContext, ref, useContext } from "@vertz/ui";
|
|
17
|
+
var CollapsibleContext = createContext(undefined, "@vertz/ui-primitives::CollapsibleContext");
|
|
18
|
+
function useCollapsibleContext(componentName) {
|
|
19
|
+
const ctx = useContext(CollapsibleContext);
|
|
20
|
+
if (!ctx) {
|
|
21
|
+
throw new Error(`<Collapsible.${componentName}> must be used inside <Collapsible>. ` + "Ensure it is a direct or nested child of the Collapsible root component.");
|
|
22
|
+
}
|
|
23
|
+
return ctx;
|
|
24
|
+
}
|
|
25
|
+
function CollapsibleTrigger(__props) {
|
|
26
|
+
const __mfDepth = __pushMountFrame();
|
|
27
|
+
try {
|
|
28
|
+
const ctx = useCollapsibleContext("Trigger");
|
|
29
|
+
const __mfResult0 = (() => {
|
|
30
|
+
const __el0 = __element("button");
|
|
31
|
+
ctx.triggerRef.current = __el0;
|
|
32
|
+
__el0.setAttribute("type", "button");
|
|
33
|
+
{
|
|
34
|
+
const __v = ctx.ids.triggerId;
|
|
35
|
+
if (__v != null && __v !== false)
|
|
36
|
+
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
37
|
+
}
|
|
38
|
+
{
|
|
39
|
+
const __v = ctx.ids.contentId;
|
|
40
|
+
if (__v != null && __v !== false)
|
|
41
|
+
__el0.setAttribute("aria-controls", __v === true ? "" : __v);
|
|
42
|
+
}
|
|
43
|
+
{
|
|
44
|
+
const __v = ctx.defaultOpen ? "true" : "false";
|
|
45
|
+
if (__v != null && __v !== false)
|
|
46
|
+
__el0.setAttribute("aria-expanded", __v === true ? "" : __v);
|
|
47
|
+
}
|
|
48
|
+
{
|
|
49
|
+
const __v = ctx.defaultOpen ? "open" : "closed";
|
|
50
|
+
if (__v != null && __v !== false)
|
|
51
|
+
__el0.setAttribute("data-state", __v === true ? "" : __v);
|
|
52
|
+
}
|
|
53
|
+
{
|
|
54
|
+
const __v = ctx.disabled;
|
|
55
|
+
if (__v != null && __v !== false)
|
|
56
|
+
__el0.setAttribute("disabled", __v === true ? "" : __v);
|
|
57
|
+
}
|
|
58
|
+
{
|
|
59
|
+
const __v = ctx.disabled ? "true" : undefined;
|
|
60
|
+
if (__v != null && __v !== false)
|
|
61
|
+
__el0.setAttribute("aria-disabled", __v === true ? "" : __v);
|
|
62
|
+
}
|
|
63
|
+
__attr(__el0, "class", () => cn(ctx.classes?.trigger, __props.className ?? __props.class));
|
|
64
|
+
__on(__el0, "click", ctx.toggle);
|
|
65
|
+
__enterChildren(__el0);
|
|
66
|
+
__append(__el0, __child(() => __props.children));
|
|
67
|
+
__exitChildren();
|
|
68
|
+
return __el0;
|
|
69
|
+
})();
|
|
70
|
+
__flushMountFrame();
|
|
71
|
+
return __mfResult0;
|
|
72
|
+
} catch (__mfErr) {
|
|
73
|
+
__discardMountFrame(__mfDepth);
|
|
74
|
+
throw __mfErr;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function CollapsibleContent(__props) {
|
|
78
|
+
const __mfDepth = __pushMountFrame();
|
|
79
|
+
try {
|
|
80
|
+
const ctx = useCollapsibleContext("Content");
|
|
81
|
+
const __mfResult0 = (() => {
|
|
82
|
+
const __el0 = __element("div");
|
|
83
|
+
ctx.contentRef.current = __el0;
|
|
84
|
+
{
|
|
85
|
+
const __v = ctx.ids.contentId;
|
|
86
|
+
if (__v != null && __v !== false)
|
|
87
|
+
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
88
|
+
}
|
|
89
|
+
__el0.setAttribute("data-part", "collapsible-content");
|
|
90
|
+
{
|
|
91
|
+
const __v = ctx.defaultOpen ? "false" : "true";
|
|
92
|
+
if (__v != null && __v !== false)
|
|
93
|
+
__el0.setAttribute("aria-hidden", __v === true ? "" : __v);
|
|
94
|
+
}
|
|
95
|
+
{
|
|
96
|
+
const __v = ctx.defaultOpen ? "open" : "closed";
|
|
97
|
+
if (__v != null && __v !== false)
|
|
98
|
+
__el0.setAttribute("data-state", __v === true ? "" : __v);
|
|
99
|
+
}
|
|
100
|
+
{
|
|
101
|
+
const __v = { display: ctx.defaultOpen ? "" : "none" };
|
|
102
|
+
if (__v != null && __v !== false)
|
|
103
|
+
__el0.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
104
|
+
}
|
|
105
|
+
__attr(__el0, "class", () => cn(ctx.classes?.content, __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 ComposedCollapsibleRoot(__props) {
|
|
119
|
+
const __mfDepth = __pushMountFrame();
|
|
120
|
+
try {
|
|
121
|
+
let toggle = function() {
|
|
122
|
+
if (__props.disabled ?? false)
|
|
123
|
+
return;
|
|
124
|
+
const contentEl = contentRef.current;
|
|
125
|
+
const triggerEl = triggerRef.current;
|
|
126
|
+
if (!contentEl || !triggerEl)
|
|
127
|
+
return;
|
|
128
|
+
isOpen = !isOpen;
|
|
129
|
+
if (isOpen) {
|
|
130
|
+
setHidden(contentEl, false);
|
|
131
|
+
}
|
|
132
|
+
const height = contentEl.scrollHeight;
|
|
133
|
+
contentEl.style.setProperty("--collapsible-content-height", `${height}px`);
|
|
134
|
+
setExpanded(triggerEl, isOpen);
|
|
135
|
+
setDataState(triggerEl, isOpen ? "open" : "closed");
|
|
136
|
+
setDataState(contentEl, isOpen ? "open" : "closed");
|
|
137
|
+
if (!isOpen) {
|
|
138
|
+
setHiddenAnimated(contentEl, true);
|
|
139
|
+
}
|
|
140
|
+
__props.onOpenChange?.(isOpen);
|
|
141
|
+
};
|
|
142
|
+
const ids = linkedIds("collapsible");
|
|
143
|
+
const triggerRef = ref();
|
|
144
|
+
const contentRef = ref();
|
|
145
|
+
let isOpen = __props.defaultOpen ?? false;
|
|
146
|
+
const ctx = {
|
|
147
|
+
ids,
|
|
148
|
+
triggerRef,
|
|
149
|
+
contentRef,
|
|
150
|
+
classes: __props.classes,
|
|
151
|
+
disabled: __props.disabled ?? false,
|
|
152
|
+
defaultOpen: __props.defaultOpen ?? false,
|
|
153
|
+
toggle
|
|
154
|
+
};
|
|
155
|
+
const __mfResult0 = (() => {
|
|
156
|
+
const __el0 = __element("div");
|
|
157
|
+
__el0.setAttribute("data-v-id", "ComposedCollapsibleRoot");
|
|
158
|
+
__el0.setAttribute("data-part", "collapsible");
|
|
159
|
+
__attr(__el0, "class", () => cn(__props.classes?.root));
|
|
160
|
+
__enterChildren(__el0);
|
|
161
|
+
__append(__el0, CollapsibleContext.Provider({ get value() {
|
|
162
|
+
return ctx;
|
|
163
|
+
}, children: () => __child(() => __props.children) }));
|
|
164
|
+
__exitChildren();
|
|
165
|
+
return __el0;
|
|
166
|
+
})();
|
|
167
|
+
__flushMountFrame();
|
|
168
|
+
return __mfResult0;
|
|
169
|
+
} catch (__mfErr) {
|
|
170
|
+
__discardMountFrame(__mfDepth);
|
|
171
|
+
throw __mfErr;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
var ComposedCollapsible = Object.assign(ComposedCollapsibleRoot, {
|
|
175
|
+
Trigger: CollapsibleTrigger,
|
|
176
|
+
Content: CollapsibleContent
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
export { ComposedCollapsible };
|
|
@@ -129,7 +129,6 @@ function RadioRoot(options = {}) {
|
|
|
129
129
|
cleanups.push(() => item.removeEventListener("click", handleClick));
|
|
130
130
|
items.push(item);
|
|
131
131
|
itemValues.push(value);
|
|
132
|
-
root.appendChild(item);
|
|
133
132
|
setRovingTabindex(items, itemValues.indexOf(state.value.peek()));
|
|
134
133
|
return item;
|
|
135
134
|
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-q7xbcj9q.js";
|
|
4
|
+
|
|
5
|
+
// src/breadcrumb/breadcrumb-composed.tsx
|
|
6
|
+
import { computed } from "@vertz/ui";
|
|
7
|
+
import { __append, __attr, __child, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __pushMountFrame, __styleStr } from "@vertz/ui/internals";
|
|
8
|
+
import { createContext, Link, useContext } from "@vertz/ui";
|
|
9
|
+
var BreadcrumbContext = createContext(undefined, "@vertz/ui-primitives::BreadcrumbContext");
|
|
10
|
+
function BreadcrumbItem(__props) {
|
|
11
|
+
const __mfDepth = __pushMountFrame();
|
|
12
|
+
try {
|
|
13
|
+
const ctx = useContext(BreadcrumbContext);
|
|
14
|
+
const separatorText = computed(() => ctx?.separator ?? "/");
|
|
15
|
+
if (__props.href && __props.current) {
|
|
16
|
+
console.warn('Breadcrumb.Item: both "href" and "current" are set. "current" takes precedence — the link will not render.');
|
|
17
|
+
}
|
|
18
|
+
const content = computed(() => __props.current ? (() => {
|
|
19
|
+
const __el0 = __element("span");
|
|
20
|
+
__el0.setAttribute("aria-current", "page");
|
|
21
|
+
__attr(__el0, "class", () => cn(ctx?.classes?.page, __props.className ?? __props.class));
|
|
22
|
+
__enterChildren(__el0);
|
|
23
|
+
__append(__el0, __child(() => __props.children));
|
|
24
|
+
__exitChildren();
|
|
25
|
+
return __el0;
|
|
26
|
+
})() : __props.href ? Link({ get href() {
|
|
27
|
+
return __props.href;
|
|
28
|
+
}, get className() {
|
|
29
|
+
return cn(ctx?.classes?.link, __props.className ?? __props.class);
|
|
30
|
+
}, get children() {
|
|
31
|
+
return __props.children ?? "";
|
|
32
|
+
} }) : (() => {
|
|
33
|
+
const __el1 = __element("span");
|
|
34
|
+
__attr(__el1, "class", () => cn(ctx?.classes?.link, __props.className ?? __props.class));
|
|
35
|
+
__enterChildren(__el1);
|
|
36
|
+
__append(__el1, __child(() => __props.children));
|
|
37
|
+
__exitChildren();
|
|
38
|
+
return __el1;
|
|
39
|
+
})());
|
|
40
|
+
const __mfResult0 = (() => {
|
|
41
|
+
const __el2 = __element("li");
|
|
42
|
+
__attr(__el2, "class", () => cn(ctx?.classes?.item));
|
|
43
|
+
__enterChildren(__el2);
|
|
44
|
+
__append(__el2, (() => {
|
|
45
|
+
const __el3 = __element("span");
|
|
46
|
+
__el3.setAttribute("role", "presentation");
|
|
47
|
+
__el3.setAttribute("aria-hidden", "true");
|
|
48
|
+
__attr(__el3, "class", () => cn(ctx?.classes?.separator));
|
|
49
|
+
__enterChildren(__el3);
|
|
50
|
+
__append(__el3, __child(() => separatorText.value));
|
|
51
|
+
__exitChildren();
|
|
52
|
+
return __el3;
|
|
53
|
+
})());
|
|
54
|
+
__append(__el2, __child(() => content.value));
|
|
55
|
+
__exitChildren();
|
|
56
|
+
return __el2;
|
|
57
|
+
})();
|
|
58
|
+
__flushMountFrame();
|
|
59
|
+
return __mfResult0;
|
|
60
|
+
} catch (__mfErr) {
|
|
61
|
+
__discardMountFrame(__mfDepth);
|
|
62
|
+
throw __mfErr;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function ComposedBreadcrumbRoot(__props) {
|
|
66
|
+
const __mfDepth = __pushMountFrame();
|
|
67
|
+
try {
|
|
68
|
+
const __mfResult0 = BreadcrumbContext.Provider({ get value() {
|
|
69
|
+
return { classes: __props.classes, separator: __props.separator ?? "/" };
|
|
70
|
+
}, children: () => (() => {
|
|
71
|
+
const __el0 = __element("nav");
|
|
72
|
+
__el0.setAttribute("aria-label", "Breadcrumb");
|
|
73
|
+
__attr(__el0, "class", () => cn(__props.classes?.nav, __props.className ?? __props.class));
|
|
74
|
+
__enterChildren(__el0);
|
|
75
|
+
__append(__el0, (() => {
|
|
76
|
+
const __el1 = __element("ol");
|
|
77
|
+
__attr(__el1, "class", () => cn(__props.classes?.list));
|
|
78
|
+
{
|
|
79
|
+
const __v = { listStyle: "none", margin: "0", padding: "0" };
|
|
80
|
+
if (__v != null && __v !== false)
|
|
81
|
+
__el1.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
82
|
+
}
|
|
83
|
+
__enterChildren(__el1);
|
|
84
|
+
__append(__el1, __child(() => __props.children));
|
|
85
|
+
__exitChildren();
|
|
86
|
+
return __el1;
|
|
87
|
+
})());
|
|
88
|
+
__exitChildren();
|
|
89
|
+
return __el0;
|
|
90
|
+
})() });
|
|
91
|
+
__flushMountFrame();
|
|
92
|
+
return __mfResult0;
|
|
93
|
+
} catch (__mfErr) {
|
|
94
|
+
__discardMountFrame(__mfDepth);
|
|
95
|
+
throw __mfErr;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
var ComposedBreadcrumb = Object.assign(ComposedBreadcrumbRoot, {
|
|
99
|
+
Item: BreadcrumbItem
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export { ComposedBreadcrumb };
|