@momentum-design/components 0.83.5 → 0.83.7

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.
@@ -520,6 +520,67 @@
520
520
  }
521
521
  ]
522
522
  },
523
+ {
524
+ "kind": "javascript-module",
525
+ "path": "components/appheader/appheader.component.js",
526
+ "declarations": [
527
+ {
528
+ "kind": "class",
529
+ "description": "The `mdc-appheader` component provides a structured and accessible app header layout.\nIt consists of three primary sections: leading, center, and trailing.\n\n- The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.\n- The **center section** can contain a **search bar**, **icons** or action controls.\n- The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.",
530
+ "name": "Appheader",
531
+ "cssParts": [
532
+ {
533
+ "description": "The main container for styling the header.",
534
+ "name": "container"
535
+ },
536
+ {
537
+ "description": "The leading section of the header.",
538
+ "name": "leading-section"
539
+ },
540
+ {
541
+ "description": "The center section of the header.",
542
+ "name": "center-section"
543
+ },
544
+ {
545
+ "description": "The trailing section of the header.",
546
+ "name": "trailing-section"
547
+ }
548
+ ],
549
+ "slots": [
550
+ {
551
+ "description": "Slot for the leading section (e.g., brand logo, brand name).",
552
+ "name": "leading"
553
+ },
554
+ {
555
+ "description": "Slot for the center section (e.g., search bar, icons).",
556
+ "name": "center"
557
+ },
558
+ {
559
+ "description": "Slot for the trailing section (e.g., profile avatar, icons).",
560
+ "name": "trailing"
561
+ }
562
+ ],
563
+ "members": [],
564
+ "superclass": {
565
+ "name": "Component",
566
+ "module": "/src/models"
567
+ },
568
+ "tagName": "mdc-appheader",
569
+ "jsDoc": "/**\n * The `mdc-appheader` component provides a structured and accessible app header layout.\n * It consists of three primary sections: leading, center, and trailing.\n *\n * - The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.\n * - The **center section** can contain a **search bar**, **icons** or action controls.\n * - The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.\n *\n * @tagname mdc-appheader\n *\n * @slot leading - Slot for the leading section (e.g., brand logo, brand name).\n * @slot center - Slot for the center section (e.g., search bar, icons).\n * @slot trailing - Slot for the trailing section (e.g., profile avatar, icons).\n *\n * @csspart container - The main container for styling the header.\n * @csspart leading-section - The leading section of the header.\n * @csspart center-section - The center section of the header.\n * @csspart trailing-section - The trailing section of the header.\n */",
570
+ "customElement": true
571
+ }
572
+ ],
573
+ "exports": [
574
+ {
575
+ "kind": "js",
576
+ "name": "default",
577
+ "declaration": {
578
+ "name": "Appheader",
579
+ "module": "components/appheader/appheader.component.js"
580
+ }
581
+ }
582
+ ]
583
+ },
523
584
  {
524
585
  "kind": "javascript-module",
525
586
  "path": "components/animation/animation.component.js",
@@ -732,67 +793,6 @@
732
793
  }
733
794
  ]
734
795
  },
735
- {
736
- "kind": "javascript-module",
737
- "path": "components/appheader/appheader.component.js",
738
- "declarations": [
739
- {
740
- "kind": "class",
741
- "description": "The `mdc-appheader` component provides a structured and accessible app header layout.\nIt consists of three primary sections: leading, center, and trailing.\n\n- The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.\n- The **center section** can contain a **search bar**, **icons** or action controls.\n- The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.",
742
- "name": "Appheader",
743
- "cssParts": [
744
- {
745
- "description": "The main container for styling the header.",
746
- "name": "container"
747
- },
748
- {
749
- "description": "The leading section of the header.",
750
- "name": "leading-section"
751
- },
752
- {
753
- "description": "The center section of the header.",
754
- "name": "center-section"
755
- },
756
- {
757
- "description": "The trailing section of the header.",
758
- "name": "trailing-section"
759
- }
760
- ],
761
- "slots": [
762
- {
763
- "description": "Slot for the leading section (e.g., brand logo, brand name).",
764
- "name": "leading"
765
- },
766
- {
767
- "description": "Slot for the center section (e.g., search bar, icons).",
768
- "name": "center"
769
- },
770
- {
771
- "description": "Slot for the trailing section (e.g., profile avatar, icons).",
772
- "name": "trailing"
773
- }
774
- ],
775
- "members": [],
776
- "superclass": {
777
- "name": "Component",
778
- "module": "/src/models"
779
- },
780
- "tagName": "mdc-appheader",
781
- "jsDoc": "/**\n * The `mdc-appheader` component provides a structured and accessible app header layout.\n * It consists of three primary sections: leading, center, and trailing.\n *\n * - The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.\n * - The **center section** can contain a **search bar**, **icons** or action controls.\n * - The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.\n *\n * @tagname mdc-appheader\n *\n * @slot leading - Slot for the leading section (e.g., brand logo, brand name).\n * @slot center - Slot for the center section (e.g., search bar, icons).\n * @slot trailing - Slot for the trailing section (e.g., profile avatar, icons).\n *\n * @csspart container - The main container for styling the header.\n * @csspart leading-section - The leading section of the header.\n * @csspart center-section - The center section of the header.\n * @csspart trailing-section - The trailing section of the header.\n */",
782
- "customElement": true
783
- }
784
- ],
785
- "exports": [
786
- {
787
- "kind": "js",
788
- "name": "default",
789
- "declaration": {
790
- "name": "Appheader",
791
- "module": "components/appheader/appheader.component.js"
792
- }
793
- }
794
- ]
795
- },
796
796
  {
797
797
  "kind": "javascript-module",
798
798
  "path": "components/avatar/avatar.component.js",
@@ -2203,138 +2203,6 @@
2203
2203
  }
2204
2204
  ]
2205
2205
  },
2206
- {
2207
- "kind": "javascript-module",
2208
- "path": "components/buttongroup/buttongroup.component.js",
2209
- "declarations": [
2210
- {
2211
- "kind": "class",
2212
- "description": "buttongroup component, is a styled wrapper for multiple buttons.\nIt can support icon buttons, combination of icon and pill buttons, and text buttons.\nThey are available in horizontal and vertical orientation.",
2213
- "name": "ButtonGroup",
2214
- "cssProperties": [
2215
- {
2216
- "description": "The border radius of the buttongroup",
2217
- "name": "--mdc-buttongroup-border-radius"
2218
- },
2219
- {
2220
- "description": "The border color of the buttongroup",
2221
- "name": "--mdc-buttongroup-border-color"
2222
- },
2223
- {
2224
- "description": "The color of the divider between buttons within the buttongroup",
2225
- "name": "--mdc-buttongroup-divider-color"
2226
- }
2227
- ],
2228
- "slots": [
2229
- {
2230
- "description": "This is a default/unnamed slot, which contains the buttons",
2231
- "name": "default"
2232
- }
2233
- ],
2234
- "members": [
2235
- {
2236
- "kind": "field",
2237
- "name": "orientation",
2238
- "type": {
2239
- "text": "ButtonGroupOrientation"
2240
- },
2241
- "description": "Orientation of the buttongroup.",
2242
- "default": "'horizontal'",
2243
- "attribute": "orientation",
2244
- "reflects": true
2245
- },
2246
- {
2247
- "kind": "field",
2248
- "name": "variant",
2249
- "type": {
2250
- "text": "ButtonGroupVariant"
2251
- },
2252
- "description": "Variant of the buttons within the buttongroup.",
2253
- "default": "'primary'",
2254
- "attribute": "variant",
2255
- "reflects": true
2256
- },
2257
- {
2258
- "kind": "field",
2259
- "name": "size",
2260
- "type": {
2261
- "text": "ButtonGroupSize"
2262
- },
2263
- "description": "Size of the buttons within the buttongroup.",
2264
- "default": "'28'",
2265
- "attribute": "size",
2266
- "reflects": true
2267
- },
2268
- {
2269
- "kind": "field",
2270
- "name": "compact",
2271
- "type": {
2272
- "text": "boolean"
2273
- },
2274
- "default": "false",
2275
- "description": "When this is true, the buttons within the buttongroup will be compact.\ni.e. Irrespective of the size of the buttons, they will have a height of 24px.",
2276
- "attribute": "compact",
2277
- "reflects": true
2278
- }
2279
- ],
2280
- "attributes": [
2281
- {
2282
- "name": "orientation",
2283
- "type": {
2284
- "text": "ButtonGroupOrientation"
2285
- },
2286
- "description": "Orientation of the buttongroup.",
2287
- "default": "'horizontal'",
2288
- "fieldName": "orientation"
2289
- },
2290
- {
2291
- "name": "variant",
2292
- "type": {
2293
- "text": "ButtonGroupVariant"
2294
- },
2295
- "description": "Variant of the buttons within the buttongroup.",
2296
- "default": "'primary'",
2297
- "fieldName": "variant"
2298
- },
2299
- {
2300
- "name": "size",
2301
- "type": {
2302
- "text": "ButtonGroupSize"
2303
- },
2304
- "description": "Size of the buttons within the buttongroup.",
2305
- "default": "'28'",
2306
- "fieldName": "size"
2307
- },
2308
- {
2309
- "name": "compact",
2310
- "type": {
2311
- "text": "boolean"
2312
- },
2313
- "default": "false",
2314
- "description": "When this is true, the buttons within the buttongroup will be compact.\ni.e. Irrespective of the size of the buttons, they will have a height of 24px.",
2315
- "fieldName": "compact"
2316
- }
2317
- ],
2318
- "superclass": {
2319
- "name": "Component",
2320
- "module": "/src/models"
2321
- },
2322
- "tagName": "mdc-buttongroup",
2323
- "jsDoc": "/**\n * buttongroup component, is a styled wrapper for multiple buttons.\n * It can support icon buttons, combination of icon and pill buttons, and text buttons.\n * They are available in horizontal and vertical orientation.\n *\n * @tagname mdc-buttongroup\n *\n * @slot default - This is a default/unnamed slot, which contains the buttons\n *\n * @cssproperty --mdc-buttongroup-border-radius - The border radius of the buttongroup\n * @cssproperty --mdc-buttongroup-border-color - The border color of the buttongroup\n * @cssproperty --mdc-buttongroup-divider-color - The color of the divider between buttons within the buttongroup\n */",
2324
- "customElement": true
2325
- }
2326
- ],
2327
- "exports": [
2328
- {
2329
- "kind": "js",
2330
- "name": "default",
2331
- "declaration": {
2332
- "name": "ButtonGroup",
2333
- "module": "components/buttongroup/buttongroup.component.js"
2334
- }
2335
- }
2336
- ]
2337
- },
2338
2206
  {
2339
2207
  "kind": "javascript-module",
2340
2208
  "path": "components/button/button.component.js",
@@ -3030,6 +2898,138 @@
3030
2898
  }
