@camaradesuk/m3e-angular 0.2.0-alpha.1 → 0.2.0-alpha.10

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 (44) hide show
  1. package/README.md +6 -4
  2. package/fesm2022/camaradesuk-m3e-angular.mjs +2733 -163
  3. package/fesm2022/camaradesuk-m3e-angular.mjs.map +1 -1
  4. package/package.json +5 -4
  5. package/src/lib/styles/_index.scss +2 -0
  6. package/src/lib/styles/_mat-exp-styles.scss +2 -0
  7. package/src/lib/styles/components/all-buttons/_common-selectors.scss +7 -6
  8. package/src/lib/styles/components/all-buttons/button/_index.scss +15 -0
  9. package/src/lib/styles/components/all-buttons/button/tokens/_common.scss +18 -0
  10. package/src/lib/styles/components/all-buttons/button/tokens/_l.scss +25 -0
  11. package/src/lib/styles/components/all-buttons/button/tokens/_m.scss +25 -0
  12. package/src/lib/styles/components/all-buttons/button/tokens/_s.scss +25 -0
  13. package/src/lib/styles/components/all-buttons/button/tokens/_xl.scss +25 -0
  14. package/src/lib/styles/components/all-buttons/button/tokens/_xs.scss +30 -5
  15. package/src/lib/styles/components/all-buttons/button-group/_connected-l-corners.scss +2 -78
  16. package/src/lib/styles/components/all-buttons/button-group/_connected-m-corners.scss +2 -78
  17. package/src/lib/styles/components/all-buttons/button-group/_connected-s-corners.scss +2 -80
  18. package/src/lib/styles/components/all-buttons/button-group/_connected-xl-corners.scss +2 -78
  19. package/src/lib/styles/components/all-buttons/button-group/_connected-xs-corners.scss +2 -79
  20. package/src/lib/styles/components/all-buttons/button-group/_index.scss +6 -0
  21. package/src/lib/styles/components/all-buttons/fab/_index.scss +109 -0
  22. package/src/lib/styles/components/all-buttons/icon-button/_index.scss +29 -0
  23. package/src/lib/styles/components/all-buttons/icon-button/configs/_s.scss +1 -1
  24. package/src/lib/styles/components/all-buttons/icon-button/configs/_xl.scss +2 -2
  25. package/src/lib/styles/components/all-buttons/icon-button/tokens/_l.scss +1 -1
  26. package/src/lib/styles/components/all-buttons/icon-button/tokens/_m.scss +1 -1
  27. package/src/lib/styles/components/all-buttons/icon-button/tokens/_s.scss +2 -0
  28. package/src/lib/styles/components/all-buttons/icon-button/tokens/_xl.scss +3 -0
  29. package/src/lib/styles/components/all-buttons/icon-button/tokens/_xs.scss +1 -1
  30. package/src/lib/styles/components/all-buttons/split-button/_connected-l-corners.scss +15 -57
  31. package/src/lib/styles/components/all-buttons/split-button/_connected-m-corners.scss +15 -57
  32. package/src/lib/styles/components/all-buttons/split-button/_connected-s-corners.scss +15 -58
  33. package/src/lib/styles/components/all-buttons/split-button/_connected-xl-corners.scss +15 -57
  34. package/src/lib/styles/components/all-buttons/split-button/_connected-xs-corners.scss +15 -58
  35. package/src/lib/styles/components/all-buttons/split-button/_index.scss +16 -5
  36. package/src/lib/styles/components/all-buttons/utils/_connected-corners.scss +146 -0
  37. package/src/lib/styles/components/all-buttons/utils/_elevated-icon.scss +52 -0
  38. package/src/lib/styles/components/autocomplete/_index.scss +183 -0
  39. package/src/lib/styles/components/dialog/_index.scss +6 -1
  40. package/src/lib/styles/utils/mixins/_button-focus.scss +24 -0
  41. package/src/lib/styles/utils/mixins/_index.scss +1 -0
  42. package/src/styles/styles.css +2142 -324
  43. package/src/styles/styles.css.map +1 -1
  44. package/types/camaradesuk-m3e-angular.d.ts +632 -15
