@sbb-esta/lyne-elements 1.10.0 → 1.11.1

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 (285) hide show
  1. package/autocomplete/autocomplete.d.ts.map +1 -1
  2. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
  3. package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts +0 -3
  4. package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts.map +1 -1
  5. package/autocomplete-grid/autocomplete-grid-button.js +32 -28
  6. package/autocomplete-grid/autocomplete-grid.js +16 -17
  7. package/autocomplete.js +23 -24
  8. package/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts +0 -1
  9. package/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
  10. package/breadcrumb/breadcrumb-group.js +25 -24
  11. package/button/button/button.d.ts +1 -1
  12. package/button/button-link/button-link.d.ts +1 -1
  13. package/button/button-link.js +14 -14
  14. package/button/button.js +9 -9
  15. package/button/mini-button/mini-button.d.ts +1 -1
  16. package/button/mini-button/mini-button.d.ts.map +1 -1
  17. package/button/mini-button.js +15 -17
  18. package/button/secondary-button/secondary-button.d.ts +1 -1
  19. package/button/secondary-button-link/secondary-button-link.d.ts +1 -1
  20. package/button/secondary-button-link.js +15 -15
  21. package/button/secondary-button.js +6 -6
  22. package/button/tertiary-button/tertiary-button.d.ts +1 -1
  23. package/button/tertiary-button-link/tertiary-button-link.d.ts +1 -1
  24. package/button/tertiary-button-link.js +12 -12
  25. package/button/tertiary-button.js +13 -13
  26. package/button/transparent-button/transparent-button.d.ts +1 -1
  27. package/button/transparent-button-link/transparent-button-link.d.ts +1 -1
  28. package/button/transparent-button-link.js +15 -15
  29. package/button/transparent-button.js +8 -8
  30. package/card/card-badge/card-badge.d.ts.map +1 -1
  31. package/card/card-badge.js +7 -9
  32. package/card/common/card-action-common.d.ts.map +1 -1
  33. package/card/common.js +24 -25
  34. package/container/sticky-bar/sticky-bar.d.ts +0 -1
  35. package/container/sticky-bar/sticky-bar.d.ts.map +1 -1
  36. package/container/sticky-bar.js +20 -20
  37. package/core/a11y/arrow-navigation.d.ts.map +1 -1
  38. package/core/a11y.js +46 -47
  39. package/core/base-elements/action-base-element.d.ts +1 -0
  40. package/core/base-elements/action-base-element.d.ts.map +1 -1
  41. package/core/base-elements/link-base-element.d.ts.map +1 -1
  42. package/core/base-elements.js +52 -49
  43. package/core/controllers/language-controller.d.ts.map +1 -1
  44. package/core/controllers.js +22 -23
  45. package/core/dom/get-document-writing-mode.d.ts +3 -0
  46. package/core/dom/get-document-writing-mode.d.ts.map +1 -1
  47. package/core/mixins/disabled-mixin.d.ts +9 -4
  48. package/core/mixins/disabled-mixin.d.ts.map +1 -1
  49. package/core/mixins.js +68 -58
  50. package/core/observers/intersection-observer.d.ts +6 -0
  51. package/core/observers/intersection-observer.d.ts.map +1 -1
  52. package/core/observers/mutation-observer.d.ts +6 -0
  53. package/core/observers/mutation-observer.d.ts.map +1 -1
  54. package/core/observers/resize-observer.d.ts +6 -0
  55. package/core/observers/resize-observer.d.ts.map +1 -1
  56. package/core/styles/core.scss +23 -0
  57. package/core/styles/mixins/overlay.scss +2 -2
  58. package/core.css +23 -0
  59. package/custom-elements.json +1268 -159
  60. package/datepicker/datepicker/datepicker.d.ts +1 -1
  61. package/datepicker/datepicker/datepicker.d.ts.map +1 -1
  62. package/datepicker/datepicker-toggle/datepicker-toggle.d.ts +0 -2
  63. package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  64. package/datepicker/datepicker-toggle.js +36 -45
  65. package/datepicker/datepicker.js +34 -35
  66. package/development/autocomplete/autocomplete.d.ts.map +1 -1
  67. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
  68. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts +0 -3
  69. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts.map +1 -1
  70. package/development/autocomplete-grid/autocomplete-grid-button.js +17 -15
  71. package/development/autocomplete-grid/autocomplete-grid.js +2 -3
  72. package/development/autocomplete.js +4 -5
  73. package/development/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts +0 -1
  74. package/development/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
  75. package/development/breadcrumb/breadcrumb-group.js +9 -8
  76. package/development/button/button/button.d.ts +1 -1
  77. package/development/button/button-link/button-link.d.ts +1 -1
  78. package/development/button/button-link.js +3 -3
  79. package/development/button/button.js +3 -3
  80. package/development/button/mini-button/mini-button.d.ts +1 -1
  81. package/development/button/mini-button/mini-button.d.ts.map +1 -1
  82. package/development/button/mini-button.js +3 -5
  83. package/development/button/secondary-button/secondary-button.d.ts +1 -1
  84. package/development/button/secondary-button-link/secondary-button-link.d.ts +1 -1
  85. package/development/button/secondary-button-link.js +3 -3
  86. package/development/button/secondary-button.js +3 -3
  87. package/development/button/tertiary-button/tertiary-button.d.ts +1 -1
  88. package/development/button/tertiary-button-link/tertiary-button-link.d.ts +1 -1
  89. package/development/button/tertiary-button-link.js +3 -3
  90. package/development/button/tertiary-button.js +3 -3
  91. package/development/button/transparent-button/transparent-button.d.ts +1 -1
  92. package/development/button/transparent-button-link/transparent-button-link.d.ts +1 -1
  93. package/development/button/transparent-button-link.js +3 -3
  94. package/development/button/transparent-button.js +3 -3
  95. package/development/card/card-badge/card-badge.d.ts.map +1 -1
  96. package/development/card/card-badge.js +3 -5
  97. package/development/card/common/card-action-common.d.ts.map +1 -1
  98. package/development/card/common.js +8 -10
  99. package/development/container/sticky-bar/sticky-bar.d.ts +0 -1
  100. package/development/container/sticky-bar/sticky-bar.d.ts.map +1 -1
  101. package/development/container/sticky-bar.js +8 -9
  102. package/development/core/a11y/arrow-navigation.d.ts.map +1 -1
  103. package/development/core/a11y.js +2 -3
  104. package/development/core/base-elements/action-base-element.d.ts +1 -0
  105. package/development/core/base-elements/action-base-element.d.ts.map +1 -1
  106. package/development/core/base-elements/link-base-element.d.ts.map +1 -1
  107. package/development/core/base-elements.js +7 -4
  108. package/development/core/controllers/language-controller.d.ts.map +1 -1
  109. package/development/core/controllers.js +9 -4
  110. package/development/core/dom/get-document-writing-mode.d.ts +3 -0
  111. package/development/core/dom/get-document-writing-mode.d.ts.map +1 -1
  112. package/development/core/dom.js +1 -1
  113. package/development/core/mixins/disabled-mixin.d.ts +9 -4
  114. package/development/core/mixins/disabled-mixin.d.ts.map +1 -1
  115. package/development/core/mixins.js +25 -9
  116. package/development/core/observers/intersection-observer.d.ts +6 -0
  117. package/development/core/observers/intersection-observer.d.ts.map +1 -1
  118. package/development/core/observers/mutation-observer.d.ts +6 -0
  119. package/development/core/observers/mutation-observer.d.ts.map +1 -1
  120. package/development/core/observers/resize-observer.d.ts +6 -0
  121. package/development/core/observers/resize-observer.d.ts.map +1 -1
  122. package/development/core/observers.js +1 -1
  123. package/development/datepicker/datepicker/datepicker.d.ts +1 -1
  124. package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
  125. package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts +0 -2
  126. package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  127. package/development/datepicker/datepicker-toggle.js +2 -12
  128. package/development/datepicker/datepicker.js +6 -7
  129. package/development/dialog/dialog/dialog.d.ts +0 -1
  130. package/development/dialog/dialog/dialog.d.ts.map +1 -1
  131. package/development/dialog/dialog.js +10 -10
  132. package/development/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts +1 -1
  133. package/development/expansion-panel/expansion-panel-header.js +3 -3
  134. package/development/flip-card/flip-card-details/flip-card-details.d.ts +2 -5
  135. package/development/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
  136. package/development/flip-card/flip-card-details.js +10 -22
  137. package/development/form-field/form-field/form-field.d.ts.map +1 -1
  138. package/development/form-field/form-field.js +11 -12
  139. package/development/header/common.js +42 -21
  140. package/development/header/header/header.d.ts +2 -0
  141. package/development/header/header/header.d.ts.map +1 -1
  142. package/development/header/header.js +12 -1
  143. package/development/journey-header/journey-header.d.ts.map +1 -1
  144. package/development/journey-header.js +3 -4
  145. package/development/link/block-link-button/block-link-button.d.ts +1 -1
  146. package/development/link/block-link-button.js +3 -3
  147. package/development/link/link-button/link-button.d.ts +1 -1
  148. package/development/link/link-button.js +3 -3
  149. package/development/logo.js +2 -4
  150. package/development/map-container/map-container.d.ts +8 -5
  151. package/development/map-container/map-container.d.ts.map +1 -1
  152. package/development/map-container.js +31 -34
  153. package/development/menu/common/menu-action-common.d.ts +1 -2
  154. package/development/menu/common/menu-action-common.d.ts.map +1 -1
  155. package/development/menu/common.js +1 -1
  156. package/development/menu/menu/menu.d.ts.map +1 -1
  157. package/development/menu/menu-button/menu-button.d.ts +1 -1
  158. package/development/menu/menu-button.js +3 -3
  159. package/development/menu/menu-link/menu-link.d.ts +1 -1
  160. package/development/menu/menu-link/menu-link.d.ts.map +1 -1
  161. package/development/menu/menu-link.js +5 -2
  162. package/development/menu/menu.js +4 -2
  163. package/development/navigation/navigation/navigation.d.ts +1 -1
  164. package/development/navigation/navigation/navigation.d.ts.map +1 -1
  165. package/development/navigation/navigation-marker/navigation-marker.d.ts +1 -2
  166. package/development/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
  167. package/development/navigation/navigation-marker.js +8 -15
  168. package/development/navigation/navigation.js +13 -10
  169. package/development/notification/notification.d.ts +0 -1
  170. package/development/notification/notification.d.ts.map +1 -1
  171. package/development/notification.js +11 -13
  172. package/development/option/optgroup/optgroup-base-element.d.ts +0 -2
  173. package/development/option/optgroup/optgroup-base-element.d.ts.map +1 -1
  174. package/development/option/optgroup.js +9 -14
  175. package/development/option/option/option-base-element.d.ts +0 -3
  176. package/development/option/option/option-base-element.d.ts.map +1 -1
  177. package/development/option/option.js +6 -10
  178. package/development/popover/popover-trigger/popover-trigger.d.ts +1 -1
  179. package/development/popover/popover-trigger.js +3 -3
  180. package/development/select/select.d.ts.map +1 -1
  181. package/development/select.js +4 -5
  182. package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
  183. package/development/selection-expansion-panel.js +10 -9
  184. package/development/signet/signet.d.ts +4 -1
  185. package/development/signet/signet.d.ts.map +1 -1
  186. package/development/signet.js +37 -8
  187. package/development/slider/slider.d.ts.map +1 -1
  188. package/development/slider.js +12 -10
  189. package/development/stepper/step/step.d.ts +1 -2
  190. package/development/stepper/step/step.d.ts.map +1 -1
  191. package/development/stepper/step.js +9 -14
  192. package/development/table/table-wrapper/table-wrapper.d.ts +0 -1
  193. package/development/table/table-wrapper/table-wrapper.d.ts.map +1 -1
  194. package/development/table/table-wrapper.js +7 -7
  195. package/development/tabs/tab-group/tab-group.d.ts +0 -1
  196. package/development/tabs/tab-group/tab-group.d.ts.map +1 -1
  197. package/development/tabs/tab-group.js +19 -18
  198. package/development/tag/tag/tag.d.ts +1 -1
  199. package/development/tag/tag.js +3 -3
  200. package/development/toggle/toggle/toggle.d.ts +0 -1
  201. package/development/toggle/toggle/toggle.d.ts.map +1 -1
  202. package/development/toggle/toggle-option.js +2 -2
  203. package/development/toggle/toggle.js +7 -7
  204. package/development/train/train-formation/train-formation.d.ts +1 -2
  205. package/development/train/train-formation/train-formation.d.ts.map +1 -1
  206. package/development/train/train-formation.js +10 -8
  207. package/dialog/dialog/dialog.d.ts +0 -1
  208. package/dialog/dialog/dialog.d.ts.map +1 -1
  209. package/dialog/dialog.js +16 -17
  210. package/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts +1 -1
  211. package/expansion-panel/expansion-panel-header.js +1 -1
  212. package/flip-card/flip-card-details/flip-card-details.d.ts +2 -5
  213. package/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
  214. package/flip-card/flip-card-details.js +20 -28
  215. package/form-field/form-field/form-field.d.ts.map +1 -1
  216. package/form-field/form-field.js +26 -27
  217. package/header/common.js +3 -3
  218. package/header/header/header.d.ts +2 -0
  219. package/header/header/header.d.ts.map +1 -1
  220. package/header/header.js +21 -18
  221. package/journey-header/journey-header.d.ts.map +1 -1
  222. package/journey-header.js +14 -15
  223. package/link/block-link-button/block-link-button.d.ts +1 -1
  224. package/link/block-link-button.js +10 -10
  225. package/link/link-button/link-button.d.ts +1 -1
  226. package/link/link-button.js +4 -4
  227. package/logo.js +1 -1
  228. package/map-container/map-container.d.ts +8 -5
  229. package/map-container/map-container.d.ts.map +1 -1
  230. package/map-container.js +35 -37
  231. package/menu/common/menu-action-common.d.ts +1 -2
  232. package/menu/common/menu-action-common.d.ts.map +1 -1
  233. package/menu/menu/menu.d.ts.map +1 -1
  234. package/menu/menu-button/menu-button.d.ts +1 -1
  235. package/menu/menu-button.js +13 -13
  236. package/menu/menu-link/menu-link.d.ts +1 -1
  237. package/menu/menu-link/menu-link.d.ts.map +1 -1
  238. package/menu/menu-link.js +15 -12
  239. package/menu/menu.js +9 -7
  240. package/navigation/navigation/navigation.d.ts +1 -1
  241. package/navigation/navigation/navigation.d.ts.map +1 -1
  242. package/navigation/navigation-marker/navigation-marker.d.ts +1 -2
  243. package/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
  244. package/navigation/navigation-marker.js +17 -22
  245. package/navigation/navigation.js +40 -34
  246. package/notification/notification.d.ts +0 -1
  247. package/notification/notification.d.ts.map +1 -1
  248. package/notification.js +17 -18
  249. package/option/optgroup/optgroup-base-element.d.ts +0 -2
  250. package/option/optgroup/optgroup-base-element.d.ts.map +1 -1
  251. package/option/optgroup.js +31 -33
  252. package/option/option/option-base-element.d.ts +0 -3
  253. package/option/option/option-base-element.d.ts.map +1 -1
  254. package/option/option.js +16 -18
  255. package/package.json +3 -2
  256. package/popover/popover-trigger/popover-trigger.d.ts +1 -1
  257. package/popover/popover-trigger.js +1 -1
  258. package/select/select.d.ts.map +1 -1
  259. package/select.js +14 -15
  260. package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
  261. package/selection-expansion-panel.js +25 -24
  262. package/signet/signet.d.ts +4 -1
  263. package/signet/signet.d.ts.map +1 -1
  264. package/signet.js +34 -23
  265. package/slider/slider.d.ts.map +1 -1
  266. package/slider.js +5 -5
  267. package/standard-theme.css +23 -0
  268. package/stepper/step/step.d.ts +1 -2
  269. package/stepper/step/step.d.ts.map +1 -1
  270. package/stepper/step.js +19 -24
  271. package/table/table-wrapper/table-wrapper.d.ts +0 -1
  272. package/table/table-wrapper/table-wrapper.d.ts.map +1 -1
  273. package/table/table-wrapper.js +19 -18
  274. package/tabs/tab-group/tab-group.d.ts +0 -1
  275. package/tabs/tab-group/tab-group.d.ts.map +1 -1
  276. package/tabs/tab-group.js +37 -33
  277. package/tag/tag/tag.d.ts +1 -1
  278. package/tag/tag.js +19 -19
  279. package/toggle/toggle/toggle.d.ts +0 -1
  280. package/toggle/toggle/toggle.d.ts.map +1 -1
  281. package/toggle/toggle-option.js +1 -1
  282. package/toggle/toggle.js +32 -31
  283. package/train/train-formation/train-formation.d.ts +1 -2
  284. package/train/train-formation/train-formation.d.ts.map +1 -1
  285. package/train/train-formation.js +23 -22
