@nxgt/material 3.48.0 → 3.50.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.
Files changed (120) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +3 -3
  3. package/dist/{async-slice-DlvKCKAa.js → async-slice-3loEtzUY.js} +2 -2
  4. package/dist/{button-yaltbQmC.js → button-BRUaHD8z.js} +81 -112
  5. package/dist/charts.js +144 -144
  6. package/dist/{chip-BqWbbr1b.js → chip-DneTrtNj.js} +56 -56
  7. package/dist/{code-editor-C9qBNoYb.js → code-editor-R_nPN_-d.js} +308 -308
  8. package/dist/code-editor.js +47 -47
  9. package/dist/{code-language-items-DAHtfQ7W.js → code-language-items-BKEUhQlF.js} +2 -2
  10. package/dist/components/components.css +1 -0
  11. package/dist/components/ui/actions/action-card/action-card-indicator.css +48 -0
  12. package/dist/components/ui/actions/action-card/action-card-modes.css +4 -1
  13. package/dist/components/ui/actions/action-card/action-card-tile.css +141 -0
  14. package/dist/components/ui/actions/action-card/action-card.css +33 -3
  15. package/dist/{components-Ox6FHmpx.js → components-D6xFLcoE.js} +17646 -17567
  16. package/dist/components.js +26 -27
  17. package/dist/{dialog-CCCcnTIx.js → dialog-S7dLsYRZ.js} +16 -16
  18. package/dist/dnd.js +1 -1
  19. package/dist/{dropdown-menu-Df8785nt.js → dropdown-menu-XLlxfDgq.js} +271 -272
  20. package/dist/editor.js +1028 -1028
  21. package/dist/{empty-state-DcF4TBzi.js → empty-state-Dsf6R-Zo.js} +37 -37
  22. package/dist/{escape-owner-C4W_sOAU.js → escape-owner-B9eCwjLw.js} +1 -1
  23. package/dist/{field-blur-CJHzVSh9.js → field-blur-5uRDFHvB.js} +1 -1
  24. package/dist/{field-blur-context-Cft9s7Hg.js → field-blur-context-Cwt4TuBq.js} +1 -1
  25. package/dist/hooks.js +4 -4
  26. package/dist/{hover-card-C0fw2kLK.js → hover-card-PHUgRSjJ.js} +24 -24
  27. package/dist/{i18n-provider-C0fB0sEL.js → i18n-provider-DPM_ALQ4.js} +1 -1
  28. package/dist/i18n.js +5 -5
  29. package/dist/{icon-badge-aJ22mKGh.js → icon-badge-Dh6-FNOF.js} +3 -3
  30. package/dist/{icon-button-CN9r5TNE.js → icon-button-DSC2-IAG.js} +118 -86
  31. package/dist/lib/components/ui/actions/action-card/action-card-semantics.d.ts +25 -2
  32. package/dist/lib/components/ui/actions/action-card/action-card.d.ts +18 -2
  33. package/dist/lib/components/ui/actions/action-card/partials/action-card-icon.d.ts +6 -0
  34. package/dist/lib/components/ui/actions/action-card/partials/action-card-meta.d.ts +15 -0
  35. package/dist/lib/components/ui/actions/action-card/partials/action-card-status.d.ts +6 -0
  36. package/dist/lib/components/ui/actions/action-card/partials/action-card-text.d.ts +20 -0
  37. package/dist/lib/components/ui/actions/action-card/partials/action-card-title-button.d.ts +14 -0
  38. package/dist/lib/components/ui/actions/action-card/partials/action-card-trail.d.ts +6 -0
  39. package/dist/lib/components/ui/actions/action-card/use-action-card-names.d.ts +22 -0
  40. package/dist/lib/components/ui/actions/action-card/use-reveal.d.ts +23 -0
  41. package/dist/lib/components/ui/actions/button/button.variants.d.ts +1 -1
  42. package/dist/lib/components/ui/actions/icon-button/icon-button-busy.d.ts +22 -0
  43. package/dist/lib/components/ui/actions/icon-button/icon-button-shape.d.ts +2 -0
  44. package/dist/lib/components/ui/actions/icon-button/icon-button.d.ts +7 -0
  45. package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +1 -1
  46. package/dist/lib/components/ui/collections/filter/bar/partials/filter-quick-toggle.d.ts +3 -2
  47. package/dist/lib/components/ui/collections/filter/sections/filter-sections-classes.d.ts +7 -1
  48. package/dist/lib/components/ui/collections/page-footer/page-footer.d.ts +6 -1
  49. package/dist/lib/components/ui/collections/row-menu/row-menu-trigger.d.ts +5 -2
  50. package/dist/lib/components/ui/collections/row-menu/row-menu.d.ts +1 -1
  51. package/dist/lib/components/ui/collections/server-table/index.d.ts +1 -1
  52. package/dist/lib/components/ui/collections/server-table/partials/server-table-empty-chips.d.ts +5 -3
  53. package/dist/lib/components/ui/collections/server-table/types-paging.d.ts +17 -0
  54. package/dist/lib/components/ui/collections/server-table/types.d.ts +3 -10
  55. package/dist/lib/components/ui/dates/duration-field/partials/use-duration-box.d.ts +1 -1
  56. package/dist/lib/components/ui/display/badge/badge.d.ts +1 -1
  57. package/dist/lib/components/ui/display/day-separator/day-separator.d.ts +1 -1
  58. package/dist/lib/components/ui/feedback/step-up-dialog/partials/step-up-body.d.ts +5 -3
  59. package/dist/lib/components/ui/feedback/step-up-dialog/partials/step-up-request-error.d.ts +15 -0
  60. package/dist/lib/components/ui/feedback/step-up-dialog/step-up-dialog.d.ts +6 -3
  61. package/dist/lib/components/ui/feedback/step-up-dialog/types.d.ts +12 -1
  62. package/dist/lib/components/ui/feedback/step-up-dialog/use-retry-focus.d.ts +27 -0
  63. package/dist/lib/components/ui/feedback/step-up-dialog/use-retry.d.ts +11 -0
  64. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  65. package/dist/lib/components/ui/fields/slider/split-slider-props.d.ts +20 -20
  66. package/dist/lib/components/ui/fields/slider/use-slider-control.d.ts +20 -20
  67. package/dist/lib/components/ui/fields/verification-code/use-settled-focus.d.ts +10 -0
  68. package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +1 -1
  69. package/dist/lib/components/ui/media/carousel/use-carousel-engine.d.ts +1 -1
  70. package/dist/lib/components/ui/media/media-player/engine/use-queue-actions.d.ts +1 -1
  71. package/dist/lib/components/ui/media/pdf-reader/pdf-reader.slice.d.ts +1 -1
  72. package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +34 -34
  73. package/dist/lib/components/ui/widgets/chat/chat-message.variants.d.ts +2 -2
  74. package/dist/lib/components/ui/widgets/event-calendar/use-event-calendar.d.ts +1 -1
  75. package/dist/lib/i18n/resources/en/en.d.ts +1 -0
  76. package/dist/lib/i18n/resources/en/material.json.d.ts +2 -1
  77. package/dist/lib/i18n/resources/fr/fr.d.ts +1 -0
  78. package/dist/lib/i18n/resources/fr/material.json.d.ts +2 -1
  79. package/dist/lib/i18n/resources/resources.d.ts +2 -0
  80. package/dist/lib/i18n/translator.d.ts +1 -1
  81. package/dist/lib.js +1 -1
  82. package/dist/main.js +43 -44
  83. package/dist/map.js +79 -79
  84. package/dist/material.css +1 -1
  85. package/dist/nxgt-theme-ivgNca3z.js +37 -0
  86. package/dist/pdf-reader.js +1 -1
  87. package/dist/print.js +2 -2
  88. package/dist/{public-zVb_Nq_D.js → public-vxiijIJF.js} +82 -82
  89. package/dist/{rich-code-block-DMWZZJma.js → rich-code-block-BwvCXPqq.js} +52 -52
  90. package/dist/{sortable-provider-DstbgMVf.js → sortable-provider-D2pAFWQB.js} +218 -218
  91. package/dist/{tooltip-CkttDIab.js → spinner-BpVwI1ps.js} +503 -278
  92. package/dist/{stored-language-IaL1Ftn_.js → stored-language-Beyj2ult.js} +4 -2
  93. package/dist/theme-picker.js +45 -45
  94. package/dist/{theme-store-CSl51uNH.js → theme-store-BdPp43cV.js} +13 -13
  95. package/dist/{theme-toggle-CGW2_K54.js → theme-toggle-BTYRPkP4.js} +16 -16
  96. package/dist/themes.js +17 -17
  97. package/dist/{toggle-group-BMJNcFAC.js → toggle-group-BkH23Jk4.js} +11 -11
  98. package/dist/{toolbar-items-CsLGJMEJ.js → toolbar-items-CIMo4F9q.js} +421 -421
  99. package/dist/{translate-material-v9u-e7Kd.js → translate-material-DEUlaL_1.js} +2 -2
  100. package/dist/{translator-Dk4_qE6U.js → translator-CBgIb3zP.js} +1 -1
  101. package/dist/{use-chat-composer-Brcb5f7r.js → use-chat-composer-D8UAsX0f.js} +6228 -5999
  102. package/dist/{button-tones-BwuVvAmd.js → use-click-lock-BZYtTmVt.js} +37 -7
  103. package/dist/{use-heading-spy-DjKixjLm.js → use-heading-spy-C5LXtA8Z.js} +1 -1
  104. package/dist/{use-material-translation-DOkTaWK_.js → use-material-translation-DWWeeg-B.js} +2 -2
  105. package/dist/{use-theme-DMcyJ52N.js → use-theme-BCLireTd.js} +1 -1
  106. package/docs/components/buttons-and-actions.md +64 -5
  107. package/docs/components/data-table-filter-and-lists.md +30 -10
  108. package/docs/components/feedback-and-status.md +22 -3
  109. package/docs/components/form-fields.md +7 -0
  110. package/docs/guides/cards-and-tiles.md +60 -0
  111. package/docs/guides/server-lists-url.md +3 -2
  112. package/docs/roadmap.md +11 -0
  113. package/lib/components/components.css +1 -0
  114. package/lib/components/ui/actions/action-card/action-card-indicator.css +48 -0
  115. package/lib/components/ui/actions/action-card/action-card-modes.css +4 -1
  116. package/lib/components/ui/actions/action-card/action-card-tile.css +141 -0
  117. package/lib/components/ui/actions/action-card/action-card.css +33 -3
  118. package/package.json +1 -1
  119. package/dist/nxgt-theme-ZS945iMP.js +0 -37
  120. package/dist/spinner-C4CgDEYm.js +0 -229
