@lion/ui 0.0.3 → 0.0.5

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 (190) hide show
  1. package/components/calendar/src/LionCalendar.js +10 -4
  2. package/components/combobox/src/LionCombobox.js +6 -4
  3. package/components/core/src/DisabledMixin.js +6 -4
  4. package/components/core/src/DisabledWithTabIndexMixin.js +6 -4
  5. package/components/core/src/SlotMixin.js +180 -42
  6. package/components/core/test/SlotMixin.test.js +341 -138
  7. package/components/core/types/SlotMixinTypes.ts +13 -2
  8. package/components/form-core/src/FormatMixin.js +10 -8
  9. package/components/form-core/src/InteractionStateMixin.js +8 -6
  10. package/components/form-core/src/choice-group/ChoiceInputMixin.js +6 -4
  11. package/components/form-core/src/utils/SyncUpdatableMixin.js +9 -4
  12. package/components/form-core/test/utils/SyncUpdatableMixin.test.js +6 -4
  13. package/components/form-core/test-suites/ValidateMixin.suite.js +1 -1
  14. package/components/form-core/test-suites/form-group/FormGroupMixin.suite.js +2 -2
  15. package/components/input/src/LionInput.js +6 -4
  16. package/components/input-datepicker/src/LionInputDatepicker.js +6 -4
  17. package/components/input-tel/src/LionInputTel.js +7 -22
  18. package/components/input-tel/src/PhoneUtilManager.js +9 -5
  19. package/components/input-tel/src/formatters.js +8 -10
  20. package/components/input-tel/src/parsers.js +3 -4
  21. package/components/input-tel/src/preprocessors.js +2 -4
  22. package/components/input-tel/src/validators.js +4 -6
  23. package/components/input-tel/test/validators.test.js +8 -5
  24. package/components/input-tel-dropdown/src/LionInputTelDropdown.js +41 -32
  25. package/components/input-tel-dropdown/test-suites/LionInputTelDropdown.suite.js +5 -6
  26. package/components/listbox/src/LionOption.js +6 -4
  27. package/components/localize/types/LocalizeMixinTypes.ts +1 -1
  28. package/components/overlays/src/OverlayMixin.js +6 -5
  29. package/components/overlays/src/OverlaysManager.js +21 -4
  30. package/components/overlays/src/globalOverlaysStyle.js +10 -0
  31. package/components/overlays/test/OverlaysManager.test.js +76 -0
  32. package/components/overlays/test-suites/OverlayMixin.suite.js +20 -14
  33. package/components/select-rich/src/LionSelectRich.js +6 -4
  34. package/components/switch/src/LionSwitchButton.js +6 -7
  35. package/custom-elements.json +2002 -291
  36. package/dist-types/components/accordion/src/LionAccordion.d.ts +1 -1
  37. package/dist-types/components/button/src/LionButton.d.ts +1 -1
  38. package/dist-types/components/calendar/src/LionCalendar.d.ts +7 -41
  39. package/dist-types/components/calendar/src/LionCalendar.d.ts.map +1 -1
  40. package/dist-types/components/checkbox-group/src/LionCheckboxGroup.d.ts +1 -1
  41. package/dist-types/components/checkbox-group/src/LionCheckboxIndeterminate.d.ts +0 -4
  42. package/dist-types/components/checkbox-group/src/LionCheckboxIndeterminate.d.ts.map +1 -1
  43. package/dist-types/components/collapsible/src/LionCollapsible.d.ts +1 -1
  44. package/dist-types/components/combobox/src/LionCombobox.d.ts +5 -3
  45. package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
  46. package/dist-types/components/core/src/DisabledMixin.d.ts.map +1 -1
  47. package/dist-types/components/core/src/DisabledWithTabIndexMixin.d.ts.map +1 -1
  48. package/dist-types/components/core/src/SlotMixin.d.ts +3 -1
  49. package/dist-types/components/core/src/SlotMixin.d.ts.map +1 -1
  50. package/dist-types/components/core/test/SlotMixin.test.d.ts +1 -1
  51. package/dist-types/components/core/test/SlotMixin.test.d.ts.map +1 -1
  52. package/dist-types/components/core/types/SlotMixinTypes.d.ts +10 -2
  53. package/dist-types/components/core/types/SlotMixinTypes.d.ts.map +1 -1
  54. package/dist-types/components/dialog/src/LionDialog.d.ts +1 -1
  55. package/dist-types/components/fieldset/src/LionFieldset.d.ts +1 -1
  56. package/dist-types/components/form-core/src/FormatMixin.d.ts.map +1 -1
  57. package/dist-types/components/form-core/src/InteractionStateMixin.d.ts.map +1 -1
  58. package/dist-types/components/form-core/src/LionField.d.ts +1 -1
  59. package/dist-types/components/form-core/src/choice-group/ChoiceInputMixin.d.ts.map +1 -1
  60. package/dist-types/components/form-core/src/utils/SyncUpdatableMixin.d.ts.map +1 -1
  61. package/dist-types/components/form-core/src/validate/LionValidationFeedback.d.ts +1 -1
  62. package/dist-types/components/form-core/test-suites/FormRegistrationMixins.suite.d.ts +1 -1
  63. package/dist-types/components/form-integrations/test/helpers/umbrella-form.d.ts +1 -1
  64. package/dist-types/components/helpers/src/SbActionLogger.d.ts +1 -1
  65. package/dist-types/components/helpers/src/SbLocaleSwitcher.d.ts +1 -1
  66. package/dist-types/components/icon/src/LionIcon.d.ts +1 -1
  67. package/dist-types/components/input/src/LionInput.d.ts +5 -3
  68. package/dist-types/components/input/src/LionInput.d.ts.map +1 -1
  69. package/dist-types/components/input-amount/src/LionInputAmount.d.ts +1 -37
  70. package/dist-types/components/input-amount/src/LionInputAmount.d.ts.map +1 -1
  71. package/dist-types/components/input-date/src/LionInputDate.d.ts +1 -37
  72. package/dist-types/components/input-date/src/LionInputDate.d.ts.map +1 -1
  73. package/dist-types/components/input-datepicker/src/LionCalendarOverlayFrame.d.ts +2 -38
  74. package/dist-types/components/input-datepicker/src/LionCalendarOverlayFrame.d.ts.map +1 -1
  75. package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +0 -5
  76. package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts.map +1 -1
  77. package/dist-types/components/input-email/src/LionInputEmail.d.ts +1 -37
  78. package/dist-types/components/input-email/src/LionInputEmail.d.ts.map +1 -1
  79. package/dist-types/components/input-iban/src/LionInputIban.d.ts +1 -37
  80. package/dist-types/components/input-iban/src/LionInputIban.d.ts.map +1 -1
  81. package/dist-types/components/input-tel/src/LionInputTel.d.ts +3 -63
  82. package/dist-types/components/input-tel/src/LionInputTel.d.ts.map +1 -1
  83. package/dist-types/components/input-tel/src/PhoneUtilManager.d.ts +8 -4
  84. package/dist-types/components/input-tel/src/PhoneUtilManager.d.ts.map +1 -1
  85. package/dist-types/components/input-tel/src/formatters.d.ts +0 -2
  86. package/dist-types/components/input-tel/src/formatters.d.ts.map +1 -1
  87. package/dist-types/components/input-tel/src/parsers.d.ts +0 -2
  88. package/dist-types/components/input-tel/src/parsers.d.ts.map +1 -1
  89. package/dist-types/components/input-tel/src/preprocessors.d.ts +0 -2
  90. package/dist-types/components/input-tel/src/preprocessors.d.ts.map +1 -1
  91. package/dist-types/components/input-tel/src/validators.d.ts +0 -1
  92. package/dist-types/components/input-tel/src/validators.d.ts.map +1 -1
  93. package/dist-types/components/input-tel/test/validators.test.d.ts +1 -1
  94. package/dist-types/components/input-tel/test/validators.test.d.ts.map +1 -1
  95. package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts +20 -16
  96. package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts.map +1 -1
  97. package/dist-types/components/input-tel-dropdown/test-suites/LionInputTelDropdown.suite.d.ts.map +1 -1
  98. package/dist-types/components/listbox/src/LionListbox.d.ts +1 -1
  99. package/dist-types/components/listbox/src/LionOption.d.ts +6 -4
  100. package/dist-types/components/listbox/src/LionOption.d.ts.map +1 -1
  101. package/dist-types/components/listbox/src/LionOptions.d.ts +1 -1
  102. package/dist-types/components/localize/src/LocalizeMixin.d.ts +1 -37
  103. package/dist-types/components/localize/src/LocalizeMixin.d.ts.map +1 -1
  104. package/dist-types/components/localize/types/LocalizeMixinTypes.d.ts +1 -1
  105. package/dist-types/components/localize/types/LocalizeMixinTypes.d.ts.map +1 -1
  106. package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
  107. package/dist-types/components/overlays/src/OverlaysManager.d.ts +4 -0
  108. package/dist-types/components/overlays/src/OverlaysManager.d.ts.map +1 -1
  109. package/dist-types/components/overlays/src/globalOverlaysStyle.d.ts.map +1 -1
  110. package/dist-types/components/overlays/test/OverlaysManager.test.d.ts.map +1 -1
  111. package/dist-types/components/overlays/test-suites/OverlayMixin.suite.d.ts.map +1 -1
  112. package/dist-types/components/pagination/src/LionPagination.d.ts +2 -38
  113. package/dist-types/components/pagination/src/LionPagination.d.ts.map +1 -1
  114. package/dist-types/components/progress-indicator/src/LionProgressIndicator.d.ts +2 -38
  115. package/dist-types/components/progress-indicator/src/LionProgressIndicator.d.ts.map +1 -1
  116. package/dist-types/components/radio-group/src/LionRadioGroup.d.ts +1 -1
  117. package/dist-types/components/select-rich/src/LionSelectRich.d.ts +5 -3
  118. package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
  119. package/dist-types/components/steps/src/LionStep.d.ts +1 -1
  120. package/dist-types/components/steps/src/LionSteps.d.ts +1 -1
  121. package/dist-types/components/switch/src/LionSwitchButton.d.ts +6 -7
  122. package/dist-types/components/switch/src/LionSwitchButton.d.ts.map +1 -1
  123. package/dist-types/components/tabs/src/LionTabs.d.ts +1 -1
  124. package/dist-types/components/tooltip/src/LionTooltip.d.ts +1 -1
  125. package/dist-types/exports/types/core.d.ts +2 -0
  126. package/dist-types/exports/types/core.d.ts.map +1 -0
  127. package/dist-types/exports/types/form-core.d.ts +3 -0
  128. package/dist-types/exports/types/form-core.d.ts.map +1 -0
  129. package/dist-types/exports/types/input-tel-dropdown.d.ts +3 -0
  130. package/dist-types/exports/types/input-tel-dropdown.d.ts.map +1 -0
  131. package/dist-types/exports/types/input-tel.d.ts +2 -0
  132. package/dist-types/exports/types/input-tel.d.ts.map +1 -0
  133. package/dist-types/exports/types/localize.d.ts +4 -0
  134. package/dist-types/exports/types/localize.d.ts.map +1 -0
  135. package/dist-types/exports/types/overlays.d.ts +5 -0
  136. package/dist-types/exports/types/overlays.d.ts.map +1 -0
  137. package/dist-types/tsconfig.tsbuildinfo +1 -1
  138. package/docs/components/checkbox-group/overview.md +2 -2
  139. package/docs/components/collapsible/overview.md +1 -1
  140. package/docs/components/combobox/overview.md +1 -1
  141. package/docs/components/combobox/use-cases.md +1 -1
  142. package/docs/components/dialog/overview.md +1 -1
  143. package/docs/components/fieldset/overview.md +5 -5
  144. package/docs/components/form/overview.md +3 -3
  145. package/docs/components/icon/use-cases.md +1 -1
  146. package/docs/components/input/overview.md +1 -1
  147. package/docs/components/input-amount/overview.md +3 -3
  148. package/docs/components/input-date/overview.md +3 -3
  149. package/docs/components/input-datepicker/overview.md +5 -5
  150. package/docs/components/input-email/overview.md +2 -2
  151. package/docs/components/input-iban/overview.md +2 -2
  152. package/docs/components/input-range/overview.md +2 -2
  153. package/docs/components/input-stepper/overview.md +1 -1
  154. package/docs/components/input-tel/overview.md +1 -1
  155. package/docs/components/input-tel/use-cases.md +6 -6
  156. package/docs/components/input-tel-dropdown/overview.md +1 -1
  157. package/docs/components/radio-group/overview.md +3 -3
  158. package/docs/components/select-rich/use-cases.md +1 -1
  159. package/docs/components/tabs/examples.md +1 -1
  160. package/docs/fundamentals/index.md +4 -4
  161. package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
  162. package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
  163. package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
  164. package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
  165. package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
  166. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  167. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  168. package/docs/fundamentals/systems/core/overview.md +1 -1
  169. package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
  170. package/docs/fundamentals/systems/form/model-value.md +1 -1
  171. package/docs/fundamentals/systems/form/overview.md +28 -28
  172. package/docs/fundamentals/systems/form/validate.md +1 -1
  173. package/docs/fundamentals/systems/localize/overview.md +4 -4
  174. package/docs/fundamentals/systems/overlays/configuration.md +2 -2
  175. package/docs/fundamentals/systems/overlays/overview.md +5 -5
  176. package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
  177. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  178. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  179. package/docs/guides/how-to/create-a-custom-field.md +5 -5
  180. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  181. package/docs/guides/index.md +8 -8
  182. package/docs/guides/principles/index.md +5 -5
  183. package/docs/guides/principles/styling.md +1 -1
  184. package/exports/types/core.ts +1 -0
  185. package/exports/types/form-core.ts +2 -0
  186. package/exports/types/input-tel-dropdown.ts +2 -0
  187. package/exports/types/input-tel.ts +1 -0
  188. package/exports/types/localize.ts +3 -0
  189. package/exports/types/overlays.ts +4 -0
  190. package/package.json +8 -5
