@aglyn/shared-ui-theme 1.0.0-beta.143

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 (78) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +7 -0
  3. package/package.json +51 -0
  4. package/src/index.d.ts +34 -0
  5. package/src/index.js +50 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/components/host-theme-provider.d.ts +84 -0
  8. package/src/lib/components/host-theme-provider.js +146 -0
  9. package/src/lib/components/host-theme-provider.js.map +1 -0
  10. package/src/lib/components/theme-css-var-provider.d.ts +44 -0
  11. package/src/lib/components/theme-css-var-provider.js +79 -0
  12. package/src/lib/components/theme-css-var-provider.js.map +1 -0
  13. package/src/lib/console.theme.d.ts +34 -0
  14. package/src/lib/console.theme.js +598 -0
  15. package/src/lib/console.theme.js.map +1 -0
  16. package/src/lib/constants.d.ts +72 -0
  17. package/src/lib/constants.js +85 -0
  18. package/src/lib/constants.js.map +1 -0
  19. package/src/lib/hocs/create-with-emotion-client-cache.d.ts +30 -0
  20. package/src/lib/hocs/create-with-emotion-client-cache.js +53 -0
  21. package/src/lib/hocs/create-with-emotion-client-cache.js.map +1 -0
  22. package/src/lib/hocs/create-with-theme-provider.d.ts +86 -0
  23. package/src/lib/hocs/create-with-theme-provider.js +231 -0
  24. package/src/lib/hocs/create-with-theme-provider.js.map +1 -0
  25. package/src/lib/tenant.theme.d.ts +58 -0
  26. package/src/lib/tenant.theme.js +282 -0
  27. package/src/lib/tenant.theme.js.map +1 -0
  28. package/src/lib/theme.types.d.ts +26 -0
  29. package/src/lib/theme.types.js +18 -0
  30. package/src/lib/theme.types.js.map +1 -0
  31. package/src/lib/util/accent-text.d.ts +187 -0
  32. package/src/lib/util/accent-text.js +277 -0
  33. package/src/lib/util/accent-text.js.map +1 -0
  34. package/src/lib/util/accessible-shade.d.ts +61 -0
  35. package/src/lib/util/accessible-shade.js +117 -0
  36. package/src/lib/util/accessible-shade.js.map +1 -0
  37. package/src/lib/util/color-scheme-hint.d.ts +68 -0
  38. package/src/lib/util/color-scheme-hint.js +69 -0
  39. package/src/lib/util/color-scheme-hint.js.map +1 -0
  40. package/src/lib/util/create-responsive-theme.d.ts +71 -0
  41. package/src/lib/util/create-responsive-theme.js +287 -0
  42. package/src/lib/util/create-responsive-theme.js.map +1 -0
  43. package/src/lib/util/emotion-cache.d.ts +81 -0
  44. package/src/lib/util/emotion-cache.js +79 -0
  45. package/src/lib/util/emotion-cache.js.map +1 -0
  46. package/src/lib/util/generate-component-class-keys.d.ts +41 -0
  47. package/src/lib/util/generate-component-class-keys.js +53 -0
  48. package/src/lib/util/generate-component-class-keys.js.map +1 -0
  49. package/src/lib/util/host-theme.d.ts +92 -0
  50. package/src/lib/util/host-theme.js +340 -0
  51. package/src/lib/util/host-theme.js.map +1 -0
  52. package/src/lib/util/layered-emotion-cache.d.ts +78 -0
  53. package/src/lib/util/layered-emotion-cache.js +90 -0
  54. package/src/lib/util/layered-emotion-cache.js.map +1 -0
  55. package/src/lib/util/merge-sx-props.d.ts +22 -0
  56. package/src/lib/util/merge-sx-props.js +27 -0
  57. package/src/lib/util/merge-sx-props.js.map +1 -0
  58. package/src/lib/util/scheme-route-segment.d.ts +95 -0
  59. package/src/lib/util/scheme-route-segment.js +101 -0
  60. package/src/lib/util/scheme-route-segment.js.map +1 -0
  61. package/src/lib/util/theme-editor-defaults.d.ts +41 -0
  62. package/src/lib/util/theme-editor-defaults.js +49 -0
  63. package/src/lib/util/theme-editor-defaults.js.map +1 -0
  64. package/src/lib/util/theme-editor-fields.d.ts +315 -0
  65. package/src/lib/util/theme-editor-fields.js +714 -0
  66. package/src/lib/util/theme-editor-fields.js.map +1 -0
  67. package/src/lib/util/theme-mode-cookie.d.ts +48 -0
  68. package/src/lib/util/theme-mode-cookie.js +48 -0
  69. package/src/lib/util/theme-mode-cookie.js.map +1 -0
  70. package/src/vendor/emotion.d.ts +18 -0
  71. package/src/vendor/emotion.js +22 -0
  72. package/src/vendor/emotion.js.map +1 -0
  73. package/src/vendor/jss.d.ts +18 -0
  74. package/src/vendor/jss.js +20 -0
  75. package/src/vendor/jss.js.map +1 -0
  76. package/src/vendor/mui.d.ts +282 -0
  77. package/src/vendor/mui.js +20 -0
  78. package/src/vendor/mui.js.map +1 -0
