@sbb-esta/lyne-elements 2.3.0 → 2.4.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 (255) hide show
  1. package/autocomplete/autocomplete-base-element.d.ts +1 -0
  2. package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  3. package/autocomplete/autocomplete.d.ts.map +1 -1
  4. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
  5. package/autocomplete-grid/autocomplete-grid.js +0 -1
  6. package/autocomplete.js +28 -28
  7. package/button/common/button-common.d.ts.map +1 -1
  8. package/calendar/calendar.d.ts +55 -11
  9. package/calendar/calendar.d.ts.map +1 -1
  10. package/calendar.js +374 -224
  11. package/card/common/card-action-common.d.ts.map +1 -1
  12. package/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
  13. package/checkbox/checkbox-group.js +1 -1
  14. package/checkbox/common/checkbox-common.d.ts.map +1 -1
  15. package/core/controllers/escapable-overlay-controller.d.ts +11 -0
  16. package/core/controllers/escapable-overlay-controller.d.ts.map +1 -0
  17. package/core/controllers.d.ts +1 -0
  18. package/core/controllers.d.ts.map +1 -1
  19. package/core/controllers.js +73 -47
  20. package/core/datetime/date-adapter.d.ts +4 -2
  21. package/core/datetime/date-adapter.d.ts.map +1 -1
  22. package/core/datetime/native-date-adapter.d.ts +1 -1
  23. package/core/datetime/native-date-adapter.d.ts.map +1 -1
  24. package/core/datetime.js +51 -43
  25. package/core/decorators/date-converter.d.ts +8 -0
  26. package/core/decorators/date-converter.d.ts.map +1 -0
  27. package/core/decorators/date-only-type.d.ts +8 -0
  28. package/core/decorators/date-only-type.d.ts.map +1 -0
  29. package/core/decorators/get-override.d.ts.map +1 -1
  30. package/core/decorators/handle-distinct-change.d.ts.map +1 -1
  31. package/core/decorators/host-attributes.d.ts.map +1 -1
  32. package/core/decorators/slot-state.d.ts.map +1 -1
  33. package/core/decorators.d.ts +2 -0
  34. package/core/decorators.d.ts.map +1 -1
  35. package/core/decorators.js +52 -31
  36. package/core/dom/input-element.d.ts +1 -1
  37. package/core/dom/input-element.d.ts.map +1 -1
  38. package/core/dom.js +5 -5
  39. package/core/eventing/throttle.d.ts.map +1 -1
  40. package/core/i18n/i18n.d.ts +4 -0
  41. package/core/i18n/i18n.d.ts.map +1 -1
  42. package/core/i18n.js +87 -63
  43. package/core/mixins/disabled-mixin.d.ts.map +1 -1
  44. package/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
  45. package/core/mixins/form-associated-input-mixin.d.ts +25 -0
  46. package/core/mixins/form-associated-input-mixin.d.ts.map +1 -0
  47. package/core/mixins/form-associated-mixin.d.ts +13 -0
  48. package/core/mixins/form-associated-mixin.d.ts.map +1 -1
  49. package/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
  50. package/core/mixins/hydration-mixin.d.ts.map +1 -1
  51. package/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
  52. package/core/mixins/negative-mixin.d.ts.map +1 -1
  53. package/core/mixins/panel-mixin.d.ts.map +1 -1
  54. package/core/mixins/required-mixin.d.ts.map +1 -1
  55. package/core/mixins/update-scheduler-mixin.d.ts.map +1 -1
  56. package/core/mixins.d.ts +1 -0
  57. package/core/mixins.d.ts.map +1 -1
  58. package/core/mixins.js +518 -333
  59. package/core/styles/core.scss +3 -1
  60. package/core/testing/mocha-extensions.d.ts.map +1 -1
  61. package/core/testing/wait-for-render.d.ts.map +1 -1
  62. package/core.css +2 -2
  63. package/custom-elements.json +18176 -14267
  64. package/date-input/date-input.d.ts +67 -0
  65. package/date-input/date-input.d.ts.map +1 -0
  66. package/date-input.d.ts +2 -0
  67. package/date-input.d.ts.map +1 -0
  68. package/date-input.js +149 -0
  69. package/datepicker/common/datepicker-button.d.ts.map +1 -1
  70. package/datepicker/common.js +49 -45
  71. package/datepicker/datepicker/datepicker.d.ts +16 -6
  72. package/datepicker/datepicker/datepicker.d.ts.map +1 -1
  73. package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  74. package/datepicker/datepicker-toggle.js +41 -38
  75. package/datepicker/datepicker.js +94 -76
  76. package/development/autocomplete/autocomplete-base-element.d.ts +1 -0
  77. package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  78. package/development/autocomplete/autocomplete.d.ts.map +1 -1
  79. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
  80. package/development/autocomplete-grid/autocomplete-grid.js +1 -2
  81. package/development/autocomplete.js +9 -4
  82. package/development/button/common/button-common.d.ts.map +1 -1
  83. package/development/calendar/calendar.d.ts +55 -11
  84. package/development/calendar/calendar.d.ts.map +1 -1
  85. package/development/calendar.js +301 -87
  86. package/development/card/common/card-action-common.d.ts.map +1 -1
  87. package/development/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
  88. package/development/checkbox/checkbox-group.js +2 -2
  89. package/development/checkbox/common/checkbox-common.d.ts.map +1 -1
  90. package/development/core/controllers/escapable-overlay-controller.d.ts +11 -0
  91. package/development/core/controllers/escapable-overlay-controller.d.ts.map +1 -0
  92. package/development/core/controllers.d.ts +1 -0
  93. package/development/core/controllers.d.ts.map +1 -1
  94. package/development/core/controllers.js +36 -1
  95. package/development/core/datetime/date-adapter.d.ts +4 -2
  96. package/development/core/datetime/date-adapter.d.ts.map +1 -1
  97. package/development/core/datetime/native-date-adapter.d.ts +1 -1
  98. package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
  99. package/development/core/datetime.js +14 -2
  100. package/development/core/decorators/date-converter.d.ts +8 -0
  101. package/development/core/decorators/date-converter.d.ts.map +1 -0
  102. package/development/core/decorators/date-only-type.d.ts +8 -0
  103. package/development/core/decorators/date-only-type.d.ts.map +1 -0
  104. package/development/core/decorators/get-override.d.ts.map +1 -1
  105. package/development/core/decorators/handle-distinct-change.d.ts.map +1 -1
  106. package/development/core/decorators/host-attributes.d.ts.map +1 -1
  107. package/development/core/decorators/slot-state.d.ts.map +1 -1
  108. package/development/core/decorators.d.ts +2 -0
  109. package/development/core/decorators.d.ts.map +1 -1
  110. package/development/core/decorators.js +23 -2
  111. package/development/core/dom/input-element.d.ts +1 -1
  112. package/development/core/dom/input-element.d.ts.map +1 -1
  113. package/development/core/dom.js +3 -3
  114. package/development/core/eventing/throttle.d.ts.map +1 -1
  115. package/development/core/i18n/i18n.d.ts +4 -0
  116. package/development/core/i18n/i18n.d.ts.map +1 -1
  117. package/development/core/i18n.js +29 -1
  118. package/development/core/mixins/disabled-mixin.d.ts.map +1 -1
  119. package/development/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
  120. package/development/core/mixins/form-associated-input-mixin.d.ts +25 -0
  121. package/development/core/mixins/form-associated-input-mixin.d.ts.map +1 -0
  122. package/development/core/mixins/form-associated-mixin.d.ts +13 -0
  123. package/development/core/mixins/form-associated-mixin.d.ts.map +1 -1
  124. package/development/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
  125. package/development/core/mixins/hydration-mixin.d.ts.map +1 -1
  126. package/development/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
  127. package/development/core/mixins/negative-mixin.d.ts.map +1 -1
  128. package/development/core/mixins/panel-mixin.d.ts.map +1 -1
  129. package/development/core/mixins/required-mixin.d.ts.map +1 -1
  130. package/development/core/mixins/update-scheduler-mixin.d.ts.map +1 -1
  131. package/development/core/mixins.d.ts +1 -0
  132. package/development/core/mixins.d.ts.map +1 -1
  133. package/development/core/mixins.js +379 -88
  134. package/development/core/testing/mocha-extensions.d.ts.map +1 -1
  135. package/development/core/testing/wait-for-render.d.ts.map +1 -1
  136. package/development/date-input/date-input.d.ts +67 -0
  137. package/development/date-input/date-input.d.ts.map +1 -0
  138. package/development/date-input.d.ts +2 -0
  139. package/development/date-input.d.ts.map +1 -0
  140. package/development/date-input.js +259 -0
  141. package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
  142. package/development/datepicker/common.js +11 -2
  143. package/development/datepicker/datepicker/datepicker.d.ts +16 -6
  144. package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
  145. package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  146. package/development/datepicker/datepicker-toggle.js +12 -3
  147. package/development/datepicker/datepicker.js +65 -39
  148. package/development/dialog/dialog/dialog.d.ts.map +1 -1
  149. package/development/dialog/dialog.js +3 -1
  150. package/development/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
  151. package/development/expansion-panel/expansion-panel.js +2 -2
  152. package/development/file-selector/common/file-selector-common.d.ts.map +1 -1
  153. package/development/form-field/form-field/form-field.d.ts +1 -1
  154. package/development/form-field/form-field/form-field.d.ts.map +1 -1
  155. package/development/form-field/form-field.js +19 -13
  156. package/development/header/common/header-action-common.d.ts.map +1 -1
  157. package/development/icon/icon-name-mixin.d.ts.map +1 -1
  158. package/development/icon/icon-request.d.ts.map +1 -1
  159. package/development/icon/icon-validate.d.ts.map +1 -1
  160. package/development/link/common/block-link-common.d.ts.map +1 -1
  161. package/development/link/common/inline-link-common.d.ts.map +1 -1
  162. package/development/link/common/link-common.d.ts.map +1 -1
  163. package/development/menu/common/menu-action-common.d.ts.map +1 -1
  164. package/development/menu/menu/menu.d.ts +1 -1
  165. package/development/menu/menu/menu.d.ts.map +1 -1
  166. package/development/menu/menu.js +5 -15
  167. package/development/navigation/common/navigation-action-common.d.ts.map +1 -1
  168. package/development/navigation/navigation/navigation.d.ts +1 -3
  169. package/development/navigation/navigation/navigation.d.ts.map +1 -1
  170. package/development/navigation/navigation.js +8 -21
  171. package/development/overlay/overlay-base-element.d.ts +2 -2
  172. package/development/overlay/overlay-base-element.d.ts.map +1 -1
  173. package/development/overlay/overlay.d.ts.map +1 -1
  174. package/development/overlay.js +6 -13
  175. package/development/paginator/common/paginator-common.d.ts.map +1 -1
  176. package/development/popover/popover/popover.d.ts +1 -1
  177. package/development/popover/popover/popover.d.ts.map +1 -1
  178. package/development/popover/popover.js +5 -15
  179. package/development/radio-button/common/radio-button-common.d.ts.map +1 -1
  180. package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
  181. package/development/radio-button/radio-button-group.js +2 -2
  182. package/development/select/select.d.ts +3 -1
  183. package/development/select/select.d.ts.map +1 -1
  184. package/development/select.js +12 -8
  185. package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
  186. package/development/selection-expansion-panel.js +2 -2
  187. package/development/stepper/step/step.d.ts +0 -2
  188. package/development/stepper/step/step.d.ts.map +1 -1
  189. package/development/stepper/step.js +1 -16
  190. package/development/stepper/stepper/stepper.d.ts +11 -0
  191. package/development/stepper/stepper/stepper.d.ts.map +1 -1
  192. package/development/stepper/stepper.js +30 -3
  193. package/development/tag/tag/tag.d.ts +11 -0
  194. package/development/tag/tag/tag.d.ts.map +1 -1
  195. package/development/tag/tag-group/tag-group.d.ts +1 -1
  196. package/development/tag/tag-group/tag-group.d.ts.map +1 -1
  197. package/development/tag/tag-group.js +9 -3
  198. package/development/tag/tag.js +37 -10
  199. package/development/teaser-product/common/teaser-product-common.d.ts.map +1 -1
  200. package/dialog/dialog/dialog.d.ts.map +1 -1
  201. package/dialog/dialog.js +2 -2
  202. package/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
  203. package/expansion-panel/expansion-panel.js +1 -1
  204. package/file-selector/common/file-selector-common.d.ts.map +1 -1
  205. package/form-field/form-field/form-field.d.ts +1 -1
  206. package/form-field/form-field/form-field.d.ts.map +1 -1
  207. package/form-field/form-field.js +30 -24
  208. package/header/common/header-action-common.d.ts.map +1 -1
  209. package/icon/icon-name-mixin.d.ts.map +1 -1
  210. package/icon/icon-request.d.ts.map +1 -1
  211. package/icon/icon-validate.d.ts.map +1 -1
  212. package/index.d.ts +2 -0
  213. package/index.js +2 -0
  214. package/link/common/block-link-common.d.ts.map +1 -1
  215. package/link/common/inline-link-common.d.ts.map +1 -1
  216. package/link/common/link-common.d.ts.map +1 -1
  217. package/menu/common/menu-action-common.d.ts.map +1 -1
  218. package/menu/menu/menu.d.ts +1 -1
  219. package/menu/menu/menu.d.ts.map +1 -1
  220. package/menu/menu.js +25 -34
  221. package/navigation/common/navigation-action-common.d.ts.map +1 -1
  222. package/navigation/navigation/navigation.d.ts +1 -3
  223. package/navigation/navigation/navigation.d.ts.map +1 -1
  224. package/navigation/navigation.js +45 -54
  225. package/overlay/overlay-base-element.d.ts +2 -2
  226. package/overlay/overlay-base-element.d.ts.map +1 -1
  227. package/overlay/overlay.d.ts.map +1 -1
  228. package/overlay.js +57 -63
  229. package/package.json +6 -1
  230. package/paginator/common/paginator-common.d.ts.map +1 -1
  231. package/popover/popover/popover.d.ts +1 -1
  232. package/popover/popover/popover.d.ts.map +1 -1
  233. package/popover/popover.js +101 -110
  234. package/radio-button/common/radio-button-common.d.ts.map +1 -1
  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/select/select.d.ts +3 -1
  238. package/select/select.d.ts.map +1 -1
  239. package/select.js +39 -37
  240. package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
  241. package/selection-expansion-panel.js +1 -1
  242. package/standard-theme.css +2 -2
  243. package/stepper/step/step.d.ts +0 -2
  244. package/stepper/step/step.d.ts.map +1 -1
  245. package/stepper/step.js +24 -36
  246. package/stepper/stepper/stepper.d.ts +11 -0
  247. package/stepper/stepper/stepper.d.ts.map +1 -1
  248. package/stepper/stepper.js +59 -41
  249. package/tag/tag/tag.d.ts +11 -0
  250. package/tag/tag/tag.d.ts.map +1 -1
  251. package/tag/tag-group/tag-group.d.ts +1 -1
  252. package/tag/tag-group/tag-group.d.ts.map +1 -1
  253. package/tag/tag-group.js +32 -29
  254. package/tag/tag.js +60 -41
  255. package/teaser-product/common/teaser-product-common.d.ts.map +1 -1
