@sbb-esta/lyne-elements-dev 4.13.0-dev.1780925794 → 4.13.0-dev.1780984177

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/custom-elements.json +939 -939
  2. package/package.json +2 -2
@@ -106618,23 +106618,27 @@
106618
106618
  },
106619
106619
  {
106620
106620
  "kind": "javascript-module",
106621
- "path": "menu/menu/menu.component.js",
106621
+ "path": "menu/menu-button/menu-button.component.js",
106622
106622
  "declarations": [
106623
106623
  {
106624
106624
  "kind": "class",
106625
- "description": "It displays a contextual menu with one or more action element.",
106626
- "name": "SbbMenuElement",
106625
+ "description": "It displays a button element that can be used in the `sbb-menu` component.",
106626
+ "name": "SbbMenuButtonElement",
106627
106627
  "cssProperties": [
106628
106628
  {
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)"
106629
+ "description": "Can be used to modify horizontal padding.",
106630
+ "name": "--sbb-menu-action-outer-horizontal-padding",
106631
+ "default": "var(--sbb-spacing-fixed-3x)"
106632
106632
  }
106633
106633
  ],
106634
106634
  "slots": [
106635
106635
  {
106636
- "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
106636
+ "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
106637
106637
  "name": ""
106638
+ },
106639
+ {
106640
+ "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
106641
+ "name": "icon"
106638
106642
  }
106639
106643
  ],
106640
106644
  "members": [
@@ -106651,274 +106655,261 @@
106651
106655
  "name": "SbbElement",
106652
106656
  "module": "core/base-elements/element.js"
106653
106657
  },
106654
- "default": "'sbb-menu'"
106658
+ "default": "'sbb-menu-button'"
106655
106659
  },
106656
106660
  {
106657
106661
  "kind": "field",
106658
106662
  "name": "role",
106659
106663
  "type": {
106660
- "text": "string"
106664
+ "text": "ElementInternals['role']"
106661
106665
  },
106662
106666
  "privacy": "public",
106663
106667
  "static": true,
106664
106668
  "readonly": true,
106665
- "default": "'menu'"
106669
+ "default": "'menuitem'",
106670
+ "inheritedFrom": {
106671
+ "name": "SbbButtonLikeBaseElement",
106672
+ "module": "core/base-elements/button-base-element.js"
106673
+ }
106666
106674
  },
106667
106675
  {
106668
106676
  "kind": "field",
106669
- "name": "trigger",
106677
+ "name": "disabledInteractive",
106670
106678
  "type": {
106671
- "text": "HTMLElement | null"
106679
+ "text": "boolean"
106672
106680
  },
106673
106681
  "privacy": "public",
106674
- "default": "null",
106675
- "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
106676
- "attribute": "trigger"
106677
- },
106678
- {
106679
- "kind": "field",
106680
- "name": "_menu",
106681
- "type": {
106682
- "text": "HTMLDivElement"
106683
- },
106684
- "privacy": "private"
106685
- },
106686
- {
106687
- "kind": "field",
106688
- "name": "_triggerElement",
106689
- "type": {
106690
- "text": "HTMLElement | null"
106691
- },
106692
- "privacy": "private",
106693
- "default": "null"
106694
- },
106695
- {
106696
- "kind": "field",
106697
- "name": "_triggerAbortController",
106698
- "type": {
106699
- "text": "AbortController"
106700
- },
106701
- "privacy": "private"
106682
+ "default": "false",
106683
+ "description": "Whether the button should be aria-disabled but stay interactive.",
106684
+ "attribute": "disabled-interactive",
106685
+ "reflects": true,
106686
+ "inheritedFrom": {
106687
+ "name": "SbbDisabledInteractiveMixin",
106688
+ "module": "core/mixins/disabled-mixin.js"
106689
+ }
106702
106690
  },
106703
106691
  {
106704
106692
  "kind": "field",
106705
- "name": "_isPointerDownEventOnMenu",
106693
+ "name": "disabled",
106694
+ "privacy": "public",
106695
+ "description": "Whether the component is disabled.",
106696
+ "default": "false",
106706
106697
  "type": {
106707
106698
  "text": "boolean"
106708
106699
  },
106709
- "privacy": "private",
106710
- "default": "false"
106711
- },
106712
- {
106713
- "kind": "field",
106714
- "name": "_windowEventsController",
106715
- "type": {
106716
- "text": "AbortController"
106717
- },
106718
- "privacy": "private"
106719
- },
106720
- {
106721
- "kind": "field",
106722
- "name": "_escapableOverlayController",
106723
- "privacy": "private",
106724
- "default": "new SbbEscapableOverlayController(this)"
106725
- },
106726
- {
106727
- "kind": "field",
106728
- "name": "_focusTrapController",
106729
- "privacy": "private",
106730
- "default": "new SbbFocusTrapController(this)"
106731
- },
106732
- {
106733
- "kind": "field",
106734
- "name": "_scrollHandler",
106735
- "privacy": "private",
106736
- "default": "new SbbScrollHandler()"
106737
- },
106738
- {
106739
- "kind": "field",
106740
- "name": "_inertController",
106741
- "privacy": "private",
106742
- "default": "new SbbInertController(this)"
106743
- },
106744
- {
106745
- "kind": "field",
106746
- "name": "_mobileBreakpoint",
106747
- "privacy": "private",
106748
- "default": "SbbMediaQueryBreakpointSmallAndBelow"
106749
- },
106750
- {
106751
- "kind": "field",
106752
- "name": "_mediaMatcher",
106753
- "privacy": "private",
106754
- "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
106755
- },
106756
- {
106757
- "kind": "field",
106758
- "name": "_darkModeController",
106759
- "privacy": "private",
106760
- "default": "new SbbDarkModeController(this, () => this._syncNegative())"
106700
+ "attribute": "disabled",
106701
+ "reflects": true,
106702
+ "inheritedFrom": {
106703
+ "name": "SbbDisabledMixin",
106704
+ "module": "core/mixins/disabled-mixin.js"
106705
+ }
106761
106706
  },
106762
106707
  {
106763
106708
  "kind": "field",
106764
- "name": "_language",
106709
+ "name": "#disabled",
106765
106710
  "privacy": "private",
106766
- "default": "new SbbLanguageController(this)"
106767
- },
106768
- {
106769
- "kind": "field",
106770
- "name": "_nestedMenu",
106771
106711
  "type": {
106772
- "text": "SbbMenuElement | null"
106712
+ "text": "boolean"
106773
106713
  },
106774
- "privacy": "private",
106775
- "default": "null"
106714
+ "default": "false",
106715
+ "inheritedFrom": {
106716
+ "name": "SbbDisabledMixin",
106717
+ "module": "core/mixins/disabled-mixin.js"
106718
+ }
106776
106719
  },
106777
106720
  {
106778
106721
  "kind": "method",
106779
- "name": "escapeStrategy",
106780
- "privacy": "public",
106722
+ "name": "isDisabledExternally",
106723
+ "privacy": "protected",
106781
106724
  "return": {
106782
106725
  "type": {
106783
- "text": "void"
106726
+ "text": "boolean"
106784
106727
  }
106785
106728
  },
106786
- "description": "The method which is called on escape key press. Defaults to calling close()",
106729
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
106787
106730
  "inheritedFrom": {
106788
- "name": "SbbOpenCloseBaseElement",
106789
- "module": "core/base-elements/open-close-base-element.js"
106731
+ "name": "SbbDisabledMixin",
106732
+ "module": "core/mixins/disabled-mixin.js"
106790
106733
  }
106791
106734
  },
106792
106735
  {
106793
- "kind": "method",
106794
- "name": "open",
106795
- "privacy": "public",
106796
- "return": {
106797
- "type": {
106798
- "text": "void"
106799
- }
106736
+ "kind": "field",
106737
+ "name": "styles",
106738
+ "type": {
106739
+ "text": "CSSResultGroup"
106800
106740
  },
106801
- "description": "Opens the menu on trigger click.",
106741
+ "privacy": "public",
106742
+ "static": true,
106743
+ "default": "[boxSizingStyles, unsafeCSS(style)]",
106802
106744
  "inheritedFrom": {
106803
- "name": "SbbOpenCloseBaseElement",
106804
- "module": "core/base-elements/open-close-base-element.js"
106745
+ "name": "SbbMenuActionCommonElementMixin",
106746
+ "module": "menu/common/menu-action-common.js"
106805
106747
  }
106806
106748
  },
106807
106749
  {
106808
106750
  "kind": "method",
106809
- "name": "close",
106810
- "privacy": "public",
106751
+ "name": "renderTemplate",
106752
+ "privacy": "protected",
106811
106753
  "return": {
106812
106754
  "type": {
106813
- "text": "void"
106755
+ "text": "TemplateResult"
106814
106756
  }
106815
106757
  },
106816
- "description": "Closes the menu and all its nested menus.",
106758
+ "description": "Override this method to render the component template.",
106817
106759
  "inheritedFrom": {
106818
- "name": "SbbOpenCloseBaseElement",
106819
- "module": "core/base-elements/open-close-base-element.js"
106760
+ "name": "SbbActionBaseElement",
106761
+ "module": "core/base-elements/action-base-element.js"
106820
106762
  }
106821
106763
  },
106822
106764
  {
106823
- "kind": "method",
106824
- "name": "closeAll",
106825
- "privacy": "public",
106826
- "return": {
106827
- "type": {
106828
- "text": "void"
106829
- }
106765
+ "kind": "field",
106766
+ "name": "iconName",
106767
+ "type": {
106768
+ "text": "string"
106830
106769
  },
106831
- "description": "Closes the menu and all related menus (nested and parent menus)."
106770
+ "privacy": "public",
106771
+ "default": "''",
106772
+ "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.",
106773
+ "attribute": "icon-name",
106774
+ "inheritedFrom": {
106775
+ "name": "SbbIconNameMixin",
106776
+ "module": "icon/icon-name-mixin.js"
106777
+ }
106832
106778
  },
106833
106779
  {
106834
106780
  "kind": "method",
106835
- "name": "_close",
106836
- "privacy": "private",
106781
+ "name": "renderIconSlot",
106782
+ "privacy": "protected",
106837
106783
  "return": {
106838
106784
  "type": {
106839
- "text": "void"
106785
+ "text": "TemplateResult"
106840
106786
  }
106841
106787
  },
106842
106788
  "parameters": [
106843
106789
  {
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
106790
+ "name": "classname",
106791
+ "optional": true,
106792
+ "type": {
106793
+ "text": "string"
106794
+ }
106848
106795
  }
106849
- ]
106796
+ ],
106797
+ "inheritedFrom": {
106798
+ "name": "SbbIconNameMixin",
106799
+ "module": "icon/icon-name-mixin.js"
106800
+ }
106850
106801
  },
106851
106802
  {
106852
106803
  "kind": "method",
106853
- "name": "_isZeroAnimationDuration",
106854
- "privacy": "private",
106804
+ "name": "renderIconName",
106805
+ "privacy": "protected",
106855
106806
  "return": {
106856
106807
  "type": {
106857
- "text": "boolean"
106808
+ "text": "string"
106858
106809
  }
106810
+ },
106811
+ "inheritedFrom": {
106812
+ "name": "SbbIconNameMixin",
106813
+ "module": "icon/icon-name-mixin.js"
106859
106814
  }
106860
106815
  },
106861
106816
  {
106862
106817
  "kind": "method",
106863
- "name": "_handleOpening",
106818
+ "name": "_renderIconName",
106864
106819
  "privacy": "private",
106865
106820
  "return": {
106866
106821
  "type": {
106867
- "text": "void"
106822
+ "text": "string"
106868
106823
  }
106824
+ },
106825
+ "inheritedFrom": {
106826
+ "name": "SbbIconNameMixin",
106827
+ "module": "icon/icon-name-mixin.js"
106869
106828
  }
106870
106829
  },
106871
106830
  {
106872
- "kind": "method",
106873
- "name": "_handleClosing",
106831
+ "kind": "field",
106832
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
106833
+ "type": {
106834
+ "text": "array"
106835
+ },
106874
106836
  "privacy": "private",
106875
- "return": {
106876
- "type": {
106877
- "text": "void"
106878
- }
106837
+ "readonly": true,
106838
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
106839
+ "inheritedFrom": {
106840
+ "name": "SbbButtonBaseElement",
106841
+ "module": "core/base-elements/button-base-element.js"
106879
106842
  }
106880
106843
  },
106881
106844
  {
106882
- "kind": "method",
106883
- "name": "_handleKeyDown",
106884
- "privacy": "private",
106885
- "return": {
106886
- "type": {
106887
- "text": "void"
106888
- }
106845
+ "kind": "field",
106846
+ "name": "value",
106847
+ "type": {
106848
+ "text": "string"
106889
106849
  },
106890
- "parameters": [
106891
- {
106892
- "name": "evt",
106893
- "type": {
106894
- "text": "KeyboardEvent"
106895
- }
106896
- }
106897
- ]
106850
+ "privacy": "public",
106851
+ "inheritedFrom": {
106852
+ "name": "SbbButtonBaseElement",
106853
+ "module": "core/base-elements/button-base-element.js"
106854
+ },
106855
+ "default": "''",
106856
+ "description": "Value of the form element.",
106857
+ "attribute": "value"
106898
106858
  },
106899
106859
  {
106900
- "kind": "method",
106901
- "name": "_configureTrigger",
106860
+ "kind": "field",
106861
+ "name": "type",
106862
+ "privacy": "public",
106863
+ "description": "The type attribute to use for the button.",
106864
+ "default": "'button'",
106865
+ "type": {
106866
+ "text": "SbbButtonType"
106867
+ },
106868
+ "attribute": "type",
106869
+ "inheritedFrom": {
106870
+ "name": "SbbButtonBaseElement",
106871
+ "module": "core/base-elements/button-base-element.js"
106872
+ }
106873
+ },
106874
+ {
106875
+ "kind": "field",
106876
+ "name": "form",
106877
+ "type": {
106878
+ "text": "HTMLFormElement | null"
106879
+ },
106880
+ "privacy": "public",
106881
+ "description": "The `<form>` element to associate the button with.",
106882
+ "inheritedFrom": {
106883
+ "name": "SbbButtonBaseElement",
106884
+ "module": "core/base-elements/button-base-element.js"
106885
+ },
106886
+ "attribute": "form"
106887
+ },
106888
+ {
106889
+ "kind": "field",
106890
+ "name": "_formId",
106891
+ "type": {
106892
+ "text": "string"
106893
+ },
106902
106894
  "privacy": "private",
106903
- "return": {
106904
- "type": {
106905
- "text": "void"
106906
- }
106895
+ "default": "''",
106896
+ "inheritedFrom": {
106897
+ "name": "SbbButtonBaseElement",
106898
+ "module": "core/base-elements/button-base-element.js"
106907
106899
  }
106908
106900
  },
106909
106901
  {
106910
- "kind": "method",
106911
- "name": "_attachWindowEvents",
106902
+ "kind": "field",
106903
+ "name": "_handleButtonClick",
106912
106904
  "privacy": "private",
106913
- "return": {
106914
- "type": {
106915
- "text": "void"
106916
- }
106905
+ "inheritedFrom": {
106906
+ "name": "SbbButtonBaseElement",
106907
+ "module": "core/base-elements/button-base-element.js"
106917
106908
  }
106918
106909
  },
106919
106910
  {
106920
106911
  "kind": "method",
106921
- "name": "_interactiveElementClick",
106912
+ "name": "_requestSubmit",
106922
106913
  "privacy": "private",
106923
106914
  "return": {
106924
106915
  "type": {
@@ -106927,79 +106918,154 @@
106927
106918
  },
106928
106919
  "parameters": [
106929
106920
  {
106930
- "name": "event",
106921
+ "name": "form",
106931
106922
  "type": {
106932
- "text": "Event"
106923
+ "text": "HTMLFormElement"
106933
106924
  }
106934
106925
  }
106935
- ]
106926
+ ],
106927
+ "inheritedFrom": {
106928
+ "name": "SbbButtonBaseElement",
106929
+ "module": "core/base-elements/button-base-element.js"
106930
+ }
106936
106931
  },
106937
106932
  {
106938
106933
  "kind": "field",
106939
- "name": "_pointerDownListener",
106940
- "privacy": "private"
106934
+ "name": "_formKeyDown",
106935
+ "privacy": "private",
106936
+ "inheritedFrom": {
106937
+ "name": "SbbButtonBaseElement",
106938
+ "module": "core/base-elements/button-base-element.js"
106939
+ }
106941
106940
  },
106942
106941
  {
106943
106942
  "kind": "field",
106944
- "name": "_closeOnBackdropClick",
106945
- "privacy": "private"
106943
+ "name": "formAssociated",
106944
+ "type": {
106945
+ "text": "boolean"
106946
+ },
106947
+ "privacy": "public",
106948
+ "static": true,
106949
+ "default": "true",
106950
+ "inheritedFrom": {
106951
+ "name": "SbbFormAssociatedMixin",
106952
+ "module": "core/mixins/form-associated-mixin.js"
106953
+ }
106946
106954
  },
106947
106955
  {
106948
- "kind": "method",
106949
- "name": "_nestedMenus",
106950
- "privacy": "private",
106951
- "return": {
106952
- "type": {
106953
- "text": "SbbMenuElement[]"
106954
- }
106956
+ "kind": "field",
106957
+ "name": "name",
106958
+ "privacy": "public",
106959
+ "description": "Name of the form element. Will be read from name attribute.",
106960
+ "type": {
106961
+ "text": "string"
106955
106962
  },
106956
- "description": "Converts the linked list into an array of SbbMenuElement."
106963
+ "attribute": "name",
106964
+ "inheritedFrom": {
106965
+ "name": "SbbFormAssociatedMixin",
106966
+ "module": "core/mixins/form-associated-mixin.js"
106967
+ }
106957
106968
  },
106958
106969
  {
106959
- "kind": "method",
106960
- "name": "_parentMenu",
106961
- "privacy": "private",
106962
- "return": {
106963
- "type": {
106964
- "text": "SbbMenuElement | null"
106965
- }
106970
+ "kind": "field",
106971
+ "name": "validity",
106972
+ "type": {
106973
+ "text": "ValidityState"
106974
+ },
106975
+ "privacy": "public",
106976
+ "description": "Returns the ValidityState object for this element.",
106977
+ "readonly": true,
106978
+ "inheritedFrom": {
106979
+ "name": "SbbFormAssociatedMixin",
106980
+ "module": "core/mixins/form-associated-mixin.js"
106966
106981
  }
106967
106982
  },
106968
106983
  {
106969
- "kind": "method",
106970
- "name": "_mainMenu",
106984
+ "kind": "field",
106985
+ "name": "validationMessage",
106986
+ "type": {
106987
+ "text": "string"
106988
+ },
106989
+ "privacy": "public",
106990
+ "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.",
106991
+ "readonly": true,
106992
+ "inheritedFrom": {
106993
+ "name": "SbbFormAssociatedMixin",
106994
+ "module": "core/mixins/form-associated-mixin.js"
106995
+ }
106996
+ },
106997
+ {
106998
+ "kind": "field",
106999
+ "name": "willValidate",
107000
+ "type": {
107001
+ "text": "boolean"
107002
+ },
107003
+ "privacy": "public",
107004
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
107005
+ "readonly": true,
107006
+ "inheritedFrom": {
107007
+ "name": "SbbFormAssociatedMixin",
107008
+ "module": "core/mixins/form-associated-mixin.js"
107009
+ }
107010
+ },
107011
+ {
107012
+ "kind": "field",
107013
+ "name": "_validityStates",
106971
107014
  "privacy": "private",
106972
- "return": {
106973
- "type": {
106974
- "text": "SbbMenuElement"
106975
- }
107015
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
107016
+ "inheritedFrom": {
107017
+ "name": "SbbFormAssociatedMixin",
107018
+ "module": "core/mixins/form-associated-mixin.js"
107019
+ }
107020
+ },
107021
+ {
107022
+ "kind": "field",
107023
+ "name": "formDisabled",
107024
+ "type": {
107025
+ "text": "boolean"
106976
107026
  },
106977
- "description": "The outermost menu."
107027
+ "privacy": "protected",
107028
+ "default": "false",
107029
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
107030
+ "inheritedFrom": {
107031
+ "name": "SbbFormAssociatedMixin",
107032
+ "module": "core/mixins/form-associated-mixin.js"
107033
+ }
106978
107034
  },
106979
107035
  {
106980
107036
  "kind": "method",
106981
- "name": "_isNested",
106982
- "privacy": "private",
107037
+ "name": "checkValidity",
107038
+ "privacy": "public",
106983
107039
  "return": {
106984
107040
  "type": {
106985
107041
  "text": "boolean"
106986
107042
  }
107043
+ },
107044
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
107045
+ "inheritedFrom": {
107046
+ "name": "SbbFormAssociatedMixin",
107047
+ "module": "core/mixins/form-associated-mixin.js"
106987
107048
  }
106988
107049
  },
106989
107050
  {
106990
107051
  "kind": "method",
106991
- "name": "_updateNestedInert",
106992
- "privacy": "private",
107052
+ "name": "reportValidity",
107053
+ "privacy": "public",
106993
107054
  "return": {
106994
107055
  "type": {
106995
- "text": "void"
107056
+ "text": "boolean"
106996
107057
  }
107058
+ },
107059
+ "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.",
107060
+ "inheritedFrom": {
107061
+ "name": "SbbFormAssociatedMixin",
107062
+ "module": "core/mixins/form-associated-mixin.js"
106997
107063
  }
106998
107064
  },
106999
107065
  {
107000
107066
  "kind": "method",
107001
- "name": "_handleMouseOver",
107002
- "privacy": "private",
107067
+ "name": "setCustomValidity",
107068
+ "privacy": "public",
107003
107069
  "return": {
107004
107070
  "type": {
107005
107071
  "text": "void"
@@ -107007,405 +107073,208 @@
107007
107073
  },
107008
107074
  "parameters": [
107009
107075
  {
107010
- "name": "event",
107076
+ "name": "message",
107011
107077
  "type": {
107012
- "text": "MouseEvent"
107078
+ "text": "string"
107013
107079
  }
107014
107080
  }
107015
- ]
107081
+ ],
107082
+ "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.",
107083
+ "inheritedFrom": {
107084
+ "name": "SbbFormAssociatedMixin",
107085
+ "module": "core/mixins/form-associated-mixin.js"
107086
+ }
107016
107087
  },
107017
107088
  {
107018
107089
  "kind": "method",
107019
- "name": "_onMenuAnimationEnd",
107090
+ "name": "_hasDisabledAncestor",
107020
107091
  "privacy": "private",
107021
107092
  "return": {
107022
107093
  "type": {
107023
- "text": "void"
107094
+ "text": "boolean"
107024
107095
  }
107025
107096
  },
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
- }
107097
+ "inheritedFrom": {
107098
+ "name": "SbbFormAssociatedMixin",
107099
+ "module": "core/mixins/form-associated-mixin.js"
107043
107100
  }
107044
107101
  },
107045
107102
  {
107046
107103
  "kind": "method",
107047
- "name": "_syncNegative",
107048
- "privacy": "private",
107104
+ "name": "updateFormValue",
107105
+ "privacy": "protected",
107049
107106
  "return": {
107050
107107
  "type": {
107051
107108
  "text": "void"
107052
107109
  }
107053
- }
107054
- },
107055
- {
107056
- "kind": "method",
107057
- "name": "_isMobile",
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
- },
107075
- "inheritedFrom": {
107076
- "name": "SbbOpenCloseBaseElement",
107077
- "module": "core/base-elements/open-close-base-element.js"
107078
- }
107079
- },
107080
- {
107081
- "kind": "field",
107082
- "name": "state",
107083
- "privacy": "protected",
107084
- "description": "The state of the component.",
107085
- "type": {
107086
- "text": "SbbOpenedClosedState"
107087
107110
  },
107088
- "default": "'closed'",
107089
- "inheritedFrom": {
107090
- "name": "SbbOpenCloseBaseElement",
107091
- "module": "core/base-elements/open-close-base-element.js"
107092
- }
107093
- },
107094
- {
107095
- "kind": "field",
107096
- "name": "_state",
107097
- "type": {
107098
- "text": "SbbOpenedClosedState"
107099
- },
107100
- "privacy": "private",
107101
- "inheritedFrom": {
107102
- "name": "SbbOpenCloseBaseElement",
107103
- "module": "core/base-elements/open-close-base-element.js"
107104
- }
107105
- },
107106
- {
107107
- "kind": "field",
107108
- "name": "isOpen",
107109
- "type": {
107110
- "text": "boolean"
107111
- },
107112
- "privacy": "public",
107113
- "description": "Whether the element is open.",
107114
- "readonly": true,
107111
+ "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",
107115
107112
  "inheritedFrom": {
107116
- "name": "SbbOpenCloseBaseElement",
107117
- "module": "core/base-elements/open-close-base-element.js"
107113
+ "name": "SbbFormAssociatedMixin",
107114
+ "module": "core/mixins/form-associated-mixin.js"
107118
107115
  }
107119
107116
  },
107120
107117
  {
107121
107118
  "kind": "method",
107122
- "name": "dispatchBeforeOpenEvent",
107119
+ "name": "formState",
107123
107120
  "privacy": "protected",
107124
107121
  "return": {
107125
107122
  "type": {
107126
- "text": "boolean"
107123
+ "text": "FormRestoreState"
107127
107124
  }
107128
107125
  },
107129
107126
  "inheritedFrom": {
107130
- "name": "SbbOpenCloseBaseElement",
107131
- "module": "core/base-elements/open-close-base-element.js"
107127
+ "name": "SbbFormAssociatedMixin",
107128
+ "module": "core/mixins/form-associated-mixin.js"
107132
107129
  }
107133
107130
  },
107134
107131
  {
107135
107132
  "kind": "method",
107136
- "name": "dispatchOpenEvent",
107133
+ "name": "setValidityFlag",
107137
107134
  "privacy": "protected",
107138
107135
  "return": {
107139
107136
  "type": {
107140
- "text": "boolean"
107137
+ "text": "void"
107141
107138
  }
107142
107139
  },
107140
+ "parameters": [
107141
+ {
107142
+ "name": "flag",
107143
+ "type": {
107144
+ "text": "T"
107145
+ }
107146
+ },
107147
+ {
107148
+ "name": "message",
107149
+ "type": {
107150
+ "text": "string"
107151
+ }
107152
+ },
107153
+ {
107154
+ "name": "flagValue",
107155
+ "optional": true,
107156
+ "type": {
107157
+ "text": "ValidityStateFlags[T]"
107158
+ }
107159
+ }
107160
+ ],
107161
+ "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).",
107143
107162
  "inheritedFrom": {
107144
- "name": "SbbOpenCloseBaseElement",
107145
- "module": "core/base-elements/open-close-base-element.js"
107163
+ "name": "SbbFormAssociatedMixin",
107164
+ "module": "core/mixins/form-associated-mixin.js"
107146
107165
  }
107147
107166
  },
107148
107167
  {
107149
107168
  "kind": "method",
107150
- "name": "dispatchBeforeCloseEvent",
107169
+ "name": "removeValidityFlag",
107151
107170
  "privacy": "protected",
107152
107171
  "return": {
107153
107172
  "type": {
107154
- "text": "boolean"
107173
+ "text": "void"
107155
107174
  }
107156
107175
  },
107176
+ "parameters": [
107177
+ {
107178
+ "name": "flag",
107179
+ "type": {
107180
+ "text": "T"
107181
+ }
107182
+ }
107183
+ ],
107184
+ "description": "Removes the validity state flag entry and updates validity state.",
107157
107185
  "inheritedFrom": {
107158
- "name": "SbbOpenCloseBaseElement",
107159
- "module": "core/base-elements/open-close-base-element.js"
107186
+ "name": "SbbFormAssociatedMixin",
107187
+ "module": "core/mixins/form-associated-mixin.js"
107160
107188
  }
107161
107189
  },
107162
107190
  {
107163
107191
  "kind": "method",
107164
- "name": "dispatchCloseEvent",
107192
+ "name": "validate",
107165
107193
  "privacy": "protected",
107166
107194
  "return": {
107167
107195
  "type": {
107168
- "text": "boolean"
107196
+ "text": "void"
107169
107197
  }
107170
107198
  },
107199
+ "description": "To be called whenever the current element needs to be validated.",
107171
107200
  "inheritedFrom": {
107172
- "name": "SbbOpenCloseBaseElement",
107173
- "module": "core/base-elements/open-close-base-element.js"
107174
- }
107175
- },
107176
- {
107177
- "kind": "field",
107178
- "name": "_hydrationRequired",
107179
- "type": {
107180
- "text": "boolean"
107181
- },
107182
- "privacy": "private",
107183
- "default": "!!this.shadowRoot",
107184
- "inheritedFrom": {
107185
- "name": "SbbElement",
107186
- "module": "core/base-elements/element.js"
107187
- }
107188
- },
107189
- {
107190
- "kind": "field",
107191
- "name": "_hydrationComplete",
107192
- "privacy": "private",
107193
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
107194
- "inheritedFrom": {
107195
- "name": "SbbElement",
107196
- "module": "core/base-elements/element.js"
107197
- }
107198
- },
107199
- {
107200
- "kind": "field",
107201
- "name": "_resolveHydration",
107202
- "type": {
107203
- "text": "(hydrationRequired: boolean) => void"
107204
- },
107205
- "privacy": "private",
107206
- "inheritedFrom": {
107207
- "name": "SbbElement",
107208
- "module": "core/base-elements/element.js"
107201
+ "name": "SbbFormAssociatedMixin",
107202
+ "module": "core/mixins/form-associated-mixin.js"
107209
107203
  }
107210
107204
  },
107211
- {
107212
- "kind": "field",
107213
- "name": "hydrationRequired",
107214
- "type": {
107215
- "text": "boolean"
107216
- },
107217
- "privacy": "protected",
107218
- "description": "Returns whether hydration is required and not completed.",
107219
- "readonly": true,
107220
- "inheritedFrom": {
107221
- "name": "SbbElement",
107222
- "module": "core/base-elements/element.js"
107223
- },
107224
- "default": "!!this.shadowRoot"
107225
- },
107226
107205
  {
107227
107206
  "kind": "method",
107228
- "name": "toggleState",
107207
+ "name": "shouldValidate",
107229
107208
  "privacy": "protected",
107230
107209
  "return": {
107231
107210
  "type": {
107232
- "text": "void"
107211
+ "text": "boolean"
107233
107212
  }
107234
107213
  },
107235
107214
  "parameters": [
107236
107215
  {
107237
- "name": "value",
107238
- "type": {
107239
- "text": "string"
107240
- }
107241
- },
107242
- {
107243
- "name": "force",
107244
- "optional": true,
107216
+ "name": "name",
107245
107217
  "type": {
107246
- "text": "boolean"
107218
+ "text": "PropertyKey | undefined"
107247
107219
  }
107248
107220
  }
107249
107221
  ],
107222
+ "description": "Whether validation should be run on a property change with the given name.",
107250
107223
  "inheritedFrom": {
107251
- "name": "SbbElement",
107252
- "module": "core/base-elements/element.js"
107253
- }
107254
- },
107255
- {
107256
- "kind": "field",
107257
- "name": "['_$sbbElement$']",
107258
- "type": {
107259
- "text": "boolean"
107260
- },
107261
- "privacy": "public",
107262
- "static": true,
107263
- "default": "true",
107264
- "inheritedFrom": {
107265
- "name": "SbbElement",
107266
- "module": "core/base-elements/element.js"
107267
- }
107268
- },
107269
- {
107270
- "kind": "field",
107271
- "name": "_controllers",
107272
- "type": {
107273
- "text": "Set<SbbReactiveController> | undefined"
107274
- },
107275
- "privacy": "private",
107276
- "inheritedFrom": {
107277
- "name": "SbbElement",
107278
- "module": "core/base-elements/element.js"
107279
- }
107280
- }
107281
- ],
107282
- "attributes": [
107283
- {
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"
107291
- }
107292
- ],
107293
- "superclass": {
107294
- "name": "SbbOpenCloseBaseElement",
107295
- "module": "core/base-elements.js"
107296
- },
107297
- "tagName": "sbb-menu",
107298
- "customElement": true,
107299
- "events": [
107300
- {
107301
- "name": "beforeopen",
107302
- "type": {
107303
- "text": "Event"
107304
- },
107305
- "description": "Emits whenever the component starts the opening transition. Can be canceled.",
107306
- "inheritedFrom": {
107307
- "name": "SbbOpenCloseBaseElement",
107308
- "module": "core/base-elements/open-close-base-element.js"
107309
- }
107310
- },
107311
- {
107312
- "name": "open",
107313
- "type": {
107314
- "text": "Event"
107315
- },
107316
- "description": "Emits whenever the component is opened.",
107317
- "inheritedFrom": {
107318
- "name": "SbbOpenCloseBaseElement",
107319
- "module": "core/base-elements/open-close-base-element.js"
107320
- }
107321
- },
107322
- {
107323
- "name": "beforeclose",
107324
- "type": {
107325
- "text": "Event"
107326
- },
107327
- "description": "Emits whenever the component begins the closing transition. Can be canceled.",
107328
- "inheritedFrom": {
107329
- "name": "SbbOpenCloseBaseElement",
107330
- "module": "core/base-elements/open-close-base-element.js"
107224
+ "name": "SbbFormAssociatedMixin",
107225
+ "module": "core/mixins/form-associated-mixin.js"
107331
107226
  }
107332
107227
  },
107333
107228
  {
107334
- "name": "close",
107335
- "type": {
107336
- "text": "Event"
107337
- },
107338
- "description": "Emits whenever the component is closed.",
107339
- "inheritedFrom": {
107340
- "name": "SbbOpenCloseBaseElement",
107341
- "module": "core/base-elements/open-close-base-element.js"
107342
- }
107343
- }
107344
- ]
107345
- }
107346
- ],
107347
- "exports": [
107348
- {
107349
- "kind": "js",
107350
- "name": "SbbMenuElement",
107351
- "declaration": {
107352
- "name": "SbbMenuElement",
107353
- "module": "menu/menu/menu.component.js"
107354
- }
107355
- }
107356
- ]
107357
- },
107358
- {
107359
- "kind": "javascript-module",
107360
- "path": "menu/menu-button/menu-button.component.js",
107361
- "declarations": [
107362
- {
107363
- "kind": "class",
107364
- "description": "It displays a button element that can be used in the `sbb-menu` component.",
107365
- "name": "SbbMenuButtonElement",
107366
- "cssProperties": [
107367
- {
107368
- "description": "Can be used to modify horizontal padding.",
107369
- "name": "--sbb-menu-action-outer-horizontal-padding",
107370
- "default": "var(--sbb-spacing-fixed-3x)"
107371
- }
107372
- ],
107373
- "slots": [
107374
- {
107375
- "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
107376
- "name": ""
107229
+ "kind": "method",
107230
+ "name": "_setInternalValidity",
107231
+ "privacy": "private",
107232
+ "return": {
107233
+ "type": {
107234
+ "text": "void"
107235
+ }
107236
+ },
107237
+ "inheritedFrom": {
107238
+ "name": "SbbFormAssociatedMixin",
107239
+ "module": "core/mixins/form-associated-mixin.js"
107240
+ }
107377
107241
  },
107378
107242
  {
107379
- "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
107380
- "name": "icon"
107381
- }
107382
- ],
107383
- "members": [
107243
+ "kind": "field",
107244
+ "name": "_preventScrollOnSpaceKeydown",
107245
+ "privacy": "private",
107246
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
107247
+ "parameters": [
107248
+ {
107249
+ "description": "The origin event.",
107250
+ "name": "event"
107251
+ }
107252
+ ],
107253
+ "inheritedFrom": {
107254
+ "name": "SbbButtonLikeBaseElement",
107255
+ "module": "core/base-elements/button-base-element.js"
107256
+ }
107257
+ },
107384
107258
  {
107385
107259
  "kind": "field",
107386
- "name": "elementName",
107387
- "type": {
107388
- "text": "string"
107389
- },
107390
- "privacy": "public",
107391
- "static": true,
107392
- "readonly": true,
107260
+ "name": "_removeActiveMarker",
107261
+ "privacy": "private",
107393
107262
  "inheritedFrom": {
107394
- "name": "SbbElement",
107395
- "module": "core/base-elements/element.js"
107396
- },
107397
- "default": "'sbb-menu-button'"
107263
+ "name": "SbbButtonLikeBaseElement",
107264
+ "module": "core/base-elements/button-base-element.js"
107265
+ }
107398
107266
  },
107399
107267
  {
107400
107268
  "kind": "field",
107401
- "name": "role",
107402
- "type": {
107403
- "text": "ElementInternals['role']"
107404
- },
107405
- "privacy": "public",
107406
- "static": true,
107407
- "readonly": true,
107408
- "default": "'menuitem'",
107269
+ "name": "_dispatchClickEventOnSpaceKeyup",
107270
+ "privacy": "private",
107271
+ "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.",
107272
+ "parameters": [
107273
+ {
107274
+ "description": "The origin event.",
107275
+ "name": "event"
107276
+ }
107277
+ ],
107409
107278
  "inheritedFrom": {
107410
107279
  "name": "SbbButtonLikeBaseElement",
107411
107280
  "module": "core/base-elements/button-base-element.js"
@@ -107413,464 +107282,545 @@
107413
107282
  },
107414
107283
  {
107415
107284
  "kind": "field",
107416
- "name": "disabledInteractive",
107417
- "type": {
107418
- "text": "boolean"
107419
- },
107420
- "privacy": "public",
107421
- "default": "false",
107422
- "description": "Whether the button should be aria-disabled but stay interactive.",
107423
- "attribute": "disabled-interactive",
107424
- "reflects": true,
107285
+ "name": "_dispatchClickEvent",
107286
+ "privacy": "private",
107425
107287
  "inheritedFrom": {
107426
- "name": "SbbDisabledInteractiveMixin",
107427
- "module": "core/mixins/disabled-mixin.js"
107288
+ "name": "SbbButtonLikeBaseElement",
107289
+ "module": "core/base-elements/button-base-element.js"
107428
107290
  }
107429
107291
  },
107430
107292
  {
107431
107293
  "kind": "field",
107432
- "name": "disabled",
107433
- "privacy": "public",
107434
- "description": "Whether the component is disabled.",
107435
- "default": "false",
107294
+ "name": "maybeDisabled",
107436
107295
  "type": {
107437
- "text": "boolean"
107296
+ "text": "boolean | undefined"
107438
107297
  },
107439
- "attribute": "disabled",
107440
- "reflects": true,
107298
+ "privacy": "protected",
107299
+ "readonly": true,
107441
107300
  "inheritedFrom": {
107442
- "name": "SbbDisabledMixin",
107443
- "module": "core/mixins/disabled-mixin.js"
107301
+ "name": "SbbActionBaseElement",
107302
+ "module": "core/base-elements/action-base-element.js"
107444
107303
  }
107445
107304
  },
107446
107305
  {
107447
107306
  "kind": "field",
107448
- "name": "#disabled",
107449
- "privacy": "private",
107307
+ "name": "maybeDisabledInteractive",
107450
107308
  "type": {
107451
- "text": "boolean"
107309
+ "text": "boolean | undefined"
107452
107310
  },
107453
- "default": "false",
107311
+ "privacy": "protected",
107312
+ "readonly": true,
107454
107313
  "inheritedFrom": {
107455
- "name": "SbbDisabledMixin",
107456
- "module": "core/mixins/disabled-mixin.js"
107314
+ "name": "SbbActionBaseElement",
107315
+ "module": "core/base-elements/action-base-element.js"
107457
107316
  }
107458
107317
  },
107459
107318
  {
107460
107319
  "kind": "method",
107461
- "name": "isDisabledExternally",
107320
+ "name": "setupBaseEventHandlers",
107462
107321
  "privacy": "protected",
107463
107322
  "return": {
107464
107323
  "type": {
107465
- "text": "boolean"
107324
+ "text": "void"
107466
107325
  }
107467
107326
  },
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
107327
  "inheritedFrom": {
107470
- "name": "SbbDisabledMixin",
107471
- "module": "core/mixins/disabled-mixin.js"
107328
+ "name": "SbbActionBaseElement",
107329
+ "module": "core/base-elements/action-base-element.js"
107472
107330
  }
107473
107331
  },
107474
107332
  {
107475
107333
  "kind": "field",
107476
- "name": "styles",
107334
+ "name": "_hydrationRequired",
107477
107335
  "type": {
107478
- "text": "CSSResultGroup"
107336
+ "text": "boolean"
107479
107337
  },
107480
- "privacy": "public",
107481
- "static": true,
107482
- "default": "[boxSizingStyles, unsafeCSS(style)]",
107338
+ "privacy": "private",
107339
+ "default": "!!this.shadowRoot",
107483
107340
  "inheritedFrom": {
107484
- "name": "SbbMenuActionCommonElementMixin",
107485
- "module": "menu/common/menu-action-common.js"
107341
+ "name": "SbbElement",
107342
+ "module": "core/base-elements/element.js"
107486
107343
  }
107487
107344
  },
107488
107345
  {
107489
- "kind": "method",
107490
- "name": "renderTemplate",
107491
- "privacy": "protected",
107492
- "return": {
107493
- "type": {
107494
- "text": "TemplateResult"
107495
- }
107496
- },
107497
- "description": "Override this method to render the component template.",
107346
+ "kind": "field",
107347
+ "name": "_hydrationComplete",
107348
+ "privacy": "private",
107349
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
107498
107350
  "inheritedFrom": {
107499
- "name": "SbbActionBaseElement",
107500
- "module": "core/base-elements/action-base-element.js"
107351
+ "name": "SbbElement",
107352
+ "module": "core/base-elements/element.js"
107501
107353
  }
107502
107354
  },
107503
107355
  {
107504
107356
  "kind": "field",
107505
- "name": "iconName",
107357
+ "name": "_resolveHydration",
107506
107358
  "type": {
107507
- "text": "string"
107359
+ "text": "(hydrationRequired: boolean) => void"
107508
107360
  },
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",
107361
+ "privacy": "private",
107513
107362
  "inheritedFrom": {
107514
- "name": "SbbIconNameMixin",
107515
- "module": "icon/icon-name-mixin.js"
107363
+ "name": "SbbElement",
107364
+ "module": "core/base-elements/element.js"
107516
107365
  }
107517
107366
  },
107367
+ {
107368
+ "kind": "field",
107369
+ "name": "hydrationRequired",
107370
+ "type": {
107371
+ "text": "boolean"
107372
+ },
107373
+ "privacy": "protected",
107374
+ "description": "Returns whether hydration is required and not completed.",
107375
+ "readonly": true,
107376
+ "inheritedFrom": {
107377
+ "name": "SbbElement",
107378
+ "module": "core/base-elements/element.js"
107379
+ },
107380
+ "default": "!!this.shadowRoot"
107381
+ },
107518
107382
  {
107519
107383
  "kind": "method",
107520
- "name": "renderIconSlot",
107384
+ "name": "toggleState",
107521
107385
  "privacy": "protected",
107522
107386
  "return": {
107523
107387
  "type": {
107524
- "text": "TemplateResult"
107388
+ "text": "void"
107525
107389
  }
107526
107390
  },
107527
107391
  "parameters": [
107528
107392
  {
107529
- "name": "classname",
107530
- "optional": true,
107393
+ "name": "value",
107531
107394
  "type": {
107532
107395
  "text": "string"
107533
107396
  }
107397
+ },
107398
+ {
107399
+ "name": "force",
107400
+ "optional": true,
107401
+ "type": {
107402
+ "text": "boolean"
107403
+ }
107534
107404
  }
107535
107405
  ],
107536
107406
  "inheritedFrom": {
107537
- "name": "SbbIconNameMixin",
107538
- "module": "icon/icon-name-mixin.js"
107407
+ "name": "SbbElement",
107408
+ "module": "core/base-elements/element.js"
107539
107409
  }
107540
107410
  },
107541
107411
  {
107542
- "kind": "method",
107543
- "name": "renderIconName",
107544
- "privacy": "protected",
107545
- "return": {
107546
- "type": {
107547
- "text": "string"
107548
- }
107412
+ "kind": "field",
107413
+ "name": "['_$sbbElement$']",
107414
+ "type": {
107415
+ "text": "boolean"
107549
107416
  },
107417
+ "privacy": "public",
107418
+ "static": true,
107419
+ "default": "true",
107550
107420
  "inheritedFrom": {
107551
- "name": "SbbIconNameMixin",
107552
- "module": "icon/icon-name-mixin.js"
107421
+ "name": "SbbElement",
107422
+ "module": "core/base-elements/element.js"
107553
107423
  }
107554
107424
  },
107555
107425
  {
107556
- "kind": "method",
107557
- "name": "_renderIconName",
107426
+ "kind": "field",
107427
+ "name": "_controllers",
107428
+ "type": {
107429
+ "text": "Set<SbbReactiveController> | undefined"
107430
+ },
107558
107431
  "privacy": "private",
107559
- "return": {
107560
- "type": {
107561
- "text": "string"
107562
- }
107432
+ "inheritedFrom": {
107433
+ "name": "SbbElement",
107434
+ "module": "core/base-elements/element.js"
107435
+ }
107436
+ }
107437
+ ],
107438
+ "mixins": [
107439
+ {
107440
+ "name": "SbbDisabledTabIndexActionMixin",
107441
+ "module": "core/mixins.js"
107442
+ },
107443
+ {
107444
+ "name": "SbbMenuActionCommonElementMixin",
107445
+ "module": "menu/common/menu-action-common.js"
107446
+ }
107447
+ ],
107448
+ "superclass": {
107449
+ "name": "SbbButtonBaseElement",
107450
+ "module": "core/base-elements.js"
107451
+ },
107452
+ "tagName": "sbb-menu-button",
107453
+ "customElement": true,
107454
+ "attributes": [
107455
+ {
107456
+ "name": "disabled-interactive",
107457
+ "type": {
107458
+ "text": "boolean"
107459
+ },
107460
+ "default": "false",
107461
+ "description": "Whether the button should be aria-disabled but stay interactive.",
107462
+ "fieldName": "disabledInteractive",
107463
+ "inheritedFrom": {
107464
+ "name": "SbbDisabledInteractiveMixin",
107465
+ "module": "core/mixins/disabled-mixin.js"
107466
+ }
107467
+ },
107468
+ {
107469
+ "name": "disabled",
107470
+ "description": "Whether the component is disabled.",
107471
+ "default": "false",
107472
+ "type": {
107473
+ "text": "boolean"
107563
107474
  },
107475
+ "fieldName": "disabled",
107564
107476
  "inheritedFrom": {
107565
- "name": "SbbIconNameMixin",
107566
- "module": "icon/icon-name-mixin.js"
107477
+ "name": "SbbDisabledMixin",
107478
+ "module": "core/mixins/disabled-mixin.js"
107567
107479
  }
107568
107480
  },
107569
107481
  {
107570
- "kind": "field",
107571
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
107482
+ "name": "icon-name",
107572
107483
  "type": {
107573
- "text": "array"
107484
+ "text": "string"
107574
107485
  },
107575
- "privacy": "private",
107576
- "readonly": true,
107577
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
107486
+ "default": "''",
107487
+ "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.",
107488
+ "fieldName": "iconName",
107578
107489
  "inheritedFrom": {
107579
- "name": "SbbButtonBaseElement",
107580
- "module": "core/base-elements/button-base-element.js"
107490
+ "name": "SbbIconNameMixin",
107491
+ "module": "icon/icon-name-mixin.js"
107581
107492
  }
107582
107493
  },
107583
107494
  {
107584
- "kind": "field",
107585
107495
  "name": "value",
107586
107496
  "type": {
107587
107497
  "text": "string"
107588
107498
  },
107589
- "privacy": "public",
107499
+ "default": "''",
107500
+ "description": "Value of the form element.",
107501
+ "fieldName": "value",
107590
107502
  "inheritedFrom": {
107591
107503
  "name": "SbbButtonBaseElement",
107592
107504
  "module": "core/base-elements/button-base-element.js"
107593
- },
107594
- "default": "''",
107595
- "description": "Value of the form element.",
107596
- "attribute": "value"
107505
+ }
107597
107506
  },
107598
107507
  {
107599
- "kind": "field",
107600
107508
  "name": "type",
107601
- "privacy": "public",
107602
107509
  "description": "The type attribute to use for the button.",
107603
107510
  "default": "'button'",
107604
107511
  "type": {
107605
107512
  "text": "SbbButtonType"
107606
107513
  },
107607
- "attribute": "type",
107514
+ "fieldName": "type",
107608
107515
  "inheritedFrom": {
107609
107516
  "name": "SbbButtonBaseElement",
107610
107517
  "module": "core/base-elements/button-base-element.js"
107611
107518
  }
107612
107519
  },
107613
107520
  {
107614
- "kind": "field",
107615
107521
  "name": "form",
107522
+ "description": "The `<form>` element to associate the button with.",
107616
107523
  "type": {
107617
107524
  "text": "HTMLFormElement | null"
107618
107525
  },
107619
- "privacy": "public",
107620
- "description": "The `<form>` element to associate the button with.",
107526
+ "fieldName": "form",
107621
107527
  "inheritedFrom": {
107622
107528
  "name": "SbbButtonBaseElement",
107623
107529
  "module": "core/base-elements/button-base-element.js"
107624
- },
107625
- "attribute": "form"
107530
+ }
107626
107531
  },
107627
107532
  {
107628
- "kind": "field",
107629
- "name": "_formId",
107533
+ "name": "name",
107534
+ "description": "Name of the form element. Will be read from name attribute.",
107630
107535
  "type": {
107631
107536
  "text": "string"
107632
107537
  },
107633
- "privacy": "private",
107634
- "default": "''",
107538
+ "fieldName": "name",
107635
107539
  "inheritedFrom": {
107636
- "name": "SbbButtonBaseElement",
107637
- "module": "core/base-elements/button-base-element.js"
107540
+ "name": "SbbFormAssociatedMixin",
107541
+ "module": "core/mixins/form-associated-mixin.js"
107638
107542
  }
107639
- },
107543
+ }
107544
+ ]
107545
+ }
107546
+ ],
107547
+ "exports": [
107548
+ {
107549
+ "kind": "js",
107550
+ "name": "SbbMenuButtonElement",
107551
+ "declaration": {
107552
+ "name": "SbbMenuButtonElement",
107553
+ "module": "menu/menu-button/menu-button.component.js"
107554
+ }
107555
+ }
107556
+ ]
107557
+ },
107558
+ {
107559
+ "kind": "javascript-module",
107560
+ "path": "menu/menu/menu.component.js",
107561
+ "declarations": [
107562
+ {
107563
+ "kind": "class",
107564
+ "description": "It displays a contextual menu with one or more action element.",
107565
+ "name": "SbbMenuElement",
107566
+ "cssProperties": [
107640
107567
  {
107641
- "kind": "field",
107642
- "name": "_handleButtonClick",
107643
- "privacy": "private",
107644
- "inheritedFrom": {
107645
- "name": "SbbButtonBaseElement",
107646
- "module": "core/base-elements/button-base-element.js"
107647
- }
107648
- },
107568
+ "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`.",
107569
+ "name": "--sbb-menu-z-index",
107570
+ "default": "var(--sbb-overlay-default-z-index)"
107571
+ }
107572
+ ],
107573
+ "slots": [
107649
107574
  {
107650
- "kind": "method",
107651
- "name": "_requestSubmit",
107652
- "privacy": "private",
107653
- "return": {
107654
- "type": {
107655
- "text": "void"
107656
- }
107657
- },
107658
- "parameters": [
107659
- {
107660
- "name": "form",
107661
- "type": {
107662
- "text": "HTMLFormElement"
107663
- }
107664
- }
107665
- ],
107666
- "inheritedFrom": {
107667
- "name": "SbbButtonBaseElement",
107668
- "module": "core/base-elements/button-base-element.js"
107669
- }
107670
- },
107575
+ "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
107576
+ "name": ""
107577
+ }
107578
+ ],
107579
+ "members": [
107671
107580
  {
107672
107581
  "kind": "field",
107673
- "name": "_formKeyDown",
107674
- "privacy": "private",
107582
+ "name": "elementName",
107583
+ "type": {
107584
+ "text": "string"
107585
+ },
107586
+ "privacy": "public",
107587
+ "static": true,
107588
+ "readonly": true,
107675
107589
  "inheritedFrom": {
107676
- "name": "SbbButtonBaseElement",
107677
- "module": "core/base-elements/button-base-element.js"
107678
- }
107590
+ "name": "SbbElement",
107591
+ "module": "core/base-elements/element.js"
107592
+ },
107593
+ "default": "'sbb-menu'"
107679
107594
  },
107680
107595
  {
107681
107596
  "kind": "field",
107682
- "name": "formAssociated",
107597
+ "name": "role",
107683
107598
  "type": {
107684
- "text": "boolean"
107599
+ "text": "string"
107685
107600
  },
107686
107601
  "privacy": "public",
107687
107602
  "static": true,
107688
- "default": "true",
107689
- "inheritedFrom": {
107690
- "name": "SbbFormAssociatedMixin",
107691
- "module": "core/mixins/form-associated-mixin.js"
107692
- }
107603
+ "readonly": true,
107604
+ "default": "'menu'"
107693
107605
  },
107694
107606
  {
107695
107607
  "kind": "field",
107696
- "name": "name",
107608
+ "name": "trigger",
107609
+ "type": {
107610
+ "text": "HTMLElement | null"
107611
+ },
107697
107612
  "privacy": "public",
107698
- "description": "Name of the form element. Will be read from name attribute.",
107613
+ "default": "null",
107614
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
107615
+ "attribute": "trigger"
107616
+ },
107617
+ {
107618
+ "kind": "field",
107619
+ "name": "_menu",
107699
107620
  "type": {
107700
- "text": "string"
107621
+ "text": "HTMLDivElement"
107701
107622
  },
107702
- "attribute": "name",
107703
- "inheritedFrom": {
107704
- "name": "SbbFormAssociatedMixin",
107705
- "module": "core/mixins/form-associated-mixin.js"
107706
- }
107623
+ "privacy": "private"
107707
107624
  },
107708
107625
  {
107709
107626
  "kind": "field",
107710
- "name": "validity",
107627
+ "name": "_triggerElement",
107711
107628
  "type": {
107712
- "text": "ValidityState"
107629
+ "text": "HTMLElement | null"
107713
107630
  },
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
- }
107631
+ "privacy": "private",
107632
+ "default": "null"
107721
107633
  },
107722
107634
  {
107723
107635
  "kind": "field",
107724
- "name": "validationMessage",
107636
+ "name": "_triggerAbortController",
107725
107637
  "type": {
107726
- "text": "string"
107638
+ "text": "AbortController"
107727
107639
  },
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
- }
107640
+ "privacy": "private"
107735
107641
  },
