@sbb-esta/lyne-elements-dev 4.7.0-dev.1773396933 → 4.7.0-dev.1773397316

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 (2) hide show
  1. package/custom-elements.json +794 -794
  2. package/package.json +2 -2
@@ -30977,46 +30977,228 @@
30977
30977
  },
30978
30978
  {
30979
30979
  "kind": "javascript-module",
30980
- "path": "title/title-base.js",
30980
+ "path": "timetable-occupancy-icon/timetable-occupancy-icon.component.js",
30981
30981
  "declarations": [
30982
30982
  {
30983
30983
  "kind": "class",
30984
- "description": "It displays a title with a heading role.",
30985
- "name": "SbbTitleBase",
30984
+ "description": "It displays a wagon's occupancy icon.",
30985
+ "name": "SbbTimetableOccupancyIconElement",
30986
30986
  "members": [
30987
30987
  {
30988
30988
  "kind": "field",
30989
- "name": "role",
30989
+ "name": "elementName",
30990
30990
  "type": {
30991
30991
  "text": "string"
30992
30992
  },
30993
30993
  "privacy": "public",
30994
30994
  "static": true,
30995
- "default": "'heading'"
30995
+ "readonly": true,
30996
+ "inheritedFrom": {
30997
+ "name": "SbbElement",
30998
+ "module": "core/base-elements/element.js"
30999
+ },
31000
+ "default": "'sbb-timetable-occupancy-icon'"
30996
31001
  },
30997
31002
  {
30998
31003
  "kind": "field",
30999
- "name": "level",
31004
+ "name": "occupancy",
31000
31005
  "type": {
31001
- "text": "SbbTitleLevel"
31006
+ "text": "SbbOccupancy"
31002
31007
  },
31003
31008
  "privacy": "public",
31004
- "default": "'1'",
31005
- "description": "Title level",
31006
- "attribute": "level",
31007
- "reflects": true
31009
+ "default": "'none'",
31010
+ "description": "Wagon occupancy.",
31011
+ "attribute": "occupancy"
31008
31012
  },
31009
31013
  {
31010
31014
  "kind": "field",
31011
- "name": "visualLevel",
31015
+ "name": "_language",
31016
+ "privacy": "private"
31017
+ },
31018
+ {
31019
+ "kind": "field",
31020
+ "name": "_mediaMatcher",
31021
+ "privacy": "private",
31022
+ "default": "new SbbMediaMatcherController(this, { [SbbMediaQueryForcedColors]: (matches) => { this._forcedColors = matches; this._setNameAndAriaLabel(); }, })"
31023
+ },
31024
+ {
31025
+ "kind": "field",
31026
+ "name": "_darkModeController",
31027
+ "privacy": "private",
31028
+ "default": "new SbbDarkModeController(this, () => this._setNameAndAriaLabel())"
31029
+ },
31030
+ {
31031
+ "kind": "field",
31032
+ "name": "_forcedColors",
31012
31033
  "type": {
31013
- "text": "SbbTitleLevel | null"
31034
+ "text": "boolean"
31035
+ },
31036
+ "privacy": "private"
31037
+ },
31038
+ {
31039
+ "kind": "method",
31040
+ "name": "_setNameAndAriaLabel",
31041
+ "privacy": "private",
31042
+ "return": {
31043
+ "type": {
31044
+ "text": "Promise<void>"
31045
+ }
31046
+ }
31047
+ },
31048
+ {
31049
+ "kind": "method",
31050
+ "name": "fetchSvgIcon",
31051
+ "privacy": "protected",
31052
+ "return": {
31053
+ "type": {
31054
+ "text": "Promise<string>"
31055
+ }
31056
+ },
31057
+ "parameters": [
31058
+ {
31059
+ "name": "namespace",
31060
+ "type": {
31061
+ "text": "string"
31062
+ }
31063
+ },
31064
+ {
31065
+ "name": "name",
31066
+ "type": {
31067
+ "text": "string"
31068
+ }
31069
+ }
31070
+ ],
31071
+ "inheritedFrom": {
31072
+ "name": "SbbIconBase",
31073
+ "module": "icon/icon-base.js"
31074
+ }
31075
+ },
31076
+ {
31077
+ "kind": "method",
31078
+ "name": "_setAriaLabel",
31079
+ "privacy": "private",
31080
+ "return": {
31081
+ "type": {
31082
+ "text": "void"
31083
+ }
31084
+ }
31085
+ },
31086
+ {
31087
+ "kind": "field",
31088
+ "name": "negative",
31089
+ "type": {
31090
+ "text": "boolean"
31091
+ },
31092
+ "privacy": "public",
31093
+ "default": "false",
31094
+ "description": "Negative coloring variant flag.",
31095
+ "attribute": "negative",
31096
+ "reflects": true,
31097
+ "inheritedFrom": {
31098
+ "name": "SbbNegativeMixin",
31099
+ "module": "core/mixins/negative-mixin.js"
31100
+ }
31101
+ },
31102
+ {
31103
+ "kind": "field",
31104
+ "name": "role",
31105
+ "type": {
31106
+ "text": "string"
31014
31107
  },
31015
31108
  "privacy": "public",
31109
+ "static": true,
31110
+ "readonly": true,
31111
+ "default": "'img'",
31112
+ "inheritedFrom": {
31113
+ "name": "SbbIconBase",
31114
+ "module": "icon/icon-base.js"
31115
+ }
31116
+ },
31117
+ {
31118
+ "kind": "field",
31119
+ "name": "_svgNamespace",
31120
+ "privacy": "private",
31121
+ "default": "'default'",
31122
+ "type": {
31123
+ "text": "string"
31124
+ },
31125
+ "inheritedFrom": {
31126
+ "name": "SbbIconBase",
31127
+ "module": "icon/icon-base.js"
31128
+ }
31129
+ },
31130
+ {
31131
+ "kind": "field",
31132
+ "name": "_svgIcon",
31133
+ "type": {
31134
+ "text": "Promise<DirectiveResult<typeof UnsafeHTMLDirective>> | null"
31135
+ },
31136
+ "privacy": "private",
31016
31137
  "default": "null",
31017
- "description": "Visual level for the title.",
31018
- "attribute": "visual-level",
31019
- "reflects": true
31138
+ "description": "The icon svg content rendered on the page: <svg>...</svg>.",
31139
+ "inheritedFrom": {
31140
+ "name": "SbbIconBase",
31141
+ "module": "icon/icon-base.js"
31142
+ }
31143
+ },
31144
+ {
31145
+ "kind": "field",
31146
+ "name": "noSanitize",
31147
+ "type": {
31148
+ "text": "boolean"
31149
+ },
31150
+ "privacy": "public",
31151
+ "default": "false",
31152
+ "description": "When set to `true`, SVG content that is HTTP fetched will not be checked\nif the response SVG content has any `<script>` elements, or any attributes\nthat start with `on`, such as `onclick`.",
31153
+ "attribute": "no-sanitize",
31154
+ "inheritedFrom": {
31155
+ "name": "SbbIconBase",
31156
+ "module": "icon/icon-base.js"
31157
+ }
31158
+ },
31159
+ {
31160
+ "kind": "method",
31161
+ "name": "loadSvgIcon",
31162
+ "privacy": "protected",
31163
+ "return": {
31164
+ "type": {
31165
+ "text": "Promise<void>"
31166
+ }
31167
+ },
31168
+ "parameters": [
31169
+ {
31170
+ "name": "iconName",
31171
+ "type": {
31172
+ "text": "string"
31173
+ }
31174
+ }
31175
+ ],
31176
+ "inheritedFrom": {
31177
+ "name": "SbbIconBase",
31178
+ "module": "icon/icon-base.js"
31179
+ }
31180
+ },
31181
+ {
31182
+ "kind": "method",
31183
+ "name": "_splitIconName",
31184
+ "privacy": "private",
31185
+ "return": {
31186
+ "type": {
31187
+ "text": "[string, string]"
31188
+ }
31189
+ },
31190
+ "parameters": [
31191
+ {
31192
+ "name": "iconName",
31193
+ "type": {
31194
+ "text": "string"
31195
+ }
31196
+ }
31197
+ ],
31198
+ "inheritedFrom": {
31199
+ "name": "SbbIconBase",
31200
+ "module": "icon/icon-base.js"
31201
+ }
31020
31202
  },
31021
31203
  {
31022
31204
  "kind": "field",
@@ -31111,20 +31293,6 @@
31111
31293
  "module": "core/base-elements/element.js"
31112
31294
  }
31113
31295
  },
31114
- {
31115
- "kind": "field",
31116
- "name": "elementName",
31117
- "type": {
31118
- "text": "string"
31119
- },
31120
- "privacy": "public",
31121
- "static": true,
31122
- "readonly": true,
31123
- "inheritedFrom": {
31124
- "name": "SbbElement",
31125
- "module": "core/base-elements/element.js"
31126
- }
31127
- },
31128
31296
  {
31129
31297
  "kind": "field",
31130
31298
  "name": "_controllers",
@@ -31140,109 +31308,95 @@
31140
31308
  ],
31141
31309
  "attributes": [
31142
31310
  {
31143
- "name": "level",
31311
+ "name": "occupancy",
31144
31312
  "type": {
31145
- "text": "SbbTitleLevel"
31313
+ "text": "SbbOccupancy"
31146
31314
  },
31147
- "default": "'1'",
31148
- "description": "Title level",
31149
- "fieldName": "level"
31315
+ "default": "'none'",
31316
+ "description": "Wagon occupancy.",
31317
+ "fieldName": "occupancy"
31150
31318
  },
31151
31319
  {
31152
- "name": "visual-level",
31320
+ "name": "negative",
31153
31321
  "type": {
31154
- "text": "SbbTitleLevel | null"
31322
+ "text": "boolean"
31155
31323
  },
31156
- "default": "null",
31157
- "description": "Visual level for the title.",
31158
- "fieldName": "visualLevel"
31159
- }
31160
- ],
31161
- "superclass": {
31162
- "name": "SbbElement",
31163
- "module": "core/base-elements.js"
31164
- }
31165
- }
31166
- ],
31167
- "exports": [
31168
- {
31169
- "kind": "js",
31170
- "name": "SbbTitleBase",
31171
- "declaration": {
31172
- "name": "SbbTitleBase",
31173
- "module": "title/title-base.js"
31174
- }
31175
- }
31176
- ]
31177
- },
31178
- {
31179
- "kind": "javascript-module",
31180
- "path": "title/title.component.js",
31181
- "declarations": [
31182
- {
31183
- "kind": "class",
31184
- "description": "",
31185
- "name": "SbbTitleElement",
31186
- "cssProperties": [
31324
+ "default": "false",
31325
+ "description": "Negative coloring variant flag.",
31326
+ "fieldName": "negative",
31327
+ "inheritedFrom": {
31328
+ "name": "SbbNegativeMixin",
31329
+ "module": "core/mixins/negative-mixin.js"
31330
+ }
31331
+ },
31187
31332
  {
31188
- "description": "Margin block of the title.",
31189
- "name": "--sbb-title-margin-block"
31333
+ "name": "no-sanitize",
31334
+ "type": {
31335
+ "text": "boolean"
31336
+ },
31337
+ "default": "false",
31338
+ "description": "When set to `true`, SVG content that is HTTP fetched will not be checked\nif the response SVG content has any `<script>` elements, or any attributes\nthat start with `on`, such as `onclick`.",
31339
+ "fieldName": "noSanitize",
31340
+ "inheritedFrom": {
31341
+ "name": "SbbIconBase",
31342
+ "module": "icon/icon-base.js"
31343
+ }
31190
31344
  }
31191
31345
  ],
31192
- "slots": [
31346
+ "mixins": [
31193
31347
  {
31194
- "description": "Use the unnamed slot for the content of the title.",
31195
- "name": ""
31348
+ "name": "SbbNegativeMixin",
31349
+ "module": "core/mixins.js"
31196
31350
  }
31197
31351
  ],
31198
- "members": [
31199
- {
31200
- "kind": "field",
31201
- "name": "elementName",
31202
- "type": {
31203
- "text": "string"
31204
- },
31205
- "privacy": "public",
31206
- "static": true,
31207
- "readonly": true,
31208
- "inheritedFrom": {
31209
- "name": "SbbElement",
31210
- "module": "core/base-elements/element.js"
31211
- },
31212
- "default": "'sbb-title'"
31213
- },
31352
+ "superclass": {
31353
+ "name": "SbbIconBase",
31354
+ "module": "icon.js"
31355
+ },
31356
+ "tagName": "sbb-timetable-occupancy-icon",
31357
+ "customElement": true,
31358
+ "cssProperties": [
31214
31359
  {
31215
- "kind": "field",
31216
- "name": "visualLevel",
31217
- "type": {
31218
- "text": "SbbTitleLevel | null"
31219
- },
31220
- "privacy": "public",
31221
- "default": "null",
31222
- "description": "Visual level for the title. Optional, if not set, the value of level will be used.",
31223
- "attribute": "visual-level",
31224
- "reflects": true,
31360
+ "description": "Can be used to set a custom width.",
31361
+ "name": "--sbb-icon-svg-width",
31362
+ "default": "auto",
31225
31363
  "inheritedFrom": {
31226
- "name": "SbbTitleBase",
31227
- "module": "title/title-base.js"
31364
+ "name": "SbbIconBase",
31365
+ "module": "icon/icon-base.js"
31228
31366
  }
31229
31367
  },
31230
31368
  {
31231
- "kind": "field",
31232
- "name": "negative",
31233
- "type": {
31234
- "text": "boolean"
31235
- },
31236
- "privacy": "public",
31237
- "default": "false",
31238
- "description": "Negative coloring variant flag.",
31239
- "attribute": "negative",
31240
- "reflects": true,
31369
+ "description": "Can be used to set a custom height.",
31370
+ "name": "--sbb-icon-svg-height",
31371
+ "default": "auto",
31241
31372
  "inheritedFrom": {
31242
- "name": "SbbNegativeMixin",
31243
- "module": "core/mixins/negative-mixin.js"
31373
+ "name": "SbbIconBase",
31374
+ "module": "icon/icon-base.js"
31244
31375
  }
31245
- },
31376
+ }
31377
+ ]
31378
+ }
31379
+ ],
31380
+ "exports": [
31381
+ {
31382
+ "kind": "js",
31383
+ "name": "SbbTimetableOccupancyIconElement",
31384
+ "declaration": {
31385
+ "name": "SbbTimetableOccupancyIconElement",
31386
+ "module": "timetable-occupancy-icon/timetable-occupancy-icon.component.js"
31387
+ }
31388
+ }
31389
+ ]
31390
+ },
31391
+ {
31392
+ "kind": "javascript-module",
31393
+ "path": "title/title-base.js",
31394
+ "declarations": [
31395
+ {
31396
+ "kind": "class",
31397
+ "description": "It displays a title with a heading role.",
31398
+ "name": "SbbTitleBase",
31399
+ "members": [
31246
31400
  {
31247
31401
  "kind": "field",
31248
31402
  "name": "role",
@@ -31251,11 +31405,7 @@
31251
31405
  },
31252
31406
  "privacy": "public",
31253
31407
  "static": true,
31254
- "default": "'heading'",
31255
- "inheritedFrom": {
31256
- "name": "SbbTitleBase",
31257
- "module": "title/title-base.js"
31258
- }
31408
+ "default": "'heading'"
31259
31409
  },
31260
31410
  {
31261
31411
  "kind": "field",
@@ -31267,11 +31417,19 @@
31267
31417
  "default": "'1'",
31268
31418
  "description": "Title level",
31269
31419
  "attribute": "level",
31270
- "reflects": true,
31271
- "inheritedFrom": {
31272
- "name": "SbbTitleBase",
31273
- "module": "title/title-base.js"
31274
- }
31420
+ "reflects": true
31421
+ },
31422
+ {
31423
+ "kind": "field",
31424
+ "name": "visualLevel",
31425
+ "type": {
31426
+ "text": "SbbTitleLevel | null"
31427
+ },
31428
+ "privacy": "public",
31429
+ "default": "null",
31430
+ "description": "Visual level for the title.",
31431
+ "attribute": "visual-level",
31432
+ "reflects": true
31275
31433
  },
31276
31434
  {
31277
31435
  "kind": "field",
@@ -31368,44 +31526,32 @@
31368
31526
  },
31369
31527
  {
31370
31528
  "kind": "field",
31371
- "name": "_controllers",
31529
+ "name": "elementName",
31372
31530
  "type": {
31373
- "text": "Set<SbbReactiveController> | undefined"
31531
+ "text": "string"
31374
31532
  },
31375
- "privacy": "private",
31533
+ "privacy": "public",
31534
+ "static": true,
31535
+ "readonly": true,
31376
31536
  "inheritedFrom": {
31377
31537
  "name": "SbbElement",
31378
31538
  "module": "core/base-elements/element.js"
31379
31539
  }
31380
- }
31381
- ],
31382
- "attributes": [
31383
- {
31384
- "name": "visual-level",
31385
- "type": {
31386
- "text": "SbbTitleLevel | null"
31387
- },
31388
- "default": "null",
31389
- "description": "Visual level for the title. Optional, if not set, the value of level will be used.",
31390
- "fieldName": "visualLevel",
31391
- "inheritedFrom": {
31392
- "name": "SbbTitleBase",
31393
- "module": "title/title-base.js"
31394
- }
31395
31540
  },
31396
31541
  {
31397
- "name": "negative",
31542
+ "kind": "field",
31543
+ "name": "_controllers",
31398
31544
  "type": {
31399
- "text": "boolean"
31545
+ "text": "Set<SbbReactiveController> | undefined"
31400
31546
  },
31401
- "default": "false",
31402
- "description": "Negative coloring variant flag.",
31403
- "fieldName": "negative",
31547
+ "privacy": "private",
31404
31548
  "inheritedFrom": {
31405
- "name": "SbbNegativeMixin",
31406
- "module": "core/mixins/negative-mixin.js"
31549
+ "name": "SbbElement",
31550
+ "module": "core/base-elements/element.js"
31407
31551
  }
31408
- },
31552
+ }
31553
+ ],
31554
+ "attributes": [
31409
31555
  {
31410
31556
  "name": "level",
31411
31557
  "type": {
@@ -31413,65 +31559,53 @@
31413
31559
  },
31414
31560
  "default": "'1'",
31415
31561
  "description": "Title level",
31416
- "fieldName": "level",
31417
- "inheritedFrom": {
31418
- "name": "SbbTitleBase",
31419
- "module": "title/title-base.js"
31420
- }
31421
- }
31422
- ],
31423
- "mixins": [
31562
+ "fieldName": "level"
31563
+ },
31424
31564
  {
31425
- "name": "SbbNegativeMixin",
31426
- "module": "core/mixins.js"
31565
+ "name": "visual-level",
31566
+ "type": {
31567
+ "text": "SbbTitleLevel | null"
31568
+ },
31569
+ "default": "null",
31570
+ "description": "Visual level for the title.",
31571
+ "fieldName": "visualLevel"
31427
31572
  }
31428
31573
  ],
