@exponential_app/eui-solid 0.3.0 → 0.5.0
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/chunks/{image-loading-status--T9ny7b0.js → zoomable-image-CmoMEUF6.js} +1392 -32
- package/dist/chunks/zoomable-image-CmoMEUF6.js.map +1 -0
- package/dist/exponential-ui-solid.css +1 -1
- package/dist/index.js +908 -478
- package/dist/index.js.map +1 -1
- package/dist/primitives.js +328 -1333
- package/dist/primitives.js.map +1 -1
- package/dist/types/icons.d.ts +1 -0
- package/dist/types/natives/media.d.ts +6 -0
- package/dist/types/natives/motion.d.ts +4 -0
- package/dist/types/natives/overlays.d.ts +43 -1
- package/dist/types/natives/zoomable-image.d.ts +4 -0
- package/dist/types/primitives/index.d.ts +1 -0
- package/dist/types/primitives/zoomable-image.d.ts +68 -0
- package/package.json +2 -2
- package/dist/chunks/image-loading-status--T9ny7b0.js.map +0 -1
package/dist/primitives.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { spread, mergeProps, template, createComponent,
|
|
2
|
-
import { splitProps, createContext,
|
|
3
|
-
import { cn, alertVariants, ALERT_CLASSES, ALERT_DIALOG_CLASSES, AVATAR_CLASSES, avatarFallbackColors, avatarFallbackHue, BADGE_CLASSES, badgeLabel, BREADCRUMB_CLASSES,
|
|
1
|
+
import { spread, mergeProps, template, createComponent, memo, insert, effect, className, Dynamic, delegateEvents, setAttribute, style, use } from "solid-js/web";
|
|
2
|
+
import { splitProps, createContext, useContext, createSignal, createEffect, on, onCleanup, Show, children, mergeProps as mergeProps$1, createMemo, untrack, For, createRenderEffect, createUniqueId, onMount, from, Index } from "solid-js";
|
|
3
|
+
import { cn, alertVariants, ALERT_CLASSES, ALERT_DIALOG_CLASSES, AVATAR_CLASSES, avatarFallbackColors, avatarFallbackHue, BADGE_CLASSES, badgeLabel, BREADCRUMB_CLASSES, CALENDAR_CLASSES, buttonVariants, CARD_CLASSES, CAROUSEL_CLASSES, carouselCounterText, CHECKBOX_CLASSES, choiceValues, CHOICE_TILES_CLASSES, choiceColumns, choiceToggle, codeBlockVariants, CODE_BLOCK_CLASSES, codeBlockLineVariants, CODE_TOKEN_CLASS, COMMAND_LABEL_STYLE, createCommandStore, COMMAND_CLASSES, COMMAND_SELECT_EVENT, commandItemValue, observeCommandListHeight, CONTEXT_RING_CLASSES, RING_TONE_CLASS, RING_SIZE, RING_RADIUS, RING_STROKE, ringGeometry, SHEET_CHROME_CLASSES, isTypeaheadPortalInteraction, SHEET_CLASSES, DIALOG_CLASSES, DIALOG_PHONE_QUERY, MOBILE_ARMS, DISCLOSURE_HEADER_CLASSES, DOCK_CARD_CLASSES, dockPileGeometry, DOCK_PILE_CLASSES, ICON_DISC_CLASSES, EMPTY_STATE_CLASSES, GLASS_CARD_CLASSES, HOVER_CARD_DELAYS, HOVER_CARD_CLASSES, INPUT_CLASSES, KBD_CLASSES, LABEL_CLASSES, PROGRESS_CLASSES, progressIndicatorTransform, METER_CLASSES, MOSAIC_CLASSES, mosaicTiles, OUTLINE_CLASSES, outlineCountText, POPOVER_CLASSES, PROGRESS_RING_CLASSES, progressRingPercent, SCROLL_AREA_CLASSES, scrollAreaRootStyle, SCROLL_AREA_VIEWPORT_CSS, scrollAreaViewportStyle, SCROLL_AREA_CONTENT_STYLE, scrollAreaVisibility, SCROLL_AREA_SCROLL_INITIAL, scrollAreaCornerStyle, scrollAreaThumbOffset, scrollAreaScrollbarStyle, scrollAreaThumbSize, SCROLL_AREA_THUMB_STYLE, SCROLL_AREA_SCROLL_MACHINE, scrollAreaThumbRatio, scrollAreaScrollFromPointer, TABS_CLASSES, SEGMENTED_CONTROL_CLASSES, SELECT_CLASSES, SELECT_INLINE, selectPopperContentStyle, selectItemAlignedContentStyle, SELECT_VIEWPORT_CSS, SELECT_VIEWPORT_ATTR, SEPARATOR_CLASSES, SKELETON_CLASSES, SPINNER_CLASSES, SWITCH_CLASSES, TABLE_CLASSES, TEXTAREA_CLASSES, createToastStore, TOAST_TOUCH_QUERY, toastPlacement, layoutSize, toastStackGeometry, TOAST_CLASSES, TOOLTIP_CLASSES, voiceWaveAnimates, voiceWaveClock, VOICE_WAVE_CLASSES, voiceWaveFitChild, VOICE_WAVE_SIZE_PX, voiceWaveQuiet, voiceWaveName } from "@exponential_app/eui/web/primitives";
|
|
4
4
|
import { AVATAR_HUE_COUNT, BARE_FIELD_CLASS, CAROUSEL_GEOMETRY, CODE_TOKEN_CLASS as CODE_TOKEN_CLASS2, DOCK_CARD_CLASSES as DOCK_CARD_CLASSES2, DOCK_PILE_CLASSES as DOCK_PILE_CLASSES2, DOCK_PILE_CONSTANTS, EMPTY_STATE_SIZES, FIELD_CHROME_CLASS, GLASS_CARD_CLASS, GLASS_CARD_CLASSES as GLASS_CARD_CLASSES2, ICON_DISC_TONES, MENU_CHECK_ITEM_CLASS, MENU_CHEVRON_CLASS, MENU_CONTENT_CLASS, MENU_ITEM_CLASS, MENU_LABEL_CLASS, MENU_SEPARATOR_CLASS, MENU_SHORTCUT_CLASS, MENU_SUB_TRIGGER_CLASS, MENU_SURFACE_CLASS, MENU_VALUE_CLASS, MOBILE_ALERT, MOBILE_ARMS as MOBILE_ARMS2, MOBILE_PAGE, MOBILE_SHEET, MOBILE_SHEET_FULL, MOSAIC_GEOMETRY, OUTLINE_GEOMETRY, RING_RADIUS as RING_RADIUS2, RING_SIZE as RING_SIZE2, RING_STROKE as RING_STROKE2, RING_TONE_CLASS as RING_TONE_CLASS2, SEGMENTED_ITEM, SEGMENTED_LIST, SEGMENTED_ROW, SEGMENTED_ROW_COMPACT, SEGMENTED_TAB, TOAST_CONSTANTS, TOAST_KINDS, TOAST_TOUCH_QUERY as TOAST_TOUCH_QUERY2, alertVariants as alertVariants2, avatarHueIndex, buttonVariants as buttonVariants2, carouselCounterText as carouselCounterText2, choiceColumns as choiceColumns2, choiceToggle as choiceToggle2, choiceValues as choiceValues2, cn as cn2, createToastStore as createToastStore2, dockPileGeometry as dockPileGeometry2, getInitials, middleTruncate, mosaicTiles as mosaicTiles2, outlineCountText as outlineCountText2, progressRingPercent as progressRingPercent2, ringGeometry as ringGeometry2, toastPlacement as toastPlacement2, toastStackGeometry as toastStackGeometry2 } from "@exponential_app/eui/web/primitives";
|
|
5
|
-
import {
|
|
5
|
+
import { U as DialogRoot, W as DialogClosePart, X as mergeRefs, Y as DialogContentPart, _ as DialogDescriptionPart, $ as DialogOverlayPart, a0 as DialogPortalPart, a1 as DialogTitlePart, a2 as DialogTriggerPart, g as createImageLoadingStatus, c as css, P as PaintIcon, a3 as Button, f as createInForm, i as createPresence, e as createElementSize, a4 as bubbleOnChange, a5 as useDialogContext, a6 as callRef, J as createMediaQuery, l as bindStyle, a7 as createOpenState, a8 as composeHandlers, j as createLayer, k as Popper, m as LayerContext, x as popperContentStyle, a9 as styleObject, aa as layerPointerEvents, ab as noteLayerMount, ac as layerMountedThisTask, ad as stateOf$1, ae as createId, af as callHandler$2, n as useFocusGuards, s as useModalEffects, p as createFocusScope, r as rovingFocusFirst, ag as focusIntent, ah as wrapArray, N as NativeSelect, G as SELECTION_KEYS, z as radixTypeahead, A as findNextItem, O as OPEN_KEYS, F as mountIn, ai as styleWriter, aj as setChecked, V as VisuallyHidden, y as inPolygon, o as graceArea, ak as createMediaQuery$1 } from "./chunks/zoomable-image-CmoMEUF6.js";
|
|
6
|
+
import { al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, Z, aB, H } from "./chunks/zoomable-image-CmoMEUF6.js";
|
|
6
7
|
import "aria-hidden";
|
|
7
8
|
import "@floating-ui/dom";
|
|
8
9
|
import "@exponential_app/eui/web";
|
|
9
10
|
import { tokenizeCode, voiceWave, voiceWavePath, voiceWaveChildBox } from "@exponential_app/eui";
|
|
10
|
-
import { Ellipsis, ChevronRight, ChevronLeft, ChevronDown, Check, ImageIcon, Copy, Search, CircleX, X,
|
|
11
|
-
var _tmpl$$
|
|
11
|
+
import { Ellipsis, ChevronRight, ChevronLeft, ChevronDown, Check, ImageIcon, Copy, Search, CircleX, X, ChevronUp, LoaderCircle, TriangleAlert, Info, CircleCheck } from "lucide-solid";
|
|
12
|
+
var _tmpl$$F = /* @__PURE__ */ template(`<div data-slot=alert role=alert>`), _tmpl$2$r = /* @__PURE__ */ template(`<div data-slot=alert-title>`), _tmpl$3$l = /* @__PURE__ */ template(`<div data-slot=alert-description>`);
|
|
12
13
|
function Alert(props) {
|
|
13
14
|
const [local, rest] = splitProps(props, [`class`, `variant`]);
|
|
14
15
|
return (() => {
|
|
15
|
-
var _el$ = _tmpl$$
|
|
16
|
+
var _el$ = _tmpl$$F();
|
|
16
17
|
spread(_el$, mergeProps({
|
|
17
18
|
get ["class"]() {
|
|
18
19
|
return cn(alertVariants({
|
|
@@ -26,7 +27,7 @@ function Alert(props) {
|
|
|
26
27
|
function AlertTitle(props) {
|
|
27
28
|
const [local, rest] = splitProps(props, [`class`]);
|
|
28
29
|
return (() => {
|
|
29
|
-
var _el$2 = _tmpl$2$
|
|
30
|
+
var _el$2 = _tmpl$2$r();
|
|
30
31
|
spread(_el$2, mergeProps({
|
|
31
32
|
get ["class"]() {
|
|
32
33
|
return cn(ALERT_CLASSES.title, local.class);
|
|
@@ -38,7 +39,7 @@ function AlertTitle(props) {
|
|
|
38
39
|
function AlertDescription(props) {
|
|
39
40
|
const [local, rest] = splitProps(props, [`class`]);
|
|
40
41
|
return (() => {
|
|
41
|
-
var _el$3 = _tmpl$3$
|
|
42
|
+
var _el$3 = _tmpl$3$l();
|
|
42
43
|
spread(_el$3, mergeProps({
|
|
43
44
|
get ["class"]() {
|
|
44
45
|
return cn(ALERT_CLASSES.description, local.class);
|
|
@@ -47,313 +48,7 @@ function AlertDescription(props) {
|
|
|
47
48
|
return _el$3;
|
|
48
49
|
})();
|
|
49
50
|
}
|
|
50
|
-
var _tmpl$$
|
|
51
|
-
function callHandler$2(handler, event) {
|
|
52
|
-
if (typeof handler === `function`) handler(event);
|
|
53
|
-
else if (Array.isArray(handler) && typeof handler[0] === `function`) handler[0](handler[1], event);
|
|
54
|
-
}
|
|
55
|
-
function composeHandlers(user, ours, checkForDefaultPrevented = true) {
|
|
56
|
-
return (event) => {
|
|
57
|
-
callHandler$2(user, event);
|
|
58
|
-
if (!checkForDefaultPrevented || !event.defaultPrevented) ours(event);
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function callRef(ref, el) {
|
|
62
|
-
if (typeof ref === `function`) ref(el);
|
|
63
|
-
}
|
|
64
|
-
function mergeRefs(...refs) {
|
|
65
|
-
return (el) => {
|
|
66
|
-
for (const r of refs) if (typeof r === `function`) r(el);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
function styleObject(style2) {
|
|
70
|
-
if (!style2 || typeof style2 !== `object`) return {};
|
|
71
|
-
const out = {};
|
|
72
|
-
for (const [k, v] of Object.entries(style2)) out[k] = v === void 0 || v === null ? void 0 : String(v);
|
|
73
|
-
return out;
|
|
74
|
-
}
|
|
75
|
-
function createOpenState(o) {
|
|
76
|
-
const [inner, setInner] = createSignal(untrack(() => o.defaultOpen) ?? false);
|
|
77
|
-
const open = () => o.open() ?? inner();
|
|
78
|
-
const set = (next) => {
|
|
79
|
-
const prev = untrack(open);
|
|
80
|
-
if (next !== prev) untrack(o.onOpenChange)?.(next);
|
|
81
|
-
if (untrack(o.open) === void 0) setInner(next);
|
|
82
|
-
};
|
|
83
|
-
return [open, set];
|
|
84
|
-
}
|
|
85
|
-
const stateOf$1 = (open) => open ? `open` : `closed`;
|
|
86
|
-
let layerMounted = false;
|
|
87
|
-
function noteLayerMount() {
|
|
88
|
-
if (layerMounted) return;
|
|
89
|
-
layerMounted = true;
|
|
90
|
-
queueMicrotask(() => layerMounted = false);
|
|
91
|
-
}
|
|
92
|
-
function layerMountedThisTask() {
|
|
93
|
-
return layerMounted;
|
|
94
|
-
}
|
|
95
|
-
function layerPointerEvents(layer, registered, lag) {
|
|
96
|
-
return lag && !registered ? void 0 : layer.pointerEvents(registered);
|
|
97
|
-
}
|
|
98
|
-
const DialogContext = createContext();
|
|
99
|
-
function useDialogContext(part2) {
|
|
100
|
-
const ctx = useContext(DialogContext);
|
|
101
|
-
if (!ctx) throw new Error(`\`${part2}\` must be used within \`Dialog\``);
|
|
102
|
-
return ctx;
|
|
103
|
-
}
|
|
104
|
-
function DialogRoot(props) {
|
|
105
|
-
const [open, setOpen] = createOpenState({
|
|
106
|
-
open: () => props.open,
|
|
107
|
-
defaultOpen: props.defaultOpen,
|
|
108
|
-
onOpenChange: () => props.onOpenChange
|
|
109
|
-
});
|
|
110
|
-
const [trigger, setTrigger] = createSignal();
|
|
111
|
-
const value = {
|
|
112
|
-
open,
|
|
113
|
-
setOpen,
|
|
114
|
-
modal: untrack(() => props.modal) ?? true,
|
|
115
|
-
contentId: `radix-${createId()}`,
|
|
116
|
-
titleId: `radix-${createId()}`,
|
|
117
|
-
descriptionId: `radix-${createId()}`,
|
|
118
|
-
trigger,
|
|
119
|
-
setTrigger
|
|
120
|
-
};
|
|
121
|
-
return createComponent(DialogContext.Provider, {
|
|
122
|
-
value,
|
|
123
|
-
get children() {
|
|
124
|
-
return props.children;
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
let idCounter = 0;
|
|
129
|
-
function createId() {
|
|
130
|
-
return `s${++idCounter}`;
|
|
131
|
-
}
|
|
132
|
-
function DialogTriggerPart(props) {
|
|
133
|
-
const ctx = useDialogContext(`DialogTrigger`);
|
|
134
|
-
const [local, rest] = splitProps(props, [`as`, `ref`, `onClick`]);
|
|
135
|
-
return createComponent(Dynamic, mergeProps({
|
|
136
|
-
get component() {
|
|
137
|
-
return local.as ?? `button`;
|
|
138
|
-
},
|
|
139
|
-
type: "button",
|
|
140
|
-
"aria-haspopup": "dialog",
|
|
141
|
-
get ["aria-expanded"]() {
|
|
142
|
-
return ctx.open() ? `true` : `false`;
|
|
143
|
-
},
|
|
144
|
-
get ["aria-controls"]() {
|
|
145
|
-
return ctx.contentId;
|
|
146
|
-
},
|
|
147
|
-
get ["data-state"]() {
|
|
148
|
-
return stateOf$1(ctx.open());
|
|
149
|
-
}
|
|
150
|
-
}, rest, {
|
|
151
|
-
ref(r$) {
|
|
152
|
-
var _ref$ = mergeRefs(local.ref, ctx.setTrigger);
|
|
153
|
-
typeof _ref$ === "function" && _ref$(r$);
|
|
154
|
-
},
|
|
155
|
-
get onClick() {
|
|
156
|
-
return composeHandlers(local.onClick, () => ctx.setOpen(!untrack(ctx.open)));
|
|
157
|
-
}
|
|
158
|
-
}));
|
|
159
|
-
}
|
|
160
|
-
function DialogClosePart(props) {
|
|
161
|
-
const ctx = useDialogContext(`DialogClose`);
|
|
162
|
-
const [local, rest] = splitProps(props, [`as`, `ref`, `onClick`]);
|
|
163
|
-
return createComponent(Dynamic, mergeProps({
|
|
164
|
-
get component() {
|
|
165
|
-
return local.as ?? `button`;
|
|
166
|
-
},
|
|
167
|
-
type: "button"
|
|
168
|
-
}, rest, {
|
|
169
|
-
ref(r$) {
|
|
170
|
-
var _ref$2 = local.ref;
|
|
171
|
-
typeof _ref$2 === "function" ? _ref$2(r$) : local.ref = r$;
|
|
172
|
-
},
|
|
173
|
-
get onClick() {
|
|
174
|
-
return composeHandlers(local.onClick, () => ctx.setOpen(false));
|
|
175
|
-
}
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
178
|
-
function DialogPortalPart(props) {
|
|
179
|
-
const [mounted, setMounted] = createSignal(false);
|
|
180
|
-
onMount(() => setMounted(true));
|
|
181
|
-
return createComponent(LayerPortal, {
|
|
182
|
-
get mount() {
|
|
183
|
-
return memo(() => props.container !== void 0)() ? props.container : memo(() => !!mounted())() ? document.body : null;
|
|
184
|
-
},
|
|
185
|
-
get children() {
|
|
186
|
-
return props.children;
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
function DialogOverlayPart(props) {
|
|
191
|
-
const ctx = useDialogContext(`DialogOverlay`);
|
|
192
|
-
const presence = createPresence(ctx.open);
|
|
193
|
-
const [local, rest] = splitProps(props, [`style`, `ref`]);
|
|
194
|
-
const Overlay = () => {
|
|
195
|
-
const el = (() => {
|
|
196
|
-
var _el$ = _tmpl$$G();
|
|
197
|
-
spread(_el$, mergeProps({
|
|
198
|
-
get ["data-state"]() {
|
|
199
|
-
return stateOf$1(ctx.open());
|
|
200
|
-
}
|
|
201
|
-
}, rest), false, false);
|
|
202
|
-
return _el$;
|
|
203
|
-
})();
|
|
204
|
-
presence.ref(el);
|
|
205
|
-
bindStyle(el, () => ({
|
|
206
|
-
"pointer-events": `auto`,
|
|
207
|
-
...styleObject(local.style)
|
|
208
|
-
}));
|
|
209
|
-
callRef(local.ref, el);
|
|
210
|
-
onMount(() => useScrollLock());
|
|
211
|
-
return el;
|
|
212
|
-
};
|
|
213
|
-
return createComponent(Show, {
|
|
214
|
-
get when() {
|
|
215
|
-
return memo(() => !!ctx.modal)() && presence.mounted();
|
|
216
|
-
},
|
|
217
|
-
get children() {
|
|
218
|
-
return createComponent(Overlay, {});
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
function DialogContentPart(props) {
|
|
223
|
-
const ctx = useDialogContext(`DialogContent`);
|
|
224
|
-
const presence = createPresence(ctx.open);
|
|
225
|
-
const [local, rest] = splitProps(props, [`role`, `style`, `ref`, `children`, `onOpenAutoFocus`, `onCloseAutoFocus`, `onEscapeKeyDown`, `onPointerDownOutside`, `onFocusOutside`, `onInteractOutside`, `onKeyDown`]);
|
|
226
|
-
const Content = () => {
|
|
227
|
-
const modal = ctx.modal;
|
|
228
|
-
let interactedOutside = false;
|
|
229
|
-
let pointerDownOutside = false;
|
|
230
|
-
const layer = createLayer({
|
|
231
|
-
disableOutsidePointerEvents: () => modal,
|
|
232
|
-
onEscapeKeyDown: (e) => local.onEscapeKeyDown?.(e),
|
|
233
|
-
onPointerDownOutside: (e) => {
|
|
234
|
-
local.onPointerDownOutside?.(e);
|
|
235
|
-
if (!modal || e.defaultPrevented) return;
|
|
236
|
-
const original = e.detail.originalEvent;
|
|
237
|
-
const ctrlLeftClick = original.button === 0 && original.ctrlKey === true;
|
|
238
|
-
if (original.button === 2 || ctrlLeftClick) e.preventDefault();
|
|
239
|
-
},
|
|
240
|
-
onFocusOutside: (e) => {
|
|
241
|
-
local.onFocusOutside?.(e);
|
|
242
|
-
if (modal && !e.defaultPrevented) e.preventDefault();
|
|
243
|
-
},
|
|
244
|
-
onInteractOutside: (e) => {
|
|
245
|
-
local.onInteractOutside?.(e);
|
|
246
|
-
if (modal) return;
|
|
247
|
-
if (!e.defaultPrevented) {
|
|
248
|
-
interactedOutside = true;
|
|
249
|
-
if (e.detail.originalEvent.type === `pointerdown`) pointerDownOutside = true;
|
|
250
|
-
}
|
|
251
|
-
const target = e.target;
|
|
252
|
-
if (target && ctx.trigger()?.contains(target)) e.preventDefault();
|
|
253
|
-
if (e.detail.originalEvent.type === `focusin` && pointerDownOutside) e.preventDefault();
|
|
254
|
-
},
|
|
255
|
-
onDismiss: () => ctx.setOpen(false)
|
|
256
|
-
});
|
|
257
|
-
const scope = createFocusScope({
|
|
258
|
-
trapped: () => modal && ctx.open(),
|
|
259
|
-
loop: true,
|
|
260
|
-
onMountAutoFocus: (e) => local.onOpenAutoFocus?.(e),
|
|
261
|
-
onUnmountAutoFocus: (e) => {
|
|
262
|
-
if (modal) {
|
|
263
|
-
local.onCloseAutoFocus?.(e);
|
|
264
|
-
if (e.defaultPrevented) return;
|
|
265
|
-
e.preventDefault();
|
|
266
|
-
ctx.trigger()?.focus();
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
local.onCloseAutoFocus?.(e);
|
|
270
|
-
if (!e.defaultPrevented) {
|
|
271
|
-
if (!interactedOutside) ctx.trigger()?.focus();
|
|
272
|
-
e.preventDefault();
|
|
273
|
-
}
|
|
274
|
-
interactedOutside = false;
|
|
275
|
-
pointerDownOutside = false;
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
const [registered, setRegistered] = createSignal(false);
|
|
279
|
-
const lag = layerMountedThisTask();
|
|
280
|
-
const el = (() => {
|
|
281
|
-
var _el$2 = _tmpl$2$s();
|
|
282
|
-
spread(_el$2, mergeProps({
|
|
283
|
-
get role() {
|
|
284
|
-
return local.role ?? `dialog`;
|
|
285
|
-
},
|
|
286
|
-
get id() {
|
|
287
|
-
return ctx.contentId;
|
|
288
|
-
},
|
|
289
|
-
get ["aria-describedby"]() {
|
|
290
|
-
return ctx.descriptionId;
|
|
291
|
-
},
|
|
292
|
-
get ["aria-labelledby"]() {
|
|
293
|
-
return ctx.titleId;
|
|
294
|
-
},
|
|
295
|
-
get ["data-state"]() {
|
|
296
|
-
return stateOf$1(ctx.open());
|
|
297
|
-
}
|
|
298
|
-
}, rest, {
|
|
299
|
-
"onKeyDown": (e) => {
|
|
300
|
-
callHandler$2(local.onKeyDown, e);
|
|
301
|
-
scope.onKeyDown(e);
|
|
302
|
-
}
|
|
303
|
-
}), false, true);
|
|
304
|
-
insert(_el$2, () => local.children);
|
|
305
|
-
return _el$2;
|
|
306
|
-
})();
|
|
307
|
-
presence.ref(el);
|
|
308
|
-
bindStyle(el, () => ({
|
|
309
|
-
"pointer-events": layerPointerEvents(layer, registered(), lag),
|
|
310
|
-
...styleObject(local.style)
|
|
311
|
-
}));
|
|
312
|
-
callRef(local.ref, el);
|
|
313
|
-
onMount(() => {
|
|
314
|
-
layer.attach(el);
|
|
315
|
-
setRegistered(true);
|
|
316
|
-
noteLayerMount();
|
|
317
|
-
scope.attach(el);
|
|
318
|
-
useFocusGuards();
|
|
319
|
-
if (modal) useModalEffects(el, false);
|
|
320
|
-
});
|
|
321
|
-
return el;
|
|
322
|
-
};
|
|
323
|
-
return createComponent(Show, {
|
|
324
|
-
get when() {
|
|
325
|
-
return presence.mounted();
|
|
326
|
-
},
|
|
327
|
-
get children() {
|
|
328
|
-
return createComponent(Content, {});
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
function DialogTitlePart(props) {
|
|
333
|
-
const ctx = useDialogContext(`DialogTitle`);
|
|
334
|
-
return (() => {
|
|
335
|
-
var _el$3 = _tmpl$3$m();
|
|
336
|
-
spread(_el$3, mergeProps({
|
|
337
|
-
get id() {
|
|
338
|
-
return ctx.titleId;
|
|
339
|
-
}
|
|
340
|
-
}, props), false, false);
|
|
341
|
-
return _el$3;
|
|
342
|
-
})();
|
|
343
|
-
}
|
|
344
|
-
function DialogDescriptionPart(props) {
|
|
345
|
-
const ctx = useDialogContext(`DialogDescription`);
|
|
346
|
-
return (() => {
|
|
347
|
-
var _el$4 = _tmpl$4$h();
|
|
348
|
-
spread(_el$4, mergeProps({
|
|
349
|
-
get id() {
|
|
350
|
-
return ctx.descriptionId;
|
|
351
|
-
}
|
|
352
|
-
}, props), false, false);
|
|
353
|
-
return _el$4;
|
|
354
|
-
})();
|
|
355
|
-
}
|
|
356
|
-
var _tmpl$$F = /* @__PURE__ */ template(`<div data-slot=alert-dialog-header>`), _tmpl$2$r = /* @__PURE__ */ template(`<div data-slot=alert-dialog-footer>`);
|
|
51
|
+
var _tmpl$$E = /* @__PURE__ */ template(`<div data-slot=alert-dialog-header>`), _tmpl$2$q = /* @__PURE__ */ template(`<div data-slot=alert-dialog-footer>`);
|
|
357
52
|
const CancelContext = createContext();
|
|
358
53
|
function AlertDialog(props) {
|
|
359
54
|
return createComponent(DialogRoot, mergeProps(props, {
|
|
@@ -421,7 +116,7 @@ function AlertDialogContent(props) {
|
|
|
421
116
|
function AlertDialogHeader(props) {
|
|
422
117
|
const [local, rest] = splitProps(props, [`class`]);
|
|
423
118
|
return (() => {
|
|
424
|
-
var _el$ = _tmpl$$
|
|
119
|
+
var _el$ = _tmpl$$E();
|
|
425
120
|
spread(_el$, mergeProps({
|
|
426
121
|
get ["class"]() {
|
|
427
122
|
return cn(ALERT_DIALOG_CLASSES.header, local.class);
|
|
@@ -433,7 +128,7 @@ function AlertDialogHeader(props) {
|
|
|
433
128
|
function AlertDialogFooter(props) {
|
|
434
129
|
const [local, rest] = splitProps(props, [`class`]);
|
|
435
130
|
return (() => {
|
|
436
|
-
var _el$2 = _tmpl$2$
|
|
131
|
+
var _el$2 = _tmpl$2$q();
|
|
437
132
|
spread(_el$2, mergeProps({
|
|
438
133
|
get ["class"]() {
|
|
439
134
|
return cn(ALERT_DIALOG_CLASSES.footer, local.class);
|
|
@@ -482,7 +177,7 @@ function AlertDialogCancel(props) {
|
|
|
482
177
|
}
|
|
483
178
|
}));
|
|
484
179
|
}
|
|
485
|
-
var _tmpl$$
|
|
180
|
+
var _tmpl$$D = /* @__PURE__ */ template(`<span data-slot=avatar>`), _tmpl$2$p = /* @__PURE__ */ template(`<img data-slot=avatar-image>`), _tmpl$3$k = /* @__PURE__ */ template(`<span data-slot=avatar-fallback>`);
|
|
486
181
|
const AvatarContext = createContext();
|
|
487
182
|
function Avatar(props) {
|
|
488
183
|
const [local, rest] = splitProps(props, [`class`]);
|
|
@@ -493,7 +188,7 @@ function Avatar(props) {
|
|
|
493
188
|
setStatus
|
|
494
189
|
},
|
|
495
190
|
get children() {
|
|
496
|
-
var _el$ = _tmpl$$
|
|
191
|
+
var _el$ = _tmpl$$D();
|
|
497
192
|
spread(_el$, mergeProps({
|
|
498
193
|
get ["class"]() {
|
|
499
194
|
return cn(AVATAR_CLASSES.root, local.class);
|
|
@@ -517,7 +212,7 @@ function AvatarImage(props) {
|
|
|
517
212
|
return status() === `loaded`;
|
|
518
213
|
},
|
|
519
214
|
get children() {
|
|
520
|
-
var _el$2 = _tmpl$2$
|
|
215
|
+
var _el$2 = _tmpl$2$p();
|
|
521
216
|
spread(_el$2, mergeProps({
|
|
522
217
|
get ["class"]() {
|
|
523
218
|
return cn(AVATAR_CLASSES.image, local.class);
|
|
@@ -553,7 +248,7 @@ function AvatarFallback(props) {
|
|
|
553
248
|
return memo(() => !!canRender())() && ctx.status() !== `loaded`;
|
|
554
249
|
},
|
|
555
250
|
get children() {
|
|
556
|
-
var _el$3 = _tmpl$3$
|
|
251
|
+
var _el$3 = _tmpl$3$k();
|
|
557
252
|
spread(_el$3, mergeProps({
|
|
558
253
|
get ["class"]() {
|
|
559
254
|
return cn(AVATAR_CLASSES.fallback, hue() === void 0 && AVATAR_CLASSES.fallbackMuted, local.class);
|
|
@@ -566,7 +261,7 @@ function AvatarFallback(props) {
|
|
|
566
261
|
}
|
|
567
262
|
});
|
|
568
263
|
}
|
|
569
|
-
var _tmpl$$
|
|
264
|
+
var _tmpl$$C = /* @__PURE__ */ template(`<span data-slot=badge>`);
|
|
570
265
|
function Badge(props) {
|
|
571
266
|
const [local, rest] = splitProps(props, [`count`, `max`, `tone`, `class`]);
|
|
572
267
|
const tone = () => local.tone ?? `muted`;
|
|
@@ -575,7 +270,7 @@ function Badge(props) {
|
|
|
575
270
|
return local.count > 0;
|
|
576
271
|
},
|
|
577
272
|
get children() {
|
|
578
|
-
var _el$ = _tmpl$$
|
|
273
|
+
var _el$ = _tmpl$$C();
|
|
579
274
|
spread(_el$, mergeProps({
|
|
580
275
|
get ["data-tone"]() {
|
|
581
276
|
return tone();
|
|
@@ -589,10 +284,10 @@ function Badge(props) {
|
|
|
589
284
|
}
|
|
590
285
|
});
|
|
591
286
|
}
|
|
592
|
-
var _tmpl$$
|
|
287
|
+
var _tmpl$$B = /* @__PURE__ */ template(`<nav aria-label=breadcrumb data-slot=breadcrumb>`), _tmpl$2$o = /* @__PURE__ */ template(`<ol data-slot=breadcrumb-list>`), _tmpl$3$j = /* @__PURE__ */ template(`<li data-slot=breadcrumb-item>`), _tmpl$4$f = /* @__PURE__ */ template(`<span data-slot=breadcrumb-page role=link aria-disabled=true aria-current=page>`), _tmpl$5$a = /* @__PURE__ */ template(`<li data-slot=breadcrumb-separator role=presentation aria-hidden=true>`), _tmpl$6$7 = /* @__PURE__ */ template(`<span data-slot=breadcrumb-ellipsis role=presentation aria-hidden=true><span>More`);
|
|
593
288
|
function Breadcrumb(props) {
|
|
594
289
|
return (() => {
|
|
595
|
-
var _el$ = _tmpl$$
|
|
290
|
+
var _el$ = _tmpl$$B();
|
|
596
291
|
spread(_el$, props, false, false);
|
|
597
292
|
return _el$;
|
|
598
293
|
})();
|
|
@@ -600,7 +295,7 @@ function Breadcrumb(props) {
|
|
|
600
295
|
function BreadcrumbList(props) {
|
|
601
296
|
const [local, rest] = splitProps(props, [`class`]);
|
|
602
297
|
return (() => {
|
|
603
|
-
var _el$2 = _tmpl$2$
|
|
298
|
+
var _el$2 = _tmpl$2$o();
|
|
604
299
|
spread(_el$2, mergeProps({
|
|
605
300
|
get ["class"]() {
|
|
606
301
|
return cn(BREADCRUMB_CLASSES.list, local.class);
|
|
@@ -612,7 +307,7 @@ function BreadcrumbList(props) {
|
|
|
612
307
|
function BreadcrumbItem(props) {
|
|
613
308
|
const [local, rest] = splitProps(props, [`class`]);
|
|
614
309
|
return (() => {
|
|
615
|
-
var _el$3 = _tmpl$3$
|
|
310
|
+
var _el$3 = _tmpl$3$j();
|
|
616
311
|
spread(_el$3, mergeProps({
|
|
617
312
|
get ["class"]() {
|
|
618
313
|
return cn(BREADCRUMB_CLASSES.item, local.class);
|
|
@@ -636,7 +331,7 @@ function BreadcrumbLink(props) {
|
|
|
636
331
|
function BreadcrumbPage(props) {
|
|
637
332
|
const [local, rest] = splitProps(props, [`class`]);
|
|
638
333
|
return (() => {
|
|
639
|
-
var _el$4 = _tmpl$4$
|
|
334
|
+
var _el$4 = _tmpl$4$f();
|
|
640
335
|
spread(_el$4, mergeProps({
|
|
641
336
|
get ["class"]() {
|
|
642
337
|
return cn(BREADCRUMB_CLASSES.page, local.class);
|
|
@@ -649,7 +344,7 @@ function BreadcrumbSeparator(props) {
|
|
|
649
344
|
const [local, rest] = splitProps(props, [`class`, `children`]);
|
|
650
345
|
const resolved = children(() => local.children);
|
|
651
346
|
return (() => {
|
|
652
|
-
var _el$5 = _tmpl$5$
|
|
347
|
+
var _el$5 = _tmpl$5$a();
|
|
653
348
|
spread(_el$5, mergeProps({
|
|
654
349
|
get ["class"]() {
|
|
655
350
|
return cn(BREADCRUMB_CLASSES.separator, local.class);
|
|
@@ -664,7 +359,7 @@ function BreadcrumbSeparator(props) {
|
|
|
664
359
|
function BreadcrumbEllipsis(props) {
|
|
665
360
|
const [local, rest] = splitProps(props, [`class`]);
|
|
666
361
|
return (() => {
|
|
667
|
-
var _el$6 = _tmpl$6$
|
|
362
|
+
var _el$6 = _tmpl$6$7(), _el$7 = _el$6.firstChild;
|
|
668
363
|
spread(_el$6, mergeProps({
|
|
669
364
|
get ["class"]() {
|
|
670
365
|
return cn(BREADCRUMB_CLASSES.ellipsis, local.class);
|
|
@@ -680,31 +375,7 @@ function BreadcrumbEllipsis(props) {
|
|
|
680
375
|
return _el$6;
|
|
681
376
|
})();
|
|
682
377
|
}
|
|
683
|
-
|
|
684
|
-
const [local, rest] = splitProps(props, [`class`, `variant`, `size`, `as`]);
|
|
685
|
-
const variant = () => local.variant ?? `default`;
|
|
686
|
-
const size = () => local.size ?? `default`;
|
|
687
|
-
return createComponent(Dynamic, mergeProps({
|
|
688
|
-
get component() {
|
|
689
|
-
return local.as ?? `button`;
|
|
690
|
-
},
|
|
691
|
-
"data-slot": "button",
|
|
692
|
-
get ["data-variant"]() {
|
|
693
|
-
return variant();
|
|
694
|
-
},
|
|
695
|
-
get ["data-size"]() {
|
|
696
|
-
return size();
|
|
697
|
-
},
|
|
698
|
-
get ["class"]() {
|
|
699
|
-
return cn(buttonVariants({
|
|
700
|
-
variant: variant(),
|
|
701
|
-
size: size(),
|
|
702
|
-
className: local.class
|
|
703
|
-
}));
|
|
704
|
-
}
|
|
705
|
-
}, rest));
|
|
706
|
-
}
|
|
707
|
-
var _tmpl$$B = /* @__PURE__ */ template(`<span><select></select><span aria-hidden=true>`), _tmpl$2$o = /* @__PURE__ */ template(`<option>`), _tmpl$3$j = /* @__PURE__ */ template(`<nav><button type=button></button><button type=button>`), _tmpl$4$f = /* @__PURE__ */ template(`<div role=status aria-live=polite>`), _tmpl$5$a = /* @__PURE__ */ template(`<div data-slot=calendar><div>`), _tmpl$6$7 = /* @__PURE__ */ template(`<th scope=col>`), _tmpl$7$4 = /* @__PURE__ */ template(`<thead aria-hidden=true><tr>`), _tmpl$8$4 = /* @__PURE__ */ template(`<div><div></div><table role=grid><tbody>`), _tmpl$9$3 = /* @__PURE__ */ template(`<div><span role=status aria-live=polite>`), _tmpl$0$3 = /* @__PURE__ */ template(`<span>`), _tmpl$1$1 = /* @__PURE__ */ template(`<span role=status aria-live=polite>`), _tmpl$10$1 = /* @__PURE__ */ template(`<td><div>`), _tmpl$11$1 = /* @__PURE__ */ template(`<tr>`), _tmpl$12 = /* @__PURE__ */ template(`<td role=gridcell>`);
|
|
378
|
+
var _tmpl$$A = /* @__PURE__ */ template(`<span><select></select><span aria-hidden=true>`), _tmpl$2$n = /* @__PURE__ */ template(`<option>`), _tmpl$3$i = /* @__PURE__ */ template(`<nav><button type=button></button><button type=button>`), _tmpl$4$e = /* @__PURE__ */ template(`<div role=status aria-live=polite>`), _tmpl$5$9 = /* @__PURE__ */ template(`<div data-slot=calendar><div>`), _tmpl$6$6 = /* @__PURE__ */ template(`<th scope=col>`), _tmpl$7$3 = /* @__PURE__ */ template(`<thead aria-hidden=true><tr>`), _tmpl$8$3 = /* @__PURE__ */ template(`<div><div></div><table role=grid><tbody>`), _tmpl$9$2 = /* @__PURE__ */ template(`<div><span role=status aria-live=polite>`), _tmpl$0$2 = /* @__PURE__ */ template(`<span>`), _tmpl$1$1 = /* @__PURE__ */ template(`<span role=status aria-live=polite>`), _tmpl$10$1 = /* @__PURE__ */ template(`<td><div>`), _tmpl$11$1 = /* @__PURE__ */ template(`<tr>`), _tmpl$12 = /* @__PURE__ */ template(`<td role=gridcell>`);
|
|
708
379
|
const clone = (d) => new Date(d.getTime());
|
|
709
380
|
const startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
710
381
|
const startOfMonth = (d) => new Date(d.getFullYear(), d.getMonth(), 1);
|
|
@@ -1413,7 +1084,7 @@ function Calendar(input) {
|
|
|
1413
1084
|
}
|
|
1414
1085
|
};
|
|
1415
1086
|
return (() => {
|
|
1416
|
-
var _el$ = _tmpl$$
|
|
1087
|
+
var _el$ = _tmpl$$A(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
1417
1088
|
use((el) => queueMicrotask(() => el.value = String(value)), _el$2);
|
|
1418
1089
|
_el$2.addEventListener("change", onChange);
|
|
1419
1090
|
insert(_el$2, createComponent(For, {
|
|
@@ -1421,7 +1092,7 @@ function Calendar(input) {
|
|
|
1421
1092
|
return options();
|
|
1422
1093
|
},
|
|
1423
1094
|
children: (o) => (() => {
|
|
1424
|
-
var _el$4 = _tmpl$2$
|
|
1095
|
+
var _el$4 = _tmpl$2$n();
|
|
1425
1096
|
insert(_el$4, () => o.label);
|
|
1426
1097
|
effect((_p$) => {
|
|
1427
1098
|
var _v$7 = o.disabled, _v$8 = o.value === value;
|
|
@@ -1465,7 +1136,7 @@ function Calendar(input) {
|
|
|
1465
1136
|
})();
|
|
1466
1137
|
};
|
|
1467
1138
|
return (() => {
|
|
1468
|
-
var _el$5 = _tmpl$5$
|
|
1139
|
+
var _el$5 = _tmpl$5$9(), _el$6 = _el$5.firstChild;
|
|
1469
1140
|
spread(_el$5, mergeProps({
|
|
1470
1141
|
get ["class"]() {
|
|
1471
1142
|
return cn([classNames().root, cn(CALENDAR_CLASSES.root, props.class)].filter(Boolean).join(` `));
|
|
@@ -1503,7 +1174,7 @@ function Calendar(input) {
|
|
|
1503
1174
|
return !props.hideNavigation;
|
|
1504
1175
|
},
|
|
1505
1176
|
get children() {
|
|
1506
|
-
var _el$7 = _tmpl$3$
|
|
1177
|
+
var _el$7 = _tmpl$3$i(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling;
|
|
1507
1178
|
_el$8.$$click = handlePrevious;
|
|
1508
1179
|
insert(_el$8, createComponent(Chevron, {
|
|
1509
1180
|
get disabled() {
|
|
@@ -1557,20 +1228,20 @@ function Calendar(input) {
|
|
|
1557
1228
|
return calendar().months;
|
|
1558
1229
|
},
|
|
1559
1230
|
children: (calendarMonth) => (() => {
|
|
1560
|
-
var _el$1 = _tmpl$8$
|
|
1231
|
+
var _el$1 = _tmpl$8$3(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$15 = _el$11.firstChild;
|
|
1561
1232
|
insert(_el$10, (() => {
|
|
1562
1233
|
var _c$ = memo(() => !!props.captionLayout.startsWith(`dropdown`));
|
|
1563
1234
|
return () => _c$() ? (() => {
|
|
1564
|
-
var _el$16 = _tmpl$9$
|
|
1235
|
+
var _el$16 = _tmpl$9$2(), _el$17 = _el$16.firstChild;
|
|
1565
1236
|
insert(_el$16, () => {
|
|
1566
1237
|
const layout = props.captionLayout;
|
|
1567
1238
|
const monthControl = layout === `dropdown` || layout === `dropdown-months` ? dropdown(`month`, calendarMonth.date) : (() => {
|
|
1568
|
-
var _el$18 = _tmpl$0$
|
|
1239
|
+
var _el$18 = _tmpl$0$2();
|
|
1569
1240
|
insert(_el$18, () => formatters().formatMonthDropdown(calendarMonth.date));
|
|
1570
1241
|
return _el$18;
|
|
1571
1242
|
})();
|
|
1572
1243
|
const yearControl = layout === `dropdown` || layout === `dropdown-years` ? dropdown(`year`, calendarMonth.date) : (() => {
|
|
1573
|
-
var _el$19 = _tmpl$0$
|
|
1244
|
+
var _el$19 = _tmpl$0$2();
|
|
1574
1245
|
insert(_el$19, () => formatters().formatYearDropdown(calendarMonth.date));
|
|
1575
1246
|
return _el$19;
|
|
1576
1247
|
})();
|
|
@@ -1599,13 +1270,13 @@ function Calendar(input) {
|
|
|
1599
1270
|
return !props.hideWeekdays;
|
|
1600
1271
|
},
|
|
1601
1272
|
get children() {
|
|
1602
|
-
var _el$12 = _tmpl$7$
|
|
1273
|
+
var _el$12 = _tmpl$7$3(), _el$13 = _el$12.firstChild;
|
|
1603
1274
|
insert(_el$13, createComponent(Show, {
|
|
1604
1275
|
get when() {
|
|
1605
1276
|
return props.showWeekNumber;
|
|
1606
1277
|
},
|
|
1607
1278
|
get children() {
|
|
1608
|
-
var _el$14 = _tmpl$6$
|
|
1279
|
+
var _el$14 = _tmpl$6$6();
|
|
1609
1280
|
insert(_el$14, () => formatters().formatWeekNumberHeader());
|
|
1610
1281
|
effect((_p$) => {
|
|
1611
1282
|
var _v$17 = labels().labelWeekNumberHeader(), _v$18 = classNames().week_number_header;
|
|
@@ -1626,7 +1297,7 @@ function Calendar(input) {
|
|
|
1626
1297
|
}, (_, i) => addDays(sow(today()), i));
|
|
1627
1298
|
},
|
|
1628
1299
|
children: (weekday) => (() => {
|
|
1629
|
-
var _el$21 = _tmpl$6$
|
|
1300
|
+
var _el$21 = _tmpl$6$6();
|
|
1630
1301
|
insert(_el$21, () => formatters().formatWeekdayName(weekday));
|
|
1631
1302
|
effect((_p$) => {
|
|
1632
1303
|
var _v$27 = labels().labelWeekday(weekday), _v$28 = classNames().weekday;
|
|
@@ -1792,7 +1463,7 @@ function Calendar(input) {
|
|
|
1792
1463
|
return props.footer;
|
|
1793
1464
|
},
|
|
1794
1465
|
get children() {
|
|
1795
|
-
var _el$0 = _tmpl$4$
|
|
1466
|
+
var _el$0 = _tmpl$4$e();
|
|
1796
1467
|
insert(_el$0, () => props.footer);
|
|
1797
1468
|
effect(() => className(_el$0, classNames().footer));
|
|
1798
1469
|
return _el$0;
|
|
@@ -1851,11 +1522,11 @@ function CalendarDayButton(props) {
|
|
|
1851
1522
|
}, rest));
|
|
1852
1523
|
}
|
|
1853
1524
|
delegateEvents(["click"]);
|
|
1854
|
-
var _tmpl$$
|
|
1525
|
+
var _tmpl$$z = /* @__PURE__ */ template(`<div>`);
|
|
1855
1526
|
const part = (slot, recipe) => function CardPart(props) {
|
|
1856
1527
|
const [local, rest] = splitProps(props, [`class`]);
|
|
1857
1528
|
return (() => {
|
|
1858
|
-
var _el$ = _tmpl$$
|
|
1529
|
+
var _el$ = _tmpl$$z();
|
|
1859
1530
|
setAttribute(_el$, "data-slot", slot);
|
|
1860
1531
|
spread(_el$, mergeProps({
|
|
1861
1532
|
get ["class"]() {
|
|
@@ -1872,11 +1543,11 @@ const CardDescription = part(`card-description`, `description`);
|
|
|
1872
1543
|
const CardAction = part(`card-action`, `action`);
|
|
1873
1544
|
const CardContent = part(`card-content`, `content`);
|
|
1874
1545
|
const CardFooter = part(`card-footer`, `footer`);
|
|
1875
|
-
var _tmpl$$
|
|
1546
|
+
var _tmpl$$y = /* @__PURE__ */ template(`<span data-slot=carousel-counter aria-hidden=true>`), _tmpl$2$m = /* @__PURE__ */ template(`<div data-slot=carousel-thumbnails>`), _tmpl$3$h = /* @__PURE__ */ template(`<button type=button data-slot=carousel-thumbnail>`), _tmpl$4$d = /* @__PURE__ */ template(`<img alt aria-hidden=true loading=lazy decoding=async>`, true, false, false);
|
|
1876
1547
|
function CarouselCounter(props) {
|
|
1877
1548
|
const [local, rest] = splitProps(props, [`page`, `total`, `class`]);
|
|
1878
1549
|
return (() => {
|
|
1879
|
-
var _el$ = _tmpl$$
|
|
1550
|
+
var _el$ = _tmpl$$y();
|
|
1880
1551
|
spread(_el$, mergeProps({
|
|
1881
1552
|
get ["class"]() {
|
|
1882
1553
|
return cn(CAROUSEL_CLASSES.counter, local.class);
|
|
@@ -1909,7 +1580,7 @@ function CarouselThumbnails(props) {
|
|
|
1909
1580
|
});
|
|
1910
1581
|
});
|
|
1911
1582
|
return (() => {
|
|
1912
|
-
var _el$2 = _tmpl$2$
|
|
1583
|
+
var _el$2 = _tmpl$2$m();
|
|
1913
1584
|
var _ref$ = strip;
|
|
1914
1585
|
typeof _ref$ === "function" ? use(_ref$, _el$2) : strip = _el$2;
|
|
1915
1586
|
spread(_el$2, mergeProps({
|
|
@@ -1924,14 +1595,14 @@ function CarouselThumbnails(props) {
|
|
|
1924
1595
|
children: (i) => {
|
|
1925
1596
|
const current = () => i === local.page;
|
|
1926
1597
|
return (() => {
|
|
1927
|
-
var _el$3 = _tmpl$3$
|
|
1598
|
+
var _el$3 = _tmpl$3$h();
|
|
1928
1599
|
_el$3.$$click = () => local.onPageChange?.(i);
|
|
1929
1600
|
insert(_el$3, createComponent(Show, {
|
|
1930
1601
|
get when() {
|
|
1931
1602
|
return local.urls[i];
|
|
1932
1603
|
},
|
|
1933
1604
|
children: (src) => (() => {
|
|
1934
|
-
var _el$4 = _tmpl$4$
|
|
1605
|
+
var _el$4 = _tmpl$4$d();
|
|
1935
1606
|
setAttribute(_el$4, "draggable", false);
|
|
1936
1607
|
effect((_p$) => {
|
|
1937
1608
|
var _v$5 = src(), _v$6 = CAROUSEL_CLASSES.thumbnailImage;
|
|
@@ -1966,7 +1637,7 @@ function CarouselThumbnails(props) {
|
|
|
1966
1637
|
})();
|
|
1967
1638
|
}
|
|
1968
1639
|
delegateEvents(["click"]);
|
|
1969
|
-
var _tmpl$$
|
|
1640
|
+
var _tmpl$$x = /* @__PURE__ */ template(`<span data-slot=checkbox-indicator>`), _tmpl$2$l = /* @__PURE__ */ template(`<button type=button role=checkbox data-slot=checkbox>`), _tmpl$3$g = /* @__PURE__ */ template(`<input type=checkbox aria-hidden=true tabindex=-1>`);
|
|
1970
1641
|
const isIndeterminate = (c) => c === `indeterminate`;
|
|
1971
1642
|
const stateOf = (c) => isIndeterminate(c) ? `indeterminate` : c ? `checked` : `unchecked`;
|
|
1972
1643
|
function Checkbox(props) {
|
|
@@ -1997,7 +1668,7 @@ function Checkbox(props) {
|
|
|
1997
1668
|
else if (Array.isArray(handler)) handler[0](handler[1], e);
|
|
1998
1669
|
};
|
|
1999
1670
|
return [(() => {
|
|
2000
|
-
var _el$ = _tmpl$2$
|
|
1671
|
+
var _el$ = _tmpl$2$l();
|
|
2001
1672
|
use((el) => {
|
|
2002
1673
|
setControl(el);
|
|
2003
1674
|
if (typeof local.ref === `function`) local.ref(el);
|
|
@@ -2045,7 +1716,7 @@ function Checkbox(props) {
|
|
|
2045
1716
|
return presence.mounted();
|
|
2046
1717
|
},
|
|
2047
1718
|
get children() {
|
|
2048
|
-
var _el$2 = _tmpl$$
|
|
1719
|
+
var _el$2 = _tmpl$$x();
|
|
2049
1720
|
var _ref$ = presence.ref;
|
|
2050
1721
|
typeof _ref$ === "function" ? use(_ref$, _el$2) : presence.ref = _el$2;
|
|
2051
1722
|
insert(_el$2, createComponent(PaintIcon, {
|
|
@@ -2128,7 +1799,7 @@ function CheckboxBubble(props) {
|
|
|
2128
1799
|
});
|
|
2129
1800
|
};
|
|
2130
1801
|
return (() => {
|
|
2131
|
-
var _el$3 = _tmpl$3$
|
|
1802
|
+
var _el$3 = _tmpl$3$g();
|
|
2132
1803
|
var _ref$2 = input;
|
|
2133
1804
|
typeof _ref$2 === "function" ? use(_ref$2, _el$3) : input = _el$3;
|
|
2134
1805
|
effect((_p$) => {
|
|
@@ -2153,7 +1824,7 @@ function CheckboxBubble(props) {
|
|
|
2153
1824
|
return _el$3;
|
|
2154
1825
|
})();
|
|
2155
1826
|
}
|
|
2156
|
-
var _tmpl$$
|
|
1827
|
+
var _tmpl$$w = /* @__PURE__ */ template(`<div>`), _tmpl$2$k = /* @__PURE__ */ template(`<span aria-hidden=true>`), _tmpl$3$f = /* @__PURE__ */ template(`<span>`), _tmpl$4$c = /* @__PURE__ */ template(`<button type=button><span>`), _tmpl$5$8 = /* @__PURE__ */ template(`<img loading=lazy decoding=async>`, true, false, false);
|
|
2157
1828
|
function ChoiceTilesFrame(props) {
|
|
2158
1829
|
const buttons = [];
|
|
2159
1830
|
const order = createMemo(() => props.options.map((o) => o.value));
|
|
@@ -2196,7 +1867,7 @@ function ChoiceTilesFrame(props) {
|
|
|
2196
1867
|
});
|
|
2197
1868
|
};
|
|
2198
1869
|
return (() => {
|
|
2199
|
-
var _el$ = _tmpl$$
|
|
1870
|
+
var _el$ = _tmpl$$w();
|
|
2200
1871
|
var _ref$ = props.rootRef;
|
|
2201
1872
|
typeof _ref$ === "function" ? use(_ref$, _el$) : props.rootRef = _el$;
|
|
2202
1873
|
spread(_el$, mergeProps({
|
|
@@ -2230,7 +1901,7 @@ function ChoiceTilesFrame(props) {
|
|
|
2230
1901
|
});
|
|
2231
1902
|
const description = o.description ? String(o.description) : ``;
|
|
2232
1903
|
return (() => {
|
|
2233
|
-
var _el$2 = _tmpl$4$
|
|
1904
|
+
var _el$2 = _tmpl$4$c(), _el$4 = _el$2.firstChild;
|
|
2234
1905
|
_el$2.$$keydown = (e) => onKeyDown(i, e);
|
|
2235
1906
|
_el$2.$$click = () => pick(i);
|
|
2236
1907
|
use((el) => {
|
|
@@ -2264,7 +1935,7 @@ function ChoiceTilesFrame(props) {
|
|
|
2264
1935
|
return pictures();
|
|
2265
1936
|
},
|
|
2266
1937
|
get children() {
|
|
2267
|
-
var _el$3 = _tmpl$2$
|
|
1938
|
+
var _el$3 = _tmpl$2$k();
|
|
2268
1939
|
spread(_el$3, mergeProps(() => props.pictureProps(state())), false, true);
|
|
2269
1940
|
insert(_el$3, () => props.renderPicture(o.image ? String(o.image) : null, state()));
|
|
2270
1941
|
return _el$3;
|
|
@@ -2275,7 +1946,7 @@ function ChoiceTilesFrame(props) {
|
|
|
2275
1946
|
insert(_el$2, createComponent(Show, {
|
|
2276
1947
|
when: description,
|
|
2277
1948
|
get children() {
|
|
2278
|
-
var _el$5 = _tmpl$3$
|
|
1949
|
+
var _el$5 = _tmpl$3$f();
|
|
2279
1950
|
spread(_el$5, mergeProps(() => props.descriptionProps(state())), false, true);
|
|
2280
1951
|
insert(_el$5, description);
|
|
2281
1952
|
return _el$5;
|
|
@@ -2293,7 +1964,7 @@ function ChoiceTiles(props) {
|
|
|
2293
1964
|
const multiple = () => props.multiple ?? false;
|
|
2294
1965
|
const picked = createMemo(() => choiceValues(props.value, multiple()));
|
|
2295
1966
|
const image = (src, label) => src ? props.renderImage ? props.renderImage(src, label) : (() => {
|
|
2296
|
-
var _el$6 = _tmpl$5$
|
|
1967
|
+
var _el$6 = _tmpl$5$8();
|
|
2297
1968
|
setAttribute(_el$6, "src", src);
|
|
2298
1969
|
setAttribute(_el$6, "alt", label);
|
|
2299
1970
|
effect(() => className(_el$6, CHOICE_TILES_CLASSES.image));
|
|
@@ -2354,12 +2025,12 @@ function ChoiceTiles(props) {
|
|
|
2354
2025
|
});
|
|
2355
2026
|
}
|
|
2356
2027
|
delegateEvents(["click", "keydown"]);
|
|
2357
|
-
var _tmpl$$
|
|
2028
|
+
var _tmpl$$v = /* @__PURE__ */ template(`<div data-slot=code-block>`), _tmpl$2$j = /* @__PURE__ */ template(`<div>`), _tmpl$3$e = /* @__PURE__ */ template(`<span aria-live=polite>`), _tmpl$4$b = /* @__PURE__ */ template(`<span>`), _tmpl$5$7 = /* @__PURE__ */ template(`<pre data-slot=code-block-content dir=ltr tabindex=0><code data-slot=code-block-code>`), _tmpl$6$5 = /* @__PURE__ */ template(`<span data-slot=code-block-line><span data-slot=code-block-line-content>`);
|
|
2358
2029
|
function CodeBlock(props) {
|
|
2359
2030
|
const [local, rest] = splitProps(props, [`class`, `variant`, `size`]);
|
|
2360
2031
|
const variant = () => local.variant ?? `default`;
|
|
2361
2032
|
return (() => {
|
|
2362
|
-
var _el$ = _tmpl$$
|
|
2033
|
+
var _el$ = _tmpl$$v();
|
|
2363
2034
|
spread(_el$, mergeProps({
|
|
2364
2035
|
get ["data-variant"]() {
|
|
2365
2036
|
return variant();
|
|
@@ -2379,7 +2050,7 @@ function CodeBlock(props) {
|
|
|
2379
2050
|
const slotPart = (slot, recipe) => function CodeBlockPart(props) {
|
|
2380
2051
|
const [local, rest] = splitProps(props, [`class`]);
|
|
2381
2052
|
return (() => {
|
|
2382
|
-
var _el$2 = _tmpl$2$
|
|
2053
|
+
var _el$2 = _tmpl$2$j();
|
|
2383
2054
|
setAttribute(_el$2, "data-slot", slot);
|
|
2384
2055
|
spread(_el$2, mergeProps({
|
|
2385
2056
|
get ["class"]() {
|
|
@@ -2451,7 +2122,7 @@ function CodeBlockCopyButton(props) {
|
|
|
2451
2122
|
});
|
|
2452
2123
|
}
|
|
2453
2124
|
})), (() => {
|
|
2454
|
-
var _el$3 = _tmpl$3$
|
|
2125
|
+
var _el$3 = _tmpl$3$e();
|
|
2455
2126
|
insert(_el$3, (() => {
|
|
2456
2127
|
var _c$ = memo(() => !!copied());
|
|
2457
2128
|
return () => _c$() ? labels().copied : ``;
|
|
@@ -2488,7 +2159,7 @@ function CodeBlockContent(props) {
|
|
|
2488
2159
|
return memo(() => tokens.length === 0)() ? null : createComponent(For, {
|
|
2489
2160
|
each: tokens,
|
|
2490
2161
|
children: (token) => (() => {
|
|
2491
|
-
var _el$4 = _tmpl$4$
|
|
2162
|
+
var _el$4 = _tmpl$4$b();
|
|
2492
2163
|
insert(_el$4, () => token.text);
|
|
2493
2164
|
effect((_p$) => {
|
|
2494
2165
|
var _v$ = token.kind, _v$2 = cn(CODE_TOKEN_CLASS[token.kind], CODE_BLOCK_CLASSES.token);
|
|
@@ -2518,7 +2189,7 @@ function CodeBlockContent(props) {
|
|
|
2518
2189
|
return resolved();
|
|
2519
2190
|
};
|
|
2520
2191
|
return (() => {
|
|
2521
|
-
var _el$5 = _tmpl$5$
|
|
2192
|
+
var _el$5 = _tmpl$5$7(), _el$6 = _el$5.firstChild;
|
|
2522
2193
|
spread(_el$5, mergeProps({
|
|
2523
2194
|
get ["data-wrap"]() {
|
|
2524
2195
|
return local.wrap || void 0;
|
|
@@ -2549,7 +2220,7 @@ function CodeBlockLine(props) {
|
|
|
2549
2220
|
return c === void 0 || c === null || c === `` || Array.isArray(c) && c.length === 0;
|
|
2550
2221
|
};
|
|
2551
2222
|
return (() => {
|
|
2552
|
-
var _el$7 = _tmpl$6$
|
|
2223
|
+
var _el$7 = _tmpl$6$5(), _el$8 = _el$7.firstChild;
|
|
2553
2224
|
spread(_el$7, mergeProps({
|
|
2554
2225
|
get ["data-variant"]() {
|
|
2555
2226
|
return local.variant ?? `default`;
|
|
@@ -2569,7 +2240,7 @@ function CodeBlockLine(props) {
|
|
|
2569
2240
|
return _el$7;
|
|
2570
2241
|
})();
|
|
2571
2242
|
}
|
|
2572
|
-
var _tmpl$$
|
|
2243
|
+
var _tmpl$$u = /* @__PURE__ */ template(`<div data-slot=collapsible>`), _tmpl$2$i = /* @__PURE__ */ template(`<button type=button data-slot=collapsible-trigger>`), _tmpl$3$d = /* @__PURE__ */ template(`<div data-slot=collapsible-content>`);
|
|
2573
2244
|
const CollapsibleContext = createContext();
|
|
2574
2245
|
const call$2 = (handler, e) => {
|
|
2575
2246
|
if (typeof handler === `function`) handler(e);
|
|
@@ -2593,7 +2264,7 @@ function Collapsible(props) {
|
|
|
2593
2264
|
return createComponent(CollapsibleContext.Provider, {
|
|
2594
2265
|
value: state,
|
|
2595
2266
|
get children() {
|
|
2596
|
-
var _el$ = _tmpl$$
|
|
2267
|
+
var _el$ = _tmpl$$u();
|
|
2597
2268
|
spread(_el$, mergeProps({
|
|
2598
2269
|
get ["data-state"]() {
|
|
2599
2270
|
return open() ? `open` : `closed`;
|
|
@@ -2610,7 +2281,7 @@ function CollapsibleTrigger(props) {
|
|
|
2610
2281
|
const ctx = useContext(CollapsibleContext);
|
|
2611
2282
|
const [local, rest] = splitProps(props, [`onClick`]);
|
|
2612
2283
|
return (() => {
|
|
2613
|
-
var _el$2 = _tmpl$2$
|
|
2284
|
+
var _el$2 = _tmpl$2$i();
|
|
2614
2285
|
spread(_el$2, mergeProps({
|
|
2615
2286
|
get ["aria-controls"]() {
|
|
2616
2287
|
return ctx.contentId;
|
|
@@ -2734,7 +2405,7 @@ function CollapsibleContent(props) {
|
|
|
2734
2405
|
};
|
|
2735
2406
|
};
|
|
2736
2407
|
return (() => {
|
|
2737
|
-
var _el$3 = _tmpl$3$
|
|
2408
|
+
var _el$3 = _tmpl$3$d();
|
|
2738
2409
|
use((el) => {
|
|
2739
2410
|
node2 = el;
|
|
2740
2411
|
if (typeof local.ref === `function`) local.ref(el);
|
|
@@ -2768,10 +2439,10 @@ function CollapsibleContent(props) {
|
|
|
2768
2439
|
return _el$3;
|
|
2769
2440
|
})();
|
|
2770
2441
|
}
|
|
2771
|
-
var _tmpl$$
|
|
2442
|
+
var _tmpl$$t = /* @__PURE__ */ template(`<div data-slot=command tabindex=-1><label data-slot=command-label>`), _tmpl$2$h = /* @__PURE__ */ template(`<button type=button data-slot=command-input-clear>`), _tmpl$3$c = /* @__PURE__ */ template(`<div data-slot=command-input-wrapper><input data-slot=command-input>`), _tmpl$4$a = /* @__PURE__ */ template(`<div data-slot=command-list><div data-slot=command-list-sizer>`), _tmpl$5$6 = /* @__PURE__ */ template(`<div data-slot=command-empty>`), _tmpl$6$4 = /* @__PURE__ */ template(`<div data-slot=command-group-heading aria-hidden=true>`), _tmpl$7$2 = /* @__PURE__ */ template(`<div data-slot=command-group><div data-slot=command-group-items role=group>`), _tmpl$8$2 = /* @__PURE__ */ template(`<div data-slot=command-item>`), _tmpl$9$1 = /* @__PURE__ */ template(`<div data-slot=command-separator>`), _tmpl$0$1 = /* @__PURE__ */ template(`<span data-slot=command-shortcut>`);
|
|
2772
2443
|
const CommandContext = createContext();
|
|
2773
2444
|
const GroupContext$1 = createContext();
|
|
2774
|
-
function useRoot
|
|
2445
|
+
function useRoot() {
|
|
2775
2446
|
const ctx = useContext(CommandContext);
|
|
2776
2447
|
if (!ctx) throw new Error(`Command parts must sit inside <Command>`);
|
|
2777
2448
|
return ctx;
|
|
@@ -2815,7 +2486,7 @@ function Command(props) {
|
|
|
2815
2486
|
labelId: createUniqueId()
|
|
2816
2487
|
};
|
|
2817
2488
|
return (() => {
|
|
2818
|
-
var _el$ = _tmpl$$
|
|
2489
|
+
var _el$ = _tmpl$$t(), _el$2 = _el$.firstChild;
|
|
2819
2490
|
spread(_el$, mergeProps({
|
|
2820
2491
|
get ["class"]() {
|
|
2821
2492
|
return cn(COMMAND_CLASSES.root, local.class);
|
|
@@ -2855,7 +2526,7 @@ function CommandInput(props) {
|
|
|
2855
2526
|
listId,
|
|
2856
2527
|
inputId,
|
|
2857
2528
|
labelId
|
|
2858
|
-
} = useRoot
|
|
2529
|
+
} = useRoot();
|
|
2859
2530
|
let input;
|
|
2860
2531
|
const controlled = () => local.value !== void 0;
|
|
2861
2532
|
store.setSearch(local.value ?? local.defaultValue ?? ``, true);
|
|
@@ -2877,7 +2548,7 @@ function CommandInput(props) {
|
|
|
2877
2548
|
return store.selectedId;
|
|
2878
2549
|
};
|
|
2879
2550
|
return (() => {
|
|
2880
|
-
var _el$3 = _tmpl$3$
|
|
2551
|
+
var _el$3 = _tmpl$3$c(), _el$4 = _el$3.firstChild;
|
|
2881
2552
|
insert(_el$3, createComponent(PaintIcon, {
|
|
2882
2553
|
icon: Search,
|
|
2883
2554
|
get ["class"]() {
|
|
@@ -2920,7 +2591,7 @@ function CommandInput(props) {
|
|
|
2920
2591
|
return shown() !== ``;
|
|
2921
2592
|
},
|
|
2922
2593
|
get children() {
|
|
2923
|
-
var _el$5 = _tmpl$2$
|
|
2594
|
+
var _el$5 = _tmpl$2$h();
|
|
2924
2595
|
_el$5.$$click = () => {
|
|
2925
2596
|
change(``);
|
|
2926
2597
|
input?.focus();
|
|
@@ -2958,7 +2629,7 @@ function CommandList(props) {
|
|
|
2958
2629
|
store,
|
|
2959
2630
|
track,
|
|
2960
2631
|
listId
|
|
2961
|
-
} = useRoot
|
|
2632
|
+
} = useRoot();
|
|
2962
2633
|
let list;
|
|
2963
2634
|
let sizer;
|
|
2964
2635
|
onMount(() => {
|
|
@@ -2970,7 +2641,7 @@ function CommandList(props) {
|
|
|
2970
2641
|
return store.selectedId;
|
|
2971
2642
|
};
|
|
2972
2643
|
return (() => {
|
|
2973
|
-
var _el$6 = _tmpl$4$
|
|
2644
|
+
var _el$6 = _tmpl$4$a(), _el$7 = _el$6.firstChild;
|
|
2974
2645
|
var _ref$ = list;
|
|
2975
2646
|
typeof _ref$ === "function" ? use(_ref$, _el$6) : list = _el$6;
|
|
2976
2647
|
spread(_el$6, mergeProps({
|
|
@@ -3001,13 +2672,13 @@ function CommandEmpty(props) {
|
|
|
3001
2672
|
const {
|
|
3002
2673
|
store,
|
|
3003
2674
|
track
|
|
3004
|
-
} = useRoot
|
|
2675
|
+
} = useRoot();
|
|
3005
2676
|
return createComponent(Show, {
|
|
3006
2677
|
get when() {
|
|
3007
2678
|
return track(), store.empty();
|
|
3008
2679
|
},
|
|
3009
2680
|
get children() {
|
|
3010
|
-
var _el$8 = _tmpl$5$
|
|
2681
|
+
var _el$8 = _tmpl$5$6();
|
|
3011
2682
|
spread(_el$8, mergeProps({
|
|
3012
2683
|
get ["class"]() {
|
|
3013
2684
|
return cn(COMMAND_CLASSES.empty, local.class);
|
|
@@ -3032,7 +2703,7 @@ function CommandGroup(props) {
|
|
|
3032
2703
|
const {
|
|
3033
2704
|
store,
|
|
3034
2705
|
track
|
|
3035
|
-
} = useRoot
|
|
2706
|
+
} = useRoot();
|
|
3036
2707
|
const id = createUniqueId();
|
|
3037
2708
|
const headingId = createUniqueId();
|
|
3038
2709
|
const seq = store.nextSeq();
|
|
@@ -3049,7 +2720,7 @@ function CommandGroup(props) {
|
|
|
3049
2720
|
const heading = children(() => local.heading);
|
|
3050
2721
|
const groupValue = () => local.value ?? (typeof local.heading === `string` ? local.heading : void 0);
|
|
3051
2722
|
return (() => {
|
|
3052
|
-
var _el$9 = _tmpl$7$
|
|
2723
|
+
var _el$9 = _tmpl$7$2(), _el$1 = _el$9.firstChild;
|
|
3053
2724
|
var _ref$2 = el;
|
|
3054
2725
|
typeof _ref$2 === "function" ? use(_ref$2, _el$9) : el = _el$9;
|
|
3055
2726
|
spread(_el$9, mergeProps({
|
|
@@ -3070,7 +2741,7 @@ function CommandGroup(props) {
|
|
|
3070
2741
|
return heading();
|
|
3071
2742
|
},
|
|
3072
2743
|
get children() {
|
|
3073
|
-
var _el$0 = _tmpl$6$
|
|
2744
|
+
var _el$0 = _tmpl$6$4();
|
|
3074
2745
|
setAttribute(_el$0, "id", headingId);
|
|
3075
2746
|
insert(_el$0, heading);
|
|
3076
2747
|
effect(() => className(_el$0, COMMAND_CLASSES.groupHeading));
|
|
@@ -3097,7 +2768,7 @@ function CommandItem(props) {
|
|
|
3097
2768
|
const {
|
|
3098
2769
|
store,
|
|
3099
2770
|
track
|
|
3100
|
-
} = useRoot
|
|
2771
|
+
} = useRoot();
|
|
3101
2772
|
const group = useContext(GroupContext$1);
|
|
3102
2773
|
const id = createUniqueId();
|
|
3103
2774
|
const seq = store.nextSeq();
|
|
@@ -3143,7 +2814,7 @@ function CommandItem(props) {
|
|
|
3143
2814
|
get children() {
|
|
3144
2815
|
return (() => {
|
|
3145
2816
|
const node2 = (() => {
|
|
3146
|
-
var _el$10 = _tmpl$8$
|
|
2817
|
+
var _el$10 = _tmpl$8$2();
|
|
3147
2818
|
spread(_el$10, mergeProps({
|
|
3148
2819
|
get ["class"]() {
|
|
3149
2820
|
return cn(COMMAND_CLASSES.item, local.class);
|
|
@@ -3203,7 +2874,7 @@ function CommandSeparator(props) {
|
|
|
3203
2874
|
const {
|
|
3204
2875
|
store,
|
|
3205
2876
|
track
|
|
3206
|
-
} = useRoot
|
|
2877
|
+
} = useRoot();
|
|
3207
2878
|
const id = createUniqueId();
|
|
3208
2879
|
const seq = store.nextSeq();
|
|
3209
2880
|
let el;
|
|
@@ -3219,7 +2890,7 @@ function CommandSeparator(props) {
|
|
|
3219
2890
|
get children() {
|
|
3220
2891
|
return (() => {
|
|
3221
2892
|
const node2 = (() => {
|
|
3222
|
-
var _el$11 = _tmpl$9$
|
|
2893
|
+
var _el$11 = _tmpl$9$1();
|
|
3223
2894
|
spread(_el$11, mergeProps({
|
|
3224
2895
|
get ["class"]() {
|
|
3225
2896
|
return cn(COMMAND_CLASSES.separator, local.class);
|
|
@@ -3247,7 +2918,7 @@ function CommandSeparator(props) {
|
|
|
3247
2918
|
function CommandShortcut(props) {
|
|
3248
2919
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3249
2920
|
return (() => {
|
|
3250
|
-
var _el$12 = _tmpl$0$
|
|
2921
|
+
var _el$12 = _tmpl$0$1();
|
|
3251
2922
|
spread(_el$12, mergeProps({
|
|
3252
2923
|
get ["class"]() {
|
|
3253
2924
|
return cn(COMMAND_CLASSES.shortcut, local.class);
|
|
@@ -3257,7 +2928,7 @@ function CommandShortcut(props) {
|
|
|
3257
2928
|
})();
|
|
3258
2929
|
}
|
|
3259
2930
|
delegateEvents(["click"]);
|
|
3260
|
-
var _tmpl$$
|
|
2931
|
+
var _tmpl$$s = /* @__PURE__ */ template(`<svg><circle fill=none stroke=currentColor stroke-linecap=round></svg>`, false, true, false), _tmpl$2$g = /* @__PURE__ */ template(`<svg aria-hidden=true><circle fill=none stroke=currentColor opacity=0.2>`);
|
|
3261
2932
|
function ContextRing(props) {
|
|
3262
2933
|
const [local, rest] = splitProps(props, [`percent`, `tone`, `showEmpty`, `class`]);
|
|
3263
2934
|
const value = () => local.percent ?? null;
|
|
@@ -3279,7 +2950,7 @@ function ContextRing(props) {
|
|
|
3279
2950
|
}
|
|
3280
2951
|
}, rest, {
|
|
3281
2952
|
get children() {
|
|
3282
|
-
var _el$ = _tmpl$2$
|
|
2953
|
+
var _el$ = _tmpl$2$g(), _el$2 = _el$.firstChild;
|
|
3283
2954
|
setAttribute(_el$, "viewBox", `0 0 ${RING_SIZE} ${RING_SIZE}`);
|
|
3284
2955
|
setAttribute(_el$, "width", RING_SIZE);
|
|
3285
2956
|
setAttribute(_el$, "height", RING_SIZE);
|
|
@@ -3292,7 +2963,7 @@ function ContextRing(props) {
|
|
|
3292
2963
|
return value() !== null;
|
|
3293
2964
|
},
|
|
3294
2965
|
get children() {
|
|
3295
|
-
var _el$3 = _tmpl$$
|
|
2966
|
+
var _el$3 = _tmpl$$s();
|
|
3296
2967
|
setAttribute(_el$3, "cx", RING_SIZE / 2);
|
|
3297
2968
|
setAttribute(_el$3, "cy", RING_SIZE / 2);
|
|
3298
2969
|
setAttribute(_el$3, "r", RING_RADIUS);
|
|
@@ -3316,7 +2987,7 @@ function ContextRing(props) {
|
|
|
3316
2987
|
}
|
|
3317
2988
|
});
|
|
3318
2989
|
}
|
|
3319
|
-
var _tmpl$$
|
|
2990
|
+
var _tmpl$$r = /* @__PURE__ */ template(`<div data-slot=sheet-grabber aria-hidden=true>`);
|
|
3320
2991
|
const SheetDragContext = createContext(null);
|
|
3321
2992
|
function SheetDragProvider(props) {
|
|
3322
2993
|
return createComponent(SheetDragContext.Provider, {
|
|
@@ -3335,7 +3006,7 @@ function SheetGrabber(props) {
|
|
|
3335
3006
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3336
3007
|
const drag = createSheetDragHandleProps();
|
|
3337
3008
|
return (() => {
|
|
3338
|
-
var _el$ = _tmpl$$
|
|
3009
|
+
var _el$ = _tmpl$$r();
|
|
3339
3010
|
spread(_el$, mergeProps(drag ?? {}, rest, {
|
|
3340
3011
|
get ["class"]() {
|
|
3341
3012
|
return cn(SHEET_CHROME_CLASSES.grabber, local.class);
|
|
@@ -3432,7 +3103,7 @@ function createSheetDrag(opts) {
|
|
|
3432
3103
|
};
|
|
3433
3104
|
return { handleProps };
|
|
3434
3105
|
}
|
|
3435
|
-
var _tmpl$$
|
|
3106
|
+
var _tmpl$$q = /* @__PURE__ */ template(`<span>Close`), _tmpl$2$f = /* @__PURE__ */ template(`<div data-slot=sheet-header>`), _tmpl$3$b = /* @__PURE__ */ template(`<div data-slot=sheet-footer>`);
|
|
3436
3107
|
function Sheet(props) {
|
|
3437
3108
|
return createComponent(DialogRoot, props);
|
|
3438
3109
|
}
|
|
@@ -3542,7 +3213,7 @@ function SheetContent(props) {
|
|
|
3542
3213
|
return SHEET_CLASSES.closeIcon;
|
|
3543
3214
|
}
|
|
3544
3215
|
}), (() => {
|
|
3545
|
-
var _el$ = _tmpl$$
|
|
3216
|
+
var _el$ = _tmpl$$q();
|
|
3546
3217
|
effect(() => className(_el$, SHEET_CLASSES.srOnly));
|
|
3547
3218
|
return _el$;
|
|
3548
3219
|
})()];
|
|
@@ -3561,7 +3232,7 @@ function SheetHeader(props) {
|
|
|
3561
3232
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3562
3233
|
const drag = createSheetDragHandleProps();
|
|
3563
3234
|
return (() => {
|
|
3564
|
-
var _el$2 = _tmpl$2$
|
|
3235
|
+
var _el$2 = _tmpl$2$f();
|
|
3565
3236
|
spread(_el$2, mergeProps(drag ?? {}, {
|
|
3566
3237
|
get ["class"]() {
|
|
3567
3238
|
return cn(SHEET_CLASSES.header, local.class);
|
|
@@ -3573,7 +3244,7 @@ function SheetHeader(props) {
|
|
|
3573
3244
|
function SheetFooter(props) {
|
|
3574
3245
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3575
3246
|
return (() => {
|
|
3576
|
-
var _el$3 = _tmpl$3$
|
|
3247
|
+
var _el$3 = _tmpl$3$b();
|
|
3577
3248
|
spread(_el$3, mergeProps({
|
|
3578
3249
|
get ["class"]() {
|
|
3579
3250
|
return cn(SHEET_CLASSES.footer, local.class);
|
|
@@ -3600,7 +3271,7 @@ function SheetDescription(props) {
|
|
|
3600
3271
|
}
|
|
3601
3272
|
}, rest));
|
|
3602
3273
|
}
|
|
3603
|
-
var _tmpl$$
|
|
3274
|
+
var _tmpl$$p = /* @__PURE__ */ template(`<span>Close`), _tmpl$2$e = /* @__PURE__ */ template(`<div data-slot=dialog-header>`), _tmpl$3$a = /* @__PURE__ */ template(`<div data-slot=dialog-body>`), _tmpl$4$9 = /* @__PURE__ */ template(`<div data-slot=dialog-footer>`);
|
|
3604
3275
|
function Dialog(props) {
|
|
3605
3276
|
return createComponent(DialogRoot, props);
|
|
3606
3277
|
}
|
|
@@ -3631,7 +3302,7 @@ function DialogContent(props) {
|
|
|
3631
3302
|
const [local, rest] = splitProps(props, [`class`, `children`, `showCloseButton`, `mobile`, `ref`, `onInteractOutside`, `container`]);
|
|
3632
3303
|
const mobile = () => local.mobile ?? `sheet`;
|
|
3633
3304
|
const isSheet = () => mobile() === `sheet` || mobile() === `sheet-full`;
|
|
3634
|
-
const isPhone = createMediaQuery
|
|
3305
|
+
const isPhone = createMediaQuery(DIALOG_PHONE_QUERY);
|
|
3635
3306
|
let panel;
|
|
3636
3307
|
let dragClose;
|
|
3637
3308
|
const {
|
|
@@ -3720,7 +3391,7 @@ function DialogContent(props) {
|
|
|
3720
3391
|
return [createComponent(PaintIcon, {
|
|
3721
3392
|
icon: X
|
|
3722
3393
|
}), (() => {
|
|
3723
|
-
var _el$ = _tmpl$$
|
|
3394
|
+
var _el$ = _tmpl$$p();
|
|
3724
3395
|
effect(() => className(_el$, DIALOG_CLASSES.srOnly));
|
|
3725
3396
|
return _el$;
|
|
3726
3397
|
})()];
|
|
@@ -3773,7 +3444,7 @@ function DialogHeader(props) {
|
|
|
3773
3444
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3774
3445
|
const drag = createSheetDragHandleProps();
|
|
3775
3446
|
return (() => {
|
|
3776
|
-
var _el$2 = _tmpl$2$
|
|
3447
|
+
var _el$2 = _tmpl$2$e();
|
|
3777
3448
|
spread(_el$2, mergeProps(drag ?? {}, {
|
|
3778
3449
|
get ["class"]() {
|
|
3779
3450
|
return cn(DIALOG_CLASSES.header, local.class);
|
|
@@ -3785,7 +3456,7 @@ function DialogHeader(props) {
|
|
|
3785
3456
|
function DialogBody(props) {
|
|
3786
3457
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3787
3458
|
return (() => {
|
|
3788
|
-
var _el$3 = _tmpl$3$
|
|
3459
|
+
var _el$3 = _tmpl$3$a();
|
|
3789
3460
|
spread(_el$3, mergeProps({
|
|
3790
3461
|
get ["class"]() {
|
|
3791
3462
|
return cn(DIALOG_CLASSES.body, local.class);
|
|
@@ -3797,7 +3468,7 @@ function DialogBody(props) {
|
|
|
3797
3468
|
function DialogFooter(props) {
|
|
3798
3469
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3799
3470
|
return (() => {
|
|
3800
|
-
var _el$4 = _tmpl$4$
|
|
3471
|
+
var _el$4 = _tmpl$4$9();
|
|
3801
3472
|
spread(_el$4, mergeProps({
|
|
3802
3473
|
get ["class"]() {
|
|
3803
3474
|
return cn(DIALOG_CLASSES.footer, local.class);
|
|
@@ -3842,7 +3513,7 @@ function DialogDescription(props) {
|
|
|
3842
3513
|
}
|
|
3843
3514
|
}, rest));
|
|
3844
3515
|
}
|
|
3845
|
-
var _tmpl$$
|
|
3516
|
+
var _tmpl$$o = /* @__PURE__ */ template(`<button type=button data-slot=disclosure-header>`);
|
|
3846
3517
|
function DisclosureHeader(props) {
|
|
3847
3518
|
const [local, rest] = splitProps(props, [`open`, `onToggle`, `chevron`, `class`, `children`]);
|
|
3848
3519
|
const chevron = () => local.chevron ?? `leading`;
|
|
@@ -3856,7 +3527,7 @@ function DisclosureHeader(props) {
|
|
|
3856
3527
|
}
|
|
3857
3528
|
});
|
|
3858
3529
|
return (() => {
|
|
3859
|
-
var _el$ = _tmpl$$
|
|
3530
|
+
var _el$ = _tmpl$$o();
|
|
3860
3531
|
_el$.$$click = () => local.onToggle();
|
|
3861
3532
|
spread(_el$, mergeProps({
|
|
3862
3533
|
get ["data-chevron"]() {
|
|
@@ -3874,899 +3545,228 @@ function DisclosureHeader(props) {
|
|
|
3874
3545
|
return () => _c$() && glyph();
|
|
3875
3546
|
})(), null);
|
|
3876
3547
|
insert(_el$, () => local.children, null);
|
|
3877
|
-
insert(_el$, (() => {
|
|
3878
|
-
var _c$2 = memo(() => chevron() === `trailing`);
|
|
3879
|
-
return () => _c$2() && glyph();
|
|
3880
|
-
})(), null);
|
|
3881
|
-
return _el$;
|
|
3882
|
-
})();
|
|
3883
|
-
}
|
|
3884
|
-
delegateEvents(["click"]);
|
|
3885
|
-
var _tmpl$$o = /* @__PURE__ */ template(`<span data-slot=dock-card-caption>`), _tmpl$2$e = /* @__PURE__ */ template(`<span data-slot=dock-card-meta>`), _tmpl$3$a = /* @__PURE__ */ template(`<div data-slot=dock-card><div data-slot=dock-card-body><div><div><span data-slot=dock-card-label></span></div><div><span data-slot=dock-card-title>`), _tmpl$4$9 = /* @__PURE__ */ template(`<span data-slot=dock-card-trailing>`), _tmpl$5$6 = /* @__PURE__ */ template(`<div data-slot=dock-pile>`), _tmpl$6$4 = /* @__PURE__ */ template(`<div data-slot=dock-pile-item>`);
|
|
3886
|
-
function DockCard(props) {
|
|
3887
|
-
const [local, rest] = splitProps(props, [`tint`, `icon`, `label`, `caption`, `meta`, `title`, `onOpen`, `trailing`, `hidden`, `openLabel`, `class`]);
|
|
3888
|
-
const tint = () => local.tint ?? `muted`;
|
|
3889
|
-
const pressable = () => local.onOpen !== void 0;
|
|
3890
|
-
const has = (value) => value !== void 0 && value !== null;
|
|
3891
|
-
return (() => {
|
|
3892
|
-
var _el$ = _tmpl$3$a(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$8 = _el$4.nextSibling, _el$9 = _el$8.firstChild;
|
|
3893
|
-
_el$.$$keydown = (event) => {
|
|
3894
|
-
if (!pressable() || event.defaultPrevented) return;
|
|
3895
|
-
if (event.key === `Enter` || event.key === ` `) {
|
|
3896
|
-
event.preventDefault();
|
|
3897
|
-
local.onOpen?.();
|
|
3898
|
-
}
|
|
3899
|
-
};
|
|
3900
|
-
_el$.$$click = () => local.onOpen?.();
|
|
3901
|
-
spread(_el$, mergeProps({
|
|
3902
|
-
get role() {
|
|
3903
|
-
return pressable() ? `button` : void 0;
|
|
3904
|
-
},
|
|
3905
|
-
get tabIndex() {
|
|
3906
|
-
return pressable() && !local.hidden ? 0 : void 0;
|
|
3907
|
-
},
|
|
3908
|
-
get ["aria-label"]() {
|
|
3909
|
-
return memo(() => !!pressable())() ? local.openLabel : void 0;
|
|
3910
|
-
},
|
|
3911
|
-
get ["aria-hidden"]() {
|
|
3912
|
-
return local.hidden ? true : void 0;
|
|
3913
|
-
},
|
|
3914
|
-
get ["class"]() {
|
|
3915
|
-
return cn(DOCK_CARD_CLASSES.root, pressable() && DOCK_CARD_CLASSES.pressable, local.class);
|
|
3916
|
-
}
|
|
3917
|
-
}, rest), false, true);
|
|
3918
|
-
insert(_el$2, createComponent(Show, {
|
|
3919
|
-
get when() {
|
|
3920
|
-
return local.icon;
|
|
3921
|
-
},
|
|
3922
|
-
children: (icon) => createComponent(PaintIcon, {
|
|
3923
|
-
get icon() {
|
|
3924
|
-
return icon();
|
|
3925
|
-
},
|
|
3926
|
-
"aria-hidden": true,
|
|
3927
|
-
"data-slot": "dock-card-icon",
|
|
3928
|
-
get ["class"]() {
|
|
3929
|
-
return cn(DOCK_CARD_CLASSES.icon, DOCK_CARD_CLASSES.tint[tint()]);
|
|
3930
|
-
}
|
|
3931
|
-
})
|
|
3932
|
-
}), _el$3);
|
|
3933
|
-
insert(_el$5, () => local.label);
|
|
3934
|
-
insert(_el$4, createComponent(Show, {
|
|
3935
|
-
get when() {
|
|
3936
|
-
return has(local.caption);
|
|
3937
|
-
},
|
|
3938
|
-
get children() {
|
|
3939
|
-
var _el$6 = _tmpl$$o();
|
|
3940
|
-
insert(_el$6, () => local.caption);
|
|
3941
|
-
effect(() => className(_el$6, DOCK_CARD_CLASSES.caption));
|
|
3942
|
-
return _el$6;
|
|
3943
|
-
}
|
|
3944
|
-
}), null);
|
|
3945
|
-
insert(_el$4, createComponent(Show, {
|
|
3946
|
-
get when() {
|
|
3947
|
-
return has(local.meta);
|
|
3948
|
-
},
|
|
3949
|
-
get children() {
|
|
3950
|
-
var _el$7 = _tmpl$2$e();
|
|
3951
|
-
insert(_el$7, () => local.meta);
|
|
3952
|
-
effect(() => className(_el$7, DOCK_CARD_CLASSES.meta));
|
|
3953
|
-
return _el$7;
|
|
3954
|
-
}
|
|
3955
|
-
}), null);
|
|
3956
|
-
insert(_el$9, () => local.title);
|
|
3957
|
-
insert(_el$8, createComponent(Show, {
|
|
3958
|
-
get when() {
|
|
3959
|
-
return pressable();
|
|
3960
|
-
},
|
|
3961
|
-
get fallback() {
|
|
3962
|
-
return createComponent(Show, {
|
|
3963
|
-
get when() {
|
|
3964
|
-
return has(local.trailing);
|
|
3965
|
-
},
|
|
3966
|
-
get children() {
|
|
3967
|
-
var _el$0 = _tmpl$4$9();
|
|
3968
|
-
insert(_el$0, () => local.trailing);
|
|
3969
|
-
effect(() => className(_el$0, DOCK_CARD_CLASSES.trailing));
|
|
3970
|
-
return _el$0;
|
|
3971
|
-
}
|
|
3972
|
-
});
|
|
3973
|
-
},
|
|
3974
|
-
get children() {
|
|
3975
|
-
return createComponent(PaintIcon, {
|
|
3976
|
-
icon: ChevronRight,
|
|
3977
|
-
"aria-hidden": true,
|
|
3978
|
-
"data-slot": "dock-card-chevron",
|
|
3979
|
-
get ["class"]() {
|
|
3980
|
-
return DOCK_CARD_CLASSES.chevron;
|
|
3981
|
-
}
|
|
3982
|
-
});
|
|
3983
|
-
}
|
|
3984
|
-
}), null);
|
|
3985
|
-
effect((_p$) => {
|
|
3986
|
-
var _v$ = local.hidden ? `true` : `false`, _v$2 = DOCK_CARD_CLASSES.body, _v$3 = DOCK_CARD_CLASSES.text, _v$4 = DOCK_CARD_CLASSES.header, _v$5 = cn(DOCK_CARD_CLASSES.label, DOCK_CARD_CLASSES.tint[tint()]), _v$6 = DOCK_CARD_CLASSES.row, _v$7 = DOCK_CARD_CLASSES.title;
|
|
3987
|
-
_v$ !== _p$.e && setAttribute(_el$2, "data-hidden", _p$.e = _v$);
|
|
3988
|
-
_v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
|
|
3989
|
-
_v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
|
|
3990
|
-
_v$4 !== _p$.o && className(_el$4, _p$.o = _v$4);
|
|
3991
|
-
_v$5 !== _p$.i && className(_el$5, _p$.i = _v$5);
|
|
3992
|
-
_v$6 !== _p$.n && className(_el$8, _p$.n = _v$6);
|
|
3993
|
-
_v$7 !== _p$.s && className(_el$9, _p$.s = _v$7);
|
|
3994
|
-
return _p$;
|
|
3995
|
-
}, {
|
|
3996
|
-
e: void 0,
|
|
3997
|
-
t: void 0,
|
|
3998
|
-
a: void 0,
|
|
3999
|
-
o: void 0,
|
|
4000
|
-
i: void 0,
|
|
4001
|
-
n: void 0,
|
|
4002
|
-
s: void 0
|
|
4003
|
-
});
|
|
4004
|
-
return _el$;
|
|
4005
|
-
})();
|
|
4006
|
-
}
|
|
4007
|
-
function DockPile(props) {
|
|
4008
|
-
const [local, rest] = splitProps(props, [`items`, `expanded`, `onExpandedChange`, `class`, `style`]);
|
|
4009
|
-
const [measured, setMeasured] = createSignal({});
|
|
4010
|
-
const nodes = /* @__PURE__ */ new Map();
|
|
4011
|
-
const measure = () => {
|
|
4012
|
-
const next = {};
|
|
4013
|
-
for (const item of local.items) {
|
|
4014
|
-
const el = nodes.get(item.id);
|
|
4015
|
-
if (item.height === void 0 && el) next[item.id] = el.offsetHeight;
|
|
4016
|
-
}
|
|
4017
|
-
const prev = measured();
|
|
4018
|
-
if (!(Object.keys(next).length === Object.keys(prev).length && Object.entries(next).every(([k, v]) => prev[k] === v))) setMeasured(next);
|
|
4019
|
-
};
|
|
4020
|
-
createEffect(() => {
|
|
4021
|
-
void local.items;
|
|
4022
|
-
measure();
|
|
4023
|
-
if (typeof ResizeObserver === `undefined`) return;
|
|
4024
|
-
const observer = new ResizeObserver(measure);
|
|
4025
|
-
for (const el of nodes.values()) observer.observe(el);
|
|
4026
|
-
onCleanup(() => observer.disconnect());
|
|
4027
|
-
});
|
|
4028
|
-
const geometry = createMemo(() => dockPileGeometry(local.items.map((item) => item.height ?? measured()[item.id] ?? 0), local.expanded));
|
|
4029
|
-
return (() => {
|
|
4030
|
-
var _el$1 = _tmpl$5$6();
|
|
4031
|
-
_el$1.$$focusout = (event) => {
|
|
4032
|
-
const next = event.relatedTarget;
|
|
4033
|
-
if (!next || !event.currentTarget.contains(next)) local.onExpandedChange?.(false);
|
|
4034
|
-
};
|
|
4035
|
-
_el$1.$$focusin = () => local.onExpandedChange?.(true);
|
|
4036
|
-
_el$1.addEventListener("pointerleave", (event) => {
|
|
4037
|
-
if (event.pointerType !== `touch`) local.onExpandedChange?.(false);
|
|
4038
|
-
});
|
|
4039
|
-
_el$1.addEventListener("pointerenter", (event) => {
|
|
4040
|
-
if (event.pointerType !== `touch`) local.onExpandedChange?.(true);
|
|
4041
|
-
});
|
|
4042
|
-
use((el) => bindStyle(el, () => ({
|
|
4043
|
-
...local.style ?? {},
|
|
4044
|
-
height: `${geometry().height}px`
|
|
4045
|
-
})), _el$1);
|
|
4046
|
-
spread(_el$1, mergeProps({
|
|
4047
|
-
get ["data-expanded"]() {
|
|
4048
|
-
return local.expanded ? `true` : `false`;
|
|
4049
|
-
},
|
|
4050
|
-
get ["class"]() {
|
|
4051
|
-
return cn(DOCK_PILE_CLASSES.root, local.class);
|
|
4052
|
-
}
|
|
4053
|
-
}, rest), false, true);
|
|
4054
|
-
insert(_el$1, createComponent(For, {
|
|
4055
|
-
get each() {
|
|
4056
|
-
return local.items;
|
|
4057
|
-
},
|
|
4058
|
-
children: (item, i) => {
|
|
4059
|
-
const placed = () => geometry().items[i()] ?? {
|
|
4060
|
-
offset: 0,
|
|
4061
|
-
scale: 1,
|
|
4062
|
-
visible: true
|
|
4063
|
-
};
|
|
4064
|
-
let node2;
|
|
4065
|
-
onCleanup(() => {
|
|
4066
|
-
if (nodes.get(item.id) === node2) nodes.delete(item.id);
|
|
4067
|
-
});
|
|
4068
|
-
return (() => {
|
|
4069
|
-
var _el$10 = _tmpl$6$4();
|
|
4070
|
-
use((el) => {
|
|
4071
|
-
node2 = el;
|
|
4072
|
-
nodes.set(item.id, el);
|
|
4073
|
-
bindStyle(el, () => css({
|
|
4074
|
-
"--offset": `${placed().offset}px`,
|
|
4075
|
-
"--scale": `${placed().scale}`,
|
|
4076
|
-
zIndex: i() + 1
|
|
4077
|
-
}));
|
|
4078
|
-
}, _el$10);
|
|
4079
|
-
insert(_el$10, () => item.node);
|
|
4080
|
-
effect((_p$) => {
|
|
4081
|
-
var _v$8 = i() === local.items.length - 1 ? `true` : `false`, _v$9 = placed().visible ? `true` : `false`, _v$0 = DOCK_PILE_CLASSES.item;
|
|
4082
|
-
_v$8 !== _p$.e && setAttribute(_el$10, "data-front", _p$.e = _v$8);
|
|
4083
|
-
_v$9 !== _p$.t && setAttribute(_el$10, "data-visible", _p$.t = _v$9);
|
|
4084
|
-
_v$0 !== _p$.a && className(_el$10, _p$.a = _v$0);
|
|
4085
|
-
return _p$;
|
|
4086
|
-
}, {
|
|
4087
|
-
e: void 0,
|
|
4088
|
-
t: void 0,
|
|
4089
|
-
a: void 0
|
|
4090
|
-
});
|
|
4091
|
-
return _el$10;
|
|
4092
|
-
})();
|
|
4093
|
-
}
|
|
4094
|
-
}));
|
|
4095
|
-
return _el$1;
|
|
4096
|
-
})();
|
|
4097
|
-
}
|
|
4098
|
-
delegateEvents(["click", "keydown", "focusin", "focusout"]);
|
|
4099
|
-
var _tmpl$$n = /* @__PURE__ */ template(`<div role=group data-slot=dropdown-menu-group>`), _tmpl$2$d = /* @__PURE__ */ template(`<div role=menuitem>`), _tmpl$3$9 = /* @__PURE__ */ template(`<span>`), _tmpl$4$8 = /* @__PURE__ */ template(`<div role=menuitemcheckbox><span>`), _tmpl$5$5 = /* @__PURE__ */ template(`<div role=group data-slot=dropdown-menu-radio-group>`), _tmpl$6$3 = /* @__PURE__ */ template(`<div role=menuitemradio><span>`), _tmpl$7$2 = /* @__PURE__ */ template(`<div data-slot=dropdown-menu-label>`), _tmpl$8$2 = /* @__PURE__ */ template(`<div role=separator aria-orientation=horizontal data-slot=dropdown-menu-separator>`), _tmpl$9$1 = /* @__PURE__ */ template(`<span data-slot=dropdown-menu-shortcut>`), _tmpl$0$1 = /* @__PURE__ */ template(`<div role=menuitem aria-haspopup=menu>`);
|
|
4100
|
-
const RootContext = createContext();
|
|
4101
|
-
const useRoot = (part2) => {
|
|
4102
|
-
const ctx = useContext(RootContext);
|
|
4103
|
-
if (!ctx) throw new Error(`\`${part2}\` must be used within \`DropdownMenu\``);
|
|
4104
|
-
return ctx;
|
|
4105
|
-
};
|
|
4106
|
-
const LevelOpenContext = createContext(() => false);
|
|
4107
|
-
function DropdownMenu(props) {
|
|
4108
|
-
const [open, setOpen] = createOpenState({
|
|
4109
|
-
open: () => props.open,
|
|
4110
|
-
defaultOpen: props.defaultOpen,
|
|
4111
|
-
onOpenChange: () => props.onOpenChange
|
|
4112
|
-
});
|
|
4113
|
-
const [trigger, setTrigger] = createSignal();
|
|
4114
|
-
useKeyboardTracking();
|
|
4115
|
-
const value = {
|
|
4116
|
-
open,
|
|
4117
|
-
setOpen,
|
|
4118
|
-
triggerId: `radix-${createId()}`,
|
|
4119
|
-
contentId: `radix-${createId()}`,
|
|
4120
|
-
trigger,
|
|
4121
|
-
setTrigger,
|
|
4122
|
-
dir: () => props.dir ?? `ltr`
|
|
4123
|
-
};
|
|
4124
|
-
return createComponent(RootContext.Provider, {
|
|
4125
|
-
value,
|
|
4126
|
-
get children() {
|
|
4127
|
-
return createComponent(LevelOpenContext.Provider, {
|
|
4128
|
-
value: open,
|
|
4129
|
-
get children() {
|
|
4130
|
-
return props.children;
|
|
4131
|
-
}
|
|
4132
|
-
});
|
|
4133
|
-
}
|
|
4134
|
-
});
|
|
4135
|
-
}
|
|
4136
|
-
function DropdownMenuPortal(props) {
|
|
4137
|
-
return createComponent(DialogPortalPart, props);
|
|
4138
|
-
}
|
|
4139
|
-
function DropdownMenuTrigger(props) {
|
|
4140
|
-
const ctx = useRoot(`DropdownMenuTrigger`);
|
|
4141
|
-
const [local, rest] = splitProps(props, [`as`, `ref`, `disabled`, `onPointerDown`, `onKeyDown`]);
|
|
4142
|
-
const disabled = () => local.disabled ?? false;
|
|
4143
|
-
return createComponent(Dynamic, mergeProps({
|
|
4144
|
-
get component() {
|
|
4145
|
-
return local.as ?? `button`;
|
|
4146
|
-
},
|
|
4147
|
-
"data-slot": "dropdown-menu-trigger",
|
|
4148
|
-
type: "button",
|
|
4149
|
-
get id() {
|
|
4150
|
-
return ctx.triggerId;
|
|
4151
|
-
},
|
|
4152
|
-
"aria-haspopup": "menu",
|
|
4153
|
-
get ["aria-expanded"]() {
|
|
4154
|
-
return ctx.open() ? `true` : `false`;
|
|
4155
|
-
},
|
|
4156
|
-
get ["aria-controls"]() {
|
|
4157
|
-
return memo(() => !!ctx.open())() ? ctx.contentId : void 0;
|
|
4158
|
-
},
|
|
4159
|
-
get ["data-state"]() {
|
|
4160
|
-
return stateOf$1(ctx.open());
|
|
4161
|
-
},
|
|
4162
|
-
get ["data-disabled"]() {
|
|
4163
|
-
return disabled() ? `` : void 0;
|
|
4164
|
-
},
|
|
4165
|
-
get disabled() {
|
|
4166
|
-
return disabled();
|
|
4167
|
-
}
|
|
4168
|
-
}, rest, {
|
|
4169
|
-
ref(r$) {
|
|
4170
|
-
var _ref$ = mergeRefs(local.ref, ctx.setTrigger);
|
|
4171
|
-
typeof _ref$ === "function" && _ref$(r$);
|
|
4172
|
-
},
|
|
4173
|
-
get onPointerDown() {
|
|
4174
|
-
return composeHandlers(local.onPointerDown, (e) => {
|
|
4175
|
-
if (!untrack(disabled) && e.button === 0 && e.ctrlKey === false) {
|
|
4176
|
-
const was = untrack(ctx.open);
|
|
4177
|
-
ctx.setOpen(!was);
|
|
4178
|
-
if (!was) e.preventDefault();
|
|
4179
|
-
}
|
|
4180
|
-
});
|
|
4181
|
-
},
|
|
4182
|
-
get onKeyDown() {
|
|
4183
|
-
return composeHandlers(local.onKeyDown, (e) => {
|
|
4184
|
-
if (untrack(disabled)) return;
|
|
4185
|
-
if ([`Enter`, ` `].includes(e.key)) ctx.setOpen(!untrack(ctx.open));
|
|
4186
|
-
if (e.key === `ArrowDown`) ctx.setOpen(true);
|
|
4187
|
-
if ([`Enter`, ` `, `ArrowDown`].includes(e.key)) e.preventDefault();
|
|
4188
|
-
});
|
|
4189
|
-
}
|
|
4190
|
-
}));
|
|
4191
|
-
}
|
|
4192
|
-
const CONTENT_KEYS = [`class`, `side`, `align`, `sideOffset`, `alignOffset`, `collisionPadding`, `container`, `children`, `ref`, `onKeyDown`, `onCloseAutoFocus`, `onEscapeKeyDown`, `onFocusOutside`, `onInteractOutside`];
|
|
4193
|
-
function DropdownMenuContent(props) {
|
|
4194
|
-
const ctx = useRoot(`DropdownMenuContent`);
|
|
4195
|
-
const [local, rest] = splitProps(props, CONTENT_KEYS);
|
|
4196
|
-
const presence = createPresence(ctx.open);
|
|
4197
|
-
let interactedOutside = false;
|
|
4198
|
-
return createComponent(DropdownMenuPortal, {
|
|
4199
|
-
get container() {
|
|
4200
|
-
return local.container;
|
|
4201
|
-
},
|
|
4202
|
-
get children() {
|
|
4203
|
-
return createComponent(Show, {
|
|
4204
|
-
get when() {
|
|
4205
|
-
return presence.mounted();
|
|
4206
|
-
},
|
|
4207
|
-
children: (_) => {
|
|
4208
|
-
const lag = layerMountedThisTask();
|
|
4209
|
-
return createComponent(MenuContent, {
|
|
4210
|
-
get anchor() {
|
|
4211
|
-
return ctx.trigger();
|
|
4212
|
-
},
|
|
4213
|
-
get side() {
|
|
4214
|
-
return local.side ?? `bottom`;
|
|
4215
|
-
},
|
|
4216
|
-
get align() {
|
|
4217
|
-
return local.align ?? `center`;
|
|
4218
|
-
},
|
|
4219
|
-
get sideOffset() {
|
|
4220
|
-
return local.sideOffset ?? 4;
|
|
4221
|
-
},
|
|
4222
|
-
get alignOffset() {
|
|
4223
|
-
return local.alignOffset;
|
|
4224
|
-
},
|
|
4225
|
-
get collisionPadding() {
|
|
4226
|
-
return local.collisionPadding ?? 0;
|
|
4227
|
-
},
|
|
4228
|
-
get dir() {
|
|
4229
|
-
return ctx.dir();
|
|
4230
|
-
},
|
|
4231
|
-
kind: "dropdown-menu",
|
|
4232
|
-
lagParentLayer: lag,
|
|
4233
|
-
root: true,
|
|
4234
|
-
get id() {
|
|
4235
|
-
return ctx.contentId;
|
|
4236
|
-
},
|
|
4237
|
-
get labelledBy() {
|
|
4238
|
-
return ctx.triggerId;
|
|
4239
|
-
},
|
|
4240
|
-
state: () => stateOf$1(ctx.open()),
|
|
4241
|
-
attrs: () => ({
|
|
4242
|
-
"data-slot": `dropdown-menu-content`,
|
|
4243
|
-
class: cn(DROPDOWN_MENU_CLASSES.content, local.class),
|
|
4244
|
-
...rest
|
|
4245
|
-
}),
|
|
4246
|
-
setContent: (el) => {
|
|
4247
|
-
if (el) {
|
|
4248
|
-
presence.ref(el);
|
|
4249
|
-
noteLayerMount();
|
|
4250
|
-
callRef(local.ref, el);
|
|
4251
|
-
}
|
|
4252
|
-
},
|
|
4253
|
-
onDismiss: () => ctx.setOpen(false),
|
|
4254
|
-
get onKeyDown() {
|
|
4255
|
-
return local.onKeyDown;
|
|
4256
|
-
},
|
|
4257
|
-
get onEscapeKeyDown() {
|
|
4258
|
-
return local.onEscapeKeyDown;
|
|
4259
|
-
},
|
|
4260
|
-
get onFocusOutside() {
|
|
4261
|
-
return local.onFocusOutside;
|
|
4262
|
-
},
|
|
4263
|
-
onInteractOutside: (e) => {
|
|
4264
|
-
local.onInteractOutside?.(e);
|
|
4265
|
-
if (e.defaultPrevented) return;
|
|
4266
|
-
const original = e.detail.originalEvent;
|
|
4267
|
-
const ctrlLeftClick = original.button === 0 && original.ctrlKey === true;
|
|
4268
|
-
if (original.button === 2 || ctrlLeftClick) interactedOutside = true;
|
|
4269
|
-
},
|
|
4270
|
-
onCloseAutoFocus: (e) => {
|
|
4271
|
-
local.onCloseAutoFocus?.(e);
|
|
4272
|
-
if (e.defaultPrevented) return;
|
|
4273
|
-
if (!interactedOutside) ctx.trigger()?.focus();
|
|
4274
|
-
interactedOutside = false;
|
|
4275
|
-
e.preventDefault();
|
|
4276
|
-
},
|
|
4277
|
-
get children() {
|
|
4278
|
-
return local.children;
|
|
4279
|
-
}
|
|
4280
|
-
});
|
|
4281
|
-
}
|
|
4282
|
-
});
|
|
4283
|
-
}
|
|
4284
|
-
});
|
|
4285
|
-
}
|
|
4286
|
-
function DropdownMenuGroup(props) {
|
|
4287
|
-
return (() => {
|
|
4288
|
-
var _el$ = _tmpl$$n();
|
|
4289
|
-
spread(_el$, props, false, false);
|
|
4290
|
-
return _el$;
|
|
4291
|
-
})();
|
|
4292
|
-
}
|
|
4293
|
-
const insetAttr = (inset) => inset === void 0 ? void 0 : String(inset);
|
|
4294
|
-
function createItem(local, onSelect) {
|
|
4295
|
-
const root = useRoot(`DropdownMenuItem`);
|
|
4296
|
-
const row = createSelectable(() => local.disabled ?? false, (e) => onSelect(e), () => root.setOpen(false));
|
|
4297
|
-
const h = row.handlers;
|
|
4298
|
-
return {
|
|
4299
|
-
attrs: row.attrs,
|
|
4300
|
-
ref: mergeRefs(row.ref, local.ref),
|
|
4301
|
-
handlers: {
|
|
4302
|
-
onClick: composeHandlers(local.onClick, h.onClick),
|
|
4303
|
-
onPointerDown: composeHandlers(local.onPointerDown, h.onPointerDown, false),
|
|
4304
|
-
onPointerUp: composeHandlers(local.onPointerUp, h.onPointerUp),
|
|
4305
|
-
onPointerMove: composeHandlers(local.onPointerMove, h.onPointerMove),
|
|
4306
|
-
onPointerLeave: composeHandlers(local.onPointerLeave, h.onPointerLeave),
|
|
4307
|
-
onKeyDown: composeHandlers(local.onKeyDown, h.onKeyDown),
|
|
4308
|
-
onFocus: composeHandlers(local.onFocus, h.onFocus),
|
|
4309
|
-
onBlur: composeHandlers(local.onBlur, h.onBlur)
|
|
4310
|
-
}
|
|
4311
|
-
};
|
|
4312
|
-
}
|
|
4313
|
-
const ITEM_KEYS = [`disabled`, `onSelect`, `ref`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerMove`, `onPointerLeave`, `onKeyDown`, `onFocus`, `onBlur`];
|
|
4314
|
-
function DropdownMenuItem(props) {
|
|
4315
|
-
const [local, handlers, rest] = splitProps(props, [`class`, `inset`, `variant`], ITEM_KEYS);
|
|
4316
|
-
const item = createItem(handlers, (e) => handlers.onSelect?.(e));
|
|
4317
|
-
return (() => {
|
|
4318
|
-
var _el$2 = _tmpl$2$d();
|
|
4319
|
-
var _ref$2 = item.ref;
|
|
4320
|
-
typeof _ref$2 === "function" ? use(_ref$2, _el$2) : item.ref = _el$2;
|
|
4321
|
-
spread(_el$2, mergeProps(() => item.attrs(), {
|
|
4322
|
-
"data-slot": "dropdown-menu-item",
|
|
4323
|
-
get ["data-inset"]() {
|
|
4324
|
-
return insetAttr(local.inset);
|
|
4325
|
-
},
|
|
4326
|
-
get ["data-variant"]() {
|
|
4327
|
-
return local.variant ?? `default`;
|
|
4328
|
-
},
|
|
4329
|
-
get ["class"]() {
|
|
4330
|
-
return cn(DROPDOWN_MENU_CLASSES.item, local.class);
|
|
4331
|
-
}
|
|
4332
|
-
}, rest, () => item.handlers), false, false);
|
|
4333
|
-
return _el$2;
|
|
4334
|
-
})();
|
|
4335
|
-
}
|
|
4336
|
-
const checkedState = (c) => c === `indeterminate` ? `indeterminate` : c ? `checked` : `unchecked`;
|
|
4337
|
-
const IndicatorContext = createContext(() => false);
|
|
4338
|
-
function ItemIndicator(props) {
|
|
4339
|
-
const checked = useContext(IndicatorContext);
|
|
4340
|
-
return createComponent(Show, {
|
|
4341
|
-
get when() {
|
|
4342
|
-
return checked() === true || checked() === `indeterminate`;
|
|
4343
|
-
},
|
|
4344
|
-
get children() {
|
|
4345
|
-
var _el$3 = _tmpl$3$9();
|
|
4346
|
-
insert(_el$3, () => props.children);
|
|
4347
|
-
effect(() => setAttribute(_el$3, "data-state", checkedState(checked())));
|
|
4348
|
-
return _el$3;
|
|
4349
|
-
}
|
|
4350
|
-
});
|
|
4351
|
-
}
|
|
4352
|
-
function DropdownMenuCheckboxItem(props) {
|
|
4353
|
-
const [local, handlers, rest] = splitProps(props, [`class`, `children`, `checked`, `onCheckedChange`], ITEM_KEYS);
|
|
4354
|
-
const checked = () => local.checked ?? false;
|
|
4355
|
-
const item = createItem(handlers, (e) => {
|
|
4356
|
-
handlers.onSelect?.(e);
|
|
4357
|
-
const c = untrack(checked);
|
|
4358
|
-
local.onCheckedChange?.(c === `indeterminate` ? true : !c);
|
|
4359
|
-
});
|
|
4360
|
-
return createComponent(IndicatorContext.Provider, {
|
|
4361
|
-
value: checked,
|
|
4362
|
-
get children() {
|
|
4363
|
-
var _el$4 = _tmpl$4$8(), _el$5 = _el$4.firstChild;
|
|
4364
|
-
var _ref$3 = item.ref;
|
|
4365
|
-
typeof _ref$3 === "function" ? use(_ref$3, _el$4) : item.ref = _el$4;
|
|
4366
|
-
spread(_el$4, mergeProps({
|
|
4367
|
-
get ["aria-checked"]() {
|
|
4368
|
-
return memo(() => checked() === `indeterminate`)() ? `mixed` : checked() ? `true` : `false`;
|
|
4369
|
-
}
|
|
4370
|
-
}, () => item.attrs(), {
|
|
4371
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
4372
|
-
get ["class"]() {
|
|
4373
|
-
return cn(DROPDOWN_MENU_CLASSES.checkItem, local.class);
|
|
4374
|
-
}
|
|
4375
|
-
}, rest, {
|
|
4376
|
-
get ["data-state"]() {
|
|
4377
|
-
return checkedState(checked());
|
|
4378
|
-
}
|
|
4379
|
-
}, () => item.handlers), false, true);
|
|
4380
|
-
insert(_el$5, createComponent(ItemIndicator, {
|
|
4381
|
-
get children() {
|
|
4382
|
-
return createComponent(PaintIcon, {
|
|
4383
|
-
icon: Check,
|
|
4384
|
-
get ["class"]() {
|
|
4385
|
-
return DROPDOWN_MENU_CLASSES.checkIcon;
|
|
4386
|
-
}
|
|
4387
|
-
});
|
|
4388
|
-
}
|
|
4389
|
-
}));
|
|
4390
|
-
insert(_el$4, () => local.children, null);
|
|
4391
|
-
effect(() => className(_el$5, DROPDOWN_MENU_CLASSES.itemIndicator));
|
|
4392
|
-
return _el$4;
|
|
4393
|
-
}
|
|
4394
|
-
});
|
|
4395
|
-
}
|
|
4396
|
-
const RadioGroupContext = createContext({
|
|
4397
|
-
value: () => void 0,
|
|
4398
|
-
onValueChange: () => {
|
|
4399
|
-
}
|
|
4400
|
-
});
|
|
4401
|
-
function DropdownMenuRadioGroup(props) {
|
|
4402
|
-
const [local, rest] = splitProps(props, [`value`, `onValueChange`]);
|
|
4403
|
-
return createComponent(RadioGroupContext.Provider, {
|
|
4404
|
-
value: {
|
|
4405
|
-
value: () => local.value,
|
|
4406
|
-
onValueChange: (v) => local.onValueChange?.(v)
|
|
4407
|
-
},
|
|
4408
|
-
get children() {
|
|
4409
|
-
var _el$6 = _tmpl$5$5();
|
|
4410
|
-
spread(_el$6, rest, false, false);
|
|
4411
|
-
return _el$6;
|
|
4412
|
-
}
|
|
4413
|
-
});
|
|
4414
|
-
}
|
|
4415
|
-
function DropdownMenuRadioItem(props) {
|
|
4416
|
-
const [local, handlers, rest] = splitProps(props, [`class`, `children`, `value`], ITEM_KEYS);
|
|
4417
|
-
const group = useContext(RadioGroupContext);
|
|
4418
|
-
const checked = () => local.value === group.value();
|
|
4419
|
-
const item = createItem(handlers, (e) => {
|
|
4420
|
-
handlers.onSelect?.(e);
|
|
4421
|
-
group.onValueChange(local.value);
|
|
4422
|
-
});
|
|
4423
|
-
return createComponent(IndicatorContext.Provider, {
|
|
4424
|
-
value: checked,
|
|
4425
|
-
get children() {
|
|
4426
|
-
var _el$7 = _tmpl$6$3(), _el$8 = _el$7.firstChild;
|
|
4427
|
-
var _ref$4 = item.ref;
|
|
4428
|
-
typeof _ref$4 === "function" ? use(_ref$4, _el$7) : item.ref = _el$7;
|
|
4429
|
-
spread(_el$7, mergeProps({
|
|
4430
|
-
get ["aria-checked"]() {
|
|
4431
|
-
return checked() ? `true` : `false`;
|
|
4432
|
-
}
|
|
4433
|
-
}, () => item.attrs(), {
|
|
4434
|
-
"data-slot": "dropdown-menu-radio-item",
|
|
4435
|
-
get ["class"]() {
|
|
4436
|
-
return cn(DROPDOWN_MENU_CLASSES.checkItem, local.class);
|
|
4437
|
-
}
|
|
4438
|
-
}, rest, {
|
|
4439
|
-
get ["data-state"]() {
|
|
4440
|
-
return checkedState(checked());
|
|
4441
|
-
}
|
|
4442
|
-
}, () => item.handlers), false, true);
|
|
4443
|
-
insert(_el$8, createComponent(ItemIndicator, {
|
|
4444
|
-
get children() {
|
|
4445
|
-
return createComponent(PaintIcon, {
|
|
4446
|
-
icon: Circle,
|
|
4447
|
-
get ["class"]() {
|
|
4448
|
-
return DROPDOWN_MENU_CLASSES.radioIcon;
|
|
4449
|
-
}
|
|
4450
|
-
});
|
|
4451
|
-
}
|
|
4452
|
-
}));
|
|
4453
|
-
insert(_el$7, () => local.children, null);
|
|
4454
|
-
effect(() => className(_el$8, DROPDOWN_MENU_CLASSES.itemIndicator));
|
|
4455
|
-
return _el$7;
|
|
4456
|
-
}
|
|
4457
|
-
});
|
|
4458
|
-
}
|
|
4459
|
-
function DropdownMenuLabel(props) {
|
|
4460
|
-
const [local, rest] = splitProps(props, [`class`, `inset`]);
|
|
4461
|
-
return (() => {
|
|
4462
|
-
var _el$9 = _tmpl$7$2();
|
|
4463
|
-
spread(_el$9, mergeProps({
|
|
4464
|
-
get ["data-inset"]() {
|
|
4465
|
-
return insetAttr(local.inset);
|
|
4466
|
-
},
|
|
4467
|
-
get ["class"]() {
|
|
4468
|
-
return cn(DROPDOWN_MENU_CLASSES.label, local.class);
|
|
4469
|
-
}
|
|
4470
|
-
}, rest), false, false);
|
|
4471
|
-
return _el$9;
|
|
4472
|
-
})();
|
|
4473
|
-
}
|
|
4474
|
-
function DropdownMenuSeparator(props) {
|
|
4475
|
-
const [local, rest] = splitProps(props, [`class`]);
|
|
4476
|
-
return (() => {
|
|
4477
|
-
var _el$0 = _tmpl$8$2();
|
|
4478
|
-
spread(_el$0, mergeProps({
|
|
4479
|
-
get ["class"]() {
|
|
4480
|
-
return cn(DROPDOWN_MENU_CLASSES.separator, local.class);
|
|
4481
|
-
}
|
|
4482
|
-
}, rest), false, false);
|
|
4483
|
-
return _el$0;
|
|
4484
|
-
})();
|
|
4485
|
-
}
|
|
4486
|
-
function DropdownMenuShortcut(props) {
|
|
4487
|
-
const [local, rest] = splitProps(props, [`class`]);
|
|
4488
|
-
return (() => {
|
|
4489
|
-
var _el$1 = _tmpl$9$1();
|
|
4490
|
-
spread(_el$1, mergeProps({
|
|
4491
|
-
get ["class"]() {
|
|
4492
|
-
return cn(DROPDOWN_MENU_CLASSES.shortcut, local.class);
|
|
4493
|
-
}
|
|
4494
|
-
}, rest), false, false);
|
|
4495
|
-
return _el$1;
|
|
4496
|
-
})();
|
|
4497
|
-
}
|
|
4498
|
-
const SubContext = createContext();
|
|
4499
|
-
const useSub = (part2) => {
|
|
4500
|
-
const ctx = useContext(SubContext);
|
|
4501
|
-
if (!ctx) throw new Error(`\`${part2}\` must be used within \`DropdownMenuSub\``);
|
|
4502
|
-
return ctx;
|
|
4503
|
-
};
|
|
4504
|
-
function DropdownMenuSub(props) {
|
|
4505
|
-
const parentOpen = useContext(LevelOpenContext);
|
|
4506
|
-
const [open, setOpen] = createOpenState({
|
|
4507
|
-
open: () => props.open,
|
|
4508
|
-
defaultOpen: props.defaultOpen,
|
|
4509
|
-
onOpenChange: () => props.onOpenChange
|
|
4510
|
-
});
|
|
4511
|
-
const [trigger, setTrigger] = createSignal();
|
|
4512
|
-
const [content, setContent] = createSignal();
|
|
4513
|
-
createEffect(on(parentOpen, (o) => o === false && setOpen(false)));
|
|
4514
|
-
onCleanup(() => setOpen(false));
|
|
4515
|
-
const value = {
|
|
4516
|
-
open,
|
|
4517
|
-
setOpen,
|
|
4518
|
-
triggerId: `radix-${createId()}`,
|
|
4519
|
-
contentId: `radix-${createId()}`,
|
|
4520
|
-
trigger,
|
|
4521
|
-
setTrigger,
|
|
4522
|
-
content,
|
|
4523
|
-
setContent
|
|
4524
|
-
};
|
|
4525
|
-
return createComponent(SubContext.Provider, {
|
|
4526
|
-
value,
|
|
4527
|
-
get children() {
|
|
4528
|
-
return createComponent(LevelOpenContext.Provider, {
|
|
4529
|
-
value: open,
|
|
4530
|
-
get children() {
|
|
4531
|
-
return props.children;
|
|
4532
|
-
}
|
|
4533
|
-
});
|
|
4534
|
-
}
|
|
4535
|
-
});
|
|
3548
|
+
insert(_el$, (() => {
|
|
3549
|
+
var _c$2 = memo(() => chevron() === `trailing`);
|
|
3550
|
+
return () => _c$2() && glyph();
|
|
3551
|
+
})(), null);
|
|
3552
|
+
return _el$;
|
|
3553
|
+
})();
|
|
4536
3554
|
}
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
const [local, rest] = splitProps(props, [`
|
|
4541
|
-
const
|
|
4542
|
-
const
|
|
4543
|
-
|
|
4544
|
-
let graceTimer;
|
|
4545
|
-
const clearOpenTimer = () => {
|
|
4546
|
-
clearTimeout(openTimer);
|
|
4547
|
-
openTimer = void 0;
|
|
4548
|
-
};
|
|
4549
|
-
onCleanup(() => {
|
|
4550
|
-
clearOpenTimer();
|
|
4551
|
-
clearTimeout(graceTimer);
|
|
4552
|
-
row.level.setGrace(null);
|
|
4553
|
-
});
|
|
4554
|
-
const openKey = () => root.dir() === `rtl` ? `ArrowLeft` : `ArrowRight`;
|
|
3555
|
+
delegateEvents(["click"]);
|
|
3556
|
+
var _tmpl$$n = /* @__PURE__ */ template(`<span data-slot=dock-card-caption>`), _tmpl$2$d = /* @__PURE__ */ template(`<span data-slot=dock-card-meta>`), _tmpl$3$9 = /* @__PURE__ */ template(`<div data-slot=dock-card><div data-slot=dock-card-body><div><div><span data-slot=dock-card-label></span></div><div><span data-slot=dock-card-title>`), _tmpl$4$8 = /* @__PURE__ */ template(`<span data-slot=dock-card-trailing>`), _tmpl$5$5 = /* @__PURE__ */ template(`<div data-slot=dock-pile>`), _tmpl$6$3 = /* @__PURE__ */ template(`<div data-slot=dock-pile-item>`);
|
|
3557
|
+
function DockCard(props) {
|
|
3558
|
+
const [local, rest] = splitProps(props, [`tint`, `icon`, `label`, `caption`, `meta`, `title`, `onOpen`, `trailing`, `hidden`, `openLabel`, `class`]);
|
|
3559
|
+
const tint = () => local.tint ?? `muted`;
|
|
3560
|
+
const pressable = () => local.onOpen !== void 0;
|
|
3561
|
+
const has = (value) => value !== void 0 && value !== null;
|
|
4555
3562
|
return (() => {
|
|
4556
|
-
var _el$
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
3563
|
+
var _el$ = _tmpl$3$9(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$8 = _el$4.nextSibling, _el$9 = _el$8.firstChild;
|
|
3564
|
+
_el$.$$keydown = (event) => {
|
|
3565
|
+
if (!pressable() || event.defaultPrevented) return;
|
|
3566
|
+
if (event.key === `Enter` || event.key === ` `) {
|
|
3567
|
+
event.preventDefault();
|
|
3568
|
+
local.onOpen?.();
|
|
3569
|
+
}
|
|
3570
|
+
};
|
|
3571
|
+
_el$.$$click = () => local.onOpen?.();
|
|
3572
|
+
spread(_el$, mergeProps({
|
|
3573
|
+
get role() {
|
|
3574
|
+
return pressable() ? `button` : void 0;
|
|
4562
3575
|
},
|
|
4563
|
-
get
|
|
4564
|
-
return
|
|
3576
|
+
get tabIndex() {
|
|
3577
|
+
return pressable() && !local.hidden ? 0 : void 0;
|
|
4565
3578
|
},
|
|
4566
|
-
get ["aria-
|
|
4567
|
-
return
|
|
3579
|
+
get ["aria-label"]() {
|
|
3580
|
+
return memo(() => !!pressable())() ? local.openLabel : void 0;
|
|
4568
3581
|
},
|
|
4569
|
-
get ["
|
|
4570
|
-
return
|
|
3582
|
+
get ["aria-hidden"]() {
|
|
3583
|
+
return local.hidden ? true : void 0;
|
|
3584
|
+
},
|
|
3585
|
+
get ["class"]() {
|
|
3586
|
+
return cn(DOCK_CARD_CLASSES.root, pressable() && DOCK_CARD_CLASSES.pressable, local.class);
|
|
4571
3587
|
}
|
|
4572
|
-
},
|
|
4573
|
-
|
|
4574
|
-
get
|
|
4575
|
-
return
|
|
3588
|
+
}, rest), false, true);
|
|
3589
|
+
insert(_el$2, createComponent(Show, {
|
|
3590
|
+
get when() {
|
|
3591
|
+
return local.icon;
|
|
4576
3592
|
},
|
|
4577
|
-
|
|
4578
|
-
|
|
3593
|
+
children: (icon) => createComponent(PaintIcon, {
|
|
3594
|
+
get icon() {
|
|
3595
|
+
return icon();
|
|
3596
|
+
},
|
|
3597
|
+
"aria-hidden": true,
|
|
3598
|
+
"data-slot": "dock-card-icon",
|
|
3599
|
+
get ["class"]() {
|
|
3600
|
+
return cn(DOCK_CARD_CLASSES.icon, DOCK_CARD_CLASSES.tint[tint()]);
|
|
3601
|
+
}
|
|
3602
|
+
})
|
|
3603
|
+
}), _el$3);
|
|
3604
|
+
insert(_el$5, () => local.label);
|
|
3605
|
+
insert(_el$4, createComponent(Show, {
|
|
3606
|
+
get when() {
|
|
3607
|
+
return has(local.caption);
|
|
4579
3608
|
},
|
|
4580
|
-
get
|
|
4581
|
-
|
|
3609
|
+
get children() {
|
|
3610
|
+
var _el$6 = _tmpl$$n();
|
|
3611
|
+
insert(_el$6, () => local.caption);
|
|
3612
|
+
effect(() => className(_el$6, DOCK_CARD_CLASSES.caption));
|
|
3613
|
+
return _el$6;
|
|
4582
3614
|
}
|
|
4583
|
-
},
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
e.currentTarget.focus();
|
|
4588
|
-
if (!untrack(sub.open)) sub.setOpen(true);
|
|
4589
|
-
});
|
|
3615
|
+
}), null);
|
|
3616
|
+
insert(_el$4, createComponent(Show, {
|
|
3617
|
+
get when() {
|
|
3618
|
+
return has(local.meta);
|
|
4590
3619
|
},
|
|
4591
|
-
get
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
row.handlers.onPointerMove(e);
|
|
4603
|
-
});
|
|
3620
|
+
get children() {
|
|
3621
|
+
var _el$7 = _tmpl$2$d();
|
|
3622
|
+
insert(_el$7, () => local.meta);
|
|
3623
|
+
effect(() => className(_el$7, DOCK_CARD_CLASSES.meta));
|
|
3624
|
+
return _el$7;
|
|
3625
|
+
}
|
|
3626
|
+
}), null);
|
|
3627
|
+
insert(_el$9, () => local.title);
|
|
3628
|
+
insert(_el$8, createComponent(Show, {
|
|
3629
|
+
get when() {
|
|
3630
|
+
return pressable();
|
|
4604
3631
|
},
|
|
4605
|
-
get
|
|
4606
|
-
return
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
const near = rect[right ? `left` : `right`];
|
|
4616
|
-
const far = rect[right ? `right` : `left`];
|
|
4617
|
-
row.level.setGrace({
|
|
4618
|
-
area: [{
|
|
4619
|
-
x: e.clientX + bleed,
|
|
4620
|
-
y: e.clientY
|
|
4621
|
-
}, {
|
|
4622
|
-
x: near,
|
|
4623
|
-
y: rect.top
|
|
4624
|
-
}, {
|
|
4625
|
-
x: far,
|
|
4626
|
-
y: rect.top
|
|
4627
|
-
}, {
|
|
4628
|
-
x: far,
|
|
4629
|
-
y: rect.bottom
|
|
4630
|
-
}, {
|
|
4631
|
-
x: near,
|
|
4632
|
-
y: rect.bottom
|
|
4633
|
-
}],
|
|
4634
|
-
side
|
|
4635
|
-
});
|
|
4636
|
-
clearTimeout(graceTimer);
|
|
4637
|
-
graceTimer = setTimeout(() => row.level.setGrace(null), 300);
|
|
4638
|
-
} else {
|
|
4639
|
-
if (row.level.onTriggerLeave(e)) return;
|
|
4640
|
-
row.level.setGrace(null);
|
|
4641
|
-
row.handlers.onPointerLeave(e);
|
|
3632
|
+
get fallback() {
|
|
3633
|
+
return createComponent(Show, {
|
|
3634
|
+
get when() {
|
|
3635
|
+
return has(local.trailing);
|
|
3636
|
+
},
|
|
3637
|
+
get children() {
|
|
3638
|
+
var _el$0 = _tmpl$4$8();
|
|
3639
|
+
insert(_el$0, () => local.trailing);
|
|
3640
|
+
effect(() => className(_el$0, DOCK_CARD_CLASSES.trailing));
|
|
3641
|
+
return _el$0;
|
|
4642
3642
|
}
|
|
4643
3643
|
});
|
|
4644
3644
|
},
|
|
4645
|
-
get
|
|
4646
|
-
return
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
e.preventDefault();
|
|
4653
|
-
return;
|
|
3645
|
+
get children() {
|
|
3646
|
+
return createComponent(PaintIcon, {
|
|
3647
|
+
icon: ChevronRight,
|
|
3648
|
+
"aria-hidden": true,
|
|
3649
|
+
"data-slot": "dock-card-chevron",
|
|
3650
|
+
get ["class"]() {
|
|
3651
|
+
return DOCK_CARD_CLASSES.chevron;
|
|
4654
3652
|
}
|
|
4655
|
-
row.handlers.onKeyDown(e);
|
|
4656
3653
|
});
|
|
4657
|
-
},
|
|
4658
|
-
get onFocus() {
|
|
4659
|
-
return composeHandlers(local.onFocus, row.handlers.onFocus);
|
|
4660
|
-
},
|
|
4661
|
-
get onBlur() {
|
|
4662
|
-
return composeHandlers(local.onBlur, row.handlers.onBlur);
|
|
4663
|
-
}
|
|
4664
|
-
}), false, true);
|
|
4665
|
-
insert(_el$10, () => local.children, null);
|
|
4666
|
-
insert(_el$10, createComponent(PaintIcon, {
|
|
4667
|
-
icon: ChevronRight,
|
|
4668
|
-
get ["class"]() {
|
|
4669
|
-
return DROPDOWN_MENU_CLASSES.subChevron;
|
|
4670
3654
|
}
|
|
4671
3655
|
}), null);
|
|
4672
|
-
|
|
3656
|
+
effect((_p$) => {
|
|
3657
|
+
var _v$ = local.hidden ? `true` : `false`, _v$2 = DOCK_CARD_CLASSES.body, _v$3 = DOCK_CARD_CLASSES.text, _v$4 = DOCK_CARD_CLASSES.header, _v$5 = cn(DOCK_CARD_CLASSES.label, DOCK_CARD_CLASSES.tint[tint()]), _v$6 = DOCK_CARD_CLASSES.row, _v$7 = DOCK_CARD_CLASSES.title;
|
|
3658
|
+
_v$ !== _p$.e && setAttribute(_el$2, "data-hidden", _p$.e = _v$);
|
|
3659
|
+
_v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
|
|
3660
|
+
_v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
|
|
3661
|
+
_v$4 !== _p$.o && className(_el$4, _p$.o = _v$4);
|
|
3662
|
+
_v$5 !== _p$.i && className(_el$5, _p$.i = _v$5);
|
|
3663
|
+
_v$6 !== _p$.n && className(_el$8, _p$.n = _v$6);
|
|
3664
|
+
_v$7 !== _p$.s && className(_el$9, _p$.s = _v$7);
|
|
3665
|
+
return _p$;
|
|
3666
|
+
}, {
|
|
3667
|
+
e: void 0,
|
|
3668
|
+
t: void 0,
|
|
3669
|
+
a: void 0,
|
|
3670
|
+
o: void 0,
|
|
3671
|
+
i: void 0,
|
|
3672
|
+
n: void 0,
|
|
3673
|
+
s: void 0
|
|
3674
|
+
});
|
|
3675
|
+
return _el$;
|
|
4673
3676
|
})();
|
|
4674
3677
|
}
|
|
4675
|
-
function
|
|
4676
|
-
const
|
|
4677
|
-
const
|
|
4678
|
-
const
|
|
4679
|
-
const
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
},
|
|
4685
|
-
get children() {
|
|
4686
|
-
return createComponent(Show, {
|
|
4687
|
-
get when() {
|
|
4688
|
-
return presence.mounted();
|
|
4689
|
-
},
|
|
4690
|
-
children: (_) => {
|
|
4691
|
-
const lag = layerMountedThisTask();
|
|
4692
|
-
return createComponent(MenuContent, {
|
|
4693
|
-
get anchor() {
|
|
4694
|
-
return sub.trigger();
|
|
4695
|
-
},
|
|
4696
|
-
get side() {
|
|
4697
|
-
return root.dir() === `rtl` ? `left` : `right`;
|
|
4698
|
-
},
|
|
4699
|
-
align: "start",
|
|
4700
|
-
get sideOffset() {
|
|
4701
|
-
return local.sideOffset ?? 0;
|
|
4702
|
-
},
|
|
4703
|
-
get alignOffset() {
|
|
4704
|
-
return local.alignOffset;
|
|
4705
|
-
},
|
|
4706
|
-
get collisionPadding() {
|
|
4707
|
-
return local.collisionPadding ?? 0;
|
|
4708
|
-
},
|
|
4709
|
-
get dir() {
|
|
4710
|
-
return root.dir();
|
|
4711
|
-
},
|
|
4712
|
-
kind: "dropdown-menu",
|
|
4713
|
-
lagParentLayer: lag,
|
|
4714
|
-
root: false,
|
|
4715
|
-
get id() {
|
|
4716
|
-
return sub.contentId;
|
|
4717
|
-
},
|
|
4718
|
-
get labelledBy() {
|
|
4719
|
-
return sub.triggerId;
|
|
4720
|
-
},
|
|
4721
|
-
state: () => stateOf$1(sub.open()),
|
|
4722
|
-
attrs: () => ({
|
|
4723
|
-
"data-slot": `dropdown-menu-sub-content`,
|
|
4724
|
-
class: cn(DROPDOWN_MENU_CLASSES.subContent, local.class),
|
|
4725
|
-
...rest
|
|
4726
|
-
}),
|
|
4727
|
-
setContent: (el) => {
|
|
4728
|
-
sub.setContent(el);
|
|
4729
|
-
if (el) {
|
|
4730
|
-
presence.ref(el);
|
|
4731
|
-
noteLayerMount();
|
|
4732
|
-
callRef(local.ref, el);
|
|
4733
|
-
}
|
|
4734
|
-
},
|
|
4735
|
-
onDismiss: () => {
|
|
4736
|
-
},
|
|
4737
|
-
onEscapeKeyDown: (e) => {
|
|
4738
|
-
local.onEscapeKeyDown?.(e);
|
|
4739
|
-
if (e.defaultPrevented) return;
|
|
4740
|
-
root.setOpen(false);
|
|
4741
|
-
e.preventDefault();
|
|
4742
|
-
},
|
|
4743
|
-
onFocusOutside: (e) => {
|
|
4744
|
-
local.onFocusOutside?.(e);
|
|
4745
|
-
if (e.defaultPrevented) return;
|
|
4746
|
-
if (e.target !== sub.trigger()) sub.setOpen(false);
|
|
4747
|
-
},
|
|
4748
|
-
get onInteractOutside() {
|
|
4749
|
-
return local.onInteractOutside;
|
|
4750
|
-
},
|
|
4751
|
-
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
4752
|
-
onKeyDown: (e) => {
|
|
4753
|
-
local.onKeyDown?.(e);
|
|
4754
|
-
if (e.defaultPrevented) return;
|
|
4755
|
-
if (sub.content()?.contains(e.target) && e.key === closeKey()) {
|
|
4756
|
-
sub.setOpen(false);
|
|
4757
|
-
sub.trigger()?.focus();
|
|
4758
|
-
e.preventDefault();
|
|
4759
|
-
}
|
|
4760
|
-
},
|
|
4761
|
-
get children() {
|
|
4762
|
-
return local.children;
|
|
4763
|
-
}
|
|
4764
|
-
});
|
|
4765
|
-
}
|
|
4766
|
-
});
|
|
3678
|
+
function DockPile(props) {
|
|
3679
|
+
const [local, rest] = splitProps(props, [`items`, `expanded`, `onExpandedChange`, `class`, `style`]);
|
|
3680
|
+
const [measured, setMeasured] = createSignal({});
|
|
3681
|
+
const nodes = /* @__PURE__ */ new Map();
|
|
3682
|
+
const measure = () => {
|
|
3683
|
+
const next = {};
|
|
3684
|
+
for (const item of local.items) {
|
|
3685
|
+
const el = nodes.get(item.id);
|
|
3686
|
+
if (item.height === void 0 && el) next[item.id] = el.offsetHeight;
|
|
4767
3687
|
}
|
|
3688
|
+
const prev = measured();
|
|
3689
|
+
if (!(Object.keys(next).length === Object.keys(prev).length && Object.entries(next).every(([k, v]) => prev[k] === v))) setMeasured(next);
|
|
3690
|
+
};
|
|
3691
|
+
createEffect(() => {
|
|
3692
|
+
void local.items;
|
|
3693
|
+
measure();
|
|
3694
|
+
if (typeof ResizeObserver === `undefined`) return;
|
|
3695
|
+
const observer = new ResizeObserver(measure);
|
|
3696
|
+
for (const el of nodes.values()) observer.observe(el);
|
|
3697
|
+
onCleanup(() => observer.disconnect());
|
|
4768
3698
|
});
|
|
3699
|
+
const geometry = createMemo(() => dockPileGeometry(local.items.map((item) => item.height ?? measured()[item.id] ?? 0), local.expanded));
|
|
3700
|
+
return (() => {
|
|
3701
|
+
var _el$1 = _tmpl$5$5();
|
|
3702
|
+
_el$1.$$focusout = (event) => {
|
|
3703
|
+
const next = event.relatedTarget;
|
|
3704
|
+
if (!next || !event.currentTarget.contains(next)) local.onExpandedChange?.(false);
|
|
3705
|
+
};
|
|
3706
|
+
_el$1.$$focusin = () => local.onExpandedChange?.(true);
|
|
3707
|
+
_el$1.addEventListener("pointerleave", (event) => {
|
|
3708
|
+
if (event.pointerType !== `touch`) local.onExpandedChange?.(false);
|
|
3709
|
+
});
|
|
3710
|
+
_el$1.addEventListener("pointerenter", (event) => {
|
|
3711
|
+
if (event.pointerType !== `touch`) local.onExpandedChange?.(true);
|
|
3712
|
+
});
|
|
3713
|
+
use((el) => bindStyle(el, () => ({
|
|
3714
|
+
...local.style ?? {},
|
|
3715
|
+
height: `${geometry().height}px`
|
|
3716
|
+
})), _el$1);
|
|
3717
|
+
spread(_el$1, mergeProps({
|
|
3718
|
+
get ["data-expanded"]() {
|
|
3719
|
+
return local.expanded ? `true` : `false`;
|
|
3720
|
+
},
|
|
3721
|
+
get ["class"]() {
|
|
3722
|
+
return cn(DOCK_PILE_CLASSES.root, local.class);
|
|
3723
|
+
}
|
|
3724
|
+
}, rest), false, true);
|
|
3725
|
+
insert(_el$1, createComponent(For, {
|
|
3726
|
+
get each() {
|
|
3727
|
+
return local.items;
|
|
3728
|
+
},
|
|
3729
|
+
children: (item, i) => {
|
|
3730
|
+
const placed = () => geometry().items[i()] ?? {
|
|
3731
|
+
offset: 0,
|
|
3732
|
+
scale: 1,
|
|
3733
|
+
visible: true
|
|
3734
|
+
};
|
|
3735
|
+
let node2;
|
|
3736
|
+
onCleanup(() => {
|
|
3737
|
+
if (nodes.get(item.id) === node2) nodes.delete(item.id);
|
|
3738
|
+
});
|
|
3739
|
+
return (() => {
|
|
3740
|
+
var _el$10 = _tmpl$6$3();
|
|
3741
|
+
use((el) => {
|
|
3742
|
+
node2 = el;
|
|
3743
|
+
nodes.set(item.id, el);
|
|
3744
|
+
bindStyle(el, () => css({
|
|
3745
|
+
"--offset": `${placed().offset}px`,
|
|
3746
|
+
"--scale": `${placed().scale}`,
|
|
3747
|
+
zIndex: i() + 1
|
|
3748
|
+
}));
|
|
3749
|
+
}, _el$10);
|
|
3750
|
+
insert(_el$10, () => item.node);
|
|
3751
|
+
effect((_p$) => {
|
|
3752
|
+
var _v$8 = i() === local.items.length - 1 ? `true` : `false`, _v$9 = placed().visible ? `true` : `false`, _v$0 = DOCK_PILE_CLASSES.item;
|
|
3753
|
+
_v$8 !== _p$.e && setAttribute(_el$10, "data-front", _p$.e = _v$8);
|
|
3754
|
+
_v$9 !== _p$.t && setAttribute(_el$10, "data-visible", _p$.t = _v$9);
|
|
3755
|
+
_v$0 !== _p$.a && className(_el$10, _p$.a = _v$0);
|
|
3756
|
+
return _p$;
|
|
3757
|
+
}, {
|
|
3758
|
+
e: void 0,
|
|
3759
|
+
t: void 0,
|
|
3760
|
+
a: void 0
|
|
3761
|
+
});
|
|
3762
|
+
return _el$10;
|
|
3763
|
+
})();
|
|
3764
|
+
}
|
|
3765
|
+
}));
|
|
3766
|
+
return _el$1;
|
|
3767
|
+
})();
|
|
4769
3768
|
}
|
|
3769
|
+
delegateEvents(["click", "keydown", "focusin", "focusout"]);
|
|
4770
3770
|
var _tmpl$$m = /* @__PURE__ */ template(`<div data-slot=icon-disc>`);
|
|
4771
3771
|
const LUCIDE_STROKE = 2;
|
|
4772
3772
|
const UNFOCUSABLE$1 = {
|
|
@@ -6511,8 +5511,8 @@ function TabsTrigger(props) {
|
|
|
6511
5511
|
if (intent === `last`) candidates.reverse();
|
|
6512
5512
|
else if (intent === `prev` || intent === `next`) {
|
|
6513
5513
|
if (intent === `prev`) candidates.reverse();
|
|
6514
|
-
const
|
|
6515
|
-
candidates = roving.loop() ? wrapArray(candidates,
|
|
5514
|
+
const at2 = candidates.indexOf(e.currentTarget);
|
|
5515
|
+
candidates = roving.loop() ? wrapArray(candidates, at2 + 1) : candidates.slice(at2 + 1);
|
|
6516
5516
|
}
|
|
6517
5517
|
setTimeout(() => rovingFocusFirst(candidates));
|
|
6518
5518
|
},
|
|
@@ -6981,10 +5981,10 @@ function ContentImpl(props) {
|
|
|
6981
5981
|
y: 0
|
|
6982
5982
|
};
|
|
6983
5983
|
const move = (e) => {
|
|
6984
|
-
const
|
|
5984
|
+
const at2 = ctx.triggerPointerDownPos.current;
|
|
6985
5985
|
delta = {
|
|
6986
|
-
x: Math.abs(Math.round(e.pageX) - (
|
|
6987
|
-
y: Math.abs(Math.round(e.pageY) - (
|
|
5986
|
+
x: Math.abs(Math.round(e.pageX) - (at2?.x ?? 0)),
|
|
5987
|
+
y: Math.abs(Math.round(e.pageY) - (at2?.y ?? 0))
|
|
6988
5988
|
};
|
|
6989
5989
|
};
|
|
6990
5990
|
const up = (e) => {
|
|
@@ -7978,7 +6978,7 @@ function Toaster(props) {
|
|
|
7978
6978
|
return store.subscribe((t) => set(t));
|
|
7979
6979
|
});
|
|
7980
6980
|
const list = () => toasts() ?? [];
|
|
7981
|
-
const touchQuery = createMediaQuery
|
|
6981
|
+
const touchQuery = createMediaQuery(TOAST_TOUCH_QUERY);
|
|
7982
6982
|
const placed = createMemo(() => toastPlacement(local.touch ?? touchQuery()));
|
|
7983
6983
|
const [expanded, setExpanded] = createSignal(false);
|
|
7984
6984
|
const [measured, setMeasured] = createSignal({});
|
|
@@ -8455,15 +7455,6 @@ function TooltipContent(props) {
|
|
|
8455
7455
|
}
|
|
8456
7456
|
});
|
|
8457
7457
|
}
|
|
8458
|
-
function createMediaQuery(query) {
|
|
8459
|
-
if (typeof window === `undefined` || typeof window.matchMedia !== `function`) return () => false;
|
|
8460
|
-
const mql = window.matchMedia(query);
|
|
8461
|
-
const [matches, setMatches] = createSignal(mql.matches);
|
|
8462
|
-
const onChange = () => setMatches(window.matchMedia(query).matches);
|
|
8463
|
-
mql.addEventListener(`change`, onChange);
|
|
8464
|
-
onCleanup(() => mql.removeEventListener(`change`, onChange));
|
|
8465
|
-
return matches;
|
|
8466
|
-
}
|
|
8467
7458
|
const MOBILE_BREAKPOINT = 768;
|
|
8468
7459
|
function createIsMobile() {
|
|
8469
7460
|
const narrow = () => typeof window !== `undefined` && window.innerWidth < MOBILE_BREAKPOINT;
|
|
@@ -8483,7 +7474,7 @@ function createIsMobile() {
|
|
|
8483
7474
|
}
|
|
8484
7475
|
var _tmpl$ = /* @__PURE__ */ template(`<span data-slot=voice-wave-child>`), _tmpl$2 = /* @__PURE__ */ template(`<span data-slot=voice-wave><svg aria-hidden=true>`), _tmpl$3 = /* @__PURE__ */ template(`<svg><path data-slot=voice-wave-ring fill=currentColor stroke=currentColor stroke-linejoin=round></svg>`, false, true, false);
|
|
8485
7476
|
function VoiceWave(props) {
|
|
8486
|
-
const reducedMotion = createMediaQuery(`(prefers-reduced-motion: reduce)`);
|
|
7477
|
+
const reducedMotion = createMediaQuery$1(`(prefers-reduced-motion: reduce)`);
|
|
8487
7478
|
const activity = () => props.activity ?? `idle`;
|
|
8488
7479
|
const size = () => props.size ?? `md`;
|
|
8489
7480
|
const px = () => VOICE_WAVE_SIZE_PX[size()] ?? VOICE_WAVE_SIZE_PX.md;
|
|
@@ -8676,21 +7667,21 @@ export {
|
|
|
8676
7667
|
DisclosureHeader,
|
|
8677
7668
|
DockCard,
|
|
8678
7669
|
DockPile,
|
|
8679
|
-
DropdownMenu,
|
|
8680
|
-
DropdownMenuCheckboxItem,
|
|
8681
|
-
DropdownMenuContent,
|
|
8682
|
-
DropdownMenuGroup,
|
|
8683
|
-
DropdownMenuItem,
|
|
8684
|
-
DropdownMenuLabel,
|
|
8685
|
-
DropdownMenuPortal,
|
|
8686
|
-
DropdownMenuRadioGroup,
|
|
8687
|
-
DropdownMenuRadioItem,
|
|
8688
|
-
DropdownMenuSeparator,
|
|
8689
|
-
DropdownMenuShortcut,
|
|
8690
|
-
DropdownMenuSub,
|
|
8691
|
-
DropdownMenuSubContent,
|
|
8692
|
-
DropdownMenuSubTrigger,
|
|
8693
|
-
DropdownMenuTrigger,
|
|
7670
|
+
al as DropdownMenu,
|
|
7671
|
+
am as DropdownMenuCheckboxItem,
|
|
7672
|
+
an as DropdownMenuContent,
|
|
7673
|
+
ao as DropdownMenuGroup,
|
|
7674
|
+
ap as DropdownMenuItem,
|
|
7675
|
+
aq as DropdownMenuLabel,
|
|
7676
|
+
ar as DropdownMenuPortal,
|
|
7677
|
+
as as DropdownMenuRadioGroup,
|
|
7678
|
+
at as DropdownMenuRadioItem,
|
|
7679
|
+
au as DropdownMenuSeparator,
|
|
7680
|
+
av as DropdownMenuShortcut,
|
|
7681
|
+
aw as DropdownMenuSub,
|
|
7682
|
+
ax as DropdownMenuSubContent,
|
|
7683
|
+
ay as DropdownMenuSubTrigger,
|
|
7684
|
+
az as DropdownMenuTrigger,
|
|
8694
7685
|
EMPTY_STATE_SIZES,
|
|
8695
7686
|
EmptyCta,
|
|
8696
7687
|
EmptyState,
|
|
@@ -8792,6 +7783,9 @@ export {
|
|
|
8792
7783
|
TooltipProvider,
|
|
8793
7784
|
TooltipTrigger,
|
|
8794
7785
|
VoiceWave,
|
|
7786
|
+
aA as ZOOMABLE_IMAGE_STRINGS,
|
|
7787
|
+
Z as ZOOM_MATH,
|
|
7788
|
+
aB as ZoomableImage,
|
|
8795
7789
|
alertVariants2 as alertVariants,
|
|
8796
7790
|
avatarHueIndex,
|
|
8797
7791
|
buttonVariants2 as buttonVariants,
|
|
@@ -8801,10 +7795,11 @@ export {
|
|
|
8801
7795
|
choiceValues2 as choiceValues,
|
|
8802
7796
|
cn2 as cn,
|
|
8803
7797
|
createIsMobile,
|
|
8804
|
-
createMediaQuery,
|
|
7798
|
+
createMediaQuery$1 as createMediaQuery,
|
|
8805
7799
|
createSheetDrag,
|
|
8806
7800
|
createSheetDragHandleProps,
|
|
8807
7801
|
createToastStore2 as createToastStore,
|
|
7802
|
+
H as createZoomableImage,
|
|
8808
7803
|
dateMatchModifiers,
|
|
8809
7804
|
dockPileGeometry2 as dockPileGeometry,
|
|
8810
7805
|
getDefaultClassNames,
|