@sbb-esta/lyne-elements-dev 5.0.0-next.2-dev.1777980877 → 5.0.0-next.2-dev.1777987469

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 +1012 -1012
  2. package/package.json +2 -2
@@ -131047,23 +131047,27 @@
131047
131047
  },
131048
131048
  {
131049
131049
  "kind": "javascript-module",
131050
- "path": "menu/menu/menu.component.js",
131050
+ "path": "menu/menu-button/menu-button.component.js",
131051
131051
  "declarations": [
131052
131052
  {
131053
131053
  "kind": "class",
131054
- "description": "It displays a contextual menu with one or more action element.",
131055
- "name": "SbbMenuElement",
131054
+ "description": "It displays a button element that can be used in the `sbb-menu` component.",
131055
+ "name": "SbbMenuButtonElement",
131056
131056
  "cssProperties": [
131057
131057
  {
131058
- "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`.",
131059
- "name": "--sbb-menu-z-index",
131060
- "default": "var(--sbb-overlay-default-z-index)"
131058
+ "description": "Can be used to modify horizontal padding.",
131059
+ "name": "--sbb-menu-action-outer-horizontal-padding",
131060
+ "default": "var(--sbb-spacing-fixed-3x)"
131061
131061
  }
131062
131062
  ],
131063
131063
  "slots": [
131064
131064
  {
131065
- "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
131065
+ "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
131066
131066
  "name": ""
131067
+ },
131068
+ {
131069
+ "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
131070
+ "name": "icon"
131067
131071
  }
131068
131072
  ],
131069
131073
  "members": [
@@ -131080,13 +131084,13 @@
131080
131084
  "name": "SbbElement",
131081
131085
  "module": "core/base-elements/element.js"
131082
131086
  },
131083
- "default": "'sbb-menu'"
131087
+ "default": "'sbb-menu-button'"
131084
131088
  },
131085
131089
  {
131086
131090
  "kind": "field",
131087
- "name": "elementDependencies",
131091
+ "name": "role",
131088
131092
  "type": {
131089
- "text": "SbbElementType[]"
131093
+ "text": "ElementInternals['role']"
131090
131094
  },
131091
131095
  "privacy": "public",
131092
131096
  "static": true,
@@ -131094,376 +131098,261 @@
131094
131098
  "name": "SbbElement",
131095
131099
  "module": "core/base-elements/element.js"
131096
131100
  },
131097
- "default": "[ SbbDividerElement, SbbMenuButtonElement, ]"
131101
+ "readonly": true,
131102
+ "default": "'menuitem'"
131098
131103
  },
131099
131104
  {
131100
131105
  "kind": "field",
131101
- "name": "role",
131106
+ "name": "disabledInteractive",
131102
131107
  "type": {
131103
- "text": "string"
131108
+ "text": "boolean"
131104
131109
  },
131105
131110
  "privacy": "public",
131106
- "static": true,
131111
+ "default": "false",
131112
+ "description": "Whether the button should be aria-disabled but stay interactive.",
131113
+ "attribute": "disabled-interactive",
131114
+ "reflects": true,
131107
131115
  "inheritedFrom": {
131108
- "name": "SbbElement",
131109
- "module": "core/base-elements/element.js"
131110
- },
131111
- "readonly": true,
131112
- "default": "'menu'"
131116
+ "name": "SbbDisabledInteractiveMixin",
131117
+ "module": "core/mixins/disabled-mixin.js"
131118
+ }
131113
131119
  },
131114
131120
  {
131115
131121
  "kind": "field",
131116
- "name": "trigger",
131122
+ "name": "disabled",
131123
+ "privacy": "public",
131124
+ "description": "Whether the component is disabled.",
131125
+ "default": "false",
131117
131126
  "type": {
131118
- "text": "HTMLElement | null"
131127
+ "text": "boolean"
131119
131128
  },
131120
- "privacy": "public",
131121
- "default": "null",
131122
- "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
131123
- "attribute": "trigger"
131129
+ "attribute": "disabled",
131130
+ "reflects": true,
131131
+ "inheritedFrom": {
131132
+ "name": "SbbDisabledMixin",
131133
+ "module": "core/mixins/disabled-mixin.js"
131134
+ }
131124
131135
  },
131125
131136
  {
131126
131137
  "kind": "field",
131127
- "name": "_menu",
131138
+ "name": "#disabled",
131139
+ "privacy": "private",
131128
131140
  "type": {
131129
- "text": "HTMLDivElement"
131141
+ "text": "boolean"
131130
131142
  },
131131
- "privacy": "private"
131143
+ "default": "false",
131144
+ "inheritedFrom": {
131145
+ "name": "SbbDisabledMixin",
131146
+ "module": "core/mixins/disabled-mixin.js"
131147
+ }
131132
131148
  },
