@sbb-esta/lyne-elements-dev 4.12.1-dev.1778252059 → 4.12.1-dev.1778459394

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/custom-elements.json +948 -948
  2. package/package.json +2 -2
@@ -120458,20 +120458,28 @@
120458
120458
  },
120459
120459
  {
120460
120460
  "kind": "javascript-module",
120461
- "path": "sidebar/sidebar/sidebar.component.js",
120461
+ "path": "sidebar/sidebar-close-button/sidebar-close-button.component.js",
120462
120462
  "declarations": [
120463
120463
  {
120464
120464
  "kind": "class",
120465
- "description": "This component corresponds to a sidebar that can be opened on the sidebar container.",
120466
- "name": "SbbSidebarElement",
120465
+ "description": "Sidebar close button, intended to be placed inside sbb-sidebar.",
120466
+ "name": "SbbSidebarCloseButtonElement",
120467
120467
  "slots": [
120468
120468
  {
120469
- "description": "Use the unnamed slot to slot any content into the sidebar.",
120470
- "name": ""
120469
+ "description": "Use the unnamed slot to add content to the sidebar-close-button. Not intended to be used in this context.",
120470
+ "name": "",
120471
+ "inheritedFrom": {
120472
+ "name": "SbbSecondaryButtonElement",
120473
+ "module": "button/secondary-button/secondary-button.component.js"
120474
+ }
120471
120475
  },
120472
120476
  {
120473
- "description": "Use the title slot to add an <sbb-title>.",
120474
- "name": "title"
120477
+ "description": "Slot used to display the icon, if one is set. Not intended to be used in this context.",
120478
+ "name": "icon",
120479
+ "inheritedFrom": {
120480
+ "name": "SbbSecondaryButtonElement",
120481
+ "module": "button/secondary-button/secondary-button.component.js"
120482
+ }
120475
120483
  }
120476
120484
  ],
120477
120485
  "members": [
@@ -120488,539 +120496,507 @@
120488
120496
  "name": "SbbElement",
120489
120497
  "module": "core/base-elements/element.js"
120490
120498
  },
120491
- "default": "'sbb-sidebar'"
120499
+ "default": "'sbb-sidebar-close-button'"
120492
120500
  },
120493
120501
  {
120494
120502
  "kind": "field",
120495
- "name": "color",
120496
- "type": {
120497
- "text": "'white' | 'milk'"
120503
+ "name": "_languageController",
120504
+ "privacy": "private",
120505
+ "default": "new SbbLanguageController(this)"
120506
+ },
120507
+ {
120508
+ "kind": "method",
120509
+ "name": "renderTemplate",
120510
+ "privacy": "protected",
120511
+ "return": {
120512
+ "type": {
120513
+ "text": "TemplateResult"
120514
+ }
120498
120515
  },
120499
- "privacy": "public",
120500
- "default": "'white'",
120501
- "description": "Background color of the sidebar. Either `white` or `milk`.",
120502
- "attribute": "color",
120503
- "reflects": true
120516
+ "description": "Override this method to render the component template.",
120517
+ "inheritedFrom": {
120518
+ "name": "SbbActionBaseElement",
120519
+ "module": "core/base-elements/action-base-element.js"
120520
+ }
120504
120521
  },
120505
120522
  {
120506
- "kind": "field",
120507
- "name": "mode",
120508
- "type": {
120509
- "text": "'side' | 'over'"
120523
+ "kind": "method",
120524
+ "name": "renderIconName",
120525
+ "privacy": "protected",
120526
+ "return": {
120527
+ "type": {
120528
+ "text": "string"
120529
+ }
120510
120530
  },
120511
- "privacy": "public",
120512
- "default": "'side'",
120513
- "description": "Mode of the sidebar; one of 'side' or 'over'.",
120514
- "attribute": "mode",
120515
- "reflects": true
120531
+ "inheritedFrom": {
120532
+ "name": "SbbIconNameMixin",
120533
+ "module": "icon/icon-name-mixin.js"
120534
+ }
120516
120535
  },
120517
120536
  {
120518
120537
  "kind": "field",
120519
- "name": "position",
120538
+ "name": "size",
120520
120539
  "type": {
120521
- "text": "'start' | 'end'"
120540
+ "text": "SbbButtonSize"
120522
120541
  },
120523
120542
  "privacy": "public",
120524
- "default": "'start'",
120525
- "description": "The side that the sidebar is attached to.",
120526
- "attribute": "position",
120527
- "reflects": true
120543
+ "description": "Size variant, either l, m or s.",
120544
+ "default": "'s'",
120545
+ "attribute": "size",
120546
+ "reflects": true,
120547
+ "inheritedFrom": {
120548
+ "name": "SbbButtonCommonElementMixin",
120549
+ "module": "button/common/button-common.js"
120550
+ }
120528
120551
  },
120529
120552
  {
120530
120553
  "kind": "field",
120531
- "name": "opened",
120554
+ "name": "loading",
120532
120555
  "type": {
120533
120556
  "text": "boolean"
120534
120557
  },
120535
120558
  "privacy": "public",
120536
120559
  "default": "false",
120537
- "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
120538
- "attribute": "opened",
120539
- "reflects": true
120560
+ "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
120561
+ "attribute": "loading",
120562
+ "reflects": true,
120563
+ "inheritedFrom": {
120564
+ "name": "SbbButtonCommonElementMixin",
120565
+ "module": "button/common/button-common.js"
120566
+ }
120540
120567
  },
120541
120568
  {
120542
120569
  "kind": "field",
120543
- "name": "focusOnOpen",
120570
+ "name": "negative",
120544
120571
  "type": {
120545
120572
  "text": "boolean"
120546
120573
  },
120547
120574
  "privacy": "public",
120548
120575
  "default": "false",
120549
- "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
120550
- "attribute": "focus-on-open"
120576
+ "description": "Negative coloring variant flag.",
120577
+ "attribute": "negative",
120578
+ "reflects": true,
120579
+ "inheritedFrom": {
120580
+ "name": "SbbNegativeMixin",
120581
+ "module": "core/mixins/negative-mixin.js"
120582
+ }
120551
120583
  },
120552
120584
  {
120553
120585
  "kind": "field",
120554
- "name": "container",
120586
+ "name": "iconName",
120555
120587
  "type": {
120556
- "text": "SbbSidebarContainerElement | null"
120588
+ "text": "string"
120557
120589
  },
120558
120590
  "privacy": "public",
120559
- "description": "Returns the SbbSidebarContainerElement where this sidebar is contained.",
120560
- "readonly": true,
120561
- "default": "null"
120562
- },
120563
- {
120564
- "kind": "field",
120565
- "name": "_container",
120566
- "type": {
120567
- "text": "SbbSidebarContainerElement | null"
120568
- },
120569
- "privacy": "private",
120570
- "default": "null"
120571
- },
120572
- {
120573
- "kind": "field",
120574
- "name": "_lastFocusedElement",
120575
- "type": {
120576
- "text": "HTMLElement | null"
120577
- },
120578
- "privacy": "private",
120579
- "default": "null"
120580
- },
120581
- {
120582
- "kind": "field",
120583
- "name": "_focusTrapController",
120584
- "privacy": "private",
120585
- "default": "new SbbFocusTrapController(this)"
120586
- },
120587
- {
120588
- "kind": "field",
120589
- "name": "_escapableOverlayController",
120590
- "privacy": "private",
120591
- "default": "new SbbEscapableOverlayController(this)"
120592
- },
120593
- {
120594
- "kind": "field",
120595
- "name": "_closeOnNavigation",
120596
- "privacy": "private"
120591
+ "default": "''",
120592
+ "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.",
120593
+ "attribute": "icon-name",
120594
+ "inheritedFrom": {
120595
+ "name": "SbbIconNameMixin",
120596
+ "module": "icon/icon-name-mixin.js"
120597
+ }
120597
120598
  },
120598
120599
  {
120599
120600
  "kind": "method",
120600
- "name": "toggle",
120601
- "privacy": "public",
120601
+ "name": "renderIconSlot",
120602
+ "privacy": "protected",
120602
120603
  "return": {
120603
120604
  "type": {
120604
- "text": "void"
120605
+ "text": "TemplateResult"
120605
120606
  }
120606
120607
  },
120607
- "description": "Toggles the sidebar visibility."
120608
- },
120609
- {
120610
- "kind": "method",
120611
- "name": "open",
120612
- "privacy": "public",
120613
- "return": {
120614
- "type": {
120615
- "text": "void"
120608
+ "parameters": [
120609
+ {
120610
+ "name": "classname",
120611
+ "optional": true,
120612
+ "type": {
120613
+ "text": "string"
120614
+ }
120616
120615
  }
120617
- },
120618
- "description": "Opens the sidebar.",
120616
+ ],
120619
120617
  "inheritedFrom": {
120620
- "name": "SbbOpenCloseBaseElement",
120621
- "module": "core/base-elements/open-close-base-element.js"
120618
+ "name": "SbbIconNameMixin",
120619
+ "module": "icon/icon-name-mixin.js"
120622
120620
  }
120623
120621
  },
120624
120622
  {
120625
120623
  "kind": "method",
120626
- "name": "_isZeroAnimationDuration",
120624
+ "name": "_renderIconName",
120627
120625
  "privacy": "private",
120628
120626
  "return": {
120629
120627
  "type": {
120630
- "text": "boolean"
120628
+ "text": "string"
120631
120629
  }
120630
+ },
120631
+ "inheritedFrom": {
120632
+ "name": "SbbIconNameMixin",
120633
+ "module": "icon/icon-name-mixin.js"
120632
120634
  }
120633
120635
  },
120634
120636
  {
120635
- "kind": "method",
120636
- "name": "_handleOpening",
120637
- "privacy": "private",
120638
- "return": {
120639
- "type": {
120640
- "text": "void"
120641
- }
120637
+ "kind": "field",
120638
+ "name": "disabledInteractive",
120639
+ "type": {
120640
+ "text": "boolean"
120641
+ },
120642
+ "privacy": "public",
120643
+ "default": "false",
120644
+ "description": "Whether the button should be aria-disabled but stay interactive.",
120645
+ "attribute": "disabled-interactive",
120646
+ "reflects": true,
120647
+ "inheritedFrom": {
120648
+ "name": "SbbDisabledInteractiveMixin",
120649
+ "module": "core/mixins/disabled-mixin.js"
120642
120650
  }
120643
120651
  },
120644
120652
  {
120645
- "kind": "method",
120646
- "name": "close",
120653
+ "kind": "field",
120654
+ "name": "disabled",
120647
120655
  "privacy": "public",
120648
- "return": {
120649
- "type": {
120650
- "text": "void"
120651
- }
120656
+ "description": "Whether the component is disabled.",
120657
+ "default": "false",
120658
+ "type": {
120659
+ "text": "boolean"
120652
120660
  },
120653
- "description": "Closes the sidebar.",
120661
+ "attribute": "disabled",
120662
+ "reflects": true,
120654
120663
  "inheritedFrom": {
120655
- "name": "SbbOpenCloseBaseElement",
120656
- "module": "core/base-elements/open-close-base-element.js"
120664
+ "name": "SbbDisabledMixin",
120665
+ "module": "core/mixins/disabled-mixin.js"
120657
120666
  }
120658
120667
  },
120659
120668
  {
120660
- "kind": "method",
120661
- "name": "_handleClosing",
120669
+ "kind": "field",
120670
+ "name": "#disabled",
120662
120671
  "privacy": "private",
120663
- "return": {
120664
- "type": {
120665
- "text": "void"
120666
- }
120672
+ "type": {
120673
+ "text": "boolean"
120674
+ },
120675
+ "default": "false",
120676
+ "inheritedFrom": {
120677
+ "name": "SbbDisabledMixin",
120678
+ "module": "core/mixins/disabled-mixin.js"
120667
120679
  }
120668
120680
  },
120669
120681
  {
120670
120682
  "kind": "method",
120671
- "name": "_takeFocus",
120672
- "privacy": "private",
120683
+ "name": "isDisabledExternally",
120684
+ "privacy": "protected",
120673
120685
  "return": {
120674
120686
  "type": {
120675
- "text": "void"
120676
- }
120677
- }
120678
- },
120679
- {
120680
- "kind": "method",
120681
- "name": "cedeFocus",
120682
- "privacy": "protected",
120683
- "return": {
120684
- "type": {
120685
- "text": "void"
120686
- }
120687
- }
120688
- },
120689
- {
120690
- "kind": "method",
120691
- "name": "_updateSidebarWidth",
120692
- "privacy": "private",
120693
- "return": {
120694
- "type": {
120695
- "text": "void"
120687
+ "text": "boolean"
120696
120688
  }
120697
120689
  },
120698
- "parameters": [
120699
- {
120700
- "name": "oldPosition",
120701
- "optional": true,
120702
- "type": {
120703
- "text": "this['position']"
120704
- }
120705
- }
120706
- ]
120690
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
120691
+ "inheritedFrom": {
120692
+ "name": "SbbDisabledMixin",
120693
+ "module": "core/mixins/disabled-mixin.js"
120694
+ }
120707
120695
  },
120708
120696
  {
120709
- "kind": "method",
120710
- "name": "_buildCssWidthVar",
120711
- "privacy": "private",
120712
- "return": {
120713
- "type": {
120714
- "text": "string"
120715
- }
120697
+ "kind": "field",
120698
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
120699
+ "type": {
120700
+ "text": "array"
120716
120701
  },
120717
- "parameters": [
120718
- {
120719
- "name": "position",
120720
- "default": "this.position"
120721
- }
120722
- ]
120723
- },
120724
- {
120725
- "kind": "method",
120726
- "name": "_isModeOver",
120727
120702
  "privacy": "private",
120728
- "return": {
120729
- "type": {
120730
- "text": "boolean"
120731
- }
120703
+ "readonly": true,
120704
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
120705
+ "inheritedFrom": {
120706
+ "name": "SbbButtonBaseElement",
120707
+ "module": "core/base-elements/button-base-element.js"
120732
120708
  }
120733
120709
  },
120734
120710
  {
120735
- "kind": "method",
120736
- "name": "_onTransitionEnd",
120737
- "privacy": "private",
120738
- "return": {
120739
- "type": {
120740
- "text": "void"
120741
- }
120711
+ "kind": "field",
120712
+ "name": "value",
120713
+ "type": {
120714
+ "text": "string"
120742
120715
  },
120743
- "parameters": [
120744
- {
120745
- "name": "event",
120746
- "type": {
120747
- "text": "TransitionEvent"
120748
- }
120749
- }
120750
- ]
120751
- },
120752
- {
120753
- "kind": "method",
120754
- "name": "_detectScrolledState",
120755
- "privacy": "private",
120756
- "return": {
120757
- "type": {
120758
- "text": "void"
120759
- }
120760
- }
120716
+ "privacy": "public",
120717
+ "inheritedFrom": {
120718
+ "name": "SbbButtonBaseElement",
120719
+ "module": "core/base-elements/button-base-element.js"
120720
+ },
120721
+ "default": "''",
120722
+ "description": "Value of the form element.",
120723
+ "attribute": "value"
120761
120724
  },
120762
120725
  {
120763
120726
  "kind": "field",
120764
- "name": "isAnimating",
120727
+ "name": "type",
120728
+ "privacy": "public",
120729
+ "description": "The type attribute to use for the button.",
120730
+ "default": "'button'",
120765
120731
  "type": {
120766
- "text": "boolean"
120732
+ "text": "SbbButtonType"
120767
120733
  },
120768
- "privacy": "public",
120769
- "default": "false",
120770
- "description": "Whether the component is currently animating.",
120734
+ "attribute": "type",
120771
120735
  "inheritedFrom": {
120772
- "name": "SbbAnimationCompleteMixin",
120773
- "module": "core/mixins/animation-complete-mixin.js"
120736
+ "name": "SbbButtonBaseElement",
120737
+ "module": "core/base-elements/button-base-element.js"
120774
120738
  }
120775
120739
  },
120776
120740
  {
120777
120741
  "kind": "field",
120778
- "name": "animationComplete",
120742
+ "name": "form",
120779
120743
  "type": {
120780
- "text": "Promise<void>"
120744
+ "text": "HTMLFormElement | null"
120781
120745
  },
120782
120746
  "privacy": "public",
120783
- "description": "Returns a promise which completes whenever an animation ends.\nWhen a new animation starts, a new Promise is returned.",
120784
- "readonly": true,
120747
+ "description": "The `<form>` element to associate the button with.",
120785
120748
  "inheritedFrom": {
120786
- "name": "SbbAnimationCompleteMixin",
120787
- "module": "core/mixins/animation-complete-mixin.js"
120788
- }
120749
+ "name": "SbbButtonBaseElement",
120750
+ "module": "core/base-elements/button-base-element.js"
120751
+ },
120752
+ "attribute": "form"
120789
120753
  },
120790
120754
  {
120791
120755
  "kind": "field",
120792
- "name": "_animationPromise",
120756
+ "name": "_formId",
120793
120757
  "type": {
120794
- "text": "Promise<void>"
120758
+ "text": "string"
120795
120759
  },
120796
120760
  "privacy": "private",
120761
+ "default": "''",
120797
120762
  "inheritedFrom": {
120798
- "name": "SbbAnimationCompleteMixin",
120799
- "module": "core/mixins/animation-complete-mixin.js"
120763
+ "name": "SbbButtonBaseElement",
120764
+ "module": "core/base-elements/button-base-element.js"
120800
120765
  }
120801
120766
  },
120802
120767
  {
120803
- "kind": "method",
120804
- "name": "startAnimation",
120805
- "privacy": "protected",
120806
- "return": {
120807
- "type": {
120808
- "text": "void"
120809
- }
120810
- },
120768
+ "kind": "field",
120769
+ "name": "_handleButtonClick",
120770
+ "privacy": "private",
120811
120771
  "inheritedFrom": {
120812
- "name": "SbbAnimationCompleteMixin",
120813
- "module": "core/mixins/animation-complete-mixin.js"
120772
+ "name": "SbbButtonBaseElement",
120773
+ "module": "core/base-elements/button-base-element.js"
120814
120774
  }
120815
120775
  },
120816
120776
  {
120817
120777
  "kind": "method",
120818
- "name": "stopAnimation",
120819
- "privacy": "protected",
120778
+ "name": "_requestSubmit",
120779
+ "privacy": "private",
120820
120780
  "return": {
120821
120781
  "type": {
120822
120782
  "text": "void"
120823
120783
  }
120824
120784
  },
120825
- "description": "Overriding stopAnimation() breaks functionality.",
120785
+ "parameters": [
120786
+ {
120787
+ "name": "form",
120788
+ "type": {
120789
+ "text": "HTMLFormElement"
120790
+ }
120791
+ }
120792
+ ],
120826
120793
  "inheritedFrom": {
120827
- "name": "SbbAnimationCompleteMixin",
120828
- "module": "core/mixins/animation-complete-mixin.js"
120794
+ "name": "SbbButtonBaseElement",
120795
+ "module": "core/base-elements/button-base-element.js"
120829
120796
  }
120830
120797
  },
120831
120798
  {
120832
- "kind": "method",
120833
- "name": "_enqueueAnimation",
120799
+ "kind": "field",
120800
+ "name": "_formKeyDown",
120834
120801
  "privacy": "private",
120835
- "return": {
120836
- "type": {
120837
- "text": "Promise<void>"
120838
- }
120839
- },
120840
120802
  "inheritedFrom": {
120841
- "name": "SbbAnimationCompleteMixin",
120842
- "module": "core/mixins/animation-complete-mixin.js"
120803
+ "name": "SbbButtonBaseElement",
120804
+ "module": "core/base-elements/button-base-element.js"
120843
120805
  }
120844
120806
  },
120845
120807
  {
120846
120808
  "kind": "field",
120847
- "name": "events",
120848
- "privacy": "public",
120849
- "static": true,
120850
- "readonly": true,
120851
- "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
120809
+ "name": "formAssociated",
120852
120810
  "type": {
120853
- "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
120811
+ "text": "boolean"
120854
120812
  },
120813
+ "privacy": "public",
120814
+ "static": true,
120815
+ "default": "true",
120855
120816
  "inheritedFrom": {
120856
- "name": "SbbOpenCloseBaseElement",
120857
- "module": "core/base-elements/open-close-base-element.js"
120817
+ "name": "SbbFormAssociatedMixin",
120818
+ "module": "core/mixins/form-associated-mixin.js"
120858
120819
  }
120859
120820
  },
120860
120821
  {
120861
120822
  "kind": "field",
120862
- "name": "state",
120863
- "privacy": "protected",
120864
- "description": "The state of the component.",
120823
+ "name": "name",
120824
+ "privacy": "public",
120825
+ "description": "Name of the form element. Will be read from name attribute.",
120865
120826
  "type": {
120866
- "text": "SbbOpenedClosedState"
120827
+ "text": "string"
120867
120828
  },
120868
- "default": "'closed'",
120829
+ "attribute": "name",
120869
120830
  "inheritedFrom": {
120870
- "name": "SbbOpenCloseBaseElement",
120871
- "module": "core/base-elements/open-close-base-element.js"
120831
+ "name": "SbbFormAssociatedMixin",
120832
+ "module": "core/mixins/form-associated-mixin.js"
120872
120833
  }
120873
120834
  },
120874
120835
  {
120875
120836
  "kind": "field",
120876
- "name": "_state",
120837
+ "name": "validity",
120877
120838
  "type": {
120878
- "text": "SbbOpenedClosedState"
120839
+ "text": "ValidityState"
120879
120840
  },
120880
- "privacy": "private",
120841
+ "privacy": "public",
120842
+ "description": "Returns the ValidityState object for this element.",
120843
+ "readonly": true,
120881
120844
  "inheritedFrom": {
120882
- "name": "SbbOpenCloseBaseElement",
120883
- "module": "core/base-elements/open-close-base-element.js"
120845
+ "name": "SbbFormAssociatedMixin",
120846
+ "module": "core/mixins/form-associated-mixin.js"
120884
120847
  }
120885
120848
  },
120886
120849
  {
120887
120850
  "kind": "field",
120888
- "name": "isOpen",
120851
+ "name": "validationMessage",
120889
120852
  "type": {
120890
- "text": "boolean"
120853
+ "text": "string"
120891
120854
  },
120892
120855
  "privacy": "public",
120893
- "description": "Whether the element is open.",
120856
+ "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.",
120894
120857
  "readonly": true,
120895
120858
  "inheritedFrom": {
120896
- "name": "SbbOpenCloseBaseElement",
120897
- "module": "core/base-elements/open-close-base-element.js"
120859
+ "name": "SbbFormAssociatedMixin",
120860
+ "module": "core/mixins/form-associated-mixin.js"
120898
120861
  }
120899
120862
  },
120900
120863
  {
120901
- "kind": "method",
120902
- "name": "escapeStrategy",
120903
- "privacy": "public",
120904
- "return": {
120905
- "type": {
120906
- "text": "void"
120907
- }
120864
+ "kind": "field",
120865
+ "name": "willValidate",
120866
+ "type": {
120867
+ "text": "boolean"
120908
120868
  },
120909
- "description": "The method which is called on escape key press. Defaults to calling close()",
120869
+ "privacy": "public",
120870
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
120871
+ "readonly": true,
120910
120872
  "inheritedFrom": {
120911
- "name": "SbbOpenCloseBaseElement",
120912
- "module": "core/base-elements/open-close-base-element.js"
120873
+ "name": "SbbFormAssociatedMixin",
120874
+ "module": "core/mixins/form-associated-mixin.js"
120913
120875
  }
120914
120876
  },
120915
120877
  {
120916
- "kind": "method",
120917
- "name": "dispatchBeforeOpenEvent",
120918
- "privacy": "protected",
120919
- "return": {
120920
- "type": {
120921
- "text": "boolean"
120922
- }
120923
- },
120878
+ "kind": "field",
120879
+ "name": "_validityStates",
120880
+ "privacy": "private",
120881
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
120924
120882
  "inheritedFrom": {
120925
- "name": "SbbOpenCloseBaseElement",
120926
- "module": "core/base-elements/open-close-base-element.js"
120883
+ "name": "SbbFormAssociatedMixin",
120884
+ "module": "core/mixins/form-associated-mixin.js"
120927
120885
  }
120928
120886
  },
120929
120887
  {
120930
- "kind": "method",
120931
- "name": "dispatchOpenEvent",
120932
- "privacy": "protected",
120933
- "return": {
120934
- "type": {
120935
- "text": "boolean"
120936
- }
120888
+ "kind": "field",
120889
+ "name": "formDisabled",
120890
+ "type": {
120891
+ "text": "boolean"
120937
120892
  },
120893
+ "privacy": "protected",
120894
+ "default": "false",
120895
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
120938
120896
  "inheritedFrom": {
120939
- "name": "SbbOpenCloseBaseElement",
120940
- "module": "core/base-elements/open-close-base-element.js"
120897
+ "name": "SbbFormAssociatedMixin",
120898
+ "module": "core/mixins/form-associated-mixin.js"
120941
120899
  }
120942
120900
  },
120943
120901
  {
120944
120902
  "kind": "method",
120945
- "name": "dispatchBeforeCloseEvent",
120946
- "privacy": "protected",
120903
+ "name": "checkValidity",
120904
+ "privacy": "public",
120947
120905
  "return": {
120948
120906
  "type": {
120949
120907
  "text": "boolean"
120950
120908
  }
120951
120909
  },
120910
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
120952
120911
  "inheritedFrom": {
120953
- "name": "SbbOpenCloseBaseElement",
120954
- "module": "core/base-elements/open-close-base-element.js"
120912
+ "name": "SbbFormAssociatedMixin",
120913
+ "module": "core/mixins/form-associated-mixin.js"
120955
120914
  }
120956
120915
  },
120957
120916
  {
120958
120917
  "kind": "method",
120959
- "name": "dispatchCloseEvent",
120960
- "privacy": "protected",
120918
+ "name": "reportValidity",
120919
+ "privacy": "public",
120961
120920
  "return": {
120962
120921
  "type": {
120963
120922
  "text": "boolean"
120964
120923
  }
120965
120924
  },
120925
+ "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.",
120966
120926
  "inheritedFrom": {
120967
- "name": "SbbOpenCloseBaseElement",
120968
- "module": "core/base-elements/open-close-base-element.js"
120927
+ "name": "SbbFormAssociatedMixin",
120928
+ "module": "core/mixins/form-associated-mixin.js"
120969
120929
  }
120970
120930
  },
120971
120931
  {
120972
- "kind": "field",
120973
- "name": "_hydrationRequired",
120974
- "type": {
120975
- "text": "boolean"
120932
+ "kind": "method",
120933
+ "name": "setCustomValidity",
120934
+ "privacy": "public",
120935
+ "return": {
120936
+ "type": {
120937
+ "text": "void"
120938
+ }
120976
120939
  },
120977
- "privacy": "private",
120978
- "default": "!!this.shadowRoot",
120940
+ "parameters": [
120941
+ {
120942
+ "name": "message",
120943
+ "type": {
120944
+ "text": "string"
120945
+ }
120946
+ }
120947
+ ],
120948
+ "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.",
120979
120949
  "inheritedFrom": {
120980
- "name": "SbbElement",
120981
- "module": "core/base-elements/element.js"
120950
+ "name": "SbbFormAssociatedMixin",
120951
+ "module": "core/mixins/form-associated-mixin.js"
120982
120952
  }
120983
120953
  },
120984
120954
  {
120985
- "kind": "field",
120986
- "name": "_hydrationComplete",
120955
+ "kind": "method",
120956
+ "name": "_hasDisabledAncestor",
120987
120957
  "privacy": "private",
120988
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
120958
+ "return": {
120959
+ "type": {
120960
+ "text": "boolean"
120961
+ }
120962
+ },
120989
120963
  "inheritedFrom": {
120990
- "name": "SbbElement",
120991
- "module": "core/base-elements/element.js"
120964
+ "name": "SbbFormAssociatedMixin",
120965
+ "module": "core/mixins/form-associated-mixin.js"
120992
120966
  }
120993
120967
  },
120994
120968
  {
120995
- "kind": "field",
120996
- "name": "_resolveHydration",
120997
- "type": {
120998
- "text": "(hydrationRequired: boolean) => void"
120969
+ "kind": "method",
120970
+ "name": "updateFormValue",
120971
+ "privacy": "protected",
120972
+ "return": {
120973
+ "type": {
120974
+ "text": "void"
120975
+ }
120999
120976
  },
121000
- "privacy": "private",
120977
+ "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",
121001
120978
  "inheritedFrom": {
121002
- "name": "SbbElement",
121003
- "module": "core/base-elements/element.js"
120979
+ "name": "SbbFormAssociatedMixin",
120980
+ "module": "core/mixins/form-associated-mixin.js"
121004
120981
  }
121005
120982
  },
121006
120983
  {
121007
- "kind": "field",
121008
- "name": "hydrationRequired",
121009
- "type": {
121010
- "text": "boolean"
121011
- },
120984
+ "kind": "method",
120985
+ "name": "formState",
121012
120986
  "privacy": "protected",
121013
- "description": "Returns whether hydration is required and not completed.",
121014
- "readonly": true,
121015
- "inheritedFrom": {
121016
- "name": "SbbElement",
121017
- "module": "core/base-elements/element.js"
120987
+ "return": {
120988
+ "type": {
120989
+ "text": "FormRestoreState"
120990
+ }
121018
120991
  },
121019
- "default": "!!this.shadowRoot"
120992
+ "inheritedFrom": {
120993
+ "name": "SbbFormAssociatedMixin",
120994
+ "module": "core/mixins/form-associated-mixin.js"
120995
+ }
121020
120996
  },
121021
120997
  {
121022
120998
  "kind": "method",
121023
- "name": "toggleState",
120999
+ "name": "setValidityFlag",
121024
121000
  "privacy": "protected",
121025
121001
  "return": {
121026
121002
  "type": {
@@ -121029,227 +121005,192 @@
121029
121005
  },
121030
121006
  "parameters": [
121031
121007
  {
121032
- "name": "value",
121008
+ "name": "flag",
121009
+ "type": {
121010
+ "text": "T"
121011
+ }
121012
+ },
121013
+ {
121014
+ "name": "message",
121033
121015
  "type": {
121034
121016
  "text": "string"
121035
121017
  }
121036
121018
  },
121037
121019
  {
121038
- "name": "force",
121020
+ "name": "flagValue",
121039
121021
  "optional": true,
121040
121022
  "type": {
121041
- "text": "boolean"
121023
+ "text": "ValidityStateFlags[T]"
121042
121024
  }
121043
121025
  }
121044
121026
  ],
121027
+ "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).",
121045
121028
  "inheritedFrom": {
121046
- "name": "SbbElement",
121047
- "module": "core/base-elements/element.js"
121029
+ "name": "SbbFormAssociatedMixin",
121030
+ "module": "core/mixins/form-associated-mixin.js"
121048
121031
  }
121049
121032
  },
121050
121033
  {
121051
- "kind": "field",
121052
- "name": "['_$sbbElement$']",
121053
- "type": {
121054
- "text": "boolean"
121034
+ "kind": "method",
121035
+ "name": "removeValidityFlag",
121036
+ "privacy": "protected",
121037
+ "return": {
121038
+ "type": {
121039
+ "text": "void"
121040
+ }
121055
121041
  },
121056
- "privacy": "public",
121057
- "static": true,
121058
- "default": "true",
121042
+ "parameters": [
121043
+ {
121044
+ "name": "flag",
121045
+ "type": {
121046
+ "text": "T"
121047
+ }
121048
+ }
121049
+ ],
121050
+ "description": "Removes the validity state flag entry and updates validity state.",
121059
121051
  "inheritedFrom": {
121060
- "name": "SbbElement",
121061
- "module": "core/base-elements/element.js"
121052
+ "name": "SbbFormAssociatedMixin",
121053
+ "module": "core/mixins/form-associated-mixin.js"
121062
121054
  }
121063
121055
  },
121064
121056
  {
121065
- "kind": "field",
121066
- "name": "_controllers",
121067
- "type": {
121068
- "text": "Set<SbbReactiveController> | undefined"
121057
+ "kind": "method",
121058
+ "name": "validate",
121059
+ "privacy": "protected",
121060
+ "return": {
121061
+ "type": {
121062
+ "text": "void"
121063
+ }
121069
121064
  },
121070
- "privacy": "private",
121065
+ "description": "To be called whenever the current element needs to be validated.",
121071
121066
  "inheritedFrom": {
121072
- "name": "SbbElement",
121073
- "module": "core/base-elements/element.js"
121067
+ "name": "SbbFormAssociatedMixin",
121068
+ "module": "core/mixins/form-associated-mixin.js"
121074
121069
  }
121075
- }
121076
- ],
121077
- "attributes": [
121078
- {
121079
- "name": "color",
121080
- "type": {
121081
- "text": "'white' | 'milk'"
121082
- },
121083
- "default": "'white'",
121084
- "description": "Background color of the sidebar. Either `white` or `milk`.",
121085
- "fieldName": "color"
121086
121070
  },
121087
121071
  {
121088
- "name": "mode",
121089
- "type": {
121090
- "text": "'side' | 'over'"
121091
- },
121092
- "default": "'side'",
121093
- "description": "Mode of the sidebar; one of 'side' or 'over'.",
121094
- "fieldName": "mode"
121095
- },
121096
- {
121097
- "name": "position",
121098
- "type": {
121099
- "text": "'start' | 'end'"
121100
- },
121101
- "default": "'start'",
121102
- "description": "The side that the sidebar is attached to.",
121103
- "fieldName": "position"
121104
- },
121105
- {
121106
- "name": "opened",
121107
- "type": {
121108
- "text": "boolean"
121072
+ "kind": "method",
121073
+ "name": "shouldValidate",
121074
+ "privacy": "protected",
121075
+ "return": {
121076
+ "type": {
121077
+ "text": "boolean"
121078
+ }
121109
121079
  },
121110
- "default": "false",
121111
- "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
121112
- "fieldName": "opened"
121080
+ "parameters": [
121081
+ {
121082
+ "name": "name",
121083
+ "type": {
121084
+ "text": "PropertyKey | undefined"
121085
+ }
121086
+ }
121087
+ ],
121088
+ "description": "Whether validation should be run on a property change with the given name.",
121089
+ "inheritedFrom": {
121090
+ "name": "SbbFormAssociatedMixin",
121091
+ "module": "core/mixins/form-associated-mixin.js"
121092
+ }
121113
121093
  },
121114
121094
  {
121115
- "name": "focus-on-open",
121116
- "type": {
121117
- "text": "boolean"
121118
- },
121119
- "default": "false",
121120
- "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
121121
- "fieldName": "focusOnOpen"
121122
- }
121123
- ],
121124
- "mixins": [
121125
- {
121126
- "name": "SbbAnimationCompleteMixin",
121127
- "module": "core/mixins.js"
121128
- }
121129
- ],
121130
- "superclass": {
121131
- "name": "SbbOpenCloseBaseElement",
121132
- "module": "core/base-elements.js"
121133
- },
121134
- "tagName": "sbb-sidebar",
121135
- "customElement": true,
121136
- "events": [
121137
- {
121138
- "name": "beforeopen",
121139
- "type": {
121140
- "text": "Event"
121095
+ "kind": "method",
121096
+ "name": "_setInternalValidity",
121097
+ "privacy": "private",
121098
+ "return": {
121099
+ "type": {
121100
+ "text": "void"
121101
+ }
121141
121102
  },
121142
- "description": "Emits whenever the component starts the opening transition. Can be canceled.",
121143
121103
  "inheritedFrom": {
121144
- "name": "SbbOpenCloseBaseElement",
121145
- "module": "core/base-elements/open-close-base-element.js"
121104
+ "name": "SbbFormAssociatedMixin",
121105
+ "module": "core/mixins/form-associated-mixin.js"
121146
121106
  }
121147
121107
  },
121148
121108
  {
121149
- "name": "open",
121109
+ "kind": "field",
121110
+ "name": "role",
121150
121111
  "type": {
121151
- "text": "Event"
121112
+ "text": "ElementInternals['role']"
121152
121113
  },
121153
- "description": "Emits whenever the component is opened.",
121114
+ "privacy": "public",
121115
+ "static": true,
121116
+ "readonly": true,
121117
+ "default": "'button'",
121154
121118
  "inheritedFrom": {
121155
- "name": "SbbOpenCloseBaseElement",
121156
- "module": "core/base-elements/open-close-base-element.js"
121119
+ "name": "SbbButtonLikeBaseElement",
121120
+ "module": "core/base-elements/button-base-element.js"
121157
121121
  }
121158
121122
  },
121159
121123
  {
121160
- "name": "beforeclose",
121161
- "type": {
121162
- "text": "Event"
121163
- },
121164
- "description": "Emits whenever the component begins the closing transition. Can be canceled.",
121124
+ "kind": "field",
121125
+ "name": "_preventScrollOnSpaceKeydown",
121126
+ "privacy": "private",
121127
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
121128
+ "parameters": [
121129
+ {
121130
+ "description": "The origin event.",
121131
+ "name": "event"
121132
+ }
121133
+ ],
121165
121134
  "inheritedFrom": {
121166
- "name": "SbbOpenCloseBaseElement",
121167
- "module": "core/base-elements/open-close-base-element.js"
121135
+ "name": "SbbButtonLikeBaseElement",
121136
+ "module": "core/base-elements/button-base-element.js"
121168
121137
  }
121169
121138
  },
121170
121139
  {
121171
- "name": "close",
121172
- "type": {
121173
- "text": "Event"
121174
- },
121175
- "description": "Emits whenever the component is closed.",
121140
+ "kind": "field",
121141
+ "name": "_removeActiveMarker",
121142
+ "privacy": "private",
121176
121143
  "inheritedFrom": {
121177
- "name": "SbbOpenCloseBaseElement",
121178
- "module": "core/base-elements/open-close-base-element.js"
121144
+ "name": "SbbButtonLikeBaseElement",
121145
+ "module": "core/base-elements/button-base-element.js"
121179
121146
  }
121180
- }
121181
- ]
121182
- }
121183
- ],
121184
- "exports": [
121185
- {
121186
- "kind": "js",
121187
- "name": "SbbSidebarElement",
121188
- "declaration": {
121189
- "name": "SbbSidebarElement",
121190
- "module": "sidebar/sidebar/sidebar.component.js"
121191
- }
121192
- }
121193
- ]
121194
- },
121195
- {
121196
- "kind": "javascript-module",
121197
- "path": "sidebar/sidebar-close-button/sidebar-close-button.component.js",
121198
- "declarations": [
121199
- {
121200
- "kind": "class",
121201
- "description": "Sidebar close button, intended to be placed inside sbb-sidebar.",
121202
- "name": "SbbSidebarCloseButtonElement",
121203
- "slots": [
121147
+ },
121204
121148
  {
121205
- "description": "Use the unnamed slot to add content to the sidebar-close-button. Not intended to be used in this context.",
121206
- "name": "",
121149
+ "kind": "field",
121150
+ "name": "_dispatchClickEventOnSpaceKeyup",
121151
+ "privacy": "private",
121152
+ "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.",
121153
+ "parameters": [
121154
+ {
121155
+ "description": "The origin event.",
121156
+ "name": "event"
121157
+ }
121158
+ ],
121207
121159
  "inheritedFrom": {
121208
- "name": "SbbSecondaryButtonElement",
121209
- "module": "button/secondary-button/secondary-button.component.js"
121160
+ "name": "SbbButtonLikeBaseElement",
121161
+ "module": "core/base-elements/button-base-element.js"
121210
121162
  }
121211
121163
  },
121212
121164
  {
121213
- "description": "Slot used to display the icon, if one is set. Not intended to be used in this context.",
121214
- "name": "icon",
121165
+ "kind": "field",
121166
+ "name": "_dispatchClickEvent",
121167
+ "privacy": "private",
121215
121168
  "inheritedFrom": {
121216
- "name": "SbbSecondaryButtonElement",
121217
- "module": "button/secondary-button/secondary-button.component.js"
121169
+ "name": "SbbButtonLikeBaseElement",
121170
+ "module": "core/base-elements/button-base-element.js"
121218
121171
  }
121219
- }
121220
- ],
121221
- "members": [
121172
+ },
121222
121173
  {
121223
121174
  "kind": "field",
121224
- "name": "elementName",
121175
+ "name": "maybeDisabled",
121225
121176
  "type": {
121226
- "text": "string"
121177
+ "text": "boolean | undefined"
121227
121178
  },
121228
- "privacy": "public",
121229
- "static": true,
121179
+ "privacy": "protected",
121230
121180
  "readonly": true,
121231
121181
  "inheritedFrom": {
121232
- "name": "SbbElement",
121233
- "module": "core/base-elements/element.js"
121234
- },
121235
- "default": "'sbb-sidebar-close-button'"
121182
+ "name": "SbbActionBaseElement",
121183
+ "module": "core/base-elements/action-base-element.js"
121184
+ }
121236
121185
  },
121237
121186
  {
121238
121187
  "kind": "field",
121239
- "name": "_languageController",
121240
- "privacy": "private",
121241
- "default": "new SbbLanguageController(this)"
121242
- },
121243
- {
121244
- "kind": "method",
121245
- "name": "renderTemplate",
121246
- "privacy": "protected",
121247
- "return": {
121248
- "type": {
121249
- "text": "TemplateResult"
121250
- }
121188
+ "name": "maybeDisabledInteractive",
121189
+ "type": {
121190
+ "text": "boolean | undefined"
121251
121191
  },
121252
- "description": "Override this method to render the component template.",
121192
+ "privacy": "protected",
121193
+ "readonly": true,
121253
121194
  "inheritedFrom": {
121254
121195
  "name": "SbbActionBaseElement",
121255
121196
  "module": "core/base-elements/action-base-element.js"
@@ -121257,483 +121198,518 @@
121257
121198
  },
121258
121199
  {
121259
121200
  "kind": "method",
121260
- "name": "renderIconName",
121201
+ "name": "setupBaseEventHandlers",
121261
121202
  "privacy": "protected",
121262
121203
  "return": {
121263
121204
  "type": {
121264
- "text": "string"
121205
+ "text": "void"
121265
121206
  }
121266
121207
  },
121267
121208
  "inheritedFrom": {
121268
- "name": "SbbIconNameMixin",
121269
- "module": "icon/icon-name-mixin.js"
121209
+ "name": "SbbActionBaseElement",
121210
+ "module": "core/base-elements/action-base-element.js"
121270
121211
  }
121271
121212
  },
121272
121213
  {
121273
121214
  "kind": "field",
121274
- "name": "size",
121215
+ "name": "_hydrationRequired",
121275
121216
  "type": {
121276
- "text": "SbbButtonSize"
121217
+ "text": "boolean"
121277
121218
  },
121278
- "privacy": "public",
121279
- "description": "Size variant, either l, m or s.",
121280
- "default": "'s'",
121281
- "attribute": "size",
121282
- "reflects": true,
121219
+ "privacy": "private",
121220
+ "default": "!!this.shadowRoot",
121283
121221
  "inheritedFrom": {
121284
- "name": "SbbButtonCommonElementMixin",
121285
- "module": "button/common/button-common.js"
121222
+ "name": "SbbElement",
121223
+ "module": "core/base-elements/element.js"
121286
121224
  }
121287
121225
  },
121288
121226
  {
121289
121227
  "kind": "field",
121290
- "name": "loading",
121291
- "type": {
121292
- "text": "boolean"
121293
- },
121294
- "privacy": "public",
121295
- "default": "false",
121296
- "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
121297
- "attribute": "loading",
121298
- "reflects": true,
121228
+ "name": "_hydrationComplete",
121229
+ "privacy": "private",
121230
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
121299
121231
  "inheritedFrom": {
121300
- "name": "SbbButtonCommonElementMixin",
121301
- "module": "button/common/button-common.js"
121232
+ "name": "SbbElement",
121233
+ "module": "core/base-elements/element.js"
121302
121234
  }
121303
121235
  },
121304
121236
  {
121305
121237
  "kind": "field",
121306
- "name": "negative",
121238
+ "name": "_resolveHydration",
121307
121239
  "type": {
121308
- "text": "boolean"
121240
+ "text": "(hydrationRequired: boolean) => void"
121309
121241
  },
121310
- "privacy": "public",
121311
- "default": "false",
121312
- "description": "Negative coloring variant flag.",
121313
- "attribute": "negative",
121314
- "reflects": true,
121242
+ "privacy": "private",
121315
121243
  "inheritedFrom": {
121316
- "name": "SbbNegativeMixin",
121317
- "module": "core/mixins/negative-mixin.js"
121244
+ "name": "SbbElement",
121245
+ "module": "core/base-elements/element.js"
121318
121246
  }
121319
121247
  },
121320
121248
  {
121321
121249
  "kind": "field",
121322
- "name": "iconName",
121250
+ "name": "hydrationRequired",
121323
121251
  "type": {
121324
- "text": "string"
121252
+ "text": "boolean"
121325
121253
  },
121326
- "privacy": "public",
121327
- "default": "''",
121328
- "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.",
121329
- "attribute": "icon-name",
121254
+ "privacy": "protected",
121255
+ "description": "Returns whether hydration is required and not completed.",
121256
+ "readonly": true,
121330
121257
  "inheritedFrom": {
121331
- "name": "SbbIconNameMixin",
121332
- "module": "icon/icon-name-mixin.js"
121333
- }
121258
+ "name": "SbbElement",
121259
+ "module": "core/base-elements/element.js"
121260
+ },
121261
+ "default": "!!this.shadowRoot"
121334
121262
  },
121335
121263
  {
121336
121264
  "kind": "method",
121337
- "name": "renderIconSlot",
121265
+ "name": "toggleState",
121338
121266
  "privacy": "protected",
121339
121267
  "return": {
121340
121268
  "type": {
121341
- "text": "TemplateResult"
121269
+ "text": "void"
121342
121270
  }
121343
121271
  },
121344
121272
  "parameters": [
121345
121273
  {
121346
- "name": "classname",
121347
- "optional": true,
121274
+ "name": "value",
121348
121275
  "type": {
121349
121276
  "text": "string"
121350
121277
  }
121278
+ },
121279
+ {
121280
+ "name": "force",
121281
+ "optional": true,
121282
+ "type": {
121283
+ "text": "boolean"
121284
+ }
121351
121285
  }
121352
121286
  ],
121353
121287
  "inheritedFrom": {
121354
- "name": "SbbIconNameMixin",
121355
- "module": "icon/icon-name-mixin.js"
121288
+ "name": "SbbElement",
121289
+ "module": "core/base-elements/element.js"
121356
121290
  }
121357
121291
  },
121358
121292
  {
121359
- "kind": "method",
121360
- "name": "_renderIconName",
121361
- "privacy": "private",
121362
- "return": {
121363
- "type": {
121364
- "text": "string"
121365
- }
121293
+ "kind": "field",
121294
+ "name": "['_$sbbElement$']",
121295
+ "type": {
121296
+ "text": "boolean"
121366
121297
  },
121298
+ "privacy": "public",
121299
+ "static": true,
121300
+ "default": "true",
121367
121301
  "inheritedFrom": {
121368
- "name": "SbbIconNameMixin",
121369
- "module": "icon/icon-name-mixin.js"
121302
+ "name": "SbbElement",
121303
+ "module": "core/base-elements/element.js"
121370
121304
  }
121371
121305
  },
121372
121306
  {
121373
121307
  "kind": "field",
121374
- "name": "disabledInteractive",
121308
+ "name": "_controllers",
121375
121309
  "type": {
121376
- "text": "boolean"
121310
+ "text": "Set<SbbReactiveController> | undefined"
121377
121311
  },
121378
- "privacy": "public",
121379
- "default": "false",
121380
- "description": "Whether the button should be aria-disabled but stay interactive.",
121381
- "attribute": "disabled-interactive",
121382
- "reflects": true,
121312
+ "privacy": "private",
121383
121313
  "inheritedFrom": {
121384
- "name": "SbbDisabledInteractiveMixin",
121385
- "module": "core/mixins/disabled-mixin.js"
121314
+ "name": "SbbElement",
121315
+ "module": "core/base-elements/element.js"
121316
+ }
121317
+ }
121318
+ ],
121319
+ "superclass": {
121320
+ "name": "SbbSecondaryButtonElement",
121321
+ "module": "button.pure.js"
121322
+ },
121323
+ "tagName": "sbb-sidebar-close-button",
121324
+ "customElement": true,
121325
+ "attributes": [
121326
+ {
121327
+ "name": "size",
121328
+ "type": {
121329
+ "text": "SbbButtonSize"
121330
+ },
121331
+ "description": "Size variant, either l, m or s.",
121332
+ "default": "'l' / 's' (lean)",
121333
+ "fieldName": "size",
121334
+ "inheritedFrom": {
121335
+ "name": "SbbButtonCommonElementMixin",
121336
+ "module": "button/common/button-common.js"
121386
121337
  }
121387
121338
  },
121388
121339
  {
121389
- "kind": "field",
121390
- "name": "disabled",
121391
- "privacy": "public",
121392
- "description": "Whether the component is disabled.",
121393
- "default": "false",
121340
+ "name": "loading",
121394
121341
  "type": {
121395
121342
  "text": "boolean"
121396
121343
  },
121397
- "attribute": "disabled",
121398
- "reflects": true,
121344
+ "default": "false",
121345
+ "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
121346
+ "fieldName": "loading",
121399
121347
  "inheritedFrom": {
121400
- "name": "SbbDisabledMixin",
121401
- "module": "core/mixins/disabled-mixin.js"
121348
+ "name": "SbbButtonCommonElementMixin",
121349
+ "module": "button/common/button-common.js"
121402
121350
  }
121403
121351
  },
121404
121352
  {
121405
- "kind": "field",
121406
- "name": "#disabled",
121407
- "privacy": "private",
121353
+ "name": "negative",
121408
121354
  "type": {
121409
121355
  "text": "boolean"
121410
121356
  },
121411
121357
  "default": "false",
121358
+ "description": "Negative coloring variant flag.",
121359
+ "fieldName": "negative",
121412
121360
  "inheritedFrom": {
121413
- "name": "SbbDisabledMixin",
121414
- "module": "core/mixins/disabled-mixin.js"
121361
+ "name": "SbbNegativeMixin",
121362
+ "module": "core/mixins/negative-mixin.js"
121415
121363
  }
121416
121364
  },
121417
121365
  {
121418
- "kind": "method",
121419
- "name": "isDisabledExternally",
121420
- "privacy": "protected",
121421
- "return": {
121422
- "type": {
121423
- "text": "boolean"
121424
- }
121366
+ "name": "icon-name",
121367
+ "type": {
121368
+ "text": "string"
121425
121369
  },
121426
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
121370
+ "default": "''",
121371
+ "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.",
121372
+ "fieldName": "iconName",
121427
121373
  "inheritedFrom": {
121428
- "name": "SbbDisabledMixin",
121374
+ "name": "SbbIconNameMixin",
121375
+ "module": "icon/icon-name-mixin.js"
121376
+ }
121377
+ },
121378
+ {
121379
+ "name": "disabled-interactive",
121380
+ "type": {
121381
+ "text": "boolean"
121382
+ },
121383
+ "default": "false",
121384
+ "description": "Whether the button should be aria-disabled but stay interactive.",
121385
+ "fieldName": "disabledInteractive",
121386
+ "inheritedFrom": {
121387
+ "name": "SbbDisabledInteractiveMixin",
121429
121388
  "module": "core/mixins/disabled-mixin.js"
121430
121389
  }
121431
121390
  },
121432
121391
  {
121433
- "kind": "field",
121434
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
121392
+ "name": "disabled",
121393
+ "description": "Whether the component is disabled.",
121394
+ "default": "false",
121435
121395
  "type": {
121436
- "text": "array"
121396
+ "text": "boolean"
121437
121397
  },
121438
- "privacy": "private",
121439
- "readonly": true,
121440
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
121398
+ "fieldName": "disabled",
121441
121399
  "inheritedFrom": {
121442
- "name": "SbbButtonBaseElement",
121443
- "module": "core/base-elements/button-base-element.js"
121400
+ "name": "SbbDisabledMixin",
121401
+ "module": "core/mixins/disabled-mixin.js"
121444
121402
  }
121445
121403
  },
121446
121404
  {
121447
- "kind": "field",
121448
121405
  "name": "value",
121449
121406
  "type": {
121450
121407
  "text": "string"
121451
121408
  },
121452
- "privacy": "public",
121409
+ "default": "''",
121410
+ "description": "Value of the form element.",
121411
+ "fieldName": "value",
121453
121412
  "inheritedFrom": {
121454
121413
  "name": "SbbButtonBaseElement",
121455
121414
  "module": "core/base-elements/button-base-element.js"
121456
- },
121457
- "default": "''",
121458
- "description": "Value of the form element.",
121459
- "attribute": "value"
121415
+ }
121460
121416
  },
121461
121417
  {
121462
- "kind": "field",
121463
121418
  "name": "type",
121464
- "privacy": "public",
121465
121419
  "description": "The type attribute to use for the button.",
121466
121420
  "default": "'button'",
121467
121421
  "type": {
121468
121422
  "text": "SbbButtonType"
121469
121423
  },
121470
- "attribute": "type",
121424
+ "fieldName": "type",
121471
121425
  "inheritedFrom": {
121472
121426
  "name": "SbbButtonBaseElement",
121473
121427
  "module": "core/base-elements/button-base-element.js"
121474
121428
  }
121475
121429
  },
121476
121430
  {
121477
- "kind": "field",
121478
121431
  "name": "form",
121432
+ "description": "The `<form>` element to associate the button with.",
121479
121433
  "type": {
121480
121434
  "text": "HTMLFormElement | null"
121481
121435
  },
121482
- "privacy": "public",
121483
- "description": "The `<form>` element to associate the button with.",
121436
+ "fieldName": "form",
121484
121437
  "inheritedFrom": {
121485
121438
  "name": "SbbButtonBaseElement",
121486
121439
  "module": "core/base-elements/button-base-element.js"
121487
- },
121488
- "attribute": "form"
121440
+ }
121489
121441
  },
121490
121442
  {
121491
- "kind": "field",
121492
- "name": "_formId",
121443
+ "name": "name",
121444
+ "description": "Name of the form element. Will be read from name attribute.",
121493
121445
  "type": {
121494
121446
  "text": "string"
121495
121447
  },
121496
- "privacy": "private",
121497
- "default": "''",
121448
+ "fieldName": "name",
121498
121449
  "inheritedFrom": {
121499
- "name": "SbbButtonBaseElement",
121500
- "module": "core/base-elements/button-base-element.js"
121450
+ "name": "SbbFormAssociatedMixin",
121451
+ "module": "core/mixins/form-associated-mixin.js"
121501
121452
  }
121502
- },
121453
+ }
121454
+ ],
121455
+ "cssProperties": [
121503
121456
  {
121504
- "kind": "field",
121505
- "name": "_handleButtonClick",
121506
- "privacy": "private",
121457
+ "description": "The delay before the loading animation starts, when setting the button into loading state.",
121458
+ "name": "--sbb-button-loading-delay",
121459
+ "default": "300ms",
121507
121460
  "inheritedFrom": {
121508
- "name": "SbbButtonBaseElement",
121509
- "module": "core/base-elements/button-base-element.js"
121461
+ "name": "SbbSecondaryButtonElement",
121462
+ "module": "button/secondary-button/secondary-button.component.js"
121510
121463
  }
121464
+ }
121465
+ ]
121466
+ }
121467
+ ],
121468
+ "exports": [
121469
+ {
121470
+ "kind": "js",
121471
+ "name": "SbbSidebarCloseButtonElement",
121472
+ "declaration": {
121473
+ "name": "SbbSidebarCloseButtonElement",
121474
+ "module": "sidebar/sidebar-close-button/sidebar-close-button.component.js"
121475
+ }
121476
+ }
121477
+ ]
121478
+ },
121479
+ {
121480
+ "kind": "javascript-module",
121481
+ "path": "sidebar/sidebar/sidebar.component.js",
121482
+ "declarations": [
121483
+ {
121484
+ "kind": "class",
121485
+ "description": "This component corresponds to a sidebar that can be opened on the sidebar container.",
121486
+ "name": "SbbSidebarElement",
121487
+ "slots": [
121488
+ {
121489
+ "description": "Use the unnamed slot to slot any content into the sidebar.",
121490
+ "name": ""
121511
121491
  },
121512
121492
  {
121513
- "kind": "method",
121514
- "name": "_requestSubmit",
121515
- "privacy": "private",
121516
- "return": {
121517
- "type": {
121518
- "text": "void"
121519
- }
121493
+ "description": "Use the title slot to add an <sbb-title>.",
121494
+ "name": "title"
121495
+ }
121496
+ ],
121497
+ "members": [
121498
+ {
121499
+ "kind": "field",
121500
+ "name": "elementName",
121501
+ "type": {
121502
+ "text": "string"
121520
121503
  },
121521
- "parameters": [
121522
- {
121523
- "name": "form",
121524
- "type": {
121525
- "text": "HTMLFormElement"
121526
- }
121527
- }
121528
- ],
121504
+ "privacy": "public",
121505
+ "static": true,
121506
+ "readonly": true,
121529
121507
  "inheritedFrom": {
121530
- "name": "SbbButtonBaseElement",
121531
- "module": "core/base-elements/button-base-element.js"
121532
- }
121508
+ "name": "SbbElement",
121509
+ "module": "core/base-elements/element.js"
121510
+ },
121511
+ "default": "'sbb-sidebar'"
121533
121512
  },
121534
121513
  {
121535
121514
  "kind": "field",
121536
- "name": "_formKeyDown",
121537
- "privacy": "private",
121538
- "inheritedFrom": {
121539
- "name": "SbbButtonBaseElement",
121540
- "module": "core/base-elements/button-base-element.js"
121541
- }
121515
+ "name": "color",
121516
+ "type": {
121517
+ "text": "'white' | 'milk'"
121518
+ },
121519
+ "privacy": "public",
121520
+ "default": "'white'",
121521
+ "description": "Background color of the sidebar. Either `white` or `milk`.",
121522
+ "attribute": "color",
121523
+ "reflects": true
121542
121524
  },
121543
121525
  {
121544
121526
  "kind": "field",
121545
- "name": "formAssociated",
121527
+ "name": "mode",
121546
121528
  "type": {
121547
- "text": "boolean"
121529
+ "text": "'side' | 'over'"
121548
121530
  },
121549
121531
  "privacy": "public",
121550
- "static": true,
121551
- "default": "true",
121552
- "inheritedFrom": {
121553
- "name": "SbbFormAssociatedMixin",
121554
- "module": "core/mixins/form-associated-mixin.js"
121555
- }
121532
+ "default": "'side'",
121533
+ "description": "Mode of the sidebar; one of 'side' or 'over'.",
121534
+ "attribute": "mode",
121535
+ "reflects": true
121556
121536
  },
121557
121537
  {
121558
121538
  "kind": "field",
121559
- "name": "name",
121560
- "privacy": "public",
121561
- "description": "Name of the form element. Will be read from name attribute.",
121539
+ "name": "position",
121562
121540
  "type": {
121563
- "text": "string"
121541
+ "text": "'start' | 'end'"
121564
121542
  },
121565
- "attribute": "name",
121566
- "inheritedFrom": {
121567
- "name": "SbbFormAssociatedMixin",
121568
- "module": "core/mixins/form-associated-mixin.js"
121569
- }
121543
+ "privacy": "public",
121544
+ "default": "'start'",
121545
+ "description": "The side that the sidebar is attached to.",
121546
+ "attribute": "position",
121547
+ "reflects": true
121570
121548
  },
121571
121549
  {
121572
121550
  "kind": "field",
121573
- "name": "validity",
121551
+ "name": "opened",
121574
121552
  "type": {
121575
- "text": "ValidityState"
121553
+ "text": "boolean"
121576
121554
  },
121577
121555
  "privacy": "public",
121578
- "description": "Returns the ValidityState object for this element.",
121579
- "readonly": true,
121580
- "inheritedFrom": {
121581
- "name": "SbbFormAssociatedMixin",
121582
- "module": "core/mixins/form-associated-mixin.js"
121583
- }
121556
+ "default": "false",
121557
+ "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
121558
+ "attribute": "opened",
121559
+ "reflects": true
121584
121560
  },
121585
121561
  {
121586
121562
  "kind": "field",
121587
- "name": "validationMessage",
121563
+ "name": "focusOnOpen",
121588
121564
  "type": {
121589
- "text": "string"
121565
+ "text": "boolean"
121590
121566
  },
121591
121567
  "privacy": "public",
121592
- "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.",
121593
- "readonly": true,
121594
- "inheritedFrom": {
121595
- "name": "SbbFormAssociatedMixin",
121596
- "module": "core/mixins/form-associated-mixin.js"
121597
- }
121568
+ "default": "false",
121569
+ "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
121570
+ "attribute": "focus-on-open"
121598
121571
  },
121599
121572
  {
121600
121573
  "kind": "field",
121601
- "name": "willValidate",
121574
+ "name": "container",
121602
121575
  "type": {
121603
- "text": "boolean"
121576
+ "text": "SbbSidebarContainerElement | null"
121604
121577
  },
121605
121578
  "privacy": "public",
121606
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
121579
+ "description": "Returns the SbbSidebarContainerElement where this sidebar is contained.",
121607
121580
  "readonly": true,
121608
- "inheritedFrom": {
121609
- "name": "SbbFormAssociatedMixin",
121610
- "module": "core/mixins/form-associated-mixin.js"
121611
- }
121581
+ "default": "null"
121612
121582
  },
121613
121583
  {
121614
121584
  "kind": "field",
121615
- "name": "_validityStates",
121585
+ "name": "_container",
121586
+ "type": {
121587
+ "text": "SbbSidebarContainerElement | null"
121588
+ },
121616
121589
  "privacy": "private",
121617
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
121618
- "inheritedFrom": {
121619
- "name": "SbbFormAssociatedMixin",
121620
- "module": "core/mixins/form-associated-mixin.js"
121621
- }
121590
+ "default": "null"
121622
121591
  },
121623
121592
  {
121624
121593
  "kind": "field",
121625
- "name": "formDisabled",
121594
+ "name": "_lastFocusedElement",
121626
121595
  "type": {
121627
- "text": "boolean"
121596
+ "text": "HTMLElement | null"
121628
121597
  },
121629
- "privacy": "protected",
121630
- "default": "false",
121631
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
121598
+ "privacy": "private",
121599
+ "default": "null"
121600
+ },
121601
+ {
121602
+ "kind": "field",
121603
+ "name": "_focusTrapController",
121604
+ "privacy": "private",
121605
+ "default": "new SbbFocusTrapController(this)"
121606
+ },
121607
+ {
121608
+ "kind": "field",
121609
+ "name": "_escapableOverlayController",
121610
+ "privacy": "private",
121611
+ "default": "new SbbEscapableOverlayController(this)"
121612
+ },
121613
+ {
121614
+ "kind": "field",
121615
+ "name": "_closeOnNavigation",
121616
+ "privacy": "private"
121617
+ },
121618
+ {
121619
+ "kind": "method",
121620
+ "name": "toggle",
121621
+ "privacy": "public",
121622
+ "return": {
121623
+ "type": {
121624
+ "text": "void"
121625
+ }
121626
+ },
121627
+ "description": "Toggles the sidebar visibility."
121628
+ },
121629
+ {
121630
+ "kind": "method",
121631
+ "name": "open",
121632
+ "privacy": "public",
121633
+ "return": {
121634
+ "type": {
121635
+ "text": "void"
121636
+ }
121637
+ },
121638
+ "description": "Opens the sidebar.",
121632
121639
  "inheritedFrom": {
121633
- "name": "SbbFormAssociatedMixin",
121634
- "module": "core/mixins/form-associated-mixin.js"
121640
+ "name": "SbbOpenCloseBaseElement",
121641
+ "module": "core/base-elements/open-close-base-element.js"
121635
121642
  }
121636
121643
  },
121637
121644
  {
121638
121645
  "kind": "method",
121639
- "name": "checkValidity",
121640
- "privacy": "public",
121646
+ "name": "_isZeroAnimationDuration",
121647
+ "privacy": "private",
121641
121648
  "return": {
121642
121649
  "type": {
121643
121650
  "text": "boolean"
121644
121651
  }
121645
- },
121646
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
121647
- "inheritedFrom": {
121648
- "name": "SbbFormAssociatedMixin",
121649
- "module": "core/mixins/form-associated-mixin.js"
121650
121652
  }
121651
121653
  },
121652
121654
  {
121653
121655
  "kind": "method",
121654
- "name": "reportValidity",
121655
- "privacy": "public",
121656
+ "name": "_handleOpening",
121657
+ "privacy": "private",
121656
121658
  "return": {
121657
121659
  "type": {
121658
- "text": "boolean"
121660
+ "text": "void"
121659
121661
  }
121660
- },
121661
- "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.",
121662
- "inheritedFrom": {
121663
- "name": "SbbFormAssociatedMixin",
121664
- "module": "core/mixins/form-associated-mixin.js"
121665
121662
  }
121666
121663
  },
121667
121664
  {
121668
121665
  "kind": "method",
121669
- "name": "setCustomValidity",
121666
+ "name": "close",
121670
121667
  "privacy": "public",
121671
121668
  "return": {
121672
121669
  "type": {
121673
121670
  "text": "void"
121674
121671
  }
121675
121672
  },
121676
- "parameters": [
121677
- {
121678
- "name": "message",
121679
- "type": {
121680
- "text": "string"
121681
- }
121682
- }
121683
- ],
121684
- "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.",
121673
+ "description": "Closes the sidebar.",
121685
121674
  "inheritedFrom": {
121686
- "name": "SbbFormAssociatedMixin",
121687
- "module": "core/mixins/form-associated-mixin.js"
121675
+ "name": "SbbOpenCloseBaseElement",
121676
+ "module": "core/base-elements/open-close-base-element.js"
121688
121677
  }
121689
121678
  },
121690
121679
  {
121691
121680
  "kind": "method",
121692
- "name": "_hasDisabledAncestor",
121681
+ "name": "_handleClosing",
121693
121682
  "privacy": "private",
121694
121683
  "return": {
121695
121684
  "type": {
121696
- "text": "boolean"
121685
+ "text": "void"
121697
121686
  }
121698
- },
121699
- "inheritedFrom": {
121700
- "name": "SbbFormAssociatedMixin",
121701
- "module": "core/mixins/form-associated-mixin.js"
121702
121687
  }
121703
121688
  },
121704
121689
  {
121705
121690
  "kind": "method",
121706
- "name": "updateFormValue",
121707
- "privacy": "protected",
121691
+ "name": "_takeFocus",
121692
+ "privacy": "private",
121708
121693
  "return": {
121709
121694
  "type": {
121710
121695
  "text": "void"
121711
121696
  }
121712
- },
121713
- "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",
121714
- "inheritedFrom": {
121715
- "name": "SbbFormAssociatedMixin",
121716
- "module": "core/mixins/form-associated-mixin.js"
121717
121697
  }
121718
121698
  },
121719
121699
  {
121720
121700
  "kind": "method",
121721
- "name": "formState",
121701
+ "name": "cedeFocus",
121722
121702
  "privacy": "protected",
121723
121703
  "return": {
121724
121704
  "type": {
121725
- "text": "FormRestoreState"
121705
+ "text": "void"
121726
121706
  }
121727
- },
121728
- "inheritedFrom": {
121729
- "name": "SbbFormAssociatedMixin",
121730
- "module": "core/mixins/form-associated-mixin.js"
121731
121707
  }
121732
121708
  },
121733
121709
  {
121734
121710
  "kind": "method",
121735
- "name": "setValidityFlag",
121736
- "privacy": "protected",
121711
+ "name": "_updateSidebarWidth",
121712
+ "privacy": "private",
121737
121713
  "return": {
121738
121714
  "type": {
121739
121715
  "text": "void"
@@ -121741,35 +121717,44 @@
121741
121717
  },
121742
121718
  "parameters": [
121743
121719
  {
121744
- "name": "flag",
121745
- "type": {
121746
- "text": "T"
121747
- }
121748
- },
121749
- {
121750
- "name": "message",
121751
- "type": {
121752
- "text": "string"
121753
- }
121754
- },
121755
- {
121756
- "name": "flagValue",
121720
+ "name": "oldPosition",
121757
121721
  "optional": true,
121758
121722
  "type": {
121759
- "text": "ValidityStateFlags[T]"
121723
+ "text": "this['position']"
121760
121724
  }
121761
121725
  }
121762
- ],
121763
- "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).",
121764
- "inheritedFrom": {
121765
- "name": "SbbFormAssociatedMixin",
121766
- "module": "core/mixins/form-associated-mixin.js"
121726
+ ]
121727
+ },
121728
+ {
121729
+ "kind": "method",
121730
+ "name": "_buildCssWidthVar",
121731
+ "privacy": "private",
121732
+ "return": {
121733
+ "type": {
121734
+ "text": "string"
121735
+ }
121736
+ },
121737
+ "parameters": [
121738
+ {
121739
+ "name": "position",
121740
+ "default": "this.position"
121741
+ }
121742
+ ]
121743
+ },
121744
+ {
121745
+ "kind": "method",
121746
+ "name": "_isModeOver",
121747
+ "privacy": "private",
121748
+ "return": {
121749
+ "type": {
121750
+ "text": "boolean"
121751
+ }
121767
121752
  }
121768
121753
  },
121769
121754
  {
121770
121755
  "kind": "method",
121771
- "name": "removeValidityFlag",
121772
- "privacy": "protected",
121756
+ "name": "_onTransitionEnd",
121757
+ "privacy": "private",
121773
121758
  "return": {
121774
121759
  "type": {
121775
121760
  "text": "void"
@@ -121777,173 +121762,230 @@
121777
121762
  },
121778
121763
  "parameters": [
121779
121764
  {
121780
- "name": "flag",
121765
+ "name": "event",
121781
121766
  "type": {
121782
- "text": "T"
121767
+ "text": "TransitionEvent"
121783
121768
  }
121784
121769
  }
121785
- ],
121786
- "description": "Removes the validity state flag entry and updates validity state.",
121770
+ ]
121771
+ },
121772
+ {
121773
+ "kind": "method",
121774
+ "name": "_detectScrolledState",
121775
+ "privacy": "private",
121776
+ "return": {
121777
+ "type": {
121778
+ "text": "void"
121779
+ }
121780
+ }
121781
+ },
121782
+ {
121783
+ "kind": "field",
121784
+ "name": "isAnimating",
121785
+ "type": {
121786
+ "text": "boolean"
121787
+ },
121788
+ "privacy": "public",
121789
+ "default": "false",
121790
+ "description": "Whether the component is currently animating.",
121787
121791
  "inheritedFrom": {
121788
- "name": "SbbFormAssociatedMixin",
121789
- "module": "core/mixins/form-associated-mixin.js"
121792
+ "name": "SbbAnimationCompleteMixin",
121793
+ "module": "core/mixins/animation-complete-mixin.js"
121794
+ }
121795
+ },
121796
+ {
121797
+ "kind": "field",
121798
+ "name": "animationComplete",
121799
+ "type": {
121800
+ "text": "Promise<void>"
121801
+ },
121802
+ "privacy": "public",
121803
+ "description": "Returns a promise which completes whenever an animation ends.\nWhen a new animation starts, a new Promise is returned.",
121804
+ "readonly": true,
121805
+ "inheritedFrom": {
121806
+ "name": "SbbAnimationCompleteMixin",
121807
+ "module": "core/mixins/animation-complete-mixin.js"
121808
+ }
121809
+ },
121810
+ {
121811
+ "kind": "field",
121812
+ "name": "_animationPromise",
121813
+ "type": {
121814
+ "text": "Promise<void>"
121815
+ },
121816
+ "privacy": "private",
121817
+ "inheritedFrom": {
121818
+ "name": "SbbAnimationCompleteMixin",
121819
+ "module": "core/mixins/animation-complete-mixin.js"
121790
121820
  }
121791
121821
  },
121792
121822
  {
121793
121823
  "kind": "method",
121794
- "name": "validate",
121824
+ "name": "startAnimation",
121795
121825
  "privacy": "protected",
121796
121826
  "return": {
121797
121827
  "type": {
121798
121828
  "text": "void"
121799
121829
  }
121800
121830
  },
121801
- "description": "To be called whenever the current element needs to be validated.",
121802
121831
  "inheritedFrom": {
121803
- "name": "SbbFormAssociatedMixin",
121804
- "module": "core/mixins/form-associated-mixin.js"
121832
+ "name": "SbbAnimationCompleteMixin",
121833
+ "module": "core/mixins/animation-complete-mixin.js"
121805
121834
  }
121806
121835
  },
121807
121836
  {
121808
121837
  "kind": "method",
121809
- "name": "shouldValidate",
121838
+ "name": "stopAnimation",
121810
121839
  "privacy": "protected",
121811
121840
  "return": {
121812
121841
  "type": {
121813
- "text": "boolean"
121842
+ "text": "void"
121814
121843
  }
121815
121844
  },
121816
- "parameters": [
121817
- {
121818
- "name": "name",
121819
- "type": {
121820
- "text": "PropertyKey | undefined"
121821
- }
121822
- }
121823
- ],
121824
- "description": "Whether validation should be run on a property change with the given name.",
121845
+ "description": "Overriding stopAnimation() breaks functionality.",
121825
121846
  "inheritedFrom": {
121826
- "name": "SbbFormAssociatedMixin",
121827
- "module": "core/mixins/form-associated-mixin.js"
121847
+ "name": "SbbAnimationCompleteMixin",
121848
+ "module": "core/mixins/animation-complete-mixin.js"
121828
121849
  }
121829
121850
  },
121830
121851
  {
121831
121852
  "kind": "method",
121832
- "name": "_setInternalValidity",
121853
+ "name": "_enqueueAnimation",
121833
121854
  "privacy": "private",
121834
121855
  "return": {
121835
121856
  "type": {
121836
- "text": "void"
121857
+ "text": "Promise<void>"
121837
121858
  }
121838
121859
  },
121839
121860
  "inheritedFrom": {
121840
- "name": "SbbFormAssociatedMixin",
121841
- "module": "core/mixins/form-associated-mixin.js"
121861
+ "name": "SbbAnimationCompleteMixin",
121862
+ "module": "core/mixins/animation-complete-mixin.js"
121842
121863
  }
121843
121864
  },
121844
121865
  {
121845
121866
  "kind": "field",
121846
- "name": "role",
121847
- "type": {
121848
- "text": "ElementInternals['role']"
121849
- },
121867
+ "name": "events",
121850
121868
  "privacy": "public",
121851
121869
  "static": true,
121852
121870
  "readonly": true,
121853
- "default": "'button'",
121871
+ "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
121872
+ "type": {
121873
+ "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
121874
+ },
121854
121875
  "inheritedFrom": {
121855
- "name": "SbbButtonLikeBaseElement",
121856
- "module": "core/base-elements/button-base-element.js"
121876
+ "name": "SbbOpenCloseBaseElement",
121877
+ "module": "core/base-elements/open-close-base-element.js"
121857
121878
  }
121858
121879
  },
121859
121880
  {
121860
121881
  "kind": "field",
121861
- "name": "_preventScrollOnSpaceKeydown",
121862
- "privacy": "private",
121863
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
121864
- "parameters": [
121865
- {
121866
- "description": "The origin event.",
121867
- "name": "event"
121868
- }
121869
- ],
121882
+ "name": "state",
121883
+ "privacy": "protected",
121884
+ "description": "The state of the component.",
121885
+ "type": {
121886
+ "text": "SbbOpenedClosedState"
121887
+ },
121888
+ "default": "'closed'",
121870
121889
  "inheritedFrom": {
121871
- "name": "SbbButtonLikeBaseElement",
121872
- "module": "core/base-elements/button-base-element.js"
121890
+ "name": "SbbOpenCloseBaseElement",
121891
+ "module": "core/base-elements/open-close-base-element.js"
121892
+ }
121893
+ },
121894
+ {
121895
+ "kind": "field",
121896
+ "name": "_state",
121897
+ "type": {
121898
+ "text": "SbbOpenedClosedState"
121899
+ },
121900
+ "privacy": "private",
121901
+ "inheritedFrom": {
121902
+ "name": "SbbOpenCloseBaseElement",
121903
+ "module": "core/base-elements/open-close-base-element.js"
121873
121904
  }
121874
121905
  },
121875
121906
  {
121876
121907
  "kind": "field",
121877
- "name": "_removeActiveMarker",
121878
- "privacy": "private",
121908
+ "name": "isOpen",
121909
+ "type": {
121910
+ "text": "boolean"
121911
+ },
121912
+ "privacy": "public",
121913
+ "description": "Whether the element is open.",
121914
+ "readonly": true,
121879
121915
  "inheritedFrom": {
121880
- "name": "SbbButtonLikeBaseElement",
121881
- "module": "core/base-elements/button-base-element.js"
121916
+ "name": "SbbOpenCloseBaseElement",
121917
+ "module": "core/base-elements/open-close-base-element.js"
121882
121918
  }
121883
121919
  },
121884
121920
  {
121885
- "kind": "field",
121886
- "name": "_dispatchClickEventOnSpaceKeyup",
121887
- "privacy": "private",
121888
- "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.",
121889
- "parameters": [
121890
- {
121891
- "description": "The origin event.",
121892
- "name": "event"
121921
+ "kind": "method",
121922
+ "name": "escapeStrategy",
121923
+ "privacy": "public",
121924
+ "return": {
121925
+ "type": {
121926
+ "text": "void"
121893
121927
  }
121894
- ],
121928
+ },
121929
+ "description": "The method which is called on escape key press. Defaults to calling close()",
121895
121930
  "inheritedFrom": {
121896
- "name": "SbbButtonLikeBaseElement",
121897
- "module": "core/base-elements/button-base-element.js"
121931
+ "name": "SbbOpenCloseBaseElement",
121932
+ "module": "core/base-elements/open-close-base-element.js"
121898
121933
  }
121899
121934
  },
121900
121935
  {
121901
- "kind": "field",
121902
- "name": "_dispatchClickEvent",
121903
- "privacy": "private",
121936
+ "kind": "method",
121937
+ "name": "dispatchBeforeOpenEvent",
121938
+ "privacy": "protected",
121939
+ "return": {
121940
+ "type": {
121941
+ "text": "boolean"
121942
+ }
121943
+ },
121904
121944
  "inheritedFrom": {
121905
- "name": "SbbButtonLikeBaseElement",
121906
- "module": "core/base-elements/button-base-element.js"
121945
+ "name": "SbbOpenCloseBaseElement",
121946
+ "module": "core/base-elements/open-close-base-element.js"
121907
121947
  }
121908
121948
  },
121909
121949
  {
121910
- "kind": "field",
121911
- "name": "maybeDisabled",
121912
- "type": {
121913
- "text": "boolean | undefined"
121914
- },
121950
+ "kind": "method",
121951
+ "name": "dispatchOpenEvent",
121915
121952
  "privacy": "protected",
121916
- "readonly": true,
121953
+ "return": {
121954
+ "type": {
121955
+ "text": "boolean"
121956
+ }
121957
+ },
121917
121958
  "inheritedFrom": {
121918
- "name": "SbbActionBaseElement",
121919
- "module": "core/base-elements/action-base-element.js"
121959
+ "name": "SbbOpenCloseBaseElement",
121960
+ "module": "core/base-elements/open-close-base-element.js"
121920
121961
  }
121921
121962
  },
121922
121963
  {
121923
- "kind": "field",
121924
- "name": "maybeDisabledInteractive",
121925
- "type": {
121926
- "text": "boolean | undefined"
121927
- },
121964
+ "kind": "method",
121965
+ "name": "dispatchBeforeCloseEvent",
121928
121966
  "privacy": "protected",
121929
- "readonly": true,
121967
+ "return": {
121968
+ "type": {
121969
+ "text": "boolean"
121970
+ }
121971
+ },
121930
121972
  "inheritedFrom": {
121931
- "name": "SbbActionBaseElement",
121932
- "module": "core/base-elements/action-base-element.js"
121973
+ "name": "SbbOpenCloseBaseElement",
121974
+ "module": "core/base-elements/open-close-base-element.js"
121933
121975
  }
121934
121976
  },
121935
121977
  {
121936
121978
  "kind": "method",
121937
- "name": "setupBaseEventHandlers",
121979
+ "name": "dispatchCloseEvent",
121938
121980
  "privacy": "protected",
121939
121981
  "return": {
121940
121982
  "type": {
121941
- "text": "void"
121983
+ "text": "boolean"
121942
121984
  }
121943
121985
  },
121944
121986
  "inheritedFrom": {
121945
- "name": "SbbActionBaseElement",
121946
- "module": "core/base-elements/action-base-element.js"
121987
+ "name": "SbbOpenCloseBaseElement",
121988
+ "module": "core/base-elements/open-close-base-element.js"
121947
121989
  }
121948
121990
  },
121949
121991
  {
@@ -122052,150 +122094,108 @@
122052
122094
  }
122053
122095
  }
122054
122096
  ],
122055
- "superclass": {
122056
- "name": "SbbSecondaryButtonElement",
122057
- "module": "button.pure.js"
122058
- },
122059
- "tagName": "sbb-sidebar-close-button",
122060
- "customElement": true,
122061
122097
  "attributes": [
122062
122098
  {
122063
- "name": "size",
122064
- "type": {
122065
- "text": "SbbButtonSize"
122066
- },
122067
- "description": "Size variant, either l, m or s.",
122068
- "default": "'l' / 's' (lean)",
122069
- "fieldName": "size",
122070
- "inheritedFrom": {
122071
- "name": "SbbButtonCommonElementMixin",
122072
- "module": "button/common/button-common.js"
122073
- }
122074
- },
122075
- {
122076
- "name": "loading",
122099
+ "name": "color",
122077
122100
  "type": {
122078
- "text": "boolean"
122101
+ "text": "'white' | 'milk'"
122079
122102
  },
122080
- "default": "false",
122081
- "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
122082
- "fieldName": "loading",
122083
- "inheritedFrom": {
122084
- "name": "SbbButtonCommonElementMixin",
122085
- "module": "button/common/button-common.js"
122086
- }
122103
+ "default": "'white'",
122104
+ "description": "Background color of the sidebar. Either `white` or `milk`.",
122105
+ "fieldName": "color"
122087
122106
  },
122088
122107
  {
122089
- "name": "negative",
122108
+ "name": "mode",
122090
122109
  "type": {
122091
- "text": "boolean"
122110
+ "text": "'side' | 'over'"
122092
122111
  },
122093
- "default": "false",
122094
- "description": "Negative coloring variant flag.",
122095
- "fieldName": "negative",
122096
- "inheritedFrom": {
122097
- "name": "SbbNegativeMixin",
122098
- "module": "core/mixins/negative-mixin.js"
122099
- }
122112
+ "default": "'side'",
122113
+ "description": "Mode of the sidebar; one of 'side' or 'over'.",
122114
+ "fieldName": "mode"
122100
122115
  },
122101
122116
  {
122102
- "name": "icon-name",
122117
+ "name": "position",
122103
122118
  "type": {
122104
- "text": "string"
122119
+ "text": "'start' | 'end'"
122105
122120
  },
122106
- "default": "''",
122107
- "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.",
122108
- "fieldName": "iconName",
122109
- "inheritedFrom": {
122110
- "name": "SbbIconNameMixin",
122111
- "module": "icon/icon-name-mixin.js"
122112
- }
122121
+ "default": "'start'",
122122
+ "description": "The side that the sidebar is attached to.",
122123
+ "fieldName": "position"
122113
122124
  },
122114
122125
  {
122115
- "name": "disabled-interactive",
122126
+ "name": "opened",
122116
122127
  "type": {
122117
122128
  "text": "boolean"
122118
122129
  },
122119
122130
  "default": "false",
122120
- "description": "Whether the button should be aria-disabled but stay interactive.",
122121
- "fieldName": "disabledInteractive",
122122
- "inheritedFrom": {
122123
- "name": "SbbDisabledInteractiveMixin",
122124
- "module": "core/mixins/disabled-mixin.js"
122125
- }
122131
+ "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
122132
+ "fieldName": "opened"
122126
122133
  },
122127
122134
  {
122128
- "name": "disabled",
122129
- "description": "Whether the component is disabled.",
122130
- "default": "false",
122135
+ "name": "focus-on-open",
122131
122136
  "type": {
122132
122137
  "text": "boolean"
122133
122138
  },
122134
- "fieldName": "disabled",
122135
- "inheritedFrom": {
122136
- "name": "SbbDisabledMixin",
122137
- "module": "core/mixins/disabled-mixin.js"
122138
- }
122139
- },
122139
+ "default": "false",
122140
+ "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
122141
+ "fieldName": "focusOnOpen"
122142
+ }
122143
+ ],
122144
+ "mixins": [
122140
122145
  {
122141
- "name": "value",
122146
+ "name": "SbbAnimationCompleteMixin",
122147
+ "module": "core/mixins.js"
122148
+ }
122149
+ ],
122150
+ "superclass": {
122151
+ "name": "SbbOpenCloseBaseElement",
122152
+ "module": "core/base-elements.js"
122153
+ },
122154
+ "tagName": "sbb-sidebar",
122155
+ "customElement": true,
122156
+ "events": [
122157
+ {
122158
+ "name": "beforeopen",
122142
122159
  "type": {
122143
- "text": "string"
122160
+ "text": "Event"
122144
122161
  },
122145
- "default": "''",
122146
- "description": "Value of the form element.",
122147
- "fieldName": "value",
122162
+ "description": "Emits whenever the component starts the opening transition. Can be canceled.",
122148
122163
  "inheritedFrom": {
122149
- "name": "SbbButtonBaseElement",
122150
- "module": "core/base-elements/button-base-element.js"
122164
+ "name": "SbbOpenCloseBaseElement",
122165
+ "module": "core/base-elements/open-close-base-element.js"
122151
122166
  }
122152
122167
  },
122153
122168
  {
122154
- "name": "type",
122155
- "description": "The type attribute to use for the button.",
122156
- "default": "'button'",
122169
+ "name": "open",
122157
122170
  "type": {
122158
- "text": "SbbButtonType"
122171
+ "text": "Event"
122159
122172
  },
122160
- "fieldName": "type",
122173
+ "description": "Emits whenever the component is opened.",
122161
122174
  "inheritedFrom": {
122162
- "name": "SbbButtonBaseElement",
122163
- "module": "core/base-elements/button-base-element.js"
122175
+ "name": "SbbOpenCloseBaseElement",
122176
+ "module": "core/base-elements/open-close-base-element.js"
122164
122177
  }
122165
122178
  },
122166
122179
  {
122167
- "name": "form",
122168
- "description": "The `<form>` element to associate the button with.",
122180
+ "name": "beforeclose",
122169
122181
  "type": {
122170
- "text": "HTMLFormElement | null"
122182
+ "text": "Event"
122171
122183
  },
122172
- "fieldName": "form",
122184
+ "description": "Emits whenever the component begins the closing transition. Can be canceled.",
122173
122185
  "inheritedFrom": {
122174
- "name": "SbbButtonBaseElement",
122175
- "module": "core/base-elements/button-base-element.js"
122186
+ "name": "SbbOpenCloseBaseElement",
122187
+ "module": "core/base-elements/open-close-base-element.js"
122176
122188
  }
122177
122189
  },
122178
122190
  {
122179
- "name": "name",
122180
- "description": "Name of the form element. Will be read from name attribute.",
122191
+ "name": "close",
122181
122192
  "type": {
122182
- "text": "string"
122193
+ "text": "Event"
122183
122194
  },
122184
- "fieldName": "name",
122185
- "inheritedFrom": {
122186
- "name": "SbbFormAssociatedMixin",
122187
- "module": "core/mixins/form-associated-mixin.js"
122188
- }
122189
- }
122190
- ],
122191
- "cssProperties": [
122192
- {
122193
- "description": "The delay before the loading animation starts, when setting the button into loading state.",
122194
- "name": "--sbb-button-loading-delay",
122195
- "default": "300ms",
122195
+ "description": "Emits whenever the component is closed.",
122196
122196
  "inheritedFrom": {
122197
- "name": "SbbSecondaryButtonElement",
122198
- "module": "button/secondary-button/secondary-button.component.js"
122197
+ "name": "SbbOpenCloseBaseElement",
122198
+ "module": "core/base-elements/open-close-base-element.js"
122199
122199
  }
122200
122200
  }
122201
122201
  ]
@@ -122204,10 +122204,10 @@
122204
122204
  "exports": [
122205
122205
  {
122206
122206
  "kind": "js",
122207
- "name": "SbbSidebarCloseButtonElement",
122207
+ "name": "SbbSidebarElement",
122208
122208
  "declaration": {
122209
- "name": "SbbSidebarCloseButtonElement",
122210
- "module": "sidebar/sidebar-close-button/sidebar-close-button.component.js"
122209
+ "name": "SbbSidebarElement",
122210
+ "module": "sidebar/sidebar/sidebar.component.js"
122211
122211
  }
122212
122212
  }
122213
122213
  ]