@sbb-esta/lyne-elements 2.0.3 → 2.2.0

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 (266) hide show
  1. package/accordion/accordion.d.ts.map +1 -1
  2. package/accordion.js +6 -6
  3. package/action-group.js +3 -3
  4. package/alert/alert.js +8 -8
  5. package/autocomplete/autocomplete-base-element.d.ts +4 -0
  6. package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  7. package/autocomplete-grid/autocomplete-grid-button.js +4 -4
  8. package/autocomplete-grid/autocomplete-grid-cell.js +3 -3
  9. package/autocomplete-grid/autocomplete-grid-optgroup.js +4 -4
  10. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts +1 -1
  11. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -1
  12. package/autocomplete-grid/autocomplete-grid-option.js +10 -10
  13. package/autocomplete-grid/autocomplete-grid-row.js +5 -5
  14. package/autocomplete.js +99 -90
  15. package/breadcrumb/breadcrumb-group.js +5 -5
  16. package/button/accent-button-link.js +9 -9
  17. package/button/accent-button-static.js +6 -6
  18. package/button/accent-button.js +6 -6
  19. package/button/button-link.js +7 -7
  20. package/button/button-static.js +7 -7
  21. package/button/button.js +8 -8
  22. package/button/common.js +15 -15
  23. package/button/mini-button-group.js +8 -8
  24. package/button/secondary-button-link.js +7 -7
  25. package/button/secondary-button-static.js +7 -7
  26. package/button/secondary-button.js +3 -3
  27. package/button/transparent-button-link.js +6 -6
  28. package/button/transparent-button-static.js +5 -5
  29. package/button/transparent-button.js +6 -6
  30. package/card/card-badge.js +11 -11
  31. package/card/card-button.js +5 -5
  32. package/card/card-link.js +7 -7
  33. package/card/card.js +3 -3
  34. package/checkbox/checkbox-panel.js +16 -16
  35. package/checkbox/checkbox.js +15 -15
  36. package/checkbox/common.js +3 -3
  37. package/chip-label.js +3 -3
  38. package/clock.js +10 -10
  39. package/container/container/container.d.ts +1 -1
  40. package/container/container/container.d.ts.map +1 -1
  41. package/container/container.js +23 -23
  42. package/container/sticky-bar/sticky-bar.d.ts +1 -1
  43. package/container/sticky-bar/sticky-bar.d.ts.map +1 -1
  44. package/container/sticky-bar.js +4 -4
  45. package/core/a11y/focus.d.ts.map +1 -1
  46. package/core/a11y.js +8 -8
  47. package/core/base-elements/link-base-element.d.ts +2 -0
  48. package/core/base-elements/link-base-element.d.ts.map +1 -1
  49. package/core/base-elements.js +125 -114
  50. package/core/controllers.js +4 -4
  51. package/core/datetime/date-adapter.d.ts +1 -1
  52. package/core/datetime/date-adapter.d.ts.map +1 -1
  53. package/core/datetime/native-date-adapter.d.ts +1 -1
  54. package/core/datetime/native-date-adapter.d.ts.map +1 -1
  55. package/core/datetime.js +6 -6
  56. package/core/dom/scroll.d.ts +1 -0
  57. package/core/dom/scroll.d.ts.map +1 -1
  58. package/core/dom.js +35 -35
  59. package/core/eventing.js +4 -4
  60. package/core/images.d.ts.map +1 -1
  61. package/core/mixins.js +18 -18
  62. package/core/styles/core.scss +23 -2
  63. package/core/testing.js +14 -14
  64. package/core.css +20 -2
  65. package/custom-elements.json +828 -431
  66. package/datepicker/common/datepicker-association-controllers.d.ts +21 -0
  67. package/datepicker/common/datepicker-association-controllers.d.ts.map +1 -0
  68. package/datepicker/common/datepicker-button.d.ts +17 -9
  69. package/datepicker/common/datepicker-button.d.ts.map +1 -1
  70. package/datepicker/common.d.ts +1 -0
  71. package/datepicker/common.d.ts.map +1 -1
  72. package/datepicker/common.js +130 -92
  73. package/datepicker/datepicker/datepicker.d.ts +19 -4
  74. package/datepicker/datepicker/datepicker.d.ts.map +1 -1
  75. package/datepicker/datepicker-toggle/datepicker-toggle.d.ts +14 -8
  76. package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  77. package/datepicker/datepicker-toggle.js +106 -113
  78. package/datepicker/datepicker.js +95 -80
  79. package/development/accordion/accordion.d.ts.map +1 -1
  80. package/development/accordion.js +1 -1
  81. package/development/action-group.js +1 -1
  82. package/development/autocomplete/autocomplete-base-element.d.ts +4 -0
  83. package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  84. package/development/autocomplete-grid/autocomplete-grid-cell.js +1 -1
  85. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts +1 -1
  86. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -1
  87. package/development/autocomplete-grid/autocomplete-grid-option.js +3 -3
  88. package/development/autocomplete-grid/autocomplete-grid-row.js +1 -1
  89. package/development/autocomplete.js +37 -8
  90. package/development/breadcrumb/breadcrumb-group.js +3 -3
  91. package/development/button/common.js +69 -70
  92. package/development/calendar.js +1 -1
  93. package/development/card/card-badge.js +1 -1
  94. package/development/card/card.js +1 -1
  95. package/development/chip-label.js +1 -1
  96. package/development/clock.js +1 -1
  97. package/development/container/container/container.d.ts +1 -1
  98. package/development/container/container/container.d.ts.map +1 -1
  99. package/development/container/container.js +18 -2
  100. package/development/container/sticky-bar/sticky-bar.d.ts +1 -1
  101. package/development/container/sticky-bar/sticky-bar.d.ts.map +1 -1
  102. package/development/container/sticky-bar.js +9 -1
  103. package/development/core/a11y/focus.d.ts.map +1 -1
  104. package/development/core/a11y.js +3 -3
  105. package/development/core/base-elements/link-base-element.d.ts +2 -0
  106. package/development/core/base-elements/link-base-element.d.ts.map +1 -1
  107. package/development/core/base-elements.js +22 -5
  108. package/development/core/controllers.js +1 -1
  109. package/development/core/datetime/date-adapter.d.ts +1 -1
  110. package/development/core/datetime/date-adapter.d.ts.map +1 -1
  111. package/development/core/datetime/native-date-adapter.d.ts +1 -1
  112. package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
  113. package/development/core/datetime.js +1 -1
  114. package/development/core/dom/scroll.d.ts +1 -0
  115. package/development/core/dom/scroll.d.ts.map +1 -1
  116. package/development/core/dom.js +4 -1
  117. package/development/core/images.d.ts.map +1 -1
  118. package/development/core/mixins.js +1 -1
  119. package/development/datepicker/common/datepicker-association-controllers.d.ts +21 -0
  120. package/development/datepicker/common/datepicker-association-controllers.d.ts.map +1 -0
  121. package/development/datepicker/common/datepicker-button.d.ts +17 -9
  122. package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
  123. package/development/datepicker/common.d.ts +1 -0
  124. package/development/datepicker/common.d.ts.map +1 -1
  125. package/development/datepicker/common.js +139 -90
  126. package/development/datepicker/datepicker/datepicker.d.ts +19 -4
  127. package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
  128. package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts +14 -8
  129. package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  130. package/development/datepicker/datepicker-toggle.js +76 -73
  131. package/development/datepicker/datepicker.js +55 -37
  132. package/development/dialog/dialog/dialog.d.ts +2 -0
  133. package/development/dialog/dialog/dialog.d.ts.map +1 -1
  134. package/development/dialog/dialog-content.js +1 -1
  135. package/development/dialog/dialog.js +38 -12
  136. package/development/expansion-panel/expansion-panel-content.js +1 -1
  137. package/development/flip-card/flip-card-details.js +1 -1
  138. package/development/flip-card/flip-card-summary.js +1 -1
  139. package/development/icon.js +1 -1
  140. package/development/image.js +2 -2
  141. package/development/lead-container.js +1 -1
  142. package/development/link-list/link-list-anchor.js +1 -1
  143. package/development/link-list/link-list.js +1 -1
  144. package/development/loading-indicator-circle.js +1 -1
  145. package/development/loading-indicator.js +1 -1
  146. package/development/map-container.js +1 -1
  147. package/development/menu/menu/menu.d.ts.map +1 -1
  148. package/development/menu/menu.js +35 -12
  149. package/development/message.js +1 -1
  150. package/development/navigation/navigation/navigation.d.ts.map +1 -1
  151. package/development/navigation/navigation.js +15 -8
  152. package/development/notification.js +1 -1
  153. package/development/option/optgroup.js +1 -1
  154. package/development/option/option/option-base-element.d.ts +3 -2
  155. package/development/option/option/option-base-element.d.ts.map +1 -1
  156. package/development/option/option.js +16 -9
  157. package/development/overlay/overlay-base-element.d.ts.map +1 -1
  158. package/development/overlay/overlay.d.ts.map +1 -1
  159. package/development/overlay.js +29 -13
  160. package/development/paginator/paginator.js +1 -1
  161. package/development/popover/popover/popover.d.ts.map +1 -1
  162. package/development/popover/popover.js +16 -13
  163. package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
  164. package/development/radio-button/radio-button-group.js +2 -2
  165. package/development/{sbb-tokens-BdGhUJjM.js → sbb-tokens-CSAKTXUi.js} +15 -15
  166. package/development/screen-reader-only.js +1 -1
  167. package/development/select/select.d.ts +11 -0
  168. package/development/select/select.d.ts.map +1 -1
  169. package/development/select.js +60 -9
  170. package/development/signet.js +1 -1
  171. package/development/stepper/step.js +1 -1
  172. package/development/tabs/tab.js +1 -1
  173. package/development/time-input.js +1 -1
  174. package/development/title/title-base.d.ts.map +1 -1
  175. package/development/title.js +4 -5
  176. package/development/toast/toast.d.ts.map +1 -1
  177. package/development/toast.js +14 -8
  178. package/development/toggle/toggle.js +2 -2
  179. package/development/train/train-blocked-passage.js +1 -1
  180. package/development/train/train-wagon.js +1 -1
  181. package/dialog/dialog/dialog.d.ts +2 -0
  182. package/dialog/dialog/dialog.d.ts.map +1 -1
  183. package/dialog/dialog-content.js +4 -4
  184. package/dialog/dialog-title.js +8 -8
  185. package/dialog/dialog.js +59 -49
  186. package/divider.js +12 -12
  187. package/expansion-panel/expansion-panel-content.js +3 -3
  188. package/file-selector/file-selector-dropzone.js +5 -5
  189. package/file-selector/file-selector.js +6 -6
  190. package/flip-card/flip-card-details.js +7 -7
  191. package/flip-card/flip-card-summary.js +12 -12
  192. package/header/header-button.js +5 -5
  193. package/header/header-link.js +5 -5
  194. package/icon.js +37 -37
  195. package/image.js +16 -16
  196. package/lead-container.js +3 -3
  197. package/link/block-link-button.js +4 -4
  198. package/link/block-link-static.js +9 -9
  199. package/link/block-link.js +4 -4
  200. package/link/common.js +16 -16
  201. package/link/link-button.js +7 -7
  202. package/link/link-static.js +7 -7
  203. package/link/link.js +4 -4
  204. package/link-list/common.js +12 -12
  205. package/link-list/link-list-anchor.js +3 -3
  206. package/link-list/link-list.js +3 -3
  207. package/loading-indicator-circle.js +14 -14
  208. package/loading-indicator.js +3 -3
  209. package/map-container.js +6 -6
  210. package/menu/common.js +7 -7
  211. package/menu/menu/menu.d.ts.map +1 -1
  212. package/menu/menu-button.js +8 -8
  213. package/menu/menu-link.js +6 -6
  214. package/menu/menu.js +64 -42
  215. package/message.js +3 -3
  216. package/navigation/navigation/navigation.d.ts.map +1 -1
  217. package/navigation/navigation-button.js +4 -4
  218. package/navigation/navigation-link.js +7 -7
  219. package/navigation/navigation-list.js +4 -4
  220. package/navigation/navigation-marker.js +3 -3
  221. package/navigation/navigation.js +21 -20
  222. package/notification.js +19 -19
  223. package/option/optgroup.js +14 -14
  224. package/option/option/option-base-element.d.ts +3 -2
  225. package/option/option/option-base-element.d.ts.map +1 -1
  226. package/option/option.js +115 -103
  227. package/overlay/overlay-base-element.d.ts.map +1 -1
  228. package/overlay/overlay.d.ts.map +1 -1
  229. package/overlay.js +87 -84
  230. package/package.json +1 -1
  231. package/paginator/common.js +6 -6
  232. package/paginator/paginator.js +1 -1
  233. package/popover/popover/popover.d.ts.map +1 -1
  234. package/popover/popover.js +73 -73
  235. package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
  236. package/radio-button/radio-button-group.js +1 -1
  237. package/radio-button/radio-button-panel.js +5 -5
  238. package/{sbb-tokens-Dx20OtVg.js → sbb-tokens-BgDF8jIh.js} +14 -14
  239. package/screen-reader-only.js +8 -8
  240. package/select/select.d.ts +11 -0
  241. package/select/select.d.ts.map +1 -1
  242. package/select.js +111 -83
  243. package/signet.js +1 -1
  244. package/slider.js +8 -8
  245. package/standard-theme.css +20 -2
  246. package/status.js +3 -3
  247. package/stepper/step-label.js +4 -4
  248. package/stepper/step.js +3 -3
  249. package/table/table-wrapper.js +4 -4
  250. package/tabs/tab-group.js +24 -24
  251. package/tabs/tab.js +4 -4
  252. package/tag/tag-group.js +7 -7
  253. package/teaser-product/common.js +5 -5
  254. package/teaser-product/teaser-product-static.js +2 -2
  255. package/time-input.js +3 -3
  256. package/timetable-occupancy-icon.js +3 -3
  257. package/timetable-occupancy.js +6 -6
  258. package/title/title-base.d.ts.map +1 -1
  259. package/title.js +41 -42
  260. package/toast/toast.d.ts.map +1 -1
  261. package/toast.js +58 -54
  262. package/toggle/toggle-option.js +11 -11
  263. package/toggle/toggle.js +3 -3
  264. package/toggle-check.js +5 -5
  265. package/train/train-blocked-passage.js +3 -3
  266. package/train/train.js +28 -28
