@tiba-spark/client-shared-lib 26.3.0-628 → 26.3.0-628.a11y.13

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 (89) hide show
  1. package/esm2022/libraries/components/cloud-confirm-dialog/cloud-confirm-dialog.component.mjs +3 -3
  2. package/esm2022/libraries/components/common-pages/error-page/error-page.component.mjs +35 -7
  3. package/esm2022/libraries/components/field-label/field-label.component.mjs +39 -6
  4. package/esm2022/libraries/components/field-validations/field-validations.component.mjs +8 -5
  5. package/esm2022/libraries/components/guest-open-ticket-dialog/guest-open-ticket-dialog.component.mjs +2 -2
  6. package/esm2022/libraries/components/intercom/intercom.component.mjs +2 -2
  7. package/esm2022/libraries/components/logo/logo.component.mjs +3 -3
  8. package/esm2022/libraries/components/message-bar/float-message-bar.service.mjs +30 -6
  9. package/esm2022/libraries/components/modal-buttons-wrapper/modal-buttons-wrapper.component.mjs +9 -4
  10. package/esm2022/libraries/components/notification/alert-notification/alert-notification.component.mjs +3 -3
  11. package/esm2022/libraries/components/notification/command-notification/command-notification.component.mjs +3 -3
  12. package/esm2022/libraries/components/notification/notification-type-label/notification-type-label.component.mjs +2 -2
  13. package/esm2022/libraries/components/notification/notification.service.mjs +6 -3
  14. package/esm2022/libraries/components/overlay-loading-container/empty-results/empty-results.component.mjs +3 -3
  15. package/esm2022/libraries/components/overlay-loading-container/error-results/error-results.component.mjs +2 -2
  16. package/esm2022/libraries/components/restart-link/restart-link.component.mjs +2 -2
  17. package/esm2022/libraries/constants/global-constants.mjs +2 -1
  18. package/esm2022/libraries/directives/clear-all-button.directive.mjs +49 -0
  19. package/esm2022/libraries/directives/disabled.directive.mjs +121 -0
  20. package/esm2022/libraries/directives/icon-button.directive.mjs +36 -0
  21. package/esm2022/libraries/directives/index.mjs +4 -1
  22. package/esm2022/libraries/directives/shared-directives.module.mjs +16 -1
  23. package/esm2022/libraries/enums/localization.enum.mjs +45 -5
  24. package/esm2022/libraries/enums/message-bar-duration.enum.mjs +4 -2
  25. package/esm2022/libraries/interfaces/table-column.interface.mjs +1 -1
  26. package/esm2022/libraries/modules/layout/layout.state.mjs +2 -2
  27. package/esm2022/libraries/services/can-deactivate.service.mjs +4 -3
  28. package/esm2022/libraries/services/modal.service.mjs +94 -1
  29. package/esm2022/libraries/utils/error.util.mjs +12 -1
  30. package/fesm2022/tiba-spark-client-shared-lib.mjs +543 -93
  31. package/fesm2022/tiba-spark-client-shared-lib.mjs.map +1 -1
  32. package/libraries/components/common-pages/error-page/error-page.component.d.ts +11 -2
  33. package/libraries/components/common-pages/error-page/error-page.component.d.ts.map +1 -1
  34. package/libraries/components/field-label/field-label.component.d.ts +8 -3
  35. package/libraries/components/field-label/field-label.component.d.ts.map +1 -1
  36. package/libraries/components/field-validations/field-validations.component.d.ts +2 -4
  37. package/libraries/components/field-validations/field-validations.component.d.ts.map +1 -1
  38. package/libraries/components/message-bar/float-message-bar.service.d.ts +2 -0
  39. package/libraries/components/message-bar/float-message-bar.service.d.ts.map +1 -1
  40. package/libraries/components/modal-buttons-wrapper/modal-buttons-wrapper.component.d.ts.map +1 -1
  41. package/libraries/components/notification/alert-notification/alert-notification.component.d.ts.map +1 -1
  42. package/libraries/components/notification/command-notification/command-notification.component.d.ts.map +1 -1
  43. package/libraries/components/notification/notification.service.d.ts.map +1 -1
  44. package/libraries/constants/global-constants.d.ts +1 -0
  45. package/libraries/constants/global-constants.d.ts.map +1 -1
  46. package/libraries/directives/clear-all-button.directive.d.ts +19 -0
  47. package/libraries/directives/clear-all-button.directive.d.ts.map +1 -0
  48. package/libraries/directives/disabled.directive.d.ts +30 -0
  49. package/libraries/directives/disabled.directive.d.ts.map +1 -0
  50. package/libraries/directives/icon-button.directive.d.ts +14 -0
  51. package/libraries/directives/icon-button.directive.d.ts.map +1 -0
  52. package/libraries/directives/index.d.ts +3 -0
  53. package/libraries/directives/index.d.ts.map +1 -1
  54. package/libraries/directives/shared-directives.module.d.ts +7 -4
  55. package/libraries/directives/shared-directives.module.d.ts.map +1 -1
  56. package/libraries/enums/localization.enum.d.ts +44 -4
  57. package/libraries/enums/localization.enum.d.ts.map +1 -1
  58. package/libraries/enums/message-bar-duration.enum.d.ts +3 -1
  59. package/libraries/enums/message-bar-duration.enum.d.ts.map +1 -1
  60. package/libraries/interfaces/table-column.interface.d.ts +1 -0
  61. package/libraries/interfaces/table-column.interface.d.ts.map +1 -1
  62. package/libraries/services/can-deactivate.service.d.ts.map +1 -1
  63. package/libraries/services/modal.service.d.ts +8 -0
  64. package/libraries/services/modal.service.d.ts.map +1 -1
  65. package/libraries/utils/error.util.d.ts +6 -0
  66. package/libraries/utils/error.util.d.ts.map +1 -1
  67. package/package.json +1 -1
  68. package/src/libraries/theme/_calendar.scss +2 -1
  69. package/src/libraries/theme/_card.scss +6 -5
  70. package/src/libraries/theme/_forms.scss +1 -1
  71. package/src/libraries/theme/_mixins.scss +0 -1
  72. package/src/libraries/theme/_modals.scss +25 -3
  73. package/src/libraries/theme/_ngx.scss +0 -1
  74. package/src/libraries/theme/_tables.scss +3 -2
  75. package/src/libraries/theme/_tabs.scss +6 -4
  76. package/src/libraries/theme/_utils.scss +196 -4
  77. package/src/libraries/theme/_variables.scss +42 -10
  78. package/src/libraries/theme/components/_carousel.scss +10 -4
  79. package/src/libraries/theme/components/_tb-search.scss +10 -4
  80. package/src/libraries/theme/mat-components/_mat-checkbox.scss +1 -1
  81. package/src/libraries/theme/mat-components/_mat-date-picker.scss +4 -0
  82. package/src/libraries/theme/mat-components/_mat-input.scss +5 -0
  83. package/src/libraries/theme/mat-components/_mat-menu.scss +42 -16
  84. package/src/libraries/theme/mat-components/_mat-radio-group.scss +5 -0
  85. package/src/libraries/theme/mat-components/_mat-select.scss +35 -9
  86. package/src/libraries/theme/mat-components/_mat-selection-list.scss +2 -3
  87. package/src/libraries/theme/mat-components/_mat-slide-toggle.scss +1 -1
  88. package/src/libraries/theme/mat-components/_mat-step.scss +41 -2
  89. package/src/libraries/theme/theme.scss +119 -0
