@sbb-esta/lyne-elements 0.52.0 → 0.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/accordion.js +54 -54
  2. package/action-group.js +3 -3
  3. package/alert/alert-group.js +22 -22
  4. package/alert/alert.js +22 -22
  5. package/autocomplete.js +126 -126
  6. package/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
  7. package/breadcrumb/breadcrumb-group.js +70 -69
  8. package/breadcrumb/breadcrumb.js +17 -17
  9. package/calendar.js +423 -423
  10. package/card/card-badge.js +17 -17
  11. package/card/card.js +2 -2
  12. package/card/common.js +30 -30
  13. package/checkbox/checkbox-group.js +17 -17
  14. package/checkbox/checkbox.js +34 -34
  15. package/clock.js +83 -83
  16. package/container/sticky-bar.js +16 -16
  17. package/core/a11y.js +91 -91
  18. package/core/base-elements.js +87 -88
  19. package/core/controllers.js +40 -40
  20. package/core/datetime.js +34 -36
  21. package/core/dom.js +26 -26
  22. package/core/eventing.js +33 -33
  23. package/core/mixins.js +122 -122
  24. package/core/overlay/overlay.d.ts.map +1 -1
  25. package/core/overlay.js +55 -50
  26. package/core/testing/event-spy.d.ts +1 -1
  27. package/core/testing/wait-for-image-ready.d.ts +4 -0
  28. package/core/testing/wait-for-image-ready.d.ts.map +1 -0
  29. package/core/testing.d.ts +1 -0
  30. package/core/testing.d.ts.map +1 -1
  31. package/core/testing.js +42 -31
  32. package/custom-elements.json +70 -4
  33. package/datepicker/common.js +55 -55
  34. package/datepicker/datepicker-toggle.js +94 -94
  35. package/datepicker/datepicker.js +144 -144
  36. package/development/accordion.js +2 -3
  37. package/development/action-group.js +2 -3
  38. package/development/alert/alert-group.js +2 -3
  39. package/development/alert/alert.js +2 -3
  40. package/development/autocomplete.js +2 -3
  41. package/development/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
  42. package/development/breadcrumb/breadcrumb-group.js +5 -5
  43. package/development/breadcrumb/breadcrumb.js +2 -3
  44. package/development/button/button-link.js +2 -3
  45. package/development/button/button-static.js +2 -3
  46. package/development/button/button.js +2 -3
  47. package/development/button/common.js +2 -3
  48. package/development/button/mini-button.js +2 -3
  49. package/development/button/secondary-button-link.js +2 -3
  50. package/development/button/secondary-button-static.js +2 -3
  51. package/development/button/secondary-button.js +2 -3
  52. package/development/button/tertiary-button-link.js +2 -3
  53. package/development/button/tertiary-button-static.js +2 -3
  54. package/development/button/tertiary-button.js +2 -3
  55. package/development/button/transparent-button-link.js +2 -3
  56. package/development/button/transparent-button-static.js +2 -3
  57. package/development/button/transparent-button.js +2 -3
  58. package/development/calendar.js +2 -3
  59. package/development/card/card-badge.js +2 -3
  60. package/development/card/card-button.js +2 -3
  61. package/development/card/card-link.js +2 -3
  62. package/development/card/card.js +2 -3
  63. package/development/card/common.js +2 -3
  64. package/development/checkbox/checkbox-group.js +2 -3
  65. package/development/checkbox/checkbox.js +2 -3
  66. package/development/chip.js +2 -3
  67. package/development/clock.js +2 -3
  68. package/development/container/container.js +2 -3
  69. package/development/container/sticky-bar.js +2 -3
  70. package/development/core/base-elements.js +4 -7
  71. package/development/core/mixins.js +7 -13
  72. package/development/core/overlay/overlay.d.ts.map +1 -1
  73. package/development/core/overlay.js +9 -3
  74. package/development/core/testing/event-spy.d.ts +1 -1
  75. package/development/core/testing/wait-for-image-ready.d.ts +4 -0
  76. package/development/core/testing/wait-for-image-ready.d.ts.map +1 -0
  77. package/development/core/testing.d.ts +1 -0
  78. package/development/core/testing.d.ts.map +1 -1
  79. package/development/core/testing.js +17 -1
  80. package/development/datepicker/common.js +2 -3
  81. package/development/datepicker/datepicker-next-day.js +2 -3
  82. package/development/datepicker/datepicker-previous-day.js +2 -3
  83. package/development/datepicker/datepicker-toggle.js +2 -3
  84. package/development/datepicker/datepicker.js +2 -3
  85. package/development/dialog/dialog-actions.js +2 -3
  86. package/development/dialog/dialog-content.js +2 -3
  87. package/development/dialog/dialog-title.js +2 -3
  88. package/development/dialog/dialog.js +2 -3
  89. package/development/divider.js +2 -3
  90. package/development/expansion-panel/expansion-panel-content.js +2 -3
  91. package/development/expansion-panel/expansion-panel-header.js +2 -3
  92. package/development/expansion-panel/expansion-panel.js +2 -3
  93. package/development/file-selector.js +2 -3
  94. package/development/footer.js +2 -3
  95. package/development/form-error.js +2 -3
  96. package/development/form-field/form-field-clear.js +2 -3
  97. package/development/form-field/form-field.js +2 -3
  98. package/development/header/common.js +2 -3
  99. package/development/header/header-button.js +2 -3
  100. package/development/header/header-link.js +2 -3
  101. package/development/header/header.js +2 -3
  102. package/development/icon.js +4 -7
  103. package/development/image/image.d.ts +12 -3
  104. package/development/image/image.d.ts.map +1 -1
  105. package/development/image.js +41 -24
  106. package/development/journey-header.js +2 -3
  107. package/development/lead-container.js +2 -3
  108. package/development/link/block-link-button.js +2 -3
  109. package/development/link/block-link-static.js +2 -3
  110. package/development/link/block-link.js +2 -3
  111. package/development/link/common.js +3 -5
  112. package/development/link/link-button.js +2 -3
  113. package/development/link/link-static.js +2 -3
  114. package/development/link/link.js +2 -3
  115. package/development/link-list.js +2 -3
  116. package/development/loading-indicator.js +2 -3
  117. package/development/logo.js +2 -3
  118. package/development/map-container.js +2 -3
  119. package/development/menu/common.js +2 -3
  120. package/development/menu/menu-button.js +2 -3
  121. package/development/menu/menu-link.js +2 -3
  122. package/development/menu/menu.js +2 -3
  123. package/development/message.js +2 -3
  124. package/development/navigation/common.js +2 -3
  125. package/development/navigation/navigation-button.js +2 -3
  126. package/development/navigation/navigation-link.js +2 -3
  127. package/development/navigation/navigation-list.js +2 -3
  128. package/development/navigation/navigation-marker.js +2 -3
  129. package/development/navigation/navigation-section.js +2 -3
  130. package/development/navigation/navigation.js +2 -3
  131. package/development/notification.js +2 -3
  132. package/development/option/optgroup.js +2 -3
  133. package/development/option/option.js +2 -3
  134. package/development/overlay.js +3 -5
  135. package/development/popover/popover-trigger.js +2 -3
  136. package/development/popover/popover.js +2 -3
  137. package/development/radio-button/radio-button-group.js +2 -3
  138. package/development/radio-button/radio-button.js +2 -3
  139. package/development/screen-reader-only.js +2 -3
  140. package/development/select.js +2 -3
  141. package/development/selection-panel.js +2 -3
  142. package/development/signet.js +2 -3
  143. package/development/skiplink-list.js +2 -3
  144. package/development/slider.js +2 -3
  145. package/development/status.js +2 -3
  146. package/development/stepper/step-label.js +2 -3
  147. package/development/stepper/step.js +2 -3
  148. package/development/stepper/stepper/stepper.d.ts +1 -1
  149. package/development/stepper/stepper/stepper.d.ts.map +1 -1
  150. package/development/stepper/stepper.js +5 -6
  151. package/development/tabs/tab-group.js +2 -3
  152. package/development/tabs/tab-title.js +2 -3
  153. package/development/tag/tag-group.js +2 -3
  154. package/development/tag/tag.js +2 -3
  155. package/development/teaser-hero.js +2 -3
  156. package/development/teaser-paid.js +2 -3
  157. package/development/teaser.js +2 -3
  158. package/development/time-input.js +2 -3
  159. package/development/timetable-occupancy-icon.js +2 -3
  160. package/development/timetable-occupancy.js +2 -3
  161. package/development/title.js +3 -5
  162. package/development/toast.js +2 -3
  163. package/development/toggle/toggle-option.js +3 -5
  164. package/development/toggle/toggle.js +2 -3
  165. package/development/toggle-check.js +10 -3
  166. package/development/train/train-blocked-passage.js +2 -3
  167. package/development/train/train-formation.js +2 -3
  168. package/development/train/train-wagon.js +2 -3
  169. package/development/train/train.js +2 -3
  170. package/development/visual-checkbox.js +2 -3
  171. package/dialog/dialog-title.js +20 -20
  172. package/dialog/dialog.js +66 -66
  173. package/expansion-panel/expansion-panel-header.js +20 -20
  174. package/expansion-panel/expansion-panel.js +60 -60
  175. package/file-selector.js +91 -91
  176. package/form-field/form-field-clear.js +12 -12
  177. package/form-field/form-field.js +111 -111
  178. package/header/header.js +53 -53
  179. package/icon.js +107 -107
  180. package/image/image.d.ts +12 -3
  181. package/image/image.d.ts.map +1 -1
  182. package/image.js +118 -105
  183. package/journey-header.js +29 -29
  184. package/map-container.js +23 -23
  185. package/menu/menu.js +91 -91
  186. package/navigation/common.js +16 -16
  187. package/navigation/navigation-marker.js +34 -34
  188. package/navigation/navigation-section.js +83 -83
  189. package/navigation/navigation.js +87 -87
  190. package/notification.js +52 -52
  191. package/option/optgroup.js +45 -45
  192. package/option/option.js +108 -108
  193. package/overlay.js +5 -5
  194. package/package.json +1 -1
  195. package/popover/popover.js +110 -110
  196. package/radio-button/radio-button-group.js +93 -93
  197. package/radio-button/radio-button.js +84 -84
  198. package/select.js +178 -178
  199. package/selection-panel.js +44 -44
  200. package/slider.js +58 -58
  201. package/status.js +6 -6
  202. package/stepper/step-label.js +19 -19
  203. package/stepper/step.js +31 -31
  204. package/stepper/stepper/stepper.d.ts +1 -1
  205. package/stepper/stepper/stepper.d.ts.map +1 -1
  206. package/stepper/stepper.js +48 -48
  207. package/tabs/tab-group.js +67 -67
  208. package/tag/tag-group.js +8 -8
  209. package/tag/tag.js +27 -27
  210. package/teaser-paid.js +12 -12
  211. package/time-input.js +73 -73
  212. package/timetable-occupancy-icon.js +26 -26
  213. package/timetable-occupancy.js +9 -9
  214. package/toast.js +38 -38
  215. package/toggle/toggle-option.js +33 -33
  216. package/toggle/toggle.js +46 -46
  217. package/toggle-check.js +14 -14
  218. package/train/train-formation.js +36 -37
  219. package/train/train-wagon.js +30 -30
  220. package/train/train.js +13 -13
