@patternfly/react-docs 7.6.0-prerelease.7 → 7.6.0-prerelease.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/package.json +12 -13
  2. package/patternfly-docs/generated/components/about-modal/react.js +149 -0
  3. package/patternfly-docs/generated/components/accordion/react.js +262 -0
  4. package/patternfly-docs/generated/components/action-list/react.js +144 -0
  5. package/patternfly-docs/generated/components/alert/react-demos.js +56 -0
  6. package/patternfly-docs/generated/components/alert/react.js +1433 -0
  7. package/patternfly-docs/generated/components/avatar/react.js +166 -0
  8. package/patternfly-docs/generated/components/back-to-top/react-demos.js +60 -0
  9. package/patternfly-docs/generated/components/back-to-top/react.js +77 -0
  10. package/patternfly-docs/generated/components/backdrop/react.js +64 -0
  11. package/patternfly-docs/generated/components/background-image/react.js +62 -0
  12. package/patternfly-docs/generated/components/badge/react.js +97 -0
  13. package/patternfly-docs/generated/components/banner/react-demos.js +57 -0
  14. package/patternfly-docs/generated/components/banner/react.js +148 -0
  15. package/patternfly-docs/generated/components/brand/react.js +142 -0
  16. package/patternfly-docs/generated/components/breadcrumb/react.js +206 -0
  17. package/patternfly-docs/generated/components/button/react-demos.js +57 -0
  18. package/patternfly-docs/generated/components/button/react.js +826 -0
  19. package/patternfly-docs/generated/components/card/react-demos.js +201 -0
  20. package/patternfly-docs/generated/components/card/react.js +1015 -0
  21. package/patternfly-docs/generated/components/charts/area-chart/-Victory.js +1350 -0
  22. package/patternfly-docs/generated/components/charts/bar-chart/-Victory.js +1334 -0
  23. package/patternfly-docs/generated/components/charts/box-plot-chart/-Victory.js +1282 -0
  24. package/patternfly-docs/generated/components/charts/bullet-chart/-Victory.js +848 -0
  25. package/patternfly-docs/generated/components/charts/colors-for-charts/-Victory.js +192 -0
  26. package/patternfly-docs/generated/components/charts/donut-chart/-Victory.js +426 -0
  27. package/patternfly-docs/generated/components/charts/donut-utilization-chart/-Victory.js +804 -0
  28. package/patternfly-docs/generated/components/charts/legends/-Victory.js +3230 -0
  29. package/patternfly-docs/generated/components/charts/line-chart/-Victory.js +1178 -0
  30. package/patternfly-docs/generated/components/charts/line-chart/ECharts.js +525 -0
  31. package/patternfly-docs/generated/components/charts/patterns/-Victory.js +3382 -0
  32. package/patternfly-docs/generated/components/charts/pie-chart/-Victory.js +377 -0
  33. package/patternfly-docs/generated/components/charts/resize-observer/-Victory.js +2475 -0
  34. package/patternfly-docs/generated/components/charts/sankey-chart/ECharts.js +538 -0
  35. package/patternfly-docs/generated/components/charts/scatter-chart/-Victory.js +1551 -0
  36. package/patternfly-docs/generated/components/charts/skeletons/-Victory.js +4115 -0
  37. package/patternfly-docs/generated/components/charts/sparkline-chart/-Victory.js +955 -0
  38. package/patternfly-docs/generated/components/charts/stack-chart/-Victory.js +1173 -0
  39. package/patternfly-docs/generated/components/charts/threshold-chart/-Victory.js +1166 -0
  40. package/patternfly-docs/generated/components/charts/tooltips/-Victory.js +413 -0
  41. package/patternfly-docs/generated/components/chip/react-deprecated.js +323 -0
  42. package/patternfly-docs/generated/components/clipboard-copy/react.js +373 -0
  43. package/patternfly-docs/generated/components/code-block/react.js +148 -0
  44. package/patternfly-docs/generated/components/code-editor/react.js +659 -0
  45. package/patternfly-docs/generated/components/compass/react-demos.js +147 -0
  46. package/patternfly-docs/generated/components/compass/react.js +440 -0
  47. package/patternfly-docs/generated/components/content/react.js +248 -0
  48. package/patternfly-docs/generated/components/data-list/react-demos.js +90 -0
  49. package/patternfly-docs/generated/components/data-list/react.js +709 -0
  50. package/patternfly-docs/generated/components/date-and-time/calendar-month/react.js +283 -0
  51. package/patternfly-docs/generated/components/date-and-time/date-and-time-picker/react-demos.js +64 -0
  52. package/patternfly-docs/generated/components/date-and-time/date-picker/react-demos.js +83 -0
  53. package/patternfly-docs/generated/components/date-and-time/date-picker/react.js +395 -0
  54. package/patternfly-docs/generated/components/date-and-time/time-picker/react.js +241 -0
  55. package/patternfly-docs/generated/components/description-list/react-demos.js +58 -0
  56. package/patternfly-docs/generated/components/description-list/react.js +743 -0
  57. package/patternfly-docs/generated/components/divider/react.js +126 -0
  58. package/patternfly-docs/generated/components/drag-and-drop/react-demos.js +351 -0
  59. package/patternfly-docs/generated/components/drag-and-drop/react-deprecated.js +184 -0
  60. package/patternfly-docs/generated/components/drag-and-drop/react.js +137 -0
  61. package/patternfly-docs/generated/components/drawer/react.js +598 -0
  62. package/patternfly-docs/generated/components/dual-list-selector/react-deprecated.js +772 -0
  63. package/patternfly-docs/generated/components/dual-list-selector/react.js +594 -0
  64. package/patternfly-docs/generated/components/empty-state/react.js +199 -0
  65. package/patternfly-docs/generated/components/expandable-section/react-demos.js +65 -0
  66. package/patternfly-docs/generated/components/expandable-section/react.js +408 -0
  67. package/patternfly-docs/generated/components/file-upload/multiple-file-upload/react-demos.js +52 -0
  68. package/patternfly-docs/generated/components/file-upload/multiple-file-upload/react.js +398 -0
  69. package/patternfly-docs/generated/components/file-upload/simple-file-upload/react.js +749 -0
  70. package/patternfly-docs/generated/components/forms/checkbox/react.js +222 -0
  71. package/patternfly-docs/generated/components/forms/form/react.js +1106 -0
  72. package/patternfly-docs/generated/components/forms/form-select/react.js +208 -0
  73. package/patternfly-docs/generated/components/forms/radio/react.js +212 -0
  74. package/patternfly-docs/generated/components/forms/text-area/react.js +160 -0
  75. package/patternfly-docs/generated/components/forms/text-input/react.js +216 -0
  76. package/patternfly-docs/generated/components/helper-text/react-demos.js +180 -0
  77. package/patternfly-docs/generated/components/helper-text/react.js +164 -0
  78. package/patternfly-docs/generated/components/hero/react.js +88 -0
  79. package/patternfly-docs/generated/components/hint/react.js +169 -0
  80. package/patternfly-docs/generated/components/icon/react.js +215 -0
  81. package/patternfly-docs/generated/components/input-group/react.js +182 -0
  82. package/patternfly-docs/generated/components/jump-links/react-demos.js +154 -0
  83. package/patternfly-docs/generated/components/jump-links/react.js +212 -0
  84. package/patternfly-docs/generated/components/label/react-demos.js +57 -0
  85. package/patternfly-docs/generated/components/label/react.js +417 -0
  86. package/patternfly-docs/generated/components/list/react.js +175 -0
  87. package/patternfly-docs/generated/components/login-page/react.js +587 -0
  88. package/patternfly-docs/generated/components/masthead/react-demos.js +79 -0
  89. package/patternfly-docs/generated/components/masthead/react.js +291 -0
  90. package/patternfly-docs/generated/components/menus/application-launcher/react-demos.js +769 -0
  91. package/patternfly-docs/generated/components/menus/context-selector/react-demos.js +665 -0
  92. package/patternfly-docs/generated/components/menus/custom-menus/react-demos.js +187 -0
  93. package/patternfly-docs/generated/components/menus/dropdown/react-templates.js +163 -0
  94. package/patternfly-docs/generated/components/menus/dropdown/react.js +998 -0
  95. package/patternfly-docs/generated/components/menus/menu/react.js +1540 -0
  96. package/patternfly-docs/generated/components/menus/menu-toggle/react.js +747 -0
  97. package/patternfly-docs/generated/components/menus/options-menu/react-demos.js +508 -0
  98. package/patternfly-docs/generated/components/menus/select/react-templates.js +257 -0
  99. package/patternfly-docs/generated/components/menus/select/react.js +998 -0
  100. package/patternfly-docs/generated/components/modal/react-deprecated.js +554 -0
  101. package/patternfly-docs/generated/components/modal/react.js +597 -0
  102. package/patternfly-docs/generated/components/navigation/react-demos.js +356 -0
  103. package/patternfly-docs/generated/components/navigation/react.js +409 -0
  104. package/patternfly-docs/generated/components/notification-badge/react.js +196 -0
  105. package/patternfly-docs/generated/components/notification-drawer/react-demos.js +107 -0
  106. package/patternfly-docs/generated/components/notification-drawer/react.js +394 -0
  107. package/patternfly-docs/generated/components/number-input/react.js +210 -0
  108. package/patternfly-docs/generated/components/overflow-menu/react.js +274 -0
  109. package/patternfly-docs/generated/components/page/react-demos.js +149 -0
  110. package/patternfly-docs/generated/components/page/react.js +1352 -0
  111. package/patternfly-docs/generated/components/pagination/react.js +492 -0
  112. package/patternfly-docs/generated/components/panel/react.js +236 -0
  113. package/patternfly-docs/generated/components/popover/react.js +390 -0
  114. package/patternfly-docs/generated/components/progress/react-demos.js +59 -0
  115. package/patternfly-docs/generated/components/progress/react.js +283 -0
  116. package/patternfly-docs/generated/components/progress-stepper/react-demos.js +45 -0
  117. package/patternfly-docs/generated/components/progress-stepper/react.js +219 -0
  118. package/patternfly-docs/generated/components/search-input/react-demos.js +113 -0
  119. package/patternfly-docs/generated/components/search-input/react.js +263 -0
  120. package/patternfly-docs/generated/components/sidebar/react.js +236 -0
  121. package/patternfly-docs/generated/components/simple-list/react.js +200 -0
  122. package/patternfly-docs/generated/components/skeleton/react-demos.js +44 -0
  123. package/patternfly-docs/generated/components/skeleton/react.js +122 -0
  124. package/patternfly-docs/generated/components/skip-to-content/react.js +73 -0
  125. package/patternfly-docs/generated/components/slider/react.js +309 -0
  126. package/patternfly-docs/generated/components/spinner/react.js +111 -0
  127. package/patternfly-docs/generated/components/switch/react.js +163 -0
  128. package/patternfly-docs/generated/components/table/react-demos.js +355 -0
  129. package/patternfly-docs/generated/components/table/react-deprecated.js +1350 -0
  130. package/patternfly-docs/generated/components/table/react.js +3241 -0
  131. package/patternfly-docs/generated/components/tabs/react-demos.js +108 -0
  132. package/patternfly-docs/generated/components/tabs/react.js +1359 -0
  133. package/patternfly-docs/generated/components/text-input-group/react-demos.js +152 -0
  134. package/patternfly-docs/generated/components/text-input-group/react.js +278 -0
  135. package/patternfly-docs/generated/components/tile/react-deprecated.js +242 -0
  136. package/patternfly-docs/generated/components/timestamp/react.js +283 -0
  137. package/patternfly-docs/generated/components/title/react.js +94 -0
  138. package/patternfly-docs/generated/components/toggle-group/react.js +299 -0
  139. package/patternfly-docs/generated/components/toolbar/react-demos.js +66 -0
  140. package/patternfly-docs/generated/components/toolbar/react.js +932 -0
  141. package/patternfly-docs/generated/components/tooltip/react.js +241 -0
  142. package/patternfly-docs/generated/components/tree-view/react.js +429 -0
  143. package/patternfly-docs/generated/components/truncate/react.js +211 -0
  144. package/patternfly-docs/generated/components/wizard/react-demos.js +87 -0
  145. package/patternfly-docs/generated/components/wizard/react-deprecated.js +788 -0
  146. package/patternfly-docs/generated/components/wizard/react.js +986 -0
  147. package/patternfly-docs/generated/developer-guides/open-ui-automation/react.js +285 -0
  148. package/patternfly-docs/generated/foundations-and-styles/layouts/bullseye/react.js +70 -0
  149. package/patternfly-docs/generated/foundations-and-styles/layouts/flex/react.js +506 -0
  150. package/patternfly-docs/generated/foundations-and-styles/layouts/gallery/react.js +94 -0
  151. package/patternfly-docs/generated/foundations-and-styles/layouts/grid/react.js +272 -0
  152. package/patternfly-docs/generated/foundations-and-styles/layouts/level/react.js +87 -0
  153. package/patternfly-docs/generated/foundations-and-styles/layouts/split/react.js +124 -0
  154. package/patternfly-docs/generated/foundations-and-styles/layouts/stack/react.js +112 -0
  155. package/patternfly-docs/generated/index.js +1769 -0
  156. package/patternfly-docs/generated/patterns/card-view/react-demos.js +78 -0
  157. package/patternfly-docs/generated/patterns/filters/react-demos.js +141 -0
  158. package/patternfly-docs/generated/patterns/password-generator/react-demos.js +51 -0
  159. package/patternfly-docs/generated/patterns/password-strength/react-demos.js +61 -0
  160. package/patternfly-docs/generated/patterns/primary-detail/react-demos.js +124 -0
  161. package/patternfly-docs/generated/patterns/right-to-left/react-demos.js +81 -0
  162. package/LICENSE +0 -21