@@ -172,6 +172,13 @@ mat-form-field.mat-mdc-form-field.tb-mat-select.tb-h-30 {
172
172
  &:focus,
173
173
  &.mat-mdc-option-active {
174
174
  --mat-option-selected-state-layer-color: #{variables.$hover-background};
175
+ // The grey tint alone is too faint to show the focused option.
176
+ box-shadow: inset 2px 0 0 variables.$focus-ring-color;
177
+ }
178
+
179
+ &:focus,
180
+ &.mat-mdc-option-active {
181
+ box-shadow: variables.$option-focus-shadow;
175
182
  }
176
183
 
177
184
  &.mdc-list-item--selected {
@@ -182,6 +189,21 @@ mat-form-field.mat-mdc-form-field.tb-mat-select.tb-h-30 {
182
189
  }
183
190
  }
184
191
 
192
+ // Single choice: light tint plus a blue bar (variables.single-choice-selected).
193
+ &.mdc-list-item--selected:not(.mat-mdc-option-multiple) {
194
+ --mat-option-selected-state-layer-color: #{variables.$active-background};
195
+ box-shadow: variables.$option-selected-shadow;
196
+
197
+ .mdc-list-item__primary-text {
198
+ --mat-option-selected-state-label-text-color: #{variables.$text-color};
199
+ }
200
+
201
+ &:focus,
202
+ &.mat-mdc-option-active {
203
+ box-shadow: variables.$option-selected-focus-shadow;
204
+ }
205
+ }
206
+
185
207
  &.list-option-item {
186
208
  .mdc-list-item__primary-text {
187
209
  --mat-option-selected-state-label-text-color: #{variables.$form-field-placeholder};
@@ -218,7 +240,7 @@ mat-form-field.mat-mdc-form-field.tb-mat-select.tb-h-30 {
218
240
  }
219
241
 
220
242
  &.tb-disable-selected-bg {
221
- mat-option.mat-mdc-option.mdc-list-item--selected {
243
+ mat-option.mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple) {
222
244
  --mat-option-selected-state-layer-color: #{variables.$white-color};
223
245
 
224
246
  &:hover {
@@ -230,9 +252,19 @@ mat-form-field.mat-mdc-form-field.tb-mat-select.tb-h-30 {
230
252
 
231
253
  mat-form-field.mat-mdc-form-field.tb-mat-select.search-parker-type,
232
254
  mat-form-field.mat-mdc-form-field.tb-mat-select.select-input-search-pair {
255
+ // The box is 1px wider so its right border overlaps the paired input's left border; raised when hovered or focused.
256
+ position: relative;
257
+
258
+ &:hover,
259
+ &:focus-within {
260
+ z-index: 1;
261
+ }
262
+
233
263
  .mat-mdc-text-field-wrapper {
234
264
  border-radius: 0;
235
265
  padding: 0;
266
+ // Lets the 1px overlap show; the wrapper clips by default.
267
+ overflow: visible;
236
268
 
237
269
  .mat-mdc-form-field-infix {
238
270
  width: 100%;
@@ -241,14 +273,8 @@ mat-form-field.mat-mdc-form-field.tb-mat-select.select-input-search-pair {
241
273
  .mat-mdc-form-field-flex {
242
274
  height: 30px;
243
275
  border-radius: 4px 0 0 4px;
244
-
245
- &:not(:hover):not(:focus-within) {
246
- border-right: 0;
247
-
248
- mat-select.mat-mdc-select .mat-mdc-select-trigger {
249
- padding-right: 11px;
250
- }
251
- }
276
+ flex-shrink: 0;
277
+ width: calc(100% + 1px);
252
278
 
253
279
  &:focus-within {
254
280
  border-color: variables.$input-border-on-focus;
@@ -17,10 +17,8 @@
17
17
 
18
18
  mat-selection-list.mat-mdc-selection-list.special-days-list {
19
19
  padding: 0;
20
- outline: none;
21
20
 
22
21
  .mat-mdc-list-option {
23
- outline: none;
24
22
  font-size: 13px;
25
23
  height: 40px;
26
24
 
@@ -77,7 +75,8 @@ mat-selection-list.mat-mdc-selection-list[aria-multiselectable="false"] {
77
75
  background: variables.$hover-background;
78
76
  }
79
77
 
78
+ // Single choice: a strong fill, so the selection is not shown by a light tint alone (WCAG 1.4.1).
80
79
  .mat-mdc-list-option[aria-selected="true"] {
81
- background: variables.$active-background;
80
+ @include variables.single-choice-selected;
82
81
  }
83
82
  }
@@ -60,5 +60,5 @@ mat-slide-toggle.mat-mdc-slide-toggle {
60
60
  --mdc-switch-unselected-hover-handle-color: #{variables.$white-color};
61
61
  --mdc-switch-unselected-pressed-handle-color: #{variables.$white-color};
62
62
  --mdc-switch-unselected-focus-handle-color: #{variables.$white-color};
63
- --mdc-switch-unselected-track-color: #{variables.$hover-background};
63
+ --mdc-switch-unselected-track-color: #{variables.$form-field-border};
64
64
  }
@@ -80,7 +80,8 @@ mat-horizontal-stepper.mat-stepper-horizontal {
80
80
  overflow: inherit;
81
81
  max-width: 200px;
82
82
 
83
- &[aria-selected="true"] {
83
+ &[aria-selected="true"],
84
+ &[aria-current="step"] {
84
85
  .mat-step-icon {
85
86
  background-color: variables.$primary-color;
86
87
  box-shadow: 0 0 0 2px variables.$white-color, 0 0 0 3px variables.$primary-color;
@@ -117,6 +118,24 @@ mat-horizontal-stepper.mat-stepper-horizontal {
117
118
  width: min-content;
118
119
  min-width: 100px;
119
120
  min-height: 30px;
121
+
122
+ // Three or more 100px labels overflow a phone-width dialog; let them share the row.
123
+ @media only screen and (max-width: variables.$reflow-max-width) {
124
+ width: auto;
125
+ min-width: 0;
126
+ }
127
+
128
+ // Phone width: the labels run into each other; the dialog title already names the current
129
+ // step, so they are hidden from sight and stay the step names for screen readers.
130
+ @media only screen and (max-width: 640px) {
131
+ position: absolute;
132
+ width: 1px;
133
+ min-height: 0;
134
+ height: 1px;
135
+ overflow: hidden;
136
+ clip-path: inset(50%);
137
+ white-space: nowrap;
138
+ }
120
139
  }
121
140
  }
122
141
 
@@ -138,6 +157,11 @@ mat-horizontal-stepper.mat-stepper-horizontal {
138
157
  display: flex;
139
158
  flex-direction: column;
140
159
  flex: 1;
160
+ // Material's container clips; a step taller than a short (zoomed) dialog scrolls instead of being cut off.
161
+ // The scroll box clips too, so it keeps the ring room on its left edge.
162
+ overflow-y: auto;
163
+ padding-left: 5px;
164
+ margin-left: -5px;
141
165
 
142
166
  &:not(.mat-horizontal-stepper-content-inactive) {
143
167
  height: 100%;
@@ -178,7 +202,8 @@ tb-tab-icon {
178
202
  background-color: initial;
179
203
  }
180
204
 
181
- &[aria-selected=true] {
205
+ &[aria-selected=true],
206
+ &[aria-current=step] {
182
207
  background-color: variables.$menu-selected-color;
183
208
  }
184
209
 
@@ -236,3 +261,17 @@ tb-tab-icon {
236
261
  .mat-horizontal-content-container {
237
262
  padding: unset;
238
263
  }
264
+
265
+ // These boxes clip; padding offset by a negative margin leaves room for the focus ring of a radio or checkbox
266
+ // at the step's left (and top) edge without moving anything. Never on the right or bottom: there the box
267
+ // would stick out of a scrolling parent and add a scrollbar.
268
+ .mat-stepper-horizontal,
269
+ .mat-horizontal-stepper-wrapper {
270
+ padding-left: 5px;
271
+ margin-left: -5px;
272
+ }
273
+
274
+ .mat-horizontal-content-container.mat-horizontal-content-container {
275
+ padding: 5px 0 0 5px;
276
+ margin: -5px 0 0 -5px;
277
+ }
@@ -11,6 +11,125 @@ body {
11
11
  --mat-sidenav-content-text-color: #{ variables.$text-color};
12
12
  }
13
13
 
14
+ // Text fields show focus with their own border.
15
+ :focus-visible:not(input, textarea) {
16
+ outline: 1px solid variables.$focus-ring-color;
17
+ outline-offset: 2px;
18
+ }
19
+
20
+ // The side menu and tab strip clip outside the element, so draw the ring inside.
21
+ .mat-drawer :focus-visible,
22
+ .mdc-tab:focus-visible {
23
+ outline-offset: -1px;
24
+ }
25
+
26
+ // Dropdowns look like text fields on focus: a 1px blue line over their own border.
27
+ .tb-dropdown-menu-trigger:focus-visible {
28
+ outline-width: 1px;
29
+ outline-offset: -1px;
30
+ }
31
+
32
+ // The select's field border already turns blue on focus.
33
+ .mat-mdc-select:focus-visible {
34
+ outline: none;
35
+ }
36
+
37
+ // Dialog X and minimize: rounded like their hover background, so the focus ring is rounded too.
38
+ .modal-close-icon,
39
+ .modal-minimize-icon {
40
+ border-radius: 4px;
41
+ }
42
+
43
+ // Round ring on icon buttons inside a field (search clear X), inset: the field clips anything outside it.
44
+ .mat-mdc-form-field-icon-suffix [role='button']:focus-visible,
45
+ .mat-mdc-form-field-icon-suffix .mat-mdc-icon-button:focus-visible {
46
+ border-radius: 50%;
47
+ margin: auto 0;
48
+ outline-offset: -2px;
49
+ }
50
+
51
+ // Focused icon buttons get the 1px ring only, not Material's gray focus fill.
52
+ .mat-mdc-icon-button.cdk-keyboard-focused,
53
+ .mat-mdc-icon-button.cdk-program-focused {
54
+ .mat-mdc-button-persistent-ripple::before {
55
+ opacity: 0;
56
+ }
57
+ }
58
+
59
+ // Radios and checkboxes hide their native input; ring the visible circle or box, not the input.
60
+ .mdc-radio__native-control:focus-visible,
61
+ .mdc-checkbox__native-control:focus-visible {
62
+ outline: none;
63
+ }
64
+
65
+ .mdc-radio__native-control:focus-visible ~ .mdc-radio__background,
66
+ .mdc-checkbox__native-control:focus-visible ~ .mdc-checkbox__background {
67
+ outline: 1px solid variables.$focus-ring-color;
68
+ outline-offset: 2px;
69
+ }
70
+
71
+ .mdc-radio__native-control:focus-visible ~ .mdc-radio__background {
72
+ border-radius: 50%;
73
+ // Hugs the radio's own circle: a wider gap read as a second circle around a selected radio.
74
+ outline-offset: 1px;
75
+ }
76
+
77
+ // The ring is drawn by ::after below.
78
+ .mdc-switch:focus-visible {
79
+ outline: none;
80
+ }
81
+
82
+ // The 20px knob overhangs the 15px track; ring it with an even gap around both.
83
+ .mdc-switch:focus-visible::after {
84
+ content: '';
85
+ position: absolute;
86
+ inset: -6px -3px;
87
+ border: 1px solid variables.$focus-ring-color;
88
+ border-radius: 14px;
89
+ pointer-events: none;
90
+ }
91
+
92
+ .mat-drawer .mdc-switch:focus-visible::after {
93
+ border-color: variables.$focus-ring-color-on-dark;
94
+ }
95
+
96
+ // Adjacent tabs (all z-index 1) and joined fields paint over the ring; lift the focused one.
97
+ .mdc-tab:focus-visible,
98
+ .mat-mdc-form-field:has(:focus-visible) {
99
+ z-index: 2;
100
+ }
101
+
102
+ .mat-drawer :focus-visible {
103
+ outline-color: variables.$focus-ring-color-on-dark;
104
+ }
105
+
106
+ // Material sets outline: none on expansion headers; the panel clips, so the ring goes inside.
107
+ .mat-expansion-panel .mat-expansion-panel-header:focus-visible {
108
+ outline: 1px solid variables.$focus-ring-color;
109
+ outline-offset: -1px;
110
+ }
111
+
112
+ // Same for list items (Material sets outline: 0); dropdown options show a bar instead.
113
+ .mat-mdc-list-item.mdc-list-item:focus-visible:not(.list-option-item) {
114
+ outline: 1px solid variables.$focus-ring-color;
115
+ outline-offset: -1px;
116
+ }
117
+
118
+ // Side menu: the row's own children paint over an outline on hover, so draw the ring as an overlay.
119
+ .mat-drawer .mat-expansion-panel .mat-expansion-panel-header:focus-visible,
120
+ .mat-drawer .mat-mdc-list-item.mdc-list-item:focus-visible:not(.list-option-item) {
121
+ outline: none;
122
+
123
+ &::after {
124
+ content: '';
125
+ position: absolute;
126
+ inset: 2px;
127
+ border: 1px solid variables.$focus-ring-color-on-dark;
128
+ pointer-events: none;
129
+ z-index: 1;
130
+ }
131
+ }
132
+
14
133
  /* Override all Material Typography */
15
134
  * {
16
135
  letter-spacing: 0 !important;