@@ -1,59 +1,17 @@
1
- @use '@angular/material' as mat;
2
- @use '../utils/functions' as button-functions;
3
- @use '../../../utils/functions' as utils-functions;
4
- @use '../common-selectors';
1
+ @use '../utils/connected-corners';
5
2
 
6
- @mixin mat-exp-split-button-connected-xl-corners($host-selector) {
7
- #{$host-selector}[data-size='xl'] {
8
- > :first-child {
9
- @include mat.button-overrides(
10
- button-functions.button-shape-tokens-raw(
11
- utils-functions.rem(68) utils-functions.rem(12) utils-functions.rem(12)
12
- utils-functions.rem(68)
13
- )
14
- );
15
- @include mat.icon-button-overrides(
16
- button-functions.icon-button-shape-tokens-raw(
17
- utils-functions.rem(68) utils-functions.rem(12) utils-functions.rem(12)
18
- utils-functions.rem(68)
19
- )
20
- );
21
-
22
- &[data-appearance='outlined']:active {
23
- @each $selector in common-selectors.$icon-button-only-ripple-selectors {
24
- #{$selector} {
25
- border-radius: inherit;
26
- }
27
- }
28
- }
29
- }
30
-
31
- > :last-child {
32
- @include mat.button-overrides(
33
- button-functions.button-shape-tokens-raw(
34
- utils-functions.rem(12) utils-functions.rem(68) utils-functions.rem(68)
35
- utils-functions.rem(12)
36
- )
37
- );
38
- @include mat.icon-button-overrides(
39
- button-functions.icon-button-shape-tokens-raw(
40
- utils-functions.rem(12) utils-functions.rem(68) utils-functions.rem(68)
41
- utils-functions.rem(12)
42
- )
43
- );
44
-
45
- &[data-appearance='outlined']:active {
46
- @each $selector in common-selectors.$icon-button-only-ripple-selectors {
47
- #{$selector} {
48
- border-radius: inherit;
49
- }
50
- }
51
- }
52
- }
53
-
54
- > :last-child[data-menu-open='true'] {
55
- @include mat.button-overrides(button-functions.button-shape-tokens(68));
56
- @include mat.icon-button-overrides(button-functions.icon-button-shape-tokens(68));
57
- }
58
- }
3
+ @mixin mat-exp-split-button-connected-xl-corners($host-selector, $skip-properties: false) {
4
+ @include connected-corners.split(
5
+ $host-selector,
6
+ 'xl',
7
+ 136,
8
+ 12,
9
+ 20,
10
+ 50,
11
+ 136,
12
+ 6,
13
+ 64,
14
+ 64,
15
+ $skip-properties
16
+ );
59
17
  }
@@ -1,60 +1,17 @@
1
- @use '@angular/material' as mat;
2
- @use '../utils/functions' as button-functions;
3
- @use '../../../utils/functions' as utils-functions;
4
- @use 'sass:map';
5
- @use '../common-selectors';
1
+ @use '../utils/connected-corners';
6
2
 
7
- @mixin mat-exp-split-button-connected-xs-corners($host-selector) {
8
- #{$host-selector}[data-size='xs'] {
9
- > :first-child {
10
- @include mat.button-overrides(
11
- button-functions.button-shape-tokens-raw(
12
- utils-functions.rem(16) utils-functions.rem(4) utils-functions.rem(4)
13
- utils-functions.rem(16)
14
- )
15
- );
16
- @include mat.icon-button-overrides(
17
- button-functions.icon-button-shape-tokens-raw(
18
- utils-functions.rem(16) utils-functions.rem(4) utils-functions.rem(4)
19
- utils-functions.rem(16)
20
- )
21
- );
22
-
23
- &:active {
24
- @each $selector in common-selectors.$icon-button-ripple-selectors {
25
- #{$selector} {
26
- border-radius: inherit !important;
27
- }
28
- }
29
- }
30
- }
31
-
32
- > :last-child {
33
- @include mat.button-overrides(
34
- button-functions.button-shape-tokens-raw(
35
- utils-functions.rem(4) utils-functions.rem(16) utils-functions.rem(16)
36
- utils-functions.rem(4)
37
- )
38
- );
39
- @include mat.icon-button-overrides(
40
- button-functions.icon-button-shape-tokens-raw(
41
- utils-functions.rem(4) utils-functions.rem(16) utils-functions.rem(16)
42
- utils-functions.rem(4)
43
- )
44
- );
45
-
46
- &[data-appearance='outlined']:active {
47
- @each $selector in common-selectors.$icon-button-only-ripple-selectors {
48
- #{$selector} {
49
- border-radius: inherit;
50
- }
51
- }
52
- }
53
- }
54
-
55
- > :last-child[data-menu-open='true'] {
56
- @include mat.button-overrides(button-functions.button-shape-tokens(16));
57
- @include mat.icon-button-overrides(button-functions.icon-button-shape-tokens(16));
58
- }
59
- }
3
+ @mixin mat-exp-split-button-connected-xs-corners($host-selector, $skip-properties: false) {
4
+ @include connected-corners.split(
5
+ $host-selector,
6
+ 'xs',
7
+ 32,
8
+ 4,
9
+ 8,
10
+ 22,
11
+ 48,
12
+ 1,
13
+ 12,
14
+ 10,
15
+ $skip-properties
16
+ );
60
17
  }
