UNPKG

@nebula.js/sn-nav-menu

Version:

A navigation menu object for Qlik Sense

381 lines 11.9 kB
{ "scriptappy": "1.1.0", "info": { "name": "@nebula.js/sn-nav-menu:properties", "description": "Navigation menu generic object definition", "version": "0.13.1", "license": "MIT", "stability": "stable", "x-qlik-visibility": "public" }, "entries": { "properties": { "extends": [ { "type": "GenericObjectProperties" } ], "kind": "object", "entries": { "components": { "description": "Holds general styling", "nullable": true, "kind": "array", "items": { "type": "#/definitions/Component" } }, "disableNavMenu": { "description": "Disable hover menu toggle", "optional": true, "defaultValue": true, "type": "boolean" }, "footnote": { "description": "Visualization footnote", "optional": true, "defaultValue": "", "kind": "union", "items": [ { "type": "string" }, { "type": "StringExpression" } ] }, "layoutOptions": { "description": "Layout settings.", "entries": { "alignment": { "description": "The alignment of the menu in the object viewport in both directions(horizontal and vertical)", "optional": true, "kind": "union", "items": [ { "kind": "literal", "value": "'top-left'" }, { "kind": "literal", "value": "'top-center'" }, { "kind": "literal", "value": "'top-right'" }, { "kind": "literal", "value": "'center-left'" }, { "kind": "literal", "value": "'center-center'" }, { "kind": "literal", "value": "'center-right'" }, { "kind": "literal", "value": "'bottom-left'" }, { "kind": "literal", "value": "'bottom-center'" }, { "kind": "literal", "value": "'bottom-right'" } ] }, "dividerColor": { "description": "Divider color settings.", "optional": true, "type": "#/definitions/PaletteColor" }, "drawerMode": { "description": "If set to true, the navigation menu is displayed as a button, and the `orientation` and `layout` properties will be ignored.\nIf set to false, the navigation menu is displayed as a menu, and the `showDrawerIcon` property will be ignored.", "optional": true, "defaultValue": false, "type": "boolean" }, "drawerPanelPosition": { "description": "The position of the drawer panel. If set to `left`, the drawer panel is anchored to the left, if set to `right`, the drawer panel is anchored to the right", "optional": true, "defaultValue": "left", "kind": "union", "items": [ { "kind": "literal", "value": "'left'" }, { "kind": "literal", "value": "'right'" } ] }, "largeItems": { "description": "If set to true, menu items have a bigger padding top and bottom.", "optional": true, "defaultValue": false, "type": "boolean" }, "layout": { "description": "The space layout of the menu. If set to `fill`, menu items use all space in horizontal direction, if set to `minimal`, menu items use minimum space in horizontal direction.", "optional": true, "kind": "union", "items": [ { "kind": "literal", "value": "'fill'" }, { "kind": "literal", "value": "'minimal'" } ] }, "orientation": { "description": "The orientation of the menu. If set to `vertical`, menu items are displayed vertically, if set to `horizontal`, menu items are displayed horizontally", "optional": true, "kind": "union", "items": [ { "kind": "literal", "value": "'vertical'" }, { "kind": "literal", "value": "'horizontal'" } ] }, "sameItemWidth": { "description": "This is only valid if `orientation` property is set to `horizontal`.\nIf set to true, all items have the same width.", "optional": true, "defaultValue": true, "type": "boolean" }, "separateItems": { "description": "If set to true, a space of 8px is displayed between two menu items.", "optional": true, "defaultValue": false, "type": "boolean" }, "showDrawerIcon": { "description": "If set to true, the drawer icon is displayed.", "optional": true, "defaultValue": true, "type": "boolean" }, "showItemIcons": { "description": "If set to true, an icon is displayed to the left of a menu item.", "optional": true, "defaultValue": false, "type": "boolean" }, "useDivider": { "description": "If set to true, a divider is displayed between two menu items.", "optional": true, "defaultValue": false, "type": "boolean" } }, "kind": "object" }, "showDetails": { "description": "Show visualization details toggle", "optional": true, "defaultValue": false, "type": "boolean" }, "showTitles": { "description": "Show title for the visualization", "optional": true, "defaultValue": false, "type": "boolean" }, "subtitle": { "description": "Visualization subtitle", "optional": true, "defaultValue": "", "kind": "union", "items": [ { "type": "string" }, { "type": "StringExpression" } ] }, "title": { "description": "Visualization title", "optional": true, "defaultValue": "", "kind": "union", "items": [ { "type": "string" }, { "type": "StringExpression" } ] }, "version": { "description": "Current version of this generic object definition", "type": "string" } } } }, "definitions": { "Component": { "description": "General styling for navigation menu.\nIf any property is not set, default values specific for each property is used.", "kind": "object", "entries": { "key": { "description": "This should be set to `theme`", "type": "string" }, "content": { "optional": true, "type": "#/definitions/ContentStyling" } } }, "ContentStyling": { "description": "Holds properties for font family, font size, font color and hover styling.", "kind": "object", "entries": { "fontFamily": { "description": "Defaults to `Source Sans Pro, sans serif`", "type": "string" }, "fontSize": { "description": "Defaults to `12px`", "type": "string" }, "fontStyle": { "type": "#/definitions/FontStyle" }, "borderColor": { "optional": true, "type": "#/definitions/PaletteColor" }, "borderRadius": { "optional": true, "type": "string" }, "borderWidth": { "optional": true, "type": "string" }, "boxShadow": { "optional": true, "type": "string" }, "boxShadowColor": { "optional": true, "type": "#/definitions/PaletteColor" }, "defaultColor": { "description": "Menu item color, defaults to `white`", "optional": true, "type": "#/definitions/PaletteColor" }, "defaultFontColor": { "description": "Defaults to `#404040`", "optional": true, "type": "#/definitions/PaletteColor" }, "drawerButton": { "optional": true, "type": "#/definitions/DrawerButtonStyling" }, "highlightColor": { "description": "Color when a menu item is highlighted, defaults to `white`", "optional": true, "type": "#/definitions/PaletteColor" }, "highlightFontColor": { "description": "Defaults to `#404040`", "optional": true, "type": "#/definitions/PaletteColor" }, "hoverColor": { "description": "Color when a menu item is hovered, defaults to `#d3d3d3`", "optional": true, "type": "#/definitions/PaletteColor" }, "hoverFontColor": { "description": "Defaults to `#404040`", "optional": true, "type": "#/definitions/PaletteColor" } } }, "DrawerButtonStyling": { "description": "Holds properties for drawer button styling.", "kind": "object", "entries": { "defaultColor": { "description": "Drawer button color, defaults to `white`", "optional": true, "type": "#/definitions/PaletteColor" }, "hoverColor": { "description": "Color when a drawer button is hovered, defaults to `white`", "optional": true, "type": "#/definitions/PaletteColor" } } }, "FontStyle": { "description": "Font style", "kind": "object", "entries": { "bold": { "description": "Default to false", "type": "boolean" }, "italic": { "description": "Default to false", "type": "boolean" }, "normal": { "description": "Default to true", "type": "boolean" }, "underline": { "description": "Default to false", "type": "boolean" } } }, "PaletteColor": { "description": "Color information structure. Holds the actual color and index in palette", "kind": "object", "entries": { "color": { "description": "Color as hex string (mandatory if index: -1)", "type": "string" }, "index": { "description": "Index in palette", "type": "number" }, "alpha": { "description": "Transparency value, default to 1", "optional": true, "type": "number" } } } } }