@@ -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-CsLGJMEJ.js";
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-DAHtfQ7W.js";
6
- import { r as u, t as d } from "./field-blur-CJHzVSh9.js";
3
+ import { d as n, r, t as i, u as a } from "./toolbar-items-CIMo4F9q.js";
4
+ import { t as o } from "./use-material-translation-DWWeeg-B.js";
5
+ import { i as s, n as c, o as l } from "./code-language-items-BKEUhQlF.js";
6
+ import { r as u, t as d } from "./field-blur-5uRDFHvB.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-C9qBNoYb.js";
12
- import { ChevronDown as k, ChevronUp as A, Columns2 as j } from "lucide-react";
13
- import { useEffect as M, useRef as N, useState as P } from "react";
14
- import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
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-R_nPN_-d.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__ */ I(u, {
17
+ return /* @__PURE__ */ N(u, {
18
18
  control: e,
19
19
  name: t,
20
- render: ({ field: e, fieldState: t }) => /* @__PURE__ */ I(d, {
20
+ render: ({ field: e, fieldState: t }) => /* @__PURE__ */ N(d, {
21
21
  onBlur: e.onBlur,
22
22
  focusRef: e.ref,
23
- children: /* @__PURE__ */ I(D, {
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__ */ L("span", {
44
+ return /* @__PURE__ */ P("span", {
45
45
  className: "nxgt-code-diff-totals",
46
46
  children: [
47
- /* @__PURE__ */ L("ins", {
47
+ /* @__PURE__ */ P("ins", {
48
48
  "aria-hidden": !0,
49
49
  children: ["+", e]
50
50
  }),
51
- /* @__PURE__ */ L("del", {
51
+ /* @__PURE__ */ P("del", {
52
52
  "aria-hidden": !0,
53
53
  children: ["−", t]
54
54
  }),
55
- /* @__PURE__ */ I("span", {
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__ */ L("div", {
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__ */ I("span", {
75
+ /* @__PURE__ */ N("span", {
76
76
  "aria-hidden": e >= 0 || void 0,
77
77
  children: a
78
78
  }),
79
- /* @__PURE__ */ I("span", { className: "nxgt-code-status-gap" }),
80
- /* @__PURE__ */ I("span", { children: s(n) }),
81
- /* @__PURE__ */ I(p, {
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__ */ L(F, { children: [/* @__PURE__ */ L(n, {
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__ */ I(r, {
103
- icon: /* @__PURE__ */ I(j, {}),
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__ */ L(a, {
109
+ /* @__PURE__ */ P(a, {
110
110
  label: f("material.code.changes", "Changes"),
111
111
  priority: 3,
112
- children: [/* @__PURE__ */ I(i, {
113
- icon: /* @__PURE__ */ I(A, {}),
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__ */ I(i, {
118
- icon: /* @__PURE__ */ I(k, {}),
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__ */ I(T, {
124
+ /* @__PURE__ */ N(T, {
125
125
  status: p,
126
126
  onCopy: () => void m(d())
127
127
  })
128
128
  ]
129
- }), /* @__PURE__ */ I(c, {
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] = P([]), [r, i] = P(-1);
155
- return M(() => {
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] = P(!1);
181
- return M(() => {
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] = P(), { changes: D, index: O, go: k } = q(C), A = $(), j = Z(h(n.label) || h(n.filename)), M = (e, 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__ */ L("div", {
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__ */ L("div", {
205
+ s && /* @__PURE__ */ P("div", {
206
206
  className: "nxgt-code-head",
207
207
  children: [
208
- n.filename && /* @__PURE__ */ I("span", {
208
+ n.filename && /* @__PURE__ */ N("span", {
209
209
  className: "nxgt-code-filename",
210
210
  children: n.filename
211
211
  }),
212
- C && /* @__PURE__ */ I(B, { ...W(D) }),
213
- /* @__PURE__ */ I(H, {
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__ */ I(y, { height: o }) : /* @__PURE__ */ I(w, {
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: M,
231
+ onMount: F,
232
232
  options: {
233
233
  ...Q(l.overflow, g && !p),
234
- ...j
234
+ ...M
235
235
  },
236
- loading: /* @__PURE__ */ I(f, {
236
+ loading: /* @__PURE__ */ N(f, {
237
237
  style: { height: o },
238
238
  className: "w-full"
239
239
  })
240
240
  }),
241
- s && /* @__PURE__ */ I(V, {
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 = N([]);
269
- return M(() => () => {
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,5 +1,5 @@
1
- import { d as e, f as t } from "./dropdown-menu-Df8785nt.js";
2
- import { t as n } from "./use-material-translation-DOkTaWK_.js";
1
+ import { d as e, f as t } from "./dropdown-menu-XLlxfDgq.js";
2
+ import { t as n } from "./use-material-translation-DWWeeg-B.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";
5
5
  import { jsx as s } from "react/jsx-runtime";
@@ -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([data-disabled]):hover {
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([data-disabled]):hover {
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([data-disabled]):active {
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;