107736
107642
  {
107737
107643
  "kind": "field",
107738
- "name": "willValidate",
107644
+ "name": "_isPointerDownEventOnMenu",
107739
107645
  "type": {
107740
107646
  "text": "boolean"
107741
107647
  },
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
- }
107648
+ "privacy": "private",
107649
+ "default": "false"
107650
+ },
107651
+ {
107652
+ "kind": "field",
107653
+ "name": "_windowEventsController",
107654
+ "type": {
107655
+ "text": "AbortController"
107656
+ },
107657
+ "privacy": "private"
107658
+ },
107659
+ {
107660
+ "kind": "field",
107661
+ "name": "_escapableOverlayController",
107662
+ "privacy": "private",
107663
+ "default": "new SbbEscapableOverlayController(this)"
107664
+ },
107665
+ {
107666
+ "kind": "field",
107667
+ "name": "_focusTrapController",
107668
+ "privacy": "private",
107669
+ "default": "new SbbFocusTrapController(this)"
107670
+ },
107671
+ {
107672
+ "kind": "field",
107673
+ "name": "_scrollHandler",
107674
+ "privacy": "private",
107675
+ "default": "new SbbScrollHandler()"
107676
+ },
107677
+ {
107678
+ "kind": "field",
107679
+ "name": "_inertController",
107680
+ "privacy": "private",
107681
+ "default": "new SbbInertController(this)"
107682
+ },
107683
+ {
107684
+ "kind": "field",
107685
+ "name": "_mobileBreakpoint",
107686
+ "privacy": "private",
107687
+ "default": "SbbMediaQueryBreakpointSmallAndBelow"
107688
+ },
107689
+ {
107690
+ "kind": "field",
107691
+ "name": "_mediaMatcher",
107692
+ "privacy": "private",
107693
+ "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
107694
+ },
107695
+ {
107696
+ "kind": "field",
107697
+ "name": "_darkModeController",
107698
+ "privacy": "private",
107699
+ "default": "new SbbDarkModeController(this, () => this._syncNegative())"
107749
107700
  },
