@nxgt/material 3.86.0 → 3.86.2
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 +12 -0
- package/dist/{calculator-CyBjPONf.js → calculator-C3a8YMwl.js} +2 -2
- package/dist/calculator-field.js +1 -1
- package/dist/calculator.js +1 -1
- package/dist/{components-BVHbzzju.js → components-BTukNsPn.js} +13 -6
- package/dist/components.js +3 -3
- package/dist/editor.js +1 -1
- package/dist/{financial-variant-DqW4HJ_v.js → financial-variant-BIpzs8IL.js} +1 -1
- package/dist/lib/components/ui/primitives/tabs/tabs-press.d.ts +11 -0
- package/dist/main.js +3 -3
- package/dist/material.css +1 -1
- package/dist/{tabs-BOT9B4le.js → tabs-95Y2LmnV.js} +64 -42
- package/dist/{use-chat-composer-67MgWAHz.js → use-chat-composer-CleSUh_y.js} +1 -1
- package/docs/components/data-display.md +1 -1
- package/docs/components/rich-widgets.md +4 -2
- package/package.json +1 -1
|
@@ -49,8 +49,8 @@ var ae = Object.defineProperty, x = (e, t) => ae(e, "name", {
|
|
|
49
49
|
ref: t
|
|
50
50
|
})
|
|
51
51
|
});
|
|
52
|
-
}, "TabsList")),
|
|
53
|
-
let { __scopeTabs: i, value: a, disabled: o = !1, ...s } = e, c = w(
|
|
52
|
+
}, "TabsList")), fe = "TabsTrigger", T = /* @__PURE__ */ p.forwardRef(/* @__PURE__ */ x(function(e, t) {
|
|
53
|
+
let { __scopeTabs: i, value: a, disabled: o = !1, ...s } = e, c = w(fe, i), l = C(i), u = D(c.baseId, a), f = O(c.baseId, a), p = a === c.value;
|
|
54
54
|
return /* @__PURE__ */ y(d, {
|
|
55
55
|
asChild: !0,
|
|
56
56
|
...l,
|
|
@@ -79,8 +79,8 @@ var ae = Object.defineProperty, x = (e, t) => ae(e, "name", {
|
|
|
79
79
|
})
|
|
80
80
|
})
|
|
81
81
|
});
|
|
82
|
-
}, "TabsTrigger")),
|
|
83
|
-
let { __scopeTabs: r, value: i, forceMount: a, children: s, ...c } = e, l = w(
|
|
82
|
+
}, "TabsTrigger")), E = "TabsContent", pe = /* @__PURE__ */ p.forwardRef(/* @__PURE__ */ x(function(e, t) {
|
|
83
|
+
let { __scopeTabs: r, value: i, forceMount: a, children: s, ...c } = e, l = w(E, r), u = D(l.baseId, i), d = O(l.baseId, i), f = i === l.value, m = p.useRef(f);
|
|
84
84
|
return p.useEffect(() => {
|
|
85
85
|
let e = requestAnimationFrame(() => m.current = !1);
|
|
86
86
|
return () => cancelAnimationFrame(e);
|
|
@@ -112,7 +112,7 @@ function O(e, t) {
|
|
|
112
112
|
return `${e}-content-${t}`;
|
|
113
113
|
}
|
|
114
114
|
x(O, "makeContentId");
|
|
115
|
-
var me = le, he = de, ge =
|
|
115
|
+
var me = le, he = de, ge = T, _e = pe;
|
|
116
116
|
//#endregion
|
|
117
117
|
//#region lib/components/ui/primitives/tabs/tabs-classes.ts
|
|
118
118
|
function k(e) {
|
|
@@ -130,30 +130,30 @@ var A = "aria-[orientation=vertical]:flex-col", ve = {
|
|
|
130
130
|
}, F = "pointer-events-none absolute left-0 invisible group-data-[indicator=ready]/tabs-list:visible group-data-[indicator=ready]/tabs-list:motion-safe:transition-[translate,width,height] duration-300 ease-out", ye = {
|
|
131
131
|
underline: `${F} bottom-0 h-0.5 rounded-full bg-primary dark:bg-track-fill w-(--tabs-indicator-w) translate-x-(--tabs-indicator-x) group-aria-[orientation=vertical]/tabs-list:bottom-auto group-aria-[orientation=vertical]/tabs-list:top-0 group-aria-[orientation=vertical]/tabs-list:w-0.5 group-aria-[orientation=vertical]/tabs-list:h-(--tabs-indicator-w) group-aria-[orientation=vertical]/tabs-list:translate-x-0 group-aria-[orientation=vertical]/tabs-list:translate-y-(--tabs-indicator-x)`,
|
|
132
132
|
segmented: `${F} inset-y-1 rounded-full bg-background shadow-sm border border-muted-foreground dark:bg-card w-(--tabs-indicator-w) translate-x-(--tabs-indicator-x) group-aria-[orientation=vertical]/tabs-list:inset-y-auto group-aria-[orientation=vertical]/tabs-list:inset-x-1 group-aria-[orientation=vertical]/tabs-list:top-0 group-aria-[orientation=vertical]/tabs-list:w-auto group-aria-[orientation=vertical]/tabs-list:h-(--tabs-indicator-w) group-aria-[orientation=vertical]/tabs-list:translate-x-0 group-aria-[orientation=vertical]/tabs-list:translate-y-(--tabs-indicator-x)`
|
|
133
|
-
}, be = "inline-flex items-center gap-2",
|
|
133
|
+
}, be = "inline-flex items-center gap-2", I = "flex justify-center", xe = "w-full flex-1 outline-none";
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region lib/components/ui/primitives/tabs/partials/tabs-content.tsx
|
|
136
|
-
function
|
|
136
|
+
function Se({ className: t, ...n }) {
|
|
137
137
|
return /* @__PURE__ */ y(_e, {
|
|
138
138
|
"data-slot": "tabs-content",
|
|
139
|
-
className: e(
|
|
139
|
+
className: e(xe, t),
|
|
140
140
|
...n
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region lib/components/ui/primitives/tabs/tabs-overflow-classes.ts
|
|
145
|
-
var
|
|
146
|
-
function
|
|
147
|
-
return g(
|
|
145
|
+
var L = "[--tabs-cue:2rem] pointer-coarse:[--tabs-cue:3rem] data-[overflow-left]:[--tabs-inset-left:var(--tabs-cue)] data-[overflow-right]:[--tabs-inset-right:var(--tabs-cue)] data-[overflow-left]:[mask-image:linear-gradient(to_right,transparent_var(--tabs-inset-left,0px),#000_var(--tabs-inset-left,0px),#000_calc(100%_-_var(--tabs-inset-right,0px)),transparent_calc(100%_-_var(--tabs-inset-right,0px)))] data-[overflow-right]:[mask-image:linear-gradient(to_right,transparent_var(--tabs-inset-left,0px),#000_var(--tabs-inset-left,0px),#000_calc(100%_-_var(--tabs-inset-right,0px)),transparent_calc(100%_-_var(--tabs-inset-right,0px)))] [&_[data-clipped]]:opacity-0", Ce = "pointer-events-none absolute z-20 overflow-hidden", R = "pointer-events-auto absolute top-1/2 inline-flex size-7 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full border border-border bg-background text-foreground shadow-sm transition-colors hover:bg-muted pointer-coarse:h-full pointer-coarse:max-h-11 pointer-coarse:w-11 focus-visible:outline-2 focus-visible:outline-offset-[-3px] focus-visible:outline-primary dark:focus-visible:outline-track-fill [&_svg]:size-4", we = `${R} left-1`, Te = `${R} right-1`, z = m("underline");
|
|
146
|
+
function B() {
|
|
147
|
+
return g(z);
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region lib/components/ui/primitives/tabs/tabs-clipped.ts
|
|
151
|
-
function
|
|
151
|
+
function Ee(e) {
|
|
152
152
|
let t = getComputedStyle(e).getPropertyValue("--tabs-cue").trim(), n = Number.parseFloat(t);
|
|
153
153
|
return Number.isFinite(n) ? t.endsWith("rem") ? n * Number.parseFloat(getComputedStyle(document.documentElement).fontSize) : n : 0;
|
|
154
154
|
}
|
|
155
155
|
function V(e, t, n, r) {
|
|
156
|
-
let i = e.getBoundingClientRect(), a =
|
|
156
|
+
let i = e.getBoundingClientRect(), a = Ee(e), o = i.left + (n ? a : 0), s = i.right - (r ? a : 0);
|
|
157
157
|
for (let a of e.querySelectorAll(t.tab)) {
|
|
158
158
|
let e = a.getBoundingClientRect(), c = n && e.left < o - 1 && e.right > i.left || r && e.right > s + 1 && e.left < i.right, l = a.matches(t.active) || a === document.activeElement, u = c && !l;
|
|
159
159
|
u !== a.hasAttribute("data-clipped") && a.toggleAttribute("data-clipped", u);
|
|
@@ -193,7 +193,28 @@ var U = {
|
|
|
193
193
|
x: 0,
|
|
194
194
|
width: 0,
|
|
195
195
|
height: 0
|
|
196
|
-
}, W = (e, t) => e.left === t.left && e.right === t.right && e.top === t.top && e.x === t.x && e.width === t.width && e.height === t.height
|
|
196
|
+
}, W = (e, t) => e.left === t.left && e.right === t.right && e.top === t.top && e.x === t.x && e.width === t.width && e.height === t.height;
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region lib/components/ui/primitives/tabs/tabs-press.ts
|
|
199
|
+
function ke(e, t, n) {
|
|
200
|
+
let r = !1, i = e.ownerDocument, a = i.defaultView, o = () => {
|
|
201
|
+
r = !1, i.removeEventListener("pointerup", o, !0), i.removeEventListener("pointercancel", o, !0), a?.removeEventListener("blur", o);
|
|
202
|
+
}, s = () => {
|
|
203
|
+
r = !0, i.addEventListener("pointerup", o, !0), i.addEventListener("pointercancel", o, !0), a?.addEventListener("blur", o);
|
|
204
|
+
}, c = (e) => {
|
|
205
|
+
let r = e.target instanceof HTMLElement ? e.target.closest(t) : null;
|
|
206
|
+
r && e.detail > 0 && n(r);
|
|
207
|
+
};
|
|
208
|
+
return e.addEventListener("pointerdown", s, !0), e.addEventListener("click", c), {
|
|
209
|
+
pressed: () => r,
|
|
210
|
+
dispose() {
|
|
211
|
+
e.removeEventListener("pointerdown", s, !0), o(), e.removeEventListener("click", c);
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region lib/components/ui/primitives/tabs/tabs-selectors.ts
|
|
217
|
+
var G = "[role=\"tab\"], [data-slot=\"tabs-trigger\"]", K = "[role=\"tab\"][data-state=\"active\"], [data-slot=\"tabs-trigger\"][data-state=\"active\"]", q = 64, J = {
|
|
197
218
|
tab: G,
|
|
198
219
|
active: K
|
|
199
220
|
};
|
|
@@ -213,7 +234,7 @@ function X(e, t = J) {
|
|
|
213
234
|
height: e.offsetHeight
|
|
214
235
|
};
|
|
215
236
|
}
|
|
216
|
-
function
|
|
237
|
+
function Ae(e, t, n = Y()) {
|
|
217
238
|
if (e.scrollWidth <= e.clientWidth) return 0;
|
|
218
239
|
let r = e.getBoundingClientRect(), i = t.getBoundingClientRect(), a = 0;
|
|
219
240
|
return i.left < r.left + q ? a = i.left - r.left - q : i.right > r.right - q && (a = i.right - r.right + q), a && e.scrollBy({
|
|
@@ -231,36 +252,37 @@ function Z(e, t = J) {
|
|
|
231
252
|
let e = X(n, t);
|
|
232
253
|
r((t) => W(t, e) ? t : e);
|
|
233
254
|
});
|
|
234
|
-
}, o = () => n.querySelector(t.active), s = Oe(n,
|
|
255
|
+
}, o = () => n.querySelector(t.active), s = Oe(n, Ae), { state: c, reveal: l } = s, u = ke(n, t.tab, l), d = new ResizeObserver(() => {
|
|
235
256
|
a();
|
|
236
257
|
let e = c.follow ? o() : null;
|
|
237
258
|
e && l(e, "instant");
|
|
238
|
-
}),
|
|
239
|
-
|
|
240
|
-
for (let e of n.querySelectorAll(t.tab))
|
|
241
|
-
},
|
|
242
|
-
if (
|
|
259
|
+
}), f = () => {
|
|
260
|
+
d.disconnect(), d.observe(n);
|
|
261
|
+
for (let e of n.querySelectorAll(t.tab)) d.observe(e);
|
|
262
|
+
}, p = new MutationObserver((e) => {
|
|
263
|
+
if (f(), a(), e.some((e) => e.type === "attributes")) {
|
|
243
264
|
c.follow = !0;
|
|
244
265
|
let e = o();
|
|
245
|
-
e && l(e);
|
|
266
|
+
e && !u.pressed() && l(e);
|
|
246
267
|
}
|
|
247
268
|
});
|
|
248
|
-
|
|
269
|
+
p.observe(n, {
|
|
249
270
|
subtree: !0,
|
|
250
271
|
childList: !0,
|
|
251
272
|
attributeFilter: ["data-state"]
|
|
252
273
|
});
|
|
253
|
-
let
|
|
254
|
-
|
|
274
|
+
let m = (e) => {
|
|
275
|
+
let n = e.target;
|
|
276
|
+
n instanceof HTMLElement && n.matches(t.tab) && (c.follow = n.matches(t.active), u.pressed() || l(n));
|
|
255
277
|
};
|
|
256
|
-
n.addEventListener("focusin",
|
|
257
|
-
let
|
|
258
|
-
return
|
|
259
|
-
cancelAnimationFrame(i),
|
|
278
|
+
n.addEventListener("focusin", m), f();
|
|
279
|
+
let h = o();
|
|
280
|
+
return h && l(h, "instant"), r(X(n, t)), () => {
|
|
281
|
+
cancelAnimationFrame(i), d.disconnect(), p.disconnect(), n.removeEventListener("focusin", m), u.dispose(), s.dispose();
|
|
260
282
|
};
|
|
261
|
-
}, [e, t]),
|
|
283
|
+
}, [e, t]), je(e, n.left || n.right, r, t), n;
|
|
262
284
|
}
|
|
263
|
-
function
|
|
285
|
+
function je(e, t, n, r) {
|
|
264
286
|
ee(() => {
|
|
265
287
|
let i = e.current;
|
|
266
288
|
if (!i || !t) return;
|
|
@@ -340,7 +362,7 @@ function $({ list: e, overflow: t }) {
|
|
|
340
362
|
};
|
|
341
363
|
return /* @__PURE__ */ b("div", {
|
|
342
364
|
"data-slot": "tabs-scroll",
|
|
343
|
-
className:
|
|
365
|
+
className: Ce,
|
|
344
366
|
style: {
|
|
345
367
|
top: t.top,
|
|
346
368
|
left: t.x,
|
|
@@ -351,14 +373,14 @@ function $({ list: e, overflow: t }) {
|
|
|
351
373
|
...i,
|
|
352
374
|
"data-slot": "tabs-scroll-left",
|
|
353
375
|
"aria-label": n("material.tabs.scroll-left", "Scroll tabs left"),
|
|
354
|
-
className:
|
|
376
|
+
className: we,
|
|
355
377
|
onClick: () => r(-1),
|
|
356
378
|
children: /* @__PURE__ */ y(re, { "aria-hidden": !0 })
|
|
357
379
|
}), t.right && /* @__PURE__ */ y("button", {
|
|
358
380
|
...i,
|
|
359
381
|
"data-slot": "tabs-scroll-right",
|
|
360
382
|
"aria-label": n("material.tabs.scroll-right", "Scroll tabs right"),
|
|
361
|
-
className:
|
|
383
|
+
className: Te,
|
|
362
384
|
onClick: () => r(1),
|
|
363
385
|
children: /* @__PURE__ */ y(ie, { "aria-hidden": !0 })
|
|
364
386
|
})]
|
|
@@ -366,8 +388,8 @@ function $({ list: e, overflow: t }) {
|
|
|
366
388
|
}
|
|
367
389
|
//#endregion
|
|
368
390
|
//#region lib/components/ui/primitives/tabs/partials/tabs-list.tsx
|
|
369
|
-
function
|
|
370
|
-
let o =
|
|
391
|
+
function Me({ className: n, children: r, ref: i, ...a }) {
|
|
392
|
+
let o = B(), s = v(null), c = Z(s);
|
|
371
393
|
return /* @__PURE__ */ b(ne, { children: [/* @__PURE__ */ b(he, {
|
|
372
394
|
ref: h((e) => {
|
|
373
395
|
s.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
|
|
@@ -376,7 +398,7 @@ function je({ className: n, children: r, ref: i, ...a }) {
|
|
|
376
398
|
"data-pw": "tabs-list",
|
|
377
399
|
"data-overflow-left": c.left ? "" : void 0,
|
|
378
400
|
"data-overflow-right": c.right ? "" : void 0,
|
|
379
|
-
className: e(j[o],
|
|
401
|
+
className: e(j[o], L, n),
|
|
380
402
|
...a,
|
|
381
403
|
children: [/* @__PURE__ */ y(t, { children: r }), /* @__PURE__ */ y(Q, { look: o })]
|
|
382
404
|
}), /* @__PURE__ */ y($, {
|
|
@@ -386,10 +408,10 @@ function je({ className: n, children: r, ref: i, ...a }) {
|
|
|
386
408
|
}
|
|
387
409
|
//#endregion
|
|
388
410
|
//#region lib/components/ui/primitives/tabs/partials/tabs-trigger.tsx
|
|
389
|
-
function
|
|
411
|
+
function Ne({ className: n, children: r, icon: i, ...a }) {
|
|
390
412
|
return /* @__PURE__ */ b(ge, {
|
|
391
413
|
"data-slot": "tabs-trigger",
|
|
392
|
-
className: e(P[
|
|
414
|
+
className: e(P[B()], n),
|
|
393
415
|
...a,
|
|
394
416
|
children: [i && /* @__PURE__ */ y("span", {
|
|
395
417
|
"data-slot": "tabs-trigger-icon",
|
|
@@ -406,9 +428,9 @@ function Me({ className: n, children: r, icon: i, ...a }) {
|
|
|
406
428
|
}
|
|
407
429
|
//#endregion
|
|
408
430
|
//#region lib/components/ui/primitives/tabs/tabs.tsx
|
|
409
|
-
function
|
|
431
|
+
function Pe({ className: t, variant: n = "underline", ...r }) {
|
|
410
432
|
let i = k(n);
|
|
411
|
-
return /* @__PURE__ */ y(
|
|
433
|
+
return /* @__PURE__ */ y(z.Provider, {
|
|
412
434
|
value: i,
|
|
413
435
|
children: /* @__PURE__ */ y(me, {
|
|
414
436
|
"data-slot": "tabs",
|
|
@@ -419,4 +441,4 @@ function Ne({ className: t, variant: n = "underline", ...r }) {
|
|
|
419
441
|
});
|
|
420
442
|
}
|
|
421
443
|
//#endregion
|
|
422
|
-
export { Q as a,
|
|
444
|
+
export { Q as a, B as c, I as d, be as f, k as h, $ as i, L as l, P as m, Ne as n, Z as o, j as p, Me as r, z as s, Pe as t, Se as u };
|
|
@@ -14,7 +14,7 @@ import { D as je, E as Me, N as Ne, O as Pe, c as Fe, d as Ie, f as Le, i as Re,
|
|
|
14
14
|
import { a as Ke, i as qe, n as Je } from "./field-blur-context-BLGgf_3z.js";
|
|
15
15
|
import { i as Ye, n as Xe, r as Ze, t as Qe } from "./popover-Dzk4-l9U.js";
|
|
16
16
|
import { a as $e, i as et, n as tt, o as nt, t as rt } from "./bubble-input-CQwVSoU3.js";
|
|
17
|
-
import { n as it, r as at, t as ot, u as st } from "./tabs-
|
|
17
|
+
import { n as it, r as at, t as ot, u as st } from "./tabs-95Y2LmnV.js";
|
|
18
18
|
import { a as ct, n as lt, o as ut, s as dt, v as ft, y as pt } from "./toolbar-items-BsgzHSNf.js";
|
|
19
19
|
import { t as mt } from "./dist-DkQbkF9T.js";
|
|
20
20
|
import { o as ht, s as gt, t as _t } from "./use-click-lock-Bwg_caHO.js";
|
|
@@ -1530,7 +1530,7 @@ import { EventChip } from '@nxgt/material/components';
|
|
|
1530
1530
|
| `allDay` | `boolean` | `false` | no time |
|
|
1531
1531
|
| `compact` | `boolean` | `false` | one line, the time before the title, for month cells |
|
|
1532
1532
|
| `continuesBefore`, `continuesAfter` | `boolean` | `false` | square edges for a multi-day event |
|
|
1533
|
-
| `badge` | `{ label: string; tone?: Tone }` | — | a small tinted label after the title (neutral without a `tone`); cut with an ellipsis
|
|
1533
|
+
| `badge` | `{ label: string; tone?: Tone }` | — | a small tinted label after the title (neutral without a `tone`); cut with an ellipsis; in a box under 20px tall or 7rem wide it becomes a tone dot (its tooltip is the label) while the label stays in the chip's accessible name. `EventCalendar` sets it from `CalendarEvent.badge` |
|
|
1534
1534
|
| `selected`, `disabled` | `boolean` | `false` | state |
|
|
1535
1535
|
|
|
1536
1536
|
**Storybook:** `Data display/EventChip` · **Vue:** `EventChip` (`variant`, `endTime`: React only for now, #892; `badge`: #2526)
|
|
@@ -367,8 +367,10 @@ const events: CalendarEvent[] = [
|
|
|
367
367
|
- **Accessibility.** The label is part of the event's name (`Visit, Follow-up`),
|
|
368
368
|
and the tone is never the only signal.
|
|
369
369
|
- **Small boxes.** A long label is cut with an ellipsis inside its chip. In a
|
|
370
|
-
box under 20px tall or
|
|
371
|
-
|
|
370
|
+
box under 20px tall or 7rem wide (a phone's week column) it falls back to a
|
|
371
|
+
small dot in the badge's tone, with the label as its tooltip; the label stays
|
|
372
|
+
in the event's accessible name. The agenda view wraps a long description
|
|
373
|
+
instead of cutting it.
|
|
372
374
|
|
|
373
375
|
### EventCalendar resources
|
|
374
376
|
|