131133
131149
  {
131134
- "kind": "field",
131135
- "name": "_triggerElement",
131136
- "type": {
131137
- "text": "HTMLElement | null"
131150
+ "kind": "method",
131151
+ "name": "isDisabledExternally",
131152
+ "privacy": "protected",
131153
+ "return": {
131154
+ "type": {
131155
+ "text": "boolean"
131156
+ }
131138
131157
  },
131139
- "privacy": "private",
131140
- "default": "null"
131158
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
131159
+ "inheritedFrom": {
131160
+ "name": "SbbDisabledMixin",
131161
+ "module": "core/mixins/disabled-mixin.js"
131162
+ }
131141
131163
  },
131142
131164
  {
131143
131165
  "kind": "field",
131144
- "name": "_triggerAbortController",
131166
+ "name": "styles",
131145
131167
  "type": {
131146
- "text": "AbortController"
131168
+ "text": "CSSResultGroup"
131147
131169
  },
131148
- "privacy": "private"
131170
+ "privacy": "public",
131171
+ "static": true,
131172
+ "default": "[unsafeCSS(style)]",
131173
+ "inheritedFrom": {
131174
+ "name": "SbbMenuActionCommonElementMixin",
131175
+ "module": "menu/common/menu-action-common.js"
131176
+ }
131149
131177
  },
131150
131178
  {
131151
- "kind": "field",
131152
- "name": "_isPointerDownEventOnMenu",
131153
- "type": {
131154
- "text": "boolean"
131179
+ "kind": "method",
131180
+ "name": "renderTemplate",
131181
+ "privacy": "protected",
131182
+ "return": {
131183
+ "type": {
131184
+ "text": "TemplateResult"
131185
+ }
131155
131186
  },
131156
- "privacy": "private",
131157
- "default": "false"
131187
+ "description": "Override this method to render the component template.",
131188
+ "inheritedFrom": {
131189
+ "name": "SbbActionBaseElement",
131190
+ "module": "core/base-elements/action-base-element.js"
131191
+ }
131158
131192
  },
131159
131193
  {
131160
131194
  "kind": "field",
131161
- "name": "_windowEventsController",
131195
+ "name": "elementDependencies",
131162
131196
  "type": {
131163
- "text": "AbortController"
131197
+ "text": "SbbElementType[]"
131164
131198
  },
131165
- "privacy": "private"
131166
- },
131167
- {
131168
- "kind": "field",
131169
- "name": "_escapableOverlayController",
131170
- "privacy": "private",
131171
- "default": "new SbbEscapableOverlayController(this)"
131172
- },
131173
- {
131174
- "kind": "field",
131175
- "name": "_focusTrapController",
131176
- "privacy": "private",
131177
- "default": "new SbbFocusTrapController(this)"
131178
- },
131179
- {
131180
- "kind": "field",
131181
- "name": "_scrollHandler",
131182
- "privacy": "private",
131183
- "default": "new SbbScrollHandler()"
131184
- },
131185
- {
131186
- "kind": "field",
131187
- "name": "_inertController",
131188
- "privacy": "private",
131189
- "default": "new SbbInertController(this)"
131190
- },
131191
- {
131192
- "kind": "field",
131193
- "name": "_mobileBreakpoint",
131194
- "privacy": "private",
131195
- "default": "SbbMediaQueryBreakpointSmallAndBelow"
131196
- },
131197
- {
131198
- "kind": "field",
131199
- "name": "_mediaMatcher",
131200
- "privacy": "private",
131201
- "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
131202
- },
131203
- {
131204
- "kind": "field",
131205
- "name": "_darkModeController",
131206
- "privacy": "private",
131207
- "default": "new SbbDarkModeController(this, () => this._syncNegative())"
131208
- },
131209
- {
131210
- "kind": "field",
131211
- "name": "_language",
131212
- "privacy": "private",
131213
- "default": "new SbbLanguageController(this)"
131199
+ "privacy": "public",
131200
+ "static": true,
131201
+ "inheritedFrom": {
131202
+ "name": "SbbElement",
131203
+ "module": "core/base-elements/element.js"
131204
+ },
131205
+ "default": "[SbbIconElement]"
131214
131206
  },
131215
131207
  {
131216
131208
  "kind": "field",
131217
- "name": "_nestedMenu",
131209
+ "name": "iconName",
131218
131210
  "type": {
131219
- "text": "SbbMenuElement | null"
131211
+ "text": "string"
131220
131212
  },
131221
- "privacy": "private",
131222
- "default": "null"
131213
+ "privacy": "public",
131214
+ "default": "''",
131215
+ "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.",
131216
+ "attribute": "icon-name",
131217
+ "inheritedFrom": {
131218
+ "name": "SbbIconNameMixin",
131219
+ "module": "icon/icon-name-mixin.js"
131220
+ }
131223
131221
  },
131224
131222
  {
131225
131223
  "kind": "method",
131226
- "name": "escapeStrategy",
131227
- "privacy": "public",
131224
+ "name": "renderIconSlot",
131225
+ "privacy": "protected",
131228
131226
  "return": {
131229
131227
  "type": {
131230
- "text": "void"
131228
+ "text": "TemplateResult"
131231
131229
  }
131232
131230
  },
131233
- "description": "The method which is called on escape key press. Defaults to calling close()",
131231
+ "parameters": [
131232
+ {
131233
+ "name": "classname",
131234
+ "optional": true,
131235
+ "type": {
131236
+ "text": "string"
131237
+ }
131238
+ }
131239
+ ],
131234
131240
  "inheritedFrom": {
131235
- "name": "SbbOpenCloseBaseElement",
131236
- "module": "core/base-elements/open-close-base-element.js"
131241
+ "name": "SbbIconNameMixin",
131242
+ "module": "icon/icon-name-mixin.js"
131237
131243
  }
131238
131244
  },
131239
131245
  {
131240
131246
  "kind": "method",
131241
- "name": "open",
131242
- "privacy": "public",
131247
+ "name": "renderIconName",
131248
+ "privacy": "protected",
131243
131249
  "return": {
131244
131250
  "type": {
131245
- "text": "void"
131251
+ "text": "string"
131246
131252
  }
131247
131253
  },
131248
- "description": "Opens the menu on trigger click.",
131249
131254
  "inheritedFrom": {
131250
- "name": "SbbOpenCloseBaseElement",
131251
- "module": "core/base-elements/open-close-base-element.js"
131255
+ "name": "SbbIconNameMixin",
131256
+ "module": "icon/icon-name-mixin.js"
131252
131257
  }
131253
131258
  },
131254
131259
  {
131255
131260
  "kind": "method",
131256
- "name": "close",
131257
- "privacy": "public",
131261
+ "name": "_renderIconName",
131262
+ "privacy": "private",
131258
131263
  "return": {
131259
131264
  "type": {
131260
- "text": "void"
131265
+ "text": "string"
131261
131266
  }
131262
131267
  },
131263
- "description": "Closes the menu and all its nested menus.",
131264
131268
  "inheritedFrom": {
131265
- "name": "SbbOpenCloseBaseElement",
131266
- "module": "core/base-elements/open-close-base-element.js"
131269
+ "name": "SbbIconNameMixin",
131270
+ "module": "icon/icon-name-mixin.js"
131267
131271
  }
131268
131272
  },
131269
131273
  {
131270
- "kind": "method",
131271
- "name": "closeAll",
131272
- "privacy": "public",
131273
- "return": {
131274
- "type": {
131275
- "text": "void"
131276
- }
131274
+ "kind": "field",
131275
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
131276
+ "type": {
131277
+ "text": "array"
131277
131278
  },
131278
- "description": "Closes the menu and all related menus (nested and parent menus)."
131279
+ "privacy": "private",
131280
+ "readonly": true,
131281
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
131282
+ "inheritedFrom": {
131283
+ "name": "SbbButtonBaseElement",
131284
+ "module": "core/base-elements/button-base-element.js"
131285
+ }
131279
131286
  },
131280
131287
  {
131281
- "kind": "method",
131282
- "name": "_close",
131283
- "privacy": "private",
131284
- "return": {
131285
- "type": {
131286
- "text": "void"
131287
- }
131288
- },
131289
- "parameters": [
131290
- {
131291
- "name": "closeAll",
131292
- "default": "false",
131293
- "description": "If true, it ensures animations are correct by toggling some states when closing all related menus at once.",
131294
- "optional": true
131295
- }
131296
- ]
131297
- },
131298
- {
131299
- "kind": "method",
131300
- "name": "_isZeroAnimationDuration",
131301
- "privacy": "private",
131302
- "return": {
131303
- "type": {
131304
- "text": "boolean"
131305
- }
131306
- }
131307
- },
131308
- {
131309
- "kind": "method",
131310
- "name": "_handleOpening",
131311
- "privacy": "private",
131312
- "return": {
131313
- "type": {
131314
- "text": "void"
131315
- }
131316
- }
131317
- },
131318
- {
131319
- "kind": "method",
131320
- "name": "_handleClosing",
131321
- "privacy": "private",
131322
- "return": {
131323
- "type": {
131324
- "text": "void"
131325
- }
131326
- }
131327
- },
131328
- {
131329
- "kind": "method",
131330
- "name": "_handleKeyDown",
131331
- "privacy": "private",
131332
- "return": {
131333
- "type": {
131334
- "text": "void"
131335
- }
131288
+ "kind": "field",
131289
+ "name": "value",
131290
+ "type": {
131291
+ "text": "string"
131336
131292
  },
131337
- "parameters": [
131338
- {
131339
- "name": "evt",
131340
- "type": {
131341
- "text": "KeyboardEvent"
131342
- }
131343
- }
131344
- ]
131345
- },
131346
- {
131347
- "kind": "method",
131348
- "name": "_configureTrigger",
131349
- "privacy": "private",
131350
- "return": {
131351
- "type": {
131352
- "text": "void"
131353
- }
131354
- }
131355
- },
131356
- {
131357
- "kind": "method",
131358
- "name": "_attachWindowEvents",
131359
- "privacy": "private",
131360
- "return": {
131361
- "type": {
131362
- "text": "void"
131363
- }
131364
- }
131365
- },
131366
- {
131367
- "kind": "method",
131368
- "name": "_interactiveElementClick",
131369
- "privacy": "private",
131370
- "return": {
131371
- "type": {
131372
- "text": "void"
131373
- }
131293
+ "privacy": "public",
131294
+ "inheritedFrom": {
131295
+ "name": "SbbButtonBaseElement",
131296
+ "module": "core/base-elements/button-base-element.js"
131374
131297
  },
131375
- "parameters": [
131376
- {
131377
- "name": "event",
131378
- "type": {
131379
- "text": "Event"
131380
- }
131381
- }
131382
- ]
131383
- },
131384
- {
131385
- "kind": "field",
131386
- "name": "_pointerDownListener",
131387
- "privacy": "private"
131298
+ "default": "''",
131299
+ "description": "Value of the form element.",
131300
+ "attribute": "value"
131388
131301
  },
131389
131302
  {
131390
131303
  "kind": "field",
131391
- "name": "_closeOnBackdropClick",
131392
- "privacy": "private"
131393
- },
131394
- {
131395
- "kind": "method",
131396
- "name": "_nestedMenus",
131397
- "privacy": "private",
131398
- "return": {
131399
- "type": {
131400
- "text": "SbbMenuElement[]"
131401
- }
131304
+ "name": "type",
131305
+ "privacy": "public",
131306
+ "description": "The type attribute to use for the button.",
131307
+ "default": "'button'",
131308
+ "type": {
131309
+ "text": "SbbButtonType"
131402
131310
  },
131403
- "description": "Converts the linked list into an array of SbbMenuElement."
131404
- },
131405
- {
131406
- "kind": "method",
131407
- "name": "_parentMenu",
131408
- "privacy": "private",
131409
- "return": {
131410
- "type": {
131411
- "text": "SbbMenuElement | null"
131412
- }
131311
+ "attribute": "type",
131312
+ "inheritedFrom": {
131313
+ "name": "SbbButtonBaseElement",
131314
+ "module": "core/base-elements/button-base-element.js"
131413
131315
  }
131414
131316
  },
131415
131317
  {
131416
- "kind": "method",
131417
- "name": "_mainMenu",
131418
- "privacy": "private",
131419
- "return": {
131420
- "type": {
131421
- "text": "SbbMenuElement"
131422
- }
131318
+ "kind": "field",
131319
+ "name": "form",
131320
+ "type": {
131321
+ "text": "HTMLFormElement | null"
131423
131322
  },
131424
- "description": "The outermost menu."
131323
+ "privacy": "public",
131324
+ "description": "The `<form>` element to associate the button with.",
131325
+ "inheritedFrom": {
131326
+ "name": "SbbButtonBaseElement",
131327
+ "module": "core/base-elements/button-base-element.js"
131328
+ },
131329
+ "attribute": "form"
131425
131330
  },
131426
131331
  {
131427
- "kind": "method",
131428
- "name": "_isNested",
131332
+ "kind": "field",
131333
+ "name": "_formId",
131334
+ "type": {
131335
+ "text": "string"
131336
+ },
131429
131337
  "privacy": "private",
131430
- "return": {
131431
- "type": {
131432
- "text": "boolean"
131433
- }
131338
+ "default": "''",
131339
+ "inheritedFrom": {
131340
+ "name": "SbbButtonBaseElement",
131341
+ "module": "core/base-elements/button-base-element.js"
131434
131342
  }
131435
131343
  },
131436
131344
  {
131437
- "kind": "method",
131438
- "name": "_updateNestedInert",
131345
+ "kind": "field",
131346
+ "name": "_handleButtonClick",
131439
131347
  "privacy": "private",
131440
- "return": {
131441
- "type": {
131442
- "text": "void"
131443
- }
131348
+ "inheritedFrom": {
131349
+ "name": "SbbButtonBaseElement",
131350
+ "module": "core/base-elements/button-base-element.js"
131444
131351
  }
131445
131352
  },
131446
131353
  {
131447
131354
  "kind": "method",
131448
- "name": "_handleMouseOver",
131449
- "privacy": "private",
131450
- "return": {
131451
- "type": {
131452
- "text": "void"
131453
- }
131454
- },
131455
- "parameters": [
131456
- {
131457
- "name": "event",
131458
- "type": {
131459
- "text": "MouseEvent"
131460
- }
131461
- }
131462
- ]
131463
- },
131464
- {
131465
- "kind": "method",
131466
- "name": "_onMenuAnimationEnd",
131355
+ "name": "_requestSubmit",
131467
131356
  "privacy": "private",
131468
131357
  "return": {
131469
131358
  "type": {
@@ -131472,269 +131361,219 @@
131472
131361
  },
131473
131362
  "parameters": [
131474
131363
  {
131475
- "name": "event",
131364
+ "name": "form",
131476
131365
  "type": {
131477
- "text": "AnimationEvent"
131366
+ "text": "HTMLFormElement"
131478
131367
  }
131479
131368
  }
131480
- ]
131481
- },
131482
- {
131483
- "kind": "method",
131484
- "name": "_setMenuPosition",
131485
- "privacy": "private",
131486
- "return": {
131487
- "type": {
131488
- "text": "void"
131489
- }
131369
+ ],
131370
+ "inheritedFrom": {
131371
+ "name": "SbbButtonBaseElement",
131372
+ "module": "core/base-elements/button-base-element.js"
131490
131373
  }
131491
131374
  },
131492
131375
  {
131493
- "kind": "method",
131494
- "name": "_syncNegative",
131376
+ "kind": "field",
131377
+ "name": "_formKeyDown",
131495
131378
  "privacy": "private",
131496
- "return": {
131497
- "type": {
131498
- "text": "void"
131499
- }
131379
+ "inheritedFrom": {
131380
+ "name": "SbbButtonBaseElement",
131381
+ "module": "core/base-elements/button-base-element.js"
131500
131382
  }
131501
131383
  },
131502
131384
  {
131503
- "kind": "method",
131504
- "name": "_isMobile",
131505
- "privacy": "private",
131506
- "return": {
131507
- "type": {
131508
- "text": "boolean"
131509
- }
131385
+ "kind": "field",
131386
+ "name": "formAssociated",
131387
+ "type": {
131388
+ "text": "boolean"
131389
+ },
131390
+ "privacy": "public",
131391
+ "static": true,
131392
+ "default": "true",
131393
+ "inheritedFrom": {
131394
+ "name": "SbbFormAssociatedMixin",
131395
+ "module": "core/mixins/form-associated-mixin.js"
131510
131396
  }
131511
131397
  },
131512
131398
  {
131513
131399
  "kind": "field",
131514
- "name": "events",
131400
+ "name": "name",
131515
131401
  "privacy": "public",
131516
- "static": true,
131517
- "readonly": true,
131518
- "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
131402
+ "description": "Name of the form element. Will be read from name attribute.",
131519
131403
  "type": {
131520
- "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
131404
+ "text": "string"
131521
131405
  },
131406
+ "attribute": "name",
131522
131407
  "inheritedFrom": {
131523
- "name": "SbbOpenCloseBaseElement",
131524
- "module": "core/base-elements/open-close-base-element.js"
131408
+ "name": "SbbFormAssociatedMixin",
131409
+ "module": "core/mixins/form-associated-mixin.js"
131525
131410
  }
131526
131411
  },
131527
131412
  {
131528
131413
  "kind": "field",
131529
- "name": "state",
131530
- "privacy": "protected",
131531
- "description": "The state of the component.",
131414
+ "name": "validity",
131532
131415
  "type": {
131533
- "text": "SbbOpenedClosedState"
131416
+ "text": "ValidityState"
131534
131417
  },
131535
- "default": "'closed'",
131418
+ "privacy": "public",
131419
+ "description": "Returns the ValidityState object for this element.",
131420
+ "readonly": true,
131536
131421
  "inheritedFrom": {
131537
- "name": "SbbOpenCloseBaseElement",
131538
- "module": "core/base-elements/open-close-base-element.js"
131422
+ "name": "SbbFormAssociatedMixin",
131423
+ "module": "core/mixins/form-associated-mixin.js"
131539
131424
  }
131540
131425
  },
131541
131426
  {
131542
131427
  "kind": "field",
131543
- "name": "_state",
131428
+ "name": "validationMessage",
131544
131429
  "type": {
131545
- "text": "SbbOpenedClosedState"
131430
+ "text": "string"
131546
131431
  },
131547
- "privacy": "private",
131432
+ "privacy": "public",
131433
+ "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.",
131434
+ "readonly": true,
131548
131435
  "inheritedFrom": {
131549
- "name": "SbbOpenCloseBaseElement",
131550
- "module": "core/base-elements/open-close-base-element.js"
131436
+ "name": "SbbFormAssociatedMixin",
131437
+ "module": "core/mixins/form-associated-mixin.js"
131551
131438
  }
131552
131439
  },
131553
131440
  {
131554
131441
  "kind": "field",
131555
- "name": "isOpen",
131442
+ "name": "willValidate",
131556
131443
  "type": {
131557
131444
  "text": "boolean"
131558
131445
  },
131559
131446
  "privacy": "public",
131560
- "description": "Whether the element is open.",
131447
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
131561
131448
  "readonly": true,
131562
131449
  "inheritedFrom": {
131563
- "name": "SbbOpenCloseBaseElement",
131564
- "module": "core/base-elements/open-close-base-element.js"
131450
+ "name": "SbbFormAssociatedMixin",
131451
+ "module": "core/mixins/form-associated-mixin.js"
131565
131452
  }
131566
131453
  },
131567
131454
  {
131568
- "kind": "method",
131569
- "name": "dispatchBeforeOpenEvent",
131570
- "privacy": "protected",
131571
- "return": {
131572
- "type": {
131573
- "text": "boolean"
131574
- }
131575
- },
131455
+ "kind": "field",
131456
+ "name": "_validityStates",
131457
+ "privacy": "private",
131458
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
131576
131459
  "inheritedFrom": {
131577
- "name": "SbbOpenCloseBaseElement",
131578
- "module": "core/base-elements/open-close-base-element.js"
131460
+ "name": "SbbFormAssociatedMixin",
131461
+ "module": "core/mixins/form-associated-mixin.js"
131579
131462
  }
131580
131463
  },
131581
131464
  {
131582
- "kind": "method",
131583
- "name": "dispatchOpenEvent",
131584
- "privacy": "protected",
131585
- "return": {
131586
- "type": {
131587
- "text": "boolean"
131588
- }
131465
+ "kind": "field",
131466
+ "name": "formDisabled",
131467
+ "type": {
131468
+ "text": "boolean"
131589
131469
  },
131470
+ "privacy": "protected",
131471
+ "default": "false",
131472
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
131590
131473
  "inheritedFrom": {
131591
- "name": "SbbOpenCloseBaseElement",
131592
- "module": "core/base-elements/open-close-base-element.js"
131474
+ "name": "SbbFormAssociatedMixin",
131475
+ "module": "core/mixins/form-associated-mixin.js"
131593
131476
  }
131594
131477
  },
131595
131478
  {
131596
131479
  "kind": "method",
131597
- "name": "dispatchBeforeCloseEvent",
131598
- "privacy": "protected",
131480
+ "name": "checkValidity",
131481
+ "privacy": "public",
131599
131482
  "return": {
131600
131483
  "type": {
131601
131484
  "text": "boolean"
131602
131485
  }
131603
131486
  },
131487
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
131604
131488
  "inheritedFrom": {
131605
- "name": "SbbOpenCloseBaseElement",
131606
- "module": "core/base-elements/open-close-base-element.js"
131489
+ "name": "SbbFormAssociatedMixin",
131490
+ "module": "core/mixins/form-associated-mixin.js"
131607
131491
  }
131608
131492
  },
131609
131493
  {
131610
131494
  "kind": "method",
131611
- "name": "dispatchCloseEvent",
131612
- "privacy": "protected",
131495
+ "name": "reportValidity",
131496
+ "privacy": "public",
131613
131497
  "return": {
131614
131498
  "type": {
131615
131499
  "text": "boolean"
131616
131500
  }
131617
131501
  },
131502
+ "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.",
131618
131503
  "inheritedFrom": {
131619
- "name": "SbbOpenCloseBaseElement",
131620
- "module": "core/base-elements/open-close-base-element.js"
131504
+ "name": "SbbFormAssociatedMixin",
131505
+ "module": "core/mixins/form-associated-mixin.js"
131621
131506
  }
131622
131507
  },
131623
131508
  {
131624
- "kind": "field",
131625
- "name": "['_$sbbElement$']",
131626
- "type": {
131627
- "text": "boolean"
131628
- },
131509
+ "kind": "method",
131510
+ "name": "setCustomValidity",
131629
131511
  "privacy": "public",
131630
- "static": true,
131631
- "default": "true",
131632
- "inheritedFrom": {
131633
- "name": "SbbElement",
131634
- "module": "core/base-elements/element.js"
131635
- }
131636
- },
131637
- {
131638
- "kind": "field",
131639
- "name": "_controllers",
131640
- "type": {
131641
- "text": "Set<SbbReactiveController> | undefined"
131642
- },
131643
- "privacy": "private",
131644
- "inheritedFrom": {
131645
- "name": "SbbElement",
131646
- "module": "core/base-elements/element.js"
131647
- }
131648
- },
131649
- {
131650
- "kind": "field",
131651
- "name": "_hydrationRequired",
131652
- "type": {
131653
- "text": "boolean"
131512
+ "return": {
131513
+ "type": {
131514
+ "text": "void"
131515
+ }
131654
131516
  },
131655
- "privacy": "private",
131656
- "default": "!!this.shadowRoot",
131517
+ "parameters": [
131518
+ {
131519
+ "name": "message",
131520
+ "type": {
131521
+ "text": "string"
131522
+ }
131523
+ }
131524
+ ],
131525
+ "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.",
131657
131526
  "inheritedFrom": {
131658
- "name": "SbbElement",
131659
- "module": "core/base-elements/element.js"
131527
+ "name": "SbbFormAssociatedMixin",
131528
+ "module": "core/mixins/form-associated-mixin.js"
131660
131529
  }
131661
131530
  },
131662
131531
  {
131663
- "kind": "field",
131664
- "name": "_hydrationComplete",
131532
+ "kind": "method",
131533
+ "name": "_hasDisabledAncestor",
131665
131534
  "privacy": "private",
131666
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
131667
- "inheritedFrom": {
131668
- "name": "SbbElement",
131669
- "module": "core/base-elements/element.js"
131670
- }
131671
- },
131672
- {
131673
- "kind": "field",
131674
- "name": "_resolveHydration",
131675
- "type": {
131676
- "text": "(hydrationRequired: boolean) => void"
131535
+ "return": {
131536
+ "type": {
131537
+ "text": "boolean"
131538
+ }
131677
131539
  },
131678
- "privacy": "private",
131679
131540
  "inheritedFrom": {
131680
- "name": "SbbElement",
131681
- "module": "core/base-elements/element.js"
131541
+ "name": "SbbFormAssociatedMixin",
131542
+ "module": "core/mixins/form-associated-mixin.js"
131682
131543
  }
131683
131544
  },
131684
131545
  {
131685
- "kind": "field",
131686
- "name": "_textObserver",
131687
- "type": {
131688
- "text": "MutationObserver | undefined"
131546
+ "kind": "method",
131547
+ "name": "updateFormValue",
131548
+ "privacy": "protected",
131549
+ "return": {
131550
+ "type": {
131551
+ "text": "void"
131552
+ }
131689
131553
  },
131690
- "privacy": "private",
131554
+ "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",
131691
131555
  "inheritedFrom": {
131692
- "name": "SbbElement",
131693
- "module": "core/base-elements/element.js"
131556
+ "name": "SbbFormAssociatedMixin",
131557
+ "module": "core/mixins/form-associated-mixin.js"
131694
131558
  }
131695
131559
  },
131696
- {
131697
- "kind": "field",
131698
- "name": "hydrationRequired",
131699
- "type": {
131700
- "text": "boolean"
131701
- },
131702
- "privacy": "protected",
131703
- "description": "Returns whether hydration is required and not completed.",
131704
- "readonly": true,
131705
- "inheritedFrom": {
131706
- "name": "SbbElement",
131707
- "module": "core/base-elements/element.js"
131708
- },
131709
- "default": "!!this.shadowRoot"
131710
- },
131711
131560
  {
131712
131561
  "kind": "method",
131713
- "name": "finalizeStyles",
131562
+ "name": "formState",
131714
131563
  "privacy": "protected",
131715
- "static": true,
131716
131564
  "return": {
131717
131565
  "type": {
131718
- "text": "CSSResultOrNative[]"
131566
+ "text": "FormRestoreState"
131719
131567
  }
131720
131568
  },
131721
- "parameters": [
131722
- {
131723
- "name": "_styles",
131724
- "type": {
131725
- "text": "CSSResultGroup"
131726
- }
131727
- }
131728
- ],
131729
- "description": "Collects `styles` from every class in the prototype chain (using `Object.hasOwn`)\nand merges them in top-down order. This means each class/mixin only needs to declare\nits **own** styles — there is no need to reference `super.styles`.\n\nLit's default behaviour already walks the chain, but fails for mixins where\n`super.styles` resolves to the wrong class. This override fixes that.",
131730
131569
  "inheritedFrom": {
131731
- "name": "SbbElement",
131732
- "module": "core/base-elements/element.js"
131570
+ "name": "SbbFormAssociatedMixin",
131571
+ "module": "core/mixins/form-associated-mixin.js"
131733
131572
  }
131734
131573
  },
131735
131574
  {
131736
131575
  "kind": "method",
131737
- "name": "toggleState",
131576
+ "name": "setValidityFlag",
131738
131577
  "privacy": "protected",
131739
131578
  "return": {
131740
131579
  "type": {
@@ -131743,28 +131582,35 @@
131743
131582
  },
131744
131583
  "parameters": [
131745
131584
  {
131746
- "name": "value",
131585
+ "name": "flag",
131586
+ "type": {
131587
+ "text": "T"
131588
+ }
131589
+ },
131590
+ {
131591
+ "name": "message",
131747
131592
  "type": {
131748
131593
  "text": "string"
131749
131594
  }
131750
131595
  },
131751
131596
  {
131752
- "name": "force",
131597
+ "name": "flagValue",
131753
131598
  "optional": true,
131754
131599
  "type": {
131755
- "text": "boolean"
131600
+ "text": "ValidityStateFlags[T]"
131756
131601
  }
131757
131602
  }
131758
131603
  ],
131604
+ "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).",
131759
131605
  "inheritedFrom": {
131760
- "name": "SbbElement",
131761
- "module": "core/base-elements/element.js"
131606
+ "name": "SbbFormAssociatedMixin",
131607
+ "module": "core/mixins/form-associated-mixin.js"
131762
131608
  }
131763
131609
  },
131764
131610
  {
131765
131611
  "kind": "method",
131766
- "name": "_slotchangeHandler",
131767
- "privacy": "private",
131612
+ "name": "removeValidityFlag",
131613
+ "privacy": "protected",
131768
131614
  "return": {
131769
131615
  "type": {
131770
131616
  "text": "void"
@@ -131772,718 +131618,822 @@
131772
131618
  },
131773
131619
  "parameters": [
131774
131620
  {
131775
- "name": "event",
131776
- "type": {
131777
- "text": "Event"
131778
- }
131779
- },
131780
- {
131781
- "name": "slot",
131621
+ "name": "flag",
131782
131622
  "type": {
131783
- "text": "HTMLSlotElement"
131623
+ "text": "T"
131784
131624
  }
131785
131625
  }
131786
131626
  ],
131627
+ "description": "Removes the validity state flag entry and updates validity state.",
131787
131628
  "inheritedFrom": {
131788
- "name": "SbbElement",
131789
- "module": "core/base-elements/element.js"
131629
+ "name": "SbbFormAssociatedMixin",
131630
+ "module": "core/mixins/form-associated-mixin.js"
131790
131631
  }
131791
131632
  },
131792
131633
  {
131793
131634
  "kind": "method",
131794
- "name": "_handleSlotChangeForSlottedState",
131795
- "privacy": "private",
131635
+ "name": "validate",
131636
+ "privacy": "protected",
131796
131637
  "return": {
131797
131638
  "type": {
131798
131639
  "text": "void"
131799
131640
  }
131800
131641
  },
131801
- "parameters": [
131802
- {
131803
- "name": "slot",
131804
- "type": {
131805
- "text": "HTMLSlotElement"
131806
- }
131807
- }
131808
- ],
131642
+ "description": "To be called whenever the current element needs to be validated.",
131809
131643
  "inheritedFrom": {
131810
- "name": "SbbElement",
131811
- "module": "core/base-elements/element.js"
131644
+ "name": "SbbFormAssociatedMixin",
131645
+ "module": "core/mixins/form-associated-mixin.js"
131812
131646
  }
131813
131647
  },
131814
131648
  {
131815
131649
  "kind": "method",
131816
- "name": "_updateSlottedState",
131817
- "privacy": "private",
131650
+ "name": "shouldValidate",
131651
+ "privacy": "protected",
131818
131652
  "return": {
131819
131653
  "type": {
131820
- "text": "void"
131654
+ "text": "boolean"
131821
131655
  }
131822
131656
  },
131823
131657
  "parameters": [
131824
131658
  {
131825
- "name": "slot",
131659
+ "name": "name",
131826
131660
  "type": {
131827
- "text": "HTMLSlotElement"
131661
+ "text": "PropertyKey | undefined"
131828
131662
  }
131829
131663
  }
131830
131664
  ],
131665
+ "description": "Whether validation should be run on a property change with the given name.",
131831
131666
  "inheritedFrom": {
131832
- "name": "SbbElement",
131833
- "module": "core/base-elements/element.js"
131667
+ "name": "SbbFormAssociatedMixin",
131668
+ "module": "core/mixins/form-associated-mixin.js"
131834
131669
  }
131835
131670
  },
131836
131671
  {
131837
131672
  "kind": "method",
131838
- "name": "_observeTextNodesInSlot",
131673
+ "name": "_setInternalValidity",
131839
131674
  "privacy": "private",
131840
131675
  "return": {
131841
131676
  "type": {
131842
131677
  "text": "void"
131843
131678
  }
131844
131679
  },
131680
+ "inheritedFrom": {
131681
+ "name": "SbbFormAssociatedMixin",
131682
+ "module": "core/mixins/form-associated-mixin.js"
131683
+ }
131684
+ },
131685
+ {
131686
+ "kind": "field",
131687
+ "name": "_preventScrollOnSpaceKeydown",
131688
+ "privacy": "private",
131689
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
131845
131690
  "parameters": [
131846
131691
  {
131847
- "name": "slot",
131848
- "type": {
131849
- "text": "HTMLSlotElement"
131850
- }
131692
+ "description": "The origin event.",
131693
+ "name": "event"
131851
131694
  }
131852
131695
  ],
131853
131696
  "inheritedFrom": {
131854
- "name": "SbbElement",
131855
- "module": "core/base-elements/element.js"
131697
+ "name": "SbbButtonLikeBaseElement",
131698
+ "module": "core/base-elements/button-base-element.js"
131856
131699
  }
131857
131700
  },
131858
131701
  {
131859
- "kind": "method",
131860
- "name": "_hasSlottedContent",
131702
+ "kind": "field",
131703
+ "name": "_removeActiveMarker",
131861
131704
  "privacy": "private",
131862
- "return": {
131863
- "type": {
131864
- "text": "boolean"
131865
- }
131866
- },
131705
+ "inheritedFrom": {
131706
+ "name": "SbbButtonLikeBaseElement",
131707
+ "module": "core/base-elements/button-base-element.js"
131708
+ }
131709
+ },
131710
+ {
131711
+ "kind": "field",
131712
+ "name": "_dispatchClickEventOnSpaceKeyup",
131713
+ "privacy": "private",
131714
+ "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.",
131867
131715
  "parameters": [
131868
131716
  {
131869
- "name": "slot",
131870
- "type": {
131871
- "text": "HTMLSlotElement"
131872
- }
131717
+ "description": "The origin event.",
131718
+ "name": "event"
131873
131719
  }
131874
131720
  ],
131875
131721
  "inheritedFrom": {
131876
- "name": "SbbElement",
131877
- "module": "core/base-elements/element.js"
131722
+ "name": "SbbButtonLikeBaseElement",
131723
+ "module": "core/base-elements/button-base-element.js"
131878
131724
  }
131879
- }
131880
- ],
131881
- "attributes": [
131882
- {
131883
- "name": "trigger",
131884
- "type": {
131885
- "text": "HTMLElement | null"
131886
- },
131887
- "default": "null",
131888
- "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
131889
- "fieldName": "trigger"
131890
- }
131891
- ],
131892
- "superclass": {
131893
- "name": "SbbOpenCloseBaseElement",
131894
- "module": "core.js"
131895
- },
131896
- "tagName": "sbb-menu",
131897
- "customElement": true,
131898
- "events": [
131725
+ },
131899
131726
  {
131900
- "name": "beforeopen",
131901
- "type": {
131902
- "text": "Event"
131903
- },
131904
- "description": "Emits whenever the component starts the opening transition. Can be canceled.",
131727
+ "kind": "field",
131728
+ "name": "_dispatchClickEvent",
131729
+ "privacy": "private",
131905
131730
  "inheritedFrom": {
131906
- "name": "SbbOpenCloseBaseElement",
131907
- "module": "core/base-elements/open-close-base-element.js"
131731
+ "name": "SbbButtonLikeBaseElement",
131732
+ "module": "core/base-elements/button-base-element.js"
131908
131733
  }
131909
131734
  },
131910
131735
  {
131911
- "name": "open",
131736
+ "kind": "field",
131737
+ "name": "maybeDisabled",
131912
131738
  "type": {
131913
- "text": "Event"
131739
+ "text": "boolean | undefined"
131914
131740
  },
131915
- "description": "Emits whenever the component is opened.",
131741
+ "privacy": "protected",
131742
+ "readonly": true,
131916
131743
  "inheritedFrom": {
131917
- "name": "SbbOpenCloseBaseElement",
131918
- "module": "core/base-elements/open-close-base-element.js"
131744
+ "name": "SbbActionBaseElement",
131745
+ "module": "core/base-elements/action-base-element.js"
131919
131746
  }
131920
131747
  },
131921
131748
  {
131922
- "name": "beforeclose",
131749
+ "kind": "field",
131750
+ "name": "maybeDisabledInteractive",
131923
131751
  "type": {
131924
- "text": "Event"
131752
+ "text": "boolean | undefined"
131925
131753
  },
131926
- "description": "Emits whenever the component begins the closing transition. Can be canceled.",
131754
+ "privacy": "protected",
131755
+ "readonly": true,
131927
131756
  "inheritedFrom": {
131928
- "name": "SbbOpenCloseBaseElement",
131929
- "module": "core/base-elements/open-close-base-element.js"
131757
+ "name": "SbbActionBaseElement",
131758
+ "module": "core/base-elements/action-base-element.js"
131930
131759
  }
131931
131760
  },
131932
131761
  {
131933
- "name": "close",
131934
- "type": {
131935
- "text": "Event"
131762
+ "kind": "method",
131763
+ "name": "setupBaseEventHandlers",
131764
+ "privacy": "protected",
131765
+ "return": {
131766
+ "type": {
131767
+ "text": "void"
131768
+ }
131936
131769
  },
131937
- "description": "Emits whenever the component is closed.",
131938
131770
  "inheritedFrom": {
131939
- "name": "SbbOpenCloseBaseElement",
131940
- "module": "core/base-elements/open-close-base-element.js"
131771
+ "name": "SbbActionBaseElement",
131772
+ "module": "core/base-elements/action-base-element.js"
131941
131773
  }
131942
- }
131943
- ]
131944
- }
131945
- ],
131946
- "exports": [
131947
- {
131948
- "kind": "js",
131949
- "name": "SbbMenuElement",
131950
- "declaration": {
131951
- "name": "SbbMenuElement",
131952
- "module": "menu/menu/menu.component.js"
131953
- }
131954
- }
131955
- ]
131956
- },
131957
- {
131958
- "kind": "javascript-module",
131959
- "path": "menu/menu-button/menu-button.component.js",
131960
- "declarations": [
131961
- {
131962
- "kind": "class",
131963
- "description": "It displays a button element that can be used in the `sbb-menu` component.",
131964
- "name": "SbbMenuButtonElement",
131965
- "cssProperties": [
131966
- {
131967
- "description": "Can be used to modify horizontal padding.",
131968
- "name": "--sbb-menu-action-outer-horizontal-padding",
131969
- "default": "var(--sbb-spacing-fixed-3x)"
131970
- }
131971
- ],
131972
- "slots": [
131973
- {
131974
- "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
131975
- "name": ""
131976
131774
  },
131977
- {
131978
- "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
131979
- "name": "icon"
131980
- }
131981
- ],
131982
- "members": [
131983
131775
  {
131984
131776
  "kind": "field",
131985
- "name": "elementName",
131777
+ "name": "['_$sbbElement$']",
131986
131778
  "type": {
131987
- "text": "string"
131779
+ "text": "boolean"
131988
131780
  },
131989
131781
  "privacy": "public",
131990
131782
  "static": true,
131991
- "readonly": true,
131783
+ "default": "true",
131992
131784
  "inheritedFrom": {
131993
131785
  "name": "SbbElement",
131994
131786
  "module": "core/base-elements/element.js"
131787
+ }
131788
+ },
131789
+ {
131790
+ "kind": "field",
131791
+ "name": "_controllers",
131792
+ "type": {
131793
+ "text": "Set<SbbReactiveController> | undefined"
131995
131794
  },
131996
- "default": "'sbb-menu-button'"
131795
+ "privacy": "private",
131796
+ "inheritedFrom": {
131797
+ "name": "SbbElement",
131798
+ "module": "core/base-elements/element.js"
131799
+ }
131997
131800
  },
131998
131801
  {
131999
131802
  "kind": "field",
132000
- "name": "role",
131803
+ "name": "_hydrationRequired",
132001
131804
  "type": {
132002
- "text": "ElementInternals['role']"
131805
+ "text": "boolean"
132003
131806
  },
132004
- "privacy": "public",
132005
- "static": true,
131807
+ "privacy": "private",
131808
+ "default": "!!this.shadowRoot",
131809
+ "inheritedFrom": {
131810
+ "name": "SbbElement",
131811
+ "module": "core/base-elements/element.js"
131812
+ }
131813
+ },
131814
+ {
131815
+ "kind": "field",
131816
+ "name": "_hydrationComplete",
131817
+ "privacy": "private",
131818
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
132006
131819
  "inheritedFrom": {
132007
131820
  "name": "SbbElement",
132008
131821
  "module": "core/base-elements/element.js"
132009
- },
132010
- "readonly": true,
132011
- "default": "'menuitem'"
131822
+ }
132012
131823
  },
132013
131824
  {
132014
131825
  "kind": "field",
132015
- "name": "disabledInteractive",
131826
+ "name": "_resolveHydration",
132016
131827
  "type": {
132017
- "text": "boolean"
131828
+ "text": "(hydrationRequired: boolean) => void"
132018
131829
  },
132019
- "privacy": "public",
132020
- "default": "false",
132021
- "description": "Whether the button should be aria-disabled but stay interactive.",
132022
- "attribute": "disabled-interactive",
132023
- "reflects": true,
131830
+ "privacy": "private",
132024
131831
  "inheritedFrom": {
132025
- "name": "SbbDisabledInteractiveMixin",
132026
- "module": "core/mixins/disabled-mixin.js"
131832
+ "name": "SbbElement",
131833
+ "module": "core/base-elements/element.js"
132027
131834
  }
132028
131835
  },
132029
131836
  {
132030
131837
  "kind": "field",
132031
- "name": "disabled",
132032
- "privacy": "public",
132033
- "description": "Whether the component is disabled.",
132034
- "default": "false",
131838
+ "name": "_textObserver",
132035
131839
  "type": {
132036
- "text": "boolean"
131840
+ "text": "MutationObserver | undefined"
132037
131841
  },
132038
- "attribute": "disabled",
132039
- "reflects": true,
131842
+ "privacy": "private",
132040
131843
  "inheritedFrom": {
132041
- "name": "SbbDisabledMixin",
132042
- "module": "core/mixins/disabled-mixin.js"
131844
+ "name": "SbbElement",
131845
+ "module": "core/base-elements/element.js"
132043
131846
  }
132044
131847
  },
132045
131848
  {
132046
131849
  "kind": "field",
132047
- "name": "#disabled",
132048
- "privacy": "private",
131850
+ "name": "hydrationRequired",
132049
131851
  "type": {
132050
131852
  "text": "boolean"
132051
131853
  },
132052
- "default": "false",
131854
+ "privacy": "protected",
131855
+ "description": "Returns whether hydration is required and not completed.",
131856
+ "readonly": true,
132053
131857
  "inheritedFrom": {
132054
- "name": "SbbDisabledMixin",
132055
- "module": "core/mixins/disabled-mixin.js"
132056
- }
131858
+ "name": "SbbElement",
131859
+ "module": "core/base-elements/element.js"
131860
+ },
131861
+ "default": "!!this.shadowRoot"
132057
131862
  },
132058
131863
  {
132059
131864
  "kind": "method",
132060
- "name": "isDisabledExternally",
131865
+ "name": "finalizeStyles",
132061
131866
  "privacy": "protected",
131867
+ "static": true,
132062
131868
  "return": {
132063
131869
  "type": {
132064
- "text": "boolean"
131870
+ "text": "CSSResultOrNative[]"
132065
131871
  }
132066
131872
  },
132067
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
132068
- "inheritedFrom": {
132069
- "name": "SbbDisabledMixin",
132070
- "module": "core/mixins/disabled-mixin.js"
132071
- }
132072
- },
132073
- {
132074
- "kind": "field",
132075
- "name": "styles",
132076
- "type": {
132077
- "text": "CSSResultGroup"
132078
- },
132079
- "privacy": "public",
132080
- "static": true,
132081
- "default": "[unsafeCSS(style)]",
131873
+ "parameters": [
131874
+ {
131875
+ "name": "_styles",
131876
+ "type": {
131877
+ "text": "CSSResultGroup"
131878
+ }
131879
+ }
131880
+ ],
131881
+ "description": "Collects `styles` from every class in the prototype chain (using `Object.hasOwn`)\nand merges them in top-down order. This means each class/mixin only needs to declare\nits **own** styles — there is no need to reference `super.styles`.\n\nLit's default behaviour already walks the chain, but fails for mixins where\n`super.styles` resolves to the wrong class. This override fixes that.",
132082
131882
  "inheritedFrom": {
132083
- "name": "SbbMenuActionCommonElementMixin",
132084
- "module": "menu/common/menu-action-common.js"
131883
+ "name": "SbbElement",
131884
+ "module": "core/base-elements/element.js"
132085
131885
  }
132086
131886
  },
132087
131887
  {
132088
131888
  "kind": "method",
132089
- "name": "renderTemplate",
131889
+ "name": "toggleState",
132090
131890
  "privacy": "protected",
132091
131891
  "return": {
132092
131892
  "type": {
132093
- "text": "TemplateResult"
131893
+ "text": "void"
132094
131894
  }
132095
131895
  },
132096
- "description": "Override this method to render the component template.",
131896
+ "parameters": [
131897
+ {
131898
+ "name": "value",
131899
+ "type": {
131900
+ "text": "string"
131901
+ }
131902
+ },
131903
+ {
131904
+ "name": "force",
131905
+ "optional": true,
131906
+ "type": {
131907
+ "text": "boolean"
131908
+ }
131909
+ }
131910
+ ],
132097
131911
  "inheritedFrom": {
132098
- "name": "SbbActionBaseElement",
132099
- "module": "core/base-elements/action-base-element.js"
131912
+ "name": "SbbElement",
131913
+ "module": "core/base-elements/element.js"
132100
131914
  }
132101
131915
  },
132102
131916
  {
132103
- "kind": "field",
132104
- "name": "elementDependencies",
132105
- "type": {
132106
- "text": "SbbElementType[]"
131917
+ "kind": "method",
131918
+ "name": "_slotchangeHandler",
131919
+ "privacy": "private",
131920
+ "return": {
131921
+ "type": {
131922
+ "text": "void"
131923
+ }
132107
131924
  },
132108
- "privacy": "public",
132109
- "static": true,
131925
+ "parameters": [
131926
+ {
131927
+ "name": "event",
131928
+ "type": {
131929
+ "text": "Event"
131930
+ }
131931
+ },
131932
+ {
131933
+ "name": "slot",
131934
+ "type": {
131935
+ "text": "HTMLSlotElement"
131936
+ }
131937
+ }
131938
+ ],
132110
131939
  "inheritedFrom": {
132111
131940
  "name": "SbbElement",
132112
131941
  "module": "core/base-elements/element.js"
132113
- },
132114
- "default": "[SbbIconElement]"
131942
+ }
132115
131943
  },
132116
131944
  {
132117
- "kind": "field",
132118
- "name": "iconName",
132119
- "type": {
132120
- "text": "string"
131945
+ "kind": "method",
131946
+ "name": "_handleSlotChangeForSlottedState",
131947
+ "privacy": "private",
131948
+ "return": {
131949
+ "type": {
131950
+ "text": "void"
131951
+ }
132121
131952
  },
132122
- "privacy": "public",
132123
- "default": "''",
132124
- "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.",
132125
- "attribute": "icon-name",
131953
+ "parameters": [
131954
+ {
131955
+ "name": "slot",
131956
+ "type": {
131957
+ "text": "HTMLSlotElement"
131958
+ }
131959
+ }
131960
+ ],
132126
131961
  "inheritedFrom": {
132127
- "name": "SbbIconNameMixin",
132128
- "module": "icon/icon-name-mixin.js"
131962
+ "name": "SbbElement",
131963
+ "module": "core/base-elements/element.js"
132129
131964
  }
132130
131965
  },
132131
131966
  {
132132
131967
  "kind": "method",
132133
- "name": "renderIconSlot",
132134
- "privacy": "protected",
131968
+ "name": "_updateSlottedState",
131969
+ "privacy": "private",
132135
131970
  "return": {
132136
131971
  "type": {
132137
- "text": "TemplateResult"
131972
+ "text": "void"
132138
131973
  }
132139
131974
  },
132140
131975
  "parameters": [
132141
131976
  {
132142
- "name": "classname",
132143
- "optional": true,
131977
+ "name": "slot",
132144
131978
  "type": {
132145
- "text": "string"
131979
+ "text": "HTMLSlotElement"
132146
131980
  }
132147
131981
  }
132148
131982
  ],
132149
131983
  "inheritedFrom": {
132150
- "name": "SbbIconNameMixin",
132151
- "module": "icon/icon-name-mixin.js"
131984
+ "name": "SbbElement",
131985
+ "module": "core/base-elements/element.js"
132152
131986
  }
132153
131987
  },
132154
131988
  {
132155
131989
  "kind": "method",
132156
- "name": "renderIconName",
132157
- "privacy": "protected",
131990
+ "name": "_observeTextNodesInSlot",
131991
+ "privacy": "private",
132158
131992
  "return": {
132159
131993
  "type": {
132160
- "text": "string"
131994
+ "text": "void"
132161
131995
  }
132162
131996
  },
131997
+ "parameters": [
131998
+ {
131999
+ "name": "slot",
132000
+ "type": {
132001
+ "text": "HTMLSlotElement"
132002
+ }
132003
+ }
132004
+ ],
132163
132005
  "inheritedFrom": {
132164
- "name": "SbbIconNameMixin",
132165
- "module": "icon/icon-name-mixin.js"
132006
+ "name": "SbbElement",
132007
+ "module": "core/base-elements/element.js"
132166
132008
  }
132167
132009
  },
132168
132010
  {
132169
132011
  "kind": "method",
132170
- "name": "_renderIconName",
132012
+ "name": "_hasSlottedContent",
132171
132013
  "privacy": "private",
132172
132014
  "return": {
132173
132015
  "type": {
132174
- "text": "string"
132016
+ "text": "boolean"
132017
+ }
132018
+ },
132019
+ "parameters": [
132020
+ {
132021
+ "name": "slot",
132022
+ "type": {
132023
+ "text": "HTMLSlotElement"
132024
+ }
132175
132025
  }
132026
+ ],
132027
+ "inheritedFrom": {
132028
+ "name": "SbbElement",
132029
+ "module": "core/base-elements/element.js"
132030
+ }
132031
+ }
132032
+ ],
132033
+ "mixins": [
132034
+ {
132035
+ "name": "SbbDisabledTabIndexActionMixin",
132036
+ "module": "core.js"
132037
+ },
132038
+ {
132039
+ "name": "SbbMenuActionCommonElementMixin",
132040
+ "module": "menu/common/menu-action-common.js"
132041
+ }
132042
+ ],
132043
+ "superclass": {
132044
+ "name": "SbbButtonBaseElement",
132045
+ "module": "core.js"
132046
+ },
132047
+ "tagName": "sbb-menu-button",
132048
+ "customElement": true,
132049
+ "attributes": [
132050
+ {
132051
+ "name": "disabled-interactive",
132052
+ "type": {
132053
+ "text": "boolean"
132176
132054
  },
132055
+ "default": "false",
132056
+ "description": "Whether the button should be aria-disabled but stay interactive.",
132057
+ "fieldName": "disabledInteractive",
132058
+ "inheritedFrom": {
132059
+ "name": "SbbDisabledInteractiveMixin",
132060
+ "module": "core/mixins/disabled-mixin.js"
132061
+ }
132062
+ },
132063
+ {
132064
+ "name": "disabled",
132065
+ "description": "Whether the component is disabled.",
132066
+ "default": "false",
132067
+ "type": {
132068
+ "text": "boolean"
132069
+ },
132070
+ "fieldName": "disabled",
132177
132071
  "inheritedFrom": {
132178
- "name": "SbbIconNameMixin",
132179
- "module": "icon/icon-name-mixin.js"
132072
+ "name": "SbbDisabledMixin",
132073
+ "module": "core/mixins/disabled-mixin.js"
132180
132074
  }
132181
132075
  },
132182
132076
  {
132183
- "kind": "field",
132184
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
132077
+ "name": "icon-name",
132185
132078
  "type": {
132186
- "text": "array"
132079
+ "text": "string"
132187
132080
  },
132188
- "privacy": "private",
132189
- "readonly": true,
132190
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
132081
+ "default": "''",
132082
+ "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.",
132083
+ "fieldName": "iconName",
132191
132084
  "inheritedFrom": {
132192
- "name": "SbbButtonBaseElement",
132193
- "module": "core/base-elements/button-base-element.js"
132085
+ "name": "SbbIconNameMixin",
132086
+ "module": "icon/icon-name-mixin.js"
132194
132087
  }
132195
132088
  },
132196
132089
  {
132197
- "kind": "field",
132198
132090
  "name": "value",
132199
132091
  "type": {
132200
132092
  "text": "string"
132201
132093
  },
132202
- "privacy": "public",
132094
+ "default": "''",
132095
+ "description": "Value of the form element.",
132096
+ "fieldName": "value",
132203
132097
  "inheritedFrom": {
132204
132098
  "name": "SbbButtonBaseElement",
132205
132099
  "module": "core/base-elements/button-base-element.js"
132206
- },
132207
- "default": "''",
132208
- "description": "Value of the form element.",
132209
- "attribute": "value"
132100
+ }
132210
132101
  },
132211
132102
  {
132212
- "kind": "field",
132213
132103
  "name": "type",
132214
- "privacy": "public",
132215
132104
  "description": "The type attribute to use for the button.",
132216
132105
  "default": "'button'",
132217
132106
  "type": {
132218
132107
  "text": "SbbButtonType"
132219
132108
  },
132220
- "attribute": "type",
132109
+ "fieldName": "type",
132221
132110
  "inheritedFrom": {
132222
132111
  "name": "SbbButtonBaseElement",
132223
132112
  "module": "core/base-elements/button-base-element.js"
132224
132113
  }
132225
132114
  },
132226
132115
  {
132227
- "kind": "field",
132228
132116
  "name": "form",
132117
+ "description": "The `<form>` element to associate the button with.",
132229
132118
  "type": {
132230
132119
  "text": "HTMLFormElement | null"
132231
132120
  },
132232
- "privacy": "public",
132233
- "description": "The `<form>` element to associate the button with.",
132121
+ "fieldName": "form",
132234
132122
  "inheritedFrom": {
132235
132123
  "name": "SbbButtonBaseElement",
132236
132124
  "module": "core/base-elements/button-base-element.js"
132237
- },
132238
- "attribute": "form"
132125
+ }
132239
132126
  },
132240
132127
  {
132241
- "kind": "field",
132242
- "name": "_formId",
132128
+ "name": "name",
132129
+ "description": "Name of the form element. Will be read from name attribute.",
132243
132130
  "type": {
132244
132131
  "text": "string"
132245
132132
  },
132246
- "privacy": "private",
132247
- "default": "''",
132133
+ "fieldName": "name",
132248
132134
  "inheritedFrom": {
132249
- "name": "SbbButtonBaseElement",
132250
- "module": "core/base-elements/button-base-element.js"
132135
+ "name": "SbbFormAssociatedMixin",
132136
+ "module": "core/mixins/form-associated-mixin.js"
132251
132137
  }
132252
- },
132138
+ }
132139
+ ]
132140
+ }
132141
+ ],
132142
+ "exports": [
132143
+ {
132144
+ "kind": "js",
132145
+ "name": "SbbMenuButtonElement",
132146
+ "declaration": {
132147
+ "name": "SbbMenuButtonElement",
132148
+ "module": "menu/menu-button/menu-button.component.js"
132149
+ }
132150
+ }
132151
+ ]
132152
+ },
132153
+ {
132154
+ "kind": "javascript-module",
132155
+ "path": "menu/menu/menu.component.js",
132156
+ "declarations": [
132157
+ {
132158
+ "kind": "class",
132159
+ "description": "It displays a contextual menu with one or more action element.",
132160
+ "name": "SbbMenuElement",
132161
+ "cssProperties": [
132253
132162
  {
132254
- "kind": "field",
132255
- "name": "_handleButtonClick",
132256
- "privacy": "private",
132257
- "inheritedFrom": {
132258
- "name": "SbbButtonBaseElement",
132259
- "module": "core/base-elements/button-base-element.js"
132260
- }
132261
- },
132163
+ "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`.",
132164
+ "name": "--sbb-menu-z-index",
132165
+ "default": "var(--sbb-overlay-default-z-index)"
132166
+ }
132167
+ ],
132168
+ "slots": [
132262
132169
  {
132263
- "kind": "method",
132264
- "name": "_requestSubmit",
132265
- "privacy": "private",
132266
- "return": {
132267
- "type": {
132268
- "text": "void"
132269
- }
132170
+ "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
132171
+ "name": ""
132172
+ }
132173
+ ],
132174
+ "members": [
132175
+ {
132176
+ "kind": "field",
132177
+ "name": "elementName",
132178
+ "type": {
132179
+ "text": "string"
132270
132180
  },
132271
- "parameters": [
132272
- {
132273
- "name": "form",
132274
- "type": {
132275
- "text": "HTMLFormElement"
132276
- }
132277
- }
132278
- ],
132181
+ "privacy": "public",
132182
+ "static": true,
132183
+ "readonly": true,
132279
132184
  "inheritedFrom": {
132280
- "name": "SbbButtonBaseElement",
132281
- "module": "core/base-elements/button-base-element.js"
132282
- }
132185
+ "name": "SbbElement",
132186
+ "module": "core/base-elements/element.js"
132187
+ },
132188
+ "default": "'sbb-menu'"
132283
132189
  },
132284
132190
  {
132285
132191
  "kind": "field",
132286
- "name": "_formKeyDown",
132287
- "privacy": "private",
132192
+ "name": "elementDependencies",
132193
+ "type": {
132194
+ "text": "SbbElementType[]"
132195
+ },
132196
+ "privacy": "public",
132197
+ "static": true,
132288
132198
  "inheritedFrom": {
132289
- "name": "SbbButtonBaseElement",
132290
- "module": "core/base-elements/button-base-element.js"
132291
- }
132199
+ "name": "SbbElement",
132200
+ "module": "core/base-elements/element.js"
132201
+ },
132202
+ "default": "[ SbbDividerElement, SbbMenuButtonElement, ]"
132292
132203
  },
132293
132204
  {
132294
132205
  "kind": "field",
132295
- "name": "formAssociated",
132206
+ "name": "role",
132296
132207
  "type": {
132297
- "text": "boolean"
132208
+ "text": "string"
132298
132209
  },
132299
132210
  "privacy": "public",
132300
132211
  "static": true,
132301
- "default": "true",
132302
132212
  "inheritedFrom": {
132303
- "name": "SbbFormAssociatedMixin",
132304
- "module": "core/mixins/form-associated-mixin.js"
132305
- }
132213
+ "name": "SbbElement",
132214
+ "module": "core/base-elements/element.js"
132215
+ },
132216
+ "readonly": true,
132217
+ "default": "'menu'"
132306
132218
  },
132307
132219
  {
132308
132220
  "kind": "field",
132309
- "name": "name",
132221
+ "name": "trigger",
132222
+ "type": {
132223
+ "text": "HTMLElement | null"
132224
+ },
132310
132225
  "privacy": "public",
132311
- "description": "Name of the form element. Will be read from name attribute.",
132226
+ "default": "null",
132227
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
132228
+ "attribute": "trigger"
132229
+ },
132230
+ {
132231
+ "kind": "field",
132232
+ "name": "_menu",
132312
132233
  "type": {
132313
- "text": "string"
132234
+ "text": "HTMLDivElement"
132314
132235
  },
132315
- "attribute": "name",
132316
- "inheritedFrom": {
132317
- "name": "SbbFormAssociatedMixin",
132318
- "module": "core/mixins/form-associated-mixin.js"
132319
- }
132236
+ "privacy": "private"
132320
132237
  },
132321
132238
  {
132322
132239
  "kind": "field",
132323
- "name": "validity",
132240
+ "name": "_triggerElement",
132324
132241
  "type": {
132325
- "text": "ValidityState"
132242
+ "text": "HTMLElement | null"
132326
132243
  },
132327
- "privacy": "public",
132328
- "description": "Returns the ValidityState object for this element.",
132329
- "readonly": true,
132330
- "inheritedFrom": {
132331
- "name": "SbbFormAssociatedMixin",
132332
- "module": "core/mixins/form-associated-mixin.js"
132333
- }
132244
+ "privacy": "private",
132245
+ "default": "null"
132334
132246
  },
132335
132247
  {
132336
132248
  "kind": "field",
132337
- "name": "validationMessage",
132249
+ "name": "_triggerAbortController",
132338
132250
  "type": {
132339
- "text": "string"
132251
+ "text": "AbortController"
132340
132252
  },
132341
- "privacy": "public",
132342
- "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.",
132343
- "readonly": true,
132344
- "inheritedFrom": {
132345
- "name": "SbbFormAssociatedMixin",
132346
- "module": "core/mixins/form-associated-mixin.js"
132347
- }
132253
+ "privacy": "private"
132348
132254
  },
132349
132255
  {
132350
132256
  "kind": "field",
132351
- "name": "willValidate",
132257
+ "name": "_isPointerDownEventOnMenu",
132352
132258
  "type": {
132353
132259
  "text": "boolean"
132354
132260
  },
132355
- "privacy": "public",
132356
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
132357
- "readonly": true,
132358
- "inheritedFrom": {
132359
- "name": "SbbFormAssociatedMixin",
132360
- "module": "core/mixins/form-associated-mixin.js"
132361
- }
132261
+ "privacy": "private",
132262
+ "default": "false"
132263
+ },
132264
+ {
132265
+ "kind": "field",
132266
+ "name": "_windowEventsController",
132267
+ "type": {
132268
+ "text": "AbortController"
132269
+ },
132270
+ "privacy": "private"
132271
+ },
132272
+ {
132273
+ "kind": "field",
132274
+ "name": "_escapableOverlayController",
132275
+ "privacy": "private",
132276
+ "default": "new SbbEscapableOverlayController(this)"
132277
+ },
132278
+ {
132279
+ "kind": "field",
132280
+ "name": "_focusTrapController",
132281
+ "privacy": "private",
132282
+ "default": "new SbbFocusTrapController(this)"
132283
+ },
132284
+ {
132285
+ "kind": "field",
132286
+ "name": "_scrollHandler",
132287
+ "privacy": "private",
132288
+ "default": "new SbbScrollHandler()"
132289
+ },
132290
+ {
132291
+ "kind": "field",
132292
+ "name": "_inertController",
132293
+ "privacy": "private",
132294
+ "default": "new SbbInertController(this)"
132295
+ },
132296
+ {
132297
+ "kind": "field",
132298
+ "name": "_mobileBreakpoint",
132299
+ "privacy": "private",
132300
+ "default": "SbbMediaQueryBreakpointSmallAndBelow"
132301
+ },
132302
+ {
132303
+ "kind": "field",
132304
+ "name": "_mediaMatcher",
132305
+ "privacy": "private",
132306
+ "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
132307
+ },
132308
+ {
132309
+ "kind": "field",
132310
+ "name": "_darkModeController",
132311
+ "privacy": "private",
132312
+ "default": "new SbbDarkModeController(this, () => this._syncNegative())"
132362
132313
  },
132363
132314
  {
132364
132315
  "kind": "field",
132365
- "name": "_validityStates",
132316
+ "name": "_language",
132366
132317
  "privacy": "private",
132367
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
132368
- "inheritedFrom": {
132369
- "name": "SbbFormAssociatedMixin",
132370
- "module": "core/mixins/form-associated-mixin.js"
132371
- }
132318
+ "default": "new SbbLanguageController(this)"
132372
132319
  },
132373
132320
  {
132374
132321
  "kind": "field",
132375
- "name": "formDisabled",
132322
+ "name": "_nestedMenu",
132376
132323
  "type": {
132377
- "text": "boolean"
132324
+ "text": "SbbMenuElement | null"
132378
132325
  },
132379
- "privacy": "protected",
132380
- "default": "false",
132381
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
132326
+ "privacy": "private",
132327
+ "default": "null"
132328
+ },
132329
+ {
132330
+ "kind": "method",
132331
+ "name": "escapeStrategy",
132332
+ "privacy": "public",
132333
+ "return": {
132334
+ "type": {
132335
+ "text": "void"
132336
+ }
132337
+ },
132338
+ "description": "The method which is called on escape key press. Defaults to calling close()",
132382
132339
  "inheritedFrom": {
132383
- "name": "SbbFormAssociatedMixin",
132384
- "module": "core/mixins/form-associated-mixin.js"
132340
+ "name": "SbbOpenCloseBaseElement",
132341
+ "module": "core/base-elements/open-close-base-element.js"
132385
132342
  }
132386
132343
  },
132387
132344
  {
132388
132345
  "kind": "method",
132389
- "name": "checkValidity",
132346
+ "name": "open",
132390
132347
  "privacy": "public",
132391
132348
  "return": {
132392
132349
  "type": {
132393
- "text": "boolean"
132350
+ "text": "void"
132394
132351
  }
132395
132352
  },
132396
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
132353
+ "description": "Opens the menu on trigger click.",
132397
132354
  "inheritedFrom": {
132398
- "name": "SbbFormAssociatedMixin",
132399
- "module": "core/mixins/form-associated-mixin.js"
132355
+ "name": "SbbOpenCloseBaseElement",
132356
+ "module": "core/base-elements/open-close-base-element.js"
132400
132357
  }
132401
132358
  },
132402
132359
  {
132403
132360
  "kind": "method",
132404
- "name": "reportValidity",
132361
+ "name": "close",
132405
132362
  "privacy": "public",
132406
132363
  "return": {
132407
132364
  "type": {
132408
- "text": "boolean"
132365
+ "text": "void"
132409
132366
  }
132410
132367
  },
132411
- "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.",
132368
+ "description": "Closes the menu and all its nested menus.",
132412
132369
  "inheritedFrom": {
132413
- "name": "SbbFormAssociatedMixin",
132414
- "module": "core/mixins/form-associated-mixin.js"
132370
+ "name": "SbbOpenCloseBaseElement",
132371
+ "module": "core/base-elements/open-close-base-element.js"
132415
132372
  }
132416
132373
  },
132417
132374
  {
132418
132375
  "kind": "method",
132419
- "name": "setCustomValidity",
132376
+ "name": "closeAll",
132420
132377
  "privacy": "public",
132421
132378
  "return": {
132422
132379
  "type": {
132423
132380
  "text": "void"
132424
132381
  }
132425
132382
  },
132383
+ "description": "Closes the menu and all related menus (nested and parent menus)."
132384
+ },
132385
+ {
132386
+ "kind": "method",
132387
+ "name": "_close",
132388
+ "privacy": "private",
132389
+ "return": {
132390
+ "type": {
132391
+ "text": "void"
132392
+ }
132393
+ },
132426
132394
  "parameters": [
132427
132395
  {
132428
- "name": "message",
132429
- "type": {
132430
- "text": "string"
132431
- }
132396
+ "name": "closeAll",
132397
+ "default": "false",
132398
+ "description": "If true, it ensures animations are correct by toggling some states when closing all related menus at once.",
132399
+ "optional": true
132432
132400
  }
132433
- ],
132434
- "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.",
132435
- "inheritedFrom": {
132436
- "name": "SbbFormAssociatedMixin",
132437
- "module": "core/mixins/form-associated-mixin.js"
132438
- }
132401
+ ]
132439
132402
  },
132440
132403
  {
132441
132404
  "kind": "method",
132442
- "name": "_hasDisabledAncestor",
132405
+ "name": "_isZeroAnimationDuration",
132443
132406
  "privacy": "private",
132444
132407
  "return": {
132445
132408
  "type": {
132446
132409
  "text": "boolean"
132447
132410
  }
132448
- },
132449
- "inheritedFrom": {
132450
- "name": "SbbFormAssociatedMixin",
132451
- "module": "core/mixins/form-associated-mixin.js"
132452
132411
  }
132453
132412
  },
132454
132413
  {
132455
132414
  "kind": "method",
132456
- "name": "updateFormValue",
132457
- "privacy": "protected",
132415
+ "name": "_handleOpening",
132416
+ "privacy": "private",
132458
132417
  "return": {
132459
132418
  "type": {
132460
132419
  "text": "void"
132461
132420
  }
132462
- },
132463
- "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",
132464
- "inheritedFrom": {
132465
- "name": "SbbFormAssociatedMixin",
132466
- "module": "core/mixins/form-associated-mixin.js"
132467
132421
  }
132468
132422
  },
132469
132423
  {
132470
132424
  "kind": "method",
132471
- "name": "formState",
132472
- "privacy": "protected",
132425
+ "name": "_handleClosing",
132426
+ "privacy": "private",
132473
132427
  "return": {
132474
132428
  "type": {
132475
- "text": "FormRestoreState"
132429
+ "text": "void"
132476
132430
  }
132477
- },
132478
- "inheritedFrom": {
132479
- "name": "SbbFormAssociatedMixin",
132480
- "module": "core/mixins/form-associated-mixin.js"
132481
132431
  }
132482
132432
  },
132483
132433
  {
132484
132434
  "kind": "method",
132485
- "name": "setValidityFlag",
132486
- "privacy": "protected",
132435
+ "name": "_handleKeyDown",
132436
+ "privacy": "private",
132487
132437
  "return": {
132488
132438
  "type": {
132489
132439
  "text": "void"
@@ -132491,35 +132441,37 @@
132491
132441
  },
132492
132442
  "parameters": [
132493
132443
  {
132494
- "name": "flag",
132495
- "type": {
132496
- "text": "T"
132497
- }
132498
- },
132499
- {
132500
- "name": "message",
132501
- "type": {
132502
- "text": "string"
132503
- }
132504
- },
132505
- {
132506
- "name": "flagValue",
132507
- "optional": true,
132444
+ "name": "evt",
132508
132445
  "type": {
132509
- "text": "ValidityStateFlags[T]"
132446
+ "text": "KeyboardEvent"
132510
132447
  }
132511
132448
  }
132512
- ],
132513
- "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).",
132514
- "inheritedFrom": {
132515
- "name": "SbbFormAssociatedMixin",
132516
- "module": "core/mixins/form-associated-mixin.js"
132449
+ ]
132450
+ },
132451
+ {
132452
+ "kind": "method",
132453
+ "name": "_configureTrigger",
132454
+ "privacy": "private",
132455
+ "return": {
132456
+ "type": {
132457
+ "text": "void"
132458
+ }
132517
132459
  }
132518
132460
  },
132519
132461
  {
132520
132462
  "kind": "method",
132521
- "name": "removeValidityFlag",
132522
- "privacy": "protected",
132463
+ "name": "_attachWindowEvents",
132464
+ "privacy": "private",
132465
+ "return": {
132466
+ "type": {
132467
+ "text": "void"
132468
+ }
132469
+ }
132470
+ },
132471
+ {
132472
+ "kind": "method",
132473
+ "name": "_interactiveElementClick",
132474
+ "privacy": "private",
132523
132475
  "return": {
132524
132476
  "type": {
132525
132477
  "text": "void"
@@ -132527,158 +132479,250 @@
132527
132479
  },
132528
132480
  "parameters": [
132529
132481
  {
132530
- "name": "flag",
132482
+ "name": "event",
132531
132483
  "type": {
132532
- "text": "T"
132484
+ "text": "Event"
132533
132485
  }
132534
132486
  }
132535
- ],
132536
- "description": "Removes the validity state flag entry and updates validity state.",
132537
- "inheritedFrom": {
132538
- "name": "SbbFormAssociatedMixin",
132539
- "module": "core/mixins/form-associated-mixin.js"
132540
- }
132487
+ ]
132488
+ },
132489
+ {
132490
+ "kind": "field",
132491
+ "name": "_pointerDownListener",
132492
+ "privacy": "private"
132493
+ },
132494
+ {
132495
+ "kind": "field",
132496
+ "name": "_closeOnBackdropClick",
132497
+ "privacy": "private"
132541
132498
  },
132542
132499
  {
132543
132500
  "kind": "method",
132544
- "name": "validate",
132545
- "privacy": "protected",
132501
+ "name": "_nestedMenus",
132502
+ "privacy": "private",
132546
132503
  "return": {
132547
132504
  "type": {
132548
- "text": "void"
132505
+ "text": "SbbMenuElement[]"
132549
132506
  }
132550
132507
  },
132551
- "description": "To be called whenever the current element needs to be validated.",
132552
- "inheritedFrom": {
132553
- "name": "SbbFormAssociatedMixin",
132554
- "module": "core/mixins/form-associated-mixin.js"
132508
+ "description": "Converts the linked list into an array of SbbMenuElement."
132509
+ },
132510
+ {
132511
+ "kind": "method",
132512
+ "name": "_parentMenu",
132513
+ "privacy": "private",
132514
+ "return": {
132515
+ "type": {
132516
+ "text": "SbbMenuElement | null"
132517
+ }
132555
132518
  }
132556
132519
  },
132557
132520
  {
132558
132521
  "kind": "method",
132559
- "name": "shouldValidate",
132560
- "privacy": "protected",
132522
+ "name": "_mainMenu",
132523
+ "privacy": "private",
132524
+ "return": {
132525
+ "type": {
132526
+ "text": "SbbMenuElement"
132527
+ }
132528
+ },
132529
+ "description": "The outermost menu."
132530
+ },
132531
+ {
132532
+ "kind": "method",
132533
+ "name": "_isNested",
132534
+ "privacy": "private",
132561
132535
  "return": {
132562
132536
  "type": {
132563
132537
  "text": "boolean"
132564
132538
  }
132539
+ }
132540
+ },
132541
+ {
132542
+ "kind": "method",
132543
+ "name": "_updateNestedInert",
132544
+ "privacy": "private",
132545
+ "return": {
132546
+ "type": {
132547
+ "text": "void"
132548
+ }
132549
+ }
132550
+ },
132551
+ {
132552
+ "kind": "method",
132553
+ "name": "_handleMouseOver",
132554
+ "privacy": "private",
132555
+ "return": {
132556
+ "type": {
132557
+ "text": "void"
132558
+ }
132565
132559
  },
132566
132560
  "parameters": [
132567
132561
  {
132568
- "name": "name",
132562
+ "name": "event",
132563
+ "type": {
132564
+ "text": "MouseEvent"
132565
+ }
132566
+ }
132567
+ ]
132568
+ },
132569
+ {
132570
+ "kind": "method",
132571
+ "name": "_onMenuAnimationEnd",
132572
+ "privacy": "private",
132573
+ "return": {
132574
+ "type": {
132575
+ "text": "void"
132576
+ }
132577
+ },
132578
+ "parameters": [
132579
+ {
132580
+ "name": "event",
132569
132581
  "type": {
132570
- "text": "PropertyKey | undefined"
132582
+ "text": "AnimationEvent"
132571
132583
  }
132572
132584
  }
132573
- ],
132574
- "description": "Whether validation should be run on a property change with the given name.",
132575
- "inheritedFrom": {
132576
- "name": "SbbFormAssociatedMixin",
132577
- "module": "core/mixins/form-associated-mixin.js"
132585
+ ]
132586
+ },
132587
+ {
132588
+ "kind": "method",
132589
+ "name": "_setMenuPosition",
132590
+ "privacy": "private",
132591
+ "return": {
132592
+ "type": {
132593
+ "text": "void"
132594
+ }
132578
132595
  }
132579
132596
  },
132580
132597
  {
132581
132598
  "kind": "method",
132582
- "name": "_setInternalValidity",
132599
+ "name": "_syncNegative",
132583
132600
  "privacy": "private",
132584
132601
  "return": {
132585
132602
  "type": {
132586
132603
  "text": "void"
132587
132604
  }
132588
- },
132589
- "inheritedFrom": {
132590
- "name": "SbbFormAssociatedMixin",
132591
- "module": "core/mixins/form-associated-mixin.js"
132592
132605
  }
132593
132606
  },
132594
132607
  {
132595
- "kind": "field",
132596
- "name": "_preventScrollOnSpaceKeydown",
132608
+ "kind": "method",
132609
+ "name": "_isMobile",
132597
132610
  "privacy": "private",
132598
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
132599
- "parameters": [
132600
- {
132601
- "description": "The origin event.",
132602
- "name": "event"
132611
+ "return": {
132612
+ "type": {
132613
+ "text": "boolean"
132603
132614
  }
132604
- ],
132605
- "inheritedFrom": {
132606
- "name": "SbbButtonLikeBaseElement",
132607
- "module": "core/base-elements/button-base-element.js"
132608
132615
  }
132609
132616
  },
132610
132617
  {
132611
132618
  "kind": "field",
132612
- "name": "_removeActiveMarker",
132613
- "privacy": "private",
132619
+ "name": "events",
132620
+ "privacy": "public",
132621
+ "static": true,
132622
+ "readonly": true,
132623
+ "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
132624
+ "type": {
132625
+ "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
132626
+ },
132614
132627
  "inheritedFrom": {
132615
- "name": "SbbButtonLikeBaseElement",
132616
- "module": "core/base-elements/button-base-element.js"
132628
+ "name": "SbbOpenCloseBaseElement",
132629
+ "module": "core/base-elements/open-close-base-element.js"
132617
132630
  }
132618
132631
  },
132619
132632
  {
132620
132633
  "kind": "field",
132621
- "name": "_dispatchClickEventOnSpaceKeyup",
132622
- "privacy": "private",
132623
- "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.",
132624
- "parameters": [
132625
- {
132626
- "description": "The origin event.",
132627
- "name": "event"
132628
- }
132629
- ],
132634
+ "name": "state",
132635
+ "privacy": "protected",
132636
+ "description": "The state of the component.",
132637
+ "type": {
132638
+ "text": "SbbOpenedClosedState"
132639
+ },
132640
+ "default": "'closed'",
132630
132641
  "inheritedFrom": {
132631
- "name": "SbbButtonLikeBaseElement",
132632
- "module": "core/base-elements/button-base-element.js"
132642
+ "name": "SbbOpenCloseBaseElement",
132643
+ "module": "core/base-elements/open-close-base-element.js"
132633
132644
  }
132634
132645
  },
132635
132646
  {
132636
132647
  "kind": "field",
132637
- "name": "_dispatchClickEvent",
132648
+ "name": "_state",
132649
+ "type": {
132650
+ "text": "SbbOpenedClosedState"
132651
+ },
132638
132652
  "privacy": "private",
132639
132653
  "inheritedFrom": {
132640
- "name": "SbbButtonLikeBaseElement",
132641
- "module": "core/base-elements/button-base-element.js"
132654
+ "name": "SbbOpenCloseBaseElement",
132655
+ "module": "core/base-elements/open-close-base-element.js"
132642
132656
  }
132643
132657
  },
132644
132658
  {
132645
132659
  "kind": "field",
132646
- "name": "maybeDisabled",
132660
+ "name": "isOpen",
132647
132661
  "type": {
132648
- "text": "boolean | undefined"
132662
+ "text": "boolean"
132649
132663
  },
132650
- "privacy": "protected",
132664
+ "privacy": "public",
132665
+ "description": "Whether the element is open.",
132651
132666
  "readonly": true,
132652
132667
  "inheritedFrom": {
132653
- "name": "SbbActionBaseElement",
132654
- "module": "core/base-elements/action-base-element.js"
132668
+ "name": "SbbOpenCloseBaseElement",
132669
+ "module": "core/base-elements/open-close-base-element.js"
132655
132670
  }
132656
132671
  },
132657
132672
  {
132658
- "kind": "field",
132659
- "name": "maybeDisabledInteractive",
132660
- "type": {
132661
- "text": "boolean | undefined"
132673
+ "kind": "method",
132674
+ "name": "dispatchBeforeOpenEvent",
132675
+ "privacy": "protected",
132676
+ "return": {
132677
+ "type": {
132678
+ "text": "boolean"
132679
+ }
132662
132680
  },
132681
+ "inheritedFrom": {
132682
+ "name": "SbbOpenCloseBaseElement",
132683
+ "module": "core/base-elements/open-close-base-element.js"
132684
+ }
132685
+ },
132686
+ {
132687
+ "kind": "method",
132688
+ "name": "dispatchOpenEvent",
132663
132689
  "privacy": "protected",
132664
- "readonly": true,
132690
+ "return": {
132691
+ "type": {
132692
+ "text": "boolean"
132693
+ }
132694
+ },
132665
132695
  "inheritedFrom": {
132666
- "name": "SbbActionBaseElement",
132667
- "module": "core/base-elements/action-base-element.js"
132696
+ "name": "SbbOpenCloseBaseElement",
132697
+ "module": "core/base-elements/open-close-base-element.js"
132668
132698
  }
132669
132699
  },
132670
132700
  {
132671
132701
  "kind": "method",
132672
- "name": "setupBaseEventHandlers",
132702
+ "name": "dispatchBeforeCloseEvent",
132673
132703
  "privacy": "protected",
132674
132704
  "return": {
132675
132705
  "type": {
132676
- "text": "void"
132706
+ "text": "boolean"
132677
132707
  }
132678
132708
  },
132679
132709
  "inheritedFrom": {
132680
- "name": "SbbActionBaseElement",
132681
- "module": "core/base-elements/action-base-element.js"
132710
+ "name": "SbbOpenCloseBaseElement",
132711
+ "module": "core/base-elements/open-close-base-element.js"
132712
+ }
132713
+ },
132714
+ {
132715
+ "kind": "method",
132716
+ "name": "dispatchCloseEvent",
132717
+ "privacy": "protected",
132718
+ "return": {
132719
+ "type": {
132720
+ "text": "boolean"
132721
+ }
132722
+ },
132723
+ "inheritedFrom": {
132724
+ "name": "SbbOpenCloseBaseElement",
132725
+ "module": "core/base-elements/open-close-base-element.js"
132682
132726
  }
132683
132727
  },
132684
132728
  {
@@ -132939,110 +132983,66 @@
132939
132983
  }
132940
132984
  }
132941
132985
  ],
132942
- "mixins": [
132943
- {
132944
- "name": "SbbDisabledTabIndexActionMixin",
132945
- "module": "core.js"
132946
- },
132986
+ "attributes": [
132947
132987
  {
132948
- "name": "SbbMenuActionCommonElementMixin",
132949
- "module": "menu/common/menu-action-common.js"
132988
+ "name": "trigger",
132989
+ "type": {
132990
+ "text": "HTMLElement | null"
132991
+ },
132992
+ "default": "null",
132993
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
132994
+ "fieldName": "trigger"
132950
132995
  }
132951
132996
  ],
132952
132997
  "superclass": {
132953
- "name": "SbbButtonBaseElement",
132998
+ "name": "SbbOpenCloseBaseElement",
132954
132999
  "module": "core.js"
132955
133000
  },
132956
- "tagName": "sbb-menu-button",
133001
+ "tagName": "sbb-menu",
132957
133002
  "customElement": true,
132958
- "attributes": [
132959
- {
132960
- "name": "disabled-interactive",
132961
- "type": {
132962
- "text": "boolean"
132963
- },
132964
- "default": "false",
132965
- "description": "Whether the button should be aria-disabled but stay interactive.",
132966
- "fieldName": "disabledInteractive",
132967
- "inheritedFrom": {
132968
- "name": "SbbDisabledInteractiveMixin",
132969
- "module": "core/mixins/disabled-mixin.js"
132970
- }
132971
- },
132972
- {
132973
- "name": "disabled",
132974
- "description": "Whether the component is disabled.",
132975
- "default": "false",
132976
- "type": {
132977
- "text": "boolean"
132978
- },
132979
- "fieldName": "disabled",
132980
- "inheritedFrom": {
132981
- "name": "SbbDisabledMixin",
132982
- "module": "core/mixins/disabled-mixin.js"
132983
- }
132984
- },
132985
- {
132986
- "name": "icon-name",
132987
- "type": {
132988
- "text": "string"
132989
- },
132990
- "default": "''",
132991
- "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.",
132992
- "fieldName": "iconName",
132993
- "inheritedFrom": {
132994
- "name": "SbbIconNameMixin",
132995
- "module": "icon/icon-name-mixin.js"
132996
- }
132997
- },
133003
+ "events": [
132998
133004
  {
132999
- "name": "value",
133005
+ "name": "beforeopen",
133000
133006
  "type": {
133001
- "text": "string"
133007
+ "text": "Event"
133002
133008
  },
133003
- "default": "''",
133004
- "description": "Value of the form element.",
133005
- "fieldName": "value",
133009
+ "description": "Emits whenever the component starts the opening transition. Can be canceled.",
133006
133010
  "inheritedFrom": {
133007
- "name": "SbbButtonBaseElement",
133008
- "module": "core/base-elements/button-base-element.js"
133011
+ "name": "SbbOpenCloseBaseElement",
133012
+ "module": "core/base-elements/open-close-base-element.js"
133009
133013
  }
133010
133014
  },
133011
133015
  {
133012
- "name": "type",
133013
- "description": "The type attribute to use for the button.",
133014
- "default": "'button'",
133016
+ "name": "open",
133015
133017
  "type": {
133016
- "text": "SbbButtonType"
133018
+ "text": "Event"
133017
133019
  },
133018
- "fieldName": "type",
133020
+ "description": "Emits whenever the component is opened.",
133019
133021
  "inheritedFrom": {
133020
- "name": "SbbButtonBaseElement",
133021
- "module": "core/base-elements/button-base-element.js"
133022
+ "name": "SbbOpenCloseBaseElement",
133023
+ "module": "core/base-elements/open-close-base-element.js"
133022
133024
  }
133023
133025
  },
133024
133026
  {
133025
- "name": "form",
133026
- "description": "The `<form>` element to associate the button with.",
133027
+ "name": "beforeclose",
133027
133028
  "type": {
133028
- "text": "HTMLFormElement | null"
133029
+ "text": "Event"
133029
133030
  },
133030
- "fieldName": "form",
133031
+ "description": "Emits whenever the component begins the closing transition. Can be canceled.",
133031
133032
  "inheritedFrom": {
133032
- "name": "SbbButtonBaseElement",
133033
- "module": "core/base-elements/button-base-element.js"
133033
+ "name": "SbbOpenCloseBaseElement",
133034
+ "module": "core/base-elements/open-close-base-element.js"
133034
133035
  }
133035
133036
  },
133036
133037
  {
133037
- "name": "name",
133038
- "description": "Name of the form element. Will be read from name attribute.",
133038
+ "name": "close",
133039
133039
  "type": {
133040
- "text": "string"
133040
+ "text": "Event"
133041
133041
  },
133042
- "fieldName": "name",
133042
+ "description": "Emits whenever the component is closed.",
133043
133043
  "inheritedFrom": {
133044
- "name": "SbbFormAssociatedMixin",
133045
- "module": "core/mixins/form-associated-mixin.js"
133044
+ "name": "SbbOpenCloseBaseElement",
133045
+ "module": "core/base-elements/open-close-base-element.js"
133046
133046
  }
133047
133047
  }
133048
133048
  ]
@@ -133051,10 +133051,10 @@
133051
133051
  "exports": [
133052
133052
  {
133053
133053
  "kind": "js",
133054
- "name": "SbbMenuButtonElement",
133054
+ "name": "SbbMenuElement",
133055
133055
  "declaration": {
133056
- "name": "SbbMenuButtonElement",
133057
- "module": "menu/menu-button/menu-button.component.js"
133056
+ "name": "SbbMenuElement",
133057
+ "module": "menu/menu/menu.component.js"
133058
133058
  }
133059
133059
  }
133060
133060
  ]