107750
107701
  {
107751
107702
  "kind": "field",
107752
- "name": "_validityStates",
107703
+ "name": "_language",
107753
107704
  "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
- }
107705
+ "default": "new SbbLanguageController(this)"
107759
107706
  },
107760
107707
  {
107761
107708
  "kind": "field",
107762
- "name": "formDisabled",
107709
+ "name": "_nestedMenu",
107763
107710
  "type": {
107764
- "text": "boolean"
107711
+ "text": "SbbMenuElement | null"
107765
107712
  },
107766
- "privacy": "protected",
107767
- "default": "false",
107768
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
107713
+ "privacy": "private",
107714
+ "default": "null"
107715
+ },
107716
+ {
107717
+ "kind": "method",
107718
+ "name": "escapeStrategy",
107719
+ "privacy": "public",
107720
+ "return": {
107721
+ "type": {
107722
+ "text": "void"
107723
+ }
107724
+ },
107725
+ "description": "The method which is called on escape key press. Defaults to calling close()",
107769
107726
  "inheritedFrom": {
107770
- "name": "SbbFormAssociatedMixin",
107771
- "module": "core/mixins/form-associated-mixin.js"
107727
+ "name": "SbbOpenCloseBaseElement",
107728
+ "module": "core/base-elements/open-close-base-element.js"
107772
107729
  }
107773
107730
  },
