|
| 1 | +import { defineApiDescription } from "~/modules/page-config/runtime"; |
| 2 | + |
| 3 | +export default defineApiDescription({ |
| 4 | + props: { |
| 5 | + anchor: "Anchor element. Dropdown will be opened when clicked on anchor. Can be `HTMLElement` or `CSS selector`", |
| 6 | + closeOnAnchorClick: "Dropdown will be closed when clicked on anchor", |
| 7 | + closeOnContentClick: "Dropdown will be closed when clicked inside dropdown content", |
| 8 | + closeOnFocusOutside: "Dropdown will be closed when focus is outside dropdown content and anchor", |
| 9 | + hoverOutTimeout: "Time in `ms` after mouse leave dropdown before it will be closed", |
| 10 | + hoverOverTimeout: "Time in `ms` after mouse enter dropdown before it will be opened", |
| 11 | + verticalScrollOnOverflow: "If true, dropdown content will adjust its height when the content is larger than available space", |
| 12 | + keepAnchorWidth: "If true, dropdown content will have exact same width as anchor", |
| 13 | + offset: "Dropdown content will be moved by main and cross axis according to current `placement`", |
| 14 | + placement: "Dropdown content will be placed on `placement` side of anchor", |
| 15 | + trigger: "Action that will triggered when open and close dropdown.", |
| 16 | + target: "Dropdown content parent. Dropdown content will be attached to `target` to prevent overflow", |
| 17 | + role: "The role attribute of the dropdown", |
| 18 | + |
| 19 | + textBy: 'When `options` prop items are an objects, this key will be used as displayed text. Can be string (path to the key) or function of type: `(option) => option.text`', |
| 20 | + valueBy: 'When `options` prop items are an objects, this key will be used in `selected` event. Can be string (path to the key) or function of type: `(option) => option.value`', |
| 21 | + trackBy: 'When `options` prop items are an objects, this key will be used to track selected `options`. Can be string (path to the key) or function of type: `(option) => option.track`', |
| 22 | + groupBy: 'When `options` prop items are an objects, this key will be used to check correct option group', |
| 23 | + disabledBy: "Specify the key in the object to be used as item `disabled` prop. Can be string (path to the key) or function of type: `(option) => option.disabled`", |
| 24 | + options: "Available options that the user can select from", |
| 25 | + }, |
| 26 | + events: { |
| 27 | + anchorClick: "The event is triggered when anchor is clicked", |
| 28 | + anchorDblclick: "The event is triggered when anchor is double clicked", |
| 29 | + anchorRightClick: "The event is triggered when anchor is right clicked", |
| 30 | + close: "The event is triggered when dropdown is closed", |
| 31 | + open: "The event is triggered when dropdown is opened", |
| 32 | + contentClick: "The event is triggered when clicked inside dropdown content", |
| 33 | + focusOutside: "The event is triggered when focus is outside dropdown content and anchor", |
| 34 | + clickOutside: "The event is triggered when clicked outside dropdown content and anchor", |
| 35 | + selected: 'Emitted when an option is selected. Returns the selected option value as first argument and the selected option as second argument', |
| 36 | + }, |
| 37 | + slots: { |
| 38 | + anchor: "Slot for anchor. When anchor is clicked, dropdown will be opened", |
| 39 | + default: "Dropdown content", |
| 40 | + } |
| 41 | +}); |
0 commit comments