@sbb-esta/lyne-elements 3.0.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/autocomplete/autocomplete.component.d.ts.map +1 -1
  2. package/autocomplete/autocomplete.component.js +1 -1
  3. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
  4. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +4 -4
  5. package/button/accent-button/accent-button.component.d.ts +2 -1
  6. package/button/accent-button/accent-button.component.d.ts.map +1 -1
  7. package/button/accent-button-link/accent-button-link.component.d.ts +2 -1
  8. package/button/accent-button-link/accent-button-link.component.d.ts.map +1 -1
  9. package/button/accent-button-static/accent-button-static.component.d.ts +2 -1
  10. package/button/accent-button-static/accent-button-static.component.d.ts.map +1 -1
  11. package/button/button/button.component.d.ts +2 -1
  12. package/button/button/button.component.d.ts.map +1 -1
  13. package/button/button-link/button-link.component.d.ts +2 -1
  14. package/button/button-link/button-link.component.d.ts.map +1 -1
  15. package/button/button-static/button-static.component.d.ts +2 -1
  16. package/button/button-static/button-static.component.d.ts.map +1 -1
  17. package/button/common/button-common.d.ts +1 -0
  18. package/button/common/button-common.d.ts.map +1 -1
  19. package/button/common/button-common.js +52 -28
  20. package/button/common.js +1 -1
  21. package/button/mini-button/mini-button.component.d.ts +1 -0
  22. package/button/mini-button/mini-button.component.d.ts.map +1 -1
  23. package/button/mini-button/mini-button.component.js +20 -14
  24. package/button/secondary-button/secondary-button.component.d.ts +2 -1
  25. package/button/secondary-button/secondary-button.component.d.ts.map +1 -1
  26. package/button/secondary-button-link/secondary-button-link.component.d.ts +2 -1
  27. package/button/secondary-button-link/secondary-button-link.component.d.ts.map +1 -1
  28. package/button/secondary-button-static/secondary-button-static.component.d.ts +2 -1
  29. package/button/secondary-button-static/secondary-button-static.component.d.ts.map +1 -1
  30. package/button/transparent-button/transparent-button.component.d.ts +2 -1
  31. package/button/transparent-button/transparent-button.component.d.ts.map +1 -1
  32. package/button/transparent-button-link/transparent-button-link.component.d.ts +2 -1
  33. package/button/transparent-button-link/transparent-button-link.component.d.ts.map +1 -1
  34. package/button/transparent-button-static/transparent-button-static.component.d.ts +2 -1
  35. package/button/transparent-button-static/transparent-button-static.component.d.ts.map +1 -1
  36. package/button.js +1 -1
  37. package/checkbox/checkbox-group/checkbox-group.component.d.ts.map +1 -1
  38. package/checkbox/checkbox-group/checkbox-group.component.js +4 -4
  39. package/checkbox/checkbox-panel/checkbox-panel.component.d.ts +3 -0
  40. package/checkbox/checkbox-panel/checkbox-panel.component.d.ts.map +1 -1
  41. package/core/a11y/live-announcer.d.ts.map +1 -1
  42. package/core/a11y/live-announcer.js +10 -8
  43. package/core/base-elements/link-base-element.d.ts +1 -0
  44. package/core/base-elements/link-base-element.d.ts.map +1 -1
  45. package/core/base-elements/link-base-element.js +18 -17
  46. package/core/config/config.d.ts +5 -0
  47. package/core/config/config.d.ts.map +1 -1
  48. package/core/mixins/selection-panel-mixin.d.ts +23 -0
  49. package/core/mixins/selection-panel-mixin.d.ts.map +1 -0
  50. package/core/mixins/selection-panel-mixin.js +87 -0
  51. package/core/mixins.d.ts +1 -0
  52. package/core/mixins.d.ts.map +1 -1
  53. package/core/mixins.js +12 -10
  54. package/core/styles/_index.scss +1 -0
  55. package/core/styles/core.scss +44 -15
  56. package/core/styles/mixins/popover.scss +14 -0
  57. package/core.css +22 -1
  58. package/custom-elements.json +3603 -913
  59. package/development/autocomplete/autocomplete.component.d.ts.map +1 -1
  60. package/development/autocomplete/autocomplete.component.js +2 -2
  61. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
  62. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +2 -2
  63. package/development/button/accent-button/accent-button.component.d.ts +2 -1
  64. package/development/button/accent-button/accent-button.component.d.ts.map +1 -1
  65. package/development/button/accent-button/accent-button.component.js +1 -1
  66. package/development/button/accent-button-link/accent-button-link.component.d.ts +2 -1
  67. package/development/button/accent-button-link/accent-button-link.component.d.ts.map +1 -1
  68. package/development/button/accent-button-link/accent-button-link.component.js +1 -1
  69. package/development/button/accent-button-static/accent-button-static.component.d.ts +2 -1
  70. package/development/button/accent-button-static/accent-button-static.component.d.ts.map +1 -1
  71. package/development/button/accent-button-static/accent-button-static.component.js +1 -1
  72. package/development/button/button/button.component.d.ts +2 -1
  73. package/development/button/button/button.component.d.ts.map +1 -1
  74. package/development/button/button/button.component.js +1 -1
  75. package/development/button/button-link/button-link.component.d.ts +2 -1
  76. package/development/button/button-link/button-link.component.d.ts.map +1 -1
  77. package/development/button/button-link/button-link.component.js +1 -1
  78. package/development/button/button-static/button-static.component.d.ts +2 -1
  79. package/development/button/button-static/button-static.component.d.ts.map +1 -1
  80. package/development/button/button-static/button-static.component.js +1 -1
  81. package/development/button/common/button-common.d.ts +1 -0
  82. package/development/button/common/button-common.d.ts.map +1 -1
  83. package/development/button/common/button-common.js +42 -5
  84. package/development/button/common.js +1 -1
  85. package/development/button/mini-button/mini-button.component.d.ts +1 -0
  86. package/development/button/mini-button/mini-button.component.d.ts.map +1 -1
  87. package/development/button/mini-button/mini-button.component.js +41 -2
  88. package/development/button/secondary-button/secondary-button.component.d.ts +2 -1
  89. package/development/button/secondary-button/secondary-button.component.d.ts.map +1 -1
  90. package/development/button/secondary-button/secondary-button.component.js +1 -1
  91. package/development/button/secondary-button-link/secondary-button-link.component.d.ts +2 -1
  92. package/development/button/secondary-button-link/secondary-button-link.component.d.ts.map +1 -1
  93. package/development/button/secondary-button-link/secondary-button-link.component.js +1 -1
  94. package/development/button/secondary-button-static/secondary-button-static.component.d.ts +2 -1
  95. package/development/button/secondary-button-static/secondary-button-static.component.d.ts.map +1 -1
  96. package/development/button/secondary-button-static/secondary-button-static.component.js +1 -1
  97. package/development/button/transparent-button/transparent-button.component.d.ts +2 -1
  98. package/development/button/transparent-button/transparent-button.component.d.ts.map +1 -1
  99. package/development/button/transparent-button/transparent-button.component.js +1 -1
  100. package/development/button/transparent-button-link/transparent-button-link.component.d.ts +2 -1
  101. package/development/button/transparent-button-link/transparent-button-link.component.d.ts.map +1 -1
  102. package/development/button/transparent-button-link/transparent-button-link.component.js +1 -1
  103. package/development/button/transparent-button-static/transparent-button-static.component.d.ts +2 -1
  104. package/development/button/transparent-button-static/transparent-button-static.component.d.ts.map +1 -1
  105. package/development/button/transparent-button-static/transparent-button-static.component.js +1 -1
  106. package/development/button.js +1 -1
  107. package/development/checkbox/checkbox-group/checkbox-group.component.d.ts.map +1 -1
  108. package/development/checkbox/checkbox-group/checkbox-group.component.js +2 -2
  109. package/development/checkbox/checkbox-panel/checkbox-panel.component.d.ts +3 -0
  110. package/development/checkbox/checkbox-panel/checkbox-panel.component.d.ts.map +1 -1
  111. package/development/checkbox/checkbox-panel/checkbox-panel.component.js +1 -1
  112. package/development/core/a11y/live-announcer.d.ts.map +1 -1
  113. package/development/core/a11y/live-announcer.js +10 -6
  114. package/development/core/base-elements/link-base-element.d.ts +1 -0
  115. package/development/core/base-elements/link-base-element.d.ts.map +1 -1
  116. package/development/core/base-elements/link-base-element.js +3 -1
  117. package/development/core/config/config.d.ts +5 -0
  118. package/development/core/config/config.d.ts.map +1 -1
  119. package/development/core/config/config.js +1 -1
  120. package/development/core/mixins/selection-panel-mixin.d.ts +23 -0
  121. package/development/core/mixins/selection-panel-mixin.d.ts.map +1 -0
  122. package/development/core/mixins/selection-panel-mixin.js +120 -0
  123. package/development/core/mixins.d.ts +1 -0
  124. package/development/core/mixins.d.ts.map +1 -1
  125. package/development/core/mixins.js +7 -5
  126. package/development/dialog/dialog/dialog.component.d.ts +4 -2
  127. package/development/dialog/dialog/dialog.component.d.ts.map +1 -1
  128. package/development/dialog/dialog/dialog.component.js +61 -11
  129. package/development/dialog/dialog-actions/dialog-actions.component.d.ts +1 -0
  130. package/development/dialog/dialog-actions/dialog-actions.component.d.ts.map +1 -1
  131. package/development/dialog/dialog-actions/dialog-actions.component.js +10 -1
  132. package/development/dialog/dialog-close-button/dialog-close-button.component.d.ts +22 -0
  133. package/development/dialog/dialog-close-button/dialog-close-button.component.d.ts.map +1 -0
  134. package/development/dialog/dialog-close-button/dialog-close-button.component.js +53 -0
  135. package/development/dialog/dialog-close-button.d.ts +5 -0
  136. package/development/dialog/dialog-close-button.d.ts.map +1 -0
  137. package/development/dialog/dialog-close-button.js +5 -0
  138. package/development/dialog/dialog-content/dialog-content.component.js +1 -1
  139. package/development/dialog/dialog-title/dialog-title.component.d.ts +1 -0
  140. package/development/dialog/dialog-title/dialog-title.component.d.ts.map +1 -1
  141. package/development/dialog/dialog-title/dialog-title.component.js +6 -2
  142. package/development/dialog.d.ts +1 -0
  143. package/development/dialog.d.ts.map +1 -1
  144. package/development/dialog.js +3 -1
  145. package/development/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +3 -2
  146. package/development/form-field/form-field/form-field.component.d.ts +23 -1
  147. package/development/form-field/form-field/form-field.component.d.ts.map +1 -1
  148. package/development/form-field/form-field/form-field.component.js +39 -12
  149. package/development/form-field/form-field.js +2 -1
  150. package/development/form-field.js +2 -1
  151. package/development/header/header-environment/header-environment.component.d.ts +23 -0
  152. package/development/header/header-environment/header-environment.component.d.ts.map +1 -0
  153. package/development/header/header-environment/header-environment.component.js +111 -0
  154. package/development/header/header-environment.d.ts +5 -0
  155. package/development/header/header-environment.d.ts.map +1 -0
  156. package/development/header/header-environment.js +5 -0
  157. package/development/menu/menu/menu.component.d.ts +1 -0
  158. package/development/menu/menu/menu.component.d.ts.map +1 -1
  159. package/development/menu/menu/menu.component.js +2 -2
  160. package/development/menu/menu-button/menu-button.component.d.ts +1 -0
  161. package/development/menu/menu-button/menu-button.component.d.ts.map +1 -1
  162. package/development/menu/menu-button/menu-button.component.js +2 -3
  163. package/development/menu/menu-link/menu-link.component.d.ts +1 -0
  164. package/development/menu/menu-link/menu-link.component.d.ts.map +1 -1
  165. package/development/menu/menu-link/menu-link.component.js +5 -1
  166. package/development/option/optgroup/optgroup-base-element.d.ts.map +1 -1
  167. package/development/option/optgroup/optgroup-base-element.js +8 -6
  168. package/development/option/option-hint/option-hint.component.d.ts +18 -0
  169. package/development/option/option-hint/option-hint.component.d.ts.map +1 -0
  170. package/development/option/option-hint/option-hint.component.js +74 -0
  171. package/development/option/option-hint.d.ts +5 -0
  172. package/development/option/option-hint.d.ts.map +1 -0
  173. package/development/option/option-hint.js +5 -0
  174. package/development/option.d.ts +1 -0
  175. package/development/option.d.ts.map +1 -1
  176. package/development/option.js +4 -2
  177. package/development/overlay/overlay-base-element.d.ts +1 -0
  178. package/development/overlay/overlay-base-element.d.ts.map +1 -1
  179. package/development/overlay/overlay-base-element.js +3 -3
  180. package/development/popover/popover/popover.component.d.ts +18 -4
  181. package/development/popover/popover/popover.component.d.ts.map +1 -1
  182. package/development/popover/popover/popover.component.js +35 -30
  183. package/development/radio-button/radio-button-panel/radio-button-panel.component.d.ts +6 -3
  184. package/development/radio-button/radio-button-panel/radio-button-panel.component.d.ts.map +1 -1
  185. package/development/radio-button/radio-button-panel/radio-button-panel.component.js +7 -7
  186. package/development/select/select.component.d.ts.map +1 -1
  187. package/development/select/select.component.js +2 -2
  188. package/development/selection-action-panel/selection-action-panel.component.d.ts +22 -0
  189. package/development/selection-action-panel/selection-action-panel.component.d.ts.map +1 -0
  190. package/development/selection-action-panel/selection-action-panel.component.js +105 -0
  191. package/development/selection-action-panel.d.ts +5 -0
  192. package/development/selection-action-panel.d.ts.map +1 -0
  193. package/development/selection-action-panel.js +5 -0
  194. package/development/selection-expansion-panel/selection-expansion-panel.component.d.ts +4 -24
  195. package/development/selection-expansion-panel/selection-expansion-panel.component.d.ts.map +1 -1
  196. package/development/selection-expansion-panel/selection-expansion-panel.component.js +26 -106
  197. package/development/{transparent-button-Ddb_s0a0.js → transparent-button-Dun6bh2G.js} +89 -8
  198. package/dialog/dialog/dialog.component.d.ts +4 -2
  199. package/dialog/dialog/dialog.component.d.ts.map +1 -1
  200. package/dialog/dialog/dialog.component.js +63 -56
  201. package/dialog/dialog-actions/dialog-actions.component.d.ts +1 -0
  202. package/dialog/dialog-actions/dialog-actions.component.d.ts.map +1 -1
  203. package/dialog/dialog-actions/dialog-actions.component.js +13 -9
  204. package/dialog/dialog-close-button/dialog-close-button.component.d.ts +22 -0
  205. package/dialog/dialog-close-button/dialog-close-button.component.d.ts.map +1 -0
  206. package/dialog/dialog-close-button/dialog-close-button.component.js +31 -0
  207. package/dialog/dialog-close-button.d.ts +5 -0
  208. package/dialog/dialog-close-button.d.ts.map +1 -0
  209. package/dialog/dialog-close-button.js +4 -0
  210. package/dialog/dialog-content/dialog-content.component.js +6 -6
  211. package/dialog/dialog-title/dialog-title.component.d.ts +1 -0
  212. package/dialog/dialog-title/dialog-title.component.d.ts.map +1 -1
  213. package/dialog/dialog-title/dialog-title.component.js +11 -8
  214. package/dialog.d.ts +1 -0
  215. package/dialog.d.ts.map +1 -1
  216. package/dialog.js +6 -4
  217. package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +7 -7
  218. package/form-field/form-field/form-field.component.d.ts +23 -1
  219. package/form-field/form-field/form-field.component.d.ts.map +1 -1
  220. package/form-field/form-field/form-field.component.js +52 -41
  221. package/form-field/form-field.js +3 -2
  222. package/form-field.js +5 -4
  223. package/header/header-environment/header-environment.component.d.ts +23 -0
  224. package/header/header-environment/header-environment.component.d.ts.map +1 -0
  225. package/header/header-environment/header-environment.component.js +37 -0
  226. package/header/header-environment.d.ts +5 -0
  227. package/header/header-environment.d.ts.map +1 -0
  228. package/header/header-environment.js +4 -0
  229. package/index.d.ts +8 -0
  230. package/index.js +8 -0
  231. package/menu/menu/menu.component.d.ts +1 -0
  232. package/menu/menu/menu.component.d.ts.map +1 -1
  233. package/menu/menu/menu.component.js +1 -1
  234. package/menu/menu-button/menu-button.component.d.ts +1 -0
  235. package/menu/menu-button/menu-button.component.d.ts.map +1 -1
  236. package/menu/menu-button/menu-button.component.js +8 -8
  237. package/menu/menu-link/menu-link.component.d.ts +1 -0
  238. package/menu/menu-link/menu-link.component.d.ts.map +1 -1
  239. package/menu/menu-link/menu-link.component.js +9 -6
  240. package/option/optgroup/optgroup-base-element.d.ts.map +1 -1
  241. package/option/optgroup/optgroup-base-element.js +19 -17
  242. package/option/option-hint/option-hint.component.d.ts +18 -0
  243. package/option/option-hint/option-hint.component.d.ts.map +1 -0
  244. package/option/option-hint/option-hint.component.js +27 -0
  245. package/option/option-hint.d.ts +5 -0
  246. package/option/option-hint.d.ts.map +1 -0
  247. package/option/option-hint.js +4 -0
  248. package/option.d.ts +1 -0
  249. package/option.d.ts.map +1 -1
  250. package/option.js +5 -3
  251. package/overlay/overlay-base-element.d.ts +1 -0
  252. package/overlay/overlay-base-element.d.ts.map +1 -1
  253. package/overlay/overlay-base-element.js +21 -21
  254. package/package.json +23 -3
  255. package/popover/popover/popover.component.d.ts +18 -4
  256. package/popover/popover/popover.component.d.ts.map +1 -1
  257. package/popover/popover/popover.component.js +104 -95
  258. package/radio-button/radio-button-panel/radio-button-panel.component.d.ts +6 -3
  259. package/radio-button/radio-button-panel/radio-button-panel.component.d.ts.map +1 -1
  260. package/radio-button/radio-button-panel/radio-button-panel.component.js +9 -9
  261. package/select/select.component.d.ts.map +1 -1
  262. package/select/select.component.js +1 -1
  263. package/selection-action-panel/selection-action-panel.component.d.ts +22 -0
  264. package/selection-action-panel/selection-action-panel.component.d.ts.map +1 -0
  265. package/selection-action-panel/selection-action-panel.component.js +34 -0
  266. package/selection-action-panel.d.ts +5 -0
  267. package/selection-action-panel.d.ts.map +1 -0
  268. package/selection-action-panel.js +4 -0
  269. package/selection-expansion-panel/selection-expansion-panel.component.d.ts +4 -24
  270. package/selection-expansion-panel/selection-expansion-panel.component.d.ts.map +1 -1
  271. package/selection-expansion-panel/selection-expansion-panel.component.js +45 -102
  272. package/standard-theme.css +22 -1
  273. package/transparent-button-rf30m88X.js +9 -0
  274. package/transparent-button-BlbvexCb.js +0 -9
