@sbb-esta/lyne-elements-dev 4.13.0-dev.1780899827 → 4.13.0-dev.1780917574

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.
@@ -21902,6 +21902,14 @@
21902
21902
  "text": "void"
21903
21903
  }
21904
21904
  },
21905
+ "parameters": [
21906
+ {
21907
+ "name": "previousName",
21908
+ "type": {
21909
+ "text": "string"
21910
+ }
21911
+ }
21912
+ ],
21905
21913
  "description": "Remove `this` from the radioButton registry and, if the group is empty, delete the entry from the groups Map",
21906
21914
  "inheritedFrom": {
21907
21915
  "name": "SbbFormAssociatedRadioButtonMixin",
@@ -23625,6 +23633,14 @@
23625
23633
  "text": "void"
23626
23634
  }
23627
23635
  },
23636
+ "parameters": [
23637
+ {
23638
+ "name": "previousName",
23639
+ "type": {
23640
+ "text": "string"
23641
+ }
23642
+ }
23643
+ ],
23628
23644
  "description": "Remove `this` from the radioButton registry and, if the group is empty, delete the entry from the groups Map",
23629
23645
  "inheritedFrom": {
23630
23646
  "name": "SbbFormAssociatedRadioButtonMixin",
@@ -75962,6 +75978,14 @@
75962
75978
  "text": "void"
75963
75979
  }
75964
75980
  },
75981
+ "parameters": [
75982
+ {
75983
+ "name": "previousName",
75984
+ "type": {
75985
+ "text": "string"
75986
+ }
75987
+ }
75988
+ ],
75965
75989
  "description": "Remove `this` from the radioButton registry and, if the group is empty, delete the entry from the groups Map"
75966
75990
  },
75967
75991
  {
@@ -78009,6 +78033,26 @@
78009
78033
  }
78010
78034
  ]
78011
78035
  },
78036
+ {
78037
+ "kind": "javascript-module",
78038
+ "path": "core/styles/styles.js",
78039
+ "declarations": [
78040
+ {
78041
+ "kind": "variable",
78042
+ "name": "boxSizingStyles"
78043
+ }
78044
+ ],
78045
+ "exports": [
78046
+ {
78047
+ "kind": "js",
78048
+ "name": "boxSizingStyles",
78049
+ "declaration": {
78050
+ "name": "boxSizingStyles",
78051
+ "module": "core/styles/styles.js"
78052
+ }
78053
+ }
78054
+ ]
78055
+ },
78012
78056
  {
78013
78057
  "kind": "javascript-module",
78014
78058
  "path": "core/testing/event-spy.js",
@@ -78406,26 +78450,6 @@
78406
78450
  }
78407
78451
  ]
78408
78452
  },
78409
- {
78410
- "kind": "javascript-module",
78411
- "path": "core/styles/styles.js",
78412
- "declarations": [
78413
- {
78414
- "kind": "variable",
78415
- "name": "boxSizingStyles"
78416
- }
78417
- ],
78418
- "exports": [
78419
- {
78420
- "kind": "js",
78421
- "name": "boxSizingStyles",
78422
- "declaration": {
78423
- "name": "boxSizingStyles",
78424
- "module": "core/styles/styles.js"
78425
- }
78426
- }
78427
- ]
78428
- },
78429
78453
  {
78430
78454
  "kind": "javascript-module",
78431
78455
  "path": "datepicker/common/datepicker-button.js",
@@ -106594,27 +106618,23 @@
106594
106618
  },