107774
107731
  {
107775
107732
  "kind": "method",
107776
- "name": "checkValidity",
107733
+ "name": "open",
107777
107734
  "privacy": "public",
107778
107735
  "return": {
107779
107736
  "type": {
107780
- "text": "boolean"
107737
+ "text": "void"
107781
107738
  }
107782
107739
  },
107783
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
107740
+ "description": "Opens the menu on trigger click.",
107784
107741
  "inheritedFrom": {
107785
- "name": "SbbFormAssociatedMixin",
107786
- "module": "core/mixins/form-associated-mixin.js"
107742
+ "name": "SbbOpenCloseBaseElement",
107743
+ "module": "core/base-elements/open-close-base-element.js"
107787
107744
  }
107788
107745
  },
107789
107746
  {
107790
107747
  "kind": "method",
107791
- "name": "reportValidity",
107748
+ "name": "close",
107792
107749
  "privacy": "public",
107793
107750
  "return": {
107794
107751
  "type": {
107795
- "text": "boolean"
107752
+ "text": "void"
107796
107753
  }
107797
107754
  },
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.",
107755
+ "description": "Closes the menu and all its nested menus.",
107799
107756
  "inheritedFrom": {
107800
- "name": "SbbFormAssociatedMixin",
107801
- "module": "core/mixins/form-associated-mixin.js"
107757
+ "name": "SbbOpenCloseBaseElement",
107758
+ "module": "core/base-elements/open-close-base-element.js"
107802
107759
  }
107803
107760
  },
