@aquera/nile-elements 1.3.4-beta-1 → 1.3.4
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 +3 -0
- package/demo/index.html +27 -20
- package/dist/{fixture-54600b35.cjs.js → fixture-1c49c014.cjs.js} +2 -2
- package/dist/{fixture-73855806.cjs.js.map → fixture-1c49c014.cjs.js.map} +1 -1
- package/dist/{fixture-9871e8a9.esm.js → fixture-985bba12.esm.js} +1 -1
- package/dist/index.js +3 -2
- 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/nile-auto-complete.test.cjs.js +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/nile-calendar.test.cjs.js +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/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 +3 -2
- package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.test.esm.js +1 -1
- 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/nile-dropdown.test.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.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-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.test.cjs.js +1 -1
- package/dist/nile-link/nile-link.test.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/nile-popover.test.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.test.esm.js +1 -1
- 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/nile-select.test.cjs.js +1 -1
- package/dist/nile-select/nile-select.test.esm.js +1 -1
- 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-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/src/nile-chip/nile-chip.js +8 -0
- package/dist/src/nile-chip/nile-chip.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/package.json +1 -1
- package/src/nile-chip/nile-chip.ts +9 -0
- package/dist/fixture-54600b35.cjs.js.map +0 -1
- package/dist/fixture-5b79f853.cjs.js +0 -395
- package/dist/fixture-5b79f853.cjs.js.map +0 -1
- package/dist/fixture-73855806.cjs.js +0 -395
- package/dist/fixture-90b199c4.esm.js +0 -569
- package/dist/fixture-c1d78368.cjs.js +0 -395
- package/dist/fixture-c1d78368.cjs.js.map +0 -1
- package/dist/fixture-cf7bfcf5.esm.js +0 -569
- package/dist/fixture-dbd66009.cjs.js +0 -395
- package/dist/fixture-dbd66009.cjs.js.map +0 -1
- package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js +0 -2
- package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js.map +0 -1
- package/dist/nile-code-editor/backup_nile-code-editor copy.esm.js +0 -1
- package/dist/nile-grid/nile-grid.types.cjs.js +0 -2
- package/dist/nile-grid/nile-grid.types.cjs.js.map +0 -1
- package/dist/nile-grid/nile-grid.types.esm.js +0 -1
- package/dist/nile-grid-body/index.cjs.js +0 -2
- package/dist/nile-grid-body/index.cjs.js.map +0 -1
- package/dist/nile-grid-body/index.esm.js +0 -1
- package/dist/nile-grid-body/nile-grid-body.cjs.js +0 -2
- package/dist/nile-grid-body/nile-grid-body.cjs.js.map +0 -1
- package/dist/nile-grid-body/nile-grid-body.css.cjs.js +0 -2
- package/dist/nile-grid-body/nile-grid-body.css.cjs.js.map +0 -1
- package/dist/nile-grid-body/nile-grid-body.css.esm.js +0 -10
- package/dist/nile-grid-body/nile-grid-body.esm.js +0 -5
- package/dist/nile-grid-cell-item/index.cjs.js +0 -2
- package/dist/nile-grid-cell-item/index.cjs.js.map +0 -1
- package/dist/nile-grid-cell-item/index.esm.js +0 -1
- package/dist/nile-grid-cell-item/nile-grid-cell-item.cjs.js +0 -2
- package/dist/nile-grid-cell-item/nile-grid-cell-item.cjs.js.map +0 -1
- package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js +0 -2
- package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js.map +0 -1
- package/dist/nile-grid-cell-item/nile-grid-cell-item.css.esm.js +0 -35
- package/dist/nile-grid-cell-item/nile-grid-cell-item.esm.js +0 -12
- package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js +0 -2
- package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js.map +0 -1
- package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.esm.js +0 -1
- package/dist/nile-grid-head/index.cjs.js +0 -2
- package/dist/nile-grid-head/index.cjs.js.map +0 -1
- package/dist/nile-grid-head/index.esm.js +0 -1
- package/dist/nile-grid-head/nile-grid-head.cjs.js +0 -2
- package/dist/nile-grid-head/nile-grid-head.cjs.js.map +0 -1
- package/dist/nile-grid-head/nile-grid-head.css.cjs.js +0 -2
- package/dist/nile-grid-head/nile-grid-head.css.cjs.js.map +0 -1
- package/dist/nile-grid-head/nile-grid-head.css.esm.js +0 -7
- package/dist/nile-grid-head/nile-grid-head.esm.js +0 -5
- package/dist/nile-grid-head-item/index.cjs.js +0 -2
- package/dist/nile-grid-head-item/index.cjs.js.map +0 -1
- package/dist/nile-grid-head-item/index.esm.js +0 -1
- package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js +0 -2
- package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js.map +0 -1
- package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js +0 -2
- package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js.map +0 -1
- package/dist/nile-grid-head-item/nile-grid-head-item.css.esm.js +0 -34
- package/dist/nile-grid-head-item/nile-grid-head-item.esm.js +0 -12
- package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js +0 -2
- package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js.map +0 -1
- package/dist/nile-grid-head-item/nile-grid-head-item.utils.esm.js +0 -1
- package/dist/nile-grid-row/index.cjs.js +0 -2
- package/dist/nile-grid-row/index.cjs.js.map +0 -1
- package/dist/nile-grid-row/index.esm.js +0 -1
- package/dist/nile-grid-row/nile-grid-row.cjs.js +0 -2
- package/dist/nile-grid-row/nile-grid-row.cjs.js.map +0 -1
- package/dist/nile-grid-row/nile-grid-row.css.cjs.js +0 -2
- package/dist/nile-grid-row/nile-grid-row.css.cjs.js.map +0 -1
- package/dist/nile-grid-row/nile-grid-row.css.esm.js +0 -15
- package/dist/nile-grid-row/nile-grid-row.esm.js +0 -7
- package/dist/nile-rich-text-editor/utils.cjs.js +0 -2
- package/dist/nile-rich-text-editor/utils.cjs.js.map +0 -1
- package/dist/nile-rich-text-editor/utils.esm.js +0 -1
- package/dist/nile-sidebar/index.cjs.js +0 -2
- package/dist/nile-sidebar/index.cjs.js.map +0 -1
- package/dist/nile-sidebar/index.esm.js +0 -75
- package/dist/nile-sidebar-menu/index.cjs.js +0 -2
- package/dist/nile-sidebar-menu/index.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu/index.esm.js +0 -1
- package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js +0 -2
- package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js +0 -2
- package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu/nile-sidebar-menu.css.esm.js +0 -38
- package/dist/nile-sidebar-menu/nile-sidebar-menu.esm.js +0 -10
- package/dist/nile-sidebar-menu-items/index.cjs.js +0 -2
- package/dist/nile-sidebar-menu-items/index.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu-items/index.esm.js +0 -1
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js +0 -2
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js +0 -2
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js.map +0 -1
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.esm.js +0 -36
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.esm.js +0 -15
- package/dist/nile-sidebar-wrapper/index.cjs.js +0 -2
- package/dist/nile-sidebar-wrapper/index.cjs.js.map +0 -1
- package/dist/nile-sidebar-wrapper/index.esm.js +0 -1
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js +0 -2
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js.map +0 -1
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js +0 -2
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js.map +0 -1
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.esm.js +0 -105
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.esm.js +0 -16
- package/dist/nile-virtual-select/group-manager.cjs.js +0 -2
- package/dist/nile-virtual-select/group-manager.cjs.js.map +0 -1
- package/dist/nile-virtual-select/group-manager.esm.js +0 -1
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js +0 -2
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js.map +0 -1
- package/dist/nile-virtual-select/temp_nile-virtual-select copy.esm.js +0 -231
- package/dist/scopedElementsWrapper-1bff26ef.cjs.js +0 -2
- package/dist/scopedElementsWrapper-1bff26ef.cjs.js.map +0 -1
- package/dist/scopedElementsWrapper-4c29be11.esm.js +0 -7
- package/dist/scopedElementsWrapper-a112fc73.cjs.js +0 -6
- package/dist/scopedElementsWrapper-a112fc73.cjs.js.map +0 -1
- package/dist/scopedElementsWrapper-c815042c.cjs.js +0 -2
- package/dist/scopedElementsWrapper-c815042c.cjs.js.map +0 -1
- package/dist/src/internal/portal-manager.d.ts +0 -53
- package/dist/src/internal/portal-manager.js +0 -196
- package/dist/src/internal/portal-manager.js.map +0 -1
- package/dist/src/internal/portal.d.ts +0 -60
- package/dist/src/internal/portal.js +0 -199
- package/dist/src/internal/portal.js.map +0 -1
- package/dist/src/internal/resizable-helper.d.ts +0 -59
- package/dist/src/internal/resizable-helper.js +0 -115
- package/dist/src/internal/resizable-helper.js.map +0 -1
- package/dist/src/internal/resizable-styles.d.ts +0 -16
- package/dist/src/internal/resizable-styles.js +0 -144
- package/dist/src/internal/resizable-styles.js.map +0 -1
- package/dist/src/internal/virtualizer-error-handler.d.ts +0 -30
- package/dist/src/internal/virtualizer-error-handler.js +0 -82
- package/dist/src/internal/virtualizer-error-handler.js.map +0 -1
- package/dist/src/lib/index.d.ts +0 -7
- package/dist/src/lib/index.js +0 -8
- package/dist/src/lib/index.js.map +0 -1
- package/dist/src/lib/virtualize.d.ts +0 -32
- package/dist/src/lib/virtualize.js +0 -105
- package/dist/src/lib/virtualize.js.map +0 -1
- package/dist/src/lib/virtualize.test.d.ts +0 -7
- package/dist/src/lib/virtualize.test.js +0 -57
- package/dist/src/lib/virtualize.test.js.map +0 -1
- package/dist/src/nile-badge/__snapshots__/nile-badge.test.snap.js +0 -17
- package/dist/src/nile-calendar/__snapshots__/nile-calendar.test.snap.js +0 -310
- package/dist/src/nile-card/__snapshots__/nile-card.test.snap.js +0 -34
- package/dist/src/nile-checkbox/__snapshots__/nile-checkbox.test.snap.js +0 -31
- package/dist/src/nile-code-editor/Old_theme copy.d.ts +0 -191
- package/dist/src/nile-code-editor/Old_theme copy.js +0 -193
- package/dist/src/nile-code-editor/Old_theme copy.js.map +0 -1
- 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 +0 -675
- package/dist/src/nile-code-editor/backup_nile-code-editor copy.js.map +0 -1
- package/dist/src/nile-code-editor/theme copy.d.ts +0 -191
- package/dist/src/nile-code-editor/theme copy.js +0 -193
- package/dist/src/nile-code-editor/theme copy.js.map +0 -1
- package/dist/src/nile-floating-panel/anchor-manager.d.ts +0 -26
- package/dist/src/nile-floating-panel/anchor-manager.js +0 -49
- package/dist/src/nile-floating-panel/anchor-manager.js.map +0 -1
- package/dist/src/nile-floating-panel/content-manager.d.ts +0 -23
- package/dist/src/nile-floating-panel/content-manager.js +0 -67
- package/dist/src/nile-floating-panel/content-manager.js.map +0 -1
- package/dist/src/nile-floating-panel/event-manager.d.ts +0 -38
- package/dist/src/nile-floating-panel/event-manager.js +0 -81
- package/dist/src/nile-floating-panel/event-manager.js.map +0 -1
- package/dist/src/nile-floating-panel/index.d.ts +0 -1
- package/dist/src/nile-floating-panel/index.js +0 -2
- package/dist/src/nile-floating-panel/index.js.map +0 -1
- package/dist/src/nile-floating-panel/nile-floating-panel.css.d.ts +0 -17
- package/dist/src/nile-floating-panel/nile-floating-panel.css.js +0 -51
- package/dist/src/nile-floating-panel/nile-floating-panel.css.js.map +0 -1
- package/dist/src/nile-floating-panel/nile-floating-panel.d.ts +0 -67
- package/dist/src/nile-floating-panel/nile-floating-panel.js +0 -203
- package/dist/src/nile-floating-panel/nile-floating-panel.js.map +0 -1
- package/dist/src/nile-floating-panel/position-manager.d.ts +0 -47
- package/dist/src/nile-floating-panel/position-manager.js +0 -94
- package/dist/src/nile-floating-panel/position-manager.js.map +0 -1
- package/dist/src/nile-floating-panel/style-manager.d.ts +0 -31
- package/dist/src/nile-floating-panel/style-manager.js +0 -74
- package/dist/src/nile-floating-panel/style-manager.js.map +0 -1
- package/dist/src/nile-floating-panel/types.d.ts +0 -29
- package/dist/src/nile-floating-panel/types.js +0 -8
- package/dist/src/nile-floating-panel/types.js.map +0 -1
- package/dist/src/nile-grid/data-processor.d.ts +0 -37
- package/dist/src/nile-grid/data-processor.js +0 -122
- package/dist/src/nile-grid/data-processor.js.map +0 -1
- package/dist/src/nile-grid/event-handlers.d.ts +0 -35
- package/dist/src/nile-grid/event-handlers.js +0 -158
- package/dist/src/nile-grid/event-handlers.js.map +0 -1
- package/dist/src/nile-grid/nile-grid.types.d.ts +0 -3
- package/dist/src/nile-grid/nile-grid.types.js +0 -2
- package/dist/src/nile-grid/nile-grid.types.js.map +0 -1
- package/dist/src/nile-grid/renderer.d.ts +0 -8
- package/dist/src/nile-grid/renderer.js +0 -78
- package/dist/src/nile-grid/renderer.js.map +0 -1
- package/dist/src/nile-grid/resize-handler.d.ts +0 -4
- package/dist/src/nile-grid/resize-handler.js +0 -36
- package/dist/src/nile-grid/resize-handler.js.map +0 -1
- package/dist/src/nile-grid/types.d.ts +0 -32
- package/dist/src/nile-grid/types.js +0 -2
- package/dist/src/nile-grid/types.js.map +0 -1
- package/dist/src/nile-grid/utils.d.ts +0 -4
- package/dist/src/nile-grid/utils.js +0 -32
- package/dist/src/nile-grid/utils.js.map +0 -1
- package/dist/src/nile-grid-body/index.d.ts +0 -1
- package/dist/src/nile-grid-body/index.js +0 -2
- package/dist/src/nile-grid-body/index.js.map +0 -1
- package/dist/src/nile-grid-body/nile-grid-body.css.d.ts +0 -12
- package/dist/src/nile-grid-body/nile-grid-body.css.js +0 -22
- package/dist/src/nile-grid-body/nile-grid-body.css.js.map +0 -1
- package/dist/src/nile-grid-body/nile-grid-body.d.ts +0 -29
- package/dist/src/nile-grid-body/nile-grid-body.js +0 -43
- package/dist/src/nile-grid-body/nile-grid-body.js.map +0 -1
- package/dist/src/nile-grid-cell-item/index.d.ts +0 -1
- package/dist/src/nile-grid-cell-item/index.js +0 -2
- package/dist/src/nile-grid-cell-item/index.js.map +0 -1
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.d.ts +0 -12
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js +0 -47
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js.map +0 -1
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.d.ts +0 -36
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.js +0 -93
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.js.map +0 -1
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.d.ts +0 -10
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.js +0 -34
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.js.map +0 -1
- package/dist/src/nile-grid-head/index.d.ts +0 -1
- package/dist/src/nile-grid-head/index.js +0 -2
- package/dist/src/nile-grid-head/index.js.map +0 -1
- package/dist/src/nile-grid-head/nile-grid-head.css.d.ts +0 -12
- package/dist/src/nile-grid-head/nile-grid-head.css.js +0 -19
- package/dist/src/nile-grid-head/nile-grid-head.css.js.map +0 -1
- package/dist/src/nile-grid-head/nile-grid-head.d.ts +0 -28
- package/dist/src/nile-grid-head/nile-grid-head.js +0 -41
- package/dist/src/nile-grid-head/nile-grid-head.js.map +0 -1
- package/dist/src/nile-grid-head-item/index.d.ts +0 -1
- package/dist/src/nile-grid-head-item/index.js +0 -2
- package/dist/src/nile-grid-head-item/index.js.map +0 -1
- package/dist/src/nile-grid-head-item/nile-grid-head-item.css.d.ts +0 -12
- package/dist/src/nile-grid-head-item/nile-grid-head-item.css.js +0 -46
- package/dist/src/nile-grid-head-item/nile-grid-head-item.css.js.map +0 -1
- package/dist/src/nile-grid-head-item/nile-grid-head-item.d.ts +0 -37
- package/dist/src/nile-grid-head-item/nile-grid-head-item.js +0 -100
- package/dist/src/nile-grid-head-item/nile-grid-head-item.js.map +0 -1
- package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.d.ts +0 -10
- package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.js +0 -34
- package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.js.map +0 -1
- package/dist/src/nile-grid-row/index.d.ts +0 -1
- package/dist/src/nile-grid-row/index.js +0 -2
- package/dist/src/nile-grid-row/index.js.map +0 -1
- package/dist/src/nile-grid-row/nile-grid-row.css.d.ts +0 -12
- package/dist/src/nile-grid-row/nile-grid-row.css.js +0 -27
- package/dist/src/nile-grid-row/nile-grid-row.css.js.map +0 -1
- package/dist/src/nile-grid-row/nile-grid-row.d.ts +0 -29
- package/dist/src/nile-grid-row/nile-grid-row.js +0 -45
- package/dist/src/nile-grid-row/nile-grid-row.js.map +0 -1
- package/dist/src/nile-hero/__snapshots__/nile-hero.test.snap.js +0 -47
- package/dist/src/nile-icon/__snapshots__/nile-icon.test.snap.js +0 -16
- package/dist/src/nile-input/__snapshots__/nile-input.test.snap.js +0 -75
- package/dist/src/nile-menu/portal-manager.d.ts +0 -39
- package/dist/src/nile-menu/portal-manager.js +0 -340
- package/dist/src/nile-menu/portal-manager.js.map +0 -1
- package/dist/src/nile-menu/portal-utils.d.ts +0 -21
- package/dist/src/nile-menu/portal-utils.js +0 -128
- package/dist/src/nile-menu/portal-utils.js.map +0 -1
- package/dist/src/nile-popover/__snapshots__/nile-popover.test.snap.js +0 -22
- package/dist/src/nile-popover/popover-portal-handler.d.ts +0 -21
- package/dist/src/nile-popover/popover-portal-handler.js +0 -106
- package/dist/src/nile-popover/popover-portal-handler.js.map +0 -1
- package/dist/src/nile-portal-wrapper/index.d.ts +0 -1
- package/dist/src/nile-portal-wrapper/index.js +0 -2
- package/dist/src/nile-portal-wrapper/index.js.map +0 -1
- package/dist/src/nile-portal-wrapper/nile-portal-wrapper.d.ts +0 -47
- package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js +0 -451
- package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js.map +0 -1
- package/dist/src/nile-rich-text-editor/utils.d.ts +0 -13
- package/dist/src/nile-rich-text-editor/utils.js +0 -538
- package/dist/src/nile-rich-text-editor/utils.js.map +0 -1
- package/dist/src/nile-select/body-append-manager.d.ts +0 -90
- package/dist/src/nile-select/body-append-manager.js +0 -298
- package/dist/src/nile-select/body-append-manager.js.map +0 -1
- package/dist/src/nile-sidebar/index.d.ts +0 -28
- package/dist/src/nile-sidebar/index.js +0 -116
- package/dist/src/nile-sidebar/index.js.map +0 -1
- package/dist/src/nile-sidebar-menu/index.d.ts +0 -1
- package/dist/src/nile-sidebar-menu/index.js +0 -2
- package/dist/src/nile-sidebar-menu/index.js.map +0 -1
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.d.ts +0 -12
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.js +0 -47
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.js.map +0 -1
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.d.ts +0 -37
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.js +0 -84
- package/dist/src/nile-sidebar-menu/nile-sidebar-menu.js.map +0 -1
- package/dist/src/nile-sidebar-menu-items/index.d.ts +0 -1
- package/dist/src/nile-sidebar-menu-items/index.js +0 -2
- package/dist/src/nile-sidebar-menu-items/index.js.map +0 -1
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.d.ts +0 -12
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.js +0 -45
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.js.map +0 -1
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.d.ts +0 -35
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.js +0 -78
- package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.js.map +0 -1
- package/dist/src/nile-sidebar-wrapper/index.d.ts +0 -1
- package/dist/src/nile-sidebar-wrapper/index.js +0 -2
- package/dist/src/nile-sidebar-wrapper/index.js.map +0 -1
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.d.ts +0 -12
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.js +0 -114
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.js.map +0 -1
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.d.ts +0 -35
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.js +0 -89
- package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.js.map +0 -1
- package/dist/src/nile-table-body/virtual-scroll-helper.d.ts +0 -9
- package/dist/src/nile-table-body/virtual-scroll-helper.js +0 -24
- package/dist/src/nile-table-body/virtual-scroll-helper.js.map +0 -1
- package/dist/src/nile-virtual-select/body-append-helper.d.ts +0 -16
- package/dist/src/nile-virtual-select/body-append-helper.js +0 -95
- package/dist/src/nile-virtual-select/body-append-helper.js.map +0 -1
- package/dist/src/nile-virtual-select/group-manager.d.ts +0 -32
- package/dist/src/nile-virtual-select/group-manager.js +0 -134
- package/dist/src/nile-virtual-select/group-manager.js.map +0 -1
- package/dist/src/nile-virtual-select/portal-utils.d.ts +0 -65
- package/dist/src/nile-virtual-select/portal-utils.js +0 -376
- package/dist/src/nile-virtual-select/portal-utils.js.map +0 -1
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.d.ts +0 -273
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js +0 -1305
- package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js.map +0 -1
- package/dist/src/nile-virtual-select/virtualizer-error-handler.d.ts +0 -21
- package/dist/src/nile-virtual-select/virtualizer-error-handler.js +0 -56
- package/dist/src/nile-virtual-select/virtualizer-error-handler.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/index.d.ts +0 -1
- package/dist/src/nile-virtual-select-disabled/index.js +0 -2
- package/dist/src/nile-virtual-select-disabled/index.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.d.ts +0 -12
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js +0 -538
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.d.ts +0 -299
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js +0 -1441
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.d.ts +0 -7
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js +0 -631
- package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/portal-manager.d.ts +0 -45
- package/dist/src/nile-virtual-select-disabled/portal-manager.js +0 -333
- package/dist/src/nile-virtual-select-disabled/portal-manager.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/renderer.d.ts +0 -16
- package/dist/src/nile-virtual-select-disabled/renderer.js +0 -79
- package/dist/src/nile-virtual-select-disabled/renderer.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/search-manager.d.ts +0 -12
- package/dist/src/nile-virtual-select-disabled/search-manager.js +0 -40
- package/dist/src/nile-virtual-select-disabled/search-manager.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/selection-manager.d.ts +0 -12
- package/dist/src/nile-virtual-select-disabled/selection-manager.js +0 -64
- package/dist/src/nile-virtual-select-disabled/selection-manager.js.map +0 -1
- package/dist/src/nile-virtual-select-disabled/types.d.ts +0 -50
- package/dist/src/nile-virtual-select-disabled/types.js +0 -8
- package/dist/src/nile-virtual-select-disabled/types.js.map +0 -1
- package/dist/src/nile-virtual-table-body/index.d.ts +0 -2
- package/dist/src/nile-virtual-table-body/index.js +0 -3
- package/dist/src/nile-virtual-table-body/index.js.map +0 -1
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.d.ts +0 -1
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js +0 -44
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js.map +0 -1
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.d.ts +0 -50
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js +0 -135
- package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js.map +0 -1
- package/dist/src/nile-virtual-table-body/renderer.d.ts +0 -16
- package/dist/src/nile-virtual-table-body/renderer.js +0 -49
- package/dist/src/nile-virtual-table-body/renderer.js.map +0 -1
- package/dist/src/utilities/stepper-utils.d.ts +0 -71
- package/dist/src/utilities/stepper-utils.js +0 -108
- package/dist/src/utilities/stepper-utils.js.map +0 -1
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
* Manages content for the floating panel (slot or data attribute)
|
|
9
|
-
*/
|
|
10
|
-
export declare class ContentManager {
|
|
11
|
-
/**
|
|
12
|
-
* Updates the panel container with content from slot or data attribute
|
|
13
|
-
*/
|
|
14
|
-
static updatePanelContent(panelContainer: HTMLElement, slot: HTMLSlotElement | null, dataContent: string): void;
|
|
15
|
-
/**
|
|
16
|
-
* Checks if slot has content
|
|
17
|
-
*/
|
|
18
|
-
static hasSlotContent(slot: HTMLSlotElement | null): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Gets slot content
|
|
21
|
-
*/
|
|
22
|
-
static getSlotContent(slot: HTMLSlotElement | null): Node[];
|
|
23
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
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
|
-
* Manages content for the floating panel (slot or data attribute)
|
|
9
|
-
*/
|
|
10
|
-
export class ContentManager {
|
|
11
|
-
/**
|
|
12
|
-
* Updates the panel container with content from slot or data attribute
|
|
13
|
-
*/
|
|
14
|
-
static updatePanelContent(panelContainer, slot, dataContent) {
|
|
15
|
-
// Clear existing content
|
|
16
|
-
panelContainer.innerHTML = '';
|
|
17
|
-
// Get slot content from light DOM
|
|
18
|
-
const slotContent = slot ? slot.assignedNodes({ flatten: true }) : [];
|
|
19
|
-
// Check if slot has meaningful content
|
|
20
|
-
const hasSlotContent = slotContent.length > 0 &&
|
|
21
|
-
slotContent.some(node => {
|
|
22
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
23
|
-
return node.textContent?.trim() !== '';
|
|
24
|
-
}
|
|
25
|
-
return node instanceof HTMLElement;
|
|
26
|
-
});
|
|
27
|
-
if (hasSlotContent) {
|
|
28
|
-
// Clone slot content
|
|
29
|
-
slotContent.forEach(node => {
|
|
30
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
31
|
-
const textNode = document.createTextNode(node.textContent || '');
|
|
32
|
-
panelContainer.appendChild(textNode);
|
|
33
|
-
}
|
|
34
|
-
else if (node instanceof HTMLElement) {
|
|
35
|
-
panelContainer.appendChild(node.cloneNode(true));
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
else if (dataContent) {
|
|
40
|
-
// Use data attribute content
|
|
41
|
-
panelContainer.textContent = dataContent;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Checks if slot has content
|
|
46
|
-
*/
|
|
47
|
-
static hasSlotContent(slot) {
|
|
48
|
-
if (!slot) {
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
const slotContent = slot.assignedNodes({ flatten: true });
|
|
52
|
-
return slotContent.length > 0 &&
|
|
53
|
-
slotContent.some(node => {
|
|
54
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
55
|
-
return node.textContent?.trim() !== '';
|
|
56
|
-
}
|
|
57
|
-
return node instanceof HTMLElement;
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Gets slot content
|
|
62
|
-
*/
|
|
63
|
-
static getSlotContent(slot) {
|
|
64
|
-
return slot ? slot.assignedNodes({ flatten: true }) : [];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=content-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-manager.js","sourceRoot":"","sources":["../../../src/nile-floating-panel/content-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB;;OAEG;IACH,MAAM,CAAC,kBAAkB,CACvB,cAA2B,EAC3B,IAA4B,EAC5B,WAAmB;QAEnB,yBAAyB;QACzB,cAAc,CAAC,SAAS,GAAG,EAAE,CAAC;QAE9B,kCAAkC;QAClC,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAEtE,uCAAuC;QACvC,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC;YAC3C,WAAW,CAAC,IAAI,C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EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gBACzC,CAAC;gBACD,OAAO,IAAI,YAAY,WAAW,CAAC;YACrC,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,IAA4B;QAChD,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D,CAAC;CACF","sourcesContent":["/**\n * Copyright Aquera Inc 2025\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 type { FloatingPanelContentConfig } from './types';\n\n/**\n * Manages content for the floating panel (slot or data attribute)\n */\nexport class ContentManager {\n /**\n * Updates the panel container with content from slot or data attribute\n */\n static updatePanelContent(\n panelContainer: HTMLElement,\n slot: HTMLSlotElement | null,\n dataContent: string\n ): void {\n // Clear existing content\n panelContainer.innerHTML = '';\n\n // Get slot content from light DOM\n const slotContent = slot ? slot.assignedNodes({ flatten: true }) : [];\n\n // Check if slot has meaningful content\n const hasSlotContent = slotContent.length > 0 &&\n slotContent.some(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n return node.textContent?.trim() !== '';\n }\n return node instanceof HTMLElement;\n });\n\n if (hasSlotContent) {\n // Clone slot content\n slotContent.forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n const textNode = document.createTextNode(node.textContent || '');\n panelContainer.appendChild(textNode);\n } else if (node instanceof HTMLElement) {\n panelContainer.appendChild(node.cloneNode(true));\n }\n });\n } else if (dataContent) {\n // Use data attribute content\n panelContainer.textContent = dataContent;\n }\n }\n\n /**\n * Checks if slot has content\n */\n static hasSlotContent(slot: HTMLSlotElement | null): boolean {\n if (!slot) {\n return false;\n }\n\n const slotContent = slot.assignedNodes({ flatten: true });\n return slotContent.length > 0 &&\n slotContent.some(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n return node.textContent?.trim() !== '';\n }\n return node instanceof HTMLElement;\n });\n }\n\n /**\n * Gets slot content\n */\n static getSlotContent(slot: HTMLSlotElement | null): Node[] {\n return slot ? slot.assignedNodes({ flatten: true }) : [];\n }\n}\n\n"]}
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
* Manages all event handling for the floating panel
|
|
9
|
-
*/
|
|
10
|
-
export declare class EventManager {
|
|
11
|
-
private component;
|
|
12
|
-
private panelContainer;
|
|
13
|
-
private closeOnOutsideClick;
|
|
14
|
-
private isOpen;
|
|
15
|
-
private boundHandleDocumentClick;
|
|
16
|
-
private onCloseCallback;
|
|
17
|
-
constructor(component: HTMLElement);
|
|
18
|
-
/**
|
|
19
|
-
* Sets up the outside click handler
|
|
20
|
-
*/
|
|
21
|
-
setupOutsideClickHandler(panelContainer: HTMLElement, closeOnOutsideClick: boolean, isOpen: boolean, onClose: () => void): void;
|
|
22
|
-
/**
|
|
23
|
-
* Updates the outside click handler configuration
|
|
24
|
-
*/
|
|
25
|
-
updateOutsideClickHandler(panelContainer: HTMLElement | null, closeOnOutsideClick: boolean, isOpen: boolean): void;
|
|
26
|
-
/**
|
|
27
|
-
* Cleans up the outside click handler
|
|
28
|
-
*/
|
|
29
|
-
cleanupOutsideClickHandler(): void;
|
|
30
|
-
/**
|
|
31
|
-
* Handles document click events to detect outside clicks
|
|
32
|
-
*/
|
|
33
|
-
private handleDocumentClick;
|
|
34
|
-
/**
|
|
35
|
-
* Cleans up all event handlers
|
|
36
|
-
*/
|
|
37
|
-
destroy(): void;
|
|
38
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
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
|
-
* Manages all event handling for the floating panel
|
|
9
|
-
*/
|
|
10
|
-
export class EventManager {
|
|
11
|
-
constructor(component) {
|
|
12
|
-
this.panelContainer = null;
|
|
13
|
-
this.closeOnOutsideClick = true;
|
|
14
|
-
this.isOpen = false;
|
|
15
|
-
this.boundHandleDocumentClick = null;
|
|
16
|
-
this.onCloseCallback = null;
|
|
17
|
-
this.component = component;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Sets up the outside click handler
|
|
21
|
-
*/
|
|
22
|
-
setupOutsideClickHandler(panelContainer, closeOnOutsideClick, isOpen, onClose) {
|
|
23
|
-
this.panelContainer = panelContainer;
|
|
24
|
-
this.closeOnOutsideClick = closeOnOutsideClick;
|
|
25
|
-
this.isOpen = isOpen;
|
|
26
|
-
this.onCloseCallback = onClose;
|
|
27
|
-
if (!this.closeOnOutsideClick || this.boundHandleDocumentClick) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
this.boundHandleDocumentClick = this.handleDocumentClick.bind(this);
|
|
31
|
-
// Use capture phase to ensure we catch the event early
|
|
32
|
-
document.addEventListener('mousedown', this.boundHandleDocumentClick, true);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Updates the outside click handler configuration
|
|
36
|
-
*/
|
|
37
|
-
updateOutsideClickHandler(panelContainer, closeOnOutsideClick, isOpen) {
|
|
38
|
-
this.panelContainer = panelContainer;
|
|
39
|
-
this.closeOnOutsideClick = closeOnOutsideClick;
|
|
40
|
-
this.isOpen = isOpen;
|
|
41
|
-
// Cleanup existing handler
|
|
42
|
-
this.cleanupOutsideClickHandler();
|
|
43
|
-
// Setup new handler if needed
|
|
44
|
-
if (isOpen && closeOnOutsideClick && panelContainer) {
|
|
45
|
-
this.boundHandleDocumentClick = this.handleDocumentClick.bind(this);
|
|
46
|
-
document.addEventListener('mousedown', this.boundHandleDocumentClick, true);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Cleans up the outside click handler
|
|
51
|
-
*/
|
|
52
|
-
cleanupOutsideClickHandler() {
|
|
53
|
-
if (this.boundHandleDocumentClick) {
|
|
54
|
-
document.removeEventListener('mousedown', this.boundHandleDocumentClick, true);
|
|
55
|
-
this.boundHandleDocumentClick = null;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Handles document click events to detect outside clicks
|
|
60
|
-
*/
|
|
61
|
-
handleDocumentClick(event) {
|
|
62
|
-
if (!this.isOpen || !this.closeOnOutsideClick || !this.panelContainer || !this.onCloseCallback) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
const target = event.target;
|
|
66
|
-
// Check if click is outside the panel container
|
|
67
|
-
if (!this.panelContainer.contains(target) && !this.component.contains(target)) {
|
|
68
|
-
// Click is outside both the panel and the component itself
|
|
69
|
-
this.onCloseCallback();
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Cleans up all event handlers
|
|
74
|
-
*/
|
|
75
|
-
destroy() {
|
|
76
|
-
this.cleanupOutsideClickHandler();
|
|
77
|
-
this.panelContainer = null;
|
|
78
|
-
this.onCloseCallback = null;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=event-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-manager.js","sourceRoot":"","sources":["../../../src/nile-floating-panel/event-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,OAAO,YAAY;IAQvB,YAAY,SAAsB;QAN1B,mBAAc,GAAuB,IAAI,CAAC;QAC1C,wBAAmB,GAAY,IAAI,CAAC;QACpC,WAAM,GAAY,KAAK,CAAC;QACxB,6BAAwB,GAAyC,IAAI,CAAC;QACtE,oBAA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,CAAC;YAClC,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC;YAC/E,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC;QACvC,CAAC;IACH,CAAC;IAED;;OAEG;IACK,mBAAmB,CAAC,KAAiB;QAC3C,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,mBAAmB,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YAC/F,OAAO;QACT,CAAC;QAED,MAAM,MAAM,GAAG,KAAK,CAAC,MAAc,CAAC;QAEpC,gDAAgD;QAChD,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC9E,2DAA2D;YAC3D,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,0BAA0B,EAAE,CAAC;QAClC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;IAC9B,CAAC;CACF","sourcesContent":["/**\n * Copyright Aquera Inc 2025\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\n/**\n * Manages all event handling for the floating panel\n */\nexport class EventManager {\n private component: HTMLElement;\n private panelContainer: HTMLElement | null = null;\n private closeOnOutsideClick: boolean = true;\n private isOpen: boolean = false;\n private boundHandleDocumentClick: ((event: MouseEvent) => void) | null = null;\n private onCloseCallback: (() => void) | null = null;\n\n constructor(component: HTMLElement) {\n this.component = component;\n }\n\n /**\n * Sets up the outside click handler\n */\n setupOutsideClickHandler(\n panelContainer: HTMLElement,\n closeOnOutsideClick: boolean,\n isOpen: boolean,\n onClose: () => void\n ): void {\n this.panelContainer = panelContainer;\n this.closeOnOutsideClick = closeOnOutsideClick;\n this.isOpen = isOpen;\n this.onCloseCallback = onClose;\n\n if (!this.closeOnOutsideClick || this.boundHandleDocumentClick) {\n return;\n }\n\n this.boundHandleDocumentClick = this.handleDocumentClick.bind(this);\n // Use capture phase to ensure we catch the event early\n document.addEventListener('mousedown', this.boundHandleDocumentClick, true);\n }\n\n /**\n * Updates the outside click handler configuration\n */\n updateOutsideClickHandler(\n panelContainer: HTMLElement | null,\n closeOnOutsideClick: boolean,\n isOpen: boolean\n ): void {\n this.panelContainer = panelContainer;\n this.closeOnOutsideClick = closeOnOutsideClick;\n this.isOpen = isOpen;\n\n // Cleanup existing handler\n this.cleanupOutsideClickHandler();\n\n // Setup new handler if needed\n if (isOpen && closeOnOutsideClick && panelContainer) {\n this.boundHandleDocumentClick = this.handleDocumentClick.bind(this);\n document.addEventListener('mousedown', this.boundHandleDocumentClick, true);\n }\n }\n\n /**\n * Cleans up the outside click handler\n */\n cleanupOutsideClickHandler(): void {\n if (this.boundHandleDocumentClick) {\n document.removeEventListener('mousedown', this.boundHandleDocumentClick, true);\n this.boundHandleDocumentClick = null;\n }\n }\n\n /**\n * Handles document click events to detect outside clicks\n */\n private handleDocumentClick(event: MouseEvent): void {\n if (!this.isOpen || !this.closeOnOutsideClick || !this.panelContainer || !this.onCloseCallback) {\n return;\n }\n\n const target = event.target as Node;\n\n // Check if click is outside the panel container\n if (!this.panelContainer.contains(target) && !this.component.contains(target)) {\n // Click is outside both the panel and the component itself\n this.onCloseCallback();\n }\n }\n\n /**\n * Cleans up all event handlers\n */\n destroy(): void {\n this.cleanupOutsideClickHandler();\n this.panelContainer = null;\n this.onCloseCallback = null;\n }\n}\n\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { NileFloatingPanel } from './nile-floating-panel';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-floating-panel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["export { NileFloatingPanel } from './nile-floating-panel';\n\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
* Floating Panel CSS
|
|
9
|
-
*/
|
|
10
|
-
export declare const styles: import("lit").CSSResult;
|
|
11
|
-
/**
|
|
12
|
-
* Panel container styles - applied to the dynamically appended element
|
|
13
|
-
* These styles are injected into the document head
|
|
14
|
-
*/
|
|
15
|
-
export declare const panelContainerStyles: import("lit").CSSResult;
|
|
16
|
-
declare const _default: import("lit").CSSResult[];
|
|
17
|
-
export default _default;
|
|
@@ -1,51 +0,0 @@
|
|
|
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
|
-
import { css } from 'lit';
|
|
8
|
-
/**
|
|
9
|
-
* Floating Panel CSS
|
|
10
|
-
*/
|
|
11
|
-
export const styles = css `
|
|
12
|
-
:host {
|
|
13
|
-
box-sizing: border-box;
|
|
14
|
-
-webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
|
|
15
|
-
-moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
|
|
16
|
-
text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));
|
|
17
|
-
display: inline-block;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host([hidden]) {
|
|
21
|
-
display: none;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
slot {
|
|
25
|
-
display: none;
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
/**
|
|
29
|
-
* Panel container styles - applied to the dynamically appended element
|
|
30
|
-
* These styles are injected into the document head
|
|
31
|
-
*/
|
|
32
|
-
export const panelContainerStyles = css `
|
|
33
|
-
.nile-floating-panel__container {
|
|
34
|
-
box-sizing: border-box;
|
|
35
|
-
z-index: var(--nile-floating-panel-z-index, 9999);
|
|
36
|
-
pointer-events: auto;
|
|
37
|
-
background-color: var(--nile-floating-panel-background, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
38
|
-
border: solid 1px var(--nile-floating-panel-border-color, var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt)));
|
|
39
|
-
border-radius: var(--nile-floating-panel-border-radius, var(--nile-radius-sm, var(--ng-radius-md)));
|
|
40
|
-
box-shadow: var(--nile-floating-panel-box-shadow, var(--nile-box-shadow-2, var(--ng-shadow-lg)));
|
|
41
|
-
padding: var(--nile-floating-panel-padding, var(--nile-spacing-xl, var(--ng-spacing-xl)));
|
|
42
|
-
min-width: var(--nile-floating-panel-min-width, 200px);
|
|
43
|
-
max-width: var(--nile-floating-panel-max-width, 400px);
|
|
44
|
-
color: var(--nile-floating-panel-color, var(--nile-colors-dark-900, var(--ng-colors-text-primary-900)));
|
|
45
|
-
font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
|
|
46
|
-
font-size: var(--nile-type-scale-4, var(--ng-font-size-text-md));
|
|
47
|
-
line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));
|
|
48
|
-
}
|
|
49
|
-
`;
|
|
50
|
-
export default [styles];
|
|
51
|
-
//# sourceMappingURL=nile-floating-panel.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-floating-panel.css.js","sourceRoot":"","sources":["../../../src/nile-floating-panel/nile-floating-panel.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;CAgBxB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBtC,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\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 * Floating Panel CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\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 display: inline-block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n slot {\n display: none;\n }\n`;\n\n/**\n * Panel container styles - applied to the dynamically appended element\n * These styles are injected into the document head\n */\nexport const panelContainerStyles = css`\n .nile-floating-panel__container {\n box-sizing: border-box;\n z-index: var(--nile-floating-panel-z-index, 9999);\n pointer-events: auto;\n background-color: var(--nile-floating-panel-background, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));\n border: solid 1px var(--nile-floating-panel-border-color, var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt)));\n border-radius: var(--nile-floating-panel-border-radius, var(--nile-radius-sm, var(--ng-radius-md)));\n box-shadow: var(--nile-floating-panel-box-shadow, var(--nile-box-shadow-2, var(--ng-shadow-lg)));\n padding: var(--nile-floating-panel-padding, var(--nile-spacing-xl, var(--ng-spacing-xl)));\n min-width: var(--nile-floating-panel-min-width, 200px);\n max-width: var(--nile-floating-panel-max-width, 400px);\n color: var(--nile-floating-panel-color, var(--nile-colors-dark-900, var(--ng-colors-text-primary-900)));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-md));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n }\n`;\n\nexport default [styles];\n\n"]}
|
|
@@ -1,67 +0,0 @@
|
|
|
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
|
-
import { CSSResultArray, TemplateResult } from 'lit';
|
|
8
|
-
import NileElement from '../internal/nile-element';
|
|
9
|
-
import type { FloatingPanelPosition, FloatingPanelAnchor } from './types';
|
|
10
|
-
/**
|
|
11
|
-
* Nile floating panel component.
|
|
12
|
-
*
|
|
13
|
-
* @tag nile-floating-panel
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
export declare class NileFloatingPanel extends NileElement {
|
|
17
|
-
/**
|
|
18
|
-
* The styles for nile-floating-panel
|
|
19
|
-
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
|
20
|
-
*/
|
|
21
|
-
static get styles(): CSSResultArray;
|
|
22
|
-
/**
|
|
23
|
-
* The anchor element where the panel will be appended. Can be an HTMLElement reference
|
|
24
|
-
* or a string selector. Defaults to document.body.
|
|
25
|
-
*/
|
|
26
|
-
anchor: FloatingPanelAnchor;
|
|
27
|
-
/**
|
|
28
|
-
* The position of the panel relative to the component itself.
|
|
29
|
-
* Options: 'top', 'bottom', 'left', 'right'
|
|
30
|
-
*/
|
|
31
|
-
position: FloatingPanelPosition;
|
|
32
|
-
/**
|
|
33
|
-
* Controls the visibility of the panel. When true, the panel is appended to the anchor
|
|
34
|
-
* and positioned relative to the component itself.
|
|
35
|
-
*/
|
|
36
|
-
open: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Optional content provided via data attribute. Used when no slot content is provided.
|
|
39
|
-
*/
|
|
40
|
-
dataContent: string;
|
|
41
|
-
/**
|
|
42
|
-
* Controls whether the panel closes when clicking outside of it.
|
|
43
|
-
* When true (default), clicking outside the panel will close it.
|
|
44
|
-
*/
|
|
45
|
-
closeOnOutsideClick: boolean;
|
|
46
|
-
private panelContainer;
|
|
47
|
-
private positionManager;
|
|
48
|
-
private styleManager;
|
|
49
|
-
private eventManager;
|
|
50
|
-
connectedCallback(): void;
|
|
51
|
-
disconnectedCallback(): void;
|
|
52
|
-
updated(changedProperties: Map<string, unknown>): void;
|
|
53
|
-
private setupPanel;
|
|
54
|
-
private setupEventHandlers;
|
|
55
|
-
private setupPositionManager;
|
|
56
|
-
private updatePanelContent;
|
|
57
|
-
private reposition;
|
|
58
|
-
private cleanupPanel;
|
|
59
|
-
render(): TemplateResult;
|
|
60
|
-
private handleSlotChange;
|
|
61
|
-
}
|
|
62
|
-
export default NileFloatingPanel;
|
|
63
|
-
declare global {
|
|
64
|
-
interface HTMLElementTagNameMap {
|
|
65
|
-
'nile-floating-panel': NileFloatingPanel;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,203 +0,0 @@
|
|
|
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
|
-
var NileFloatingPanel_1;
|
|
8
|
-
import { __decorate } from "tslib";
|
|
9
|
-
import { html, } from 'lit';
|
|
10
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
11
|
-
import { styles } from './nile-floating-panel.css';
|
|
12
|
-
import NileElement from '../internal/nile-element';
|
|
13
|
-
import { PositionManager } from './position-manager';
|
|
14
|
-
import { StyleManager } from './style-manager';
|
|
15
|
-
import { ContentManager } from './content-manager';
|
|
16
|
-
import { AnchorManager } from './anchor-manager';
|
|
17
|
-
import { EventManager } from './event-manager';
|
|
18
|
-
/**
|
|
19
|
-
* Nile floating panel component.
|
|
20
|
-
*
|
|
21
|
-
* @tag nile-floating-panel
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
let NileFloatingPanel = NileFloatingPanel_1 = class NileFloatingPanel extends NileElement {
|
|
25
|
-
constructor() {
|
|
26
|
-
super(...arguments);
|
|
27
|
-
/**
|
|
28
|
-
* The anchor element where the panel will be appended. Can be an HTMLElement reference
|
|
29
|
-
* or a string selector. Defaults to document.body.
|
|
30
|
-
*/
|
|
31
|
-
this.anchor = null;
|
|
32
|
-
/**
|
|
33
|
-
* The position of the panel relative to the component itself.
|
|
34
|
-
* Options: 'top', 'bottom', 'left', 'right'
|
|
35
|
-
*/
|
|
36
|
-
this.position = 'bottom';
|
|
37
|
-
/**
|
|
38
|
-
* Controls the visibility of the panel. When true, the panel is appended to the anchor
|
|
39
|
-
* and positioned relative to the component itself.
|
|
40
|
-
*/
|
|
41
|
-
this.open = false;
|
|
42
|
-
/**
|
|
43
|
-
* Optional content provided via data attribute. Used when no slot content is provided.
|
|
44
|
-
*/
|
|
45
|
-
this.dataContent = '';
|
|
46
|
-
/**
|
|
47
|
-
* Controls whether the panel closes when clicking outside of it.
|
|
48
|
-
* When true (default), clicking outside the panel will close it.
|
|
49
|
-
*/
|
|
50
|
-
this.closeOnOutsideClick = true;
|
|
51
|
-
this.panelContainer = null;
|
|
52
|
-
this.positionManager = null;
|
|
53
|
-
this.styleManager = new StyleManager();
|
|
54
|
-
this.eventManager = new EventManager(this);
|
|
55
|
-
this.handleSlotChange = () => {
|
|
56
|
-
// Update panel content when slot content changes
|
|
57
|
-
if (this.open && this.panelContainer) {
|
|
58
|
-
this.updatePanelContent();
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
/* #endregion */
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* The styles for nile-floating-panel
|
|
65
|
-
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
|
66
|
-
*/
|
|
67
|
-
static get styles() {
|
|
68
|
-
return [styles];
|
|
69
|
-
}
|
|
70
|
-
/* #endregion */
|
|
71
|
-
/* #region Methods */
|
|
72
|
-
connectedCallback() {
|
|
73
|
-
super.connectedCallback();
|
|
74
|
-
}
|
|
75
|
-
disconnectedCallback() {
|
|
76
|
-
super.disconnectedCallback();
|
|
77
|
-
this.cleanupPanel();
|
|
78
|
-
}
|
|
79
|
-
updated(changedProperties) {
|
|
80
|
-
super.updated(changedProperties);
|
|
81
|
-
if (changedProperties.has('open')) {
|
|
82
|
-
if (this.open) {
|
|
83
|
-
this.setupPanel();
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
this.cleanupPanel();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (changedProperties.has('closeOnOutsideClick') && this.open && this.panelContainer) {
|
|
90
|
-
this.eventManager.updateOutsideClickHandler(this.panelContainer, this.closeOnOutsideClick, this.open);
|
|
91
|
-
}
|
|
92
|
-
if (changedProperties.has('anchor') && this.open) {
|
|
93
|
-
this.cleanupPanel();
|
|
94
|
-
this.setupPanel();
|
|
95
|
-
}
|
|
96
|
-
if (changedProperties.has('position') && this.open && this.positionManager) {
|
|
97
|
-
this.positionManager.updatePosition(this.position);
|
|
98
|
-
}
|
|
99
|
-
if ((changedProperties.has('dataContent') || changedProperties.has('open')) && this.open && this.panelContainer) {
|
|
100
|
-
this.updatePanelContent();
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
setupPanel() {
|
|
104
|
-
if (this.panelContainer) {
|
|
105
|
-
return; // Already set up
|
|
106
|
-
}
|
|
107
|
-
// Inject styles if not already injected
|
|
108
|
-
const componentStyles = this.constructor.styles;
|
|
109
|
-
if (componentStyles) {
|
|
110
|
-
this.styleManager.injectStyles(componentStyles);
|
|
111
|
-
}
|
|
112
|
-
// Create panel container
|
|
113
|
-
this.panelContainer = document.createElement('div');
|
|
114
|
-
this.panelContainer.setAttribute('part', 'panel');
|
|
115
|
-
this.panelContainer.className = 'nile-floating-panel__container';
|
|
116
|
-
// Update content
|
|
117
|
-
this.updatePanelContent();
|
|
118
|
-
// Append to anchor
|
|
119
|
-
const anchorElement = AnchorManager.resolveAnchor(this.anchor);
|
|
120
|
-
AnchorManager.appendToAnchor(anchorElement, this.panelContainer);
|
|
121
|
-
// Wait for next frame to ensure DOM is ready
|
|
122
|
-
requestAnimationFrame(() => {
|
|
123
|
-
this.setupPositionManager();
|
|
124
|
-
this.setupEventHandlers();
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
setupEventHandlers() {
|
|
128
|
-
if (!this.panelContainer) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
// Setup outside click handler
|
|
132
|
-
this.eventManager.setupOutsideClickHandler(this.panelContainer, this.closeOnOutsideClick, this.open, () => {
|
|
133
|
-
this.open = false;
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
setupPositionManager() {
|
|
137
|
-
if (!this.panelContainer) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
// Create position manager
|
|
141
|
-
this.positionManager = new PositionManager(this, this.panelContainer, this.position);
|
|
142
|
-
// Initial positioning
|
|
143
|
-
this.positionManager.reposition();
|
|
144
|
-
// Setup auto-update
|
|
145
|
-
this.positionManager.setupAutoUpdate();
|
|
146
|
-
}
|
|
147
|
-
updatePanelContent() {
|
|
148
|
-
if (!this.panelContainer) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
const slot = this.shadowRoot?.querySelector('slot') || null;
|
|
152
|
-
ContentManager.updatePanelContent(this.panelContainer, slot, this.dataContent);
|
|
153
|
-
}
|
|
154
|
-
reposition() {
|
|
155
|
-
if (this.positionManager) {
|
|
156
|
-
this.positionManager.reposition();
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
cleanupPanel() {
|
|
160
|
-
// Cleanup event handlers
|
|
161
|
-
this.eventManager.destroy();
|
|
162
|
-
// Cleanup position manager
|
|
163
|
-
if (this.positionManager) {
|
|
164
|
-
this.positionManager.destroy();
|
|
165
|
-
this.positionManager = null;
|
|
166
|
-
}
|
|
167
|
-
// Remove panel from anchor
|
|
168
|
-
if (this.panelContainer) {
|
|
169
|
-
AnchorManager.removeFromAnchor(this.panelContainer);
|
|
170
|
-
}
|
|
171
|
-
this.panelContainer = null;
|
|
172
|
-
// Clean up styles (optional - styles are shared across instances)
|
|
173
|
-
this.styleManager.cleanupStyles();
|
|
174
|
-
}
|
|
175
|
-
render() {
|
|
176
|
-
// Component itself doesn't render visible content
|
|
177
|
-
// The panel is created and appended to anchor when open
|
|
178
|
-
return html `
|
|
179
|
-
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
180
|
-
`;
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
__decorate([
|
|
184
|
-
property()
|
|
185
|
-
], NileFloatingPanel.prototype, "anchor", void 0);
|
|
186
|
-
__decorate([
|
|
187
|
-
property()
|
|
188
|
-
], NileFloatingPanel.prototype, "position", void 0);
|
|
189
|
-
__decorate([
|
|
190
|
-
property({ type: Boolean, reflect: true })
|
|
191
|
-
], NileFloatingPanel.prototype, "open", void 0);
|
|
192
|
-
__decorate([
|
|
193
|
-
property({ attribute: 'data-content', type: String })
|
|
194
|
-
], NileFloatingPanel.prototype, "dataContent", void 0);
|
|
195
|
-
__decorate([
|
|
196
|
-
property({ type: Boolean, reflect: true, attribute: 'close-on-outside-click' })
|
|
197
|
-
], NileFloatingPanel.prototype, "closeOnOutsideClick", void 0);
|
|
198
|
-
NileFloatingPanel = NileFloatingPanel_1 = __decorate([
|
|
199
|
-
customElement('nile-floating-panel')
|
|
200
|
-
], NileFloatingPanel);
|
|
201
|
-
export { NileFloatingPanel };
|
|
202
|
-
export default NileFloatingPanel;
|
|
203
|
-
//# sourceMappingURL=nile-floating-panel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-floating-panel.js","sourceRoot":"","sources":["../../../src/nile-floating-panel/nile-floating-panel.ts"],"names":[],"mappings":"AAAA;;;;;G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,IAAI,CAAC;QAE3B,kEAAkE;QAClE,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC;IACpC,CAAC;IAEM,MAAM;QACX,kDAAkD;QAClD,wDAAwD;QACxD,OAAO,IAAI,CAAA;0BACW,IAAI,CAAC,gBAAgB;KAC1C,CAAC;IACJ,CAAC;CAUF,CAAA;AAtMa;IAAX,QAAQ,EAAE;iDAAoC;AAMnC;IAAX,QAAQ,EAAE;mDAA4C;AAMX;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAc;AAKF;IAAtD,QAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDAAkB;AAOxE;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAAC;8DACrD;AArChB,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAmN7B;;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\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 {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n PropertyValues,\n} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-floating-panel.css';\nimport NileElement from '../internal/nile-element';\nimport { PositionManager } from './position-manager';\nimport { StyleManager } from './style-manager';\nimport { ContentManager } from './content-manager';\nimport { AnchorManager } from './anchor-manager';\nimport { EventManager } from './event-manager';\nimport type { FloatingPanelPosition, FloatingPanelAnchor } from './types';\n\n/**\n * Nile floating panel component.\n *\n * @tag nile-floating-panel\n *\n */\n@customElement('nile-floating-panel')\nexport class NileFloatingPanel extends NileElement {\n /**\n * The styles for nile-floating-panel\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /**\n * The anchor element where the panel will be appended. Can be an HTMLElement reference\n * or a string selector. Defaults to document.body.\n */\n @property() anchor: FloatingPanelAnchor = null;\n\n /**\n * The position of the panel relative to the component itself.\n * Options: 'top', 'bottom', 'left', 'right'\n */\n @property() position: FloatingPanelPosition = 'bottom';\n\n /**\n * Controls the visibility of the panel. When true, the panel is appended to the anchor\n * and positioned relative to the component itself.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * Optional content provided via data attribute. Used when no slot content is provided.\n */\n @property({ attribute: 'data-content', type: String }) dataContent = '';\n\n /**\n * Controls whether the panel closes when clicking outside of it.\n * When true (default), clicking outside the panel will close it.\n */\n @property({ type: Boolean, reflect: true, attribute: 'close-on-outside-click' }) \n closeOnOutsideClick = true;\n\n private panelContainer: HTMLElement | null = null;\n private positionManager: PositionManager | null = null;\n private styleManager: StyleManager = new StyleManager();\n private eventManager: EventManager = new EventManager(this);\n\n /* #endregion */\n\n /* #region Methods */\n\n connectedCallback() {\n super.connectedCallback();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.cleanupPanel();\n }\n\n updated(changedProperties: Map<string, unknown>) {\n super.updated(changedProperties);\n\n if (changedProperties.has('open')) {\n if (this.open) {\n this.setupPanel();\n } else {\n this.cleanupPanel();\n }\n }\n\n if (changedProperties.has('closeOnOutsideClick') && this.open && this.panelContainer) {\n this.eventManager.updateOutsideClickHandler(\n this.panelContainer,\n this.closeOnOutsideClick,\n this.open\n );\n }\n\n if (changedProperties.has('anchor') && this.open) {\n this.cleanupPanel();\n this.setupPanel();\n }\n\n if (changedProperties.has('position') && this.open && this.positionManager) {\n this.positionManager.updatePosition(this.position);\n }\n\n if ((changedProperties.has('dataContent') || changedProperties.has('open')) && this.open && this.panelContainer) {\n this.updatePanelContent();\n }\n }\n\n private setupPanel() {\n if (this.panelContainer) {\n return; // Already set up\n }\n\n // Inject styles if not already injected\n const componentStyles = (this.constructor as typeof NileFloatingPanel).styles;\n if (componentStyles) {\n this.styleManager.injectStyles(componentStyles);\n }\n\n // Create panel container\n this.panelContainer = document.createElement('div');\n this.panelContainer.setAttribute('part', 'panel');\n this.panelContainer.className = 'nile-floating-panel__container';\n\n // Update content\n this.updatePanelContent();\n\n // Append to anchor\n const anchorElement = AnchorManager.resolveAnchor(this.anchor);\n AnchorManager.appendToAnchor(anchorElement, this.panelContainer);\n\n // Wait for next frame to ensure DOM is ready\n requestAnimationFrame(() => {\n this.setupPositionManager();\n this.setupEventHandlers();\n });\n }\n\n private setupEventHandlers() {\n if (!this.panelContainer) {\n return;\n }\n\n // Setup outside click handler\n this.eventManager.setupOutsideClickHandler(\n this.panelContainer,\n this.closeOnOutsideClick,\n this.open,\n () => {\n this.open = false;\n }\n );\n }\n\n private setupPositionManager() {\n if (!this.panelContainer) {\n return;\n }\n\n // Create position manager\n this.positionManager = new PositionManager(\n this,\n this.panelContainer,\n this.position\n );\n\n // Initial positioning\n this.positionManager.reposition();\n\n // Setup auto-update\n this.positionManager.setupAutoUpdate();\n }\n\n private updatePanelContent() {\n if (!this.panelContainer) {\n return;\n }\n\n const slot = this.shadowRoot?.querySelector('slot') || null;\n ContentManager.updatePanelContent(\n this.panelContainer,\n slot,\n this.dataContent\n );\n }\n\n private reposition() {\n if (this.positionManager) {\n this.positionManager.reposition();\n }\n }\n\n private cleanupPanel() {\n // Cleanup event handlers\n this.eventManager.destroy();\n\n // Cleanup position manager\n if (this.positionManager) {\n this.positionManager.destroy();\n this.positionManager = null;\n }\n\n // Remove panel from anchor\n if (this.panelContainer) {\n AnchorManager.removeFromAnchor(this.panelContainer);\n }\n\n this.panelContainer = null;\n\n // Clean up styles (optional - styles are shared across instances)\n this.styleManager.cleanupStyles();\n }\n\n public render(): TemplateResult {\n // Component itself doesn't render visible content\n // The panel is created and appended to anchor when open\n return html`\n <slot @slotchange=${this.handleSlotChange}></slot>\n `;\n }\n\n private handleSlotChange = () => {\n // Update panel content when slot content changes\n if (this.open && this.panelContainer) {\n this.updatePanelContent();\n }\n };\n\n /* #endregion */\n}\n\nexport default NileFloatingPanel;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-floating-panel': NileFloatingPanel;\n }\n}\n\n"]}
|