package/core/a11y.js CHANGED
@@ -1,61 +1,60 @@
1
- import { getDocumentWritingMode as _ } from "./dom.js";
2
- import { isServer as w } from "lit";
1
+ import { isServer as _ } from "lit";
3
2
  import { getEventTarget as a } from "./eventing.js";
4
3
  function d() {
5
- return _() === "rtl" ? { prevKey: "ArrowRight", nextKey: "ArrowLeft" } : { prevKey: "ArrowLeft", nextKey: "ArrowRight" };
4
+ return document.documentElement.matches(":dir(rtl)") ? { prevKey: "ArrowRight", nextKey: "ArrowLeft" } : { prevKey: "ArrowLeft", nextKey: "ArrowRight" };
6
5
  }
7
- function R(t) {
6
+ function w(t) {
8
7
  return ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"].includes(t.key);
9
8
  }
10
- function V(t) {
9
+ function O(t) {
11
10
  return t.key === "ArrowUp" || t.key === d().prevKey;
12
11
  }
13
- function W(t) {
12
+ function U(t) {
14
13
  return t.key === "ArrowDown" || t.key === d().nextKey;
15
14
  }
16
- function Y(t) {
17
- return R(t) || ["PageUp", "PageDown", "Home", "End"].includes(t.key);
15
+ function V(t) {
16
+ return w(t) || ["PageUp", "PageDown", "Home", "End"].includes(t.key);
18
17
  }
19
18
  function f(t, e, o) {
20
19
  return (t + o + e) % e;
21
20
  }
22
- function A(t) {
21
+ function R(t) {
23
22
  return t - 1;
24
23
  }
25
24
  const y = 0;
26
- function B(t, e, o) {
25
+ function Y(t, e, o) {
27
26
  const { prevKey: s, nextKey: r } = d();
28
- return t.key === s || t.key === "ArrowUp" ? e < y ? A(o) : f(e, o, -1) : t.key === r || t.key === "ArrowDown" ? e >= o ? y : f(e, o, 1) : e;
27
+ return t.key === s || t.key === "ArrowUp" ? e < y ? R(o) : f(e, o, -1) : t.key === r || t.key === "ArrowDown" ? e >= o ? y : f(e, o, 1) : e;
29
28
  }
30
- function E(t) {
29
+ function A(t) {
31
30
  return t.buttons === 0 || t.detail === 0;
32
31
  }
33
- function M(t) {
32
+ function E(t) {
34
33
  const e = t.touches && t.touches[0] || t.changedTouches && t.changedTouches[0];
35
34
  return !!e && e.identifier === -1 && (e.radiusX == null || e.radiusX === 1) && (e.radiusY == null || e.radiusY === 1);
36
35
  }
37
- const k = 16, v = 17, T = 18, K = 91, L = 224, C = {
38
- ignoreKeys: [T, v, L, K, k]
39
- }, x = 650, l = {
36
+ const M = 16, k = 17, v = 18, T = 91, K = 224, L = {
37
+ ignoreKeys: [v, k, K, T, M]
38
+ }, C = 650, l = {
40
39
  passive: !0,
41
40
  capture: !0
42
41
  };
43
- class F {
42
+ class x {
44
43
  constructor() {
45
44
  this._mostRecentModality = "mouse", this._mostRecentTarget = null, this._options = {
46
- ...C
45
+ ...L
47
46
  }, this._lastTouchMs = 0, this._onKeydown = (e) => {
48
47
  var o, s;
49
48
  (s = (o = this._options) == null ? void 0 : o.ignoreKeys) != null && s.some((r) => r === e.keyCode) || (this._mostRecentModality = "keyboard", this._mostRecentTarget = a(e));
50
49
  }, this._onMousedown = (e) => {
51
- Date.now() - this._lastTouchMs < x || (this._mostRecentModality = E(e) ? "keyboard" : "mouse", this._mostRecentTarget = a(e));
50
+ Date.now() - this._lastTouchMs < C || (this._mostRecentModality = A(e) ? "keyboard" : "mouse", this._mostRecentTarget = a(e));
52
51
  }, this._onTouchstart = (e) => {
53
- if (M(e)) {
52
+ if (E(e)) {
54
53
  this._mostRecentModality = "keyboard", this._mostRecentTarget = a(e);
55
54
  return;
56
55
  }
57
56
  this._lastTouchMs = Date.now(), this._mostRecentModality = "touch", this._mostRecentTarget = a(e);
58
- }, w || (document.addEventListener("keydown", this._onKeydown, l), document.addEventListener("mousedown", this._onMousedown, l), document.addEventListener("touchstart", this._onTouchstart, l));
57
+ }, _ || (document.addEventListener("keydown", this._onKeydown, l), document.addEventListener("mousedown", this._onMousedown, l), document.addEventListener("touchstart", this._onTouchstart, l));
59
58
  }
60
59
  /** The most recently detected input modality. */
61
60
  get mostRecentModality() {
@@ -72,8 +71,8 @@ class F {
72
71
  this._mostRecentModality = "mouse", this._mostRecentTarget = null, this._lastTouchMs = 0;
73
72
  }
74
73
  }
75
- const m = new F();
76
- function X(t) {
74
+ const m = new x();
75
+ function B(t) {
77
76
  if (!t)
78
77
  return;
79
78
  const e = m.mostRecentModality;
@@ -91,7 +90,7 @@ function X(t) {
91
90
  { once: !0 }
92
91
  );
93
92
  }
94
- class j {
93
+ class W {
95
94
  constructor(e) {
96
95
  this._host = e, this._focusinHandler = () => {
97
96
  this._host.toggleAttribute(
@@ -109,10 +108,10 @@ class j {
109
108
  this._host.removeEventListener("focusin", this._focusinHandler), this._host.removeEventListener("focusout", this._focusoutHandler);
110
109
  }
111
110
  }
112
- function S(t) {
111
+ function F(t) {
113
112
  return !!(t.offsetWidth || t.offsetHeight || typeof t.getClientRects == "function" && t.getClientRects().length);
114
113
  }
115
- class D {
114
+ class S {
116
115
  /**
117
116
  * Gets whether an element is visible for the purposes of interactivity.
118
117
  *
@@ -122,15 +121,15 @@ class D {
122
121
  * @returns Whether the element is visible.
123
122
  */
124
123
  isVisible(e) {
125
- return S(e) && getComputedStyle(e).visibility === "visible";
124
+ return F(e) && getComputedStyle(e).visibility === "visible";
126
125
  }
127
126
  }
128
- class I {
127
+ class D {
129
128
  isVisible() {
130
129
  return !0;
131
130
  }
132
131
  }
133
- const H = typeof getComputedStyle > "u" || getComputedStyle(document.documentElement).visibility === "" ? new I() : new D(), N = [
132
+ const I = typeof getComputedStyle > "u" || getComputedStyle(document.documentElement).visibility === "" ? new D() : new S(), H = [
134
133
  "button",
135
134
  "[href]",
136
135
  "input",
@@ -153,7 +152,7 @@ function g(t, e) {
153
152
  );
154
153
  continue;
155
154
  }
156
- if (n.matches(N) && ((e == null ? void 0 : e.includeInvisibleElements) ?? H.isVisible(n)) && o.add(n), e != null && e.findFirstFocusable && o.size > 0)
155
+ if (n.matches(H) && ((e == null ? void 0 : e.includeInvisibleElements) ?? I.isVisible(n)) && o.add(n), e != null && e.findFirstFocusable && o.size > 0)
157
156
  break;
158
157
  if (n.children.length || (i = n.shadowRoot) != null && i.children.length) {
159
158
  const u = Array.from(n.children).length ? Array.from(n.children) : Array.from(n.shadowRoot.children);
@@ -163,14 +162,14 @@ function g(t, e) {
163
162
  }
164
163
  return s(t, e == null ? void 0 : e.filter), [...o];
165
164
  }
166
- function G(t, e) {
165
+ function X(t, e) {
167
166
  const o = g(t, {
168
167
  filter: e,
169
168
  findFirstFocusable: !0
170
169
  });
171
170
  return o.length ? o[0] : null;
172
171
  }
173
- class Q {
172
+ class j {
174
173
  constructor() {
175
174
  this._controller = new AbortController();
176
175
  }
@@ -206,21 +205,21 @@ class Q {
206
205
  }
207
206
  }
208
207
  export {
209
- N as IS_FOCUSABLE_QUERY,
210
- D as InteractivityChecker,
211
- Q as SbbFocusHandler,
212
- j as SbbFocusVisibleWithinController,
213
- G as getFirstFocusableElement,
208
+ H as IS_FOCUSABLE_QUERY,
209
+ S as InteractivityChecker,
210
+ j as SbbFocusHandler,
211
+ W as SbbFocusVisibleWithinController,
212
+ X as getFirstFocusableElement,
214
213
  g as getFocusableElements,
215
- B as getNextElementIndex,
216
- S as hasGeometry,
217
- H as interactivityChecker,
218
- Y as isArrowKeyOrPageKeysPressed,
219
- R as isArrowKeyPressed,
220
- E as isFakeMousedownFromScreenReader,
221
- M as isFakeTouchstartFromScreenReader,
222
- W as isNextArrowKeyPressed,
223
- V as isPreviousArrowKeyPressed,
214
+ Y as getNextElementIndex,
215
+ F as hasGeometry,
216
+ I as interactivityChecker,
217
+ V as isArrowKeyOrPageKeysPressed,
218
+ w as isArrowKeyPressed,
219
+ A as isFakeMousedownFromScreenReader,
220
+ E as isFakeTouchstartFromScreenReader,
221
+ U as isNextArrowKeyPressed,
222
+ O as isPreviousArrowKeyPressed,
224
223
  m as sbbInputModalityDetector,
225
- X as setModalityOnNextFocus
224
+ B as setModalityOnNextFocus
226
225
  };
@@ -1,6 +1,7 @@
1
1
  import { LitElement, TemplateResult } from 'lit';
2
2
  export declare abstract class SbbActionBaseElement extends LitElement {
3
3
  protected get maybeDisabled(): boolean | undefined;
4
+ protected get maybeDisabledInteractive(): boolean | undefined;
4
5
  connectedCallback(): void;
5
6
  protected setupBaseEventHandlers(): void;
6
7
  /** Override this method to render the component template. */
@@ -1 +1 @@
1
- {"version":3,"file":"action-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/action-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAe5D,8BAIsB,oBAAqB,SAAQ,UAAU;IAC3D,SAAS,KAAK,aAAa,IAAI,OAAO,GAAG,SAAS,CAGjD;IAEe,iBAAiB,IAAI,IAAI;IAezC,SAAS,CAAC,sBAAsB,IAAI,IAAI;IAexC,6DAA6D;IAC7D,SAAS,CAAC,cAAc,IAAI,cAAc;IAI1C,wDAAwD;cACrC,MAAM,IAAI,cAAc;CAO5C"}
1
+ {"version":3,"file":"action-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/action-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAgB5D,8BAGsB,oBAAqB,SAAQ,UAAU;IAC3D,SAAS,KAAK,aAAa,IAAI,OAAO,GAAG,SAAS,CAGjD;IAED,SAAS,KAAK,wBAAwB,IAAI,OAAO,GAAG,SAAS,CAE5D;IAEe,iBAAiB,IAAI,IAAI;IAezC,SAAS,CAAC,sBAAsB,IAAI,IAAI;IAexC,6DAA6D;IAC7D,SAAS,CAAC,cAAc,IAAI,cAAc;IAI1C,wDAAwD;cACrC,MAAM,IAAI,cAAc;CAO5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"link-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/link-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAK1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,6BAA6B,CAAC;AAErC,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAErE,uBAAuB;AACvB,8BAGsB,kBAAmB,SAAQ,oBAAoB;IACnE,0CAA0C;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEjC,uCAAuC;IACpB,MAAM,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;IAEpD,wEAAwE;IACrD,GAAG,CAAC,EAAE,MAAM,CAAC;IAEhC,kEAAkE;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEvD,wEAAwE;IACjB,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9F,SAAS,CAAC,QAAQ,wBAAmC;;IASrD,gBAAgB;IACA,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;IAI/D,gBAAgB;IACA,IAAI,IAAI,IAAI;IAI5B,gBAAgB;IACA,KAAK,IAAI,IAAI;IAI7B,OAAO,CAAC,qBAAqB,CAE3B;IAEF,mHAAmH;cAChG,MAAM,IAAI,cAAc;CAoB5C"}
1
+ {"version":3,"file":"link-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/link-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAK1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,6BAA6B,CAAC;AAErC,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAErE,uBAAuB;AACvB,8BAGsB,kBAAmB,SAAQ,oBAAoB;IACnE,0CAA0C;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEjC,uCAAuC;IACpB,MAAM,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;IAEpD,wEAAwE;IACrD,GAAG,CAAC,EAAE,MAAM,CAAC;IAEhC,kEAAkE;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEvD,wEAAwE;IACjB,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9F,SAAS,CAAC,QAAQ,wBAAmC;;IASrD,gBAAgB;IACA,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;IAI/D,gBAAgB;IACA,IAAI,IAAI,IAAI;IAI5B,gBAAgB;IACA,KAAK,IAAI,IAAI;IAI7B,OAAO,CAAC,qBAAqB,CAE3B;IAEF,mHAAmH;cAChG,MAAM,IAAI,cAAc;CAqB5C"}
@@ -1,21 +1,24 @@
1
- import { LitElement as w, html as m, isServer as g, nothing as p } from "lit";
1
+ import { LitElement as w, html as m, isServer as g, nothing as o } from "lit";
2
2
  import { hostAttributes as f } from "./decorators.js";
3
- import { getDocumentWritingMode as C, getLocalName as _ } from "./dom.js";
3
+ import { getLocalName as _ } from "./dom.js";
4
4
  import { property as l } from "lit/decorators.js";
5
- import { isEventPrevented as O, EventEmitter as b } from "./eventing.js";
6
- import { SbbLanguageController as E } from "./controllers.js";
7
- import { i18nTargetOpensInNewWindow as $ } from "./i18n.js";
5
+ import { isEventPrevented as C, EventEmitter as b } from "./eventing.js";
6
+ import { SbbLanguageController as O } from "./controllers.js";
7
+ import { i18nTargetOpensInNewWindow as E } from "./i18n.js";
8
8
  import "../screen-reader-only.js";
9
- var k = Object.defineProperty, A = Object.getOwnPropertyDescriptor, D = (e, t, s, i) => {
10
- for (var r = i > 1 ? void 0 : i ? A(t, s) : t, a = e.length - 1, n; a >= 0; a--)
11
- (n = e[a]) && (r = (i ? n(t, s, r) : n(r)) || r);
12
- return i && r && k(t, s, r), r;
9
+ var $ = Object.defineProperty, D = Object.getOwnPropertyDescriptor, k = (e, t, r, i) => {
10
+ for (var s = i > 1 ? void 0 : i ? D(t, r) : t, a = e.length - 1, n; a >= 0; a--)
11
+ (n = e[a]) && (s = (i ? n(t, r, s) : n(s)) || s);
12
+ return i && s && $(t, r, s), s;
13
13
  };
14
14
  let v = class extends w {
15
15
  get maybeDisabled() {
16
16
  const e = this;
17
17
  return e.disabled || e.formDisabled;
18
18
  }
19
+ get maybeDisabledInteractive() {
20
+ return this.disabledInteractive;
21
+ }
19
22
  connectedCallback() {
20
23
  super.connectedCallback();
21
24
  }
@@ -23,7 +26,7 @@ let v = class extends w {
23
26
  this.addEventListener(
24
27
  "click",
25
28
  (e) => {
26
- this.maybeDisabled && (e.preventDefault(), e.stopImmediatePropagation());
29
+ this.maybeDisabled && !this.maybeDisabledInteractive && (e.preventDefault(), e.stopImmediatePropagation());
27
30
  },
28
31
  // capture is necessary here, as this event handler needs to be executed before any other
29
32
  // in order to stop immediate propagation in the disabled case.
@@ -43,21 +46,20 @@ let v = class extends w {
43
46
  `;
44
47
  }
45
48
  };
46
- v = D([
49
+ v = k([
47
50
  f({
48
- dir: C(),
49
51
  "data-action": ""
50
52
  })
51
53
  ], v);
52
- var P = Object.defineProperty, S = Object.getOwnPropertyDescriptor, u = (e, t, s, i) => {
53
- for (var r = i > 1 ? void 0 : i ? S(t, s) : t, a = e.length - 1, n; a >= 0; a--)
54
- (n = e[a]) && (r = (i ? n(t, s, r) : n(r)) || r);
55
- return i && r && P(t, s, r), r;
54
+ var A = Object.defineProperty, P = Object.getOwnPropertyDescriptor, u = (e, t, r, i) => {
55
+ for (var s = i > 1 ? void 0 : i ? P(t, r) : t, a = e.length - 1, n; a >= 0; a--)
56
+ (n = e[a]) && (s = (i ? n(t, r, s) : n(s)) || s);
57
+ return i && s && A(t, r, s), s;
56
58
  };
57
59
  let h = class extends v {
58
60
  constructor() {
59
61
  if (super(), this.type = "button", this._handleButtonClick = async (e) => {
60
- if (this.type === "button" || await O(e))
62
+ if (this.type === "button" || await C(e))
61
63
  return;
62
64
  const t = this.form ? this.ownerDocument.querySelector(`form#${this.form}`) : this.closest("form");
63
65
  if (t)
@@ -70,7 +72,7 @@ let h = class extends v {
70
72
  }, this._dispatchClickEventOnSpaceKeyup = (e) => {
71
73
  e.key === " " && (this._removeActiveMarker(e), this._dispatchClickEvent(e));
72
74
  }, this._dispatchClickEvent = (e) => {
73
- const { altKey: t, ctrlKey: s, metaKey: i, shiftKey: r } = e;
75
+ const { altKey: t, ctrlKey: r, metaKey: i, shiftKey: s } = e;
74
76
  e.target.dispatchEvent(
75
77
  new PointerEvent("click", {
76
78
  bubbles: !0,
@@ -79,9 +81,9 @@ let h = class extends v {
79
81
  pointerId: -1,
80
82
  pointerType: "",
81
83
  altKey: t,
82
- ctrlKey: s,
84
+ ctrlKey: r,
83
85
  metaKey: i,
84
- shiftKey: r
86
+ shiftKey: s
85
87
  })
86
88
  );
87
89
  }, !g) {
@@ -109,8 +111,8 @@ let h = class extends v {
109
111
  get value() {
110
112
  return this.getAttribute("value") ?? "";
111
113
  }
112
- attributeChangedCallback(e, t, s) {
113
- (!["name", "value"].includes(e) || t !== s) && super.attributeChangedCallback(e, t, s);
114
+ attributeChangedCallback(e, t, r) {
115
+ (!["name", "value"].includes(e) || t !== r) && super.attributeChangedCallback(e, t, r);
114
116
  }
115
117
  };
116
118
  u([
@@ -132,14 +134,14 @@ h = u([
132
134
  "data-button": ""
133
135
  })
134
136
  ], h);
135
- var L = Object.defineProperty, B = Object.getOwnPropertyDescriptor, d = (e, t, s, i) => {
136
- for (var r = i > 1 ? void 0 : i ? B(t, s) : t, a = e.length - 1, n; a >= 0; a--)
137
- (n = e[a]) && (r = (i ? n(t, s, r) : n(r)) || r);
138
- return i && r && L(t, s, r), r;
137
+ var S = Object.defineProperty, L = Object.getOwnPropertyDescriptor, d = (e, t, r, i) => {
138
+ for (var s = i > 1 ? void 0 : i ? L(t, r) : t, a = e.length - 1, n; a >= 0; a--)
139
+ (n = e[a]) && (s = (i ? n(t, r, s) : n(s)) || s);
140
+ return i && s && S(t, r, s), s;
139
141
  };
140
- let c = class extends v {
142
+ let p = class extends v {
141
143
  constructor() {
142
- super(), this.language = new E(this), this._evaluateRelAttribute = () => this.rel ? this.rel : this.target === "_blank" ? "external noopener nofollow" : p, g || this.setupBaseEventHandlers();
144
+ super(), this.language = new O(this), this._evaluateRelAttribute = () => this.rel ? this.rel : this.target === "_blank" ? "external noopener nofollow" : o, g || this.setupBaseEventHandlers();
143
145
  }
144
146
  /** @internal */
145
147
  focus(e) {
@@ -161,52 +163,53 @@ let c = class extends v {
161
163
  return m`
162
164
  <a
163
165
  class="sbb-action-base ${this.localName ?? _(this)}"
164
- href=${this.href || p}
166
+ href=${this.href || o}
165
167
  ?download=${this.download}
166
- target=${this.target || p}
168
+ target=${this.target || o}
167
169
  rel=${this._evaluateRelAttribute()}
168
- aria-label=${this.accessibilityLabel || p}
169
- aria-disabled=${this.maybeDisabled ? "true" : p}
170
+ aria-label=${this.accessibilityLabel || o}
171
+ tabindex=${this.maybeDisabled && !this.maybeDisabledInteractive ? "-1" : o}
172
+ aria-disabled=${this.maybeDisabled ? "true" : o}
170
173
  >
171
174
  ${this.renderTemplate()}
172
175
  ${this.href && this.target === "_blank" ? m`<sbb-screen-reader-only
173
- >. ${$[this.language.current]}</sbb-screen-reader-only
174
- >` : p}
176
+ >. ${E[this.language.current]}</sbb-screen-reader-only
177
+ >` : o}
175
178
  </a>
176
179
  `;
177
180
  }
178
181
  };
179
182
  d([
180
183
  l()
181
- ], c.prototype, "href", 2);
184
+ ], p.prototype, "href", 2);
182
185
  d([
183
186
  l()
184
- ], c.prototype, "target", 2);
187
+ ], p.prototype, "target", 2);
185
188
  d([
186
189
  l()
187
- ], c.prototype, "rel", 2);
190
+ ], p.prototype, "rel", 2);
188
191
  d([
189
192
  l({ type: Boolean })
190
- ], c.prototype, "download", 2);
193
+ ], p.prototype, "download", 2);
191
194
  d([
192
195
  l({ attribute: "accessibility-label" })
193
- ], c.prototype, "accessibilityLabel", 2);
194
- c = d([
196
+ ], p.prototype, "accessibilityLabel", 2);
197
+ p = d([
195
198
  f({
196
199
  "data-link": ""
197
200
  })
198
- ], c);
199
- const o = class o extends w {
201
+ ], p);
202
+ const c = class c extends w {
200
203
  constructor() {
201
204
  super(...arguments), this.willOpen = new b(
202
205
  this,
203
- o.events.willOpen
204
- ), this.didOpen = new b(this, o.events.didOpen), this.willClose = new b(
206
+ c.events.willOpen
207
+ ), this.didOpen = new b(this, c.events.didOpen), this.willClose = new b(
205
208
  this,
206
- o.events.willClose
209
+ c.events.willClose
207
210
  ), this.didClose = new b(
208
211
  this,
209
- o.events.didClose
212
+ c.events.didClose
210
213
  );
211
214
  }
212
215
  /** The state of the component. */
@@ -224,16 +227,16 @@ const o = class o extends w {
224
227
  super.connectedCallback(), this.state || (this.state = "closed");
225
228
  }
226
229
  };
227
- o.events = {
230
+ c.events = {
228
231
  willOpen: "willOpen",
229
232
  didOpen: "didOpen",
230
233
  willClose: "willClose",
231
234
  didClose: "didClose"
232
235
  };
233
- let y = o;
236
+ let y = c;
234
237
  export {
235
238
  v as SbbActionBaseElement,
236
239
  h as SbbButtonBaseElement,
237
- c as SbbLinkBaseElement,
240
+ p as SbbLinkBaseElement,
238
241
  y as SbbOpenCloseBaseElement
239
242
  };
@@ -1 +1 @@
1
- {"version":3,"file":"language-controller.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/controllers/language-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAKrF;;;;;;;GAOG;AACH,qBAAa,qBAAsB,YAAW,kBAAkB;IA0C3C,OAAO,CAAC,KAAK;IAzChC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAQ;IAChD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAA4B;IAErE,gFAAgF;IAChF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAoC;IAEtE,iFAAiF;IACjF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAI9B;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAGrC;IAEF,gCAAgC;IAChC,WAAkB,OAAO,IAAI,MAAM,CAalC;IAED,gCAAgC;IAChC,IAAW,OAAO,IAAI,MAAM,CAE3B;IAED,OAAO,CAAC,iBAAiB,CAAC,CAAS;IACnC,OAAO,CAAC,SAAS,CAAsB;gBAEZ,KAAK,EAAE,sBAAsB;IAIxD,qCAAqC;IAC9B,WAAW,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI;IAOtC,aAAa,IAAI,IAAI;IAcrB,gBAAgB,IAAI,IAAI;IAQ/B,OAAO,CAAC,aAAa;CAMtB"}
1
+ {"version":3,"file":"language-controller.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/controllers/language-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAIrF;;;;;;;GAOG;AACH,qBAAa,qBAAsB,YAAW,kBAAkB;IA4C3C,OAAO,CAAC,KAAK;IA3ChC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAQ;IAChD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAA4B;IAErE,gFAAgF;IAChF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAoC;IAEtE,iFAAiF;IACjF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAMxB;IACT,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAGrC;IAEF,gCAAgC;IAChC,WAAkB,OAAO,IAAI,MAAM,CAalC;IAED,gCAAgC;IAChC,IAAW,OAAO,IAAI,MAAM,CAE3B;IAED,OAAO,CAAC,iBAAiB,CAAC,CAAS;IACnC,OAAO,CAAC,SAAS,CAAsB;gBAEZ,KAAK,EAAE,sBAAsB;IAIxD,qCAAqC;IAC9B,WAAW,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI;IAOtC,aAAa,IAAI,IAAI;IAiBrB,gBAAgB,IAAI,IAAI;IAW/B,OAAO,CAAC,aAAa;CAMtB"}
@@ -1,7 +1,6 @@
1
- import { isServer as c } from "lit";
1
+ import { isServer as n } from "lit";
2
2
  import { readConfig as u } from "./config.js";
3
- import { AgnosticMutationObserver as _ } from "./observers.js";
4
- class C {
3
+ class m {
5
4
  constructor(t) {
6
5
  this._host = t, this._abortController = new AbortController(), this._host.addController(this);
7
6
  }
@@ -17,9 +16,9 @@ class C {
17
16
  (t = this._abortController) == null || t.abort(), this._abortController = void 0;
18
17
  }
19
18
  }
20
- const b = ["script", "head", "template", "style"], f = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set();
21
- class E {
22
- constructor(t, i = f, r = g) {
19
+ const _ = ["script", "head", "template", "style"], b = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set();
20
+ class A {
21
+ constructor(t, i = b, r = f) {
23
22
  var s, o;
24
23
  this._host = t, this._inertElements = i, this._inertOverlays = r, (o = (s = this._host).addController) == null || o.call(s, this);
25
24
  }
@@ -54,7 +53,7 @@ class E {
54
53
  let t = this._currentOverlay();
55
54
  for (; t !== document.documentElement && t !== null; )
56
55
  Array.from(((i = (t == null ? void 0 : t.parentElement) ?? (t == null ? void 0 : t.getRootNode())) == null ? void 0 : i.childNodes) ?? []).filter(
57
- (s) => s !== t && s instanceof window.HTMLElement && !b.includes(s.localName)
56
+ (s) => s !== t && s instanceof window.HTMLElement && !_.includes(s.localName)
58
57
  ).forEach((s) => {
59
58
  this._inertElements.add(s), s.inert || (s.inert = !0, s.toggleAttribute("data-sbb-inert", !0)), s.hasAttribute("aria-hidden") || (s.setAttribute("aria-hidden", "true"), s.toggleAttribute("data-sbb-aria-hidden", !0));
60
59
  }), t = (t == null ? void 0 : t.parentElement) ?? ((r = t == null ? void 0 : t.getRootNode()) == null ? void 0 : r.host) ?? null;
@@ -66,7 +65,7 @@ const e = class e {
66
65
  }
67
66
  /** Get the current language. */
68
67
  static get current() {
69
- const i = ((u().language ?? (c ? e._defaultLanguage : document.documentElement.getAttribute("lang"))) || e._defaultLanguage).split("-")[0];
68
+ const i = ((u().language ?? (n ? e._defaultLanguage : document.documentElement.getAttribute("lang"))) || e._defaultLanguage).split("-")[0];
70
69
  return e._supportedLocales.includes(i) ? i : e._defaultLanguage;
71
70
  }
72
71
  /** Get the current language. */
@@ -78,26 +77,26 @@ const e = class e {
78
77
  return this._handlers.unshift(t), this;
79
78
  }
80
79
  hostConnected() {
81
- e._listeners.size || e._observer.observe(
80
+ n || (e._listeners.size || e._observer.observe(
82
81
  document.documentElement,
83
82
  e._observerConfig
84
- ), e._listeners.add(this), this._previousLanguage !== this.current && this._callHandlers(this._previousLanguage !== void 0);
83
+ ), e._listeners.add(this), this._previousLanguage !== this.current && this._callHandlers(this._previousLanguage !== void 0));
85
84
  }
86
85
  hostDisconnected() {
87
- this._previousLanguage = this.current, e._listeners.delete(this), e._listeners.size || e._observer.disconnect();
86
+ n || (this._previousLanguage = this.current, e._listeners.delete(this), e._listeners.size || e._observer.disconnect());
88
87
  }
89
88
  _callHandlers(t = !0) {
90
89
  this._handlers.forEach((i) => i()), t && this._host.requestUpdate();
91
90
  }
92
91
  };
93
- e._defaultLanguage = "en", e._supportedLocales = ["en", "de", "fr", "it"], e._listeners = /* @__PURE__ */ new Set(), e._observer = new _((t) => {
92
+ e._defaultLanguage = "en", e._supportedLocales = ["en", "de", "fr", "it"], e._listeners = /* @__PURE__ */ new Set(), e._observer = n ? null : new MutationObserver((t) => {
94
93
  t[0].oldValue !== document.documentElement.getAttribute("lang") && e._listeners.forEach((i) => i._callHandlers());
95
94
  }), e._observerConfig = {
96
95
  attributeFilter: ["lang"],
97
96
  attributeOldValue: !0
98
97
  };
99
- let d = e;
100
- class p {
98
+ let c = e;
99
+ class C {
101
100
  constructor(t, i = null) {
102
101
  this._host = t, this._onChangeCallback = i, this.slots = /* @__PURE__ */ new Set(), this._slotchangeHandler = (r) => {
103
102
  this._syncSlots(r.target);
@@ -114,19 +113,19 @@ class p {
114
113
  _syncSlots(...t) {
115
114
  var s;
116
115
  for (const o of t) {
117
- const a = o.name || "unnamed";
118
- o.assignedNodes().some((h) => {
119
- var l;
120
- return "tagName" in h || ((l = h.textContent) == null ? void 0 : l.trim());
121
- }) ? this.slots.add(a) : this.slots.delete(a);
116
+ const h = o.name || "unnamed";
117
+ o.assignedNodes().some((l) => {
118
+ var d;
119
+ return "tagName" in l || ((d = l.textContent) == null ? void 0 : d.trim());
120
+ }) ? this.slots.add(h) : this.slots.delete(h);
122
121
  }
123
122
  const i = this._host.getAttribute("data-slot-names"), r = [...this.slots].sort().join(" ");
124
123
  r ? this._host.getAttribute("data-slot-names") !== r && this._host.setAttribute("data-slot-names", r) : this._host.removeAttribute("data-slot-names"), r !== i && ((s = this._onChangeCallback) == null || s.call(this));
125
124
  }
126
125
  }
127
126
  export {
128
- C as SbbConnectedAbortController,
129
- E as SbbInertController,
130
- d as SbbLanguageController,
131
- p as SbbSlotStateController
127
+ m as SbbConnectedAbortController,
128
+ A as SbbInertController,
129
+ c as SbbLanguageController,
130
+ C as SbbSlotStateController
132
131
  };
@@ -1,2 +1,5 @@
1
+ /**
2
+ * @deprecated use :dir() selector instead
3
+ */
1
4
  export declare const getDocumentWritingMode: () => string;
2
5
  //# sourceMappingURL=get-document-writing-mode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-document-writing-mode.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/dom/get-document-writing-mode.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,QAAO,MAC4B,CAAC"}
1
+ {"version":3,"file":"get-document-writing-mode.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/dom/get-document-writing-mode.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,sBAAsB,QAAO,MAC4B,CAAC"}
@@ -5,17 +5,22 @@ export declare class SbbDisabledMixinType {
5
5
  get disabled(): boolean;
6
6
  protected isDisabledExternally(): boolean;
7
7
  }
8
+ export declare class SbbDisabledInteractiveMixinType {
9
+ disabledInteractive: boolean;
10
+ }
8
11
  /**
9
12
  * Enhance your component with a disabled property.
10
13
  */
11
14
  export declare const SbbDisabledMixin: <T extends AbstractConstructor<LitElement>>(superClass: T) => AbstractConstructor<SbbDisabledMixinType> & T;
12
15
  /**
13
- * @deprecated Will be removed with next major version
16
+ * Enhance your component with a disabled interactive property.
14
17
  */
15
- export declare const SbbDisabledTabIndexActionMixin: <T extends AbstractConstructor<LitElement>>(superClass: T) => AbstractConstructor<SbbDisabledMixinType> & T;
18
+ export declare const SbbDisabledInteractiveMixin: <T extends AbstractConstructor<LitElement & SbbDisabledMixinType>>(superClass: T) => AbstractConstructor<SbbDisabledInteractiveMixinType> & T;
19
+ export declare const SbbDisabledTabIndexActionMixin: <T extends AbstractConstructor<LitElement>>(superClass: T) => AbstractConstructor<SbbDisabledMixinType & SbbDisabledInteractiveMixinType> & T;
16
20
  /**
17
- * Extends `SbbDisabledMixin` with the `aria-disabled` attribute.
18
- * For a11y purposes, keeps the element focusable even when disabled.
21
+ * Extends `SbbDisabledMixin` with the `aria-disabled` attribute.
22
+ * For a11y purposes, keeps the element focusable even when disabled.
23
+ * @deprecated Will be removed with next major version
19
24
  */
20
25
  export declare const SbbFocusableDisabledActionMixin: <T extends AbstractConstructor<LitElement>>(superClass: T) => AbstractConstructor<SbbDisabledMixinType> & T;
21
26
  //# sourceMappingURL=disabled-mixin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"disabled-mixin.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/mixins/disabled-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AAGtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,MAAM,CAAC,OAAO,OAAO,oBAAoB;IACvC,IAAW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE;IACpC,IAAW,QAAQ,IAAI,OAAO,CAAC;IAC/B,SAAS,CAAC,oBAAoB,IAAI,OAAO;CAC1C;AAED;;GAEG;AAEH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,cAC5D,CAAC,KACZ,mBAAmB,CAAC,oBAAoB,CAAC,GAAG,CAwB9C,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,8BAA8B,GAAI,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,cAC1E,CAAC,KACZ,mBAAmB,CAAC,oBAAoB,CAAC,GAAG,CAwB9C,CAAC;AAEF;;;GAGG;AAEH,eAAO,MAAM,+BAA+B,GAAI,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,cAC3E,CAAC,KACZ,mBAAmB,CAAC,oBAAoB,CAAC,GAAG,CAoB9C,CAAC"}
1
+ {"version":3,"file":"disabled-mixin.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/mixins/disabled-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AAGtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,MAAM,CAAC,OAAO,OAAO,oBAAoB;IACvC,IAAW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE;IACpC,IAAW,QAAQ,IAAI,OAAO,CAAC;IAC/B,SAAS,CAAC,oBAAoB,IAAI,OAAO;CAC1C;AAED,MAAM,CAAC,OAAO,OAAO,+BAA+B;IAC3C,mBAAmB,EAAE,OAAO,CAAC;CACrC;AAED;;GAEG;AAEH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,cAC5D,CAAC,KACZ,mBAAmB,CAAC,oBAAoB,CAAC,GAAG,CAwB9C,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,2BAA2B,GACtC,CAAC,SAAS,mBAAmB,CAAC,UAAU,GAAG,oBAAoB,CAAC,cAEpD,CAAC,KACZ,mBAAmB,CAAC,+BAA+B,CAAC,GAAG,CAYzD,CAAC;AAGF,eAAO,MAAM,8BAA8B,GAAI,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,cAC1E,CAAC,KACZ,mBAAmB,CAAC,oBAAoB,GAAG,+BAA+B,CAAC,GAAG,CA6BhF,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,+BAA+B,GAAI,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,cAC3E,CAAC,KACZ,mBAAmB,CAAC,oBAAoB,CAAC,GAAG,CAoB9C,CAAC"}