@@ -1,4 +1,4 @@
1
- import { isServer as n } from "lit";
1
+ import { isServer as o } from "lit";
2
2
  /**
3
3
  * @license
4
4
  * Copyright Google LLC All Rights Reserved.
@@ -9,15 +9,17 @@ import { isServer as n } from "lit";
9
9
  let l = 0;
10
10
  class u {
11
11
  constructor() {
12
- n || (this._liveElement = this._createLiveElement());
12
+ o || (document.body ? this._liveElement = this._createLiveElement() : document.addEventListener("DOMContentLoaded", () => {
13
+ this._liveElement = this._createLiveElement();
14
+ }));
13
15
  }
14
- announce(r, ...t) {
15
- if (n)
16
+ announce(n, ...t) {
17
+ if (!this._liveElement)
16
18
  return Promise.resolve();
17
19
  const e = {};
18
20
  let i, s;
19
- return t.length === 1 && typeof t[0] == "number" ? s = t[0] : [i, s] = t, this.clear(), clearTimeout(this._previousTimeout), i ??= e?.politeness ?? "polite", s ??= e?.duration, this._liveElement.setAttribute("aria-live", i), this._currentPromise || (this._currentPromise = new Promise((o) => this._currentResolve = o)), clearTimeout(this._previousTimeout), this._previousTimeout = setTimeout(() => {
20
- this._liveElement.textContent = r, typeof s == "number" && (this._previousTimeout = setTimeout(() => this.clear(), s)), this._currentResolve?.(), this._currentPromise = this._currentResolve = void 0;
21
+ return t.length === 1 && typeof t[0] == "number" ? s = t[0] : [i, s] = t, this.clear(), clearTimeout(this._previousTimeout), i ??= e?.politeness ?? "polite", s ??= e?.duration, this._liveElement.setAttribute("aria-live", i), this._currentPromise ??= new Promise((r) => this._currentResolve = r), clearTimeout(this._previousTimeout), this._previousTimeout = setTimeout(() => {
22
+ this._liveElement.textContent = n, typeof s == "number" && (this._previousTimeout = setTimeout(() => this.clear(), s)), this._currentResolve?.(), this._currentPromise = this._currentResolve = void 0;
21
23
  }, 100), this._currentPromise;
22
24
  }
23
25
  /**
@@ -32,10 +34,10 @@ class u {
32
34
  clearTimeout(this._previousTimeout), this._liveElement?.remove(), this._liveElement = null, this._currentResolve?.(), this._currentPromise = this._currentResolve = void 0;
33
35
  }
34
36
  _createLiveElement() {
35
- const r = "sbb-live-announcer-element", t = document.getElementsByClassName(r), e = document.createElement("div");
37
+ const n = "sbb-live-announcer-element", t = document.getElementsByClassName(n), e = document.createElement("div");
36
38
  for (let i = 0; i < t.length; i++)
37
39
  t[i].remove();
38
- return e.classList.add(r), e.classList.add("sbb-screen-reader-only"), e.setAttribute("aria-atomic", "true"), e.setAttribute("aria-live", "polite"), e.id = `sbb-live-announcer-${l++}`, document.body.appendChild(e), e;
40
+ return e.classList.add(n), e.classList.add("sbb-screen-reader-only"), e.setAttribute("aria-atomic", "true"), e.setAttribute("aria-live", "polite"), e.id = `sbb-live-announcer-${l++}`, document.body.appendChild(e), e;
39
41
  }
40
42
  }
41
43
  const v = new u();
@@ -18,6 +18,7 @@ export declare abstract class SbbLinkBaseElement extends SbbActionBaseElement {
18
18
  /** This will be forwarded as aria-current to the inner anchor element. */
