@trinityui/design-system 2.0.3 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist/app-shell.js +4435 -3098
- package/dist/components/AI/AIChainOfThought.d.ts +228 -0
- package/dist/components/AI/AIChainOfThought.d.ts.map +1 -0
- package/dist/components/AI/index.d.ts +1 -0
- package/dist/components/AI/index.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/Footer.d.ts.map +1 -1
- package/dist/components/TopNavHeader.d.ts +73 -8
- package/dist/components/TopNavHeader.d.ts.map +1 -1
- package/dist/components/TopNavWithSidebar.d.ts +61 -8
- package/dist/components/TopNavWithSidebar.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/navigation/index.d.ts +1 -1
- package/dist/components/navigation/index.d.ts.map +1 -1
- package/dist/components/navigation/types.d.ts +33 -0
- package/dist/components/navigation/types.d.ts.map +1 -1
- package/dist/components/shared/TrinityIconSvg.d.ts +18 -0
- package/dist/components/shared/TrinityIconSvg.d.ts.map +1 -0
- package/dist/data-table2.js +1792 -1792
- package/dist/forms.js +963 -962
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1627 -1622
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +214 -101
- package/dist/tokens.d.ts +61 -3
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +1 -1
- package/dist/trinity.css +70 -10
- package/package.json +1 -1
package/dist/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,O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,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAChG,4CAA4C;IAC5C,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,aAAa,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,KAAK,MAAM,CAAC;IAClE,sCAAsC;IACtC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,aAAa,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,KAAK,MAAM,CAAC;IACrE,kCAAkC;IAClC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,aAAa,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,KAAK,MAAM,CAAC;IACtE,2BAA2B;IAC3B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,aAAa,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,KAAK,MAAM,CAAC;CAClE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,IAAI,sBAAsB,CA2DzD;AAGD,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/theme.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { createTheme as M, useTheme as C } from "@mui/material/styles";
|
|
2
|
-
import { t
|
|
2
|
+
import { t, c as o, d as x, e as R, s as m, a as y } from "./app-shell.js";
|
|
3
3
|
import { g as Z, j as q, f as J, o as K, m as Q, p as U, n as Y, h as _, k, i as S, l as rr } from "./app-shell.js";
|
|
4
|
-
import { useMemo as
|
|
5
|
-
function
|
|
4
|
+
import { useMemo as w } from "react";
|
|
5
|
+
function O(...r) {
|
|
6
6
|
return `--trinity-${r.join("-").replace(/([A-Z])/g, "-$1").toLowerCase()}`;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function i(r, a = []) {
|
|
9
9
|
const s = [];
|
|
10
|
-
for (const [
|
|
11
|
-
const
|
|
10
|
+
for (const [e, c] of Object.entries(r)) {
|
|
11
|
+
const u = [...a, e];
|
|
12
12
|
if (c != null)
|
|
13
13
|
if (typeof c == "object" && !Array.isArray(c))
|
|
14
|
-
s.push(...
|
|
14
|
+
s.push(...i(c, u));
|
|
15
15
|
else {
|
|
16
|
-
const
|
|
17
|
-
s.push({ name:
|
|
16
|
+
const n = typeof c == "number" && !e.includes("opacity") && !e.includes("weight") && !e.includes("Height") ? `${c}px` : String(c);
|
|
17
|
+
s.push({ name: O(...u), value: n });
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
return s;
|
|
21
21
|
}
|
|
22
|
-
function z(r =
|
|
22
|
+
function z(r = t) {
|
|
23
23
|
const a = [];
|
|
24
|
-
return a.push(...
|
|
24
|
+
return a.push(...i(r.base.colors, ["color"])), a.push(...i(r.base.spacing, ["spacing"])), a.push(...i(r.base.fontSize, ["font-size"])), a.push(...i(r.base.fontWeight, ["font-weight"])), a.push(...i(r.base.lineHeight, ["line-height"])), a.push(...i(r.base.letterSpacing, ["letter-spacing"])), a.push(...i(r.base.borderRadius, ["radius"])), a.push(...i(r.base.borderWidth, ["border-width"])), a.push(...i(r.base.shadows, ["shadow"])), a.push(...i(r.base.zIndex, ["z-index"])), a.push(...i(r.base.duration, ["duration"])), a.push(...i(r.base.easing, ["easing"])), a.push(...i(r.base.opacity, ["opacity"])), a.push(...i(r.base.breakpoints, ["breakpoint"])), a.push(...i(r.semantic.colors, ["semantic"])), a.push(...i(r.semantic.spacing, ["semantic-spacing"])), a.push(...i(r.semantic.borders, ["semantic-border"])), a.push(...i(r.semantic.shadows, ["semantic-shadow"])), a.push(...i(r.semantic.motion, ["motion"])), a.push(...i(r.component, ["component"])), a.map((s) => ` ${s.name}: ${s.value};`).join(`
|
|
25
25
|
`);
|
|
26
26
|
}
|
|
27
|
-
function $(r =
|
|
27
|
+
function $(r = t) {
|
|
28
28
|
const a = [];
|
|
29
|
-
return a.push(...
|
|
29
|
+
return a.push(...i(r.darkMode.colors.text, ["semantic", "text"])), a.push(...i(r.darkMode.colors.background, ["semantic", "background"])), a.push(...i(r.darkMode.colors.border, ["semantic", "border"])), r.darkMode.colors.interactive && a.push(...i(r.darkMode.colors.interactive, ["semantic", "interactive"])), r.darkMode.colors.status && a.push(...i(r.darkMode.colors.status, ["semantic", "status"])), a.map((s) => ` ${s.name}: ${s.value};`).join(`
|
|
30
30
|
`);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function D(r = t) {
|
|
33
33
|
if (typeof window > "u") return;
|
|
34
34
|
const a = z(r), s = document.createElement("style");
|
|
35
35
|
s.id = "trinity-css-variables", s.textContent = `:root {
|
|
36
36
|
${a}
|
|
37
37
|
}`;
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const e = document.getElementById("trinity-css-variables");
|
|
39
|
+
e && e.remove(), document.head.appendChild(s);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function I(r = t) {
|
|
42
42
|
if (typeof window > "u") return;
|
|
43
43
|
const a = $(r), s = document.createElement("style");
|
|
44
44
|
s.id = "trinity-dark-mode-variables", s.textContent = `
|
|
@@ -53,29 +53,29 @@ ${a}
|
|
|
53
53
|
${a}
|
|
54
54
|
}
|
|
55
55
|
}`;
|
|
56
|
-
const
|
|
57
|
-
|
|
56
|
+
const e = document.getElementById("trinity-dark-mode-variables");
|
|
57
|
+
e && e.remove(), document.head.appendChild(s);
|
|
58
58
|
}
|
|
59
59
|
function W(r, a) {
|
|
60
|
-
function s(
|
|
61
|
-
let g =
|
|
60
|
+
function s(n) {
|
|
61
|
+
let g = n.replace("#", "");
|
|
62
62
|
g.length === 3 && (g = g.split("").map((l) => l + l).join(""));
|
|
63
|
-
const
|
|
64
|
-
return [
|
|
63
|
+
const p = parseInt(g, 16);
|
|
64
|
+
return [p >> 16 & 255, p >> 8 & 255, p & 255];
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
const l = [
|
|
66
|
+
function e([n, g, p]) {
|
|
67
|
+
const l = [n, g, p].map((b) => (b /= 255, b <= 0.03928 ? b / 12.92 : Math.pow((b + 0.055) / 1.055, 2.4)));
|
|
68
68
|
return 0.2126 * l[0] + 0.7152 * l[1] + 0.0722 * l[2];
|
|
69
69
|
}
|
|
70
|
-
const c =
|
|
71
|
-
return (Math.max(c,
|
|
70
|
+
const c = e(s(r)), u = e(s(a));
|
|
71
|
+
return (Math.max(c, u) + 0.05) / (Math.min(c, u) + 0.05);
|
|
72
72
|
}
|
|
73
73
|
function P(r, a, s = 4.5) {
|
|
74
|
-
const
|
|
75
|
-
return
|
|
74
|
+
const e = W(r, a);
|
|
75
|
+
return e < s && typeof window < "u" && console.warn(`[Trinity] Low contrast ratio ${e.toFixed(2)} for ${r} on ${a}`), e >= s;
|
|
76
76
|
}
|
|
77
|
-
function T(r =
|
|
78
|
-
const s = a === "dark" ? "rgba(255, 255, 255, 0.12)" : r.base.colors.gray[200],
|
|
77
|
+
function T(r = t, a = "light") {
|
|
78
|
+
const s = a === "dark" ? "rgba(255, 255, 255, 0.12)" : r.base.colors.gray[200], e = a === "dark" ? "rgba(255, 255, 255, 0.2)" : r.base.colors.gray[300];
|
|
79
79
|
return {
|
|
80
80
|
MuiCssBaseline: {
|
|
81
81
|
styleOverrides: {
|
|
@@ -100,66 +100,121 @@ function T(r = p, a = "light") {
|
|
|
100
100
|
root: {
|
|
101
101
|
padding: `${r.base.spacing[2]}px ${r.base.spacing[5]}px`,
|
|
102
102
|
borderRadius: r.base.borderRadius.full,
|
|
103
|
-
fontWeight: r.base.fontWeight.semibold
|
|
103
|
+
fontWeight: r.base.fontWeight.semibold,
|
|
104
|
+
// Disabled state (all variants)
|
|
105
|
+
"&.Mui-disabled": {
|
|
106
|
+
backgroundColor: a === "dark" ? r.base.colors.gray[700] : r.base.colors.gray[200],
|
|
107
|
+
color: a === "dark" ? r.base.colors.gray[500] : r.base.colors.gray[400]
|
|
108
|
+
}
|
|
104
109
|
},
|
|
105
|
-
// Text buttons
|
|
110
|
+
// ── Text buttons ──
|
|
106
111
|
text: {
|
|
107
112
|
color: a === "dark" ? r.base.colors.gray[100] : r.base.colors.navy[900],
|
|
108
113
|
"&:hover": {
|
|
109
114
|
backgroundColor: a === "dark" ? r.semantic.effects.onDark.subtle : r.semantic.effects.overlay.hover
|
|
110
|
-
|
|
115
|
+
},
|
|
116
|
+
"&:active": {
|
|
117
|
+
backgroundColor: a === "dark" ? r.semantic.effects.onDark.tint : r.semantic.effects.overlay.pressed
|
|
118
|
+
},
|
|
119
|
+
"&.Mui-disabled": {
|
|
120
|
+
backgroundColor: "transparent"
|
|
111
121
|
}
|
|
112
122
|
},
|
|
113
123
|
textPrimary: {
|
|
114
124
|
color: a === "dark" ? r.base.colors.coral[400] : r.base.colors.navy[900],
|
|
115
125
|
"&:hover": {
|
|
116
126
|
backgroundColor: a === "dark" ? "rgba(255, 97, 80, 0.12)" : r.semantic.effects.overlay.hover
|
|
117
|
-
|
|
127
|
+
},
|
|
128
|
+
"&:active": {
|
|
129
|
+
backgroundColor: a === "dark" ? "rgba(255, 97, 80, 0.20)" : r.semantic.effects.overlay.pressed
|
|
118
130
|
}
|
|
119
131
|
},
|
|
120
132
|
textSecondary: {
|
|
121
133
|
color: a === "dark" ? r.base.colors.purple[400] : r.base.colors.coral[800],
|
|
122
134
|
"&:hover": {
|
|
123
135
|
backgroundColor: a === "dark" ? "rgba(120, 65, 201, 0.12)" : r.semantic.effects.overlay.hover
|
|
124
|
-
|
|
136
|
+
},
|
|
137
|
+
"&:active": {
|
|
138
|
+
backgroundColor: a === "dark" ? "rgba(120, 65, 201, 0.20)" : r.semantic.effects.overlay.pressed
|
|
125
139
|
}
|
|
126
140
|
},
|
|
127
|
-
// Contained buttons
|
|
141
|
+
// ── Contained buttons ──
|
|
128
142
|
contained: {
|
|
129
143
|
color: r.base.colors.gray[0]
|
|
130
144
|
},
|
|
131
145
|
containedPrimary: {
|
|
132
|
-
backgroundColor: r.base.colors.navy[900],
|
|
146
|
+
backgroundColor: a === "dark" ? r.base.colors.coral[600] : r.base.colors.navy[900],
|
|
133
147
|
color: r.base.colors.gray[0],
|
|
134
148
|
"&:hover": {
|
|
135
|
-
backgroundColor: r.base.colors.coral[800]
|
|
149
|
+
backgroundColor: a === "dark" ? r.base.colors.coral[500] : r.base.colors.coral[800]
|
|
150
|
+
},
|
|
151
|
+
"&:active": {
|
|
152
|
+
backgroundColor: a === "dark" ? r.base.colors.coral[700] : r.base.colors.navy[800]
|
|
136
153
|
}
|
|
137
154
|
},
|
|
138
155
|
containedSecondary: {
|
|
139
|
-
backgroundColor: r.base.colors.indigo[900],
|
|
156
|
+
backgroundColor: a === "dark" ? r.base.colors.purple[500] : r.base.colors.indigo[900],
|
|
140
157
|
color: r.base.colors.gray[0],
|
|
141
158
|
"&:hover": {
|
|
142
|
-
backgroundColor: r.base.colors.
|
|
143
|
-
|
|
159
|
+
backgroundColor: a === "dark" ? r.base.colors.purple[400] : r.base.colors.indigo[800]
|
|
160
|
+
},
|
|
161
|
+
"&:active": {
|
|
162
|
+
backgroundColor: a === "dark" ? r.base.colors.purple[600] : r.base.colors.indigo[700]
|
|
144
163
|
}
|
|
145
164
|
},
|
|
146
|
-
// Outlined buttons
|
|
165
|
+
// ── Outlined buttons ──
|
|
147
166
|
outlined: {
|
|
148
|
-
borderColor: r.base.colors.navy[900],
|
|
149
|
-
color: r.base.colors.navy[900],
|
|
150
167
|
borderWidth: 2,
|
|
168
|
+
borderColor: a === "dark" ? r.base.colors.gray[500] : r.base.colors.navy[900],
|
|
169
|
+
color: a === "dark" ? r.base.colors.gray[100] : r.base.colors.navy[900],
|
|
151
170
|
"&:hover": {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
171
|
+
borderWidth: 2,
|
|
172
|
+
backgroundColor: a === "dark" ? r.base.colors.coral[600] : r.base.colors.coral[800],
|
|
173
|
+
borderColor: a === "dark" ? r.base.colors.coral[600] : r.base.colors.coral[800],
|
|
174
|
+
color: r.base.colors.gray[0]
|
|
175
|
+
},
|
|
176
|
+
"&:active": {
|
|
177
|
+
borderWidth: 2,
|
|
178
|
+
backgroundColor: a === "dark" ? r.base.colors.coral[700] : r.base.colors.navy[800],
|
|
179
|
+
borderColor: a === "dark" ? r.base.colors.coral[700] : r.base.colors.navy[800],
|
|
180
|
+
color: r.base.colors.gray[0]
|
|
181
|
+
},
|
|
182
|
+
"&.Mui-disabled": {
|
|
183
|
+
borderWidth: 2,
|
|
184
|
+
borderColor: a === "dark" ? r.base.colors.gray[600] : r.base.colors.gray[300],
|
|
185
|
+
backgroundColor: "transparent",
|
|
186
|
+
color: a === "dark" ? r.base.colors.gray[500] : r.base.colors.gray[400]
|
|
156
187
|
}
|
|
157
188
|
},
|
|
158
189
|
outlinedPrimary: {
|
|
159
190
|
borderColor: a === "dark" ? r.base.colors.coral[400] : r.base.colors.navy[900],
|
|
160
|
-
color: a === "dark" ? r.base.colors.coral[400] : r.base.colors.navy[900]
|
|
191
|
+
color: a === "dark" ? r.base.colors.coral[400] : r.base.colors.navy[900],
|
|
192
|
+
"&:hover": {
|
|
193
|
+
backgroundColor: a === "dark" ? r.base.colors.coral[600] : r.base.colors.coral[800],
|
|
194
|
+
borderColor: a === "dark" ? r.base.colors.coral[600] : r.base.colors.coral[800],
|
|
195
|
+
color: r.base.colors.gray[0]
|
|
196
|
+
},
|
|
197
|
+
"&:active": {
|
|
198
|
+
backgroundColor: a === "dark" ? r.base.colors.coral[700] : r.base.colors.navy[800],
|
|
199
|
+
borderColor: a === "dark" ? r.base.colors.coral[700] : r.base.colors.navy[800],
|
|
200
|
+
color: r.base.colors.gray[0]
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
outlinedSecondary: {
|
|
204
|
+
borderColor: a === "dark" ? r.base.colors.purple[400] : r.base.colors.indigo[900],
|
|
205
|
+
color: a === "dark" ? r.base.colors.purple[400] : r.base.colors.indigo[900],
|
|
206
|
+
"&:hover": {
|
|
207
|
+
backgroundColor: a === "dark" ? r.base.colors.purple[500] : r.base.colors.indigo[800],
|
|
208
|
+
borderColor: a === "dark" ? r.base.colors.purple[500] : r.base.colors.indigo[800],
|
|
209
|
+
color: r.base.colors.gray[0]
|
|
210
|
+
},
|
|
211
|
+
"&:active": {
|
|
212
|
+
backgroundColor: a === "dark" ? r.base.colors.purple[600] : r.base.colors.indigo[700],
|
|
213
|
+
borderColor: a === "dark" ? r.base.colors.purple[600] : r.base.colors.indigo[700],
|
|
214
|
+
color: r.base.colors.gray[0]
|
|
215
|
+
}
|
|
161
216
|
},
|
|
162
|
-
// Size variants
|
|
217
|
+
// ── Size variants ──
|
|
163
218
|
sizeSmall: {
|
|
164
219
|
padding: `${r.base.spacing[1]}px ${r.base.spacing[3]}px`,
|
|
165
220
|
fontSize: r.base.fontSize.sm
|
|
@@ -176,12 +231,14 @@ function T(r = p, a = "light") {
|
|
|
176
231
|
},
|
|
177
232
|
styleOverrides: {
|
|
178
233
|
root: {
|
|
179
|
-
borderRadius: r.base.borderRadius.
|
|
234
|
+
borderRadius: r.base.borderRadius.lg,
|
|
235
|
+
// 12px — matches component tokens
|
|
236
|
+
backgroundColor: a === "dark" ? r.base.colors.gray[700] : r.base.colors.gray[0],
|
|
180
237
|
border: `1px solid ${s}`,
|
|
181
|
-
boxShadow: a === "dark" ? "0 1px 3px 0 rgb(0 0 0 / 0.
|
|
238
|
+
boxShadow: a === "dark" ? "0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.3), 0 0 0 1px rgb(255 255 255 / 0.05)" : r.base.shadows.base,
|
|
182
239
|
transition: "box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out",
|
|
183
240
|
"&:hover": {
|
|
184
|
-
boxShadow: a === "dark" ? "0 4px 6px -1px rgb(0 0 0 / 0.
|
|
241
|
+
boxShadow: a === "dark" ? "0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.4), 0 0 0 1px rgb(255 255 255 / 0.05)" : r.base.shadows.md
|
|
185
242
|
}
|
|
186
243
|
}
|
|
187
244
|
}
|
|
@@ -192,31 +249,33 @@ function T(r = p, a = "light") {
|
|
|
192
249
|
},
|
|
193
250
|
styleOverrides: {
|
|
194
251
|
root: {
|
|
195
|
-
borderRadius: r.base.borderRadius.
|
|
252
|
+
borderRadius: r.base.borderRadius.lg,
|
|
253
|
+
// 12px — consistent with cards
|
|
254
|
+
backgroundColor: a === "dark" ? r.base.colors.gray[700] : r.base.colors.gray[0],
|
|
196
255
|
border: `1px solid ${s}`,
|
|
197
|
-
boxShadow: a === "dark" ? "0 1px 2px 0 rgb(0 0 0 / 0.
|
|
256
|
+
boxShadow: a === "dark" ? "0 1px 2px 0 rgb(0 0 0 / 0.3), 0 0 0 1px rgb(255 255 255 / 0.05)" : r.base.shadows.sm
|
|
198
257
|
},
|
|
199
258
|
rounded: {
|
|
200
|
-
borderRadius: r.base.borderRadius.
|
|
259
|
+
borderRadius: r.base.borderRadius.lg
|
|
201
260
|
},
|
|
202
261
|
elevation0: {
|
|
203
262
|
border: `1px solid ${s}`,
|
|
204
|
-
boxShadow: a === "dark" ? "0 1px 2px 0 rgb(0 0 0 / 0.
|
|
263
|
+
boxShadow: a === "dark" ? "0 1px 2px 0 rgb(0 0 0 / 0.3), 0 0 0 1px rgb(255 255 255 / 0.05)" : r.base.shadows.sm
|
|
205
264
|
},
|
|
206
265
|
elevation1: {
|
|
207
266
|
border: `1px solid ${s}`,
|
|
208
|
-
boxShadow: a === "dark" ? "0 1px 3px 0 rgb(0 0 0 / 0.
|
|
267
|
+
boxShadow: a === "dark" ? "0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.3), 0 0 0 1px rgb(255 255 255 / 0.05)" : r.base.shadows.base
|
|
209
268
|
},
|
|
210
269
|
elevation2: {
|
|
211
270
|
border: `1px solid ${s}`,
|
|
212
|
-
boxShadow: a === "dark" ? "0 4px 6px -1px rgb(0 0 0 / 0.
|
|
271
|
+
boxShadow: a === "dark" ? "0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.4), 0 0 0 1px rgb(255 255 255 / 0.05)" : r.base.shadows.md
|
|
213
272
|
},
|
|
214
273
|
elevation3: {
|
|
215
274
|
border: `1px solid ${s}`,
|
|
216
|
-
boxShadow: a === "dark" ? "0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5)
|
|
275
|
+
boxShadow: a === "dark" ? "0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5), 0 0 0 1px rgb(255 255 255 / 0.05)" : r.base.shadows.lg
|
|
217
276
|
},
|
|
218
277
|
outlined: {
|
|
219
|
-
border: `1px solid ${
|
|
278
|
+
border: `1px solid ${e}`,
|
|
220
279
|
boxShadow: "none"
|
|
221
280
|
}
|
|
222
281
|
}
|
|
@@ -228,13 +287,22 @@ function T(r = p, a = "light") {
|
|
|
228
287
|
"&:hover": {
|
|
229
288
|
backgroundColor: a === "dark" ? r.semantic.effects.onDark.subtle : r.semantic.effects.overlay.hoverSubtle
|
|
230
289
|
// 4% black
|
|
290
|
+
},
|
|
291
|
+
"&:active": {
|
|
292
|
+
backgroundColor: a === "dark" ? r.semantic.effects.onDark.tint : r.semantic.effects.overlay.pressed
|
|
231
293
|
}
|
|
232
294
|
},
|
|
233
295
|
colorPrimary: {
|
|
234
|
-
color: a === "dark" ? r.base.colors.coral[400] : r.base.colors.navy[900]
|
|
296
|
+
color: a === "dark" ? r.base.colors.coral[400] : r.base.colors.navy[900],
|
|
297
|
+
"&:hover": {
|
|
298
|
+
backgroundColor: a === "dark" ? "rgba(255, 97, 80, 0.12)" : r.semantic.effects.overlay.hover
|
|
299
|
+
}
|
|
235
300
|
},
|
|
236
301
|
colorSecondary: {
|
|
237
|
-
color: a === "dark" ? r.base.colors.purple[400] : r.base.colors.coral[800]
|
|
302
|
+
color: a === "dark" ? r.base.colors.purple[400] : r.base.colors.coral[800],
|
|
303
|
+
"&:hover": {
|
|
304
|
+
backgroundColor: a === "dark" ? "rgba(120, 65, 201, 0.12)" : r.semantic.effects.overlay.hover
|
|
305
|
+
}
|
|
238
306
|
}
|
|
239
307
|
}
|
|
240
308
|
},
|
|
@@ -251,8 +319,37 @@ function T(r = p, a = "light") {
|
|
|
251
319
|
styleOverrides: {
|
|
252
320
|
paper: {
|
|
253
321
|
borderRadius: r.base.borderRadius.xl,
|
|
254
|
-
// 16px
|
|
255
|
-
|
|
322
|
+
// 16px — allows nested cards with lg:12px
|
|
323
|
+
backgroundColor: a === "dark" ? r.base.colors.gray[700] : r.base.colors.gray[0],
|
|
324
|
+
border: `1px solid ${s}`,
|
|
325
|
+
boxShadow: a === "dark" ? "0 25px 50px -12px rgb(0 0 0 / 0.6), 0 0 0 1px rgb(255 255 255 / 0.1)" : r.base.shadows["2xl"]
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
MuiDialogTitle: {
|
|
330
|
+
styleOverrides: {
|
|
331
|
+
root: {
|
|
332
|
+
fontSize: r.base.fontSize.lg,
|
|
333
|
+
fontWeight: r.base.fontWeight.semibold,
|
|
334
|
+
padding: `${r.base.spacing[5]}px ${r.base.spacing[6]}px`,
|
|
335
|
+
paddingBottom: r.base.spacing[3],
|
|
336
|
+
color: a === "dark" ? r.base.colors.gray[50] : r.base.colors.gray[900]
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
MuiDialogContent: {
|
|
341
|
+
styleOverrides: {
|
|
342
|
+
root: {
|
|
343
|
+
padding: `${r.base.spacing[3]}px ${r.base.spacing[6]}px`,
|
|
344
|
+
color: a === "dark" ? r.base.colors.gray[300] : r.base.colors.gray[600]
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
MuiDialogActions: {
|
|
349
|
+
styleOverrides: {
|
|
350
|
+
root: {
|
|
351
|
+
padding: `${r.base.spacing[3]}px ${r.base.spacing[6]}px ${r.base.spacing[5]}px`,
|
|
352
|
+
gap: r.base.spacing[2]
|
|
256
353
|
}
|
|
257
354
|
}
|
|
258
355
|
},
|
|
@@ -537,8 +634,8 @@ function T(r = p, a = "light") {
|
|
|
537
634
|
},
|
|
538
635
|
"& .MuiSwitch-track": {
|
|
539
636
|
borderRadius: 32 / 2,
|
|
540
|
-
backgroundColor: a === "dark" ? r.base.colors.gray[
|
|
541
|
-
border: `2px solid ${a === "dark" ? r.base.colors.gray[500] : r.base.colors.gray[
|
|
637
|
+
backgroundColor: a === "dark" ? r.base.colors.gray[600] : r.base.colors.gray[200],
|
|
638
|
+
border: `2px solid ${a === "dark" ? r.base.colors.gray[500] : r.base.colors.gray[300]}`,
|
|
542
639
|
opacity: 1,
|
|
543
640
|
transition: "background-color 300ms, border-color 300ms",
|
|
544
641
|
boxSizing: "border-box"
|
|
@@ -788,6 +885,16 @@ function T(r = p, a = "light") {
|
|
|
788
885
|
}
|
|
789
886
|
},
|
|
790
887
|
// ============================================
|
|
888
|
+
// APP BAR / HEADER
|
|
889
|
+
// ============================================
|
|
890
|
+
MuiAppBar: {
|
|
891
|
+
styleOverrides: {
|
|
892
|
+
root: {
|
|
893
|
+
borderRadius: 0
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
// ============================================
|
|
791
898
|
// DRAWER / SIDEBAR
|
|
792
899
|
// ============================================
|
|
793
900
|
MuiDrawer: {
|
|
@@ -809,7 +916,7 @@ function T(r = p, a = "light") {
|
|
|
809
916
|
indicator: {
|
|
810
917
|
backgroundColor: a === "dark" ? r.base.colors.coral[400] : r.base.colors.navy[900],
|
|
811
918
|
height: 3,
|
|
812
|
-
borderRadius:
|
|
919
|
+
borderRadius: 2
|
|
813
920
|
}
|
|
814
921
|
}
|
|
815
922
|
},
|
|
@@ -821,14 +928,20 @@ function T(r = p, a = "light") {
|
|
|
821
928
|
fontSize: r.base.fontSize.sm,
|
|
822
929
|
minHeight: 40,
|
|
823
930
|
padding: `${r.base.spacing[2]}px ${r.base.spacing[4]}px`,
|
|
931
|
+
borderRadius: r.base.borderRadius.xs,
|
|
824
932
|
color: a === "dark" ? r.base.colors.gray[400] : r.base.colors.gray[600],
|
|
933
|
+
transition: "color 0.2s ease, background-color 0.2s ease",
|
|
825
934
|
"&:hover": {
|
|
826
935
|
color: a === "dark" ? r.base.colors.gray[200] : r.base.colors.gray[900],
|
|
827
|
-
backgroundColor: a === "dark" ?
|
|
936
|
+
backgroundColor: a === "dark" ? r.semantic.effects.onDark.subtle : r.semantic.effects.overlay.hoverSubtle
|
|
828
937
|
},
|
|
829
938
|
"&.Mui-selected": {
|
|
830
939
|
color: a === "dark" ? r.base.colors.coral[400] : r.base.colors.navy[900],
|
|
831
940
|
fontWeight: r.base.fontWeight.semibold
|
|
941
|
+
},
|
|
942
|
+
"&:focus-visible": {
|
|
943
|
+
outline: `2px solid ${a === "dark" ? r.base.colors.coral[400] : r.base.colors.navy[900]}`,
|
|
944
|
+
outlineOffset: -2
|
|
832
945
|
}
|
|
833
946
|
}
|
|
834
947
|
}
|
|
@@ -1055,27 +1168,27 @@ function E(r) {
|
|
|
1055
1168
|
const {
|
|
1056
1169
|
mode: a,
|
|
1057
1170
|
name: s = "custom",
|
|
1058
|
-
tokens:
|
|
1171
|
+
tokens: e,
|
|
1059
1172
|
palette: c,
|
|
1060
|
-
components:
|
|
1061
|
-
typography:
|
|
1173
|
+
components: u,
|
|
1174
|
+
typography: n,
|
|
1062
1175
|
shape: g,
|
|
1063
|
-
config:
|
|
1064
|
-
} = r, l =
|
|
1176
|
+
config: p = {}
|
|
1177
|
+
} = r, l = h(a, e);
|
|
1065
1178
|
return {
|
|
1066
1179
|
theme: M(l, {
|
|
1067
1180
|
palette: c,
|
|
1068
|
-
components:
|
|
1069
|
-
typography:
|
|
1181
|
+
components: u,
|
|
1182
|
+
typography: n,
|
|
1070
1183
|
shape: g
|
|
1071
1184
|
}),
|
|
1072
1185
|
name: s,
|
|
1073
1186
|
mode: a,
|
|
1074
|
-
config:
|
|
1187
|
+
config: p
|
|
1075
1188
|
};
|
|
1076
1189
|
}
|
|
1077
|
-
function
|
|
1078
|
-
const s = { ...
|
|
1190
|
+
function h(r, a) {
|
|
1191
|
+
const s = { ...t, ...a }, e = r === "dark" ? {
|
|
1079
1192
|
mode: "dark",
|
|
1080
1193
|
primary: { main: s.base.colors.coral[600], ...s.base.colors.coral },
|
|
1081
1194
|
secondary: { main: s.base.colors.purple[500], ...s.base.colors.purple },
|
|
@@ -1246,7 +1359,7 @@ function y(r, a) {
|
|
|
1246
1359
|
}
|
|
1247
1360
|
};
|
|
1248
1361
|
return M({
|
|
1249
|
-
palette:
|
|
1362
|
+
palette: e,
|
|
1250
1363
|
typography: c,
|
|
1251
1364
|
shape: {
|
|
1252
1365
|
borderRadius: s.base.borderRadius.md
|
|
@@ -1295,42 +1408,42 @@ const d = {
|
|
|
1295
1408
|
// Accent colors on navy background
|
|
1296
1409
|
coralOnNavy: { text: d.secondary.main, bg: d.primary.main },
|
|
1297
1410
|
azureOnNavy: { text: d.secondary.light, bg: d.primary.main }
|
|
1298
|
-
}, V =
|
|
1411
|
+
}, V = h("light"), j = h("dark");
|
|
1299
1412
|
function N() {
|
|
1300
1413
|
const a = C().palette.mode, s = a === "dark";
|
|
1301
|
-
return
|
|
1302
|
-
tokens:
|
|
1303
|
-
base:
|
|
1304
|
-
semantic:
|
|
1414
|
+
return w(() => ({
|
|
1415
|
+
tokens: t,
|
|
1416
|
+
base: y,
|
|
1417
|
+
semantic: m,
|
|
1305
1418
|
component: R,
|
|
1306
|
-
darkMode:
|
|
1419
|
+
darkMode: x,
|
|
1307
1420
|
mode: a,
|
|
1308
1421
|
isDarkMode: s,
|
|
1309
1422
|
getColor: (l, b) => s && b ? b : l,
|
|
1310
1423
|
getSemanticColor: (l, b) => {
|
|
1311
|
-
const
|
|
1424
|
+
const v = m.colors[l]?.[b];
|
|
1312
1425
|
if (s) {
|
|
1313
|
-
const f =
|
|
1426
|
+
const f = x.colors[l]?.[b];
|
|
1314
1427
|
if (f) return f;
|
|
1315
1428
|
}
|
|
1316
|
-
return typeof
|
|
1429
|
+
return typeof v == "string" ? v : "";
|
|
1317
1430
|
},
|
|
1318
|
-
spacing: (l) =>
|
|
1319
|
-
spacingCss: (l) => `${
|
|
1320
|
-
radius: (l) =>
|
|
1321
|
-
shadow: (l) =>
|
|
1431
|
+
spacing: (l) => y.spacing[l],
|
|
1432
|
+
spacingCss: (l) => `${y.spacing[l]}px`,
|
|
1433
|
+
radius: (l) => y.borderRadius[l],
|
|
1434
|
+
shadow: (l) => y.shadows[l]
|
|
1322
1435
|
}), [s, a]);
|
|
1323
1436
|
}
|
|
1324
1437
|
export {
|
|
1325
1438
|
L as accessibleCombinations,
|
|
1326
1439
|
Z as attentionHierarchy,
|
|
1327
|
-
|
|
1440
|
+
y as baseTokens,
|
|
1328
1441
|
d as brandColors,
|
|
1329
1442
|
R as componentTokens,
|
|
1330
1443
|
q as contrastHierarchy,
|
|
1331
|
-
|
|
1444
|
+
h as createTrinityTheme,
|
|
1332
1445
|
E as createTrinityThemePreset,
|
|
1333
|
-
|
|
1446
|
+
x as darkModeTokens,
|
|
1334
1447
|
j as darkTheme,
|
|
1335
1448
|
J as elevationHierarchy,
|
|
1336
1449
|
z as generateCssVariables,
|
|
@@ -1341,14 +1454,14 @@ export {
|
|
|
1341
1454
|
U as getHierarchySpacing,
|
|
1342
1455
|
Y as getTypography,
|
|
1343
1456
|
_ as hierarchy,
|
|
1344
|
-
|
|
1345
|
-
|
|
1457
|
+
I as injectDarkModeCssVariables,
|
|
1458
|
+
D as injectTrinityCssVariables,
|
|
1346
1459
|
k as interactiveHierarchy,
|
|
1347
1460
|
V as lightTheme,
|
|
1348
1461
|
S as scaleHierarchy,
|
|
1349
|
-
|
|
1462
|
+
m as semanticTokens,
|
|
1350
1463
|
rr as spacingHierarchy,
|
|
1351
|
-
|
|
1464
|
+
t as tokens,
|
|
1352
1465
|
o as typographicHierarchy,
|
|
1353
1466
|
N as useTrinityTokens,
|
|
1354
1467
|
P as validateAccessibility
|