@sbb-esta/lyne-elements 0.52.0 → 0.52.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 (220) hide show
  1. package/accordion.js +54 -54
  2. package/action-group.js +3 -3
  3. package/alert/alert-group.js +22 -22
  4. package/alert/alert.js +22 -22
  5. package/autocomplete.js +126 -126
  6. package/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
  7. package/breadcrumb/breadcrumb-group.js +70 -69
  8. package/breadcrumb/breadcrumb.js +17 -17
  9. package/calendar.js +423 -423
  10. package/card/card-badge.js +17 -17
  11. package/card/card.js +2 -2
  12. package/card/common.js +30 -30
  13. package/checkbox/checkbox-group.js +17 -17
  14. package/checkbox/checkbox.js +34 -34
  15. package/clock.js +83 -83
  16. package/container/sticky-bar.js +16 -16
  17. package/core/a11y.js +91 -91
  18. package/core/base-elements.js +87 -88
  19. package/core/controllers.js +40 -40
  20. package/core/datetime.js +34 -36
  21. package/core/dom.js +26 -26
  22. package/core/eventing.js +33 -33
  23. package/core/mixins.js +122 -122
  24. package/core/overlay/overlay.d.ts.map +1 -1
  25. package/core/overlay.js +55 -50
  26. package/core/testing/event-spy.d.ts +1 -1
  27. package/core/testing/wait-for-image-ready.d.ts +4 -0
  28. package/core/testing/wait-for-image-ready.d.ts.map +1 -0
  29. package/core/testing.d.ts +1 -0
  30. package/core/testing.d.ts.map +1 -1
  31. package/core/testing.js +42 -31
  32. package/custom-elements.json +70 -4
  33. package/datepicker/common.js +55 -55
  34. package/datepicker/datepicker-toggle.js +94 -94
  35. package/datepicker/datepicker.js +144 -144
  36. package/development/accordion.js +2 -3
  37. package/development/action-group.js +2 -3
  38. package/development/alert/alert-group.js +2 -3
  39. package/development/alert/alert.js +2 -3
  40. package/development/autocomplete.js +2 -3
  41. package/development/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
  42. package/development/breadcrumb/breadcrumb-group.js +5 -5
  43. package/development/breadcrumb/breadcrumb.js +2 -3
  44. package/development/button/button-link.js +2 -3
  45. package/development/button/button-static.js +2 -3
  46. package/development/button/button.js +2 -3
  47. package/development/button/common.js +2 -3
  48. package/development/button/mini-button.js +2 -3
  49. package/development/button/secondary-button-link.js +2 -3
  50. package/development/button/secondary-button-static.js +2 -3
  51. package/development/button/secondary-button.js +2 -3
  52. package/development/button/tertiary-button-link.js +2 -3
  53. package/development/button/tertiary-button-static.js +2 -3
  54. package/development/button/tertiary-button.js +2 -3
  55. package/development/button/transparent-button-link.js +2 -3
  56. package/development/button/transparent-button-static.js +2 -3
  57. package/development/button/transparent-button.js +2 -3
  58. package/development/calendar.js +2 -3
  59. package/development/card/card-badge.js +2 -3
  60. package/development/card/card-button.js +2 -3
  61. package/development/card/card-link.js +2 -3
  62. package/development/card/card.js +2 -3
  63. package/development/card/common.js +2 -3
  64. package/development/checkbox/checkbox-group.js +2 -3
  65. package/development/checkbox/checkbox.js +2 -3
  66. package/development/chip.js +2 -3
  67. package/development/clock.js +2 -3
  68. package/development/container/container.js +2 -3
  69. package/development/container/sticky-bar.js +2 -3
  70. package/development/core/base-elements.js +4 -7
  71. package/development/core/mixins.js +7 -13
  72. package/development/core/overlay/overlay.d.ts.map +1 -1
  73. package/development/core/overlay.js +9 -3
  74. package/development/core/testing/event-spy.d.ts +1 -1
  75. package/development/core/testing/wait-for-image-ready.d.ts +4 -0
  76. package/development/core/testing/wait-for-image-ready.d.ts.map +1 -0
  77. package/development/core/testing.d.ts +1 -0
  78. package/development/core/testing.d.ts.map +1 -1
  79. package/development/core/testing.js +17 -1
  80. package/development/datepicker/common.js +2 -3
  81. package/development/datepicker/datepicker-next-day.js +2 -3
  82. package/development/datepicker/datepicker-previous-day.js +2 -3
  83. package/development/datepicker/datepicker-toggle.js +2 -3
  84. package/development/datepicker/datepicker.js +2 -3
  85. package/development/dialog/dialog-actions.js +2 -3
  86. package/development/dialog/dialog-content.js +2 -3
  87. package/development/dialog/dialog-title.js +2 -3
  88. package/development/dialog/dialog.js +2 -3
  89. package/development/divider.js +2 -3
  90. package/development/expansion-panel/expansion-panel-content.js +2 -3
  91. package/development/expansion-panel/expansion-panel-header.js +2 -3
  92. package/development/expansion-panel/expansion-panel.js +2 -3
  93. package/development/file-selector.js +2 -3
  94. package/development/footer.js +2 -3
  95. package/development/form-error.js +2 -3
  96. package/development/form-field/form-field-clear.js +2 -3
  97. package/development/form-field/form-field.js +2 -3
  98. package/development/header/common.js +2 -3
  99. package/development/header/header-button.js +2 -3
  100. package/development/header/header-link.js +2 -3
  101. package/development/header/header.js +2 -3
  102. package/development/icon.js +4 -7
  103. package/development/image/image.d.ts +12 -3
  104. package/development/image/image.d.ts.map +1 -1
  105. package/development/image.js +41 -24
  106. package/development/journey-header.js +2 -3
  107. package/development/lead-container.js +2 -3
  108. package/development/link/block-link-button.js +2 -3
  109. package/development/link/block-link-static.js +2 -3
  110. package/development/link/block-link.js +2 -3
  111. package/development/link/common.js +3 -5
  112. package/development/link/link-button.js +2 -3
  113. package/development/link/link-static.js +2 -3
  114. package/development/link/link.js +2 -3
  115. package/development/link-list.js +2 -3
  116. package/development/loading-indicator.js +2 -3
  117. package/development/logo.js +2 -3
  118. package/development/map-container.js +2 -3
  119. package/development/menu/common.js +2 -3
  120. package/development/menu/menu-button.js +2 -3
  121. package/development/menu/menu-link.js +2 -3
  122. package/development/menu/menu.js +2 -3
  123. package/development/message.js +2 -3
  124. package/development/navigation/common.js +2 -3
  125. package/development/navigation/navigation-button.js +2 -3
  126. package/development/navigation/navigation-link.js +2 -3
  127. package/development/navigation/navigation-list.js +2 -3
  128. package/development/navigation/navigation-marker.js +2 -3
  129. package/development/navigation/navigation-section.js +2 -3
  130. package/development/navigation/navigation.js +2 -3
  131. package/development/notification.js +2 -3
  132. package/development/option/optgroup.js +2 -3
  133. package/development/option/option.js +2 -3
  134. package/development/overlay.js +3 -5
  135. package/development/popover/popover-trigger.js +2 -3
  136. package/development/popover/popover.js +2 -3
  137. package/development/radio-button/radio-button-group.js +2 -3
  138. package/development/radio-button/radio-button.js +2 -3
  139. package/development/screen-reader-only.js +2 -3
  140. package/development/select.js +2 -3
  141. package/development/selection-panel.js +2 -3
  142. package/development/signet.js +2 -3
  143. package/development/skiplink-list.js +2 -3
  144. package/development/slider.js +2 -3
  145. package/development/status.js +2 -3
  146. package/development/stepper/step-label.js +2 -3
  147. package/development/stepper/step.js +2 -3
  148. package/development/stepper/stepper/stepper.d.ts +1 -1
  149. package/development/stepper/stepper/stepper.d.ts.map +1 -1
  150. package/development/stepper/stepper.js +5 -6
  151. package/development/tabs/tab-group.js +2 -3
  152. package/development/tabs/tab-title.js +2 -3
  153. package/development/tag/tag-group.js +2 -3
  154. package/development/tag/tag.js +2 -3
  155. package/development/teaser-hero.js +2 -3
  156. package/development/teaser-paid.js +2 -3
  157. package/development/teaser.js +2 -3
  158. package/development/time-input.js +2 -3
  159. package/development/timetable-occupancy-icon.js +2 -3
  160. package/development/timetable-occupancy.js +2 -3
  161. package/development/title.js +3 -5
  162. package/development/toast.js +2 -3
  163. package/development/toggle/toggle-option.js +3 -5
  164. package/development/toggle/toggle.js +2 -3
  165. package/development/toggle-check.js +10 -3
  166. package/development/train/train-blocked-passage.js +2 -3
  167. package/development/train/train-formation.js +2 -3
  168. package/development/train/train-wagon.js +2 -3
  169. package/development/train/train.js +2 -3
  170. package/development/visual-checkbox.js +2 -3
  171. package/dialog/dialog-title.js +20 -20
  172. package/dialog/dialog.js +66 -66
  173. package/expansion-panel/expansion-panel-header.js +20 -20
  174. package/expansion-panel/expansion-panel.js +60 -60
  175. package/file-selector.js +91 -91
  176. package/form-field/form-field-clear.js +12 -12
  177. package/form-field/form-field.js +111 -111
  178. package/header/header.js +53 -53
  179. package/icon.js +107 -107
  180. package/image/image.d.ts +12 -3
  181. package/image/image.d.ts.map +1 -1
  182. package/image.js +118 -105
  183. package/journey-header.js +29 -29
  184. package/map-container.js +23 -23
  185. package/menu/menu.js +91 -91
  186. package/navigation/common.js +16 -16
  187. package/navigation/navigation-marker.js +34 -34
  188. package/navigation/navigation-section.js +83 -83
  189. package/navigation/navigation.js +87 -87
  190. package/notification.js +52 -52
  191. package/option/optgroup.js +45 -45
  192. package/option/option.js +108 -108
  193. package/overlay.js +5 -5
  194. package/package.json +1 -1
  195. package/popover/popover.js +110 -110
  196. package/radio-button/radio-button-group.js +93 -93
  197. package/radio-button/radio-button.js +84 -84
  198. package/select.js +178 -178
  199. package/selection-panel.js +44 -44
  200. package/slider.js +58 -58
  201. package/status.js +6 -6
  202. package/stepper/step-label.js +19 -19
  203. package/stepper/step.js +31 -31
  204. package/stepper/stepper/stepper.d.ts +1 -1
  205. package/stepper/stepper/stepper.d.ts.map +1 -1
  206. package/stepper/stepper.js +48 -48
  207. package/tabs/tab-group.js +67 -67
  208. package/tag/tag-group.js +8 -8
  209. package/tag/tag.js +27 -27
  210. package/teaser-paid.js +12 -12
  211. package/time-input.js +73 -73
  212. package/timetable-occupancy-icon.js +26 -26
  213. package/timetable-occupancy.js +9 -9
  214. package/toast.js +38 -38
  215. package/toggle/toggle-option.js +33 -33
  216. package/toggle/toggle.js +46 -46
  217. package/toggle-check.js +14 -14
  218. package/train/train-formation.js +36 -37
  219. package/train/train-wagon.js +30 -30
  220. package/train/train.js +13 -13