107804
107761
  {
107805
107762
  "kind": "method",
107806
- "name": "setCustomValidity",
107763
+ "name": "closeAll",
107807
107764
  "privacy": "public",
107808
107765
  "return": {
107809
107766
  "type": {
107810
107767
  "text": "void"
107811
107768
  }
107812
107769
  },
107770
+ "description": "Closes the menu and all related menus (nested and parent menus)."
107771
+ },
107772
+ {
107773
+ "kind": "method",
107774
+ "name": "_close",
107775
+ "privacy": "private",
107776
+ "return": {
107777
+ "type": {
107778
+ "text": "void"
107779
+ }
107780
+ },
107813
107781
  "parameters": [
107814
107782
  {
107815
- "name": "message",
107816
- "type": {
107817
- "text": "string"
107818
- }
107783
+ "name": "closeAll",
107784
+ "default": "false",
107785
+ "description": "If true, it ensures animations are correct by toggling some states when closing all related menus at once.",
107786
+ "optional": true
107819
107787
  }
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
- }
107788
+ ]
107826
107789
  },
107827
107790
  {
107828
107791
  "kind": "method",
107829
- "name": "_hasDisabledAncestor",
107792
+ "name": "_isZeroAnimationDuration",
107830
107793
  "privacy": "private",
107831
107794
  "return": {
107832
107795
  "type": {
107833
107796
  "text": "boolean"
107834
107797
  }
107835
- },
107836
- "inheritedFrom": {
107837
- "name": "SbbFormAssociatedMixin",
107838
- "module": "core/mixins/form-associated-mixin.js"
107839
107798
  }
107840
107799
  },
