UNPKG

@lowdefy/blocks-antd

Version:

Lowdefy Ant Design Blocks

294 lines (290 loc) 13.8 kB
/* Copyright 2020-2026 Lowdefy, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ export default { category: 'container', icons: [ 'AiOutlineMenuUnfold', 'AiOutlineMenuFold' ], valueType: null, slots: { drawerContent: 'Additional content below the menu in the drawer.', drawerFooter: 'Footer content in the drawer.' }, cssKeys: { element: 'The MobileMenu element.' }, events: { onToggleDrawer: 'Trigger action when mobile menu drawer is toggled.', onClose: 'Trigger action when mobile menu is closed.', onOpen: 'Trigger action when mobile menu is opened.', onMenuItemSelect: 'Trigger action when menu item is selected.', onMenuItemClick: 'Trigger action when menu item is clicked.', onToggleMenuGroup: 'Trigger action when mobile menu group is opened.' }, properties: { type: 'object', additionalProperties: false, properties: { toggleMenuButton: { type: 'object', description: 'Toggle menu button properties.', docs: { displayType: 'button' } }, drawer: { type: 'object', description: 'Menu drawer properties.', docs: { displayType: 'yaml' } }, logo: { type: 'object', description: 'Logo settings for the mobile menu drawer header.', additionalProperties: false, properties: { src: { type: 'string', description: 'Logo source url.' }, srcMobile: { type: 'string', description: 'Mobile logo source url.' }, alt: { type: 'string', default: 'Lowdefy', description: 'Logo alternative text.' }, style: { type: 'object', description: 'Css style object to apply to logo.', docs: { displayType: 'yaml' } } } }, menuId: { type: 'string', description: 'App menu id used to get menu links.' }, selectedKeys: { type: 'array', description: 'Array with the keys of currently selected menu items.', items: { type: 'string', description: "Selected menu item 'id'." } }, subMenuCloseDelay: { type: 'number', description: 'Delay time to hide submenu when mouse leaves (in seconds).' }, subMenuOpenDelay: { type: 'number', description: 'Delay time to show submenu when mouse enters (in seconds).' }, theme: { type: 'string', enum: [ 'dark', 'light' ], default: 'light', description: 'Color theme of menu.' }, links: { type: 'array', items: { type: 'object', required: [ 'id', 'type' ], properties: { id: { type: 'string', description: 'Menu item id.' }, type: { type: 'string', enum: [ 'MenuDivider', 'MenuLink', 'MenuGroup' ], default: 'MenuLink', description: 'Menu item type.' }, pageId: { type: 'string', description: 'Page to link to.' }, style: { type: 'object', description: 'Css style to applied to link.', docs: { displayType: 'yaml' } }, properties: { type: 'object', description: 'properties from menu item.', properties: { title: { type: 'string', description: 'Menu item title.' }, icon: { type: [ 'string', 'object' ], description: "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon on menu item.", docs: { displayType: 'icon' } }, danger: { type: 'boolean', default: false, description: 'Apply danger style to menu item.' }, dashed: { type: 'boolean', default: false, description: 'Whether the divider line is dashed.' } } }, links: { type: 'array', items: { type: 'object', required: [ 'id', 'type' ], properties: { id: { type: 'string', description: 'Menu item id.' }, type: { type: 'string', enum: [ 'MenuDivider', 'MenuLink', 'MenuGroup' ], default: 'MenuLink', description: 'Menu item type.' }, style: { type: 'object', description: 'Css style to applied to sub-link.', docs: { displayType: 'yaml' } }, pageId: { type: 'string', description: 'Page to link to.' }, properties: { type: 'object', description: 'properties from menu item.', properties: { title: { type: 'string', description: 'Menu item title.' }, danger: { type: 'boolean', default: false, description: 'Apply danger style to menu item.' }, dashed: { type: 'boolean', default: false, description: 'Whether the divider line is dashed.' } }, links: { type: 'array', items: { type: 'object', required: [ 'id', 'type' ], properties: { id: { type: 'string', description: 'Menu item id.' }, type: { type: 'string', enum: [ 'MenuDivider', 'MenuLink' ], default: 'MenuLink', description: 'Menu item type.' }, style: { type: 'object', description: 'Css style to applied to sub-link.', docs: { displayType: 'yaml' } }, pageId: { type: 'string', description: 'Page to link to.' }, properties: { type: 'object', description: 'properties from menu item.', properties: { title: { type: 'string', description: 'Menu item title.' }, danger: { type: 'boolean', default: false, description: 'Apply danger style to menu item.' }, dashed: { type: 'boolean', default: false, description: 'Whether the divider line is dashed.' } } } } } } } } } } } } } } } };