3031
2899
  ]
3032
2900
  },
2901
+ {
2902
+ "kind": "javascript-module",
2903
+ "path": "components/buttongroup/buttongroup.component.js",
2904
+ "declarations": [
2905
+ {
2906
+ "kind": "class",
2907
+ "description": "buttongroup component, is a styled wrapper for multiple buttons.\nIt can support icon buttons, combination of icon and pill buttons, and text buttons.\nThey are available in horizontal and vertical orientation.",
2908
+ "name": "ButtonGroup",
2909
+ "cssProperties": [
2910
+ {
2911
+ "description": "The border radius of the buttongroup",
2912
+ "name": "--mdc-buttongroup-border-radius"
2913
+ },
2914
+ {
2915
+ "description": "The border color of the buttongroup",
2916
+ "name": "--mdc-buttongroup-border-color"
2917
+ },
2918
+ {
2919
+ "description": "The color of the divider between buttons within the buttongroup",
2920
+ "name": "--mdc-buttongroup-divider-color"
2921
+ }
2922
+ ],
2923
+ "slots": [
2924
+ {
2925
+ "description": "This is a default/unnamed slot, which contains the buttons",
2926
+ "name": "default"
2927
+ }
2928
+ ],
2929
+ "members": [
2930
+ {
2931
+ "kind": "field",
2932
+ "name": "orientation",
2933
+ "type": {
2934
+ "text": "ButtonGroupOrientation"
2935
+ },
2936
+ "description": "Orientation of the buttongroup.",
2937
+ "default": "'horizontal'",
2938
+ "attribute": "orientation",
2939
+ "reflects": true
2940
+ },
2941
+ {
2942
+ "kind": "field",
2943
+ "name": "variant",
2944
+ "type": {
2945
+ "text": "ButtonGroupVariant"
2946
+ },
2947
+ "description": "Variant of the buttons within the buttongroup.",
2948
+ "default": "'primary'",
2949
+ "attribute": "variant",
2950
+ "reflects": true
2951
+ },
2952
+ {
2953
+ "kind": "field",
2954
+ "name": "size",
2955
+ "type": {
2956
+ "text": "ButtonGroupSize"
2957
+ },
2958
+ "description": "Size of the buttons within the buttongroup.",
2959
+ "default": "'28'",
2960
+ "attribute": "size",
2961
+ "reflects": true
2962
+ },
2963
+ {
2964
+ "kind": "field",
2965
+ "name": "compact",
2966
+ "type": {
2967
+ "text": "boolean"
2968
+ },
2969
+ "default": "false",
2970
+ "description": "When this is true, the buttons within the buttongroup will be compact.\ni.e. Irrespective of the size of the buttons, they will have a height of 24px.",
2971
+ "attribute": "compact",
2972
+ "reflects": true
2973
+ }
2974
+ ],
2975
+ "attributes": [
2976
+ {
2977
+ "name": "orientation",
2978
+ "type": {
2979
+ "text": "ButtonGroupOrientation"
2980
+ },
2981
+ "description": "Orientation of the buttongroup.",
2982
+ "default": "'horizontal'",
2983
+ "fieldName": "orientation"
2984
+ },
2985
+ {
2986
+ "name": "variant",
2987
+ "type": {
2988
+ "text": "ButtonGroupVariant"
2989
+ },
2990
+ "description": "Variant of the buttons within the buttongroup.",
2991
+ "default": "'primary'",
2992
+ "fieldName": "variant"
2993
+ },
2994
+ {
2995
+ "name": "size",
2996
+ "type": {
2997
+ "text": "ButtonGroupSize"
2998
+ },
2999
+ "description": "Size of the buttons within the buttongroup.",
3000
+ "default": "'28'",
3001
+ "fieldName": "size"
3002
+ },
3003
+ {
3004
+ "name": "compact",
3005
+ "type": {
3006
+ "text": "boolean"
3007
+ },
3008
+ "default": "false",
3009
+ "description": "When this is true, the buttons within the buttongroup will be compact.\ni.e. Irrespective of the size of the buttons, they will have a height of 24px.",
3010
+ "fieldName": "compact"
3011
+ }
3012
+ ],
3013
+ "superclass": {
3014
+ "name": "Component",
3015
+ "module": "/src/models"
3016
+ },
3017
+ "tagName": "mdc-buttongroup",
3018
+ "jsDoc": "/**\n * buttongroup component, is a styled wrapper for multiple buttons.\n * It can support icon buttons, combination of icon and pill buttons, and text buttons.\n * They are available in horizontal and vertical orientation.\n *\n * @tagname mdc-buttongroup\n *\n * @slot default - This is a default/unnamed slot, which contains the buttons\n *\n * @cssproperty --mdc-buttongroup-border-radius - The border radius of the buttongroup\n * @cssproperty --mdc-buttongroup-border-color - The border color of the buttongroup\n * @cssproperty --mdc-buttongroup-divider-color - The color of the divider between buttons within the buttongroup\n */",
3019
+ "customElement": true
3020
+ }
3021
+ ],
3022
+ "exports": [
3023
+ {
3024
+ "kind": "js",
3025
+ "name": "default",
3026
+ "declaration": {
3027
+ "name": "ButtonGroup",
3028
+ "module": "components/buttongroup/buttongroup.component.js"
3029
+ }
3030
+ }
3031
+ ]
3032
+ },
3033
3033
  {
3034
3034
  "kind": "javascript-module",
3035
3035
  "path": "components/buttonlink/buttonlink.component.js",
@@ -8106,6 +8106,30 @@
8106
8106
  "module": "utils/mixins/FocusTrapMixin.js"
8107
8107
  }
8108
8108
  },
