@mkbabb/glass-ui 10.1.5 → 11.0.1
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/MIGRATION.md +1024 -1461
- package/README.md +2 -2
- package/dist/DialogContent-DG5kseRQ.js +159 -0
- package/dist/DropdownMenuTrigger-uhSXgEfK.js +76 -0
- package/dist/{Surface-1nPoabc3.js → Surface-C7wq2j0A.js} +3 -0
- package/dist/aurora.css +1 -0
- package/dist/aurora.js +246 -2472
- package/dist/auroraImageSource-xNLDUjcy.js +30 -0
- package/dist/axes.js +8 -8
- package/dist/blob.css +1 -0
- package/dist/blob.js +57 -54
- package/dist/budget-CJfhLIIV.js +13 -0
- package/dist/button-CAKhiOZy.js +113 -0
- package/dist/button.js +1 -1
- package/dist/{card-ByyqRBvK.js → card-D_uXphvL.js} +4 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +3 -2
- package/dist/{checkbox-B1qn65se.js → checkbox-COLnvULu.js} +1 -0
- package/dist/checkbox.css +1 -0
- package/dist/checkbox.js +1 -1
- package/dist/{collapsible-DFzK29Oh.js → collapsible-Bd4Et730.js} +1 -0
- package/dist/collapsible.css +1 -0
- package/dist/collapsible.js +1 -1
- package/dist/color-HkUaTAJj.js +270 -0
- package/dist/{color.glsl-DTJhdekG.js → color.glsl-bFJm8k5R.js} +4 -16
- package/dist/color.wgsl-B-qDJ_OM.js +4 -0
- package/dist/{command-CatrAsrl.js → command-BsFOGZwB.js} +3 -2
- package/dist/command.css +1 -0
- package/dist/command.js +1 -1
- package/dist/component-styles.css +0 -1
- package/dist/components/_shared/axes.d.ts +7 -0
- package/dist/components/_shared/feedback/dot-ring.css +1 -1
- package/dist/components/_shared/overlay/focus-return.d.ts +9 -0
- package/dist/components/_shared/overlay/index.d.ts +3 -0
- package/dist/components/_shared/overlay/root-scroll-lock.d.ts +4 -0
- package/dist/components/_shared/overlay/sheet-width.d.ts +2 -0
- package/dist/components/_shared/shape/useBarShape.d.ts +4 -0
- package/dist/components/aurora/composables/auroraFallbackGround.d.ts +12 -0
- package/dist/components/aurora/constants/presets.d.ts +21 -0
- package/dist/components/aurora/index.d.ts +2 -2
- package/dist/components/button/styles.css +1 -1
- package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -1
- package/dist/components/dialog/DialogContent.vue.d.ts +2 -2
- package/dist/components/dialog/ModalOverlay.vue.d.ts +2 -2
- package/dist/components/dialog/ModalScrim.vue.d.ts +26 -0
- package/dist/components/dialog/styles.css +1 -1
- package/dist/components/dock/GlassDock.vue.d.ts +4 -1
- package/dist/components/dock/composables/useDockShellProps.d.ts +34 -2
- package/dist/components/dock/composables/useDockState.d.ts +5 -0
- package/dist/components/dock/index.d.ts +1 -2
- package/dist/components/dock/styles/controls/icon-button.css +1 -1
- package/dist/components/dock/styles/controls/tab-button.css +1 -1
- package/dist/components/dock/styles/morph.css +1 -1
- package/dist/components/dock/styles/run.css +1 -1
- package/dist/components/dock/styles/shell.css +1 -1
- package/dist/components/dock/trigger.d.ts +1 -0
- package/dist/components/expandable-container/ExpandableContainer.vue.d.ts +30 -29
- package/dist/components/menu/ContextMenu.vue.d.ts +27 -0
- package/dist/components/menu/DropdownMenu.vue.d.ts +5 -23
- package/dist/components/menu/context.d.ts +18 -5
- package/dist/components/menu/family-click.d.ts +2 -0
- package/dist/components/menu/family-context.d.ts +2 -0
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/sheet/SheetContent.vue.d.ts +2 -2
- package/dist/components/sortable-list/styles.css +1 -0
- package/dist/components/surface/Surface.vue.d.ts +4 -1
- package/dist/components/tabs/composables/useTabDragMorph.d.ts +4 -7
- package/dist/components/tabs/styles/segmented.css +1 -1
- package/dist/components/tabs/types.d.ts +7 -8
- package/dist/composables/glass/fieldPaint.d.ts +4 -0
- package/dist/composables/glass/useGlassBackdropLuminance.d.ts +7 -6
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +8 -0
- package/dist/composables/motion/core/motionTempo.d.ts +2 -1
- package/dist/composables/motion/morph/useDragMorph.d.ts +2 -2
- package/dist/composables/motion/morph/useSelectionGroup.d.ts +6 -25
- package/dist/composables/motion/morph/useSelectionIndicator.d.ts +8 -54
- package/dist/composables/motion/spring/useLiquidFlex.d.ts +3 -5
- package/dist/composables/motion/spring/useSpringMount.d.ts +0 -9
- package/dist/{configurator-Dl10mc3L.js → configurator-C1ZKEf1b.js} +7 -5
- package/dist/configurator.css +1 -0
- package/dist/configurator.js +1 -1
- package/dist/constants-DfrO-IaH.js +8 -0
- package/dist/constellation.css +1 -0
- package/dist/constellation.js +2 -1
- package/dist/control.css +1 -0
- package/dist/{control.css_vue_type_style_index_0_src_true_lang-BIdufaDG.js → control.css_vue_type_style_index_0_src_true_lang-D2hdtjs4.js} +1 -0
- package/dist/{createCanvasLifecycle-hJHobVTn.js → createCanvasLifecycle-DS0vEs_G.js} +76 -75
- package/dist/dark-mode-toggle.js +1 -1
- package/dist/{data-table-8y6fbyOB.js → data-table-CunuMkZ3.js} +1 -0
- package/dist/data-table.css +1 -0
- package/dist/data-table.js +1 -1
- package/dist/{deck-Cm_VmyNL.js → deck-Bc-2mEKE.js} +1 -0
- package/dist/deck.js +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dock-trigger.d.ts +1 -0
- package/dist/dock-trigger.js +88 -0
- package/dist/dock.js +685 -729
- package/dist/easing.js +4 -4
- package/dist/expandable-container-wS1awXGd.js +135 -0
- package/dist/expandable-container.css +1 -0
- package/dist/expandable-container.js +1 -1
- package/dist/{fading-scroll-ClCPooXb.js → fading-scroll-D3Y20ibL.js} +1 -1
- package/dist/fading-scroll.js +1 -1
- package/dist/fieldPaint-Ci77oajZ.js +7 -0
- package/dist/fourier-field.css +1 -0
- package/dist/fourier-field.js +15 -13
- package/dist/glSetup-DMaDgrEj.js +577 -0
- package/dist/glass-ui.js +66 -65
- package/dist/handmark.css +1 -0
- package/dist/handmark.js +82 -71
- package/dist/index.css +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/{input-eLZ_AU7l.js → input-BLF2pMHE.js} +1 -1
- package/dist/input.js +1 -1
- package/dist/{label-CE03H1KL.js → label-ryNPL7e6.js} +1 -0
- package/dist/label.css +1 -0
- package/dist/label.js +1 -1
- package/dist/labeled-field.css +1 -0
- package/dist/labeled-field.js +5 -4
- package/dist/{menu-DaYAZiVW.js → menu-C_l2Sslf.js} +162 -112
- package/dist/menu.js +3 -3
- package/dist/metric.js +1 -0
- package/dist/motion-core.js +138 -44
- package/dist/motion-lHDAQHEE.js +91 -0
- package/dist/motion.js +5 -5
- package/dist/motionTempo-DXdVbCWr.js +13 -0
- package/dist/music-staff.js +1 -0
- package/dist/{number-field-RP89046a.js → number-field-BXFUP49Z.js} +3 -2
- package/dist/number-field.css +1 -0
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.css +1 -0
- package/dist/pager-dots.js +3 -2
- package/dist/participation-C5y5VZTN.js +52 -0
- package/dist/{popover-BdpoE4Ar.js → popover-DQUmwuAa.js} +3 -2
- package/dist/popover.js +1 -1
- package/dist/{progress-eVa-mc7J.js → progress-BUn0Bw7Z.js} +1 -0
- package/dist/progress.css +1 -0
- package/dist/progress.js +1 -1
- package/dist/{radio-group-B58Bz16F.js → radio-group-xdEy2tdi.js} +1 -0
- package/dist/radio-group.css +1 -0
- package/dist/radio-group.js +1 -1
- package/dist/root-scroll-lock-DJFrQhMa.js +22 -0
- package/dist/select-Dt5dXm87.js +309 -0
- package/dist/select.js +1 -1
- package/dist/{separator-D4EZM10u.js → separator-C4y9p_ky.js} +1 -0
- package/dist/separator.css +1 -0
- package/dist/separator.js +1 -1
- package/dist/sheet-DLqNUIZl.js +347 -0
- package/dist/sheet-width-DgXgJNa5.js +18 -0
- package/dist/sheet.js +2 -2
- package/dist/{slider-Dg3Qqdyo.js → slider-B4w12E_u.js} +8 -8
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -1
- package/dist/{status-dot-W4LFiJps.js → status-dot-BDZKcRxy.js} +2 -1
- package/dist/status-dot.css +1 -0
- package/dist/status-dot.js +1 -1
- package/dist/styles/components.css +1 -1
- package/dist/styles/glass/glass-capsule.css +1 -1
- package/dist/styles/glass/glass-chip.css +1 -1
- package/dist/styles/glass/mark.css +1 -1
- package/dist/styles/glass/overlay-plate.css +1 -1
- package/dist/styles/glass/surface-axis.css +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/theme/radius.css +1 -1
- package/dist/styles/tokens/color-radius.css +1 -1
- package/dist/styles/tokens/manifest.d.ts +1 -1
- package/dist/styles/tokens/scale-paper.css +1 -1
- package/dist/styles/utilities/base-misc.css +1 -1
- package/dist/surface.js +1 -1
- package/dist/{switch-BYUZ6g9G.js → switch-DLfGYU35.js} +1 -0
- package/dist/switch.css +1 -0
- package/dist/switch.js +1 -1
- package/dist/tabs-NgTRPGZx.js +229 -0
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.css +1 -0
- package/dist/timeline.js +4 -3
- package/dist/toggle-group-DgXcJGD6.js +129 -0
- package/dist/toggle-group.css +1 -0
- package/dist/toggle-group.js +1 -1
- package/dist/tokens.js +2 -0
- package/dist/{tooltip-CZVubnJf.js → tooltip-Do3qCw0r.js} +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.css +1 -0
- package/dist/typewriter.js +1 -0
- package/dist/uniformBridge-CJyy7NOn.js +150 -0
- package/dist/useBarShape-CmP35Z8o.js +24 -0
- package/dist/{useCanvas2D-CQRElMyE.js → useCanvas2D-Bhpwua98.js} +1 -1
- package/dist/{useDockCtaReceive-BSSgD6mu.js → useDockCtaReceive-Dn_-paqP.js} +1 -1
- package/dist/{useDragMorph-B363RUbF.js → useDragMorph-BEI74U0t.js} +51 -40
- package/dist/{color.wgsl-BTszLY39.js → useGpuSubstrate-Y5XAdU8d.js} +7 -7
- package/dist/{useLiquidPress-h1scrPtP.js → useLiquidPress-D5mjZC6U.js} +2 -2
- package/dist/useScrollChrome-DMP6kDI9.js +67 -0
- package/dist/useSelectionGroup-DAQv5Lb5.js +186 -0
- package/dist/{useSpring-9u2_shxV.js → useSpring-Aof0nTRt.js} +1 -1
- package/dist/useSpringMount-jgNkymRl.js +73 -0
- package/dist/wgpuSetup-CFuqd_RP.js +1278 -0
- package/package.json +8 -1
- package/dist/DialogContent-CwIBvou_.js +0 -157
- package/dist/DropdownMenuTrigger-CKRnhDSQ.js +0 -93
- package/dist/button-BOFTUPyU.js +0 -110
- package/dist/composables/motion/morph/eyeglass.d.ts +0 -141
- package/dist/expandable-container-CZUj9BzY.js +0 -142
- package/dist/glass-ui.css +0 -2
- package/dist/motion-BvV1_24p.js +0 -61
- package/dist/motionTempo-tscp92Nm.js +0 -7
- package/dist/participation-B7UFdgXB.js +0 -55
- package/dist/select-BiF0FCZf.js +0 -292
- package/dist/sheet-DmJxgAHc.js +0 -345
- package/dist/tabs-C5sC0fBE.js +0 -269
- package/dist/toggle-group-CC5b3o1R.js +0 -125
- package/dist/useScrollChrome-BJbWV32F.js +0 -162
- package/dist/useSelectionGroup-zsEwitF6.js +0 -291
- package/dist/useSpringMount-OA-0mTNv.js +0 -73
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ Of that, only `MIGRATION.md` ships. `package.json` declares `files: ["dist", "MI
|
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
94
|
npm run dev # storybook demo (multi-page, dock + carousel navigation)
|
|
95
|
-
npm run build # library → dist/glass-ui.js +
|
|
95
|
+
npm run build # library → dist/glass-ui.js + index.d.ts + per-subpath chunks
|
|
96
96
|
npm run typecheck # vue-tsc --noEmit
|
|
97
97
|
npm run profile:bundle # inspect bundle sizes and exact value.js capability imports
|
|
98
98
|
```
|
|
@@ -168,7 +168,7 @@ Convenience classes bundle a tier with a shape: `.glass-card` (resting + `--radi
|
|
|
168
168
|
|
|
169
169
|
## Design Tokens
|
|
170
170
|
|
|
171
|
-
`src/styles/tokens/` defines the shared `:root` properties consumed by all style modules and components — duration, easing (`--spring-{smooth,snappy,bouncy,gentle}` + `--spring-<name>-duration` clocks), z-index, radius (primitive + semantic), shadows (composed via `color-mix(in srgb, var(--shadow-color) N%, transparent)`), the 5-tier glass ladder, paper/grain textures, the `--surface-tint-*` family, and the warm-chroma color palette. These are declared in a plain unlayered `:root`, which beats every layered consumer `:root`: re-declare one in an unlayered `:root` of your own, or on an element below `:root` in any layer, and every reader downstream follows; a `:root` inside `@theme` or any `@layer` loses to the package root. Font registers are the one exception and live in the theme layer — re-declare `--font-serif-math` in your own `@theme`, and rebrand `--font-text` / `--font-display` there or through `--font-stack-text` / `--font-stack-display` on an unlayered `:root` (`MIGRATION.md`, _The token-root contract_ under 10.0.0).
|
|
171
|
+
`src/styles/tokens/` defines the shared `:root` properties consumed by all style modules and components — duration, easing (`--spring-{smooth,snappy,bouncy,gentle}` + `--spring-<name>-duration` clocks), z-index, radius (primitive + semantic), shadows (composed via `color-mix(in srgb, var(--shadow-color) N%, transparent)`), the 5-tier glass ladder, paper/grain textures, the `--surface-tint-*` family, and the warm-chroma color palette. These are declared in a plain unlayered `:root`, which beats every layered consumer `:root`: re-declare one in an unlayered `:root` of your own, or on an element below `:root` in any layer, and every reader downstream follows; a `:root` inside `@theme` or any `@layer` loses to the package root. Font registers are the one exception and live in the theme layer — re-declare `--font-serif-math` in your own `@theme`, and rebrand `--font-text` / `--font-display` there or through `--font-stack-text` / `--font-stack-display` on an unlayered `:root` (`MIGRATION.md`, _The token-root contract_ under 10.0.0).
|
|
172
172
|
|
|
173
173
|
**Every other rule the package ships sits in `@layer components`**, and `./styles.css` opens with `@layer theme, base, components, utilities;` (the same order `./styles` declares), so a rule of yours — unlayered, or in `@layer utilities` — beats a library rule at any specificity. What stays outside the layer: the token roots above, the `@utility` / `@theme` / `@property` / `@font-face` / `@keyframes` at-rules, and one named exception, the slider's stylesheet. `!important` runs the other way across layers: a library `!important` beats yours unless yours sits in a layer ordered before `components`.
|
|
174
174
|
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { t as e } from "./class-names-FlXcvRRT.js";
|
|
2
|
+
import { t } from "./resolve-DdrNvBby.js";
|
|
3
|
+
import { t as n } from "./useSpringMount-jgNkymRl.js";
|
|
4
|
+
import { a as r, i, n as a } from "./motion-lHDAQHEE.js";
|
|
5
|
+
import { t as o } from "./shortcuts-DGGWNRNe.js";
|
|
6
|
+
import { t as s } from "./useMotionAxis-D-rtIhca.js";
|
|
7
|
+
import { computed as c, createBlock as l, createCommentVNode as u, createElementVNode as d, createVNode as f, defineComponent as p, mergeProps as m, openBlock as h, ref as g, renderSlot as _, unref as v, watch as y, withCtx as b } from "vue";
|
|
8
|
+
import { DialogClose as x, DialogContent as S, DialogPortal as C, DialogRoot as w, injectDialogRootContext as T, useForwardPropsEmits as E } from "reka-ui";
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/components/dialog/Dialog.vue
|
|
11
|
+
var D = /* @__PURE__ */ p({
|
|
12
|
+
__name: "Dialog",
|
|
13
|
+
props: {
|
|
14
|
+
open: { type: Boolean },
|
|
15
|
+
defaultOpen: { type: Boolean },
|
|
16
|
+
modal: { type: Boolean },
|
|
17
|
+
unmountOnHide: { type: Boolean },
|
|
18
|
+
origin: {}
|
|
19
|
+
},
|
|
20
|
+
emits: ["update:open"],
|
|
21
|
+
setup(e, { emit: t }) {
|
|
22
|
+
let n = e, r = t, i = E(c(() => {
|
|
23
|
+
let { origin: e, ...t } = n;
|
|
24
|
+
return t;
|
|
25
|
+
}), r);
|
|
26
|
+
return (e, t) => (h(), l(v(w), m({ "data-slot": "dialog" }, v(i)), {
|
|
27
|
+
default: b(() => [_(e.$slots, "default")]),
|
|
28
|
+
_: 3
|
|
29
|
+
}, 16));
|
|
30
|
+
}
|
|
31
|
+
}), O = /* @__PURE__ */ p({
|
|
32
|
+
inheritAttrs: !1,
|
|
33
|
+
__name: "DialogContent",
|
|
34
|
+
props: {
|
|
35
|
+
forceMount: { type: Boolean },
|
|
36
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
37
|
+
class: { type: [
|
|
38
|
+
Boolean,
|
|
39
|
+
null,
|
|
40
|
+
String,
|
|
41
|
+
Object,
|
|
42
|
+
Array
|
|
43
|
+
] },
|
|
44
|
+
surface: { default: "glass" },
|
|
45
|
+
motion: {},
|
|
46
|
+
scroll: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
dismiss: { default: "free" }
|
|
51
|
+
},
|
|
52
|
+
emits: [
|
|
53
|
+
"escapeKeyDown",
|
|
54
|
+
"pointerDownOutside",
|
|
55
|
+
"focusOutside",
|
|
56
|
+
"interactOutside",
|
|
57
|
+
"openAutoFocus",
|
|
58
|
+
"closeAutoFocus"
|
|
59
|
+
],
|
|
60
|
+
setup(p, { emit: w }) {
|
|
61
|
+
let D = p, O = w, k = c(() => {
|
|
62
|
+
let { class: e, surface: t, motion: n, scroll: r, dismiss: i, forceMount: a, ...o } = D;
|
|
63
|
+
return o;
|
|
64
|
+
}), A = s(() => D.motion), j = c(() => A.resolved.value !== "off"), M = T();
|
|
65
|
+
o(() => M.open.value && M.modal.value);
|
|
66
|
+
let N = n({
|
|
67
|
+
open: M.open,
|
|
68
|
+
preset: "present"
|
|
69
|
+
}), P = c(() => {
|
|
70
|
+
if (!j.value) return;
|
|
71
|
+
let e = N.position.value;
|
|
72
|
+
return {
|
|
73
|
+
transform: "none",
|
|
74
|
+
scale: String(1 - .05 * e),
|
|
75
|
+
opacity: String(1 - e),
|
|
76
|
+
transition: "none"
|
|
77
|
+
};
|
|
78
|
+
}), F = c(() => j.value ? N.present.value || M.open.value : D.forceMount), I = c(() => j.value && !M.open.value ? "" : void 0), L = c(() => j.value ? a(N.position.value) : null), R = c(() => j.value ? N.present.value || M.open.value : void 0), z = g(null), B = () => z.value?.closest("[data-slot=\"dialog-content\"]") ?? null;
|
|
79
|
+
y(() => M.open.value, (e) => {
|
|
80
|
+
if (!j.value || e !== !1) return;
|
|
81
|
+
let t = document.activeElement;
|
|
82
|
+
t && B()?.contains(t) && M.triggerElement.value?.focus({ preventScroll: !0 });
|
|
83
|
+
}, { flush: "sync" });
|
|
84
|
+
let V = r(() => M.triggerElement.value), H = g(0), U = c(() => H.value === 0 ? void 0 : H.value % 2 == 1 ? "a" : "b"), W = c(() => D.dismiss === "free");
|
|
85
|
+
function G(e) {
|
|
86
|
+
D.dismiss === "locked" && (e.preventDefault(), H.value += 1);
|
|
87
|
+
}
|
|
88
|
+
let K = E(k, O), q = c(() => ({
|
|
89
|
+
"--glass-veil-tier": "var(--glass-veil-dialog)",
|
|
90
|
+
...A.hostStyle.value ?? {},
|
|
91
|
+
...P.value ?? {}
|
|
92
|
+
})), J = c(() => e("fixed left-1/2 top-1/2 z-modal", t("floating"), D.scroll ? "max-h-[calc(100dvh-2rem)] overflow-y-auto" : "", D.class));
|
|
93
|
+
return (e, t) => (h(), l(v(C), { "force-mount": F.value }, {
|
|
94
|
+
default: b(() => [f(i, {
|
|
95
|
+
veil: "",
|
|
96
|
+
opacity: L.value,
|
|
97
|
+
"force-mount": R.value
|
|
98
|
+
}, null, 8, ["opacity", "force-mount"]), f(v(S), m({
|
|
99
|
+
...v(K),
|
|
100
|
+
...e.$attrs,
|
|
101
|
+
inert: I.value
|
|
102
|
+
}, {
|
|
103
|
+
"aria-modal": v(M).modal.value ? "true" : void 0,
|
|
104
|
+
"force-mount": F.value,
|
|
105
|
+
class: J.value,
|
|
106
|
+
style: q.value,
|
|
107
|
+
"data-surface": D.surface,
|
|
108
|
+
"data-slot": "dialog-content",
|
|
109
|
+
onCloseAutoFocus: v(V),
|
|
110
|
+
"data-dismiss": D.dismiss,
|
|
111
|
+
"data-rebuff": U.value,
|
|
112
|
+
"data-scroll": D.scroll ? "" : void 0,
|
|
113
|
+
"data-motion": v(A).dataMotion.value,
|
|
114
|
+
onEscapeKeyDown: G,
|
|
115
|
+
onPointerDownOutside: G
|
|
116
|
+
}), {
|
|
117
|
+
default: b(() => [
|
|
118
|
+
d("span", {
|
|
119
|
+
ref_key: "contentAnchorEl",
|
|
120
|
+
ref: z,
|
|
121
|
+
hidden: ""
|
|
122
|
+
}, null, 512),
|
|
123
|
+
W.value ? (h(), l(v(x), {
|
|
124
|
+
key: 0,
|
|
125
|
+
"data-slot": "dialog-close"
|
|
126
|
+
}, {
|
|
127
|
+
default: b(() => [...t[0] ||= [d("svg", {
|
|
128
|
+
class: "w-4 h-4",
|
|
129
|
+
viewBox: "0 0 24 24",
|
|
130
|
+
fill: "none",
|
|
131
|
+
stroke: "currentColor",
|
|
132
|
+
"stroke-width": "2",
|
|
133
|
+
"stroke-linecap": "round",
|
|
134
|
+
"stroke-linejoin": "round",
|
|
135
|
+
"aria-hidden": "true"
|
|
136
|
+
}, [d("path", { d: "M18 6 6 18M6 6l12 12" })], -1), d("span", { class: "sr-only" }, "Close", -1)]]),
|
|
137
|
+
_: 1
|
|
138
|
+
})) : u("", !0),
|
|
139
|
+
_(e.$slots, "default")
|
|
140
|
+
]),
|
|
141
|
+
_: 3
|
|
142
|
+
}, 16, [
|
|
143
|
+
"aria-modal",
|
|
144
|
+
"force-mount",
|
|
145
|
+
"class",
|
|
146
|
+
"style",
|
|
147
|
+
"data-surface",
|
|
148
|
+
"onCloseAutoFocus",
|
|
149
|
+
"data-dismiss",
|
|
150
|
+
"data-rebuff",
|
|
151
|
+
"data-scroll",
|
|
152
|
+
"data-motion"
|
|
153
|
+
])]),
|
|
154
|
+
_: 3
|
|
155
|
+
}, 8, ["force-mount"]));
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
//#endregion
|
|
159
|
+
export { D as n, O as t };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { t as e } from "./class-names-FlXcvRRT.js";
|
|
2
|
+
import { t } from "./primitive-B2t2jdqM.js";
|
|
3
|
+
import { computed as n, createBlock as r, defineComponent as i, inject as a, isRef as o, mergeProps as s, openBlock as c, provide as l, renderSlot as u, resolveDynamicComponent as d, unref as f, useAttrs as p, withCtx as m } from "vue";
|
|
4
|
+
import { injectDropdownMenuRootContext as h } from "reka-ui";
|
|
5
|
+
//#region src/components/menu/context.ts
|
|
6
|
+
var g = Symbol("glass-menu-family");
|
|
7
|
+
function _(e) {
|
|
8
|
+
l(g, e);
|
|
9
|
+
}
|
|
10
|
+
function v() {
|
|
11
|
+
let e = a(g, null);
|
|
12
|
+
if (!e) throw Error("Menu parts must be used within DropdownMenu or ContextMenu");
|
|
13
|
+
return e;
|
|
14
|
+
}
|
|
15
|
+
function y(e) {
|
|
16
|
+
return v().parts[e];
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/components/menu/DropdownMenuTrigger.vue
|
|
20
|
+
var b = /* @__PURE__ */ i({
|
|
21
|
+
name: "DropdownMenuTrigger",
|
|
22
|
+
inheritAttrs: !1,
|
|
23
|
+
__name: "DropdownMenuTrigger",
|
|
24
|
+
props: {
|
|
25
|
+
asChild: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
action: { default: "click" },
|
|
34
|
+
class: { type: [
|
|
35
|
+
Boolean,
|
|
36
|
+
null,
|
|
37
|
+
String,
|
|
38
|
+
Object,
|
|
39
|
+
Array
|
|
40
|
+
] }
|
|
41
|
+
},
|
|
42
|
+
setup(i) {
|
|
43
|
+
let a = i, l = p(), g = n(() => {
|
|
44
|
+
let e = t(l);
|
|
45
|
+
return a.asChild ? e : {
|
|
46
|
+
...e,
|
|
47
|
+
type: "button"
|
|
48
|
+
};
|
|
49
|
+
}), _ = v(), y = _.parts.Trigger, b = h(null), x = !1;
|
|
50
|
+
function S(e) {
|
|
51
|
+
a.action !== "pointerdown" || _.trigger !== "click" || !b || a.disabled || e.button !== 0 || e.ctrlKey || (x = !0, b.onOpenToggle(), b.open.value && e.preventDefault());
|
|
52
|
+
}
|
|
53
|
+
function C(e) {
|
|
54
|
+
x && (x = !1, e.detail !== 0 && (e.preventDefault(), e.stopImmediatePropagation()));
|
|
55
|
+
}
|
|
56
|
+
return (t, n) => (c(), r(d(f(y)), s(g.value, {
|
|
57
|
+
as: "button",
|
|
58
|
+
"as-child": i.asChild,
|
|
59
|
+
disabled: i.disabled,
|
|
60
|
+
class: f(e)("menu__trigger", a.class),
|
|
61
|
+
"data-slot": "menu-trigger",
|
|
62
|
+
onPointerdownCapture: S,
|
|
63
|
+
onPointercancelCapture: n[0] ||= (e) => o(x) ? x.value = !1 : x = !1,
|
|
64
|
+
onClickCapture: C
|
|
65
|
+
}), {
|
|
66
|
+
default: m(() => [u(t.$slots, "default")]),
|
|
67
|
+
_: 3
|
|
68
|
+
}, 16, [
|
|
69
|
+
"as-child",
|
|
70
|
+
"disabled",
|
|
71
|
+
"class"
|
|
72
|
+
]));
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
//#endregion
|
|
76
|
+
export { y as i, _ as n, v as r, b as t };
|
|
@@ -14,6 +14,7 @@ var f = /* @__PURE__ */ i({
|
|
|
14
14
|
type: Boolean,
|
|
15
15
|
default: !1
|
|
16
16
|
},
|
|
17
|
+
backdropMode: { default: "live" },
|
|
17
18
|
class: { type: [
|
|
18
19
|
Boolean,
|
|
19
20
|
null,
|
|
@@ -32,6 +33,7 @@ var f = /* @__PURE__ */ i({
|
|
|
32
33
|
as: i.as,
|
|
33
34
|
"data-slot": c(p)["data-slot"] ?? "surface",
|
|
34
35
|
"data-surface": i.surface,
|
|
36
|
+
"data-backdrop-mode": i.backdropMode === "static" ? "static" : void 0,
|
|
35
37
|
class: c(e)(c(t)(i.tier, i.deep), f.class)
|
|
36
38
|
}), {
|
|
37
39
|
default: u(() => [s(n.$slots, "default")]),
|
|
@@ -40,6 +42,7 @@ var f = /* @__PURE__ */ i({
|
|
|
40
42
|
"as",
|
|
41
43
|
"data-slot",
|
|
42
44
|
"data-surface",
|
|
45
|
+
"data-backdrop-mode",
|
|
43
46
|
"class"
|
|
44
47
|
]));
|
|
45
48
|
}
|
package/dist/aurora.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer theme, base, components, utilities;@layer components{.aurora-root[data-v-1dfb5751]{opacity:var(--aurora-ceiling-a11y,var(--aurora-ceiling,1));contain:content;content-visibility:auto;contain-intrinsic-size:auto 600px;display:grid}.aurora-root>.aurora-placeholder[data-v-1dfb5751],.aurora-root>.aurora-canvas-layer[data-v-1dfb5751]{grid-area:1/1}.aurora-root>.aurora-placeholder[data-v-1dfb5751]{image-rendering:auto;background-position:50%;background-repeat:no-repeat;background-size:cover}.aurora-placeholder[data-v-1dfb5751]{background-image:var(--aurora-ground-image,none);background-color:var(--aurora-ground-color,transparent)}.aurora-placeholder[data-aurora-ground-active][data-v-1dfb5751]{z-index:1}.aurora-placeholder[data-aurora-ground-fade][data-v-1dfb5751]{animation:aurora-ground-in-1dfb5751 var(--duration-fast) var(--ease-standard) both}@keyframes aurora-ground-in-1dfb5751{0%{opacity:0}}.aurora-canvas-layer[data-v-1dfb5751]{z-index:2;opacity:0;transition:opacity var(--duration-slow) var(--ease-standard);isolation:isolate}.aurora-canvas-layer--armed[data-v-1dfb5751]{opacity:1}@media (prefers-reduced-motion:reduce){.aurora-canvas-layer[data-v-1dfb5751]{transition-duration:1ms}.aurora-placeholder[data-aurora-ground-fade][data-v-1dfb5751]{animation:none}}@media (prefers-reduced-transparency:reduce){.aurora-root[data-v-1dfb5751]{--aurora-ceiling-a11y:1}}@media (forced-colors:active){.aurora-root>.aurora-canvas-layer[data-v-1dfb5751]{display:none}.aurora-placeholder[data-v-1dfb5751]{background-color:canvas;background-image:none}}}
|