107841
107800
  {
107842
107801
  "kind": "method",
107843
- "name": "updateFormValue",
107844
- "privacy": "protected",
107802
+ "name": "_handleOpening",
107803
+ "privacy": "private",
107845
107804
  "return": {
107846
107805
  "type": {
107847
107806
  "text": "void"
107848
107807
  }
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"
107854
107808
  }
107855
107809
  },
107856
107810
  {
107857
107811
  "kind": "method",
107858
- "name": "formState",
107859
- "privacy": "protected",
107812
+ "name": "_handleClosing",
107813
+ "privacy": "private",
107860
107814
  "return": {
107861
107815
  "type": {
107862
- "text": "FormRestoreState"
107816
+ "text": "void"
107863
107817
  }
107864
- },
107865
- "inheritedFrom": {
107866
- "name": "SbbFormAssociatedMixin",
107867
- "module": "core/mixins/form-associated-mixin.js"
107868
107818
  }
107869
107819
  },
107870
107820
  {
107871
107821
  "kind": "method",
107872
- "name": "setValidityFlag",
107873
- "privacy": "protected",
107822
+ "name": "_handleKeyDown",
107823
+ "privacy": "private",
107874
107824
  "return": {
107875
107825
  "type": {
107876
107826
  "text": "void"
@@ -107878,35 +107828,37 @@
107878
107828
  },
107879
107829
  "parameters": [
107880
107830
  {
107881
- "name": "flag",
107882
- "type": {
107883
- "text": "T"
107884
- }
107885
- },
107886
- {
107887
- "name": "message",
107888
- "type": {
107889
- "text": "string"
107890
- }
107891
- },
107892
- {
107893
- "name": "flagValue",
107894
- "optional": true,
107831
+ "name": "evt",
107895
107832
  "type": {
107896
- "text": "ValidityStateFlags[T]"
107833
+ "text": "KeyboardEvent"
107897
107834
  }
107898
107835
  }
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"
107836
+ ]
107837
+ },
107838
+ {
107839
+ "kind": "method",
107840
+ "name": "_configureTrigger",
107841
+ "privacy": "private",
107842
+ "return": {
107843
+ "type": {
107844
+ "text": "void"
107845
+ }
107904
107846
  }
107905
107847
  },
107906
107848
  {
107907
107849
  "kind": "method",
107908
- "name": "removeValidityFlag",
107909
- "privacy": "protected",
107850
+ "name": "_attachWindowEvents",
107851
+ "privacy": "private",
107852
+ "return": {
107853
+ "type": {
107854
+ "text": "void"
107855
+ }
107856
+ }
107857
+ },
107858
+ {
107859
+ "kind": "method",
107860
+ "name": "_interactiveElementClick",
107861
+ "privacy": "private",
107910
107862
  "return": {
107911
107863
  "type": {
107912
107864
  "text": "void"
@@ -107914,158 +107866,250 @@
107914
107866
  },
107915
107867
  "parameters": [
107916
107868
  {
107917
- "name": "flag",
107869
+ "name": "event",
107918
107870
  "type": {
107919
- "text": "T"
107871
+ "text": "Event"
107920
107872
  }
107921
107873
  }
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
- }
107874
+ ]
107875
+ },
107876
+ {
107877
+ "kind": "field",
107878
+ "name": "_pointerDownListener",
107879
+ "privacy": "private"
107880
+ },
107881
+ {
107882
+ "kind": "field",
107883
+ "name": "_closeOnBackdropClick",
107884
+ "privacy": "private"
107928
107885
  },
107929
107886
  {
107930
107887
  "kind": "method",
107931
- "name": "validate",
107932
- "privacy": "protected",
107888
+ "name": "_nestedMenus",
107889
+ "privacy": "private",
107933
107890
  "return": {
107934
107891
  "type": {
107935
- "text": "void"
107892
+ "text": "SbbMenuElement[]"
107936
107893
  }
107937
107894
  },
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"
107895
+ "description": "Converts the linked list into an array of SbbMenuElement."
107896
+ },
107897
+ {
107898
+ "kind": "method",
107899
+ "name": "_parentMenu",
107900
+ "privacy": "private",
107901
+ "return": {
107902
+ "type": {
107903
+ "text": "SbbMenuElement | null"
107904
+ }
107942
107905
  }
107943
107906
  },
107944
107907
  {
107945
107908
  "kind": "method",
107946
- "name": "shouldValidate",
107947
- "privacy": "protected",
107909
+ "name": "_mainMenu",
107910
+ "privacy": "private",
107911
+ "return": {
107912
+ "type": {
107913
+ "text": "SbbMenuElement"
107914
+ }
107915
+ },
107916
+ "description": "The outermost menu."
107917
+ },
107918
+ {
107919
+ "kind": "method",
107920
+ "name": "_isNested",
107921
+ "privacy": "private",
107948
107922
  "return": {
107949
107923
  "type": {
107950
107924
  "text": "boolean"
107951
107925
  }
107926
+ }
107927
+ },
107928
+ {
107929
+ "kind": "method",
107930
+ "name": "_updateNestedInert",
107931
+ "privacy": "private",
107932
+ "return": {
107933
+ "type": {
107934
+ "text": "void"
107935
+ }
107936
+ }
107937
+ },
107938
+ {
107939
+ "kind": "method",
107940
+ "name": "_handleMouseOver",
107941
+ "privacy": "private",
107942
+ "return": {
107943
+ "type": {
107944
+ "text": "void"
107945
+ }
107952
107946
  },
107953
107947
  "parameters": [
107954
107948
  {
107955
- "name": "name",
107949
+ "name": "event",
107950
+ "type": {
107951
+ "text": "MouseEvent"
107952
+ }
107953
+ }
107954
+ ]
107955
+ },
107956
+ {
107957
+ "kind": "method",
107958
+ "name": "_onMenuAnimationEnd",
107959
+ "privacy": "private",
107960
+ "return": {
107961
+ "type": {
107962
+ "text": "void"
107963
+ }
107964
+ },
107965
+ "parameters": [
107966
+ {
107967
+ "name": "event",
107956
107968
  "type": {
107957
- "text": "PropertyKey | undefined"
107969
+ "text": "AnimationEvent"
107958
107970
  }
107959
107971
  }
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"
107972
+ ]
107973
+ },
107974
+ {
107975
+ "kind": "method",
107976
+ "name": "_setMenuPosition",
107977
+ "privacy": "private",
107978
+ "return": {
107979
+ "type": {
107980
+ "text": "void"
107981
+ }
107965
107982
  }
107966
107983
  },
107967
107984
  {
107968
107985
  "kind": "method",
107969
- "name": "_setInternalValidity",
107986
+ "name": "_syncNegative",
107970
107987
  "privacy": "private",
107971
107988
  "return": {
107972
107989
  "type": {
107973
107990
  "text": "void"
107974
107991
  }
107975
- },
107976
- "inheritedFrom": {
107977
- "name": "SbbFormAssociatedMixin",
107978
- "module": "core/mixins/form-associated-mixin.js"
107979
107992
  }
107980
107993
  },
107981
107994
  {
107982
- "kind": "field",
107983
- "name": "_preventScrollOnSpaceKeydown",
107995
+ "kind": "method",
107996
+ "name": "_isMobile",
107984
107997
  "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"
107998
+ "return": {
107999
+ "type": {
108000
+ "text": "boolean"
107990
108001
  }
107991
- ],
107992
- "inheritedFrom": {
107993
- "name": "SbbButtonLikeBaseElement",
107994
- "module": "core/base-elements/button-base-element.js"
107995
108002
  }
107996
108003
  },
107997
108004
  {
107998
108005
  "kind": "field",
107999
- "name": "_removeActiveMarker",
108000
- "privacy": "private",
108006
+ "name": "events",
108007
+ "privacy": "public",
108008
+ "static": true,
108009
+ "readonly": true,
108010
+ "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
108011
+ "type": {
108012
+ "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
108013
+ },
108001
108014
  "inheritedFrom": {
108002
- "name": "SbbButtonLikeBaseElement",
108003
- "module": "core/base-elements/button-base-element.js"
108015
+ "name": "SbbOpenCloseBaseElement",
108016
+ "module": "core/base-elements/open-close-base-element.js"
108004
108017
  }
108005
108018
  },
108006
108019
  {
108007
108020
  "kind": "field",
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
- ],
108021
+ "name": "state",
108022
+ "privacy": "protected",
108023
+ "description": "The state of the component.",
108024
+ "type": {
108025
+ "text": "SbbOpenedClosedState"
108026
+ },
108027
+ "default": "'closed'",
108017
108028
  "inheritedFrom": {
108018
- "name": "SbbButtonLikeBaseElement",
108019
- "module": "core/base-elements/button-base-element.js"
108029
+ "name": "SbbOpenCloseBaseElement",
108030
+ "module": "core/base-elements/open-close-base-element.js"
108020
108031
  }
108021
108032
  },
