@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,252 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ComposedCalendar
|
|
3
|
-
} from "./chunk-3jack97k.js";
|
|
4
|
-
import {
|
|
5
|
-
createDismiss
|
|
6
|
-
} from "./chunk-a6wp8c32.js";
|
|
7
|
-
import {
|
|
8
|
-
cn
|
|
9
|
-
} from "./chunk-q7xbcj9q.js";
|
|
10
|
-
import {
|
|
11
|
-
createFloatingPosition
|
|
12
|
-
} from "./chunk-vef3sepw.js";
|
|
13
|
-
import {
|
|
14
|
-
linkedIds
|
|
15
|
-
} from "./chunk-8y1jf6xr.js";
|
|
16
|
-
|
|
17
|
-
// src/date-picker/date-picker-composed.tsx
|
|
18
|
-
import { computed, signal } from "@vertz/ui";
|
|
19
|
-
import { __append, __attr, __child, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __on, __pushMountFrame, __styleStr } from "@vertz/ui/internals";
|
|
20
|
-
import { createContext, ref, useContext } from "@vertz/ui";
|
|
21
|
-
var DatePickerContext = createContext(undefined, "@vertz/ui-primitives::DatePickerContext");
|
|
22
|
-
function DatePickerTrigger(__props) {
|
|
23
|
-
const __mfDepth = __pushMountFrame();
|
|
24
|
-
try {
|
|
25
|
-
const ctx = useContext(DatePickerContext);
|
|
26
|
-
if (!ctx) {
|
|
27
|
-
throw new Error("<DatePicker.Trigger> must be used inside <DatePicker>. " + "Ensure it is a direct or nested child of the DatePicker root component.");
|
|
28
|
-
}
|
|
29
|
-
const isOpen = computed(() => ctx.isOpen());
|
|
30
|
-
const hasVal = computed(() => ctx.hasValue());
|
|
31
|
-
const text = computed(() => ctx.displayText());
|
|
32
|
-
const __mfResult0 = (() => {
|
|
33
|
-
const __el0 = __element("button");
|
|
34
|
-
ctx.triggerRef.current = __el0;
|
|
35
|
-
__el0.setAttribute("type", "button");
|
|
36
|
-
__el0.setAttribute("data-datepicker-trigger", "");
|
|
37
|
-
__el0.setAttribute("aria-haspopup", "dialog");
|
|
38
|
-
__attr(__el0, "aria-controls", () => ctx.contentId);
|
|
39
|
-
__attr(__el0, "aria-expanded", () => isOpen.value ? "true" : "false");
|
|
40
|
-
__attr(__el0, "data-state", () => isOpen.value ? "open" : "closed");
|
|
41
|
-
__attr(__el0, "data-placeholder", () => hasVal.value ? undefined : "true");
|
|
42
|
-
__attr(__el0, "class", () => cn(ctx.classes?.trigger, __props.className ?? __props.class));
|
|
43
|
-
__on(__el0, "click", () => ctx.toggle());
|
|
44
|
-
__enterChildren(__el0);
|
|
45
|
-
__append(__el0, __child(() => __props.children ?? text.value));
|
|
46
|
-
__exitChildren();
|
|
47
|
-
return __el0;
|
|
48
|
-
})();
|
|
49
|
-
__flushMountFrame();
|
|
50
|
-
return __mfResult0;
|
|
51
|
-
} catch (__mfErr) {
|
|
52
|
-
__discardMountFrame(__mfDepth);
|
|
53
|
-
throw __mfErr;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function DatePickerContent(__props) {
|
|
57
|
-
const __mfDepth = __pushMountFrame();
|
|
58
|
-
try {
|
|
59
|
-
const ctx = useContext(DatePickerContext);
|
|
60
|
-
if (!ctx) {
|
|
61
|
-
throw new Error("<DatePicker.Content> must be used inside <DatePicker>. " + "Ensure it is a direct or nested child of the DatePicker root component.");
|
|
62
|
-
}
|
|
63
|
-
const isOpen = computed(() => ctx.isOpen());
|
|
64
|
-
const __mfResult0 = (() => {
|
|
65
|
-
const __el0 = __element("div");
|
|
66
|
-
ctx.contentRef.current = __el0;
|
|
67
|
-
__el0.setAttribute("role", "dialog");
|
|
68
|
-
__attr(__el0, "id", () => ctx.contentId);
|
|
69
|
-
__el0.setAttribute("data-datepicker-content", "");
|
|
70
|
-
__attr(__el0, "aria-hidden", () => isOpen.value ? "false" : "true");
|
|
71
|
-
__attr(__el0, "data-state", () => isOpen.value ? "open" : "closed");
|
|
72
|
-
__attr(__el0, "style", () => ({
|
|
73
|
-
display: isOpen.value ? "" : "none",
|
|
74
|
-
zIndex: "50"
|
|
75
|
-
}));
|
|
76
|
-
__attr(__el0, "class", () => cn(ctx.classes?.content, __props.className ?? __props.class));
|
|
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 _toRealDate(val) {
|
|
90
|
-
if (val instanceof Date)
|
|
91
|
-
return val;
|
|
92
|
-
if (val && typeof val === "object" && typeof val.getTime === "function") {
|
|
93
|
-
return new Date(val.getTime());
|
|
94
|
-
}
|
|
95
|
-
return null;
|
|
96
|
-
}
|
|
97
|
-
function _defaultFormatDate(date) {
|
|
98
|
-
return date.toLocaleDateString();
|
|
99
|
-
}
|
|
100
|
-
function _getDisplayText(value, placeholder, formatDate) {
|
|
101
|
-
if (value === null)
|
|
102
|
-
return placeholder;
|
|
103
|
-
if (value instanceof Date)
|
|
104
|
-
return formatDate(value);
|
|
105
|
-
if ("from" in value)
|
|
106
|
-
return `${formatDate(value.from)} – ${formatDate(value.to)}`;
|
|
107
|
-
return placeholder;
|
|
108
|
-
}
|
|
109
|
-
function _buildCalendar(props, onCalendarValueChange) {
|
|
110
|
-
const initValue = props.defaultValue ?? null;
|
|
111
|
-
const calendarMode = (props.mode ?? "single") === "range" ? "range" : "single";
|
|
112
|
-
const calendarDefaultValue = initValue instanceof Date ? initValue : initValue && ("from" in initValue) ? initValue : undefined;
|
|
113
|
-
const defaultMonth = props.defaultMonth ?? (initValue instanceof Date ? initValue : initValue && ("from" in initValue) ? initValue.from : new Date);
|
|
114
|
-
return ComposedCalendar({
|
|
115
|
-
classes: props.classes?.calendar,
|
|
116
|
-
mode: calendarMode,
|
|
117
|
-
defaultValue: calendarDefaultValue,
|
|
118
|
-
defaultMonth,
|
|
119
|
-
minDate: props.minDate,
|
|
120
|
-
maxDate: props.maxDate,
|
|
121
|
-
disabled: props.disabled,
|
|
122
|
-
captionLayout: props.captionLayout,
|
|
123
|
-
onValueChange: onCalendarValueChange
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
function ComposedDatePickerRoot(__props) {
|
|
127
|
-
const __mfDepth = __pushMountFrame();
|
|
128
|
-
try {
|
|
129
|
-
let open = function() {
|
|
130
|
-
isOpen.value = true;
|
|
131
|
-
const triggerEl = triggerRef.current;
|
|
132
|
-
const contentEl = contentRef.current;
|
|
133
|
-
if (triggerEl && contentEl) {
|
|
134
|
-
contentEl.style.position = "fixed";
|
|
135
|
-
const result = createFloatingPosition(triggerEl, contentEl, {
|
|
136
|
-
placement: "bottom-start",
|
|
137
|
-
offset: 4
|
|
138
|
-
});
|
|
139
|
-
state.floatingCleanup = result.cleanup;
|
|
140
|
-
state.dismissCleanup = createDismiss({
|
|
141
|
-
onDismiss: close,
|
|
142
|
-
insideElements: [triggerEl, contentEl],
|
|
143
|
-
escapeKey: true
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
__props.onOpenChange?.(true);
|
|
147
|
-
}, close = function() {
|
|
148
|
-
isOpen.value = false;
|
|
149
|
-
state.floatingCleanup?.();
|
|
150
|
-
state.floatingCleanup = null;
|
|
151
|
-
state.dismissCleanup?.();
|
|
152
|
-
state.dismissCleanup = null;
|
|
153
|
-
__props.onOpenChange?.(false);
|
|
154
|
-
}, toggle = function() {
|
|
155
|
-
if (isOpen.value)
|
|
156
|
-
close();
|
|
157
|
-
else
|
|
158
|
-
open();
|
|
159
|
-
}, handleCalendarValueChange = function(calValue) {
|
|
160
|
-
if (calValue === null)
|
|
161
|
-
return;
|
|
162
|
-
if ((__props.mode ?? "single") === "single") {
|
|
163
|
-
const realDate = _toRealDate(calValue);
|
|
164
|
-
if (realDate) {
|
|
165
|
-
state.value = realDate;
|
|
166
|
-
hasValue.value = true;
|
|
167
|
-
displayText.value = _getDisplayText(realDate, __props.placeholder ?? "Pick a date", __props.formatDate ?? _defaultFormatDate);
|
|
168
|
-
__props.onValueChange?.(realDate);
|
|
169
|
-
close();
|
|
170
|
-
}
|
|
171
|
-
} else if ((__props.mode ?? "single") === "range" && calValue && "from" in calValue) {
|
|
172
|
-
const raw = calValue;
|
|
173
|
-
const from = _toRealDate(raw.from);
|
|
174
|
-
const to = _toRealDate(raw.to);
|
|
175
|
-
if (from && to) {
|
|
176
|
-
const range = { from, to };
|
|
177
|
-
state.value = range;
|
|
178
|
-
hasValue.value = true;
|
|
179
|
-
displayText.value = _getDisplayText(range, __props.placeholder ?? "Pick a date", __props.formatDate ?? _defaultFormatDate);
|
|
180
|
-
__props.onValueChange?.(range);
|
|
181
|
-
if (from.getTime() !== to.getTime()) {
|
|
182
|
-
close();
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
const ids = linkedIds("datepicker");
|
|
188
|
-
const triggerRef = ref();
|
|
189
|
-
const contentRef = ref();
|
|
190
|
-
const isOpen = signal(false, "isOpen");
|
|
191
|
-
const hasValue = signal((__props.defaultValue ?? undefined) != null, "hasValue");
|
|
192
|
-
const displayText = signal(_getDisplayText(__props.defaultValue ?? undefined ?? null, __props.placeholder ?? "Pick a date", __props.formatDate ?? _defaultFormatDate), "displayText");
|
|
193
|
-
const state = {
|
|
194
|
-
value: __props.defaultValue ?? undefined ?? null,
|
|
195
|
-
dismissCleanup: null,
|
|
196
|
-
floatingCleanup: null
|
|
197
|
-
};
|
|
198
|
-
const calendarEl = computed(() => _buildCalendar({
|
|
199
|
-
mode: __props.mode ?? "single",
|
|
200
|
-
defaultValue: __props.defaultValue ?? undefined,
|
|
201
|
-
defaultMonth: __props.defaultMonth,
|
|
202
|
-
minDate: __props.minDate,
|
|
203
|
-
maxDate: __props.maxDate,
|
|
204
|
-
disabled: __props.disabled,
|
|
205
|
-
classes: __props.classes,
|
|
206
|
-
captionLayout: __props.captionLayout
|
|
207
|
-
}, handleCalendarValueChange));
|
|
208
|
-
const ctx = {
|
|
209
|
-
isOpen: () => isOpen.value,
|
|
210
|
-
hasValue: () => hasValue.value,
|
|
211
|
-
displayText: () => displayText.value,
|
|
212
|
-
contentId: ids.contentId,
|
|
213
|
-
triggerRef,
|
|
214
|
-
contentRef,
|
|
215
|
-
classes: __props.classes,
|
|
216
|
-
open,
|
|
217
|
-
close,
|
|
218
|
-
toggle
|
|
219
|
-
};
|
|
220
|
-
const __mfResult0 = DatePickerContext.Provider({ get value() {
|
|
221
|
-
return ctx;
|
|
222
|
-
}, children: () => (() => {
|
|
223
|
-
const __el0 = __element("span");
|
|
224
|
-
{
|
|
225
|
-
const __v = { position: "relative", display: "inline-block" };
|
|
226
|
-
if (__v != null && __v !== false)
|
|
227
|
-
__el0.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
228
|
-
}
|
|
229
|
-
__el0.setAttribute("data-datepicker-root", "");
|
|
230
|
-
__enterChildren(__el0);
|
|
231
|
-
__append(__el0, __child(() => __props.children ?? (() => {
|
|
232
|
-
const __el1 = document.createDocumentFragment();
|
|
233
|
-
__append(__el1, DatePickerTrigger({}));
|
|
234
|
-
__append(__el1, DatePickerContent({ children: () => __child(() => calendarEl.value) }));
|
|
235
|
-
return __el1;
|
|
236
|
-
})()));
|
|
237
|
-
__exitChildren();
|
|
238
|
-
return __el0;
|
|
239
|
-
})() });
|
|
240
|
-
__flushMountFrame();
|
|
241
|
-
return __mfResult0;
|
|
242
|
-
} catch (__mfErr) {
|
|
243
|
-
__discardMountFrame(__mfDepth);
|
|
244
|
-
throw __mfErr;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
var ComposedDatePicker = Object.assign(ComposedDatePickerRoot, {
|
|
248
|
-
Trigger: DatePickerTrigger,
|
|
249
|
-
Content: DatePickerContent
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
export { ComposedDatePicker };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
|
|
5
|
-
// src/label/label-composed.tsx
|
|
6
|
-
import { __append, __attr, __child, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __pushMountFrame } from "@vertz/ui/internals";
|
|
7
|
-
function ComposedLabelRoot(__props) {
|
|
8
|
-
const __mfDepth = __pushMountFrame();
|
|
9
|
-
try {
|
|
10
|
-
const __mfResult0 = (() => {
|
|
11
|
-
const __el0 = __element("label");
|
|
12
|
-
__attr(__el0, "class", () => cn(__props.classes?.base, __props.className ?? __props.class));
|
|
13
|
-
__attr(__el0, "for", () => __props.for);
|
|
14
|
-
__enterChildren(__el0);
|
|
15
|
-
__append(__el0, __child(() => __props.children));
|
|
16
|
-
__exitChildren();
|
|
17
|
-
return __el0;
|
|
18
|
-
})();
|
|
19
|
-
__flushMountFrame();
|
|
20
|
-
return __mfResult0;
|
|
21
|
-
} catch (__mfErr) {
|
|
22
|
-
__discardMountFrame(__mfDepth);
|
|
23
|
-
throw __mfErr;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
var ComposedLabel = ComposedLabelRoot;
|
|
27
|
-
|
|
28
|
-
export { ComposedLabel };
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
import {
|
|
5
|
-
uniqueId
|
|
6
|
-
} from "./chunk-8y1jf6xr.js";
|
|
7
|
-
import {
|
|
8
|
-
Keys,
|
|
9
|
-
isKey
|
|
10
|
-
} from "./chunk-7867pr13.js";
|
|
11
|
-
import {
|
|
12
|
-
setValueRange
|
|
13
|
-
} from "./chunk-vevfhpc9.js";
|
|
14
|
-
|
|
15
|
-
// src/slider/slider-composed.tsx
|
|
16
|
-
import { computed, signal } from "@vertz/ui";
|
|
17
|
-
import { __append, __attr, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __on, __pushMountFrame, __styleStr } from "@vertz/ui/internals";
|
|
18
|
-
import { ref } from "@vertz/ui";
|
|
19
|
-
function ComposedSliderRoot(__props) {
|
|
20
|
-
const __mfDepth = __pushMountFrame();
|
|
21
|
-
try {
|
|
22
|
-
let clamp = function(val) {
|
|
23
|
-
return Math.min(__props.max ?? 100, Math.max(__props.min ?? 0, val));
|
|
24
|
-
}, updatePosition = function(pct) {
|
|
25
|
-
const thumb = thumbRef.current;
|
|
26
|
-
const fill = fillRef.current;
|
|
27
|
-
if (thumb)
|
|
28
|
-
thumb.style.left = `${pct}%`;
|
|
29
|
-
if (fill)
|
|
30
|
-
fill.style.width = `${pct}%`;
|
|
31
|
-
}, setValue = function(val) {
|
|
32
|
-
if (__props.disabled ?? false)
|
|
33
|
-
return;
|
|
34
|
-
const clamped = clamp(val);
|
|
35
|
-
currentValue.value = clamped;
|
|
36
|
-
const thumb = thumbRef.current;
|
|
37
|
-
if (thumb)
|
|
38
|
-
setValueRange(thumb, clamped, __props.min ?? 0, __props.max ?? 100);
|
|
39
|
-
const pct = (clamped - (__props.min ?? 0)) / ((__props.max ?? 100) - (__props.min ?? 0)) * 100;
|
|
40
|
-
updatePosition(pct);
|
|
41
|
-
__props.onValueChange?.(clamped);
|
|
42
|
-
}, valueFromPointer = function(event) {
|
|
43
|
-
const track = trackRef.current;
|
|
44
|
-
if (!track)
|
|
45
|
-
return __props.min ?? 0;
|
|
46
|
-
const rect = track.getBoundingClientRect();
|
|
47
|
-
const pct = Math.max(0, Math.min(1, (event.clientX - rect.left) / rect.width));
|
|
48
|
-
const raw = (__props.min ?? 0) + pct * ((__props.max ?? 100) - (__props.min ?? 0));
|
|
49
|
-
return Math.round(raw / (__props.step ?? 1)) * (__props.step ?? 1);
|
|
50
|
-
};
|
|
51
|
-
const currentValue = signal(__props.defaultValue ?? 0, "currentValue");
|
|
52
|
-
const thumbRef = ref();
|
|
53
|
-
const fillRef = ref();
|
|
54
|
-
const trackRef = ref();
|
|
55
|
-
const initialPct = computed(() => ((__props.defaultValue ?? 0) - (__props.min ?? 0)) / ((__props.max ?? 100) - (__props.min ?? 0)) * 100);
|
|
56
|
-
const __mfResult0 = (() => {
|
|
57
|
-
const __el0 = __element("div");
|
|
58
|
-
__el0.setAttribute("data-v-id", "ComposedSliderRoot");
|
|
59
|
-
{
|
|
60
|
-
const __v = uniqueId("slider");
|
|
61
|
-
if (__v != null && __v !== false)
|
|
62
|
-
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
63
|
-
}
|
|
64
|
-
__attr(__el0, "data-state", () => __props.disabled ?? false ? "disabled" : "active");
|
|
65
|
-
__attr(__el0, "class", () => cn(__props.classes?.root));
|
|
66
|
-
__on(__el0, "pointerdown", (event) => {
|
|
67
|
-
if (__props.disabled ?? false)
|
|
68
|
-
return;
|
|
69
|
-
event.preventDefault();
|
|
70
|
-
setValue(valueFromPointer(event));
|
|
71
|
-
thumbRef.current?.focus();
|
|
72
|
-
function onMove(e) {
|
|
73
|
-
setValue(valueFromPointer(e));
|
|
74
|
-
}
|
|
75
|
-
function onUp() {
|
|
76
|
-
document.removeEventListener("pointermove", onMove);
|
|
77
|
-
document.removeEventListener("pointerup", onUp);
|
|
78
|
-
}
|
|
79
|
-
document.addEventListener("pointermove", onMove);
|
|
80
|
-
document.addEventListener("pointerup", onUp);
|
|
81
|
-
});
|
|
82
|
-
__enterChildren(__el0);
|
|
83
|
-
__append(__el0, (() => {
|
|
84
|
-
const __el1 = __element("div");
|
|
85
|
-
trackRef.current = __el1;
|
|
86
|
-
__el1.setAttribute("data-part", "track");
|
|
87
|
-
{
|
|
88
|
-
const __v = { position: "relative" };
|
|
89
|
-
if (__v != null && __v !== false)
|
|
90
|
-
__el1.setAttribute("style", typeof __v === "object" ? __styleStr(__v) : __v === true ? "" : String(__v));
|
|
91
|
-
}
|
|
92
|
-
__attr(__el1, "class", () => cn(__props.classes?.track));
|
|
93
|
-
__enterChildren(__el1);
|
|
94
|
-
__append(__el1, (() => {
|
|
95
|
-
const __el2 = __element("div");
|
|
96
|
-
fillRef.current = __el2;
|
|
97
|
-
__el2.setAttribute("data-part", "fill");
|
|
98
|
-
__attr(__el2, "style", () => ({
|
|
99
|
-
position: "absolute",
|
|
100
|
-
height: "100%",
|
|
101
|
-
borderRadius: "inherit",
|
|
102
|
-
width: `${initialPct.value}%`
|
|
103
|
-
}));
|
|
104
|
-
__attr(__el2, "class", () => cn(__props.classes?.range));
|
|
105
|
-
return __el2;
|
|
106
|
-
})());
|
|
107
|
-
__append(__el1, (() => {
|
|
108
|
-
const __el3 = __element("div");
|
|
109
|
-
thumbRef.current = __el3;
|
|
110
|
-
__el3.setAttribute("role", "slider");
|
|
111
|
-
__attr(__el3, "tabindex", () => __props.disabled ?? false ? "-1" : "0");
|
|
112
|
-
__el3.setAttribute("data-part", "thumb");
|
|
113
|
-
__attr(__el3, "aria-valuenow", () => String(__props.defaultValue ?? 0));
|
|
114
|
-
__attr(__el3, "aria-valuemin", () => String(__props.min ?? 0));
|
|
115
|
-
__attr(__el3, "aria-valuemax", () => String(__props.max ?? 100));
|
|
116
|
-
__attr(__el3, "aria-disabled", () => __props.disabled ?? false ? "true" : undefined);
|
|
117
|
-
__attr(__el3, "style", () => ({
|
|
118
|
-
position: "absolute",
|
|
119
|
-
transform: "translate(-50%, -50%)",
|
|
120
|
-
left: `${initialPct.value}%`
|
|
121
|
-
}));
|
|
122
|
-
__attr(__el3, "class", () => cn(__props.classes?.thumb));
|
|
123
|
-
__on(__el3, "keydown", (event) => {
|
|
124
|
-
if (__props.disabled ?? false)
|
|
125
|
-
return;
|
|
126
|
-
if (isKey(event, Keys.ArrowRight, Keys.ArrowUp)) {
|
|
127
|
-
event.preventDefault();
|
|
128
|
-
setValue(currentValue.value + (__props.step ?? 1));
|
|
129
|
-
} else if (isKey(event, Keys.ArrowLeft, Keys.ArrowDown)) {
|
|
130
|
-
event.preventDefault();
|
|
131
|
-
setValue(currentValue.value - (__props.step ?? 1));
|
|
132
|
-
} else if (isKey(event, Keys.Home)) {
|
|
133
|
-
event.preventDefault();
|
|
134
|
-
setValue(__props.min ?? 0);
|
|
135
|
-
} else if (isKey(event, Keys.End)) {
|
|
136
|
-
event.preventDefault();
|
|
137
|
-
setValue(__props.max ?? 100);
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
return __el3;
|
|
141
|
-
})());
|
|
142
|
-
__exitChildren();
|
|
143
|
-
return __el1;
|
|
144
|
-
})());
|
|
145
|
-
__exitChildren();
|
|
146
|
-
return __el0;
|
|
147
|
-
})();
|
|
148
|
-
__flushMountFrame();
|
|
149
|
-
return __mfResult0;
|
|
150
|
-
} catch (__mfErr) {
|
|
151
|
-
__discardMountFrame(__mfDepth);
|
|
152
|
-
throw __mfErr;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
var ComposedSlider = ComposedSliderRoot;
|
|
156
|
-
|
|
157
|
-
export { ComposedSlider };
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-q7xbcj9q.js";
|
|
4
|
-
|
|
5
|
-
// src/dialog/dialog-stack-parts.tsx
|
|
6
|
-
import { __append, __attr, __child, __discardMountFrame, __element, __enterChildren, __exitChildren, __flushMountFrame, __on, __pushMountFrame } from "@vertz/ui/internals";
|
|
7
|
-
import { DialogHandleContext, DialogIdContext, useContext } from "@vertz/ui";
|
|
8
|
-
function useDialogId() {
|
|
9
|
-
const id = useContext(DialogIdContext);
|
|
10
|
-
if (!id) {
|
|
11
|
-
throw new Error("Dialog sub-component must be used inside a dialog opened via DialogStack");
|
|
12
|
-
}
|
|
13
|
-
return id;
|
|
14
|
-
}
|
|
15
|
-
function useDialogHandle() {
|
|
16
|
-
const handle = useContext(DialogHandleContext);
|
|
17
|
-
if (!handle) {
|
|
18
|
-
throw new Error("Dialog sub-component must be used inside a dialog opened via DialogStack");
|
|
19
|
-
}
|
|
20
|
-
return handle;
|
|
21
|
-
}
|
|
22
|
-
function StackDialogTitle(__props) {
|
|
23
|
-
const __mfDepth = __pushMountFrame();
|
|
24
|
-
try {
|
|
25
|
-
const dialogId = useDialogId();
|
|
26
|
-
const __mfResult0 = (() => {
|
|
27
|
-
const __el0 = __element("h2");
|
|
28
|
-
{
|
|
29
|
-
const __v = `${dialogId}-title`;
|
|
30
|
-
if (__v != null && __v !== false)
|
|
31
|
-
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
32
|
-
}
|
|
33
|
-
__el0.setAttribute("data-part", "title");
|
|
34
|
-
__attr(__el0, "class", () => cn(__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 StackDialogDescription(__props) {
|
|
48
|
-
const __mfDepth = __pushMountFrame();
|
|
49
|
-
try {
|
|
50
|
-
const dialogId = useDialogId();
|
|
51
|
-
const __mfResult0 = (() => {
|
|
52
|
-
const __el0 = __element("p");
|
|
53
|
-
{
|
|
54
|
-
const __v = `${dialogId}-desc`;
|
|
55
|
-
if (__v != null && __v !== false)
|
|
56
|
-
__el0.setAttribute("id", __v === true ? "" : __v);
|
|
57
|
-
}
|
|
58
|
-
__el0.setAttribute("data-part", "description");
|
|
59
|
-
__attr(__el0, "class", () => cn(__props.className ?? __props.class));
|
|
60
|
-
__enterChildren(__el0);
|
|
61
|
-
__append(__el0, __child(() => __props.children));
|
|
62
|
-
__exitChildren();
|
|
63
|
-
return __el0;
|
|
64
|
-
})();
|
|
65
|
-
__flushMountFrame();
|
|
66
|
-
return __mfResult0;
|
|
67
|
-
} catch (__mfErr) {
|
|
68
|
-
__discardMountFrame(__mfDepth);
|
|
69
|
-
throw __mfErr;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
function StackDialogHeader(__props) {
|
|
73
|
-
const __mfDepth = __pushMountFrame();
|
|
74
|
-
try {
|
|
75
|
-
const __mfResult0 = (() => {
|
|
76
|
-
const __el0 = __element("div");
|
|
77
|
-
__el0.setAttribute("data-part", "header");
|
|
78
|
-
__attr(__el0, "class", () => cn(__props.className ?? __props.class));
|
|
79
|
-
__enterChildren(__el0);
|
|
80
|
-
__append(__el0, __child(() => __props.children));
|
|
81
|
-
__exitChildren();
|
|
82
|
-
return __el0;
|
|
83
|
-
})();
|
|
84
|
-
__flushMountFrame();
|
|
85
|
-
return __mfResult0;
|
|
86
|
-
} catch (__mfErr) {
|
|
87
|
-
__discardMountFrame(__mfDepth);
|
|
88
|
-
throw __mfErr;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
function StackDialogFooter(__props) {
|
|
92
|
-
const __mfDepth = __pushMountFrame();
|
|
93
|
-
try {
|
|
94
|
-
const __mfResult0 = (() => {
|
|
95
|
-
const __el0 = __element("div");
|
|
96
|
-
__el0.setAttribute("data-part", "footer");
|
|
97
|
-
__attr(__el0, "class", () => cn(__props.className ?? __props.class));
|
|
98
|
-
__enterChildren(__el0);
|
|
99
|
-
__append(__el0, __child(() => __props.children));
|
|
100
|
-
__exitChildren();
|
|
101
|
-
return __el0;
|
|
102
|
-
})();
|
|
103
|
-
__flushMountFrame();
|
|
104
|
-
return __mfResult0;
|
|
105
|
-
} catch (__mfErr) {
|
|
106
|
-
__discardMountFrame(__mfDepth);
|
|
107
|
-
throw __mfErr;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function StackDialogBody(__props) {
|
|
111
|
-
const __mfDepth = __pushMountFrame();
|
|
112
|
-
try {
|
|
113
|
-
const __mfResult0 = (() => {
|
|
114
|
-
const __el0 = __element("div");
|
|
115
|
-
__el0.setAttribute("data-part", "body");
|
|
116
|
-
__attr(__el0, "class", () => cn(__props.className ?? __props.class));
|
|
117
|
-
__enterChildren(__el0);
|
|
118
|
-
__append(__el0, __child(() => __props.children));
|
|
119
|
-
__exitChildren();
|
|
120
|
-
return __el0;
|
|
121
|
-
})();
|
|
122
|
-
__flushMountFrame();
|
|
123
|
-
return __mfResult0;
|
|
124
|
-
} catch (__mfErr) {
|
|
125
|
-
__discardMountFrame(__mfDepth);
|
|
126
|
-
throw __mfErr;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
function StackDialogCancel(__props) {
|
|
130
|
-
const __mfDepth = __pushMountFrame();
|
|
131
|
-
try {
|
|
132
|
-
const handle = useDialogHandle();
|
|
133
|
-
const __mfResult0 = (() => {
|
|
134
|
-
const __el0 = __element("button");
|
|
135
|
-
__el0.setAttribute("type", "button");
|
|
136
|
-
__el0.setAttribute("data-part", "cancel");
|
|
137
|
-
__attr(__el0, "class", () => cn(__props.className ?? __props.class));
|
|
138
|
-
__on(__el0, "click", () => handle.close());
|
|
139
|
-
__enterChildren(__el0);
|
|
140
|
-
__append(__el0, __child(() => __props.children));
|
|
141
|
-
__exitChildren();
|
|
142
|
-
return __el0;
|
|
143
|
-
})();
|
|
144
|
-
__flushMountFrame();
|
|
145
|
-
return __mfResult0;
|
|
146
|
-
} catch (__mfErr) {
|
|
147
|
-
__discardMountFrame(__mfDepth);
|
|
148
|
-
throw __mfErr;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
function StackDialogClose(__props) {
|
|
152
|
-
const __mfDepth = __pushMountFrame();
|
|
153
|
-
try {
|
|
154
|
-
const handle = useDialogHandle();
|
|
155
|
-
const __mfResult0 = (() => {
|
|
156
|
-
const __el0 = __element("button");
|
|
157
|
-
__el0.setAttribute("type", "button");
|
|
158
|
-
__el0.setAttribute("data-part", "close");
|
|
159
|
-
__attr(__el0, "aria-label", () => __props.children ? undefined : "Close");
|
|
160
|
-
__attr(__el0, "class", () => cn(__props.className ?? __props.class));
|
|
161
|
-
__on(__el0, "click", () => handle.close());
|
|
162
|
-
__enterChildren(__el0);
|
|
163
|
-
__append(__el0, __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
|
-
|
|
175
|
-
export { StackDialogTitle, StackDialogDescription, StackDialogHeader, StackDialogFooter, StackDialogBody, StackDialogCancel, StackDialogClose };
|