@blocklet/pages-kit-inner-components 0.4.157 → 0.4.159

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/lib/es/theme.js CHANGED
@@ -1,769 +1,482 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import l from "@arcblock/ux/lib/Colors";
3
- import { createTheme as v, createDefaultThemeOptions as x } from "@arcblock/ux/lib/Theme";
4
- import { getBlockletTheme as E } from "@blocklet/pages-kit/utils/style";
5
- import { Icon as k } from "@iconify-icon/react";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { ConfigProvider as m } from "@arcblock/ux/lib/Config";
3
+ import { Icon as b } from "@iconify-icon/react";
6
4
  import y from "@iconify-icons/tabler/chevron-down";
7
- import { loadingButtonClasses as B } from "@mui/lab";
8
- import { sliderClasses as n, outlinedInputClasses as u, inputBaseClasses as e, filledInputClasses as b, listItemIconClasses as D, inputLabelClasses as r, inputClasses as d, selectClasses as $, autocompleteClasses as g, switchClasses as C, svgIconClasses as i, Box as z, createTheme as A, getContrastRatio as S, darken as M, lighten as T } from "@mui/material";
9
- import { defu as c } from "defu";
10
- function h(t) {
11
- const a = l.common.white, w = S(t, a) >= 2 ? a : "rgba(0, 0, 0, 0.87)";
12
- return {
13
- main: t,
14
- light: T(t, 0.2),
15
- dark: M(t, 0.3),
16
- contrastText: w
17
- };
18
- }
19
- function F(t = {}, s = v) {
20
- const a = E();
21
- return s(
22
- c(t, {
23
- palette: {
24
- // @ts-ignore
25
- _did: h(l.did.primary),
26
- black: h(l.grey[900])
27
- },
28
- // respect blocklet theme breakpoints
29
- breakpoints: a.breakpoints
30
- })
31
- );
5
+ import { listItemIconClasses as c, switchClasses as $, svgIconClasses as s, sliderClasses as o, outlinedInputClasses as p, inputBaseClasses as t, filledInputClasses as d, inputLabelClasses as i, inputClasses as l, selectClasses as h, autocompleteClasses as a, Box as g } from "@mui/material";
6
+ import { translations as x } from "./locales.js";
7
+ const f = {
8
+ fontSize: "5rem",
9
+ "@media (max-width: 1536px)": {
10
+ fontSize: "5rem"
11
+ },
12
+ "@media (max-width: 1200px)": {
13
+ fontSize: "4rem"
14
+ },
15
+ "@media (max-width: 900px)": {
16
+ fontSize: "3rem"
17
+ },
18
+ "@media (max-width: 600px)": {
19
+ fontSize: "2rem"
20
+ }
21
+ };
22
+ function u(e) {
23
+ return /* @__PURE__ */ n(g, { ...e, component: b, icon: y });
32
24
  }
33
- const I = `
34
- :root {
35
- /* Light */
36
- /* colors */
37
- --backgrounds-bg-base: #FFFFFF;
38
- --backgrounds-bg-base-hover: #F9FAFB;
39
- --backgrounds-bg-base-pressed: #F3F4F6;
40
- --backgrounds-bg-component: #F1F3F5;
41
- --backgrounds-bg-disabled: #F3F4F6;
42
- --backgrounds-bg-field: #F9FAFB;
43
- --backgrounds-bg-field-hover: #F3F4F6;
44
- --backgrounds-bg-glass: #ffffffb8;
45
- --backgrounds-bg-highlight: #EFF6FF;
46
- --backgrounds-bg-highlight-hover: #DBEAFE;
47
- --backgrounds-bg-interactive: #3B82F6;
48
- --backgrounds-bg-interactive-hover: #2563EB;
49
- --backgrounds-bg-overlay: #03071266;
50
- --backgrounds-bg-subtle: #F9FAFB;
51
- --backgrounds-bg-subtle-hover: #F3F4F6;
52
- --backgrounds-bg-subtle-pressed: #E5E7EB;
53
- --backgrounds-bg-switch-off: #E5E7EB;
54
- --backgrounds-bg-switch-off-hover: #D1D5DB;
55
- --buttons-button-danger: #E11D48;
56
- --buttons-button-danger-hover: #BE123C;
57
- --buttons-button-danger-pressed: #9F1239;
58
- --buttons-button-inverted: #030712;
59
- --buttons-button-inverted-hover: #111827;
60
- --buttons-button-inverted-pressed: #1F2937;
61
- --buttons-button-neutral: #FFFFFF;
62
- --buttons-button-neutral-hover: #F3F4F6;
63
- --buttons-button-neutral-pressed: #E5E7EB;
64
- --buttons-button-transparent: #ffffff00;
65
- --buttons-button-transparent-hover: #F3F4F6;
66
- --buttons-button-transparent-pressed: #E5E7EB;
67
- --foregrounds-fg-base: #030712;
68
- --foregrounds-fg-danger: #E11D48;
69
- --foregrounds-fg-disabled: #D1D5DB;
70
- --foregrounds-fg-interactive: #3B82F6;
71
- --foregrounds-fg-interactive-hover: #2563EB;
72
- --foregrounds-fg-muted: #9CA3AF;
73
- --foregrounds-fg-on-color: #FFFFFF;
74
- --foregrounds-fg-on-inverted: #FFFFFF;
75
- --foregrounds-fg-subtle: #4B5563;
76
- --others-spacer: #ffffff00;
77
- --shadows-card-hover-1: #03071214;
78
- --shadows-card-hover-2: #03071214;
79
- --shadows-card-hover-3: #0307121a;
80
- --shadows-card-rest-1: #03071214;
81
- --shadows-card-rest-2: #03071214;
82
- --shadows-card-rest-3: #0307120a;
83
- --shadows-danger-1: #E11D48;
84
- --shadows-error-2: #e11d4826;
85
- --shadows-flyout-1: #03071214;
86
- --shadows-flyout-2: #03071214;
87
- --shadows-interactive-with-active-1: #3B82F6;
88
- --shadows-interactive-with-active-2: #3b82f633;
89
- --shadows-interactive-with-shadow-1: #1e3a8a80;
90
- --shadows-interactive-with-shadow-2: #3B82F6;
91
- --shadows-modal-1: #FFFFFF;
92
- --shadows-modal-2: #e5e7eb66;
93
- --shadows-modal-3: #03071214;
94
- --shadows-modal-4: #03071214;
95
- --shadows-modal-5: #03071214;
96
- --shadows-switch-background-1: #0307120a;
97
- --shadows-switch-background-2: #0307120a;
98
- --shadows-switch-background-3: #0307120f;
99
- --shadows-switch-background-4: #03071205;
100
- --shadows-switch-background-5: #0307120a;
101
- --shadows-switch-handle-1: #FFFFFF;
102
- --shadows-switch-handle-2: #FFFFFF;
103
- --shadows-switch-handle-3: #03071205;
104
- --shadows-switch-handle-4: #03071205;
105
- --shadows-switch-handle-5: #0307120a;
106
- --shadows-switch-handle-6: #0307121f;
107
- --shadows-switch-handle-7: #03071214;
108
- --shadows-tooltip-1: #03071214;
109
- --shadows-tooltip-2: #03071214;
110
- --stroke-border-base: #E5E7EB;
111
- --stroke-border-error: #E11D48;
112
- --stroke-border-interactive: #3B82F6;
113
- --stroke-border-loud: #030712;
114
- --stroke-border-strong: #D1D5DB;
115
- --stroke-sep: #E5E7EB;
116
- --tags-tag-blue-bg: #DBEAFE;
117
- --tags-tag-blue-bg-hover: #BFDBFE;
118
- --tags-tag-blue-border: #BFDBFE;
119
- --tags-tag-blue-icon: #2563EB;
120
- --tags-tag-blue-text: #1D4ED8;
121
- --tags-tag-green-bg: #D1FAE5;
122
- --tags-tag-green-bg-hover: #A7F3D0;
123
- --tags-tag-green-border: #A7F3D0;
124
- --tags-tag-green-icon: #059669;
125
- --tags-tag-green-text: #047857;
126
- --tags-tag-neutral-bg: #F3F4F6;
127
- --tags-tag-neutral-bg-hover: #E5E7EB;
128
- --tags-tag-neutral-border: #E5E7EB;
129
- --tags-tag-neutral-icon: #6B7280;
130
- --tags-tag-neutral-text: #4B5563;
131
- --tags-tag-orange-bg: #FEF4C7;
132
- --tags-tag-orange-bg-hover: #FDE68A;
133
- --tags-tag-orange-border: #FDE68A;
134
- --tags-tag-orange-icon: #D97706;
135
- --tags-tag-orange-text: #B45309;
136
- --tags-tag-purple-bg: #EDE9FE;
137
- --tags-tag-purple-bg-hover: #DDD6FE;
138
- --tags-tag-purple-border: #DDD6FE;
139
- --tags-tag-purple-icon: #7C3AED;
140
- --tags-tag-purple-text: #6D28D9;
141
- --tags-tag-red-bg: #FFE4E6;
142
- --tags-tag-red-bg-hover: #FECDD3;
143
- --tags-tag-red-border: #FECDD3;
144
- --tags-tag-red-icon: #E11D48;
145
- --tags-tag-red-text: #BE123C;
146
- /* numbers */
147
- --others-max-width-root: 1200px;
148
- --radius-s: 4px;
149
- --radius-m: 8px;
150
- --radius-l: 12px;
151
- --radius-round: 9999px;
152
- }`, J = `
153
- :root {
154
- /* Dark */
155
- /* colors */
156
- --backgrounds-bg-base: #1B1B1F;
157
- --backgrounds-bg-base-hover: #27282D;
158
- --backgrounds-bg-base-pressed: #2E3035;
159
- --backgrounds-bg-component: #27282D;
160
- --backgrounds-bg-disabled: #27282D;
161
- --backgrounds-bg-field: #27282D;
162
- --backgrounds-bg-field-hover: #2E3035;
163
- --backgrounds-bg-glass: #1b1b1fb8;
164
- --backgrounds-bg-highlight: #172554;
165
- --backgrounds-bg-highlight-hover: #1E3A8A;
166
- --backgrounds-bg-interactive: #60A5FA;
167
- --backgrounds-bg-interactive-hover: #60A5FA;
168
- --backgrounds-bg-overlay: #18181ab2;
169
- --backgrounds-bg-subtle: #18181A;
170
- --backgrounds-bg-subtle-hover: #1B1B1F;
171
- --backgrounds-bg-subtle-pressed: #27282D;
172
- --backgrounds-bg-switch-off: #35373C;
173
- --backgrounds-bg-switch-off-hover: #464B50;
174
- --buttons-button-danger: #9F1239;
175
- --buttons-button-danger-hover: #BE123C;
176
- --buttons-button-danger-pressed: #E11D48;
177
- --buttons-button-inverted: #EDEEF0;
178
- --buttons-button-inverted-hover: #FFFFFF;
179
- --buttons-button-inverted-pressed: #EDEEF0;
180
- --buttons-button-neutral: #27282D;
181
- --buttons-button-neutral-hover: #35373C;
182
- --buttons-button-neutral-pressed: #3C3F44;
183
- --buttons-button-transparent: #ffffff00;
184
- --buttons-button-transparent-hover: #27282D;
185
- --buttons-button-transparent-pressed: #2E3035;
186
- --foregrounds-fg-base: #EDEEF0;
187
- --foregrounds-fg-danger: #FB7185;
188
- --foregrounds-fg-disabled: #3C3F44;
189
- --foregrounds-fg-interactive: #60A5FA;
190
- --foregrounds-fg-interactive-hover: #3B82F6;
191
- --foregrounds-fg-muted: #696E77;
192
- --foregrounds-fg-on-color: #FFFFFF;
193
- --foregrounds-fg-on-inverted: #0A0A0A;
194
- --foregrounds-fg-subtle: #ADB1B8;
195
- --others-spacer: #FFFFFF;
196
- --shadows-card-hover-1: #ffffff1a;
197
- --shadows-card-hover-2: #ffffff29;
198
- --shadows-card-hover-3: #00000066;
199
- --shadows-card-rest-1: #ffffff1a;
200
- --shadows-card-rest-2: #ffffff29;
201
- --shadows-card-rest-3: #00000066;
202
- --shadows-danger-1: #f43f5e1a;
203
- --shadows-error-2: #e11d4840;
204
- --shadows-flyout-1: #ffffff1a;
205
- --shadows-flyout-2: #00000052;
206
- --shadows-interactive-with-active-1: #60A5FA;
207
- --shadows-interactive-with-active-2: #3b82f640;
208
- --shadows-interactive-with-shadow-1: #dbeafe80;
209
- --shadows-interactive-with-shadow-2: #60A5FA;
210
- --shadows-modal-1: #171717;
211
- --shadows-modal-2: #2e303566;
212
- --shadows-modal-3: #ffffff1a;
213
- --shadows-modal-4: #00000052;
214
- --shadows-modal-5: #00000052;
215
- --shadows-switch-background-1: #0000001a;
216
- --shadows-switch-background-2: #0000001a;
217
- --shadows-switch-background-3: #ffffff29;
218
- --shadows-switch-background-4: #0000001a;
219
- --shadows-switch-background-5: #00000033;
220
- --shadows-switch-handle-1: #FFFFFF;
221
- --shadows-switch-handle-2: #FFFFFF;
222
- --shadows-switch-handle-3: #00000029;
223
- --shadows-switch-handle-4: #0000001a;
224
- --shadows-switch-handle-5: #0000001a;
225
- --shadows-switch-handle-6: #0000001a;
226
- --shadows-switch-handle-7: #0000001a;
227
- --shadows-tooltip-1: #ffffff1a;
228
- --shadows-tooltip-2: #00000052;
229
- --stroke-border-base: #2E3035;
230
- --stroke-border-error: #F43F5E;
231
- --stroke-border-interactive: #60A5FA;
232
- --stroke-border-loud: #EDEEF0;
233
- --stroke-border-strong: #35373C;
234
- --stroke-sep: #2E3035;
235
- --tags-tag-blue-bg: #172554;
236
- --tags-tag-blue-bg-hover: #1E2A8A;
237
- --tags-tag-blue-border: #1E3A8A;
238
- --tags-tag-blue-icon: #1D4ED8;
239
- --tags-tag-blue-text: #3B82F6;
240
- --tags-tag-green-bg: #022C22;
241
- --tags-tag-green-bg-hover: #064E3B;
242
- --tags-tag-green-border: #064E3B;
243
- --tags-tag-green-icon: #047857;
244
- --tags-tag-green-text: #10B981;
245
- --tags-tag-neutral-bg: #2E3035;
246
- --tags-tag-neutral-bg-hover: #35373C;
247
- --tags-tag-neutral-border: #3C3F44;
248
- --tags-tag-neutral-icon: #7D828A;
249
- --tags-tag-neutral-text: #ADB1B8;
250
- --tags-tag-orange-bg: #451A03;
251
- --tags-tag-orange-bg-hover: #78350F;
252
- --tags-tag-orange-border: #78350F;
253
- --tags-tag-orange-icon: #B45309;
254
- --tags-tag-orange-text: #F59E0B;
255
- --tags-tag-purple-bg: #2E1064;
256
- --tags-tag-purple-bg-hover: #4C1D95;
257
- --tags-tag-purple-border: #3C3F44;
258
- --tags-tag-purple-icon: #6D28D9;
259
- --tags-tag-purple-text: #8B5CF6;
260
- --tags-tag-red-bg: #4C0519;
261
- --tags-tag-red-bg-hover: #881337;
262
- --tags-tag-red-border: #881337;
263
- --tags-tag-red-icon: #F43F5E;
264
- --tags-tag-red-text: #FF6369;
265
- /* numbers */
266
- --others-max-width-root: 1200px;
267
- --radius-s: 4px;
268
- --radius-m: 8px;
269
- --radius-l: 12px;
270
- --radius-round: 9999px;
271
- }`, o = F(
272
- c(x(), {
273
- typography: {
274
- button: {
275
- // @ts-ignore
276
- textTransform: "none",
277
- WebkitTextTransform: "none"
278
- },
279
- subtitle1: {
280
- fontWeight: 600,
281
- fontSize: "18px",
282
- color: "#000",
283
- lineHeight: 1.5
284
- },
285
- subtitle2: {
286
- fontSize: "14px",
287
- lineHeight: "24px",
288
- fontWeight: 500,
289
- color: "#030712",
290
- marginBottom: "4px"
291
- }
25
+ const S = {
26
+ typography: {
27
+ big: { ...f },
28
+ button: {
29
+ // @ts-ignore
30
+ textTransform: "none",
31
+ WebkitTextTransform: "none"
292
32
  },
293
- palette: {
294
- background: {
295
- paper: "#ffffff",
296
- default: "#F9FAFB"
297
- },
298
- action: {
299
- selected: "rgba(25, 118, 210, 0.08)"
33
+ subtitle1: {
34
+ fontWeight: 600,
35
+ fontSize: "18px",
36
+ lineHeight: 1.5
37
+ },
38
+ subtitle2: {
39
+ fontSize: "14px",
40
+ lineHeight: "24px",
41
+ fontWeight: 500,
42
+ marginBottom: "4px"
43
+ }
44
+ },
45
+ palette: {
46
+ background: {},
47
+ action: {
48
+ // selected: 'rgba(25, 118, 210, 0.08)',
49
+ }
50
+ },
51
+ shape: {
52
+ borderRadius: 8
53
+ },
54
+ components: {
55
+ MuiCssBaseline: {},
56
+ MuiFormLabel: {
57
+ styleOverrides: {
58
+ root: {
59
+ fontSize: "0.875rem"
60
+ }
300
61
  }
301
62
  },
302
- shape: {
303
- borderRadius: 8
63
+ MuiFormControlLabel: {
64
+ styleOverrides: {
65
+ root: {
66
+ marginLeft: 0
67
+ },
68
+ label: {
69
+ fontSize: "0.875rem"
70
+ }
71
+ }
304
72
  },
305
- components: {
306
- MuiCssBaseline: {
307
- styleOverrides: I
308
- },
309
- MuiFormLabel: {
310
- styleOverrides: {
311
- root: {
312
- fontSize: "0.875rem"
313
- }
73
+ MuiInputLabel: {
74
+ styleOverrides: {
75
+ root: {
76
+ fontSize: "0.875rem"
314
77
  }
315
- },
316
- MuiFormControlLabel: {
317
- styleOverrides: {
318
- root: {
319
- marginLeft: 0
78
+ }
79
+ },
80
+ MuiRadio: {
81
+ styleOverrides: {
82
+ root: {
83
+ padding: 4,
84
+ [`.${s.fontSizeMedium}`]: {
85
+ fontSize: "1.25rem"
320
86
  },
321
- label: {
322
- fontSize: "0.875rem"
323
- }
324
- }
325
- },
326
- MuiInputLabel: {
327
- styleOverrides: {
328
- root: {
329
- fontSize: "0.875rem"
87
+ [`.${s.fontSizeSmall}`]: {
88
+ fontSize: "1.125rem"
330
89
  }
331
90
  }
332
- },
333
- MuiRadio: {
334
- styleOverrides: {
335
- root: {
336
- padding: 4,
337
- [`.${i.fontSizeMedium}`]: {
338
- fontSize: "1.25rem"
339
- },
340
- [`.${i.fontSizeSmall}`]: {
341
- fontSize: "1.125rem"
342
- }
343
- }
344
- }
345
- },
346
- MuiCheckbox: {
347
- styleOverrides: {
348
- root: {
349
- padding: 4,
350
- [`.${i.fontSizeMedium}`]: {
351
- fontSize: "1.25rem"
352
- },
353
- [`.${i.fontSizeSmall}`]: {
354
- fontSize: "1.125rem"
355
- }
91
+ }
92
+ },
93
+ MuiCheckbox: {
94
+ styleOverrides: {
95
+ root: {
96
+ padding: 4,
97
+ [`.${s.fontSizeMedium}`]: {
98
+ fontSize: "1.25rem"
99
+ },
100
+ [`.${s.fontSizeSmall}`]: {
101
+ fontSize: "1.125rem"
356
102
  }
357
103
  }
358
- },
359
- MuiSwitch: {
360
- styleOverrides: {
361
- root: {
362
- height: 28,
363
- width: 48,
364
- padding: 8,
365
- [`&.${C.sizeSmall}`]: {
366
- height: 26,
367
- width: 40,
368
- padding: 8
369
- }
370
- },
371
- switchBase: {
372
- padding: 4
104
+ }
105
+ },
106
+ MuiSwitch: {
107
+ styleOverrides: {
108
+ root: {
109
+ height: 28,
110
+ width: 48,
111
+ padding: 8,
112
+ [`&.${$.sizeSmall}`]: {
113
+ height: 26,
114
+ width: 40,
115
+ padding: 8
373
116
  }
117
+ },
118
+ switchBase: {
119
+ padding: 4
374
120
  }
375
- },
376
- MuiAutocomplete: {
377
- defaultProps: { popupIcon: /* @__PURE__ */ f(p, { fontSize: 14 }) },
378
- variants: [
379
- {
380
- props: {},
381
- style: ({ theme: t }) => t.unstable_sx({
382
- [`.${g.inputRoot}`]: {
383
- pt: 1.5,
384
- pb: 0.25,
385
- [`.${g.input}.${e.input}`]: {
121
+ }
122
+ },
123
+ MuiAutocomplete: {
124
+ defaultProps: { popupIcon: /* @__PURE__ */ n(u, { fontSize: 14 }) },
125
+ variants: [
126
+ {
127
+ props: {},
128
+ style: ({ theme: e }) => e.unstable_sx({
129
+ [`.${a.inputRoot}`]: {
130
+ pt: 1.5,
131
+ pb: 0.25,
132
+ [`.${a.input}.${t.input}`]: {
133
+ px: 0,
134
+ pt: 0.5,
135
+ pb: 0.25
136
+ },
137
+ [`&.${t.sizeSmall}`]: {
138
+ [`.${a.input}.${t.input}`]: {
386
139
  px: 0,
387
- pt: 0.5,
388
- pb: 0.25
389
- },
390
- [`&.${e.sizeSmall}`]: {
391
- [`.${g.input}.${e.input}`]: {
392
- px: 0,
393
- py: 0,
394
- pb: "1px"
395
- }
140
+ py: 0,
141
+ pb: "1px"
396
142
  }
397
143
  }
398
- })
399
- }
400
- ]
401
- },
402
- MuiTextField: {
403
- defaultProps: { variant: "filled" },
404
- variants: [
405
- {
406
- props: {},
407
- // @ts-ignore
408
- style: ({ theme: t, ownerState: s }) => t.unstable_sx({
409
- [`.${e.root}`]: {
410
- borderRadius: 1,
411
- lineHeight: "1.5rem",
412
- [`.${e.input}`]: {
413
- height: "1.5rem"
414
- },
415
- [`&.${d.multiline}`]: {
416
- pl: 0,
417
- pr: 0,
418
- pt: "16px",
419
- "& .MuiInputBase-inputMultiline": {
420
- py: 0
421
- }
422
- }
423
- },
424
- // standard
425
- [`.${d.root}`]: {
426
- mt: 1.5,
427
- [`&.${e.hiddenLabel}`]: {
428
- mt: 0,
429
- pt: 0,
430
- [`.${$.select}.${d.input}:focus`]: {
431
- bgcolor: "transparent"
432
- }
433
- }
434
- },
435
- [`.${r.standard}`]: {
436
- transform: "translate(0px, 18px) scale(1)",
437
- [`&.${r.sizeSmall}`]: {
438
- transform: "translate(0px, 15px) scale(1)"
439
- },
440
- [`&.${r.shrink}`]: {
441
- transform: "translate(0px, -1px) scale(0.8)",
442
- [`&.${r.sizeSmall}`]: {
443
- transform: "translate(0px, -1px) scale(0.8)"
444
- }
445
- }
446
- },
447
- // filled
448
- [`.${b.root}`]: {
449
- ":before,:after": { display: "none" },
450
- [`.${e.input}`]: {
451
- pb: 0.5,
452
- pt: s != null && s.label ? 2 : 0.5,
453
- px: 1,
454
- ":focus": {
455
- borderRadius: 1
456
- },
457
- [`&.${e.inputSizeSmall}`]: {
458
- pb: 0.25,
459
- pt: s != null && s.label ? 1.25 : 0.25
460
- },
461
- [`&.${e.inputHiddenLabel}`]: {
462
- py: 0.5,
463
- [`&.${e.inputSizeSmall}`]: {
464
- py: "1px"
465
- }
466
- }
467
- }
468
- },
469
- [`.${r.filled}`]: {
470
- transform: "translate(8px, 11px) scale(1)",
471
- [`&.${r.sizeSmall}`]: {
472
- transform: "translate(8px, 7px) scale(1)"
473
- },
474
- [`&.${r.shrink}`]: {
475
- transform: "translate(8px, 2px) scale(0.8)",
476
- [`&.${r.sizeSmall}`]: {
477
- transform: "translate(8px, 0) scale(0.8)"
478
- }
479
- }
144
+ }
145
+ })
146
+ }
147
+ ]
148
+ },
149
+ MuiTextField: {
150
+ defaultProps: { variant: "filled" },
151
+ variants: [
152
+ {
153
+ props: {},
154
+ // @ts-ignore
155
+ style: ({ theme: e, ownerState: r }) => e.unstable_sx({
156
+ [`.${t.root}`]: {
157
+ borderRadius: 1,
158
+ lineHeight: "1.5rem",
159
+ [`.${t.input}`]: {
160
+ height: "1.5rem"
480
161
  },
481
- // outlined
482
- [`.${u.root}`]: {
483
- [`.${e.input}`]: {
484
- py: 1.25,
485
- px: 1,
486
- [`&.${e.inputSizeSmall}`]: {
487
- py: 0.875
488
- },
489
- [`&.${e.inputHiddenLabel}`]: {
490
- py: 0.5,
491
- [`&.${e.inputSizeSmall}`]: {
492
- py: "1px"
493
- }
494
- }
162
+ [`&.${l.multiline}`]: {
163
+ pl: 0,
164
+ pr: 0,
165
+ pt: "16px",
166
+ "& .MuiInputBase-inputMultiline": {
167
+ py: 0
495
168
  }
496
- },
497
- [`.${r.outlined}`]: {
498
- transform: "translate(8px, 10px) scale(1)",
499
- [`&.${r.sizeSmall}`]: {
500
- transform: "translate(8px, 7px) scale(1)"
501
- },
502
- [`&.${r.shrink}`]: {
503
- transform: "translate(16px, -7px) scale(0.8)"
169
+ }
170
+ },
171
+ // standard
172
+ [`.${l.root}`]: {
173
+ mt: 1.5,
174
+ [`&.${t.hiddenLabel}`]: {
175
+ mt: 0,
176
+ pt: 0,
177
+ [`.${h.select}.${l.input}:focus`]: {
178
+ bgcolor: "transparent"
504
179
  }
505
180
  }
506
- })
507
- }
508
- ]
509
- },
510
- MuiInput: {
511
- defaultProps: { disableUnderline: !0 },
512
- variants: [
513
- {
514
- props: { disableUnderline: !0 },
515
- style: ({ theme: t }) => t.unstable_sx({
516
- fontSize: "0.875rem",
517
- lineHeight: "1.5rem",
518
- [`&.${e.multiline}`]: {
519
- py: 0
520
- },
521
- [`.${e.input}`]: {
522
- py: 0.5,
523
- height: "1.5rem"
181
+ },
182
+ [`.${i.standard}`]: {
183
+ transform: "translate(0px, 18px) scale(1)",
184
+ [`&.${i.sizeSmall}`]: {
185
+ transform: "translate(0px, 15px) scale(1)"
524
186
  },
525
- [`&.${e.sizeSmall}`]: {
526
- [`.${e.input}`]: {
527
- py: "1px"
187
+ [`&.${i.shrink}`]: {
188
+ transform: "translate(0px, -1px) scale(0.8)",
189
+ [`&.${i.sizeSmall}`]: {
190
+ transform: "translate(0px, -1px) scale(0.8)"
528
191
  }
529
192
  }
530
- })
531
- }
532
- ]
533
- },
534
- MuiFilledInput: {
535
- styleOverrides: {
536
- root: {
537
- fontSize: "0.875rem",
538
- backgroundColor: "rgba(0, 0, 0, 0.03)",
539
- "&:hover": {
540
- backgroundColor: "rgb(0, 0, 0, 0.06)",
541
- "@media (hover: none)": {
542
- backgroundColor: "rgba(0, 0, 0, 0.03)"
543
- }
544
- }
545
- }
546
- }
547
- },
548
- MuiSelect: {
549
- styleOverrides: {
550
- select: {
551
- display: "flex",
552
- alignItems: "center",
553
- [`.${D.root}`]: {
554
- minWidth: 20
555
- }
556
- }
557
- },
558
- defaultProps: { variant: "filled", IconComponent: p },
559
- variants: [
560
- {
561
- props: {},
562
- style: ({ theme: t }) => t.unstable_sx({
563
- fontSize: "0.875rem",
564
- borderRadius: 1,
565
- lineHeight: "1.5rem",
566
- // filled
567
- [`&.${b.root}`]: {
568
- ":before,:after": { display: "none" },
569
- [`.${e.input}`]: {
193
+ },
194
+ // filled
195
+ [`.${d.root}`]: {
196
+ ":before,:after": { display: "none" },
197
+ [`.${t.input}`]: {
198
+ pb: 0.5,
199
+ pt: r != null && r.label ? 2 : 0.5,
200
+ px: 1,
201
+ ":focus": {
202
+ borderRadius: 1
203
+ },
204
+ [`&.${t.inputSizeSmall}`]: {
205
+ pb: 0.25,
206
+ pt: r != null && r.label ? 1.25 : 0.25
207
+ },
208
+ [`&.${t.inputHiddenLabel}`]: {
570
209
  py: 0.5,
571
- borderRadius: 1,
572
- [`&.${e.inputSizeSmall}`]: {
210
+ [`&.${t.inputSizeSmall}`]: {
573
211
  py: "1px"
574
212
  }
575
213
  }
214
+ }
215
+ },
216
+ [`.${i.filled}`]: {
217
+ transform: "translate(8px, 11px) scale(1)",
218
+ [`&.${i.sizeSmall}`]: {
219
+ transform: "translate(8px, 7px) scale(1)"
576
220
  },
577
- // outlined
578
- [`&.${u.root}`]: {
579
- [`.${e.input}`]: {
221
+ [`&.${i.shrink}`]: {
222
+ transform: "translate(8px, 2px) scale(0.8)",
223
+ [`&.${i.sizeSmall}`]: {
224
+ transform: "translate(8px, 0) scale(0.8)"
225
+ }
226
+ }
227
+ },
228
+ // outlined
229
+ [`.${p.root}`]: {
230
+ [`.${t.input}`]: {
231
+ py: 1.25,
232
+ px: 1,
233
+ [`&.${t.inputSizeSmall}`]: {
234
+ py: 0.875
235
+ },
236
+ [`&.${t.inputHiddenLabel}`]: {
580
237
  py: 0.5,
581
- borderRadius: 1,
582
- [`&.${e.inputSizeSmall}`]: {
238
+ [`&.${t.inputSizeSmall}`]: {
583
239
  py: "1px"
584
240
  }
585
241
  }
586
242
  }
587
- })
588
- }
589
- ]
590
- },
591
- MuiSlider: {
592
- defaultProps: {},
593
- variants: [
594
- {
595
- props: {},
596
- style: ({ theme: t }) => t.unstable_sx({
597
- height: 3,
598
- [`.${n.track}`]: {
599
- borderWidth: 0
600
- },
601
- [`.${n.thumb}`]: {
602
- width: 16,
603
- height: 16
243
+ },
244
+ [`.${i.outlined}`]: {
245
+ transform: "translate(8px, 10px) scale(1)",
246
+ [`&.${i.sizeSmall}`]: {
247
+ transform: "translate(8px, 7px) scale(1)"
604
248
  },
605
- [`&.${n.sizeSmall}`]: {
606
- height: 2,
607
- [`.${n.thumb}`]: {
608
- width: 12,
609
- height: 12
610
- }
249
+ [`&.${i.shrink}`]: {
250
+ transform: "translate(16px, -7px) scale(0.8)"
611
251
  }
612
- })
613
- }
614
- ]
615
- },
616
- MuiFormHelperText: {
617
- styleOverrides: {
618
- root: ({ theme: t }) => t.unstable_sx({
619
- mx: 1
252
+ }
620
253
  })
621
254
  }
622
- },
623
- MuiTypography: {
624
- variants: [
625
- {
626
- props: { variant: "body1" },
627
- style: ({ theme: t }) => t.unstable_sx({
628
- fontSize: "0.875rem"
629
- })
255
+ ]
256
+ },
257
+ MuiInput: {
258
+ defaultProps: { disableUnderline: !0 },
259
+ variants: [
260
+ {
261
+ props: { disableUnderline: !0 },
262
+ style: ({ theme: e }) => e.unstable_sx({
263
+ fontSize: "0.875rem",
264
+ lineHeight: "1.5rem",
265
+ [`&.${t.multiline}`]: {
266
+ py: 0
267
+ },
268
+ [`.${t.input}`]: {
269
+ py: 0.5,
270
+ height: "1.5rem"
271
+ },
272
+ [`&.${t.sizeSmall}`]: {
273
+ [`.${t.input}`]: {
274
+ py: "1px"
275
+ }
276
+ }
277
+ })
278
+ }
279
+ ]
280
+ },
281
+ MuiFilledInput: {
282
+ styleOverrides: {
283
+ root: ({ theme: e }) => e.unstable_sx({
284
+ fontSize: "0.875rem",
285
+ bgcolor: e.palette.grey[100],
286
+ "&:hover": {
287
+ bgcolor: e.palette.grey[100]
630
288
  },
631
- {
632
- props: { variant: "body2" },
633
- style: ({ theme: t }) => t.unstable_sx({
634
- fontSize: "0.75rem"
635
- })
289
+ "@media (hover: none)": {
290
+ bgcolor: e.palette.grey[100]
636
291
  }
637
- ]
292
+ })
293
+ }
294
+ },
295
+ MuiSelect: {
296
+ styleOverrides: {
297
+ select: {
298
+ display: "flex",
299
+ alignItems: "center",
300
+ [`.${c.root}`]: {
301
+ minWidth: 20
302
+ }
303
+ }
638
304
  },
639
- MuiMenuItem: {
640
- styleOverrides: {
641
- root: ({ theme: t }) => t.unstable_sx({
642
- padding: "6px 12px",
305
+ defaultProps: { variant: "filled", IconComponent: u },
306
+ variants: [
307
+ {
308
+ props: {},
309
+ style: ({ theme: e }) => e.unstable_sx({
643
310
  fontSize: "0.875rem",
644
311
  borderRadius: 1,
645
- ".MuiListItemIcon-root": {
646
- minWidth: 0,
647
- mr: 1
312
+ lineHeight: "1.5rem",
313
+ // filled
314
+ [`&.${d.root}`]: {
315
+ ":before,:after": { display: "none" },
316
+ [`.${t.input}`]: {
317
+ py: 0.5,
318
+ borderRadius: 1,
319
+ [`&.${t.inputSizeSmall}`]: {
320
+ py: "1px"
321
+ }
322
+ }
323
+ },
324
+ // outlined
325
+ [`&.${p.root}`]: {
326
+ [`.${t.input}`]: {
327
+ py: 0.5,
328
+ borderRadius: 1,
329
+ [`&.${t.inputSizeSmall}`]: {
330
+ py: "1px"
331
+ }
332
+ }
648
333
  }
649
334
  })
650
335
  }
651
- },
652
- MuiListItemButton: {
653
- styleOverrides: {
654
- root: {
655
- padding: "6px 12px"
656
- }
657
- }
658
- },
659
- MuiList: {
660
- styleOverrides: {
661
- root: {
662
- padding: 4
663
- }
336
+ ]
337
+ },
338
+ MuiSlider: {
339
+ defaultProps: {},
340
+ variants: [
341
+ {
342
+ props: {},
343
+ style: ({ theme: e }) => e.unstable_sx({
344
+ height: 3,
345
+ [`.${o.track}`]: {
346
+ borderWidth: 0
347
+ },
348
+ [`.${o.thumb}`]: {
349
+ width: 16,
350
+ height: 16
351
+ },
352
+ [`&.${o.sizeSmall}`]: {
353
+ height: 2,
354
+ [`.${o.thumb}`]: {
355
+ width: 12,
356
+ height: 12
357
+ }
358
+ }
359
+ })
664
360
  }
665
- },
666
- MuiListItemText: {
667
- styleOverrides: {
668
- primary: {
361
+ ]
362
+ },
363
+ MuiFormHelperText: {
364
+ styleOverrides: {
365
+ root: ({ theme: e }) => e.unstable_sx({
366
+ mx: 1
367
+ })
368
+ }
369
+ },
370
+ MuiTypography: {
371
+ variants: [
372
+ {
373
+ props: { variant: "body1" },
374
+ style: ({ theme: e }) => e.unstable_sx({
669
375
  fontSize: "0.875rem"
670
- }
376
+ })
377
+ },
378
+ {
379
+ props: { variant: "body2" },
380
+ style: ({ theme: e }) => e.unstable_sx({
381
+ fontSize: "0.75rem"
382
+ })
671
383
  }
672
- },
673
- MuiDialogTitle: {
674
- styleOverrides: {
675
- root: {
676
- padding: "16px 24px",
677
- borderBottom: "1px solid #E5E7EB"
384
+ ]
385
+ },
386
+ MuiMenuItem: {
387
+ styleOverrides: {
388
+ root: ({ theme: e }) => e.unstable_sx({
389
+ padding: "6px 12px",
390
+ fontSize: "0.875rem",
391
+ borderRadius: 1,
392
+ ".MuiListItemIcon-root": {
393
+ minWidth: 0,
394
+ mr: 1
678
395
  }
396
+ })
397
+ }
398
+ },
399
+ MuiListItemButton: {
400
+ styleOverrides: {
401
+ root: {
402
+ padding: "6px 12px"
679
403
  }
680
- },
681
- MuiDialogActions: {
682
- styleOverrides: {
683
- root: {
684
- borderTop: "1px solid #E5E7EB",
685
- padding: "16px 24px"
686
- }
404
+ }
405
+ },
406
+ MuiList: {
407
+ styleOverrides: {
408
+ root: {
409
+ padding: 4
687
410
  }
688
- },
689
- MuiDialogContent: {
690
- styleOverrides: {
691
- root: {
692
- padding: "12px 24px !important"
693
- }
411
+ }
412
+ },
413
+ MuiListItemText: {
414
+ styleOverrides: {
415
+ primary: {
416
+ fontSize: "0.875rem"
694
417
  }
695
- },
696
- MuiButton: {
697
- defaultProps: {
698
- size: "small"
699
- },
700
- styleOverrides: {
701
- contained: ({ ownerState: t }) => ({
702
- // 只对默认按钮应用自定义样式,warning 和 error 按钮保持原样
703
- ...(t.color === "inherit" || t.color === "primary") && t.className !== "ignore-style-override" && {
704
- backgroundColor: "#030712",
705
- color: "white",
706
- "&:hover": {
707
- backgroundColor: "#030712"
708
- }
709
- },
710
- [`&.${B.loading}`]: {
711
- color: "grey"
712
- }
713
- }),
714
- outlined: ({ ownerState: t }) => ({
715
- // 只对默认按钮应用自定义样式
716
- ...(t.color === "inherit" || t.color === "primary") && t.className !== "ignore-style-override" && {
717
- bgcolor: "#fff",
718
- color: "#000",
719
- border: "1px solid #E5E7EB",
720
- fontSize: "13px",
721
- fontWeight: 500,
722
- padding: "4px 12px",
723
- "&:hover": {
724
- border: "1px solid #E5E7EB"
725
- }
726
- }
727
- })
418
+ }
419
+ },
420
+ MuiDialogTitle: {
421
+ styleOverrides: {
422
+ root: ({ theme: e }) => e.unstable_sx({
423
+ padding: "16px 24px",
424
+ borderBottom: `1px solid ${e.palette.divider}`
425
+ })
426
+ }
427
+ },
428
+ MuiDialogActions: {
429
+ styleOverrides: {
430
+ root: ({ theme: e }) => e.unstable_sx({
431
+ borderTop: `1px solid ${e.palette.divider}`,
432
+ padding: "16px 24px"
433
+ })
434
+ }
435
+ },
436
+ MuiDialogContent: {
437
+ styleOverrides: {
438
+ root: {
439
+ padding: "12px 24px !important"
728
440
  }
729
441
  }
442
+ },
443
+ MuiButton: {
444
+ defaultProps: {
445
+ size: "small"
446
+ },
447
+ styleOverrides: {}
730
448
  }
731
- }),
732
- A
733
- ), m = {
734
- fontSize: "5rem",
735
- [o.breakpoints.down("xl")]: {
736
- fontSize: "5rem"
737
- },
738
- [o.breakpoints.down("lg")]: {
739
- fontSize: "4rem"
740
- },
741
- [o.breakpoints.down("md")]: {
742
- fontSize: "3rem"
743
- },
744
- [o.breakpoints.down("sm")]: {
745
- fontSize: "2rem"
746
449
  }
747
- };
748
- o.typography.big = { ...m };
749
- const O = F({
450
+ }, z = {
750
451
  typography: {
452
+ // @ts-ignore
453
+ big: { ...f },
751
454
  button: {
752
455
  // @ts-ignore
753
456
  textTransform: "none",
754
457
  WebkitTextTransform: "none"
755
458
  }
756
459
  }
757
- });
758
- O.typography.big = { ...m };
759
- function p(t) {
760
- return /* @__PURE__ */ f(z, { ...t, component: k, icon: y });
761
- }
460
+ }, T = ({ children: e }) => /* @__PURE__ */ n(
461
+ m,
462
+ {
463
+ theme: S,
464
+ translations: x,
465
+ fallbackLocale: "en",
466
+ injectFirst: !0,
467
+ children: e
468
+ }
469
+ ), _ = ({ children: e }) => /* @__PURE__ */ n(
470
+ m,
471
+ {
472
+ theme: z,
473
+ translations: x,
474
+ fallbackLocale: "en",
475
+ injectFirst: !0,
476
+ children: e
477
+ }
478
+ );
762
479
  export {
763
- F as create,
764
- J as darkThemeRoot,
765
- h as genPaletteColor,
766
- I as lightThemeRoot,
767
- O as pagesTheme,
768
- o as theme
480
+ T as DashboardProvider,
481
+ _ as PageProvider
769
482
  };