108022
108033
  {
108023
108034
  "kind": "field",
108024
- "name": "_dispatchClickEvent",
108035
+ "name": "_state",
108036
+ "type": {
108037
+ "text": "SbbOpenedClosedState"
108038
+ },
108025
108039
  "privacy": "private",
108026
108040
  "inheritedFrom": {
108027
- "name": "SbbButtonLikeBaseElement",
108028
- "module": "core/base-elements/button-base-element.js"
108041
+ "name": "SbbOpenCloseBaseElement",
108042
+ "module": "core/base-elements/open-close-base-element.js"
108029
108043
  }
108030
108044
  },
108031
108045
  {
108032
108046
  "kind": "field",
108033
- "name": "maybeDisabled",
108047
+ "name": "isOpen",
108034
108048
  "type": {
108035
- "text": "boolean | undefined"
108049
+ "text": "boolean"
108036
108050
  },
108037
- "privacy": "protected",
108051
+ "privacy": "public",
108052
+ "description": "Whether the element is open.",
108038
108053
  "readonly": true,
108039
108054
  "inheritedFrom": {
108040
- "name": "SbbActionBaseElement",
108041
- "module": "core/base-elements/action-base-element.js"
108055
+ "name": "SbbOpenCloseBaseElement",
108056
+ "module": "core/base-elements/open-close-base-element.js"
108042
108057
  }
108043
108058
  },
