@sbb-esta/lyne-elements 2.3.0 → 2.5.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 (428) hide show
  1. package/autocomplete/autocomplete-base-element.d.ts +1 -0
  2. package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  3. package/autocomplete/autocomplete.d.ts.map +1 -1
  4. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
  5. package/autocomplete-grid/autocomplete-grid.js +0 -1
  6. package/autocomplete.js +28 -28
  7. package/button/common/button-common.d.ts +1 -2
  8. package/button/common/button-common.d.ts.map +1 -1
  9. package/button/common.js +4 -4
  10. package/calendar/calendar.d.ts +55 -11
  11. package/calendar/calendar.d.ts.map +1 -1
  12. package/calendar.js +374 -224
  13. package/card/common/card-action-common.d.ts.map +1 -1
  14. package/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
  15. package/checkbox/checkbox-group.js +1 -1
  16. package/checkbox/common/checkbox-common.d.ts.map +1 -1
  17. package/clock/clock.d.ts +8 -0
  18. package/clock/clock.d.ts.map +1 -1
  19. package/clock.js +40 -31
  20. package/core/a11y/focus.d.ts.map +1 -1
  21. package/core/base-elements.js +36 -36
  22. package/core/controllers/escapable-overlay-controller.d.ts +11 -0
  23. package/core/controllers/escapable-overlay-controller.d.ts.map +1 -0
  24. package/core/controllers/inert-controller.d.ts +3 -3
  25. package/core/controllers/inert-controller.d.ts.map +1 -1
  26. package/core/controllers.d.ts +1 -0
  27. package/core/controllers.d.ts.map +1 -1
  28. package/core/controllers.js +79 -52
  29. package/core/datetime/date-adapter.d.ts +4 -2
  30. package/core/datetime/date-adapter.d.ts.map +1 -1
  31. package/core/datetime/native-date-adapter.d.ts +1 -1
  32. package/core/datetime/native-date-adapter.d.ts.map +1 -1
  33. package/core/datetime.js +51 -43
  34. package/core/decorators/date-converter.d.ts +8 -0
  35. package/core/decorators/date-converter.d.ts.map +1 -0
  36. package/core/decorators/date-only-type.d.ts +8 -0
  37. package/core/decorators/date-only-type.d.ts.map +1 -0
  38. package/core/decorators/force-type.d.ts +1 -1
  39. package/core/decorators/force-type.d.ts.map +1 -1
  40. package/core/decorators/get-override.d.ts.map +1 -1
  41. package/core/decorators/handle-distinct-change.d.ts.map +1 -1
  42. package/core/decorators/host-attributes.d.ts.map +1 -1
  43. package/core/decorators/slot-state.d.ts.map +1 -1
  44. package/core/decorators.d.ts +2 -0
  45. package/core/decorators.d.ts.map +1 -1
  46. package/core/decorators.js +61 -41
  47. package/core/dom/input-element.d.ts +1 -1
  48. package/core/dom/input-element.d.ts.map +1 -1
  49. package/core/dom.js +5 -5
  50. package/core/eventing/throttle.d.ts.map +1 -1
  51. package/core/i18n/i18n.d.ts +5 -0
  52. package/core/i18n/i18n.d.ts.map +1 -1
  53. package/core/i18n.js +138 -108
  54. package/core/mixins/animation-complete-mixin.d.ts +13 -0
  55. package/core/mixins/animation-complete-mixin.d.ts.map +1 -0
  56. package/core/mixins/disabled-mixin.d.ts.map +1 -1
  57. package/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
  58. package/core/mixins/form-associated-input-mixin.d.ts +25 -0
  59. package/core/mixins/form-associated-input-mixin.d.ts.map +1 -0
  60. package/core/mixins/form-associated-mixin.d.ts +13 -0
  61. package/core/mixins/form-associated-mixin.d.ts.map +1 -1
  62. package/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
  63. package/core/mixins/hydration-mixin.d.ts.map +1 -1
  64. package/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
  65. package/core/mixins/negative-mixin.d.ts.map +1 -1
  66. package/core/mixins/panel-mixin.d.ts.map +1 -1
  67. package/core/mixins/required-mixin.d.ts.map +1 -1
  68. package/core/mixins/update-scheduler-mixin.d.ts.map +1 -1
  69. package/core/mixins.d.ts +2 -0
  70. package/core/mixins.d.ts.map +1 -1
  71. package/core/mixins.js +566 -341
  72. package/core/styles/core.scss +84 -1
  73. package/core/styles/mixins/link.scss +14 -0
  74. package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables.scss +3 -0
  75. package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables_css--mixin.scss +4 -1
  76. package/core/testing/mocha-extensions.d.ts.map +1 -1
  77. package/core/testing/wait-for-render.d.ts.map +1 -1
  78. package/core.css +53 -3
  79. package/custom-elements.json +37278 -30220
  80. package/date-input/date-input.d.ts +75 -0
  81. package/date-input/date-input.d.ts.map +1 -0
  82. package/date-input.d.ts +2 -0
  83. package/date-input.d.ts.map +1 -0
  84. package/date-input.js +155 -0
  85. package/datepicker/common/datepicker-button.d.ts.map +1 -1
  86. package/datepicker/common.js +49 -45
  87. package/datepicker/datepicker/datepicker.d.ts +16 -6
  88. package/datepicker/datepicker/datepicker.d.ts.map +1 -1
  89. package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  90. package/datepicker/datepicker-toggle.js +41 -38
  91. package/datepicker/datepicker.js +95 -77
  92. package/development/autocomplete/autocomplete-base-element.d.ts +1 -0
  93. package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  94. package/development/autocomplete/autocomplete.d.ts.map +1 -1
  95. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
  96. package/development/autocomplete-grid/autocomplete-grid.js +1 -2
  97. package/development/autocomplete.js +9 -4
  98. package/development/button/common/button-common.d.ts +1 -2
  99. package/development/button/common/button-common.d.ts.map +1 -1
  100. package/development/button/common.js +26 -24
  101. package/development/calendar/calendar.d.ts +55 -11
  102. package/development/calendar/calendar.d.ts.map +1 -1
  103. package/development/calendar.js +301 -87
  104. package/development/card/common/card-action-common.d.ts.map +1 -1
  105. package/development/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
  106. package/development/checkbox/checkbox-group.js +2 -2
  107. package/development/checkbox/common/checkbox-common.d.ts.map +1 -1
  108. package/development/clock/clock.d.ts +8 -0
  109. package/development/clock/clock.d.ts.map +1 -1
  110. package/development/clock.js +20 -2
  111. package/development/core/a11y/focus.d.ts.map +1 -1
  112. package/development/core/a11y.js +1 -1
  113. package/development/core/base-elements.js +6 -6
  114. package/development/core/controllers/escapable-overlay-controller.d.ts +11 -0
  115. package/development/core/controllers/escapable-overlay-controller.d.ts.map +1 -0
  116. package/development/core/controllers/inert-controller.d.ts +3 -3
  117. package/development/core/controllers/inert-controller.d.ts.map +1 -1
  118. package/development/core/controllers.d.ts +1 -0
  119. package/development/core/controllers.d.ts.map +1 -1
  120. package/development/core/controllers.js +41 -7
  121. package/development/core/datetime/date-adapter.d.ts +4 -2
  122. package/development/core/datetime/date-adapter.d.ts.map +1 -1
  123. package/development/core/datetime/native-date-adapter.d.ts +1 -1
  124. package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
  125. package/development/core/datetime.js +14 -2
  126. package/development/core/decorators/date-converter.d.ts +8 -0
  127. package/development/core/decorators/date-converter.d.ts.map +1 -0
  128. package/development/core/decorators/date-only-type.d.ts +8 -0
  129. package/development/core/decorators/date-only-type.d.ts.map +1 -0
  130. package/development/core/decorators/force-type.d.ts +1 -1
  131. package/development/core/decorators/force-type.d.ts.map +1 -1
  132. package/development/core/decorators/get-override.d.ts.map +1 -1
  133. package/development/core/decorators/handle-distinct-change.d.ts.map +1 -1
  134. package/development/core/decorators/host-attributes.d.ts.map +1 -1
  135. package/development/core/decorators/slot-state.d.ts.map +1 -1
  136. package/development/core/decorators.d.ts +2 -0
  137. package/development/core/decorators.d.ts.map +1 -1
  138. package/development/core/decorators.js +27 -6
  139. package/development/core/dom/input-element.d.ts +1 -1
  140. package/development/core/dom/input-element.d.ts.map +1 -1
  141. package/development/core/dom.js +3 -3
  142. package/development/core/eventing/throttle.d.ts.map +1 -1
  143. package/development/core/i18n/i18n.d.ts +5 -0
  144. package/development/core/i18n/i18n.d.ts.map +1 -1
  145. package/development/core/i18n.js +36 -1
  146. package/development/core/mixins/animation-complete-mixin.d.ts +13 -0
  147. package/development/core/mixins/animation-complete-mixin.d.ts.map +1 -0
  148. package/development/core/mixins/disabled-mixin.d.ts.map +1 -1
  149. package/development/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
  150. package/development/core/mixins/form-associated-input-mixin.d.ts +25 -0
  151. package/development/core/mixins/form-associated-input-mixin.d.ts.map +1 -0
  152. package/development/core/mixins/form-associated-mixin.d.ts +13 -0
  153. package/development/core/mixins/form-associated-mixin.d.ts.map +1 -1
  154. package/development/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
  155. package/development/core/mixins/hydration-mixin.d.ts.map +1 -1
  156. package/development/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
  157. package/development/core/mixins/negative-mixin.d.ts.map +1 -1
  158. package/development/core/mixins/panel-mixin.d.ts.map +1 -1
  159. package/development/core/mixins/required-mixin.d.ts.map +1 -1
  160. package/development/core/mixins/update-scheduler-mixin.d.ts.map +1 -1
  161. package/development/core/mixins.d.ts +2 -0
  162. package/development/core/mixins.d.ts.map +1 -1
  163. package/development/core/mixins.js +428 -88
  164. package/development/core/testing/mocha-extensions.d.ts.map +1 -1
  165. package/development/core/testing/wait-for-render.d.ts.map +1 -1
  166. package/development/date-input/date-input.d.ts +75 -0
  167. package/development/date-input/date-input.d.ts.map +1 -0
  168. package/development/date-input.d.ts +2 -0
  169. package/development/date-input.d.ts.map +1 -0
  170. package/development/date-input.js +267 -0
  171. package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
  172. package/development/datepicker/common.js +11 -2
  173. package/development/datepicker/datepicker/datepicker.d.ts +16 -6
  174. package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
  175. package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  176. package/development/datepicker/datepicker-toggle.js +12 -3
  177. package/development/datepicker/datepicker.js +66 -39
  178. package/development/dialog/dialog/dialog.d.ts.map +1 -1
  179. package/development/dialog/dialog-title/dialog-title.d.ts +3 -1
  180. package/development/dialog/dialog-title/dialog-title.d.ts.map +1 -1
  181. package/development/dialog/dialog-title.js +7 -2
  182. package/development/dialog/dialog.js +3 -1
  183. package/development/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
  184. package/development/expansion-panel/expansion-panel.js +2 -2
  185. package/development/file-selector/common/file-selector-common.d.ts.map +1 -1
  186. package/development/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
  187. package/development/flip-card/flip-card-details.js +5 -3
  188. package/development/form-field/form-field/form-field.d.ts +1 -1
  189. package/development/form-field/form-field/form-field.d.ts.map +1 -1
  190. package/development/form-field/form-field.js +19 -13
  191. package/development/header/common/header-action-common.d.ts.map +1 -1
  192. package/development/header/common.js +2 -2
  193. package/development/icon/icon-name-mixin.d.ts.map +1 -1
  194. package/development/icon/icon-request.d.ts.map +1 -1
  195. package/development/icon/icon-validate.d.ts.map +1 -1
  196. package/development/link/common/block-link-common.d.ts.map +1 -1
  197. package/development/link/common/inline-link-common.d.ts.map +1 -1
  198. package/development/link/common/link-common.d.ts.map +1 -1
  199. package/development/link/common.js +13 -1
  200. package/development/menu/common/menu-action-common.d.ts.map +1 -1
  201. package/development/menu/menu/menu.d.ts +1 -1
  202. package/development/menu/menu/menu.d.ts.map +1 -1
  203. package/development/menu/menu.js +8 -15
  204. package/development/navigation/common/navigation-action-common.d.ts.map +1 -1
  205. package/development/navigation/navigation/navigation.d.ts +1 -3
  206. package/development/navigation/navigation/navigation.d.ts.map +1 -1
  207. package/development/navigation/navigation.js +11 -21
  208. package/development/overlay/overlay-base-element.d.ts +2 -2
  209. package/development/overlay/overlay-base-element.d.ts.map +1 -1
  210. package/development/overlay/overlay.d.ts.map +1 -1
  211. package/development/overlay.js +9 -13
  212. package/development/paginator/common/paginator-common.d.ts.map +1 -1
  213. package/development/popover/popover/popover.d.ts +1 -1
  214. package/development/popover/popover/popover.d.ts.map +1 -1
  215. package/development/popover/popover.js +5 -15
  216. package/development/radio-button/common/radio-button-common.d.ts.map +1 -1
  217. package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
  218. package/development/radio-button/radio-button-group.js +2 -2
  219. package/development/sbb-tokens-CSAKTXUi.js +1 -1
  220. package/development/select/select.d.ts +3 -1
  221. package/development/select/select.d.ts.map +1 -1
  222. package/development/select.js +12 -8
  223. package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
  224. package/development/selection-expansion-panel.js +2 -2
  225. package/development/sidebar/common.d.ts +1 -0
  226. package/development/sidebar/common.d.ts.map +1 -0
  227. package/development/sidebar/common.js +114 -0
  228. package/development/sidebar/icon-sidebar/icon-sidebar.d.ts +23 -0
  229. package/development/sidebar/icon-sidebar/icon-sidebar.d.ts.map +1 -0
  230. package/development/sidebar/icon-sidebar-button/icon-sidebar-button.d.ts +19 -0
  231. package/development/sidebar/icon-sidebar-button/icon-sidebar-button.d.ts.map +1 -0
  232. package/development/sidebar/icon-sidebar-button.d.ts +2 -0
  233. package/development/sidebar/icon-sidebar-button.d.ts.map +1 -0
  234. package/development/sidebar/icon-sidebar-button.js +28 -0
  235. package/development/sidebar/icon-sidebar-container/icon-sidebar-container.d.ts +23 -0
  236. package/development/sidebar/icon-sidebar-container/icon-sidebar-container.d.ts.map +1 -0
  237. package/development/sidebar/icon-sidebar-container.d.ts +2 -0
  238. package/development/sidebar/icon-sidebar-container.d.ts.map +1 -0
  239. package/development/sidebar/icon-sidebar-container.js +45 -0
  240. package/development/sidebar/icon-sidebar-content/icon-sidebar-content.d.ts +17 -0
  241. package/development/sidebar/icon-sidebar-content/icon-sidebar-content.d.ts.map +1 -0
  242. package/development/sidebar/icon-sidebar-content.d.ts +2 -0
  243. package/development/sidebar/icon-sidebar-content.d.ts.map +1 -0
  244. package/development/sidebar/icon-sidebar-content.js +34 -0
  245. package/development/sidebar/icon-sidebar-link/icon-sidebar-link.d.ts +19 -0
  246. package/development/sidebar/icon-sidebar-link/icon-sidebar-link.d.ts.map +1 -0
  247. package/development/sidebar/icon-sidebar-link.d.ts +2 -0
  248. package/development/sidebar/icon-sidebar-link.d.ts.map +1 -0
  249. package/development/sidebar/icon-sidebar-link.js +28 -0
  250. package/development/sidebar/icon-sidebar.d.ts +2 -0
  251. package/development/sidebar/icon-sidebar.d.ts.map +1 -0
  252. package/development/sidebar/icon-sidebar.js +85 -0
  253. package/development/sidebar/sidebar/sidebar.d.ts +76 -0
  254. package/development/sidebar/sidebar/sidebar.d.ts.map +1 -0
  255. package/development/sidebar/sidebar-close-button/sidebar-close-button.d.ts +22 -0
  256. package/development/sidebar/sidebar-close-button/sidebar-close-button.d.ts.map +1 -0
  257. package/development/sidebar/sidebar-close-button.d.ts +2 -0
  258. package/development/sidebar/sidebar-close-button.d.ts.map +1 -0
  259. package/development/sidebar/sidebar-close-button.js +55 -0
  260. package/development/sidebar/sidebar-container/sidebar-container.d.ts +34 -0
  261. package/development/sidebar/sidebar-container/sidebar-container.d.ts.map +1 -0
  262. package/development/sidebar/sidebar-container.d.ts +2 -0
  263. package/development/sidebar/sidebar-container.d.ts.map +1 -0
  264. package/development/sidebar/sidebar-container.js +153 -0
  265. package/development/sidebar/sidebar-content/sidebar-content.d.ts +18 -0
  266. package/development/sidebar/sidebar-content/sidebar-content.d.ts.map +1 -0
  267. package/development/sidebar/sidebar-content.d.ts +2 -0
  268. package/development/sidebar/sidebar-content.d.ts.map +1 -0
  269. package/development/sidebar/sidebar-content.js +37 -0
  270. package/development/sidebar/sidebar-title/sidebar-title.d.ts +17 -0
  271. package/development/sidebar/sidebar-title/sidebar-title.d.ts.map +1 -0
  272. package/development/sidebar/sidebar-title.d.ts +2 -0
  273. package/development/sidebar/sidebar-title.d.ts.map +1 -0
  274. package/development/sidebar/sidebar-title.js +63 -0
  275. package/development/sidebar/sidebar.d.ts +2 -0
  276. package/development/sidebar/sidebar.d.ts.map +1 -0
  277. package/development/sidebar/sidebar.js +523 -0
  278. package/development/sidebar.d.ts +12 -0
  279. package/development/sidebar.d.ts.map +1 -0
  280. package/development/sidebar.js +12 -0
  281. package/development/stepper/step/step.d.ts +0 -2
  282. package/development/stepper/step/step.d.ts.map +1 -1
  283. package/development/stepper/step.js +19 -23
  284. package/development/stepper/stepper/stepper.d.ts +11 -0
  285. package/development/stepper/stepper/stepper.d.ts.map +1 -1
  286. package/development/stepper/stepper.js +30 -3
  287. package/development/tag/tag/tag.d.ts +11 -0
  288. package/development/tag/tag/tag.d.ts.map +1 -1
  289. package/development/tag/tag-group/tag-group.d.ts +1 -1
  290. package/development/tag/tag-group/tag-group.d.ts.map +1 -1
  291. package/development/tag/tag-group.js +9 -3
  292. package/development/tag/tag.js +37 -10
  293. package/development/teaser-product/common/teaser-product-common.d.ts.map +1 -1
  294. package/development/time-input/time-input.d.ts +3 -2
  295. package/development/time-input/time-input.d.ts.map +1 -1
  296. package/development/time-input.js +19 -10
  297. package/development/title/title-base.d.ts +2 -4
  298. package/development/title/title-base.d.ts.map +1 -1
  299. package/development/title/title.d.ts +3 -1
  300. package/development/title/title.d.ts.map +1 -1
  301. package/development/title.js +8 -8
  302. package/dialog/dialog/dialog.d.ts.map +1 -1
  303. package/dialog/dialog-title/dialog-title.d.ts +3 -1
  304. package/dialog/dialog-title/dialog-title.d.ts.map +1 -1
  305. package/dialog/dialog-title.js +16 -15
  306. package/dialog/dialog.js +2 -2
  307. package/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
  308. package/expansion-panel/expansion-panel.js +1 -1
  309. package/file-selector/common/file-selector-common.d.ts.map +1 -1
  310. package/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
  311. package/flip-card/flip-card-details.js +14 -13
  312. package/form-field/form-field/form-field.d.ts +1 -1
  313. package/form-field/form-field/form-field.d.ts.map +1 -1
  314. package/form-field/form-field.js +30 -24
  315. package/header/common/header-action-common.d.ts.map +1 -1
  316. package/header/common.js +6 -6
  317. package/icon/icon-name-mixin.d.ts.map +1 -1
  318. package/icon/icon-request.d.ts.map +1 -1
  319. package/icon/icon-validate.d.ts.map +1 -1
  320. package/index.d.ts +22 -0
  321. package/index.js +22 -0
  322. package/link/common/block-link-common.d.ts.map +1 -1
  323. package/link/common/inline-link-common.d.ts.map +1 -1
  324. package/link/common/link-common.d.ts.map +1 -1
  325. package/link/common.js +12 -12
  326. package/menu/common/menu-action-common.d.ts.map +1 -1
  327. package/menu/menu/menu.d.ts +1 -1
  328. package/menu/menu/menu.d.ts.map +1 -1
  329. package/menu/menu.js +26 -35
  330. package/navigation/common/navigation-action-common.d.ts.map +1 -1
  331. package/navigation/navigation/navigation.d.ts +1 -3
  332. package/navigation/navigation/navigation.d.ts.map +1 -1
  333. package/navigation/navigation.js +47 -56
  334. package/overlay/overlay-base-element.d.ts +2 -2
  335. package/overlay/overlay-base-element.d.ts.map +1 -1
  336. package/overlay/overlay.d.ts.map +1 -1
  337. package/overlay.js +58 -64
  338. package/package.json +66 -1
  339. package/paginator/common/paginator-common.d.ts.map +1 -1
  340. package/popover/popover/popover.d.ts +1 -1
  341. package/popover/popover/popover.d.ts.map +1 -1
  342. package/popover/popover.js +101 -110
  343. package/radio-button/common/radio-button-common.d.ts.map +1 -1
  344. package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
  345. package/radio-button/radio-button-group.js +1 -1
  346. package/select/select.d.ts +3 -1
  347. package/select/select.d.ts.map +1 -1
  348. package/select.js +39 -37
  349. package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
  350. package/selection-expansion-panel.js +1 -1
  351. package/sidebar/common.d.ts +1 -0
  352. package/sidebar/common.d.ts.map +1 -0
  353. package/sidebar/common.js +7 -0
  354. package/sidebar/icon-sidebar/icon-sidebar.d.ts +23 -0
  355. package/sidebar/icon-sidebar/icon-sidebar.d.ts.map +1 -0
  356. package/sidebar/icon-sidebar-button/icon-sidebar-button.d.ts +19 -0
  357. package/sidebar/icon-sidebar-button/icon-sidebar-button.d.ts.map +1 -0
  358. package/sidebar/icon-sidebar-button.d.ts +2 -0
  359. package/sidebar/icon-sidebar-button.d.ts.map +1 -0
  360. package/sidebar/icon-sidebar-button.js +20 -0
  361. package/sidebar/icon-sidebar-container/icon-sidebar-container.d.ts +23 -0
  362. package/sidebar/icon-sidebar-container/icon-sidebar-container.d.ts.map +1 -0
  363. package/sidebar/icon-sidebar-container.d.ts +2 -0
  364. package/sidebar/icon-sidebar-container.d.ts.map +1 -0
  365. package/sidebar/icon-sidebar-container.js +35 -0
  366. package/sidebar/icon-sidebar-content/icon-sidebar-content.d.ts +17 -0
  367. package/sidebar/icon-sidebar-content/icon-sidebar-content.d.ts.map +1 -0
  368. package/sidebar/icon-sidebar-content.d.ts +2 -0
  369. package/sidebar/icon-sidebar-content.d.ts.map +1 -0
  370. package/sidebar/icon-sidebar-content.js +23 -0
  371. package/sidebar/icon-sidebar-link/icon-sidebar-link.d.ts +19 -0
  372. package/sidebar/icon-sidebar-link/icon-sidebar-link.d.ts.map +1 -0
  373. package/sidebar/icon-sidebar-link.d.ts +2 -0
  374. package/sidebar/icon-sidebar-link.d.ts.map +1 -0
  375. package/sidebar/icon-sidebar-link.js +20 -0
  376. package/sidebar/icon-sidebar.d.ts +2 -0
  377. package/sidebar/icon-sidebar.d.ts.map +1 -0
  378. package/sidebar/icon-sidebar.js +47 -0
  379. package/sidebar/sidebar/sidebar.d.ts +76 -0
  380. package/sidebar/sidebar/sidebar.d.ts.map +1 -0
  381. package/sidebar/sidebar-close-button/sidebar-close-button.d.ts +22 -0
  382. package/sidebar/sidebar-close-button/sidebar-close-button.d.ts.map +1 -0
  383. package/sidebar/sidebar-close-button.d.ts +2 -0
  384. package/sidebar/sidebar-close-button.d.ts.map +1 -0
  385. package/sidebar/sidebar-close-button.js +29 -0
  386. package/sidebar/sidebar-container/sidebar-container.d.ts +34 -0
  387. package/sidebar/sidebar-container/sidebar-container.d.ts.map +1 -0
  388. package/sidebar/sidebar-container.d.ts +2 -0
  389. package/sidebar/sidebar-container.d.ts.map +1 -0
  390. package/sidebar/sidebar-container.js +78 -0
  391. package/sidebar/sidebar-content/sidebar-content.d.ts +18 -0
  392. package/sidebar/sidebar-content/sidebar-content.d.ts.map +1 -0
  393. package/sidebar/sidebar-content.d.ts +2 -0
  394. package/sidebar/sidebar-content.d.ts.map +1 -0
  395. package/sidebar/sidebar-content.js +23 -0
  396. package/sidebar/sidebar-title/sidebar-title.d.ts +17 -0
  397. package/sidebar/sidebar-title/sidebar-title.d.ts.map +1 -0
  398. package/sidebar/sidebar-title.d.ts +2 -0
  399. package/sidebar/sidebar-title.d.ts.map +1 -0
  400. package/sidebar/sidebar-title.js +37 -0
  401. package/sidebar/sidebar.d.ts +2 -0
  402. package/sidebar/sidebar.d.ts.map +1 -0
  403. package/sidebar/sidebar.js +214 -0
  404. package/sidebar.d.ts +12 -0
  405. package/sidebar.d.ts.map +1 -0
  406. package/sidebar.js +11 -0
  407. package/standard-theme.css +53 -3
  408. package/stepper/step/step.d.ts +0 -2
  409. package/stepper/step/step.d.ts.map +1 -1
  410. package/stepper/step.js +23 -35
  411. package/stepper/stepper/stepper.d.ts +11 -0
  412. package/stepper/stepper/stepper.d.ts.map +1 -1
  413. package/stepper/stepper.js +59 -41
  414. package/tag/tag/tag.d.ts +11 -0
  415. package/tag/tag/tag.d.ts.map +1 -1
  416. package/tag/tag-group/tag-group.d.ts +1 -1
  417. package/tag/tag-group/tag-group.d.ts.map +1 -1
  418. package/tag/tag-group.js +32 -29
  419. package/tag/tag.js +60 -41
  420. package/teaser-product/common/teaser-product-common.d.ts.map +1 -1
  421. package/time-input/time-input.d.ts +3 -2
  422. package/time-input/time-input.d.ts.map +1 -1
  423. package/time-input.js +44 -36
  424. package/title/title-base.d.ts +2 -4
  425. package/title/title-base.d.ts.map +1 -1
  426. package/title/title.d.ts +3 -1
  427. package/title/title.d.ts.map +1 -1
  428. package/title.js +11 -11
