@aquera/nile-elements 2.0.21 → 2.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -34
- package/demo/nxtgen-classes.css +24 -4
- package/demo/nxtgen-dark.css +30 -16
- package/demo/nxtgen-properties.css +9 -2
- package/demo/nxtgen-utilities.css +31 -4
- package/demo/nxtgen.css +8 -4
- package/demo/utilities.css +2 -2
- package/demo/variables.css +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1954 -937
- package/dist/nile-app-shell/index.cjs.js +1 -1
- package/dist/nile-app-shell/index.esm.js +1 -1
- package/dist/nile-app-shell/nile-app-shell.cjs.js +1 -1
- package/dist/nile-app-shell/nile-app-shell.cjs.js.map +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.cjs.js +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.cjs.js.map +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.esm.js +72 -65
- package/dist/nile-app-shell/nile-app-shell.esm.js +60 -31
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js.map +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.esm.js +1 -1
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js +1 -1
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js.map +1 -1
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js +1 -1
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js.map +1 -1
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.esm.js +25 -7
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.esm.js +2 -2
- package/dist/nile-button-filter/nile-button-filter.cjs.js +1 -1
- package/dist/nile-button-filter/nile-button-filter.cjs.js.map +1 -1
- package/dist/nile-button-filter/nile-button-filter.css.cjs.js +1 -1
- package/dist/nile-button-filter/nile-button-filter.css.cjs.js.map +1 -1
- package/dist/nile-button-filter/nile-button-filter.css.esm.js +1 -1
- package/dist/nile-button-filter/nile-button-filter.esm.js +2 -4
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +9 -8
- package/dist/nile-color-picker/nile-color-picker.css.cjs.js +1 -1
- package/dist/nile-color-picker/nile-color-picker.css.cjs.js.map +1 -1
- package/dist/nile-color-picker/nile-color-picker.css.esm.js +1 -1
- package/dist/nile-combobox/nile-combobox.css.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.css.cjs.js.map +1 -1
- package/dist/nile-combobox/nile-combobox.css.esm.js +1 -1
- package/dist/nile-command-menu-item/nile-command-menu-item.css.cjs.js +1 -1
- package/dist/nile-command-menu-item/nile-command-menu-item.css.cjs.js.map +1 -1
- package/dist/nile-command-menu-item/nile-command-menu-item.css.esm.js +5 -1
- package/dist/nile-context-menu/nile-context-menu.css.cjs.js +1 -1
- package/dist/nile-context-menu/nile-context-menu.css.cjs.js.map +1 -1
- package/dist/nile-context-menu/nile-context-menu.css.esm.js +2 -3
- package/dist/nile-dropdown-switcher/index.cjs.js +2 -0
- package/dist/nile-dropdown-switcher/index.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher/index.esm.js +1 -0
- package/dist/nile-dropdown-switcher/nile-dropdown-switcher.cjs.js +2 -0
- package/dist/nile-dropdown-switcher/nile-dropdown-switcher.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher/nile-dropdown-switcher.css.cjs.js +2 -0
- package/dist/nile-dropdown-switcher/nile-dropdown-switcher.css.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher/nile-dropdown-switcher.css.esm.js +39 -0
- package/dist/nile-dropdown-switcher/nile-dropdown-switcher.esm.js +1 -0
- package/dist/nile-dropdown-switcher-group/index.cjs.js +2 -0
- package/dist/nile-dropdown-switcher-group/index.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher-group/index.esm.js +1 -0
- package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.cjs.js +2 -0
- package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.cjs.js +2 -0
- package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.esm.js +37 -0
- package/dist/nile-dropdown-switcher-group/nile-dropdown-switcher-group.esm.js +8 -0
- package/dist/nile-dropdown-switcher-header/index.cjs.js +2 -0
- package/dist/nile-dropdown-switcher-header/index.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher-header/index.esm.js +1 -0
- package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.cjs.js +2 -0
- package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.cjs.js +2 -0
- package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.esm.js +91 -0
- package/dist/nile-dropdown-switcher-header/nile-dropdown-switcher-header.esm.js +33 -0
- package/dist/nile-dropdown-switcher-item/index.cjs.js +2 -0
- package/dist/nile-dropdown-switcher-item/index.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher-item/index.esm.js +1 -0
- package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.cjs.js +2 -0
- package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.cjs.js +2 -0
- package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.cjs.js.map +1 -0
- package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.esm.js +102 -0
- package/dist/nile-dropdown-switcher-item/nile-dropdown-switcher-item.esm.js +35 -0
- package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
- package/dist/nile-empty-state/nile-empty-state.esm.js +4 -4
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +2 -2
- package/dist/nile-form-group/nile-form-group.css.cjs.js +1 -1
- package/dist/nile-form-group/nile-form-group.css.cjs.js.map +1 -1
- package/dist/nile-form-group/nile-form-group.css.esm.js +3 -3
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.esm.js +20 -4
- package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.esm.js +3 -3
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.esm.js +3 -3
- package/dist/nile-markdown-editor/nile-markdown-editor.css.cjs.js +1 -1
- package/dist/nile-markdown-editor/nile-markdown-editor.css.cjs.js.map +1 -1
- package/dist/nile-markdown-editor/nile-markdown-editor.css.esm.js +4 -4
- package/dist/nile-menu/nile-menu.css.cjs.js +1 -1
- package/dist/nile-menu/nile-menu.css.cjs.js.map +1 -1
- package/dist/nile-menu/nile-menu.css.esm.js +1 -2
- package/dist/nile-menu-item/nile-menu-item.css.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.css.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.css.esm.js +6 -6
- package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js +1 -1
- package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js.map +1 -1
- package/dist/nile-nav-tab/nile-nav-tab.css.esm.js +3 -3
- package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js +1 -1
- package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js.map +1 -1
- package/dist/nile-nav-tab-group/nile-nav-tab-group.css.esm.js +15 -12
- package/dist/nile-option/nile-option.css.cjs.js +1 -1
- package/dist/nile-option/nile-option.css.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.css.esm.js +2 -2
- package/dist/nile-pagination/nile-pagination.cjs.js +1 -1
- package/dist/nile-pagination/nile-pagination.cjs.js.map +1 -1
- package/dist/nile-pagination/nile-pagination.css.cjs.js +1 -1
- package/dist/nile-pagination/nile-pagination.css.cjs.js.map +1 -1
- package/dist/nile-pagination/nile-pagination.css.esm.js +10 -0
- package/dist/nile-pagination/nile-pagination.esm.js +14 -14
- package/dist/nile-side-bar/nile-side-bar.cjs.js +1 -1
- package/dist/nile-side-bar/nile-side-bar.cjs.js.map +1 -1
- package/dist/nile-side-bar/nile-side-bar.css.cjs.js +1 -1
- package/dist/nile-side-bar/nile-side-bar.css.cjs.js.map +1 -1
- package/dist/nile-side-bar/nile-side-bar.css.esm.js +16 -14
- package/dist/nile-side-bar/nile-side-bar.esm.js +2 -2
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.cjs.js +1 -1
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.esm.js +11 -4
- package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +8 -3
- package/dist/nile-side-bar-footer-item/index.cjs.js +1 -1
- package/dist/nile-side-bar-footer-item/index.esm.js +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.esm.js +181 -25
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +10 -3
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.cjs.js +1 -1
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.esm.js +10 -5
- package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js +1 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js.map +1 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js +1 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.css.esm.js +52 -9
- package/dist/nile-side-bar-group/nile-side-bar-group.esm.js +4 -4
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js +1 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.esm.js +53 -8
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js +1 -1
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js.map +1 -1
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.cjs.js +1 -1
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.esm.js +13 -4
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.esm.js +4 -4
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.cjs.js +1 -1
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.esm.js +9 -6
- package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js.map +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +12 -5
- package/dist/nile-side-bar-header-switcher/index.cjs.js +2 -0
- package/dist/nile-side-bar-header-switcher/index.cjs.js.map +1 -0
- package/dist/nile-side-bar-header-switcher/index.esm.js +1 -0
- package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.cjs.js +2 -0
- package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.cjs.js.map +1 -0
- package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.cjs.js +2 -0
- package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.cjs.js.map +1 -0
- package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.esm.js +83 -0
- package/dist/nile-side-bar-header-switcher/nile-side-bar-header-switcher.esm.js +24 -0
- package/dist/nile-side-bar-search/index.cjs.js +2 -0
- package/dist/nile-side-bar-search/index.cjs.js.map +1 -0
- package/dist/nile-side-bar-search/index.esm.js +1 -0
- package/dist/nile-side-bar-search/nile-side-bar-search.cjs.js +2 -0
- package/dist/nile-side-bar-search/nile-side-bar-search.cjs.js.map +1 -0
- package/dist/nile-side-bar-search/nile-side-bar-search.css.cjs.js +2 -0
- package/dist/nile-side-bar-search/nile-side-bar-search.css.cjs.js.map +1 -0
- package/dist/nile-side-bar-search/nile-side-bar-search.css.esm.js +103 -0
- package/dist/nile-side-bar-search/nile-side-bar-search.esm.js +25 -0
- package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.esm.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.esm.js +7 -5
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +75 -3
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +3 -2
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.esm.js +3 -3
- package/dist/nile-wysiwyg-editor/types.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/types.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/types.esm.js +1 -1
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +6 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.css.js +70 -63
- package/dist/src/nile-app-shell/nile-app-shell.css.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.d.ts +40 -7
- package/dist/src/nile-app-shell/nile-app-shell.js +192 -41
- package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.test.d.ts +2 -0
- package/dist/src/nile-app-shell/nile-app-shell.test.js +272 -1020
- package/dist/src/nile-app-shell/nile-app-shell.test.js.map +1 -1
- package/dist/src/nile-app-shell/zz-layout.test.d.ts +15 -0
- package/dist/src/nile-app-shell/zz-layout.test.js +253 -0
- package/dist/src/nile-app-shell/zz-layout.test.js.map +1 -0
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js +1 -1
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js.map +1 -1
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js +24 -6
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js.map +1 -1
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.d.ts +8 -2
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js +56 -2
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js.map +1 -1
- package/dist/src/nile-button-filter/nile-button-filter.css.js +1 -1
- package/dist/src/nile-button-filter/nile-button-filter.css.js.map +1 -1
- package/dist/src/nile-button-filter/nile-button-filter.js +1 -3
- package/dist/src/nile-button-filter/nile-button-filter.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.css.js +9 -8
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-color-picker/nile-color-picker.css.js +3 -3
- package/dist/src/nile-color-picker/nile-color-picker.css.js.map +1 -1
- package/dist/src/nile-combobox/nile-combobox.css.js +1 -1
- package/dist/src/nile-combobox/nile-combobox.css.js.map +1 -1
- package/dist/src/nile-command-menu-item/nile-command-menu-item.css.js +5 -1
- package/dist/src/nile-command-menu-item/nile-command-menu-item.css.js.map +1 -1
- package/dist/src/nile-context-menu/nile-context-menu.css.js +2 -4
- package/dist/src/nile-context-menu/nile-context-menu.css.js.map +1 -1
- package/dist/src/nile-dropdown-switcher/index.d.ts +1 -0
- package/dist/src/nile-dropdown-switcher/index.js +2 -0
- package/dist/src/nile-dropdown-switcher/index.js.map +1 -0
- package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.css.d.ts +10 -0
- package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.css.js +49 -0
- package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.css.js.map +1 -0
- package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.d.ts +101 -0
- package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.js +463 -0
- package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.js.map +1 -0
- package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.test.d.ts +4 -0
- package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.test.js +506 -0
- package/dist/src/nile-dropdown-switcher/nile-dropdown-switcher.test.js.map +1 -0
- package/dist/src/nile-dropdown-switcher-group/index.d.ts +1 -0
- package/dist/src/nile-dropdown-switcher-group/index.js +2 -0
- package/dist/src/nile-dropdown-switcher-group/index.js.map +1 -0
- package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.d.ts +12 -0
- package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.js +49 -0
- package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.js.map +1 -0
- package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.d.ts +37 -0
- package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.js +72 -0
- package/dist/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.js.map +1 -0
- package/dist/src/nile-dropdown-switcher-header/index.d.ts +1 -0
- package/dist/src/nile-dropdown-switcher-header/index.js +2 -0
- package/dist/src/nile-dropdown-switcher-header/index.js.map +1 -0
- package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.d.ts +12 -0
- package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.js +103 -0
- package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.js.map +1 -0
- package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.d.ts +46 -0
- package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.js +105 -0
- package/dist/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.js.map +1 -0
- package/dist/src/nile-dropdown-switcher-item/index.d.ts +1 -0
- package/dist/src/nile-dropdown-switcher-item/index.js +2 -0
- package/dist/src/nile-dropdown-switcher-item/index.js.map +1 -0
- package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.d.ts +10 -0
- package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.js +112 -0
- package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.js.map +1 -0
- package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.d.ts +55 -0
- package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.js +154 -0
- package/dist/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.js.map +1 -0
- package/dist/src/nile-empty-state/nile-empty-state.d.ts +5 -0
- package/dist/src/nile-empty-state/nile-empty-state.js +11 -2
- package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.test.js +31 -0
- package/dist/src/nile-empty-state/nile-empty-state.test.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js +2 -2
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
- package/dist/src/nile-form-group/nile-form-group.css.js +1 -1
- package/dist/src/nile-form-group/nile-form-group.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js +20 -4
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.js +1 -1
- package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js +3 -3
- package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js.map +1 -1
- package/dist/src/nile-markdown-editor/nile-markdown-editor.css.js +4 -4
- package/dist/src/nile-markdown-editor/nile-markdown-editor.css.js.map +1 -1
- package/dist/src/nile-menu/nile-menu.css.js +1 -2
- package/dist/src/nile-menu/nile-menu.css.js.map +1 -1
- package/dist/src/nile-menu-item/nile-menu-item.css.js +4 -4
- package/dist/src/nile-menu-item/nile-menu-item.css.js.map +1 -1
- package/dist/src/nile-nav-tab/nile-nav-tab.css.js +3 -3
- package/dist/src/nile-nav-tab/nile-nav-tab.css.js.map +1 -1
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js +15 -12
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js.map +1 -1
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.js +111 -0
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.js.map +1 -1
- package/dist/src/nile-option/nile-option.css.js +2 -2
- package/dist/src/nile-option/nile-option.css.js.map +1 -1
- package/dist/src/nile-pagination/nile-pagination.css.js +10 -0
- package/dist/src/nile-pagination/nile-pagination.css.js.map +1 -1
- package/dist/src/nile-pagination/nile-pagination.d.ts +2 -0
- package/dist/src/nile-pagination/nile-pagination.js +13 -9
- package/dist/src/nile-pagination/nile-pagination.js.map +1 -1
- package/dist/src/nile-side-bar/nile-side-bar.css.js +14 -12
- package/dist/src/nile-side-bar/nile-side-bar.css.js.map +1 -1
- package/dist/src/nile-side-bar/nile-side-bar.d.ts +17 -0
- package/dist/src/nile-side-bar/nile-side-bar.js +68 -12
- package/dist/src/nile-side-bar/nile-side-bar.js.map +1 -1
- package/dist/src/nile-side-bar/nile-side-bar.test.d.ts +23 -0
- package/dist/src/nile-side-bar/nile-side-bar.test.js +1614 -1
- package/dist/src/nile-side-bar/nile-side-bar.test.js.map +1 -1
- package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.js +11 -4
- package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.js.map +1 -1
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +8 -3
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.d.ts +7 -5
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js +7 -5
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js.map +1 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js +179 -23
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js.map +1 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.d.ts +15 -0
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js +82 -2
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js.map +1 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.d.ts +9 -0
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.js +201 -0
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.js.map +1 -0
- package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.js +8 -3
- package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.js.map +1 -1
- package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js +50 -7
- package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js.map +1 -1
- package/dist/src/nile-side-bar-group/nile-side-bar-group.d.ts +35 -0
- package/dist/src/nile-side-bar-group/nile-side-bar-group.js +90 -3
- package/dist/src/nile-side-bar-group/nile-side-bar-group.js.map +1 -1
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js +52 -7
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js.map +1 -1
- package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.js +11 -2
- package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.js.map +1 -1
- package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.d.ts +11 -2
- package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.js +21 -15
- package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.js.map +1 -1
- package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.js +7 -4
- package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.js.map +1 -1
- package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js +22 -17
- package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js.map +1 -1
- package/dist/src/nile-side-bar-header/nile-side-bar-header-surface.test.d.ts +4 -0
- package/dist/src/nile-side-bar-header/nile-side-bar-header-surface.test.js +143 -0
- package/dist/src/nile-side-bar-header/nile-side-bar-header-surface.test.js.map +1 -0
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +10 -3
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +1 -1
- package/dist/src/nile-side-bar-header/nile-side-bar-header.d.ts +7 -5
- package/dist/src/nile-side-bar-header/nile-side-bar-header.js +7 -5
- package/dist/src/nile-side-bar-header/nile-side-bar-header.js.map +1 -1
- package/dist/src/nile-side-bar-header-switcher/index.d.ts +1 -0
- package/dist/src/nile-side-bar-header-switcher/index.js +2 -0
- package/dist/src/nile-side-bar-header-switcher/index.js.map +1 -0
- package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.d.ts +14 -0
- package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.js +97 -0
- package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.js.map +1 -0
- package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.d.ts +38 -0
- package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.js +86 -0
- package/dist/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.js.map +1 -0
- package/dist/src/nile-side-bar-search/index.d.ts +1 -0
- package/dist/src/nile-side-bar-search/index.js +2 -0
- package/dist/src/nile-side-bar-search/index.js.map +1 -0
- package/dist/src/nile-side-bar-search/nile-side-bar-search.css.d.ts +15 -0
- package/dist/src/nile-side-bar-search/nile-side-bar-search.css.js +118 -0
- package/dist/src/nile-side-bar-search/nile-side-bar-search.css.js.map +1 -0
- package/dist/src/nile-side-bar-search/nile-side-bar-search.d.ts +56 -0
- package/dist/src/nile-side-bar-search/nile-side-bar-search.js +150 -0
- package/dist/src/nile-side-bar-search/nile-side-bar-search.js.map +1 -0
- package/dist/src/nile-side-bar-search/nile-side-bar-search.test.d.ts +3 -0
- package/dist/src/nile-side-bar-search/nile-side-bar-search.test.js +153 -0
- package/dist/src/nile-side-bar-search/nile-side-bar-search.test.js.map +1 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.css.js +7 -5
- package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/index.d.ts +2 -1
- package/dist/src/nile-wysiwyg-editor/index.js +1 -1
- package/dist/src/nile-wysiwyg-editor/index.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +77 -2
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.d.ts +20 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +37 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js +108 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js +3 -3
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/types.d.ts +8 -0
- package/dist/src/nile-wysiwyg-editor/types.js +50 -0
- package/dist/src/nile-wysiwyg-editor/types.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/version.cjs.js +1 -1
- package/dist/version.cjs.js.map +1 -1
- package/dist/version.esm.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +6 -0
- package/src/nile-app-shell/nile-app-shell.css.ts +70 -63
- package/src/nile-app-shell/nile-app-shell.test.ts +332 -1227
- package/src/nile-app-shell/nile-app-shell.ts +223 -44
- package/src/nile-app-shell/zz-layout.test.ts +271 -0
- package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.ts +1 -5
- package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts +24 -6
- package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts +62 -2
- package/src/nile-button-filter/nile-button-filter.css.ts +1 -1
- package/src/nile-button-filter/nile-button-filter.ts +1 -3
- package/src/nile-calendar/nile-calendar.css.ts +9 -8
- package/src/nile-color-picker/nile-color-picker.css.ts +3 -3
- package/src/nile-combobox/nile-combobox.css.ts +1 -1
- package/src/nile-command-menu-item/nile-command-menu-item.css.ts +5 -1
- package/src/nile-context-menu/nile-context-menu.css.ts +2 -4
- package/src/nile-dropdown-switcher/index.ts +1 -0
- package/src/nile-dropdown-switcher/nile-dropdown-switcher.css.ts +51 -0
- package/src/nile-dropdown-switcher/nile-dropdown-switcher.test.ts +570 -0
- package/src/nile-dropdown-switcher/nile-dropdown-switcher.ts +502 -0
- package/src/nile-dropdown-switcher-group/index.ts +1 -0
- package/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.css.ts +51 -0
- package/src/nile-dropdown-switcher-group/nile-dropdown-switcher-group.ts +78 -0
- package/src/nile-dropdown-switcher-header/index.ts +1 -0
- package/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.css.ts +105 -0
- package/src/nile-dropdown-switcher-header/nile-dropdown-switcher-header.ts +105 -0
- package/src/nile-dropdown-switcher-item/index.ts +1 -0
- package/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.ts +114 -0
- package/src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.ts +151 -0
- package/src/nile-empty-state/nile-empty-state.test.ts +24 -0
- package/src/nile-empty-state/nile-empty-state.ts +12 -2
- package/src/nile-filter-chip/nile-filter-chip.css.ts +2 -2
- package/src/nile-form-group/nile-form-group.css.ts +1 -1
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts +20 -4
- package/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.ts +1 -1
- package/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.ts +3 -3
- package/src/nile-markdown-editor/nile-markdown-editor.css.ts +4 -4
- package/src/nile-menu/nile-menu.css.ts +1 -2
- package/src/nile-menu-item/nile-menu-item.css.ts +4 -4
- package/src/nile-nav-tab/nile-nav-tab.css.ts +3 -3
- package/src/nile-nav-tab-group/nile-nav-tab-group.css.ts +15 -12
- package/src/nile-nav-tab-group/nile-nav-tab-group.test.ts +130 -0
- package/src/nile-option/nile-option.css.ts +2 -2
- package/src/nile-pagination/nile-pagination.css.ts +10 -0
- package/src/nile-pagination/nile-pagination.ts +14 -9
- package/src/nile-side-bar/nile-side-bar.css.ts +14 -12
- package/src/nile-side-bar/nile-side-bar.test.ts +1854 -2
- package/src/nile-side-bar/nile-side-bar.ts +72 -15
- package/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.ts +11 -4
- package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +8 -3
- package/src/nile-side-bar-footer/nile-side-bar-footer.ts +7 -5
- package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.ts +179 -23
- package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.test.ts +219 -0
- package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.ts +84 -2
- package/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.ts +8 -3
- package/src/nile-side-bar-group/nile-side-bar-group.css.ts +50 -7
- package/src/nile-side-bar-group/nile-side-bar-group.ts +100 -2
- package/src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts +52 -7
- package/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.ts +11 -2
- package/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.ts +22 -19
- package/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.ts +7 -4
- package/src/nile-side-bar-header/nile-side-bar-app-shell.test.ts +22 -17
- package/src/nile-side-bar-header/nile-side-bar-header-surface.test.ts +175 -0
- package/src/nile-side-bar-header/nile-side-bar-header.css.ts +10 -3
- package/src/nile-side-bar-header/nile-side-bar-header.ts +7 -5
- package/src/nile-side-bar-header-switcher/index.ts +1 -0
- package/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.css.ts +99 -0
- package/src/nile-side-bar-header-switcher/nile-side-bar-header-switcher.ts +88 -0
- package/src/nile-side-bar-search/index.ts +1 -0
- package/src/nile-side-bar-search/nile-side-bar-search.css.ts +120 -0
- package/src/nile-side-bar-search/nile-side-bar-search.test.ts +175 -0
- package/src/nile-side-bar-search/nile-side-bar-search.ts +160 -0
- package/src/nile-slide-toggle/nile-slide-toggle.css.ts +1 -1
- package/src/nile-tooltip/nile-tooltip.css.ts +7 -5
- package/src/nile-virtual-select/nile-virtual-select.css.ts +1 -1
- package/src/nile-wysiwyg-editor/index.ts +2 -1
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +78 -2
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.ts +132 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +40 -1
- package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.ts +3 -3
- package/src/nile-wysiwyg-editor/types.ts +52 -0
- package/test-timings.json +0 -1
- package/vscode-html-custom-data.json +372 -24
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-dropdown-switcher-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC","sourcesContent":["export { NileDropdownSwitcherItem } from './nile-dropdown-switcher-item';\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/** DropdownSwitcherItem CSS -- Default/Selected both render on bg-primary; only Hover gets bg-primary_hover. */
|
|
8
|
+
export declare const styles: import("lit").CSSResult;
|
|
9
|
+
declare const _default: import("lit").CSSResult[];
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { css } from 'lit';
|
|
8
|
+
/** DropdownSwitcherItem CSS -- Default/Selected both render on bg-primary; only Hover gets bg-primary_hover. */
|
|
9
|
+
export const styles = css `
|
|
10
|
+
:host {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
display: block;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host *,
|
|
16
|
+
:host *::before,
|
|
17
|
+
:host *::after {
|
|
18
|
+
box-sizing: inherit;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host([disabled]) {
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host(:focus-visible) {
|
|
26
|
+
outline: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.item {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
33
|
+
padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
34
|
+
border-radius: var(--nile-radius-sm, var(--ng-radius-sm));
|
|
35
|
+
background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host(:hover) .item,
|
|
40
|
+
:host(:focus-visible) .item {
|
|
41
|
+
background: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary-hover));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.item--disabled {
|
|
45
|
+
opacity: var(--nile-opacity-disabled, 0.5);
|
|
46
|
+
cursor: not-allowed;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.item__icon {
|
|
50
|
+
flex: 0 0 auto;
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
width: var(--nile-height-32px, var(--ng-height-32px));
|
|
55
|
+
height: var(--nile-height-32px, var(--ng-height-32px));
|
|
56
|
+
border-radius: var(--nile-radius-sm, var(--ng-radius-sm));
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* No icon slotted: collapse the tile so the label (and the flex gap) don't leave a blank 32px. */
|
|
61
|
+
.item__icon--empty {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
::slotted([slot='icon']) {
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.item__text {
|
|
71
|
+
flex: 1 1 auto;
|
|
72
|
+
min-width: 0;
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.item__label {
|
|
78
|
+
display: block;
|
|
79
|
+
white-space: nowrap;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
text-overflow: ellipsis;
|
|
82
|
+
font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
|
|
83
|
+
font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));
|
|
84
|
+
line-height: var(--nile-line-height-xs, var(--ng-line-height-text-xs));
|
|
85
|
+
font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));
|
|
86
|
+
color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.item__description {
|
|
90
|
+
display: block;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
|
|
95
|
+
font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));
|
|
96
|
+
line-height: var(--nile-line-height-xs, var(--ng-line-height-text-xs));
|
|
97
|
+
font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
|
|
98
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-quaternary-500));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.item__check {
|
|
102
|
+
flex: 0 0 auto;
|
|
103
|
+
display: inline-flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
width: var(--nile-height-16px, var(--ng-height-16px));
|
|
107
|
+
height: var(--nile-height-16px, var(--ng-height-16px));
|
|
108
|
+
color: var(--nile-colors-primary-600, var(--ng-colors-border-brand-alt));
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
111
|
+
export default [styles];
|
|
112
|
+
//# sourceMappingURL=nile-dropdown-switcher-item.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-dropdown-switcher-item.css.js","sourceRoot":"","sources":["../../../src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,gHAAgH;AAChH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqGxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2026\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/** DropdownSwitcherItem CSS -- Default/Selected both render on bg-primary; only Hover gets bg-primary_hover. */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n display: block;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n :host([disabled]) {\n pointer-events: none;\n }\n\n :host(:focus-visible) {\n outline: none;\n }\n\n .item {\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-md, var(--ng-spacing-md));\n padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-sm, var(--ng-spacing-sm));\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n cursor: pointer;\n }\n\n :host(:hover) .item,\n :host(:focus-visible) .item {\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary-hover));\n }\n\n .item--disabled {\n opacity: var(--nile-opacity-disabled, 0.5);\n cursor: not-allowed;\n }\n\n .item__icon {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-height-32px, var(--ng-height-32px));\n height: var(--nile-height-32px, var(--ng-height-32px));\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n overflow: hidden;\n }\n\n /* No icon slotted: collapse the tile so the label (and the flex gap) don't leave a blank 32px. */\n .item__icon--empty {\n display: none;\n }\n\n ::slotted([slot='icon']) {\n width: 100%;\n height: 100%;\n }\n\n .item__text {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n flex-direction: column;\n }\n\n .item__label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));\n line-height: var(--nile-line-height-xs, var(--ng-line-height-text-xs));\n font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n .item__description {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));\n line-height: var(--nile-line-height-xs, var(--ng-line-height-text-xs));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-quaternary-500));\n }\n\n .item__check {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-height-16px, var(--ng-height-16px));\n height: var(--nile-height-16px, var(--ng-height-16px));\n color: var(--nile-colors-primary-600, var(--ng-colors-border-brand-alt));\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { TemplateResult } from 'lit';
|
|
8
|
+
import NileElement from '../internal/nile-element';
|
|
9
|
+
import type { CSSResultGroup } from 'lit';
|
|
10
|
+
/**
|
|
11
|
+
* A single selectable row inside a `nile-dropdown-switcher`. Owns no public selection event or keyboard handling -- the parent owns both.
|
|
12
|
+
*
|
|
13
|
+
* @tag nile-dropdown-switcher-item
|
|
14
|
+
*
|
|
15
|
+
* @dependency nile-glyph
|
|
16
|
+
*
|
|
17
|
+
* @slot - The item's primary label. Overrides the `label` property when provided.
|
|
18
|
+
* @slot icon - The leading 32x32 icon tile. Expects a `<nile-glyph slot="icon">`. No space is reserved when empty.
|
|
19
|
+
* @slot description - Overrides the `description` property when provided.
|
|
20
|
+
*
|
|
21
|
+
* @csspart base - The component's base wrapper.
|
|
22
|
+
* @csspart icon - The 32x32 icon container.
|
|
23
|
+
* @csspart label - The primary label.
|
|
24
|
+
* @csspart description - The supporting text line.
|
|
25
|
+
* @csspart check - The trailing selected-state check icon.
|
|
26
|
+
*/
|
|
27
|
+
export declare class NileDropdownSwitcherItem extends NileElement {
|
|
28
|
+
static styles: CSSResultGroup;
|
|
29
|
+
private cachedTextLabel;
|
|
30
|
+
private readonly hasSlotController;
|
|
31
|
+
defaultSlot: HTMLSlotElement;
|
|
32
|
+
/** A unique value used to identify the item when it is selected. */
|
|
33
|
+
value: string;
|
|
34
|
+
/** The item's primary text. Use the default slot for rich content instead. */
|
|
35
|
+
label: string;
|
|
36
|
+
/** Optional supporting text shown under the label. Use the `description` slot for rich content. */
|
|
37
|
+
description: string;
|
|
38
|
+
/** Indicates whether this is the currently selected workspace/product. */
|
|
39
|
+
selected: boolean;
|
|
40
|
+
/** Draws the item in a disabled state, preventing selection. */
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
connectedCallback(): void;
|
|
43
|
+
_syncAria(): void;
|
|
44
|
+
private _handleDefaultSlotChange;
|
|
45
|
+
/** Returns the plain-text label, for the parent's keyboard/typeahead use if ever needed. */
|
|
46
|
+
getTextLabel(): string;
|
|
47
|
+
private _renderCheck;
|
|
48
|
+
render(): TemplateResult<1>;
|
|
49
|
+
}
|
|
50
|
+
export default NileDropdownSwitcherItem;
|
|
51
|
+
declare global {
|
|
52
|
+
interface HTMLElementTagNameMap {
|
|
53
|
+
'nile-dropdown-switcher-item': NileDropdownSwitcherItem;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { __decorate } from "tslib";
|
|
8
|
+
import { html, nothing } from 'lit';
|
|
9
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
10
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
11
|
+
import { styles } from './nile-dropdown-switcher-item.css';
|
|
12
|
+
import { getTextContent, HasSlotController } from '../internal/slot';
|
|
13
|
+
import { watch } from '../internal/watch';
|
|
14
|
+
import NileElement from '../internal/nile-element';
|
|
15
|
+
/**
|
|
16
|
+
* A single selectable row inside a `nile-dropdown-switcher`. Owns no public selection event or keyboard handling -- the parent owns both.
|
|
17
|
+
*
|
|
18
|
+
* @tag nile-dropdown-switcher-item
|
|
19
|
+
*
|
|
20
|
+
* @dependency nile-glyph
|
|
21
|
+
*
|
|
22
|
+
* @slot - The item's primary label. Overrides the `label` property when provided.
|
|
23
|
+
* @slot icon - The leading 32x32 icon tile. Expects a `<nile-glyph slot="icon">`. No space is reserved when empty.
|
|
24
|
+
* @slot description - Overrides the `description` property when provided.
|
|
25
|
+
*
|
|
26
|
+
* @csspart base - The component's base wrapper.
|
|
27
|
+
* @csspart icon - The 32x32 icon container.
|
|
28
|
+
* @csspart label - The primary label.
|
|
29
|
+
* @csspart description - The supporting text line.
|
|
30
|
+
* @csspart check - The trailing selected-state check icon.
|
|
31
|
+
*/
|
|
32
|
+
let NileDropdownSwitcherItem = class NileDropdownSwitcherItem extends NileElement {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
|
+
// Whitespace-aware: avoids incidental whitespace defeating the default slot's fallback to `label`.
|
|
36
|
+
this.hasSlotController = new HasSlotController(this, '[default]', 'icon', 'description');
|
|
37
|
+
/** A unique value used to identify the item when it is selected. */
|
|
38
|
+
this.value = '';
|
|
39
|
+
/** The item's primary text. Use the default slot for rich content instead. */
|
|
40
|
+
this.label = '';
|
|
41
|
+
/** Optional supporting text shown under the label. Use the `description` slot for rich content. */
|
|
42
|
+
this.description = '';
|
|
43
|
+
/** Indicates whether this is the currently selected workspace/product. */
|
|
44
|
+
this.selected = false;
|
|
45
|
+
/** Draws the item in a disabled state, preventing selection. */
|
|
46
|
+
this.disabled = false;
|
|
47
|
+
}
|
|
48
|
+
connectedCallback() {
|
|
49
|
+
super.connectedCallback();
|
|
50
|
+
this.setAttribute('role', 'menuitemradio');
|
|
51
|
+
if (!this.hasAttribute('tabindex')) {
|
|
52
|
+
this.setAttribute('tabindex', '-1');
|
|
53
|
+
}
|
|
54
|
+
this._syncAria();
|
|
55
|
+
}
|
|
56
|
+
_syncAria() {
|
|
57
|
+
this.setAttribute('aria-checked', this.selected ? 'true' : 'false');
|
|
58
|
+
this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');
|
|
59
|
+
}
|
|
60
|
+
_handleDefaultSlotChange() {
|
|
61
|
+
const textLabel = this.getTextLabel();
|
|
62
|
+
if (typeof this.cachedTextLabel === 'undefined') {
|
|
63
|
+
this.cachedTextLabel = textLabel;
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (textLabel !== this.cachedTextLabel) {
|
|
67
|
+
this.cachedTextLabel = textLabel;
|
|
68
|
+
this.emit('slotchange');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/** Returns the plain-text label, for the parent's keyboard/typeahead use if ever needed. */
|
|
72
|
+
getTextLabel() {
|
|
73
|
+
return getTextContent(this.defaultSlot);
|
|
74
|
+
}
|
|
75
|
+
_renderCheck() {
|
|
76
|
+
if (!this.selected)
|
|
77
|
+
return nothing;
|
|
78
|
+
return html `
|
|
79
|
+
<span part="check" class="item__check" aria-hidden="true">
|
|
80
|
+
<nile-glyph
|
|
81
|
+
name="ng-check"
|
|
82
|
+
method="stroke"
|
|
83
|
+
size="16"
|
|
84
|
+
color="currentColor"
|
|
85
|
+
></nile-glyph>
|
|
86
|
+
</span>
|
|
87
|
+
`;
|
|
88
|
+
}
|
|
89
|
+
render() {
|
|
90
|
+
return html `
|
|
91
|
+
<div
|
|
92
|
+
part="base"
|
|
93
|
+
class=${classMap({
|
|
94
|
+
item: true,
|
|
95
|
+
'item--selected': this.selected,
|
|
96
|
+
'item--disabled': this.disabled,
|
|
97
|
+
})}
|
|
98
|
+
>
|
|
99
|
+
<span
|
|
100
|
+
part="icon"
|
|
101
|
+
class=${classMap({
|
|
102
|
+
item__icon: true,
|
|
103
|
+
'item__icon--empty': !this.hasSlotController.test('icon'),
|
|
104
|
+
})}
|
|
105
|
+
>
|
|
106
|
+
<slot name="icon"></slot>
|
|
107
|
+
</span>
|
|
108
|
+
|
|
109
|
+
<span class="item__text">
|
|
110
|
+
<span part="label" class="item__label">
|
|
111
|
+
<slot class="item__label-slot" @slotchange=${this._handleDefaultSlotChange}></slot
|
|
112
|
+
>${this.hasSlotController.test('[default]') ? nothing : this.label}
|
|
113
|
+
</span>
|
|
114
|
+
|
|
115
|
+
${this.description || this.hasSlotController.test('description')
|
|
116
|
+
? html `<span part="description" class="item__description">
|
|
117
|
+
<slot name="description">${this.description}</slot>
|
|
118
|
+
</span>`
|
|
119
|
+
: nothing}
|
|
120
|
+
</span>
|
|
121
|
+
|
|
122
|
+
${this._renderCheck()}
|
|
123
|
+
</div>
|
|
124
|
+
`;
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
NileDropdownSwitcherItem.styles = styles;
|
|
128
|
+
__decorate([
|
|
129
|
+
query('.item__label-slot')
|
|
130
|
+
], NileDropdownSwitcherItem.prototype, "defaultSlot", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
property({ attribute: true, reflect: true })
|
|
133
|
+
], NileDropdownSwitcherItem.prototype, "value", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
property({ attribute: true })
|
|
136
|
+
], NileDropdownSwitcherItem.prototype, "label", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
property({ attribute: true })
|
|
139
|
+
], NileDropdownSwitcherItem.prototype, "description", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
property({ type: Boolean, attribute: true, reflect: true })
|
|
142
|
+
], NileDropdownSwitcherItem.prototype, "selected", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
property({ type: Boolean, attribute: true, reflect: true })
|
|
145
|
+
], NileDropdownSwitcherItem.prototype, "disabled", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
watch(['selected', 'disabled'])
|
|
148
|
+
], NileDropdownSwitcherItem.prototype, "_syncAria", null);
|
|
149
|
+
NileDropdownSwitcherItem = __decorate([
|
|
150
|
+
customElement('nile-dropdown-switcher-item')
|
|
151
|
+
], NileDropdownSwitcherItem);
|
|
152
|
+
export { NileDropdownSwitcherItem };
|
|
153
|
+
export default NileDropdownSwitcherItem;
|
|
154
|
+
//# sourceMappingURL=nile-dropdown-switcher-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-dropdown-switcher-item.js","sourceRoot":"","sources":["../../../src/nile-dropdown-switcher-item/nile-dropdown-switcher-item.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;;;;;;;;;;;;GAgBG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,WAAW;IAAlD;;QAKL,mGAAmG;QAClF,sBAAiB,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;QAIrG,oEAAoE;QACtB,UAAK,GAAG,EAAE,CAAC;QAEzD,8EAA8E;QAC/C,UAAK,GAAG,EAAE,CAAC;QAE1C,mGAAmG;QACpE,gBAAW,GAAG,EAAE,CAAC;QAEhD,0EAA0E;QACb,aAAQ,GAAG,KAAK,CAAC;QAE9E,gEAAgE;QACH,aAAQ,GAAG,KAAK,CAAC;IAqFhF,CAAC;IAnFC,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC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ourcesContent":["/**\n * Copyright Aquera Inc 2026\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, nothing, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-dropdown-switcher-item.css';\nimport { getTextContent, HasSlotController } from '../internal/slot';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * A single selectable row inside a `nile-dropdown-switcher`. Owns no public selection event or keyboard handling -- the parent owns both.\n *\n * @tag nile-dropdown-switcher-item\n *\n * @dependency nile-glyph\n *\n * @slot - The item's primary label. Overrides the `label` property when provided.\n * @slot icon - The leading 32x32 icon tile. Expects a `<nile-glyph slot=\"icon\">`. No space is reserved when empty.\n * @slot description - Overrides the `description` property when provided.\n *\n * @csspart base - The component's base wrapper.\n * @csspart icon - The 32x32 icon container.\n * @csspart label - The primary label.\n * @csspart description - The supporting text line.\n * @csspart check - The trailing selected-state check icon.\n */\n@customElement('nile-dropdown-switcher-item')\nexport class NileDropdownSwitcherItem extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private cachedTextLabel: string;\n\n // Whitespace-aware: avoids incidental whitespace defeating the default slot's fallback to `label`.\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'icon', 'description');\n\n @query('.item__label-slot') defaultSlot: HTMLSlotElement;\n\n /** A unique value used to identify the item when it is selected. */\n @property({ attribute: true, reflect: true }) value = '';\n\n /** The item's primary text. Use the default slot for rich content instead. */\n @property({ attribute: true }) label = '';\n\n /** Optional supporting text shown under the label. Use the `description` slot for rich content. */\n @property({ attribute: true }) description = '';\n\n /** Indicates whether this is the currently selected workspace/product. */\n @property({ type: Boolean, attribute: true, reflect: true }) selected = false;\n\n /** Draws the item in a disabled state, preventing selection. */\n @property({ type: Boolean, attribute: true, reflect: true }) disabled = false;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('role', 'menuitemradio');\n if (!this.hasAttribute('tabindex')) {\n this.setAttribute('tabindex', '-1');\n }\n this._syncAria();\n }\n\n @watch(['selected', 'disabled'])\n _syncAria(): void {\n this.setAttribute('aria-checked', this.selected ? 'true' : 'false');\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n private _handleDefaultSlotChange(): void {\n const textLabel = this.getTextLabel();\n if (typeof this.cachedTextLabel === 'undefined') {\n this.cachedTextLabel = textLabel;\n return;\n }\n if (textLabel !== this.cachedTextLabel) {\n this.cachedTextLabel = textLabel;\n this.emit('slotchange');\n }\n }\n\n /** Returns the plain-text label, for the parent's keyboard/typeahead use if ever needed. */\n getTextLabel(): string {\n return getTextContent(this.defaultSlot);\n }\n\n private _renderCheck(): TemplateResult | typeof nothing {\n if (!this.selected) return nothing;\n return html`\n <span part=\"check\" class=\"item__check\" aria-hidden=\"true\">\n <nile-glyph\n name=\"ng-check\"\n method=\"stroke\"\n size=\"16\"\n color=\"currentColor\"\n ></nile-glyph>\n </span>\n `;\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n item: true,\n 'item--selected': this.selected,\n 'item--disabled': this.disabled,\n })}\n >\n <span\n part=\"icon\"\n class=${classMap({\n item__icon: true,\n 'item__icon--empty': !this.hasSlotController.test('icon'),\n })}\n >\n <slot name=\"icon\"></slot>\n </span>\n\n <span class=\"item__text\">\n <span part=\"label\" class=\"item__label\">\n <slot class=\"item__label-slot\" @slotchange=${this._handleDefaultSlotChange}></slot\n >${this.hasSlotController.test('[default]') ? nothing : this.label}\n </span>\n\n ${this.description || this.hasSlotController.test('description')\n ? html`<span part=\"description\" class=\"item__description\">\n <slot name=\"description\">${this.description}</slot>\n </span>`\n : nothing}\n </span>\n\n ${this._renderCheck()}\n </div>\n `;\n }\n}\n\nexport default NileDropdownSwitcherItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-dropdown-switcher-item': NileDropdownSwitcherItem;\n }\n}\n"]}
|
|
@@ -12,6 +12,8 @@ export type NileEmptyStateStatus = 'empty' | 'no-results' | 'not-found' | 'no-ac
|
|
|
12
12
|
export type NileEmptyStateTone = 'neutral' | 'info' | 'warning' | 'error';
|
|
13
13
|
/** What shape the state occupies. */
|
|
14
14
|
export type NileEmptyStateLayout = 'stack' | 'inline' | 'page';
|
|
15
|
+
/** How the glyph is drawn: outlined (`stroke`, the default) or filled (`fill`). */
|
|
16
|
+
export type NileEmptyStateIconMethod = 'stroke' | 'fill';
|
|
15
17
|
/**
|
|
16
18
|
* Nile empty-state component.
|
|
17
19
|
*
|
|
@@ -37,6 +39,7 @@ export declare class NileEmptyState extends NileElement {
|
|
|
37
39
|
*/
|
|
38
40
|
svgIconSize?: number;
|
|
39
41
|
svgIconColor: string;
|
|
42
|
+
iconMethod: NileEmptyStateIconMethod;
|
|
40
43
|
private _icon?;
|
|
41
44
|
private _text?;
|
|
42
45
|
private _subText?;
|
|
@@ -53,6 +56,8 @@ export declare class NileEmptyState extends NileElement {
|
|
|
53
56
|
set tone(value: NileEmptyStateTone | null);
|
|
54
57
|
/** The preset backing the current `status`, or undefined when none is set. */
|
|
55
58
|
private get preset();
|
|
59
|
+
/** `fill` only when asked for explicitly; anything else keeps today's `stroke`. */
|
|
60
|
+
private get glyphMethod();
|
|
56
61
|
private get glyphColor();
|
|
57
62
|
/** ARIA wiring */
|
|
58
63
|
private get liveRegion();
|
|
@@ -59,6 +59,7 @@ let NileEmptyState = class NileEmptyState extends NileElement {
|
|
|
59
59
|
this.variant = 'tonal';
|
|
60
60
|
this.layout = 'stack';
|
|
61
61
|
this.bordered = false;
|
|
62
|
+
this.iconMethod = 'stroke';
|
|
62
63
|
/* #endregion */
|
|
63
64
|
}
|
|
64
65
|
/**
|
|
@@ -108,6 +109,10 @@ let NileEmptyState = class NileEmptyState extends NileElement {
|
|
|
108
109
|
get preset() {
|
|
109
110
|
return this.status ? STATUS_PRESETS[this.status] : undefined;
|
|
110
111
|
}
|
|
112
|
+
/** `fill` only when asked for explicitly; anything else keeps today's `stroke`. */
|
|
113
|
+
get glyphMethod() {
|
|
114
|
+
return this.iconMethod === 'fill' ? 'fill' : 'stroke';
|
|
115
|
+
}
|
|
111
116
|
get glyphColor() {
|
|
112
117
|
return this.svgIconColor ?? TONE_GLYPH_COLOR[this.tone];
|
|
113
118
|
}
|
|
@@ -120,18 +125,19 @@ let NileEmptyState = class NileEmptyState extends NileElement {
|
|
|
120
125
|
}
|
|
121
126
|
renderGlyph(size) {
|
|
122
127
|
const color = this.glyphColor;
|
|
128
|
+
const method = this.glyphMethod;
|
|
123
129
|
return this.svgIconUrl ? html `
|
|
124
130
|
<nile-glyph
|
|
125
131
|
customSvgPath="${this.svgIconUrl}"
|
|
126
132
|
size="${this.svgIconSize ?? size}"
|
|
127
|
-
method="
|
|
133
|
+
method="${method}"
|
|
128
134
|
color="${ifDefined(color)}"
|
|
129
135
|
noFill
|
|
130
136
|
></nile-glyph>
|
|
131
137
|
` : html `
|
|
132
138
|
<nile-glyph
|
|
133
139
|
name="${this.icon}"
|
|
134
|
-
method="
|
|
140
|
+
method="${method}"
|
|
135
141
|
size="${size}"
|
|
136
142
|
color="${ifDefined(color)}"
|
|
137
143
|
></nile-glyph>
|
|
@@ -230,6 +236,9 @@ __decorate([
|
|
|
230
236
|
__decorate([
|
|
231
237
|
property({ type: String, attribute: true })
|
|
232
238
|
], NileEmptyState.prototype, "svgIconColor", void 0);
|
|
239
|
+
__decorate([
|
|
240
|
+
property({ type: String, attribute: true })
|
|
241
|
+
], NileEmptyState.prototype, "iconMethod", void 0);
|
|
233
242
|
__decorate([
|
|
234
243
|
property({ type: String, attribute: true })
|
|
235
244
|
], NileEmptyState.prototype, "icon", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-empty-state.js","sourceRoot":"","sources":["../../../src/nile-empty-state/nile-empty-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAE,OA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AAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, nothing, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-empty-state.css';\nimport NileElement from '../internal/nile-element';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\n/** What happened. Selects an icon, tone, default copy and ARIA role. */\nexport type NileEmptyStateStatus =\n | 'empty'\n | 'no-results'\n | 'not-found'\n | 'no-access'\n | 'error'\n | 'offline';\n\n/** How loud the state looks. Defaults from `status`, always overridable. */\nexport type NileEmptyStateTone = 'neutral' | 'info' | 'warning' | 'error';\n\n/** What shape the state occupies. */\nexport type NileEmptyStateLayout = 'stack' | 'inline' | 'page';\n\ninterface StatusPreset {\n icon: string;\n tone: NileEmptyStateTone;\n text: string;\n subText: string;\n role: 'status' | 'alert';\n live: 'polite' | 'assertive';\n}\n\nconst STATUS_PRESETS: Record<NileEmptyStateStatus, StatusPreset> = {\n 'empty': {\n icon: 'ng-database', tone: 'neutral', role: 'status', live: 'polite',\n text: 'No data yet', subText: `Rows appear here once there's something to show.`,\n },\n 'no-results': {\n icon: 'ng-search-lg', tone: 'neutral', role: 'status', live: 'polite',\n text: 'No matches', subText: 'Try removing a filter or broadening your search.',\n },\n 'not-found': {\n icon: 'ng-file-06', tone: 'warning', role: 'status', live: 'polite',\n text: `We couldn't find that`, subText: 'It may have been moved or deleted.',\n },\n 'no-access': {\n icon: 'ng-lock', tone: 'warning', role: 'status', live: 'polite',\n text: `You don't have access`, subText: 'Ask an admin to grant you access to this resource.',\n },\n 'error': {\n icon: 'ng-alert-circle', tone: 'error', role: 'alert', live: 'assertive',\n text: 'Something went wrong', subText: `We couldn't load this. Try again.`,\n },\n 'offline': {\n icon: 'ng-cloud-off', tone: 'error', role: 'alert', live: 'assertive',\n text: 'Connection lost', subText: 'Check your connection and try again.',\n },\n};\n\nconst TONE_GLYPH_COLOR: Record<NileEmptyStateTone, string | undefined> = {\n neutral: undefined,\n info: 'var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600))',\n warning: 'var(--nile-colors-yellow-700, var(--ng-colors-fg-warning-primary))',\n error: 'var(--nile-colors-red-700, var(--ng-colors-fg-error-primary))',\n};\n\nconst DEFAULT_ICON = 'ng-x-circle';\nconst DEFAULT_TEXT = 'Empty State';\nconst DEFAULT_SUB_TEXT = 'No Data';\n\n/**\n * Nile empty-state component.\n *\n * @tag nile-empty-state\n *\n */\n@customElement('nile-empty-state')\nexport class NileEmptyState extends NileElement {\n\n /**\n * The styles for nile-empty-state\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: String, attribute: true }) size: 'sm' | 'md' | 'lg' = 'md';\n\n @property({ type: String, attribute: true }) variant:\n | 'flat'\n | 'content'\n | 'tonal' = 'tonal';\n\n @property({ type: String, attribute: true, reflect: true }) status?: NileEmptyStateStatus;\n @property({ type: String, attribute: true, reflect: true }) layout: NileEmptyStateLayout = 'stack';\n @property({ type: String, attribute: true }) code?: string;\n @property({ type: Boolean, attribute: true, reflect: true }) bordered: boolean = false;\n @property({ type: String, attribute: true }) svgIconUrl: string;\n /**\n * Overrides the layout-driven glyph size for a custom `svgIconUrl`. Left unset,\n * the SVG matches whatever size the current variant/layout draws at.\n */\n @property({ type: Number, attribute: true }) svgIconSize?: number;\n @property({ type: String, attribute: true }) svgIconColor: string;\n\n private _icon?: string;\n private _text?: string;\n private _subText?: string;\n private _tone?: NileEmptyStateTone;\n @property({ type: String, attribute: true })\n get icon(): string {\n return this._icon ?? this.preset?.icon ?? DEFAULT_ICON;\n }\n\n set icon(value: string | null) {\n const old = this.icon;\n this._icon = value ?? undefined;\n this.requestUpdate('icon', old);\n }\n\n /** Headline. Resolves through the `status` preset to `DEFAULT_TEXT`. */\n @property({ type: String, attribute: true })\n get text(): string {\n return this._text ?? this.preset?.text ?? DEFAULT_TEXT;\n }\n\n set text(value: string | null) {\n const old = this.text;\n this._text = value ?? undefined;\n this.requestUpdate('text', old);\n }\n\n /** Supporting line. Resolves through the `status` preset to `DEFAULT_SUB_TEXT`. */\n @property({ type: String, attribute: 'sub-text' })\n get subText(): string {\n return this._subText ?? this.preset?.subText ?? DEFAULT_SUB_TEXT;\n }\n\n set subText(value: string | null) {\n const old = this.subText;\n this._subText = value ?? undefined;\n this.requestUpdate('subText', old);\n }\n\n @property({ type: String, attribute: true, reflect: true })\n get tone(): NileEmptyStateTone {\n return this._tone ?? this.preset?.tone ?? 'neutral';\n }\n\n set tone(value: NileEmptyStateTone | null) {\n const old = this.tone;\n this._tone = value ?? undefined;\n this.requestUpdate('tone', old);\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /** The preset backing the current `status`, or undefined when none is set. */\n private get preset(): StatusPreset | undefined {\n return this.status ? STATUS_PRESETS[this.status] : undefined;\n }\n\n private get glyphColor(): string | undefined {\n return this.svgIconColor ?? TONE_GLYPH_COLOR[this.tone];\n }\n\n /** ARIA wiring */\n private get liveRegion(): { role: string; live: string } | undefined {\n const preset = this.preset;\n if (!preset) return undefined;\n return { role: preset.role, live: preset.live };\n }\n\n private renderGlyph(size: number | string): TemplateResult {\n const color = this.glyphColor;\n return this.svgIconUrl ? html`\n <nile-glyph\n customSvgPath=\"${this.svgIconUrl}\"\n size=\"${this.svgIconSize ?? size}\"\n method=\"stroke\"\n color=\"${ifDefined(color)}\"\n noFill\n ></nile-glyph>\n ` : html`\n <nile-glyph\n name=\"${this.icon}\"\n method=\"stroke\"\n size=\"${size}\"\n color=\"${ifDefined(color)}\"\n ></nile-glyph>\n `;\n }\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n const live = this.liveRegion;\n const inline = this.layout === 'inline';\n\n return html`\n <div part=\"container\" class=\"${classMap({\n 'empty-state': true,\n 'empty-state--sm': this.size == 'sm',\n 'empty-state--md': this.size == 'md',\n 'empty-state--lg': this.size == 'lg',\n 'empty-state--stack': this.layout === 'stack',\n 'empty-state--inline': inline,\n 'empty-state--page': this.layout === 'page',\n 'empty-state--bordered': this.bordered,\n [`empty-state--tone-${this.tone}`]: true,\n })}\"\n role=\"${ifDefined(live?.role)}\"\n aria-live=\"${ifDefined(live?.live)}\"\n >\n <div part=\"body\" class=\"${classMap({ 'empty-state__body': true })}\">\n\n ${inline ? html`\n <span part=\"inline-icon icon-chrome\" class=\"empty-state__body--inline\">\n ${this.renderGlyph(20)}\n </span>` : nothing\n }\n\n ${!inline && this.variant == 'content' ? html`\n <div part=\"content-image\" class=\"empty-state__body--content\">\n ${!this.icon && !this.svgIconUrl ? nothing : html`\n <div part=\"icon-wrapper icon-chrome\" class=\"empty-state__img__icon\">\n ${\n this.renderGlyph(this.size == 'lg' ? 28 : 24)}\n </div>`\n }\n </div>`: nothing\n }\n\n ${!inline && this.variant == 'tonal' ? html`\n <div part=\"tonal-body icon-chrome\" class=\"empty-state__body--tonal\">\n ${this.renderGlyph(40)}\n </div>`: nothing\n }\n\n ${!inline && this.variant == 'flat' ? html`\n <div part=\"flat-body\" class=\"empty-state__body--flat\">\n\t\t\t\t\t<span part=\"icon-chrome\" class=\"nile-flat-type-icon\">\n\t\t\t\t\t\t${this.renderGlyph(this.size == 'lg' ? 28 : 24)}\n\t\t\t\t\t</span>\n </div>`: nothing\n }\n\n <div part=\"text-section\" class=\"empty__state__text-section\">\n ${this.code ? html`\n <div part=\"code\" class=\"empty-state__code\">${this.code}</div>\n ` : nothing}\n <div part=\"text\" class=\"empty-state__text\">${this.text}</div>\n <div part=\"subtitle\" class=\"empty-state__subtext\">${this.subText}</div>\n </div>\n </div>\n\n <div part=\"actions\" class=\"empty-state-actions\">\n <slot></slot>\n </div>\n\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileEmptyState;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-empty-state':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,IAAI,EAAE,CAAC;kDAAiD;AAO7F;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;0CAG3C;AAUD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;0CAG3C;AAUD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;6CAGjD;AASD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAG1D;AAxEU,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAwM1B;;AAED,eAAe,cAAc,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, nothing, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-empty-state.css';\nimport NileElement from '../internal/nile-element';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\n/** What happened. Selects an icon, tone, default copy and ARIA role. */\nexport type NileEmptyStateStatus =\n | 'empty'\n | 'no-results'\n | 'not-found'\n | 'no-access'\n | 'error'\n | 'offline';\n\n/** How loud the state looks. Defaults from `status`, always overridable. */\nexport type NileEmptyStateTone = 'neutral' | 'info' | 'warning' | 'error';\n\n/** What shape the state occupies. */\nexport type NileEmptyStateLayout = 'stack' | 'inline' | 'page';\n\n/** How the glyph is drawn: outlined (`stroke`, the default) or filled (`fill`). */\nexport type NileEmptyStateIconMethod = 'stroke' | 'fill';\n\ninterface StatusPreset {\n icon: string;\n tone: NileEmptyStateTone;\n text: string;\n subText: string;\n role: 'status' | 'alert';\n live: 'polite' | 'assertive';\n}\n\nconst STATUS_PRESETS: Record<NileEmptyStateStatus, StatusPreset> = {\n 'empty': {\n icon: 'ng-database', tone: 'neutral', role: 'status', live: 'polite',\n text: 'No data yet', subText: `Rows appear here once there's something to show.`,\n },\n 'no-results': {\n icon: 'ng-search-lg', tone: 'neutral', role: 'status', live: 'polite',\n text: 'No matches', subText: 'Try removing a filter or broadening your search.',\n },\n 'not-found': {\n icon: 'ng-file-06', tone: 'warning', role: 'status', live: 'polite',\n text: `We couldn't find that`, subText: 'It may have been moved or deleted.',\n },\n 'no-access': {\n icon: 'ng-lock', tone: 'warning', role: 'status', live: 'polite',\n text: `You don't have access`, subText: 'Ask an admin to grant you access to this resource.',\n },\n 'error': {\n icon: 'ng-alert-circle', tone: 'error', role: 'alert', live: 'assertive',\n text: 'Something went wrong', subText: `We couldn't load this. Try again.`,\n },\n 'offline': {\n icon: 'ng-cloud-off', tone: 'error', role: 'alert', live: 'assertive',\n text: 'Connection lost', subText: 'Check your connection and try again.',\n },\n};\n\nconst TONE_GLYPH_COLOR: Record<NileEmptyStateTone, string | undefined> = {\n neutral: undefined,\n info: 'var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600))',\n warning: 'var(--nile-colors-yellow-700, var(--ng-colors-fg-warning-primary))',\n error: 'var(--nile-colors-red-700, var(--ng-colors-fg-error-primary))',\n};\n\nconst DEFAULT_ICON = 'ng-x-circle';\nconst DEFAULT_TEXT = 'Empty State';\nconst DEFAULT_SUB_TEXT = 'No Data';\n\n/**\n * Nile empty-state component.\n *\n * @tag nile-empty-state\n *\n */\n@customElement('nile-empty-state')\nexport class NileEmptyState extends NileElement {\n\n /**\n * The styles for nile-empty-state\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: String, attribute: true }) size: 'sm' | 'md' | 'lg' = 'md';\n\n @property({ type: String, attribute: true }) variant:\n | 'flat'\n | 'content'\n | 'tonal' = 'tonal';\n\n @property({ type: String, attribute: true, reflect: true }) status?: NileEmptyStateStatus;\n @property({ type: String, attribute: true, reflect: true }) layout: NileEmptyStateLayout = 'stack';\n @property({ type: String, attribute: true }) code?: string;\n @property({ type: Boolean, attribute: true, reflect: true }) bordered: boolean = false;\n @property({ type: String, attribute: true }) svgIconUrl: string;\n /**\n * Overrides the layout-driven glyph size for a custom `svgIconUrl`. Left unset,\n * the SVG matches whatever size the current variant/layout draws at.\n */\n @property({ type: Number, attribute: true }) svgIconSize?: number;\n @property({ type: String, attribute: true }) svgIconColor: string;\n @property({ type: String, attribute: true }) iconMethod: NileEmptyStateIconMethod = 'stroke';\n\n private _icon?: string;\n private _text?: string;\n private _subText?: string;\n private _tone?: NileEmptyStateTone;\n @property({ type: String, attribute: true })\n get icon(): string {\n return this._icon ?? this.preset?.icon ?? DEFAULT_ICON;\n }\n\n set icon(value: string | null) {\n const old = this.icon;\n this._icon = value ?? undefined;\n this.requestUpdate('icon', old);\n }\n\n /** Headline. Resolves through the `status` preset to `DEFAULT_TEXT`. */\n @property({ type: String, attribute: true })\n get text(): string {\n return this._text ?? this.preset?.text ?? DEFAULT_TEXT;\n }\n\n set text(value: string | null) {\n const old = this.text;\n this._text = value ?? undefined;\n this.requestUpdate('text', old);\n }\n\n /** Supporting line. Resolves through the `status` preset to `DEFAULT_SUB_TEXT`. */\n @property({ type: String, attribute: 'sub-text' })\n get subText(): string {\n return this._subText ?? this.preset?.subText ?? DEFAULT_SUB_TEXT;\n }\n\n set subText(value: string | null) {\n const old = this.subText;\n this._subText = value ?? undefined;\n this.requestUpdate('subText', old);\n }\n\n @property({ type: String, attribute: true, reflect: true })\n get tone(): NileEmptyStateTone {\n return this._tone ?? this.preset?.tone ?? 'neutral';\n }\n\n set tone(value: NileEmptyStateTone | null) {\n const old = this.tone;\n this._tone = value ?? undefined;\n this.requestUpdate('tone', old);\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /** The preset backing the current `status`, or undefined when none is set. */\n private get preset(): StatusPreset | undefined {\n return this.status ? STATUS_PRESETS[this.status] : undefined;\n }\n\n /** `fill` only when asked for explicitly; anything else keeps today's `stroke`. */\n private get glyphMethod(): NileEmptyStateIconMethod {\n return this.iconMethod === 'fill' ? 'fill' : 'stroke';\n }\n\n private get glyphColor(): string | undefined {\n return this.svgIconColor ?? TONE_GLYPH_COLOR[this.tone];\n }\n\n /** ARIA wiring */\n private get liveRegion(): { role: string; live: string } | undefined {\n const preset = this.preset;\n if (!preset) return undefined;\n return { role: preset.role, live: preset.live };\n }\n\n private renderGlyph(size: number | string): TemplateResult {\n const color = this.glyphColor;\n const method = this.glyphMethod;\n return this.svgIconUrl ? html`\n <nile-glyph\n customSvgPath=\"${this.svgIconUrl}\"\n size=\"${this.svgIconSize ?? size}\"\n method=\"${method}\"\n color=\"${ifDefined(color)}\"\n noFill\n ></nile-glyph>\n ` : html`\n <nile-glyph\n name=\"${this.icon}\"\n method=\"${method}\"\n size=\"${size}\"\n color=\"${ifDefined(color)}\"\n ></nile-glyph>\n `;\n }\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n const live = this.liveRegion;\n const inline = this.layout === 'inline';\n\n return html`\n <div part=\"container\" class=\"${classMap({\n 'empty-state': true,\n 'empty-state--sm': this.size == 'sm',\n 'empty-state--md': this.size == 'md',\n 'empty-state--lg': this.size == 'lg',\n 'empty-state--stack': this.layout === 'stack',\n 'empty-state--inline': inline,\n 'empty-state--page': this.layout === 'page',\n 'empty-state--bordered': this.bordered,\n [`empty-state--tone-${this.tone}`]: true,\n })}\"\n role=\"${ifDefined(live?.role)}\"\n aria-live=\"${ifDefined(live?.live)}\"\n >\n <div part=\"body\" class=\"${classMap({ 'empty-state__body': true })}\">\n\n ${inline ? html`\n <span part=\"inline-icon icon-chrome\" class=\"empty-state__body--inline\">\n ${this.renderGlyph(20)}\n </span>` : nothing\n }\n\n ${!inline && this.variant == 'content' ? html`\n <div part=\"content-image\" class=\"empty-state__body--content\">\n ${!this.icon && !this.svgIconUrl ? nothing : html`\n <div part=\"icon-wrapper icon-chrome\" class=\"empty-state__img__icon\">\n ${\n this.renderGlyph(this.size == 'lg' ? 28 : 24)}\n </div>`\n }\n </div>`: nothing\n }\n\n ${!inline && this.variant == 'tonal' ? html`\n <div part=\"tonal-body icon-chrome\" class=\"empty-state__body--tonal\">\n ${this.renderGlyph(40)}\n </div>`: nothing\n }\n\n ${!inline && this.variant == 'flat' ? html`\n <div part=\"flat-body\" class=\"empty-state__body--flat\">\n\t\t\t\t\t<span part=\"icon-chrome\" class=\"nile-flat-type-icon\">\n\t\t\t\t\t\t${this.renderGlyph(this.size == 'lg' ? 28 : 24)}\n\t\t\t\t\t</span>\n </div>`: nothing\n }\n\n <div part=\"text-section\" class=\"empty__state__text-section\">\n ${this.code ? html`\n <div part=\"code\" class=\"empty-state__code\">${this.code}</div>\n ` : nothing}\n <div part=\"text\" class=\"empty-state__text\">${this.text}</div>\n <div part=\"subtitle\" class=\"empty-state__subtext\">${this.subText}</div>\n </div>\n </div>\n\n <div part=\"actions\" class=\"empty-state-actions\">\n <slot></slot>\n </div>\n\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileEmptyState;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-empty-state': NileEmptyState;\n }\n}\n"]}
|
|
@@ -278,5 +278,36 @@ describe('NileEmptyState', () => {
|
|
|
278
278
|
it('190. svgIconSize overrides the layout size', async () => { const el = await fixture(html `<nile-empty-state layout="inline" svgIconUrl="/p.svg" .svgIconSize=${60}></nile-empty-state>`); expect(glyph(el).getAttribute('size')).to.equal('60'); });
|
|
279
279
|
it('191. svgIconSize does not affect a catalogue glyph', async () => { const el = await fixture(html `<nile-empty-state layout="inline" .svgIconSize=${60}></nile-empty-state>`); expect(glyph(el).getAttribute('size')).to.equal('20'); });
|
|
280
280
|
it('165. full new-API integration', async () => { const el = await fixture(html `<nile-empty-state status="not-found" layout="page" size="lg" code="Error 404" bordered><button>Go back</button></nile-empty-state>`); expect(el.text).to.contain(`couldn't find that`); expect(el.tone).to.equal('warning'); expect(container(el).getAttribute('role')).to.equal('status'); expect(container(el).classList.contains('empty-state--page')).to.be.true; expect(container(el).classList.contains('empty-state--bordered')).to.be.true; expect(el.shadowRoot.querySelector('[part="code"]').textContent).to.contain('Error 404'); expect(el.querySelector('button')).to.exist; });
|
|
281
|
+
// iconMethod: stroke stays the default everywhere; fill is opt-in.
|
|
282
|
+
it('192. iconMethod defaults to stroke', async () => { const el = await fixture(html `<nile-empty-state></nile-empty-state>`); expect(el.iconMethod).to.equal('stroke'); });
|
|
283
|
+
it('193. default glyph method is stroke in every variant and layout', async () => {
|
|
284
|
+
for (const t of [
|
|
285
|
+
html `<nile-empty-state variant="tonal"></nile-empty-state>`,
|
|
286
|
+
html `<nile-empty-state variant="content"></nile-empty-state>`,
|
|
287
|
+
html `<nile-empty-state variant="flat"></nile-empty-state>`,
|
|
288
|
+
html `<nile-empty-state layout="inline"></nile-empty-state>`,
|
|
289
|
+
html `<nile-empty-state svgIconUrl="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'/%3E"></nile-empty-state>`,
|
|
290
|
+
]) {
|
|
291
|
+
const el = await fixture(t);
|
|
292
|
+
expect(glyph(el).getAttribute('method')).to.equal('stroke');
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
it('194. iconMethod is not reflected, so existing hosts gain no attribute', async () => { const el = await fixture(html `<nile-empty-state></nile-empty-state>`); expect(el.hasAttribute('iconmethod')).to.be.false; });
|
|
296
|
+
it('195. iconMethod="fill" passes method="fill" in every variant and layout', async () => {
|
|
297
|
+
for (const t of [
|
|
298
|
+
html `<nile-empty-state iconMethod="fill" variant="tonal"></nile-empty-state>`,
|
|
299
|
+
html `<nile-empty-state iconMethod="fill" variant="content"></nile-empty-state>`,
|
|
300
|
+
html `<nile-empty-state iconMethod="fill" variant="flat"></nile-empty-state>`,
|
|
301
|
+
html `<nile-empty-state iconMethod="fill" layout="inline"></nile-empty-state>`,
|
|
302
|
+
]) {
|
|
303
|
+
const el = await fixture(t);
|
|
304
|
+
expect(glyph(el).getAttribute('method')).to.equal('fill');
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
it('196. iconMethod="fill" with svgIconUrl keeps noFill so the SVG keeps its own colours', async () => { const el = await fixture(html `<nile-empty-state iconMethod="fill" svgIconUrl="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'/%3E"></nile-empty-state>`); expect(glyph(el).getAttribute('method')).to.equal('fill'); expect(glyph(el).hasAttribute('nofill')).to.be.true; });
|
|
308
|
+
it('197. unknown iconMethod falls back to stroke', async () => { const el = await fixture(html `<nile-empty-state iconMethod="bogus"></nile-empty-state>`); expect(glyph(el).getAttribute('method')).to.equal('stroke'); });
|
|
309
|
+
it('198. iconMethod can be toggled at runtime', async () => { const el = await fixture(html `<nile-empty-state></nile-empty-state>`); el.iconMethod = 'fill'; await el.updateComplete; expect(glyph(el).getAttribute('method')).to.equal('fill'); el.iconMethod = 'stroke'; await el.updateComplete; expect(glyph(el).getAttribute('method')).to.equal('stroke'); });
|
|
310
|
+
it('199. iconMethod does not change icon, size or colour', async () => { const a = await fixture(html `<nile-empty-state status="error"></nile-empty-state>`); const b = await fixture(html `<nile-empty-state status="error" iconMethod="fill"></nile-empty-state>`); for (const attr of ['name', 'size', 'color'])
|
|
311
|
+
expect(glyph(b).getAttribute(attr), attr).to.equal(glyph(a).getAttribute(attr)); });
|
|
281
312
|
});
|
|
282
313
|
//# sourceMappingURL=nile-empty-state.test.js.map
|