{# DO NOT EDIT: This file is automatically generated by the project's build task #} {% macro badge( class=false, number=0, max_number=999 ) %} {% set number = number | float %} {% set number = 0 if number === null else number %} {% set number = max_number + "+" if number > max_number else number %} {{ number }} {% endmacro %} {% macro breadcrumb( class, breadcrumbs=[ { href: "#", text: "Breadcrumb Link" }, { href: "#", text: "Breadcrumb Link 2" }, { text: "Current Page" } ] ) %} {% endmacro %} {% macro button( class=false, id=false, for=false, input_id=false, name=false, checked=false, disabled=false, el="button", text, href=false, icon_left=false, icon_right=false, icon_path=false, custom_attr_array=[]) %} {# Default text if button() is called with no other arguments #} {% if icon_left == false and icon_right == false and text == undefined %} {% set text = "Get It Now" %} {% endif %} {# Defaults for buttons #} {% if href %} {# if an href is passed in, automatically change the el to 'a' #} {% set el ="a" %} {% endif %} {# Defaults for checkbox & radio buttons #} {% set input_type = false %} {% if el == "checkbox" or el == "radio" %} {% set input_type = el %} {% set el = "label" %} {# need a class hook to strip off button styles for input buttons and apply them to the button inner #} {% set class = class + " luci-button--input" %} {% if input_id == false %} {% set input_id = "luci-button--" + range(0, 100000) | random %} {% endif %} {% set for = input_id %} {% endif %} {# Modifier classes for icon buttons #} {% if (icon_left or icon_right) and 'luci-button--icon-only' not in class %} {% set class = class + " luci-button--with-icons" %} {% endif %} {# Add --disabled modifier class for buttons that don't have a disabled attribute #} {% if disabled %} {% set class = class + " luci-button--disabled" %} {% endif %} {# Render actual button markup here #} <{{ el }} class="luci-button{{ " " + class if class }}" {% if href %} href="{{ href }}" {% endif %} {% if id %} id="{{ id }}" {% endif %} {% if for %} for="{{ for }}" {% endif %} {{ 'disabled' if el == "button" and disabled }} {% if el == "label" %} role="button" {% if checked %} aria-pressed="true" {% else %} aria-pressed="false" {% endif %} {% endif %} {% if custom_attr_array %} {% for attr in custom_attr_array %} {{ attr.name }} = "{{ attr.value }}" {% endfor %} {% endif %} > {% if input_type %} {% endif %} {% if icon_left or icon_right or input_type %} {# use display: flex; to vertically align icons with text, {% endif %}
{% if logo_href %} {% endif %} NetApp logo {% if logo_href %} {% endif %}
{% if product_name.label %} {% if product_name.href %} {% endif %} {{- product_name.label -}} {% if product_name.href %} {% endif %} {% endif %} {% if metadata.label %} {% endif %} {% if product_name.label %} {% endif %} {% if has_search %} {{ search(search_id=masthead_search_id, search_label="Search", class="luci-search--sm") }} {% endif %}
{% if has_search %} {% endif %} {% if nav %}
{% set mobile_menu_trigger_element %} {% endset %} {% call menu( container_class=dropdown_menu_container_class, class="luci-menu--left", body_padding=false, custom_trigger=mobile_menu_trigger_element ) %} {{ list_group(list=nav) }} {% endcall %}
{% endif %} {% endmacro %} {% macro menu( class=false, container_class="luci-container--light", trigger={ type: "button", props: { text: "Button Trigger", class: "luci-button--secondary", icon_right: "expand" } }, custom_trigger=false, body_padding=true, action_button_text=false, icon_name="more" ) %}
{% if custom_trigger %} {# Custom trigger element must have the "luci-menu__trigger" class #} {{ custom_trigger | safe }} {% else %} {{ menu_trigger_element(trigger=trigger) }} {% endif %}
{% endmacro %} {% macro menu_trigger_element( trigger={ type: "button", props: { text: "Button Trigger", class: "luci-button--secondary", icon_right: "expand" } } ) %} {% set trigger_element %} {{ getContext(trigger.type)( text=trigger.props.text, class=trigger.props.class + ' luci-menu__trigger', icon_left= trigger.props.icon_left, icon_right= trigger.props.icon_right, custom_attr_array=[ { name: 'aria-expanded', value: 'false' }, { name: 'aria-haspopup', value: 'true' } ] ) }} {% endset %} {% if trigger.button_group.props %}
{{ button(text=trigger.button_group.props.text, class=trigger.button_group.props.class) }} {{ trigger_element | safe }}
{% else %} {{ trigger_element | safe }} {% endif %} {% endmacro %} {% macro navigation( id=false, class, nav ) %} {% if id == false %} {% set id = "luci-navigation-" + range(0, 100000) | random %} {% endif %} {% endmacro %} {% macro navigation_container( class, header, navigation_vertical=false, navigation_vertical_id=false, navigation_vertical_is_active=false, body ) %} {% if navigation_vertical_id == false %} {% set navigation_vertical_id = "luci-navigation_vertical-container-" + range(0, 100000) | random %} {% endif %} {% endmacro %} {% macro notification( class, heading=false, text=false, icon_left="info", icon_path=false, close=false, describedby=false ) %}
{% if icon_left %} {{ icon(class="luci-icon--size-sm luci-notification__icon", name=icon_left, path=icon_path) }} {% endif %}
{% if heading %}
{{ heading | safe }}
{% endif %} {% if text %}
{{ text | safe }}
{% endif %}
{% if close %} {{ button(class="luci-button--icon-only luci-button--flat luci-button--small luci-notification__button--close", icon_left="close") }} {% endif %}
{% endmacro %} {% macro pagination( class, pages=[ { href: "#", text:"1", current: true }, { href: "#", text:"2" } ] ) %} {% set disable_previous=false %} {% set disable_next=false %} {% for page in pages %} {% if loop.first and page.current %} {% set disable_previous=true %} {% endif %} {% if loop.last and page.current %} {% set disable_next=true %} {% endif %} {% endfor %} {% endmacro %} {% macro popover( class=false, heading=false, description=false, trigger={ type: "button", props: { text: "Button Trigger", class: "luci-button--secondary" } }, cancel_button_text=false, action_button_text=false ) %}
{{ popover_trigger_element(trigger=trigger) }}
{% endmacro %} {% macro popover_trigger_element( trigger={ type: "button", props: { text: "Button Trigger", class: "luci-button--secondary" } } ) %} {% set trigger_element %} {{ getContext(trigger.type)( text=trigger.props.text, class=trigger.props.class + ' luci-popover__trigger', icon_left= trigger.props.icon_left, custom_attr_array=[ { name: 'aria-expanded', value: 'false' }, { name: 'aria-haspopup', value: 'true' } ] ) }} {% endset %} {% if trigger.button_group.props %}
{{ button(text=trigger.button_group.props.text, class=trigger.button_group.props.class) }} {{ trigger_element | safe }}
{% else %} {{ trigger_element | safe }} {% endif %} {% endmacro %} {% macro search( class=false, search_id, autosuggest=false, search_placeholder, search_value, search_label) %} {% endmacro %} {% macro switch( class=false, id=false, aria_label=false, label=false, label_checked=false, name=false, checked=false, disabled=false ) %} {% if id == false %} {% set id = "luci-switch-" + range(0, 100000) | random %} {% endif %} {% if name == false %} {% set name = id + "-name" %} {% endif %} {% if label == false and aria_label == false %} {% set aria_label = id + "-label" %} {% endif %} {% endmacro %} {% macro switch_group( class=false ) %}
{% if caller %} {{ caller() }} {% endif %}
{% endmacro %} {% macro tab(class=false, tabs, id=false) %}
{% for tab in tabs %}
{% if tab.nested %}
    {% for tab in tab.nested %}
  • {{ link(text=tab.title, href='#' + tab.id, custom_attr_array=[ { name: 'role', value: 'tab' }, { name: 'id', value: tab.id }, { name: 'aria-controls', value: tab.id } ]) }}
  • {% endfor %}
{% endif %} {% if caller %} {{ caller() }} {% else %} {% if tab.content %} {{ tab.content | safe }} {# {% else %}

Tab {{ loop.index }} Content

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel ullam eius aliquam labore provident hic nisi perferendis. Velit sed, asperiores, fugiat assumenda saepe optio numquam commodi maxime, hic, adipisci at!

#} {% endif %} {% if tab.nested %} {% for tab in tab.nested %}
{% if tab.content %} {{ tab.content | safe }} {% endif %}
{% endfor %} {% endif %} {% endif %}
{% endfor %}
{% endmacro %} {% macro table( class, table_class, caption, selected=false, show_hide=false, headers, data, id=false, show_hide_checkboxes=[]) %}
{% if caller %} {{ caller() }} {% endif %} {% if caption %} {% endif %} {% if selected %} {% endif %} {% for column in headers %} {% endif %} {% endfor %} {% for row in data %} {% if selected %} {% set checked = row.checked %} {% endif %} {% for cell in row.data %} {% endfor %} {% endfor %}
{{ caption }}
{{ form_checkbox(checked=false, label=false, input_id=range(0, 100000) | random) }} {% if column.show_hide %} {% call menu( class="luci-menu--left", body_padding=false, action_button_text="Submit", trigger={ type: "button", props: { class: "luci-button--icon-only luci-button--small", icon_left: "add" } } ) %} {% set show_hide_checkboxes = [] %} {% for column in headers %} {% if not column.show_hide and not (column.class and 'inline-edit-button' in column.class) %} {% set list_data = { 'text': column.text, 'checked': true } %} {% set show_hide_checkboxes = (show_hide_checkboxes.push(list_data), show_hide_checkboxes) %} {% endif %} {% endfor %} {{ list_group(list=[ { "text":"Show/Hide Columns", "heading":true }, { "checkboxes": show_hide_checkboxes } ]) }} {% endcall %} {% else %} {% if column.class and 'column-control' in column.class %} {% if column.menu %} {% call menu( class="luci-menu--left" if loop.last, body_padding=false, trigger={ type: "button", props: { class: "luci-button--icon-only luci-button--small luci-button--flat", icon_left: "more" } } ) %} {{ list_group(list=[ { "text":"Freeze column", "href":"#", "modifier":"table-inline-action" }, { "text":"Hide column", "href":"#", "modifier":"table-inline-action" } ]) }} {% endcall %} {% else %} {{ button( class="luci-button--icon-only luci-button--flat luci-button--small luci-button--toggle-icon", icon_left=column.icon if column.icon else "lock-open", custom_attr_array=[ { name: 'data-toggle-icon-on', value: 'lock' }, { name: 'data-toggle-icon-off', value: 'lock-open' } ] ) }} {% endif %} {% endif %} {% if column.sort %} {{ column.text | safe }} {% else %} {{ column.text | safe }} {% endif %}
{{ form_checkbox(checked=checked, label=false, input_id=range(0, 100000) | random) }} {% if cell.class and 'inline-edit-action' in cell.class %} {% call menu( class="luci-menu--left" if loop.index !== 1, body_padding=false, trigger={ type: "button", props: { class: "luci-button--icon-only luci-button--small luci-button--flat", icon_left: "more" } } ) %} {{ list_group(list=[ { "text":"Edit row", "href":"#", "modifier":"table-inline-action luci-table__action--inline-edit" }, { "text":"Delete row", "href":"#", "modifier":"table-inline-action luci-table__action--inline-delete" }, { "text":"Clone row", "href":"#", "modifier":"table-inline-action luci-table__action--inline-clone" }, { "text":"Freeze row", "href":"#", "modifier":"table-inline-action" }, { "text":"Add child row", "href":"#", "modifier":"table-inline-action" } ]) }} {% endcall %} {% endif %} {% if cell.class and 'inline-edit-icon' in cell.class %} {{ button(class="luci-button--icon-only luci-button--flat luci-button--small luci-table__action--inline-" + cell.icon, icon_left=cell.icon) }} {% endif %} {% if cell.class and 'inline-edit-button' in cell.class %} {{ button(class="luci-button--icon-only luci-button--flat luci-button--small luci-button--inline-edit luci-button--inline-edit-" + cell.icon, icon_left=cell.icon) }} {% endif %} {% if cell.class and 'searchable' in cell.class %} {{ form_combo_box(name="comboBox", input_id="comboBox") }} {% endif %} {% if cell.status == 'warning' or cell.status == '' %}
{% if cell.status == 'warning' %} {{ icon(name=cell.status, class="luci-icon--size-sm luci-icon-" + cell.status) }} {% endif %} {{ cell.text }}
{% else %} {% if row.expandable and cell.class === 'luci-table__cell--indent' %} {{ button(class="luci-table--expand-button luci-button--icon-only luci-button--flat luci-button--small", icon_left="expand") }} {% endif %} {{ cell.text | safe }} {% endif %}
{% endmacro %} {% macro tag( class=false, text=false, item_class=false, dismissible=false, tags=[ { text:'Tag label 1', dismissible: false }, { text:'Tag label 2', dismissible: true } ] ) %} {% if text %} {% set tags = [{text:text, class:item_class, dismissible:dismissible}] %} {% endif %} {% endmacro %} {% macro tooltip( class=false, content, element="span", tooltip_id=false ) %} {% if tooltip_id == false %} {% set tooltip_id = "luci-tooltip-" + range(0, 100000) | random %} {% endif %} <{{ element }} class="luci-tooltip{{ ' ' + class if class }}"> <{{ element }} class="luci-tooltip__trigger" aria-describedby="{{tooltip_id}}"> {{ caller() }} <{{ element }} class="luci-tooltip__content" role="tooltip" id="{{tooltip_id}}"> <{{ element }} class="luci-tooltip__content-inner"> <{{ element }} class="luci-tooltip__text"> {{ content | safe }} {% endmacro %}