@aquera/nile-elements 1.1.3-beta-1.2 → 1.1.3-beta-2.0
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 +9 -0
- package/demo/index.html +98 -296
- package/demo/nxtgen.css +7 -2
- package/dist/{fixture-3bfb4490.cjs.js → fixture-5b79f853.cjs.js} +2 -2
- package/dist/{fixture-3bfb4490.cjs.js.map → fixture-5b79f853.cjs.js.map} +1 -1
- package/dist/{fixture-ba65262e.esm.js → fixture-90b199c4.esm.js} +2 -2
- package/dist/{fixture-8edec91c.esm.js → fixture-9871e8a9.esm.js} +1 -1
- package/dist/{fixture-d1470b58.cjs.js → fixture-c1d78368.cjs.js} +2 -2
- package/dist/{fixture-d1470b58.cjs.js.map → fixture-c1d78368.cjs.js.map} +1 -1
- package/dist/{fixture-985bba12.esm.js → fixture-cf7bfcf5.esm.js} +1 -1
- package/dist/{fixture-e3592de4.cjs.js → fixture-dbd66009.cjs.js} +4 -4
- 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 +1039 -1655
- 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.css.cjs.js +1 -1
- package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.css.esm.js +66 -12
- 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.test.cjs.js +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/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-grid/nile-grid.types.cjs.js +2 -0
- package/dist/nile-grid/nile-grid.types.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid.types.esm.js +1 -0
- 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-sidebar/index.cjs.js.map +1 -1
- package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js.map +1 -1
- package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js.map +1 -1
- package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js.map +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-stepper/index.cjs.js +1 -1
- package/dist/nile-stepper/index.esm.js +1 -1
- package/dist/nile-stepper/nile-stepper.cjs.js +1 -1
- package/dist/nile-stepper/nile-stepper.cjs.js.map +1 -1
- package/dist/nile-stepper/nile-stepper.esm.js +3 -3
- package/dist/nile-stepper-item/nile-stepper-item.cjs.js +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.cjs.js.map +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.esm.js +2 -2
- 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-table-body/index.cjs.js +1 -1
- package/dist/nile-table-body/index.esm.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
- package/dist/nile-table-body/nile-table-body.esm.js +3 -3
- package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js.map +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.esm.js +0 -4
- 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-vertical-stepper-item/nile-vertical-stepper-item.cjs.js +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js.map +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.esm.js +7 -7
- 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 +7 -6
- 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/src/index.d.ts +4 -17
- package/dist/src/index.js +4 -17
- package/dist/src/index.js.map +1 -1
- 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-badge/__snapshots__/nile-badge.test.snap.js +17 -0
- package/dist/src/nile-button/nile-button.css.js +66 -12
- package/dist/src/nile-button/nile-button.css.js.map +1 -1
- package/dist/src/nile-calendar/__snapshots__/nile-calendar.test.snap.js +310 -0
- 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-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-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/nile-grid.types.d.ts +3 -0
- package/dist/src/nile-grid/nile-grid.types.js +2 -0
- package/dist/src/nile-grid/nile-grid.types.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-input/__snapshots__/nile-input.test.snap.js +75 -0
- package/dist/src/nile-popover/__snapshots__/nile-popover.test.snap.js +22 -0
- package/dist/src/nile-sidebar/index.d.ts +1 -1
- package/dist/src/nile-stepper/nile-stepper.d.ts +1 -0
- package/dist/src/nile-stepper/nile-stepper.js +61 -40
- package/dist/src/nile-stepper/nile-stepper.js.map +1 -1
- package/dist/src/nile-stepper-item/nile-stepper-item.d.ts +3 -0
- package/dist/src/nile-stepper-item/nile-stepper-item.js +14 -2
- package/dist/src/nile-stepper-item/nile-stepper-item.js.map +1 -1
- package/dist/src/nile-table-body/nile-table-body.js +2 -1
- package/dist/src/nile-table-body/nile-table-body.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-table-header-item/nile-table-header-item.css.js +0 -4
- package/dist/src/nile-table-header-item/nile-table-header-item.css.js.map +1 -1
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.d.ts +3 -0
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.js +14 -2
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +19 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.js +248 -16
- package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
- 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-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 +3 -20
- package/src/index.ts +4 -18
- package/src/nile-button/nile-button.css.ts +66 -12
- package/src/nile-sidebar/index.ts +133 -0
- package/src/nile-sidebar/logo.svg +1 -0
- package/src/nile-sidebar-menu/index.ts +1 -0
- package/src/nile-sidebar-menu/nile-sidebar-menu.css.ts +52 -0
- package/src/nile-sidebar-menu/nile-sidebar-menu.ts +97 -0
- package/src/nile-sidebar-menu-items/index.ts +1 -0
- package/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.ts +50 -0
- package/src/nile-sidebar-menu-items/nile-sidebar-menu-items.ts +81 -0
- package/src/nile-sidebar-wrapper/index.ts +1 -0
- package/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.ts +119 -0
- package/src/nile-sidebar-wrapper/nile-sidebar-wrapper.ts +97 -0
- package/src/nile-stepper/nile-stepper.ts +56 -39
- package/src/nile-stepper/stepper-utils.ts +49 -0
- package/src/nile-stepper-item/nile-stepper-item.ts +6 -3
- package/src/nile-table-body/nile-table-body.ts +2 -1
- package/src/nile-table-header-item/nile-table-header-item.css.ts +0 -4
- package/src/nile-vertical-stepper-item/nile-vertical-stepper-item.ts +6 -3
- package/src/nile-virtual-select/nile-virtual-select.ts +265 -5
- package/vscode-html-custom-data.json +59 -320
- package/dist/axe.min-140df6c2.cjs.js +0 -2
- package/dist/axe.min-140df6c2.cjs.js.map +0 -1
- package/dist/axe.min-591c52c3.esm.js +0 -1
- package/dist/css-tag-3c4464f5.esm.js +0 -6
- package/dist/css-tag-b6258454.cjs.js +0 -6
- package/dist/css-tag-b6258454.cjs.js.map +0 -1
- package/dist/fixture-e3592de4.cjs.js.map +0 -1
- package/dist/flow-3e83b6f4.esm.js +0 -17
- package/dist/flow-ca47f938.cjs.js +0 -14
- package/dist/flow-ca47f938.cjs.js.map +0 -1
- package/dist/lit-html-21bc9a48.cjs.js +0 -6
- package/dist/lit-html-21bc9a48.cjs.js.map +0 -1
- package/dist/lit-html-82603fd0.esm.js +0 -6
- package/dist/nile-icon/icons/svg/ng-link-external-02.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-link-external-02.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-link-external-02.esm.js +0 -1
- package/dist/nile-side-bar/index.cjs.js +0 -2
- package/dist/nile-side-bar/index.cjs.js.map +0 -1
- package/dist/nile-side-bar/index.esm.js +0 -1
- package/dist/nile-side-bar/nile-side-bar.cjs.js +0 -2
- package/dist/nile-side-bar/nile-side-bar.cjs.js.map +0 -1
- package/dist/nile-side-bar/nile-side-bar.css.cjs.js +0 -2
- package/dist/nile-side-bar/nile-side-bar.css.cjs.js.map +0 -1
- package/dist/nile-side-bar/nile-side-bar.css.esm.js +0 -100
- package/dist/nile-side-bar/nile-side-bar.esm.js +0 -1
- package/dist/nile-side-bar-action/index.cjs.js +0 -2
- package/dist/nile-side-bar-action/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-action/index.esm.js +0 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js +0 -2
- package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js.map +0 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.css.cjs.js +0 -2
- package/dist/nile-side-bar-action/nile-side-bar-action.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.css.esm.js +0 -51
- package/dist/nile-side-bar-action/nile-side-bar-action.esm.js +0 -34
- package/dist/nile-side-bar-action-menu/index.cjs.js +0 -2
- package/dist/nile-side-bar-action-menu/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-action-menu/index.esm.js +0 -1
- package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.cjs.js +0 -2
- package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.cjs.js.map +0 -1
- package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.css.cjs.js +0 -2
- package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.css.esm.js +0 -61
- package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.esm.js +0 -40
- package/dist/nile-side-bar-action-menu-item/index.cjs.js +0 -2
- package/dist/nile-side-bar-action-menu-item/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-action-menu-item/index.esm.js +0 -1
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.cjs.js +0 -2
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.cjs.js.map +0 -1
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.cjs.js +0 -2
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.esm.js +0 -128
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.esm.js +0 -36
- package/dist/nile-side-bar-content/index.cjs.js +0 -2
- package/dist/nile-side-bar-content/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-content/index.esm.js +0 -1
- package/dist/nile-side-bar-content/nile-side-bar-content.cjs.js +0 -2
- package/dist/nile-side-bar-content/nile-side-bar-content.cjs.js.map +0 -1
- package/dist/nile-side-bar-content/nile-side-bar-content.css.cjs.js +0 -2
- package/dist/nile-side-bar-content/nile-side-bar-content.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-content/nile-side-bar-content.css.esm.js +0 -5
- package/dist/nile-side-bar-content/nile-side-bar-content.esm.js +0 -3
- package/dist/nile-side-bar-expand/index.cjs.js +0 -2
- package/dist/nile-side-bar-expand/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-expand/index.esm.js +0 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js +0 -2
- package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js.map +0 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js +0 -2
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.esm.js +0 -33
- package/dist/nile-side-bar-expand/nile-side-bar-expand.esm.js +0 -6
- package/dist/nile-side-bar-footer/index.cjs.js +0 -2
- package/dist/nile-side-bar-footer/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer/index.esm.js +0 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js +0 -2
- package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +0 -2
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +0 -40
- package/dist/nile-side-bar-footer/nile-side-bar-footer.esm.js +0 -5
- package/dist/nile-side-bar-footer-icon/index.cjs.js +0 -2
- package/dist/nile-side-bar-footer-icon/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer-icon/index.esm.js +0 -1
- package/dist/nile-side-bar-footer-icon/nile-side-bar-footer-icon.cjs.js +0 -2
- package/dist/nile-side-bar-footer-icon/nile-side-bar-footer-icon.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer-icon/nile-side-bar-footer-icon.css.cjs.js +0 -2
- package/dist/nile-side-bar-footer-icon/nile-side-bar-footer-icon.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer-icon/nile-side-bar-footer-icon.css.esm.js +0 -5
- package/dist/nile-side-bar-footer-icon/nile-side-bar-footer-icon.esm.js +0 -3
- package/dist/nile-side-bar-footer-item/index.cjs.js +0 -2
- package/dist/nile-side-bar-footer-item/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer-item/index.esm.js +0 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js +0 -2
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js +0 -2
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.esm.js +0 -72
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +0 -7
- package/dist/nile-side-bar-footer-text/index.cjs.js +0 -2
- package/dist/nile-side-bar-footer-text/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer-text/index.esm.js +0 -1
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.cjs.js +0 -2
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.cjs.js +0 -2
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.css.esm.js +0 -29
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.esm.js +0 -6
- package/dist/nile-side-bar-group/index.cjs.js +0 -2
- package/dist/nile-side-bar-group/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-group/index.esm.js +0 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js +0 -2
- package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js.map +0 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js +0 -2
- package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.css.esm.js +0 -48
- package/dist/nile-side-bar-group/nile-side-bar-group.esm.js +0 -12
- package/dist/nile-side-bar-group-item/index.cjs.js +0 -2
- package/dist/nile-side-bar-group-item/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item/index.esm.js +0 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.cjs.js +0 -2
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js +0 -2
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.esm.js +0 -54
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.esm.js +0 -37
- package/dist/nile-side-bar-group-item-content/index.cjs.js +0 -2
- package/dist/nile-side-bar-group-item-content/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item-content/index.esm.js +0 -1
- package/dist/nile-side-bar-group-item-content/nile-side-bar-group-item-content.cjs.js +0 -2
- package/dist/nile-side-bar-group-item-content/nile-side-bar-group-item-content.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item-content/nile-side-bar-group-item-content.css.cjs.js +0 -2
- package/dist/nile-side-bar-group-item-content/nile-side-bar-group-item-content.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item-content/nile-side-bar-group-item-content.css.esm.js +0 -5
- package/dist/nile-side-bar-group-item-content/nile-side-bar-group-item-content.esm.js +0 -3
- package/dist/nile-side-bar-group-item-icon/index.cjs.js +0 -2
- package/dist/nile-side-bar-group-item-icon/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item-icon/index.esm.js +0 -1
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js +0 -2
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.cjs.js +0 -2
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.esm.js +0 -31
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.esm.js +0 -11
- package/dist/nile-side-bar-group-item-text/index.cjs.js +0 -2
- package/dist/nile-side-bar-group-item-text/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item-text/index.esm.js +0 -1
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.cjs.js +0 -2
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.cjs.js +0 -2
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.esm.js +0 -24
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.esm.js +0 -1
- package/dist/nile-side-bar-header/index.cjs.js +0 -2
- package/dist/nile-side-bar-header/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-header/index.esm.js +0 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js +0 -2
- package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js.map +0 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +0 -2
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +0 -52
- package/dist/nile-side-bar-header/nile-side-bar-header.esm.js +0 -6
- package/dist/nile-side-bar-logo/index.cjs.js +0 -2
- package/dist/nile-side-bar-logo/index.cjs.js.map +0 -1
- package/dist/nile-side-bar-logo/index.esm.js +0 -1
- package/dist/nile-side-bar-logo/nile-side-bar-logo.cjs.js +0 -2
- package/dist/nile-side-bar-logo/nile-side-bar-logo.cjs.js.map +0 -1
- package/dist/nile-side-bar-logo/nile-side-bar-logo.css.cjs.js +0 -2
- package/dist/nile-side-bar-logo/nile-side-bar-logo.css.cjs.js.map +0 -1
- package/dist/nile-side-bar-logo/nile-side-bar-logo.css.esm.js +0 -35
- package/dist/nile-side-bar-logo/nile-side-bar-logo.esm.js +0 -4
- package/dist/scopedElementsWrapper-abad3c53.cjs.js +0 -2
- package/dist/scopedElementsWrapper-abad3c53.cjs.js.map +0 -1
- package/dist/scopedElementsWrapper-ef11f868.esm.js +0 -1
- package/dist/sinon-esm-283dcc9b.cjs.js +0 -2
- package/dist/sinon-esm-283dcc9b.cjs.js.map +0 -1
- package/dist/sinon-esm-abe9b0ec.esm.js +0 -1
- package/dist/src/nile-icon/icons/svg/ng-link-external-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-link-external-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-link-external-02.js.map +0 -1
- package/dist/src/nile-side-bar/index.d.ts +0 -1
- package/dist/src/nile-side-bar/index.js +0 -2
- package/dist/src/nile-side-bar/index.js.map +0 -1
- package/dist/src/nile-side-bar/nile-side-bar.css.d.ts +0 -12
- package/dist/src/nile-side-bar/nile-side-bar.css.js +0 -112
- package/dist/src/nile-side-bar/nile-side-bar.css.js.map +0 -1
- package/dist/src/nile-side-bar/nile-side-bar.d.ts +0 -40
- package/dist/src/nile-side-bar/nile-side-bar.js +0 -67
- package/dist/src/nile-side-bar/nile-side-bar.js.map +0 -1
- package/dist/src/nile-side-bar-action/index.d.ts +0 -1
- package/dist/src/nile-side-bar-action/index.js +0 -2
- package/dist/src/nile-side-bar-action/index.js.map +0 -1
- package/dist/src/nile-side-bar-action/nile-side-bar-action.css.d.ts +0 -3
- package/dist/src/nile-side-bar-action/nile-side-bar-action.css.js +0 -54
- package/dist/src/nile-side-bar-action/nile-side-bar-action.css.js.map +0 -1
- package/dist/src/nile-side-bar-action/nile-side-bar-action.d.ts +0 -75
- package/dist/src/nile-side-bar-action/nile-side-bar-action.js +0 -338
- package/dist/src/nile-side-bar-action/nile-side-bar-action.js.map +0 -1
- package/dist/src/nile-side-bar-action-menu/index.d.ts +0 -1
- package/dist/src/nile-side-bar-action-menu/index.js +0 -2
- package/dist/src/nile-side-bar-action-menu/index.js.map +0 -1
- package/dist/src/nile-side-bar-action-menu/nile-side-bar-action-menu.css.d.ts +0 -12
- package/dist/src/nile-side-bar-action-menu/nile-side-bar-action-menu.css.js +0 -73
- package/dist/src/nile-side-bar-action-menu/nile-side-bar-action-menu.css.js.map +0 -1
- package/dist/src/nile-side-bar-action-menu/nile-side-bar-action-menu.d.ts +0 -49
- package/dist/src/nile-side-bar-action-menu/nile-side-bar-action-menu.js +0 -223
- package/dist/src/nile-side-bar-action-menu/nile-side-bar-action-menu.js.map +0 -1
- package/dist/src/nile-side-bar-action-menu-item/index.d.ts +0 -1
- package/dist/src/nile-side-bar-action-menu-item/index.js +0 -2
- package/dist/src/nile-side-bar-action-menu-item/index.js.map +0 -1
- package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.d.ts +0 -12
- package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.js +0 -140
- package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.js.map +0 -1
- package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.d.ts +0 -64
- package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.js +0 -198
- package/dist/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.js.map +0 -1
- package/dist/src/nile-side-bar-content/index.d.ts +0 -1
- package/dist/src/nile-side-bar-content/index.js +0 -2
- package/dist/src/nile-side-bar-content/index.js.map +0 -1
- package/dist/src/nile-side-bar-content/nile-side-bar-content.css.d.ts +0 -12
- package/dist/src/nile-side-bar-content/nile-side-bar-content.css.js +0 -17
- package/dist/src/nile-side-bar-content/nile-side-bar-content.css.js.map +0 -1
- package/dist/src/nile-side-bar-content/nile-side-bar-content.d.ts +0 -32
- package/dist/src/nile-side-bar-content/nile-side-bar-content.js +0 -43
- package/dist/src/nile-side-bar-content/nile-side-bar-content.js.map +0 -1
- package/dist/src/nile-side-bar-expand/index.d.ts +0 -1
- package/dist/src/nile-side-bar-expand/index.js +0 -2
- package/dist/src/nile-side-bar-expand/index.js.map +0 -1
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.d.ts +0 -12
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js +0 -45
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js.map +0 -1
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.d.ts +0 -21
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js +0 -55
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js.map +0 -1
- package/dist/src/nile-side-bar-footer/index.d.ts +0 -1
- package/dist/src/nile-side-bar-footer/index.js +0 -2
- package/dist/src/nile-side-bar-footer/index.js.map +0 -1
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.d.ts +0 -6
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +0 -46
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +0 -1
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.d.ts +0 -26
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js +0 -37
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js.map +0 -1
- package/dist/src/nile-side-bar-footer-icon/index.d.ts +0 -1
- package/dist/src/nile-side-bar-footer-icon/index.js +0 -2
- package/dist/src/nile-side-bar-footer-icon/index.js.map +0 -1
- package/dist/src/nile-side-bar-footer-icon/nile-side-bar-footer-icon.css.d.ts +0 -12
- package/dist/src/nile-side-bar-footer-icon/nile-side-bar-footer-icon.css.js +0 -17
- package/dist/src/nile-side-bar-footer-icon/nile-side-bar-footer-icon.css.js.map +0 -1
- package/dist/src/nile-side-bar-footer-icon/nile-side-bar-footer-icon.d.ts +0 -32
- package/dist/src/nile-side-bar-footer-icon/nile-side-bar-footer-icon.js +0 -43
- package/dist/src/nile-side-bar-footer-icon/nile-side-bar-footer-icon.js.map +0 -1
- package/dist/src/nile-side-bar-footer-item/index.d.ts +0 -1
- package/dist/src/nile-side-bar-footer-item/index.js +0 -2
- package/dist/src/nile-side-bar-footer-item/index.js.map +0 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.d.ts +0 -3
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js +0 -75
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js.map +0 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.d.ts +0 -27
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js +0 -46
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js.map +0 -1
- package/dist/src/nile-side-bar-footer-text/index.d.ts +0 -1
- package/dist/src/nile-side-bar-footer-text/index.js +0 -2
- package/dist/src/nile-side-bar-footer-text/index.js.map +0 -1
- package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.d.ts +0 -3
- package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.js +0 -32
- package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.js.map +0 -1
- package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.d.ts +0 -30
- package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.js +0 -53
- package/dist/src/nile-side-bar-footer-text/nile-side-bar-footer-text.js.map +0 -1
- package/dist/src/nile-side-bar-group/index.d.ts +0 -1
- package/dist/src/nile-side-bar-group/index.js +0 -2
- package/dist/src/nile-side-bar-group/index.js.map +0 -1
- package/dist/src/nile-side-bar-group/nile-side-bar-group.css.d.ts +0 -6
- package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js +0 -54
- package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js.map +0 -1
- package/dist/src/nile-side-bar-group/nile-side-bar-group.d.ts +0 -42
- package/dist/src/nile-side-bar-group/nile-side-bar-group.js +0 -76
- package/dist/src/nile-side-bar-group/nile-side-bar-group.js.map +0 -1
- package/dist/src/nile-side-bar-group-item/index.d.ts +0 -1
- package/dist/src/nile-side-bar-group-item/index.js +0 -2
- package/dist/src/nile-side-bar-group-item/index.js.map +0 -1
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.d.ts +0 -12
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js +0 -66
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js.map +0 -1
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.d.ts +0 -54
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.js +0 -143
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.js.map +0 -1
- package/dist/src/nile-side-bar-group-item-content/index.d.ts +0 -1
- package/dist/src/nile-side-bar-group-item-content/index.js +0 -2
- package/dist/src/nile-side-bar-group-item-content/index.js.map +0 -1
- package/dist/src/nile-side-bar-group-item-content/nile-side-bar-group-item-content.css.d.ts +0 -12
- package/dist/src/nile-side-bar-group-item-content/nile-side-bar-group-item-content.css.js +0 -17
- package/dist/src/nile-side-bar-group-item-content/nile-side-bar-group-item-content.css.js.map +0 -1
- package/dist/src/nile-side-bar-group-item-content/nile-side-bar-group-item-content.d.ts +0 -32
- package/dist/src/nile-side-bar-group-item-content/nile-side-bar-group-item-content.js +0 -43
- package/dist/src/nile-side-bar-group-item-content/nile-side-bar-group-item-content.js.map +0 -1
- package/dist/src/nile-side-bar-group-item-icon/index.d.ts +0 -1
- package/dist/src/nile-side-bar-group-item-icon/index.js +0 -2
- package/dist/src/nile-side-bar-group-item-icon/index.js.map +0 -1
- package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.d.ts +0 -3
- package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.js +0 -34
- package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.js.map +0 -1
- package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.d.ts +0 -40
- package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.js +0 -89
- package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.js.map +0 -1
- package/dist/src/nile-side-bar-group-item-text/index.d.ts +0 -1
- package/dist/src/nile-side-bar-group-item-text/index.js +0 -2
- package/dist/src/nile-side-bar-group-item-text/index.js.map +0 -1
- package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.d.ts +0 -6
- package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.js +0 -30
- package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.js.map +0 -1
- package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.d.ts +0 -30
- package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.js +0 -42
- package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.js.map +0 -1
- package/dist/src/nile-side-bar-header/index.d.ts +0 -1
- package/dist/src/nile-side-bar-header/index.js +0 -2
- package/dist/src/nile-side-bar-header/index.js.map +0 -1
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.d.ts +0 -12
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +0 -64
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +0 -1
- package/dist/src/nile-side-bar-header/nile-side-bar-header.d.ts +0 -32
- package/dist/src/nile-side-bar-header/nile-side-bar-header.js +0 -46
- package/dist/src/nile-side-bar-header/nile-side-bar-header.js.map +0 -1
- package/dist/src/nile-side-bar-logo/index.d.ts +0 -1
- package/dist/src/nile-side-bar-logo/index.js +0 -2
- package/dist/src/nile-side-bar-logo/index.js.map +0 -1
- package/dist/src/nile-side-bar-logo/nile-side-bar-logo.css.d.ts +0 -12
- package/dist/src/nile-side-bar-logo/nile-side-bar-logo.css.js +0 -47
- package/dist/src/nile-side-bar-logo/nile-side-bar-logo.css.js.map +0 -1
- package/dist/src/nile-side-bar-logo/nile-side-bar-logo.d.ts +0 -34
- package/dist/src/nile-side-bar-logo/nile-side-bar-logo.js +0 -53
- package/dist/src/nile-side-bar-logo/nile-side-bar-logo.js.map +0 -1
- package/dist/src/nile-side-bar-menu/index.d.ts +0 -1
- package/dist/src/nile-side-bar-menu/index.js +0 -2
- package/dist/src/nile-side-bar-menu/index.js.map +0 -1
- package/dist/src/nile-side-bar-menu/nile-side-bar-menu.css.d.ts +0 -12
- package/dist/src/nile-side-bar-menu/nile-side-bar-menu.css.js +0 -17
- package/dist/src/nile-side-bar-menu/nile-side-bar-menu.css.js.map +0 -1
- package/dist/src/nile-side-bar-menu/nile-side-bar-menu.d.ts +0 -32
- package/dist/src/nile-side-bar-menu/nile-side-bar-menu.js +0 -43
- package/dist/src/nile-side-bar-menu/nile-side-bar-menu.js.map +0 -1
- package/dist/src/nile-side-bar-menu-item/index.d.ts +0 -1
- package/dist/src/nile-side-bar-menu-item/index.js +0 -2
- package/dist/src/nile-side-bar-menu-item/index.js.map +0 -1
- package/dist/src/nile-side-bar-menu-item/nile-side-bar-menu-item.css.d.ts +0 -12
- package/dist/src/nile-side-bar-menu-item/nile-side-bar-menu-item.css.js +0 -17
- package/dist/src/nile-side-bar-menu-item/nile-side-bar-menu-item.css.js.map +0 -1
- package/dist/src/nile-side-bar-menu-item/nile-side-bar-menu-item.d.ts +0 -32
- package/dist/src/nile-side-bar-menu-item/nile-side-bar-menu-item.js +0 -43
- package/dist/src/nile-side-bar-menu-item/nile-side-bar-menu-item.js.map +0 -1
- package/dist/src/nile-table-row-content/index.d.ts +0 -1
- package/dist/src/nile-table-row-content/index.js +0 -2
- package/dist/src/nile-table-row-content/index.js.map +0 -1
- package/dist/src/nile-table-row-content/nile-table-row-content.css.d.ts +0 -12
- package/dist/src/nile-table-row-content/nile-table-row-content.css.js +0 -30
- package/dist/src/nile-table-row-content/nile-table-row-content.css.js.map +0 -1
- package/dist/src/nile-table-row-content/nile-table-row-content.d.ts +0 -32
- package/dist/src/nile-table-row-content/nile-table-row-content.js +0 -46
- package/dist/src/nile-table-row-content/nile-table-row-content.js.map +0 -1
- package/dist/src/nile-test/index.d.ts +0 -1
- package/dist/src/nile-test/index.js +0 -2
- package/dist/src/nile-test/index.js.map +0 -1
- package/dist/src/nile-test/nile-test.css.d.ts +0 -12
- package/dist/src/nile-test/nile-test.css.js +0 -17
- package/dist/src/nile-test/nile-test.css.js.map +0 -1
- package/dist/src/nile-test/nile-test.d.ts +0 -32
- package/dist/src/nile-test/nile-test.js +0 -43
- package/dist/src/nile-test/nile-test.js.map +0 -1
- package/dist/src/nile-tooltip/nile-tooltip-utils.d.ts +0 -18
- package/dist/src/nile-tooltip/nile-tooltip-utils.js +0 -216
- package/dist/src/nile-tooltip/nile-tooltip-utils.js.map +0 -1
- package/dist/src/nile-tooltip/nile-tooltip.test.d.ts +0 -1
- package/dist/src/nile-tooltip/nile-tooltip.test.js +0 -148
- package/dist/src/nile-tooltip/nile-tooltip.test.js.map +0 -1
- package/dist/virtualize-73f68d08.esm.js +0 -22
- package/dist/virtualize-eb33a9a0.cjs.js +0 -18
- package/dist/virtualize-eb33a9a0.cjs.js.map +0 -1
- package/src/nile-side-bar/index.ts +0 -1
- package/src/nile-side-bar/nile-side-bar.css.ts +0 -114
- package/src/nile-side-bar/nile-side-bar.ts +0 -66
- package/src/nile-side-bar-action/index.ts +0 -1
- package/src/nile-side-bar-action/nile-side-bar-action.css.ts +0 -55
- package/src/nile-side-bar-action/nile-side-bar-action.ts +0 -367
- package/src/nile-side-bar-action-menu/index.ts +0 -1
- package/src/nile-side-bar-action-menu/nile-side-bar-action-menu.css.ts +0 -75
- package/src/nile-side-bar-action-menu/nile-side-bar-action-menu.ts +0 -239
- package/src/nile-side-bar-action-menu-item/index.ts +0 -1
- package/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.css.ts +0 -142
- package/src/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.ts +0 -203
- package/src/nile-side-bar-content/index.ts +0 -1
- package/src/nile-side-bar-content/nile-side-bar-content.css.ts +0 -19
- package/src/nile-side-bar-content/nile-side-bar-content.ts +0 -54
- package/src/nile-side-bar-expand/index.ts +0 -1
- package/src/nile-side-bar-expand/nile-side-bar-expand.css.ts +0 -47
- package/src/nile-side-bar-expand/nile-side-bar-expand.ts +0 -55
- package/src/nile-side-bar-footer/index.ts +0 -1
- package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +0 -47
- package/src/nile-side-bar-footer/nile-side-bar-footer.ts +0 -42
- package/src/nile-side-bar-footer-icon/index.ts +0 -1
- package/src/nile-side-bar-footer-icon/nile-side-bar-footer-icon.css.ts +0 -19
- package/src/nile-side-bar-footer-icon/nile-side-bar-footer-icon.ts +0 -54
- package/src/nile-side-bar-footer-item/index.ts +0 -1
- package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.ts +0 -76
- package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.ts +0 -45
- package/src/nile-side-bar-footer-text/index.ts +0 -1
- package/src/nile-side-bar-footer-text/nile-side-bar-footer-text.css.ts +0 -33
- package/src/nile-side-bar-footer-text/nile-side-bar-footer-text.ts +0 -51
- package/src/nile-side-bar-group/index.ts +0 -1
- package/src/nile-side-bar-group/nile-side-bar-group.css.ts +0 -55
- package/src/nile-side-bar-group/nile-side-bar-group.ts +0 -74
- package/src/nile-side-bar-group-item/index.ts +0 -1
- package/src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts +0 -68
- package/src/nile-side-bar-group-item/nile-side-bar-group-item.ts +0 -146
- package/src/nile-side-bar-group-item-content/index.ts +0 -1
- package/src/nile-side-bar-group-item-content/nile-side-bar-group-item-content.css.ts +0 -19
- package/src/nile-side-bar-group-item-content/nile-side-bar-group-item-content.ts +0 -54
- package/src/nile-side-bar-group-item-icon/index.ts +0 -1
- package/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.ts +0 -35
- package/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.ts +0 -97
- package/src/nile-side-bar-group-item-text/index.ts +0 -1
- package/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.ts +0 -31
- package/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.ts +0 -49
- package/src/nile-side-bar-header/index.ts +0 -1
- package/src/nile-side-bar-header/nile-side-bar-header.css.ts +0 -66
- package/src/nile-side-bar-header/nile-side-bar-header.ts +0 -57
- package/src/nile-side-bar-logo/index.ts +0 -1
- package/src/nile-side-bar-logo/nile-side-bar-logo.css.ts +0 -49
- package/src/nile-side-bar-logo/nile-side-bar-logo.ts +0 -52
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
export function isInViewport(element) {
|
|
2
|
-
const rect = element.getBoundingClientRect();
|
|
3
|
-
return (rect.top >= 0 &&
|
|
4
|
-
rect.left >= 0 &&
|
|
5
|
-
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
|
|
6
|
-
rect.right <= (window.innerWidth || document.documentElement.clientWidth));
|
|
7
|
-
}
|
|
8
|
-
export function getValidTooltipPosition(triggerRect, tooltipRect, originalPlacement, distance, skidding, caretSize, viewportWidth, viewportHeight) {
|
|
9
|
-
const triggerCenterX = triggerRect.left + triggerRect.width / 2;
|
|
10
|
-
const getCandidatePosition = (placement) => {
|
|
11
|
-
let top = 0;
|
|
12
|
-
let left = 0;
|
|
13
|
-
switch (placement) {
|
|
14
|
-
case 'top':
|
|
15
|
-
top = triggerRect.top - tooltipRect.height - distance;
|
|
16
|
-
left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;
|
|
17
|
-
break;
|
|
18
|
-
case 'top-start': {
|
|
19
|
-
top = triggerRect.top - tooltipRect.height - distance;
|
|
20
|
-
const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;
|
|
21
|
-
left = Math.max(triggerRect.left + skidding, centeredLeft);
|
|
22
|
-
break;
|
|
23
|
-
}
|
|
24
|
-
case 'top-end': {
|
|
25
|
-
top = triggerRect.top - tooltipRect.height - distance;
|
|
26
|
-
const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;
|
|
27
|
-
const maxLeft = triggerRect.right - tooltipRect.width + skidding;
|
|
28
|
-
left = Math.min(centeredLeft, maxLeft);
|
|
29
|
-
break;
|
|
30
|
-
}
|
|
31
|
-
case 'bottom':
|
|
32
|
-
top = triggerRect.bottom + distance;
|
|
33
|
-
left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;
|
|
34
|
-
break;
|
|
35
|
-
case 'bottom-start': {
|
|
36
|
-
top = triggerRect.bottom + distance;
|
|
37
|
-
const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;
|
|
38
|
-
left = Math.max(triggerRect.left + skidding, centeredLeft);
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
case 'bottom-end': {
|
|
42
|
-
top = triggerRect.bottom + distance;
|
|
43
|
-
const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;
|
|
44
|
-
const maxLeft = triggerRect.right - tooltipRect.width + skidding;
|
|
45
|
-
left = Math.min(centeredLeft, maxLeft);
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
case 'left':
|
|
49
|
-
top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + skidding;
|
|
50
|
-
left = triggerRect.left - tooltipRect.width - distance;
|
|
51
|
-
break;
|
|
52
|
-
case 'left-start': {
|
|
53
|
-
const triggerCenterY = triggerRect.top + triggerRect.height / 2;
|
|
54
|
-
top = triggerCenterY - tooltipRect.height / 2;
|
|
55
|
-
left = triggerRect.left - tooltipRect.width - distance;
|
|
56
|
-
if (top < triggerRect.top) {
|
|
57
|
-
top = triggerRect.top;
|
|
58
|
-
}
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
case 'left-end': {
|
|
62
|
-
const triggerCenterY = triggerRect.top + triggerRect.height / 2;
|
|
63
|
-
top = triggerCenterY - tooltipRect.height / 2;
|
|
64
|
-
left = triggerRect.left - tooltipRect.width - distance;
|
|
65
|
-
if (top + tooltipRect.height > triggerRect.bottom) {
|
|
66
|
-
top = triggerRect.bottom - tooltipRect.height;
|
|
67
|
-
}
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
case 'right':
|
|
71
|
-
top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + skidding;
|
|
72
|
-
left = triggerRect.right + distance;
|
|
73
|
-
break;
|
|
74
|
-
case 'right-start': {
|
|
75
|
-
const triggerCenterY = triggerRect.top + triggerRect.height / 2;
|
|
76
|
-
top = triggerCenterY - tooltipRect.height / 2;
|
|
77
|
-
left = triggerRect.right + distance;
|
|
78
|
-
if (top < triggerRect.top) {
|
|
79
|
-
top = triggerRect.top;
|
|
80
|
-
}
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
case 'right-end': {
|
|
84
|
-
const triggerCenterY = triggerRect.top + triggerRect.height / 2;
|
|
85
|
-
top = triggerCenterY - tooltipRect.height / 2;
|
|
86
|
-
left = triggerRect.right + distance;
|
|
87
|
-
if (top + tooltipRect.height > triggerRect.bottom) {
|
|
88
|
-
top = triggerRect.bottom - tooltipRect.height;
|
|
89
|
-
}
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
default:
|
|
93
|
-
top = triggerRect.top - tooltipRect.height - distance;
|
|
94
|
-
left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;
|
|
95
|
-
}
|
|
96
|
-
return { top, left };
|
|
97
|
-
};
|
|
98
|
-
const candidateFits = (top, left) => top >= 0 &&
|
|
99
|
-
left >= 0 &&
|
|
100
|
-
top + tooltipRect.height <= viewportHeight &&
|
|
101
|
-
left + tooltipRect.width <= viewportWidth;
|
|
102
|
-
let placement = originalPlacement;
|
|
103
|
-
let candidate = getCandidatePosition(placement);
|
|
104
|
-
if (!candidateFits(candidate.top, candidate.left)) {
|
|
105
|
-
if (['top', 'top-start', 'top-end'].includes(originalPlacement)) {
|
|
106
|
-
placement = 'bottom';
|
|
107
|
-
}
|
|
108
|
-
else if (['bottom', 'bottom-start', 'bottom-end'].includes(originalPlacement)) {
|
|
109
|
-
placement = 'top';
|
|
110
|
-
}
|
|
111
|
-
else if (['right', 'right-start', 'right-end'].includes(originalPlacement)) {
|
|
112
|
-
placement = 'left';
|
|
113
|
-
}
|
|
114
|
-
else if (['left', 'left-start', 'left-end'].includes(originalPlacement)) {
|
|
115
|
-
placement = 'right';
|
|
116
|
-
}
|
|
117
|
-
candidate = getCandidatePosition(placement);
|
|
118
|
-
const leftCandidate = getCandidatePosition('left');
|
|
119
|
-
const bottomCandidate = getCandidatePosition('bottom');
|
|
120
|
-
const topCandidate = getCandidatePosition('top');
|
|
121
|
-
if (!candidateFits(leftCandidate.top, leftCandidate.left) &&
|
|
122
|
-
!candidateFits(bottomCandidate.top, bottomCandidate.left) &&
|
|
123
|
-
!candidateFits(topCandidate.top, topCandidate.left)) {
|
|
124
|
-
placement = 'right';
|
|
125
|
-
candidate = getCandidatePosition(placement);
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
const rightCandidate = getCandidatePosition('right');
|
|
129
|
-
if (!candidateFits(rightCandidate.top, rightCandidate.left) &&
|
|
130
|
-
!candidateFits(bottomCandidate.top, bottomCandidate.left) &&
|
|
131
|
-
!candidateFits(topCandidate.top, topCandidate.left)) {
|
|
132
|
-
placement = 'left';
|
|
133
|
-
candidate = getCandidatePosition(placement);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
if (candidate.left < 0) {
|
|
138
|
-
candidate.left = 5;
|
|
139
|
-
}
|
|
140
|
-
else if (candidate.left + tooltipRect.width > viewportWidth) {
|
|
141
|
-
candidate.left = viewportWidth - tooltipRect.width - 5;
|
|
142
|
-
}
|
|
143
|
-
if (candidate.top < 0) {
|
|
144
|
-
candidate.top = 5;
|
|
145
|
-
}
|
|
146
|
-
else if (candidate.top + tooltipRect.height > viewportHeight) {
|
|
147
|
-
candidate.top = viewportHeight - tooltipRect.height - 5;
|
|
148
|
-
}
|
|
149
|
-
return { ...candidate, placement };
|
|
150
|
-
}
|
|
151
|
-
export function getCaretPosition({ placement, tooltipRect, triggerRect, caretSize, left, top }) {
|
|
152
|
-
const triggerCenterX = triggerRect.left + triggerRect.width / 2;
|
|
153
|
-
const triggerCenterY = triggerRect.top + triggerRect.height / 2;
|
|
154
|
-
const [primaryPlacement, secondaryPlacement] = placement.split('-');
|
|
155
|
-
let caretLeft = 0;
|
|
156
|
-
let caretTop = 0;
|
|
157
|
-
switch (primaryPlacement) {
|
|
158
|
-
case 'top':
|
|
159
|
-
caretTop = tooltipRect.height - caretSize;
|
|
160
|
-
caretLeft = triggerCenterX - left - caretSize;
|
|
161
|
-
if (placement === 'top-end') {
|
|
162
|
-
caretLeft = triggerCenterX - left - caretSize;
|
|
163
|
-
}
|
|
164
|
-
else if (secondaryPlacement === 'start') {
|
|
165
|
-
caretLeft = triggerCenterX - left - caretSize;
|
|
166
|
-
}
|
|
167
|
-
else if (secondaryPlacement === 'end') {
|
|
168
|
-
caretLeft = tooltipRect.width - 2 * caretSize + 8;
|
|
169
|
-
}
|
|
170
|
-
caretLeft = Math.max(caretSize, Math.min(caretLeft, tooltipRect.width - 2 * caretSize));
|
|
171
|
-
break;
|
|
172
|
-
case 'bottom':
|
|
173
|
-
caretTop = -caretSize;
|
|
174
|
-
caretLeft = triggerCenterX - left - caretSize;
|
|
175
|
-
break;
|
|
176
|
-
case 'left':
|
|
177
|
-
caretLeft = tooltipRect.width - caretSize;
|
|
178
|
-
if (secondaryPlacement === 'start') {
|
|
179
|
-
const computedCaretTop = triggerCenterY - top - caretSize;
|
|
180
|
-
const minCaretTop = triggerRect.top - top;
|
|
181
|
-
caretTop = Math.max(computedCaretTop, minCaretTop);
|
|
182
|
-
}
|
|
183
|
-
else if (secondaryPlacement === 'end') {
|
|
184
|
-
const computedCaretTop = triggerCenterY - top - caretSize;
|
|
185
|
-
const maxCaretTop = triggerRect.bottom - top - 2 * caretSize;
|
|
186
|
-
caretTop = Math.min(computedCaretTop, maxCaretTop);
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
caretTop = triggerCenterY - top - caretSize;
|
|
190
|
-
}
|
|
191
|
-
caretTop = Math.max(caretSize, Math.min(caretTop, tooltipRect.height - 2 * caretSize));
|
|
192
|
-
break;
|
|
193
|
-
case 'right':
|
|
194
|
-
caretLeft = -caretSize;
|
|
195
|
-
if (secondaryPlacement === 'start') {
|
|
196
|
-
const computedCaretTop = triggerCenterY - top - caretSize;
|
|
197
|
-
const minCaretTop = triggerRect.top - top;
|
|
198
|
-
caretTop = Math.max(computedCaretTop, minCaretTop);
|
|
199
|
-
}
|
|
200
|
-
else if (secondaryPlacement === 'end') {
|
|
201
|
-
const computedCaretTop = triggerCenterY - top - caretSize;
|
|
202
|
-
const maxCaretTop = triggerRect.bottom - top - 2 * caretSize;
|
|
203
|
-
caretTop = Math.min(computedCaretTop, maxCaretTop);
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
caretTop = triggerCenterY - top - caretSize;
|
|
207
|
-
}
|
|
208
|
-
caretTop = Math.max(caretSize, Math.min(caretTop, tooltipRect.height - 2 * caretSize));
|
|
209
|
-
break;
|
|
210
|
-
default:
|
|
211
|
-
caretLeft = tooltipRect.width / 2 - caretSize;
|
|
212
|
-
caretTop = tooltipRect.height / 2 - caretSize;
|
|
213
|
-
}
|
|
214
|
-
return { caretLeft, caretTop };
|
|
215
|
-
}
|
|
216
|
-
//# sourceMappingURL=nile-tooltip-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-tooltip-utils.js","sourceRoot":"","sources":["../../../src/nile-tooltip/nile-tooltip-utils.ts"],"names":[],"mappings":"AAAA,MAAM,UA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top >= 0 &&\n rect.left >= 0 &&\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n rect.right <= (window.innerWidth || document.documentElement.clientWidth)\n );\n}\n\n\nexport function getValidTooltipPosition(\n triggerRect: DOMRect,\n tooltipRect: DOMRect,\n originalPlacement: string,\n distance: number,\n skidding: number,\n caretSize: number,\n viewportWidth: number,\n viewportHeight: number\n): { top: number; left: number; placement: string } {\n const triggerCenterX = triggerRect.left + triggerRect.width / 2;\n\n const getCandidatePosition = (placement: string) => {\n let top = 0;\n let left = 0;\n\n switch (placement) {\n case 'top':\n top = triggerRect.top - tooltipRect.height - distance;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;\n break;\n case 'top-start': {\n top = triggerRect.top - tooltipRect.height - distance;\n const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;\n left = Math.max(triggerRect.left + skidding, centeredLeft);\n break;\n }\n case 'top-end': {\n top = triggerRect.top - tooltipRect.height - distance;\n const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;\n const maxLeft = triggerRect.right - tooltipRect.width + skidding;\n left = Math.min(centeredLeft, maxLeft);\n break;\n }\n\n case 'bottom':\n top = triggerRect.bottom + distance;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;\n break;\n case 'bottom-start': {\n top = triggerRect.bottom + distance;\n const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;\n left = Math.max(triggerRect.left + skidding, centeredLeft);\n\n break;\n }\n\n case 'bottom-end': {\n top = triggerRect.bottom + distance;\n const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;\n const maxLeft = triggerRect.right - tooltipRect.width + skidding;\n left = Math.min(centeredLeft, maxLeft);\n break;\n }\n\n case 'left':\n top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + skidding;\n left = triggerRect.left - tooltipRect.width - distance;\n break;\n case 'left-start': {\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n top = triggerCenterY - tooltipRect.height / 2;\n left = triggerRect.left - tooltipRect.width - distance;\n if (top < triggerRect.top) {\n top = triggerRect.top;\n }\n break;\n }\n\n case 'left-end': {\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n top = triggerCenterY - tooltipRect.height / 2;\n left = triggerRect.left - tooltipRect.width - distance;\n if (top + tooltipRect.height > triggerRect.bottom) {\n top = triggerRect.bottom - tooltipRect.height;\n }\n\n break;\n }\n\n case 'right':\n top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + skidding;\n left = triggerRect.right + distance;\n break;\n case 'right-start': {\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n top = triggerCenterY - tooltipRect.height / 2;\n left = triggerRect.right + distance;\n if (top < triggerRect.top) {\n top = triggerRect.top;\n }\n\n break;\n }\n\n case 'right-end': {\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n top = triggerCenterY - tooltipRect.height / 2;\n left = triggerRect.right + distance;\n if (top + tooltipRect.height > triggerRect.bottom) {\n top = triggerRect.bottom - tooltipRect.height;\n }\n\n break;\n }\n\n default:\n top = triggerRect.top - tooltipRect.height - distance;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;\n }\n\n return { top, left };\n };\n\n const candidateFits = (top: number, left: number) =>\n top >= 0 &&\n left >= 0 &&\n top + tooltipRect.height <= viewportHeight &&\n left + tooltipRect.width <= viewportWidth;\n\n let placement = originalPlacement;\n let candidate = getCandidatePosition(placement);\n\n if (!candidateFits(candidate.top, candidate.left)) {\n if (['top', 'top-start', 'top-end'].includes(originalPlacement)) {\n placement = 'bottom';\n } else if (['bottom', 'bottom-start', 'bottom-end'].includes(originalPlacement)) {\n placement = 'top';\n } else if (['right', 'right-start', 'right-end'].includes(originalPlacement)) {\n placement = 'left';\n } else if (['left', 'left-start', 'left-end'].includes(originalPlacement)) {\n placement = 'right';\n }\n candidate = getCandidatePosition(placement);\n const leftCandidate = getCandidatePosition('left');\n const bottomCandidate = getCandidatePosition('bottom');\n const topCandidate = getCandidatePosition('top');\n if (\n !candidateFits(leftCandidate.top, leftCandidate.left) &&\n !candidateFits(bottomCandidate.top, bottomCandidate.left) &&\n !candidateFits(topCandidate.top, topCandidate.left)\n ) {\n placement = 'right';\n candidate = getCandidatePosition(placement);\n }\n else {\n const rightCandidate = getCandidatePosition('right');\n if (\n !candidateFits(rightCandidate.top, rightCandidate.left) &&\n !candidateFits(bottomCandidate.top, bottomCandidate.left) &&\n !candidateFits(topCandidate.top, topCandidate.left)\n ) {\n placement = 'left';\n candidate = getCandidatePosition(placement);\n }\n }\n }\n\n if (candidate.left < 0) {\n candidate.left = 5;\n } else if (candidate.left + tooltipRect.width > viewportWidth) {\n candidate.left = viewportWidth - tooltipRect.width - 5;\n }\n\n if (candidate.top < 0) {\n candidate.top = 5;\n } else if (candidate.top + tooltipRect.height > viewportHeight) {\n candidate.top = viewportHeight - tooltipRect.height - 5;\n }\n\n return { ...candidate, placement };\n}\n\n\n\nexport interface CaretPositionInput {\n placement: string;\n tooltipRect: DOMRect;\n triggerRect: DOMRect;\n caretSize: number;\n left: number;\n top: number;\n}\n\nexport function getCaretPosition({\n placement,\n tooltipRect,\n triggerRect,\n caretSize,\n left,\n top\n}: CaretPositionInput): { caretLeft: number; caretTop: number } {\n const triggerCenterX = triggerRect.left + triggerRect.width / 2;\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n\n const [primaryPlacement, secondaryPlacement] = placement.split('-');\n\n let caretLeft = 0;\n let caretTop = 0;\n\n switch (primaryPlacement) {\n case 'top':\n caretTop = tooltipRect.height - caretSize;\n caretLeft = triggerCenterX - left - caretSize;\n if (placement === 'top-end') {\n caretLeft = triggerCenterX - left - caretSize;\n } else if (secondaryPlacement === 'start') {\n caretLeft = triggerCenterX - left - caretSize;\n } else if (secondaryPlacement === 'end') {\n caretLeft = tooltipRect.width - 2 * caretSize + 8;\n }\n caretLeft = Math.max(caretSize, Math.min(caretLeft, tooltipRect.width - 2 * caretSize));\n break;\n\n case 'bottom':\n caretTop = -caretSize;\n caretLeft = triggerCenterX - left - caretSize;\n break;\n\n case 'left':\n caretLeft = tooltipRect.width - caretSize;\n if (secondaryPlacement === 'start') {\n const computedCaretTop = triggerCenterY - top - caretSize;\n const minCaretTop = triggerRect.top - top;\n caretTop = Math.max(computedCaretTop, minCaretTop);\n } else if (secondaryPlacement === 'end') {\n const computedCaretTop = triggerCenterY - top - caretSize;\n const maxCaretTop = triggerRect.bottom - top - 2 * caretSize;\n caretTop = Math.min(computedCaretTop, maxCaretTop);\n } else {\n caretTop = triggerCenterY - top - caretSize;\n }\n caretTop = Math.max(caretSize, Math.min(caretTop, tooltipRect.height - 2 * caretSize));\n break;\n\n\n case 'right':\n caretLeft = -caretSize;\n if (secondaryPlacement === 'start') {\n const computedCaretTop = triggerCenterY - top - caretSize;\n const minCaretTop = triggerRect.top - top;\n caretTop = Math.max(computedCaretTop, minCaretTop);\n } else if (secondaryPlacement === 'end') {\n const computedCaretTop = triggerCenterY - top - caretSize;\n const maxCaretTop = triggerRect.bottom - top - 2 * caretSize;\n caretTop = Math.min(computedCaretTop, maxCaretTop);\n } else {\n caretTop = triggerCenterY - top - caretSize;\n }\n caretTop = Math.max(caretSize, Math.min(caretTop, tooltipRect.height - 2 * caretSize));\n break;\n\n\n default:\n caretLeft = tooltipRect.width / 2 - caretSize;\n caretTop = tooltipRect.height / 2 - caretSize;\n }\n\n return { caretLeft, caretTop };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './nile-tooltip';
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { fixture, html, assert, oneEvent, waitUntil } from '@open-wc/testing';
|
|
2
|
-
import './nile-tooltip';
|
|
3
|
-
describe('NileTooltip', () => {
|
|
4
|
-
it('renders with default properties', async () => {
|
|
5
|
-
const el = await fixture(html `<nile-tooltip content="Hello"><button>Hover me</button></nile-tooltip>`);
|
|
6
|
-
assert.equal(el.content, 'Hello');
|
|
7
|
-
assert.equal(el.placement, 'top');
|
|
8
|
-
assert.equal(el.disabled, false);
|
|
9
|
-
assert.equal(el.open, false);
|
|
10
|
-
});
|
|
11
|
-
it('renders text content when no slot is used', async () => {
|
|
12
|
-
const el = await fixture(html `<nile-tooltip content="Fallback"><button>Trigger</button></nile-tooltip>`);
|
|
13
|
-
const content = el.shadowRoot.querySelector('.tooltip-content');
|
|
14
|
-
assert.include(content.textContent, 'Fallback');
|
|
15
|
-
});
|
|
16
|
-
it('uses slotted content when provided', async () => {
|
|
17
|
-
const el = await fixture(html `
|
|
18
|
-
<nile-tooltip>
|
|
19
|
-
<div slot="content">Slot Content</div>
|
|
20
|
-
<button>Trigger</button>
|
|
21
|
-
</nile-tooltip>
|
|
22
|
-
`);
|
|
23
|
-
const slot = el.shadowRoot.querySelector('slot[name="content"]');
|
|
24
|
-
const assigned = slot.assignedNodes({ flatten: true });
|
|
25
|
-
assert.isAbove(assigned.length, 0);
|
|
26
|
-
assert.include(assigned[0].textContent ?? '', 'Slot Content');
|
|
27
|
-
});
|
|
28
|
-
it('shows tooltip on hover when trigger includes "hover"', async () => {
|
|
29
|
-
const el = await fixture(html `
|
|
30
|
-
<nile-tooltip content="Tooltip" trigger="hover">
|
|
31
|
-
<button>Hover me</button>
|
|
32
|
-
</nile-tooltip>
|
|
33
|
-
`);
|
|
34
|
-
const trigger = el.shadowRoot.querySelector('.trigger-container');
|
|
35
|
-
trigger.dispatchEvent(new Event('mouseover', { bubbles: true }));
|
|
36
|
-
await waitUntil(() => el.open === true);
|
|
37
|
-
assert.isTrue(el.open);
|
|
38
|
-
});
|
|
39
|
-
it('hides tooltip on mouseout when trigger includes "hover"', async () => {
|
|
40
|
-
const el = await fixture(html `
|
|
41
|
-
<nile-tooltip content="Tooltip" trigger="hover">
|
|
42
|
-
<button>Hover me</button>
|
|
43
|
-
</nile-tooltip>
|
|
44
|
-
`);
|
|
45
|
-
const trigger = el.shadowRoot.querySelector('.trigger-container');
|
|
46
|
-
trigger.dispatchEvent(new Event('mouseover', { bubbles: true }));
|
|
47
|
-
await waitUntil(() => el.open === true);
|
|
48
|
-
trigger.dispatchEvent(new Event('mouseout', { bubbles: true }));
|
|
49
|
-
await waitUntil(() => el.open === false);
|
|
50
|
-
});
|
|
51
|
-
it('toggles tooltip on click when trigger includes "click"', async () => {
|
|
52
|
-
const el = await fixture(html `
|
|
53
|
-
<nile-tooltip content="Click me" trigger="click">
|
|
54
|
-
<button>Click</button>
|
|
55
|
-
</nile-tooltip>
|
|
56
|
-
`);
|
|
57
|
-
const trigger = el.shadowRoot.querySelector('.trigger-container');
|
|
58
|
-
trigger.click();
|
|
59
|
-
await waitUntil(() => el.open === true);
|
|
60
|
-
trigger.click();
|
|
61
|
-
await waitUntil(() => el.open === false);
|
|
62
|
-
});
|
|
63
|
-
it('shows and hides tooltip on focus/blur when trigger includes "focus"', async () => {
|
|
64
|
-
const el = await fixture(html `
|
|
65
|
-
<nile-tooltip content="Focus" trigger="focus">
|
|
66
|
-
<button>Focus</button>
|
|
67
|
-
</nile-tooltip>
|
|
68
|
-
`);
|
|
69
|
-
const trigger = el.shadowRoot.querySelector('.trigger-container');
|
|
70
|
-
trigger.dispatchEvent(new Event('focusin'));
|
|
71
|
-
await waitUntil(() => el.open === true);
|
|
72
|
-
trigger.dispatchEvent(new Event('focusout'));
|
|
73
|
-
await waitUntil(() => el.open === false);
|
|
74
|
-
});
|
|
75
|
-
it('does not show tooltip when disabled', async () => {
|
|
76
|
-
const el = await fixture(html `
|
|
77
|
-
<nile-tooltip content="Disabled" disabled trigger="hover">
|
|
78
|
-
<button>Hover me</button>
|
|
79
|
-
</nile-tooltip>
|
|
80
|
-
`);
|
|
81
|
-
const trigger = el.shadowRoot.querySelector('.trigger-container');
|
|
82
|
-
trigger.dispatchEvent(new Event('mouseover'));
|
|
83
|
-
await new Promise(resolve => setTimeout(resolve, 200));
|
|
84
|
-
assert.isFalse(el.open);
|
|
85
|
-
});
|
|
86
|
-
it('emits nile-show and nile-after-show events', async () => {
|
|
87
|
-
const el = await fixture(html `
|
|
88
|
-
<nile-tooltip content="Event test" trigger="click">
|
|
89
|
-
<button>Click</button>
|
|
90
|
-
</nile-tooltip>
|
|
91
|
-
`);
|
|
92
|
-
const trigger = el.shadowRoot.querySelector('.trigger-container');
|
|
93
|
-
setTimeout(() => trigger.click());
|
|
94
|
-
const showEvent = await oneEvent(el, 'nile-show');
|
|
95
|
-
assert.ok(showEvent);
|
|
96
|
-
const afterShow = await oneEvent(el, 'nile-after-show');
|
|
97
|
-
assert.ok(afterShow);
|
|
98
|
-
});
|
|
99
|
-
it('emits nile-hide and nile-after-hide events', async () => {
|
|
100
|
-
const el = await fixture(html `
|
|
101
|
-
<nile-tooltip content="Event test" trigger="click">
|
|
102
|
-
<button>Click</button>
|
|
103
|
-
</nile-tooltip>
|
|
104
|
-
`);
|
|
105
|
-
const trigger = el.shadowRoot.querySelector('.trigger-container');
|
|
106
|
-
trigger.click();
|
|
107
|
-
await waitUntil(() => el.open === true);
|
|
108
|
-
setTimeout(() => trigger.click());
|
|
109
|
-
const hideEvent = await oneEvent(el, 'nile-hide');
|
|
110
|
-
assert.ok(hideEvent);
|
|
111
|
-
const afterHide = await oneEvent(el, 'nile-after-hide');
|
|
112
|
-
assert.ok(afterHide);
|
|
113
|
-
});
|
|
114
|
-
it('defaults to "bottom" placement when given invalid value', async () => {
|
|
115
|
-
const el = await fixture(html `
|
|
116
|
-
<nile-tooltip content="Fallback" placement=${'invalid'} >
|
|
117
|
-
<button>Trigger</button>
|
|
118
|
-
</nile-tooltip>
|
|
119
|
-
`);
|
|
120
|
-
await el.updateComplete;
|
|
121
|
-
assert.equal(el.placement, 'top');
|
|
122
|
-
});
|
|
123
|
-
it('updates hasTooltipSlot on slot change', async () => {
|
|
124
|
-
const el = await fixture(html `
|
|
125
|
-
<nile-tooltip>
|
|
126
|
-
<div slot="content">Initial slot</div>
|
|
127
|
-
<button>Trigger</button>
|
|
128
|
-
</nile-tooltip>
|
|
129
|
-
`);
|
|
130
|
-
const slot = el.shadowRoot.querySelector('slot[name="content"]');
|
|
131
|
-
const newSlotNode = document.createElement('div');
|
|
132
|
-
newSlotNode.slot = 'content';
|
|
133
|
-
newSlotNode.textContent = 'Updated slot';
|
|
134
|
-
el.appendChild(newSlotNode);
|
|
135
|
-
slot.dispatchEvent(new Event('slotchange'));
|
|
136
|
-
await el.updateComplete;
|
|
137
|
-
assert.isTrue(el.hasTooltipSlot);
|
|
138
|
-
});
|
|
139
|
-
it('respects hoist attribute', async () => {
|
|
140
|
-
const el = await fixture(html `
|
|
141
|
-
<nile-tooltip hoist content="Hoisted">
|
|
142
|
-
<button>Hoist</button>
|
|
143
|
-
</nile-tooltip>
|
|
144
|
-
`);
|
|
145
|
-
assert.isTrue(el.hoist);
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
//# sourceMappingURL=nile-tooltip.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-tooltip.test.js","sourceRoot":"","sources":["../../../src/nile-tooltip/nile-tooltip.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,gBAAgB,CAAC;AAGxB,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAE3B,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAC/C,MAAM,EAAE,GAAG,MAAM,OAAO,CAAc,IAAI,CAAA,wEAAwE,CAAC,CAAC;QACpH,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAClC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAClC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,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AE,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAGH,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;QACrD,MAAM,EAAE,GAAG,MAAM,OAAO,CAAc,IAAI,CAAA;;;;;KAKzC,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,sBAAsB,CAAoB,CAAC;QACrF,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAClD,WAAW,CAAC,IAAI,GAAG,SAAS,CAAC;QAC7B,WAAW,CAAC,WAAW,GAAG,cAAc,CAAC;QACzC,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAE5B,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;QAC5C,MAAM,EAAE,CAAC,cAAc,CAAC;QAExB,MAAM,CAAC,MAAM,CAAE,EAAU,CAAC,cAAc,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,KAAK,IAAI,EAAE;QACxC,MAAM,EAAE,GAAG,MAAM,OAAO,CAAc,IAAI,CAAA;;;;KAIzC,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { fixture, html, assert, oneEvent, waitUntil } from '@open-wc/testing';\nimport './nile-tooltip';\nimport { NileTooltip } from './nile-tooltip';\n\ndescribe('NileTooltip', () => {\n\n it('renders with default properties', async () => {\n const el = await fixture<NileTooltip>(html`<nile-tooltip content=\"Hello\"><button>Hover me</button></nile-tooltip>`);\n assert.equal(el.content, 'Hello');\n assert.equal(el.placement, 'top');\n assert.equal(el.disabled, false);\n assert.equal(el.open, false);\n });\n\n it('renders text content when no slot is used', async () => {\n const el = await fixture<NileTooltip>(html`<nile-tooltip content=\"Fallback\"><button>Trigger</button></nile-tooltip>`);\n const content = el.shadowRoot!.querySelector('.tooltip-content')!;\n assert.include(content.textContent!, 'Fallback');\n });\n\n it('uses slotted content when provided', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip>\n <div slot=\"content\">Slot Content</div>\n <button>Trigger</button>\n </nile-tooltip>\n `);\n\n const slot = el.shadowRoot!.querySelector('slot[name=\"content\"]') as HTMLSlotElement;\n const assigned = slot.assignedNodes({ flatten: true });\n assert.isAbove(assigned.length, 0);\n assert.include(assigned[0].textContent ?? '', 'Slot Content');\n });\n\n it('shows tooltip on hover when trigger includes \"hover\"', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Tooltip\" trigger=\"hover\">\n <button>Hover me</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container')!;\n trigger.dispatchEvent(new Event('mouseover', { bubbles: true }));\n await waitUntil(() => el.open === true);\n assert.isTrue(el.open);\n });\n\n it('hides tooltip on mouseout when trigger includes \"hover\"', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Tooltip\" trigger=\"hover\">\n <button>Hover me</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container')!;\n trigger.dispatchEvent(new Event('mouseover', { bubbles: true }));\n await waitUntil(() => el.open === true);\n trigger.dispatchEvent(new Event('mouseout', { bubbles: true }));\n await waitUntil(() => el.open === false);\n });\n\n it('toggles tooltip on click when trigger includes \"click\"', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Click me\" trigger=\"click\">\n <button>Click</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container') as HTMLElement;\n trigger.click();\n await waitUntil(() => el.open === true);\n trigger.click();\n await waitUntil(() => el.open === false);\n });\n\n it('shows and hides tooltip on focus/blur when trigger includes \"focus\"', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Focus\" trigger=\"focus\">\n <button>Focus</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container')!;\n trigger.dispatchEvent(new Event('focusin'));\n await waitUntil(() => el.open === true);\n trigger.dispatchEvent(new Event('focusout'));\n await waitUntil(() => el.open === false);\n });\n\n it('does not show tooltip when disabled', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Disabled\" disabled trigger=\"hover\">\n <button>Hover me</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container')!;\n trigger.dispatchEvent(new Event('mouseover'));\n await new Promise(resolve => setTimeout(resolve, 200));\n assert.isFalse(el.open);\n });\n\n\n it('emits nile-show and nile-after-show events', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Event test\" trigger=\"click\">\n <button>Click</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container') as HTMLElement;\n setTimeout(() => trigger.click());\n const showEvent = await oneEvent(el, 'nile-show');\n assert.ok(showEvent);\n const afterShow = await oneEvent(el, 'nile-after-show');\n assert.ok(afterShow);\n });\n\n it('emits nile-hide and nile-after-hide events', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Event test\" trigger=\"click\">\n <button>Click</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container') as HTMLElement;\n trigger.click();\n await waitUntil(() => el.open === true);\n setTimeout(() => trigger.click());\n const hideEvent = await oneEvent(el, 'nile-hide');\n assert.ok(hideEvent);\n const afterHide = await oneEvent(el, 'nile-after-hide');\n assert.ok(afterHide);\n });\n\n it('defaults to \"bottom\" placement when given invalid value', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Fallback\" placement=${'invalid' as unknown as NileTooltip['placement']} >\n <button>Trigger</button>\n </nile-tooltip>\n `);\n await el.updateComplete;\n assert.equal(el.placement, 'top');\n });\n\n\n it('updates hasTooltipSlot on slot change', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip>\n <div slot=\"content\">Initial slot</div>\n <button>Trigger</button>\n </nile-tooltip>\n `);\n\n const slot = el.shadowRoot!.querySelector('slot[name=\"content\"]') as HTMLSlotElement;\n const newSlotNode = document.createElement('div');\n newSlotNode.slot = 'content';\n newSlotNode.textContent = 'Updated slot';\n el.appendChild(newSlotNode);\n\n slot.dispatchEvent(new Event('slotchange'));\n await el.updateComplete;\n\n assert.isTrue((el as any).hasTooltipSlot);\n });\n\n it('respects hoist attribute', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip hoist content=\"Hoisted\">\n <button>Hoist</button>\n </nile-tooltip>\n `);\n assert.isTrue(el.hoist);\n });\n});\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{noChange as t,html as i}from"lit";import{directive as s,PartType as h}from"lit/directive.js";import{AsyncDirective as e}from"lit/async-directive.js";import{repeat as n}from"lit/directives/repeat.js";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2021 Google LLC
|
|
5
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/class l extends Event{constructor(t){super(l.eventName,{bubbles:!1}),this.first=t.first,this.last=t.last}}l.eventName="rangeChanged";class o extends Event{constructor(t){super(o.eventName,{bubbles:!1}),this.first=t.first,this.last=t.last}}o.eventName="visibilityChanged";class r extends Event{constructor(){super(r.eventName,{bubbles:!1})}}r.eventName="unpinned";class u extends
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2021 Google LLC
|
|
10
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/
|
|
12
|
-
class{constructor(t){this._element=null;const i=t??window;this._node=i,t&&(this._element=t)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}}{constructor(t,i){super(i),this._clients=new Set,this._retarget=null,this._end=null,this.t=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);const s=this._node;this._originalScrollTo=s.scrollTo,this._originalScrollBy=s.scrollBy,this._originalScroll=s.scroll,this._attach(t)}get _destination(){return this.t}get scrolling(){return null!==this._destination}scrollTo(t,i){const s="number"==typeof t&&"number"==typeof i?{left:t,top:i}:t;this._scrollTo(s)}scrollBy(t,i){const s="number"==typeof t&&"number"==typeof i?{left:t,top:i}:t;void 0!==s.top&&(s.top+=this.scrollTop),void 0!==s.left&&(s.left+=this.scrollLeft),this._scrollTo(s)}_nativeScrollTo(t){this._originalScrollTo.bind(this._element||window)(t)}_scrollTo(t,i=null,s=null){null!==this._end&&this._end(),"smooth"===t.behavior?(this._setDestination(t),this._retarget=i,this._end=s):this._resetScrollState(),this._nativeScrollTo(t)}_setDestination(t){let{top:i,left:s}=t;return i=void 0===i?void 0:Math.max(0,Math.min(i,this.maxScrollTop)),s=void 0===s?void 0:Math.max(0,Math.min(s,this.maxScrollLeft)),(null===this._destination||s!==this._destination.left||i!==this._destination.top)&&(this.t={top:i,left:s,behavior:"smooth"},!0)}_resetScrollState(){this.t=null,this._retarget=null,this._end=null}_updateManagedScrollTo(t){this._destination&&this._setDestination(t)&&this._nativeScrollTo(this._destination)}managedScrollTo(t,i,s){return this._scrollTo(t,i,s),this._updateManagedScrollTo}correctScrollError(t){this.correctingScrollError=!0,requestAnimationFrame((()=>requestAnimationFrame((()=>this.correctingScrollError=!1)))),this._nativeScrollTo(t),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(null!==this._destination){const{scrollTop:t,scrollLeft:i}=this;let{top:s,left:h}=this._destination;s=Math.min(s||0,this.maxScrollTop),h=Math.min(h||0,this.maxScrollLeft);const e=Math.abs(s-t),n=Math.abs(h-i);e<1&&n<1&&(this._end&&this._end(),this._resetScrollState())}}detach(t){return this._clients.delete(t),0===this._clients.size&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(t){this._clients.add(t),1===this._clients.size&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}}
|
|
13
|
-
/**
|
|
14
|
-
* @license
|
|
15
|
-
* Copyright 2021 Google LLC
|
|
16
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/let a="undefined"!=typeof window?window.ResizeObserver:void 0;const c=Symbol("virtualizerRef");let d;class f{constructor(t){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!t)throw new Error("Virtualizer constructor requires a configuration object");if(!t.hostElement)throw new Error('Virtualizer configuration requires the "hostElement" property');this._init(t)}set items(t){Array.isArray(t)&&t!==this._items&&(this._itemsChanged=!0,this._items=t,this._schedule(this._updateLayout))}_init(t){this._isScroller=!!t.scroller,this._initHostElement(t);const i=t.layout||{};this._layoutInitialized=this._initLayout(i)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new a((()=>this._hostElementSizeChanged())),this._childrenRO=new a(this._childrenSizeChanged.bind(this))}_initHostElement(t){const i=this._hostElement=t.hostElement;this._applyVirtualizerStyles(),i[c]=this}connected(){this._initObservers();const t=this._isScroller;this._clippingAncestors=function(t,i=!1){let s=!1;return function(t,i=!1){const s=[];let h=i?t:w(t);for(;null!==h;)s.push(h),h=w(h);return s}(t,i).filter((t=>{if(s)return!1;const i=getComputedStyle(t);return s="fixed"===i.position,"visible"!==i.overflow}))}
|
|
18
|
-
/**
|
|
19
|
-
* @license
|
|
20
|
-
* Copyright 2021 Google LLC
|
|
21
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/(this._hostElement,t),this._scrollerController=new u(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach((t=>{t.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(t),this._hostElementRO.observe(t)})),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach((t=>this._childrenRO.observe(t))),this._scrollEventListeners.forEach((t=>t.addEventListener("scroll",this,this._scrollEventListenerOptions)))}disconnected(){this._scrollEventListeners.forEach((t=>t.removeEventListener("scroll",this,this._scrollEventListenerOptions))),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const t=this._hostElement.style;t.display=t.display||"block",t.position=t.position||"relative",t.contain=t.contain||"size layout",this._isScroller&&(t.overflow=t.overflow||"auto",t.minHeight=t.minHeight||"150px")}_getSizer(){const t=this._hostElement;if(!this._sizer){let i=t.querySelector("[virtualizer-sizer]");i||(i=document.createElement("div"),i.setAttribute("virtualizer-sizer",""),t.appendChild(i)),Object.assign(i.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),i.textContent=" ",i.setAttribute("virtualizer-sizer",""),this._sizer=i}return this._sizer}async updateLayoutConfig(t){await this._layoutInitialized;const i=t.type||d;if("function"==typeof i&&this._layout instanceof i){const i={...t};return delete i.type,this._layout.config=i,!0}return!1}async _initLayout(t){let i,s;if("function"==typeof t.type){s=t.type;const h={...t};delete h.type,i=h}else i=t;void 0===s&&(d=s=(await import("./flow-3e83b6f4.esm.js")).FlowLayout),this._layout=new s((t=>this._handleLayoutMessage(t)),i),this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(null!==this._benchmarkStart){const t=window.performance.now(),i=t-this._benchmarkStart,s=performance.getEntriesByName("uv-virtualizing","measure").filter((i=>i.startTime>=this._benchmarkStart&&i.startTime<t)).reduce(((t,i)=>t+i.duration),0);return this._benchmarkStart=null,{timeElapsed:i,virtualizationTime:s}}return null}_measureChildren(){const t={},i=this._children,s=this._measureChildOverride||this._measureChild;for(let h=0;h<i.length;h++){const e=i[h],n=this._first+h;(this._itemsChanged||this._toBeMeasured.has(e))&&(t[n]=s.call(this,e,this._items[n]))}this._childMeasurements=t,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(t){const{width:i,height:s}=t.getBoundingClientRect();return Object.assign({width:i,height:s},function(t){const i=window.getComputedStyle(t);return{marginTop:p(i.marginTop),marginRight:p(i.marginRight),marginBottom:p(i.marginBottom),marginLeft:p(i.marginLeft)}}(t))}async _schedule(t){this._scheduled.has(t)||(this._scheduled.add(t),await Promise.resolve(),this._scheduled.delete(t),t.call(this))}async _updateDOM(t){this._scrollSize=t.scrollSize,this._adjustRange(t.range),this._childrenPos=t.childPositions,this._scrollError=t.scrollError||null;const{_rangeChanged:i,_itemsChanged:s}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(i||s)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach((t=>this._childrenRO.observe(t))),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(t){console.warn("Error measuring performance data: ",t)}window.performance.mark("uv-start")}!1===this._scrollerController.correctingScrollError&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(t){if("scroll"===t.type)(t.currentTarget===window||this._clippingAncestors.includes(t.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",t)}_handleLayoutMessage(t){"stateChanged"===t.type?this._updateDOM(t):"visibilityChanged"===t.type?(this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._notifyVisibility()):"unpinned"===t.type&&this._hostElement.dispatchEvent(new r)}get _children(){const t=[];let i=this._hostElement.firstElementChild;for(;i;)i.hasAttribute("virtualizer-sizer")||t.push(i),i=i.nextElementSibling;return t}_updateView(){const t=this._hostElement,i=this._scrollerController?.element,s=this._layout;if(t&&i&&s){let h,e,n,l;const o=t.getBoundingClientRect();h=0,e=0,n=window.innerHeight,l=window.innerWidth;const r=this._clippingAncestors.map((t=>t.getBoundingClientRect()));r.unshift(o);for(const t of r)h=Math.max(h,t.top),e=Math.max(e,t.left),n=Math.min(n,t.bottom),l=Math.min(l,t.right);const u=i.getBoundingClientRect(),a={left:o.left-u.left,top:o.top-u.top},c={width:i.scrollWidth,height:i.scrollHeight},d=h-o.top+t.scrollTop,f=e-o.left+t.scrollLeft,p=Math.max(0,n-h),w=Math.max(0,l-e);s.viewportSize={width:w,height:p},s.viewportScroll={top:d,left:f},s.totalScrollSize=c,s.offsetWithinScroller=a}}_sizeHostElement(t){const i=82e5,s=t&&null!==t.width?Math.min(i,t.width):0,h=t&&null!==t.height?Math.min(i,t.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${s}px, ${h}px)`;else{const t=this._hostElement.style;t.minWidth=s?`${s}px`:"100%",t.minHeight=h?`${h}px`:"100%"}}_positionChildren(t){t&&t.forEach((({top:t,left:i,width:s,height:h,xOffset:e,yOffset:n},l)=>{const o=this._children[l-this._first];o&&(o.style.position="absolute",o.style.boxSizing="border-box",o.style.transform=`translate(${i}px, ${t}px)`,void 0!==s&&(o.style.width=s+"px"),void 0!==h&&(o.style.height=h+"px"),o.style.left=void 0===e?null:e+"px",o.style.top=void 0===n?null:n+"px")}))}async _adjustRange(t){const{_first:i,_last:s,_firstVisible:h,_lastVisible:e}=this;this._first=t.first,this._last=t.last,this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==i||this._last!==s,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==h||this._lastVisible!==e}_correctScrollError(){if(this._scrollError){const{scrollTop:t,scrollLeft:i}=this._scrollerController,{top:s,left:h}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:t-s,left:i-h})}}element(t){return t===1/0&&(t=this._items.length-1),void 0===this._items?.[t]?void 0:{scrollIntoView:(i={})=>this._scrollElementIntoView({...i,index:t})}}_scrollElementIntoView(t){if(t.index>=this._first&&t.index<=this._last)this._children[t.index-this._first].scrollIntoView(t);else if(t.index=Math.min(t.index,this._items.length-1),"smooth"===t.behavior){const i=this._layout.getScrollIntoViewCoordinates(t),{behavior:s}=t;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(i,{behavior:s}),(()=>this._layout.getScrollIntoViewCoordinates(t)),(()=>this._scrollIntoViewTarget=null)),this._scrollIntoViewTarget=t}else this._layout.pin=t}_checkScrollIntoViewTarget(t){const{index:i}=this._scrollIntoViewTarget||{};i&&t?.has(i)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new l({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new o({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise(((t,i)=>{this._layoutCompleteResolver=t,this._layoutCompleteRejecter=i}))),this._layoutCompletePromise}_rejectLayoutCompletePromise(t){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(t),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame((()=>requestAnimationFrame((()=>this._resolveLayoutCompletePromise())))))}_resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(t){if(this._layout?.measureChildren){for(const i of t)this._toBeMeasured.set(i.target,i.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}}function p(t){const i=t?parseFloat(t):NaN;return Number.isNaN(i)?0:i}function w(t){if(null!==t.assignedSlot)return t.assignedSlot;if(null!==t.parentElement)return t.parentElement;const i=t.parentNode;return i&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&i.host||null}const m=s(class extends e{constructor(t){if(super(t),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(t,s)=>((t,s)=>i`${s}: ${JSON.stringify(t,null,2)}`)(t,s+this._first),this._keyFunction=(t,i)=>(t=>t)(t,this._first),this._items=[],t.type!==h.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(t){t&&this._setFunctions(t);const i=[];if(this._first>=0&&this._last>=this._first)for(let t=this._first;t<=this._last;t++)i.push(this._items[t]);return n(i,this._keyFunction,this._renderItem)}update(i,[s]){this._setFunctions(s);const h=this._items!==s.items;return this._items=s.items||[],this._virtualizer?this._updateVirtualizerConfig(i,s):this._initialize(i,s),h?t:this.render()}async _updateVirtualizerConfig(t,i){if(!await this._virtualizer.updateLayoutConfig(i.layout||{})){const s=t.parentNode;this._makeVirtualizer(s,i)}this._virtualizer.items=this._items}_setFunctions(t){const{renderItem:i,keyFunction:s}=t;i&&(this._renderItem=(t,s)=>i(t,s+this._first)),s&&(this._keyFunction=(t,i)=>s(t,i+this._first))}_makeVirtualizer(t,i){this._virtualizer&&this._virtualizer.disconnected();const{layout:s,scroller:h,items:e}=i;this._virtualizer=new f({hostElement:t,layout:s,scroller:h}),this._virtualizer.items=e,this._virtualizer.connected()}_initialize(t,i){const s=t.parentNode;s&&1===s.nodeType&&(s.addEventListener("rangeChanged",(t=>{this._first=t.first,this._last=t.last,this.setValue(this.render())})),this._makeVirtualizer(s,i))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}});export{m as v};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["lit","lit/directive.js","lit/async-directive.js","lit/directives/repeat.js"],function(_export,_context){"use strict";var t,i,s,h,e,n,_templateObject,l,o,r,u,a,c,d,f,m;function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,F=function F(){};return{s:F,n:function(_n4){function n(){return _n4.apply(this,arguments);}n.toString=function(){return _n4.toString();};return n;}(function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]};}),e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _regeneratorRuntime(){"use strict";var r=_regenerator(),e=r.m(_regeneratorRuntime),t=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function n(r){var e="function"==typeof r&&r.constructor;return!!e&&(e===t||"GeneratorFunction"===(e.displayName||e.name));}var o={"throw":1,"return":2,"break":3,"continue":3};function a(r){var e,t;return function(n){e||(e={stop:function stop(){return t(n.a,2);},"catch":function _catch(){return n.v;},abrupt:function abrupt(r,e){return t(n.a,o[r],e);},delegateYield:function delegateYield(r,o,a){return e.resultName=o,t(n.d,_regeneratorValues(r),a);},finish:function finish(r){return t(n.f,r);}},t=function(_t7){function t(_x8,_x9,_x0){return _t7.apply(this,arguments);}t.toString=function(){return _t7.toString();};return t;}(function(r,t,o){n.p=e.prev,n.n=e.next;try{return r(t,o);}finally{e.next=n.n;}})),e.resultName&&(e[e.resultName]=n.v,e.resultName=void 0),e.sent=n.v,e.next=n.n;try{return r.call(this,e);}finally{n.p=e.prev,n.n=e.next;}};}return(_regeneratorRuntime=function _regeneratorRuntime(){return{wrap:function wrap(e,t,n,o){return r.w(a(e),t,n,o&&o.reverse());},isGeneratorFunction:n,mark:r.m,awrap:function awrap(r,e){return new _OverloadYield(r,e);},AsyncIterator:_regeneratorAsyncIterator,async:function async(r,e,t,o,u){return(n(e)?_regeneratorAsyncGen:_regeneratorAsync)(a(r),e,t,o,u);},keys:_regeneratorKeys,values:_regeneratorValues};})();}function _regeneratorValues(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function next(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e};}};}throw new TypeError(_typeof(e)+" is not iterable");}function _regeneratorKeys(e){var n=Object(e),r=[];for(var t in n)r.unshift(t);return function e(){for(;r.length;)if((t=r.pop())in n)return e.value=t,e.done=!1,e;return e.done=!0,e;};}function _regeneratorAsync(n,e,r,t,o){var a=_regeneratorAsyncGen(n,e,r,t,o);return a.next().then(function(n){return n.done?n.value:a.next();});}function _regeneratorAsyncGen(r,e,t,o,n){return new _regeneratorAsyncIterator(_regenerator().w(r,e,t,o),n||Promise);}function _regeneratorAsyncIterator(t,e){function n(r,o,i,f){try{var c=t[r](o),u=c.value;return u instanceof _OverloadYield?e.resolve(u.v).then(function(t){n("next",t,i,f);},function(t){n("throw",t,i,f);}):e.resolve(u).then(function(t){c.value=t,i(c);},function(t){return n("throw",t,i,f);});}catch(t){f(t);}}var r;this.next||(_regeneratorDefine2(_regeneratorAsyncIterator.prototype),_regeneratorDefine2(_regeneratorAsyncIterator.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this;})),_regeneratorDefine2(this,"_invoke",function(t,o,i){function f(){return new e(function(e,r){n(t,i,e,r);});}return r=r?r.then(f,f):f();},!0);}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a;}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0));}if(o||r>1)return a;throw y=!0,n;}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0);}else 1===c&&(t=i["return"])&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e;}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break;}catch(t){i=e,c=1,u=t;}finally{f=1;}}return{value:t,done:y};};}(r,o,i),!0),u;}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this;}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e;}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this;}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]";}),(_regenerator=function _regenerator(){return{w:i,m:f};})();}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e);});}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2));},_regeneratorDefine2(e,r,n,t);}function _OverloadYield(e,d){this.v=e,this.k=d;}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _wrapNativeSuper(t){var r="function"==typeof Map?new Map():void 0;return _wrapNativeSuper=function _wrapNativeSuper(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper);}function Wrapper(){return _construct(t,arguments,_getPrototypeOf(this).constructor);}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,t);},_wrapNativeSuper(t);}function _construct(t,e,r){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var p=new(t.bind.apply(t,o))();return r&&_setPrototypeOf(p,r.prototype),p;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _isNativeFunction(t){try{return-1!==Function.toString.call(t).indexOf("[native code]");}catch(n){return"function"==typeof t;}}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function p(t){var i=t?parseFloat(t):NaN;return Number.isNaN(i)?0:i;}function w(t){if(null!==t.assignedSlot)return t.assignedSlot;if(null!==t.parentElement)return t.parentElement;var i=t.parentNode;return i&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&i.host||null;}return{setters:[function(_lit){t=_lit.noChange;i=_lit.html;},function(_litDirectiveJs){s=_litDirectiveJs.directive;h=_litDirectiveJs.PartType;},function(_litAsyncDirectiveJs){e=_litAsyncDirectiveJs.AsyncDirective;},function(_litDirectivesRepeatJs){n=_litDirectivesRepeatJs.repeat;}],execute:function execute(){/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/l=/*#__PURE__*/function(_Event){function l(t){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,[l.eventName,{bubbles:!1}]),_this.first=t.first,_this.last=t.last;return _this;}_inherits(l,_Event);return _createClass(l);}(/*#__PURE__*/_wrapNativeSuper(Event));l.eventName="rangeChanged";o=/*#__PURE__*/function(_Event2){function o(t){var _this2;_classCallCheck(this,o);_this2=_callSuper(this,o,[o.eventName,{bubbles:!1}]),_this2.first=t.first,_this2.last=t.last;return _this2;}_inherits(o,_Event2);return _createClass(o);}(/*#__PURE__*/_wrapNativeSuper(Event));o.eventName="visibilityChanged";r=/*#__PURE__*/function(_Event3){function r(){_classCallCheck(this,r);return _callSuper(this,r,[r.eventName,{bubbles:!1}]);}_inherits(r,_Event3);return _createClass(r);}(/*#__PURE__*/_wrapNativeSuper(Event));r.eventName="unpinned";u=/*#__PURE__*/function(_ref){function u(t,i){var _this3;_classCallCheck(this,u);_this3=_callSuper(this,u,[i]),_this3._clients=new Set(),_this3._retarget=null,_this3._end=null,_this3.t=null,_this3.correctingScrollError=!1,_this3._checkForArrival=_this3._checkForArrival.bind(_assertThisInitialized(_this3)),_this3._updateManagedScrollTo=_this3._updateManagedScrollTo.bind(_assertThisInitialized(_this3)),_this3.scrollTo=_this3.scrollTo.bind(_assertThisInitialized(_this3)),_this3.scrollBy=_this3.scrollBy.bind(_assertThisInitialized(_this3));var s=_this3._node;_this3._originalScrollTo=s.scrollTo,_this3._originalScrollBy=s.scrollBy,_this3._originalScroll=s.scroll,_this3._attach(t);return _this3;}_inherits(u,_ref);return _createClass(u,[{key:"_destination",get:function get(){return this.t;}},{key:"scrolling",get:function get(){return null!==this._destination;}},{key:"scrollTo",value:function scrollTo(t,i){var s="number"==typeof t&&"number"==typeof i?{left:t,top:i}:t;this._scrollTo(s);}},{key:"scrollBy",value:function scrollBy(t,i){var s="number"==typeof t&&"number"==typeof i?{left:t,top:i}:t;void 0!==s.top&&(s.top+=this.scrollTop),void 0!==s.left&&(s.left+=this.scrollLeft),this._scrollTo(s);}},{key:"_nativeScrollTo",value:function _nativeScrollTo(t){this._originalScrollTo.bind(this._element||window)(t);}},{key:"_scrollTo",value:function _scrollTo(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;null!==this._end&&this._end(),"smooth"===t.behavior?(this._setDestination(t),this._retarget=i,this._end=s):this._resetScrollState(),this._nativeScrollTo(t);}},{key:"_setDestination",value:function _setDestination(t){var i=t.top,s=t.left;return i=void 0===i?void 0:Math.max(0,Math.min(i,this.maxScrollTop)),s=void 0===s?void 0:Math.max(0,Math.min(s,this.maxScrollLeft)),(null===this._destination||s!==this._destination.left||i!==this._destination.top)&&(this.t={top:i,left:s,behavior:"smooth"},!0);}},{key:"_resetScrollState",value:function _resetScrollState(){this.t=null,this._retarget=null,this._end=null;}},{key:"_updateManagedScrollTo",value:function _updateManagedScrollTo(t){this._destination&&this._setDestination(t)&&this._nativeScrollTo(this._destination);}},{key:"managedScrollTo",value:function managedScrollTo(t,i,s){return this._scrollTo(t,i,s),this._updateManagedScrollTo;}},{key:"correctScrollError",value:function correctScrollError(t){var _this4=this;this.correctingScrollError=!0,requestAnimationFrame(function(){return requestAnimationFrame(function(){return _this4.correctingScrollError=!1;});}),this._nativeScrollTo(t),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination);}},{key:"_checkForArrival",value:function _checkForArrival(){if(null!==this._destination){var _t=this.scrollTop,_i=this.scrollLeft;var _this$_destination=this._destination,_s=_this$_destination.top,_h=_this$_destination.left;_s=Math.min(_s||0,this.maxScrollTop),_h=Math.min(_h||0,this.maxScrollLeft);var _e=Math.abs(_s-_t),_n=Math.abs(_h-_i);_e<1&&_n<1&&(this._end&&this._end(),this._resetScrollState());}}},{key:"detach",value:function detach(t){return this._clients["delete"](t),0===this._clients.size&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null;}},{key:"_attach",value:function _attach(t){this._clients.add(t),1===this._clients.size&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival));}}]);}(/*#__PURE__*//**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright 2021 Google LLC
|
|
8
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/function(){function _class(t){_classCallCheck(this,_class);this._element=null;var i=t!==null&&t!==void 0?t:window;this._node=i,t&&(this._element=t);}return _createClass(_class,[{key:"element",get:function get(){return this._element||document.scrollingElement||document.documentElement;}},{key:"scrollTop",get:function get(){return this.element.scrollTop||window.scrollY;}},{key:"scrollLeft",get:function get(){return this.element.scrollLeft||window.scrollX;}},{key:"scrollHeight",get:function get(){return this.element.scrollHeight;}},{key:"scrollWidth",get:function get(){return this.element.scrollWidth;}},{key:"viewportHeight",get:function get(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight;}},{key:"viewportWidth",get:function get(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth;}},{key:"maxScrollTop",get:function get(){return this.scrollHeight-this.viewportHeight;}},{key:"maxScrollLeft",get:function get(){return this.scrollWidth-this.viewportWidth;}}]);}());/**
|
|
10
|
-
* @license
|
|
11
|
-
* Copyright 2021 Google LLC
|
|
12
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/a="undefined"!=typeof window?window.ResizeObserver:void 0;c=Symbol("virtualizerRef");f=/*#__PURE__*/function(){function f(t){_classCallCheck(this,f);if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map(),this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet(),this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!t)throw new Error("Virtualizer constructor requires a configuration object");if(!t.hostElement)throw new Error('Virtualizer configuration requires the "hostElement" property');this._init(t);}return _createClass(f,[{key:"items",set:function set(t){Array.isArray(t)&&t!==this._items&&(this._itemsChanged=!0,this._items=t,this._schedule(this._updateLayout));}},{key:"_init",value:function _init(t){this._isScroller=!!t.scroller,this._initHostElement(t);var i=t.layout||{};this._layoutInitialized=this._initLayout(i);}},{key:"_initObservers",value:function _initObservers(){var _this5=this;this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new a(function(){return _this5._hostElementSizeChanged();}),this._childrenRO=new a(this._childrenSizeChanged.bind(this));}},{key:"_initHostElement",value:function _initHostElement(t){var i=this._hostElement=t.hostElement;this._applyVirtualizerStyles(),i[c]=this;}},{key:"connected",value:function connected(){this._initObservers();var t=this._isScroller;this._clippingAncestors=function(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var s=!1;return function(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var s=[];var h=i?t:w(t);for(;null!==h;)s.push(h),h=w(h);return s;}(t,i).filter(function(t){if(s)return!1;var i=getComputedStyle(t);return s="fixed"===i.position,"visible"!==i.overflow;});}/**
|
|
14
|
-
* @license
|
|
15
|
-
* Copyright 2021 Google LLC
|
|
16
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/(this._hostElement,t),this._scrollerController=new u(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0;}},{key:"_observeAndListen",value:function _observeAndListen(){var _this6=this;this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(function(t){t.addEventListener("scroll",_this6,_this6._scrollEventListenerOptions),_this6._scrollEventListeners.push(t),_this6._hostElementRO.observe(t);}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(function(t){return _this6._childrenRO.observe(t);}),this._scrollEventListeners.forEach(function(t){return t.addEventListener("scroll",_this6,_this6._scrollEventListenerOptions);});}},{key:"disconnected",value:function disconnected(){var _this7=this,_this$_scrollerContro,_this$_mutationObserv,_this$_hostElementRO,_this$_childrenRO;this._scrollEventListeners.forEach(function(t){return t.removeEventListener("scroll",_this7,_this7._scrollEventListenerOptions);}),this._scrollEventListeners=[],this._clippingAncestors=[],(_this$_scrollerContro=this._scrollerController)!==null&&_this$_scrollerContro!==void 0&&_this$_scrollerContro.detach(this),this._scrollerController=null,(_this$_mutationObserv=this._mutationObserver)!==null&&_this$_mutationObserv!==void 0&&_this$_mutationObserv.disconnect(),this._mutationObserver=null,(_this$_hostElementRO=this._hostElementRO)!==null&&_this$_hostElementRO!==void 0&&_this$_hostElementRO.disconnect(),this._hostElementRO=null,(_this$_childrenRO=this._childrenRO)!==null&&_this$_childrenRO!==void 0&&_this$_childrenRO.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1;}},{key:"_applyVirtualizerStyles",value:function _applyVirtualizerStyles(){var t=this._hostElement.style;t.display=t.display||"block",t.position=t.position||"relative",t.contain=t.contain||"size layout",this._isScroller&&(t.overflow=t.overflow||"auto",t.minHeight=t.minHeight||"150px");}},{key:"_getSizer",value:function _getSizer(){var t=this._hostElement;if(!this._sizer){var _i2=t.querySelector("[virtualizer-sizer]");_i2||(_i2=document.createElement("div"),_i2.setAttribute("virtualizer-sizer",""),t.appendChild(_i2)),Object.assign(_i2.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),_i2.textContent=" ",_i2.setAttribute("virtualizer-sizer",""),this._sizer=_i2;}return this._sizer;}},{key:"updateLayoutConfig",value:function(){var _updateLayoutConfig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(t){var i,_i3;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this._layoutInitialized;case 2:i=t.type||d;if(!("function"==typeof i&&this._layout instanceof i)){_context2.next=6;break;}_i3=_objectSpread({},t);return _context2.abrupt("return",(delete _i3.type,this._layout.config=_i3,!0));case 6:return _context2.abrupt("return",!1);case 7:case"end":return _context2.stop();}},_callee,this);}));function updateLayoutConfig(_x){return _updateLayoutConfig.apply(this,arguments);}return updateLayoutConfig;}()},{key:"_initLayout",value:function(){var _initLayout2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(t){var _this8=this;var i,s,_h2;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if("function"==typeof t.type){s=t.type;_h2=_objectSpread({},t);delete _h2.type,i=_h2;}else i=t;_context3.t0=void 0===s;if(!_context3.t0){_context3.next=6;break;}_context3.next=5;return _context["import"]("./flow-ca47f938.cjs.js");case 5:d=s=_context3.sent.FlowLayout;case 6:this._layout=new s(function(t){return _this8._handleLayoutMessage(t);},i);this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout));this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0);this._schedule(this._updateLayout);case 10:case"end":return _context3.stop();}},_callee2,this);}));function _initLayout(_x2){return _initLayout2.apply(this,arguments);}return _initLayout;}()},{key:"startBenchmarking",value:function startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now());}},{key:"stopBenchmarking",value:function stopBenchmarking(){var _this9=this;if(null!==this._benchmarkStart){var _t2=window.performance.now(),i=_t2-this._benchmarkStart,s=performance.getEntriesByName("uv-virtualizing","measure").filter(function(i){return i.startTime>=_this9._benchmarkStart&&i.startTime<_t2;}).reduce(function(t,i){return t+i.duration;},0);return this._benchmarkStart=null,{timeElapsed:i,virtualizationTime:s};}return null;}},{key:"_measureChildren",value:function _measureChildren(){var t={},i=this._children,s=this._measureChildOverride||this._measureChild;for(var _h3=0;_h3<i.length;_h3++){var _e2=i[_h3],_n2=this._first+_h3;(this._itemsChanged||this._toBeMeasured.has(_e2))&&(t[_n2]=s.call(this,_e2,this._items[_n2]));}this._childMeasurements=t,this._schedule(this._updateLayout),this._toBeMeasured.clear();}},{key:"_measureChild",value:function _measureChild(t){var _t$getBoundingClientR=t.getBoundingClientRect(),i=_t$getBoundingClientR.width,s=_t$getBoundingClientR.height;return Object.assign({width:i,height:s},function(t){var i=window.getComputedStyle(t);return{marginTop:p(i.marginTop),marginRight:p(i.marginRight),marginBottom:p(i.marginBottom),marginLeft:p(i.marginLeft)};}(t));}},{key:"_schedule",value:function(){var _schedule2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(t){return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.t0=this._scheduled.has(t);if(_context4.t0){_context4.next=7;break;}this._scheduled.add(t);_context4.next=5;return Promise.resolve();case 5:this._scheduled["delete"](t);t.call(this);case 7:case"end":return _context4.stop();}},_callee3,this);}));function _schedule(_x3){return _schedule2.apply(this,arguments);}return _schedule;}()},{key:"_updateDOM",value:function(){var _updateDOM2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(t){var i,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:this._scrollSize=t.scrollSize,this._adjustRange(t.range),this._childrenPos=t.childPositions,this._scrollError=t.scrollError||null;i=this._rangeChanged,s=this._itemsChanged;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(i||s)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate();case 3:case"end":return _context5.stop();}},_callee4,this);}));function _updateDOM(_x4){return _updateDOM2.apply(this,arguments);}return _updateDOM;}()},{key:"_finishDOMUpdate",value:function _finishDOMUpdate(){var _this0=this;this._connected&&(this._children.forEach(function(t){return _this0._childrenRO.observe(t);}),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"));}},{key:"_updateLayout",value:function _updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"));}},{key:"_handleScrollEvent",value:function _handleScrollEvent(){var _this$_layout;if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end");}catch(t){console.warn("Error measuring performance data: ",t);}window.performance.mark("uv-start");}!1===this._scrollerController.correctingScrollError&&(_this$_layout=this._layout)!==null&&_this$_layout!==void 0&&_this$_layout.unpin(),this._schedule(this._updateLayout);}},{key:"handleEvent",value:function handleEvent(t){if("scroll"===t.type)(t.currentTarget===window||this._clippingAncestors.includes(t.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",t);}},{key:"_handleLayoutMessage",value:function _handleLayoutMessage(t){"stateChanged"===t.type?this._updateDOM(t):"visibilityChanged"===t.type?(this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._notifyVisibility()):"unpinned"===t.type&&this._hostElement.dispatchEvent(new r());}},{key:"_children",get:function get(){var t=[];var i=this._hostElement.firstElementChild;for(;i;)i.hasAttribute("virtualizer-sizer")||t.push(i),i=i.nextElementSibling;return t;}},{key:"_updateView",value:function _updateView(){var _this$_scrollerContro2;var t=this._hostElement,i=(_this$_scrollerContro2=this._scrollerController)===null||_this$_scrollerContro2===void 0?void 0:_this$_scrollerContro2.element,s=this._layout;if(t&&i&&s){var _h4,_e3,_n3,_l;var _o=t.getBoundingClientRect();_h4=0,_e3=0,_n3=window.innerHeight,_l=window.innerWidth;var _r=this._clippingAncestors.map(function(t){return t.getBoundingClientRect();});_r.unshift(_o);var _iterator=_createForOfIteratorHelper(_r),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _t3=_step.value;_h4=Math.max(_h4,_t3.top),_e3=Math.max(_e3,_t3.left),_n3=Math.min(_n3,_t3.bottom),_l=Math.min(_l,_t3.right);}}catch(err){_iterator.e(err);}finally{_iterator.f();}var _u=i.getBoundingClientRect(),_a={left:_o.left-_u.left,top:_o.top-_u.top},_c={width:i.scrollWidth,height:i.scrollHeight},_d=_h4-_o.top+t.scrollTop,_f=_e3-_o.left+t.scrollLeft,_p=Math.max(0,_n3-_h4),_w=Math.max(0,_l-_e3);s.viewportSize={width:_w,height:_p},s.viewportScroll={top:_d,left:_f},s.totalScrollSize=_c,s.offsetWithinScroller=_a;}}},{key:"_sizeHostElement",value:function _sizeHostElement(t){var i=82e5,s=t&&null!==t.width?Math.min(i,t.width):0,h=t&&null!==t.height?Math.min(i,t.height):0;if(this._isScroller)this._getSizer().style.transform="translate(".concat(s,"px, ").concat(h,"px)");else{var _t4=this._hostElement.style;_t4.minWidth=s?"".concat(s,"px"):"100%",_t4.minHeight=h?"".concat(h,"px"):"100%";}}},{key:"_positionChildren",value:function _positionChildren(t){var _this1=this;t&&t.forEach(function(_ref2,l){var t=_ref2.top,i=_ref2.left,s=_ref2.width,h=_ref2.height,e=_ref2.xOffset,n=_ref2.yOffset;var o=_this1._children[l-_this1._first];o&&(o.style.position="absolute",o.style.boxSizing="border-box",o.style.transform="translate(".concat(i,"px, ").concat(t,"px)"),void 0!==s&&(o.style.width=s+"px"),void 0!==h&&(o.style.height=h+"px"),o.style.left=void 0===e?null:e+"px",o.style.top=void 0===n?null:n+"px");});}},{key:"_adjustRange",value:function(){var _adjustRange2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(t){var i,s,h,e;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:i=this._first,s=this._last,h=this._firstVisible,e=this._lastVisible;this._first=t.first,this._last=t.last,this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==i||this._last!==s,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==h||this._lastVisible!==e;case 2:case"end":return _context6.stop();}},_callee5,this);}));function _adjustRange(_x5){return _adjustRange2.apply(this,arguments);}return _adjustRange;}()},{key:"_correctScrollError",value:function _correctScrollError(){if(this._scrollError){var _this$_scrollerContro3=this._scrollerController,_t5=_this$_scrollerContro3.scrollTop,i=_this$_scrollerContro3.scrollLeft,_this$_scrollError=this._scrollError,s=_this$_scrollError.top,_h5=_this$_scrollError.left;this._scrollError=null,this._scrollerController.correctScrollError({top:_t5-s,left:i-_h5});}}},{key:"element",value:function element(t){var _this$_items,_this10=this;return t===1/0&&(t=this._items.length-1),void 0===((_this$_items=this._items)===null||_this$_items===void 0?void 0:_this$_items[t])?void 0:{scrollIntoView:function scrollIntoView(){var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return _this10._scrollElementIntoView(_objectSpread(_objectSpread({},i),{},{index:t}));}};}},{key:"_scrollElementIntoView",value:function _scrollElementIntoView(t){var _this11=this;if(t.index>=this._first&&t.index<=this._last)this._children[t.index-this._first].scrollIntoView(t);else if(t.index=Math.min(t.index,this._items.length-1),"smooth"===t.behavior){var i=this._layout.getScrollIntoViewCoordinates(t),s=t.behavior;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(i,{behavior:s}),function(){return _this11._layout.getScrollIntoViewCoordinates(t);},function(){return _this11._scrollIntoViewTarget=null;}),this._scrollIntoViewTarget=t;}else this._layout.pin=t;}},{key:"_checkScrollIntoViewTarget",value:function _checkScrollIntoViewTarget(t){var _ref3=this._scrollIntoViewTarget||{},i=_ref3.index;i&&(t===null||t===void 0?void 0:t.has(i))&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget));}},{key:"_notifyRange",value:function _notifyRange(){this._hostElement.dispatchEvent(new l({first:this._first,last:this._last}));}},{key:"_notifyVisibility",value:function _notifyVisibility(){this._hostElement.dispatchEvent(new o({first:this._firstVisible,last:this._lastVisible}));}},{key:"layoutComplete",get:function get(){var _this12=this;return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise(function(t,i){_this12._layoutCompleteResolver=t,_this12._layoutCompleteRejecter=i;})),this._layoutCompletePromise;}},{key:"_rejectLayoutCompletePromise",value:function _rejectLayoutCompletePromise(t){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(t),this._resetLayoutCompleteState();}},{key:"_scheduleLayoutComplete",value:function _scheduleLayoutComplete(){var _this13=this;this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame(function(){return requestAnimationFrame(function(){return _this13._resolveLayoutCompletePromise();});}));}},{key:"_resolveLayoutCompletePromise",value:function _resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState();}},{key:"_resetLayoutCompleteState",value:function _resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null;}},{key:"_hostElementSizeChanged",value:function _hostElementSizeChanged(){this._schedule(this._updateLayout);}},{key:"_childLoaded",value:function _childLoaded(){}},{key:"_childrenSizeChanged",value:function _childrenSizeChanged(t){var _this$_layout2;if((_this$_layout2=this._layout)!==null&&_this$_layout2!==void 0&&_this$_layout2.measureChildren){var _iterator2=_createForOfIteratorHelper(t),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var i=_step2.value;this._toBeMeasured.set(i.target,i.contentRect);}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}this._measureChildren();}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1;}}]);}();_export("v",m=s(/*#__PURE__*/function(_e4){function _class2(t){var _this14;_classCallCheck(this,_class2);if(_this14=_callSuper(this,_class2,[t]),_this14._virtualizer=null,_this14._first=0,_this14._last=-1,_this14._renderItem=function(t,s){return function(t,s){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["",": ",""])),s,JSON.stringify(t,null,2));}(t,s+_this14._first);},_this14._keyFunction=function(t,i){return function(t){return t;}(t,_this14._first);},_this14._items=[],t.type!==h.CHILD)throw new Error("The virtualize directive can only be used in child expressions");return _this14;}_inherits(_class2,_e4);return _createClass(_class2,[{key:"render",value:function render(t){t&&this._setFunctions(t);var i=[];if(this._first>=0&&this._last>=this._first)for(var _t6=this._first;_t6<=this._last;_t6++)i.push(this._items[_t6]);return n(i,this._keyFunction,this._renderItem);}},{key:"update",value:function update(i,_ref4){var _ref5=_slicedToArray(_ref4,1),s=_ref5[0];this._setFunctions(s);var h=this._items!==s.items;return this._items=s.items||[],this._virtualizer?this._updateVirtualizerConfig(i,s):this._initialize(i,s),h?t:this.render();}},{key:"_updateVirtualizerConfig",value:function(){var _updateVirtualizerConfig2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(t,i){var s;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return this._virtualizer.updateLayoutConfig(i.layout||{});case 2:if(_context7.sent){_context7.next=5;break;}s=t.parentNode;this._makeVirtualizer(s,i);case 5:this._virtualizer.items=this._items;case 6:case"end":return _context7.stop();}},_callee6,this);}));function _updateVirtualizerConfig(_x6,_x7){return _updateVirtualizerConfig2.apply(this,arguments);}return _updateVirtualizerConfig;}()},{key:"_setFunctions",value:function _setFunctions(t){var _this15=this;var i=t.renderItem,s=t.keyFunction;i&&(this._renderItem=function(t,s){return i(t,s+_this15._first);}),s&&(this._keyFunction=function(t,i){return s(t,i+_this15._first);});}},{key:"_makeVirtualizer",value:function _makeVirtualizer(t,i){this._virtualizer&&this._virtualizer.disconnected();var s=i.layout,h=i.scroller,e=i.items;this._virtualizer=new f({hostElement:t,layout:s,scroller:h}),this._virtualizer.items=e,this._virtualizer.connected();}},{key:"_initialize",value:function _initialize(t,i){var _this16=this;var s=t.parentNode;s&&1===s.nodeType&&(s.addEventListener("rangeChanged",function(t){_this16._first=t.first,_this16._last=t.last,_this16.setValue(_this16.render());}),this._makeVirtualizer(s,i));}},{key:"disconnected",value:function disconnected(){var _this$_virtualizer;(_this$_virtualizer=this._virtualizer)===null||_this$_virtualizer===void 0?void 0:_this$_virtualizer.disconnected();}},{key:"reconnected",value:function reconnected(){var _this$_virtualizer2;(_this$_virtualizer2=this._virtualizer)===null||_this$_virtualizer2===void 0?void 0:_this$_virtualizer2.connected();}}]);}(e)));}};});
|
|
18
|
-
//# sourceMappingURL=virtualize-eb33a9a0.cjs.js.map
|