@sbb-esta/lyne-elements-dev 4.9.0-dev.1775022187 → 4.9.0-dev.1775022513

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 +1213 -1213
  2. package/package.json +2 -2
@@ -100162,15 +100162,15 @@
100162
100162
  },
100163
100163
  {
100164
100164
  "kind": "javascript-module",
100165
- "path": "link/block-link-static/block-link-static.component.js",
100165
+ "path": "link/block-link-button/block-link-button.component.js",
100166
100166
  "declarations": [
100167
100167
  {
100168
100168
  "kind": "class",
100169
- "description": "It displays a static link enhanced with the SBB Design.",
100170
- "name": "SbbBlockLinkStaticElement",
100169
+ "description": "It displays a link enhanced with the SBB Design, which will behave as a button.",
100170
+ "name": "SbbBlockLinkButtonElement",
100171
100171
  "slots": [
100172
100172
  {
100173
- "description": "Use the unnamed slot to add content to the `sbb-block-link-static`.",
100173
+ "description": "Use the unnamed slot to add content to the `sbb-block-link-button`.",
100174
100174
  "name": ""
100175
100175
  },
100176
100176
  {
@@ -100192,7 +100192,7 @@
100192
100192
  "name": "SbbElement",
100193
100193
  "module": "core/base-elements/element.js"
100194
100194
  },
100195
- "default": "'sbb-block-link-static'"
100195
+ "default": "'sbb-block-link-button'"
100196
100196
  },
100197
100197
  {
100198
100198
  "kind": "field",
@@ -100321,6 +100321,22 @@
100321
100321
  "module": "icon/icon-name-mixin.js"
100322
100322
  }
100323
100323
  },
100324
+ {
100325
+ "kind": "field",
100326
+ "name": "disabledInteractive",
100327
+ "type": {
100328
+ "text": "boolean"
100329
+ },
100330
+ "privacy": "public",
100331
+ "default": "false",
100332
+ "description": "Whether the button should be aria-disabled but stay interactive.",
100333
+ "attribute": "disabled-interactive",
100334
+ "reflects": true,
100335
+ "inheritedFrom": {
100336
+ "name": "SbbDisabledInteractiveMixin",
100337
+ "module": "core/mixins/disabled-mixin.js"
100338
+ }
100339
+ },
100324
100340
  {
100325
100341
  "kind": "field",
100326
100342
  "name": "disabled",
@@ -100367,98 +100383,88 @@
100367
100383
  },
100368
100384
  {
100369
100385
  "kind": "field",
100370
- "name": "maybeDisabled",
100386
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
100371
100387
  "type": {
100372
- "text": "boolean | undefined"
100388
+ "text": "array"
100373
100389
  },
100374
- "privacy": "protected",
100390
+ "privacy": "private",
100375
100391
  "readonly": true,
100392
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
100376
100393
  "inheritedFrom": {
100377
- "name": "SbbActionBaseElement",
100378
- "module": "core/base-elements/action-base-element.js"
100394
+ "name": "SbbButtonBaseElement",
100395
+ "module": "core/base-elements/button-base-element.js"
100379
100396
  }
100380
100397
  },
100381
100398
  {
100382
100399
  "kind": "field",
100383
- "name": "maybeDisabledInteractive",
100400
+ "name": "value",
100384
100401
  "type": {
100385
- "text": "boolean | undefined"
100402
+ "text": "string"
100386
100403
  },
100387
- "privacy": "protected",
100388
- "readonly": true,
100404
+ "privacy": "public",
100389
100405
  "inheritedFrom": {
100390
- "name": "SbbActionBaseElement",
100391
- "module": "core/base-elements/action-base-element.js"
100392
- }
100393
- },
100394
- {
100395
- "kind": "method",
100396
- "name": "setupBaseEventHandlers",
100397
- "privacy": "protected",
100398
- "return": {
100399
- "type": {
100400
- "text": "void"
100401
- }
100406
+ "name": "SbbButtonBaseElement",
100407
+ "module": "core/base-elements/button-base-element.js"
100402
100408
  },
100403
- "inheritedFrom": {
100404
- "name": "SbbActionBaseElement",
100405
- "module": "core/base-elements/action-base-element.js"
100406
- }
100409
+ "default": "''",
100410
+ "description": "Value of the form element.",
100411
+ "attribute": "value"
100407
100412
  },
100408
100413
  {
100409
100414
  "kind": "field",
100410
- "name": "_hydrationRequired",
100415
+ "name": "type",
100416
+ "privacy": "public",
100417
+ "description": "The type attribute to use for the button.",
100418
+ "default": "'button'",
100411
100419
  "type": {
100412
- "text": "boolean"
100420
+ "text": "SbbButtonType"
100413
100421
  },
100414
- "privacy": "private",
100415
- "default": "!!this.shadowRoot",
100422
+ "attribute": "type",
100416
100423
  "inheritedFrom": {
100417
- "name": "SbbElement",
100418
- "module": "core/base-elements/element.js"
100424
+ "name": "SbbButtonBaseElement",
100425
+ "module": "core/base-elements/button-base-element.js"
100419
100426
  }
100420
100427
  },
100421
100428
  {
100422
100429
  "kind": "field",
100423
- "name": "_hydrationComplete",
100424
- "privacy": "private",
100425
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
100430
+ "name": "form",
100431
+ "type": {
100432
+ "text": "HTMLFormElement | null"
100433
+ },
100434
+ "privacy": "public",
100435
+ "description": "The `<form>` element to associate the button with.",
100426
100436
  "inheritedFrom": {
100427
- "name": "SbbElement",
100428
- "module": "core/base-elements/element.js"
100429
- }
100437
+ "name": "SbbButtonBaseElement",
100438
+ "module": "core/base-elements/button-base-element.js"
100439
+ },
100440
+ "attribute": "form"
100430
100441
  },
100431
100442
  {
100432
100443
  "kind": "field",
100433
- "name": "_resolveHydration",
100444
+ "name": "_formId",
100434
100445
  "type": {
100435
- "text": "(hydrationRequired: boolean) => void"
100446
+ "text": "string"
100436
100447
  },
100437
100448
  "privacy": "private",
100449
+ "default": "''",
100438
100450
  "inheritedFrom": {
100439
- "name": "SbbElement",
100440
- "module": "core/base-elements/element.js"
100451
+ "name": "SbbButtonBaseElement",
100452
+ "module": "core/base-elements/button-base-element.js"
100441
100453
  }
100442
100454
  },
100443
100455
  {
100444
100456
  "kind": "field",
100445
- "name": "hydrationRequired",
100446
- "type": {
100447
- "text": "boolean"
100448
- },
100449
- "privacy": "protected",
100450
- "description": "Returns whether hydration is required and not completed.",
100451
- "readonly": true,
100457
+ "name": "_handleButtonClick",
100458
+ "privacy": "private",
100452
100459
  "inheritedFrom": {
100453
- "name": "SbbElement",
100454
- "module": "core/base-elements/element.js"
100455
- },
100456
- "default": "!!this.shadowRoot"
100460
+ "name": "SbbButtonBaseElement",
100461
+ "module": "core/base-elements/button-base-element.js"
100462
+ }
100457
100463
  },