@@ -0,0 +1,769 @@
1
+ import React from 'react';
2
+ import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components';
3
+ import { cloneElement, Fragment, useRef, useState } from 'react';
4
+ import RhUiThumbnailViewSmallFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-thumbnail-view-small-fill-icon';
5
+ import brandImg from '../../../../../../react-core/src/demos/CustomMenus/../assets/PF-IconLogo.svg';
6
+ const pageData = {
7
+ "id": "Application launcher",
8
+ "section": "components",
9
+ "subsection": "menus",
10
+ "deprecated": false,
11
+ "template": false,
12
+ "beta": false,
13
+ "demo": false,
14
+ "newImplementationLink": false,
15
+ "source": "react-demos",
16
+ "tabName": null,
17
+ "slug": "/components/menus/application-launcher/react-demos",
18
+ "sourceLink": "https://github.com/patternfly/patternfly-react/blob/main/packages/react-core/src/demos/CustomMenus/ApplicationLauncher.md",
19
+ "relPath": "packages/react-core/src/demos/CustomMenus/ApplicationLauncher.md",
20
+ "propComponents": [
21
+ {
22
+ "name": "MenuToggle",
23
+ "description": "",
24
+ "props": [
25
+ {
26
+ "name": "badge",
27
+ "type": "BadgeProps | React.ReactNode",
28
+ "description": "Optional badge rendered inside the toggle, after the children content"
29
+ },
30
+ {
31
+ "name": "children",
32
+ "type": "React.ReactNode",
33
+ "description": "Content rendered inside the toggle"
34
+ },
35
+ {
36
+ "name": "className",
37
+ "type": "string",
38
+ "description": "Additional classes added to the toggle"
39
+ },
40
+ {
41
+ "name": "icon",
42
+ "type": "React.ReactNode",
43
+ "description": "Optional icon or image rendered inside the toggle, before the children content. It is\nrecommended to wrap most basic icons in our icon component."
44
+ },
45
+ {
46
+ "name": "isCircle",
47
+ "type": "boolean",
48
+ "description": "Flag indicating the toggle has circular styling. Can only be applied to plain toggles.",
49
+ "beta": true
50
+ },
51
+ {
52
+ "name": "isDisabled",
53
+ "type": "boolean",
54
+ "description": "Flag indicating the toggle is disabled"
55
+ },
56
+ {
57
+ "name": "isDocked",
58
+ "type": "boolean",
59
+ "description": "Flag indicating the menu toggle is a docked variant. For use in docked navigation.",
60
+ "beta": true
61
+ },
62
+ {
63
+ "name": "isExpanded",
64
+ "type": "boolean",
65
+ "description": "Flag indicating the toggle has expanded styling"
66
+ },
67
+ {
68
+ "name": "isFullHeight",
69
+ "type": "boolean",
70
+ "description": "Flag indicating the toggle is full height"
71
+ },
72
+ {
73
+ "name": "isFullWidth",
74
+ "type": "boolean",
75
+ "description": "Flag indicating the toggle takes up the full width of its parent"
76
+ },
77
+ {
78
+ "name": "isInForm",
79
+ "type": "boolean",
80
+ "description": "Flag indicating the toggle is placed inside a form",
81
+ "beta": true
82
+ },
83
+ {
84
+ "name": "isPlaceholder",
85
+ "type": "boolean",
86
+ "description": "Flag indicating the toggle contains placeholder text"
87
+ },
88
+ {
89
+ "name": "isSettings",
90
+ "type": "boolean",
91
+ "description": "Flag indicating whether the toggle is a settings toggle. This will override the icon property"
92
+ },
93
+ {
94
+ "name": "isTextExpanded",
95
+ "type": "boolean",
96
+ "description": "Flag indicating the docked toggle should display text. Only applies when isDocked is true.",
97
+ "beta": true
98
+ },
99
+ {
100
+ "name": "ouiaId",
101
+ "type": "number | string",
102
+ "description": "Value to overwrite the randomly generated data-ouia-component-id. It will always target the toggle button."
103
+ },
104
+ {
105
+ "name": "ouiaSafe",
106
+ "type": "boolean",
107
+ "description": "Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false."
108
+ },
109
+ {
110
+ "name": "size",
111
+ "type": "'default' | 'sm'",
112
+ "description": "Adds styling which affects the size of the menu toggle"
113
+ },
114
+ {
115
+ "name": "splitButtonItems",
116
+ "type": "React.ReactNode[]",
117
+ "description": "Elements to display before the toggle button. When included, renders the menu toggle as a split button."
118
+ },
119
+ {
120
+ "name": "status",
121
+ "type": "'success' | 'warning' | 'danger'",
122
+ "description": "Status styles of the menu toggle"
123
+ },
124
+ {
125
+ "name": "statusIcon",
126
+ "type": "React.ReactNode",
127
+ "description": "Overrides the status icon"
128
+ },
129
+ {
130
+ "name": "variant",
131
+ "type": "'default' | 'plain' | 'primary' | 'plainText' | 'secondary' | 'typeahead'",
132
+ "description": "Variant styles of the menu toggle"
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ "name": "MenuSearch",
138
+ "description": "",
139
+ "props": [
140
+ {
141
+ "name": "children",
142
+ "type": "React.ReactNode",
143
+ "description": "Items within search"
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "name": "MenuSearchInput",
149
+ "description": "",
150
+ "props": [
151
+ {
152
+ "name": "children",
153
+ "type": "React.ReactNode",
154
+ "description": "Items within input"
155
+ }
156
+ ]
157
+ },
158
+ {
159
+ "name": "Tooltip",
160
+ "description": "",
161
+ "props": [
162
+ {
163
+ "name": "animationDuration",
164
+ "type": "number",
165
+ "description": "CSS fade transition animation duration",
166
+ "defaultValue": "300"
167
+ },
168
+ {
169
+ "name": "appendTo",
170
+ "type": "HTMLElement | ((ref?: HTMLElement) => HTMLElement)",
171
+ "description": "The element to append the tooltip to, defaults to body",
172
+ "defaultValue": "() => document.body"
173
+ },
174
+ {
175
+ "name": "aria",
176
+ "type": "'describedby' | 'labelledby' | 'none'",
177
+ "description": "aria-labelledby or aria-describedby for tooltip.\nThe trigger will be cloned to add the aria attribute, and the corresponding id in the form of 'pf-tooltip-#' is added to the content container.\nIf you don't want that or prefer to add the aria attribute yourself on the trigger, set aria to 'none'.",
178
+ "defaultValue": "'describedby'"
179
+ },
180
+ {
181
+ "name": "aria-live",
182
+ "type": "'off' | 'polite'",
183
+ "description": "Determines whether the tooltip is an aria-live region. If the triggerRef prop is passed in the\ndefault behavior is 'polite' in order to ensure the tooltip contents is announced to\nassistive technologies. Otherwise the default behavior is 'off'.",
184
+ "defaultValue": "triggerRef ? 'polite' : 'off'"
185
+ },
186
+ {
187
+ "name": "children",
188
+ "type": "ReactElement<any>",
189
+ "description": "The trigger reference element to which the Tooltip is relatively placed to.\nIf you cannot wrap the element with the Tooltip, you can use the triggerRef prop instead.\nUsage: <Tooltip><Button>Reference</Button></Tooltip>"
190
+ },
191
+ {
192
+ "name": "className",
193
+ "type": "string",
194
+ "description": "Tooltip additional class",
195
+ "defaultValue": "''"
196
+ },
197
+ {
198
+ "name": "content",
199
+ "type": "React.ReactNode",
200
+ "description": "Tooltip content",
201
+ "required": true
202
+ },
203
+ {
204
+ "name": "distance",
205
+ "type": "number",
206
+ "description": "Distance of the tooltip to its target, defaults to 15",
207
+ "defaultValue": "15"
208
+ },
209
+ {
210
+ "name": "enableFlip",
211
+ "type": "boolean",
212
+ "description": "If true, tries to keep the tooltip in view by flipping it if necessary",
213
+ "defaultValue": "true"
214
+ },
215
+ {
216
+ "name": "entryDelay",
217
+ "type": "number",
218
+ "description": "Delay in ms before the tooltip appears",
219
+ "defaultValue": "300"
220
+ },
221
+ {
222
+ "name": "exitDelay",
223
+ "type": "number",
224
+ "description": "Delay in ms before the tooltip disappears, Avoid passing in a value of \"0\", as users should\nbe given ample time to move their mouse from the trigger to the tooltip content without the content\nbeing hidden.",
225
+ "defaultValue": "300"
226
+ },
227
+ {
228
+ "name": "flipBehavior",
229
+ "type": "| 'flip'\n| (\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'top-start'\n | 'top-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'left-start'\n | 'left-end'\n | 'right-start'\n | 'right-end'\n )[]",
230
+ "description": "The desired position to flip the tooltip to if the initial position is not possible.\nBy setting this prop to 'flip' it attempts to flip the tooltip to the opposite side if there is no space.\nYou can also pass an array of positions that determines the flip order. It should contain the initial position\nfollowed by alternative positions if that position is unavailable.\nExample: Initial position is 'top'. Button with tooltip is in the top right corner. 'flipBehavior' is set to\n['top', 'right', 'left']. Since there is no space to the top, it checks if right is available. There's also no\nspace to the right, so it finally shows the tooltip on the left.",
231
+ "defaultValue": "['top', 'right', 'bottom', 'left', 'top', 'right', 'bottom']"
232
+ },
233
+ {
234
+ "name": "id",
235
+ "type": "string",
236
+ "description": "id of the tooltip"
237
+ },
238
+ {
239
+ "name": "isContentLeftAligned",
240
+ "type": "boolean",
241
+ "description": "Flag to indicate that the text content is left aligned",
242
+ "defaultValue": "false"
243
+ },
244
+ {
245
+ "name": "isVisible",
246
+ "type": "boolean",
247
+ "description": "value for visibility when trigger is 'manual'",
248
+ "defaultValue": "false"
249
+ },
250
+ {
251
+ "name": "maxWidth",
252
+ "type": "string",
253
+ "description": "Maximum width of the tooltip (default 18.75rem)",
254
+ "defaultValue": "\"18.75rem\""
255
+ },
256
+ {
257
+ "name": "minWidth",
258
+ "type": "string | 'trigger'",
259
+ "description": "Minimum width of the tooltip. If set to \"trigger\", the minimum width will be set to the reference element width."
260
+ },
261
+ {
262
+ "name": "onTooltipHidden",
263
+ "type": "() => void",
264
+ "description": "Callback when tooltip's hide transition has finished executing",
265
+ "defaultValue": "() => {}"
266
+ },
267
+ {
268
+ "name": "position",
269
+ "type": "| TooltipPosition\n| 'auto'\n| 'top'\n| 'bottom'\n| 'left'\n| 'right'\n| 'top-start'\n| 'top-end'\n| 'bottom-start'\n| 'bottom-end'\n| 'left-start'\n| 'left-end'\n| 'right-start'\n| 'right-end'",
270
+ "description": "Tooltip position. Note: With 'enableFlip' set to true,\nit will change the position if there is not enough space for the starting position.\nThe behavior of where it flips to can be controlled through the flipBehavior prop.\nThe 'auto' position chooses the side with the most space.\nThe 'auto' position requires the 'enableFlip' prop to be true.",
271
+ "defaultValue": "'top'"
272
+ },
273
+ {
274
+ "name": "trigger",
275
+ "type": "string",
276
+ "description": "Tooltip trigger: click, mouseenter, focus, manual\nSet to manual to trigger tooltip programmatically (through the isVisible prop)",
277
+ "defaultValue": "'mouseenter focus'"
278
+ },
279
+ {
280
+ "name": "triggerRef",
281
+ "type": "HTMLElement | (() => HTMLElement) | React.RefObject<any>",
282
+ "description": "The trigger reference element to which the Tooltip is relatively placed to.\nIf you can wrap the element with the Tooltip, you can use the children prop instead, or both props together.\nWhen passed along with the trigger prop, the div element that wraps the trigger will be removed.\nUsage: <Tooltip triggerRef={() => document.getElementById('reference-element')} />"
283
+ },
284
+ {
285
+ "name": "zIndex",
286
+ "type": "number",
287
+ "description": "z-index of the tooltip",
288
+ "defaultValue": "9999"
289
+ }
290
+ ]
291
+ },
292
+ {
293
+ "name": "Divider",
294
+ "description": "",
295
+ "props": [
296
+ {
297
+ "name": "className",
298
+ "type": "string",
299
+ "description": "Additional classes added to the divider"
300
+ },
301
+ {
302
+ "name": "component",
303
+ "type": "'hr' | 'li' | 'div'",
304
+ "description": "The component type to use",
305
+ "defaultValue": "DividerVariant.hr"
306
+ },
307
+ {
308
+ "name": "inset",
309
+ "type": "{\n default?: 'insetNone' | 'insetXs' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl' | 'inset3xl';\n sm?: 'insetNone' | 'insetXs' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl' | 'inset3xl';\n md?: 'insetNone' | 'insetXs' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl' | 'inset3xl';\n lg?: 'insetNone' | 'insetXs' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl' | 'inset3xl';\n xl?: 'insetNone' | 'insetXs' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl' | 'inset3xl';\n '2xl'?: 'insetNone' | 'insetXs' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl' | 'inset3xl';\n}",
310
+ "description": "Insets at various breakpoints."
311
+ },
312
+ {
313
+ "name": "orientation",
314
+ "type": "{\n default?: 'vertical' | 'horizontal';\n sm?: 'vertical' | 'horizontal';\n md?: 'vertical' | 'horizontal';\n lg?: 'vertical' | 'horizontal';\n xl?: 'vertical' | 'horizontal';\n '2xl'?: 'vertical' | 'horizontal';\n}",
315
+ "description": "Indicates how the divider will display at various breakpoints. Vertical divider must be in a flex layout."
316
+ },
317
+ {
318
+ "name": "role",
319
+ "type": "'separator' | 'presentation'",
320
+ "description": "The ARIA role of the divider when the component property has a value other than \"hr\".",
321
+ "defaultValue": "'separator'"
322
+ }
323
+ ]
324
+ },
325
+ {
326
+ "name": "SearchInput",
327
+ "description": "",
328
+ "props": [
329
+ {
330
+ "name": "advancedSearchDelimiter",
331
+ "type": "string",
332
+ "description": "Delimiter in the query string for pairing attributes with search values.\nRequired whenever attributes are passed as props."
333
+ },
334
+ {
335
+ "name": "attributes",
336
+ "type": "string[] | SearchInputSearchAttribute[]",
337
+ "description": "Array of attribute values used for dynamically generated advanced search.",
338
+ "defaultValue": "[]"
339
+ },
340
+ {
341
+ "name": "className",
342
+ "type": "string",
343
+ "description": "Additional classes added to the advanced search menu."
344
+ },
345
+ {
346
+ "name": "formAdditionalItems",
347
+ "type": "React.ReactNode",
348
+ "description": ""
349
+ },
350
+ {
351
+ "name": "getAttrValueMap",
352
+ "type": "() => { [key: string]: string }",
353
+ "description": "Function which builds an attribute-value map by parsing the value in the search input."
354
+ },
355
+ {
356
+ "name": "hasWordsAttrLabel",
357
+ "type": "React.ReactNode",
358
+ "description": "Attribute label for strings unassociated with one of the provided listed attributes.",
359
+ "defaultValue": "'Has words'"
360
+ },
361
+ {
362
+ "name": "isSearchMenuOpen",
363
+ "type": "boolean",
364
+ "description": "Flag for toggling the open/close state of the advanced search menu."
365
+ },
366
+ {
367
+ "name": "onChange",
368
+ "type": "(event: React.FormEvent<HTMLInputElement>, value: string) => void",
369
+ "description": "A callback for when the input value changes."
370
+ },
371
+ {
372
+ "name": "onClear",
373
+ "type": "(event: React.SyntheticEvent<HTMLButtonElement>) => void",
374
+ "description": "A callback for when the user clicks the clear button."
375
+ },
376
+ {
377
+ "name": "onSearch",
378
+ "type": "(\n event: React.SyntheticEvent<HTMLButtonElement>,\n value: string,\n attrValueMap: { [key: string]: string }\n) => void",
379
+ "description": "A callback for when the search button is clicked."
380
+ },
381
+ {
382
+ "name": "onToggleAdvancedMenu",
383
+ "type": "(e: React.SyntheticEvent<HTMLButtonElement>) => void",
384
+ "description": "A callback for when the open advanced search button is clicked."
385
+ },
386
+ {
387
+ "name": "parentInputRef",
388
+ "type": "React.RefObject<any>",
389
+ "description": "Ref of the input element within the search input."
390
+ },
391
+ {
392
+ "name": "parentRef",
393
+ "type": "React.RefObject<any>",
394
+ "description": "Ref of the div wrapping the whole search input."
395
+ },
396
+ {
397
+ "name": "resetButtonLabel",
398
+ "type": "string",
399
+ "description": "Label for the button which resets the advanced search form and clears the search input.",
400
+ "defaultValue": "'Reset'"
401
+ },
402
+ {
403
+ "name": "submitSearchButtonLabel",
404
+ "type": "string",
405
+ "description": "Label for the button which calls the onSearch event handler.",
406
+ "defaultValue": "'Search'"
407
+ },
408
+ {
409
+ "name": "value",
410
+ "type": "string",
411
+ "description": "Value of the search input.",
412
+ "defaultValue": "''"
413
+ }
414
+ ]
415
+ },
416
+ {
417
+ "name": "Dropdown",
418
+ "description": "See the Menu documentation for additional props that may be passed.",
419
+ "props": [
420
+ {
421
+ "name": "activeItemId",
422
+ "type": "string | number",
423
+ "description": "itemId of the currently active item. You can also specify isActive on the MenuItem."
424
+ },
425
+ {
426
+ "name": "activeMenu",
427
+ "type": "string",
428
+ "description": "ID of the currently active menu for the drilldown variant"
429
+ },
430
+ {
431
+ "name": "children",
432
+ "type": "React.ReactNode",
433
+ "description": "Anything that can be rendered inside of the Menu"
434
+ },
435
+ {
436
+ "name": "className",
437
+ "type": "string",
438
+ "description": "Additional classes added to the Menu"
439
+ },
440
+ {
441
+ "name": "containerComponent",
442
+ "type": "React.ReactNode",
443
+ "description": "Sets the base component to render for the container. Defaults to <span>"
444
+ },
445
+ {
446
+ "name": "containerOuiaId",
447
+ "type": "number | string",
448
+ "description": "When applied, wraps dropdown in a container with a data-ouia-component-id."
449
+ },
450
+ {
451
+ "name": "containerOuiaSafe",
452
+ "type": "boolean",
453
+ "description": "Set the value of data-ouia-safe for the container when containerOuiaId is applied. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false."
454
+ },
455
+ {
456
+ "name": "containsDrilldown",
457
+ "type": "boolean",
458
+ "description": "Indicates if menu contains a drilldown menu"
459
+ },
460
+ {
461
+ "name": "containsFlyout",
462
+ "type": "boolean",
463
+ "description": "Indicates if menu contains a flyout menu"
464
+ },
465
+ {
466
+ "name": "drilldownItemPath",
467
+ "type": "string[]",
468
+ "description": "Indicates the path of drilled in menu itemIds"
469
+ },
470
+ {
471
+ "name": "drilledInMenus",
472
+ "type": "string[]",
473
+ "description": "Array of menus that are drilled in"
474
+ },
475
+ {
476
+ "name": "focusTimeoutDelay",
477
+ "type": "number",
478
+ "description": "Time in ms to wait before firing the toggles' focus event. Defaults to 0"
479
+ },
480
+ {
481
+ "name": "id",
482
+ "type": "string",
483
+ "description": "ID of the menu"
484
+ },
485
+ {
486
+ "name": "isMenuDrilledIn",
487
+ "type": "boolean",
488
+ "description": "Indicates if a menu is drilled into"
489
+ },
490
+ {
491
+ "name": "isNavFlyout",
492
+ "type": "boolean",
493
+ "description": "Indicating that the menu should have nav flyout styling"
494
+ },
495
+ {
496
+ "name": "isOpen",
497
+ "type": "boolean",
498
+ "description": "Flag to indicate if menu is opened."
499
+ },
500
+ {
501
+ "name": "isPlain",
502
+ "type": "boolean",
503
+ "description": "Indicates if the menu should be without the outer box-shadow"
504
+ },
505
+ {
506
+ "name": "isRootMenu",
507
+ "type": "boolean",
508
+ "description": "Internal flag indicating if the Menu is the root of a menu tree"
509
+ },
510
+ {
511
+ "name": "isScrollable",
512
+ "type": "boolean",
513
+ "description": "Indicates if the menu should be srollable"
514
+ },
515
+ {
516
+ "name": "maxMenuHeight",
517
+ "type": "string",
518
+ "description": "Maximum height of dropdown menu"
519
+ },
520
+ {
521
+ "name": "menuHeight",
522
+ "type": "string",
523
+ "description": "Height of the dropdown menu"
524
+ },
525
+ {
526
+ "name": "onActionClick",
527
+ "type": "(event?: any, itemId?: any, actionId?: any) => void",
528
+ "description": "Callback called when an MenuItems's action button is clicked. You can also specify it within a MenuItemAction."
529
+ },
530
+ {
531
+ "name": "onDrillIn",
532
+ "type": "(\n event: React.KeyboardEvent | React.MouseEvent,\n fromItemId: string,\n toItemId: string,\n itemId: string\n) => void",
533
+ "description": "Callback for drilling into a submenu"
534
+ },
535
+ {
536
+ "name": "onDrillOut",
537
+ "type": "(event: React.KeyboardEvent | React.MouseEvent, toItemId: string, itemId: string) => void",
538
+ "description": "Callback for drilling out of a submenu"
539
+ },
540
+ {
541
+ "name": "onGetMenuHeight",
542
+ "type": "(menuId: string, height: number) => void",
543
+ "description": "Callback for collecting menu heights"
544
+ },
545
+ {
546
+ "name": "onOpenChange",
547
+ "type": "(isOpen: boolean) => void",
548
+ "description": "Callback to allow the dropdown component to change the open state of the menu.\nTriggered by clicking outside of the menu, or by pressing any keys specified in onOpenChangeKeys."
549
+ },
550
+ {
551
+ "name": "onOpenChangeKeys",
552
+ "type": "string[]",
553
+ "description": "Keys that trigger onOpenChange, defaults to tab and escape. It is highly recommended to include Escape in the array, while Tab may be omitted if the menu contains non-menu items that are focusable."
554
+ },
555
+ {
556
+ "name": "onSelect",
557
+ "type": "(event?: React.MouseEvent<Element, MouseEvent>, value?: DropdownItemProps['value']) => void",
558
+ "description": "Callback for updating when item selection changes. You can also specify onClick on the MenuItem."
559
+ },
560
+ {
561
+ "name": "onToggleKeydown",
562
+ "type": "(event: KeyboardEvent) => void",
563
+ "description": "Callback to override the toggle keydown behavior. By default, when the toggle has focus and the menu is open, pressing the up/down arrow keys will focus a valid non-disabled menu item - the first item for the down arrow key and last item for the up arrow key."
564
+ },
565
+ {
566
+ "name": "ouiaId",
567
+ "type": "number | string",
568
+ "description": "Value to overwrite the randomly generated data-ouia-component-id."
569
+ },
570
+ {
571
+ "name": "ouiaSafe",
572
+ "type": "boolean",
573
+ "description": "Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false."
574
+ },
575
+ {
576
+ "name": "parentMenu",
577
+ "type": "string",
578
+ "description": "ID of parent menu for drilldown menus"
579
+ },
580
+ {
581
+ "name": "popperProps",
582
+ "type": "PopperOptions",
583
+ "description": "Additional properties to pass to the Popper"
584
+ },
585
+ {
586
+ "name": "role",
587
+ "type": "string",
588
+ "description": "Determines the accessible role of the menu. For a non-checkbox menu that can have\none or more items selected, pass in \"listbox\"."
589
+ },
590
+ {
591
+ "name": "selected",
592
+ "type": "any | any[]",
593
+ "description": "Single itemId for single select menus, or array of itemIds for multi select. You can also specify isSelected on the MenuItem."
594
+ },
595
+ {
596
+ "name": "shouldFocusFirstItemOnOpen",
597
+ "type": "boolean",
598
+ "description": "Flag indicating the first menu item should be focused after opening the dropdown.",
599
+ "beta": true
600
+ },
601
+ {
602
+ "name": "shouldFocusToggleOnSelect",
603
+ "type": "boolean",
604
+ "description": "Flag indicating the toggle should be focused after a selection. If this use case is too restrictive, the optional toggleRef property with a node toggle may be used to control focus."
605
+ },
606
+ {
607
+ "name": "shouldPreventScrollOnItemFocus",
608
+ "type": "boolean",
609
+ "description": "Flag indicating if scroll on focus of the first menu item should occur."
610
+ },
611
+ {
612
+ "name": "toggle",
613
+ "type": "DropdownToggleProps | ((toggleRef: React.RefObject<any>) => React.ReactNode)",
614
+ "description": "Dropdown toggle. The toggle should either be a renderer function which forwards the given toggle ref, or a direct ReactNode that should be passed along with the toggleRef property.",
615
+ "required": true
616
+ },
617
+ {
618
+ "name": "zIndex",
619
+ "type": "number",
620
+ "description": "z-index of the dropdown menu"
621
+ }
622
+ ]
623
+ },
624
+ {
625
+ "name": "DropdownGroup",
626
+ "description": "See the MenuGroup section of the Menu documentation for additional props that may be passed.",
627
+ "props": [
628
+ {
629
+ "name": "children",
630
+ "type": "React.ReactNode",
631
+ "description": "Anything which can be rendered in a dropdown group.",
632
+ "required": true
633
+ },
634
+ {
635
+ "name": "className",
636
+ "type": "string",
637
+ "description": "Classes applied to root element of dropdown group"
638
+ },
639
+ {
640
+ "name": "label",
641
+ "type": "React.ReactNode",
642
+ "description": "Label of the dropdown group"
643
+ },
644
+ {
645
+ "name": "labelHeadingLevel",
646
+ "type": "No type info",
647
+ "defaultValue": "'h1'"
648
+ }
649
+ ]
650
+ },
651
+ {
652
+ "name": "DropdownList",
653
+ "description": "",
654
+ "props": [
655
+ {
656
+ "name": "aria-label",
657
+ "type": "string",
658
+ "description": "Adds an accessible name to the menu."
659
+ },
660
+ {
661
+ "name": "children",
662
+ "type": "React.ReactNode",
663
+ "description": "Anything that can be rendered inside of menu list",
664
+ "required": true
665
+ },
666
+ {
667
+ "name": "className",
668
+ "type": "string",
669
+ "description": "Additional classes added to the menu list"
670
+ },
671
+ {
672
+ "name": "isAriaMultiselectable",
673
+ "type": "boolean",
674
+ "description": "Indicates to assistive technologies whether more than one item can be selected\nfor a non-checkbox menu. Only applies when the menu's role is \"listbox\"."
675
+ }
676
+ ]
677
+ },
678
+ {
679
+ "name": "DropdownItem",
680
+ "description": "See the MenuItem section of the Menu documentation for additional props that may be passed.",
681
+ "props": [
682
+ {
683
+ "name": "children",
684
+ "type": "React.ReactNode",
685
+ "description": "Anything which can be rendered in a dropdown item"
686
+ },
687
+ {
688
+ "name": "className",
689
+ "type": "string",
690
+ "description": "Classes applied to root element of dropdown item"
691
+ },
692
+ {
693
+ "name": "description",
694
+ "type": "React.ReactNode",
695
+ "description": "Description of the dropdown item"
696
+ },
697
+ {
698
+ "name": "isAriaDisabled",
699
+ "type": "boolean",
700
+ "description": "Render item as aria-disabled option"
701
+ },
702
+ {
703
+ "name": "isDisabled",
704
+ "type": "boolean",
705
+ "description": "Render item as disabled option"
706
+ },
707
+ {
708
+ "name": "onClick",
709
+ "type": "(event?: any) => void",
710
+ "description": "Callback for item click"
711
+ },
712
+ {
713
+ "name": "ouiaId",
714
+ "type": "number | string",
715
+ "description": "Value to overwrite the randomly generated data-ouia-component-id."
716
+ },
717
+ {
718
+ "name": "ouiaSafe",
719
+ "type": "boolean",
720
+ "description": "Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false."
721
+ },
722
+ {
723
+ "name": "tooltipProps",
724
+ "type": "TooltipProps",
725
+ "description": "Props for adding a tooltip to a menu item"
726
+ },
727
+ {
728
+ "name": "value",
729
+ "type": "any",
730
+ "description": "Identifies the component in the dropdown onSelect callback"
731
+ }
732
+ ]
733
+ }
734
+ ],
735
+ "examples": [
736
+ "Application launcher menu"
737
+ ]
738
+ };
739
+ pageData.liveContext = {
740
+ cloneElement,
741
+ Fragment,
742
+ useRef,
743
+ useState,
744
+ RhUiThumbnailViewSmallFillIcon,
745
+ brandImg
746
+ };
747
+ pageData.examples = {
748
+ 'Application launcher menu': props =>
749
+ <Example {...pageData} {...props} {...{"code":"import { cloneElement, Fragment, useRef, useState } from 'react';\nimport {\n MenuToggle,\n MenuSearch,\n MenuSearchInput,\n Tooltip,\n Divider,\n SearchInput,\n Dropdown,\n DropdownGroup,\n DropdownList,\n DropdownItem\n} from '@patternfly/react-core';\nimport RhUiThumbnailViewSmallFillIcon from '@patternfly/react-icons/dist/js/icons/rh-ui-thumbnail-view-small-fill-icon';\nimport brandImg from '@patternfly/react-core/src/demos/assets/PF-IconLogo.svg';\n\nconst MockLink: React.FunctionComponent = ({ to, ...props }: any) => <a href={to} {...props}></a>;\n\nexport const ApplicationLauncherDemo: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const [refFullOptions, setRefFullOptions] = useState<Element[]>();\n const [favorites, setFavorites] = useState<string[]>([]);\n const [filteredIds, setFilteredIds] = useState<string[]>(['*']);\n const menuRef = useRef<HTMLDivElement>(null);\n\n const onToggleClick = () => {\n setTimeout(() => {\n if (menuRef.current) {\n const firstElement = menuRef.current.querySelector(\n 'li > button:not(:disabled), li > a:not(:disabled), input:not(:disabled)'\n );\n firstElement && (firstElement as HTMLElement).focus();\n setRefFullOptions(Array.from(menuRef.current.querySelectorAll('li:not(li[role=separator])>*:first-child')));\n }\n }, 0);\n setIsOpen(!isOpen);\n };\n\n const menuItems = [\n <DropdownGroup key=\"group1\" label=\"Group 1\">\n <DropdownList>\n <DropdownItem value=\"0\" id=\"0\" isFavorited={favorites.includes('0')}>\n Application 1\n </DropdownItem>\n <DropdownItem\n value=\"1\"\n id=\"1\"\n isFavorited={favorites.includes('1')}\n to=\"#default-link2\"\n onClick={(ev) => ev.preventDefault()}\n >\n Application 2\n </DropdownItem>\n </DropdownList>\n </DropdownGroup>,\n <Divider key=\"group1-divider\" />,\n <DropdownGroup key=\"group2\" label=\"Group 2\">\n <DropdownList>\n <DropdownItem\n value=\"2\"\n id=\"2\"\n isFavorited={favorites.includes('2')}\n component={(props) => <MockLink {...props} to=\"#router-link\" />}\n >\n Custom component (such as @reach/router Link)\n </DropdownItem>\n <DropdownItem\n value=\"3\"\n id=\"3\"\n isFavorited={favorites.includes('3')}\n isExternalLink\n icon={<img src={brandImg} alt=\"\" width={25} height={25} />}\n component={(props) => <MockLink {...props} to=\"#router-link2\" />}\n >\n Custom component with icon\n </DropdownItem>\n </DropdownList>\n </DropdownGroup>,\n <Divider key=\"group2-divider\" />,\n <DropdownList key=\"other-items\">\n <DropdownItem key=\"tooltip-app\" isFavorited={favorites.includes('4')} value=\"4\" id=\"4\">\n <Tooltip content={<div>Launch Application 3</div>} position=\"right\">\n <span>Application 3 with tooltip</span>\n </Tooltip>\n </DropdownItem>\n <DropdownItem key=\"disabled-app\" value=\"5\" id=\"5\" isDisabled>\n Unavailable Application\n </DropdownItem>\n </DropdownList>\n ];\n\n const createFavorites = (favIds: string[]) => {\n const favorites: unknown[] = [];\n\n menuItems.forEach((item) => {\n if (item.type === DropdownList) {\n item.props.children.filter((child) => {\n if (favIds.includes(child.props.value)) {\n favorites.push(child);\n }\n });\n } else if (item.type === DropdownGroup) {\n item.props.children.props.children.filter((child) => {\n if (favIds.includes(child.props.value)) {\n favorites.push(child);\n }\n });\n } else {\n if (favIds.includes(item.props.value)) {\n favorites.push(item);\n }\n }\n });\n\n return favorites;\n };\n\n const filterItems = (items: any[], filteredIds: string[]) => {\n if (filteredIds.length === 1 && filteredIds[0] === '*') {\n return items;\n }\n let keepDivider = false;\n const filteredCopy = items\n .map((group) => {\n if (group.type === DropdownGroup) {\n const filteredGroup = cloneElement(group, {\n children: cloneElement(group.props.children, {\n children: group.props.children.props.children.filter((child) => {\n if (filteredIds.includes(child.props.value)) {\n return child;\n }\n })\n })\n });\n const filteredList = filteredGroup.props.children;\n if (filteredList.props.children.length > 0) {\n keepDivider = true;\n return filteredGroup;\n } else {\n keepDivider = false;\n }\n } else if (group.type === DropdownList) {\n const filteredGroup = cloneElement(group, {\n children: group.props.children.filter((child) => {\n if (filteredIds.includes(child.props.value)) {\n return child;\n }\n })\n });\n if (filteredGroup.props.children.length > 0) {\n keepDivider = true;\n return filteredGroup;\n } else {\n keepDivider = false;\n }\n } else {\n if ((keepDivider && group.type === Divider) || filteredIds.includes(group.props.value)) {\n return group;\n }\n }\n })\n .filter((newGroup) => newGroup);\n\n if (filteredCopy.length > 0) {\n const lastGroup = filteredCopy.pop();\n if (lastGroup.type !== Divider) {\n filteredCopy.push(lastGroup);\n }\n }\n\n return filteredCopy;\n };\n\n const onTextChange = (textValue: string) => {\n if (textValue === '') {\n setFilteredIds(['*']);\n return;\n }\n\n const filteredIds =\n refFullOptions\n ?.filter((item) => (item as HTMLElement).innerText.toLowerCase().includes(textValue.toString().toLowerCase()))\n .map((item) => item.id) || [];\n setFilteredIds(filteredIds);\n };\n\n const onFavorite = (event: any, value: string, actionId: string) => {\n event.stopPropagation();\n if (actionId === 'fav') {\n const isFavorite = favorites.includes(value);\n if (isFavorite) {\n setFavorites(favorites.filter((fav) => fav !== value));\n } else {\n setFavorites([...favorites, value]);\n }\n }\n };\n\n const filteredFavorites = filterItems(createFavorites(favorites), filteredIds);\n const filteredItems = filterItems(menuItems, filteredIds);\n if (filteredItems.length === 0) {\n filteredItems.push(<DropdownItem key=\"no-items\">No results found</DropdownItem>);\n }\n\n return (\n <Dropdown\n isOpen={isOpen}\n onOpenChange={(isOpen) => setIsOpen(isOpen)}\n onOpenChangeKeys={['Escape']}\n toggle={(toggleRef) => (\n <MenuToggle\n aria-label=\"Toggle\"\n ref={toggleRef}\n variant=\"plain\"\n onClick={onToggleClick}\n isExpanded={isOpen}\n style={{ width: 'auto' }}\n icon={<RhUiThumbnailViewSmallFillIcon />}\n />\n )}\n ref={menuRef}\n onActionClick={onFavorite}\n // eslint-disable-next-line no-console\n onSelect={(_ev, value) => console.log('selected', value)}\n >\n <MenuSearch>\n <MenuSearchInput>\n <SearchInput aria-label=\"Filter menu items\" onChange={(_event, value) => onTextChange(value)} />\n </MenuSearchInput>\n </MenuSearch>\n <Divider />\n {filteredFavorites.length > 0 && (\n <Fragment>\n <DropdownGroup key=\"favorites-group\" label=\"Favorites\">\n <DropdownList>{filteredFavorites}</DropdownList>\n </DropdownGroup>\n <Divider key=\"favorites-divider\" />\n </Fragment>\n )}\n {filteredItems}\n </Dropdown>\n );\n};\n","title":"Application launcher menu","lang":"ts","className":""}}>
750
+
751
+ </Example>
752
+ };
753
+
754
+ const Component = () => (
755
+ <React.Fragment>
756
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
757
+ {`As the application launcher component is now deprecated, an application launcher may now be built using the new suite of menu components. This is showcased in the following demo, which uses the new `}
758
+ <PatternflyThemeLink {...{"to":"/components/menus/dropdown","className":""}}>
759
+ {`dropdown`}
760
+ </PatternflyThemeLink>
761
+ {` component that is built off of menu.`}
762
+ </p>
763
+ {React.createElement(pageData.examples["Application launcher menu"])}
764
+ </React.Fragment>
765
+ );
766
+ Component.displayName = 'ComponentsMenusApplicationLauncherReactDemosDocs';
767
+ Component.pageData = pageData;
768
+
769
+ export default Component;