@sbb-esta/lyne-elements-dev 4.7.0-dev.1772832064 → 4.7.0-dev.1772873580

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 +922 -922
  2. package/package.json +2 -2
@@ -101779,309 +101779,262 @@
101779
101779
  },
101780
101780
  {
101781
101781
  "kind": "javascript-module",
101782
- "path": "sidebar/sidebar-close-button/sidebar-close-button.component.js",
101782
+ "path": "sidebar/sidebar/sidebar.component.js",
101783
101783
  "declarations": [
101784
101784
  {
101785
101785
  "kind": "class",
101786
- "description": "Sidebar close button, intended to be placed inside sbb-sidebar.",
101787
- "name": "SbbSidebarCloseButtonElement",
101786
+ "description": "This component corresponds to a sidebar that can be opened on the sidebar container.",
101787
+ "name": "SbbSidebarElement",
101788
101788
  "slots": [
101789
101789
  {
101790
- "description": "Use the unnamed slot to add content to the sidebar-close-button. Not intended to be used in this context.",
101791
- "name": "",
101792
- "inheritedFrom": {
101793
- "name": "SbbSecondaryButtonElement",
101794
- "module": "button/secondary-button/secondary-button.component.js"
101795
- }
101790
+ "description": "Use the unnamed slot to slot any content into the sidebar.",
101791
+ "name": ""
101796
101792
  },
101797
101793
  {
101798
- "description": "Slot used to display the icon, if one is set. Not intended to be used in this context.",
101799
- "name": "icon",
101800
- "inheritedFrom": {
101801
- "name": "SbbSecondaryButtonElement",
101802
- "module": "button/secondary-button/secondary-button.component.js"
101803
- }
101794
+ "description": "Use the title slot to add an <sbb-title>.",
101795
+ "name": "title"
101804
101796
  }
101805
101797
  ],
101806
101798
  "members": [
101807
101799
  {
101808
101800
  "kind": "field",
101809
- "name": "_languageController",
101810
- "privacy": "private",
101811
- "default": "new SbbLanguageController(this)"
101812
- },
101813
- {
101814
- "kind": "method",
101815
- "name": "renderTemplate",
101816
- "privacy": "protected",
101817
- "return": {
101818
- "type": {
101819
- "text": "TemplateResult"
101820
- }
101801
+ "name": "color",
101802
+ "type": {
101803
+ "text": "'white' | 'milk'"
101821
101804
  },
101822
- "description": "Override this method to render the component template.",
101823
- "inheritedFrom": {
101824
- "name": "SbbActionBaseElement",
101825
- "module": "core/base-elements/action-base-element.js"
101826
- }
101805
+ "privacy": "public",
101806
+ "default": "'white'",
101807
+ "description": "Background color of the sidebar. Either `white` or `milk`.",
101808
+ "attribute": "color",
101809
+ "reflects": true
101827
101810
  },
101828
101811
  {
101829
- "kind": "method",
101830
- "name": "renderIconName",
101831
- "privacy": "protected",
101832
- "return": {
101833
- "type": {
101834
- "text": "string"
101835
- }
101812
+ "kind": "field",
101813
+ "name": "mode",
101814
+ "type": {
101815
+ "text": "'side' | 'over'"
101836
101816
  },
101837
- "inheritedFrom": {
101838
- "name": "SbbIconNameMixin",
101839
- "module": "icon/icon-name-mixin.js"
101840
- }
101817
+ "privacy": "public",
101818
+ "default": "'side'",
101819
+ "description": "Mode of the sidebar; one of 'side' or 'over'.",
101820
+ "attribute": "mode",
101821
+ "reflects": true
101841
101822
  },
101842
101823
  {
101843
101824
  "kind": "field",
101844
- "name": "size",
101825
+ "name": "position",
101845
101826
  "type": {
101846
- "text": "SbbButtonSize"
101827
+ "text": "'start' | 'end'"
101847
101828
  },
101848
101829
  "privacy": "public",
101849
- "description": "Size variant, either l, m or s.",
101850
- "default": "'s'",
101851
- "attribute": "size",
101852
- "reflects": true,
101853
- "inheritedFrom": {
101854
- "name": "SbbButtonCommonElementMixin",
101855
- "module": "button/common/button-common.js"
101856
- }
101830
+ "default": "'start'",
101831
+ "description": "The side that the sidebar is attached to.",
101832
+ "attribute": "position",
101833
+ "reflects": true
101857
101834
  },
101858
101835
  {
101859
101836
  "kind": "field",
101860
- "name": "loading",
101837
+ "name": "opened",
101861
101838
  "type": {
101862
101839
  "text": "boolean"
101863
101840
  },
101864
101841
  "privacy": "public",
101865
101842
  "default": "false",
101866
- "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
101867
- "attribute": "loading",
101868
- "reflects": true,
101869
- "inheritedFrom": {
101870
- "name": "SbbButtonCommonElementMixin",
101871
- "module": "button/common/button-common.js"
101872
- }
101843
+ "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
101844
+ "attribute": "opened",
101845
+ "reflects": true
101873
101846
  },
101874
101847
  {
101875
101848
  "kind": "field",
101876
- "name": "negative",
101849
+ "name": "focusOnOpen",
101877
101850
  "type": {
101878
101851
  "text": "boolean"
101879
101852
  },
101880
101853
  "privacy": "public",
101881
101854
  "default": "false",
101882
- "description": "Negative coloring variant flag.",
101883
- "attribute": "negative",
101884
- "reflects": true,
101885
- "inheritedFrom": {
101886
- "name": "SbbNegativeMixin",
101887
- "module": "core/mixins/negative-mixin.js"
101888
- }
101855
+ "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
101856
+ "attribute": "focus-on-open"
101889
101857
  },
101890
101858
  {
101891
101859
  "kind": "field",
101892
- "name": "iconName",
101860
+ "name": "container",
101893
101861
  "type": {
101894
- "text": "string"
101862
+ "text": "SbbSidebarContainerElement | null"
101895
101863
  },
101896
101864
  "privacy": "public",
101897
- "default": "''",
101898
- "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.",
101899
- "attribute": "icon-name",
101900
- "inheritedFrom": {
101901
- "name": "SbbIconNameMixin",
101902
- "module": "icon/icon-name-mixin.js"
101903
- }
101865
+ "description": "Returns the SbbSidebarContainerElement where this sidebar is contained.",
101866
+ "readonly": true,
101867
+ "default": "null"
101868
+ },
101869
+ {
101870
+ "kind": "field",
101871
+ "name": "_container",
101872
+ "type": {
101873
+ "text": "SbbSidebarContainerElement | null"
101874
+ },
101875
+ "privacy": "private",
101876
+ "default": "null"
101877
+ },
101878
+ {
101879
+ "kind": "field",
101880
+ "name": "_lastFocusedElement",
101881
+ "type": {
101882
+ "text": "HTMLElement | null"
101883
+ },
101884
+ "privacy": "private",
101885
+ "default": "null"
101886
+ },
101887
+ {
101888
+ "kind": "field",
101889
+ "name": "_focusTrapController",
101890
+ "privacy": "private",
101891
+ "default": "new SbbFocusTrapController(this)"
101892
+ },
101893
+ {
101894
+ "kind": "field",
101895
+ "name": "_escapableOverlayController",
101896
+ "privacy": "private",
101897
+ "default": "new SbbEscapableOverlayController(this)"
101904
101898
  },
101905
101899
  {
101906
101900
  "kind": "method",
101907
- "name": "renderIconSlot",
101908
- "privacy": "protected",
101901
+ "name": "toggle",
101902
+ "privacy": "public",
101909
101903
  "return": {
101910
101904
  "type": {
101911
- "text": "TemplateResult"
101905
+ "text": "void"
101912
101906
  }
101913
101907
  },
101914
- "parameters": [
101915
- {
101916
- "name": "classname",
101917
- "optional": true,
101918
- "type": {
101919
- "text": "string"
101920
- }
101908
+ "description": "Toggles the sidebar visibility."
101909
+ },
101910
+ {
101911
+ "kind": "method",
101912
+ "name": "open",
101913
+ "privacy": "public",
101914
+ "return": {
101915
+ "type": {
101916
+ "text": "void"
101921
101917
  }
101922
- ],
101918
+ },
101919
+ "description": "Opens the sidebar.",
101923
101920
  "inheritedFrom": {
101924
- "name": "SbbIconNameMixin",
101925
- "module": "icon/icon-name-mixin.js"
101921
+ "name": "SbbOpenCloseBaseElement",
101922
+ "module": "core/base-elements/open-close-base-element.js"
101926
101923
  }
101927
101924
  },
101928
101925
  {
101929
101926
  "kind": "method",
101930
- "name": "_renderIconName",
101927
+ "name": "_isZeroAnimationDuration",
101931
101928
  "privacy": "private",
101932
101929
  "return": {
101933
101930
  "type": {
101934
- "text": "string"
101931
+ "text": "boolean"
101935
101932
  }
101936
- },
101937
- "inheritedFrom": {
101938
- "name": "SbbIconNameMixin",
101939
- "module": "icon/icon-name-mixin.js"
101940
101933
  }
101941
101934
  },
101942
101935
  {
101943
- "kind": "field",
101944
- "name": "disabledInteractive",
101945
- "type": {
101946
- "text": "boolean"
101947
- },
101948
- "privacy": "public",
101949
- "default": "false",
101950
- "description": "Whether the button should be aria-disabled but stay interactive.",
101951
- "attribute": "disabled-interactive",
101952
- "reflects": true,
101953
- "inheritedFrom": {
101954
- "name": "SbbDisabledInteractiveMixin",
101955
- "module": "core/mixins/disabled-mixin.js"
101936
+ "kind": "method",
101937
+ "name": "_handleOpening",
101938
+ "privacy": "private",
101939
+ "return": {
101940
+ "type": {
101941
+ "text": "void"
101942
+ }
101956
101943
  }
101957
101944
  },
101958
101945
  {
101959
- "kind": "field",
101960
- "name": "disabled",
101946
+ "kind": "method",
101947
+ "name": "close",
101961
101948
  "privacy": "public",
101962
- "description": "Whether the component is disabled.",
101963
- "default": "false",
101964
- "type": {
101965
- "text": "boolean"
101949
+ "return": {
101950
+ "type": {
101951
+ "text": "void"
101952
+ }
101966
101953
  },
101967
- "attribute": "disabled",
101968
- "reflects": true,
101954
+ "description": "Closes the sidebar.",
101969
101955
  "inheritedFrom": {
101970
- "name": "SbbDisabledMixin",
101971
- "module": "core/mixins/disabled-mixin.js"
101956
+ "name": "SbbOpenCloseBaseElement",
101957
+ "module": "core/base-elements/open-close-base-element.js"
101972
101958
  }
101973
101959
  },
101974
101960
  {
101975
- "kind": "field",
101976
- "name": "#disabled",
101961
+ "kind": "method",
101962
+ "name": "_handleClosing",
101977
101963
  "privacy": "private",
101978
- "type": {
101979
- "text": "boolean"
101980
- },
101981
- "default": "false",
101982
- "inheritedFrom": {
101983
- "name": "SbbDisabledMixin",
101984
- "module": "core/mixins/disabled-mixin.js"
101964
+ "return": {
101965
+ "type": {
101966
+ "text": "void"
101967
+ }
101985
101968
  }
101986
101969
  },
101987
101970
  {
101988
101971
  "kind": "method",
101989
- "name": "isDisabledExternally",
101990
- "privacy": "protected",
101972
+ "name": "_takeFocus",
101973
+ "privacy": "private",
101991
101974
  "return": {
101992
101975
  "type": {
101993
- "text": "boolean"
101976
+ "text": "void"
101994
101977
  }
101995
- },
101996
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
101997
- "inheritedFrom": {
101998
- "name": "SbbDisabledMixin",
101999
- "module": "core/mixins/disabled-mixin.js"
102000
101978
  }
102001
101979
  },
102002
101980
  {
102003
- "kind": "field",
102004
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
102005
- "type": {
102006
- "text": "array"
102007
- },
102008
- "privacy": "private",
102009
- "readonly": true,
102010
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
102011
- "inheritedFrom": {
102012
- "name": "SbbButtonBaseElement",
102013
- "module": "core/base-elements/button-base-element.js"
102014
- }
102015
- },
102016
- {
102017
- "kind": "field",
102018
- "name": "value",
102019
- "type": {
102020
- "text": "string"
102021
- },
102022
- "privacy": "public",
102023
- "inheritedFrom": {
102024
- "name": "SbbButtonBaseElement",
102025
- "module": "core/base-elements/button-base-element.js"
102026
- },
102027
- "default": "''",
102028
- "description": "Value of the form element.",
102029
- "attribute": "value"
102030
- },
102031
- {
102032
- "kind": "field",
102033
- "name": "type",
102034
- "privacy": "public",
102035
- "description": "The type attribute to use for the button.",
102036
- "default": "'button'",
102037
- "type": {
102038
- "text": "SbbButtonType"
102039
- },
102040
- "attribute": "type",
102041
- "inheritedFrom": {
102042
- "name": "SbbButtonBaseElement",
102043
- "module": "core/base-elements/button-base-element.js"
101981
+ "kind": "method",
101982
+ "name": "cedeFocus",
101983
+ "privacy": "protected",
101984
+ "return": {
101985
+ "type": {
101986
+ "text": "void"
101987
+ }
102044
101988
  }
102045
101989
  },
102046
101990
  {
102047
- "kind": "field",
102048
- "name": "form",
102049
- "type": {
102050
- "text": "HTMLFormElement | null"
102051
- },
102052
- "privacy": "public",
102053
- "description": "The `<form>` element to associate the button with.",
102054
- "inheritedFrom": {
102055
- "name": "SbbButtonBaseElement",
102056
- "module": "core/base-elements/button-base-element.js"
101991
+ "kind": "method",
101992
+ "name": "_updateSidebarWidth",
101993
+ "privacy": "private",
101994
+ "return": {
101995
+ "type": {
101996
+ "text": "void"
101997
+ }
102057
101998
  },
102058
- "attribute": "form"
101999
+ "parameters": [
102000
+ {
102001
+ "name": "oldPosition",
102002
+ "optional": true,
102003
+ "type": {
102004
+ "text": "this['position']"
102005
+ }
102006
+ }
102007
+ ]
102059
102008
  },
102060
102009
  {
102061
- "kind": "field",
102062
- "name": "_formId",
102063
- "type": {
102064
- "text": "string"
102065
- },
102010
+ "kind": "method",
102011
+ "name": "_buildCssWidthVar",
102066
102012
  "privacy": "private",
102067
- "default": "''",
102068
- "inheritedFrom": {
102069
- "name": "SbbButtonBaseElement",
102070
- "module": "core/base-elements/button-base-element.js"
102071
- }
102013
+ "return": {
102014
+ "type": {
102015
+ "text": "string"
102016
+ }
102017
+ },
102018
+ "parameters": [
102019
+ {
102020
+ "name": "position",
102021
+ "default": "this.position"
102022
+ }
102023
+ ]
102072
102024
  },
102073
102025
  {
102074
- "kind": "field",
102075
- "name": "_handleButtonClick",
102026
+ "kind": "method",
102027
+ "name": "_isModeOver",
102076
102028
  "privacy": "private",
102077
- "inheritedFrom": {
102078
- "name": "SbbButtonBaseElement",
102079
- "module": "core/base-elements/button-base-element.js"
102029
+ "return": {
102030
+ "type": {
102031
+ "text": "boolean"
102032
+ }
102080
102033
  }
102081
102034
  },
102082
102035
  {
102083
102036
  "kind": "method",
102084
- "name": "_requestSubmit",
102037
+ "name": "_onTransitionEnd",
102085
102038
  "privacy": "private",
102086
102039
  "return": {
102087
102040
  "type": {
@@ -102090,154 +102043,110 @@
102090
102043
  },
102091
102044
  "parameters": [
102092
102045
  {
102093
- "name": "form",
102046
+ "name": "event",
102094
102047
  "type": {
102095
- "text": "HTMLFormElement"
102048
+ "text": "TransitionEvent"
102096
102049
  }
102097
102050
  }
102098
- ],
102099
- "inheritedFrom": {
102100
- "name": "SbbButtonBaseElement",
102101
- "module": "core/base-elements/button-base-element.js"
102102
- }
102051
+ ]
102103
102052
  },
102104
102053
  {
102105
- "kind": "field",
102106
- "name": "_formKeyDown",
102054
+ "kind": "method",
102055
+ "name": "_detectScrolledState",
102107
102056
  "privacy": "private",
102108
- "inheritedFrom": {
102109
- "name": "SbbButtonBaseElement",
102110
- "module": "core/base-elements/button-base-element.js"
102057
+ "return": {
102058
+ "type": {
102059
+ "text": "void"
102060
+ }
102111
102061
  }
102112
102062
  },
102113
102063
  {
102114
102064
  "kind": "field",
102115
- "name": "formAssociated",
102065
+ "name": "isAnimating",
102116
102066
  "type": {
102117
102067
  "text": "boolean"
102118
102068
  },
102119
102069
  "privacy": "public",
102120
- "static": true,
102121
- "default": "true",
102122
- "inheritedFrom": {
102123
- "name": "SbbFormAssociatedMixin",
102124
- "module": "core/mixins/form-associated-mixin.js"
102125
- }
102126
- },
102127
- {
102128
- "kind": "field",
102129
- "name": "name",
102130
- "privacy": "public",
102131
- "description": "Name of the form element. Will be read from name attribute.",
102132
- "type": {
102133
- "text": "string"
102134
- },
102135
- "attribute": "name",
102136
- "inheritedFrom": {
102137
- "name": "SbbFormAssociatedMixin",
102138
- "module": "core/mixins/form-associated-mixin.js"
102139
- }
102140
- },
102141
- {
102142
- "kind": "field",
102143
- "name": "validity",
102144
- "type": {
102145
- "text": "ValidityState"
102146
- },
102147
- "privacy": "public",
102148
- "description": "Returns the ValidityState object for this element.",
102149
- "readonly": true,
102070
+ "default": "false",
102071
+ "description": "Whether the component is currently animating.",
102150
102072
  "inheritedFrom": {
102151
- "name": "SbbFormAssociatedMixin",
102152
- "module": "core/mixins/form-associated-mixin.js"
102073
+ "name": "SbbAnimationCompleteMixin",
102074
+ "module": "core/mixins/animation-complete-mixin.js"
102153
102075
  }
102154
102076
  },
102155
102077
  {
102156
102078
  "kind": "field",
102157
- "name": "validationMessage",
102079
+ "name": "animationComplete",
102158
102080
  "type": {
102159
- "text": "string"
102081
+ "text": "Promise<void>"
102160
102082
  },
102161
102083
  "privacy": "public",
102162
- "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.",
102084
+ "description": "Returns a promise which completes whenever an animation ends.\nWhen a new animation starts, a new Promise is returned.",
102163
102085
  "readonly": true,
102164
102086
  "inheritedFrom": {
102165
- "name": "SbbFormAssociatedMixin",
102166
- "module": "core/mixins/form-associated-mixin.js"
102087
+ "name": "SbbAnimationCompleteMixin",
102088
+ "module": "core/mixins/animation-complete-mixin.js"
102167
102089
  }
102168
102090
  },
102169
102091
  {
102170
102092
  "kind": "field",
102171
- "name": "willValidate",
102093
+ "name": "_animationPromise",
102172
102094
  "type": {
102173
- "text": "boolean"
102095
+ "text": "Promise<void>"
102174
102096
  },
102175
- "privacy": "public",
102176
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
102177
- "readonly": true,
102178
- "inheritedFrom": {
102179
- "name": "SbbFormAssociatedMixin",
102180
- "module": "core/mixins/form-associated-mixin.js"
102181
- }
102182
- },
102183
- {
102184
- "kind": "field",
102185
- "name": "_validityStates",
102186
102097
  "privacy": "private",
102187
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
102188
102098
  "inheritedFrom": {
102189
- "name": "SbbFormAssociatedMixin",
102190
- "module": "core/mixins/form-associated-mixin.js"
102099
+ "name": "SbbAnimationCompleteMixin",
102100
+ "module": "core/mixins/animation-complete-mixin.js"
102191
102101
  }
102192
102102
  },
102193
102103
  {
102194
- "kind": "field",
102195
- "name": "formDisabled",
102196
- "type": {
102197
- "text": "boolean"
102198
- },
102104
+ "kind": "method",
102105
+ "name": "startAnimation",
102199
102106
  "privacy": "protected",
102200
- "default": "false",
102201
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
102107
+ "return": {
102108
+ "type": {
102109
+ "text": "void"
102110
+ }
102111
+ },
102202
102112
  "inheritedFrom": {
102203
- "name": "SbbFormAssociatedMixin",
102204
- "module": "core/mixins/form-associated-mixin.js"
102113
+ "name": "SbbAnimationCompleteMixin",
102114
+ "module": "core/mixins/animation-complete-mixin.js"
102205
102115
  }
102206
102116
  },
102207
102117
  {
102208
102118
  "kind": "method",
102209
- "name": "checkValidity",
102210
- "privacy": "public",
102119
+ "name": "stopAnimation",
102120
+ "privacy": "protected",
102211
102121
  "return": {
102212
102122
  "type": {
102213
- "text": "boolean"
102123
+ "text": "void"
102214
102124
  }
102215
102125
  },
102216
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
102126
+ "description": "Overriding stopAnimation() breaks functionality.",
102217
102127
  "inheritedFrom": {
102218
- "name": "SbbFormAssociatedMixin",
102219
- "module": "core/mixins/form-associated-mixin.js"
102128
+ "name": "SbbAnimationCompleteMixin",
102129
+ "module": "core/mixins/animation-complete-mixin.js"
102220
102130
  }
102221
102131
  },
102222
102132
  {
102223
102133
  "kind": "method",
102224
- "name": "reportValidity",
102225
- "privacy": "public",
102134
+ "name": "_enqueueAnimation",
102135
+ "privacy": "private",
102226
102136
  "return": {
102227
102137
  "type": {
102228
- "text": "boolean"
102138
+ "text": "Promise<void>"
102229
102139
  }
102230
102140
  },
102231
- "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.",
102232
102141
  "inheritedFrom": {
102233
- "name": "SbbFormAssociatedMixin",
102234
- "module": "core/mixins/form-associated-mixin.js"
102142
+ "name": "SbbAnimationCompleteMixin",
102143
+ "module": "core/mixins/animation-complete-mixin.js"
102235
102144
  }
102236
102145
  },
102237
102146
  {
102238
102147
  "kind": "method",
102239
- "name": "setCustomValidity",
102240
- "privacy": "public",
102148
+ "name": "toggleState",
102149
+ "privacy": "protected",
102241
102150
  "return": {
102242
102151
  "type": {
102243
102152
  "text": "void"
@@ -102245,287 +102154,320 @@
102245
102154
  },
102246
102155
  "parameters": [
102247
102156
  {
102248
- "name": "message",
102157
+ "name": "value",
102249
102158
  "type": {
102250
102159
  "text": "string"
102251
102160
  }
102161
+ },
102162
+ {
102163
+ "name": "force",
102164
+ "optional": true,
102165
+ "type": {
102166
+ "text": "boolean"
102167
+ }
102252
102168
  }
102253
102169
  ],
102254
- "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.",
102255
102170
  "inheritedFrom": {
102256
- "name": "SbbFormAssociatedMixin",
102257
- "module": "core/mixins/form-associated-mixin.js"
102171
+ "name": "SbbOpenCloseBaseElement",
102172
+ "module": "core/base-elements/open-close-base-element.js"
102258
102173
  }
102259
102174
  },
102260
102175
  {
102261
- "kind": "method",
102262
- "name": "_hasDisabledAncestor",
102263
- "privacy": "private",
102264
- "return": {
102265
- "type": {
102266
- "text": "boolean"
102267
- }
102176
+ "kind": "field",
102177
+ "name": "events",
102178
+ "privacy": "public",
102179
+ "static": true,
102180
+ "readonly": true,
102181
+ "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
102182
+ "type": {
102183
+ "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
102268
102184
  },
102269
102185
  "inheritedFrom": {
102270
- "name": "SbbFormAssociatedMixin",
102271
- "module": "core/mixins/form-associated-mixin.js"
102186
+ "name": "SbbOpenCloseBaseElement",
102187
+ "module": "core/base-elements/open-close-base-element.js"
102272
102188
  }
102273
102189
  },
102274
102190
  {
102275
- "kind": "method",
102276
- "name": "updateFormValue",
102191
+ "kind": "field",
102192
+ "name": "state",
102277
102193
  "privacy": "protected",
102278
- "return": {
102279
- "type": {
102280
- "text": "void"
102281
- }
102194
+ "description": "The state of the component.",
102195
+ "type": {
102196
+ "text": "SbbOpenedClosedState"
102282
102197
  },
102283
- "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",
102198
+ "default": "'closed'",
102284
102199
  "inheritedFrom": {
102285
- "name": "SbbFormAssociatedMixin",
102286
- "module": "core/mixins/form-associated-mixin.js"
102200
+ "name": "SbbOpenCloseBaseElement",
102201
+ "module": "core/base-elements/open-close-base-element.js"
102287
102202
  }
102288
102203
  },
102289
102204
  {
102290
- "kind": "method",
102291
- "name": "formState",
102292
- "privacy": "protected",
102293
- "return": {
102294
- "type": {
102295
- "text": "FormRestoreState"
102296
- }
102205
+ "kind": "field",
102206
+ "name": "_state",
102207
+ "type": {
102208
+ "text": "SbbOpenedClosedState"
102297
102209
  },
102210
+ "privacy": "private",
102298
102211
  "inheritedFrom": {
102299
- "name": "SbbFormAssociatedMixin",
102300
- "module": "core/mixins/form-associated-mixin.js"
102212
+ "name": "SbbOpenCloseBaseElement",
102213
+ "module": "core/base-elements/open-close-base-element.js"
102214
+ }
102215
+ },
102216
+ {
102217
+ "kind": "field",
102218
+ "name": "isOpen",
102219
+ "type": {
102220
+ "text": "boolean"
102221
+ },
102222
+ "privacy": "public",
102223
+ "description": "Whether the element is open.",
102224
+ "readonly": true,
102225
+ "inheritedFrom": {
102226
+ "name": "SbbOpenCloseBaseElement",
102227
+ "module": "core/base-elements/open-close-base-element.js"
102301
102228
  }
102302
102229
  },
102303
102230
  {
102304
102231
  "kind": "method",
102305
- "name": "setValidityFlag",
102306
- "privacy": "protected",
102232
+ "name": "escapeStrategy",
102233
+ "privacy": "public",
102307
102234
  "return": {
102308
102235
  "type": {
102309
102236
  "text": "void"
102310
102237
  }
102311
102238
  },
102312
- "parameters": [
102313
- {
102314
- "name": "flag",
102315
- "type": {
102316
- "text": "T"
102317
- }
102318
- },
102319
- {
102320
- "name": "message",
102321
- "type": {
102322
- "text": "string"
102323
- }
102324
- },
102325
- {
102326
- "name": "flagValue",
102327
- "optional": true,
102328
- "type": {
102329
- "text": "ValidityStateFlags[T]"
102330
- }
102331
- }
102332
- ],
102333
- "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).",
102239
+ "description": "The method which is called on escape key press. Defaults to calling close()",
102334
102240
  "inheritedFrom": {
102335
- "name": "SbbFormAssociatedMixin",
102336
- "module": "core/mixins/form-associated-mixin.js"
102241
+ "name": "SbbOpenCloseBaseElement",
102242
+ "module": "core/base-elements/open-close-base-element.js"
102337
102243
  }
102338
102244
  },
102339
102245
  {
102340
102246
  "kind": "method",
102341
- "name": "removeValidityFlag",
102247
+ "name": "dispatchBeforeOpenEvent",
102342
102248
  "privacy": "protected",
102343
102249
  "return": {
102344
102250
  "type": {
102345
- "text": "void"
102251
+ "text": "boolean"
102346
102252
  }
102347
102253
  },
102348
- "parameters": [
102349
- {
102350
- "name": "flag",
102351
- "type": {
102352
- "text": "T"
102353
- }
102354
- }
102355
- ],
102356
- "description": "Removes the validity state flag entry and updates validity state.",
102357
102254
  "inheritedFrom": {
102358
- "name": "SbbFormAssociatedMixin",
102359
- "module": "core/mixins/form-associated-mixin.js"
102255
+ "name": "SbbOpenCloseBaseElement",
102256
+ "module": "core/base-elements/open-close-base-element.js"
102360
102257
  }
102361
102258
  },
102362
102259
  {
102363
102260
  "kind": "method",
102364
- "name": "validate",
102261
+ "name": "dispatchOpenEvent",
102365
102262
  "privacy": "protected",
102366
102263
  "return": {
102367
102264
  "type": {
102368
- "text": "void"
102265
+ "text": "boolean"
102369
102266
  }
102370
102267
  },
102371
- "description": "To be called whenever the current element needs to be validated.",
102372
102268
  "inheritedFrom": {
102373
- "name": "SbbFormAssociatedMixin",
102374
- "module": "core/mixins/form-associated-mixin.js"
102269
+ "name": "SbbOpenCloseBaseElement",
102270
+ "module": "core/base-elements/open-close-base-element.js"
102375
102271
  }
102376
102272
  },
102377
102273
  {
102378
102274
  "kind": "method",
102379
- "name": "shouldValidate",
102275
+ "name": "dispatchBeforeCloseEvent",
102380
102276
  "privacy": "protected",
102381
102277
  "return": {
102382
102278
  "type": {
102383
102279
  "text": "boolean"
102384
102280
  }
102385
102281
  },
102386
- "parameters": [
102387
- {
102388
- "name": "name",
102389
- "type": {
102390
- "text": "PropertyKey | undefined"
102391
- }
102392
- }
102393
- ],
102394
- "description": "Whether validation should be run on a property change with the given name.",
102395
102282
  "inheritedFrom": {
102396
- "name": "SbbFormAssociatedMixin",
102397
- "module": "core/mixins/form-associated-mixin.js"
102283
+ "name": "SbbOpenCloseBaseElement",
102284
+ "module": "core/base-elements/open-close-base-element.js"
102398
102285
  }
102399
102286
  },
102400
102287
  {
102401
102288
  "kind": "method",
102402
- "name": "_setInternalValidity",
102403
- "privacy": "private",
102289
+ "name": "dispatchCloseEvent",
102290
+ "privacy": "protected",
102404
102291
  "return": {
102405
102292
  "type": {
102406
- "text": "void"
102293
+ "text": "boolean"
102407
102294
  }
102408
102295
  },
102409
102296
  "inheritedFrom": {
102410
- "name": "SbbFormAssociatedMixin",
102411
- "module": "core/mixins/form-associated-mixin.js"
102297
+ "name": "SbbOpenCloseBaseElement",
102298
+ "module": "core/base-elements/open-close-base-element.js"
102412
102299
  }
102300
+ }
102301
+ ],
102302
+ "attributes": [
102303
+ {
102304
+ "name": "color",
102305
+ "type": {
102306
+ "text": "'white' | 'milk'"
102307
+ },
102308
+ "default": "'white'",
102309
+ "description": "Background color of the sidebar. Either `white` or `milk`.",
102310
+ "fieldName": "color"
102413
102311
  },
102414
102312
  {
102415
- "kind": "field",
102416
- "name": "role",
102313
+ "name": "mode",
102417
102314
  "type": {
102418
- "text": "ElementInternals['role']"
102315
+ "text": "'side' | 'over'"
102419
102316
  },
102420
- "privacy": "public",
102421
- "static": true,
102422
- "readonly": true,
102423
- "default": "'button'",
102317
+ "default": "'side'",
102318
+ "description": "Mode of the sidebar; one of 'side' or 'over'.",
102319
+ "fieldName": "mode"
102320
+ },
102321
+ {
102322
+ "name": "position",
102323
+ "type": {
102324
+ "text": "'start' | 'end'"
102325
+ },
102326
+ "default": "'start'",
102327
+ "description": "The side that the sidebar is attached to.",
102328
+ "fieldName": "position"
102329
+ },
102330
+ {
102331
+ "name": "opened",
102332
+ "type": {
102333
+ "text": "boolean"
102334
+ },
102335
+ "default": "false",
102336
+ "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
102337
+ "fieldName": "opened"
102338
+ },
102339
+ {
102340
+ "name": "focus-on-open",
102341
+ "type": {
102342
+ "text": "boolean"
102343
+ },
102344
+ "default": "false",
102345
+ "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
102346
+ "fieldName": "focusOnOpen"
102347
+ }
102348
+ ],
102349
+ "mixins": [
102350
+ {
102351
+ "name": "SbbAnimationCompleteMixin",
102352
+ "module": "core/mixins.js"
102353
+ }
102354
+ ],
102355
+ "superclass": {
102356
+ "name": "SbbOpenCloseBaseElement",
102357
+ "module": "core/base-elements.js"
102358
+ },
102359
+ "tagName": "sbb-sidebar",
102360
+ "customElement": true,
102361
+ "events": [
102362
+ {
102363
+ "name": "beforeopen",
102364
+ "type": {
102365
+ "text": "Event"
102366
+ },
102367
+ "description": "Emits whenever the component starts the opening transition. Can be canceled.",
102424
102368
  "inheritedFrom": {
102425
- "name": "SbbButtonLikeBaseElement",
102426
- "module": "core/base-elements/button-base-element.js"
102369
+ "name": "SbbOpenCloseBaseElement",
102370
+ "module": "core/base-elements/open-close-base-element.js"
102427
102371
  }
102428
102372
  },
102429
102373
  {
102430
- "kind": "field",
102431
- "name": "_preventScrollOnSpaceKeydown",
102432
- "privacy": "private",
102433
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
102434
- "parameters": [
102435
- {
102436
- "description": "The origin event.",
102437
- "name": "event"
102438
- }
102439
- ],
102374
+ "name": "open",
102375
+ "type": {
102376
+ "text": "Event"
102377
+ },
102378
+ "description": "Emits whenever the component is opened.",
102440
102379
  "inheritedFrom": {
102441
- "name": "SbbButtonLikeBaseElement",
102442
- "module": "core/base-elements/button-base-element.js"
102380
+ "name": "SbbOpenCloseBaseElement",
102381
+ "module": "core/base-elements/open-close-base-element.js"
102443
102382
  }
102444
102383
  },
102445
102384
  {
102446
- "kind": "field",
102447
- "name": "_removeActiveMarker",
102448
- "privacy": "private",
102385
+ "name": "beforeclose",
102386
+ "type": {
102387
+ "text": "Event"
102388
+ },
102389
+ "description": "Emits whenever the component begins the closing transition. Can be canceled.",
102449
102390
  "inheritedFrom": {
102450
- "name": "SbbButtonLikeBaseElement",
102451
- "module": "core/base-elements/button-base-element.js"
102391
+ "name": "SbbOpenCloseBaseElement",
102392
+ "module": "core/base-elements/open-close-base-element.js"
102452
102393
  }
102453
102394
  },
102454
102395
  {
102455
- "kind": "field",
102456
- "name": "_dispatchClickEventOnSpaceKeyup",
102457
- "privacy": "private",
102458
- "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.",
102459
- "parameters": [
102460
- {
102461
- "description": "The origin event.",
102462
- "name": "event"
102463
- }
102464
- ],
102396
+ "name": "close",
102397
+ "type": {
102398
+ "text": "Event"
102399
+ },
102400
+ "description": "Emits whenever the component is closed.",
102465
102401
  "inheritedFrom": {
102466
- "name": "SbbButtonLikeBaseElement",
102467
- "module": "core/base-elements/button-base-element.js"
102402
+ "name": "SbbOpenCloseBaseElement",
102403
+ "module": "core/base-elements/open-close-base-element.js"
102468
102404
  }
102469
- },
102405
+ }
102406
+ ]
102407
+ }
102408
+ ],
102409
+ "exports": [
102410
+ {
102411
+ "kind": "js",
102412
+ "name": "SbbSidebarElement",
102413
+ "declaration": {
102414
+ "name": "SbbSidebarElement",
102415
+ "module": "sidebar/sidebar/sidebar.component.js"
102416
+ }
102417
+ },
102418
+ {
102419
+ "kind": "custom-element-definition",
102420
+ "name": "sbb-sidebar",
102421
+ "declaration": {
102422
+ "name": "SbbSidebarElement",
102423
+ "module": "sidebar/sidebar/sidebar.component.js"
102424
+ }
102425
+ }
102426
+ ]
102427
+ },
102428
+ {
102429
+ "kind": "javascript-module",
102430
+ "path": "sidebar/sidebar-close-button/sidebar-close-button.component.js",
102431
+ "declarations": [
102432
+ {
102433
+ "kind": "class",
102434
+ "description": "Sidebar close button, intended to be placed inside sbb-sidebar.",
102435
+ "name": "SbbSidebarCloseButtonElement",
102436
+ "slots": [
102470
102437
  {
102471
- "kind": "field",
102472
- "name": "_dispatchClickEvent",
102473
- "privacy": "private",
102438
+ "description": "Use the unnamed slot to add content to the sidebar-close-button. Not intended to be used in this context.",
102439
+ "name": "",
102474
102440
  "inheritedFrom": {
102475
- "name": "SbbButtonLikeBaseElement",
102476
- "module": "core/base-elements/button-base-element.js"
102441
+ "name": "SbbSecondaryButtonElement",
102442
+ "module": "button/secondary-button/secondary-button.component.js"
102477
102443
  }
102478
102444
  },
102479
102445
  {
102480
- "kind": "method",
102481
- "name": "toggleState",
102482
- "privacy": "protected",
102483
- "return": {
102484
- "type": {
102485
- "text": "void"
102486
- }
102487
- },
102488
- "parameters": [
102489
- {
102490
- "name": "value",
102491
- "type": {
102492
- "text": "string"
102493
- }
102494
- },
102495
- {
102496
- "name": "force",
102497
- "optional": true,
102498
- "type": {
102499
- "text": "boolean"
102500
- }
102501
- }
102502
- ],
102446
+ "description": "Slot used to display the icon, if one is set. Not intended to be used in this context.",
102447
+ "name": "icon",
102503
102448
  "inheritedFrom": {
102504
- "name": "SbbActionBaseElement",
102505
- "module": "core/base-elements/action-base-element.js"
102449
+ "name": "SbbSecondaryButtonElement",
102450
+ "module": "button/secondary-button/secondary-button.component.js"
102506
102451
  }
102507
- },
102452
+ }
102453
+ ],
102454
+ "members": [
102508
102455
  {
102509
102456
  "kind": "field",
102510
- "name": "maybeDisabled",
102511
- "type": {
102512
- "text": "boolean | undefined"
102513
- },
102514
- "privacy": "protected",
102515
- "readonly": true,
102516
- "inheritedFrom": {
102517
- "name": "SbbActionBaseElement",
102518
- "module": "core/base-elements/action-base-element.js"
102519
- }
102457
+ "name": "_languageController",
102458
+ "privacy": "private",
102459
+ "default": "new SbbLanguageController(this)"
102520
102460
  },
102521
102461
  {
102522
- "kind": "field",
102523
- "name": "maybeDisabledInteractive",
102524
- "type": {
102525
- "text": "boolean | undefined"
102526
- },
102462
+ "kind": "method",
102463
+ "name": "renderTemplate",
102527
102464
  "privacy": "protected",
102528
- "readonly": true,
102465
+ "return": {
102466
+ "type": {
102467
+ "text": "TemplateResult"
102468
+ }
102469
+ },
102470
+ "description": "Override this method to render the component template.",
102529
102471
  "inheritedFrom": {
102530
102472
  "name": "SbbActionBaseElement",
102531
102473
  "module": "core/base-elements/action-base-element.js"
@@ -102533,446 +102475,417 @@
102533
102475
  },
102534
102476
  {
102535
102477
  "kind": "method",
102536
- "name": "setupBaseEventHandlers",
102478
+ "name": "renderIconName",
102537
102479
  "privacy": "protected",
102538
102480
  "return": {
102539
102481
  "type": {
102540
- "text": "void"
102482
+ "text": "string"
102541
102483
  }
102542
102484
  },
102543
102485
  "inheritedFrom": {
102544
- "name": "SbbActionBaseElement",
102545
- "module": "core/base-elements/action-base-element.js"
102486
+ "name": "SbbIconNameMixin",
102487
+ "module": "icon/icon-name-mixin.js"
102546
102488
  }
102547
- }
102548
- ],
102549
- "superclass": {
102550
- "name": "SbbSecondaryButtonElement",
102551
- "module": "button/secondary-button.js"
102552
- },
102553
- "tagName": "sbb-sidebar-close-button",
102554
- "customElement": true,
102555
- "attributes": [
102489
+ },
102556
102490
  {
102491
+ "kind": "field",
102557
102492
  "name": "size",
102558
102493
  "type": {
102559
102494
  "text": "SbbButtonSize"
102560
102495
  },
102496
+ "privacy": "public",
102561
102497
  "description": "Size variant, either l, m or s.",
102562
- "default": "'l' / 's' (lean)",
102563
- "fieldName": "size",
102498
+ "default": "'s'",
102499
+ "attribute": "size",
102500
+ "reflects": true,
102564
102501
  "inheritedFrom": {
102565
102502
  "name": "SbbButtonCommonElementMixin",
102566
102503
  "module": "button/common/button-common.js"
102567
102504
  }
102568
102505
  },
102569
102506
  {
102507
+ "kind": "field",
102570
102508
  "name": "loading",
102571
102509
  "type": {
102572
102510
  "text": "boolean"
102573
102511
  },
102512
+ "privacy": "public",
102574
102513
  "default": "false",
102575
102514
  "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
102576
- "fieldName": "loading",
102515
+ "attribute": "loading",
102516
+ "reflects": true,
102577
102517
  "inheritedFrom": {
102578
102518
  "name": "SbbButtonCommonElementMixin",
102579
102519
  "module": "button/common/button-common.js"
102580
102520
  }
102581
102521
  },
102582
102522
  {
102523
+ "kind": "field",
102583
102524
  "name": "negative",
102584
102525
  "type": {
102585
102526
  "text": "boolean"
102586
102527
  },
102528
+ "privacy": "public",
102587
102529
  "default": "false",
102588
102530
  "description": "Negative coloring variant flag.",
102589
- "fieldName": "negative",
102531
+ "attribute": "negative",
102532
+ "reflects": true,
102590
102533
  "inheritedFrom": {
102591
102534
  "name": "SbbNegativeMixin",
102592
102535
  "module": "core/mixins/negative-mixin.js"
102593
102536
  }
102594
102537
  },
102595
102538
  {
102596
- "name": "icon-name",
102539
+ "kind": "field",
102540
+ "name": "iconName",
102597
102541
  "type": {
102598
102542
  "text": "string"
102599
102543
  },
102544
+ "privacy": "public",
102600
102545
  "default": "''",
102601
102546
  "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.",
102602
- "fieldName": "iconName",
102547
+ "attribute": "icon-name",
102603
102548
  "inheritedFrom": {
102604
102549
  "name": "SbbIconNameMixin",
102605
102550
  "module": "icon/icon-name-mixin.js"
102606
102551
  }
102607
102552
  },
102608
102553
  {
102609
- "name": "disabled-interactive",
102554
+ "kind": "method",
102555
+ "name": "renderIconSlot",
102556
+ "privacy": "protected",
102557
+ "return": {
102558
+ "type": {
102559
+ "text": "TemplateResult"
102560
+ }
102561
+ },
102562
+ "parameters": [
102563
+ {
102564
+ "name": "classname",
102565
+ "optional": true,
102566
+ "type": {
102567
+ "text": "string"
102568
+ }
102569
+ }
102570
+ ],
102571
+ "inheritedFrom": {
102572
+ "name": "SbbIconNameMixin",
102573
+ "module": "icon/icon-name-mixin.js"
102574
+ }
102575
+ },
102576
+ {
102577
+ "kind": "method",
102578
+ "name": "_renderIconName",
102579
+ "privacy": "private",
102580
+ "return": {
102581
+ "type": {
102582
+ "text": "string"
102583
+ }
102584
+ },
102585
+ "inheritedFrom": {
102586
+ "name": "SbbIconNameMixin",
102587
+ "module": "icon/icon-name-mixin.js"
102588
+ }
102589
+ },
102590
+ {
102591
+ "kind": "field",
102592
+ "name": "disabledInteractive",
102610
102593
  "type": {
102611
102594
  "text": "boolean"
102612
102595
  },
102596
+ "privacy": "public",
102613
102597
  "default": "false",
102614
102598
  "description": "Whether the button should be aria-disabled but stay interactive.",
102615
- "fieldName": "disabledInteractive",
102599
+ "attribute": "disabled-interactive",
102600
+ "reflects": true,
102616
102601
  "inheritedFrom": {
102617
102602
  "name": "SbbDisabledInteractiveMixin",
102618
102603
  "module": "core/mixins/disabled-mixin.js"
102619
102604
  }
102620
102605
  },
102621
102606
  {
102607
+ "kind": "field",
102622
102608
  "name": "disabled",
102609
+ "privacy": "public",
102623
102610
  "description": "Whether the component is disabled.",
102624
102611
  "default": "false",
102625
102612
  "type": {
102626
102613
  "text": "boolean"
102627
102614
  },
102628
- "fieldName": "disabled",
102615
+ "attribute": "disabled",
102616
+ "reflects": true,
102629
102617
  "inheritedFrom": {
102630
102618
  "name": "SbbDisabledMixin",
102631
102619
  "module": "core/mixins/disabled-mixin.js"
102632
102620
  }
102633
102621
  },
102634
102622
  {
102635
- "name": "value",
102623
+ "kind": "field",
102624
+ "name": "#disabled",
102625
+ "privacy": "private",
102636
102626
  "type": {
102637
- "text": "string"
102627
+ "text": "boolean"
102638
102628
  },
102639
- "default": "''",
102640
- "description": "Value of the form element.",
102641
- "fieldName": "value",
102629
+ "default": "false",
102642
102630
  "inheritedFrom": {
102643
- "name": "SbbButtonBaseElement",
102644
- "module": "core/base-elements/button-base-element.js"
102631
+ "name": "SbbDisabledMixin",
102632
+ "module": "core/mixins/disabled-mixin.js"
102645
102633
  }
102646
102634
  },
102647
102635
  {
102648
- "name": "type",
102649
- "description": "The type attribute to use for the button.",
102650
- "default": "'button'",
102651
- "type": {
102652
- "text": "SbbButtonType"
102636
+ "kind": "method",
102637
+ "name": "isDisabledExternally",
102638
+ "privacy": "protected",
102639
+ "return": {
102640
+ "type": {
102641
+ "text": "boolean"
102642
+ }
102653
102643
  },
102654
- "fieldName": "type",
102644
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
102655
102645
  "inheritedFrom": {
102656
- "name": "SbbButtonBaseElement",
102657
- "module": "core/base-elements/button-base-element.js"
102646
+ "name": "SbbDisabledMixin",
102647
+ "module": "core/mixins/disabled-mixin.js"
102658
102648
  }
102659
102649
  },
102660
102650
  {
102661
- "name": "form",
102662
- "description": "The `<form>` element to associate the button with.",
102651
+ "kind": "field",
102652
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
102663
102653
  "type": {
102664
- "text": "HTMLFormElement | null"
102654
+ "text": "array"
102665
102655
  },
102666
- "fieldName": "form",
102656
+ "privacy": "private",
102657
+ "readonly": true,
102658
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
102667
102659
  "inheritedFrom": {
102668
102660
  "name": "SbbButtonBaseElement",
102669
102661
  "module": "core/base-elements/button-base-element.js"
102670
102662
  }
102671
102663
  },
102672
102664
  {
102673
- "name": "name",
102674
- "description": "Name of the form element. Will be read from name attribute.",
102665
+ "kind": "field",
102666
+ "name": "value",
102675
102667
  "type": {
102676
102668
  "text": "string"
102677
102669
  },
102678
- "fieldName": "name",
102670
+ "privacy": "public",
102679
102671
  "inheritedFrom": {
102680
- "name": "SbbFormAssociatedMixin",
102681
- "module": "core/mixins/form-associated-mixin.js"
102682
- }
102683
- }
102684
- ],
102685
- "cssProperties": [
102686
- {
102687
- "description": "The delay before the loading animation starts, when setting the button into loading state.",
102688
- "name": "--sbb-button-loading-delay",
102689
- "default": "300ms",
102690
- "inheritedFrom": {
102691
- "name": "SbbSecondaryButtonElement",
102692
- "module": "button/secondary-button/secondary-button.component.js"
102693
- }
102694
- }
102695
- ]
102696
- }
102697
- ],
102698
- "exports": [
102699
- {
102700
- "kind": "js",
102701
- "name": "SbbSidebarCloseButtonElement",
102702
- "declaration": {
102703
- "name": "SbbSidebarCloseButtonElement",
102704
- "module": "sidebar/sidebar-close-button/sidebar-close-button.component.js"
102705
- }
102706
- },
102707
- {
102708
- "kind": "custom-element-definition",
102709
- "name": "sbb-sidebar-close-button",
102710
- "declaration": {
102711
- "name": "SbbSidebarCloseButtonElement",
102712
- "module": "sidebar/sidebar-close-button/sidebar-close-button.component.js"
102713
- }
102714
- }
102715
- ]
102716
- },
102717
- {
102718
- "kind": "javascript-module",
102719
- "path": "sidebar/sidebar/sidebar.component.js",
102720
- "declarations": [
102721
- {
102722
- "kind": "class",
102723
- "description": "This component corresponds to a sidebar that can be opened on the sidebar container.",
102724
- "name": "SbbSidebarElement",
102725
- "slots": [
102726
- {
102727
- "description": "Use the unnamed slot to slot any content into the sidebar.",
102728
- "name": ""
102729
- },
102730
- {
102731
- "description": "Use the title slot to add an <sbb-title>.",
102732
- "name": "title"
102733
- }
102734
- ],
102735
- "members": [
102736
- {
102737
- "kind": "field",
102738
- "name": "color",
102739
- "type": {
102740
- "text": "'white' | 'milk'"
102741
- },
102742
- "privacy": "public",
102743
- "default": "'white'",
102744
- "description": "Background color of the sidebar. Either `white` or `milk`.",
102745
- "attribute": "color",
102746
- "reflects": true
102747
- },
102748
- {
102749
- "kind": "field",
102750
- "name": "mode",
102751
- "type": {
102752
- "text": "'side' | 'over'"
102753
- },
102754
- "privacy": "public",
102755
- "default": "'side'",
102756
- "description": "Mode of the sidebar; one of 'side' or 'over'.",
102757
- "attribute": "mode",
102758
- "reflects": true
102759
- },
102760
- {
102761
- "kind": "field",
102762
- "name": "position",
102763
- "type": {
102764
- "text": "'start' | 'end'"
102672
+ "name": "SbbButtonBaseElement",
102673
+ "module": "core/base-elements/button-base-element.js"
102765
102674
  },
102766
- "privacy": "public",
102767
- "default": "'start'",
102768
- "description": "The side that the sidebar is attached to.",
102769
- "attribute": "position",
102770
- "reflects": true
102675
+ "default": "''",
102676
+ "description": "Value of the form element.",
102677
+ "attribute": "value"
102771
102678
  },
102772
102679
  {
102773
102680
  "kind": "field",
102774
- "name": "opened",
102775
- "type": {
102776
- "text": "boolean"
102777
- },
102681
+ "name": "type",
102778
102682
  "privacy": "public",
102779
- "default": "false",
102780
- "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
102781
- "attribute": "opened",
102782
- "reflects": true
102783
- },
102784
- {
102785
- "kind": "field",
102786
- "name": "focusOnOpen",
102683
+ "description": "The type attribute to use for the button.",
102684
+ "default": "'button'",
102787
102685
  "type": {
102788
- "text": "boolean"
102686
+ "text": "SbbButtonType"
102789
102687
  },
102790
- "privacy": "public",
102791
- "default": "false",
102792
- "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
102793
- "attribute": "focus-on-open"
102688
+ "attribute": "type",
102689
+ "inheritedFrom": {
102690
+ "name": "SbbButtonBaseElement",
102691
+ "module": "core/base-elements/button-base-element.js"
102692
+ }
102794
102693
  },
102795
102694
  {
102796
102695
  "kind": "field",
102797
- "name": "container",
102696
+ "name": "form",
102798
102697
  "type": {
102799
- "text": "SbbSidebarContainerElement | null"
102698
+ "text": "HTMLFormElement | null"
102800
102699
  },
102801
102700
  "privacy": "public",
102802
- "description": "Returns the SbbSidebarContainerElement where this sidebar is contained.",
102803
- "readonly": true,
102804
- "default": "null"
102805
- },
102806
- {
102807
- "kind": "field",
102808
- "name": "_container",
102809
- "type": {
102810
- "text": "SbbSidebarContainerElement | null"
102701
+ "description": "The `<form>` element to associate the button with.",
102702
+ "inheritedFrom": {
102703
+ "name": "SbbButtonBaseElement",
102704
+ "module": "core/base-elements/button-base-element.js"
102811
102705
  },
102812
- "privacy": "private",
102813
- "default": "null"
102706
+ "attribute": "form"
102814
102707
  },
102815
102708
  {
102816
102709
  "kind": "field",
102817
- "name": "_lastFocusedElement",
102710
+ "name": "_formId",
102818
102711
  "type": {
102819
- "text": "HTMLElement | null"
102712
+ "text": "string"
102820
102713
  },
102821
102714
  "privacy": "private",
102822
- "default": "null"
102823
- },
102824
- {
102825
- "kind": "field",
102826
- "name": "_focusTrapController",
102827
- "privacy": "private",
102828
- "default": "new SbbFocusTrapController(this)"
102715
+ "default": "''",
102716
+ "inheritedFrom": {
102717
+ "name": "SbbButtonBaseElement",
102718
+ "module": "core/base-elements/button-base-element.js"
102719
+ }
102829
102720
  },
102830
102721
  {
102831
102722
  "kind": "field",
102832
- "name": "_escapableOverlayController",
102723
+ "name": "_handleButtonClick",
102833
102724
  "privacy": "private",
102834
- "default": "new SbbEscapableOverlayController(this)"
102725
+ "inheritedFrom": {
102726
+ "name": "SbbButtonBaseElement",
102727
+ "module": "core/base-elements/button-base-element.js"
102728
+ }
102835
102729
  },
102836
102730
  {
102837
102731
  "kind": "method",
102838
- "name": "toggle",
102839
- "privacy": "public",
102732
+ "name": "_requestSubmit",
102733
+ "privacy": "private",
102840
102734
  "return": {
102841
102735
  "type": {
102842
102736
  "text": "void"
102843
102737
  }
102844
102738
  },
102845
- "description": "Toggles the sidebar visibility."
102846
- },
102847
- {
102848
- "kind": "method",
102849
- "name": "open",
102850
- "privacy": "public",
102851
- "return": {
102852
- "type": {
102853
- "text": "void"
102739
+ "parameters": [
102740
+ {
102741
+ "name": "form",
102742
+ "type": {
102743
+ "text": "HTMLFormElement"
102744
+ }
102854
102745
  }
102855
- },
102856
- "description": "Opens the sidebar.",
102746
+ ],
102857
102747
  "inheritedFrom": {
102858
- "name": "SbbOpenCloseBaseElement",
102859
- "module": "core/base-elements/open-close-base-element.js"
102748
+ "name": "SbbButtonBaseElement",
102749
+ "module": "core/base-elements/button-base-element.js"
102860
102750
  }
102861
102751
  },
102862
102752
  {
102863
- "kind": "method",
102864
- "name": "_isZeroAnimationDuration",
102753
+ "kind": "field",
102754
+ "name": "_formKeyDown",
102865
102755
  "privacy": "private",
102866
- "return": {
102867
- "type": {
102868
- "text": "boolean"
102869
- }
102756
+ "inheritedFrom": {
102757
+ "name": "SbbButtonBaseElement",
102758
+ "module": "core/base-elements/button-base-element.js"
102870
102759
  }
102871
102760
  },
102872
102761
  {
102873
- "kind": "method",
102874
- "name": "_handleOpening",
102875
- "privacy": "private",
102876
- "return": {
102877
- "type": {
102878
- "text": "void"
102879
- }
102762
+ "kind": "field",
102763
+ "name": "formAssociated",
102764
+ "type": {
102765
+ "text": "boolean"
102766
+ },
102767
+ "privacy": "public",
102768
+ "static": true,
102769
+ "default": "true",
102770
+ "inheritedFrom": {
102771
+ "name": "SbbFormAssociatedMixin",
102772
+ "module": "core/mixins/form-associated-mixin.js"
102880
102773
  }
102881
102774
  },
102882
102775
  {
102883
- "kind": "method",
102884
- "name": "close",
102776
+ "kind": "field",
102777
+ "name": "name",
102885
102778
  "privacy": "public",
102886
- "return": {
102887
- "type": {
102888
- "text": "void"
102889
- }
102779
+ "description": "Name of the form element. Will be read from name attribute.",
102780
+ "type": {
102781
+ "text": "string"
102890
102782
  },
102891
- "description": "Closes the sidebar.",
102783
+ "attribute": "name",
102892
102784
  "inheritedFrom": {
102893
- "name": "SbbOpenCloseBaseElement",
102894
- "module": "core/base-elements/open-close-base-element.js"
102785
+ "name": "SbbFormAssociatedMixin",
102786
+ "module": "core/mixins/form-associated-mixin.js"
102895
102787
  }
102896
102788
  },
102897
102789
  {
102898
- "kind": "method",
102899
- "name": "_handleClosing",
102900
- "privacy": "private",
102901
- "return": {
102902
- "type": {
102903
- "text": "void"
102904
- }
102790
+ "kind": "field",
102791
+ "name": "validity",
102792
+ "type": {
102793
+ "text": "ValidityState"
102794
+ },
102795
+ "privacy": "public",
102796
+ "description": "Returns the ValidityState object for this element.",
102797
+ "readonly": true,
102798
+ "inheritedFrom": {
102799
+ "name": "SbbFormAssociatedMixin",
102800
+ "module": "core/mixins/form-associated-mixin.js"
102905
102801
  }
102906
102802
  },
102907
102803
  {
102908
- "kind": "method",
102909
- "name": "_takeFocus",
102910
- "privacy": "private",
102911
- "return": {
102912
- "type": {
102913
- "text": "void"
102914
- }
102804
+ "kind": "field",
102805
+ "name": "validationMessage",
102806
+ "type": {
102807
+ "text": "string"
102808
+ },
102809
+ "privacy": "public",
102810
+ "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.",
102811
+ "readonly": true,
102812
+ "inheritedFrom": {
102813
+ "name": "SbbFormAssociatedMixin",
102814
+ "module": "core/mixins/form-associated-mixin.js"
102915
102815
  }
102916
102816
  },
102917
102817
  {
102918
- "kind": "method",
102919
- "name": "cedeFocus",
102920
- "privacy": "protected",
102921
- "return": {
102922
- "type": {
102923
- "text": "void"
102924
- }
102818
+ "kind": "field",
102819
+ "name": "willValidate",
102820
+ "type": {
102821
+ "text": "boolean"
102822
+ },
102823
+ "privacy": "public",
102824
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
102825
+ "readonly": true,
102826
+ "inheritedFrom": {
102827
+ "name": "SbbFormAssociatedMixin",
102828
+ "module": "core/mixins/form-associated-mixin.js"
102925
102829
  }
102926
102830
  },
102927
102831
  {
102928
- "kind": "method",
102929
- "name": "_updateSidebarWidth",
102832
+ "kind": "field",
102833
+ "name": "_validityStates",
102930
102834
  "privacy": "private",
102931
- "return": {
102932
- "type": {
102933
- "text": "void"
102934
- }
102835
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
102836
+ "inheritedFrom": {
102837
+ "name": "SbbFormAssociatedMixin",
102838
+ "module": "core/mixins/form-associated-mixin.js"
102839
+ }
102840
+ },
102841
+ {
102842
+ "kind": "field",
102843
+ "name": "formDisabled",
102844
+ "type": {
102845
+ "text": "boolean"
102935
102846
  },
102936
- "parameters": [
102937
- {
102938
- "name": "oldPosition",
102939
- "optional": true,
102940
- "type": {
102941
- "text": "this['position']"
102942
- }
102943
- }
102944
- ]
102847
+ "privacy": "protected",
102848
+ "default": "false",
102849
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
102850
+ "inheritedFrom": {
102851
+ "name": "SbbFormAssociatedMixin",
102852
+ "module": "core/mixins/form-associated-mixin.js"
102853
+ }
102945
102854
  },
102946
102855
  {
102947
102856
  "kind": "method",
102948
- "name": "_buildCssWidthVar",
102949
- "privacy": "private",
102857
+ "name": "checkValidity",
102858
+ "privacy": "public",
102950
102859
  "return": {
102951
102860
  "type": {
102952
- "text": "string"
102861
+ "text": "boolean"
102953
102862
  }
102954
102863
  },
102955
- "parameters": [
102956
- {
102957
- "name": "position",
102958
- "default": "this.position"
102959
- }
102960
- ]
102864
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
102865
+ "inheritedFrom": {
102866
+ "name": "SbbFormAssociatedMixin",
102867
+ "module": "core/mixins/form-associated-mixin.js"
102868
+ }
102961
102869
  },
102962
102870
  {
102963
102871
  "kind": "method",
102964
- "name": "_isModeOver",
102965
- "privacy": "private",
102872
+ "name": "reportValidity",
102873
+ "privacy": "public",
102966
102874
  "return": {
102967
102875
  "type": {
102968
102876
  "text": "boolean"
102969
102877
  }
102878
+ },
102879
+ "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.",
102880
+ "inheritedFrom": {
102881
+ "name": "SbbFormAssociatedMixin",
102882
+ "module": "core/mixins/form-associated-mixin.js"
102970
102883
  }
102971
102884
  },
102972
102885
  {
102973
102886
  "kind": "method",
102974
- "name": "_onTransitionEnd",
102975
- "privacy": "private",
102887
+ "name": "setCustomValidity",
102888
+ "privacy": "public",
102976
102889
  "return": {
102977
102890
  "type": {
102978
102891
  "text": "void"
@@ -102980,364 +102893,451 @@
102980
102893
  },
102981
102894
  "parameters": [
102982
102895
  {
102983
- "name": "event",
102896
+ "name": "message",
102984
102897
  "type": {
102985
- "text": "TransitionEvent"
102898
+ "text": "string"
102986
102899
  }
102987
102900
  }
102988
- ]
102901
+ ],
102902
+ "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.",
102903
+ "inheritedFrom": {
102904
+ "name": "SbbFormAssociatedMixin",
102905
+ "module": "core/mixins/form-associated-mixin.js"
102906
+ }
102989
102907
  },
102990
102908
  {
102991
102909
  "kind": "method",
102992
- "name": "_detectScrolledState",
102910
+ "name": "_hasDisabledAncestor",
102993
102911
  "privacy": "private",
102994
102912
  "return": {
102995
102913
  "type": {
102996
- "text": "void"
102914
+ "text": "boolean"
102997
102915
  }
102998
- }
102999
- },
103000
- {
103001
- "kind": "field",
103002
- "name": "isAnimating",
103003
- "type": {
103004
- "text": "boolean"
103005
102916
  },
103006
- "privacy": "public",
103007
- "default": "false",
103008
- "description": "Whether the component is currently animating.",
103009
102917
  "inheritedFrom": {
103010
- "name": "SbbAnimationCompleteMixin",
103011
- "module": "core/mixins/animation-complete-mixin.js"
102918
+ "name": "SbbFormAssociatedMixin",
102919
+ "module": "core/mixins/form-associated-mixin.js"
103012
102920
  }
103013
102921
  },
103014
102922
  {
103015
- "kind": "field",
103016
- "name": "animationComplete",
103017
- "type": {
103018
- "text": "Promise<void>"
102923
+ "kind": "method",
102924
+ "name": "updateFormValue",
102925
+ "privacy": "protected",
102926
+ "return": {
102927
+ "type": {
102928
+ "text": "void"
102929
+ }
103019
102930
  },
103020
- "privacy": "public",
103021
- "description": "Returns a promise which completes whenever an animation ends.\nWhen a new animation starts, a new Promise is returned.",
103022
- "readonly": true,
102931
+ "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",
103023
102932
  "inheritedFrom": {
103024
- "name": "SbbAnimationCompleteMixin",
103025
- "module": "core/mixins/animation-complete-mixin.js"
102933
+ "name": "SbbFormAssociatedMixin",
102934
+ "module": "core/mixins/form-associated-mixin.js"
103026
102935
  }
103027
102936
  },
103028
102937
  {
103029
- "kind": "field",
103030
- "name": "_animationPromise",
103031
- "type": {
103032
- "text": "Promise<void>"
102938
+ "kind": "method",
102939
+ "name": "formState",
102940
+ "privacy": "protected",
102941
+ "return": {
102942
+ "type": {
102943
+ "text": "FormRestoreState"
102944
+ }
103033
102945
  },
103034
- "privacy": "private",
103035
102946
  "inheritedFrom": {
103036
- "name": "SbbAnimationCompleteMixin",
103037
- "module": "core/mixins/animation-complete-mixin.js"
102947
+ "name": "SbbFormAssociatedMixin",
102948
+ "module": "core/mixins/form-associated-mixin.js"
103038
102949
  }
103039
102950
  },
103040
102951
  {
103041
102952
  "kind": "method",
103042
- "name": "startAnimation",
102953
+ "name": "setValidityFlag",
103043
102954
  "privacy": "protected",
103044
102955
  "return": {
103045
102956
  "type": {
103046
102957
  "text": "void"
103047
102958
  }
103048
102959
  },
102960
+ "parameters": [
102961
+ {
102962
+ "name": "flag",
102963
+ "type": {
102964
+ "text": "T"
102965
+ }
102966
+ },
102967
+ {
102968
+ "name": "message",
102969
+ "type": {
102970
+ "text": "string"
102971
+ }
102972
+ },
102973
+ {
102974
+ "name": "flagValue",
102975
+ "optional": true,
102976
+ "type": {
102977
+ "text": "ValidityStateFlags[T]"
102978
+ }
102979
+ }
102980
+ ],
102981
+ "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).",
103049
102982
  "inheritedFrom": {
103050
- "name": "SbbAnimationCompleteMixin",
103051
- "module": "core/mixins/animation-complete-mixin.js"
102983
+ "name": "SbbFormAssociatedMixin",
102984
+ "module": "core/mixins/form-associated-mixin.js"
103052
102985
  }
103053
102986
  },
103054
102987
  {
103055
102988
  "kind": "method",
103056
- "name": "stopAnimation",
102989
+ "name": "removeValidityFlag",
103057
102990
  "privacy": "protected",
103058
102991
  "return": {
103059
102992
  "type": {
103060
102993
  "text": "void"
103061
102994
  }
103062
102995
  },
103063
- "description": "Overriding stopAnimation() breaks functionality.",
102996
+ "parameters": [
102997
+ {
102998
+ "name": "flag",
102999
+ "type": {
103000
+ "text": "T"
103001
+ }
103002
+ }
103003
+ ],
103004
+ "description": "Removes the validity state flag entry and updates validity state.",
103064
103005
  "inheritedFrom": {
103065
- "name": "SbbAnimationCompleteMixin",
103066
- "module": "core/mixins/animation-complete-mixin.js"
103006
+ "name": "SbbFormAssociatedMixin",
103007
+ "module": "core/mixins/form-associated-mixin.js"
103067
103008
  }
103068
103009
  },
103069
103010
  {
103070
103011
  "kind": "method",
103071
- "name": "_enqueueAnimation",
103072
- "privacy": "private",
103012
+ "name": "validate",
103013
+ "privacy": "protected",
103073
103014
  "return": {
103074
103015
  "type": {
103075
- "text": "Promise<void>"
103016
+ "text": "void"
103076
103017
  }
103077
103018
  },
103019
+ "description": "To be called whenever the current element needs to be validated.",
103078
103020
  "inheritedFrom": {
103079
- "name": "SbbAnimationCompleteMixin",
103080
- "module": "core/mixins/animation-complete-mixin.js"
103021
+ "name": "SbbFormAssociatedMixin",
103022
+ "module": "core/mixins/form-associated-mixin.js"
103081
103023
  }
103082
103024
  },
103083
103025
  {
103084
103026
  "kind": "method",
103085
- "name": "toggleState",
103027
+ "name": "shouldValidate",
103086
103028
  "privacy": "protected",
103087
103029
  "return": {
103088
103030
  "type": {
103089
- "text": "void"
103031
+ "text": "boolean"
103090
103032
  }
103091
103033
  },
103092
103034
  "parameters": [
103093
103035
  {
103094
- "name": "value",
103095
- "type": {
103096
- "text": "string"
103097
- }
103098
- },
103099
- {
103100
- "name": "force",
103101
- "optional": true,
103036
+ "name": "name",
103102
103037
  "type": {
103103
- "text": "boolean"
103038
+ "text": "PropertyKey | undefined"
103104
103039
  }
103105
103040
  }
103106
103041
  ],
103042
+ "description": "Whether validation should be run on a property change with the given name.",
103107
103043
  "inheritedFrom": {
103108
- "name": "SbbOpenCloseBaseElement",
103109
- "module": "core/base-elements/open-close-base-element.js"
103044
+ "name": "SbbFormAssociatedMixin",
103045
+ "module": "core/mixins/form-associated-mixin.js"
103046
+ }
103047
+ },
103048
+ {
103049
+ "kind": "method",
103050
+ "name": "_setInternalValidity",
103051
+ "privacy": "private",
103052
+ "return": {
103053
+ "type": {
103054
+ "text": "void"
103055
+ }
103056
+ },
103057
+ "inheritedFrom": {
103058
+ "name": "SbbFormAssociatedMixin",
103059
+ "module": "core/mixins/form-associated-mixin.js"
103110
103060
  }
103111
103061
  },
103112
103062
  {
103113
103063
  "kind": "field",
103114
- "name": "events",
103064
+ "name": "role",
103065
+ "type": {
103066
+ "text": "ElementInternals['role']"
103067
+ },
103115
103068
  "privacy": "public",
103116
103069
  "static": true,
103117
103070
  "readonly": true,
103118
- "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
103119
- "type": {
103120
- "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
103121
- },
103071
+ "default": "'button'",
103122
103072
  "inheritedFrom": {
103123
- "name": "SbbOpenCloseBaseElement",
103124
- "module": "core/base-elements/open-close-base-element.js"
103073
+ "name": "SbbButtonLikeBaseElement",
103074
+ "module": "core/base-elements/button-base-element.js"
103125
103075
  }
103126
103076
  },
103127
103077
  {
103128
103078
  "kind": "field",
103129
- "name": "state",
103130
- "privacy": "protected",
103131
- "description": "The state of the component.",
103132
- "type": {
103133
- "text": "SbbOpenedClosedState"
103134
- },
103135
- "default": "'closed'",
103079
+ "name": "_preventScrollOnSpaceKeydown",
103080
+ "privacy": "private",
103081
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
103082
+ "parameters": [
103083
+ {
103084
+ "description": "The origin event.",
103085
+ "name": "event"
103086
+ }
103087
+ ],
103136
103088
  "inheritedFrom": {
103137
- "name": "SbbOpenCloseBaseElement",
103138
- "module": "core/base-elements/open-close-base-element.js"
103089
+ "name": "SbbButtonLikeBaseElement",
103090
+ "module": "core/base-elements/button-base-element.js"
103139
103091
  }
103140
103092
  },
103141
103093
  {
103142
103094
  "kind": "field",
103143
- "name": "_state",
103144
- "type": {
103145
- "text": "SbbOpenedClosedState"
103146
- },
103095
+ "name": "_removeActiveMarker",
103147
103096
  "privacy": "private",
103148
103097
  "inheritedFrom": {
103149
- "name": "SbbOpenCloseBaseElement",
103150
- "module": "core/base-elements/open-close-base-element.js"
103098
+ "name": "SbbButtonLikeBaseElement",
103099
+ "module": "core/base-elements/button-base-element.js"
103151
103100
  }
103152
103101
  },
103153
103102
  {
103154
103103
  "kind": "field",
103155
- "name": "isOpen",
103156
- "type": {
103157
- "text": "boolean"
103158
- },
103159
- "privacy": "public",
103160
- "description": "Whether the element is open.",
103161
- "readonly": true,
103104
+ "name": "_dispatchClickEventOnSpaceKeyup",
103105
+ "privacy": "private",
103106
+ "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.",
103107
+ "parameters": [
103108
+ {
103109
+ "description": "The origin event.",
103110
+ "name": "event"
103111
+ }
103112
+ ],
103162
103113
  "inheritedFrom": {
103163
- "name": "SbbOpenCloseBaseElement",
103164
- "module": "core/base-elements/open-close-base-element.js"
103114
+ "name": "SbbButtonLikeBaseElement",
103115
+ "module": "core/base-elements/button-base-element.js"
103165
103116
  }
103166
103117
  },
103167
103118
  {
103168
- "kind": "method",
103169
- "name": "escapeStrategy",
103170
- "privacy": "public",
103171
- "return": {
103172
- "type": {
103173
- "text": "void"
103174
- }
103175
- },
103176
- "description": "The method which is called on escape key press. Defaults to calling close()",
103119
+ "kind": "field",
103120
+ "name": "_dispatchClickEvent",
103121
+ "privacy": "private",
103177
103122
  "inheritedFrom": {
103178
- "name": "SbbOpenCloseBaseElement",
103179
- "module": "core/base-elements/open-close-base-element.js"
103123
+ "name": "SbbButtonLikeBaseElement",
103124
+ "module": "core/base-elements/button-base-element.js"
103180
103125
  }
103181
103126
  },
103182
103127
  {
103183
103128
  "kind": "method",
103184
- "name": "dispatchBeforeOpenEvent",
103129
+ "name": "toggleState",
103185
103130
  "privacy": "protected",
103186
103131
  "return": {
103187
103132
  "type": {
103188
- "text": "boolean"
103133
+ "text": "void"
103189
103134
  }
103190
103135
  },
103136
+ "parameters": [
103137
+ {
103138
+ "name": "value",
103139
+ "type": {
103140
+ "text": "string"
103141
+ }
103142
+ },
103143
+ {
103144
+ "name": "force",
103145
+ "optional": true,
103146
+ "type": {
103147
+ "text": "boolean"
103148
+ }
103149
+ }
103150
+ ],
103191
103151
  "inheritedFrom": {
103192
- "name": "SbbOpenCloseBaseElement",
103193
- "module": "core/base-elements/open-close-base-element.js"
103152
+ "name": "SbbActionBaseElement",
103153
+ "module": "core/base-elements/action-base-element.js"
103194
103154
  }
103195
103155
  },
103196
103156
  {
103197
- "kind": "method",
103198
- "name": "dispatchOpenEvent",
103199
- "privacy": "protected",
103200
- "return": {
103201
- "type": {
103202
- "text": "boolean"
103203
- }
103157
+ "kind": "field",
103158
+ "name": "maybeDisabled",
103159
+ "type": {
103160
+ "text": "boolean | undefined"
103204
103161
  },
103162
+ "privacy": "protected",
103163
+ "readonly": true,
103205
103164
  "inheritedFrom": {
103206
- "name": "SbbOpenCloseBaseElement",
103207
- "module": "core/base-elements/open-close-base-element.js"
103165
+ "name": "SbbActionBaseElement",
103166
+ "module": "core/base-elements/action-base-element.js"
103208
103167
  }
103209
103168
  },
103210
103169
  {
103211
- "kind": "method",
103212
- "name": "dispatchBeforeCloseEvent",
103213
- "privacy": "protected",
103214
- "return": {
103215
- "type": {
103216
- "text": "boolean"
103217
- }
103170
+ "kind": "field",
103171
+ "name": "maybeDisabledInteractive",
103172
+ "type": {
103173
+ "text": "boolean | undefined"
103218
103174
  },
103175
+ "privacy": "protected",
103176
+ "readonly": true,
103219
103177
  "inheritedFrom": {
103220
- "name": "SbbOpenCloseBaseElement",
103221
- "module": "core/base-elements/open-close-base-element.js"
103178
+ "name": "SbbActionBaseElement",
103179
+ "module": "core/base-elements/action-base-element.js"
103222
103180
  }
103223
103181
  },
103224
103182
  {
103225
103183
  "kind": "method",
103226
- "name": "dispatchCloseEvent",
103184
+ "name": "setupBaseEventHandlers",
103227
103185
  "privacy": "protected",
103228
103186
  "return": {
103229
103187
  "type": {
103230
- "text": "boolean"
103188
+ "text": "void"
103231
103189
  }
103232
103190
  },
103233
103191
  "inheritedFrom": {
103234
- "name": "SbbOpenCloseBaseElement",
103235
- "module": "core/base-elements/open-close-base-element.js"
103192
+ "name": "SbbActionBaseElement",
103193
+ "module": "core/base-elements/action-base-element.js"
103236
103194
  }
103237
103195
  }
103238
103196
  ],
103197
+ "superclass": {
103198
+ "name": "SbbSecondaryButtonElement",
103199
+ "module": "button/secondary-button.js"
103200
+ },
103201
+ "tagName": "sbb-sidebar-close-button",
103202
+ "customElement": true,
103239
103203
  "attributes": [
103240
103204
  {
103241
- "name": "color",
103205
+ "name": "size",
103242
103206
  "type": {
103243
- "text": "'white' | 'milk'"
103207
+ "text": "SbbButtonSize"
103244
103208
  },
103245
- "default": "'white'",
103246
- "description": "Background color of the sidebar. Either `white` or `milk`.",
103247
- "fieldName": "color"
103209
+ "description": "Size variant, either l, m or s.",
103210
+ "default": "'l' / 's' (lean)",
103211
+ "fieldName": "size",
103212
+ "inheritedFrom": {
103213
+ "name": "SbbButtonCommonElementMixin",
103214
+ "module": "button/common/button-common.js"
103215
+ }
103248
103216
  },
103249
103217
  {
103250
- "name": "mode",
103218
+ "name": "loading",
103251
103219
  "type": {
103252
- "text": "'side' | 'over'"
103220
+ "text": "boolean"
103253
103221
  },
103254
- "default": "'side'",
103255
- "description": "Mode of the sidebar; one of 'side' or 'over'.",
103256
- "fieldName": "mode"
103222
+ "default": "false",
103223
+ "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
103224
+ "fieldName": "loading",
103225
+ "inheritedFrom": {
103226
+ "name": "SbbButtonCommonElementMixin",
103227
+ "module": "button/common/button-common.js"
103228
+ }
103257
103229
  },
103258
103230
  {
103259
- "name": "position",
103231
+ "name": "negative",
103260
103232
  "type": {
103261
- "text": "'start' | 'end'"
103233
+ "text": "boolean"
103262
103234
  },
103263
- "default": "'start'",
103264
- "description": "The side that the sidebar is attached to.",
103265
- "fieldName": "position"
103235
+ "default": "false",
103236
+ "description": "Negative coloring variant flag.",
103237
+ "fieldName": "negative",
103238
+ "inheritedFrom": {
103239
+ "name": "SbbNegativeMixin",
103240
+ "module": "core/mixins/negative-mixin.js"
103241
+ }
103266
103242
  },
103267
103243
  {
103268
- "name": "opened",
103244
+ "name": "icon-name",
103269
103245
  "type": {
103270
- "text": "boolean"
103246
+ "text": "string"
103271
103247
  },
103272
- "default": "false",
103273
- "description": "Whether the sidebar is opened or closed.\nCan be used to initially set the opened state, where\nthe animation will be skipped.",
103274
- "fieldName": "opened"
103248
+ "default": "''",
103249
+ "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.",
103250
+ "fieldName": "iconName",
103251
+ "inheritedFrom": {
103252
+ "name": "SbbIconNameMixin",
103253
+ "module": "icon/icon-name-mixin.js"
103254
+ }
103275
103255
  },
103276
103256
  {
103277
- "name": "focus-on-open",
103257
+ "name": "disabled-interactive",
103278
103258
  "type": {
103279
103259
  "text": "boolean"
103280
103260
  },
103281
103261
  "default": "false",
103282
- "description": "Whether the sidebar should focus the first focusable element automatically when opened.\nDefaults to false in when mode is set to `side`, otherwise defaults to true.\nIf explicitly enabled, focus will be moved into the sidebar in `side` mode as well.",
103283
- "fieldName": "focusOnOpen"
103284
- }
103285
- ],
103286
- "mixins": [
103262
+ "description": "Whether the button should be aria-disabled but stay interactive.",
103263
+ "fieldName": "disabledInteractive",
103264
+ "inheritedFrom": {
103265
+ "name": "SbbDisabledInteractiveMixin",
103266
+ "module": "core/mixins/disabled-mixin.js"
103267
+ }
103268
+ },
103287
103269
  {
103288
- "name": "SbbAnimationCompleteMixin",
103289
- "module": "core/mixins.js"
103290
- }
103291
- ],
103292
- "superclass": {
103293
- "name": "SbbOpenCloseBaseElement",
103294
- "module": "core/base-elements.js"
103295
- },
103296
- "tagName": "sbb-sidebar",
103297
- "customElement": true,
103298
- "events": [
103270
+ "name": "disabled",
103271
+ "description": "Whether the component is disabled.",
103272
+ "default": "false",
103273
+ "type": {
103274
+ "text": "boolean"
103275
+ },
103276
+ "fieldName": "disabled",
103277
+ "inheritedFrom": {
103278
+ "name": "SbbDisabledMixin",
103279
+ "module": "core/mixins/disabled-mixin.js"
103280
+ }
103281
+ },
103299
103282
  {
103300
- "name": "beforeopen",
103283
+ "name": "value",
103301
103284
  "type": {
103302
- "text": "Event"
103285
+ "text": "string"
103303
103286
  },
103304
- "description": "Emits whenever the component starts the opening transition. Can be canceled.",
103287
+ "default": "''",
103288
+ "description": "Value of the form element.",
103289
+ "fieldName": "value",
103305
103290
  "inheritedFrom": {
103306
- "name": "SbbOpenCloseBaseElement",
103307
- "module": "core/base-elements/open-close-base-element.js"
103291
+ "name": "SbbButtonBaseElement",
103292
+ "module": "core/base-elements/button-base-element.js"
103308
103293
  }
103309
103294
  },
103310
103295
  {
103311
- "name": "open",
103296
+ "name": "type",
103297
+ "description": "The type attribute to use for the button.",
103298
+ "default": "'button'",
103312
103299
  "type": {
103313
- "text": "Event"
103300
+ "text": "SbbButtonType"
103314
103301
  },
103315
- "description": "Emits whenever the component is opened.",
103302
+ "fieldName": "type",
103316
103303
  "inheritedFrom": {
103317
- "name": "SbbOpenCloseBaseElement",
103318
- "module": "core/base-elements/open-close-base-element.js"
103304
+ "name": "SbbButtonBaseElement",
103305
+ "module": "core/base-elements/button-base-element.js"
103319
103306
  }
103320
103307
  },
103321
103308
  {
103322
- "name": "beforeclose",
103309
+ "name": "form",
103310
+ "description": "The `<form>` element to associate the button with.",
103323
103311
  "type": {
103324
- "text": "Event"
103312
+ "text": "HTMLFormElement | null"
103325
103313
  },
103326
- "description": "Emits whenever the component begins the closing transition. Can be canceled.",
103314
+ "fieldName": "form",
103327
103315
  "inheritedFrom": {
103328
- "name": "SbbOpenCloseBaseElement",
103329
- "module": "core/base-elements/open-close-base-element.js"
103316
+ "name": "SbbButtonBaseElement",
103317
+ "module": "core/base-elements/button-base-element.js"
103330
103318
  }
103331
103319
  },
103332
103320
  {
103333
- "name": "close",
103321
+ "name": "name",
103322
+ "description": "Name of the form element. Will be read from name attribute.",
103334
103323
  "type": {
103335
- "text": "Event"
103324
+ "text": "string"
103336
103325
  },
103337
- "description": "Emits whenever the component is closed.",
103326
+ "fieldName": "name",
103338
103327
  "inheritedFrom": {
103339
- "name": "SbbOpenCloseBaseElement",
103340
- "module": "core/base-elements/open-close-base-element.js"
103328
+ "name": "SbbFormAssociatedMixin",
103329
+ "module": "core/mixins/form-associated-mixin.js"
103330
+ }
103331
+ }
103332
+ ],
103333
+ "cssProperties": [
103334
+ {
103335
+ "description": "The delay before the loading animation starts, when setting the button into loading state.",
103336
+ "name": "--sbb-button-loading-delay",
103337
+ "default": "300ms",
103338
+ "inheritedFrom": {
103339
+ "name": "SbbSecondaryButtonElement",
103340
+ "module": "button/secondary-button/secondary-button.component.js"
103341
103341
  }
103342
103342
  }
103343
103343
  ]
@@ -103346,18 +103346,18 @@
103346
103346
  "exports": [
103347
103347
  {
103348
103348
  "kind": "js",
103349
- "name": "SbbSidebarElement",
103349
+ "name": "SbbSidebarCloseButtonElement",
103350
103350
  "declaration": {
103351
- "name": "SbbSidebarElement",
103352
- "module": "sidebar/sidebar/sidebar.component.js"
103351
+ "name": "SbbSidebarCloseButtonElement",
103352
+ "module": "sidebar/sidebar-close-button/sidebar-close-button.component.js"
103353
103353
  }
103354
103354
  },
103355
103355
  {
103356
103356
  "kind": "custom-element-definition",
103357
- "name": "sbb-sidebar",
103357
+ "name": "sbb-sidebar-close-button",
103358
103358
  "declaration": {
103359
- "name": "SbbSidebarElement",
103360
- "module": "sidebar/sidebar/sidebar.component.js"
103359
+ "name": "SbbSidebarCloseButtonElement",
103360
+ "module": "sidebar/sidebar-close-button/sidebar-close-button.component.js"
103361
103361
  }
103362
103362
  }
103363
103363
  ]