31429
31574
  "superclass": {
31430
- "name": "SbbTitleBase",
31431
- "module": "title/title-base.js"
31432
- },
31433
- "tagName": "sbb-title",
31434
- "customElement": true
31575
+ "name": "SbbElement",
31576
+ "module": "core/base-elements.js"
31577
+ }
31435
31578
  }
31436
31579
  ],
31437
31580
  "exports": [
31438
31581
  {
31439
31582
  "kind": "js",
31440
- "name": "SbbTitleElement",
31583
+ "name": "SbbTitleBase",
31441
31584
  "declaration": {
31442
- "name": "SbbTitleElement",
31443
- "module": "title/title.component.js"
31585
+ "name": "SbbTitleBase",
31586
+ "module": "title/title-base.js"
31444
31587
  }
31445
31588
  }
31446
31589
  ]
31447
31590
  },
31448
31591
  {
31449
31592
  "kind": "javascript-module",
31450
- "path": "toast/toast.component.js",
31593
+ "path": "title/title.component.js",
31451
31594
  "declarations": [
31452
31595
  {
31453
31596
  "kind": "class",
31454
- "description": "It displays a toast notification.",
31455
- "name": "SbbToastElement",
31597
+ "description": "",
31598
+ "name": "SbbTitleElement",
31456
31599
  "cssProperties": [
31457
31600
  {
31458
- "description": "To specify a custom stack order, the `z-index` can be overridden by defining this CSS variable. The default `z-index` of the component is set to `var(--sbb-overlay-default-z-index)` with a value of `1000`.",
31459
- "name": "--sbb-toast-z-index",
31460
- "default": "var(--sbb-overlay-default-z-index)"
31601
+ "description": "Margin block of the title.",
31602
+ "name": "--sbb-title-margin-block"
31461
31603
  }
31462
31604
  ],
31463
31605
  "slots": [
31464
31606
  {
31465
- "description": "Use the unnamed slot to add content to the `sbb-toast`.",
31607
+ "description": "Use the unnamed slot for the content of the title.",
31466
31608
  "name": ""
31467
- },
31468
- {
31469
- "description": "Assign a custom icon via slot.",
31470
- "name": "icon"
31471
- },
31472
- {
31473
- "description": "Provide a custom action for this toast.",
31474
- "name": "action"
31475
31609
  }
31476
31610
  ],
31477
31611
  "members": [
@@ -31484,430 +31618,72 @@
31484
31618
  "privacy": "public",
31485
31619
  "static": true,
31486
31620
  "readonly": true,
31487
- "default": "'sbb-toast'",
31488
31621
  "inheritedFrom": {
31489
31622
  "name": "SbbElement",
31490
31623
  "module": "core/base-elements/element.js"
31491
- }
31624
+ },
31625
+ "default": "'sbb-title'"
31492
31626
  },
31493
31627
  {
31494
31628
  "kind": "field",
31495
- "name": "timeout",
31629
+ "name": "visualLevel",
31496
31630
  "type": {
31497
- "text": "number"
31631
+ "text": "SbbTitleLevel | null"
31498
31632
  },
31499
31633
  "privacy": "public",
31500
- "default": "0",
31501
- "description": "The length of time in milliseconds to wait before automatically dismissing the toast.\nIf 0 (default), it stays open indefinitely.\nFrom accessibility perspective, it is recommended to set a timeout of at least 20 seconds.",
31502
- "attribute": "timeout"
31503
- },
31504
- {
31505
- "kind": "field",
31506
- "name": "position",
31507
- "type": {
31508
- "text": "SbbToastPosition"
31509
- },
31510
- "privacy": "public",
31511
- "default": "'bottom-center'",
31512
- "description": "The position where to place the toast.",
31513
- "attribute": "position",
31514
- "reflects": true
31515
- },
31516
- {
31517
- "kind": "field",
31518
- "name": "politeness",
31519
- "type": {
31520
- "text": "'polite' | 'assertive' | 'off'"
31521
- },
31522
- "privacy": "public",
31523
- "default": "'polite'",
31524
- "description": "The ARIA politeness level.\nCheck https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#live_regions for further info",
31525
- "attribute": "politeness"
31526
- },
31527
- {
31528
- "kind": "field",
31529
- "name": "_closeTimeout",
31530
- "type": {
31531
- "text": "ReturnType<typeof setTimeout> | undefined"
31532
- },
31533
- "privacy": "private"
31534
- },
31535
- {
31536
- "kind": "field",
31537
- "name": "_language",
31538
- "privacy": "private",
31539
- "default": "new SbbLanguageController(this)"
31540
- },
31541
- {
31542
- "kind": "field",
31543
- "name": "_darkModeController",
31544
- "privacy": "private",
31545
- "default": "new SbbDarkModeController(this, () => { this._syncSlottedElements(); this.requestUpdate(); })"
31546
- },
31547
- {
31548
- "kind": "method",
31549
- "name": "open",
31550
- "privacy": "public",
31551
- "return": {
31552
- "type": {
31553
- "text": "void"
31554
- }
31555
- },
31556
- "description": "Open the toast.\nIf there are other opened toasts in the page, close them first.",
31557
- "inheritedFrom": {
31558
- "name": "SbbOpenCloseBaseElement",
31559
- "module": "core/base-elements/open-close-base-element.js"
31560
- }
31561
- },
31562
- {
31563
- "kind": "method",
31564
- "name": "close",
31565
- "privacy": "public",
31566
- "return": {
31567
- "type": {
31568
- "text": "void"
31569
- }
31570
- },
31571
- "description": "Close the toast.",
31572
- "inheritedFrom": {
31573
- "name": "SbbOpenCloseBaseElement",
31574
- "module": "core/base-elements/open-close-base-element.js"
31575
- }
31576
- },
31577
- {
31578
- "kind": "method",
31579
- "name": "_handleClosing",
31580
- "privacy": "private",
31581
- "return": {
31582
- "type": {
31583
- "text": "void"
31584
- }
31585
- }
31586
- },
31587
- {
31588
- "kind": "method",
31589
- "name": "_handleOpening",
31590
- "privacy": "private",
31591
- "return": {
31592
- "type": {
31593
- "text": "void"
31594
- }
31595
- }
31596
- },
31597
- {
31598
- "kind": "method",
31599
- "name": "_onClick",
31600
- "privacy": "private",
31601
- "return": {
31602
- "type": {
31603
- "text": "void"
31604
- }
31605
- },
31606
- "parameters": [
31607
- {
31608
- "name": "event",
31609
- "type": {
31610
- "text": "Event"
31611
- }
31612
- }
31613
- ]
31614
- },
31615
- {
31616
- "kind": "method",
31617
- "name": "_isZeroAnimationDuration",
31618
- "privacy": "private",
31619
- "return": {
31620
- "type": {
31621
- "text": "boolean"
31622
- }
31623
- }
31624
- },
31625
- {
31626
- "kind": "method",
31627
- "name": "_onContentSlotChange",
31628
- "privacy": "private",
31629
- "return": {
31630
- "type": {
31631
- "text": "void"
31632
- }
31633
- },
31634
- "parameters": [
31635
- {
31636
- "name": "event",
31637
- "type": {
31638
- "text": "Event"
31639
- }
31640
- }
31641
- ],
31642
- "description": "Slotted text nodes are not read correctly by screen readers on Chrome.\nTo address the problem, if there is at least a root text node,\nwe wrap the whole content in a <span> tag"
31643
- },
31644
- {
31645
- "kind": "method",
31646
- "name": "_syncSlottedElements",
31647
- "privacy": "private",
31648
- "return": {
31649
- "type": {
31650
- "text": "void"
31651
- }
31652
- }
31653
- },
31654
- {
31655
- "kind": "method",
31656
- "name": "_onToastAnimationEnd",
31657
- "privacy": "private",
31658
- "return": {
31659
- "type": {
31660
- "text": "void"
31661
- }
31662
- },
31663
- "parameters": [
31664
- {
31665
- "name": "event",
31666
- "type": {
31667
- "text": "AnimationEvent"
31668
- }
31669
- }
31670
- ]
31671
- },
31672
- {
31673
- "kind": "method",
31674
- "name": "_closeOtherToasts",
31675
- "privacy": "private",
31676
- "return": {
31677
- "type": {
31678
- "text": "void"
31679
- }
31680
- },
31681
- "description": "Since we do not stack toasts, we force the closing on other existing opened ones"
31682
- },
31683
- {
31684
- "kind": "method",
31685
- "name": "_isLightMode",
31686
- "privacy": "private",
31687
- "return": {
31688
- "type": {
31689
- "text": "boolean"
31690
- }
31691
- }
31692
- },
31693
- {
31694
- "kind": "field",
31695
- "name": "iconName",
31696
- "type": {
31697
- "text": "string"
31698
- },
31699
- "privacy": "public",
31700
- "default": "''",
31701
- "description": "The icon name we want to use, choose from the small icon variants\nfrom the ui-icons category from here\nhttps://icons.app.sbb.ch.",
31702
- "attribute": "icon-name",
31703
- "inheritedFrom": {
31704
- "name": "SbbIconNameMixin",
31705
- "module": "icon/icon-name-mixin.js"
31706
- }
31707
- },
31708
- {
31709
- "kind": "method",
31710
- "name": "renderIconSlot",
31711
- "privacy": "protected",
31712
- "return": {
31713
- "type": {
31714
- "text": "TemplateResult"
31715
- }
31716
- },
31717
- "parameters": [
31718
- {
31719
- "name": "classname",
31720
- "optional": true,
31721
- "type": {
31722
- "text": "string"
31723
- }
31724
- }
31725
- ],
31726
- "inheritedFrom": {
31727
- "name": "SbbIconNameMixin",
31728
- "module": "icon/icon-name-mixin.js"
31729
- }
31730
- },
31731
- {
31732
- "kind": "method",
31733
- "name": "renderIconName",
31734
- "privacy": "protected",
31735
- "return": {
31736
- "type": {
31737
- "text": "string"
31738
- }
31739
- },
31740
- "inheritedFrom": {
31741
- "name": "SbbIconNameMixin",
31742
- "module": "icon/icon-name-mixin.js"
31743
- }
31744
- },
31745
- {
31746
- "kind": "method",
31747
- "name": "_renderIconName",
31748
- "privacy": "private",
31749
- "return": {
31750
- "type": {
31751
- "text": "string"
31752
- }
31753
- },
31754
- "inheritedFrom": {
31755
- "name": "SbbIconNameMixin",
31756
- "module": "icon/icon-name-mixin.js"
31757
- }
31758
- },
31759
- {
31760
- "kind": "field",
31761
- "name": "readOnly",
31762
- "privacy": "public",
31763
- "description": "Whether the component is readonly.",
31764
- "default": "false",
31765
- "type": {
31766
- "text": "boolean"
31767
- },
31768
- "attribute": "readonly",
31769
- "inheritedFrom": {
31770
- "name": "SbbReadonlyMixin",
31771
- "module": "core/mixins/readonly-mixin.js"
31772
- }
31773
- },
31774
- {
31775
- "kind": "field",
31776
- "name": "#readOnly",
31777
- "privacy": "private",
31778
- "type": {
31779
- "text": "boolean"
31780
- },
31781
- "default": "false",
31782
- "inheritedFrom": {
31783
- "name": "SbbReadonlyMixin",
31784
- "module": "core/mixins/readonly-mixin.js"
31785
- }
31786
- },
31787
- {
31788
- "kind": "field",
31789
- "name": "events",
31790
- "privacy": "public",
31791
- "static": true,
31792
- "readonly": true,
31793
- "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
31794
- "type": {
31795
- "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
31796
- },
31797
- "inheritedFrom": {
31798
- "name": "SbbOpenCloseBaseElement",
31799
- "module": "core/base-elements/open-close-base-element.js"
31800
- }
31801
- },
31802
- {
31803
- "kind": "field",
31804
- "name": "state",
31805
- "privacy": "protected",
31806
- "description": "The state of the component.",
31807
- "type": {
31808
- "text": "SbbOpenedClosedState"
31809
- },
31810
- "default": "'closed'",
31634
+ "default": "null",
31635
+ "description": "Visual level for the title. Optional, if not set, the value of level will be used.",
31636
+ "attribute": "visual-level",
31637
+ "reflects": true,
31811
31638
  "inheritedFrom": {
31812
- "name": "SbbOpenCloseBaseElement",
31813
- "module": "core/base-elements/open-close-base-element.js"
31639
+ "name": "SbbTitleBase",
31640
+ "module": "title/title-base.js"
31814
31641
  }
31815
31642
  },
31816
31643
  {
31817
31644
  "kind": "field",
31818
- "name": "_state",
31645
+ "name": "negative",
31819
31646
  "type": {
31820
- "text": "SbbOpenedClosedState"
31647
+ "text": "boolean"
31821
31648
  },
31822
- "privacy": "private",
31649
+ "privacy": "public",
31650
+ "default": "false",
31651
+ "description": "Negative coloring variant flag.",
31652
+ "attribute": "negative",
31653
+ "reflects": true,
31823
31654
  "inheritedFrom": {
31824
- "name": "SbbOpenCloseBaseElement",
31825
- "module": "core/base-elements/open-close-base-element.js"
31655
+ "name": "SbbNegativeMixin",
31656
+ "module": "core/mixins/negative-mixin.js"
31826
31657
  }
31827
31658
  },
31828
31659
  {
31829
31660
  "kind": "field",
31830
- "name": "isOpen",
31661
+ "name": "role",
31831
31662
  "type": {
31832
- "text": "boolean"
31663
+ "text": "string"
31833
31664
  },
31834
31665
  "privacy": "public",
31835
- "description": "Whether the element is open.",
31836
- "readonly": true,
31837
- "inheritedFrom": {
31838
- "name": "SbbOpenCloseBaseElement",
31839
- "module": "core/base-elements/open-close-base-element.js"
31840
- }
31841
- },
31842
- {
31843
- "kind": "method",
31844
- "name": "escapeStrategy",
31845
- "privacy": "public",
31846
- "return": {
31847
- "type": {
31848
- "text": "void"
31849
- }
31850
- },
31851
- "description": "The method which is called on escape key press. Defaults to calling close()",
31852
- "inheritedFrom": {
31853
- "name": "SbbOpenCloseBaseElement",
31854
- "module": "core/base-elements/open-close-base-element.js"
31855
- }
31856
- },
31857
- {
31858
- "kind": "method",
31859
- "name": "dispatchBeforeOpenEvent",
31860
- "privacy": "protected",
31861
- "return": {
31862
- "type": {
31863
- "text": "boolean"
31864
- }
31865
- },
31866
- "inheritedFrom": {
31867
- "name": "SbbOpenCloseBaseElement",
31868
- "module": "core/base-elements/open-close-base-element.js"
31869
- }
31870
- },
31871
- {
31872
- "kind": "method",
31873
- "name": "dispatchOpenEvent",
31874
- "privacy": "protected",
31875
- "return": {
31876
- "type": {
31877
- "text": "boolean"
31878
- }
31879
- },
31880
- "inheritedFrom": {
31881
- "name": "SbbOpenCloseBaseElement",
31882
- "module": "core/base-elements/open-close-base-element.js"
31883
- }
31884
- },
31885
- {
31886
- "kind": "method",
31887
- "name": "dispatchBeforeCloseEvent",
31888
- "privacy": "protected",
31889
- "return": {
31890
- "type": {
31891
- "text": "boolean"
31892
- }
31893
- },
31666
+ "static": true,
31667
+ "default": "'heading'",
31894
31668
  "inheritedFrom": {
31895
- "name": "SbbOpenCloseBaseElement",
31896
- "module": "core/base-elements/open-close-base-element.js"
31669
+ "name": "SbbTitleBase",
31670
+ "module": "title/title-base.js"
31897
31671
  }
31898
31672
  },
31899
31673
  {
31900
- "kind": "method",
31901
- "name": "dispatchCloseEvent",
31902
- "privacy": "protected",
31903
- "return": {
31904
- "type": {
31905
- "text": "boolean"
31906
- }
31674
+ "kind": "field",
31675
+ "name": "level",
31676
+ "type": {
31677
+ "text": "SbbTitleLevel"
31907
31678
  },
31679
+ "privacy": "public",
31680
+ "default": "'1'",
31681
+ "description": "Title level",
31682
+ "attribute": "level",
31683
+ "reflects": true,
31908
31684
  "inheritedFrom": {
31909
- "name": "SbbOpenCloseBaseElement",
31910
- "module": "core/base-elements/open-close-base-element.js"
31685
+ "name": "SbbTitleBase",
31686
+ "module": "title/title-base.js"
31911
31687
  }
31912
31688
  },
31913
31689
  {
@@ -32018,142 +31794,99 @@
32018
31794
  ],
32019
31795
  "attributes": [
32020
31796
  {
32021
- "name": "timeout",
32022
- "type": {
32023
- "text": "number"
32024
- },
32025
- "default": "0",
32026
- "description": "The length of time in milliseconds to wait before automatically dismissing the toast.\nIf 0 (default), it stays open indefinitely.\nFrom accessibility perspective, it is recommended to set a timeout of at least 20 seconds.",
32027
- "fieldName": "timeout"
32028
- },
32029
- {
32030
- "name": "position",
32031
- "type": {
32032
- "text": "SbbToastPosition"
32033
- },
32034
- "default": "'bottom-center'",
32035
- "description": "The position where to place the toast.",
32036
- "fieldName": "position"
32037
- },
32038
- {
32039
- "name": "politeness",
31797
+ "name": "visual-level",
32040
31798
  "type": {
32041
- "text": "'polite' | 'assertive' | 'off'"
31799
+ "text": "SbbTitleLevel | null"
32042
31800
  },
32043
- "default": "'polite'",
32044
- "description": "The ARIA politeness level.\nCheck https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#live_regions for further info",
32045
- "fieldName": "politeness"
31801
+ "default": "null",
31802
+ "description": "Visual level for the title. Optional, if not set, the value of level will be used.",
31803
+ "fieldName": "visualLevel",
31804
+ "inheritedFrom": {
31805
+ "name": "SbbTitleBase",
31806
+ "module": "title/title-base.js"
31807
+ }
32046
31808
  },
32047
31809
  {
32048
- "name": "icon-name",
31810
+ "name": "negative",
32049
31811
  "type": {
32050
- "text": "string"
31812
+ "text": "boolean"
32051
31813
  },
32052
- "default": "''",
32053
- "description": "The icon name we want to use, choose from the small icon variants\nfrom the ui-icons category from here\nhttps://icons.app.sbb.ch.",
32054
- "fieldName": "iconName",
31814
+ "default": "false",
31815
+ "description": "Negative coloring variant flag.",
31816
+ "fieldName": "negative",
32055
31817
  "inheritedFrom": {
32056
- "name": "SbbIconNameMixin",
32057
- "module": "icon/icon-name-mixin.js"
31818
+ "name": "SbbNegativeMixin",
31819
+ "module": "core/mixins/negative-mixin.js"
32058
31820
  }
32059
31821
  },
32060
31822
  {
32061
- "name": "readonly",
32062
- "description": "Whether the component is readonly.",
32063
- "default": "false",
31823
+ "name": "level",
32064
31824
  "type": {
32065
- "text": "boolean"
31825
+ "text": "SbbTitleLevel"
32066
31826
  },
32067
- "fieldName": "readOnly",
31827
+ "default": "'1'",
31828
+ "description": "Title level",
31829
+ "fieldName": "level",
32068
31830
  "inheritedFrom": {
32069
- "name": "SbbReadonlyMixin",
32070
- "module": "core/mixins/readonly-mixin.js"
31831
+ "name": "SbbTitleBase",
31832
+ "module": "title/title-base.js"
32071
31833
  }
32072
31834
  }
32073
31835
  ],
32074
31836
  "mixins": [
32075
31837
  {
32076
- "name": "SbbIconNameMixin",
32077
- "module": "icon.js"
32078
- },
32079
- {
32080
- "name": "SbbReadonlyMixin",
31838
+ "name": "SbbNegativeMixin",
32081
31839
  "module": "core/mixins.js"
32082
31840
  }
32083
31841
  ],
32084
31842
  "superclass": {
32085
- "name": "SbbOpenCloseBaseElement",
32086
- "module": "core/base-elements.js"
31843
+ "name": "SbbTitleBase",
31844
+ "module": "title/title-base.js"
32087
31845
  },
32088
- "tagName": "sbb-toast",
32089
- "customElement": true,
32090
- "events": [
32091
- {
32092
- "name": "beforeopen",
32093
- "type": {
32094
- "text": "Event"
32095
- },
32096
- "description": "Emits whenever the component starts the opening transition. Can be canceled.",
32097
- "inheritedFrom": {
32098
- "name": "SbbOpenCloseBaseElement",
32099
- "module": "core/base-elements/open-close-base-element.js"
32100
- }
32101
- },
32102
- {
32103
- "name": "open",
32104
- "type": {
32105
- "text": "Event"
32106
- },
32107
- "description": "Emits whenever the component is opened.",
32108
- "inheritedFrom": {
32109
- "name": "SbbOpenCloseBaseElement",
32110
- "module": "core/base-elements/open-close-base-element.js"
32111
- }
32112
- },
32113
- {
32114
- "name": "beforeclose",
32115
- "type": {
32116
- "text": "Event"
32117
- },
32118
- "description": "Emits whenever the component begins the closing transition. Can be canceled.",
32119
- "inheritedFrom": {
32120
- "name": "SbbOpenCloseBaseElement",
32121
- "module": "core/base-elements/open-close-base-element.js"
32122
- }
32123
- },
32124
- {
32125
- "name": "close",
32126
- "type": {
32127
- "text": "Event"
32128
- },
32129
- "description": "Emits whenever the component is closed.",
32130
- "inheritedFrom": {
32131
- "name": "SbbOpenCloseBaseElement",
32132
- "module": "core/base-elements/open-close-base-element.js"
32133
- }
32134
- }
32135
- ]
31846
+ "tagName": "sbb-title",
31847
+ "customElement": true
32136
31848
  }
32137
31849
  ],
32138
31850
  "exports": [
32139
31851
  {
32140
31852
  "kind": "js",
32141
- "name": "SbbToastElement",
31853
+ "name": "SbbTitleElement",
32142
31854
  "declaration": {
32143
- "name": "SbbToastElement",
32144
- "module": "toast/toast.component.js"
31855
+ "name": "SbbTitleElement",
31856
+ "module": "title/title.component.js"
32145
31857
  }
32146
31858
  }
32147
31859
  ]
32148
31860
  },