@@ -6,7 +6,18 @@
6
6
  import { globalOverlaysStyle } from './globalOverlaysStyle.js';
7
7
  import { setSiblingsInert, unsetSiblingsInert } from './utils/inert-siblings.js';
8
8
 
9
- const isIOS = navigator.userAgent.match(/iPhone|iPad|iPod/i);
9
+ // Export this as protected var, so that we can easily mock it in tests
10
+ // TODO: combine with browserDetection of core?
11
+ export const _browserDetection = {
12
+ isIOS: /iPhone|iPad|iPod/i.test(navigator.userAgent),
13
+ isMacSafari:
14
+ navigator.vendor &&
15
+ navigator.vendor.indexOf('Apple') > -1 &&
16
+ navigator.userAgent &&
17
+ navigator.userAgent.indexOf('CriOS') === -1 &&
18
+ navigator.userAgent.indexOf('FxiOS') === -1 &&
19
+ navigator.appVersion.indexOf('Mac') !== -1,
20
+ };
10
21
 
11
22
  /**
12
23
  * `OverlaysManager` which manages overlays which are rendered into the body
@@ -199,21 +210,27 @@ export class OverlaysManager {
199
210
 
200
211
  // eslint-disable-next-line class-methods-use-this
201
212
  requestToPreventScroll() {
213
+ const { isIOS, isMacSafari } = _browserDetection;
202
214
  // no check as classList will dedupe it anyways
203
215
  document.body.classList.add('global-overlays-scroll-lock');
204
- if (isIOS) {
205
- // iOS has issues with overlays with input fields. This is fixed by applying
216
+ if (isIOS || isMacSafari) {
217
+ // iOS and safar for mac have issues with overlays with input fields. This is fixed by applying
206
218
  // position: fixed to the body. As a side effect, this will scroll the body to the top.
207
219
  document.body.classList.add('global-overlays-scroll-lock-ios-fix');
220
+ }
221
+ if (isIOS) {
208
222
  document.documentElement.classList.add('global-overlays-scroll-lock-ios-fix');
209
223
  }
210
224
  }
211
225
 
212
226
  requestToEnableScroll() {
227
+ const { isIOS, isMacSafari } = _browserDetection;
213
228
  if (!this.shownList.some(ctrl => ctrl.preventsScroll === true)) {
214
229
  document.body.classList.remove('global-overlays-scroll-lock');
215
- if (isIOS) {
230
+ if (isIOS || isMacSafari) {
216
231
  document.body.classList.remove('global-overlays-scroll-lock-ios-fix');
232
+ }
233
+ if (isIOS) {
217
234
  document.documentElement.classList.remove('global-overlays-scroll-lock-ios-fix');
218
235
  }
219
236
  }
@@ -126,4 +126,14 @@ export const globalOverlaysStyle = css`
126
126
  html.global-overlays-scroll-lock-ios-fix {
127
127
  height: 100vh;
128
128
  }
129
+
130
+ @media screen and (prefers-reduced-motion: reduce) {
131
+ .global-overlays .global-overlays__backdrop--animation-in {
132
+ animation: global-overlays-backdrop-fade-in 1ms;
133
+ }
134
+
135
+ .global-overlays .global-overlays__backdrop--animation-out {
136
+ animation: global-overlays-backdrop-fade-out 1ms;
137
+ }
138
+ }
129
139
  `;
@@ -1,6 +1,7 @@
1
1
  import { expect, fixture } from '@open-wc/testing';
2
2
  import { html } from 'lit/static-html.js';
3
3
  import { OverlayController, OverlaysManager } from '@lion/ui/overlays.js';
4
+ import { _browserDetection } from '../src/OverlaysManager.js';
4
5
 
5
6
  /**
6
7
  * @typedef {import('../types/OverlayConfig.js').OverlayConfig} OverlayConfig
@@ -97,4 +98,79 @@ describe('OverlaysManager', () => {
97
98
  await dialog2.hide();
98
99
  expect(mngr.shownList).to.deep.equal([]);
99
100
  });
101
+
102
+ describe('Browser/device edge cases', () => {
103
+ const isIOSOriginal = _browserDetection.isIOS;
104
+ const isMacSafariOriginal = _browserDetection.isMacSafari;
105
+
106
+ function mockIOS() {
107
+ _browserDetection.isIOS = true;
108
+ _browserDetection.isMacSafari = false;
109
+ }
110
+
111
+ function mockMacSafari() {
112
+ // When we are iOS
113
+ _browserDetection.isIOS = false;
114
+ _browserDetection.isMacSafari = true;
115
+ }
116
+
117
+ afterEach(() => {
118
+ // Restore original values
119
+ _browserDetection.isIOS = isIOSOriginal;
120
+ _browserDetection.isMacSafari = isMacSafariOriginal;
121
+ });
122
+
123
+ describe('When initialized with "preventsScroll: true"', () => {
124
+ it('adds class "global-overlays-scroll-lock-ios-fix" to body and html on iOS', async () => {
125
+ mockIOS();
126
+ const dialog = new OverlayController({ ...defaultOptions, preventsScroll: true }, mngr);
127
+ await dialog.show();
128
+ expect(Array.from(document.body.classList)).to.contain(
129
+ 'global-overlays-scroll-lock-ios-fix',
130
+ );
131
+ expect(Array.from(document.documentElement.classList)).to.contain(
132
+ 'global-overlays-scroll-lock-ios-fix',
133
+ );
134
+ await dialog.hide();
135
+ expect(Array.from(document.body.classList)).to.not.contain(
136
+ 'global-overlays-scroll-lock-ios-fix',
137
+ );
138
+ expect(Array.from(document.documentElement.classList)).to.not.contain(
139
+ 'global-overlays-scroll-lock-ios-fix',
140
+ );
141
+
142
+ // When we are not iOS nor MacSafari
143
+ _browserDetection.isIOS = false;
144
+ _browserDetection.isMacSafari = false;
145
+
146
+ const dialog2 = new OverlayController({ ...defaultOptions, preventsScroll: true }, mngr);
147
+ await dialog2.show();
148
+ expect(Array.from(document.body.classList)).to.not.contain(
149
+ 'global-overlays-scroll-lock-ios-fix',
150
+ );
151
+ expect(Array.from(document.documentElement.classList)).to.not.contain(
152
+ 'global-overlays-scroll-lock-ios-fix',
153
+ );
154
+ });
155
+
156
+ it('adds class "global-overlays-scroll-lock-ios-fix" to body on MacSafari', async () => {
157
+ mockMacSafari();
158
+ const dialog = new OverlayController({ ...defaultOptions, preventsScroll: true }, mngr);
159
+ await dialog.show();
160
+ expect(Array.from(document.body.classList)).to.contain(
161
+ 'global-overlays-scroll-lock-ios-fix',
162
+ );
163
+ expect(Array.from(document.documentElement.classList)).to.not.contain(
164
+ 'global-overlays-scroll-lock-ios-fix',
165
+ );
166
+ await dialog.hide();
167
+ expect(Array.from(document.body.classList)).to.not.contain(
168
+ 'global-overlays-scroll-lock-ios-fix',
169
+ );
170
+ expect(Array.from(document.documentElement.classList)).to.not.contain(
171
+ 'global-overlays-scroll-lock-ios-fix',
172
+ );
173
+ });
174
+ });
175
+ });
100
176
  });
@@ -4,6 +4,7 @@ import sinon from 'sinon';
4
4
  import { overlays, OverlayController } from '@lion/ui/overlays.js';
5
5
 
6
6
  import '@lion/ui/define/lion-dialog.js';
7
+ import { _browserDetection } from '../src/OverlaysManager.js';
7
8
 
8
9
  /**
9
10
  * @typedef {import('../types/OverlayConfig.js').OverlayConfig} OverlayConfig
@@ -77,6 +78,7 @@ export function runOverlayMixinSuite({ tagString, tag, suffix = '' }) {
77
78
  expect(el.opened).to.be.false;
78
79
  });
79
80
 
81
+ // TODO: put this tests in OverlayController.test.js instead?
80
82
  it('does not change the body size when opened', async () => {
81
83
  const parentNode = document.createElement('div');
82
84
  parentNode.setAttribute('style', 'height: 10000px; width: 10000px;');
@@ -91,24 +93,28 @@ export function runOverlayMixinSuite({ tagString, tag, suffix = '' }) {
91
93
  { parentNode },
92
94
  )
93
95
  );
94
- const { offsetWidth, offsetHeight } = /** @type {HTMLElement} */ (
95
- elWithBigParent.offsetParent
96
+
97
+ // For now, we skip this test for MacSafari, since the body.global-overlays-scroll-lock-ios-fix
98
+ // class results in a scrollbar when preventsScroll is true.
99
+ // However, fully functioning interacive elements (input fields) in the dialog are more important
100
+ if (_browserDetection.isMacSafari && elWithBigParent._overlayCtrl.preventsScroll) {
101
+ return;
102
+ }
103
+
104
+ const elWithBigParentOffsetParent = /** @type {HTMLElement} */ (
105
+ elWithBigParent?.offsetParent
96
106
  );
107
+
108
+ const { offsetWidth, offsetHeight } = elWithBigParentOffsetParent;
109
+
97
110
  await elWithBigParent._overlayCtrl.show();
111
+
98
112
  expect(elWithBigParent.opened).to.be.true;
99
- expect(/** @type {HTMLElement} */ (elWithBigParent?.offsetParent).offsetWidth).to.equal(
100
- offsetWidth,
101
- );
102
- expect(/** @type {HTMLElement} */ (elWithBigParent?.offsetParent).offsetHeight).to.equal(
103
- offsetHeight,
104
- );
113
+ expect(elWithBigParentOffsetParent.offsetWidth).to.equal(offsetWidth);
114
+ expect(elWithBigParentOffsetParent.offsetHeight).to.equal(offsetHeight);
105
115
  await elWithBigParent._overlayCtrl.hide();
106
- expect(/** @type {HTMLElement} */ (elWithBigParent?.offsetParent).offsetWidth).to.equal(
107
- offsetWidth,
108
- );
109
- expect(/** @type {HTMLElement} */ (elWithBigParent?.offsetParent).offsetHeight).to.equal(
110
- offsetHeight,
111
- );
116
+ expect(elWithBigParentOffsetParent.offsetWidth).to.equal(offsetWidth);
117
+ expect(elWithBigParentOffsetParent.offsetHeight).to.equal(offsetHeight);
112
118
  });