@@ -0,0 +1,598 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ /**
3
+ * @license
4
+ * Copyright 2023 Aglyn LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */ import { lightBlue } from "@mui/material/colors";
18
+ import { buildFontFamilyList } from "./constants.js";
19
+ import { accentTextColor } from "./util/accent-text.js";
20
+ import createResponsiveTheme, { createResponsiveCssVarTheme } from "./util/create-responsive-theme.js";
21
+ const colorScheme = {
22
+ light: {
23
+ // Palette rotated 2026-08-03 (AGL-1186): the blue accent that every
24
+ // component was already opting into is now `primary`, so nothing has to
25
+ // opt out of a primary that was really a surface tone. Whole colour
26
+ // objects moved, so each keeps the contrastText it shipped with.
27
+ primary: {
28
+ main: '#00b0ff',
29
+ // The accent rendered AS TEXT — `ACCENT_TEXT_SHADE` in
30
+ // `util/accent-text.ts`. Links and the labels of text and outlined
31
+ // buttons read this slot; `main` keeps painting fills, borders and
32
+ // indicators, which owe 3:1 rather than 4.5:1. The brand blue is
33
+ // 2.43:1 on white, so as normal-size text it needs the deeper shade:
34
+ // this one measures 4.95:1 on paper and 4.54:1 on the page.
35
+ dark: '#0077ad',
36
+ contrastText: '#FFFFFF'
37
+ },
38
+ secondary: {
39
+ main: '#e040fb',
40
+ // Same slot, same role. Authored rather than left to derivation so the
41
+ // value every link resolves to is readable in this file: 6.11:1 on
42
+ // paper, 5.61:1 on the page.
43
+ dark: '#9d2db0',
44
+ contrastText: '#FFFFFF'
45
+ },
46
+ tertiary: {
47
+ main: '#404C5C',
48
+ contrastText: '#FFFFFF'
49
+ },
50
+ surface: {
51
+ main: `#F8F9FA`,
52
+ contrastText: '#000000'
53
+ },
54
+ // Pale accent washes used as tile/panel FILLS (AGL-1244). Each member is
55
+ // named after the accent whose icon sits on it — the mega-menu's blue
56
+ // tiles pair `tint.primary` with a `primary.dark` glyph — so the pairing
57
+ // is legible from the token names alone. These were the last raw hexes on
58
+ // the marketing nav; they are not `primary.light` (`#33BFFF`) and never
59
+ // were, which is why the slot had to be named rather than borrowed.
60
+ tint: {
61
+ primary: '#E6F5FF',
62
+ secondary: '#FBE6FE',
63
+ tertiary: '#EEF0F2'
64
+ },
65
+ // MUI's own outlined-input border weight, promoted to a token so a field
66
+ // drawn outside MUI can match one drawn by it (see `PaletteOptions`).
67
+ inputOutline: 'rgba(0, 0, 0, 0.23)',
68
+ background: {
69
+ default: '#F5F5F5',
70
+ paper: '#FFFFFF'
71
+ },
72
+ info: {
73
+ // The deepest blue of this hue that still carries a WHITE label at the
74
+ // 4.5:1 AA text bar (4.56:1). A lighter info takes every filled
75
+ // variant sub-AA, and flipping its ink to dark makes an informational
76
+ // surface read as a warning.
77
+ main: '#1878cd',
78
+ contrastText: '#FFFFFF'
79
+ },
80
+ error: {
81
+ // The deepest red of this hue that keeps a white label at AA (4.51:1).
82
+ // An error surface is a destructive-action affordance, so the fill
83
+ // carries the contrast and the ink stays white.
84
+ main: '#e32c27',
85
+ contrastText: '#FFFFFF'
86
+ },
87
+ success: {
88
+ main: '#4CAF50',
89
+ contrastText: '#000000DE'
90
+ },
91
+ warning: {
92
+ main: '#FFAB40',
93
+ contrastText: '#000000DE'
94
+ },
95
+ grey: {
96
+ 50: '#FAFAFA',
97
+ 100: '#F5F5F5',
98
+ 200: '#EEEEEE',
99
+ 300: '#E0E0E0',
100
+ 400: '#BDBDBD',
101
+ 500: '#9E9E9E',
102
+ 600: '#757575',
103
+ 700: '#616161',
104
+ 800: '#424242',
105
+ 900: '#212121',
106
+ A100: '#D5D5D5',
107
+ A200: '#AAAAAA',
108
+ A400: '#303030',
109
+ A700: '#616161'
110
+ },
111
+ svgBackground: {
112
+ main: '#FAFAFA',
113
+ hover: '#FAFAFA',
114
+ active: '#FAFAFA',
115
+ focus: '#FAFAFA'
116
+ },
117
+ svgFilled: {
118
+ main: '#9E9E9E',
119
+ hover: lightBlue['400'],
120
+ active: lightBlue['400'],
121
+ focus: lightBlue['400']
122
+ },
123
+ svgStroke: {
124
+ main: '#FFFFFF',
125
+ hover: '#FFFFFF',
126
+ active: '#FFFFFF',
127
+ focus: '#FFFFFF'
128
+ }
129
+ },
130
+ dark: {
131
+ primary: {
132
+ main: '#00b0ff',
133
+ // The accent-as-text slot, LIGHTER than `main` here and deliberately
134
+ // so. MUI derives `dark` as `darken(main, 0.3)` in both schemes — it
135
+ // cannot see that the ground flipped — which lands `#007bb2` at 3.67:1
136
+ // on this page. Every `dark` shade in this scheme is therefore
137
+ // authored, and each is the value `ensureAccessibleShades` computes by
138
+ // walking the accent LIGHTER until it clears 4.5:1 against both
139
+ // `background.default` and `background.paper`. 9.02:1 / 6.62:1.
140
+ dark: '#4dc8ff',
141
+ contrastText: '#FFFFFF'
142
+ },
143
+ secondary: {
144
+ main: '#e040fb',
145
+ // 7.04:1 on the page, 5.17:1 on a raised panel. The brand magenta
146
+ // itself is 3.78:1 on paper, so it cannot be the text shade here.
147
+ dark: '#e979fc',
148
+ contrastText: '#FFFFFF'
149
+ },
150
+ // Dark takes a LIFTED slate, not the brand `#404C5C`: that scores 1.38
151
+ // against this scheme's page and would just move the old invisibility
152
+ // bug from primary to tertiary. `#7C8CA3` measures 5.02 vs page and
153
+ // 3.63 vs a raised panel, and needs dark ink rather than white (6.14
154
+ // against black, 3.42 against white).
155
+ tertiary: {
156
+ main: '#7C8CA3',
157
+ // 7.73:1 / 5.68:1 — `main` itself is 2.78:1 on the page.
158
+ dark: '#a3afbf',
159
+ contrastText: '#000000DE'
160
+ },
161
+ surface: {
162
+ // Held at 1.17:1 from the page even though that is flat for an
163
+ // elevation step. This token is also the panel the besigner draws its
164
+ // hierarchy depth cues on, and lifting it toward the page pushes the
165
+ // active guide — `secondary.main` on this fill — from 4.41:1 down to
166
+ // 3.89:1. Trading a legible cue for a slightly clearer edge is the
167
+ // wrong way round; the depth cues are what someone actually reads.
168
+ main: `#202934`,
169
+ contrastText: '#FFFFFF'
170
+ },
171
+ // The hand-curated dark counterparts the 15 tinted tiles carried in their
172
+ // `@scheme dark` slices before the token existed (AGL-1244). Carrying the
173
+ // exact values here is what lets those slices be DELETED without dark mode
174
+ // shifting: a literal needs a slice, a token flips on its own.
175
+ tint: {
176
+ // Tile FILLS, so the bar is separation from the page rather than a
177
+ // WCAG text ratio: below ~1.5:1 a tinted tile has no visible edge. The
178
+ // originals sat at 1.13–1.25:1 and disappeared. White ink clears 11:1
179
+ // on all three.
180
+ primary: '#193d55',
181
+ // Magenta cannot reach 1.5:1 without turning purple-grey, so this one
182
+ // stops at 1.44:1 and the tile carries an `inputOutline` border in
183
+ // dark instead of pushing the hue further.
184
+ secondary: '#571e61',
185
+ tertiary: '#333b44'
186
+ },
187
+ inputOutline: 'rgba(255, 255, 255, 0.23)',
188
+ background: {
189
+ default: '#161c21',
190
+ paper: '#2a3440'
191
+ },
192
+ info: {
193
+ main: '#1878cd',
194
+ // 6.22:1 / 4.57:1.
195
+ dark: '#5da1dc',
196
+ contrastText: '#FFFFFF'
197
+ },
198
+ error: {
199
+ main: '#e32c27',
200
+ // 6.18:1 / 4.54:1.
201
+ dark: '#ed7876',
202
+ contrastText: '#FFFFFF'
203
+ },
204
+ success: {
205
+ main: '#4CAF50',
206
+ // 8.56:1 / 6.29:1.
207
+ dark: '#82c785',
208
+ contrastText: '#000000DE'
209
+ },
210
+ warning: {
211
+ main: '#FFAB40',
212
+ // 10.98:1 / 8.07:1.
213
+ dark: '#ffc479',
214
+ contrastText: '#000000DE'
215
+ },
216
+ grey: {
217
+ 50: '#FAFAFA',
218
+ 100: '#F5F5F5',
219
+ 200: '#EEEEEE',
220
+ 300: '#E0E0E0',
221
+ 400: '#BDBDBD',
222
+ 500: '#9E9E9E',
223
+ 600: '#757575',
224
+ 700: '#616161',
225
+ 800: '#424242',
226
+ 900: '#212121',
227
+ A100: '#D5D5D5',
228
+ A200: '#AAAAAA',
229
+ A400: '#303030',
230
+ A700: '#616161'
231
+ },
232
+ svgBackground: {
233
+ main: '#FAFAFA',
234
+ hover: '#FAFAFA',
235
+ active: '#FAFAFA',
236
+ focus: '#FAFAFA'
237
+ },
238
+ svgFilled: {
239
+ main: '#9E9E9E',
240
+ hover: lightBlue['A100'],
241
+ active: lightBlue['A100'],
242
+ focus: lightBlue['A100']
243
+ },
244
+ svgStroke: {
245
+ main: '#FFFFFF',
246
+ hover: '#FFFFFF',
247
+ active: '#FFFFFF',
248
+ focus: '#FFFFFF'
249
+ }
250
+ }
251
+ };
252
+ const shadowKeyUmbraOpacity = 0.2;
253
+ const shadowKeyPenumbraOpacity = 0.14;
254
+ const shadowAmbientShadowOpacity = 0.12;
255
+ function createShadowInset(...px) {
256
+ return [
257
+ `inset ${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`,
258
+ `inset ${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`,
259
+ `inset ${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`
260
+ ].join(',');
261
+ }
262
+ const baseOptions = {
263
+ components: {
264
+ MuiAppBar: {
265
+ defaultProps: {
266
+ enableColorOnDark: true
267
+ }
268
+ },
269
+ MuiAvatar: {
270
+ styleOverrides: {
271
+ root: {
272
+ width: 32,
273
+ height: 32
274
+ }
275
+ }
276
+ },
277
+ MuiButton: {
278
+ defaultProps: {
279
+ color: 'primary'
280
+ },
281
+ styleOverrides: {
282
+ // MUI's own variants set `--variant-textColor` and
283
+ // `--variant-outlinedColor` to `palette[color].main`, which paints
284
+ // the brand color as normal-size text — `#00b0ff` at 2.43:1 on
285
+ // white. Both vars move to the accent-text shade
286
+ // (`palette[color].dark`, scheme-aware). `--variant-outlinedBorder`
287
+ // and `--variant-containedBg` are left on `main`: a border and a
288
+ // fill owe 3:1, and the brand belongs there.
289
+ //
290
+ // Resolved per instance rather than baked, because `components` are
291
+ // evaluated ONCE against the root theme — a literal read here would
292
+ // freeze the light-scheme hex into dark mode.
293
+ root: ({ theme, ownerState })=>{
294
+ const accent = accentTextColor(theme, ownerState == null ? void 0 : ownerState.color);
295
+ return _extends({
296
+ '&a[disabled], &.disabled': {
297
+ pointerEvents: 'none',
298
+ textDecoration: 'none',
299
+ filter: 'grayscale(1) opacity(0.65)'
300
+ }
301
+ }, accent && {
302
+ '--variant-textColor': accent,
303
+ '--variant-outlinedColor': accent
304
+ });
305
+ }
306
+ }
307
+ },
308
+ /**
309
+ * Room for a floated label at the top of a dialog (AGL-703).
310
+ *
311
+ * MUI zeroes a DialogContent's top padding when it follows a DialogTitle
312
+ * — `.MuiDialogTitle-root + .MuiDialogContent-root` — and the content box
313
+ * scrolls (`overflow-y: auto`). So the first field's shrunk outlined
314
+ * label, which sits ABOVE its own border, is clipped by the scroll
315
+ * container. It shows on any dialog whose first control has a value on
316
+ * open: the New author dialog's `Type` select had its label shaved in
317
+ * half.
318
+ *
319
+ * Twenty-seven dialogs tried to fix this themselves with
320
+ * `sx={{ pt: 1 }}`, and NONE of them worked: MUI's rule is two classes
321
+ * and `sx` is one, so the adjacent-sibling selector wins on specificity
322
+ * every time. Matching that selector here is what makes the fix apply —
323
+ * which is why it belongs in the theme rather than at any call site.
324
+ *
325
+ * 12px: the shrunk label rises ~9px above the input's top edge, plus a
326
+ * little air so it does not sit ON the dialog title.
327
+ */ MuiDialogContent: {
328
+ styleOverrides: {
329
+ root: ({ theme })=>({
330
+ '.MuiDialogTitle-root + &': {
331
+ paddingTop: theme.spacing(1.5)
332
+ }
333
+ })
334
+ }
335
+ },
336
+ MuiFab: {
337
+ defaultProps: {
338
+ color: 'primary'
339
+ }
340
+ },
341
+ MuiIconButton: {
342
+ defaultProps: {
343
+ color: 'primary'
344
+ },
345
+ // color: 'inherit', // Default color to inherit
346
+ styleOverrides: {
347
+ root: ({ theme })=>({
348
+ padding: theme.spacing(1)
349
+ })
350
+ },
351
+ variants: [
352
+ {
353
+ props: {
354
+ variant: 'outlined'
355
+ },
356
+ style: ({ theme })=>({
357
+ border: `1px solid`,
358
+ borderColor: `inherit`
359
+ })
360
+ }
361
+ ]
362
+ },
363
+ MuiLink: {
364
+ defaultProps: {
365
+ color: 'primary'
366
+ },
367
+ styleOverrides: {
368
+ // A Link is text by definition, so `color="primary"` resolving to
369
+ // `palette.primary.main` is always measured against the wrong bar.
370
+ // Only the PaletteColor keys are rewritten — `inherit`,
371
+ // `textPrimary`, `textSecondary` and `textDisabled` return undefined
372
+ // from `accentTextColor` and keep MUI's own resolution.
373
+ root: ({ theme, ownerState })=>{
374
+ const accent = accentTextColor(theme, ownerState == null ? void 0 : ownerState.color);
375
+ return _extends({
376
+ '&[disabled], &.disabled': {
377
+ pointerEvents: 'none',
378
+ textDecoration: 'none',
379
+ filter: 'grayscale(1) opacity(0.65)'
380
+ }
381
+ }, accent && {
382
+ color: accent
383
+ });
384
+ }
385
+ }
386
+ },
387
+ // MuiMenu: {},
388
+ // No accent defaults live here any more (AGL-1186). Tabs, checkboxes,
389
+ // radios, switches, sliders, progress and badges each briefly carried
390
+ // `color: 'secondary'` to escape a `primary` that was a surface tone.
391
+ // Now that `primary` IS the accent they render correctly on MUI's own
392
+ // default, and a per-component default is exactly what the rotation
393
+ // exists to remove.
394
+ //
395
+ // That includes the `MuiTabs` default AGL-1181 records as its fix: it
396
+ // was removed here deliberately, not reverted. The rotation fixed the
397
+ // root cause the default was papering over, so a reader who finds
398
+ // nothing at that issue's write-up is looking at the right file.
399
+ MuiToolbar: {
400
+ styleOverrides: {
401
+ // Honour `disableGutters` (AGL-1230). This override targets the ROOT
402
+ // slot, and `disableGutters` only drops the `gutters` slot — so the
403
+ // padding survived the prop, app-wide, and the prop silently did
404
+ // nothing at ≥sm. It cost the marketing nav a 24px offset against the
405
+ // page container at every width below the container's clamp.
406
+ root: ({ theme, ownerState })=>(ownerState == null ? void 0 : ownerState.disableGutters) ? {} : {
407
+ [theme.breakpoints.up('sm')]: {
408
+ paddingLeft: theme.spacing(3),
409
+ paddingRight: theme.spacing(3)
410
+ }
411
+ }
412
+ }
413
+ },
414
+ MuiTooltip: {
415
+ defaultProps: {
416
+ arrow: true
417
+ }
418
+ }
419
+ },
420
+ // mixins: {},
421
+ shadowsInset: [
422
+ 'none',
423
+ createShadowInset(0, 2, 1, -1, 0, 1, 1, -0, 0, 1, 3, -0),
424
+ createShadowInset(0, 3, 1, -2, 0, 2, 2, -0, 0, 1, 5, -0),
425
+ createShadowInset(0, 3, 3, -2, 0, 3, 4, -0, 0, 1, 8, -0),
426
+ createShadowInset(0, 2, 4, -1, 0, 4, 5, -0, 0, 1, 10, -0),
427
+ createShadowInset(0, 3, 5, -1, 0, 5, 8, -0, 0, 1, 14, -0),
428
+ createShadowInset(0, 3, 5, -1, 0, 6, 10, -0, 0, 1, 18, -0),
429
+ createShadowInset(0, 4, 5, -2, 0, 7, 10, -1, 0, 2, 16, -1),
430
+ createShadowInset(0, 5, 5, -3, 0, 8, 10, -1, 0, 3, 14, -2),
431
+ createShadowInset(0, 5, 6, -3, 0, 9, 12, -1, 0, 3, 16, -2),
432
+ createShadowInset(0, 6, 6, -3, 0, 10, 14, -1, 0, 4, 18, -3),
433
+ createShadowInset(0, 6, 7, -4, 0, 11, 15, -1, 0, 4, 20, -3),
434
+ createShadowInset(0, 7, 8, -4, 0, 12, 17, -2, 0, 5, 22, -4),
435
+ createShadowInset(0, 7, 8, -4, 0, 13, 19, -2, 0, 5, 24, -4),
436
+ createShadowInset(0, 7, 9, -4, 0, 14, 21, -2, 0, 5, 26, -4),
437
+ createShadowInset(0, 8, 9, -5, 0, 15, 22, -2, 0, 6, 28, -5),
438
+ createShadowInset(0, 8, 10, -5, 0, 16, 24, -2, 0, 6, 30, -5),
439
+ createShadowInset(0, 8, 11, -5, 0, 17, 26, -2, 0, 6, 32, -5),
440
+ createShadowInset(0, 9, 11, -5, 0, 18, 28, -2, 0, 7, 34, -6),
441
+ createShadowInset(0, 9, 12, -6, 0, 19, 29, -2, 0, 7, 36, -6),
442
+ createShadowInset(0, 10, 13, -6, 0, 20, 31, -3, 0, 8, 38, -7),
443
+ createShadowInset(0, 10, 13, -6, 0, 21, 33, -3, 0, 8, 40, -7),
444
+ createShadowInset(0, 10, 14, -6, 0, 22, 35, -3, 0, 8, 42, -7),
445
+ createShadowInset(0, 11, 14, -7, 0, 23, 36, -3, 0, 9, 44, -8),
446
+ createShadowInset(0, 11, 15, -7, 0, 24, 38, -3, 0, 9, 46, -8)
447
+ ],
448
+ shape: {
449
+ borderRadius: 4,
450
+ appIconBorderRadius: `17.544%`
451
+ },
452
+ spacing: 8,
453
+ typography: {
454
+ fontFamily: buildFontFamilyList().join(','),
455
+ // The brand's named weights, beyond MUI's four.
456
+ //
457
+ // MUI ships Light 300 / Regular 400 / Medium 500 / Bold 700, and the
458
+ // brand type ramp uses three more: Black for heroes, ExtraBold for H2,
459
+ // SemiBold below Bold. Without these tokens, reaching 600/800/900 means
460
+ // typing a raw number, which pins an element to a weight instead of to
461
+ // the brand and leaves it behind when the ramp moves.
462
+ //
463
+ // They are ADDITIVE — `createTypography` deep-merges unknown keys
464
+ // through its `...other`, so nothing MUI defines changes. And they are
465
+ // reachable the same way the built-ins are: `@mui/system`'s `style()`
466
+ // retries a miss as `${prop}${capitalize(value)}`, so `fontWeight:
467
+ // 'extraBold'` resolves to `typography.fontWeightExtraBold`. The
468
+ // besigner's weight picker discovers them off the theme rather than
469
+ // from a list, so they appear in the panel without another edit.
470
+ //
471
+ // Roboto Flex is a variable face covering 100–1000, so every rung here
472
+ // renders as a real weight rather than a synthesised one.
473
+ fontWeightSemiBold: 600,
474
+ fontWeightExtraBold: 800,
475
+ fontWeightBlack: 900,
476
+ // The brand's display ramp, so `variant="h1"` / `"h2"` MEANS the brand.
477
+ // MUI's defaults are Light 300 at 96px/60px — a display face for a
478
+ // Material app, and nothing like the brand's Black heroes and ExtraBold
479
+ // H2. Left at the defaults, every heading on a built page needs a
480
+ // hand-written `fontSize` and `fontWeight` to look right, and the ones
481
+ // that miss render as a Material display face nobody chose while the
482
+ // markup still says Heading 2.
483
+ //
484
+ // Scoped deliberately to h1 and h2. They have ZERO `variant="hN"` usages
485
+ // in the console and one in the tenant app, so this restyles no product
486
+ // surface — it only changes what a SITE gets when it asks for a heading,
487
+ // which is exactly the thing that should follow the brand. h3–h6 carry
488
+ // 95 usages between them and are left on MUI's scale; `overline` has 19
489
+ // and is left alone for the same reason.
490
+ //
491
+ // `responsiveFontSizes` runs over these afterwards (xs→xl), so these are
492
+ // the DESKTOP end of a ramp that scales itself down — 56px/40px here
493
+ // land near the 34px/30px the mobile frames show.
494
+ // The rung ABOVE h1. h1 is the brand's 56px display size and
495
+ // stays that; a hero drawn at 72px had nothing to ask for, so every one
496
+ // hand-wrote `fontSize: '72px'` — and that literal then LOST to h1's own
497
+ // `responsiveFontSizes` ramp on wide viewports, silently rendering 56px.
498
+ // Listed in `RAMPED_DISPLAY_VARIANTS` so it scales down like the rest of
499
+ // the ramp rather than staying 72px on a phone.
500
+ displayXl: {
501
+ fontSize: '4.5rem',
502
+ fontWeight: 900,
503
+ lineHeight: 1.04,
504
+ letterSpacing: '-0.028em'
505
+ },
506
+ h1: {
507
+ fontSize: '3.5rem',
508
+ fontWeight: 900,
509
+ lineHeight: 1.05,
510
+ letterSpacing: '-0.025em'
511
+ },
512
+ h2: {
513
+ fontSize: '2.5rem',
514
+ fontWeight: 800,
515
+ lineHeight: 1.15,
516
+ letterSpacing: '-0.02em'
517
+ },
518
+ // h3 has to come DOWN with them, or the ramp inverts. Retuning h1/h2 to
519
+ // the brand (56/40px) while h3 kept MUI's 48px left a Heading 3 LARGER
520
+ // than a Heading 2 — visible the moment the theme preview listed the
521
+ // variants in size order. h3 carries zero `variant="h3"` usages, the same
522
+ // as h1 and h2, so this restyles no product surface; h4-h6 keep MUI's
523
+ // scale because 95 usages ride on them.
524
+ h3: {
525
+ fontSize: '2.25rem',
526
+ fontWeight: 700,
527
+ lineHeight: 1.2,
528
+ letterSpacing: '-0.015em'
529
+ },
530
+ // The three text rungs the brand uses that MUI's scale has no name for.
531
+ // MUI runs 16 / 14 / 12 (`body1` / `body2` / `caption`); the brand's
532
+ // pages want 17, 13 and 11, and with no token to ask for they write the
533
+ // pixels instead. One marketing page alone can carry 286 such literals —
534
+ // 165 of them the same 11px metadata line — each pinned to a size rather
535
+ // than to the scale.
536
+ //
537
+ // Full variant objects rather than bare sizes, so one pick brings the
538
+ // line height with it: `variant="micro"` or, where the element's own
539
+ // variant must stay, `fontSize: 'micro.fontSize'` — the token path the
540
+ // Font Size picker already offers for `h4.fontSize`.
541
+ //
542
+ // Named for the job, not the number, so the name survives a retune: a
543
+ // lede stays the lede if the brand moves it to 18px.
544
+ lede: {
545
+ fontSize: '1.0625rem',
546
+ fontWeight: 400,
547
+ lineHeight: 1.6
548
+ },
549
+ bodyCompact: {
550
+ fontSize: '0.8125rem',
551
+ fontWeight: 400,
552
+ lineHeight: 1.5
553
+ },
554
+ micro: {
555
+ fontSize: '0.6875rem',
556
+ fontWeight: 400,
557
+ lineHeight: 1.6
558
+ }
559
+ },
560
+ zIndex: {
561
+ max: 2147483647,
562
+ min: -2147483648
563
+ }
564
+ };
565
+ export const consoleOptions = _extends({}, baseOptions, {
566
+ palette: _extends({
567
+ mode: 'light'
568
+ }, colorScheme.light)
569
+ });
570
+ export const consoleOptionsDark = _extends({}, baseOptions, {
571
+ palette: _extends({
572
+ mode: 'dark'
573
+ }, colorScheme.dark)
574
+ });
575
+ export const consoleThemeLight = createResponsiveTheme({
576
+ themeOptions: _extends({}, consoleOptions)
577
+ });
578
+ export const consoleThemeDark = createResponsiveTheme({
579
+ themeOptions: _extends({}, consoleOptionsDark)
580
+ });
581
+ export const consoleThemeCssVar = createResponsiveCssVarTheme(consoleThemeLight, consoleThemeDark);
582
+ export const getConsoleTheme = (mode = 'light')=>{
583
+ const theme = {
584
+ light: consoleThemeLight,
585
+ dark: consoleThemeDark
586
+ };
587
+ return theme[mode];
588
+ };
589
+ export const getConsoleMetaThemeColor = (mode = 'light')=>{
590
+ const themeColor = {
591
+ light: consoleThemeLight.palette.secondary.main,
592
+ dark: consoleThemeDark.palette.primary.main
593
+ };
594
+ return themeColor[mode];
595
+ };
596
+ export default consoleThemeLight;
597
+
598
+ //# sourceMappingURL=console.theme.js.map