@@ -1,3 +1,4 @@
1
+ @use '../utils/elevated-icon';
1
2
  @use './config';
2
3
  @use './connected-xs-corners';
3
4
  @use './connected-s-corners';
@@ -7,6 +8,7 @@
7
8
  @use '../../../utils/functions';
8
9
  @use '../../../utils/mixins';
9
10
  @use 'sass:map';
11
+ @use '@angular/material' as mat;
10
12
 
11
13
  $_mat-exp-split-button-class: 'mat-exp-split-button';
12
14
 
@@ -88,27 +90,36 @@ $_mat-exp-split-button-class: 'mat-exp-split-button';
88
90
  // gated on the same `sizes` option directly rather than via filter-config().
89
91
  @if functions.size-included('xs', $sizes) {
90
92
  @include connected-xs-corners.mat-exp-split-button-connected-xs-corners(
91
- $mat-exp-split-button-class
93
+ $mat-exp-split-button-class,
94
+ $skip-html-element-styles
92
95
  );
93
96
  }
94
97
  @if functions.size-included('s', $sizes) {
95
98
  @include connected-s-corners.mat-exp-split-button-connected-s-corners(
96
- $mat-exp-split-button-class
99
+ $mat-exp-split-button-class,
100
+ $skip-html-element-styles
97
101
  );
98
102
  }
99
103
  @if functions.size-included('m', $sizes) {
100
104
  @include connected-m-corners.mat-exp-split-button-connected-m-corners(
101
- $mat-exp-split-button-class
105
+ $mat-exp-split-button-class,
106
+ $skip-html-element-styles
102
107
  );
103
108
  }
104
109
  @if functions.size-included('l', $sizes) {
105
110
  @include connected-l-corners.mat-exp-split-button-connected-l-corners(
106
- $mat-exp-split-button-class
111
+ $mat-exp-split-button-class,
112
+ $skip-html-element-styles
107
113
  );
108
114
  }
109
115
  @if functions.size-included('xl', $sizes) {
110
116
  @include connected-xl-corners.mat-exp-split-button-connected-xl-corners(
111
- $mat-exp-split-button-class
117
+ $mat-exp-split-button-class,
118
+ $skip-html-element-styles
112
119
  );
113
120
  }
121
+ @include elevated-icon.styles(
122
+ "#{$mat-exp-split-button-class}[data-appearance='elevated'] > .mat-exp-icon-button",
123
+ $skip-html-element-styles
124
+ );
114
125
  }