19
19
  accessor accessibilityCurrent: string;
20
20
  protected language: SbbLanguageController;
21
+ protected readonly anchorRole: string | null;
21
22
  constructor();
22
23
  /** @internal */
23
24
  focus(options?: FocusOptions | undefined): void;
@@ -1 +1 @@
1
- {"version":3,"file":"link-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/link-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,6BAA6B,CAAC;AAErC,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAErE,uBAAuB;AACvB,8BAIe,kBAAmB,SAAQ,oBAAoB;IAC5D,0CAA0C;IAC1C,SAEgB,IAAI,EAAE,MAAM,CAAM;IAElC,uCAAuC;IACvC,SAEgB,MAAM,EAAE,cAAc,GAAG,MAAM,CAAM;IAErD,wEAAwE;IACxE,SAEgB,GAAG,EAAE,MAAM,CAAM;IAEjC,kEAAkE;IAClE,SAEgB,QAAQ,EAAE,OAAO,CAAS;IAE1C,wEAAwE;IACxE,SAEgB,kBAAkB,EAAE,MAAM,CAAM;IAEhD,0EAA0E;IAC1E,SAEgB,oBAAoB,EAAE,MAAM,CAAM;IAElD,SAAS,CAAC,QAAQ,wBAAmC;;IASrD,gBAAgB;IACA,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;IAI/D,gBAAgB;IACA,IAAI,IAAI,IAAI;IAI5B,gBAAgB;IACA,KAAK,IAAI,IAAI;IAI7B,OAAO,CAAC,qBAAqB,CAE3B;IAEF,mHAAmH;cAChG,MAAM,IAAI,cAAc;IAI3C,SAAS,CAAC,UAAU,CAAC,aAAa,EAAE,cAAc,GAAG,cAAc;CAsBpE"}
1
+ {"version":3,"file":"link-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/link-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,6BAA6B,CAAC;AAErC,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAErE,uBAAuB;AACvB,8BAIe,kBAAmB,SAAQ,oBAAoB;IAC5D,0CAA0C;IAC1C,SAEgB,IAAI,EAAE,MAAM,CAAM;IAElC,uCAAuC;IACvC,SAEgB,MAAM,EAAE,cAAc,GAAG,MAAM,CAAM;IAErD,wEAAwE;IACxE,SAEgB,GAAG,EAAE,MAAM,CAAM;IAEjC,kEAAkE;IAClE,SAEgB,QAAQ,EAAE,OAAO,CAAS;IAE1C,wEAAwE;IACxE,SAEgB,kBAAkB,EAAE,MAAM,CAAM;IAEhD,0EAA0E;IAC1E,SAEgB,oBAAoB,EAAE,MAAM,CAAM;IAElD,SAAS,CAAC,QAAQ,wBAAmC;IACrD,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;;IASpD,gBAAgB;IACA,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;IAI/D,gBAAgB;IACA,IAAI,IAAI,IAAI;IAI5B,gBAAgB;IACA,KAAK,IAAI,IAAI;IAI7B,OAAO,CAAC,qBAAqB,CAE3B;IAEF,mHAAmH;cAChG,MAAM,IAAI,cAAc;IAI3C,SAAS,CAAC,UAAU,CAAC,aAAa,EAAE,cAAc,GAAG,cAAc;CAuBpE"}
@@ -2,8 +2,8 @@ var W = (s) => {
2
2
  throw TypeError(s);
3
3
  };
