@sbb-esta/lyne-elements-dev 4.10.0-dev.1775721925 → 4.10.0-dev.1775737579

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 +948 -948
  2. package/package.json +2 -2
@@ -120224,28 +120224,20 @@
120224
120224
  },
120225
120225
  {
120226
120226
  "kind": "javascript-module",
120227
- "path": "sidebar/sidebar-close-button/sidebar-close-button.component.js",
120227
+ "path": "sidebar/sidebar/sidebar.component.js",
120228
120228
  "declarations": [
120229
120229
  {
120230
120230
  "kind": "class",
120231
- "description": "Sidebar close button, intended to be placed inside sbb-sidebar.",
120232
- "name": "SbbSidebarCloseButtonElement",
120231
+ "description": "This component corresponds to a sidebar that can be opened on the sidebar container.",
120232
+ "name": "SbbSidebarElement",
120233
120233
  "slots": [
120234
120234
  {
120235
- "description": "Use the unnamed slot to add content to the sidebar-close-button. Not intended to be used in this context.",
120236
- "name": "",
120237
- "inheritedFrom": {
120238
- "name": "SbbSecondaryButtonElement",
120239
- "module": "button/secondary-button/secondary-button.component.js"
120240
- }
120235
+ "description": "Use the unnamed slot to slot any content into the sidebar.",
120236
+ "name": ""
120241
120237
  },
120242
120238
  {
120243
- "description": "Slot used to display the icon, if one is set. Not intended to be used in this context.",
120244
- "name": "icon",
120245
- "inheritedFrom": {
120246
- "name": "SbbSecondaryButtonElement",
120247
- "module": "button/secondary-button/secondary-button.component.js"
120248
- }
120239
+ "description": "Use the title slot to add an <sbb-title>.",
120240
+ "name": "title"
120249
120241
  }
120250
120242
  ],
120251
120243
  "members": [
@@ -120262,507 +120254,539 @@
120262
120254
  "name": "SbbElement",
120263
120255
  "module": "core/base-elements/element.js"
120264
120256
  },
120265
- "default": "'sbb-sidebar-close-button'"
120257
+ "default": "'sbb-sidebar'"
120266
120258
  },
120267
120259
  {
120268
120260
  "kind": "field",
120269
- "name": "_languageController",
120270
- "privacy": "private",
120271
- "default": "new SbbLanguageController(this)"
120272
- },
120273
- {
120274
- "kind": "method",
120275
- "name": "renderTemplate",
120276
- "privacy": "protected",
120277
- "return": {
120278
- "type": {
120279
- "text": "TemplateResult"
120280
- }
120261
+ "name": "color",
120262
+ "type": {
120263
+ "text": "'white' | 'milk'"
120281
120264
  },
120282
- "description": "Override this method to render the component template.",
120283
- "inheritedFrom": {
120284
- "name": "SbbActionBaseElement",
120285
- "module": "core/base-elements/action-base-element.js"
120286
- }
120265
+ "privacy": "public",
120266
+ "default": "'white'",
120267
+ "description": "Background color of the sidebar. Either `white` or `milk`.",
120268
+ "attribute": "color",
120269
+ "reflects": true
120287
120270
  },
120288
120271
  {
120289
- "kind": "method",
120290
- "name": "renderIconName",
120291
- "privacy": "protected",
120292
- "return": {
120293
- "type": {
120294
- "text": "string"
120295
- }
120272
+ "kind": "field",
120273
+ "name": "mode",
120274
+ "type": {
120275
+ "text": "'side' | 'over'"
120296
120276
  },
120297
- "inheritedFrom": {
120298
- "name": "SbbIconNameMixin",
120299
- "module": "icon/icon-name-mixin.js"
120300
- }
120277
+ "privacy": "public",
120278
+ "default": "'side'",
120279
+ "description": "Mode of the sidebar; one of 'side' or 'over'.",
120280
+ "attribute": "mode",
120281
+ "reflects": true
120301
120282
  },
120302
120283
  {
120303
120284
  "kind": "field",
120304
- "name": "size",
120285
+ "name": "position",
120305
120286
  "type": {
120306
- "text": "SbbButtonSize"
120287
+ "text": "'start' | 'end'"
120307
120288
  },
120308
120289
  "privacy": "public",
120309
- "description": "Size variant, either l, m or s.",
120310
- "default": "'s'",
120311
- "attribute": "size",
120312
- "reflects": true,
120313
- "inheritedFrom": {
120314
- "name": "SbbButtonCommonElementMixin",
120315
- "module": "button/common/button-common.js"
120316
- }
120290
+ "default": "'start'",
120291
+ "description": "The side that the sidebar is attached to.",
120292
+ "attribute": "position",
120293
+ "reflects": true
120317
120294
  },
120318
120295
  {
120319
120296
  "kind": "field",
120320
- "name": "loading",
120297
+ "name": "opened",
120321
120298
  "type": {
120322
120299
  "text": "boolean"
120323
120300
  },
120324
120301
  "privacy": "public",
120325
120302
  "default": "false",
120326
- "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
120327
- "attribute": "loading",
120328
- "reflects": true,
120329
- "inheritedFrom": {
120330
- "name": "SbbButtonCommonElementMixin",
120331
- "module": "button/common/button-common.js"
120332
- }
120303
+ "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
120304
+ "attribute": "opened",
120305
+ "reflects": true
120333
120306
  },
120334
120307
  {
120335
120308
  "kind": "field",
120336
- "name": "negative",
120309
+ "name": "focusOnOpen",
120337
120310
  "type": {
120338
120311
  "text": "boolean"
120339
120312
  },
120340
120313
  "privacy": "public",
120341
120314
  "default": "false",
120342
- "description": "Negative coloring variant flag.",
120343
- "attribute": "negative",
120344
- "reflects": true,
120345
- "inheritedFrom": {
120346
- "name": "SbbNegativeMixin",
120347
- "module": "core/mixins/negative-mixin.js"
120348
- }
120315
+ "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
120316
+ "attribute": "focus-on-open"
120349
120317
  },
120350
120318
  {
120351
120319
  "kind": "field",
120352
- "name": "iconName",
120320
+ "name": "container",
120353
120321
  "type": {
120354
- "text": "string"
120322
+ "text": "SbbSidebarContainerElement | null"
120355
120323
  },
120356
120324
  "privacy": "public",
120357
- "default": "''",
120358
- "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.",
120359
- "attribute": "icon-name",
120360
- "inheritedFrom": {
120361
- "name": "SbbIconNameMixin",
120362
- "module": "icon/icon-name-mixin.js"
120363
- }
120325
+ "description": "Returns the SbbSidebarContainerElement where this sidebar is contained.",
120326
+ "readonly": true,
120327
+ "default": "null"
120328
+ },
120329
+ {
120330
+ "kind": "field",
120331
+ "name": "_container",
120332
+ "type": {
120333
+ "text": "SbbSidebarContainerElement | null"
120334
+ },
120335
+ "privacy": "private",
120336
+ "default": "null"
120337
+ },
120338
+ {
120339
+ "kind": "field",
120340
+ "name": "_lastFocusedElement",
120341
+ "type": {
120342
+ "text": "HTMLElement | null"
120343
+ },
120344
+ "privacy": "private",
120345
+ "default": "null"
120346
+ },
120347
+ {
120348
+ "kind": "field",
120349
+ "name": "_focusTrapController",
120350
+ "privacy": "private",
120351
+ "default": "new SbbFocusTrapController(this)"
120352
+ },
120353
+ {
120354
+ "kind": "field",
120355
+ "name": "_escapableOverlayController",
120356
+ "privacy": "private",
120357
+ "default": "new SbbEscapableOverlayController(this)"
120358
+ },
120359
+ {
120360
+ "kind": "field",
120361
+ "name": "_closeOnNavigation",
120362
+ "privacy": "private"
120364
120363
  },
120365
120364
  {
120366
120365
  "kind": "method",
120367
- "name": "renderIconSlot",
120368
- "privacy": "protected",
120366
+ "name": "toggle",
120367
+ "privacy": "public",
120369
120368
  "return": {
120370
120369
  "type": {
120371
- "text": "TemplateResult"
120370
+ "text": "void"
120372
120371
  }
120373
120372
  },
120374
- "parameters": [
120375
- {
120376
- "name": "classname",
120377
- "optional": true,
120378
- "type": {
120379
- "text": "string"
120380
- }
120373
+ "description": "Toggles the sidebar visibility."
120374
+ },
120375
+ {
120376
+ "kind": "method",
120377
+ "name": "open",
120378
+ "privacy": "public",
120379
+ "return": {
120380
+ "type": {
120381
+ "text": "void"
120381
120382
  }
120382
- ],
120383
+ },
120384
+ "description": "Opens the sidebar.",
120383
120385
  "inheritedFrom": {
120384
- "name": "SbbIconNameMixin",
120385
- "module": "icon/icon-name-mixin.js"
120386
+ "name": "SbbOpenCloseBaseElement",
120387
+ "module": "core/base-elements/open-close-base-element.js"
120386
120388
  }
120387
120389
  },
120388
120390
  {
120389
120391
  "kind": "method",
120390
- "name": "_renderIconName",
120392
+ "name": "_isZeroAnimationDuration",
120391
120393
  "privacy": "private",
120392
120394
  "return": {
120393
120395
  "type": {
120394
- "text": "string"
120396
+ "text": "boolean"
120395
120397
  }
120396
- },
120397
- "inheritedFrom": {
120398
- "name": "SbbIconNameMixin",
120399
- "module": "icon/icon-name-mixin.js"
120400
120398
  }
120401
120399
  },
120402
120400
  {
120403
- "kind": "field",
120404
- "name": "disabledInteractive",
120405
- "type": {
120406
- "text": "boolean"
120407
- },
120408
- "privacy": "public",
120409
- "default": "false",
120410
- "description": "Whether the button should be aria-disabled but stay interactive.",
120411
- "attribute": "disabled-interactive",
120412
- "reflects": true,
120413
- "inheritedFrom": {
120414
- "name": "SbbDisabledInteractiveMixin",
120415
- "module": "core/mixins/disabled-mixin.js"
120401
+ "kind": "method",
120402
+ "name": "_handleOpening",
120403
+ "privacy": "private",
120404
+ "return": {
120405
+ "type": {
120406
+ "text": "void"
120407
+ }
120416
120408
  }
120417
120409
  },
120418
120410
  {
120419
- "kind": "field",
120420
- "name": "disabled",
120411
+ "kind": "method",
120412
+ "name": "close",
120421
120413
  "privacy": "public",
120422
- "description": "Whether the component is disabled.",
120423
- "default": "false",
120424
- "type": {
120425
- "text": "boolean"
120414
+ "return": {
120415
+ "type": {
120416
+ "text": "void"
120417
+ }
120426
120418
  },
120427
- "attribute": "disabled",
120428
- "reflects": true,
120419
+ "description": "Closes the sidebar.",
120429
120420
  "inheritedFrom": {
120430
- "name": "SbbDisabledMixin",
120431
- "module": "core/mixins/disabled-mixin.js"
120421
+ "name": "SbbOpenCloseBaseElement",
120422
+ "module": "core/base-elements/open-close-base-element.js"
120432
120423
  }
120433
120424
  },
120434
120425
  {
120435
- "kind": "field",
120436
- "name": "#disabled",
120426
+ "kind": "method",
120427
+ "name": "_handleClosing",
120437
120428
  "privacy": "private",
120438
- "type": {
120439
- "text": "boolean"
120440
- },
120441
- "default": "false",
120442
- "inheritedFrom": {
120443
- "name": "SbbDisabledMixin",
120444
- "module": "core/mixins/disabled-mixin.js"
120429
+ "return": {
120430
+ "type": {
120431
+ "text": "void"
120432
+ }
120445
120433
  }
120446
120434
  },
120447
120435
  {
120448
120436
  "kind": "method",
120449
- "name": "isDisabledExternally",
120450
- "privacy": "protected",
120437
+ "name": "_takeFocus",
120438
+ "privacy": "private",
120451
120439
  "return": {
120452
120440
  "type": {
120453
- "text": "boolean"
120441
+ "text": "void"
120454
120442
  }
120455
- },
120456
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
120457
- "inheritedFrom": {
120458
- "name": "SbbDisabledMixin",
120459
- "module": "core/mixins/disabled-mixin.js"
120460
120443
  }
120461
120444
  },
120462
120445
  {
120463
- "kind": "field",
120464
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
120465
- "type": {
120466
- "text": "array"
120446
+ "kind": "method",
120447
+ "name": "cedeFocus",
120448
+ "privacy": "protected",
120449
+ "return": {
120450
+ "type": {
120451
+ "text": "void"
120452
+ }
120453
+ }
120454
+ },
120455
+ {
120456
+ "kind": "method",
120457
+ "name": "_updateSidebarWidth",
120458
+ "privacy": "private",
120459
+ "return": {
120460
+ "type": {
120461
+ "text": "void"
120462
+ }
120463
+ },
120464
+ "parameters": [
120465
+ {
120466
+ "name": "oldPosition",
120467
+ "optional": true,
120468
+ "type": {
120469
+ "text": "this['position']"
120470
+ }
120471
+ }
120472
+ ]
120473
+ },
120474
+ {
120475
+ "kind": "method",
120476
+ "name": "_buildCssWidthVar",
120477
+ "privacy": "private",
120478
+ "return": {
120479
+ "type": {
120480
+ "text": "string"
120481
+ }
120467
120482
  },
120483
+ "parameters": [
120484
+ {
120485
+ "name": "position",
120486
+ "default": "this.position"
120487
+ }
120488
+ ]
120489
+ },
120490
+ {
120491
+ "kind": "method",
120492
+ "name": "_isModeOver",
120468
120493
  "privacy": "private",
120469
- "readonly": true,
120470
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
120471
- "inheritedFrom": {
120472
- "name": "SbbButtonBaseElement",
120473
- "module": "core/base-elements/button-base-element.js"
120494
+ "return": {
120495
+ "type": {
120496
+ "text": "boolean"
120497
+ }
120474
120498
  }
120475
120499
  },
120476
120500
  {
120477
- "kind": "field",
120478
- "name": "value",
120479
- "type": {
120480
- "text": "string"
120481
- },
120482
- "privacy": "public",
120483
- "inheritedFrom": {
120484
- "name": "SbbButtonBaseElement",
120485
- "module": "core/base-elements/button-base-element.js"
120501
+ "kind": "method",
120502
+ "name": "_onTransitionEnd",
120503
+ "privacy": "private",
120504
+ "return": {
120505
+ "type": {
120506
+ "text": "void"
120507
+ }
120486
120508
  },
120487
- "default": "''",
120488
- "description": "Value of the form element.",
120489
- "attribute": "value"
120509
+ "parameters": [
120510
+ {
120511
+ "name": "event",
120512
+ "type": {
120513
+ "text": "TransitionEvent"
120514
+ }
120515
+ }
120516
+ ]
120517
+ },
120518
+ {
120519
+ "kind": "method",
120520
+ "name": "_detectScrolledState",
120521
+ "privacy": "private",
120522
+ "return": {
120523
+ "type": {
120524
+ "text": "void"
120525
+ }
120526
+ }
120490
120527
  },
120491
120528
  {
120492
120529
  "kind": "field",
120493
- "name": "type",
120494
- "privacy": "public",
120495
- "description": "The type attribute to use for the button.",
120496
- "default": "'button'",
120530
+ "name": "isAnimating",
120497
120531
  "type": {
120498
- "text": "SbbButtonType"
120532
+ "text": "boolean"
120499
120533
  },
120500
- "attribute": "type",
120534
+ "privacy": "public",
120535
+ "default": "false",
120536
+ "description": "Whether the component is currently animating.",
120501
120537
  "inheritedFrom": {
120502
- "name": "SbbButtonBaseElement",
120503
- "module": "core/base-elements/button-base-element.js"
120538
+ "name": "SbbAnimationCompleteMixin",
120539
+ "module": "core/mixins/animation-complete-mixin.js"
120504
120540
  }
120505
120541
  },
120506
120542
  {
120507
120543
  "kind": "field",
120508
- "name": "form",
120544
+ "name": "animationComplete",
120509
120545
  "type": {
120510
- "text": "HTMLFormElement | null"
120546
+ "text": "Promise<void>"
120511
120547
  },
120512
120548
  "privacy": "public",
120513
- "description": "The `<form>` element to associate the button with.",
120549
+ "description": "Returns a promise which completes whenever an animation ends.\nWhen a new animation starts, a new Promise is returned.",
120550
+ "readonly": true,
120514
120551
  "inheritedFrom": {
120515
- "name": "SbbButtonBaseElement",
120516
- "module": "core/base-elements/button-base-element.js"
120517
- },
120518
- "attribute": "form"
120552
+ "name": "SbbAnimationCompleteMixin",
120553
+ "module": "core/mixins/animation-complete-mixin.js"
120554
+ }
120519
120555
  },
120520
120556
  {
120521
120557
  "kind": "field",
120522
- "name": "_formId",
120558
+ "name": "_animationPromise",
120523
120559
  "type": {
120524
- "text": "string"
120560
+ "text": "Promise<void>"
120525
120561
  },
120526
120562
  "privacy": "private",
120527
- "default": "''",
120528
120563
  "inheritedFrom": {
120529
- "name": "SbbButtonBaseElement",
120530
- "module": "core/base-elements/button-base-element.js"
120564
+ "name": "SbbAnimationCompleteMixin",
120565
+ "module": "core/mixins/animation-complete-mixin.js"
120531
120566
  }
120532
120567
  },
120533
120568
  {
120534
- "kind": "field",
120535
- "name": "_handleButtonClick",
120536
- "privacy": "private",
120569
+ "kind": "method",
120570
+ "name": "startAnimation",
120571
+ "privacy": "protected",
120572
+ "return": {
120573
+ "type": {
120574
+ "text": "void"
120575
+ }
120576
+ },
120537
120577
  "inheritedFrom": {
120538
- "name": "SbbButtonBaseElement",
120539
- "module": "core/base-elements/button-base-element.js"
120578
+ "name": "SbbAnimationCompleteMixin",
120579
+ "module": "core/mixins/animation-complete-mixin.js"
120540
120580
  }
120541
120581
  },
120542
120582
  {
120543
120583
  "kind": "method",
120544
- "name": "_requestSubmit",
120545
- "privacy": "private",
120584
+ "name": "stopAnimation",
120585
+ "privacy": "protected",
120546
120586
  "return": {
120547
120587
  "type": {
120548
120588
  "text": "void"
120549
120589
  }
120550
120590
  },
120551
- "parameters": [
120552
- {
120553
- "name": "form",
120554
- "type": {
120555
- "text": "HTMLFormElement"
120556
- }
120557
- }
120558
- ],
120591
+ "description": "Overriding stopAnimation() breaks functionality.",
120559
120592
  "inheritedFrom": {
120560
- "name": "SbbButtonBaseElement",
120561
- "module": "core/base-elements/button-base-element.js"
120593
+ "name": "SbbAnimationCompleteMixin",
120594
+ "module": "core/mixins/animation-complete-mixin.js"
120562
120595
  }
120563
120596
  },
120564
120597
  {
120565
- "kind": "field",
120566
- "name": "_formKeyDown",
120598
+ "kind": "method",
120599
+ "name": "_enqueueAnimation",
120567
120600
  "privacy": "private",
120601
+ "return": {
120602
+ "type": {
120603
+ "text": "Promise<void>"
120604
+ }
120605
+ },
120568
120606
  "inheritedFrom": {
120569
- "name": "SbbButtonBaseElement",
120570
- "module": "core/base-elements/button-base-element.js"
120607
+ "name": "SbbAnimationCompleteMixin",
120608
+ "module": "core/mixins/animation-complete-mixin.js"
120571
120609
  }
120572
120610
  },
120573
120611
  {
120574
120612
  "kind": "field",
120575
- "name": "formAssociated",
120576
- "type": {
120577
- "text": "boolean"
120578
- },
120613
+ "name": "events",
120579
120614
  "privacy": "public",
120580
120615
  "static": true,
120581
- "default": "true",
120616
+ "readonly": true,
120617
+ "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
120618
+ "type": {
120619
+ "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
120620
+ },
120582
120621
  "inheritedFrom": {
120583
- "name": "SbbFormAssociatedMixin",
120584
- "module": "core/mixins/form-associated-mixin.js"
120622
+ "name": "SbbOpenCloseBaseElement",
120623
+ "module": "core/base-elements/open-close-base-element.js"
120585
120624
  }
120586
120625
  },
120587
120626
  {
120588
120627
  "kind": "field",
120589
- "name": "name",
120590
- "privacy": "public",
120591
- "description": "Name of the form element. Will be read from name attribute.",
120628
+ "name": "state",
120629
+ "privacy": "protected",
120630
+ "description": "The state of the component.",
120592
120631
  "type": {
120593
- "text": "string"
120632
+ "text": "SbbOpenedClosedState"
120594
120633
  },
120595
- "attribute": "name",
120634
+ "default": "'closed'",
120596
120635
  "inheritedFrom": {
120597
- "name": "SbbFormAssociatedMixin",
120598
- "module": "core/mixins/form-associated-mixin.js"
120636
+ "name": "SbbOpenCloseBaseElement",
120637
+ "module": "core/base-elements/open-close-base-element.js"
120599
120638
  }
120600
120639
  },
120601
120640
  {
120602
120641
  "kind": "field",
120603
- "name": "validity",
120642
+ "name": "_state",
120604
120643
  "type": {
120605
- "text": "ValidityState"
120644
+ "text": "SbbOpenedClosedState"
120606
120645
  },
120607
- "privacy": "public",
120608
- "description": "Returns the ValidityState object for this element.",
120609
- "readonly": true,
120646
+ "privacy": "private",
120610
120647
  "inheritedFrom": {
120611
- "name": "SbbFormAssociatedMixin",
120612
- "module": "core/mixins/form-associated-mixin.js"
120648
+ "name": "SbbOpenCloseBaseElement",
120649
+ "module": "core/base-elements/open-close-base-element.js"
120613
120650
  }
120614
120651
  },
120615
120652
  {
120616
120653
  "kind": "field",
120617
- "name": "validationMessage",
120654
+ "name": "isOpen",
120618
120655
  "type": {
120619
- "text": "string"
120656
+ "text": "boolean"
120620
120657
  },
120621
120658
  "privacy": "public",
120622
- "description": "Returns the current error message, if available, which corresponds\nto the current validation state.\nPlease note that only one message is returned at a time (e.g. if\nmultiple validity states are invalid, only the chronologically first one\nis returned until it is fixed, at which point the next message might be\nreturned, if it is still applicable). Also, a custom validity message\n(see below) has precedence over native validation messages.",
120659
+ "description": "Whether the element is open.",
120623
120660
  "readonly": true,
120624
120661
  "inheritedFrom": {
120625
- "name": "SbbFormAssociatedMixin",
120626
- "module": "core/mixins/form-associated-mixin.js"
120662
+ "name": "SbbOpenCloseBaseElement",
120663
+ "module": "core/base-elements/open-close-base-element.js"
120627
120664
  }
120628
120665
  },
120629
120666
  {
120630
- "kind": "field",
120631
- "name": "willValidate",
120632
- "type": {
120633
- "text": "boolean"
120634
- },
120667
+ "kind": "method",
120668
+ "name": "escapeStrategy",
120635
120669
  "privacy": "public",
120636
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
120637
- "readonly": true,
120670
+ "return": {
120671
+ "type": {
120672
+ "text": "void"
120673
+ }
120674
+ },
120675
+ "description": "The method which is called on escape key press. Defaults to calling close()",
120638
120676
  "inheritedFrom": {
120639
- "name": "SbbFormAssociatedMixin",
120640
- "module": "core/mixins/form-associated-mixin.js"
120641
- }
120642
- },
120643
- {
120644
- "kind": "field",
120645
- "name": "_validityStates",
120646
- "privacy": "private",
120647
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
120648
- "inheritedFrom": {
120649
- "name": "SbbFormAssociatedMixin",
120650
- "module": "core/mixins/form-associated-mixin.js"
120651
- }
120652
- },
120653
- {
120654
- "kind": "field",
120655
- "name": "formDisabled",
120656
- "type": {
120657
- "text": "boolean"
120658
- },
120659
- "privacy": "protected",
120660
- "default": "false",
120661
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
120662
- "inheritedFrom": {
120663
- "name": "SbbFormAssociatedMixin",
120664
- "module": "core/mixins/form-associated-mixin.js"
120677
+ "name": "SbbOpenCloseBaseElement",
120678
+ "module": "core/base-elements/open-close-base-element.js"
120665
120679
  }
120666
120680
  },
120667
120681
  {
120668
120682
  "kind": "method",
120669
- "name": "checkValidity",
120670
- "privacy": "public",
120683
+ "name": "dispatchBeforeOpenEvent",
120684
+ "privacy": "protected",
120671
120685
  "return": {
120672
120686
  "type": {
120673
120687
  "text": "boolean"
120674
120688
  }
120675
120689
  },
120676
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
120677
120690
  "inheritedFrom": {
120678
- "name": "SbbFormAssociatedMixin",
120679
- "module": "core/mixins/form-associated-mixin.js"
120691
+ "name": "SbbOpenCloseBaseElement",
120692
+ "module": "core/base-elements/open-close-base-element.js"
120680
120693
  }
120681
120694
  },
120682
120695
  {
120683
120696
  "kind": "method",
120684
- "name": "reportValidity",
120685
- "privacy": "public",
120697
+ "name": "dispatchOpenEvent",
120698
+ "privacy": "protected",
120686
120699
  "return": {
120687
120700
  "type": {
120688
120701
  "text": "boolean"
120689
120702
  }
120690
120703
  },
120691
- "description": "Returns true if this element has no validity problems; otherwise,\nreturns false, fires an invalid event at the element,\nand (if the event isn't canceled) reports the problem to the user.",
120692
120704
  "inheritedFrom": {
120693
- "name": "SbbFormAssociatedMixin",
120694
- "module": "core/mixins/form-associated-mixin.js"
120705
+ "name": "SbbOpenCloseBaseElement",
120706
+ "module": "core/base-elements/open-close-base-element.js"
120695
120707
  }
120696
120708
  },
120697
120709
  {
120698
120710
  "kind": "method",
120699
- "name": "setCustomValidity",
120700
- "privacy": "public",
120711
+ "name": "dispatchBeforeCloseEvent",
120712
+ "privacy": "protected",
120701
120713
  "return": {
120702
120714
  "type": {
120703
- "text": "void"
120715
+ "text": "boolean"
120704
120716
  }
120705
120717
  },
120706
- "parameters": [
120707
- {
120708
- "name": "message",
120709
- "type": {
120710
- "text": "string"
120711
- }
120712
- }
120713
- ],
120714
- "description": "Sets the custom validity message for this element. Use the empty string\nto indicate that the element does not have a custom validity error.",
120715
120718
  "inheritedFrom": {
120716
- "name": "SbbFormAssociatedMixin",
120717
- "module": "core/mixins/form-associated-mixin.js"
120719
+ "name": "SbbOpenCloseBaseElement",
120720
+ "module": "core/base-elements/open-close-base-element.js"
120718
120721
  }
120719
120722
  },
120720
120723
  {
120721
120724
  "kind": "method",
120722
- "name": "_hasDisabledAncestor",
120723
- "privacy": "private",
120725
+ "name": "dispatchCloseEvent",
120726
+ "privacy": "protected",
120724
120727
  "return": {
120725
120728
  "type": {
120726
120729
  "text": "boolean"
120727
120730
  }
120728
120731
  },
120729
120732
  "inheritedFrom": {
120730
- "name": "SbbFormAssociatedMixin",
120731
- "module": "core/mixins/form-associated-mixin.js"
120733
+ "name": "SbbOpenCloseBaseElement",
120734
+ "module": "core/base-elements/open-close-base-element.js"
120732
120735
  }
120733
120736
  },
120734
120737
  {
120735
- "kind": "method",
120736
- "name": "updateFormValue",
120737
- "privacy": "protected",
120738
- "return": {
120739
- "type": {
120740
- "text": "void"
120741
- }
120738
+ "kind": "field",
120739
+ "name": "_hydrationRequired",
120740
+ "type": {
120741
+ "text": "boolean"
120742
120742
  },
120743
- "description": "Should be called when form value is changed.\nAdapts and sets the formValue in the supported format (string | FormData | File | null)\nhttps://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/setFormValue",
120743
+ "privacy": "private",
120744
+ "default": "!!this.shadowRoot",
120744
120745
  "inheritedFrom": {
120745
- "name": "SbbFormAssociatedMixin",
120746
- "module": "core/mixins/form-associated-mixin.js"
120746
+ "name": "SbbElement",
120747
+ "module": "core/base-elements/element.js"
120747
120748
  }
120748
120749
  },
120749
120750
  {
120750
- "kind": "method",
120751
- "name": "formState",
120752
- "privacy": "protected",
120753
- "return": {
120754
- "type": {
120755
- "text": "FormRestoreState"
120756
- }
120751
+ "kind": "field",
120752
+ "name": "_hydrationComplete",
120753
+ "privacy": "private",
120754
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
120755
+ "inheritedFrom": {
120756
+ "name": "SbbElement",
120757
+ "module": "core/base-elements/element.js"
120758
+ }
120759
+ },
120760
+ {
120761
+ "kind": "field",
120762
+ "name": "_resolveHydration",
120763
+ "type": {
120764
+ "text": "(hydrationRequired: boolean) => void"
120757
120765
  },
120766
+ "privacy": "private",
120758
120767
  "inheritedFrom": {
120759
- "name": "SbbFormAssociatedMixin",
120760
- "module": "core/mixins/form-associated-mixin.js"
120768
+ "name": "SbbElement",
120769
+ "module": "core/base-elements/element.js"
120761
120770
  }
120762
120771
  },
120772
+ {
120773
+ "kind": "field",
120774
+ "name": "hydrationRequired",
120775
+ "type": {
120776
+ "text": "boolean"
120777
+ },
120778
+ "privacy": "protected",
120779
+ "description": "Returns whether hydration is required and not completed.",
120780
+ "readonly": true,
120781
+ "inheritedFrom": {
120782
+ "name": "SbbElement",
120783
+ "module": "core/base-elements/element.js"
120784
+ },
120785
+ "default": "!!this.shadowRoot"
120786
+ },
120763
120787
  {
120764
120788
  "kind": "method",
120765
- "name": "setValidityFlag",
120789
+ "name": "toggleState",
120766
120790
  "privacy": "protected",
120767
120791
  "return": {
120768
120792
  "type": {
@@ -120771,192 +120795,227 @@
120771
120795
  },
120772
120796
  "parameters": [
120773
120797
  {
120774
- "name": "flag",
120775
- "type": {
120776
- "text": "T"
120777
- }
120778
- },
120779
- {
120780
- "name": "message",
120798
+ "name": "value",
120781
120799
  "type": {
120782
120800
  "text": "string"
120783
120801
  }
120784
120802
  },
120785
120803
  {
120786
- "name": "flagValue",
120804
+ "name": "force",
120787
120805
  "optional": true,
120788
120806
  "type": {
120789
- "text": "ValidityStateFlags[T]"
120807
+ "text": "boolean"
120790
120808
  }
120791
120809
  }
120792
120810
  ],
120793
- "description": "Marks this element as suffering from the constraint indicated by the\nflag argument and associates the given message to it.\nNote that only one message is displayed at a time and custom messages by\nconsumers are always displayed before internal messages and internal\nmessages are displayed in the order they were added.\nTo set/define custom validity state flags, you need to extend the\nValidityState prototype (and the CustomValidityState interface).",
120794
120811
  "inheritedFrom": {
120795
- "name": "SbbFormAssociatedMixin",
120796
- "module": "core/mixins/form-associated-mixin.js"
120812
+ "name": "SbbElement",
120813
+ "module": "core/base-elements/element.js"
120797
120814
  }
120798
120815
  },
120799
120816
  {
120800
- "kind": "method",
120801
- "name": "removeValidityFlag",
120802
- "privacy": "protected",
120803
- "return": {
120804
- "type": {
120805
- "text": "void"
120806
- }
120817
+ "kind": "field",
120818
+ "name": "['_$sbbElement$']",
120819
+ "type": {
120820
+ "text": "boolean"
120807
120821
  },
120808
- "parameters": [
120809
- {
120810
- "name": "flag",
120811
- "type": {
120812
- "text": "T"
120813
- }
120814
- }
120815
- ],
120816
- "description": "Removes the validity state flag entry and updates validity state.",
120822
+ "privacy": "public",
120823
+ "static": true,
120824
+ "default": "true",
120817
120825
  "inheritedFrom": {
120818
- "name": "SbbFormAssociatedMixin",
120819
- "module": "core/mixins/form-associated-mixin.js"
120826
+ "name": "SbbElement",
120827
+ "module": "core/base-elements/element.js"
120820
120828
  }
120821
120829
  },
120822
120830
  {
120823
- "kind": "method",
120824
- "name": "validate",
120825
- "privacy": "protected",
120826
- "return": {
120827
- "type": {
120828
- "text": "void"
120829
- }
120831
+ "kind": "field",
120832
+ "name": "_controllers",
120833
+ "type": {
120834
+ "text": "Set<SbbReactiveController> | undefined"
120830
120835
  },
120831
- "description": "To be called whenever the current element needs to be validated.",
120836
+ "privacy": "private",
120832
120837
  "inheritedFrom": {
120833
- "name": "SbbFormAssociatedMixin",
120834
- "module": "core/mixins/form-associated-mixin.js"
120838
+ "name": "SbbElement",
120839
+ "module": "core/base-elements/element.js"
120835
120840
  }
120841
+ }
120842
+ ],
120843
+ "attributes": [
120844
+ {
120845
+ "name": "color",
120846
+ "type": {
120847
+ "text": "'white' | 'milk'"
120848
+ },
120849
+ "default": "'white'",
120850
+ "description": "Background color of the sidebar. Either `white` or `milk`.",
120851
+ "fieldName": "color"
120836
120852
  },
120837
120853
  {
120838
- "kind": "method",
120839
- "name": "shouldValidate",
120840
- "privacy": "protected",
120841
- "return": {
120842
- "type": {
120843
- "text": "boolean"
120844
- }
120854
+ "name": "mode",
120855
+ "type": {
120856
+ "text": "'side' | 'over'"
120845
120857
  },
120846
- "parameters": [
120847
- {
120848
- "name": "name",
120849
- "type": {
120850
- "text": "PropertyKey | undefined"
120851
- }
120852
- }
120853
- ],
120854
- "description": "Whether validation should be run on a property change with the given name.",
120855
- "inheritedFrom": {
120856
- "name": "SbbFormAssociatedMixin",
120857
- "module": "core/mixins/form-associated-mixin.js"
120858
- }
120858
+ "default": "'side'",
120859
+ "description": "Mode of the sidebar; one of 'side' or 'over'.",
120860
+ "fieldName": "mode"
120859
120861
  },
120860
120862
  {
120861
- "kind": "method",
120862
- "name": "_setInternalValidity",
120863
- "privacy": "private",
120864
- "return": {
120865
- "type": {
120866
- "text": "void"
120867
- }
120863
+ "name": "position",
120864
+ "type": {
120865
+ "text": "'start' | 'end'"
120868
120866
  },
120869
- "inheritedFrom": {
120870
- "name": "SbbFormAssociatedMixin",
120871
- "module": "core/mixins/form-associated-mixin.js"
120872
- }
120867
+ "default": "'start'",
120868
+ "description": "The side that the sidebar is attached to.",
120869
+ "fieldName": "position"
120873
120870
  },
120874
120871
  {
120875
- "kind": "field",
120876
- "name": "role",
120872
+ "name": "opened",
120877
120873
  "type": {
120878
- "text": "ElementInternals['role']"
120874
+ "text": "boolean"
120879
120875
  },
120880
- "privacy": "public",
120881
- "static": true,
120882
- "readonly": true,
120883
- "default": "'button'",
120876
+ "default": "false",
120877
+ "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
120878
+ "fieldName": "opened"
120879
+ },
120880
+ {
120881
+ "name": "focus-on-open",
120882
+ "type": {
120883
+ "text": "boolean"
120884
+ },
120885
+ "default": "false",
120886
+ "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
120887
+ "fieldName": "focusOnOpen"
120888
+ }
120889
+ ],
120890
+ "mixins": [
120891
+ {
120892
+ "name": "SbbAnimationCompleteMixin",
120893
+ "module": "core/mixins.js"
120894
+ }
120895
+ ],
120896
+ "superclass": {
120897
+ "name": "SbbOpenCloseBaseElement",
120898
+ "module": "core/base-elements.js"
120899
+ },
120900
+ "tagName": "sbb-sidebar",
120901
+ "customElement": true,
120902
+ "events": [
120903
+ {
120904
+ "name": "beforeopen",
120905
+ "type": {
120906
+ "text": "Event"
120907
+ },
120908
+ "description": "Emits whenever the component starts the opening transition. Can be canceled.",
120884
120909
  "inheritedFrom": {
120885
- "name": "SbbButtonLikeBaseElement",
120886
- "module": "core/base-elements/button-base-element.js"
120910
+ "name": "SbbOpenCloseBaseElement",
120911
+ "module": "core/base-elements/open-close-base-element.js"
120887
120912
  }
120888
120913
  },
120889
120914
  {
120890
- "kind": "field",
120891
- "name": "_preventScrollOnSpaceKeydown",
120892
- "privacy": "private",
120893
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
120894
- "parameters": [
120895
- {
120896
- "description": "The origin event.",
120897
- "name": "event"
120898
- }
120899
- ],
120915
+ "name": "open",
120916
+ "type": {
120917
+ "text": "Event"
120918
+ },
120919
+ "description": "Emits whenever the component is opened.",
120900
120920
  "inheritedFrom": {
120901
- "name": "SbbButtonLikeBaseElement",
120902
- "module": "core/base-elements/button-base-element.js"
120921
+ "name": "SbbOpenCloseBaseElement",
120922
+ "module": "core/base-elements/open-close-base-element.js"
120903
120923
  }
120904
120924
  },
120905
120925
  {
120906
- "kind": "field",
120907
- "name": "_removeActiveMarker",
120908
- "privacy": "private",
120926
+ "name": "beforeclose",
120927
+ "type": {
120928
+ "text": "Event"
120929
+ },
120930
+ "description": "Emits whenever the component begins the closing transition. Can be canceled.",
120909
120931
  "inheritedFrom": {
120910
- "name": "SbbButtonLikeBaseElement",
120911
- "module": "core/base-elements/button-base-element.js"
120932
+ "name": "SbbOpenCloseBaseElement",
120933
+ "module": "core/base-elements/open-close-base-element.js"
120912
120934
  }
120913
120935
  },
120914
120936
  {
120915
- "kind": "field",
120916
- "name": "_dispatchClickEventOnSpaceKeyup",
120917
- "privacy": "private",
120918
- "description": "Dispatches a 'click' PointerEvent if the original keyboard event is a 'Space' press.\nAs verified with the native button, when 'Space' is pressed, a 'click' event is dispatched\nafter the 'keyup' event.",
120919
- "parameters": [
120920
- {
120921
- "description": "The origin event.",
120922
- "name": "event"
120923
- }
120924
- ],
120937
+ "name": "close",
120938
+ "type": {
120939
+ "text": "Event"
120940
+ },
120941
+ "description": "Emits whenever the component is closed.",
120942
+ "inheritedFrom": {
120943
+ "name": "SbbOpenCloseBaseElement",
120944
+ "module": "core/base-elements/open-close-base-element.js"
120945
+ }
120946
+ }
120947
+ ]
120948
+ }
120949
+ ],
120950
+ "exports": [
120951
+ {
120952
+ "kind": "js",
120953
+ "name": "SbbSidebarElement",
120954
+ "declaration": {
120955
+ "name": "SbbSidebarElement",
120956
+ "module": "sidebar/sidebar/sidebar.component.js"
120957
+ }
120958
+ }
120959
+ ]
120960
+ },
120961
+ {
120962
+ "kind": "javascript-module",
120963
+ "path": "sidebar/sidebar-close-button/sidebar-close-button.component.js",
120964
+ "declarations": [
120965
+ {
120966
+ "kind": "class",
120967
+ "description": "Sidebar close button, intended to be placed inside sbb-sidebar.",
120968
+ "name": "SbbSidebarCloseButtonElement",
120969
+ "slots": [
120970
+ {
120971
+ "description": "Use the unnamed slot to add content to the sidebar-close-button. Not intended to be used in this context.",
120972
+ "name": "",
120925
120973
  "inheritedFrom": {
120926
- "name": "SbbButtonLikeBaseElement",
120927
- "module": "core/base-elements/button-base-element.js"
120974
+ "name": "SbbSecondaryButtonElement",
120975
+ "module": "button/secondary-button/secondary-button.component.js"
120928
120976
  }
120929
120977
  },
120930
120978
  {
120931
- "kind": "field",
120932
- "name": "_dispatchClickEvent",
120933
- "privacy": "private",
120979
+ "description": "Slot used to display the icon, if one is set. Not intended to be used in this context.",
120980
+ "name": "icon",
120934
120981
  "inheritedFrom": {
120935
- "name": "SbbButtonLikeBaseElement",
120936
- "module": "core/base-elements/button-base-element.js"
120982
+ "name": "SbbSecondaryButtonElement",
120983
+ "module": "button/secondary-button/secondary-button.component.js"
120937
120984
  }
120938
- },
120985
+ }
120986
+ ],
120987
+ "members": [
120939
120988
  {
120940
120989
  "kind": "field",
120941
- "name": "maybeDisabled",
120990
+ "name": "elementName",
120942
120991
  "type": {
120943
- "text": "boolean | undefined"
120992
+ "text": "string"
120944
120993
  },
120945
- "privacy": "protected",
120994
+ "privacy": "public",
120995
+ "static": true,
120946
120996
  "readonly": true,
120947
120997
  "inheritedFrom": {
120948
- "name": "SbbActionBaseElement",
120949
- "module": "core/base-elements/action-base-element.js"
120950
- }
120998
+ "name": "SbbElement",
120999
+ "module": "core/base-elements/element.js"
121000
+ },
121001
+ "default": "'sbb-sidebar-close-button'"
120951
121002
  },
120952
121003
  {
120953
121004
  "kind": "field",
120954
- "name": "maybeDisabledInteractive",
120955
- "type": {
120956
- "text": "boolean | undefined"
120957
- },
121005
+ "name": "_languageController",
121006
+ "privacy": "private",
121007
+ "default": "new SbbLanguageController(this)"
121008
+ },
121009
+ {
121010
+ "kind": "method",
121011
+ "name": "renderTemplate",
120958
121012
  "privacy": "protected",
120959
- "readonly": true,
121013
+ "return": {
121014
+ "type": {
121015
+ "text": "TemplateResult"
121016
+ }
121017
+ },
121018
+ "description": "Override this method to render the component template.",
120960
121019
  "inheritedFrom": {
120961
121020
  "name": "SbbActionBaseElement",
120962
121021
  "module": "core/base-elements/action-base-element.js"
@@ -120964,518 +121023,483 @@
120964
121023
  },
120965
121024
  {
120966
121025
  "kind": "method",
120967
- "name": "setupBaseEventHandlers",
121026
+ "name": "renderIconName",
120968
121027
  "privacy": "protected",
120969
121028
  "return": {
120970
121029
  "type": {
120971
- "text": "void"
121030
+ "text": "string"
120972
121031
  }
120973
121032
  },
120974
121033
  "inheritedFrom": {
120975
- "name": "SbbActionBaseElement",
120976
- "module": "core/base-elements/action-base-element.js"
121034
+ "name": "SbbIconNameMixin",
121035
+ "module": "icon/icon-name-mixin.js"
120977
121036
  }
120978
121037
  },
120979
121038
  {
120980
121039
  "kind": "field",
120981
- "name": "_hydrationRequired",
121040
+ "name": "size",
120982
121041
  "type": {
120983
- "text": "boolean"
121042
+ "text": "SbbButtonSize"
120984
121043
  },
120985
- "privacy": "private",
120986
- "default": "!!this.shadowRoot",
121044
+ "privacy": "public",
121045
+ "description": "Size variant, either l, m or s.",
121046
+ "default": "'s'",
121047
+ "attribute": "size",
121048
+ "reflects": true,
120987
121049
  "inheritedFrom": {
120988
- "name": "SbbElement",
120989
- "module": "core/base-elements/element.js"
121050
+ "name": "SbbButtonCommonElementMixin",
121051
+ "module": "button/common/button-common.js"
120990
121052
  }
120991
121053
  },
120992
121054
  {
120993
121055
  "kind": "field",
120994
- "name": "_hydrationComplete",
120995
- "privacy": "private",
120996
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
121056
+ "name": "loading",
121057
+ "type": {
121058
+ "text": "boolean"
121059
+ },
121060
+ "privacy": "public",
121061
+ "default": "false",
121062
+ "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
121063
+ "attribute": "loading",
121064
+ "reflects": true,
120997
121065
  "inheritedFrom": {
120998
- "name": "SbbElement",
120999
- "module": "core/base-elements/element.js"
121066
+ "name": "SbbButtonCommonElementMixin",
121067
+ "module": "button/common/button-common.js"
121000
121068
  }
121001
121069
  },
121002
121070
  {
121003
121071
  "kind": "field",
121004
- "name": "_resolveHydration",
121072
+ "name": "negative",
121005
121073
  "type": {
121006
- "text": "(hydrationRequired: boolean) => void"
121074
+ "text": "boolean"
121007
121075
  },
121008
- "privacy": "private",
121076
+ "privacy": "public",
121077
+ "default": "false",
121078
+ "description": "Negative coloring variant flag.",
121079
+ "attribute": "negative",
121080
+ "reflects": true,
121009
121081
  "inheritedFrom": {
121010
- "name": "SbbElement",
121011
- "module": "core/base-elements/element.js"
121082
+ "name": "SbbNegativeMixin",
121083
+ "module": "core/mixins/negative-mixin.js"
121012
121084
  }
121013
121085
  },
121014
121086
  {
121015
121087
  "kind": "field",
121016
- "name": "hydrationRequired",
121088
+ "name": "iconName",
121017
121089
  "type": {
121018
- "text": "boolean"
121090
+ "text": "string"
121019
121091
  },
121020
- "privacy": "protected",
121021
- "description": "Returns whether hydration is required and not completed.",
121022
- "readonly": true,
121092
+ "privacy": "public",
121093
+ "default": "''",
121094
+ "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.",
121095
+ "attribute": "icon-name",
121023
121096
  "inheritedFrom": {
121024
- "name": "SbbElement",
121025
- "module": "core/base-elements/element.js"
121026
- },
121027
- "default": "!!this.shadowRoot"
121097
+ "name": "SbbIconNameMixin",
121098
+ "module": "icon/icon-name-mixin.js"
121099
+ }
121028
121100
  },
121029
121101
  {
121030
121102
  "kind": "method",
121031
- "name": "toggleState",
121103
+ "name": "renderIconSlot",
121032
121104
  "privacy": "protected",
121033
121105
  "return": {
121034
121106
  "type": {
121035
- "text": "void"
121107
+ "text": "TemplateResult"
121036
121108
  }
121037
121109
  },
121038
121110
  "parameters": [
121039
121111
  {
121040
- "name": "value",
121041
- "type": {
121042
- "text": "string"
121043
- }
121044
- },
121045
- {
121046
- "name": "force",
121112
+ "name": "classname",
121047
121113
  "optional": true,
121048
121114
  "type": {
121049
- "text": "boolean"
121115
+ "text": "string"
121050
121116
  }
121051
121117
  }
121052
121118
  ],
121053
121119
  "inheritedFrom": {
121054
- "name": "SbbElement",
121055
- "module": "core/base-elements/element.js"
121056
- }
121057
- },
121058
- {
121059
- "kind": "field",
121060
- "name": "['_$sbbElement$']",
121061
- "type": {
121062
- "text": "boolean"
121063
- },
121064
- "privacy": "public",
121065
- "static": true,
121066
- "default": "true",
121067
- "inheritedFrom": {
121068
- "name": "SbbElement",
121069
- "module": "core/base-elements/element.js"
121120
+ "name": "SbbIconNameMixin",
121121
+ "module": "icon/icon-name-mixin.js"
121070
121122
  }
121071
121123
  },
121072
121124
  {
121073
- "kind": "field",
121074
- "name": "_controllers",
121075
- "type": {
121076
- "text": "Set<SbbReactiveController> | undefined"
121077
- },
121125
+ "kind": "method",
121126
+ "name": "_renderIconName",
121078
121127
  "privacy": "private",
121079
- "inheritedFrom": {
121080
- "name": "SbbElement",
121081
- "module": "core/base-elements/element.js"
121082
- }
121083
- }
121084
- ],
121085
- "superclass": {
121086
- "name": "SbbSecondaryButtonElement",
121087
- "module": "button.pure.js"
121088
- },
121089
- "tagName": "sbb-sidebar-close-button",
121090
- "customElement": true,
121091
- "attributes": [
121092
- {
121093
- "name": "size",
121094
- "type": {
121095
- "text": "SbbButtonSize"
121128
+ "return": {
121129
+ "type": {
121130
+ "text": "string"
121131
+ }
121096
121132
  },
121097
- "description": "Size variant, either l, m or s.",
121098
- "default": "'l' / 's' (lean)",
121099
- "fieldName": "size",
121100
121133
  "inheritedFrom": {
121101
- "name": "SbbButtonCommonElementMixin",
121102
- "module": "button/common/button-common.js"
121134
+ "name": "SbbIconNameMixin",
121135
+ "module": "icon/icon-name-mixin.js"
121103
121136
  }
121104
121137
  },
121105
121138
  {
121106
- "name": "loading",
121139
+ "kind": "field",
121140
+ "name": "disabledInteractive",
121107
121141
  "type": {
121108
121142
  "text": "boolean"
121109
121143
  },
121144
+ "privacy": "public",
121110
121145
  "default": "false",
121111
- "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
121112
- "fieldName": "loading",
121146
+ "description": "Whether the button should be aria-disabled but stay interactive.",
121147
+ "attribute": "disabled-interactive",
121148
+ "reflects": true,
121113
121149
  "inheritedFrom": {
121114
- "name": "SbbButtonCommonElementMixin",
121115
- "module": "button/common/button-common.js"
121150
+ "name": "SbbDisabledInteractiveMixin",
121151
+ "module": "core/mixins/disabled-mixin.js"
121116
121152
  }
121117
121153
  },
121118
121154
  {
121119
- "name": "negative",
121155
+ "kind": "field",
121156
+ "name": "disabled",
121157
+ "privacy": "public",
121158
+ "description": "Whether the component is disabled.",
121159
+ "default": "false",
121120
121160
  "type": {
121121
121161
  "text": "boolean"
121122
121162
  },
121123
- "default": "false",
121124
- "description": "Negative coloring variant flag.",
121125
- "fieldName": "negative",
121163
+ "attribute": "disabled",
121164
+ "reflects": true,
121126
121165
  "inheritedFrom": {
121127
- "name": "SbbNegativeMixin",
121128
- "module": "core/mixins/negative-mixin.js"
121166
+ "name": "SbbDisabledMixin",
121167
+ "module": "core/mixins/disabled-mixin.js"
121129
121168
  }
121130
121169
  },
121131
121170
  {
121132
- "name": "icon-name",
121171
+ "kind": "field",
121172
+ "name": "#disabled",
121173
+ "privacy": "private",
121133
121174
  "type": {
121134
- "text": "string"
121175
+ "text": "boolean"
121135
121176
  },
121136
- "default": "''",
121137
- "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.",
121138
- "fieldName": "iconName",
121177
+ "default": "false",
121139
121178
  "inheritedFrom": {
121140
- "name": "SbbIconNameMixin",
121141
- "module": "icon/icon-name-mixin.js"
121179
+ "name": "SbbDisabledMixin",
121180
+ "module": "core/mixins/disabled-mixin.js"
121142
121181
  }
121143
121182
  },
121144
121183
  {
121145
- "name": "disabled-interactive",
121146
- "type": {
121147
- "text": "boolean"
121184
+ "kind": "method",
121185
+ "name": "isDisabledExternally",
121186
+ "privacy": "protected",
121187
+ "return": {
121188
+ "type": {
121189
+ "text": "boolean"
121190
+ }
121148
121191
  },
121149
- "default": "false",
121150
- "description": "Whether the button should be aria-disabled but stay interactive.",
121151
- "fieldName": "disabledInteractive",
121192
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
121152
121193
  "inheritedFrom": {
121153
- "name": "SbbDisabledInteractiveMixin",
121194
+ "name": "SbbDisabledMixin",
121154
121195
  "module": "core/mixins/disabled-mixin.js"
121155
121196
  }
121156
121197
  },
121157
121198
  {
121158
- "name": "disabled",
121159
- "description": "Whether the component is disabled.",
121160
- "default": "false",
121199
+ "kind": "field",
121200
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
121161
121201
  "type": {
121162
- "text": "boolean"
121202
+ "text": "array"
121163
121203
  },
121164
- "fieldName": "disabled",
121204
+ "privacy": "private",
121205
+ "readonly": true,
121206
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
121165
121207
  "inheritedFrom": {
121166
- "name": "SbbDisabledMixin",
121167
- "module": "core/mixins/disabled-mixin.js"
121208
+ "name": "SbbButtonBaseElement",
121209
+ "module": "core/base-elements/button-base-element.js"
121168
121210
  }
121169
121211
  },
121170
121212
  {
121213
+ "kind": "field",
121171
121214
  "name": "value",
121172
121215
  "type": {
121173
121216
  "text": "string"
121174
121217
  },
121175
- "default": "''",
121176
- "description": "Value of the form element.",
121177
- "fieldName": "value",
121218
+ "privacy": "public",
121178
121219
  "inheritedFrom": {
121179
121220
  "name": "SbbButtonBaseElement",
121180
121221
  "module": "core/base-elements/button-base-element.js"
121181
- }
121222
+ },
121223
+ "default": "''",
121224
+ "description": "Value of the form element.",
121225
+ "attribute": "value"
121182
121226
  },
121183
121227
  {
121228
+ "kind": "field",
121184
121229
  "name": "type",
121230
+ "privacy": "public",
121185
121231
  "description": "The type attribute to use for the button.",
121186
121232
  "default": "'button'",
121187
121233
  "type": {
121188
121234
  "text": "SbbButtonType"
121189
121235
  },
121190
- "fieldName": "type",
121236
+ "attribute": "type",
121191
121237
  "inheritedFrom": {
121192
121238
  "name": "SbbButtonBaseElement",
121193
121239
  "module": "core/base-elements/button-base-element.js"
121194
121240
  }
121195
121241
  },
121196
121242
  {
121243
+ "kind": "field",
121197
121244
  "name": "form",
121198
- "description": "The `<form>` element to associate the button with.",
121199
121245
  "type": {
121200
121246
  "text": "HTMLFormElement | null"
121201
121247
  },
121202
- "fieldName": "form",
121248
+ "privacy": "public",
121249
+ "description": "The `<form>` element to associate the button with.",
121203
121250
  "inheritedFrom": {
121204
121251
  "name": "SbbButtonBaseElement",
121205
121252
  "module": "core/base-elements/button-base-element.js"
121206
- }
121253
+ },
121254
+ "attribute": "form"
121207
121255
  },
121208
121256
  {
121209
- "name": "name",
121210
- "description": "Name of the form element. Will be read from name attribute.",
121257
+ "kind": "field",
121258
+ "name": "_formId",
121211
121259
  "type": {
121212
121260
  "text": "string"
121213
121261
  },
121214
- "fieldName": "name",
121262
+ "privacy": "private",
121263
+ "default": "''",
121215
121264
  "inheritedFrom": {
121216
- "name": "SbbFormAssociatedMixin",
121217
- "module": "core/mixins/form-associated-mixin.js"
121265
+ "name": "SbbButtonBaseElement",
121266
+ "module": "core/base-elements/button-base-element.js"
121218
121267
  }
121219
- }
121220
- ],
121221
- "cssProperties": [
121268
+ },
121222
121269
  {
121223
- "description": "The delay before the loading animation starts, when setting the button into loading state.",
121224
- "name": "--sbb-button-loading-delay",
121225
- "default": "300ms",
121270
+ "kind": "field",
121271
+ "name": "_handleButtonClick",
121272
+ "privacy": "private",
121226
121273
  "inheritedFrom": {
121227
- "name": "SbbSecondaryButtonElement",
121228
- "module": "button/secondary-button/secondary-button.component.js"
121274
+ "name": "SbbButtonBaseElement",
121275
+ "module": "core/base-elements/button-base-element.js"
121229
121276
  }
121230
- }
121231
- ]
121232
- }
121233
- ],
121234
- "exports": [
121235
- {
121236
- "kind": "js",
121237
- "name": "SbbSidebarCloseButtonElement",
121238
- "declaration": {
121239
- "name": "SbbSidebarCloseButtonElement",
121240
- "module": "sidebar/sidebar-close-button/sidebar-close-button.component.js"
121241
- }
121242
- }
121243
- ]
121244
- },
121245
- {
121246
- "kind": "javascript-module",
121247
- "path": "sidebar/sidebar/sidebar.component.js",
121248
- "declarations": [
121249
- {
121250
- "kind": "class",
121251
- "description": "This component corresponds to a sidebar that can be opened on the sidebar container.",
121252
- "name": "SbbSidebarElement",
121253
- "slots": [
121254
- {
121255
- "description": "Use the unnamed slot to slot any content into the sidebar.",
121256
- "name": ""
121257
121277
  },
121258
121278
  {
121259
- "description": "Use the title slot to add an <sbb-title>.",
121260
- "name": "title"
121261
- }
121262
- ],
121263
- "members": [
121264
- {
121265
- "kind": "field",
121266
- "name": "elementName",
121267
- "type": {
121268
- "text": "string"
121279
+ "kind": "method",
121280
+ "name": "_requestSubmit",
121281
+ "privacy": "private",
121282
+ "return": {
121283
+ "type": {
121284
+ "text": "void"
121285
+ }
121269
121286
  },
121270
- "privacy": "public",
121271
- "static": true,
121272
- "readonly": true,
121287
+ "parameters": [
121288
+ {
121289
+ "name": "form",
121290
+ "type": {
121291
+ "text": "HTMLFormElement"
121292
+ }
121293
+ }
121294
+ ],
121273
121295
  "inheritedFrom": {
121274
- "name": "SbbElement",
121275
- "module": "core/base-elements/element.js"
121276
- },
121277
- "default": "'sbb-sidebar'"
121296
+ "name": "SbbButtonBaseElement",
121297
+ "module": "core/base-elements/button-base-element.js"
121298
+ }
121278
121299
  },
121279
121300
  {
121280
121301
  "kind": "field",
121281
- "name": "color",
121282
- "type": {
121283
- "text": "'white' | 'milk'"
121284
- },
121285
- "privacy": "public",
121286
- "default": "'white'",
121287
- "description": "Background color of the sidebar. Either `white` or `milk`.",
121288
- "attribute": "color",
121289
- "reflects": true
121302
+ "name": "_formKeyDown",
121303
+ "privacy": "private",
121304
+ "inheritedFrom": {
121305
+ "name": "SbbButtonBaseElement",
121306
+ "module": "core/base-elements/button-base-element.js"
121307
+ }
121290
121308
  },
121291
121309
  {
121292
121310
  "kind": "field",
121293
- "name": "mode",
121311
+ "name": "formAssociated",
121294
121312
  "type": {
121295
- "text": "'side' | 'over'"
121313
+ "text": "boolean"
121296
121314
  },
121297
121315
  "privacy": "public",
121298
- "default": "'side'",
121299
- "description": "Mode of the sidebar; one of 'side' or 'over'.",
121300
- "attribute": "mode",
121301
- "reflects": true
121316
+ "static": true,
121317
+ "default": "true",
121318
+ "inheritedFrom": {
121319
+ "name": "SbbFormAssociatedMixin",
121320
+ "module": "core/mixins/form-associated-mixin.js"
121321
+ }
121302
121322
  },
121303
121323
  {
121304
121324
  "kind": "field",
121305
- "name": "position",
121325
+ "name": "name",
121326
+ "privacy": "public",
121327
+ "description": "Name of the form element. Will be read from name attribute.",
121306
121328
  "type": {
121307
- "text": "'start' | 'end'"
121329
+ "text": "string"
121308
121330
  },
121309
- "privacy": "public",
121310
- "default": "'start'",
121311
- "description": "The side that the sidebar is attached to.",
121312
- "attribute": "position",
121313
- "reflects": true
121331
+ "attribute": "name",
121332
+ "inheritedFrom": {
121333
+ "name": "SbbFormAssociatedMixin",
121334
+ "module": "core/mixins/form-associated-mixin.js"
121335
+ }
121314
121336
  },
121315
121337
  {
121316
121338
  "kind": "field",
121317
- "name": "opened",
121339
+ "name": "validity",
121318
121340
  "type": {
121319
- "text": "boolean"
121341
+ "text": "ValidityState"
121320
121342
  },
121321
121343
  "privacy": "public",
121322
- "default": "false",
121323
- "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
121324
- "attribute": "opened",
121325
- "reflects": true
121344
+ "description": "Returns the ValidityState object for this element.",
121345
+ "readonly": true,
121346
+ "inheritedFrom": {
121347
+ "name": "SbbFormAssociatedMixin",
121348
+ "module": "core/mixins/form-associated-mixin.js"
121349
+ }
121326
121350
  },
121327
121351
  {
121328
121352
  "kind": "field",
121329
- "name": "focusOnOpen",
121353
+ "name": "validationMessage",
121330
121354
  "type": {
121331
- "text": "boolean"
121355
+ "text": "string"
121332
121356
  },
121333
121357
  "privacy": "public",
121334
- "default": "false",
121335
- "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
121336
- "attribute": "focus-on-open"
121358
+ "description": "Returns the current error message, if available, which corresponds\nto the current validation state.\nPlease note that only one message is returned at a time (e.g. if\nmultiple validity states are invalid, only the chronologically first one\nis returned until it is fixed, at which point the next message might be\nreturned, if it is still applicable). Also, a custom validity message\n(see below) has precedence over native validation messages.",
121359
+ "readonly": true,
121360
+ "inheritedFrom": {
121361
+ "name": "SbbFormAssociatedMixin",
121362
+ "module": "core/mixins/form-associated-mixin.js"
121363
+ }
121337
121364
  },
121338
121365
  {
121339
121366
  "kind": "field",
121340
- "name": "container",
121367
+ "name": "willValidate",
121341
121368
  "type": {
121342
- "text": "SbbSidebarContainerElement | null"
121369
+ "text": "boolean"
121343
121370
  },
121344
121371
  "privacy": "public",
121345
- "description": "Returns the SbbSidebarContainerElement where this sidebar is contained.",
121372
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
121346
121373
  "readonly": true,
121347
- "default": "null"
121374
+ "inheritedFrom": {
121375
+ "name": "SbbFormAssociatedMixin",
121376
+ "module": "core/mixins/form-associated-mixin.js"
121377
+ }
121348
121378
  },
121349
121379
  {
121350
121380
  "kind": "field",
121351
- "name": "_container",
121352
- "type": {
121353
- "text": "SbbSidebarContainerElement | null"
121354
- },
121381
+ "name": "_validityStates",
121355
121382
  "privacy": "private",
121356
- "default": "null"
121383
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
121384
+ "inheritedFrom": {
121385
+ "name": "SbbFormAssociatedMixin",
121386
+ "module": "core/mixins/form-associated-mixin.js"
121387
+ }
121357
121388
  },
121358
121389
  {
121359
121390
  "kind": "field",
121360
- "name": "_lastFocusedElement",
121391
+ "name": "formDisabled",
121361
121392
  "type": {
121362
- "text": "HTMLElement | null"
121363
- },
121364
- "privacy": "private",
121365
- "default": "null"
121366
- },
121367
- {
121368
- "kind": "field",
121369
- "name": "_focusTrapController",
121370
- "privacy": "private",
121371
- "default": "new SbbFocusTrapController(this)"
121372
- },
121373
- {
121374
- "kind": "field",
121375
- "name": "_escapableOverlayController",
121376
- "privacy": "private",
121377
- "default": "new SbbEscapableOverlayController(this)"
121378
- },
121379
- {
121380
- "kind": "field",
121381
- "name": "_closeOnNavigation",
121382
- "privacy": "private"
121383
- },
121384
- {
121385
- "kind": "method",
121386
- "name": "toggle",
121387
- "privacy": "public",
121388
- "return": {
121389
- "type": {
121390
- "text": "void"
121391
- }
121392
- },
121393
- "description": "Toggles the sidebar visibility."
121394
- },
121395
- {
121396
- "kind": "method",
121397
- "name": "open",
121398
- "privacy": "public",
121399
- "return": {
121400
- "type": {
121401
- "text": "void"
121402
- }
121393
+ "text": "boolean"
121403
121394
  },
121404
- "description": "Opens the sidebar.",
121395
+ "privacy": "protected",
121396
+ "default": "false",
121397
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
121405
121398
  "inheritedFrom": {
121406
- "name": "SbbOpenCloseBaseElement",
121407
- "module": "core/base-elements/open-close-base-element.js"
121399
+ "name": "SbbFormAssociatedMixin",
121400
+ "module": "core/mixins/form-associated-mixin.js"
121408
121401
  }
121409
121402
  },
121410
121403
  {
121411
121404
  "kind": "method",
121412
- "name": "_isZeroAnimationDuration",
121413
- "privacy": "private",
121405
+ "name": "checkValidity",
121406
+ "privacy": "public",
121414
121407
  "return": {
121415
121408
  "type": {
121416
121409
  "text": "boolean"
121417
121410
  }
121411
+ },
121412
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
121413
+ "inheritedFrom": {
121414
+ "name": "SbbFormAssociatedMixin",
121415
+ "module": "core/mixins/form-associated-mixin.js"
121418
121416
  }
121419
121417
  },
121420
121418
  {
121421
121419
  "kind": "method",
121422
- "name": "_handleOpening",
121423
- "privacy": "private",
121420
+ "name": "reportValidity",
121421
+ "privacy": "public",
121424
121422
  "return": {
121425
121423
  "type": {
121426
- "text": "void"
121424
+ "text": "boolean"
121427
121425
  }
121426
+ },
121427
+ "description": "Returns true if this element has no validity problems; otherwise,\nreturns false, fires an invalid event at the element,\nand (if the event isn't canceled) reports the problem to the user.",
121428
+ "inheritedFrom": {
121429
+ "name": "SbbFormAssociatedMixin",
121430
+ "module": "core/mixins/form-associated-mixin.js"
121428
121431
  }
121429
121432
  },
121430
121433
  {
121431
121434
  "kind": "method",
121432
- "name": "close",
121435
+ "name": "setCustomValidity",
121433
121436
  "privacy": "public",
121434
121437
  "return": {
121435
121438
  "type": {
121436
121439
  "text": "void"
121437
121440
  }
121438
121441
  },
121439
- "description": "Closes the sidebar.",
121442
+ "parameters": [
121443
+ {
121444
+ "name": "message",
121445
+ "type": {
121446
+ "text": "string"
121447
+ }
121448
+ }
121449
+ ],
121450
+ "description": "Sets the custom validity message for this element. Use the empty string\nto indicate that the element does not have a custom validity error.",
121440
121451
  "inheritedFrom": {
121441
- "name": "SbbOpenCloseBaseElement",
121442
- "module": "core/base-elements/open-close-base-element.js"
121452
+ "name": "SbbFormAssociatedMixin",
121453
+ "module": "core/mixins/form-associated-mixin.js"
121443
121454
  }
121444
121455
  },
121445
121456
  {
121446
121457
  "kind": "method",
121447
- "name": "_handleClosing",
121458
+ "name": "_hasDisabledAncestor",
121448
121459
  "privacy": "private",
121449
121460
  "return": {
121450
121461
  "type": {
121451
- "text": "void"
121462
+ "text": "boolean"
121452
121463
  }
121464
+ },
121465
+ "inheritedFrom": {
121466
+ "name": "SbbFormAssociatedMixin",
121467
+ "module": "core/mixins/form-associated-mixin.js"
121453
121468
  }
121454
121469
  },
121455
121470
  {
121456
121471
  "kind": "method",
121457
- "name": "_takeFocus",
121458
- "privacy": "private",
121472
+ "name": "updateFormValue",
121473
+ "privacy": "protected",
121459
121474
  "return": {
121460
121475
  "type": {
121461
121476
  "text": "void"
121462
121477
  }
121478
+ },
121479
+ "description": "Should be called when form value is changed.\nAdapts and sets the formValue in the supported format (string | FormData | File | null)\nhttps://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/setFormValue",
121480
+ "inheritedFrom": {
121481
+ "name": "SbbFormAssociatedMixin",
121482
+ "module": "core/mixins/form-associated-mixin.js"
121463
121483
  }
121464
121484
  },
121465
121485
  {
121466
121486
  "kind": "method",
121467
- "name": "cedeFocus",
121487
+ "name": "formState",
121468
121488
  "privacy": "protected",
121469
121489
  "return": {
121470
121490
  "type": {
121471
- "text": "void"
121491
+ "text": "FormRestoreState"
121472
121492
  }
121493
+ },
121494
+ "inheritedFrom": {
121495
+ "name": "SbbFormAssociatedMixin",
121496
+ "module": "core/mixins/form-associated-mixin.js"
121473
121497
  }
121474
121498
  },
121475
121499
  {
121476
121500
  "kind": "method",
121477
- "name": "_updateSidebarWidth",
121478
- "privacy": "private",
121501
+ "name": "setValidityFlag",
121502
+ "privacy": "protected",
121479
121503
  "return": {
121480
121504
  "type": {
121481
121505
  "text": "void"
@@ -121483,44 +121507,35 @@
121483
121507
  },
121484
121508
  "parameters": [
121485
121509
  {
121486
- "name": "oldPosition",
121487
- "optional": true,
121510
+ "name": "flag",
121488
121511
  "type": {
121489
- "text": "this['position']"
121512
+ "text": "T"
121490
121513
  }
121491
- }
121492
- ]
121493
- },
121494
- {
121495
- "kind": "method",
121496
- "name": "_buildCssWidthVar",
121497
- "privacy": "private",
121498
- "return": {
121499
- "type": {
121500
- "text": "string"
121501
- }
121502
- },
121503
- "parameters": [
121514
+ },
121504
121515
  {
121505
- "name": "position",
121506
- "default": "this.position"
121507
- }
121508
- ]
121509
- },
121510
- {
121511
- "kind": "method",
121512
- "name": "_isModeOver",
121513
- "privacy": "private",
121514
- "return": {
121515
- "type": {
121516
- "text": "boolean"
121516
+ "name": "message",
121517
+ "type": {
121518
+ "text": "string"
121519
+ }
121520
+ },
121521
+ {
121522
+ "name": "flagValue",
121523
+ "optional": true,
121524
+ "type": {
121525
+ "text": "ValidityStateFlags[T]"
121526
+ }
121517
121527
  }
121528
+ ],
121529
+ "description": "Marks this element as suffering from the constraint indicated by the\nflag argument and associates the given message to it.\nNote that only one message is displayed at a time and custom messages by\nconsumers are always displayed before internal messages and internal\nmessages are displayed in the order they were added.\nTo set/define custom validity state flags, you need to extend the\nValidityState prototype (and the CustomValidityState interface).",
121530
+ "inheritedFrom": {
121531
+ "name": "SbbFormAssociatedMixin",
121532
+ "module": "core/mixins/form-associated-mixin.js"
121518
121533
  }
121519
121534
  },
121520
121535
  {
121521
121536
  "kind": "method",
121522
- "name": "_onTransitionEnd",
121523
- "privacy": "private",
121537
+ "name": "removeValidityFlag",
121538
+ "privacy": "protected",
121524
121539
  "return": {
121525
121540
  "type": {
121526
121541
  "text": "void"
@@ -121528,230 +121543,173 @@
121528
121543
  },
121529
121544
  "parameters": [
121530
121545
  {
121531
- "name": "event",
121546
+ "name": "flag",
121532
121547
  "type": {
121533
- "text": "TransitionEvent"
121548
+ "text": "T"
121534
121549
  }
121535
121550
  }
121536
- ]
121537
- },
121538
- {
121539
- "kind": "method",
121540
- "name": "_detectScrolledState",
121541
- "privacy": "private",
121542
- "return": {
121543
- "type": {
121544
- "text": "void"
121545
- }
121546
- }
121547
- },
121548
- {
121549
- "kind": "field",
121550
- "name": "isAnimating",
121551
- "type": {
121552
- "text": "boolean"
121553
- },
121554
- "privacy": "public",
121555
- "default": "false",
121556
- "description": "Whether the component is currently animating.",
121557
- "inheritedFrom": {
121558
- "name": "SbbAnimationCompleteMixin",
121559
- "module": "core/mixins/animation-complete-mixin.js"
121560
- }
121561
- },
121562
- {
121563
- "kind": "field",
121564
- "name": "animationComplete",
121565
- "type": {
121566
- "text": "Promise<void>"
121567
- },
121568
- "privacy": "public",
121569
- "description": "Returns a promise which completes whenever an animation ends.\nWhen a new animation starts, a new Promise is returned.",
121570
- "readonly": true,
121571
- "inheritedFrom": {
121572
- "name": "SbbAnimationCompleteMixin",
121573
- "module": "core/mixins/animation-complete-mixin.js"
121574
- }
121575
- },
121576
- {
121577
- "kind": "field",
121578
- "name": "_animationPromise",
121579
- "type": {
121580
- "text": "Promise<void>"
121581
- },
121582
- "privacy": "private",
121551
+ ],
121552
+ "description": "Removes the validity state flag entry and updates validity state.",
121583
121553
  "inheritedFrom": {
121584
- "name": "SbbAnimationCompleteMixin",
121585
- "module": "core/mixins/animation-complete-mixin.js"
121554
+ "name": "SbbFormAssociatedMixin",
121555
+ "module": "core/mixins/form-associated-mixin.js"
121586
121556
  }
121587
121557
  },
121588
121558
  {
121589
121559
  "kind": "method",
121590
- "name": "startAnimation",
121560
+ "name": "validate",
121591
121561
  "privacy": "protected",
121592
121562
  "return": {
121593
121563
  "type": {
121594
121564
  "text": "void"
121595
121565
  }
121596
121566
  },
121567
+ "description": "To be called whenever the current element needs to be validated.",
121597
121568
  "inheritedFrom": {
121598
- "name": "SbbAnimationCompleteMixin",
121599
- "module": "core/mixins/animation-complete-mixin.js"
121569
+ "name": "SbbFormAssociatedMixin",
121570
+ "module": "core/mixins/form-associated-mixin.js"
121600
121571
  }
121601
121572
  },
121602
121573
  {
121603
121574
  "kind": "method",
121604
- "name": "stopAnimation",
121575
+ "name": "shouldValidate",
121605
121576
  "privacy": "protected",
121606
121577
  "return": {
121607
121578
  "type": {
121608
- "text": "void"
121579
+ "text": "boolean"
121609
121580
  }
121610
121581
  },
121611
- "description": "Overriding stopAnimation() breaks functionality.",
121582
+ "parameters": [
121583
+ {
121584
+ "name": "name",
121585
+ "type": {
121586
+ "text": "PropertyKey | undefined"
121587
+ }
121588
+ }
121589
+ ],
121590
+ "description": "Whether validation should be run on a property change with the given name.",
121612
121591
  "inheritedFrom": {
121613
- "name": "SbbAnimationCompleteMixin",
121614
- "module": "core/mixins/animation-complete-mixin.js"
121592
+ "name": "SbbFormAssociatedMixin",
121593
+ "module": "core/mixins/form-associated-mixin.js"
121615
121594
  }
121616
121595
  },
121617
121596
  {
121618
121597
  "kind": "method",
121619
- "name": "_enqueueAnimation",
121598
+ "name": "_setInternalValidity",
121620
121599
  "privacy": "private",
121621
121600
  "return": {
121622
121601
  "type": {
121623
- "text": "Promise<void>"
121602
+ "text": "void"
121624
121603
  }
121625
121604
  },
121626
121605
  "inheritedFrom": {
121627
- "name": "SbbAnimationCompleteMixin",
121628
- "module": "core/mixins/animation-complete-mixin.js"
121606
+ "name": "SbbFormAssociatedMixin",
121607
+ "module": "core/mixins/form-associated-mixin.js"
121629
121608
  }
121630
121609
  },
121631
121610
  {
121632
121611
  "kind": "field",
121633
- "name": "events",
121612
+ "name": "role",
121613
+ "type": {
121614
+ "text": "ElementInternals['role']"
121615
+ },
121634
121616
  "privacy": "public",
121635
121617
  "static": true,
121636
121618
  "readonly": true,
121637
- "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
121638
- "type": {
121639
- "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
121640
- },
121641
- "inheritedFrom": {
121642
- "name": "SbbOpenCloseBaseElement",
121643
- "module": "core/base-elements/open-close-base-element.js"
121644
- }
121645
- },
121646
- {
121647
- "kind": "field",
121648
- "name": "state",
121649
- "privacy": "protected",
121650
- "description": "The state of the component.",
121651
- "type": {
121652
- "text": "SbbOpenedClosedState"
121653
- },
121654
- "default": "'closed'",
121619
+ "default": "'button'",
121655
121620
  "inheritedFrom": {
121656
- "name": "SbbOpenCloseBaseElement",
121657
- "module": "core/base-elements/open-close-base-element.js"
121621
+ "name": "SbbButtonLikeBaseElement",
121622
+ "module": "core/base-elements/button-base-element.js"
121658
121623
  }
121659
121624
  },
121660
121625
  {
121661
121626
  "kind": "field",
121662
- "name": "_state",
121663
- "type": {
121664
- "text": "SbbOpenedClosedState"
121665
- },
121627
+ "name": "_preventScrollOnSpaceKeydown",
121666
121628
  "privacy": "private",
121667
- "inheritedFrom": {
121668
- "name": "SbbOpenCloseBaseElement",
121669
- "module": "core/base-elements/open-close-base-element.js"
121629
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
121630
+ "parameters": [
121631
+ {
121632
+ "description": "The origin event.",
121633
+ "name": "event"
121634
+ }
121635
+ ],
121636
+ "inheritedFrom": {
121637
+ "name": "SbbButtonLikeBaseElement",
121638
+ "module": "core/base-elements/button-base-element.js"
121670
121639
  }
121671
121640
  },
121672
121641
  {
121673
121642
  "kind": "field",
121674
- "name": "isOpen",
121675
- "type": {
121676
- "text": "boolean"
121677
- },
121678
- "privacy": "public",
121679
- "description": "Whether the element is open.",
121680
- "readonly": true,
121643
+ "name": "_removeActiveMarker",
121644
+ "privacy": "private",
121681
121645
  "inheritedFrom": {
121682
- "name": "SbbOpenCloseBaseElement",
121683
- "module": "core/base-elements/open-close-base-element.js"
121646
+ "name": "SbbButtonLikeBaseElement",
121647
+ "module": "core/base-elements/button-base-element.js"
121684
121648
  }
121685
121649
  },
121686
121650
  {
121687
- "kind": "method",
121688
- "name": "escapeStrategy",
121689
- "privacy": "public",
121690
- "return": {
121691
- "type": {
121692
- "text": "void"
121651
+ "kind": "field",
121652
+ "name": "_dispatchClickEventOnSpaceKeyup",
121653
+ "privacy": "private",
121654
+ "description": "Dispatches a 'click' PointerEvent if the original keyboard event is a 'Space' press.\nAs verified with the native button, when 'Space' is pressed, a 'click' event is dispatched\nafter the 'keyup' event.",
121655
+ "parameters": [
121656
+ {
121657
+ "description": "The origin event.",
121658
+ "name": "event"
121693
121659
  }
121694
- },
121695
- "description": "The method which is called on escape key press. Defaults to calling close()",
121660
+ ],
121696
121661
  "inheritedFrom": {
121697
- "name": "SbbOpenCloseBaseElement",
121698
- "module": "core/base-elements/open-close-base-element.js"
121662
+ "name": "SbbButtonLikeBaseElement",
121663
+ "module": "core/base-elements/button-base-element.js"
121699
121664
  }
121700
121665
  },
121701
121666
  {
121702
- "kind": "method",
121703
- "name": "dispatchBeforeOpenEvent",
121704
- "privacy": "protected",
121705
- "return": {
121706
- "type": {
121707
- "text": "boolean"
121708
- }
121709
- },
121667
+ "kind": "field",
121668
+ "name": "_dispatchClickEvent",
121669
+ "privacy": "private",
121710
121670
  "inheritedFrom": {
121711
- "name": "SbbOpenCloseBaseElement",
121712
- "module": "core/base-elements/open-close-base-element.js"
121671
+ "name": "SbbButtonLikeBaseElement",
121672
+ "module": "core/base-elements/button-base-element.js"
121713
121673
  }
121714
121674
  },
121715
121675
  {
121716
- "kind": "method",
121717
- "name": "dispatchOpenEvent",
121718
- "privacy": "protected",
121719
- "return": {
121720
- "type": {
121721
- "text": "boolean"
121722
- }
121676
+ "kind": "field",
121677
+ "name": "maybeDisabled",
121678
+ "type": {
121679
+ "text": "boolean | undefined"
121723
121680
  },
121681
+ "privacy": "protected",
121682
+ "readonly": true,
121724
121683
  "inheritedFrom": {
121725
- "name": "SbbOpenCloseBaseElement",
121726
- "module": "core/base-elements/open-close-base-element.js"
121684
+ "name": "SbbActionBaseElement",
121685
+ "module": "core/base-elements/action-base-element.js"
121727
121686
  }
121728
121687
  },
121729
121688
  {
121730
- "kind": "method",
121731
- "name": "dispatchBeforeCloseEvent",
121732
- "privacy": "protected",
121733
- "return": {
121734
- "type": {
121735
- "text": "boolean"
121736
- }
121689
+ "kind": "field",
121690
+ "name": "maybeDisabledInteractive",
121691
+ "type": {
121692
+ "text": "boolean | undefined"
121737
121693
  },
121694
+ "privacy": "protected",
121695
+ "readonly": true,
121738
121696
  "inheritedFrom": {
121739
- "name": "SbbOpenCloseBaseElement",
121740
- "module": "core/base-elements/open-close-base-element.js"
121697
+ "name": "SbbActionBaseElement",
121698
+ "module": "core/base-elements/action-base-element.js"
121741
121699
  }
121742
121700
  },
121743
121701
  {
121744
121702
  "kind": "method",
121745
- "name": "dispatchCloseEvent",
121703
+ "name": "setupBaseEventHandlers",
121746
121704
  "privacy": "protected",
121747
121705
  "return": {
121748
121706
  "type": {
121749
- "text": "boolean"
121707
+ "text": "void"
121750
121708
  }
121751
121709
  },
121752
121710
  "inheritedFrom": {
121753
- "name": "SbbOpenCloseBaseElement",
121754
- "module": "core/base-elements/open-close-base-element.js"
121711
+ "name": "SbbActionBaseElement",
121712
+ "module": "core/base-elements/action-base-element.js"
121755
121713
  }
121756
121714
  },
121757
121715
  {
@@ -121860,108 +121818,150 @@
121860
121818
  }
121861
121819
  }
121862
121820
  ],
121821
+ "superclass": {
121822
+ "name": "SbbSecondaryButtonElement",
121823
+ "module": "button.pure.js"
121824
+ },
121825
+ "tagName": "sbb-sidebar-close-button",
121826
+ "customElement": true,
121863
121827
  "attributes": [
121864
121828
  {
121865
- "name": "color",
121829
+ "name": "size",
121866
121830
  "type": {
121867
- "text": "'white' | 'milk'"
121831
+ "text": "SbbButtonSize"
121868
121832
  },
121869
- "default": "'white'",
121870
- "description": "Background color of the sidebar. Either `white` or `milk`.",
121871
- "fieldName": "color"
121833
+ "description": "Size variant, either l, m or s.",
121834
+ "default": "'l' / 's' (lean)",
121835
+ "fieldName": "size",
121836
+ "inheritedFrom": {
121837
+ "name": "SbbButtonCommonElementMixin",
121838
+ "module": "button/common/button-common.js"
121839
+ }
121872
121840
  },
121873
121841
  {
121874
- "name": "mode",
121842
+ "name": "loading",
121875
121843
  "type": {
121876
- "text": "'side' | 'over'"
121844
+ "text": "boolean"
121877
121845
  },
121878
- "default": "'side'",
121879
- "description": "Mode of the sidebar; one of 'side' or 'over'.",
121880
- "fieldName": "mode"
121846
+ "default": "false",
121847
+ "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
121848
+ "fieldName": "loading",
121849
+ "inheritedFrom": {
121850
+ "name": "SbbButtonCommonElementMixin",
121851
+ "module": "button/common/button-common.js"
121852
+ }
121881
121853
  },
121882
121854
  {
121883
- "name": "position",
121855
+ "name": "negative",
121884
121856
  "type": {
121885
- "text": "'start' | 'end'"
121857
+ "text": "boolean"
121886
121858
  },
121887
- "default": "'start'",
121888
- "description": "The side that the sidebar is attached to.",
121889
- "fieldName": "position"
121859
+ "default": "false",
121860
+ "description": "Negative coloring variant flag.",
121861
+ "fieldName": "negative",
121862
+ "inheritedFrom": {
121863
+ "name": "SbbNegativeMixin",
121864
+ "module": "core/mixins/negative-mixin.js"
121865
+ }
121890
121866
  },
121891
121867
  {
121892
- "name": "opened",
121868
+ "name": "icon-name",
121893
121869
  "type": {
121894
- "text": "boolean"
121870
+ "text": "string"
121895
121871
  },
121896
- "default": "false",
121897
- "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
121898
- "fieldName": "opened"
121872
+ "default": "''",
121873
+ "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.",
121874
+ "fieldName": "iconName",
121875
+ "inheritedFrom": {
121876
+ "name": "SbbIconNameMixin",
121877
+ "module": "icon/icon-name-mixin.js"
121878
+ }
121899
121879
  },
121900
121880
  {
121901
- "name": "focus-on-open",
121881
+ "name": "disabled-interactive",
121902
121882
  "type": {
121903
121883
  "text": "boolean"
121904
121884
  },
121905
121885
  "default": "false",
121906
- "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
121907
- "fieldName": "focusOnOpen"
121908
- }
121909
- ],
121910
- "mixins": [
121886
+ "description": "Whether the button should be aria-disabled but stay interactive.",
121887
+ "fieldName": "disabledInteractive",
121888
+ "inheritedFrom": {
121889
+ "name": "SbbDisabledInteractiveMixin",
121890
+ "module": "core/mixins/disabled-mixin.js"
121891
+ }
121892
+ },
121911
121893
  {
121912
- "name": "SbbAnimationCompleteMixin",
121913
- "module": "core/mixins.js"
121914
- }
121915
- ],
121916
- "superclass": {
121917
- "name": "SbbOpenCloseBaseElement",
121918
- "module": "core/base-elements.js"
121919
- },
121920
- "tagName": "sbb-sidebar",
121921
- "customElement": true,
121922
- "events": [
121894
+ "name": "disabled",
121895
+ "description": "Whether the component is disabled.",
121896
+ "default": "false",
121897
+ "type": {
121898
+ "text": "boolean"
121899
+ },
121900
+ "fieldName": "disabled",
121901
+ "inheritedFrom": {
121902
+ "name": "SbbDisabledMixin",
121903
+ "module": "core/mixins/disabled-mixin.js"
121904
+ }
121905
+ },
121923
121906
  {
121924
- "name": "beforeopen",
121907
+ "name": "value",
121925
121908
  "type": {
121926
- "text": "Event"
121909
+ "text": "string"
121927
121910
  },
121928
- "description": "Emits whenever the component starts the opening transition. Can be canceled.",
121911
+ "default": "''",
121912
+ "description": "Value of the form element.",
121913
+ "fieldName": "value",
121929
121914
  "inheritedFrom": {
121930
- "name": "SbbOpenCloseBaseElement",
121931
- "module": "core/base-elements/open-close-base-element.js"
121915
+ "name": "SbbButtonBaseElement",
121916
+ "module": "core/base-elements/button-base-element.js"
121932
121917
  }
121933
121918
  },
121934
121919
  {
121935
- "name": "open",
121920
+ "name": "type",
121921
+ "description": "The type attribute to use for the button.",
121922
+ "default": "'button'",
121936
121923
  "type": {
121937
- "text": "Event"
121924
+ "text": "SbbButtonType"
121938
121925
  },
121939
- "description": "Emits whenever the component is opened.",
121926
+ "fieldName": "type",
121940
121927
  "inheritedFrom": {
121941
- "name": "SbbOpenCloseBaseElement",
121942
- "module": "core/base-elements/open-close-base-element.js"
121928
+ "name": "SbbButtonBaseElement",
121929
+ "module": "core/base-elements/button-base-element.js"
121943
121930
  }
121944
121931
  },
121945
121932
  {
121946
- "name": "beforeclose",
121933
+ "name": "form",
121934
+ "description": "The `<form>` element to associate the button with.",
121947
121935
  "type": {
121948
- "text": "Event"
121936
+ "text": "HTMLFormElement | null"
121949
121937
  },
121950
- "description": "Emits whenever the component begins the closing transition. Can be canceled.",
121938
+ "fieldName": "form",
121951
121939
  "inheritedFrom": {
121952
- "name": "SbbOpenCloseBaseElement",
121953
- "module": "core/base-elements/open-close-base-element.js"
121940
+ "name": "SbbButtonBaseElement",
121941
+ "module": "core/base-elements/button-base-element.js"
121954
121942
  }
121955
121943
  },
121956
121944
  {
121957
- "name": "close",
121945
+ "name": "name",
121946
+ "description": "Name of the form element. Will be read from name attribute.",
121958
121947
  "type": {
121959
- "text": "Event"
121948
+ "text": "string"
121960
121949
  },
121961
- "description": "Emits whenever the component is closed.",
121950
+ "fieldName": "name",
121962
121951
  "inheritedFrom": {
121963
- "name": "SbbOpenCloseBaseElement",
121964
- "module": "core/base-elements/open-close-base-element.js"
121952
+ "name": "SbbFormAssociatedMixin",
121953
+ "module": "core/mixins/form-associated-mixin.js"
121954
+ }
121955
+ }
121956
+ ],
121957
+ "cssProperties": [
121958
+ {
121959
+ "description": "The delay before the loading animation starts, when setting the button into loading state.",
121960
+ "name": "--sbb-button-loading-delay",
121961
+ "default": "300ms",
121962
+ "inheritedFrom": {
121963
+ "name": "SbbSecondaryButtonElement",
121964
+ "module": "button/secondary-button/secondary-button.component.js"
121965
121965
  }
121966
121966
  }
121967
121967
  ]
@@ -121970,10 +121970,10 @@
121970
121970
  "exports": [
121971
121971
  {
121972
121972
  "kind": "js",
121973
- "name": "SbbSidebarElement",
121973
+ "name": "SbbSidebarCloseButtonElement",
121974
121974
  "declaration": {
121975
- "name": "SbbSidebarElement",
121976
- "module": "sidebar/sidebar/sidebar.component.js"
121975
+ "name": "SbbSidebarCloseButtonElement",
121976
+ "module": "sidebar/sidebar-close-button/sidebar-close-button.component.js"
121977
121977
  }
121978
121978
  }
121979
121979
  ]