@sbb-esta/lyne-elements-dev 4.6.0-dev.1772526102 → 4.6.0-dev.1772527171

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.
@@ -86779,23 +86779,27 @@
86779
86779
  },
86780
86780
  {
86781
86781
  "kind": "javascript-module",
86782
- "path": "menu/menu/menu.component.js",
86782
+ "path": "menu/menu-button/menu-button.component.js",
86783
86783
  "declarations": [
86784
86784
  {
86785
86785
  "kind": "class",
86786
- "description": "It displays a contextual menu with one or more action element.",
86787
- "name": "SbbMenuElement",
86786
+ "description": "It displays a button element that can be used in the `sbb-menu` component.",
86787
+ "name": "SbbMenuButtonElement",
86788
86788
  "cssProperties": [
86789
86789
  {
86790
- "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`.",
86791
- "name": "--sbb-menu-z-index",
86792
- "default": "var(--sbb-overlay-default-z-index)"
86790
+ "description": "Can be used to modify horizontal padding.",
86791
+ "name": "--sbb-menu-action-outer-horizontal-padding",
86792
+ "default": "var(--sbb-spacing-fixed-3x)"
86793
86793
  }
86794
86794
  ],
86795
86795
  "slots": [
86796
86796
  {
86797
- "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
86797
+ "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
86798
86798
  "name": ""
86799
+ },
86800
+ {
86801
+ "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
86802
+ "name": "icon"
86799
86803
  }
86800
86804
  ],
86801
86805
  "members": [
@@ -86803,268 +86807,255 @@
86803
86807
  "kind": "field",
86804
86808
  "name": "role",
86805
86809
  "type": {
86806
- "text": "string"
86810
+ "text": "ElementInternals['role']"
86807
86811
  },
86808
86812
  "privacy": "public",
86809
86813
  "static": true,
86810
86814
  "readonly": true,
86811
- "default": "'menu'"
86815
+ "default": "'menuitem'",
86816
+ "inheritedFrom": {
86817
+ "name": "SbbButtonLikeBaseElement",
86818
+ "module": "core/base-elements/button-base-element.js"
86819
+ }
86812
86820
  },
86813
86821
  {
86814
86822
  "kind": "field",
86815
- "name": "trigger",
86823
+ "name": "disabledInteractive",
86816
86824
  "type": {
86817
- "text": "HTMLElement | null"
86825
+ "text": "boolean"
86818
86826
  },
86819
86827
  "privacy": "public",
86820
- "default": "null",
86821
- "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
86822
- "attribute": "trigger"
86823
- },
86824
- {
86825
- "kind": "field",
86826
- "name": "_menu",
86827
- "type": {
86828
- "text": "HTMLDivElement"
86829
- },
86830
- "privacy": "private"
86831
- },
86832
- {
86833
- "kind": "field",
86834
- "name": "_triggerElement",
86835
- "type": {
86836
- "text": "HTMLElement | null"
86837
- },
86838
- "privacy": "private",
86839
- "default": "null"
86840
- },
86841
- {
86842
- "kind": "field",
86843
- "name": "_triggerAbortController",
86844
- "type": {
86845
- "text": "AbortController"
86846
- },
86847
- "privacy": "private"
86828
+ "default": "false",
86829
+ "description": "Whether the button should be aria-disabled but stay interactive.",
86830
+ "attribute": "disabled-interactive",
86831
+ "reflects": true,
86832
+ "inheritedFrom": {
86833
+ "name": "SbbDisabledInteractiveMixin",
86834
+ "module": "core/mixins/disabled-mixin.js"
86835
+ }
86848
86836
  },
86849
86837
  {
86850
86838
  "kind": "field",
86851
- "name": "_isPointerDownEventOnMenu",
86839
+ "name": "disabled",
86840
+ "privacy": "public",
86841
+ "description": "Whether the component is disabled.",
86842
+ "default": "false",
86852
86843
  "type": {
86853
86844
  "text": "boolean"
86854
86845
  },
86855
- "privacy": "private",
86856
- "default": "false"
86857
- },
86858
- {
86859
- "kind": "field",
86860
- "name": "_windowEventsController",
86861
- "type": {
86862
- "text": "AbortController"
86863
- },
86864
- "privacy": "private"
86865
- },
86866
- {
86867
- "kind": "field",
86868
- "name": "_escapableOverlayController",
86869
- "privacy": "private",
86870
- "default": "new SbbEscapableOverlayController(this)"
86871
- },
86872
- {
86873
- "kind": "field",
86874
- "name": "_focusTrapController",
86875
- "privacy": "private",
86876
- "default": "new SbbFocusTrapController(this)"
86877
- },
86878
- {
86879
- "kind": "field",
86880
- "name": "_scrollHandler",
86881
- "privacy": "private",
86882
- "default": "new SbbScrollHandler()"
86883
- },
86884
- {
86885
- "kind": "field",
86886
- "name": "_inertController",
86887
- "privacy": "private",
86888
- "default": "new SbbInertController(this)"
86889
- },
86890
- {
86891
- "kind": "field",
86892
- "name": "_mobileBreakpoint",
86893
- "privacy": "private",
86894
- "default": "SbbMediaQueryBreakpointSmallAndBelow"
86895
- },
86896
- {
86897
- "kind": "field",
86898
- "name": "_mediaMatcher",
86899
- "privacy": "private",
86900
- "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
86901
- },
86902
- {
86903
- "kind": "field",
86904
- "name": "_darkModeController",
86905
- "privacy": "private",
86906
- "default": "new SbbDarkModeController(this, () => this._syncNegative())"
86846
+ "attribute": "disabled",
86847
+ "reflects": true,
86848
+ "inheritedFrom": {
86849
+ "name": "SbbDisabledMixin",
86850
+ "module": "core/mixins/disabled-mixin.js"
86851
+ }
86907
86852
  },
86908
86853
  {
86909
86854
  "kind": "field",
86910
- "name": "_language",
86855
+ "name": "#disabled",
86911
86856
  "privacy": "private",
86912
- "default": "new SbbLanguageController(this)"
86913
- },
86914
- {
86915
- "kind": "field",
86916
- "name": "_nestedMenu",
86917
86857
  "type": {
86918
- "text": "SbbMenuElement | null"
86858
+ "text": "boolean"
86919
86859
  },
86920
- "privacy": "private",
86921
- "default": "null"
86860
+ "default": "false",
86861
+ "inheritedFrom": {
86862
+ "name": "SbbDisabledMixin",
86863
+ "module": "core/mixins/disabled-mixin.js"
86864
+ }
86922
86865
  },
86923
86866
  {
86924
86867
  "kind": "method",
86925
- "name": "escapeStrategy",
86926
- "privacy": "public",
86868
+ "name": "isDisabledExternally",
86869
+ "privacy": "protected",
86927
86870
  "return": {
86928
86871
  "type": {
86929
- "text": "void"
86872
+ "text": "boolean"
86930
86873
  }
86931
86874
  },
86932
- "description": "The method which is called on escape key press. Defaults to calling close()",
86875
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
86933
86876
  "inheritedFrom": {
86934
- "name": "SbbOpenCloseBaseElement",
86935
- "module": "core/base-elements/open-close-base-element.js"
86877
+ "name": "SbbDisabledMixin",
86878
+ "module": "core/mixins/disabled-mixin.js"
86936
86879
  }
86937
86880
  },
86938
86881
  {
86939
- "kind": "method",
86940
- "name": "open",
86941
- "privacy": "public",
86942
- "return": {
86943
- "type": {
86944
- "text": "void"
86945
- }
86882
+ "kind": "field",
86883
+ "name": "styles",
86884
+ "type": {
86885
+ "text": "CSSResultGroup"
86946
86886
  },
86947
- "description": "Opens the menu on trigger click.",
86887
+ "privacy": "public",
86888
+ "static": true,
86889
+ "default": "[boxSizingStyles, style]",
86948
86890
  "inheritedFrom": {
86949
- "name": "SbbOpenCloseBaseElement",
86950
- "module": "core/base-elements/open-close-base-element.js"
86891
+ "name": "SbbMenuActionCommonElementMixin",
86892
+ "module": "menu/common/menu-action-common.js"
86951
86893
  }
86952
86894
  },
86953
86895
  {
86954
86896
  "kind": "method",
86955
- "name": "close",
86956
- "privacy": "public",
86897
+ "name": "renderTemplate",
86898
+ "privacy": "protected",
86957
86899
  "return": {
86958
86900
  "type": {
86959
- "text": "void"
86901
+ "text": "TemplateResult"
86960
86902
  }
86961
86903
  },
86962
- "description": "Closes the menu and all its nested menus.",
86904
+ "description": "Override this method to render the component template.",
86963
86905
  "inheritedFrom": {
86964
- "name": "SbbOpenCloseBaseElement",
86965
- "module": "core/base-elements/open-close-base-element.js"
86906
+ "name": "SbbActionBaseElement",
86907
+ "module": "core/base-elements/action-base-element.js"
86966
86908
  }
86967
86909
  },
86968
86910
  {
86969
- "kind": "method",
86970
- "name": "closeAll",
86971
- "privacy": "public",
86972
- "return": {
86973
- "type": {
86974
- "text": "void"
86975
- }
86911
+ "kind": "field",
86912
+ "name": "iconName",
86913
+ "type": {
86914
+ "text": "string"
86976
86915
  },
86977
- "description": "Closes the menu and all related menus (nested and parent menus)."
86916
+ "privacy": "public",
86917
+ "default": "''",
86918
+ "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.",
86919
+ "attribute": "icon-name",
86920
+ "inheritedFrom": {
86921
+ "name": "SbbIconNameMixin",
86922
+ "module": "icon/icon-name-mixin.js"
86923
+ }
86978
86924
  },
86979
86925
  {
86980
86926
  "kind": "method",
86981
- "name": "_close",
86982
- "privacy": "private",
86927
+ "name": "renderIconSlot",
86928
+ "privacy": "protected",
86983
86929
  "return": {
86984
86930
  "type": {
86985
- "text": "void"
86931
+ "text": "TemplateResult"
86986
86932
  }
86987
86933
  },
86988
86934
  "parameters": [
86989
86935
  {
86990
- "name": "closeAll",
86991
- "default": "false",
86992
- "description": "If true, it ensures animations are correct by toggling some states when closing all related menus at once.",
86993
- "optional": true
86994
- }
86995
- ]
86996
- },
86997
- {
86998
- "kind": "method",
86999
- "name": "_isZeroAnimationDuration",
87000
- "privacy": "private",
87001
- "return": {
87002
- "type": {
87003
- "text": "boolean"
86936
+ "name": "classname",
86937
+ "optional": true,
86938
+ "type": {
86939
+ "text": "string"
86940
+ }
87004
86941
  }
86942
+ ],
86943
+ "inheritedFrom": {
86944
+ "name": "SbbIconNameMixin",
86945
+ "module": "icon/icon-name-mixin.js"
87005
86946
  }
87006
86947
  },
87007
86948
  {
87008
86949
  "kind": "method",
87009
- "name": "_handleOpening",
87010
- "privacy": "private",
86950
+ "name": "renderIconName",
86951
+ "privacy": "protected",
87011
86952
  "return": {
87012
86953
  "type": {
87013
- "text": "void"
86954
+ "text": "string"
87014
86955
  }
86956
+ },
86957
+ "inheritedFrom": {
86958
+ "name": "SbbIconNameMixin",
86959
+ "module": "icon/icon-name-mixin.js"
87015
86960
  }
87016
86961
  },
87017
86962
  {
87018
86963
  "kind": "method",
87019
- "name": "_handleClosing",
86964
+ "name": "_renderIconName",
87020
86965
  "privacy": "private",
87021
86966
  "return": {
87022
86967
  "type": {
87023
- "text": "void"
86968
+ "text": "string"
87024
86969
  }
86970
+ },
86971
+ "inheritedFrom": {
86972
+ "name": "SbbIconNameMixin",
86973
+ "module": "icon/icon-name-mixin.js"
87025
86974
  }
87026
86975
  },
87027
86976
  {
87028
- "kind": "method",
87029
- "name": "_handleKeyDown",
86977
+ "kind": "field",
86978
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
86979
+ "type": {
86980
+ "text": "array"
86981
+ },
87030
86982
  "privacy": "private",
87031
- "return": {
87032
- "type": {
87033
- "text": "void"
87034
- }
86983
+ "readonly": true,
86984
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
86985
+ "inheritedFrom": {
86986
+ "name": "SbbButtonBaseElement",
86987
+ "module": "core/base-elements/button-base-element.js"
86988
+ }
86989
+ },
86990
+ {
86991
+ "kind": "field",
86992
+ "name": "value",
86993
+ "type": {
86994
+ "text": "string"
87035
86995
  },
87036
- "parameters": [
87037
- {
87038
- "name": "evt",
87039
- "type": {
87040
- "text": "KeyboardEvent"
87041
- }
87042
- }
87043
- ]
86996
+ "privacy": "public",
86997
+ "inheritedFrom": {
86998
+ "name": "SbbButtonBaseElement",
86999
+ "module": "core/base-elements/button-base-element.js"
87000
+ },
87001
+ "default": "''",
87002
+ "description": "Value of the form element.",
87003
+ "attribute": "value"
87044
87004
  },
87045
87005
  {
87046
- "kind": "method",
87047
- "name": "_configureTrigger",
87006
+ "kind": "field",
87007
+ "name": "type",
87008
+ "privacy": "public",
87009
+ "description": "The type attribute to use for the button.",
87010
+ "default": "'button'",
87011
+ "type": {
87012
+ "text": "SbbButtonType"
87013
+ },
87014
+ "attribute": "type",
87015
+ "inheritedFrom": {
87016
+ "name": "SbbButtonBaseElement",
87017
+ "module": "core/base-elements/button-base-element.js"
87018
+ }
87019
+ },
87020
+ {
87021
+ "kind": "field",
87022
+ "name": "form",
87023
+ "type": {
87024
+ "text": "HTMLFormElement | null"
87025
+ },
87026
+ "privacy": "public",
87027
+ "description": "The `<form>` element to associate the button with.",
87028
+ "inheritedFrom": {
87029
+ "name": "SbbButtonBaseElement",
87030
+ "module": "core/base-elements/button-base-element.js"
87031
+ },
87032
+ "attribute": "form"
87033
+ },
87034
+ {
87035
+ "kind": "field",
87036
+ "name": "_formId",
87037
+ "type": {
87038
+ "text": "string"
87039
+ },
87048
87040
  "privacy": "private",
87049
- "return": {
87050
- "type": {
87051
- "text": "void"
87052
- }
87041
+ "default": "''",
87042
+ "inheritedFrom": {
87043
+ "name": "SbbButtonBaseElement",
87044
+ "module": "core/base-elements/button-base-element.js"
87053
87045
  }
87054
87046
  },
87055
87047
  {
87056
- "kind": "method",
87057
- "name": "_attachWindowEvents",
87048
+ "kind": "field",
87049
+ "name": "_handleButtonClick",
87058
87050
  "privacy": "private",
87059
- "return": {
87060
- "type": {
87061
- "text": "void"
87062
- }
87051
+ "inheritedFrom": {
87052
+ "name": "SbbButtonBaseElement",
87053
+ "module": "core/base-elements/button-base-element.js"
87063
87054
  }
87064
87055
  },
87065
87056
  {
87066
87057
  "kind": "method",
87067
- "name": "_interactiveElementClick",
87058
+ "name": "_requestSubmit",
87068
87059
  "privacy": "private",
87069
87060
  "return": {
87070
87061
  "type": {
@@ -87073,97 +87064,154 @@
87073
87064
  },
87074
87065
  "parameters": [
87075
87066
  {
87076
- "name": "event",
87067
+ "name": "form",
87077
87068
  "type": {
87078
- "text": "Event"
87069
+ "text": "HTMLFormElement"
87079
87070
  }
87080
87071
  }
87081
- ]
87072
+ ],
87073
+ "inheritedFrom": {
87074
+ "name": "SbbButtonBaseElement",
87075
+ "module": "core/base-elements/button-base-element.js"
87076
+ }
87082
87077
  },
87083
87078
  {
87084
87079
  "kind": "field",
87085
- "name": "_pointerDownListener",
87086
- "privacy": "private"
87080
+ "name": "_formKeyDown",
87081
+ "privacy": "private",
87082
+ "inheritedFrom": {
87083
+ "name": "SbbButtonBaseElement",
87084
+ "module": "core/base-elements/button-base-element.js"
87085
+ }
87087
87086
  },
87088
87087
  {
87089
87088
  "kind": "field",
87090
- "name": "_closeOnBackdropClick",
87091
- "privacy": "private"
87089
+ "name": "formAssociated",
87090
+ "type": {
87091
+ "text": "boolean"
87092
+ },
87093
+ "privacy": "public",
87094
+ "static": true,
87095
+ "default": "true",
87096
+ "inheritedFrom": {
87097
+ "name": "SbbFormAssociatedMixin",
87098
+ "module": "core/mixins/form-associated-mixin.js"
87099
+ }
87092
87100
  },
87093
87101
  {
87094
- "kind": "method",
87095
- "name": "_nestedMenus",
87096
- "privacy": "private",
87097
- "return": {
87098
- "type": {
87099
- "text": "SbbMenuElement[]"
87100
- }
87102
+ "kind": "field",
87103
+ "name": "name",
87104
+ "privacy": "public",
87105
+ "description": "Name of the form element. Will be read from name attribute.",
87106
+ "type": {
87107
+ "text": "string"
87101
87108
  },
87102
- "description": "Converts the linked list into an array of SbbMenuElement."
87109
+ "attribute": "name",
87110
+ "inheritedFrom": {
87111
+ "name": "SbbFormAssociatedMixin",
87112
+ "module": "core/mixins/form-associated-mixin.js"
87113
+ }
87103
87114
  },
87104
87115
  {
87105
- "kind": "method",
87106
- "name": "_parentMenu",
87107
- "privacy": "private",
87108
- "return": {
87109
- "type": {
87110
- "text": "SbbMenuElement | null"
87111
- }
87116
+ "kind": "field",
87117
+ "name": "validity",
87118
+ "type": {
87119
+ "text": "ValidityState"
87120
+ },
87121
+ "privacy": "public",
87122
+ "description": "Returns the ValidityState object for this element.",
87123
+ "readonly": true,
87124
+ "inheritedFrom": {
87125
+ "name": "SbbFormAssociatedMixin",
87126
+ "module": "core/mixins/form-associated-mixin.js"
87112
87127
  }
87113
87128
  },
87114
87129
  {
87115
- "kind": "method",
87116
- "name": "_mainMenu",
87117
- "privacy": "private",
87118
- "return": {
87119
- "type": {
87120
- "text": "SbbMenuElement"
87121
- }
87130
+ "kind": "field",
87131
+ "name": "validationMessage",
87132
+ "type": {
87133
+ "text": "string"
87122
87134
  },
87123
- "description": "The outermost menu."
87135
+ "privacy": "public",
87136
+ "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.",
87137
+ "readonly": true,
87138
+ "inheritedFrom": {
87139
+ "name": "SbbFormAssociatedMixin",
87140
+ "module": "core/mixins/form-associated-mixin.js"
87141
+ }
87124
87142
  },
87125
87143
  {
87126
- "kind": "method",
87127
- "name": "_isNested",
87144
+ "kind": "field",
87145
+ "name": "willValidate",
87146
+ "type": {
87147
+ "text": "boolean"
87148
+ },
87149
+ "privacy": "public",
87150
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
87151
+ "readonly": true,
87152
+ "inheritedFrom": {
87153
+ "name": "SbbFormAssociatedMixin",
87154
+ "module": "core/mixins/form-associated-mixin.js"
87155
+ }
87156
+ },
87157
+ {
87158
+ "kind": "field",
87159
+ "name": "_validityStates",
87128
87160
  "privacy": "private",
87129
- "return": {
87130
- "type": {
87131
- "text": "boolean"
87132
- }
87161
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
87162
+ "inheritedFrom": {
87163
+ "name": "SbbFormAssociatedMixin",
87164
+ "module": "core/mixins/form-associated-mixin.js"
87165
+ }
87166
+ },
87167
+ {
87168
+ "kind": "field",
87169
+ "name": "formDisabled",
87170
+ "type": {
87171
+ "text": "boolean"
87172
+ },
87173
+ "privacy": "protected",
87174
+ "default": "false",
87175
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
87176
+ "inheritedFrom": {
87177
+ "name": "SbbFormAssociatedMixin",
87178
+ "module": "core/mixins/form-associated-mixin.js"
87133
87179
  }
87134
87180
  },
87135
87181
  {
87136
87182
  "kind": "method",
87137
- "name": "_updateNestedInert",
87138
- "privacy": "private",
87183
+ "name": "checkValidity",
87184
+ "privacy": "public",
87139
87185
  "return": {
87140
87186
  "type": {
87141
- "text": "void"
87187
+ "text": "boolean"
87142
87188
  }
87189
+ },
87190
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
87191
+ "inheritedFrom": {
87192
+ "name": "SbbFormAssociatedMixin",
87193
+ "module": "core/mixins/form-associated-mixin.js"
87143
87194
  }
87144
87195
  },
87145
87196
  {
87146
87197
  "kind": "method",
87147
- "name": "_handleMouseOver",
87148
- "privacy": "private",
87198
+ "name": "reportValidity",
87199
+ "privacy": "public",
87149
87200
  "return": {
87150
87201
  "type": {
87151
- "text": "void"
87202
+ "text": "boolean"
87152
87203
  }
87153
87204
  },
87154
- "parameters": [
87155
- {
87156
- "name": "event",
87157
- "type": {
87158
- "text": "MouseEvent"
87159
- }
87160
- }
87161
- ]
87205
+ "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.",
87206
+ "inheritedFrom": {
87207
+ "name": "SbbFormAssociatedMixin",
87208
+ "module": "core/mixins/form-associated-mixin.js"
87209
+ }
87162
87210
  },
87163
87211
  {
87164
87212
  "kind": "method",
87165
- "name": "_onMenuAnimationEnd",
87166
- "privacy": "private",
87213
+ "name": "setCustomValidity",
87214
+ "privacy": "public",
87167
87215
  "return": {
87168
87216
  "type": {
87169
87217
  "text": "void"
@@ -87171,46 +87219,64 @@
87171
87219
  },
87172
87220
  "parameters": [
87173
87221
  {
87174
- "name": "event",
87222
+ "name": "message",
87175
87223
  "type": {
87176
- "text": "AnimationEvent"
87224
+ "text": "string"
87177
87225
  }
87178
87226
  }
87179
- ]
87227
+ ],
87228
+ "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.",
87229
+ "inheritedFrom": {
87230
+ "name": "SbbFormAssociatedMixin",
87231
+ "module": "core/mixins/form-associated-mixin.js"
87232
+ }
87180
87233
  },
87181
87234
  {
87182
87235
  "kind": "method",
87183
- "name": "_setMenuPosition",
87236
+ "name": "_hasDisabledAncestor",
87184
87237
  "privacy": "private",
87185
87238
  "return": {
87186
87239
  "type": {
87187
- "text": "void"
87240
+ "text": "boolean"
87188
87241
  }
87242
+ },
87243
+ "inheritedFrom": {
87244
+ "name": "SbbFormAssociatedMixin",
87245
+ "module": "core/mixins/form-associated-mixin.js"
87189
87246
  }
87190
87247
  },
87191
87248
  {
87192
87249
  "kind": "method",
87193
- "name": "_syncNegative",
87194
- "privacy": "private",
87250
+ "name": "updateFormValue",
87251
+ "privacy": "protected",
87195
87252
  "return": {
87196
87253
  "type": {
87197
87254
  "text": "void"
87198
87255
  }
87256
+ },
87257
+ "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",
87258
+ "inheritedFrom": {
87259
+ "name": "SbbFormAssociatedMixin",
87260
+ "module": "core/mixins/form-associated-mixin.js"
87199
87261
  }
87200
87262
  },
87201
87263
  {
87202
87264
  "kind": "method",
87203
- "name": "_isMobile",
87204
- "privacy": "private",
87265
+ "name": "formState",
87266
+ "privacy": "protected",
87205
87267
  "return": {
87206
87268
  "type": {
87207
- "text": "boolean"
87269
+ "text": "FormRestoreState"
87208
87270
  }
87271
+ },
87272
+ "inheritedFrom": {
87273
+ "name": "SbbFormAssociatedMixin",
87274
+ "module": "core/mixins/form-associated-mixin.js"
87209
87275
  }
87210
87276
  },
87211
87277
  {
87212
87278
  "kind": "method",
87213
- "name": "toggleState",
87279
+ "name": "setValidityFlag",
87214
87280
  "privacy": "protected",
87215
87281
  "return": {
87216
87282
  "type": {
@@ -87219,256 +87285,117 @@
87219
87285
  },
87220
87286
  "parameters": [
87221
87287
  {
87222
- "name": "value",
87288
+ "name": "flag",
87289
+ "type": {
87290
+ "text": "T"
87291
+ }
87292
+ },
87293
+ {
87294
+ "name": "message",
87223
87295
  "type": {
87224
87296
  "text": "string"
87225
87297
  }
87226
87298
  },
87227
87299
  {
87228
- "name": "force",
87300
+ "name": "flagValue",
87229
87301
  "optional": true,
87230
87302
  "type": {
87231
- "text": "boolean"
87303
+ "text": "ValidityStateFlags[T]"
87232
87304
  }
87233
87305
  }
87234
87306
  ],
87307
+ "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).",
87235
87308
  "inheritedFrom": {
87236
- "name": "SbbOpenCloseBaseElement",
87237
- "module": "core/base-elements/open-close-base-element.js"
87238
- }
87239
- },
87240
- {
87241
- "kind": "field",
87242
- "name": "events",
87243
- "privacy": "public",
87244
- "static": true,
87245
- "readonly": true,
87246
- "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
87247
- "type": {
87248
- "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
87249
- },
87250
- "inheritedFrom": {
87251
- "name": "SbbOpenCloseBaseElement",
87252
- "module": "core/base-elements/open-close-base-element.js"
87253
- }
87254
- },
87255
- {
87256
- "kind": "field",
87257
- "name": "state",
87258
- "privacy": "protected",
87259
- "description": "The state of the component.",
87260
- "type": {
87261
- "text": "SbbOpenedClosedState"
87262
- },
87263
- "default": "'closed'",
87264
- "inheritedFrom": {
87265
- "name": "SbbOpenCloseBaseElement",
87266
- "module": "core/base-elements/open-close-base-element.js"
87267
- }
87268
- },
87269
- {
87270
- "kind": "field",
87271
- "name": "_state",
87272
- "type": {
87273
- "text": "SbbOpenedClosedState"
87274
- },
87275
- "privacy": "private",
87276
- "inheritedFrom": {
87277
- "name": "SbbOpenCloseBaseElement",
87278
- "module": "core/base-elements/open-close-base-element.js"
87279
- }
87280
- },
87281
- {
87282
- "kind": "field",
87283
- "name": "isOpen",
87284
- "type": {
87285
- "text": "boolean"
87286
- },
87287
- "privacy": "public",
87288
- "description": "Whether the element is open.",
87289
- "readonly": true,
87290
- "inheritedFrom": {
87291
- "name": "SbbOpenCloseBaseElement",
87292
- "module": "core/base-elements/open-close-base-element.js"
87309
+ "name": "SbbFormAssociatedMixin",
87310
+ "module": "core/mixins/form-associated-mixin.js"
87293
87311
  }
87294
87312
  },
87295
87313
  {
87296
87314
  "kind": "method",
87297
- "name": "dispatchBeforeOpenEvent",
87315
+ "name": "removeValidityFlag",
87298
87316
  "privacy": "protected",
87299
87317
  "return": {
87300
87318
  "type": {
87301
- "text": "boolean"
87319
+ "text": "void"
87302
87320
  }
87303
87321
  },
87304
- "inheritedFrom": {
87305
- "name": "SbbOpenCloseBaseElement",
87306
- "module": "core/base-elements/open-close-base-element.js"
87307
- }
87308
- },
87309
- {
87310
- "kind": "method",
87311
- "name": "dispatchOpenEvent",
87312
- "privacy": "protected",
87313
- "return": {
87314
- "type": {
87315
- "text": "boolean"
87322
+ "parameters": [
87323
+ {
87324
+ "name": "flag",
87325
+ "type": {
87326
+ "text": "T"
87327
+ }
87316
87328
  }
87317
- },
87329
+ ],
87330
+ "description": "Removes the validity state flag entry and updates validity state.",
87318
87331
  "inheritedFrom": {
87319
- "name": "SbbOpenCloseBaseElement",
87320
- "module": "core/base-elements/open-close-base-element.js"
87332
+ "name": "SbbFormAssociatedMixin",
87333
+ "module": "core/mixins/form-associated-mixin.js"
87321
87334
  }
87322
87335
  },
87323
87336
  {
87324
87337
  "kind": "method",
87325
- "name": "dispatchBeforeCloseEvent",
87338
+ "name": "validate",
87326
87339
  "privacy": "protected",
87327
87340
  "return": {
87328
87341
  "type": {
87329
- "text": "boolean"
87342
+ "text": "void"
87330
87343
  }
87331
87344
  },
87345
+ "description": "To be called whenever the current element needs to be validated.",
87332
87346
  "inheritedFrom": {
87333
- "name": "SbbOpenCloseBaseElement",
87334
- "module": "core/base-elements/open-close-base-element.js"
87347
+ "name": "SbbFormAssociatedMixin",
87348
+ "module": "core/mixins/form-associated-mixin.js"
87335
87349
  }
87336
87350
  },
87337
87351
  {
87338
87352
  "kind": "method",
87339
- "name": "dispatchCloseEvent",
87353
+ "name": "shouldValidate",
87340
87354
  "privacy": "protected",
87341
87355
  "return": {
87342
87356
  "type": {
87343
87357
  "text": "boolean"
87344
87358
  }
87345
87359
  },
87360
+ "parameters": [
87361
+ {
87362
+ "name": "name",
87363
+ "type": {
87364
+ "text": "PropertyKey | undefined"
87365
+ }
87366
+ }
87367
+ ],
87368
+ "description": "Whether validation should be run on a property change with the given name.",
87346
87369
  "inheritedFrom": {
87347
- "name": "SbbOpenCloseBaseElement",
87348
- "module": "core/base-elements/open-close-base-element.js"
87349
- }
87350
- }
87351
- ],
87352
- "attributes": [
87353
- {
87354
- "name": "trigger",
87355
- "type": {
87356
- "text": "HTMLElement | null"
87357
- },
87358
- "default": "null",
87359
- "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
87360
- "fieldName": "trigger"
87361
- }
87362
- ],
87363
- "superclass": {
87364
- "name": "SbbOpenCloseBaseElement",
87365
- "module": "core/base-elements.js"
87366
- },
87367
- "tagName": "sbb-menu",
87368
- "customElement": true,
87369
- "events": [
87370
- {
87371
- "name": "beforeopen",
87372
- "type": {
87373
- "text": "Event"
87374
- },
87375
- "description": "Emits whenever the component starts the opening transition. Can be canceled.",
87376
- "inheritedFrom": {
87377
- "name": "SbbOpenCloseBaseElement",
87378
- "module": "core/base-elements/open-close-base-element.js"
87379
- }
87380
- },
87381
- {
87382
- "name": "open",
87383
- "type": {
87384
- "text": "Event"
87385
- },
87386
- "description": "Emits whenever the component is opened.",
87387
- "inheritedFrom": {
87388
- "name": "SbbOpenCloseBaseElement",
87389
- "module": "core/base-elements/open-close-base-element.js"
87390
- }
87391
- },
87392
- {
87393
- "name": "beforeclose",
87394
- "type": {
87395
- "text": "Event"
87396
- },
87397
- "description": "Emits whenever the component begins the closing transition. Can be canceled.",
87398
- "inheritedFrom": {
87399
- "name": "SbbOpenCloseBaseElement",
87400
- "module": "core/base-elements/open-close-base-element.js"
87370
+ "name": "SbbFormAssociatedMixin",
87371
+ "module": "core/mixins/form-associated-mixin.js"
87401
87372
  }
87402
87373
  },
87403
87374
  {
87404
- "name": "close",
87405
- "type": {
87406
- "text": "Event"
87375
+ "kind": "method",
87376
+ "name": "_setInternalValidity",
87377
+ "privacy": "private",
87378
+ "return": {
87379
+ "type": {
87380
+ "text": "void"
87381
+ }
87407
87382
  },
87408
- "description": "Emits whenever the component is closed.",
87409
87383
  "inheritedFrom": {
87410
- "name": "SbbOpenCloseBaseElement",
87411
- "module": "core/base-elements/open-close-base-element.js"
87384
+ "name": "SbbFormAssociatedMixin",
87385
+ "module": "core/mixins/form-associated-mixin.js"
87412
87386
  }
87413
- }
87414
- ]
87415
- }
87416
- ],
87417
- "exports": [
87418
- {
87419
- "kind": "js",
87420
- "name": "SbbMenuElement",
87421
- "declaration": {
87422
- "name": "SbbMenuElement",
87423
- "module": "menu/menu/menu.component.js"
87424
- }
87425
- },
87426
- {
87427
- "kind": "custom-element-definition",
87428
- "name": "sbb-menu",
87429
- "declaration": {
87430
- "name": "SbbMenuElement",
87431
- "module": "menu/menu/menu.component.js"
87432
- }
87433
- }
87434
- ]
87435
- },
87436
- {
87437
- "kind": "javascript-module",
87438
- "path": "menu/menu-button/menu-button.component.js",
87439
- "declarations": [
87440
- {
87441
- "kind": "class",
87442
- "description": "It displays a button element that can be used in the `sbb-menu` component.",
87443
- "name": "SbbMenuButtonElement",
87444
- "cssProperties": [
87445
- {
87446
- "description": "Can be used to modify horizontal padding.",
87447
- "name": "--sbb-menu-action-outer-horizontal-padding",
87448
- "default": "var(--sbb-spacing-fixed-3x)"
87449
- }
87450
- ],
87451
- "slots": [
87452
- {
87453
- "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
87454
- "name": ""
87455
87387
  },
87456
- {
87457
- "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
87458
- "name": "icon"
87459
- }
87460
- ],
87461
- "members": [
87462
87388
  {
87463
87389
  "kind": "field",
87464
- "name": "role",
87465
- "type": {
87466
- "text": "ElementInternals['role']"
87467
- },
87468
- "privacy": "public",
87469
- "static": true,
87470
- "readonly": true,
87471
- "default": "'menuitem'",
87390
+ "name": "_preventScrollOnSpaceKeydown",
87391
+ "privacy": "private",
87392
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
87393
+ "parameters": [
87394
+ {
87395
+ "description": "The origin event.",
87396
+ "name": "event"
87397
+ }
87398
+ ],
87472
87399
  "inheritedFrom": {
87473
87400
  "name": "SbbButtonLikeBaseElement",
87474
87401
  "module": "core/base-elements/button-base-element.js"
@@ -87476,88 +87403,75 @@
87476
87403
  },
87477
87404
  {
87478
87405
  "kind": "field",
87479
- "name": "disabledInteractive",
87480
- "type": {
87481
- "text": "boolean"
87482
- },
87483
- "privacy": "public",
87484
- "default": "false",
87485
- "description": "Whether the button should be aria-disabled but stay interactive.",
87486
- "attribute": "disabled-interactive",
87487
- "reflects": true,
87406
+ "name": "_removeActiveMarker",
87407
+ "privacy": "private",
87488
87408
  "inheritedFrom": {
87489
- "name": "SbbDisabledInteractiveMixin",
87490
- "module": "core/mixins/disabled-mixin.js"
87409
+ "name": "SbbButtonLikeBaseElement",
87410
+ "module": "core/base-elements/button-base-element.js"
87491
87411
  }
87492
87412
  },
87493
87413
  {
87494
87414
  "kind": "field",
87495
- "name": "disabled",
87496
- "privacy": "public",
87497
- "description": "Whether the component is disabled.",
87498
- "default": "false",
87499
- "type": {
87500
- "text": "boolean"
87501
- },
87502
- "attribute": "disabled",
87503
- "reflects": true,
87415
+ "name": "_dispatchClickEventOnSpaceKeyup",
87416
+ "privacy": "private",
87417
+ "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.",
87418
+ "parameters": [
87419
+ {
87420
+ "description": "The origin event.",
87421
+ "name": "event"
87422
+ }
87423
+ ],
87504
87424
  "inheritedFrom": {
87505
- "name": "SbbDisabledMixin",
87506
- "module": "core/mixins/disabled-mixin.js"
87425
+ "name": "SbbButtonLikeBaseElement",
87426
+ "module": "core/base-elements/button-base-element.js"
87507
87427
  }
87508
87428
  },
87509
87429
  {
87510
87430
  "kind": "field",
87511
- "name": "#disabled",
87431
+ "name": "_dispatchClickEvent",
87512
87432
  "privacy": "private",
87513
- "type": {
87514
- "text": "boolean"
87515
- },
87516
- "default": "false",
87517
87433
  "inheritedFrom": {
87518
- "name": "SbbDisabledMixin",
87519
- "module": "core/mixins/disabled-mixin.js"
87434
+ "name": "SbbButtonLikeBaseElement",
87435
+ "module": "core/base-elements/button-base-element.js"
87520
87436
  }
87521
87437
  },
87522
87438
  {
87523
87439
  "kind": "method",
87524
- "name": "isDisabledExternally",
87440
+ "name": "toggleState",
87525
87441
  "privacy": "protected",
87526
87442
  "return": {
87527
87443
  "type": {
87528
- "text": "boolean"
87444
+ "text": "void"
87529
87445
  }
87530
87446
  },
87531
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
87447
+ "parameters": [
87448
+ {
87449
+ "name": "value",
87450
+ "type": {
87451
+ "text": "string"
87452
+ }
87453
+ },
87454
+ {
87455
+ "name": "force",
87456
+ "optional": true,
87457
+ "type": {
87458
+ "text": "boolean"
87459
+ }
87460
+ }
87461
+ ],
87532
87462
  "inheritedFrom": {
87533
- "name": "SbbDisabledMixin",
87534
- "module": "core/mixins/disabled-mixin.js"
87463
+ "name": "SbbActionBaseElement",
87464
+ "module": "core/base-elements/action-base-element.js"
87535
87465
  }
87536
87466
  },
87537
87467
  {
87538
87468
  "kind": "field",
87539
- "name": "styles",
87469
+ "name": "maybeDisabled",
87540
87470
  "type": {
87541
- "text": "CSSResultGroup"
87471
+ "text": "boolean | undefined"
87542
87472
  },
87543
- "privacy": "public",
87544
- "static": true,
87545
- "default": "[boxSizingStyles, style]",
87546
- "inheritedFrom": {
87547
- "name": "SbbMenuActionCommonElementMixin",
87548
- "module": "menu/common/menu-action-common.js"
87549
- }
87550
- },
87551
- {
87552
- "kind": "method",
87553
- "name": "renderTemplate",
87554
87473
  "privacy": "protected",
87555
- "return": {
87556
- "type": {
87557
- "text": "TemplateResult"
87558
- }
87559
- },
87560
- "description": "Override this method to render the component template.",
87474
+ "readonly": true,
87561
87475
  "inheritedFrom": {
87562
87476
  "name": "SbbActionBaseElement",
87563
87477
  "module": "core/base-elements/action-base-element.js"
@@ -87565,375 +87479,411 @@
87565
87479
  },
87566
87480
  {
87567
87481
  "kind": "field",
87568
- "name": "iconName",
87482
+ "name": "maybeDisabledInteractive",
87569
87483
  "type": {
87570
- "text": "string"
87484
+ "text": "boolean | undefined"
87571
87485
  },
87572
- "privacy": "public",
87573
- "default": "''",
87574
- "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.",
87575
- "attribute": "icon-name",
87486
+ "privacy": "protected",
87487
+ "readonly": true,
87576
87488
  "inheritedFrom": {
87577
- "name": "SbbIconNameMixin",
87578
- "module": "icon/icon-name-mixin.js"
87489
+ "name": "SbbActionBaseElement",
87490
+ "module": "core/base-elements/action-base-element.js"
87579
87491
  }
87580
87492
  },
87581
87493
  {
87582
87494
  "kind": "method",
87583
- "name": "renderIconSlot",
87495
+ "name": "setupBaseEventHandlers",
87584
87496
  "privacy": "protected",
87585
87497
  "return": {
87586
87498
  "type": {
87587
- "text": "TemplateResult"
87499
+ "text": "void"
87588
87500
  }
87589
87501
  },
87590
- "parameters": [
87591
- {
87592
- "name": "classname",
87593
- "optional": true,
87594
- "type": {
87595
- "text": "string"
87596
- }
87597
- }
87598
- ],
87599
87502
  "inheritedFrom": {
87600
- "name": "SbbIconNameMixin",
87601
- "module": "icon/icon-name-mixin.js"
87503
+ "name": "SbbActionBaseElement",
87504
+ "module": "core/base-elements/action-base-element.js"
87602
87505
  }
87506
+ }
87507
+ ],
87508
+ "mixins": [
87509
+ {
87510
+ "name": "SbbDisabledTabIndexActionMixin",
87511
+ "module": "core/mixins.js"
87603
87512
  },
87604
87513
  {
87605
- "kind": "method",
87606
- "name": "renderIconName",
87607
- "privacy": "protected",
87608
- "return": {
87609
- "type": {
87610
- "text": "string"
87611
- }
87514
+ "name": "SbbMenuActionCommonElementMixin",
87515
+ "module": "menu/common.js"
87516
+ }
87517
+ ],
87518
+ "superclass": {
87519
+ "name": "SbbButtonBaseElement",
87520
+ "module": "core/base-elements.js"
87521
+ },
87522
+ "tagName": "sbb-menu-button",
87523
+ "customElement": true,
87524
+ "attributes": [
87525
+ {
87526
+ "name": "disabled-interactive",
87527
+ "type": {
87528
+ "text": "boolean"
87612
87529
  },
87530
+ "default": "false",
87531
+ "description": "Whether the button should be aria-disabled but stay interactive.",
87532
+ "fieldName": "disabledInteractive",
87613
87533
  "inheritedFrom": {
87614
- "name": "SbbIconNameMixin",
87615
- "module": "icon/icon-name-mixin.js"
87534
+ "name": "SbbDisabledInteractiveMixin",
87535
+ "module": "core/mixins/disabled-mixin.js"
87616
87536
  }
87617
87537
  },
87618
87538
  {
87619
- "kind": "method",
87620
- "name": "_renderIconName",
87621
- "privacy": "private",
87622
- "return": {
87623
- "type": {
87624
- "text": "string"
87625
- }
87539
+ "name": "disabled",
87540
+ "description": "Whether the component is disabled.",
87541
+ "default": "false",
87542
+ "type": {
87543
+ "text": "boolean"
87626
87544
  },
87545
+ "fieldName": "disabled",
87627
87546
  "inheritedFrom": {
87628
- "name": "SbbIconNameMixin",
87629
- "module": "icon/icon-name-mixin.js"
87547
+ "name": "SbbDisabledMixin",
87548
+ "module": "core/mixins/disabled-mixin.js"
87630
87549
  }
87631
87550
  },
87632
87551
  {
87633
- "kind": "field",
87634
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
87552
+ "name": "icon-name",
87635
87553
  "type": {
87636
- "text": "array"
87554
+ "text": "string"
87637
87555
  },
87638
- "privacy": "private",
87639
- "readonly": true,
87640
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
87556
+ "default": "''",
87557
+ "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.",
87558
+ "fieldName": "iconName",
87641
87559
  "inheritedFrom": {
87642
- "name": "SbbButtonBaseElement",
87643
- "module": "core/base-elements/button-base-element.js"
87560
+ "name": "SbbIconNameMixin",
87561
+ "module": "icon/icon-name-mixin.js"
87644
87562
  }
87645
87563
  },
87646
87564
  {
87647
- "kind": "field",
87648
87565
  "name": "value",
87649
87566
  "type": {
87650
87567
  "text": "string"
87651
87568
  },
87652
- "privacy": "public",
87569
+ "default": "''",
87570
+ "description": "Value of the form element.",
87571
+ "fieldName": "value",
87653
87572
  "inheritedFrom": {
87654
87573
  "name": "SbbButtonBaseElement",
87655
87574
  "module": "core/base-elements/button-base-element.js"
87656
- },
87657
- "default": "''",
87658
- "description": "Value of the form element.",
87659
- "attribute": "value"
87575
+ }
87660
87576
  },
87661
87577
  {
87662
- "kind": "field",
87663
87578
  "name": "type",
87664
- "privacy": "public",
87665
87579
  "description": "The type attribute to use for the button.",
87666
87580
  "default": "'button'",
87667
87581
  "type": {
87668
87582
  "text": "SbbButtonType"
87669
87583
  },
87670
- "attribute": "type",
87584
+ "fieldName": "type",
87671
87585
  "inheritedFrom": {
87672
87586
  "name": "SbbButtonBaseElement",
87673
87587
  "module": "core/base-elements/button-base-element.js"
87674
87588
  }
87675
87589
  },
87676
87590
  {
87677
- "kind": "field",
87678
87591
  "name": "form",
87592
+ "description": "The `<form>` element to associate the button with.",
87679
87593
  "type": {
87680
87594
  "text": "HTMLFormElement | null"
87681
87595
  },
87682
- "privacy": "public",
87683
- "description": "The `<form>` element to associate the button with.",
87596
+ "fieldName": "form",
87684
87597
  "inheritedFrom": {
87685
87598
  "name": "SbbButtonBaseElement",
87686
87599
  "module": "core/base-elements/button-base-element.js"
87687
- },
87688
- "attribute": "form"
87600
+ }
87689
87601
  },
87690
87602
  {
87691
- "kind": "field",
87692
- "name": "_formId",
87603
+ "name": "name",
87604
+ "description": "Name of the form element. Will be read from name attribute.",
87693
87605
  "type": {
87694
87606
  "text": "string"
87695
87607
  },
87696
- "privacy": "private",
87697
- "default": "''",
87608
+ "fieldName": "name",
87698
87609
  "inheritedFrom": {
87699
- "name": "SbbButtonBaseElement",
87700
- "module": "core/base-elements/button-base-element.js"
87610
+ "name": "SbbFormAssociatedMixin",
87611
+ "module": "core/mixins/form-associated-mixin.js"
87701
87612
  }
87702
- },
87613
+ }
87614
+ ]
87615
+ }
87616
+ ],
87617
+ "exports": [
87618
+ {
87619
+ "kind": "js",
87620
+ "name": "SbbMenuButtonElement",
87621
+ "declaration": {
87622
+ "name": "SbbMenuButtonElement",
87623
+ "module": "menu/menu-button/menu-button.component.js"
87624
+ }
87625
+ },
87626
+ {
87627
+ "kind": "custom-element-definition",
87628
+ "name": "sbb-menu-button",
87629
+ "declaration": {
87630
+ "name": "SbbMenuButtonElement",
87631
+ "module": "menu/menu-button/menu-button.component.js"
87632
+ }
87633
+ }
87634
+ ]
87635
+ },
87636
+ {
87637
+ "kind": "javascript-module",
87638
+ "path": "menu/menu/menu.component.js",
87639
+ "declarations": [
87640
+ {
87641
+ "kind": "class",
87642
+ "description": "It displays a contextual menu with one or more action element.",
87643
+ "name": "SbbMenuElement",
87644
+ "cssProperties": [
87703
87645
  {
87704
- "kind": "field",
87705
- "name": "_handleButtonClick",
87706
- "privacy": "private",
87707
- "inheritedFrom": {
87708
- "name": "SbbButtonBaseElement",
87709
- "module": "core/base-elements/button-base-element.js"
87710
- }
87711
- },
87646
+ "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`.",
87647
+ "name": "--sbb-menu-z-index",
87648
+ "default": "var(--sbb-overlay-default-z-index)"
87649
+ }
87650
+ ],
87651
+ "slots": [
87712
87652
  {
87713
- "kind": "method",
87714
- "name": "_requestSubmit",
87715
- "privacy": "private",
87716
- "return": {
87717
- "type": {
87718
- "text": "void"
87719
- }
87720
- },
87721
- "parameters": [
87722
- {
87723
- "name": "form",
87724
- "type": {
87725
- "text": "HTMLFormElement"
87726
- }
87727
- }
87728
- ],
87729
- "inheritedFrom": {
87730
- "name": "SbbButtonBaseElement",
87731
- "module": "core/base-elements/button-base-element.js"
87732
- }
87733
- },
87653
+ "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
87654
+ "name": ""
87655
+ }
87656
+ ],
87657
+ "members": [
87734
87658
  {
87735
87659
  "kind": "field",
87736
- "name": "_formKeyDown",
87737
- "privacy": "private",
87738
- "inheritedFrom": {
87739
- "name": "SbbButtonBaseElement",
87740
- "module": "core/base-elements/button-base-element.js"
87741
- }
87660
+ "name": "role",
87661
+ "type": {
87662
+ "text": "string"
87663
+ },
87664
+ "privacy": "public",
87665
+ "static": true,
87666
+ "readonly": true,
87667
+ "default": "'menu'"
87742
87668
  },
87743
87669
  {
87744
87670
  "kind": "field",
87745
- "name": "formAssociated",
87671
+ "name": "trigger",
87746
87672
  "type": {
87747
- "text": "boolean"
87673
+ "text": "HTMLElement | null"
87748
87674
  },
87749
87675
  "privacy": "public",
87750
- "static": true,
87751
- "default": "true",
87752
- "inheritedFrom": {
87753
- "name": "SbbFormAssociatedMixin",
87754
- "module": "core/mixins/form-associated-mixin.js"
87755
- }
87676
+ "default": "null",
87677
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
87678
+ "attribute": "trigger"
87756
87679
  },
87757
87680
  {
87758
87681
  "kind": "field",
87759
- "name": "name",
87760
- "privacy": "public",
87761
- "description": "Name of the form element. Will be read from name attribute.",
87682
+ "name": "_menu",
87762
87683
  "type": {
87763
- "text": "string"
87684
+ "text": "HTMLDivElement"
87764
87685
  },
87765
- "attribute": "name",
87766
- "inheritedFrom": {
87767
- "name": "SbbFormAssociatedMixin",
87768
- "module": "core/mixins/form-associated-mixin.js"
87769
- }
87686
+ "privacy": "private"
87770
87687
  },
87771
87688
  {
87772
87689
  "kind": "field",
87773
- "name": "validity",
87690
+ "name": "_triggerElement",
87774
87691
  "type": {
87775
- "text": "ValidityState"
87692
+ "text": "HTMLElement | null"
87776
87693
  },
87777
- "privacy": "public",
87778
- "description": "Returns the ValidityState object for this element.",
87779
- "readonly": true,
87780
- "inheritedFrom": {
87781
- "name": "SbbFormAssociatedMixin",
87782
- "module": "core/mixins/form-associated-mixin.js"
87783
- }
87694
+ "privacy": "private",
87695
+ "default": "null"
87784
87696
  },
87785
87697
  {
87786
87698
  "kind": "field",
87787
- "name": "validationMessage",
87699
+ "name": "_triggerAbortController",
87788
87700
  "type": {
87789
- "text": "string"
87701
+ "text": "AbortController"
87790
87702
  },
87791
- "privacy": "public",
87792
- "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.",
87793
- "readonly": true,
87794
- "inheritedFrom": {
87795
- "name": "SbbFormAssociatedMixin",
87796
- "module": "core/mixins/form-associated-mixin.js"
87797
- }
87703
+ "privacy": "private"
87798
87704
  },
87799
87705
  {
87800
87706
  "kind": "field",
87801
- "name": "willValidate",
87707
+ "name": "_isPointerDownEventOnMenu",
87802
87708
  "type": {
87803
87709
  "text": "boolean"
87804
87710
  },
87805
- "privacy": "public",
87806
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
87807
- "readonly": true,
87808
- "inheritedFrom": {
87809
- "name": "SbbFormAssociatedMixin",
87810
- "module": "core/mixins/form-associated-mixin.js"
87811
- }
87711
+ "privacy": "private",
87712
+ "default": "false"
87713
+ },
87714
+ {
87715
+ "kind": "field",
87716
+ "name": "_windowEventsController",
87717
+ "type": {
87718
+ "text": "AbortController"
87719
+ },
87720
+ "privacy": "private"
87721
+ },
87722
+ {
87723
+ "kind": "field",
87724
+ "name": "_escapableOverlayController",
87725
+ "privacy": "private",
87726
+ "default": "new SbbEscapableOverlayController(this)"
87727
+ },
87728
+ {
87729
+ "kind": "field",
87730
+ "name": "_focusTrapController",
87731
+ "privacy": "private",
87732
+ "default": "new SbbFocusTrapController(this)"
87733
+ },
87734
+ {
87735
+ "kind": "field",
87736
+ "name": "_scrollHandler",
87737
+ "privacy": "private",
87738
+ "default": "new SbbScrollHandler()"
87739
+ },
87740
+ {
87741
+ "kind": "field",
87742
+ "name": "_inertController",
87743
+ "privacy": "private",
87744
+ "default": "new SbbInertController(this)"
87745
+ },
87746
+ {
87747
+ "kind": "field",
87748
+ "name": "_mobileBreakpoint",
87749
+ "privacy": "private",
87750
+ "default": "SbbMediaQueryBreakpointSmallAndBelow"
87751
+ },
87752
+ {
87753
+ "kind": "field",
87754
+ "name": "_mediaMatcher",
87755
+ "privacy": "private",
87756
+ "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
87757
+ },
87758
+ {
87759
+ "kind": "field",
87760
+ "name": "_darkModeController",
87761
+ "privacy": "private",
87762
+ "default": "new SbbDarkModeController(this, () => this._syncNegative())"
87763
+ },
87764
+ {
87765
+ "kind": "field",
87766
+ "name": "_language",
87767
+ "privacy": "private",
87768
+ "default": "new SbbLanguageController(this)"
87812
87769
  },
87813
87770
  {
87814
87771
  "kind": "field",
87815
- "name": "_validityStates",
87772
+ "name": "_nestedMenu",
87773
+ "type": {
87774
+ "text": "SbbMenuElement | null"
87775
+ },
87816
87776
  "privacy": "private",
87817
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
87818
- "inheritedFrom": {
87819
- "name": "SbbFormAssociatedMixin",
87820
- "module": "core/mixins/form-associated-mixin.js"
87821
- }
87777
+ "default": "null"
87822
87778
  },
87823
87779
  {
87824
- "kind": "field",
87825
- "name": "formDisabled",
87826
- "type": {
87827
- "text": "boolean"
87780
+ "kind": "method",
87781
+ "name": "escapeStrategy",
87782
+ "privacy": "public",
87783
+ "return": {
87784
+ "type": {
87785
+ "text": "void"
87786
+ }
87828
87787
  },
87829
- "privacy": "protected",
87830
- "default": "false",
87831
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
87788
+ "description": "The method which is called on escape key press. Defaults to calling close()",
87832
87789
  "inheritedFrom": {
87833
- "name": "SbbFormAssociatedMixin",
87834
- "module": "core/mixins/form-associated-mixin.js"
87790
+ "name": "SbbOpenCloseBaseElement",
87791
+ "module": "core/base-elements/open-close-base-element.js"
87835
87792
  }
87836
87793
  },
87837
87794
  {
87838
87795
  "kind": "method",
87839
- "name": "checkValidity",
87796
+ "name": "open",
87840
87797
  "privacy": "public",
87841
87798
  "return": {
87842
87799
  "type": {
87843
- "text": "boolean"
87800
+ "text": "void"
87844
87801
  }
87845
87802
  },
87846
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
87803
+ "description": "Opens the menu on trigger click.",
87847
87804
  "inheritedFrom": {
87848
- "name": "SbbFormAssociatedMixin",
87849
- "module": "core/mixins/form-associated-mixin.js"
87805
+ "name": "SbbOpenCloseBaseElement",
87806
+ "module": "core/base-elements/open-close-base-element.js"
87850
87807
  }
87851
87808
  },
87852
87809
  {
87853
87810
  "kind": "method",
87854
- "name": "reportValidity",
87811
+ "name": "close",
87855
87812
  "privacy": "public",
87856
87813
  "return": {
87857
87814
  "type": {
87858
- "text": "boolean"
87815
+ "text": "void"
87859
87816
  }
87860
87817
  },
87861
- "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.",
87818
+ "description": "Closes the menu and all its nested menus.",
87862
87819
  "inheritedFrom": {
87863
- "name": "SbbFormAssociatedMixin",
87864
- "module": "core/mixins/form-associated-mixin.js"
87820
+ "name": "SbbOpenCloseBaseElement",
87821
+ "module": "core/base-elements/open-close-base-element.js"
87865
87822
  }
87866
87823
  },
87867
87824
  {
87868
87825
  "kind": "method",
87869
- "name": "setCustomValidity",
87826
+ "name": "closeAll",
87870
87827
  "privacy": "public",
87871
87828
  "return": {
87872
87829
  "type": {
87873
87830
  "text": "void"
87874
87831
  }
87875
87832
  },
87833
+ "description": "Closes the menu and all related menus (nested and parent menus)."
87834
+ },
87835
+ {
87836
+ "kind": "method",
87837
+ "name": "_close",
87838
+ "privacy": "private",
87839
+ "return": {
87840
+ "type": {
87841
+ "text": "void"
87842
+ }
87843
+ },
87876
87844
  "parameters": [
87877
87845
  {
87878
- "name": "message",
87879
- "type": {
87880
- "text": "string"
87881
- }
87846
+ "name": "closeAll",
87847
+ "default": "false",
87848
+ "description": "If true, it ensures animations are correct by toggling some states when closing all related menus at once.",
87849
+ "optional": true
87882
87850
  }
87883
- ],
87884
- "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.",
87885
- "inheritedFrom": {
87886
- "name": "SbbFormAssociatedMixin",
87887
- "module": "core/mixins/form-associated-mixin.js"
87888
- }
87851
+ ]
87889
87852
  },
87890
87853
  {
87891
87854
  "kind": "method",
87892
- "name": "_hasDisabledAncestor",
87855
+ "name": "_isZeroAnimationDuration",
87893
87856
  "privacy": "private",
87894
87857
  "return": {
87895
87858
  "type": {
87896
87859
  "text": "boolean"
87897
87860
  }
87898
- },
87899
- "inheritedFrom": {
87900
- "name": "SbbFormAssociatedMixin",
87901
- "module": "core/mixins/form-associated-mixin.js"
87902
87861
  }
87903
87862
  },
87904
87863
  {
87905
87864
  "kind": "method",
87906
- "name": "updateFormValue",
87907
- "privacy": "protected",
87865
+ "name": "_handleOpening",
87866
+ "privacy": "private",
87908
87867
  "return": {
87909
87868
  "type": {
87910
87869
  "text": "void"
87911
87870
  }
87912
- },
87913
- "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",
87914
- "inheritedFrom": {
87915
- "name": "SbbFormAssociatedMixin",
87916
- "module": "core/mixins/form-associated-mixin.js"
87917
87871
  }
87918
87872
  },
87919
87873
  {
87920
87874
  "kind": "method",
87921
- "name": "formState",
87922
- "privacy": "protected",
87875
+ "name": "_handleClosing",
87876
+ "privacy": "private",
87923
87877
  "return": {
87924
87878
  "type": {
87925
- "text": "FormRestoreState"
87879
+ "text": "void"
87926
87880
  }
87927
- },
87928
- "inheritedFrom": {
87929
- "name": "SbbFormAssociatedMixin",
87930
- "module": "core/mixins/form-associated-mixin.js"
87931
87881
  }
87932
87882
  },
87933
87883
  {
87934
87884
  "kind": "method",
87935
- "name": "setValidityFlag",
87936
- "privacy": "protected",
87885
+ "name": "_handleKeyDown",
87886
+ "privacy": "private",
87937
87887
  "return": {
87938
87888
  "type": {
87939
87889
  "text": "void"
@@ -87941,35 +87891,37 @@
87941
87891
  },
87942
87892
  "parameters": [
87943
87893
  {
87944
- "name": "flag",
87945
- "type": {
87946
- "text": "T"
87947
- }
87948
- },
87949
- {
87950
- "name": "message",
87951
- "type": {
87952
- "text": "string"
87953
- }
87954
- },
87955
- {
87956
- "name": "flagValue",
87957
- "optional": true,
87894
+ "name": "evt",
87958
87895
  "type": {
87959
- "text": "ValidityStateFlags[T]"
87896
+ "text": "KeyboardEvent"
87960
87897
  }
87961
87898
  }
87962
- ],
87963
- "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).",
87964
- "inheritedFrom": {
87965
- "name": "SbbFormAssociatedMixin",
87966
- "module": "core/mixins/form-associated-mixin.js"
87899
+ ]
87900
+ },
87901
+ {
87902
+ "kind": "method",
87903
+ "name": "_configureTrigger",
87904
+ "privacy": "private",
87905
+ "return": {
87906
+ "type": {
87907
+ "text": "void"
87908
+ }
87967
87909
  }
87968
87910
  },
87969
87911
  {
87970
87912
  "kind": "method",
87971
- "name": "removeValidityFlag",
87972
- "privacy": "protected",
87913
+ "name": "_attachWindowEvents",
87914
+ "privacy": "private",
87915
+ "return": {
87916
+ "type": {
87917
+ "text": "void"
87918
+ }
87919
+ }
87920
+ },
87921
+ {
87922
+ "kind": "method",
87923
+ "name": "_interactiveElementClick",
87924
+ "privacy": "private",
87973
87925
  "return": {
87974
87926
  "type": {
87975
87927
  "text": "void"
@@ -87977,118 +87929,139 @@
87977
87929
  },
87978
87930
  "parameters": [
87979
87931
  {
87980
- "name": "flag",
87932
+ "name": "event",
87981
87933
  "type": {
87982
- "text": "T"
87934
+ "text": "Event"
87983
87935
  }
87984
87936
  }
87985
- ],
87986
- "description": "Removes the validity state flag entry and updates validity state.",
87987
- "inheritedFrom": {
87988
- "name": "SbbFormAssociatedMixin",
87989
- "module": "core/mixins/form-associated-mixin.js"
87990
- }
87937
+ ]
87938
+ },
87939
+ {
87940
+ "kind": "field",
87941
+ "name": "_pointerDownListener",
87942
+ "privacy": "private"
87943
+ },
87944
+ {
87945
+ "kind": "field",
87946
+ "name": "_closeOnBackdropClick",
87947
+ "privacy": "private"
87991
87948
  },
87992
87949
  {
87993
87950
  "kind": "method",
87994
- "name": "validate",
87995
- "privacy": "protected",
87951
+ "name": "_nestedMenus",
87952
+ "privacy": "private",
87996
87953
  "return": {
87997
87954
  "type": {
87998
- "text": "void"
87955
+ "text": "SbbMenuElement[]"
87999
87956
  }
88000
87957
  },
88001
- "description": "To be called whenever the current element needs to be validated.",
88002
- "inheritedFrom": {
88003
- "name": "SbbFormAssociatedMixin",
88004
- "module": "core/mixins/form-associated-mixin.js"
87958
+ "description": "Converts the linked list into an array of SbbMenuElement."
87959
+ },
87960
+ {
87961
+ "kind": "method",
87962
+ "name": "_parentMenu",
87963
+ "privacy": "private",
87964
+ "return": {
87965
+ "type": {
87966
+ "text": "SbbMenuElement | null"
87967
+ }
88005
87968
  }
88006
87969
  },
88007
87970
  {
88008
87971
  "kind": "method",
88009
- "name": "shouldValidate",
88010
- "privacy": "protected",
87972
+ "name": "_mainMenu",
87973
+ "privacy": "private",
87974
+ "return": {
87975
+ "type": {
87976
+ "text": "SbbMenuElement"
87977
+ }
87978
+ },
87979
+ "description": "The outermost menu."
87980
+ },
87981
+ {
87982
+ "kind": "method",
87983
+ "name": "_isNested",
87984
+ "privacy": "private",
88011
87985
  "return": {
88012
87986
  "type": {
88013
87987
  "text": "boolean"
88014
87988
  }
87989
+ }
87990
+ },
87991
+ {
87992
+ "kind": "method",
87993
+ "name": "_updateNestedInert",
87994
+ "privacy": "private",
87995
+ "return": {
87996
+ "type": {
87997
+ "text": "void"
87998
+ }
87999
+ }
88000
+ },
88001
+ {
88002
+ "kind": "method",
88003
+ "name": "_handleMouseOver",
88004
+ "privacy": "private",
88005
+ "return": {
88006
+ "type": {
88007
+ "text": "void"
88008
+ }
88015
88009
  },
88016
88010
  "parameters": [
88017
88011
  {
88018
- "name": "name",
88012
+ "name": "event",
88019
88013
  "type": {
88020
- "text": "PropertyKey | undefined"
88014
+ "text": "MouseEvent"
88021
88015
  }
88022
88016
  }
88023
- ],
88024
- "description": "Whether validation should be run on a property change with the given name.",
88025
- "inheritedFrom": {
88026
- "name": "SbbFormAssociatedMixin",
88027
- "module": "core/mixins/form-associated-mixin.js"
88028
- }
88017
+ ]
88029
88018
  },
88030
88019
  {
88031
88020
  "kind": "method",
88032
- "name": "_setInternalValidity",
88021
+ "name": "_onMenuAnimationEnd",
88033
88022
  "privacy": "private",
88034
88023
  "return": {
88035
88024
  "type": {
88036
88025
  "text": "void"
88037
88026
  }
88038
88027
  },
88039
- "inheritedFrom": {
88040
- "name": "SbbFormAssociatedMixin",
88041
- "module": "core/mixins/form-associated-mixin.js"
88042
- }
88043
- },
88044
- {
88045
- "kind": "field",
88046
- "name": "_preventScrollOnSpaceKeydown",
88047
- "privacy": "private",
88048
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
88049
88028
  "parameters": [
88050
88029
  {
88051
- "description": "The origin event.",
88052
- "name": "event"
88030
+ "name": "event",
88031
+ "type": {
88032
+ "text": "AnimationEvent"
88033
+ }
88053
88034
  }
88054
- ],
88055
- "inheritedFrom": {
88056
- "name": "SbbButtonLikeBaseElement",
88057
- "module": "core/base-elements/button-base-element.js"
88058
- }
88035
+ ]
88059
88036
  },
88060
88037
  {
88061
- "kind": "field",
88062
- "name": "_removeActiveMarker",
88038
+ "kind": "method",
88039
+ "name": "_setMenuPosition",
88063
88040
  "privacy": "private",
88064
- "inheritedFrom": {
88065
- "name": "SbbButtonLikeBaseElement",
88066
- "module": "core/base-elements/button-base-element.js"
88041
+ "return": {
88042
+ "type": {
88043
+ "text": "void"
88044
+ }
88067
88045
  }
88068
88046
  },
88069
88047
  {
88070
- "kind": "field",
88071
- "name": "_dispatchClickEventOnSpaceKeyup",
88048
+ "kind": "method",
88049
+ "name": "_syncNegative",
88072
88050
  "privacy": "private",
88073
- "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.",
88074
- "parameters": [
88075
- {
88076
- "description": "The origin event.",
88077
- "name": "event"
88051
+ "return": {
88052
+ "type": {
88053
+ "text": "void"
88078
88054
  }
88079
- ],
88080
- "inheritedFrom": {
88081
- "name": "SbbButtonLikeBaseElement",
88082
- "module": "core/base-elements/button-base-element.js"
88083
88055
  }
88084
88056
  },
88085
88057
  {
88086
- "kind": "field",
88087
- "name": "_dispatchClickEvent",
88058
+ "kind": "method",
88059
+ "name": "_isMobile",
88088
88060
  "privacy": "private",
88089
- "inheritedFrom": {
88090
- "name": "SbbButtonLikeBaseElement",
88091
- "module": "core/base-elements/button-base-element.js"
88061
+ "return": {
88062
+ "type": {
88063
+ "text": "boolean"
88064
+ }
88092
88065
  }
88093
88066
  },
88094
88067
  {
@@ -88116,155 +88089,182 @@
88116
88089
  }
88117
88090
  ],
88118
88091
  "inheritedFrom": {
88119
- "name": "SbbActionBaseElement",
88120
- "module": "core/base-elements/action-base-element.js"
88092
+ "name": "SbbOpenCloseBaseElement",
88093
+ "module": "core/base-elements/open-close-base-element.js"
88121
88094
  }
88122
88095
  },
88123
88096
  {
88124
88097
  "kind": "field",
88125
- "name": "maybeDisabled",
88098
+ "name": "events",
88099
+ "privacy": "public",
88100
+ "static": true,
88101
+ "readonly": true,
88102
+ "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
88126
88103
  "type": {
88127
- "text": "boolean | undefined"
88104
+ "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
88128
88105
  },
88106
+ "inheritedFrom": {
88107
+ "name": "SbbOpenCloseBaseElement",
88108
+ "module": "core/base-elements/open-close-base-element.js"
88109
+ }
88110
+ },
88111
+ {
88112
+ "kind": "field",
88113
+ "name": "state",
88129
88114
  "privacy": "protected",
88130
- "readonly": true,
88115
+ "description": "The state of the component.",
88116
+ "type": {
88117
+ "text": "SbbOpenedClosedState"
88118
+ },
88119
+ "default": "'closed'",
88131
88120
  "inheritedFrom": {
88132
- "name": "SbbActionBaseElement",
88133
- "module": "core/base-elements/action-base-element.js"
88121
+ "name": "SbbOpenCloseBaseElement",
88122
+ "module": "core/base-elements/open-close-base-element.js"
88134
88123
  }
88135
88124
  },
88136
88125
  {
88137
88126
  "kind": "field",
88138
- "name": "maybeDisabledInteractive",
88127
+ "name": "_state",
88139
88128
  "type": {
88140
- "text": "boolean | undefined"
88129
+ "text": "SbbOpenedClosedState"
88141
88130
  },
88142
- "privacy": "protected",
88131
+ "privacy": "private",
88132
+ "inheritedFrom": {
88133
+ "name": "SbbOpenCloseBaseElement",
88134
+ "module": "core/base-elements/open-close-base-element.js"
88135
+ }
88136
+ },
88137
+ {
88138
+ "kind": "field",
88139
+ "name": "isOpen",
88140
+ "type": {
88141
+ "text": "boolean"
88142
+ },
88143
+ "privacy": "public",
88144
+ "description": "Whether the element is open.",
88143
88145
  "readonly": true,
88144
88146
  "inheritedFrom": {
88145
- "name": "SbbActionBaseElement",
88146
- "module": "core/base-elements/action-base-element.js"
88147
+ "name": "SbbOpenCloseBaseElement",
88148
+ "module": "core/base-elements/open-close-base-element.js"
88147
88149
  }
88148
88150
  },
88149
88151
  {
88150
88152
  "kind": "method",
88151
- "name": "setupBaseEventHandlers",
88153
+ "name": "dispatchBeforeOpenEvent",
88152
88154
  "privacy": "protected",
88153
88155
  "return": {
88154
88156
  "type": {
88155
- "text": "void"
88157
+ "text": "boolean"
88156
88158
  }
88157
88159
  },
88158
88160
  "inheritedFrom": {
88159
- "name": "SbbActionBaseElement",
88160
- "module": "core/base-elements/action-base-element.js"
88161
+ "name": "SbbOpenCloseBaseElement",
88162
+ "module": "core/base-elements/open-close-base-element.js"
88161
88163
  }
88162
- }
88163
- ],
88164
- "mixins": [
88165
- {
88166
- "name": "SbbDisabledTabIndexActionMixin",
88167
- "module": "core/mixins.js"
88168
88164
  },
88169
88165
  {
88170
- "name": "SbbMenuActionCommonElementMixin",
88171
- "module": "menu/common.js"
88172
- }
88173
- ],
88174
- "superclass": {
88175
- "name": "SbbButtonBaseElement",
88176
- "module": "core/base-elements.js"
88177
- },
88178
- "tagName": "sbb-menu-button",
88179
- "customElement": true,
88180
- "attributes": [
88181
- {
88182
- "name": "disabled-interactive",
88183
- "type": {
88184
- "text": "boolean"
88166
+ "kind": "method",
88167
+ "name": "dispatchOpenEvent",
88168
+ "privacy": "protected",
88169
+ "return": {
88170
+ "type": {
88171
+ "text": "boolean"
88172
+ }
88185
88173
  },
88186
- "default": "false",
88187
- "description": "Whether the button should be aria-disabled but stay interactive.",
88188
- "fieldName": "disabledInteractive",
88189
88174
  "inheritedFrom": {
88190
- "name": "SbbDisabledInteractiveMixin",
88191
- "module": "core/mixins/disabled-mixin.js"
88175
+ "name": "SbbOpenCloseBaseElement",
88176
+ "module": "core/base-elements/open-close-base-element.js"
88192
88177
  }
88193
88178
  },
88194
88179
  {
88195
- "name": "disabled",
88196
- "description": "Whether the component is disabled.",
88197
- "default": "false",
88198
- "type": {
88199
- "text": "boolean"
88180
+ "kind": "method",
88181
+ "name": "dispatchBeforeCloseEvent",
88182
+ "privacy": "protected",
88183
+ "return": {
88184
+ "type": {
88185
+ "text": "boolean"
88186
+ }
88200
88187
  },
88201
- "fieldName": "disabled",
88202
88188
  "inheritedFrom": {
88203
- "name": "SbbDisabledMixin",
88204
- "module": "core/mixins/disabled-mixin.js"
88189
+ "name": "SbbOpenCloseBaseElement",
88190
+ "module": "core/base-elements/open-close-base-element.js"
88205
88191
  }
88206
88192
  },
88207
88193
  {
88208
- "name": "icon-name",
88209
- "type": {
88210
- "text": "string"
88194
+ "kind": "method",
88195
+ "name": "dispatchCloseEvent",
88196
+ "privacy": "protected",
88197
+ "return": {
88198
+ "type": {
88199
+ "text": "boolean"
88200
+ }
88211
88201
  },
88212
- "default": "''",
88213
- "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.",
88214
- "fieldName": "iconName",
88215
88202
  "inheritedFrom": {
88216
- "name": "SbbIconNameMixin",
88217
- "module": "icon/icon-name-mixin.js"
88203
+ "name": "SbbOpenCloseBaseElement",
88204
+ "module": "core/base-elements/open-close-base-element.js"
88218
88205
  }
88219
- },
88206
+ }
88207
+ ],
88208
+ "attributes": [
88220
88209
  {
88221
- "name": "value",
88210
+ "name": "trigger",
88222
88211
  "type": {
88223
- "text": "string"
88212
+ "text": "HTMLElement | null"
88224
88213
  },
88225
- "default": "''",
88226
- "description": "Value of the form element.",
88227
- "fieldName": "value",
88214
+ "default": "null",
88215
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
88216
+ "fieldName": "trigger"
88217
+ }
88218
+ ],
88219
+ "superclass": {
88220
+ "name": "SbbOpenCloseBaseElement",
88221
+ "module": "core/base-elements.js"
88222
+ },
88223
+ "tagName": "sbb-menu",
88224
+ "customElement": true,
88225
+ "events": [
88226
+ {
88227
+ "name": "beforeopen",
88228
+ "type": {
88229
+ "text": "Event"
88230
+ },
88231
+ "description": "Emits whenever the component starts the opening transition. Can be canceled.",
88228
88232
  "inheritedFrom": {
88229
- "name": "SbbButtonBaseElement",
88230
- "module": "core/base-elements/button-base-element.js"
88233
+ "name": "SbbOpenCloseBaseElement",
88234
+ "module": "core/base-elements/open-close-base-element.js"
88231
88235
  }
88232
88236
  },
88233
88237
  {
88234
- "name": "type",
88235
- "description": "The type attribute to use for the button.",
88236
- "default": "'button'",
88238
+ "name": "open",
88237
88239
  "type": {
88238
- "text": "SbbButtonType"
88240
+ "text": "Event"
88239
88241
  },
88240
- "fieldName": "type",
88242
+ "description": "Emits whenever the component is opened.",
88241
88243
  "inheritedFrom": {
88242
- "name": "SbbButtonBaseElement",
88243
- "module": "core/base-elements/button-base-element.js"
88244
+ "name": "SbbOpenCloseBaseElement",
88245
+ "module": "core/base-elements/open-close-base-element.js"
88244
88246
  }
88245
88247
  },
88246
88248
  {
88247
- "name": "form",
88248
- "description": "The `<form>` element to associate the button with.",
88249
+ "name": "beforeclose",
88249
88250
  "type": {
88250
- "text": "HTMLFormElement | null"
88251
+ "text": "Event"
88251
88252
  },
88252
- "fieldName": "form",
88253
+ "description": "Emits whenever the component begins the closing transition. Can be canceled.",
88253
88254
  "inheritedFrom": {
88254
- "name": "SbbButtonBaseElement",
88255
- "module": "core/base-elements/button-base-element.js"
88255
+ "name": "SbbOpenCloseBaseElement",
88256
+ "module": "core/base-elements/open-close-base-element.js"
88256
88257
  }
88257
88258
  },
88258
88259
  {
88259
- "name": "name",
88260
- "description": "Name of the form element. Will be read from name attribute.",
88260
+ "name": "close",
88261
88261
  "type": {
88262
- "text": "string"
88262
+ "text": "Event"
88263
88263
  },
88264
- "fieldName": "name",
88264
+ "description": "Emits whenever the component is closed.",
88265
88265
  "inheritedFrom": {
88266
- "name": "SbbFormAssociatedMixin",
88267
- "module": "core/mixins/form-associated-mixin.js"
88266
+ "name": "SbbOpenCloseBaseElement",
88267
+ "module": "core/base-elements/open-close-base-element.js"
88268
88268
  }
88269
88269
  }
88270
88270
  ]
@@ -88273,18 +88273,18 @@
88273
88273
  "exports": [
88274
88274
  {
88275
88275
  "kind": "js",
88276
- "name": "SbbMenuButtonElement",
88276
+ "name": "SbbMenuElement",
88277
88277
  "declaration": {
88278
- "name": "SbbMenuButtonElement",
88279
- "module": "menu/menu-button/menu-button.component.js"
88278
+ "name": "SbbMenuElement",
88279
+ "module": "menu/menu/menu.component.js"
88280
88280
  }
88281
88281
  },
88282
88282
  {
88283
88283
  "kind": "custom-element-definition",
88284
- "name": "sbb-menu-button",
88284
+ "name": "sbb-menu",
88285
88285
  "declaration": {
88286
- "name": "SbbMenuButtonElement",
88287
- "module": "menu/menu-button/menu-button.component.js"
88286
+ "name": "SbbMenuElement",
88287
+ "module": "menu/menu/menu.component.js"
88288
88288
  }
88289
88289
  }
88290
88290
  ]