package/clock.js CHANGED
@@ -1,156 +1,156 @@
1
- import { css as u, LitElement as b, html as v } from "lit";
2
- import { property as M, customElement as k } from "lit/decorators.js";
3
- import { ref as l } from "lit/directives/ref.js";
4
- const p = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><g class="face"><circle fill="#FFF" cx="52.5" cy="52.5" r="52.5"/><path d="M50.75 4h3.5v12h-3.5zM50.75 89h3.5v12h-3.5zM75.233 9.623l3.03 1.75-6 10.392-3.03-1.75zM32.734 83.233l3.03 1.75-6 10.392-3.03-1.75zM93.628 26.732l1.75 3.031-10.392 6-1.75-3.03zM20.017 69.234l1.75 3.031-10.392 6-1.75-3.03zM101 50.75v3.5H89v-3.5zM16 50.75v3.5H4v-3.5zM95.379 75.232l-1.75 3.031-10.392-6 1.75-3.03zM21.766 32.734l-1.75 3.031-10.392-6 1.75-3.03zM78.267 93.63l-3.03 1.75-6-10.393 3.03-1.75zM35.766 20.015l-3.03 1.75-6-10.392 3.03-1.75z"/><g><path d="M56.873 4.19l1.392.147-.366 3.48-1.392-.145zM47.101 97.177l1.393.146-.366 3.481-1.392-.146zM61.896 4.914l1.37.29-.728 3.424-1.37-.29zM42.458 96.366l1.37.29-.728 3.424-1.37-.291zM66.825 6.157l1.332.432-1.082 3.33-1.331-.434zM37.931 95.085l1.332.432-1.082 3.33-1.331-.433zM71.584 7.906l1.28.569-1.424 3.197-1.28-.57zM33.56 93.32l1.278.569-1.423 3.197-1.28-.57zM80.44 12.852l1.133.823-2.058 2.831-1.132-.823zM25.481 88.494l1.133.822-2.057 2.832-1.133-.823zM84.43 15.986l1.04.937-2.342 2.6-1.04-.936zM21.87 85.469l1.04.936-2.341 2.601-1.04-.937zM88.072 19.522l.937 1.04-2.6 2.343-.937-1.04zM18.593 82.088l.937 1.04-2.601 2.342-.937-1.04zM91.328 23.425l.823 1.133-2.832 2.057-.823-1.132zM15.684 78.385l.823 1.132-2.832 2.058-.822-1.133zM96.52 32.128l.57 1.279-3.198 1.423-.57-1.278zM11.109 70.161l.569 1.279-3.197 1.423-.57-1.279zM98.407 36.85l.433 1.332-3.33 1.081-.432-1.331zM9.483 65.74l.432 1.33-3.329 1.082-.432-1.331zM99.795 41.726l.291 1.37-3.423.727-.29-1.37zM8.34 61.17l.292 1.37-3.424.728-.29-1.37zM100.66 46.73l.146 1.393-3.48.366-.147-1.392zM7.674 56.506l.146 1.392-3.48.366-.147-1.392zM100.811 56.873l-.146 1.392-3.48-.365.145-1.393zM7.821 47.101l-.146 1.392-3.48-.365.145-1.393zM100.09 61.895l-.291 1.369-3.424-.728.291-1.369zM8.631 42.46l-.291 1.37-3.423-.728.29-1.37zM98.84 66.827l-.432 1.331-3.329-1.081.433-1.332zM9.918 37.93l-.433 1.331-3.329-1.082.433-1.331zM97.098 71.585l-.569 1.28-3.197-1.424.57-1.28zM11.677 33.558l-.57 1.28-3.197-1.424.57-1.279zM92.149 80.439l-.823 1.133-2.832-2.058.823-1.132zM16.506 25.482l-.823 1.133-2.831-2.057.823-1.133zM89.017 84.431l-.937 1.04-2.6-2.341.936-1.04zM19.528 21.869l-.936 1.04-2.601-2.342.936-1.04zM85.48 88.076l-1.041.936-2.342-2.6 1.04-.937zM22.91 18.59l-1.04.937-2.341-2.601 1.04-.937zM81.574 91.328l-1.133.823-2.057-2.831 1.132-.823zM26.617 15.684l-1.133.823-2.057-2.832 1.132-.823zM72.873 96.524l-1.279.57-1.423-3.198 1.278-.57zM34.838 11.105l-1.279.57-1.423-3.198 1.279-.57zM68.151 98.405l-1.331.432-1.082-3.329 1.332-.432zM39.259 9.485l-1.332.433-1.081-3.33 1.331-.432zM63.272 99.799l-1.369.29-.728-3.422 1.37-.291zM43.83 8.337l-1.369.291-.727-3.423 1.37-.291zM58.27 100.662l-1.393.146-.366-3.48 1.393-.147zM48.494 7.672l-1.392.147-.366-3.481 1.392-.147z"/></g></g></svg>
5
- `, H = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path id="mod_clock_svg_hours" d="M55.7 64.5h-6.4l.6-44h5.2z"/></svg>
6
- `, g = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M55.1,64.5h-5.2l0.8-58h3.6L55.1,64.5z"/></svg>
7
- `, z = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M57.8,21.3c0-2.9-2.4-5.2-5.2-5.2s-5.3,2.3-5.3,5.2c0,2.7,2,4.8,4.5,5.2V69h1.5V26.5C55.8,26.2,57.8,24,57.8,21.3z"/></svg>
1
+ import { css as u, LitElement as _, html as M } from "lit";
2
+ import { property as p, customElement as v } from "lit/decorators.js";
3
+ import { ref as c } from "lit/directives/ref.js";
4
+ const f = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><g class="face"><circle fill="#FFF" cx="52.5" cy="52.5" r="52.5"/><path d="M50.75 4h3.5v12h-3.5zM50.75 89h3.5v12h-3.5zM75.233 9.623l3.03 1.75-6 10.392-3.03-1.75zM32.734 83.233l3.03 1.75-6 10.392-3.03-1.75zM93.628 26.732l1.75 3.031-10.392 6-1.75-3.03zM20.017 69.234l1.75 3.031-10.392 6-1.75-3.03zM101 50.75v3.5H89v-3.5zM16 50.75v3.5H4v-3.5zM95.379 75.232l-1.75 3.031-10.392-6 1.75-3.03zM21.766 32.734l-1.75 3.031-10.392-6 1.75-3.03zM78.267 93.63l-3.03 1.75-6-10.393 3.03-1.75zM35.766 20.015l-3.03 1.75-6-10.392 3.03-1.75z"/><g><path d="M56.873 4.19l1.392.147-.366 3.48-1.392-.145zM47.101 97.177l1.393.146-.366 3.481-1.392-.146zM61.896 4.914l1.37.29-.728 3.424-1.37-.29zM42.458 96.366l1.37.29-.728 3.424-1.37-.291zM66.825 6.157l1.332.432-1.082 3.33-1.331-.434zM37.931 95.085l1.332.432-1.082 3.33-1.331-.433zM71.584 7.906l1.28.569-1.424 3.197-1.28-.57zM33.56 93.32l1.278.569-1.423 3.197-1.28-.57zM80.44 12.852l1.133.823-2.058 2.831-1.132-.823zM25.481 88.494l1.133.822-2.057 2.832-1.133-.823zM84.43 15.986l1.04.937-2.342 2.6-1.04-.936zM21.87 85.469l1.04.936-2.341 2.601-1.04-.937zM88.072 19.522l.937 1.04-2.6 2.343-.937-1.04zM18.593 82.088l.937 1.04-2.601 2.342-.937-1.04zM91.328 23.425l.823 1.133-2.832 2.057-.823-1.132zM15.684 78.385l.823 1.132-2.832 2.058-.822-1.133zM96.52 32.128l.57 1.279-3.198 1.423-.57-1.278zM11.109 70.161l.569 1.279-3.197 1.423-.57-1.279zM98.407 36.85l.433 1.332-3.33 1.081-.432-1.331zM9.483 65.74l.432 1.33-3.329 1.082-.432-1.331zM99.795 41.726l.291 1.37-3.423.727-.29-1.37zM8.34 61.17l.292 1.37-3.424.728-.29-1.37zM100.66 46.73l.146 1.393-3.48.366-.147-1.392zM7.674 56.506l.146 1.392-3.48.366-.147-1.392zM100.811 56.873l-.146 1.392-3.48-.365.145-1.393zM7.821 47.101l-.146 1.392-3.48-.365.145-1.393zM100.09 61.895l-.291 1.369-3.424-.728.291-1.369zM8.631 42.46l-.291 1.37-3.423-.728.29-1.37zM98.84 66.827l-.432 1.331-3.329-1.081.433-1.332zM9.918 37.93l-.433 1.331-3.329-1.082.433-1.331zM97.098 71.585l-.569 1.28-3.197-1.424.57-1.28zM11.677 33.558l-.57 1.28-3.197-1.424.57-1.279zM92.149 80.439l-.823 1.133-2.832-2.058.823-1.132zM16.506 25.482l-.823 1.133-2.831-2.057.823-1.133zM89.017 84.431l-.937 1.04-2.6-2.341.936-1.04zM19.528 21.869l-.936 1.04-2.601-2.342.936-1.04zM85.48 88.076l-1.041.936-2.342-2.6 1.04-.937zM22.91 18.59l-1.04.937-2.341-2.601 1.04-.937zM81.574 91.328l-1.133.823-2.057-2.831 1.132-.823zM26.617 15.684l-1.133.823-2.057-2.832 1.132-.823zM72.873 96.524l-1.279.57-1.423-3.198 1.278-.57zM34.838 11.105l-1.279.57-1.423-3.198 1.279-.57zM68.151 98.405l-1.331.432-1.082-3.329 1.332-.432zM39.259 9.485l-1.332.433-1.081-3.33 1.331-.432zM63.272 99.799l-1.369.29-.728-3.422 1.37-.291zM43.83 8.337l-1.369.291-.727-3.423 1.37-.291zM58.27 100.662l-1.393.146-.366-3.48 1.393-.147zM48.494 7.672l-1.392.147-.366-3.481 1.392-.147z"/></g></g></svg>
5
+ `, k = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path id="mod_clock_svg_hours" d="M55.7 64.5h-6.4l.6-44h5.2z"/></svg>
6
+ `, z = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M55.1,64.5h-5.2l0.8-58h3.6L55.1,64.5z"/></svg>
7
+ `, g = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M57.8,21.3c0-2.9-2.4-5.2-5.2-5.2s-5.3,2.3-5.3,5.2c0,2.7,2,4.8,4.5,5.2V69h1.5V26.5C55.8,26.2,57.8,24,57.8,21.3z"/></svg>
8
8
  `, y = u`*,:before,:after{box-sizing:border-box}:host{--sbb-clock-hours-animation-start-angle: 0deg;--sbb-clock-seconds-animation-start-angle: 0deg;--sbb-clock-hours-animation-duration: 0s;--sbb-clock-seconds-animation-duration: 0s;--sbb-clock-animation-play-state: paused;--sbb-clock-seconds-hand-color: var(--sbb-color-red);display:block}.sbb-clock{position:relative;width:100%;height:100%;aspect-ratio:1/1;overflow:hidden;contain:content}.sbb-clock__face,.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:center center;transform:rotate(0);transform-style:preserve-3d;backface-visibility:hidden}.sbb-clock__hand-minutes{transition:transform .2s cubic-bezier(.4,2.08,.55,.44)}@supports not (aspect-ratio: 1/1){.sbb-clock__hand-minutes{transform-origin:50% 49.625%}}.sbb-clock__hand-hours{animation-name:rotate;animation-duration:43200s;animation-iteration-count:infinite;animation-timing-function:linear;animation-play-state:var(--sbb-clock-animation-play-state)}.sbb-clock__hand-hours--initial-hour{animation-name:hand-hours-animation-initial-hour;animation-duration:var(--sbb-clock-hours-animation-duration);animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:1}.sbb-clock__hand-minutes--no-transition{transition:none}.sbb-clock__hand-seconds{animation-name:hand-seconds-animation;animation-duration:60s;animation-timing-function:linear;animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:infinite;fill:var(--sbb-clock-seconds-hand-color)}.sbb-clock__hand-seconds--initial-minute{animation-name:hand-seconds-animation-initial-minute;animation-duration:var(--sbb-clock-seconds-animation-duration);animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:1}:host(:not([data-initialized])) :is(.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds){display:none}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes hand-hours-animation-initial-hour{0%{transform:rotate(var(--sbb-clock-hours-animation-start-angle))}to{transform:rotate(360deg)}}@keyframes hand-seconds-animation{0%{transform:rotate(0)}97.5%,to{transform:rotate(360deg)}}@keyframes hand-seconds-animation-initial-minute{0%{transform:rotate(var(--sbb-clock-seconds-animation-start-angle))}97.5%,to{transform:rotate(360deg)}}`;
9
- var f = Object.defineProperty, S = Object.getOwnPropertyDescriptor, _ = (t, s, o, i) => {
10
- for (var n = i > 1 ? void 0 : i ? S(s, o) : s, e = t.length - 1, a; e >= 0; e--)
11
- (a = t[e]) && (n = (i ? a(s, o, n) : a(n)) || n);
12
- return i && n && f(s, o, n), n;
9
+ var w = Object.defineProperty, L = Object.getOwnPropertyDescriptor, m = (t, s, a, n) => {
10
+ for (var i = n > 1 ? void 0 : n ? L(s, a) : s, o = t.length - 1, e; o >= 0; o--)
11
+ (e = t[o]) && (i = (n ? e(s, a, i) : e(i)) || i);
12
+ return n && i && w(s, a, i), i;
13
13
  };
14
- const w = 12, L = 60, r = 60, E = 50, d = 360, h = 30, C = 6, A = 360 / 58.5, O = 60, P = 3600, m = {
14
+ const E = 12, O = 60, r = 60, S = 50, h = 360, d = 30, N = 6, T = 360 / 58.5, A = 60, C = 3600, b = {
15
15
  once: !0,
16
16
  passive: !0
17
17
  };
18
- let c = class extends b {
18
+ let l = class extends _ {
19
19
  constructor() {
20
- super(...arguments), this.now = null, this._moveHoursHandFn = () => this._moveHoursHand(), this._moveMinutesHandFn = () => this._moveMinutesHand();
20
+ super(...arguments), this.now = null, this.h = () => this.r(), this.f = () => this.s();
21
21
  }
22
22
  willUpdate(t) {
23
- super.willUpdate(t), t.has("now") && (this.now ? (this._removeSecondsAnimationStyles(), this._removeHoursAnimationStyles(), this._stopClock()) : this._startClock());
23
+ super.willUpdate(t), t.has("now") && (this.now ? (this.j(), this.k(), this.l()) : this.m());
24
24
  }
25
- async _handlePageVisibilityChange() {
26
- document.visibilityState === "hidden" ? await this._stopClock() : this.now || await this._startClock();
25
+ async n() {
26
+ document.visibilityState === "hidden" ? await this.l() : this.now || await this.m();
27
27
  }
28
- _addEventListeners() {
29
- document.addEventListener("visibilitychange", () => this._handlePageVisibilityChange(), !1);
28
+ t() {
29
+ document.addEventListener("visibilitychange", () => this.n(), !1);
30
30
  }
31
- _removeEventListeners() {
31
+ u() {
32
32
  var t, s;
33
33
  document.removeEventListener(
34
34
  "visibilitychange",
35
- () => this._handlePageVisibilityChange(),
35
+ () => this.n(),
36
36
  !1
37
- ), (t = this._clockHandHours) == null || t.removeEventListener("animationend", this._moveHoursHandFn), (s = this._clockHandSeconds) == null || s.removeEventListener("animationend", this._moveMinutesHandFn), clearInterval(this._handMovement);
37
+ ), (t = this.a) == null || t.removeEventListener("animationend", this.h), (s = this.b) == null || s.removeEventListener("animationend", this.f), clearInterval(this.i);
38
38
  }
39
- _removeHoursAnimationStyles() {
39
+ k() {
40
40
  var t;
41
- (t = this._clockHandHours) == null || t.classList.remove("sbb-clock__hand-hours--initial-hour"), this.style.removeProperty("--sbb-clock-hours-animation-start-angle"), this.style.removeProperty("--sbb-clock-hours-animation-duration");
41
+ (t = this.a) == null || t.classList.remove("sbb-clock__hand-hours--initial-hour"), this.style.removeProperty("--sbb-clock-hours-animation-start-angle"), this.style.removeProperty("--sbb-clock-hours-animation-duration");
42
42
  }
43
- _removeSecondsAnimationStyles() {
43
+ j() {
44
44
  var t, s;
45
- (t = this._clockHandSeconds) == null || t.classList.remove("sbb-clock__hand-seconds--initial-minute"), (s = this._clockHandMinutes) == null || s.classList.remove("sbb-clock__hand-minutes--no-transition"), this.style.removeProperty("--sbb-clock-seconds-animation-start-angle"), this.style.removeProperty("--sbb-clock-seconds-animation-duration");
45
+ (t = this.b) == null || t.classList.remove("sbb-clock__hand-seconds--initial-minute"), (s = this.d) == null || s.classList.remove("sbb-clock__hand-minutes--no-transition"), this.style.removeProperty("--sbb-clock-seconds-animation-start-angle"), this.style.removeProperty("--sbb-clock-seconds-animation-duration");
46
46
  }
47
47
  /** Given the current date, calculates the hh/mm/ss values and the hh/mm/ss left to the next midnight. */
48
- _assignCurrentTime() {
49
- const t = this.now ? null : /* @__PURE__ */ new Date(), [s, o, i] = t ? [t.getHours(), t.getMinutes(), t.getSeconds()] : this.now.split(":").map((n) => +n);
50
- this._hours = s % 12, this._minutes = o, this._seconds = i;
48
+ v() {
49
+ const t = this.now ? null : /* @__PURE__ */ new Date(), [s, a, n] = t ? [t.getHours(), t.getMinutes(), t.getSeconds()] : this.now.split(":").map((i) => +i);
50
+ this.e = s % 12, this.c = a, this.g = n;
51
51
  }
52
52
  /** Set the starting position for the three hands on the clock face. */
53
- _setHandsStartingPosition() {
54
- var e, a;
55
- this._assignCurrentTime();
56
- const t = r - this._seconds, s = L - this._minutes, o = w - this._hours;
57
- let i = 0, n = 0;
58
- t > 0 && (i += t, n = 1), s > 0 && (i += (s - n) * O, n = 1), o > 0 && (i += (o - n) * P), this.style.setProperty(
53
+ o() {
54
+ var o, e;
55
+ this.v();
56
+ const t = r - this.g, s = O - this.c, a = E - this.e;
57
+ let n = 0, i = 0;
58
+ t > 0 && (n += t, i = 1), s > 0 && (n += (s - i) * A, i = 1), a > 0 && (n += (a - i) * C), this.style.setProperty(
59
59
  "--sbb-clock-hours-animation-start-angle",
60
- `${Math.ceil(this._hours * h + this._minutes / 2)}deg`
61
- ), this.style.setProperty("--sbb-clock-hours-animation-duration", `${i}s`), this.style.setProperty(
60
+ `${Math.ceil(this.e * d + this.c / 2)}deg`
61
+ ), this.style.setProperty("--sbb-clock-hours-animation-duration", `${n}s`), this.style.setProperty(
62
62
  "--sbb-clock-seconds-animation-start-angle",
63
- `${Math.ceil(this._seconds * A)}deg`
64
- ), this.style.setProperty("--sbb-clock-seconds-animation-duration", `${t}s`), this._setMinutesHand(), (e = this._clockHandSeconds) == null || e.classList.add("sbb-clock__hand-seconds--initial-minute"), (a = this._clockHandHours) == null || a.classList.add("sbb-clock__hand-hours--initial-hour"), this.style.setProperty("--sbb-clock-animation-play-state", "running"), this.toggleAttribute("data-initialized", !0);
63
+ `${Math.ceil(this.g * T)}deg`
64
+ ), this.style.setProperty("--sbb-clock-seconds-animation-duration", `${t}s`), this.p(), (o = this.b) == null || o.classList.add("sbb-clock__hand-seconds--initial-minute"), (e = this.a) == null || e.classList.add("sbb-clock__hand-hours--initial-hour"), this.style.setProperty("--sbb-clock-animation-play-state", "running"), this.toggleAttribute("data-initialized", !0);
65
65
  }
66
66
  /** Set the starting position for the minutes hand. */
67
- _setMinutesHand() {
67
+ p() {
68
68
  var t;
69
- (t = this._clockHandMinutes) == null || t.style.setProperty(
69
+ (t = this.d) == null || t.style.setProperty(
70
70
  "transform",
71
- `rotateZ(${Math.ceil(this._minutes * C)}deg)`
71
+ `rotateZ(${Math.ceil(this.c * N)}deg)`
72
72
  );
73
73
  }
74
74
  /** Move the hours hand to the next value. */
75
- _moveHoursHand() {
75
+ r() {
76
76
  var s;
77
- this._removeHoursAnimationStyles();
78
- let t = Math.ceil(this._hours * h + this._minutes / 2);
79
- t >= d && (t -= d), (s = this._clockHandHours) == null || s.style.setProperty("transform", `rotateZ(${t}deg)`);
77
+ this.k();
78
+ let t = Math.ceil(this.e * d + this.c / 2);
79
+ t >= h && (t -= h), (s = this.a) == null || s.style.setProperty("transform", `rotateZ(${t}deg)`);
80
80
  }
81
81
  /** Move the minutes hand to the next value. */
82
- _moveMinutesHand() {
82
+ s() {
83
83
  var t;
84
- (t = this._clockHandSeconds) == null || t.removeEventListener("animationend", this._moveMinutesHandFn), this._removeSecondsAnimationStyles(), this._addMinutesAndSetHands(), this._handMovement = setInterval(
85
- () => this._addMinutesAndSetHands(),
84
+ (t = this.b) == null || t.removeEventListener("animationend", this.f), this.j(), this.q(), this.i = setInterval(
85
+ () => this.q(),
86
86
  r * 1e3
87
87
  );
88
88
  }
89
- _addMinutesAndSetHands() {
90
- this._minutes++, this._setMinutesHand();
89
+ q() {
90
+ this.c++, this.p();
91
91
  }
92
92
  /** Stops the clock by removing all the animations. */
93
- async _stopClock() {
94
- var t, s, o, i, n;
95
- clearInterval(this._handMovement), this.now ? (this._setHandsStartingPosition(), await new Promise((e) => setTimeout(e)), (t = this._clockHandSeconds) == null || t.classList.add("sbb-clock__hand-seconds--initial-minute"), (s = this._clockHandHours) == null || s.classList.add("sbb-clock__hand-hours--initial-hour")) : (this._removeSecondsAnimationStyles(), this._removeHoursAnimationStyles()), (o = this._clockHandHours) == null || o.removeEventListener("animationend", this._moveHoursHandFn), (i = this._clockHandSeconds) == null || i.removeEventListener("animationend", this._moveMinutesHandFn), (n = this._clockHandMinutes) == null || n.classList.add("sbb-clock__hand-minutes--no-transition"), this.style.setProperty("--sbb-clock-animation-play-state", "paused");
93
+ async l() {
94
+ var t, s, a, n, i;
95
+ clearInterval(this.i), this.now ? (this.o(), await new Promise((o) => setTimeout(o)), (t = this.b) == null || t.classList.add("sbb-clock__hand-seconds--initial-minute"), (s = this.a) == null || s.classList.add("sbb-clock__hand-hours--initial-hour")) : (this.j(), this.k()), (a = this.a) == null || a.removeEventListener("animationend", this.h), (n = this.b) == null || n.removeEventListener("animationend", this.f), (i = this.d) == null || i.classList.add("sbb-clock__hand-minutes--no-transition"), this.style.setProperty("--sbb-clock-animation-play-state", "paused");
96
96
  }
97
97
  /** Starts the clock by defining the hands starting position then starting the animations. */
98
- async _startClock() {
98
+ async m() {
99
99
  var t, s;
100
- (t = this._clockHandHours) == null || t.addEventListener(
100
+ (t = this.a) == null || t.addEventListener(
101
101
  "animationend",
102
- this._moveHoursHandFn,
103
- m
104
- ), (s = this._clockHandSeconds) == null || s.addEventListener(
102
+ this.h,
103
+ b
104
+ ), (s = this.b) == null || s.addEventListener(
105
105
  "animationend",
106
- this._moveMinutesHandFn,
107
- m
106
+ this.f,
107
+ b
108
108
  ), await new Promise(
109
- () => setTimeout(() => this._setHandsStartingPosition(), E)
109
+ () => setTimeout(() => this.o(), S)
110
110
  );
111
111
  }
112
112
  async firstUpdated(t) {
113
- super.firstUpdated(t), this._addEventListeners(), this.now ? await this._stopClock() : await this._startClock();
113
+ super.firstUpdated(t), this.t(), this.now ? await this.l() : await this.m();
114
114
  }
115
115
  disconnectedCallback() {
116
- super.disconnectedCallback(), this._removeEventListeners();
116
+ super.disconnectedCallback(), this.u();
117
117
  }
118
118
  render() {
119
- return v`
119
+ return M`
120
120
  <div class="sbb-clock">
121
- <span class="sbb-clock__face" .innerHTML=${p}></span>
121
+ <span class="sbb-clock__face" .innerHTML=${f}></span>
122
122
  <span
123
123
  class="sbb-clock__hand-hours"
124
- .innerHTML=${H}
125
- ${l((t) => {
126
- this._clockHandHours = t;
124
+ .innerHTML=${k}
125
+ ${c((t) => {
126
+ this.a = t;
127
127
  })}
128
128
  ></span>
129
129
  <span
130
130
  class="sbb-clock__hand-minutes sbb-clock__hand-minutes--no-transition"
131
- .innerHTML=${g}
132
- ${l((t) => {
133
- this._clockHandMinutes = t;
131
+ .innerHTML=${z}
132
+ ${c((t) => {
133
+ this.d = t;
134
134
  })}
135
135
  ></span>
136
136
  <span
137
137
  class="sbb-clock__hand-seconds"
138
- .innerHTML=${z}
139
- ${l((t) => {
140
- this._clockHandSeconds = t;
138
+ .innerHTML=${g}
139
+ ${c((t) => {
140
+ this.b = t;
141
141
  })}
142
142
  ></span>
143
143
  </div>
144
144
  `;