@@ -1,78 +1,87 @@
1
- var B = (a) => {
1
+ var U = (a) => {
2
2
  throw TypeError(a);
3
3
  };
4
- var G = (a, r, s) => r.has(a) || B("Cannot " + s);
5
- var _ = (a, r, s) => (G(a, r, "read from private field"), s ? s.call(a) : r.get(a)), h = (a, r, s) => r.has(a) ? B("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, s), n = (a, r, s, c) => (G(a, r, "write to private field"), c ? c.call(a, s) : r.set(a, s), s);
6
- import { __esDecorate as m, __runInitializers as d } from "tslib";
7
- import { css as V, LitElement as W, isServer as J, html as K, nothing as X } from "lit";
8
- import { customElement as Y, property as Q, state as E } from "lit/decorators.js";
9
- import { ref as P } from "lit/directives/ref.js";
10
- import { sbbInputModalityDetector as Z } from "../core/a11y.js";
11
- import { SbbLanguageController as ee } from "../core/controllers.js";
12
- import { hostAttributes as te } from "../core/decorators.js";
13
- import { i18nShowCalendar as ie } from "../core/i18n.js";
14
- import { SbbNegativeMixin as ae, SbbHydrationMixin as re } from "../core/mixins.js";
15
- import { getDatePicker as se, datepickerControlRegisteredEventFactory as le } from "./datepicker.js";
4
+ var H = (a, s, l) => s.has(a) || U("Cannot " + l);
5
+ var u = (a, s, l) => (H(a, s, "read from private field"), l ? l.call(a) : s.get(a)), g = (a, s, l) => s.has(a) ? U("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(a) : s.set(a, l), d = (a, s, l, c) => (H(a, s, "write to private field"), c ? c.call(a, l) : s.set(a, l), l);
6
+ import { __esDecorate as o, __runInitializers as n } from "tslib";
7
+ import { css as J, LitElement as K, isServer as B, html as G, nothing as Q } from "lit";
8
+ import { customElement as V, property as E, state as f } from "lit/decorators.js";
9
+ import { ref as w } from "lit/directives/ref.js";
10
+ import { sbbInputModalityDetector as W } from "../core/a11y.js";
11
+ import { SbbLanguageController as X } from "../core/controllers.js";
12
+ import { i18nShowCalendar as Y } from "../core/i18n.js";
13
+ import { SbbNegativeMixin as Z, SbbHydrationMixin as ee } from "../core/mixins.js";
14
+ import { SbbDatepickerAssociationControlController as te } from "./common.js";
16
15
  import "../calendar.js";
17
16
  import "../popover/popover.js";
18
17
  import "../button/mini-button.js";
19
- const ne = V`*,:before,:after{box-sizing:border-box}:host{--sbb-datepicker-control-radius: var(--sbb-border-radius-4x);--sbb-datepicker-control-color: var(--sbb-color-black);display:inline-flex}.sbb-datepicker-toggle__trigger{color:var(--sbb-datepicker-control-color);height:unset}sbb-icon{color:var(--sbb-color-graphite)}`;
20
- let Ce = (() => {
21
- var b, g, u, k, p, f, l;
22
- let a = [Y("sbb-datepicker-toggle"), te({
23
- slot: "prefix"
24
- })], r, s = [], c, v = ae(re(W)), C, w = [], x = [], y, $ = [], z = [], S, D = [], I = [], A, L = [], O = [], F, N = [], U = [], M, R = [], j = [];
25
- return l = class extends v {
18
+ const ie = J`*,:before,:after{box-sizing:border-box}:host{--sbb-datepicker-control-radius: var(--sbb-border-radius-4x);--sbb-datepicker-control-color: var(--sbb-color-black);display:inline-flex}.sbb-datepicker-toggle__trigger{color:var(--sbb-datepicker-control-color);height:unset}sbb-icon{color:var(--sbb-color-graphite)}sbb-popover{margin:0;padding:0;border:none;width:auto;height:auto;background-color:transparent}`;
19
+ let ge = (() => {
20
+ var _, h, m, p, b, r;
21
+ let a = [V("sbb-datepicker-toggle")], s, l = [], c, x = Z(ee(K)), v = [], C, y, $, S = [], z = [], P, D = [], I = [], O, A = [], N = [], F, M = [], L = [], R, j = [], q = [];
22
+ return r = class extends x {
26
23
  constructor() {
27
- var e;
24
+ var t;
28
25
  super();
29
- h(this, b);
30
- h(this, g);
31
- h(this, u);
32
- h(this, k);
33
- h(this, p);
34
- h(this, f);
35
- n(this, b, d(this, w, null)), n(this, g, (d(this, x), d(this, $, "day"))), n(this, u, (d(this, z), d(this, D, !1))), n(this, k, (d(this, I), d(this, L, null))), n(this, p, (d(this, O), d(this, N, null))), n(this, f, (d(this, U), d(this, R, !1))), this._datePickerElement = d(this, j), this._language = new ee(this), (e = this.addEventListener) == null || e.call(this, "click", (t) => {
36
- t.composedPath()[0] === this && this.open();
37
- }), J || this.hydrationComplete.then(() => this._renderCalendar = !0);
26
+ g(this, _);
27
+ g(this, h);
28
+ g(this, m);
29
+ g(this, p);
30
+ g(this, b);
31
+ this._datepicker = n(this, v), d(this, _, n(this, S, "day")), d(this, h, (n(this, z), n(this, D, !1))), d(this, m, (n(this, I), n(this, A, null))), d(this, p, (n(this, N), n(this, M, null))), d(this, b, (n(this, L), n(this, j, !1))), this._calendarElement = n(this, q), this._language = new X(this), this.addController(new te(this)), (t = this.addEventListener) == null || t.call(this, "click", (e) => {
32
+ e.composedPath()[0] === this && this.open();
33
+ }), B || this.hydrationComplete.then(() => this._renderCalendar = !0);
38
34
  }
39
- /** Datepicker reference. */
35
+ /**
36
+ * Datepicker reference.
37
+ * @internal
38
+ * @deprecated Use property/attribute `datepicker` instead.
39
+ */
40
+ set datePicker(t) {
41
+ this.datepicker = t;
42
+ }
43
+ /** @internal */
40
44
  get datePicker() {
41
- return _(this, b);
45
+ return this.datepicker;
42
46
  }
43
- set datePicker(e) {
44
- n(this, b, e);
47
+ /** Datepicker reference. */
48
+ set datepicker(t) {
49
+ var e, i, k;
50
+ this._datepicker = typeof t == "string" ? ((k = (i = (e = this.getRootNode) == null ? void 0 : e.call(this)) == null ? void 0 : i.querySelector) == null ? void 0 : k.call(i, `#${t}`)) ?? null : t;
51
+ }
52
+ get datepicker() {
53
+ return this._datepicker ?? null;
45
54
  }
46
55
  /** The initial view of calendar which should be displayed on opening. */
47
56
  get view() {
48
- return _(this, g);
57
+ return u(this, _);
49
58
  }
50
- set view(e) {
51
- n(this, g, e);
59
+ set view(t) {
60
+ d(this, _, t);
52
61
  }
53
62
  get _disabled() {
54
- return _(this, u);
63
+ return u(this, h);
55
64
  }
56
- set _disabled(e) {
57
- n(this, u, e);
65
+ set _disabled(t) {
66
+ d(this, h, t);
58
67
  }
59
68
  get _min() {
60
- return _(this, k);
69
+ return u(this, m);
61
70
  }
62
- set _min(e) {
63
- n(this, k, e);
71
+ set _min(t) {
72
+ d(this, m, t);
64
73
  }
65
74
  get _max() {
66
- return _(this, p);
75
+ return u(this, p);
67
76
  }
68
- set _max(e) {
69
- n(this, p, e);
77
+ set _max(t) {
78
+ d(this, p, t);
70
79
  }
71
80
  get _renderCalendar() {
72
- return _(this, f);
81
+ return u(this, b);
73
82
  }
74
- set _renderCalendar(e) {
75
- n(this, f, e);
83
+ set _renderCalendar(t) {
84
+ d(this, b, t);
76
85
  }
77
86
  /**
78
87
  * Opens the calendar.
@@ -81,99 +90,83 @@ let Ce = (() => {
81
90
  this._triggerElement || (this._triggerElement = this.shadowRoot.querySelector("sbb-mini-button")), this._triggerElement.click();
82
91
  }
83
92
  connectedCallback() {
84
- var t, i;
85
- super.connectedCallback(), this.datePicker || this._init();
86
- const e = ((t = this.closest) == null ? void 0 : t.call(this, "sbb-form-field")) ?? ((i = this.closest) == null ? void 0 : i.call(this, "[data-form-field]"));
87
- e && (this.negative = e.hasAttribute("negative"));
93
+ var e, i;
94
+ super.connectedCallback(), this.slot || (this.slot = "prefix");
95
+ const t = ((e = this.closest) == null ? void 0 : e.call(this, "sbb-form-field")) ?? ((i = this.closest) == null ? void 0 : i.call(this, "[data-form-field]"));
96
+ t && (this.negative = t.hasAttribute("negative"));
97
+ }
98
+ willUpdate(t) {
99
+ var e, i, k, T;
100
+ super.willUpdate(t), this.datepicker ? (this._disabled = (((e = this.datepicker.inputElement) == null ? void 0 : e.disabled) || ((i = this.datepicker.inputElement) == null ? void 0 : i.readOnly)) ?? !0, this._min = (k = this.datepicker.inputElement) == null ? void 0 : k.min, this._max = (T = this.datepicker.inputElement) == null ? void 0 : T.max, this._configureCalendar(), this._calendarElement && (this._calendarElement.selected = this.datepicker.valueAsDate ?? null)) : (this._disabled = !0, this._min = null, this._max = null);
88
101
  }
89
- willUpdate(e) {
90
- super.willUpdate(e), e.has("datePicker") && this._init(this.datePicker);
102
+ _configureCalendar() {
103
+ !this._calendarElement || !this.datepicker || (this._calendarElement.wide = this.datepicker.wide, this._calendarElement.now = this._nowOrNull(), this._calendarElement.dateFilter = this.datepicker.dateFilter);
91
104
  }
92
- disconnectedCallback() {
105
+ _assignCalendar(t) {
93
106
  var e;
94
- super.disconnectedCallback(), (e = this._datePickerController) == null || e.abort();
95
- }
96
- _init(e) {
97
- var t, i, T, q, H;
98
- if ((t = this._datePickerController) == null || t.abort(), this._datePickerController = new AbortController(), this._datePickerElement = se(this, e), !this._datePickerElement) {
99
- (i = this.parentElement) == null || i.addEventListener("inputUpdated", (o) => this._init(o.target), { once: !0, signal: this._datePickerController.signal });
100
- return;
101
- }
102
- (T = this._datePickerElement) == null || T.addEventListener("inputUpdated", (o) => {
103
- this._datePickerElement = o.target, this._disabled = !!(o.detail.disabled || o.detail.readonly), this._min = o.detail.min, this._max = o.detail.max;
104
- }, { signal: this._datePickerController.signal }), (q = this._datePickerElement) == null || q.addEventListener("change", (o) => this._datePickerChanged(o), {
105
- signal: this._datePickerController.signal
106
- }), (H = this._datePickerElement) == null || H.addEventListener("datePickerUpdated", (o) => this._configureCalendar(this._calendarElement, o.target), { signal: this._datePickerController.signal }), this._datePickerElement.dispatchEvent(le());
107
- }
108
- _configureCalendar(e, t) {
109
- !e || !t || (e.wide = t.wide, e.now = this._nowOrNull(), e.dateFilter = t.dateFilter);
110
- }
111
- _datePickerChanged(e) {
112
- this._datePickerElement = e.target, this._calendarElement && (this._calendarElement.selected = this._datePickerElement.valueAsDate ?? null);
113
- }
114
- _assignCalendar(e) {
115
- var t;
116
- this._calendarElement && this._calendarElement === e || (this._calendarElement = e, !(!("valueAsDate" in (this._datePickerElement ?? {})) || !((t = this._calendarElement) != null && t.resetPosition)) && (this._calendarElement.selected = this._datePickerElement.valueAsDate ?? null, this._configureCalendar(this._calendarElement, this._datePickerElement), this._calendarElement.resetPosition()));
107
+ this._calendarElement && this._calendarElement === t || (this._calendarElement = t, !(!("valueAsDate" in (this.datepicker ?? {})) || !((e = this._calendarElement) != null && e.resetPosition)) && (this._calendarElement.selected = this.datepicker.valueAsDate ?? null, this._configureCalendar(), this._calendarElement.resetPosition()));
117
108
  }
118
- updated(e) {
119
- super.updated(e), this._popoverElement.trigger = this._triggerElement;
109
+ updated(t) {
110
+ super.updated(t), this._popoverElement.trigger = this._triggerElement;
120
111
  }
121
112
  _nowOrNull() {
122
- var e;
123
- return (e = this._datePickerElement) != null && e.hasCustomNow() ? this._datePickerElement.now : null;
113
+ var t;
114
+ return (t = this.datepicker) != null && t.hasCustomNow() ? this.datepicker.now : null;
124
115
  }
125
116
  render() {
126
- var e, t;
127
- return K`
117
+ var t, e;
118
+ return G`
128
119
  <sbb-mini-button
129
120
  class="sbb-datepicker-toggle__trigger"
130
121
  icon-name="calendar-small"
131
- aria-label=${ie[this._language.current]}
132
- ?disabled=${!J && (!this._datePickerElement || this._disabled)}
122
+ aria-label=${Y[this._language.current]}
123
+ ?disabled=${!B && (!this.datepicker || this._disabled)}
133
124
  ?negative=${this.negative}
134
- ${P((i) => this._triggerElement = i)}
125
+ ${w((i) => this._triggerElement = i)}
135
126
  ></sbb-mini-button>
136
127
  <sbb-popover
137
128
  @willOpen=${() => this._calendarElement.resetPosition()}
138
129
  @didOpen=${() => {
139
- Z.mostRecentModality === "keyboard" && this._calendarElement.focus();
130
+ W.mostRecentModality === "keyboard" && this._calendarElement.focus();
140
131
  }}
141
132
  .trigger=${this._triggerElement}
142
133
  hide-close-button
143
- ${P((i) => this._popoverElement = i)}
134
+ ${w((i) => this._popoverElement = i)}
144
135
  >
145
- ${this._renderCalendar ? K`<sbb-calendar
136
+ ${this._renderCalendar ? G`<sbb-calendar
146
137
  .view=${this.view}
147
138
  .min=${this._min}
148
139
  .max=${this._max}
149
140
  .now=${this._nowOrNull()}
150
- ?wide=${(e = this._datePickerElement) == null ? void 0 : e.wide}
151
- .dateFilter=${(t = this._datePickerElement) == null ? void 0 : t.dateFilter}
141
+ ?wide=${(t = this.datepicker) == null ? void 0 : t.wide}
142
+ .dateFilter=${(e = this.datepicker) == null ? void 0 : e.dateFilter}
152
143
  @dateSelected=${(i) => {
153
- this._calendarElement.selected = i.detail, this._datePickerElement && (this._datePickerElement.valueAsDate = i.detail);
144
+ this._calendarElement.selected = i.detail, this.datepicker && (this.datepicker.valueAsDate = i.detail);
154
145
  }}
155
- ${P((i) => this._assignCalendar(i))}
156
- ></sbb-calendar>` : X}
146
+ ${w((i) => this._assignCalendar(i))}
147
+ ></sbb-calendar>` : Q}
157
148
  </sbb-popover>
158
149
  `;
159
150
  }
160
- }, b = new WeakMap(), g = new WeakMap(), u = new WeakMap(), k = new WeakMap(), p = new WeakMap(), f = new WeakMap(), c = l, (() => {
161
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(v[Symbol.metadata] ?? null) : void 0;
162
- C = [Q({ attribute: "date-picker" })], y = [Q()], S = [E()], A = [E()], F = [E()], M = [E()], m(l, null, C, { kind: "accessor", name: "datePicker", static: !1, private: !1, access: { has: (t) => "datePicker" in t, get: (t) => t.datePicker, set: (t, i) => {
163
- t.datePicker = i;
164
- } }, metadata: e }, w, x), m(l, null, y, { kind: "accessor", name: "view", static: !1, private: !1, access: { has: (t) => "view" in t, get: (t) => t.view, set: (t, i) => {
165
- t.view = i;
166
- } }, metadata: e }, $, z), m(l, null, S, { kind: "accessor", name: "_disabled", static: !1, private: !1, access: { has: (t) => "_disabled" in t, get: (t) => t._disabled, set: (t, i) => {
167
- t._disabled = i;
168
- } }, metadata: e }, D, I), m(l, null, A, { kind: "accessor", name: "_min", static: !1, private: !1, access: { has: (t) => "_min" in t, get: (t) => t._min, set: (t, i) => {
169
- t._min = i;
170
- } }, metadata: e }, L, O), m(l, null, F, { kind: "accessor", name: "_max", static: !1, private: !1, access: { has: (t) => "_max" in t, get: (t) => t._max, set: (t, i) => {
171
- t._max = i;
172
- } }, metadata: e }, N, U), m(l, null, M, { kind: "accessor", name: "_renderCalendar", static: !1, private: !1, access: { has: (t) => "_renderCalendar" in t, get: (t) => t._renderCalendar, set: (t, i) => {
173
- t._renderCalendar = i;
174
- } }, metadata: e }, R, j), m(null, r = { value: c }, a, { kind: "class", name: c.name, metadata: e }, null, s), c = r.value, e && Object.defineProperty(c, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
175
- })(), l.styles = ne, d(c, s), c;
151
+ }, _ = new WeakMap(), h = new WeakMap(), m = new WeakMap(), p = new WeakMap(), b = new WeakMap(), c = r, (() => {
152
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(x[Symbol.metadata] ?? null) : void 0;
153
+ C = [E({ attribute: "date-picker" })], y = [E({ attribute: "datepicker" })], $ = [E()], P = [f()], O = [f()], F = [f()], R = [f()], o(r, null, C, { kind: "setter", name: "datePicker", static: !1, private: !1, access: { has: (e) => "datePicker" in e, set: (e, i) => {
154
+ e.datePicker = i;
155
+ } }, metadata: t }, null, v), o(r, null, y, { kind: "setter", name: "datepicker", static: !1, private: !1, access: { has: (e) => "datepicker" in e, set: (e, i) => {
156
+ e.datepicker = i;
157
+ } }, metadata: t }, null, v), o(r, null, $, { kind: "accessor", name: "view", static: !1, private: !1, access: { has: (e) => "view" in e, get: (e) => e.view, set: (e, i) => {
158
+ e.view = i;
159
+ } }, metadata: t }, S, z), o(r, null, P, { kind: "accessor", name: "_disabled", static: !1, private: !1, access: { has: (e) => "_disabled" in e, get: (e) => e._disabled, set: (e, i) => {
160
+ e._disabled = i;
161
+ } }, metadata: t }, D, I), o(r, null, O, { kind: "accessor", name: "_min", static: !1, private: !1, access: { has: (e) => "_min" in e, get: (e) => e._min, set: (e, i) => {
162
+ e._min = i;
163
+ } }, metadata: t }, A, N), o(r, null, F, { kind: "accessor", name: "_max", static: !1, private: !1, access: { has: (e) => "_max" in e, get: (e) => e._max, set: (e, i) => {
164
+ e._max = i;
165
+ } }, metadata: t }, M, L), o(r, null, R, { kind: "accessor", name: "_renderCalendar", static: !1, private: !1, access: { has: (e) => "_renderCalendar" in e, get: (e) => e._renderCalendar, set: (e, i) => {
166
+ e._renderCalendar = i;
167
+ } }, metadata: t }, j, q), o(null, s = { value: c }, a, { kind: "class", name: c.name, metadata: t }, null, l), c = s.value, t && Object.defineProperty(c, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
168
+ })(), r.styles = ie, n(c, l), c;
176
169
  })();
177
170
  export {
178
- Ce as SbbDatepickerToggleElement
171
+ ge as SbbDatepickerToggleElement
179
172
  };
@@ -1,74 +1,84 @@
1
- var N = (i) => {
1
+ var L = (i) => {
2
2
  throw TypeError(i);
3
3
  };
4
- var L = (i, n, r) => n.has(i) || N("Cannot " + r);
5
- var f = (i, n, r) => (L(i, n, "read from private field"), r ? r.call(i) : n.get(i)), b = (i, n, r) => n.has(i) ? N("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(i) : n.set(i, r), h = (i, n, r, d) => (L(i, n, "write to private field"), d ? d.call(i, r) : n.set(i, r), r);
6
- import { __esDecorate as p, __runInitializers as u } from "tslib";
7
- import { css as q, isServer as H, html as $, LitElement as B } from "lit";
8
- import { customElement as G, property as A, state as J } from "lit/decorators.js";
9
- import { readConfig as K } from "../core/config.js";
10
- import { SbbLanguageController as Q } from "../core/controllers.js";
11
- import { defaultDateAdapter as W } from "../core/datetime.js";
12
- import { forceType as X } from "../core/decorators.js";
13
- import { findInput as Y, findReferencedElement as Z } from "../core/dom.js";
14
- import { EventEmitter as E, forwardEvent as tt } from "../core/eventing.js";
15
- import { i18nDatePickerPlaceholder as R, i18nDateChangedTo as et } from "../core/i18n.js";
16
- const at = q`:host{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
17
- function mt(i, n) {
4
+ var R = (i, n, r) => n.has(i) || L("Cannot " + r);
5
+ var b = (i, n, r) => (R(i, n, "read from private field"), r ? r.call(i) : n.get(i)), f = (i, n, r) => n.has(i) ? L("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(i) : n.set(i, r), o = (i, n, r, d) => (R(i, n, "write to private field"), d ? d.call(i, r) : n.set(i, r), r);
6
+ import { __esDecorate as h, __runInitializers as u } from "tslib";
7
+ import { css as $, LitElement as q, isServer as B, html as G } from "lit";
8
+ import { customElement as J, property as A, state as K } from "lit/decorators.js";
9
+ import { readConfig as Q } from "../core/config.js";
10
+ import { SbbLanguageController as W } from "../core/controllers.js";
11
+ import { defaultDateAdapter as X } from "../core/datetime.js";
12
+ import { forceType as Y } from "../core/decorators.js";
13
+ import { findInput as Z, findReferencedElement as tt } from "../core/dom.js";
14
+ import { EventEmitter as E, forwardEvent as et } from "../core/eventing.js";
15
+ import { i18nDatePickerPlaceholder as j, i18nDateChangedTo as at } from "../core/i18n.js";
16
+ import { SbbDatepickerAssociationHostController as it } from "./common.js";
17
+ const st = $`:host{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
18
+ function At(i, n) {
18
19
  var r, d;
19
- return n ? Z(n) : (d = (r = i.closest) == null ? void 0 : r.call(i, "sbb-form-field")) == null ? void 0 : d.querySelector("sbb-datepicker");
20
+ return n ? tt(n) : (d = (r = i.closest) == null ? void 0 : r.call(i, "sbb-form-field")) == null ? void 0 : d.querySelector("sbb-datepicker");
20
21
  }
21
- const vt = () => new CustomEvent("datepickerControlRegistered", {
22
+ const Et = () => new CustomEvent("datepickerControlRegistered", {
22
23
  bubbles: !1,
23
24
  composed: !0
24
25
  });
25
- let ft = (() => {
26
- var _, c, m, v, l;
27
- let i = [G("sbb-datepicker")], n, r = [], d, g = B, D = [], w, y = [], k = [], C, I = [], x = [], F, z = [], U = [], O, M, P, S = [], V = [];
28
- var o = (l = class extends g {
26
+ let nt = 0, Dt = (() => {
27
+ var c, _, m, v, l;
28
+ let i = [J("sbb-datepicker")], n, r = [], d, g = q, D = [], w, y = [], C = [], k, I = [], x = [], F, z = [], U = [], O, M, P, S = [], V = [];
29
+ var p = (l = class extends g {
29
30
  constructor() {
30
- var t, e;
31
+ var t;
31
32
  super();
32
- b(this, _);
33
- b(this, c);
34
- b(this, m);
35
- b(this, v);
36
- h(this, _, (u(this, D), u(this, y, !1))), h(this, c, (u(this, k), u(this, I, () => !0))), h(this, m, (u(this, x), u(this, z, null))), this._now = u(this, U), this._change = new E(this, o.events.change, {
33
+ f(this, c);
34
+ f(this, _);
35
+ f(this, m);
36
+ f(this, v);
37
+ o(this, c, (u(this, D), u(this, y, !1))), o(this, _, (u(this, C), u(this, I, () => !0))), o(this, m, (u(this, x), u(this, z, null))), this._now = u(this, U), o(this, v, u(this, S, null)), this._change = (u(this, V), new E(this, p.events.change, {
37
38
  bubbles: !0
38
- }), this._inputUpdated = new E(this, o.events.inputUpdated, { bubbles: !0, cancelable: !0 }), this._datePickerUpdated = new E(this, o.events.datePickerUpdated, {
39
+ })), this._inputUpdated = new E(this, p.events.inputUpdated, { bubbles: !0, cancelable: !0 }), this._datePickerUpdated = new E(this, p.events.datePickerUpdated, {
39
40
  bubbles: !0,
40
41
  cancelable: !0
41
- }), this._validationChange = new E(this, o.events.validationChange), h(this, v, u(this, S, null)), this._inputElementPlaceholderMutable = (u(this, V), !1), this._inputObserver = H ? null : new MutationObserver((a) => {
42
- if (this._emitInputUpdated(), this._inputElement && (a != null && a.some((s) => s.attributeName === "value"))) {
43
- const s = this._inputElement.getAttribute("value");
42
+ }), this._validationChange = new E(this, p.events.validationChange), this._inputElementPlaceholderMutable = !1, this._inputObserver = B ? null : new MutationObserver((e) => {
43
+ var a;
44
+ if (this._emitInputUpdated(), (a = this._associationController) == null || a.updateControls(), this.inputElement && (e != null && e.some((s) => s.attributeName === "value"))) {
45
+ const s = this.inputElement.getAttribute("value");
44
46
  this.valueAsDate = this._dateAdapter.parse(s, this.now) ?? s;
45
47
  }
46
- }), this._dateAdapter = ((t = K().datetime) == null ? void 0 : t.dateAdapter) ?? W, this._language = new Q(this).withHandler(() => {
47
- this._inputElement && (this._inputElementPlaceholderMutable && (this._inputElement.placeholder = R[this._language.current]), this.valueAsDate && (this._inputElement.value = this._dateAdapter.format(this.valueAsDate)));
48
- }), (e = this.addEventListener) == null || e.call(this, "datepickerControlRegistered", () => this._emitInputUpdated());
48
+ }), this._dateAdapter = ((t = Q().datetime) == null ? void 0 : t.dateAdapter) ?? X, this._language = new W(this).withHandler(() => {
49
+ this.inputElement && (this._inputElementPlaceholderMutable && (this.inputElement.placeholder = j[this._language.current]), this.valueAsDate && (this.inputElement.value = this._dateAdapter.format(this.valueAsDate)));
50
+ }), this._associationController = new it(this);
49
51
  }
50
52
  /** If set to true, two months are displayed. */
51
53
  get wide() {
52
- return f(this, _);
54
+ return b(this, c);
53
55
  }
54
56
  set wide(t) {
55
- h(this, _, t);
57
+ o(this, c, t);
56
58
  }
57
59
  /** A function used to filter out dates. */
58
60
  get dateFilter() {
59
- return f(this, c);
61
+ return b(this, _);
60
62
  }
61
63
  set dateFilter(t) {
62
- h(this, c, t);
64
+ o(this, _, t);
63
65
  }
64
- /** Reference of the native input connected to the datepicker. */
66
+ /**
67
+ * Reference of the native input connected to the datepicker.
68
+ * If given a string, it will be treated as an id reference and an attempt is
69
+ * made to be resolved for the containing document fragment.
70
+ * If given a HTMLElement instance, it will be used as is.
71
+ */
65
72
  get input() {
66
- return f(this, m);
73
+ return b(this, m);
67
74
  }
68
75
  set input(t) {
69
- h(this, m, t);
76
+ o(this, m, t);
70
77
  }
71
- /** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
78
+ /**
79
+ * A configured date which acts as the current date instead of the real current date.
80
+ * Recommended for testing purposes.
81
+ */
72
82
  set now(t) {
73
83
  this._now = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));
74
84
  }
@@ -77,19 +87,23 @@ let ft = (() => {
77
87
  }
78
88
  /** The currently selected date as a Date or custom date provider instance. */
79
89
  set valueAsDate(t) {
80
- this._valueAsDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)), this._tryApplyFormatToInput() && this._inputElement.dispatchEvent(new Event("blur", { composed: !0 }));
90
+ this._valueAsDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)), this._tryApplyFormatToInput() && this.inputElement.dispatchEvent(new Event("blur", { composed: !0 }));
81
91
  }
82
92
  get valueAsDate() {
83
93
  return this._valueAsDate ?? null;
84
94
  }
95
+ /** The resolved associated input element, as defined by `input`. */
96
+ get inputElement() {
97
+ return this._inputElement;
98
+ }
85
99
  get _inputElement() {
86
- return f(this, v);
100
+ return b(this, v);
87
101
  }
88
102
  set _inputElement(t) {
89
- h(this, v, t);
103
+ o(this, v, t);
90
104
  }
91
105
  connectedCallback() {
92
- super.connectedCallback(), this._attachInput(), this._inputElement && this._emitInputUpdated();
106
+ this.id || (this.id = `sbb-datepicker-${++nt}`), super.connectedCallback(), this._attachInput();
93
107
  }
94
108
  willUpdate(t) {
95
109
  super.willUpdate(t), t.has("input") && this._attachInput(), (t.has("wide") || t.has("dateFilter") || t.has("now")) && this._datePickerUpdated.emit(), t.has("valueAsDate") && this._setAriaLiveMessage();
@@ -109,39 +123,40 @@ let ft = (() => {
109
123
  return !!this._now;
110
124
  }
111
125
  _attachInput() {
112
- var e, a, s;
113
- const t = Y(this, this.input);
114
- if (this._inputElement !== t && (this._inputElement && ((e = this._datePickerController) == null || e.abort(), (a = this._inputObserver) == null || a.disconnect()), this._inputElement = t, t)) {
126
+ var e, a, s, T;
127
+ const t = Z(this, this.input);
128
+ if (this.inputElement !== t && (this.inputElement && ((e = this._datePickerController) == null || e.abort(), (a = this._inputObserver) == null || a.disconnect()), this._inputElement = t, t)) {
115
129
  this._datePickerController = new AbortController(), (s = this._inputObserver) == null || s.observe(t, {
116
130
  attributeFilter: ["disabled", "readonly", "min", "max", "value"]
117
- }), this._inputElementPlaceholderMutable = !t.placeholder, t.type = "text", this._inputElementPlaceholderMutable && (t.placeholder = R[this._language.current]);
118
- const T = { signal: this._datePickerController.signal };
119
- t.addEventListener("input", (j) => {
120
- tt(j, this), this._parseInput();
121
- }, T), t.addEventListener("change", () => this._handleInputChange(), T), this._parseInput(!0), this._tryApplyFormatToInput(), this._validateDate();
131
+ }), this._inputElementPlaceholderMutable = !t.placeholder, t.type = "text", this._inputElementPlaceholderMutable && (t.placeholder = j[this._language.current]);
132
+ const N = { signal: this._datePickerController.signal };
133
+ t.addEventListener("input", (H) => {
134
+ et(H, this), this._parseInput();
135
+ }, N), t.addEventListener("change", () => this._handleInputChange(), N), this._parseInput(!0), this._tryApplyFormatToInput(), this._validateDate(), this._emitInputUpdated(), (T = this._associationController) == null || T.updateControls();
122
136
  }
123
137
  }
124
138
  _emitInputUpdated() {
125
- const { disabled: t, readOnly: e, min: a, max: s } = this._inputElement ?? {};
139
+ const { disabled: t, readOnly: e, min: a, max: s } = this.inputElement ?? {};
126
140
  this._inputUpdated.emit({ disabled: t, readonly: e, min: a, max: s });
127
141
  }
128
142
  _handleInputChange() {
129
- this._tryApplyFormatToInput() || (this._validateDate(), this._setAriaLiveMessage(), this._change.emit());
143
+ var t;
144
+ this._tryApplyFormatToInput() || (this._validateDate(), this._setAriaLiveMessage(), this._change.emit(), (t = this._associationController) == null || t.updateControls());
130
145
  }
131
146
  _tryApplyFormatToInput() {
132
- if (!this._inputElement)
147
+ if (!this.inputElement)
133
148
  return !1;
134
149
  const t = this.valueAsDate ? this._dateAdapter.format(this.valueAsDate) : "";
135
- return t && this._inputElement.value !== t ? (Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value").set.call(this._inputElement, t), this._inputElement.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 })), this._inputElement.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), !0) : !1;
150
+ return t && this.inputElement.value !== t ? (Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value").set.call(this.inputElement, t), this.inputElement.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 })), this.inputElement.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), !0) : !1;
136
151
  }
137
152
  _validateDate() {
138
- if (!this._inputElement)
153
+ if (!this.inputElement)
139
154
  return;
140
- const t = !this._inputElement.value || this._isDateAvailable(), e = !this._inputElement.hasAttribute("data-sbb-invalid");
141
- this._inputElement.toggleAttribute("data-sbb-invalid", !t), e !== t && this._validationChange.emit({ valid: t });
155
+ const t = !this.inputElement.value || this._isDateAvailable(), e = !this.inputElement.hasAttribute("data-sbb-invalid");
156
+ this.inputElement.toggleAttribute("data-sbb-invalid", !t), e !== t && this._validationChange.emit({ valid: t });
142
157
  }
143
158
  _parseInput(t = !1) {
144
- const e = this._inputElement.value;
159
+ const e = this.inputElement.value;
145
160
  this._valueAsDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.parse(e, this.now)), t && !this._valueAsDate && (this._valueAsDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)));
146
161
  }
147
162
  _setAriaLiveMessage() {
@@ -152,12 +167,12 @@ let ft = (() => {
152
167
  t.innerText = "";
153
168
  else {
154
169
  const s = this._dateAdapter.format(this.valueAsDate, { weekdayStyle: "long" });
155
- t.innerText = `${et[this._language.current]} ${s}`;
170
+ t.innerText = `${at[this._language.current]} ${s}`;
156
171
  }
157
172
  else return;
158
173
  }
159
174
  render() {
160
- return $`<p id="status-container" role="status"></p>`;
175
+ return G`<p id="status-container" role="status"></p>`;
161
176
  }
162
177
  /**
163
178
  * Calculates the first available date before the given one,
@@ -166,7 +181,7 @@ let ft = (() => {
166
181
  */
167
182
  findPreviousAvailableDate(t) {
168
183
  var s;
169
- const e = this._findAvailableDate(t, -1), a = this._dateAdapter.deserialize((s = this._inputElement) == null ? void 0 : s.min);
184
+ const e = this._findAvailableDate(t, -1), a = this._dateAdapter.deserialize((s = this.inputElement) == null ? void 0 : s.min);
170
185
  return !a || this._dateAdapter.isValid(a) && this._dateAdapter.compareDate(e, a) >= 0 ? e : t;
171
186
  }
172
187
  /**
@@ -176,7 +191,7 @@ let ft = (() => {
176
191
  */
177
192
  findNextAvailableDate(t) {
178
193
  var s;
179
- const e = this._findAvailableDate(t, 1), a = this._dateAdapter.deserialize((s = this._inputElement) == null ? void 0 : s.max);
194
+ const e = this._findAvailableDate(t, 1), a = this._dateAdapter.deserialize((s = this.inputElement) == null ? void 0 : s.max);
180
195
  return !a || this._dateAdapter.isValid(a) && this._dateAdapter.compareDate(e, a) <= 0 ? e : t;
181
196
  }
182
197
  /**
@@ -199,34 +214,34 @@ let ft = (() => {
199
214
  var a, s;
200
215
  if (!this.valueAsDate)
201
216
  return !1;
202
- const t = this._dateAdapter.deserialize((a = this._inputElement) == null ? void 0 : a.min), e = this._dateAdapter.deserialize((s = this._inputElement) == null ? void 0 : s.max);
217
+ const t = this._dateAdapter.deserialize((a = this.inputElement) == null ? void 0 : a.min), e = this._dateAdapter.deserialize((s = this.inputElement) == null ? void 0 : s.max);
203
218
  return this._dateAdapter.isValid(t) && this._dateAdapter.compareDate(this.valueAsDate, t) < 0 || this._dateAdapter.isValid(e) && this._dateAdapter.compareDate(this.valueAsDate, e) > 0 ? !1 : this.dateFilter ? this.dateFilter(this.valueAsDate) : !0;
204
219
  }
205
- }, _ = new WeakMap(), c = new WeakMap(), m = new WeakMap(), v = new WeakMap(), d = l, (() => {
220
+ }, c = new WeakMap(), _ = new WeakMap(), m = new WeakMap(), v = new WeakMap(), d = l, (() => {
206
221
  const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(g[Symbol.metadata] ?? null) : void 0;
207
- w = [X(), A({ type: Boolean })], C = [A({ attribute: !1 })], F = [A()], O = [A()], M = [A({ attribute: !1 })], P = [J()], p(l, null, w, { kind: "accessor", name: "wide", static: !1, private: !1, access: { has: (e) => "wide" in e, get: (e) => e.wide, set: (e, a) => {
222
+ w = [Y(), A({ type: Boolean })], k = [A({ attribute: !1 })], F = [A()], O = [A()], M = [A({ attribute: !1 })], P = [K()], h(l, null, w, { kind: "accessor", name: "wide", static: !1, private: !1, access: { has: (e) => "wide" in e, get: (e) => e.wide, set: (e, a) => {
208
223
  e.wide = a;
209
- } }, metadata: t }, y, k), p(l, null, C, { kind: "accessor", name: "dateFilter", static: !1, private: !1, access: { has: (e) => "dateFilter" in e, get: (e) => e.dateFilter, set: (e, a) => {
224
+ } }, metadata: t }, y, C), h(l, null, k, { kind: "accessor", name: "dateFilter", static: !1, private: !1, access: { has: (e) => "dateFilter" in e, get: (e) => e.dateFilter, set: (e, a) => {
210
225
  e.dateFilter = a;
211
- } }, metadata: t }, I, x), p(l, null, F, { kind: "accessor", name: "input", static: !1, private: !1, access: { has: (e) => "input" in e, get: (e) => e.input, set: (e, a) => {
226
+ } }, metadata: t }, I, x), h(l, null, F, { kind: "accessor", name: "input", static: !1, private: !1, access: { has: (e) => "input" in e, get: (e) => e.input, set: (e, a) => {
212
227
  e.input = a;
213
- } }, metadata: t }, z, U), p(l, null, O, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (e) => "now" in e, set: (e, a) => {
228
+ } }, metadata: t }, z, U), h(l, null, O, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (e) => "now" in e, set: (e, a) => {
214
229
  e.now = a;
215
- } }, metadata: t }, null, D), p(l, null, M, { kind: "setter", name: "valueAsDate", static: !1, private: !1, access: { has: (e) => "valueAsDate" in e, set: (e, a) => {
230
+ } }, metadata: t }, null, D), h(l, null, M, { kind: "setter", name: "valueAsDate", static: !1, private: !1, access: { has: (e) => "valueAsDate" in e, set: (e, a) => {
216
231
  e.valueAsDate = a;
217
- } }, metadata: t }, null, D), p(l, null, P, { kind: "accessor", name: "_inputElement", static: !1, private: !1, access: { has: (e) => "_inputElement" in e, get: (e) => e._inputElement, set: (e, a) => {
232
+ } }, metadata: t }, null, D), h(l, null, P, { kind: "accessor", name: "_inputElement", static: !1, private: !1, access: { has: (e) => "_inputElement" in e, get: (e) => e._inputElement, set: (e, a) => {
218
233
  e._inputElement = a;
219
- } }, metadata: t }, S, V), p(null, n = { value: d }, i, { kind: "class", name: d.name, metadata: t }, null, r), o = d = n.value, t && Object.defineProperty(d, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
220
- })(), l.styles = at, l.events = {
234
+ } }, metadata: t }, S, V), h(null, n = { value: d }, i, { kind: "class", name: d.name, metadata: t }, null, r), p = d = n.value, t && Object.defineProperty(d, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
235
+ })(), l.styles = st, l.events = {
221
236
  change: "change",
222
237
  inputUpdated: "inputUpdated",
223
238
  datePickerUpdated: "datePickerUpdated",
224
239
  validationChange: "validationChange"
225
240
  }, u(d, r), l);
226
- return o = d;
241
+ return p = d;
227
242
  })();
228
243
  export {
229
- ft as SbbDatepickerElement,
230
- vt as datepickerControlRegisteredEventFactory,
231
- mt as getDatePicker
244
+ Dt as SbbDatepickerElement,
245
+ Et as datepickerControlRegisteredEventFactory,
246
+ At as getDatePicker
232
247
  };
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../../src/elements/accordion/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAQvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;;AAIjD;;;;GAIG;AACH,qBAEM,mBAAoB,SAAQ,wBAA6B;IAC7D,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;OAGG;IACH,SACgB,IAAI,EAAE,GAAG,GAAG,GAAG,CAAwB;IAEvD;;;OAGG;IACH,SAEgB,UAAU,EAAE,aAAa,GAAG,IAAI,CAAQ;IAExD,8EAA8E;IAC9E,SAGgB,KAAK,EAAE,OAAO,CAAS;;IAkBvC,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,YAAY;cAUD,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAU5E,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,wBAAwB;IAMhC,OAAO,CAAC,iBAAiB;cAWN,MAAM,IAAI,cAAc;CAO5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,eAAe,EAAE,mBAAmB,CAAC;KACtC;CACF"}
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../../src/elements/accordion/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAQvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;;AAIjD;;;;GAIG;AACH,qBAEM,mBAAoB,SAAQ,wBAA6B;IAC7D,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;OAGG;IACH,SACgB,IAAI,EAAE,GAAG,GAAG,GAAG,CAAwB;IAEvD;;;OAGG;IACH,SAEgB,UAAU,EAAE,aAAa,GAAG,IAAI,CAAQ;IAExD,8EAA8E;IAC9E,SAMgB,KAAK,EAAE,OAAO,CAAS;;IAkBvC,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,YAAY;cAUD,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAU5E,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,wBAAwB;IAMhC,OAAO,CAAC,iBAAiB;cAWN,MAAM,IAAI,cAAc;CAO5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,eAAe,EAAE,mBAAmB,CAAC;KACtC;CACF"}