4
4
  var F = (s, a, i) => a.has(s) || W("Cannot " + i);
5
- var b = (s, a, i) => (F(s, a, "read from private field"), i ? i.call(s) : a.get(s)), d = (s, a, i) => a.has(s) ? W("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(s) : a.set(s, i), r = (s, a, i, o) => (F(s, a, "write to private field"), o ? o.call(s, i) : a.set(s, i), i);
6
- import { __esDecorate as u, __runInitializers as l } from "tslib";
5
+ var b = (s, a, i) => (F(s, a, "read from private field"), i ? i.call(s) : a.get(s)), u = (s, a, i) => a.has(s) ? W("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(s) : a.set(s, i), r = (s, a, i, o) => (F(s, a, "write to private field"), o ? o.call(s, i) : a.set(s, i), i);
6
+ import { __esDecorate as d, __runInitializers as l } from "tslib";
7
7
  import { nothing as h, isServer as J, html as G } from "lit";
8
8
  import { property as w } from "lit/decorators.js";
9
9
  import { SbbLanguageController as K } from "../controllers.js";
@@ -15,17 +15,17 @@ let le = (() => {
15
15
  var _, m, f, y, g, p, c;
16
16
  let s = [M({
17
17
  "data-link": ""
18
- })], a, i = [], o, L = U, z, C = [], S = [], $, x = [], I = [], D, E = [], R = [], A, B = [], T = [], q, O = [], j = [], N, H = [], P = [];
18
+ })], a, i = [], o, L = U, z, C = [], $ = [], S, x = [], I = [], R, D = [], E = [], A, B = [], T = [], q, O = [], j = [], N, H = [], P = [];
19
19
  return c = class extends L {
20
20
  constructor() {
21
21
  super();
22
- d(this, _);
23
- d(this, m);
24
- d(this, f);
25
- d(this, y);
26
- d(this, g);
27
- d(this, p);
28
- r(this, _, l(this, C, "")), r(this, m, (l(this, S), l(this, x, ""))), r(this, f, (l(this, I), l(this, E, ""))), r(this, y, (l(this, R), l(this, B, !1))), r(this, g, (l(this, T), l(this, O, ""))), r(this, p, (l(this, j), l(this, H, ""))), this.language = (l(this, P), new K(this)), this._evaluateRelAttribute = () => this.rel ? this.rel : this.target === "_blank" ? "external noopener nofollow" : h, J || this.setupBaseEventHandlers();
22
+ u(this, _);
23
+ u(this, m);
24
+ u(this, f);
25
+ u(this, y);
26
+ u(this, g);
27
+ u(this, p);
28
+ r(this, _, l(this, C, "")), r(this, m, (l(this, $), l(this, x, ""))), r(this, f, (l(this, I), l(this, D, ""))), r(this, y, (l(this, E), l(this, B, !1))), r(this, g, (l(this, T), l(this, O, ""))), r(this, p, (l(this, j), l(this, H, ""))), this.language = (l(this, P), new K(this)), this.anchorRole = null, this._evaluateRelAttribute = () => this.rel ? this.rel : this.target === "_blank" ? "external noopener nofollow" : h, J || this.setupBaseEventHandlers();
29
29
  }
30
30
  /** The href value you want to link to. */
31
31
  get href() {
@@ -93,6 +93,7 @@ let le = (() => {
93
93
  ?download=${this.download}
94
94
  target=${this.target || h}
95
95
  rel=${this._evaluateRelAttribute()}
96
+ role=${this.anchorRole || h}
96
97
  aria-label=${this.accessibilityLabel || h}
97
98
  aria-current=${this.accessibilityCurrent || h}
98
99
  tabindex=${this.maybeDisabled && !this.maybeDisabledInteractive ? "-1" : h}
@@ -107,19 +108,19 @@ let le = (() => {
107
108
  }
108
109
  }, _ = new WeakMap(), m = new WeakMap(), f = new WeakMap(), y = new WeakMap(), g = new WeakMap(), p = new WeakMap(), o = c, (() => {
109
110
  const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(L[Symbol.metadata] ?? null) : void 0;
110
- z = [v(), w({ reflect: !0, converter: k })], $ = [v(), w({ reflect: !0, converter: k })], D = [v(), w({ reflect: !0, converter: k })], A = [v(), w({ type: Boolean, reflect: !0 })], q = [v(), w({ attribute: "accessibility-label" })], N = [v(), w({ attribute: "accessibility-current" })], u(c, null, z, { kind: "accessor", name: "href", static: !1, private: !1, access: { has: (e) => "href" in e, get: (e) => e.href, set: (e, n) => {
111
+ z = [v(), w({ reflect: !0, converter: k })], S = [v(), w({ reflect: !0, converter: k })], R = [v(), w({ reflect: !0, converter: k })], A = [v(), w({ type: Boolean, reflect: !0 })], q = [v(), w({ attribute: "accessibility-label" })], N = [v(), w({ attribute: "accessibility-current" })], d(c, null, z, { kind: "accessor", name: "href", static: !1, private: !1, access: { has: (e) => "href" in e, get: (e) => e.href, set: (e, n) => {
111
112
  e.href = n;
112
- } }, metadata: t }, C, S), u(c, null, $, { kind: "accessor", name: "target", static: !1, private: !1, access: { has: (e) => "target" in e, get: (e) => e.target, set: (e, n) => {
113
+ } }, metadata: t }, C, $), d(c, null, S, { kind: "accessor", name: "target", static: !1, private: !1, access: { has: (e) => "target" in e, get: (e) => e.target, set: (e, n) => {
113
114
  e.target = n;
114
- } }, metadata: t }, x, I), u(c, null, D, { kind: "accessor", name: "rel", static: !1, private: !1, access: { has: (e) => "rel" in e, get: (e) => e.rel, set: (e, n) => {
115
+ } }, metadata: t }, x, I), d(c, null, R, { kind: "accessor", name: "rel", static: !1, private: !1, access: { has: (e) => "rel" in e, get: (e) => e.rel, set: (e, n) => {
115
116
  e.rel = n;
116
- } }, metadata: t }, E, R), u(c, null, A, { kind: "accessor", name: "download", static: !1, private: !1, access: { has: (e) => "download" in e, get: (e) => e.download, set: (e, n) => {
117
+ } }, metadata: t }, D, E), d(c, null, A, { kind: "accessor", name: "download", static: !1, private: !1, access: { has: (e) => "download" in e, get: (e) => e.download, set: (e, n) => {
117
118
  e.download = n;
118
- } }, metadata: t }, B, T), u(c, null, q, { kind: "accessor", name: "accessibilityLabel", static: !1, private: !1, access: { has: (e) => "accessibilityLabel" in e, get: (e) => e.accessibilityLabel, set: (e, n) => {
119
+ } }, metadata: t }, B, T), d(c, null, q, { kind: "accessor", name: "accessibilityLabel", static: !1, private: !1, access: { has: (e) => "accessibilityLabel" in e, get: (e) => e.accessibilityLabel, set: (e, n) => {
119
120
  e.accessibilityLabel = n;
120
- } }, metadata: t }, O, j), u(c, null, N, { kind: "accessor", name: "accessibilityCurrent", static: !1, private: !1, access: { has: (e) => "accessibilityCurrent" in e, get: (e) => e.accessibilityCurrent, set: (e, n) => {
121
+ } }, metadata: t }, O, j), d(c, null, N, { kind: "accessor", name: "accessibilityCurrent", static: !1, private: !1, access: { has: (e) => "accessibilityCurrent" in e, get: (e) => e.accessibilityCurrent, set: (e, n) => {
121
122
  e.accessibilityCurrent = n;
122
- } }, metadata: t }, H, P), u(null, a = { value: o }, s, { kind: "class", name: o.name, metadata: t }, null, i), o = a.value, t && Object.defineProperty(o, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t }), l(o, i);
123
+ } }, metadata: t }, H, P), d(null, a = { value: o }, s, { kind: "class", name: o.name, metadata: t }, null, i), o = a.value, t && Object.defineProperty(o, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t }), l(o, i);
123
124
  })(), o;
124
125
  })();
125
126
  export {
@@ -11,10 +11,15 @@ export interface SbbIconConfig {
11
11
  export interface SbbDatetimeConfig {
12
12
  dateAdapter?: DateAdapter;
13
13
  }
14
+ export interface SbbPopoverConfig {
15
+ openDelay?: number;
16
+ closeDelay?: number;
17
+ }
14
18
  export interface SbbConfig {
15
19
  language?: string;
16
20
  icon?: SbbIconConfig;
17
21
  datetime?: SbbDatetimeConfig;
22
+ popover?: SbbPopoverConfig;
18
23
  }
19
24
  export declare function readConfig(): SbbConfig;
20
25
  export declare function mergeConfig(config: Partial<SbbConfig>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE;QACzB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;KAChC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAED,wBAAgB,UAAU,IAAI,SAAS,CAKtC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAG5D;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,SAAS,EAAE,SAAS,CAAC;CAC1B"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE;QACzB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;KAChC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAE/B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,wBAAgB,UAAU,IAAI,SAAS,CAKtC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAG5D;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,SAAS,EAAE,SAAS,CAAC;CAC1B"}
@@ -0,0 +1,23 @@
1
+ import { LitElement } from 'lit';
2
+ import { SbbCheckboxGroupElement } from '../../checkbox/checkbox-group.js';
3
+ import { SbbRadioButtonGroupElement } from '../../radio-button/radio-button-group.js';
4
+ import { SbbStateChange } from '../interfaces/types.js';
5
+ import { AbstractConstructor } from './constructor.js';
6
+ import { SbbElementInternalsMixinType } from './element-internals-mixin.js';
7
+ export declare class SbbSelectionPanelMixinType {
8
+ accessor color: 'white' | 'milk';
9
+ accessor borderless: boolean;
10
+ protected set checked(checked: boolean);
11
+ protected get checked(): boolean;
12
+ protected set disabled(disabled: boolean);
13
+ protected get disabled(): boolean;
14
+ protected group: SbbRadioButtonGroupElement | SbbCheckboxGroupElement | null;
15
+ protected sizeAttributeObserver: MutationObserver | null;
16
+ protected initFromInput(event: Event): void;
17
+ protected onInputStateChange(event: CustomEvent<SbbStateChange>): void;
18
+ }
19
+ /**
20
+ * Mixin for common selection panel behaviors
21
+ */
22
+ export declare const SbbSelectionPanelMixin: <T extends AbstractConstructor<LitElement>>(superClass: T) => AbstractConstructor<SbbSelectionPanelMixinType & SbbElementInternalsMixinType> & T;
23
+ //# sourceMappingURL=selection-panel-mixin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-panel-mixin.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/mixins/selection-panel-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,KAAK,CAAC;AAGhD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAG3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,8BAA8B,CAAC;AAEtC,MAAM,CAAC,OAAO,OAAO,0BAA0B;IAC7C,SAAgB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxC,SAAgB,UAAU,EAAE,OAAO,CAAC;IAEpC,SAAS,KAAK,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE;IACxC,SAAS,KAAK,OAAO,IAAI,OAAO,CAAC;IAEjC,SAAS,KAAK,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE;IAC1C,SAAS,KAAK,QAAQ,IAAI,OAAO,CAAC;IAElC,SAAS,CAAC,KAAK,EAAE,0BAA0B,GAAG,uBAAuB,GAAG,IAAI,CAAC;IAC7E,SAAS,CAAC,qBAAqB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAEzD,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAC3C,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,WAAW,CAAC,cAAc,CAAC,GAAG,IAAI;CACvE;AAED;;GAEG;AAEH,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,EAC9E,YAAY,CAAC,KACZ,mBAAmB,CAAC,0BAA0B,GAAG,4BAA4B,CAAC,GAAG,CA8FnF,CAAC"}
@@ -0,0 +1,87 @@
1
+ var k = (s) => {
2
+ throw TypeError(s);
3
+ };
4
+ var S = (s, r, i) => r.has(s) || k("Cannot " + i);
5
+ var h = (s, r, i) => (S(s, r, "read from private field"), i ? i.call(s) : r.get(s)), u = (s, r, i) => r.has(s) ? k("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, i), d = (s, r, i, n) => (S(s, r, "write to private field"), n ? n.call(s, i) : r.set(s, i), i);
6
+ import { __esDecorate as y, __runInitializers as b } from "tslib";
7
+ import { isServer as A } from "lit";
8
+ import { property as v } from "lit/decorators.js";
9
+ import { forceType as x } from "../decorators.js";
10
+ import { SbbElementInternalsMixin as C } from "./element-internals-mixin.js";
11
+ const P = (s) => (() => {
12
+ var o, l, a;
13
+ let i = C(s), n, p = [], m = [], g, f = [], _ = [];
14
+ return a = class extends i {
15
+ constructor(...e) {
16
+ super(e);
17
+ u(this, o);
18
+ u(this, l);
19
+ d(this, o, b(this, p, "white")), d(this, l, (b(this, m), b(this, f, !1))), this.group = (b(this, _), null), this.sizeAttributeObserver = A ? null : new MutationObserver((t) => this._onSizeAttributesChange(t)), this.addEventListener?.("panelconnected", (t) => this.initFromInput(t));
20
+ }
21
+ /** The background color of the panel. */
22
+ get color() {
23
+ return h(this, o);
24
+ }
25
+ set color(e) {
26
+ d(this, o, e);
27
+ }
28
+ /** Whether the unselected panel has a border. */
29
+ get borderless() {
30
+ return h(this, l);
31
+ }
32
+ set borderless(e) {
33
+ d(this, l, e);
34
+ }
35
+ /** Whether the selection panel is checked. */
36
+ set checked(e) {
37
+ this.toggleState("checked", e);
38
+ }
39
+ get checked() {
40
+ return this.internals.states.has("checked");
41
+ }
42
+ /** Whether the selection panel is disabled. */
43
+ set disabled(e) {
44
+ this.toggleState("disabled", e);
45
+ }
46
+ get disabled() {
47
+ return this.internals.states.has("disabled");
48
+ }
49
+ connectedCallback() {
50
+ super.connectedCallback(), this.group = this.closest("sbb-radio-button-group, sbb-checkbox-group");
51
+ }
52
+ disconnectedCallback() {
53
+ super.disconnectedCallback(), this.sizeAttributeObserver?.disconnect();
54
+ }
55
+ initFromInput(e) {
56
+ const t = e.target;
57
+ this.checked = t.checked, this.disabled = t.disabled, this.sizeAttributeObserver?.disconnect(), this.sizeAttributeObserver?.observe(t, { attributeFilter: ["size"] });
58
+ }
59
+ onInputStateChange(e) {
60
+ e.detail.type === "disabled" ? this.disabled = e.detail.disabled : e.detail.type === "checked" && (this.checked = e.detail.checked);
61
+ }
62
+ /**
63
+ * Set the data-size in two cases:
64
+ * - if there's no group, so the size change comes directly from a change on the inner panel;
65
+ * - if there's a wrapper group and its size changes, syncing it with the panel size.
66
+ *
67
+ * On the other hand, if there's a wrapper group and the size changes on the inner panel, the data-size doesn't change.
68
+ */
69
+ _onSizeAttributesChange(e) {
70
+ for (const t of e)
71
+ if (t.attributeName === "size") {
72
+ const c = this.group, z = t.target.getAttribute("size");
73
+ (!c || c.size === z) && this.setAttribute("data-size", z);
74
+ }
75
+ }
76
+ }, o = new WeakMap(), l = new WeakMap(), (() => {
77
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(i[Symbol.metadata] ?? null) : void 0;
78
+ n = [v({ reflect: !0 })], g = [x(), v({ reflect: !0, type: Boolean })], y(a, null, n, { kind: "accessor", name: "color", static: !1, private: !1, access: { has: (t) => "color" in t, get: (t) => t.color, set: (t, c) => {
79
+ t.color = c;
80
+ } }, metadata: e }, p, m), y(a, null, g, { kind: "accessor", name: "borderless", static: !1, private: !1, access: { has: (t) => "borderless" in t, get: (t) => t.borderless, set: (t, c) => {
81
+ t.borderless = c;
82
+ } }, metadata: e }, f, _), e && Object.defineProperty(a, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
83
+ })(), a;
84
+ })();
85
+ export {
86
+ P as SbbSelectionPanelMixin
87
+ };
package/core/mixins.d.ts CHANGED
@@ -15,5 +15,6 @@ export * from './mixins/negative-mixin.js';
15
15
  export * from './mixins/panel-mixin.js';
16
16
  export * from './mixins/required-mixin.js';
17
17
  export * from './mixins/readonly-mixin.js';
18
+ export * from './mixins/selection-panel-mixin.js';
18
19
  export * from './mixins/update-scheduler-mixin.js';
19
20
  //# sourceMappingURL=mixins.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mixins.d.ts","sourceRoot":"","sources":["../../../src/elements/core/mixins.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,sCAAsC,CAAC;AACrD,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AAEnD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uCAAuC,CAAC"}
1
+ {"version":3,"file":"mixins.d.ts","sourceRoot":"","sources":["../../../src/elements/core/mixins.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,sCAAsC,CAAC;AACrD,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AAEnD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uCAAuC,CAAC"}
package/core/mixins.js CHANGED
@@ -1,21 +1,22 @@
1
- import { SbbAnimationCompleteMixin as r } from "./mixins/animation-complete-mixin.js";
1
+ import { SbbAnimationCompleteMixin as i } from "./mixins/animation-complete-mixin.js";
2
2
  import { SbbDisabledInteractiveMixin as a, SbbDisabledMixin as t, SbbDisabledTabIndexActionMixin as l } from "./mixins/disabled-mixin.js";
3
3
  import { SbbElementInternalsMixin as c, appendAriaElements as p, removeAriaElements as x } from "./mixins/element-internals-mixin.js";
4
4
  import { SbbFormAssociatedCheckboxMixin as v } from "./mixins/form-associated-checkbox-mixin.js";
5
5
  import { SbbFormAssociatedInputMixin as f } from "./mixins/form-associated-input-mixin.js";
6
6
  import { SbbFormAssociatedMixin as g } from "./mixins/form-associated-mixin.js";
7
- import { SbbFormAssociatedRadioButtonMixin as k, radioButtonRegistry as M } from "./mixins/form-associated-radio-button-mixin.js";
7
+ import { SbbFormAssociatedRadioButtonMixin as M, radioButtonRegistry as k } from "./mixins/form-associated-radio-button-mixin.js";
8
8
  import { SbbHydrationMixin as y } from "./mixins/hydration-mixin.js";
9
9
  import { SbbNamedSlotListMixin as C } from "./mixins/named-slot-list-mixin.js";
10
10
  import { SbbNegativeMixin as I } from "./mixins/negative-mixin.js";
11
11
  import { SbbPanelMixin as D } from "./mixins/panel-mixin.js";
12
12
  import { SbbRequiredMixin as B } from "./mixins/required-mixin.js";
13
- import { SbbReadonlyMixin as _ } from "./mixins/readonly-mixin.js";
14
- import { SbbUpdateSchedulerMixin as z } from "./mixins/update-scheduler-mixin.js";
13
+ import { SbbReadonlyMixin as P } from "./mixins/readonly-mixin.js";
14
+ import { SbbSelectionPanelMixin as q } from "./mixins/selection-panel-mixin.js";
15
+ import { SbbUpdateSchedulerMixin as H } from "./mixins/update-scheduler-mixin.js";
15
16
  import { css as e } from "lit";
16
- const n = e`: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;inset: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) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;inset: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}`;
17
+ const n = e`:host{--sbb-selection-panel-background: var( --sbb-selection-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-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-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-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;inset: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) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;inset: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}`;
17
18
  export {
18
- r as SbbAnimationCompleteMixin,
19
+ i as SbbAnimationCompleteMixin,
19
20
  a as SbbDisabledInteractiveMixin,
20
21
  t as SbbDisabledMixin,
21
22
  l as SbbDisabledTabIndexActionMixin,
@@ -23,16 +24,17 @@ export {
23
24
  v as SbbFormAssociatedCheckboxMixin,
24
25
  f as SbbFormAssociatedInputMixin,
25
26
  g as SbbFormAssociatedMixin,
26
- k as SbbFormAssociatedRadioButtonMixin,
27
+ M as SbbFormAssociatedRadioButtonMixin,
27
28
  y as SbbHydrationMixin,
28
29
  C as SbbNamedSlotListMixin,
29
30
  I as SbbNegativeMixin,
30
31
  D as SbbPanelMixin,
31
- _ as SbbReadonlyMixin,
32
+ P as SbbReadonlyMixin,
32
33
  B as SbbRequiredMixin,
33
- z as SbbUpdateSchedulerMixin,
34
+ q as SbbSelectionPanelMixin,
35
+ H as SbbUpdateSchedulerMixin,
34
36
  p as appendAriaElements,
35
37
  n as panelCommonStyle,
36
- M as radioButtonRegistry,
38
+ k as radioButtonRegistry,
37
39
  x as removeAriaElements
38
40
  };
@@ -17,6 +17,7 @@
17
17
  @forward './mixins/overlay';
18
18
  @forward './mixins/panel';
19
19
  @forward './mixins/pearl-chain-bullet';
20
+ @forward './mixins/popover';
20
21
  @forward './mixins/scrollbar';
21
22
  @forward './mixins/shadows';
22
23
  @forward './mixins/table';
@@ -5,6 +5,7 @@
5
5
  @use './mixins/font-face';
6
6
  @use './mixins/helpers';
7
7
  @use './mixins/inputs';
8
+ @use './mixins/popover';
8
9
  @use './mixins/scrollbar';
9
10
  @use './mixins/shadows';
10
11
  @use './mixins/typo';
@@ -222,14 +223,7 @@ sbb-form-field {
222
223
  sbb-popover,
223
224
  sbb-toast
224
225
  ) {
225
- margin: 0;
226
- padding: 0;
227
- border: none;
228
- width: auto;
229
- height: auto;
230
- background-color: transparent;
231
- color: inherit;
232
- pointer-events: none;
226
+ @include popover.popover-reset;
233
227
  }
234
228
 
235
229
  // Ensure stable breadcrumb height during hydrating
@@ -515,15 +509,20 @@ sbb-toggle:has(:focus-visible) {
515
509
  @include a11y.focus-outline;
516
510
  }
517
511
 
518
- :where(sbb-select, sbb-autocomplete, sbb-autocomplete-grid)[size='s']
512
+ :where(sbb-select, sbb-autocomplete, sbb-autocomplete-grid)[size='s'] {
519
513
  :where(sbb-option, sbb-autocomplete-grid-option) {
520
- --sbb-option-min-height: var(--sbb-size-element-xxs);
521
- --sbb-focus-outline-offset: calc(-1 * var(--sbb-spacing-fixed-1x));
522
- --sbb-option-focus-outline-inset: 0 var(--sbb-spacing-fixed-1x);
523
- }
514
+ --sbb-option-min-height: var(--sbb-size-element-xxs);
515
+ --sbb-focus-outline-offset: calc(-1 * var(--sbb-spacing-fixed-1x));
516
+ --sbb-option-focus-outline-inset: 0 var(--sbb-spacing-fixed-1x);
517
+ }
524
518
 
525
- :where(sbb-select, sbb-autocomplete, sbb-autocomplete-grid)[size='s'] sbb-optgroup {
526
- --sbb-optgroup-label-padding-end: var(--sbb-spacing-fixed-1x);
519
+ sbb-optgroup {
520
+ --sbb-optgroup-label-padding-end: var(--sbb-spacing-fixed-1x);
521
+ }
522
+
523
+ sbb-option-hint {
524
+ --sbb-option-hint-padding-block-end: var(--sbb-spacing-fixed-1x);
525
+ }
527
526
  }
528
527
 
529
528
  sbb-dialog-actions {
@@ -542,6 +541,36 @@ sbb-dialog-actions {
542
541
  }
543
542
  }
544
543
 
544
+ // If there is a title, remove top spacing for the content
545
+ sbb-dialog:has(> sbb-dialog-title) > sbb-dialog-content {
546
+ padding-block-start: 0;
547
+ }
548
+
549
+ // Hide margin on the right side. Distance to button is defined by flex gap already.
550
+ sbb-dialog:has(> sbb-dialog-close-button) > sbb-dialog-title {
551
+ margin-inline-end: 0;
552
+ }
553
+
554
+ sbb-dialog-close-button {
555
+ // If there is no dialog title, the close button should be positioned absolute
556
+ sbb-dialog:not(:has(> sbb-dialog-title)) > & {
557
+ position: absolute;
558
+ z-index: 1;
559
+ }
560
+
561
+ // The close button positioning needs the current dialog title size
562
+ sbb-dialog:has(> sbb-dialog-title[visual-level='3']) > & {
563
+ // TODO: Adapt to lean size title
564
+ --_sbb-dialog-title-size: var(--sbb-font-size-title-3);
565
+ }
566
+
567
+ // The close button positioning needs the current dialog title size
568
+ sbb-dialog:has(> sbb-dialog-title[visual-level='5']) > & {
569
+ // TODO: Adapt to lean size title
570
+ --_sbb-dialog-title-size: var(--sbb-font-size-title-5);
571
+ }
572
+ }
573
+
545
574
  sbb-notification:has(sbb-title) {
546
575
  --_sbb-notification-icon-authoritative-font-size: var(--sbb-font-size-title-5);
547
576
  --_sbb-notification-icon-authoritative-line-height: var(--sbb-typo-line-height-titles);
@@ -0,0 +1,14 @@
1
+ // ----------------------------------------------------------------------------------------------------
2
+ // Popover Mixins
3
+ // ----------------------------------------------------------------------------------------------------
4
+
5
+ @mixin popover-reset {
6
+ margin: 0;
7
+ padding: 0;
8
+ border: none;
9
+ width: auto;
10
+ height: auto;
11
+ background-color: transparent;
12
+ color: inherit;
13
+ pointer-events: none;
14
+ }
package/core.css CHANGED
@@ -1580,10 +1580,12 @@ sbb-toggle:has(:focus-visible) {
1580
1580
  --sbb-focus-outline-offset: calc(-1 * var(--sbb-spacing-fixed-1x));
1581
1581
  --sbb-option-focus-outline-inset: 0 var(--sbb-spacing-fixed-1x);
1582
1582
  }
1583
-
1584
1583
  :where(sbb-select, sbb-autocomplete, sbb-autocomplete-grid)[size=s] sbb-optgroup {
1585
1584
  --sbb-optgroup-label-padding-end: var(--sbb-spacing-fixed-1x);
1586
1585
  }
1586
+ :where(sbb-select, sbb-autocomplete, sbb-autocomplete-grid)[size=s] sbb-option-hint {
1587
+ --sbb-option-hint-padding-block-end: var(--sbb-spacing-fixed-1x);
1588
+ }
1587
1589
 
1588
1590
  sbb-dialog[negative] sbb-dialog-actions {
1589
1591
  --sbb-dialog-actions-border-color: var(--sbb-color-iron);
@@ -1596,6 +1598,25 @@ sbb-dialog[negative]:is(:state(overflows), [state--overflows]) sbb-dialog-action
1596
1598
  box-shadow: var(--sbb-shadow-elevation-level-9-shadow-2-offset-x) var(--sbb-shadow-elevation-level-9-shadow-2-offset-y) var(--sbb-shadow-elevation-level-9-shadow-2-blur) var(--sbb-shadow-elevation-level-9-shadow-2-spread) var(--sbb-shadow-elevation-level-9-soft-negative-2-color), var(--sbb-shadow-elevation-level-9-shadow-1-offset-x) var(--sbb-shadow-elevation-level-9-shadow-1-offset-y) var(--sbb-shadow-elevation-level-9-shadow-1-blur) var(--sbb-shadow-elevation-level-9-shadow-1-spread) var(--sbb-shadow-elevation-level-9-soft-negative-1-color);
1597
1599
  }
1598
1600
 
1601
+ sbb-dialog:has(> sbb-dialog-title) > sbb-dialog-content {
1602
+ padding-block-start: 0;
1603
+ }
1604
+
1605
+ sbb-dialog:has(> sbb-dialog-close-button) > sbb-dialog-title {
1606
+ margin-inline-end: 0;
1607
+ }
1608
+
1609
+ sbb-dialog:not(:has(> sbb-dialog-title)) > sbb-dialog-close-button {
1610
+ position: absolute;
1611
+ z-index: 1;
1612
+ }
1613
+ sbb-dialog:has(> sbb-dialog-title[visual-level="3"]) > sbb-dialog-close-button {
1614
+ --_sbb-dialog-title-size: var(--sbb-font-size-title-3);
1615
+ }
1616
+ sbb-dialog:has(> sbb-dialog-title[visual-level="5"]) > sbb-dialog-close-button {
1617
+ --_sbb-dialog-title-size: var(--sbb-font-size-title-5);
1618
+ }
1619
+
1599
1620
  sbb-notification:has(sbb-title) {
1600
1621
  --_sbb-notification-icon-authoritative-font-size: var(--sbb-font-size-title-5);
1601
1622
  --_sbb-notification-icon-authoritative-line-height: var(--sbb-typo-line-height-titles);