@nxgt/material 3.48.0 → 3.49.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/CHANGELOG.md +10 -0
- package/README.md +2 -2
- package/dist/{button-yaltbQmC.js → button-DJgaQbBD.js} +49 -49
- package/dist/charts.js +144 -144
- package/dist/{chip-BqWbbr1b.js → chip-DN44R1vW.js} +56 -56
- package/dist/{code-editor-C9qBNoYb.js → code-editor-BJ9ewxSC.js} +307 -307
- package/dist/code-editor.js +46 -46
- package/dist/{code-language-items-DAHtfQ7W.js → code-language-items-BJE3VuQg.js} +1 -1
- package/dist/components/components.css +1 -0
- package/dist/components/ui/actions/action-card/action-card-indicator.css +48 -0
- package/dist/components/ui/actions/action-card/action-card-modes.css +4 -1
- package/dist/components/ui/actions/action-card/action-card-tile.css +141 -0
- package/dist/components/ui/actions/action-card/action-card.css +33 -3
- package/dist/{components-Ox6FHmpx.js → components-AtBccCir.js} +17842 -17879
- package/dist/components.js +23 -23
- package/dist/{dialog-CCCcnTIx.js → dialog-ODql4vH7.js} +15 -15
- package/dist/{tooltip-CkttDIab.js → dist-B61_o9Mg.js} +69 -66
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-Df8785nt.js → dropdown-menu-DRXYP9ta.js} +274 -274
- package/dist/editor.js +1027 -1027
- package/dist/{empty-state-DcF4TBzi.js → empty-state-C9QqvBU1.js} +36 -36
- package/dist/{escape-owner-C4W_sOAU.js → escape-owner-DCrlERLM.js} +1 -1
- package/dist/{field-blur-CJHzVSh9.js → field-blur-DYGyIdfD.js} +1 -1
- package/dist/{field-blur-context-Cft9s7Hg.js → field-blur-context-B-fSpl1H.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-C0fw2kLK.js → hover-card-EO_CckIx.js} +19 -19
- package/dist/{icon-badge-aJ22mKGh.js → icon-badge-BQYj_LE6.js} +3 -3
- package/dist/{icon-button-CN9r5TNE.js → icon-button-B481L2TP.js} +20 -20
- package/dist/lib/components/ui/actions/action-card/action-card-semantics.d.ts +25 -2
- package/dist/lib/components/ui/actions/action-card/action-card.d.ts +18 -2
- package/dist/lib/components/ui/actions/action-card/partials/action-card-icon.d.ts +6 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-meta.d.ts +15 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-status.d.ts +6 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-text.d.ts +20 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-title-button.d.ts +14 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-trail.d.ts +6 -0
- package/dist/lib/components/ui/actions/action-card/use-action-card-names.d.ts +22 -0
- package/dist/lib/components/ui/actions/action-card/use-reveal.d.ts +23 -0
- package/dist/lib/components/ui/actions/button/button.variants.d.ts +1 -1
- package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +1 -1
- package/dist/lib/components/ui/collections/row-menu/row-menu.d.ts +1 -1
- package/dist/lib/components/ui/dates/duration-field/partials/use-duration-box.d.ts +1 -1
- package/dist/lib/components/ui/display/badge/badge.d.ts +1 -1
- package/dist/lib/components/ui/display/day-separator/day-separator.d.ts +1 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/slider/split-slider-props.d.ts +20 -20
- package/dist/lib/components/ui/fields/slider/use-slider-control.d.ts +20 -20
- package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +1 -1
- package/dist/lib/components/ui/media/carousel/use-carousel-engine.d.ts +1 -1
- package/dist/lib/components/ui/media/media-player/engine/use-queue-actions.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-reader/pdf-reader.slice.d.ts +1 -1
- package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +34 -34
- package/dist/lib/components/ui/widgets/chat/chat-message.variants.d.ts +2 -2
- package/dist/lib/components/ui/widgets/event-calendar/use-event-calendar.d.ts +1 -1
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/main.js +30 -30
- package/dist/map.js +78 -78
- package/dist/material.css +1 -1
- package/dist/nxgt-theme-ivgNca3z.js +37 -0
- package/dist/pdf-reader.js +1 -1
- package/dist/{public-zVb_Nq_D.js → public-CZBz4JVu.js} +70 -70
- package/dist/{rich-code-block-DMWZZJma.js → rich-code-block-597e0_Qm.js} +51 -51
- package/dist/{sortable-provider-DstbgMVf.js → sortable-provider-CK_xAk2H.js} +217 -217
- package/dist/{spinner-C4CgDEYm.js → spinner-BhuZuHK1.js} +1 -1
- package/dist/theme-picker.js +45 -45
- package/dist/{theme-store-CSl51uNH.js → theme-store-BdPp43cV.js} +13 -13
- package/dist/{theme-toggle-CGW2_K54.js → theme-toggle-Dnjn83TJ.js} +15 -15
- package/dist/themes.js +17 -17
- package/dist/{toggle-group-BMJNcFAC.js → toggle-group-BkH23Jk4.js} +11 -11
- package/dist/{toolbar-items-CsLGJMEJ.js → toolbar-items-CCwIu7fE.js} +426 -426
- package/dist/{use-chat-composer-Brcb5f7r.js → use-chat-composer-Ot5XUbdn.js} +5138 -4908
- package/dist/{use-theme-DMcyJ52N.js → use-theme-BCLireTd.js} +1 -1
- package/docs/components/buttons-and-actions.md +62 -4
- package/docs/components/data-table-filter-and-lists.md +1 -1
- package/docs/guides/cards-and-tiles.md +60 -0
- package/docs/roadmap.md +11 -0
- package/lib/components/components.css +1 -0
- package/lib/components/ui/actions/action-card/action-card-indicator.css +48 -0
- package/lib/components/ui/actions/action-card/action-card-modes.css +4 -1
- package/lib/components/ui/actions/action-card/action-card-tile.css +141 -0
- package/lib/components/ui/actions/action-card/action-card.css +33 -3
- package/package.json +1 -1
- package/dist/nxgt-theme-ZS945iMP.js +0 -37
package/dist/code-editor.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { a as t } from "./dist-lmHmz_bu.js";
|
|
3
|
-
import { d as n, r, t as i, u as a } from "./toolbar-items-
|
|
3
|
+
import { d as n, r, t as i, u as a } from "./toolbar-items-CCwIu7fE.js";
|
|
4
4
|
import { t as o } from "./use-material-translation-DOkTaWK_.js";
|
|
5
|
-
import { i as s, n as c, o as l } from "./code-language-items-
|
|
6
|
-
import { r as u, t as d } from "./field-blur-
|
|
5
|
+
import { i as s, n as c, o as l } from "./code-language-items-BJE3VuQg.js";
|
|
6
|
+
import { r as u, t as d } from "./field-blur-DYGyIdfD.js";
|
|
7
7
|
import { t as f } from "./skeleton-DSdtr2qc.js";
|
|
8
8
|
import { t as p } from "./live-status-BGPaN8r8.js";
|
|
9
9
|
import { t as m } from "./use-mobile-BDro060N.js";
|
|
10
10
|
import { t as h } from "./react-node-text-Crkpfpco.js";
|
|
11
|
-
import { a as g, c as _, d as v, f as y, i as b, l as x, m as S, o as C, p as w, r as T, s as E, t as D, u as O } from "./code-editor-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import { a as g, c as _, d as v, f as y, i as b, l as x, m as S, o as C, p as w, r as T, s as E, t as D, u as O } from "./code-editor-BJ9ewxSC.js";
|
|
12
|
+
import { useEffect as k, useRef as A, useState as j } from "react";
|
|
13
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
14
|
+
import { ChevronDown as F, ChevronUp as I, Columns2 as L } from "lucide-react";
|
|
15
15
|
//#region lib/components/ui/widgets/code-editor/code-editor-form-field.tsx
|
|
16
16
|
function R({ control: e, name: t, ...n }) {
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ N(u, {
|
|
18
18
|
control: e,
|
|
19
19
|
name: t,
|
|
20
|
-
render: ({ field: e, fieldState: t }) => /* @__PURE__ */
|
|
20
|
+
render: ({ field: e, fieldState: t }) => /* @__PURE__ */ N(d, {
|
|
21
21
|
onBlur: e.onBlur,
|
|
22
22
|
focusRef: e.ref,
|
|
23
|
-
children: /* @__PURE__ */
|
|
23
|
+
children: /* @__PURE__ */ N(D, {
|
|
24
24
|
...n,
|
|
25
25
|
name: e.name,
|
|
26
26
|
value: e.value ?? "",
|
|
@@ -41,18 +41,18 @@ function z(e) {
|
|
|
41
41
|
//#region lib/components/ui/widgets/code-editor/diff/code-diff-parts.tsx
|
|
42
42
|
function B({ added: e, removed: t }) {
|
|
43
43
|
let { t: n } = o();
|
|
44
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ P("span", {
|
|
45
45
|
className: "nxgt-code-diff-totals",
|
|
46
46
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ P("ins", {
|
|
48
48
|
"aria-hidden": !0,
|
|
49
49
|
children: ["+", e]
|
|
50
50
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ P("del", {
|
|
52
52
|
"aria-hidden": !0,
|
|
53
53
|
children: ["−", t]
|
|
54
54
|
}),
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ N("span", {
|
|
56
56
|
className: "sr-only",
|
|
57
57
|
children: n("material.code.diff-totals", "{added, plural, one {# line added} other {# lines added}}, {removed, plural, other {# removed}}", {
|
|
58
58
|
added: e,
|
|
@@ -67,18 +67,18 @@ function V({ index: e, count: t, language: n, children: r }) {
|
|
|
67
67
|
index: e + 1,
|
|
68
68
|
count: t
|
|
69
69
|
});
|
|
70
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ P("div", {
|
|
71
71
|
"data-slot": "code-diff-status",
|
|
72
72
|
className: "nxgt-code-status",
|
|
73
73
|
children: [
|
|
74
74
|
r,
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ N("span", {
|
|
76
76
|
"aria-hidden": e >= 0 || void 0,
|
|
77
77
|
children: a
|
|
78
78
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ N("span", { className: "nxgt-code-status-gap" }),
|
|
80
|
+
/* @__PURE__ */ N("span", { children: s(n) }),
|
|
81
|
+
/* @__PURE__ */ N(p, {
|
|
82
82
|
slot: "code-diff-change-status",
|
|
83
83
|
children: e < 0 ? null : a
|
|
84
84
|
})
|
|
@@ -89,7 +89,7 @@ function V({ index: e, count: t, language: n, children: r }) {
|
|
|
89
89
|
//#region lib/components/ui/widgets/code-editor/diff/code-diff-toolbar.tsx
|
|
90
90
|
function H({ sideBySide: e, onSideBySideChange: t, changeCount: s, onStep: u, getCode: d }) {
|
|
91
91
|
let { t: f } = o(), { status: p, copy: m } = l();
|
|
92
|
-
return /* @__PURE__ */
|
|
92
|
+
return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P(n, {
|
|
93
93
|
label: f("material.code.diff-tools", "Diff tools"),
|
|
94
94
|
variant: "floating",
|
|
95
95
|
selectedLook: "morph",
|
|
@@ -99,34 +99,34 @@ function H({ sideBySide: e, onSideBySideChange: t, changeCount: s, onStep: u, ge
|
|
|
99
99
|
moreLabel: f("material.code.more-tools", "More code tools"),
|
|
100
100
|
className: "nxgt-code-toolbar",
|
|
101
101
|
children: [
|
|
102
|
-
t && /* @__PURE__ */
|
|
103
|
-
icon: /* @__PURE__ */
|
|
102
|
+
t && /* @__PURE__ */ N(r, {
|
|
103
|
+
icon: /* @__PURE__ */ N(L, {}),
|
|
104
104
|
label: f("material.code.side-by-side", "Side by side"),
|
|
105
105
|
priority: 1,
|
|
106
106
|
pressed: !!e,
|
|
107
107
|
onPressedChange: t
|
|
108
108
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ P(a, {
|
|
110
110
|
label: f("material.code.changes", "Changes"),
|
|
111
111
|
priority: 3,
|
|
112
|
-
children: [/* @__PURE__ */
|
|
113
|
-
icon: /* @__PURE__ */ I
|
|
112
|
+
children: [/* @__PURE__ */ N(i, {
|
|
113
|
+
icon: /* @__PURE__ */ N(I, {}),
|
|
114
114
|
label: f("material.code.previous-change", "Previous change"),
|
|
115
115
|
disabled: !s,
|
|
116
116
|
onClick: () => u(-1)
|
|
117
|
-
}), /* @__PURE__ */
|
|
118
|
-
icon: /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ N(i, {
|
|
118
|
+
icon: /* @__PURE__ */ N(F, {}),
|
|
119
119
|
label: f("material.code.next-change", "Next change"),
|
|
120
120
|
disabled: !s,
|
|
121
121
|
onClick: () => u(1)
|
|
122
122
|
})]
|
|
123
123
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ N(T, {
|
|
125
125
|
status: p,
|
|
126
126
|
onCopy: () => void m(d())
|
|
127
127
|
})
|
|
128
128
|
]
|
|
129
|
-
}), /* @__PURE__ */
|
|
129
|
+
}), /* @__PURE__ */ N(c, {
|
|
130
130
|
slot: "code-diff-copy-status",
|
|
131
131
|
status: p
|
|
132
132
|
})] });
|
|
@@ -151,8 +151,8 @@ function K(e, t, n) {
|
|
|
151
151
|
//#endregion
|
|
152
152
|
//#region lib/components/ui/widgets/code-editor/diff/use-diff-changes.ts
|
|
153
153
|
function q(e) {
|
|
154
|
-
let [t, n] =
|
|
155
|
-
return
|
|
154
|
+
let [t, n] = j([]), [r, i] = j(-1);
|
|
155
|
+
return k(() => {
|
|
156
156
|
if (!e) return;
|
|
157
157
|
let t = () => {
|
|
158
158
|
n(e.getLineChanges() ?? []), i(-1);
|
|
@@ -177,8 +177,8 @@ function q(e) {
|
|
|
177
177
|
//#endregion
|
|
178
178
|
//#region lib/components/ui/widgets/code-editor/diff/use-narrower.ts
|
|
179
179
|
function J(e, t) {
|
|
180
|
-
let [n, r] =
|
|
181
|
-
return
|
|
180
|
+
let [n, r] = j(!1);
|
|
181
|
+
return k(() => {
|
|
182
182
|
let n = e.current;
|
|
183
183
|
if (!n || typeof ResizeObserver > "u") return;
|
|
184
184
|
let i = new ResizeObserver(([e]) => r(e.contentRect.width < t));
|
|
@@ -193,24 +193,24 @@ function X(n) {
|
|
|
193
193
|
prop: n.sideBySide,
|
|
194
194
|
defaultProp: n.defaultSideBySide ?? !0,
|
|
195
195
|
onChange: n.onSideBySideChange
|
|
196
|
-
}), [C, T] =
|
|
196
|
+
}), [C, T] = j(), { changes: D, index: O, go: k } = q(C), A = $(), M = Z(h(n.label) || h(n.filename)), F = (e, t) => {
|
|
197
197
|
A.keep(e), _(t), T(e);
|
|
198
198
|
};
|
|
199
|
-
return /* @__PURE__ */
|
|
199
|
+
return /* @__PURE__ */ P("div", {
|
|
200
200
|
ref: l.surfaceRef,
|
|
201
201
|
...l.surfaceProps,
|
|
202
202
|
"data-slot": "code-diff",
|
|
203
203
|
className: e("nxgt-code-frame", l.surfaceClass, n.className),
|
|
204
204
|
children: [
|
|
205
|
-
s && /* @__PURE__ */
|
|
205
|
+
s && /* @__PURE__ */ P("div", {
|
|
206
206
|
className: "nxgt-code-head",
|
|
207
207
|
children: [
|
|
208
|
-
n.filename && /* @__PURE__ */
|
|
208
|
+
n.filename && /* @__PURE__ */ N("span", {
|
|
209
209
|
className: "nxgt-code-filename",
|
|
210
210
|
children: n.filename
|
|
211
211
|
}),
|
|
212
|
-
C && /* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
212
|
+
C && /* @__PURE__ */ N(B, { ...W(D) }),
|
|
213
|
+
/* @__PURE__ */ N(H, {
|
|
214
214
|
sideBySide: g,
|
|
215
215
|
onSideBySideChange: p ? void 0 : S,
|
|
216
216
|
changeCount: D.length,
|
|
@@ -219,7 +219,7 @@ function X(n) {
|
|
|
219
219
|
})
|
|
220
220
|
]
|
|
221
221
|
}),
|
|
222
|
-
c ? /* @__PURE__ */
|
|
222
|
+
c ? /* @__PURE__ */ N(y, { height: o }) : /* @__PURE__ */ N(w, {
|
|
223
223
|
original: r,
|
|
224
224
|
modified: i,
|
|
225
225
|
language: a,
|
|
@@ -228,17 +228,17 @@ function X(n) {
|
|
|
228
228
|
height: o,
|
|
229
229
|
keepCurrentOriginalModel: !0,
|
|
230
230
|
keepCurrentModifiedModel: !0,
|
|
231
|
-
onMount:
|
|
231
|
+
onMount: F,
|
|
232
232
|
options: {
|
|
233
233
|
...Q(l.overflow, g && !p),
|
|
234
|
-
...
|
|
234
|
+
...M
|
|
235
235
|
},
|
|
236
|
-
loading: /* @__PURE__ */
|
|
236
|
+
loading: /* @__PURE__ */ N(f, {
|
|
237
237
|
style: { height: o },
|
|
238
238
|
className: "w-full"
|
|
239
239
|
})
|
|
240
240
|
}),
|
|
241
|
-
s && /* @__PURE__ */
|
|
241
|
+
s && /* @__PURE__ */ N(V, {
|
|
242
242
|
index: O,
|
|
243
243
|
count: D.length,
|
|
244
244
|
language: a
|
|
@@ -265,8 +265,8 @@ function Q(e, t) {
|
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
267
|
function $() {
|
|
268
|
-
let e =
|
|
269
|
-
return
|
|
268
|
+
let e = A([]);
|
|
269
|
+
return k(() => () => {
|
|
270
270
|
let t = e.current;
|
|
271
271
|
e.current = [], queueMicrotask(() => {
|
|
272
272
|
for (let e of t) e.dispose();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as e, f as t } from "./dropdown-menu-
|
|
1
|
+
import { d as e, f as t } from "./dropdown-menu-DRXYP9ta.js";
|
|
2
2
|
import { t as n } from "./use-material-translation-DOkTaWK_.js";
|
|
3
3
|
import { t as r } from "./live-status-BGPaN8r8.js";
|
|
4
4
|
import { useEffect as i, useRef as a, useState as o } from "react";
|
|
@@ -191,6 +191,7 @@
|
|
|
191
191
|
@import "./ui/feedback/toast/toast-tokens.css";
|
|
192
192
|
@import "./ui/actions/action-card/action-card.css";
|
|
193
193
|
@import "./ui/actions/action-card/action-card-indicator.css";
|
|
194
|
+
@import "./ui/actions/action-card/action-card-tile.css";
|
|
194
195
|
@import "./ui/actions/action-card/action-card-modes.css";
|
|
195
196
|
@import "./ui/media/galleries/gallery-image-lists.css";
|
|
196
197
|
/* Gallery: the View Transition from a tile to its lightbox. */
|
|
@@ -37,4 +37,52 @@
|
|
|
37
37
|
.nxgt-action-card[data-active] .nxgt-action-card-indicator svg {
|
|
38
38
|
stroke-dashoffset: 0;
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
/* The indicator takes its own column, after the action, only when shown. */
|
|
42
|
+
.nxgt-action-card[data-size="tile"]:has(> .nxgt-action-card-indicator) {
|
|
43
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
44
|
+
grid-template-areas: "title ind" "status status" "desc desc" "meta meta";
|
|
45
|
+
}
|
|
46
|
+
.nxgt-action-card[data-size="tile"][data-icon]:has(
|
|
47
|
+
> .nxgt-action-card-indicator
|
|
48
|
+
) {
|
|
49
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
50
|
+
grid-template-areas:
|
|
51
|
+
"icon title ind"
|
|
52
|
+
". status status"
|
|
53
|
+
". desc desc"
|
|
54
|
+
". meta meta";
|
|
55
|
+
}
|
|
56
|
+
.nxgt-action-card[data-size="tile"][data-has-action]:has(
|
|
57
|
+
> .nxgt-action-card-indicator
|
|
58
|
+
) {
|
|
59
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
60
|
+
grid-template-areas:
|
|
61
|
+
"title act ind"
|
|
62
|
+
"status status status"
|
|
63
|
+
"desc desc desc"
|
|
64
|
+
"meta meta meta";
|
|
65
|
+
}
|
|
66
|
+
.nxgt-action-card[data-size="tile"][data-has-action][data-icon]:has(
|
|
67
|
+
> .nxgt-action-card-indicator
|
|
68
|
+
) {
|
|
69
|
+
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
70
|
+
grid-template-areas:
|
|
71
|
+
"icon title act ind"
|
|
72
|
+
". status status status"
|
|
73
|
+
". desc desc desc"
|
|
74
|
+
". meta meta meta";
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* The indicator is centred on the title row (36px high). */
|
|
78
|
+
.nxgt-action-card[data-size="tile"] .nxgt-action-card-indicator {
|
|
79
|
+
align-self: start;
|
|
80
|
+
margin-block: 5px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* The action is no longer at the card's edge: no optical offset. */
|
|
84
|
+
.nxgt-action-card[data-size="tile"]:has(> .nxgt-action-card-indicator)
|
|
85
|
+
.nxgt-action-card-action {
|
|
86
|
+
margin-inline-end: 0;
|
|
87
|
+
}
|
|
40
88
|
}
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
.nxgt-action-card * {
|
|
8
8
|
transition: none;
|
|
9
9
|
}
|
|
10
|
-
.nxgt-action-card[data-interactive]:not([data-disabled]):active
|
|
10
|
+
.nxgt-action-card[data-interactive]:not([data-disabled]):active,
|
|
11
|
+
.nxgt-action-card[data-has-action][data-interactive]:not(
|
|
12
|
+
[data-disabled]
|
|
13
|
+
):has(.nxgt-action-card-button:active) {
|
|
11
14
|
scale: none;
|
|
12
15
|
--ac-r: 12px;
|
|
13
16
|
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/* biome-ignore-all lint/style/noDescendingSpecificity: states are grouped by meaning, not by specificity */
|
|
2
|
+
/* ActionCard status, meta, action and the tile variant. Loaded after
|
|
3
|
+
* action-card.css and the indicator. With an `action` the title is the card's
|
|
4
|
+
* one button: its ::after covers the card, and the action sits above it. */
|
|
5
|
+
@layer components {
|
|
6
|
+
.nxgt-action-card-status {
|
|
7
|
+
display: flex;
|
|
8
|
+
margin-top: 4px;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
}
|
|
11
|
+
.nxgt-action-card-meta {
|
|
12
|
+
display: block;
|
|
13
|
+
margin-top: 2px;
|
|
14
|
+
min-width: 0;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
text-overflow: ellipsis;
|
|
18
|
+
font-size: 0.8125rem;
|
|
19
|
+
line-height: 1.4;
|
|
20
|
+
color: color-mix(in oklab, var(--card-foreground) 70%, var(--card));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* The title button: the card's press surface. */
|
|
24
|
+
.nxgt-action-card-button {
|
|
25
|
+
display: inline;
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
border: 0;
|
|
29
|
+
background: none;
|
|
30
|
+
color: inherit;
|
|
31
|
+
font: inherit;
|
|
32
|
+
letter-spacing: inherit;
|
|
33
|
+
text-align: start;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
outline: none;
|
|
36
|
+
}
|
|
37
|
+
.nxgt-action-card-button::after {
|
|
38
|
+
content: "";
|
|
39
|
+
position: absolute;
|
|
40
|
+
inset: 0;
|
|
41
|
+
border-radius: inherit;
|
|
42
|
+
z-index: 0;
|
|
43
|
+
}
|
|
44
|
+
.nxgt-action-card-button:disabled {
|
|
45
|
+
cursor: not-allowed;
|
|
46
|
+
}
|
|
47
|
+
.nxgt-action-card:has(.nxgt-action-card-button:focus-visible) {
|
|
48
|
+
outline: 3px solid var(--ac-ring);
|
|
49
|
+
outline-offset: -3px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* The action: its own grid area, above the stretched button. */
|
|
53
|
+
.nxgt-action-card-action {
|
|
54
|
+
grid-area: act;
|
|
55
|
+
position: relative;
|
|
56
|
+
z-index: 1;
|
|
57
|
+
justify-self: end;
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
margin-inline-end: -8px;
|
|
60
|
+
}
|
|
61
|
+
.nxgt-action-card[data-has-action] {
|
|
62
|
+
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
63
|
+
grid-template-areas: "icon text act ind";
|
|
64
|
+
}
|
|
65
|
+
.nxgt-action-card[data-has-action][data-size="md"] {
|
|
66
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
67
|
+
grid-template-areas: "icon act ind" "text text text";
|
|
68
|
+
}
|
|
69
|
+
.nxgt-action-card[data-has-action][data-size="md"]:not([data-icon]) {
|
|
70
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
71
|
+
grid-template-areas: "text act ind";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Tile: a compact grid cell, title and action on the first row, then the
|
|
75
|
+
* status, the description and the meta line, each full width. The text
|
|
76
|
+
* wrapper dissolves so its children take the areas. */
|
|
77
|
+
.nxgt-action-card[data-size="tile"] {
|
|
78
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
79
|
+
grid-template-areas: "title act" "status status" "desc desc" "meta meta";
|
|
80
|
+
align-items: start;
|
|
81
|
+
/* A taller neighbour stretches the card: keep the rows at the top. */
|
|
82
|
+
align-content: start;
|
|
83
|
+
row-gap: 0;
|
|
84
|
+
column-gap: 8px;
|
|
85
|
+
min-height: 0;
|
|
86
|
+
min-width: 0;
|
|
87
|
+
padding-block: 12px;
|
|
88
|
+
padding-inline: 16px 12px;
|
|
89
|
+
}
|
|
90
|
+
.nxgt-action-card[data-size="tile"][data-icon] {
|
|
91
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
92
|
+
grid-template-areas:
|
|
93
|
+
"icon title act"
|
|
94
|
+
". status status"
|
|
95
|
+
". desc desc"
|
|
96
|
+
". meta meta";
|
|
97
|
+
}
|
|
98
|
+
.nxgt-action-card[data-size="tile"] .nxgt-action-card-icon {
|
|
99
|
+
width: 36px;
|
|
100
|
+
height: 36px;
|
|
101
|
+
}
|
|
102
|
+
.nxgt-action-card[data-size="tile"] .nxgt-action-card-text {
|
|
103
|
+
display: contents;
|
|
104
|
+
}
|
|
105
|
+
.nxgt-action-card[data-size="tile"] .nxgt-action-card-title {
|
|
106
|
+
grid-area: title;
|
|
107
|
+
align-self: center;
|
|
108
|
+
min-height: 36px;
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
}
|
|
112
|
+
.nxgt-action-card[data-size="tile"] .nxgt-action-card-description {
|
|
113
|
+
grid-area: desc;
|
|
114
|
+
margin-top: 2px;
|
|
115
|
+
}
|
|
116
|
+
.nxgt-action-card[data-size="tile"] .nxgt-action-card-status {
|
|
117
|
+
grid-area: status;
|
|
118
|
+
}
|
|
119
|
+
.nxgt-action-card[data-size="tile"] .nxgt-action-card-meta {
|
|
120
|
+
grid-area: meta;
|
|
121
|
+
}
|
|
122
|
+
.nxgt-action-card[data-size="tile"][data-has-action]
|
|
123
|
+
.nxgt-action-card-action {
|
|
124
|
+
align-self: start;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@media (forced-colors: active) {
|
|
128
|
+
.nxgt-action-card:has(.nxgt-action-card-button:focus-visible) {
|
|
129
|
+
outline: 3px solid CanvasText;
|
|
130
|
+
outline-offset: -5px;
|
|
131
|
+
}
|
|
132
|
+
.nxgt-action-card-meta {
|
|
133
|
+
color: CanvasText;
|
|
134
|
+
}
|
|
135
|
+
/* a chosen tile's border is 2px here: the content keeps its place */
|
|
136
|
+
.nxgt-action-card[data-size="tile"][data-active] {
|
|
137
|
+
padding-block: 11px;
|
|
138
|
+
padding-inline: 15px 11px;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -125,13 +125,43 @@
|
|
|
125
125
|
.nxgt-action-card[data-interactive]:not([data-disabled]) {
|
|
126
126
|
cursor: pointer;
|
|
127
127
|
}
|
|
128
|
-
.nxgt-action-card[data-interactive]:not(
|
|
128
|
+
.nxgt-action-card[data-interactive]:not(
|
|
129
|
+
[data-has-action],
|
|
130
|
+
[data-disabled]
|
|
131
|
+
):hover {
|
|
129
132
|
--ac-tint: 11%;
|
|
130
133
|
}
|
|
131
|
-
.nxgt-action-card[data-interactive][data-active]:not(
|
|
134
|
+
.nxgt-action-card[data-interactive][data-active]:not(
|
|
135
|
+
[data-has-action],
|
|
136
|
+
[data-disabled]
|
|
137
|
+
):hover {
|
|
132
138
|
--ac-tint: 21%;
|
|
133
139
|
}
|
|
134
|
-
.nxgt-action-card[data-interactive]:not(
|
|
140
|
+
.nxgt-action-card[data-interactive]:not(
|
|
141
|
+
[data-has-action],
|
|
142
|
+
[data-disabled]
|
|
143
|
+
):active {
|
|
144
|
+
--ac-tint: 15%;
|
|
145
|
+
--ac-r: 16px;
|
|
146
|
+
scale: 0.97;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* With an action, only the title button answers hover and press (its
|
|
150
|
+
* stretched ::after covers the card, padding included); the action does
|
|
151
|
+
* not. The rules above leave these cards to the ones below. */
|
|
152
|
+
.nxgt-action-card[data-has-action][data-interactive]:not([data-disabled]):has(
|
|
153
|
+
.nxgt-action-card-button:hover
|
|
154
|
+
) {
|
|
155
|
+
--ac-tint: 11%;
|
|
156
|
+
}
|
|
157
|
+
.nxgt-action-card[data-has-action][data-interactive][data-active]:not(
|
|
158
|
+
[data-disabled]
|
|
159
|
+
):has(.nxgt-action-card-button:hover) {
|
|
160
|
+
--ac-tint: 21%;
|
|
161
|
+
}
|
|
162
|
+
.nxgt-action-card[data-has-action][data-interactive]:not([data-disabled]):has(
|
|
163
|
+
.nxgt-action-card-button:active
|
|
164
|
+
) {
|
|
135
165
|
--ac-tint: 15%;
|
|
136
166
|
--ac-r: 16px;
|
|
137
167
|
scale: 0.97;
|