@sbb-esta/lyne-elements 2.4.1 → 2.5.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 (260) hide show
  1. package/autocomplete/autocomplete-base-element.d.ts +0 -1
  2. package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  3. package/autocomplete.js +13 -13
  4. package/button/common/button-common.d.ts +1 -2
  5. package/button/common/button-common.d.ts.map +1 -1
  6. package/button/common.js +4 -4
  7. package/clock/clock.d.ts +8 -0
  8. package/clock/clock.d.ts.map +1 -1
  9. package/clock.js +40 -31
  10. package/core/a11y/focus.d.ts.map +1 -1
  11. package/core/base-elements/button-base-element.d.ts +5 -0
  12. package/core/base-elements/button-base-element.d.ts.map +1 -1
  13. package/core/base-elements.js +113 -98
  14. package/core/controllers/inert-controller.d.ts +3 -3
  15. package/core/controllers/inert-controller.d.ts.map +1 -1
  16. package/core/controllers.js +13 -12
  17. package/core/decorators/force-type.d.ts +1 -1
  18. package/core/decorators/force-type.d.ts.map +1 -1
  19. package/core/decorators.js +39 -40
  20. package/core/dom/platform.d.ts +5 -0
  21. package/core/dom/platform.d.ts.map +1 -1
  22. package/core/dom.js +10 -9
  23. package/core/i18n/i18n.d.ts +1 -0
  24. package/core/i18n/i18n.d.ts.map +1 -1
  25. package/core/i18n.js +95 -89
  26. package/core/mixins/animation-complete-mixin.d.ts +13 -0
  27. package/core/mixins/animation-complete-mixin.d.ts.map +1 -0
  28. package/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
  29. package/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
  30. package/core/mixins.d.ts +1 -0
  31. package/core/mixins.d.ts.map +1 -1
  32. package/core/mixins.js +195 -152
  33. package/core/styles/core.scss +81 -0
  34. package/core/styles/mixins/link.scss +14 -0
  35. package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables.scss +3 -0
  36. package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables_css--mixin.scss +4 -1
  37. package/core.css +51 -1
  38. package/custom-elements.json +4330 -291
  39. package/date-input/date-input.d.ts +11 -3
  40. package/date-input/date-input.d.ts.map +1 -1
  41. package/date-input.js +44 -38
  42. package/datepicker/datepicker/datepicker.d.ts.map +1 -1
  43. package/datepicker/datepicker.js +12 -12
  44. package/development/autocomplete/autocomplete-base-element.d.ts +0 -1
  45. package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  46. package/development/autocomplete.js +2 -4
  47. package/development/button/common/button-common.d.ts +1 -2
  48. package/development/button/common/button-common.d.ts.map +1 -1
  49. package/development/button/common.js +26 -24
  50. package/development/clock/clock.d.ts +8 -0
  51. package/development/clock/clock.d.ts.map +1 -1
  52. package/development/clock.js +20 -2
  53. package/development/core/a11y/focus.d.ts.map +1 -1
  54. package/development/core/a11y.js +1 -1
  55. package/development/core/base-elements/button-base-element.d.ts +5 -0
  56. package/development/core/base-elements/button-base-element.d.ts.map +1 -1
  57. package/development/core/base-elements.js +43 -15
  58. package/development/core/controllers/inert-controller.d.ts +3 -3
  59. package/development/core/controllers/inert-controller.d.ts.map +1 -1
  60. package/development/core/controllers.js +6 -7
  61. package/development/core/decorators/force-type.d.ts +1 -1
  62. package/development/core/decorators/force-type.d.ts.map +1 -1
  63. package/development/core/decorators.js +5 -5
  64. package/development/core/dom/platform.d.ts +5 -0
  65. package/development/core/dom/platform.d.ts.map +1 -1
  66. package/development/core/dom.js +3 -1
  67. package/development/core/i18n/i18n.d.ts +1 -0
  68. package/development/core/i18n/i18n.d.ts.map +1 -1
  69. package/development/core/i18n.js +8 -1
  70. package/development/core/mixins/animation-complete-mixin.d.ts +13 -0
  71. package/development/core/mixins/animation-complete-mixin.d.ts.map +1 -0
  72. package/development/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
  73. package/development/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
  74. package/development/core/mixins.d.ts +1 -0
  75. package/development/core/mixins.d.ts.map +1 -1
  76. package/development/core/mixins.js +57 -4
  77. package/development/date-input/date-input.d.ts +11 -3
  78. package/development/date-input/date-input.d.ts.map +1 -1
  79. package/development/date-input.js +26 -18
  80. package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
  81. package/development/datepicker/datepicker.js +2 -1
  82. package/development/dialog/dialog-title/dialog-title.d.ts +3 -1
  83. package/development/dialog/dialog-title/dialog-title.d.ts.map +1 -1
  84. package/development/dialog/dialog-title.js +7 -2
  85. package/development/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
  86. package/development/flip-card/flip-card-details.js +5 -3
  87. package/development/form-field/form-field.js +2 -2
  88. package/development/header/common.js +2 -2
  89. package/development/link/common.js +13 -1
  90. package/development/menu/menu/menu.d.ts.map +1 -1
  91. package/development/menu/menu.js +4 -1
  92. package/development/navigation/navigation/navigation.d.ts.map +1 -1
  93. package/development/navigation/navigation.js +4 -1
  94. package/development/overlay/overlay-base-element.d.ts.map +1 -1
  95. package/development/overlay.js +4 -1
  96. package/development/radio-button/radio-button-group/radio-button-group.d.ts +0 -1
  97. package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
  98. package/development/radio-button/radio-button-group.js +3 -5
  99. package/development/sbb-tokens-CSAKTXUi.js +1 -1
  100. package/development/select/select.d.ts +5 -2
  101. package/development/select/select.d.ts.map +1 -1
  102. package/development/select.js +6 -4
  103. package/development/sidebar/common.d.ts +1 -0
  104. package/development/sidebar/common.d.ts.map +1 -0
  105. package/development/sidebar/common.js +114 -0
  106. package/development/sidebar/icon-sidebar/icon-sidebar.d.ts +23 -0
  107. package/development/sidebar/icon-sidebar/icon-sidebar.d.ts.map +1 -0
  108. package/development/sidebar/icon-sidebar-button/icon-sidebar-button.d.ts +19 -0
  109. package/development/sidebar/icon-sidebar-button/icon-sidebar-button.d.ts.map +1 -0
  110. package/development/sidebar/icon-sidebar-button.d.ts +2 -0
  111. package/development/sidebar/icon-sidebar-button.d.ts.map +1 -0
  112. package/development/sidebar/icon-sidebar-button.js +28 -0
  113. package/development/sidebar/icon-sidebar-container/icon-sidebar-container.d.ts +23 -0
  114. package/development/sidebar/icon-sidebar-container/icon-sidebar-container.d.ts.map +1 -0
  115. package/development/sidebar/icon-sidebar-container.d.ts +2 -0
  116. package/development/sidebar/icon-sidebar-container.d.ts.map +1 -0
  117. package/development/sidebar/icon-sidebar-container.js +45 -0
  118. package/development/sidebar/icon-sidebar-content/icon-sidebar-content.d.ts +17 -0
  119. package/development/sidebar/icon-sidebar-content/icon-sidebar-content.d.ts.map +1 -0
  120. package/development/sidebar/icon-sidebar-content.d.ts +2 -0
  121. package/development/sidebar/icon-sidebar-content.d.ts.map +1 -0
  122. package/development/sidebar/icon-sidebar-content.js +34 -0
  123. package/development/sidebar/icon-sidebar-link/icon-sidebar-link.d.ts +19 -0
  124. package/development/sidebar/icon-sidebar-link/icon-sidebar-link.d.ts.map +1 -0
  125. package/development/sidebar/icon-sidebar-link.d.ts +2 -0
  126. package/development/sidebar/icon-sidebar-link.d.ts.map +1 -0
  127. package/development/sidebar/icon-sidebar-link.js +28 -0
  128. package/development/sidebar/icon-sidebar.d.ts +2 -0
  129. package/development/sidebar/icon-sidebar.d.ts.map +1 -0
  130. package/development/sidebar/icon-sidebar.js +85 -0
  131. package/development/sidebar/sidebar/sidebar.d.ts +76 -0
  132. package/development/sidebar/sidebar/sidebar.d.ts.map +1 -0
  133. package/development/sidebar/sidebar-close-button/sidebar-close-button.d.ts +22 -0
  134. package/development/sidebar/sidebar-close-button/sidebar-close-button.d.ts.map +1 -0
  135. package/development/sidebar/sidebar-close-button.d.ts +2 -0
  136. package/development/sidebar/sidebar-close-button.d.ts.map +1 -0
  137. package/development/sidebar/sidebar-close-button.js +55 -0
  138. package/development/sidebar/sidebar-container/sidebar-container.d.ts +34 -0
  139. package/development/sidebar/sidebar-container/sidebar-container.d.ts.map +1 -0
  140. package/development/sidebar/sidebar-container.d.ts +2 -0
  141. package/development/sidebar/sidebar-container.d.ts.map +1 -0
  142. package/development/sidebar/sidebar-container.js +153 -0
  143. package/development/sidebar/sidebar-content/sidebar-content.d.ts +18 -0
  144. package/development/sidebar/sidebar-content/sidebar-content.d.ts.map +1 -0
  145. package/development/sidebar/sidebar-content.d.ts +2 -0
  146. package/development/sidebar/sidebar-content.d.ts.map +1 -0
  147. package/development/sidebar/sidebar-content.js +37 -0
  148. package/development/sidebar/sidebar-title/sidebar-title.d.ts +17 -0
  149. package/development/sidebar/sidebar-title/sidebar-title.d.ts.map +1 -0
  150. package/development/sidebar/sidebar-title.d.ts +2 -0
  151. package/development/sidebar/sidebar-title.d.ts.map +1 -0
  152. package/development/sidebar/sidebar-title.js +63 -0
  153. package/development/sidebar/sidebar.d.ts +2 -0
  154. package/development/sidebar/sidebar.d.ts.map +1 -0
  155. package/development/sidebar/sidebar.js +523 -0
  156. package/development/sidebar.d.ts +12 -0
  157. package/development/sidebar.d.ts.map +1 -0
  158. package/development/sidebar.js +12 -0
  159. package/development/stepper/step/step.d.ts +1 -3
  160. package/development/stepper/step/step.d.ts.map +1 -1
  161. package/development/stepper/step.js +20 -14
  162. package/development/time-input/time-input.d.ts +3 -2
  163. package/development/time-input/time-input.d.ts.map +1 -1
  164. package/development/time-input.js +19 -10
  165. package/development/title/title-base.d.ts +2 -4
  166. package/development/title/title-base.d.ts.map +1 -1
  167. package/development/title/title.d.ts +3 -1
  168. package/development/title/title.d.ts.map +1 -1
  169. package/development/title.js +8 -8
  170. package/dialog/dialog-title/dialog-title.d.ts +3 -1
  171. package/dialog/dialog-title/dialog-title.d.ts.map +1 -1
  172. package/dialog/dialog-title.js +16 -15
  173. package/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
  174. package/flip-card/flip-card-details.js +14 -13
  175. package/form-field/form-field.js +1 -1
  176. package/header/common.js +6 -6
  177. package/index.d.ts +20 -0
  178. package/index.js +20 -0
  179. package/link/common.js +12 -12
  180. package/menu/menu/menu.d.ts.map +1 -1
  181. package/menu/menu.js +1 -1
  182. package/navigation/navigation/navigation.d.ts.map +1 -1
  183. package/navigation/navigation.js +7 -7
  184. package/overlay/overlay-base-element.d.ts.map +1 -1
  185. package/overlay.js +1 -1
  186. package/package.json +61 -1
  187. package/radio-button/radio-button-group/radio-button-group.d.ts +0 -1
  188. package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
  189. package/radio-button/radio-button-group.js +8 -8
  190. package/select/select.d.ts +5 -2
  191. package/select/select.d.ts.map +1 -1
  192. package/select.js +8 -9
  193. package/sidebar/common.d.ts +1 -0
  194. package/sidebar/common.d.ts.map +1 -0
  195. package/sidebar/common.js +7 -0
  196. package/sidebar/icon-sidebar/icon-sidebar.d.ts +23 -0
  197. package/sidebar/icon-sidebar/icon-sidebar.d.ts.map +1 -0
  198. package/sidebar/icon-sidebar-button/icon-sidebar-button.d.ts +19 -0
  199. package/sidebar/icon-sidebar-button/icon-sidebar-button.d.ts.map +1 -0
  200. package/sidebar/icon-sidebar-button.d.ts +2 -0
  201. package/sidebar/icon-sidebar-button.d.ts.map +1 -0
  202. package/sidebar/icon-sidebar-button.js +20 -0
  203. package/sidebar/icon-sidebar-container/icon-sidebar-container.d.ts +23 -0
  204. package/sidebar/icon-sidebar-container/icon-sidebar-container.d.ts.map +1 -0
  205. package/sidebar/icon-sidebar-container.d.ts +2 -0
  206. package/sidebar/icon-sidebar-container.d.ts.map +1 -0
  207. package/sidebar/icon-sidebar-container.js +35 -0
  208. package/sidebar/icon-sidebar-content/icon-sidebar-content.d.ts +17 -0
  209. package/sidebar/icon-sidebar-content/icon-sidebar-content.d.ts.map +1 -0
  210. package/sidebar/icon-sidebar-content.d.ts +2 -0
  211. package/sidebar/icon-sidebar-content.d.ts.map +1 -0
  212. package/sidebar/icon-sidebar-content.js +23 -0
  213. package/sidebar/icon-sidebar-link/icon-sidebar-link.d.ts +19 -0
  214. package/sidebar/icon-sidebar-link/icon-sidebar-link.d.ts.map +1 -0
  215. package/sidebar/icon-sidebar-link.d.ts +2 -0
  216. package/sidebar/icon-sidebar-link.d.ts.map +1 -0
  217. package/sidebar/icon-sidebar-link.js +20 -0
  218. package/sidebar/icon-sidebar.d.ts +2 -0
  219. package/sidebar/icon-sidebar.d.ts.map +1 -0
  220. package/sidebar/icon-sidebar.js +47 -0
  221. package/sidebar/sidebar/sidebar.d.ts +76 -0
  222. package/sidebar/sidebar/sidebar.d.ts.map +1 -0
  223. package/sidebar/sidebar-close-button/sidebar-close-button.d.ts +22 -0
  224. package/sidebar/sidebar-close-button/sidebar-close-button.d.ts.map +1 -0
  225. package/sidebar/sidebar-close-button.d.ts +2 -0
  226. package/sidebar/sidebar-close-button.d.ts.map +1 -0
  227. package/sidebar/sidebar-close-button.js +29 -0
  228. package/sidebar/sidebar-container/sidebar-container.d.ts +34 -0
  229. package/sidebar/sidebar-container/sidebar-container.d.ts.map +1 -0
  230. package/sidebar/sidebar-container.d.ts +2 -0
  231. package/sidebar/sidebar-container.d.ts.map +1 -0
  232. package/sidebar/sidebar-container.js +78 -0
  233. package/sidebar/sidebar-content/sidebar-content.d.ts +18 -0
  234. package/sidebar/sidebar-content/sidebar-content.d.ts.map +1 -0
  235. package/sidebar/sidebar-content.d.ts +2 -0
  236. package/sidebar/sidebar-content.d.ts.map +1 -0
  237. package/sidebar/sidebar-content.js +23 -0
  238. package/sidebar/sidebar-title/sidebar-title.d.ts +17 -0
  239. package/sidebar/sidebar-title/sidebar-title.d.ts.map +1 -0
  240. package/sidebar/sidebar-title.d.ts +2 -0
  241. package/sidebar/sidebar-title.d.ts.map +1 -0
  242. package/sidebar/sidebar-title.js +37 -0
  243. package/sidebar/sidebar.d.ts +2 -0
  244. package/sidebar/sidebar.d.ts.map +1 -0
  245. package/sidebar/sidebar.js +214 -0
  246. package/sidebar.d.ts +12 -0
  247. package/sidebar.d.ts.map +1 -0
  248. package/sidebar.js +11 -0
  249. package/standard-theme.css +51 -1
  250. package/stepper/step/step.d.ts +1 -3
  251. package/stepper/step/step.d.ts.map +1 -1
  252. package/stepper/step.js +12 -15
  253. package/time-input/time-input.d.ts +3 -2
  254. package/time-input/time-input.d.ts.map +1 -1
  255. package/time-input.js +44 -36
  256. package/title/title-base.d.ts +2 -4
  257. package/title/title-base.d.ts.map +1 -1
  258. package/title/title.d.ts +3 -1
  259. package/title/title.d.ts.map +1 -1
  260. package/title.js +11 -11