@@ -0,0 +1,146 @@
1
+ @use '@angular/material' as mat;
2
+ @use 'sass:math';
3
+ @use './functions' as button-functions;
4
+ @use '../../../utils/functions' as functions;
5
+
6
+ @mixin _shape($shape) {
7
+ @include mat.button-overrides(button-functions.button-shape-tokens-raw($shape));
8
+ @include mat.icon-button-overrides(button-functions.icon-button-shape-tokens-raw($shape));
9
+ }
10
+
11
+ @mixin _end-shape($outer, $inner, $first) {
12
+ @if $first {
13
+ @include _shape($outer $inner $inner $outer);
14
+ &:dir(rtl) {
15
+ @include _shape($inner $outer $outer $inner);
16
+ }
17
+ } @else {
18
+ @include _shape($inner $outer $outer $inner);
19
+ &:dir(rtl) {
20
+ @include _shape($outer $inner $inner $outer);
21
+ }
22
+ }
23
+ }
24
+
25
+ // One implementation for all five sizes; wrappers contain only source-token values.
26
+ @mixin group($selector, $size, $height, $inner, $pressed) {
27
+ $outer: functions.rem(math.div($height, 2));
28
+ $inner: functions.rem($inner);
29
+ $pressed: functions.rem($pressed);
30
+ #{$selector}[data-variant='connected'][data-size='#{$size}'] {
31
+ @each $shape, $outside in (round: $outer, square: $inner) {
32
+ &[data-shape='#{$shape}'] {
33
+ > :first-child:not([data-toggle='selected']) {
34
+ @include _end-shape($outside, $inner, true);
35
+ }
36
+ > :last-child:not([data-toggle='selected']) {
37
+ @include _end-shape($outside, $inner, false);
38
+ }
39
+ > :not(:first-child):not(:last-child):not([data-toggle='selected']) {
40
+ @include _shape($inner);
41
+ }
42
+ > [data-toggle='selected'] {
43
+ @include _shape($outer);
44
+ }
45
+ > :not([disabled]):not(.mat-mdc-button-disabled):is(:active, [data-state='pressed']) {
46
+ @include _shape($pressed);
47
+ &:first-child {
48
+ @include _end-shape($outside, $pressed, true);
49
+ }
50
+ &:last-child {
51
+ @include _end-shape($outside, $pressed, false);
52
+ }
53
+ }
54
+ > :only-child:not([data-toggle='selected']) {
55
+ @include _shape($outside);
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+
62
+ @mixin split(
63
+ $selector,
64
+ $size,
65
+ $height,
66
+ $inner,
67
+ $interacted,
68
+ $icon,
69
+ $width,
70
+ $offset,
71
+ $leading-start,
72
+ $leading-end,
73
+ $skip-properties: false
74
+ ) {
75
+ $outer: functions.rem(math.div($height, 2));
76
+ $inner: functions.rem($inner);
77
+ $interacted: functions.rem($interacted);
78
+ #{$selector}[data-size='#{$size}'] {
79
+ @if not $skip-properties {
80
+ > .mat-exp-button:first-child {
81
+ padding-inline-start: functions.rem($leading-start);
82
+ padding-inline-end: functions.rem($leading-end);
83
+ }
84
+ > .mat-exp-icon-button.mat-mdc-icon-button:last-child {
85
+ display: inline-flex;
86
+ align-items: center;
87
+ justify-content: center;
88
+ width: functions.rem($width);
89
+ min-width: functions.rem($width);
90
+ padding: 0;
91
+ --_mat-exp-split-icon-offset: #{functions.rem(-$offset)};
92
+ &:dir(rtl) {
93
+ --_mat-exp-split-icon-offset: #{functions.rem($offset)};
94
+ --_mat-exp-split-rotation-direction: -1;
95
+ }
96
+ > :is(
97
+ .mat-icon,
98
+ .material-icons,
99
+ .material-symbols-outlined,
100
+ .material-symbols-rounded,
101
+ .material-symbols-sharp,
102
+ [matButtonIcon]
103
+ ) {
104
+ width: functions.rem($icon);
105
+ height: functions.rem($icon);
106
+ font-size: functions.rem($icon);
107
+ line-height: functions.rem($icon);
108
+ transform: translateX(
109
+ calc(var(--_mat-exp-split-icon-offset) * (1 - var(--_mat-exp-split-icon-progress, 0)))
110
+ )
111
+ rotate(
112
+ calc(
113
+ var(--_mat-exp-split-icon-rotation, 0) *
114
+ var(--_mat-exp-split-rotation-direction, 1) *
115
+ 1deg
116
+ )
117
+ );
118
+ transition: none;
119
+ }
120
+ }
121
+ }
122
+ > :first-child {
123
+ @include _end-shape($outer, $inner, true);
124
+ &:not([disabled]):not(.mat-mdc-button-disabled):is(:hover, :active, [data-state='pressed']) {
125
+ @include _end-shape($outer, $interacted, true);
126
+ }
127
+ }
128
+ > :last-child {
129
+ @include _end-shape($outer, $inner, false);
130
+ &:not([data-menu-open='true']):not([disabled]):not(.mat-mdc-button-disabled):hover {
131
+ @include _end-shape($outer, $interacted, false);
132
+ }
133
+ &[data-menu-open='true'] {
134
+ @include _shape($outer);
135
+ @if not $skip-properties {
136
+ .mat-mdc-button-persistent-ripple::before {
137
+ opacity: 0.1;
138
+ }
139
+ }
140
+ }
141
+ &:not([disabled]):not(.mat-mdc-button-disabled):is(:active, [data-state='pressed']) {
142
+ @include _end-shape($outer, $interacted, false);
143
+ }
144
+ }
145
+ }
146
+ }
@@ -0,0 +1,52 @@
1
+ @use '@angular/material' as mat;
2
+
3
+ // Elevated is a composed group/split appearance, rather than a standalone
4
+ // icon-button appearance. Keep the native icon button's behavior and state layer.
5
+ @mixin styles($selector, $skip-properties: false, $toggle: false) {
6
+ #{$selector} {
7
+ @include mat.icon-button-overrides(
8
+ (
9
+ icon-color: var(--mat-sys-primary),
10
+ state-layer-color: currentColor,
11
+ )
12
+ );
13
+ @if not $skip-properties {
14
+ background-color: var(--mat-sys-surface-container-low);
15
+ box-shadow: var(--mat-sys-level1);
16
+ &:hover {
17
+ box-shadow: var(--mat-sys-level2);
18
+ }
19
+ &:focus,
20
+ &:active {
21
+ box-shadow: var(--mat-sys-level1);
22
+ }
23
+ @if $toggle {
24
+ &[data-toggle='selected'] {
25
+ @include mat.icon-button-overrides(
26
+ (
27
+ icon-color: var(--mat-sys-on-primary),
28
+ )
29
+ );
30
+ background-color: var(--mat-sys-primary);
31
+ }
32
+ }
33
+ &[disabled],
34
+ &.mat-mdc-button-disabled {
35
+ color: color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent);
36
+ background-color: color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent);
37
+ box-shadow: none;
38
+ }
39
+ @media (forced-colors: active) {
40
+ &[data-toggle='selected'] {
41
+ @include mat.icon-button-overrides(
42
+ (
43
+ icon-color: HighlightText,
44
+ )
45
+ );
46
+ background-color: Highlight;
47
+ color: HighlightText;
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,183 @@
1
+ @use '@angular/material' as mat;
2
+
3
+ /// Expressive appearance for an existing Material autocomplete.
4
+ /// Pass mat-exp-autocomplete-panel via its public class input and put
5
+ /// mat-exp-autocomplete-option on native mat-option elements.
6
+ /// Navigation, selection, and popup lifecycle remain owned by Angular Material.
7
+ @mixin mat-exp-autocomplete-styles() {
8
+ .mat-exp-autocomplete-panel[role='listbox'] {
9
+ --city-surface: var(--mat-exp-menu-container-color, var(--mat-sys-surface-container-low));
10
+ --city-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-surface));
11
+ --city-selected: var(
12
+ --mat-exp-menu-selected-container-color,
13
+ var(--mat-sys-tertiary-container)
14
+ );
15
+ --city-on-selected: var(
16
+ --mat-exp-menu-selected-content-color,
17
+ var(--mat-sys-on-tertiary-container)
18
+ );
19
+ --city-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-surface));
20
+ --city-target: 48px;
21
+
22
+ @include mat.autocomplete-overrides(
23
+ (
24
+ container-shape: var(--mat-exp-menu-container-shape, 16px),
25
+ background-color: var(--city-surface),
26
+ container-elevation-shadow: var(--mat-exp-menu-elevation, var(--mat-sys-level2)),
27
+ )
28
+ );
29
+ @include mat.option-overrides(
30
+ (
31
+ label-text-color: var(--city-label),
32
+ selected-state-label-text-color: var(--city-on-selected),
33
+ selected-state-layer-color: transparent,
34
+ hover-state-layer-color: transparent,
35
+ focus-state-layer-color: transparent,
36
+ label-text-font: var(--mat-exp-menu-label-font, var(--mat-sys-label-large-font, sans-serif)),
37
+ label-text-size: var(--mat-exp-menu-label-size, 14px),
38
+ label-text-weight: var(--mat-exp-menu-label-weight, 500),
39
+ label-text-line-height: var(--mat-exp-menu-label-line-height, 20px),
40
+ label-text-tracking: var(--mat-exp-menu-label-tracking, 0.1px),
41
+ )
42
+ );
43
+
44
+ // Native autocomplete flattens the edge beside its field. This opt-in
45
+ // surface keeps all four corners rounded without targeting private classes.
46
+ border-radius: var(--mat-exp-menu-container-shape, 16px) !important;
47
+ max-block-size: 18rem;
48
+ padding: 2px;
49
+ overflow-y: auto;
50
+ overflow-x: hidden;
51
+ overscroll-behavior: contain;
52
+ scrollbar-gutter: auto;
53
+ scrollbar-width: auto;
54
+ scrollbar-color: var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline)) var(--city-surface);
55
+ clip-path: inset(0 round var(--mat-exp-menu-container-shape, 16px));
56
+
57
+ &.mat-exp-autocomplete-panel-vibrant {
58
+ --city-surface: var(--mat-exp-menu-container-color, var(--mat-sys-tertiary-container));
59
+ --city-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-tertiary-container));
60
+ --city-selected: var(--mat-exp-menu-selected-container-color, var(--mat-sys-tertiary));
61
+ --city-on-selected: var(--mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary));
62
+ --city-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-tertiary-container));
63
+ }
64
+ &.mat-exp-autocomplete-density-1 {
65
+ --city-target: 44px;
66
+ }
67
+ &.mat-exp-autocomplete-density-2 {
68
+ --city-target: 40px;
69
+ }
70
+ &.mat-exp-autocomplete-density-3 {
71
+ --city-target: 36px;
72
+ }
73
+ &.mat-exp-autocomplete-no-motion {
74
+ animation: none;
75
+ }
76
+
77
+ .mat-exp-autocomplete-option {
78
+ --city-row-shape: var(--mat-exp-menu-item-shape, 4px);
79
+ --city-row-state: var(--city-state);
80
+ position: relative;
81
+ isolation: isolate;
82
+ min-block-size: var(--city-target);
83
+ padding-inline: 16px;
84
+ border-radius: var(--city-row-shape);
85
+ background: transparent;
86
+
87
+ &:first-child {
88
+ --city-row-shape: var(--mat-exp-menu-item-outer-shape, 12px)
89
+ var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-shape, 4px)
90
+ var(--mat-exp-menu-item-shape, 4px);
91
+ }
92
+ &:last-child {
93
+ --city-row-shape: var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-shape, 4px)
94
+ var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-outer-shape, 12px);
95
+ }
96
+ &:only-child {
97
+ --city-row-shape: var(--mat-exp-menu-item-outer-shape, 12px);
98
+ }
99
+ &::before,
100
+ &::after {
101
+ content: '';
102
+ position: absolute;
103
+ inset: 2px 0;
104
+ z-index: -1;
105
+ border-radius: var(--city-row-shape);
106
+ pointer-events: none;
107
+ }
108
+ &:not([aria-disabled='true']):hover::after {
109
+ background: color-mix(in srgb, var(--city-row-state) 8%, transparent);
110
+ }
111
+ &:not([aria-disabled='true']).mat-exp-autocomplete-active::after,
112
+ &:not([aria-disabled='true']):active::after {
113
+ background: color-mix(in srgb, var(--city-row-state) 10%, transparent);
114
+ }
115
+ &.mat-exp-autocomplete-selected {
116
+ --city-row-shape: var(--mat-exp-menu-selected-shape, 12px);
117
+ --city-row-state: var(--city-on-selected);
118
+ color: var(--city-on-selected);
119
+ &::before {
120
+ background: var(--city-selected);
121
+ }
122
+ }
123
+ &:not([aria-disabled='true']).mat-exp-autocomplete-active {
124
+ outline: var(--mat-exp-menu-focus-width, 3px) solid
125
+ var(--mat-exp-menu-focus-color, var(--mat-sys-secondary));
126
+ outline-offset: var(--mat-exp-menu-focus-offset, -3px);
127
+ }
128
+ }
129
+ }
130
+
131
+ @supports selector(::-webkit-scrollbar) {
132
+ .mat-exp-autocomplete-panel[role='listbox'] {
133
+ scrollbar-color: auto;
134
+ scrollbar-width: auto;
135
+ }
136
+ }
137
+ .mat-exp-autocomplete-panel::-webkit-scrollbar {
138
+ width: var(--mat-exp-menu-scrollbar-width, 12px);
139
+ }
140
+ .mat-exp-autocomplete-panel::-webkit-scrollbar-button {
141
+ display: none;
142
+ }
143
+ .mat-exp-autocomplete-panel::-webkit-scrollbar-track {
144
+ margin-block: 4px;
145
+ background: var(--city-surface);
146
+ }
147
+ .mat-exp-autocomplete-panel::-webkit-scrollbar-thumb {
148
+ border: 3px solid var(--city-surface);
149
+ border-radius: 12px;
150
+ background: var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline));
151
+ }
152
+ .mat-exp-autocomplete-row {
153
+ display: flex;
154
+ align-items: center;
155
+ justify-content: space-between;
156
+ gap: 12px;
157
+ inline-size: 100%;
158
+ }
159
+ .mat-exp-autocomplete-check {
160
+ inline-size: 20px;
161
+ block-size: 20px;
162
+ font-size: 20px;
163
+ line-height: 20px;
164
+ flex-shrink: 0;
165
+ }
166
+ @media (prefers-reduced-motion: reduce) {
167
+ .mat-exp-autocomplete-panel[role='listbox'] {
168
+ animation: none;
169
+ }
170
+ }
171
+ @media (forced-colors: active) {
172
+ .mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-active {
173
+ outline-color: Highlight;
174
+ }
175
+ .mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-selected {
176
+ color: SelectedItemText;
177
+ &::before {
178
+ background: SelectedItem;
179
+ forced-color-adjust: none;
180
+ }
181
+ }
182
+ }
183
+ }
@@ -8,6 +8,8 @@
8
8
  @include mat.dialog-overrides(
9
9
  (
10
10
  container-color: var(--mat-sys-surface-container-high),
11
+ // Set explicitly: an M2 app theme defines this token as 4px.
12
+ container-shape: var(--mat-sys-corner-extra-large),
11
13
  container-min-width: min(280px, calc(100vw - 32px)),
12
14
  actions-padding: functions.rem(24),
13
15
  content-padding: functions.rem(24),
@@ -18,8 +20,11 @@
18
20
  max-height: calc(100dvh - 48px);
19
21
  }
20
22
 
23
+ // MatExpDialog sets --mat-exp-dialog-adaptive-width from the adaptiveWidth option. The
24
+ // theme's container max-width (560px in M3, 80vw in M2) would clamp it, so replace it here.
21
25
  .mat-exp-dialog-panel.mat-exp-dialog-adaptive {
22
- width: min(560px, calc(100% - 32px));
26
+ width: min(var(--mat-exp-dialog-adaptive-width, 560px), calc(100% - 32px));
27
+ max-width: calc(100% - 32px);
23
28
  }
24
29
 
25
30
  @media (max-width: 599px) {
@@ -0,0 +1,24 @@
1
+ // The state diagrams show a visible outer keyboard-focus indicator. Keep its
2
+ // width/color customizable while retaining a visible system-color ring in HCM.
3
+ @mixin button-focus($selector) {
4
+ #{$selector}:focus-visible {
5
+ outline: var(--mat-exp-button-focus-ring-width, 3px) solid
6
+ var(--mat-exp-button-focus-ring-color, var(--mat-sys-secondary));
7
+ outline-offset: var(--mat-exp-button-focus-ring-offset, 2px);
8
+ }
9
+ #{$selector} .mat-mdc-button-touch-target {
10
+ display: block;
11
+ min-width: 48px;
12
+ min-height: 48px;
13
+ }
14
+ @media (forced-colors: active) {
15
+ #{$selector}:focus-visible {
16
+ outline-color: Highlight;
17
+ }
18
+ #{$selector}[data-toggle='selected'] {
19
+ forced-color-adjust: none;
20
+ background-color: Highlight;
21
+ color: HighlightText;
22
+ }
23
+ }
24
+ }
@@ -1,2 +1,3 @@
1
1
  @forward './apply-tokens-properties';
2
2
  @forward './keyframes';
3
+ @forward './button-focus';