@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t } from "./dist-B61_o9Mg.js";
|
|
3
3
|
import { t as n } from "./use-material-translation-DOkTaWK_.js";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
//#region lib/components/ui/feedback/spinner/spinner.tsx
|
package/dist/theme-picker.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { a as t, i as n, n as r, o as i, r as a, t as o } from "./bubble-input-B7BVd9fX.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as u } from "./use-theme-
|
|
3
|
+
import { a as s, r as c } from "./icon-sprites-CaYXzOL4.js";
|
|
4
|
+
import { t as l } from "./use-material-translation-DOkTaWK_.js";
|
|
5
|
+
import { t as u } from "./use-theme-BCLireTd.js";
|
|
6
6
|
import { a as d, r as f } from "./theme-context-Cofk6vgs.js";
|
|
7
|
-
import { t as p } from "./theme-toggle-
|
|
8
|
-
import { n as m, t as h } from "./nxgt-theme-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
7
|
+
import { t as p } from "./theme-toggle-Dnjn83TJ.js";
|
|
8
|
+
import { n as m, t as h } from "./nxgt-theme-ivgNca3z.js";
|
|
9
|
+
import { useContext as g } from "react";
|
|
10
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
11
|
+
import { ICON_PACKS as y, IconRefError as b, resolveIconStyles as x, resolveIcons as S, spriteHref as C } from "@nxgt/material-core/icons";
|
|
12
|
+
import { freeIcon as w } from "@nxgt/material-core/icons/free";
|
|
13
|
+
import { Check as T } from "lucide-react";
|
|
14
14
|
import { THEME_PRESETS as E } from "@nxgt/material-core/theme/presets";
|
|
15
15
|
//#region lib/theme-picker/partials/mode-control.tsx
|
|
16
16
|
function D() {
|
|
17
|
-
let { t: e } =
|
|
18
|
-
return /* @__PURE__ */
|
|
17
|
+
let { t: e } = l();
|
|
18
|
+
return /* @__PURE__ */ v("fieldset", {
|
|
19
19
|
"data-slot": "theme-picker-mode",
|
|
20
20
|
className: "m-0 flex min-w-0 items-center justify-between gap-3 border-0 p-0",
|
|
21
21
|
children: [
|
|
22
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ _("legend", {
|
|
23
23
|
className: "sr-only",
|
|
24
24
|
children: e("material.theme-picker.mode", "Mode")
|
|
25
25
|
}),
|
|
26
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ _("span", {
|
|
27
27
|
"aria-hidden": !0,
|
|
28
28
|
className: "text-sm font-medium text-muted-foreground",
|
|
29
29
|
children: e("material.theme-picker.mode", "Mode")
|
|
30
30
|
}),
|
|
31
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ _(p, {})
|
|
32
32
|
]
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -37,60 +37,60 @@ function D() {
|
|
|
37
37
|
var O = 4;
|
|
38
38
|
function k(e, t, n = "pro") {
|
|
39
39
|
try {
|
|
40
|
-
let r =
|
|
41
|
-
return
|
|
42
|
-
let [a] =
|
|
43
|
-
return
|
|
40
|
+
let r = x([e.iconStyle ?? []].flat().map((e) => typeof e == "object" && "style" in e ? e.style : e)), i = e.icons ?? "school";
|
|
41
|
+
return S(i), (typeof i == "string" ? y[i] : i).slice(0, O).map((e, i) => {
|
|
42
|
+
let [a] = S([e], r[i % r.length]), o = a;
|
|
43
|
+
return C(n === "free" ? w(o) : o, t);
|
|
44
44
|
});
|
|
45
45
|
} catch (e) {
|
|
46
|
-
if (e instanceof
|
|
46
|
+
if (e instanceof b) return [];
|
|
47
47
|
throw e;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region lib/theme-picker/partials/mini-background.tsx
|
|
52
52
|
function A({ background: e }) {
|
|
53
|
-
let t = e ? e.preset : "none", n =
|
|
54
|
-
return /* @__PURE__ */
|
|
53
|
+
let t = e ? e.preset : "none", n = s(), r = c(), i = e && t === "icons" ? k(e, n, r) : [];
|
|
54
|
+
return /* @__PURE__ */ _("span", {
|
|
55
55
|
"aria-hidden": !0,
|
|
56
56
|
"data-slot": "theme-tile-background",
|
|
57
57
|
"data-preset": t,
|
|
58
58
|
"data-tone": e ? e.tone ?? "primary" : "none",
|
|
59
59
|
"data-intensity": e ? e.intensity ?? "default" : "none",
|
|
60
|
-
children: i.map((e, t) => /* @__PURE__ */
|
|
60
|
+
children: i.map((e, t) => /* @__PURE__ */ _("svg", {
|
|
61
61
|
"aria-hidden": "true",
|
|
62
62
|
"data-slot": "theme-tile-icon",
|
|
63
63
|
"data-n": t + 1,
|
|
64
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ _("use", { href: e })
|
|
65
65
|
}, `${t}-${e}`))
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region lib/theme-picker/partials/theme-tile.tsx
|
|
70
70
|
function j({ theme: e, label: r, showBackground: s, background: c }) {
|
|
71
|
-
let l = /* @__PURE__ */
|
|
71
|
+
let l = /* @__PURE__ */ _(h, {
|
|
72
72
|
theme: e,
|
|
73
73
|
asChild: !0,
|
|
74
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ v(i, {
|
|
75
75
|
"data-slot": "theme-tile",
|
|
76
76
|
children: [
|
|
77
|
-
s && /* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
77
|
+
s && /* @__PURE__ */ _(A, { background: c }),
|
|
78
|
+
/* @__PURE__ */ v("span", {
|
|
79
79
|
"data-slot": "theme-tile-swatches",
|
|
80
80
|
"aria-hidden": !0,
|
|
81
81
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ _("i", { "data-swatch": "primary" }),
|
|
83
|
+
/* @__PURE__ */ _("i", { "data-swatch": "secondary" }),
|
|
84
|
+
/* @__PURE__ */ _("i", { "data-swatch": "tertiary" })
|
|
85
85
|
]
|
|
86
86
|
}),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ _("span", {
|
|
88
88
|
"data-slot": "theme-tile-label",
|
|
89
89
|
children: r
|
|
90
90
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ _(a, {
|
|
92
92
|
asChild: !0,
|
|
93
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ _(T, {
|
|
94
94
|
"aria-hidden": !0,
|
|
95
95
|
"data-slot": "theme-tile-check"
|
|
96
96
|
})
|
|
@@ -98,9 +98,9 @@ function j({ theme: e, label: r, showBackground: s, background: c }) {
|
|
|
98
98
|
]
|
|
99
99
|
})
|
|
100
100
|
});
|
|
101
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ _(t, {
|
|
102
102
|
value: e.name,
|
|
103
|
-
...o(l, /* @__PURE__ */
|
|
103
|
+
...o(l, /* @__PURE__ */ _(n, {}))
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
//#endregion
|
|
@@ -116,27 +116,27 @@ function M(e, t) {
|
|
|
116
116
|
}
|
|
117
117
|
//#endregion
|
|
118
118
|
//#region lib/theme-picker/theme-picker.tsx
|
|
119
|
-
function N({ themes: t, value: n, onValueChange: i, showMode: a = !0, showBackground: o = !0, layout:
|
|
120
|
-
let { t: h, language:
|
|
121
|
-
return /* @__PURE__ */
|
|
119
|
+
function N({ themes: t, value: n, onValueChange: i, showMode: a = !0, showBackground: o = !0, layout: s = "grid", className: c, ...p }) {
|
|
120
|
+
let { t: h, language: y } = l(), b = g(f), { themeName: x, setThemeName: S } = u(), C = d()?.name ?? x, w = t ?? b ?? E;
|
|
121
|
+
return /* @__PURE__ */ v("div", {
|
|
122
122
|
"data-slot": "theme-picker",
|
|
123
|
-
"data-layout":
|
|
124
|
-
className: e("flex flex-col gap-4",
|
|
123
|
+
"data-layout": s,
|
|
124
|
+
className: e("flex flex-col gap-4", c),
|
|
125
125
|
...p,
|
|
126
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ _(r, {
|
|
127
127
|
"data-slot": "theme-picker-group",
|
|
128
128
|
"aria-label": h("material.theme-picker.label", "Theme"),
|
|
129
129
|
value: n ?? C,
|
|
130
130
|
onValueChange: (e) => {
|
|
131
131
|
n === void 0 && S(e), i?.(e);
|
|
132
132
|
},
|
|
133
|
-
children: w.map((e) => /* @__PURE__ */
|
|
133
|
+
children: w.map((e) => /* @__PURE__ */ _(j, {
|
|
134
134
|
theme: e,
|
|
135
|
-
label: M(e,
|
|
135
|
+
label: M(e, y),
|
|
136
136
|
showBackground: o,
|
|
137
137
|
background: m(e.name, e).background
|
|
138
138
|
}, e.name))
|
|
139
|
-
}), a && /* @__PURE__ */
|
|
139
|
+
}), a && /* @__PURE__ */ _(D, {})]
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
2
|
-
import { t } from "./
|
|
1
|
+
import { t as e } from "./warn-once-C_e47JM8.js";
|
|
2
|
+
import { t } from "./read-storage-C2J90bNm.js";
|
|
3
3
|
import { DEFAULT_THEME_NAME as n, THEME_NAME_PATTERN as r } from "@nxgt/material-core/theme/boot";
|
|
4
4
|
//#region lib/hooks/resolve-theme.ts
|
|
5
5
|
function i(e, t, n = "system") {
|
|
@@ -24,10 +24,10 @@ function c(e) {
|
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region lib/hooks/theme-store.ts
|
|
26
26
|
var l = "theme", u = "nxgt-theme";
|
|
27
|
-
function d(
|
|
27
|
+
function d(e, n) {
|
|
28
28
|
let r = /* @__PURE__ */ new Set(), i;
|
|
29
29
|
function a() {
|
|
30
|
-
let n = e
|
|
30
|
+
let n = t(e);
|
|
31
31
|
if (n == null) return i;
|
|
32
32
|
try {
|
|
33
33
|
let e = JSON.parse(n);
|
|
@@ -39,8 +39,8 @@ function d(t, n) {
|
|
|
39
39
|
function o() {
|
|
40
40
|
for (let e of r) e();
|
|
41
41
|
}
|
|
42
|
-
function s(
|
|
43
|
-
|
|
42
|
+
function s(t) {
|
|
43
|
+
t.key !== e && t.key !== null || (n?.(), o());
|
|
44
44
|
}
|
|
45
45
|
return {
|
|
46
46
|
subscribe(e) {
|
|
@@ -50,12 +50,12 @@ function d(t, n) {
|
|
|
50
50
|
},
|
|
51
51
|
getSnapshot: a,
|
|
52
52
|
getServerSnapshot: () => void 0,
|
|
53
|
-
write(
|
|
53
|
+
write(t) {
|
|
54
54
|
i = void 0;
|
|
55
55
|
try {
|
|
56
|
-
|
|
56
|
+
t === void 0 ? globalThis.localStorage?.removeItem(e) : globalThis.localStorage?.setItem(e, JSON.stringify(t));
|
|
57
57
|
} catch {
|
|
58
|
-
i =
|
|
58
|
+
i = t;
|
|
59
59
|
}
|
|
60
60
|
o();
|
|
61
61
|
}
|
|
@@ -79,12 +79,12 @@ var f = d(l), p = {
|
|
|
79
79
|
m === e && (m = void 0);
|
|
80
80
|
};
|
|
81
81
|
},
|
|
82
|
-
set(
|
|
83
|
-
if (m && !m.known.includes(
|
|
84
|
-
|
|
82
|
+
set(t) {
|
|
83
|
+
if (m && !m.known.includes(t)) {
|
|
84
|
+
e(`setThemeName("${t}") ignored: not one of its themes (${m.known.join(", ")}).`, "NxgtThemeProvider");
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
|
-
h.write(
|
|
87
|
+
h.write(t), m || c(t);
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
//#endregion
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { t as e } from "./use-material-translation-DOkTaWK_.js";
|
|
2
|
-
import { i as t } from "./theme-store-
|
|
3
|
-
import { n, t as r } from "./use-theme-
|
|
2
|
+
import { i as t } from "./theme-store-BdPp43cV.js";
|
|
3
|
+
import { n, t as r } from "./use-theme-BCLireTd.js";
|
|
4
4
|
import { r as i } from "./theme-context-Cofk6vgs.js";
|
|
5
|
-
import { n as a, t as o } from "./toggle-group-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { n as a, t as o } from "./toggle-group-BkH23Jk4.js";
|
|
6
|
+
import { useContext as s, useEffect as c } from "react";
|
|
7
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
import { Monitor as d, Moon as f, Sun as p } from "lucide-react";
|
|
9
9
|
//#region lib/components/ui/actions/theme-toggle/theme-toggle.tsx
|
|
10
10
|
function m({ className: m }) {
|
|
11
|
-
let { t: h } = e(), { theme: g, preference: _, updateTheme: v } = r(), y = n(), b =
|
|
12
|
-
return
|
|
11
|
+
let { t: h } = e(), { theme: g, preference: _, updateTheme: v } = r(), y = n(), b = s(i) !== null;
|
|
12
|
+
return c(() => {
|
|
13
13
|
y && !b && t(g);
|
|
14
14
|
}, [
|
|
15
15
|
y,
|
|
16
16
|
b,
|
|
17
17
|
g
|
|
18
|
-
]), /* @__PURE__ */
|
|
18
|
+
]), /* @__PURE__ */ u(o, {
|
|
19
19
|
type: "single",
|
|
20
20
|
value: _,
|
|
21
21
|
"data-slot": "theme-toggle",
|
|
@@ -26,20 +26,20 @@ function m({ className: m }) {
|
|
|
26
26
|
(e === "light" || e === "dark" || e === "system") && v(e);
|
|
27
27
|
},
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ l(a, {
|
|
30
30
|
value: "light",
|
|
31
31
|
"aria-label": h("material.theme-toggle.light", "Light"),
|
|
32
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ l(p, {})
|
|
33
33
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ l(a, {
|
|
35
35
|
value: "dark",
|
|
36
36
|
"aria-label": h("material.theme-toggle.dark", "Dark"),
|
|
37
|
-
children: /* @__PURE__ */ f
|
|
37
|
+
children: /* @__PURE__ */ l(f, {})
|
|
38
38
|
}),
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ l(a, {
|
|
40
40
|
value: "system",
|
|
41
41
|
"aria-label": h("material.theme-toggle.system", "System"),
|
|
42
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ l(d, {})
|
|
43
43
|
})
|
|
44
44
|
]
|
|
45
45
|
});
|
package/dist/themes.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./is-production-GLw59WU8.js";
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { n as p, t as m } from "./nxgt-theme-
|
|
2
|
+
import { t } from "./warn-once-C_e47JM8.js";
|
|
3
|
+
import { t as n } from "./use-ssr-media-query-C6M5m8sf.js";
|
|
4
|
+
import { a as r, i, n as a, o, r as s, s as c, t as l } from "./theme-store-BdPp43cV.js";
|
|
5
|
+
import { a as u, n as d, r as f } from "./theme-context-Cofk6vgs.js";
|
|
6
|
+
import { n as p, t as m } from "./nxgt-theme-ivgNca3z.js";
|
|
7
7
|
import { useEffect as h, useLayoutEffect as g, useMemo as _, useSyncExternalStore as v } from "react";
|
|
8
8
|
import { jsx as y } from "react/jsx-runtime";
|
|
9
9
|
import { THEME_BOOT_SCRIPT as b, themeBootScript as x } from "@nxgt/material-core/theme/boot";
|
|
@@ -16,32 +16,32 @@ function B(t) {
|
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region lib/themes/nxgt-theme-provider.tsx
|
|
18
18
|
var V = () => () => {}, H = () => v(V, () => !1, () => !0);
|
|
19
|
-
function U({ themes:
|
|
20
|
-
let S = v(
|
|
21
|
-
!e() && !w.includes(m) &&
|
|
22
|
-
let E =
|
|
23
|
-
g(() =>
|
|
19
|
+
function U({ themes: u = T, defaultTheme: m = s, defaultMode: b, children: x }) {
|
|
20
|
+
let S = v(l.subscribe, l.getSnapshot, l.getServerSnapshot), C = H(), w = _(() => u.map((e) => e.name), [u]);
|
|
21
|
+
!e() && !w.includes(m) && t(`defaultTheme "${m}" is not in themes (${w.join(", ")}).`, "NxgtThemeProvider");
|
|
22
|
+
let E = c(S, w, m), D = u.find((e) => e.name === E), O = b ?? D?.colorScheme ?? "system";
|
|
23
|
+
g(() => l.claim({
|
|
24
24
|
known: w,
|
|
25
25
|
fallback: m
|
|
26
26
|
}), [w, m]), h(() => {
|
|
27
|
-
C ||
|
|
27
|
+
C || r(E);
|
|
28
28
|
}, [E, C]);
|
|
29
|
-
let k =
|
|
29
|
+
let k = o(v(a.subscribe, a.getSnapshot, a.getServerSnapshot), n("(prefers-color-scheme: dark)", !1), O).theme;
|
|
30
30
|
h(() => {
|
|
31
|
-
C ||
|
|
31
|
+
C || i(k);
|
|
32
32
|
}, [k, C]);
|
|
33
33
|
let A = _(() => p(E, D, O), [
|
|
34
34
|
E,
|
|
35
35
|
D,
|
|
36
36
|
O
|
|
37
37
|
]);
|
|
38
|
-
return /* @__PURE__ */ y(
|
|
39
|
-
value:
|
|
40
|
-
children: /* @__PURE__ */ y(
|
|
38
|
+
return /* @__PURE__ */ y(f.Provider, {
|
|
39
|
+
value: u,
|
|
40
|
+
children: /* @__PURE__ */ y(d.Provider, {
|
|
41
41
|
value: A,
|
|
42
42
|
children: x
|
|
43
43
|
})
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
//#endregion
|
|
47
|
-
export { m as NxgtTheme, U as NxgtThemeProvider, b as THEME_BOOT_SCRIPT, w as THEME_PRESETS, S as ThemeDefinitionError, E as ambre, D as ardoise, O as bleumono, k as bluemoon, A as corail, B as defineTheme, j as foret, M as lavande, N as menthe, P as ocean, F as pink, I as prune, L as sable, R as slate, z as teal, x as themeBootScript,
|
|
47
|
+
export { m as NxgtTheme, U as NxgtThemeProvider, b as THEME_BOOT_SCRIPT, w as THEME_PRESETS, S as ThemeDefinitionError, E as ambre, D as ardoise, O as bleumono, k as bluemoon, A as corail, B as defineTheme, j as foret, M as lavande, N as menthe, P as ocean, F as pink, I as prune, L as sable, R as slate, z as teal, x as themeBootScript, u as useThemeContext };
|
|
@@ -2,11 +2,11 @@ import { t as e } from "./utils-BLfntITJ.js";
|
|
|
2
2
|
import { n as t } from "./dist-DVRQkaTK.js";
|
|
3
3
|
import { a as n, n as r, t as i } from "./dist-B7RjY7SL.js";
|
|
4
4
|
import { t as a } from "./has-text-content-Ds2dkHX_.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { Check as c } from "lucide-react";
|
|
7
7
|
//#region lib/components/ui/primitives/separator/separator.tsx
|
|
8
8
|
function l({ className: t, orientation: r = "horizontal", decorative: i = !0, ...a }) {
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ o(n, {
|
|
10
10
|
"data-slot": "separator",
|
|
11
11
|
decorative: i,
|
|
12
12
|
orientation: r,
|
|
@@ -24,9 +24,9 @@ function d(e) {
|
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region lib/components/ui/primitives/toggle-group/toggle-group.tsx
|
|
27
|
-
function f({ className: t, variant: n, size: r, orientation: a, children:
|
|
27
|
+
function f({ className: t, variant: n, size: r, orientation: a, children: c, ...l }) {
|
|
28
28
|
let f = u(n);
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ s(i, {
|
|
30
30
|
"data-slot": "toggle-group",
|
|
31
31
|
"data-variant": f,
|
|
32
32
|
"data-size": d(r),
|
|
@@ -36,7 +36,7 @@ function f({ className: t, variant: n, size: r, orientation: a, children: o, ...
|
|
|
36
36
|
orientation: a,
|
|
37
37
|
className: e("nxgt-toggle-group", t),
|
|
38
38
|
...l,
|
|
39
|
-
children: [
|
|
39
|
+
children: [c, f === "segmented" && l.type === "single" ? /* @__PURE__ */ o("span", {
|
|
40
40
|
"data-slot": "toggle-group-indicator",
|
|
41
41
|
"aria-hidden": "true"
|
|
42
42
|
}) : null]
|
|
@@ -44,21 +44,21 @@ function f({ className: t, variant: n, size: r, orientation: a, children: o, ...
|
|
|
44
44
|
}
|
|
45
45
|
function p({ className: n, children: i, variant: l, size: u, ...d }) {
|
|
46
46
|
let f = !a(i) && !!(d["aria-label"] || d["aria-labelledby"]);
|
|
47
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ s(r, {
|
|
48
48
|
"data-slot": "toggle-group-item",
|
|
49
49
|
"data-pw": d.value ? `toggle-group-item-${d.value}` : "toggle-group-item",
|
|
50
50
|
"data-icon-only": f ? "" : void 0,
|
|
51
51
|
className: e("nxgt-toggle-group-item", n),
|
|
52
52
|
...d,
|
|
53
|
-
children: [/* @__PURE__ */
|
|
53
|
+
children: [/* @__PURE__ */ o("span", {
|
|
54
54
|
"data-slot": "toggle-group-check",
|
|
55
55
|
"aria-hidden": "true",
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
}), /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ o(c, { strokeWidth: 2.75 })
|
|
57
|
+
}), /* @__PURE__ */ o(t, { children: i })]
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
function m({ className: t, ...n }) {
|
|
61
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ o(l, {
|
|
62
62
|
"data-slot": "toggle-group-separator",
|
|
63
63
|
className: e("h-6! bg-muted-foreground/60 mx-1", t),
|
|
64
64
|
orientation: "vertical",
|