@@ -1,26 +1,26 @@
1
1
  var V = (l) => {
2
2
  throw TypeError(l);
3
3
  };
4
- var W = (l, r, n) => r.has(l) || V("Cannot " + n);
5
- var g = (l, r, n) => (W(l, r, "read from private field"), n ? n.call(l) : r.get(l)), k = (l, r, n) => r.has(l) ? V("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(l) : r.set(l, n), h = (l, r, n, i) => (W(l, r, "write to private field"), i ? i.call(l, n) : r.set(l, n), n);
6
- import { __esDecorate as _, __runInitializers as o } from "tslib";
7
- import { LitElement as J, html as B, isServer as Q, nothing as y } from "lit";
8
- import { hostAttributes as T, forceType as D } from "./decorators.js";
9
- import { property as v } from "lit/decorators.js";
10
- import { isEventPrevented as X, EventEmitter as A } from "./eventing.js";
11
- import { SbbFormAssociatedMixin as Y } from "./mixins.js";
12
- import { SbbLanguageController as Z } from "./controllers.js";
13
- import { i18nTargetOpensInNewWindow as ee } from "./i18n.js";
4
+ var G = (l, r, n) => r.has(l) || V("Cannot " + n);
5
+ var v = (l, r, n) => (G(l, r, "read from private field"), n ? n.call(l) : r.get(l)), k = (l, r, n) => r.has(l) ? V("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(l) : r.set(l, n), h = (l, r, n, i) => (G(l, r, "write to private field"), i ? i.call(l, n) : r.set(l, n), n);
6
+ import { __esDecorate as f, __runInitializers as c } from "tslib";
7
+ import { LitElement as Q, html as T, isServer as U, nothing as y } from "lit";
8
+ import { hostAttributes as P, forceType as O, omitEmptyConverter as K } from "./decorators.js";
9
+ import { property as g } from "lit/decorators.js";
10
+ import { isEventPrevented as Y, EventEmitter as A } from "./eventing.js";
11
+ import { SbbFormAssociatedMixin as Z } from "./mixins.js";
12
+ import { SbbLanguageController as ee } from "./controllers.js";
13
+ import { i18nTargetOpensInNewWindow as te } from "./i18n.js";
14
14
  import "../screen-reader-only.js";
15
- let U = (() => {
15
+ let X = (() => {
16
16
  var u;
17
- let l = [T({
17
+ let l = [P({
18
18
  "data-action": ""
19
- })], r, n = [], i, f = J;
20
- return u = class extends f {
19
+ })], r, n = [], i, _ = Q;
20
+ return u = class extends _ {
21
21
  get maybeDisabled() {
22
- const d = this;
23
- return d.disabled || d.formDisabled;
22
+ const o = this;
23
+ return o.disabled || o.formDisabled;
24
24
  }
25
25
  get maybeDisabledInteractive() {
26
26
  return this.disabledInteractive;
@@ -31,8 +31,8 @@ let U = (() => {
31
31
  setupBaseEventHandlers() {
32
32
  this.addEventListener(
33
33
  "click",
34
- (d) => {
35
- this.maybeDisabled && !this.maybeDisabledInteractive && (d.preventDefault(), d.stopImmediatePropagation());
34
+ (o) => {
35
+ this.maybeDisabled && !this.maybeDisabledInteractive && (o.preventDefault(), o.stopImmediatePropagation());
36
36
  },
37
37
  // capture is necessary here, as this event handler needs to be executed before any other
38
38
  // in order to stop immediate propagation in the disabled case.
@@ -45,19 +45,19 @@ let U = (() => {
45
45
  }
46
46
  /** Default render method for button-like components. */
47
47
  render() {
48
- return B`<span class="sbb-action-base ${this.localName}">${this.renderTemplate()}</span>`;
48
+ return T`<span class="sbb-action-base ${this.localName}">${this.renderTemplate()}</span>`;
49
49
  }
50
50
  }, i = u, (() => {
51
- const d = typeof Symbol == "function" && Symbol.metadata ? Object.create(f[Symbol.metadata] ?? null) : void 0;
52
- _(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: d }, null, n), i = r.value, d && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: d }), o(i, n);
51
+ const o = typeof Symbol == "function" && Symbol.metadata ? Object.create(_[Symbol.metadata] ?? null) : void 0;
52
+ f(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: o }, null, n), i = r.value, o && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: o }), c(i, n);
53
53
  })(), i;
54
- })(), he = (() => {
54
+ })(), be = (() => {
55
55
  var m;
56
- let l = [T({
56
+ let l = [P({
57
57
  tabindex: "0",
58
58
  "data-button": ""
59
- })], r, n = [], i, f = Y(U), u = [], O, d;
60
- return m = class extends f {
59
+ })], r, n = [], i, _ = Z(X), u = [], x, o;
60
+ return m = class extends _ {
61
61
  /**
62
62
  * The type attribute to use for the button.
63
63
  * @default 'button'
@@ -70,22 +70,20 @@ let U = (() => {
70
70
  }
71
71
  /** The `<form>` element to associate the button with. */
72
72
  set form(e) {
73
- this._formId = e;
73
+ var t;
74
+ this._formId = e, (t = this.form) == null || t.addEventListener("keydown", this._formKeyDown, { capture: !0 });
74
75
  }
75
76
  get form() {
76
- var e, s;
77
- return this._formId ? ((s = (e = this.ownerDocument) == null ? void 0 : e.querySelector) == null ? void 0 : s.call(e, `form#${this._formId}`)) ?? null : this.internals.form;
77
+ var e, t;
78
+ return this._formId ? ((t = (e = this.ownerDocument) == null ? void 0 : e.querySelector) == null ? void 0 : t.call(e, `form#${this._formId}`)) ?? null : this.internals.form;
78
79
  }
79
80
  constructor() {
80
- if (super(), this._formId = (o(this, u), ""), this._handleButtonClick = async (e) => {
81
- if (this.type === "button" || await X(e))
81
+ if (super(), this._elementsOnWhichEnterPressTriggersSubmit = (c(this, u), ["input", "sbb-date-input"]), this._formId = "", this._handleButtonClick = async (e) => {
82
+ if (this.type === "button" || await Y(e))
82
83
  return;
83
- const s = this.form;
84
- if (s)
85
- if (this.type === "submit") {
86
- const c = document.createElement("button");
87
- c.inert = !0, c.hidden = !0, c.name = this.name, c.value = this.value ?? "", s.append(c), s.requestSubmit(c), c.remove();
88
- } else this.type === "reset" && s.reset();
84
+ const t = this.form;
85
+ if (t)
86
+ this.type === "submit" ? this._requestSubmit(t) : this.type === "reset" && t.reset();
89
87
  else return;
90
88
  }, this._preventScrollOnSpaceKeydown = (e) => {
91
89
  e.key === " " && (e.preventDefault(), e.target.toggleAttribute("data-active", !0));
@@ -93,30 +91,47 @@ let U = (() => {
93
91
  e.target.removeAttribute("data-active");
94
92
  }, this._dispatchClickEventOnSpaceKeyup = (e) => {
95
93
  e.key === " " && (this._removeActiveMarker(e), this._dispatchClickEvent(e));
94
+ }, this._formKeyDown = (e) => {
95
+ var d;
96
+ const t = this.form;
97
+ this.type === "submit" && t && (e.key === "Enter" || e.key === `
98
+ `) && this._elementsOnWhichEnterPressTriggersSubmit.includes((d = e.target) == null ? void 0 : d.localName) && e.isTrusted && (e.stopImmediatePropagation(), e.preventDefault(), e.composedPath()[0].dispatchEvent(new KeyboardEvent(e.type, e)) && !this.matches(":disabled") && this._requestSubmit(t));
96
99
  }, this._dispatchClickEvent = (e) => {
97
- const { altKey: s, ctrlKey: c, metaKey: z, shiftKey: $ } = e;
100
+ const { altKey: t, ctrlKey: d, metaKey: z, shiftKey: $ } = e;
98
101
  e.target.dispatchEvent(new PointerEvent("click", {
99
102
  bubbles: !0,
100
103
  cancelable: !0,
101
104
  composed: !0,
102
105
  pointerId: -1,
103
106
  pointerType: "",
104
- altKey: s,
105
- ctrlKey: c,
107
+ altKey: t,
108
+ ctrlKey: d,
106
109
  metaKey: z,
107
110
  shiftKey: $
108
111
  }));
109
- }, this.internals.role = "button", !Q) {
112
+ }, this.internals.role = "button", !U) {
110
113
  this.setupBaseEventHandlers();
111
114
  const e = { passive: !0 };
112
- this.addEventListener("click", this._handleButtonClick), this.addEventListener("keydown", this._preventScrollOnSpaceKeydown), this.addEventListener("keyup", this._dispatchClickEventOnSpaceKeyup, e), this.addEventListener("blur", this._removeActiveMarker, e), this.addEventListener("keypress", (s) => {
113
- (s.key === "Enter" || s.key === `
114
- `) && this._dispatchClickEvent(s);
115
+ this.addEventListener("click", this._handleButtonClick), this.addEventListener("keydown", this._preventScrollOnSpaceKeydown), this.addEventListener("keyup", this._dispatchClickEventOnSpaceKeyup, e), this.addEventListener("blur", this._removeActiveMarker, e), this.addEventListener("keypress", (t) => {
116
+ (t.key === "Enter" || t.key === `
117
+ `) && this._dispatchClickEvent(t);
115
118
  }, e);
116
119
  }
117
120
  }
118
- attributeChangedCallback(e, s, c) {
119
- (!["name", "value"].includes(e) || s !== c) && super.attributeChangedCallback(e, s, c);
121
+ connectedCallback() {
122
+ var e;
123
+ super.connectedCallback(), (e = this.form) == null || e.addEventListener("keydown", this._formKeyDown, { capture: !0 });
124
+ }
125
+ disconnectedCallback() {
126
+ var e;
127
+ super.disconnectedCallback(), (e = this.form) == null || e.removeEventListener("keydown", this._formKeyDown, { capture: !0 });
128
+ }
129
+ _requestSubmit(e) {
130
+ const t = document.createElement("button");
131
+ t.inert = !0, t.hidden = !0, t.name = this.name, t.value = this.value ?? "", e.append(t), e.requestSubmit(t), t.remove();
132
+ }
133
+ attributeChangedCallback(e, t, d) {
134
+ (!["name", "value"].includes(e) || t !== d) && super.attributeChangedCallback(e, t, d);
120
135
  }
121
136
  /**
122
137
  * Intentionally empty, as buttons are not targeted by form reset
@@ -128,7 +143,7 @@ let U = (() => {
128
143
  * Intentionally empty, as buttons are not targeted by form restore
129
144
  * @internal
130
145
  */
131
- formStateRestoreCallback(e, s) {
146
+ formStateRestoreCallback(e, t) {
132
147
  }
133
148
  /**
134
149
  * Intentionally empty, as button does not write its data in form.
@@ -138,75 +153,75 @@ let U = (() => {
138
153
  updateFormValue() {
139
154
  }
140
155
  }, i = m, (() => {
141
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(f[Symbol.metadata] ?? null) : void 0;
142
- O = [v()], d = [v()], _(m, null, O, { kind: "setter", name: "type", static: !1, private: !1, access: { has: (s) => "type" in s, set: (s, c) => {
143
- s.type = c;
144
- } }, metadata: e }, null, u), _(m, null, d, { kind: "setter", name: "form", static: !1, private: !1, access: { has: (s) => "form" in s, set: (s, c) => {
145
- s.form = c;
146
- } }, metadata: e }, null, u), _(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: e }, null, n), i = r.value, e && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e }), o(i, n);
156
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(_[Symbol.metadata] ?? null) : void 0;
157
+ x = [g()], o = [g()], f(m, null, x, { kind: "setter", name: "type", static: !1, private: !1, access: { has: (t) => "type" in t, set: (t, d) => {
158
+ t.type = d;
159
+ } }, metadata: e }, null, u), f(m, null, o, { kind: "setter", name: "form", static: !1, private: !1, access: { has: (t) => "form" in t, set: (t, d) => {
160
+ t.form = d;
161
+ } }, metadata: e }, null, u), f(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: e }, null, n), i = r.value, e && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e }), c(i, n);
147
162
  })(), i;
148
- })(), be = (() => {
149
- var C, S, E, I, L, x, b;
150
- let l = [T({
163
+ })(), me = (() => {
164
+ var C, E, S, L, D, I, b;
165
+ let l = [P({
151
166
  "data-link": ""
152
- })], r, n = [], i, f = U, u, O = [], d = [], m, K = [], e = [], s, c = [], z = [], $, R = [], j = [], P, q = [], M = [], H, N = [], F = [];
153
- return b = class extends f {
167
+ })], r, n = [], i, _ = X, u, x = [], o = [], m, B = [], e = [], t, d = [], z = [], $, q = [], R = [], j, M = [], N = [], H, W = [], F = [];
168
+ return b = class extends _ {
154
169
  constructor() {
155
170
  super();
156
171
  k(this, C);
157
- k(this, S);
158
172
  k(this, E);
159
- k(this, I);
173
+ k(this, S);
160
174
  k(this, L);
161
- k(this, x);
162
- h(this, C, o(this, O, "")), h(this, S, (o(this, d), o(this, K, ""))), h(this, E, (o(this, e), o(this, c, ""))), h(this, I, (o(this, z), o(this, R, !1))), h(this, L, (o(this, j), o(this, q, ""))), h(this, x, (o(this, M), o(this, N, ""))), this.language = (o(this, F), new Z(this)), this._evaluateRelAttribute = () => this.rel ? this.rel : this.target === "_blank" ? "external noopener nofollow" : y, Q || this.setupBaseEventHandlers();
175
+ k(this, D);
176
+ k(this, I);
177
+ h(this, C, c(this, x, "")), h(this, E, (c(this, o), c(this, B, ""))), h(this, S, (c(this, e), c(this, d, ""))), h(this, L, (c(this, z), c(this, q, !1))), h(this, D, (c(this, R), c(this, M, ""))), h(this, I, (c(this, N), c(this, W, ""))), this.language = (c(this, F), new ee(this)), this._evaluateRelAttribute = () => this.rel ? this.rel : this.target === "_blank" ? "external noopener nofollow" : y, U || this.setupBaseEventHandlers();
163
178
  }
164
179
  /** The href value you want to link to. */
165
180
  get href() {
166
- return g(this, C);
181
+ return v(this, C);
167
182
  }
168
183
  set href(a) {
169
184
  h(this, C, a);
170
185
  }
171
186
  /** Where to display the linked URL. */
172
187
  get target() {
173
- return g(this, S);
188
+ return v(this, E);
174
189
  }
175
190
  set target(a) {
176
- h(this, S, a);
191
+ h(this, E, a);
177
192
  }
178
193
  /** The relationship of the linked URL as space-separated link types. */
179
194
  get rel() {
180
- return g(this, E);
195
+ return v(this, S);
181
196
  }
182
197
  set rel(a) {
183
- h(this, E, a);
198
+ h(this, S, a);
184
199
  }
185
200
  /** Whether the browser will show the download dialog on click. */
186
201
  get download() {
187
- return g(this, I);
202
+ return v(this, L);
188
203
  }
189
204
  set download(a) {
190
- h(this, I, a);
205
+ h(this, L, a);
191
206
  }
192
207
  /** This will be forwarded as aria-label to the inner anchor element. */
193
208
  get accessibilityLabel() {
194
- return g(this, L);
209
+ return v(this, D);
195
210
  }
196
211
  set accessibilityLabel(a) {
197
- h(this, L, a);
212
+ h(this, D, a);
198
213
  }
199
214
  /** This will be forwarded as aria-current to the inner anchor element. */
200
215
  get accessibilityCurrent() {
201
- return g(this, x);
216
+ return v(this, I);
202
217
  }
203
218
  set accessibilityCurrent(a) {
204
- h(this, x, a);
219
+ h(this, I, a);
205
220
  }
206
221
  /** @internal */
207
222
  focus(a) {
208
- var t;
209
- (t = this.shadowRoot.querySelector("a")) == null || t.focus(a);
223
+ var s;
224
+ (s = this.shadowRoot.querySelector("a")) == null || s.focus(a);
210
225
  }
211
226
  /** @internal */
212
227
  blur() {
@@ -223,7 +238,7 @@ let U = (() => {
223
238
  return this.renderLink(this.renderTemplate());
224
239
  }
225
240
  renderLink(a) {
226
- return B`
241
+ return T`
227
242
  <a
228
243
  class="sbb-action-base ${this.localName}"
229
244
  href=${this.href || y}
@@ -236,30 +251,30 @@ let U = (() => {
236
251
  aria-disabled=${this.maybeDisabled ? "true" : y}
237
252
  >
238
253
  ${a}
239
- ${this.href && this.target === "_blank" ? B`<sbb-screen-reader-only
240
- >. ${ee[this.language.current]}</sbb-screen-reader-only
254
+ ${this.href && this.target === "_blank" ? T`<sbb-screen-reader-only
255
+ >. ${te[this.language.current]}</sbb-screen-reader-only
241
256
  >` : y}
242
257
  </a>
243
258
  `;
244
259
  }
245
- }, C = new WeakMap(), S = new WeakMap(), E = new WeakMap(), I = new WeakMap(), L = new WeakMap(), x = new WeakMap(), i = b, (() => {
246
- const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(f[Symbol.metadata] ?? null) : void 0;
247
- u = [D(), v()], m = [D(), v()], s = [D(), v()], $ = [D(), v({ type: Boolean })], P = [D(), v({ attribute: "accessibility-label" })], H = [D(), v({ attribute: "accessibility-current" })], _(b, null, u, { kind: "accessor", name: "href", static: !1, private: !1, access: { has: (t) => "href" in t, get: (t) => t.href, set: (t, p) => {
248
- t.href = p;
249
- } }, metadata: a }, O, d), _(b, null, m, { kind: "accessor", name: "target", static: !1, private: !1, access: { has: (t) => "target" in t, get: (t) => t.target, set: (t, p) => {
250
- t.target = p;
251
- } }, metadata: a }, K, e), _(b, null, s, { kind: "accessor", name: "rel", static: !1, private: !1, access: { has: (t) => "rel" in t, get: (t) => t.rel, set: (t, p) => {
252
- t.rel = p;
253
- } }, metadata: a }, c, z), _(b, null, $, { kind: "accessor", name: "download", static: !1, private: !1, access: { has: (t) => "download" in t, get: (t) => t.download, set: (t, p) => {
254
- t.download = p;
255
- } }, metadata: a }, R, j), _(b, null, P, { kind: "accessor", name: "accessibilityLabel", static: !1, private: !1, access: { has: (t) => "accessibilityLabel" in t, get: (t) => t.accessibilityLabel, set: (t, p) => {
256
- t.accessibilityLabel = p;
257
- } }, metadata: a }, q, M), _(b, null, H, { kind: "accessor", name: "accessibilityCurrent", static: !1, private: !1, access: { has: (t) => "accessibilityCurrent" in t, get: (t) => t.accessibilityCurrent, set: (t, p) => {
258
- t.accessibilityCurrent = p;
259
- } }, metadata: a }, N, F), _(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: a }, null, n), i = r.value, a && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a }), o(i, n);
260
+ }, C = new WeakMap(), E = new WeakMap(), S = new WeakMap(), L = new WeakMap(), D = new WeakMap(), I = new WeakMap(), i = b, (() => {
261
+ const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(_[Symbol.metadata] ?? null) : void 0;
262
+ u = [O(), g({ reflect: !0, converter: K })], m = [O(), g({ reflect: !0, converter: K })], t = [O(), g({ reflect: !0, converter: K })], $ = [O(), g({ type: Boolean, reflect: !0 })], j = [O(), g({ attribute: "accessibility-label" })], H = [O(), g({ attribute: "accessibility-current" })], f(b, null, u, { kind: "accessor", name: "href", static: !1, private: !1, access: { has: (s) => "href" in s, get: (s) => s.href, set: (s, p) => {
263
+ s.href = p;
264
+ } }, metadata: a }, x, o), f(b, null, m, { kind: "accessor", name: "target", static: !1, private: !1, access: { has: (s) => "target" in s, get: (s) => s.target, set: (s, p) => {
265
+ s.target = p;
266
+ } }, metadata: a }, B, e), f(b, null, t, { kind: "accessor", name: "rel", static: !1, private: !1, access: { has: (s) => "rel" in s, get: (s) => s.rel, set: (s, p) => {
267
+ s.rel = p;
268
+ } }, metadata: a }, d, z), f(b, null, $, { kind: "accessor", name: "download", static: !1, private: !1, access: { has: (s) => "download" in s, get: (s) => s.download, set: (s, p) => {
269
+ s.download = p;
270
+ } }, metadata: a }, q, R), f(b, null, j, { kind: "accessor", name: "accessibilityLabel", static: !1, private: !1, access: { has: (s) => "accessibilityLabel" in s, get: (s) => s.accessibilityLabel, set: (s, p) => {
271
+ s.accessibilityLabel = p;
272
+ } }, metadata: a }, M, N), f(b, null, H, { kind: "accessor", name: "accessibilityCurrent", static: !1, private: !1, access: { has: (s) => "accessibilityCurrent" in s, get: (s) => s.accessibilityCurrent, set: (s, p) => {
273
+ s.accessibilityCurrent = p;
274
+ } }, metadata: a }, W, F), f(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: a }, null, n), i = r.value, a && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a }), c(i, n);
260
275
  })(), i;
261
276
  })();
262
- const w = class w extends J {
277
+ const w = class w extends Q {
263
278
  constructor() {
264
279
  super(...arguments), this.willOpen = new A(this, w.events.willOpen, { cancelable: !0 }), this.didOpen = new A(this, w.events.didOpen, {
265
280
  cancelable: !0
@@ -286,10 +301,10 @@ w.events = {
286
301
  willClose: "willClose",
287
302
  didClose: "didClose"
288
303
  };
289
- let G = w;
304
+ let J = w;
290
305
  export {
291
- U as SbbActionBaseElement,
292
- he as SbbButtonBaseElement,
293
- be as SbbLinkBaseElement,
294
- G as SbbOpenCloseBaseElement
306
+ X as SbbActionBaseElement,
307
+ be as SbbButtonBaseElement,
308
+ me as SbbLinkBaseElement,
309
+ J as SbbOpenCloseBaseElement
295
310
  };
@@ -1,16 +1,16 @@
1
1
  import { ReactiveController, ReactiveControllerHost } from 'lit';
2
- import { SbbOpenCloseBaseElement } from '../base-elements/open-close-base-element.js';
3
2
  export declare class SbbInertController implements ReactiveController {
4
3
  private _host;
5
4
  private _inertElements;
6
5
  private _inertOverlays;
7
- constructor(_host: ReactiveControllerHost & SbbOpenCloseBaseElement, _inertElements?: Set<HTMLElement>, _inertOverlays?: Set<HTMLElement>);
8
- hostConnected(): void;
6
+ constructor(_host: ReactiveControllerHost & HTMLElement, _inertElements?: Set<HTMLElement>, _inertOverlays?: Set<HTMLElement>);
9
7
  hostDisconnected(): void;
10
8
  /** Applies inert state to every other element on the page except the overlay. */
11
9
  activate(): void;
12
10
  /** Removes inert state. */
13
11
  deactivate(): void;
12
+ /** Whether the assigned host is currently inert */
13
+ isInert(): boolean;
14
14
  private _currentOverlay;
15
15
  private _removeInertAttributes;
16
16
  private _addInertAttributes;
@@ -1 +1 @@
1
- {"version":3,"file":"inert-controller.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/controllers/inert-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAEtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAM3F,qBAAa,kBAAmB,YAAW,kBAAkB;IAEzD,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,cAAc;gBAFd,KAAK,EAAE,sBAAsB,GAAG,uBAAuB,EACvD,cAAc,mBAAgB,EAC9B,cAAc,mBAAgB;IAKjC,aAAa,IAAI,IAAI;IAMrB,gBAAgB,IAAI,IAAI;IAM/B,iFAAiF;IAC1E,QAAQ,IAAI,IAAI;IAUvB,2BAA2B;IACpB,UAAU,IAAI,IAAI;IAyBzB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,sBAAsB;IAmB9B,OAAO,CAAC,mBAAmB;CA6B5B"}
1
+ {"version":3,"file":"inert-controller.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/controllers/inert-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAMtE,qBAAa,kBAAmB,YAAW,kBAAkB;IAEzD,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,cAAc;gBAFd,KAAK,EAAE,sBAAsB,GAAG,WAAW,EAC3C,cAAc,mBAAgB,EAC9B,cAAc,mBAAgB;IAKjC,gBAAgB,IAAI,IAAI;IAM/B,iFAAiF;IAC1E,QAAQ,IAAI,IAAI;IAUvB,2BAA2B;IACpB,UAAU,IAAI,IAAI;IAyBzB,mDAAmD;IAC5C,OAAO,IAAI,OAAO;IAIzB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,sBAAsB;IAmB9B,OAAO,CAAC,mBAAmB;CA6B5B"}
@@ -23,11 +23,8 @@ class O {
23
23
  var s, n;
24
24
  this._host = t, this._inertElements = e, this._inertOverlays = r, (n = (s = this._host).addController) == null || n.call(s, this);
25
25
  }
26
- hostConnected() {
27
- this._host.isOpen && this.activate();
28
- }
29
26
  hostDisconnected() {
30
- this._inertOverlays.has(this._host) && this.deactivate();
27
+ this.isInert() && this.deactivate();
31
28
  }
32
29
  /** Applies inert state to every other element on the page except the overlay. */
33
30
  activate() {
@@ -41,6 +38,10 @@ class O {
41
38
  }
42
39
  this._removeInertAttributes(), this._inertOverlays.delete(this._host), this._inertOverlays.size && this._addInertAttributes();
43
40
  }
41
+ /** Whether the assigned host is currently inert */
42
+ isInert() {
43
+ return this._inertOverlays.has(this._host);
44
+ }
44
45
  _currentOverlay() {
45
46
  return [...this._inertOverlays].pop() ?? null;
46
47
  }
@@ -92,8 +93,8 @@ i._defaultLanguage = "en", i._supportedLocales = ["en", "de", "fr", "it"], i._li
92
93
  attributeOldValue: !0
93
94
  };
94
95
  let u = i;
95
- const _ = (o) => o / v, M = "(forced-colors: active)", k = "(any-hover: hover)", L = "(pointer: coarse)", N = `(min-width: ${_(g)}rem)`, Q = `(max-width: ${_(m)}rem)`, l = /* @__PURE__ */ new Map();
96
- class H {
96
+ const _ = (o) => o / v, M = "(forced-colors: active)", k = "(any-hover: hover)", I = "(pointer: coarse)", L = `(min-width: ${_(g)}rem)`, N = `(max-width: ${_(m)}rem)`, l = /* @__PURE__ */ new Map();
97
+ class Q {
97
98
  constructor(t, e) {
98
99
  this._queries = e, t.addController(this);
99
100
  }
@@ -132,7 +133,7 @@ a || window.addEventListener("keydown", (o) => {
132
133
  var t;
133
134
  o.key === "Escape" && !o.defaultPrevented && (o.preventDefault(), (t = b.at(-1)) == null || t.close());
134
135
  });
135
- class I {
136
+ class H {
136
137
  constructor(t, e = b) {
137
138
  var r, s;
138
139
  this._host = t, this._overlayStack = e, (s = (r = this._host).addController) == null || s.call(r, this);
@@ -181,14 +182,14 @@ class D {
181
182
  }
182
183
  export {
183
184
  w as SbbConnectedAbortController,
184
- I as SbbEscapableOverlayController,
185
+ H as SbbEscapableOverlayController,
185
186
  O as SbbInertController,
186
187
  u as SbbLanguageController,
187
- H as SbbMediaMatcherController,
188
- N as SbbMediaQueryBreakpointMediumAndAbove,
189
- Q as SbbMediaQueryBreakpointSmallAndBelow,
188
+ Q as SbbMediaMatcherController,
189
+ L as SbbMediaQueryBreakpointMediumAndAbove,
190
+ N as SbbMediaQueryBreakpointSmallAndBelow,
190
191
  M as SbbMediaQueryForcedColors,
191
192
  k as SbbMediaQueryHover,
192
- L as SbbMediaQueryPointerCoarse,
193
+ I as SbbMediaQueryPointerCoarse,
193
194
  D as SbbSlotStateController
194
195
  };
@@ -4,5 +4,5 @@ import { Interface, PropertyDecorator } from './base.js';
4
4
  * Decorator that forces the value of a property or getter/setter
5
5
  * to the defined type.
6
6
  */
7
- export declare const forceType: <C extends Interface<ReactiveElement>, V>() => PropertyDecorator;
7
+ export declare const forceType: <C extends Interface<ReactiveElement>, V>(convert?: (v: unknown) => V) => PropertyDecorator;
8
8
  //# sourceMappingURL=force-type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"force-type.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/force-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,OAAK,iBAsCrE,CAAC"}
1
+ {"version":3,"file":"force-type.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/force-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,EAC/D,UAAU,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAC1B,iBAwCF,CAAC"}
@@ -3,79 +3,78 @@ import { defaultDateAdapter as c } from "./datetime.js";
3
3
  import { isServer as f, defaultConverter as m } from "lit";
4
4
  import { SbbSlotStateController as h } from "./controllers.js";
5
5
  const S = {
6
- fromAttribute(t, r) {
6
+ fromAttribute(t, e) {
7
7
  var o;
8
- const e = ((o = d().datetime) == null ? void 0 : o.dateAdapter) ?? c;
9
- return e.getValidDateOrNull(e.deserialize(t));
8
+ const r = ((o = d().datetime) == null ? void 0 : o.dateAdapter) ?? c;
9
+ return r.getValidDateOrNull(r.deserialize(t));
10
10
  },
11
- toAttribute(t, r) {
11
+ toAttribute(t, e) {
12
12
  var o;
13
- const e = ((o = d().datetime) == null ? void 0 : o.dateAdapter) ?? c;
14
- return e.isValid(t) ? e.toIso8601(t) : null;
13
+ const r = ((o = d().datetime) == null ? void 0 : o.dateAdapter) ?? c;
14
+ return r.isValid(t) ? r.toIso8601(t) : null;
15
15
  }
16
16
  };
17
17
  function w(t) {
18
- var e;
19
- const r = ((e = d().datetime) == null ? void 0 : e.dateAdapter) ?? c;
20
- return r.isDateInstance(t) && r.isValid(t) ? r.createDate(r.getYear(t), r.getMonth(t), r.getDate(t)) : null;
18
+ var r;
19
+ const e = ((r = d().datetime) == null ? void 0 : r.dateAdapter) ?? c;
20
+ return e.isDateInstance(t) && e.isValid(t) ? e.createDate(e.getYear(t), e.getMonth(t), e.getDate(t)) : null;
21
21
  }
22
- const N = () => (t, r) => {
22
+ const N = (t) => (e, r) => {
23
23
  var u, p;
24
- const { kind: e, metadata: o, name: a } = r, s = ((p = (u = globalThis.litPropertyMetadata.get(o)) == null ? void 0 : u.get(a)) == null ? void 0 : p.type) ?? String;
25
- let i = s;
26
- if (s === String ? i = (n) => n == null ? "" : String(n) : s === Number && (i = (n) => n == null ? NaN : Number(n)), e === "accessor")
24
+ const { kind: o, metadata: n, name: s } = r, a = ((p = (u = globalThis.litPropertyMetadata.get(n)) == null ? void 0 : u.get(s)) == null ? void 0 : p.type) ?? String;
25
+ if (t ?? (t = a), t === String ? t = (i) => i == null ? "" : String(i) : t === Number && (t = (i) => i == null ? NaN : Number(i)), o === "accessor")
27
26
  return {
28
- set(n) {
29
- t.set.call(this, i(n));
27
+ set(i) {
28
+ e.set.call(this, t(i));
30
29
  }
31
30
  };
32
- if (e === "setter")
33
- return function(n) {
34
- t.call(this, i(n));
31
+ if (o === "setter")
32
+ return function(i) {
33
+ e.call(this, t(i));
35
34
  };
36
- throw new Error(`Unsupported decorator location: ${e}`);
37
- }, y = (t) => (r, e) => {
38
- const { kind: o } = e;
35
+ throw new Error(`Unsupported decorator location: ${o}`);
36
+ }, y = (t) => (e, r) => {
37
+ const { kind: o } = r;
39
38
  if (o === "accessor")
40
39
  return {
41
40
  get() {
42
- const a = r.get.call(this);
43
- return t(this, a);
41
+ const n = e.get.call(this);
42
+ return t(this, n);
44
43
  }
45
44
  };
46
45
  throw new Error(`Unsupported decorator location: ${o}`);
47
- }, D = (t) => (r, e) => {
48
- const { kind: o } = e;
46
+ }, D = (t) => (e, r) => {
47
+ const { kind: o } = r;
49
48
  if (o === "accessor")
50
49
  return {
51
- set(a) {
52
- const s = e.access.get(this);
53
- r.set.call(this, a);
54
- const i = e.access.get(this);
55
- i !== s && t(this, i, s);
50
+ set(n) {
51
+ const s = r.access.get(this);
52
+ e.set.call(this, n);
53
+ const a = r.access.get(this);
54
+ a !== s && t(this, a, s);
56
55
  }
57
56
  };
58
57
  throw new Error(`Unsupported decorator location: ${o}`);
59
58
  };
60
- function l(t, r) {
61
- for (const [e, o] of Object.entries(r))
62
- o ? t.setAttribute(e, o) : t.toggleAttribute(e, o !== null);
59
+ function l(t, e) {
60
+ for (const [r, o] of Object.entries(e))
61
+ o ? t.setAttribute(r, o) : t.toggleAttribute(r, o !== null);
63
62
  }
64
- const V = (t) => (r) => r.addInitializer((e) => {
65
- f ? l(e, t) : e.addController({
63
+ const V = (t) => (e) => e.addInitializer((r) => {
64
+ f ? l(r, t) : r.addController({
66
65
  hostConnected() {
67
- l(e, t), e.removeController(this);
66
+ l(r, t), r.removeController(this);
68
67
  },
69
68
  hostUpdate() {
70
- l(e, t), e.removeController(this);
69
+ l(r, t), r.removeController(this);
71
70
  }
72
71
  });
73
72
  }), E = {
74
- toAttribute(t, r) {
75
- return (r === String || r === void 0) && t === "" || r === Number && isNaN(t) ? null : m.toAttribute(t, r);
73
+ toAttribute(t, e) {
74
+ return (e === String || e === void 0) && t === "" || e === Number && isNaN(t) ? null : m.toAttribute(t, e);
76
75
  }
77
76
  }, I = () => (t) => {
78
- f || t.addInitializer((r) => new h(r));
77
+ f || t.addInitializer((e) => new h(e));
79
78
  };
80
79
  export {
81
80
  w as DateOnlyType,
@@ -8,6 +8,11 @@ export declare const isBlink: boolean;
8
8
  export declare const isWebkit: boolean;
9
9
  /** Whether the current platform is Apple iOS. */
10
10
  export declare const isIOS: boolean;
11
+ /**
12
+ * Whether the device is a mac.
13
+ * @experimental Avoid using this as this is not reliable.
14
+ */
15
+ export declare const isMacOS: boolean;
11
16
  /** Whether the current browser is Firefox. */
12
17
  export declare const isFirefox: boolean;
13
18
  /** Whether the current platform is Android. */
@@ -1 +1 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/dom/platform.ts"],"names":[],"mappings":"AAmBA,qDAAqD;AACrD,eAAO,MAAM,MAAM,SAAmD,CAAC;AAEvE,iEAAiE;AACjE,eAAO,MAAM,SAAS,SAA2D,CAAC;AAGlF,qDAAqD;AACrD,eAAO,MAAM,OAAO,SAKR,CAAC;AAIb,sDAAsD;AACtD,eAAO,MAAM,QAAQ,SACuE,CAAC;AAE7F,iDAAiD;AACjD,eAAO,MAAM,KAAK,SACoE,CAAC;AAMvF,8CAA8C;AAC9C,eAAO,MAAM,SAAS,SAAgE,CAAC;AAEvF,+CAA+C;AAE/C,eAAO,MAAM,SAAS,SAAkE,CAAC;AAKzF,6CAA6C;AAC7C,eAAO,MAAM,QAAQ,SAA+D,CAAC;AAErF;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,CAAC;AAElC,0EAA0E;AAC1E,eAAO,MAAM,QAAQ,QAAO,OAAmD,CAAC"}
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/dom/platform.ts"],"names":[],"mappings":"AAmBA,qDAAqD;AACrD,eAAO,MAAM,MAAM,SAAmD,CAAC;AAEvE,iEAAiE;AACjE,eAAO,MAAM,SAAS,SAA2D,CAAC;AAGlF,qDAAqD;AACrD,eAAO,MAAM,OAAO,SAKR,CAAC;AAIb,sDAAsD;AACtD,eAAO,MAAM,QAAQ,SACuE,CAAC;AAE7F,iDAAiD;AACjD,eAAO,MAAM,KAAK,SACoE,CAAC;AAEvF;;;GAGG;AACH,eAAO,MAAM,OAAO,SAAoC,CAAC;AAMzD,8CAA8C;AAC9C,eAAO,MAAM,SAAS,SAAgE,CAAC;AAEvF,+CAA+C;AAE/C,eAAO,MAAM,SAAS,SAAkE,CAAC;AAKzF,6CAA6C;AAC7C,eAAO,MAAM,QAAQ,SAA+D,CAAC;AAErF;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,CAAC;AAElC,0EAA0E;AAC1E,eAAO,MAAM,QAAQ,QAAO,OAAmD,CAAC"}