113
119
 
114
120
  it('should respond to initially and dynamically setting the config', async () => {
@@ -156,11 +156,13 @@ export class LionSelectRich extends SlotMixin(ScopedElementsMixin(OverlayMixin(L
156
156
  }
157
157
 
158
158
  /**
159
- * @param {string} name
160
- * @param {unknown} oldValue
159
+ * @param {string} [name]
160
+ * @param {unknown} [oldValue]
161
+ * @param {import('lit').PropertyDeclaration} [options]
162
+ * @returns {void}
161
163
  */
162
- requestUpdate(name, oldValue) {
163
- super.requestUpdate(name, oldValue);
164
+ requestUpdate(name, oldValue, options) {
165
+ super.requestUpdate(name, oldValue, options);
164
166
  if (name === 'interactionMode') {
165
167
  if (this.interactionMode === 'auto') {
166
168
  this.interactionMode = detectInteractionMode();
@@ -151,14 +151,13 @@ export class LionSwitchButton extends DisabledWithTabIndexMixin(LitElement) {
151
151
  }
152
152
 
153
153
  /**
154
- * We synchronously update aria-checked to support voice over on safari.
155
- *
156
- * @param {PropertyKey} name
157
- * @param {?} oldValue
158
- * @override
154
+ * @param {string} [name]
155
+ * @param {unknown} [oldValue]
156
+ * @param {import('lit').PropertyDeclaration} [options]
157
+ * @returns {void}
159
158
  */
160
- requestUpdate(name, oldValue) {
161
- super.requestUpdate(name, oldValue);
159
+ requestUpdate(name, oldValue, options) {
160
+ super.requestUpdate(name, oldValue, options);
162
161
  if (this.isConnected && name === 'checked' && this.checked !== oldValue && !this.disabled) {
163
162
  this.__checkedStateChange();
164
163
  }