100458
100464
  {
100459
100465
  "kind": "method",
100460
- "name": "toggleState",
100461
- "privacy": "protected",
100466
+ "name": "_requestSubmit",
100467
+ "privacy": "private",
100462
100468
  "return": {
100463
100469
  "type": {
100464
100470
  "text": "void"
@@ -100466,27 +100472,29 @@
100466
100472
  },
100467
100473
  "parameters": [
100468
100474
  {
100469
- "name": "value",
100470
- "type": {
100471
- "text": "string"
100472
- }
100473
- },
100474
- {
100475
- "name": "force",
100476
- "optional": true,
100475
+ "name": "form",
100477
100476
  "type": {
100478
- "text": "boolean"
100477
+ "text": "HTMLFormElement"
100479
100478
  }
100480
100479
  }
100481
100480
  ],
100482
100481
  "inheritedFrom": {
100483
- "name": "SbbElement",
100484
- "module": "core/base-elements/element.js"
100482
+ "name": "SbbButtonBaseElement",
100483
+ "module": "core/base-elements/button-base-element.js"
100485
100484
  }
100486
100485
  },
100487
100486
  {
100488
100487
  "kind": "field",
100489
- "name": "['_$sbbElement$']",
100488
+ "name": "_formKeyDown",
100489
+ "privacy": "private",
100490
+ "inheritedFrom": {
100491
+ "name": "SbbButtonBaseElement",
100492
+ "module": "core/base-elements/button-base-element.js"
100493
+ }
100494
+ },
100495
+ {
100496
+ "kind": "field",
100497
+ "name": "formAssociated",
100490
100498
  "type": {
100491
100499
  "text": "boolean"
100492
100500
  },
@@ -100494,566 +100502,456 @@
100494
100502
  "static": true,
100495
100503
  "default": "true",
100496
100504
  "inheritedFrom": {
100497
- "name": "SbbElement",
100498
- "module": "core/base-elements/element.js"
100505
+ "name": "SbbFormAssociatedMixin",
100506
+ "module": "core/mixins/form-associated-mixin.js"
100499
100507
  }
100500
100508
  },
100501
100509
  {
100502
100510
  "kind": "field",
100503
- "name": "_controllers",
100511
+ "name": "name",
100512
+ "privacy": "public",
100513
+ "description": "Name of the form element. Will be read from name attribute.",
100504
100514
  "type": {
100505
- "text": "Set<SbbReactiveController> | undefined"
100515
+ "text": "string"
100506
100516
  },
100507
- "privacy": "private",
100517
+ "attribute": "name",
100508
100518
  "inheritedFrom": {
100509
- "name": "SbbElement",
100510
- "module": "core/base-elements/element.js"
100519
+ "name": "SbbFormAssociatedMixin",
100520
+ "module": "core/mixins/form-associated-mixin.js"
100511
100521
  }
100512
- }
100513
- ],
100514
- "mixins": [
100515
- {
100516
- "name": "SbbBlockLinkCommonElementMixin",
100517
- "module": "link/common/block-link-common.js"
100518
100522
  },
100519
100523
  {
100520
- "name": "SbbDisabledMixin",
100521
- "module": "core/mixins.js"
100522
- }
100523
- ],
100524
- "superclass": {
100525
- "name": "SbbActionBaseElement",
100526
- "module": "core/base-elements.js"
100527
- },
100528
- "tagName": "sbb-block-link-static",
100529
- "customElement": true,
100530
- "attributes": [
100531
- {
100532
- "name": "icon-placement",
100524
+ "kind": "field",
100525
+ "name": "validity",
100533
100526
  "type": {
100534
- "text": "SbbIconPlacement"
100527
+ "text": "ValidityState"
100535
100528
  },
100536
- "default": "'start'",
100537
- "description": "Moves the icon to the end of the component if set to true.",
100538
- "fieldName": "iconPlacement",
100529
+ "privacy": "public",
100530
+ "description": "Returns the ValidityState object for this element.",
100531
+ "readonly": true,
100539
100532
  "inheritedFrom": {
100540
- "name": "SbbBlockLinkCommonElementMixin",
100541
- "module": "link/common/block-link-common.js"
100533
+ "name": "SbbFormAssociatedMixin",
100534
+ "module": "core/mixins/form-associated-mixin.js"
100542
100535
  }
100543
100536
  },
100544
100537
  {
100545
- "name": "size",
100538
+ "kind": "field",
100539
+ "name": "validationMessage",
100546
100540
  "type": {
100547
- "text": "SbbLinkSize"
100541
+ "text": "string"
100548
100542
  },
100549
- "description": "Text size, the link should get in the non-button variation.\nWith inline variant, the text size adapts to where it is used.",
100550
- "default": "'s' / 'xs' (lean)",
100551
- "fieldName": "size",
100543
+ "privacy": "public",
100544
+ "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.",
100545
+ "readonly": true,
100552
100546
  "inheritedFrom": {
100553
- "name": "SbbLinkCommonElementMixin",
100554
- "module": "link/common/link-common.js"
100547
+ "name": "SbbFormAssociatedMixin",
100548
+ "module": "core/mixins/form-associated-mixin.js"
100555
100549
  }
100556
100550
  },
100557
100551
  {
100558
- "name": "icon-name",
100552
+ "kind": "field",
100553
+ "name": "willValidate",
100559
100554
  "type": {
100560
- "text": "string"
100555
+ "text": "boolean"
100561
100556
  },
100562
- "default": "''",
100563
- "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.",
100564
- "fieldName": "iconName",
100557
+ "privacy": "public",
100558
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
100559
+ "readonly": true,
100565
100560
  "inheritedFrom": {
100566
- "name": "SbbIconNameMixin",
100567
- "module": "icon/icon-name-mixin.js"
100561
+ "name": "SbbFormAssociatedMixin",
100562
+ "module": "core/mixins/form-associated-mixin.js"
100568
100563
  }
100569
100564
  },
100570
100565
  {
100571
- "name": "disabled",
100572
- "description": "Whether the component is disabled.",
100573
- "default": "false",
100566
+ "kind": "field",
100567
+ "name": "_validityStates",
100568
+ "privacy": "private",
100569
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
100570
+ "inheritedFrom": {
100571
+ "name": "SbbFormAssociatedMixin",
100572
+ "module": "core/mixins/form-associated-mixin.js"
100573
+ }
100574
+ },
100575
+ {
100576
+ "kind": "field",
100577
+ "name": "formDisabled",
100574
100578
  "type": {
100575
100579
  "text": "boolean"
100576
100580
  },
100577
- "fieldName": "disabled",
100581
+ "privacy": "protected",
100582
+ "default": "false",
100583
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
100578
100584
  "inheritedFrom": {
100579
- "name": "SbbDisabledMixin",
100580
- "module": "core/mixins/disabled-mixin.js"
100585
+ "name": "SbbFormAssociatedMixin",
100586
+ "module": "core/mixins/form-associated-mixin.js"
100581
100587
  }
100582
- }
100583
- ]
100584
- }
100585
- ],
100586
- "exports": [
100587
- {
100588
- "kind": "js",
100589
- "name": "SbbBlockLinkStaticElement",
100590
- "declaration": {
100591
- "name": "SbbBlockLinkStaticElement",
100592
- "module": "link/block-link-static/block-link-static.component.js"
100593
- }
100594
- }
100595
- ]
100596
- },
100597
- {
100598
- "kind": "javascript-module",
100599
- "path": "link/block-link-button/block-link-button.component.js",
100600
- "declarations": [
100601
- {
100602
- "kind": "class",
100603
- "description": "It displays a link enhanced with the SBB Design, which will behave as a button.",
100604
- "name": "SbbBlockLinkButtonElement",
100605
- "slots": [
100606
- {
100607
- "description": "Use the unnamed slot to add content to the `sbb-block-link-button`.",
100608
- "name": ""
100609
100588
  },
100610
100589
  {
100611
- "description": "Slot used to display the icon, if one is set.",
100612
- "name": "icon"
100613
- }
100614
- ],
100615
- "members": [
100616
- {
100617
- "kind": "field",
100618
- "name": "elementName",
100619
- "type": {
100620
- "text": "string"
100621
- },
100590
+ "kind": "method",
100591
+ "name": "checkValidity",
100622
100592
  "privacy": "public",
100623
- "static": true,
100624
- "readonly": true,
100625
- "inheritedFrom": {
100626
- "name": "SbbElement",
100627
- "module": "core/base-elements/element.js"
100593
+ "return": {
100594
+ "type": {
100595
+ "text": "boolean"
100596
+ }
100628
100597
  },
100629
- "default": "'sbb-block-link-button'"
100598
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
100599
+ "inheritedFrom": {
100600
+ "name": "SbbFormAssociatedMixin",
100601
+ "module": "core/mixins/form-associated-mixin.js"
100602
+ }
100630
100603
  },
100631
100604
  {
100632
- "kind": "field",
100633
- "name": "styles",
100634
- "type": {
100635
- "text": "CSSResultGroup"
100636
- },
100605
+ "kind": "method",
100606
+ "name": "reportValidity",
100637
100607
  "privacy": "public",
100638
- "static": true,
100639
- "default": "[boxSizingStyles, style, blockStyle]",
100608
+ "return": {
100609
+ "type": {
100610
+ "text": "boolean"
100611
+ }
100612
+ },
100613
+ "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.",
100640
100614
  "inheritedFrom": {
100641
- "name": "SbbLinkCommonElementMixin",
100642
- "module": "link/common/link-common.js"
100615
+ "name": "SbbFormAssociatedMixin",
100616
+ "module": "core/mixins/form-associated-mixin.js"
100643
100617
  }
100644
100618
  },
100645
100619
  {
100646
- "kind": "field",
100647
- "name": "iconPlacement",
100648
- "type": {
100649
- "text": "SbbIconPlacement"
100650
- },
100620
+ "kind": "method",
100621
+ "name": "setCustomValidity",
100651
100622
  "privacy": "public",
100652
- "default": "'start'",
100653
- "description": "Moves the icon to the end of the component if set to true.",
100654
- "attribute": "icon-placement",
100655
- "reflects": true,
100623
+ "return": {
100624
+ "type": {
100625
+ "text": "void"
100626
+ }
100627
+ },
100628
+ "parameters": [
100629
+ {
100630
+ "name": "message",
100631
+ "type": {
100632
+ "text": "string"
100633
+ }
100634
+ }
100635
+ ],
100636
+ "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.",
100656
100637
  "inheritedFrom": {
100657
- "name": "SbbBlockLinkCommonElementMixin",
100658
- "module": "link/common/block-link-common.js"
100638
+ "name": "SbbFormAssociatedMixin",
100639
+ "module": "core/mixins/form-associated-mixin.js"
100659
100640
  }
100660
100641
  },
100661
100642
  {
100662
100643
  "kind": "method",
100663
- "name": "renderTemplate",
100664
- "privacy": "protected",
100644
+ "name": "_hasDisabledAncestor",
100645
+ "privacy": "private",
100665
100646
  "return": {
100666
100647
  "type": {
100667
- "text": "TemplateResult"
100648
+ "text": "boolean"
100668
100649
  }
100669
100650
  },
100670
- "description": "Override this method to render the component template.",
100671
100651
  "inheritedFrom": {
100672
- "name": "SbbActionBaseElement",
100673
- "module": "core/base-elements/action-base-element.js"
100652
+ "name": "SbbFormAssociatedMixin",
100653
+ "module": "core/mixins/form-associated-mixin.js"
100674
100654
  }
100675
100655
  },
100676
100656
  {
100677
- "kind": "field",
100678
- "name": "size",
100679
- "type": {
100680
- "text": "SbbLinkSize"
100657
+ "kind": "method",
100658
+ "name": "updateFormValue",
100659
+ "privacy": "protected",
100660
+ "return": {
100661
+ "type": {
100662
+ "text": "void"
100663
+ }
100681
100664
  },
100682
- "privacy": "public",
100683
- "description": "Text size, the link should get in the non-button variation.\nWith inline variant, the text size adapts to where it is used.",
100684
- "default": "'s' / 'xs' (lean)",
100685
- "attribute": "size",
100686
- "reflects": true,
100665
+ "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",
100687
100666
  "inheritedFrom": {
100688
- "name": "SbbLinkCommonElementMixin",
100689
- "module": "link/common/link-common.js"
100667
+ "name": "SbbFormAssociatedMixin",
100668
+ "module": "core/mixins/form-associated-mixin.js"
100690
100669
  }
100691
100670
  },
100692
100671
  {
100693
- "kind": "field",
100694
- "name": "iconName",
100695
- "type": {
100696
- "text": "string"
100672
+ "kind": "method",
100673
+ "name": "formState",
100674
+ "privacy": "protected",
100675
+ "return": {
100676
+ "type": {
100677
+ "text": "FormRestoreState"
100678
+ }
100697
100679
  },
100698
- "privacy": "public",
100699
- "default": "''",
100700
- "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.",
100701
- "attribute": "icon-name",
100702
100680
  "inheritedFrom": {
100703
- "name": "SbbIconNameMixin",
100704
- "module": "icon/icon-name-mixin.js"
100681
+ "name": "SbbFormAssociatedMixin",
100682
+ "module": "core/mixins/form-associated-mixin.js"
100705
100683
  }
100706
100684
  },
100707
100685
  {
100708
100686
  "kind": "method",
100709
- "name": "renderIconSlot",
100687
+ "name": "setValidityFlag",
100710
100688
  "privacy": "protected",
100711
100689
  "return": {
100712
100690
  "type": {
100713
- "text": "TemplateResult"
100691
+ "text": "void"
100714
100692
  }
100715
100693
  },
100716
100694
  "parameters": [
100717
100695
  {
100718
- "name": "classname",
100719
- "optional": true,
100696
+ "name": "flag",
100697
+ "type": {
100698
+ "text": "T"
100699
+ }
100700
+ },
100701
+ {
100702
+ "name": "message",
100720
100703
  "type": {
100721
100704
  "text": "string"
100722
100705
  }
100706
+ },
100707
+ {
100708
+ "name": "flagValue",
100709
+ "optional": true,
100710
+ "type": {
100711
+ "text": "ValidityStateFlags[T]"
100712
+ }
100723
100713
  }
100724
100714
  ],
100715
+ "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).",
100725
100716
  "inheritedFrom": {
100726
- "name": "SbbIconNameMixin",
100727
- "module": "icon/icon-name-mixin.js"
100717
+ "name": "SbbFormAssociatedMixin",
100718
+ "module": "core/mixins/form-associated-mixin.js"
100728
100719
  }
100729
100720
  },
100730
100721
  {
100731
100722
  "kind": "method",
100732
- "name": "renderIconName",
100723
+ "name": "removeValidityFlag",
100733
100724
  "privacy": "protected",
100734
100725
  "return": {
100735
100726
  "type": {
100736
- "text": "string"
100727
+ "text": "void"
100737
100728
  }
100738
100729
  },
100730
+ "parameters": [
100731
+ {
100732
+ "name": "flag",
100733
+ "type": {
100734
+ "text": "T"
100735
+ }
100736
+ }
100737
+ ],
100738
+ "description": "Removes the validity state flag entry and updates validity state.",
100739
100739
  "inheritedFrom": {
100740
- "name": "SbbIconNameMixin",
100741
- "module": "icon/icon-name-mixin.js"
100740
+ "name": "SbbFormAssociatedMixin",
100741
+ "module": "core/mixins/form-associated-mixin.js"
100742
100742
  }
100743
100743
  },
100744
100744
  {
100745
100745
  "kind": "method",
100746
- "name": "_renderIconName",
100747
- "privacy": "private",
100746
+ "name": "validate",
100747
+ "privacy": "protected",
100748
100748
  "return": {
100749
100749
  "type": {
100750
- "text": "string"
100750
+ "text": "void"
100751
100751
  }
100752
100752
  },
100753
+ "description": "To be called whenever the current element needs to be validated.",
100753
100754
  "inheritedFrom": {
100754
- "name": "SbbIconNameMixin",
100755
- "module": "icon/icon-name-mixin.js"
100755
+ "name": "SbbFormAssociatedMixin",
100756
+ "module": "core/mixins/form-associated-mixin.js"
100756
100757
  }
100757
100758
  },
100758
100759
  {
100759
- "kind": "field",
100760
- "name": "disabledInteractive",
100761
- "type": {
100762
- "text": "boolean"
100760
+ "kind": "method",
100761
+ "name": "shouldValidate",
100762
+ "privacy": "protected",
100763
+ "return": {
100764
+ "type": {
100765
+ "text": "boolean"
100766
+ }
100763
100767
  },
100764
- "privacy": "public",
100765
- "default": "false",
100766
- "description": "Whether the button should be aria-disabled but stay interactive.",
100767
- "attribute": "disabled-interactive",
100768
- "reflects": true,
100768
+ "parameters": [
100769
+ {
100770
+ "name": "name",
100771
+ "type": {
100772
+ "text": "PropertyKey | undefined"
100773
+ }
100774
+ }
100775
+ ],
100776
+ "description": "Whether validation should be run on a property change with the given name.",
100769
100777
  "inheritedFrom": {
100770
- "name": "SbbDisabledInteractiveMixin",
100771
- "module": "core/mixins/disabled-mixin.js"
100778
+ "name": "SbbFormAssociatedMixin",
100779
+ "module": "core/mixins/form-associated-mixin.js"
100772
100780
  }
100773
100781
  },
100774
100782
  {
100775
- "kind": "field",
100776
- "name": "disabled",
100777
- "privacy": "public",
100778
- "description": "Whether the component is disabled.",
100779
- "default": "false",
100780
- "type": {
100781
- "text": "boolean"
100783
+ "kind": "method",
100784
+ "name": "_setInternalValidity",
100785
+ "privacy": "private",
100786
+ "return": {
100787
+ "type": {
100788
+ "text": "void"
100789
+ }
100782
100790
  },
100783
- "attribute": "disabled",
100784
- "reflects": true,
100785
100791
  "inheritedFrom": {
100786
- "name": "SbbDisabledMixin",
100787
- "module": "core/mixins/disabled-mixin.js"
100792
+ "name": "SbbFormAssociatedMixin",
100793
+ "module": "core/mixins/form-associated-mixin.js"
100788
100794
  }
100789
100795
  },
100790
100796
  {
100791
100797
  "kind": "field",
100792
- "name": "#disabled",
100793
- "privacy": "private",
100798
+ "name": "role",
100794
100799
  "type": {
100795
- "text": "boolean"
100796
- },
100797
- "default": "false",
100798
- "inheritedFrom": {
100799
- "name": "SbbDisabledMixin",
100800
- "module": "core/mixins/disabled-mixin.js"
100801
- }
100802
- },
100803
- {
100804
- "kind": "method",
100805
- "name": "isDisabledExternally",
100806
- "privacy": "protected",
100807
- "return": {
100808
- "type": {
100809
- "text": "boolean"
100810
- }
100811
- },
100812
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
100813
- "inheritedFrom": {
100814
- "name": "SbbDisabledMixin",
100815
- "module": "core/mixins/disabled-mixin.js"
100816
- }
100817
- },
100818
- {
100819
- "kind": "field",
100820
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
100821
- "type": {
100822
- "text": "array"
100823
- },
100824
- "privacy": "private",
100825
- "readonly": true,
100826
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
100827
- "inheritedFrom": {
100828
- "name": "SbbButtonBaseElement",
100829
- "module": "core/base-elements/button-base-element.js"
100830
- }
100831
- },
100832
- {
100833
- "kind": "field",
100834
- "name": "value",
100835
- "type": {
100836
- "text": "string"
100837
- },
100838
- "privacy": "public",
100839
- "inheritedFrom": {
100840
- "name": "SbbButtonBaseElement",
100841
- "module": "core/base-elements/button-base-element.js"
100800
+ "text": "ElementInternals['role']"
100842
100801
  },
100843
- "default": "''",
100844
- "description": "Value of the form element.",
100845
- "attribute": "value"
100846
- },
100847
- {
100848
- "kind": "field",
100849
- "name": "type",
100850
100802
  "privacy": "public",
100851
- "description": "The type attribute to use for the button.",
100803
+ "static": true,
100804
+ "readonly": true,
100852
100805
  "default": "'button'",
100853
- "type": {
100854
- "text": "SbbButtonType"
100855
- },
100856
- "attribute": "type",
100857
100806
  "inheritedFrom": {
100858
- "name": "SbbButtonBaseElement",
100807
+ "name": "SbbButtonLikeBaseElement",
100859
100808
  "module": "core/base-elements/button-base-element.js"
100860
100809
  }
100861
100810
  },
100862
100811
  {
100863
100812
  "kind": "field",
100864
- "name": "form",
100865
- "type": {
100866
- "text": "HTMLFormElement | null"
100867
- },
100868
- "privacy": "public",
100869
- "description": "The `<form>` element to associate the button with.",
100870
- "inheritedFrom": {
100871
- "name": "SbbButtonBaseElement",
100872
- "module": "core/base-elements/button-base-element.js"
100873
- },
100874
- "attribute": "form"
100875
- },
100876
- {
100877
- "kind": "field",
100878
- "name": "_formId",
100879
- "type": {
100880
- "text": "string"
100881
- },
100813
+ "name": "_preventScrollOnSpaceKeydown",
100882
100814
  "privacy": "private",
100883
- "default": "''",
100815
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
100816
+ "parameters": [
100817
+ {
100818
+ "description": "The origin event.",
100819
+ "name": "event"
100820
+ }
100821
+ ],
100884
100822
  "inheritedFrom": {
100885
- "name": "SbbButtonBaseElement",
100823
+ "name": "SbbButtonLikeBaseElement",
100886
100824
  "module": "core/base-elements/button-base-element.js"
100887
100825
  }
100888
100826
  },
100889
100827
  {
100890
100828
  "kind": "field",
100891
- "name": "_handleButtonClick",
100829
+ "name": "_removeActiveMarker",
100892
100830
  "privacy": "private",
100893
100831
  "inheritedFrom": {
100894
- "name": "SbbButtonBaseElement",
100832
+ "name": "SbbButtonLikeBaseElement",
100895
100833
  "module": "core/base-elements/button-base-element.js"
100896
100834
  }
100897
100835
  },
100898
100836
  {
100899
- "kind": "method",
100900
- "name": "_requestSubmit",
100837
+ "kind": "field",
100838
+ "name": "_dispatchClickEventOnSpaceKeyup",
100901
100839
  "privacy": "private",
100902
- "return": {
100903
- "type": {
100904
- "text": "void"
100905
- }
100906
- },
100840
+ "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.",
100907
100841
  "parameters": [
100908
100842
  {
100909
- "name": "form",
100910
- "type": {
100911
- "text": "HTMLFormElement"
100912
- }
100843
+ "description": "The origin event.",
100844
+ "name": "event"
100913
100845
  }
100914
100846
  ],
100915
100847
  "inheritedFrom": {
100916
- "name": "SbbButtonBaseElement",
100848
+ "name": "SbbButtonLikeBaseElement",
100917
100849
  "module": "core/base-elements/button-base-element.js"
100918
100850
  }
100919
100851
  },
100920
100852
  {
100921
100853
  "kind": "field",
100922
- "name": "_formKeyDown",
100854
+ "name": "_dispatchClickEvent",
100923
100855
  "privacy": "private",
100924
100856
  "inheritedFrom": {
100925
- "name": "SbbButtonBaseElement",
100857
+ "name": "SbbButtonLikeBaseElement",
100926
100858
  "module": "core/base-elements/button-base-element.js"
100927
100859
  }
100928
100860
  },
100929
100861
  {
100930
100862
  "kind": "field",
100931
- "name": "formAssociated",
100932
- "type": {
100933
- "text": "boolean"
100934
- },
100935
- "privacy": "public",
100936
- "static": true,
100937
- "default": "true",
100938
- "inheritedFrom": {
100939
- "name": "SbbFormAssociatedMixin",
100940
- "module": "core/mixins/form-associated-mixin.js"
100941
- }
100942
- },
100943
- {
100944
- "kind": "field",
100945
- "name": "name",
100946
- "privacy": "public",
100947
- "description": "Name of the form element. Will be read from name attribute.",
100863
+ "name": "maybeDisabled",
100948
100864
  "type": {
100949
- "text": "string"
100865
+ "text": "boolean | undefined"
100950
100866
  },
100951
- "attribute": "name",
100867
+ "privacy": "protected",
100868
+ "readonly": true,
100952
100869
  "inheritedFrom": {
100953
- "name": "SbbFormAssociatedMixin",
100954
- "module": "core/mixins/form-associated-mixin.js"
100870
+ "name": "SbbActionBaseElement",
100871
+ "module": "core/base-elements/action-base-element.js"
100955
100872
  }
100956
100873
  },
100957
100874
  {
100958
100875
  "kind": "field",
100959
- "name": "validity",
100876
+ "name": "maybeDisabledInteractive",
100960
100877
  "type": {
100961
- "text": "ValidityState"
100878
+ "text": "boolean | undefined"
100962
100879
  },
100963
- "privacy": "public",
100964
- "description": "Returns the ValidityState object for this element.",
100880
+ "privacy": "protected",
100965
100881
  "readonly": true,
100966
100882
  "inheritedFrom": {
100967
- "name": "SbbFormAssociatedMixin",
100968
- "module": "core/mixins/form-associated-mixin.js"
100883
+ "name": "SbbActionBaseElement",
100884
+ "module": "core/base-elements/action-base-element.js"
100969
100885
  }
100970
100886
  },
100971
100887
  {
100972
- "kind": "field",
100973
- "name": "validationMessage",
100974
- "type": {
100975
- "text": "string"
100888
+ "kind": "method",
100889
+ "name": "setupBaseEventHandlers",
100890
+ "privacy": "protected",
100891
+ "return": {
100892
+ "type": {
100893
+ "text": "void"
100894
+ }
100976
100895
  },
100977
- "privacy": "public",
100978
- "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.",
100979
- "readonly": true,
100980
100896
  "inheritedFrom": {
100981
- "name": "SbbFormAssociatedMixin",
100982
- "module": "core/mixins/form-associated-mixin.js"
100897
+ "name": "SbbActionBaseElement",
100898
+ "module": "core/base-elements/action-base-element.js"
100983
100899
  }
100984
100900
  },
100985
100901
  {
100986
100902
  "kind": "field",
100987
- "name": "willValidate",
100903
+ "name": "_hydrationRequired",
100988
100904
  "type": {
100989
100905
  "text": "boolean"
100990
100906
  },
100991
- "privacy": "public",
100992
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
100993
- "readonly": true,
100907
+ "privacy": "private",
100908
+ "default": "!!this.shadowRoot",
100994
100909
  "inheritedFrom": {
100995
- "name": "SbbFormAssociatedMixin",
100996
- "module": "core/mixins/form-associated-mixin.js"
100910
+ "name": "SbbElement",
100911
+ "module": "core/base-elements/element.js"
100997
100912
  }
100998
100913
  },
100999
100914
  {
101000
100915
  "kind": "field",
101001
- "name": "_validityStates",
100916
+ "name": "_hydrationComplete",
101002
100917
  "privacy": "private",
101003
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
100918
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
101004
100919
  "inheritedFrom": {
101005
- "name": "SbbFormAssociatedMixin",
101006
- "module": "core/mixins/form-associated-mixin.js"
100920
+ "name": "SbbElement",
100921
+ "module": "core/base-elements/element.js"
101007
100922
  }
101008
100923
  },
101009
100924
  {
101010
100925
  "kind": "field",
101011
- "name": "formDisabled",
100926
+ "name": "_resolveHydration",
101012
100927
  "type": {
101013
- "text": "boolean"
100928
+ "text": "(hydrationRequired: boolean) => void"
101014
100929
  },
101015
- "privacy": "protected",
101016
- "default": "false",
101017
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
100930
+ "privacy": "private",
101018
100931
  "inheritedFrom": {
101019
- "name": "SbbFormAssociatedMixin",
101020
- "module": "core/mixins/form-associated-mixin.js"
100932
+ "name": "SbbElement",
100933
+ "module": "core/base-elements/element.js"
101021
100934
  }
101022
100935
  },
101023
100936
  {
101024
- "kind": "method",
101025
- "name": "checkValidity",
101026
- "privacy": "public",
101027
- "return": {
101028
- "type": {
101029
- "text": "boolean"
101030
- }
100937
+ "kind": "field",
100938
+ "name": "hydrationRequired",
100939
+ "type": {
100940
+ "text": "boolean"
101031
100941
  },
101032
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
100942
+ "privacy": "protected",
100943
+ "description": "Returns whether hydration is required and not completed.",
100944
+ "readonly": true,
101033
100945
  "inheritedFrom": {
101034
- "name": "SbbFormAssociatedMixin",
101035
- "module": "core/mixins/form-associated-mixin.js"
101036
- }
101037
- },
101038
- {
101039
- "kind": "method",
101040
- "name": "reportValidity",
101041
- "privacy": "public",
101042
- "return": {
101043
- "type": {
101044
- "text": "boolean"
101045
- }
100946
+ "name": "SbbElement",
100947
+ "module": "core/base-elements/element.js"
101046
100948
  },
101047
- "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.",
101048
- "inheritedFrom": {
101049
- "name": "SbbFormAssociatedMixin",
101050
- "module": "core/mixins/form-associated-mixin.js"
101051
- }
100949
+ "default": "!!this.shadowRoot"
101052
100950
  },
101053
100951
  {
101054
100952
  "kind": "method",
101055
- "name": "setCustomValidity",
101056
- "privacy": "public",
100953
+ "name": "toggleState",
100954
+ "privacy": "protected",
101057
100955
  "return": {
101058
100956
  "type": {
101059
100957
  "text": "void"
@@ -101061,235 +100959,400 @@
101061
100959
  },
101062
100960
  "parameters": [
101063
100961
  {
101064
- "name": "message",
100962
+ "name": "value",
101065
100963
  "type": {
101066
100964
  "text": "string"
101067
100965
  }
100966
+ },
100967
+ {
100968
+ "name": "force",
100969
+ "optional": true,
100970
+ "type": {
100971
+ "text": "boolean"
100972
+ }
101068
100973
  }
101069
100974
  ],
101070
- "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.",
101071
100975
  "inheritedFrom": {
101072
- "name": "SbbFormAssociatedMixin",
101073
- "module": "core/mixins/form-associated-mixin.js"
100976
+ "name": "SbbElement",
100977
+ "module": "core/base-elements/element.js"
101074
100978
  }
101075
100979
  },
101076
100980
  {
101077
- "kind": "method",
101078
- "name": "_hasDisabledAncestor",
100981
+ "kind": "field",
100982
+ "name": "['_$sbbElement$']",
100983
+ "type": {
100984
+ "text": "boolean"
100985
+ },
100986
+ "privacy": "public",
100987
+ "static": true,
100988
+ "default": "true",
100989
+ "inheritedFrom": {
100990
+ "name": "SbbElement",
100991
+ "module": "core/base-elements/element.js"
100992
+ }
100993
+ },
100994
+ {
100995
+ "kind": "field",
100996
+ "name": "_controllers",
100997
+ "type": {
100998
+ "text": "Set<SbbReactiveController> | undefined"
100999
+ },
101079
101000
  "privacy": "private",
101080
- "return": {
101081
- "type": {
101082
- "text": "boolean"
101083
- }
101001
+ "inheritedFrom": {
101002
+ "name": "SbbElement",
101003
+ "module": "core/base-elements/element.js"
101004
+ }
101005
+ }
101006
+ ],
101007
+ "mixins": [
101008
+ {
101009
+ "name": "SbbBlockLinkCommonElementMixin",
101010
+ "module": "link/common/block-link-common.js"
101011
+ },
101012
+ {
101013
+ "name": "SbbDisabledTabIndexActionMixin",
101014
+ "module": "core/mixins.js"
101015
+ }
101016
+ ],
101017
+ "superclass": {
101018
+ "name": "SbbButtonBaseElement",
101019
+ "module": "core/base-elements.js"
101020
+ },
101021
+ "tagName": "sbb-block-link-button",
101022
+ "customElement": true,
101023
+ "attributes": [
101024
+ {
101025
+ "name": "icon-placement",
101026
+ "type": {
101027
+ "text": "SbbIconPlacement"
101084
101028
  },
101029
+ "default": "'start'",
101030
+ "description": "Moves the icon to the end of the component if set to true.",
101031
+ "fieldName": "iconPlacement",
101085
101032
  "inheritedFrom": {
101086
- "name": "SbbFormAssociatedMixin",
101087
- "module": "core/mixins/form-associated-mixin.js"
101033
+ "name": "SbbBlockLinkCommonElementMixin",
101034
+ "module": "link/common/block-link-common.js"
101088
101035
  }
101089
101036
  },
101090
101037
  {
101091
- "kind": "method",
101092
- "name": "updateFormValue",
101093
- "privacy": "protected",
101094
- "return": {
101095
- "type": {
101096
- "text": "void"
101097
- }
101038
+ "name": "size",
101039
+ "type": {
101040
+ "text": "SbbLinkSize"
101098
101041
  },
101099
- "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",
101042
+ "description": "Text size, the link should get in the non-button variation.\nWith inline variant, the text size adapts to where it is used.",
101043
+ "default": "'s' / 'xs' (lean)",
101044
+ "fieldName": "size",
101100
101045
  "inheritedFrom": {
101101
- "name": "SbbFormAssociatedMixin",
101102
- "module": "core/mixins/form-associated-mixin.js"
101046
+ "name": "SbbLinkCommonElementMixin",
101047
+ "module": "link/common/link-common.js"
101103
101048
  }
101104
101049
  },
101105
101050
  {
101106
- "kind": "method",
101107
- "name": "formState",
101108
- "privacy": "protected",
101109
- "return": {
101110
- "type": {
101111
- "text": "FormRestoreState"
101112
- }
101051
+ "name": "icon-name",
101052
+ "type": {
101053
+ "text": "string"
101113
101054
  },
101055
+ "default": "''",
101056
+ "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.",
101057
+ "fieldName": "iconName",
101114
101058
  "inheritedFrom": {
101115
- "name": "SbbFormAssociatedMixin",
101116
- "module": "core/mixins/form-associated-mixin.js"
101059
+ "name": "SbbIconNameMixin",
101060
+ "module": "icon/icon-name-mixin.js"
101117
101061
  }
101118
101062
  },
101119
101063
  {
101120
- "kind": "method",
101121
- "name": "setValidityFlag",
101122
- "privacy": "protected",
101123
- "return": {
101124
- "type": {
101125
- "text": "void"
101126
- }
101064
+ "name": "disabled-interactive",
101065
+ "type": {
101066
+ "text": "boolean"
101127
101067
  },
101128
- "parameters": [
101129
- {
101130
- "name": "flag",
101131
- "type": {
101132
- "text": "T"
101133
- }
101134
- },
101135
- {
101136
- "name": "message",
101137
- "type": {
101138
- "text": "string"
101139
- }
101140
- },
101141
- {
101142
- "name": "flagValue",
101143
- "optional": true,
101144
- "type": {
101145
- "text": "ValidityStateFlags[T]"
101146
- }
101147
- }
101148
- ],
101149
- "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).",
101068
+ "default": "false",
101069
+ "description": "Whether the button should be aria-disabled but stay interactive.",
101070
+ "fieldName": "disabledInteractive",
101150
101071
  "inheritedFrom": {
101151
- "name": "SbbFormAssociatedMixin",
101152
- "module": "core/mixins/form-associated-mixin.js"
101072
+ "name": "SbbDisabledInteractiveMixin",
101073
+ "module": "core/mixins/disabled-mixin.js"
101153
101074
  }
101154
101075
  },
101155
101076
  {
101156
- "kind": "method",
101157
- "name": "removeValidityFlag",
101158
- "privacy": "protected",
101159
- "return": {
101160
- "type": {
101161
- "text": "void"
101162
- }
101077
+ "name": "disabled",
101078
+ "description": "Whether the component is disabled.",
101079
+ "default": "false",
101080
+ "type": {
101081
+ "text": "boolean"
101163
101082
  },
101164
- "parameters": [
101165
- {
101166
- "name": "flag",
101167
- "type": {
101168
- "text": "T"
101169
- }
101170
- }
101171
- ],
101172
- "description": "Removes the validity state flag entry and updates validity state.",
101083
+ "fieldName": "disabled",
101084
+ "inheritedFrom": {
101085
+ "name": "SbbDisabledMixin",
101086
+ "module": "core/mixins/disabled-mixin.js"
101087
+ }
101088
+ },
101089
+ {
101090
+ "name": "value",
101091
+ "type": {
101092
+ "text": "string"
101093
+ },
101094
+ "default": "''",
101095
+ "description": "Value of the form element.",
101096
+ "fieldName": "value",
101097
+ "inheritedFrom": {
101098
+ "name": "SbbButtonBaseElement",
101099
+ "module": "core/base-elements/button-base-element.js"
101100
+ }
101101
+ },
101102
+ {
101103
+ "name": "type",
101104
+ "description": "The type attribute to use for the button.",
101105
+ "default": "'button'",
101106
+ "type": {
101107
+ "text": "SbbButtonType"
101108
+ },
101109
+ "fieldName": "type",
101110
+ "inheritedFrom": {
101111
+ "name": "SbbButtonBaseElement",
101112
+ "module": "core/base-elements/button-base-element.js"
101113
+ }
101114
+ },
101115
+ {
101116
+ "name": "form",
101117
+ "description": "The `<form>` element to associate the button with.",
101118
+ "type": {
101119
+ "text": "HTMLFormElement | null"
101120
+ },
101121
+ "fieldName": "form",
101122
+ "inheritedFrom": {
101123
+ "name": "SbbButtonBaseElement",
101124
+ "module": "core/base-elements/button-base-element.js"
101125
+ }
101126
+ },
101127
+ {
101128
+ "name": "name",
101129
+ "description": "Name of the form element. Will be read from name attribute.",
101130
+ "type": {
101131
+ "text": "string"
101132
+ },
101133
+ "fieldName": "name",
101173
101134
  "inheritedFrom": {
101174
101135
  "name": "SbbFormAssociatedMixin",
101175
101136
  "module": "core/mixins/form-associated-mixin.js"
101176
101137
  }
101138
+ }
101139
+ ]
101140
+ }
101141
+ ],
101142
+ "exports": [
101143
+ {
101144
+ "kind": "js",
101145
+ "name": "SbbBlockLinkButtonElement",
101146
+ "declaration": {
101147
+ "name": "SbbBlockLinkButtonElement",
101148
+ "module": "link/block-link-button/block-link-button.component.js"
101149
+ }
101150
+ }
101151
+ ]
101152
+ },
101153
+ {
101154
+ "kind": "javascript-module",
101155
+ "path": "link/block-link-static/block-link-static.component.js",
101156
+ "declarations": [
101157
+ {
101158
+ "kind": "class",
101159
+ "description": "It displays a static link enhanced with the SBB Design.",
101160
+ "name": "SbbBlockLinkStaticElement",
101161
+ "slots": [
101162
+ {
101163
+ "description": "Use the unnamed slot to add content to the `sbb-block-link-static`.",
101164
+ "name": ""
101165
+ },
101166
+ {
101167
+ "description": "Slot used to display the icon, if one is set.",
101168
+ "name": "icon"
101169
+ }
101170
+ ],
101171
+ "members": [
101172
+ {
101173
+ "kind": "field",
101174
+ "name": "elementName",
101175
+ "type": {
101176
+ "text": "string"
101177
+ },
101178
+ "privacy": "public",
101179
+ "static": true,
101180
+ "readonly": true,
101181
+ "inheritedFrom": {
101182
+ "name": "SbbElement",
101183
+ "module": "core/base-elements/element.js"
101184
+ },
101185
+ "default": "'sbb-block-link-static'"
101186
+ },
101187
+ {
101188
+ "kind": "field",
101189
+ "name": "styles",
101190
+ "type": {
101191
+ "text": "CSSResultGroup"
101192
+ },
101193
+ "privacy": "public",
101194
+ "static": true,
101195
+ "default": "[boxSizingStyles, style, blockStyle]",
101196
+ "inheritedFrom": {
101197
+ "name": "SbbLinkCommonElementMixin",
101198
+ "module": "link/common/link-common.js"
101199
+ }
101200
+ },
101201
+ {
101202
+ "kind": "field",
101203
+ "name": "iconPlacement",
101204
+ "type": {
101205
+ "text": "SbbIconPlacement"
101206
+ },
101207
+ "privacy": "public",
101208
+ "default": "'start'",
101209
+ "description": "Moves the icon to the end of the component if set to true.",
101210
+ "attribute": "icon-placement",
101211
+ "reflects": true,
101212
+ "inheritedFrom": {
101213
+ "name": "SbbBlockLinkCommonElementMixin",
101214
+ "module": "link/common/block-link-common.js"
101215
+ }
101177
101216
  },
101178
101217
  {
101179
101218
  "kind": "method",
101180
- "name": "validate",
101219
+ "name": "renderTemplate",
101181
101220
  "privacy": "protected",
101182
101221
  "return": {
101183
101222
  "type": {
101184
- "text": "void"
101223
+ "text": "TemplateResult"
101185
101224
  }
101186
101225
  },
101187
- "description": "To be called whenever the current element needs to be validated.",
101226
+ "description": "Override this method to render the component template.",
101188
101227
  "inheritedFrom": {
101189
- "name": "SbbFormAssociatedMixin",
101190
- "module": "core/mixins/form-associated-mixin.js"
101228
+ "name": "SbbActionBaseElement",
101229
+ "module": "core/base-elements/action-base-element.js"
101230
+ }
101231
+ },
101232
+ {
101233
+ "kind": "field",
101234
+ "name": "size",
101235
+ "type": {
101236
+ "text": "SbbLinkSize"
101237
+ },
101238
+ "privacy": "public",
101239
+ "description": "Text size, the link should get in the non-button variation.\nWith inline variant, the text size adapts to where it is used.",
101240
+ "default": "'s' / 'xs' (lean)",
101241
+ "attribute": "size",
101242
+ "reflects": true,
101243
+ "inheritedFrom": {
101244
+ "name": "SbbLinkCommonElementMixin",
101245
+ "module": "link/common/link-common.js"
101246
+ }
101247
+ },
101248
+ {
101249
+ "kind": "field",
101250
+ "name": "iconName",
101251
+ "type": {
101252
+ "text": "string"
101253
+ },
101254
+ "privacy": "public",
101255
+ "default": "''",
101256
+ "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.",
101257
+ "attribute": "icon-name",
101258
+ "inheritedFrom": {
101259
+ "name": "SbbIconNameMixin",
101260
+ "module": "icon/icon-name-mixin.js"
101191
101261
  }
101192
101262
  },
101193
101263
  {
101194
101264
  "kind": "method",
101195
- "name": "shouldValidate",
101265
+ "name": "renderIconSlot",
101196
101266
  "privacy": "protected",
101197
101267
  "return": {
101198
101268
  "type": {
101199
- "text": "boolean"
101269
+ "text": "TemplateResult"
101200
101270
  }
101201
101271
  },
101202
101272
  "parameters": [
101203
101273
  {
101204
- "name": "name",
101274
+ "name": "classname",
101275
+ "optional": true,
101205
101276
  "type": {
101206
- "text": "PropertyKey | undefined"
101277
+ "text": "string"
101207
101278
  }
101208
101279
  }
101209
101280
  ],
101210
- "description": "Whether validation should be run on a property change with the given name.",
101211
101281
  "inheritedFrom": {
101212
- "name": "SbbFormAssociatedMixin",
101213
- "module": "core/mixins/form-associated-mixin.js"
101282
+ "name": "SbbIconNameMixin",
101283
+ "module": "icon/icon-name-mixin.js"
101214
101284
  }
101215
101285
  },
101216
101286
  {
101217
101287
  "kind": "method",
101218
- "name": "_setInternalValidity",
101219
- "privacy": "private",
101288
+ "name": "renderIconName",
101289
+ "privacy": "protected",
101220
101290
  "return": {
101221
101291
  "type": {
101222
- "text": "void"
101292
+ "text": "string"
101223
101293
  }
101224
101294
  },
101225
101295
  "inheritedFrom": {
101226
- "name": "SbbFormAssociatedMixin",
101227
- "module": "core/mixins/form-associated-mixin.js"
101228
- }
101229
- },
101230
- {
101231
- "kind": "field",
101232
- "name": "role",
101233
- "type": {
101234
- "text": "ElementInternals['role']"
101235
- },
101236
- "privacy": "public",
101237
- "static": true,
101238
- "readonly": true,
101239
- "default": "'button'",
101240
- "inheritedFrom": {
101241
- "name": "SbbButtonLikeBaseElement",
101242
- "module": "core/base-elements/button-base-element.js"
101296
+ "name": "SbbIconNameMixin",
101297
+ "module": "icon/icon-name-mixin.js"
101243
101298
  }
101244
101299
  },
101245
101300
  {
101246
- "kind": "field",
101247
- "name": "_preventScrollOnSpaceKeydown",
101301
+ "kind": "method",
101302
+ "name": "_renderIconName",
101248
101303
  "privacy": "private",
101249
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
101250
- "parameters": [
101251
- {
101252
- "description": "The origin event.",
101253
- "name": "event"
101304
+ "return": {
101305
+ "type": {
101306
+ "text": "string"
101254
101307
  }
101255
- ],
101308
+ },
101256
101309
  "inheritedFrom": {
101257
- "name": "SbbButtonLikeBaseElement",
101258
- "module": "core/base-elements/button-base-element.js"
101310
+ "name": "SbbIconNameMixin",
101311
+ "module": "icon/icon-name-mixin.js"
101259
101312
  }
101260
101313
  },
101261
101314
  {
101262
101315
  "kind": "field",
101263
- "name": "_removeActiveMarker",
101264
- "privacy": "private",
101316
+ "name": "disabled",
101317
+ "privacy": "public",
101318
+ "description": "Whether the component is disabled.",
101319
+ "default": "false",
101320
+ "type": {
101321
+ "text": "boolean"
101322
+ },
101323
+ "attribute": "disabled",
101324
+ "reflects": true,
101265
101325
  "inheritedFrom": {
101266
- "name": "SbbButtonLikeBaseElement",
101267
- "module": "core/base-elements/button-base-element.js"
101326
+ "name": "SbbDisabledMixin",
101327
+ "module": "core/mixins/disabled-mixin.js"
101268
101328
  }
101269
101329
  },
101270
101330
  {
101271
101331
  "kind": "field",
101272
- "name": "_dispatchClickEventOnSpaceKeyup",
101332
+ "name": "#disabled",
101273
101333
  "privacy": "private",
101274
- "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.",
101275
- "parameters": [
101276
- {
101277
- "description": "The origin event.",
101278
- "name": "event"
101279
- }
101280
- ],
101334
+ "type": {
101335
+ "text": "boolean"
101336
+ },
101337
+ "default": "false",
101281
101338
  "inheritedFrom": {
101282
- "name": "SbbButtonLikeBaseElement",
101283
- "module": "core/base-elements/button-base-element.js"
101339
+ "name": "SbbDisabledMixin",
101340
+ "module": "core/mixins/disabled-mixin.js"
101284
101341
  }
101285
101342
  },
101286
101343
  {
101287
- "kind": "field",
101288
- "name": "_dispatchClickEvent",
101289
- "privacy": "private",
101344
+ "kind": "method",
101345
+ "name": "isDisabledExternally",
101346
+ "privacy": "protected",
101347
+ "return": {
101348
+ "type": {
101349
+ "text": "boolean"
101350
+ }
101351
+ },
101352
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
101290
101353
  "inheritedFrom": {
101291
- "name": "SbbButtonLikeBaseElement",
101292
- "module": "core/base-elements/button-base-element.js"
101354
+ "name": "SbbDisabledMixin",
101355
+ "module": "core/mixins/disabled-mixin.js"
101293
101356
  }
101294
101357
  },
101295
101358
  {
@@ -101444,15 +101507,15 @@
101444
101507
  "module": "link/common/block-link-common.js"
101445
101508
  },
101446
101509
  {
101447
- "name": "SbbDisabledTabIndexActionMixin",
101510
+ "name": "SbbDisabledMixin",
101448
101511
  "module": "core/mixins.js"
101449
101512
  }
101450
101513
  ],
101451
101514
  "superclass": {
101452
- "name": "SbbButtonBaseElement",
101515
+ "name": "SbbActionBaseElement",
101453
101516
  "module": "core/base-elements.js"
101454
101517
  },
101455
- "tagName": "sbb-block-link-button",
101518
+ "tagName": "sbb-block-link-static",
101456
101519
  "customElement": true,
101457
101520
  "attributes": [
101458
101521
  {
@@ -101494,19 +101557,6 @@
101494
101557
  "module": "icon/icon-name-mixin.js"
101495
101558
  }
101496
101559
  },
101497
- {
101498
- "name": "disabled-interactive",
101499
- "type": {
101500
- "text": "boolean"
101501
- },
101502
- "default": "false",
101503
- "description": "Whether the button should be aria-disabled but stay interactive.",
101504
- "fieldName": "disabledInteractive",
101505
- "inheritedFrom": {
101506
- "name": "SbbDisabledInteractiveMixin",
101507
- "module": "core/mixins/disabled-mixin.js"
101508
- }
101509
- },
101510
101560
  {
101511
101561
  "name": "disabled",
101512
101562
  "description": "Whether the component is disabled.",
@@ -101519,56 +101569,6 @@
101519
101569
  "name": "SbbDisabledMixin",
101520
101570
  "module": "core/mixins/disabled-mixin.js"
101521
101571
  }
101522
- },
101523
- {
101524
- "name": "value",
101525
- "type": {
101526
- "text": "string"
101527
- },
101528
- "default": "''",
101529
- "description": "Value of the form element.",
101530
- "fieldName": "value",
101531
- "inheritedFrom": {
101532
- "name": "SbbButtonBaseElement",
101533
- "module": "core/base-elements/button-base-element.js"
101534
- }
101535
- },
101536
- {
101537
- "name": "type",
101538
- "description": "The type attribute to use for the button.",
101539
- "default": "'button'",
101540
- "type": {
101541
- "text": "SbbButtonType"
101542
- },
101543
- "fieldName": "type",
101544
- "inheritedFrom": {
101545
- "name": "SbbButtonBaseElement",
101546
- "module": "core/base-elements/button-base-element.js"
101547
- }
101548
- },
101549
- {
101550
- "name": "form",
101551
- "description": "The `<form>` element to associate the button with.",
101552
- "type": {
101553
- "text": "HTMLFormElement | null"
101554
- },
101555
- "fieldName": "form",
101556
- "inheritedFrom": {
101557
- "name": "SbbButtonBaseElement",
101558
- "module": "core/base-elements/button-base-element.js"
101559
- }
101560
- },
101561
- {
101562
- "name": "name",
101563
- "description": "Name of the form element. Will be read from name attribute.",
101564
- "type": {
101565
- "text": "string"
101566
- },
101567
- "fieldName": "name",
101568
- "inheritedFrom": {
101569
- "name": "SbbFormAssociatedMixin",
101570
- "module": "core/mixins/form-associated-mixin.js"
101571
- }
101572
101572
  }
101573
101573
  ]
101574
101574
  }
@@ -101576,10 +101576,10 @@
101576
101576
  "exports": [
101577
101577
  {
101578
101578
  "kind": "js",
101579
- "name": "SbbBlockLinkButtonElement",
101579
+ "name": "SbbBlockLinkStaticElement",
101580
101580
  "declaration": {
101581
- "name": "SbbBlockLinkButtonElement",
101582
- "module": "link/block-link-button/block-link-button.component.js"
101581
+ "name": "SbbBlockLinkStaticElement",
101582
+ "module": "link/block-link-static/block-link-static.component.js"
101583
101583
  }
101584
101584
  }
101585
101585
  ]
@@ -130356,16 +130356,20 @@
130356
130356
  },
130357
130357
  {
130358
130358
  "kind": "javascript-module",
130359
- "path": "toggle/toggle/toggle.component.js",
130359
+ "path": "toggle/toggle-option/toggle-option.component.js",
130360
130360
  "declarations": [
130361
130361
  {
130362
130362
  "kind": "class",
130363
- "description": "It can be used as a container for two `sbb-toggle-option`, acting as a toggle button.",
130364
- "name": "SbbToggleElement",
130363
+ "description": "It displays a toggle option within a `sbb-toggle`.",
130364
+ "name": "SbbToggleOptionElement",
130365
130365
  "slots": [
130366
130366
  {
130367
- "description": "Use the unnamed slot to add `<sbb-toggle-option>` elements to the toggle.",
130367
+ "description": "Use the unnamed slot to add content to the label of the toggle option.",
130368
130368
  "name": ""
130369
+ },
130370
+ {
130371
+ "description": "Slot used to render the `sbb-icon`.",
130372
+ "name": "icon"
130369
130373
  }
130370
130374
  ],
130371
130375
  "members": [
@@ -130378,7 +130382,7 @@
130378
130382
  "privacy": "public",
130379
130383
  "static": true,
130380
130384
  "readonly": true,
130381
- "default": "'sbb-toggle'",
130385
+ "default": "'sbb-toggle-option'",
130382
130386
  "inheritedFrom": {
130383
130387
  "name": "SbbElement",
130384
130388
  "module": "core/base-elements/element.js"
@@ -130393,165 +130397,244 @@
130393
130397
  "privacy": "public",
130394
130398
  "static": true,
130395
130399
  "readonly": true,
130396
- "default": "'radiogroup'"
130397
- },
130398
- {
130399
- "kind": "field",
130400
- "name": "events",
130401
- "privacy": "public",
130402
- "static": true,
130403
- "readonly": true,
130404
- "default": "{ change: 'change', }",
130405
- "type": {
130406
- "text": "{\n change: 'change',\n }"
130407
- }
130400
+ "default": "'radio'"
130408
130401
  },
130409
130402
  {
130410
130403
  "kind": "field",
130411
- "name": "even",
130404
+ "name": "checked",
130412
130405
  "type": {
130413
130406
  "text": "boolean"
130414
130407
  },
130415
130408
  "privacy": "public",
130416
130409
  "default": "false",
130417
- "description": "If true, set the width of the component fixed; if false,\nthe width is dynamic based on the label of the sbb-toggle-option.",
130418
- "attribute": "even",
130410
+ "description": "Whether the toggle-option is checked.",
130411
+ "attribute": "checked",
130419
130412
  "reflects": true
130420
130413
  },
130421
130414
  {
130422
130415
  "kind": "field",
130423
- "name": "size",
130416
+ "name": "value",
130424
130417
  "type": {
130425
- "text": "'s' | 'm'"
130418
+ "text": "(T = string) | null"
130426
130419
  },
130427
130420
  "privacy": "public",
130428
- "description": "Size variant, either m or s.",
130429
- "default": "'m' / 's' (lean)",
130430
- "attribute": "size",
130431
- "reflects": true
130421
+ "default": "null",
130422
+ "description": "Value of toggle-option.",
130423
+ "attribute": "value"
130432
130424
  },
130433
130425
  {
130434
130426
  "kind": "field",
130435
- "name": "value",
130427
+ "name": "_toggle",
130436
130428
  "type": {
130437
- "text": "(T = string) | null"
130429
+ "text": "SbbToggleElement | null"
130438
130430
  },
130431
+ "privacy": "private",
130432
+ "default": "null"
130433
+ },
130434
+ {
130435
+ "kind": "method",
130436
+ "name": "_uncheckOtherOptions",
130437
+ "privacy": "private",
130438
+ "return": {
130439
+ "type": {
130440
+ "text": "void"
130441
+ }
130442
+ }
130443
+ },
130444
+ {
130445
+ "kind": "method",
130446
+ "name": "_handleDisabledChange",
130447
+ "privacy": "private",
130448
+ "return": {
130449
+ "type": {
130450
+ "text": "void"
130451
+ }
130452
+ }
130453
+ },
130454
+ {
130455
+ "kind": "method",
130456
+ "name": "_handleInput",
130457
+ "privacy": "private",
130458
+ "return": {
130459
+ "type": {
130460
+ "text": "void"
130461
+ }
130462
+ }
130463
+ },
130464
+ {
130465
+ "kind": "method",
130466
+ "name": "_verifyTabindex",
130467
+ "privacy": "private",
130468
+ "return": {
130469
+ "type": {
130470
+ "text": "void"
130471
+ }
130472
+ }
130473
+ },
130474
+ {
130475
+ "kind": "field",
130476
+ "name": "disabled",
130439
130477
  "privacy": "public",
130440
- "description": "The value of the toggle. It needs to be mutable since it is updated whenever\na new option is selected (see the `onToggleOptionSelect()` method).",
130441
- "attribute": "value",
130478
+ "description": "Whether the component is disabled.",
130479
+ "default": "false",
130480
+ "type": {
130481
+ "text": "boolean"
130482
+ },
130483
+ "attribute": "disabled",
130484
+ "reflects": true,
130485
+ "inheritedFrom": {
130486
+ "name": "SbbDisabledMixin",
130487
+ "module": "core/mixins/disabled-mixin.js"
130488
+ }
130489
+ },
130490
+ {
130491
+ "kind": "field",
130492
+ "name": "#disabled",
130493
+ "privacy": "private",
130494
+ "type": {
130495
+ "text": "boolean"
130496
+ },
130497
+ "default": "false",
130498
+ "inheritedFrom": {
130499
+ "name": "SbbDisabledMixin",
130500
+ "module": "core/mixins/disabled-mixin.js"
130501
+ }
130502
+ },
130503
+ {
130504
+ "kind": "method",
130505
+ "name": "isDisabledExternally",
130506
+ "privacy": "protected",
130507
+ "return": {
130508
+ "type": {
130509
+ "text": "boolean"
130510
+ }
130511
+ },
130512
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
130442
130513
  "inheritedFrom": {
130443
- "name": "SbbFormAssociatedMixin",
130444
- "module": "core/mixins/form-associated-mixin.js"
130514
+ "name": "SbbDisabledMixin",
130515
+ "module": "core/mixins/disabled-mixin.js"
130445
130516
  }
130446
130517
  },
130447
130518
  {
130448
130519
  "kind": "field",
130449
- "name": "_fallbackValue",
130450
- "type": {
130451
- "text": "T | null"
130452
- },
130453
- "privacy": "private",
130454
- "default": "null"
130455
- },
130456
- {
130457
- "kind": "field",
130458
- "name": "options",
130520
+ "name": "iconName",
130459
130521
  "type": {
130460
- "text": "SbbToggleOptionElement<T>[]"
130522
+ "text": "string"
130461
130523
  },
130462
130524
  "privacy": "public",
130463
- "description": "The child instances of sbb-toggle-option as an array.",
130464
- "readonly": true
130525
+ "default": "''",
130526
+ "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.",
130527
+ "attribute": "icon-name",
130528
+ "inheritedFrom": {
130529
+ "name": "SbbIconNameMixin",
130530
+ "module": "icon/icon-name-mixin.js"
130531
+ }
130465
130532
  },
130466
130533
  {
130467
130534
  "kind": "method",
130468
- "name": "_readFormData",
130469
- "privacy": "private",
130535
+ "name": "renderIconSlot",
130536
+ "privacy": "protected",
130470
130537
  "return": {
130471
130538
  "type": {
130472
- "text": "Promise<T>"
130539
+ "text": "TemplateResult"
130473
130540
  }
130474
130541
  },
130475
130542
  "parameters": [
130476
130543
  {
130477
- "name": "formData",
130544
+ "name": "classname",
130545
+ "optional": true,
130478
130546
  "type": {
130479
- "text": "FormData"
130547
+ "text": "string"
130480
130548
  }
130481
130549
  }
130482
- ]
130550
+ ],
130551
+ "inheritedFrom": {
130552
+ "name": "SbbIconNameMixin",
130553
+ "module": "icon/icon-name-mixin.js"
130554
+ }
130483
130555
  },
130484
130556
  {
130485
130557
  "kind": "method",
130486
- "name": "_updateToggle",
130487
- "privacy": "private",
130558
+ "name": "renderIconName",
130559
+ "privacy": "protected",
130488
130560
  "return": {
130489
130561
  "type": {
130490
- "text": "void"
130562
+ "text": "string"
130491
130563
  }
130564
+ },
130565
+ "inheritedFrom": {
130566
+ "name": "SbbIconNameMixin",
130567
+ "module": "icon/icon-name-mixin.js"
130492
130568
  }
130493
130569
  },
130494
130570
  {
130495
130571
  "kind": "method",
130496
- "name": "_valueChanged",
130572
+ "name": "_renderIconName",
130497
130573
  "privacy": "private",
130498
130574
  "return": {
130499
130575
  "type": {
130500
- "text": "void"
130576
+ "text": "string"
130501
130577
  }
130502
130578
  },
130503
- "parameters": [
130504
- {
130505
- "name": "value",
130506
- "type": {
130507
- "text": "T | null"
130508
- }
130509
- }
130510
- ]
130579
+ "inheritedFrom": {
130580
+ "name": "SbbIconNameMixin",
130581
+ "module": "icon/icon-name-mixin.js"
130582
+ }
130511
130583
  },
130512
130584
  {
130513
- "kind": "method",
130514
- "name": "_updateDisabled",
130585
+ "kind": "field",
130586
+ "name": "_hydrationRequired",
130587
+ "type": {
130588
+ "text": "boolean"
130589
+ },
130515
130590
  "privacy": "private",
130516
- "return": {
130517
- "type": {
130518
- "text": "void"
130519
- }
130591
+ "default": "!!this.shadowRoot",
130592
+ "inheritedFrom": {
130593
+ "name": "SbbElement",
130594
+ "module": "core/base-elements/element.js"
130520
130595
  }
130521
130596
  },
130522
130597
  {
130523
- "kind": "method",
130524
- "name": "_handleInput",
130598
+ "kind": "field",
130599
+ "name": "_hydrationComplete",
130525
130600
  "privacy": "private",
130526
- "return": {
130527
- "type": {
130528
- "text": "void"
130529
- }
130530
- },
130531
- "description": "Called on user interaction (click or keyboard)"
130601
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
130602
+ "inheritedFrom": {
130603
+ "name": "SbbElement",
130604
+ "module": "core/base-elements/element.js"
130605
+ }
130532
130606
  },
130533
130607
  {
130534
- "kind": "method",
130535
- "name": "_handleKeyDown",
130608
+ "kind": "field",
130609
+ "name": "_resolveHydration",
130610
+ "type": {
130611
+ "text": "(hydrationRequired: boolean) => void"
130612
+ },
130536
130613
  "privacy": "private",
130537
- "return": {
130538
- "type": {
130539
- "text": "void"
130540
- }
130614
+ "inheritedFrom": {
130615
+ "name": "SbbElement",
130616
+ "module": "core/base-elements/element.js"
130617
+ }
130618
+ },
130619
+ {
130620
+ "kind": "field",
130621
+ "name": "hydrationRequired",
130622
+ "type": {
130623
+ "text": "boolean"
130541
130624
  },
130542
- "parameters": [
130543
- {
130544
- "name": "evt",
130545
- "type": {
130546
- "text": "KeyboardEvent"
130547
- }
130548
- }
130549
- ]
130625
+ "privacy": "protected",
130626
+ "description": "Returns whether hydration is required and not completed.",
130627
+ "readonly": true,
130628
+ "inheritedFrom": {
130629
+ "name": "SbbElement",
130630
+ "module": "core/base-elements/element.js"
130631
+ },
130632
+ "default": "!!this.shadowRoot"
130550
130633
  },
130551
130634
  {
130552
130635
  "kind": "method",
130553
- "name": "_selectAndFocusOption",
130554
- "privacy": "private",
130636
+ "name": "toggleState",
130637
+ "privacy": "protected",
130555
130638
  "return": {
130556
130639
  "type": {
130557
130640
  "text": "void"
@@ -130559,136 +130642,212 @@
130559
130642
  },
130560
130643
  "parameters": [
130561
130644
  {
130562
- "name": "option",
130645
+ "name": "value",
130563
130646
  "type": {
130564
- "text": "SbbToggleOptionElement<T> | undefined"
130647
+ "text": "string"
130648
+ }
130649
+ },
130650
+ {
130651
+ "name": "force",
130652
+ "optional": true,
130653
+ "type": {
130654
+ "text": "boolean"
130565
130655
  }
130566
130656
  }
130567
- ]
130657
+ ],
130658
+ "inheritedFrom": {
130659
+ "name": "SbbElement",
130660
+ "module": "core/base-elements/element.js"
130661
+ }
130568
130662
  },
130569
130663
  {
130570
130664
  "kind": "field",
130571
- "name": "disabled",
130572
- "privacy": "public",
130573
- "description": "Whether the component is disabled.",
130574
- "default": "false",
130665
+ "name": "['_$sbbElement$']",
130575
130666
  "type": {
130576
130667
  "text": "boolean"
130577
130668
  },
130578
- "attribute": "disabled",
130579
- "reflects": true,
130669
+ "privacy": "public",
130670
+ "static": true,
130671
+ "default": "true",
130580
130672
  "inheritedFrom": {
130581
- "name": "SbbDisabledMixin",
130582
- "module": "core/mixins/disabled-mixin.js"
130673
+ "name": "SbbElement",
130674
+ "module": "core/base-elements/element.js"
130583
130675
  }
130584
130676
  },
130585
130677
  {
130586
130678
  "kind": "field",
130587
- "name": "#disabled",
130679
+ "name": "_controllers",
130680
+ "type": {
130681
+ "text": "Set<SbbReactiveController> | undefined"
130682
+ },
130588
130683
  "privacy": "private",
130684
+ "inheritedFrom": {
130685
+ "name": "SbbElement",
130686
+ "module": "core/base-elements/element.js"
130687
+ }
130688
+ }
130689
+ ],
130690
+ "attributes": [
130691
+ {
130692
+ "name": "checked",
130589
130693
  "type": {
130590
130694
  "text": "boolean"
130591
130695
  },
130592
130696
  "default": "false",
130697
+ "description": "Whether the toggle-option is checked.",
130698
+ "fieldName": "checked"
130699
+ },
130700
+ {
130701
+ "name": "value",
130702
+ "type": {
130703
+ "text": "T | null"
130704
+ },
130705
+ "default": "null",
130706
+ "description": "Value of toggle-option.",
130707
+ "fieldName": "value"
130708
+ },
130709
+ {
130710
+ "name": "disabled",
130711
+ "description": "Whether the component is disabled.",
130712
+ "default": "false",
130713
+ "type": {
130714
+ "text": "boolean"
130715
+ },
130716
+ "fieldName": "disabled",
130593
130717
  "inheritedFrom": {
130594
130718
  "name": "SbbDisabledMixin",
130595
130719
  "module": "core/mixins/disabled-mixin.js"
130596
130720
  }
130597
130721
  },
130598
130722
  {
130599
- "kind": "method",
130600
- "name": "isDisabledExternally",
130601
- "privacy": "protected",
130602
- "return": {
130603
- "type": {
130604
- "text": "boolean"
130605
- }
130723
+ "name": "icon-name",
130724
+ "type": {
130725
+ "text": "string"
130606
130726
  },
130607
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
130727
+ "default": "''",
130728
+ "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.",
130729
+ "fieldName": "iconName",
130608
130730
  "inheritedFrom": {
130609
- "name": "SbbDisabledMixin",
130610
- "module": "core/mixins/disabled-mixin.js"
130731
+ "name": "SbbIconNameMixin",
130732
+ "module": "icon/icon-name-mixin.js"
130611
130733
  }
130734
+ }
130735
+ ],
130736
+ "mixins": [
130737
+ {
130738
+ "name": "SbbDisabledMixin",
130739
+ "module": "core/mixins.js"
130612
130740
  },
130741
+ {
130742
+ "name": "SbbIconNameMixin",
130743
+ "module": "icon.js"
130744
+ }
130745
+ ],
130746
+ "superclass": {
130747
+ "name": "SbbElement",
130748
+ "module": "core/base-elements.js"
130749
+ },
130750
+ "tagName": "sbb-toggle-option",
130751
+ "customElement": true,
130752
+ "classGenerics": "T = string"
130753
+ }
130754
+ ],
130755
+ "exports": [
130756
+ {
130757
+ "kind": "js",
130758
+ "name": "SbbToggleOptionElement",
130759
+ "declaration": {
130760
+ "name": "SbbToggleOptionElement",
130761
+ "module": "toggle/toggle-option/toggle-option.component.js"
130762
+ }
130763
+ }
130764
+ ]
130765
+ },
130766
+ {
130767
+ "kind": "javascript-module",
130768
+ "path": "toggle/toggle/toggle.component.js",
130769
+ "declarations": [
130770
+ {
130771
+ "kind": "class",
130772
+ "description": "It can be used as a container for two `sbb-toggle-option`, acting as a toggle button.",
130773
+ "name": "SbbToggleElement",
130774
+ "slots": [
130775
+ {
130776
+ "description": "Use the unnamed slot to add `<sbb-toggle-option>` elements to the toggle.",
130777
+ "name": ""
130778
+ }
130779
+ ],
130780
+ "members": [
130613
130781
  {
130614
130782
  "kind": "field",
130615
- "name": "formAssociated",
130783
+ "name": "elementName",
130616
130784
  "type": {
130617
- "text": "boolean"
130785
+ "text": "string"
130618
130786
  },
130619
130787
  "privacy": "public",
130620
130788
  "static": true,
130621
- "default": "true",
130789
+ "readonly": true,
130790
+ "default": "'sbb-toggle'",
130622
130791
  "inheritedFrom": {
130623
- "name": "SbbFormAssociatedMixin",
130624
- "module": "core/mixins/form-associated-mixin.js"
130792
+ "name": "SbbElement",
130793
+ "module": "core/base-elements/element.js"
130625
130794
  }
130626
130795
  },
130627
130796
  {
130628
130797
  "kind": "field",
130629
- "name": "form",
130798
+ "name": "role",
130630
130799
  "type": {
130631
- "text": "HTMLFormElement | null"
130800
+ "text": "string"
130632
130801
  },
130633
130802
  "privacy": "public",
130634
- "description": "Returns the form owner of this element.",
130803
+ "static": true,
130635
130804
  "readonly": true,
130636
- "inheritedFrom": {
130637
- "name": "SbbFormAssociatedMixin",
130638
- "module": "core/mixins/form-associated-mixin.js"
130639
- }
130805
+ "default": "'radiogroup'"
130640
130806
  },
130641
130807
  {
130642
130808
  "kind": "field",
130643
- "name": "name",
130809
+ "name": "events",
130644
130810
  "privacy": "public",
130645
- "description": "Name of the form element. Will be read from name attribute.",
130811
+ "static": true,
130812
+ "readonly": true,
130813
+ "default": "{ change: 'change', }",
130646
130814
  "type": {
130647
- "text": "string"
130648
- },
130649
- "attribute": "name",
130650
- "inheritedFrom": {
130651
- "name": "SbbFormAssociatedMixin",
130652
- "module": "core/mixins/form-associated-mixin.js"
130815
+ "text": "{\n change: 'change',\n }"
130653
130816
  }
130654
130817
  },
130655
130818
  {
130656
130819
  "kind": "field",
130657
- "name": "validity",
130820
+ "name": "even",
130658
130821
  "type": {
130659
- "text": "ValidityState"
130822
+ "text": "boolean"
130660
130823
  },
130661
130824
  "privacy": "public",
130662
- "description": "Returns the ValidityState object for this element.",
130663
- "readonly": true,
130664
- "inheritedFrom": {
130665
- "name": "SbbFormAssociatedMixin",
130666
- "module": "core/mixins/form-associated-mixin.js"
130667
- }
130825
+ "default": "false",
130826
+ "description": "If true, set the width of the component fixed; if false,\nthe width is dynamic based on the label of the sbb-toggle-option.",
130827
+ "attribute": "even",
130828
+ "reflects": true
130668
130829
  },
130669
130830
  {
130670
130831
  "kind": "field",
130671
- "name": "validationMessage",
130832
+ "name": "size",
130672
130833
  "type": {
130673
- "text": "string"
130834
+ "text": "'s' | 'm'"
130674
130835
  },
130675
130836
  "privacy": "public",
130676
- "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.",
130677
- "readonly": true,
130678
- "inheritedFrom": {
130679
- "name": "SbbFormAssociatedMixin",
130680
- "module": "core/mixins/form-associated-mixin.js"
130681
- }
130837
+ "description": "Size variant, either m or s.",
130838
+ "default": "'m' / 's' (lean)",
130839
+ "attribute": "size",
130840
+ "reflects": true
130682
130841
  },
130683
130842
  {
130684
130843
  "kind": "field",
130685
- "name": "willValidate",
130844
+ "name": "value",
130686
130845
  "type": {
130687
- "text": "boolean"
130846
+ "text": "(T = string) | null"
130688
130847
  },
130689
130848
  "privacy": "public",
130690
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
130691
- "readonly": true,
130849
+ "description": "The value of the toggle. It needs to be mutable since it is updated whenever\na new option is selected (see the `onToggleOptionSelect()` method).",
130850
+ "attribute": "value",
130692
130851
  "inheritedFrom": {
130693
130852
  "name": "SbbFormAssociatedMixin",
130694
130853
  "module": "core/mixins/form-associated-mixin.js"
@@ -130696,128 +130855,55 @@
130696
130855
  },
130697
130856
  {
130698
130857
  "kind": "field",
130699
- "name": "_validityStates",
130858
+ "name": "_fallbackValue",
130859
+ "type": {
130860
+ "text": "T | null"
130861
+ },
130700
130862
  "privacy": "private",
130701
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
130702
- "inheritedFrom": {
130703
- "name": "SbbFormAssociatedMixin",
130704
- "module": "core/mixins/form-associated-mixin.js"
130705
- }
130863
+ "default": "null"
130706
130864
  },
130707
130865
  {
130708
130866
  "kind": "field",
130709
- "name": "formDisabled",
130867
+ "name": "options",
130710
130868
  "type": {
130711
- "text": "boolean"
130712
- },
130713
- "privacy": "protected",
130714
- "default": "false",
130715
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
130716
- "inheritedFrom": {
130717
- "name": "SbbFormAssociatedMixin",
130718
- "module": "core/mixins/form-associated-mixin.js"
130719
- }
130720
- },
130721
- {
130722
- "kind": "method",
130723
- "name": "checkValidity",
130724
- "privacy": "public",
130725
- "return": {
130726
- "type": {
130727
- "text": "boolean"
130728
- }
130869
+ "text": "SbbToggleOptionElement<T>[]"
130729
130870
  },
130730
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
130731
- "inheritedFrom": {
130732
- "name": "SbbFormAssociatedMixin",
130733
- "module": "core/mixins/form-associated-mixin.js"
130734
- }
130735
- },
130736
- {
130737
- "kind": "method",
130738
- "name": "reportValidity",
130739
130871
  "privacy": "public",
130740
- "return": {
130741
- "type": {
130742
- "text": "boolean"
130743
- }
130744
- },
130745
- "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.",
130746
- "inheritedFrom": {
130747
- "name": "SbbFormAssociatedMixin",
130748
- "module": "core/mixins/form-associated-mixin.js"
130749
- }
130872
+ "description": "The child instances of sbb-toggle-option as an array.",
130873
+ "readonly": true
130750
130874
  },
130751
130875
  {
130752
130876
  "kind": "method",
130753
- "name": "setCustomValidity",
130754
- "privacy": "public",
130877
+ "name": "_readFormData",
130878
+ "privacy": "private",
130755
130879
  "return": {
130756
130880
  "type": {
130757
- "text": "void"
130881
+ "text": "Promise<T>"
130758
130882
  }
130759
130883
  },
130760
130884
  "parameters": [
130761
130885
  {
130762
- "name": "message",
130886
+ "name": "formData",
130763
130887
  "type": {
130764
- "text": "string"
130888
+ "text": "FormData"
130765
130889
  }
130766
130890
  }
130767
- ],
130768
- "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.",
130769
- "inheritedFrom": {
130770
- "name": "SbbFormAssociatedMixin",
130771
- "module": "core/mixins/form-associated-mixin.js"
130772
- }
130891
+ ]
130773
130892
  },
130774
130893
  {
130775
130894
  "kind": "method",
130776
- "name": "_hasDisabledAncestor",
130895
+ "name": "_updateToggle",
130777
130896
  "privacy": "private",
130778
- "return": {
130779
- "type": {
130780
- "text": "boolean"
130781
- }
130782
- },
130783
- "inheritedFrom": {
130784
- "name": "SbbFormAssociatedMixin",
130785
- "module": "core/mixins/form-associated-mixin.js"
130786
- }
130787
- },
130788
- {
130789
- "kind": "method",
130790
- "name": "updateFormValue",
130791
- "privacy": "protected",
130792
130897
  "return": {
130793
130898
  "type": {
130794
130899
  "text": "void"
130795
130900
  }
130796
- },
130797
- "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",
130798
- "inheritedFrom": {
130799
- "name": "SbbFormAssociatedMixin",
130800
- "module": "core/mixins/form-associated-mixin.js"
130801
- }
130802
- },
130803
- {
130804
- "kind": "method",
130805
- "name": "formState",
130806
- "privacy": "protected",
130807
- "return": {
130808
- "type": {
130809
- "text": "FormRestoreState"
130810
- }
130811
- },
130812
- "inheritedFrom": {
130813
- "name": "SbbFormAssociatedMixin",
130814
- "module": "core/mixins/form-associated-mixin.js"
130815
130901
  }
130816
130902
  },
130817
130903
  {
130818
130904
  "kind": "method",
130819
- "name": "setValidityFlag",
130820
- "privacy": "protected",
130905
+ "name": "_valueChanged",
130906
+ "privacy": "private",
130821
130907
  "return": {
130822
130908
  "type": {
130823
130909
  "text": "void"
@@ -130825,188 +130911,117 @@
130825
130911
  },
130826
130912
  "parameters": [
130827
130913
  {
130828
- "name": "flag",
130829
- "type": {
130830
- "text": "T"
130831
- }
130832
- },
130833
- {
130834
- "name": "message",
130835
- "type": {
130836
- "text": "string"
130837
- }
130838
- },
130839
- {
130840
- "name": "flagValue",
130841
- "optional": true,
130914
+ "name": "value",
130842
130915
  "type": {
130843
- "text": "ValidityStateFlags[T]"
130916
+ "text": "T | null"
130844
130917
  }
130845
130918
  }
130846
- ],
130847
- "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).",
130848
- "inheritedFrom": {
130849
- "name": "SbbFormAssociatedMixin",
130850
- "module": "core/mixins/form-associated-mixin.js"
130851
- }
130919
+ ]
130852
130920
  },
130853
130921
  {
130854
130922
  "kind": "method",
130855
- "name": "removeValidityFlag",
130856
- "privacy": "protected",
130923
+ "name": "_updateDisabled",
130924
+ "privacy": "private",
130857
130925
  "return": {
130858
130926
  "type": {
130859
130927
  "text": "void"
130860
130928
  }
130861
- },
130862
- "parameters": [
130863
- {
130864
- "name": "flag",
130865
- "type": {
130866
- "text": "T"
130867
- }
130868
- }
130869
- ],
130870
- "description": "Removes the validity state flag entry and updates validity state.",
130871
- "inheritedFrom": {
130872
- "name": "SbbFormAssociatedMixin",
130873
- "module": "core/mixins/form-associated-mixin.js"
130874
130929
  }
130875
130930
  },
130876
130931
  {
130877
130932
  "kind": "method",
130878
- "name": "validate",
130879
- "privacy": "protected",
130933
+ "name": "_handleInput",
130934
+ "privacy": "private",
130880
130935
  "return": {
130881
130936
  "type": {
130882
130937
  "text": "void"
130883
130938
  }
130884
130939
  },
130885
- "description": "To be called whenever the current element needs to be validated.",
130886
- "inheritedFrom": {
130887
- "name": "SbbFormAssociatedMixin",
130888
- "module": "core/mixins/form-associated-mixin.js"
130889
- }
130940
+ "description": "Called on user interaction (click or keyboard)"
130890
130941
  },
130891
130942
  {
130892
130943
  "kind": "method",
130893
- "name": "shouldValidate",
130894
- "privacy": "protected",
130944
+ "name": "_handleKeyDown",
130945
+ "privacy": "private",
130895
130946
  "return": {
130896
130947
  "type": {
130897
- "text": "boolean"
130948
+ "text": "void"
130898
130949
  }
130899
130950
  },
130900
130951
  "parameters": [
130901
130952
  {
130902
- "name": "name",
130953
+ "name": "evt",
130903
130954
  "type": {
130904
- "text": "PropertyKey | undefined"
130955
+ "text": "KeyboardEvent"
130905
130956
  }
130906
130957
  }
130907
- ],
130908
- "description": "Whether validation should be run on a property change with the given name.",
130909
- "inheritedFrom": {
130910
- "name": "SbbFormAssociatedMixin",
130911
- "module": "core/mixins/form-associated-mixin.js"
130912
- }
130958
+ ]
130913
130959
  },
130914
130960
  {
130915
130961
  "kind": "method",
130916
- "name": "_setInternalValidity",
130962
+ "name": "_selectAndFocusOption",
130917
130963
  "privacy": "private",
130918
130964
  "return": {
130919
130965
  "type": {
130920
130966
  "text": "void"
130921
130967
  }
130922
130968
  },
130923
- "inheritedFrom": {
130924
- "name": "SbbFormAssociatedMixin",
130925
- "module": "core/mixins/form-associated-mixin.js"
130926
- }
130969
+ "parameters": [
130970
+ {
130971
+ "name": "option",
130972
+ "type": {
130973
+ "text": "SbbToggleOptionElement<T> | undefined"
130974
+ }
130975
+ }
130976
+ ]
130927
130977
  },
130928
130978
  {
130929
130979
  "kind": "field",
130930
- "name": "_hydrationRequired",
130980
+ "name": "disabled",
130981
+ "privacy": "public",
130982
+ "description": "Whether the component is disabled.",
130983
+ "default": "false",
130931
130984
  "type": {
130932
130985
  "text": "boolean"
130933
130986
  },
130934
- "privacy": "private",
130935
- "default": "!!this.shadowRoot",
130936
- "inheritedFrom": {
130937
- "name": "SbbElement",
130938
- "module": "core/base-elements/element.js"
130939
- }
130940
- },
130941
- {
130942
- "kind": "field",
130943
- "name": "_hydrationComplete",
130944
- "privacy": "private",
130945
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
130987
+ "attribute": "disabled",
130988
+ "reflects": true,
130946
130989
  "inheritedFrom": {
130947
- "name": "SbbElement",
130948
- "module": "core/base-elements/element.js"
130990
+ "name": "SbbDisabledMixin",
130991
+ "module": "core/mixins/disabled-mixin.js"
130949
130992
  }
130950
130993
  },
130951
130994
  {
130952
130995
  "kind": "field",
130953
- "name": "_resolveHydration",
130954
- "type": {
130955
- "text": "(hydrationRequired: boolean) => void"
130956
- },
130996
+ "name": "#disabled",
130957
130997
  "privacy": "private",
130958
- "inheritedFrom": {
130959
- "name": "SbbElement",
130960
- "module": "core/base-elements/element.js"
130961
- }
130962
- },
130963
- {
130964
- "kind": "field",
130965
- "name": "hydrationRequired",
130966
130998
  "type": {
130967
130999
  "text": "boolean"
130968
131000
  },
130969
- "privacy": "protected",
130970
- "description": "Returns whether hydration is required and not completed.",
130971
- "readonly": true,
131001
+ "default": "false",
130972
131002
  "inheritedFrom": {
130973
- "name": "SbbElement",
130974
- "module": "core/base-elements/element.js"
130975
- },
130976
- "default": "!!this.shadowRoot"
131003
+ "name": "SbbDisabledMixin",
131004
+ "module": "core/mixins/disabled-mixin.js"
131005
+ }
130977
131006
  },
130978
131007
  {
130979
131008
  "kind": "method",
130980
- "name": "toggleState",
131009
+ "name": "isDisabledExternally",
130981
131010
  "privacy": "protected",
130982
131011
  "return": {
130983
131012
  "type": {
130984
- "text": "void"
131013
+ "text": "boolean"
130985
131014
  }
130986
131015
  },
130987
- "parameters": [
130988
- {
130989
- "name": "value",
130990
- "type": {
130991
- "text": "string"
130992
- }
130993
- },
130994
- {
130995
- "name": "force",
130996
- "optional": true,
130997
- "type": {
130998
- "text": "boolean"
130999
- }
131000
- }
131001
- ],
131016
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
131002
131017
  "inheritedFrom": {
131003
- "name": "SbbElement",
131004
- "module": "core/base-elements/element.js"
131018
+ "name": "SbbDisabledMixin",
131019
+ "module": "core/mixins/disabled-mixin.js"
131005
131020
  }
131006
131021
  },
131007
131022
  {
131008
131023
  "kind": "field",
131009
- "name": "['_$sbbElement$']",
131024
+ "name": "formAssociated",
131010
131025
  "type": {
131011
131026
  "text": "boolean"
131012
131027
  },
@@ -131014,340 +131029,309 @@
131014
131029
  "static": true,
131015
131030
  "default": "true",
131016
131031
  "inheritedFrom": {
131017
- "name": "SbbElement",
131018
- "module": "core/base-elements/element.js"
131032
+ "name": "SbbFormAssociatedMixin",
131033
+ "module": "core/mixins/form-associated-mixin.js"
131019
131034
  }
131020
131035
  },
131021
131036
  {
131022
131037
  "kind": "field",
131023
- "name": "_controllers",
131024
- "type": {
131025
- "text": "Set<SbbReactiveController> | undefined"
131026
- },
131027
- "privacy": "private",
131028
- "inheritedFrom": {
131029
- "name": "SbbElement",
131030
- "module": "core/base-elements/element.js"
131031
- }
131032
- }
131033
- ],
131034
- "events": [
131035
- {
131036
- "name": "change",
131037
- "type": {
131038
- "text": "Event"
131039
- },
131040
- "description": "The change event is fired when the user modifies the element's value.\nUnlike the input event, the change event is not necessarily fired\nfor each alteration to an element's value."
131041
- }
131042
- ],
131043
- "attributes": [
131044
- {
131045
- "name": "even",
131046
- "type": {
131047
- "text": "boolean"
131048
- },
131049
- "default": "false",
131050
- "description": "If true, set the width of the component fixed; if false,\nthe width is dynamic based on the label of the sbb-toggle-option.",
131051
- "fieldName": "even"
131052
- },
131053
- {
131054
- "name": "size",
131055
- "type": {
131056
- "text": "'s' | 'm'"
131057
- },
131058
- "description": "Size variant, either m or s.",
131059
- "default": "'m' / 's' (lean)",
131060
- "fieldName": "size"
131061
- },
131062
- {
131063
- "name": "value",
131064
- "description": "The value of the toggle. It needs to be mutable since it is updated whenever\na new option is selected (see the `onToggleOptionSelect()` method).",
131065
- "type": {
131066
- "text": "T | null"
131067
- },
131068
- "fieldName": "value"
131069
- },
131070
- {
131071
- "name": "disabled",
131072
- "description": "Whether the component is disabled.",
131073
- "default": "false",
131038
+ "name": "form",
131074
131039
  "type": {
131075
- "text": "boolean"
131040
+ "text": "HTMLFormElement | null"
131076
131041
  },
131077
- "fieldName": "disabled",
131042
+ "privacy": "public",
131043
+ "description": "Returns the form owner of this element.",
131044
+ "readonly": true,
131078
131045
  "inheritedFrom": {
131079
- "name": "SbbDisabledMixin",
131080
- "module": "core/mixins/disabled-mixin.js"
131046
+ "name": "SbbFormAssociatedMixin",
131047
+ "module": "core/mixins/form-associated-mixin.js"
131081
131048
  }
131082
131049
  },
131083
131050
  {
131051
+ "kind": "field",
131084
131052
  "name": "name",
131053
+ "privacy": "public",
131085
131054
  "description": "Name of the form element. Will be read from name attribute.",
131086
131055
  "type": {
131087
131056
  "text": "string"
131088
131057
  },
131089
- "fieldName": "name",
131058
+ "attribute": "name",
131090
131059
  "inheritedFrom": {
131091
131060
  "name": "SbbFormAssociatedMixin",
131092
131061
  "module": "core/mixins/form-associated-mixin.js"
131093
131062
  }
131094
- }
131095
- ],
131096
- "mixins": [
131097
- {
131098
- "name": "SbbDisabledMixin",
131099
- "module": "core/mixins.js"
131100
- },
131101
- {
131102
- "name": "SbbFormAssociatedMixin",
131103
- "module": "core/mixins.js"
131104
- }
131105
- ],
131106
- "superclass": {
131107
- "name": "SbbElement",
131108
- "module": "core/base-elements.js"
131109
- },
131110
- "tagName": "sbb-toggle",
131111
- "customElement": true,
131112
- "classGenerics": "T = string"
131113
- }
131114
- ],
131115
- "exports": [
131116
- {
131117
- "kind": "js",
131118
- "name": "SbbToggleElement",
131119
- "declaration": {
131120
- "name": "SbbToggleElement",
131121
- "module": "toggle/toggle/toggle.component.js"
131122
- }
131123
- }
131124
- ]
131125
- },
131126
- {
131127
- "kind": "javascript-module",
131128
- "path": "toggle/toggle-option/toggle-option.component.js",
131129
- "declarations": [
131130
- {
131131
- "kind": "class",
131132
- "description": "It displays a toggle option within a `sbb-toggle`.",
131133
- "name": "SbbToggleOptionElement",
131134
- "slots": [
131135
- {
131136
- "description": "Use the unnamed slot to add content to the label of the toggle option.",
131137
- "name": ""
131138
131063
  },
131139
- {
131140
- "description": "Slot used to render the `sbb-icon`.",
131141
- "name": "icon"
131142
- }
131143
- ],
131144
- "members": [
131145
131064
  {
131146
131065
  "kind": "field",
131147
- "name": "elementName",
131066
+ "name": "validity",
131148
131067
  "type": {
131149
- "text": "string"
131068
+ "text": "ValidityState"
131150
131069
  },
131151
131070
  "privacy": "public",
131152
- "static": true,
131071
+ "description": "Returns the ValidityState object for this element.",
131153
131072
  "readonly": true,
131154
- "default": "'sbb-toggle-option'",
131155
131073
  "inheritedFrom": {
131156
- "name": "SbbElement",
131157
- "module": "core/base-elements/element.js"
131074
+ "name": "SbbFormAssociatedMixin",
131075
+ "module": "core/mixins/form-associated-mixin.js"
131158
131076
  }
131159
131077
  },
131160
131078
  {
131161
131079
  "kind": "field",
131162
- "name": "role",
131080
+ "name": "validationMessage",
131163
131081
  "type": {
131164
131082
  "text": "string"
131165
131083
  },
131166
131084
  "privacy": "public",
131167
- "static": true,
131085
+ "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.",
131168
131086
  "readonly": true,
131169
- "default": "'radio'"
131087
+ "inheritedFrom": {
131088
+ "name": "SbbFormAssociatedMixin",
131089
+ "module": "core/mixins/form-associated-mixin.js"
131090
+ }
131170
131091
  },
131171
131092
  {
131172
131093
  "kind": "field",
131173
- "name": "checked",
131094
+ "name": "willValidate",
131174
131095
  "type": {
131175
131096
  "text": "boolean"
131176
131097
  },
131177
131098
  "privacy": "public",
131178
- "default": "false",
131179
- "description": "Whether the toggle-option is checked.",
131180
- "attribute": "checked",
131181
- "reflects": true
131182
- },
131183
- {
131184
- "kind": "field",
131185
- "name": "value",
131186
- "type": {
131187
- "text": "(T = string) | null"
131188
- },
131189
- "privacy": "public",
131190
- "default": "null",
131191
- "description": "Value of toggle-option.",
131192
- "attribute": "value"
131099
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
131100
+ "readonly": true,
131101
+ "inheritedFrom": {
131102
+ "name": "SbbFormAssociatedMixin",
131103
+ "module": "core/mixins/form-associated-mixin.js"
131104
+ }
131193
131105
  },
131194
131106
  {
131195
131107
  "kind": "field",
131196
- "name": "_toggle",
131108
+ "name": "_validityStates",
131109
+ "privacy": "private",
131110
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
131111
+ "inheritedFrom": {
131112
+ "name": "SbbFormAssociatedMixin",
131113
+ "module": "core/mixins/form-associated-mixin.js"
131114
+ }
131115
+ },
131116
+ {
131117
+ "kind": "field",
131118
+ "name": "formDisabled",
131197
131119
  "type": {
131198
- "text": "SbbToggleElement | null"
131120
+ "text": "boolean"
131199
131121
  },
131200
- "privacy": "private",
131201
- "default": "null"
131122
+ "privacy": "protected",
131123
+ "default": "false",
131124
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
131125
+ "inheritedFrom": {
131126
+ "name": "SbbFormAssociatedMixin",
131127
+ "module": "core/mixins/form-associated-mixin.js"
131128
+ }
131202
131129
  },
131203
131130
  {
131204
131131
  "kind": "method",
131205
- "name": "_uncheckOtherOptions",
131206
- "privacy": "private",
131132
+ "name": "checkValidity",
131133
+ "privacy": "public",
131207
131134
  "return": {
131208
131135
  "type": {
131209
- "text": "void"
131136
+ "text": "boolean"
131210
131137
  }
131138
+ },
131139
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
131140
+ "inheritedFrom": {
131141
+ "name": "SbbFormAssociatedMixin",
131142
+ "module": "core/mixins/form-associated-mixin.js"
131211
131143
  }
131212
131144
  },
131213
131145
  {
131214
131146
  "kind": "method",
131215
- "name": "_handleDisabledChange",
131216
- "privacy": "private",
131147
+ "name": "reportValidity",
131148
+ "privacy": "public",
131217
131149
  "return": {
131218
131150
  "type": {
131219
- "text": "void"
131151
+ "text": "boolean"
131220
131152
  }
131153
+ },
131154
+ "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.",
131155
+ "inheritedFrom": {
131156
+ "name": "SbbFormAssociatedMixin",
131157
+ "module": "core/mixins/form-associated-mixin.js"
131221
131158
  }
131222
131159
  },
131223
131160
  {
131224
131161
  "kind": "method",
131225
- "name": "_handleInput",
131226
- "privacy": "private",
131162
+ "name": "setCustomValidity",
131163
+ "privacy": "public",
131227
131164
  "return": {
131228
131165
  "type": {
131229
131166
  "text": "void"
131230
131167
  }
131168
+ },
131169
+ "parameters": [
131170
+ {
131171
+ "name": "message",
131172
+ "type": {
131173
+ "text": "string"
131174
+ }
131175
+ }
131176
+ ],
131177
+ "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.",
131178
+ "inheritedFrom": {
131179
+ "name": "SbbFormAssociatedMixin",
131180
+ "module": "core/mixins/form-associated-mixin.js"
131231
131181
  }
131232
131182
  },
131233
131183
  {
131234
131184
  "kind": "method",
131235
- "name": "_verifyTabindex",
131185
+ "name": "_hasDisabledAncestor",
131236
131186
  "privacy": "private",
131237
131187
  "return": {
131238
131188
  "type": {
131239
- "text": "void"
131189
+ "text": "boolean"
131240
131190
  }
131241
- }
131242
- },
131243
- {
131244
- "kind": "field",
131245
- "name": "disabled",
131246
- "privacy": "public",
131247
- "description": "Whether the component is disabled.",
131248
- "default": "false",
131249
- "type": {
131250
- "text": "boolean"
131251
131191
  },
131252
- "attribute": "disabled",
131253
- "reflects": true,
131254
131192
  "inheritedFrom": {
131255
- "name": "SbbDisabledMixin",
131256
- "module": "core/mixins/disabled-mixin.js"
131193
+ "name": "SbbFormAssociatedMixin",
131194
+ "module": "core/mixins/form-associated-mixin.js"
131257
131195
  }
131258
131196
  },
131259
131197
  {
131260
- "kind": "field",
131261
- "name": "#disabled",
131262
- "privacy": "private",
131263
- "type": {
131264
- "text": "boolean"
131198
+ "kind": "method",
131199
+ "name": "updateFormValue",
131200
+ "privacy": "protected",
131201
+ "return": {
131202
+ "type": {
131203
+ "text": "void"
131204
+ }
131265
131205
  },
131266
- "default": "false",
131206
+ "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",
131267
131207
  "inheritedFrom": {
131268
- "name": "SbbDisabledMixin",
131269
- "module": "core/mixins/disabled-mixin.js"
131208
+ "name": "SbbFormAssociatedMixin",
131209
+ "module": "core/mixins/form-associated-mixin.js"
131270
131210
  }
131271
131211
  },
131272
131212
  {
131273
131213
  "kind": "method",
131274
- "name": "isDisabledExternally",
131214
+ "name": "formState",
131275
131215
  "privacy": "protected",
131276
131216
  "return": {
131277
131217
  "type": {
131278
- "text": "boolean"
131218
+ "text": "FormRestoreState"
131279
131219
  }
131280
131220
  },
131281
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
131282
131221
  "inheritedFrom": {
131283
- "name": "SbbDisabledMixin",
131284
- "module": "core/mixins/disabled-mixin.js"
131222
+ "name": "SbbFormAssociatedMixin",
131223
+ "module": "core/mixins/form-associated-mixin.js"
131285
131224
  }
131286
131225
  },
131287
131226
  {
131288
- "kind": "field",
131289
- "name": "iconName",
131290
- "type": {
131291
- "text": "string"
131227
+ "kind": "method",
131228
+ "name": "setValidityFlag",
131229
+ "privacy": "protected",
131230
+ "return": {
131231
+ "type": {
131232
+ "text": "void"
131233
+ }
131292
131234
  },
131293
- "privacy": "public",
131294
- "default": "''",
131295
- "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.",
131296
- "attribute": "icon-name",
131235
+ "parameters": [
131236
+ {
131237
+ "name": "flag",
131238
+ "type": {
131239
+ "text": "T"
131240
+ }
131241
+ },
131242
+ {
131243
+ "name": "message",
131244
+ "type": {
131245
+ "text": "string"
131246
+ }
131247
+ },
131248
+ {
131249
+ "name": "flagValue",
131250
+ "optional": true,
131251
+ "type": {
131252
+ "text": "ValidityStateFlags[T]"
131253
+ }
131254
+ }
131255
+ ],
131256
+ "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).",
131297
131257
  "inheritedFrom": {
131298
- "name": "SbbIconNameMixin",
131299
- "module": "icon/icon-name-mixin.js"
131258
+ "name": "SbbFormAssociatedMixin",
131259
+ "module": "core/mixins/form-associated-mixin.js"
131300
131260
  }
131301
131261
  },
131302
131262
  {
131303
131263
  "kind": "method",
131304
- "name": "renderIconSlot",
131264
+ "name": "removeValidityFlag",
131305
131265
  "privacy": "protected",
131306
131266
  "return": {
131307
131267
  "type": {
131308
- "text": "TemplateResult"
131268
+ "text": "void"
131309
131269
  }
131310
131270
  },
131311
131271
  "parameters": [
131312
131272
  {
131313
- "name": "classname",
131314
- "optional": true,
131273
+ "name": "flag",
131315
131274
  "type": {
131316
- "text": "string"
131275
+ "text": "T"
131317
131276
  }
131318
131277
  }
131319
131278
  ],
131279
+ "description": "Removes the validity state flag entry and updates validity state.",
131320
131280
  "inheritedFrom": {
131321
- "name": "SbbIconNameMixin",
131322
- "module": "icon/icon-name-mixin.js"
131281
+ "name": "SbbFormAssociatedMixin",
131282
+ "module": "core/mixins/form-associated-mixin.js"
131323
131283
  }
131324
131284
  },
131325
131285
  {
131326
131286
  "kind": "method",
131327
- "name": "renderIconName",
131287
+ "name": "validate",
131328
131288
  "privacy": "protected",
131329
131289
  "return": {
131330
131290
  "type": {
131331
- "text": "string"
131291
+ "text": "void"
131332
131292
  }
131333
131293
  },
131294
+ "description": "To be called whenever the current element needs to be validated.",
131334
131295
  "inheritedFrom": {
131335
- "name": "SbbIconNameMixin",
131336
- "module": "icon/icon-name-mixin.js"
131296
+ "name": "SbbFormAssociatedMixin",
131297
+ "module": "core/mixins/form-associated-mixin.js"
131337
131298
  }
131338
131299
  },
131339
131300
  {
131340
131301
  "kind": "method",
131341
- "name": "_renderIconName",
131302
+ "name": "shouldValidate",
131303
+ "privacy": "protected",
131304
+ "return": {
131305
+ "type": {
131306
+ "text": "boolean"
131307
+ }
131308
+ },
131309
+ "parameters": [
131310
+ {
131311
+ "name": "name",
131312
+ "type": {
131313
+ "text": "PropertyKey | undefined"
131314
+ }
131315
+ }
131316
+ ],
131317
+ "description": "Whether validation should be run on a property change with the given name.",
131318
+ "inheritedFrom": {
131319
+ "name": "SbbFormAssociatedMixin",
131320
+ "module": "core/mixins/form-associated-mixin.js"
131321
+ }
131322
+ },
131323
+ {
131324
+ "kind": "method",
131325
+ "name": "_setInternalValidity",
131342
131326
  "privacy": "private",
131343
131327
  "return": {
131344
131328
  "type": {
131345
- "text": "string"
131329
+ "text": "void"
131346
131330
  }
131347
131331
  },
131348
131332
  "inheritedFrom": {
131349
- "name": "SbbIconNameMixin",
131350
- "module": "icon/icon-name-mixin.js"
131333
+ "name": "SbbFormAssociatedMixin",
131334
+ "module": "core/mixins/form-associated-mixin.js"
131351
131335
  }
131352
131336
  },
131353
131337
  {
@@ -131456,23 +131440,40 @@
131456
131440
  }
131457
131441
  }
131458
131442
  ],
131443
+ "events": [
131444
+ {
131445
+ "name": "change",
131446
+ "type": {
131447
+ "text": "Event"
131448
+ },
131449
+ "description": "The change event is fired when the user modifies the element's value.\nUnlike the input event, the change event is not necessarily fired\nfor each alteration to an element's value."
131450
+ }
131451
+ ],
131459
131452
  "attributes": [
131460
131453
  {
131461
- "name": "checked",
131454
+ "name": "even",
131462
131455
  "type": {
131463
131456
  "text": "boolean"
131464
131457
  },
131465
131458
  "default": "false",
131466
- "description": "Whether the toggle-option is checked.",
131467
- "fieldName": "checked"
131459
+ "description": "If true, set the width of the component fixed; if false,\nthe width is dynamic based on the label of the sbb-toggle-option.",
131460
+ "fieldName": "even"
131461
+ },
131462
+ {
131463
+ "name": "size",
131464
+ "type": {
131465
+ "text": "'s' | 'm'"
131466
+ },
131467
+ "description": "Size variant, either m or s.",
131468
+ "default": "'m' / 's' (lean)",
131469
+ "fieldName": "size"
131468
131470
  },
131469
131471
  {
131470
131472
  "name": "value",
131473
+ "description": "The value of the toggle. It needs to be mutable since it is updated whenever\na new option is selected (see the `onToggleOptionSelect()` method).",
131471
131474
  "type": {
131472
131475
  "text": "T | null"
131473
131476
  },
131474
- "default": "null",
131475
- "description": "Value of toggle-option.",
131476
131477
  "fieldName": "value"
131477
131478
  },
131478
131479
  {
@@ -131489,16 +131490,15 @@
131489
131490
  }
131490
131491
  },
131491
131492
  {
131492
- "name": "icon-name",
131493
+ "name": "name",
131494
+ "description": "Name of the form element. Will be read from name attribute.",
131493
131495
  "type": {
131494
131496
  "text": "string"
131495
131497
  },
131496
- "default": "''",
131497
- "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.",
131498
- "fieldName": "iconName",
131498
+ "fieldName": "name",
131499
131499
  "inheritedFrom": {
131500
- "name": "SbbIconNameMixin",
131501
- "module": "icon/icon-name-mixin.js"
131500
+ "name": "SbbFormAssociatedMixin",
131501
+ "module": "core/mixins/form-associated-mixin.js"
131502
131502
  }
131503
131503
  }
131504
131504
  ],
@@ -131508,15 +131508,15 @@
131508
131508
  "module": "core/mixins.js"
131509
131509
  },
131510
131510
  {
131511
- "name": "SbbIconNameMixin",
131512
- "module": "icon.js"
131511
+ "name": "SbbFormAssociatedMixin",
131512
+ "module": "core/mixins.js"
131513
131513
  }
131514
131514
  ],
131515
131515
  "superclass": {
131516
131516
  "name": "SbbElement",
131517
131517
  "module": "core/base-elements.js"
131518
131518
  },
131519
- "tagName": "sbb-toggle-option",
131519
+ "tagName": "sbb-toggle",
131520
131520
  "customElement": true,
131521
131521
  "classGenerics": "T = string"
131522
131522
  }
@@ -131524,10 +131524,10 @@
131524
131524
  "exports": [
131525
131525
  {
131526
131526
  "kind": "js",
131527
- "name": "SbbToggleOptionElement",
131527
+ "name": "SbbToggleElement",
131528
131528
  "declaration": {
131529
- "name": "SbbToggleOptionElement",
131530
- "module": "toggle/toggle-option/toggle-option.component.js"
131529
+ "name": "SbbToggleElement",
131530
+ "module": "toggle/toggle/toggle.component.js"
131531
131531
  }
131532
131532
  }
131533
131533
  ]