@octoguide/mui-ui-toolkit 0.1.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/README.md +231 -0
- package/dist/index.d.mts +759 -0
- package/dist/index.d.ts +759 -0
- package/dist/index.js +1762 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1723 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +65 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,1723 @@
|
|
|
1
|
+
// src/ThemeProvider.tsx
|
|
2
|
+
import { ThemeProvider as MuiThemeProvider, CssBaseline } from "@mui/material";
|
|
3
|
+
|
|
4
|
+
// src/themes/defaultTheme.ts
|
|
5
|
+
var defaultTheme = {
|
|
6
|
+
colors: {
|
|
7
|
+
primary: "#BE0D00",
|
|
8
|
+
primaryDark: "#003c8f",
|
|
9
|
+
primaryLight: "#5e92f3",
|
|
10
|
+
primaryContrast: "#ffffff",
|
|
11
|
+
secondary: "#c95109",
|
|
12
|
+
secondaryDark: "#38006b",
|
|
13
|
+
secondaryLight: "#9c4dcc",
|
|
14
|
+
secondaryContrast: "#ffffff",
|
|
15
|
+
success: "#1A6D29",
|
|
16
|
+
warning: "#E6920A",
|
|
17
|
+
error: "#990000",
|
|
18
|
+
info: "#0288D1",
|
|
19
|
+
background: "#F5F7FA",
|
|
20
|
+
backgroundPaper: "#ffffff",
|
|
21
|
+
backgroundSubtle: "#EEF2F7",
|
|
22
|
+
textPrimary: "#1A2340",
|
|
23
|
+
textSecondary: "#546080",
|
|
24
|
+
textDisabled: "#A0AABF",
|
|
25
|
+
divider: "#DDE3EE",
|
|
26
|
+
border: "#C5CFE0",
|
|
27
|
+
borderFocus: "#1565C0",
|
|
28
|
+
overlayLight: "rgba(255, 255, 255, 0.8)",
|
|
29
|
+
overlayDark: "rgba(0, 0, 0, 0.12)"
|
|
30
|
+
},
|
|
31
|
+
typography: {
|
|
32
|
+
fontFamilyBase: '"Source Sans Pro", sans-serif',
|
|
33
|
+
fontFamilyMono: '"Inter", "Roboto", "Helvetica Neue", Arial, sans-serif',
|
|
34
|
+
// ── Sizes (identical across all themes) ──────────────────────────────
|
|
35
|
+
fontSizeXs: "0.625rem",
|
|
36
|
+
// 10px
|
|
37
|
+
fontSizeSm: "0.75rem",
|
|
38
|
+
// 12px
|
|
39
|
+
fontSizeMd: "0.875rem",
|
|
40
|
+
// 14px
|
|
41
|
+
fontSizeLg: "1rem",
|
|
42
|
+
// 16px
|
|
43
|
+
fontSizeXl: "1.125rem",
|
|
44
|
+
// 18px
|
|
45
|
+
fontSize2xl: "1.375rem",
|
|
46
|
+
// 22px
|
|
47
|
+
fontSize3xl: "1.75rem",
|
|
48
|
+
// 28px
|
|
49
|
+
// ── Weights (identical across all themes) ─────────────────────────────
|
|
50
|
+
fontWeightLight: 300,
|
|
51
|
+
fontWeightRegular: 400,
|
|
52
|
+
fontWeightMedium: 500,
|
|
53
|
+
fontWeightSemiBold: 600,
|
|
54
|
+
fontWeightBold: 700,
|
|
55
|
+
lineHeightTight: 1.2,
|
|
56
|
+
lineHeightBase: 1.5,
|
|
57
|
+
lineHeightRelaxed: 1.75,
|
|
58
|
+
letterSpacingTight: "-0.02em",
|
|
59
|
+
letterSpacingBase: "0em",
|
|
60
|
+
letterSpacingWide: "0.06em"
|
|
61
|
+
},
|
|
62
|
+
// ── Spacing (identical across all themes) ──────────────────────────────
|
|
63
|
+
spacing: {
|
|
64
|
+
unit: 8,
|
|
65
|
+
xs: "4px",
|
|
66
|
+
sm: "8px",
|
|
67
|
+
md: "16px",
|
|
68
|
+
lg: "24px",
|
|
69
|
+
xl: "32px",
|
|
70
|
+
xxl: "48px"
|
|
71
|
+
},
|
|
72
|
+
borderRadius: {
|
|
73
|
+
none: "0px",
|
|
74
|
+
xs: "2px",
|
|
75
|
+
sm: "4px",
|
|
76
|
+
md: "8px",
|
|
77
|
+
lg: "12px",
|
|
78
|
+
xl: "16px",
|
|
79
|
+
full: "9999px"
|
|
80
|
+
},
|
|
81
|
+
shadows: {
|
|
82
|
+
none: "none",
|
|
83
|
+
xs: "0 1px 2px rgba(0, 0, 0, 0.08)",
|
|
84
|
+
sm: "0 2px 6px rgba(0, 0, 0, 0.10)",
|
|
85
|
+
md: "0 4px 12px rgba(0, 0, 0, 0.12)",
|
|
86
|
+
lg: "0 8px 24px rgba(0, 0, 0, 0.14)",
|
|
87
|
+
xl: "0 16px 48px rgba(0, 0, 0, 0.18)"
|
|
88
|
+
},
|
|
89
|
+
transitions: {
|
|
90
|
+
durationFast: "120ms",
|
|
91
|
+
durationBase: "200ms",
|
|
92
|
+
durationSlow: "350ms",
|
|
93
|
+
easingDefault: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
94
|
+
easingIn: "cubic-bezier(0.4, 0, 1, 1)",
|
|
95
|
+
easingOut: "cubic-bezier(0, 0, 0.2, 1)"
|
|
96
|
+
},
|
|
97
|
+
// ── Z-index (identical across all themes) ──────────────────────────────
|
|
98
|
+
zIndex: {
|
|
99
|
+
base: 0,
|
|
100
|
+
dropdown: 100,
|
|
101
|
+
sticky: 200,
|
|
102
|
+
overlay: 300,
|
|
103
|
+
modal: 400,
|
|
104
|
+
popover: 500,
|
|
105
|
+
toast: 600,
|
|
106
|
+
tooltip: 700
|
|
107
|
+
},
|
|
108
|
+
components: {
|
|
109
|
+
button: {
|
|
110
|
+
// Sizes & paddings (identical across themes)
|
|
111
|
+
paddingX: "12px",
|
|
112
|
+
paddingY: "6px",
|
|
113
|
+
paddingXSm: "8px",
|
|
114
|
+
paddingYSm: "4px",
|
|
115
|
+
paddingXLg: "16px",
|
|
116
|
+
paddingYLg: "8px",
|
|
117
|
+
paddingXXl: "16px",
|
|
118
|
+
paddingYXl: "8px",
|
|
119
|
+
fontSizeSm: "0.8125rem",
|
|
120
|
+
fontSizeMd: "0.875rem",
|
|
121
|
+
fontSizeLg: "0.9375rem",
|
|
122
|
+
heightSm: "30px",
|
|
123
|
+
heightMd: "36px",
|
|
124
|
+
heightLg: "48px",
|
|
125
|
+
heightXl: "56px",
|
|
126
|
+
// Typography & style (identical across themes)
|
|
127
|
+
borderWidth: "1.5px",
|
|
128
|
+
fontWeight: 700,
|
|
129
|
+
letterSpacing: "0em",
|
|
130
|
+
textTransform: "none",
|
|
131
|
+
iconGap: "8px",
|
|
132
|
+
// Brand-specific — overridden per theme
|
|
133
|
+
borderRadius: "8px",
|
|
134
|
+
minWidth: "200px"
|
|
135
|
+
},
|
|
136
|
+
input: {
|
|
137
|
+
// Sizes & paddings (identical across themes)
|
|
138
|
+
paddingX: "14px",
|
|
139
|
+
paddingY: "10px",
|
|
140
|
+
borderWidthFocus: "2px",
|
|
141
|
+
background: "#ffffff",
|
|
142
|
+
labelFontSize: "0.875rem",
|
|
143
|
+
helperFontSize: "0.75rem",
|
|
144
|
+
// Brand-specific — overridden per theme
|
|
145
|
+
borderRadius: "8px",
|
|
146
|
+
borderWidth: "1px",
|
|
147
|
+
backgroundDisabled: "#F5F7FA",
|
|
148
|
+
minHeight: "44px"
|
|
149
|
+
},
|
|
150
|
+
card: {
|
|
151
|
+
// Layout (identical across themes)
|
|
152
|
+
padding: "24px",
|
|
153
|
+
paddingCompact: "16px",
|
|
154
|
+
borderWidth: "1px",
|
|
155
|
+
background: "#ffffff",
|
|
156
|
+
// Brand-specific — overridden per theme
|
|
157
|
+
borderRadius: "12px"
|
|
158
|
+
},
|
|
159
|
+
// ── Chip (identical across all themes) ───────────────────────────────
|
|
160
|
+
chip: {
|
|
161
|
+
height: "32px",
|
|
162
|
+
heightSm: "24px",
|
|
163
|
+
paddingX: "12px",
|
|
164
|
+
borderRadius: "9999px",
|
|
165
|
+
fontSize: "0.8125rem",
|
|
166
|
+
fontWeight: 500,
|
|
167
|
+
iconSize: "16px"
|
|
168
|
+
},
|
|
169
|
+
// ── Badge (identical across all themes) ──────────────────────────────
|
|
170
|
+
badge: {
|
|
171
|
+
height: "20px",
|
|
172
|
+
minWidth: "20px",
|
|
173
|
+
paddingX: "6px",
|
|
174
|
+
borderRadius: "9999px",
|
|
175
|
+
fontSize: "0.6875rem",
|
|
176
|
+
fontWeight: 700,
|
|
177
|
+
borderWidth: "2px"
|
|
178
|
+
},
|
|
179
|
+
tooltip: {
|
|
180
|
+
paddingX: "10px",
|
|
181
|
+
paddingY: "6px",
|
|
182
|
+
fontSize: "0.75rem",
|
|
183
|
+
maxWidth: "280px",
|
|
184
|
+
color: "#ffffff",
|
|
185
|
+
// Brand-specific — overridden per theme
|
|
186
|
+
borderRadius: "6px",
|
|
187
|
+
background: "#1A2340"
|
|
188
|
+
},
|
|
189
|
+
dialog: {
|
|
190
|
+
// Layout (identical across themes)
|
|
191
|
+
padding: "32px",
|
|
192
|
+
maxWidth: "600px",
|
|
193
|
+
background: "#ffffff",
|
|
194
|
+
// Brand-specific — overridden per theme
|
|
195
|
+
borderRadius: "16px"
|
|
196
|
+
},
|
|
197
|
+
table: {
|
|
198
|
+
// Layout (identical across themes)
|
|
199
|
+
cellPaddingX: "16px",
|
|
200
|
+
headerFontWeight: 600,
|
|
201
|
+
borderWidth: "1px",
|
|
202
|
+
// Brand-specific — overridden per theme
|
|
203
|
+
cellPaddingY: "12px",
|
|
204
|
+
headerBackground: "#EEF2F7",
|
|
205
|
+
rowHoverBackground: "#F5F7FA",
|
|
206
|
+
borderColor: "#DDE3EE"
|
|
207
|
+
},
|
|
208
|
+
avatar: {
|
|
209
|
+
// Sizes (identical across themes)
|
|
210
|
+
sizeXs: "24px",
|
|
211
|
+
sizeSm: "32px",
|
|
212
|
+
sizeMd: "40px",
|
|
213
|
+
sizeLg: "56px",
|
|
214
|
+
sizeXl: "80px",
|
|
215
|
+
sizeXxl: "128px",
|
|
216
|
+
// Style (identical across themes)
|
|
217
|
+
borderRadius: "50%",
|
|
218
|
+
groupSpacing: "-8px",
|
|
219
|
+
groupBorderWidth: "2px",
|
|
220
|
+
// Brand-specific — overridden per theme
|
|
221
|
+
borderRadiusRounded: "12px"
|
|
222
|
+
},
|
|
223
|
+
divider: {
|
|
224
|
+
thickness: "1px",
|
|
225
|
+
// Brand-specific — overridden per theme
|
|
226
|
+
color: "#DDE3EE"
|
|
227
|
+
},
|
|
228
|
+
alert: {
|
|
229
|
+
// Layout (identical across themes)
|
|
230
|
+
padding: "6px 16px",
|
|
231
|
+
// Brand-specific — overridden per theme
|
|
232
|
+
borderRadius: "8px"
|
|
233
|
+
},
|
|
234
|
+
accordion: {
|
|
235
|
+
// Layout (identical across themes)
|
|
236
|
+
standaloneRadius: "16px",
|
|
237
|
+
summaryPaddingX: "16px",
|
|
238
|
+
summaryPaddingY: "16px",
|
|
239
|
+
summaryFontWeight: 600,
|
|
240
|
+
detailsPaddingX: "16px",
|
|
241
|
+
detailsPaddingBottom: "16px",
|
|
242
|
+
standaloneBackground: "rgba(145, 158, 171, 0.08)",
|
|
243
|
+
standaloneBackgroundExpanded: "rgba(145, 158, 171, 0.16)",
|
|
244
|
+
// Brand-specific — overridden per theme
|
|
245
|
+
borderRadius: "8px"
|
|
246
|
+
},
|
|
247
|
+
toggleButton: {
|
|
248
|
+
borderRadius: "8px",
|
|
249
|
+
borderWidth: "1px",
|
|
250
|
+
paddingXSm: "7px",
|
|
251
|
+
paddingYSm: "5px",
|
|
252
|
+
paddingXMd: "11px",
|
|
253
|
+
paddingYMd: "11px",
|
|
254
|
+
paddingXLg: "15px",
|
|
255
|
+
paddingYLg: "15px",
|
|
256
|
+
fontWeight: 700
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
var defaultTheme_default = defaultTheme;
|
|
261
|
+
|
|
262
|
+
// src/themes/mergeTheme.ts
|
|
263
|
+
function isPlainObject(val) {
|
|
264
|
+
return typeof val === "object" && val !== null && !Array.isArray(val);
|
|
265
|
+
}
|
|
266
|
+
function deepMerge(base, overrides) {
|
|
267
|
+
const result = { ...base };
|
|
268
|
+
for (const key of Object.keys(overrides)) {
|
|
269
|
+
const baseVal = result[key];
|
|
270
|
+
const overrideVal = overrides[key];
|
|
271
|
+
if (isPlainObject(baseVal) && isPlainObject(overrideVal)) {
|
|
272
|
+
result[key] = deepMerge(baseVal, overrideVal);
|
|
273
|
+
} else if (overrideVal !== void 0) {
|
|
274
|
+
result[key] = overrideVal;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
return result;
|
|
278
|
+
}
|
|
279
|
+
function mergeTheme(base, overrides) {
|
|
280
|
+
return deepMerge(base, overrides);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// src/themes/theme1/index.ts
|
|
284
|
+
var theme1Overrides = {
|
|
285
|
+
colors: {
|
|
286
|
+
primary: "#1565C0",
|
|
287
|
+
primaryDark: "#003c8f",
|
|
288
|
+
primaryLight: "#5e92f3",
|
|
289
|
+
primaryContrast: "#ffffff",
|
|
290
|
+
secondary: "#6A1B9A",
|
|
291
|
+
secondaryDark: "#38006b",
|
|
292
|
+
secondaryLight: "#9c4dcc",
|
|
293
|
+
secondaryContrast: "#ffffff",
|
|
294
|
+
success: "#2E7D32",
|
|
295
|
+
warning: "#ED6C02",
|
|
296
|
+
error: "#D32F2F",
|
|
297
|
+
info: "#0288D1",
|
|
298
|
+
background: "#F5F7FA",
|
|
299
|
+
backgroundPaper: "#ffffff",
|
|
300
|
+
backgroundSubtle: "#EEF2F7",
|
|
301
|
+
textPrimary: "#1A2340",
|
|
302
|
+
textSecondary: "#546080",
|
|
303
|
+
textDisabled: "#A0AABF",
|
|
304
|
+
divider: "#DDE3EE",
|
|
305
|
+
border: "#C5CFE0",
|
|
306
|
+
borderFocus: "#1565C0",
|
|
307
|
+
overlayLight: "rgba(255, 255, 255, 0.8)",
|
|
308
|
+
overlayDark: "rgba(21, 101, 192, 0.12)"
|
|
309
|
+
},
|
|
310
|
+
typography: {
|
|
311
|
+
fontFamilyBase: '"Inter", "Roboto", "Helvetica Neue", Arial, sans-serif',
|
|
312
|
+
fontFamilyMono: '"Fira Code", "Courier New", monospace',
|
|
313
|
+
lineHeightTight: 1.2,
|
|
314
|
+
lineHeightBase: 1.5,
|
|
315
|
+
lineHeightRelaxed: 1.75,
|
|
316
|
+
letterSpacingTight: "-0.02em",
|
|
317
|
+
letterSpacingWide: "0.06em"
|
|
318
|
+
},
|
|
319
|
+
borderRadius: {
|
|
320
|
+
xs: "2px",
|
|
321
|
+
sm: "4px",
|
|
322
|
+
md: "8px",
|
|
323
|
+
lg: "12px",
|
|
324
|
+
xl: "16px"
|
|
325
|
+
},
|
|
326
|
+
shadows: {
|
|
327
|
+
xs: "0 1px 2px rgba(21, 101, 192, 0.08)",
|
|
328
|
+
sm: "0 2px 6px rgba(21, 101, 192, 0.10)",
|
|
329
|
+
md: "0 4px 12px rgba(21, 101, 192, 0.12)",
|
|
330
|
+
lg: "0 8px 24px rgba(21, 101, 192, 0.14)",
|
|
331
|
+
xl: "0 16px 48px rgba(21, 101, 192, 0.18)"
|
|
332
|
+
},
|
|
333
|
+
transitions: {
|
|
334
|
+
durationFast: "120ms",
|
|
335
|
+
durationBase: "200ms",
|
|
336
|
+
durationSlow: "350ms"
|
|
337
|
+
},
|
|
338
|
+
components: {
|
|
339
|
+
button: { borderRadius: "8px" },
|
|
340
|
+
input: {
|
|
341
|
+
borderRadius: "8px",
|
|
342
|
+
borderWidth: "1px",
|
|
343
|
+
backgroundDisabled: "#F5F7FA",
|
|
344
|
+
minHeight: "44px"
|
|
345
|
+
},
|
|
346
|
+
card: { borderRadius: "12px" },
|
|
347
|
+
tooltip: {
|
|
348
|
+
borderRadius: "6px",
|
|
349
|
+
background: "#1A2340"
|
|
350
|
+
},
|
|
351
|
+
dialog: { borderRadius: "16px" },
|
|
352
|
+
table: {
|
|
353
|
+
cellPaddingY: "12px",
|
|
354
|
+
headerBackground: "#EEF2F7",
|
|
355
|
+
rowHoverBackground: "#F5F7FA",
|
|
356
|
+
borderColor: "#DDE3EE"
|
|
357
|
+
},
|
|
358
|
+
avatar: { borderRadiusRounded: "12px" },
|
|
359
|
+
divider: { color: "#DDE3EE" },
|
|
360
|
+
alert: { borderRadius: "8px" },
|
|
361
|
+
accordion: { borderRadius: "8px" }
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
var theme1_default = theme1Overrides;
|
|
365
|
+
|
|
366
|
+
// src/themes/theme2/index.ts
|
|
367
|
+
var theme2Overrides = {
|
|
368
|
+
colors: {
|
|
369
|
+
primary: "#2E7D32",
|
|
370
|
+
primaryDark: "#1B5E20",
|
|
371
|
+
primaryLight: "#60AD5E",
|
|
372
|
+
primaryContrast: "#ffffff",
|
|
373
|
+
secondary: "#F57F17",
|
|
374
|
+
secondaryDark: "#BC5100",
|
|
375
|
+
secondaryLight: "#FFAD42",
|
|
376
|
+
secondaryContrast: "#1A1A1A",
|
|
377
|
+
success: "#388E3C",
|
|
378
|
+
warning: "#F57C00",
|
|
379
|
+
error: "#C62828",
|
|
380
|
+
info: "#01579B",
|
|
381
|
+
background: "#F7F9F5",
|
|
382
|
+
backgroundPaper: "#ffffff",
|
|
383
|
+
backgroundSubtle: "#EDF3EB",
|
|
384
|
+
textPrimary: "#1C2A1E",
|
|
385
|
+
textSecondary: "#4A6350",
|
|
386
|
+
textDisabled: "#9DB09F",
|
|
387
|
+
divider: "#D4E5D0",
|
|
388
|
+
border: "#B8D4B2",
|
|
389
|
+
borderFocus: "#2E7D32",
|
|
390
|
+
overlayLight: "rgba(255, 255, 255, 0.8)",
|
|
391
|
+
overlayDark: "rgba(46, 125, 50, 0.12)"
|
|
392
|
+
},
|
|
393
|
+
typography: {
|
|
394
|
+
fontFamilyBase: '"DM Sans", "Roboto", "Helvetica Neue", Arial, sans-serif',
|
|
395
|
+
fontFamilyMono: '"JetBrains Mono", "Courier New", monospace',
|
|
396
|
+
lineHeightTight: 1.25,
|
|
397
|
+
lineHeightBase: 1.6,
|
|
398
|
+
lineHeightRelaxed: 1.8,
|
|
399
|
+
letterSpacingTight: "-0.01em",
|
|
400
|
+
letterSpacingWide: "0.04em"
|
|
401
|
+
},
|
|
402
|
+
borderRadius: {
|
|
403
|
+
xs: "4px",
|
|
404
|
+
sm: "8px",
|
|
405
|
+
md: "12px",
|
|
406
|
+
lg: "20px",
|
|
407
|
+
xl: "28px"
|
|
408
|
+
},
|
|
409
|
+
shadows: {
|
|
410
|
+
xs: "0 1px 2px rgba(46, 125, 50, 0.06)",
|
|
411
|
+
sm: "0 2px 8px rgba(46, 125, 50, 0.08)",
|
|
412
|
+
md: "0 4px 16px rgba(46, 125, 50, 0.10)",
|
|
413
|
+
lg: "0 8px 28px rgba(46, 125, 50, 0.13)",
|
|
414
|
+
xl: "0 16px 56px rgba(46, 125, 50, 0.16)"
|
|
415
|
+
},
|
|
416
|
+
transitions: {
|
|
417
|
+
durationFast: "150ms",
|
|
418
|
+
durationBase: "250ms",
|
|
419
|
+
durationSlow: "400ms"
|
|
420
|
+
},
|
|
421
|
+
components: {
|
|
422
|
+
button: { borderRadius: "12px" },
|
|
423
|
+
input: {
|
|
424
|
+
borderRadius: "12px",
|
|
425
|
+
borderWidth: "1.5px",
|
|
426
|
+
backgroundDisabled: "#F7F9F5",
|
|
427
|
+
minHeight: "46px"
|
|
428
|
+
},
|
|
429
|
+
card: { borderRadius: "20px" },
|
|
430
|
+
tooltip: {
|
|
431
|
+
borderRadius: "8px",
|
|
432
|
+
background: "#1C2A1E"
|
|
433
|
+
},
|
|
434
|
+
dialog: { borderRadius: "24px" },
|
|
435
|
+
table: {
|
|
436
|
+
cellPaddingY: "14px",
|
|
437
|
+
headerBackground: "#EDF3EB",
|
|
438
|
+
rowHoverBackground: "#F7F9F5",
|
|
439
|
+
borderColor: "#D4E5D0"
|
|
440
|
+
},
|
|
441
|
+
avatar: { borderRadiusRounded: "16px" },
|
|
442
|
+
divider: { color: "#D4E5D0" },
|
|
443
|
+
alert: { borderRadius: "12px" },
|
|
444
|
+
accordion: { borderRadius: "12px" }
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
var theme2_default = theme2Overrides;
|
|
448
|
+
|
|
449
|
+
// src/themes/cps/index.ts
|
|
450
|
+
var cpsThemeOverrides = {};
|
|
451
|
+
var cps_default = cpsThemeOverrides;
|
|
452
|
+
|
|
453
|
+
// src/themes/registry.ts
|
|
454
|
+
var themeRegistry = {
|
|
455
|
+
theme1: theme1_default,
|
|
456
|
+
theme2: theme2_default,
|
|
457
|
+
cpsTheme: cps_default
|
|
458
|
+
};
|
|
459
|
+
function getThemeTokens(name) {
|
|
460
|
+
const overrides = themeRegistry[name];
|
|
461
|
+
if (!overrides) {
|
|
462
|
+
const available = Object.keys(themeRegistry).join(", ");
|
|
463
|
+
throw new Error(`Unknown theme "${name}". Available themes: ${available}`);
|
|
464
|
+
}
|
|
465
|
+
return mergeTheme(defaultTheme_default, overrides);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// src/themes/config.ts
|
|
469
|
+
function resolveThemeName() {
|
|
470
|
+
const importMetaEnv = typeof import.meta?.env === "object" ? import.meta.env : void 0;
|
|
471
|
+
const env = importMetaEnv || typeof globalThis !== "undefined" && globalThis.process?.env || {};
|
|
472
|
+
const raw = env["VITE_THEME"] || env["REACT_APP_THEME"] || env["NEXT_PUBLIC_THEME"] || "cpsTheme";
|
|
473
|
+
return raw;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
// src/themes/createMuiTheme.ts
|
|
477
|
+
import { createTheme, alpha, darken } from "@mui/material/styles";
|
|
478
|
+
function createMuiTheme(tokens) {
|
|
479
|
+
return createTheme({
|
|
480
|
+
palette: {
|
|
481
|
+
primary: {
|
|
482
|
+
main: tokens.colors.primary,
|
|
483
|
+
dark: tokens.colors.primaryDark,
|
|
484
|
+
light: tokens.colors.primaryLight,
|
|
485
|
+
contrastText: tokens.colors.primaryContrast
|
|
486
|
+
},
|
|
487
|
+
secondary: {
|
|
488
|
+
main: tokens.colors.secondary,
|
|
489
|
+
dark: tokens.colors.secondaryDark,
|
|
490
|
+
light: tokens.colors.secondaryLight,
|
|
491
|
+
contrastText: tokens.colors.secondaryContrast
|
|
492
|
+
},
|
|
493
|
+
success: { main: tokens.colors.success },
|
|
494
|
+
warning: { main: tokens.colors.warning },
|
|
495
|
+
error: { main: tokens.colors.error },
|
|
496
|
+
info: { main: tokens.colors.info },
|
|
497
|
+
background: {
|
|
498
|
+
default: tokens.colors.background,
|
|
499
|
+
paper: tokens.colors.backgroundPaper,
|
|
500
|
+
subtle: tokens.colors.backgroundSubtle
|
|
501
|
+
},
|
|
502
|
+
border: tokens.colors.border,
|
|
503
|
+
text: {
|
|
504
|
+
primary: tokens.colors.textPrimary,
|
|
505
|
+
secondary: tokens.colors.textSecondary,
|
|
506
|
+
disabled: tokens.colors.textDisabled
|
|
507
|
+
},
|
|
508
|
+
divider: tokens.colors.divider
|
|
509
|
+
},
|
|
510
|
+
typography: {
|
|
511
|
+
fontFamily: tokens.typography.fontFamilyBase,
|
|
512
|
+
fontWeightLight: tokens.typography.fontWeightLight,
|
|
513
|
+
fontWeightRegular: tokens.typography.fontWeightRegular,
|
|
514
|
+
fontWeightMedium: tokens.typography.fontWeightMedium,
|
|
515
|
+
fontWeightBold: tokens.typography.fontWeightBold,
|
|
516
|
+
fontSize: 14
|
|
517
|
+
// MUI base, actual sizes come from tokens
|
|
518
|
+
},
|
|
519
|
+
shape: {
|
|
520
|
+
borderRadius: 8
|
|
521
|
+
// MUI uses a number; components use tokens directly
|
|
522
|
+
},
|
|
523
|
+
spacing: tokens.spacing.unit,
|
|
524
|
+
zIndex: {
|
|
525
|
+
appBar: tokens.zIndex.sticky,
|
|
526
|
+
drawer: tokens.zIndex.overlay,
|
|
527
|
+
modal: tokens.zIndex.modal,
|
|
528
|
+
snackbar: tokens.zIndex.toast,
|
|
529
|
+
tooltip: tokens.zIndex.tooltip
|
|
530
|
+
},
|
|
531
|
+
components: {
|
|
532
|
+
MuiButton: {
|
|
533
|
+
defaultProps: {
|
|
534
|
+
disableElevation: true
|
|
535
|
+
},
|
|
536
|
+
styleOverrides: {
|
|
537
|
+
root: {
|
|
538
|
+
borderRadius: tokens.components.button.borderRadius,
|
|
539
|
+
fontWeight: tokens.components.button.fontWeight,
|
|
540
|
+
letterSpacing: tokens.components.button.letterSpacing,
|
|
541
|
+
textTransform: tokens.components.button.textTransform,
|
|
542
|
+
fontSize: tokens.components.button.fontSizeMd,
|
|
543
|
+
minHeight: tokens.components.button.heightMd,
|
|
544
|
+
paddingLeft: tokens.components.button.paddingX,
|
|
545
|
+
paddingRight: tokens.components.button.paddingX,
|
|
546
|
+
paddingTop: tokens.components.button.paddingY,
|
|
547
|
+
paddingBottom: tokens.components.button.paddingY,
|
|
548
|
+
boxShadow: tokens.shadows.none,
|
|
549
|
+
transition: `all ${tokens.transitions.durationBase} ${tokens.transitions.easingDefault}`,
|
|
550
|
+
"&:hover": {
|
|
551
|
+
boxShadow: tokens.shadows.none
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
sizeSmall: {
|
|
555
|
+
fontSize: tokens.components.button.fontSizeSm,
|
|
556
|
+
minHeight: tokens.components.button.heightSm,
|
|
557
|
+
paddingLeft: tokens.components.button.paddingXSm,
|
|
558
|
+
paddingRight: tokens.components.button.paddingXSm,
|
|
559
|
+
paddingTop: tokens.components.button.paddingYSm,
|
|
560
|
+
paddingBottom: tokens.components.button.paddingYSm
|
|
561
|
+
},
|
|
562
|
+
sizeLarge: {
|
|
563
|
+
fontSize: tokens.components.button.fontSizeLg,
|
|
564
|
+
minHeight: tokens.components.button.heightLg,
|
|
565
|
+
paddingLeft: tokens.components.button.paddingXLg,
|
|
566
|
+
paddingRight: tokens.components.button.paddingXLg,
|
|
567
|
+
paddingTop: tokens.components.button.paddingYLg,
|
|
568
|
+
paddingBottom: tokens.components.button.paddingYLg
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
variants: [
|
|
572
|
+
// xlarge size
|
|
573
|
+
{
|
|
574
|
+
props: { size: "xlarge" },
|
|
575
|
+
style: {
|
|
576
|
+
fontSize: tokens.components.button.fontSizeLg,
|
|
577
|
+
minHeight: tokens.components.button.heightXl,
|
|
578
|
+
paddingLeft: tokens.components.button.paddingXXl,
|
|
579
|
+
paddingRight: tokens.components.button.paddingXXl,
|
|
580
|
+
paddingTop: tokens.components.button.paddingYXl,
|
|
581
|
+
paddingBottom: tokens.components.button.paddingYXl
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
// soft variant — base (inherit/no color)
|
|
585
|
+
{
|
|
586
|
+
props: { variant: "soft" },
|
|
587
|
+
style: {
|
|
588
|
+
backgroundColor: alpha(tokens.colors.textSecondary, 0.12),
|
|
589
|
+
color: tokens.colors.textPrimary,
|
|
590
|
+
boxShadow: tokens.shadows.none,
|
|
591
|
+
"&:hover": {
|
|
592
|
+
backgroundColor: alpha(tokens.colors.textSecondary, 0.2),
|
|
593
|
+
boxShadow: tokens.shadows.none
|
|
594
|
+
},
|
|
595
|
+
"&.Mui-disabled": {
|
|
596
|
+
backgroundColor: alpha(tokens.colors.textDisabled, 0.12),
|
|
597
|
+
color: tokens.colors.textDisabled
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
// soft variant — primary
|
|
602
|
+
{
|
|
603
|
+
props: { variant: "soft", color: "primary" },
|
|
604
|
+
style: {
|
|
605
|
+
backgroundColor: alpha(tokens.colors.primary, 0.16),
|
|
606
|
+
color: tokens.colors.primaryDark,
|
|
607
|
+
"&:hover": { backgroundColor: alpha(tokens.colors.primary, 0.24) }
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
// soft variant — secondary
|
|
611
|
+
{
|
|
612
|
+
props: { variant: "soft", color: "secondary" },
|
|
613
|
+
style: {
|
|
614
|
+
backgroundColor: alpha(tokens.colors.secondary, 0.16),
|
|
615
|
+
color: tokens.colors.secondaryDark,
|
|
616
|
+
"&:hover": { backgroundColor: alpha(tokens.colors.secondary, 0.24) }
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
// soft variant — error
|
|
620
|
+
{
|
|
621
|
+
props: { variant: "soft", color: "error" },
|
|
622
|
+
style: {
|
|
623
|
+
backgroundColor: alpha(tokens.colors.error, 0.16),
|
|
624
|
+
color: darken(tokens.colors.error, 0.2),
|
|
625
|
+
"&:hover": { backgroundColor: alpha(tokens.colors.error, 0.24) }
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
// soft variant — warning
|
|
629
|
+
{
|
|
630
|
+
props: { variant: "soft", color: "warning" },
|
|
631
|
+
style: {
|
|
632
|
+
backgroundColor: alpha(tokens.colors.warning, 0.16),
|
|
633
|
+
color: darken(tokens.colors.warning, 0.2),
|
|
634
|
+
"&:hover": { backgroundColor: alpha(tokens.colors.warning, 0.24) }
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
// soft variant — success
|
|
638
|
+
{
|
|
639
|
+
props: { variant: "soft", color: "success" },
|
|
640
|
+
style: {
|
|
641
|
+
backgroundColor: alpha(tokens.colors.success, 0.16),
|
|
642
|
+
color: darken(tokens.colors.success, 0.2),
|
|
643
|
+
"&:hover": { backgroundColor: alpha(tokens.colors.success, 0.24) }
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
// soft variant — info
|
|
647
|
+
{
|
|
648
|
+
props: { variant: "soft", color: "info" },
|
|
649
|
+
style: {
|
|
650
|
+
backgroundColor: alpha(tokens.colors.info, 0.16),
|
|
651
|
+
color: darken(tokens.colors.info, 0.2),
|
|
652
|
+
"&:hover": { backgroundColor: alpha(tokens.colors.info, 0.24) }
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
]
|
|
656
|
+
},
|
|
657
|
+
MuiTextField: {
|
|
658
|
+
styleOverrides: {
|
|
659
|
+
root: {
|
|
660
|
+
"& .MuiOutlinedInput-root": {
|
|
661
|
+
borderRadius: tokens.components.input.borderRadius,
|
|
662
|
+
backgroundColor: tokens.components.input.background,
|
|
663
|
+
minHeight: tokens.components.input.minHeight,
|
|
664
|
+
"& fieldset": {
|
|
665
|
+
borderWidth: tokens.components.input.borderWidth,
|
|
666
|
+
borderColor: tokens.colors.border
|
|
667
|
+
},
|
|
668
|
+
"&:hover fieldset": {
|
|
669
|
+
borderColor: tokens.colors.primary
|
|
670
|
+
},
|
|
671
|
+
"&.Mui-focused fieldset": {
|
|
672
|
+
borderWidth: tokens.components.input.borderWidthFocus,
|
|
673
|
+
borderColor: tokens.colors.borderFocus
|
|
674
|
+
},
|
|
675
|
+
"&.Mui-disabled": {
|
|
676
|
+
backgroundColor: tokens.components.input.backgroundDisabled
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
"& .MuiInputLabel-root": {
|
|
680
|
+
fontSize: tokens.components.input.labelFontSize
|
|
681
|
+
},
|
|
682
|
+
"& .MuiFormHelperText-root": {
|
|
683
|
+
fontSize: tokens.components.input.helperFontSize
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
MuiCard: {
|
|
689
|
+
styleOverrides: {
|
|
690
|
+
root: {
|
|
691
|
+
borderRadius: tokens.components.card.borderRadius,
|
|
692
|
+
backgroundColor: tokens.components.card.background,
|
|
693
|
+
boxShadow: tokens.shadows.sm,
|
|
694
|
+
border: `${tokens.components.card.borderWidth} solid ${tokens.colors.divider}`
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
},
|
|
698
|
+
MuiCardContent: {
|
|
699
|
+
styleOverrides: {
|
|
700
|
+
root: {
|
|
701
|
+
padding: tokens.components.card.padding,
|
|
702
|
+
"&:last-child": {
|
|
703
|
+
paddingBottom: tokens.components.card.padding
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
MuiChip: {
|
|
709
|
+
styleOverrides: {
|
|
710
|
+
root: {
|
|
711
|
+
height: tokens.components.chip.height,
|
|
712
|
+
borderRadius: tokens.components.chip.borderRadius,
|
|
713
|
+
fontSize: tokens.components.chip.fontSize,
|
|
714
|
+
fontWeight: tokens.components.chip.fontWeight,
|
|
715
|
+
paddingLeft: tokens.components.chip.paddingX,
|
|
716
|
+
paddingRight: tokens.components.chip.paddingX
|
|
717
|
+
},
|
|
718
|
+
sizeSmall: {
|
|
719
|
+
height: tokens.components.chip.heightSm
|
|
720
|
+
},
|
|
721
|
+
icon: {
|
|
722
|
+
width: tokens.components.chip.iconSize,
|
|
723
|
+
height: tokens.components.chip.iconSize
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
variants: [
|
|
727
|
+
// ── soft — base (default color) ───────────────────────────────────
|
|
728
|
+
{
|
|
729
|
+
props: { variant: "soft" },
|
|
730
|
+
style: {
|
|
731
|
+
backgroundColor: alpha(tokens.colors.textSecondary, 0.12),
|
|
732
|
+
color: tokens.colors.textPrimary,
|
|
733
|
+
"&:hover": { backgroundColor: alpha(tokens.colors.textSecondary, 0.2) },
|
|
734
|
+
"&.Mui-disabled": { opacity: 0.6 }
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
{ props: { variant: "soft", color: "primary" }, style: { backgroundColor: alpha(tokens.colors.primary, 0.16), color: darken(tokens.colors.primary, 0.2), "&:hover": { backgroundColor: alpha(tokens.colors.primary, 0.24) } } },
|
|
738
|
+
{ props: { variant: "soft", color: "secondary" }, style: { backgroundColor: alpha(tokens.colors.secondary, 0.16), color: darken(tokens.colors.secondary, 0.2), "&:hover": { backgroundColor: alpha(tokens.colors.secondary, 0.24) } } },
|
|
739
|
+
{ props: { variant: "soft", color: "info" }, style: { backgroundColor: alpha(tokens.colors.info, 0.16), color: darken(tokens.colors.info, 0.2), "&:hover": { backgroundColor: alpha(tokens.colors.info, 0.24) } } },
|
|
740
|
+
{ props: { variant: "soft", color: "success" }, style: { backgroundColor: alpha(tokens.colors.success, 0.16), color: darken(tokens.colors.success, 0.2), "&:hover": { backgroundColor: alpha(tokens.colors.success, 0.24) } } },
|
|
741
|
+
{ props: { variant: "soft", color: "warning" }, style: { backgroundColor: alpha(tokens.colors.warning, 0.16), color: darken(tokens.colors.warning, 0.2), "&:hover": { backgroundColor: alpha(tokens.colors.warning, 0.24) } } },
|
|
742
|
+
{ props: { variant: "soft", color: "error" }, style: { backgroundColor: alpha(tokens.colors.error, 0.16), color: darken(tokens.colors.error, 0.2), "&:hover": { backgroundColor: alpha(tokens.colors.error, 0.24) } } },
|
|
743
|
+
// ── black ─────────────────────────────────────────────────────────
|
|
744
|
+
{ props: { variant: "filled", color: "black" }, style: { backgroundColor: tokens.colors.textPrimary, color: tokens.colors.backgroundPaper, "&:hover": { backgroundColor: darken(tokens.colors.textPrimary, 0.1) } } },
|
|
745
|
+
{ props: { variant: "outlined", color: "black" }, style: { borderColor: tokens.colors.textPrimary, color: tokens.colors.textPrimary } },
|
|
746
|
+
{ props: { variant: "soft", color: "black" }, style: { backgroundColor: alpha(tokens.colors.textPrimary, 0.12), color: tokens.colors.textPrimary, "&:hover": { backgroundColor: alpha(tokens.colors.textPrimary, 0.2) } } },
|
|
747
|
+
// ── white ─────────────────────────────────────────────────────────
|
|
748
|
+
{ props: { variant: "filled", color: "white" }, style: { backgroundColor: tokens.colors.backgroundPaper, color: tokens.colors.textPrimary, border: `1px solid ${tokens.colors.divider}`, "&:hover": { backgroundColor: tokens.colors.backgroundSubtle } } },
|
|
749
|
+
{ props: { variant: "outlined", color: "white" }, style: { borderColor: alpha(tokens.colors.backgroundPaper, 0.32), color: tokens.colors.backgroundPaper } },
|
|
750
|
+
{ props: { variant: "soft", color: "white" }, style: { backgroundColor: alpha(tokens.colors.backgroundPaper, 0.16), color: tokens.colors.backgroundPaper, "&:hover": { backgroundColor: alpha(tokens.colors.backgroundPaper, 0.24) } } }
|
|
751
|
+
]
|
|
752
|
+
},
|
|
753
|
+
MuiBadge: {
|
|
754
|
+
styleOverrides: {
|
|
755
|
+
badge: {
|
|
756
|
+
height: tokens.components.badge.height,
|
|
757
|
+
minWidth: tokens.components.badge.minWidth,
|
|
758
|
+
borderRadius: tokens.components.badge.borderRadius,
|
|
759
|
+
fontSize: tokens.components.badge.fontSize,
|
|
760
|
+
fontWeight: tokens.components.badge.fontWeight,
|
|
761
|
+
padding: `0 ${tokens.components.badge.paddingX}`
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
MuiTooltip: {
|
|
766
|
+
styleOverrides: {
|
|
767
|
+
tooltip: {
|
|
768
|
+
backgroundColor: tokens.components.tooltip.background,
|
|
769
|
+
color: tokens.components.tooltip.color,
|
|
770
|
+
borderRadius: tokens.components.tooltip.borderRadius,
|
|
771
|
+
fontSize: tokens.components.tooltip.fontSize,
|
|
772
|
+
padding: `${tokens.components.tooltip.paddingY} ${tokens.components.tooltip.paddingX}`,
|
|
773
|
+
maxWidth: tokens.components.tooltip.maxWidth
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
MuiDialog: {
|
|
778
|
+
styleOverrides: {
|
|
779
|
+
paper: {
|
|
780
|
+
borderRadius: tokens.components.dialog.borderRadius,
|
|
781
|
+
backgroundColor: tokens.components.dialog.background,
|
|
782
|
+
maxWidth: tokens.components.dialog.maxWidth
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
MuiDialogContent: {
|
|
787
|
+
styleOverrides: {
|
|
788
|
+
root: {
|
|
789
|
+
padding: tokens.components.dialog.padding
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
MuiTableCell: {
|
|
794
|
+
styleOverrides: {
|
|
795
|
+
root: {
|
|
796
|
+
paddingLeft: tokens.components.table.cellPaddingX,
|
|
797
|
+
paddingRight: tokens.components.table.cellPaddingX,
|
|
798
|
+
paddingTop: tokens.components.table.cellPaddingY,
|
|
799
|
+
paddingBottom: tokens.components.table.cellPaddingY,
|
|
800
|
+
borderBottom: `${tokens.components.table.borderWidth} solid ${tokens.components.table.borderColor}`
|
|
801
|
+
},
|
|
802
|
+
head: {
|
|
803
|
+
fontWeight: tokens.components.table.headerFontWeight,
|
|
804
|
+
backgroundColor: tokens.components.table.headerBackground
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
MuiTableRow: {
|
|
809
|
+
styleOverrides: {
|
|
810
|
+
root: {
|
|
811
|
+
"&:hover": {
|
|
812
|
+
backgroundColor: tokens.components.table.rowHoverBackground
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
MuiAvatar: {
|
|
818
|
+
styleOverrides: {
|
|
819
|
+
root: {
|
|
820
|
+
width: tokens.components.avatar.sizeMd,
|
|
821
|
+
height: tokens.components.avatar.sizeMd,
|
|
822
|
+
borderRadius: tokens.components.avatar.borderRadius,
|
|
823
|
+
fontSize: tokens.typography.fontSizeLg,
|
|
824
|
+
fontWeight: tokens.typography.fontWeightSemiBold
|
|
825
|
+
},
|
|
826
|
+
rounded: {
|
|
827
|
+
borderRadius: tokens.components.avatar.borderRadiusRounded
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
MuiAvatarGroup: {
|
|
832
|
+
styleOverrides: {
|
|
833
|
+
root: {
|
|
834
|
+
"& .MuiAvatar-root": {
|
|
835
|
+
marginLeft: tokens.components.avatar.groupSpacing,
|
|
836
|
+
border: `${tokens.components.avatar.groupBorderWidth} solid ${tokens.colors.backgroundPaper}`,
|
|
837
|
+
boxSizing: "content-box"
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
MuiDivider: {
|
|
843
|
+
styleOverrides: {
|
|
844
|
+
root: {
|
|
845
|
+
borderColor: tokens.components.divider.color,
|
|
846
|
+
borderBottomWidth: tokens.components.divider.thickness
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
MuiAlert: {
|
|
851
|
+
styleOverrides: {
|
|
852
|
+
root: {
|
|
853
|
+
alignItems: "center",
|
|
854
|
+
borderRadius: tokens.components.alert.borderRadius,
|
|
855
|
+
padding: tokens.components.alert.padding,
|
|
856
|
+
fontSize: tokens.typography.fontSizeMd
|
|
857
|
+
},
|
|
858
|
+
// ── Standard ──────────────────────────────────────────────────────
|
|
859
|
+
standardInfo: {
|
|
860
|
+
backgroundColor: alpha(tokens.colors.info, 0.16),
|
|
861
|
+
color: darken(tokens.colors.info, 0.4),
|
|
862
|
+
"& .MuiAlert-icon": { color: tokens.colors.info }
|
|
863
|
+
},
|
|
864
|
+
standardSuccess: {
|
|
865
|
+
backgroundColor: alpha(tokens.colors.success, 0.16),
|
|
866
|
+
color: darken(tokens.colors.success, 0.4),
|
|
867
|
+
"& .MuiAlert-icon": { color: tokens.colors.success }
|
|
868
|
+
},
|
|
869
|
+
standardWarning: {
|
|
870
|
+
backgroundColor: alpha(tokens.colors.warning, 0.16),
|
|
871
|
+
color: darken(tokens.colors.warning, 0.4),
|
|
872
|
+
"& .MuiAlert-icon": { color: tokens.colors.warning }
|
|
873
|
+
},
|
|
874
|
+
standardError: {
|
|
875
|
+
backgroundColor: alpha(tokens.colors.error, 0.16),
|
|
876
|
+
color: darken(tokens.colors.error, 0.4),
|
|
877
|
+
"& .MuiAlert-icon": { color: tokens.colors.error }
|
|
878
|
+
},
|
|
879
|
+
// ── Filled ────────────────────────────────────────────────────────
|
|
880
|
+
filledInfo: {
|
|
881
|
+
backgroundColor: tokens.colors.info,
|
|
882
|
+
color: tokens.colors.primaryContrast,
|
|
883
|
+
fontWeight: tokens.typography.fontWeightMedium
|
|
884
|
+
},
|
|
885
|
+
filledSuccess: {
|
|
886
|
+
backgroundColor: tokens.colors.success,
|
|
887
|
+
color: tokens.colors.primaryContrast,
|
|
888
|
+
fontWeight: tokens.typography.fontWeightMedium
|
|
889
|
+
},
|
|
890
|
+
filledWarning: {
|
|
891
|
+
backgroundColor: tokens.colors.warning,
|
|
892
|
+
// Warning is light enough to need dark text
|
|
893
|
+
color: tokens.colors.textPrimary,
|
|
894
|
+
fontWeight: tokens.typography.fontWeightMedium,
|
|
895
|
+
"& .MuiAlert-icon": { color: tokens.colors.textPrimary }
|
|
896
|
+
},
|
|
897
|
+
filledError: {
|
|
898
|
+
backgroundColor: tokens.colors.error,
|
|
899
|
+
color: tokens.colors.primaryContrast,
|
|
900
|
+
fontWeight: tokens.typography.fontWeightMedium
|
|
901
|
+
},
|
|
902
|
+
// ── Outlined ──────────────────────────────────────────────────────
|
|
903
|
+
outlinedInfo: {
|
|
904
|
+
backgroundColor: alpha(tokens.colors.info, 0.08),
|
|
905
|
+
color: darken(tokens.colors.info, 0.2),
|
|
906
|
+
borderColor: alpha(tokens.colors.info, 0.32),
|
|
907
|
+
"& .MuiAlert-icon": { color: tokens.colors.info }
|
|
908
|
+
},
|
|
909
|
+
outlinedSuccess: {
|
|
910
|
+
backgroundColor: alpha(tokens.colors.success, 0.08),
|
|
911
|
+
color: darken(tokens.colors.success, 0.2),
|
|
912
|
+
borderColor: alpha(tokens.colors.success, 0.32),
|
|
913
|
+
"& .MuiAlert-icon": { color: tokens.colors.success }
|
|
914
|
+
},
|
|
915
|
+
outlinedWarning: {
|
|
916
|
+
backgroundColor: alpha(tokens.colors.warning, 0.08),
|
|
917
|
+
color: darken(tokens.colors.warning, 0.2),
|
|
918
|
+
borderColor: alpha(tokens.colors.warning, 0.32),
|
|
919
|
+
"& .MuiAlert-icon": { color: tokens.colors.warning }
|
|
920
|
+
},
|
|
921
|
+
outlinedError: {
|
|
922
|
+
backgroundColor: alpha(tokens.colors.error, 0.08),
|
|
923
|
+
color: darken(tokens.colors.error, 0.2),
|
|
924
|
+
borderColor: alpha(tokens.colors.error, 0.32),
|
|
925
|
+
"& .MuiAlert-icon": { color: tokens.colors.error }
|
|
926
|
+
},
|
|
927
|
+
icon: {
|
|
928
|
+
opacity: 1,
|
|
929
|
+
padding: 0
|
|
930
|
+
},
|
|
931
|
+
message: {
|
|
932
|
+
padding: "4px 0"
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
MuiAlertTitle: {
|
|
937
|
+
styleOverrides: {
|
|
938
|
+
root: {
|
|
939
|
+
fontWeight: tokens.typography.fontWeightSemiBold,
|
|
940
|
+
marginBottom: "4px"
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
MuiAccordion: {
|
|
945
|
+
styleOverrides: {
|
|
946
|
+
root: {
|
|
947
|
+
borderRadius: tokens.components.accordion.borderRadius,
|
|
948
|
+
boxShadow: tokens.shadows.md,
|
|
949
|
+
marginBottom: tokens.spacing.sm,
|
|
950
|
+
"&:before": { display: "none" },
|
|
951
|
+
"&.Mui-expanded": { margin: `0 0 ${tokens.spacing.sm}` },
|
|
952
|
+
"&:first-of-type": { borderRadius: tokens.components.accordion.borderRadius },
|
|
953
|
+
"&:last-of-type": { borderRadius: tokens.components.accordion.borderRadius }
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
MuiAccordionSummary: {
|
|
958
|
+
styleOverrides: {
|
|
959
|
+
root: {
|
|
960
|
+
padding: `${tokens.components.accordion.summaryPaddingY} 8px ${tokens.components.accordion.summaryPaddingY} ${tokens.components.accordion.summaryPaddingX}`,
|
|
961
|
+
fontWeight: tokens.components.accordion.summaryFontWeight,
|
|
962
|
+
minHeight: "auto",
|
|
963
|
+
"&.Mui-expanded": { minHeight: "auto" }
|
|
964
|
+
},
|
|
965
|
+
content: {
|
|
966
|
+
margin: 0,
|
|
967
|
+
"&.Mui-expanded": { margin: 0 }
|
|
968
|
+
},
|
|
969
|
+
expandIconWrapper: {
|
|
970
|
+
color: tokens.colors.textSecondary
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
MuiAccordionDetails: {
|
|
975
|
+
styleOverrides: {
|
|
976
|
+
root: {
|
|
977
|
+
padding: `0 ${tokens.components.accordion.detailsPaddingX} ${tokens.components.accordion.detailsPaddingBottom}`
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
},
|
|
981
|
+
MuiToggleButton: {
|
|
982
|
+
styleOverrides: {
|
|
983
|
+
root: {
|
|
984
|
+
borderRadius: tokens.components.toggleButton.borderRadius,
|
|
985
|
+
borderWidth: tokens.components.toggleButton.borderWidth,
|
|
986
|
+
borderColor: tokens.colors.border,
|
|
987
|
+
fontWeight: tokens.components.toggleButton.fontWeight,
|
|
988
|
+
paddingLeft: tokens.components.toggleButton.paddingXMd,
|
|
989
|
+
paddingRight: tokens.components.toggleButton.paddingXMd,
|
|
990
|
+
paddingTop: tokens.components.toggleButton.paddingYMd,
|
|
991
|
+
paddingBottom: tokens.components.toggleButton.paddingYMd,
|
|
992
|
+
textTransform: "none",
|
|
993
|
+
transition: `all ${tokens.transitions.durationBase} ${tokens.transitions.easingDefault}`,
|
|
994
|
+
"&.Mui-selected": {
|
|
995
|
+
backgroundColor: alpha(tokens.colors.textPrimary, 0.08),
|
|
996
|
+
color: tokens.colors.textPrimary,
|
|
997
|
+
"&:hover": {
|
|
998
|
+
backgroundColor: alpha(tokens.colors.textPrimary, 0.16)
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
"&.Mui-disabled": {
|
|
1002
|
+
borderColor: tokens.colors.border
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
1005
|
+
sizeSmall: {
|
|
1006
|
+
paddingLeft: tokens.components.toggleButton.paddingXSm,
|
|
1007
|
+
paddingRight: tokens.components.toggleButton.paddingXSm,
|
|
1008
|
+
paddingTop: tokens.components.toggleButton.paddingYSm,
|
|
1009
|
+
paddingBottom: tokens.components.toggleButton.paddingYSm
|
|
1010
|
+
},
|
|
1011
|
+
sizeLarge: {
|
|
1012
|
+
paddingLeft: tokens.components.toggleButton.paddingXLg,
|
|
1013
|
+
paddingRight: tokens.components.toggleButton.paddingXLg,
|
|
1014
|
+
paddingTop: tokens.components.toggleButton.paddingYLg,
|
|
1015
|
+
paddingBottom: tokens.components.toggleButton.paddingYLg
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
variants: [
|
|
1019
|
+
{ props: { color: "primary" }, style: { "&.Mui-selected": { backgroundColor: alpha(tokens.colors.primary, 0.16), color: tokens.colors.primary, "&:hover": { backgroundColor: alpha(tokens.colors.primary, 0.24) } } } },
|
|
1020
|
+
{ props: { color: "secondary" }, style: { "&.Mui-selected": { backgroundColor: alpha(tokens.colors.secondary, 0.16), color: tokens.colors.secondary, "&:hover": { backgroundColor: alpha(tokens.colors.secondary, 0.24) } } } },
|
|
1021
|
+
{ props: { color: "info" }, style: { "&.Mui-selected": { backgroundColor: alpha(tokens.colors.info, 0.16), color: tokens.colors.info, "&:hover": { backgroundColor: alpha(tokens.colors.info, 0.24) } } } },
|
|
1022
|
+
{ props: { color: "success" }, style: { "&.Mui-selected": { backgroundColor: alpha(tokens.colors.success, 0.16), color: tokens.colors.success, "&:hover": { backgroundColor: alpha(tokens.colors.success, 0.24) } } } },
|
|
1023
|
+
{ props: { color: "warning" }, style: { "&.Mui-selected": { backgroundColor: alpha(tokens.colors.warning, 0.16), color: tokens.colors.warning, "&:hover": { backgroundColor: alpha(tokens.colors.warning, 0.24) } } } },
|
|
1024
|
+
{ props: { color: "error" }, style: { "&.Mui-selected": { backgroundColor: alpha(tokens.colors.error, 0.16), color: tokens.colors.error, "&:hover": { backgroundColor: alpha(tokens.colors.error, 0.24) } } } }
|
|
1025
|
+
]
|
|
1026
|
+
},
|
|
1027
|
+
MuiToggleButtonGroup: {
|
|
1028
|
+
styleOverrides: {
|
|
1029
|
+
root: {
|
|
1030
|
+
borderRadius: tokens.components.toggleButton.borderRadius
|
|
1031
|
+
},
|
|
1032
|
+
grouped: {
|
|
1033
|
+
"&:not(:first-of-type)": {
|
|
1034
|
+
borderColor: tokens.colors.border
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
MuiPaper: {
|
|
1040
|
+
styleOverrides: {
|
|
1041
|
+
root: {
|
|
1042
|
+
backgroundImage: "none"
|
|
1043
|
+
// Remove MUI's default gradient on dark mode
|
|
1044
|
+
},
|
|
1045
|
+
elevation1: { boxShadow: tokens.shadows.sm },
|
|
1046
|
+
elevation2: { boxShadow: tokens.shadows.md },
|
|
1047
|
+
elevation3: { boxShadow: tokens.shadows.lg }
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
},
|
|
1051
|
+
// Attach the raw tokens to the theme so any component can access
|
|
1052
|
+
// values not already covered by MUI's built-in theme shape.
|
|
1053
|
+
// @ts-ignore — augmented in src/types/mui.d.ts
|
|
1054
|
+
tokens
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
// src/ThemeProvider.tsx
|
|
1059
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1060
|
+
function ToolkitThemeProvider({
|
|
1061
|
+
theme,
|
|
1062
|
+
children,
|
|
1063
|
+
injectCssBaseline = true
|
|
1064
|
+
}) {
|
|
1065
|
+
const themeName = theme ?? resolveThemeName();
|
|
1066
|
+
const tokens = getThemeTokens(themeName);
|
|
1067
|
+
const muiTheme = createMuiTheme(tokens);
|
|
1068
|
+
return /* @__PURE__ */ jsxs(MuiThemeProvider, { theme: muiTheme, children: [
|
|
1069
|
+
injectCssBaseline && /* @__PURE__ */ jsx(CssBaseline, {}),
|
|
1070
|
+
children
|
|
1071
|
+
] });
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
// src/components/Button/Button.tsx
|
|
1075
|
+
import {
|
|
1076
|
+
Button as MuiButton,
|
|
1077
|
+
CircularProgress
|
|
1078
|
+
} from "@mui/material";
|
|
1079
|
+
import { styled } from "@mui/material/styles";
|
|
1080
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
1081
|
+
var StyledButton = styled(MuiButton)(({ theme }) => ({
|
|
1082
|
+
// Gap between icon and label — not surfaced by MUI's styleOverrides
|
|
1083
|
+
"& .MuiButton-startIcon": {
|
|
1084
|
+
marginRight: theme.tokens.components.button.iconGap
|
|
1085
|
+
},
|
|
1086
|
+
"& .MuiButton-endIcon": {
|
|
1087
|
+
marginLeft: theme.tokens.components.button.iconGap
|
|
1088
|
+
}
|
|
1089
|
+
}));
|
|
1090
|
+
function Button({ loading, disabled, children, ...props }) {
|
|
1091
|
+
const baseLabel = props["aria-label"] ?? (typeof children === "string" ? children : void 0);
|
|
1092
|
+
const ariaLabel = loading && baseLabel ? `${baseLabel}, loading` : props["aria-label"];
|
|
1093
|
+
return /* @__PURE__ */ jsx2(
|
|
1094
|
+
StyledButton,
|
|
1095
|
+
{
|
|
1096
|
+
...props,
|
|
1097
|
+
disabled: disabled || loading,
|
|
1098
|
+
"aria-busy": loading || void 0,
|
|
1099
|
+
"aria-label": ariaLabel,
|
|
1100
|
+
startIcon: loading ? /* @__PURE__ */ jsx2(CircularProgress, { size: 16, color: "inherit" }) : props.startIcon,
|
|
1101
|
+
children
|
|
1102
|
+
}
|
|
1103
|
+
);
|
|
1104
|
+
}
|
|
1105
|
+
Button.displayName = "ToolkitButton";
|
|
1106
|
+
|
|
1107
|
+
// src/components/Chip/Chip.tsx
|
|
1108
|
+
import { Chip as MuiChip, SvgIcon } from "@mui/material";
|
|
1109
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1110
|
+
function CircleXIcon(props) {
|
|
1111
|
+
return /* @__PURE__ */ jsx3(SvgIcon, { ...props, viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx3(
|
|
1112
|
+
"path",
|
|
1113
|
+
{
|
|
1114
|
+
fill: "currentColor",
|
|
1115
|
+
fillRule: "evenodd",
|
|
1116
|
+
d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10M8.97 8.97a.75.75 0 0 1 1.06 0L12 10.94l1.97-1.97a.75.75 0 0 1 1.06 1.06L13.06 12l1.97 1.97a.75.75 0 0 1-1.06 1.06L12 13.06l-1.97 1.97a.75.75 0 0 1-1.06-1.06L10.94 12l-1.97-1.97a.75.75 0 0 1 0-1.06",
|
|
1117
|
+
clipRule: "evenodd"
|
|
1118
|
+
}
|
|
1119
|
+
) });
|
|
1120
|
+
}
|
|
1121
|
+
function Chip({ deleteIcon, onDelete, ...props }) {
|
|
1122
|
+
return /* @__PURE__ */ jsx3(
|
|
1123
|
+
MuiChip,
|
|
1124
|
+
{
|
|
1125
|
+
...props,
|
|
1126
|
+
onDelete,
|
|
1127
|
+
deleteIcon: onDelete ? deleteIcon ?? /* @__PURE__ */ jsx3(CircleXIcon, {}) : void 0
|
|
1128
|
+
}
|
|
1129
|
+
);
|
|
1130
|
+
}
|
|
1131
|
+
Chip.displayName = "ToolkitChip";
|
|
1132
|
+
|
|
1133
|
+
// src/components/Card/Card.tsx
|
|
1134
|
+
import {
|
|
1135
|
+
Card as MuiCard,
|
|
1136
|
+
CardContent as MuiCardContent,
|
|
1137
|
+
CardHeader as MuiCardHeader,
|
|
1138
|
+
CardActions as MuiCardActions
|
|
1139
|
+
} from "@mui/material";
|
|
1140
|
+
import { styled as styled2 } from "@mui/material/styles";
|
|
1141
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1142
|
+
var StyledCard = styled2(MuiCard, {
|
|
1143
|
+
shouldForwardProp: (prop) => prop !== "compact"
|
|
1144
|
+
})(({ theme, compact }) => ({
|
|
1145
|
+
padding: compact ? theme.tokens.components.card.paddingCompact : theme.tokens.components.card.padding,
|
|
1146
|
+
// Override MUI CardContent's own padding since we set it at the Card level
|
|
1147
|
+
"& .MuiCardContent-root": {
|
|
1148
|
+
padding: 0,
|
|
1149
|
+
"&:last-child": { paddingBottom: 0 }
|
|
1150
|
+
},
|
|
1151
|
+
"&:hover": {
|
|
1152
|
+
boxShadow: theme.tokens.shadows.md,
|
|
1153
|
+
transition: `box-shadow ${theme.tokens.transitions.durationBase} ${theme.tokens.transitions.easingDefault}`
|
|
1154
|
+
}
|
|
1155
|
+
}));
|
|
1156
|
+
function Card({ compact, children, ...props }) {
|
|
1157
|
+
return /* @__PURE__ */ jsx4(StyledCard, { compact, ...props, children });
|
|
1158
|
+
}
|
|
1159
|
+
var CardContent = MuiCardContent;
|
|
1160
|
+
var CardHeader = MuiCardHeader;
|
|
1161
|
+
var CardActions = MuiCardActions;
|
|
1162
|
+
Card.displayName = "ToolkitCard";
|
|
1163
|
+
|
|
1164
|
+
// src/components/TextField/TextField.tsx
|
|
1165
|
+
import {
|
|
1166
|
+
TextField as MuiTextField
|
|
1167
|
+
} from "@mui/material";
|
|
1168
|
+
import { styled as styled3 } from "@mui/material/styles";
|
|
1169
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1170
|
+
var StyledTextField = styled3(MuiTextField)(({ theme }) => ({
|
|
1171
|
+
// Transition on the entire field when focus changes
|
|
1172
|
+
"& .MuiOutlinedInput-root": {
|
|
1173
|
+
transition: `box-shadow ${theme.tokens.transitions.durationFast} ${theme.tokens.transitions.easingDefault}`,
|
|
1174
|
+
"&.Mui-focused": {
|
|
1175
|
+
boxShadow: theme.tokens.shadows.xs
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
}));
|
|
1179
|
+
function TextField({ error, FormHelperTextProps, inputProps, label, ...props }) {
|
|
1180
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1181
|
+
if (!label && !props["aria-label"] && !props["aria-labelledby"] && !inputProps?.["aria-label"] && !inputProps?.["aria-labelledby"]) {
|
|
1182
|
+
console.warn("[ToolkitTextField] Missing accessible label. Provide `label`, `aria-label`, or `aria-labelledby`.");
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
return /* @__PURE__ */ jsx5(
|
|
1186
|
+
StyledTextField,
|
|
1187
|
+
{
|
|
1188
|
+
fullWidth: true,
|
|
1189
|
+
variant: "outlined",
|
|
1190
|
+
label,
|
|
1191
|
+
error,
|
|
1192
|
+
inputProps,
|
|
1193
|
+
FormHelperTextProps: error ? { role: "alert", ...FormHelperTextProps } : FormHelperTextProps,
|
|
1194
|
+
...props
|
|
1195
|
+
}
|
|
1196
|
+
);
|
|
1197
|
+
}
|
|
1198
|
+
TextField.displayName = "ToolkitTextField";
|
|
1199
|
+
|
|
1200
|
+
// src/components/Alert/Alert.tsx
|
|
1201
|
+
import {
|
|
1202
|
+
Alert as MuiAlert,
|
|
1203
|
+
AlertTitle as MuiAlertTitle,
|
|
1204
|
+
SvgIcon as SvgIcon2
|
|
1205
|
+
} from "@mui/material";
|
|
1206
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
1207
|
+
var InfoIcon = /* @__PURE__ */ jsx6(SvgIcon2, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("path", { fill: "currentColor", fillRule: "evenodd", d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10m-10 5.75a.75.75 0 0 0 .75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75M12 7a1 1 0 1 1 0 2a1 1 0 0 1 0-2", clipRule: "evenodd" }) });
|
|
1208
|
+
var SuccessIcon = /* @__PURE__ */ jsx6(SvgIcon2, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("path", { fill: "currentColor", fillRule: "evenodd", d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10m-5.97-3.03a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47l2.235-2.235L14.97 8.97a.75.75 0 0 1 1.06 0", clipRule: "evenodd" }) });
|
|
1209
|
+
var WarningIcon = /* @__PURE__ */ jsx6(SvgIcon2, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("path", { fill: "currentColor", fillRule: "evenodd", d: "M5.312 10.762C8.23 5.587 9.689 3 12 3c2.31 0 3.77 2.587 6.688 7.762l.364.644c2.425 4.3 3.638 6.45 2.542 8.022S17.786 21 12.364 21h-.728c-5.422 0-8.134 0-9.23-1.572s.117-3.722 2.542-8.022zM12 7.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V8a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2", clipRule: "evenodd" }) });
|
|
1210
|
+
var ErrorIcon = /* @__PURE__ */ jsx6(SvgIcon2, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("path", { fill: "currentColor", fillRule: "evenodd", d: "M7.843 3.802C9.872 2.601 10.886 2 12 2c1.114 0 2.128.6 4.157 1.802l.686.406c2.029 1.202 3.043 1.803 3.6 2.792c.557.99.557 2.19.557 4.594v.812c0 2.403 0 3.605-.557 4.594c-.557.99-1.571 1.59-3.6 2.791l-.686.407C14.128 21.399 13.114 22 12 22c-1.114 0-2.128-.6-4.157-1.802l-.686-.407c-2.029-1.2-3.043-1.802-3.6-2.791C3 16.01 3 14.81 3 12.406v-.812C3 9.19 3 7.989 3.557 7c.557-.99 1.571-1.59 3.6-2.792zM13 16a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-1-9.75a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0V7a.75.75 0 0 1 .75-.75", clipRule: "evenodd" }) });
|
|
1211
|
+
var defaultIconMapping = {
|
|
1212
|
+
info: InfoIcon,
|
|
1213
|
+
success: SuccessIcon,
|
|
1214
|
+
warning: WarningIcon,
|
|
1215
|
+
error: ErrorIcon
|
|
1216
|
+
};
|
|
1217
|
+
function Alert({ iconMapping, ...props }) {
|
|
1218
|
+
return /* @__PURE__ */ jsx6(MuiAlert, { iconMapping: { ...defaultIconMapping, ...iconMapping }, ...props });
|
|
1219
|
+
}
|
|
1220
|
+
function AlertTitle(props) {
|
|
1221
|
+
return /* @__PURE__ */ jsx6(MuiAlertTitle, { ...props });
|
|
1222
|
+
}
|
|
1223
|
+
Alert.displayName = "ToolkitAlert";
|
|
1224
|
+
AlertTitle.displayName = "ToolkitAlertTitle";
|
|
1225
|
+
|
|
1226
|
+
// src/components/Accordion/Accordion.tsx
|
|
1227
|
+
import {
|
|
1228
|
+
Accordion as MuiAccordion,
|
|
1229
|
+
AccordionSummary as MuiAccordionSummary,
|
|
1230
|
+
AccordionDetails as MuiAccordionDetails
|
|
1231
|
+
} from "@mui/material";
|
|
1232
|
+
import { styled as styled4 } from "@mui/material/styles";
|
|
1233
|
+
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
1234
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1235
|
+
var StandaloneAccordion = styled4(MuiAccordion)(({ theme }) => ({
|
|
1236
|
+
borderRadius: `${theme.tokens.components.accordion.standaloneRadius} !important`,
|
|
1237
|
+
backgroundColor: theme.tokens.components.accordion.standaloneBackground,
|
|
1238
|
+
boxShadow: "none",
|
|
1239
|
+
marginBottom: theme.spacing(1),
|
|
1240
|
+
"&.Mui-expanded": {
|
|
1241
|
+
backgroundColor: theme.tokens.components.accordion.standaloneBackgroundExpanded,
|
|
1242
|
+
margin: `0 0 ${theme.spacing(1)}`
|
|
1243
|
+
},
|
|
1244
|
+
"& .MuiAccordionSummary-root": {
|
|
1245
|
+
padding: `${theme.tokens.components.accordion.summaryPaddingY} ${theme.tokens.components.accordion.summaryPaddingX}`
|
|
1246
|
+
},
|
|
1247
|
+
"& .MuiAccordionDetails-root": {
|
|
1248
|
+
padding: `0 ${theme.tokens.components.accordion.detailsPaddingX} ${theme.tokens.components.accordion.detailsPaddingBottom}`
|
|
1249
|
+
}
|
|
1250
|
+
}));
|
|
1251
|
+
function Accordion(props) {
|
|
1252
|
+
return /* @__PURE__ */ jsx7(MuiAccordion, { ...props });
|
|
1253
|
+
}
|
|
1254
|
+
function AccordionSummary({ expandIcon, ...props }) {
|
|
1255
|
+
return /* @__PURE__ */ jsx7(MuiAccordionSummary, { expandIcon: expandIcon ?? /* @__PURE__ */ jsx7(ExpandMoreIcon, {}), ...props });
|
|
1256
|
+
}
|
|
1257
|
+
function AccordionDetails(props) {
|
|
1258
|
+
return /* @__PURE__ */ jsx7(MuiAccordionDetails, { ...props });
|
|
1259
|
+
}
|
|
1260
|
+
Accordion.displayName = "ToolkitAccordion";
|
|
1261
|
+
AccordionSummary.displayName = "ToolkitAccordionSummary";
|
|
1262
|
+
AccordionDetails.displayName = "ToolkitAccordionDetails";
|
|
1263
|
+
StandaloneAccordion.displayName = "ToolkitStandaloneAccordion";
|
|
1264
|
+
|
|
1265
|
+
// src/components/Avatar/Avatar.tsx
|
|
1266
|
+
import MuiAvatar from "@mui/material/Avatar";
|
|
1267
|
+
import { styled as styled5 } from "@mui/material/styles";
|
|
1268
|
+
import { default as default2 } from "@mui/material/AvatarGroup";
|
|
1269
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1270
|
+
function getDimension(avatar, size) {
|
|
1271
|
+
const map = {
|
|
1272
|
+
xs: avatar.sizeXs,
|
|
1273
|
+
sm: avatar.sizeSm,
|
|
1274
|
+
md: avatar.sizeMd,
|
|
1275
|
+
lg: avatar.sizeLg,
|
|
1276
|
+
xl: avatar.sizeXl,
|
|
1277
|
+
xxl: avatar.sizeXxl
|
|
1278
|
+
};
|
|
1279
|
+
return map[size];
|
|
1280
|
+
}
|
|
1281
|
+
var StyledAvatar = styled5(MuiAvatar, {
|
|
1282
|
+
shouldForwardProp: (prop) => prop !== "size"
|
|
1283
|
+
})(({ theme, size = "md" }) => {
|
|
1284
|
+
const dimension = getDimension(theme.tokens.components.avatar, size);
|
|
1285
|
+
return {
|
|
1286
|
+
width: dimension,
|
|
1287
|
+
height: dimension
|
|
1288
|
+
};
|
|
1289
|
+
});
|
|
1290
|
+
function Avatar({ size = "md", ...props }) {
|
|
1291
|
+
return /* @__PURE__ */ jsx8(StyledAvatar, { size, ...props });
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
// src/components/ToggleButton/ToggleButton.tsx
|
|
1295
|
+
import {
|
|
1296
|
+
ToggleButton as MuiToggleButton,
|
|
1297
|
+
ToggleButtonGroup as MuiToggleButtonGroup
|
|
1298
|
+
} from "@mui/material";
|
|
1299
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1300
|
+
function ToggleButton(props) {
|
|
1301
|
+
return /* @__PURE__ */ jsx9(MuiToggleButton, { ...props });
|
|
1302
|
+
}
|
|
1303
|
+
ToggleButton.displayName = "ToolkitToggleButton";
|
|
1304
|
+
function ToggleButtonGroup(props) {
|
|
1305
|
+
return /* @__PURE__ */ jsx9(MuiToggleButtonGroup, { ...props });
|
|
1306
|
+
}
|
|
1307
|
+
ToggleButtonGroup.displayName = "ToolkitToggleButtonGroup";
|
|
1308
|
+
|
|
1309
|
+
// src/components/DatePicker/DatePicker.tsx
|
|
1310
|
+
import { useState } from "react";
|
|
1311
|
+
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
|
1312
|
+
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
|
|
1313
|
+
import {
|
|
1314
|
+
DatePicker as MuiDatePicker
|
|
1315
|
+
} from "@mui/x-date-pickers/DatePicker";
|
|
1316
|
+
import {
|
|
1317
|
+
DesktopDatePicker as MuiDesktopDatePicker
|
|
1318
|
+
} from "@mui/x-date-pickers/DesktopDatePicker";
|
|
1319
|
+
import {
|
|
1320
|
+
MobileDatePicker as MuiMobileDatePicker
|
|
1321
|
+
} from "@mui/x-date-pickers/MobileDatePicker";
|
|
1322
|
+
import {
|
|
1323
|
+
DateField as MuiDateField
|
|
1324
|
+
} from "@mui/x-date-pickers/DateField";
|
|
1325
|
+
import {
|
|
1326
|
+
StaticDatePicker as MuiStaticDatePicker
|
|
1327
|
+
} from "@mui/x-date-pickers/StaticDatePicker";
|
|
1328
|
+
import {
|
|
1329
|
+
TimePicker as MuiTimePicker
|
|
1330
|
+
} from "@mui/x-date-pickers/TimePicker";
|
|
1331
|
+
import {
|
|
1332
|
+
DesktopTimePicker as MuiDesktopTimePicker
|
|
1333
|
+
} from "@mui/x-date-pickers/DesktopTimePicker";
|
|
1334
|
+
import {
|
|
1335
|
+
MobileTimePicker as MuiMobileTimePicker
|
|
1336
|
+
} from "@mui/x-date-pickers/MobileTimePicker";
|
|
1337
|
+
import {
|
|
1338
|
+
TimeField as MuiTimeField
|
|
1339
|
+
} from "@mui/x-date-pickers/TimeField";
|
|
1340
|
+
import {
|
|
1341
|
+
StaticTimePicker as MuiStaticTimePicker
|
|
1342
|
+
} from "@mui/x-date-pickers/StaticTimePicker";
|
|
1343
|
+
import {
|
|
1344
|
+
DateTimePicker as MuiDateTimePicker
|
|
1345
|
+
} from "@mui/x-date-pickers/DateTimePicker";
|
|
1346
|
+
import {
|
|
1347
|
+
DesktopDateTimePicker as MuiDesktopDateTimePicker
|
|
1348
|
+
} from "@mui/x-date-pickers/DesktopDateTimePicker";
|
|
1349
|
+
import {
|
|
1350
|
+
MobileDateTimePicker as MuiMobileDateTimePicker
|
|
1351
|
+
} from "@mui/x-date-pickers/MobileDateTimePicker";
|
|
1352
|
+
import {
|
|
1353
|
+
DateTimeField as MuiDateTimeField
|
|
1354
|
+
} from "@mui/x-date-pickers/DateTimeField";
|
|
1355
|
+
import {
|
|
1356
|
+
StaticDateTimePicker as MuiStaticDateTimePicker
|
|
1357
|
+
} from "@mui/x-date-pickers/StaticDateTimePicker";
|
|
1358
|
+
import {
|
|
1359
|
+
DateCalendar as MuiDateCalendar
|
|
1360
|
+
} from "@mui/x-date-pickers/DateCalendar";
|
|
1361
|
+
import Dialog from "@mui/material/Dialog";
|
|
1362
|
+
import DialogContent from "@mui/material/DialogContent";
|
|
1363
|
+
import DialogActions from "@mui/material/DialogActions";
|
|
1364
|
+
import Button2 from "@mui/material/Button";
|
|
1365
|
+
import Box from "@mui/material/Box";
|
|
1366
|
+
import TextField2 from "@mui/material/TextField";
|
|
1367
|
+
import { styled as styled6 } from "@mui/material/styles";
|
|
1368
|
+
import { Fragment, jsx as jsx10, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1369
|
+
function DateLocalizationProvider({ children }) {
|
|
1370
|
+
return /* @__PURE__ */ jsx10(LocalizationProvider, { dateAdapter: AdapterDayjs, children });
|
|
1371
|
+
}
|
|
1372
|
+
DateLocalizationProvider.displayName = "ToolkitDateLocalizationProvider";
|
|
1373
|
+
function DatePicker(props) {
|
|
1374
|
+
return /* @__PURE__ */ jsx10(MuiDatePicker, { ...props });
|
|
1375
|
+
}
|
|
1376
|
+
DatePicker.displayName = "ToolkitDatePicker";
|
|
1377
|
+
function DesktopDatePicker(props) {
|
|
1378
|
+
return /* @__PURE__ */ jsx10(MuiDesktopDatePicker, { ...props });
|
|
1379
|
+
}
|
|
1380
|
+
DesktopDatePicker.displayName = "ToolkitDesktopDatePicker";
|
|
1381
|
+
function MobileDatePicker(props) {
|
|
1382
|
+
return /* @__PURE__ */ jsx10(MuiMobileDatePicker, { ...props });
|
|
1383
|
+
}
|
|
1384
|
+
MobileDatePicker.displayName = "ToolkitMobileDatePicker";
|
|
1385
|
+
function DateField(props) {
|
|
1386
|
+
return /* @__PURE__ */ jsx10(MuiDateField, { ...props });
|
|
1387
|
+
}
|
|
1388
|
+
DateField.displayName = "ToolkitDateField";
|
|
1389
|
+
function StaticDatePicker(props) {
|
|
1390
|
+
return /* @__PURE__ */ jsx10(MuiStaticDatePicker, { ...props });
|
|
1391
|
+
}
|
|
1392
|
+
StaticDatePicker.displayName = "ToolkitStaticDatePicker";
|
|
1393
|
+
function TimePicker(props) {
|
|
1394
|
+
return /* @__PURE__ */ jsx10(MuiTimePicker, { ...props });
|
|
1395
|
+
}
|
|
1396
|
+
TimePicker.displayName = "ToolkitTimePicker";
|
|
1397
|
+
function DesktopTimePicker(props) {
|
|
1398
|
+
return /* @__PURE__ */ jsx10(MuiDesktopTimePicker, { ...props });
|
|
1399
|
+
}
|
|
1400
|
+
DesktopTimePicker.displayName = "ToolkitDesktopTimePicker";
|
|
1401
|
+
function MobileTimePicker(props) {
|
|
1402
|
+
return /* @__PURE__ */ jsx10(MuiMobileTimePicker, { ...props });
|
|
1403
|
+
}
|
|
1404
|
+
MobileTimePicker.displayName = "ToolkitMobileTimePicker";
|
|
1405
|
+
function TimeField(props) {
|
|
1406
|
+
return /* @__PURE__ */ jsx10(MuiTimeField, { ...props });
|
|
1407
|
+
}
|
|
1408
|
+
TimeField.displayName = "ToolkitTimeField";
|
|
1409
|
+
function StaticTimePicker(props) {
|
|
1410
|
+
return /* @__PURE__ */ jsx10(MuiStaticTimePicker, { ...props });
|
|
1411
|
+
}
|
|
1412
|
+
StaticTimePicker.displayName = "ToolkitStaticTimePicker";
|
|
1413
|
+
function DateTimePicker(props) {
|
|
1414
|
+
return /* @__PURE__ */ jsx10(MuiDateTimePicker, { ...props });
|
|
1415
|
+
}
|
|
1416
|
+
DateTimePicker.displayName = "ToolkitDateTimePicker";
|
|
1417
|
+
function DesktopDateTimePicker(props) {
|
|
1418
|
+
return /* @__PURE__ */ jsx10(MuiDesktopDateTimePicker, { ...props });
|
|
1419
|
+
}
|
|
1420
|
+
DesktopDateTimePicker.displayName = "ToolkitDesktopDateTimePicker";
|
|
1421
|
+
function MobileDateTimePicker(props) {
|
|
1422
|
+
return /* @__PURE__ */ jsx10(MuiMobileDateTimePicker, { ...props });
|
|
1423
|
+
}
|
|
1424
|
+
MobileDateTimePicker.displayName = "ToolkitMobileDateTimePicker";
|
|
1425
|
+
function DateTimeField(props) {
|
|
1426
|
+
return /* @__PURE__ */ jsx10(MuiDateTimeField, { ...props });
|
|
1427
|
+
}
|
|
1428
|
+
DateTimeField.displayName = "ToolkitDateTimeField";
|
|
1429
|
+
function StaticDateTimePicker(props) {
|
|
1430
|
+
return /* @__PURE__ */ jsx10(MuiStaticDateTimePicker, { ...props });
|
|
1431
|
+
}
|
|
1432
|
+
StaticDateTimePicker.displayName = "ToolkitStaticDateTimePicker";
|
|
1433
|
+
function DateCalendar(props) {
|
|
1434
|
+
return /* @__PURE__ */ jsx10(MuiDateCalendar, { ...props });
|
|
1435
|
+
}
|
|
1436
|
+
DateCalendar.displayName = "ToolkitDateCalendar";
|
|
1437
|
+
var RangeRow = styled6(Box)(({ theme }) => ({
|
|
1438
|
+
display: "flex",
|
|
1439
|
+
gap: theme.spacing(2),
|
|
1440
|
+
alignItems: "center"
|
|
1441
|
+
}));
|
|
1442
|
+
function DateRangePickerInput({
|
|
1443
|
+
value,
|
|
1444
|
+
onChange,
|
|
1445
|
+
startLabel = "Start date",
|
|
1446
|
+
endLabel = "End date",
|
|
1447
|
+
buttonLabel = "Click me!"
|
|
1448
|
+
}) {
|
|
1449
|
+
const [open, setOpen] = useState(false);
|
|
1450
|
+
const [draft, setDraft] = useState(value);
|
|
1451
|
+
const handleOpen = () => {
|
|
1452
|
+
setDraft(value);
|
|
1453
|
+
setOpen(true);
|
|
1454
|
+
};
|
|
1455
|
+
const handleCancel = () => setOpen(false);
|
|
1456
|
+
const handleOk = () => {
|
|
1457
|
+
onChange(draft);
|
|
1458
|
+
setOpen(false);
|
|
1459
|
+
};
|
|
1460
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1461
|
+
/* @__PURE__ */ jsx10(Button2, { variant: "contained", color: "inherit", disableElevation: true, onClick: handleOpen, children: buttonLabel }),
|
|
1462
|
+
/* @__PURE__ */ jsxs2(Dialog, { open, onClose: handleCancel, maxWidth: "sm", fullWidth: true, children: [
|
|
1463
|
+
/* @__PURE__ */ jsx10(DialogContent, { children: /* @__PURE__ */ jsxs2(RangeRow, { children: [
|
|
1464
|
+
/* @__PURE__ */ jsx10(
|
|
1465
|
+
MuiDatePicker,
|
|
1466
|
+
{
|
|
1467
|
+
label: startLabel,
|
|
1468
|
+
value: draft.start,
|
|
1469
|
+
onChange: (v) => setDraft((prev) => ({ ...prev, start: v })),
|
|
1470
|
+
slotProps: { textField: { fullWidth: true } }
|
|
1471
|
+
}
|
|
1472
|
+
),
|
|
1473
|
+
/* @__PURE__ */ jsx10(
|
|
1474
|
+
MuiDatePicker,
|
|
1475
|
+
{
|
|
1476
|
+
label: endLabel,
|
|
1477
|
+
value: draft.end,
|
|
1478
|
+
onChange: (v) => setDraft((prev) => ({ ...prev, end: v })),
|
|
1479
|
+
slotProps: { textField: { fullWidth: true } }
|
|
1480
|
+
}
|
|
1481
|
+
)
|
|
1482
|
+
] }) }),
|
|
1483
|
+
/* @__PURE__ */ jsxs2(DialogActions, { children: [
|
|
1484
|
+
/* @__PURE__ */ jsx10(Button2, { onClick: handleCancel, color: "inherit", children: "Cancel" }),
|
|
1485
|
+
/* @__PURE__ */ jsx10(Button2, { onClick: handleOk, color: "inherit", children: "OK" })
|
|
1486
|
+
] })
|
|
1487
|
+
] })
|
|
1488
|
+
] });
|
|
1489
|
+
}
|
|
1490
|
+
DateRangePickerInput.displayName = "ToolkitDateRangePickerInput";
|
|
1491
|
+
function DateRangePickerCalendar({
|
|
1492
|
+
value,
|
|
1493
|
+
onChange,
|
|
1494
|
+
buttonLabel = "Click me!"
|
|
1495
|
+
}) {
|
|
1496
|
+
const [open, setOpen] = useState(false);
|
|
1497
|
+
const [draft, setDraft] = useState(value);
|
|
1498
|
+
const [selecting, setSelecting] = useState("start");
|
|
1499
|
+
const handleOpen = () => {
|
|
1500
|
+
setDraft(value);
|
|
1501
|
+
setSelecting("start");
|
|
1502
|
+
setOpen(true);
|
|
1503
|
+
};
|
|
1504
|
+
const handleCancel = () => setOpen(false);
|
|
1505
|
+
const handleOk = () => {
|
|
1506
|
+
onChange(draft);
|
|
1507
|
+
setOpen(false);
|
|
1508
|
+
};
|
|
1509
|
+
const handleDaySelect = (date) => {
|
|
1510
|
+
if (selecting === "start") {
|
|
1511
|
+
setDraft({ start: date, end: null });
|
|
1512
|
+
setSelecting("end");
|
|
1513
|
+
} else {
|
|
1514
|
+
setDraft((prev) => ({ ...prev, end: date }));
|
|
1515
|
+
}
|
|
1516
|
+
};
|
|
1517
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1518
|
+
/* @__PURE__ */ jsx10(Button2, { variant: "contained", color: "inherit", disableElevation: true, onClick: handleOpen, children: buttonLabel }),
|
|
1519
|
+
/* @__PURE__ */ jsxs2(Dialog, { open, onClose: handleCancel, children: [
|
|
1520
|
+
/* @__PURE__ */ jsxs2(DialogContent, { sx: { p: 1 }, children: [
|
|
1521
|
+
/* @__PURE__ */ jsx10(Box, { sx: { mb: 1, px: 1 }, children: /* @__PURE__ */ jsx10(
|
|
1522
|
+
TextField2,
|
|
1523
|
+
{
|
|
1524
|
+
size: "small",
|
|
1525
|
+
label: "Selecting",
|
|
1526
|
+
value: selecting === "start" ? "Start date" : "End date",
|
|
1527
|
+
inputProps: { readOnly: true },
|
|
1528
|
+
fullWidth: true
|
|
1529
|
+
}
|
|
1530
|
+
) }),
|
|
1531
|
+
/* @__PURE__ */ jsx10(
|
|
1532
|
+
MuiDateCalendar,
|
|
1533
|
+
{
|
|
1534
|
+
value: selecting === "start" ? draft.start : draft.end,
|
|
1535
|
+
onChange: handleDaySelect
|
|
1536
|
+
}
|
|
1537
|
+
)
|
|
1538
|
+
] }),
|
|
1539
|
+
/* @__PURE__ */ jsxs2(DialogActions, { children: [
|
|
1540
|
+
/* @__PURE__ */ jsx10(Button2, { onClick: handleCancel, color: "inherit", children: "Cancel" }),
|
|
1541
|
+
/* @__PURE__ */ jsx10(Button2, { onClick: handleOk, color: "inherit", children: "OK" })
|
|
1542
|
+
] })
|
|
1543
|
+
] })
|
|
1544
|
+
] });
|
|
1545
|
+
}
|
|
1546
|
+
DateRangePickerCalendar.displayName = "ToolkitDateRangePickerCalendar";
|
|
1547
|
+
|
|
1548
|
+
// src/foundation/Grid/Grid.tsx
|
|
1549
|
+
import { Grid2 as MuiGrid2 } from "@mui/material";
|
|
1550
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1551
|
+
function Grid({ container, spacing, ...props }) {
|
|
1552
|
+
return /* @__PURE__ */ jsx11(
|
|
1553
|
+
MuiGrid2,
|
|
1554
|
+
{
|
|
1555
|
+
container,
|
|
1556
|
+
spacing: container && spacing === void 0 ? 2 : spacing,
|
|
1557
|
+
...props
|
|
1558
|
+
}
|
|
1559
|
+
);
|
|
1560
|
+
}
|
|
1561
|
+
Grid.displayName = "ToolkitGrid";
|
|
1562
|
+
|
|
1563
|
+
// src/foundation/H1/H1.tsx
|
|
1564
|
+
import { Typography } from "@mui/material";
|
|
1565
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1566
|
+
function H1({ color = "text.primary", children, ...props }) {
|
|
1567
|
+
return /* @__PURE__ */ jsx12(Typography, { variant: "h1", color, ...props, children });
|
|
1568
|
+
}
|
|
1569
|
+
H1.displayName = "ToolkitH1";
|
|
1570
|
+
|
|
1571
|
+
// src/foundation/H2/H2.tsx
|
|
1572
|
+
import { Typography as Typography2 } from "@mui/material";
|
|
1573
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1574
|
+
function H2({ color = "text.primary", children, ...props }) {
|
|
1575
|
+
return /* @__PURE__ */ jsx13(Typography2, { variant: "h2", color, ...props, children });
|
|
1576
|
+
}
|
|
1577
|
+
H2.displayName = "ToolkitH2";
|
|
1578
|
+
|
|
1579
|
+
// src/foundation/H3/H3.tsx
|
|
1580
|
+
import { Typography as Typography3 } from "@mui/material";
|
|
1581
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1582
|
+
function H3({ color = "text.primary", children, ...props }) {
|
|
1583
|
+
return /* @__PURE__ */ jsx14(Typography3, { variant: "h3", color, ...props, children });
|
|
1584
|
+
}
|
|
1585
|
+
H3.displayName = "ToolkitH3";
|
|
1586
|
+
|
|
1587
|
+
// src/foundation/H4/H4.tsx
|
|
1588
|
+
import { Typography as Typography4 } from "@mui/material";
|
|
1589
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1590
|
+
function H4({ color = "text.primary", children, ...props }) {
|
|
1591
|
+
return /* @__PURE__ */ jsx15(Typography4, { variant: "h4", color, ...props, children });
|
|
1592
|
+
}
|
|
1593
|
+
H4.displayName = "ToolkitH4";
|
|
1594
|
+
|
|
1595
|
+
// src/foundation/H5/H5.tsx
|
|
1596
|
+
import { Typography as Typography5 } from "@mui/material";
|
|
1597
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1598
|
+
function H5({ color = "text.primary", children, ...props }) {
|
|
1599
|
+
return /* @__PURE__ */ jsx16(Typography5, { variant: "h5", color, ...props, children });
|
|
1600
|
+
}
|
|
1601
|
+
H5.displayName = "ToolkitH5";
|
|
1602
|
+
|
|
1603
|
+
// src/foundation/H6/H6.tsx
|
|
1604
|
+
import { Typography as Typography6 } from "@mui/material";
|
|
1605
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1606
|
+
function H6({ color = "text.primary", children, ...props }) {
|
|
1607
|
+
return /* @__PURE__ */ jsx17(Typography6, { variant: "h6", color, ...props, children });
|
|
1608
|
+
}
|
|
1609
|
+
H6.displayName = "ToolkitH6";
|
|
1610
|
+
|
|
1611
|
+
// src/foundation/Subtitle1/Subtitle1.tsx
|
|
1612
|
+
import { Typography as Typography7 } from "@mui/material";
|
|
1613
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1614
|
+
function Subtitle1({ color = "text.primary", children, ...props }) {
|
|
1615
|
+
return /* @__PURE__ */ jsx18(Typography7, { variant: "subtitle1", color, ...props, children });
|
|
1616
|
+
}
|
|
1617
|
+
Subtitle1.displayName = "ToolkitSubtitle1";
|
|
1618
|
+
|
|
1619
|
+
// src/foundation/Subtitle2/Subtitle2.tsx
|
|
1620
|
+
import { Typography as Typography8 } from "@mui/material";
|
|
1621
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1622
|
+
function Subtitle2({ color = "text.primary", children, ...props }) {
|
|
1623
|
+
return /* @__PURE__ */ jsx19(Typography8, { variant: "subtitle2", color, ...props, children });
|
|
1624
|
+
}
|
|
1625
|
+
Subtitle2.displayName = "ToolkitSubtitle2";
|
|
1626
|
+
|
|
1627
|
+
// src/foundation/Body1/Body1.tsx
|
|
1628
|
+
import { Typography as Typography9 } from "@mui/material";
|
|
1629
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1630
|
+
function Body1({ color = "text.primary", children, ...props }) {
|
|
1631
|
+
return /* @__PURE__ */ jsx20(Typography9, { variant: "body1", color, ...props, children });
|
|
1632
|
+
}
|
|
1633
|
+
Body1.displayName = "ToolkitBody1";
|
|
1634
|
+
|
|
1635
|
+
// src/foundation/Body2/Body2.tsx
|
|
1636
|
+
import { Typography as Typography10 } from "@mui/material";
|
|
1637
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1638
|
+
function Body2({ color = "text.primary", children, ...props }) {
|
|
1639
|
+
return /* @__PURE__ */ jsx21(Typography10, { variant: "body2", color, ...props, children });
|
|
1640
|
+
}
|
|
1641
|
+
Body2.displayName = "ToolkitBody2";
|
|
1642
|
+
|
|
1643
|
+
// src/foundation/Caption/Caption.tsx
|
|
1644
|
+
import { Typography as Typography11 } from "@mui/material";
|
|
1645
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1646
|
+
function Caption({ color = "text.primary", children, ...props }) {
|
|
1647
|
+
return /* @__PURE__ */ jsx22(Typography11, { variant: "caption", color, ...props, children });
|
|
1648
|
+
}
|
|
1649
|
+
Caption.displayName = "ToolkitCaption";
|
|
1650
|
+
|
|
1651
|
+
// src/foundation/Overline/Overline.tsx
|
|
1652
|
+
import { Typography as Typography12 } from "@mui/material";
|
|
1653
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1654
|
+
function Overline({ color = "text.primary", children, ...props }) {
|
|
1655
|
+
return /* @__PURE__ */ jsx23(Typography12, { variant: "overline", color, ...props, children });
|
|
1656
|
+
}
|
|
1657
|
+
Overline.displayName = "ToolkitOverline";
|
|
1658
|
+
|
|
1659
|
+
// src/foundation/TypographyButton/TypographyButton.tsx
|
|
1660
|
+
import { Typography as Typography13 } from "@mui/material";
|
|
1661
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1662
|
+
function TypographyButton({ color = "text.primary", children, ...props }) {
|
|
1663
|
+
return /* @__PURE__ */ jsx24(Typography13, { variant: "button", color, ...props, children });
|
|
1664
|
+
}
|
|
1665
|
+
TypographyButton.displayName = "ToolkitTypographyButton";
|
|
1666
|
+
export {
|
|
1667
|
+
Accordion,
|
|
1668
|
+
AccordionDetails,
|
|
1669
|
+
AccordionSummary,
|
|
1670
|
+
Alert,
|
|
1671
|
+
AlertTitle,
|
|
1672
|
+
Avatar,
|
|
1673
|
+
default2 as AvatarGroup,
|
|
1674
|
+
Body1,
|
|
1675
|
+
Body2,
|
|
1676
|
+
Button,
|
|
1677
|
+
Caption,
|
|
1678
|
+
Card,
|
|
1679
|
+
CardActions,
|
|
1680
|
+
CardContent,
|
|
1681
|
+
CardHeader,
|
|
1682
|
+
Chip,
|
|
1683
|
+
DateCalendar,
|
|
1684
|
+
DateField,
|
|
1685
|
+
DateLocalizationProvider,
|
|
1686
|
+
DatePicker,
|
|
1687
|
+
DateRangePickerCalendar,
|
|
1688
|
+
DateRangePickerInput,
|
|
1689
|
+
DateTimeField,
|
|
1690
|
+
DateTimePicker,
|
|
1691
|
+
DesktopDatePicker,
|
|
1692
|
+
DesktopDateTimePicker,
|
|
1693
|
+
DesktopTimePicker,
|
|
1694
|
+
Grid,
|
|
1695
|
+
H1,
|
|
1696
|
+
H2,
|
|
1697
|
+
H3,
|
|
1698
|
+
H4,
|
|
1699
|
+
H5,
|
|
1700
|
+
H6,
|
|
1701
|
+
MobileDatePicker,
|
|
1702
|
+
MobileDateTimePicker,
|
|
1703
|
+
MobileTimePicker,
|
|
1704
|
+
Overline,
|
|
1705
|
+
StandaloneAccordion,
|
|
1706
|
+
StaticDatePicker,
|
|
1707
|
+
StaticDateTimePicker,
|
|
1708
|
+
StaticTimePicker,
|
|
1709
|
+
Subtitle1,
|
|
1710
|
+
Subtitle2,
|
|
1711
|
+
TextField,
|
|
1712
|
+
TimeField,
|
|
1713
|
+
TimePicker,
|
|
1714
|
+
ToggleButton,
|
|
1715
|
+
ToggleButtonGroup,
|
|
1716
|
+
ToolkitThemeProvider,
|
|
1717
|
+
TypographyButton,
|
|
1718
|
+
createMuiTheme,
|
|
1719
|
+
getThemeTokens,
|
|
1720
|
+
resolveThemeName,
|
|
1721
|
+
themeRegistry
|
|
1722
|
+
};
|
|
1723
|
+
//# sourceMappingURL=index.mjs.map
|