@nxgt/material-vue 0.42.0 → 0.43.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/CHANGELOG.md +117 -0
- package/README.md +18 -5
- package/dist/{Button-CWmzvv9p.js → Button-CEvi_i4g.js} +4 -4
- package/dist/{HoverCardTrigger-C5AbAyHE.js → HoverCardTrigger-B7m5Zvj1.js} +69 -62
- package/dist/backgrounds/backgrounds.css +8 -0
- package/dist/backgrounds/css/base.css +169 -0
- package/dist/backgrounds/css/gradient.css +53 -0
- package/dist/backgrounds/css/grain.css +19 -0
- package/dist/backgrounds/css/motion.css +30 -0
- package/dist/backgrounds.js +111 -0
- package/dist/{camera-C-9slBUV.js → camera-DP3Qfhhc.js} +4 -4
- package/dist/{chunk-7M6MHVWA-wgE1MsQ9.js → chunk-7M6MHVWA-DzYWbKT9.js} +1 -1
- package/dist/{chunk-GNY47TPC-BByCj-tp.js → chunk-GNY47TPC-D4sl5ZSh.js} +1 -1
- package/dist/{classDiagram-v2-NBCMYWYE-LDc3yyTu.js → classDiagram-v2-NBCMYWYE-BtmPeDVI.js} +1 -1
- package/dist/components/base.css +5 -2
- package/dist/components/components.css +5 -0
- package/dist/components/theme-tokens.css +21 -0
- package/dist/{components-DX4EycMi.js → components-zm5JC2dA.js} +14077 -13577
- package/dist/components.js +8 -8
- package/dist/composables.js +3 -3
- package/dist/{dagre-6A5THRUB-CCigPI-W.js → dagre-6A5THRUB-CmmqjQ01.js} +1 -1
- package/dist/{diagram-22UHCM2B-vav-BOss.js → diagram-22UHCM2B-BYL1soMk.js} +1 -1
- package/dist/dnd.js +1 -1
- package/dist/{erDiagram-OPXOYQCR-BV3UGLoQ.js → erDiagram-OPXOYQCR-DhNOupcl.js} +1 -1
- package/dist/{flowDiagram-KWPJA3E3-B3AfwLQk.js → flowDiagram-KWPJA3E3-_S6NO9vf.js} +2 -2
- package/dist/{form-scope-CN68PTXc.js → form-scope-XQGlh8m3.js} +1 -1
- package/dist/{i18n-provider-DmZSTBnp.js → i18n-provider-tL27-a8y.js} +1 -1
- package/dist/i18n.js +26 -9
- package/dist/{icon-button-DErh1aJS.js → icon-button-BNA3fXM2.js} +4 -4
- package/dist/lib/backgrounds/background/background.vue.d.ts +22 -0
- package/dist/lib/backgrounds/background/index.d.ts +2 -0
- package/dist/lib/backgrounds/background/partials/background-layers.vue.d.ts +9 -0
- package/dist/lib/backgrounds/background/partials/scene-svg.d.ts +10 -0
- package/dist/lib/backgrounds/background/types.d.ts +24 -0
- package/dist/lib/backgrounds/index.d.ts +13 -0
- package/dist/lib/components/ui/actions/button/button-tones.d.ts +3 -3
- package/dist/lib/components/ui/actions/responsive-button/responsive-button.vue.d.ts +3 -3
- package/dist/lib/components/ui/collections/data-table/data-table-context.d.ts +4 -0
- package/dist/lib/components/ui/collections/data-table/data-table.vue.d.ts +8 -0
- package/dist/lib/components/ui/collections/data-table/partials/data-table-body.vue.d.ts +8 -0
- package/dist/lib/components/ui/collections/data-table/partials/data-table-empty.vue.d.ts +5 -1
- package/dist/lib/components/ui/collections/data-table/partials/data-table-toolbar.d.ts +16 -3
- package/dist/lib/components/ui/collections/data-table/select-checkbox.d.ts +36 -0
- package/dist/lib/components/ui/collections/data-table/types.d.ts +15 -0
- package/dist/lib/components/ui/collections/data-table/use-data-table.d.ts +2 -0
- package/dist/lib/components/ui/feedback/circular-progress/circular-progress.vue.d.ts +1 -1
- package/dist/lib/components/ui/feedback/empty-state/empty-state.vue.d.ts +21 -8
- package/dist/lib/components/ui/feedback/empty-state/index.d.ts +1 -1
- package/dist/lib/components/ui/feedback/error-state/error-state.vue.d.ts +54 -0
- package/dist/lib/components/ui/feedback/error-state/index.d.ts +3 -0
- package/dist/lib/components/ui/feedback/error-state/partials/error-state-details.vue.d.ts +7 -0
- package/dist/lib/components/ui/feedback/index.d.ts +1 -0
- package/dist/lib/components/ui/feedback/state-frame/state-frame.vue.d.ts +36 -0
- package/dist/lib/components/ui/feedback/state-frame/state-icon.vue.d.ts +7 -0
- package/dist/lib/components/ui/feedback/state-frame/state-illustration.vue.d.ts +8 -0
- package/dist/lib/components/ui/feedback/state-frame/state-tones.d.ts +11 -0
- package/dist/lib/components/ui/fields/contacts/consts.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/use-truncated-title.d.ts +10 -0
- package/dist/lib/components/ui/layout/background/background.vue.d.ts +18 -3
- package/dist/lib/components/ui/layout/doc/partials/doc-empty.vue.d.ts +7 -4
- package/dist/lib/components/ui/media/stx-player/stx-player-viewport.vue.d.ts +2 -2
- package/dist/lib/components/ui/overlays/command/CommandSeparator.vue.d.ts +3 -1
- package/dist/lib/components/ui/overlays/dialog/in-dialog.d.ts +1 -1
- package/dist/lib/components/ui/overlays/dialog/use-escape-forward.d.ts +13 -0
- package/dist/lib/components/ui/overlays/dialog/use-modal-content.d.ts +2 -0
- package/dist/lib/components/ui/primitives/nonce-provider/nonce-provider.vue.d.ts +4 -1
- package/dist/lib/components/ui/selection/autocomplete/autocomplete-keyboard.d.ts +22 -4
- package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-box.vue.d.ts +6 -2
- package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-list.vue.d.ts +7 -0
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-active.d.ts +17 -0
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-keydown.d.ts +21 -0
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-open.d.ts +3 -3
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete.d.ts +2 -1
- package/dist/lib/components/ui/selection/autocomplete/use-drawer-room.d.ts +11 -0
- package/dist/lib/components/ui/selection/autocomplete/use-query-change.d.ts +8 -0
- package/dist/lib/components/ui/widgets/charts/chart-container.vue.d.ts +2 -2
- package/dist/lib/components/ui/widgets/kanban/partials/kanban-empty.vue.d.ts +1 -0
- package/dist/lib/composables/use-background-activity.d.ts +8 -0
- package/dist/lib/i18n/resources/en/en.d.ts +24 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +25 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +24 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +25 -1
- package/dist/lib/i18n/resources/resources.d.ts +48 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/lib/index.d.ts +1 -0
- package/dist/lib/lib/is-production.d.ts +11 -0
- package/dist/lib/nuxt/component-names.d.ts +1 -1
- package/dist/lib/nuxt/module.d.ts +2 -11
- package/dist/lib/nuxt/pdf-fonts.d.ts +1 -1
- package/dist/lib/nuxt/plugin-options.d.ts +58 -0
- package/dist/lib/vite/index.d.ts +4 -8
- package/dist/lib.js +52 -51
- package/dist/main.js +17 -17
- package/dist/map.js +4 -4
- package/dist/material-vue.css +1 -1
- package/dist/{merge-BzRhCAF6.js → merge-CUkhQBjf.js} +1 -1
- package/dist/{mermaid.core-B2ydTQ4X.js → mermaid.core-B70hvAGW.js} +11 -11
- package/dist/{mindmap-definition-NLK3R4M7-DCb99I7s.js → mindmap-definition-NLK3R4M7-B59LL3gV.js} +1 -1
- package/dist/{pdf-outline-sidebar-BU4o_hBI.js → pdf-outline-sidebar-ChDcGkbS.js} +2 -2
- package/dist/{pdf-page-anNe78Lc.js → pdf-page-DFvf3lsq.js} +1 -1
- package/dist/{pdf-page-list-CSY76HH6.js → pdf-page-list-K-ncOHkY.js} +2 -2
- package/dist/{pdf-reader-BhZNrW7R.js → pdf-reader-BPq6yCdy.js} +15 -15
- package/dist/{pdf-sidebar-DcIpG7eh.js → pdf-sidebar-divDHLe7.js} +3 -3
- package/dist/{pdf-thumbnail-sidebar-CUC0V4if.js → pdf-thumbnail-sidebar-C8XMXCq0.js} +4 -4
- package/dist/{pdf-toolbar-C373S-ul.js → pdf-toolbar-DQdedyLO.js} +4 -4
- package/dist/pdf.js +2 -2
- package/dist/{print-format.utils-C81c0weJ.js → print-format.utils-DutRk52h.js} +2 -2
- package/dist/{requirementDiagram-PLB6GJNP-DnkvMOW6.js → requirementDiagram-PLB6GJNP-BvzdTtRf.js} +1 -1
- package/dist/{sortable-provider-CL2UGGn8.js → sortable-provider-CwnKfRFb.js} +2 -2
- package/dist/{stateDiagram-v2-GCMORJYK-BCh7NZQn.js → stateDiagram-v2-GCMORJYK-VPagBr-W.js} +1 -1
- package/dist/{stored-language-Wtcj2HsU.js → stored-language-DVP9KzRu.js} +50 -2
- package/dist/{stx-player-CMmM3F5Z.js → stx-player-NiBlUGm4.js} +12 -12
- package/dist/styles.css +4 -0
- package/dist/{swimlanesDiagram-TC7HE7FX-D4-k5-iq.js → swimlanesDiagram-TC7HE7FX-BA-757S-.js} +2 -2
- package/dist/{translator-D5Dp-dob.js → translator-Dpfm1mAC.js} +171 -159
- package/dist/use-background-activity-DdTBbNpX.js +17 -0
- package/dist/{use-heading-spy-BIBHtUXN.js → use-heading-spy-jn8f2ioE.js} +13 -13
- package/dist/{use-material-translation-COoBTGpB.js → use-material-translation-CHacJbhU.js} +3 -3
- package/dist/{usecaseDiagram-POWQR4AR-Bi5we59l.js → usecaseDiagram-POWQR4AR-1f4iixDN.js} +1 -1
- package/dist/vite.js +7 -2
- package/docs/README.md +3 -0
- package/docs/components/buttons-and-actions.md +2 -0
- package/docs/components/data-table-filter-and-lists.md +59 -8
- package/docs/components/feedback-and-status.md +79 -8
- package/docs/components/media-and-files.md +2 -0
- package/docs/components/navigation-and-layout.md +13 -5
- package/docs/components/overlays-and-menus.md +20 -3
- package/docs/components/primitives.md +5 -3
- package/docs/components/rich-widgets.md +1 -1
- package/docs/components/selection-and-choice.md +14 -4
- package/docs/getting-started.md +22 -3
- package/docs/guides/app-shell.md +1 -1
- package/docs/guides/backgrounds.md +143 -0
- package/docs/guides/csp.md +48 -6
- package/docs/guides/helpers.md +1 -0
- package/docs/guides/i18n.md +51 -1
- package/docs/guides/migrate-to-vite-plugin.md +259 -0
- package/docs/guides/pdf.md +11 -4
- package/docs/guides/ssr.md +1 -1
- package/docs/guides/theming.md +52 -4
- package/docs/guides/vite-plugin.md +194 -0
- package/docs/previews/backgrounds-matrix.webp +0 -0
- package/docs/previews/feedback-status-emptystate.webp +0 -0
- package/docs/previews/feedback-status-errorstate.webp +0 -0
- package/docs/roadmap.md +60 -32
- package/docs/troubleshooting.md +251 -7
- package/lib/backgrounds/backgrounds.css +8 -0
- package/lib/backgrounds/css/base.css +169 -0
- package/lib/backgrounds/css/gradient.css +53 -0
- package/lib/backgrounds/css/grain.css +19 -0
- package/lib/backgrounds/css/motion.css +30 -0
- package/lib/components/base.css +5 -2
- package/lib/components/components.css +5 -0
- package/lib/components/theme-tokens.css +21 -0
- package/lib/nuxt/component-names.ts +1 -0
- package/lib/nuxt/module.ts +29 -15
- package/lib/nuxt/pdf-fonts.ts +1 -1
- package/lib/nuxt/plugin-options.ts +92 -0
- package/lib/nuxt/runtime/inter.css +6 -0
- package/lib/styles.css +4 -0
- package/lib/vite/index.ts +19 -2
- package/package.json +24 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as e } from "./utils-CykWQ0iJ.js";
|
|
2
|
-
import { t } from "./use-material-translation-
|
|
3
|
-
import { t as n } from "./Button-
|
|
2
|
+
import { t } from "./use-material-translation-CHacJbhU.js";
|
|
3
|
+
import { t as n } from "./Button-CEvi_i4g.js";
|
|
4
4
|
import { r, t as i } from "./in-dialog-Blhwwbyb.js";
|
|
5
5
|
import { t as a } from "./field-name-attribute-Bl7LSVK0.js";
|
|
6
6
|
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, getCurrentInstance as m, guardReactiveProps as h, isRef as g, mergeProps as _, normalizeClass as v, normalizeProps as y, onMounted as ee, onUpdated as b, openBlock as x, renderSlot as S, toDisplayString as C, unref as w, useAttrs as T, useId as E, useTemplateRef as D, vModelText as O, withCtx as k, withDirectives as A } from "vue";
|
|
7
7
|
import { X as j } from "@lucide/vue";
|
|
8
|
-
import { DialogClose as M, DialogContent as te, DialogDescription as ne, DialogOverlay as re, DialogPortal as ie, DialogRoot as ae, DialogTitle as oe, DialogTrigger as se, HoverCardContent as
|
|
9
|
-
import { defaultDocument as
|
|
10
|
-
import { forwardEscape as
|
|
11
|
-
import { describedBy as
|
|
12
|
-
import { layerOf as
|
|
8
|
+
import { DialogClose as M, DialogContent as te, DialogDescription as ne, DialogOverlay as re, DialogPortal as ie, DialogRoot as ae, DialogTitle as oe, DialogTrigger as se, HoverCardContent as ce, HoverCardPortal as N, HoverCardRoot as P, HoverCardTrigger as F, Label as I, injectDialogRootContext as L, useForwardProps as R, useForwardPropsEmits as z } from "reka-ui";
|
|
9
|
+
import { defaultDocument as B, reactiveOmit as V, tryOnScopeDispose as H, unrefElement as U, useEventListener as W, useVModel as G } from "@vueuse/core";
|
|
10
|
+
import { forwardEscape as le, keepListEscape as ue } from "@nxgt/material-core/escape-forward";
|
|
11
|
+
import { describedBy as de } from "@nxgt/material-core/described-by";
|
|
12
|
+
import { layerOf as K, openerOf as fe } from "@nxgt/material-core/field-blur-layers";
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region lib/components/ui/primitives/helper-text/helper-text.vue
|
|
15
|
-
var
|
|
15
|
+
var q = /* @__PURE__ */ p({
|
|
16
16
|
__name: "helper-text",
|
|
17
17
|
props: {
|
|
18
18
|
error: { type: Boolean },
|
|
@@ -32,12 +32,12 @@ var J = /* @__PURE__ */ p({
|
|
|
32
32
|
class: v(w(e)("overflow-auto text-[10px] text-muted-foreground flex pl-0.5 truncate text-wrap", { "text-error-text": t.error }, n.class))
|
|
33
33
|
}, [S(r.$slots, "default")], 2));
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
35
|
+
}), pe = {
|
|
36
36
|
key: 0,
|
|
37
37
|
"data-slot": "label-text",
|
|
38
38
|
"data-required": "",
|
|
39
39
|
class: "inline-flex"
|
|
40
|
-
},
|
|
40
|
+
}, J = /* @__PURE__ */ p({
|
|
41
41
|
__name: "Label",
|
|
42
42
|
props: {
|
|
43
43
|
for: {},
|
|
@@ -53,9 +53,9 @@ var J = /* @__PURE__ */ p({
|
|
|
53
53
|
withAsterisk: { type: Boolean }
|
|
54
54
|
},
|
|
55
55
|
setup(t) {
|
|
56
|
-
let n = t, r =
|
|
57
|
-
return (i, a) => (x(), s(w(
|
|
58
|
-
default: k(() => [t.withAsterisk ? (x(), l("span",
|
|
56
|
+
let n = t, r = V(n, "class", "withAsterisk");
|
|
57
|
+
return (i, a) => (x(), s(w(I), _({ "data-slot": "label" }, w(r), { class: w(e)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", n.class) }), {
|
|
58
|
+
default: k(() => [t.withAsterisk ? (x(), l("span", pe, [S(i.$slots, "default"), a[0] ||= u("svg", {
|
|
59
59
|
"data-slot": "label-required-mark",
|
|
60
60
|
"aria-hidden": "true",
|
|
61
61
|
focusable: "false",
|
|
@@ -71,10 +71,16 @@ var J = /* @__PURE__ */ p({
|
|
|
71
71
|
});
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region lib/components/ui/overlays/dialog/use-escape-forward.ts
|
|
74
|
-
function
|
|
74
|
+
function me(e) {
|
|
75
|
+
ue(e);
|
|
76
|
+
}
|
|
77
|
+
function Y(e) {
|
|
78
|
+
return _({ onEscapeKeyDown: me }, e);
|
|
79
|
+
}
|
|
80
|
+
function he(e = D("content")) {
|
|
75
81
|
return (t) => {
|
|
76
|
-
let n =
|
|
77
|
-
|
|
82
|
+
let n = U(e);
|
|
83
|
+
le(n instanceof HTMLElement ? n : null, t);
|
|
78
84
|
};
|
|
79
85
|
}
|
|
80
86
|
//#endregion
|
|
@@ -82,22 +88,23 @@ function fe(e = D("content")) {
|
|
|
82
88
|
function X(e) {
|
|
83
89
|
let t = e;
|
|
84
90
|
if (!t) {
|
|
85
|
-
let e =
|
|
91
|
+
let e = L();
|
|
86
92
|
t = () => e.modal.value && e.open.value;
|
|
87
93
|
}
|
|
88
94
|
let n = D("content");
|
|
89
95
|
return r(n, t), {
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
withListEscape: Y,
|
|
97
|
+
onEscapeKeyDown: he(n),
|
|
98
|
+
keepToaster: ge
|
|
92
99
|
};
|
|
93
100
|
}
|
|
94
|
-
function
|
|
101
|
+
function ge(e) {
|
|
95
102
|
let t = e.target;
|
|
96
103
|
t instanceof Element && t.closest("[data-sonner-toaster]") && e.preventDefault();
|
|
97
104
|
}
|
|
98
105
|
//#endregion
|
|
99
106
|
//#region lib/components/ui/overlays/dialog/Dialog.vue
|
|
100
|
-
var
|
|
107
|
+
var _e = /* @__PURE__ */ p({
|
|
101
108
|
__name: "Dialog",
|
|
102
109
|
props: {
|
|
103
110
|
open: { type: Boolean },
|
|
@@ -107,7 +114,7 @@ var me = /* @__PURE__ */ p({
|
|
|
107
114
|
},
|
|
108
115
|
emits: ["update:open"],
|
|
109
116
|
setup(e, { emit: t }) {
|
|
110
|
-
let n =
|
|
117
|
+
let n = z(e, t);
|
|
111
118
|
return (e, t) => (x(), s(w(ae), _({ "data-slot": "dialog" }, w(n)), {
|
|
112
119
|
default: k((t) => [S(e.$slots, "default", y(h(t)))]),
|
|
113
120
|
_: 3
|
|
@@ -128,13 +135,13 @@ var me = /* @__PURE__ */ p({
|
|
|
128
135
|
] }
|
|
129
136
|
},
|
|
130
137
|
setup(t) {
|
|
131
|
-
let n = t, r =
|
|
138
|
+
let n = t, r = V(n, "class");
|
|
132
139
|
return (t, i) => (x(), s(w(re), _({ "data-slot": "dialog-overlay" }, w(r), { class: w(e)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80", n.class) }), {
|
|
133
140
|
default: k(() => [S(t.$slots, "default")]),
|
|
134
141
|
_: 3
|
|
135
142
|
}, 16, ["class"]));
|
|
136
143
|
}
|
|
137
|
-
}),
|
|
144
|
+
}), ve = { class: "sr-only" }, ye = /* @__PURE__ */ p({
|
|
138
145
|
inheritAttrs: !1,
|
|
139
146
|
__name: "DialogContent",
|
|
140
147
|
props: {
|
|
@@ -163,17 +170,17 @@ var me = /* @__PURE__ */ p({
|
|
|
163
170
|
"closeAutoFocus"
|
|
164
171
|
],
|
|
165
172
|
setup(n, { emit: r }) {
|
|
166
|
-
let a = n, o = r, l =
|
|
173
|
+
let a = n, o = r, l = z(V(a, "class"), o), d = X();
|
|
167
174
|
i(!0);
|
|
168
175
|
let { t: p } = t();
|
|
169
176
|
return (t, r) => (x(), s(w(ie), null, {
|
|
170
177
|
default: k(() => [f(Z), f(w(te), _({
|
|
171
178
|
ref: "content",
|
|
172
179
|
"data-slot": "dialog-content"
|
|
173
|
-
}, {
|
|
180
|
+
}, w(d).withListEscape({
|
|
174
181
|
...t.$attrs,
|
|
175
182
|
...w(l)
|
|
176
|
-
}, {
|
|
183
|
+
}), {
|
|
177
184
|
onEscapeKeyDown: w(d).onEscapeKeyDown,
|
|
178
185
|
onPointerDownOutside: w(d).keepToaster,
|
|
179
186
|
onFocusOutside: w(d).keepToaster,
|
|
@@ -185,7 +192,7 @@ var me = /* @__PURE__ */ p({
|
|
|
185
192
|
"data-slot": "dialog-close",
|
|
186
193
|
class: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
187
194
|
}, {
|
|
188
|
-
default: k(() => [f(w(j)), u("span",
|
|
195
|
+
default: k(() => [f(w(j)), u("span", ve, C(w(p)("material.buttons.close", "Close")), 1)]),
|
|
189
196
|
_: 1
|
|
190
197
|
})) : c("", !0)]),
|
|
191
198
|
_: 3
|
|
@@ -199,7 +206,7 @@ var me = /* @__PURE__ */ p({
|
|
|
199
206
|
_: 3
|
|
200
207
|
}));
|
|
201
208
|
}
|
|
202
|
-
}),
|
|
209
|
+
}), be = /* @__PURE__ */ p({
|
|
203
210
|
__name: "DialogDescription",
|
|
204
211
|
props: {
|
|
205
212
|
asChild: { type: Boolean },
|
|
@@ -213,13 +220,13 @@ var me = /* @__PURE__ */ p({
|
|
|
213
220
|
] }
|
|
214
221
|
},
|
|
215
222
|
setup(t) {
|
|
216
|
-
let n = t, r =
|
|
223
|
+
let n = t, r = R(V(n, "class"));
|
|
217
224
|
return (t, i) => (x(), s(w(ne), _({ "data-slot": "dialog-description" }, w(r), { class: w(e)("text-muted-foreground text-sm", n.class) }), {
|
|
218
225
|
default: k(() => [S(t.$slots, "default")]),
|
|
219
226
|
_: 3
|
|
220
227
|
}, 16, ["class"]));
|
|
221
228
|
}
|
|
222
|
-
}),
|
|
229
|
+
}), xe = /* @__PURE__ */ p({
|
|
223
230
|
__name: "DialogFooter",
|
|
224
231
|
props: {
|
|
225
232
|
class: { type: [
|
|
@@ -250,7 +257,7 @@ var me = /* @__PURE__ */ p({
|
|
|
250
257
|
_: 1
|
|
251
258
|
})) : c("", !0)], 2));
|
|
252
259
|
}
|
|
253
|
-
}),
|
|
260
|
+
}), Q = /* @__PURE__ */ p({
|
|
254
261
|
__name: "DialogTitle",
|
|
255
262
|
props: {
|
|
256
263
|
asChild: { type: Boolean },
|
|
@@ -264,13 +271,13 @@ var me = /* @__PURE__ */ p({
|
|
|
264
271
|
] }
|
|
265
272
|
},
|
|
266
273
|
setup(t) {
|
|
267
|
-
let n = t, r =
|
|
274
|
+
let n = t, r = R(V(n, "class"));
|
|
268
275
|
return (t, i) => (x(), s(w(oe), _({ "data-slot": "dialog-title" }, w(r), { class: w(e)("text-lg leading-none font-semibold", n.class) }), {
|
|
269
276
|
default: k(() => [S(t.$slots, "default")]),
|
|
270
277
|
_: 3
|
|
271
278
|
}, 16, ["class"]));
|
|
272
279
|
}
|
|
273
|
-
}),
|
|
280
|
+
}), Se = /* @__PURE__ */ p({
|
|
274
281
|
__name: "DialogTrigger",
|
|
275
282
|
props: {
|
|
276
283
|
asChild: { type: Boolean },
|
|
@@ -283,7 +290,7 @@ var me = /* @__PURE__ */ p({
|
|
|
283
290
|
_: 3
|
|
284
291
|
}, 16));
|
|
285
292
|
}
|
|
286
|
-
}),
|
|
293
|
+
}), Ce = ["data-slot"], $ = /* @__PURE__ */ p({
|
|
287
294
|
__name: "Input",
|
|
288
295
|
props: {
|
|
289
296
|
defaultValue: {},
|
|
@@ -298,7 +305,7 @@ var me = /* @__PURE__ */ p({
|
|
|
298
305
|
},
|
|
299
306
|
emits: ["update:modelValue"],
|
|
300
307
|
setup(t, { emit: n }) {
|
|
301
|
-
let r = t, i =
|
|
308
|
+
let r = t, i = G(r, "modelValue", n, {
|
|
302
309
|
passive: !0,
|
|
303
310
|
defaultValue: r.defaultValue
|
|
304
311
|
});
|
|
@@ -306,9 +313,9 @@ var me = /* @__PURE__ */ p({
|
|
|
306
313
|
"onUpdate:modelValue": n[0] ||= (e) => g(i) ? i.value = e : null,
|
|
307
314
|
"data-slot": t.$attrs["data-slot"] ?? "input",
|
|
308
315
|
class: v(w(e)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", r.class))
|
|
309
|
-
}, null, 10,
|
|
316
|
+
}, null, 10, Ce)), [[O, w(i)]]);
|
|
310
317
|
}
|
|
311
|
-
}),
|
|
318
|
+
}), we = /* @__PURE__ */ p({
|
|
312
319
|
inheritAttrs: !1,
|
|
313
320
|
__name: "text-field",
|
|
314
321
|
props: {
|
|
@@ -332,12 +339,12 @@ var me = /* @__PURE__ */ p({
|
|
|
332
339
|
},
|
|
333
340
|
emits: ["update:modelValue"],
|
|
334
341
|
setup(t, { emit: n }) {
|
|
335
|
-
let r = t, i = n, a = E(), p = () => r.id ?? a, m = T(), h = E(), g = o(() =>
|
|
342
|
+
let r = t, i = n, a = E(), p = () => r.id ?? a, m = T(), h = E(), g = o(() => de(m["aria-describedby"], !!r.helperText && h));
|
|
336
343
|
return (n, a) => (x(), l("div", {
|
|
337
344
|
"data-slot": "text-field",
|
|
338
345
|
class: v(w(e)("grid w-full gap-1.5", r.class))
|
|
339
346
|
}, [
|
|
340
|
-
t.label ? (x(), s(
|
|
347
|
+
t.label ? (x(), s(J, {
|
|
341
348
|
key: 0,
|
|
342
349
|
"with-asterisk": t.required,
|
|
343
350
|
for: p()
|
|
@@ -350,7 +357,7 @@ var me = /* @__PURE__ */ p({
|
|
|
350
357
|
"*:last:size-8 *:last:absolute *:last:top-[calc(50%-16px)] *:last:right-1.5 [&_input]:pr-10 *:last:bg-muted/80 *:last:text-muted-foreground": !!n.$slots.trailing
|
|
351
358
|
})) }, [
|
|
352
359
|
S(n.$slots, "leading"),
|
|
353
|
-
f(
|
|
360
|
+
f($, _({ id: p() }, n.$attrs, {
|
|
354
361
|
name: t.name,
|
|
355
362
|
type: t.type,
|
|
356
363
|
placeholder: t.placeholder,
|
|
@@ -374,7 +381,7 @@ var me = /* @__PURE__ */ p({
|
|
|
374
381
|
]),
|
|
375
382
|
S(n.$slots, "trailing")
|
|
376
383
|
], 2),
|
|
377
|
-
t.helperText ? (x(), s(
|
|
384
|
+
t.helperText ? (x(), s(q, {
|
|
378
385
|
key: 1,
|
|
379
386
|
id: w(h),
|
|
380
387
|
error: t.error
|
|
@@ -387,13 +394,13 @@ var me = /* @__PURE__ */ p({
|
|
|
387
394
|
});
|
|
388
395
|
//#endregion
|
|
389
396
|
//#region lib/components/ui/forms/use-field-blur.ts
|
|
390
|
-
function
|
|
397
|
+
function Te(e) {
|
|
391
398
|
return e ? e instanceof Element ? e : e instanceof CharacterData ? e.nextElementSibling : null : null;
|
|
392
399
|
}
|
|
393
|
-
function
|
|
400
|
+
function Ee(e, t = "root") {
|
|
394
401
|
let n = D(t), r = !1, i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s, c = () => {
|
|
395
402
|
let e = n.value;
|
|
396
|
-
return
|
|
403
|
+
return Te(e instanceof Node ? e : e?.$el);
|
|
397
404
|
};
|
|
398
405
|
function l(t) {
|
|
399
406
|
r = !1, e(t, !0);
|
|
@@ -405,23 +412,23 @@ function $(e, t = "root") {
|
|
|
405
412
|
r || (i = new Set(t.ownerDocument.body.childNodes), o = /* @__PURE__ */ new Set()), r = !0;
|
|
406
413
|
return;
|
|
407
414
|
}
|
|
408
|
-
r && d(t,
|
|
415
|
+
r && d(t, K(n)) && l(e);
|
|
409
416
|
}
|
|
410
417
|
}
|
|
411
418
|
function d(e, t) {
|
|
412
|
-
if (t ===
|
|
419
|
+
if (t === K(e)) return !0;
|
|
413
420
|
if (!t || o.has(t)) return !1;
|
|
414
|
-
let n =
|
|
421
|
+
let n = fe([e], {
|
|
415
422
|
before: i,
|
|
416
|
-
home: /* @__PURE__ */ new Set([
|
|
423
|
+
home: /* @__PURE__ */ new Set([K(e)]),
|
|
417
424
|
opened: o
|
|
418
425
|
}, t);
|
|
419
426
|
return n === "theirs" || !n && i.has(t) ? !0 : (o.add(t), !1);
|
|
420
427
|
}
|
|
421
428
|
function f(e) {
|
|
422
429
|
!r || e.relatedTarget || (clearTimeout(s), s = setTimeout(() => {
|
|
423
|
-
let t =
|
|
424
|
-
r && (!t || t ===
|
|
430
|
+
let t = B?.activeElement;
|
|
431
|
+
r && (!t || t === B?.body) && l(e);
|
|
425
432
|
}));
|
|
426
433
|
}
|
|
427
434
|
let p = m(), h = () => {
|
|
@@ -433,11 +440,11 @@ function $(e, t = "root") {
|
|
|
433
440
|
capture: !0,
|
|
434
441
|
passive: !0
|
|
435
442
|
};
|
|
436
|
-
|
|
443
|
+
W(B, "focusin", u, g), W(B, "focusout", f, g), H(() => clearTimeout(s));
|
|
437
444
|
}
|
|
438
445
|
//#endregion
|
|
439
446
|
//#region lib/components/ui/overlays/hover-card/HoverCard.vue
|
|
440
|
-
var
|
|
447
|
+
var De = /* @__PURE__ */ p({
|
|
441
448
|
__name: "HoverCard",
|
|
442
449
|
props: {
|
|
443
450
|
defaultOpen: { type: Boolean },
|
|
@@ -448,13 +455,13 @@ var we = /* @__PURE__ */ p({
|
|
|
448
455
|
},
|
|
449
456
|
emits: ["update:open"],
|
|
450
457
|
setup(e, { emit: t }) {
|
|
451
|
-
let n =
|
|
452
|
-
return (e, t) => (x(), s(w(
|
|
458
|
+
let n = z(e, t);
|
|
459
|
+
return (e, t) => (x(), s(w(P), _({ "data-slot": "hover-card" }, w(n)), {
|
|
453
460
|
default: k((t) => [S(e.$slots, "default", y(h(t)))]),
|
|
454
461
|
_: 3
|
|
455
462
|
}, 16));
|
|
456
463
|
}
|
|
457
|
-
}),
|
|
464
|
+
}), Oe = /* @__PURE__ */ p({
|
|
458
465
|
inheritAttrs: !1,
|
|
459
466
|
__name: "HoverCardContent",
|
|
460
467
|
props: {
|
|
@@ -490,9 +497,9 @@ var we = /* @__PURE__ */ p({
|
|
|
490
497
|
] }
|
|
491
498
|
},
|
|
492
499
|
setup(t) {
|
|
493
|
-
let n = t, r =
|
|
494
|
-
return i(!1), (t, i) => (x(), s(w(
|
|
495
|
-
default: k(() => [f(w(
|
|
500
|
+
let n = t, r = R(V(n, "class"));
|
|
501
|
+
return i(!1), (t, i) => (x(), s(w(N), null, {
|
|
502
|
+
default: k(() => [f(w(ce), _({ "data-slot": "hover-card-content" }, {
|
|
496
503
|
...t.$attrs,
|
|
497
504
|
...w(r)
|
|
498
505
|
}, { class: w(e)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 rounded-md border p-4 shadow-md outline-hidden", n.class) }), {
|
|
@@ -502,7 +509,7 @@ var we = /* @__PURE__ */ p({
|
|
|
502
509
|
_: 3
|
|
503
510
|
}));
|
|
504
511
|
}
|
|
505
|
-
}),
|
|
512
|
+
}), ke = /* @__PURE__ */ p({
|
|
506
513
|
__name: "HoverCardTrigger",
|
|
507
514
|
props: {
|
|
508
515
|
reference: {},
|
|
@@ -511,11 +518,11 @@ var we = /* @__PURE__ */ p({
|
|
|
511
518
|
},
|
|
512
519
|
setup(e) {
|
|
513
520
|
let t = e;
|
|
514
|
-
return (e, n) => (x(), s(w(
|
|
521
|
+
return (e, n) => (x(), s(w(F), _({ "data-slot": "hover-card-trigger" }, t), {
|
|
515
522
|
default: k(() => [S(e.$slots, "default")]),
|
|
516
523
|
_: 3
|
|
517
524
|
}, 16));
|
|
518
525
|
}
|
|
519
526
|
});
|
|
520
527
|
//#endregion
|
|
521
|
-
export {
|
|
528
|
+
export { q as _, we as a, Q as c, ye as d, Z as f, J as g, Y as h, Ee as i, xe as l, X as m, Oe as n, $ as o, _e as p, De as r, Se as s, ke as t, be as u };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/* Every background preset's CSS, opt-in: `import "@nxgt/material/backgrounds.css"`
|
|
2
|
+
* (the same file in @nxgt/material-vue). Not part of styles.css, which carries
|
|
3
|
+
* only the base, the gradient and the motion `Background` (from /components)
|
|
4
|
+
* needs. One preset alone: `@nxgt/material/backgrounds/<preset>.css`. */
|
|
5
|
+
@import "./css/base.css";
|
|
6
|
+
@import "./css/gradient.css";
|
|
7
|
+
@import "./css/grain.css";
|
|
8
|
+
@import "./css/motion.css";
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/* Background presets, the base: the frame, the tone and intensity variables,
|
|
2
|
+
* the dark lift, the paused state and forced colours. Plain CSS keyed on
|
|
3
|
+
* `data-background`, which `Background` sets itself, after the caller's
|
|
4
|
+
* props, so a wrapper's own `data-slot` (ThreadLayout, ActivityLayout) cannot
|
|
5
|
+
* unhook it. No Tailwind classes and no inline `style`, so a strict CSP
|
|
6
|
+
* blocks nothing. Shared byte for byte by @nxgt/material and
|
|
7
|
+
* @nxgt/material-vue (scripts/shared-paths.ts).
|
|
8
|
+
*
|
|
9
|
+
* Everything sits in `@layer components`: a utility the app puts on the
|
|
10
|
+
* element (`h-96 w-full`, `overflow-hidden`) is in a later layer and wins.
|
|
11
|
+
*
|
|
12
|
+
* Tones become `--nxgt-bg-t1..t3` (the tokens a tone draws from) and the
|
|
13
|
+
* drawn colours `--nxgt-bg-c1..c3`; an app may override the latter on the
|
|
14
|
+
* element. In dark the drawn colours are lifted to a lightness floor: the dark
|
|
15
|
+
* `--primary` is as dim as the light one, which made the gradient dull. An app
|
|
16
|
+
* sets `--nxgt-bg-custom-1..3` in its own CSS for `tone="custom"`. */
|
|
17
|
+
@layer components {
|
|
18
|
+
[data-background] {
|
|
19
|
+
--nxgt-bg-floor: 0.64;
|
|
20
|
+
--nxgt-bg-k: 1;
|
|
21
|
+
--nxgt-bg-blob: 1;
|
|
22
|
+
--nxgt-bg-t1: var(--primary);
|
|
23
|
+
--nxgt-bg-t2: var(--secondary);
|
|
24
|
+
--nxgt-bg-t3: var(--primary);
|
|
25
|
+
--nxgt-bg-c1: var(--nxgt-bg-t1);
|
|
26
|
+
--nxgt-bg-c2: var(--nxgt-bg-t2);
|
|
27
|
+
--nxgt-bg-c3: var(--nxgt-bg-t3);
|
|
28
|
+
position: relative;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
width: 100lvw;
|
|
32
|
+
height: 100lvh;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* `fill="container"`: the size of the parent, not of the viewport. */
|
|
36
|
+
[data-background][data-fill="container"] {
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[data-background][data-tone="secondary"] {
|
|
42
|
+
--nxgt-bg-t1: var(--secondary);
|
|
43
|
+
--nxgt-bg-t2: var(--primary);
|
|
44
|
+
--nxgt-bg-t3: var(--secondary);
|
|
45
|
+
}
|
|
46
|
+
[data-background][data-tone="tertiary"] {
|
|
47
|
+
--nxgt-bg-t1: var(--tertiary);
|
|
48
|
+
--nxgt-bg-t2: var(--primary);
|
|
49
|
+
--nxgt-bg-t3: var(--tertiary);
|
|
50
|
+
}
|
|
51
|
+
[data-background][data-tone="neutral"] {
|
|
52
|
+
--nxgt-bg-t1: var(--muted-foreground);
|
|
53
|
+
--nxgt-bg-t2: var(--foreground);
|
|
54
|
+
--nxgt-bg-t3: var(--muted-foreground);
|
|
55
|
+
}
|
|
56
|
+
[data-background][data-tone="success"] {
|
|
57
|
+
--nxgt-bg-t1: var(--success);
|
|
58
|
+
--nxgt-bg-t2: var(--info);
|
|
59
|
+
--nxgt-bg-t3: var(--success);
|
|
60
|
+
}
|
|
61
|
+
[data-background][data-tone="warning"] {
|
|
62
|
+
--nxgt-bg-t1: var(--warning);
|
|
63
|
+
--nxgt-bg-t2: var(--error);
|
|
64
|
+
--nxgt-bg-t3: var(--warning);
|
|
65
|
+
}
|
|
66
|
+
[data-background][data-tone="error"] {
|
|
67
|
+
--nxgt-bg-t1: var(--error);
|
|
68
|
+
--nxgt-bg-t2: var(--warning);
|
|
69
|
+
--nxgt-bg-t3: var(--error);
|
|
70
|
+
}
|
|
71
|
+
[data-background][data-tone="info"] {
|
|
72
|
+
--nxgt-bg-t1: var(--info);
|
|
73
|
+
--nxgt-bg-t2: var(--primary);
|
|
74
|
+
--nxgt-bg-t3: var(--info);
|
|
75
|
+
}
|
|
76
|
+
[data-background][data-tone="mixed"] {
|
|
77
|
+
--nxgt-bg-t1: var(--primary);
|
|
78
|
+
--nxgt-bg-t2: var(--secondary);
|
|
79
|
+
--nxgt-bg-t3: var(--tertiary);
|
|
80
|
+
}
|
|
81
|
+
[data-background][data-tone="custom"] {
|
|
82
|
+
--nxgt-bg-t1: var(--nxgt-bg-custom-1, var(--primary));
|
|
83
|
+
--nxgt-bg-t2: var(--nxgt-bg-custom-2, var(--secondary));
|
|
84
|
+
--nxgt-bg-t3: var(--nxgt-bg-custom-3, var(--primary));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Intensity: `--nxgt-bg-k` scales the frame's tint, `--nxgt-bg-blob` the blobs'
|
|
88
|
+
* opacity. The default is 1 and 1, today's look. */
|
|
89
|
+
[data-background][data-intensity="subtle"] {
|
|
90
|
+
--nxgt-bg-k: 0.5;
|
|
91
|
+
--nxgt-bg-blob: 0.6;
|
|
92
|
+
}
|
|
93
|
+
[data-background][data-intensity="vivid"] {
|
|
94
|
+
--nxgt-bg-k: 1.6;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Dark: lift the drawn colours. The fallback mixes with white; the
|
|
98
|
+
* relative colour syntax (Chrome 119, Safari 18, Firefox 128) replaces it
|
|
99
|
+
* where it is supported. */
|
|
100
|
+
:is(.dark, [data-theme="dark"]) [data-background],
|
|
101
|
+
[data-background]:is(.dark, [data-theme="dark"]) {
|
|
102
|
+
--nxgt-bg-c1: color-mix(in oklab, var(--nxgt-bg-t1) 70%, white);
|
|
103
|
+
--nxgt-bg-c2: color-mix(in oklab, var(--nxgt-bg-t2) 70%, white);
|
|
104
|
+
--nxgt-bg-c3: color-mix(in oklab, var(--nxgt-bg-t3) 70%, white);
|
|
105
|
+
}
|
|
106
|
+
@supports (color: oklch(from red max(l, 0.5) c h)) {
|
|
107
|
+
:is(.dark, [data-theme="dark"]) [data-background],
|
|
108
|
+
[data-background]:is(.dark, [data-theme="dark"]) {
|
|
109
|
+
--nxgt-bg-c1: oklch(
|
|
110
|
+
from var(--nxgt-bg-t1) max(l, var(--nxgt-bg-floor)) c h
|
|
111
|
+
);
|
|
112
|
+
--nxgt-bg-c2: oklch(
|
|
113
|
+
from var(--nxgt-bg-t2) max(l, var(--nxgt-bg-floor)) c h
|
|
114
|
+
);
|
|
115
|
+
--nxgt-bg-c3: oklch(
|
|
116
|
+
from var(--nxgt-bg-t3) max(l, var(--nxgt-bg-floor)) c h
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* The decorative layers never take a pointer; the content keeps its own. */
|
|
122
|
+
[data-background] > [aria-hidden="true"] {
|
|
123
|
+
pointer-events: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* An SVG scene (`data-scene`) and an overlay (`data-overlay`, the grain)
|
|
127
|
+
* fill the frame, under the content. The SVG slices to cover it. An
|
|
128
|
+
* overlay stays hidden until its own stylesheet shows it (grain.css), so
|
|
129
|
+
* without that file it paints nothing. */
|
|
130
|
+
[data-background] > [data-overlay] {
|
|
131
|
+
display: none;
|
|
132
|
+
}
|
|
133
|
+
[data-background] > :is([data-scene], [data-overlay]) {
|
|
134
|
+
position: absolute;
|
|
135
|
+
inset: 0;
|
|
136
|
+
}
|
|
137
|
+
[data-background] > :is([data-scene], [data-overlay]) > svg {
|
|
138
|
+
display: block;
|
|
139
|
+
width: 100%;
|
|
140
|
+
height: 100%;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
[data-background] > [data-slot="background-content"] {
|
|
144
|
+
display: flex;
|
|
145
|
+
flex: 1 1 0%;
|
|
146
|
+
width: 100%;
|
|
147
|
+
height: 100%;
|
|
148
|
+
z-index: 5;
|
|
149
|
+
align-items: center;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Paused (hidden page or off screen): the motion rules' `animation`
|
|
154
|
+
* shorthands read `--nxgt-bg-play`, so this one declaration stops the
|
|
155
|
+
* decoration whatever the specificity. The content does not read it: an
|
|
156
|
+
* app's own animations under `background-content` keep running. */
|
|
157
|
+
[data-background][data-paused] {
|
|
158
|
+
--nxgt-bg-play: paused;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@media (forced-colors: active) {
|
|
162
|
+
[data-background] {
|
|
163
|
+
background-image: none;
|
|
164
|
+
}
|
|
165
|
+
[data-background] > [aria-hidden="true"] {
|
|
166
|
+
display: none;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* The `gradient` preset: the frame's tint and three blurred blobs, what
|
|
2
|
+
* `Background` always looked like (a primary tint from 5% to 20%, blobs
|
|
3
|
+
* going primary to secondary), now drawn from the tone's colours so it lifts
|
|
4
|
+
* in dark. The layers are `aria-hidden` divs, see base.css. */
|
|
5
|
+
@layer components {
|
|
6
|
+
[data-background="gradient"] {
|
|
7
|
+
background-image: linear-gradient(
|
|
8
|
+
to right in oklab,
|
|
9
|
+
color-mix(
|
|
10
|
+
in oklab,
|
|
11
|
+
var(--nxgt-bg-c1) calc(5% * var(--nxgt-bg-k)),
|
|
12
|
+
transparent
|
|
13
|
+
),
|
|
14
|
+
color-mix(
|
|
15
|
+
in oklab,
|
|
16
|
+
var(--nxgt-bg-c1) calc(20% * var(--nxgt-bg-k)),
|
|
17
|
+
transparent
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[data-background="gradient"] > [data-layer] {
|
|
23
|
+
position: absolute;
|
|
24
|
+
aspect-ratio: 1 / 1;
|
|
25
|
+
border-radius: 9999px;
|
|
26
|
+
filter: blur(64px);
|
|
27
|
+
opacity: var(--nxgt-bg-blob);
|
|
28
|
+
background-image: linear-gradient(
|
|
29
|
+
to right in oklab,
|
|
30
|
+
var(--nxgt-bg-c1),
|
|
31
|
+
var(--nxgt-bg-c2)
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
[data-background="gradient"] > [data-layer="blob-1"] {
|
|
35
|
+
bottom: 33.333333%;
|
|
36
|
+
width: 8rem;
|
|
37
|
+
}
|
|
38
|
+
[data-background="gradient"] > [data-layer="blob-2"] {
|
|
39
|
+
right: 0;
|
|
40
|
+
bottom: 0;
|
|
41
|
+
width: 8rem;
|
|
42
|
+
max-width: 28rem;
|
|
43
|
+
}
|
|
44
|
+
[data-background="gradient"] > [data-layer="blob-3"] {
|
|
45
|
+
right: 50%;
|
|
46
|
+
width: 10rem;
|
|
47
|
+
background-image: linear-gradient(
|
|
48
|
+
to right in oklab,
|
|
49
|
+
color-mix(in oklab, var(--nxgt-bg-c1) 60%, transparent),
|
|
50
|
+
color-mix(in oklab, var(--nxgt-bg-c2) 60%, transparent)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* The grain: film noise over any preset. `Background` draws it as an
|
|
2
|
+
* `aria-hidden` SVG (an `feTurbulence` filter) with `data-overlay="grain"`
|
|
3
|
+
* when `grain` is set, or for `preset="grain"`, which is the gradient plus
|
|
4
|
+
* this overlay. It sits above the preset's layers and under the content; the
|
|
5
|
+
* intensity scales its opacity. Plain CSS, no inline `style`. The look may
|
|
6
|
+
* still change. */
|
|
7
|
+
@layer components {
|
|
8
|
+
[data-background][data-grain] > [data-overlay="grain"] {
|
|
9
|
+
display: block;
|
|
10
|
+
opacity: calc(0.16 * var(--nxgt-bg-k));
|
|
11
|
+
mix-blend-mode: soft-light;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media (forced-colors: active) {
|
|
15
|
+
[data-background][data-grain] > [data-overlay="grain"] {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* Motion, off by default: a background moves only when the app sets
|
|
2
|
+
* `animated` (`data-animated`) and the user has not asked for less motion.
|
|
3
|
+
* The animation is declared nowhere else, so a rule test can check that every
|
|
4
|
+
* `animation` sits inside this gate. `data-paused` (base.css) stops it while
|
|
5
|
+
* the page is hidden or the background is off screen. */
|
|
6
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
7
|
+
@keyframes nxgt-background-drift {
|
|
8
|
+
from {
|
|
9
|
+
transform: translate3d(0, 0, 0) scale(1);
|
|
10
|
+
}
|
|
11
|
+
to {
|
|
12
|
+
transform: translate3d(6%, -8%, 0) scale(1.1);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@layer components {
|
|
17
|
+
[data-background][data-animated] > [data-layer] {
|
|
18
|
+
animation: nxgt-background-drift 18s ease-in-out infinite alternate
|
|
19
|
+
var(--nxgt-bg-play, running);
|
|
20
|
+
will-change: transform;
|
|
21
|
+
}
|
|
22
|
+
[data-background][data-animated] > [data-layer="blob-2"] {
|
|
23
|
+
animation-duration: 24s;
|
|
24
|
+
animation-direction: alternate-reverse;
|
|
25
|
+
}
|
|
26
|
+
[data-background][data-animated] > [data-layer="blob-3"] {
|
|
27
|
+
animation-duration: 30s;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|