32149
31861
  {
32150
31862
  "kind": "javascript-module",
32151
- "path": "timetable-occupancy-icon/timetable-occupancy-icon.component.js",
31863
+ "path": "toast/toast.component.js",
32152
31864
  "declarations": [
32153
31865
  {
32154
31866
  "kind": "class",
32155
- "description": "It displays a wagon's occupancy icon.",
32156
- "name": "SbbTimetableOccupancyIconElement",
31867
+ "description": "It displays a toast notification.",
31868
+ "name": "SbbToastElement",
31869
+ "cssProperties": [
31870
+ {
31871
+ "description": "To specify a custom stack order, the `z-index` can be overridden by defining this CSS variable. The default `z-index` of the component is set to `var(--sbb-overlay-default-z-index)` with a value of `1000`.",
31872
+ "name": "--sbb-toast-z-index",
31873
+ "default": "var(--sbb-overlay-default-z-index)"
31874
+ }
31875
+ ],
31876
+ "slots": [
31877
+ {
31878
+ "description": "Use the unnamed slot to add content to the `sbb-toast`.",
31879
+ "name": ""
31880
+ },
31881
+ {
31882
+ "description": "Assign a custom icon via slot.",
31883
+ "name": "icon"
31884
+ },
31885
+ {
31886
+ "description": "Provide a custom action for this toast.",
31887
+ "name": "action"
31888
+ }
31889
+ ],
32157
31890
  "members": [
32158
31891
  {
32159
31892
  "kind": "field",
@@ -32164,211 +31897,430 @@
32164
31897
  "privacy": "public",
32165
31898
  "static": true,
32166
31899
  "readonly": true,
31900
+ "default": "'sbb-toast'",
32167
31901
  "inheritedFrom": {
32168
31902
  "name": "SbbElement",
32169
31903
  "module": "core/base-elements/element.js"
31904
+ }
31905
+ },
31906
+ {
31907
+ "kind": "field",
31908
+ "name": "timeout",
31909
+ "type": {
31910
+ "text": "number"
32170
31911
  },
32171
- "default": "'sbb-timetable-occupancy-icon'"
31912
+ "privacy": "public",
31913
+ "default": "0",
31914
+ "description": "The length of time in milliseconds to wait before automatically dismissing the toast.\nIf 0 (default), it stays open indefinitely.\nFrom accessibility perspective, it is recommended to set a timeout of at least 20 seconds.",
31915
+ "attribute": "timeout"
32172
31916
  },
32173
31917
  {
32174
31918
  "kind": "field",
32175
- "name": "occupancy",
31919
+ "name": "position",
32176
31920
  "type": {
32177
- "text": "SbbOccupancy"
31921
+ "text": "SbbToastPosition"
32178
31922
  },
32179
31923
  "privacy": "public",
32180
- "default": "'none'",
32181
- "description": "Wagon occupancy.",
32182
- "attribute": "occupancy"
31924
+ "default": "'bottom-center'",
31925
+ "description": "The position where to place the toast.",
31926
+ "attribute": "position",
31927
+ "reflects": true
32183
31928
  },
32184
31929
  {
32185
31930
  "kind": "field",
32186
- "name": "_language",
31931
+ "name": "politeness",
31932
+ "type": {
31933
+ "text": "'polite' | 'assertive' | 'off'"
31934
+ },
31935
+ "privacy": "public",
31936
+ "default": "'polite'",
31937
+ "description": "The ARIA politeness level.\nCheck https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#live_regions for further info",
31938
+ "attribute": "politeness"
31939
+ },
31940
+ {
31941
+ "kind": "field",
31942
+ "name": "_closeTimeout",
31943
+ "type": {
31944
+ "text": "ReturnType<typeof setTimeout> | undefined"
31945
+ },
32187
31946
  "privacy": "private"
32188
31947
  },
32189
31948
  {
32190
31949
  "kind": "field",
32191
- "name": "_mediaMatcher",
31950
+ "name": "_language",
32192
31951
  "privacy": "private",
32193
- "default": "new SbbMediaMatcherController(this, { [SbbMediaQueryForcedColors]: (matches) => { this._forcedColors = matches; this._setNameAndAriaLabel(); }, })"
31952
+ "default": "new SbbLanguageController(this)"
32194
31953
  },
32195
31954
  {
32196
31955
  "kind": "field",
32197
31956
  "name": "_darkModeController",
32198
31957
  "privacy": "private",
32199
- "default": "new SbbDarkModeController(this, () => this._setNameAndAriaLabel())"
31958
+ "default": "new SbbDarkModeController(this, () => { this._syncSlottedElements(); this.requestUpdate(); })"
32200
31959
  },
32201
31960
  {
32202
- "kind": "field",
32203
- "name": "_forcedColors",
32204
- "type": {
32205
- "text": "boolean"
31961
+ "kind": "method",
31962
+ "name": "open",
31963
+ "privacy": "public",
31964
+ "return": {
31965
+ "type": {
31966
+ "text": "void"
31967
+ }
32206
31968
  },
32207
- "privacy": "private"
31969
+ "description": "Open the toast.\nIf there are other opened toasts in the page, close them first.",
31970
+ "inheritedFrom": {
31971
+ "name": "SbbOpenCloseBaseElement",
31972
+ "module": "core/base-elements/open-close-base-element.js"
31973
+ }
32208
31974
  },
32209
31975
  {
32210
31976
  "kind": "method",
32211
- "name": "_setNameAndAriaLabel",
31977
+ "name": "close",
31978
+ "privacy": "public",
31979
+ "return": {
31980
+ "type": {
31981
+ "text": "void"
31982
+ }
31983
+ },
31984
+ "description": "Close the toast.",
31985
+ "inheritedFrom": {
31986
+ "name": "SbbOpenCloseBaseElement",
31987
+ "module": "core/base-elements/open-close-base-element.js"
31988
+ }
31989
+ },
31990
+ {
31991
+ "kind": "method",
31992
+ "name": "_handleClosing",
32212
31993
  "privacy": "private",
32213
31994
  "return": {
32214
31995
  "type": {
32215
- "text": "Promise<void>"
31996
+ "text": "void"
32216
31997
  }
32217
31998
  }
32218
31999
  },
32219
32000
  {
32220
32001
  "kind": "method",
32221
- "name": "fetchSvgIcon",
32222
- "privacy": "protected",
32002
+ "name": "_handleOpening",
32003
+ "privacy": "private",
32223
32004
  "return": {
32224
32005
  "type": {
32225
- "text": "Promise<string>"
32006
+ "text": "void"
32007
+ }
32008
+ }
32009
+ },
32010
+ {
32011
+ "kind": "method",
32012
+ "name": "_onClick",
32013
+ "privacy": "private",
32014
+ "return": {
32015
+ "type": {
32016
+ "text": "void"
32226
32017
  }
32227
32018
  },
32228
32019
  "parameters": [
32229
32020
  {
32230
- "name": "namespace",
32021
+ "name": "event",
32231
32022
  "type": {
32232
- "text": "string"
32023
+ "text": "Event"
32233
32024
  }
32234
- },
32025
+ }
32026
+ ]
32027
+ },
32028
+ {
32029
+ "kind": "method",
32030
+ "name": "_isZeroAnimationDuration",
32031
+ "privacy": "private",
32032
+ "return": {
32033
+ "type": {
32034
+ "text": "boolean"
32035
+ }
32036
+ }
32037
+ },
32038
+ {
32039
+ "kind": "method",
32040
+ "name": "_onContentSlotChange",
32041
+ "privacy": "private",
32042
+ "return": {
32043
+ "type": {
32044
+ "text": "void"
32045
+ }
32046
+ },
32047
+ "parameters": [
32235
32048
  {
32236
- "name": "name",
32049
+ "name": "event",
32050
+ "type": {
32051
+ "text": "Event"
32052
+ }
32053
+ }
32054
+ ],
32055
+ "description": "Slotted text nodes are not read correctly by screen readers on Chrome.\nTo address the problem, if there is at least a root text node,\nwe wrap the whole content in a <span> tag"
32056
+ },
32057
+ {
32058
+ "kind": "method",
32059
+ "name": "_syncSlottedElements",
32060
+ "privacy": "private",
32061
+ "return": {
32062
+ "type": {
32063
+ "text": "void"
32064
+ }
32065
+ }
32066
+ },
32067
+ {
32068
+ "kind": "method",
32069
+ "name": "_onToastAnimationEnd",
32070
+ "privacy": "private",
32071
+ "return": {
32072
+ "type": {
32073
+ "text": "void"
32074
+ }
32075
+ },
32076
+ "parameters": [
32077
+ {
32078
+ "name": "event",
32079
+ "type": {
32080
+ "text": "AnimationEvent"
32081
+ }
32082
+ }
32083
+ ]
32084
+ },
32085
+ {
32086
+ "kind": "method",
32087
+ "name": "_closeOtherToasts",
32088
+ "privacy": "private",
32089
+ "return": {
32090
+ "type": {
32091
+ "text": "void"
32092
+ }
32093
+ },
32094
+ "description": "Since we do not stack toasts, we force the closing on other existing opened ones"
32095
+ },
32096
+ {
32097
+ "kind": "method",
32098
+ "name": "_isLightMode",
32099
+ "privacy": "private",
32100
+ "return": {
32101
+ "type": {
32102
+ "text": "boolean"
32103
+ }
32104
+ }
32105
+ },
32106
+ {
32107
+ "kind": "field",
32108
+ "name": "iconName",
32109
+ "type": {
32110
+ "text": "string"
32111
+ },
32112
+ "privacy": "public",
32113
+ "default": "''",
32114
+ "description": "The icon name we want to use, choose from the small icon variants\nfrom the ui-icons category from here\nhttps://icons.app.sbb.ch.",
32115
+ "attribute": "icon-name",
32116
+ "inheritedFrom": {
32117
+ "name": "SbbIconNameMixin",
32118
+ "module": "icon/icon-name-mixin.js"
32119
+ }
32120
+ },
32121
+ {
32122
+ "kind": "method",
32123
+ "name": "renderIconSlot",
32124
+ "privacy": "protected",
32125
+ "return": {
32126
+ "type": {
32127
+ "text": "TemplateResult"
32128
+ }
32129
+ },
32130
+ "parameters": [
32131
+ {
32132
+ "name": "classname",
32133
+ "optional": true,
32237
32134
  "type": {
32238
32135
  "text": "string"
32239
32136
  }
32240
32137
  }
32241
32138
  ],
32242
32139
  "inheritedFrom": {
32243
- "name": "SbbIconBase",
32244
- "module": "icon/icon-base.js"
32140
+ "name": "SbbIconNameMixin",
32141
+ "module": "icon/icon-name-mixin.js"
32245
32142
  }
32246
32143
  },
32247
32144
  {
32248
32145
  "kind": "method",
32249
- "name": "_setAriaLabel",
32146
+ "name": "renderIconName",
32147
+ "privacy": "protected",
32148
+ "return": {
32149
+ "type": {
32150
+ "text": "string"
32151
+ }
32152
+ },
32153
+ "inheritedFrom": {
32154
+ "name": "SbbIconNameMixin",
32155
+ "module": "icon/icon-name-mixin.js"
32156
+ }
32157
+ },
32158
+ {
32159
+ "kind": "method",
32160
+ "name": "_renderIconName",
32250
32161
  "privacy": "private",
32251
32162
  "return": {
32252
32163
  "type": {
32253
- "text": "void"
32164
+ "text": "string"
32254
32165
  }
32166
+ },
32167
+ "inheritedFrom": {
32168
+ "name": "SbbIconNameMixin",
32169
+ "module": "icon/icon-name-mixin.js"
32170
+ }
32171
+ },
32172
+ {
32173
+ "kind": "field",
32174
+ "name": "readOnly",
32175
+ "privacy": "public",
32176
+ "description": "Whether the component is readonly.",
32177
+ "default": "false",
32178
+ "type": {
32179
+ "text": "boolean"
32180
+ },
32181
+ "attribute": "readonly",
32182
+ "inheritedFrom": {
32183
+ "name": "SbbReadonlyMixin",
32184
+ "module": "core/mixins/readonly-mixin.js"
32255
32185
  }
32256
32186
  },
32257
32187
  {
32258
32188
  "kind": "field",
32259
- "name": "negative",
32189
+ "name": "#readOnly",
32190
+ "privacy": "private",
32260
32191
  "type": {
32261
32192
  "text": "boolean"
32262
32193
  },
32263
- "privacy": "public",
32264
32194
  "default": "false",
32265
- "description": "Negative coloring variant flag.",
32266
- "attribute": "negative",
32267
- "reflects": true,
32268
32195
  "inheritedFrom": {
32269
- "name": "SbbNegativeMixin",
32270
- "module": "core/mixins/negative-mixin.js"
32196
+ "name": "SbbReadonlyMixin",
32197
+ "module": "core/mixins/readonly-mixin.js"
32271
32198
  }
32272
32199
  },
32273
32200
  {
32274
32201
  "kind": "field",
32275
- "name": "role",
32276
- "type": {
32277
- "text": "string"
32278
- },
32202
+ "name": "events",
32279
32203
  "privacy": "public",
32280
32204
  "static": true,
32281
32205
  "readonly": true,
32282
- "default": "'img'",
32206
+ "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
32207
+ "type": {
32208
+ "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
32209
+ },
32283
32210
  "inheritedFrom": {
32284
- "name": "SbbIconBase",
32285
- "module": "icon/icon-base.js"
32211
+ "name": "SbbOpenCloseBaseElement",
32212
+ "module": "core/base-elements/open-close-base-element.js"
32286
32213
  }
32287
32214
  },
32288
32215
  {
32289
32216
  "kind": "field",
32290
- "name": "_svgNamespace",
32291
- "privacy": "private",
32292
- "default": "'default'",
32217
+ "name": "state",
32218
+ "privacy": "protected",
32219
+ "description": "The state of the component.",
32293
32220
  "type": {
32294
- "text": "string"
32221
+ "text": "SbbOpenedClosedState"
32295
32222
  },
32223
+ "default": "'closed'",
32296
32224
  "inheritedFrom": {
32297
- "name": "SbbIconBase",
32298
- "module": "icon/icon-base.js"
32225
+ "name": "SbbOpenCloseBaseElement",
32226
+ "module": "core/base-elements/open-close-base-element.js"
32299
32227
  }
32300
32228
  },
32301
32229
  {
32302
32230
  "kind": "field",
32303
- "name": "_svgIcon",
32231
+ "name": "_state",
32304
32232
  "type": {
32305
- "text": "Promise<DirectiveResult<typeof UnsafeHTMLDirective>> | null"
32233
+ "text": "SbbOpenedClosedState"
32306
32234
  },
32307
32235
  "privacy": "private",
32308
- "default": "null",
32309
- "description": "The icon svg content rendered on the page: <svg>...</svg>.",
32310
32236
  "inheritedFrom": {
32311
- "name": "SbbIconBase",
32312
- "module": "icon/icon-base.js"
32237
+ "name": "SbbOpenCloseBaseElement",
32238
+ "module": "core/base-elements/open-close-base-element.js"
32313
32239
  }
32314
32240
  },
32315
32241
  {
32316
32242
  "kind": "field",
32317
- "name": "noSanitize",
32243
+ "name": "isOpen",
32318
32244
  "type": {
32319
32245
  "text": "boolean"
32320
32246
  },
32321
32247
  "privacy": "public",
32322
- "default": "false",
32323
- "description": "When set to `true`, SVG content that is HTTP fetched will not be checked\nif the response SVG content has any `<script>` elements, or any attributes\nthat start with `on`, such as `onclick`.",
32324
- "attribute": "no-sanitize",
32248
+ "description": "Whether the element is open.",
32249
+ "readonly": true,
32325
32250
  "inheritedFrom": {
32326
- "name": "SbbIconBase",
32327
- "module": "icon/icon-base.js"
32251
+ "name": "SbbOpenCloseBaseElement",
32252
+ "module": "core/base-elements/open-close-base-element.js"
32328
32253
  }
32329
32254
  },
32330
32255
  {
32331
32256
  "kind": "method",
32332
- "name": "loadSvgIcon",
32257
+ "name": "escapeStrategy",
32258
+ "privacy": "public",
32259
+ "return": {
32260
+ "type": {
32261
+ "text": "void"
32262
+ }
32263
+ },
32264
+ "description": "The method which is called on escape key press. Defaults to calling close()",
32265
+ "inheritedFrom": {
32266
+ "name": "SbbOpenCloseBaseElement",
32267
+ "module": "core/base-elements/open-close-base-element.js"
32268
+ }
32269
+ },
32270
+ {
32271
+ "kind": "method",
32272
+ "name": "dispatchBeforeOpenEvent",
32333
32273
  "privacy": "protected",
32334
32274
  "return": {
32335
32275
  "type": {
32336
- "text": "Promise<void>"
32276
+ "text": "boolean"
32337
32277
  }
32338
32278
  },
32339
- "parameters": [
32340
- {
32341
- "name": "iconName",
32342
- "type": {
32343
- "text": "string"
32344
- }
32279
+ "inheritedFrom": {
32280
+ "name": "SbbOpenCloseBaseElement",
32281
+ "module": "core/base-elements/open-close-base-element.js"
32282
+ }
32283
+ },
32284
+ {
32285
+ "kind": "method",
32286
+ "name": "dispatchOpenEvent",
32287
+ "privacy": "protected",
32288
+ "return": {
32289
+ "type": {
32290
+ "text": "boolean"
32345
32291
  }
32346
- ],
32292
+ },
32347
32293
  "inheritedFrom": {
32348
- "name": "SbbIconBase",
32349
- "module": "icon/icon-base.js"
32294
+ "name": "SbbOpenCloseBaseElement",
32295
+ "module": "core/base-elements/open-close-base-element.js"
32350
32296
  }
32351
32297
  },
32352
32298
  {
32353
32299
  "kind": "method",
32354
- "name": "_splitIconName",
32355
- "privacy": "private",
32300
+ "name": "dispatchBeforeCloseEvent",
32301
+ "privacy": "protected",
32356
32302
  "return": {
32357
32303
  "type": {
32358
- "text": "[string, string]"
32304
+ "text": "boolean"
32359
32305
  }
32360
32306
  },
32361
- "parameters": [
32362
- {
32363
- "name": "iconName",
32364
- "type": {
32365
- "text": "string"
32366
- }
32307
+ "inheritedFrom": {
32308
+ "name": "SbbOpenCloseBaseElement",
32309
+ "module": "core/base-elements/open-close-base-element.js"
32310
+ }
32311
+ },
32312
+ {
32313
+ "kind": "method",
32314
+ "name": "dispatchCloseEvent",
32315
+ "privacy": "protected",
32316
+ "return": {
32317
+ "type": {
32318
+ "text": "boolean"
32367
32319
  }
32368
- ],
32320
+ },
32369
32321
  "inheritedFrom": {
32370
- "name": "SbbIconBase",
32371
- "module": "icon/icon-base.js"
32322
+ "name": "SbbOpenCloseBaseElement",
32323
+ "module": "core/base-elements/open-close-base-element.js"
32372
32324
  }
32373
32325
  },
32374
32326
  {
@@ -32479,70 +32431,118 @@
32479
32431
  ],
32480
32432
  "attributes": [
32481
32433
  {
32482
- "name": "occupancy",
32434
+ "name": "timeout",
32483
32435
  "type": {
32484
- "text": "SbbOccupancy"
32436
+ "text": "number"
32485
32437
  },
32486
- "default": "'none'",
32487
- "description": "Wagon occupancy.",
32488
- "fieldName": "occupancy"
32438
+ "default": "0",
32439
+ "description": "The length of time in milliseconds to wait before automatically dismissing the toast.\nIf 0 (default), it stays open indefinitely.\nFrom accessibility perspective, it is recommended to set a timeout of at least 20 seconds.",
32440
+ "fieldName": "timeout"
32489
32441
  },
32490
32442
  {
32491
- "name": "negative",
32443
+ "name": "position",
32492
32444
  "type": {
32493
- "text": "boolean"
32445
+ "text": "SbbToastPosition"
32494
32446
  },
32495
- "default": "false",
32496
- "description": "Negative coloring variant flag.",
32497
- "fieldName": "negative",
32447
+ "default": "'bottom-center'",
32448
+ "description": "The position where to place the toast.",
32449
+ "fieldName": "position"
32450
+ },
32451
+ {
32452
+ "name": "politeness",
32453
+ "type": {
32454
+ "text": "'polite' | 'assertive' | 'off'"
32455
+ },
32456
+ "default": "'polite'",
32457
+ "description": "The ARIA politeness level.\nCheck https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#live_regions for further info",
32458
+ "fieldName": "politeness"
32459
+ },
32460
+ {
32461
+ "name": "icon-name",
32462
+ "type": {
32463
+ "text": "string"
32464
+ },
32465
+ "default": "''",
32466
+ "description": "The icon name we want to use, choose from the small icon variants\nfrom the ui-icons category from here\nhttps://icons.app.sbb.ch.",
32467
+ "fieldName": "iconName",
32498
32468
  "inheritedFrom": {
32499
- "name": "SbbNegativeMixin",
32500
- "module": "core/mixins/negative-mixin.js"
32469
+ "name": "SbbIconNameMixin",
32470
+ "module": "icon/icon-name-mixin.js"
32501
32471
  }
32502
32472
  },
32503
32473
  {
32504
- "name": "no-sanitize",
32474
+ "name": "readonly",
32475
+ "description": "Whether the component is readonly.",
32476
+ "default": "false",
32505
32477
  "type": {
32506
32478
  "text": "boolean"
32507
32479
  },
32508
- "default": "false",
32509
- "description": "When set to `true`, SVG content that is HTTP fetched will not be checked\nif the response SVG content has any `<script>` elements, or any attributes\nthat start with `on`, such as `onclick`.",
32510
- "fieldName": "noSanitize",
32480
+ "fieldName": "readOnly",
32511
32481
  "inheritedFrom": {
32512
- "name": "SbbIconBase",
32513
- "module": "icon/icon-base.js"
32482
+ "name": "SbbReadonlyMixin",
32483
+ "module": "core/mixins/readonly-mixin.js"
32514
32484
  }
32515
32485
  }
32516
32486
  ],
32517
32487
  "mixins": [
32518
32488
  {
32519
- "name": "SbbNegativeMixin",
32489
+ "name": "SbbIconNameMixin",
32490
+ "module": "icon.js"
32491
+ },
32492
+ {
32493
+ "name": "SbbReadonlyMixin",
32520
32494
  "module": "core/mixins.js"
32521
32495
  }
32522
32496
  ],
32523
32497
  "superclass": {
32524
- "name": "SbbIconBase",
32525
- "module": "icon.js"
32498
+ "name": "SbbOpenCloseBaseElement",
32499
+ "module": "core/base-elements.js"
32526
32500
  },
32527
- "tagName": "sbb-timetable-occupancy-icon",
32501
+ "tagName": "sbb-toast",
32528
32502
  "customElement": true,
32529
- "cssProperties": [
32503
+ "events": [
32530
32504
  {
32531
- "description": "Can be used to set a custom width.",
32532
- "name": "--sbb-icon-svg-width",
32533
- "default": "auto",
32505
+ "name": "beforeopen",
32506
+ "type": {
32507
+ "text": "Event"
32508
+ },
32509
+ "description": "Emits whenever the component starts the opening transition. Can be canceled.",
32534
32510
  "inheritedFrom": {
32535
- "name": "SbbIconBase",
32536
- "module": "icon/icon-base.js"
32511
+ "name": "SbbOpenCloseBaseElement",
32512
+ "module": "core/base-elements/open-close-base-element.js"
32537
32513
  }
32538
32514
  },
32539
32515
  {
32540
- "description": "Can be used to set a custom height.",
32541
- "name": "--sbb-icon-svg-height",
32542
- "default": "auto",
32516
+ "name": "open",
32517
+ "type": {
32518
+ "text": "Event"
32519
+ },
32520
+ "description": "Emits whenever the component is opened.",
32543
32521
  "inheritedFrom": {
32544
- "name": "SbbIconBase",
32545
- "module": "icon/icon-base.js"
32522
+ "name": "SbbOpenCloseBaseElement",
32523
+ "module": "core/base-elements/open-close-base-element.js"
32524
+ }
32525
+ },
32526
+ {
32527
+ "name": "beforeclose",
32528
+ "type": {
32529
+ "text": "Event"
32530
+ },
32531
+ "description": "Emits whenever the component begins the closing transition. Can be canceled.",
32532
+ "inheritedFrom": {
32533
+ "name": "SbbOpenCloseBaseElement",
32534
+ "module": "core/base-elements/open-close-base-element.js"
32535
+ }
32536
+ },
32537
+ {
32538
+ "name": "close",
32539
+ "type": {
32540
+ "text": "Event"
32541
+ },
32542
+ "description": "Emits whenever the component is closed.",
32543
+ "inheritedFrom": {
32544
+ "name": "SbbOpenCloseBaseElement",
32545
+ "module": "core/base-elements/open-close-base-element.js"
32546
32546
  }
32547
32547
  }
32548
32548
  ]
@@ -32551,10 +32551,10 @@
32551
32551
  "exports": [
32552
32552
  {
32553
32553
  "kind": "js",
32554
- "name": "SbbTimetableOccupancyIconElement",
32554
+ "name": "SbbToastElement",
32555
32555
  "declaration": {
32556
- "name": "SbbTimetableOccupancyIconElement",
32557
- "module": "timetable-occupancy-icon/timetable-occupancy-icon.component.js"
32556
+ "name": "SbbToastElement",
32557
+ "module": "toast/toast.component.js"
32558
32558
  }
32559
32559
  }
32560
32560
  ]