@aquera/nile-elements 0.1.69 → 0.1.70-beta-1.2
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/demo/index.html +263 -9
- 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-90b199c4.esm.js +569 -0
- package/dist/{fixture-8edec91c.esm.js → fixture-cf7bfcf5.esm.js} +1 -1
- package/dist/fixture-dbd66009.cjs.js +395 -0
- package/dist/fixture-dbd66009.cjs.js.map +1 -0
- package/dist/index.js +2 -1
- package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
- package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.test.esm.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js +1 -1
- package/dist/nile-button/nile-button.test.esm.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
- package/dist/nile-card/nile-card.test.cjs.js +1 -1
- package/dist/nile-card/nile-card.test.esm.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
- package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.test.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.test.esm.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.test.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.test.esm.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +1 -1
- package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
- package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
- package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
- package/dist/nile-hero/nile-hero.test.esm.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
- package/dist/nile-icon/nile-icon.test.esm.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js +1 -1
- package/dist/nile-input/nile-input.test.esm.js +1 -1
- package/dist/nile-link/nile-link.test.cjs.js +1 -1
- package/dist/nile-link/nile-link.test.esm.js +1 -1
- package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
- package/dist/nile-loader/nile-loader.test.esm.js +1 -1
- package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.test.esm.js +1 -1
- package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.test.esm.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
- package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.test.esm.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
- package/dist/nile-select/nile-select.test.cjs.js +1 -1
- package/dist/nile-select/nile-select.test.esm.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
- package/dist/nile-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 +2 -1
- package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +1 -1
- package/dist/src/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/nile-badge/__snapshots__/nile-badge.test.snap.js +17 -0
- package/dist/src/nile-calendar/__snapshots__/nile-calendar.test.snap.js +310 -0
- package/dist/src/nile-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-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/index.d.ts +5 -0
- package/dist/src/nile-grid/index.js +6 -0
- package/dist/src/nile-grid/index.js.map +1 -0
- package/dist/src/nile-grid/nile-grid.css.d.ts +1 -0
- package/dist/src/nile-grid/nile-grid.css.js +120 -0
- package/dist/src/nile-grid/nile-grid.css.js.map +1 -0
- package/dist/src/nile-grid/nile-grid.d.ts +39 -0
- package/dist/src/nile-grid/nile-grid.js +182 -0
- package/dist/src/nile-grid/nile-grid.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-icon/icons/svg/ng-action.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-action.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-action.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-activity.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-activity.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-activity.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-align-center.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-align-center.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-align-center.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-bold-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bold-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-bold-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-building-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-building-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-building-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-building-05.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-building-05.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-building-05.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-calendar.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-circle.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-check.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-check.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-copy-03.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-copy-03.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-copy-03.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-download-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-download-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-download-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-dropdown.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dropdown.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-dropdown.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-05.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-05.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-edit-05.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-expand-06.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-expand-06.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-expand-06.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-eye-off.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-eye-off.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-eye-off.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-eye.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-eye.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-eye.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-file-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-file-06.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-06.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-06.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-grid-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-grid-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-grid-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-help-circle.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-help-circle.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-help-circle.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-image-03.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-image-03.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-image-03.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-info-circle.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-info-circle.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-info-circle.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-italic-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-italic-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-italic-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-layers-three-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-layers-three-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-layers-three-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-list.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-list.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-list.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-04.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-04.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-mail-04.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-menu-05.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-menu-05.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-menu-05.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-minus.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-minus.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-minus.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-plus.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-plus.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-plus.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-search-lg.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-search-lg.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-search-lg.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-send-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-send-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-send-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-settings-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-settings-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-settings-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-share-04.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-share-04.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-share-04.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-share-06.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-share-06.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-share-06.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-stars-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-stars-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-stars-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-03.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-03.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trash-03.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-underline-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-underline-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-underline-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-user-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-users-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-users-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-users-01.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-x-circle.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-circle.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-circle.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-x-close.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-close.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-close.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ng-x-square.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-square.js +5 -0
- package/dist/src/nile-icon/icons/svg/ng-x-square.js.map +1 -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-table-body/nile-table-body.d.ts +1 -0
- package/dist/src/nile-table-body/nile-table-body.js +4 -0
- 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-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/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-table-body/nile-table-body.ts +2 -0
- package/vscode-html-custom-data.json +5 -1
@@ -1,2 +1,2 @@
|
|
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(["../fixture-3bfb4490.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js"],function(_export,_context){"use strict";var t,e,l,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,_templateObject17,_templateObject18,_templateObject19,_templateObject20,_templateObject21,_templateObject22,_templateObject23;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}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);});};}return{setters:[function(_fixture003CjsJs){t=_fixture003CjsJs.f;e=_fixture003CjsJs.a;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){}],execute:function execute(){describe("<nile-virtual-select>",function(){describe("maxOptionsVisible functionality",function(){it('should show "+n More" when more options are selected than maxOptionsVisible',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _i$shadowRoot,_o$textContent;var i,o;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"2\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context2.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"},{value:"option-4",label:"Option 4"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3"];_context2.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot=i.shadowRoot)===null||_i$shadowRoot===void 0?void 0:_i$shadowRoot.querySelector(".select__tags-count");e(o).to.exist,e(o===null||o===void 0||(_o$textContent=o.textContent)===null||_o$textContent===void 0?void 0:_o$textContent.trim()).to.equal("+1 More");case 10:case"end":return _context2.stop();}},_callee);}))),it('should not show "+n More" when selected options are within maxOptionsVisible limit',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _i$shadowRoot2;var i,o;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"3\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context3.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2"];_context3.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot2=i.shadowRoot)===null||_i$shadowRoot2===void 0?void 0:_i$shadowRoot2.querySelector(".select__tags-count");e(o).to.not.exist;case 10:case"end":return _context3.stop();}},_callee2);}))),it("should show all tags when maxOptionsVisible is 0",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _i$shadowRoot3,_i$shadowRoot4;var i,o,a;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(l(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"0\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context4.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"},{value:"option-4",label:"Option 4"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3","option-4"];_context4.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot3=i.shadowRoot)===null||_i$shadowRoot3===void 0?void 0:_i$shadowRoot3.querySelector(".select__tags-count");e(o).to.not.exist;a=(_i$shadowRoot4=i.shadowRoot)===null||_i$shadowRoot4===void 0?void 0:_i$shadowRoot4.querySelectorAll("nile-tag");e(a===null||a===void 0?void 0:a.length).to.equal(4);case 12:case"end":return _context4.stop();}},_callee3);})));}),describe("option width functionality",function(){it("should render options with full width",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _i$shadowRoot5,_i$shadowRoot6,_i$shadowRoot7;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(l(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context5.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context5.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot5=i.shadowRoot)===null||_i$shadowRoot5===void 0?void 0:_i$shadowRoot5.querySelector(".virtualized");e(o).to.exist;a=(_i$shadowRoot6=i.shadowRoot)===null||_i$shadowRoot6===void 0?void 0:_i$shadowRoot6.querySelector(".select__options");e(a).to.exist;s=(_i$shadowRoot7=i.shadowRoot)===null||_i$shadowRoot7===void 0?void 0:_i$shadowRoot7.querySelector(".select__listbox");e(s).to.exist,e(s===null||s===void 0?void 0:s.querySelector(".select__options")).to.exist;case 14:case"end":return _context5.stop();}},_callee4);}))),it("should render options with proper CSS classes for width",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _i$shadowRoot8,_i$shadowRoot9,_i$shadowRoot10;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(l(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context6.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context6.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot8=i.shadowRoot)===null||_i$shadowRoot8===void 0?void 0:_i$shadowRoot8.querySelector(".virtualized");e(o).to.exist;a=(_i$shadowRoot9=i.shadowRoot)===null||_i$shadowRoot9===void 0?void 0:_i$shadowRoot9.querySelector(".select__options");e(a).to.exist;s=(_i$shadowRoot10=i.shadowRoot)===null||_i$shadowRoot10===void 0?void 0:_i$shadowRoot10.querySelector("lit-virtualizer");e(s).to.exist;case 14:case"end":return _context6.stop();}},_callee5);}))),it("should render virtualized options with full width structure",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _i$shadowRoot11;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(l(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context7.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context7.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot11=i.shadowRoot)===null||_i$shadowRoot11===void 0?void 0:_i$shadowRoot11.querySelector(".select__listbox");e(o).to.exist;a=o===null||o===void 0?void 0:o.querySelector(".select__options");e(a).to.exist;s=a===null||a===void 0?void 0:a.querySelector(".virtualized");e(s).to.exist,e(o===null||o===void 0?void 0:o.contains(a||null)).to.be["true"],e(a===null||a===void 0?void 0:a.contains(s||null)).to.be["true"];case 14:case"end":return _context7.stop();}},_callee6);})));}),describe("selected options highlighting",function(){it("should highlight selected options with red border in single select mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _i$shadowRoot12;var i,o;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return t(l(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context8.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value="option-2";i.open=!0;_context8.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot12=i.shadowRoot)===null||_i$shadowRoot12===void 0?void 0:_i$shadowRoot12.querySelector("nile-option[selected]");e(o).to.exist,e(o===null||o===void 0?void 0:o.getAttribute("value")).to.equal("option-2");case 11:case"end":return _context8.stop();}},_callee7);}))),it("should highlight selected options with red border in multiple select mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _i$shadowRoot13;var i,o,a;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return t(l(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context9.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-3"];i.open=!0;_context9.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot13=i.shadowRoot)===null||_i$shadowRoot13===void 0?void 0:_i$shadowRoot13.querySelectorAll("nile-option[selected]");e(o===null||o===void 0?void 0:o.length).to.equal(2);a=Array.from(o||[]).map(function(t){return t.getAttribute("value");});e(a).to.include("option-1"),e(a).to.include("option-3");case 13:case"end":return _context9.stop();}},_callee8);}))),it("should not highlight unselected options",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var _i$shadowRoot14;var i,o;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return t(l(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context10.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value="option-2";i.open=!0;_context10.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot14=i.shadowRoot)===null||_i$shadowRoot14===void 0?void 0:_i$shadowRoot14.querySelector('nile-option[value="option-1"]');e(o).to.exist,e(o===null||o===void 0?void 0:o.hasAttribute("selected")).to.be["false"];case 11:case"end":return _context10.stop();}},_callee9);}))),it("should show tags for pre-selected values when data is set after value",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var _i$shadowRoot15,_i$shadowRoot16;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return t(l(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context11.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-3"];_context11.next=7;return i.updateComplete;case 7:o=(_i$shadowRoot15=i.shadowRoot)===null||_i$shadowRoot15===void 0?void 0:_i$shadowRoot15.querySelectorAll("nile-tag");e(o===null||o===void 0?void 0:o.length).to.equal(0);i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];_context11.next=12;return i.updateComplete;case 12:a=(_i$shadowRoot16=i.shadowRoot)===null||_i$shadowRoot16===void 0?void 0:_i$shadowRoot16.querySelectorAll("nile-tag");e(a===null||a===void 0?void 0:a.length).to.equal(2);s=Array.from(a||[]).map(function(t){var _t$textContent;return(_t$textContent=t.textContent)===null||_t$textContent===void 0?void 0:_t$textContent.trim();});e(s).to.include("Option 1"),e(s).to.include("Option 3");case 16:case"end":return _context11.stop();}},_callee10);}))),it("should show tags immediately without opening dropdown",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var _i$shadowRoot17;var i,o,a;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return t(l(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context12.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.value=["option-1","option-3"];_context12.next=8;return i.updateComplete;case 8:i.open=!1;_context12.next=11;return i.updateComplete;case 11:o=(_i$shadowRoot17=i.shadowRoot)===null||_i$shadowRoot17===void 0?void 0:_i$shadowRoot17.querySelectorAll("nile-tag");e(o===null||o===void 0?void 0:o.length).to.equal(2);a=Array.from(o||[]).map(function(t){var _t$textContent2;return(_t$textContent2=t.textContent)===null||_t$textContent2===void 0?void 0:_t$textContent2.trim();});e(a).to.include("Option 1"),e(a).to.include("Option 3");case 15:case"end":return _context12.stop();}},_callee11);}))),it("should show checkbox as checked for selected options in multiple mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var _i$shadowRoot18,_i$shadowRoot19,_a$shadowRoot;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return t(l(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context13.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.value=["option-1","option-3"];i.open=!0;_context13.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot18=i.shadowRoot)===null||_i$shadowRoot18===void 0?void 0:_i$shadowRoot18.querySelectorAll("nile-option[selected]");e(o===null||o===void 0?void 0:o.length).to.equal(2),o===null||o===void 0?void 0:o.forEach(function(t){var _t$shadowRoot;var l=(_t$shadowRoot=t.shadowRoot)===null||_t$shadowRoot===void 0?void 0:_t$shadowRoot.querySelector("nile-checkbox");e(l).to.exist,e(l===null||l===void 0?void 0:l.checked).to.be["true"];});a=(_i$shadowRoot19=i.shadowRoot)===null||_i$shadowRoot19===void 0?void 0:_i$shadowRoot19.querySelector('nile-option[value="option-2"]');e(a).to.exist;s=a===null||a===void 0||(_a$shadowRoot=a.shadowRoot)===null||_a$shadowRoot===void 0?void 0:_a$shadowRoot.querySelector("nile-checkbox");e(s).to.exist,e(s===null||s===void 0?void 0:s.checked).to.be["false"];case 15:case"end":return _context13.stop();}},_callee12);})));}),describe("no results message functionality",function(){it("should show no results message when data is empty and not loading",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var _i$shadowRoot20,_o$textContent2;var i,o;return _regeneratorRuntime().wrap(function _callee13$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_context14.next=2;return t(l(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context14.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context14.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot20=i.shadowRoot)===null||_i$shadowRoot20===void 0?void 0:_i$shadowRoot20.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent2=o.textContent)===null||_o$textContent2===void 0?void 0:_o$textContent2.trim()).to.equal("No results found");case 10:case"end":return _context14.stop();}},_callee13);}))),it("should show custom no results message when provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var _i$shadowRoot21,_o$textContent3;var i,o;return _regeneratorRuntime().wrap(function _callee14$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:_context15.next=2;return t(l(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <nile-virtual-select no-results-message=\"No data available\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context15.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context15.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot21=i.shadowRoot)===null||_i$shadowRoot21===void 0?void 0:_i$shadowRoot21.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent3=o.textContent)===null||_o$textContent3===void 0?void 0:_o$textContent3.trim()).to.equal("No data available");case 10:case"end":return _context15.stop();}},_callee14);}))),it("should not show no results message when loading",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15(){var _i$shadowRoot22;var i,o;return _regeneratorRuntime().wrap(function _callee15$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:_context16.next=2;return t(l(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context16.sent;i.data=[];i.optionsLoading=!0;i.open=!0;_context16.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot22=i.shadowRoot)===null||_i$shadowRoot22===void 0?void 0:_i$shadowRoot22.querySelector(".select__no-results");e(o).to.not.exist;case 10:case"end":return _context16.stop();}},_callee15);}))),it("should show no results message when search returns no results",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(){var _i$shadowRoot23,_o$textContent4;var i,o;return _regeneratorRuntime().wrap(function _callee16$(_context17){while(1)switch(_context17.prev=_context17.next){case 0:_context17.next=2;return t(l(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n <nile-virtual-select search-enabled>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context17.sent;i.data=[{value:"option-1",label:"Apple"},{value:"option-2",label:"Banana"},{value:"option-3",label:"Cherry"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context17.next=8;return i.updateComplete;case 8:i.searchValue="Orange";i.filterVirtualOptions("Orange");_context17.next=12;return i.updateComplete;case 12:o=(_i$shadowRoot23=i.shadowRoot)===null||_i$shadowRoot23===void 0?void 0:_i$shadowRoot23.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent4=o.textContent)===null||_o$textContent4===void 0?void 0:_o$textContent4.trim()).to.equal("No results found");case 14:case"end":return _context17.stop();}},_callee16);}))),it("should hide no results message when data becomes available",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17(){var _i$shadowRoot24,_i$shadowRoot25;var i,o;return _regeneratorRuntime().wrap(function _callee17$(_context18){while(1)switch(_context18.prev=_context18.next){case 0:_context18.next=2;return t(l(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context18.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context18.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot24=i.shadowRoot)===null||_i$shadowRoot24===void 0?void 0:_i$shadowRoot24.querySelector(".select__no-results");e(o).to.exist;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"}];_context18.next=13;return i.updateComplete;case 13:o=(_i$shadowRoot25=i.shadowRoot)===null||_i$shadowRoot25===void 0?void 0:_i$shadowRoot25.querySelector(".select__no-results");e(o).to.not.exist;case 15:case"end":return _context18.stop();}},_callee17);})));}),describe("scroll position reset functionality",function(){it("should reset scroll position to top when dropdown opens",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18(){var _i$shadowRoot26;var i,o;return _regeneratorRuntime().wrap(function _callee18$(_context19){while(1)switch(_context19.prev=_context19.next){case 0:_context19.next=2;return t(l(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context19.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context19.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot26=i.shadowRoot)===null||_i$shadowRoot26===void 0?void 0:_i$shadowRoot26.querySelector(".virtualized");e(o).to.exist;o.scrollTop=1e3;e(o.scrollTop).to.equal(1e3);i.open=!1;_context19.next=15;return i.updateComplete;case 15:i.open=!0;_context19.next=18;return i.updateComplete;case 18:e(o.scrollTop).to.equal(0);case 19:case"end":return _context19.stop();}},_callee18);}))),it("should reset scroll position when search value changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee19(){var _i$shadowRoot27;var i,o;return _regeneratorRuntime().wrap(function _callee19$(_context20){while(1)switch(_context20.prev=_context20.next){case 0:_context20.next=2;return t(l(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n <nile-virtual-select search-enabled>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context20.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context20.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot27=i.shadowRoot)===null||_i$shadowRoot27===void 0?void 0:_i$shadowRoot27.querySelector(".virtualized");e(o).to.exist;o.scrollTop=1e3;e(o.scrollTop).to.equal(1e3);i.searchValue="test";i.filterVirtualOptions("test");_context20.next=16;return i.updateComplete;case 16:e(o.scrollTop).to.equal(0);case 17:case"end":return _context20.stop();}},_callee19);}))),it("should reset scroll position when show selected state changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20(){var _i$shadowRoot28,_i$shadowRoot29;var i,o,a;return _regeneratorRuntime().wrap(function _callee20$(_context21){while(1)switch(_context21.prev=_context21.next){case 0:_context21.next=2;return t(l(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context21.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3"];i.open=!0;_context21.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot28=i.shadowRoot)===null||_i$shadowRoot28===void 0?void 0:_i$shadowRoot28.querySelector(".virtualized");e(o).to.exist,o.scrollTop=1e3,e(o.scrollTop).to.equal(1e3);a=(_i$shadowRoot29=i.shadowRoot)===null||_i$shadowRoot29===void 0?void 0:_i$shadowRoot29.querySelector("nile-checkbox");a!==null&&a!==void 0&&a.click();_context21.next=15;return i.updateComplete;case 15:e(o.scrollTop).to.equal(0);case 16:case"end":return _context21.stop();}},_callee20);})));}),describe("small dataset handling",function(){it("should render small datasets without virtualizer for better sizing",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee21(){var _i$shadowRoot30;var i,o,a,s,n;return _regeneratorRuntime().wrap(function _callee21$(_context22){while(1)switch(_context22.prev=_context22.next){case 0:_context22.next=2;return t(l(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context22.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context22.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot30=i.shadowRoot)===null||_i$shadowRoot30===void 0?void 0:_i$shadowRoot30.querySelector(".virtualized");e(o).to.exist;a=o.querySelector("lit-virtualizer");e(a).to.not.exist;s=o.querySelectorAll("nile-option");e(s.length).to.equal(3);n=Array.from(s).map(function(t){return t.getAttribute("value");});e(n).to.deep.equal(["option-1","option-2","option-3"]);case 16:case"end":return _context22.stop();}},_callee21);}))),it("should use virtualizer for large datasets",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22(){var _i$shadowRoot31;var i,o,a;return _regeneratorRuntime().wrap(function _callee22$(_context23){while(1)switch(_context23.prev=_context23.next){case 0:_context23.next=2;return t(l(_templateObject22||(_templateObject22=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context23.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e+1),label:"Option ".concat(e+1)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context23.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot31=i.shadowRoot)===null||_i$shadowRoot31===void 0?void 0:_i$shadowRoot31.querySelector(".virtualized");e(o).to.exist;a=o.querySelector("lit-virtualizer");e(a).to.exist;case 12:case"end":return _context23.stop();}},_callee22);}))),it("should fit snugly without extra space for small datasets",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23(){var _i$shadowRoot32,_i$shadowRoot33;var i,o,a,s,n,c;return _regeneratorRuntime().wrap(function _callee23$(_context24){while(1)switch(_context24.prev=_context24.next){case 0:_context24.next=2;return t(l(_templateObject23||(_templateObject23=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context24.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context24.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot32=i.shadowRoot)===null||_i$shadowRoot32===void 0?void 0:_i$shadowRoot32.querySelector(".select__listbox");e(o).to.exist;a=(_i$shadowRoot33=i.shadowRoot)===null||_i$shadowRoot33===void 0?void 0:_i$shadowRoot33.querySelector(".virtualized");e(a).to.exist;s=a.offsetHeight,n=a.querySelectorAll("nile-option");e(n.length).to.equal(3),e(s).to.be.greaterThan(0);c=Array.from(n).reduce(function(t,e){return t+e.offsetHeight;},0);e(s).to.be.closeTo(c,20);case 16:case"end":return _context24.stop();}},_callee23);})));});});}};});
|
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(["../fixture-5b79f853.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js"],function(_export,_context){"use strict";var t,e,l,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,_templateObject17,_templateObject18,_templateObject19,_templateObject20,_templateObject21,_templateObject22,_templateObject23;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}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);});};}return{setters:[function(_fixture003CjsJs){t=_fixture003CjsJs.f;e=_fixture003CjsJs.a;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){}],execute:function execute(){describe("<nile-virtual-select>",function(){describe("maxOptionsVisible functionality",function(){it('should show "+n More" when more options are selected than maxOptionsVisible',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _i$shadowRoot,_o$textContent;var i,o;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"2\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context2.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"},{value:"option-4",label:"Option 4"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3"];_context2.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot=i.shadowRoot)===null||_i$shadowRoot===void 0?void 0:_i$shadowRoot.querySelector(".select__tags-count");e(o).to.exist,e(o===null||o===void 0||(_o$textContent=o.textContent)===null||_o$textContent===void 0?void 0:_o$textContent.trim()).to.equal("+1 More");case 10:case"end":return _context2.stop();}},_callee);}))),it('should not show "+n More" when selected options are within maxOptionsVisible limit',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _i$shadowRoot2;var i,o;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"3\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context3.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2"];_context3.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot2=i.shadowRoot)===null||_i$shadowRoot2===void 0?void 0:_i$shadowRoot2.querySelector(".select__tags-count");e(o).to.not.exist;case 10:case"end":return _context3.stop();}},_callee2);}))),it("should show all tags when maxOptionsVisible is 0",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _i$shadowRoot3,_i$shadowRoot4;var i,o,a;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(l(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-virtual-select multiple max-options-visible=\"0\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context4.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"},{value:"option-4",label:"Option 4"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3","option-4"];_context4.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot3=i.shadowRoot)===null||_i$shadowRoot3===void 0?void 0:_i$shadowRoot3.querySelector(".select__tags-count");e(o).to.not.exist;a=(_i$shadowRoot4=i.shadowRoot)===null||_i$shadowRoot4===void 0?void 0:_i$shadowRoot4.querySelectorAll("nile-tag");e(a===null||a===void 0?void 0:a.length).to.equal(4);case 12:case"end":return _context4.stop();}},_callee3);})));}),describe("option width functionality",function(){it("should render options with full width",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _i$shadowRoot5,_i$shadowRoot6,_i$shadowRoot7;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(l(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context5.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context5.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot5=i.shadowRoot)===null||_i$shadowRoot5===void 0?void 0:_i$shadowRoot5.querySelector(".virtualized");e(o).to.exist;a=(_i$shadowRoot6=i.shadowRoot)===null||_i$shadowRoot6===void 0?void 0:_i$shadowRoot6.querySelector(".select__options");e(a).to.exist;s=(_i$shadowRoot7=i.shadowRoot)===null||_i$shadowRoot7===void 0?void 0:_i$shadowRoot7.querySelector(".select__listbox");e(s).to.exist,e(s===null||s===void 0?void 0:s.querySelector(".select__options")).to.exist;case 14:case"end":return _context5.stop();}},_callee4);}))),it("should render options with proper CSS classes for width",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _i$shadowRoot8,_i$shadowRoot9,_i$shadowRoot10;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(l(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context6.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context6.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot8=i.shadowRoot)===null||_i$shadowRoot8===void 0?void 0:_i$shadowRoot8.querySelector(".virtualized");e(o).to.exist;a=(_i$shadowRoot9=i.shadowRoot)===null||_i$shadowRoot9===void 0?void 0:_i$shadowRoot9.querySelector(".select__options");e(a).to.exist;s=(_i$shadowRoot10=i.shadowRoot)===null||_i$shadowRoot10===void 0?void 0:_i$shadowRoot10.querySelector("lit-virtualizer");e(s).to.exist;case 14:case"end":return _context6.stop();}},_callee5);}))),it("should render virtualized options with full width structure",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _i$shadowRoot11;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(l(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context7.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context7.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot11=i.shadowRoot)===null||_i$shadowRoot11===void 0?void 0:_i$shadowRoot11.querySelector(".select__listbox");e(o).to.exist;a=o===null||o===void 0?void 0:o.querySelector(".select__options");e(a).to.exist;s=a===null||a===void 0?void 0:a.querySelector(".virtualized");e(s).to.exist,e(o===null||o===void 0?void 0:o.contains(a||null)).to.be["true"],e(a===null||a===void 0?void 0:a.contains(s||null)).to.be["true"];case 14:case"end":return _context7.stop();}},_callee6);})));}),describe("selected options highlighting",function(){it("should highlight selected options with red border in single select mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _i$shadowRoot12;var i,o;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return t(l(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context8.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value="option-2";i.open=!0;_context8.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot12=i.shadowRoot)===null||_i$shadowRoot12===void 0?void 0:_i$shadowRoot12.querySelector("nile-option[selected]");e(o).to.exist,e(o===null||o===void 0?void 0:o.getAttribute("value")).to.equal("option-2");case 11:case"end":return _context8.stop();}},_callee7);}))),it("should highlight selected options with red border in multiple select mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _i$shadowRoot13;var i,o,a;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return t(l(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context9.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-3"];i.open=!0;_context9.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot13=i.shadowRoot)===null||_i$shadowRoot13===void 0?void 0:_i$shadowRoot13.querySelectorAll("nile-option[selected]");e(o===null||o===void 0?void 0:o.length).to.equal(2);a=Array.from(o||[]).map(function(t){return t.getAttribute("value");});e(a).to.include("option-1"),e(a).to.include("option-3");case 13:case"end":return _context9.stop();}},_callee8);}))),it("should not highlight unselected options",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var _i$shadowRoot14;var i,o;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return t(l(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context10.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value="option-2";i.open=!0;_context10.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot14=i.shadowRoot)===null||_i$shadowRoot14===void 0?void 0:_i$shadowRoot14.querySelector('nile-option[value="option-1"]');e(o).to.exist,e(o===null||o===void 0?void 0:o.hasAttribute("selected")).to.be["false"];case 11:case"end":return _context10.stop();}},_callee9);}))),it("should show tags for pre-selected values when data is set after value",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var _i$shadowRoot15,_i$shadowRoot16;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return t(l(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context11.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-3"];_context11.next=7;return i.updateComplete;case 7:o=(_i$shadowRoot15=i.shadowRoot)===null||_i$shadowRoot15===void 0?void 0:_i$shadowRoot15.querySelectorAll("nile-tag");e(o===null||o===void 0?void 0:o.length).to.equal(0);i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];_context11.next=12;return i.updateComplete;case 12:a=(_i$shadowRoot16=i.shadowRoot)===null||_i$shadowRoot16===void 0?void 0:_i$shadowRoot16.querySelectorAll("nile-tag");e(a===null||a===void 0?void 0:a.length).to.equal(2);s=Array.from(a||[]).map(function(t){var _t$textContent;return(_t$textContent=t.textContent)===null||_t$textContent===void 0?void 0:_t$textContent.trim();});e(s).to.include("Option 1"),e(s).to.include("Option 3");case 16:case"end":return _context11.stop();}},_callee10);}))),it("should show tags immediately without opening dropdown",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var _i$shadowRoot17;var i,o,a;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return t(l(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context12.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.value=["option-1","option-3"];_context12.next=8;return i.updateComplete;case 8:i.open=!1;_context12.next=11;return i.updateComplete;case 11:o=(_i$shadowRoot17=i.shadowRoot)===null||_i$shadowRoot17===void 0?void 0:_i$shadowRoot17.querySelectorAll("nile-tag");e(o===null||o===void 0?void 0:o.length).to.equal(2);a=Array.from(o||[]).map(function(t){var _t$textContent2;return(_t$textContent2=t.textContent)===null||_t$textContent2===void 0?void 0:_t$textContent2.trim();});e(a).to.include("Option 1"),e(a).to.include("Option 3");case 15:case"end":return _context12.stop();}},_callee11);}))),it("should show checkbox as checked for selected options in multiple mode",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var _i$shadowRoot18,_i$shadowRoot19,_a$shadowRoot;var i,o,a,s;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return t(l(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context13.sent;i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.value=["option-1","option-3"];i.open=!0;_context13.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot18=i.shadowRoot)===null||_i$shadowRoot18===void 0?void 0:_i$shadowRoot18.querySelectorAll("nile-option[selected]");e(o===null||o===void 0?void 0:o.length).to.equal(2),o===null||o===void 0?void 0:o.forEach(function(t){var _t$shadowRoot;var l=(_t$shadowRoot=t.shadowRoot)===null||_t$shadowRoot===void 0?void 0:_t$shadowRoot.querySelector("nile-checkbox");e(l).to.exist,e(l===null||l===void 0?void 0:l.checked).to.be["true"];});a=(_i$shadowRoot19=i.shadowRoot)===null||_i$shadowRoot19===void 0?void 0:_i$shadowRoot19.querySelector('nile-option[value="option-2"]');e(a).to.exist;s=a===null||a===void 0||(_a$shadowRoot=a.shadowRoot)===null||_a$shadowRoot===void 0?void 0:_a$shadowRoot.querySelector("nile-checkbox");e(s).to.exist,e(s===null||s===void 0?void 0:s.checked).to.be["false"];case 15:case"end":return _context13.stop();}},_callee12);})));}),describe("no results message functionality",function(){it("should show no results message when data is empty and not loading",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var _i$shadowRoot20,_o$textContent2;var i,o;return _regeneratorRuntime().wrap(function _callee13$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_context14.next=2;return t(l(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context14.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context14.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot20=i.shadowRoot)===null||_i$shadowRoot20===void 0?void 0:_i$shadowRoot20.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent2=o.textContent)===null||_o$textContent2===void 0?void 0:_o$textContent2.trim()).to.equal("No results found");case 10:case"end":return _context14.stop();}},_callee13);}))),it("should show custom no results message when provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var _i$shadowRoot21,_o$textContent3;var i,o;return _regeneratorRuntime().wrap(function _callee14$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:_context15.next=2;return t(l(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <nile-virtual-select no-results-message=\"No data available\">\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context15.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context15.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot21=i.shadowRoot)===null||_i$shadowRoot21===void 0?void 0:_i$shadowRoot21.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent3=o.textContent)===null||_o$textContent3===void 0?void 0:_o$textContent3.trim()).to.equal("No data available");case 10:case"end":return _context15.stop();}},_callee14);}))),it("should not show no results message when loading",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15(){var _i$shadowRoot22;var i,o;return _regeneratorRuntime().wrap(function _callee15$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:_context16.next=2;return t(l(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context16.sent;i.data=[];i.optionsLoading=!0;i.open=!0;_context16.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot22=i.shadowRoot)===null||_i$shadowRoot22===void 0?void 0:_i$shadowRoot22.querySelector(".select__no-results");e(o).to.not.exist;case 10:case"end":return _context16.stop();}},_callee15);}))),it("should show no results message when search returns no results",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(){var _i$shadowRoot23,_o$textContent4;var i,o;return _regeneratorRuntime().wrap(function _callee16$(_context17){while(1)switch(_context17.prev=_context17.next){case 0:_context17.next=2;return t(l(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n <nile-virtual-select search-enabled>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context17.sent;i.data=[{value:"option-1",label:"Apple"},{value:"option-2",label:"Banana"},{value:"option-3",label:"Cherry"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context17.next=8;return i.updateComplete;case 8:i.searchValue="Orange";i.filterVirtualOptions("Orange");_context17.next=12;return i.updateComplete;case 12:o=(_i$shadowRoot23=i.shadowRoot)===null||_i$shadowRoot23===void 0?void 0:_i$shadowRoot23.querySelector(".select__no-results");e(o).to.exist,e(o===null||o===void 0||(_o$textContent4=o.textContent)===null||_o$textContent4===void 0?void 0:_o$textContent4.trim()).to.equal("No results found");case 14:case"end":return _context17.stop();}},_callee16);}))),it("should hide no results message when data becomes available",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17(){var _i$shadowRoot24,_i$shadowRoot25;var i,o;return _regeneratorRuntime().wrap(function _callee17$(_context18){while(1)switch(_context18.prev=_context18.next){case 0:_context18.next=2;return t(l(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context18.sent;i.data=[];i.optionsLoading=!1;i.open=!0;_context18.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot24=i.shadowRoot)===null||_i$shadowRoot24===void 0?void 0:_i$shadowRoot24.querySelector(".select__no-results");e(o).to.exist;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"}];_context18.next=13;return i.updateComplete;case 13:o=(_i$shadowRoot25=i.shadowRoot)===null||_i$shadowRoot25===void 0?void 0:_i$shadowRoot25.querySelector(".select__no-results");e(o).to.not.exist;case 15:case"end":return _context18.stop();}},_callee17);})));}),describe("scroll position reset functionality",function(){it("should reset scroll position to top when dropdown opens",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18(){var _i$shadowRoot26;var i,o;return _regeneratorRuntime().wrap(function _callee18$(_context19){while(1)switch(_context19.prev=_context19.next){case 0:_context19.next=2;return t(l(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context19.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context19.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot26=i.shadowRoot)===null||_i$shadowRoot26===void 0?void 0:_i$shadowRoot26.querySelector(".virtualized");e(o).to.exist;o.scrollTop=1e3;e(o.scrollTop).to.equal(1e3);i.open=!1;_context19.next=15;return i.updateComplete;case 15:i.open=!0;_context19.next=18;return i.updateComplete;case 18:e(o.scrollTop).to.equal(0);case 19:case"end":return _context19.stop();}},_callee18);}))),it("should reset scroll position when search value changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee19(){var _i$shadowRoot27;var i,o;return _regeneratorRuntime().wrap(function _callee19$(_context20){while(1)switch(_context20.prev=_context20.next){case 0:_context20.next=2;return t(l(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n <nile-virtual-select search-enabled>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context20.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context20.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot27=i.shadowRoot)===null||_i$shadowRoot27===void 0?void 0:_i$shadowRoot27.querySelector(".virtualized");e(o).to.exist;o.scrollTop=1e3;e(o.scrollTop).to.equal(1e3);i.searchValue="test";i.filterVirtualOptions("test");_context20.next=16;return i.updateComplete;case 16:e(o.scrollTop).to.equal(0);case 17:case"end":return _context20.stop();}},_callee19);}))),it("should reset scroll position when show selected state changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20(){var _i$shadowRoot28,_i$shadowRoot29;var i,o,a;return _regeneratorRuntime().wrap(function _callee20$(_context21){while(1)switch(_context21.prev=_context21.next){case 0:_context21.next=2;return t(l(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n <nile-virtual-select multiple>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context21.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e),label:"Option ".concat(e)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.value=["option-1","option-2","option-3"];i.open=!0;_context21.next=9;return i.updateComplete;case 9:o=(_i$shadowRoot28=i.shadowRoot)===null||_i$shadowRoot28===void 0?void 0:_i$shadowRoot28.querySelector(".virtualized");e(o).to.exist,o.scrollTop=1e3,e(o.scrollTop).to.equal(1e3);a=(_i$shadowRoot29=i.shadowRoot)===null||_i$shadowRoot29===void 0?void 0:_i$shadowRoot29.querySelector("nile-checkbox");a!==null&&a!==void 0&&a.click();_context21.next=15;return i.updateComplete;case 15:e(o.scrollTop).to.equal(0);case 16:case"end":return _context21.stop();}},_callee20);})));}),describe("small dataset handling",function(){it("should render small datasets without virtualizer for better sizing",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee21(){var _i$shadowRoot30;var i,o,a,s,n;return _regeneratorRuntime().wrap(function _callee21$(_context22){while(1)switch(_context22.prev=_context22.next){case 0:_context22.next=2;return t(l(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context22.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context22.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot30=i.shadowRoot)===null||_i$shadowRoot30===void 0?void 0:_i$shadowRoot30.querySelector(".virtualized");e(o).to.exist;a=o.querySelector("lit-virtualizer");e(a).to.not.exist;s=o.querySelectorAll("nile-option");e(s.length).to.equal(3);n=Array.from(s).map(function(t){return t.getAttribute("value");});e(n).to.deep.equal(["option-1","option-2","option-3"]);case 16:case"end":return _context22.stop();}},_callee21);}))),it("should use virtualizer for large datasets",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22(){var _i$shadowRoot31;var i,o,a;return _regeneratorRuntime().wrap(function _callee22$(_context23){while(1)switch(_context23.prev=_context23.next){case 0:_context23.next=2;return t(l(_templateObject22||(_templateObject22=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context23.sent;i.data=Array.from({length:100},function(t,e){return{value:"option-".concat(e+1),label:"Option ".concat(e+1)};});i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context23.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot31=i.shadowRoot)===null||_i$shadowRoot31===void 0?void 0:_i$shadowRoot31.querySelector(".virtualized");e(o).to.exist;a=o.querySelector("lit-virtualizer");e(a).to.exist;case 12:case"end":return _context23.stop();}},_callee22);}))),it("should fit snugly without extra space for small datasets",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23(){var _i$shadowRoot32,_i$shadowRoot33;var i,o,a,s,n,c;return _regeneratorRuntime().wrap(function _callee23$(_context24){while(1)switch(_context24.prev=_context24.next){case 0:_context24.next=2;return t(l(_templateObject23||(_templateObject23=_taggedTemplateLiteral(["\n <nile-virtual-select>\n <div slot=\"label\">Test Select</div>\n </nile-virtual-select>\n "]))));case 2:i=_context24.sent;i.data=[{value:"option-1",label:"Option 1"},{value:"option-2",label:"Option 2"},{value:"option-3",label:"Option 3"}];i.renderItemConfig={getDisplayText:function getDisplayText(t){return t.label;}};i.open=!0;_context24.next=8;return i.updateComplete;case 8:o=(_i$shadowRoot32=i.shadowRoot)===null||_i$shadowRoot32===void 0?void 0:_i$shadowRoot32.querySelector(".select__listbox");e(o).to.exist;a=(_i$shadowRoot33=i.shadowRoot)===null||_i$shadowRoot33===void 0?void 0:_i$shadowRoot33.querySelector(".virtualized");e(a).to.exist;s=a.offsetHeight,n=a.querySelectorAll("nile-option");e(n.length).to.equal(3),e(s).to.be.greaterThan(0);c=Array.from(n).reduce(function(t,e){return t+e.offsetHeight;},0);e(s).to.be.closeTo(c,20);case 16:case"end":return _context24.stop();}},_callee23);})));});});}};});
|
2
2
|
//# sourceMappingURL=nile-virtual-select.test.cjs.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{f as t,a as e}from"../fixture-
|
1
|
+
import{f as t,a as e}from"../fixture-cf7bfcf5.esm.js";import{html as l}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";describe("<nile-virtual-select>",(()=>{describe("maxOptionsVisible functionality",(()=>{it('should show "+n More" when more options are selected than maxOptionsVisible',(async()=>{const i=await t(l`
|
2
2
|
<nile-virtual-select multiple max-options-visible="2">
|
3
3
|
<div slot="label">Test Select</div>
|
4
4
|
</nile-virtual-select>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/**
|
8
|
+
* Resizable Helper Utility
|
9
|
+
* Provides common functionality for resizable table columns
|
10
|
+
*/
|
11
|
+
export interface ResizeOptions {
|
12
|
+
minWidth?: number;
|
13
|
+
startX: number;
|
14
|
+
startWidth: number;
|
15
|
+
element: HTMLElement;
|
16
|
+
}
|
17
|
+
export interface ColumnResizeData {
|
18
|
+
columnIndex: number;
|
19
|
+
newWidth: number;
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* Handles the start of a resize operation
|
23
|
+
* @param e Mouse event
|
24
|
+
* @param options Resize configuration options
|
25
|
+
* @returns Cleanup function to remove event listeners
|
26
|
+
*/
|
27
|
+
export declare function handleResizeStart(e: MouseEvent, options: ResizeOptions): () => void;
|
28
|
+
/**
|
29
|
+
* Gets the column index of an element within its table row
|
30
|
+
* @param element The table cell or header element
|
31
|
+
* @param selector The CSS selector for the column elements
|
32
|
+
* @returns Column index (0-based)
|
33
|
+
*/
|
34
|
+
export declare function getColumnIndex(element: HTMLElement, selector: string): number;
|
35
|
+
/**
|
36
|
+
* Synchronizes the width of all cells in the same column
|
37
|
+
* @param sourceElement The element that was resized
|
38
|
+
* @param newWidth The new width to apply
|
39
|
+
*/
|
40
|
+
export declare function synchronizeColumnWidth(sourceElement: HTMLElement, newWidth: number): void;
|
41
|
+
/**
|
42
|
+
* Checks if an element has the resizable attribute
|
43
|
+
* @param element The element to check
|
44
|
+
* @returns True if the element is resizable
|
45
|
+
*/
|
46
|
+
export declare function isResizable(element: HTMLElement): boolean;
|
47
|
+
/**
|
48
|
+
* Creates a resize handler function for use in component event listeners
|
49
|
+
* @param element The element to make resizable
|
50
|
+
* @param minWidth Minimum width constraint
|
51
|
+
* @returns Event handler function
|
52
|
+
*/
|
53
|
+
export declare function createResizeHandler(element: HTMLElement, minWidth?: number): (e: MouseEvent) => void;
|
54
|
+
/**
|
55
|
+
* Detects if any columns in a table are resizable
|
56
|
+
* @param tableBody The table body element
|
57
|
+
* @returns True if any columns have resizable attribute
|
58
|
+
*/
|
59
|
+
export declare function hasResizableColumns(tableBody: HTMLElement): boolean;
|
@@ -0,0 +1,115 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/**
|
8
|
+
* Handles the start of a resize operation
|
9
|
+
* @param e Mouse event
|
10
|
+
* @param options Resize configuration options
|
11
|
+
* @returns Cleanup function to remove event listeners
|
12
|
+
*/
|
13
|
+
export function handleResizeStart(e, options) {
|
14
|
+
e.preventDefault();
|
15
|
+
e.stopPropagation();
|
16
|
+
const { minWidth = 50, startX, startWidth, element } = options;
|
17
|
+
const resizer = e.target;
|
18
|
+
// Add resizing class for visual feedback
|
19
|
+
resizer.classList.add('resizing');
|
20
|
+
const onMouseMove = (e) => {
|
21
|
+
e.preventDefault();
|
22
|
+
e.stopPropagation();
|
23
|
+
const delta = e.pageX - startX;
|
24
|
+
const newWidth = Math.max(minWidth, startWidth + delta);
|
25
|
+
// Apply width to the current element
|
26
|
+
element.style.width = newWidth + 'px';
|
27
|
+
// Synchronize width across all cells in the same column
|
28
|
+
synchronizeColumnWidth(element, newWidth);
|
29
|
+
};
|
30
|
+
const onMouseUp = () => {
|
31
|
+
resizer.classList.remove('resizing');
|
32
|
+
document.removeEventListener('mousemove', onMouseMove);
|
33
|
+
document.removeEventListener('mouseup', onMouseUp);
|
34
|
+
};
|
35
|
+
document.addEventListener('mousemove', onMouseMove);
|
36
|
+
document.addEventListener('mouseup', onMouseUp);
|
37
|
+
// Return cleanup function
|
38
|
+
return () => {
|
39
|
+
document.removeEventListener('mousemove', onMouseMove);
|
40
|
+
document.removeEventListener('mouseup', onMouseUp);
|
41
|
+
};
|
42
|
+
}
|
43
|
+
/**
|
44
|
+
* Gets the column index of an element within its table row
|
45
|
+
* @param element The table cell or header element
|
46
|
+
* @param selector The CSS selector for the column elements
|
47
|
+
* @returns Column index (0-based)
|
48
|
+
*/
|
49
|
+
export function getColumnIndex(element, selector) {
|
50
|
+
const tableRow = element.closest('nile-table-row');
|
51
|
+
if (tableRow) {
|
52
|
+
const columns = tableRow.querySelectorAll(selector);
|
53
|
+
return Array.from(columns).indexOf(element);
|
54
|
+
}
|
55
|
+
return 0;
|
56
|
+
}
|
57
|
+
/**
|
58
|
+
* Synchronizes the width of all cells in the same column
|
59
|
+
* @param sourceElement The element that was resized
|
60
|
+
* @param newWidth The new width to apply
|
61
|
+
*/
|
62
|
+
export function synchronizeColumnWidth(sourceElement, newWidth) {
|
63
|
+
const tableBody = sourceElement.closest('nile-table-body');
|
64
|
+
if (!tableBody)
|
65
|
+
return;
|
66
|
+
const isHeader = sourceElement.tagName.toLowerCase() === 'nile-table-header-item';
|
67
|
+
const selector = isHeader ? 'nile-table-header-item' : 'nile-table-cell-item';
|
68
|
+
const targetSelector = isHeader ? 'nile-table-cell-item' : 'nile-table-cell-item';
|
69
|
+
const columnIndex = getColumnIndex(sourceElement, selector);
|
70
|
+
const rows = tableBody.querySelectorAll('nile-table-row');
|
71
|
+
rows.forEach(row => {
|
72
|
+
const cells = row.querySelectorAll(targetSelector);
|
73
|
+
if (cells[columnIndex]) {
|
74
|
+
cells[columnIndex].style.width = newWidth + 'px';
|
75
|
+
}
|
76
|
+
});
|
77
|
+
}
|
78
|
+
/**
|
79
|
+
* Checks if an element has the resizable attribute
|
80
|
+
* @param element The element to check
|
81
|
+
* @returns True if the element is resizable
|
82
|
+
*/
|
83
|
+
export function isResizable(element) {
|
84
|
+
return element.hasAttribute('resizable');
|
85
|
+
}
|
86
|
+
/**
|
87
|
+
* Creates a resize handler function for use in component event listeners
|
88
|
+
* @param element The element to make resizable
|
89
|
+
* @param minWidth Minimum width constraint
|
90
|
+
* @returns Event handler function
|
91
|
+
*/
|
92
|
+
export function createResizeHandler(element, minWidth = 50) {
|
93
|
+
return (e) => {
|
94
|
+
const options = {
|
95
|
+
minWidth,
|
96
|
+
startX: e.pageX,
|
97
|
+
startWidth: element.offsetWidth,
|
98
|
+
element
|
99
|
+
};
|
100
|
+
handleResizeStart(e, options);
|
101
|
+
};
|
102
|
+
}
|
103
|
+
/**
|
104
|
+
* Detects if any columns in a table are resizable
|
105
|
+
* @param tableBody The table body element
|
106
|
+
* @returns True if any columns have resizable attribute
|
107
|
+
*/
|
108
|
+
export function hasResizableColumns(tableBody) {
|
109
|
+
const headerItems = tableBody.querySelectorAll('nile-table-header-item');
|
110
|
+
const cellItems = tableBody.querySelectorAll('nile-table-cell-item');
|
111
|
+
const hasResizableHeaders = Array.from(headerItems).some(item => isResizable(item));
|
112
|
+
const hasResizableCells = Array.from(cellItems).some(item => isResizable(item));
|
113
|
+
return hasResizableHeaders || hasResizableCells;
|
114
|
+
}
|
115
|
+
//# sourceMappingURL=resizable-helper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resizable-helper.js","sourceRoot":"","sources":["../../../src/internal/resizable-helper.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmBH;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,CAAa,EAAE,OAAsB;IACrE,CAAC,CAAC,cAAc,EAAE,CAAC;IACnB,CAAC,CAAC,eAAe,EAAE,CAAC;IAEpB,MAAM,EAAE,QAAQ,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC/D,MAAM,OAAO,GAAG,CAAC,CAAC,MAAqB,CAAC;IAExC,yCAAyC;IACzC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAElC,MAAM,WAAW,GAAG,CAAC,CAAa,EAAE,EAAE;QACpC,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,CAAC,CAAC,eAAe,EAAE,CAAC;QAEpB,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,MAAM,CAAC;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,KAAK,CAAC,CAAC;QAExD,qCAAqC;QACrC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAC;QAEtC,wDAAwD;QACxD,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACrC,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QACvD,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC,CAAC;IAEF,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACpD,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAEhD,0BAA0B;IAC1B,OAAO,GAAG,EAAE;QACV,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QACvD,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,OAAoB,EAAE,QAAgB;IACnE,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACnD,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACpD,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,aAA0B,EAAE,QAAgB;IACjF,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC3D,IAAI,CAAC,SAAS;QAAE,OAAO;IAEvB,MAAM,QAAQ,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,wBAAwB,CAAC;IAClF,MAAM,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAC9E,MAAM,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAElF,MAAM,WAAW,GAAG,cAAc,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC5D,MAAM,IAAI,GAAG,SAAS,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAE1D,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACjB,MAAM,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;QACnD,IAAI,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;YACvB,KAAK,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAC;QACnD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,OAAoB;IAC9C,OAAO,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAoB,EAAE,WAAmB,EAAE;IAC7E,OAAO,CAAC,CAAa,EAAE,EAAE;QACvB,MAAM,OAAO,GAAkB;YAC7B,QAAQ;YACR,MAAM,EAAE,CAAC,CAAC,KAAK;YACf,UAAU,EAAE,OAAO,CAAC,WAAW;YAC/B,OAAO;SACR,CAAC;QAEF,iBAAiB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAsB;IACxD,MAAM,WAAW,GAAG,SAAS,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IACzE,MAAM,SAAS,GAAG,SAAS,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;IAErE,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9D,WAAW,CAAC,IAAI,CAAC,CAClB,CAAC;IACF,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC1D,WAAW,CAAC,IAAI,CAAC,CAClB,CAAC;IAEF,OAAO,mBAAmB,IAAI,iBAAiB,CAAC;AAClD,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * Resizable Helper Utility\n * Provides common functionality for resizable table columns\n */\n\nexport interface ResizeOptions {\n minWidth?: number;\n startX: number;\n startWidth: number;\n element: HTMLElement;\n}\n\nexport interface ColumnResizeData {\n columnIndex: number;\n newWidth: number;\n}\n\n/**\n * Handles the start of a resize operation\n * @param e Mouse event\n * @param options Resize configuration options\n * @returns Cleanup function to remove event listeners\n */\nexport function handleResizeStart(e: MouseEvent, options: ResizeOptions): () => void {\n e.preventDefault();\n e.stopPropagation();\n \n const { minWidth = 50, startX, startWidth, element } = options;\n const resizer = e.target as HTMLElement;\n \n // Add resizing class for visual feedback\n resizer.classList.add('resizing');\n\n const onMouseMove = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n \n const delta = e.pageX - startX;\n const newWidth = Math.max(minWidth, startWidth + delta);\n\n // Apply width to the current element\n element.style.width = newWidth + 'px';\n\n // Synchronize width across all cells in the same column\n synchronizeColumnWidth(element, newWidth);\n };\n\n const onMouseUp = () => {\n resizer.classList.remove('resizing');\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n\n // Return cleanup function\n return () => {\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n}\n\n/**\n * Gets the column index of an element within its table row\n * @param element The table cell or header element\n * @param selector The CSS selector for the column elements\n * @returns Column index (0-based)\n */\nexport function getColumnIndex(element: HTMLElement, selector: string): number {\n const tableRow = element.closest('nile-table-row');\n if (tableRow) {\n const columns = tableRow.querySelectorAll(selector);\n return Array.from(columns).indexOf(element);\n }\n return 0;\n}\n\n/**\n * Synchronizes the width of all cells in the same column\n * @param sourceElement The element that was resized\n * @param newWidth The new width to apply\n */\nexport function synchronizeColumnWidth(sourceElement: HTMLElement, newWidth: number): void {\n const tableBody = sourceElement.closest('nile-table-body');\n if (!tableBody) return;\n\n const isHeader = sourceElement.tagName.toLowerCase() === 'nile-table-header-item';\n const selector = isHeader ? 'nile-table-header-item' : 'nile-table-cell-item';\n const targetSelector = isHeader ? 'nile-table-cell-item' : 'nile-table-cell-item';\n \n const columnIndex = getColumnIndex(sourceElement, selector);\n const rows = tableBody.querySelectorAll('nile-table-row');\n \n rows.forEach(row => {\n const cells = row.querySelectorAll(targetSelector);\n if (cells[columnIndex]) {\n cells[columnIndex].style.width = newWidth + 'px';\n }\n });\n}\n\n/**\n * Checks if an element has the resizable attribute\n * @param element The element to check\n * @returns True if the element is resizable\n */\nexport function isResizable(element: HTMLElement): boolean {\n return element.hasAttribute('resizable');\n}\n\n/**\n * Creates a resize handler function for use in component event listeners\n * @param element The element to make resizable\n * @param minWidth Minimum width constraint\n * @returns Event handler function\n */\nexport function createResizeHandler(element: HTMLElement, minWidth: number = 50): (e: MouseEvent) => void {\n return (e: MouseEvent) => {\n const options: ResizeOptions = {\n minWidth,\n startX: e.pageX,\n startWidth: element.offsetWidth,\n element\n };\n \n handleResizeStart(e, options);\n };\n}\n\n/**\n * Detects if any columns in a table are resizable\n * @param tableBody The table body element\n * @returns True if any columns have resizable attribute\n */\nexport function hasResizableColumns(tableBody: HTMLElement): boolean {\n const headerItems = tableBody.querySelectorAll('nile-table-header-item');\n const cellItems = tableBody.querySelectorAll('nile-table-cell-item');\n \n const hasResizableHeaders = Array.from(headerItems).some(item => \n isResizable(item)\n );\n const hasResizableCells = Array.from(cellItems).some(item => \n isResizable(item)\n );\n \n return hasResizableHeaders || hasResizableCells;\n} \n"]}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/**
|
8
|
+
* Resizable Styles Utility
|
9
|
+
* Centralized styles for resizable table functionality
|
10
|
+
*/
|
11
|
+
export declare const resizableHostStyles: import("lit").CSSResult;
|
12
|
+
export declare const resizableHeaderStyles: import("lit").CSSResult;
|
13
|
+
export declare const resizerStyles: import("lit").CSSResult;
|
14
|
+
export declare const headerResizerStyles: import("lit").CSSResult;
|
15
|
+
export declare const resizableSlotStyles: import("lit").CSSResult;
|
16
|
+
export declare const tableLayoutStyles: import("lit").CSSResult;
|
@@ -0,0 +1,144 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import { css } from 'lit';
|
8
|
+
/**
|
9
|
+
* Resizable Styles Utility
|
10
|
+
* Centralized styles for resizable table functionality
|
11
|
+
*/
|
12
|
+
export const resizableHostStyles = css `
|
13
|
+
/* Resizable-specific host styles */
|
14
|
+
:host([resizable]) {
|
15
|
+
position: relative;
|
16
|
+
overflow: hidden;
|
17
|
+
table-layout: fixed;
|
18
|
+
}
|
19
|
+
`;
|
20
|
+
export const resizableHeaderStyles = css `
|
21
|
+
/* Resizable-specific header styles */
|
22
|
+
:host([resizable]) {
|
23
|
+
position: relative;
|
24
|
+
border-right: 1px solid var(--nile-colors-neutral-400);
|
25
|
+
}
|
26
|
+
|
27
|
+
/* Resizable-specific wrapper styles */
|
28
|
+
:host([resizable]) .header__item__wrapper {
|
29
|
+
position: relative;
|
30
|
+
}
|
31
|
+
`;
|
32
|
+
export const resizerStyles = css `
|
33
|
+
/* Resizer styles - only apply when resizable */
|
34
|
+
.resizer {
|
35
|
+
position: absolute;
|
36
|
+
right: 0;
|
37
|
+
top: -1000px;
|
38
|
+
bottom: -1000px;
|
39
|
+
width: 8px;
|
40
|
+
cursor: col-resize;
|
41
|
+
user-select: none;
|
42
|
+
background-color: var(--nile-colors-neutral-100);
|
43
|
+
transition: background-color 0.2s;
|
44
|
+
z-index: 10;
|
45
|
+
opacity: 0;
|
46
|
+
transition: opacity 0.2s ease;
|
47
|
+
pointer-events: none;
|
48
|
+
}
|
49
|
+
|
50
|
+
:host([resizable]):hover .resizer {
|
51
|
+
opacity: 1;
|
52
|
+
pointer-events: auto;
|
53
|
+
}
|
54
|
+
|
55
|
+
.resizer::before {
|
56
|
+
content: '';
|
57
|
+
position: absolute;
|
58
|
+
right: 3px;
|
59
|
+
top: 0;
|
60
|
+
width: 2px;
|
61
|
+
height: 100%;
|
62
|
+
background-color: var(--nile-colors-neutral-500);
|
63
|
+
opacity: 0.8;
|
64
|
+
}
|
65
|
+
|
66
|
+
.resizer:hover {
|
67
|
+
background-color: var(--nile-colors-neutral-400);
|
68
|
+
}
|
69
|
+
|
70
|
+
.resizer:hover::before {
|
71
|
+
background-color: var(--nile-colors-neutral-700);
|
72
|
+
opacity: 1;
|
73
|
+
}
|
74
|
+
|
75
|
+
.resizer.resizing {
|
76
|
+
background-color: var(--nile-colors-neutral-400);
|
77
|
+
opacity: 1;
|
78
|
+
pointer-events: auto;
|
79
|
+
}
|
80
|
+
|
81
|
+
.resizer.resizing::before {
|
82
|
+
background-color: var(--nile-colors-neutral-700);
|
83
|
+
opacity: 1;
|
84
|
+
width: 3px;
|
85
|
+
}
|
86
|
+
`;
|
87
|
+
export const headerResizerStyles = css `
|
88
|
+
/* Header resizer styles */
|
89
|
+
.resizer {
|
90
|
+
position: absolute;
|
91
|
+
right: -2px;
|
92
|
+
top: -1000px;
|
93
|
+
bottom: -1000px;
|
94
|
+
width: 8px;
|
95
|
+
cursor: ew-resize;
|
96
|
+
user-select: none;
|
97
|
+
transition: background-color 0.2s;
|
98
|
+
z-index: 10;
|
99
|
+
opacity: 0;
|
100
|
+
transition: opacity 0.2s ease;
|
101
|
+
}
|
102
|
+
|
103
|
+
:host([resizable]):hover .resizer {
|
104
|
+
opacity: 1;
|
105
|
+
}
|
106
|
+
|
107
|
+
.resizer::before {
|
108
|
+
content: '';
|
109
|
+
position: absolute;
|
110
|
+
height: 100%;
|
111
|
+
opacity: 0.8;
|
112
|
+
}
|
113
|
+
|
114
|
+
.resizer.resizing {
|
115
|
+
border-right: 4px double var(--nile-colors-neutral-400);
|
116
|
+
background-color: transparent;
|
117
|
+
opacity: 1;
|
118
|
+
}
|
119
|
+
`;
|
120
|
+
export const resizableSlotStyles = css `
|
121
|
+
/* Slot styles for resizable mode */
|
122
|
+
:host([resizable]) ::slotted(*) {
|
123
|
+
overflow: hidden;
|
124
|
+
text-overflow: ellipsis;
|
125
|
+
white-space: nowrap;
|
126
|
+
display: block;
|
127
|
+
}
|
128
|
+
|
129
|
+
:host([resizable]) ::slotted(span),
|
130
|
+
:host([resizable]) ::slotted(div),
|
131
|
+
:host([resizable]) ::slotted(p) {
|
132
|
+
overflow: hidden;
|
133
|
+
text-overflow: ellipsis;
|
134
|
+
white-space: nowrap;
|
135
|
+
display: block;
|
136
|
+
}
|
137
|
+
`;
|
138
|
+
export const tableLayoutStyles = css `
|
139
|
+
/* Apply fixed table layout only when resizable columns are present */
|
140
|
+
.nile__table__body[resizable] {
|
141
|
+
table-layout: fixed;
|
142
|
+
}
|
143
|
+
`;
|
144
|
+
//# sourceMappingURL=resizable-styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resizable-styles.js","sourceRoot":"","sources":["../../../src/internal/resizable-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;;GAGG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;;;;;;CAOrC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;;CAWvC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsD/B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCrC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBrC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;CAKnC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Resizable Styles Utility\n * Centralized styles for resizable table functionality\n */\n\nexport const resizableHostStyles = css`\n /* Resizable-specific host styles */\n :host([resizable]) {\n position: relative;\n overflow: hidden;\n table-layout: fixed;\n }\n`;\n\nexport const resizableHeaderStyles = css`\n /* Resizable-specific header styles */\n :host([resizable]) {\n position: relative;\n border-right: 1px solid var(--nile-colors-neutral-400);\n }\n\n /* Resizable-specific wrapper styles */\n :host([resizable]) .header__item__wrapper {\n position: relative;\n }\n`;\n\nexport const resizerStyles = css`\n /* Resizer styles - only apply when resizable */\n .resizer {\n position: absolute;\n right: 0;\n top: -1000px;\n bottom: -1000px;\n width: 8px;\n cursor: col-resize;\n user-select: none;\n background-color: var(--nile-colors-neutral-100);\n transition: background-color 0.2s;\n z-index: 10;\n opacity: 0;\n transition: opacity 0.2s ease;\n pointer-events: none;\n }\n\n :host([resizable]):hover .resizer {\n opacity: 1;\n pointer-events: auto;\n }\n\n .resizer::before {\n content: '';\n position: absolute;\n right: 3px;\n top: 0;\n width: 2px;\n height: 100%;\n background-color: var(--nile-colors-neutral-500);\n opacity: 0.8;\n }\n\n .resizer:hover {\n background-color: var(--nile-colors-neutral-400);\n }\n\n .resizer:hover::before {\n background-color: var(--nile-colors-neutral-700);\n opacity: 1;\n }\n\n .resizer.resizing {\n background-color: var(--nile-colors-neutral-400);\n opacity: 1;\n pointer-events: auto;\n }\n\n .resizer.resizing::before {\n background-color: var(--nile-colors-neutral-700);\n opacity: 1;\n width: 3px;\n }\n`;\n\nexport const headerResizerStyles = css`\n /* Header resizer styles */\n .resizer {\n position: absolute;\n right: -2px;\n top: -1000px;\n bottom: -1000px;\n width: 8px;\n cursor: ew-resize;\n user-select: none;\n transition: background-color 0.2s;\n z-index: 10;\n opacity: 0;\n transition: opacity 0.2s ease;\n }\n\n :host([resizable]):hover .resizer {\n opacity: 1;\n }\n\n .resizer::before {\n content: '';\n position: absolute;\n height: 100%;\n opacity: 0.8;\n }\n\n .resizer.resizing {\n border-right: 4px double var(--nile-colors-neutral-400);\n background-color: transparent;\n opacity: 1;\n }\n`;\n\nexport const resizableSlotStyles = css`\n /* Slot styles for resizable mode */\n :host([resizable]) ::slotted(*) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n }\n\n :host([resizable]) ::slotted(span),\n :host([resizable]) ::slotted(div),\n :host([resizable]) ::slotted(p) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n }\n`;\n\nexport const tableLayoutStyles = css`\n /* Apply fixed table layout only when resizable columns are present */\n .nile__table__body[resizable] {\n table-layout: fixed;\n }\n`; \n"]}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/* @web/test-runner snapshot v1 */
|
2
|
+
export const snapshots = {};
|
3
|
+
|
4
|
+
snapshots["NileBadge should display the default slot content"] =
|
5
|
+
`<span
|
6
|
+
class="badge badge--badge-color badge--normal"
|
7
|
+
part="base"
|
8
|
+
>
|
9
|
+
<slot
|
10
|
+
class="badge__content"
|
11
|
+
part="content"
|
12
|
+
>
|
13
|
+
</slot>
|
14
|
+
</span>
|
15
|
+
`;
|
16
|
+
/* end snapshot NileBadge should display the default slot content */
|
17
|
+
|