108044
108059
  {
108045
- "kind": "field",
108046
- "name": "maybeDisabledInteractive",
108047
- "type": {
108048
- "text": "boolean | undefined"
108060
+ "kind": "method",
108061
+ "name": "dispatchBeforeOpenEvent",
108062
+ "privacy": "protected",
108063
+ "return": {
108064
+ "type": {
108065
+ "text": "boolean"
108066
+ }
108049
108067
  },
108068
+ "inheritedFrom": {
108069
+ "name": "SbbOpenCloseBaseElement",
108070
+ "module": "core/base-elements/open-close-base-element.js"
108071
+ }
108072
+ },
108073
+ {
108074
+ "kind": "method",
108075
+ "name": "dispatchOpenEvent",
108050
108076
  "privacy": "protected",
108051
- "readonly": true,
108077
+ "return": {
108078
+ "type": {
108079
+ "text": "boolean"
108080
+ }
108081
+ },
108052
108082
  "inheritedFrom": {
108053
- "name": "SbbActionBaseElement",
108054
- "module": "core/base-elements/action-base-element.js"
108083
+ "name": "SbbOpenCloseBaseElement",
108084
+ "module": "core/base-elements/open-close-base-element.js"
108055
108085
  }
108056
108086
  },
108057
108087
  {
108058
108088
  "kind": "method",
108059
- "name": "setupBaseEventHandlers",
108089
+ "name": "dispatchBeforeCloseEvent",
108060
108090
  "privacy": "protected",
108061
108091
  "return": {
108062
108092
  "type": {
108063
- "text": "void"
108093
+ "text": "boolean"
108064
108094
  }
108065
108095
  },
108066
108096
  "inheritedFrom": {
108067
- "name": "SbbActionBaseElement",
108068
- "module": "core/base-elements/action-base-element.js"
108097
+ "name": "SbbOpenCloseBaseElement",
108098
+ "module": "core/base-elements/open-close-base-element.js"
108099
+ }
108100
+ },
108101
+ {
108102
+ "kind": "method",
108103
+ "name": "dispatchCloseEvent",
108104
+ "privacy": "protected",
108105
+ "return": {
108106
+ "type": {
108107
+ "text": "boolean"
108108
+ }
108109
+ },
108110
+ "inheritedFrom": {
108111
+ "name": "SbbOpenCloseBaseElement",
108112
+ "module": "core/base-elements/open-close-base-element.js"
108069
108113
  }
108070
108114
  },
108071
108115
  {
@@ -108174,110 +108218,66 @@
108174
108218
  }
108175
108219
  }
108176
108220
  ],
108177
- "mixins": [
108178
- {
108179
- "name": "SbbDisabledTabIndexActionMixin",
108180
- "module": "core/mixins.js"
108181
- },
108221
+ "attributes": [
108182
108222
  {
108183
- "name": "SbbMenuActionCommonElementMixin",
108184
- "module": "menu/common/menu-action-common.js"
108223
+ "name": "trigger",
108224
+ "type": {
108225
+ "text": "HTMLElement | null"
108226
+ },
108227
+ "default": "null",
108228
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
108229
+ "fieldName": "trigger"
108185
108230
  }
108186
108231
  ],
108187
108232
  "superclass": {
108188
- "name": "SbbButtonBaseElement",
108233
+ "name": "SbbOpenCloseBaseElement",
108189
108234
  "module": "core/base-elements.js"
108190
108235
  },
108191
- "tagName": "sbb-menu-button",
108236
+ "tagName": "sbb-menu",
108192
108237
  "customElement": true,
108193
- "attributes": [
108194
- {
108195
- "name": "disabled-interactive",
108196
- "type": {
108197
- "text": "boolean"
108198
- },
108199
- "default": "false",
108200
- "description": "Whether the button should be aria-disabled but stay interactive.",
108201
- "fieldName": "disabledInteractive",
108202
- "inheritedFrom": {
108203
- "name": "SbbDisabledInteractiveMixin",
108204
- "module": "core/mixins/disabled-mixin.js"
108205
- }
108206
- },
108207
- {
108208
- "name": "disabled",
108209
- "description": "Whether the component is disabled.",
108210
- "default": "false",
108211
- "type": {
108212
- "text": "boolean"
108213
- },
108214
- "fieldName": "disabled",
108215
- "inheritedFrom": {
108216
- "name": "SbbDisabledMixin",
108217
- "module": "core/mixins/disabled-mixin.js"
108218
- }
108219
- },
108220
- {
108221
- "name": "icon-name",
108222
- "type": {
108223
- "text": "string"
108224
- },
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",
108228
- "inheritedFrom": {
108229
- "name": "SbbIconNameMixin",
108230
- "module": "icon/icon-name-mixin.js"
108231
- }
108232
- },
108238
+ "events": [
108233
108239
  {
108234
- "name": "value",
108240
+ "name": "beforeopen",
108235
108241
  "type": {
108236
- "text": "string"
108242
+ "text": "Event"
108237
108243
  },
108238
- "default": "''",
108239
- "description": "Value of the form element.",
108240
- "fieldName": "value",
108244
+ "description": "Emits whenever the component starts the opening transition. Can be canceled.",
108241
108245
  "inheritedFrom": {
108242
- "name": "SbbButtonBaseElement",
108243
- "module": "core/base-elements/button-base-element.js"
108246
+ "name": "SbbOpenCloseBaseElement",
108247
+ "module": "core/base-elements/open-close-base-element.js"
108244
108248
  }
108245
108249
  },
108246
108250
  {
108247
- "name": "type",
108248
- "description": "The type attribute to use for the button.",
108249
- "default": "'button'",
108251
+ "name": "open",
108250
108252
  "type": {
108251
- "text": "SbbButtonType"
108253
+ "text": "Event"
108252
108254
  },
108253
- "fieldName": "type",
108255
+ "description": "Emits whenever the component is opened.",
108254
108256
  "inheritedFrom": {
108255
- "name": "SbbButtonBaseElement",
108256
- "module": "core/base-elements/button-base-element.js"
108257
+ "name": "SbbOpenCloseBaseElement",
108258
+ "module": "core/base-elements/open-close-base-element.js"
108257
108259
  }
108258
108260
  },
108259
108261
  {
108260
- "name": "form",
108261
- "description": "The `<form>` element to associate the button with.",
108262
+ "name": "beforeclose",
108262
108263
  "type": {
108263
- "text": "HTMLFormElement | null"
108264
+ "text": "Event"
108264
108265
  },
108265
- "fieldName": "form",
108266
+ "description": "Emits whenever the component begins the closing transition. Can be canceled.",
108266
108267
  "inheritedFrom": {
108267
- "name": "SbbButtonBaseElement",
108268
- "module": "core/base-elements/button-base-element.js"
108268
+ "name": "SbbOpenCloseBaseElement",
108269
+ "module": "core/base-elements/open-close-base-element.js"
108269
108270
  }
108270
108271
  },
108271
108272
  {
108272
- "name": "name",
108273
- "description": "Name of the form element. Will be read from name attribute.",
108273
+ "name": "close",
108274
108274
  "type": {
108275
- "text": "string"
108275
+ "text": "Event"
108276
108276
  },
108277
- "fieldName": "name",
108277
+ "description": "Emits whenever the component is closed.",
108278
108278
  "inheritedFrom": {
108279
- "name": "SbbFormAssociatedMixin",
108280
- "module": "core/mixins/form-associated-mixin.js"
108279
+ "name": "SbbOpenCloseBaseElement",
108280
+ "module": "core/base-elements/open-close-base-element.js"
108281
108281
  }
108282
108282
  }
108283
108283
  ]
@@ -108286,10 +108286,10 @@
108286
108286
  "exports": [
108287
108287
  {
108288
108288
  "kind": "js",
108289
- "name": "SbbMenuButtonElement",
108289
+ "name": "SbbMenuElement",
108290
108290
  "declaration": {
108291
- "name": "SbbMenuButtonElement",
108292
- "module": "menu/menu-button/menu-button.component.js"
108291
+ "name": "SbbMenuElement",
108292
+ "module": "menu/menu/menu.component.js"
108293
108293
  }
108294
108294
  }
108295
108295
  ]