@imfusion/web-ui 0.11.1-dev.62.gfcd31b6e → 0.11.1-dev.64.gdd82b76a
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.
- package/CHANGELOG.md +8 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/menu.d.ts +135 -0
- package/dist/components/menu/menu.meta.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2827 -2484
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/docgen/doc.gen.json +1384 -0
- package/src/llms/llms.gen.txt +6 -0
package/src/docgen/doc.gen.json
CHANGED
|
@@ -6968,6 +6968,1390 @@
|
|
|
6968
6968
|
},
|
|
6969
6969
|
"subComponents": []
|
|
6970
6970
|
},
|
|
6971
|
+
"menu": {
|
|
6972
|
+
"root": {
|
|
6973
|
+
"name": "Menu.Root",
|
|
6974
|
+
"description": "Menu.Root — container that manages open state and the menu tree.",
|
|
6975
|
+
"props": [
|
|
6976
|
+
{
|
|
6977
|
+
"name": "actionsRef",
|
|
6978
|
+
"required": false,
|
|
6979
|
+
"type": "RefObject<MenuRootActions | null>",
|
|
6980
|
+
"defaultValue": null,
|
|
6981
|
+
"description": "A ref to imperative actions.\n- `unmount`: Manually unmounts the menu.\n Call this after any externally controlled closing animation finishes.\n- `close`: When specified, the menu can be closed imperatively."
|
|
6982
|
+
},
|
|
6983
|
+
{
|
|
6984
|
+
"name": "children",
|
|
6985
|
+
"required": false,
|
|
6986
|
+
"type": "ReactNode | PayloadChildRenderFunction<Payload>",
|
|
6987
|
+
"defaultValue": null,
|
|
6988
|
+
"description": "The content of the popover.\nThis can be a regular React node or a render function that receives the `payload` of the active trigger."
|
|
6989
|
+
},
|
|
6990
|
+
{
|
|
6991
|
+
"name": "closeParentOnEsc",
|
|
6992
|
+
"required": false,
|
|
6993
|
+
"type": "boolean",
|
|
6994
|
+
"defaultValue": "false",
|
|
6995
|
+
"description": "When in a submenu, determines whether pressing the Escape key\ncloses the entire menu, or only the current child menu."
|
|
6996
|
+
},
|
|
6997
|
+
{
|
|
6998
|
+
"name": "defaultOpen",
|
|
6999
|
+
"required": false,
|
|
7000
|
+
"type": "boolean",
|
|
7001
|
+
"defaultValue": "false",
|
|
7002
|
+
"description": "Whether the menu is initially open.\n\nTo render a controlled menu, use the `open` prop instead."
|
|
7003
|
+
},
|
|
7004
|
+
{
|
|
7005
|
+
"name": "defaultTriggerId",
|
|
7006
|
+
"required": false,
|
|
7007
|
+
"type": "string | null",
|
|
7008
|
+
"defaultValue": null,
|
|
7009
|
+
"description": "ID of the trigger that the popover is associated with.\nThis is useful in conjunction with the `defaultOpen` prop to create an initially open popover."
|
|
7010
|
+
},
|
|
7011
|
+
{
|
|
7012
|
+
"name": "disabled",
|
|
7013
|
+
"required": false,
|
|
7014
|
+
"type": "boolean",
|
|
7015
|
+
"defaultValue": "false",
|
|
7016
|
+
"description": "Whether the component should ignore user interaction."
|
|
7017
|
+
},
|
|
7018
|
+
{
|
|
7019
|
+
"name": "handle",
|
|
7020
|
+
"required": false,
|
|
7021
|
+
"type": "MenuHandle<Payload>",
|
|
7022
|
+
"defaultValue": null,
|
|
7023
|
+
"description": "A handle to associate the menu with a trigger.\nIf specified, allows external triggers to control the menu's open state."
|
|
7024
|
+
},
|
|
7025
|
+
{
|
|
7026
|
+
"name": "highlightItemOnHover",
|
|
7027
|
+
"required": false,
|
|
7028
|
+
"type": "boolean",
|
|
7029
|
+
"defaultValue": "true",
|
|
7030
|
+
"description": "Whether moving the pointer over items should highlight them.\nDisabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state."
|
|
7031
|
+
},
|
|
7032
|
+
{
|
|
7033
|
+
"name": "loopFocus",
|
|
7034
|
+
"required": false,
|
|
7035
|
+
"type": "boolean",
|
|
7036
|
+
"defaultValue": "true",
|
|
7037
|
+
"description": "Whether to loop keyboard focus back to the first item\nwhen the end of the list is reached while using the arrow keys."
|
|
7038
|
+
},
|
|
7039
|
+
{
|
|
7040
|
+
"name": "modal",
|
|
7041
|
+
"required": false,
|
|
7042
|
+
"type": "boolean",
|
|
7043
|
+
"defaultValue": "true",
|
|
7044
|
+
"description": "Determines if the menu enters a modal state when open.\n- `true`: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled.\n- `false`: user interaction with the rest of the document is allowed."
|
|
7045
|
+
},
|
|
7046
|
+
{
|
|
7047
|
+
"name": "onOpenChange",
|
|
7048
|
+
"required": false,
|
|
7049
|
+
"type": "(\n open: boolean,\n eventDetails: MenuRootChangeEventDetails\n) => void",
|
|
7050
|
+
"defaultValue": null,
|
|
7051
|
+
"description": "Event handler called when the menu is opened or closed."
|
|
7052
|
+
},
|
|
7053
|
+
{
|
|
7054
|
+
"name": "onOpenChangeComplete",
|
|
7055
|
+
"required": false,
|
|
7056
|
+
"type": "(open: boolean) => void",
|
|
7057
|
+
"defaultValue": null,
|
|
7058
|
+
"description": "Event handler called after any animations complete when the menu is closed."
|
|
7059
|
+
},
|
|
7060
|
+
{
|
|
7061
|
+
"name": "open",
|
|
7062
|
+
"required": false,
|
|
7063
|
+
"type": "boolean",
|
|
7064
|
+
"defaultValue": null,
|
|
7065
|
+
"description": "Whether the menu is currently open."
|
|
7066
|
+
},
|
|
7067
|
+
{
|
|
7068
|
+
"name": "orientation",
|
|
7069
|
+
"required": false,
|
|
7070
|
+
"type": "MenuRootOrientation",
|
|
7071
|
+
"defaultValue": "vertical",
|
|
7072
|
+
"description": "The visual orientation of the menu.\nControls whether roving focus uses up/down or left/right arrow keys."
|
|
7073
|
+
},
|
|
7074
|
+
{
|
|
7075
|
+
"name": "triggerId",
|
|
7076
|
+
"required": false,
|
|
7077
|
+
"type": "string | null",
|
|
7078
|
+
"defaultValue": null,
|
|
7079
|
+
"description": "ID of the trigger that the popover is associated with.\nThis is useful in conjunction with the `open` prop to create a controlled popover.\nThere's no need to specify this prop when the popover is uncontrolled (that is, when the `open` prop is not set)."
|
|
7080
|
+
}
|
|
7081
|
+
]
|
|
7082
|
+
},
|
|
7083
|
+
"subComponents": [
|
|
7084
|
+
{
|
|
7085
|
+
"name": "Menu.Arrow",
|
|
7086
|
+
"description": "Menu.Arrow — pointer arrow anchored to the popup edge.",
|
|
7087
|
+
"props": [
|
|
7088
|
+
{
|
|
7089
|
+
"name": "className",
|
|
7090
|
+
"required": false,
|
|
7091
|
+
"type": "string | ((state: MenuArrowState) => string)",
|
|
7092
|
+
"defaultValue": null,
|
|
7093
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7094
|
+
},
|
|
7095
|
+
{
|
|
7096
|
+
"name": "ref",
|
|
7097
|
+
"required": false,
|
|
7098
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7099
|
+
"defaultValue": null,
|
|
7100
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7101
|
+
},
|
|
7102
|
+
{
|
|
7103
|
+
"name": "render",
|
|
7104
|
+
"required": false,
|
|
7105
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuArrowState>",
|
|
7106
|
+
"defaultValue": null,
|
|
7107
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7108
|
+
},
|
|
7109
|
+
{
|
|
7110
|
+
"name": "style",
|
|
7111
|
+
"required": false,
|
|
7112
|
+
"type": "| CSSProperties\n| ((state: MenuArrowState) => CSSProperties)",
|
|
7113
|
+
"defaultValue": null,
|
|
7114
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7115
|
+
}
|
|
7116
|
+
]
|
|
7117
|
+
},
|
|
7118
|
+
{
|
|
7119
|
+
"name": "Menu.Backdrop",
|
|
7120
|
+
"description": "Menu.Backdrop — overlay beneath the menu.",
|
|
7121
|
+
"props": [
|
|
7122
|
+
{
|
|
7123
|
+
"name": "className",
|
|
7124
|
+
"required": false,
|
|
7125
|
+
"type": "string | ((state: MenuBackdropState) => string)",
|
|
7126
|
+
"defaultValue": null,
|
|
7127
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7128
|
+
},
|
|
7129
|
+
{
|
|
7130
|
+
"name": "ref",
|
|
7131
|
+
"required": false,
|
|
7132
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7133
|
+
"defaultValue": null,
|
|
7134
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7135
|
+
},
|
|
7136
|
+
{
|
|
7137
|
+
"name": "render",
|
|
7138
|
+
"required": false,
|
|
7139
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuBackdropState>",
|
|
7140
|
+
"defaultValue": null,
|
|
7141
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7142
|
+
},
|
|
7143
|
+
{
|
|
7144
|
+
"name": "style",
|
|
7145
|
+
"required": false,
|
|
7146
|
+
"type": "| CSSProperties\n| ((state: MenuBackdropState) => CSSProperties)",
|
|
7147
|
+
"defaultValue": null,
|
|
7148
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7149
|
+
}
|
|
7150
|
+
]
|
|
7151
|
+
},
|
|
7152
|
+
{
|
|
7153
|
+
"name": "Menu.CheckboxItem",
|
|
7154
|
+
"description": "Menu.CheckboxItem — a row that toggles a setting. It draws its check in the trailing cell, after the badge.",
|
|
7155
|
+
"props": [
|
|
7156
|
+
{
|
|
7157
|
+
"name": "badge",
|
|
7158
|
+
"required": false,
|
|
7159
|
+
"type": "ReactNode",
|
|
7160
|
+
"defaultValue": null,
|
|
7161
|
+
"description": "Trailing label. A string or number renders as small mono text; any other node renders as given, such as a `Chip`."
|
|
7162
|
+
},
|
|
7163
|
+
{
|
|
7164
|
+
"name": "checked",
|
|
7165
|
+
"required": false,
|
|
7166
|
+
"type": "boolean",
|
|
7167
|
+
"defaultValue": null,
|
|
7168
|
+
"description": "Whether the checkbox item is currently ticked.\n\nTo render an uncontrolled checkbox item, use the `defaultChecked` prop instead."
|
|
7169
|
+
},
|
|
7170
|
+
{
|
|
7171
|
+
"name": "className",
|
|
7172
|
+
"required": false,
|
|
7173
|
+
"type": "| string\n| ((state: MenuCheckboxItemState) => string)",
|
|
7174
|
+
"defaultValue": null,
|
|
7175
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7176
|
+
},
|
|
7177
|
+
{
|
|
7178
|
+
"name": "closeOnClick",
|
|
7179
|
+
"required": false,
|
|
7180
|
+
"type": "boolean",
|
|
7181
|
+
"defaultValue": "false",
|
|
7182
|
+
"description": "Whether to close the menu when the item is clicked."
|
|
7183
|
+
},
|
|
7184
|
+
{
|
|
7185
|
+
"name": "defaultChecked",
|
|
7186
|
+
"required": false,
|
|
7187
|
+
"type": "boolean",
|
|
7188
|
+
"defaultValue": "false",
|
|
7189
|
+
"description": "Whether the checkbox item is initially ticked.\n\nTo render a controlled checkbox item, use the `checked` prop instead."
|
|
7190
|
+
},
|
|
7191
|
+
{
|
|
7192
|
+
"name": "description",
|
|
7193
|
+
"required": false,
|
|
7194
|
+
"type": "ReactNode",
|
|
7195
|
+
"defaultValue": null,
|
|
7196
|
+
"description": "Muted second line under the text."
|
|
7197
|
+
},
|
|
7198
|
+
{
|
|
7199
|
+
"name": "disabled",
|
|
7200
|
+
"required": false,
|
|
7201
|
+
"type": "boolean",
|
|
7202
|
+
"defaultValue": "false",
|
|
7203
|
+
"description": "Whether the component should ignore user interaction."
|
|
7204
|
+
},
|
|
7205
|
+
{
|
|
7206
|
+
"name": "icon",
|
|
7207
|
+
"required": false,
|
|
7208
|
+
"type": "ReactNode",
|
|
7209
|
+
"defaultValue": null,
|
|
7210
|
+
"description": "Glyph in the lead cell, such as `<Icon glyph={Plus} size={16} aria-hidden />`. A menu where no item has one drops the cell."
|
|
7211
|
+
},
|
|
7212
|
+
{
|
|
7213
|
+
"name": "id",
|
|
7214
|
+
"required": false,
|
|
7215
|
+
"type": "string",
|
|
7216
|
+
"defaultValue": null,
|
|
7217
|
+
"description": "@ignore"
|
|
7218
|
+
},
|
|
7219
|
+
{
|
|
7220
|
+
"name": "label",
|
|
7221
|
+
"required": false,
|
|
7222
|
+
"type": "string",
|
|
7223
|
+
"defaultValue": null,
|
|
7224
|
+
"description": "Overrides the text label to use when the item is matched during keyboard text navigation."
|
|
7225
|
+
},
|
|
7226
|
+
{
|
|
7227
|
+
"name": "nativeButton",
|
|
7228
|
+
"required": false,
|
|
7229
|
+
"type": "boolean",
|
|
7230
|
+
"defaultValue": "true",
|
|
7231
|
+
"description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `false` if the rendered element is not a button (for example, `<div>`)."
|
|
7232
|
+
},
|
|
7233
|
+
{
|
|
7234
|
+
"name": "onCheckedChange",
|
|
7235
|
+
"required": false,
|
|
7236
|
+
"type": "(\n checked: boolean,\n eventDetails: MenuRootChangeEventDetails\n) => void",
|
|
7237
|
+
"defaultValue": null,
|
|
7238
|
+
"description": "Event handler called when the checkbox item is ticked or unticked."
|
|
7239
|
+
},
|
|
7240
|
+
{
|
|
7241
|
+
"name": "onClick",
|
|
7242
|
+
"required": false,
|
|
7243
|
+
"type": "(\n event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>\n) => void",
|
|
7244
|
+
"defaultValue": null,
|
|
7245
|
+
"description": "The click handler for the menu item."
|
|
7246
|
+
},
|
|
7247
|
+
{
|
|
7248
|
+
"name": "ref",
|
|
7249
|
+
"required": false,
|
|
7250
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7251
|
+
"defaultValue": null,
|
|
7252
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7253
|
+
},
|
|
7254
|
+
{
|
|
7255
|
+
"name": "render",
|
|
7256
|
+
"required": false,
|
|
7257
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuCheckboxItemState>",
|
|
7258
|
+
"defaultValue": null,
|
|
7259
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7260
|
+
},
|
|
7261
|
+
{
|
|
7262
|
+
"name": "style",
|
|
7263
|
+
"required": false,
|
|
7264
|
+
"type": "| CSSProperties\n| ((state: MenuCheckboxItemState) => CSSProperties)",
|
|
7265
|
+
"defaultValue": null,
|
|
7266
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7267
|
+
}
|
|
7268
|
+
]
|
|
7269
|
+
},
|
|
7270
|
+
{
|
|
7271
|
+
"name": "Menu.CheckboxItemIndicator",
|
|
7272
|
+
"description": "Menu.CheckboxItemIndicator — marks a ticked checkbox row. A wrapped `CheckboxItem` renders one itself.",
|
|
7273
|
+
"props": [
|
|
7274
|
+
{
|
|
7275
|
+
"name": "className",
|
|
7276
|
+
"required": false,
|
|
7277
|
+
"type": "| string\n| ((state: MenuCheckboxItemIndicatorState) => string)",
|
|
7278
|
+
"defaultValue": null,
|
|
7279
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7280
|
+
},
|
|
7281
|
+
{
|
|
7282
|
+
"name": "keepMounted",
|
|
7283
|
+
"required": false,
|
|
7284
|
+
"type": "boolean",
|
|
7285
|
+
"defaultValue": "false",
|
|
7286
|
+
"description": "Whether to keep the HTML element in the DOM when the checkbox item is not checked."
|
|
7287
|
+
},
|
|
7288
|
+
{
|
|
7289
|
+
"name": "ref",
|
|
7290
|
+
"required": false,
|
|
7291
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7292
|
+
"defaultValue": null,
|
|
7293
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7294
|
+
},
|
|
7295
|
+
{
|
|
7296
|
+
"name": "render",
|
|
7297
|
+
"required": false,
|
|
7298
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<\n HTMLProps,\n MenuCheckboxItemIndicatorState\n >",
|
|
7299
|
+
"defaultValue": null,
|
|
7300
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7301
|
+
},
|
|
7302
|
+
{
|
|
7303
|
+
"name": "style",
|
|
7304
|
+
"required": false,
|
|
7305
|
+
"type": "| CSSProperties\n| ((\n state: MenuCheckboxItemIndicatorState\n ) => CSSProperties)",
|
|
7306
|
+
"defaultValue": null,
|
|
7307
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7308
|
+
}
|
|
7309
|
+
]
|
|
7310
|
+
},
|
|
7311
|
+
{
|
|
7312
|
+
"name": "Menu.Group",
|
|
7313
|
+
"description": "Menu.Group — groups related rows under a `GroupLabel`.",
|
|
7314
|
+
"props": [
|
|
7315
|
+
{
|
|
7316
|
+
"name": "children",
|
|
7317
|
+
"required": false,
|
|
7318
|
+
"type": "ReactNode",
|
|
7319
|
+
"defaultValue": null,
|
|
7320
|
+
"description": "The content of the component."
|
|
7321
|
+
},
|
|
7322
|
+
{
|
|
7323
|
+
"name": "className",
|
|
7324
|
+
"required": false,
|
|
7325
|
+
"type": "string | ((state: MenuGroupState) => string)",
|
|
7326
|
+
"defaultValue": null,
|
|
7327
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7328
|
+
},
|
|
7329
|
+
{
|
|
7330
|
+
"name": "ref",
|
|
7331
|
+
"required": false,
|
|
7332
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7333
|
+
"defaultValue": null,
|
|
7334
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7335
|
+
},
|
|
7336
|
+
{
|
|
7337
|
+
"name": "render",
|
|
7338
|
+
"required": false,
|
|
7339
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuGroupState>",
|
|
7340
|
+
"defaultValue": null,
|
|
7341
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7342
|
+
},
|
|
7343
|
+
{
|
|
7344
|
+
"name": "style",
|
|
7345
|
+
"required": false,
|
|
7346
|
+
"type": "| CSSProperties\n| ((state: MenuGroupState) => CSSProperties)",
|
|
7347
|
+
"defaultValue": null,
|
|
7348
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7349
|
+
}
|
|
7350
|
+
]
|
|
7351
|
+
},
|
|
7352
|
+
{
|
|
7353
|
+
"name": "Menu.GroupLabel",
|
|
7354
|
+
"description": "Menu.GroupLabel — accessible label of a `Group`.",
|
|
7355
|
+
"props": [
|
|
7356
|
+
{
|
|
7357
|
+
"name": "className",
|
|
7358
|
+
"required": false,
|
|
7359
|
+
"type": "string | ((state: MenuGroupLabelState) => string)",
|
|
7360
|
+
"defaultValue": null,
|
|
7361
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7362
|
+
},
|
|
7363
|
+
{
|
|
7364
|
+
"name": "ref",
|
|
7365
|
+
"required": false,
|
|
7366
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7367
|
+
"defaultValue": null,
|
|
7368
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7369
|
+
},
|
|
7370
|
+
{
|
|
7371
|
+
"name": "render",
|
|
7372
|
+
"required": false,
|
|
7373
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuGroupLabelState>",
|
|
7374
|
+
"defaultValue": null,
|
|
7375
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7376
|
+
},
|
|
7377
|
+
{
|
|
7378
|
+
"name": "style",
|
|
7379
|
+
"required": false,
|
|
7380
|
+
"type": "| CSSProperties\n| ((state: MenuGroupLabelState) => CSSProperties)",
|
|
7381
|
+
"defaultValue": null,
|
|
7382
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7383
|
+
}
|
|
7384
|
+
]
|
|
7385
|
+
},
|
|
7386
|
+
{
|
|
7387
|
+
"name": "Menu.Item",
|
|
7388
|
+
"description": "Menu.Item — an action row. Without `label`, a string `children` is the text typeahead matches.",
|
|
7389
|
+
"props": [
|
|
7390
|
+
{
|
|
7391
|
+
"name": "badge",
|
|
7392
|
+
"required": false,
|
|
7393
|
+
"type": "ReactNode",
|
|
7394
|
+
"defaultValue": null,
|
|
7395
|
+
"description": "Trailing label. A string or number renders as small mono text; any other node renders as given, such as a `Chip`."
|
|
7396
|
+
},
|
|
7397
|
+
{
|
|
7398
|
+
"name": "className",
|
|
7399
|
+
"required": false,
|
|
7400
|
+
"type": "string | ((state: MenuItemState) => string)",
|
|
7401
|
+
"defaultValue": null,
|
|
7402
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7403
|
+
},
|
|
7404
|
+
{
|
|
7405
|
+
"name": "closeOnClick",
|
|
7406
|
+
"required": false,
|
|
7407
|
+
"type": "boolean",
|
|
7408
|
+
"defaultValue": "true",
|
|
7409
|
+
"description": "Whether to close the menu when the item is clicked."
|
|
7410
|
+
},
|
|
7411
|
+
{
|
|
7412
|
+
"name": "description",
|
|
7413
|
+
"required": false,
|
|
7414
|
+
"type": "ReactNode",
|
|
7415
|
+
"defaultValue": null,
|
|
7416
|
+
"description": "Muted second line under the text."
|
|
7417
|
+
},
|
|
7418
|
+
{
|
|
7419
|
+
"name": "disabled",
|
|
7420
|
+
"required": false,
|
|
7421
|
+
"type": "boolean",
|
|
7422
|
+
"defaultValue": "false",
|
|
7423
|
+
"description": "Whether the component should ignore user interaction."
|
|
7424
|
+
},
|
|
7425
|
+
{
|
|
7426
|
+
"name": "icon",
|
|
7427
|
+
"required": false,
|
|
7428
|
+
"type": "ReactNode",
|
|
7429
|
+
"defaultValue": null,
|
|
7430
|
+
"description": "Glyph in the lead cell, such as `<Icon glyph={Plus} size={16} aria-hidden />`. A menu where no item has one drops the cell."
|
|
7431
|
+
},
|
|
7432
|
+
{
|
|
7433
|
+
"name": "id",
|
|
7434
|
+
"required": false,
|
|
7435
|
+
"type": "string",
|
|
7436
|
+
"defaultValue": null,
|
|
7437
|
+
"description": "@ignore"
|
|
7438
|
+
},
|
|
7439
|
+
{
|
|
7440
|
+
"name": "label",
|
|
7441
|
+
"required": false,
|
|
7442
|
+
"type": "string",
|
|
7443
|
+
"defaultValue": null,
|
|
7444
|
+
"description": "Overrides the text label to use when the item is matched during keyboard text navigation."
|
|
7445
|
+
},
|
|
7446
|
+
{
|
|
7447
|
+
"name": "nativeButton",
|
|
7448
|
+
"required": false,
|
|
7449
|
+
"type": "boolean",
|
|
7450
|
+
"defaultValue": "true",
|
|
7451
|
+
"description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `false` if the rendered element is not a button (for example, `<div>`)."
|
|
7452
|
+
},
|
|
7453
|
+
{
|
|
7454
|
+
"name": "onClick",
|
|
7455
|
+
"required": false,
|
|
7456
|
+
"type": "(\n event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>\n) => void",
|
|
7457
|
+
"defaultValue": null,
|
|
7458
|
+
"description": "The click handler for the menu item."
|
|
7459
|
+
},
|
|
7460
|
+
{
|
|
7461
|
+
"name": "ref",
|
|
7462
|
+
"required": false,
|
|
7463
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7464
|
+
"defaultValue": null,
|
|
7465
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7466
|
+
},
|
|
7467
|
+
{
|
|
7468
|
+
"name": "render",
|
|
7469
|
+
"required": false,
|
|
7470
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuItemState>",
|
|
7471
|
+
"defaultValue": null,
|
|
7472
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7473
|
+
},
|
|
7474
|
+
{
|
|
7475
|
+
"name": "style",
|
|
7476
|
+
"required": false,
|
|
7477
|
+
"type": "| CSSProperties\n| ((state: MenuItemState) => CSSProperties)",
|
|
7478
|
+
"defaultValue": null,
|
|
7479
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7480
|
+
}
|
|
7481
|
+
]
|
|
7482
|
+
},
|
|
7483
|
+
{
|
|
7484
|
+
"name": "Menu.LinkItem",
|
|
7485
|
+
"description": "Menu.LinkItem — a row that renders an `<a>`. Pass a router link as `render`.",
|
|
7486
|
+
"props": [
|
|
7487
|
+
{
|
|
7488
|
+
"name": "badge",
|
|
7489
|
+
"required": false,
|
|
7490
|
+
"type": "ReactNode",
|
|
7491
|
+
"defaultValue": null,
|
|
7492
|
+
"description": "Trailing label. A string or number renders as small mono text; any other node renders as given, such as a `Chip`."
|
|
7493
|
+
},
|
|
7494
|
+
{
|
|
7495
|
+
"name": "className",
|
|
7496
|
+
"required": false,
|
|
7497
|
+
"type": "string | ((state: MenuLinkItemState) => string)",
|
|
7498
|
+
"defaultValue": null,
|
|
7499
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7500
|
+
},
|
|
7501
|
+
{
|
|
7502
|
+
"name": "closeOnClick",
|
|
7503
|
+
"required": false,
|
|
7504
|
+
"type": "boolean",
|
|
7505
|
+
"defaultValue": "false",
|
|
7506
|
+
"description": "Whether to close the menu when the item is clicked."
|
|
7507
|
+
},
|
|
7508
|
+
{
|
|
7509
|
+
"name": "description",
|
|
7510
|
+
"required": false,
|
|
7511
|
+
"type": "ReactNode",
|
|
7512
|
+
"defaultValue": null,
|
|
7513
|
+
"description": "Muted second line under the text."
|
|
7514
|
+
},
|
|
7515
|
+
{
|
|
7516
|
+
"name": "icon",
|
|
7517
|
+
"required": false,
|
|
7518
|
+
"type": "ReactNode",
|
|
7519
|
+
"defaultValue": null,
|
|
7520
|
+
"description": "Glyph in the lead cell, such as `<Icon glyph={Plus} size={16} aria-hidden />`. A menu where no item has one drops the cell."
|
|
7521
|
+
},
|
|
7522
|
+
{
|
|
7523
|
+
"name": "id",
|
|
7524
|
+
"required": false,
|
|
7525
|
+
"type": "string",
|
|
7526
|
+
"defaultValue": null,
|
|
7527
|
+
"description": "@ignore"
|
|
7528
|
+
},
|
|
7529
|
+
{
|
|
7530
|
+
"name": "label",
|
|
7531
|
+
"required": false,
|
|
7532
|
+
"type": "string",
|
|
7533
|
+
"defaultValue": null,
|
|
7534
|
+
"description": "Overrides the text label to use when the item is matched during keyboard text navigation."
|
|
7535
|
+
},
|
|
7536
|
+
{
|
|
7537
|
+
"name": "ref",
|
|
7538
|
+
"required": false,
|
|
7539
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7540
|
+
"defaultValue": null,
|
|
7541
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7542
|
+
},
|
|
7543
|
+
{
|
|
7544
|
+
"name": "render",
|
|
7545
|
+
"required": false,
|
|
7546
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuLinkItemState>",
|
|
7547
|
+
"defaultValue": null,
|
|
7548
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7549
|
+
},
|
|
7550
|
+
{
|
|
7551
|
+
"name": "style",
|
|
7552
|
+
"required": false,
|
|
7553
|
+
"type": "| CSSProperties\n| ((state: MenuLinkItemState) => CSSProperties)",
|
|
7554
|
+
"defaultValue": null,
|
|
7555
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7556
|
+
}
|
|
7557
|
+
]
|
|
7558
|
+
},
|
|
7559
|
+
{
|
|
7560
|
+
"name": "Menu.Popup",
|
|
7561
|
+
"description": "Menu.Popup — the visible surface of the menu. Its `size` sets the density of every item inside.",
|
|
7562
|
+
"props": [
|
|
7563
|
+
{
|
|
7564
|
+
"name": "className",
|
|
7565
|
+
"required": false,
|
|
7566
|
+
"type": "string | ((state: MenuPopupState) => string)",
|
|
7567
|
+
"defaultValue": null,
|
|
7568
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7569
|
+
},
|
|
7570
|
+
{
|
|
7571
|
+
"name": "finalFocus",
|
|
7572
|
+
"required": false,
|
|
7573
|
+
"type": "| boolean\n| RefObject<HTMLElement | null>\n| ((\n closeType: InteractionType\n ) => boolean | void | HTMLElement | null)",
|
|
7574
|
+
"defaultValue": null,
|
|
7575
|
+
"description": "Determines the element to focus when the menu is closed.\n\n- `false`: Do not move focus.\n- `true`: Move focus based on the default behavior (trigger or previously focused element).\n- `RefObject`: Move focus to the ref element.\n- `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).\n Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing."
|
|
7576
|
+
},
|
|
7577
|
+
{
|
|
7578
|
+
"name": "id",
|
|
7579
|
+
"required": false,
|
|
7580
|
+
"type": "string",
|
|
7581
|
+
"defaultValue": null,
|
|
7582
|
+
"description": "@ignore"
|
|
7583
|
+
},
|
|
7584
|
+
{
|
|
7585
|
+
"name": "ref",
|
|
7586
|
+
"required": false,
|
|
7587
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7588
|
+
"defaultValue": null,
|
|
7589
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7590
|
+
},
|
|
7591
|
+
{
|
|
7592
|
+
"name": "render",
|
|
7593
|
+
"required": false,
|
|
7594
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuPopupState>",
|
|
7595
|
+
"defaultValue": null,
|
|
7596
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7597
|
+
},
|
|
7598
|
+
{
|
|
7599
|
+
"name": "size",
|
|
7600
|
+
"required": false,
|
|
7601
|
+
"type": "\"sm\" | \"md\" | null",
|
|
7602
|
+
"defaultValue": "sm",
|
|
7603
|
+
"description": "Row density: `sm` is dense with hairlines between rows that have a description, `md` is roomier. A submenu popup sets its own."
|
|
7604
|
+
},
|
|
7605
|
+
{
|
|
7606
|
+
"name": "style",
|
|
7607
|
+
"required": false,
|
|
7608
|
+
"type": "| CSSProperties\n| ((state: MenuPopupState) => CSSProperties)",
|
|
7609
|
+
"defaultValue": null,
|
|
7610
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7611
|
+
}
|
|
7612
|
+
]
|
|
7613
|
+
},
|
|
7614
|
+
{
|
|
7615
|
+
"name": "Menu.Portal",
|
|
7616
|
+
"description": "Menu.Portal — renders the positioner in a portal outside the main document flow.",
|
|
7617
|
+
"props": [
|
|
7618
|
+
{
|
|
7619
|
+
"name": "className",
|
|
7620
|
+
"required": false,
|
|
7621
|
+
"type": "string | ((state: MenuPortalState) => string)",
|
|
7622
|
+
"defaultValue": null,
|
|
7623
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7624
|
+
},
|
|
7625
|
+
{
|
|
7626
|
+
"name": "container",
|
|
7627
|
+
"required": false,
|
|
7628
|
+
"type": "| HTMLElement\n| ShadowRoot\n| RefObject<HTMLElement | ShadowRoot | null>\n| null",
|
|
7629
|
+
"defaultValue": null,
|
|
7630
|
+
"description": "A parent element to render the portal element into."
|
|
7631
|
+
},
|
|
7632
|
+
{
|
|
7633
|
+
"name": "keepMounted",
|
|
7634
|
+
"required": false,
|
|
7635
|
+
"type": "boolean",
|
|
7636
|
+
"defaultValue": "false",
|
|
7637
|
+
"description": "Whether to keep the portal mounted in the DOM while the popup is hidden."
|
|
7638
|
+
},
|
|
7639
|
+
{
|
|
7640
|
+
"name": "ref",
|
|
7641
|
+
"required": false,
|
|
7642
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7643
|
+
"defaultValue": null,
|
|
7644
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7645
|
+
},
|
|
7646
|
+
{
|
|
7647
|
+
"name": "render",
|
|
7648
|
+
"required": false,
|
|
7649
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuPortalState>",
|
|
7650
|
+
"defaultValue": null,
|
|
7651
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7652
|
+
},
|
|
7653
|
+
{
|
|
7654
|
+
"name": "style",
|
|
7655
|
+
"required": false,
|
|
7656
|
+
"type": "| CSSProperties\n| ((state: MenuPortalState) => CSSProperties)",
|
|
7657
|
+
"defaultValue": null,
|
|
7658
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7659
|
+
}
|
|
7660
|
+
]
|
|
7661
|
+
},
|
|
7662
|
+
{
|
|
7663
|
+
"name": "Menu.Positioner",
|
|
7664
|
+
"description": "Menu.Positioner — positions the popup relative to the trigger.",
|
|
7665
|
+
"props": [
|
|
7666
|
+
{
|
|
7667
|
+
"name": "align",
|
|
7668
|
+
"required": false,
|
|
7669
|
+
"type": "Align",
|
|
7670
|
+
"defaultValue": "center",
|
|
7671
|
+
"description": "How to align the popup relative to the specified side."
|
|
7672
|
+
},
|
|
7673
|
+
{
|
|
7674
|
+
"name": "alignOffset",
|
|
7675
|
+
"required": false,
|
|
7676
|
+
"type": "number | OffsetFunction",
|
|
7677
|
+
"defaultValue": "0",
|
|
7678
|
+
"description": "Additional offset along the alignment axis in pixels.\nAlso accepts a function that returns the offset to read the dimensions of the anchor\nand positioner elements, along with its side and alignment.\n\nThe function takes a `data` object parameter with the following properties:\n- `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.\n- `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.\n- `data.side`: which side of the anchor element the positioner is aligned against.\n- `data.align`: how the positioner is aligned relative to the specified side.\n@example ```jsx\n<Positioner\n alignOffset={({ side, align, anchor, positioner }) => {\n return side === 'top' || side === 'bottom'\n ? anchor.width\n : anchor.height;\n }}\n/>\n```"
|
|
7679
|
+
},
|
|
7680
|
+
{
|
|
7681
|
+
"name": "anchor",
|
|
7682
|
+
"required": false,
|
|
7683
|
+
"type": "| Element\n| VirtualElement\n| RefObject<Element | null>\n| (() => Element | VirtualElement | null)\n| null",
|
|
7684
|
+
"defaultValue": null,
|
|
7685
|
+
"description": "An element to position the popup against.\nBy default, the popup will be positioned against the trigger."
|
|
7686
|
+
},
|
|
7687
|
+
{
|
|
7688
|
+
"name": "arrowPadding",
|
|
7689
|
+
"required": false,
|
|
7690
|
+
"type": "number",
|
|
7691
|
+
"defaultValue": "5",
|
|
7692
|
+
"description": "Minimum distance to maintain between the arrow and the edges of the popup.\n\nUse it to prevent the arrow element from hanging out of the rounded corners of a popup."
|
|
7693
|
+
},
|
|
7694
|
+
{
|
|
7695
|
+
"name": "className",
|
|
7696
|
+
"required": false,
|
|
7697
|
+
"type": "string | ((state: MenuPositionerState) => string)",
|
|
7698
|
+
"defaultValue": null,
|
|
7699
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7700
|
+
},
|
|
7701
|
+
{
|
|
7702
|
+
"name": "collisionAvoidance",
|
|
7703
|
+
"required": false,
|
|
7704
|
+
"type": "CollisionAvoidance",
|
|
7705
|
+
"defaultValue": null,
|
|
7706
|
+
"description": "Determines how to handle collisions when positioning the popup.\n\n`side` controls overflow on the preferred placement axis (`top`/`bottom` or `left`/`right`):\n- `'flip'`: keep the requested side when it fits; otherwise try the opposite side\n (`top` and `bottom`, or `left` and `right`).\n- `'shift'`: never change side; keep the requested side and move the popup within\n the clipping boundary so it stays visible.\n- `'none'`: do not correct side-axis overflow.\n\n`align` controls overflow on the alignment axis (`start`/`center`/`end`):\n- `'flip'`: keep side, but swap `start` and `end` when the requested alignment overflows.\n- `'shift'`: keep side and requested alignment, then nudge the popup along the\n alignment axis to fit.\n- `'none'`: do not correct alignment-axis overflow.\n\n`fallbackAxisSide` controls fallback behavior on the perpendicular axis when the\npreferred axis cannot fit:\n- `'start'`: allow perpendicular fallback and try the logical start side first\n (`top` before `bottom`, or `left` before `right` in LTR).\n- `'end'`: allow perpendicular fallback and try the logical end side first\n (`bottom` before `top`, or `right` before `left` in LTR).\n- `'none'`: do not fallback to the perpendicular axis.\n\nWhen `side` is `'shift'`, explicitly setting `align` only supports `'shift'` or `'none'`.\nIf `align` is omitted, it defaults to `'flip'`.\n@example ```jsx\n<Positioner\n collisionAvoidance={{\n side: 'shift',\n align: 'shift',\n fallbackAxisSide: 'none',\n }}\n/>\n```"
|
|
7707
|
+
},
|
|
7708
|
+
{
|
|
7709
|
+
"name": "collisionBoundary",
|
|
7710
|
+
"required": false,
|
|
7711
|
+
"type": "Boundary",
|
|
7712
|
+
"defaultValue": "clipping-ancestors",
|
|
7713
|
+
"description": "An element or a rectangle that delimits the area that the popup is confined to."
|
|
7714
|
+
},
|
|
7715
|
+
{
|
|
7716
|
+
"name": "collisionPadding",
|
|
7717
|
+
"required": false,
|
|
7718
|
+
"type": "Padding",
|
|
7719
|
+
"defaultValue": "5",
|
|
7720
|
+
"description": "Additional space to maintain from the edge of the collision boundary."
|
|
7721
|
+
},
|
|
7722
|
+
{
|
|
7723
|
+
"name": "disableAnchorTracking",
|
|
7724
|
+
"required": false,
|
|
7725
|
+
"type": "boolean",
|
|
7726
|
+
"defaultValue": "false",
|
|
7727
|
+
"description": "Whether to disable the popup from tracking any layout shift of its positioning anchor."
|
|
7728
|
+
},
|
|
7729
|
+
{
|
|
7730
|
+
"name": "positionMethod",
|
|
7731
|
+
"required": false,
|
|
7732
|
+
"type": "\"absolute\" | \"fixed\"",
|
|
7733
|
+
"defaultValue": "absolute",
|
|
7734
|
+
"description": "Determines which CSS `position` property to use."
|
|
7735
|
+
},
|
|
7736
|
+
{
|
|
7737
|
+
"name": "ref",
|
|
7738
|
+
"required": false,
|
|
7739
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7740
|
+
"defaultValue": null,
|
|
7741
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7742
|
+
},
|
|
7743
|
+
{
|
|
7744
|
+
"name": "render",
|
|
7745
|
+
"required": false,
|
|
7746
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuPositionerState>",
|
|
7747
|
+
"defaultValue": null,
|
|
7748
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7749
|
+
},
|
|
7750
|
+
{
|
|
7751
|
+
"name": "side",
|
|
7752
|
+
"required": false,
|
|
7753
|
+
"type": "Side",
|
|
7754
|
+
"defaultValue": "bottom",
|
|
7755
|
+
"description": "Which side of the anchor element to align the popup against.\nMay automatically change to avoid collisions."
|
|
7756
|
+
},
|
|
7757
|
+
{
|
|
7758
|
+
"name": "sideOffset",
|
|
7759
|
+
"required": false,
|
|
7760
|
+
"type": "number | OffsetFunction",
|
|
7761
|
+
"defaultValue": "4",
|
|
7762
|
+
"description": "Distance between the anchor and the popup in pixels.\nAlso accepts a function that returns the distance to read the dimensions of the anchor\nand positioner elements, along with its side and alignment.\n\nThe function takes a `data` object parameter with the following properties:\n- `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.\n- `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.\n- `data.side`: which side of the anchor element the positioner is aligned against.\n- `data.align`: how the positioner is aligned relative to the specified side.\n@example ```jsx\n<Positioner\n sideOffset={({ side, align, anchor, positioner }) => {\n return side === 'top' || side === 'bottom'\n ? anchor.height\n : anchor.width;\n }}\n/>\n```"
|
|
7763
|
+
},
|
|
7764
|
+
{
|
|
7765
|
+
"name": "sticky",
|
|
7766
|
+
"required": false,
|
|
7767
|
+
"type": "boolean",
|
|
7768
|
+
"defaultValue": "false",
|
|
7769
|
+
"description": "Whether to maintain the popup in the viewport after\nthe anchor element was scrolled out of view."
|
|
7770
|
+
},
|
|
7771
|
+
{
|
|
7772
|
+
"name": "style",
|
|
7773
|
+
"required": false,
|
|
7774
|
+
"type": "| CSSProperties\n| ((state: MenuPositionerState) => CSSProperties)",
|
|
7775
|
+
"defaultValue": null,
|
|
7776
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7777
|
+
}
|
|
7778
|
+
]
|
|
7779
|
+
},
|
|
7780
|
+
{
|
|
7781
|
+
"name": "Menu.RadioGroup",
|
|
7782
|
+
"description": "Menu.RadioGroup — groups radio rows so one is selected.",
|
|
7783
|
+
"props": [
|
|
7784
|
+
{
|
|
7785
|
+
"name": "children",
|
|
7786
|
+
"required": false,
|
|
7787
|
+
"type": "ReactNode",
|
|
7788
|
+
"defaultValue": null,
|
|
7789
|
+
"description": "The content of the component."
|
|
7790
|
+
},
|
|
7791
|
+
{
|
|
7792
|
+
"name": "className",
|
|
7793
|
+
"required": false,
|
|
7794
|
+
"type": "string | ((state: MenuRadioGroupState) => string)",
|
|
7795
|
+
"defaultValue": null,
|
|
7796
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7797
|
+
},
|
|
7798
|
+
{
|
|
7799
|
+
"name": "defaultValue",
|
|
7800
|
+
"required": false,
|
|
7801
|
+
"type": "any",
|
|
7802
|
+
"defaultValue": null,
|
|
7803
|
+
"description": "The uncontrolled value of the radio item that should be initially selected.\n\nTo render a controlled radio group, use the `value` prop instead."
|
|
7804
|
+
},
|
|
7805
|
+
{
|
|
7806
|
+
"name": "disabled",
|
|
7807
|
+
"required": false,
|
|
7808
|
+
"type": "boolean",
|
|
7809
|
+
"defaultValue": "false",
|
|
7810
|
+
"description": "Whether the component should ignore user interaction."
|
|
7811
|
+
},
|
|
7812
|
+
{
|
|
7813
|
+
"name": "onValueChange",
|
|
7814
|
+
"required": false,
|
|
7815
|
+
"type": "(\n value: any,\n eventDetails: MenuRootChangeEventDetails\n) => void",
|
|
7816
|
+
"defaultValue": null,
|
|
7817
|
+
"description": "Function called when the selected value changes."
|
|
7818
|
+
},
|
|
7819
|
+
{
|
|
7820
|
+
"name": "ref",
|
|
7821
|
+
"required": false,
|
|
7822
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7823
|
+
"defaultValue": null,
|
|
7824
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7825
|
+
},
|
|
7826
|
+
{
|
|
7827
|
+
"name": "render",
|
|
7828
|
+
"required": false,
|
|
7829
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuRadioGroupState>",
|
|
7830
|
+
"defaultValue": null,
|
|
7831
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7832
|
+
},
|
|
7833
|
+
{
|
|
7834
|
+
"name": "style",
|
|
7835
|
+
"required": false,
|
|
7836
|
+
"type": "| CSSProperties\n| ((state: MenuRadioGroupState) => CSSProperties)",
|
|
7837
|
+
"defaultValue": null,
|
|
7838
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7839
|
+
},
|
|
7840
|
+
{
|
|
7841
|
+
"name": "value",
|
|
7842
|
+
"required": false,
|
|
7843
|
+
"type": "any",
|
|
7844
|
+
"defaultValue": null,
|
|
7845
|
+
"description": "The controlled value of the radio item that should be currently selected.\n\nTo render an uncontrolled radio group, use the `defaultValue` prop instead."
|
|
7846
|
+
}
|
|
7847
|
+
]
|
|
7848
|
+
},
|
|
7849
|
+
{
|
|
7850
|
+
"name": "Menu.RadioItem",
|
|
7851
|
+
"description": "Menu.RadioItem — a row that selects one value of its `RadioGroup`. It draws its check in the trailing cell.",
|
|
7852
|
+
"props": [
|
|
7853
|
+
{
|
|
7854
|
+
"name": "badge",
|
|
7855
|
+
"required": false,
|
|
7856
|
+
"type": "ReactNode",
|
|
7857
|
+
"defaultValue": null,
|
|
7858
|
+
"description": "Trailing label. A string or number renders as small mono text; any other node renders as given, such as a `Chip`."
|
|
7859
|
+
},
|
|
7860
|
+
{
|
|
7861
|
+
"name": "className",
|
|
7862
|
+
"required": false,
|
|
7863
|
+
"type": "string | ((state: MenuRadioItemState) => string)",
|
|
7864
|
+
"defaultValue": null,
|
|
7865
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7866
|
+
},
|
|
7867
|
+
{
|
|
7868
|
+
"name": "closeOnClick",
|
|
7869
|
+
"required": false,
|
|
7870
|
+
"type": "boolean",
|
|
7871
|
+
"defaultValue": "false",
|
|
7872
|
+
"description": "Whether to close the menu when the item is clicked."
|
|
7873
|
+
},
|
|
7874
|
+
{
|
|
7875
|
+
"name": "description",
|
|
7876
|
+
"required": false,
|
|
7877
|
+
"type": "ReactNode",
|
|
7878
|
+
"defaultValue": null,
|
|
7879
|
+
"description": "Muted second line under the text."
|
|
7880
|
+
},
|
|
7881
|
+
{
|
|
7882
|
+
"name": "disabled",
|
|
7883
|
+
"required": false,
|
|
7884
|
+
"type": "boolean",
|
|
7885
|
+
"defaultValue": "false",
|
|
7886
|
+
"description": "Whether the component should ignore user interaction."
|
|
7887
|
+
},
|
|
7888
|
+
{
|
|
7889
|
+
"name": "icon",
|
|
7890
|
+
"required": false,
|
|
7891
|
+
"type": "ReactNode",
|
|
7892
|
+
"defaultValue": null,
|
|
7893
|
+
"description": "Glyph in the lead cell, such as `<Icon glyph={Plus} size={16} aria-hidden />`. A menu where no item has one drops the cell."
|
|
7894
|
+
},
|
|
7895
|
+
{
|
|
7896
|
+
"name": "id",
|
|
7897
|
+
"required": false,
|
|
7898
|
+
"type": "string",
|
|
7899
|
+
"defaultValue": null,
|
|
7900
|
+
"description": "@ignore"
|
|
7901
|
+
},
|
|
7902
|
+
{
|
|
7903
|
+
"name": "label",
|
|
7904
|
+
"required": false,
|
|
7905
|
+
"type": "string",
|
|
7906
|
+
"defaultValue": null,
|
|
7907
|
+
"description": "Overrides the text label to use when the item is matched during keyboard text navigation."
|
|
7908
|
+
},
|
|
7909
|
+
{
|
|
7910
|
+
"name": "nativeButton",
|
|
7911
|
+
"required": false,
|
|
7912
|
+
"type": "boolean",
|
|
7913
|
+
"defaultValue": "true",
|
|
7914
|
+
"description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `false` if the rendered element is not a button (for example, `<div>`)."
|
|
7915
|
+
},
|
|
7916
|
+
{
|
|
7917
|
+
"name": "onClick",
|
|
7918
|
+
"required": false,
|
|
7919
|
+
"type": "(\n event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>\n) => void",
|
|
7920
|
+
"defaultValue": null,
|
|
7921
|
+
"description": "The click handler for the menu item."
|
|
7922
|
+
},
|
|
7923
|
+
{
|
|
7924
|
+
"name": "ref",
|
|
7925
|
+
"required": false,
|
|
7926
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7927
|
+
"defaultValue": null,
|
|
7928
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7929
|
+
},
|
|
7930
|
+
{
|
|
7931
|
+
"name": "render",
|
|
7932
|
+
"required": false,
|
|
7933
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuRadioItemState>",
|
|
7934
|
+
"defaultValue": null,
|
|
7935
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7936
|
+
},
|
|
7937
|
+
{
|
|
7938
|
+
"name": "style",
|
|
7939
|
+
"required": false,
|
|
7940
|
+
"type": "| CSSProperties\n| ((state: MenuRadioItemState) => CSSProperties)",
|
|
7941
|
+
"defaultValue": null,
|
|
7942
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7943
|
+
},
|
|
7944
|
+
{
|
|
7945
|
+
"name": "value",
|
|
7946
|
+
"required": true,
|
|
7947
|
+
"type": "any",
|
|
7948
|
+
"defaultValue": null,
|
|
7949
|
+
"description": "Value of the radio item.\nThis is the value that will be set in the MenuRadioGroup when the item is selected."
|
|
7950
|
+
}
|
|
7951
|
+
]
|
|
7952
|
+
},
|
|
7953
|
+
{
|
|
7954
|
+
"name": "Menu.RadioItemIndicator",
|
|
7955
|
+
"description": "Menu.RadioItemIndicator — marks the selected radio row. A wrapped `RadioItem` renders one itself.",
|
|
7956
|
+
"props": [
|
|
7957
|
+
{
|
|
7958
|
+
"name": "className",
|
|
7959
|
+
"required": false,
|
|
7960
|
+
"type": "| string\n| ((state: MenuRadioItemIndicatorState) => string)",
|
|
7961
|
+
"defaultValue": null,
|
|
7962
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
7963
|
+
},
|
|
7964
|
+
{
|
|
7965
|
+
"name": "keepMounted",
|
|
7966
|
+
"required": false,
|
|
7967
|
+
"type": "boolean",
|
|
7968
|
+
"defaultValue": "false",
|
|
7969
|
+
"description": "Whether to keep the HTML element in the DOM when the radio item is inactive."
|
|
7970
|
+
},
|
|
7971
|
+
{
|
|
7972
|
+
"name": "ref",
|
|
7973
|
+
"required": false,
|
|
7974
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
7975
|
+
"defaultValue": null,
|
|
7976
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
7977
|
+
},
|
|
7978
|
+
{
|
|
7979
|
+
"name": "render",
|
|
7980
|
+
"required": false,
|
|
7981
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<\n HTMLProps,\n MenuRadioItemIndicatorState\n >",
|
|
7982
|
+
"defaultValue": null,
|
|
7983
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
7984
|
+
},
|
|
7985
|
+
{
|
|
7986
|
+
"name": "style",
|
|
7987
|
+
"required": false,
|
|
7988
|
+
"type": "| CSSProperties\n| ((state: MenuRadioItemIndicatorState) => CSSProperties)",
|
|
7989
|
+
"defaultValue": null,
|
|
7990
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
7991
|
+
}
|
|
7992
|
+
]
|
|
7993
|
+
},
|
|
7994
|
+
{
|
|
7995
|
+
"name": "Menu.Separator",
|
|
7996
|
+
"description": "Menu.Separator — divider line between rows or groups.",
|
|
7997
|
+
"props": [
|
|
7998
|
+
{
|
|
7999
|
+
"name": "className",
|
|
8000
|
+
"required": false,
|
|
8001
|
+
"type": "string | ((state: SeparatorState) => string)",
|
|
8002
|
+
"defaultValue": null,
|
|
8003
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
8004
|
+
},
|
|
8005
|
+
{
|
|
8006
|
+
"name": "orientation",
|
|
8007
|
+
"required": false,
|
|
8008
|
+
"type": "Orientation",
|
|
8009
|
+
"defaultValue": "horizontal",
|
|
8010
|
+
"description": "The orientation of the separator."
|
|
8011
|
+
},
|
|
8012
|
+
{
|
|
8013
|
+
"name": "ref",
|
|
8014
|
+
"required": false,
|
|
8015
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
8016
|
+
"defaultValue": null,
|
|
8017
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
8018
|
+
},
|
|
8019
|
+
{
|
|
8020
|
+
"name": "render",
|
|
8021
|
+
"required": false,
|
|
8022
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, SeparatorState>",
|
|
8023
|
+
"defaultValue": null,
|
|
8024
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
8025
|
+
},
|
|
8026
|
+
{
|
|
8027
|
+
"name": "style",
|
|
8028
|
+
"required": false,
|
|
8029
|
+
"type": "| CSSProperties\n| ((state: SeparatorState) => CSSProperties)",
|
|
8030
|
+
"defaultValue": null,
|
|
8031
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
8032
|
+
}
|
|
8033
|
+
]
|
|
8034
|
+
},
|
|
8035
|
+
{
|
|
8036
|
+
"name": "Menu.SubmenuRoot",
|
|
8037
|
+
"description": "Menu.SubmenuRoot — container for a nested menu.",
|
|
8038
|
+
"props": [
|
|
8039
|
+
{
|
|
8040
|
+
"name": "actionsRef",
|
|
8041
|
+
"required": false,
|
|
8042
|
+
"type": "RefObject<MenuRootActions | null>",
|
|
8043
|
+
"defaultValue": null,
|
|
8044
|
+
"description": "A ref to imperative actions.\n- `unmount`: Manually unmounts the menu.\n Call this after any externally controlled closing animation finishes.\n- `close`: When specified, the menu can be closed imperatively."
|
|
8045
|
+
},
|
|
8046
|
+
{
|
|
8047
|
+
"name": "children",
|
|
8048
|
+
"required": false,
|
|
8049
|
+
"type": "ReactNode",
|
|
8050
|
+
"defaultValue": null,
|
|
8051
|
+
"description": "The content of the submenu."
|
|
8052
|
+
},
|
|
8053
|
+
{
|
|
8054
|
+
"name": "closeParentOnEsc",
|
|
8055
|
+
"required": false,
|
|
8056
|
+
"type": "boolean",
|
|
8057
|
+
"defaultValue": "false",
|
|
8058
|
+
"description": "When in a submenu, determines whether pressing the Escape key\ncloses the entire menu, or only the current child menu."
|
|
8059
|
+
},
|
|
8060
|
+
{
|
|
8061
|
+
"name": "defaultOpen",
|
|
8062
|
+
"required": false,
|
|
8063
|
+
"type": "boolean",
|
|
8064
|
+
"defaultValue": "false",
|
|
8065
|
+
"description": "Whether the menu is initially open.\n\nTo render a controlled menu, use the `open` prop instead."
|
|
8066
|
+
},
|
|
8067
|
+
{
|
|
8068
|
+
"name": "disabled",
|
|
8069
|
+
"required": false,
|
|
8070
|
+
"type": "boolean",
|
|
8071
|
+
"defaultValue": "false",
|
|
8072
|
+
"description": "Whether the component should ignore user interaction."
|
|
8073
|
+
},
|
|
8074
|
+
{
|
|
8075
|
+
"name": "highlightItemOnHover",
|
|
8076
|
+
"required": false,
|
|
8077
|
+
"type": "boolean",
|
|
8078
|
+
"defaultValue": "true",
|
|
8079
|
+
"description": "Whether moving the pointer over items should highlight them.\nDisabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state."
|
|
8080
|
+
},
|
|
8081
|
+
{
|
|
8082
|
+
"name": "loopFocus",
|
|
8083
|
+
"required": false,
|
|
8084
|
+
"type": "boolean",
|
|
8085
|
+
"defaultValue": "true",
|
|
8086
|
+
"description": "Whether to loop keyboard focus back to the first item\nwhen the end of the list is reached while using the arrow keys."
|
|
8087
|
+
},
|
|
8088
|
+
{
|
|
8089
|
+
"name": "onOpenChange",
|
|
8090
|
+
"required": false,
|
|
8091
|
+
"type": "(\n open: boolean,\n eventDetails: MenuRootChangeEventDetails\n) => void",
|
|
8092
|
+
"defaultValue": null,
|
|
8093
|
+
"description": "Event handler called when the menu is opened or closed."
|
|
8094
|
+
},
|
|
8095
|
+
{
|
|
8096
|
+
"name": "onOpenChangeComplete",
|
|
8097
|
+
"required": false,
|
|
8098
|
+
"type": "(open: boolean) => void",
|
|
8099
|
+
"defaultValue": null,
|
|
8100
|
+
"description": "Event handler called after any animations complete when the menu is closed."
|
|
8101
|
+
},
|
|
8102
|
+
{
|
|
8103
|
+
"name": "open",
|
|
8104
|
+
"required": false,
|
|
8105
|
+
"type": "boolean",
|
|
8106
|
+
"defaultValue": null,
|
|
8107
|
+
"description": "Whether the menu is currently open."
|
|
8108
|
+
},
|
|
8109
|
+
{
|
|
8110
|
+
"name": "orientation",
|
|
8111
|
+
"required": false,
|
|
8112
|
+
"type": "MenuRootOrientation",
|
|
8113
|
+
"defaultValue": "vertical",
|
|
8114
|
+
"description": "The visual orientation of the menu.\nControls whether roving focus uses up/down or left/right arrow keys."
|
|
8115
|
+
}
|
|
8116
|
+
]
|
|
8117
|
+
},
|
|
8118
|
+
{
|
|
8119
|
+
"name": "Menu.SubmenuTrigger",
|
|
8120
|
+
"description": "Menu.SubmenuTrigger — a row that opens a nested menu. It draws a chevron in the trailing cell.",
|
|
8121
|
+
"props": [
|
|
8122
|
+
{
|
|
8123
|
+
"name": "badge",
|
|
8124
|
+
"required": false,
|
|
8125
|
+
"type": "ReactNode",
|
|
8126
|
+
"defaultValue": null,
|
|
8127
|
+
"description": "Trailing label. A string or number renders as small mono text; any other node renders as given, such as a `Chip`."
|
|
8128
|
+
},
|
|
8129
|
+
{
|
|
8130
|
+
"name": "className",
|
|
8131
|
+
"required": false,
|
|
8132
|
+
"type": "| string\n| ((state: MenuSubmenuTriggerState) => string)",
|
|
8133
|
+
"defaultValue": null,
|
|
8134
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
8135
|
+
},
|
|
8136
|
+
{
|
|
8137
|
+
"name": "closeDelay",
|
|
8138
|
+
"required": false,
|
|
8139
|
+
"type": "number",
|
|
8140
|
+
"defaultValue": "0",
|
|
8141
|
+
"description": "How long to wait before closing the menu that was opened on hover.\nSpecified in milliseconds.\n\nRequires the `openOnHover` prop."
|
|
8142
|
+
},
|
|
8143
|
+
{
|
|
8144
|
+
"name": "delay",
|
|
8145
|
+
"required": false,
|
|
8146
|
+
"type": "number",
|
|
8147
|
+
"defaultValue": "100",
|
|
8148
|
+
"description": "How long to wait before the menu may be opened on hover. Specified in milliseconds.\n\nRequires the `openOnHover` prop."
|
|
8149
|
+
},
|
|
8150
|
+
{
|
|
8151
|
+
"name": "description",
|
|
8152
|
+
"required": false,
|
|
8153
|
+
"type": "ReactNode",
|
|
8154
|
+
"defaultValue": null,
|
|
8155
|
+
"description": "Muted second line under the text."
|
|
8156
|
+
},
|
|
8157
|
+
{
|
|
8158
|
+
"name": "disabled",
|
|
8159
|
+
"required": false,
|
|
8160
|
+
"type": "boolean",
|
|
8161
|
+
"defaultValue": "false",
|
|
8162
|
+
"description": "Whether the component should ignore user interaction."
|
|
8163
|
+
},
|
|
8164
|
+
{
|
|
8165
|
+
"name": "icon",
|
|
8166
|
+
"required": false,
|
|
8167
|
+
"type": "ReactNode",
|
|
8168
|
+
"defaultValue": null,
|
|
8169
|
+
"description": "Glyph in the lead cell, such as `<Icon glyph={Plus} size={16} aria-hidden />`. A menu where no item has one drops the cell."
|
|
8170
|
+
},
|
|
8171
|
+
{
|
|
8172
|
+
"name": "id",
|
|
8173
|
+
"required": false,
|
|
8174
|
+
"type": "string",
|
|
8175
|
+
"defaultValue": null,
|
|
8176
|
+
"description": "@ignore"
|
|
8177
|
+
},
|
|
8178
|
+
{
|
|
8179
|
+
"name": "label",
|
|
8180
|
+
"required": false,
|
|
8181
|
+
"type": "string",
|
|
8182
|
+
"defaultValue": null,
|
|
8183
|
+
"description": "Overrides the text label to use when the item is matched during keyboard text navigation."
|
|
8184
|
+
},
|
|
8185
|
+
{
|
|
8186
|
+
"name": "nativeButton",
|
|
8187
|
+
"required": false,
|
|
8188
|
+
"type": "boolean",
|
|
8189
|
+
"defaultValue": "true",
|
|
8190
|
+
"description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `false` if the rendered element is not a button (for example, `<div>`)."
|
|
8191
|
+
},
|
|
8192
|
+
{
|
|
8193
|
+
"name": "onClick",
|
|
8194
|
+
"required": false,
|
|
8195
|
+
"type": "(\n event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>\n) => void",
|
|
8196
|
+
"defaultValue": null,
|
|
8197
|
+
"description": ""
|
|
8198
|
+
},
|
|
8199
|
+
{
|
|
8200
|
+
"name": "openOnHover",
|
|
8201
|
+
"required": false,
|
|
8202
|
+
"type": "boolean",
|
|
8203
|
+
"defaultValue": null,
|
|
8204
|
+
"description": "Whether the menu should also open when the trigger is hovered."
|
|
8205
|
+
},
|
|
8206
|
+
{
|
|
8207
|
+
"name": "ref",
|
|
8208
|
+
"required": false,
|
|
8209
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
8210
|
+
"defaultValue": null,
|
|
8211
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
8212
|
+
},
|
|
8213
|
+
{
|
|
8214
|
+
"name": "render",
|
|
8215
|
+
"required": false,
|
|
8216
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuSubmenuTriggerState>",
|
|
8217
|
+
"defaultValue": null,
|
|
8218
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
8219
|
+
},
|
|
8220
|
+
{
|
|
8221
|
+
"name": "style",
|
|
8222
|
+
"required": false,
|
|
8223
|
+
"type": "| CSSProperties\n| ((state: MenuSubmenuTriggerState) => CSSProperties)",
|
|
8224
|
+
"defaultValue": null,
|
|
8225
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
8226
|
+
}
|
|
8227
|
+
]
|
|
8228
|
+
},
|
|
8229
|
+
{
|
|
8230
|
+
"name": "Menu.Trigger",
|
|
8231
|
+
"description": "Menu.Trigger — native button that opens the menu. Pass `render={<Button />}` to use any element, such as a `Button`.",
|
|
8232
|
+
"props": [
|
|
8233
|
+
{
|
|
8234
|
+
"name": "className",
|
|
8235
|
+
"required": false,
|
|
8236
|
+
"type": "string | ((state: MenuTriggerState) => string)",
|
|
8237
|
+
"defaultValue": null,
|
|
8238
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
8239
|
+
},
|
|
8240
|
+
{
|
|
8241
|
+
"name": "closeDelay",
|
|
8242
|
+
"required": false,
|
|
8243
|
+
"type": "number",
|
|
8244
|
+
"defaultValue": "0",
|
|
8245
|
+
"description": "How long to wait before closing the menu that was opened on hover.\nSpecified in milliseconds.\n\nRequires the `openOnHover` prop."
|
|
8246
|
+
},
|
|
8247
|
+
{
|
|
8248
|
+
"name": "delay",
|
|
8249
|
+
"required": false,
|
|
8250
|
+
"type": "number",
|
|
8251
|
+
"defaultValue": "100",
|
|
8252
|
+
"description": "How long to wait before the menu may be opened on hover. Specified in milliseconds.\n\nRequires the `openOnHover` prop."
|
|
8253
|
+
},
|
|
8254
|
+
{
|
|
8255
|
+
"name": "disabled",
|
|
8256
|
+
"required": false,
|
|
8257
|
+
"type": "boolean",
|
|
8258
|
+
"defaultValue": "false",
|
|
8259
|
+
"description": "Whether the component should ignore user interaction."
|
|
8260
|
+
},
|
|
8261
|
+
{
|
|
8262
|
+
"name": "handle",
|
|
8263
|
+
"required": false,
|
|
8264
|
+
"type": "MenuHandle<unknown>",
|
|
8265
|
+
"defaultValue": null,
|
|
8266
|
+
"description": "A handle to associate the trigger with a menu."
|
|
8267
|
+
},
|
|
8268
|
+
{
|
|
8269
|
+
"name": "nativeButton",
|
|
8270
|
+
"required": false,
|
|
8271
|
+
"type": "boolean",
|
|
8272
|
+
"defaultValue": "true",
|
|
8273
|
+
"description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `false` if the rendered element is not a button (for example, `<div>`)."
|
|
8274
|
+
},
|
|
8275
|
+
{
|
|
8276
|
+
"name": "openOnHover",
|
|
8277
|
+
"required": false,
|
|
8278
|
+
"type": "boolean",
|
|
8279
|
+
"defaultValue": null,
|
|
8280
|
+
"description": "Whether the menu should also open when the trigger is hovered."
|
|
8281
|
+
},
|
|
8282
|
+
{
|
|
8283
|
+
"name": "payload",
|
|
8284
|
+
"required": false,
|
|
8285
|
+
"type": "unknown",
|
|
8286
|
+
"defaultValue": null,
|
|
8287
|
+
"description": "A payload to pass to the menu when it is opened."
|
|
8288
|
+
},
|
|
8289
|
+
{
|
|
8290
|
+
"name": "ref",
|
|
8291
|
+
"required": false,
|
|
8292
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
8293
|
+
"defaultValue": null,
|
|
8294
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
8295
|
+
},
|
|
8296
|
+
{
|
|
8297
|
+
"name": "render",
|
|
8298
|
+
"required": false,
|
|
8299
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuTriggerState>",
|
|
8300
|
+
"defaultValue": null,
|
|
8301
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
8302
|
+
},
|
|
8303
|
+
{
|
|
8304
|
+
"name": "style",
|
|
8305
|
+
"required": false,
|
|
8306
|
+
"type": "| CSSProperties\n| ((state: MenuTriggerState) => CSSProperties)",
|
|
8307
|
+
"defaultValue": null,
|
|
8308
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
8309
|
+
}
|
|
8310
|
+
]
|
|
8311
|
+
},
|
|
8312
|
+
{
|
|
8313
|
+
"name": "Menu.Viewport",
|
|
8314
|
+
"description": "Menu.Viewport — content wrapper that supports direction-aware transitions between triggers.",
|
|
8315
|
+
"props": [
|
|
8316
|
+
{
|
|
8317
|
+
"name": "children",
|
|
8318
|
+
"required": false,
|
|
8319
|
+
"type": "ReactNode",
|
|
8320
|
+
"defaultValue": null,
|
|
8321
|
+
"description": "The content to render inside the transition container."
|
|
8322
|
+
},
|
|
8323
|
+
{
|
|
8324
|
+
"name": "className",
|
|
8325
|
+
"required": false,
|
|
8326
|
+
"type": "string | ((state: MenuViewportState) => string)",
|
|
8327
|
+
"defaultValue": null,
|
|
8328
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
8329
|
+
},
|
|
8330
|
+
{
|
|
8331
|
+
"name": "ref",
|
|
8332
|
+
"required": false,
|
|
8333
|
+
"type": "((instance: HTMLButtonElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLButtonElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null",
|
|
8334
|
+
"defaultValue": null,
|
|
8335
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
8336
|
+
},
|
|
8337
|
+
{
|
|
8338
|
+
"name": "render",
|
|
8339
|
+
"required": false,
|
|
8340
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, MenuViewportState>",
|
|
8341
|
+
"defaultValue": null,
|
|
8342
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
8343
|
+
},
|
|
8344
|
+
{
|
|
8345
|
+
"name": "style",
|
|
8346
|
+
"required": false,
|
|
8347
|
+
"type": "| CSSProperties\n| ((state: MenuViewportState) => CSSProperties)",
|
|
8348
|
+
"defaultValue": null,
|
|
8349
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
8350
|
+
}
|
|
8351
|
+
]
|
|
8352
|
+
}
|
|
8353
|
+
]
|
|
8354
|
+
},
|
|
6971
8355
|
"meter": {
|
|
6972
8356
|
"root": {
|
|
6973
8357
|
"name": "Meter.Root",
|