@ptsecurity/mosaic 16.1.1 → 16.2.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.
Files changed (90) hide show
  1. package/_theming.scss +226 -0
  2. package/core/forms/_forms-theme.scss +4 -0
  3. package/core/forms/_forms.scss +95 -88
  4. package/core/pop-up/pop-up.d.ts +3 -0
  5. package/core/styles/_core.scss +0 -1
  6. package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +6 -6
  7. package/esm2022/button/button.component.mjs +6 -3
  8. package/esm2022/code-block/actionbar.component.mjs +1 -1
  9. package/esm2022/core/pop-up/pop-up.mjs +1 -1
  10. package/esm2022/core/version.mjs +2 -2
  11. package/esm2022/dropdown/dropdown-trigger.directive.mjs +3 -2
  12. package/esm2022/file-upload/file-drop.mjs +40 -3
  13. package/esm2022/file-upload/file-upload.mjs +1 -1
  14. package/esm2022/file-upload/multiple-file-upload.component.mjs +3 -3
  15. package/esm2022/file-upload/single-file-upload.component.mjs +1 -1
  16. package/esm2022/form-field/form-field.mjs +2 -2
  17. package/esm2022/form-field/validate.directive.mjs +9 -3
  18. package/esm2022/modal/modal.component.mjs +4 -9
  19. package/esm2022/popover/popover.component.mjs +2 -2
  20. package/esm2022/select/select-option.directive.mjs +15 -3
  21. package/esm2022/select/select.component.mjs +20 -10
  22. package/esm2022/tabs/tab-group.component.mjs +1 -1
  23. package/esm2022/tags/tag-list.component.mjs +5 -4
  24. package/esm2022/toast/toast-animations.mjs +2 -1
  25. package/esm2022/toast/toast-container.component.mjs +21 -7
  26. package/esm2022/toast/toast.component.mjs +7 -2
  27. package/esm2022/toast/toast.service.mjs +2 -1
  28. package/esm2022/toggle/toggle.component.mjs +3 -3
  29. package/esm2022/tooltip/tooltip.component.mjs +16 -4
  30. package/esm2022/tree/control/base-tree-control.mjs +1 -1
  31. package/esm2022/tree/control/flat-tree-control.mjs +4 -4
  32. package/esm2022/tree/control/tree-control.mjs +1 -1
  33. package/esm2022/tree/padding.directive.mjs +2 -2
  34. package/esm2022/tree/toggle.mjs +2 -4
  35. package/esm2022/tree-select/tree-select.component.mjs +13 -8
  36. package/fesm2022/ptsecurity-mosaic-autocomplete.mjs +5 -5
  37. package/fesm2022/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  38. package/fesm2022/ptsecurity-mosaic-button.mjs +5 -2
  39. package/fesm2022/ptsecurity-mosaic-button.mjs.map +1 -1
  40. package/fesm2022/ptsecurity-mosaic-code-block.mjs +1 -1
  41. package/fesm2022/ptsecurity-mosaic-code-block.mjs.map +1 -1
  42. package/fesm2022/ptsecurity-mosaic-core.mjs +1 -1
  43. package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
  44. package/fesm2022/ptsecurity-mosaic-dropdown.mjs +2 -1
  45. package/fesm2022/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  46. package/fesm2022/ptsecurity-mosaic-file-upload.mjs +41 -4
  47. package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -1
  48. package/fesm2022/ptsecurity-mosaic-form-field.mjs +10 -4
  49. package/fesm2022/ptsecurity-mosaic-form-field.mjs.map +1 -1
  50. package/fesm2022/ptsecurity-mosaic-modal.mjs +3 -8
  51. package/fesm2022/ptsecurity-mosaic-modal.mjs.map +1 -1
  52. package/fesm2022/ptsecurity-mosaic-popover.mjs +1 -1
  53. package/fesm2022/ptsecurity-mosaic-popover.mjs.map +1 -1
  54. package/fesm2022/ptsecurity-mosaic-select.mjs +33 -11
  55. package/fesm2022/ptsecurity-mosaic-select.mjs.map +1 -1
  56. package/fesm2022/ptsecurity-mosaic-tabs.mjs +1 -1
  57. package/fesm2022/ptsecurity-mosaic-tabs.mjs.map +1 -1
  58. package/fesm2022/ptsecurity-mosaic-tags.mjs +4 -3
  59. package/fesm2022/ptsecurity-mosaic-tags.mjs.map +1 -1
  60. package/fesm2022/ptsecurity-mosaic-toast.mjs +25 -8
  61. package/fesm2022/ptsecurity-mosaic-toast.mjs.map +1 -1
  62. package/fesm2022/ptsecurity-mosaic-toggle.mjs +2 -2
  63. package/fesm2022/ptsecurity-mosaic-toggle.mjs.map +1 -1
  64. package/fesm2022/ptsecurity-mosaic-tooltip.mjs +15 -3
  65. package/fesm2022/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  66. package/fesm2022/ptsecurity-mosaic-tree-select.mjs +12 -7
  67. package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  68. package/fesm2022/ptsecurity-mosaic-tree.mjs +6 -7
  69. package/fesm2022/ptsecurity-mosaic-tree.mjs.map +1 -1
  70. package/file-upload/file-drop.d.ts +2 -1
  71. package/file-upload/file-upload.d.ts +4 -1
  72. package/file-upload/multiple-file-upload.component.d.ts +2 -2
  73. package/file-upload/single-file-upload.component.d.ts +2 -2
  74. package/form-field/form-field.scss +0 -2
  75. package/package.json +16 -16
  76. package/prebuilt-themes/dark-theme.css +1 -1
  77. package/prebuilt-themes/default-theme.css +1 -1
  78. package/select/select-option.directive.d.ts +2 -0
  79. package/select/select.component.d.ts +3 -2
  80. package/tags/tag-list.scss +4 -0
  81. package/toast/toast-animations.d.ts +1 -0
  82. package/toast/toast-container.component.d.ts +7 -3
  83. package/toast/toast.component.d.ts +2 -0
  84. package/toast/toast.service.d.ts +2 -0
  85. package/toggle/_toggle-theme.scss +8 -0
  86. package/toggle/toggle.scss +6 -2
  87. package/tooltip/tooltip.component.d.ts +4 -1
  88. package/tree/control/base-tree-control.d.ts +1 -1
  89. package/tree/control/tree-control.d.ts +1 -1
  90. package/tree-select/tree-select.component.d.ts +3 -2
