@sbb-esta/lyne-elements-dev 4.0.0-dev.1775551720 → 4.0.0-dev.1775566252

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/custom-elements.json +939 -939
  2. package/package.json +2 -2
@@ -106270,23 +106270,27 @@
106270
106270
  },
106271
106271
  {
106272
106272
  "kind": "javascript-module",
106273
- "path": "menu/menu/menu.component.js",
106273
+ "path": "menu/menu-button/menu-button.component.js",
106274
106274
  "declarations": [
106275
106275
  {
106276
106276
  "kind": "class",
106277
- "description": "It displays a contextual menu with one or more action element.",
106278
- "name": "SbbMenuElement",
106277
+ "description": "It displays a button element that can be used in the `sbb-menu` component.",
106278
+ "name": "SbbMenuButtonElement",
106279
106279
  "cssProperties": [
106280
106280
  {
106281
- "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`.",
106282
- "name": "--sbb-menu-z-index",
106283
- "default": "var(--sbb-overlay-default-z-index)"
106281
+ "description": "Can be used to modify horizontal padding.",
106282
+ "name": "--sbb-menu-action-outer-horizontal-padding",
106283
+ "default": "var(--sbb-spacing-fixed-3x)"
106284
106284
  }
106285
106285
  ],
106286
106286
  "slots": [
106287
106287
  {
106288
- "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
106288
+ "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
106289
106289
  "name": ""
106290
+ },
106291
+ {
106292
+ "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
106293
+ "name": "icon"
106290
106294
  }
106291
106295
  ],
106292
106296
  "members": [
@@ -106303,274 +106307,261 @@
106303
106307
  "name": "SbbElement",
106304
106308
  "module": "core/base-elements/element.js"
106305
106309
  },
106306
- "default": "'sbb-menu'"
106310
+ "default": "'sbb-menu-button'"
106307
106311
  },
106308
106312
  {
106309
106313
  "kind": "field",
106310
106314
  "name": "role",
106311
106315
  "type": {
106312
- "text": "string"
106316
+ "text": "ElementInternals['role']"
106313
106317
  },
106314
106318
  "privacy": "public",
106315
106319
  "static": true,
106316
106320
  "readonly": true,
106317
- "default": "'menu'"
106321
+ "default": "'menuitem'",
106322
+ "inheritedFrom": {
106323
+ "name": "SbbButtonLikeBaseElement",
106324
+ "module": "core/base-elements/button-base-element.js"
106325
+ }
106318
106326
  },
106319
106327
  {
106320
106328
  "kind": "field",
106321
- "name": "trigger",
106329
+ "name": "disabledInteractive",
106322
106330
  "type": {
106323
- "text": "HTMLElement | null"
106331
+ "text": "boolean"
106324
106332
  },
106325
106333
  "privacy": "public",
106326
- "default": "null",
106327
- "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
106328
- "attribute": "trigger"
106329
- },
106330
- {
106331
- "kind": "field",
106332
- "name": "_menu",
106333
- "type": {
106334
- "text": "HTMLDivElement"
106335
- },
106336
- "privacy": "private"
106337
- },
106338
- {
106339
- "kind": "field",
106340
- "name": "_triggerElement",
106341
- "type": {
106342
- "text": "HTMLElement | null"
106343
- },
106344
- "privacy": "private",
106345
- "default": "null"
106346
- },
106347
- {
106348
- "kind": "field",
106349
- "name": "_triggerAbortController",
106350
- "type": {
106351
- "text": "AbortController"
106352
- },
106353
- "privacy": "private"
106334
+ "default": "false",
106335
+ "description": "Whether the button should be aria-disabled but stay interactive.",
106336
+ "attribute": "disabled-interactive",
106337
+ "reflects": true,
106338
+ "inheritedFrom": {
106339
+ "name": "SbbDisabledInteractiveMixin",
106340
+ "module": "core/mixins/disabled-mixin.js"
106341
+ }
106354
106342
  },
106355
106343
  {
106356
106344
  "kind": "field",
106357
- "name": "_isPointerDownEventOnMenu",
106345
+ "name": "disabled",
106346
+ "privacy": "public",
106347
+ "description": "Whether the component is disabled.",
106348
+ "default": "false",
106358
106349
  "type": {
106359
106350
  "text": "boolean"
106360
106351
  },
106361
- "privacy": "private",
106362
- "default": "false"
106363
- },
106364
- {
106365
- "kind": "field",
106366
- "name": "_windowEventsController",
106367
- "type": {
106368
- "text": "AbortController"
106369
- },
106370
- "privacy": "private"
106371
- },
106372
- {
106373
- "kind": "field",
106374
- "name": "_escapableOverlayController",
106375
- "privacy": "private",
106376
- "default": "new SbbEscapableOverlayController(this)"
106377
- },
106378
- {
106379
- "kind": "field",
106380
- "name": "_focusTrapController",
106381
- "privacy": "private",
106382
- "default": "new SbbFocusTrapController(this)"
106383
- },
106384
- {
106385
- "kind": "field",
106386
- "name": "_scrollHandler",
106387
- "privacy": "private",
106388
- "default": "new SbbScrollHandler()"
106389
- },
106390
- {
106391
- "kind": "field",
106392
- "name": "_inertController",
106393
- "privacy": "private",
106394
- "default": "new SbbInertController(this)"
106395
- },
106396
- {
106397
- "kind": "field",
106398
- "name": "_mobileBreakpoint",
106399
- "privacy": "private",
106400
- "default": "SbbMediaQueryBreakpointSmallAndBelow"
106401
- },
106402
- {
106403
- "kind": "field",
106404
- "name": "_mediaMatcher",
106405
- "privacy": "private",
106406
- "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
106407
- },
106408
- {
106409
- "kind": "field",
106410
- "name": "_darkModeController",
106411
- "privacy": "private",
106412
- "default": "new SbbDarkModeController(this, () => this._syncNegative())"
106352
+ "attribute": "disabled",
106353
+ "reflects": true,
106354
+ "inheritedFrom": {
106355
+ "name": "SbbDisabledMixin",
106356
+ "module": "core/mixins/disabled-mixin.js"
106357
+ }
106413
106358
  },
106414
106359
  {
106415
106360
  "kind": "field",
106416
- "name": "_language",
106361
+ "name": "#disabled",
106417
106362
  "privacy": "private",
106418
- "default": "new SbbLanguageController(this)"
106419
- },
106420
- {
106421
- "kind": "field",
106422
- "name": "_nestedMenu",
106423
106363
  "type": {
106424
- "text": "SbbMenuElement | null"
106364
+ "text": "boolean"
106425
106365
  },
106426
- "privacy": "private",
106427
- "default": "null"
106366
+ "default": "false",
106367
+ "inheritedFrom": {
106368
+ "name": "SbbDisabledMixin",
106369
+ "module": "core/mixins/disabled-mixin.js"
106370
+ }
106428
106371
  },
106429
106372
  {
106430
106373
  "kind": "method",
106431
- "name": "escapeStrategy",
106432
- "privacy": "public",
106374
+ "name": "isDisabledExternally",
106375
+ "privacy": "protected",
106433
106376
  "return": {
106434
106377
  "type": {
106435
- "text": "void"
106378
+ "text": "boolean"
106436
106379
  }
106437
106380
  },
106438
- "description": "The method which is called on escape key press. Defaults to calling close()",
106381
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
106439
106382
  "inheritedFrom": {
106440
- "name": "SbbOpenCloseBaseElement",
106441
- "module": "core/base-elements/open-close-base-element.js"
106383
+ "name": "SbbDisabledMixin",
106384
+ "module": "core/mixins/disabled-mixin.js"
106442
106385
  }
106443
106386
  },
106444
106387
  {
106445
- "kind": "method",
106446
- "name": "open",
106447
- "privacy": "public",
106448
- "return": {
106449
- "type": {
106450
- "text": "void"
106451
- }
106388
+ "kind": "field",
106389
+ "name": "styles",
106390
+ "type": {
106391
+ "text": "CSSResultGroup"
106452
106392
  },
106453
- "description": "Opens the menu on trigger click.",
106393
+ "privacy": "public",
106394
+ "static": true,
106395
+ "default": "[boxSizingStyles, unsafeCSS(style)]",
106454
106396
  "inheritedFrom": {
106455
- "name": "SbbOpenCloseBaseElement",
106456
- "module": "core/base-elements/open-close-base-element.js"
106397
+ "name": "SbbMenuActionCommonElementMixin",
106398
+ "module": "menu/common/menu-action-common.js"
106457
106399
  }
106458
106400
  },
106459
106401
  {
106460
106402
  "kind": "method",
106461
- "name": "close",
106462
- "privacy": "public",
106403
+ "name": "renderTemplate",
106404
+ "privacy": "protected",
106463
106405
  "return": {
106464
106406
  "type": {
106465
- "text": "void"
106407
+ "text": "TemplateResult"
106466
106408
  }
106467
106409
  },
106468
- "description": "Closes the menu and all its nested menus.",
106410
+ "description": "Override this method to render the component template.",
106469
106411
  "inheritedFrom": {
106470
- "name": "SbbOpenCloseBaseElement",
106471
- "module": "core/base-elements/open-close-base-element.js"
106412
+ "name": "SbbActionBaseElement",
106413
+ "module": "core/base-elements/action-base-element.js"
106472
106414
  }
106473
106415
  },
106474
106416
  {
106475
- "kind": "method",
106476
- "name": "closeAll",
106477
- "privacy": "public",
106478
- "return": {
106479
- "type": {
106480
- "text": "void"
106481
- }
106417
+ "kind": "field",
106418
+ "name": "iconName",
106419
+ "type": {
106420
+ "text": "string"
106482
106421
  },
106483
- "description": "Closes the menu and all related menus (nested and parent menus)."
106422
+ "privacy": "public",
106423
+ "default": "''",
106424
+ "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.",
106425
+ "attribute": "icon-name",
106426
+ "inheritedFrom": {
106427
+ "name": "SbbIconNameMixin",
106428
+ "module": "icon/icon-name-mixin.js"
106429
+ }
106484
106430
  },
106485
106431
  {
106486
106432
  "kind": "method",
106487
- "name": "_close",
106488
- "privacy": "private",
106433
+ "name": "renderIconSlot",
106434
+ "privacy": "protected",
106489
106435
  "return": {
106490
106436
  "type": {
106491
- "text": "void"
106437
+ "text": "TemplateResult"
106492
106438
  }
106493
106439
  },
106494
106440
  "parameters": [
106495
106441
  {
106496
- "name": "closeAll",
106497
- "default": "false",
106498
- "description": "If true, it ensures animations are correct by toggling some states when closing all related menus at once.",
106499
- "optional": true
106442
+ "name": "classname",
106443
+ "optional": true,
106444
+ "type": {
106445
+ "text": "string"
106446
+ }
106500
106447
  }
106501
- ]
106448
+ ],
106449
+ "inheritedFrom": {
106450
+ "name": "SbbIconNameMixin",
106451
+ "module": "icon/icon-name-mixin.js"
106452
+ }
106502
106453
  },
106503
106454
  {
106504
106455
  "kind": "method",
106505
- "name": "_isZeroAnimationDuration",
106506
- "privacy": "private",
106456
+ "name": "renderIconName",
106457
+ "privacy": "protected",
106507
106458
  "return": {
106508
106459
  "type": {
106509
- "text": "boolean"
106460
+ "text": "string"
106510
106461
  }
106462
+ },
106463
+ "inheritedFrom": {
106464
+ "name": "SbbIconNameMixin",
106465
+ "module": "icon/icon-name-mixin.js"
106511
106466
  }
106512
106467
  },
106513
106468
  {
106514
106469
  "kind": "method",
106515
- "name": "_handleOpening",
106470
+ "name": "_renderIconName",
106516
106471
  "privacy": "private",
106517
106472
  "return": {
106518
106473
  "type": {
106519
- "text": "void"
106474
+ "text": "string"
106520
106475
  }
106476
+ },
106477
+ "inheritedFrom": {
106478
+ "name": "SbbIconNameMixin",
106479
+ "module": "icon/icon-name-mixin.js"
106521
106480
  }
106522
106481
  },
106523
106482
  {
106524
- "kind": "method",
106525
- "name": "_handleClosing",
106483
+ "kind": "field",
106484
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
106485
+ "type": {
106486
+ "text": "array"
106487
+ },
106526
106488
  "privacy": "private",
106527
- "return": {
106528
- "type": {
106529
- "text": "void"
106530
- }
106489
+ "readonly": true,
106490
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
106491
+ "inheritedFrom": {
106492
+ "name": "SbbButtonBaseElement",
106493
+ "module": "core/base-elements/button-base-element.js"
106531
106494
  }
106532
106495
  },
106533
106496
  {
106534
- "kind": "method",
106535
- "name": "_handleKeyDown",
106536
- "privacy": "private",
106537
- "return": {
106538
- "type": {
106539
- "text": "void"
106540
- }
106497
+ "kind": "field",
106498
+ "name": "value",
106499
+ "type": {
106500
+ "text": "string"
106541
106501
  },
106542
- "parameters": [
106543
- {
106544
- "name": "evt",
106545
- "type": {
106546
- "text": "KeyboardEvent"
106547
- }
106548
- }
106549
- ]
106502
+ "privacy": "public",
106503
+ "inheritedFrom": {
106504
+ "name": "SbbButtonBaseElement",
106505
+ "module": "core/base-elements/button-base-element.js"
106506
+ },
106507
+ "default": "''",
106508
+ "description": "Value of the form element.",
106509
+ "attribute": "value"
106550
106510
  },
106551
106511
  {
106552
- "kind": "method",
106553
- "name": "_configureTrigger",
106512
+ "kind": "field",
106513
+ "name": "type",
106514
+ "privacy": "public",
106515
+ "description": "The type attribute to use for the button.",
106516
+ "default": "'button'",
106517
+ "type": {
106518
+ "text": "SbbButtonType"
106519
+ },
106520
+ "attribute": "type",
106521
+ "inheritedFrom": {
106522
+ "name": "SbbButtonBaseElement",
106523
+ "module": "core/base-elements/button-base-element.js"
106524
+ }
106525
+ },
106526
+ {
106527
+ "kind": "field",
106528
+ "name": "form",
106529
+ "type": {
106530
+ "text": "HTMLFormElement | null"
106531
+ },
106532
+ "privacy": "public",
106533
+ "description": "The `<form>` element to associate the button with.",
106534
+ "inheritedFrom": {
106535
+ "name": "SbbButtonBaseElement",
106536
+ "module": "core/base-elements/button-base-element.js"
106537
+ },
106538
+ "attribute": "form"
106539
+ },
106540
+ {
106541
+ "kind": "field",
106542
+ "name": "_formId",
106543
+ "type": {
106544
+ "text": "string"
106545
+ },
106554
106546
  "privacy": "private",
106555
- "return": {
106556
- "type": {
106557
- "text": "void"
106558
- }
106547
+ "default": "''",
106548
+ "inheritedFrom": {
106549
+ "name": "SbbButtonBaseElement",
106550
+ "module": "core/base-elements/button-base-element.js"
106559
106551
  }
106560
106552
  },
106561
106553
  {
106562
- "kind": "method",
106563
- "name": "_attachWindowEvents",
106554
+ "kind": "field",
106555
+ "name": "_handleButtonClick",
106564
106556
  "privacy": "private",
106565
- "return": {
106566
- "type": {
106567
- "text": "void"
106568
- }
106557
+ "inheritedFrom": {
106558
+ "name": "SbbButtonBaseElement",
106559
+ "module": "core/base-elements/button-base-element.js"
106569
106560
  }
106570
106561
  },
106571
106562
  {
106572
106563
  "kind": "method",
106573
- "name": "_interactiveElementClick",
106564
+ "name": "_requestSubmit",
106574
106565
  "privacy": "private",
106575
106566
  "return": {
106576
106567
  "type": {
@@ -106579,79 +106570,154 @@
106579
106570
  },
106580
106571
  "parameters": [
106581
106572
  {
106582
- "name": "event",
106573
+ "name": "form",
106583
106574
  "type": {
106584
- "text": "Event"
106575
+ "text": "HTMLFormElement"
106585
106576
  }
106586
106577
  }
106587
- ]
106578
+ ],
106579
+ "inheritedFrom": {
106580
+ "name": "SbbButtonBaseElement",
106581
+ "module": "core/base-elements/button-base-element.js"
106582
+ }
106588
106583
  },
106589
106584
  {
106590
106585
  "kind": "field",
106591
- "name": "_pointerDownListener",
106592
- "privacy": "private"
106586
+ "name": "_formKeyDown",
106587
+ "privacy": "private",
106588
+ "inheritedFrom": {
106589
+ "name": "SbbButtonBaseElement",
106590
+ "module": "core/base-elements/button-base-element.js"
106591
+ }
106593
106592
  },
106594
106593
  {
106595
106594
  "kind": "field",
106596
- "name": "_closeOnBackdropClick",
106597
- "privacy": "private"
106595
+ "name": "formAssociated",
106596
+ "type": {
106597
+ "text": "boolean"
106598
+ },
106599
+ "privacy": "public",
106600
+ "static": true,
106601
+ "default": "true",
106602
+ "inheritedFrom": {
106603
+ "name": "SbbFormAssociatedMixin",
106604
+ "module": "core/mixins/form-associated-mixin.js"
106605
+ }
106598
106606
  },
106599
106607
  {
106600
- "kind": "method",
106601
- "name": "_nestedMenus",
106602
- "privacy": "private",
106603
- "return": {
106604
- "type": {
106605
- "text": "SbbMenuElement[]"
106606
- }
106608
+ "kind": "field",
106609
+ "name": "name",
106610
+ "privacy": "public",
106611
+ "description": "Name of the form element. Will be read from name attribute.",
106612
+ "type": {
106613
+ "text": "string"
106607
106614
  },
106608
- "description": "Converts the linked list into an array of SbbMenuElement."
106615
+ "attribute": "name",
106616
+ "inheritedFrom": {
106617
+ "name": "SbbFormAssociatedMixin",
106618
+ "module": "core/mixins/form-associated-mixin.js"
106619
+ }
106609
106620
  },
106610
106621
  {
106611
- "kind": "method",
106612
- "name": "_parentMenu",
106613
- "privacy": "private",
106614
- "return": {
106615
- "type": {
106616
- "text": "SbbMenuElement | null"
106617
- }
106622
+ "kind": "field",
106623
+ "name": "validity",
106624
+ "type": {
106625
+ "text": "ValidityState"
106626
+ },
106627
+ "privacy": "public",
106628
+ "description": "Returns the ValidityState object for this element.",
106629
+ "readonly": true,
106630
+ "inheritedFrom": {
106631
+ "name": "SbbFormAssociatedMixin",
106632
+ "module": "core/mixins/form-associated-mixin.js"
106618
106633
  }
106619
106634
  },
106620
106635
  {
106621
- "kind": "method",
106622
- "name": "_mainMenu",
106636
+ "kind": "field",
106637
+ "name": "validationMessage",
106638
+ "type": {
106639
+ "text": "string"
106640
+ },
106641
+ "privacy": "public",
106642
+ "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.",
106643
+ "readonly": true,
106644
+ "inheritedFrom": {
106645
+ "name": "SbbFormAssociatedMixin",
106646
+ "module": "core/mixins/form-associated-mixin.js"
106647
+ }
106648
+ },
106649
+ {
106650
+ "kind": "field",
106651
+ "name": "willValidate",
106652
+ "type": {
106653
+ "text": "boolean"
106654
+ },
106655
+ "privacy": "public",
106656
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
106657
+ "readonly": true,
106658
+ "inheritedFrom": {
106659
+ "name": "SbbFormAssociatedMixin",
106660
+ "module": "core/mixins/form-associated-mixin.js"
106661
+ }
106662
+ },
106663
+ {
106664
+ "kind": "field",
106665
+ "name": "_validityStates",
106623
106666
  "privacy": "private",
106624
- "return": {
106625
- "type": {
106626
- "text": "SbbMenuElement"
106627
- }
106667
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
106668
+ "inheritedFrom": {
106669
+ "name": "SbbFormAssociatedMixin",
106670
+ "module": "core/mixins/form-associated-mixin.js"
106671
+ }
106672
+ },
106673
+ {
106674
+ "kind": "field",
106675
+ "name": "formDisabled",
106676
+ "type": {
106677
+ "text": "boolean"
106628
106678
  },
106629
- "description": "The outermost menu."
106679
+ "privacy": "protected",
106680
+ "default": "false",
106681
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
106682
+ "inheritedFrom": {
106683
+ "name": "SbbFormAssociatedMixin",
106684
+ "module": "core/mixins/form-associated-mixin.js"
106685
+ }
106630
106686
  },
106631
106687
  {
106632
106688
  "kind": "method",
106633
- "name": "_isNested",
106634
- "privacy": "private",
106689
+ "name": "checkValidity",
106690
+ "privacy": "public",
106635
106691
  "return": {
106636
106692
  "type": {
106637
106693
  "text": "boolean"
106638
106694
  }
106695
+ },
106696
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
106697
+ "inheritedFrom": {
106698
+ "name": "SbbFormAssociatedMixin",
106699
+ "module": "core/mixins/form-associated-mixin.js"
106639
106700
  }
106640
106701
  },
106641
106702
  {
106642
106703
  "kind": "method",
106643
- "name": "_updateNestedInert",
106644
- "privacy": "private",
106704
+ "name": "reportValidity",
106705
+ "privacy": "public",
106645
106706
  "return": {
106646
106707
  "type": {
106647
- "text": "void"
106708
+ "text": "boolean"
106648
106709
  }
106710
+ },
106711
+ "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.",
106712
+ "inheritedFrom": {
106713
+ "name": "SbbFormAssociatedMixin",
106714
+ "module": "core/mixins/form-associated-mixin.js"
106649
106715
  }
106650
106716
  },
106651
106717
  {
106652
106718
  "kind": "method",
106653
- "name": "_handleMouseOver",
106654
- "privacy": "private",
106719
+ "name": "setCustomValidity",
106720
+ "privacy": "public",
106655
106721
  "return": {
106656
106722
  "type": {
106657
106723
  "text": "void"
@@ -106659,405 +106725,208 @@
106659
106725
  },
106660
106726
  "parameters": [
106661
106727
  {
106662
- "name": "event",
106728
+ "name": "message",
106663
106729
  "type": {
106664
- "text": "MouseEvent"
106730
+ "text": "string"
106665
106731
  }
106666
106732
  }
106667
- ]
106733
+ ],
106734
+ "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.",
106735
+ "inheritedFrom": {
106736
+ "name": "SbbFormAssociatedMixin",
106737
+ "module": "core/mixins/form-associated-mixin.js"
106738
+ }
106668
106739
  },
106669
106740
  {
106670
106741
  "kind": "method",
106671
- "name": "_onMenuAnimationEnd",
106742
+ "name": "_hasDisabledAncestor",
106672
106743
  "privacy": "private",
106673
106744
  "return": {
106674
106745
  "type": {
106675
- "text": "void"
106746
+ "text": "boolean"
106676
106747
  }
106677
106748
  },
106678
- "parameters": [
106679
- {
106680
- "name": "event",
106681
- "type": {
106682
- "text": "AnimationEvent"
106683
- }
106684
- }
106685
- ]
106686
- },
106687
- {
106688
- "kind": "method",
106689
- "name": "_setMenuPosition",
106690
- "privacy": "private",
106691
- "return": {
106692
- "type": {
106693
- "text": "void"
106694
- }
106749
+ "inheritedFrom": {
106750
+ "name": "SbbFormAssociatedMixin",
106751
+ "module": "core/mixins/form-associated-mixin.js"
106695
106752
  }
106696
106753
  },
106697
106754
  {
106698
106755
  "kind": "method",
106699
- "name": "_syncNegative",
106700
- "privacy": "private",
106756
+ "name": "updateFormValue",
106757
+ "privacy": "protected",
106701
106758
  "return": {
106702
106759
  "type": {
106703
106760
  "text": "void"
106704
106761
  }
106705
- }
106706
- },
106707
- {
106708
- "kind": "method",
106709
- "name": "_isMobile",
106710
- "privacy": "private",
106711
- "return": {
106712
- "type": {
106713
- "text": "boolean"
106714
- }
106715
- }
106716
- },
106717
- {
106718
- "kind": "field",
106719
- "name": "events",
106720
- "privacy": "public",
106721
- "static": true,
106722
- "readonly": true,
106723
- "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
106724
- "type": {
106725
- "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
106726
- },
106727
- "inheritedFrom": {
106728
- "name": "SbbOpenCloseBaseElement",
106729
- "module": "core/base-elements/open-close-base-element.js"
106730
- }
106731
- },
106732
- {
106733
- "kind": "field",
106734
- "name": "state",
106735
- "privacy": "protected",
106736
- "description": "The state of the component.",
106737
- "type": {
106738
- "text": "SbbOpenedClosedState"
106739
106762
  },
106740
- "default": "'closed'",
106741
- "inheritedFrom": {
106742
- "name": "SbbOpenCloseBaseElement",
106743
- "module": "core/base-elements/open-close-base-element.js"
106744
- }
106745
- },
106746
- {
106747
- "kind": "field",
106748
- "name": "_state",
106749
- "type": {
106750
- "text": "SbbOpenedClosedState"
106751
- },
106752
- "privacy": "private",
106753
- "inheritedFrom": {
106754
- "name": "SbbOpenCloseBaseElement",
106755
- "module": "core/base-elements/open-close-base-element.js"
106756
- }
106757
- },
106758
- {
106759
- "kind": "field",
106760
- "name": "isOpen",
106761
- "type": {
106762
- "text": "boolean"
106763
- },
106764
- "privacy": "public",
106765
- "description": "Whether the element is open.",
106766
- "readonly": true,
106763
+ "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",
106767
106764
  "inheritedFrom": {
106768
- "name": "SbbOpenCloseBaseElement",
106769
- "module": "core/base-elements/open-close-base-element.js"
106765
+ "name": "SbbFormAssociatedMixin",
106766
+ "module": "core/mixins/form-associated-mixin.js"
106770
106767
  }
106771
106768
  },
106772
106769
  {
106773
106770
  "kind": "method",
106774
- "name": "dispatchBeforeOpenEvent",
106771
+ "name": "formState",
106775
106772
  "privacy": "protected",
106776
106773
  "return": {
106777
106774
  "type": {
106778
- "text": "boolean"
106775
+ "text": "FormRestoreState"
106779
106776
  }
106780
106777
  },
106781
106778
  "inheritedFrom": {
106782
- "name": "SbbOpenCloseBaseElement",
106783
- "module": "core/base-elements/open-close-base-element.js"
106779
+ "name": "SbbFormAssociatedMixin",
106780
+ "module": "core/mixins/form-associated-mixin.js"
106784
106781
  }
106785
106782
  },
106786
106783
  {
106787
106784
  "kind": "method",
106788
- "name": "dispatchOpenEvent",
106785
+ "name": "setValidityFlag",
106789
106786
  "privacy": "protected",
106790
106787
  "return": {
106791
106788
  "type": {
106792
- "text": "boolean"
106789
+ "text": "void"
106793
106790
  }
106794
106791
  },
106792
+ "parameters": [
106793
+ {
106794
+ "name": "flag",
106795
+ "type": {
106796
+ "text": "T"
106797
+ }
106798
+ },
106799
+ {
106800
+ "name": "message",
106801
+ "type": {
106802
+ "text": "string"
106803
+ }
106804
+ },
106805
+ {
106806
+ "name": "flagValue",
106807
+ "optional": true,
106808
+ "type": {
106809
+ "text": "ValidityStateFlags[T]"
106810
+ }
106811
+ }
106812
+ ],
106813
+ "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).",
106795
106814
  "inheritedFrom": {
106796
- "name": "SbbOpenCloseBaseElement",
106797
- "module": "core/base-elements/open-close-base-element.js"
106815
+ "name": "SbbFormAssociatedMixin",
106816
+ "module": "core/mixins/form-associated-mixin.js"
106798
106817
  }
106799
106818
  },
106800
106819
  {
106801
106820
  "kind": "method",
106802
- "name": "dispatchBeforeCloseEvent",
106821
+ "name": "removeValidityFlag",
106803
106822
  "privacy": "protected",
106804
106823
  "return": {
106805
106824
  "type": {
106806
- "text": "boolean"
106825
+ "text": "void"
106807
106826
  }
106808
106827
  },
106828
+ "parameters": [
106829
+ {
106830
+ "name": "flag",
106831
+ "type": {
106832
+ "text": "T"
106833
+ }
106834
+ }
106835
+ ],
106836
+ "description": "Removes the validity state flag entry and updates validity state.",
106809
106837
  "inheritedFrom": {
106810
- "name": "SbbOpenCloseBaseElement",
106811
- "module": "core/base-elements/open-close-base-element.js"
106838
+ "name": "SbbFormAssociatedMixin",
106839
+ "module": "core/mixins/form-associated-mixin.js"
106812
106840
  }
106813
106841
  },
106814
106842
  {
106815
106843
  "kind": "method",
106816
- "name": "dispatchCloseEvent",
106844
+ "name": "validate",
106817
106845
  "privacy": "protected",
106818
106846
  "return": {
106819
106847
  "type": {
106820
- "text": "boolean"
106848
+ "text": "void"
106821
106849
  }
106822
106850
  },
106851
+ "description": "To be called whenever the current element needs to be validated.",
106823
106852
  "inheritedFrom": {
106824
- "name": "SbbOpenCloseBaseElement",
106825
- "module": "core/base-elements/open-close-base-element.js"
106826
- }
106827
- },
106828
- {
106829
- "kind": "field",
106830
- "name": "_hydrationRequired",
106831
- "type": {
106832
- "text": "boolean"
106833
- },
106834
- "privacy": "private",
106835
- "default": "!!this.shadowRoot",
106836
- "inheritedFrom": {
106837
- "name": "SbbElement",
106838
- "module": "core/base-elements/element.js"
106839
- }
106840
- },
106841
- {
106842
- "kind": "field",
106843
- "name": "_hydrationComplete",
106844
- "privacy": "private",
106845
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
106846
- "inheritedFrom": {
106847
- "name": "SbbElement",
106848
- "module": "core/base-elements/element.js"
106849
- }
106850
- },
106851
- {
106852
- "kind": "field",
106853
- "name": "_resolveHydration",
106854
- "type": {
106855
- "text": "(hydrationRequired: boolean) => void"
106856
- },
106857
- "privacy": "private",
106858
- "inheritedFrom": {
106859
- "name": "SbbElement",
106860
- "module": "core/base-elements/element.js"
106853
+ "name": "SbbFormAssociatedMixin",
106854
+ "module": "core/mixins/form-associated-mixin.js"
106861
106855
  }
106862
106856
  },
106863
- {
106864
- "kind": "field",
106865
- "name": "hydrationRequired",
106866
- "type": {
106867
- "text": "boolean"
106868
- },
106869
- "privacy": "protected",
106870
- "description": "Returns whether hydration is required and not completed.",
106871
- "readonly": true,
106872
- "inheritedFrom": {
106873
- "name": "SbbElement",
106874
- "module": "core/base-elements/element.js"
106875
- },
106876
- "default": "!!this.shadowRoot"
106877
- },
106878
106857
  {
106879
106858
  "kind": "method",
106880
- "name": "toggleState",
106859
+ "name": "shouldValidate",
106881
106860
  "privacy": "protected",
106882
106861
  "return": {
106883
106862
  "type": {
106884
- "text": "void"
106863
+ "text": "boolean"
106885
106864
  }
106886
106865
  },
106887
106866
  "parameters": [
106888
106867
  {
106889
- "name": "value",
106890
- "type": {
106891
- "text": "string"
106892
- }
106893
- },
106894
- {
106895
- "name": "force",
106896
- "optional": true,
106868
+ "name": "name",
106897
106869
  "type": {
106898
- "text": "boolean"
106870
+ "text": "PropertyKey | undefined"
106899
106871
  }
106900
106872
  }
106901
106873
  ],
106874
+ "description": "Whether validation should be run on a property change with the given name.",
106902
106875
  "inheritedFrom": {
106903
- "name": "SbbElement",
106904
- "module": "core/base-elements/element.js"
106905
- }
106906
- },
106907
- {
106908
- "kind": "field",
106909
- "name": "['_$sbbElement$']",
106910
- "type": {
106911
- "text": "boolean"
106912
- },
106913
- "privacy": "public",
106914
- "static": true,
106915
- "default": "true",
106916
- "inheritedFrom": {
106917
- "name": "SbbElement",
106918
- "module": "core/base-elements/element.js"
106919
- }
106920
- },
106921
- {
106922
- "kind": "field",
106923
- "name": "_controllers",
106924
- "type": {
106925
- "text": "Set<SbbReactiveController> | undefined"
106926
- },
106927
- "privacy": "private",
106928
- "inheritedFrom": {
106929
- "name": "SbbElement",
106930
- "module": "core/base-elements/element.js"
106931
- }
106932
- }
106933
- ],
106934
- "attributes": [
106935
- {
106936
- "name": "trigger",
106937
- "type": {
106938
- "text": "HTMLElement | null"
106939
- },
106940
- "default": "null",
106941
- "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
106942
- "fieldName": "trigger"
106943
- }
106944
- ],
106945
- "superclass": {
106946
- "name": "SbbOpenCloseBaseElement",
106947
- "module": "core/base-elements.js"
106948
- },
106949
- "tagName": "sbb-menu",
106950
- "customElement": true,
106951
- "events": [
106952
- {
106953
- "name": "beforeopen",
106954
- "type": {
106955
- "text": "Event"
106956
- },
106957
- "description": "Emits whenever the component starts the opening transition. Can be canceled.",
106958
- "inheritedFrom": {
106959
- "name": "SbbOpenCloseBaseElement",
106960
- "module": "core/base-elements/open-close-base-element.js"
106961
- }
106962
- },
106963
- {
106964
- "name": "open",
106965
- "type": {
106966
- "text": "Event"
106967
- },
106968
- "description": "Emits whenever the component is opened.",
106969
- "inheritedFrom": {
106970
- "name": "SbbOpenCloseBaseElement",
106971
- "module": "core/base-elements/open-close-base-element.js"
106972
- }
106973
- },
106974
- {
106975
- "name": "beforeclose",
106976
- "type": {
106977
- "text": "Event"
106978
- },
106979
- "description": "Emits whenever the component begins the closing transition. Can be canceled.",
106980
- "inheritedFrom": {
106981
- "name": "SbbOpenCloseBaseElement",
106982
- "module": "core/base-elements/open-close-base-element.js"
106876
+ "name": "SbbFormAssociatedMixin",
106877
+ "module": "core/mixins/form-associated-mixin.js"
106983
106878
  }
106984
106879
  },
106985
106880
  {
106986
- "name": "close",
106987
- "type": {
106988
- "text": "Event"
106989
- },
106990
- "description": "Emits whenever the component is closed.",
106991
- "inheritedFrom": {
106992
- "name": "SbbOpenCloseBaseElement",
106993
- "module": "core/base-elements/open-close-base-element.js"
106994
- }
106995
- }
106996
- ]
106997
- }
106998
- ],
106999
- "exports": [
107000
- {
107001
- "kind": "js",
107002
- "name": "SbbMenuElement",
107003
- "declaration": {
107004
- "name": "SbbMenuElement",
107005
- "module": "menu/menu/menu.component.js"
107006
- }
107007
- }
107008
- ]
107009
- },
107010
- {
107011
- "kind": "javascript-module",
107012
- "path": "menu/menu-button/menu-button.component.js",
107013
- "declarations": [
107014
- {
107015
- "kind": "class",
107016
- "description": "It displays a button element that can be used in the `sbb-menu` component.",
107017
- "name": "SbbMenuButtonElement",
107018
- "cssProperties": [
107019
- {
107020
- "description": "Can be used to modify horizontal padding.",
107021
- "name": "--sbb-menu-action-outer-horizontal-padding",
107022
- "default": "var(--sbb-spacing-fixed-3x)"
107023
- }
107024
- ],
107025
- "slots": [
107026
- {
107027
- "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
107028
- "name": ""
106881
+ "kind": "method",
106882
+ "name": "_setInternalValidity",
106883
+ "privacy": "private",
106884
+ "return": {
106885
+ "type": {
106886
+ "text": "void"
106887
+ }
106888
+ },
106889
+ "inheritedFrom": {
106890
+ "name": "SbbFormAssociatedMixin",
106891
+ "module": "core/mixins/form-associated-mixin.js"
106892
+ }
107029
106893
  },
107030
106894
  {
107031
- "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
107032
- "name": "icon"
107033
- }
107034
- ],
107035
- "members": [
106895
+ "kind": "field",
106896
+ "name": "_preventScrollOnSpaceKeydown",
106897
+ "privacy": "private",
106898
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
106899
+ "parameters": [
106900
+ {
106901
+ "description": "The origin event.",
106902
+ "name": "event"
106903
+ }
106904
+ ],
106905
+ "inheritedFrom": {
106906
+ "name": "SbbButtonLikeBaseElement",
106907
+ "module": "core/base-elements/button-base-element.js"
106908
+ }
106909
+ },
107036
106910
  {
107037
106911
  "kind": "field",
107038
- "name": "elementName",
107039
- "type": {
107040
- "text": "string"
107041
- },
107042
- "privacy": "public",
107043
- "static": true,
107044
- "readonly": true,
106912
+ "name": "_removeActiveMarker",
106913
+ "privacy": "private",
107045
106914
  "inheritedFrom": {
107046
- "name": "SbbElement",
107047
- "module": "core/base-elements/element.js"
107048
- },
107049
- "default": "'sbb-menu-button'"
106915
+ "name": "SbbButtonLikeBaseElement",
106916
+ "module": "core/base-elements/button-base-element.js"
106917
+ }
107050
106918
  },
107051
106919
  {
107052
106920
  "kind": "field",
107053
- "name": "role",
107054
- "type": {
107055
- "text": "ElementInternals['role']"
107056
- },
107057
- "privacy": "public",
107058
- "static": true,
107059
- "readonly": true,
107060
- "default": "'menuitem'",
106921
+ "name": "_dispatchClickEventOnSpaceKeyup",
106922
+ "privacy": "private",
106923
+ "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.",
106924
+ "parameters": [
106925
+ {
106926
+ "description": "The origin event.",
106927
+ "name": "event"
106928
+ }
106929
+ ],
107061
106930
  "inheritedFrom": {
107062
106931
  "name": "SbbButtonLikeBaseElement",
107063
106932
  "module": "core/base-elements/button-base-element.js"
@@ -107065,464 +106934,545 @@
107065
106934
  },
107066
106935
  {
107067
106936
  "kind": "field",
107068
- "name": "disabledInteractive",
107069
- "type": {
107070
- "text": "boolean"
107071
- },
107072
- "privacy": "public",
107073
- "default": "false",
107074
- "description": "Whether the button should be aria-disabled but stay interactive.",
107075
- "attribute": "disabled-interactive",
107076
- "reflects": true,
106937
+ "name": "_dispatchClickEvent",
106938
+ "privacy": "private",
107077
106939
  "inheritedFrom": {
107078
- "name": "SbbDisabledInteractiveMixin",
107079
- "module": "core/mixins/disabled-mixin.js"
106940
+ "name": "SbbButtonLikeBaseElement",
106941
+ "module": "core/base-elements/button-base-element.js"
107080
106942
  }
107081
106943
  },
107082
106944
  {
107083
106945
  "kind": "field",
107084
- "name": "disabled",
107085
- "privacy": "public",
107086
- "description": "Whether the component is disabled.",
107087
- "default": "false",
106946
+ "name": "maybeDisabled",
107088
106947
  "type": {
107089
- "text": "boolean"
106948
+ "text": "boolean | undefined"
107090
106949
  },
107091
- "attribute": "disabled",
107092
- "reflects": true,
106950
+ "privacy": "protected",
106951
+ "readonly": true,
107093
106952
  "inheritedFrom": {
107094
- "name": "SbbDisabledMixin",
107095
- "module": "core/mixins/disabled-mixin.js"
106953
+ "name": "SbbActionBaseElement",
106954
+ "module": "core/base-elements/action-base-element.js"
107096
106955
  }
107097
106956
  },
107098
106957
  {
107099
106958
  "kind": "field",
107100
- "name": "#disabled",
107101
- "privacy": "private",
106959
+ "name": "maybeDisabledInteractive",
107102
106960
  "type": {
107103
- "text": "boolean"
106961
+ "text": "boolean | undefined"
107104
106962
  },
107105
- "default": "false",
106963
+ "privacy": "protected",
106964
+ "readonly": true,
107106
106965
  "inheritedFrom": {
107107
- "name": "SbbDisabledMixin",
107108
- "module": "core/mixins/disabled-mixin.js"
106966
+ "name": "SbbActionBaseElement",
106967
+ "module": "core/base-elements/action-base-element.js"
107109
106968
  }
107110
106969
  },
107111
106970
  {
107112
106971
  "kind": "method",
107113
- "name": "isDisabledExternally",
106972
+ "name": "setupBaseEventHandlers",
107114
106973
  "privacy": "protected",
107115
106974
  "return": {
107116
106975
  "type": {
107117
- "text": "boolean"
106976
+ "text": "void"
107118
106977
  }
107119
106978
  },
107120
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
107121
106979
  "inheritedFrom": {
107122
- "name": "SbbDisabledMixin",
107123
- "module": "core/mixins/disabled-mixin.js"
106980
+ "name": "SbbActionBaseElement",
106981
+ "module": "core/base-elements/action-base-element.js"
107124
106982
  }
107125
106983
  },
107126
106984
  {
107127
106985
  "kind": "field",
107128
- "name": "styles",
106986
+ "name": "_hydrationRequired",
107129
106987
  "type": {
107130
- "text": "CSSResultGroup"
106988
+ "text": "boolean"
107131
106989
  },
107132
- "privacy": "public",
107133
- "static": true,
107134
- "default": "[boxSizingStyles, unsafeCSS(style)]",
106990
+ "privacy": "private",
106991
+ "default": "!!this.shadowRoot",
107135
106992
  "inheritedFrom": {
107136
- "name": "SbbMenuActionCommonElementMixin",
107137
- "module": "menu/common/menu-action-common.js"
106993
+ "name": "SbbElement",
106994
+ "module": "core/base-elements/element.js"
107138
106995
  }
107139
106996
  },
107140
106997
  {
107141
- "kind": "method",
107142
- "name": "renderTemplate",
107143
- "privacy": "protected",
107144
- "return": {
107145
- "type": {
107146
- "text": "TemplateResult"
107147
- }
107148
- },
107149
- "description": "Override this method to render the component template.",
106998
+ "kind": "field",
106999
+ "name": "_hydrationComplete",
107000
+ "privacy": "private",
107001
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
107150
107002
  "inheritedFrom": {
107151
- "name": "SbbActionBaseElement",
107152
- "module": "core/base-elements/action-base-element.js"
107003
+ "name": "SbbElement",
107004
+ "module": "core/base-elements/element.js"
107153
107005
  }
107154
107006
  },
107155
107007
  {
107156
107008
  "kind": "field",
107157
- "name": "iconName",
107009
+ "name": "_resolveHydration",
107158
107010
  "type": {
107159
- "text": "string"
107011
+ "text": "(hydrationRequired: boolean) => void"
107160
107012
  },
107161
- "privacy": "public",
107162
- "default": "''",
107163
- "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.",
107164
- "attribute": "icon-name",
107013
+ "privacy": "private",
107165
107014
  "inheritedFrom": {
107166
- "name": "SbbIconNameMixin",
107167
- "module": "icon/icon-name-mixin.js"
107015
+ "name": "SbbElement",
107016
+ "module": "core/base-elements/element.js"
107168
107017
  }
107169
107018
  },
107019
+ {
107020
+ "kind": "field",
107021
+ "name": "hydrationRequired",
107022
+ "type": {
107023
+ "text": "boolean"
107024
+ },
107025
+ "privacy": "protected",
107026
+ "description": "Returns whether hydration is required and not completed.",
107027
+ "readonly": true,
107028
+ "inheritedFrom": {
107029
+ "name": "SbbElement",
107030
+ "module": "core/base-elements/element.js"
107031
+ },
107032
+ "default": "!!this.shadowRoot"
107033
+ },
107170
107034
  {
107171
107035
  "kind": "method",
107172
- "name": "renderIconSlot",
107036
+ "name": "toggleState",
107173
107037
  "privacy": "protected",
107174
107038
  "return": {
107175
107039
  "type": {
107176
- "text": "TemplateResult"
107040
+ "text": "void"
107177
107041
  }
107178
107042
  },
107179
107043
  "parameters": [
107180
107044
  {
107181
- "name": "classname",
107182
- "optional": true,
107045
+ "name": "value",
107183
107046
  "type": {
107184
107047
  "text": "string"
107185
107048
  }
107049
+ },
107050
+ {
107051
+ "name": "force",
107052
+ "optional": true,
107053
+ "type": {
107054
+ "text": "boolean"
107055
+ }
107186
107056
  }
107187
107057
  ],
107188
107058
  "inheritedFrom": {
107189
- "name": "SbbIconNameMixin",
107190
- "module": "icon/icon-name-mixin.js"
107059
+ "name": "SbbElement",
107060
+ "module": "core/base-elements/element.js"
107191
107061
  }
107192
107062
  },
107193
107063
  {
107194
- "kind": "method",
107195
- "name": "renderIconName",
107196
- "privacy": "protected",
107197
- "return": {
107198
- "type": {
107199
- "text": "string"
107200
- }
107064
+ "kind": "field",
107065
+ "name": "['_$sbbElement$']",
107066
+ "type": {
107067
+ "text": "boolean"
107201
107068
  },
107069
+ "privacy": "public",
107070
+ "static": true,
107071
+ "default": "true",
107202
107072
  "inheritedFrom": {
107203
- "name": "SbbIconNameMixin",
107204
- "module": "icon/icon-name-mixin.js"
107073
+ "name": "SbbElement",
107074
+ "module": "core/base-elements/element.js"
107205
107075
  }
107206
107076
  },
107207
107077
  {
107208
- "kind": "method",
107209
- "name": "_renderIconName",
107078
+ "kind": "field",
107079
+ "name": "_controllers",
107080
+ "type": {
107081
+ "text": "Set<SbbReactiveController> | undefined"
107082
+ },
107210
107083
  "privacy": "private",
107211
- "return": {
107212
- "type": {
107213
- "text": "string"
107214
- }
107084
+ "inheritedFrom": {
107085
+ "name": "SbbElement",
107086
+ "module": "core/base-elements/element.js"
107087
+ }
107088
+ }
107089
+ ],
107090
+ "mixins": [
107091
+ {
107092
+ "name": "SbbDisabledTabIndexActionMixin",
107093
+ "module": "core/mixins.js"
107094
+ },
107095
+ {
107096
+ "name": "SbbMenuActionCommonElementMixin",
107097
+ "module": "menu/common/menu-action-common.js"
107098
+ }
107099
+ ],
107100
+ "superclass": {
107101
+ "name": "SbbButtonBaseElement",
107102
+ "module": "core/base-elements.js"
107103
+ },
107104
+ "tagName": "sbb-menu-button",
107105
+ "customElement": true,
107106
+ "attributes": [
107107
+ {
107108
+ "name": "disabled-interactive",
107109
+ "type": {
107110
+ "text": "boolean"
107111
+ },
107112
+ "default": "false",
107113
+ "description": "Whether the button should be aria-disabled but stay interactive.",
107114
+ "fieldName": "disabledInteractive",
107115
+ "inheritedFrom": {
107116
+ "name": "SbbDisabledInteractiveMixin",
107117
+ "module": "core/mixins/disabled-mixin.js"
107118
+ }
107119
+ },
107120
+ {
107121
+ "name": "disabled",
107122
+ "description": "Whether the component is disabled.",
107123
+ "default": "false",
107124
+ "type": {
107125
+ "text": "boolean"
107215
107126
  },
107127
+ "fieldName": "disabled",
107216
107128
  "inheritedFrom": {
107217
- "name": "SbbIconNameMixin",
107218
- "module": "icon/icon-name-mixin.js"
107129
+ "name": "SbbDisabledMixin",
107130
+ "module": "core/mixins/disabled-mixin.js"
107219
107131
  }
107220
107132
  },
107221
107133
  {
107222
- "kind": "field",
107223
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
107134
+ "name": "icon-name",
107224
107135
  "type": {
107225
- "text": "array"
107136
+ "text": "string"
107226
107137
  },
107227
- "privacy": "private",
107228
- "readonly": true,
107229
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
107138
+ "default": "''",
107139
+ "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.",
107140
+ "fieldName": "iconName",
107230
107141
  "inheritedFrom": {
107231
- "name": "SbbButtonBaseElement",
107232
- "module": "core/base-elements/button-base-element.js"
107142
+ "name": "SbbIconNameMixin",
107143
+ "module": "icon/icon-name-mixin.js"
107233
107144
  }
107234
107145
  },
107235
107146
  {
107236
- "kind": "field",
107237
107147
  "name": "value",
107238
107148
  "type": {
107239
107149
  "text": "string"
107240
107150
  },
107241
- "privacy": "public",
107151
+ "default": "''",
107152
+ "description": "Value of the form element.",
107153
+ "fieldName": "value",
107242
107154
  "inheritedFrom": {
107243
107155
  "name": "SbbButtonBaseElement",
107244
107156
  "module": "core/base-elements/button-base-element.js"
107245
- },
107246
- "default": "''",
107247
- "description": "Value of the form element.",
107248
- "attribute": "value"
107157
+ }
107249
107158
  },
107250
107159
  {
107251
- "kind": "field",
107252
107160
  "name": "type",
107253
- "privacy": "public",
107254
107161
  "description": "The type attribute to use for the button.",
107255
107162
  "default": "'button'",
107256
107163
  "type": {
107257
107164
  "text": "SbbButtonType"
107258
107165
  },
107259
- "attribute": "type",
107166
+ "fieldName": "type",
107260
107167
  "inheritedFrom": {
107261
107168
  "name": "SbbButtonBaseElement",
107262
107169
  "module": "core/base-elements/button-base-element.js"
107263
107170
  }
107264
107171
  },
107265
107172
  {
107266
- "kind": "field",
107267
107173
  "name": "form",
107174
+ "description": "The `<form>` element to associate the button with.",
107268
107175
  "type": {
107269
107176
  "text": "HTMLFormElement | null"
107270
107177
  },
107271
- "privacy": "public",
107272
- "description": "The `<form>` element to associate the button with.",
107178
+ "fieldName": "form",
107273
107179
  "inheritedFrom": {
107274
107180
  "name": "SbbButtonBaseElement",
107275
107181
  "module": "core/base-elements/button-base-element.js"
107276
- },
107277
- "attribute": "form"
107182
+ }
107278
107183
  },
107279
107184
  {
107280
- "kind": "field",
107281
- "name": "_formId",
107185
+ "name": "name",
107186
+ "description": "Name of the form element. Will be read from name attribute.",
107282
107187
  "type": {
107283
107188
  "text": "string"
107284
107189
  },
107285
- "privacy": "private",
107286
- "default": "''",
107190
+ "fieldName": "name",
107287
107191
  "inheritedFrom": {
107288
- "name": "SbbButtonBaseElement",
107289
- "module": "core/base-elements/button-base-element.js"
107192
+ "name": "SbbFormAssociatedMixin",
107193
+ "module": "core/mixins/form-associated-mixin.js"
107290
107194
  }
107291
- },
107195
+ }
107196
+ ]
107197
+ }
107198
+ ],
107199
+ "exports": [
107200
+ {
107201
+ "kind": "js",
107202
+ "name": "SbbMenuButtonElement",
107203
+ "declaration": {
107204
+ "name": "SbbMenuButtonElement",
107205
+ "module": "menu/menu-button/menu-button.component.js"
107206
+ }
107207
+ }
107208
+ ]
107209
+ },
107210
+ {
107211
+ "kind": "javascript-module",
107212
+ "path": "menu/menu/menu.component.js",
107213
+ "declarations": [
107214
+ {
107215
+ "kind": "class",
107216
+ "description": "It displays a contextual menu with one or more action element.",
107217
+ "name": "SbbMenuElement",
107218
+ "cssProperties": [
107292
107219
  {
107293
- "kind": "field",
107294
- "name": "_handleButtonClick",
107295
- "privacy": "private",
107296
- "inheritedFrom": {
107297
- "name": "SbbButtonBaseElement",
107298
- "module": "core/base-elements/button-base-element.js"
107299
- }
107300
- },
107220
+ "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`.",
107221
+ "name": "--sbb-menu-z-index",
107222
+ "default": "var(--sbb-overlay-default-z-index)"
107223
+ }
107224
+ ],
107225
+ "slots": [
107301
107226
  {
107302
- "kind": "method",
107303
- "name": "_requestSubmit",
107304
- "privacy": "private",
107305
- "return": {
107306
- "type": {
107307
- "text": "void"
107308
- }
107309
- },
107310
- "parameters": [
107311
- {
107312
- "name": "form",
107313
- "type": {
107314
- "text": "HTMLFormElement"
107315
- }
107316
- }
107317
- ],
107318
- "inheritedFrom": {
107319
- "name": "SbbButtonBaseElement",
107320
- "module": "core/base-elements/button-base-element.js"
107321
- }
107322
- },
107227
+ "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
107228
+ "name": ""
107229
+ }
107230
+ ],
107231
+ "members": [
107323
107232
  {
107324
107233
  "kind": "field",
107325
- "name": "_formKeyDown",
107326
- "privacy": "private",
107234
+ "name": "elementName",
107235
+ "type": {
107236
+ "text": "string"
107237
+ },
107238
+ "privacy": "public",
107239
+ "static": true,
107240
+ "readonly": true,
107327
107241
  "inheritedFrom": {
107328
- "name": "SbbButtonBaseElement",
107329
- "module": "core/base-elements/button-base-element.js"
107330
- }
107242
+ "name": "SbbElement",
107243
+ "module": "core/base-elements/element.js"
107244
+ },
107245
+ "default": "'sbb-menu'"
107331
107246
  },
107332
107247
  {
107333
107248
  "kind": "field",
107334
- "name": "formAssociated",
107249
+ "name": "role",
107335
107250
  "type": {
107336
- "text": "boolean"
107251
+ "text": "string"
107337
107252
  },
107338
107253
  "privacy": "public",
107339
107254
  "static": true,
107340
- "default": "true",
107341
- "inheritedFrom": {
107342
- "name": "SbbFormAssociatedMixin",
107343
- "module": "core/mixins/form-associated-mixin.js"
107344
- }
107255
+ "readonly": true,
107256
+ "default": "'menu'"
107345
107257
  },
107346
107258
  {
107347
107259
  "kind": "field",
107348
- "name": "name",
107260
+ "name": "trigger",
107261
+ "type": {
107262
+ "text": "HTMLElement | null"
107263
+ },
107349
107264
  "privacy": "public",
107350
- "description": "Name of the form element. Will be read from name attribute.",
107265
+ "default": "null",
107266
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
107267
+ "attribute": "trigger"
107268
+ },
107269
+ {
107270
+ "kind": "field",
107271
+ "name": "_menu",
107351
107272
  "type": {
107352
- "text": "string"
107273
+ "text": "HTMLDivElement"
107353
107274
  },
107354
- "attribute": "name",
107355
- "inheritedFrom": {
107356
- "name": "SbbFormAssociatedMixin",
107357
- "module": "core/mixins/form-associated-mixin.js"
107358
- }
107275
+ "privacy": "private"
107359
107276
  },
107360
107277
  {
107361
107278
  "kind": "field",
107362
- "name": "validity",
107279
+ "name": "_triggerElement",
107363
107280
  "type": {
107364
- "text": "ValidityState"
107281
+ "text": "HTMLElement | null"
107365
107282
  },
107366
- "privacy": "public",
107367
- "description": "Returns the ValidityState object for this element.",
107368
- "readonly": true,
107369
- "inheritedFrom": {
107370
- "name": "SbbFormAssociatedMixin",
107371
- "module": "core/mixins/form-associated-mixin.js"
107372
- }
107283
+ "privacy": "private",
107284
+ "default": "null"
107373
107285
  },
107374
107286
  {
107375
107287
  "kind": "field",
107376
- "name": "validationMessage",
107288
+ "name": "_triggerAbortController",
107377
107289
  "type": {
107378
- "text": "string"
107290
+ "text": "AbortController"
107379
107291
  },
107380
- "privacy": "public",
107381
- "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.",
107382
- "readonly": true,
107383
- "inheritedFrom": {
107384
- "name": "SbbFormAssociatedMixin",
107385
- "module": "core/mixins/form-associated-mixin.js"
107386
- }
107292
+ "privacy": "private"
107387
107293
  },
107388
107294
  {
107389
107295
  "kind": "field",
107390
- "name": "willValidate",
107296
+ "name": "_isPointerDownEventOnMenu",
107391
107297
  "type": {
107392
107298
  "text": "boolean"
107393
107299
  },
107394
- "privacy": "public",
107395
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
107396
- "readonly": true,
107397
- "inheritedFrom": {
107398
- "name": "SbbFormAssociatedMixin",
107399
- "module": "core/mixins/form-associated-mixin.js"
107400
- }
107300
+ "privacy": "private",
107301
+ "default": "false"
107302
+ },
107303
+ {
107304
+ "kind": "field",
107305
+ "name": "_windowEventsController",
107306
+ "type": {
107307
+ "text": "AbortController"
107308
+ },
107309
+ "privacy": "private"
107310
+ },
107311
+ {
107312
+ "kind": "field",
107313
+ "name": "_escapableOverlayController",
107314
+ "privacy": "private",
107315
+ "default": "new SbbEscapableOverlayController(this)"
107316
+ },
107317
+ {
107318
+ "kind": "field",
107319
+ "name": "_focusTrapController",
107320
+ "privacy": "private",
107321
+ "default": "new SbbFocusTrapController(this)"
107322
+ },
107323
+ {
107324
+ "kind": "field",
107325
+ "name": "_scrollHandler",
107326
+ "privacy": "private",
107327
+ "default": "new SbbScrollHandler()"
107328
+ },
107329
+ {
107330
+ "kind": "field",
107331
+ "name": "_inertController",
107332
+ "privacy": "private",
107333
+ "default": "new SbbInertController(this)"
107334
+ },
107335
+ {
107336
+ "kind": "field",
107337
+ "name": "_mobileBreakpoint",
107338
+ "privacy": "private",
107339
+ "default": "SbbMediaQueryBreakpointSmallAndBelow"
107340
+ },
107341
+ {
107342
+ "kind": "field",
107343
+ "name": "_mediaMatcher",
107344
+ "privacy": "private",
107345
+ "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
107346
+ },
107347
+ {
107348
+ "kind": "field",
107349
+ "name": "_darkModeController",
107350
+ "privacy": "private",
107351
+ "default": "new SbbDarkModeController(this, () => this._syncNegative())"
107401
107352
  },
107402
107353
  {
107403
107354
  "kind": "field",
107404
- "name": "_validityStates",
107355
+ "name": "_language",
107405
107356
  "privacy": "private",
107406
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
107407
- "inheritedFrom": {
107408
- "name": "SbbFormAssociatedMixin",
107409
- "module": "core/mixins/form-associated-mixin.js"
107410
- }
107357
+ "default": "new SbbLanguageController(this)"
107411
107358
  },
107412
107359
  {
107413
107360
  "kind": "field",
107414
- "name": "formDisabled",
107361
+ "name": "_nestedMenu",
107415
107362
  "type": {
107416
- "text": "boolean"
107363
+ "text": "SbbMenuElement | null"
107417
107364
  },
107418
- "privacy": "protected",
107419
- "default": "false",
107420
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
107365
+ "privacy": "private",
107366
+ "default": "null"
107367
+ },
107368
+ {
107369
+ "kind": "method",
107370
+ "name": "escapeStrategy",
107371
+ "privacy": "public",
107372
+ "return": {
107373
+ "type": {
107374
+ "text": "void"
107375
+ }
107376
+ },
107377
+ "description": "The method which is called on escape key press. Defaults to calling close()",
107421
107378
  "inheritedFrom": {
107422
- "name": "SbbFormAssociatedMixin",
107423
- "module": "core/mixins/form-associated-mixin.js"
107379
+ "name": "SbbOpenCloseBaseElement",
107380
+ "module": "core/base-elements/open-close-base-element.js"
107424
107381
  }
107425
107382
  },
107426
107383
  {
107427
107384
  "kind": "method",
107428
- "name": "checkValidity",
107385
+ "name": "open",
107429
107386
  "privacy": "public",
107430
107387
  "return": {
107431
107388
  "type": {
107432
- "text": "boolean"
107389
+ "text": "void"
107433
107390
  }
107434
107391
  },
107435
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
107392
+ "description": "Opens the menu on trigger click.",
107436
107393
  "inheritedFrom": {
107437
- "name": "SbbFormAssociatedMixin",
107438
- "module": "core/mixins/form-associated-mixin.js"
107394
+ "name": "SbbOpenCloseBaseElement",
107395
+ "module": "core/base-elements/open-close-base-element.js"
107439
107396
  }
107440
107397
  },
107441
107398
  {
107442
107399
  "kind": "method",
107443
- "name": "reportValidity",
107400
+ "name": "close",
107444
107401
  "privacy": "public",
107445
107402
  "return": {
107446
107403
  "type": {
107447
- "text": "boolean"
107404
+ "text": "void"
107448
107405
  }
107449
107406
  },
107450
- "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.",
107407
+ "description": "Closes the menu and all its nested menus.",
107451
107408
  "inheritedFrom": {
107452
- "name": "SbbFormAssociatedMixin",
107453
- "module": "core/mixins/form-associated-mixin.js"
107409
+ "name": "SbbOpenCloseBaseElement",
107410
+ "module": "core/base-elements/open-close-base-element.js"
107454
107411
  }
107455
107412
  },
107456
107413
  {
107457
107414
  "kind": "method",
107458
- "name": "setCustomValidity",
107415
+ "name": "closeAll",
107459
107416
  "privacy": "public",
107460
107417
  "return": {
107461
107418
  "type": {
107462
107419
  "text": "void"
107463
107420
  }
107464
107421
  },
107422
+ "description": "Closes the menu and all related menus (nested and parent menus)."
107423
+ },
107424
+ {
107425
+ "kind": "method",
107426
+ "name": "_close",
107427
+ "privacy": "private",
107428
+ "return": {
107429
+ "type": {
107430
+ "text": "void"
107431
+ }
107432
+ },
107465
107433
  "parameters": [
107466
107434
  {
107467
- "name": "message",
107468
- "type": {
107469
- "text": "string"
107470
- }
107435
+ "name": "closeAll",
107436
+ "default": "false",
107437
+ "description": "If true, it ensures animations are correct by toggling some states when closing all related menus at once.",
107438
+ "optional": true
107471
107439
  }
107472
- ],
107473
- "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.",
107474
- "inheritedFrom": {
107475
- "name": "SbbFormAssociatedMixin",
107476
- "module": "core/mixins/form-associated-mixin.js"
107477
- }
107440
+ ]
107478
107441
  },
107479
107442
  {
107480
107443
  "kind": "method",
107481
- "name": "_hasDisabledAncestor",
107444
+ "name": "_isZeroAnimationDuration",
107482
107445
  "privacy": "private",
107483
107446
  "return": {
107484
107447
  "type": {
107485
107448
  "text": "boolean"
107486
107449
  }
107487
- },
107488
- "inheritedFrom": {
107489
- "name": "SbbFormAssociatedMixin",
107490
- "module": "core/mixins/form-associated-mixin.js"
107491
107450
  }
107492
107451
  },
107493
107452
  {
107494
107453
  "kind": "method",
107495
- "name": "updateFormValue",
107496
- "privacy": "protected",
107454
+ "name": "_handleOpening",
107455
+ "privacy": "private",
107497
107456
  "return": {
107498
107457
  "type": {
107499
107458
  "text": "void"
107500
107459
  }
107501
- },
107502
- "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",
107503
- "inheritedFrom": {
107504
- "name": "SbbFormAssociatedMixin",
107505
- "module": "core/mixins/form-associated-mixin.js"
107506
107460
  }
107507
107461
  },
107508
107462
  {
107509
107463
  "kind": "method",
107510
- "name": "formState",
107511
- "privacy": "protected",
107464
+ "name": "_handleClosing",
107465
+ "privacy": "private",
107512
107466
  "return": {
107513
107467
  "type": {
107514
- "text": "FormRestoreState"
107468
+ "text": "void"
107515
107469
  }
107516
- },
107517
- "inheritedFrom": {
107518
- "name": "SbbFormAssociatedMixin",
107519
- "module": "core/mixins/form-associated-mixin.js"
107520
107470
  }
107521
107471
  },
107522
107472
  {
107523
107473
  "kind": "method",
107524
- "name": "setValidityFlag",
107525
- "privacy": "protected",
107474
+ "name": "_handleKeyDown",
107475
+ "privacy": "private",
107526
107476
  "return": {
107527
107477
  "type": {
107528
107478
  "text": "void"
@@ -107530,35 +107480,37 @@
107530
107480
  },
107531
107481
  "parameters": [
107532
107482
  {
107533
- "name": "flag",
107534
- "type": {
107535
- "text": "T"
107536
- }
107537
- },
107538
- {
107539
- "name": "message",
107540
- "type": {
107541
- "text": "string"
107542
- }
107543
- },
107544
- {
107545
- "name": "flagValue",
107546
- "optional": true,
107483
+ "name": "evt",
107547
107484
  "type": {
107548
- "text": "ValidityStateFlags[T]"
107485
+ "text": "KeyboardEvent"
107549
107486
  }
107550
107487
  }
107551
- ],
107552
- "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).",
107553
- "inheritedFrom": {
107554
- "name": "SbbFormAssociatedMixin",
107555
- "module": "core/mixins/form-associated-mixin.js"
107488
+ ]
107489
+ },
107490
+ {
107491
+ "kind": "method",
107492
+ "name": "_configureTrigger",
107493
+ "privacy": "private",
107494
+ "return": {
107495
+ "type": {
107496
+ "text": "void"
107497
+ }
107556
107498
  }
107557
107499
  },
107558
107500
  {
107559
107501
  "kind": "method",
107560
- "name": "removeValidityFlag",
107561
- "privacy": "protected",
107502
+ "name": "_attachWindowEvents",
107503
+ "privacy": "private",
107504
+ "return": {
107505
+ "type": {
107506
+ "text": "void"
107507
+ }
107508
+ }
107509
+ },
107510
+ {
107511
+ "kind": "method",
107512
+ "name": "_interactiveElementClick",
107513
+ "privacy": "private",
107562
107514
  "return": {
107563
107515
  "type": {
107564
107516
  "text": "void"
@@ -107566,158 +107518,250 @@
107566
107518
  },
107567
107519
  "parameters": [
107568
107520
  {
107569
- "name": "flag",
107521
+ "name": "event",
107570
107522
  "type": {
107571
- "text": "T"
107523
+ "text": "Event"
107572
107524
  }
107573
107525
  }
107574
- ],
107575
- "description": "Removes the validity state flag entry and updates validity state.",
107576
- "inheritedFrom": {
107577
- "name": "SbbFormAssociatedMixin",
107578
- "module": "core/mixins/form-associated-mixin.js"
107579
- }
107526
+ ]
107527
+ },
107528
+ {
107529
+ "kind": "field",
107530
+ "name": "_pointerDownListener",
107531
+ "privacy": "private"
107532
+ },
107533
+ {
107534
+ "kind": "field",
107535
+ "name": "_closeOnBackdropClick",
107536
+ "privacy": "private"
107580
107537
  },
107581
107538
  {
107582
107539
  "kind": "method",
107583
- "name": "validate",
107584
- "privacy": "protected",
107540
+ "name": "_nestedMenus",
107541
+ "privacy": "private",
107585
107542
  "return": {
107586
107543
  "type": {
107587
- "text": "void"
107544
+ "text": "SbbMenuElement[]"
107588
107545
  }
107589
107546
  },
107590
- "description": "To be called whenever the current element needs to be validated.",
107591
- "inheritedFrom": {
107592
- "name": "SbbFormAssociatedMixin",
107593
- "module": "core/mixins/form-associated-mixin.js"
107547
+ "description": "Converts the linked list into an array of SbbMenuElement."
107548
+ },
107549
+ {
107550
+ "kind": "method",
107551
+ "name": "_parentMenu",
107552
+ "privacy": "private",
107553
+ "return": {
107554
+ "type": {
107555
+ "text": "SbbMenuElement | null"
107556
+ }
107594
107557
  }
107595
107558
  },
107596
107559
  {
107597
107560
  "kind": "method",
107598
- "name": "shouldValidate",
107599
- "privacy": "protected",
107561
+ "name": "_mainMenu",
107562
+ "privacy": "private",
107563
+ "return": {
107564
+ "type": {
107565
+ "text": "SbbMenuElement"
107566
+ }
107567
+ },
107568
+ "description": "The outermost menu."
107569
+ },
107570
+ {
107571
+ "kind": "method",
107572
+ "name": "_isNested",
107573
+ "privacy": "private",
107600
107574
  "return": {
107601
107575
  "type": {
107602
107576
  "text": "boolean"
107603
107577
  }
107578
+ }
107579
+ },
107580
+ {
107581
+ "kind": "method",
107582
+ "name": "_updateNestedInert",
107583
+ "privacy": "private",
107584
+ "return": {
107585
+ "type": {
107586
+ "text": "void"
107587
+ }
107588
+ }
107589
+ },
107590
+ {
107591
+ "kind": "method",
107592
+ "name": "_handleMouseOver",
107593
+ "privacy": "private",
107594
+ "return": {
107595
+ "type": {
107596
+ "text": "void"
107597
+ }
107604
107598
  },
107605
107599
  "parameters": [
107606
107600
  {
107607
- "name": "name",
107601
+ "name": "event",
107602
+ "type": {
107603
+ "text": "MouseEvent"
107604
+ }
107605
+ }
107606
+ ]
107607
+ },
107608
+ {
107609
+ "kind": "method",
107610
+ "name": "_onMenuAnimationEnd",
107611
+ "privacy": "private",
107612
+ "return": {
107613
+ "type": {
107614
+ "text": "void"
107615
+ }
107616
+ },
107617
+ "parameters": [
107618
+ {
107619
+ "name": "event",
107608
107620
  "type": {
107609
- "text": "PropertyKey | undefined"
107621
+ "text": "AnimationEvent"
107610
107622
  }
107611
107623
  }
107612
- ],
107613
- "description": "Whether validation should be run on a property change with the given name.",
107614
- "inheritedFrom": {
107615
- "name": "SbbFormAssociatedMixin",
107616
- "module": "core/mixins/form-associated-mixin.js"
107624
+ ]
107625
+ },
107626
+ {
107627
+ "kind": "method",
107628
+ "name": "_setMenuPosition",
107629
+ "privacy": "private",
107630
+ "return": {
107631
+ "type": {
107632
+ "text": "void"
107633
+ }
107617
107634
  }
107618
107635
  },
107619
107636
  {
107620
107637
  "kind": "method",
107621
- "name": "_setInternalValidity",
107638
+ "name": "_syncNegative",
107622
107639
  "privacy": "private",
107623
107640
  "return": {
107624
107641
  "type": {
107625
107642
  "text": "void"
107626
107643
  }
107627
- },
107628
- "inheritedFrom": {
107629
- "name": "SbbFormAssociatedMixin",
107630
- "module": "core/mixins/form-associated-mixin.js"
107631
107644
  }
107632
107645
  },
107633
107646
  {
107634
- "kind": "field",
107635
- "name": "_preventScrollOnSpaceKeydown",
107647
+ "kind": "method",
107648
+ "name": "_isMobile",
107636
107649
  "privacy": "private",
107637
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
107638
- "parameters": [
107639
- {
107640
- "description": "The origin event.",
107641
- "name": "event"
107650
+ "return": {
107651
+ "type": {
107652
+ "text": "boolean"
107642
107653
  }
107643
- ],
107644
- "inheritedFrom": {
107645
- "name": "SbbButtonLikeBaseElement",
107646
- "module": "core/base-elements/button-base-element.js"
107647
107654
  }
107648
107655
  },
107649
107656
  {
107650
107657
  "kind": "field",
107651
- "name": "_removeActiveMarker",
107652
- "privacy": "private",
107658
+ "name": "events",
107659
+ "privacy": "public",
107660
+ "static": true,
107661
+ "readonly": true,
107662
+ "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
107663
+ "type": {
107664
+ "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
107665
+ },
107653
107666
  "inheritedFrom": {
107654
- "name": "SbbButtonLikeBaseElement",
107655
- "module": "core/base-elements/button-base-element.js"
107667
+ "name": "SbbOpenCloseBaseElement",
107668
+ "module": "core/base-elements/open-close-base-element.js"
107656
107669
  }
107657
107670
  },
107658
107671
  {
107659
107672
  "kind": "field",
107660
- "name": "_dispatchClickEventOnSpaceKeyup",
107661
- "privacy": "private",
107662
- "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.",
107663
- "parameters": [
107664
- {
107665
- "description": "The origin event.",
107666
- "name": "event"
107667
- }
107668
- ],
107673
+ "name": "state",
107674
+ "privacy": "protected",
107675
+ "description": "The state of the component.",
107676
+ "type": {
107677
+ "text": "SbbOpenedClosedState"
107678
+ },
107679
+ "default": "'closed'",
107669
107680
  "inheritedFrom": {
107670
- "name": "SbbButtonLikeBaseElement",
107671
- "module": "core/base-elements/button-base-element.js"
107681
+ "name": "SbbOpenCloseBaseElement",
107682
+ "module": "core/base-elements/open-close-base-element.js"
107672
107683
  }
107673
107684
  },
107674
107685
  {
107675
107686
  "kind": "field",
107676
- "name": "_dispatchClickEvent",
107687
+ "name": "_state",
107688
+ "type": {
107689
+ "text": "SbbOpenedClosedState"
107690
+ },
107677
107691
  "privacy": "private",
107678
107692
  "inheritedFrom": {
107679
- "name": "SbbButtonLikeBaseElement",
107680
- "module": "core/base-elements/button-base-element.js"
107693
+ "name": "SbbOpenCloseBaseElement",
107694
+ "module": "core/base-elements/open-close-base-element.js"
107681
107695
  }
107682
107696
  },
107683
107697
  {
107684
107698
  "kind": "field",
107685
- "name": "maybeDisabled",
107699
+ "name": "isOpen",
107686
107700
  "type": {
107687
- "text": "boolean | undefined"
107701
+ "text": "boolean"
107688
107702
  },
107689
- "privacy": "protected",
107703
+ "privacy": "public",
107704
+ "description": "Whether the element is open.",
107690
107705
  "readonly": true,
107691
107706
  "inheritedFrom": {
107692
- "name": "SbbActionBaseElement",
107693
- "module": "core/base-elements/action-base-element.js"
107707
+ "name": "SbbOpenCloseBaseElement",
107708
+ "module": "core/base-elements/open-close-base-element.js"
107694
107709
  }
107695
107710
  },
107696
107711
  {
107697
- "kind": "field",
107698
- "name": "maybeDisabledInteractive",
107699
- "type": {
107700
- "text": "boolean | undefined"
107712
+ "kind": "method",
107713
+ "name": "dispatchBeforeOpenEvent",
107714
+ "privacy": "protected",
107715
+ "return": {
107716
+ "type": {
107717
+ "text": "boolean"
107718
+ }
107701
107719
  },
107720
+ "inheritedFrom": {
107721
+ "name": "SbbOpenCloseBaseElement",
107722
+ "module": "core/base-elements/open-close-base-element.js"
107723
+ }
107724
+ },
107725
+ {
107726
+ "kind": "method",
107727
+ "name": "dispatchOpenEvent",
107702
107728
  "privacy": "protected",
107703
- "readonly": true,
107729
+ "return": {
107730
+ "type": {
107731
+ "text": "boolean"
107732
+ }
107733
+ },
107704
107734
  "inheritedFrom": {
107705
- "name": "SbbActionBaseElement",
107706
- "module": "core/base-elements/action-base-element.js"
107735
+ "name": "SbbOpenCloseBaseElement",
107736
+ "module": "core/base-elements/open-close-base-element.js"
107707
107737
  }
107708
107738
  },
107709
107739
  {
107710
107740
  "kind": "method",
107711
- "name": "setupBaseEventHandlers",
107741
+ "name": "dispatchBeforeCloseEvent",
107712
107742
  "privacy": "protected",
107713
107743
  "return": {
107714
107744
  "type": {
107715
- "text": "void"
107745
+ "text": "boolean"
107716
107746
  }
107717
107747
  },
107718
107748
  "inheritedFrom": {
107719
- "name": "SbbActionBaseElement",
107720
- "module": "core/base-elements/action-base-element.js"
107749
+ "name": "SbbOpenCloseBaseElement",
107750
+ "module": "core/base-elements/open-close-base-element.js"
107751
+ }
107752
+ },
107753
+ {
107754
+ "kind": "method",
107755
+ "name": "dispatchCloseEvent",
107756
+ "privacy": "protected",
107757
+ "return": {
107758
+ "type": {
107759
+ "text": "boolean"
107760
+ }
107761
+ },
107762
+ "inheritedFrom": {
107763
+ "name": "SbbOpenCloseBaseElement",
107764
+ "module": "core/base-elements/open-close-base-element.js"
107721
107765
  }
107722
107766
  },
107723
107767
  {
@@ -107826,110 +107870,66 @@
107826
107870
  }
107827
107871
  }
107828
107872
  ],
107829
- "mixins": [
107830
- {
107831
- "name": "SbbDisabledTabIndexActionMixin",
107832
- "module": "core/mixins.js"
107833
- },
107873
+ "attributes": [
107834
107874
  {
107835
- "name": "SbbMenuActionCommonElementMixin",
107836
- "module": "menu/common/menu-action-common.js"
107875
+ "name": "trigger",
107876
+ "type": {
107877
+ "text": "HTMLElement | null"
107878
+ },
107879
+ "default": "null",
107880
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
107881
+ "fieldName": "trigger"
107837
107882
  }
107838
107883
  ],
107839
107884
  "superclass": {
107840
- "name": "SbbButtonBaseElement",
107885
+ "name": "SbbOpenCloseBaseElement",
107841
107886
  "module": "core/base-elements.js"
107842
107887
  },
107843
- "tagName": "sbb-menu-button",
107888
+ "tagName": "sbb-menu",
107844
107889
  "customElement": true,
107845
- "attributes": [
107846
- {
107847
- "name": "disabled-interactive",
107848
- "type": {
107849
- "text": "boolean"
107850
- },
107851
- "default": "false",
107852
- "description": "Whether the button should be aria-disabled but stay interactive.",
107853
- "fieldName": "disabledInteractive",
107854
- "inheritedFrom": {
107855
- "name": "SbbDisabledInteractiveMixin",
107856
- "module": "core/mixins/disabled-mixin.js"
107857
- }
107858
- },
107859
- {
107860
- "name": "disabled",
107861
- "description": "Whether the component is disabled.",
107862
- "default": "false",
107863
- "type": {
107864
- "text": "boolean"
107865
- },
107866
- "fieldName": "disabled",
107867
- "inheritedFrom": {
107868
- "name": "SbbDisabledMixin",
107869
- "module": "core/mixins/disabled-mixin.js"
107870
- }
107871
- },
107872
- {
107873
- "name": "icon-name",
107874
- "type": {
107875
- "text": "string"
107876
- },
107877
- "default": "''",
107878
- "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.",
107879
- "fieldName": "iconName",
107880
- "inheritedFrom": {
107881
- "name": "SbbIconNameMixin",
107882
- "module": "icon/icon-name-mixin.js"
107883
- }
107884
- },
107890
+ "events": [
107885
107891
  {
107886
- "name": "value",
107892
+ "name": "beforeopen",
107887
107893
  "type": {
107888
- "text": "string"
107894
+ "text": "Event"
107889
107895
  },
107890
- "default": "''",
107891
- "description": "Value of the form element.",
107892
- "fieldName": "value",
107896
+ "description": "Emits whenever the component starts the opening transition. Can be canceled.",
107893
107897
  "inheritedFrom": {
107894
- "name": "SbbButtonBaseElement",
107895
- "module": "core/base-elements/button-base-element.js"
107898
+ "name": "SbbOpenCloseBaseElement",
107899
+ "module": "core/base-elements/open-close-base-element.js"
107896
107900
  }
107897
107901
  },
107898
107902
  {
107899
- "name": "type",
107900
- "description": "The type attribute to use for the button.",
107901
- "default": "'button'",
107903
+ "name": "open",
107902
107904
  "type": {
107903
- "text": "SbbButtonType"
107905
+ "text": "Event"
107904
107906
  },
107905
- "fieldName": "type",
107907
+ "description": "Emits whenever the component is opened.",
107906
107908
  "inheritedFrom": {
107907
- "name": "SbbButtonBaseElement",
107908
- "module": "core/base-elements/button-base-element.js"
107909
+ "name": "SbbOpenCloseBaseElement",
107910
+ "module": "core/base-elements/open-close-base-element.js"
107909
107911
  }
107910
107912
  },
107911
107913
  {
107912
- "name": "form",
107913
- "description": "The `<form>` element to associate the button with.",
107914
+ "name": "beforeclose",
107914
107915
  "type": {
107915
- "text": "HTMLFormElement | null"
107916
+ "text": "Event"
107916
107917
  },
107917
- "fieldName": "form",
107918
+ "description": "Emits whenever the component begins the closing transition. Can be canceled.",
107918
107919
  "inheritedFrom": {
107919
- "name": "SbbButtonBaseElement",
107920
- "module": "core/base-elements/button-base-element.js"
107920
+ "name": "SbbOpenCloseBaseElement",
107921
+ "module": "core/base-elements/open-close-base-element.js"
107921
107922
  }
107922
107923
  },
107923
107924
  {
107924
- "name": "name",
107925
- "description": "Name of the form element. Will be read from name attribute.",
107925
+ "name": "close",
107926
107926
  "type": {
107927
- "text": "string"
107927
+ "text": "Event"
107928
107928
  },
107929
- "fieldName": "name",
107929
+ "description": "Emits whenever the component is closed.",
107930
107930
  "inheritedFrom": {
107931
- "name": "SbbFormAssociatedMixin",
107932
- "module": "core/mixins/form-associated-mixin.js"
107931
+ "name": "SbbOpenCloseBaseElement",
107932
+ "module": "core/base-elements/open-close-base-element.js"
107933
107933
  }
107934
107934
  }
107935
107935
  ]
@@ -107938,10 +107938,10 @@
107938
107938
  "exports": [
107939
107939
  {
107940
107940
  "kind": "js",
107941
- "name": "SbbMenuButtonElement",
107941
+ "name": "SbbMenuElement",
107942
107942
  "declaration": {
107943
- "name": "SbbMenuButtonElement",
107944
- "module": "menu/menu-button/menu-button.component.js"
107943
+ "name": "SbbMenuElement",
107944
+ "module": "menu/menu/menu.component.js"
107945
107945
  }
107946
107946
  }
107947
107947
  ]