@doneisbetter/gds-theme 2.6.7 → 3.0.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/dist/{chunk-QTH2PIZY.mjs → chunk-7B3MG4NV.mjs} +28 -6
- package/dist/chunk-TAPLA36E.mjs +354 -0
- package/dist/client.d.mts +3 -2
- package/dist/client.d.ts +3 -2
- package/dist/client.js +170 -10
- package/dist/client.mjs +12 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +170 -10
- package/dist/index.mjs +12 -2
- package/dist/server.d.mts +27 -1
- package/dist/server.d.ts +27 -1
- package/dist/server.js +142 -4
- package/dist/server.mjs +11 -1
- package/package.json +1 -1
- package/styles.css +1 -0
- package/dist/chunk-Z5I7D255.mjs +0 -221
package/dist/server.js
CHANGED
|
@@ -20,12 +20,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/server.ts
|
|
21
21
|
var server_exports = {};
|
|
22
22
|
__export(server_exports, {
|
|
23
|
+
applyGdsFontLane: () => applyGdsFontLane,
|
|
23
24
|
createPublicBrandTheme: () => createPublicBrandTheme,
|
|
24
25
|
extendGdsTheme: () => extendGdsTheme,
|
|
25
26
|
gdsDarkPublicTheme: () => gdsDarkPublicTheme,
|
|
26
27
|
gdsEditorialPublicTheme: () => gdsEditorialPublicTheme,
|
|
27
28
|
gdsFlatSurfaceTheme: () => gdsFlatSurfaceTheme,
|
|
28
29
|
gdsTheme: () => gdsTheme,
|
|
30
|
+
getGdsFontLanes: () => getGdsFontLanes,
|
|
31
|
+
getGdsThemePresets: () => getGdsThemePresets,
|
|
32
|
+
resolveGdsFontLane: () => resolveGdsFontLane,
|
|
33
|
+
resolveGdsThemePreset: () => resolveGdsThemePreset,
|
|
29
34
|
withGdsMotion: () => withGdsMotion
|
|
30
35
|
});
|
|
31
36
|
module.exports = __toCommonJS(server_exports);
|
|
@@ -67,7 +72,7 @@ var baseTheme = (0, import_core.mergeMantineTheme)(import_core.DEFAULT_THEME, (0
|
|
|
67
72
|
},
|
|
68
73
|
styles: {
|
|
69
74
|
root: {
|
|
70
|
-
|
|
75
|
+
background: "var(--mantine-color-body)"
|
|
71
76
|
}
|
|
72
77
|
}
|
|
73
78
|
},
|
|
@@ -102,14 +107,14 @@ var gdsDarkPublicTheme = extendGdsTheme({
|
|
|
102
107
|
AppShell: {
|
|
103
108
|
styles: {
|
|
104
109
|
main: {
|
|
105
|
-
|
|
110
|
+
background: "var(--mantine-color-dark-8)"
|
|
106
111
|
}
|
|
107
112
|
}
|
|
108
113
|
},
|
|
109
114
|
Card: {
|
|
110
115
|
styles: {
|
|
111
116
|
root: {
|
|
112
|
-
|
|
117
|
+
background: "var(--mantine-color-dark-7)",
|
|
113
118
|
borderColor: "var(--mantine-color-dark-4)"
|
|
114
119
|
}
|
|
115
120
|
}
|
|
@@ -117,7 +122,7 @@ var gdsDarkPublicTheme = extendGdsTheme({
|
|
|
117
122
|
Paper: {
|
|
118
123
|
styles: {
|
|
119
124
|
root: {
|
|
120
|
-
|
|
125
|
+
background: "var(--mantine-color-dark-7)",
|
|
121
126
|
borderColor: "var(--mantine-color-dark-4)"
|
|
122
127
|
}
|
|
123
128
|
}
|
|
@@ -241,13 +246,146 @@ function withGdsMotion(overrides = {}) {
|
|
|
241
246
|
)
|
|
242
247
|
);
|
|
243
248
|
}
|
|
249
|
+
|
|
250
|
+
// src/theme-presets.ts
|
|
251
|
+
function createVibrantPresetTheme(primaryColor, options = {}) {
|
|
252
|
+
const darkSurface = options.darkForward ? `color-mix(in srgb, var(--mantine-color-${primaryColor}-9) 18%, var(--mantine-color-dark-8))` : "var(--mantine-color-dark-8)";
|
|
253
|
+
return extendGdsTheme({
|
|
254
|
+
primaryColor,
|
|
255
|
+
components: {
|
|
256
|
+
AppShell: {
|
|
257
|
+
styles: {
|
|
258
|
+
main: {
|
|
259
|
+
background: `light-dark(color-mix(in srgb, var(--mantine-color-${primaryColor}-0) 58%, var(--mantine-color-white)), ${darkSurface})`
|
|
260
|
+
},
|
|
261
|
+
header: {
|
|
262
|
+
background: `light-dark(color-mix(in srgb, var(--mantine-color-${primaryColor}-0) 68%, var(--mantine-color-white)), var(--mantine-color-dark-8))`,
|
|
263
|
+
borderColor: `light-dark(var(--mantine-color-${primaryColor}-2), var(--mantine-color-dark-5))`
|
|
264
|
+
},
|
|
265
|
+
navbar: {
|
|
266
|
+
background: `light-dark(color-mix(in srgb, var(--mantine-color-${primaryColor}-0) 48%, var(--mantine-color-white)), var(--mantine-color-dark-8))`,
|
|
267
|
+
borderColor: `light-dark(var(--mantine-color-${primaryColor}-2), var(--mantine-color-dark-5))`
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
Card: {
|
|
272
|
+
styles: {
|
|
273
|
+
root: {
|
|
274
|
+
background: `light-dark(var(--mantine-color-white), color-mix(in srgb, var(--mantine-color-${primaryColor}-9) 10%, var(--mantine-color-dark-7)))`,
|
|
275
|
+
borderColor: `light-dark(var(--mantine-color-${primaryColor}-2), var(--mantine-color-dark-4))`
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
Paper: {
|
|
280
|
+
styles: {
|
|
281
|
+
root: {
|
|
282
|
+
background: `light-dark(color-mix(in srgb, var(--mantine-color-${primaryColor}-0) 16%, var(--mantine-color-white)), color-mix(in srgb, var(--mantine-color-${primaryColor}-9) 8%, var(--mantine-color-dark-7)))`,
|
|
283
|
+
borderColor: `light-dark(var(--mantine-color-${primaryColor}-2), var(--mantine-color-dark-4))`
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
var customPresetThemes = {
|
|
291
|
+
sunset: createVibrantPresetTheme("orange"),
|
|
292
|
+
oceanic: createVibrantPresetTheme("cyan"),
|
|
293
|
+
forest: createVibrantPresetTheme("green"),
|
|
294
|
+
ruby: createVibrantPresetTheme("red"),
|
|
295
|
+
amber: createVibrantPresetTheme("yellow"),
|
|
296
|
+
"neon-night": createVibrantPresetTheme("lime", { darkForward: true }),
|
|
297
|
+
skyline: createVibrantPresetTheme("indigo"),
|
|
298
|
+
aurora: createVibrantPresetTheme("teal"),
|
|
299
|
+
coral: createVibrantPresetTheme("pink"),
|
|
300
|
+
mint: createVibrantPresetTheme("lime"),
|
|
301
|
+
orchid: createVibrantPresetTheme("grape"),
|
|
302
|
+
royal: createVibrantPresetTheme("violet")
|
|
303
|
+
};
|
|
304
|
+
var themePresetCatalog = [
|
|
305
|
+
{ id: "default", label: "Default runtime theme", description: "Balanced, neutral baseline lane.", runtimeLane: "gdsTheme" },
|
|
306
|
+
{ id: "dark-public", label: "Dark public theme", description: "Dark-first public lane.", runtimeLane: "gdsDarkPublicTheme" },
|
|
307
|
+
{ id: "flat-surface", label: "Flat surface theme", description: "Lower-elevation operational lane.", runtimeLane: "gdsFlatSurfaceTheme" },
|
|
308
|
+
{ id: "editorial", label: "Editorial serif theme", description: "Reading-first, serif headline lane.", runtimeLane: "gdsEditorialPublicTheme" },
|
|
309
|
+
{ id: "brand", label: "Brand theme generator", description: "Governed brand composition lane.", runtimeLane: "createPublicBrandTheme(...)" },
|
|
310
|
+
{ id: "sunset", label: "Sunset pulse", description: "Warm orange-magenta vibrant lane.", runtimeLane: "resolveGdsThemePreset(sunset)" },
|
|
311
|
+
{ id: "oceanic", label: "Oceanic wave", description: "Cool cyan-blue vibrant lane.", runtimeLane: "resolveGdsThemePreset(oceanic)" },
|
|
312
|
+
{ id: "forest", label: "Forest signal", description: "Natural emerald-driven vibrant lane.", runtimeLane: "resolveGdsThemePreset(forest)" },
|
|
313
|
+
{ id: "ruby", label: "Ruby spark", description: "Bold red high-contrast lane.", runtimeLane: "resolveGdsThemePreset(ruby)" },
|
|
314
|
+
{ id: "amber", label: "Amber glow", description: "Golden yellow energetic lane.", runtimeLane: "resolveGdsThemePreset(amber)" },
|
|
315
|
+
{ id: "neon-night", label: "Neon night", description: "Lime-accented dark-forward lane.", runtimeLane: "resolveGdsThemePreset(neon-night)" },
|
|
316
|
+
{ id: "skyline", label: "Skyline indigo", description: "Indigo technology-forward lane.", runtimeLane: "resolveGdsThemePreset(skyline)" },
|
|
317
|
+
{ id: "aurora", label: "Aurora teal", description: "Fresh teal-cyan app lane for optimistic product surfaces.", runtimeLane: "resolveGdsThemePreset(aurora)" },
|
|
318
|
+
{ id: "coral", label: "Coral bloom", description: "Expressive pink-coral lane for creator, commerce, and social products.", runtimeLane: "resolveGdsThemePreset(coral)" },
|
|
319
|
+
{ id: "mint", label: "Mint circuit", description: "Clean green-mint lane for health, learning, and growth products.", runtimeLane: "resolveGdsThemePreset(mint)" },
|
|
320
|
+
{ id: "orchid", label: "Orchid signal", description: "Purple-grape lane for editorial, culture, and premium tools.", runtimeLane: "resolveGdsThemePreset(orchid)" },
|
|
321
|
+
{ id: "royal", label: "Royal violet", description: "Confident violet lane for SaaS dashboards and professional apps.", runtimeLane: "resolveGdsThemePreset(royal)" }
|
|
322
|
+
];
|
|
323
|
+
function getGdsThemePresets() {
|
|
324
|
+
return themePresetCatalog;
|
|
325
|
+
}
|
|
326
|
+
function resolveGdsThemePreset(id, options) {
|
|
327
|
+
switch (id) {
|
|
328
|
+
case "default":
|
|
329
|
+
return gdsTheme;
|
|
330
|
+
case "dark-public":
|
|
331
|
+
return gdsDarkPublicTheme;
|
|
332
|
+
case "flat-surface":
|
|
333
|
+
return gdsFlatSurfaceTheme;
|
|
334
|
+
case "editorial":
|
|
335
|
+
return gdsEditorialPublicTheme;
|
|
336
|
+
case "brand":
|
|
337
|
+
return createPublicBrandTheme({
|
|
338
|
+
editorialSerif: options?.brandEditorialSerif ?? false,
|
|
339
|
+
flatSurfaces: options?.brandFlatSurfaces ?? true,
|
|
340
|
+
overrides: { primaryColor: options?.brandPrimary ?? "blue" }
|
|
341
|
+
});
|
|
342
|
+
default:
|
|
343
|
+
return customPresetThemes[id] ?? gdsTheme;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// src/font-lanes.ts
|
|
348
|
+
var import_core2 = require("@mantine/core");
|
|
349
|
+
var lanes = [
|
|
350
|
+
{ id: "inter", label: "Inter", body: "Inter, system-ui, sans-serif", heading: "Inter, system-ui, sans-serif", mono: "ui-monospace, SFMono-Regular, Menlo, monospace" },
|
|
351
|
+
{ id: "manrope", label: "Manrope", body: "Manrope, system-ui, sans-serif", heading: "Manrope, system-ui, sans-serif", mono: "ui-monospace, SFMono-Regular, Menlo, monospace" },
|
|
352
|
+
{ id: "space-grotesk", label: "Space Grotesk", body: '"Space Grotesk", Inter, system-ui, sans-serif', heading: '"Space Grotesk", Inter, system-ui, sans-serif', mono: "ui-monospace, SFMono-Regular, Menlo, monospace" },
|
|
353
|
+
{ id: "plus-jakarta", label: "Plus Jakarta Sans", body: '"Plus Jakarta Sans", Inter, system-ui, sans-serif', heading: '"Plus Jakarta Sans", Inter, system-ui, sans-serif', mono: "ui-monospace, SFMono-Regular, Menlo, monospace" },
|
|
354
|
+
{ id: "nunito", label: "Nunito", body: "Nunito, Inter, system-ui, sans-serif", heading: "Nunito, Inter, system-ui, sans-serif", mono: "ui-monospace, SFMono-Regular, Menlo, monospace" },
|
|
355
|
+
{ id: "work-sans", label: "Work Sans", body: '"Work Sans", Inter, system-ui, sans-serif', heading: '"Work Sans", Inter, system-ui, sans-serif', mono: "ui-monospace, SFMono-Regular, Menlo, monospace" },
|
|
356
|
+
{ id: "barlow", label: "Barlow", body: "Barlow, Inter, system-ui, sans-serif", heading: "Barlow, Inter, system-ui, sans-serif", mono: "ui-monospace, SFMono-Regular, Menlo, monospace" },
|
|
357
|
+
{ id: "dm-sans", label: "DM Sans", body: '"DM Sans", Inter, system-ui, sans-serif', heading: '"DM Sans", Inter, system-ui, sans-serif', mono: "ui-monospace, SFMono-Regular, Menlo, monospace" },
|
|
358
|
+
{ id: "instrument-serif", label: "Instrument Serif", body: "Inter, system-ui, sans-serif", heading: '"Instrument Serif", Georgia, serif', mono: "ui-monospace, SFMono-Regular, Menlo, monospace" },
|
|
359
|
+
{ id: "source-serif", label: "Source Serif", body: '"Source Serif 4", Georgia, serif', heading: '"Source Serif 4", Georgia, serif', mono: "ui-monospace, SFMono-Regular, Menlo, monospace" }
|
|
360
|
+
];
|
|
361
|
+
function getGdsFontLanes() {
|
|
362
|
+
return lanes;
|
|
363
|
+
}
|
|
364
|
+
function resolveGdsFontLane(id) {
|
|
365
|
+
return lanes.find((lane) => lane.id === id) ?? lanes[0];
|
|
366
|
+
}
|
|
367
|
+
function applyGdsFontLane(theme, laneId) {
|
|
368
|
+
const lane = resolveGdsFontLane(laneId);
|
|
369
|
+
return (0, import_core2.mergeThemeOverrides)(theme, {
|
|
370
|
+
fontFamily: lane.body,
|
|
371
|
+
fontFamilyMonospace: lane.mono,
|
|
372
|
+
headings: {
|
|
373
|
+
fontFamily: lane.heading
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
}
|
|
244
377
|
// Annotate the CommonJS export names for ESM import in node:
|
|
245
378
|
0 && (module.exports = {
|
|
379
|
+
applyGdsFontLane,
|
|
246
380
|
createPublicBrandTheme,
|
|
247
381
|
extendGdsTheme,
|
|
248
382
|
gdsDarkPublicTheme,
|
|
249
383
|
gdsEditorialPublicTheme,
|
|
250
384
|
gdsFlatSurfaceTheme,
|
|
251
385
|
gdsTheme,
|
|
386
|
+
getGdsFontLanes,
|
|
387
|
+
getGdsThemePresets,
|
|
388
|
+
resolveGdsFontLane,
|
|
389
|
+
resolveGdsThemePreset,
|
|
252
390
|
withGdsMotion
|
|
253
391
|
});
|
package/dist/server.mjs
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
|
+
applyGdsFontLane,
|
|
2
3
|
createPublicBrandTheme,
|
|
3
4
|
extendGdsTheme,
|
|
4
5
|
gdsDarkPublicTheme,
|
|
5
6
|
gdsEditorialPublicTheme,
|
|
6
7
|
gdsFlatSurfaceTheme,
|
|
7
8
|
gdsTheme,
|
|
9
|
+
getGdsFontLanes,
|
|
10
|
+
getGdsThemePresets,
|
|
11
|
+
resolveGdsFontLane,
|
|
12
|
+
resolveGdsThemePreset,
|
|
8
13
|
withGdsMotion
|
|
9
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TAPLA36E.mjs";
|
|
10
15
|
export {
|
|
16
|
+
applyGdsFontLane,
|
|
11
17
|
createPublicBrandTheme,
|
|
12
18
|
extendGdsTheme,
|
|
13
19
|
gdsDarkPublicTheme,
|
|
14
20
|
gdsEditorialPublicTheme,
|
|
15
21
|
gdsFlatSurfaceTheme,
|
|
16
22
|
gdsTheme,
|
|
23
|
+
getGdsFontLanes,
|
|
24
|
+
getGdsThemePresets,
|
|
25
|
+
resolveGdsFontLane,
|
|
26
|
+
resolveGdsThemePreset,
|
|
17
27
|
withGdsMotion
|
|
18
28
|
};
|
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
@import '@mantine/core/styles.css';
|
|
2
2
|
@import '@mantine/notifications/styles.css';
|
|
3
|
+
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&family=Nunito:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Source+Serif+4:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=Work+Sans:wght@400;500;600;700;800&display=swap');
|
package/dist/chunk-Z5I7D255.mjs
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
// src/theme.ts
|
|
2
|
-
import { DEFAULT_THEME, createTheme, mergeMantineTheme, mergeThemeOverrides } from "@mantine/core";
|
|
3
|
-
var baseTheme = mergeMantineTheme(DEFAULT_THEME, createTheme({
|
|
4
|
-
primaryColor: "violet",
|
|
5
|
-
fontFamily: "Inter, system-ui, Avenir, Helvetica, Arial, sans-serif",
|
|
6
|
-
fontSmoothing: true,
|
|
7
|
-
defaultRadius: "md",
|
|
8
|
-
black: "#111827",
|
|
9
|
-
white: "#ffffff",
|
|
10
|
-
headings: {
|
|
11
|
-
fontFamily: "Inter, system-ui, Avenir, Helvetica, Arial, sans-serif",
|
|
12
|
-
sizes: {
|
|
13
|
-
h1: { fontSize: "2.5rem", fontWeight: "800" },
|
|
14
|
-
h2: { fontSize: "1.75rem", fontWeight: "700" },
|
|
15
|
-
h3: { fontSize: "1.25rem", fontWeight: "600" }
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
shadows: {
|
|
19
|
-
md: "0 8px 24px rgba(15, 23, 42, 0.08)",
|
|
20
|
-
lg: "0 16px 40px rgba(15, 23, 42, 0.12)"
|
|
21
|
-
},
|
|
22
|
-
components: {
|
|
23
|
-
Button: {
|
|
24
|
-
defaultProps: {
|
|
25
|
-
radius: "md",
|
|
26
|
-
size: "sm",
|
|
27
|
-
fw: 600
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
Card: {
|
|
31
|
-
defaultProps: {
|
|
32
|
-
radius: "lg",
|
|
33
|
-
shadow: "sm",
|
|
34
|
-
withBorder: true
|
|
35
|
-
},
|
|
36
|
-
styles: {
|
|
37
|
-
root: {
|
|
38
|
-
backgroundColor: "var(--mantine-color-body)"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
Paper: {
|
|
43
|
-
defaultProps: {
|
|
44
|
-
radius: "lg",
|
|
45
|
-
withBorder: true
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
TextInput: {
|
|
49
|
-
defaultProps: {
|
|
50
|
-
radius: "md"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
Table: {
|
|
54
|
-
defaultProps: {
|
|
55
|
-
highlightOnHover: true,
|
|
56
|
-
verticalSpacing: "md"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
Badge: {
|
|
60
|
-
defaultProps: {
|
|
61
|
-
radius: "xl"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}));
|
|
66
|
-
var gdsTheme = baseTheme;
|
|
67
|
-
var gdsDarkPublicTheme = extendGdsTheme({
|
|
68
|
-
primaryColor: "violet",
|
|
69
|
-
components: {
|
|
70
|
-
AppShell: {
|
|
71
|
-
styles: {
|
|
72
|
-
main: {
|
|
73
|
-
backgroundColor: "var(--mantine-color-dark-8)"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
Card: {
|
|
78
|
-
styles: {
|
|
79
|
-
root: {
|
|
80
|
-
backgroundColor: "var(--mantine-color-dark-7)",
|
|
81
|
-
borderColor: "var(--mantine-color-dark-4)"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
Paper: {
|
|
86
|
-
styles: {
|
|
87
|
-
root: {
|
|
88
|
-
backgroundColor: "var(--mantine-color-dark-7)",
|
|
89
|
-
borderColor: "var(--mantine-color-dark-4)"
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
Table: {
|
|
94
|
-
styles: {
|
|
95
|
-
table: {
|
|
96
|
-
color: "var(--mantine-color-gray-0)"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
var gdsFlatSurfaceTheme = extendGdsTheme({
|
|
103
|
-
shadows: {
|
|
104
|
-
xs: "none",
|
|
105
|
-
sm: "none",
|
|
106
|
-
md: "none",
|
|
107
|
-
lg: "none",
|
|
108
|
-
xl: "none"
|
|
109
|
-
},
|
|
110
|
-
components: {
|
|
111
|
-
Card: {
|
|
112
|
-
defaultProps: {
|
|
113
|
-
shadow: void 0,
|
|
114
|
-
withBorder: true
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
Paper: {
|
|
118
|
-
defaultProps: {
|
|
119
|
-
withBorder: true
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
var gdsEditorialPublicTheme = extendGdsTheme({
|
|
125
|
-
headings: {
|
|
126
|
-
fontFamily: '"Instrument Serif", Georgia, "Times New Roman", serif',
|
|
127
|
-
sizes: {
|
|
128
|
-
h1: { fontSize: "2.75rem", fontWeight: "700" },
|
|
129
|
-
h2: { fontSize: "2rem", fontWeight: "700" },
|
|
130
|
-
h3: { fontSize: "1.375rem", fontWeight: "600" }
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
shadows: {
|
|
134
|
-
xs: "none",
|
|
135
|
-
sm: "none",
|
|
136
|
-
md: "none",
|
|
137
|
-
lg: "none",
|
|
138
|
-
xl: "none"
|
|
139
|
-
},
|
|
140
|
-
components: {
|
|
141
|
-
Card: {
|
|
142
|
-
defaultProps: {
|
|
143
|
-
shadow: void 0,
|
|
144
|
-
withBorder: true
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
Paper: {
|
|
148
|
-
defaultProps: {
|
|
149
|
-
withBorder: true
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
function composeGdsTheme(overrides = {}) {
|
|
155
|
-
return mergeMantineTheme(baseTheme, overrides);
|
|
156
|
-
}
|
|
157
|
-
function createPublicBrandTheme({
|
|
158
|
-
editorialSerif = false,
|
|
159
|
-
flatSurfaces = false,
|
|
160
|
-
overrides = {}
|
|
161
|
-
} = {}) {
|
|
162
|
-
const layeredOverrides = [];
|
|
163
|
-
if (flatSurfaces) {
|
|
164
|
-
layeredOverrides.push(gdsFlatSurfaceTheme);
|
|
165
|
-
}
|
|
166
|
-
if (editorialSerif) {
|
|
167
|
-
layeredOverrides.push(gdsEditorialPublicTheme);
|
|
168
|
-
}
|
|
169
|
-
layeredOverrides.push(overrides);
|
|
170
|
-
const mergedOverrides = layeredOverrides.reduce(
|
|
171
|
-
(theme, layer) => mergeThemeOverrides(theme, layer),
|
|
172
|
-
{}
|
|
173
|
-
);
|
|
174
|
-
return composeGdsTheme(mergedOverrides);
|
|
175
|
-
}
|
|
176
|
-
function extendGdsTheme(overrides = {}) {
|
|
177
|
-
return composeGdsTheme(overrides);
|
|
178
|
-
}
|
|
179
|
-
function withGdsMotion(overrides = {}) {
|
|
180
|
-
return extendGdsTheme(
|
|
181
|
-
mergeThemeOverrides(
|
|
182
|
-
{
|
|
183
|
-
components: {
|
|
184
|
-
Button: {
|
|
185
|
-
styles: {
|
|
186
|
-
root: {
|
|
187
|
-
transition: "transform 150ms ease, filter 120ms ease",
|
|
188
|
-
"&:hover": {
|
|
189
|
-
transform: "translateY(-1px)",
|
|
190
|
-
filter: "brightness(1.05)"
|
|
191
|
-
},
|
|
192
|
-
"&:active": {
|
|
193
|
-
transform: "translateY(0)",
|
|
194
|
-
filter: "brightness(0.95)"
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
Card: {
|
|
200
|
-
styles: {
|
|
201
|
-
root: {
|
|
202
|
-
transition: "transform 150ms ease, box-shadow 150ms ease"
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
overrides
|
|
209
|
-
)
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export {
|
|
214
|
-
gdsTheme,
|
|
215
|
-
gdsDarkPublicTheme,
|
|
216
|
-
gdsFlatSurfaceTheme,
|
|
217
|
-
gdsEditorialPublicTheme,
|
|
218
|
-
createPublicBrandTheme,
|
|
219
|
-
extendGdsTheme,
|
|
220
|
-
withGdsMotion
|
|
221
|
-
};
|