package/_theming.scss CHANGED
@@ -3471,6 +3471,123 @@ $backdrop-animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1) !default;
3471
3471
  }
3472
3472
 
3473
3473
 
3474
+ @use 'sass:meta';
3475
+ @use 'sass:map';
3476
+
3477
+ @use '../styles/common/vendor-prefixes';
3478
+ @use '../styles/typography/typography' as *;
3479
+ @use '../styles/typography/typography-utils' as *;
3480
+
3481
+ @mixin mc-form-geometry($tokens) {
3482
+ .mc-form {
3483
+ display: flex;
3484
+ flex-direction: column;
3485
+ }
3486
+
3487
+ .mc-form__row {
3488
+ display: flex;
3489
+ flex-direction: row;
3490
+ }
3491
+
3492
+ .mc-form-horizontal {
3493
+ $config: mc-typography-config($tokens);
3494
+
3495
+ $line-height: mc-line-height($config, body);
3496
+
3497
+ $form-field-size-height: map.get($tokens, form-field-size-height);
3498
+
3499
+ $label-padding-top: calc(($form-field-size-height - $line-height) / 2);
3500
+
3501
+ & .mc-form-row_margin {
3502
+ margin-bottom: var(
3503
+ --mc-forms-size-horizontal-row-margin-bottom,
3504
+ #{map.get($tokens, forms-size-horizontal-row-margin-bottom)}
3505
+ );
3506
+ }
3507
+
3508
+ & .mc-form__label {
3509
+ padding-top: var(--mc-forms-size-horizontal-label-padding-top, #{$label-padding-top});
3510
+
3511
+ text-align: start;
3512
+ }
3513
+
3514
+ & .mc-form__control {
3515
+ padding-left: var(
3516
+ --mc-forms-size-horizontal-control-padding-left,
3517
+ #{map.get($tokens, forms-size-horizontal-control-padding-left)}
3518
+ );
3519
+ }
3520
+
3521
+ & .mc-form__legend {
3522
+ margin-top: var(
3523
+ --mc-forms-size-horizontal-legend-margin-top,
3524
+ #{map.get($tokens, forms-size-horizontal-legend-margin-top)}
3525
+ );
3526
+ margin-bottom: var(
3527
+ --mc-forms-size-horizontal-legend-margin-bottom,
3528
+ #{map.get($tokens, forms-size-horizontal-legend-margin-bottom)}
3529
+ );
3530
+ }
3531
+ }
3532
+
3533
+ .mc-form-vertical {
3534
+ & .mc-form__row {
3535
+ flex-direction: column;
3536
+ }
3537
+
3538
+ & .mc-form-row_margin {
3539
+ margin-bottom: var(
3540
+ --mc-forms-size-vertical-row-margin-bottom,
3541
+ #{map.get($tokens, forms-size-vertical-row-margin-bottom)}
3542
+ );
3543
+ }
3544
+
3545
+ & .mc-form__label {
3546
+ padding-top: var(
3547
+ --mc-forms-size-vertical-label-padding-top,
3548
+ #{map.get($tokens, forms-size-vertical-label-padding-top)}
3549
+ );
3550
+ padding-bottom: var(
3551
+ --mc-forms-size-vertical-label-padding-bottom,
3552
+ #{map.get($tokens, forms-size-vertical-label-padding-bottom)}
3553
+ );
3554
+
3555
+ text-align: start;
3556
+ }
3557
+
3558
+ & .mc-form__control {
3559
+ padding-left: 0;
3560
+ }
3561
+
3562
+ & .mc-form__legend {
3563
+ margin-top: var(
3564
+ --mc-forms-size-vertical-legend-margin-top,
3565
+ #{map.get($tokens, forms-size-vertical-legend-margin-top)}
3566
+ );
3567
+ margin-bottom: var(
3568
+ --mc-forms-size-vertical-legend-margin-bottom,
3569
+ #{map.get($tokens, forms-size-vertical-legend-margin-bottom)}
3570
+ );
3571
+ }
3572
+ }
3573
+
3574
+ .mc-form__fieldset {
3575
+ display: flex;
3576
+ flex-direction: column;
3577
+ }
3578
+
3579
+ .mc-form__fieldset.mc-horizontal {
3580
+ flex-direction: row;
3581
+
3582
+ & .mc-form__row:not(:first-child) {
3583
+ padding-left: var(
3584
+ --mc-forms-size-vertical-control-padding-left,
3585
+ #{map.get($tokens, forms-size-vertical-control-padding-left)}
3586
+ );
3587
+ }
3588
+ }
3589
+ }
3590
+
3474
3591
 
3475
3592
 
3476
3593
  // Mixin that renders all of the core styles that are not theme-dependent.
@@ -9832,10 +9949,18 @@ button {
9832
9949
  @mixin mc-toggle-typography($config) {
9833
9950
  .mc-toggle:not(.mc-toggle_small) {
9834
9951
  @include mc-typography-level-to-styles($config, $toggle-font-default);
9952
+
9953
+ .mc-toggle-bar-outer-container {
9954
+ height: mc-line-height($config, $toggle-font-default);
9955
+ }
9835
9956
  }
9836
9957
 
9837
9958
  .mc-toggle.mc-toggle_small {
9838
9959
  @include mc-typography-level-to-styles($config, $toggle-small-font-default);
9960
+
9961
+ .mc-toggle-bar-outer-container {
9962
+ height: mc-line-height($config, $toggle-small-font-default);
9963
+ }
9839
9964
  }
9840
9965
  }
9841
9966
 
@@ -10244,8 +10369,109 @@ button {
10244
10369
 
10245
10370
 
10246
10371
 
10372
+ @mixin mc-form-geometry() {
10373
+ .mc-form {
10374
+ display: flex;
10375
+ flex-direction: column;
10376
+ }
10377
+
10378
+ .mc-form__row {
10379
+ display: flex;
10380
+ flex-direction: row;
10381
+ }
10382
+
10383
+ .mc-form-horizontal {
10384
+ $config: mc-typography-config();
10385
+
10386
+ $line-height: mc-line-height($config, body);
10387
+
10388
+ $label-padding-top: calc(($form-field-size-height - $line-height) / 2);
10389
+
10390
+ & .mc-form-row_margin {
10391
+ margin-bottom: var(
10392
+ --mc-forms-size-horizontal-row-margin-bottom, $forms-size-horizontal-row-margin-bottom
10393
+ );
10394
+ }
10395
+
10396
+ & .mc-form__label {
10397
+ padding-top: var(--mc-forms-size-horizontal-label-padding-top, $label-padding-top);
10398
+
10399
+ text-align: start;
10400
+ }
10401
+
10402
+ & .mc-form__control {
10403
+ padding-left: var(
10404
+ --mc-forms-size-horizontal-control-padding-left,
10405
+ $forms-size-horizontal-control-padding-left
10406
+ );
10407
+ }
10408
+
10409
+ & .mc-form__legend {
10410
+ margin-top: var(
10411
+ --mc-forms-size-horizontal-legend-margin-top, $forms-size-horizontal-legend-margin-top
10412
+ );
10413
+ margin-bottom: var(
10414
+ --mc-forms-size-horizontal-legend-margin-bottom,
10415
+ $forms-size-horizontal-legend-margin-bottom
10416
+ );
10417
+ }
10418
+ }
10419
+
10420
+ .mc-form-vertical {
10421
+ & .mc-form__row {
10422
+ flex-direction: column;
10423
+ }
10424
+
10425
+ & .mc-form-row_margin {
10426
+ margin-bottom: var(
10427
+ --mc-forms-size-vertical-row-margin-bottom, $forms-size-vertical-row-margin-bottom
10428
+ );
10429
+ }
10430
+
10431
+ & .mc-form__label {
10432
+ padding-top: var(
10433
+ --mc-forms-size-vertical-label-padding-top, $forms-size-vertical-label-padding-top
10434
+ );
10435
+ padding-bottom: var(
10436
+ --mc-forms-size-vertical-label-padding-bottom, $forms-size-vertical-label-padding-bottom
10437
+ );
10438
+
10439
+ text-align: start;
10440
+ }
10441
+
10442
+ & .mc-form__control {
10443
+ padding-left: 0;
10444
+ }
10445
+
10446
+ & .mc-form__legend {
10447
+ margin-top: var(
10448
+ --mc-forms-size-vertical-legend-margin-top, $forms-size-vertical-legend-margin-top
10449
+ );
10450
+ margin-bottom: var(
10451
+ --mc-forms-size-vertical-legend-margin-bottom, $forms-size-vertical-legend-margin-bottom
10452
+ );
10453
+ }
10454
+ }
10455
+
10456
+ .mc-form__fieldset {
10457
+ display: flex;
10458
+ flex-direction: column;
10459
+ }
10460
+
10461
+ .mc-form__fieldset.mc-horizontal {
10462
+ flex-direction: row;
10463
+
10464
+ & .mc-form__row:not(:first-child) {
10465
+ padding-left: var(
10466
+ --mc-forms-size-vertical-control-padding-left, $forms-size-vertical-control-padding-left
10467
+ );
10468
+ }
10469
+ }
10470
+ }
10247
10471
 
10248
10472
  @mixin mc-forms-theme($theme) {
10473
+ @include mc-form-geometry();
10474
+
10249
10475
  $foreground: map-get($theme, foreground);
10250
10476
 
10251
10477
  $forms: map-get(map-get($theme, components), forms);
@@ -3,7 +3,11 @@
3
3
 
4
4
  @use '../styles/typography' as *;
5
5
 
6
+ @use './forms' as *;
7
+
6
8
  @mixin mc-forms-theme($theme) {
9
+ @include mc-form-geometry(map.get($theme, tokens));
10
+
7
11
  $foreground: map.get($theme, foreground);
8
12
 
9
13
  $forms: map.get(map.get($theme, components), forms);
@@ -4,106 +4,113 @@
4
4
  @use '../styles/common/vendor-prefixes';
5
5
  @use '../styles/typography/typography' as *;
6
6
  @use '../styles/typography/typography-utils' as *;
7
- @use '../styles/tokens';
8
7
 
9
- $tokens: meta.module-variables(tokens) !default;
10
-
11
- .mc-form {
12
- display: flex;
13
- flex-direction: column;
14
- }
15
-
16
- .mc-form__row {
17
- display: flex;
18
- flex-direction: row;
19
- }
20
-
21
- .mc-form-horizontal {
22
- $config: mc-typography-config($tokens);
23
-
24
- $line-height: mc-line-height($config, body);
25
-
26
- $form-field-size-height: map.get($tokens, form-field-size-height);
27
-
28
- $label-padding-top: calc(($form-field-size-height - $line-height) / 2);
29
-
30
- & .mc-form-row_margin {
31
- margin-bottom: var(
32
- --mc-forms-size-horizontal-row-margin-bottom, #{map.get($tokens, forms-size-horizontal-row-margin-bottom)}
33
- );
34
- }
35
-
36
- & .mc-form__label {
37
- padding-top: var(--mc-forms-size-horizontal-label-padding-top, #{$label-padding-top});
38
-
39
- text-align: start;
40
- }
41
-
42
- & .mc-form__control {
43
- padding-left: var(
44
- --mc-forms-size-horizontal-control-padding-left,
45
- #{map.get($tokens, forms-size-horizontal-control-padding-left)}
46
- );
47
- }
48
-
49
- & .mc-form__legend {
50
- margin-top: var(
51
- --mc-forms-size-horizontal-legend-margin-top, #{map.get($tokens, forms-size-horizontal-legend-margin-top)}
52
- );
53
- margin-bottom: var(
54
- --mc-forms-size-horizontal-legend-margin-bottom,
55
- #{map.get($tokens, forms-size-horizontal-legend-margin-bottom)}
56
- );
57
- }
58
- }
59
-
60
- .mc-form-vertical {
61
- & .mc-form__row {
8
+ @mixin mc-form-geometry($tokens) {
9
+ .mc-form {
10
+ display: flex;
62
11
  flex-direction: column;
63
12
  }
64
13
 
65
- & .mc-form-row_margin {
66
- margin-bottom: var(
67
- --mc-forms-size-vertical-row-margin-bottom, #{map.get($tokens, forms-size-vertical-row-margin-bottom)}
68
- );
14
+ .mc-form__row {
15
+ display: flex;
16
+ flex-direction: row;
69
17
  }
70
18
 
71
- & .mc-form__label {
72
- padding-top: var(
73
- --mc-forms-size-vertical-label-padding-top, #{map.get($tokens, forms-size-vertical-label-padding-top)}
74
- );
75
- padding-bottom: var(
76
- --mc-forms-size-vertical-label-padding-bottom, #{map.get($tokens, forms-size-vertical-label-padding-bottom)}
77
- );
78
-
79
- text-align: start;
19
+ .mc-form-horizontal {
20
+ $config: mc-typography-config($tokens);
21
+
22
+ $line-height: mc-line-height($config, body);
23
+
24
+ $form-field-size-height: map.get($tokens, form-field-size-height);
25
+
26
+ $label-padding-top: calc(($form-field-size-height - $line-height) / 2);
27
+
28
+ & .mc-form-row_margin {
29
+ margin-bottom: var(
30
+ --mc-forms-size-horizontal-row-margin-bottom,
31
+ #{map.get($tokens, forms-size-horizontal-row-margin-bottom)}
32
+ );
33
+ }
34
+
35
+ & .mc-form__label {
36
+ padding-top: var(--mc-forms-size-horizontal-label-padding-top, #{$label-padding-top});
37
+
38
+ text-align: start;
39
+ }
40
+
41
+ & .mc-form__control {
42
+ padding-left: var(
43
+ --mc-forms-size-horizontal-control-padding-left,
44
+ #{map.get($tokens, forms-size-horizontal-control-padding-left)}
45
+ );
46
+ }
47
+
48
+ & .mc-form__legend {
49
+ margin-top: var(
50
+ --mc-forms-size-horizontal-legend-margin-top,
51
+ #{map.get($tokens, forms-size-horizontal-legend-margin-top)}
52
+ );
53
+ margin-bottom: var(
54
+ --mc-forms-size-horizontal-legend-margin-bottom,
55
+ #{map.get($tokens, forms-size-horizontal-legend-margin-bottom)}
56
+ );
57
+ }
80
58
  }
81
59
 
82
- & .mc-form__control {
83
- padding-left: 0;
60
+ .mc-form-vertical {
61
+ & .mc-form__row {
62
+ flex-direction: column;
63
+ }
64
+
65
+ & .mc-form-row_margin {
66
+ margin-bottom: var(
67
+ --mc-forms-size-vertical-row-margin-bottom,
68
+ #{map.get($tokens, forms-size-vertical-row-margin-bottom)}
69
+ );
70
+ }
71
+
72
+ & .mc-form__label {
73
+ padding-top: var(
74
+ --mc-forms-size-vertical-label-padding-top,
75
+ #{map.get($tokens, forms-size-vertical-label-padding-top)}
76
+ );
77
+ padding-bottom: var(
78
+ --mc-forms-size-vertical-label-padding-bottom,
79
+ #{map.get($tokens, forms-size-vertical-label-padding-bottom)}
80
+ );
81
+
82
+ text-align: start;
83
+ }
84
+
85
+ & .mc-form__control {
86
+ padding-left: 0;
87
+ }
88
+
89
+ & .mc-form__legend {
90
+ margin-top: var(
91
+ --mc-forms-size-vertical-legend-margin-top,
92
+ #{map.get($tokens, forms-size-vertical-legend-margin-top)}
93
+ );
94
+ margin-bottom: var(
95
+ --mc-forms-size-vertical-legend-margin-bottom,
96
+ #{map.get($tokens, forms-size-vertical-legend-margin-bottom)}
97
+ );
98
+ }
84
99
  }
85
100
 
86
- & .mc-form__legend {
87
- margin-top: var(
88
- --mc-forms-size-vertical-legend-margin-top, #{map.get($tokens, forms-size-vertical-legend-margin-top)}
89
- );
90
- margin-bottom: var(
91
- --mc-forms-size-vertical-legend-margin-bottom, #{map.get($tokens, forms-size-vertical-legend-margin-bottom)}
92
- );
101
+ .mc-form__fieldset {
102
+ display: flex;
103
+ flex-direction: column;
93
104
  }
94
- }
95
-
96
- .mc-form__fieldset {
97
- display: flex;
98
- flex-direction: column;
99
- }
100
105
 
101
- .mc-form__fieldset.mc-horizontal {
102
- flex-direction: row;
106
+ .mc-form__fieldset.mc-horizontal {
107
+ flex-direction: row;
103
108
 
104
- & .mc-form__row:not(:first-child) {
105
- padding-left: var(
106
- --mc-forms-size-vertical-control-padding-left, #{map.get($tokens, forms-size-vertical-control-padding-left)}
107
- );
109
+ & .mc-form__row:not(:first-child) {
110
+ padding-left: var(
111
+ --mc-forms-size-vertical-control-padding-left,
112
+ #{map.get($tokens, forms-size-vertical-control-padding-left)}
113
+ );
114
+ }
108
115
  }
109
116
  }
@@ -7,6 +7,9 @@ export declare abstract class McPopUp implements OnDestroy {
7
7
  private changeDetectorRef;
8
8
  header: string | TemplateRef<any>;
9
9
  content: string | TemplateRef<any>;
10
+ context: {
11
+ $implicit: any;
12
+ } | null;
10
13
  classMap: {};
11
14
  warning: boolean;
12
15
  visibility: PopUpVisibility;
@@ -3,7 +3,6 @@
3
3
  @use 'common/overlay' as *;
4
4
  @use 'common/visually-hidden' as *;
5
5
 
6
-
7
6
  // Mixin that renders all of the core styles that are not theme-dependent.
8
7
  @mixin mc-core() {
9
8
  @include a11y-visually-hidden();