@aquera/nile-elements 1.3.1-beta-1.0 → 1.3.1-beta-1
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 +6 -0
- package/demo/index.css +1 -4
- package/demo/index.html +15 -38
- package/demo/nxtgen.css +6 -0
- package/demo/variables.css +6 -2
- package/dist/{fixture-d1470b58.cjs.js → fixture-54600b35.cjs.js} +2 -2
- package/dist/{fixture-d1470b58.cjs.js.map → fixture-54600b35.cjs.js.map} +1 -1
- package/dist/{fixture-1c49c014.cjs.js → fixture-5b79f853.cjs.js} +2 -2
- package/dist/{fixture-dff65c89.cjs.js.map → fixture-5b79f853.cjs.js.map} +1 -1
- package/dist/{fixture-dff65c89.cjs.js → fixture-73855806.cjs.js} +2 -2
- package/dist/{fixture-1c49c014.cjs.js.map → fixture-73855806.cjs.js.map} +1 -1
- package/dist/fixture-90b199c4.esm.js +569 -0
- package/dist/{fixture-985bba12.esm.js → fixture-9871e8a9.esm.js} +1 -1
- package/dist/fixture-c1d78368.cjs.js +395 -0
- package/dist/fixture-c1d78368.cjs.js.map +1 -0
- package/dist/fixture-cf7bfcf5.esm.js +569 -0
- package/dist/fixture-dbd66009.cjs.js +395 -0
- package/dist/fixture-dbd66009.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +981 -628
- package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
- package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
- package/dist/nile-auto-complete/index.cjs.js +1 -1
- package/dist/nile-auto-complete/index.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +2 -2
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.test.esm.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js +1 -1
- package/dist/nile-button/nile-button.test.esm.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
- package/dist/nile-calendar/index.cjs.js +1 -1
- package/dist/nile-calendar/index.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- 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 +387 -110
- package/dist/nile-calendar/nile-calendar.enum.cjs.js +2 -0
- package/dist/nile-calendar/nile-calendar.enum.cjs.js.map +1 -0
- package/dist/nile-calendar/nile-calendar.enum.esm.js +1 -0
- package/dist/nile-calendar/nile-calendar.esm.js +216 -108
- package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
- package/dist/nile-card/nile-card.test.cjs.js +1 -1
- package/dist/nile-card/nile-card.test.esm.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
- package/dist/nile-chip/index.cjs.js +1 -1
- package/dist/nile-chip/index.esm.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.esm.js +2 -2
- package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.test.esm.js +1 -1
- package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js +2 -0
- package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js.map +1 -0
- package/dist/nile-code-editor/backup_nile-code-editor copy.esm.js +1 -0
- package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
- package/dist/nile-dropdown/index.cjs.js +1 -1
- package/dist/nile-dropdown/index.esm.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
- package/dist/nile-dropdown/nile-dropdown.esm.js +2 -2
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js.map +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.esm.js +6 -6
- package/dist/nile-dropdown/portal-manager.cjs.js +1 -1
- package/dist/nile-dropdown/portal-manager.cjs.js.map +1 -1
- package/dist/nile-dropdown/portal-manager.esm.js +1 -1
- package/dist/nile-dropdown/portal-utils.cjs.js +1 -1
- package/dist/nile-dropdown/portal-utils.cjs.js.map +1 -1
- package/dist/nile-dropdown/portal-utils.esm.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.test.esm.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.test.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.test.esm.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +1 -1
- package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
- package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
- package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
- package/dist/nile-hero/nile-hero.test.esm.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
- package/dist/nile-icon/nile-icon.test.esm.js +1 -1
- package/dist/nile-inline-edit/index.cjs.js +1 -1
- package/dist/nile-inline-edit/index.esm.js +1 -1
- package/dist/nile-inline-edit/nile-inline-edit-utils.cjs.js +2 -0
- package/dist/nile-inline-edit/nile-inline-edit-utils.cjs.js.map +1 -0
- package/dist/nile-inline-edit/nile-inline-edit-utils.esm.js +1 -0
- package/dist/nile-inline-edit/nile-inline-edit.cjs.js +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.cjs.js.map +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.esm.js +4 -4
- package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.esm.js +2 -10
- package/dist/nile-inline-sidebar/nile-inline-sidebar.esm.js +6 -10
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js.map +1 -1
- 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 +2 -8
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +2 -2
- package/dist/nile-input/nile-input.test.cjs.js +1 -1
- package/dist/nile-input/nile-input.test.esm.js +1 -1
- package/dist/nile-link/nile-link.css.cjs.js +1 -1
- package/dist/nile-link/nile-link.css.cjs.js.map +1 -1
- package/dist/nile-link/nile-link.css.esm.js +3 -3
- package/dist/nile-link/nile-link.test.cjs.js +1 -1
- package/dist/nile-link/nile-link.test.esm.js +1 -1
- package/dist/nile-lite-tooltip/index.cjs.js +1 -1
- package/dist/nile-lite-tooltip/index.esm.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js.map +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.esm.js +1 -1
- package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
- package/dist/nile-loader/nile-loader.test.esm.js +1 -1
- package/dist/nile-popover/index.cjs.js +1 -1
- package/dist/nile-popover/index.esm.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +3 -3
- package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.esm.js +4 -4
- package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.test.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.test.esm.js +4 -4
- package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.test.esm.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
- package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.test.esm.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/index.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +2 -2
- package/dist/nile-select/nile-select.test.cjs.js +1 -1
- package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.test.esm.js +1 -1
- package/dist/nile-select/virtual-scroll-helper.cjs.js +1 -1
- package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -1
- package/dist/nile-select/virtual-scroll-helper.esm.js +0 -2
- 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 +29 -24
- package/dist/nile-side-bar/nile-side-bar.esm.js +1 -7
- package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js.map +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.esm.js +5 -3
- package/dist/nile-side-bar-expand/nile-side-bar-expand.esm.js +8 -8
- 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 +3 -5
- 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 +5 -17
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +3 -3
- 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 +7 -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 +56 -58
- package/dist/nile-sidebar/index.cjs.js +2 -0
- package/dist/nile-sidebar/index.cjs.js.map +1 -0
- package/dist/nile-sidebar/index.esm.js +75 -0
- package/dist/nile-sidebar-menu/index.cjs.js +2 -0
- package/dist/nile-sidebar-menu/index.cjs.js.map +1 -0
- package/dist/nile-sidebar-menu/index.esm.js +1 -0
- package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js +2 -0
- package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js.map +1 -0
- package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js +2 -0
- package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js.map +1 -0
- package/dist/nile-sidebar-menu/nile-sidebar-menu.css.esm.js +38 -0
- package/dist/nile-sidebar-menu/nile-sidebar-menu.esm.js +10 -0
- package/dist/nile-sidebar-menu-items/index.cjs.js +2 -0
- package/dist/nile-sidebar-menu-items/index.cjs.js.map +1 -0
- package/dist/nile-sidebar-menu-items/index.esm.js +1 -0
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js +2 -0
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js.map +1 -0
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js +2 -0
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js.map +1 -0
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.esm.js +36 -0
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.esm.js +15 -0
- package/dist/nile-sidebar-wrapper/index.cjs.js +2 -0
- package/dist/nile-sidebar-wrapper/index.cjs.js.map +1 -0
- package/dist/nile-sidebar-wrapper/index.esm.js +1 -0
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js +2 -0
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js.map +1 -0
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js +2 -0
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js.map +1 -0
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.esm.js +105 -0
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.esm.js +16 -0
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
- package/dist/nile-tooltip/index.cjs.js +1 -1
- package/dist/nile-tooltip/index.esm.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.esm.js +2 -2
- package/dist/nile-virtual-select/group-manager.cjs.js +2 -0
- package/dist/nile-virtual-select/group-manager.cjs.js.map +1 -0
- package/dist/nile-virtual-select/group-manager.esm.js +1 -0
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/index.esm.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +2 -2
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +13 -13
- package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +1 -1
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js +2 -0
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js.map +1 -0
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.esm.js +231 -0
- package/dist/scopedElementsWrapper-4c29be11.esm.js +7 -0
- package/dist/scopedElementsWrapper-a112fc73.cjs.js +6 -0
- package/dist/scopedElementsWrapper-a112fc73.cjs.js.map +1 -0
- package/dist/src/internal/portal-manager.d.ts +53 -0
- package/dist/src/internal/portal-manager.js +196 -0
- package/dist/src/internal/portal-manager.js.map +1 -0
- package/dist/src/internal/portal.d.ts +60 -0
- package/dist/src/internal/portal.js +199 -0
- package/dist/src/internal/portal.js.map +1 -0
- package/dist/src/internal/resizable-helper.d.ts +59 -0
- package/dist/src/internal/resizable-helper.js +115 -0
- package/dist/src/internal/resizable-helper.js.map +1 -0
- package/dist/src/internal/resizable-styles.d.ts +16 -0
- package/dist/src/internal/resizable-styles.js +144 -0
- package/dist/src/internal/resizable-styles.js.map +1 -0
- package/dist/src/internal/virtualizer-error-handler.d.ts +30 -0
- package/dist/src/internal/virtualizer-error-handler.js +82 -0
- package/dist/src/internal/virtualizer-error-handler.js.map +1 -0
- package/dist/src/lib/index.d.ts +7 -0
- package/dist/src/lib/index.js +8 -0
- package/dist/src/lib/index.js.map +1 -0
- package/dist/src/lib/virtualize.d.ts +32 -0
- package/dist/src/lib/virtualize.js +105 -0
- package/dist/src/lib/virtualize.js.map +1 -0
- package/dist/src/lib/virtualize.test.d.ts +7 -0
- package/dist/src/lib/virtualize.test.js +57 -0
- package/dist/src/lib/virtualize.test.js.map +1 -0
- package/dist/src/nile-auto-complete/nile-auto-complete.d.ts +4 -0
- package/dist/src/nile-auto-complete/nile-auto-complete.js +39 -0
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-badge/__snapshots__/nile-badge.test.snap.js +17 -0
- package/dist/src/nile-calendar/__snapshots__/nile-calendar.test.snap.js +310 -0
- package/dist/src/nile-calendar/nile-calendar.css.js +385 -108
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.d.ts +17 -1
- package/dist/src/nile-calendar/nile-calendar.js +345 -108
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-card/__snapshots__/nile-card.test.snap.js +34 -0
- package/dist/src/nile-checkbox/__snapshots__/nile-checkbox.test.snap.js +31 -0
- package/dist/src/nile-chip/nile-chip.d.ts +4 -0
- package/dist/src/nile-chip/nile-chip.js +46 -0
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/nile-code-editor/Old_theme copy.d.ts +191 -0
- package/dist/src/nile-code-editor/Old_theme copy.js +193 -0
- package/dist/src/nile-code-editor/Old_theme copy.js.map +1 -0
- package/dist/src/nile-code-editor/backup_nile-code-editor copy.d.ts +0 -0
- package/dist/src/nile-code-editor/backup_nile-code-editor copy.js +675 -0
- package/dist/src/nile-code-editor/backup_nile-code-editor copy.js.map +1 -0
- package/dist/src/nile-code-editor/theme copy.d.ts +191 -0
- package/dist/src/nile-code-editor/theme copy.js +193 -0
- package/dist/src/nile-code-editor/theme copy.js.map +1 -0
- package/dist/src/nile-dropdown/nile-dropdown.d.ts +4 -1
- package/dist/src/nile-dropdown/nile-dropdown.js +37 -1
- package/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
- package/dist/src/nile-dropdown/portal-manager.js +2 -0
- package/dist/src/nile-dropdown/portal-manager.js.map +1 -1
- package/dist/src/nile-dropdown/portal-utils.d.ts +1 -0
- package/dist/src/nile-dropdown/portal-utils.js +24 -0
- package/dist/src/nile-dropdown/portal-utils.js.map +1 -1
- package/dist/src/nile-floating-panel/anchor-manager.d.ts +26 -0
- package/dist/src/nile-floating-panel/anchor-manager.js +49 -0
- package/dist/src/nile-floating-panel/anchor-manager.js.map +1 -0
- package/dist/src/nile-floating-panel/content-manager.d.ts +23 -0
- package/dist/src/nile-floating-panel/content-manager.js +67 -0
- package/dist/src/nile-floating-panel/content-manager.js.map +1 -0
- package/dist/src/nile-floating-panel/event-manager.d.ts +38 -0
- package/dist/src/nile-floating-panel/event-manager.js +81 -0
- package/dist/src/nile-floating-panel/event-manager.js.map +1 -0
- package/dist/src/nile-floating-panel/index.d.ts +1 -0
- package/dist/src/nile-floating-panel/index.js +2 -0
- package/dist/src/nile-floating-panel/index.js.map +1 -0
- package/dist/src/nile-floating-panel/nile-floating-panel.css.d.ts +17 -0
- package/dist/src/nile-floating-panel/nile-floating-panel.css.js +51 -0
- package/dist/src/nile-floating-panel/nile-floating-panel.css.js.map +1 -0
- package/dist/src/nile-floating-panel/nile-floating-panel.d.ts +67 -0
- package/dist/src/nile-floating-panel/nile-floating-panel.js +203 -0
- package/dist/src/nile-floating-panel/nile-floating-panel.js.map +1 -0
- package/dist/src/nile-floating-panel/position-manager.d.ts +47 -0
- package/dist/src/nile-floating-panel/position-manager.js +94 -0
- package/dist/src/nile-floating-panel/position-manager.js.map +1 -0
- package/dist/src/nile-floating-panel/style-manager.d.ts +31 -0
- package/dist/src/nile-floating-panel/style-manager.js +74 -0
- package/dist/src/nile-floating-panel/style-manager.js.map +1 -0
- package/dist/src/nile-floating-panel/types.d.ts +29 -0
- package/dist/src/nile-floating-panel/types.js +8 -0
- package/dist/src/nile-floating-panel/types.js.map +1 -0
- package/dist/src/nile-grid/data-processor.d.ts +37 -0
- package/dist/src/nile-grid/data-processor.js +122 -0
- package/dist/src/nile-grid/data-processor.js.map +1 -0
- package/dist/src/nile-grid/event-handlers.d.ts +35 -0
- package/dist/src/nile-grid/event-handlers.js +158 -0
- package/dist/src/nile-grid/event-handlers.js.map +1 -0
- package/dist/src/nile-grid/renderer.d.ts +8 -0
- package/dist/src/nile-grid/renderer.js +78 -0
- package/dist/src/nile-grid/renderer.js.map +1 -0
- package/dist/src/nile-grid/resize-handler.d.ts +4 -0
- package/dist/src/nile-grid/resize-handler.js +36 -0
- package/dist/src/nile-grid/resize-handler.js.map +1 -0
- package/dist/src/nile-grid/types.d.ts +32 -0
- package/dist/src/nile-grid/types.js +2 -0
- package/dist/src/nile-grid/types.js.map +1 -0
- package/dist/src/nile-grid/utils.d.ts +4 -0
- package/dist/src/nile-grid/utils.js +32 -0
- package/dist/src/nile-grid/utils.js.map +1 -0
- package/dist/src/nile-hero/__snapshots__/nile-hero.test.snap.js +47 -0
- package/dist/src/nile-icon/__snapshots__/nile-icon.test.snap.js +16 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.d.ts +10 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.js +52 -1
- package/dist/src/nile-inline-edit/nile-inline-edit.js.map +1 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js +2 -10
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js +3 -11
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js +0 -6
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.d.ts +0 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js +0 -4
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js.map +1 -1
- package/dist/src/nile-input/__snapshots__/nile-input.test.snap.js +75 -0
- package/dist/src/nile-link/nile-link.css.js +3 -3
- package/dist/src/nile-link/nile-link.css.js.map +1 -1
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.d.ts +5 -1
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.js +43 -0
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.js.map +1 -1
- package/dist/src/nile-menu/portal-manager.d.ts +39 -0
- package/dist/src/nile-menu/portal-manager.js +340 -0
- package/dist/src/nile-menu/portal-manager.js.map +1 -0
- package/dist/src/nile-menu/portal-utils.d.ts +21 -0
- package/dist/src/nile-menu/portal-utils.js +128 -0
- package/dist/src/nile-menu/portal-utils.js.map +1 -0
- package/dist/src/nile-popover/__snapshots__/nile-popover.test.snap.js +22 -0
- package/dist/src/nile-popover/nile-popover.d.ts +4 -0
- package/dist/src/nile-popover/nile-popover.js +39 -0
- package/dist/src/nile-popover/nile-popover.js.map +1 -1
- package/dist/src/nile-popover/popover-portal-handler.d.ts +21 -0
- package/dist/src/nile-popover/popover-portal-handler.js +106 -0
- package/dist/src/nile-popover/popover-portal-handler.js.map +1 -0
- package/dist/src/nile-portal-wrapper/index.d.ts +1 -0
- package/dist/src/nile-portal-wrapper/index.js +2 -0
- package/dist/src/nile-portal-wrapper/index.js.map +1 -0
- package/dist/src/nile-portal-wrapper/nile-portal-wrapper.d.ts +47 -0
- package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js +451 -0
- package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js.map +1 -0
- package/dist/src/nile-select/body-append-manager.d.ts +90 -0
- package/dist/src/nile-select/body-append-manager.js +298 -0
- package/dist/src/nile-select/body-append-manager.js.map +1 -0
- package/dist/src/nile-select/nile-select.d.ts +1 -5
- package/dist/src/nile-select/nile-select.js +28 -67
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-select/virtual-scroll-helper.js +0 -2
- package/dist/src/nile-select/virtual-scroll-helper.js.map +1 -1
- package/dist/src/nile-side-bar/nile-side-bar.css.js +27 -22
- package/dist/src/nile-side-bar/nile-side-bar.css.js.map +1 -1
- package/dist/src/nile-side-bar/nile-side-bar.js +1 -7
- package/dist/src/nile-side-bar/nile-side-bar.js.map +1 -1
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js +5 -3
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js.map +1 -1
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.d.ts +0 -2
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js +4 -12
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js.map +1 -1
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +1 -3
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js +3 -15
- 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 +0 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js +1 -8
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js.map +1 -1
- package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js +5 -2
- package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js.map +1 -1
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js +46 -48
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js.map +1 -1
- package/dist/src/nile-table-body/virtual-scroll-helper.d.ts +9 -0
- package/dist/src/nile-table-body/virtual-scroll-helper.js +24 -0
- package/dist/src/nile-table-body/virtual-scroll-helper.js.map +1 -0
- package/dist/src/nile-tooltip/nile-tooltip.d.ts +3 -0
- package/dist/src/nile-tooltip/nile-tooltip.js +36 -0
- package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
- package/dist/src/nile-virtual-select/body-append-helper.d.ts +16 -0
- package/dist/src/nile-virtual-select/body-append-helper.js +95 -0
- package/dist/src/nile-virtual-select/body-append-helper.js.map +1 -0
- package/dist/src/nile-virtual-select/group-manager.d.ts +32 -0
- package/dist/src/nile-virtual-select/group-manager.js +134 -0
- package/dist/src/nile-virtual-select/group-manager.js.map +1 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +2 -5
- package/dist/src/nile-virtual-select/nile-virtual-select.js +28 -66
- package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
- package/dist/src/nile-virtual-select/portal-utils.d.ts +65 -0
- package/dist/src/nile-virtual-select/portal-utils.js +376 -0
- package/dist/src/nile-virtual-select/portal-utils.js.map +1 -0
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.d.ts +273 -0
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js +1305 -0
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js.map +1 -0
- package/dist/src/nile-virtual-select/virtualizer-error-handler.d.ts +21 -0
- package/dist/src/nile-virtual-select/virtualizer-error-handler.js +56 -0
- package/dist/src/nile-virtual-select/virtualizer-error-handler.js.map +1 -0
- package/dist/src/nile-virtual-select-disabled/index.d.ts +1 -0
- package/dist/src/nile-virtual-select-disabled/index.js +2 -0
- package/dist/src/nile-virtual-select-disabled/index.js.map +1 -0
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.d.ts +12 -0
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js +538 -0
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js.map +1 -0
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.d.ts +299 -0
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js +1441 -0
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js.map +1 -0
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.d.ts +7 -0
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js +631 -0
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js.map +1 -0
- package/dist/src/nile-virtual-select-disabled/portal-manager.d.ts +45 -0
- package/dist/src/nile-virtual-select-disabled/portal-manager.js +333 -0
- package/dist/src/nile-virtual-select-disabled/portal-manager.js.map +1 -0
- package/dist/src/nile-virtual-select-disabled/renderer.d.ts +16 -0
- package/dist/src/nile-virtual-select-disabled/renderer.js +79 -0
- package/dist/src/nile-virtual-select-disabled/renderer.js.map +1 -0
- package/dist/src/nile-virtual-select-disabled/search-manager.d.ts +12 -0
- package/dist/src/nile-virtual-select-disabled/search-manager.js +40 -0
- package/dist/src/nile-virtual-select-disabled/search-manager.js.map +1 -0
- package/dist/src/nile-virtual-select-disabled/selection-manager.d.ts +12 -0
- package/dist/src/nile-virtual-select-disabled/selection-manager.js +64 -0
- package/dist/src/nile-virtual-select-disabled/selection-manager.js.map +1 -0
- package/dist/src/nile-virtual-select-disabled/types.d.ts +50 -0
- package/dist/src/nile-virtual-select-disabled/types.js +8 -0
- package/dist/src/nile-virtual-select-disabled/types.js.map +1 -0
- package/dist/src/nile-virtual-table-body/index.d.ts +2 -0
- package/dist/src/nile-virtual-table-body/index.js +3 -0
- package/dist/src/nile-virtual-table-body/index.js.map +1 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.d.ts +1 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js +44 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js.map +1 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.d.ts +50 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js +135 -0
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js.map +1 -0
- package/dist/src/nile-virtual-table-body/renderer.d.ts +16 -0
- package/dist/src/nile-virtual-table-body/renderer.js +49 -0
- package/dist/src/nile-virtual-table-body/renderer.js.map +1 -0
- package/dist/src/utilities/stepper-utils.d.ts +71 -0
- package/dist/src/utilities/stepper-utils.js +108 -0
- package/dist/src/utilities/stepper-utils.js.map +1 -0
- package/dist/src/version.js +2 -2
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/nile-auto-complete/nile-auto-complete.ts +41 -0
- package/src/nile-calendar/nile-calendar.css.ts +385 -108
- package/src/nile-calendar/nile-calendar.enum.ts +5 -0
- package/src/nile-calendar/nile-calendar.ts +374 -119
- package/src/nile-chip/nile-chip.ts +48 -0
- package/src/nile-dropdown/nile-dropdown.ts +39 -1
- package/src/nile-dropdown/portal-manager.ts +2 -0
- package/src/nile-dropdown/portal-utils.ts +26 -0
- package/src/nile-inline-edit/nile-inline-edit-utils.ts +94 -0
- package/src/nile-inline-edit/nile-inline-edit.ts +59 -1
- package/src/nile-inline-sidebar/nile-inline-sidebar.css.ts +2 -10
- package/src/nile-inline-sidebar/nile-inline-sidebar.ts +5 -17
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts +0 -6
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts +0 -1
- package/src/nile-link/nile-link.css.ts +3 -3
- package/src/nile-lite-tooltip/nile-lite-tooltip.ts +47 -1
- package/src/nile-popover/nile-popover.ts +43 -0
- package/src/nile-select/nile-select.ts +31 -87
- package/src/nile-select/virtual-scroll-helper.ts +0 -2
- package/src/nile-side-bar/nile-side-bar.css.ts +27 -22
- package/src/nile-side-bar/nile-side-bar.ts +1 -8
- package/src/nile-side-bar-expand/nile-side-bar-expand.css.ts +5 -3
- package/src/nile-side-bar-expand/nile-side-bar-expand.ts +4 -6
- package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +1 -3
- package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.ts +3 -15
- package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.ts +1 -9
- package/src/nile-side-bar-group/nile-side-bar-group.css.ts +5 -2
- package/src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts +47 -49
- package/src/nile-tooltip/nile-tooltip.ts +37 -0
- package/src/nile-virtual-select/nile-virtual-select.ts +31 -87
- package/src/utilities/visibility-manager.ts +104 -0
- package/vscode-html-custom-data.json +124 -50
- package/dist/assets/nile-elements-4b5c262d.css +0 -1
- package/dist/nile-light-tooltip/index.esm.js +0 -1
- package/dist/nile-light-tooltip/nile-light-tooltip.css.esm.js +0 -6
- package/dist/nile-light-tooltip/nile-light-tooltip.esm.js +0 -1
- package/dist/src/nile-light-tooltip/index.d.ts +0 -1
- package/dist/src/nile-light-tooltip/index.js +0 -2
- package/dist/src/nile-light-tooltip/index.js.map +0 -1
- package/dist/src/nile-light-tooltip/nile-light-tooltip.css.d.ts +0 -12
- package/dist/src/nile-light-tooltip/nile-light-tooltip.css.js +0 -18
- package/dist/src/nile-light-tooltip/nile-light-tooltip.css.js.map +0 -1
- package/dist/src/nile-light-tooltip/nile-light-tooltip.d.ts +0 -40
- package/dist/src/nile-light-tooltip/nile-light-tooltip.js +0 -101
- package/dist/src/nile-light-tooltip/nile-light-tooltip.js.map +0 -1
- package/dist/src/nile-menu/virtual-menu-search-manager.d.ts +0 -11
- package/dist/src/nile-menu/virtual-menu-search-manager.js +0 -43
- package/dist/src/nile-menu/virtual-menu-search-manager.js.map +0 -1
|
@@ -18,6 +18,7 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
|
18
18
|
import { HasSlotController } from '../internal/slot';
|
|
19
19
|
import NileElement, { NileFormControl } from '../internal/nile-element';
|
|
20
20
|
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
21
|
+
import { VisibilityManager } from '../utilities/visibility-manager.js';
|
|
21
22
|
|
|
22
23
|
interface CustomEventDetail {
|
|
23
24
|
value: string;
|
|
@@ -111,6 +112,11 @@ export class NileChip extends NileElement {
|
|
|
111
112
|
|
|
112
113
|
@property({ attribute:false}) renderItemFunction: (item:any)=>string = (item:any)=>item;
|
|
113
114
|
|
|
115
|
+
private visibilityManager?: VisibilityManager;
|
|
116
|
+
|
|
117
|
+
@property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;
|
|
118
|
+
|
|
119
|
+
@property({ type: Boolean, reflect: true }) enableTabClose = false;
|
|
114
120
|
|
|
115
121
|
@property({ type: Boolean }) showTooltip: boolean = false;
|
|
116
122
|
|
|
@@ -142,6 +148,45 @@ export class NileChip extends NileElement {
|
|
|
142
148
|
}
|
|
143
149
|
}
|
|
144
150
|
|
|
151
|
+
protected async firstUpdated(_changed: PropertyValues) {
|
|
152
|
+
await this.updateComplete;
|
|
153
|
+
|
|
154
|
+
const inputTarget =
|
|
155
|
+
this.noAutoComplete
|
|
156
|
+
? this.renderRoot.querySelector('nile-input')?.input
|
|
157
|
+
: this.autoComplete?.inputElement?.input || this.autoComplete?.inputElement;
|
|
158
|
+
|
|
159
|
+
this.visibilityManager = new VisibilityManager({
|
|
160
|
+
host: this,
|
|
161
|
+
target: inputTarget,
|
|
162
|
+
enableVisibilityEffect: this.enableVisibilityEffect,
|
|
163
|
+
enableTabClose: this.enableTabClose,
|
|
164
|
+
isOpen: () => this.isDropdownOpen,
|
|
165
|
+
onAnchorOutOfView: () => {
|
|
166
|
+
this.isDropdownOpen = false;
|
|
167
|
+
if (this.autoComplete) {
|
|
168
|
+
this.autoComplete.isDropdownOpen = false;
|
|
169
|
+
}
|
|
170
|
+
this.emit('nile-visibility-change', {
|
|
171
|
+
visible: false,
|
|
172
|
+
reason: 'anchor-out-of-view',
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
onDocumentHidden: () => {
|
|
176
|
+
this.isDropdownOpen = false;
|
|
177
|
+
if (this.autoComplete) {
|
|
178
|
+
this.autoComplete.isDropdownOpen = false;
|
|
179
|
+
}
|
|
180
|
+
this.emit('nile-visibility-change', {
|
|
181
|
+
visible: false,
|
|
182
|
+
reason: 'document-hidden',
|
|
183
|
+
});
|
|
184
|
+
},
|
|
185
|
+
emit: (event, detail) => this.emit(`nile-${event}`, detail),
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
|
|
145
190
|
private handleDocumentClick = (event: MouseEvent) => {
|
|
146
191
|
const path = event.composedPath();
|
|
147
192
|
if (!path.includes(this)) {
|
|
@@ -163,6 +208,7 @@ export class NileChip extends NileElement {
|
|
|
163
208
|
|
|
164
209
|
disconnectedCallback() {
|
|
165
210
|
super.disconnectedCallback();
|
|
211
|
+
this.visibilityManager?.cleanup();
|
|
166
212
|
document.removeEventListener('click', this.handleDocumentClick);
|
|
167
213
|
this.emit('nile-destroy');
|
|
168
214
|
}
|
|
@@ -394,6 +440,7 @@ export class NileChip extends NileElement {
|
|
|
394
440
|
if (this.noAutoComplete) {
|
|
395
441
|
return;
|
|
396
442
|
}
|
|
443
|
+
this.visibilityManager?.setup();
|
|
397
444
|
this.isDropdownOpen = true;
|
|
398
445
|
}
|
|
399
446
|
|
|
@@ -407,6 +454,7 @@ export class NileChip extends NileElement {
|
|
|
407
454
|
// Reset the input-related properties
|
|
408
455
|
this.inputValue = '';
|
|
409
456
|
this.isDropdownOpen = false;
|
|
457
|
+
this.visibilityManager?.cleanup();
|
|
410
458
|
if (!this.noAutoComplete && this.autoComplete) {
|
|
411
459
|
this.autoComplete.value = '';
|
|
412
460
|
this.autoComplete.handleFocus();
|
|
@@ -23,6 +23,7 @@ import type { NileMenu } from '../nile-menu';
|
|
|
23
23
|
import type { NilePopup } from '../nile-popup';
|
|
24
24
|
import '../nile-popup';
|
|
25
25
|
import { DropdownPortalManager } from './portal-manager';
|
|
26
|
+
import { VisibilityManager } from '../utilities/visibility-manager.js';
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* Nile icon component.
|
|
@@ -118,7 +119,13 @@ export class NileDropdown extends NileElement {
|
|
|
118
119
|
*/
|
|
119
120
|
@property({ type: Boolean, reflect: true }) portal = false;
|
|
120
121
|
|
|
122
|
+
@property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;
|
|
123
|
+
|
|
124
|
+
@property({ type: Boolean, reflect: true }) enableTabClose = false;
|
|
125
|
+
|
|
126
|
+
|
|
121
127
|
private portalManager: DropdownPortalManager | null = null;
|
|
128
|
+
private visibilityManager?: VisibilityManager;
|
|
122
129
|
|
|
123
130
|
connectedCallback() {
|
|
124
131
|
super.connectedCallback();
|
|
@@ -139,7 +146,8 @@ export class NileDropdown extends NileElement {
|
|
|
139
146
|
});
|
|
140
147
|
}
|
|
141
148
|
|
|
142
|
-
firstUpdated() {
|
|
149
|
+
protected async firstUpdated(_changed: PropertyValues) {
|
|
150
|
+
|
|
143
151
|
this.panel.hidden = !this.open;
|
|
144
152
|
|
|
145
153
|
// If the dropdown is visible on init, update its position
|
|
@@ -147,10 +155,38 @@ export class NileDropdown extends NileElement {
|
|
|
147
155
|
this.addOpenListeners();
|
|
148
156
|
this.popup.active = true;
|
|
149
157
|
}
|
|
158
|
+
|
|
159
|
+
await this.updateComplete;
|
|
160
|
+
const triggerNode = this.trigger.assignedElements({ flatten: true })[0] as HTMLElement | undefined;
|
|
161
|
+
|
|
162
|
+
this.visibilityManager = new VisibilityManager({
|
|
163
|
+
host: this,
|
|
164
|
+
target: triggerNode || null,
|
|
165
|
+
enableVisibilityEffect: this.enableVisibilityEffect,
|
|
166
|
+
enableTabClose: this.enableTabClose,
|
|
167
|
+
isOpen: () => this.open,
|
|
168
|
+
onAnchorOutOfView: () => {
|
|
169
|
+
this.hide();
|
|
170
|
+
this.emit('nile-visibility-change', {
|
|
171
|
+
visible: false,
|
|
172
|
+
reason: 'anchor-out-of-view',
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
onDocumentHidden: () => {
|
|
176
|
+
this.hide();
|
|
177
|
+
this.emit('nile-visibility-change', {
|
|
178
|
+
visible: false,
|
|
179
|
+
reason: 'document-hidden',
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
emit: (event, detail) => this.emit(`nile-${event}`, detail),
|
|
183
|
+
});
|
|
150
184
|
}
|
|
185
|
+
|
|
151
186
|
|
|
152
187
|
disconnectedCallback() {
|
|
153
188
|
super.disconnectedCallback();
|
|
189
|
+
this.visibilityManager?.cleanup();
|
|
154
190
|
this.removeOpenListeners();
|
|
155
191
|
this.hide();
|
|
156
192
|
this.emit('nile-destroy');
|
|
@@ -408,6 +444,7 @@ export class NileDropdown extends NileElement {
|
|
|
408
444
|
|
|
409
445
|
@watch('open', { waitUntilFirstUpdate: true })
|
|
410
446
|
async handleOpenChange() {
|
|
447
|
+
this.visibilityManager?.setup();
|
|
411
448
|
if (this.disabled) {
|
|
412
449
|
this.open = false;
|
|
413
450
|
return;
|
|
@@ -442,6 +479,7 @@ export class NileDropdown extends NileElement {
|
|
|
442
479
|
// Hide
|
|
443
480
|
this.emit('nile-hide');
|
|
444
481
|
this.removeOpenListeners();
|
|
482
|
+
this.visibilityManager?.cleanup();
|
|
445
483
|
|
|
446
484
|
if (this.portal && this.portalManager) {
|
|
447
485
|
this.portalManager.cleanupPortalAppend();
|
|
@@ -481,6 +481,8 @@ export class DropdownPortalManager {
|
|
|
481
481
|
updatePortalPanel(): void {
|
|
482
482
|
if (this.portalContainer && this.clonedPanel) {
|
|
483
483
|
PortalContentUtils.updatePortalPanel(this.clonedPanel, this.component);
|
|
484
|
+
// Re-setup event listeners after updating the panel content
|
|
485
|
+
this.setupPortalEventListeners();
|
|
484
486
|
this.forceReposition();
|
|
485
487
|
}
|
|
486
488
|
}
|
|
@@ -203,6 +203,7 @@ export class PortalContentUtils {
|
|
|
203
203
|
// Clone all assigned elements
|
|
204
204
|
assignedElements.forEach((element: Element) => {
|
|
205
205
|
const clonedElement = element.cloneNode(true) as HTMLElement;
|
|
206
|
+
this.processInlineEventHandlers(clonedElement);
|
|
206
207
|
panelContainer.appendChild(clonedElement);
|
|
207
208
|
});
|
|
208
209
|
|
|
@@ -229,9 +230,34 @@ export class PortalContentUtils {
|
|
|
229
230
|
|
|
230
231
|
assignedElements.forEach((element: Element) => {
|
|
231
232
|
const clonedElement = element.cloneNode(true) as HTMLElement;
|
|
233
|
+
this.processInlineEventHandlers(clonedElement);
|
|
232
234
|
clonedPanel.appendChild(clonedElement);
|
|
233
235
|
});
|
|
234
236
|
}
|
|
237
|
+
|
|
238
|
+
static processInlineEventHandlers(element: HTMLElement): void {
|
|
239
|
+
const eventHandlerAttrs = ['onclick', 'onchange', 'oninput', 'onsubmit', 'onfocus', 'onblur', 'onkeydown', 'onkeyup'];
|
|
240
|
+
|
|
241
|
+
eventHandlerAttrs.forEach(attr => {
|
|
242
|
+
const eventType = attr.replace('on', '');
|
|
243
|
+
const handler = element.getAttribute(attr);
|
|
244
|
+
if (handler) {
|
|
245
|
+
element.removeAttribute(attr);
|
|
246
|
+
element.addEventListener(eventType, (event: Event) => {
|
|
247
|
+
new Function('event', handler).call(element, event);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
element.querySelectorAll(`[${attr}]`).forEach(child => {
|
|
251
|
+
const childHandler = child.getAttribute(attr);
|
|
252
|
+
if (childHandler) {
|
|
253
|
+
child.removeAttribute(attr);
|
|
254
|
+
child.addEventListener(eventType, (event: Event) => {
|
|
255
|
+
new Function('event', childHandler).call(child, event);
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
}
|
|
235
261
|
}
|
|
236
262
|
|
|
237
263
|
export class PortalEventUtils {
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export function getSlottedElement(shadowRoot: ShadowRoot | null | undefined): HTMLElement | null {
|
|
9
|
+
if (!shadowRoot) return null;
|
|
10
|
+
const slot = shadowRoot.querySelector('slot');
|
|
11
|
+
if (!slot) return null;
|
|
12
|
+
const assignedElements = slot.assignedElements({ flatten: true });
|
|
13
|
+
return (assignedElements[0] as HTMLElement) || null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function getValueFromSlottedElement(shadowRoot: ShadowRoot | null | undefined): string {
|
|
17
|
+
const slottedElement = getSlottedElement(shadowRoot);
|
|
18
|
+
if (!slottedElement) return '';
|
|
19
|
+
const value = (slottedElement as any).value;
|
|
20
|
+
return value != null ? String(value) : '';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function getDisplayValue(value: string, maxPlaceholderLength: number): string {
|
|
24
|
+
if (value && maxPlaceholderLength > 0 && value.length > maxPlaceholderLength) {
|
|
25
|
+
return value.substring(0, maxPlaceholderLength) + '...';
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function setSlottedElementValue(shadowRoot: ShadowRoot | null | undefined, value: string): void {
|
|
31
|
+
const slottedElement = getSlottedElement(shadowRoot);
|
|
32
|
+
if (slottedElement && value) {
|
|
33
|
+
(slottedElement as any).value = value;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function updateSlottedElementValue(
|
|
38
|
+
updateComplete: Promise<boolean> | Promise<void>,
|
|
39
|
+
shadowRoot: ShadowRoot | null | undefined,
|
|
40
|
+
value: string
|
|
41
|
+
): void {
|
|
42
|
+
updateComplete.then(() => {
|
|
43
|
+
setSlottedElementValue(shadowRoot, value);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function updateValueFromSlottedElement(
|
|
48
|
+
shadowRoot: ShadowRoot | null | undefined,
|
|
49
|
+
currentValue: string
|
|
50
|
+
): string {
|
|
51
|
+
const newValue = getValueFromSlottedElement(shadowRoot);
|
|
52
|
+
return newValue !== currentValue ? newValue : currentValue;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function handleDocumentFocusIn(
|
|
56
|
+
event: FocusEvent,
|
|
57
|
+
component: HTMLElement,
|
|
58
|
+
isOpen: boolean
|
|
59
|
+
): { shouldClose: boolean; newValue: string | null } {
|
|
60
|
+
if (!isOpen) return { shouldClose: false, newValue: null };
|
|
61
|
+
|
|
62
|
+
const path = event.composedPath();
|
|
63
|
+
const isWithinComponent = path.includes(component);
|
|
64
|
+
|
|
65
|
+
if (!isWithinComponent) {
|
|
66
|
+
const shadowRoot = (component as any).shadowRoot;
|
|
67
|
+
const currentValue = (component as any).value || '';
|
|
68
|
+
const newValue = updateValueFromSlottedElement(shadowRoot, currentValue);
|
|
69
|
+
return { shouldClose: true, newValue };
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return { shouldClose: false, newValue: null };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function handleDocumentMouseDown(
|
|
76
|
+
event: MouseEvent,
|
|
77
|
+
component: HTMLElement,
|
|
78
|
+
isOpen: boolean
|
|
79
|
+
): { shouldClose: boolean; newValue: string | null } {
|
|
80
|
+
if (!isOpen) return { shouldClose: false, newValue: null };
|
|
81
|
+
|
|
82
|
+
const path = event.composedPath();
|
|
83
|
+
const isWithinComponent = path.includes(component);
|
|
84
|
+
|
|
85
|
+
if (!isWithinComponent) {
|
|
86
|
+
const shadowRoot = (component as any).shadowRoot;
|
|
87
|
+
const currentValue = (component as any).value || '';
|
|
88
|
+
const newValue = updateValueFromSlottedElement(shadowRoot, currentValue);
|
|
89
|
+
return { shouldClose: true, newValue };
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return { shouldClose: false, newValue: null };
|
|
93
|
+
}
|
|
94
|
+
|
|
@@ -14,6 +14,12 @@ import {
|
|
|
14
14
|
import { customElement, property } from 'lit/decorators.js';
|
|
15
15
|
import { styles } from './nile-inline-edit.css';
|
|
16
16
|
import NileElement from '../internal/nile-element';
|
|
17
|
+
import {
|
|
18
|
+
getDisplayValue,
|
|
19
|
+
updateSlottedElementValue,
|
|
20
|
+
handleDocumentFocusIn,
|
|
21
|
+
handleDocumentMouseDown,
|
|
22
|
+
} from './nile-inline-edit-utils';
|
|
17
23
|
|
|
18
24
|
/**
|
|
19
25
|
* Nile inline-edit component.
|
|
@@ -43,6 +49,12 @@ export class NileInlineEdit extends NileElement {
|
|
|
43
49
|
/** Gives the Value to the Inline Edit */
|
|
44
50
|
@property({ type: String, reflect: true }) value = '';
|
|
45
51
|
|
|
52
|
+
/** Maximum length for the placeholder value. Values longer than this will be truncated */
|
|
53
|
+
@property({ type: Number, attribute: 'max-placeholder-length' }) maxPlaceholderLength: number = 25;
|
|
54
|
+
|
|
55
|
+
/** Enables automatic closing when focus moves outside the component or when clicking outside */
|
|
56
|
+
@property({ type: Boolean, attribute: 'auto-close' }) autoClose: boolean = false;
|
|
57
|
+
|
|
46
58
|
/* #endregion */
|
|
47
59
|
|
|
48
60
|
/* #region Methods */
|
|
@@ -52,11 +64,57 @@ export class NileInlineEdit extends NileElement {
|
|
|
52
64
|
* @slot This is a slot test
|
|
53
65
|
*/
|
|
54
66
|
|
|
67
|
+
private handleCloseResult(result: { shouldClose: boolean; newValue: string | null }) {
|
|
68
|
+
if (result.shouldClose) {
|
|
69
|
+
if (result.newValue !== null) {
|
|
70
|
+
this.value = result.newValue;
|
|
71
|
+
}
|
|
72
|
+
this.open = false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
private handleDocumentFocusInWrapper = (event: FocusEvent) => {
|
|
77
|
+
const result = handleDocumentFocusIn(event, this, this.open);
|
|
78
|
+
this.handleCloseResult(result);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
private handleDocumentMouseDownWrapper = (event: MouseEvent) => {
|
|
82
|
+
const result = handleDocumentMouseDown(event, this, this.open);
|
|
83
|
+
this.handleCloseResult(result);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
connectedCallback() {
|
|
87
|
+
super.connectedCallback();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
updated(changedProperties: Map<string, unknown>) {
|
|
91
|
+
super.updated(changedProperties);
|
|
92
|
+
|
|
93
|
+
if (changedProperties.has('open') && this.autoClose) {
|
|
94
|
+
if (this.open) {
|
|
95
|
+
updateSlottedElementValue(this.updateComplete, this.shadowRoot, this.value);
|
|
96
|
+
document.addEventListener('focusin', this.handleDocumentFocusInWrapper, true);
|
|
97
|
+
document.addEventListener('mousedown', this.handleDocumentMouseDownWrapper, true);
|
|
98
|
+
} else {
|
|
99
|
+
document.removeEventListener('focusin', this.handleDocumentFocusInWrapper, true);
|
|
100
|
+
document.removeEventListener('mousedown', this.handleDocumentMouseDownWrapper, true);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
disconnectedCallback() {
|
|
106
|
+
super.disconnectedCallback();
|
|
107
|
+
document.removeEventListener('focusin', this.handleDocumentFocusInWrapper, true);
|
|
108
|
+
document.removeEventListener('mousedown', this.handleDocumentMouseDownWrapper, true);
|
|
109
|
+
}
|
|
110
|
+
|
|
55
111
|
private handleClick() {
|
|
56
112
|
this.open = true;
|
|
57
113
|
}
|
|
58
114
|
public render(): TemplateResult {
|
|
59
|
-
|
|
115
|
+
// Use truncated value for display, or placeholder if empty
|
|
116
|
+
const displayValue = this.autoClose ? getDisplayValue(this.value, this.maxPlaceholderLength) : this.value;
|
|
117
|
+
const textInsideContainer = displayValue || this.placeholder;
|
|
60
118
|
return html`
|
|
61
119
|
<div class="inline__edit--label" part="label">${this.label}</div>
|
|
62
120
|
${this.open
|
|
@@ -50,8 +50,8 @@ export const styles = css`
|
|
|
50
50
|
flex-direction: column;
|
|
51
51
|
gap: var(--nile-spacing-xs);
|
|
52
52
|
padding-right: var(--nile-spacing-xl);
|
|
53
|
-
padding-top: var(--nile-spacing-
|
|
54
|
-
padding-bottom: var(--nile-spacing-
|
|
53
|
+
padding-top: var(--nile-spacing-2xl);
|
|
54
|
+
padding-bottom: var(--nile-spacing-2xl);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
nile-side-bar-action-menu {
|
|
@@ -72,13 +72,6 @@ export const styles = css`
|
|
|
72
72
|
margin-left: 0;
|
|
73
73
|
margin-right: 0;
|
|
74
74
|
border-radius: 0;
|
|
75
|
-
color: black;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
nile-side-bar-action-menu-item[active]::part(base):hover {
|
|
80
|
-
background: var(--nile-colors-primary-100);
|
|
81
|
-
color: black;
|
|
82
75
|
}
|
|
83
76
|
|
|
84
77
|
nile-side-bar-action-menu-item::part(label) {
|
|
@@ -87,7 +80,6 @@ export const styles = css`
|
|
|
87
80
|
white-space: nowrap;
|
|
88
81
|
overflow: hidden;
|
|
89
82
|
text-overflow: ellipsis;
|
|
90
|
-
|
|
91
83
|
}
|
|
92
84
|
|
|
93
85
|
/* Transition for sidebar button when it is closed and opened */
|
|
@@ -111,7 +111,6 @@ export class NileInlineSidebar extends NileElement {
|
|
|
111
111
|
private toggleCollapse() {
|
|
112
112
|
if (this.fixed) return;
|
|
113
113
|
this.collapsed = !this.collapsed;
|
|
114
|
-
console.log('[Sidebar] Toggled collapse →', this.collapsed);
|
|
115
114
|
|
|
116
115
|
this.dispatchEvent(
|
|
117
116
|
new CustomEvent('nile-toggle', {
|
|
@@ -147,13 +146,8 @@ export class NileInlineSidebar extends NileElement {
|
|
|
147
146
|
|
|
148
147
|
private get menuItemsTemplate() {
|
|
149
148
|
if (!this.sidebarItems?.length) return null;
|
|
150
|
-
|
|
149
|
+
|
|
151
150
|
return this.sidebarItems.map((item, index) => {
|
|
152
|
-
const shouldShowTooltip = (item as any).tooltip;
|
|
153
|
-
const isTruncated =
|
|
154
|
-
item.scrollWidth > item.clientWidth ||
|
|
155
|
-
item.scrollHeight > item.clientHeight;
|
|
156
|
-
|
|
157
151
|
const content = html`
|
|
158
152
|
<nile-side-bar-action-menu-item
|
|
159
153
|
?disabled=${item.hasAttribute('disabled')}
|
|
@@ -163,22 +157,16 @@ export class NileInlineSidebar extends NileElement {
|
|
|
163
157
|
${item.textContent}
|
|
164
158
|
</nile-side-bar-action-menu-item>
|
|
165
159
|
`;
|
|
166
|
-
|
|
160
|
+
|
|
161
|
+
return this.showTooltip
|
|
167
162
|
? html`
|
|
168
|
-
<nile-
|
|
169
|
-
content=${item.textContent?.trim() || ''}
|
|
170
|
-
hoist
|
|
171
|
-
placement="right"
|
|
172
|
-
>
|
|
163
|
+
<nile-tooltip content=${item.textContent} hoist placement="right">
|
|
173
164
|
${content}
|
|
174
|
-
</nile-
|
|
165
|
+
</nile-tooltip>
|
|
175
166
|
`
|
|
176
167
|
: content;
|
|
177
168
|
});
|
|
178
169
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
170
|
|
|
183
171
|
public render(): TemplateResult {
|
|
184
172
|
return html`
|
|
@@ -37,10 +37,6 @@ export const styles = css`
|
|
|
37
37
|
font-weight: 500;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
:host([active]) .item:hover {
|
|
41
|
-
background: var(--nile-colors-primary-100);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
40
|
|
|
45
41
|
:host([disabled]) {
|
|
46
42
|
color: var(--nile-colors-neutral-500);
|
|
@@ -66,6 +62,4 @@ a {
|
|
|
66
62
|
text-decoration: none;
|
|
67
63
|
}
|
|
68
64
|
|
|
69
|
-
|
|
70
|
-
|
|
71
65
|
`;
|
|
@@ -29,7 +29,6 @@ export class NileInlineSidebarItem extends NileElement {
|
|
|
29
29
|
@property({ type: Boolean, reflect: true }) active = false;
|
|
30
30
|
@property({ type: Boolean, reflect: true }) disabled = false;
|
|
31
31
|
@property({ type: String }) href?: string;
|
|
32
|
-
@property({ type: Boolean, reflect: true }) tooltip = false;
|
|
33
32
|
|
|
34
33
|
public static get styles(): CSSResultArray {
|
|
35
34
|
return [styles];
|
|
@@ -44,14 +44,14 @@ export const styles = css`
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.link--disabled {
|
|
47
|
-
color: var(--nile-colors-primary-
|
|
47
|
+
color: var(--nile-colors-primary-500, var(--ng-colors-text-tertiary-600));
|
|
48
48
|
cursor: not-allowed;
|
|
49
49
|
pointer-events: none;
|
|
50
50
|
opacity: 0.6;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.link.link--disabled:not(.link__button) .link__label {
|
|
54
|
-
color: var(--nile-colors-primary-
|
|
54
|
+
color: var(--nile-colors-primary-500, var(--ng-colors-fg-disabled));
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
|
|
@@ -78,7 +78,7 @@ export const styles = css`
|
|
|
78
78
|
|
|
79
79
|
.link__button.link--disabled:hover,
|
|
80
80
|
.link__button.link--disabled:focus {
|
|
81
|
-
color: var(--nile-colors-primary-
|
|
81
|
+
color: var(--nile-colors-primary-500, var(--ng-colors-fg-disabled));
|
|
82
82
|
box-shadow: var(--nile-box-shadow-none, var(--ng-shadow-none));
|
|
83
83
|
border-radius: var(--nile-radius-sm, var(--ng-radius-md));
|
|
84
84
|
background: var(--nile-colors-dark-200, var(--ng-colors-bg-primary));
|
|
@@ -10,6 +10,7 @@ import tippy, {
|
|
|
10
10
|
createSingleton,
|
|
11
11
|
} from 'tippy.js';
|
|
12
12
|
import { parseFollowCursor, parseDuration, } from './utils';
|
|
13
|
+
import { VisibilityManager } from '../utilities/visibility-manager.js';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Nile lite-tooltip component.
|
|
@@ -115,6 +116,12 @@ export class NileliteTooltip extends NileElement {
|
|
|
115
116
|
|
|
116
117
|
@property({ type: Number }) interactiveBorder = 2;
|
|
117
118
|
|
|
119
|
+
private visibilityManager?: VisibilityManager;
|
|
120
|
+
|
|
121
|
+
@property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;
|
|
122
|
+
|
|
123
|
+
@property({ type: Boolean, reflect: true }) enableTabClose = false;
|
|
124
|
+
|
|
118
125
|
private tooltipInstances?: Instance[];
|
|
119
126
|
private singleInstance?: Instance;
|
|
120
127
|
private singletonInstance?: Instance;
|
|
@@ -126,9 +133,38 @@ export class NileliteTooltip extends NileElement {
|
|
|
126
133
|
super();
|
|
127
134
|
}
|
|
128
135
|
|
|
129
|
-
firstUpdated(): void {
|
|
136
|
+
protected firstUpdated(): void {
|
|
130
137
|
this.attachTooltip();
|
|
138
|
+
const targetEl =
|
|
139
|
+
(this.for && document.getElementById(this.for)) ||
|
|
140
|
+
(this.firstElementChild as HTMLElement | null);
|
|
141
|
+
|
|
142
|
+
this.visibilityManager = new VisibilityManager({
|
|
143
|
+
host: this,
|
|
144
|
+
target: targetEl,
|
|
145
|
+
enableVisibilityEffect: this.enableVisibilityEffect,
|
|
146
|
+
enableTabClose: this.enableTabClose,
|
|
147
|
+
isOpen: () => this.open,
|
|
148
|
+
onAnchorOutOfView: () => {
|
|
149
|
+
this.open = false;
|
|
150
|
+
this.hideAllTooltips();
|
|
151
|
+
this.emit('nile-visibility-change', {
|
|
152
|
+
visible: false,
|
|
153
|
+
reason: 'anchor-out-of-view',
|
|
154
|
+
});
|
|
155
|
+
},
|
|
156
|
+
onDocumentHidden: () => {
|
|
157
|
+
this.open = false;
|
|
158
|
+
this.hideAllTooltips();
|
|
159
|
+
this.emit('nile-visibility-change', {
|
|
160
|
+
visible: false,
|
|
161
|
+
reason: 'document-hidden',
|
|
162
|
+
});
|
|
163
|
+
},
|
|
164
|
+
emit: (event, detail) => this.emit(`nile-${event}`, detail),
|
|
165
|
+
});
|
|
131
166
|
}
|
|
167
|
+
|
|
132
168
|
|
|
133
169
|
public refresh() {
|
|
134
170
|
this.attachTooltip();
|
|
@@ -332,8 +368,16 @@ if (this.enableRecursiveMode) {
|
|
|
332
368
|
}
|
|
333
369
|
}
|
|
334
370
|
|
|
371
|
+
private hideAllTooltips(): void {
|
|
372
|
+
this.singleInstance?.hide();
|
|
373
|
+
this.singletonInstance?.hide();
|
|
374
|
+
this.tooltipInstances?.forEach(t => t.hide());
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
|
|
335
378
|
disconnectedCallback(): void {
|
|
336
379
|
super.disconnectedCallback();
|
|
380
|
+
this.visibilityManager?.cleanup();
|
|
337
381
|
this.destroyTooltips();
|
|
338
382
|
}
|
|
339
383
|
|
|
@@ -360,10 +404,12 @@ if (this.enableRecursiveMode) {
|
|
|
360
404
|
|
|
361
405
|
if (changed.has('open')) {
|
|
362
406
|
if (this.open) {
|
|
407
|
+
this.visibilityManager?.setup();
|
|
363
408
|
this.singleInstance?.show();
|
|
364
409
|
this.singletonInstance?.show();
|
|
365
410
|
this.tooltipInstances?.forEach(t => t.show());
|
|
366
411
|
} else {
|
|
412
|
+
this.visibilityManager?.cleanup();
|
|
367
413
|
this.singleInstance?.hide();
|
|
368
414
|
this.singletonInstance?.hide();
|
|
369
415
|
this.tooltipInstances?.forEach(t => t.hide());
|