8109
+ {
8110
+ "kind": "method",
8111
+ "name": "isDisabled",
8112
+ "privacy": "private",
8113
+ "parameters": [
8114
+ {
8115
+ "name": "element",
8116
+ "type": {
8117
+ "text": "any"
8118
+ },
8119
+ "description": "The element to check."
8120
+ }
8121
+ ],
8122
+ "description": "Checks if the element is disabled.",
8123
+ "return": {
8124
+ "type": {
8125
+ "text": ""
8126
+ }
8127
+ },
8128
+ "inheritedFrom": {
8129
+ "name": "FocusTrapMixin",
8130
+ "module": "utils/mixins/FocusTrapMixin.js"
8131
+ }
8132
+ },
8109
8133
  {
8110
8134
  "kind": "method",
8111
8135
  "name": "isNotTabbable",
@@ -8773,7 +8797,7 @@
8773
8797
  {
8774
8798
  "kind": "field",
8775
8799
  "name": "onOutsidePopoverClick",
8776
- "privacy": "private",
8800
+ "privacy": "protected",
8777
8801
  "description": "Handles the outside click event to close the popover.",
8778
8802
  "parameters": [
8779
8803
  {
@@ -9876,6 +9900,30 @@
9876
9900
  "module": "utils/mixins/FocusTrapMixin.js"
9877
9901
  }
9878
9902
  },
9903
+ {
9904
+ "kind": "method",
9905
+ "name": "isDisabled",
9906
+ "privacy": "private",
9907
+ "parameters": [
9908
+ {
9909
+ "name": "element",
9910
+ "type": {
9911
+ "text": "any"
9912
+ },
9913
+ "description": "The element to check."
9914
+ }
9915
+ ],
9916
+ "description": "Checks if the element is disabled.",
9917
+ "return": {
9918
+ "type": {
9919
+ "text": ""
9920
+ }
9921
+ },
9922
+ "inheritedFrom": {
9923
+ "name": "FocusTrapMixin",
9924
+ "module": "utils/mixins/FocusTrapMixin.js"
9925
+ }
9926
+ },
9879
9927
  {
9880
9928
  "kind": "method",
9881
9929
  "name": "isNotTabbable",
@@ -14627,7 +14675,7 @@
14627
14675
  {
14628
14676
  "kind": "method",
14629
14677
  "name": "handleKeyDown",
14630
- "privacy": "private",
14678
+ "privacy": "protected",
14631
14679
  "return": {
14632
14680
  "type": {
14633
14681
  "text": "void"
@@ -14642,12 +14690,12 @@
14642
14690
  "description": "The keyboard event triggered when a key is pressed down."
14643
14691
  }
14644
14692
  ],
14645
- "description": "Fires the click event when the enter or space key is pressed."
14693
+ "description": "Fires the click event when the enter or space key is pressed down.\nThis behavior is similar to a button click and key interaction."
14646
14694
  },
14647
14695
  {
14648
14696
  "kind": "method",
14649
14697
  "name": "triggerClickEvent",
14650
- "privacy": "private",
14698
+ "privacy": "protected",
14651
14699
  "description": "Triggers a click event on the list item."
14652
14700
  },
14653
14701
  {
@@ -15731,6 +15779,50 @@
15731
15779
  "attribute": "arrow-direction",
15732
15780
  "reflects": true
15733
15781
  },
15782
+ {
15783
+ "kind": "method",
15784
+ "name": "handleKeyDown",
15785
+ "privacy": "protected",
15786
+ "return": {
15787
+ "type": {
15788
+ "text": "void"
15789
+ }
15790
+ },
15791
+ "parameters": [
15792
+ {
15793
+ "name": "event",
15794
+ "type": {
15795
+ "text": "KeyboardEvent"
15796
+ },
15797
+ "description": "The keyboard event that triggered the action."
15798
+ }
15799
+ ],
15800
+ "description": "Handles the keydown event for the menu item.\nIf the Enter key is pressed, it triggers a click event on the menu item.\nThis allows keyboard users to activate the menu item using the Enter key.",
15801
+ "inheritedFrom": {
15802
+ "name": "ListItem",
15803
+ "module": "components/listitem/listitem.component.js"
15804
+ }
15805
+ },
15806
+ {
15807
+ "kind": "method",
15808
+ "name": "handleKeyUp",
15809
+ "privacy": "private",
15810
+ "return": {
15811
+ "type": {
15812
+ "text": "void"
15813
+ }
15814
+ },
15815
+ "parameters": [
15816
+ {
15817
+ "name": "event",
15818
+ "type": {
15819
+ "text": "KeyboardEvent"
15820
+ },
15821
+ "description": "The keyboard event that triggered the action."
15822
+ }
15823
+ ],
15824
+ "description": "Handles the keyup event for the menu item.\nIf the Space key is released, it triggers a click event on the menu item.\nThis allows keyboard users to activate the menu item using the Space key.\nIt also prevents the default action of the Space key to avoid scrolling the page."
15825
+ },
15734
15826
  {
15735
15827
  "kind": "method",
15736
15828
  "name": "renderTrailingControls",
@@ -15905,34 +15997,10 @@
15905
15997
  "module": "components/listitem/listitem.component.js"
15906
15998
  }
15907
15999
  },
15908
- {
15909
- "kind": "method",
15910
- "name": "handleKeyDown",
15911
- "privacy": "private",
15912
- "return": {
15913
- "type": {
15914
- "text": "void"
15915
- }
15916
- },
15917
- "parameters": [
15918
- {
15919
- "name": "event",
15920
- "type": {
15921
- "text": "KeyboardEvent"
15922
- },
15923
- "description": "The keyboard event triggered when a key is pressed down."
15924
- }
15925
- ],
15926
- "description": "Fires the click event when the enter or space key is pressed.",
15927
- "inheritedFrom": {
15928
- "name": "ListItem",
15929
- "module": "components/listitem/listitem.component.js"
15930
- }
15931
- },
15932
16000
  {
15933
16001
  "kind": "method",
15934
16002
  "name": "triggerClickEvent",
15935
- "privacy": "private",
16003
+ "privacy": "protected",
15936
16004
  "description": "Triggers a click event on the list item.",
15937
16005
  "inheritedFrom": {
15938
16006
  "name": "ListItem",
@@ -16497,15 +16565,22 @@
16497
16565
  "attribute": "indicator",
16498
16566
  "reflects": true
16499
16567
  },
16568
+ {
16569
+ "kind": "field",
16570
+ "name": "menuitemcheckboxHandleClick",
16571
+ "privacy": "private",
16572
+ "description": "Handles click events to toggle checked state\nIf the menuitemcheckbox is disabled, it does nothing.\nIf the menuitemcheckbox is not disabled, it toggles the `aria-checked` state between `true` and `false`."
16573
+ },
16500
16574
  {
16501
16575
  "kind": "method",
16502
16576
  "name": "staticCheckbox",
16503
16577
  "privacy": "private",
16504
16578
  "return": {
16505
16579
  "type": {
16506
- "text": "TemplateResult | typeof nothing"
16580
+ "text": ""
16507
16581
  }
16508
- }
16582
+ },
16583
+ "description": "Returns a static checkbox element if the indicator is set to checkbox.\nIf the indicator is not set to checkbox, it returns nothing."
16509
16584
  },
16510
16585
  {
16511
16586
  "kind": "method",
@@ -16513,9 +16588,10 @@
16513
16588
  "privacy": "private",
16514
16589
  "return": {
16515
16590
  "type": {
16516
- "text": "TemplateResult | typeof nothing"
16591
+ "text": ""
16517
16592
  }
16518
- }
16593
+ },
16594
+ "description": "Returns a static toggle element if the indicator is set to toggle.\nIf the indicator is not set to toggle, it returns nothing.\n\nThe toggle will always be positioned on the trailing side of the menuitem label."
16519
16595
  },
16520
16596
  {
16521
16597
  "kind": "method",
@@ -16523,9 +16599,10 @@
16523
16599
  "privacy": "private",
16524
16600
  "return": {
16525
16601
  "type": {
16526
- "text": "TemplateResult | typeof nothing"
16602
+ "text": ""
16527
16603
  }
16528
- }
16604
+ },
16605
+ "description": "Returns a checkmark icon if the indicator is set to checkmark and the aria-checked state is true.\nIf the indicator is not set to checkmark or the aria-checked state is false, it returns nothing.\n\nThe checkmark icon will always be positioned on the trailing side of the menuitem label."
16529
16606
  },
16530
16607
  {
16531
16608
  "kind": "field",
@@ -16555,6 +16632,54 @@
16555
16632
  "module": "components/menuitem/menuitem.component.js"
16556
16633
  }
16557
16634
  },
16635
+ {
16636
+ "kind": "method",
16637
+ "name": "handleKeyDown",
16638
+ "privacy": "protected",
16639
+ "return": {
16640
+ "type": {
16641
+ "text": "void"
16642
+ }
16643
+ },
16644
+ "parameters": [
16645
+ {
16646
+ "name": "event",
16647
+ "type": {
16648
+ "text": "KeyboardEvent"
16649
+ },
16650
+ "description": "The keyboard event that triggered the action."
16651
+ }
16652
+ ],
16653
+ "description": "Handles the keydown event for the menu item.\nIf the Enter key is pressed, it triggers a click event on the menu item.\nThis allows keyboard users to activate the menu item using the Enter key.",
16654
+ "inheritedFrom": {
16655
+ "name": "ListItem",
16656
+ "module": "components/listitem/listitem.component.js"
16657
+ }
16658
+ },
16659
+ {
16660
+ "kind": "method",
16661
+ "name": "handleKeyUp",
16662
+ "privacy": "private",
16663
+ "return": {
16664
+ "type": {
16665
+ "text": "void"
16666
+ }
16667
+ },
16668
+ "parameters": [
16669
+ {
16670
+ "name": "event",
16671
+ "type": {
16672
+ "text": "KeyboardEvent"
16673
+ },
16674
+ "description": "The keyboard event that triggered the action."
16675
+ }
16676
+ ],
16677
+ "description": "Handles the keyup event for the menu item.\nIf the Space key is released, it triggers a click event on the menu item.\nThis allows keyboard users to activate the menu item using the Space key.\nIt also prevents the default action of the Space key to avoid scrolling the page.",
16678
+ "inheritedFrom": {
16679
+ "name": "MenuItem",
16680
+ "module": "components/menuitem/menuitem.component.js"
16681
+ }
16682
+ },
16558
16683
  {
16559
16684
  "kind": "method",
16560
16685
  "name": "renderTrailingControls",
@@ -16729,34 +16854,10 @@
16729
16854
  "module": "components/listitem/listitem.component.js"
16730
16855
  }