106595
106619
  {
106596
106620
  "kind": "javascript-module",
106597
- "path": "menu/menu-button/menu-button.component.js",
106621
+ "path": "menu/menu/menu.component.js",
106598
106622
  "declarations": [
106599
106623
  {
106600
106624
  "kind": "class",
106601
- "description": "It displays a button element that can be used in the `sbb-menu` component.",
106602
- "name": "SbbMenuButtonElement",
106625
+ "description": "It displays a contextual menu with one or more action element.",
106626
+ "name": "SbbMenuElement",
106603
106627
  "cssProperties": [
106604
106628
  {
106605
- "description": "Can be used to modify horizontal padding.",
106606
- "name": "--sbb-menu-action-outer-horizontal-padding",
106607
- "default": "var(--sbb-spacing-fixed-3x)"
106629
+ "description": "To specify a custom stack order, the `z-index` can be overridden by defining this CSS variable. The default `z-index` of the component is set to `var(--sbb-overlay-default-z-index)` with a value of `1000`.",
106630
+ "name": "--sbb-menu-z-index",
106631
+ "default": "var(--sbb-overlay-default-z-index)"
106608
106632
  }
106609
106633
  ],
106610
106634
  "slots": [
106611
106635
  {
106612
- "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
106636
+ "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
106613
106637
  "name": ""
106614
- },
106615
- {
106616
- "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
106617
- "name": "icon"
106618
106638
  }
106619
106639
  ],
106620
106640
  "members": [
@@ -106631,417 +106651,189 @@
106631
106651
  "name": "SbbElement",
106632
106652
  "module": "core/base-elements/element.js"
106633
106653
  },
106634
- "default": "'sbb-menu-button'"
106654
+ "default": "'sbb-menu'"
106635
106655
  },
106636
106656
  {
106637
106657
  "kind": "field",
106638
106658
  "name": "role",
106639
106659
  "type": {
106640
- "text": "ElementInternals['role']"
106660
+ "text": "string"
106641
106661
  },
106642
106662
  "privacy": "public",
106643
106663
  "static": true,
106644
106664
  "readonly": true,
106645
- "default": "'menuitem'",
106646
- "inheritedFrom": {
106647
- "name": "SbbButtonLikeBaseElement",
106648
- "module": "core/base-elements/button-base-element.js"
106649
- }
106665
+ "default": "'menu'"
106650
106666
  },
106651
106667
  {
106652
106668
  "kind": "field",
106653
- "name": "disabledInteractive",
106669
+ "name": "trigger",
106654
106670
  "type": {
106655
- "text": "boolean"
106671
+ "text": "HTMLElement | null"
106656
106672
  },
106657
106673
  "privacy": "public",
106658
- "default": "false",
106659
- "description": "Whether the button should be aria-disabled but stay interactive.",
106660
- "attribute": "disabled-interactive",
106661
- "reflects": true,
106662
- "inheritedFrom": {
106663
- "name": "SbbDisabledInteractiveMixin",
106664
- "module": "core/mixins/disabled-mixin.js"
106665
- }
106674
+ "default": "null",
106675
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
106676
+ "attribute": "trigger"
106666
106677
  },
106667
106678
  {
106668
106679
  "kind": "field",
106669
- "name": "disabled",
106670
- "privacy": "public",
106671
- "description": "Whether the component is disabled.",
106672
- "default": "false",
106680
+ "name": "_menu",
106673
106681
  "type": {
106674
- "text": "boolean"
106682
+ "text": "HTMLDivElement"
106675
106683
  },
106676
- "attribute": "disabled",
106677
- "reflects": true,
106678
- "inheritedFrom": {
106679
- "name": "SbbDisabledMixin",
106680
- "module": "core/mixins/disabled-mixin.js"
106681
- }
106684
+ "privacy": "private"
106682
106685
  },
106683
106686
  {
106684
106687
  "kind": "field",
106685
- "name": "#disabled",
106686
- "privacy": "private",
106688
+ "name": "_triggerElement",
106687
106689
  "type": {
106688
- "text": "boolean"
106689
- },
106690
- "default": "false",
106691
- "inheritedFrom": {
106692
- "name": "SbbDisabledMixin",
106693
- "module": "core/mixins/disabled-mixin.js"
106694
- }
106695
- },
106696
- {
106697
- "kind": "method",
106698
- "name": "isDisabledExternally",
106699
- "privacy": "protected",
106700
- "return": {
106701
- "type": {
106702
- "text": "boolean"
106703
- }
106690
+ "text": "HTMLElement | null"
106704
106691
  },
106705
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
106706
- "inheritedFrom": {
106707
- "name": "SbbDisabledMixin",
106708
- "module": "core/mixins/disabled-mixin.js"
106709
- }
106692
+ "privacy": "private",
106693
+ "default": "null"
106710
106694
  },
106711
106695
  {
106712
106696
  "kind": "field",
106713
- "name": "styles",
106697
+ "name": "_triggerAbortController",
106714
106698
  "type": {
106715
- "text": "CSSResultGroup"
106716
- },
106717
- "privacy": "public",
106718
- "static": true,
106719
- "default": "[boxSizingStyles, unsafeCSS(style)]",
106720
- "inheritedFrom": {
106721
- "name": "SbbMenuActionCommonElementMixin",
106722
- "module": "menu/common/menu-action-common.js"
106723
- }
106724
- },
106725
- {
106726
- "kind": "method",
106727
- "name": "renderTemplate",
106728
- "privacy": "protected",
106729
- "return": {
106730
- "type": {
106731
- "text": "TemplateResult"
106732
- }
106699
+ "text": "AbortController"
106733
106700
  },
106734
- "description": "Override this method to render the component template.",
106735
- "inheritedFrom": {
106736
- "name": "SbbActionBaseElement",
106737
- "module": "core/base-elements/action-base-element.js"
106738
- }
106701
+ "privacy": "private"
106739
106702
  },
106740
106703
  {
106741
106704
  "kind": "field",
106742
- "name": "iconName",
106705
+ "name": "_isPointerDownEventOnMenu",
106743
106706
  "type": {
106744
- "text": "string"
106745
- },
106746
- "privacy": "public",
106747
- "default": "''",
106748
- "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.",
106749
- "attribute": "icon-name",
106750
- "inheritedFrom": {
106751
- "name": "SbbIconNameMixin",
106752
- "module": "icon/icon-name-mixin.js"
106753
- }
106754
- },
106755
- {
106756
- "kind": "method",
106757
- "name": "renderIconSlot",
106758
- "privacy": "protected",
106759
- "return": {
106760
- "type": {
106761
- "text": "TemplateResult"
106762
- }
106763
- },
106764
- "parameters": [
106765
- {
106766
- "name": "classname",
106767
- "optional": true,
106768
- "type": {
106769
- "text": "string"
106770
- }
106771
- }
106772
- ],
106773
- "inheritedFrom": {
106774
- "name": "SbbIconNameMixin",
106775
- "module": "icon/icon-name-mixin.js"
106776
- }
106777
- },
106778
- {
106779
- "kind": "method",
106780
- "name": "renderIconName",
106781
- "privacy": "protected",
106782
- "return": {
106783
- "type": {
106784
- "text": "string"
106785
- }
106707
+ "text": "boolean"
106786
106708
  },
106787
- "inheritedFrom": {
106788
- "name": "SbbIconNameMixin",
106789
- "module": "icon/icon-name-mixin.js"
106790
- }
106791
- },
106792
- {
106793
- "kind": "method",
106794
- "name": "_renderIconName",
106795
106709
  "privacy": "private",
106796
- "return": {
106797
- "type": {
106798
- "text": "string"
106799
- }
106800
- },
106801
- "inheritedFrom": {
106802
- "name": "SbbIconNameMixin",
106803
- "module": "icon/icon-name-mixin.js"
106804
- }
106710
+ "default": "false"
106805
106711
  },
106806
106712
  {
106807
106713
  "kind": "field",
106808
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
106714
+ "name": "_windowEventsController",
106809
106715
  "type": {
106810
- "text": "array"
106716
+ "text": "AbortController"
106811
106717
  },
106812
- "privacy": "private",
106813
- "readonly": true,
106814
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
106815
- "inheritedFrom": {
106816
- "name": "SbbButtonBaseElement",
106817
- "module": "core/base-elements/button-base-element.js"
106818
- }
106718
+ "privacy": "private"
106819
106719
  },
106820
106720
  {
106821
106721
  "kind": "field",
106822
- "name": "value",
106823
- "type": {
106824
- "text": "string"
106825
- },
106826
- "privacy": "public",
106827
- "inheritedFrom": {
106828
- "name": "SbbButtonBaseElement",
106829
- "module": "core/base-elements/button-base-element.js"
106830
- },
106831
- "default": "''",
106832
- "description": "Value of the form element.",
106833
- "attribute": "value"
106722
+ "name": "_escapableOverlayController",
106723
+ "privacy": "private",
106724
+ "default": "new SbbEscapableOverlayController(this)"
106834
106725
  },
106835
106726
  {
106836
106727
  "kind": "field",
106837
- "name": "type",
106838
- "privacy": "public",
106839
- "description": "The type attribute to use for the button.",
106840
- "default": "'button'",
106841
- "type": {
106842
- "text": "SbbButtonType"
106843
- },
106844
- "attribute": "type",
106845
- "inheritedFrom": {
106846
- "name": "SbbButtonBaseElement",
106847
- "module": "core/base-elements/button-base-element.js"
106848
- }
106728
+ "name": "_focusTrapController",
106729
+ "privacy": "private",
106730
+ "default": "new SbbFocusTrapController(this)"
106849
106731
  },
106850
106732
  {
106851
106733
  "kind": "field",
106852
- "name": "form",
106853
- "type": {
106854
- "text": "HTMLFormElement | null"
106855
- },
106856
- "privacy": "public",
106857
- "description": "The `<form>` element to associate the button with.",
106858
- "inheritedFrom": {
106859
- "name": "SbbButtonBaseElement",
106860
- "module": "core/base-elements/button-base-element.js"
106861
- },
106862
- "attribute": "form"
106734
+ "name": "_scrollHandler",
106735
+ "privacy": "private",
106736
+ "default": "new SbbScrollHandler()"
106863
106737
  },
106864
106738
  {
106865
106739
  "kind": "field",
106866
- "name": "_formId",
106867
- "type": {
106868
- "text": "string"
106869
- },
106740
+ "name": "_inertController",
106870
106741
  "privacy": "private",
106871
- "default": "''",
106872
- "inheritedFrom": {
106873
- "name": "SbbButtonBaseElement",
106874
- "module": "core/base-elements/button-base-element.js"
106875
- }
106742
+ "default": "new SbbInertController(this)"
106876
106743
  },
106877
106744
  {
106878
106745
  "kind": "field",
106879
- "name": "_handleButtonClick",
106746
+ "name": "_mobileBreakpoint",
106880
106747
  "privacy": "private",
106881
- "inheritedFrom": {
106882
- "name": "SbbButtonBaseElement",
106883
- "module": "core/base-elements/button-base-element.js"
106884
- }
106748
+ "default": "SbbMediaQueryBreakpointSmallAndBelow"
106885
106749
  },
106886
106750
  {
106887
- "kind": "method",
106888
- "name": "_requestSubmit",
106751
+ "kind": "field",
106752
+ "name": "_mediaMatcher",
106889
106753
  "privacy": "private",
106890
- "return": {
106891
- "type": {
106892
- "text": "void"
106893
- }
106894
- },
106895
- "parameters": [
106896
- {
106897
- "name": "form",
106898
- "type": {
106899
- "text": "HTMLFormElement"
106900
- }
106901
- }
106902
- ],
106903
- "inheritedFrom": {
106904
- "name": "SbbButtonBaseElement",
106905
- "module": "core/base-elements/button-base-element.js"
106906
- }
106754
+ "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
106907
106755
  },
106908
106756
  {
106909
106757
  "kind": "field",
106910
- "name": "_formKeyDown",
106758
+ "name": "_darkModeController",
106911
106759
  "privacy": "private",
106912
- "inheritedFrom": {
106913
- "name": "SbbButtonBaseElement",
106914
- "module": "core/base-elements/button-base-element.js"
106915
- }
106760
+ "default": "new SbbDarkModeController(this, () => this._syncNegative())"
106916
106761
  },
106917
106762
  {
106918
106763
  "kind": "field",
106919
- "name": "formAssociated",
106920
- "type": {
106921
- "text": "boolean"
106922
- },
106923
- "privacy": "public",
106924
- "static": true,
106925
- "default": "true",
106926
- "inheritedFrom": {
106927
- "name": "SbbFormAssociatedMixin",
106928
- "module": "core/mixins/form-associated-mixin.js"
106929
- }
106764
+ "name": "_language",
106765
+ "privacy": "private",
106766
+ "default": "new SbbLanguageController(this)"
106930
106767
  },
106931
106768
  {
106932
106769
  "kind": "field",
106933
- "name": "name",
106934
- "privacy": "public",
106935
- "description": "Name of the form element. Will be read from name attribute.",
106770
+ "name": "_nestedMenu",
106936
106771
  "type": {
106937
- "text": "string"
106772
+ "text": "SbbMenuElement | null"
106938
106773
  },
106939
- "attribute": "name",
106940
- "inheritedFrom": {
106941
- "name": "SbbFormAssociatedMixin",
106942
- "module": "core/mixins/form-associated-mixin.js"
106943
- }
106774
+ "privacy": "private",
106775
+ "default": "null"
106944
106776
  },
106945
106777
  {
106946
- "kind": "field",
106947
- "name": "validity",
106948
- "type": {
106949
- "text": "ValidityState"
106950
- },
106778
+ "kind": "method",
106779
+ "name": "escapeStrategy",
106951
106780
  "privacy": "public",
106952
- "description": "Returns the ValidityState object for this element.",
106953
- "readonly": true,
106954
- "inheritedFrom": {
106955
- "name": "SbbFormAssociatedMixin",
106956
- "module": "core/mixins/form-associated-mixin.js"
106957
- }
106958
- },
106959
- {
106960
- "kind": "field",
106961
- "name": "validationMessage",
106962
- "type": {
106963
- "text": "string"
106781
+ "return": {
106782
+ "type": {
106783
+ "text": "void"
106784
+ }
106964
106785
  },
106965
- "privacy": "public",
106966
- "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.",
106967
- "readonly": true,
106786
+ "description": "The method which is called on escape key press. Defaults to calling close()",
106968
106787
  "inheritedFrom": {
106969
- "name": "SbbFormAssociatedMixin",
106970
- "module": "core/mixins/form-associated-mixin.js"
106788
+ "name": "SbbOpenCloseBaseElement",
106789
+ "module": "core/base-elements/open-close-base-element.js"
106971
106790
  }
106972
106791
  },
106973
106792
  {
106974
- "kind": "field",
106975
- "name": "willValidate",
106976
- "type": {
106977
- "text": "boolean"
106978
- },
106793
+ "kind": "method",
106794
+ "name": "open",
106979
106795
  "privacy": "public",
106980
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
106981
- "readonly": true,
106982
- "inheritedFrom": {
106983
- "name": "SbbFormAssociatedMixin",
106984
- "module": "core/mixins/form-associated-mixin.js"
106985
- }
106986
- },
106987
- {
106988
- "kind": "field",
106989
- "name": "_validityStates",
106990
- "privacy": "private",
106991
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
106992
- "inheritedFrom": {
106993
- "name": "SbbFormAssociatedMixin",
106994
- "module": "core/mixins/form-associated-mixin.js"
106995
- }
106996
- },
106997
- {
106998
- "kind": "field",
106999
- "name": "formDisabled",
107000
- "type": {
107001
- "text": "boolean"
106796
+ "return": {
106797
+ "type": {
106798
+ "text": "void"
106799
+ }
107002
106800
  },
107003
- "privacy": "protected",
107004
- "default": "false",
107005
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
106801
+ "description": "Opens the menu on trigger click.",
107006
106802
  "inheritedFrom": {
107007
- "name": "SbbFormAssociatedMixin",
107008
- "module": "core/mixins/form-associated-mixin.js"
106803
+ "name": "SbbOpenCloseBaseElement",
106804
+ "module": "core/base-elements/open-close-base-element.js"
107009
106805
  }
107010
106806
  },
107011
106807
  {
107012
106808
  "kind": "method",
107013
- "name": "checkValidity",
106809
+ "name": "close",
107014
106810
  "privacy": "public",
107015
106811
  "return": {
107016
106812
  "type": {
107017
- "text": "boolean"
106813
+ "text": "void"
107018
106814
  }
107019
106815
  },
107020
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
106816
+ "description": "Closes the menu and all its nested menus.",
107021
106817
  "inheritedFrom": {
107022
- "name": "SbbFormAssociatedMixin",
107023
- "module": "core/mixins/form-associated-mixin.js"
106818
+ "name": "SbbOpenCloseBaseElement",
106819
+ "module": "core/base-elements/open-close-base-element.js"
107024
106820
  }
107025
106821
  },
107026
106822
  {
107027
106823
  "kind": "method",
107028
- "name": "reportValidity",
106824
+ "name": "closeAll",
107029
106825
  "privacy": "public",
107030
106826
  "return": {
107031
106827
  "type": {
107032
- "text": "boolean"
106828
+ "text": "void"
107033
106829
  }
107034
106830
  },
107035
- "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.",
107036
- "inheritedFrom": {
107037
- "name": "SbbFormAssociatedMixin",
107038
- "module": "core/mixins/form-associated-mixin.js"
107039
- }
106831
+ "description": "Closes the menu and all related menus (nested and parent menus)."
107040
106832
  },
107041
106833
  {
107042
106834
  "kind": "method",
107043
- "name": "setCustomValidity",
107044
- "privacy": "public",
106835
+ "name": "_close",
106836
+ "privacy": "private",
107045
106837
  "return": {
107046
106838
  "type": {
107047
106839
  "text": "void"
@@ -107049,65 +106841,47 @@
107049
106841
  },
107050
106842
  "parameters": [
107051
106843
  {
107052
- "name": "message",
107053
- "type": {
107054
- "text": "string"
107055
- }
106844
+ "name": "closeAll",
106845
+ "default": "false",
106846
+ "description": "If true, it ensures animations are correct by toggling some states when closing all related menus at once.",
106847
+ "optional": true
107056
106848
  }
107057
- ],
107058
- "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.",
107059
- "inheritedFrom": {
107060
- "name": "SbbFormAssociatedMixin",
107061
- "module": "core/mixins/form-associated-mixin.js"
107062
- }
106849
+ ]
107063
106850
  },
107064
106851
  {
107065
106852
  "kind": "method",
107066
- "name": "_hasDisabledAncestor",
106853
+ "name": "_isZeroAnimationDuration",
107067
106854
  "privacy": "private",
107068
106855
  "return": {
107069
106856
  "type": {
107070
106857
  "text": "boolean"
107071
106858
  }
107072
- },
107073
- "inheritedFrom": {
107074
- "name": "SbbFormAssociatedMixin",
107075
- "module": "core/mixins/form-associated-mixin.js"
107076
106859
  }
107077
106860
  },
107078
106861
  {
107079
106862
  "kind": "method",
107080
- "name": "updateFormValue",
107081
- "privacy": "protected",
106863
+ "name": "_handleOpening",
106864
+ "privacy": "private",
107082
106865
  "return": {
107083
106866
  "type": {
107084
106867
  "text": "void"
107085
106868
  }
107086
- },
107087
- "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",
107088
- "inheritedFrom": {
107089
- "name": "SbbFormAssociatedMixin",
107090
- "module": "core/mixins/form-associated-mixin.js"
107091
106869
  }
107092
106870
  },
107093
106871
  {
107094
106872
  "kind": "method",
107095
- "name": "formState",
107096
- "privacy": "protected",
106873
+ "name": "_handleClosing",
106874
+ "privacy": "private",
107097
106875
  "return": {
107098
106876
  "type": {
107099
- "text": "FormRestoreState"
106877
+ "text": "void"
107100
106878
  }
107101
- },
107102
- "inheritedFrom": {
107103
- "name": "SbbFormAssociatedMixin",
107104
- "module": "core/mixins/form-associated-mixin.js"
107105
106879
  }
107106
106880
  },
107107
106881
  {
107108
106882
  "kind": "method",
107109
- "name": "setValidityFlag",
107110
- "privacy": "protected",
106883
+ "name": "_handleKeyDown",
106884
+ "privacy": "private",
107111
106885
  "return": {
107112
106886
  "type": {
107113
106887
  "text": "void"
@@ -107115,35 +106889,37 @@
107115
106889
  },
107116
106890
  "parameters": [
107117
106891
  {
107118
- "name": "flag",
106892
+ "name": "evt",
107119
106893
  "type": {
107120
- "text": "T"
107121
- }
107122
- },
107123
- {
107124
- "name": "message",
107125
- "type": {
107126
- "text": "string"
107127
- }
107128
- },
107129
- {
107130
- "name": "flagValue",
107131
- "optional": true,
107132
- "type": {
107133
- "text": "ValidityStateFlags[T]"
106894
+ "text": "KeyboardEvent"
107134
106895
  }
107135
106896
  }
107136
- ],
107137
- "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).",
107138
- "inheritedFrom": {
107139
- "name": "SbbFormAssociatedMixin",
107140
- "module": "core/mixins/form-associated-mixin.js"
106897
+ ]
106898
+ },
106899
+ {
106900
+ "kind": "method",
106901
+ "name": "_configureTrigger",
106902
+ "privacy": "private",
106903
+ "return": {
106904
+ "type": {
106905
+ "text": "void"
106906
+ }
107141
106907
  }
107142
106908
  },
107143
106909
  {
107144
106910
  "kind": "method",
107145
- "name": "removeValidityFlag",
107146
- "privacy": "protected",
106911
+ "name": "_attachWindowEvents",
106912
+ "privacy": "private",
106913
+ "return": {
106914
+ "type": {
106915
+ "text": "void"
106916
+ }
106917
+ }
106918
+ },
106919
+ {
106920
+ "kind": "method",
106921
+ "name": "_interactiveElementClick",
106922
+ "privacy": "private",
107147
106923
  "return": {
107148
106924
  "type": {
107149
106925
  "text": "void"
@@ -107151,158 +106927,250 @@
107151
106927
  },
107152
106928
  "parameters": [
107153
106929
  {
107154
- "name": "flag",
106930
+ "name": "event",
107155
106931
  "type": {
107156
- "text": "T"
106932
+ "text": "Event"
107157
106933
  }
107158
106934
  }
107159
- ],
107160
- "description": "Removes the validity state flag entry and updates validity state.",
107161
- "inheritedFrom": {
107162
- "name": "SbbFormAssociatedMixin",
107163
- "module": "core/mixins/form-associated-mixin.js"
107164
- }
106935
+ ]
106936
+ },
106937
+ {
106938
+ "kind": "field",
106939
+ "name": "_pointerDownListener",
106940
+ "privacy": "private"
106941
+ },
106942
+ {
106943
+ "kind": "field",
106944
+ "name": "_closeOnBackdropClick",
106945
+ "privacy": "private"
107165
106946
  },
107166
106947
  {
107167
106948
  "kind": "method",
107168
- "name": "validate",
107169
- "privacy": "protected",
106949
+ "name": "_nestedMenus",
106950
+ "privacy": "private",
107170
106951
  "return": {
107171
106952
  "type": {
107172
- "text": "void"
106953
+ "text": "SbbMenuElement[]"
107173
106954
  }
107174
106955
  },
107175
- "description": "To be called whenever the current element needs to be validated.",
107176
- "inheritedFrom": {
107177
- "name": "SbbFormAssociatedMixin",
107178
- "module": "core/mixins/form-associated-mixin.js"
106956
+ "description": "Converts the linked list into an array of SbbMenuElement."
106957
+ },
106958
+ {
106959
+ "kind": "method",
106960
+ "name": "_parentMenu",
106961
+ "privacy": "private",
106962
+ "return": {
106963
+ "type": {
106964
+ "text": "SbbMenuElement | null"
106965
+ }
107179
106966
  }
107180
106967
  },
107181
106968
  {
107182
106969
  "kind": "method",
107183
- "name": "shouldValidate",
107184
- "privacy": "protected",
106970
+ "name": "_mainMenu",
106971
+ "privacy": "private",
106972
+ "return": {
106973
+ "type": {
106974
+ "text": "SbbMenuElement"
106975
+ }
106976
+ },
106977
+ "description": "The outermost menu."
106978
+ },
106979
+ {
106980
+ "kind": "method",
106981
+ "name": "_isNested",
106982
+ "privacy": "private",
107185
106983
  "return": {
107186
106984
  "type": {
107187
106985
  "text": "boolean"
107188
106986
  }
106987
+ }
106988
+ },
106989
+ {
106990
+ "kind": "method",
106991
+ "name": "_updateNestedInert",
106992
+ "privacy": "private",
106993
+ "return": {
106994
+ "type": {
106995
+ "text": "void"
106996
+ }
106997
+ }
106998
+ },
106999
+ {
107000
+ "kind": "method",
107001
+ "name": "_handleMouseOver",
107002
+ "privacy": "private",
107003
+ "return": {
107004
+ "type": {
107005
+ "text": "void"
107006
+ }
107189
107007
  },
107190
107008
  "parameters": [
107191
107009
  {
107192
- "name": "name",
107010
+ "name": "event",
107193
107011
  "type": {
107194
- "text": "PropertyKey | undefined"
107012
+ "text": "MouseEvent"
107195
107013
  }
107196
107014
  }
107197
- ],
107198
- "description": "Whether validation should be run on a property change with the given name.",
107199
- "inheritedFrom": {
107200
- "name": "SbbFormAssociatedMixin",
107201
- "module": "core/mixins/form-associated-mixin.js"
107202
- }
107015
+ ]
107203
107016
  },
107204
107017
  {
107205
107018
  "kind": "method",
107206
- "name": "_setInternalValidity",
107019
+ "name": "_onMenuAnimationEnd",
107207
107020
  "privacy": "private",
107208
107021
  "return": {
107209
107022
  "type": {
107210
107023
  "text": "void"
107211
107024
  }
107212
107025
  },
107213
- "inheritedFrom": {
107214
- "name": "SbbFormAssociatedMixin",
107215
- "module": "core/mixins/form-associated-mixin.js"
107026
+ "parameters": [
107027
+ {
107028
+ "name": "event",
107029
+ "type": {
107030
+ "text": "AnimationEvent"
107031
+ }
107032
+ }
107033
+ ]
107034
+ },
107035
+ {
107036
+ "kind": "method",
107037
+ "name": "_setMenuPosition",
107038
+ "privacy": "private",
107039
+ "return": {
107040
+ "type": {
107041
+ "text": "void"
107042
+ }
107216
107043
  }
107217
107044
  },
107218
107045
  {
107219
- "kind": "field",
107220
- "name": "_preventScrollOnSpaceKeydown",
107046
+ "kind": "method",
107047
+ "name": "_syncNegative",
107221
107048
  "privacy": "private",
107222
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
107223
- "parameters": [
107224
- {
107225
- "description": "The origin event.",
107226
- "name": "event"
107049
+ "return": {
107050
+ "type": {
107051
+ "text": "void"
107227
107052
  }
107228
- ],
107229
- "inheritedFrom": {
107230
- "name": "SbbButtonLikeBaseElement",
107231
- "module": "core/base-elements/button-base-element.js"
107232
107053
  }
107233
107054
  },
107234
107055
  {
107235
- "kind": "field",
107236
- "name": "_removeActiveMarker",
107056
+ "kind": "method",
107057
+ "name": "_isMobile",
107237
107058
  "privacy": "private",
107059
+ "return": {
107060
+ "type": {
107061
+ "text": "boolean"
107062
+ }
107063
+ }
107064
+ },
107065
+ {
107066
+ "kind": "field",
107067
+ "name": "events",
107068
+ "privacy": "public",
107069
+ "static": true,
107070
+ "readonly": true,
107071
+ "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
107072
+ "type": {
107073
+ "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
107074
+ },
107238
107075
  "inheritedFrom": {
107239
- "name": "SbbButtonLikeBaseElement",
107240
- "module": "core/base-elements/button-base-element.js"
107076
+ "name": "SbbOpenCloseBaseElement",
107077
+ "module": "core/base-elements/open-close-base-element.js"
107241
107078
  }
107242
107079
  },
107243
107080
  {
107244
107081
  "kind": "field",
107245
- "name": "_dispatchClickEventOnSpaceKeyup",
107246
- "privacy": "private",
107247
- "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.",
107248
- "parameters": [
107249
- {
107250
- "description": "The origin event.",
107251
- "name": "event"
107252
- }
107253
- ],
107082
+ "name": "state",
107083
+ "privacy": "protected",
107084
+ "description": "The state of the component.",
107085
+ "type": {
107086
+ "text": "SbbOpenedClosedState"
107087
+ },
107088
+ "default": "'closed'",
107254
107089
  "inheritedFrom": {
107255
- "name": "SbbButtonLikeBaseElement",
107256
- "module": "core/base-elements/button-base-element.js"
107090
+ "name": "SbbOpenCloseBaseElement",
107091
+ "module": "core/base-elements/open-close-base-element.js"
107257
107092
  }
107258
107093
  },
107259
107094
  {
107260
107095
  "kind": "field",
107261
- "name": "_dispatchClickEvent",
107096
+ "name": "_state",
107097
+ "type": {
107098
+ "text": "SbbOpenedClosedState"
107099
+ },
107262
107100
  "privacy": "private",
107263
107101
  "inheritedFrom": {
107264
- "name": "SbbButtonLikeBaseElement",
107265
- "module": "core/base-elements/button-base-element.js"
107102
+ "name": "SbbOpenCloseBaseElement",
107103
+ "module": "core/base-elements/open-close-base-element.js"
107266
107104
  }
107267
107105
  },
107268
107106
  {
107269
107107
  "kind": "field",
107270
- "name": "maybeDisabled",
107108
+ "name": "isOpen",
107271
107109
  "type": {
107272
- "text": "boolean | undefined"
107110
+ "text": "boolean"
107273
107111
  },
107274
- "privacy": "protected",
107112
+ "privacy": "public",
107113
+ "description": "Whether the element is open.",
107275
107114
  "readonly": true,
107276
107115
  "inheritedFrom": {
107277
- "name": "SbbActionBaseElement",
107278
- "module": "core/base-elements/action-base-element.js"
107116
+ "name": "SbbOpenCloseBaseElement",
107117
+ "module": "core/base-elements/open-close-base-element.js"
107279
107118
  }
107280
107119
  },
107281
107120
  {
107282
- "kind": "field",
107283
- "name": "maybeDisabledInteractive",
107284
- "type": {
107285
- "text": "boolean | undefined"
107121
+ "kind": "method",
107122
+ "name": "dispatchBeforeOpenEvent",
107123
+ "privacy": "protected",
107124
+ "return": {
107125
+ "type": {
107126
+ "text": "boolean"
107127
+ }
107286
107128
  },
107129
+ "inheritedFrom": {
107130
+ "name": "SbbOpenCloseBaseElement",
107131
+ "module": "core/base-elements/open-close-base-element.js"
107132
+ }
107133
+ },
107134
+ {
107135
+ "kind": "method",
107136
+ "name": "dispatchOpenEvent",
107287
107137
  "privacy": "protected",
107288
- "readonly": true,
107138
+ "return": {
107139
+ "type": {
107140
+ "text": "boolean"
107141
+ }
107142
+ },
107289
107143
  "inheritedFrom": {
107290
- "name": "SbbActionBaseElement",
107291
- "module": "core/base-elements/action-base-element.js"
107144
+ "name": "SbbOpenCloseBaseElement",
107145
+ "module": "core/base-elements/open-close-base-element.js"
107292
107146
  }
107293
107147
  },
107294
107148
  {
107295
107149
  "kind": "method",
107296
- "name": "setupBaseEventHandlers",
107150
+ "name": "dispatchBeforeCloseEvent",
107297
107151
  "privacy": "protected",
107298
107152
  "return": {
107299
107153
  "type": {
107300
- "text": "void"
107154
+ "text": "boolean"
107301
107155
  }
107302
107156
  },
107303
107157
  "inheritedFrom": {
107304
- "name": "SbbActionBaseElement",
107305
- "module": "core/base-elements/action-base-element.js"
107158
+ "name": "SbbOpenCloseBaseElement",
107159
+ "module": "core/base-elements/open-close-base-element.js"
107160
+ }
107161
+ },
107162
+ {
107163
+ "kind": "method",
107164
+ "name": "dispatchCloseEvent",
107165
+ "privacy": "protected",
107166
+ "return": {
107167
+ "type": {
107168
+ "text": "boolean"
107169
+ }
107170
+ },
107171
+ "inheritedFrom": {
107172
+ "name": "SbbOpenCloseBaseElement",
107173
+ "module": "core/base-elements/open-close-base-element.js"
107306
107174
  }
107307
107175
  },
107308
107176
  {
@@ -107411,110 +107279,66 @@
107411
107279
  }
107412
107280
  }
107413
107281
  ],
107414
- "mixins": [
107415
- {
107416
- "name": "SbbDisabledTabIndexActionMixin",
107417
- "module": "core/mixins.js"
107418
- },
107282
+ "attributes": [
107419
107283
  {
107420
- "name": "SbbMenuActionCommonElementMixin",
107421
- "module": "menu/common/menu-action-common.js"
107284
+ "name": "trigger",
107285
+ "type": {
107286
+ "text": "HTMLElement | null"
107287
+ },
107288
+ "default": "null",
107289
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
107290
+ "fieldName": "trigger"
107422
107291
  }
107423
107292
  ],
107424
107293
  "superclass": {
107425
- "name": "SbbButtonBaseElement",
107294
+ "name": "SbbOpenCloseBaseElement",
107426
107295
  "module": "core/base-elements.js"
107427
107296
  },
107428
- "tagName": "sbb-menu-button",
107297
+ "tagName": "sbb-menu",
107429
107298
  "customElement": true,
107430
- "attributes": [
107431
- {
107432
- "name": "disabled-interactive",
107433
- "type": {
107434
- "text": "boolean"
107435
- },
107436
- "default": "false",
107437
- "description": "Whether the button should be aria-disabled but stay interactive.",
107438
- "fieldName": "disabledInteractive",
107439
- "inheritedFrom": {
107440
- "name": "SbbDisabledInteractiveMixin",
107441
- "module": "core/mixins/disabled-mixin.js"
107442
- }
107443
- },
107444
- {
107445
- "name": "disabled",
107446
- "description": "Whether the component is disabled.",
107447
- "default": "false",
107448
- "type": {
107449
- "text": "boolean"
107450
- },
107451
- "fieldName": "disabled",
107452
- "inheritedFrom": {
107453
- "name": "SbbDisabledMixin",
107454
- "module": "core/mixins/disabled-mixin.js"
107455
- }
107456
- },
107457
- {
107458
- "name": "icon-name",
107459
- "type": {
107460
- "text": "string"
107461
- },
107462
- "default": "''",
107463
- "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.",
107464
- "fieldName": "iconName",
107465
- "inheritedFrom": {
107466
- "name": "SbbIconNameMixin",
107467
- "module": "icon/icon-name-mixin.js"
107468
- }
107469
- },
107299
+ "events": [
107470
107300
  {
107471
- "name": "value",
107301
+ "name": "beforeopen",
107472
107302
  "type": {
107473
- "text": "string"
107303
+ "text": "Event"
107474
107304
  },
107475
- "default": "''",
107476
- "description": "Value of the form element.",
107477
- "fieldName": "value",
107305
+ "description": "Emits whenever the component starts the opening transition. Can be canceled.",
107478
107306
  "inheritedFrom": {
107479
- "name": "SbbButtonBaseElement",
107480
- "module": "core/base-elements/button-base-element.js"
107307
+ "name": "SbbOpenCloseBaseElement",
107308
+ "module": "core/base-elements/open-close-base-element.js"
107481
107309
  }
107482
107310
  },
107483
107311
  {
107484
- "name": "type",
107485
- "description": "The type attribute to use for the button.",
107486
- "default": "'button'",
107312
+ "name": "open",
107487
107313
  "type": {
107488
- "text": "SbbButtonType"
107314
+ "text": "Event"
107489
107315
  },
107490
- "fieldName": "type",
107316
+ "description": "Emits whenever the component is opened.",
107491
107317
  "inheritedFrom": {
107492
- "name": "SbbButtonBaseElement",
107493
- "module": "core/base-elements/button-base-element.js"
107318
+ "name": "SbbOpenCloseBaseElement",
107319
+ "module": "core/base-elements/open-close-base-element.js"
107494
107320
  }
107495
107321
  },
107496
107322
  {
107497
- "name": "form",
107498
- "description": "The `<form>` element to associate the button with.",
107323
+ "name": "beforeclose",
107499
107324
  "type": {
107500
- "text": "HTMLFormElement | null"
107325
+ "text": "Event"
107501
107326
  },
107502
- "fieldName": "form",
107327
+ "description": "Emits whenever the component begins the closing transition. Can be canceled.",
107503
107328
  "inheritedFrom": {
107504
- "name": "SbbButtonBaseElement",
107505
- "module": "core/base-elements/button-base-element.js"
107329
+ "name": "SbbOpenCloseBaseElement",
107330
+ "module": "core/base-elements/open-close-base-element.js"
107506
107331
  }
107507
107332
  },
107508
107333
  {
107509
- "name": "name",
107510
- "description": "Name of the form element. Will be read from name attribute.",
107334
+ "name": "close",
107511
107335
  "type": {
107512
- "text": "string"
107336
+ "text": "Event"
107513
107337
  },
107514
- "fieldName": "name",
107338
+ "description": "Emits whenever the component is closed.",
107515
107339
  "inheritedFrom": {
107516
- "name": "SbbFormAssociatedMixin",
107517
- "module": "core/mixins/form-associated-mixin.js"
107340
+ "name": "SbbOpenCloseBaseElement",
107341
+ "module": "core/base-elements/open-close-base-element.js"
107518
107342
  }
107519
107343
  }
107520
107344
  ]
@@ -107523,33 +107347,37 @@
107523
107347
  "exports": [
107524
107348
  {
107525
107349
  "kind": "js",
107526
- "name": "SbbMenuButtonElement",
107350
+ "name": "SbbMenuElement",
107527
107351
  "declaration": {
107528
- "name": "SbbMenuButtonElement",
107529
- "module": "menu/menu-button/menu-button.component.js"
107352
+ "name": "SbbMenuElement",
107353
+ "module": "menu/menu/menu.component.js"
107530
107354
  }
107531
107355
  }
107532
107356
  ]
107533
107357
  },
107534
107358
  {
107535
107359
  "kind": "javascript-module",
107536
- "path": "menu/menu/menu.component.js",
107360
+ "path": "menu/menu-button/menu-button.component.js",
107537
107361
  "declarations": [
107538
107362
  {
107539
107363
  "kind": "class",
107540
- "description": "It displays a contextual menu with one or more action element.",
107541
- "name": "SbbMenuElement",
107364
+ "description": "It displays a button element that can be used in the `sbb-menu` component.",
107365
+ "name": "SbbMenuButtonElement",
107542
107366
  "cssProperties": [
107543
107367
  {
107544
- "description": "To specify a custom stack order, the `z-index` can be overridden by defining this CSS variable. The default `z-index` of the component is set to `var(--sbb-overlay-default-z-index)` with a value of `1000`.",
107545
- "name": "--sbb-menu-z-index",
107546
- "default": "var(--sbb-overlay-default-z-index)"
107368
+ "description": "Can be used to modify horizontal padding.",
107369
+ "name": "--sbb-menu-action-outer-horizontal-padding",
107370
+ "default": "var(--sbb-spacing-fixed-3x)"
107547
107371
  }
107548
107372
  ],
107549
107373
  "slots": [
107550
107374
  {
107551
- "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
107375
+ "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
107552
107376
  "name": ""
107377
+ },
107378
+ {
107379
+ "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
107380
+ "name": "icon"
107553
107381
  }
107554
107382
  ],
107555
107383
  "members": [
@@ -107566,236 +107394,261 @@
107566
107394
  "name": "SbbElement",
107567
107395
  "module": "core/base-elements/element.js"
107568
107396
  },
107569
- "default": "'sbb-menu'"
107397
+ "default": "'sbb-menu-button'"
107570
107398
  },
107571
107399
  {
107572
107400
  "kind": "field",
107573
107401
  "name": "role",
107574
107402
  "type": {
107575
- "text": "string"
107403
+ "text": "ElementInternals['role']"
107576
107404
  },
107577
107405
  "privacy": "public",
107578
107406
  "static": true,
107579
107407
  "readonly": true,
107580
- "default": "'menu'"
107408
+ "default": "'menuitem'",
107409
+ "inheritedFrom": {
107410
+ "name": "SbbButtonLikeBaseElement",
107411
+ "module": "core/base-elements/button-base-element.js"
107412
+ }
107581
107413
  },
107582
107414
  {
107583
107415
  "kind": "field",
107584
- "name": "trigger",
107416
+ "name": "disabledInteractive",
107585
107417
  "type": {
107586
- "text": "HTMLElement | null"
107418
+ "text": "boolean"
107587
107419
  },
107588
107420
  "privacy": "public",
107589
- "default": "null",
107590
- "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
107591
- "attribute": "trigger"
107421
+ "default": "false",
107422
+ "description": "Whether the button should be aria-disabled but stay interactive.",
107423
+ "attribute": "disabled-interactive",
107424
+ "reflects": true,
107425
+ "inheritedFrom": {
107426
+ "name": "SbbDisabledInteractiveMixin",
107427
+ "module": "core/mixins/disabled-mixin.js"
107428
+ }
107592
107429
  },
107593
107430
  {
107594
107431
  "kind": "field",
107595
- "name": "_menu",
107432
+ "name": "disabled",
107433
+ "privacy": "public",
107434
+ "description": "Whether the component is disabled.",
107435
+ "default": "false",
107596
107436
  "type": {
107597
- "text": "HTMLDivElement"
107437
+ "text": "boolean"
107598
107438
  },
107599
- "privacy": "private"
107439
+ "attribute": "disabled",
107440
+ "reflects": true,
107441
+ "inheritedFrom": {
107442
+ "name": "SbbDisabledMixin",
107443
+ "module": "core/mixins/disabled-mixin.js"
107444
+ }
107600
107445
  },
107601
107446
  {
107602
107447
  "kind": "field",
107603
- "name": "_triggerElement",
107448
+ "name": "#disabled",
107449
+ "privacy": "private",
107604
107450
  "type": {
107605
- "text": "HTMLElement | null"
107451
+ "text": "boolean"
107606
107452
  },
107607
- "privacy": "private",
107608
- "default": "null"
107453
+ "default": "false",
107454
+ "inheritedFrom": {
107455
+ "name": "SbbDisabledMixin",
107456
+ "module": "core/mixins/disabled-mixin.js"
107457
+ }
107609
107458
  },
107610
107459
  {
107611
- "kind": "field",
107612
- "name": "_triggerAbortController",
107613
- "type": {
107614
- "text": "AbortController"
107460
+ "kind": "method",
107461
+ "name": "isDisabledExternally",
107462
+ "privacy": "protected",
107463
+ "return": {
107464
+ "type": {
107465
+ "text": "boolean"
107466
+ }
107615
107467
  },
107616
- "privacy": "private"
107468
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
107469
+ "inheritedFrom": {
107470
+ "name": "SbbDisabledMixin",
107471
+ "module": "core/mixins/disabled-mixin.js"
107472
+ }
107617
107473
  },
107618
107474
  {
107619
107475
  "kind": "field",
107620
- "name": "_isPointerDownEventOnMenu",
107476
+ "name": "styles",
107621
107477
  "type": {
107622
- "text": "boolean"
107478
+ "text": "CSSResultGroup"
107623
107479
  },
107624
- "privacy": "private",
107625
- "default": "false"
107480
+ "privacy": "public",
107481
+ "static": true,
107482
+ "default": "[boxSizingStyles, unsafeCSS(style)]",
107483
+ "inheritedFrom": {
107484
+ "name": "SbbMenuActionCommonElementMixin",
107485
+ "module": "menu/common/menu-action-common.js"
107486
+ }
107626
107487
  },
107627
107488
  {
107628
- "kind": "field",
107629
- "name": "_windowEventsController",
107630
- "type": {
107631
- "text": "AbortController"
107489
+ "kind": "method",
107490
+ "name": "renderTemplate",
107491
+ "privacy": "protected",
107492
+ "return": {
107493
+ "type": {
107494
+ "text": "TemplateResult"
107495
+ }
107632
107496
  },
107633
- "privacy": "private"
107497
+ "description": "Override this method to render the component template.",
107498
+ "inheritedFrom": {
107499
+ "name": "SbbActionBaseElement",
107500
+ "module": "core/base-elements/action-base-element.js"
107501
+ }
107634
107502
  },
107635
107503
  {
107636
107504
  "kind": "field",
107637
- "name": "_escapableOverlayController",
107638
- "privacy": "private",
107639
- "default": "new SbbEscapableOverlayController(this)"
107640
- },
107641
- {
107642
- "kind": "field",
107643
- "name": "_focusTrapController",
107644
- "privacy": "private",
107645
- "default": "new SbbFocusTrapController(this)"
107646
- },
107647
- {
107648
- "kind": "field",
107649
- "name": "_scrollHandler",
107650
- "privacy": "private",
107651
- "default": "new SbbScrollHandler()"
107652
- },
107653
- {
107654
- "kind": "field",
107655
- "name": "_inertController",
107656
- "privacy": "private",
107657
- "default": "new SbbInertController(this)"
107658
- },
107659
- {
107660
- "kind": "field",
107661
- "name": "_mobileBreakpoint",
107662
- "privacy": "private",
107663
- "default": "SbbMediaQueryBreakpointSmallAndBelow"
107664
- },
107665
- {
107666
- "kind": "field",
107667
- "name": "_mediaMatcher",
107668
- "privacy": "private",
107669
- "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
107670
- },
107671
- {
107672
- "kind": "field",
107673
- "name": "_darkModeController",
107674
- "privacy": "private",
107675
- "default": "new SbbDarkModeController(this, () => this._syncNegative())"
107676
- },
107677
- {
107678
- "kind": "field",
107679
- "name": "_language",
107680
- "privacy": "private",
107681
- "default": "new SbbLanguageController(this)"
107682
- },
107683
- {
107684
- "kind": "field",
107685
- "name": "_nestedMenu",
107505
+ "name": "iconName",
107686
107506
  "type": {
107687
- "text": "SbbMenuElement | null"
107507
+ "text": "string"
107688
107508
  },
107689
- "privacy": "private",
107690
- "default": "null"
107509
+ "privacy": "public",
107510
+ "default": "''",
107511
+ "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.",
107512
+ "attribute": "icon-name",
107513
+ "inheritedFrom": {
107514
+ "name": "SbbIconNameMixin",
107515
+ "module": "icon/icon-name-mixin.js"
107516
+ }
107691
107517
  },
107692
107518
  {
107693
107519
  "kind": "method",
107694
- "name": "escapeStrategy",
107695
- "privacy": "public",
107520
+ "name": "renderIconSlot",
107521
+ "privacy": "protected",
107696
107522
  "return": {
107697
107523
  "type": {
107698
- "text": "void"
107524
+ "text": "TemplateResult"
107699
107525
  }
107700
107526
  },
107701
- "description": "The method which is called on escape key press. Defaults to calling close()",
107527
+ "parameters": [
107528
+ {
107529
+ "name": "classname",
107530
+ "optional": true,
107531
+ "type": {
107532
+ "text": "string"
107533
+ }
107534
+ }
107535
+ ],
107702
107536
  "inheritedFrom": {
107703
- "name": "SbbOpenCloseBaseElement",
107704
- "module": "core/base-elements/open-close-base-element.js"
107537
+ "name": "SbbIconNameMixin",
107538
+ "module": "icon/icon-name-mixin.js"
107705
107539
  }
107706
107540
  },
107707
107541
  {
107708
107542
  "kind": "method",
107709
- "name": "open",
107710
- "privacy": "public",
107543
+ "name": "renderIconName",
107544
+ "privacy": "protected",
107711
107545
  "return": {
107712
107546
  "type": {
107713
- "text": "void"
107547
+ "text": "string"
107714
107548
  }
107715
107549
  },
107716
- "description": "Opens the menu on trigger click.",
107717
107550
  "inheritedFrom": {
107718
- "name": "SbbOpenCloseBaseElement",
107719
- "module": "core/base-elements/open-close-base-element.js"
107551
+ "name": "SbbIconNameMixin",
107552
+ "module": "icon/icon-name-mixin.js"
107720
107553
  }
107721
107554
  },
107722
107555
  {
107723
107556
  "kind": "method",
107724
- "name": "close",
107725
- "privacy": "public",
107557
+ "name": "_renderIconName",
107558
+ "privacy": "private",
107726
107559
  "return": {
107727
107560
  "type": {
107728
- "text": "void"
107561
+ "text": "string"
107729
107562
  }
107730
107563
  },
107731
- "description": "Closes the menu and all its nested menus.",
107732
107564
  "inheritedFrom": {
107733
- "name": "SbbOpenCloseBaseElement",
107734
- "module": "core/base-elements/open-close-base-element.js"
107565
+ "name": "SbbIconNameMixin",
107566
+ "module": "icon/icon-name-mixin.js"
107735
107567
  }
107736
107568
  },
107737
107569
  {
107738
- "kind": "method",
107739
- "name": "closeAll",
107740
- "privacy": "public",
107741
- "return": {
107742
- "type": {
107743
- "text": "void"
107744
- }
107570
+ "kind": "field",
107571
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
107572
+ "type": {
107573
+ "text": "array"
107745
107574
  },
107746
- "description": "Closes the menu and all related menus (nested and parent menus)."
107575
+ "privacy": "private",
107576
+ "readonly": true,
107577
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
107578
+ "inheritedFrom": {
107579
+ "name": "SbbButtonBaseElement",
107580
+ "module": "core/base-elements/button-base-element.js"
107581
+ }
107747
107582
  },
107748
107583
  {
107749
- "kind": "method",
107750
- "name": "_close",
107751
- "privacy": "private",
107752
- "return": {
107753
- "type": {
107754
- "text": "void"
107755
- }
107584
+ "kind": "field",
107585
+ "name": "value",
107586
+ "type": {
107587
+ "text": "string"
107756
107588
  },
107757
- "parameters": [
107758
- {
107759
- "name": "closeAll",
107760
- "default": "false",
107761
- "description": "If true, it ensures animations are correct by toggling some states when closing all related menus at once.",
107762
- "optional": true
107763
- }
107764
- ]
107589
+ "privacy": "public",
107590
+ "inheritedFrom": {
107591
+ "name": "SbbButtonBaseElement",
107592
+ "module": "core/base-elements/button-base-element.js"
107593
+ },
107594
+ "default": "''",
107595
+ "description": "Value of the form element.",
107596
+ "attribute": "value"
107765
107597
  },
107766
107598
  {
107767
- "kind": "method",
107768
- "name": "_isZeroAnimationDuration",
107769
- "privacy": "private",
107770
- "return": {
107771
- "type": {
107772
- "text": "boolean"
107773
- }
107599
+ "kind": "field",
107600
+ "name": "type",
107601
+ "privacy": "public",
107602
+ "description": "The type attribute to use for the button.",
107603
+ "default": "'button'",
107604
+ "type": {
107605
+ "text": "SbbButtonType"
107606
+ },
107607
+ "attribute": "type",
107608
+ "inheritedFrom": {
107609
+ "name": "SbbButtonBaseElement",
107610
+ "module": "core/base-elements/button-base-element.js"
107774
107611
  }
107775
107612
  },
107776
107613
  {
107777
- "kind": "method",
107778
- "name": "_handleOpening",
107614
+ "kind": "field",
107615
+ "name": "form",
107616
+ "type": {
107617
+ "text": "HTMLFormElement | null"
107618
+ },
107619
+ "privacy": "public",
107620
+ "description": "The `<form>` element to associate the button with.",
107621
+ "inheritedFrom": {
107622
+ "name": "SbbButtonBaseElement",
107623
+ "module": "core/base-elements/button-base-element.js"
107624
+ },
107625
+ "attribute": "form"
107626
+ },
107627
+ {
107628
+ "kind": "field",
107629
+ "name": "_formId",
107630
+ "type": {
107631
+ "text": "string"
107632
+ },
107779
107633
  "privacy": "private",
107780
- "return": {
107781
- "type": {
107782
- "text": "void"
107783
- }
107634
+ "default": "''",
107635
+ "inheritedFrom": {
107636
+ "name": "SbbButtonBaseElement",
107637
+ "module": "core/base-elements/button-base-element.js"
107784
107638
  }
107785
107639
  },
107786
107640
  {
107787
- "kind": "method",
107788
- "name": "_handleClosing",
107641
+ "kind": "field",
107642
+ "name": "_handleButtonClick",
107789
107643
  "privacy": "private",
107790
- "return": {
107791
- "type": {
107792
- "text": "void"
107793
- }
107644
+ "inheritedFrom": {
107645
+ "name": "SbbButtonBaseElement",
107646
+ "module": "core/base-elements/button-base-element.js"
107794
107647
  }
107795
107648
  },
107796
107649
  {
107797
107650
  "kind": "method",
107798
- "name": "_handleKeyDown",
107651
+ "name": "_requestSubmit",
107799
107652
  "privacy": "private",
107800
107653
  "return": {
107801
107654
  "type": {
@@ -107804,117 +107657,220 @@
107804
107657
  },
107805
107658
  "parameters": [
107806
107659
  {
107807
- "name": "evt",
107660
+ "name": "form",
107808
107661
  "type": {
107809
- "text": "KeyboardEvent"
107662
+ "text": "HTMLFormElement"
107810
107663
  }
107811
107664
  }
107812
- ]
107665
+ ],
107666
+ "inheritedFrom": {
107667
+ "name": "SbbButtonBaseElement",
107668
+ "module": "core/base-elements/button-base-element.js"
107669
+ }
107813
107670
  },
107814
107671
  {
107815
- "kind": "method",
107816
- "name": "_configureTrigger",
107672
+ "kind": "field",
107673
+ "name": "_formKeyDown",
107817
107674
  "privacy": "private",
107818
- "return": {
107819
- "type": {
107820
- "text": "void"
107821
- }
107675
+ "inheritedFrom": {
107676
+ "name": "SbbButtonBaseElement",
107677
+ "module": "core/base-elements/button-base-element.js"
107822
107678
  }
107823
107679
  },
107824
107680
  {
107825
- "kind": "method",
107826
- "name": "_attachWindowEvents",
107827
- "privacy": "private",
107828
- "return": {
107829
- "type": {
107830
- "text": "void"
107831
- }
107681
+ "kind": "field",
107682
+ "name": "formAssociated",
107683
+ "type": {
107684
+ "text": "boolean"
107685
+ },
107686
+ "privacy": "public",
107687
+ "static": true,
107688
+ "default": "true",
107689
+ "inheritedFrom": {
107690
+ "name": "SbbFormAssociatedMixin",
107691
+ "module": "core/mixins/form-associated-mixin.js"
107832
107692
  }
107833
107693
  },
107834
107694
  {
107835
- "kind": "method",
107836
- "name": "_interactiveElementClick",
107837
- "privacy": "private",
107838
- "return": {
107839
- "type": {
107840
- "text": "void"
107841
- }
107695
+ "kind": "field",
107696
+ "name": "name",
107697
+ "privacy": "public",
107698
+ "description": "Name of the form element. Will be read from name attribute.",
107699
+ "type": {
107700
+ "text": "string"
107842
107701
  },
107843
- "parameters": [
107844
- {
107845
- "name": "event",
107846
- "type": {
107847
- "text": "Event"
107848
- }
107849
- }
107850
- ]
107702
+ "attribute": "name",
107703
+ "inheritedFrom": {
107704
+ "name": "SbbFormAssociatedMixin",
107705
+ "module": "core/mixins/form-associated-mixin.js"
107706
+ }
107851
107707
  },
107852
107708
  {
107853
107709
  "kind": "field",
107854
- "name": "_pointerDownListener",
107855
- "privacy": "private"
107710
+ "name": "validity",
107711
+ "type": {
107712
+ "text": "ValidityState"
107713
+ },
107714
+ "privacy": "public",
107715
+ "description": "Returns the ValidityState object for this element.",
107716
+ "readonly": true,
107717
+ "inheritedFrom": {
107718
+ "name": "SbbFormAssociatedMixin",
107719
+ "module": "core/mixins/form-associated-mixin.js"
107720
+ }
107856
107721
  },
107857
107722
  {
107858
107723
  "kind": "field",
107859
- "name": "_closeOnBackdropClick",
107860
- "privacy": "private"
107724
+ "name": "validationMessage",
107725
+ "type": {
107726
+ "text": "string"
107727
+ },
107728
+ "privacy": "public",
107729
+ "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.",
107730
+ "readonly": true,
107731
+ "inheritedFrom": {
107732
+ "name": "SbbFormAssociatedMixin",
107733
+ "module": "core/mixins/form-associated-mixin.js"
107734
+ }
107861
107735
  },
107862
107736
  {
107863
- "kind": "method",
107864
- "name": "_nestedMenus",
107737
+ "kind": "field",
107738
+ "name": "willValidate",
107739
+ "type": {
107740
+ "text": "boolean"
107741
+ },
107742
+ "privacy": "public",
107743
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
107744
+ "readonly": true,
107745
+ "inheritedFrom": {
107746
+ "name": "SbbFormAssociatedMixin",
107747
+ "module": "core/mixins/form-associated-mixin.js"
107748
+ }
107749
+ },
107750
+ {
107751
+ "kind": "field",
107752
+ "name": "_validityStates",
107865
107753
  "privacy": "private",
107754
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
107755
+ "inheritedFrom": {
107756
+ "name": "SbbFormAssociatedMixin",
107757
+ "module": "core/mixins/form-associated-mixin.js"
107758
+ }
107759
+ },
107760
+ {
107761
+ "kind": "field",
107762
+ "name": "formDisabled",
107763
+ "type": {
107764
+ "text": "boolean"
107765
+ },
107766
+ "privacy": "protected",
107767
+ "default": "false",
107768
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
107769
+ "inheritedFrom": {
107770
+ "name": "SbbFormAssociatedMixin",
107771
+ "module": "core/mixins/form-associated-mixin.js"
107772
+ }
107773
+ },
107774
+ {
107775
+ "kind": "method",
107776
+ "name": "checkValidity",
107777
+ "privacy": "public",
107866
107778
  "return": {
107867
107779
  "type": {
107868
- "text": "SbbMenuElement[]"
107780
+ "text": "boolean"
107869
107781
  }
107870
107782
  },
107871
- "description": "Converts the linked list into an array of SbbMenuElement."
107783
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
107784
+ "inheritedFrom": {
107785
+ "name": "SbbFormAssociatedMixin",
107786
+ "module": "core/mixins/form-associated-mixin.js"
107787
+ }
107872
107788
  },
107873
107789
  {
107874
107790
  "kind": "method",
107875
- "name": "_parentMenu",
107876
- "privacy": "private",
107791
+ "name": "reportValidity",
107792
+ "privacy": "public",
107877
107793
  "return": {
107878
107794
  "type": {
107879
- "text": "SbbMenuElement | null"
107795
+ "text": "boolean"
107880
107796
  }
107797
+ },
107798
+ "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.",
107799
+ "inheritedFrom": {
107800
+ "name": "SbbFormAssociatedMixin",
107801
+ "module": "core/mixins/form-associated-mixin.js"
107881
107802
  }
107882
107803
  },
107883
107804
  {
107884
107805
  "kind": "method",
107885
- "name": "_mainMenu",
107886
- "privacy": "private",
107806
+ "name": "setCustomValidity",
107807
+ "privacy": "public",
107887
107808
  "return": {
107888
107809
  "type": {
107889
- "text": "SbbMenuElement"
107810
+ "text": "void"
107890
107811
  }
107891
107812
  },
107892
- "description": "The outermost menu."
107813
+ "parameters": [
107814
+ {
107815
+ "name": "message",
107816
+ "type": {
107817
+ "text": "string"
107818
+ }
107819
+ }
107820
+ ],
107821
+ "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.",
107822
+ "inheritedFrom": {
107823
+ "name": "SbbFormAssociatedMixin",
107824
+ "module": "core/mixins/form-associated-mixin.js"
107825
+ }
107893
107826
  },
107894
107827
  {
107895
107828
  "kind": "method",
107896
- "name": "_isNested",
107829
+ "name": "_hasDisabledAncestor",
107897
107830
  "privacy": "private",
107898
107831
  "return": {
107899
107832
  "type": {
107900
107833
  "text": "boolean"
107901
107834
  }
107835
+ },
107836
+ "inheritedFrom": {
107837
+ "name": "SbbFormAssociatedMixin",
107838
+ "module": "core/mixins/form-associated-mixin.js"
107902
107839
  }
107903
107840
  },
107904
107841
  {
107905
107842
  "kind": "method",
107906
- "name": "_updateNestedInert",
107907
- "privacy": "private",
107843
+ "name": "updateFormValue",
107844
+ "privacy": "protected",
107908
107845
  "return": {
107909
107846
  "type": {
107910
107847
  "text": "void"
107911
107848
  }
107849
+ },
107850
+ "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",
107851
+ "inheritedFrom": {
107852
+ "name": "SbbFormAssociatedMixin",
107853
+ "module": "core/mixins/form-associated-mixin.js"
107912
107854
  }
107913
107855
  },
107914
107856
  {
107915
107857
  "kind": "method",
107916
- "name": "_handleMouseOver",
107917
- "privacy": "private",
107858
+ "name": "formState",
107859
+ "privacy": "protected",
107860
+ "return": {
107861
+ "type": {
107862
+ "text": "FormRestoreState"
107863
+ }
107864
+ },
107865
+ "inheritedFrom": {
107866
+ "name": "SbbFormAssociatedMixin",
107867
+ "module": "core/mixins/form-associated-mixin.js"
107868
+ }
107869
+ },
107870
+ {
107871
+ "kind": "method",
107872
+ "name": "setValidityFlag",
107873
+ "privacy": "protected",
107918
107874
  "return": {
107919
107875
  "type": {
107920
107876
  "text": "void"
@@ -107922,17 +107878,35 @@
107922
107878
  },
107923
107879
  "parameters": [
107924
107880
  {
107925
- "name": "event",
107881
+ "name": "flag",
107926
107882
  "type": {
107927
- "text": "MouseEvent"
107883
+ "text": "T"
107884
+ }
107885
+ },
107886
+ {
107887
+ "name": "message",
107888
+ "type": {
107889
+ "text": "string"
107890
+ }
107891
+ },
107892
+ {
107893
+ "name": "flagValue",
107894
+ "optional": true,
107895
+ "type": {
107896
+ "text": "ValidityStateFlags[T]"
107928
107897
  }
107929
107898
  }
107930
- ]
107899
+ ],
107900
+ "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).",
107901
+ "inheritedFrom": {
107902
+ "name": "SbbFormAssociatedMixin",
107903
+ "module": "core/mixins/form-associated-mixin.js"
107904
+ }
107931
107905
  },
107932
107906
  {
107933
107907
  "kind": "method",
107934
- "name": "_onMenuAnimationEnd",
107935
- "privacy": "private",
107908
+ "name": "removeValidityFlag",
107909
+ "privacy": "protected",
107936
107910
  "return": {
107937
107911
  "type": {
107938
107912
  "text": "void"
@@ -107940,152 +107914,158 @@
107940
107914
  },
107941
107915
  "parameters": [
107942
107916
  {
107943
- "name": "event",
107917
+ "name": "flag",
107944
107918
  "type": {
107945
- "text": "AnimationEvent"
107919
+ "text": "T"
107946
107920
  }
107947
107921
  }
107948
- ]
107922
+ ],
107923
+ "description": "Removes the validity state flag entry and updates validity state.",
107924
+ "inheritedFrom": {
107925
+ "name": "SbbFormAssociatedMixin",
107926
+ "module": "core/mixins/form-associated-mixin.js"
107927
+ }
107949
107928
  },
107950
107929
  {
107951
107930
  "kind": "method",
107952
- "name": "_setMenuPosition",
107953
- "privacy": "private",
107931
+ "name": "validate",
107932
+ "privacy": "protected",
107954
107933
  "return": {
107955
107934
  "type": {
107956
107935
  "text": "void"
107957
107936
  }
107937
+ },
107938
+ "description": "To be called whenever the current element needs to be validated.",
107939
+ "inheritedFrom": {
107940
+ "name": "SbbFormAssociatedMixin",
107941
+ "module": "core/mixins/form-associated-mixin.js"
107958
107942
  }
107959
107943
  },
107960
107944
  {
107961
107945
  "kind": "method",
107962
- "name": "_syncNegative",
107963
- "privacy": "private",
107946
+ "name": "shouldValidate",
107947
+ "privacy": "protected",
107964
107948
  "return": {
107965
107949
  "type": {
107966
- "text": "void"
107950
+ "text": "boolean"
107951
+ }
107952
+ },
107953
+ "parameters": [
107954
+ {
107955
+ "name": "name",
107956
+ "type": {
107957
+ "text": "PropertyKey | undefined"
107958
+ }
107967
107959
  }
107960
+ ],
107961
+ "description": "Whether validation should be run on a property change with the given name.",
107962
+ "inheritedFrom": {
107963
+ "name": "SbbFormAssociatedMixin",
107964
+ "module": "core/mixins/form-associated-mixin.js"
107968
107965
  }
107969
107966
  },
107970
107967
  {
107971
107968
  "kind": "method",
107972
- "name": "_isMobile",
107969
+ "name": "_setInternalValidity",
107973
107970
  "privacy": "private",
107974
107971
  "return": {
107975
107972
  "type": {
107976
- "text": "boolean"
107973
+ "text": "void"
107977
107974
  }
107978
- }
107979
- },
107980
- {
107981
- "kind": "field",
107982
- "name": "events",
107983
- "privacy": "public",
107984
- "static": true,
107985
- "readonly": true,
107986
- "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
107987
- "type": {
107988
- "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
107989
107975
  },
107990
107976
  "inheritedFrom": {
107991
- "name": "SbbOpenCloseBaseElement",
107992
- "module": "core/base-elements/open-close-base-element.js"
107977
+ "name": "SbbFormAssociatedMixin",
107978
+ "module": "core/mixins/form-associated-mixin.js"
107993
107979
  }
107994
107980
  },
107995
107981
  {
107996
107982
  "kind": "field",
107997
- "name": "state",
107998
- "privacy": "protected",
107999
- "description": "The state of the component.",
108000
- "type": {
108001
- "text": "SbbOpenedClosedState"
108002
- },
108003
- "default": "'closed'",
107983
+ "name": "_preventScrollOnSpaceKeydown",
107984
+ "privacy": "private",
107985
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
107986
+ "parameters": [
107987
+ {
107988
+ "description": "The origin event.",
107989
+ "name": "event"
107990
+ }
107991
+ ],
108004
107992
  "inheritedFrom": {
108005
- "name": "SbbOpenCloseBaseElement",
108006
- "module": "core/base-elements/open-close-base-element.js"
107993
+ "name": "SbbButtonLikeBaseElement",
107994
+ "module": "core/base-elements/button-base-element.js"
108007
107995
  }
108008
107996
  },
108009
107997
  {
108010
107998
  "kind": "field",
108011
- "name": "_state",
108012
- "type": {
108013
- "text": "SbbOpenedClosedState"
108014
- },
107999
+ "name": "_removeActiveMarker",
108015
108000
  "privacy": "private",
108016
108001
  "inheritedFrom": {
108017
- "name": "SbbOpenCloseBaseElement",
108018
- "module": "core/base-elements/open-close-base-element.js"
108002
+ "name": "SbbButtonLikeBaseElement",
108003
+ "module": "core/base-elements/button-base-element.js"
108019
108004
  }
108020
108005
  },
108021
108006
  {
108022
108007
  "kind": "field",
108023
- "name": "isOpen",
108024
- "type": {
108025
- "text": "boolean"
108026
- },
108027
- "privacy": "public",
108028
- "description": "Whether the element is open.",
108029
- "readonly": true,
108008
+ "name": "_dispatchClickEventOnSpaceKeyup",
108009
+ "privacy": "private",
108010
+ "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.",
108011
+ "parameters": [
108012
+ {
108013
+ "description": "The origin event.",
108014
+ "name": "event"
108015
+ }
108016
+ ],
108030
108017
  "inheritedFrom": {
108031
- "name": "SbbOpenCloseBaseElement",
108032
- "module": "core/base-elements/open-close-base-element.js"
108018
+ "name": "SbbButtonLikeBaseElement",
108019
+ "module": "core/base-elements/button-base-element.js"
108033
108020
  }
108034
108021
  },
108035
108022
  {
108036
- "kind": "method",
108037
- "name": "dispatchBeforeOpenEvent",
108038
- "privacy": "protected",
108039
- "return": {
108040
- "type": {
108041
- "text": "boolean"
108042
- }
108043
- },
108023
+ "kind": "field",
108024
+ "name": "_dispatchClickEvent",
108025
+ "privacy": "private",
108044
108026
  "inheritedFrom": {
108045
- "name": "SbbOpenCloseBaseElement",
108046
- "module": "core/base-elements/open-close-base-element.js"
108027
+ "name": "SbbButtonLikeBaseElement",
108028
+ "module": "core/base-elements/button-base-element.js"
108047
108029
  }
108048
108030
  },
108049
108031
  {
108050
- "kind": "method",
108051
- "name": "dispatchOpenEvent",
108052
- "privacy": "protected",
108053
- "return": {
108054
- "type": {
108055
- "text": "boolean"
108056
- }
108032
+ "kind": "field",
108033
+ "name": "maybeDisabled",
108034
+ "type": {
108035
+ "text": "boolean | undefined"
108057
108036
  },
108037
+ "privacy": "protected",
108038
+ "readonly": true,
108058
108039
  "inheritedFrom": {
108059
- "name": "SbbOpenCloseBaseElement",
108060
- "module": "core/base-elements/open-close-base-element.js"
108040
+ "name": "SbbActionBaseElement",
108041
+ "module": "core/base-elements/action-base-element.js"
108061
108042
  }
108062
108043
  },
108063
108044
  {
108064
- "kind": "method",
108065
- "name": "dispatchBeforeCloseEvent",
108066
- "privacy": "protected",
108067
- "return": {
108068
- "type": {
108069
- "text": "boolean"
108070
- }
108045
+ "kind": "field",
108046
+ "name": "maybeDisabledInteractive",
108047
+ "type": {
108048
+ "text": "boolean | undefined"
108071
108049
  },
108050
+ "privacy": "protected",
108051
+ "readonly": true,
108072
108052
  "inheritedFrom": {
108073
- "name": "SbbOpenCloseBaseElement",
108074
- "module": "core/base-elements/open-close-base-element.js"
108053
+ "name": "SbbActionBaseElement",
108054
+ "module": "core/base-elements/action-base-element.js"
108075
108055
  }
108076
108056
  },
108077
108057
  {
108078
108058
  "kind": "method",
108079
- "name": "dispatchCloseEvent",
108059
+ "name": "setupBaseEventHandlers",
108080
108060
  "privacy": "protected",
108081
108061
  "return": {
108082
108062
  "type": {
108083
- "text": "boolean"
108063
+ "text": "void"
108084
108064
  }
108085
108065
  },
108086
108066
  "inheritedFrom": {
108087
- "name": "SbbOpenCloseBaseElement",
108088
- "module": "core/base-elements/open-close-base-element.js"
108067
+ "name": "SbbActionBaseElement",
108068
+ "module": "core/base-elements/action-base-element.js"
108089
108069
  }
108090
108070
  },
108091
108071
  {
@@ -108194,66 +108174,110 @@
108194
108174
  }
108195
108175
  }
108196
108176
  ],
108197
- "attributes": [
108177
+ "mixins": [
108198
108178
  {
108199
- "name": "trigger",
108200
- "type": {
108201
- "text": "HTMLElement | null"
108202
- },
108203
- "default": "null",
108204
- "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
108205
- "fieldName": "trigger"
108179
+ "name": "SbbDisabledTabIndexActionMixin",
108180
+ "module": "core/mixins.js"
108181
+ },
108182
+ {
108183
+ "name": "SbbMenuActionCommonElementMixin",
108184
+ "module": "menu/common/menu-action-common.js"
108206
108185
  }
108207
108186
  ],
108208
108187
  "superclass": {
108209
- "name": "SbbOpenCloseBaseElement",
108188
+ "name": "SbbButtonBaseElement",
108210
108189
  "module": "core/base-elements.js"
108211
108190
  },
108212
- "tagName": "sbb-menu",
108191
+ "tagName": "sbb-menu-button",
108213
108192
  "customElement": true,
108214
- "events": [
108193
+ "attributes": [
108215
108194
  {
108216
- "name": "beforeopen",
108195
+ "name": "disabled-interactive",
108217
108196
  "type": {
108218
- "text": "Event"
108197
+ "text": "boolean"
108219
108198
  },
108220
- "description": "Emits whenever the component starts the opening transition. Can be canceled.",
108199
+ "default": "false",
108200
+ "description": "Whether the button should be aria-disabled but stay interactive.",
108201
+ "fieldName": "disabledInteractive",
108221
108202
  "inheritedFrom": {
108222
- "name": "SbbOpenCloseBaseElement",
108223
- "module": "core/base-elements/open-close-base-element.js"
108203
+ "name": "SbbDisabledInteractiveMixin",
108204
+ "module": "core/mixins/disabled-mixin.js"
108224
108205
  }
108225
108206
  },
108226
108207
  {
108227
- "name": "open",
108208
+ "name": "disabled",
108209
+ "description": "Whether the component is disabled.",
108210
+ "default": "false",
108228
108211
  "type": {
108229
- "text": "Event"
108212
+ "text": "boolean"
108230
108213
  },
108231
- "description": "Emits whenever the component is opened.",
108214
+ "fieldName": "disabled",
108232
108215
  "inheritedFrom": {
108233
- "name": "SbbOpenCloseBaseElement",
108234
- "module": "core/base-elements/open-close-base-element.js"
108216
+ "name": "SbbDisabledMixin",
108217
+ "module": "core/mixins/disabled-mixin.js"
108235
108218
  }
108236
108219
  },
108237
108220
  {
108238
- "name": "beforeclose",
108221
+ "name": "icon-name",
108239
108222
  "type": {
108240
- "text": "Event"
108223
+ "text": "string"
108241
108224
  },
108242
- "description": "Emits whenever the component begins the closing transition. Can be canceled.",
108225
+ "default": "''",
108226
+ "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.",
108227
+ "fieldName": "iconName",
108243
108228
  "inheritedFrom": {
108244
- "name": "SbbOpenCloseBaseElement",
108245
- "module": "core/base-elements/open-close-base-element.js"
108229
+ "name": "SbbIconNameMixin",
108230
+ "module": "icon/icon-name-mixin.js"
108246
108231
  }
108247
108232
  },
108248
108233
  {
108249
- "name": "close",
108234
+ "name": "value",
108250
108235
  "type": {
108251
- "text": "Event"
108236
+ "text": "string"
108252
108237
  },
108253
- "description": "Emits whenever the component is closed.",
108238
+ "default": "''",
108239
+ "description": "Value of the form element.",
108240
+ "fieldName": "value",
108254
108241
  "inheritedFrom": {
108255
- "name": "SbbOpenCloseBaseElement",
108256
- "module": "core/base-elements/open-close-base-element.js"
108242
+ "name": "SbbButtonBaseElement",
108243
+ "module": "core/base-elements/button-base-element.js"
108244
+ }
108245
+ },
108246
+ {
108247
+ "name": "type",
108248
+ "description": "The type attribute to use for the button.",
108249
+ "default": "'button'",
108250
+ "type": {
108251
+ "text": "SbbButtonType"
108252
+ },
108253
+ "fieldName": "type",
108254
+ "inheritedFrom": {
108255
+ "name": "SbbButtonBaseElement",
108256
+ "module": "core/base-elements/button-base-element.js"
108257
+ }
108258
+ },
108259
+ {
108260
+ "name": "form",
108261
+ "description": "The `<form>` element to associate the button with.",
108262
+ "type": {
108263
+ "text": "HTMLFormElement | null"
108264
+ },
108265
+ "fieldName": "form",
108266
+ "inheritedFrom": {
108267
+ "name": "SbbButtonBaseElement",
108268
+ "module": "core/base-elements/button-base-element.js"
108269
+ }
108270
+ },
108271
+ {
108272
+ "name": "name",
108273
+ "description": "Name of the form element. Will be read from name attribute.",
108274
+ "type": {
108275
+ "text": "string"
108276
+ },
108277
+ "fieldName": "name",
108278
+ "inheritedFrom": {
108279
+ "name": "SbbFormAssociatedMixin",
108280
+ "module": "core/mixins/form-associated-mixin.js"
108257
108281
  }
108258
108282
  }
108259
108283
  ]
@@ -108262,10 +108286,10 @@
108262
108286
  "exports": [
108263
108287
  {
108264
108288
  "kind": "js",
108265
- "name": "SbbMenuElement",
108289
+ "name": "SbbMenuButtonElement",
108266
108290
  "declaration": {
108267
- "name": "SbbMenuElement",
108268
- "module": "menu/menu/menu.component.js"
108291
+ "name": "SbbMenuButtonElement",
108292
+ "module": "menu/menu-button/menu-button.component.js"
108269
108293
  }
108270
108294
  }
108271
108295
  ]
@@ -118991,6 +119015,14 @@
118991
119015
  "text": "void"
118992
119016
  }
118993
119017
  },
119018
+ "parameters": [
119019
+ {
119020
+ "name": "previousName",
119021
+ "type": {
119022
+ "text": "string"
119023
+ }
119024
+ }
119025
+ ],
118994
119026
  "description": "Remove `this` from the radioButton registry and, if the group is empty, delete the entry from the groups Map",
118995
119027
  "inheritedFrom": {
118996
119028
  "name": "SbbFormAssociatedRadioButtonMixin",
@@ -120002,6 +120034,14 @@
120002
120034
  "text": "void"
120003
120035
  }
120004
120036
  },
120037
+ "parameters": [
120038
+ {
120039
+ "name": "previousName",
120040
+ "type": {
120041
+ "text": "string"
120042
+ }
120043
+ }
120044
+ ],
120005
120045
  "description": "Remove `this` from the radioButton registry and, if the group is empty, delete the entry from the groups Map",
120006
120046
  "inheritedFrom": {
120007
120047
  "name": "SbbFormAssociatedRadioButtonMixin",
@@ -123211,334 +123251,577 @@
123211
123251
  },
123212
123252
  {
123213
123253
  "kind": "javascript-module",
123214
- "path": "stepper/stepper/stepper.component.js",
123254
+ "path": "stepper/step-label/step-label.component.js",
123215
123255
  "declarations": [
123216
123256
  {
123217
123257
  "kind": "class",
123218
- "description": "",
123219
- "name": "SbbStepChangeEvent",
123258
+ "description": "Combined with a `sbb-stepper`, it displays a step's label.",
123259
+ "name": "SbbStepLabelElement",
123260
+ "slots": [
123261
+ {
123262
+ "description": "Use the unnamed slot to provide a label.",
123263
+ "name": ""
123264
+ },
123265
+ {
123266
+ "description": "Use this to display an icon in the label bubble.",
123267
+ "name": "icon"
123268
+ }
123269
+ ],
123220
123270
  "members": [
123221
123271
  {
123222
- "kind": "field",
123223
- "name": "selectedIndex",
123224
- "type": {
123225
- "text": "number | null"
123272
+ "kind": "field",
123273
+ "name": "elementName",
123274
+ "type": {
123275
+ "text": "string"
123276
+ },
123277
+ "privacy": "public",
123278
+ "static": true,
123279
+ "readonly": true,
123280
+ "inheritedFrom": {
123281
+ "name": "SbbElement",
123282
+ "module": "core/base-elements/element.js"
123283
+ },
123284
+ "default": "'sbb-step-label'"
123285
+ },
123286
+ {
123287
+ "kind": "field",
123288
+ "name": "role",
123289
+ "type": {
123290
+ "text": "string"
123291
+ },
123292
+ "privacy": "public",
123293
+ "static": true,
123294
+ "readonly": true,
123295
+ "default": "'tab'",
123296
+ "inheritedFrom": {
123297
+ "name": "SbbButtonLikeBaseElement",
123298
+ "module": "core/base-elements/button-base-element.js"
123299
+ }
123300
+ },
123301
+ {
123302
+ "kind": "field",
123303
+ "name": "step",
123304
+ "type": {
123305
+ "text": "SbbStepElement | null"
123306
+ },
123307
+ "privacy": "public",
123308
+ "description": "The step controlled by the label.",
123309
+ "readonly": true,
123310
+ "default": "null"
123311
+ },
123312
+ {
123313
+ "kind": "field",
123314
+ "name": "_step",
123315
+ "type": {
123316
+ "text": "SbbStepElement | null"
123317
+ },
123318
+ "privacy": "private",
123319
+ "default": "null"
123320
+ },
123321
+ {
123322
+ "kind": "field",
123323
+ "name": "stepper",
123324
+ "type": {
123325
+ "text": "SbbStepperElement | null"
123326
+ },
123327
+ "privacy": "public",
123328
+ "readonly": true
123329
+ },
123330
+ {
123331
+ "kind": "field",
123332
+ "name": "disabled",
123333
+ "privacy": "public",
123334
+ "description": "Whether the component is disabled.",
123335
+ "default": "false",
123336
+ "type": {
123337
+ "text": "boolean"
123338
+ },
123339
+ "attribute": "disabled",
123340
+ "reflects": true,
123341
+ "inheritedFrom": {
123342
+ "name": "SbbDisabledMixin",
123343
+ "module": "core/mixins/disabled-mixin.js"
123344
+ }
123345
+ },
123346
+ {
123347
+ "kind": "field",
123348
+ "name": "_previousOrientation",
123349
+ "type": {
123350
+ "text": "string | undefined"
123351
+ },
123352
+ "privacy": "private"
123353
+ },
123354
+ {
123355
+ "kind": "field",
123356
+ "name": "_previousSize",
123357
+ "type": {
123358
+ "text": "string | undefined"
123359
+ },
123360
+ "privacy": "private"
123361
+ },
123362
+ {
123363
+ "kind": "method",
123364
+ "name": "_isNotDeactivatedByLinearMode",
123365
+ "privacy": "private",
123366
+ "return": {
123367
+ "type": {
123368
+ "text": "boolean"
123369
+ }
123370
+ },
123371
+ "parameters": [
123372
+ {
123373
+ "name": "step",
123374
+ "type": {
123375
+ "text": "SbbStepElement"
123376
+ }
123377
+ }
123378
+ ]
123379
+ },
123380
+ {
123381
+ "kind": "method",
123382
+ "name": "_assignStep",
123383
+ "privacy": "private",
123384
+ "return": {
123385
+ "type": {
123386
+ "text": "void"
123387
+ }
123388
+ }
123389
+ },
123390
+ {
123391
+ "kind": "field",
123392
+ "name": "iconName",
123393
+ "type": {
123394
+ "text": "string"
123395
+ },
123396
+ "privacy": "public",
123397
+ "default": "''",
123398
+ "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.",
123399
+ "attribute": "icon-name",
123400
+ "inheritedFrom": {
123401
+ "name": "SbbIconNameMixin",
123402
+ "module": "icon/icon-name-mixin.js"
123403
+ }
123404
+ },
123405
+ {
123406
+ "kind": "method",
123407
+ "name": "renderIconSlot",
123408
+ "privacy": "protected",
123409
+ "return": {
123410
+ "type": {
123411
+ "text": "TemplateResult"
123412
+ }
123413
+ },
123414
+ "parameters": [
123415
+ {
123416
+ "name": "classname",
123417
+ "optional": true,
123418
+ "type": {
123419
+ "text": "string"
123420
+ }
123421
+ }
123422
+ ],
123423
+ "inheritedFrom": {
123424
+ "name": "SbbIconNameMixin",
123425
+ "module": "icon/icon-name-mixin.js"
123426
+ }
123427
+ },
123428
+ {
123429
+ "kind": "method",
123430
+ "name": "renderIconName",
123431
+ "privacy": "protected",
123432
+ "return": {
123433
+ "type": {
123434
+ "text": "string"
123435
+ }
123436
+ },
123437
+ "inheritedFrom": {
123438
+ "name": "SbbIconNameMixin",
123439
+ "module": "icon/icon-name-mixin.js"
123440
+ }
123441
+ },
123442
+ {
123443
+ "kind": "method",
123444
+ "name": "_renderIconName",
123445
+ "privacy": "private",
123446
+ "return": {
123447
+ "type": {
123448
+ "text": "string"
123449
+ }
123226
123450
  },
123227
- "privacy": "public",
123228
- "readonly": true,
123229
- "description": "The index of the newly selected step.",
123230
- "default": "selectedIndex"
123451
+ "inheritedFrom": {
123452
+ "name": "SbbIconNameMixin",
123453
+ "module": "icon/icon-name-mixin.js"
123454
+ }
123231
123455
  },
123232
123456
  {
123233
123457
  "kind": "field",
123234
- "name": "previousIndex",
123458
+ "name": "#disabled",
123459
+ "privacy": "private",
123235
123460
  "type": {
123236
- "text": "number | null"
123461
+ "text": "boolean"
123237
123462
  },
123238
- "privacy": "public",
123239
- "readonly": true,
123240
- "description": "The index of the previously selected step.",
123241
- "default": "previousIndex"
123463
+ "default": "false",
123464
+ "inheritedFrom": {
123465
+ "name": "SbbDisabledMixin",
123466
+ "module": "core/mixins/disabled-mixin.js"
123467
+ }
123242
123468
  },
123243
123469
  {
123244
- "kind": "field",
123245
- "name": "selectedStep",
123246
- "type": {
123247
- "text": "SbbStepElement | null"
123470
+ "kind": "method",
123471
+ "name": "isDisabledExternally",
123472
+ "privacy": "protected",
123473
+ "return": {
123474
+ "type": {
123475
+ "text": "boolean"
123476
+ }
123248
123477
  },
123249
- "privacy": "public",
123250
- "readonly": true,
123251
- "description": "The newly selected step element.",
123252
- "default": "selectedStep"
123478
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
123479
+ "inheritedFrom": {
123480
+ "name": "SbbDisabledMixin",
123481
+ "module": "core/mixins/disabled-mixin.js"
123482
+ }
123253
123483
  },
123254
123484
  {
123255
123485
  "kind": "field",
123256
- "name": "previousStep",
123486
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
123257
123487
  "type": {
123258
- "text": "SbbStepElement | null"
123488
+ "text": "array"
123259
123489
  },
123260
- "privacy": "public",
123490
+ "privacy": "private",
123261
123491
  "readonly": true,
123262
- "description": "The previously selected step element.",
123263
- "default": "previousStep"
123264
- }
123265
- ],
123266
- "superclass": {
123267
- "name": "Event",
123268
- "module": "stepper/stepper/stepper.component.js"
123269
- }
123270
- },
123271
- {
123272
- "kind": "class",
123273
- "description": "Provides a structured, step-by-step workflow for user interactions.",
123274
- "name": "SbbStepperElement",
123275
- "slots": [
123276
- {
123277
- "description": "Provide a `sbb-expansion-panel-header` and a `sbb-expansion-panel-content` to the stepper.",
123278
- "name": ""
123279
- },
123280
- {
123281
- "description": "Use this slot to provide an `sbb-step-label`.",
123282
- "name": "step-label"
123492
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
123493
+ "inheritedFrom": {
123494
+ "name": "SbbButtonBaseElement",
123495
+ "module": "core/base-elements/button-base-element.js"
123496
+ }
123283
123497
  },
123284
- {
123285
- "description": "Use this slot to provide an `sbb-step`.",
123286
- "name": "step"
123287
- }
123288
- ],
123289
- "members": [
123290
123498
  {
123291
123499
  "kind": "field",
123292
- "name": "elementName",
123500
+ "name": "value",
123293
123501
  "type": {
123294
123502
  "text": "string"
123295
123503
  },
123296
123504
  "privacy": "public",
123297
- "static": true,
123298
- "readonly": true,
123299
- "default": "'sbb-stepper'",
123300
123505
  "inheritedFrom": {
123301
- "name": "SbbElement",
123302
- "module": "core/base-elements/element.js"
123303
- }
123506
+ "name": "SbbButtonBaseElement",
123507
+ "module": "core/base-elements/button-base-element.js"
123508
+ },
123509
+ "default": "''",
123510
+ "description": "Value of the form element.",
123511
+ "attribute": "value"
123304
123512
  },
123305
123513
  {
123306
123514
  "kind": "field",
123307
- "name": "events",
123515
+ "name": "type",
123308
123516
  "privacy": "public",
123309
- "static": true,
123310
- "readonly": true,
123311
- "default": "{ stepchange: 'stepchange', }",
123517
+ "description": "The type attribute to use for the button.",
123518
+ "default": "'button'",
123312
123519
  "type": {
123313
- "text": "{\n stepchange: 'stepchange',\n }"
123520
+ "text": "SbbButtonType"
123521
+ },
123522
+ "attribute": "type",
123523
+ "inheritedFrom": {
123524
+ "name": "SbbButtonBaseElement",
123525
+ "module": "core/base-elements/button-base-element.js"
123314
123526
  }
123315
123527
  },
123316
123528
  {
123317
123529
  "kind": "field",
123318
- "name": "_observer",
123319
- "privacy": "private",
123320
- "default": "new IntersectionController(this, { target: null, callback: (entries) => { entries.forEach((e) => { if (e.intersectionRatio > 0) { this._setStepperHeight(this.selected); this._setMarkerSize(); } }); }, })",
123321
- "description": "If the sbb-stepper is used in a sbb-dialog, the marker on the selected element will not appear,\nbecause the calculations are done when the dialog is closed, so the marker has a width of 0;\nthe same happens for the stepper height.\nWe need to recalculate it when the element becomes visible."
123322
- },
123323
- {
123324
- "kind": "field",
123325
- "name": "linear",
123530
+ "name": "form",
123326
123531
  "type": {
123327
- "text": "boolean"
123532
+ "text": "HTMLFormElement | null"
123328
123533
  },
123329
123534
  "privacy": "public",
123330
- "default": "false",
123331
- "description": "If set to true, only the current and previous labels can be clicked and selected.",
123332
- "attribute": "linear"
123333
- },
123334
- {
123335
- "kind": "field",
123336
- "name": "horizontalFrom",
123337
- "privacy": "public",
123338
- "description": "Overrides the behavior of `orientation` property.",
123339
- "type": {
123340
- "text": "SbbHorizontalFrom | null"
123535
+ "description": "The `<form>` element to associate the button with.",
123536
+ "inheritedFrom": {
123537
+ "name": "SbbButtonBaseElement",
123538
+ "module": "core/base-elements/button-base-element.js"
123341
123539
  },
123342
- "attribute": "horizontal-from",
123343
- "reflects": true,
123344
- "default": "null"
123540
+ "attribute": "form"
123345
123541
  },
123346
123542
  {
123347
123543
  "kind": "field",
123348
- "name": "_horizontalFrom",
123544
+ "name": "_formId",
123349
123545
  "type": {
123350
- "text": "SbbHorizontalFrom | null"
123546
+ "text": "string"
123351
123547
  },
123352
123548
  "privacy": "private",
123353
- "default": "null"
123549
+ "default": "''",
123550
+ "inheritedFrom": {
123551
+ "name": "SbbButtonBaseElement",
123552
+ "module": "core/base-elements/button-base-element.js"
123553
+ }
123354
123554
  },
123355
123555
  {
123356
123556
  "kind": "field",
123357
- "name": "orientation",
123358
- "type": {
123359
- "text": "SbbOrientation"
123360
- },
123361
- "privacy": "public",
123362
- "default": "'horizontal'",
123363
- "description": "Steps orientation, either horizontal or vertical.",
123364
- "attribute": "orientation",
123365
- "reflects": true
123557
+ "name": "_handleButtonClick",
123558
+ "privacy": "private",
123559
+ "inheritedFrom": {
123560
+ "name": "SbbButtonBaseElement",
123561
+ "module": "core/base-elements/button-base-element.js"
123562
+ }
123366
123563
  },
123367
123564
  {
123368
- "kind": "field",
123369
- "name": "size",
123370
- "type": {
123371
- "text": "'s' | 'm'"
123565
+ "kind": "method",
123566
+ "name": "_requestSubmit",
123567
+ "privacy": "private",
123568
+ "return": {
123569
+ "type": {
123570
+ "text": "void"
123571
+ }
123372
123572
  },
123373
- "privacy": "public",
123374
- "description": "Size variant, either s or m.",
123375
- "default": "'m' / 's' (lean)",
123376
- "attribute": "size",
123377
- "reflects": true
123573
+ "parameters": [
123574
+ {
123575
+ "name": "form",
123576
+ "type": {
123577
+ "text": "HTMLFormElement"
123578
+ }
123579
+ }
123580
+ ],
123581
+ "inheritedFrom": {
123582
+ "name": "SbbButtonBaseElement",
123583
+ "module": "core/base-elements/button-base-element.js"
123584
+ }
123378
123585
  },
123379
123586
  {
123380
123587
  "kind": "field",
123381
- "name": "selected",
123382
- "privacy": "public",
123383
- "description": "The currently selected step.",
123384
- "type": {
123385
- "text": "SbbStepElement | null"
123588
+ "name": "_formKeyDown",
123589
+ "privacy": "private",
123590
+ "inheritedFrom": {
123591
+ "name": "SbbButtonBaseElement",
123592
+ "module": "core/base-elements/button-base-element.js"
123386
123593
  }
123387
123594
  },
123388
123595
  {
123389
123596
  "kind": "field",
123390
- "name": "_requestedSelected",
123597
+ "name": "formAssociated",
123391
123598
  "type": {
123392
- "text": "SbbStepElement | null"
123599
+ "text": "boolean"
123393
123600
  },
123394
- "privacy": "private",
123395
- "default": "null"
123601
+ "privacy": "public",
123602
+ "static": true,
123603
+ "default": "true",
123604
+ "inheritedFrom": {
123605
+ "name": "SbbFormAssociatedMixin",
123606
+ "module": "core/mixins/form-associated-mixin.js"
123607
+ }
123396
123608
  },
123397
123609
  {
123398
123610
  "kind": "field",
123399
- "name": "selectedIndex",
123611
+ "name": "name",
123400
123612
  "privacy": "public",
123401
- "description": "The currently selected step index.",
123613
+ "description": "Name of the form element. Will be read from name attribute.",
123402
123614
  "type": {
123403
- "text": "number | null"
123615
+ "text": "string"
123404
123616
  },
123405
- "attribute": "selected-index"
123617
+ "attribute": "name",
123618
+ "inheritedFrom": {
123619
+ "name": "SbbFormAssociatedMixin",
123620
+ "module": "core/mixins/form-associated-mixin.js"
123621
+ }
123406
123622
  },
123407
123623
  {
123408
123624
  "kind": "field",
123409
- "name": "_requestedSelectedIndex",
123625
+ "name": "validity",
123410
123626
  "type": {
123411
- "text": "number | null"
123627
+ "text": "ValidityState"
123412
123628
  },
123413
- "privacy": "private",
123414
- "default": "null"
123629
+ "privacy": "public",
123630
+ "description": "Returns the ValidityState object for this element.",
123631
+ "readonly": true,
123632
+ "inheritedFrom": {
123633
+ "name": "SbbFormAssociatedMixin",
123634
+ "module": "core/mixins/form-associated-mixin.js"
123635
+ }
123415
123636
  },
123416
123637
  {
123417
123638
  "kind": "field",
123418
- "name": "steps",
123639
+ "name": "validationMessage",
123419
123640
  "type": {
123420
- "text": "SbbStepElement[]"
123641
+ "text": "string"
123421
123642
  },
123422
123643
  "privacy": "public",
123423
- "description": "The steps of the stepper.",
123424
- "readonly": true
123644
+ "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.",
123645
+ "readonly": true,
123646
+ "inheritedFrom": {
123647
+ "name": "SbbFormAssociatedMixin",
123648
+ "module": "core/mixins/form-associated-mixin.js"
123649
+ }
123425
123650
  },
123426
123651
  {
123427
123652
  "kind": "field",
123428
- "name": "_enabledSteps",
123653
+ "name": "willValidate",
123429
123654
  "type": {
123430
- "text": "SbbStepElement[]"
123655
+ "text": "boolean"
123431
123656
  },
123432
- "privacy": "private",
123433
- "readonly": true
123657
+ "privacy": "public",
123658
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
123659
+ "readonly": true,
123660
+ "inheritedFrom": {
123661
+ "name": "SbbFormAssociatedMixin",
123662
+ "module": "core/mixins/form-associated-mixin.js"
123663
+ }
123434
123664
  },
123435
123665
  {
123436
123666
  "kind": "field",
123437
- "name": "_loaded",
123438
- "type": {
123439
- "text": "boolean"
123440
- },
123667
+ "name": "_validityStates",
123441
123668
  "privacy": "private",
123442
- "default": "false"
123669
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
123670
+ "inheritedFrom": {
123671
+ "name": "SbbFormAssociatedMixin",
123672
+ "module": "core/mixins/form-associated-mixin.js"
123673
+ }
123443
123674
  },
123444
123675
  {
123445
123676
  "kind": "field",
123446
- "name": "_resizeObserverTimeout",
123677
+ "name": "formDisabled",
123447
123678
  "type": {
123448
- "text": "ReturnType<typeof setTimeout> | null"
123679
+ "text": "boolean"
123449
123680
  },
123450
- "privacy": "private",
123451
- "default": "null"
123452
- },
123453
- {
123454
- "kind": "field",
123455
- "name": "_mediaMatcher",
123456
- "privacy": "private",
123457
- "default": "new SbbMediaMatcherController(this, {})"
123681
+ "privacy": "protected",
123682
+ "default": "false",
123683
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
123684
+ "inheritedFrom": {
123685
+ "name": "SbbFormAssociatedMixin",
123686
+ "module": "core/mixins/form-associated-mixin.js"
123687
+ }
123458
123688
  },
123459
123689
  {
123460
123690
  "kind": "method",
123461
- "name": "next",
123691
+ "name": "checkValidity",
123462
123692
  "privacy": "public",
123463
123693
  "return": {
123464
123694
  "type": {
123465
- "text": "void"
123695
+ "text": "boolean"
123466
123696
  }
123467
123697
  },
123468
- "description": "Selects the next step."
123698
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
123699
+ "inheritedFrom": {
123700
+ "name": "SbbFormAssociatedMixin",
123701
+ "module": "core/mixins/form-associated-mixin.js"
123702
+ }
123469
123703
  },
123470
123704
  {
123471
123705
  "kind": "method",
123472
- "name": "previous",
123706
+ "name": "reportValidity",
123473
123707
  "privacy": "public",
123474
123708
  "return": {
123475
123709
  "type": {
123476
- "text": "void"
123710
+ "text": "boolean"
123477
123711
  }
123478
123712
  },
123479
- "description": "Selects the previous step."
123713
+ "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.",
123714
+ "inheritedFrom": {
123715
+ "name": "SbbFormAssociatedMixin",
123716
+ "module": "core/mixins/form-associated-mixin.js"
123717
+ }
123480
123718
  },
123481
123719
  {
123482
123720
  "kind": "method",
123483
- "name": "reset",
123721
+ "name": "setCustomValidity",
123484
123722
  "privacy": "public",
123485
123723
  "return": {
123486
123724
  "type": {
123487
123725
  "text": "void"
123488
123726
  }
123489
123727
  },
123490
- "description": "Resets the form in which the stepper is nested or every form of each step, if any."
123728
+ "parameters": [
123729
+ {
123730
+ "name": "message",
123731
+ "type": {
123732
+ "text": "string"
123733
+ }
123734
+ }
123735
+ ],
123736
+ "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.",
123737
+ "inheritedFrom": {
123738
+ "name": "SbbFormAssociatedMixin",
123739
+ "module": "core/mixins/form-associated-mixin.js"
123740
+ }
123491
123741
  },
123492
123742
  {
123493
123743
  "kind": "method",
123494
- "name": "_isSelectable",
123744
+ "name": "_hasDisabledAncestor",
123495
123745
  "privacy": "private",
123496
123746
  "return": {
123497
123747
  "type": {
123498
- "text": "step is SbbStepElement"
123748
+ "text": "boolean"
123499
123749
  }
123500
123750
  },
123501
- "parameters": [
123502
- {
123503
- "name": "step",
123504
- "type": {
123505
- "text": "SbbStepElement | null"
123506
- }
123507
- }
123508
- ]
123751
+ "inheritedFrom": {
123752
+ "name": "SbbFormAssociatedMixin",
123753
+ "module": "core/mixins/form-associated-mixin.js"
123754
+ }
123509
123755
  },
123510
123756
  {
123511
123757
  "kind": "method",
123512
- "name": "_select",
123513
- "privacy": "private",
123758
+ "name": "updateFormValue",
123759
+ "privacy": "protected",
123514
123760
  "return": {
123515
123761
  "type": {
123516
123762
  "text": "void"
123517
123763
  }
123518
123764
  },
123519
- "parameters": [
123520
- {
123521
- "name": "step",
123522
- "type": {
123523
- "text": "SbbStepElement | null"
123524
- }
123765
+ "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",
123766
+ "inheritedFrom": {
123767
+ "name": "SbbFormAssociatedMixin",
123768
+ "module": "core/mixins/form-associated-mixin.js"
123769
+ }
123770
+ },
123771
+ {
123772
+ "kind": "method",
123773
+ "name": "formState",
123774
+ "privacy": "protected",
123775
+ "return": {
123776
+ "type": {
123777
+ "text": "FormRestoreState"
123525
123778
  }
123526
- ]
123779
+ },
123780
+ "inheritedFrom": {
123781
+ "name": "SbbFormAssociatedMixin",
123782
+ "module": "core/mixins/form-associated-mixin.js"
123783
+ }
123527
123784
  },
123528
123785
  {
123529
123786
  "kind": "method",
123530
- "name": "_setMarkerSize",
123531
- "privacy": "private",
123787
+ "name": "setValidityFlag",
123788
+ "privacy": "protected",
123532
123789
  "return": {
123533
123790
  "type": {
123534
123791
  "text": "void"
123535
123792
  }
123793
+ },
123794
+ "parameters": [
123795
+ {
123796
+ "name": "flag",
123797
+ "type": {
123798
+ "text": "T"
123799
+ }
123800
+ },
123801
+ {
123802
+ "name": "message",
123803
+ "type": {
123804
+ "text": "string"
123805
+ }
123806
+ },
123807
+ {
123808
+ "name": "flagValue",
123809
+ "optional": true,
123810
+ "type": {
123811
+ "text": "ValidityStateFlags[T]"
123812
+ }
123813
+ }
123814
+ ],
123815
+ "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).",
123816
+ "inheritedFrom": {
123817
+ "name": "SbbFormAssociatedMixin",
123818
+ "module": "core/mixins/form-associated-mixin.js"
123536
123819
  }
123537
123820
  },
123538
123821
  {
123539
123822
  "kind": "method",
123540
- "name": "_setStepperHeight",
123541
- "privacy": "private",
123823
+ "name": "removeValidityFlag",
123824
+ "privacy": "protected",
123542
123825
  "return": {
123543
123826
  "type": {
123544
123827
  "text": "void"
@@ -123546,104 +123829,174 @@
123546
123829
  },
123547
123830
  "parameters": [
123548
123831
  {
123549
- "name": "step",
123832
+ "name": "flag",
123550
123833
  "type": {
123551
- "text": "SbbStepElement | null"
123834
+ "text": "T"
123552
123835
  }
123553
123836
  }
123554
123837
  ],
123555
- "description": "Sets the stepper height based on the height of the provided step."
123838
+ "description": "Removes the validity state flag entry and updates validity state.",
123839
+ "inheritedFrom": {
123840
+ "name": "SbbFormAssociatedMixin",
123841
+ "module": "core/mixins/form-associated-mixin.js"
123842
+ }
123556
123843
  },
123557
123844
  {
123558
123845
  "kind": "method",
123559
- "name": "_calculateLabelOffsetTop",
123560
- "privacy": "private",
123846
+ "name": "validate",
123847
+ "privacy": "protected",
123561
123848
  "return": {
123562
123849
  "type": {
123563
- "text": "number | undefined"
123850
+ "text": "void"
123564
123851
  }
123852
+ },
123853
+ "description": "To be called whenever the current element needs to be validated.",
123854
+ "inheritedFrom": {
123855
+ "name": "SbbFormAssociatedMixin",
123856
+ "module": "core/mixins/form-associated-mixin.js"
123565
123857
  }
123566
123858
  },
123567
123859
  {
123568
123860
  "kind": "method",
123569
- "name": "_onSelectedStepResize",
123570
- "privacy": "private",
123861
+ "name": "shouldValidate",
123862
+ "privacy": "protected",
123571
123863
  "return": {
123572
123864
  "type": {
123573
- "text": "void"
123865
+ "text": "boolean"
123574
123866
  }
123575
123867
  },
123576
123868
  "parameters": [
123577
123869
  {
123578
- "name": "e",
123870
+ "name": "name",
123579
123871
  "type": {
123580
- "text": "Event"
123872
+ "text": "PropertyKey | undefined"
123581
123873
  }
123582
123874
  }
123583
- ]
123875
+ ],
123876
+ "description": "Whether validation should be run on a property change with the given name.",
123877
+ "inheritedFrom": {
123878
+ "name": "SbbFormAssociatedMixin",
123879
+ "module": "core/mixins/form-associated-mixin.js"
123880
+ }
123584
123881
  },
123585
123882
  {
123586
123883
  "kind": "method",
123587
- "name": "_configure",
123884
+ "name": "_setInternalValidity",
123588
123885
  "privacy": "private",
123589
123886
  "return": {
123590
123887
  "type": {
123591
123888
  "text": "void"
123592
123889
  }
123890
+ },
123891
+ "inheritedFrom": {
123892
+ "name": "SbbFormAssociatedMixin",
123893
+ "module": "core/mixins/form-associated-mixin.js"
123593
123894
  }
123594
123895
  },
123595
123896
  {
123596
- "kind": "method",
123597
- "name": "_updateLabels",
123897
+ "kind": "field",
123898
+ "name": "_preventScrollOnSpaceKeydown",
123598
123899
  "privacy": "private",
123599
- "return": {
123600
- "type": {
123601
- "text": "void"
123900
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
123901
+ "parameters": [
123902
+ {
123903
+ "description": "The origin event.",
123904
+ "name": "event"
123905
+ }
123906
+ ],
123907
+ "inheritedFrom": {
123908
+ "name": "SbbButtonLikeBaseElement",
123909
+ "module": "core/base-elements/button-base-element.js"
123910
+ }
123911
+ },
123912
+ {
123913
+ "kind": "field",
123914
+ "name": "_removeActiveMarker",
123915
+ "privacy": "private",
123916
+ "inheritedFrom": {
123917
+ "name": "SbbButtonLikeBaseElement",
123918
+ "module": "core/base-elements/button-base-element.js"
123919
+ }
123920
+ },
123921
+ {
123922
+ "kind": "field",
123923
+ "name": "_dispatchClickEventOnSpaceKeyup",
123924
+ "privacy": "private",
123925
+ "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.",
123926
+ "parameters": [
123927
+ {
123928
+ "description": "The origin event.",
123929
+ "name": "event"
123602
123930
  }
123931
+ ],
123932
+ "inheritedFrom": {
123933
+ "name": "SbbButtonLikeBaseElement",
123934
+ "module": "core/base-elements/button-base-element.js"
123935
+ }
123936
+ },
123937
+ {
123938
+ "kind": "field",
123939
+ "name": "_dispatchClickEvent",
123940
+ "privacy": "private",
123941
+ "inheritedFrom": {
123942
+ "name": "SbbButtonLikeBaseElement",
123943
+ "module": "core/base-elements/button-base-element.js"
123603
123944
  }
123604
123945
  },
123605
123946
  {
123606
- "kind": "method",
123607
- "name": "_checkOrientation",
123608
- "privacy": "private",
123609
- "return": {
123610
- "type": {
123611
- "text": "void"
123612
- }
123947
+ "kind": "field",
123948
+ "name": "maybeDisabled",
123949
+ "type": {
123950
+ "text": "boolean | undefined"
123951
+ },
123952
+ "privacy": "protected",
123953
+ "readonly": true,
123954
+ "inheritedFrom": {
123955
+ "name": "SbbActionBaseElement",
123956
+ "module": "core/base-elements/action-base-element.js"
123613
123957
  }
123614
123958
  },
123615
123959
  {
123616
123960
  "kind": "field",
123617
- "name": "_onStepperResize",
123618
- "privacy": "private"
123961
+ "name": "maybeDisabledInteractive",
123962
+ "type": {
123963
+ "text": "boolean | undefined"
123964
+ },
123965
+ "privacy": "protected",
123966
+ "readonly": true,
123967
+ "inheritedFrom": {
123968
+ "name": "SbbActionBaseElement",
123969
+ "module": "core/base-elements/action-base-element.js"
123970
+ }
123619
123971
  },
123620
123972
  {
123621
123973
  "kind": "method",
123622
- "name": "_configureLinearMode",
123623
- "privacy": "private",
123974
+ "name": "setupBaseEventHandlers",
123975
+ "privacy": "protected",
123624
123976
  "return": {
123625
123977
  "type": {
123626
123978
  "text": "void"
123627
123979
  }
123980
+ },
123981
+ "inheritedFrom": {
123982
+ "name": "SbbActionBaseElement",
123983
+ "module": "core/base-elements/action-base-element.js"
123628
123984
  }
123629
123985
  },
123630
123986
  {
123631
123987
  "kind": "method",
123632
- "name": "_handleKeyDown",
123633
- "privacy": "private",
123988
+ "name": "renderTemplate",
123989
+ "privacy": "protected",
123634
123990
  "return": {
123635
123991
  "type": {
123636
- "text": "void"
123992
+ "text": "TemplateResult"
123637
123993
  }
123638
123994
  },
123639
- "parameters": [
123640
- {
123641
- "name": "evt",
123642
- "type": {
123643
- "text": "KeyboardEvent"
123644
- }
123645
- }
123646
- ]
123995
+ "description": "Override this method to render the component template.",
123996
+ "inheritedFrom": {
123997
+ "name": "SbbActionBaseElement",
123998
+ "module": "core/base-elements/action-base-element.js"
123999
+ }
123647
124000
  },
123648
124001
  {
123649
124002
  "kind": "field",
@@ -123751,668 +124104,415 @@
123751
124104
  }
123752
124105
  }
123753
124106
  ],
123754
- "events": [
124107
+ "mixins": [
123755
124108
  {
123756
- "type": {
123757
- "text": "SbbStepChangeEvent"
123758
- },
123759
- "description": "Emits whenever a step was changed.",
123760
- "name": "stepchange"
124109
+ "name": "SbbIconNameMixin",
124110
+ "module": "icon.js"
124111
+ },
124112
+ {
124113
+ "name": "SbbDisabledMixin",
124114
+ "module": "core/mixins.js"
123761
124115
  }
123762
124116
  ],
124117
+ "superclass": {
124118
+ "name": "SbbButtonBaseElement",
124119
+ "module": "core/base-elements.js"
124120
+ },
124121
+ "tagName": "sbb-step-label",
124122
+ "customElement": true,
123763
124123
  "attributes": [
123764
124124
  {
123765
- "name": "linear",
124125
+ "name": "icon-name",
123766
124126
  "type": {
123767
- "text": "boolean"
124127
+ "text": "string"
123768
124128
  },
124129
+ "default": "''",
124130
+ "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.",
124131
+ "fieldName": "iconName",
124132
+ "inheritedFrom": {
124133
+ "name": "SbbIconNameMixin",
124134
+ "module": "icon/icon-name-mixin.js"
124135
+ }
124136
+ },
124137
+ {
124138
+ "name": "disabled",
124139
+ "description": "Whether the component is disabled.",
123769
124140
  "default": "false",
123770
- "description": "If set to true, only the current and previous labels can be clicked and selected.",
123771
- "fieldName": "linear"
124141
+ "type": {
124142
+ "text": "boolean"
124143
+ },
124144
+ "fieldName": "disabled",
124145
+ "inheritedFrom": {
124146
+ "name": "SbbDisabledMixin",
124147
+ "module": "core/mixins/disabled-mixin.js"
124148
+ }
123772
124149
  },
123773
124150
  {
123774
- "name": "horizontal-from",
123775
- "description": "Overrides the behavior of `orientation` property.",
124151
+ "name": "value",
123776
124152
  "type": {
123777
- "text": "SbbHorizontalFrom | null"
124153
+ "text": "string"
123778
124154
  },
123779
- "fieldName": "horizontalFrom"
124155
+ "default": "''",
124156
+ "description": "Value of the form element.",
124157
+ "fieldName": "value",
124158
+ "inheritedFrom": {
124159
+ "name": "SbbButtonBaseElement",
124160
+ "module": "core/base-elements/button-base-element.js"
124161
+ }
123780
124162
  },
123781
124163
  {
123782
- "name": "orientation",
124164
+ "name": "type",
124165
+ "description": "The type attribute to use for the button.",
124166
+ "default": "'button'",
123783
124167
  "type": {
123784
- "text": "SbbOrientation"
124168
+ "text": "SbbButtonType"
123785
124169
  },
123786
- "default": "'horizontal'",
123787
- "description": "Steps orientation, either horizontal or vertical.",
123788
- "fieldName": "orientation"
124170
+ "fieldName": "type",
124171
+ "inheritedFrom": {
124172
+ "name": "SbbButtonBaseElement",
124173
+ "module": "core/base-elements/button-base-element.js"
124174
+ }
123789
124175
  },
123790
124176
  {
123791
- "name": "size",
124177
+ "name": "form",
124178
+ "description": "The `<form>` element to associate the button with.",
123792
124179
  "type": {
123793
- "text": "'s' | 'm'"
124180
+ "text": "HTMLFormElement | null"
123794
124181
  },
123795
- "description": "Size variant, either s or m.",
123796
- "default": "'m' / 's' (lean)",
123797
- "fieldName": "size"
124182
+ "fieldName": "form",
124183
+ "inheritedFrom": {
124184
+ "name": "SbbButtonBaseElement",
124185
+ "module": "core/base-elements/button-base-element.js"
124186
+ }
123798
124187
  },
123799
124188
  {
123800
- "name": "selected-index",
123801
- "description": "The currently selected step index.",
124189
+ "name": "name",
124190
+ "description": "Name of the form element. Will be read from name attribute.",
123802
124191
  "type": {
123803
- "text": "number | null"
124192
+ "text": "string"
123804
124193
  },
123805
- "fieldName": "selectedIndex"
124194
+ "fieldName": "name",
124195
+ "inheritedFrom": {
124196
+ "name": "SbbFormAssociatedMixin",
124197
+ "module": "core/mixins/form-associated-mixin.js"
124198
+ }
123806
124199
  }
123807
- ],
123808
- "superclass": {
123809
- "name": "SbbElement",
123810
- "module": "core/base-elements.js"
123811
- },
123812
- "tagName": "sbb-stepper",
123813
- "customElement": true
123814
- },
123815
- {
123816
- "kind": "variable",
123817
- "name": "currentIndex"
123818
- },
123819
- {
123820
- "kind": "variable",
123821
- "name": "currentStep"
124200
+ ]
123822
124201
  }
123823
124202
  ],
123824
124203
  "exports": [
123825
124204
  {
123826
124205
  "kind": "js",
123827
- "name": "SbbStepChangeEvent",
123828
- "declaration": {
123829
- "name": "SbbStepChangeEvent",
123830
- "module": "stepper/stepper/stepper.component.js"
123831
- }
123832
- },
123833
- {
123834
- "kind": "js",
123835
- "name": "SbbStepperElement",
124206
+ "name": "SbbStepLabelElement",
123836
124207
  "declaration": {
123837
- "name": "SbbStepperElement",
123838
- "module": "stepper/stepper/stepper.component.js"
124208
+ "name": "SbbStepLabelElement",
124209
+ "module": "stepper/step-label/step-label.component.js"
123839
124210
  }
123840
124211
  }
123841
124212
  ]
123842
124213
  },
123843
124214
  {
123844
124215
  "kind": "javascript-module",
123845
- "path": "stepper/step-label/step-label.component.js",
124216
+ "path": "stepper/stepper/stepper.component.js",
123846
124217
  "declarations": [
123847
124218
  {
123848
124219
  "kind": "class",
123849
- "description": "Combined with a `sbb-stepper`, it displays a step's label.",
123850
- "name": "SbbStepLabelElement",
123851
- "slots": [
123852
- {
123853
- "description": "Use the unnamed slot to provide a label.",
123854
- "name": ""
123855
- },
123856
- {
123857
- "description": "Use this to display an icon in the label bubble.",
123858
- "name": "icon"
123859
- }
123860
- ],
124220
+ "description": "",
124221
+ "name": "SbbStepChangeEvent",
123861
124222
  "members": [
123862
124223
  {
123863
124224
  "kind": "field",
123864
- "name": "elementName",
124225
+ "name": "selectedIndex",
123865
124226
  "type": {
123866
- "text": "string"
124227
+ "text": "number | null"
123867
124228
  },
123868
124229
  "privacy": "public",
123869
- "static": true,
123870
124230
  "readonly": true,
123871
- "inheritedFrom": {
123872
- "name": "SbbElement",
123873
- "module": "core/base-elements/element.js"
123874
- },
123875
- "default": "'sbb-step-label'"
124231
+ "description": "The index of the newly selected step.",
124232
+ "default": "selectedIndex"
123876
124233
  },
123877
124234
  {
123878
124235
  "kind": "field",
123879
- "name": "role",
124236
+ "name": "previousIndex",
123880
124237
  "type": {
123881
- "text": "string"
124238
+ "text": "number | null"
123882
124239
  },
123883
124240
  "privacy": "public",
123884
- "static": true,
123885
124241
  "readonly": true,
123886
- "default": "'tab'",
123887
- "inheritedFrom": {
123888
- "name": "SbbButtonLikeBaseElement",
123889
- "module": "core/base-elements/button-base-element.js"
123890
- }
124242
+ "description": "The index of the previously selected step.",
124243
+ "default": "previousIndex"
123891
124244
  },
123892
124245
  {
123893
124246
  "kind": "field",
123894
- "name": "step",
124247
+ "name": "selectedStep",
123895
124248
  "type": {
123896
124249
  "text": "SbbStepElement | null"
123897
124250
  },
123898
124251
  "privacy": "public",
123899
- "description": "The step controlled by the label.",
123900
124252
  "readonly": true,
123901
- "default": "null"
124253
+ "description": "The newly selected step element.",
124254
+ "default": "selectedStep"
123902
124255
  },
123903
124256
  {
123904
124257
  "kind": "field",
123905
- "name": "_step",
124258
+ "name": "previousStep",
123906
124259
  "type": {
123907
124260
  "text": "SbbStepElement | null"
123908
124261
  },
123909
- "privacy": "private",
123910
- "default": "null"
123911
- },
123912
- {
123913
- "kind": "field",
123914
- "name": "stepper",
123915
- "type": {
123916
- "text": "SbbStepperElement | null"
123917
- },
123918
- "privacy": "public",
123919
- "readonly": true
123920
- },
123921
- {
123922
- "kind": "field",
123923
- "name": "disabled",
123924
124262
  "privacy": "public",
123925
- "description": "Whether the component is disabled.",
123926
- "default": "false",
123927
- "type": {
123928
- "text": "boolean"
123929
- },
123930
- "attribute": "disabled",
123931
- "reflects": true,
123932
- "inheritedFrom": {
123933
- "name": "SbbDisabledMixin",
123934
- "module": "core/mixins/disabled-mixin.js"
123935
- }
123936
- },
123937
- {
123938
- "kind": "field",
123939
- "name": "_previousOrientation",
123940
- "type": {
123941
- "text": "string | undefined"
123942
- },
123943
- "privacy": "private"
123944
- },
124263
+ "readonly": true,
124264
+ "description": "The previously selected step element.",
124265
+ "default": "previousStep"
124266
+ }
124267
+ ],
124268
+ "superclass": {
124269
+ "name": "Event",
124270
+ "module": "stepper/stepper/stepper.component.js"
124271
+ }
124272
+ },
124273
+ {
124274
+ "kind": "class",
124275
+ "description": "Provides a structured, step-by-step workflow for user interactions.",
124276
+ "name": "SbbStepperElement",
124277
+ "slots": [
123945
124278
  {
123946
- "kind": "field",
123947
- "name": "_previousSize",
123948
- "type": {
123949
- "text": "string | undefined"
123950
- },
123951
- "privacy": "private"
124279
+ "description": "Provide a `sbb-expansion-panel-header` and a `sbb-expansion-panel-content` to the stepper.",
124280
+ "name": ""
123952
124281
  },
123953
124282
  {
123954
- "kind": "method",
123955
- "name": "_isNotDeactivatedByLinearMode",
123956
- "privacy": "private",
123957
- "return": {
123958
- "type": {
123959
- "text": "boolean"
123960
- }
123961
- },
123962
- "parameters": [
123963
- {
123964
- "name": "step",
123965
- "type": {
123966
- "text": "SbbStepElement"
123967
- }
123968
- }
123969
- ]
124283
+ "description": "Use this slot to provide an `sbb-step-label`.",
124284
+ "name": "step-label"
123970
124285
  },
123971
124286
  {
123972
- "kind": "method",
123973
- "name": "_assignStep",
123974
- "privacy": "private",
123975
- "return": {
123976
- "type": {
123977
- "text": "void"
123978
- }
123979
- }
123980
- },
124287
+ "description": "Use this slot to provide an `sbb-step`.",
124288
+ "name": "step"
124289
+ }
124290
+ ],
124291
+ "members": [
123981
124292
  {
123982
124293
  "kind": "field",
123983
- "name": "iconName",
124294
+ "name": "elementName",
123984
124295
  "type": {
123985
124296
  "text": "string"
123986
124297
  },
123987
124298
  "privacy": "public",
123988
- "default": "''",
123989
- "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.",
123990
- "attribute": "icon-name",
123991
- "inheritedFrom": {
123992
- "name": "SbbIconNameMixin",
123993
- "module": "icon/icon-name-mixin.js"
123994
- }
123995
- },
123996
- {
123997
- "kind": "method",
123998
- "name": "renderIconSlot",
123999
- "privacy": "protected",
124000
- "return": {
124001
- "type": {
124002
- "text": "TemplateResult"
124003
- }
124004
- },
124005
- "parameters": [
124006
- {
124007
- "name": "classname",
124008
- "optional": true,
124009
- "type": {
124010
- "text": "string"
124011
- }
124012
- }
124013
- ],
124014
- "inheritedFrom": {
124015
- "name": "SbbIconNameMixin",
124016
- "module": "icon/icon-name-mixin.js"
124017
- }
124018
- },
124019
- {
124020
- "kind": "method",
124021
- "name": "renderIconName",
124022
- "privacy": "protected",
124023
- "return": {
124024
- "type": {
124025
- "text": "string"
124026
- }
124027
- },
124028
- "inheritedFrom": {
124029
- "name": "SbbIconNameMixin",
124030
- "module": "icon/icon-name-mixin.js"
124031
- }
124032
- },
124033
- {
124034
- "kind": "method",
124035
- "name": "_renderIconName",
124036
- "privacy": "private",
124037
- "return": {
124038
- "type": {
124039
- "text": "string"
124040
- }
124041
- },
124299
+ "static": true,
124300
+ "readonly": true,
124301
+ "default": "'sbb-stepper'",
124042
124302
  "inheritedFrom": {
124043
- "name": "SbbIconNameMixin",
124044
- "module": "icon/icon-name-mixin.js"
124303
+ "name": "SbbElement",
124304
+ "module": "core/base-elements/element.js"
124045
124305
  }
124046
124306
  },
124047
124307
  {
124048
124308
  "kind": "field",
124049
- "name": "#disabled",
124050
- "privacy": "private",
124309
+ "name": "events",
124310
+ "privacy": "public",
124311
+ "static": true,
124312
+ "readonly": true,
124313
+ "default": "{ stepchange: 'stepchange', }",
124051
124314
  "type": {
124052
- "text": "boolean"
124053
- },
124054
- "default": "false",
124055
- "inheritedFrom": {
124056
- "name": "SbbDisabledMixin",
124057
- "module": "core/mixins/disabled-mixin.js"
124058
- }
124059
- },
124060
- {
124061
- "kind": "method",
124062
- "name": "isDisabledExternally",
124063
- "privacy": "protected",
124064
- "return": {
124065
- "type": {
124066
- "text": "boolean"
124067
- }
124068
- },
124069
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
124070
- "inheritedFrom": {
124071
- "name": "SbbDisabledMixin",
124072
- "module": "core/mixins/disabled-mixin.js"
124315
+ "text": "{\n stepchange: 'stepchange',\n }"
124073
124316
  }
124074
124317
  },
124075
124318
  {
124076
124319
  "kind": "field",
124077
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
124078
- "type": {
124079
- "text": "array"
124080
- },
124320
+ "name": "_observer",
124081
124321
  "privacy": "private",
124082
- "readonly": true,
124083
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
124084
- "inheritedFrom": {
124085
- "name": "SbbButtonBaseElement",
124086
- "module": "core/base-elements/button-base-element.js"
124087
- }
124322
+ "default": "new IntersectionController(this, { target: null, callback: (entries) => { entries.forEach((e) => { if (e.intersectionRatio > 0) { this._setStepperHeight(this.selected); this._setMarkerSize(); } }); }, })",
124323
+ "description": "If the sbb-stepper is used in a sbb-dialog, the marker on the selected element will not appear,\nbecause the calculations are done when the dialog is closed, so the marker has a width of 0;\nthe same happens for the stepper height.\nWe need to recalculate it when the element becomes visible."
124088
124324
  },
124089
124325
  {
124090
124326
  "kind": "field",
124091
- "name": "value",
124327
+ "name": "linear",
124092
124328
  "type": {
124093
- "text": "string"
124329
+ "text": "boolean"
124094
124330
  },
124095
124331
  "privacy": "public",
124096
- "inheritedFrom": {
124097
- "name": "SbbButtonBaseElement",
124098
- "module": "core/base-elements/button-base-element.js"
124099
- },
124100
- "default": "''",
124101
- "description": "Value of the form element.",
124102
- "attribute": "value"
124332
+ "default": "false",
124333
+ "description": "If set to true, only the current and previous labels can be clicked and selected.",
124334
+ "attribute": "linear"
124103
124335
  },
124104
124336
  {
124105
124337
  "kind": "field",
124106
- "name": "type",
124338
+ "name": "horizontalFrom",
124107
124339
  "privacy": "public",
124108
- "description": "The type attribute to use for the button.",
124109
- "default": "'button'",
124110
- "type": {
124111
- "text": "SbbButtonType"
124112
- },
124113
- "attribute": "type",
124114
- "inheritedFrom": {
124115
- "name": "SbbButtonBaseElement",
124116
- "module": "core/base-elements/button-base-element.js"
124117
- }
124118
- },
124119
- {
124120
- "kind": "field",
124121
- "name": "form",
124340
+ "description": "Overrides the behavior of `orientation` property.",
124122
124341
  "type": {
124123
- "text": "HTMLFormElement | null"
124124
- },
124125
- "privacy": "public",
124126
- "description": "The `<form>` element to associate the button with.",
124127
- "inheritedFrom": {
124128
- "name": "SbbButtonBaseElement",
124129
- "module": "core/base-elements/button-base-element.js"
124342
+ "text": "SbbHorizontalFrom | null"
124130
124343
  },
124131
- "attribute": "form"
124344
+ "attribute": "horizontal-from",
124345
+ "reflects": true,
124346
+ "default": "null"
124132
124347
  },
124133
124348
  {
124134
124349
  "kind": "field",
124135
- "name": "_formId",
124350
+ "name": "_horizontalFrom",
124136
124351
  "type": {
124137
- "text": "string"
124138
- },
124139
- "privacy": "private",
124140
- "default": "''",
124141
- "inheritedFrom": {
124142
- "name": "SbbButtonBaseElement",
124143
- "module": "core/base-elements/button-base-element.js"
124144
- }
124145
- },
124146
- {
124147
- "kind": "field",
124148
- "name": "_handleButtonClick",
124149
- "privacy": "private",
124150
- "inheritedFrom": {
124151
- "name": "SbbButtonBaseElement",
124152
- "module": "core/base-elements/button-base-element.js"
124153
- }
124154
- },
124155
- {
124156
- "kind": "method",
124157
- "name": "_requestSubmit",
124158
- "privacy": "private",
124159
- "return": {
124160
- "type": {
124161
- "text": "void"
124162
- }
124352
+ "text": "SbbHorizontalFrom | null"
124163
124353
  },
124164
- "parameters": [
124165
- {
124166
- "name": "form",
124167
- "type": {
124168
- "text": "HTMLFormElement"
124169
- }
124170
- }
124171
- ],
124172
- "inheritedFrom": {
124173
- "name": "SbbButtonBaseElement",
124174
- "module": "core/base-elements/button-base-element.js"
124175
- }
124354
+ "privacy": "private",
124355
+ "default": "null"
124176
124356
  },
124177
124357
  {
124178
124358
  "kind": "field",
124179
- "name": "_formKeyDown",
124180
- "privacy": "private",
124181
- "inheritedFrom": {
124182
- "name": "SbbButtonBaseElement",
124183
- "module": "core/base-elements/button-base-element.js"
124184
- }
124359
+ "name": "orientation",
124360
+ "type": {
124361
+ "text": "SbbOrientation"
124362
+ },
124363
+ "privacy": "public",
124364
+ "default": "'horizontal'",
124365
+ "description": "Steps orientation, either horizontal or vertical.",
124366
+ "attribute": "orientation",
124367
+ "reflects": true
124185
124368
  },
124186
124369
  {
124187
124370
  "kind": "field",
124188
- "name": "formAssociated",
124371
+ "name": "size",
124189
124372
  "type": {
124190
- "text": "boolean"
124373
+ "text": "'s' | 'm'"
124191
124374
  },
124192
124375
  "privacy": "public",
124193
- "static": true,
124194
- "default": "true",
124195
- "inheritedFrom": {
124196
- "name": "SbbFormAssociatedMixin",
124197
- "module": "core/mixins/form-associated-mixin.js"
124198
- }
124376
+ "description": "Size variant, either s or m.",
124377
+ "default": "'m' / 's' (lean)",
124378
+ "attribute": "size",
124379
+ "reflects": true
124199
124380
  },
124200
124381
  {
124201
124382
  "kind": "field",
124202
- "name": "name",
124383
+ "name": "selected",
124203
124384
  "privacy": "public",
124204
- "description": "Name of the form element. Will be read from name attribute.",
124385
+ "description": "The currently selected step.",
124205
124386
  "type": {
124206
- "text": "string"
124207
- },
124208
- "attribute": "name",
124209
- "inheritedFrom": {
124210
- "name": "SbbFormAssociatedMixin",
124211
- "module": "core/mixins/form-associated-mixin.js"
124387
+ "text": "SbbStepElement | null"
124212
124388
  }
124213
124389
  },
124214
124390
  {
124215
124391
  "kind": "field",
124216
- "name": "validity",
124392
+ "name": "_requestedSelected",
124217
124393
  "type": {
124218
- "text": "ValidityState"
124394
+ "text": "SbbStepElement | null"
124219
124395
  },
124396
+ "privacy": "private",
124397
+ "default": "null"
124398
+ },
124399
+ {
124400
+ "kind": "field",
124401
+ "name": "selectedIndex",
124220
124402
  "privacy": "public",
124221
- "description": "Returns the ValidityState object for this element.",
124222
- "readonly": true,
124223
- "inheritedFrom": {
124224
- "name": "SbbFormAssociatedMixin",
124225
- "module": "core/mixins/form-associated-mixin.js"
124226
- }
124403
+ "description": "The currently selected step index.",
124404
+ "type": {
124405
+ "text": "number | null"
124406
+ },
124407
+ "attribute": "selected-index"
124227
124408
  },
124228
124409
  {
124229
124410
  "kind": "field",
124230
- "name": "validationMessage",
124411
+ "name": "_requestedSelectedIndex",
124231
124412
  "type": {
124232
- "text": "string"
124413
+ "text": "number | null"
124233
124414
  },
124234
- "privacy": "public",
124235
- "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.",
124236
- "readonly": true,
124237
- "inheritedFrom": {
124238
- "name": "SbbFormAssociatedMixin",
124239
- "module": "core/mixins/form-associated-mixin.js"
124240
- }
124415
+ "privacy": "private",
124416
+ "default": "null"
124241
124417
  },
124242
124418
  {
124243
124419
  "kind": "field",
124244
- "name": "willValidate",
124420
+ "name": "steps",
124245
124421
  "type": {
124246
- "text": "boolean"
124422
+ "text": "SbbStepElement[]"
124247
124423
  },
124248
124424
  "privacy": "public",
124249
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
124250
- "readonly": true,
124251
- "inheritedFrom": {
124252
- "name": "SbbFormAssociatedMixin",
124253
- "module": "core/mixins/form-associated-mixin.js"
124254
- }
124425
+ "description": "The steps of the stepper.",
124426
+ "readonly": true
124255
124427
  },
124256
124428
  {
124257
124429
  "kind": "field",
124258
- "name": "_validityStates",
124430
+ "name": "_enabledSteps",
124431
+ "type": {
124432
+ "text": "SbbStepElement[]"
124433
+ },
124259
124434
  "privacy": "private",
124260
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
124261
- "inheritedFrom": {
124262
- "name": "SbbFormAssociatedMixin",
124263
- "module": "core/mixins/form-associated-mixin.js"
124264
- }
124435
+ "readonly": true
124265
124436
  },
124266
124437
  {
124267
124438
  "kind": "field",
124268
- "name": "formDisabled",
124439
+ "name": "_loaded",
124269
124440
  "type": {
124270
124441
  "text": "boolean"
124271
124442
  },
124272
- "privacy": "protected",
124273
- "default": "false",
124274
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
124275
- "inheritedFrom": {
124276
- "name": "SbbFormAssociatedMixin",
124277
- "module": "core/mixins/form-associated-mixin.js"
124278
- }
124443
+ "privacy": "private",
124444
+ "default": "false"
124279
124445
  },
124280
124446
  {
124281
- "kind": "method",
124282
- "name": "checkValidity",
124283
- "privacy": "public",
124284
- "return": {
124285
- "type": {
124286
- "text": "boolean"
124287
- }
124447
+ "kind": "field",
124448
+ "name": "_resizeObserverTimeout",
124449
+ "type": {
124450
+ "text": "ReturnType<typeof setTimeout> | null"
124288
124451
  },
124289
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
124290
- "inheritedFrom": {
124291
- "name": "SbbFormAssociatedMixin",
124292
- "module": "core/mixins/form-associated-mixin.js"
124293
- }
124452
+ "privacy": "private",
124453
+ "default": "null"
124294
124454
  },
124295
124455
  {
124296
- "kind": "method",
124297
- "name": "reportValidity",
124298
- "privacy": "public",
124299
- "return": {
124300
- "type": {
124301
- "text": "boolean"
124302
- }
124303
- },
124304
- "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.",
124305
- "inheritedFrom": {
124306
- "name": "SbbFormAssociatedMixin",
124307
- "module": "core/mixins/form-associated-mixin.js"
124308
- }
124456
+ "kind": "field",
124457
+ "name": "_mediaMatcher",
124458
+ "privacy": "private",
124459
+ "default": "new SbbMediaMatcherController(this, {})"
124309
124460
  },
124310
124461
  {
124311
124462
  "kind": "method",
124312
- "name": "setCustomValidity",
124463
+ "name": "next",
124313
124464
  "privacy": "public",
124314
124465
  "return": {
124315
124466
  "type": {
124316
124467
  "text": "void"
124317
124468
  }
124318
124469
  },
124319
- "parameters": [
124320
- {
124321
- "name": "message",
124322
- "type": {
124323
- "text": "string"
124324
- }
124325
- }
124326
- ],
124327
- "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.",
124328
- "inheritedFrom": {
124329
- "name": "SbbFormAssociatedMixin",
124330
- "module": "core/mixins/form-associated-mixin.js"
124331
- }
124332
- },
124333
- {
124334
- "kind": "method",
124335
- "name": "_hasDisabledAncestor",
124336
- "privacy": "private",
124337
- "return": {
124338
- "type": {
124339
- "text": "boolean"
124340
- }
124341
- },
124342
- "inheritedFrom": {
124343
- "name": "SbbFormAssociatedMixin",
124344
- "module": "core/mixins/form-associated-mixin.js"
124345
- }
124470
+ "description": "Selects the next step."
124346
124471
  },
124347
124472
  {
124348
124473
  "kind": "method",
124349
- "name": "updateFormValue",
124350
- "privacy": "protected",
124474
+ "name": "previous",
124475
+ "privacy": "public",
124351
124476
  "return": {
124352
124477
  "type": {
124353
124478
  "text": "void"
124354
124479
  }
124355
124480
  },
124356
- "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",
124357
- "inheritedFrom": {
124358
- "name": "SbbFormAssociatedMixin",
124359
- "module": "core/mixins/form-associated-mixin.js"
124360
- }
124481
+ "description": "Selects the previous step."
124361
124482
  },
124362
124483
  {
124363
124484
  "kind": "method",
124364
- "name": "formState",
124365
- "privacy": "protected",
124485
+ "name": "reset",
124486
+ "privacy": "public",
124366
124487
  "return": {
124367
124488
  "type": {
124368
- "text": "FormRestoreState"
124489
+ "text": "void"
124369
124490
  }
124370
124491
  },
124371
- "inheritedFrom": {
124372
- "name": "SbbFormAssociatedMixin",
124373
- "module": "core/mixins/form-associated-mixin.js"
124374
- }
124492
+ "description": "Resets the form in which the stepper is nested or every form of each step, if any."
124375
124493
  },
124376
124494
  {
124377
124495
  "kind": "method",
124378
- "name": "setValidityFlag",
124379
- "privacy": "protected",
124496
+ "name": "_isSelectable",
124497
+ "privacy": "private",
124380
124498
  "return": {
124381
124499
  "type": {
124382
- "text": "void"
124500
+ "text": "step is SbbStepElement"
124383
124501
  }
124384
124502
  },
124385
124503
  "parameters": [
124386
124504
  {
124387
- "name": "flag",
124388
- "type": {
124389
- "text": "T"
124390
- }
124391
- },
124392
- {
124393
- "name": "message",
124394
- "type": {
124395
- "text": "string"
124396
- }
124397
- },
124398
- {
124399
- "name": "flagValue",
124400
- "optional": true,
124505
+ "name": "step",
124401
124506
  "type": {
124402
- "text": "ValidityStateFlags[T]"
124507
+ "text": "SbbStepElement | null"
124403
124508
  }
124404
124509
  }
124405
- ],
124406
- "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).",
124407
- "inheritedFrom": {
124408
- "name": "SbbFormAssociatedMixin",
124409
- "module": "core/mixins/form-associated-mixin.js"
124410
- }
124510
+ ]
124411
124511
  },
124412
124512
  {
124413
124513
  "kind": "method",
124414
- "name": "removeValidityFlag",
124415
- "privacy": "protected",
124514
+ "name": "_select",
124515
+ "privacy": "private",
124416
124516
  "return": {
124417
124517
  "type": {
124418
124518
  "text": "void"
@@ -124420,174 +124520,132 @@
124420
124520
  },
124421
124521
  "parameters": [
124422
124522
  {
124423
- "name": "flag",
124523
+ "name": "step",
124424
124524
  "type": {
124425
- "text": "T"
124525
+ "text": "SbbStepElement | null"
124426
124526
  }
124427
124527
  }
124428
- ],
124429
- "description": "Removes the validity state flag entry and updates validity state.",
124430
- "inheritedFrom": {
124431
- "name": "SbbFormAssociatedMixin",
124432
- "module": "core/mixins/form-associated-mixin.js"
124433
- }
124528
+ ]
124434
124529
  },
124435
124530
  {
124436
124531
  "kind": "method",
124437
- "name": "validate",
124438
- "privacy": "protected",
124532
+ "name": "_setMarkerSize",
124533
+ "privacy": "private",
124439
124534
  "return": {
124440
124535
  "type": {
124441
124536
  "text": "void"
124442
124537
  }
124443
- },
124444
- "description": "To be called whenever the current element needs to be validated.",
124445
- "inheritedFrom": {
124446
- "name": "SbbFormAssociatedMixin",
124447
- "module": "core/mixins/form-associated-mixin.js"
124448
124538
  }
124449
124539
  },
124450
124540
  {
124451
124541
  "kind": "method",
124452
- "name": "shouldValidate",
124453
- "privacy": "protected",
124542
+ "name": "_setStepperHeight",
124543
+ "privacy": "private",
124454
124544
  "return": {
124455
124545
  "type": {
124456
- "text": "boolean"
124546
+ "text": "void"
124457
124547
  }
124458
124548
  },
124459
124549
  "parameters": [
124460
124550
  {
124461
- "name": "name",
124551
+ "name": "step",
124462
124552
  "type": {
124463
- "text": "PropertyKey | undefined"
124553
+ "text": "SbbStepElement | null"
124464
124554
  }
124465
124555
  }
124466
124556
  ],
124467
- "description": "Whether validation should be run on a property change with the given name.",
124468
- "inheritedFrom": {
124469
- "name": "SbbFormAssociatedMixin",
124470
- "module": "core/mixins/form-associated-mixin.js"
124471
- }
124557
+ "description": "Sets the stepper height based on the height of the provided step."
124472
124558
  },
124473
124559
  {
124474
124560
  "kind": "method",
124475
- "name": "_setInternalValidity",
124561
+ "name": "_calculateLabelOffsetTop",
124476
124562
  "privacy": "private",
124477
124563
  "return": {
124478
124564
  "type": {
124479
- "text": "void"
124565
+ "text": "number | undefined"
124480
124566
  }
124481
- },
124482
- "inheritedFrom": {
124483
- "name": "SbbFormAssociatedMixin",
124484
- "module": "core/mixins/form-associated-mixin.js"
124485
124567
  }
124486
124568
  },
124487
124569
  {
124488
- "kind": "field",
124489
- "name": "_preventScrollOnSpaceKeydown",
124570
+ "kind": "method",
124571
+ "name": "_onSelectedStepResize",
124490
124572
  "privacy": "private",
124491
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
124573
+ "return": {
124574
+ "type": {
124575
+ "text": "void"
124576
+ }
124577
+ },
124492
124578
  "parameters": [
124493
124579
  {
124494
- "description": "The origin event.",
124495
- "name": "event"
124580
+ "name": "e",
124581
+ "type": {
124582
+ "text": "Event"
124583
+ }
124496
124584
  }
124497
- ],
124498
- "inheritedFrom": {
124499
- "name": "SbbButtonLikeBaseElement",
124500
- "module": "core/base-elements/button-base-element.js"
124501
- }
124585
+ ]
124502
124586
  },
124503
124587
  {
124504
- "kind": "field",
124505
- "name": "_removeActiveMarker",
124588
+ "kind": "method",
124589
+ "name": "_configure",
124506
124590
  "privacy": "private",
124507
- "inheritedFrom": {
124508
- "name": "SbbButtonLikeBaseElement",
124509
- "module": "core/base-elements/button-base-element.js"
124591
+ "return": {
124592
+ "type": {
124593
+ "text": "void"
124594
+ }
124510
124595
  }
124511
124596
  },
124512
124597
  {
124513
- "kind": "field",
124514
- "name": "_dispatchClickEventOnSpaceKeyup",
124598
+ "kind": "method",
124599
+ "name": "_updateLabels",
124515
124600
  "privacy": "private",
124516
- "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.",
124517
- "parameters": [
124518
- {
124519
- "description": "The origin event.",
124520
- "name": "event"
124601
+ "return": {
124602
+ "type": {
124603
+ "text": "void"
124521
124604
  }
124522
- ],
124523
- "inheritedFrom": {
124524
- "name": "SbbButtonLikeBaseElement",
124525
- "module": "core/base-elements/button-base-element.js"
124526
124605
  }
124527
124606
  },
124528
124607
  {
124529
- "kind": "field",
124530
- "name": "_dispatchClickEvent",
124608
+ "kind": "method",
124609
+ "name": "_checkOrientation",
124531
124610
  "privacy": "private",
124532
- "inheritedFrom": {
124533
- "name": "SbbButtonLikeBaseElement",
124534
- "module": "core/base-elements/button-base-element.js"
124535
- }
124536
- },
124537
- {
124538
- "kind": "field",
124539
- "name": "maybeDisabled",
124540
- "type": {
124541
- "text": "boolean | undefined"
124542
- },
124543
- "privacy": "protected",
124544
- "readonly": true,
124545
- "inheritedFrom": {
124546
- "name": "SbbActionBaseElement",
124547
- "module": "core/base-elements/action-base-element.js"
124611
+ "return": {
124612
+ "type": {
124613
+ "text": "void"
124614
+ }
124548
124615
  }
124549
124616
  },
124550
124617
  {
124551
124618
  "kind": "field",
124552
- "name": "maybeDisabledInteractive",
124553
- "type": {
124554
- "text": "boolean | undefined"
124555
- },
124556
- "privacy": "protected",
124557
- "readonly": true,
124558
- "inheritedFrom": {
124559
- "name": "SbbActionBaseElement",
124560
- "module": "core/base-elements/action-base-element.js"
124561
- }
124619
+ "name": "_onStepperResize",
124620
+ "privacy": "private"
124562
124621
  },
124563
124622
  {
124564
124623
  "kind": "method",
124565
- "name": "setupBaseEventHandlers",
124566
- "privacy": "protected",
124624
+ "name": "_configureLinearMode",
124625
+ "privacy": "private",
124567
124626
  "return": {
124568
124627
  "type": {
124569
124628
  "text": "void"
124570
124629
  }
124571
- },
124572
- "inheritedFrom": {
124573
- "name": "SbbActionBaseElement",
124574
- "module": "core/base-elements/action-base-element.js"
124575
124630
  }
124576
124631
  },
124577
124632
  {
124578
124633
  "kind": "method",
124579
- "name": "renderTemplate",
124580
- "privacy": "protected",
124634
+ "name": "_handleKeyDown",
124635
+ "privacy": "private",
124581
124636
  "return": {
124582
124637
  "type": {
124583
- "text": "TemplateResult"
124638
+ "text": "void"
124584
124639
  }
124585
124640
  },
124586
- "description": "Override this method to render the component template.",
124587
- "inheritedFrom": {
124588
- "name": "SbbActionBaseElement",
124589
- "module": "core/base-elements/action-base-element.js"
124590
- }
124641
+ "parameters": [
124642
+ {
124643
+ "name": "evt",
124644
+ "type": {
124645
+ "text": "KeyboardEvent"
124646
+ }
124647
+ }
124648
+ ]
124591
124649
  },
124592
124650
  {
124593
124651
  "kind": "field",
@@ -124695,109 +124753,91 @@
124695
124753
  }
124696
124754
  }
124697
124755
  ],
124698
- "mixins": [
124699
- {
124700
- "name": "SbbIconNameMixin",
124701
- "module": "icon.js"
124702
- },
124756
+ "events": [
124703
124757
  {
124704
- "name": "SbbDisabledMixin",
124705
- "module": "core/mixins.js"
124758
+ "type": {
124759
+ "text": "SbbStepChangeEvent"
124760
+ },
124761
+ "description": "Emits whenever a step was changed.",
124762
+ "name": "stepchange"
124706
124763
  }
124707
124764
  ],
124708
- "superclass": {
124709
- "name": "SbbButtonBaseElement",
124710
- "module": "core/base-elements.js"
124711
- },
124712
- "tagName": "sbb-step-label",
124713
- "customElement": true,
124714
124765
  "attributes": [
124715
124766
  {
124716
- "name": "icon-name",
124717
- "type": {
124718
- "text": "string"
124719
- },
124720
- "default": "''",
124721
- "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.",
124722
- "fieldName": "iconName",
124723
- "inheritedFrom": {
124724
- "name": "SbbIconNameMixin",
124725
- "module": "icon/icon-name-mixin.js"
124726
- }
124727
- },
124728
- {
124729
- "name": "disabled",
124730
- "description": "Whether the component is disabled.",
124731
- "default": "false",
124767
+ "name": "linear",
124732
124768
  "type": {
124733
124769
  "text": "boolean"
124734
124770
  },
124735
- "fieldName": "disabled",
124736
- "inheritedFrom": {
124737
- "name": "SbbDisabledMixin",
124738
- "module": "core/mixins/disabled-mixin.js"
124739
- }
124771
+ "default": "false",
124772
+ "description": "If set to true, only the current and previous labels can be clicked and selected.",
124773
+ "fieldName": "linear"
124740
124774
  },
124741
124775
  {
124742
- "name": "value",
124776
+ "name": "horizontal-from",
124777
+ "description": "Overrides the behavior of `orientation` property.",
124743
124778
  "type": {
124744
- "text": "string"
124779
+ "text": "SbbHorizontalFrom | null"
124745
124780
  },
124746
- "default": "''",
124747
- "description": "Value of the form element.",
124748
- "fieldName": "value",
124749
- "inheritedFrom": {
124750
- "name": "SbbButtonBaseElement",
124751
- "module": "core/base-elements/button-base-element.js"
124752
- }
124781
+ "fieldName": "horizontalFrom"
124753
124782
  },
124754
124783
  {
124755
- "name": "type",
124756
- "description": "The type attribute to use for the button.",
124757
- "default": "'button'",
124784
+ "name": "orientation",
124758
124785
  "type": {
124759
- "text": "SbbButtonType"
124786
+ "text": "SbbOrientation"
124760
124787
  },
124761
- "fieldName": "type",
124762
- "inheritedFrom": {
124763
- "name": "SbbButtonBaseElement",
124764
- "module": "core/base-elements/button-base-element.js"
124765
- }
124788
+ "default": "'horizontal'",
124789
+ "description": "Steps orientation, either horizontal or vertical.",
124790
+ "fieldName": "orientation"
124766
124791
  },
124767
124792
  {
124768
- "name": "form",
124769
- "description": "The `<form>` element to associate the button with.",
124793
+ "name": "size",
124770
124794
  "type": {
124771
- "text": "HTMLFormElement | null"
124795
+ "text": "'s' | 'm'"
124772
124796
  },
124773
- "fieldName": "form",
124774
- "inheritedFrom": {
124775
- "name": "SbbButtonBaseElement",
124776
- "module": "core/base-elements/button-base-element.js"
124777
- }
124797
+ "description": "Size variant, either s or m.",
124798
+ "default": "'m' / 's' (lean)",
124799
+ "fieldName": "size"
124778
124800
  },
124779
124801
  {
124780
- "name": "name",
124781
- "description": "Name of the form element. Will be read from name attribute.",
124802
+ "name": "selected-index",
124803
+ "description": "The currently selected step index.",
124782
124804
  "type": {
124783
- "text": "string"
124805
+ "text": "number | null"
124784
124806
  },
124785
- "fieldName": "name",
124786
- "inheritedFrom": {
124787
- "name": "SbbFormAssociatedMixin",
124788
- "module": "core/mixins/form-associated-mixin.js"
124789
- }
124807
+ "fieldName": "selectedIndex"
124790
124808
  }
124791
- ]
124809
+ ],
124810
+ "superclass": {
124811
+ "name": "SbbElement",
124812
+ "module": "core/base-elements.js"
124813
+ },
124814
+ "tagName": "sbb-stepper",
124815
+ "customElement": true
124816
+ },
124817
+ {
124818
+ "kind": "variable",
124819
+ "name": "currentIndex"
124820
+ },
124821
+ {
124822
+ "kind": "variable",
124823
+ "name": "currentStep"
124792
124824
  }
124793
124825
  ],
124794
124826
  "exports": [
124795
124827
  {
124796
124828
  "kind": "js",
124797
- "name": "SbbStepLabelElement",
124829
+ "name": "SbbStepChangeEvent",
124798
124830
  "declaration": {
124799
- "name": "SbbStepLabelElement",
124800
- "module": "stepper/step-label/step-label.component.js"
124831
+ "name": "SbbStepChangeEvent",
124832
+ "module": "stepper/stepper/stepper.component.js"
124833
+ }
124834
+ },
124835
+ {
124836
+ "kind": "js",
124837
+ "name": "SbbStepperElement",
124838
+ "declaration": {
124839
+ "name": "SbbStepperElement",
124840
+ "module": "stepper/stepper/stepper.component.js"
124801
124841
  }
124802
124842
  }
124803
124843
  ]