|
| 1 | +{ |
| 2 | + "name": "DrawerPopup", |
| 3 | + "description": "A container for the drawer contents.\nRenders a `<div>` element.", |
| 4 | + "props": { |
| 5 | + "initialFocus": { |
| 6 | + "type": "boolean | RefObject<HTMLElement | null> | ((openType: InteractionType) => boolean | void | HTMLElement | null)", |
| 7 | + "description": "Determines the element to focus when the drawer is opened.\n\n- `false`: Do not move focus.\n- `true`: Move focus based on the default behavior (first tabbable element or popup).\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.", |
| 8 | + "detailedType": "| boolean\n| React.RefObject<HTMLElement | null>\n| ((\n openType: InteractionType,\n ) => boolean | void | HTMLElement | null)\n| undefined" |
| 9 | + }, |
| 10 | + "finalFocus": { |
| 11 | + "type": "boolean | RefObject<HTMLElement | null> | ((closeType: InteractionType) => boolean | void | HTMLElement | null)", |
| 12 | + "description": "Determines the element to focus when the drawer 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.", |
| 13 | + "detailedType": "| boolean\n| React.RefObject<HTMLElement | null>\n| ((\n closeType: InteractionType,\n ) => boolean | void | HTMLElement | null)\n| undefined" |
| 14 | + }, |
| 15 | + "className": { |
| 16 | + "type": "string | ((state: Drawer.Popup.State) => string | undefined)", |
| 17 | + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state.", |
| 18 | + "detailedType": "| string\n| ((state: Drawer.Popup.State) => string | undefined)" |
| 19 | + }, |
| 20 | + "style": { |
| 21 | + "type": "CSSProperties | ((state: Drawer.Popup.State) => CSSProperties | undefined)", |
| 22 | + "detailedType": "| React.CSSProperties\n| ((state: Drawer.Popup.State) => CSSProperties | undefined)\n| undefined" |
| 23 | + }, |
| 24 | + "render": { |
| 25 | + "type": "ReactElement | ((props: HTMLProps, state: Drawer.Popup.State) => ReactElement)", |
| 26 | + "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.", |
| 27 | + "detailedType": "| ReactElement\n| ((\n props: HTMLProps,\n state: Drawer.Popup.State,\n ) => ReactElement)" |
| 28 | + } |
| 29 | + }, |
| 30 | + "dataAttributes": { |
| 31 | + "data-nested-drawer-open": {}, |
| 32 | + "data-swipe-direction": {}, |
| 33 | + "data-swiping": {} |
| 34 | + }, |
| 35 | + "cssVariables": { |
| 36 | + "--drawer-frontmost-height": { |
| 37 | + "description": "The height of the frontmost open drawer in the current nested drawer stack.", |
| 38 | + "type": "CSS" |
| 39 | + }, |
| 40 | + "--drawer-height": { |
| 41 | + "description": "The height of the drawer popup.", |
| 42 | + "type": "CSS" |
| 43 | + }, |
| 44 | + "--drawer-nested-dialogs": { |
| 45 | + "description": "The number of nested drawers that are currently open.", |
| 46 | + "type": "number" |
| 47 | + }, |
| 48 | + "--drawer-swipe-movement-x": { |
| 49 | + "description": "The swipe movement on the X axis.", |
| 50 | + "type": "CSS" |
| 51 | + }, |
| 52 | + "--drawer-swipe-movement-y": { |
| 53 | + "description": "The swipe movement on the Y axis.", |
| 54 | + "type": "CSS" |
| 55 | + } |
| 56 | + } |
| 57 | +} |
0 commit comments