16731
16856
  },
16732
- {
16733
- "kind": "method",
16734
- "name": "handleKeyDown",
16735
- "privacy": "private",
16736
- "return": {
16737
- "type": {
16738
- "text": "void"
16739
- }
16740
- },
16741
- "parameters": [
16742
- {
16743
- "name": "event",
16744
- "type": {
16745
- "text": "KeyboardEvent"
16746
- },
16747
- "description": "The keyboard event triggered when a key is pressed down."
16748
- }
16749
- ],
16750
- "description": "Fires the click event when the enter or space key is pressed.",
16751
- "inheritedFrom": {
16752
- "name": "ListItem",
16753
- "module": "components/listitem/listitem.component.js"
16754
- }
16755
- },
16756
16857
  {
16757
16858
  "kind": "method",
16758
16859
  "name": "triggerClickEvent",
16759
- "privacy": "private",
16860
+ "privacy": "protected",
16760
16861
  "description": "Triggers a click event on the list item.",
16761
16862
  "inheritedFrom": {
16762
16863
  "name": "ListItem",
@@ -17205,6 +17306,23 @@
17205
17306
  "attribute": "aria-checked",
17206
17307
  "reflects": true
17207
17308
  },
17309
+ {
17310
+ "kind": "field",
17311
+ "name": "name",
17312
+ "type": {
17313
+ "text": "string"
17314
+ },
17315
+ "default": "''",
17316
+ "description": "The name attribute is used to group radio items within the same menu container.",
17317
+ "attribute": "name",
17318
+ "reflects": true
17319
+ },
17320
+ {
17321
+ "kind": "field",
17322
+ "name": "menuitemradioHandleClick",
17323
+ "privacy": "private",
17324
+ "description": "Handles click events to set checked state and uncheck siblings in the same group and container.\nIf the menuitemradio is not checked, it sets its aria-checked state to `true`\nand sets all other menuitemradio elements of the same group with aria-checked state to `false`."
17325
+ },
17208
17326
  {
17209
17327
  "kind": "field",
17210
17328
  "name": "arrowPosition",
@@ -17233,6 +17351,54 @@
17233
17351
  "module": "components/menuitem/menuitem.component.js"
17234
17352
  }
17235
17353
  },
17354
+ {
17355
+ "kind": "method",
17356
+ "name": "handleKeyDown",
17357
+ "privacy": "protected",
17358
+ "return": {
17359
+ "type": {
17360
+ "text": "void"
17361
+ }
17362
+ },
17363
+ "parameters": [
17364
+ {
17365
+ "name": "event",
17366
+ "type": {
17367
+ "text": "KeyboardEvent"
17368
+ },
17369
+ "description": "The keyboard event that triggered the action."
17370
+ }
17371
+ ],
17372
+ "description": "Handles the keydown event for the menu item.\nIf the Enter key is pressed, it triggers a click event on the menu item.\nThis allows keyboard users to activate the menu item using the Enter key.",
17373
+ "inheritedFrom": {
17374
+ "name": "ListItem",
17375
+ "module": "components/listitem/listitem.component.js"
17376
+ }
17377
+ },
17378
+ {
17379
+ "kind": "method",
17380
+ "name": "handleKeyUp",
17381
+ "privacy": "private",
17382
+ "return": {
17383
+ "type": {
17384
+ "text": "void"
17385
+ }
17386
+ },
17387
+ "parameters": [
17388
+ {
17389
+ "name": "event",
17390
+ "type": {
17391
+ "text": "KeyboardEvent"
17392
+ },
17393
+ "description": "The keyboard event that triggered the action."
17394
+ }
17395
+ ],
17396
+ "description": "Handles the keyup event for the menu item.\nIf the Space key is released, it triggers a click event on the menu item.\nThis allows keyboard users to activate the menu item using the Space key.\nIt also prevents the default action of the Space key to avoid scrolling the page.",
17397
+ "inheritedFrom": {
17398
+ "name": "MenuItem",
17399
+ "module": "components/menuitem/menuitem.component.js"
17400
+ }
17401
+ },
17236
17402
  {
17237
17403
  "kind": "method",
17238
17404
  "name": "renderTrailingControls",
@@ -17407,34 +17573,10 @@
17407
17573
  "module": "components/listitem/listitem.component.js"
17408
17574
  }
17409
17575
  },
