@exponential_app/eui-solid 0.2.1 → 0.4.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/README.md +5 -0
- 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 +1009 -472
- package/dist/index.js.map +1 -1
- package/dist/primitives.js +541 -1272
- 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/carousel.d.ts +21 -0
- package/dist/types/primitives/index.d.ts +4 -0
- package/dist/types/primitives/mosaic.d.ts +16 -0
- package/dist/types/primitives/outline.d.ts +14 -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,
|
|
4
|
-
import { AVATAR_HUE_COUNT, BARE_FIELD_CLASS, 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, 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, choiceColumns as choiceColumns2, choiceToggle as choiceToggle2, choiceValues as choiceValues2, cn as cn2, createToastStore as createToastStore2, dockPileGeometry as dockPileGeometry2, getInitials, middleTruncate, progressRingPercent as progressRingPercent2, ringGeometry as ringGeometry2, toastPlacement as toastPlacement2, toastStackGeometry as toastStackGeometry2 } from "@exponential_app/eui/web/primitives";
|
|
5
|
-
import {
|
|
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
|
+
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 { 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$$D();
|
|
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$p();
|
|
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$j();
|
|
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$e();
|
|
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$$C = /* @__PURE__ */ template(`<div data-slot=alert-dialog-header>`), _tmpl$2$o = /* @__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);
|
|
@@ -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$$y = /* @__PURE__ */ template(`<span><select></select><span aria-hidden=true>`), _tmpl$2$l = /* @__PURE__ */ template(`<option>`), _tmpl$3$g = /* @__PURE__ */ template(`<nav><button type=button></button><button type=button>`), _tmpl$4$c = /* @__PURE__ */ template(`<div role=status aria-live=polite>`), _tmpl$5$9 = /* @__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;
|
|
@@ -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,49 +1543,143 @@ 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$$
|
|
1876
|
-
|
|
1877
|
-
const
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
const [inner, setInner] = createSignal(untrack(() => local.defaultChecked) ?? false);
|
|
1881
|
-
const controlled = () => local.checked !== void 0;
|
|
1882
|
-
const checked = () => controlled() ? local.checked : inner();
|
|
1883
|
-
const setChecked2 = (next) => {
|
|
1884
|
-
const prev = untrack(checked);
|
|
1885
|
-
if (!untrack(controlled)) setInner(() => next);
|
|
1886
|
-
if (next !== prev) local.onCheckedChange?.(next);
|
|
1887
|
-
};
|
|
1888
|
-
const [control, setControl] = createSignal();
|
|
1889
|
-
const inForm = createInForm(control);
|
|
1890
|
-
const value = () => local.value ?? `on`;
|
|
1891
|
-
const initial = untrack(checked);
|
|
1892
|
-
let stopped = false;
|
|
1893
|
-
createEffect(() => {
|
|
1894
|
-
const form = control()?.form;
|
|
1895
|
-
if (!form) return;
|
|
1896
|
-
const reset = () => setChecked2(initial);
|
|
1897
|
-
form.addEventListener(`reset`, reset);
|
|
1898
|
-
onCleanup(() => form.removeEventListener(`reset`, reset));
|
|
1899
|
-
});
|
|
1900
|
-
const presence = createPresence(() => isIndeterminate(checked()) || checked() === true);
|
|
1901
|
-
const call2 = (handler, e) => {
|
|
1902
|
-
if (typeof handler === `function`) handler(e);
|
|
1903
|
-
else if (Array.isArray(handler)) handler[0](handler[1], e);
|
|
1904
|
-
};
|
|
1905
|
-
return [(() => {
|
|
1906
|
-
var _el$ = _tmpl$2$k();
|
|
1907
|
-
use((el) => {
|
|
1908
|
-
setControl(el);
|
|
1909
|
-
if (typeof local.ref === `function`) local.ref(el);
|
|
1910
|
-
}, _el$);
|
|
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);
|
|
1547
|
+
function CarouselCounter(props) {
|
|
1548
|
+
const [local, rest] = splitProps(props, [`page`, `total`, `class`]);
|
|
1549
|
+
return (() => {
|
|
1550
|
+
var _el$ = _tmpl$$y();
|
|
1911
1551
|
spread(_el$, mergeProps({
|
|
1912
|
-
get ["
|
|
1913
|
-
return
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1552
|
+
get ["class"]() {
|
|
1553
|
+
return cn(CAROUSEL_CLASSES.counter, local.class);
|
|
1554
|
+
}
|
|
1555
|
+
}, rest), false, true);
|
|
1556
|
+
insert(_el$, () => carouselCounterText(local.page, local.total));
|
|
1557
|
+
return _el$;
|
|
1558
|
+
})();
|
|
1559
|
+
}
|
|
1560
|
+
const defaultPageLabel = (page, total) => `Page ${page + 1} of ${total}`;
|
|
1561
|
+
function CarouselThumbnails(props) {
|
|
1562
|
+
const [local, rest] = splitProps(props, [`count`, `urls`, `page`, `onPageChange`, `pageLabel`, `class`]);
|
|
1563
|
+
let strip;
|
|
1564
|
+
const n = () => Math.max(0, Math.floor(local.count));
|
|
1565
|
+
const indexes = () => Array.from({
|
|
1566
|
+
length: n()
|
|
1567
|
+
}, (_, i) => i);
|
|
1568
|
+
const label = (i) => (local.pageLabel ?? defaultPageLabel)(i, n());
|
|
1569
|
+
createRenderEffect(() => {
|
|
1570
|
+
const page = local.page;
|
|
1571
|
+
n();
|
|
1572
|
+
queueMicrotask(() => {
|
|
1573
|
+
const el = strip;
|
|
1574
|
+
const thumb = el?.children[page];
|
|
1575
|
+
if (!el || !thumb) return;
|
|
1576
|
+
const a = el.getBoundingClientRect();
|
|
1577
|
+
const b = thumb.getBoundingClientRect();
|
|
1578
|
+
const delta = b.left < a.left ? b.left - a.left : b.right > a.right ? b.right - a.right : 0;
|
|
1579
|
+
if (delta !== 0) el.scrollLeft += delta;
|
|
1580
|
+
});
|
|
1581
|
+
});
|
|
1582
|
+
return (() => {
|
|
1583
|
+
var _el$2 = _tmpl$2$m();
|
|
1584
|
+
var _ref$ = strip;
|
|
1585
|
+
typeof _ref$ === "function" ? use(_ref$, _el$2) : strip = _el$2;
|
|
1586
|
+
spread(_el$2, mergeProps({
|
|
1587
|
+
get ["class"]() {
|
|
1588
|
+
return cn(CAROUSEL_CLASSES.thumbnails, local.class);
|
|
1589
|
+
}
|
|
1590
|
+
}, rest), false, true);
|
|
1591
|
+
insert(_el$2, createComponent(For, {
|
|
1592
|
+
get each() {
|
|
1593
|
+
return indexes();
|
|
1594
|
+
},
|
|
1595
|
+
children: (i) => {
|
|
1596
|
+
const current = () => i === local.page;
|
|
1597
|
+
return (() => {
|
|
1598
|
+
var _el$3 = _tmpl$3$h();
|
|
1599
|
+
_el$3.$$click = () => local.onPageChange?.(i);
|
|
1600
|
+
insert(_el$3, createComponent(Show, {
|
|
1601
|
+
get when() {
|
|
1602
|
+
return local.urls[i];
|
|
1603
|
+
},
|
|
1604
|
+
children: (src) => (() => {
|
|
1605
|
+
var _el$4 = _tmpl$4$d();
|
|
1606
|
+
setAttribute(_el$4, "draggable", false);
|
|
1607
|
+
effect((_p$) => {
|
|
1608
|
+
var _v$5 = src(), _v$6 = CAROUSEL_CLASSES.thumbnailImage;
|
|
1609
|
+
_v$5 !== _p$.e && setAttribute(_el$4, "src", _p$.e = _v$5);
|
|
1610
|
+
_v$6 !== _p$.t && className(_el$4, _p$.t = _v$6);
|
|
1611
|
+
return _p$;
|
|
1612
|
+
}, {
|
|
1613
|
+
e: void 0,
|
|
1614
|
+
t: void 0
|
|
1615
|
+
});
|
|
1616
|
+
return _el$4;
|
|
1617
|
+
})()
|
|
1618
|
+
}));
|
|
1619
|
+
effect((_p$) => {
|
|
1620
|
+
var _v$ = current() ? `true` : void 0, _v$2 = current() ? `true` : void 0, _v$3 = label(i), _v$4 = CAROUSEL_CLASSES.thumbnail;
|
|
1621
|
+
_v$ !== _p$.e && setAttribute(_el$3, "data-current", _p$.e = _v$);
|
|
1622
|
+
_v$2 !== _p$.t && setAttribute(_el$3, "aria-current", _p$.t = _v$2);
|
|
1623
|
+
_v$3 !== _p$.a && setAttribute(_el$3, "aria-label", _p$.a = _v$3);
|
|
1624
|
+
_v$4 !== _p$.o && className(_el$3, _p$.o = _v$4);
|
|
1625
|
+
return _p$;
|
|
1626
|
+
}, {
|
|
1627
|
+
e: void 0,
|
|
1628
|
+
t: void 0,
|
|
1629
|
+
a: void 0,
|
|
1630
|
+
o: void 0
|
|
1631
|
+
});
|
|
1632
|
+
return _el$3;
|
|
1633
|
+
})();
|
|
1634
|
+
}
|
|
1635
|
+
}));
|
|
1636
|
+
return _el$2;
|
|
1637
|
+
})();
|
|
1638
|
+
}
|
|
1639
|
+
delegateEvents(["click"]);
|
|
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>`);
|
|
1641
|
+
const isIndeterminate = (c) => c === `indeterminate`;
|
|
1642
|
+
const stateOf = (c) => isIndeterminate(c) ? `indeterminate` : c ? `checked` : `unchecked`;
|
|
1643
|
+
function Checkbox(props) {
|
|
1644
|
+
const [local, rest] = splitProps(props, [`class`, `checked`, `defaultChecked`, `onCheckedChange`, `required`, `name`, `value`, `form`, `disabled`, `onKeyDown`, `onClick`, `ref`]);
|
|
1645
|
+
const [inner, setInner] = createSignal(untrack(() => local.defaultChecked) ?? false);
|
|
1646
|
+
const controlled = () => local.checked !== void 0;
|
|
1647
|
+
const checked = () => controlled() ? local.checked : inner();
|
|
1648
|
+
const setChecked2 = (next) => {
|
|
1649
|
+
const prev = untrack(checked);
|
|
1650
|
+
if (!untrack(controlled)) setInner(() => next);
|
|
1651
|
+
if (next !== prev) local.onCheckedChange?.(next);
|
|
1652
|
+
};
|
|
1653
|
+
const [control, setControl] = createSignal();
|
|
1654
|
+
const inForm = createInForm(control);
|
|
1655
|
+
const value = () => local.value ?? `on`;
|
|
1656
|
+
const initial = untrack(checked);
|
|
1657
|
+
let stopped = false;
|
|
1658
|
+
createEffect(() => {
|
|
1659
|
+
const form = control()?.form;
|
|
1660
|
+
if (!form) return;
|
|
1661
|
+
const reset = () => setChecked2(initial);
|
|
1662
|
+
form.addEventListener(`reset`, reset);
|
|
1663
|
+
onCleanup(() => form.removeEventListener(`reset`, reset));
|
|
1664
|
+
});
|
|
1665
|
+
const presence = createPresence(() => isIndeterminate(checked()) || checked() === true);
|
|
1666
|
+
const call2 = (handler, e) => {
|
|
1667
|
+
if (typeof handler === `function`) handler(e);
|
|
1668
|
+
else if (Array.isArray(handler)) handler[0](handler[1], e);
|
|
1669
|
+
};
|
|
1670
|
+
return [(() => {
|
|
1671
|
+
var _el$ = _tmpl$2$l();
|
|
1672
|
+
use((el) => {
|
|
1673
|
+
setControl(el);
|
|
1674
|
+
if (typeof local.ref === `function`) local.ref(el);
|
|
1675
|
+
}, _el$);
|
|
1676
|
+
spread(_el$, mergeProps({
|
|
1677
|
+
get ["aria-checked"]() {
|
|
1678
|
+
return memo(() => !!isIndeterminate(checked()))() ? `mixed` : checked();
|
|
1679
|
+
},
|
|
1680
|
+
get ["aria-required"]() {
|
|
1681
|
+
return local.required;
|
|
1682
|
+
},
|
|
1918
1683
|
get ["data-state"]() {
|
|
1919
1684
|
return stateOf(checked());
|
|
1920
1685
|
},
|
|
@@ -1951,7 +1716,7 @@ function Checkbox(props) {
|
|
|
1951
1716
|
return presence.mounted();
|
|
1952
1717
|
},
|
|
1953
1718
|
get children() {
|
|
1954
|
-
var _el$2 = _tmpl$$
|
|
1719
|
+
var _el$2 = _tmpl$$x();
|
|
1955
1720
|
var _ref$ = presence.ref;
|
|
1956
1721
|
typeof _ref$ === "function" ? use(_ref$, _el$2) : presence.ref = _el$2;
|
|
1957
1722
|
insert(_el$2, createComponent(PaintIcon, {
|
|
@@ -2034,7 +1799,7 @@ function CheckboxBubble(props) {
|
|
|
2034
1799
|
});
|
|
2035
1800
|
};
|
|
2036
1801
|
return (() => {
|
|
2037
|
-
var _el$3 = _tmpl$3$
|
|
1802
|
+
var _el$3 = _tmpl$3$g();
|
|
2038
1803
|
var _ref$2 = input;
|
|
2039
1804
|
typeof _ref$2 === "function" ? use(_ref$2, _el$3) : input = _el$3;
|
|
2040
1805
|
effect((_p$) => {
|
|
@@ -2059,7 +1824,7 @@ function CheckboxBubble(props) {
|
|
|
2059
1824
|
return _el$3;
|
|
2060
1825
|
})();
|
|
2061
1826
|
}
|
|
2062
|
-
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);
|
|
2063
1828
|
function ChoiceTilesFrame(props) {
|
|
2064
1829
|
const buttons = [];
|
|
2065
1830
|
const order = createMemo(() => props.options.map((o) => o.value));
|
|
@@ -2102,7 +1867,7 @@ function ChoiceTilesFrame(props) {
|
|
|
2102
1867
|
});
|
|
2103
1868
|
};
|
|
2104
1869
|
return (() => {
|
|
2105
|
-
var _el$ = _tmpl$$
|
|
1870
|
+
var _el$ = _tmpl$$w();
|
|
2106
1871
|
var _ref$ = props.rootRef;
|
|
2107
1872
|
typeof _ref$ === "function" ? use(_ref$, _el$) : props.rootRef = _el$;
|
|
2108
1873
|
spread(_el$, mergeProps({
|
|
@@ -2136,7 +1901,7 @@ function ChoiceTilesFrame(props) {
|
|
|
2136
1901
|
});
|
|
2137
1902
|
const description = o.description ? String(o.description) : ``;
|
|
2138
1903
|
return (() => {
|
|
2139
|
-
var _el$2 = _tmpl$4$
|
|
1904
|
+
var _el$2 = _tmpl$4$c(), _el$4 = _el$2.firstChild;
|
|
2140
1905
|
_el$2.$$keydown = (e) => onKeyDown(i, e);
|
|
2141
1906
|
_el$2.$$click = () => pick(i);
|
|
2142
1907
|
use((el) => {
|
|
@@ -2170,7 +1935,7 @@ function ChoiceTilesFrame(props) {
|
|
|
2170
1935
|
return pictures();
|
|
2171
1936
|
},
|
|
2172
1937
|
get children() {
|
|
2173
|
-
var _el$3 = _tmpl$2$
|
|
1938
|
+
var _el$3 = _tmpl$2$k();
|
|
2174
1939
|
spread(_el$3, mergeProps(() => props.pictureProps(state())), false, true);
|
|
2175
1940
|
insert(_el$3, () => props.renderPicture(o.image ? String(o.image) : null, state()));
|
|
2176
1941
|
return _el$3;
|
|
@@ -2181,7 +1946,7 @@ function ChoiceTilesFrame(props) {
|
|
|
2181
1946
|
insert(_el$2, createComponent(Show, {
|
|
2182
1947
|
when: description,
|
|
2183
1948
|
get children() {
|
|
2184
|
-
var _el$5 = _tmpl$3$
|
|
1949
|
+
var _el$5 = _tmpl$3$f();
|
|
2185
1950
|
spread(_el$5, mergeProps(() => props.descriptionProps(state())), false, true);
|
|
2186
1951
|
insert(_el$5, description);
|
|
2187
1952
|
return _el$5;
|
|
@@ -2260,12 +2025,12 @@ function ChoiceTiles(props) {
|
|
|
2260
2025
|
});
|
|
2261
2026
|
}
|
|
2262
2027
|
delegateEvents(["click", "keydown"]);
|
|
2263
|
-
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>`);
|
|
2264
2029
|
function CodeBlock(props) {
|
|
2265
2030
|
const [local, rest] = splitProps(props, [`class`, `variant`, `size`]);
|
|
2266
2031
|
const variant = () => local.variant ?? `default`;
|
|
2267
2032
|
return (() => {
|
|
2268
|
-
var _el$ = _tmpl$$
|
|
2033
|
+
var _el$ = _tmpl$$v();
|
|
2269
2034
|
spread(_el$, mergeProps({
|
|
2270
2035
|
get ["data-variant"]() {
|
|
2271
2036
|
return variant();
|
|
@@ -2285,7 +2050,7 @@ function CodeBlock(props) {
|
|
|
2285
2050
|
const slotPart = (slot, recipe) => function CodeBlockPart(props) {
|
|
2286
2051
|
const [local, rest] = splitProps(props, [`class`]);
|
|
2287
2052
|
return (() => {
|
|
2288
|
-
var _el$2 = _tmpl$2$
|
|
2053
|
+
var _el$2 = _tmpl$2$j();
|
|
2289
2054
|
setAttribute(_el$2, "data-slot", slot);
|
|
2290
2055
|
spread(_el$2, mergeProps({
|
|
2291
2056
|
get ["class"]() {
|
|
@@ -2357,7 +2122,7 @@ function CodeBlockCopyButton(props) {
|
|
|
2357
2122
|
});
|
|
2358
2123
|
}
|
|
2359
2124
|
})), (() => {
|
|
2360
|
-
var _el$3 = _tmpl$3$
|
|
2125
|
+
var _el$3 = _tmpl$3$e();
|
|
2361
2126
|
insert(_el$3, (() => {
|
|
2362
2127
|
var _c$ = memo(() => !!copied());
|
|
2363
2128
|
return () => _c$() ? labels().copied : ``;
|
|
@@ -2394,7 +2159,7 @@ function CodeBlockContent(props) {
|
|
|
2394
2159
|
return memo(() => tokens.length === 0)() ? null : createComponent(For, {
|
|
2395
2160
|
each: tokens,
|
|
2396
2161
|
children: (token) => (() => {
|
|
2397
|
-
var _el$4 = _tmpl$4$
|
|
2162
|
+
var _el$4 = _tmpl$4$b();
|
|
2398
2163
|
insert(_el$4, () => token.text);
|
|
2399
2164
|
effect((_p$) => {
|
|
2400
2165
|
var _v$ = token.kind, _v$2 = cn(CODE_TOKEN_CLASS[token.kind], CODE_BLOCK_CLASSES.token);
|
|
@@ -2455,7 +2220,7 @@ function CodeBlockLine(props) {
|
|
|
2455
2220
|
return c === void 0 || c === null || c === `` || Array.isArray(c) && c.length === 0;
|
|
2456
2221
|
};
|
|
2457
2222
|
return (() => {
|
|
2458
|
-
var _el$7 = _tmpl$6$
|
|
2223
|
+
var _el$7 = _tmpl$6$5(), _el$8 = _el$7.firstChild;
|
|
2459
2224
|
spread(_el$7, mergeProps({
|
|
2460
2225
|
get ["data-variant"]() {
|
|
2461
2226
|
return local.variant ?? `default`;
|
|
@@ -2475,7 +2240,7 @@ function CodeBlockLine(props) {
|
|
|
2475
2240
|
return _el$7;
|
|
2476
2241
|
})();
|
|
2477
2242
|
}
|
|
2478
|
-
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>`);
|
|
2479
2244
|
const CollapsibleContext = createContext();
|
|
2480
2245
|
const call$2 = (handler, e) => {
|
|
2481
2246
|
if (typeof handler === `function`) handler(e);
|
|
@@ -2499,7 +2264,7 @@ function Collapsible(props) {
|
|
|
2499
2264
|
return createComponent(CollapsibleContext.Provider, {
|
|
2500
2265
|
value: state,
|
|
2501
2266
|
get children() {
|
|
2502
|
-
var _el$ = _tmpl$$
|
|
2267
|
+
var _el$ = _tmpl$$u();
|
|
2503
2268
|
spread(_el$, mergeProps({
|
|
2504
2269
|
get ["data-state"]() {
|
|
2505
2270
|
return open() ? `open` : `closed`;
|
|
@@ -2516,7 +2281,7 @@ function CollapsibleTrigger(props) {
|
|
|
2516
2281
|
const ctx = useContext(CollapsibleContext);
|
|
2517
2282
|
const [local, rest] = splitProps(props, [`onClick`]);
|
|
2518
2283
|
return (() => {
|
|
2519
|
-
var _el$2 = _tmpl$2$
|
|
2284
|
+
var _el$2 = _tmpl$2$i();
|
|
2520
2285
|
spread(_el$2, mergeProps({
|
|
2521
2286
|
get ["aria-controls"]() {
|
|
2522
2287
|
return ctx.contentId;
|
|
@@ -2640,7 +2405,7 @@ function CollapsibleContent(props) {
|
|
|
2640
2405
|
};
|
|
2641
2406
|
};
|
|
2642
2407
|
return (() => {
|
|
2643
|
-
var _el$3 = _tmpl$3$
|
|
2408
|
+
var _el$3 = _tmpl$3$d();
|
|
2644
2409
|
use((el) => {
|
|
2645
2410
|
node2 = el;
|
|
2646
2411
|
if (typeof local.ref === `function`) local.ref(el);
|
|
@@ -2674,10 +2439,10 @@ function CollapsibleContent(props) {
|
|
|
2674
2439
|
return _el$3;
|
|
2675
2440
|
})();
|
|
2676
2441
|
}
|
|
2677
|
-
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>`);
|
|
2678
2443
|
const CommandContext = createContext();
|
|
2679
2444
|
const GroupContext$1 = createContext();
|
|
2680
|
-
function useRoot
|
|
2445
|
+
function useRoot() {
|
|
2681
2446
|
const ctx = useContext(CommandContext);
|
|
2682
2447
|
if (!ctx) throw new Error(`Command parts must sit inside <Command>`);
|
|
2683
2448
|
return ctx;
|
|
@@ -2721,7 +2486,7 @@ function Command(props) {
|
|
|
2721
2486
|
labelId: createUniqueId()
|
|
2722
2487
|
};
|
|
2723
2488
|
return (() => {
|
|
2724
|
-
var _el$ = _tmpl$$
|
|
2489
|
+
var _el$ = _tmpl$$t(), _el$2 = _el$.firstChild;
|
|
2725
2490
|
spread(_el$, mergeProps({
|
|
2726
2491
|
get ["class"]() {
|
|
2727
2492
|
return cn(COMMAND_CLASSES.root, local.class);
|
|
@@ -2761,7 +2526,7 @@ function CommandInput(props) {
|
|
|
2761
2526
|
listId,
|
|
2762
2527
|
inputId,
|
|
2763
2528
|
labelId
|
|
2764
|
-
} = useRoot
|
|
2529
|
+
} = useRoot();
|
|
2765
2530
|
let input;
|
|
2766
2531
|
const controlled = () => local.value !== void 0;
|
|
2767
2532
|
store.setSearch(local.value ?? local.defaultValue ?? ``, true);
|
|
@@ -2783,7 +2548,7 @@ function CommandInput(props) {
|
|
|
2783
2548
|
return store.selectedId;
|
|
2784
2549
|
};
|
|
2785
2550
|
return (() => {
|
|
2786
|
-
var _el$3 = _tmpl$3$
|
|
2551
|
+
var _el$3 = _tmpl$3$c(), _el$4 = _el$3.firstChild;
|
|
2787
2552
|
insert(_el$3, createComponent(PaintIcon, {
|
|
2788
2553
|
icon: Search,
|
|
2789
2554
|
get ["class"]() {
|
|
@@ -2826,7 +2591,7 @@ function CommandInput(props) {
|
|
|
2826
2591
|
return shown() !== ``;
|
|
2827
2592
|
},
|
|
2828
2593
|
get children() {
|
|
2829
|
-
var _el$5 = _tmpl$2$
|
|
2594
|
+
var _el$5 = _tmpl$2$h();
|
|
2830
2595
|
_el$5.$$click = () => {
|
|
2831
2596
|
change(``);
|
|
2832
2597
|
input?.focus();
|
|
@@ -2864,7 +2629,7 @@ function CommandList(props) {
|
|
|
2864
2629
|
store,
|
|
2865
2630
|
track,
|
|
2866
2631
|
listId
|
|
2867
|
-
} = useRoot
|
|
2632
|
+
} = useRoot();
|
|
2868
2633
|
let list;
|
|
2869
2634
|
let sizer;
|
|
2870
2635
|
onMount(() => {
|
|
@@ -2876,7 +2641,7 @@ function CommandList(props) {
|
|
|
2876
2641
|
return store.selectedId;
|
|
2877
2642
|
};
|
|
2878
2643
|
return (() => {
|
|
2879
|
-
var _el$6 = _tmpl$4$
|
|
2644
|
+
var _el$6 = _tmpl$4$a(), _el$7 = _el$6.firstChild;
|
|
2880
2645
|
var _ref$ = list;
|
|
2881
2646
|
typeof _ref$ === "function" ? use(_ref$, _el$6) : list = _el$6;
|
|
2882
2647
|
spread(_el$6, mergeProps({
|
|
@@ -2907,7 +2672,7 @@ function CommandEmpty(props) {
|
|
|
2907
2672
|
const {
|
|
2908
2673
|
store,
|
|
2909
2674
|
track
|
|
2910
|
-
} = useRoot
|
|
2675
|
+
} = useRoot();
|
|
2911
2676
|
return createComponent(Show, {
|
|
2912
2677
|
get when() {
|
|
2913
2678
|
return track(), store.empty();
|
|
@@ -2938,7 +2703,7 @@ function CommandGroup(props) {
|
|
|
2938
2703
|
const {
|
|
2939
2704
|
store,
|
|
2940
2705
|
track
|
|
2941
|
-
} = useRoot
|
|
2706
|
+
} = useRoot();
|
|
2942
2707
|
const id = createUniqueId();
|
|
2943
2708
|
const headingId = createUniqueId();
|
|
2944
2709
|
const seq = store.nextSeq();
|
|
@@ -2955,7 +2720,7 @@ function CommandGroup(props) {
|
|
|
2955
2720
|
const heading = children(() => local.heading);
|
|
2956
2721
|
const groupValue = () => local.value ?? (typeof local.heading === `string` ? local.heading : void 0);
|
|
2957
2722
|
return (() => {
|
|
2958
|
-
var _el$9 = _tmpl$7$
|
|
2723
|
+
var _el$9 = _tmpl$7$2(), _el$1 = _el$9.firstChild;
|
|
2959
2724
|
var _ref$2 = el;
|
|
2960
2725
|
typeof _ref$2 === "function" ? use(_ref$2, _el$9) : el = _el$9;
|
|
2961
2726
|
spread(_el$9, mergeProps({
|
|
@@ -2976,7 +2741,7 @@ function CommandGroup(props) {
|
|
|
2976
2741
|
return heading();
|
|
2977
2742
|
},
|
|
2978
2743
|
get children() {
|
|
2979
|
-
var _el$0 = _tmpl$6$
|
|
2744
|
+
var _el$0 = _tmpl$6$4();
|
|
2980
2745
|
setAttribute(_el$0, "id", headingId);
|
|
2981
2746
|
insert(_el$0, heading);
|
|
2982
2747
|
effect(() => className(_el$0, COMMAND_CLASSES.groupHeading));
|
|
@@ -3003,7 +2768,7 @@ function CommandItem(props) {
|
|
|
3003
2768
|
const {
|
|
3004
2769
|
store,
|
|
3005
2770
|
track
|
|
3006
|
-
} = useRoot
|
|
2771
|
+
} = useRoot();
|
|
3007
2772
|
const group = useContext(GroupContext$1);
|
|
3008
2773
|
const id = createUniqueId();
|
|
3009
2774
|
const seq = store.nextSeq();
|
|
@@ -3049,7 +2814,7 @@ function CommandItem(props) {
|
|
|
3049
2814
|
get children() {
|
|
3050
2815
|
return (() => {
|
|
3051
2816
|
const node2 = (() => {
|
|
3052
|
-
var _el$10 = _tmpl$8$
|
|
2817
|
+
var _el$10 = _tmpl$8$2();
|
|
3053
2818
|
spread(_el$10, mergeProps({
|
|
3054
2819
|
get ["class"]() {
|
|
3055
2820
|
return cn(COMMAND_CLASSES.item, local.class);
|
|
@@ -3109,7 +2874,7 @@ function CommandSeparator(props) {
|
|
|
3109
2874
|
const {
|
|
3110
2875
|
store,
|
|
3111
2876
|
track
|
|
3112
|
-
} = useRoot
|
|
2877
|
+
} = useRoot();
|
|
3113
2878
|
const id = createUniqueId();
|
|
3114
2879
|
const seq = store.nextSeq();
|
|
3115
2880
|
let el;
|
|
@@ -3125,7 +2890,7 @@ function CommandSeparator(props) {
|
|
|
3125
2890
|
get children() {
|
|
3126
2891
|
return (() => {
|
|
3127
2892
|
const node2 = (() => {
|
|
3128
|
-
var _el$11 = _tmpl$9$
|
|
2893
|
+
var _el$11 = _tmpl$9$1();
|
|
3129
2894
|
spread(_el$11, mergeProps({
|
|
3130
2895
|
get ["class"]() {
|
|
3131
2896
|
return cn(COMMAND_CLASSES.separator, local.class);
|
|
@@ -3153,7 +2918,7 @@ function CommandSeparator(props) {
|
|
|
3153
2918
|
function CommandShortcut(props) {
|
|
3154
2919
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3155
2920
|
return (() => {
|
|
3156
|
-
var _el$12 = _tmpl$0$
|
|
2921
|
+
var _el$12 = _tmpl$0$1();
|
|
3157
2922
|
spread(_el$12, mergeProps({
|
|
3158
2923
|
get ["class"]() {
|
|
3159
2924
|
return cn(COMMAND_CLASSES.shortcut, local.class);
|
|
@@ -3163,7 +2928,7 @@ function CommandShortcut(props) {
|
|
|
3163
2928
|
})();
|
|
3164
2929
|
}
|
|
3165
2930
|
delegateEvents(["click"]);
|
|
3166
|
-
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>`);
|
|
3167
2932
|
function ContextRing(props) {
|
|
3168
2933
|
const [local, rest] = splitProps(props, [`percent`, `tone`, `showEmpty`, `class`]);
|
|
3169
2934
|
const value = () => local.percent ?? null;
|
|
@@ -3185,7 +2950,7 @@ function ContextRing(props) {
|
|
|
3185
2950
|
}
|
|
3186
2951
|
}, rest, {
|
|
3187
2952
|
get children() {
|
|
3188
|
-
var _el$ = _tmpl$2$
|
|
2953
|
+
var _el$ = _tmpl$2$g(), _el$2 = _el$.firstChild;
|
|
3189
2954
|
setAttribute(_el$, "viewBox", `0 0 ${RING_SIZE} ${RING_SIZE}`);
|
|
3190
2955
|
setAttribute(_el$, "width", RING_SIZE);
|
|
3191
2956
|
setAttribute(_el$, "height", RING_SIZE);
|
|
@@ -3198,7 +2963,7 @@ function ContextRing(props) {
|
|
|
3198
2963
|
return value() !== null;
|
|
3199
2964
|
},
|
|
3200
2965
|
get children() {
|
|
3201
|
-
var _el$3 = _tmpl$$
|
|
2966
|
+
var _el$3 = _tmpl$$s();
|
|
3202
2967
|
setAttribute(_el$3, "cx", RING_SIZE / 2);
|
|
3203
2968
|
setAttribute(_el$3, "cy", RING_SIZE / 2);
|
|
3204
2969
|
setAttribute(_el$3, "r", RING_RADIUS);
|
|
@@ -3222,7 +2987,7 @@ function ContextRing(props) {
|
|
|
3222
2987
|
}
|
|
3223
2988
|
});
|
|
3224
2989
|
}
|
|
3225
|
-
var _tmpl$$
|
|
2990
|
+
var _tmpl$$r = /* @__PURE__ */ template(`<div data-slot=sheet-grabber aria-hidden=true>`);
|
|
3226
2991
|
const SheetDragContext = createContext(null);
|
|
3227
2992
|
function SheetDragProvider(props) {
|
|
3228
2993
|
return createComponent(SheetDragContext.Provider, {
|
|
@@ -3241,7 +3006,7 @@ function SheetGrabber(props) {
|
|
|
3241
3006
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3242
3007
|
const drag = createSheetDragHandleProps();
|
|
3243
3008
|
return (() => {
|
|
3244
|
-
var _el$ = _tmpl$$
|
|
3009
|
+
var _el$ = _tmpl$$r();
|
|
3245
3010
|
spread(_el$, mergeProps(drag ?? {}, rest, {
|
|
3246
3011
|
get ["class"]() {
|
|
3247
3012
|
return cn(SHEET_CHROME_CLASSES.grabber, local.class);
|
|
@@ -3338,7 +3103,7 @@ function createSheetDrag(opts) {
|
|
|
3338
3103
|
};
|
|
3339
3104
|
return { handleProps };
|
|
3340
3105
|
}
|
|
3341
|
-
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>`);
|
|
3342
3107
|
function Sheet(props) {
|
|
3343
3108
|
return createComponent(DialogRoot, props);
|
|
3344
3109
|
}
|
|
@@ -3448,7 +3213,7 @@ function SheetContent(props) {
|
|
|
3448
3213
|
return SHEET_CLASSES.closeIcon;
|
|
3449
3214
|
}
|
|
3450
3215
|
}), (() => {
|
|
3451
|
-
var _el$ = _tmpl$$
|
|
3216
|
+
var _el$ = _tmpl$$q();
|
|
3452
3217
|
effect(() => className(_el$, SHEET_CLASSES.srOnly));
|
|
3453
3218
|
return _el$;
|
|
3454
3219
|
})()];
|
|
@@ -3467,7 +3232,7 @@ function SheetHeader(props) {
|
|
|
3467
3232
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3468
3233
|
const drag = createSheetDragHandleProps();
|
|
3469
3234
|
return (() => {
|
|
3470
|
-
var _el$2 = _tmpl$2$
|
|
3235
|
+
var _el$2 = _tmpl$2$f();
|
|
3471
3236
|
spread(_el$2, mergeProps(drag ?? {}, {
|
|
3472
3237
|
get ["class"]() {
|
|
3473
3238
|
return cn(SHEET_CLASSES.header, local.class);
|
|
@@ -3479,7 +3244,7 @@ function SheetHeader(props) {
|
|
|
3479
3244
|
function SheetFooter(props) {
|
|
3480
3245
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3481
3246
|
return (() => {
|
|
3482
|
-
var _el$3 = _tmpl$3$
|
|
3247
|
+
var _el$3 = _tmpl$3$b();
|
|
3483
3248
|
spread(_el$3, mergeProps({
|
|
3484
3249
|
get ["class"]() {
|
|
3485
3250
|
return cn(SHEET_CLASSES.footer, local.class);
|
|
@@ -3506,7 +3271,7 @@ function SheetDescription(props) {
|
|
|
3506
3271
|
}
|
|
3507
3272
|
}, rest));
|
|
3508
3273
|
}
|
|
3509
|
-
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>`);
|
|
3510
3275
|
function Dialog(props) {
|
|
3511
3276
|
return createComponent(DialogRoot, props);
|
|
3512
3277
|
}
|
|
@@ -3537,7 +3302,7 @@ function DialogContent(props) {
|
|
|
3537
3302
|
const [local, rest] = splitProps(props, [`class`, `children`, `showCloseButton`, `mobile`, `ref`, `onInteractOutside`, `container`]);
|
|
3538
3303
|
const mobile = () => local.mobile ?? `sheet`;
|
|
3539
3304
|
const isSheet = () => mobile() === `sheet` || mobile() === `sheet-full`;
|
|
3540
|
-
const isPhone = createMediaQuery
|
|
3305
|
+
const isPhone = createMediaQuery(DIALOG_PHONE_QUERY);
|
|
3541
3306
|
let panel;
|
|
3542
3307
|
let dragClose;
|
|
3543
3308
|
const {
|
|
@@ -3626,7 +3391,7 @@ function DialogContent(props) {
|
|
|
3626
3391
|
return [createComponent(PaintIcon, {
|
|
3627
3392
|
icon: X
|
|
3628
3393
|
}), (() => {
|
|
3629
|
-
var _el$ = _tmpl$$
|
|
3394
|
+
var _el$ = _tmpl$$p();
|
|
3630
3395
|
effect(() => className(_el$, DIALOG_CLASSES.srOnly));
|
|
3631
3396
|
return _el$;
|
|
3632
3397
|
})()];
|
|
@@ -3679,7 +3444,7 @@ function DialogHeader(props) {
|
|
|
3679
3444
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3680
3445
|
const drag = createSheetDragHandleProps();
|
|
3681
3446
|
return (() => {
|
|
3682
|
-
var _el$2 = _tmpl$2$
|
|
3447
|
+
var _el$2 = _tmpl$2$e();
|
|
3683
3448
|
spread(_el$2, mergeProps(drag ?? {}, {
|
|
3684
3449
|
get ["class"]() {
|
|
3685
3450
|
return cn(DIALOG_CLASSES.header, local.class);
|
|
@@ -3691,7 +3456,7 @@ function DialogHeader(props) {
|
|
|
3691
3456
|
function DialogBody(props) {
|
|
3692
3457
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3693
3458
|
return (() => {
|
|
3694
|
-
var _el$3 = _tmpl$3$
|
|
3459
|
+
var _el$3 = _tmpl$3$a();
|
|
3695
3460
|
spread(_el$3, mergeProps({
|
|
3696
3461
|
get ["class"]() {
|
|
3697
3462
|
return cn(DIALOG_CLASSES.body, local.class);
|
|
@@ -3703,7 +3468,7 @@ function DialogBody(props) {
|
|
|
3703
3468
|
function DialogFooter(props) {
|
|
3704
3469
|
const [local, rest] = splitProps(props, [`class`]);
|
|
3705
3470
|
return (() => {
|
|
3706
|
-
var _el$4 = _tmpl$4$
|
|
3471
|
+
var _el$4 = _tmpl$4$9();
|
|
3707
3472
|
spread(_el$4, mergeProps({
|
|
3708
3473
|
get ["class"]() {
|
|
3709
3474
|
return cn(DIALOG_CLASSES.footer, local.class);
|
|
@@ -3748,7 +3513,7 @@ function DialogDescription(props) {
|
|
|
3748
3513
|
}
|
|
3749
3514
|
}, rest));
|
|
3750
3515
|
}
|
|
3751
|
-
var _tmpl$$
|
|
3516
|
+
var _tmpl$$o = /* @__PURE__ */ template(`<button type=button data-slot=disclosure-header>`);
|
|
3752
3517
|
function DisclosureHeader(props) {
|
|
3753
3518
|
const [local, rest] = splitProps(props, [`open`, `onToggle`, `chevron`, `class`, `children`]);
|
|
3754
3519
|
const chevron = () => local.chevron ?? `leading`;
|
|
@@ -3762,7 +3527,7 @@ function DisclosureHeader(props) {
|
|
|
3762
3527
|
}
|
|
3763
3528
|
});
|
|
3764
3529
|
return (() => {
|
|
3765
|
-
var _el$ = _tmpl$$
|
|
3530
|
+
var _el$ = _tmpl$$o();
|
|
3766
3531
|
_el$.$$click = () => local.onToggle();
|
|
3767
3532
|
spread(_el$, mergeProps({
|
|
3768
3533
|
get ["data-chevron"]() {
|
|
@@ -3788,14 +3553,14 @@ function DisclosureHeader(props) {
|
|
|
3788
3553
|
})();
|
|
3789
3554
|
}
|
|
3790
3555
|
delegateEvents(["click"]);
|
|
3791
|
-
var _tmpl$$
|
|
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>`);
|
|
3792
3557
|
function DockCard(props) {
|
|
3793
3558
|
const [local, rest] = splitProps(props, [`tint`, `icon`, `label`, `caption`, `meta`, `title`, `onOpen`, `trailing`, `hidden`, `openLabel`, `class`]);
|
|
3794
3559
|
const tint = () => local.tint ?? `muted`;
|
|
3795
3560
|
const pressable = () => local.onOpen !== void 0;
|
|
3796
3561
|
const has = (value) => value !== void 0 && value !== null;
|
|
3797
3562
|
return (() => {
|
|
3798
|
-
var _el$ = _tmpl$3$
|
|
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;
|
|
3799
3564
|
_el$.$$keydown = (event) => {
|
|
3800
3565
|
if (!pressable() || event.defaultPrevented) return;
|
|
3801
3566
|
if (event.key === `Enter` || event.key === ` `) {
|
|
@@ -3842,7 +3607,7 @@ function DockCard(props) {
|
|
|
3842
3607
|
return has(local.caption);
|
|
3843
3608
|
},
|
|
3844
3609
|
get children() {
|
|
3845
|
-
var _el$6 = _tmpl$$
|
|
3610
|
+
var _el$6 = _tmpl$$n();
|
|
3846
3611
|
insert(_el$6, () => local.caption);
|
|
3847
3612
|
effect(() => className(_el$6, DOCK_CARD_CLASSES.caption));
|
|
3848
3613
|
return _el$6;
|
|
@@ -3853,7 +3618,7 @@ function DockCard(props) {
|
|
|
3853
3618
|
return has(local.meta);
|
|
3854
3619
|
},
|
|
3855
3620
|
get children() {
|
|
3856
|
-
var _el$7 = _tmpl$2$
|
|
3621
|
+
var _el$7 = _tmpl$2$d();
|
|
3857
3622
|
insert(_el$7, () => local.meta);
|
|
3858
3623
|
effect(() => className(_el$7, DOCK_CARD_CLASSES.meta));
|
|
3859
3624
|
return _el$7;
|
|
@@ -3870,7 +3635,7 @@ function DockCard(props) {
|
|
|
3870
3635
|
return has(local.trailing);
|
|
3871
3636
|
},
|
|
3872
3637
|
get children() {
|
|
3873
|
-
var _el$0 = _tmpl$4$
|
|
3638
|
+
var _el$0 = _tmpl$4$8();
|
|
3874
3639
|
insert(_el$0, () => local.trailing);
|
|
3875
3640
|
effect(() => className(_el$0, DOCK_CARD_CLASSES.trailing));
|
|
3876
3641
|
return _el$0;
|
|
@@ -3910,777 +3675,106 @@ function DockCard(props) {
|
|
|
3910
3675
|
return _el$;
|
|
3911
3676
|
})();
|
|
3912
3677
|
}
|
|
3913
|
-
function DockPile(props) {
|
|
3914
|
-
const [local, rest] = splitProps(props, [`items`, `expanded`, `onExpandedChange`, `class`, `style`]);
|
|
3915
|
-
const [measured, setMeasured] = createSignal({});
|
|
3916
|
-
const nodes = /* @__PURE__ */ new Map();
|
|
3917
|
-
const measure = () => {
|
|
3918
|
-
const next = {};
|
|
3919
|
-
for (const item of local.items) {
|
|
3920
|
-
const el = nodes.get(item.id);
|
|
3921
|
-
if (item.height === void 0 && el) next[item.id] = el.offsetHeight;
|
|
3922
|
-
}
|
|
3923
|
-
const prev = measured();
|
|
3924
|
-
if (!(Object.keys(next).length === Object.keys(prev).length && Object.entries(next).every(([k, v]) => prev[k] === v))) setMeasured(next);
|
|
3925
|
-
};
|
|
3926
|
-
createEffect(() => {
|
|
3927
|
-
void local.items;
|
|
3928
|
-
measure();
|
|
3929
|
-
if (typeof ResizeObserver === `undefined`) return;
|
|
3930
|
-
const observer = new ResizeObserver(measure);
|
|
3931
|
-
for (const el of nodes.values()) observer.observe(el);
|
|
3932
|
-
onCleanup(() => observer.disconnect());
|
|
3933
|
-
});
|
|
3934
|
-
const geometry = createMemo(() => dockPileGeometry(local.items.map((item) => item.height ?? measured()[item.id] ?? 0), local.expanded));
|
|
3935
|
-
return (() => {
|
|
3936
|
-
var _el$1 = _tmpl$5$5();
|
|
3937
|
-
_el$1.$$focusout = (event) => {
|
|
3938
|
-
const next = event.relatedTarget;
|
|
3939
|
-
if (!next || !event.currentTarget.contains(next)) local.onExpandedChange?.(false);
|
|
3940
|
-
};
|
|
3941
|
-
_el$1.$$focusin = () => local.onExpandedChange?.(true);
|
|
3942
|
-
_el$1.addEventListener("pointerleave", (event) => {
|
|
3943
|
-
if (event.pointerType !== `touch`) local.onExpandedChange?.(false);
|
|
3944
|
-
});
|
|
3945
|
-
_el$1.addEventListener("pointerenter", (event) => {
|
|
3946
|
-
if (event.pointerType !== `touch`) local.onExpandedChange?.(true);
|
|
3947
|
-
});
|
|
3948
|
-
use((el) => bindStyle(el, () => ({
|
|
3949
|
-
...local.style ?? {},
|
|
3950
|
-
height: `${geometry().height}px`
|
|
3951
|
-
})), _el$1);
|
|
3952
|
-
spread(_el$1, mergeProps({
|
|
3953
|
-
get ["data-expanded"]() {
|
|
3954
|
-
return local.expanded ? `true` : `false`;
|
|
3955
|
-
},
|
|
3956
|
-
get ["class"]() {
|
|
3957
|
-
return cn(DOCK_PILE_CLASSES.root, local.class);
|
|
3958
|
-
}
|
|
3959
|
-
}, rest), false, true);
|
|
3960
|
-
insert(_el$1, createComponent(For, {
|
|
3961
|
-
get each() {
|
|
3962
|
-
return local.items;
|
|
3963
|
-
},
|
|
3964
|
-
children: (item, i) => {
|
|
3965
|
-
const placed = () => geometry().items[i()] ?? {
|
|
3966
|
-
offset: 0,
|
|
3967
|
-
scale: 1,
|
|
3968
|
-
visible: true
|
|
3969
|
-
};
|
|
3970
|
-
let node2;
|
|
3971
|
-
onCleanup(() => {
|
|
3972
|
-
if (nodes.get(item.id) === node2) nodes.delete(item.id);
|
|
3973
|
-
});
|
|
3974
|
-
return (() => {
|
|
3975
|
-
var _el$10 = _tmpl$6$4();
|
|
3976
|
-
use((el) => {
|
|
3977
|
-
node2 = el;
|
|
3978
|
-
nodes.set(item.id, el);
|
|
3979
|
-
bindStyle(el, () => css({
|
|
3980
|
-
"--offset": `${placed().offset}px`,
|
|
3981
|
-
"--scale": `${placed().scale}`,
|
|
3982
|
-
zIndex: i() + 1
|
|
3983
|
-
}));
|
|
3984
|
-
}, _el$10);
|
|
3985
|
-
insert(_el$10, () => item.node);
|
|
3986
|
-
effect((_p$) => {
|
|
3987
|
-
var _v$8 = i() === local.items.length - 1 ? `true` : `false`, _v$9 = placed().visible ? `true` : `false`, _v$0 = DOCK_PILE_CLASSES.item;
|
|
3988
|
-
_v$8 !== _p$.e && setAttribute(_el$10, "data-front", _p$.e = _v$8);
|
|
3989
|
-
_v$9 !== _p$.t && setAttribute(_el$10, "data-visible", _p$.t = _v$9);
|
|
3990
|
-
_v$0 !== _p$.a && className(_el$10, _p$.a = _v$0);
|
|
3991
|
-
return _p$;
|
|
3992
|
-
}, {
|
|
3993
|
-
e: void 0,
|
|
3994
|
-
t: void 0,
|
|
3995
|
-
a: void 0
|
|
3996
|
-
});
|
|
3997
|
-
return _el$10;
|
|
3998
|
-
})();
|
|
3999
|
-
}
|
|
4000
|
-
}));
|
|
4001
|
-
return _el$1;
|
|
4002
|
-
})();
|
|
4003
|
-
}
|
|
4004
|
-
delegateEvents(["click", "keydown", "focusin", "focusout"]);
|
|
4005
|
-
var _tmpl$$l = /* @__PURE__ */ template(`<div role=group data-slot=dropdown-menu-group>`), _tmpl$2$b = /* @__PURE__ */ template(`<div role=menuitem>`), _tmpl$3$7 = /* @__PURE__ */ template(`<span>`), _tmpl$4$6 = /* @__PURE__ */ template(`<div role=menuitemcheckbox><span>`), _tmpl$5$4 = /* @__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>`);
|
|
4006
|
-
const RootContext = createContext();
|
|
4007
|
-
const useRoot = (part2) => {
|
|
4008
|
-
const ctx = useContext(RootContext);
|
|
4009
|
-
if (!ctx) throw new Error(`\`${part2}\` must be used within \`DropdownMenu\``);
|
|
4010
|
-
return ctx;
|
|
4011
|
-
};
|
|
4012
|
-
const LevelOpenContext = createContext(() => false);
|
|
4013
|
-
function DropdownMenu(props) {
|
|
4014
|
-
const [open, setOpen] = createOpenState({
|
|
4015
|
-
open: () => props.open,
|
|
4016
|
-
defaultOpen: props.defaultOpen,
|
|
4017
|
-
onOpenChange: () => props.onOpenChange
|
|
4018
|
-
});
|
|
4019
|
-
const [trigger, setTrigger] = createSignal();
|
|
4020
|
-
useKeyboardTracking();
|
|
4021
|
-
const value = {
|
|
4022
|
-
open,
|
|
4023
|
-
setOpen,
|
|
4024
|
-
triggerId: `radix-${createId()}`,
|
|
4025
|
-
contentId: `radix-${createId()}`,
|
|
4026
|
-
trigger,
|
|
4027
|
-
setTrigger,
|
|
4028
|
-
dir: () => props.dir ?? `ltr`
|
|
4029
|
-
};
|
|
4030
|
-
return createComponent(RootContext.Provider, {
|
|
4031
|
-
value,
|
|
4032
|
-
get children() {
|
|
4033
|
-
return createComponent(LevelOpenContext.Provider, {
|
|
4034
|
-
value: open,
|
|
4035
|
-
get children() {
|
|
4036
|
-
return props.children;
|
|
4037
|
-
}
|
|
4038
|
-
});
|
|
4039
|
-
}
|
|
4040
|
-
});
|
|
4041
|
-
}
|
|
4042
|
-
function DropdownMenuPortal(props) {
|
|
4043
|
-
return createComponent(DialogPortalPart, props);
|
|
4044
|
-
}
|
|
4045
|
-
function DropdownMenuTrigger(props) {
|
|
4046
|
-
const ctx = useRoot(`DropdownMenuTrigger`);
|
|
4047
|
-
const [local, rest] = splitProps(props, [`as`, `ref`, `disabled`, `onPointerDown`, `onKeyDown`]);
|
|
4048
|
-
const disabled = () => local.disabled ?? false;
|
|
4049
|
-
return createComponent(Dynamic, mergeProps({
|
|
4050
|
-
get component() {
|
|
4051
|
-
return local.as ?? `button`;
|
|
4052
|
-
},
|
|
4053
|
-
"data-slot": "dropdown-menu-trigger",
|
|
4054
|
-
type: "button",
|
|
4055
|
-
get id() {
|
|
4056
|
-
return ctx.triggerId;
|
|
4057
|
-
},
|
|
4058
|
-
"aria-haspopup": "menu",
|
|
4059
|
-
get ["aria-expanded"]() {
|
|
4060
|
-
return ctx.open() ? `true` : `false`;
|
|
4061
|
-
},
|
|
4062
|
-
get ["aria-controls"]() {
|
|
4063
|
-
return memo(() => !!ctx.open())() ? ctx.contentId : void 0;
|
|
4064
|
-
},
|
|
4065
|
-
get ["data-state"]() {
|
|
4066
|
-
return stateOf$1(ctx.open());
|
|
4067
|
-
},
|
|
4068
|
-
get ["data-disabled"]() {
|
|
4069
|
-
return disabled() ? `` : void 0;
|
|
4070
|
-
},
|
|
4071
|
-
get disabled() {
|
|
4072
|
-
return disabled();
|
|
4073
|
-
}
|
|
4074
|
-
}, rest, {
|
|
4075
|
-
ref(r$) {
|
|
4076
|
-
var _ref$ = mergeRefs(local.ref, ctx.setTrigger);
|
|
4077
|
-
typeof _ref$ === "function" && _ref$(r$);
|
|
4078
|
-
},
|
|
4079
|
-
get onPointerDown() {
|
|
4080
|
-
return composeHandlers(local.onPointerDown, (e) => {
|
|
4081
|
-
if (!untrack(disabled) && e.button === 0 && e.ctrlKey === false) {
|
|
4082
|
-
const was = untrack(ctx.open);
|
|
4083
|
-
ctx.setOpen(!was);
|
|
4084
|
-
if (!was) e.preventDefault();
|
|
4085
|
-
}
|
|
4086
|
-
});
|
|
4087
|
-
},
|
|
4088
|
-
get onKeyDown() {
|
|
4089
|
-
return composeHandlers(local.onKeyDown, (e) => {
|
|
4090
|
-
if (untrack(disabled)) return;
|
|
4091
|
-
if ([`Enter`, ` `].includes(e.key)) ctx.setOpen(!untrack(ctx.open));
|
|
4092
|
-
if (e.key === `ArrowDown`) ctx.setOpen(true);
|
|
4093
|
-
if ([`Enter`, ` `, `ArrowDown`].includes(e.key)) e.preventDefault();
|
|
4094
|
-
});
|
|
4095
|
-
}
|
|
4096
|
-
}));
|
|
4097
|
-
}
|
|
4098
|
-
const CONTENT_KEYS = [`class`, `side`, `align`, `sideOffset`, `alignOffset`, `collisionPadding`, `container`, `children`, `ref`, `onKeyDown`, `onCloseAutoFocus`, `onEscapeKeyDown`, `onFocusOutside`, `onInteractOutside`];
|
|
4099
|
-
function DropdownMenuContent(props) {
|
|
4100
|
-
const ctx = useRoot(`DropdownMenuContent`);
|
|
4101
|
-
const [local, rest] = splitProps(props, CONTENT_KEYS);
|
|
4102
|
-
const presence = createPresence(ctx.open);
|
|
4103
|
-
let interactedOutside = false;
|
|
4104
|
-
return createComponent(DropdownMenuPortal, {
|
|
4105
|
-
get container() {
|
|
4106
|
-
return local.container;
|
|
4107
|
-
},
|
|
4108
|
-
get children() {
|
|
4109
|
-
return createComponent(Show, {
|
|
4110
|
-
get when() {
|
|
4111
|
-
return presence.mounted();
|
|
4112
|
-
},
|
|
4113
|
-
children: (_) => {
|
|
4114
|
-
const lag = layerMountedThisTask();
|
|
4115
|
-
return createComponent(MenuContent, {
|
|
4116
|
-
get anchor() {
|
|
4117
|
-
return ctx.trigger();
|
|
4118
|
-
},
|
|
4119
|
-
get side() {
|
|
4120
|
-
return local.side ?? `bottom`;
|
|
4121
|
-
},
|
|
4122
|
-
get align() {
|
|
4123
|
-
return local.align ?? `center`;
|
|
4124
|
-
},
|
|
4125
|
-
get sideOffset() {
|
|
4126
|
-
return local.sideOffset ?? 4;
|
|
4127
|
-
},
|
|
4128
|
-
get alignOffset() {
|
|
4129
|
-
return local.alignOffset;
|
|
4130
|
-
},
|
|
4131
|
-
get collisionPadding() {
|
|
4132
|
-
return local.collisionPadding ?? 0;
|
|
4133
|
-
},
|
|
4134
|
-
get dir() {
|
|
4135
|
-
return ctx.dir();
|
|
4136
|
-
},
|
|
4137
|
-
kind: "dropdown-menu",
|
|
4138
|
-
lagParentLayer: lag,
|
|
4139
|
-
root: true,
|
|
4140
|
-
get id() {
|
|
4141
|
-
return ctx.contentId;
|
|
4142
|
-
},
|
|
4143
|
-
get labelledBy() {
|
|
4144
|
-
return ctx.triggerId;
|
|
4145
|
-
},
|
|
4146
|
-
state: () => stateOf$1(ctx.open()),
|
|
4147
|
-
attrs: () => ({
|
|
4148
|
-
"data-slot": `dropdown-menu-content`,
|
|
4149
|
-
class: cn(DROPDOWN_MENU_CLASSES.content, local.class),
|
|
4150
|
-
...rest
|
|
4151
|
-
}),
|
|
4152
|
-
setContent: (el) => {
|
|
4153
|
-
if (el) {
|
|
4154
|
-
presence.ref(el);
|
|
4155
|
-
noteLayerMount();
|
|
4156
|
-
callRef(local.ref, el);
|
|
4157
|
-
}
|
|
4158
|
-
},
|
|
4159
|
-
onDismiss: () => ctx.setOpen(false),
|
|
4160
|
-
get onKeyDown() {
|
|
4161
|
-
return local.onKeyDown;
|
|
4162
|
-
},
|
|
4163
|
-
get onEscapeKeyDown() {
|
|
4164
|
-
return local.onEscapeKeyDown;
|
|
4165
|
-
},
|
|
4166
|
-
get onFocusOutside() {
|
|
4167
|
-
return local.onFocusOutside;
|
|
4168
|
-
},
|
|
4169
|
-
onInteractOutside: (e) => {
|
|
4170
|
-
local.onInteractOutside?.(e);
|
|
4171
|
-
if (e.defaultPrevented) return;
|
|
4172
|
-
const original = e.detail.originalEvent;
|
|
4173
|
-
const ctrlLeftClick = original.button === 0 && original.ctrlKey === true;
|
|
4174
|
-
if (original.button === 2 || ctrlLeftClick) interactedOutside = true;
|
|
4175
|
-
},
|
|
4176
|
-
onCloseAutoFocus: (e) => {
|
|
4177
|
-
local.onCloseAutoFocus?.(e);
|
|
4178
|
-
if (e.defaultPrevented) return;
|
|
4179
|
-
if (!interactedOutside) ctx.trigger()?.focus();
|
|
4180
|
-
interactedOutside = false;
|
|
4181
|
-
e.preventDefault();
|
|
4182
|
-
},
|
|
4183
|
-
get children() {
|
|
4184
|
-
return local.children;
|
|
4185
|
-
}
|
|
4186
|
-
});
|
|
4187
|
-
}
|
|
4188
|
-
});
|
|
4189
|
-
}
|
|
4190
|
-
});
|
|
4191
|
-
}
|
|
4192
|
-
function DropdownMenuGroup(props) {
|
|
4193
|
-
return (() => {
|
|
4194
|
-
var _el$ = _tmpl$$l();
|
|
4195
|
-
spread(_el$, props, false, false);
|
|
4196
|
-
return _el$;
|
|
4197
|
-
})();
|
|
4198
|
-
}
|
|
4199
|
-
const insetAttr = (inset) => inset === void 0 ? void 0 : String(inset);
|
|
4200
|
-
function createItem(local, onSelect) {
|
|
4201
|
-
const root = useRoot(`DropdownMenuItem`);
|
|
4202
|
-
const row = createSelectable(() => local.disabled ?? false, (e) => onSelect(e), () => root.setOpen(false));
|
|
4203
|
-
const h = row.handlers;
|
|
4204
|
-
return {
|
|
4205
|
-
attrs: row.attrs,
|
|
4206
|
-
ref: mergeRefs(row.ref, local.ref),
|
|
4207
|
-
handlers: {
|
|
4208
|
-
onClick: composeHandlers(local.onClick, h.onClick),
|
|
4209
|
-
onPointerDown: composeHandlers(local.onPointerDown, h.onPointerDown, false),
|
|
4210
|
-
onPointerUp: composeHandlers(local.onPointerUp, h.onPointerUp),
|
|
4211
|
-
onPointerMove: composeHandlers(local.onPointerMove, h.onPointerMove),
|
|
4212
|
-
onPointerLeave: composeHandlers(local.onPointerLeave, h.onPointerLeave),
|
|
4213
|
-
onKeyDown: composeHandlers(local.onKeyDown, h.onKeyDown),
|
|
4214
|
-
onFocus: composeHandlers(local.onFocus, h.onFocus),
|
|
4215
|
-
onBlur: composeHandlers(local.onBlur, h.onBlur)
|
|
4216
|
-
}
|
|
4217
|
-
};
|
|
4218
|
-
}
|
|
4219
|
-
const ITEM_KEYS = [`disabled`, `onSelect`, `ref`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerMove`, `onPointerLeave`, `onKeyDown`, `onFocus`, `onBlur`];
|
|
4220
|
-
function DropdownMenuItem(props) {
|
|
4221
|
-
const [local, handlers, rest] = splitProps(props, [`class`, `inset`, `variant`], ITEM_KEYS);
|
|
4222
|
-
const item = createItem(handlers, (e) => handlers.onSelect?.(e));
|
|
4223
|
-
return (() => {
|
|
4224
|
-
var _el$2 = _tmpl$2$b();
|
|
4225
|
-
var _ref$2 = item.ref;
|
|
4226
|
-
typeof _ref$2 === "function" ? use(_ref$2, _el$2) : item.ref = _el$2;
|
|
4227
|
-
spread(_el$2, mergeProps(() => item.attrs(), {
|
|
4228
|
-
"data-slot": "dropdown-menu-item",
|
|
4229
|
-
get ["data-inset"]() {
|
|
4230
|
-
return insetAttr(local.inset);
|
|
4231
|
-
},
|
|
4232
|
-
get ["data-variant"]() {
|
|
4233
|
-
return local.variant ?? `default`;
|
|
4234
|
-
},
|
|
4235
|
-
get ["class"]() {
|
|
4236
|
-
return cn(DROPDOWN_MENU_CLASSES.item, local.class);
|
|
4237
|
-
}
|
|
4238
|
-
}, rest, () => item.handlers), false, false);
|
|
4239
|
-
return _el$2;
|
|
4240
|
-
})();
|
|
4241
|
-
}
|
|
4242
|
-
const checkedState = (c) => c === `indeterminate` ? `indeterminate` : c ? `checked` : `unchecked`;
|
|
4243
|
-
const IndicatorContext = createContext(() => false);
|
|
4244
|
-
function ItemIndicator(props) {
|
|
4245
|
-
const checked = useContext(IndicatorContext);
|
|
4246
|
-
return createComponent(Show, {
|
|
4247
|
-
get when() {
|
|
4248
|
-
return checked() === true || checked() === `indeterminate`;
|
|
4249
|
-
},
|
|
4250
|
-
get children() {
|
|
4251
|
-
var _el$3 = _tmpl$3$7();
|
|
4252
|
-
insert(_el$3, () => props.children);
|
|
4253
|
-
effect(() => setAttribute(_el$3, "data-state", checkedState(checked())));
|
|
4254
|
-
return _el$3;
|
|
4255
|
-
}
|
|
4256
|
-
});
|
|
4257
|
-
}
|
|
4258
|
-
function DropdownMenuCheckboxItem(props) {
|
|
4259
|
-
const [local, handlers, rest] = splitProps(props, [`class`, `children`, `checked`, `onCheckedChange`], ITEM_KEYS);
|
|
4260
|
-
const checked = () => local.checked ?? false;
|
|
4261
|
-
const item = createItem(handlers, (e) => {
|
|
4262
|
-
handlers.onSelect?.(e);
|
|
4263
|
-
const c = untrack(checked);
|
|
4264
|
-
local.onCheckedChange?.(c === `indeterminate` ? true : !c);
|
|
4265
|
-
});
|
|
4266
|
-
return createComponent(IndicatorContext.Provider, {
|
|
4267
|
-
value: checked,
|
|
4268
|
-
get children() {
|
|
4269
|
-
var _el$4 = _tmpl$4$6(), _el$5 = _el$4.firstChild;
|
|
4270
|
-
var _ref$3 = item.ref;
|
|
4271
|
-
typeof _ref$3 === "function" ? use(_ref$3, _el$4) : item.ref = _el$4;
|
|
4272
|
-
spread(_el$4, mergeProps({
|
|
4273
|
-
get ["aria-checked"]() {
|
|
4274
|
-
return memo(() => checked() === `indeterminate`)() ? `mixed` : checked() ? `true` : `false`;
|
|
4275
|
-
}
|
|
4276
|
-
}, () => item.attrs(), {
|
|
4277
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
4278
|
-
get ["class"]() {
|
|
4279
|
-
return cn(DROPDOWN_MENU_CLASSES.checkItem, local.class);
|
|
4280
|
-
}
|
|
4281
|
-
}, rest, {
|
|
4282
|
-
get ["data-state"]() {
|
|
4283
|
-
return checkedState(checked());
|
|
4284
|
-
}
|
|
4285
|
-
}, () => item.handlers), false, true);
|
|
4286
|
-
insert(_el$5, createComponent(ItemIndicator, {
|
|
4287
|
-
get children() {
|
|
4288
|
-
return createComponent(PaintIcon, {
|
|
4289
|
-
icon: Check,
|
|
4290
|
-
get ["class"]() {
|
|
4291
|
-
return DROPDOWN_MENU_CLASSES.checkIcon;
|
|
4292
|
-
}
|
|
4293
|
-
});
|
|
4294
|
-
}
|
|
4295
|
-
}));
|
|
4296
|
-
insert(_el$4, () => local.children, null);
|
|
4297
|
-
effect(() => className(_el$5, DROPDOWN_MENU_CLASSES.itemIndicator));
|
|
4298
|
-
return _el$4;
|
|
4299
|
-
}
|
|
4300
|
-
});
|
|
4301
|
-
}
|
|
4302
|
-
const RadioGroupContext = createContext({
|
|
4303
|
-
value: () => void 0,
|
|
4304
|
-
onValueChange: () => {
|
|
4305
|
-
}
|
|
4306
|
-
});
|
|
4307
|
-
function DropdownMenuRadioGroup(props) {
|
|
4308
|
-
const [local, rest] = splitProps(props, [`value`, `onValueChange`]);
|
|
4309
|
-
return createComponent(RadioGroupContext.Provider, {
|
|
4310
|
-
value: {
|
|
4311
|
-
value: () => local.value,
|
|
4312
|
-
onValueChange: (v) => local.onValueChange?.(v)
|
|
4313
|
-
},
|
|
4314
|
-
get children() {
|
|
4315
|
-
var _el$6 = _tmpl$5$4();
|
|
4316
|
-
spread(_el$6, rest, false, false);
|
|
4317
|
-
return _el$6;
|
|
4318
|
-
}
|
|
4319
|
-
});
|
|
4320
|
-
}
|
|
4321
|
-
function DropdownMenuRadioItem(props) {
|
|
4322
|
-
const [local, handlers, rest] = splitProps(props, [`class`, `children`, `value`], ITEM_KEYS);
|
|
4323
|
-
const group = useContext(RadioGroupContext);
|
|
4324
|
-
const checked = () => local.value === group.value();
|
|
4325
|
-
const item = createItem(handlers, (e) => {
|
|
4326
|
-
handlers.onSelect?.(e);
|
|
4327
|
-
group.onValueChange(local.value);
|
|
4328
|
-
});
|
|
4329
|
-
return createComponent(IndicatorContext.Provider, {
|
|
4330
|
-
value: checked,
|
|
4331
|
-
get children() {
|
|
4332
|
-
var _el$7 = _tmpl$6$3(), _el$8 = _el$7.firstChild;
|
|
4333
|
-
var _ref$4 = item.ref;
|
|
4334
|
-
typeof _ref$4 === "function" ? use(_ref$4, _el$7) : item.ref = _el$7;
|
|
4335
|
-
spread(_el$7, mergeProps({
|
|
4336
|
-
get ["aria-checked"]() {
|
|
4337
|
-
return checked() ? `true` : `false`;
|
|
4338
|
-
}
|
|
4339
|
-
}, () => item.attrs(), {
|
|
4340
|
-
"data-slot": "dropdown-menu-radio-item",
|
|
4341
|
-
get ["class"]() {
|
|
4342
|
-
return cn(DROPDOWN_MENU_CLASSES.checkItem, local.class);
|
|
4343
|
-
}
|
|
4344
|
-
}, rest, {
|
|
4345
|
-
get ["data-state"]() {
|
|
4346
|
-
return checkedState(checked());
|
|
4347
|
-
}
|
|
4348
|
-
}, () => item.handlers), false, true);
|
|
4349
|
-
insert(_el$8, createComponent(ItemIndicator, {
|
|
4350
|
-
get children() {
|
|
4351
|
-
return createComponent(PaintIcon, {
|
|
4352
|
-
icon: Circle,
|
|
4353
|
-
get ["class"]() {
|
|
4354
|
-
return DROPDOWN_MENU_CLASSES.radioIcon;
|
|
4355
|
-
}
|
|
4356
|
-
});
|
|
4357
|
-
}
|
|
4358
|
-
}));
|
|
4359
|
-
insert(_el$7, () => local.children, null);
|
|
4360
|
-
effect(() => className(_el$8, DROPDOWN_MENU_CLASSES.itemIndicator));
|
|
4361
|
-
return _el$7;
|
|
4362
|
-
}
|
|
4363
|
-
});
|
|
4364
|
-
}
|
|
4365
|
-
function DropdownMenuLabel(props) {
|
|
4366
|
-
const [local, rest] = splitProps(props, [`class`, `inset`]);
|
|
4367
|
-
return (() => {
|
|
4368
|
-
var _el$9 = _tmpl$7$2();
|
|
4369
|
-
spread(_el$9, mergeProps({
|
|
4370
|
-
get ["data-inset"]() {
|
|
4371
|
-
return insetAttr(local.inset);
|
|
4372
|
-
},
|
|
4373
|
-
get ["class"]() {
|
|
4374
|
-
return cn(DROPDOWN_MENU_CLASSES.label, local.class);
|
|
4375
|
-
}
|
|
4376
|
-
}, rest), false, false);
|
|
4377
|
-
return _el$9;
|
|
4378
|
-
})();
|
|
4379
|
-
}
|
|
4380
|
-
function DropdownMenuSeparator(props) {
|
|
4381
|
-
const [local, rest] = splitProps(props, [`class`]);
|
|
4382
|
-
return (() => {
|
|
4383
|
-
var _el$0 = _tmpl$8$2();
|
|
4384
|
-
spread(_el$0, mergeProps({
|
|
4385
|
-
get ["class"]() {
|
|
4386
|
-
return cn(DROPDOWN_MENU_CLASSES.separator, local.class);
|
|
4387
|
-
}
|
|
4388
|
-
}, rest), false, false);
|
|
4389
|
-
return _el$0;
|
|
4390
|
-
})();
|
|
4391
|
-
}
|
|
4392
|
-
function DropdownMenuShortcut(props) {
|
|
4393
|
-
const [local, rest] = splitProps(props, [`class`]);
|
|
4394
|
-
return (() => {
|
|
4395
|
-
var _el$1 = _tmpl$9$1();
|
|
4396
|
-
spread(_el$1, mergeProps({
|
|
4397
|
-
get ["class"]() {
|
|
4398
|
-
return cn(DROPDOWN_MENU_CLASSES.shortcut, local.class);
|
|
4399
|
-
}
|
|
4400
|
-
}, rest), false, false);
|
|
4401
|
-
return _el$1;
|
|
4402
|
-
})();
|
|
4403
|
-
}
|
|
4404
|
-
const SubContext = createContext();
|
|
4405
|
-
const useSub = (part2) => {
|
|
4406
|
-
const ctx = useContext(SubContext);
|
|
4407
|
-
if (!ctx) throw new Error(`\`${part2}\` must be used within \`DropdownMenuSub\``);
|
|
4408
|
-
return ctx;
|
|
4409
|
-
};
|
|
4410
|
-
function DropdownMenuSub(props) {
|
|
4411
|
-
const parentOpen = useContext(LevelOpenContext);
|
|
4412
|
-
const [open, setOpen] = createOpenState({
|
|
4413
|
-
open: () => props.open,
|
|
4414
|
-
defaultOpen: props.defaultOpen,
|
|
4415
|
-
onOpenChange: () => props.onOpenChange
|
|
4416
|
-
});
|
|
4417
|
-
const [trigger, setTrigger] = createSignal();
|
|
4418
|
-
const [content, setContent] = createSignal();
|
|
4419
|
-
createEffect(on(parentOpen, (o) => o === false && setOpen(false)));
|
|
4420
|
-
onCleanup(() => setOpen(false));
|
|
4421
|
-
const value = {
|
|
4422
|
-
open,
|
|
4423
|
-
setOpen,
|
|
4424
|
-
triggerId: `radix-${createId()}`,
|
|
4425
|
-
contentId: `radix-${createId()}`,
|
|
4426
|
-
trigger,
|
|
4427
|
-
setTrigger,
|
|
4428
|
-
content,
|
|
4429
|
-
setContent
|
|
4430
|
-
};
|
|
4431
|
-
return createComponent(SubContext.Provider, {
|
|
4432
|
-
value,
|
|
4433
|
-
get children() {
|
|
4434
|
-
return createComponent(LevelOpenContext.Provider, {
|
|
4435
|
-
value: open,
|
|
4436
|
-
get children() {
|
|
4437
|
-
return props.children;
|
|
4438
|
-
}
|
|
4439
|
-
});
|
|
4440
|
-
}
|
|
4441
|
-
});
|
|
4442
|
-
}
|
|
4443
|
-
function DropdownMenuSubTrigger(props) {
|
|
4444
|
-
const root = useRoot(`DropdownMenuSubTrigger`);
|
|
4445
|
-
const sub = useSub(`DropdownMenuSubTrigger`);
|
|
4446
|
-
const [local, rest] = splitProps(props, [`class`, `inset`, `variant`, `children`, `disabled`, `ref`, `onClick`, `onPointerMove`, `onPointerLeave`, `onKeyDown`, `onFocus`, `onBlur`]);
|
|
4447
|
-
const disabled = () => local.disabled ?? false;
|
|
4448
|
-
const row = createMenuRow(disabled);
|
|
4449
|
-
let openTimer;
|
|
4450
|
-
let graceTimer;
|
|
4451
|
-
const clearOpenTimer = () => {
|
|
4452
|
-
clearTimeout(openTimer);
|
|
4453
|
-
openTimer = void 0;
|
|
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;
|
|
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);
|
|
4454
3690
|
};
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
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());
|
|
4459
3698
|
});
|
|
4460
|
-
const
|
|
3699
|
+
const geometry = createMemo(() => dockPileGeometry(local.items.map((item) => item.height ?? measured()[item.id] ?? 0), local.expanded));
|
|
4461
3700
|
return (() => {
|
|
4462
|
-
var _el$
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
"data-
|
|
4480
|
-
|
|
4481
|
-
return insetAttr(local.inset);
|
|
4482
|
-
},
|
|
4483
|
-
get ["data-variant"]() {
|
|
4484
|
-
return local.variant ?? `default`;
|
|
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`;
|
|
4485
3720
|
},
|
|
4486
3721
|
get ["class"]() {
|
|
4487
|
-
return cn(
|
|
3722
|
+
return cn(DOCK_PILE_CLASSES.root, local.class);
|
|
4488
3723
|
}
|
|
4489
|
-
}, rest,
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
e.currentTarget.focus();
|
|
4494
|
-
if (!untrack(sub.open)) sub.setOpen(true);
|
|
4495
|
-
});
|
|
4496
|
-
},
|
|
4497
|
-
get onPointerMove() {
|
|
4498
|
-
return composeHandlers(local.onPointerMove, (e) => {
|
|
4499
|
-
if (e.pointerType !== `mouse`) return;
|
|
4500
|
-
if (row.level.onItemEnter(e)) return;
|
|
4501
|
-
if (!untrack(disabled) && !untrack(sub.open) && !openTimer) {
|
|
4502
|
-
row.level.setGrace(null);
|
|
4503
|
-
openTimer = setTimeout(() => {
|
|
4504
|
-
sub.setOpen(true);
|
|
4505
|
-
clearOpenTimer();
|
|
4506
|
-
}, 100);
|
|
4507
|
-
}
|
|
4508
|
-
row.handlers.onPointerMove(e);
|
|
4509
|
-
});
|
|
4510
|
-
},
|
|
4511
|
-
get onPointerLeave() {
|
|
4512
|
-
return composeHandlers(local.onPointerLeave, (e) => {
|
|
4513
|
-
if (e.pointerType !== `mouse`) return;
|
|
4514
|
-
clearOpenTimer();
|
|
4515
|
-
const content = sub.content();
|
|
4516
|
-
const rect = content?.getBoundingClientRect();
|
|
4517
|
-
if (content && rect) {
|
|
4518
|
-
const side = content.dataset.side;
|
|
4519
|
-
const right = side === `right`;
|
|
4520
|
-
const bleed = right ? -5 : 5;
|
|
4521
|
-
const near = rect[right ? `left` : `right`];
|
|
4522
|
-
const far = rect[right ? `right` : `left`];
|
|
4523
|
-
row.level.setGrace({
|
|
4524
|
-
area: [{
|
|
4525
|
-
x: e.clientX + bleed,
|
|
4526
|
-
y: e.clientY
|
|
4527
|
-
}, {
|
|
4528
|
-
x: near,
|
|
4529
|
-
y: rect.top
|
|
4530
|
-
}, {
|
|
4531
|
-
x: far,
|
|
4532
|
-
y: rect.top
|
|
4533
|
-
}, {
|
|
4534
|
-
x: far,
|
|
4535
|
-
y: rect.bottom
|
|
4536
|
-
}, {
|
|
4537
|
-
x: near,
|
|
4538
|
-
y: rect.bottom
|
|
4539
|
-
}],
|
|
4540
|
-
side
|
|
4541
|
-
});
|
|
4542
|
-
clearTimeout(graceTimer);
|
|
4543
|
-
graceTimer = setTimeout(() => row.level.setGrace(null), 300);
|
|
4544
|
-
} else {
|
|
4545
|
-
if (row.level.onTriggerLeave(e)) return;
|
|
4546
|
-
row.level.setGrace(null);
|
|
4547
|
-
row.handlers.onPointerLeave(e);
|
|
4548
|
-
}
|
|
4549
|
-
});
|
|
3724
|
+
}, rest), false, true);
|
|
3725
|
+
insert(_el$1, createComponent(For, {
|
|
3726
|
+
get each() {
|
|
3727
|
+
return local.items;
|
|
4550
3728
|
},
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
}
|
|
4561
|
-
row.handlers.onKeyDown(e);
|
|
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);
|
|
4562
3738
|
});
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
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
|
+
})();
|
|
4576
3764
|
}
|
|
4577
|
-
})
|
|
4578
|
-
return _el$
|
|
3765
|
+
}));
|
|
3766
|
+
return _el$1;
|
|
4579
3767
|
})();
|
|
4580
3768
|
}
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
const sub = useSub(`DropdownMenuSubContent`);
|
|
4584
|
-
const [local, rest] = splitProps(props, CONTENT_KEYS);
|
|
4585
|
-
const presence = createPresence(sub.open);
|
|
4586
|
-
const closeKey = () => root.dir() === `rtl` ? `ArrowRight` : `ArrowLeft`;
|
|
4587
|
-
return createComponent(DropdownMenuPortal, {
|
|
4588
|
-
get container() {
|
|
4589
|
-
return local.container;
|
|
4590
|
-
},
|
|
4591
|
-
get children() {
|
|
4592
|
-
return createComponent(Show, {
|
|
4593
|
-
get when() {
|
|
4594
|
-
return presence.mounted();
|
|
4595
|
-
},
|
|
4596
|
-
children: (_) => {
|
|
4597
|
-
const lag = layerMountedThisTask();
|
|
4598
|
-
return createComponent(MenuContent, {
|
|
4599
|
-
get anchor() {
|
|
4600
|
-
return sub.trigger();
|
|
4601
|
-
},
|
|
4602
|
-
get side() {
|
|
4603
|
-
return root.dir() === `rtl` ? `left` : `right`;
|
|
4604
|
-
},
|
|
4605
|
-
align: "start",
|
|
4606
|
-
get sideOffset() {
|
|
4607
|
-
return local.sideOffset ?? 0;
|
|
4608
|
-
},
|
|
4609
|
-
get alignOffset() {
|
|
4610
|
-
return local.alignOffset;
|
|
4611
|
-
},
|
|
4612
|
-
get collisionPadding() {
|
|
4613
|
-
return local.collisionPadding ?? 0;
|
|
4614
|
-
},
|
|
4615
|
-
get dir() {
|
|
4616
|
-
return root.dir();
|
|
4617
|
-
},
|
|
4618
|
-
kind: "dropdown-menu",
|
|
4619
|
-
lagParentLayer: lag,
|
|
4620
|
-
root: false,
|
|
4621
|
-
get id() {
|
|
4622
|
-
return sub.contentId;
|
|
4623
|
-
},
|
|
4624
|
-
get labelledBy() {
|
|
4625
|
-
return sub.triggerId;
|
|
4626
|
-
},
|
|
4627
|
-
state: () => stateOf$1(sub.open()),
|
|
4628
|
-
attrs: () => ({
|
|
4629
|
-
"data-slot": `dropdown-menu-sub-content`,
|
|
4630
|
-
class: cn(DROPDOWN_MENU_CLASSES.subContent, local.class),
|
|
4631
|
-
...rest
|
|
4632
|
-
}),
|
|
4633
|
-
setContent: (el) => {
|
|
4634
|
-
sub.setContent(el);
|
|
4635
|
-
if (el) {
|
|
4636
|
-
presence.ref(el);
|
|
4637
|
-
noteLayerMount();
|
|
4638
|
-
callRef(local.ref, el);
|
|
4639
|
-
}
|
|
4640
|
-
},
|
|
4641
|
-
onDismiss: () => {
|
|
4642
|
-
},
|
|
4643
|
-
onEscapeKeyDown: (e) => {
|
|
4644
|
-
local.onEscapeKeyDown?.(e);
|
|
4645
|
-
if (e.defaultPrevented) return;
|
|
4646
|
-
root.setOpen(false);
|
|
4647
|
-
e.preventDefault();
|
|
4648
|
-
},
|
|
4649
|
-
onFocusOutside: (e) => {
|
|
4650
|
-
local.onFocusOutside?.(e);
|
|
4651
|
-
if (e.defaultPrevented) return;
|
|
4652
|
-
if (e.target !== sub.trigger()) sub.setOpen(false);
|
|
4653
|
-
},
|
|
4654
|
-
get onInteractOutside() {
|
|
4655
|
-
return local.onInteractOutside;
|
|
4656
|
-
},
|
|
4657
|
-
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
4658
|
-
onKeyDown: (e) => {
|
|
4659
|
-
local.onKeyDown?.(e);
|
|
4660
|
-
if (e.defaultPrevented) return;
|
|
4661
|
-
if (sub.content()?.contains(e.target) && e.key === closeKey()) {
|
|
4662
|
-
sub.setOpen(false);
|
|
4663
|
-
sub.trigger()?.focus();
|
|
4664
|
-
e.preventDefault();
|
|
4665
|
-
}
|
|
4666
|
-
},
|
|
4667
|
-
get children() {
|
|
4668
|
-
return local.children;
|
|
4669
|
-
}
|
|
4670
|
-
});
|
|
4671
|
-
}
|
|
4672
|
-
});
|
|
4673
|
-
}
|
|
4674
|
-
});
|
|
4675
|
-
}
|
|
4676
|
-
var _tmpl$$k = /* @__PURE__ */ template(`<div data-slot=icon-disc>`);
|
|
3769
|
+
delegateEvents(["click", "keydown", "focusin", "focusout"]);
|
|
3770
|
+
var _tmpl$$m = /* @__PURE__ */ template(`<div data-slot=icon-disc>`);
|
|
4677
3771
|
const LUCIDE_STROKE = 2;
|
|
4678
3772
|
const UNFOCUSABLE$1 = {
|
|
4679
3773
|
focusable: `false`
|
|
4680
3774
|
};
|
|
4681
3775
|
function IconDisc(props) {
|
|
4682
3776
|
return (() => {
|
|
4683
|
-
var _el$ = _tmpl$$
|
|
3777
|
+
var _el$ = _tmpl$$m();
|
|
4684
3778
|
insert(_el$, createComponent(PaintIcon, mergeProps({
|
|
4685
3779
|
get icon() {
|
|
4686
3780
|
return props.icon;
|
|
@@ -4697,7 +3791,7 @@ function IconDisc(props) {
|
|
|
4697
3791
|
return _el$;
|
|
4698
3792
|
})();
|
|
4699
3793
|
}
|
|
4700
|
-
var _tmpl$$
|
|
3794
|
+
var _tmpl$$l = /* @__PURE__ */ template(`<p>`), _tmpl$2$c = /* @__PURE__ */ template(`<div>`), _tmpl$3$8 = /* @__PURE__ */ template(`<div data-slot=empty-state data-size=page role=status><h2>`), _tmpl$4$7 = /* @__PURE__ */ template(`<div data-slot=empty-state data-size=list role=status><span>`), _tmpl$5$4 = /* @__PURE__ */ template(`<p data-slot=list-empty role=status>`), _tmpl$6$2 = /* @__PURE__ */ template(`<button data-slot=empty-cta><span></span><span>`);
|
|
4701
3795
|
const UNFOCUSABLE = {
|
|
4702
3796
|
focusable: `false`
|
|
4703
3797
|
};
|
|
@@ -4709,7 +3803,7 @@ function EmptyState(props) {
|
|
|
4709
3803
|
},
|
|
4710
3804
|
get fallback() {
|
|
4711
3805
|
return (() => {
|
|
4712
|
-
var _el$5 = _tmpl$4$
|
|
3806
|
+
var _el$5 = _tmpl$4$7(), _el$6 = _el$5.firstChild;
|
|
4713
3807
|
insert(_el$5, createComponent(Show, {
|
|
4714
3808
|
get when() {
|
|
4715
3809
|
return props.icon;
|
|
@@ -4731,7 +3825,7 @@ function EmptyState(props) {
|
|
|
4731
3825
|
})();
|
|
4732
3826
|
},
|
|
4733
3827
|
get children() {
|
|
4734
|
-
var _el$ = _tmpl$3$
|
|
3828
|
+
var _el$ = _tmpl$3$8(), _el$2 = _el$.firstChild;
|
|
4735
3829
|
insert(_el$, createComponent(Show, {
|
|
4736
3830
|
get when() {
|
|
4737
3831
|
return props.icon;
|
|
@@ -4748,7 +3842,7 @@ function EmptyState(props) {
|
|
|
4748
3842
|
return props.description;
|
|
4749
3843
|
},
|
|
4750
3844
|
get children() {
|
|
4751
|
-
var _el$3 = _tmpl$$
|
|
3845
|
+
var _el$3 = _tmpl$$l();
|
|
4752
3846
|
insert(_el$3, () => props.description);
|
|
4753
3847
|
effect(() => className(_el$3, EMPTY_STATE_CLASSES.pageDescription));
|
|
4754
3848
|
return _el$3;
|
|
@@ -4759,7 +3853,7 @@ function EmptyState(props) {
|
|
|
4759
3853
|
return actions();
|
|
4760
3854
|
},
|
|
4761
3855
|
get children() {
|
|
4762
|
-
var _el$4 = _tmpl$2$
|
|
3856
|
+
var _el$4 = _tmpl$2$c();
|
|
4763
3857
|
insert(_el$4, actions);
|
|
4764
3858
|
effect(() => className(_el$4, EMPTY_STATE_CLASSES.pageActions));
|
|
4765
3859
|
return _el$4;
|
|
@@ -4781,7 +3875,7 @@ function EmptyState(props) {
|
|
|
4781
3875
|
function ListEmpty(props) {
|
|
4782
3876
|
const [local, rest] = splitProps(props, [`class`, `children`]);
|
|
4783
3877
|
return (() => {
|
|
4784
|
-
var _el$7 = _tmpl$5$
|
|
3878
|
+
var _el$7 = _tmpl$5$4();
|
|
4785
3879
|
spread(_el$7, mergeProps({
|
|
4786
3880
|
get ["class"]() {
|
|
4787
3881
|
return cn(EMPTY_STATE_CLASSES.listEmpty, local.class);
|
|
@@ -4825,11 +3919,11 @@ function EmptyCta(props) {
|
|
|
4825
3919
|
return _el$8;
|
|
4826
3920
|
})();
|
|
4827
3921
|
}
|
|
4828
|
-
var _tmpl$$
|
|
3922
|
+
var _tmpl$$k = /* @__PURE__ */ template(`<div data-slot=glass-card>`);
|
|
4829
3923
|
function GlassCard(props) {
|
|
4830
3924
|
const [local, rest] = splitProps(props, [`class`]);
|
|
4831
3925
|
return (() => {
|
|
4832
|
-
var _el$ = _tmpl$$
|
|
3926
|
+
var _el$ = _tmpl$$k();
|
|
4833
3927
|
spread(_el$, mergeProps({
|
|
4834
3928
|
get ["class"]() {
|
|
4835
3929
|
return cn(GLASS_CARD_CLASSES.root, local.class);
|
|
@@ -4838,7 +3932,7 @@ function GlassCard(props) {
|
|
|
4838
3932
|
return _el$;
|
|
4839
3933
|
})();
|
|
4840
3934
|
}
|
|
4841
|
-
var _tmpl$$
|
|
3935
|
+
var _tmpl$$j = /* @__PURE__ */ template(`<div data-slot=hover-card-content>`);
|
|
4842
3936
|
const HoverCardContext = createContext();
|
|
4843
3937
|
const useHoverCard = (part2) => {
|
|
4844
3938
|
const ctx = useContext(HoverCardContext);
|
|
@@ -4968,7 +4062,7 @@ function HoverCardContent(props) {
|
|
|
4968
4062
|
},
|
|
4969
4063
|
children: (popper) => {
|
|
4970
4064
|
const el = (() => {
|
|
4971
|
-
var _el$ = _tmpl$$
|
|
4065
|
+
var _el$ = _tmpl$$j();
|
|
4972
4066
|
spread(_el$, mergeProps({
|
|
4973
4067
|
get ["data-side"]() {
|
|
4974
4068
|
return popper.placedSide();
|
|
@@ -5071,12 +4165,12 @@ function HoverCardContent(props) {
|
|
|
5071
4165
|
}
|
|
5072
4166
|
});
|
|
5073
4167
|
}
|
|
5074
|
-
var _tmpl$$
|
|
4168
|
+
var _tmpl$$i = /* @__PURE__ */ template(`<input data-slot=input>`);
|
|
5075
4169
|
function Input(props) {
|
|
5076
4170
|
const [local, rest] = splitProps(props, [`class`]);
|
|
5077
4171
|
const valueAttr = () => props.value === void 0 || props.value === null ? void 0 : String(props.value);
|
|
5078
4172
|
return (() => {
|
|
5079
|
-
var _el$ = _tmpl$$
|
|
4173
|
+
var _el$ = _tmpl$$i();
|
|
5080
4174
|
spread(_el$, mergeProps({
|
|
5081
4175
|
get ["class"]() {
|
|
5082
4176
|
return cn(INPUT_CLASSES.root, local.class);
|
|
@@ -5086,11 +4180,11 @@ function Input(props) {
|
|
|
5086
4180
|
return _el$;
|
|
5087
4181
|
})();
|
|
5088
4182
|
}
|
|
5089
|
-
var _tmpl$$
|
|
4183
|
+
var _tmpl$$h = /* @__PURE__ */ template(`<kbd data-slot=kbd>`), _tmpl$2$b = /* @__PURE__ */ template(`<span data-slot=kbd-group>`);
|
|
5090
4184
|
function Kbd(props) {
|
|
5091
4185
|
const [local, rest] = splitProps(props, [`class`]);
|
|
5092
4186
|
return (() => {
|
|
5093
|
-
var _el$ = _tmpl$$
|
|
4187
|
+
var _el$ = _tmpl$$h();
|
|
5094
4188
|
spread(_el$, mergeProps({
|
|
5095
4189
|
get ["class"]() {
|
|
5096
4190
|
return cn(KBD_CLASSES.root, local.class);
|
|
@@ -5102,7 +4196,7 @@ function Kbd(props) {
|
|
|
5102
4196
|
function KbdGroup(props) {
|
|
5103
4197
|
const [local, rest] = splitProps(props, [`class`]);
|
|
5104
4198
|
return (() => {
|
|
5105
|
-
var _el$2 = _tmpl$2$
|
|
4199
|
+
var _el$2 = _tmpl$2$b();
|
|
5106
4200
|
spread(_el$2, mergeProps({
|
|
5107
4201
|
get ["class"]() {
|
|
5108
4202
|
return cn(KBD_CLASSES.group, local.class);
|
|
@@ -5111,7 +4205,7 @@ function KbdGroup(props) {
|
|
|
5111
4205
|
return _el$2;
|
|
5112
4206
|
})();
|
|
5113
4207
|
}
|
|
5114
|
-
var _tmpl$$
|
|
4208
|
+
var _tmpl$$g = /* @__PURE__ */ template(`<label data-slot=label>`);
|
|
5115
4209
|
function Label(props) {
|
|
5116
4210
|
const [local, rest] = splitProps(props, [`class`, `onMouseDown`]);
|
|
5117
4211
|
const onMouseDown = (event) => {
|
|
@@ -5122,7 +4216,7 @@ function Label(props) {
|
|
|
5122
4216
|
if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
|
|
5123
4217
|
};
|
|
5124
4218
|
return (() => {
|
|
5125
|
-
var _el$ = _tmpl$$
|
|
4219
|
+
var _el$ = _tmpl$$g();
|
|
5126
4220
|
spread(_el$, mergeProps({
|
|
5127
4221
|
get ["class"]() {
|
|
5128
4222
|
return cn(LABEL_CLASSES.root, local.class);
|
|
@@ -5133,7 +4227,7 @@ function Label(props) {
|
|
|
5133
4227
|
return _el$;
|
|
5134
4228
|
})();
|
|
5135
4229
|
}
|
|
5136
|
-
var _tmpl$$
|
|
4230
|
+
var _tmpl$$f = /* @__PURE__ */ template(`<div aria-valuemin=0 role=progressbar data-slot=progress><div data-slot=progress-indicator>`);
|
|
5137
4231
|
const isNumber = (v) => typeof v === `number`;
|
|
5138
4232
|
const validMax = (max) => isNumber(max) && !Number.isNaN(max) && max > 0;
|
|
5139
4233
|
const validValue = (value, max) => isNumber(value) && !Number.isNaN(value) && value <= max && value >= 0;
|
|
@@ -5148,7 +4242,7 @@ function Progress(props) {
|
|
|
5148
4242
|
};
|
|
5149
4243
|
const indeterminate = () => local.value === null || local.value === void 0;
|
|
5150
4244
|
return (() => {
|
|
5151
|
-
var _el$ = _tmpl$$
|
|
4245
|
+
var _el$ = _tmpl$$f(), _el$2 = _el$.firstChild;
|
|
5152
4246
|
spread(_el$, mergeProps({
|
|
5153
4247
|
get ["aria-valuemax"]() {
|
|
5154
4248
|
return max();
|
|
@@ -5208,6 +4302,176 @@ function Meter(props) {
|
|
|
5208
4302
|
}
|
|
5209
4303
|
}, rest));
|
|
5210
4304
|
}
|
|
4305
|
+
var _tmpl$$e = /* @__PURE__ */ template(`<span aria-hidden=true>`), _tmpl$2$a = /* @__PURE__ */ template(`<button type=button data-slot=mosaic-tile><img alt aria-hidden=true loading=lazy decoding=async>`, true, false, false), _tmpl$3$7 = /* @__PURE__ */ template(`<div data-slot=mosaic-side>`), _tmpl$4$6 = /* @__PURE__ */ template(`<div data-slot=mosaic role=group>`);
|
|
4306
|
+
function Mosaic(props) {
|
|
4307
|
+
const [local, rest] = splitProps(props, [`pictures`, `label`, `onSelect`, `class`]);
|
|
4308
|
+
const tiles = () => mosaicTiles(local.pictures.length);
|
|
4309
|
+
const Tile = (p) => {
|
|
4310
|
+
const picture = () => local.pictures[p.tile.index];
|
|
4311
|
+
const alt = () => picture().alt ?? ``;
|
|
4312
|
+
return (() => {
|
|
4313
|
+
var _el$ = _tmpl$2$a(), _el$2 = _el$.firstChild;
|
|
4314
|
+
_el$.$$click = () => local.onSelect?.(p.tile.index);
|
|
4315
|
+
setAttribute(_el$2, "draggable", false);
|
|
4316
|
+
insert(_el$, createComponent(Show, {
|
|
4317
|
+
get when() {
|
|
4318
|
+
return p.tile.more > 0;
|
|
4319
|
+
},
|
|
4320
|
+
get children() {
|
|
4321
|
+
var _el$3 = _tmpl$$e();
|
|
4322
|
+
insert(_el$3, () => `+${p.tile.more}`);
|
|
4323
|
+
effect(() => className(_el$3, MOSAIC_CLASSES.more));
|
|
4324
|
+
return _el$3;
|
|
4325
|
+
}
|
|
4326
|
+
}), null);
|
|
4327
|
+
effect((_p$) => {
|
|
4328
|
+
var _v$ = p.tile.size, _v$2 = p.tile.more > 0 ? `${alt()}, ${p.tile.more} more` : alt() || void 0, _v$3 = cn(MOSAIC_CLASSES.tile, p.lead ? MOSAIC_CLASSES.lead : MOSAIC_CLASSES.fill), _v$4 = picture().src, _v$5 = MOSAIC_CLASSES.image;
|
|
4329
|
+
_v$ !== _p$.e && setAttribute(_el$, "data-size", _p$.e = _v$);
|
|
4330
|
+
_v$2 !== _p$.t && setAttribute(_el$, "aria-label", _p$.t = _v$2);
|
|
4331
|
+
_v$3 !== _p$.a && className(_el$, _p$.a = _v$3);
|
|
4332
|
+
_v$4 !== _p$.o && setAttribute(_el$2, "src", _p$.o = _v$4);
|
|
4333
|
+
_v$5 !== _p$.i && className(_el$2, _p$.i = _v$5);
|
|
4334
|
+
return _p$;
|
|
4335
|
+
}, {
|
|
4336
|
+
e: void 0,
|
|
4337
|
+
t: void 0,
|
|
4338
|
+
a: void 0,
|
|
4339
|
+
o: void 0,
|
|
4340
|
+
i: void 0
|
|
4341
|
+
});
|
|
4342
|
+
return _el$;
|
|
4343
|
+
})();
|
|
4344
|
+
};
|
|
4345
|
+
return (() => {
|
|
4346
|
+
var _el$4 = _tmpl$4$6();
|
|
4347
|
+
spread(_el$4, mergeProps({
|
|
4348
|
+
get ["aria-label"]() {
|
|
4349
|
+
return local.label || void 0;
|
|
4350
|
+
},
|
|
4351
|
+
get ["class"]() {
|
|
4352
|
+
return cn(MOSAIC_CLASSES.root, local.class);
|
|
4353
|
+
}
|
|
4354
|
+
}, rest), false, true);
|
|
4355
|
+
insert(_el$4, createComponent(Show, {
|
|
4356
|
+
get when() {
|
|
4357
|
+
return tiles().length >= 3;
|
|
4358
|
+
},
|
|
4359
|
+
get fallback() {
|
|
4360
|
+
return createComponent(For, {
|
|
4361
|
+
get each() {
|
|
4362
|
+
return tiles();
|
|
4363
|
+
},
|
|
4364
|
+
children: (t) => createComponent(Tile, {
|
|
4365
|
+
tile: t,
|
|
4366
|
+
lead: false
|
|
4367
|
+
})
|
|
4368
|
+
});
|
|
4369
|
+
},
|
|
4370
|
+
get children() {
|
|
4371
|
+
return [createComponent(Tile, {
|
|
4372
|
+
get tile() {
|
|
4373
|
+
return tiles()[0];
|
|
4374
|
+
},
|
|
4375
|
+
lead: true
|
|
4376
|
+
}), (() => {
|
|
4377
|
+
var _el$5 = _tmpl$3$7();
|
|
4378
|
+
insert(_el$5, createComponent(For, {
|
|
4379
|
+
get each() {
|
|
4380
|
+
return tiles().slice(1);
|
|
4381
|
+
},
|
|
4382
|
+
children: (t) => createComponent(Tile, {
|
|
4383
|
+
tile: t,
|
|
4384
|
+
lead: false
|
|
4385
|
+
})
|
|
4386
|
+
}));
|
|
4387
|
+
effect(() => className(_el$5, MOSAIC_CLASSES.side));
|
|
4388
|
+
return _el$5;
|
|
4389
|
+
})()];
|
|
4390
|
+
}
|
|
4391
|
+
}));
|
|
4392
|
+
return _el$4;
|
|
4393
|
+
})();
|
|
4394
|
+
}
|
|
4395
|
+
delegateEvents(["click"]);
|
|
4396
|
+
var _tmpl$$d = /* @__PURE__ */ template(`<div data-slot=outline-caption aria-hidden=true>`), _tmpl$2$9 = /* @__PURE__ */ template(`<nav data-slot=outline>`), _tmpl$3$6 = /* @__PURE__ */ template(`<span data-slot=outline-bar aria-hidden=true>`), _tmpl$4$5 = /* @__PURE__ */ template(`<span aria-hidden=true>`), _tmpl$5$3 = /* @__PURE__ */ template(`<button type=button data-slot=outline-row><span>`);
|
|
4397
|
+
function Outline(props) {
|
|
4398
|
+
const [local, rest] = splitProps(props, [`items`, `value`, `caption`, `onSelect`, `class`]);
|
|
4399
|
+
return (() => {
|
|
4400
|
+
var _el$ = _tmpl$2$9();
|
|
4401
|
+
spread(_el$, mergeProps({
|
|
4402
|
+
get ["aria-label"]() {
|
|
4403
|
+
return local.caption || `Outline`;
|
|
4404
|
+
},
|
|
4405
|
+
get ["class"]() {
|
|
4406
|
+
return cn(OUTLINE_CLASSES.root, local.class);
|
|
4407
|
+
}
|
|
4408
|
+
}, rest), false, true);
|
|
4409
|
+
insert(_el$, createComponent(Show, {
|
|
4410
|
+
get when() {
|
|
4411
|
+
return local.caption;
|
|
4412
|
+
},
|
|
4413
|
+
get children() {
|
|
4414
|
+
var _el$2 = _tmpl$$d();
|
|
4415
|
+
insert(_el$2, () => local.caption);
|
|
4416
|
+
effect(() => className(_el$2, OUTLINE_CLASSES.caption));
|
|
4417
|
+
return _el$2;
|
|
4418
|
+
}
|
|
4419
|
+
}), null);
|
|
4420
|
+
insert(_el$, createComponent(For, {
|
|
4421
|
+
get each() {
|
|
4422
|
+
return local.items;
|
|
4423
|
+
},
|
|
4424
|
+
children: (item) => {
|
|
4425
|
+
const active = () => local.value != null && item.id === local.value;
|
|
4426
|
+
const count = () => outlineCountText(item.count);
|
|
4427
|
+
return (() => {
|
|
4428
|
+
var _el$3 = _tmpl$5$3(), _el$5 = _el$3.firstChild;
|
|
4429
|
+
_el$3.$$click = () => local.onSelect?.(item.id);
|
|
4430
|
+
insert(_el$3, createComponent(Show, {
|
|
4431
|
+
get when() {
|
|
4432
|
+
return active();
|
|
4433
|
+
},
|
|
4434
|
+
get children() {
|
|
4435
|
+
var _el$4 = _tmpl$3$6();
|
|
4436
|
+
effect(() => className(_el$4, OUTLINE_CLASSES.bar));
|
|
4437
|
+
return _el$4;
|
|
4438
|
+
}
|
|
4439
|
+
}), _el$5);
|
|
4440
|
+
insert(_el$5, () => item.title);
|
|
4441
|
+
insert(_el$3, createComponent(Show, {
|
|
4442
|
+
get when() {
|
|
4443
|
+
return count();
|
|
4444
|
+
},
|
|
4445
|
+
get children() {
|
|
4446
|
+
var _el$6 = _tmpl$4$5();
|
|
4447
|
+
insert(_el$6, count);
|
|
4448
|
+
effect(() => className(_el$6, OUTLINE_CLASSES.count));
|
|
4449
|
+
return _el$6;
|
|
4450
|
+
}
|
|
4451
|
+
}), null);
|
|
4452
|
+
effect((_p$) => {
|
|
4453
|
+
var _v$ = active() ? `true` : void 0, _v$2 = active() ? `location` : void 0, _v$3 = count() ? `${item.title}, ${item.count}` : void 0, _v$4 = OUTLINE_CLASSES.row, _v$5 = OUTLINE_CLASSES.title;
|
|
4454
|
+
_v$ !== _p$.e && setAttribute(_el$3, "data-active", _p$.e = _v$);
|
|
4455
|
+
_v$2 !== _p$.t && setAttribute(_el$3, "aria-current", _p$.t = _v$2);
|
|
4456
|
+
_v$3 !== _p$.a && setAttribute(_el$3, "aria-label", _p$.a = _v$3);
|
|
4457
|
+
_v$4 !== _p$.o && className(_el$3, _p$.o = _v$4);
|
|
4458
|
+
_v$5 !== _p$.i && className(_el$5, _p$.i = _v$5);
|
|
4459
|
+
return _p$;
|
|
4460
|
+
}, {
|
|
4461
|
+
e: void 0,
|
|
4462
|
+
t: void 0,
|
|
4463
|
+
a: void 0,
|
|
4464
|
+
o: void 0,
|
|
4465
|
+
i: void 0
|
|
4466
|
+
});
|
|
4467
|
+
return _el$3;
|
|
4468
|
+
})();
|
|
4469
|
+
}
|
|
4470
|
+
}), null);
|
|
4471
|
+
return _el$;
|
|
4472
|
+
})();
|
|
4473
|
+
}
|
|
4474
|
+
delegateEvents(["click"]);
|
|
5211
4475
|
var _tmpl$$c = /* @__PURE__ */ template(`<div data-slot=popover-anchor>`), _tmpl$2$8 = /* @__PURE__ */ template(`<div role=dialog data-slot=popover-content tabindex=-1>`);
|
|
5212
4476
|
const PopoverContext = createContext();
|
|
5213
4477
|
const usePopover = (part2) => {
|
|
@@ -6247,8 +5511,8 @@ function TabsTrigger(props) {
|
|
|
6247
5511
|
if (intent === `last`) candidates.reverse();
|
|
6248
5512
|
else if (intent === `prev` || intent === `next`) {
|
|
6249
5513
|
if (intent === `prev`) candidates.reverse();
|
|
6250
|
-
const
|
|
6251
|
-
candidates = roving.loop() ? wrapArray(candidates,
|
|
5514
|
+
const at2 = candidates.indexOf(e.currentTarget);
|
|
5515
|
+
candidates = roving.loop() ? wrapArray(candidates, at2 + 1) : candidates.slice(at2 + 1);
|
|
6252
5516
|
}
|
|
6253
5517
|
setTimeout(() => rovingFocusFirst(candidates));
|
|
6254
5518
|
},
|
|
@@ -6717,10 +5981,10 @@ function ContentImpl(props) {
|
|
|
6717
5981
|
y: 0
|
|
6718
5982
|
};
|
|
6719
5983
|
const move = (e) => {
|
|
6720
|
-
const
|
|
5984
|
+
const at2 = ctx.triggerPointerDownPos.current;
|
|
6721
5985
|
delta = {
|
|
6722
|
-
x: Math.abs(Math.round(e.pageX) - (
|
|
6723
|
-
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))
|
|
6724
5988
|
};
|
|
6725
5989
|
};
|
|
6726
5990
|
const up = (e) => {
|
|
@@ -7714,7 +6978,7 @@ function Toaster(props) {
|
|
|
7714
6978
|
return store.subscribe((t) => set(t));
|
|
7715
6979
|
});
|
|
7716
6980
|
const list = () => toasts() ?? [];
|
|
7717
|
-
const touchQuery = createMediaQuery
|
|
6981
|
+
const touchQuery = createMediaQuery(TOAST_TOUCH_QUERY);
|
|
7718
6982
|
const placed = createMemo(() => toastPlacement(local.touch ?? touchQuery()));
|
|
7719
6983
|
const [expanded, setExpanded] = createSignal(false);
|
|
7720
6984
|
const [measured, setMeasured] = createSignal({});
|
|
@@ -8191,15 +7455,6 @@ function TooltipContent(props) {
|
|
|
8191
7455
|
}
|
|
8192
7456
|
});
|
|
8193
7457
|
}
|
|
8194
|
-
function createMediaQuery(query) {
|
|
8195
|
-
if (typeof window === `undefined` || typeof window.matchMedia !== `function`) return () => false;
|
|
8196
|
-
const mql = window.matchMedia(query);
|
|
8197
|
-
const [matches, setMatches] = createSignal(mql.matches);
|
|
8198
|
-
const onChange = () => setMatches(window.matchMedia(query).matches);
|
|
8199
|
-
mql.addEventListener(`change`, onChange);
|
|
8200
|
-
onCleanup(() => mql.removeEventListener(`change`, onChange));
|
|
8201
|
-
return matches;
|
|
8202
|
-
}
|
|
8203
7458
|
const MOBILE_BREAKPOINT = 768;
|
|
8204
7459
|
function createIsMobile() {
|
|
8205
7460
|
const narrow = () => typeof window !== `undefined` && window.innerWidth < MOBILE_BREAKPOINT;
|
|
@@ -8219,7 +7474,7 @@ function createIsMobile() {
|
|
|
8219
7474
|
}
|
|
8220
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);
|
|
8221
7476
|
function VoiceWave(props) {
|
|
8222
|
-
const reducedMotion = createMediaQuery(`(prefers-reduced-motion: reduce)`);
|
|
7477
|
+
const reducedMotion = createMediaQuery$1(`(prefers-reduced-motion: reduce)`);
|
|
8223
7478
|
const activity = () => props.activity ?? `idle`;
|
|
8224
7479
|
const size = () => props.size ?? `md`;
|
|
8225
7480
|
const px = () => VOICE_WAVE_SIZE_PX[size()] ?? VOICE_WAVE_SIZE_PX.md;
|
|
@@ -8355,6 +7610,7 @@ export {
|
|
|
8355
7610
|
BreadcrumbPage,
|
|
8356
7611
|
BreadcrumbSeparator,
|
|
8357
7612
|
Button,
|
|
7613
|
+
CAROUSEL_GEOMETRY,
|
|
8358
7614
|
CODE_TOKEN_CLASS2 as CODE_TOKEN_CLASS,
|
|
8359
7615
|
Calendar,
|
|
8360
7616
|
CalendarChevron,
|
|
@@ -8367,6 +7623,8 @@ export {
|
|
|
8367
7623
|
CardFooter,
|
|
8368
7624
|
CardHeader,
|
|
8369
7625
|
CardTitle,
|
|
7626
|
+
CarouselCounter,
|
|
7627
|
+
CarouselThumbnails,
|
|
8370
7628
|
Checkbox,
|
|
8371
7629
|
ChoiceTiles,
|
|
8372
7630
|
ChoiceTilesFrame,
|
|
@@ -8409,21 +7667,21 @@ export {
|
|
|
8409
7667
|
DisclosureHeader,
|
|
8410
7668
|
DockCard,
|
|
8411
7669
|
DockPile,
|
|
8412
|
-
DropdownMenu,
|
|
8413
|
-
DropdownMenuCheckboxItem,
|
|
8414
|
-
DropdownMenuContent,
|
|
8415
|
-
DropdownMenuGroup,
|
|
8416
|
-
DropdownMenuItem,
|
|
8417
|
-
DropdownMenuLabel,
|
|
8418
|
-
DropdownMenuPortal,
|
|
8419
|
-
DropdownMenuRadioGroup,
|
|
8420
|
-
DropdownMenuRadioItem,
|
|
8421
|
-
DropdownMenuSeparator,
|
|
8422
|
-
DropdownMenuShortcut,
|
|
8423
|
-
DropdownMenuSub,
|
|
8424
|
-
DropdownMenuSubContent,
|
|
8425
|
-
DropdownMenuSubTrigger,
|
|
8426
|
-
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,
|
|
8427
7685
|
EMPTY_STATE_SIZES,
|
|
8428
7686
|
EmptyCta,
|
|
8429
7687
|
EmptyState,
|
|
@@ -8456,7 +7714,11 @@ export {
|
|
|
8456
7714
|
MOBILE_PAGE,
|
|
8457
7715
|
MOBILE_SHEET,
|
|
8458
7716
|
MOBILE_SHEET_FULL,
|
|
7717
|
+
MOSAIC_GEOMETRY,
|
|
8459
7718
|
Meter,
|
|
7719
|
+
Mosaic,
|
|
7720
|
+
OUTLINE_GEOMETRY,
|
|
7721
|
+
Outline,
|
|
8460
7722
|
Popover,
|
|
8461
7723
|
PopoverAnchor,
|
|
8462
7724
|
PopoverContent,
|
|
@@ -8521,23 +7783,30 @@ export {
|
|
|
8521
7783
|
TooltipProvider,
|
|
8522
7784
|
TooltipTrigger,
|
|
8523
7785
|
VoiceWave,
|
|
7786
|
+
aA as ZOOMABLE_IMAGE_STRINGS,
|
|
7787
|
+
Z as ZOOM_MATH,
|
|
7788
|
+
aB as ZoomableImage,
|
|
8524
7789
|
alertVariants2 as alertVariants,
|
|
8525
7790
|
avatarHueIndex,
|
|
8526
7791
|
buttonVariants2 as buttonVariants,
|
|
7792
|
+
carouselCounterText2 as carouselCounterText,
|
|
8527
7793
|
choiceColumns2 as choiceColumns,
|
|
8528
7794
|
choiceToggle2 as choiceToggle,
|
|
8529
7795
|
choiceValues2 as choiceValues,
|
|
8530
7796
|
cn2 as cn,
|
|
8531
7797
|
createIsMobile,
|
|
8532
|
-
createMediaQuery,
|
|
7798
|
+
createMediaQuery$1 as createMediaQuery,
|
|
8533
7799
|
createSheetDrag,
|
|
8534
7800
|
createSheetDragHandleProps,
|
|
8535
7801
|
createToastStore2 as createToastStore,
|
|
7802
|
+
H as createZoomableImage,
|
|
8536
7803
|
dateMatchModifiers,
|
|
8537
7804
|
dockPileGeometry2 as dockPileGeometry,
|
|
8538
7805
|
getDefaultClassNames,
|
|
8539
7806
|
getInitials,
|
|
8540
7807
|
middleTruncate,
|
|
7808
|
+
mosaicTiles2 as mosaicTiles,
|
|
7809
|
+
outlineCountText2 as outlineCountText,
|
|
8541
7810
|
progressRingPercent2 as progressRingPercent,
|
|
8542
7811
|
ringGeometry2 as ringGeometry,
|
|
8543
7812
|
shouldDismissSheet,
|