145
145
  }
146
146
  };
147
- c.styles = y;
148
- _([
149
- M()
150
- ], c.prototype, "now", 2);
151
- c = _([
152
- k("sbb-clock")
153
- ], c);
147
+ l.styles = y;
148
+ m([
149
+ p()
150
+ ], l.prototype, "now", 2);
151
+ l = m([
152
+ v("sbb-clock")
153
+ ], l);
154
154
  export {
155
- c as SbbClockElement
155
+ l as SbbClockElement
156
156
  };
@@ -3,33 +3,33 @@ import { property as v, customElement as p } from "lit/decorators.js";
3
3
  import { hostAttributes as k } from "../core/decorators.js";
4
4
  import { AgnosticIntersectionObserver as h } from "../core/observers.js";
5
5
  const y = d`*,:before,:after{box-sizing:border-box}:host{--sbb-sticky-bar-padding-block: var(--sbb-spacing-responsive-xs);--sbb-sticky-bar-fade-in-animation-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-5x) );--sbb-sticky-bar-fade-out-animation-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-2x) );--sbb-sticky-bar-animation-easing: var(--sbb-animation-easing);--sbb-sticky-bar-border-radius: var(--sbb-border-radius-8x);display:contents}:host([data-sticking]){--sbb-sticky-bar-sticky-background-color: var( --sbb-container-background-color, var(--sbb-color-white) )}:host([data-sticking][color=white]){--sbb-sticky-bar-sticky-background-color: var(--sbb-color-white)}:host([data-sticking][color=milk]){--sbb-sticky-bar-sticky-background-color: var(--sbb-color-milk)}.sbb-sticky-bar__wrapper{position:sticky;inset-block-end:0;display:block;z-index:var(--sbb-sticky-bar-z-index)}.sbb-sticky-bar__wrapper:after,.sbb-sticky-bar__wrapper:before{content:"";top:0;right:0;bottom:0;left:0;position:absolute;display:block;z-index:-1}.sbb-sticky-bar__wrapper:before{background-color:var(--sbb-container-background-color);padding:0!important}:host(:not([data-expanded])) .sbb-sticky-bar__wrapper:before{padding-inline:var(--sbb-layout-base-offset-responsive);margin-inline:auto;width:100%}@media (min-width: 90rem){:host(:not([data-expanded])) .sbb-sticky-bar__wrapper:before{max-width:calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))}}:host([data-expanded]) .sbb-sticky-bar__wrapper:before{padding-inline:var(--sbb-spacing-responsive-xxs)}.sbb-sticky-bar__wrapper:after{background-color:var(--sbb-sticky-bar-sticky-background-color, transparent);transition:background-color var(--sbb-sticky-bar-fade-out-animation-duration) var(--sbb-sticky-bar-animation-easing);border-start-start-radius:var(--sbb-sticky-bar-border-radius);border-start-end-radius:var(--sbb-sticky-bar-border-radius)}:host([data-sticking]) .sbb-sticky-bar__wrapper:after{transition-duration:var(--sbb-sticky-bar-fade-in-animation-duration)}@media (forced-colors: active){:host([data-sticking]) .sbb-sticky-bar__wrapper:after{border-block-start:var(--sbb-border-width-1x) solid CanvasText;border-radius:0}}.sbb-sticky-bar{display:flex;padding-block:var(--sbb-sticky-bar-padding-block);margin-block-end:-1px}.sbb-sticky-bar:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;border-start-start-radius:var(--sbb-sticky-bar-border-radius);border-start-end-radius:var(--sbb-sticky-bar-border-radius);transition:box-shadow var(--sbb-sticky-bar-fade-out-animation-duration) var(--sbb-sticky-bar-animation-easing);clip-path:polygon(-50% calc(-1 * var(--sbb-shadow-elevation-level-11-shadow-1-blur)),150% calc(-1 * var(--sbb-shadow-elevation-level-11-shadow-1-blur)),150% 50%,-50% 50%)}:host([data-sticking]) .sbb-sticky-bar:before{box-shadow:var(--sbb-shadow-elevation-level-11-shadow-2-offset-x) var(--sbb-shadow-elevation-level-11-shadow-2-offset-y) var(--sbb-shadow-elevation-level-11-shadow-2-blur) var(--sbb-shadow-elevation-level-11-shadow-2-spread) var(--sbb-shadow-elevation-level-11-soft-2-color),var(--sbb-shadow-elevation-level-11-shadow-1-offset-x) var(--sbb-shadow-elevation-level-11-shadow-1-offset-y) var(--sbb-shadow-elevation-level-11-shadow-1-blur) var(--sbb-shadow-elevation-level-11-shadow-1-spread) var(--sbb-shadow-elevation-level-11-soft-1-color);transition-duration:var(--sbb-sticky-bar-fade-in-animation-duration)}:host(:not([data-expanded])) .sbb-sticky-bar{padding-inline:var(--sbb-layout-base-offset-responsive);margin-inline:auto;width:100%}@media (min-width: 90rem){:host(:not([data-expanded])) .sbb-sticky-bar{max-width:calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))}}:host([data-expanded]) .sbb-sticky-bar{padding-inline:var(--sbb-spacing-responsive-xxs)}.sbb-sticky-bar__intersector{height:1px}.sbb-sticky-bar__intersector:after{content:"";display:block;position:absolute;width:100%;height:calc(var(--sbb-sticky-bar-bottom-overlapping-height, 0) + 1px);background-color:transparent;pointer-events:none;transition:background-color var(--sbb-sticky-bar-fade-out-animation-duration) var(--sbb-sticky-bar-animation-easing)}:host([data-sticking]) .sbb-sticky-bar__intersector:after{transition-duration:var(--sbb-sticky-bar-fade-in-animation-duration);background-color:var(--sbb-sticky-bar-sticky-background-color)}`;
