ish-ui 1.0.54 → 1.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/dist/appBar/AppBarHelpMenu.d.ts +17 -1
- package/dist/appBar/AppBarHelpMenu.js +5 -5
- package/dist/colorPicker/ColorPicker.js +5 -6
- package/dist/dialog/message/Message.js +3 -4
- package/dist/documents/DocumentIconsChooser.js +4 -5
- package/dist/fieldMessage/ErrorMessage.d.ts +1 -1
- package/dist/fieldMessage/ErrorMessage.js +8 -6
- package/dist/fieldMessage/WarningMessage.d.ts +1 -1
- package/dist/fieldMessage/WarningMessage.js +8 -6
- package/dist/fieldMessage/styles.d.ts +12 -1
- package/dist/fieldMessage/styles.js +1 -2
- package/dist/fileUploader/FileUploaderDialog.d.ts +1 -1
- package/dist/fileUploader/FileUploaderDialog.js +9 -9
- package/dist/formFields/CheckboxField.d.ts +1 -1
- package/dist/formFields/CheckboxField.js +4 -4
- package/dist/formFields/CodeEditorField.js +3 -4
- package/dist/formFields/ColoredCheckBox.js +3 -2
- package/dist/formFields/DateTimeField.js +2 -3
- package/dist/formFields/EditInPlaceDateTimeField.js +40 -20
- package/dist/formFields/EditInPlaceField.js +3 -4
- package/dist/formFields/EditInPlaceFieldBase.js +9 -10
- package/dist/formFields/EditInPlaceMoneyField.js +3 -2
- package/dist/formFields/EditInPlaceSearchSelect.js +16 -13
- package/dist/formFields/FilePreview.d.ts +1 -1
- package/dist/formFields/FilePreview.js +5 -5
- package/dist/formFields/FormRadioButtons.js +3 -3
- package/dist/formFields/SelectCustomComponents.d.ts +10 -1
- package/dist/formFields/SelectCustomComponents.js +7 -6
- package/dist/formFields/Switch.d.ts +1 -1
- package/dist/formFields/Switch.js +5 -5
- package/dist/formFields/TextField.d.ts +5 -1
- package/dist/formFields/TextField.js +2 -2
- package/dist/formFields/UneditableBase.js +3 -4
- package/dist/layout/InfoPill.js +4 -4
- package/dist/layout/resizable/ResizableWrapper.js +6 -6
- package/dist/markdownEditor/HtmlEditor.d.ts +2 -2
- package/dist/markdownEditor/WysiwygEditor.js +1 -1
- package/dist/model/Theme.d.ts +4 -3
- package/dist/styles/GlobalStylesProvider.d.ts +3 -2
- package/dist/styles/GlobalStylesProvider.js +714 -383
- package/dist/styles/hooks.d.ts +9 -1
- package/dist/styles/hooks.js +5 -4
- package/dist/styles/index.d.ts +0 -4
- package/dist/styles/index.js +0 -4
- package/dist/styles/makeStyles.d.ts +37 -2
- package/dist/styles/makeStyles.js +7 -2
- package/dist/tagsInput/AddTagMenu.d.ts +2 -1
- package/dist/tagsInput/AddTagMenu.js +4 -4
- package/dist/tagsInput/AddTagMenuItem.js +5 -4
- package/dist/tagsInput/TagInputList.js +21 -15
- package/dist/themes/index.d.ts +0 -1
- package/dist/themes/index.js +0 -1
- package/dist/themes/ishTheme.js +370 -51
- package/dist/timetable/miniCalendar/CalendarDay.d.ts +1 -1
- package/dist/timetable/miniCalendar/CalendarDay.js +38 -39
- package/dist/timetable/miniCalendar/CalendarHeader.js +3 -4
- package/dist/timetable/miniCalendar/CalendarWeekPanel.js +3 -4
- package/dist/timetable/miniCalendar/WeekDay.js +3 -4
- package/package.json +62 -71
- package/assets/fonts/inter/inter.scss +0 -17
- package/dist/styles/StylesProviderCustom.d.ts +0 -3
- package/dist/styles/StylesProviderCustom.js +0 -6
- package/dist/styles/bootstrap.d.ts +0 -491
- package/dist/styles/bootstrap.js +0 -496
- package/dist/themes/appTheme.d.ts +0 -4
- package/dist/themes/appTheme.js +0 -322
package/dist/themes/ishTheme.js
CHANGED
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
*
|
|
6
6
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
7
7
|
*/
|
|
8
|
-
import { createTheme } from '@mui/material/styles';
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
8
|
+
import { alpha, createTheme, darken } from '@mui/material/styles';
|
|
9
|
+
import { DarkThemeKey, DefaultThemeKey, HighcontrastThemeKey, MonochromeThemeKey, } from '../model';
|
|
10
|
+
import createPalette from '@mui/material/styles/createPalette';
|
|
11
|
+
import { grey, yellow } from '@mui/material/colors';
|
|
11
12
|
const createOverrides = (palette) => ({
|
|
12
13
|
components: {
|
|
13
14
|
MuiButtonBase: {
|
|
@@ -217,7 +218,7 @@ const commonTypography = {
|
|
|
217
218
|
}
|
|
218
219
|
};
|
|
219
220
|
// Default Theme
|
|
220
|
-
const defaultThemePalette = {
|
|
221
|
+
const defaultThemePalette = createPalette({
|
|
221
222
|
primary: {
|
|
222
223
|
main: '#f7941d',
|
|
223
224
|
contrastText: '#fff'
|
|
@@ -227,19 +228,99 @@ const defaultThemePalette = {
|
|
|
227
228
|
},
|
|
228
229
|
secondary: {
|
|
229
230
|
main: '#5660AB'
|
|
230
|
-
},
|
|
231
|
-
text: {
|
|
232
|
-
secondary: 'rgba(0, 0, 0, 0.54)',
|
|
233
|
-
primary: 'rgba(0, 0, 0, 0.87)',
|
|
234
|
-
primaryEditable: 'rgba(0, 0, 0, 0.95)',
|
|
235
|
-
disabled: 'rgba(34, 34, 34, 0.38)',
|
|
236
|
-
hint: 'rgba(34, 34, 34, 0.38)',
|
|
237
|
-
grey: '#434343',
|
|
238
231
|
}
|
|
239
|
-
};
|
|
240
|
-
|
|
232
|
+
});
|
|
233
|
+
const getDefaultThemeOverrides = (pallete) => ({
|
|
234
|
+
heading: {
|
|
235
|
+
color: pallete.secondary.main
|
|
236
|
+
},
|
|
237
|
+
blog: {
|
|
238
|
+
root: {
|
|
239
|
+
backgroundColor: yellow[100]
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
share: {
|
|
243
|
+
exportContainer: {
|
|
244
|
+
backgroundColor: '#302A22'
|
|
245
|
+
},
|
|
246
|
+
closeButton: {
|
|
247
|
+
color: pallete.primary.main
|
|
248
|
+
},
|
|
249
|
+
shareButton: {
|
|
250
|
+
color: '#302A22',
|
|
251
|
+
backgroundColor: '#fff',
|
|
252
|
+
backgroundColorHover: alpha('#fff', 0.9)
|
|
253
|
+
},
|
|
254
|
+
color: {
|
|
255
|
+
headerText: '#fff',
|
|
256
|
+
itemText: 'rgba(255,255,255,0.6)',
|
|
257
|
+
selectedItemText: 'rgba(255,255,255,1)',
|
|
258
|
+
customLabel: 'rgba(255,255,255,.5)'
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
statistics: {
|
|
262
|
+
coloredHeaderText: {
|
|
263
|
+
color: pallete.primary.main
|
|
264
|
+
},
|
|
265
|
+
enrolmentText: {
|
|
266
|
+
color: '#73cba7',
|
|
267
|
+
strokeColor: '#73cba7'
|
|
268
|
+
},
|
|
269
|
+
revenueText: {
|
|
270
|
+
color: '#ffd876',
|
|
271
|
+
strokeColor: '#ffd876'
|
|
272
|
+
},
|
|
273
|
+
rightColumn: {
|
|
274
|
+
color: alpha('rgba(0, 0, 0, 0.87)', 0.4)
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
appBar: {
|
|
278
|
+
header: {
|
|
279
|
+
background: '#fbf9f0',
|
|
280
|
+
color: '#222',
|
|
281
|
+
},
|
|
282
|
+
headerAlternate: {
|
|
283
|
+
background: '#fff',
|
|
284
|
+
color: '#222',
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
appBarButton: {
|
|
288
|
+
close: {
|
|
289
|
+
color: pallete.primary.main,
|
|
290
|
+
},
|
|
291
|
+
helpMenu: {
|
|
292
|
+
color: pallete.primary.main,
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
tabList: {
|
|
296
|
+
listContainer: {
|
|
297
|
+
backgroundColor: pallete.secondary.main
|
|
298
|
+
},
|
|
299
|
+
listItemRoot: {
|
|
300
|
+
color: '#fff'
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
table: {
|
|
304
|
+
contrastRow: {
|
|
305
|
+
main: '#f8f8f8',
|
|
306
|
+
light: '#f4f3ec'
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
addButtonColor: {
|
|
310
|
+
color: pallete.primary.main
|
|
311
|
+
},
|
|
312
|
+
palette: Object.assign(Object.assign({}, pallete), { text: {
|
|
313
|
+
secondary: 'rgba(0, 0, 0, 0.54)',
|
|
314
|
+
primary: 'rgba(0, 0, 0, 0.87)',
|
|
315
|
+
primaryEditable: 'rgba(0, 0, 0, 0.95)',
|
|
316
|
+
disabled: 'rgba(34, 34, 34, 0.38)',
|
|
317
|
+
hint: 'rgba(34, 34, 34, 0.38)',
|
|
318
|
+
grey: '#434343',
|
|
319
|
+
} })
|
|
320
|
+
});
|
|
321
|
+
export const defaultTheme = createTheme(Object.assign(Object.assign(Object.assign({ palette: defaultThemePalette }, commonTypography), getDefaultThemeOverrides(defaultThemePalette)), createOverrides(defaultThemePalette)));
|
|
241
322
|
// Dark Theme
|
|
242
|
-
const darkThemePalette = {
|
|
323
|
+
const darkThemePalette = createPalette({
|
|
243
324
|
mode: 'dark',
|
|
244
325
|
common: { black: '#000', white: '#fff' },
|
|
245
326
|
primary: {
|
|
@@ -252,26 +333,106 @@ const darkThemePalette = {
|
|
|
252
333
|
paper: '#313131'
|
|
253
334
|
},
|
|
254
335
|
secondary: {
|
|
255
|
-
light: '
|
|
256
|
-
main: '#
|
|
257
|
-
dark: '
|
|
336
|
+
light: '#6971B4',
|
|
337
|
+
main: '#B4B8D9',
|
|
338
|
+
dark: '#6971B4',
|
|
258
339
|
contrastText: '#fff'
|
|
259
340
|
},
|
|
260
341
|
error: {
|
|
261
342
|
light: '#e57373', main: '#f44336', dark: '#d32f2f', contrastText: '#fff'
|
|
262
|
-
},
|
|
263
|
-
text: {
|
|
264
|
-
primary: 'rgba(255, 255, 255, 0.87)',
|
|
265
|
-
primaryEditable: 'rgba(255, 255, 255, 0.95)',
|
|
266
|
-
secondary: 'rgba(255, 255, 255, 0.65)',
|
|
267
|
-
disabled: 'rgba(255, 255, 255, 0.38)',
|
|
268
|
-
hint: 'rgba(255, 255, 255, 0.38)',
|
|
269
|
-
grey: 'rgba(255, 255, 255, 0.65)',
|
|
270
343
|
}
|
|
271
|
-
};
|
|
272
|
-
|
|
344
|
+
});
|
|
345
|
+
const getDarkThemeOverrides = (pallete) => ({
|
|
346
|
+
heading: {
|
|
347
|
+
color: pallete.secondary.main
|
|
348
|
+
},
|
|
349
|
+
blog: {
|
|
350
|
+
root: {
|
|
351
|
+
backgroundColor: '#303030'
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
share: {
|
|
355
|
+
exportContainer: {
|
|
356
|
+
backgroundColor: '#302A22'
|
|
357
|
+
},
|
|
358
|
+
closeButton: {
|
|
359
|
+
color: pallete.primary.main
|
|
360
|
+
},
|
|
361
|
+
shareButton: {
|
|
362
|
+
color: '#302A22',
|
|
363
|
+
backgroundColor: '#fff',
|
|
364
|
+
backgroundColorHover: alpha('#fff', 0.9)
|
|
365
|
+
},
|
|
366
|
+
color: {
|
|
367
|
+
headerText: '#fff',
|
|
368
|
+
itemText: 'rgba(255,255,255,0.6)',
|
|
369
|
+
selectedItemText: 'rgba(255,255,255,1)',
|
|
370
|
+
customLabel: 'rgba(255,255,255,.5)'
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
statistics: {
|
|
374
|
+
coloredHeaderText: {
|
|
375
|
+
color: pallete.primary.main
|
|
376
|
+
},
|
|
377
|
+
enrolmentText: {
|
|
378
|
+
color: '#73cba7',
|
|
379
|
+
strokeColor: '#73cba7'
|
|
380
|
+
},
|
|
381
|
+
revenueText: {
|
|
382
|
+
color: '#ffd876',
|
|
383
|
+
strokeColor: '#ffd876'
|
|
384
|
+
},
|
|
385
|
+
rightColumn: {
|
|
386
|
+
color: alpha('rgba(255, 255, 255, 0.87)', 0.4)
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
appBar: {
|
|
390
|
+
header: {
|
|
391
|
+
background: '#1b1b1b',
|
|
392
|
+
color: '#fff',
|
|
393
|
+
},
|
|
394
|
+
headerAlternate: {
|
|
395
|
+
background: pallete.primary.main,
|
|
396
|
+
color: '#fff',
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
appBarButton: {
|
|
400
|
+
close: {
|
|
401
|
+
color: 'white'
|
|
402
|
+
},
|
|
403
|
+
helpMenu: {
|
|
404
|
+
color: '#fff'
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
tabList: {
|
|
408
|
+
listContainer: {
|
|
409
|
+
backgroundColor: '#302A22'
|
|
410
|
+
},
|
|
411
|
+
listItemRoot: {
|
|
412
|
+
color: '#fff'
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
table: {
|
|
416
|
+
contrastRow: {
|
|
417
|
+
main: '#696969',
|
|
418
|
+
light: '#696969bf'
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
addButtonColor: {
|
|
422
|
+
color: darken(grey[400], 0.1)
|
|
423
|
+
},
|
|
424
|
+
palette: Object.assign(Object.assign({}, pallete), { text: {
|
|
425
|
+
primary: 'rgba(255, 255, 255, 0.87)',
|
|
426
|
+
primaryEditable: 'rgba(255, 255, 255, 0.95)',
|
|
427
|
+
secondary: 'rgba(255, 255, 255, 0.65)',
|
|
428
|
+
disabled: 'rgba(255, 255, 255, 0.38)',
|
|
429
|
+
hint: 'rgba(255, 255, 255, 0.38)',
|
|
430
|
+
grey: 'rgba(255, 255, 255, 0.65)',
|
|
431
|
+
} })
|
|
432
|
+
});
|
|
433
|
+
export const darkTheme = createTheme(Object.assign(Object.assign(Object.assign({ palette: darkThemePalette }, commonTypography), getDarkThemeOverrides(darkThemePalette)), createOverrides(darkThemePalette)));
|
|
273
434
|
// Monochrome Theme
|
|
274
|
-
const monochromeThemePalette = {
|
|
435
|
+
const monochromeThemePalette = createPalette({
|
|
275
436
|
mode: 'light',
|
|
276
437
|
common: { black: '#000', white: '#fff' },
|
|
277
438
|
primary: {
|
|
@@ -280,26 +441,106 @@ const monochromeThemePalette = {
|
|
|
280
441
|
contrastText: '#fff'
|
|
281
442
|
},
|
|
282
443
|
secondary: {
|
|
283
|
-
light: '#
|
|
444
|
+
light: '#B4B8D9',
|
|
284
445
|
main: '#111111',
|
|
285
446
|
dark: '#111111',
|
|
286
447
|
contrastText: '#fff'
|
|
287
448
|
},
|
|
288
449
|
error: {
|
|
289
450
|
light: '#e57373', main: '#f44336', dark: '#d32f2f', contrastText: '#fff'
|
|
290
|
-
},
|
|
291
|
-
text: {
|
|
292
|
-
primary: '#222222',
|
|
293
|
-
primaryEditable: '#181818',
|
|
294
|
-
secondary: 'rgba(34, 34, 34, 0.54)',
|
|
295
|
-
disabled: 'rgba(34, 34, 34, 0.38)',
|
|
296
|
-
hint: 'rgba(34, 34, 34, 0.38)',
|
|
297
|
-
grey: '#434343',
|
|
298
451
|
}
|
|
299
|
-
};
|
|
300
|
-
|
|
452
|
+
});
|
|
453
|
+
const getMonochromeThemeOverrides = (pallete) => ({
|
|
454
|
+
heading: {
|
|
455
|
+
color: '#000'
|
|
456
|
+
},
|
|
457
|
+
blog: {
|
|
458
|
+
root: {
|
|
459
|
+
backgroundColor: '#eee'
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
share: {
|
|
463
|
+
exportContainer: {
|
|
464
|
+
backgroundColor: '#222222'
|
|
465
|
+
},
|
|
466
|
+
closeButton: {
|
|
467
|
+
color: '#eaeaea'
|
|
468
|
+
},
|
|
469
|
+
shareButton: {
|
|
470
|
+
color: '#fff',
|
|
471
|
+
backgroundColor: '#3e8ef7',
|
|
472
|
+
backgroundColorHover: alpha('#3e8ef7', 0.9)
|
|
473
|
+
},
|
|
474
|
+
color: {
|
|
475
|
+
headerText: '#fff',
|
|
476
|
+
itemText: 'rgba(255,255,255,0.6)',
|
|
477
|
+
selectedItemText: 'rgba(255,255,255,1)',
|
|
478
|
+
customLabel: 'rgba(255,255,255,.5)'
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
statistics: {
|
|
482
|
+
coloredHeaderText: {
|
|
483
|
+
color: '#222222'
|
|
484
|
+
},
|
|
485
|
+
enrolmentText: {
|
|
486
|
+
color: '#73cba7',
|
|
487
|
+
strokeColor: '#73cba7'
|
|
488
|
+
},
|
|
489
|
+
revenueText: {
|
|
490
|
+
color: '#ffd876',
|
|
491
|
+
strokeColor: '#ffd876'
|
|
492
|
+
},
|
|
493
|
+
rightColumn: {
|
|
494
|
+
color: alpha('#222222', 0.4)
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
appBar: {
|
|
498
|
+
header: {
|
|
499
|
+
background: '#fff',
|
|
500
|
+
color: '#000',
|
|
501
|
+
},
|
|
502
|
+
headerAlternate: {
|
|
503
|
+
background: '#f4f4f4',
|
|
504
|
+
color: '#000',
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
appBarButton: {
|
|
508
|
+
close: {
|
|
509
|
+
color: '#222222'
|
|
510
|
+
},
|
|
511
|
+
helpMenu: {
|
|
512
|
+
color: '#222222'
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
tabList: {
|
|
516
|
+
listContainer: {
|
|
517
|
+
backgroundColor: '#e3e3e3'
|
|
518
|
+
},
|
|
519
|
+
listItemRoot: {
|
|
520
|
+
color: '#000',
|
|
521
|
+
},
|
|
522
|
+
},
|
|
523
|
+
table: {
|
|
524
|
+
contrastRow: {
|
|
525
|
+
main: '#f8f8f8',
|
|
526
|
+
light: '#f4f3ec'
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
addButtonColor: {
|
|
530
|
+
color: '#000'
|
|
531
|
+
},
|
|
532
|
+
palette: Object.assign(Object.assign({}, pallete), { text: {
|
|
533
|
+
primary: '#222222',
|
|
534
|
+
primaryEditable: '#181818',
|
|
535
|
+
secondary: 'rgba(34, 34, 34, 0.54)',
|
|
536
|
+
disabled: 'rgba(34, 34, 34, 0.38)',
|
|
537
|
+
hint: 'rgba(34, 34, 34, 0.38)',
|
|
538
|
+
grey: '#434343',
|
|
539
|
+
} })
|
|
540
|
+
});
|
|
541
|
+
export const monochromeTheme = createTheme(Object.assign(Object.assign(Object.assign({ palette: monochromeThemePalette }, commonTypography), getMonochromeThemeOverrides(monochromeThemePalette)), createOverrides(monochromeThemePalette)));
|
|
301
542
|
// High Contrast Theme
|
|
302
|
-
const highcontrastThemePalette = {
|
|
543
|
+
const highcontrastThemePalette = createPalette({
|
|
303
544
|
common: { black: '#111111', white: '#fff' },
|
|
304
545
|
primary: {
|
|
305
546
|
main: '#111111',
|
|
@@ -318,20 +559,98 @@ const highcontrastThemePalette = {
|
|
|
318
559
|
error: {
|
|
319
560
|
light: '#e57373', main: '#f44336', dark: '#d32f2f', contrastText: '#fff'
|
|
320
561
|
},
|
|
321
|
-
text: {
|
|
322
|
-
primary: '#111111',
|
|
323
|
-
primaryEditable: '#070707',
|
|
324
|
-
secondary: '#111111',
|
|
325
|
-
disabled: 'rgba(34, 34, 34, 0.38)',
|
|
326
|
-
hint: 'rgba(34, 34, 34, 0.38)',
|
|
327
|
-
grey: '#434343',
|
|
328
|
-
},
|
|
329
562
|
action: {
|
|
330
563
|
selected: 'rgba(0, 0, 0, 0.3)'
|
|
331
564
|
},
|
|
332
565
|
divider: 'rgba(0, 0, 0, 0.40)'
|
|
333
|
-
};
|
|
334
|
-
|
|
566
|
+
});
|
|
567
|
+
const getHighcontrastThemeOverrides = (pallete) => ({
|
|
568
|
+
heading: {
|
|
569
|
+
color: '#424242'
|
|
570
|
+
},
|
|
571
|
+
blog: {
|
|
572
|
+
root: {
|
|
573
|
+
backgroundColor: '#fff'
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
share: {
|
|
577
|
+
exportContainer: {
|
|
578
|
+
backgroundColor: '#eee'
|
|
579
|
+
},
|
|
580
|
+
closeButton: {
|
|
581
|
+
color: '#111111'
|
|
582
|
+
},
|
|
583
|
+
shareButton: {
|
|
584
|
+
color: '#fff',
|
|
585
|
+
backgroundColor: '#111111',
|
|
586
|
+
backgroundColorHover: alpha('#fff', 0.9)
|
|
587
|
+
},
|
|
588
|
+
color: {
|
|
589
|
+
headerText: '#000',
|
|
590
|
+
itemText: 'rgba(17,17,17,0.6)',
|
|
591
|
+
selectedItemText: 'rgba(17,17,17,1)',
|
|
592
|
+
customLabel: 'rgba(17,17,17,.5)'
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
statistics: {
|
|
596
|
+
coloredHeaderText: {
|
|
597
|
+
color: '#111111'
|
|
598
|
+
},
|
|
599
|
+
enrolmentText: {
|
|
600
|
+
color: '#111111'
|
|
601
|
+
},
|
|
602
|
+
revenueText: {
|
|
603
|
+
color: '#111111'
|
|
604
|
+
},
|
|
605
|
+
rightColumn: {
|
|
606
|
+
color: '#111111'
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
appBar: {
|
|
610
|
+
header: {
|
|
611
|
+
background: '#f2f2f2',
|
|
612
|
+
color: '#222',
|
|
613
|
+
},
|
|
614
|
+
headerAlternate: {
|
|
615
|
+
background: '#111',
|
|
616
|
+
color: '#fff',
|
|
617
|
+
},
|
|
618
|
+
},
|
|
619
|
+
appBarButton: {
|
|
620
|
+
close: {
|
|
621
|
+
color: '#222'
|
|
622
|
+
},
|
|
623
|
+
helpMenu: {
|
|
624
|
+
color: '#222'
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
tabList: {
|
|
628
|
+
listContainer: {
|
|
629
|
+
backgroundColor: '#292929'
|
|
630
|
+
},
|
|
631
|
+
listItemRoot: {
|
|
632
|
+
color: '#fff'
|
|
633
|
+
},
|
|
634
|
+
},
|
|
635
|
+
table: {
|
|
636
|
+
contrastRow: {
|
|
637
|
+
main: '#f8f8f8',
|
|
638
|
+
light: '#f4f3ec'
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
addButtonColor: {
|
|
642
|
+
color: '#111111'
|
|
643
|
+
},
|
|
644
|
+
palette: Object.assign(Object.assign({}, pallete), { text: {
|
|
645
|
+
primary: '#111111',
|
|
646
|
+
primaryEditable: '#070707',
|
|
647
|
+
secondary: '#111111',
|
|
648
|
+
disabled: 'rgba(34, 34, 34, 0.38)',
|
|
649
|
+
hint: 'rgba(34, 34, 34, 0.38)',
|
|
650
|
+
grey: '#434343',
|
|
651
|
+
} })
|
|
652
|
+
});
|
|
653
|
+
export const highcontrastTheme = createTheme(Object.assign(Object.assign(Object.assign({ palette: createPalette(highcontrastThemePalette) }, commonTypography), getHighcontrastThemeOverrides(highcontrastThemePalette)), createOverrides(highcontrastThemePalette)));
|
|
335
654
|
export const currentTheme = (themeName) => {
|
|
336
655
|
switch (themeName) {
|
|
337
656
|
case DarkThemeKey: {
|
|
@@ -7,56 +7,55 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import React, { memo } from 'react';
|
|
9
9
|
import { Button } from '@mui/material';
|
|
10
|
-
import clsx from 'clsx';
|
|
11
10
|
import { alpha } from '@mui/material/styles';
|
|
12
11
|
import { makeAppStyles } from '../../styles';
|
|
13
|
-
const useStyles = makeAppStyles(theme =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
12
|
+
const useStyles = makeAppStyles()((theme, { dayIndexValue }) => {
|
|
13
|
+
const backgroundColor = alpha(theme.palette.primary.main, dayIndexValue);
|
|
14
|
+
return {
|
|
15
|
+
root: {
|
|
16
|
+
padding: 0,
|
|
17
|
+
border: '2px solid transparent',
|
|
18
|
+
borderRadius: 4,
|
|
19
|
+
minWidth: 'initial',
|
|
20
|
+
boxShadow: 'none',
|
|
21
|
+
fontWeight: 'normal',
|
|
22
|
+
color: theme.palette.text.primary,
|
|
23
|
+
'&:active': {
|
|
24
|
+
boxShadow: 'none'
|
|
25
|
+
},
|
|
26
|
+
'&:focus': {
|
|
27
|
+
boxShadow: 'none'
|
|
28
|
+
},
|
|
29
|
+
'&::after': {
|
|
30
|
+
content: '\'\'',
|
|
31
|
+
position: 'absolute',
|
|
32
|
+
width: 4,
|
|
33
|
+
height: 4,
|
|
34
|
+
top: 4,
|
|
35
|
+
borderRadius: '100%'
|
|
36
|
+
},
|
|
37
|
+
'&$same': {
|
|
38
|
+
border: `2px solid ${theme.palette.text.primary}`
|
|
39
|
+
}
|
|
35
40
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
same: {},
|
|
41
|
-
hasSession: ({ dayIndexValue }) => {
|
|
42
|
-
const backgroundColor = alpha(theme.palette.primary.main, dayIndexValue);
|
|
43
|
-
return {
|
|
41
|
+
same: {},
|
|
42
|
+
hasSession: {
|
|
44
43
|
backgroundColor,
|
|
45
44
|
color: theme.palette.getContrastText(backgroundColor),
|
|
46
45
|
'&:hover': {
|
|
47
46
|
backgroundColor,
|
|
48
47
|
color: theme.palette.getContrastText(backgroundColor)
|
|
49
48
|
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
})
|
|
49
|
+
},
|
|
50
|
+
isToday: {
|
|
51
|
+
fontWeight: 900
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
});
|
|
56
55
|
const CalendarDay = memo((props) => {
|
|
57
56
|
const { customClasses = {}, day, date, setTargetDay, dayIndexValue, hasSession, isSameAsTarget, isToday, disabled } = props;
|
|
58
|
-
const classes = useStyles({ dayIndexValue
|
|
59
|
-
return (React.createElement(Button, { className:
|
|
57
|
+
const { classes, cx } = useStyles({ dayIndexValue });
|
|
58
|
+
return (React.createElement(Button, { className: cx(classes.root, customClasses.root, isSameAsTarget && cx(classes.same, customClasses.selected), {
|
|
60
59
|
[customClasses.hasSession || classes.hasSession]: hasSession,
|
|
61
60
|
[customClasses.today || classes.isToday]: isToday
|
|
62
61
|
}), onClick: () => setTargetDay(date), classes: {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconButton, Typography } from '@mui/material';
|
|
3
3
|
import { KeyboardArrowLeft, KeyboardArrowRight } from '@mui/icons-material';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
4
|
import { makeAppStyles } from '../../styles';
|
|
6
|
-
const useStyles = makeAppStyles(theme => ({
|
|
5
|
+
const useStyles = makeAppStyles()(theme => ({
|
|
7
6
|
root: {
|
|
8
7
|
display: 'flex',
|
|
9
8
|
justifyContent: 'space-between',
|
|
@@ -12,8 +11,8 @@ const useStyles = makeAppStyles(theme => ({
|
|
|
12
11
|
}
|
|
13
12
|
}));
|
|
14
13
|
const CalendarHeader = ({ month, year, previousMonth, nextMonth, customClasses = {} }) => {
|
|
15
|
-
const classes = useStyles();
|
|
16
|
-
return React.createElement("div", { className:
|
|
14
|
+
const { classes, cx } = useStyles();
|
|
15
|
+
return React.createElement("div", { className: cx(classes.root, customClasses.root) },
|
|
17
16
|
React.createElement(IconButton, { onClick: previousMonth, className: customClasses.leftButton },
|
|
18
17
|
React.createElement(KeyboardArrowLeft, null)),
|
|
19
18
|
React.createElement(Typography, { align: "center", className: customClasses.selectedMonth },
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import WeekDay from './WeekDay';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
3
|
import { makeAppStyles } from '../../styles';
|
|
5
|
-
const useStyles = makeAppStyles(theme => ({
|
|
4
|
+
const useStyles = makeAppStyles()(theme => ({
|
|
6
5
|
root: {
|
|
7
6
|
display: 'grid',
|
|
8
7
|
gridTemplateColumns: `repeat(7, ${theme.spacing(4)})`,
|
|
@@ -14,7 +13,7 @@ const useStyles = makeAppStyles(theme => ({
|
|
|
14
13
|
}));
|
|
15
14
|
const week = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
16
15
|
const CalendarWeekPanel = ({ className, dayClass, switchWeekDays, selectedWeekDays = [] }) => {
|
|
17
|
-
const classes = useStyles();
|
|
18
|
-
return (React.createElement("div", { className:
|
|
16
|
+
const { classes, cx } = useStyles();
|
|
17
|
+
return (React.createElement("div", { className: cx(classes.root, className) }, week.map((el, id) => (React.createElement(WeekDay, { key: id, id: id, name: el, selected: selectedWeekDays[id], click: switchWeekDays, className: dayClass })))));
|
|
19
18
|
};
|
|
20
19
|
export default CalendarWeekPanel;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Button, Typography } from '@mui/material';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
3
|
import { makeAppStyles } from '../../styles';
|
|
5
|
-
const useStyles = makeAppStyles(theme => ({
|
|
4
|
+
const useStyles = makeAppStyles()(theme => ({
|
|
6
5
|
weekButton: {
|
|
7
6
|
padding: theme.spacing(0.5),
|
|
8
7
|
minWidth: 'initial',
|
|
@@ -20,9 +19,9 @@ const useStyles = makeAppStyles(theme => ({
|
|
|
20
19
|
}));
|
|
21
20
|
const DivRoot = props => React.createElement("div", { className: props.className }, props.children);
|
|
22
21
|
const WeekDay = ({ name, selected, click, id, className }) => {
|
|
23
|
-
const classes = useStyles();
|
|
22
|
+
const { classes, cx } = useStyles();
|
|
24
23
|
const Root = click ? Button : DivRoot;
|
|
25
|
-
return React.createElement(Root, { className:
|
|
24
|
+
return React.createElement(Root, { className: cx(classes.weekButton, {
|
|
26
25
|
[classes.selectedWeekDay]: selected
|
|
27
26
|
}, className), onClick: () => click(id), variant: selected ? 'contained' : 'text', color: selected ? 'primary' : 'inherit', disableElevation: true },
|
|
28
27
|
React.createElement(Typography, { variant: "caption", align: "center", className: selected ? classes.weekDayText : '' }, name));
|