17410
- {
17411
- "kind": "method",
17412
- "name": "handleKeyDown",
17413
- "privacy": "private",
17414
- "return": {
17415
- "type": {
17416
- "text": "void"
17417
- }
17418
- },
17419
- "parameters": [
17420
- {
17421
- "name": "event",
17422
- "type": {
17423
- "text": "KeyboardEvent"
17424
- },
17425
- "description": "The keyboard event triggered when a key is pressed down."
17426
- }
17427
- ],
17428
- "description": "Fires the click event when the enter or space key is pressed.",
17429
- "inheritedFrom": {
17430
- "name": "ListItem",
17431
- "module": "components/listitem/listitem.component.js"
17432
- }
17433
- },
17434
17576
  {
17435
17577
  "kind": "method",
17436
17578
  "name": "triggerClickEvent",
17437
- "privacy": "private",
17579
+ "privacy": "protected",
17438
17580
  "description": "Triggers a click event on the list item.",
17439
17581
  "inheritedFrom": {
17440
17582
  "name": "ListItem",
@@ -17627,6 +17769,15 @@
17627
17769
  "default": "'false'",
17628
17770
  "fieldName": "ariaChecked"
17629
17771
  },
17772
+ {
17773
+ "name": "name",
17774
+ "type": {
17775
+ "text": "string"
17776
+ },
17777
+ "default": "''",
17778
+ "description": "The name attribute is used to group radio items within the same menu container.",
17779
+ "fieldName": "name"
17780
+ },
17630
17781
  {
17631
17782
  "name": "arrow-position",
17632
17783
  "type": {
@@ -17945,51 +18096,12 @@
17945
18096
  "members": [
17946
18097
  {
17947
18098
  "kind": "field",
17948
- "name": "ariaOrientation",
17949
- "type": {
17950
- "text": "Orientation"
17951
- },
17952
- "description": "Defines the orientation of the menu. This value is reflected to\nthe `aria-orientation` attribute and can be either `'horizontal'` or `'vertical'`.",
17953
- "default": "'horizontal'",
17954
- "attribute": "aria-orientation",
17955
- "reflects": true,
17956
- "inheritedFrom": {
17957
- "name": "MenuMixin",
17958
- "module": "utils/mixins/MenuMixin.js"
17959
- }
17960
- },
17961
- {
17962
- "kind": "method",
17963
- "name": "setMenuBarPopoverValue",
17964
- "privacy": "private",
17965
- "parameters": [
17966
- {
17967
- "name": "value",
17968
- "type": {
17969
- "text": "boolean"
17970
- },
17971
- "description": "The value to set."
17972
- }
17973
- ],
17974
- "description": "Sets the value of the data-menu-popover-open attribute on the menu element.",
17975
- "inheritedFrom": {
17976
- "name": "MenuMixin",
17977
- "module": "utils/mixins/MenuMixin.js"
17978
- }
17979
- },
17980
- {
17981
- "kind": "method",
17982
- "name": "isMenuPopoverOpen",
17983
- "privacy": "private",
17984
- "return": {
17985
- "type": {
17986
- "text": "boolean"
17987
- }
17988
- },
17989
- "description": "Returns true if the data-menu-popover-open attribute on the menu element is set to 'true', false otherwise.",
18099
+ "name": "hidePopover",
18100
+ "privacy": "public",
18101
+ "description": "Hides the popover.",
17990
18102
  "inheritedFrom": {
17991
- "name": "MenuMixin",
17992
- "module": "utils/mixins/MenuMixin.js"
18103
+ "name": "Popover",
18104
+ "module": "components/popover/popover.component.js"
17993
18105
  }
17994
18106
  },
17995
18107
  {
@@ -18007,255 +18119,63 @@
18007
18119
  "type": {
18008
18120
  "text": "EventTarget | null"
18009
18121
  },
18010
- "description": "The target element to find the index of."
18122
+ "description": "The target element that triggered the event."
18011
18123
  }
18012
18124
  ],
18013
- "description": "Returns the index of the given target in the menuItems array.\nIf the target is not a menu item, but a child element of a menu item,\nit returns the index of the parent menu item.",
18014
- "inheritedFrom": {
18015
- "name": "MenuMixin",
18016
- "module": "utils/mixins/MenuMixin.js"
18017
- }
18018
- },
18019
- {
18020
- "kind": "method",
18021
- "name": "updatePopoverPlacementBasedOnOrientation",
18022
- "privacy": "protected",
18023
- "return": {
18024
- "type": {
18025
- "text": "void"
18026
- }
18027
- },
18028
- "description": "Updates the placement of the popover based on the aria-orientation property.",
18029
- "inheritedFrom": {
18030
- "name": "MenuMixin",
18031
- "module": "utils/mixins/MenuMixin.js"
18032
- }
18125
+ "description": "Retrieves the current index of the menu item that triggered the event."
18033
18126
  },
18034
18127
  {
18035
18128
  "kind": "method",
18036
- "name": "updateTabIndexAndFocusNewIndex",
18129
+ "name": "resetTabIndexAndSetFocus",
18037
18130
  "privacy": "private",
18038
18131
  "parameters": [
18039
18132
  {
18040
- "name": "menuItems",
18041
- "type": {
18042
- "text": "Array<HTMLElement>"
18043
- },
18044
- "description": "The list of menu items."
18045
- },
18046
- {
18047
- "name": "currentIndex",
18133
+ "name": "newIndex",
18048
18134
  "type": {
18049
18135
  "text": "number"
18050
18136
  },
18051
- "description": "The current index of the focused menu item."
18137
+ "description": "The index of the new menu item to focus."
18052
18138
  },
18053
18139
  {
18054
- "name": "newIndex",
18140
+ "name": "oldIndex",
18055
18141
  "type": {
18056
18142
  "text": "number"
18057
18143
  },
18058
- "description": "The index of the new active element in the list."
18144
+ "description": "The index of the currently focused menu item."
18059
18145
  }
18060
18146
  ],
18061
- "description": "Updates the tabindex of the current index to -1 and the tabindex of the new index to 0,\neffectively setting the active element. This is used when navigating the menu via keyboard.",
18062
- "inheritedFrom": {
18063
- "name": "MenuMixin",
18064
- "module": "utils/mixins/MenuMixin.js"
18065
- }
18066
- },
18067
- {
18068
- "kind": "method",
18069
- "name": "isValidMenu",
18070
- "privacy": "private",
18071
- "return": {
18072
- "type": {
18073
- "text": ""
18074
- }
18075
- },
18076
- "parameters": [
18077
- {
18078
- "name": "tagName",
18079
- "optional": true,
18080
- "type": {
18081
- "text": "string"
18082
- },
18083
- "description": "The tag name to check."
18084
- }
18085
- ],
18086
- "description": "Checks if the given tag name is a valid menu tag name.",
18087
- "inheritedFrom": {
18088
- "name": "MenuMixin",
18089
- "module": "utils/mixins/MenuMixin.js"
18090
- }
18091
- },
18092
- {
18093
- "kind": "method",
18094
- "name": "isValidNavItemList",
18095
- "privacy": "private",
18096
- "return": {
18097
- "type": {
18098
- "text": ""
18099
- }
18100
- },
18101
- "parameters": [
18102
- {
18103
- "name": "tagName",
18104
- "optional": true,
18105
- "type": {
18106
- "text": "string"
18107
- },
18108
- "description": "The tag name to check."
18109
- }
18110
- ],
18111
- "description": "Checks if the given tag name is a valid navitemlist tag name.",
18112
- "inheritedFrom": {
18113
- "name": "MenuMixin",
18114
- "module": "utils/mixins/MenuMixin.js"
18115
- }
18116
- },
18117
- {
18118
- "kind": "method",
18119
- "name": "isValidPopover",
18120
- "privacy": "private",
18121
- "return": {
18122
- "type": {
18123
- "text": ""
18124
- }
18125
- },
18126
- "parameters": [
18127
- {
18128
- "name": "tagName",
18129
- "optional": true,
18130
- "type": {
18131
- "text": "string"
18132
- },
18133
- "description": "The tag name to check."
18134
- }
18135
- ],
18136
- "description": "Checks if the given tag name is a valid menu popover tag name.",
18137
- "inheritedFrom": {
18138
- "name": "MenuMixin",
18139
- "module": "utils/mixins/MenuMixin.js"
18140
- }
18141
- },
18142
- {
18143
- "kind": "method",
18144
- "name": "openPopover",
18145
- "privacy": "private",
18147
+ "description": "Resets the tabindex of the currently focused menu item and sets focus to a new menu item.",
18146
18148
  "return": {
18147
18149
  "type": {
18148
18150
  "text": ""
18149
18151
  }
18150
- },
18151
- "parameters": [
18152
- {
18153
- "name": "index",
18154
- "type": {
18155
- "text": "number"
18156
- },
18157
- "description": "The index of the menu item to open the popover for."
18158
- }
18159
- ],
18160
- "description": "Opens the popover at the given index if it exists.",
18161
- "inheritedFrom": {
18162
- "name": "MenuMixin",
18163
- "module": "utils/mixins/MenuMixin.js"
18164
18152
  }
18165
18153
  },
18166
18154
  {
18167
18155
  "kind": "method",
18168
- "name": "navigateToPrevMenuItem",
18156
+ "name": "closeAllMenuPopovers",
18169
18157
  "privacy": "private",
18170
- "return": {
18171
- "type": {
18172
- "text": "void"
18173
- }
18174
- },
18175
- "parameters": [
18176
- {
18177
- "name": "currentIndex",
18178
- "type": {
18179
- "text": "number"
18180
- },
18181
- "description": "The current index of the focused menu item."
18182
- },
18183
- {
18184
- "name": "firstMenuIndex",
18185
- "type": {
18186
- "text": "number"
18187
- },
18188
- "description": "The index of the first menu item."
18189
- },
18190
- {
18191
- "name": "lastMenuIndex",
18192
- "type": {
18193
- "text": "number"
18194
- },
18195
- "description": "The index of the last menu item."
18196
- },
18197
- {
18198
- "name": "ariaOrientation",
18199
- "type": {
18200
- "text": "Orientation"
18201
- },
18202
- "description": "The orientation of the menu."
18203
- }
18204
- ],
18205
- "description": "Navigates to the previous menu item and updates the tabindex of the current index\nto -1 and the tabindex of the new index to 0.",
18206
- "inheritedFrom": {
18207
- "name": "MenuMixin",
18208
- "module": "utils/mixins/MenuMixin.js"
18209
- }
18158
+ "description": "Closes all menu popovers in the stack.\nThis method is used to ensure that when a menu item is clicked,\nall other open popovers are closed, maintaining a clean user interface.\nIt iterates through the `popoverStack` and hides each popover until the stack is empty."
18210
18159
  },
18211
18160
  {
18212
- "kind": "method",
18213
- "name": "navigateToNextMenuItem",
18214
- "privacy": "private",
18215
- "return": {
18216
- "type": {
18217
- "text": "void"
18218
- }
18219
- },
18161
+ "kind": "field",
18162
+ "name": "onOutsidePopoverClick",
18163
+ "privacy": "protected",
18164
+ "description": "Handles outside click events to close the popover.\nThis method checks if the click occurred outside the popover and its trigger element.\nIf so, it closes the popover by calling `closeAllMenuPopovers`.\nIt also checks if the click was on the backdrop element (if present) to close the popover.",
18220
18165
  "parameters": [
18221
18166
  {
18222
- "name": "currentIndex",
18223
- "type": {
18224
- "text": "number"
18225
- },
18226
- "description": "The current index of the focused menu item."
18227
- },
18228
- {
18229
- "name": "firstMenuIndex",
18230
- "type": {
18231
- "text": "number"
18232
- },
18233
- "description": "The index of the first menu item."
18234
- },
18235
- {
18236
- "name": "lastMenuIndex",
18237
- "type": {
18238
- "text": "number"
18239
- },
18240
- "description": "The index of the last menu item."
18241
- },
18242
- {
18243
- "name": "ariaOrientation",
18244
- "type": {
18245
- "text": "Orientation"
18246
- },
18247
- "description": "The orientation of the menu."
18167
+ "description": "The mouse event that triggered the outside click.",
18168
+ "name": "event"
18248
18169
  }
18249
18170
  ],
18250
- "description": "Navigates to the next menu item and updates the tabindex of the current index\nto -1 and the tabindex of the new index to 0.",
18251
18171
  "inheritedFrom": {
18252
- "name": "MenuMixin",
18253
- "module": "utils/mixins/MenuMixin.js"
18172
+ "name": "Popover",
18173
+ "module": "components/popover/popover.component.js"
18254
18174
  }
18255
18175
  },
18256
18176
  {
18257
18177
  "kind": "method",
18258
- "name": "getParentMenuItemDetails",
18178
+ "name": "hasSubmenuWithTriggerId",
18259
18179
  "privacy": "private",
18260
18180
  "return": {
18261
18181
  "type": {
@@ -18264,30 +18184,18 @@
18264
18184
  },
18265
18185
  "parameters": [
18266
18186
  {
18267
- "name": "menuChildId",
18187
+ "name": "id",
18268
18188
  "type": {
18269
- "text": "string"
18189
+ "text": "string | null"
18270
18190
  },
18271
- "description": "The id of the menu child element."
18272
- },
18273
- {
18274
- "name": "menu",
18275
- "optional": true,
18276
- "type": {
18277
- "text": "HTMLElement | null"
18278
- },
18279
- "description": "The current menu element to start traversing from."
18191
+ "description": "The ID of the menu item to check for a submenu."
18280
18192
  }
18281
18193
  ],
18282
- "description": "Returns the parent menu item details for the given menu child id.\nIt recursively traverses up the DOM tree until it finds a menu or menubar element.",
18283
- "inheritedFrom": {
18284
- "name": "MenuMixin",
18285
- "module": "utils/mixins/MenuMixin.js"
18286
- }
18194
+ "description": "Checks if the menu popover has a submenu with the specified trigger ID.\nThis method is used to determine if a menu item has a submenu associated with it,\nwhich is indicated by the presence of a `triggerid` attribute in the submenu popover.\nIt queries the parent element for any popover with the specified trigger ID."
18287
18195
  },
18288
18196
  {
18289
18197
  "kind": "method",
18290
- "name": "hideAllPopovers",
18198
+ "name": "handleMouseClick",
18291
18199
  "privacy": "private",
18292
18200
  "return": {
18293
18201
  "type": {
@@ -18296,268 +18204,60 @@
18296
18204
  },
18297
18205
  "parameters": [
18298
18206
  {
18299
- "name": "menu",
18300
- "optional": true,
18207
+ "name": "event",
18301
18208
  "type": {
18302
- "text": "HTMLElement | null"
18209
+ "text": "MouseEvent"
18303
18210
  },
18304
- "description": "The current menu element to start traversing from."
18211
+ "description": "The mouse event that triggered the click."
18305
18212
  }
18306
18213
  ],
18307
- "description": "Recursively hides all the popovers up the DOM tree until it finds a menu or menubar element.",
18308
- "inheritedFrom": {
18309
- "name": "MenuMixin",
18310
- "module": "utils/mixins/MenuMixin.js"
18311
- }
18214
+ "description": "Handles mouse click events on the menu items.\nThis method checks if the clicked element is a valid menu item and not a submenu trigger.\nIf it is, it closes all other menu popovers to ensure only one menu is open at a time."
18312
18215
  },
18313
18216
  {
18314
18217
  "kind": "method",
18315
- "name": "navigateToPrevParentMenuItem",
18218
+ "name": "resolveDirectionKey",
18316
18219
  "privacy": "private",
18317
- "return": {
18318
- "type": {
18319
- "text": "void"
18320
- }
18321
- },
18322
18220
  "parameters": [
18323
- {
18324
- "name": "currentIndex",
18325
- "type": {
18326
- "text": "number"
18327
- },
18328
- "description": "The current index of the focused menu item."
18329
- },
18330
18221
  {
18331
18222
  "name": "key",
18332
18223
  "type": {
18333
18224
  "text": "string"
18334
- }
18335
- }
18336
- ],
18337
- "description": "Recursively navigates up the DOM tree until it finds the previous menu item\nand updates the tabindex of the current index to -1 and the tabindex of the new index to 0.\nAlso opens the popover of the previous menu item.",
18338
- "inheritedFrom": {
18339
- "name": "MenuMixin",
18340
- "module": "utils/mixins/MenuMixin.js"
18341
- }
18342
- },
18343
- {
18344
- "kind": "method",
18345
- "name": "closePopoverAndNavigateToPrevParentMenuItem",
18346
- "privacy": "private",
18347
- "return": {
18348
- "type": {
18349
- "text": "void"
18350
- }
18351
- },
18352
- "parameters": [
18353
- {
18354
- "name": "currentIndex",
18355
- "type": {
18356
- "text": "number"
18357
18225
  },
18358
- "description": "The current index of the focused menu item."
18226
+ "description": "The key pressed by the user."
18359
18227
  },
18360
18228
  {
18361
- "name": "key",
18229
+ "name": "isRtl",
18362
18230
  "type": {
18363
- "text": "string"
18364
- }
18365
- }
18366
- ],
18367
- "description": "Closes the current menu popover and navigates to the previous parent menu item.",
18368
- "inheritedFrom": {
18369
- "name": "MenuMixin",
18370
- "module": "utils/mixins/MenuMixin.js"
18371
- }
18372
- },
18373
- {
18374
- "kind": "method",
18375
- "name": "getParentMenuContents",
18376
- "privacy": "private",
18377
- "return": {
18378
- "type": {
18379
- "text": ""
18380
- }
18381
- },
18382
- "parameters": [
18383
- {
18384
- "name": "currentMenuItem",
18385
- "type": {
18386
- "text": "HTMLElement | null"
18387
- },
18388
- "description": "The current menu item to start traversing from."
18389
- }
18390
- ],
18391
- "description": "Gets the parent menu contents of the given current menu item.\nIt recursively traverses up the DOM tree until it finds the parent menu element\nand gets the parent menu item details and the children of the parent menu item.",
18392
- "inheritedFrom": {
18393
- "name": "MenuMixin",
18394
- "module": "utils/mixins/MenuMixin.js"
18395
- }
18396
- },
18397
- {
18398
- "kind": "method",
18399
- "name": "openPopoverAndNavigateToNextChildrenMenuItem",
18400
- "privacy": "private",
18401
- "return": {
18402
- "type": {
18403
- "text": "void"
18404
- }
18405
- },
18406
- "parameters": [
18407
- {
18408
- "name": "currentIndex",
18409
- "type": {
18410
- "text": "number"
18411
- },
18412
- "description": "The current index of the focused menu item."
18413
- }
18414
- ],
18415
- "description": "Opens the popover of the next children menu item if there are children.\nIf there are no children, then it closes all popovers recursively and\nnavigates to the next menu item from the menu bar.\nIf the parent menu item does not have any children, then we will go to the next menu item.",
18416
- "inheritedFrom": {
18417
- "name": "MenuMixin",
18418
- "module": "utils/mixins/MenuMixin.js"
18419
- }
18420
- },
18421
- {
18422
- "kind": "method",
18423
- "name": "isValidMenuItem",
18424
- "privacy": "private",
18425
- "return": {
18426
- "type": {
18427
- "text": ""
18428
- }
18429
- },
18430
- "parameters": [
18431
- {
18432
- "name": "menuItem",
18433
- "type": {
18434
- "text": "HTMLElement"
18231
+ "text": "boolean"
18435
18232
  },
18436
- "description": "The menu item to check."
18437
- }
18438
- ],
18439
- "description": "Checks if the given menu item is a valid menu item.",
18440
- "inheritedFrom": {
18441
- "name": "MenuMixin",
18442
- "module": "utils/mixins/MenuMixin.js"
18443
- }
18444
- },
18445
- {
18446
- "kind": "method",
18447
- "name": "resetTabIndexAndSetActiveTabIndex",
18448
- "privacy": "private",
18449
- "parameters": [
18450
- {
18451
- "name": "menuItems",
18452
- "type": {
18453
- "text": "Array<HTMLElement>"
18454
- }
18455
- },
18456
- {
18457
- "description": "The index of the new active element in the list.",
18458
- "name": "newIndex"
18233
+ "description": "A boolean indicating if the layout is right-to-left (RTL)."
18459
18234
  }
18460
18235
  ],
18461
- "description": "Resets all list items tabindex to -1 and sets the tabindex of the\nelement at the given index to 0, effectively setting the active\nelement. This is used when navigating the list via keyboard.",
18462
- "inheritedFrom": {
18463
- "name": "MenuMixin",
18464
- "module": "utils/mixins/MenuMixin.js"
18465
- }
18466
- },
18467
- {
18468
- "kind": "method",
18469
- "name": "getKeyBasedOnDirection",
18470
- "privacy": "private",
18236
+ "description": "Resolves the key pressed by the user based on the direction of the layout.\nThis method is used to handle keyboard navigation in a right-to-left (RTL) layout.\nIt checks if the layout is RTL and adjusts the arrow keys accordingly.\nFor example, in RTL, the left arrow key behaves like the right arrow key and vice versa.",
18471
18237
  "return": {
18472
18238
  "type": {
18473
18239
  "text": ""
18474
18240
  }
18475
- },
18476
- "parameters": [
18477
- {
18478
- "name": "originalKey",
18479
- "type": {
18480
- "text": "string"
18481
- },
18482
- "description": "The original key pressed."
18483
- }
18484
- ],
18485
- "description": "Returns the key based on the direction of the document.\nIf the document is in RTL mode and the key is ARROW_LEFT or ARROW_RIGHT,\nit will swap them to maintain the correct navigation direction.",
18486
- "inheritedFrom": {
18487
- "name": "MenuMixin",
18488
- "module": "utils/mixins/MenuMixin.js"
18489
18241
  }
18490
18242
  },
18491
18243
  {
18492
18244
  "kind": "method",
18493
18245
  "name": "handleKeyDown",
18494
- "privacy": "protected",
18495
- "return": {
18496
- "type": {
18497
- "text": "void"
18498
- }
18499
- },
18246
+ "privacy": "private",
18500
18247
  "parameters": [
18501
18248
  {
18502
18249
  "name": "event",
18503
18250
  "type": {
18504
18251
  "text": "KeyboardEvent"
18505
18252
  },
18506
- "description": "The keyboard event."
18253
+ "description": "The keyboard event that triggered the keydown action."
18507
18254
  }
18508
18255
  ],
18509
- "description": "Handles the keydown event on the menu bar.\nThe keys are as follows:\n- HOME: Sets focus to the first menu item.\n- END: Sets focus to the last menu item.\n- ARROW_LEFT:\n - If orientation is horizontal, then it navigates to the previous menu item.\n - If orientation is vertical, then it closes the popover of the current menu item and\n navigates to the previous parent menu item.\n- ARROW_RIGHT:\n - If orientation is horizontal, then it navigates to the next menu item.\n - If orientation is vertical, then it opens the popover of the current menu item and\n navigates to the next children menu item.\n- ARROW_UP:\n - If orientation is horizontal, then it opens the popover of the current menu item.\n - If orientation is vertical, then it navigates to the previous menu item.\n- ARROW_DOWN:\n - If orientation is horizontal, then it opens the popover of the current menu item.\n - If orientation is vertical, then it navigates to the next menu item.\n- SPACE:\n- ENTER:\n - If the next element sibling is a menu popover, then it opens the popover of the current\n menu item and navigates to the next children menu item.\n - If the target element is a menu item, then it closes all popovers recursively and\n navigates to the previous parent menu item.\n- ESCAPE:\n - If a popover is already open then we close it and navigate to the parent menu item.\n - If the current menuitem is a child of menubar, then we will set the value of isMenuPopoverOpen to false.,",
18510
- "inheritedFrom": {
18511
- "name": "MenuMixin",
18512
- "module": "utils/mixins/MenuMixin.js"
18513
- }
18514
- },
18515
- {
18516
- "kind": "method",
18517
- "name": "closeAllPopoversExceptCurrent",
18518
- "privacy": "private",
18256
+ "description": "Handles keydown events for keyboard navigation within the menu popover.\nThis method allows users to navigate through the menu items using the keyboard.\nIt supports Home, End, Arrow Up, Arrow Down, Arrow Left, Arrow Right, and Escape keys.",
18519
18257
  "return": {
18520
18258
  "type": {
18521
- "text": "void"
18522
- }
18523
- },
18524
- "parameters": [
18525
- {
18526
- "name": "currentIndex",
18527
- "type": {
18528
- "text": "number"
18529
- },
18530
- "description": "The index of the current menu item."
18531
- }
18532
- ],
18533
- "description": "Closes all popovers except the current one.",
18534
- "inheritedFrom": {
18535
- "name": "MenuMixin",
18536
- "module": "utils/mixins/MenuMixin.js"
18537
- }
18538
- },
18539
- {
18540
- "kind": "method",
18541
- "name": "handleMouseClick",
18542
- "privacy": "protected",
18543
- "return": {
18544
- "type": {
18545
- "text": "void"
18546
- }
18547
- },
18548
- "parameters": [
18549
- {
18550
- "name": "event",
18551
- "type": {
18552
- "text": "MouseEvent"
18553
- },
18554
- "description": "The mouse click event."
18259
+ "text": ""
18555
18260
  }
18556
- ],
18557
- "description": "Handles the mouse click event on the menu items.\n- If the menuitem has children, then it opens the popover of the next children menu item.\n- If the menuitem does not have children, then it closes all popovers recursively.",
18558
- "inheritedFrom": {
18559
- "name": "MenuMixin",
18560
- "module": "utils/mixins/MenuMixin.js"
18561
18261
  }
18562
18262
  },
18563
18263
  {
@@ -18806,6 +18506,30 @@
18806
18506
  "module": "utils/mixins/FocusTrapMixin.js"
18807
18507
  }
18808
18508
  },
18509
+ {
18510
+ "kind": "method",
18511
+ "name": "isDisabled",
18512
+ "privacy": "private",
18513
+ "parameters": [
18514
+ {
18515
+ "name": "element",
18516
+ "type": {
18517
+ "text": "any"
18518
+ },
18519
+ "description": "The element to check."
18520
+ }
18521
+ ],
18522
+ "description": "Checks if the element is disabled.",
18523
+ "return": {
18524
+ "type": {
18525
+ "text": ""
18526
+ }
18527
+ },
18528
+ "inheritedFrom": {
18529
+ "name": "FocusTrapMixin",
18530
+ "module": "utils/mixins/FocusTrapMixin.js"
18531
+ }
18532
+ },
18809
18533
  {
18810
18534
  "kind": "method",
18811
18535
  "name": "isNotTabbable",
@@ -19530,22 +19254,6 @@
19530
19254
  "module": "components/popover/popover.component.js"
19531
19255
  }
19532
19256
  },
19533
- {
19534
- "kind": "field",
19535
- "name": "onOutsidePopoverClick",
19536
- "privacy": "private",
19537
- "description": "Handles the outside click event to close the popover.",
19538
- "parameters": [
19539
- {
19540
- "description": "The mouse event.",
19541
- "name": "event"
19542
- }
19543
- ],
19544
- "inheritedFrom": {
19545
- "name": "Popover",
19546
- "module": "components/popover/popover.component.js"
19547
- }
19548
- },
19549
19257
  {
19550
19258
  "kind": "field",
19551
19259
  "name": "onEscapeKeydown",
@@ -19634,16 +19342,6 @@
19634
19342
  "module": "components/popover/popover.component.js"
19635
19343
  }
19636
19344
  },
19637
- {
19638
- "kind": "field",
19639
- "name": "hidePopover",
19640
- "privacy": "public",
19641
- "description": "Hides the popover.",
19642
- "inheritedFrom": {
19643
- "name": "Popover",
19644
- "module": "components/popover/popover.component.js"
19645
- }
19646
- },
19647
19345
  {
19648
19346
  "kind": "field",
19649
19347
  "name": "togglePopoverVisible",
@@ -19674,12 +19372,6 @@
19674
19372
  }
19675
19373
  }