@@ -1,7 +1,7 @@
1
- import { isServer as n } from "lit";
2
- import { readConfig as b } from "./config.js";
3
- import { S as f, i as m, h as v } from "../sbb-tokens-BgDF8jIh.js";
4
- class S {
1
+ import { isServer as a } from "lit";
2
+ import { readConfig as f } from "./config.js";
3
+ import { S as v, i as m, h as g } from "../sbb-tokens-BgDF8jIh.js";
4
+ class w {
5
5
  get signal() {
6
6
  var t;
7
7
  return (t = this._abortController) == null ? void 0 : t.signal;
@@ -17,17 +17,14 @@ class S {
17
17
  (t = this._abortController) == null || t.abort(), this._abortController = void 0;
18
18
  }
19
19
  }
20
- const g = ["script", "head", "template", "style"], y = /* @__PURE__ */ new Set(), A = /* @__PURE__ */ new Set();
20
+ const y = ["script", "head", "template", "style"], p = /* @__PURE__ */ new Set(), A = /* @__PURE__ */ new Set();
21
21
  class O {
22
- constructor(t, e = y, i = A) {
23
- var s, o;
24
- this._host = t, this._inertElements = e, this._inertOverlays = i, (o = (s = this._host).addController) == null || o.call(s, this);
25
- }
26
- hostConnected() {
27
- this._host.isOpen && this.activate();
22
+ constructor(t, e = p, r = A) {
23
+ var s, n;
24
+ this._host = t, this._inertElements = e, this._inertOverlays = r, (n = (s = this._host).addController) == null || n.call(s, this);
28
25
  }
29
26
  hostDisconnected() {
30
- this._inertOverlays.has(this._host) && this.deactivate();
27
+ this.isInert() && this.deactivate();
31
28
  }
32
29
  /** Applies inert state to every other element on the page except the overlay. */
33
30
  activate() {
@@ -41,6 +38,10 @@ class O {
41
38
  }
42
39
  this._removeInertAttributes(), this._inertOverlays.delete(this._host), this._inertOverlays.size && this._addInertAttributes();
43
40
  }
41
+ /** Whether the assigned host is currently inert */
42
+ isInert() {
43
+ return this._inertOverlays.has(this._host);
44
+ }
44
45
  _currentOverlay() {
45
46
  return [...this._inertOverlays].pop() ?? null;
46
47
  }
@@ -50,23 +51,23 @@ class O {
50
51
  }), this._inertElements.clear();
51
52
  }
52
53
  _addInertAttributes() {
53
- var e, i;
54
+ var e, r;
54
55
  let t = this._currentOverlay();
55
56
  for (; t !== document.documentElement && t !== null; )
56
- Array.from(((e = (t == null ? void 0 : t.parentElement) ?? (t == null ? void 0 : t.getRootNode())) == null ? void 0 : e.childNodes) ?? []).filter((s) => s !== t && s instanceof window.HTMLElement && !g.includes(s.localName)).forEach((s) => {
57
+ Array.from(((e = (t == null ? void 0 : t.parentElement) ?? (t == null ? void 0 : t.getRootNode())) == null ? void 0 : e.childNodes) ?? []).filter((s) => s !== t && s instanceof window.HTMLElement && !y.includes(s.localName)).forEach((s) => {
57
58
  this._inertElements.add(s), s.inert || (s.inert = !0, s.toggleAttribute("data-sbb-inert", !0)), s.hasAttribute("aria-hidden") || (s.setAttribute("aria-hidden", "true"), s.toggleAttribute("data-sbb-aria-hidden", !0));
58
- }), t = (t == null ? void 0 : t.parentElement) ?? ((i = t == null ? void 0 : t.getRootNode()) == null ? void 0 : i.host) ?? null;
59
+ }), t = (t == null ? void 0 : t.parentElement) ?? ((r = t == null ? void 0 : t.getRootNode()) == null ? void 0 : r.host) ?? null;
59
60
  }
60
61
  }
61
- const r = class r {
62
+ const i = class i {
62
63
  /** Get the current language. */
63
64
  static get current() {
64
- const e = ((b().language ?? (n ? r._defaultLanguage : document.documentElement.getAttribute("lang"))) || r._defaultLanguage).split("-")[0];
65
- return r._supportedLocales.includes(e) ? e : r._defaultLanguage;
65
+ const e = ((f().language ?? (a ? i._defaultLanguage : document.documentElement.getAttribute("lang"))) || i._defaultLanguage).split("-")[0];
66
+ return i._supportedLocales.includes(e) ? e : i._defaultLanguage;
66
67
  }
67
68
  /** Get the current language. */
68
69
  get current() {
69
- return r.current;
70
+ return i.current;
70
71
  }
71
72
  constructor(t) {
72
73
  this._host = t, this._handlers = [], this._host.addController(this);
@@ -76,24 +77,24 @@ const r = class r {
76
77
  return this._handlers.unshift(t), this;
77
78
  }
78
79
  hostConnected() {
79
- n || (r._listeners.size || r._observer.observe(document.documentElement, r._observerConfig), r._listeners.add(this), this._previousLanguage !== this.current && this._callHandlers(this._previousLanguage !== void 0));
80
+ a || (i._listeners.size || i._observer.observe(document.documentElement, i._observerConfig), i._listeners.add(this), this._previousLanguage !== this.current && this._callHandlers(this._previousLanguage !== void 0));
80
81
  }
81
82
  hostDisconnected() {
82
- n || (this._previousLanguage = this.current, r._listeners.delete(this), r._listeners.size || r._observer.disconnect());
83
+ a || (this._previousLanguage = this.current, i._listeners.delete(this), i._listeners.size || i._observer.disconnect());
83
84
  }
84
85
  _callHandlers(t = !0) {
85
86
  this._handlers.forEach((e) => e()), t && this._host.requestUpdate();
86
87
  }
87
88
  };
88
- r._defaultLanguage = "en", r._supportedLocales = ["en", "de", "fr", "it"], r._listeners = /* @__PURE__ */ new Set(), r._observer = n ? null : new MutationObserver((t) => {
89
- t[0].oldValue !== document.documentElement.getAttribute("lang") && r._listeners.forEach((e) => e._callHandlers());
90
- }), r._observerConfig = {
89
+ i._defaultLanguage = "en", i._supportedLocales = ["en", "de", "fr", "it"], i._listeners = /* @__PURE__ */ new Set(), i._observer = a ? null : new MutationObserver((t) => {
90
+ t[0].oldValue !== document.documentElement.getAttribute("lang") && i._listeners.forEach((e) => e._callHandlers());
91
+ }), i._observerConfig = {
91
92
  attributeFilter: ["lang"],
92
93
  attributeOldValue: !0
93
94
  };
94
- let u = r;
95
- const _ = (a) => a / f, w = "(forced-colors: active)", M = "(any-hover: hover)", N = "(pointer: coarse)", Q = `(min-width: ${_(v)}rem)`, H = `(max-width: ${_(m)}rem)`, l = /* @__PURE__ */ new Map();
96
- class L {
95
+ let u = i;
96
+ const _ = (o) => o / v, M = "(forced-colors: active)", k = "(any-hover: hover)", I = "(pointer: coarse)", L = `(min-width: ${_(g)}rem)`, N = `(max-width: ${_(m)}rem)`, l = /* @__PURE__ */ new Map();
97
+ class Q {
97
98
  constructor(t, e) {
98
99
  this._queries = e, t.addController(this);
99
100
  }
@@ -103,34 +104,59 @@ class L {
103
104
  * @returns Whether the query matches or null with SSR.
104
105
  */
105
106
  matches(t) {
106
- if (n)
107
+ if (a)
107
108
  return null;
108
109
  const e = l.get(t);
109
110
  return e ? e.mediaQueryList.matches : matchMedia(t).matches;
110
111
  }
111
112
  hostConnected() {
112
- if (!n)
113
+ if (!a)
113
114
  for (const [t, e] of Object.entries(this._queries)) {
114
- const i = l.get(t);
115
- if (i)
116
- i.handlers.add(e);
115
+ const r = l.get(t);
116
+ if (r)
117
+ r.handlers.add(e);
117
118
  else {
118
- const s = matchMedia(t), o = /* @__PURE__ */ new Set([e]), h = (d) => o.forEach((c) => c(d.matches));
119
- s.addEventListener("change", h), l.set(t, { mediaQueryList: s, handlers: o, eventHandler: h });
119
+ const s = matchMedia(t), n = /* @__PURE__ */ new Set([e]), h = (d) => n.forEach((c) => c(d.matches));
120
+ s.addEventListener("change", h), l.set(t, { mediaQueryList: s, handlers: n, eventHandler: h });
120
121
  }
121
122
  }
122
123
  }
123
124
  hostDisconnected() {
124
125
  for (const [t, e] of Object.entries(this._queries)) {
125
- const i = l.get(t);
126
- i && (i.handlers.delete(e), i.handlers.size || l.delete(t));
126
+ const r = l.get(t);
127
+ r && (r.handlers.delete(e), r.handlers.size || l.delete(t));
128
+ }
129
+ }
130
+ }
131
+ const b = new Array();
132
+ a || window.addEventListener("keydown", (o) => {
133
+ var t;
134
+ o.key === "Escape" && !o.defaultPrevented && (o.preventDefault(), (t = b.at(-1)) == null || t.close());
135
+ });
136
+ class H {
137
+ constructor(t, e = b) {
138
+ var r, s;
139
+ this._host = t, this._overlayStack = e, (s = (r = this._host).addController) == null || s.call(r, this);
140
+ }
141
+ hostDisconnected() {
142
+ this.disconnect();
143
+ }
144
+ // This must be called when the overlay is opened
145
+ connect() {
146
+ this._overlayStack.push(this._host);
147
+ }
148
+ // This must be called when the overlay is closed
149
+ disconnect() {
150
+ if (this._overlayStack.length) {
151
+ const t = this._overlayStack.findIndex((e) => e === this._host);
152
+ t !== -1 && this._overlayStack.splice(t, 1);
127
153
  }
128
154
  }
129
155
  }
130
- class I {
156
+ class D {
131
157
  constructor(t, e = null) {
132
- this._host = t, this._onChangeCallback = e, this.slots = /* @__PURE__ */ new Set(), this._slotchangeHandler = (i) => {
133
- this._syncSlots(i.target);
158
+ this._host = t, this._onChangeCallback = e, this.slots = /* @__PURE__ */ new Set(), this._slotchangeHandler = (r) => {
159
+ this._syncSlots(r.target);
134
160
  }, this._host.addController(this);
135
161
  }
136
162
  hostConnected() {
@@ -143,26 +169,27 @@ class I {
143
169
  }
144
170
  _syncSlots(...t) {
145
171
  var s;
146
- for (const o of t) {
147
- const h = o.name || "unnamed";
148
- o.assignedNodes().some((d) => {
172
+ for (const n of t) {
173
+ const h = n.name || "unnamed";
174
+ n.assignedNodes().some((d) => {
149
175
  var c;
150
176
  return "tagName" in d || ((c = d.textContent) == null ? void 0 : c.trim());
151
177
  }) ? this.slots.add(h) : this.slots.delete(h);
152
178
  }
153
- const e = this._host.getAttribute("data-slot-names"), i = [...this.slots].sort().join(" ");
154
- i ? this._host.getAttribute("data-slot-names") !== i && this._host.setAttribute("data-slot-names", i) : this._host.removeAttribute("data-slot-names"), i !== e && ((s = this._onChangeCallback) == null || s.call(this));
179
+ const e = this._host.getAttribute("data-slot-names"), r = [...this.slots].sort().join(" ");
180
+ r ? this._host.getAttribute("data-slot-names") !== r && this._host.setAttribute("data-slot-names", r) : this._host.removeAttribute("data-slot-names"), r !== e && ((s = this._onChangeCallback) == null || s.call(this));
155
181
  }
156
182
  }
157
183
  export {
158
- S as SbbConnectedAbortController,
184
+ w as SbbConnectedAbortController,
185
+ H as SbbEscapableOverlayController,
159
186
  O as SbbInertController,
160
187
  u as SbbLanguageController,
161
- L as SbbMediaMatcherController,
162
- Q as SbbMediaQueryBreakpointMediumAndAbove,
163
- H as SbbMediaQueryBreakpointSmallAndBelow,
164
- w as SbbMediaQueryForcedColors,
165
- M as SbbMediaQueryHover,
166
- N as SbbMediaQueryPointerCoarse,
167
- I as SbbSlotStateController
188
+ Q as SbbMediaMatcherController,
189
+ L as SbbMediaQueryBreakpointMediumAndAbove,
190
+ N as SbbMediaQueryBreakpointSmallAndBelow,
191
+ M as SbbMediaQueryForcedColors,
192
+ k as SbbMediaQueryHover,
193
+ I as SbbMediaQueryPointerCoarse,
194
+ D as SbbSlotStateController
168
195
  };
@@ -1,8 +1,10 @@
1
1
  export declare const DAYS_PER_ROW: number;
2
2
  export declare const MONTHS_PER_ROW: number;
3
3
  export declare const YEARS_PER_ROW: number;
4
+ export declare const MONTHS_PER_PAGE: number;
4
5
  export declare const YEARS_PER_PAGE: number;
5
6
  export declare const FORMAT_DATE: RegExp;
7
+ export declare const ISO8601_FORMAT_DATE: RegExp;
6
8
  /**
7
9
  * Abstract date functionality.
8
10
  *
@@ -109,14 +111,14 @@ export declare abstract class DateAdapter<T = any> {
109
111
  * @param value The date in the format DD.MM.YYYY.
110
112
  * @param now The current date as Date.
111
113
  */
112
- abstract parse(value: string | null | undefined, now: T): T | null;
114
+ abstract parse(value: string | null | undefined, now?: T): T | null;
113
115
  /**
114
116
  * Format the given date as string.
115
117
  * @param date The date to format.
116
118
  * @param options options object with weekdayStyle as property
117
119
  */
118
120
  format(date: T | null | undefined, options?: {
119
- weekdayStyle?: 'long' | 'short' | 'narrow';
121
+ weekdayStyle?: 'long' | 'short' | 'narrow' | 'none';
120
122
  }): string;
121
123
  /**
122
124
  * Checks whether the given `obj` is a Date.
@@ -1 +1 @@
1
- {"version":3,"file":"date-adapter.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/datetime/date-adapter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAU,CAAC;AACtC,eAAO,MAAM,cAAc,EAAE,MAAU,CAAC;AACxC,eAAO,MAAM,aAAa,EAAE,MAAU,CAAC;AACvC,eAAO,MAAM,cAAc,EAAE,MAAW,CAAC;AACzC,eAAO,MAAM,WAAW,QACgE,CAAC;AAEzF;;;;GAIG;AACH,8BAAsB,WAAW,CAAC,CAAC,GAAG,GAAG;IACvC;;;OAGG;aACa,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAExC;;;;OAIG;aACa,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAEzC;;;OAGG;aACa,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAExC;;;OAGG;aACa,YAAY,CAAC,IAAI,EAAE,CA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CAS7D"}
@@ -57,7 +57,7 @@ export declare class NativeDateAdapter extends DateAdapter<Date> {
57
57
  /** Creates a Date from a valid input (Date, string or number in seconds). */
58
58
  deserialize(date: SbbDateLike | null | undefined): Date | null;
59
59
  /** Returns the right format for the `valueAsDate` property. */
60
- parse(value: string | null | undefined, now: Date): Date | null;
60
+ parse(value: string | null | undefined, now?: Date): Date | null;
61
61
  invalid(): Date;
62
62
  /**
63
63
  * Creates an array with the given length and fills it by mapping with the provided function.
@@ -1 +1 @@
1
- {"version":3,"file":"native-date-adapter.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/datetime/native-date-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAU7D,qBAAa,iBAAkB,SAAQ,WAAW,CAAC,IAAI,CAAC;IACtD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;gBAExB,gBAAgB,GAAE,MAAW;IAKhD,uCAAuC;IAChC,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIlC,wCAAwC;IACjC,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAInC,sCAAsC;IAC/B,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIlC,kDAAkD;IAC3C,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIvC,yCAAyC;IAClC,0BAA0B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM;IAS9D;;;;OAIG;IACI,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,EAAE;IAKlE,iGAAiG;IAC1F,YAAY,IAAI,MAAM,EAAE;IAK/B;;;;OAIG;IACI,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,EAAE;IAM/D,iBAAiB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I,EAAE,IAAI,GAAG,IAAI;IAI9B;;;;OAIG;IACI,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAIxD;;;;OAIG;IACI,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ1D,yFAAyF;IAClF,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAKtD,6EAA6E;IAC7D,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI;IAkB9E,+DAA+D;IACxD,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,GAAE,IAAmB,GAAG,IAAI,GAAG,IAAI;IAkCrE,OAAO,IAAI,IAAI;IAI/B;;;;OAIG;IACH,OAAO,CAAC,MAAM;IAId,gEAAgE;IAChE,OAAO,CAAC,uBAAuB;CAShC;AAED,eAAO,MAAM,kBAAkB,mBAA0B,CAAC"}
package/core/datetime.js CHANGED
@@ -1,6 +1,6 @@
1
- import { SbbLanguageController as i } from "./controllers.js";
2
- const o = 7, f = 4, m = 4, d = 24, l = /(^0?[1-9]?|[12]?[0-9]?|3?[01]?)[.,\\/\-\s](0?[1-9]?|1?[0-2]?)?[.,\\/\-\s](\d{1,4}$)?/;
3
- class u {
1
+ import { SbbLanguageController as o } from "./controllers.js";
2
+ const l = 7, w = 4, y = 4, O = 12, M = 24, D = /(^0?[1-9]?|[12]?[0-9]?|3?[01]?)[.,\\/\-\s](0?[1-9]?|1?[0-2]?)?[.,\\/\-\s](\d{1,4}$)?/, c = /^(\d{4})-(\d{2})-(\d{2})$/;
3
+ class g {
4
4
  /**
5
5
  * Attempts to deserialize a value to a valid date object. This is different from parsing in that
6
6
  * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
@@ -20,20 +20,23 @@ class u {
20
20
  format(t, e) {
21
21
  if (!this.isValid(t))
22
22
  return "";
23
- const r = /* @__PURE__ */ new Date(this.toIso8601(t) + "T00:00:00"), n = new Intl.DateTimeFormat("de-CH", {
23
+ const r = /* @__PURE__ */ new Date(this.toIso8601(t) + "T00:00:00"), a = new Intl.DateTimeFormat("de-CH", {
24
24
  day: "2-digit",
25
25
  month: "2-digit",
26
26
  year: "numeric"
27
- }), a = (e == null ? void 0 : e.weekdayStyle) ?? "short";
28
- let s = this.getDayOfWeekNames(a)[this.getDayOfWeek(t)];
29
- return s = s.charAt(0).toUpperCase() + s.substring(1), a === "short" && (s = s.substring(0, 2)), `${s}, ${n.format(r)}`;
27
+ });
28
+ if ((e == null ? void 0 : e.weekdayStyle) === "none")
29
+ return a.format(r);
30
+ const s = (e == null ? void 0 : e.weekdayStyle) ?? "short";
31
+ let n = this.getDayOfWeekNames(s)[this.getDayOfWeek(t)];
32
+ return n = n.charAt(0).toUpperCase() + n.substring(1), s === "short" && (n = n.substring(0, 2)), `${n}, ${a.format(r)}`;
30
33
  }
31
34
  /**
32
35
  * Get the given date as ISO String.
33
36
  * @param date The date to convert to ISO String.
34
37
  */
35
38
  toIso8601(t) {
36
- const e = (r, n = 2) => `${r}`.padStart(n, "0");
39
+ const e = (r, a = 2) => `${r}`.padStart(a, "0");
37
40
  return `${e(this.getYear(t), 4)}-${e(this.getMonth(t))}-${e(this.getDate(t))}`;
38
41
  }
39
42
  /**
@@ -50,7 +53,7 @@ class u {
50
53
  */
51
54
  getFirstWeekOffset(t) {
52
55
  const e = this.createDate(this.getYear(t), this.getMonth(t), 1);
53
- return (o + this.getDayOfWeek(e) - this.getFirstDayOfWeek()) % o;
56
+ return (l + this.getDayOfWeek(e) - this.getFirstDayOfWeek()) % l;
54
57
  }
55
58
  /**
56
59
  * Compares two dates.
@@ -71,8 +74,8 @@ class u {
71
74
  */
72
75
  sameDate(t, e) {
73
76
  if (t && e) {
74
- const r = this.isValid(t), n = this.isValid(e);
75
- return r && n ? !this.compareDate(t, e) : r == n;
77
+ const r = this.isValid(t), a = this.isValid(e);
78
+ return r && a ? !this.compareDate(t, e) : r == a;
76
79
  }
77
80
  return t == e;
78
81
  }
@@ -88,8 +91,8 @@ class u {
88
91
  return e && this.compareDate(t, e) < 0 ? e : r && this.compareDate(t, r) > 0 ? r : t;
89
92
  }
90
93
  }
91
- const D = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;
92
- class g extends u {
94
+ const f = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;
95
+ class d extends g {
93
96
  constructor(t = 15) {
94
97
  super(), this._cutoffYearOffset = t;
95
98
  }
@@ -116,7 +119,7 @@ class g extends u {
116
119
  month: "long",
117
120
  day: "numeric"
118
121
  };
119
- return new Intl.DateTimeFormat(i.current, e).format(new Date(t));
122
+ return new Intl.DateTimeFormat(o.current, e).format(new Date(t));
120
123
  }
121
124
  /**
122
125
  * Creates an array of strings with length = 12, filled with the name of the months starting from January, in the document language.
@@ -124,12 +127,12 @@ class g extends u {
124
127
  * E.g., with January in en-gb: `long` returns "January", `short` returns "Jan", `narrow` returns "J".
125
128
  */
126
129
  getMonthNames(t) {
127
- const e = new Intl.DateTimeFormat(i.current, { month: t });
130
+ const e = new Intl.DateTimeFormat(o.current, { month: t });
128
131
  return this._range(12, (r) => e.format(new Date(2017, r, 1)));
129
132
  }
130
133
  /** Creates a string array with length = 31, filled with the days in a month, starting from 1. */
131
134
  getDateNames() {
132
- const t = new Intl.DateTimeFormat(i.current, { day: "numeric" });
135
+ const t = new Intl.DateTimeFormat(o.current, { day: "numeric" });
133
136
  return this._range(31, (e) => t.format(new Date(2017, 0, e + 1)));
134
137
  }
135
138
  /**
@@ -138,7 +141,7 @@ class g extends u {
138
141
  * E.g., with Monday in en-gb: `long` returns "Monday", `short` returns "Mon", `narrow` returns "M".
139
142
  */
140
143
  getDayOfWeekNames(t) {
141
- const e = new Intl.DateTimeFormat(i.current, { weekday: t });
144
+ const e = new Intl.DateTimeFormat(o.current, { weekday: t });
142
145
  return this._range(7, (r) => e.format(new Date(2017, 0, r + 1)));
143
146
  }
144
147
  /* Defines which is the first day of the week (0: sunday; 1: monday; etc.). */
@@ -159,10 +162,10 @@ class g extends u {
159
162
  throw Error(`Invalid month index "${e}". Month index has to be between 1 and 12.`);
160
163
  if (r < 1)
161
164
  throw Error(`Invalid date "${r}". Date has to be greater than 0.`);
162
- const n = this._createDateWithOverflow(t, e - 1, r);
163
- if (n.getMonth() + 1 !== e)
165
+ const a = this._createDateWithOverflow(t, e - 1, r);
166
+ if (a.getMonth() + 1 !== e)
164
167
  throw Error(`Invalid date "${r}" for month with index "${e}".`);
165
- return n;
168
+ return a;
166
169
  }
167
170
  /** Checks whether the given `obj` is a Date. */
168
171
  isDateInstance(t) {
@@ -190,8 +193,8 @@ class g extends u {
190
193
  * E.g., with `date` = new Date(2022, 0, 31) and `months` = 1, it returns new Date(2022, 1, 28).
191
194
  */
192
195
  addCalendarMonths(t, e) {
193
- const r = t.getMonth() + e, n = new Date(t.getFullYear(), r, 1, 0, 0, 0, 0), a = this.getNumDaysInMonth(n);
194
- return new Date(this.clone(t).setMonth(r, Math.min(a, t.getDate())));
196
+ const r = t.getMonth() + e, a = new Date(t.getFullYear(), r, 1, 0, 0, 0, 0), s = this.getNumDaysInMonth(a);
197
+ return new Date(this.clone(t).setMonth(r, Math.min(s, t.getDate())));
195
198
  }
196
199
  /** Creates a new date by adding the number of provided `days` to the provided `date`. */
197
200
  addCalendarDays(t, e) {
@@ -203,7 +206,7 @@ class g extends u {
203
206
  if (typeof t == "string")
204
207
  if (t)
205
208
  if (Number.isNaN(+t)) {
206
- if (D.test(t))
209
+ if (f.test(t))
207
210
  return this.getValidDateOrNull(new Date(t.includes("T") ? t : t + "T00:00:00"));
208
211
  } else return this.getValidDateOrNull(new Date(+t * 1e3));
209
212
  else return null;
@@ -212,18 +215,21 @@ class g extends u {
212
215
  return super.deserialize(t);
213
216
  }
214
217
  /** Returns the right format for the `valueAsDate` property. */
215
- parse(t, e) {
218
+ parse(t, e = this.today()) {
216
219
  if (!t)
217
220
  return null;
218
- const r = t.replace(/\D/g, " ").trim(), n = r == null ? void 0 : r.match(l);
219
- if (!n || n.index !== 0 || n.length <= 2 || n.some((s) => s === void 0) || !this.isValid(this.createDate(+n[3], +n[2], +n[1])))
221
+ const r = t.match(c), a = r ? this.createDate(+r[1], +r[2], +r[3]) : null;
222
+ if (this.isValid(a))
223
+ return a;
224
+ const s = t.replace(/\D/g, " ").trim(), n = s == null ? void 0 : s.match(D);
225
+ if (!n || n.index !== 0 || n.length <= 2 || n.some((h) => h === void 0) || !this.isValid(this.createDate(+n[3], +n[2], +n[1])))
220
226
  return null;
221
- let a = +n[3];
222
- if (typeof a == "number" && a < 100 && a >= 0) {
223
- const s = e.getFullYear() - 2e3 + this._cutoffYearOffset;
224
- a = a <= s ? 2e3 + a : 1900 + a;
227
+ let i = +n[3];
228
+ if (typeof i == "number" && i < 100 && i >= 0) {
229
+ const h = e.getFullYear() - 2e3 + this._cutoffYearOffset;
230
+ i = i <= h ? 2e3 + i : 1900 + i;
225
231
  }
226
- return new Date(a, +n[2] - 1, +n[1]);
232
+ return new Date(i, +n[2] - 1, +n[1]);
227
233
  }
228
234
  invalid() {
229
235
  return /* @__PURE__ */ new Date(NaN);
@@ -234,22 +240,24 @@ class g extends u {
234
240
  * @param valueFunction The function of array's index used to fill the array.
235
241
  */
236
242
  _range(t, e) {
237
- return Array.from({ length: t }).map((r, n) => e(n));
243
+ return Array.from({ length: t }).map((r, a) => e(a));
238
244
  }
239
245
  /** Creates a date but allows the month and date to overflow. */
240
246
  _createDateWithOverflow(t, e, r) {
241
- const n = new Date(t, e, r);
242
- return t >= 0 && t < 100 && n.setFullYear(this.getYear(n) - 1900), n;
247
+ const a = new Date(t, e, r);
248
+ return t >= 0 && t < 100 && a.setFullYear(this.getYear(a) - 1900), a;
243
249
  }
244
250
  }
245
- const w = new g();
251
+ const _ = new d();
246
252
  export {
247
- o as DAYS_PER_ROW,
248
- u as DateAdapter,
249
- l as FORMAT_DATE,
250
- f as MONTHS_PER_ROW,
251
- g as NativeDateAdapter,
252
- d as YEARS_PER_PAGE,
253
- m as YEARS_PER_ROW,
254
- w as defaultDateAdapter
253
+ l as DAYS_PER_ROW,
254
+ g as DateAdapter,
255
+ D as FORMAT_DATE,
256
+ c as ISO8601_FORMAT_DATE,
257
+ O as MONTHS_PER_PAGE,
258
+ w as MONTHS_PER_ROW,
259
+ d as NativeDateAdapter,
260
+ M as YEARS_PER_PAGE,
261
+ y as YEARS_PER_ROW,
262
+ _ as defaultDateAdapter
255
263
  };
@@ -0,0 +1,8 @@
1
+ import { ComplexAttributeConverter } from 'lit';
2
+ /**
3
+ * Converts empty values to null, which will not be rendered as attributes.
4
+ * e.g. for string properties, an empty value '' will not be rendered as an
5
+ * empty attribute, as would be the default with lit.
6
+ */
7
+ export declare const dateConverter: ComplexAttributeConverter;
8
+ //# sourceMappingURL=date-converter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-converter.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/date-converter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,KAAK,CAAC;AAKrD;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,yBAS3B,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Converts the given value to a date object or null.
3
+ * Should be used as a type hint for the @property decorator.
4
+ * @param value The value to convert to a date object.
5
+ * @returns A date object or null.
6
+ */
7
+ export declare function DateOnlyType(value: unknown): unknown | null;
8
+ //# sourceMappingURL=date-only-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-only-type.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/date-only-type.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAS3D"}
@@ -4,5 +4,5 @@ import { Interface, PropertyDecorator } from './base.js';
4
4
  * Decorator that forces the value of a property or getter/setter
5
5
  * to the defined type.
6
6
  */
7
- export declare const forceType: <C extends Interface<ReactiveElement>, V>() => PropertyDecorator;
7
+ export declare const forceType: <C extends Interface<ReactiveElement>, V>(convert?: (v: unknown) => V) => PropertyDecorator;
8
8
  //# sourceMappingURL=force-type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"force-type.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/force-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,OAAK,iBAsCrE,CAAC"}
1
+ {"version":3,"file":"force-type.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/force-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,EAC/D,UAAU,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAC1B,iBAwCF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-override.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/get-override.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,YACvD,CAAC,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,CAAC,cAGjC,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,WACjC,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,KAC3C,GAeJ,CAAC"}
1
+ {"version":3,"file":"get-override.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/get-override.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,EACjE,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,CAAC,MAGzC,QAAQ,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EAC1C,SAAS,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,KAC3C,GAeJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"handle-distinct-change.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/handle-distinct-change.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,YAChE,CAAC,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,SAAS,KAAK,IAAI,cAG3D,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,WACjC,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,KAC3C,GAiBJ,CAAC"}
1
+ {"version":3,"file":"handle-distinct-change.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/handle-distinct-change.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,EAC1E,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,SAAS,KAAK,IAAI,MAGnE,QAAQ,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EAC1C,SAAS,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,KAC3C,GAiBJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"host-attributes.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/host-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,KAAK,CAAC;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAexD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,eACZ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,cAAc,mBAAmB,CAAC,eAAe,CAAC,SAoBxF,CAAC"}
1
+ {"version":3,"file":"host-attributes.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/host-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,KAAK,CAAC;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAexD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,GACxB,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,MAAM,QAAQ,mBAAmB,CAAC,eAAe,CAAC,SAoBxF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"slot-state.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/slot-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,KAAK,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,iBAAkB,mBAAmB,CAAC,eAAe,CAAC,SAM3E,CAAC"}
1
+ {"version":3,"file":"slot-state.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/decorators/slot-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,KAAK,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,SAAU,QAAQ,mBAAmB,CAAC,eAAe,CAAC,SAM3E,CAAC"}
@@ -1,3 +1,5 @@
1
+ export * from './decorators/date-converter.js';
2
+ export * from './decorators/date-only-type.js';
1
3
  export * from './decorators/force-type.js';
2
4
  export * from './decorators/get-override.js';
3
5
  export * from './decorators/handle-distinct-change.js';
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../src/elements/core/decorators.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../src/elements/core/decorators.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC"}