6
- var u = Object.defineProperty, g = Object.getOwnPropertyDescriptor, n = (a, s, e, r) => {
7
- for (var t = r > 1 ? void 0 : r ? g(s, e) : s, o = a.length - 1, b; o >= 0; o--)
8
- (b = a[o]) && (t = (r ? b(s, e, t) : b(t)) || t);
9
- return r && t && u(s, e, t), t;
6
+ var u = Object.defineProperty, f = Object.getOwnPropertyDescriptor, n = (a, t, i, r) => {
7
+ for (var s = r > 1 ? void 0 : r ? f(t, i) : t, o = a.length - 1, e; o >= 0; o--)
8
+ (e = a[o]) && (s = (r ? e(t, i, s) : e(s)) || s);
9
+ return r && s && u(t, i, s), s;
10
10
  };
11
- let i = class extends c {
11
+ let b = class extends c {
12
12
  constructor() {
13
- super(...arguments), this._observer = new h(
14
- (a) => this._toggleShadowVisibility(a[0])
13
+ super(...arguments), this.b = new h(
14
+ (a) => this.c(a[0])
15
15
  );
16
16
  }
17
17
  connectedCallback() {
18
18
  super.connectedCallback();
19
19
  const a = this.closest("sbb-container");
20
- a && this.toggleAttribute("data-expanded", a.expanded), this._intersector && this._observer.observe(this._intersector);
20
+ a && this.toggleAttribute("data-expanded", a.expanded), this.a && this.b.observe(this.a);
21
21
  }
22
22
  firstUpdated(a) {
23
- super.firstUpdated(a), this._intersector || (this._intersector = this.shadowRoot.querySelector(".sbb-sticky-bar__intersector"), this._observer.observe(this._intersector)), this._observer.observe(this);
23
+ super.firstUpdated(a), this.a || (this.a = this.shadowRoot.querySelector(".sbb-sticky-bar__intersector"), this.b.observe(this.a)), this.b.observe(this);
24
24
  }
25
- _toggleShadowVisibility(a) {
25
+ c(a) {
26
26
  this.toggleAttribute(
27
27
  "data-sticking",
28
28
  !a.isIntersecting && a.boundingClientRect.top > 0
29
29
  );
30
30
  }
31
31
  disconnectedCallback() {
32
- super.disconnectedCallback(), this._observer.disconnect();
32
+ super.disconnectedCallback(), this.b.disconnect();
33
33
  }
34
34
  render() {
35
35
  return l`
@@ -42,16 +42,16 @@ let i = class extends c {
42
42
  `;
43
43
  }
44
44
  };
45
- i.styles = y;
45
+ b.styles = y;
46
46
  n([
47
47
  v({ reflect: !0 })
48
- ], i.prototype, "color", 2);
49
- i = n([
48
+ ], b.prototype, "color", 2);
49
+ b = n([
50
50
  p("sbb-sticky-bar"),
51
51
  k({
52
52
  slot: "sticky-bar"
53
53
  })
54
- ], i);
54
+ ], b);
55
55
  export {
56
- i as SbbStickyBarElement
56
+ b as SbbStickyBarElement
57
57
  };