19676
19374
  ],
19677
- "mixins": [
19678
- {
19679
- "name": "MenuMixin",
19680
- "module": "/src/utils/mixins/MenuMixin"
19681
- }
19682
- ],
19683
19375
  "superclass": {
19684
19376
  "name": "Popover",
19685
19377
  "module": "/src/components/popover/popover.component"
@@ -19688,19 +19380,6 @@
19688
19380
  "jsDoc": "/**\n * A popover menu component that displays a list of menu items in a floating container.\n * It's designed to work in conjunction with `mdc-menubar` and `mdc-menuitem` to create\n * accessible, nested menu structures with the following features:\n * - Appears adjacent to the triggering menu item\n * - Supports keyboard navigation (arrow keys, Home, End)\n * - Manages focus trapping when open\n * - Closes on Escape key or outside click\n * - Supports both mouse and keyboard interactions\n * - Automatically handles ARIA attributes for accessibility\n *\n * The component extends `mdc-popover` and adds menu-specific behaviors and styling.\n * When nested within another `mdc-menupopover`, it automatically adjusts its behavior\n * to work as a submenu (right-aligned, shows on hover).\n *\n * The orientation of the menu popover is always set to `vertical`.\n *\n * @tagname mdc-menupopover\n * @slot default - Contains the menu items to be displayed in the popover\n */",
19689
19381
  "customElement": true,
19690
19382
  "attributes": [
19691
- {
19692
- "name": "aria-orientation",
19693
- "type": {
19694
- "text": "Orientation"
19695
- },
19696
- "description": "Defines the orientation of the menu. This value is reflected to\nthe `aria-orientation` attribute and can be either `'horizontal'` or `'vertical'`.",
19697
- "default": "'horizontal'",
19698
- "fieldName": "ariaOrientation",
19699
- "inheritedFrom": {
19700
- "name": "MenuMixin",
19701
- "module": "src/utils/mixins/MenuMixin.ts"
19702
- }
19703
- },
19704
19383
  {
19705
19384
  "name": "should-focus-trap-wrap",
19706
19385
  "type": {
@@ -20553,6 +20232,54 @@
20553
20232
  "module": "components/menuitem/menuitem.component.js"
20554
20233
  }
20555
20234
  },
20235
+ {
20236
+ "kind": "method",
20237
+ "name": "handleKeyDown",
20238
+ "privacy": "protected",
20239
+ "return": {
20240
+ "type": {
20241
+ "text": "void"
20242
+ }
20243
+ },
20244
+ "parameters": [
20245
+ {
20246
+ "name": "event",
20247
+ "type": {
20248
+ "text": "KeyboardEvent"
20249
+ },
20250
+ "description": "The keyboard event that triggered the action."
20251
+ }
20252
+ ],
20253
+ "description": "Handles the keydown event for the menu item.\nIf the Enter key is pressed, it triggers a click event on the menu item.\nThis allows keyboard users to activate the menu item using the Enter key.",
20254
+ "inheritedFrom": {
20255
+ "name": "ListItem",
20256
+ "module": "components/listitem/listitem.component.js"
20257
+ }
20258
+ },
20259
+ {
20260
+ "kind": "method",
20261
+ "name": "handleKeyUp",
20262
+ "privacy": "private",
20263
+ "return": {
20264
+ "type": {
20265
+ "text": "void"
20266
+ }
20267
+ },
20268
+ "parameters": [
20269
+ {
20270
+ "name": "event",
20271
+ "type": {
20272
+ "text": "KeyboardEvent"
20273
+ },
20274
+ "description": "The keyboard event that triggered the action."
20275
+ }
20276
+ ],
20277
+ "description": "Handles the keyup event for the menu item.\nIf the Space key is released, it triggers a click event on the menu item.\nThis allows keyboard users to activate the menu item using the Space key.\nIt also prevents the default action of the Space key to avoid scrolling the page.",
20278
+ "inheritedFrom": {
20279
+ "name": "MenuItem",
20280
+ "module": "components/menuitem/menuitem.component.js"
20281
+ }
20282
+ },
20556
20283
  {
20557
20284
  "kind": "method",
20558
20285
  "name": "renderTrailingControls",
@@ -20727,34 +20454,10 @@
20727
20454
  "module": "components/listitem/listitem.component.js"
20728
20455
  }
20729
20456
  },
20730
- {
20731
- "kind": "method",
20732
- "name": "handleKeyDown",
20733
- "privacy": "private",
20734
- "return": {
20735
- "type": {
20736
- "text": "void"
20737
- }
20738
- },
20739
- "parameters": [
20740
- {
20741
- "name": "event",
20742
- "type": {
20743
- "text": "KeyboardEvent"
20744
- },
20745
- "description": "The keyboard event triggered when a key is pressed down."
20746
- }
20747
- ],
20748
- "description": "Fires the click event when the enter or space key is pressed.",
20749
- "inheritedFrom": {
20750
- "name": "ListItem",
20751
- "module": "components/listitem/listitem.component.js"
20752
- }
20753
- },
20754
20457
  {
20755
20458
  "kind": "method",
20756
20459
  "name": "triggerClickEvent",
20757
- "privacy": "private",
20460
+ "privacy": "protected",
20758
20461
  "description": "Triggers a click event on the list item.",
20759
20462
  "inheritedFrom": {
20760
20463
  "name": "ListItem",
@@ -22444,7 +22147,7 @@
22444
22147
  {
22445
22148
  "kind": "method",
22446
22149
  "name": "handleKeyDown",
22447
- "privacy": "private",
22150
+ "privacy": "protected",
22448
22151
  "return": {
22449
22152
  "type": {
22450
22153
  "text": "void"
@@ -22459,7 +22162,7 @@
22459
22162
  "description": "The keyboard event triggered when a key is pressed down."
22460
22163
  }
22461
22164
  ],
22462
- "description": "Fires the click event when the enter or space key is pressed.",
22165
+ "description": "Fires the click event when the enter or space key is pressed down.\nThis behavior is similar to a button click and key interaction.",
22463
22166
  "inheritedFrom": {
22464
22167
  "name": "ListItem",
22465
22168
  "module": "components/listitem/listitem.component.js"
@@ -22468,7 +22171,7 @@
22468
22171
  {
22469
22172
  "kind": "method",
22470
22173
  "name": "triggerClickEvent",
22471
- "privacy": "private",
22174
+ "privacy": "protected",
22472
22175
  "description": "Triggers a click event on the list item.",
22473
22176
  "inheritedFrom": {
22474
22177
  "name": "ListItem",
@@ -23377,7 +23080,7 @@
23377
23080
  {
23378
23081
  "kind": "field",
23379
23082
  "name": "onOutsidePopoverClick",
23380
- "privacy": "private",
23083
+ "privacy": "protected",
23381
23084
  "description": "Handles the outside click event to close the popover.",
23382
23085
  "parameters": [
23383
23086
  {
@@ -23687,6 +23390,30 @@
23687
23390
  "module": "utils/mixins/FocusTrapMixin.js"
23688
23391
  }
23689
23392
  },
23393
+ {
23394
+ "kind": "method",
23395
+ "name": "isDisabled",
23396
+ "privacy": "private",
23397
+ "parameters": [
23398
+ {
23399
+ "name": "element",
23400
+ "type": {
23401
+ "text": "any"
23402
+ },
23403
+ "description": "The element to check."
23404
+ }
23405
+ ],
23406
+ "description": "Checks if the element is disabled.",
23407
+ "return": {
23408
+ "type": {
23409
+ "text": ""
23410
+ }
23411
+ },
23412
+ "inheritedFrom": {
23413
+ "name": "FocusTrapMixin",
23414
+ "module": "utils/mixins/FocusTrapMixin.js"
23415
+ }
23416
+ },
23690
23417
  {
23691
23418
  "kind": "method",
23692
23419
  "name": "isNotTabbable",
@@ -33096,6 +32823,30 @@
33096
32823
  "module": "components/popover/popover.component.js"
33097
32824
  }
33098
32825
  },
32826
+ {
32827
+ "kind": "method",
32828
+ "name": "isDisabled",
32829
+ "privacy": "private",
32830
+ "parameters": [
32831
+ {
32832
+ "name": "element",
32833
+ "type": {
32834
+ "text": "any"
32835
+ },
32836
+ "description": "The element to check."
32837
+ }
32838
+ ],
32839
+ "description": "Checks if the element is disabled.",
32840
+ "return": {
32841
+ "type": {
32842
+ "text": ""
32843
+ }
32844
+ },
32845
+ "inheritedFrom": {
32846
+ "name": "Popover",
32847
+ "module": "components/popover/popover.component.js"
32848
+ }
32849
+ },
33099
32850
  {
33100
32851
  "kind": "method",
33101
32852
  "name": "isNotTabbable",
@@ -33823,7 +33574,7 @@
33823
33574
  {
33824
33575
  "kind": "field",
33825
33576
  "name": "onOutsidePopoverClick",
33826
- "privacy": "private",
33577
+ "privacy": "protected",
33827
33578
  "description": "Handles the outside click event to close the popover.",
33828
33579
  "parameters": [
33829
33580
  {
@@ -34866,6 +34617,30 @@
34866
34617
  "module": "components/popover/popover.component.js"
34867
34618
  }
34868
34619
  },
34620
+ {
34621
+ "kind": "method",
34622
+ "name": "isDisabled",
34623
+ "privacy": "private",
34624
+ "parameters": [
34625
+ {
34626
+ "name": "element",
34627
+ "type": {
34628
+ "text": "any"
34629
+ },
34630
+ "description": "The element to check."
34631
+ }
34632
+ ],
34633
+ "description": "Checks if the element is disabled.",
34634
+ "return": {
34635
+ "type": {
34636
+ "text": ""
34637
+ }
34638
+ },
34639
+ "inheritedFrom": {
34640
+ "name": "Popover",
34641
+ "module": "components/popover/popover.component.js"
34642
+ }
34643
+ },
34869
34644
  {
34870
34645
  "kind": "method",
34871
34646
  "name": "isNotTabbable",
@@ -35593,7 +35368,7 @@
35593
35368
  {
35594
35369
  "kind": "field",
35595
35370
  "name": "onOutsidePopoverClick",
35596
- "privacy": "private",
35371
+ "privacy": "protected",
35597
35372
  "description": "Handles the outside click event to close the popover.",
35598
35373
  "parameters": [
35599
35374
  {
@@ -37638,6 +37413,26 @@
37638
37413
  }
37639
37414
  }
37640
37415
  },
37416
+ {
37417
+ "kind": "method",
37418
+ "name": "isDisabled",
37419
+ "privacy": "private",
37420
+ "parameters": [
37421
+ {
37422
+ "name": "element",
37423
+ "type": {
37424
+ "text": "any"
37425
+ },
37426
+ "description": "The element to check."
37427
+ }
37428
+ ],
37429
+ "description": "Checks if the element is disabled.",
37430
+ "return": {
37431
+ "type": {
37432
+ "text": ""
37433
+ }
37434
+ }
37435
+ },
37641
37436
  {
37642
37437
  "kind": "method",
37643
37438
  "name": "isNotTabbable",