package/core/a11y.js CHANGED
@@ -1,82 +1,82 @@
1
- import { getDocumentWritingMode as _ } from "./dom.js";
2
- import { isServer as w } from "lit";
3
- import { getEventTarget as a } from "./eventing.js";
4
- function d() {
5
- return _() === "rtl" ? { prevKey: "ArrowRight", nextKey: "ArrowLeft" } : { prevKey: "ArrowLeft", nextKey: "ArrowRight" };
1
+ import { getDocumentWritingMode as w } from "./dom.js";
2
+ import { isServer as A } from "lit";
3
+ import { getEventTarget as u } from "./eventing.js";
4
+ function l() {
5
+ return w() === "rtl" ? { prevKey: "ArrowRight", nextKey: "ArrowLeft" } : { prevKey: "ArrowLeft", nextKey: "ArrowRight" };
6
6
  }
7
- function R(t) {
7
+ function E(t) {
8
8
  return ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"].includes(t.key);
9
9
  }
10
- function V(t) {
11
- return t.key === "ArrowUp" || t.key === d().prevKey;
12
- }
13
10
  function W(t) {
14
- return t.key === "ArrowDown" || t.key === d().nextKey;
11
+ return t.key === "ArrowUp" || t.key === l().prevKey;
15
12
  }
16
13
  function Y(t) {
17
- return R(t) || ["PageUp", "PageDown", "Home", "End"].includes(t.key);
14
+ return t.key === "ArrowDown" || t.key === l().nextKey;
15
+ }
16
+ function _(t) {
17
+ return E(t) || ["PageUp", "PageDown", "Home", "End"].includes(t.key);
18
18
  }
19
- function f(t, e, o) {
20
- return (t + o + e) % e;
19
+ function f(t, e, n) {
20
+ return (t + n + e) % e;
21
21
  }
22
- function A(t) {
22
+ function k(t) {
23
23
  return t - 1;
24
24
  }
25
25
  const y = 0;
26
- function B(t, e, o) {
27
- 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;
26
+ function B(t, e, n) {
27
+ const { prevKey: i, nextKey: r } = l();
28
+ return t.key === i || t.key === "ArrowUp" ? e < y ? k(n) : f(e, n, -1) : t.key === r || t.key === "ArrowDown" ? e >= n ? y : f(e, n, 1) : e;
29
29
  }
30
- function E(t) {
30
+ function v(t) {
31
31
  return t.buttons === 0 || t.detail === 0;
32
32
  }
33
- function M(t) {
33
+ function R(t) {
34
34
  const e = t.touches && t.touches[0] || t.changedTouches && t.changedTouches[0];
35
35
  return !!e && e.identifier === -1 && (e.radiusX == null || e.radiusX === 1) && (e.radiusY == null || e.radiusY === 1);
36
36
  }
37
- const k = 16, v = 17, T = 18, K = 91, L = 224, C = {
38
- ignoreKeys: [T, v, L, K, k]
39
- }, x = 650, l = {
37
+ const L = 16, C = 17, K = 18, x = 91, F = 224, M = {
38
+ ignoreKeys: [K, C, F, x, L]
39
+ }, S = 650, d = {
40
40
  passive: !0,
41
41
  capture: !0
42
42
  };
43
- class F {
43
+ class D {
44
44
  constructor() {
45
- this._mostRecentModality = "mouse", this._mostRecentTarget = null, this._options = {
46
- ...C
47
- }, this._lastTouchMs = 0, this._onKeydown = (e) => {
48
- var o, s;
49
- (s = (o = this._options) == null ? void 0 : o.ignoreKeys) != null && s.some((r) => r === e.keyCode) || (this._mostRecentModality = "keyboard", this._mostRecentTarget = a(e));
50
- }, this._onMousedown = (e) => {
51
- Date.now() - this._lastTouchMs < x || (this._mostRecentModality = E(e) ? "keyboard" : "mouse", this._mostRecentTarget = a(e));
52
- }, this._onTouchstart = (e) => {
53
- if (M(e)) {
54
- this._mostRecentModality = "keyboard", this._mostRecentTarget = a(e);
45
+ this.a = "mouse", this.b = null, this.d = {
46
+ ...M
47
+ }, this.c = 0, this.e = (e) => {
48
+ var n, i;
49
+ (i = (n = this.d) == null ? void 0 : n.ignoreKeys) != null && i.some((r) => r === e.keyCode) || (this.a = "keyboard", this.b = u(e));
50
+ }, this.f = (e) => {
51
+ Date.now() - this.c < S || (this.a = v(e) ? "keyboard" : "mouse", this.b = u(e));
52
+ }, this.g = (e) => {
53
+ if (R(e)) {
54
+ this.a = "keyboard", this.b = u(e);
55
55
  return;
56
56
  }
57
- 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
+ this.c = Date.now(), this.a = "touch", this.b = u(e);
58
+ }, A || (document.addEventListener("keydown", this.e, d), document.addEventListener("mousedown", this.f, d), document.addEventListener("touchstart", this.g, d));
59
59
  }
60
60
  /** The most recently detected input modality. */
61
61
  get mostRecentModality() {
62
- return this._mostRecentModality;
62
+ return this.a;
63
63
  }
64
64
  reset() {
65
- this._mostRecentModality = "mouse", this._mostRecentTarget = null, this._lastTouchMs = 0;
65
+ this.a = "mouse", this.b = null, this.c = 0;
66
66
  }
67
67
  /**
68
68
  * The most recently detected input modality event target. Is null if no input modality has been
69
69
  * detected or if the associated event target is null for some unknown reason.
70
70
  */
71
71
  get mostRecentTarget() {
72
- return this._mostRecentTarget;
72
+ return this.b;
73
73
  }
74
74
  }
75
- const m = new F();
75
+ const b = new D();
76
76
  function X(t) {
77
77
  if (!t)
78
78
  return;
79
- const e = m.mostRecentModality;
79
+ const e = b.mostRecentModality;
80
80
  t && e !== null && t.addEventListener(
81
81
  "focus",
82
82
  () => {
@@ -93,26 +93,26 @@ function X(t) {
93
93
  }
94
94
  class j {
95
95
  constructor(e) {
96
- this._host = e, this._focusinHandler = () => {
97
- this._host.toggleAttribute(
96
+ this.a = e, this.b = () => {
97
+ this.a.toggleAttribute(
98
98
  "data-has-visible-focus-within",
99
- m.mostRecentModality === "keyboard"
99
+ b.mostRecentModality === "keyboard"
100
100
  );
101
- }, this._focusoutHandler = () => {
102
- this._host.removeAttribute("data-has-visible-focus-within");
103
- }, this._host.addController(this);
101
+ }, this.c = () => {
102
+ this.a.removeAttribute("data-has-visible-focus-within");
103
+ }, this.a.addController(this);
104
104
  }
105
105
  hostConnected() {
106
- this._host.addEventListener("focusin", this._focusinHandler), this._host.addEventListener("focusout", this._focusoutHandler);
106
+ this.a.addEventListener("focusin", this.b), this.a.addEventListener("focusout", this.c);
107
107
  }
108
108
  hostDisconnected() {
109
- this._host.removeEventListener("focusin", this._focusinHandler), this._host.removeEventListener("focusout", this._focusoutHandler);
109
+ this.a.removeEventListener("focusin", this.b), this.a.removeEventListener("focusout", this.c);
110
110
  }
111
111
  }
112
- function S(t) {
112
+ function I(t) {
113
113
  return !!(t.offsetWidth || t.offsetHeight || typeof t.getClientRects == "function" && t.getClientRects().length);
114
114
  }
115
- class D {
115
+ class N {
116
116
  /**
117
117
  * Gets whether an element is visible for the purposes of interactivity.
118
118
  *
@@ -122,15 +122,15 @@ class D {
122
122
  * @returns Whether the element is visible.
123
123
  */
124
124
  isVisible(e) {
125
- return S(e) && getComputedStyle(e).visibility === "visible";
125
+ return I(e) && getComputedStyle(e).visibility === "visible";
126
126
  }
127
127
  }
128
- class I {
128
+ class P {
129
129
  isVisible() {
130
130
  return !0;
131
131
  }
132
132
  }
133
- const H = typeof getComputedStyle > "u" || getComputedStyle(document.documentElement).visibility === "" ? new I() : new D(), N = [
133
+ const O = typeof getComputedStyle > "u" || getComputedStyle(document.documentElement).visibility === "" ? new P() : new N(), T = [
134
134
  "button",
135
135
  "[href]",
136
136
  "input",
@@ -141,38 +141,38 @@ const H = typeof getComputedStyle > "u" || getComputedStyle(document.documentEle
141
141
  "[tabindex]"
142
142
  ].map((t) => `${t}:not([disabled],[tabindex="-1"])`).join(",");
143
143
  function g(t, e) {
144
- const o = /* @__PURE__ */ new Set();
145
- function s(r, c) {
146
- var i;
147
- for (const n of r)
148
- if (!(c && !c(n))) {
149
- if (n.nodeName === "SLOT") {
150
- s(
151
- Array.from(n.assignedElements()),
144
+ const n = /* @__PURE__ */ new Set();
145
+ function i(r, c) {
146
+ var o;
147
+ for (const s of r)
148
+ if (!(c && !c(s))) {
149
+ if (s.nodeName === "SLOT") {
150
+ i(
151
+ Array.from(s.assignedElements()),
152
152
  c
153
153
  );
154
154
  continue;
155
155
  }
156
- if (n.matches(N) && ((e == null ? void 0 : e.includeInvisibleElements) ?? H.isVisible(n)) && o.add(n), e != null && e.findFirstFocusable && o.size > 0)
156
+ if (s.matches(T) && ((e == null ? void 0 : e.includeInvisibleElements) ?? O.isVisible(s)) && n.add(s), e != null && e.findFirstFocusable && n.size > 0)
157
157
  break;
158
- if (n.children.length || (i = n.shadowRoot) != null && i.children.length) {
159
- const u = Array.from(n.children).length ? Array.from(n.children) : Array.from(n.shadowRoot.children);
160
- s(u, c);
158
+ if (s.children.length || (o = s.shadowRoot) != null && o.children.length) {
159
+ const a = Array.from(s.children).length ? Array.from(s.children) : Array.from(s.shadowRoot.children);
160
+ i(a, c);
161
161
  }
162
162
  }
163
163
  }
164
- return s(t, e == null ? void 0 : e.filter), [...o];
164
+ return i(t, e == null ? void 0 : e.filter), [...n];
165
165
  }
166
166
  function G(t, e) {
167
- const o = g(t, {
167
+ const n = g(t, {
168
168
  filter: e,
169
169
  findFirstFocusable: !0
170
170
  });
171
- return o.length ? o[0] : null;
171
+ return n.length ? n[0] : null;
172
172
  }
173
173
  class Q {
174
174
  constructor() {
175
- this._controller = new AbortController();
175
+ this.a = new AbortController();
176
176
  }
177
177
  /**
178
178
  * @param element in which the focus should be trapped.
@@ -180,47 +180,47 @@ class Q {
180
180
  * @param options.filter filter function which is applied during searching for focusable element. If an element is filtered, also child elements are filtered.
181
181
  * @param options.postFilter filter function which is applied after collecting focusable elements.
182
182
  */
183
- trap(e, o) {
183
+ trap(e, n) {
184
184
  e.addEventListener(
185
185
  "keydown",
186
- (s) => {
187
- if (s.key !== "Tab")
186
+ (i) => {
187
+ if (i.key !== "Tab")
188
188
  return;
189
189
  const r = Array.from(
190
190
  e.shadowRoot.children || []
191
- ), i = g(r, {
192
- filter: o == null ? void 0 : o.filter
191
+ ), o = g(r, {
192
+ filter: n == null ? void 0 : n.filter
193
193
  }).filter(
194
- (o == null ? void 0 : o.postFilter) ?? (() => !0)
194
+ (n == null ? void 0 : n.postFilter) ?? (() => !0)
195
195
  );
196
- if (!i.length)
196
+ if (!o.length)
197
197
  return;
198
- const n = i[0], u = i[i.length - 1], [h, b] = s.shiftKey ? [n, u] : [u, n];
199
- (n.getRootNode().activeElement === h || u.getRootNode().activeElement === h) && (b.focus(), s.preventDefault());
198
+ const s = o[0], a = o[o.length - 1], [h, m] = i.shiftKey ? [s, a] : [a, s];
199
+ (s.getRootNode().activeElement === h || a.getRootNode().activeElement === h) && (m.focus(), i.preventDefault());
200
200
  },
201
- { signal: this._controller.signal }
201
+ { signal: this.a.signal }
202
202
  );
203
203
  }
204
204
  disconnect() {
205
- this._controller.abort(), this._controller = new AbortController();
205
+ this.a.abort(), this.a = new AbortController();
206
206
  }
207
207
  }
208
208
  export {
209
- N as IS_FOCUSABLE_QUERY,
210
- D as InteractivityChecker,
209
+ T as IS_FOCUSABLE_QUERY,
210
+ N as InteractivityChecker,
211
211
  Q as SbbFocusHandler,
212
212
  j as SbbFocusVisibleWithinController,
213
213
  G as getFirstFocusableElement,
214
214
  g as getFocusableElements,
215
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,
224
- m as sbbInputModalityDetector,
216
+ I as hasGeometry,
217
+ O as interactivityChecker,
218
+ _ as isArrowKeyOrPageKeysPressed,
219
+ E as isArrowKeyPressed,
220
+ v as isFakeMousedownFromScreenReader,
221
+ R as isFakeTouchstartFromScreenReader,
222
+ Y as isNextArrowKeyPressed,
223
+ W as isPreviousArrowKeyPressed,
224
+ b as sbbInputModalityDetector,
225
225
  X as setModalityOnNextFocus
226
226
  };
@@ -1,15 +1,15 @@
1
- import { LitElement as w, html as v, isServer as g, nothing as o } from "lit";
2
- import { hostAttributes as f } from "./decorators.js";
3
- import { getDocumentWritingMode as O, getLocalName as _ } from "./dom.js";
4
- import { property as l } from "lit/decorators.js";
5
- import { isEventPrevented as C, EventEmitter as b } from "./eventing.js";
6
- import { SbbLanguageController as E } from "./controllers.js";
7
- import { i18nTargetOpensInNewWindow as $ } from "./i18n.js";
1
+ import { LitElement as w, html as f, isServer as g, nothing as l } from "lit";
2
+ import { hostAttributes as y } from "./decorators.js";
3
+ import { getDocumentWritingMode as O, getLocalName as $ } from "./dom.js";
4
+ import { property as o } from "lit/decorators.js";
5
+ import { isEventPrevented as E, EventEmitter as b } from "./eventing.js";
6
+ import { SbbLanguageController as C } from "./controllers.js";
7
+ import { i18nTargetOpensInNewWindow as D } from "./i18n.js";
8
8
  import "../screen-reader-only.js";
9
- var D = Object.defineProperty, k = Object.getOwnPropertyDescriptor, A = (e, t, r, i) => {
10
- for (var s = i > 1 ? void 0 : i ? k(t, r) : t, a = e.length - 1, n; a >= 0; a--)
9
+ var P = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, L = (e, t, r, i) => {
10
+ for (var s = i > 1 ? void 0 : i ? _(t, r) : t, a = e.length - 1, n; a >= 0; a--)
11
11
  (n = e[a]) && (s = (i ? n(t, r, s) : n(s)) || s);
12
- return i && s && D(t, r, s), s;
12
+ return i && s && P(t, r, s), s;
13
13
  };
14
14
  let m = class extends w {
15
15
  get maybeDisabled() {
@@ -33,41 +33,40 @@ let m = class extends w {
33
33
  }
34
34
  /** Default render method for button-like components. */
35
35
  render() {
36
- return v`
37
- <span class="sbb-action-base ${this.localName ?? _(this)}">
36
+ return f`
37
+ <span class="sbb-action-base ${this.localName ?? $(this)}">
38
38
  ${this.renderTemplate()}
39
39
  </span>
40
40
  `;
41
41
  }
42
42
  };
43
- m = A([
44
- f({
43
+ m = L([
44
+ y({
45
45
  dir: O(),
46
46
  "data-action": ""
47
47
  })
48
48
  ], m);
49
- var P = Object.defineProperty, S = Object.getOwnPropertyDescriptor, u = (e, t, r, i) => {
50
- for (var s = i > 1 ? void 0 : i ? S(t, r) : t, a = e.length - 1, n; a >= 0; a--)
49
+ var A = Object.defineProperty, x = Object.getOwnPropertyDescriptor, c = (e, t, r, i) => {
50
+ for (var s = i > 1 ? void 0 : i ? x(t, r) : t, a = e.length - 1, n; a >= 0; a--)
51
51
  (n = e[a]) && (s = (i ? n(t, r, s) : n(s)) || s);
52
- return i && s && P(t, r, s), s;
52
+ return i && s && A(t, r, s), s;
53
53
  };
54
- let h = class extends m {
54
+ let d = class extends m {
55
55
  constructor() {
56
- if (super(), this.type = "button", this._handleButtonClick = async (e) => {
57
- if (this.type === "button" || await C(e))
56
+ if (super(), this.type = "button", this.c = async (e) => {
57
+ if (this.type === "button" || await E(e))
58
58
  return;
59
59
  const t = this.form ? this.ownerDocument.querySelector(`form#${this.form}`) : this.closest("form");
60
60
  if (t)
61
61
  this.type === "submit" ? t.requestSubmit() : this.type === "reset" && t.reset();
62
- else
63
- return;
64
- }, this._preventScrollOnSpaceKeydown = (e) => {
62
+ else return;
63
+ }, this.d = (e) => {
65
64
  e.key === " " && (e.preventDefault(), e.target.toggleAttribute("data-active", !0));
66
- }, this._removeActiveMarker = (e) => {
65
+ }, this.a = (e) => {
67
66
  e.target.removeAttribute("data-active");
68
- }, this._dispatchClickEventOnSpaceKeyup = (e) => {
69
- e.key === " " && (this._removeActiveMarker(e), this._dispatchClickEvent(e));
70
- }, this._dispatchClickEvent = (e) => {
67
+ }, this.e = (e) => {
68
+ e.key === " " && (this.a(e), this.b(e));
69
+ }, this.b = (e) => {
71
70
  const { altKey: t, ctrlKey: r, metaKey: i, shiftKey: s } = e;
72
71
  e.target.dispatchEvent(
73
72
  new PointerEvent("click", {
@@ -85,11 +84,11 @@ let h = class extends m {
85
84
  }, !g) {
86
85
  this.setupBaseEventHandlers();
87
86
  const e = { passive: !0 };
88
- this.addEventListener("click", this._handleButtonClick), this.addEventListener("keydown", this._preventScrollOnSpaceKeydown), this.addEventListener("keyup", this._dispatchClickEventOnSpaceKeyup, e), this.addEventListener("blur", this._removeActiveMarker, e), this.addEventListener(
87
+ this.addEventListener("click", this.c), this.addEventListener("keydown", this.d), this.addEventListener("keyup", this.e, e), this.addEventListener("blur", this.a, e), this.addEventListener(
89
88
  "keypress",
90
89
  (t) => {
91
90
  (t.key === "Enter" || t.key === `
92
- `) && this._dispatchClickEvent(t);
91
+ `) && this.b(t);
93
92
  },
94
93
  e
95
94
  );
@@ -111,33 +110,33 @@ let h = class extends m {
111
110
  (!["name", "value"].includes(e) || t !== r) && super.attributeChangedCallback(e, t, r);
112
111
  }
113
112
  };
114
- u([
115
- l()
116
- ], h.prototype, "type", 2);
117
- u([
118
- l()
119
- ], h.prototype, "name", 1);
120
- u([
121
- l()
122
- ], h.prototype, "value", 1);
123
- u([
124
- l()
125
- ], h.prototype, "form", 2);
126
- h = u([
127
- f({
113
+ c([
114
+ o()
115
+ ], d.prototype, "type", 2);
116
+ c([
117
+ o()
118
+ ], d.prototype, "name", 1);
119
+ c([
120
+ o()
121
+ ], d.prototype, "value", 1);
122
+ c([
123
+ o()
124
+ ], d.prototype, "form", 2);
125
+ d = c([
126
+ y({
128
127
  role: "button",
129
128
  tabindex: "0",
130
129
  "data-button": ""
131
130
  })
132
- ], h);
133
- var L = Object.defineProperty, x = Object.getOwnPropertyDescriptor, d = (e, t, r, i) => {
134
- for (var s = i > 1 ? void 0 : i ? x(t, r) : t, a = e.length - 1, n; a >= 0; a--)
131
+ ], d);
132
+ var S = Object.defineProperty, j = Object.getOwnPropertyDescriptor, u = (e, t, r, i) => {
133
+ for (var s = i > 1 ? void 0 : i ? j(t, r) : t, a = e.length - 1, n; a >= 0; a--)
135
134
  (n = e[a]) && (s = (i ? n(t, r, s) : n(s)) || s);
136
- return i && s && L(t, r, s), s;
135
+ return i && s && S(t, r, s), s;
137
136
  };
138
- let c = class extends m {
137
+ let p = class extends m {
139
138
  constructor() {
140
- super(), this.language = new E(this), this._evaluateRelAttribute = () => this.rel ? this.rel : this.target === "_blank" ? "external noopener nofollow" : o, g || this.setupBaseEventHandlers();
139
+ super(), this.language = new C(this), this.a = () => this.rel ? this.rel : this.target === "_blank" ? "external noopener nofollow" : l, g || this.setupBaseEventHandlers();
141
140
  }
142
141
  /** @internal */
143
142
  focus(e) {
@@ -156,56 +155,56 @@ let c = class extends m {
156
155
  }
157
156
  /** Default render method for link-like components. Can be overridden if the LinkRenderVariables are not needed. */
158
157
  render() {
159
- return v`
158
+ return f`
160
159
  <a
161
- class="sbb-action-base ${this.localName ?? _(this)}"
162
- href=${this.href || o}
160
+ class="sbb-action-base ${this.localName ?? $(this)}"
161
+ href=${this.href || l}
163
162
  ?download=${this.download}
164
- target=${this.target || o}
165
- rel=${this._evaluateRelAttribute()}
166
- aria-label=${this.accessibilityLabel || o}
167
- tabindex=${this.maybeDisabled ? "-1" : o}
168
- aria-disabled=${this.maybeDisabled ? "true" : o}
163
+ target=${this.target || l}
164
+ rel=${this.a()}
165
+ aria-label=${this.accessibilityLabel || l}
166
+ tabindex=${this.maybeDisabled ? "-1" : l}
167
+ aria-disabled=${this.maybeDisabled ? "true" : l}
169
168
  >
170
169
  ${this.renderTemplate()}
171
- ${this.href && this.target === "_blank" ? v`<sbb-screen-reader-only
172
- >. ${$[this.language.current]}</sbb-screen-reader-only
173
- >` : o}
170
+ ${this.href && this.target === "_blank" ? f`<sbb-screen-reader-only
171
+ >. ${D[this.language.current]}</sbb-screen-reader-only
172
+ >` : l}
174
173
  </a>
175
174
  `;
176
175
  }
177
176
  };
178
- d([
179
- l()
180
- ], c.prototype, "href", 2);
181
- d([
182
- l()
183
- ], c.prototype, "target", 2);
184
- d([
185
- l()
186
- ], c.prototype, "rel", 2);
187
- d([
188
- l({ type: Boolean })
189
- ], c.prototype, "download", 2);
190
- d([
191
- l({ attribute: "accessibility-label" })
192
- ], c.prototype, "accessibilityLabel", 2);
193
- c = d([
194
- f({
177
+ u([
178
+ o()
179
+ ], p.prototype, "href", 2);
180
+ u([
181
+ o()
182
+ ], p.prototype, "target", 2);
183
+ u([
184
+ o()
185
+ ], p.prototype, "rel", 2);
186
+ u([
187
+ o({ type: Boolean })
188
+ ], p.prototype, "download", 2);
189
+ u([
190
+ o({ attribute: "accessibility-label" })
191
+ ], p.prototype, "accessibilityLabel", 2);
192
+ p = u([
193
+ y({
195
194
  "data-link": ""
196
195
  })
197
- ], c);
198
- const p = class p extends w {
196
+ ], p);
197
+ const h = class h extends w {
199
198
  constructor() {
200
199
  super(...arguments), this.willOpen = new b(
201
200
  this,
202
- p.events.willOpen
203
- ), this.didOpen = new b(this, p.events.didOpen), this.willClose = new b(
201
+ h.events.willOpen
202
+ ), this.didOpen = new b(this, h.events.didOpen), this.willClose = new b(
204
203
  this,
205
- p.events.willClose
204
+ h.events.willClose
206
205
  ), this.didClose = new b(
207
206
  this,
208
- p.events.didClose
207
+ h.events.didClose
209
208
  );
210
209
  }
211
210
  /** The state of the component. */
@@ -219,16 +218,16 @@ const p = class p extends w {
219
218
  super.connectedCallback(), this.state || (this.state = "closed");
220
219
  }
221
220
  };
222
- p.events = {
221
+ h.events = {
223
222
  willOpen: "willOpen",
224
223
  didOpen: "didOpen",
225
224
  willClose: "willClose",
226
225
  didClose: "didClose"
227
226
  };
228
- let y = p;
227
+ let v = h;
229
228
  export {
230
229
  m as SbbActionBaseElement,
231
- h as SbbButtonBaseElement,
232
- c as SbbLinkBaseElement,
233
- y as SbbOpenCloseBaseElement
230
+ d as SbbButtonBaseElement,
231
+ p as SbbLinkBaseElement,
232
+ v as SbbOpenCloseBaseElement
234
233
  };