package/core/mixins.js CHANGED
@@ -1,33 +1,33 @@
1
- var V = (c) => {
2
- throw TypeError(c);
1
+ var F = (d) => {
2
+ throw TypeError(d);
3
3
  };
4
- var q = (c, m, u) => m.has(c) || V("Cannot " + u);
5
- var x = (c, m, u) => (q(c, m, "read from private field"), u ? u.call(c) : m.get(c)), C = (c, m, u) => m.has(c) ? V("Cannot add the same private member more than once") : m instanceof WeakSet ? m.add(c) : m.set(c, u), y = (c, m, u, o) => (q(c, m, "write to private field"), o ? o.call(c, u) : m.set(c, u), u);
6
- import { __esDecorate as g, __runInitializers as f } from "tslib";
7
- import { property as S, state as A } from "lit/decorators.js";
8
- import { forceType as R, getOverride as N, hostAttributes as P } from "./decorators.js";
9
- import { defaultConverter as D, isServer as G, nothing as B, html as I, css as $ } from "lit";
10
- import { SbbLanguageController as z, SbbConnectedAbortController as T } from "./controllers.js";
11
- import { preventScrollOnSpacebarPress as H, EventEmitter as K } from "./eventing.js";
12
- import { i18nCheckboxRequired as W, i18nSelectionRequired as X } from "./i18n.js";
13
- import { isWebkit as J } from "./dom.js";
14
- import { interactivityChecker as Q, isArrowKeyPressed as Y, getNextElementIndex as Z } from "./a11y.js";
4
+ var L = (d, v, c) => v.has(d) || F("Cannot " + c);
5
+ var C = (d, v, c) => (L(d, v, "read from private field"), c ? c.call(d) : v.get(d)), E = (d, v, c) => v.has(d) ? F("Cannot add the same private member more than once") : v instanceof WeakSet ? v.add(d) : v.set(d, c), S = (d, v, c, o) => (L(d, v, "write to private field"), o ? o.call(d, c) : v.set(d, c), c);
6
+ import { __esDecorate as y, __runInitializers as _ } from "tslib";
7
+ import { property as k, state as N, eventOptions as G } from "lit/decorators.js";
8
+ import { forceType as I, getOverride as H, hostAttributes as K } from "./decorators.js";
9
+ import { defaultConverter as z, isServer as M, html as R, nothing as O, css as W } from "lit";
10
+ import { SbbLanguageController as B, SbbConnectedAbortController as X } from "./controllers.js";
11
+ import { preventScrollOnSpacebarPress as J, EventEmitter as Q } from "./eventing.js";
12
+ import { i18nCheckboxRequired as Y, i18nInputRequired as Z, i18nSelectionRequired as ee } from "./i18n.js";
13
+ import { isWebkit as P, isFirefox as te } from "./dom.js";
14
+ import { sbbInputModalityDetector as se, interactivityChecker as ae, isArrowKeyPressed as ie, getNextElementIndex as re } from "./a11y.js";
15
15
  import "../screen-reader-only.js";
16
- const M = (c) => (() => {
17
- var h, e;
18
- let u = c, o, p = [], r = [];
19
- return e = class extends u {
16
+ const A = (d) => (() => {
17
+ var b, t;
18
+ let c = d, o, m = [], l = [];
19
+ return t = class extends c {
20
20
  constructor() {
21
21
  super(...arguments);
22
- C(this, h, f(this, p, !1));
23
- f(this, r);
22
+ E(this, b, _(this, m, !1));
23
+ _(this, l);
24
24
  }
25
25
  /** Whether the component is disabled. */
26
26
  get disabled() {
27
- return x(this, h);
27
+ return C(this, b);
28
28
  }
29
- set disabled(t) {
30
- y(this, h, t);
29
+ set disabled(e) {
30
+ S(this, b, e);
31
31
  }
32
32
  /**
33
33
  * Will be used as 'or' check to the current disabled state.
@@ -36,42 +36,42 @@ const M = (c) => (() => {
36
36
  isDisabledExternally() {
37
37
  return !1;
38
38
  }
39
- }, h = new WeakMap(), (() => {
40
- const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
41
- o = [R(), S({ reflect: !0, type: Boolean }), N((s, l) => l || s.isDisabledExternally())], g(e, null, o, { kind: "accessor", name: "disabled", static: !1, private: !1, access: { has: (s) => "disabled" in s, get: (s) => s.disabled, set: (s, l) => {
42
- s.disabled = l;
43
- } }, metadata: t }, p, r), t && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
44
- })(), e;
45
- })(), ee = (c) => (() => {
46
- var h, e;
47
- let u = c, o, p = [], r = [];
48
- return e = class extends u {
39
+ }, b = new WeakMap(), (() => {
40
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
41
+ o = [I(), k({ reflect: !0, type: Boolean }), H((s, a) => a || s.isDisabledExternally())], y(t, null, o, { kind: "accessor", name: "disabled", static: !1, private: !1, access: { has: (s) => "disabled" in s, get: (s) => s.disabled, set: (s, a) => {
42
+ s.disabled = a;
43
+ } }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
44
+ })(), t;
45
+ })(), ne = (d) => (() => {
46
+ var b, t;
47
+ let c = d, o, m = [], l = [];
48
+ return t = class extends c {
49
49
  constructor() {
50
50
  super(...arguments);
51
- C(this, h, f(this, p, !1));
52
- f(this, r);
51
+ E(this, b, _(this, m, !1));
52
+ _(this, l);
53
53
  }
54
54
  /** Whether the button should be aria-disabled but stay interactive. */
55
55
  get disabledInteractive() {
56
- return x(this, h);
57
- }
58
- set disabledInteractive(t) {
59
- y(this, h, t);
60
- }
61
- }, h = new WeakMap(), (() => {
62
- const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
63
- o = [R(), S({ attribute: "disabled-interactive", type: Boolean, reflect: !0 })], g(e, null, o, { kind: "accessor", name: "disabledInteractive", static: !1, private: !1, access: { has: (s) => "disabledInteractive" in s, get: (s) => s.disabledInteractive, set: (s, l) => {
64
- s.disabledInteractive = l;
65
- } }, metadata: t }, p, r), t && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
66
- })(), e;
67
- })(), pe = (c) => {
68
- class m extends ee(M(c)) {
56
+ return C(this, b);
57
+ }
58
+ set disabledInteractive(e) {
59
+ S(this, b, e);
60
+ }
61
+ }, b = new WeakMap(), (() => {
62
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
63
+ o = [I(), k({ attribute: "disabled-interactive", type: Boolean, reflect: !0 })], y(t, null, o, { kind: "accessor", name: "disabledInteractive", static: !1, private: !1, access: { has: (s) => "disabledInteractive" in s, get: (s) => s.disabledInteractive, set: (s, a) => {
64
+ s.disabledInteractive = a;
65
+ } }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
66
+ })(), t;
67
+ })(), _e = (d) => {
68
+ class v extends ne(A(d)) {
69
69
  willUpdate(o) {
70
70
  super.willUpdate(o), o.has("disabledInteractive") && (this.internals.ariaDisabled = this.disabledInteractive ? "true" : null), o.has("disabled") && (this.disabled ? this.removeAttribute("tabindex") : this.setAttribute("tabindex", "0"));
71
71
  }
72
72
  }
73
- return m;
74
- }, te = {
73
+ return v;
74
+ }, $ = {
75
75
  badInput: !1,
76
76
  customError: !1,
77
77
  patternMismatch: !1,
@@ -82,15 +82,31 @@ const M = (c) => (() => {
82
82
  tooShort: !1,
83
83
  typeMismatch: !1,
84
84
  valueMissing: !1
85
- }, L = (c) => (() => {
86
- var n, t;
87
- let u = c, o = [], p, r, h, e = [], i = [];
88
- return t = class extends u {
89
- constructor(...a) {
90
- var d;
91
- super(...a);
92
- C(this, n);
93
- this._value = (f(this, o), null), this.internals = this.attachInternals(), this._validityStates = /* @__PURE__ */ new Map(), y(this, n, f(this, e, !1)), f(this, i), (d = this.addEventListener) == null || d.call(this, "invalid", (b) => b.preventDefault());
85
+ };
86
+ if (typeof ValidityState > "u") {
87
+ const d = class {
88
+ get valid() {
89
+ return !0;
90
+ }
91
+ constructor() {
92
+ throw new TypeError("Illegal constructor");
93
+ }
94
+ };
95
+ Object.entries($).forEach(([v, c]) => Object.assign(d.prototype, {
96
+ get [v]() {
97
+ return c;
98
+ }
99
+ })), globalThis.ValidityState = d;
100
+ }
101
+ const V = (d) => (() => {
102
+ var u, e;
103
+ let c = d, o = [], m, l, b, t = [], r = [];
104
+ return e = class extends c {
105
+ constructor(...i) {
106
+ var n;
107
+ super(...i);
108
+ E(this, u);
109
+ this._value = (_(this, o), null), this.internals = this.attachInternals(), this._validityStates = /* @__PURE__ */ new Map(), S(this, u, _(this, t, !1)), _(this, r), (n = this.addEventListener) == null || n.call(this, "invalid", (p) => p.preventDefault());
94
110
  }
95
111
  /**
96
112
  * Returns the form owner of this element.
@@ -104,8 +120,8 @@ const M = (c) => (() => {
104
120
  * @description Developer note: In this case updating the attribute must be synchronous.
105
121
  * Due to this it is implemented as a getter/setter and the attributeChangedCallback() handles the diff check.
106
122
  */
107
- set name(a) {
108
- this.setAttribute("name", `${a}`), this.updateFormValue();
123
+ set name(i) {
124
+ this.setAttribute("name", `${i}`), this.updateFormValue();
109
125
  }
110
126
  get name() {
111
127
  return this.getAttribute("name") ?? "";
@@ -115,8 +131,8 @@ const M = (c) => (() => {
115
131
  return this.localName;
116
132
  }
117
133
  /** Value of the form element. */
118
- set value(a) {
119
- this._value = a, this.updateFormValue();
134
+ set value(i) {
135
+ this._value = i, this.updateFormValue();
120
136
  }
121
137
  get value() {
122
138
  return this._value;
@@ -148,13 +164,13 @@ const M = (c) => (() => {
148
164
  }
149
165
  /** Whenever a surrounding form or fieldset is changing its disabled state. */
150
166
  get formDisabled() {
151
- return x(this, n);
167
+ return C(this, u);
152
168
  }
153
- set formDisabled(a) {
154
- y(this, n, a);
169
+ set formDisabled(i) {
170
+ S(this, u, i);
155
171
  }
156
- attributeChangedCallback(a, d, b) {
157
- (a !== "name" || d !== b) && super.attributeChangedCallback(a, d, b);
172
+ attributeChangedCallback(i, n, p) {
173
+ (i !== "name" || n !== p) && super.attributeChangedCallback(i, n, p);
158
174
  }
159
175
  /**
160
176
  * Returns true if this element has no validity problems; false otherwise.
@@ -175,8 +191,8 @@ const M = (c) => (() => {
175
191
  * Sets the custom validity message for this element. Use the empty string
176
192
  * to indicate that the element does not have a custom validity error.
177
193
  */
178
- setCustomValidity(a) {
179
- a ? this.setValidityFlag("customError", a) : this.removeValidityFlag("customError");
194
+ setCustomValidity(i) {
195
+ i ? this.setValidityFlag("customError", i) : this.removeValidityFlag("customError");
180
196
  }
181
197
  /**
182
198
  * Is called whenever a surrounding form / fieldset changes disabled state.
@@ -184,11 +200,17 @@ const M = (c) => (() => {
184
200
  *
185
201
  * @internal
186
202
  */
187
- formDisabledCallback(a) {
203
+ formDisabledCallback(i) {
188
204
  Promise.resolve().then(() => {
189
- this.formDisabled = a;
205
+ this.formDisabled = i;
190
206
  });
191
207
  }
208
+ requestUpdate(i, n, p) {
209
+ super.requestUpdate(i, n, p), this.hasUpdated && this.shouldValidate(i) && this.validate();
210
+ }
211
+ firstUpdated(i) {
212
+ super.firstUpdated(i), this.validate();
213
+ }
192
214
  /**
193
215
  * Marks this element as suffering from the constraint indicated by the
194
216
  * flag argument and associates the given message to it.
@@ -196,8 +218,7 @@ const M = (c) => (() => {
196
218
  * consumers are always displayed before internal messages and internal
197
219
  * messages are displayed in the order they were added.
198
220
  * To set/define custom validity state flags, you need to extend the
199
- * ValidityState prototype and both the ValidityState and the
200
- * ValidityStateFlags interface.
221
+ * ValidityState prototype (and the CustomValidityState interface).
201
222
  *
202
223
  * @example
203
224
  *
@@ -209,66 +230,70 @@ const M = (c) => (() => {
209
230
  * });
210
231
  *
211
232
  * declare global {
212
- * interface ValidityState {
233
+ * interface CustomValidityState {
213
234
  * myError: boolean;
214
235
  * }
215
- * interface ValidityState {
216
- * myError?: boolean;
217
- * }
218
236
  * }
219
237
  */
220
- setValidityFlag(a, d, b) {
221
- b ?? (b = !0), this._validityStates.set(a, { flagValue: b, message: d }), this._setInternalValidity();
238
+ setValidityFlag(i, n, p) {
239
+ p ?? (p = !0);
240
+ const x = this._validityStates.get(i);
241
+ (!x || x.message !== n || x.flagValue !== p) && (this._validityStates.set(i, { flagValue: p, message: n }), this._setInternalValidity());
222
242
  }
223
- removeValidityFlag(a) {
224
- this._validityStates.delete(a), this._setInternalValidity();
243
+ /** Removes the validity state flag entry and updates validity state. */
244
+ removeValidityFlag(i) {
245
+ this._validityStates.has(i) && (this._validityStates.delete(i), this._setInternalValidity());
246
+ }
247
+ /** To be called whenever the current element needs to be validated. */
248
+ validate() {
249
+ }
250
+ /** Whether validation should be run on a property change with the given name. */
251
+ shouldValidate(i) {
252
+ return !i;
225
253
  }
226
254
  _setInternalValidity() {
227
- var a;
228
- if (this._validityStates.size) {
229
- let d = (a = this._validityStates.get("customError")) == null ? void 0 : a.message;
230
- const b = {};
231
- this._validityStates.forEach(({ flagValue: k, message: _ }, v) => {
232
- b[v] = k, d || (d = _);
233
- });
234
- const E = Object.keys(ValidityState.prototype).filter((k) => !(k in te) && k !== "valid");
235
- for (const k of E) {
236
- const _ = k in b ? b[k] : !1;
237
- Object.defineProperty(this.internals.validity, k, { value: _, configurable: !0 }), _ && (b.customError = !0);
238
- }
239
- this.internals.setValidity(b, d), J && Object.defineProperty(this.internals.validity, "customError", {
240
- value: this._validityStates.has("customError") || !!b.customError,
241
- configurable: !0
242
- });
243
- } else
244
- this.internals.setValidity({});
245
- }
246
- }, n = new WeakMap(), (() => {
247
- const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
248
- p = [S()], r = [S()], h = [A()], g(t, null, p, { kind: "setter", name: "name", static: !1, private: !1, access: { has: (d) => "name" in d, set: (d, b) => {
249
- d.name = b;
250
- } }, metadata: a }, null, o), g(t, null, r, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (d) => "value" in d, set: (d, b) => {
251
- d.value = b;
252
- } }, metadata: a }, null, o), g(t, null, h, { kind: "accessor", name: "formDisabled", static: !1, private: !1, access: { has: (d) => "formDisabled" in d, get: (d) => d.formDisabled, set: (d, b) => {
253
- d.formDisabled = b;
254
- } }, metadata: a }, e, i), a && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
255
- })(), t.formAssociated = !0, t;
256
- })(), j = (c) => (() => {
257
- var r;
258
- let u = c, o = [], p;
259
- return r = class extends u {
255
+ var x;
256
+ let i = (x = this._validityStates.get("customError")) == null ? void 0 : x.message;
257
+ const n = {};
258
+ this._validityStates.forEach(({ flagValue: f, message: g }, h) => {
259
+ n[h] = f, i || (i = g);
260
+ });
261
+ const p = Object.keys(ValidityState.prototype).filter((f) => !(f in $) && f !== "valid");
262
+ for (const f of p) {
263
+ const g = f in n ? n[f] : !1;
264
+ Object.defineProperty(this.internals.validity, f, { value: g, configurable: !0 }), g && (n.customError = !0);
265
+ }
266
+ this.internals.setValidity(n, i), P && Object.defineProperty(this.internals.validity, "customError", {
267
+ value: this._validityStates.has("customError") || !!n.customError,
268
+ configurable: !0
269
+ });
270
+ }
271
+ }, u = new WeakMap(), (() => {
272
+ const i = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
273
+ m = [k()], l = [k()], b = [N()], y(e, null, m, { kind: "setter", name: "name", static: !1, private: !1, access: { has: (n) => "name" in n, set: (n, p) => {
274
+ n.name = p;
275
+ } }, metadata: i }, null, o), y(e, null, l, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (n) => "value" in n, set: (n, p) => {
276
+ n.value = p;
277
+ } }, metadata: i }, null, o), y(e, null, b, { kind: "accessor", name: "formDisabled", static: !1, private: !1, access: { has: (n) => "formDisabled" in n, get: (n) => n.formDisabled, set: (n, p) => {
278
+ n.formDisabled = p;
279
+ } }, metadata: i }, t, r), i && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: i });
280
+ })(), e.formAssociated = !0, e;
281
+ })(), D = (d) => (() => {
282
+ var l;
283
+ let c = d, o = [], m;
284
+ return l = class extends c {
260
285
  constructor() {
261
- super(...arguments), this._required = (f(this, o), !1);
286
+ super(...arguments), this._required = (_(this, o), !1);
262
287
  }
263
288
  /** Whether the component is required. */
264
- set required(e) {
265
- this._required = !!e;
289
+ set required(t) {
290
+ this._required = !!t;
266
291
  }
267
292
  get required() {
268
293
  return this._required || this.isRequiredExternally();
269
294
  }
270
- willUpdate(e) {
271
- super.willUpdate(e), e.has("required") && (this.internals.ariaRequired = `${this.required}`);
295
+ willUpdate(t) {
296
+ super.willUpdate(t), t.has("required") && (this.internals.ariaRequired = `${this.required}`);
272
297
  }
273
298
  /**
274
299
  * Will be used as 'or' check to the current required state.
@@ -278,21 +303,21 @@ const M = (c) => (() => {
278
303
  return !1;
279
304
  }
280
305
  }, (() => {
281
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
282
- p = [S({ reflect: !0, type: Boolean })], g(r, null, p, { kind: "setter", name: "required", static: !1, private: !1, access: { has: (i) => "required" in i, set: (i, n) => {
283
- i.required = n;
284
- } }, metadata: e }, null, o), e && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
285
- })(), r;
286
- })(), me = (c) => (() => {
287
- var n;
288
- let u = [P({
306
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
307
+ m = [k({ reflect: !0, type: Boolean })], y(l, null, m, { kind: "setter", name: "required", static: !1, private: !1, access: { has: (r) => "required" in r, set: (r, u) => {
308
+ r.required = u;
309
+ } }, metadata: t }, null, o), t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
310
+ })(), l;
311
+ })(), Se = (d) => (() => {
312
+ var u;
313
+ let c = [K({
289
314
  tabindex: "0"
290
- })], o, p = [], r, h = M(j(L(c))), e = [], i;
291
- return n = class extends h {
315
+ })], o, m = [], l, b = A(D(V(d))), t = [], r;
316
+ return u = class extends b {
292
317
  /** Whether the checkbox is checked. */
293
318
  set checked(s) {
294
- const l = typeof s == "object" ? s.attribute : !1;
295
- l && (s = s.value), this.hasUpdated && !l && (this._attributeMutationBlocked = !0), this._checked = !!s, this.updateFormValue();
319
+ const a = typeof s == "object" ? s.attribute : !1;
320
+ a && (s = s.value), this.hasUpdated && !a && (this._attributeMutationBlocked = !0), this._checked = !!s, this.updateFormValue();
296
321
  }
297
322
  get checked() {
298
323
  return this._checked;
@@ -305,16 +330,16 @@ const M = (c) => (() => {
305
330
  return "checkbox";
306
331
  }
307
332
  constructor() {
308
- var s, l, a;
309
- super(), this._attributeMutationBlocked = (f(this, e), !1), this._languageController = new z(this), this._checked = !1, this._handleKeyboardInteraction = (d) => {
310
- d.key === " " && this._handleUserInteraction();
333
+ var s, a, i;
334
+ super(), this._attributeMutationBlocked = (_(this, t), !1), this._languageController = new B(this), this._checked = !1, this._handleKeyboardInteraction = (n) => {
335
+ n.key === " " && this._handleUserInteraction();
311
336
  }, this._handleUserInteraction = () => {
312
- var d;
313
- this.disabled || ((d = this.withUserInteraction) == null || d.call(this), this.checked = !this.checked, this._attributeMutationBlocked = !0, this.dispatchEvent(new InputEvent("input", { composed: !0, bubbles: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 })));
314
- }, this.internals.role = "checkbox", (s = this.addEventListener) == null || s.call(this, "click", this._handleUserInteraction), (l = this.addEventListener) == null || l.call(this, "keydown", H), (a = this.addEventListener) == null || a.call(this, "keyup", this._handleKeyboardInteraction);
337
+ var n;
338
+ this.disabled || ((n = this.withUserInteraction) == null || n.call(this), this.checked = !this.checked, this._attributeMutationBlocked = !0, this.dispatchEvent(new InputEvent("input", { composed: !0, bubbles: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 })));
339
+ }, this.internals.role = "checkbox", (s = this.addEventListener) == null || s.call(this, "click", this._handleUserInteraction), (a = this.addEventListener) == null || a.call(this, "keydown", J), (i = this.addEventListener) == null || i.call(this, "keyup", this._handleKeyboardInteraction);
315
340
  }
316
- attributeChangedCallback(s, l, a) {
317
- (s !== "checked" || !this._attributeMutationBlocked) && super.attributeChangedCallback(s, l, a);
341
+ attributeChangedCallback(s, a, i) {
342
+ (s !== "checked" || !this._attributeMutationBlocked) && super.attributeChangedCallback(s, a, i);
318
343
  }
319
344
  /**
320
345
  * Is called whenever the form is being reset.
@@ -326,59 +351,217 @@ const M = (c) => (() => {
326
351
  }
327
352
  /**
328
353
  * Called when the browser is trying to restore element’s state to state in which case
329
- * reason is restore”, or when the browser is trying to fulfill autofill on behalf of
330
- * user in which case reason is autocomplete”.
331
- * In the case of restore”, state is a string, File, or FormData object
354
+ * reason is "restore", or when the browser is trying to fulfill autofill on behalf of
355
+ * user in which case reason is "autocomplete".
356
+ * In the case of "restore", state is a string, File, or FormData object
332
357
  * previously set as the second argument to setFormValue.
333
358
  *
334
359
  * @internal
335
360
  */
336
- formStateRestoreCallback(s, l) {
361
+ formStateRestoreCallback(s, a) {
337
362
  s && (this.checked = s === "true");
338
363
  }
339
- requestUpdate(s, l, a) {
340
- super.requestUpdate(s, l, a), this.hasUpdated && (s === "checked" || s === "required" || !s) && this._setValidity();
341
- }
342
- firstUpdated(s) {
343
- super.firstUpdated(s), this._setValidity();
344
- }
345
364
  updateFormValue() {
346
365
  this.checked ? this.internals.setFormValue(this.value, `${this.checked}`) : this.internals.setFormValue(null);
347
366
  }
348
- _setValidity() {
349
- this.required && !this.checked ? this.setValidityFlag("valueMissing", W[this._languageController.current]) : this.removeValidityFlag("valueMissing");
367
+ shouldValidate(s) {
368
+ return super.shouldValidate(s) || s === "checked" || s === "required";
369
+ }
370
+ validate() {
371
+ super.validate(), this.required && !this.checked ? this.setValidityFlag("valueMissing", Y[this._languageController.current]) : this.removeValidityFlag("valueMissing");
350
372
  }
351
- }, r = n, (() => {
352
- const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
353
- i = [S({
373
+ }, l = u, (() => {
374
+ const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(b[Symbol.metadata] ?? null) : void 0;
375
+ r = [k({
354
376
  type: Boolean,
355
377
  converter: {
356
- ...D,
378
+ ...z,
357
379
  // We need to pass information to the setter so that we know it was called by attribute change.
358
- fromAttribute: (l, a) => {
359
- var b, E;
360
- return { value: (E = (b = D).fromAttribute) == null ? void 0 : E.call(b, l, a), attribute: !0 };
380
+ fromAttribute: (a, i) => {
381
+ var p, x;
382
+ return { value: (x = (p = z).fromAttribute) == null ? void 0 : x.call(p, a, i), attribute: !0 };
361
383
  }
362
384
  }
363
- })], g(n, null, i, { kind: "setter", name: "checked", static: !1, private: !1, access: { has: (l) => "checked" in l, set: (l, a) => {
364
- l.checked = a;
365
- } }, metadata: s }, null, e), g(null, o = { value: r }, u, { kind: "class", name: r.name, metadata: s }, null, p), r = o.value, s && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s }), f(r, p);
366
- })(), r;
367
- })(), O = /* @__PURE__ */ new WeakMap(), fe = (c) => (() => {
385
+ })], y(u, null, r, { kind: "setter", name: "checked", static: !1, private: !1, access: { has: (a) => "checked" in a, set: (a, i) => {
386
+ a.checked = i;
387
+ } }, metadata: s }, null, t), y(null, o = { value: l }, c, { kind: "class", name: l.name, metadata: s }, null, m), l = o.value, s && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s }), _(l, m);
388
+ })(), l;
389
+ })(), ke = (d) => (() => {
368
390
  var r;
369
- let u = M(j(L(c))), o = [], p;
370
- return r = class extends u {
391
+ let c = D(V(d)), o = [], m, l, b, t;
392
+ return r = class extends c {
393
+ /**
394
+ * Form type of element.
395
+ * @default 'text'
396
+ */
397
+ get type() {
398
+ return "text";
399
+ }
400
+ /**
401
+ * The text value of the input element.
402
+ */
403
+ set value(e) {
404
+ super.value = this._cleanText(e), this.hasUpdated && (this.innerHTML = super.value);
405
+ }
406
+ get value() {
407
+ return super.value ?? "";
408
+ }
409
+ /**
410
+ * Whether the component is readonly.
411
+ * @attr readonly
412
+ * @default false
413
+ */
414
+ set readOnly(e) {
415
+ this.toggleAttribute("readonly", !!e), this.internals.ariaReadOnly = e ? "true" : null, this._updateContenteditable();
416
+ }
417
+ get readOnly() {
418
+ return this.hasAttribute("readonly");
419
+ }
420
+ /**
421
+ * Whether the component is disabled.
422
+ * @attr disabled
423
+ * @default false
424
+ */
425
+ set disabled(e) {
426
+ this.toggleAttribute("disabled", !!e), this.internals.ariaDisabled = e ? "true" : null, this._updateContenteditable();
427
+ }
428
+ get disabled() {
429
+ return this.hasAttribute("disabled");
430
+ }
431
+ set placeholder(e) {
432
+ e ? this.setAttribute("placeholder", e) : this.removeAttribute("placeholder"), this.internals.ariaPlaceholder = e || null;
433
+ }
434
+ get placeholder() {
435
+ return this.getAttribute("placeholder") ?? "";
436
+ }
437
+ constructor() {
438
+ var e, s, a, i, n, p, x;
439
+ super(), this._interacted = (_(this, o), !1), this._shouldEmitChange = !1, this._shouldTriggerSubmit = !1, this.language = new B(this), this.internals.role = "textbox", (e = this.addEventListener) == null || e.call(this, "input", () => {
440
+ super.value = this._cleanText(this.textContent ?? ""), this._interacted = !0, this._shouldEmitChange = !0;
441
+ }, { capture: !0 }), (s = this.addEventListener) == null || s.call(this, "change", () => this._shouldEmitChange = !1, { capture: !0 }), (a = this.addEventListener) == null || a.call(this, "keydown", (f) => {
442
+ var g;
443
+ if ((f.key === "Enter" || f.key === `
444
+ `) && f.isTrusted)
445
+ f.preventDefault(), f.stopImmediatePropagation(), this._shouldTriggerSubmit = this.dispatchEvent(new KeyboardEvent("keydown", f));
446
+ else if (P && this.value && (f.key === "Backspace" || f.key === "Delete") && f.isTrusted) {
447
+ if (f.preventDefault(), f.stopImmediatePropagation(), !this.dispatchEvent(new KeyboardEvent("keydown", f)))
448
+ return;
449
+ const h = (g = window.getSelection()) == null ? void 0 : g.getRangeAt(0);
450
+ if (!h)
451
+ return;
452
+ h.startOffset !== h.endOffset ? (h.deleteContents(), this._dispatchInputEvent()) : f.key === "Backspace" && h.startOffset > 0 ? (h.setStart(h.startContainer, h.startOffset - 1), h.deleteContents(), this._dispatchInputEvent()) : f.key === "Delete" && h.endOffset < this.value.length && (h.setEnd(h.endContainer, h.endOffset + 1), h.deleteContents(), this._dispatchInputEvent());
453
+ }
454
+ }, { capture: !0 }), (i = this.addEventListener) == null || i.call(this, "keyup", (f) => {
455
+ var g;
456
+ (f.key === "Enter" || f.key === `
457
+ `) && (this._emitChangeIfNecessary(), this._shouldTriggerSubmit && (this._shouldTriggerSubmit = !1, (g = this.form) == null || g.requestSubmit()));
458
+ }, { capture: !0 }), (n = this.addEventListener) == null || n.call(this, "paste", (f) => {
459
+ var w, q;
460
+ f.preventDefault();
461
+ const g = this._cleanText(((w = f.clipboardData) == null ? void 0 : w.getData("text/plain")) ?? ""), h = (q = window.getSelection()) == null ? void 0 : q.getRangeAt(0);
462
+ !h || !g || (h.deleteContents(), h.insertNode(document.createTextNode(g)), h.setStart(h.endContainer, h.endOffset), this._dispatchInputEvent());
463
+ }), (p = this.addEventListener) == null || p.call(this, "focus", () => {
464
+ var f;
465
+ se.mostRecentModality === "keyboard" && ((f = window.getSelection()) == null || f.selectAllChildren(this));
466
+ }), (x = this.addEventListener) == null || x.call(this, "blur", () => {
467
+ var f;
468
+ (f = window.getSelection()) == null || f.removeAllRanges(), this._emitChangeIfNecessary(), this.scrollLeft = 0;
469
+ }, { capture: !0 });
470
+ }
471
+ connectedCallback() {
472
+ super.connectedCallback(), this.internals.ariaMultiLine = "false", this._updateContenteditable(), this.innerHTML = this.value;
473
+ }
474
+ focus(e) {
475
+ if (super.focus(e), !M && !this.disabled && !this.readOnly && this.value) {
476
+ const s = window.getSelection();
477
+ if (!s)
478
+ return;
479
+ let a = s.rangeCount > 0 ? s.getRangeAt(0) : null;
480
+ if (a && a.startOffset !== 0)
481
+ return;
482
+ a = document.createRange(), a.setStart(this.firstChild, this.textContent.length), a.collapse(!0), s.removeAllRanges(), s.addRange(a);
483
+ }
484
+ }
485
+ attributeChangedCallback(e, s, a) {
486
+ (e !== "value" || !this._interacted) && super.attributeChangedCallback(e, s, a);
487
+ }
488
+ /**
489
+ * Is called whenever the form is being reset.
490
+ *
491
+ * @internal
492
+ */
493
+ formResetCallback() {
494
+ this._interacted = !1, this.value = this.getAttribute("value") ?? "";
495
+ }
496
+ /**
497
+ * Called when the browser is trying to restore element’s state to state in which case
498
+ * reason is "restore", or when the browser is trying to fulfill autofill on behalf of
499
+ * user in which case reason is "autocomplete".
500
+ * In the case of "restore", state is a string, File, or FormData object
501
+ * previously set as the second argument to setFormValue.
502
+ *
503
+ * @internal
504
+ */
505
+ formStateRestoreCallback(e, s) {
506
+ e && typeof e == "string" && (this.value = e);
507
+ }
508
+ updateFormValue() {
509
+ this.internals.setFormValue(this.value, this.value);
510
+ }
511
+ shouldValidate(e) {
512
+ return super.shouldValidate(e) || e === "value" || e === "required";
513
+ }
514
+ validate() {
515
+ super.validate(), this.required && !this.value ? this.setValidityFlag("valueMissing", Z[this.language.current]) : this.removeValidityFlag("valueMissing");
516
+ }
517
+ _cleanText(e) {
518
+ return `${e}`.replace(/[\n\r]+/g, "");
519
+ }
520
+ _dispatchInputEvent() {
521
+ this.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 }));
522
+ }
523
+ _cleanChildren() {
524
+ if (this.childElementCount)
525
+ for (const e of this.children)
526
+ e.remove();
527
+ }
528
+ _updateContenteditable() {
529
+ if (!M && this.isConnected) {
530
+ const e = this.disabled || this.readOnly ? "false" : te ? "true" : "plaintext-only";
531
+ this.setAttribute("contenteditable", e), this.readOnly ? this.setAttribute("tabindex", "0") : this.removeAttribute("tabindex");
532
+ }
533
+ }
534
+ _emitChangeIfNecessary() {
535
+ this._shouldEmitChange && (this._shouldEmitChange = !1, this.dispatchEvent(new Event("change", { bubbles: !0 })));
536
+ }
537
+ render() {
538
+ return R`<slot @slotchange=${this._cleanChildren}></slot>`;
539
+ }
540
+ }, (() => {
541
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
542
+ m = [k({ type: Boolean })], l = [k({ type: Boolean })], b = [k({ attribute: !1 })], t = [G({ passive: !0 })], y(r, null, m, { kind: "setter", name: "readOnly", static: !1, private: !1, access: { has: (s) => "readOnly" in s, set: (s, a) => {
543
+ s.readOnly = a;
544
+ } }, metadata: e }, null, o), y(r, null, l, { kind: "setter", name: "disabled", static: !1, private: !1, access: { has: (s) => "disabled" in s, set: (s, a) => {
545
+ s.disabled = a;
546
+ } }, metadata: e }, null, o), y(r, null, b, { kind: "setter", name: "placeholder", static: !1, private: !1, access: { has: (s) => "placeholder" in s, set: (s, a) => {
547
+ s.placeholder = a;
548
+ } }, metadata: e }, null, o), y(r, null, t, { kind: "method", name: "_cleanChildren", static: !1, private: !1, access: { has: (s) => "_cleanChildren" in s, get: (s) => s._cleanChildren }, metadata: e }, null, o), e && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
549
+ })(), r;
550
+ })(), T = /* @__PURE__ */ new WeakMap(), xe = (d) => (() => {
551
+ var l;
552
+ let c = A(D(V(d))), o = [], m;
553
+ return l = class extends c {
371
554
  /**
372
555
  * Whether the radio button is checked.
373
556
  */
374
- set checked(e) {
375
- this._checked = !!e, this.toggleAttribute("data-checked", this.checked), this.internals.ariaChecked = this.checked.toString(), this.updateFormValue(), this._synchronizeGroupState();
557
+ set checked(t) {
558
+ this._checked = !!t, this.toggleAttribute("data-checked", this.checked), this.internals.ariaChecked = this.checked.toString(), this.updateFormValue(), this._synchronizeGroupState();
376
559
  }
377
560
  get checked() {
378
561
  return this._checked;
379
562
  }
380
- set name(e) {
381
- super.name = e, this._disconnectFromRegistry(), this._connectToRegistry(), this._synchronizeGroupState();
563
+ set name(t) {
564
+ super.name = t, this._disconnectFromRegistry(), this._connectToRegistry(), this._synchronizeGroupState();
382
565
  }
383
566
  get name() {
384
567
  return super.name;
@@ -391,8 +574,8 @@ const M = (c) => (() => {
391
574
  return "radio";
392
575
  }
393
576
  constructor() {
394
- var e;
395
- super(), this._checked = (f(this, o), !1), this.abort = new T(this), this._didLoad = !1, this._languageController = new z(this), this.internals.role = "radio", (e = this.addEventListener) == null || e.call(this, "keydown", (i) => this._handleArrowKeyDown(i));
577
+ var t;
578
+ super(), this._checked = (_(this, o), !1), this.abort = new X(this), this._didLoad = !1, this._languageController = new B(this), this.internals.role = "radio", (t = this.addEventListener) == null || t.call(this, "keydown", (r) => this._handleArrowKeyDown(r));
396
579
  }
397
580
  connectedCallback() {
398
581
  super.connectedCallback(), this._connectToRegistry(), this._synchronizeGroupState();
@@ -409,21 +592,18 @@ const M = (c) => (() => {
409
592
  }
410
593
  /**
411
594
  * Called when the browser is trying to restore element’s state to state in which case
412
- * reason is restore”, or when the browser is trying to fulfill autofill on behalf of
413
- * user in which case reason is autocomplete”.
595
+ * reason is "restore", or when the browser is trying to fulfill autofill on behalf of
596
+ * user in which case reason is "autocomplete".
414
597
  * @internal
415
598
  */
416
- formStateRestoreCallback(e, i) {
417
- e && (this.checked = e === this.value);
418
- }
419
- requestUpdate(e, i, n) {
420
- super.requestUpdate(e, i, n), this.hasUpdated && (e === "checked" || e === "required" || !e) && this._setValidity();
599
+ formStateRestoreCallback(t, r) {
600
+ t && (this.checked = t === this.value);
421
601
  }
422
- willUpdate(e) {
423
- super.willUpdate(e), e.has("disabled") && this.updateFocusableRadios();
602
+ willUpdate(t) {
603
+ super.willUpdate(t), t.has("disabled") && this.updateFocusableRadios();
424
604
  }
425
- firstUpdated(e) {
426
- super.firstUpdated(e), this._didLoad = !0, this.updateFocusableRadios(), this._setValidity();
605
+ firstUpdated(t) {
606
+ super.firstUpdated(t), this._didLoad = !0, this.updateFocusableRadios();
427
607
  }
428
608
  /**
429
609
  * Called on `value` change
@@ -432,6 +612,21 @@ const M = (c) => (() => {
432
612
  updateFormValue() {
433
613
  this.checked ? this.internals.setFormValue(this.value, this.value) : this.internals.setFormValue(null);
434
614
  }
615
+ shouldValidate(t) {
616
+ return super.shouldValidate(t) || t === "checked" || t === "required";
617
+ }
618
+ /**
619
+ * Sets the validity of all associated radio buttons.
620
+ * If any radio button is required, all associated are required as well.
621
+ */
622
+ validate() {
623
+ if (super.validate(), !this.associatedRadioButtons)
624
+ return;
625
+ let t = !1, r = !1;
626
+ for (const u of this.associatedRadioButtons)
627
+ t || (t = u.required), r || (r = u.checked);
628
+ t && !r ? this.associatedRadioButtons.forEach((u) => u.setValidityFlag("valueMissing", ee[this._languageController.current])) : this.associatedRadioButtons.forEach((u) => u.removeValidityFlag("valueMissing"));
629
+ }
435
630
  /**
436
631
  * Only a single radio should be focusable in the group. Defined as:
437
632
  * - the checked radio;
@@ -440,11 +635,11 @@ const M = (c) => (() => {
440
635
  updateFocusableRadios() {
441
636
  if (!this._didLoad)
442
637
  return;
443
- const e = this._interactableGroupedRadios(), i = e.findIndex((t) => t.checked && !t.disabled && !t.formDisabled), n = i !== -1 ? i : e.findIndex((t) => !t.disabled && !t.formDisabled);
444
- n !== -1 && (e[n].tabIndex = 0, e.splice(n, 1)), e.forEach((t) => t.removeAttribute("tabindex"));
638
+ const t = this._interactableGroupedRadios(), r = t.findIndex((e) => e.checked && !e.disabled && !e.formDisabled), u = r !== -1 ? r : t.findIndex((e) => !e.disabled && !e.formDisabled);
639
+ u !== -1 && (t[u].tabIndex = 0, t.splice(u, 1)), t.forEach((e) => e.removeAttribute("tabindex"));
445
640
  }
446
- async navigateByKeyboard(e) {
447
- e.checked = !0, this.emitChangeEvents(), await e.updateComplete, e.focus();
641
+ async navigateByKeyboard(t) {
642
+ t.checked = !0, this.emitChangeEvents(), await t.updateComplete, t.focus();
448
643
  }
449
644
  emitChangeEvents() {
450
645
  this.dispatchEvent(new InputEvent("input", { bubbles: !0, cancelable: !0, composed: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 }));
@@ -456,61 +651,49 @@ const M = (c) => (() => {
456
651
  * Add `this` to the radioButton registry
457
652
  */
458
653
  _connectToRegistry() {
459
- if (!this.name || G)
654
+ if (!this.name || M)
460
655
  return;
461
- const e = this.form ?? this.getRootNode();
462
- this._radioButtonGroupsMap = O.get(e), this._radioButtonGroupsMap || (this._radioButtonGroupsMap = /* @__PURE__ */ new Map(), O.set(e, this._radioButtonGroupsMap)), this.associatedRadioButtons = this._radioButtonGroupsMap.get(this.name), this.associatedRadioButtons || (this.associatedRadioButtons = /* @__PURE__ */ new Set(), this._radioButtonGroupsMap.set(this.name, this.associatedRadioButtons));
463
- const i = Array.from(this.associatedRadioButtons);
656
+ const t = this.form ?? this.getRootNode();
657
+ this._radioButtonGroupsMap = T.get(t), this._radioButtonGroupsMap || (this._radioButtonGroupsMap = /* @__PURE__ */ new Map(), T.set(t, this._radioButtonGroupsMap)), this.associatedRadioButtons = this._radioButtonGroupsMap.get(this.name), this.associatedRadioButtons || (this.associatedRadioButtons = /* @__PURE__ */ new Set(), this._radioButtonGroupsMap.set(this.name, this.associatedRadioButtons));
658
+ const r = Array.from(this.associatedRadioButtons);
464
659
  this.associatedRadioButtons.clear();
465
- const n = i.findIndex((t) => this.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING);
466
- n !== -1 ? i.splice(n, 0, this) : i.push(this), i.forEach((t) => this.associatedRadioButtons.add(t)), this._setValidity();
660
+ const u = r.findIndex((e) => this.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING);
661
+ u !== -1 ? r.splice(u, 0, this) : r.push(this), r.forEach((e) => this.associatedRadioButtons.add(e)), this.validate();
467
662
  }
468
663
  /**
469
664
  * Remove `this` from the radioButton registry and, if the group is empty, delete the entry from the groups Map
470
665
  */
471
666
  _disconnectFromRegistry() {
472
- var e, i, n;
473
- (e = this.associatedRadioButtons) == null || e.delete(this), ((i = this.associatedRadioButtons) == null ? void 0 : i.size) === 0 ? (n = this._radioButtonGroupsMap) == null || n.delete(this.name) : this._setValidity(), this.associatedRadioButtons = void 0, this._radioButtonGroupsMap = void 0;
474
- }
475
- /**
476
- * Sets the validity of all associated radio buttons.
477
- * If any radio button is required, all associated are required as well.
478
- */
479
- _setValidity() {
480
- if (!this.associatedRadioButtons)
481
- return;
482
- let e = !1, i = !1;
483
- for (const n of this.associatedRadioButtons)
484
- e || (e = n.required), i || (i = n.checked);
485
- e && !i ? this.associatedRadioButtons.forEach((n) => n.setValidityFlag("valueMissing", X[this._languageController.current])) : this.associatedRadioButtons.forEach((n) => n.removeValidityFlag("valueMissing"));
667
+ var t, r, u;
668
+ (t = this.associatedRadioButtons) == null || t.delete(this), ((r = this.associatedRadioButtons) == null ? void 0 : r.size) === 0 ? (u = this._radioButtonGroupsMap) == null || u.delete(this.name) : this.validate(), this.associatedRadioButtons = void 0, this._radioButtonGroupsMap = void 0;
486
669
  }
487
670
  /**
488
671
  * Return a list of 'interactable' grouped radios, ordered in DOM order
489
672
  */
490
673
  _interactableGroupedRadios() {
491
- return Array.from(this.associatedRadioButtons ?? []).filter((e) => Q.isVisible(e));
674
+ return Array.from(this.associatedRadioButtons ?? []).filter((t) => ae.isVisible(t));
492
675
  }
493
676
  /**
494
677
  * Deselect other radio of the same group
495
678
  */
496
679
  _deselectGroupedRadios() {
497
- Array.from(this.associatedRadioButtons ?? []).filter((e) => e !== this).forEach((e) => e.checked = !1);
680
+ Array.from(this.associatedRadioButtons ?? []).filter((t) => t !== this).forEach((t) => t.checked = !1);
498
681
  }
499
- async _handleArrowKeyDown(e) {
500
- if (!Y(e))
682
+ async _handleArrowKeyDown(t) {
683
+ if (!ie(t))
501
684
  return;
502
- e.preventDefault();
503
- const i = this._interactableGroupedRadios().filter((s) => !s.disabled && !s.formDisabled), n = i.indexOf(this), t = Z(e, n, i.length);
504
- await this.navigateByKeyboard(i[t]);
685
+ t.preventDefault();
686
+ const r = this._interactableGroupedRadios().filter((s) => !s.disabled && !s.formDisabled), u = r.indexOf(this), e = re(t, u, r.length);
687
+ await this.navigateByKeyboard(r[e]);
505
688
  }
506
689
  }, (() => {
507
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
508
- p = [S({ type: Boolean })], g(r, null, p, { kind: "setter", name: "checked", static: !1, private: !1, access: { has: (i) => "checked" in i, set: (i, n) => {
509
- i.checked = n;
510
- } }, metadata: e }, null, o), e && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
511
- })(), r;
512
- })(), se = (c) => {
513
- class m extends c {
690
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
691
+ m = [k({ type: Boolean })], y(l, null, m, { kind: "setter", name: "checked", static: !1, private: !1, access: { has: (r) => "checked" in r, set: (r, u) => {
692
+ r.checked = u;
693
+ } }, metadata: t }, null, o), t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
694
+ })(), l;
695
+ })(), le = (d) => {
696
+ class v extends d {
514
697
  /**
515
698
  * Returns a Promise that resolves when the element has completed hydration.
516
699
  * The Promise value is a boolean that is `true` if the element required hydration
@@ -527,15 +710,15 @@ const M = (c) => (() => {
527
710
  return this._hydrationRequired;
528
711
  }
529
712
  constructor(...o) {
530
- var p;
531
- if (super(...o), this._hydrationComplete = new Promise((r) => this._resolveHydration = r), this._hydrationRequired = !!this.shadowRoot, !this._hydrationRequired)
713
+ var m;
714
+ if (super(...o), this._hydrationComplete = new Promise((l) => this._resolveHydration = l), this._hydrationRequired = !!this.shadowRoot, !this._hydrationRequired)
532
715
  this._resolveHydration(!1);
533
716
  else {
534
- const r = (i) => {
535
- this._hydrationRequired && i.stopImmediatePropagation();
536
- }, h = { capture: !0 }, e = (p = this.shadowRoot) == null ? void 0 : p.querySelectorAll("slot");
537
- e != null && e.length && (e.forEach((i) => i.addEventListener("slotchange", r, h)), this.hydrationComplete.then(() => e.forEach((i) => {
538
- i.removeEventListener("slotchange", r, h), i.assignedNodes().length && i.dispatchEvent(new Event("slotchange", { bubbles: !0 }));
717
+ const l = (r) => {
718
+ this._hydrationRequired && r.stopImmediatePropagation();
719
+ }, b = { capture: !0 }, t = (m = this.shadowRoot) == null ? void 0 : m.querySelectorAll("slot");
720
+ t != null && t.length && (t.forEach((r) => r.addEventListener("slotchange", l, b)), this.hydrationComplete.then(() => t.forEach((r) => {
721
+ r.removeEventListener("slotchange", l, b), r.assignedNodes().length && r.dispatchEvent(new Event("slotchange", { bubbles: !0 }));
539
722
  })));
540
723
  }
541
724
  }
@@ -543,17 +726,17 @@ const M = (c) => (() => {
543
726
  super.update(o), this._hydrationRequired && (this._hydrationRequired = !1, this._resolveHydration(!0));
544
727
  }
545
728
  }
546
- return m;
547
- }, F = "data-ssr-child-count", U = "li", ve = (c) => (() => {
548
- var h, e;
549
- let u = se(c), o, p = [], r = [];
550
- return e = class extends u {
729
+ return v;
730
+ }, U = "data-ssr-child-count", j = "li", Ce = (d) => (() => {
731
+ var b, t;
732
+ let c = le(d), o, m = [], l = [];
733
+ return t = class extends c {
551
734
  constructor() {
552
735
  super(...arguments);
553
- C(this, h);
554
- y(this, h, f(this, p, [])), this._handleSlotchange = (f(this, r), () => {
555
- const t = Array.from(this.children ?? []).filter((s) => this.listChildLocalNames.includes(s.localName));
556
- t.length === this.listChildren.length && this.listChildren.every((s, l) => t[l] === s) || (this.listChildren.filter((s) => !t.includes(s)).forEach((s) => s.removeAttribute("slot")), this.listChildren = t, this.listChildren.forEach((s, l) => s.setAttribute("slot", `${U}-${l}`)), this.removeAttribute(F));
736
+ E(this, b);
737
+ S(this, b, _(this, m, [])), this._handleSlotchange = (_(this, l), () => {
738
+ const e = Array.from(this.children ?? []).filter((s) => this.listChildLocalNames.includes(s.localName));
739
+ e.length === this.listChildren.length && this.listChildren.every((s, a) => e[a] === s) || (this.listChildren.filter((s) => !e.includes(s)).forEach((s) => s.removeAttribute("slot")), this.listChildren = e, this.listChildren.forEach((s, a) => s.setAttribute("slot", `${j}-${a}`)), this.removeAttribute(U));
557
740
  });
558
741
  }
559
742
  /**
@@ -562,18 +745,18 @@ const M = (c) => (() => {
562
745
  * to the child elements.
563
746
  */
564
747
  get listChildren() {
565
- return x(this, h);
748
+ return C(this, b);
566
749
  }
567
- set listChildren(t) {
568
- y(this, h, t);
750
+ set listChildren(e) {
751
+ S(this, b, e);
569
752
  }
570
753
  connectedCallback() {
571
- var t;
572
- super.connectedCallback(), (t = this.shadowRoot) == null || t.addEventListener("slotchange", this._handleSlotchange, { passive: !0 });
754
+ var e;
755
+ super.connectedCallback(), (e = this.shadowRoot) == null || e.addEventListener("slotchange", this._handleSlotchange, { passive: !0 });
573
756
  }
574
757
  disconnectedCallback() {
575
- var t;
576
- super.disconnectedCallback(), (t = this.shadowRoot) == null || t.removeEventListener("slotchange", this._handleSlotchange);
758
+ var e;
759
+ super.disconnectedCallback(), (e = this.shadowRoot) == null || e.removeEventListener("slotchange", this._handleSlotchange);
577
760
  }
578
761
  /**
579
762
  * Renders list and list slots for slotted children or a number of list slots
@@ -584,24 +767,24 @@ const M = (c) => (() => {
584
767
  * framework wrapper (like e.g. React). This allows to provide the number of
585
768
  * children to be passed via the `data-ssr-child-count` attribute value.
586
769
  */
587
- renderList(t = {}, s = {}) {
588
- const l = this.listSlotEntries(s);
589
- return l.length >= 2 ? I`
770
+ renderList(e = {}, s = {}) {
771
+ const a = this.listSlotEntries(s);
772
+ return a.length >= 2 ? R`
590
773
  <ul
591
- class=${t.class || this.localName}
592
- aria-label=${t.ariaLabel || B}
593
- aria-labelledby=${t.ariaLabelledby || B}
774
+ class=${e.class || this.localName}
775
+ aria-label=${e.ariaLabel || O}
776
+ aria-labelledby=${e.ariaLabelledby || O}
594
777
  >
595
- ${l.map((a) => I`
596
- <li aria-hidden=${a.ariaHidden || B}>
597
- <slot name=${a.name}></slot>
778
+ ${a.map((i) => R`
779
+ <li aria-hidden=${i.ariaHidden || O}>
780
+ <slot name=${i.name}></slot>
598
781
  </li>
599
782
  `)}
600
783
  </ul>
601
784
  ${this.renderHiddenSlot()}
602
- ` : l.length === 1 ? I`<sbb-screen-reader-only>${t.ariaLabel}</sbb-screen-reader-only>
603
- <span class=${t.class || this.localName}>
604
- <span><slot name=${l[0].name}></slot></span>
785
+ ` : a.length === 1 ? R`<sbb-screen-reader-only>${e.ariaLabel}</sbb-screen-reader-only>
786
+ <span class=${e.class || this.localName}>
787
+ <span><slot name=${a[0].name}></slot></span>
605
788
  </span>
606
789
  ${this.renderHiddenSlot()} ` : this.renderHiddenSlot();
607
790
  }
@@ -614,12 +797,12 @@ const M = (c) => (() => {
614
797
  * framework wrapper (like e.g. React). This allows to provide the number of
615
798
  * children to be passed via the `data-ssr-child-count` attribute value.
616
799
  */
617
- listSlotEntries(t) {
618
- return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(F) ?? 0) })).map((l, a) => {
619
- var d;
800
+ listSlotEntries(e) {
801
+ return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(U) ?? 0) })).map((a, i) => {
802
+ var n;
620
803
  return {
621
- name: `${U}-${a}`,
622
- ariaHidden: ((d = t == null ? void 0 : t.localNameVisualOnly) == null ? void 0 : d.includes(l.localName)) ?? !1
804
+ name: `${j}-${i}`,
805
+ ariaHidden: ((n = e == null ? void 0 : e.localNameVisualOnly) == null ? void 0 : n.includes(a.localName)) ?? !1
623
806
  };
624
807
  });
625
808
  }
@@ -629,85 +812,86 @@ const M = (c) => (() => {
629
812
  * the slotchange event, which can be used to assign it to the appropriate named slot.
630
813
  */
631
814
  renderHiddenSlot() {
632
- return I`<span hidden><slot></slot></span>`;
633
- }
634
- }, h = new WeakMap(), (() => {
635
- const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
636
- o = [A()], g(e, null, o, { kind: "accessor", name: "listChildren", static: !1, private: !1, access: { has: (s) => "listChildren" in s, get: (s) => s.listChildren, set: (s, l) => {
637
- s.listChildren = l;
638
- } }, metadata: t }, p, r), t && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
639
- })(), e;
640
- })(), _e = (c) => (() => {
641
- var h, e;
642
- let u = c, o, p = [], r = [];
643
- return e = class extends u {
815
+ return R`<span hidden><slot></slot></span>`;
816
+ }
817
+ }, b = new WeakMap(), (() => {
818
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
819
+ o = [N()], y(t, null, o, { kind: "accessor", name: "listChildren", static: !1, private: !1, access: { has: (s) => "listChildren" in s, get: (s) => s.listChildren, set: (s, a) => {
820
+ s.listChildren = a;
821
+ } }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
822
+ })(), t;
823
+ })(), Ee = (d) => (() => {
824
+ var b, t;
825
+ let c = d, o, m = [], l = [];
826
+ return t = class extends c {
644
827
  constructor() {
645
828
  super(...arguments);
646
- C(this, h, f(this, p, !1));
647
- f(this, r);
829
+ E(this, b, _(this, m, !1));
830
+ _(this, l);
648
831
  }
649
832
  /** Negative coloring variant flag. */
650
833
  get negative() {
651
- return x(this, h);
652
- }
653
- set negative(t) {
654
- y(this, h, t);
655
- }
656
- }, h = new WeakMap(), (() => {
657
- const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
658
- o = [R(), S({ reflect: !0, type: Boolean })], g(e, null, o, { kind: "accessor", name: "negative", static: !1, private: !1, access: { has: (s) => "negative" in s, get: (s) => s.negative, set: (s, l) => {
659
- s.negative = l;
660
- } }, metadata: t }, p, r), t && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
661
- })(), e;
662
- })(), ye = (c) => (() => {
663
- var l, a, d, b;
664
- let u = c, o, p = [], r = [], h, e = [], i = [], n, t = [], s = [];
665
- return b = class extends u {
834
+ return C(this, b);
835
+ }
836
+ set negative(e) {
837
+ S(this, b, e);
838
+ }
839
+ }, b = new WeakMap(), (() => {
840
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
841
+ o = [I(), k({ reflect: !0, type: Boolean })], y(t, null, o, { kind: "accessor", name: "negative", static: !1, private: !1, access: { has: (s) => "negative" in s, get: (s) => s.negative, set: (s, a) => {
842
+ s.negative = a;
843
+ } }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
844
+ })(), t;
845
+ })(), we = (d) => (() => {
846
+ var a, i, n, p;
847
+ let c = d, o, m = [], l = [], b, t = [], r = [], u, e = [], s = [];
848
+ return p = class extends c {
666
849
  constructor() {
667
850
  super(...arguments);
668
- C(this, l);
669
- C(this, a);
670
- C(this, d);
671
- y(this, l, f(this, p, "white")), y(this, a, (f(this, r), f(this, e, !1))), y(this, d, (f(this, i), f(this, t, ""))), this._panelConnected = (f(this, s), new K(this, b.events.panelConnected, { bubbles: !0 }));
851
+ E(this, a);
852
+ E(this, i);
853
+ E(this, n);
854
+ S(this, a, _(this, m, "white")), S(this, i, (_(this, l), _(this, t, !1))), S(this, n, (_(this, r), _(this, e, ""))), this._panelConnected = (_(this, s), new Q(this, p.events.panelConnected, { bubbles: !0 }));
672
855
  }
673
856
  /** The background color of the panel. */
674
857
  get color() {
675
- return x(this, l);
858
+ return C(this, a);
676
859
  }
677
- set color(_) {
678
- y(this, l, _);
860
+ set color(g) {
861
+ S(this, a, g);
679
862
  }
680
863
  /** Whether the unselected panel has a border. */
681
864
  get borderless() {
682
- return x(this, a);
865
+ return C(this, i);
683
866
  }
684
- set borderless(_) {
685
- y(this, a, _);
867
+ set borderless(g) {
868
+ S(this, i, g);
686
869
  }
687
870
  /** @internal used for accessibility label when in expansion panel */
688
871
  get expansionState() {
689
- return x(this, d);
872
+ return C(this, n);
690
873
  }
691
- set expansionState(_) {
692
- y(this, d, _);
874
+ set expansionState(g) {
875
+ S(this, n, g);
693
876
  }
694
877
  connectedCallback() {
695
- super.connectedCallback(), this._panelConnected.emit();
696
- }
697
- }, l = new WeakMap(), a = new WeakMap(), d = new WeakMap(), (() => {
698
- const _ = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
699
- o = [S()], h = [R(), S({ reflect: !0, type: Boolean })], n = [R(), S()], g(b, null, o, { kind: "accessor", name: "color", static: !1, private: !1, access: { has: (v) => "color" in v, get: (v) => v.color, set: (v, w) => {
700
- v.color = w;
701
- } }, metadata: _ }, p, r), g(b, null, h, { kind: "accessor", name: "borderless", static: !1, private: !1, access: { has: (v) => "borderless" in v, get: (v) => v.borderless, set: (v, w) => {
702
- v.borderless = w;
703
- } }, metadata: _ }, e, i), g(b, null, n, { kind: "accessor", name: "expansionState", static: !1, private: !1, access: { has: (v) => "expansionState" in v, get: (v) => v.expansionState, set: (v, w) => {
704
- v.expansionState = w;
705
- } }, metadata: _ }, t, s), _ && Object.defineProperty(b, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: _ });
706
- })(), b.events = {
878
+ var g, h;
879
+ super.connectedCallback(), this._panelConnected.emit(), (h = (g = this.closest) == null ? void 0 : g.call(this, "sbb-radio-button-group, sbb-checkbox-group")) == null || h.toggleAttribute("data-has-panel", !0);
880
+ }
881
+ }, a = new WeakMap(), i = new WeakMap(), n = new WeakMap(), (() => {
882
+ const g = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
883
+ o = [k({ reflect: !0 })], b = [I(), k({ reflect: !0, type: Boolean })], u = [I(), k()], y(p, null, o, { kind: "accessor", name: "color", static: !1, private: !1, access: { has: (h) => "color" in h, get: (h) => h.color, set: (h, w) => {
884
+ h.color = w;
885
+ } }, metadata: g }, m, l), y(p, null, b, { kind: "accessor", name: "borderless", static: !1, private: !1, access: { has: (h) => "borderless" in h, get: (h) => h.borderless, set: (h, w) => {
886
+ h.borderless = w;
887
+ } }, metadata: g }, t, r), y(p, null, u, { kind: "accessor", name: "expansionState", static: !1, private: !1, access: { has: (h) => "expansionState" in h, get: (h) => h.expansionState, set: (h, w) => {
888
+ h.expansionState = w;
889
+ } }, metadata: g }, e, s), g && Object.defineProperty(p, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: g });
890
+ })(), p.events = {
707
891
  panelConnected: "panelConnected"
708
- }, b;
709
- })(), ge = (c) => {
710
- class m extends c {
892
+ }, p;
893
+ })(), Re = (d) => {
894
+ class v extends d {
711
895
  constructor() {
712
896
  super(...arguments), this._updatePromise = Promise.resolve(), this._updateResolve = () => {
713
897
  };
@@ -723,21 +907,22 @@ const M = (c) => (() => {
723
907
  return await this._updatePromise, o;
724
908
  }
725
909
  }
726
- return m;
727
- }, Se = $`:host{--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-white) );--sbb-selection-panel-border-color: var(--sbb-color-cloud);--sbb-selection-panel-border-radius: var( --sbb-selection-expansion-panel-border-radius, var(--sbb-border-radius-4x) );--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-1x) );--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xs) var(--sbb-spacing-responsive-xxs);--sbb-selection-panel-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-selection-panel-cursor: pointer;--sbb-selection-panel-suffix-color: var(--sbb-color-charcoal);--sbb-selection-panel-subtext-color: var(--sbb-color-granite);display:block;outline:none!important}:host([size=s]){--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xxs) var(--sbb-spacing-responsive-xxxs)}:host([color=milk]){--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-milk) )}:host([borderless]:not([data-checked])){--sbb-selection-panel-border-color: transparent}:host(:is([data-checked]):not(:disabled,[disabled])){--sbb-selection-panel-border-color: var(--sbb-color-charcoal);--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-2x) )}:host(:is(:disabled,[disabled])){--sbb-selection-panel-cursor: default}.sbb-selection-panel{display:block;cursor:var(--sbb-selection-panel-cursor);position:relative;border-radius:var(--sbb-selection-panel-border-radius);box-shadow:inset 0 0 0 var(--sbb-selection-panel-border-width) var(--sbb-selection-panel-border-color);padding:var(--sbb-selection-panel-input-padding);background-color:var(--sbb-selection-panel-background);transition-duration:var(--sbb-selection-panel-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:box-shadow}@media (forced-colors: active){.sbb-selection-panel:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:var(--sbb-selection-panel-border-width) solid var(--sbb-selection-panel-border-color);border-radius:var(--sbb-selection-panel-border-radius)}}:host(:focus-visible) .sbb-selection-panel{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:var(--sbb-selection-panel-border-radius);overflow:hidden}slot[name=suffix]{color:var(--sbb-selection-panel-suffix-color)}slot[name=subtext]{display:block;color:var(--sbb-selection-panel-subtext-color);padding-inline-start:var(--sbb-spacing-fixed-8x)}:host(:not([data-slot-names~=subtext])) slot[name=subtext]{display:none}`;
910
+ return v;
911
+ }, Ie = W`:host{--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-white) );--sbb-selection-panel-border-color: var(--sbb-color-cloud);--sbb-selection-panel-border-radius: var( --sbb-selection-expansion-panel-border-radius, var(--sbb-border-radius-4x) );--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-1x) );--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xs) var(--sbb-spacing-responsive-xxs);--sbb-selection-panel-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-selection-panel-cursor: pointer;--sbb-selection-panel-suffix-color: var(--sbb-color-charcoal);--sbb-selection-panel-subtext-color: var(--sbb-color-granite);display:block;outline:none!important}:host([size=s]){--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xxs) var(--sbb-spacing-responsive-xxxs)}:host([color=milk]){--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-milk) )}:host([borderless]:not([data-checked])){--sbb-selection-panel-border-color: transparent}:host(:is([data-checked]):not(:disabled,[disabled])){--sbb-selection-panel-border-color: var(--sbb-color-charcoal);--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-2x) )}:host(:is(:disabled,[disabled])){--sbb-selection-panel-cursor: default}.sbb-selection-panel{display:block;cursor:var(--sbb-selection-panel-cursor);position:relative;border-radius:var(--sbb-selection-panel-border-radius);box-shadow:inset 0 0 0 var(--sbb-selection-panel-border-width) var(--sbb-selection-panel-border-color);padding:var(--sbb-selection-panel-input-padding);background-color:var(--sbb-selection-panel-background);transition-duration:var(--sbb-selection-panel-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:box-shadow}@media (forced-colors: active){.sbb-selection-panel:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:var(--sbb-selection-panel-border-width) solid var(--sbb-selection-panel-border-color);border-radius:var(--sbb-selection-panel-border-radius)}}:host(:focus-visible) .sbb-selection-panel{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:var(--sbb-selection-panel-border-radius);overflow:hidden}slot[name=suffix]{color:var(--sbb-selection-panel-suffix-color)}slot[name=subtext]{display:block;color:var(--sbb-selection-panel-subtext-color);padding-inline-start:var(--sbb-spacing-fixed-8x)}:host(:not([data-slot-names~=subtext])) slot[name=subtext]{display:none}`;
728
912
  export {
729
- ee as SbbDisabledInteractiveMixin,
730
- M as SbbDisabledMixin,
731
- pe as SbbDisabledTabIndexActionMixin,
732
- me as SbbFormAssociatedCheckboxMixin,
733
- L as SbbFormAssociatedMixin,
734
- fe as SbbFormAssociatedRadioButtonMixin,
735
- se as SbbHydrationMixin,
736
- ve as SbbNamedSlotListMixin,
737
- _e as SbbNegativeMixin,
738
- ye as SbbPanelMixin,
739
- j as SbbRequiredMixin,
740
- ge as SbbUpdateSchedulerMixin,
741
- Se as panelCommonStyle,
742
- O as radioButtonRegistry
913
+ ne as SbbDisabledInteractiveMixin,
914
+ A as SbbDisabledMixin,
915
+ _e as SbbDisabledTabIndexActionMixin,
916
+ Se as SbbFormAssociatedCheckboxMixin,
917
+ ke as SbbFormAssociatedInputMixin,
918
+ V as SbbFormAssociatedMixin,
919
+ xe as SbbFormAssociatedRadioButtonMixin,
920
+ le as SbbHydrationMixin,
921
+ Ce as SbbNamedSlotListMixin,
922
+ Ee as SbbNegativeMixin,
923
+ we as SbbPanelMixin,
924
+ D as SbbRequiredMixin,
925
+ Re as SbbUpdateSchedulerMixin,
926
+ Ie as panelCommonStyle,
927
+ T as radioButtonRegistry
743
928
  };