@mkbabb/glass-ui 3.8.0 → 3.9.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 +1 -6
- package/dist/{CardAction-q2qHCJFG.js → CardAction-DuArVky-.js} +4 -4
- package/dist/{CommandShortcut-SzWRhROC.js → CommandShortcut-CefCj5mt.js} +7 -7
- package/dist/{ContextMenuSubContent-Do977Cbf.js → ContextMenuSubContent-Bhg4f5jX.js} +3 -3
- package/dist/{DataTable-CvlWXz65.js → DataTable-CUHMukiQ.js} +1 -1
- package/dist/{DialogContent-DjZWT3lK.js → DialogContent-BRkT1cjP.js} +1 -1
- package/dist/{NumberFieldContent-CLNVR1iY.js → NumberFieldContent-BbLOh8RU.js} +2 -2
- package/dist/{SelectScrollDownButton-C7TRe-ep.js → SelectScrollDownButton-T32cVFeM.js} +3 -3
- package/dist/{SelectSeparator-L8pPEn4L.js → SelectSeparator-C4Ql0gzV.js} +1 -1
- package/dist/{TabsList-qyHZ2lKY.js → TabsList-B8CVOQPC.js} +2 -2
- package/dist/{Toaster-CabYEEF_.js → Toaster-1rYWrmAm.js} +1 -1
- package/dist/{ToggleGroupItem-CkXUcBlt.js → ToggleGroupItem-Cev4pOVK.js} +4 -4
- package/dist/animated-digit.js +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api.js +1 -1
- package/dist/aurora.js +10 -10
- package/dist/{badge-DHQrc_GQ.js → badge-BvwvT50i.js} +4 -4
- package/dist/badge.js +1 -1
- package/dist/{button-CAywcrhO.js → button-DN39cGqL.js} +13 -12
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +1 -1
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/{compile-BBTRjvQS.js → compile-DAjIoEy2.js} +1 -1
- package/dist/components/custom/configurator/ConfiguratorLayer.vue.d.ts +1 -1
- package/dist/components/custom/dock/DockSeparator.vue.d.ts +3 -0
- package/dist/components/custom/dock/GlassDock.vue.d.ts +45 -63
- package/dist/components/custom/dock/composables/dockContext.d.ts +7 -0
- package/dist/components/custom/dock/index.d.ts +2 -1
- package/dist/components/custom/goo-blob/composables/useBlobMood.d.ts +19 -5
- package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +92 -0
- package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +49 -0
- package/dist/components/custom/tabs/index.d.ts +2 -5
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/card/Card.vue.d.ts +5 -3
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +1 -1
- package/dist/components/ui/carousel/GlassCarouselPager.vue.d.ts +3 -4
- package/dist/components/ui/slider/index.d.ts +14 -7
- package/dist/components/ui/tabs/TabsList.vue.d.ts +1 -1
- package/dist/composables/context/createContext.d.ts +1 -1
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +1 -1
- package/dist/constellation.js +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/controls.js +1 -1
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/deck-progress.js +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dock.js +256 -243
- package/dist/{dropdown-menu-B_4bWyyG.js → dropdown-menu-D77jX6Df.js} +3 -3
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +1 -1
- package/dist/forms.js +5 -5
- package/dist/fourier-field.js +3 -3
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +101 -104
- package/dist/goo-blob.js +36 -32
- package/dist/hover-popover.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/keyboard.js +1 -1
- package/dist/labeled-field.js +4 -4
- package/dist/{menuItemVariants-DKM85SNE.js → menuItemVariants-CCoBNkU5.js} +1 -1
- package/dist/motion-core.js +4 -4
- package/dist/motion.js +2 -2
- package/dist/number-field.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +1 -1
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +4 -4
- package/dist/select.js +2 -2
- package/dist/{slider-D9puf-Ko.js → slider-DC2mwuoe.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +1 -1
- package/dist/status-dot.js +17 -16
- package/dist/styles/animations.css +6 -2
- package/dist/styles/components.css +1 -1
- package/dist/styles/dock/density.css +230 -0
- package/dist/styles/dock/layer-group.css +263 -0
- package/dist/styles/dock/layers.css +355 -0
- package/dist/styles/dock/morph.css +244 -0
- package/dist/styles/dock/overflow.css +201 -0
- package/dist/styles/dock/shell.css +457 -0
- package/dist/styles/dock-controls.css +166 -32
- package/dist/styles/dock.css +42 -1349
- package/dist/styles/glass.css +396 -75
- package/dist/styles/index.css +12 -11
- package/dist/styles/theme.css +51 -0
- package/dist/styles/tokens.css +501 -55
- package/dist/styles/utilities.css +89 -39
- package/dist/tabs.js +182 -151
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/{useAnimatedNumber-C_3wZLx4.js → useAnimatedNumber-C5I3wWd8.js} +1 -1
- package/dist/{useConfiguratorState-CMff4GzH.js → useConfiguratorState-DxAqksK6.js} +21 -10
- package/dist/watercolor-dot.js +1 -1
- package/package.json +32 -33
- package/src/styles/animations.css +6 -2
- package/src/styles/dock/density.css +230 -0
- package/src/styles/dock/layer-group.css +263 -0
- package/src/styles/dock/layers.css +355 -0
- package/src/styles/dock/morph.css +244 -0
- package/src/styles/dock/overflow.css +201 -0
- package/src/styles/dock/shell.css +457 -0
- package/src/styles/dock-controls.css +166 -32
- package/src/styles/dock.css +42 -1349
- package/src/styles/glass.css +396 -75
- package/src/styles/index.css +12 -11
- package/src/styles/theme.css +51 -0
- package/src/styles/tokens.css +501 -55
- package/src/styles/utilities.css +89 -39
- package/dist/DiscoGlyph-CG0F410s.js +0 -132
- package/dist/GlyphFace-DRjDkB0s.js +0 -51
- package/dist/UnderlineTabs-Uxn-R3MT.js +0 -39
- package/dist/components/custom/aurora/constants/shaders/painterly.wgsl.d.ts +0 -7
- package/dist/components/custom/aurora/constants/shaders/wake.wgsl.d.ts +0 -4
- package/dist/components/custom/disco-glyph/DiscoGlyph.vue.d.ts +0 -58
- package/dist/components/custom/disco-glyph/index.d.ts +0 -1
- package/dist/components/custom/glass-carousel/GlassCarousel.vue.d.ts +0 -36
- package/dist/components/custom/glass-carousel/GlassCarouselItem.vue.d.ts +0 -28
- package/dist/components/custom/glass-carousel/index.d.ts +0 -4
- package/dist/components/custom/glass-carousel/useGlassCarousel.d.ts +0 -30
- package/dist/components/custom/glyph-face/GlyphFace.vue.d.ts +0 -64
- package/dist/components/custom/glyph-face/index.d.ts +0 -2
- package/dist/components/custom/glyph-face/keys.d.ts +0 -9
- package/dist/components/custom/responsive-tabs/ResponsiveTabs.vue.d.ts +0 -73
- package/dist/components/custom/responsive-tabs/index.d.ts +0 -2
- package/dist/components/custom/tabs/BouncyTabs.vue.d.ts +0 -27
- package/dist/components/custom/tabs/BouncyToggle.vue.d.ts +0 -60
- package/dist/components/custom/tabs/UnderlineTabs.vue.d.ts +0 -20
- package/dist/components/custom/tabs/composables/useBouncySlider.d.ts +0 -39
- package/dist/disco-glyph.d.ts +0 -1
- package/dist/disco-glyph.js +0 -2
- package/dist/glass-carousel.d.ts +0 -1
- package/dist/glass-carousel.js +0 -219
- package/dist/glyph-face.d.ts +0 -1
- package/dist/glyph-face.js +0 -3
- package/dist/keys-BsYjEFOW.js +0 -9
- package/dist/responsive-tabs.d.ts +0 -1
- package/dist/responsive-tabs.js +0 -95
- package/dist/styles/disco-glyph.css +0 -26
- package/dist/styles/glyph-face.css +0 -92
- package/src/styles/disco-glyph.css +0 -26
- package/src/styles/glyph-face.css +0 -92
- /package/dist/{DeckProgress-AVgbIULY.js → DeckProgress-Dmk4_AKN.js} +0 -0
- /package/dist/{HoverPopover-D56O6Ylp.js → HoverPopover-2LOIW34a.js} +0 -0
- /package/dist/{IconTooltip-D2T5nYOM.js → IconTooltip-yefK7cJc.js} +0 -0
- /package/dist/{Input-DVG_J0ne.js → Input-DWQQIOC4.js} +0 -0
- /package/dist/{ScrollingText-CVyqxvfv.js → ScrollingText-BPP84wKo.js} +0 -0
- /package/dist/{color-DMLTunJK.js → color-8jBjWiJ6.js} +0 -0
- /package/dist/{constants-BPOqYJAm.js → constants-CS75AWHG.js} +0 -0
- /package/dist/{presets-D1XPuTj-.js → presets-BKVyQfbt.js} +0 -0
- /package/dist/{prng-COGhh02-.js → prng-wHuHlNHE.js} +0 -0
- /package/dist/{useGlobalDark-D3EBWzXK.js → useGlobalDark-yhL4Wp-s.js} +0 -0
- /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-Cc-H9ees.js} +0 -0
- /package/dist/{useInterval-CcLfq2WU.js → useInterval-Dsmqwi03.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-Be3w_Rwk.js} +0 -0
- /package/dist/{useScrollProgress-C9ysDic5.js → useScrollProgress-CAH8Ofwt.js} +0 -0
- /package/dist/{useSortable-MGAbCGVJ.js → useSortable-C8ReQ50P.js} +0 -0
- /package/dist/{useTextHighlight-9nMW23Qb.js → useTextHighlight-DON84L8w.js} +0 -0
package/dist/dock.js
CHANGED
|
@@ -5,11 +5,11 @@ import { t as r } from "./useSpecularTracking-BVRZsRHA.js";
|
|
|
5
5
|
import { t as i } from "./useTouchGate-WFyJYsth.js";
|
|
6
6
|
import { n as a, t as o } from "./createContext-B44Sah_H.js";
|
|
7
7
|
import { i as s, n as c, r as l, t as u } from "./dockContext-BKeIMmNk.js";
|
|
8
|
-
import { i as d, n as f, r as p, t as m } from "./TabsList-
|
|
9
|
-
import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createVNode as x, defineComponent as S, mergeModels as C, mergeProps as w, nextTick as T, normalizeClass as E, normalizeStyle as
|
|
10
|
-
import { DropdownMenuTrigger as
|
|
11
|
-
import { SpringProgress as
|
|
12
|
-
var
|
|
8
|
+
import { i as d, n as f, r as p, t as m } from "./TabsList-B8CVOQPC.js";
|
|
9
|
+
import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createVNode as x, defineComponent as S, mergeModels as C, mergeProps as w, nextTick as T, normalizeClass as E, normalizeStyle as ee, onBeforeUnmount as D, onMounted as te, onUnmounted as O, openBlock as k, readonly as A, ref as j, renderList as M, renderSlot as N, resolveDynamicComponent as P, toDisplayString as F, unref as I, useAttrs as L, useId as ne, useModel as R, useTemplateRef as z, watch as B, withCtx as V } from "vue";
|
|
10
|
+
import { DropdownMenuTrigger as H, Primitive as U, SelectIcon as W, SelectTrigger as re, useForwardProps as G } from "reka-ui";
|
|
11
|
+
import { SpringProgress as K } from "@mkbabb/keyframes.js";
|
|
12
|
+
var ie = t("pause", [["rect", {
|
|
13
13
|
x: "14",
|
|
14
14
|
y: "3",
|
|
15
15
|
width: "5",
|
|
@@ -23,21 +23,32 @@ var J = t("pause", [["rect", {
|
|
|
23
23
|
height: "18",
|
|
24
24
|
rx: "1",
|
|
25
25
|
key: "1wsw3u"
|
|
26
|
-
}]]),
|
|
26
|
+
}]]), q = t("play", [["path", {
|
|
27
27
|
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
28
28
|
key: "10ikf1"
|
|
29
|
-
}]])
|
|
29
|
+
}]]), ae = ["data-orientation", "aria-orientation"], oe = /* @__PURE__ */ S({
|
|
30
|
+
__name: "DockSeparator",
|
|
31
|
+
setup(e) {
|
|
32
|
+
let t = s(), n = g(() => t?.orientation.value ?? "horizontal"), r = g(() => n.value), i = g(() => n.value === "vertical" ? "horizontal" : "vertical");
|
|
33
|
+
return (e, t) => (k(), y("div", {
|
|
34
|
+
class: "dock-separator",
|
|
35
|
+
role: "separator",
|
|
36
|
+
"data-orientation": r.value,
|
|
37
|
+
"aria-orientation": i.value
|
|
38
|
+
}, null, 8, ae));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
30
41
|
//#endregion
|
|
31
42
|
//#region src/components/custom/dock/composables/isTeleportedTarget.ts
|
|
32
|
-
function
|
|
43
|
+
function J(e, t) {
|
|
33
44
|
if (!(e instanceof Element)) return !1;
|
|
34
45
|
let n = e.closest("[data-glass-dock-portal]");
|
|
35
46
|
return n ? t ? n.getAttribute("data-glass-dock-owner") === t : !0 : !1;
|
|
36
47
|
}
|
|
37
48
|
//#endregion
|
|
38
49
|
//#region src/components/custom/dock/composables/useDockState.ts
|
|
39
|
-
function
|
|
40
|
-
let { collapseDelay: t = 2500, rootEl: n, alwaysExpanded: r = !1, isTransitioning: i, dockId: a, onStateChange: o } = e, s = () => typeof r == "boolean" ? r : r.value, c = s(), l =
|
|
50
|
+
function se(e) {
|
|
51
|
+
let { collapseDelay: t = 2500, rootEl: n, alwaysExpanded: r = !1, isTransitioning: i, dockId: a, onStateChange: o } = e, s = () => typeof r == "boolean" ? r : r.value, c = s(), l = j(c ? "pinned" : "collapsed"), u = j(c), d = j(c), f = null, p = j(0), m = g(() => p.value > 0), h = null, _ = null, v = !1, y = l.value;
|
|
41
52
|
function b() {
|
|
42
53
|
s() && (l.value = "pinned"), u.value = l.value !== "collapsed", d.value = l.value === "pinned", o && y !== l.value && o(l.value, y), y = l.value;
|
|
43
54
|
}
|
|
@@ -68,96 +79,96 @@ function ie(e) {
|
|
|
68
79
|
}
|
|
69
80
|
v ||= (v = !0, x(), T(), l.value = "collapsed", b(), !1);
|
|
70
81
|
}
|
|
71
|
-
function
|
|
82
|
+
function ee() {
|
|
72
83
|
if (s()) {
|
|
73
84
|
l.value = "pinned", b();
|
|
74
85
|
return;
|
|
75
86
|
}
|
|
76
87
|
x(), l.value = "hover", b();
|
|
77
88
|
}
|
|
78
|
-
function
|
|
89
|
+
function D() {
|
|
79
90
|
s() || (x(), l.value === "collapsed" && (l.value = "hover", b()));
|
|
80
91
|
}
|
|
81
|
-
function
|
|
92
|
+
function te(e) {
|
|
82
93
|
if (!s() && l.value === "hover") {
|
|
83
94
|
if (p.value > 0) return;
|
|
84
95
|
if (e) {
|
|
85
96
|
let t = n.value;
|
|
86
|
-
if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) ||
|
|
97
|
+
if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || J(e.relatedTarget, a)) return;
|
|
87
98
|
}
|
|
88
99
|
w();
|
|
89
100
|
}
|
|
90
101
|
}
|
|
91
|
-
function
|
|
102
|
+
function k() {
|
|
92
103
|
s() || (x(), l.value === "collapsed" && (l.value = "hover", b()));
|
|
93
104
|
}
|
|
94
|
-
function
|
|
105
|
+
function A(e) {
|
|
95
106
|
if (s() || l.value !== "hover" || p.value > 0) return;
|
|
96
107
|
let t = e.currentTarget;
|
|
97
|
-
e.relatedTarget && t.contains(e.relatedTarget) ||
|
|
108
|
+
e.relatedTarget && t.contains(e.relatedTarget) || J(e.relatedTarget, a) || w();
|
|
98
109
|
}
|
|
99
|
-
function
|
|
110
|
+
function M() {
|
|
100
111
|
if (s()) {
|
|
101
112
|
l.value = "pinned", b();
|
|
102
113
|
return;
|
|
103
114
|
}
|
|
104
115
|
x(), l.value = "pinned", b();
|
|
105
116
|
}
|
|
106
|
-
function
|
|
117
|
+
function N() {
|
|
107
118
|
p.value++, x();
|
|
108
119
|
}
|
|
109
|
-
function
|
|
120
|
+
function P() {
|
|
110
121
|
p.value = Math.max(0, p.value - 1), p.value === 0 && l.value === "hover" && (x(), f = setTimeout(() => {
|
|
111
122
|
p.value === 0 && l.value === "hover" && w();
|
|
112
123
|
}, Math.min(t, 800)));
|
|
113
124
|
}
|
|
114
|
-
function
|
|
125
|
+
function F(e) {
|
|
115
126
|
if (s() || i?.value) return;
|
|
116
127
|
let t = n.value;
|
|
117
|
-
!t || t.contains(e.target) ||
|
|
128
|
+
!t || t.contains(e.target) || J(e.target, a) || E();
|
|
118
129
|
}
|
|
119
|
-
return
|
|
130
|
+
return B(u, (e) => {
|
|
120
131
|
e ? (C(), _ = requestAnimationFrame(() => {
|
|
121
|
-
_ = null, u.value && (document.addEventListener("pointerdown",
|
|
122
|
-
document.removeEventListener("pointerdown",
|
|
132
|
+
_ = null, u.value && (document.addEventListener("pointerdown", F, !0), h = () => {
|
|
133
|
+
document.removeEventListener("pointerdown", F, !0), h = null;
|
|
123
134
|
});
|
|
124
135
|
})) : C();
|
|
125
|
-
}), typeof r == "boolean" ? r && (l.value = "pinned", b()) :
|
|
136
|
+
}), typeof r == "boolean" ? r && (l.value = "pinned", b()) : B(r, (e) => {
|
|
126
137
|
if (e) {
|
|
127
138
|
x(), l.value = "pinned", b();
|
|
128
139
|
return;
|
|
129
140
|
}
|
|
130
141
|
l.value = "collapsed", b();
|
|
131
|
-
}, { immediate: !0 }),
|
|
142
|
+
}, { immediate: !0 }), O(() => {
|
|
132
143
|
x(), C();
|
|
133
144
|
}), {
|
|
134
145
|
state: l,
|
|
135
146
|
expanded: u,
|
|
136
147
|
isPinned: d,
|
|
137
148
|
isHeld: m,
|
|
138
|
-
onMouseEnter:
|
|
139
|
-
onMouseLeave:
|
|
140
|
-
onFocusIn:
|
|
141
|
-
onFocusOut:
|
|
142
|
-
onClickCollapsed:
|
|
143
|
-
keepOpen:
|
|
144
|
-
release:
|
|
145
|
-
expand:
|
|
149
|
+
onMouseEnter: D,
|
|
150
|
+
onMouseLeave: te,
|
|
151
|
+
onFocusIn: k,
|
|
152
|
+
onFocusOut: A,
|
|
153
|
+
onClickCollapsed: M,
|
|
154
|
+
keepOpen: N,
|
|
155
|
+
release: P,
|
|
156
|
+
expand: ee,
|
|
146
157
|
collapse: E
|
|
147
158
|
};
|
|
148
159
|
}
|
|
149
160
|
//#endregion
|
|
150
161
|
//#region src/components/custom/dock/composables/dockMorphContext.ts
|
|
151
|
-
var
|
|
162
|
+
var ce = {
|
|
152
163
|
response: .32,
|
|
153
164
|
dampingFraction: .7
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
function
|
|
157
|
-
|
|
165
|
+
}, Y = o("glass-ui:dock-morph-context");
|
|
166
|
+
Y.KEY;
|
|
167
|
+
function le(e) {
|
|
168
|
+
Y.provide(e);
|
|
158
169
|
}
|
|
159
|
-
var
|
|
160
|
-
function
|
|
170
|
+
var ue = Y.use;
|
|
171
|
+
function de(e) {
|
|
161
172
|
let { rootEl: t, outerEl: n, outerActiveLayer: r, outerAxis: i } = e, a = null, o = /* @__PURE__ */ new Set();
|
|
162
173
|
function s() {
|
|
163
174
|
return t.value;
|
|
@@ -197,9 +208,9 @@ function se(e) {
|
|
|
197
208
|
if (!s()) return;
|
|
198
209
|
let e = a !== null && !a.settled ? a.velocity : 0;
|
|
199
210
|
if (!a || a.settled) {
|
|
200
|
-
c(), a = new
|
|
201
|
-
response:
|
|
202
|
-
dampingFraction:
|
|
211
|
+
c(), a = new K({
|
|
212
|
+
response: ce.response,
|
|
213
|
+
dampingFraction: ce.dampingFraction,
|
|
203
214
|
initial: 0,
|
|
204
215
|
respectReducedMotion: !0
|
|
205
216
|
});
|
|
@@ -260,12 +271,12 @@ function se(e) {
|
|
|
260
271
|
containerEl: e.containerEl,
|
|
261
272
|
activeLayer: e.activeLayer,
|
|
262
273
|
axis: e.axis,
|
|
263
|
-
currentLayer:
|
|
264
|
-
leavingLayer:
|
|
274
|
+
currentLayer: j(e.activeLayer.value),
|
|
275
|
+
leavingLayer: j(null),
|
|
265
276
|
txId: 0,
|
|
266
277
|
stop: () => {}
|
|
267
278
|
};
|
|
268
|
-
return t.stop =
|
|
279
|
+
return t.stop = B(e.activeLayer, (e, n) => {
|
|
269
280
|
v(t, e, n);
|
|
270
281
|
}), o.add(t), t;
|
|
271
282
|
}
|
|
@@ -279,8 +290,8 @@ function se(e) {
|
|
|
279
290
|
}), S = { registerGroup(e) {
|
|
280
291
|
let t = y(e);
|
|
281
292
|
return {
|
|
282
|
-
currentLayer:
|
|
283
|
-
leavingLayer:
|
|
293
|
+
currentLayer: A(t.currentLayer),
|
|
294
|
+
leavingLayer: A(t.leavingLayer),
|
|
284
295
|
release: () => b(t)
|
|
285
296
|
};
|
|
286
297
|
} };
|
|
@@ -290,44 +301,41 @@ function se(e) {
|
|
|
290
301
|
let r = u(i.value);
|
|
291
302
|
e.propertyName !== r && e.propertyName !== l(i.value) || a && a.settled && (m(x), h());
|
|
292
303
|
}
|
|
293
|
-
return
|
|
304
|
+
return O(() => {
|
|
294
305
|
for (let e of o) e.stop();
|
|
295
306
|
o.clear(), c();
|
|
296
307
|
}), {
|
|
297
308
|
context: S,
|
|
298
|
-
outerCurrentLayer:
|
|
309
|
+
outerCurrentLayer: A(x.currentLayer),
|
|
299
310
|
onOuterTransitionEnd: C
|
|
300
311
|
};
|
|
301
312
|
}
|
|
302
313
|
//#endregion
|
|
303
314
|
//#region src/components/custom/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
|
|
304
|
-
var
|
|
315
|
+
var fe = [
|
|
305
316
|
"data-density",
|
|
306
317
|
"data-held",
|
|
307
318
|
"data-container-name"
|
|
308
|
-
],
|
|
319
|
+
], pe = {
|
|
320
|
+
key: 0,
|
|
321
|
+
class: "dock-persistent"
|
|
322
|
+
}, me = ["inert"], he = ["inert"], ge = {
|
|
323
|
+
key: 2,
|
|
324
|
+
class: "dock-layers dock-layer--vertical-body"
|
|
325
|
+
}, _e = { class: "dock-layer--vertical-section" }, X = /* @__PURE__ */ S({
|
|
309
326
|
__name: "GlassDock",
|
|
310
327
|
props: {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
},
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
},
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
type: Boolean,
|
|
323
|
-
default: !1
|
|
324
|
-
},
|
|
325
|
-
variant: { default: "dock" },
|
|
326
|
-
shape: { default: "pill" },
|
|
327
|
-
layout: { default: "linear" },
|
|
328
|
-
orientation: { default: "horizontal" },
|
|
329
|
-
density: { default: "comfortable" },
|
|
330
|
-
overflow: { default: "grow" },
|
|
328
|
+
variant: {},
|
|
329
|
+
collapseDelay: {},
|
|
330
|
+
startCollapsed: { type: Boolean },
|
|
331
|
+
layout: {},
|
|
332
|
+
fitContent: { type: Boolean },
|
|
333
|
+
position: {},
|
|
334
|
+
alwaysExpanded: { type: Boolean },
|
|
335
|
+
shape: {},
|
|
336
|
+
orientation: {},
|
|
337
|
+
density: {},
|
|
338
|
+
overflow: {},
|
|
331
339
|
containerName: {}
|
|
332
340
|
},
|
|
333
341
|
setup(e, { expose: t }) {
|
|
@@ -336,154 +344,159 @@ var ce = [
|
|
|
336
344
|
"container-type": "inline-size",
|
|
337
345
|
"container-name": n.containerName
|
|
338
346
|
};
|
|
339
|
-
})
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
347
|
+
});
|
|
348
|
+
function a(e) {
|
|
349
|
+
return e.variant !== "rail" && e.variant !== "instrument-strip";
|
|
350
|
+
}
|
|
351
|
+
let o = g(() => a(n) ? n.collapseDelay ?? 2e3 : 2e3), s = g(() => a(n) ? n.startCollapsed ?? !0 : !1), l = g(() => a(n) ? n.layout ?? "linear" : "linear"), u = z("dockEl"), d = z("layersEl"), f = g(() => n.variant ?? "dock"), p = g(() => n.shape ?? "pill"), m = l, _ = g(() => n.variant === "rail" || n.variant === "instrument-strip" ? "vertical" : n.orientation ?? "horizontal"), S = g(() => n.density ?? "comfortable"), C = g(() => n.overflow === "scroll" ? _.value === "vertical" ? "dock-scroll-y" : "dock-scroll-x" : null), w = g(() => n.alwaysExpanded || _.value === "vertical" || l.value === "grid"), T = g(() => n.fitContent || n.variant === "rail" || n.variant === "instrument-strip"), O = j(!1), A = i(o.value), M = `glass-dock-${ne()}`, P = null, F = 0, { expanded: L, isPinned: R, isHeld: V, onMouseEnter: H, onMouseLeave: U, onFocusIn: W, onFocusOut: re, onClickCollapsed: G, keepOpen: K, release: ie, expand: q, collapse: ae } = se({
|
|
352
|
+
collapseDelay: o.value,
|
|
353
|
+
rootEl: u,
|
|
354
|
+
alwaysExpanded: w,
|
|
355
|
+
isTransitioning: O,
|
|
356
|
+
dockId: M
|
|
345
357
|
});
|
|
346
358
|
c({
|
|
347
|
-
id:
|
|
348
|
-
orientation:
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
359
|
+
id: M,
|
|
360
|
+
orientation: _,
|
|
361
|
+
layout: m,
|
|
362
|
+
keepOpen: K,
|
|
363
|
+
release: ie,
|
|
364
|
+
held: V
|
|
352
365
|
});
|
|
353
|
-
let
|
|
354
|
-
rootEl:
|
|
355
|
-
outerEl:
|
|
356
|
-
outerActiveLayer: g(() =>
|
|
366
|
+
let J = g(() => w.value || L.value), { context: ce, onOuterTransitionEnd: Y } = de({
|
|
367
|
+
rootEl: u,
|
|
368
|
+
outerEl: d,
|
|
369
|
+
outerActiveLayer: g(() => J.value ? "full" : "summary"),
|
|
357
370
|
outerAxis: g(() => "horizontal")
|
|
358
371
|
});
|
|
359
|
-
|
|
360
|
-
let
|
|
361
|
-
function
|
|
372
|
+
le(ce);
|
|
373
|
+
let ue = g(() => ({ "view-transition-name": M.replace(/[^a-zA-Z0-9_-]/g, "-") }));
|
|
374
|
+
function X(e) {
|
|
362
375
|
let t = e.trim();
|
|
363
376
|
return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
364
377
|
}
|
|
365
|
-
function
|
|
366
|
-
let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(
|
|
378
|
+
function Z(e) {
|
|
379
|
+
let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(X), r = t.transitionDelay.split(",").map(X);
|
|
367
380
|
return Math.max(0, ...n.map((e, t) => e + (r[t] ?? r[0] ?? 0)));
|
|
368
381
|
}
|
|
369
|
-
function
|
|
370
|
-
let t =
|
|
382
|
+
function ve(e) {
|
|
383
|
+
let t = X(getComputedStyle(e).getPropertyValue("--duration-normal") || "0.3s");
|
|
371
384
|
return Math.max(t > 0 ? t * 2 : 0, 600);
|
|
372
385
|
}
|
|
373
|
-
function
|
|
374
|
-
|
|
386
|
+
function Q() {
|
|
387
|
+
P &&= (clearTimeout(P), null);
|
|
375
388
|
}
|
|
376
|
-
let
|
|
389
|
+
let ye = new Set([
|
|
377
390
|
"width",
|
|
378
391
|
"height",
|
|
379
392
|
"padding",
|
|
380
393
|
"transform"
|
|
381
394
|
]);
|
|
382
|
-
function
|
|
383
|
-
let e =
|
|
395
|
+
function be() {
|
|
396
|
+
let e = u.value;
|
|
384
397
|
if (!e) return;
|
|
385
|
-
let t = ++
|
|
386
|
-
|
|
387
|
-
t ===
|
|
388
|
-
}, Math.max(
|
|
398
|
+
let t = ++F;
|
|
399
|
+
Q(), O.value = !0, P = setTimeout(() => {
|
|
400
|
+
t === F && (O.value = !1, P = null);
|
|
401
|
+
}, Math.max(Z(e), ve(e)) + 50);
|
|
389
402
|
}
|
|
390
|
-
function
|
|
391
|
-
e.target ===
|
|
403
|
+
function xe(e) {
|
|
404
|
+
e.target === u.value && ye.has(e.propertyName) && (Q(), F++, O.value = !1);
|
|
392
405
|
}
|
|
393
|
-
|
|
394
|
-
(n.alwaysExpanded || !
|
|
406
|
+
te(() => {
|
|
407
|
+
(n.alwaysExpanded || !s.value) && q();
|
|
395
408
|
});
|
|
396
409
|
function $() {
|
|
397
|
-
return
|
|
410
|
+
return _.value === "horizontal" && !w.value;
|
|
398
411
|
}
|
|
399
|
-
function
|
|
400
|
-
if (!$() ||
|
|
401
|
-
let t =
|
|
402
|
-
!t || !n ||
|
|
412
|
+
function Se(e) {
|
|
413
|
+
if (!$() || J.value) return;
|
|
414
|
+
let t = u.value, n = e.touches[0];
|
|
415
|
+
!t || !n || A.handleTouchStart(t, n.clientY);
|
|
403
416
|
}
|
|
404
|
-
function
|
|
405
|
-
$() &&
|
|
417
|
+
function Ce(e) {
|
|
418
|
+
$() && A.handleScrollCheck(e);
|
|
406
419
|
}
|
|
407
|
-
function
|
|
420
|
+
function we() {
|
|
408
421
|
if (!$()) return;
|
|
409
|
-
let e =
|
|
410
|
-
|
|
422
|
+
let e = A.isActive.value;
|
|
423
|
+
A.handleTouchEnd(), !e && A.isActive.value && !J.value && q();
|
|
411
424
|
}
|
|
412
|
-
return
|
|
413
|
-
!e &&
|
|
414
|
-
}),
|
|
415
|
-
|
|
416
|
-
}),
|
|
417
|
-
expanded:
|
|
418
|
-
isPinned:
|
|
419
|
-
isHeld:
|
|
420
|
-
isTransitioning:
|
|
421
|
-
expand:
|
|
422
|
-
collapse:
|
|
423
|
-
keepOpen:
|
|
424
|
-
release:
|
|
425
|
-
}), (t, n) => (
|
|
425
|
+
return B(A.isActive, (e) => {
|
|
426
|
+
!e && L.value && !R.value && !w.value && ae();
|
|
427
|
+
}), B(J, (e) => {
|
|
428
|
+
be(), e || A.deactivate();
|
|
429
|
+
}), D(Q), t({
|
|
430
|
+
expanded: L,
|
|
431
|
+
isPinned: R,
|
|
432
|
+
isHeld: V,
|
|
433
|
+
isTransitioning: O,
|
|
434
|
+
expand: q,
|
|
435
|
+
collapse: ae,
|
|
436
|
+
keepOpen: K,
|
|
437
|
+
release: ie
|
|
438
|
+
}), (t, n) => (k(), y("div", {
|
|
426
439
|
ref_key: "dockEl",
|
|
427
|
-
ref:
|
|
440
|
+
ref: u,
|
|
428
441
|
class: E(["glass-dock", [
|
|
429
|
-
|
|
430
|
-
`variant-${
|
|
431
|
-
`shape-${
|
|
432
|
-
`layout-${
|
|
433
|
-
|
|
442
|
+
_.value,
|
|
443
|
+
`variant-${f.value}`,
|
|
444
|
+
`shape-${p.value}`,
|
|
445
|
+
`layout-${I(m)}`,
|
|
446
|
+
C.value,
|
|
434
447
|
{
|
|
435
|
-
expanded:
|
|
436
|
-
collapsed: !
|
|
437
|
-
pinned: R
|
|
438
|
-
"fit-content":
|
|
439
|
-
"always-expanded":
|
|
440
|
-
"dock-overflow-wrap": e.overflow === "wrap" &&
|
|
448
|
+
expanded: J.value,
|
|
449
|
+
collapsed: !J.value,
|
|
450
|
+
pinned: I(R),
|
|
451
|
+
"fit-content": T.value,
|
|
452
|
+
"always-expanded": w.value,
|
|
453
|
+
"dock-overflow-wrap": e.overflow === "wrap" && _.value !== "vertical"
|
|
441
454
|
},
|
|
442
455
|
e.position === "fixed" ? "fixed bottom-[var(--dock-pos)] left-1/2 -translate-x-1/2" : e.position === "sticky" ? "dock-sticky" : "dock-inline"
|
|
443
456
|
]]),
|
|
444
|
-
"data-density":
|
|
445
|
-
"data-held":
|
|
457
|
+
"data-density": S.value,
|
|
458
|
+
"data-held": I(V) || void 0,
|
|
446
459
|
"data-container-name": e.containerName || void 0,
|
|
447
|
-
style:
|
|
448
|
-
onMouseenter: n[2] ||= (...e) =>
|
|
449
|
-
onMouseleave: n[3] ||= (e) =>
|
|
450
|
-
onFocusin: n[4] ||= (...e) =>
|
|
451
|
-
onFocusout: n[5] ||= (...e) =>
|
|
452
|
-
onTouchstart:
|
|
453
|
-
onTouchmove:
|
|
454
|
-
onTouchend:
|
|
455
|
-
onTransitionend:
|
|
456
|
-
onTransitioncancel:
|
|
457
|
-
}, [
|
|
458
|
-
key:
|
|
460
|
+
style: ee([r.value, ue.value]),
|
|
461
|
+
onMouseenter: n[2] ||= (...e) => I(H) && I(H)(...e),
|
|
462
|
+
onMouseleave: n[3] ||= (e) => I(U)(e),
|
|
463
|
+
onFocusin: n[4] ||= (...e) => I(W) && I(W)(...e),
|
|
464
|
+
onFocusout: n[5] ||= (...e) => I(re) && I(re)(...e),
|
|
465
|
+
onTouchstart: Se,
|
|
466
|
+
onTouchmove: Ce,
|
|
467
|
+
onTouchend: we,
|
|
468
|
+
onTransitionend: xe,
|
|
469
|
+
onTransitioncancel: xe
|
|
470
|
+
}, [t.$slots.persistent ? (k(), y("div", pe, [N(t.$slots, "persistent")])) : v("", !0), _.value === "horizontal" ? (k(), y("div", {
|
|
471
|
+
key: 1,
|
|
459
472
|
ref_key: "layersEl",
|
|
460
|
-
ref:
|
|
473
|
+
ref: d,
|
|
461
474
|
class: "dock-layers",
|
|
462
|
-
onTransitionend: n[1] ||= (...e) =>
|
|
475
|
+
onTransitionend: n[1] ||= (...e) => I(Y) && I(Y)(...e)
|
|
463
476
|
}, [b("div", {
|
|
464
|
-
class: E(["dock-layer dock-layer--full", { "is-active":
|
|
465
|
-
inert: !
|
|
466
|
-
}, [
|
|
467
|
-
class: E(["dock-layer dock-layer--summary", { "is-active": !
|
|
468
|
-
inert:
|
|
469
|
-
onClick: n[0] ||= (...e) =>
|
|
470
|
-
}, [
|
|
471
|
-
}
|
|
472
|
-
}),
|
|
473
|
-
|
|
474
|
-
function
|
|
475
|
-
|
|
477
|
+
class: E(["dock-layer dock-layer--full", { "is-active": J.value }]),
|
|
478
|
+
inert: !I(L) || void 0
|
|
479
|
+
}, [N(t.$slots, "default")], 10, me), b("div", {
|
|
480
|
+
class: E(["dock-layer dock-layer--summary", { "is-active": !J.value }]),
|
|
481
|
+
inert: I(L) || void 0,
|
|
482
|
+
onClick: n[0] ||= (...e) => I(G) && I(G)(...e)
|
|
483
|
+
}, [N(t.$slots, "collapsed")], 10, he)], 544)) : (k(), y("div", ge, [N(t.$slots, "default"), t.$slots.collapsed ? (k(), y(h, { key: 0 }, [x(oe), b("div", _e, [N(t.$slots, "collapsed")])], 64)) : v("", !0)]))], 46, fe));
|
|
484
|
+
}
|
|
485
|
+
}), Z = a("glass-ui:dock-layer-group", "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>");
|
|
486
|
+
Z.KEY;
|
|
487
|
+
function ve(e) {
|
|
488
|
+
Z.provide(e);
|
|
476
489
|
}
|
|
477
|
-
var
|
|
478
|
-
|
|
490
|
+
var Q = Z.use;
|
|
491
|
+
Z.useOptional;
|
|
479
492
|
//#endregion
|
|
480
493
|
//#region src/components/custom/dock/composables/useLayerTransition.ts
|
|
481
|
-
var
|
|
494
|
+
var ye = {
|
|
482
495
|
response: .32,
|
|
483
496
|
dampingFraction: .7
|
|
484
497
|
};
|
|
485
|
-
function
|
|
486
|
-
let { containerEl: t, activeLayer: n, axis: r } = e, i = g(() => r?.value === "vertical" ? "height" : "width"), a = g(() => i.value === "width" ? "inline-size" : "block-size"), o = (e) => e.getBoundingClientRect()[i.value], s =
|
|
498
|
+
function be(e) {
|
|
499
|
+
let { containerEl: t, activeLayer: n, axis: r } = e, i = g(() => r?.value === "vertical" ? "height" : "width"), a = g(() => i.value === "width" ? "inline-size" : "block-size"), o = (e) => e.getBoundingClientRect()[i.value], s = j(n.value), c = j(null), l = 0, u = null, d = null;
|
|
487
500
|
function f() {
|
|
488
501
|
u &&= (u.dispose(), null), d = null;
|
|
489
502
|
}
|
|
@@ -501,9 +514,9 @@ function me(e) {
|
|
|
501
514
|
h(e, t);
|
|
502
515
|
return;
|
|
503
516
|
}
|
|
504
|
-
e.style.setProperty("--dock-morph-from", `${r}px`), e.style.setProperty("--dock-morph-to", `${i}px`), t.style.setProperty("--dock-morph-t", "0"), t.setAttribute("data-morphing", ""), o || (f(), u = new
|
|
505
|
-
response:
|
|
506
|
-
dampingFraction:
|
|
517
|
+
e.style.setProperty("--dock-morph-from", `${r}px`), e.style.setProperty("--dock-morph-to", `${i}px`), t.style.setProperty("--dock-morph-t", "0"), t.setAttribute("data-morphing", ""), o || (f(), u = new K({
|
|
518
|
+
response: ye.response,
|
|
519
|
+
dampingFraction: ye.dampingFraction,
|
|
507
520
|
initial: 0,
|
|
508
521
|
respectReducedMotion: !0
|
|
509
522
|
}), d = e);
|
|
@@ -512,7 +525,7 @@ function me(e) {
|
|
|
512
525
|
n === l && (t.style.setProperty("--dock-morph-t", `${r}`), s.settled && h(e, t));
|
|
513
526
|
});
|
|
514
527
|
}
|
|
515
|
-
|
|
528
|
+
B(n, (e, n) => {
|
|
516
529
|
if (e === n) return;
|
|
517
530
|
let r = t.value;
|
|
518
531
|
if (!r) {
|
|
@@ -534,7 +547,7 @@ function me(e) {
|
|
|
534
547
|
let n = t.value;
|
|
535
548
|
n && e.target === n && (e.propertyName !== a.value && e.propertyName !== i.value || u && u.settled && h(n, p(n)));
|
|
536
549
|
}
|
|
537
|
-
return
|
|
550
|
+
return O(f), {
|
|
538
551
|
onTransitionEnd: v,
|
|
539
552
|
currentLayer: s,
|
|
540
553
|
leavingLayer: c
|
|
@@ -542,7 +555,7 @@ function me(e) {
|
|
|
542
555
|
}
|
|
543
556
|
//#endregion
|
|
544
557
|
//#region src/components/custom/dock/DockLayerGroup.vue?vue&type=script&setup=true&lang.ts
|
|
545
|
-
var
|
|
558
|
+
var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
|
|
546
559
|
__name: "DockLayerGroup",
|
|
547
560
|
props: /* @__PURE__ */ C({
|
|
548
561
|
orientation: {},
|
|
@@ -557,23 +570,23 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
557
570
|
}),
|
|
558
571
|
emits: ["update:active"],
|
|
559
572
|
setup(e) {
|
|
560
|
-
let t = e, n =
|
|
573
|
+
let t = e, n = R(e, "active"), r = s(), i = j([]), a = z("containerEl");
|
|
561
574
|
function o(e) {
|
|
562
575
|
i.value.find((t) => t.id === e.id) || i.value.push(e);
|
|
563
576
|
}
|
|
564
577
|
function c(e) {
|
|
565
578
|
i.value = i.value.filter((t) => t.id !== e);
|
|
566
579
|
}
|
|
567
|
-
let l = g(() => t.orientation ?? r?.orientation.value ?? "horizontal"), u =
|
|
568
|
-
if (
|
|
569
|
-
let e =
|
|
580
|
+
let l = g(() => t.orientation ?? r?.orientation.value ?? "horizontal"), u = g(() => l.value === "vertical" ? "horizontal" : "vertical"), S = ue(), C, w, T;
|
|
581
|
+
if (S) {
|
|
582
|
+
let e = S.registerGroup({
|
|
570
583
|
containerEl: a,
|
|
571
584
|
activeLayer: n,
|
|
572
585
|
axis: l
|
|
573
586
|
});
|
|
574
|
-
|
|
587
|
+
C = e.currentLayer, w = e.leavingLayer, T = () => {}, D(() => e.release());
|
|
575
588
|
} else {
|
|
576
|
-
let e =
|
|
589
|
+
let e = be({
|
|
577
590
|
containerEl: a,
|
|
578
591
|
activeLayer: n,
|
|
579
592
|
axis: l,
|
|
@@ -582,74 +595,74 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
582
595
|
return [i.value.findIndex((e) => e.id === t) < n ? "layer-back" : "layer-forward"];
|
|
583
596
|
}
|
|
584
597
|
});
|
|
585
|
-
|
|
598
|
+
C = A(e.currentLayer), w = A(e.leavingLayer), T = e.onTransitionEnd;
|
|
586
599
|
}
|
|
587
|
-
let
|
|
588
|
-
"view-transition-name": `gl-dock-stack-${
|
|
600
|
+
let te = typeof document < "u" && "startViewTransition" in document, O = ne(), L = g(() => te ? {
|
|
601
|
+
"view-transition-name": `gl-dock-stack-${O.replace(/[^a-zA-Z0-9_-]/g, "-")}`,
|
|
589
602
|
"view-transition-class": "gl-dock-layer"
|
|
590
603
|
} : void 0);
|
|
591
|
-
|
|
604
|
+
ve({
|
|
592
605
|
register: o,
|
|
593
606
|
unregister: c,
|
|
594
|
-
currentLayerId:
|
|
595
|
-
leavingLayerId:
|
|
607
|
+
currentLayerId: C,
|
|
608
|
+
leavingLayerId: w
|
|
596
609
|
});
|
|
597
|
-
function
|
|
610
|
+
function B(e) {
|
|
598
611
|
return typeof e == "object" && !!e;
|
|
599
612
|
}
|
|
600
|
-
let
|
|
613
|
+
let H = j(!1);
|
|
601
614
|
function U() {
|
|
602
|
-
|
|
615
|
+
H.value || (H.value = !0, r?.keepOpen());
|
|
603
616
|
}
|
|
604
617
|
function W(e) {
|
|
605
618
|
let t = e.relatedTarget, n = e.currentTarget;
|
|
606
|
-
t && n?.contains(t) ||
|
|
619
|
+
t && n?.contains(t) || H.value && (H.value = !1, r?.release());
|
|
607
620
|
}
|
|
608
|
-
return (t, r) => (
|
|
621
|
+
return (t, r) => (k(), y("div", { class: E(["dock-layer-group", [l.value, `rail-${e.railPosition}`]]) }, [e.showRail && i.value.length > 1 ? (k(), _(I(d), {
|
|
609
622
|
key: 0,
|
|
610
623
|
modelValue: n.value,
|
|
611
624
|
"onUpdate:modelValue": r[0] ||= (e) => n.value = e,
|
|
612
|
-
orientation:
|
|
625
|
+
orientation: u.value,
|
|
613
626
|
"as-child": !0
|
|
614
627
|
}, {
|
|
615
|
-
default:
|
|
628
|
+
default: V(() => [x(I(m), {
|
|
616
629
|
class: E(["dock-layer-rail", e.railPosition]),
|
|
617
630
|
onFocusin: U,
|
|
618
631
|
onFocusout: W
|
|
619
632
|
}, {
|
|
620
|
-
default:
|
|
633
|
+
default: V(() => [(k(!0), y(h, null, M(i.value, (e) => (k(), _(I(p), {
|
|
621
634
|
key: e.id,
|
|
622
635
|
value: e.id,
|
|
623
636
|
class: "dock-layer-tab",
|
|
624
637
|
title: e.label,
|
|
625
638
|
"aria-label": e.label ?? e.id
|
|
626
639
|
}, {
|
|
627
|
-
default:
|
|
640
|
+
default: V(() => [B(e.icon) ? (k(), _(P(e.icon), {
|
|
628
641
|
key: 0,
|
|
629
642
|
class: "size-4"
|
|
630
|
-
})) : typeof e.icon == "string" ? (
|
|
643
|
+
})) : typeof e.icon == "string" ? (k(), y("span", xe, F(e.icon), 1)) : (k(), y("span", $, F((e.label ?? e.id).charAt(0)), 1))]),
|
|
631
644
|
_: 2
|
|
632
645
|
}, 1032, [
|
|
633
646
|
"value",
|
|
634
647
|
"title",
|
|
635
648
|
"aria-label"
|
|
636
|
-
]))), 128)), x(
|
|
649
|
+
]))), 128)), x(I(f), { class: "dock-layer-tab-indicator" })]),
|
|
637
650
|
_: 1
|
|
638
651
|
}, 8, ["class"])]),
|
|
639
652
|
_: 1
|
|
640
|
-
}, 8, ["modelValue"])) : v("", !0), b("div", {
|
|
653
|
+
}, 8, ["modelValue", "orientation"])) : v("", !0), b("div", {
|
|
641
654
|
ref_key: "containerEl",
|
|
642
655
|
ref: a,
|
|
643
656
|
class: "dock-layer-stack",
|
|
644
|
-
style:
|
|
645
|
-
onTransitionend: r[1] ||= (...e) =>
|
|
646
|
-
}, [
|
|
657
|
+
style: ee(L.value),
|
|
658
|
+
onTransitionend: r[1] ||= (...e) => I(T) && I(T)(...e)
|
|
659
|
+
}, [N(t.$slots, "default")], 36)], 2));
|
|
647
660
|
}
|
|
648
|
-
}),
|
|
661
|
+
}), Ce = [
|
|
649
662
|
"inert",
|
|
650
663
|
"aria-hidden",
|
|
651
664
|
"tabindex"
|
|
652
|
-
],
|
|
665
|
+
], we = /* @__PURE__ */ S({
|
|
653
666
|
__name: "DockLayer",
|
|
654
667
|
props: {
|
|
655
668
|
id: {},
|
|
@@ -657,23 +670,23 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
657
670
|
icon: {}
|
|
658
671
|
},
|
|
659
672
|
setup(e) {
|
|
660
|
-
let t = e, n =
|
|
661
|
-
|
|
673
|
+
let t = e, n = Q();
|
|
674
|
+
te(() => {
|
|
662
675
|
n.register({
|
|
663
676
|
id: t.id,
|
|
664
677
|
label: t.label,
|
|
665
678
|
icon: t.icon
|
|
666
679
|
});
|
|
667
|
-
}),
|
|
680
|
+
}), D(() => {
|
|
668
681
|
n.unregister(t.id);
|
|
669
682
|
});
|
|
670
|
-
let r = g(() => n.currentLayerId.value === t.id), i = g(() => n.leavingLayerId.value === t.id), a =
|
|
671
|
-
return
|
|
683
|
+
let r = g(() => n.currentLayerId.value === t.id), i = g(() => n.leavingLayerId.value === t.id), a = z("hostEl");
|
|
684
|
+
return B(r, async (e, t) => {
|
|
672
685
|
!e || t || typeof document < "u" && (() => {
|
|
673
686
|
let e = document.activeElement;
|
|
674
687
|
return !e || e === document.body ? !0 : !!e.closest("[inert]");
|
|
675
688
|
})() && (await T(), a.value?.focus());
|
|
676
|
-
}), (e, t) => (
|
|
689
|
+
}), (e, t) => (k(), y("div", {
|
|
677
690
|
ref_key: "hostEl",
|
|
678
691
|
ref: a,
|
|
679
692
|
class: E(["dock-layer-item-host", {
|
|
@@ -683,9 +696,9 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
683
696
|
inert: r.value ? void 0 : !0,
|
|
684
697
|
"aria-hidden": r.value ? void 0 : !0,
|
|
685
698
|
tabindex: r.value ? -1 : void 0
|
|
686
|
-
}, [
|
|
699
|
+
}, [N(e.$slots, "default")], 10, Ce));
|
|
687
700
|
}
|
|
688
|
-
}),
|
|
701
|
+
}), Te = /* @__PURE__ */ S({
|
|
689
702
|
__name: "DockIconButton",
|
|
690
703
|
props: {
|
|
691
704
|
compact: {
|
|
@@ -708,15 +721,15 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
708
721
|
},
|
|
709
722
|
setup(t) {
|
|
710
723
|
let n = t, i = g(() => e("dock-icon-button glass-specular-track", { "dock-icon-button--compact": n.compact }, n.class)), { specularStyle: a, onPointerMove: o } = r(), s = g(() => !n.asChild && n.as === "button" ? { type: n.type } : {});
|
|
711
|
-
return (e, n) => (
|
|
724
|
+
return (e, n) => (k(), _(I(U), w({
|
|
712
725
|
as: t.as,
|
|
713
726
|
"as-child": t.asChild
|
|
714
727
|
}, s.value, {
|
|
715
728
|
class: i.value,
|
|
716
|
-
style:
|
|
717
|
-
onPointermove:
|
|
729
|
+
style: I(a),
|
|
730
|
+
onPointermove: I(o)
|
|
718
731
|
}), {
|
|
719
|
-
default:
|
|
732
|
+
default: V(() => [N(e.$slots, "default")]),
|
|
720
733
|
_: 3
|
|
721
734
|
}, 16, [
|
|
722
735
|
"as",
|
|
@@ -726,7 +739,7 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
726
739
|
"onPointermove"
|
|
727
740
|
]));
|
|
728
741
|
}
|
|
729
|
-
}),
|
|
742
|
+
}), Ee = /* @__PURE__ */ S({
|
|
730
743
|
__name: "DockBackgroundToggle",
|
|
731
744
|
props: {
|
|
732
745
|
paused: {
|
|
@@ -742,18 +755,18 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
742
755
|
function a() {
|
|
743
756
|
r("update:paused", !n.paused);
|
|
744
757
|
}
|
|
745
|
-
return (t, n) => (
|
|
758
|
+
return (t, n) => (k(), _(Te, {
|
|
746
759
|
type: "button",
|
|
747
760
|
"aria-pressed": e.paused,
|
|
748
761
|
"aria-label": i.value,
|
|
749
762
|
title: i.value,
|
|
750
763
|
onClick: a
|
|
751
764
|
}, {
|
|
752
|
-
default:
|
|
765
|
+
default: V(() => [e.paused ? (k(), _(I(q), {
|
|
753
766
|
key: 0,
|
|
754
767
|
size: 18,
|
|
755
768
|
"aria-hidden": "true"
|
|
756
|
-
})) : (
|
|
769
|
+
})) : (k(), _(I(ie), {
|
|
757
770
|
key: 1,
|
|
758
771
|
size: 18,
|
|
759
772
|
"aria-hidden": "true"
|
|
@@ -765,7 +778,7 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
765
778
|
"title"
|
|
766
779
|
]));
|
|
767
780
|
}
|
|
768
|
-
}),
|
|
781
|
+
}), De = /* @__PURE__ */ S({
|
|
769
782
|
__name: "DockTabButton",
|
|
770
783
|
props: {
|
|
771
784
|
as: { default: "button" },
|
|
@@ -782,13 +795,13 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
782
795
|
] }
|
|
783
796
|
},
|
|
784
797
|
setup(t) {
|
|
785
|
-
let n = t, r =
|
|
786
|
-
return (e, n) => (
|
|
798
|
+
let n = t, r = L(), i = g(() => r["data-tier"] === "primary"), a = g(() => e("dock-tab-button", i.value && "btn-audacious", n.class));
|
|
799
|
+
return (e, n) => (k(), _(I(U), {
|
|
787
800
|
as: t.as,
|
|
788
801
|
"as-child": t.asChild,
|
|
789
802
|
class: E(a.value)
|
|
790
803
|
}, {
|
|
791
|
-
default:
|
|
804
|
+
default: V(() => [N(e.$slots, "default")]),
|
|
792
805
|
_: 3
|
|
793
806
|
}, 8, [
|
|
794
807
|
"as",
|
|
@@ -796,7 +809,7 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
796
809
|
"class"
|
|
797
810
|
]));
|
|
798
811
|
}
|
|
799
|
-
}),
|
|
812
|
+
}), Oe = /* @__PURE__ */ S({
|
|
800
813
|
__name: "DockSelectTrigger",
|
|
801
814
|
props: {
|
|
802
815
|
disabled: { type: Boolean },
|
|
@@ -812,19 +825,19 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
812
825
|
] }
|
|
813
826
|
},
|
|
814
827
|
setup(t) {
|
|
815
|
-
let r = t, i =
|
|
828
|
+
let r = t, i = G(g(() => {
|
|
816
829
|
let { class: e, ...t } = r;
|
|
817
830
|
return t;
|
|
818
831
|
}));
|
|
819
|
-
return (t, a) => (
|
|
820
|
-
default:
|
|
821
|
-
default:
|
|
832
|
+
return (t, a) => (k(), _(I(re), w(I(i), { class: I(e)("dock-select-trigger", r.class) }), {
|
|
833
|
+
default: V(() => [N(t.$slots, "default"), x(I(W), { "as-child": "" }, {
|
|
834
|
+
default: V(() => [N(t.$slots, "icon", {}, () => [x(I(n), { class: "dock-select-trigger__chevron" })])]),
|
|
822
835
|
_: 3
|
|
823
836
|
})]),
|
|
824
837
|
_: 3
|
|
825
838
|
}, 16, ["class"]));
|
|
826
839
|
}
|
|
827
|
-
}),
|
|
840
|
+
}), ke = /* @__PURE__ */ S({
|
|
828
841
|
__name: "DockDropdownTrigger",
|
|
829
842
|
props: {
|
|
830
843
|
disabled: { type: Boolean },
|
|
@@ -840,15 +853,15 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
|
840
853
|
] }
|
|
841
854
|
},
|
|
842
855
|
setup(t) {
|
|
843
|
-
let n = t, r =
|
|
856
|
+
let n = t, r = G(g(() => {
|
|
844
857
|
let { class: e, ...t } = n;
|
|
845
858
|
return t;
|
|
846
859
|
}));
|
|
847
|
-
return (t, i) => (
|
|
848
|
-
default:
|
|
860
|
+
return (t, i) => (k(), _(I(H), w(I(r), { class: I(e)("dock-dropdown-trigger", n.class) }), {
|
|
861
|
+
default: V(() => [N(t.$slots, "default")]),
|
|
849
862
|
_: 3
|
|
850
863
|
}, 16, ["class"]));
|
|
851
864
|
}
|
|
852
865
|
});
|
|
853
866
|
//#endregion
|
|
854
|
-
export { u as DOCK_CONTEXT_KEY,
|
|
867
|
+
export { u as DOCK_CONTEXT_KEY, Ee as DockBackgroundToggle, ke as DockDropdownTrigger, Te as DockIconButton, we as DockLayer, Se as DockLayerGroup, Oe as DockSelectTrigger, oe as DockSeparator, De as DockTabButton, X as GlassDock, c as provideDockContext, l as useDockContext, be as useLayerTransition, s as useOptionalDockContext };
|