@aquera/nile-elements 2.0.22 → 2.0.24
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 +1929 -936
- 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-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 +13 -6
- 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/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 +51 -2
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +1 -1
- 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/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-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 +11 -4
- 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/nile-wysiwyg-editor.css.js +51 -2
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.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/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/docs/screenshots/wysiwyg-focus-state-focused.png +0 -0
- package/docs/screenshots/wysiwyg-focus-state-unfocused.png +0 -0
- 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-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 +11 -4
- 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/nile-wysiwyg-editor.css.ts +51 -2
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +1 -1
- package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.ts +3 -3
- package/test-timings.json +0 -1
- package/vscode-html-custom-data.json +349 -22
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { expect, fixture, html } from '@open-wc/testing';
|
|
2
|
+
import '../nile-icon';
|
|
3
|
+
import '@aquera/nile-glyph/nile-glyph';
|
|
4
|
+
import '../nile-side-bar';
|
|
5
|
+
import '../nile-app-shell';
|
|
6
|
+
import '../nile-app-shell-side-nav';
|
|
7
|
+
import '../nile-side-bar-header';
|
|
8
|
+
import '../nile-side-bar-header-switcher';
|
|
9
|
+
import '../nile-side-bar-search';
|
|
10
|
+
import '../nile-side-bar-group';
|
|
11
|
+
import '../nile-side-bar-group-item';
|
|
12
|
+
import '../nile-side-bar-group-item-icon';
|
|
13
|
+
import '../nile-side-bar-group-item-text';
|
|
14
|
+
import '../nile-side-bar-footer';
|
|
15
|
+
import '../nile-side-bar-footer-item';
|
|
16
|
+
import '../nile-side-bar-footer-text';
|
|
17
|
+
/**
|
|
18
|
+
* Side-nav layout. A `nile-side-bar` slotted straight into the shell is the reference: it fills the
|
|
19
|
+
* track, with no surface or right edge. Groups placed directly in `nile-app-shell-side-nav` and a
|
|
20
|
+
* `nile-side-bar` nested in it must land in the same place: the group adds its own 16px inset minus the
|
|
21
|
+
* body padding (never below 0), and a nested sidebar cancels the body padding and drops its surface
|
|
22
|
+
* and edge. Wrapped groups and overlay sidebars keep their own geometry.
|
|
23
|
+
*/
|
|
24
|
+
const loadSheet = async (href) => {
|
|
25
|
+
const link = document.createElement('link');
|
|
26
|
+
link.rel = 'stylesheet';
|
|
27
|
+
link.href = href;
|
|
28
|
+
const loaded = new Promise(resolve => link.addEventListener('load', resolve));
|
|
29
|
+
document.head.appendChild(link);
|
|
30
|
+
await loaded;
|
|
31
|
+
return link;
|
|
32
|
+
};
|
|
33
|
+
const tick = (ms = 0) => new Promise(r => setTimeout(r, ms)).then(() => new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r))));
|
|
34
|
+
const row = (n) => html `
|
|
35
|
+
<nile-side-bar-group-item>
|
|
36
|
+
<nile-side-bar-group-item-icon icon="ng-grid-01" method="stroke"></nile-side-bar-group-item-icon>
|
|
37
|
+
<nile-side-bar-group-item-text>${n}</nile-side-bar-group-item-text>
|
|
38
|
+
</nile-side-bar-group-item>
|
|
39
|
+
`;
|
|
40
|
+
const groups = html `
|
|
41
|
+
<nile-side-bar-group label="ONE">${row('a')}${row('b')}</nile-side-bar-group>
|
|
42
|
+
<nile-side-bar-group label="TWO" divider>${row('c')}</nile-side-bar-group>
|
|
43
|
+
<nile-side-bar-group divider>${row('d')}</nile-side-bar-group>
|
|
44
|
+
`;
|
|
45
|
+
const chrome = html `
|
|
46
|
+
<nile-side-bar-header><nile-side-bar-header-switcher label="Workspace"></nile-side-bar-header-switcher></nile-side-bar-header>
|
|
47
|
+
<nile-side-bar-search></nile-side-bar-search>
|
|
48
|
+
${groups}
|
|
49
|
+
<nile-side-bar-footer>
|
|
50
|
+
<nile-side-bar-footer-item><span slot="icon">i</span><span slot="text">Help</span></nile-side-bar-footer-item>
|
|
51
|
+
</nile-side-bar-footer>
|
|
52
|
+
`;
|
|
53
|
+
const shell = async (inner, style = '') => {
|
|
54
|
+
const wrapper = await fixture(html `
|
|
55
|
+
<div style="width: 1000px; height: 700px; position: relative">
|
|
56
|
+
<nile-app-shell style="height: 100%; ${style}">${inner}<p>Page</p></nile-app-shell>
|
|
57
|
+
</div>
|
|
58
|
+
`);
|
|
59
|
+
await tick(600);
|
|
60
|
+
return wrapper.querySelector('nile-app-shell');
|
|
61
|
+
};
|
|
62
|
+
const collapse = async (sh) => {
|
|
63
|
+
sh.collapseNav();
|
|
64
|
+
await tick(900);
|
|
65
|
+
};
|
|
66
|
+
const q = (root, sel) => [...root.querySelectorAll(sel)];
|
|
67
|
+
const px = (v) => parseFloat(v);
|
|
68
|
+
/** Everything the three compositions must agree on, relative to the nav track's left/top. */
|
|
69
|
+
const geometry = (track, host) => {
|
|
70
|
+
const tb = track.getBoundingClientRect();
|
|
71
|
+
const first = host.querySelector('nile-side-bar-group-item');
|
|
72
|
+
const link = first.shadowRoot.querySelector('[part="link"]').getBoundingClientRect();
|
|
73
|
+
const icon = host.querySelector('nile-side-bar-group-item-icon').getBoundingClientRect();
|
|
74
|
+
const gs = q(host, 'nile-side-bar-group');
|
|
75
|
+
const lines = gs
|
|
76
|
+
.filter(g => g.hasAttribute('divider') && getComputedStyle(g, '::before').display !== 'none')
|
|
77
|
+
.map(g => {
|
|
78
|
+
const gb = g.getBoundingClientRect();
|
|
79
|
+
const cs = getComputedStyle(g);
|
|
80
|
+
const bs = getComputedStyle(g, '::before');
|
|
81
|
+
const x = gb.left + px(cs.paddingLeft) + px(bs.marginLeft) - tb.left;
|
|
82
|
+
const w = gb.width - px(cs.paddingLeft) - px(cs.paddingRight) - px(bs.marginLeft) - px(bs.marginRight);
|
|
83
|
+
return [Math.round(x), Math.round(w)];
|
|
84
|
+
});
|
|
85
|
+
const headings = gs.filter(g => g.hasAttribute('label')).map(g => {
|
|
86
|
+
const label = g.shadowRoot.querySelector('.group-label');
|
|
87
|
+
return getComputedStyle(label).display === 'none' ? null : Math.round(label.getBoundingClientRect().left - tb.left);
|
|
88
|
+
});
|
|
89
|
+
return {
|
|
90
|
+
track: Math.round(tb.width),
|
|
91
|
+
itemX: Math.round(link.left - tb.left),
|
|
92
|
+
itemW: Math.round(link.width),
|
|
93
|
+
iconCentre: Math.round((icon.left + icon.width / 2 - tb.left) * 10) / 10,
|
|
94
|
+
lines,
|
|
95
|
+
headings,
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
const chromeGeometry = (track, bar) => {
|
|
99
|
+
const tb = track.getBoundingClientRect();
|
|
100
|
+
const r = (el) => {
|
|
101
|
+
const b = el.getBoundingClientRect();
|
|
102
|
+
return [Math.round(b.left - tb.left), Math.round(b.top - tb.top), Math.round(b.width), Math.round(b.height)];
|
|
103
|
+
};
|
|
104
|
+
const footer = bar.querySelector('nile-side-bar-footer')?.getBoundingClientRect();
|
|
105
|
+
const part = (sel) => {
|
|
106
|
+
const el = bar.querySelector(sel);
|
|
107
|
+
return el ? r(el) : null;
|
|
108
|
+
};
|
|
109
|
+
return {
|
|
110
|
+
bar: r(bar),
|
|
111
|
+
switcher: part('nile-side-bar-header-switcher'),
|
|
112
|
+
search: part('nile-side-bar-search'),
|
|
113
|
+
footerGap: footer ? Math.round(tb.bottom - footer.bottom) : null,
|
|
114
|
+
bg: getComputedStyle(bar).backgroundColor,
|
|
115
|
+
border: getComputedStyle(bar).borderRightWidth,
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
const overflow = (nav) => {
|
|
119
|
+
const body = nav.shadowRoot.querySelector('.body');
|
|
120
|
+
return { x: body.scrollWidth > body.clientWidth, y: body.scrollHeight > body.clientHeight };
|
|
121
|
+
};
|
|
122
|
+
const themes = [
|
|
123
|
+
['NxtGen Light', '/demo/nxtgen-dark.css', 'light'],
|
|
124
|
+
['NxtGen Dark', '/demo/nxtgen-dark.css', 'dark'],
|
|
125
|
+
['Enterprise Light', '/demo/variables.css', 'light'],
|
|
126
|
+
];
|
|
127
|
+
for (const [name, sheetHref, theme] of themes) {
|
|
128
|
+
describe(`nile-app-shell-side-nav layout (${name})`, () => {
|
|
129
|
+
let sheet;
|
|
130
|
+
before(async () => {
|
|
131
|
+
sheet = await loadSheet(sheetHref);
|
|
132
|
+
});
|
|
133
|
+
after(() => {
|
|
134
|
+
sheet.remove();
|
|
135
|
+
document.documentElement.removeAttribute('data-theme');
|
|
136
|
+
});
|
|
137
|
+
beforeEach(() => document.documentElement.setAttribute('data-theme', theme));
|
|
138
|
+
it('groups directly in the side-nav sit exactly where a sidebar slotted into the shell puts them, expanded and collapsed', async () => {
|
|
139
|
+
const ref = await shell(html `<nile-side-bar slot="side-nav" style="transition: none">${groups}</nile-side-bar>`);
|
|
140
|
+
const refBar = ref.querySelector('nile-side-bar');
|
|
141
|
+
const direct = await shell(html `<nile-app-shell-side-nav>${groups}</nile-app-shell-side-nav>`);
|
|
142
|
+
const nav = direct.querySelector('nile-app-shell-side-nav');
|
|
143
|
+
expect(geometry(nav, nav), 'expanded').to.deep.equal(geometry(refBar, refBar));
|
|
144
|
+
await collapse(ref);
|
|
145
|
+
await collapse(direct);
|
|
146
|
+
expect(geometry(nav, nav), 'collapsed').to.deep.equal(geometry(refBar, refBar));
|
|
147
|
+
expect(overflow(nav)).to.deep.equal({ x: false, y: false });
|
|
148
|
+
});
|
|
149
|
+
it('keeps the NxtGen numbers: 72px rail, icons at x=36, 40px dividers, headings hidden', async () => {
|
|
150
|
+
if (theme !== 'light' && theme !== 'dark')
|
|
151
|
+
return;
|
|
152
|
+
if (sheetHref.includes('variables'))
|
|
153
|
+
return;
|
|
154
|
+
const direct = await shell(html `<nile-app-shell-side-nav>${groups}</nile-app-shell-side-nav>`);
|
|
155
|
+
const nav = direct.querySelector('nile-app-shell-side-nav');
|
|
156
|
+
await collapse(direct);
|
|
157
|
+
const g = geometry(nav, nav);
|
|
158
|
+
expect([g.track, g.itemX, g.itemW, g.iconCentre]).to.deep.equal([72, 16, 40, 36]);
|
|
159
|
+
expect(g.lines).to.deep.equal([[16, 40], [16, 40]]);
|
|
160
|
+
expect(g.headings.every(h => h === null)).to.be.true;
|
|
161
|
+
});
|
|
162
|
+
it('enterprise: the group adds the 4px the 12px body does not, so items start at x=16 like a standalone sidebar', async () => {
|
|
163
|
+
if (!sheetHref.includes('variables'))
|
|
164
|
+
return;
|
|
165
|
+
const direct = await shell(html `<nile-app-shell-side-nav>${groups}</nile-app-shell-side-nav>`);
|
|
166
|
+
const nav = direct.querySelector('nile-app-shell-side-nav');
|
|
167
|
+
const e = geometry(nav, nav);
|
|
168
|
+
expect([e.track, e.itemX, e.itemW]).to.deep.equal([240, 16, 208]);
|
|
169
|
+
await collapse(direct);
|
|
170
|
+
const c = geometry(nav, nav);
|
|
171
|
+
expect([c.track, c.itemX, c.itemW, c.iconCentre]).to.deep.equal([70, 16, 38, 35]);
|
|
172
|
+
expect(c.lines, 'dividers are visible again (were -2px)').to.deep.equal([[24, 22], [24, 22]]);
|
|
173
|
+
});
|
|
174
|
+
it('a nested nile-side-bar matches a slotted one: geometry, header, search, footer, shell surface, no edge, no overflow', async () => {
|
|
175
|
+
const ref = await shell(html `<nile-side-bar slot="side-nav" searchable style="transition: none">${chrome}</nile-side-bar>`);
|
|
176
|
+
const refBar = ref.querySelector('nile-side-bar');
|
|
177
|
+
const nested = await shell(html `<nile-app-shell-side-nav><nile-side-bar searchable style="transition: none">${chrome}</nile-side-bar></nile-app-shell-side-nav>`);
|
|
178
|
+
const nav = nested.querySelector('nile-app-shell-side-nav');
|
|
179
|
+
const bar = nested.querySelector('nile-side-bar');
|
|
180
|
+
for (const state of ['expanded', 'collapsed']) {
|
|
181
|
+
if (state === 'collapsed') {
|
|
182
|
+
await collapse(ref);
|
|
183
|
+
await collapse(nested);
|
|
184
|
+
}
|
|
185
|
+
expect(geometry(nav, bar), `${state} geometry`).to.deep.equal(geometry(refBar, refBar));
|
|
186
|
+
expect(chromeGeometry(nav, bar), `${state} chrome`).to.deep.equal(chromeGeometry(refBar, refBar));
|
|
187
|
+
expect(overflow(nav), `${state} overflow`).to.deep.equal({ x: false, y: false });
|
|
188
|
+
const cg = chromeGeometry(nav, bar);
|
|
189
|
+
// No surface of its own: the nested bar paints the shell's own background, so nav and page stay one surface.
|
|
190
|
+
expect(cg.bg).to.equal(getComputedStyle(nested).backgroundColor);
|
|
191
|
+
expect(cg.bg).to.equal(chromeGeometry(refBar, refBar).bg);
|
|
192
|
+
expect(cg.border).to.equal('0px');
|
|
193
|
+
expect(cg.bar.slice(0, 2), 'flush with the track').to.deep.equal([0, 0]);
|
|
194
|
+
expect(cg.footerGap, 'footer at the bottom').to.equal(0);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
it('nested NxtGen rail: icons at x=36 and 40px dividers', async () => {
|
|
198
|
+
if (sheetHref.includes('variables'))
|
|
199
|
+
return;
|
|
200
|
+
const nested = await shell(html `<nile-app-shell-side-nav><nile-side-bar style="transition: none">${groups}</nile-side-bar></nile-app-shell-side-nav>`);
|
|
201
|
+
const nav = nested.querySelector('nile-app-shell-side-nav');
|
|
202
|
+
await collapse(nested);
|
|
203
|
+
const g = geometry(nav, nav);
|
|
204
|
+
expect([g.track, g.iconCentre]).to.deep.equal([72, 36]);
|
|
205
|
+
expect(g.lines).to.deep.equal([[16, 40], [16, 40]]);
|
|
206
|
+
});
|
|
207
|
+
it('custom side-nav padding: nested stays flush; direct groups keep a constant total inset, never negative', async () => {
|
|
208
|
+
const ref = await shell(html `<nile-side-bar slot="side-nav" style="transition: none">${groups}</nile-side-bar>`);
|
|
209
|
+
const refBar = ref.querySelector('nile-side-bar');
|
|
210
|
+
const inset = px(getComputedStyle(q(refBar, 'nile-side-bar-group')[0]).paddingLeft); // the group's own token inset (16)
|
|
211
|
+
for (const pad of [0, 8, 24]) {
|
|
212
|
+
const style = `--nile-app-shell-side-nav-padding: ${pad}px`;
|
|
213
|
+
const direct = await shell(html `<nile-app-shell-side-nav>${groups}</nile-app-shell-side-nav>`, style);
|
|
214
|
+
const dnav = direct.querySelector('nile-app-shell-side-nav');
|
|
215
|
+
const gp = px(getComputedStyle(q(dnav, 'nile-side-bar-group')[0]).paddingLeft);
|
|
216
|
+
expect(gp, `group padding at body ${pad}`).to.equal(Math.max(0, inset - pad));
|
|
217
|
+
expect(geometry(dnav, dnav).itemX, `item x at body ${pad}`).to.equal(Math.max(inset, pad));
|
|
218
|
+
const nested = await shell(html `<nile-app-shell-side-nav><nile-side-bar style="transition: none">${groups}</nile-side-bar></nile-app-shell-side-nav>`, style);
|
|
219
|
+
const nnav = nested.querySelector('nile-app-shell-side-nav');
|
|
220
|
+
const nbar = nested.querySelector('nile-side-bar');
|
|
221
|
+
expect(chromeGeometry(nnav, nbar).bar.slice(0, 2), `nested flush at body ${pad}`).to.deep.equal([0, 0]);
|
|
222
|
+
expect(geometry(nnav, nbar).itemX).to.equal(geometry(refBar, refBar).itemX);
|
|
223
|
+
expect(overflow(nnav)).to.deep.equal({ x: false, y: false });
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
it('custom widths: a wider track is filled; an oversized inline sidebar width clamps to the track like a slotted one', async () => {
|
|
227
|
+
const wide = await shell(html `<nile-app-shell-side-nav><nile-side-bar style="transition: none">${groups}</nile-side-bar></nile-app-shell-side-nav>`, '--nile-app-shell-side-nav-width: 300px');
|
|
228
|
+
const wnav = wide.querySelector('nile-app-shell-side-nav');
|
|
229
|
+
const wbar = wide.querySelector('nile-side-bar');
|
|
230
|
+
expect(wnav.getBoundingClientRect().width).to.equal(300);
|
|
231
|
+
expect(chromeGeometry(wnav, wbar).bar).to.deep.equal([0, 0, 300, 700]);
|
|
232
|
+
const clamp = await shell(html `<nile-app-shell-side-nav><nile-side-bar style="transition: none; width: 300px">${groups}</nile-side-bar></nile-app-shell-side-nav>`);
|
|
233
|
+
const cnav = clamp.querySelector('nile-app-shell-side-nav');
|
|
234
|
+
const cbar = clamp.querySelector('nile-side-bar');
|
|
235
|
+
const slotted = await shell(html `<nile-side-bar slot="side-nav" style="transition: none; width: 300px">${groups}</nile-side-bar>`);
|
|
236
|
+
const sbar = slotted.querySelector('nile-side-bar');
|
|
237
|
+
expect(cbar.getBoundingClientRect().width, 'nested clamps to the track').to.equal(cnav.getBoundingClientRect().width);
|
|
238
|
+
expect(cbar.getBoundingClientRect().width).to.equal(sbar.getBoundingClientRect().width);
|
|
239
|
+
expect(overflow(cnav)).to.deep.equal({ x: false, y: false });
|
|
240
|
+
});
|
|
241
|
+
it('wrapped groups keep their own padding, and an overlay sidebar keeps its own geometry', async () => {
|
|
242
|
+
const wrapped = await shell(html `<nile-app-shell-side-nav><div><nile-side-bar-group label="W">${row('w')}</nile-side-bar-group></div></nile-app-shell-side-nav>`);
|
|
243
|
+
const wg = wrapped.querySelector('nile-side-bar-group');
|
|
244
|
+
expect(getComputedStyle(wg).paddingLeft, 'wrapper is not slotted: the group keeps its own 16px inset').to.equal('16px');
|
|
245
|
+
const overlay = await shell(html `<nile-app-shell-side-nav><nile-side-bar overlay style="transition: none">${groups}</nile-side-bar></nile-app-shell-side-nav>`);
|
|
246
|
+
const obar = overlay.querySelector('nile-side-bar');
|
|
247
|
+
expect(getComputedStyle(obar).marginLeft, 'no negative margin on an overlay').to.equal('0px');
|
|
248
|
+
const w = obar.getBoundingClientRect().width;
|
|
249
|
+
expect(w, 'its own 240/260px width, not the shell width').to.be.within(240, 261);
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
//# sourceMappingURL=zz-layout.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,sFAAsF,EAAE,KAAK,IAAI,EAAE;YACpG,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,IAAI,CAAA,gEAAgE,GAAG,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;YAClK,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAgB,CAAC;YACvE,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,4DAA4D,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAExH,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,IAAI,CAAA,4EAA4E,MAAM,4CAA4C,CAAC,CAAC;YAChK,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,eAAe,CAAgB,CAAC;YACnE,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,kCAAkC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC9F,MAAM,CAAC,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC;YAC7C,MAAM,CAAC,CAAC,EAAE,8CAA8C,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACnF,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { expect, fixture, html } from '@open-wc/testing';\nimport '../nile-icon';\nimport '@aquera/nile-glyph/nile-glyph';\nimport '../nile-side-bar';\nimport '../nile-app-shell';\nimport '../nile-app-shell-side-nav';\nimport '../nile-side-bar-header';\nimport '../nile-side-bar-header-switcher';\nimport '../nile-side-bar-search';\nimport '../nile-side-bar-group';\nimport '../nile-side-bar-group-item';\nimport '../nile-side-bar-group-item-icon';\nimport '../nile-side-bar-group-item-text';\nimport '../nile-side-bar-footer';\nimport '../nile-side-bar-footer-item';\nimport '../nile-side-bar-footer-text';\n\n/**\n * Side-nav layout. A `nile-side-bar` slotted straight into the shell is the reference: it fills the\n * track, with no surface or right edge. Groups placed directly in `nile-app-shell-side-nav` and a\n * `nile-side-bar` nested in it must land in the same place: the group adds its own 16px inset minus the\n * body padding (never below 0), and a nested sidebar cancels the body padding and drops its surface\n * and edge. Wrapped groups and overlay sidebars keep their own geometry.\n */\n\nconst loadSheet = async (href: string): Promise<HTMLLinkElement> => {\n const link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = href;\n const loaded = new Promise(resolve => link.addEventListener('load', resolve));\n document.head.appendChild(link);\n await loaded;\n return link;\n};\n\nconst tick = (ms = 0) => new Promise(r => setTimeout(r, ms)).then(() => new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r))));\n\nconst row = (n: string) => html`\n <nile-side-bar-group-item>\n <nile-side-bar-group-item-icon icon=\"ng-grid-01\" method=\"stroke\"></nile-side-bar-group-item-icon>\n <nile-side-bar-group-item-text>${n}</nile-side-bar-group-item-text>\n </nile-side-bar-group-item>\n`;\nconst groups = html`\n <nile-side-bar-group label=\"ONE\">${row('a')}${row('b')}</nile-side-bar-group>\n <nile-side-bar-group label=\"TWO\" divider>${row('c')}</nile-side-bar-group>\n <nile-side-bar-group divider>${row('d')}</nile-side-bar-group>\n`;\nconst chrome = html`\n <nile-side-bar-header><nile-side-bar-header-switcher label=\"Workspace\"></nile-side-bar-header-switcher></nile-side-bar-header>\n <nile-side-bar-search></nile-side-bar-search>\n ${groups}\n <nile-side-bar-footer>\n <nile-side-bar-footer-item><span slot=\"icon\">i</span><span slot=\"text\">Help</span></nile-side-bar-footer-item>\n </nile-side-bar-footer>\n`;\n\ntype Shell = HTMLElement & { collapseNav(): void; toggleNav(force?: boolean): void };\nconst shell = async (inner: unknown, style = ''): Promise<Shell> => {\n const wrapper = await fixture<HTMLDivElement>(html`\n <div style=\"width: 1000px; height: 700px; position: relative\">\n <nile-app-shell style=\"height: 100%; ${style}\">${inner}<p>Page</p></nile-app-shell>\n </div>\n `);\n await tick(600);\n return wrapper.querySelector('nile-app-shell') as Shell;\n};\nconst collapse = async (sh: Shell) => {\n sh.collapseNav();\n await tick(900);\n};\n\nconst q = <T extends Element>(root: ParentNode, sel: string) => [...root.querySelectorAll<T>(sel)];\nconst px = (v: string) => parseFloat(v);\n\n/** Everything the three compositions must agree on, relative to the nav track's left/top. */\nconst geometry = (track: HTMLElement, host: HTMLElement) => {\n const tb = track.getBoundingClientRect();\n const first = host.querySelector('nile-side-bar-group-item')!;\n const link = first.shadowRoot!.querySelector('[part=\"link\"]')!.getBoundingClientRect();\n const icon = host.querySelector('nile-side-bar-group-item-icon')!.getBoundingClientRect();\n const gs = q(host, 'nile-side-bar-group');\n const lines = gs\n .filter(g => g.hasAttribute('divider') && getComputedStyle(g, '::before').display !== 'none')\n .map(g => {\n const gb = g.getBoundingClientRect();\n const cs = getComputedStyle(g);\n const bs = getComputedStyle(g, '::before');\n const x = gb.left + px(cs.paddingLeft) + px(bs.marginLeft) - tb.left;\n const w = gb.width - px(cs.paddingLeft) - px(cs.paddingRight) - px(bs.marginLeft) - px(bs.marginRight);\n return [Math.round(x), Math.round(w)];\n });\n const headings = gs.filter(g => g.hasAttribute('label')).map(g => {\n const label = g.shadowRoot!.querySelector('.group-label')!;\n return getComputedStyle(label).display === 'none' ? null : Math.round(label.getBoundingClientRect().left - tb.left);\n });\n return {\n track: Math.round(tb.width),\n itemX: Math.round(link.left - tb.left),\n itemW: Math.round(link.width),\n iconCentre: Math.round((icon.left + icon.width / 2 - tb.left) * 10) / 10,\n lines,\n headings,\n };\n};\n\nconst chromeGeometry = (track: HTMLElement, bar: HTMLElement) => {\n const tb = track.getBoundingClientRect();\n const r = (el: Element) => {\n const b = el.getBoundingClientRect();\n return [Math.round(b.left - tb.left), Math.round(b.top - tb.top), Math.round(b.width), Math.round(b.height)];\n };\n const footer = bar.querySelector('nile-side-bar-footer')?.getBoundingClientRect();\n const part = (sel: string) => {\n const el = bar.querySelector(sel);\n return el ? r(el) : null;\n };\n return {\n bar: r(bar),\n switcher: part('nile-side-bar-header-switcher'),\n search: part('nile-side-bar-search'),\n footerGap: footer ? Math.round(tb.bottom - footer.bottom) : null,\n bg: getComputedStyle(bar).backgroundColor,\n border: getComputedStyle(bar).borderRightWidth,\n };\n};\n\nconst overflow = (nav: HTMLElement) => {\n const body = nav.shadowRoot!.querySelector('.body')!;\n return { x: body.scrollWidth > body.clientWidth, y: body.scrollHeight > body.clientHeight };\n};\n\nconst themes = [\n ['NxtGen Light', '/demo/nxtgen-dark.css', 'light'],\n ['NxtGen Dark', '/demo/nxtgen-dark.css', 'dark'],\n ['Enterprise Light', '/demo/variables.css', 'light'],\n] as const;\n\nfor (const [name, sheetHref, theme] of themes) {\n describe(`nile-app-shell-side-nav layout (${name})`, () => {\n let sheet: HTMLLinkElement;\n before(async () => {\n sheet = await loadSheet(sheetHref);\n });\n after(() => {\n sheet.remove();\n document.documentElement.removeAttribute('data-theme');\n });\n beforeEach(() => document.documentElement.setAttribute('data-theme', theme));\n\n it('groups directly in the side-nav sit exactly where a sidebar slotted into the shell puts them, expanded and collapsed', async () => {\n const ref = await shell(html`<nile-side-bar slot=\"side-nav\" style=\"transition: none\">${groups}</nile-side-bar>`);\n const refBar = ref.querySelector('nile-side-bar') as HTMLElement;\n const direct = await shell(html`<nile-app-shell-side-nav>${groups}</nile-app-shell-side-nav>`);\n const nav = direct.querySelector('nile-app-shell-side-nav') as HTMLElement;\n expect(geometry(nav, nav), 'expanded').to.deep.equal(geometry(refBar, refBar));\n await collapse(ref);\n await collapse(direct);\n expect(geometry(nav, nav), 'collapsed').to.deep.equal(geometry(refBar, refBar));\n expect(overflow(nav)).to.deep.equal({ x: false, y: false });\n });\n\n it('keeps the NxtGen numbers: 72px rail, icons at x=36, 40px dividers, headings hidden', async () => {\n if (theme !== 'light' && theme !== 'dark') return;\n if (sheetHref.includes('variables')) return;\n const direct = await shell(html`<nile-app-shell-side-nav>${groups}</nile-app-shell-side-nav>`);\n const nav = direct.querySelector('nile-app-shell-side-nav') as HTMLElement;\n await collapse(direct);\n const g = geometry(nav, nav);\n expect([g.track, g.itemX, g.itemW, g.iconCentre]).to.deep.equal([72, 16, 40, 36]);\n expect(g.lines).to.deep.equal([[16, 40], [16, 40]]);\n expect(g.headings.every(h => h === null)).to.be.true;\n });\n\n it('enterprise: the group adds the 4px the 12px body does not, so items start at x=16 like a standalone sidebar', async () => {\n if (!sheetHref.includes('variables')) return;\n const direct = await shell(html`<nile-app-shell-side-nav>${groups}</nile-app-shell-side-nav>`);\n const nav = direct.querySelector('nile-app-shell-side-nav') as HTMLElement;\n const e = geometry(nav, nav);\n expect([e.track, e.itemX, e.itemW]).to.deep.equal([240, 16, 208]);\n await collapse(direct);\n const c = geometry(nav, nav);\n expect([c.track, c.itemX, c.itemW, c.iconCentre]).to.deep.equal([70, 16, 38, 35]);\n expect(c.lines, 'dividers are visible again (were -2px)').to.deep.equal([[24, 22], [24, 22]]);\n });\n\n it('a nested nile-side-bar matches a slotted one: geometry, header, search, footer, shell surface, no edge, no overflow', async () => {\n const ref = await shell(html`<nile-side-bar slot=\"side-nav\" searchable style=\"transition: none\">${chrome}</nile-side-bar>`);\n const refBar = ref.querySelector('nile-side-bar') as HTMLElement;\n const nested = await shell(html`<nile-app-shell-side-nav><nile-side-bar searchable style=\"transition: none\">${chrome}</nile-side-bar></nile-app-shell-side-nav>`);\n const nav = nested.querySelector('nile-app-shell-side-nav') as HTMLElement;\n const bar = nested.querySelector('nile-side-bar') as HTMLElement;\n for (const state of ['expanded', 'collapsed']) {\n if (state === 'collapsed') {\n await collapse(ref);\n await collapse(nested);\n }\n expect(geometry(nav, bar), `${state} geometry`).to.deep.equal(geometry(refBar, refBar));\n expect(chromeGeometry(nav, bar), `${state} chrome`).to.deep.equal(chromeGeometry(refBar, refBar));\n expect(overflow(nav), `${state} overflow`).to.deep.equal({ x: false, y: false });\n const cg = chromeGeometry(nav, bar);\n // No surface of its own: the nested bar paints the shell's own background, so nav and page stay one surface.\n expect(cg.bg).to.equal(getComputedStyle(nested).backgroundColor);\n expect(cg.bg).to.equal(chromeGeometry(refBar, refBar).bg);\n expect(cg.border).to.equal('0px');\n expect(cg.bar.slice(0, 2), 'flush with the track').to.deep.equal([0, 0]);\n expect(cg.footerGap, 'footer at the bottom').to.equal(0);\n }\n });\n\n it('nested NxtGen rail: icons at x=36 and 40px dividers', async () => {\n if (sheetHref.includes('variables')) return;\n const nested = await shell(html`<nile-app-shell-side-nav><nile-side-bar style=\"transition: none\">${groups}</nile-side-bar></nile-app-shell-side-nav>`);\n const nav = nested.querySelector('nile-app-shell-side-nav') as HTMLElement;\n await collapse(nested);\n const g = geometry(nav, nav);\n expect([g.track, g.iconCentre]).to.deep.equal([72, 36]);\n expect(g.lines).to.deep.equal([[16, 40], [16, 40]]);\n });\n\n it('custom side-nav padding: nested stays flush; direct groups keep a constant total inset, never negative', async () => {\n const ref = await shell(html`<nile-side-bar slot=\"side-nav\" style=\"transition: none\">${groups}</nile-side-bar>`);\n const refBar = ref.querySelector('nile-side-bar') as HTMLElement;\n const inset = px(getComputedStyle(q(refBar, 'nile-side-bar-group')[0]).paddingLeft); // the group's own token inset (16)\n for (const pad of [0, 8, 24]) {\n const style = `--nile-app-shell-side-nav-padding: ${pad}px`;\n const direct = await shell(html`<nile-app-shell-side-nav>${groups}</nile-app-shell-side-nav>`, style);\n const dnav = direct.querySelector('nile-app-shell-side-nav') as HTMLElement;\n const gp = px(getComputedStyle(q(dnav, 'nile-side-bar-group')[0]).paddingLeft);\n expect(gp, `group padding at body ${pad}`).to.equal(Math.max(0, inset - pad));\n expect(geometry(dnav, dnav).itemX, `item x at body ${pad}`).to.equal(Math.max(inset, pad));\n\n const nested = await shell(html`<nile-app-shell-side-nav><nile-side-bar style=\"transition: none\">${groups}</nile-side-bar></nile-app-shell-side-nav>`, style);\n const nnav = nested.querySelector('nile-app-shell-side-nav') as HTMLElement;\n const nbar = nested.querySelector('nile-side-bar') as HTMLElement;\n expect(chromeGeometry(nnav, nbar).bar.slice(0, 2), `nested flush at body ${pad}`).to.deep.equal([0, 0]);\n expect(geometry(nnav, nbar).itemX).to.equal(geometry(refBar, refBar).itemX);\n expect(overflow(nnav)).to.deep.equal({ x: false, y: false });\n }\n });\n\n it('custom widths: a wider track is filled; an oversized inline sidebar width clamps to the track like a slotted one', async () => {\n const wide = await shell(html`<nile-app-shell-side-nav><nile-side-bar style=\"transition: none\">${groups}</nile-side-bar></nile-app-shell-side-nav>`, '--nile-app-shell-side-nav-width: 300px');\n const wnav = wide.querySelector('nile-app-shell-side-nav') as HTMLElement;\n const wbar = wide.querySelector('nile-side-bar') as HTMLElement;\n expect(wnav.getBoundingClientRect().width).to.equal(300);\n expect(chromeGeometry(wnav, wbar).bar).to.deep.equal([0, 0, 300, 700]);\n\n const clamp = await shell(html`<nile-app-shell-side-nav><nile-side-bar style=\"transition: none; width: 300px\">${groups}</nile-side-bar></nile-app-shell-side-nav>`);\n const cnav = clamp.querySelector('nile-app-shell-side-nav') as HTMLElement;\n const cbar = clamp.querySelector('nile-side-bar') as HTMLElement;\n const slotted = await shell(html`<nile-side-bar slot=\"side-nav\" style=\"transition: none; width: 300px\">${groups}</nile-side-bar>`);\n const sbar = slotted.querySelector('nile-side-bar') as HTMLElement;\n expect(cbar.getBoundingClientRect().width, 'nested clamps to the track').to.equal(cnav.getBoundingClientRect().width);\n expect(cbar.getBoundingClientRect().width).to.equal(sbar.getBoundingClientRect().width);\n expect(overflow(cnav)).to.deep.equal({ x: false, y: false });\n });\n\n it('wrapped groups keep their own padding, and an overlay sidebar keeps its own geometry', async () => {\n const wrapped = await shell(html`<nile-app-shell-side-nav><div><nile-side-bar-group label=\"W\">${row('w')}</nile-side-bar-group></div></nile-app-shell-side-nav>`);\n const wg = wrapped.querySelector('nile-side-bar-group') as HTMLElement;\n expect(getComputedStyle(wg).paddingLeft, 'wrapper is not slotted: the group keeps its own 16px inset').to.equal('16px');\n\n const overlay = await shell(html`<nile-app-shell-side-nav><nile-side-bar overlay style=\"transition: none\">${groups}</nile-side-bar></nile-app-shell-side-nav>`);\n const obar = overlay.querySelector('nile-side-bar') as HTMLElement;\n expect(getComputedStyle(obar).marginLeft, 'no negative margin on an overlay').to.equal('0px');\n const w = obar.getBoundingClientRect().width;\n expect(w, 'its own 240/260px width, not the shell width').to.be.within(240, 261);\n });\n });\n}\n"]}
|
|
@@ -99,7 +99,7 @@ let NileAppShellNavToggle = class NileAppShellNavToggle extends NileElement {
|
|
|
99
99
|
aria-label=${expanded ? 'Collapse navigation' : 'Expand navigation'}
|
|
100
100
|
@click=${this._onClick}
|
|
101
101
|
>
|
|
102
|
-
${renderGlyph(
|
|
102
|
+
${renderGlyph('ng-panel-left', 20, 'currentColor')}
|
|
103
103
|
</nile-button>
|
|
104
104
|
<span class="rule" part="rule"></span>
|
|
105
105
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-app-shell-nav-toggle.js","sourceRoot":"","sources":["../../../src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAkC,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,4BAA4B,CAAC;AACpC,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;;;;;;;;;;;;GAgBG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,WAAW;I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S,CAAC;IACjC,CAAC;IAEM,MAAM;QACX,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QAC7B,OAAO,IAAI,CAAA;;;;;;wBAMS,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;oBAC/B,IAAI,CAAC,OAAO;gBAChB,IAAI,CAAC,OAAO;YAClB,CAAC,CAAC,qDAAqD;YACvD,CAAC,CAAC,QAAQ;gBACV,CAAC,CAAC,qBAAqB;gBACvB,CAAC,CAAC,mBAAmB;qBACV,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,mBAAmB;iBAC1D,IAAI,CAAC,QAAQ;;UAEpB,WAAW,CAAC,eAAe,EAAE,EAAE,EAAE,cAAc,CAAC;;;KAGrD,CAAC;IACJ,CAAC;CAOF,CAAA;AAjFC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;uDACzC;AAI1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDACZ;AAEE;IAAhB,KAAK,EAAE;oDAAgC;AACvB;IAAhB,KAAK,EAAE;sDAAkC;AAd/B,qBAAqB;IADjC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,qBAAqB,CAwFjC;;AAED,eAAe,qBAAqB,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, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { styles } from './nile-app-shell-nav-toggle.css';\nimport { renderGlyph } from '../internal/glyph';\nimport '../nile-button/nile-button';\nimport NileElement from '../internal/nile-element';\nimport type { NileAppShell } from '../nile-app-shell/nile-app-shell';\n\n/**\n * @summary The side-nav toggle as a standalone control, for a header you build yourself.\n *\n * @status stable\n * @since 2.0\n *\n * @tag nile-app-shell-nav-toggle\n *\n * @dependency nile-app-shell\n * @dependency nile-glyph\n *\n * @csspart button - The toggle button.\n * @csspart rule - The trailing vertical rule.\n *\n * @cssproperty [--nile-app-shell-nav-toggle-offset=-6px] - Optical start offset, so the glyph lands on the bar's text origin.\n * @cssproperty [--nile-app-shell-utility-size=32px] - Box the toggle sits in; the hit area and hover surface, not a visible chip.\n */\n@customElement('nile-app-shell-nav-toggle')\nexport class NileAppShellNavToggle extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /** Draws the vertical rule the shell's own bar puts after the toggle. */\n @property({ type: Boolean, reflect: true, attribute: 'with-rule' })\n withRule: boolean = false;\n\n /** The shell to drive. Defaults to the nearest `nile-app-shell` ancestor, or the element with this id. */\n @property({ type: String })\n shell?: string;\n\n @state() private _rail: boolean = false;\n @state() private _locked: boolean = false;\n\n private _observed?: NileAppShell;\n\n public connectedCallback(): void {\n super.connectedCallback();\n // The shell may upgrade after this element does, so read it on a microtask.\n Promise.resolve().then(() => this._attach());\n }\n\n public disconnectedCallback(): void {\n super.disconnectedCallback();\n this._observed?.removeEventListener('nile-nav-toggle', this._onShellToggle);\n this._observed = undefined;\n }\n\n /** The shell this toggle drives, if it found one. */\n public get appShell(): NileAppShell | null {\n if (this.shell) {\n const root = this.getRootNode() as Document | ShadowRoot;\n return (root.querySelector(`#${this.shell}`) as NileAppShell) ?? null;\n }\n return this.closest('nile-app-shell') ?? null;\n }\n\n private _attach(): void {\n const shell = this.appShell;\n if (!shell || shell === this._observed) return;\n this._observed?.removeEventListener('nile-nav-toggle', this._onShellToggle);\n this._observed = shell;\n shell.addEventListener('nile-nav-toggle', this._onShellToggle);\n this._sync();\n }\n\n private _onShellToggle = (): void => {\n this._sync();\n };\n\n private _sync(): void {\n const shell = this._observed;\n if (!shell) return;\n this._rail = shell.rail;\n this._locked = shell.navLocked;\n }\n\n public render(): TemplateResult {\n const expanded = !this._rail;\n return html`\n <nile-button\n class=\"toggle utility-control\"\n part=\"button\"\n variant=\"ghost\"\n circle\n aria-expanded=${expanded ? 'true' : 'false'}\n ?disabled=${this._locked}\n title=${this._locked\n ? 'The navigation stays collapsed at this window width'\n : expanded\n ? 'Collapse navigation'\n : 'Expand navigation'}\n aria-label=${expanded ? 'Collapse navigation' : 'Expand navigation'}\n @click=${this._onClick}\n >\n ${renderGlyph('ng-panel-left', 20, 'currentColor')}\n </nile-button>\n <span class=\"rule\" part=\"rule\"></span>\n `;\n }\n\n private _onClick = (): void => {\n this._attach();\n this._observed?.toggleNav();\n this._sync();\n };\n}\n\nexport default NileAppShellNavToggle;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-app-shell-nav-toggle': NileAppShellNavToggle;\n }\n}\n"]}
|
|
@@ -14,14 +14,19 @@ export const styles = css `
|
|
|
14
14
|
width: 100%;
|
|
15
15
|
height: 100%;
|
|
16
16
|
overflow: hidden;
|
|
17
|
-
/* The nav
|
|
18
|
-
background: var(--nile-
|
|
17
|
+
/* The nav takes the sidebar surface (bg-tertiary), the same token the shell paints behind it, so the nav and page still share one. */
|
|
18
|
+
background: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
:host([hidden]) {
|
|
22
22
|
display: none;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/* A slotted side bar shows the canvas through, like the nav itself; the shell's own slotted rule can't reach this deep. */
|
|
26
|
+
::slotted(nile-side-bar) {
|
|
27
|
+
background: transparent;
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
.header,
|
|
26
31
|
.footer {
|
|
27
32
|
flex: 0 0 auto;
|
|
@@ -33,13 +38,26 @@ export const styles = css `
|
|
|
33
38
|
min-height: 0;
|
|
34
39
|
overflow-y: auto;
|
|
35
40
|
overflow-x: hidden;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var(--nile-spacing-lg, var(--ng-spacing-lg))
|
|
39
|
-
);
|
|
41
|
+
/* 16px on NxtGen; enterprise keeps 12px. Only the vertical inset: groups, search and a nested sidebar bring their own horizontal one. */
|
|
42
|
+
padding-block: var(--nile-spacing-lg, var(--ng-spacing-xl));
|
|
40
43
|
scrollbar-width: thin;
|
|
41
44
|
}
|
|
42
45
|
|
|
46
|
+
/* Anything else slotted into the body (not the pinned header or footer) takes the same inset horizontally, since it brings none of its own. */
|
|
47
|
+
.body ::slotted(:not(nile-side-bar):not(nile-side-bar-group):not(nile-side-bar-search)) {
|
|
48
|
+
margin-inline: var(--nile-spacing-lg, var(--ng-spacing-xl));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* A nile-side-bar nested here fills the track: it cancels the body's vertical padding, an inline width is clamped to the track, and it drops its own surface and right edge. An overlay sidebar leaves the flow and keeps its own geometry. */
|
|
52
|
+
::slotted(nile-side-bar:not([overlay])) {
|
|
53
|
+
margin-block: calc(-1 * var(--nile-spacing-lg, var(--ng-spacing-xl)));
|
|
54
|
+
width: auto;
|
|
55
|
+
max-width: 100%;
|
|
56
|
+
height: calc(100% + 2 * var(--nile-spacing-lg, var(--ng-spacing-xl)));
|
|
57
|
+
background: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));
|
|
58
|
+
border-right: var(--nile-border-width-0, var(--ng-border-width-0));
|
|
59
|
+
}
|
|
60
|
+
|
|
43
61
|
.body::-webkit-scrollbar {
|
|
44
62
|
width: 6px;
|
|
45
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-app-shell-side-nav.css.js","sourceRoot":"","sources":["../../../src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,kJAAkJ;AAClJ,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"nile-app-shell-side-nav.css.js","sourceRoot":"","sources":["../../../src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,kJAAkJ;AAClJ,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwExB,CAAC;AAEF,eAAe,CAAC,MAAM,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 { css } from 'lit';\n\n/** AppShellSideNav CSS: the shell owns the track width, this owns what happens inside it — a pinned header, a scrolling body, a pinned footer. */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n overflow: hidden;\n /* The nav takes the sidebar surface (bg-tertiary), the same token the shell paints behind it, so the nav and page still share one. */\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* A slotted side bar shows the canvas through, like the nav itself; the shell's own slotted rule can't reach this deep. */\n ::slotted(nile-side-bar) {\n background: transparent;\n }\n\n .header,\n .footer {\n flex: 0 0 auto;\n display: block;\n }\n\n .body {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n /* 16px on NxtGen; enterprise keeps 12px. Only the vertical inset: groups, search and a nested sidebar bring their own horizontal one. */\n padding-block: var(--nile-spacing-lg, var(--ng-spacing-xl));\n scrollbar-width: thin;\n }\n\n /* Anything else slotted into the body (not the pinned header or footer) takes the same inset horizontally, since it brings none of its own. */\n .body ::slotted(:not(nile-side-bar):not(nile-side-bar-group):not(nile-side-bar-search)) {\n margin-inline: var(--nile-spacing-lg, var(--ng-spacing-xl));\n }\n\n /* A nile-side-bar nested here fills the track: it cancels the body's vertical padding, an inline width is clamped to the track, and it drops its own surface and right edge. An overlay sidebar leaves the flow and keeps its own geometry. */\n ::slotted(nile-side-bar:not([overlay])) {\n margin-block: calc(-1 * var(--nile-spacing-lg, var(--ng-spacing-xl)));\n width: auto;\n max-width: 100%;\n height: calc(100% + 2 * var(--nile-spacing-lg, var(--ng-spacing-xl)));\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));\n border-right: var(--nile-border-width-0, var(--ng-border-width-0));\n }\n\n .body::-webkit-scrollbar {\n width: 6px;\n }\n\n .body::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .body::-webkit-scrollbar-thumb {\n background-color: var(\n --nile-colors-neutral-500,\n var(--ng-colors-border-primary)\n );\n border-radius: 10px;\n }\n\n /* A rail has no room for a horizontal scrollbar or for wide children. */\n :host([collapsed]) .body {\n overflow-x: hidden;\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -24,18 +24,24 @@ import NileElement from '../internal/nile-element';
|
|
|
24
24
|
* @csspart body - The scrolling nav body.
|
|
25
25
|
* @csspart footer - The pinned footer.
|
|
26
26
|
*
|
|
27
|
-
* @cssproperty [--nile-app-shell-side-nav-padding=12px] - Body inset.
|
|
28
|
-
* @cssproperty [--nile-app-shell-side-nav-bg=transparent] - Surface behind the nav; transparent so the nav and page share one.
|
|
29
27
|
*/
|
|
30
28
|
export declare class NileAppShellSideNav extends NileElement {
|
|
31
29
|
static get styles(): CSSResultArray;
|
|
32
30
|
private shellLink;
|
|
31
|
+
private collapsedObserver?;
|
|
32
|
+
private collapsedApplied?;
|
|
33
|
+
private ownsCollapsed;
|
|
34
|
+
private applyCollapsed;
|
|
35
|
+
private pushCollapsed;
|
|
36
|
+
private onCollapsedMutations;
|
|
33
37
|
/** Mirrors the shell's effective rail state. Set by the shell; treat it as read-only and style against it (`nile-app-shell-side-nav[collapsed] .label`). */
|
|
34
38
|
collapsed: boolean;
|
|
35
39
|
/** Id of the shell to follow. Defaults to the nearest ancestor. */
|
|
36
40
|
shell?: string;
|
|
37
41
|
connectedCallback(): void;
|
|
42
|
+
disconnectedCallback(): void;
|
|
38
43
|
protected willUpdate(): void;
|
|
44
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
39
45
|
render(): TemplateResult;
|
|
40
46
|
}
|
|
41
47
|
export default NileAppShellSideNav;
|
|
@@ -10,6 +10,22 @@ import { customElement, property } from 'lit/decorators.js';
|
|
|
10
10
|
import { styles } from './nile-app-shell-side-nav.css';
|
|
11
11
|
import { AppShellController } from '../nile-app-shell/shell-controller';
|
|
12
12
|
import NileElement from '../internal/nile-element';
|
|
13
|
+
/** The sidebar descendants whose layout keys off their own `[collapsed]` attribute. */
|
|
14
|
+
const COLLAPSIBLE = [
|
|
15
|
+
'nile-side-bar-logo',
|
|
16
|
+
'nile-side-bar-header-switcher',
|
|
17
|
+
'nile-side-bar-search',
|
|
18
|
+
'nile-side-bar-footer-item',
|
|
19
|
+
'nile-side-bar-group-item',
|
|
20
|
+
'nile-side-bar-group',
|
|
21
|
+
'nile-side-bar-header',
|
|
22
|
+
'nile-side-bar-group-item-text',
|
|
23
|
+
'nile-side-bar-group-item-icon',
|
|
24
|
+
'nile-side-bar-expand',
|
|
25
|
+
'nile-side-bar',
|
|
26
|
+
];
|
|
27
|
+
/** The elements that own collapsed state for what is inside them. */
|
|
28
|
+
const COLLAPSE_CONTAINERS = 'nile-side-bar, nile-app-shell-side-nav';
|
|
13
29
|
/**
|
|
14
30
|
* @summary The shell's left region — the navigation track; mirrors the shell's rail state so nav content can style against it.
|
|
15
31
|
*
|
|
@@ -28,24 +44,57 @@ import NileElement from '../internal/nile-element';
|
|
|
28
44
|
* @csspart body - The scrolling nav body.
|
|
29
45
|
* @csspart footer - The pinned footer.
|
|
30
46
|
*
|
|
31
|
-
* @cssproperty [--nile-app-shell-side-nav-padding=12px] - Body inset.
|
|
32
|
-
* @cssproperty [--nile-app-shell-side-nav-bg=transparent] - Surface behind the nav; transparent so the nav and page share one.
|
|
33
47
|
*/
|
|
34
48
|
let NileAppShellSideNav = class NileAppShellSideNav extends NileElement {
|
|
35
49
|
constructor() {
|
|
36
50
|
super(...arguments);
|
|
37
51
|
this.shellLink = new AppShellController(this);
|
|
52
|
+
this.onCollapsedMutations = (records) => {
|
|
53
|
+
for (const record of records) {
|
|
54
|
+
for (const node of record.addedNodes) {
|
|
55
|
+
if (node instanceof Element)
|
|
56
|
+
this.applyCollapsed(node, this.collapsed);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
38
60
|
/** Mirrors the shell's effective rail state. Set by the shell; treat it as read-only and style against it (`nile-app-shell-side-nav[collapsed] .label`). */
|
|
39
61
|
this.collapsed = false;
|
|
40
62
|
}
|
|
41
63
|
static get styles() {
|
|
42
64
|
return [styles];
|
|
43
65
|
}
|
|
66
|
+
ownsCollapsed(el) {
|
|
67
|
+
return el.parentElement?.closest(COLLAPSE_CONTAINERS) === this;
|
|
68
|
+
}
|
|
69
|
+
applyCollapsed(root, collapsed) {
|
|
70
|
+
const selector = COLLAPSIBLE.join(',');
|
|
71
|
+
const found = [...root.querySelectorAll(selector)];
|
|
72
|
+
if (root.matches(selector))
|
|
73
|
+
found.unshift(root);
|
|
74
|
+
for (const el of found) {
|
|
75
|
+
if (this.ownsCollapsed(el))
|
|
76
|
+
el.toggleAttribute('collapsed', collapsed);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
pushCollapsed() {
|
|
80
|
+
this.collapsedApplied = this.collapsed;
|
|
81
|
+
this.applyCollapsed(this, this.collapsedApplied);
|
|
82
|
+
}
|
|
44
83
|
connectedCallback() {
|
|
45
84
|
super.connectedCallback();
|
|
46
85
|
// Claim the shell's left region unless the author placed it elsewhere.
|
|
47
86
|
if (!this.hasAttribute('slot'))
|
|
48
87
|
this.setAttribute('slot', 'side-nav');
|
|
88
|
+
this.collapsedObserver = new MutationObserver(this.onCollapsedMutations);
|
|
89
|
+
this.collapsedObserver.observe(this, { childList: true, subtree: true });
|
|
90
|
+
// Reconnected (moved) with children already in place: re-apply the current state.
|
|
91
|
+
if (this.hasUpdated)
|
|
92
|
+
this.pushCollapsed();
|
|
93
|
+
}
|
|
94
|
+
disconnectedCallback() {
|
|
95
|
+
super.disconnectedCallback();
|
|
96
|
+
this.collapsedObserver?.disconnect();
|
|
97
|
+
this.collapsedObserver = undefined;
|
|
49
98
|
}
|
|
50
99
|
willUpdate() {
|
|
51
100
|
this.shellLink.shellId = this.shell;
|
|
@@ -53,6 +102,11 @@ let NileAppShellSideNav = class NileAppShellSideNav extends NileElement {
|
|
|
53
102
|
if (shell)
|
|
54
103
|
this.collapsed = shell.rail;
|
|
55
104
|
}
|
|
105
|
+
updated(changed) {
|
|
106
|
+
super.updated(changed);
|
|
107
|
+
if (this.collapsed !== this.collapsedApplied)
|
|
108
|
+
this.pushCollapsed();
|
|
109
|
+
}
|
|
56
110
|
render() {
|
|
57
111
|
return html `
|
|
58
112
|
<slot name="header" part="header" class="header"></slot>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-app-shell-side-nav.js","sourceRoot":"","sources":["../../../src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAkC,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD
|
|
1
|
+
{"version":3,"file":"nile-app-shell-side-nav.js","sourceRoot":"","sources":["../../../src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAkC,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,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,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC;QACpC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,KAAK;YAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;IACzC,CAAC;IAES,OAAO,CAAC,OAA6B;QAC7C,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,gBAAgB;YAAE,IAAI,CAAC,aAAa,EAAE,CAAC;IACrE,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;;;;KAIV,CAAC;IACJ,CAAC;CACF,CAAA;AAxCC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDAChB;AAI3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACZ;AA1CJ,mBAAmB;IAD/B,aAAa,CAAC,yBAAyB,CAAC;GAC5B,mBAAmB,CA8E/B;;AAED,eAAe,mBAAmB,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, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-app-shell-side-nav.css';\nimport { AppShellController } from '../nile-app-shell/shell-controller';\nimport NileElement from '../internal/nile-element';\n\n/** The sidebar descendants whose layout keys off their own `[collapsed]` attribute. */\nconst COLLAPSIBLE = [\n 'nile-side-bar-logo',\n 'nile-side-bar-header-switcher',\n 'nile-side-bar-search',\n 'nile-side-bar-footer-item',\n 'nile-side-bar-group-item',\n 'nile-side-bar-group',\n 'nile-side-bar-header',\n 'nile-side-bar-group-item-text',\n 'nile-side-bar-group-item-icon',\n 'nile-side-bar-expand',\n 'nile-side-bar',\n];\n\n/** The elements that own collapsed state for what is inside them. */\nconst COLLAPSE_CONTAINERS = 'nile-side-bar, nile-app-shell-side-nav';\n\n/**\n * @summary The shell's left region — the navigation track; mirrors the shell's rail state so nav content can style against it.\n *\n * @status stable\n * @since 2.0\n *\n * @tag nile-app-shell-side-nav\n *\n * @dependency nile-app-shell\n *\n * @slot - The nav body. Scrolls.\n * @slot header - Pinned above the scroll region — a wordmark or product switcher.\n * @slot footer - Pinned below it — an account row or help link.\n *\n * @csspart header - The pinned header.\n * @csspart body - The scrolling nav body.\n * @csspart footer - The pinned footer.\n *\n */\n@customElement('nile-app-shell-side-nav')\nexport class NileAppShellSideNav extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private shellLink = new AppShellController(this);\n\n private collapsedObserver?: MutationObserver;\n private collapsedApplied?: boolean;\n\n private ownsCollapsed(el: Element): boolean {\n return el.parentElement?.closest(COLLAPSE_CONTAINERS) === this;\n }\n\n private applyCollapsed(root: Element, collapsed: boolean): void {\n const selector = COLLAPSIBLE.join(',');\n const found = [...root.querySelectorAll(selector)];\n if (root.matches(selector)) found.unshift(root);\n for (const el of found) {\n if (this.ownsCollapsed(el)) el.toggleAttribute('collapsed', collapsed);\n }\n }\n\n private pushCollapsed(): void {\n this.collapsedApplied = this.collapsed;\n this.applyCollapsed(this, this.collapsedApplied);\n }\n\n private onCollapsedMutations = (records: MutationRecord[]): void => {\n for (const record of records) {\n for (const node of record.addedNodes) {\n if (node instanceof Element) this.applyCollapsed(node, this.collapsed);\n }\n }\n };\n\n /** Mirrors the shell's effective rail state. Set by the shell; treat it as read-only and style against it (`nile-app-shell-side-nav[collapsed] .label`). */\n @property({ type: Boolean, reflect: true })\n collapsed: boolean = false;\n\n /** Id of the shell to follow. Defaults to the nearest ancestor. */\n @property({ type: String })\n shell?: string;\n\n public connectedCallback(): void {\n super.connectedCallback();\n // Claim the shell's left region unless the author placed it elsewhere.\n if (!this.hasAttribute('slot')) this.setAttribute('slot', 'side-nav');\n this.collapsedObserver = new MutationObserver(this.onCollapsedMutations);\n this.collapsedObserver.observe(this, { childList: true, subtree: true });\n // Reconnected (moved) with children already in place: re-apply the current state.\n if (this.hasUpdated) this.pushCollapsed();\n }\n\n public disconnectedCallback(): void {\n super.disconnectedCallback();\n this.collapsedObserver?.disconnect();\n this.collapsedObserver = undefined;\n }\n\n protected willUpdate(): void {\n this.shellLink.shellId = this.shell;\n const shell = this.shellLink.shell;\n if (shell) this.collapsed = shell.rail;\n }\n\n protected updated(changed: Map<string, unknown>): void {\n super.updated(changed);\n if (this.collapsed !== this.collapsedApplied) this.pushCollapsed();\n }\n\n public render(): TemplateResult {\n return html`\n <slot name=\"header\" part=\"header\" class=\"header\"></slot>\n <div class=\"body\" part=\"body\"><slot></slot></div>\n <slot name=\"footer\" part=\"footer\" class=\"footer\"></slot>\n `;\n }\n}\n\nexport default NileAppShellSideNav;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-app-shell-side-nav': NileAppShellSideNav;\n }\n}\n"]}
|
|
@@ -22,7 +22,7 @@ export const styles = css `
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.inner__text span {
|
|
25
|
-
color: var(--nile-colors-dark-900);
|
|
25
|
+
color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));
|
|
26
26
|
text-align: center;
|
|
27
27
|
font-feature-settings: 'clig' off, 'liga' off;
|
|
28
28
|
font-family: var(--nile-font-family-serif);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-button-filter.css.js","sourceRoot":"","sources":["../../../src/nile-button-filter/nile-button-filter.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BxB,CAAC;AAEF,eAAe,CAAC,MAAM,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 { css } from 'lit';\n\n/**\n * ButtonFilter CSS\n */\nexport const styles = css`\n :host {\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .inner__text {\n display: flex;\n gap: var(--nile-radius-base-standard);\n\t align-items: flex-start;\n }\n\n .inner__text span {\n color: var(--nile-colors-dark-900);\n text-align: center;\n font-feature-settings: 'clig' off, 'liga' off;\n font-family: var(--nile-font-family-serif);\n font-size: var(--nile-font-size-base);\n font-style: normal;\n font-weight: var(--nile-font-weight-semi-bold);\n line-height: var(--nile-font-size-base); /* 100% */\n letter-spacing: 0.2px;\n }\n\n .inner__text nile-badge {\n color:var(--nile-colors-white-base);\n }\n`;\n\nexport default [styles];\n"]}
|
|
1
|
+
{"version":3,"file":"nile-button-filter.css.js","sourceRoot":"","sources":["../../../src/nile-button-filter/nile-button-filter.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BxB,CAAC;AAEF,eAAe,CAAC,MAAM,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 { css } from 'lit';\n\n/**\n * ButtonFilter CSS\n */\nexport const styles = css`\n :host {\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .inner__text {\n display: flex;\n gap: var(--nile-radius-base-standard);\n\t align-items: flex-start;\n }\n\n .inner__text span {\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n text-align: center;\n font-feature-settings: 'clig' off, 'liga' off;\n font-family: var(--nile-font-family-serif);\n font-size: var(--nile-font-size-base);\n font-style: normal;\n font-weight: var(--nile-font-weight-semi-bold);\n line-height: var(--nile-font-size-base); /* 100% */\n letter-spacing: 0.2px;\n }\n\n .inner__text nile-badge {\n color:var(--nile-colors-white-base);\n }\n`;\n\nexport default [styles];\n"]}
|