@sbb-esta/lyne-elements-dev 4.8.1-dev.1774045249 → 4.8.1-dev.1774250628

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.
@@ -105434,23 +105434,27 @@
105434
105434
  },
105435
105435
  {
105436
105436
  "kind": "javascript-module",
105437
- "path": "menu/menu/menu.component.js",
105437
+ "path": "menu/menu-button/menu-button.component.js",
105438
105438
  "declarations": [
105439
105439
  {
105440
105440
  "kind": "class",
105441
- "description": "It displays a contextual menu with one or more action element.",
105442
- "name": "SbbMenuElement",
105441
+ "description": "It displays a button element that can be used in the `sbb-menu` component.",
105442
+ "name": "SbbMenuButtonElement",
105443
105443
  "cssProperties": [
105444
105444
  {
105445
- "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`.",
105446
- "name": "--sbb-menu-z-index",
105447
- "default": "var(--sbb-overlay-default-z-index)"
105445
+ "description": "Can be used to modify horizontal padding.",
105446
+ "name": "--sbb-menu-action-outer-horizontal-padding",
105447
+ "default": "var(--sbb-spacing-fixed-3x)"
105448
105448
  }
105449
105449
  ],
105450
105450
  "slots": [
105451
105451
  {
105452
- "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
105452
+ "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
105453
105453
  "name": ""
105454
+ },
105455
+ {
105456
+ "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
105457
+ "name": "icon"
105454
105458
  }
105455
105459
  ],
105456
105460
  "members": [
@@ -105467,274 +105471,261 @@
105467
105471
  "name": "SbbElement",
105468
105472
  "module": "core/base-elements/element.js"
105469
105473
  },
105470
- "default": "'sbb-menu'"
105474
+ "default": "'sbb-menu-button'"
105471
105475
  },
105472
105476
  {
105473
105477
  "kind": "field",
105474
105478
  "name": "role",
105475
105479
  "type": {
105476
- "text": "string"
105480
+ "text": "ElementInternals['role']"
105477
105481
  },
105478
105482
  "privacy": "public",
105479
105483
  "static": true,
105480
105484
  "readonly": true,
105481
- "default": "'menu'"
105485
+ "default": "'menuitem'",
105486
+ "inheritedFrom": {
105487
+ "name": "SbbButtonLikeBaseElement",
105488
+ "module": "core/base-elements/button-base-element.js"
105489
+ }
105482
105490
  },
105483
105491
  {
105484
105492
  "kind": "field",
105485
- "name": "trigger",
105493
+ "name": "disabledInteractive",
105486
105494
  "type": {
105487
- "text": "HTMLElement | null"
105495
+ "text": "boolean"
105488
105496
  },
105489
105497
  "privacy": "public",
105490
- "default": "null",
105491
- "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
105492
- "attribute": "trigger"
105493
- },
105494
- {
105495
- "kind": "field",
105496
- "name": "_menu",
105497
- "type": {
105498
- "text": "HTMLDivElement"
105499
- },
105500
- "privacy": "private"
105501
- },
105502
- {
105503
- "kind": "field",
105504
- "name": "_triggerElement",
105505
- "type": {
105506
- "text": "HTMLElement | null"
105507
- },
105508
- "privacy": "private",
105509
- "default": "null"
105510
- },
105511
- {
105512
- "kind": "field",
105513
- "name": "_triggerAbortController",
105514
- "type": {
105515
- "text": "AbortController"
105516
- },
105517
- "privacy": "private"
105498
+ "default": "false",
105499
+ "description": "Whether the button should be aria-disabled but stay interactive.",
105500
+ "attribute": "disabled-interactive",
105501
+ "reflects": true,
105502
+ "inheritedFrom": {
105503
+ "name": "SbbDisabledInteractiveMixin",
105504
+ "module": "core/mixins/disabled-mixin.js"
105505
+ }
105518
105506
  },
105519
105507
  {
105520
105508
  "kind": "field",
105521
- "name": "_isPointerDownEventOnMenu",
105509
+ "name": "disabled",
105510
+ "privacy": "public",
105511
+ "description": "Whether the component is disabled.",
105512
+ "default": "false",
105522
105513
  "type": {
105523
105514
  "text": "boolean"
105524
105515
  },
105525
- "privacy": "private",
105526
- "default": "false"
105527
- },
105528
- {
105529
- "kind": "field",
105530
- "name": "_windowEventsController",
105531
- "type": {
105532
- "text": "AbortController"
105533
- },
105534
- "privacy": "private"
105535
- },
105536
- {
105537
- "kind": "field",
105538
- "name": "_escapableOverlayController",
105539
- "privacy": "private",
105540
- "default": "new SbbEscapableOverlayController(this)"
105541
- },
105542
- {
105543
- "kind": "field",
105544
- "name": "_focusTrapController",
105545
- "privacy": "private",
105546
- "default": "new SbbFocusTrapController(this)"
105547
- },
105548
- {
105549
- "kind": "field",
105550
- "name": "_scrollHandler",
105551
- "privacy": "private",
105552
- "default": "new SbbScrollHandler()"
105553
- },
105554
- {
105555
- "kind": "field",
105556
- "name": "_inertController",
105557
- "privacy": "private",
105558
- "default": "new SbbInertController(this)"
105559
- },
105560
- {
105561
- "kind": "field",
105562
- "name": "_mobileBreakpoint",
105563
- "privacy": "private",
105564
- "default": "SbbMediaQueryBreakpointSmallAndBelow"
105565
- },
105566
- {
105567
- "kind": "field",
105568
- "name": "_mediaMatcher",
105569
- "privacy": "private",
105570
- "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
105571
- },
105572
- {
105573
- "kind": "field",
105574
- "name": "_darkModeController",
105575
- "privacy": "private",
105576
- "default": "new SbbDarkModeController(this, () => this._syncNegative())"
105516
+ "attribute": "disabled",
105517
+ "reflects": true,
105518
+ "inheritedFrom": {
105519
+ "name": "SbbDisabledMixin",
105520
+ "module": "core/mixins/disabled-mixin.js"
105521
+ }
105577
105522
  },
105578
105523
  {
105579
105524
  "kind": "field",
105580
- "name": "_language",
105525
+ "name": "#disabled",
105581
105526
  "privacy": "private",
105582
- "default": "new SbbLanguageController(this)"
105583
- },
105584
- {
105585
- "kind": "field",
105586
- "name": "_nestedMenu",
105587
105527
  "type": {
105588
- "text": "SbbMenuElement | null"
105528
+ "text": "boolean"
105589
105529
  },
105590
- "privacy": "private",
105591
- "default": "null"
105530
+ "default": "false",
105531
+ "inheritedFrom": {
105532
+ "name": "SbbDisabledMixin",
105533
+ "module": "core/mixins/disabled-mixin.js"
105534
+ }
105592
105535
  },
105593
105536
  {
105594
105537
  "kind": "method",
105595
- "name": "escapeStrategy",
105596
- "privacy": "public",
105538
+ "name": "isDisabledExternally",
105539
+ "privacy": "protected",
105597
105540
  "return": {
105598
105541
  "type": {
105599
- "text": "void"
105542
+ "text": "boolean"
105600
105543
  }
105601
105544
  },
105602
- "description": "The method which is called on escape key press. Defaults to calling close()",
105545
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
105603
105546
  "inheritedFrom": {
105604
- "name": "SbbOpenCloseBaseElement",
105605
- "module": "core/base-elements/open-close-base-element.js"
105547
+ "name": "SbbDisabledMixin",
105548
+ "module": "core/mixins/disabled-mixin.js"
105606
105549
  }
105607
105550
  },
105608
105551
  {
105609
- "kind": "method",
105610
- "name": "open",
105611
- "privacy": "public",
105612
- "return": {
105613
- "type": {
105614
- "text": "void"
105615
- }
105552
+ "kind": "field",
105553
+ "name": "styles",
105554
+ "type": {
105555
+ "text": "CSSResultGroup"
105616
105556
  },
105617
- "description": "Opens the menu on trigger click.",
105557
+ "privacy": "public",
105558
+ "static": true,
105559
+ "default": "[boxSizingStyles, style]",
105618
105560
  "inheritedFrom": {
105619
- "name": "SbbOpenCloseBaseElement",
105620
- "module": "core/base-elements/open-close-base-element.js"
105561
+ "name": "SbbMenuActionCommonElementMixin",
105562
+ "module": "menu/common/menu-action-common.js"
105621
105563
  }
105622
105564
  },
105623
105565
  {
105624
105566
  "kind": "method",
105625
- "name": "close",
105626
- "privacy": "public",
105567
+ "name": "renderTemplate",
105568
+ "privacy": "protected",
105627
105569
  "return": {
105628
105570
  "type": {
105629
- "text": "void"
105571
+ "text": "TemplateResult"
105630
105572
  }
105631
105573
  },
105632
- "description": "Closes the menu and all its nested menus.",
105574
+ "description": "Override this method to render the component template.",
105633
105575
  "inheritedFrom": {
105634
- "name": "SbbOpenCloseBaseElement",
105635
- "module": "core/base-elements/open-close-base-element.js"
105576
+ "name": "SbbActionBaseElement",
105577
+ "module": "core/base-elements/action-base-element.js"
105636
105578
  }
105637
105579
  },
105638
105580
  {
105639
- "kind": "method",
105640
- "name": "closeAll",
105641
- "privacy": "public",
105642
- "return": {
105643
- "type": {
105644
- "text": "void"
105645
- }
105581
+ "kind": "field",
105582
+ "name": "iconName",
105583
+ "type": {
105584
+ "text": "string"
105646
105585
  },
105647
- "description": "Closes the menu and all related menus (nested and parent menus)."
105586
+ "privacy": "public",
105587
+ "default": "''",
105588
+ "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.",
105589
+ "attribute": "icon-name",
105590
+ "inheritedFrom": {
105591
+ "name": "SbbIconNameMixin",
105592
+ "module": "icon/icon-name-mixin.js"
105593
+ }
105648
105594
  },
105649
105595
  {
105650
105596
  "kind": "method",
105651
- "name": "_close",
105652
- "privacy": "private",
105597
+ "name": "renderIconSlot",
105598
+ "privacy": "protected",
105653
105599
  "return": {
105654
105600
  "type": {
105655
- "text": "void"
105601
+ "text": "TemplateResult"
105656
105602
  }
105657
105603
  },
105658
105604
  "parameters": [
105659
105605
  {
105660
- "name": "closeAll",
105661
- "default": "false",
105662
- "description": "If true, it ensures animations are correct by toggling some states when closing all related menus at once.",
105663
- "optional": true
105606
+ "name": "classname",
105607
+ "optional": true,
105608
+ "type": {
105609
+ "text": "string"
105610
+ }
105664
105611
  }
105665
- ]
105612
+ ],
105613
+ "inheritedFrom": {
105614
+ "name": "SbbIconNameMixin",
105615
+ "module": "icon/icon-name-mixin.js"
105616
+ }
105666
105617
  },
105667
105618
  {
105668
105619
  "kind": "method",
105669
- "name": "_isZeroAnimationDuration",
105670
- "privacy": "private",
105620
+ "name": "renderIconName",
105621
+ "privacy": "protected",
105671
105622
  "return": {
105672
105623
  "type": {
105673
- "text": "boolean"
105624
+ "text": "string"
105674
105625
  }
105626
+ },
105627
+ "inheritedFrom": {
105628
+ "name": "SbbIconNameMixin",
105629
+ "module": "icon/icon-name-mixin.js"
105675
105630
  }
105676
105631
  },
105677
105632
  {
105678
105633
  "kind": "method",
105679
- "name": "_handleOpening",
105634
+ "name": "_renderIconName",
105680
105635
  "privacy": "private",
105681
105636
  "return": {
105682
105637
  "type": {
105683
- "text": "void"
105638
+ "text": "string"
105684
105639
  }
105640
+ },
105641
+ "inheritedFrom": {
105642
+ "name": "SbbIconNameMixin",
105643
+ "module": "icon/icon-name-mixin.js"
105685
105644
  }
105686
105645
  },
105687
105646
  {
105688
- "kind": "method",
105689
- "name": "_handleClosing",
105647
+ "kind": "field",
105648
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
105649
+ "type": {
105650
+ "text": "array"
105651
+ },
105690
105652
  "privacy": "private",
105691
- "return": {
105692
- "type": {
105693
- "text": "void"
105694
- }
105653
+ "readonly": true,
105654
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
105655
+ "inheritedFrom": {
105656
+ "name": "SbbButtonBaseElement",
105657
+ "module": "core/base-elements/button-base-element.js"
105695
105658
  }
105696
105659
  },
105697
105660
  {
105698
- "kind": "method",
105699
- "name": "_handleKeyDown",
105700
- "privacy": "private",
105701
- "return": {
105702
- "type": {
105703
- "text": "void"
105704
- }
105661
+ "kind": "field",
105662
+ "name": "value",
105663
+ "type": {
105664
+ "text": "string"
105705
105665
  },
105706
- "parameters": [
105707
- {
105708
- "name": "evt",
105709
- "type": {
105710
- "text": "KeyboardEvent"
105711
- }
105712
- }
105713
- ]
105666
+ "privacy": "public",
105667
+ "inheritedFrom": {
105668
+ "name": "SbbButtonBaseElement",
105669
+ "module": "core/base-elements/button-base-element.js"
105670
+ },
105671
+ "default": "''",
105672
+ "description": "Value of the form element.",
105673
+ "attribute": "value"
105714
105674
  },
105715
105675
  {
105716
- "kind": "method",
105717
- "name": "_configureTrigger",
105676
+ "kind": "field",
105677
+ "name": "type",
105678
+ "privacy": "public",
105679
+ "description": "The type attribute to use for the button.",
105680
+ "default": "'button'",
105681
+ "type": {
105682
+ "text": "SbbButtonType"
105683
+ },
105684
+ "attribute": "type",
105685
+ "inheritedFrom": {
105686
+ "name": "SbbButtonBaseElement",
105687
+ "module": "core/base-elements/button-base-element.js"
105688
+ }
105689
+ },
105690
+ {
105691
+ "kind": "field",
105692
+ "name": "form",
105693
+ "type": {
105694
+ "text": "HTMLFormElement | null"
105695
+ },
105696
+ "privacy": "public",
105697
+ "description": "The `<form>` element to associate the button with.",
105698
+ "inheritedFrom": {
105699
+ "name": "SbbButtonBaseElement",
105700
+ "module": "core/base-elements/button-base-element.js"
105701
+ },
105702
+ "attribute": "form"
105703
+ },
105704
+ {
105705
+ "kind": "field",
105706
+ "name": "_formId",
105707
+ "type": {
105708
+ "text": "string"
105709
+ },
105718
105710
  "privacy": "private",
105719
- "return": {
105720
- "type": {
105721
- "text": "void"
105722
- }
105711
+ "default": "''",
105712
+ "inheritedFrom": {
105713
+ "name": "SbbButtonBaseElement",
105714
+ "module": "core/base-elements/button-base-element.js"
105723
105715
  }
105724
105716
  },
105725
105717
  {
105726
- "kind": "method",
105727
- "name": "_attachWindowEvents",
105718
+ "kind": "field",
105719
+ "name": "_handleButtonClick",
105728
105720
  "privacy": "private",
105729
- "return": {
105730
- "type": {
105731
- "text": "void"
105732
- }
105721
+ "inheritedFrom": {
105722
+ "name": "SbbButtonBaseElement",
105723
+ "module": "core/base-elements/button-base-element.js"
105733
105724
  }
105734
105725
  },
105735
105726
  {
105736
105727
  "kind": "method",
105737
- "name": "_interactiveElementClick",
105728
+ "name": "_requestSubmit",
105738
105729
  "privacy": "private",
105739
105730
  "return": {
105740
105731
  "type": {
@@ -105743,79 +105734,154 @@
105743
105734
  },
105744
105735
  "parameters": [
105745
105736
  {
105746
- "name": "event",
105737
+ "name": "form",
105747
105738
  "type": {
105748
- "text": "Event"
105739
+ "text": "HTMLFormElement"
105749
105740
  }
105750
105741
  }
105751
- ]
105742
+ ],
105743
+ "inheritedFrom": {
105744
+ "name": "SbbButtonBaseElement",
105745
+ "module": "core/base-elements/button-base-element.js"
105746
+ }
105752
105747
  },
105753
105748
  {
105754
105749
  "kind": "field",
105755
- "name": "_pointerDownListener",
105756
- "privacy": "private"
105750
+ "name": "_formKeyDown",
105751
+ "privacy": "private",
105752
+ "inheritedFrom": {
105753
+ "name": "SbbButtonBaseElement",
105754
+ "module": "core/base-elements/button-base-element.js"
105755
+ }
105757
105756
  },
105758
105757
  {
105759
105758
  "kind": "field",
105760
- "name": "_closeOnBackdropClick",
105761
- "privacy": "private"
105759
+ "name": "formAssociated",
105760
+ "type": {
105761
+ "text": "boolean"
105762
+ },
105763
+ "privacy": "public",
105764
+ "static": true,
105765
+ "default": "true",
105766
+ "inheritedFrom": {
105767
+ "name": "SbbFormAssociatedMixin",
105768
+ "module": "core/mixins/form-associated-mixin.js"
105769
+ }
105762
105770
  },
105763
105771
  {
105764
- "kind": "method",
105765
- "name": "_nestedMenus",
105766
- "privacy": "private",
105767
- "return": {
105768
- "type": {
105769
- "text": "SbbMenuElement[]"
105770
- }
105772
+ "kind": "field",
105773
+ "name": "name",
105774
+ "privacy": "public",
105775
+ "description": "Name of the form element. Will be read from name attribute.",
105776
+ "type": {
105777
+ "text": "string"
105771
105778
  },
105772
- "description": "Converts the linked list into an array of SbbMenuElement."
105779
+ "attribute": "name",
105780
+ "inheritedFrom": {
105781
+ "name": "SbbFormAssociatedMixin",
105782
+ "module": "core/mixins/form-associated-mixin.js"
105783
+ }
105773
105784
  },
105774
105785
  {
105775
- "kind": "method",
105776
- "name": "_parentMenu",
105777
- "privacy": "private",
105778
- "return": {
105779
- "type": {
105780
- "text": "SbbMenuElement | null"
105781
- }
105786
+ "kind": "field",
105787
+ "name": "validity",
105788
+ "type": {
105789
+ "text": "ValidityState"
105790
+ },
105791
+ "privacy": "public",
105792
+ "description": "Returns the ValidityState object for this element.",
105793
+ "readonly": true,
105794
+ "inheritedFrom": {
105795
+ "name": "SbbFormAssociatedMixin",
105796
+ "module": "core/mixins/form-associated-mixin.js"
105782
105797
  }
105783
105798
  },
105784
105799
  {
105785
- "kind": "method",
105786
- "name": "_mainMenu",
105800
+ "kind": "field",
105801
+ "name": "validationMessage",
105802
+ "type": {
105803
+ "text": "string"
105804
+ },
105805
+ "privacy": "public",
105806
+ "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.",
105807
+ "readonly": true,
105808
+ "inheritedFrom": {
105809
+ "name": "SbbFormAssociatedMixin",
105810
+ "module": "core/mixins/form-associated-mixin.js"
105811
+ }
105812
+ },
105813
+ {
105814
+ "kind": "field",
105815
+ "name": "willValidate",
105816
+ "type": {
105817
+ "text": "boolean"
105818
+ },
105819
+ "privacy": "public",
105820
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
105821
+ "readonly": true,
105822
+ "inheritedFrom": {
105823
+ "name": "SbbFormAssociatedMixin",
105824
+ "module": "core/mixins/form-associated-mixin.js"
105825
+ }
105826
+ },
105827
+ {
105828
+ "kind": "field",
105829
+ "name": "_validityStates",
105787
105830
  "privacy": "private",
105788
- "return": {
105789
- "type": {
105790
- "text": "SbbMenuElement"
105791
- }
105831
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
105832
+ "inheritedFrom": {
105833
+ "name": "SbbFormAssociatedMixin",
105834
+ "module": "core/mixins/form-associated-mixin.js"
105835
+ }
105836
+ },
105837
+ {
105838
+ "kind": "field",
105839
+ "name": "formDisabled",
105840
+ "type": {
105841
+ "text": "boolean"
105792
105842
  },
105793
- "description": "The outermost menu."
105843
+ "privacy": "protected",
105844
+ "default": "false",
105845
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
105846
+ "inheritedFrom": {
105847
+ "name": "SbbFormAssociatedMixin",
105848
+ "module": "core/mixins/form-associated-mixin.js"
105849
+ }
105794
105850
  },
105795
105851
  {
105796
105852
  "kind": "method",
105797
- "name": "_isNested",
105798
- "privacy": "private",
105853
+ "name": "checkValidity",
105854
+ "privacy": "public",
105799
105855
  "return": {
105800
105856
  "type": {
105801
105857
  "text": "boolean"
105802
105858
  }
105859
+ },
105860
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
105861
+ "inheritedFrom": {
105862
+ "name": "SbbFormAssociatedMixin",
105863
+ "module": "core/mixins/form-associated-mixin.js"
105803
105864
  }
105804
105865
  },
105805
105866
  {
105806
105867
  "kind": "method",
105807
- "name": "_updateNestedInert",
105808
- "privacy": "private",
105868
+ "name": "reportValidity",
105869
+ "privacy": "public",
105809
105870
  "return": {
105810
105871
  "type": {
105811
- "text": "void"
105872
+ "text": "boolean"
105812
105873
  }
105874
+ },
105875
+ "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.",
105876
+ "inheritedFrom": {
105877
+ "name": "SbbFormAssociatedMixin",
105878
+ "module": "core/mixins/form-associated-mixin.js"
105813
105879
  }
105814
105880
  },
105815
105881
  {
105816
105882
  "kind": "method",
105817
- "name": "_handleMouseOver",
105818
- "privacy": "private",
105883
+ "name": "setCustomValidity",
105884
+ "privacy": "public",
105819
105885
  "return": {
105820
105886
  "type": {
105821
105887
  "text": "void"
@@ -105823,405 +105889,208 @@
105823
105889
  },
105824
105890
  "parameters": [
105825
105891
  {
105826
- "name": "event",
105892
+ "name": "message",
105827
105893
  "type": {
105828
- "text": "MouseEvent"
105894
+ "text": "string"
105829
105895
  }
105830
105896
  }
105831
- ]
105897
+ ],
105898
+ "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.",
105899
+ "inheritedFrom": {
105900
+ "name": "SbbFormAssociatedMixin",
105901
+ "module": "core/mixins/form-associated-mixin.js"
105902
+ }
105832
105903
  },
105833
105904
  {
105834
105905
  "kind": "method",
105835
- "name": "_onMenuAnimationEnd",
105906
+ "name": "_hasDisabledAncestor",
105836
105907
  "privacy": "private",
105837
105908
  "return": {
105838
105909
  "type": {
105839
- "text": "void"
105910
+ "text": "boolean"
105840
105911
  }
105841
105912
  },
105842
- "parameters": [
105843
- {
105844
- "name": "event",
105845
- "type": {
105846
- "text": "AnimationEvent"
105847
- }
105848
- }
105849
- ]
105850
- },
105851
- {
105852
- "kind": "method",
105853
- "name": "_setMenuPosition",
105854
- "privacy": "private",
105855
- "return": {
105856
- "type": {
105857
- "text": "void"
105858
- }
105913
+ "inheritedFrom": {
105914
+ "name": "SbbFormAssociatedMixin",
105915
+ "module": "core/mixins/form-associated-mixin.js"
105859
105916
  }
105860
105917
  },
105861
105918
  {
105862
105919
  "kind": "method",
105863
- "name": "_syncNegative",
105864
- "privacy": "private",
105920
+ "name": "updateFormValue",
105921
+ "privacy": "protected",
105865
105922
  "return": {
105866
105923
  "type": {
105867
105924
  "text": "void"
105868
105925
  }
105869
- }
105870
- },
105871
- {
105872
- "kind": "method",
105873
- "name": "_isMobile",
105874
- "privacy": "private",
105875
- "return": {
105876
- "type": {
105877
- "text": "boolean"
105878
- }
105879
- }
105880
- },
105881
- {
105882
- "kind": "field",
105883
- "name": "events",
105884
- "privacy": "public",
105885
- "static": true,
105886
- "readonly": true,
105887
- "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
105888
- "type": {
105889
- "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
105890
- },
105891
- "inheritedFrom": {
105892
- "name": "SbbOpenCloseBaseElement",
105893
- "module": "core/base-elements/open-close-base-element.js"
105894
- }
105895
- },
105896
- {
105897
- "kind": "field",
105898
- "name": "state",
105899
- "privacy": "protected",
105900
- "description": "The state of the component.",
105901
- "type": {
105902
- "text": "SbbOpenedClosedState"
105903
105926
  },
105904
- "default": "'closed'",
105905
- "inheritedFrom": {
105906
- "name": "SbbOpenCloseBaseElement",
105907
- "module": "core/base-elements/open-close-base-element.js"
105908
- }
105909
- },
105910
- {
105911
- "kind": "field",
105912
- "name": "_state",
105913
- "type": {
105914
- "text": "SbbOpenedClosedState"
105915
- },
105916
- "privacy": "private",
105917
- "inheritedFrom": {
105918
- "name": "SbbOpenCloseBaseElement",
105919
- "module": "core/base-elements/open-close-base-element.js"
105920
- }
105921
- },
105922
- {
105923
- "kind": "field",
105924
- "name": "isOpen",
105925
- "type": {
105926
- "text": "boolean"
105927
- },
105928
- "privacy": "public",
105929
- "description": "Whether the element is open.",
105930
- "readonly": true,
105927
+ "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",
105931
105928
  "inheritedFrom": {
105932
- "name": "SbbOpenCloseBaseElement",
105933
- "module": "core/base-elements/open-close-base-element.js"
105929
+ "name": "SbbFormAssociatedMixin",
105930
+ "module": "core/mixins/form-associated-mixin.js"
105934
105931
  }
105935
105932
  },
105936
105933
  {
105937
105934
  "kind": "method",
105938
- "name": "dispatchBeforeOpenEvent",
105935
+ "name": "formState",
105939
105936
  "privacy": "protected",
105940
105937
  "return": {
105941
105938
  "type": {
105942
- "text": "boolean"
105939
+ "text": "FormRestoreState"
105943
105940
  }
105944
105941
  },
105945
105942
  "inheritedFrom": {
105946
- "name": "SbbOpenCloseBaseElement",
105947
- "module": "core/base-elements/open-close-base-element.js"
105943
+ "name": "SbbFormAssociatedMixin",
105944
+ "module": "core/mixins/form-associated-mixin.js"
105948
105945
  }
105949
105946
  },
105950
105947
  {
105951
105948
  "kind": "method",
105952
- "name": "dispatchOpenEvent",
105949
+ "name": "setValidityFlag",
105953
105950
  "privacy": "protected",
105954
105951
  "return": {
105955
105952
  "type": {
105956
- "text": "boolean"
105953
+ "text": "void"
105957
105954
  }
105958
105955
  },
105956
+ "parameters": [
105957
+ {
105958
+ "name": "flag",
105959
+ "type": {
105960
+ "text": "T"
105961
+ }
105962
+ },
105963
+ {
105964
+ "name": "message",
105965
+ "type": {
105966
+ "text": "string"
105967
+ }
105968
+ },
105969
+ {
105970
+ "name": "flagValue",
105971
+ "optional": true,
105972
+ "type": {
105973
+ "text": "ValidityStateFlags[T]"
105974
+ }
105975
+ }
105976
+ ],
105977
+ "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).",
105959
105978
  "inheritedFrom": {
105960
- "name": "SbbOpenCloseBaseElement",
105961
- "module": "core/base-elements/open-close-base-element.js"
105979
+ "name": "SbbFormAssociatedMixin",
105980
+ "module": "core/mixins/form-associated-mixin.js"
105962
105981
  }
105963
105982
  },
105964
105983
  {
105965
105984
  "kind": "method",
105966
- "name": "dispatchBeforeCloseEvent",
105985
+ "name": "removeValidityFlag",
105967
105986
  "privacy": "protected",
105968
105987
  "return": {
105969
105988
  "type": {
105970
- "text": "boolean"
105989
+ "text": "void"
105971
105990
  }
105972
105991
  },
105992
+ "parameters": [
105993
+ {
105994
+ "name": "flag",
105995
+ "type": {
105996
+ "text": "T"
105997
+ }
105998
+ }
105999
+ ],
106000
+ "description": "Removes the validity state flag entry and updates validity state.",
105973
106001
  "inheritedFrom": {
105974
- "name": "SbbOpenCloseBaseElement",
105975
- "module": "core/base-elements/open-close-base-element.js"
106002
+ "name": "SbbFormAssociatedMixin",
106003
+ "module": "core/mixins/form-associated-mixin.js"
105976
106004
  }
105977
106005
  },
105978
106006
  {
105979
106007
  "kind": "method",
105980
- "name": "dispatchCloseEvent",
106008
+ "name": "validate",
105981
106009
  "privacy": "protected",
105982
106010
  "return": {
105983
106011
  "type": {
105984
- "text": "boolean"
106012
+ "text": "void"
105985
106013
  }
105986
106014
  },
106015
+ "description": "To be called whenever the current element needs to be validated.",
105987
106016
  "inheritedFrom": {
105988
- "name": "SbbOpenCloseBaseElement",
105989
- "module": "core/base-elements/open-close-base-element.js"
105990
- }
105991
- },
105992
- {
105993
- "kind": "field",
105994
- "name": "_hydrationRequired",
105995
- "type": {
105996
- "text": "boolean"
105997
- },
105998
- "privacy": "private",
105999
- "default": "!!this.shadowRoot",
106000
- "inheritedFrom": {
106001
- "name": "SbbElement",
106002
- "module": "core/base-elements/element.js"
106003
- }
106004
- },
106005
- {
106006
- "kind": "field",
106007
- "name": "_hydrationComplete",
106008
- "privacy": "private",
106009
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
106010
- "inheritedFrom": {
106011
- "name": "SbbElement",
106012
- "module": "core/base-elements/element.js"
106013
- }
106014
- },
106015
- {
106016
- "kind": "field",
106017
- "name": "_resolveHydration",
106018
- "type": {
106019
- "text": "(hydrationRequired: boolean) => void"
106020
- },
106021
- "privacy": "private",
106022
- "inheritedFrom": {
106023
- "name": "SbbElement",
106024
- "module": "core/base-elements/element.js"
106017
+ "name": "SbbFormAssociatedMixin",
106018
+ "module": "core/mixins/form-associated-mixin.js"
106025
106019
  }
106026
106020
  },
106027
- {
106028
- "kind": "field",
106029
- "name": "hydrationRequired",
106030
- "type": {
106031
- "text": "boolean"
106032
- },
106033
- "privacy": "protected",
106034
- "description": "Returns whether hydration is required and not completed.",
106035
- "readonly": true,
106036
- "inheritedFrom": {
106037
- "name": "SbbElement",
106038
- "module": "core/base-elements/element.js"
106039
- },
106040
- "default": "!!this.shadowRoot"
106041
- },
106042
106021
  {
106043
106022
  "kind": "method",
106044
- "name": "toggleState",
106023
+ "name": "shouldValidate",
106045
106024
  "privacy": "protected",
106046
106025
  "return": {
106047
106026
  "type": {
106048
- "text": "void"
106027
+ "text": "boolean"
106049
106028
  }
106050
106029
  },
106051
106030
  "parameters": [
106052
106031
  {
106053
- "name": "value",
106054
- "type": {
106055
- "text": "string"
106056
- }
106057
- },
106058
- {
106059
- "name": "force",
106060
- "optional": true,
106032
+ "name": "name",
106061
106033
  "type": {
106062
- "text": "boolean"
106034
+ "text": "PropertyKey | undefined"
106063
106035
  }
106064
106036
  }
106065
106037
  ],
106038
+ "description": "Whether validation should be run on a property change with the given name.",
106066
106039
  "inheritedFrom": {
106067
- "name": "SbbElement",
106068
- "module": "core/base-elements/element.js"
106069
- }
106070
- },
106071
- {
106072
- "kind": "field",
106073
- "name": "['_$sbbElement$']",
106074
- "type": {
106075
- "text": "boolean"
106076
- },
106077
- "privacy": "public",
106078
- "static": true,
106079
- "default": "true",
106080
- "inheritedFrom": {
106081
- "name": "SbbElement",
106082
- "module": "core/base-elements/element.js"
106083
- }
106084
- },
106085
- {
106086
- "kind": "field",
106087
- "name": "_controllers",
106088
- "type": {
106089
- "text": "Set<SbbReactiveController> | undefined"
106090
- },
106091
- "privacy": "private",
106092
- "inheritedFrom": {
106093
- "name": "SbbElement",
106094
- "module": "core/base-elements/element.js"
106095
- }
106096
- }
106097
- ],
106098
- "attributes": [
106099
- {
106100
- "name": "trigger",
106101
- "type": {
106102
- "text": "HTMLElement | null"
106103
- },
106104
- "default": "null",
106105
- "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
106106
- "fieldName": "trigger"
106107
- }
106108
- ],
106109
- "superclass": {
106110
- "name": "SbbOpenCloseBaseElement",
106111
- "module": "core/base-elements.js"
106112
- },
106113
- "tagName": "sbb-menu",
106114
- "customElement": true,
106115
- "events": [
106116
- {
106117
- "name": "beforeopen",
106118
- "type": {
106119
- "text": "Event"
106120
- },
106121
- "description": "Emits whenever the component starts the opening transition. Can be canceled.",
106122
- "inheritedFrom": {
106123
- "name": "SbbOpenCloseBaseElement",
106124
- "module": "core/base-elements/open-close-base-element.js"
106125
- }
106126
- },
106127
- {
106128
- "name": "open",
106129
- "type": {
106130
- "text": "Event"
106131
- },
106132
- "description": "Emits whenever the component is opened.",
106133
- "inheritedFrom": {
106134
- "name": "SbbOpenCloseBaseElement",
106135
- "module": "core/base-elements/open-close-base-element.js"
106136
- }
106137
- },
106138
- {
106139
- "name": "beforeclose",
106140
- "type": {
106141
- "text": "Event"
106142
- },
106143
- "description": "Emits whenever the component begins the closing transition. Can be canceled.",
106144
- "inheritedFrom": {
106145
- "name": "SbbOpenCloseBaseElement",
106146
- "module": "core/base-elements/open-close-base-element.js"
106040
+ "name": "SbbFormAssociatedMixin",
106041
+ "module": "core/mixins/form-associated-mixin.js"
106147
106042
  }
106148
106043
  },
106149
106044
  {
106150
- "name": "close",
106151
- "type": {
106152
- "text": "Event"
106153
- },
106154
- "description": "Emits whenever the component is closed.",
106155
- "inheritedFrom": {
106156
- "name": "SbbOpenCloseBaseElement",
106157
- "module": "core/base-elements/open-close-base-element.js"
106158
- }
106159
- }
106160
- ]
106161
- }
106162
- ],
106163
- "exports": [
106164
- {
106165
- "kind": "js",
106166
- "name": "SbbMenuElement",
106167
- "declaration": {
106168
- "name": "SbbMenuElement",
106169
- "module": "menu/menu/menu.component.js"
106170
- }
106171
- }
106172
- ]
106173
- },
106174
- {
106175
- "kind": "javascript-module",
106176
- "path": "menu/menu-button/menu-button.component.js",
106177
- "declarations": [
106178
- {
106179
- "kind": "class",
106180
- "description": "It displays a button element that can be used in the `sbb-menu` component.",
106181
- "name": "SbbMenuButtonElement",
106182
- "cssProperties": [
106183
- {
106184
- "description": "Can be used to modify horizontal padding.",
106185
- "name": "--sbb-menu-action-outer-horizontal-padding",
106186
- "default": "var(--sbb-spacing-fixed-3x)"
106187
- }
106188
- ],
106189
- "slots": [
106190
- {
106191
- "description": "Use the unnamed slot to add content to the `sbb-menu-button`.",
106192
- "name": ""
106045
+ "kind": "method",
106046
+ "name": "_setInternalValidity",
106047
+ "privacy": "private",
106048
+ "return": {
106049
+ "type": {
106050
+ "text": "void"
106051
+ }
106052
+ },
106053
+ "inheritedFrom": {
106054
+ "name": "SbbFormAssociatedMixin",
106055
+ "module": "core/mixins/form-associated-mixin.js"
106056
+ }
106193
106057
  },
106194
106058
  {
106195
- "description": "Use this slot to provide an icon. If `icon-name` is set, a `sbb-icon` will be used.",
106196
- "name": "icon"
106197
- }
106198
- ],
106199
- "members": [
106059
+ "kind": "field",
106060
+ "name": "_preventScrollOnSpaceKeydown",
106061
+ "privacy": "private",
106062
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
106063
+ "parameters": [
106064
+ {
106065
+ "description": "The origin event.",
106066
+ "name": "event"
106067
+ }
106068
+ ],
106069
+ "inheritedFrom": {
106070
+ "name": "SbbButtonLikeBaseElement",
106071
+ "module": "core/base-elements/button-base-element.js"
106072
+ }
106073
+ },
106200
106074
  {
106201
106075
  "kind": "field",
106202
- "name": "elementName",
106203
- "type": {
106204
- "text": "string"
106205
- },
106206
- "privacy": "public",
106207
- "static": true,
106208
- "readonly": true,
106076
+ "name": "_removeActiveMarker",
106077
+ "privacy": "private",
106209
106078
  "inheritedFrom": {
106210
- "name": "SbbElement",
106211
- "module": "core/base-elements/element.js"
106212
- },
106213
- "default": "'sbb-menu-button'"
106079
+ "name": "SbbButtonLikeBaseElement",
106080
+ "module": "core/base-elements/button-base-element.js"
106081
+ }
106214
106082
  },
106215
106083
  {
106216
106084
  "kind": "field",
106217
- "name": "role",
106218
- "type": {
106219
- "text": "ElementInternals['role']"
106220
- },
106221
- "privacy": "public",
106222
- "static": true,
106223
- "readonly": true,
106224
- "default": "'menuitem'",
106085
+ "name": "_dispatchClickEventOnSpaceKeyup",
106086
+ "privacy": "private",
106087
+ "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.",
106088
+ "parameters": [
106089
+ {
106090
+ "description": "The origin event.",
106091
+ "name": "event"
106092
+ }
106093
+ ],
106225
106094
  "inheritedFrom": {
106226
106095
  "name": "SbbButtonLikeBaseElement",
106227
106096
  "module": "core/base-elements/button-base-element.js"
@@ -106229,464 +106098,545 @@
106229
106098
  },
106230
106099
  {
106231
106100
  "kind": "field",
106232
- "name": "disabledInteractive",
106233
- "type": {
106234
- "text": "boolean"
106235
- },
106236
- "privacy": "public",
106237
- "default": "false",
106238
- "description": "Whether the button should be aria-disabled but stay interactive.",
106239
- "attribute": "disabled-interactive",
106240
- "reflects": true,
106101
+ "name": "_dispatchClickEvent",
106102
+ "privacy": "private",
106241
106103
  "inheritedFrom": {
106242
- "name": "SbbDisabledInteractiveMixin",
106243
- "module": "core/mixins/disabled-mixin.js"
106104
+ "name": "SbbButtonLikeBaseElement",
106105
+ "module": "core/base-elements/button-base-element.js"
106244
106106
  }
106245
106107
  },
106246
106108
  {
106247
106109
  "kind": "field",
106248
- "name": "disabled",
106249
- "privacy": "public",
106250
- "description": "Whether the component is disabled.",
106251
- "default": "false",
106110
+ "name": "maybeDisabled",
106252
106111
  "type": {
106253
- "text": "boolean"
106112
+ "text": "boolean | undefined"
106254
106113
  },
106255
- "attribute": "disabled",
106256
- "reflects": true,
106114
+ "privacy": "protected",
106115
+ "readonly": true,
106257
106116
  "inheritedFrom": {
106258
- "name": "SbbDisabledMixin",
106259
- "module": "core/mixins/disabled-mixin.js"
106117
+ "name": "SbbActionBaseElement",
106118
+ "module": "core/base-elements/action-base-element.js"
106260
106119
  }
106261
106120
  },
106262
106121
  {
106263
106122
  "kind": "field",
106264
- "name": "#disabled",
106265
- "privacy": "private",
106123
+ "name": "maybeDisabledInteractive",
106266
106124
  "type": {
106267
- "text": "boolean"
106125
+ "text": "boolean | undefined"
106268
106126
  },
106269
- "default": "false",
106127
+ "privacy": "protected",
106128
+ "readonly": true,
106270
106129
  "inheritedFrom": {
106271
- "name": "SbbDisabledMixin",
106272
- "module": "core/mixins/disabled-mixin.js"
106130
+ "name": "SbbActionBaseElement",
106131
+ "module": "core/base-elements/action-base-element.js"
106273
106132
  }
106274
106133
  },
106275
106134
  {
106276
106135
  "kind": "method",
106277
- "name": "isDisabledExternally",
106136
+ "name": "setupBaseEventHandlers",
106278
106137
  "privacy": "protected",
106279
106138
  "return": {
106280
106139
  "type": {
106281
- "text": "boolean"
106140
+ "text": "void"
106282
106141
  }
106283
106142
  },
106284
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
106285
106143
  "inheritedFrom": {
106286
- "name": "SbbDisabledMixin",
106287
- "module": "core/mixins/disabled-mixin.js"
106144
+ "name": "SbbActionBaseElement",
106145
+ "module": "core/base-elements/action-base-element.js"
106288
106146
  }
106289
106147
  },
106290
106148
  {
106291
106149
  "kind": "field",
106292
- "name": "styles",
106150
+ "name": "_hydrationRequired",
106293
106151
  "type": {
106294
- "text": "CSSResultGroup"
106152
+ "text": "boolean"
106295
106153
  },
106296
- "privacy": "public",
106297
- "static": true,
106298
- "default": "[boxSizingStyles, style]",
106154
+ "privacy": "private",
106155
+ "default": "!!this.shadowRoot",
106299
106156
  "inheritedFrom": {
106300
- "name": "SbbMenuActionCommonElementMixin",
106301
- "module": "menu/common/menu-action-common.js"
106157
+ "name": "SbbElement",
106158
+ "module": "core/base-elements/element.js"
106302
106159
  }
106303
106160
  },
106304
106161
  {
106305
- "kind": "method",
106306
- "name": "renderTemplate",
106307
- "privacy": "protected",
106308
- "return": {
106309
- "type": {
106310
- "text": "TemplateResult"
106311
- }
106312
- },
106313
- "description": "Override this method to render the component template.",
106162
+ "kind": "field",
106163
+ "name": "_hydrationComplete",
106164
+ "privacy": "private",
106165
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
106314
106166
  "inheritedFrom": {
106315
- "name": "SbbActionBaseElement",
106316
- "module": "core/base-elements/action-base-element.js"
106167
+ "name": "SbbElement",
106168
+ "module": "core/base-elements/element.js"
106317
106169
  }
106318
106170
  },
106319
106171
  {
106320
106172
  "kind": "field",
106321
- "name": "iconName",
106173
+ "name": "_resolveHydration",
106322
106174
  "type": {
106323
- "text": "string"
106175
+ "text": "(hydrationRequired: boolean) => void"
106324
106176
  },
106325
- "privacy": "public",
106326
- "default": "''",
106327
- "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.",
106328
- "attribute": "icon-name",
106177
+ "privacy": "private",
106329
106178
  "inheritedFrom": {
106330
- "name": "SbbIconNameMixin",
106331
- "module": "icon/icon-name-mixin.js"
106179
+ "name": "SbbElement",
106180
+ "module": "core/base-elements/element.js"
106332
106181
  }
106333
106182
  },
106183
+ {
106184
+ "kind": "field",
106185
+ "name": "hydrationRequired",
106186
+ "type": {
106187
+ "text": "boolean"
106188
+ },
106189
+ "privacy": "protected",
106190
+ "description": "Returns whether hydration is required and not completed.",
106191
+ "readonly": true,
106192
+ "inheritedFrom": {
106193
+ "name": "SbbElement",
106194
+ "module": "core/base-elements/element.js"
106195
+ },
106196
+ "default": "!!this.shadowRoot"
106197
+ },
106334
106198
  {
106335
106199
  "kind": "method",
106336
- "name": "renderIconSlot",
106200
+ "name": "toggleState",
106337
106201
  "privacy": "protected",
106338
106202
  "return": {
106339
106203
  "type": {
106340
- "text": "TemplateResult"
106204
+ "text": "void"
106341
106205
  }
106342
106206
  },
106343
106207
  "parameters": [
106344
106208
  {
106345
- "name": "classname",
106346
- "optional": true,
106209
+ "name": "value",
106347
106210
  "type": {
106348
106211
  "text": "string"
106349
106212
  }
106213
+ },
106214
+ {
106215
+ "name": "force",
106216
+ "optional": true,
106217
+ "type": {
106218
+ "text": "boolean"
106219
+ }
106350
106220
  }
106351
106221
  ],
106352
106222
  "inheritedFrom": {
106353
- "name": "SbbIconNameMixin",
106354
- "module": "icon/icon-name-mixin.js"
106223
+ "name": "SbbElement",
106224
+ "module": "core/base-elements/element.js"
106355
106225
  }
106356
106226
  },
106357
106227
  {
106358
- "kind": "method",
106359
- "name": "renderIconName",
106360
- "privacy": "protected",
106361
- "return": {
106362
- "type": {
106363
- "text": "string"
106364
- }
106228
+ "kind": "field",
106229
+ "name": "['_$sbbElement$']",
106230
+ "type": {
106231
+ "text": "boolean"
106365
106232
  },
106233
+ "privacy": "public",
106234
+ "static": true,
106235
+ "default": "true",
106366
106236
  "inheritedFrom": {
106367
- "name": "SbbIconNameMixin",
106368
- "module": "icon/icon-name-mixin.js"
106237
+ "name": "SbbElement",
106238
+ "module": "core/base-elements/element.js"
106369
106239
  }
106370
106240
  },
106371
106241
  {
106372
- "kind": "method",
106373
- "name": "_renderIconName",
106242
+ "kind": "field",
106243
+ "name": "_controllers",
106244
+ "type": {
106245
+ "text": "Set<SbbReactiveController> | undefined"
106246
+ },
106374
106247
  "privacy": "private",
106375
- "return": {
106376
- "type": {
106377
- "text": "string"
106378
- }
106248
+ "inheritedFrom": {
106249
+ "name": "SbbElement",
106250
+ "module": "core/base-elements/element.js"
106251
+ }
106252
+ }
106253
+ ],
106254
+ "mixins": [
106255
+ {
106256
+ "name": "SbbDisabledTabIndexActionMixin",
106257
+ "module": "core/mixins.js"
106258
+ },
106259
+ {
106260
+ "name": "SbbMenuActionCommonElementMixin",
106261
+ "module": "menu/common/menu-action-common.js"
106262
+ }
106263
+ ],
106264
+ "superclass": {
106265
+ "name": "SbbButtonBaseElement",
106266
+ "module": "core/base-elements.js"
106267
+ },
106268
+ "tagName": "sbb-menu-button",
106269
+ "customElement": true,
106270
+ "attributes": [
106271
+ {
106272
+ "name": "disabled-interactive",
106273
+ "type": {
106274
+ "text": "boolean"
106275
+ },
106276
+ "default": "false",
106277
+ "description": "Whether the button should be aria-disabled but stay interactive.",
106278
+ "fieldName": "disabledInteractive",
106279
+ "inheritedFrom": {
106280
+ "name": "SbbDisabledInteractiveMixin",
106281
+ "module": "core/mixins/disabled-mixin.js"
106282
+ }
106283
+ },
106284
+ {
106285
+ "name": "disabled",
106286
+ "description": "Whether the component is disabled.",
106287
+ "default": "false",
106288
+ "type": {
106289
+ "text": "boolean"
106379
106290
  },
106291
+ "fieldName": "disabled",
106380
106292
  "inheritedFrom": {
106381
- "name": "SbbIconNameMixin",
106382
- "module": "icon/icon-name-mixin.js"
106293
+ "name": "SbbDisabledMixin",
106294
+ "module": "core/mixins/disabled-mixin.js"
106383
106295
  }
106384
106296
  },
106385
106297
  {
106386
- "kind": "field",
106387
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
106298
+ "name": "icon-name",
106388
106299
  "type": {
106389
- "text": "array"
106300
+ "text": "string"
106390
106301
  },
106391
- "privacy": "private",
106392
- "readonly": true,
106393
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
106302
+ "default": "''",
106303
+ "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.",
106304
+ "fieldName": "iconName",
106394
106305
  "inheritedFrom": {
106395
- "name": "SbbButtonBaseElement",
106396
- "module": "core/base-elements/button-base-element.js"
106306
+ "name": "SbbIconNameMixin",
106307
+ "module": "icon/icon-name-mixin.js"
106397
106308
  }
106398
106309
  },
106399
106310
  {
106400
- "kind": "field",
106401
106311
  "name": "value",
106402
106312
  "type": {
106403
106313
  "text": "string"
106404
106314
  },
106405
- "privacy": "public",
106315
+ "default": "''",
106316
+ "description": "Value of the form element.",
106317
+ "fieldName": "value",
106406
106318
  "inheritedFrom": {
106407
106319
  "name": "SbbButtonBaseElement",
106408
106320
  "module": "core/base-elements/button-base-element.js"
106409
- },
106410
- "default": "''",
106411
- "description": "Value of the form element.",
106412
- "attribute": "value"
106321
+ }
106413
106322
  },
106414
106323
  {
106415
- "kind": "field",
106416
106324
  "name": "type",
106417
- "privacy": "public",
106418
106325
  "description": "The type attribute to use for the button.",
106419
106326
  "default": "'button'",
106420
106327
  "type": {
106421
106328
  "text": "SbbButtonType"
106422
106329
  },
106423
- "attribute": "type",
106330
+ "fieldName": "type",
106424
106331
  "inheritedFrom": {
106425
106332
  "name": "SbbButtonBaseElement",
106426
106333
  "module": "core/base-elements/button-base-element.js"
106427
106334
  }
106428
106335
  },
106429
106336
  {
106430
- "kind": "field",
106431
106337
  "name": "form",
106338
+ "description": "The `<form>` element to associate the button with.",
106432
106339
  "type": {
106433
106340
  "text": "HTMLFormElement | null"
106434
106341
  },
106435
- "privacy": "public",
106436
- "description": "The `<form>` element to associate the button with.",
106342
+ "fieldName": "form",
106437
106343
  "inheritedFrom": {
106438
106344
  "name": "SbbButtonBaseElement",
106439
106345
  "module": "core/base-elements/button-base-element.js"
106440
- },
106441
- "attribute": "form"
106346
+ }
106442
106347
  },
106443
106348
  {
106444
- "kind": "field",
106445
- "name": "_formId",
106349
+ "name": "name",
106350
+ "description": "Name of the form element. Will be read from name attribute.",
106446
106351
  "type": {
106447
106352
  "text": "string"
106448
106353
  },
106449
- "privacy": "private",
106450
- "default": "''",
106354
+ "fieldName": "name",
106451
106355
  "inheritedFrom": {
106452
- "name": "SbbButtonBaseElement",
106453
- "module": "core/base-elements/button-base-element.js"
106356
+ "name": "SbbFormAssociatedMixin",
106357
+ "module": "core/mixins/form-associated-mixin.js"
106454
106358
  }
106455
- },
106359
+ }
106360
+ ]
106361
+ }
106362
+ ],
106363
+ "exports": [
106364
+ {
106365
+ "kind": "js",
106366
+ "name": "SbbMenuButtonElement",
106367
+ "declaration": {
106368
+ "name": "SbbMenuButtonElement",
106369
+ "module": "menu/menu-button/menu-button.component.js"
106370
+ }
106371
+ }
106372
+ ]
106373
+ },
106374
+ {
106375
+ "kind": "javascript-module",
106376
+ "path": "menu/menu/menu.component.js",
106377
+ "declarations": [
106378
+ {
106379
+ "kind": "class",
106380
+ "description": "It displays a contextual menu with one or more action element.",
106381
+ "name": "SbbMenuElement",
106382
+ "cssProperties": [
106456
106383
  {
106457
- "kind": "field",
106458
- "name": "_handleButtonClick",
106459
- "privacy": "private",
106460
- "inheritedFrom": {
106461
- "name": "SbbButtonBaseElement",
106462
- "module": "core/base-elements/button-base-element.js"
106463
- }
106464
- },
106384
+ "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`.",
106385
+ "name": "--sbb-menu-z-index",
106386
+ "default": "var(--sbb-overlay-default-z-index)"
106387
+ }
106388
+ ],
106389
+ "slots": [
106465
106390
  {
106466
- "kind": "method",
106467
- "name": "_requestSubmit",
106468
- "privacy": "private",
106469
- "return": {
106470
- "type": {
106471
- "text": "void"
106472
- }
106473
- },
106474
- "parameters": [
106475
- {
106476
- "name": "form",
106477
- "type": {
106478
- "text": "HTMLFormElement"
106479
- }
106480
- }
106481
- ],
106482
- "inheritedFrom": {
106483
- "name": "SbbButtonBaseElement",
106484
- "module": "core/base-elements/button-base-element.js"
106485
- }
106486
- },
106391
+ "description": "Use the unnamed slot to add `sbb-menu-button`/`sbb-menu-link` or other elements to the menu.",
106392
+ "name": ""
106393
+ }
106394
+ ],
106395
+ "members": [
106487
106396
  {
106488
106397
  "kind": "field",
106489
- "name": "_formKeyDown",
106490
- "privacy": "private",
106398
+ "name": "elementName",
106399
+ "type": {
106400
+ "text": "string"
106401
+ },
106402
+ "privacy": "public",
106403
+ "static": true,
106404
+ "readonly": true,
106491
106405
  "inheritedFrom": {
106492
- "name": "SbbButtonBaseElement",
106493
- "module": "core/base-elements/button-base-element.js"
106494
- }
106406
+ "name": "SbbElement",
106407
+ "module": "core/base-elements/element.js"
106408
+ },
106409
+ "default": "'sbb-menu'"
106495
106410
  },
106496
106411
  {
106497
106412
  "kind": "field",
106498
- "name": "formAssociated",
106413
+ "name": "role",
106499
106414
  "type": {
106500
- "text": "boolean"
106415
+ "text": "string"
106501
106416
  },
106502
106417
  "privacy": "public",
106503
106418
  "static": true,
106504
- "default": "true",
106505
- "inheritedFrom": {
106506
- "name": "SbbFormAssociatedMixin",
106507
- "module": "core/mixins/form-associated-mixin.js"
106508
- }
106419
+ "readonly": true,
106420
+ "default": "'menu'"
106509
106421
  },
106510
106422
  {
106511
106423
  "kind": "field",
106512
- "name": "name",
106424
+ "name": "trigger",
106425
+ "type": {
106426
+ "text": "HTMLElement | null"
106427
+ },
106513
106428
  "privacy": "public",
106514
- "description": "Name of the form element. Will be read from name attribute.",
106429
+ "default": "null",
106430
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
106431
+ "attribute": "trigger"
106432
+ },
106433
+ {
106434
+ "kind": "field",
106435
+ "name": "_menu",
106515
106436
  "type": {
106516
- "text": "string"
106437
+ "text": "HTMLDivElement"
106517
106438
  },
106518
- "attribute": "name",
106519
- "inheritedFrom": {
106520
- "name": "SbbFormAssociatedMixin",
106521
- "module": "core/mixins/form-associated-mixin.js"
106522
- }
106439
+ "privacy": "private"
106523
106440
  },
106524
106441
  {
106525
106442
  "kind": "field",
106526
- "name": "validity",
106443
+ "name": "_triggerElement",
106527
106444
  "type": {
106528
- "text": "ValidityState"
106445
+ "text": "HTMLElement | null"
106529
106446
  },
106530
- "privacy": "public",
106531
- "description": "Returns the ValidityState object for this element.",
106532
- "readonly": true,
106533
- "inheritedFrom": {
106534
- "name": "SbbFormAssociatedMixin",
106535
- "module": "core/mixins/form-associated-mixin.js"
106536
- }
106447
+ "privacy": "private",
106448
+ "default": "null"
106537
106449
  },
106538
106450
  {
106539
106451
  "kind": "field",
106540
- "name": "validationMessage",
106452
+ "name": "_triggerAbortController",
106541
106453
  "type": {
106542
- "text": "string"
106454
+ "text": "AbortController"
106543
106455
  },
106544
- "privacy": "public",
106545
- "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.",
106546
- "readonly": true,
106547
- "inheritedFrom": {
106548
- "name": "SbbFormAssociatedMixin",
106549
- "module": "core/mixins/form-associated-mixin.js"
106550
- }
106456
+ "privacy": "private"
106551
106457
  },
106552
106458
  {
106553
106459
  "kind": "field",
106554
- "name": "willValidate",
106460
+ "name": "_isPointerDownEventOnMenu",
106555
106461
  "type": {
106556
106462
  "text": "boolean"
106557
106463
  },
106558
- "privacy": "public",
106559
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
106560
- "readonly": true,
106561
- "inheritedFrom": {
106562
- "name": "SbbFormAssociatedMixin",
106563
- "module": "core/mixins/form-associated-mixin.js"
106564
- }
106464
+ "privacy": "private",
106465
+ "default": "false"
106466
+ },
106467
+ {
106468
+ "kind": "field",
106469
+ "name": "_windowEventsController",
106470
+ "type": {
106471
+ "text": "AbortController"
106472
+ },
106473
+ "privacy": "private"
106474
+ },
106475
+ {
106476
+ "kind": "field",
106477
+ "name": "_escapableOverlayController",
106478
+ "privacy": "private",
106479
+ "default": "new SbbEscapableOverlayController(this)"
106480
+ },
106481
+ {
106482
+ "kind": "field",
106483
+ "name": "_focusTrapController",
106484
+ "privacy": "private",
106485
+ "default": "new SbbFocusTrapController(this)"
106486
+ },
106487
+ {
106488
+ "kind": "field",
106489
+ "name": "_scrollHandler",
106490
+ "privacy": "private",
106491
+ "default": "new SbbScrollHandler()"
106492
+ },
106493
+ {
106494
+ "kind": "field",
106495
+ "name": "_inertController",
106496
+ "privacy": "private",
106497
+ "default": "new SbbInertController(this)"
106498
+ },
106499
+ {
106500
+ "kind": "field",
106501
+ "name": "_mobileBreakpoint",
106502
+ "privacy": "private",
106503
+ "default": "SbbMediaQueryBreakpointSmallAndBelow"
106504
+ },
106505
+ {
106506
+ "kind": "field",
106507
+ "name": "_mediaMatcher",
106508
+ "privacy": "private",
106509
+ "default": "new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => { if (matches && (this.state === 'opening' || this.state === 'opened')) { this._scrollHandler.disableScroll(); } else { this._scrollHandler.enableScroll(); } }, })"
106510
+ },
106511
+ {
106512
+ "kind": "field",
106513
+ "name": "_darkModeController",
106514
+ "privacy": "private",
106515
+ "default": "new SbbDarkModeController(this, () => this._syncNegative())"
106565
106516
  },
106566
106517
  {
106567
106518
  "kind": "field",
106568
- "name": "_validityStates",
106519
+ "name": "_language",
106569
106520
  "privacy": "private",
106570
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
106571
- "inheritedFrom": {
106572
- "name": "SbbFormAssociatedMixin",
106573
- "module": "core/mixins/form-associated-mixin.js"
106574
- }
106521
+ "default": "new SbbLanguageController(this)"
106575
106522
  },
106576
106523
  {
106577
106524
  "kind": "field",
106578
- "name": "formDisabled",
106525
+ "name": "_nestedMenu",
106579
106526
  "type": {
106580
- "text": "boolean"
106527
+ "text": "SbbMenuElement | null"
106581
106528
  },
106582
- "privacy": "protected",
106583
- "default": "false",
106584
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
106529
+ "privacy": "private",
106530
+ "default": "null"
106531
+ },
106532
+ {
106533
+ "kind": "method",
106534
+ "name": "escapeStrategy",
106535
+ "privacy": "public",
106536
+ "return": {
106537
+ "type": {
106538
+ "text": "void"
106539
+ }
106540
+ },
106541
+ "description": "The method which is called on escape key press. Defaults to calling close()",
106585
106542
  "inheritedFrom": {
106586
- "name": "SbbFormAssociatedMixin",
106587
- "module": "core/mixins/form-associated-mixin.js"
106543
+ "name": "SbbOpenCloseBaseElement",
106544
+ "module": "core/base-elements/open-close-base-element.js"
106588
106545
  }
106589
106546
  },
106590
106547
  {
106591
106548
  "kind": "method",
106592
- "name": "checkValidity",
106549
+ "name": "open",
106593
106550
  "privacy": "public",
106594
106551
  "return": {
106595
106552
  "type": {
106596
- "text": "boolean"
106553
+ "text": "void"
106597
106554
  }
106598
106555
  },
106599
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
106556
+ "description": "Opens the menu on trigger click.",
106600
106557
  "inheritedFrom": {
106601
- "name": "SbbFormAssociatedMixin",
106602
- "module": "core/mixins/form-associated-mixin.js"
106558
+ "name": "SbbOpenCloseBaseElement",
106559
+ "module": "core/base-elements/open-close-base-element.js"
106603
106560
  }
106604
106561
  },
106605
106562
  {
106606
106563
  "kind": "method",
106607
- "name": "reportValidity",
106564
+ "name": "close",
106608
106565
  "privacy": "public",
106609
106566
  "return": {
106610
106567
  "type": {
106611
- "text": "boolean"
106568
+ "text": "void"
106612
106569
  }
106613
106570
  },
106614
- "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.",
106571
+ "description": "Closes the menu and all its nested menus.",
106615
106572
  "inheritedFrom": {
106616
- "name": "SbbFormAssociatedMixin",
106617
- "module": "core/mixins/form-associated-mixin.js"
106573
+ "name": "SbbOpenCloseBaseElement",
106574
+ "module": "core/base-elements/open-close-base-element.js"
106618
106575
  }
106619
106576
  },
106620
106577
  {
106621
106578
  "kind": "method",
106622
- "name": "setCustomValidity",
106579
+ "name": "closeAll",
106623
106580
  "privacy": "public",
106624
106581
  "return": {
106625
106582
  "type": {
106626
106583
  "text": "void"
106627
106584
  }
106628
106585
  },
106586
+ "description": "Closes the menu and all related menus (nested and parent menus)."
106587
+ },
106588
+ {
106589
+ "kind": "method",
106590
+ "name": "_close",
106591
+ "privacy": "private",
106592
+ "return": {
106593
+ "type": {
106594
+ "text": "void"
106595
+ }
106596
+ },
106629
106597
  "parameters": [
106630
106598
  {
106631
- "name": "message",
106632
- "type": {
106633
- "text": "string"
106634
- }
106599
+ "name": "closeAll",
106600
+ "default": "false",
106601
+ "description": "If true, it ensures animations are correct by toggling some states when closing all related menus at once.",
106602
+ "optional": true
106635
106603
  }
106636
- ],
106637
- "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.",
106638
- "inheritedFrom": {
106639
- "name": "SbbFormAssociatedMixin",
106640
- "module": "core/mixins/form-associated-mixin.js"
106641
- }
106604
+ ]
106642
106605
  },
106643
106606
  {
106644
106607
  "kind": "method",
106645
- "name": "_hasDisabledAncestor",
106608
+ "name": "_isZeroAnimationDuration",
106646
106609
  "privacy": "private",
106647
106610
  "return": {
106648
106611
  "type": {
106649
106612
  "text": "boolean"
106650
106613
  }
106651
- },
106652
- "inheritedFrom": {
106653
- "name": "SbbFormAssociatedMixin",
106654
- "module": "core/mixins/form-associated-mixin.js"
106655
106614
  }
106656
106615
  },
106657
106616
  {
106658
106617
  "kind": "method",
106659
- "name": "updateFormValue",
106660
- "privacy": "protected",
106618
+ "name": "_handleOpening",
106619
+ "privacy": "private",
106661
106620
  "return": {
106662
106621
  "type": {
106663
106622
  "text": "void"
106664
106623
  }
106665
- },
106666
- "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",
106667
- "inheritedFrom": {
106668
- "name": "SbbFormAssociatedMixin",
106669
- "module": "core/mixins/form-associated-mixin.js"
106670
106624
  }
106671
106625
  },
106672
106626
  {
106673
106627
  "kind": "method",
106674
- "name": "formState",
106675
- "privacy": "protected",
106628
+ "name": "_handleClosing",
106629
+ "privacy": "private",
106676
106630
  "return": {
106677
106631
  "type": {
106678
- "text": "FormRestoreState"
106632
+ "text": "void"
106679
106633
  }
106680
- },
106681
- "inheritedFrom": {
106682
- "name": "SbbFormAssociatedMixin",
106683
- "module": "core/mixins/form-associated-mixin.js"
106684
106634
  }
106685
106635
  },
106686
106636
  {
106687
106637
  "kind": "method",
106688
- "name": "setValidityFlag",
106689
- "privacy": "protected",
106638
+ "name": "_handleKeyDown",
106639
+ "privacy": "private",
106690
106640
  "return": {
106691
106641
  "type": {
106692
106642
  "text": "void"
@@ -106694,35 +106644,37 @@
106694
106644
  },
106695
106645
  "parameters": [
106696
106646
  {
106697
- "name": "flag",
106698
- "type": {
106699
- "text": "T"
106700
- }
106701
- },
106702
- {
106703
- "name": "message",
106704
- "type": {
106705
- "text": "string"
106706
- }
106707
- },
106708
- {
106709
- "name": "flagValue",
106710
- "optional": true,
106647
+ "name": "evt",
106711
106648
  "type": {
106712
- "text": "ValidityStateFlags[T]"
106649
+ "text": "KeyboardEvent"
106713
106650
  }
106714
106651
  }
106715
- ],
106716
- "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).",
106717
- "inheritedFrom": {
106718
- "name": "SbbFormAssociatedMixin",
106719
- "module": "core/mixins/form-associated-mixin.js"
106652
+ ]
106653
+ },
106654
+ {
106655
+ "kind": "method",
106656
+ "name": "_configureTrigger",
106657
+ "privacy": "private",
106658
+ "return": {
106659
+ "type": {
106660
+ "text": "void"
106661
+ }
106720
106662
  }
106721
106663
  },
106722
106664
  {
106723
106665
  "kind": "method",
106724
- "name": "removeValidityFlag",
106725
- "privacy": "protected",
106666
+ "name": "_attachWindowEvents",
106667
+ "privacy": "private",
106668
+ "return": {
106669
+ "type": {
106670
+ "text": "void"
106671
+ }
106672
+ }
106673
+ },
106674
+ {
106675
+ "kind": "method",
106676
+ "name": "_interactiveElementClick",
106677
+ "privacy": "private",
106726
106678
  "return": {
106727
106679
  "type": {
106728
106680
  "text": "void"
@@ -106730,158 +106682,250 @@
106730
106682
  },
106731
106683
  "parameters": [
106732
106684
  {
106733
- "name": "flag",
106685
+ "name": "event",
106734
106686
  "type": {
106735
- "text": "T"
106687
+ "text": "Event"
106736
106688
  }
106737
106689
  }
106738
- ],
106739
- "description": "Removes the validity state flag entry and updates validity state.",
106740
- "inheritedFrom": {
106741
- "name": "SbbFormAssociatedMixin",
106742
- "module": "core/mixins/form-associated-mixin.js"
106743
- }
106690
+ ]
106691
+ },
106692
+ {
106693
+ "kind": "field",
106694
+ "name": "_pointerDownListener",
106695
+ "privacy": "private"
106696
+ },
106697
+ {
106698
+ "kind": "field",
106699
+ "name": "_closeOnBackdropClick",
106700
+ "privacy": "private"
106744
106701
  },
106745
106702
  {
106746
106703
  "kind": "method",
106747
- "name": "validate",
106748
- "privacy": "protected",
106704
+ "name": "_nestedMenus",
106705
+ "privacy": "private",
106749
106706
  "return": {
106750
106707
  "type": {
106751
- "text": "void"
106708
+ "text": "SbbMenuElement[]"
106752
106709
  }
106753
106710
  },
106754
- "description": "To be called whenever the current element needs to be validated.",
106755
- "inheritedFrom": {
106756
- "name": "SbbFormAssociatedMixin",
106757
- "module": "core/mixins/form-associated-mixin.js"
106711
+ "description": "Converts the linked list into an array of SbbMenuElement."
106712
+ },
106713
+ {
106714
+ "kind": "method",
106715
+ "name": "_parentMenu",
106716
+ "privacy": "private",
106717
+ "return": {
106718
+ "type": {
106719
+ "text": "SbbMenuElement | null"
106720
+ }
106758
106721
  }
106759
106722
  },
106760
106723
  {
106761
106724
  "kind": "method",
106762
- "name": "shouldValidate",
106763
- "privacy": "protected",
106725
+ "name": "_mainMenu",
106726
+ "privacy": "private",
106727
+ "return": {
106728
+ "type": {
106729
+ "text": "SbbMenuElement"
106730
+ }
106731
+ },
106732
+ "description": "The outermost menu."
106733
+ },
106734
+ {
106735
+ "kind": "method",
106736
+ "name": "_isNested",
106737
+ "privacy": "private",
106764
106738
  "return": {
106765
106739
  "type": {
106766
106740
  "text": "boolean"
106767
106741
  }
106742
+ }
106743
+ },
106744
+ {
106745
+ "kind": "method",
106746
+ "name": "_updateNestedInert",
106747
+ "privacy": "private",
106748
+ "return": {
106749
+ "type": {
106750
+ "text": "void"
106751
+ }
106752
+ }
106753
+ },
106754
+ {
106755
+ "kind": "method",
106756
+ "name": "_handleMouseOver",
106757
+ "privacy": "private",
106758
+ "return": {
106759
+ "type": {
106760
+ "text": "void"
106761
+ }
106768
106762
  },
106769
106763
  "parameters": [
106770
106764
  {
106771
- "name": "name",
106765
+ "name": "event",
106766
+ "type": {
106767
+ "text": "MouseEvent"
106768
+ }
106769
+ }
106770
+ ]
106771
+ },
106772
+ {
106773
+ "kind": "method",
106774
+ "name": "_onMenuAnimationEnd",
106775
+ "privacy": "private",
106776
+ "return": {
106777
+ "type": {
106778
+ "text": "void"
106779
+ }
106780
+ },
106781
+ "parameters": [
106782
+ {
106783
+ "name": "event",
106772
106784
  "type": {
106773
- "text": "PropertyKey | undefined"
106785
+ "text": "AnimationEvent"
106774
106786
  }
106775
106787
  }
106776
- ],
106777
- "description": "Whether validation should be run on a property change with the given name.",
106778
- "inheritedFrom": {
106779
- "name": "SbbFormAssociatedMixin",
106780
- "module": "core/mixins/form-associated-mixin.js"
106788
+ ]
106789
+ },
106790
+ {
106791
+ "kind": "method",
106792
+ "name": "_setMenuPosition",
106793
+ "privacy": "private",
106794
+ "return": {
106795
+ "type": {
106796
+ "text": "void"
106797
+ }
106781
106798
  }
106782
106799
  },
106783
106800
  {
106784
106801
  "kind": "method",
106785
- "name": "_setInternalValidity",
106802
+ "name": "_syncNegative",
106786
106803
  "privacy": "private",
106787
106804
  "return": {
106788
106805
  "type": {
106789
106806
  "text": "void"
106790
106807
  }
106791
- },
106792
- "inheritedFrom": {
106793
- "name": "SbbFormAssociatedMixin",
106794
- "module": "core/mixins/form-associated-mixin.js"
106795
106808
  }
106796
106809
  },
106797
106810
  {
106798
- "kind": "field",
106799
- "name": "_preventScrollOnSpaceKeydown",
106811
+ "kind": "method",
106812
+ "name": "_isMobile",
106800
106813
  "privacy": "private",
106801
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
106802
- "parameters": [
106803
- {
106804
- "description": "The origin event.",
106805
- "name": "event"
106814
+ "return": {
106815
+ "type": {
106816
+ "text": "boolean"
106806
106817
  }
106807
- ],
106808
- "inheritedFrom": {
106809
- "name": "SbbButtonLikeBaseElement",
106810
- "module": "core/base-elements/button-base-element.js"
106811
106818
  }
106812
106819
  },
106813
106820
  {
106814
106821
  "kind": "field",
106815
- "name": "_removeActiveMarker",
106816
- "privacy": "private",
106822
+ "name": "events",
106823
+ "privacy": "public",
106824
+ "static": true,
106825
+ "readonly": true,
106826
+ "default": "{ beforeopen: 'beforeopen', open: 'open', beforeclose: 'beforeclose', close: 'close', }",
106827
+ "type": {
106828
+ "text": "{\n beforeopen: 'beforeopen',\n open: 'open',\n beforeclose: 'beforeclose',\n close: 'close',\n }"
106829
+ },
106817
106830
  "inheritedFrom": {
106818
- "name": "SbbButtonLikeBaseElement",
106819
- "module": "core/base-elements/button-base-element.js"
106831
+ "name": "SbbOpenCloseBaseElement",
106832
+ "module": "core/base-elements/open-close-base-element.js"
106820
106833
  }
106821
106834
  },
106822
106835
  {
106823
106836
  "kind": "field",
106824
- "name": "_dispatchClickEventOnSpaceKeyup",
106825
- "privacy": "private",
106826
- "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.",
106827
- "parameters": [
106828
- {
106829
- "description": "The origin event.",
106830
- "name": "event"
106831
- }
106832
- ],
106837
+ "name": "state",
106838
+ "privacy": "protected",
106839
+ "description": "The state of the component.",
106840
+ "type": {
106841
+ "text": "SbbOpenedClosedState"
106842
+ },
106843
+ "default": "'closed'",
106833
106844
  "inheritedFrom": {
106834
- "name": "SbbButtonLikeBaseElement",
106835
- "module": "core/base-elements/button-base-element.js"
106845
+ "name": "SbbOpenCloseBaseElement",
106846
+ "module": "core/base-elements/open-close-base-element.js"
106836
106847
  }
106837
106848
  },
106838
106849
  {
106839
106850
  "kind": "field",
106840
- "name": "_dispatchClickEvent",
106851
+ "name": "_state",
106852
+ "type": {
106853
+ "text": "SbbOpenedClosedState"
106854
+ },
106841
106855
  "privacy": "private",
106842
106856
  "inheritedFrom": {
106843
- "name": "SbbButtonLikeBaseElement",
106844
- "module": "core/base-elements/button-base-element.js"
106857
+ "name": "SbbOpenCloseBaseElement",
106858
+ "module": "core/base-elements/open-close-base-element.js"
106845
106859
  }
106846
106860
  },
106847
106861
  {
106848
106862
  "kind": "field",
106849
- "name": "maybeDisabled",
106863
+ "name": "isOpen",
106850
106864
  "type": {
106851
- "text": "boolean | undefined"
106865
+ "text": "boolean"
106852
106866
  },
106853
- "privacy": "protected",
106867
+ "privacy": "public",
106868
+ "description": "Whether the element is open.",
106854
106869
  "readonly": true,
106855
106870
  "inheritedFrom": {
106856
- "name": "SbbActionBaseElement",
106857
- "module": "core/base-elements/action-base-element.js"
106871
+ "name": "SbbOpenCloseBaseElement",
106872
+ "module": "core/base-elements/open-close-base-element.js"
106858
106873
  }
106859
106874
  },
106860
106875
  {
106861
- "kind": "field",
106862
- "name": "maybeDisabledInteractive",
106863
- "type": {
106864
- "text": "boolean | undefined"
106876
+ "kind": "method",
106877
+ "name": "dispatchBeforeOpenEvent",
106878
+ "privacy": "protected",
106879
+ "return": {
106880
+ "type": {
106881
+ "text": "boolean"
106882
+ }
106865
106883
  },
106884
+ "inheritedFrom": {
106885
+ "name": "SbbOpenCloseBaseElement",
106886
+ "module": "core/base-elements/open-close-base-element.js"
106887
+ }
106888
+ },
106889
+ {
106890
+ "kind": "method",
106891
+ "name": "dispatchOpenEvent",
106866
106892
  "privacy": "protected",
106867
- "readonly": true,
106893
+ "return": {
106894
+ "type": {
106895
+ "text": "boolean"
106896
+ }
106897
+ },
106868
106898
  "inheritedFrom": {
106869
- "name": "SbbActionBaseElement",
106870
- "module": "core/base-elements/action-base-element.js"
106899
+ "name": "SbbOpenCloseBaseElement",
106900
+ "module": "core/base-elements/open-close-base-element.js"
106871
106901
  }
106872
106902
  },
106873
106903
  {
106874
106904
  "kind": "method",
106875
- "name": "setupBaseEventHandlers",
106905
+ "name": "dispatchBeforeCloseEvent",
106876
106906
  "privacy": "protected",
106877
106907
  "return": {
106878
106908
  "type": {
106879
- "text": "void"
106909
+ "text": "boolean"
106880
106910
  }
106881
106911
  },
106882
106912
  "inheritedFrom": {
106883
- "name": "SbbActionBaseElement",
106884
- "module": "core/base-elements/action-base-element.js"
106913
+ "name": "SbbOpenCloseBaseElement",
106914
+ "module": "core/base-elements/open-close-base-element.js"
106915
+ }
106916
+ },
106917
+ {
106918
+ "kind": "method",
106919
+ "name": "dispatchCloseEvent",
106920
+ "privacy": "protected",
106921
+ "return": {
106922
+ "type": {
106923
+ "text": "boolean"
106924
+ }
106925
+ },
106926
+ "inheritedFrom": {
106927
+ "name": "SbbOpenCloseBaseElement",
106928
+ "module": "core/base-elements/open-close-base-element.js"
106885
106929
  }
106886
106930
  },
106887
106931
  {
@@ -106990,110 +107034,66 @@
106990
107034
  }
106991
107035
  }
106992
107036
  ],
106993
- "mixins": [
106994
- {
106995
- "name": "SbbDisabledTabIndexActionMixin",
106996
- "module": "core/mixins.js"
106997
- },
107037
+ "attributes": [
106998
107038
  {
106999
- "name": "SbbMenuActionCommonElementMixin",
107000
- "module": "menu/common/menu-action-common.js"
107039
+ "name": "trigger",
107040
+ "type": {
107041
+ "text": "HTMLElement | null"
107042
+ },
107043
+ "default": "null",
107044
+ "description": "The element that will trigger the menu overlay.\n\nFor attribute usage, provide an id reference.",
107045
+ "fieldName": "trigger"
107001
107046
  }
107002
107047
  ],
107003
107048
  "superclass": {
107004
- "name": "SbbButtonBaseElement",
107049
+ "name": "SbbOpenCloseBaseElement",
107005
107050
  "module": "core/base-elements.js"
107006
107051
  },
107007
- "tagName": "sbb-menu-button",
107052
+ "tagName": "sbb-menu",
107008
107053
  "customElement": true,
107009
- "attributes": [
107010
- {
107011
- "name": "disabled-interactive",
107012
- "type": {
107013
- "text": "boolean"
107014
- },
107015
- "default": "false",
107016
- "description": "Whether the button should be aria-disabled but stay interactive.",
107017
- "fieldName": "disabledInteractive",
107018
- "inheritedFrom": {
107019
- "name": "SbbDisabledInteractiveMixin",
107020
- "module": "core/mixins/disabled-mixin.js"
107021
- }
107022
- },
107023
- {
107024
- "name": "disabled",
107025
- "description": "Whether the component is disabled.",
107026
- "default": "false",
107027
- "type": {
107028
- "text": "boolean"
107029
- },
107030
- "fieldName": "disabled",
107031
- "inheritedFrom": {
107032
- "name": "SbbDisabledMixin",
107033
- "module": "core/mixins/disabled-mixin.js"
107034
- }
107035
- },
107036
- {
107037
- "name": "icon-name",
107038
- "type": {
107039
- "text": "string"
107040
- },
107041
- "default": "''",
107042
- "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.",
107043
- "fieldName": "iconName",
107044
- "inheritedFrom": {
107045
- "name": "SbbIconNameMixin",
107046
- "module": "icon/icon-name-mixin.js"
107047
- }
107048
- },
107054
+ "events": [
107049
107055
  {
107050
- "name": "value",
107056
+ "name": "beforeopen",
107051
107057
  "type": {
107052
- "text": "string"
107058
+ "text": "Event"
107053
107059
  },
107054
- "default": "''",
107055
- "description": "Value of the form element.",
107056
- "fieldName": "value",
107060
+ "description": "Emits whenever the component starts the opening transition. Can be canceled.",
107057
107061
  "inheritedFrom": {
107058
- "name": "SbbButtonBaseElement",
107059
- "module": "core/base-elements/button-base-element.js"
107062
+ "name": "SbbOpenCloseBaseElement",
107063
+ "module": "core/base-elements/open-close-base-element.js"
107060
107064
  }
107061
107065
  },
107062
107066
  {
107063
- "name": "type",
107064
- "description": "The type attribute to use for the button.",
107065
- "default": "'button'",
107067
+ "name": "open",
107066
107068
  "type": {
107067
- "text": "SbbButtonType"
107069
+ "text": "Event"
107068
107070
  },
107069
- "fieldName": "type",
107071
+ "description": "Emits whenever the component is opened.",
107070
107072
  "inheritedFrom": {
107071
- "name": "SbbButtonBaseElement",
107072
- "module": "core/base-elements/button-base-element.js"
107073
+ "name": "SbbOpenCloseBaseElement",
107074
+ "module": "core/base-elements/open-close-base-element.js"
107073
107075
  }
107074
107076
  },
107075
107077
  {
107076
- "name": "form",
107077
- "description": "The `<form>` element to associate the button with.",
107078
+ "name": "beforeclose",
107078
107079
  "type": {
107079
- "text": "HTMLFormElement | null"
107080
+ "text": "Event"
107080
107081
  },
107081
- "fieldName": "form",
107082
+ "description": "Emits whenever the component begins the closing transition. Can be canceled.",
107082
107083
  "inheritedFrom": {
107083
- "name": "SbbButtonBaseElement",
107084
- "module": "core/base-elements/button-base-element.js"
107084
+ "name": "SbbOpenCloseBaseElement",
107085
+ "module": "core/base-elements/open-close-base-element.js"
107085
107086
  }
107086
107087
  },
107087
107088
  {
107088
- "name": "name",
107089
- "description": "Name of the form element. Will be read from name attribute.",
107089
+ "name": "close",
107090
107090
  "type": {
107091
- "text": "string"
107091
+ "text": "Event"
107092
107092
  },
107093
- "fieldName": "name",
107093
+ "description": "Emits whenever the component is closed.",
107094
107094
  "inheritedFrom": {
107095
- "name": "SbbFormAssociatedMixin",
107096
- "module": "core/mixins/form-associated-mixin.js"
107095
+ "name": "SbbOpenCloseBaseElement",
107096
+ "module": "core/base-elements/open-close-base-element.js"
107097
107097
  }
107098
107098
  }
107099
107099
  ]
@@ -107102,10 +107102,10 @@
107102
107102
  "exports": [
107103
107103
  {
107104
107104
  "kind": "js",
107105
- "name": "SbbMenuButtonElement",
107105
+ "name": "SbbMenuElement",
107106
107106
  "declaration": {
107107
- "name": "SbbMenuButtonElement",
107108
- "module": "menu/menu-button/menu-button.component.js"
107107
+ "name": "SbbMenuElement",
107108
+ "module": "menu/menu/menu.component.js"
107109
107109
  }
107110
107110
  }
107111
107111
  ]