@aquera/nile-elements 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +239 -195
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.cjs.js.map +1 -1
- package/dist/nile-file-preview/nile-file-preview.css.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.css.cjs.js.map +1 -1
- package/dist/nile-file-preview/nile-file-preview.css.esm.js +2 -2
- package/dist/nile-file-preview/nile-file-preview.esm.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.template.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.template.cjs.js.map +1 -1
- package/dist/nile-file-preview/nile-file-preview.template.esm.js +55 -25
- package/dist/nile-file-preview/utils/index.cjs.js +1 -1
- package/dist/nile-file-preview/utils/index.esm.js +1 -1
- package/dist/nile-file-preview/utils/nile-file-preview.util.cjs.js +1 -1
- package/dist/nile-file-preview/utils/nile-file-preview.util.cjs.js.map +1 -1
- package/dist/nile-file-preview/utils/nile-file-preview.util.esm.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js.map +1 -1
- package/dist/nile-file-upload/nile-file-upload.css.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.css.cjs.js.map +1 -1
- package/dist/nile-file-upload/nile-file-upload.css.esm.js +15 -5
- package/dist/nile-file-upload/nile-file-upload.esm.js +2 -2
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js +2 -2
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js.map +1 -1
- package/dist/nile-file-upload/nile-file-upload.template.esm.js +36 -32
- package/dist/nile-file-upload/types/file-upload.enums.cjs.js +1 -1
- package/dist/nile-file-upload/types/file-upload.enums.cjs.js.map +1 -1
- package/dist/nile-file-upload/types/file-upload.enums.esm.js +1 -1
- package/dist/nile-file-upload/types/index.cjs.js +1 -1
- package/dist/nile-file-upload/types/index.esm.js +1 -1
- package/dist/nile-file-upload/utils/drag-drop.util.cjs.js +1 -1
- package/dist/nile-file-upload/utils/drag-drop.util.cjs.js.map +1 -1
- package/dist/nile-file-upload/utils/drag-drop.util.esm.js +1 -1
- package/dist/nile-file-upload/utils/file-validation.util.cjs.js +4 -2
- package/dist/nile-file-upload/utils/file-validation.util.cjs.js.map +1 -1
- package/dist/nile-file-upload/utils/file-validation.util.esm.js +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.esm.js +3 -3
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.esm.js +1 -1
- package/dist/nile-grid/nile-grid.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid.esm.js +2 -2
- package/dist/nile-grid/nile-grid.layout.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.layout.esm.js +1 -1
- package/dist/nile-grid/nile-grid.resize.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.resize.esm.js +1 -1
- package/dist/nile-grid/nile-grid.utils.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.utils.esm.js +1 -1
- package/dist/nile-grid/nile-grid.width.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.width.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid.width.esm.js +1 -1
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +1 -1
- package/dist/nile-popover/index.cjs.js +1 -1
- package/dist/nile-popover/index.esm.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +4 -4
- package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.esm.js +11 -6
- package/dist/src/nile-accordion/nile-accordian.test.js +101 -99
- package/dist/src/nile-accordion/nile-accordian.test.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.test.js +104 -112
- package/dist/src/nile-auto-complete/nile-auto-complete.test.js.map +1 -1
- package/dist/src/nile-avatar/nile-avatar.test.d.ts +0 -1
- package/dist/src/nile-avatar/nile-avatar.test.js +103 -87
- package/dist/src/nile-avatar/nile-avatar.test.js.map +1 -1
- package/dist/src/nile-badge/nile-badge.test.js +554 -35
- package/dist/src/nile-badge/nile-badge.test.js.map +1 -1
- package/dist/src/nile-breadcrumb/nile-breadcrumb.test.d.ts +2 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.test.js +106 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.test.js.map +1 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.test.d.ts +1 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.test.js +108 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.test.js.map +1 -0
- package/dist/src/nile-button/nile-button.test.js +499 -39
- package/dist/src/nile-button/nile-button.test.js.map +1 -1
- package/dist/src/nile-button-filter/nile-button-filter.test.d.ts +1 -0
- package/dist/src/nile-button-filter/nile-button-filter.test.js +108 -0
- package/dist/src/nile-button-filter/nile-button-filter.test.js.map +1 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.test.d.ts +1 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.test.js +108 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.test.js.map +1 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.d.ts +1 -1
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.js +105 -104
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.test.d.ts +0 -6
- package/dist/src/nile-calendar/nile-calendar.test.js +103 -318
- package/dist/src/nile-calendar/nile-calendar.test.js.map +1 -1
- package/dist/src/nile-card/nile-card.test.js +102 -66
- package/dist/src/nile-card/nile-card.test.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.test.js +547 -108
- package/dist/src/nile-checkbox/nile-checkbox.test.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.test.d.ts +0 -2
- package/dist/src/nile-chip/nile-chip.test.js +101 -102
- package/dist/src/nile-chip/nile-chip.test.js.map +1 -1
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.test.d.ts +1 -0
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.test.js +108 -0
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.test.js.map +1 -0
- package/dist/src/nile-date-picker/nile-date-picker.test.d.ts +1 -0
- package/dist/src/nile-date-picker/nile-date-picker.test.js +108 -0
- package/dist/src/nile-date-picker/nile-date-picker.test.js.map +1 -0
- package/dist/src/nile-dialog/nile-dialog.test.d.ts +0 -1
- package/dist/src/nile-dialog/nile-dialog.test.js +104 -126
- package/dist/src/nile-dialog/nile-dialog.test.js.map +1 -1
- package/dist/src/nile-divider/nile-divider.test.d.ts +1 -0
- package/dist/src/nile-divider/nile-divider.test.js +560 -0
- package/dist/src/nile-divider/nile-divider.test.js.map +1 -0
- package/dist/src/nile-drawer/nile-drawer.test.js +106 -86
- package/dist/src/nile-drawer/nile-drawer.test.js.map +1 -1
- package/dist/src/nile-dropdown/nile-dropdown.test.js +104 -148
- package/dist/src/nile-dropdown/nile-dropdown.test.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.test.js +107 -59
- package/dist/src/nile-empty-state/nile-empty-state.test.js.map +1 -1
- package/dist/src/nile-error-message/nile-error-message.test.js +105 -55
- package/dist/src/nile-error-message/nile-error-message.test.js.map +1 -1
- package/dist/src/nile-error-notification/nile-error-notification.test.d.ts +1 -0
- package/dist/src/nile-error-notification/nile-error-notification.test.js +108 -0
- package/dist/src/nile-error-notification/nile-error-notification.test.js.map +1 -0
- package/dist/src/nile-file-preview/nile-file-preview.css.js +2 -2
- package/dist/src/nile-file-preview/nile-file-preview.css.js.map +1 -1
- package/dist/src/nile-file-preview/nile-file-preview.d.ts +1 -4
- package/dist/src/nile-file-preview/nile-file-preview.js +21 -47
- package/dist/src/nile-file-preview/nile-file-preview.js.map +1 -1
- package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +6 -6
- package/dist/src/nile-file-preview/nile-file-preview.template.js +53 -23
- package/dist/src/nile-file-preview/nile-file-preview.template.js.map +1 -1
- package/dist/src/nile-file-preview/nile-file-preview.test.d.ts +0 -6
- package/dist/src/nile-file-preview/nile-file-preview.test.js +106 -28
- package/dist/src/nile-file-preview/nile-file-preview.test.js.map +1 -1
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.d.ts +3 -2
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.js +32 -7
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.js.map +1 -1
- package/dist/src/nile-file-upload/nile-file-upload.css.js +15 -5
- package/dist/src/nile-file-upload/nile-file-upload.css.js.map +1 -1
- package/dist/src/nile-file-upload/nile-file-upload.d.ts +4 -1
- package/dist/src/nile-file-upload/nile-file-upload.js +13 -1
- package/dist/src/nile-file-upload/nile-file-upload.js.map +1 -1
- package/dist/src/nile-file-upload/nile-file-upload.template.js +19 -15
- package/dist/src/nile-file-upload/nile-file-upload.template.js.map +1 -1
- package/dist/src/nile-file-upload/nile-file-upload.test.d.ts +0 -6
- package/dist/src/nile-file-upload/nile-file-upload.test.js +106 -28
- package/dist/src/nile-file-upload/nile-file-upload.test.js.map +1 -1
- package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +17 -3
- package/dist/src/nile-file-upload/types/file-upload.enums.js +17 -1
- package/dist/src/nile-file-upload/types/file-upload.enums.js.map +1 -1
- package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +2 -0
- package/dist/src/nile-file-upload/utils/drag-drop.util.js +14 -8
- package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +1 -1
- package/dist/src/nile-file-upload/utils/file-validation.util.js +89 -10
- package/dist/src/nile-file-upload/utils/file-validation.util.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.test.js +102 -77
- package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +1 -1
- package/dist/src/nile-form-error-message/nile-form-error-message.test.d.ts +1 -0
- package/dist/src/nile-form-error-message/nile-form-error-message.test.js +108 -0
- package/dist/src/nile-form-error-message/nile-form-error-message.test.js.map +1 -0
- package/dist/src/nile-form-group/nile-form-group.test.js +104 -51
- package/dist/src/nile-form-group/nile-form-group.test.js.map +1 -1
- package/dist/src/nile-form-help-text/nile-form-help-text.test.js +104 -84
- package/dist/src/nile-form-help-text/nile-form-help-text.test.js.map +1 -1
- package/dist/src/nile-format-date/nile-format-date.test.d.ts +1 -0
- package/dist/src/nile-format-date/nile-format-date.test.js +108 -0
- package/dist/src/nile-format-date/nile-format-date.test.js.map +1 -0
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.js +6 -5
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.js.map +1 -1
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.d.ts +14 -0
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.js +24 -0
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.js.map +1 -1
- package/dist/src/nile-grid/nile-grid.d.ts +1 -0
- package/dist/src/nile-grid/nile-grid.js +5 -1
- package/dist/src/nile-grid/nile-grid.js.map +1 -1
- package/dist/src/nile-grid/nile-grid.utils.d.ts +6 -0
- package/dist/src/nile-grid/nile-grid.utils.js +13 -0
- package/dist/src/nile-grid/nile-grid.utils.js.map +1 -1
- package/dist/src/nile-heading/nile-heading.test.d.ts +1 -0
- package/dist/src/nile-heading/nile-heading.test.js +108 -0
- package/dist/src/nile-heading/nile-heading.test.js.map +1 -0
- package/dist/src/nile-hero/nile-hero.test.js +101 -38
- package/dist/src/nile-hero/nile-hero.test.js.map +1 -1
- package/dist/src/nile-icon/nile-icon.test.js +103 -40
- package/dist/src/nile-icon/nile-icon.test.js.map +1 -1
- package/dist/src/nile-icon-button/nile-icon-button.test.d.ts +1 -0
- package/dist/src/nile-icon-button/nile-icon-button.test.js +568 -0
- package/dist/src/nile-icon-button/nile-icon-button.test.js.map +1 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.test.d.ts +1 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.test.js +108 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.test.js.map +1 -0
- package/dist/src/nile-input/nile-input.js +1 -1
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-input/nile-input.test.js +109 -139
- package/dist/src/nile-input/nile-input.test.js.map +1 -1
- package/dist/src/nile-link/nile-link.test.js +103 -67
- package/dist/src/nile-link/nile-link.test.js.map +1 -1
- package/dist/src/nile-list/nile-list.test.d.ts +1 -0
- package/dist/src/nile-list/nile-list.test.js +108 -0
- package/dist/src/nile-list/nile-list.test.js.map +1 -0
- package/dist/src/nile-list-item/nile-list-item.test.d.ts +1 -0
- package/dist/src/nile-list-item/nile-list-item.test.js +108 -0
- package/dist/src/nile-list-item/nile-list-item.test.js.map +1 -0
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.test.d.ts +2 -0
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.test.js +109 -0
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.test.js.map +1 -0
- package/dist/src/nile-loader/nile-loader.test.js +107 -40
- package/dist/src/nile-loader/nile-loader.test.js.map +1 -1
- package/dist/src/nile-menu/nile-menu.test.d.ts +1 -0
- package/dist/src/nile-menu/nile-menu.test.js +113 -0
- package/dist/src/nile-menu/nile-menu.test.js.map +1 -0
- package/dist/src/nile-menu-item/nile-menu-item.test.d.ts +1 -0
- package/dist/src/nile-menu-item/nile-menu-item.test.js +113 -0
- package/dist/src/nile-menu-item/nile-menu-item.test.js.map +1 -0
- package/dist/src/nile-option/nile-option.test.d.ts +1 -0
- package/dist/src/nile-option/nile-option.test.js +108 -0
- package/dist/src/nile-option/nile-option.test.js.map +1 -0
- package/dist/src/nile-option-group/nile-option-group.test.d.ts +1 -0
- package/dist/src/nile-option-group/nile-option-group.test.js +108 -0
- package/dist/src/nile-option-group/nile-option-group.test.js.map +1 -0
- package/dist/src/nile-page-header/nile-page-header.test.d.ts +1 -0
- package/dist/src/nile-page-header/nile-page-header.test.js +108 -0
- package/dist/src/nile-page-header/nile-page-header.test.js.map +1 -0
- package/dist/src/nile-pagination/nile-pagination.test.d.ts +1 -0
- package/dist/src/nile-pagination/nile-pagination.test.js +108 -0
- package/dist/src/nile-pagination/nile-pagination.test.js.map +1 -0
- package/dist/src/nile-popover/nile-popover.test.js +103 -68
- package/dist/src/nile-popover/nile-popover.test.js.map +1 -1
- package/dist/src/nile-popup/nile-popup.test.js +104 -65
- package/dist/src/nile-popup/nile-popup.test.js.map +1 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.test.js +104 -44
- package/dist/src/nile-progress-bar/nile-progress-bar.test.js.map +1 -1
- package/dist/src/nile-radio/nile-radio.test.js +103 -66
- package/dist/src/nile-radio/nile-radio.test.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.test.d.ts +0 -1
- package/dist/src/nile-radio-group/nile-radio-group.test.js +105 -171
- package/dist/src/nile-radio-group/nile-radio-group.test.js.map +1 -1
- package/dist/src/nile-section-message/nile-section-message.test.d.ts +1 -0
- package/dist/src/nile-section-message/nile-section-message.test.js +108 -0
- package/dist/src/nile-section-message/nile-section-message.test.js.map +1 -0
- package/dist/src/nile-select/nile-select.test.d.ts +0 -5
- package/dist/src/nile-select/nile-select.test.js +105 -244
- package/dist/src/nile-select/nile-select.test.js.map +1 -1
- package/dist/src/nile-skeleton-loader/nile-skeleton-loader.test.d.ts +1 -0
- package/dist/src/nile-skeleton-loader/nile-skeleton-loader.test.js +108 -0
- package/dist/src/nile-skeleton-loader/nile-skeleton-loader.test.js.map +1 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.test.js +104 -50
- package/dist/src/nile-slide-toggle/nile-slide-toggle.test.js.map +1 -1
- package/dist/src/nile-slider/nile-slider.test.d.ts +1 -0
- package/dist/src/nile-slider/nile-slider.test.js +108 -0
- package/dist/src/nile-slider/nile-slider.test.js.map +1 -0
- package/dist/src/nile-spinner/nile-spinner.test.d.ts +1 -0
- package/dist/src/nile-spinner/nile-spinner.test.js +569 -0
- package/dist/src/nile-spinner/nile-spinner.test.js.map +1 -0
- package/dist/src/nile-split-panel/nile-split-panel.test.d.ts +1 -0
- package/dist/src/nile-split-panel/nile-split-panel.test.js +108 -0
- package/dist/src/nile-split-panel/nile-split-panel.test.js.map +1 -0
- package/dist/src/nile-stepper/nile-stepper.test.d.ts +2 -0
- package/dist/src/nile-stepper/nile-stepper.test.js +109 -0
- package/dist/src/nile-stepper/nile-stepper.test.js.map +1 -0
- package/dist/src/nile-stepper-item/nile-stepper-item.test.d.ts +1 -0
- package/dist/src/nile-stepper-item/nile-stepper-item.test.js +108 -0
- package/dist/src/nile-stepper-item/nile-stepper-item.test.js.map +1 -0
- package/dist/src/nile-tab/nile-tab.test.d.ts +1 -0
- package/dist/src/nile-tab/nile-tab.test.js +108 -0
- package/dist/src/nile-tab/nile-tab.test.js.map +1 -0
- package/dist/src/nile-tab-group/nile-tab-group.test.js +105 -172
- package/dist/src/nile-tab-group/nile-tab-group.test.js.map +1 -1
- package/dist/src/nile-tab-panel/nile-tab-panel.test.d.ts +1 -0
- package/dist/src/nile-tab-panel/nile-tab-panel.test.js +108 -0
- package/dist/src/nile-tab-panel/nile-tab-panel.test.js.map +1 -0
- package/dist/src/nile-tag/nile-tag.test.d.ts +1 -0
- package/dist/src/nile-tag/nile-tag.test.js +574 -0
- package/dist/src/nile-tag/nile-tag.test.js.map +1 -0
- package/dist/src/nile-textarea/nile-textarea.test.d.ts +1 -1
- package/dist/src/nile-textarea/nile-textarea.test.js +105 -84
- package/dist/src/nile-textarea/nile-textarea.test.js.map +1 -1
- package/dist/src/nile-title/nile-title.test.d.ts +1 -0
- package/dist/src/nile-title/nile-title.test.js +108 -0
- package/dist/src/nile-title/nile-title.test.js.map +1 -0
- package/dist/src/nile-toast/nile-toast.test.d.ts +1 -0
- package/dist/src/nile-toast/nile-toast.test.js +526 -0
- package/dist/src/nile-toast/nile-toast.test.js.map +1 -0
- package/dist/src/nile-toolbar/nile-toolbar.test.d.ts +1 -0
- package/dist/src/nile-toolbar/nile-toolbar.test.js +108 -0
- package/dist/src/nile-toolbar/nile-toolbar.test.js.map +1 -0
- package/dist/src/nile-tooltip/nile-tooltip.test.d.ts +1 -0
- package/dist/src/nile-tooltip/nile-tooltip.test.js +546 -0
- package/dist/src/nile-tooltip/nile-tooltip.test.js.map +1 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.test.d.ts +1 -7
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js +105 -628
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/rollup.config.js +7 -1
- package/src/nile-accordion/nile-accordian.test.ts +102 -116
- package/src/nile-auto-complete/nile-auto-complete.css.ts +1 -1
- package/src/nile-auto-complete/nile-auto-complete.test.ts +102 -145
- package/src/nile-auto-complete/nile-auto-complete.ts +1 -1
- package/src/nile-avatar/nile-avatar.test.ts +102 -112
- package/src/nile-badge/nile-badge.test.ts +642 -30
- package/src/nile-breadcrumb/nile-breadcrumb.test.ts +107 -0
- package/src/nile-breadcrumb-item/nile-breadcrumb-item.test.ts +106 -0
- package/src/nile-button/nile-button.test.ts +593 -61
- package/src/nile-button-filter/nile-button-filter.test.ts +106 -0
- package/src/nile-button-toggle/nile-button-toggle.test.ts +106 -0
- package/src/nile-button-toggle-group/nile-button-toggle-group.test.ts +104 -126
- package/src/nile-calendar/nile-calendar.test.ts +102 -406
- package/src/nile-card/nile-card.test.ts +103 -71
- package/src/nile-checkbox/nile-checkbox.test.ts +614 -108
- package/src/nile-chip/nile-chip.test.ts +102 -136
- package/src/nile-circular-progressbar/nile-circular-progressbar.test.ts +106 -0
- package/src/nile-date-picker/nile-date-picker.test.ts +106 -0
- package/src/nile-dialog/nile-dialog.test.ts +102 -164
- package/src/nile-divider/nile-divider.test.ts +659 -0
- package/src/nile-drawer/nile-drawer.test.ts +105 -105
- package/src/nile-dropdown/nile-dropdown.test.ts +102 -190
- package/src/nile-empty-state/nile-empty-state.test.ts +104 -67
- package/src/nile-error-message/nile-error-message.test.ts +104 -67
- package/src/nile-error-notification/nile-error-notification.test.ts +106 -0
- package/src/nile-file-preview/nile-file-preview.css.ts +2 -2
- package/src/nile-file-preview/nile-file-preview.template.ts +59 -23
- package/src/nile-file-preview/nile-file-preview.test.ts +105 -37
- package/src/nile-file-preview/nile-file-preview.ts +23 -56
- package/src/nile-file-preview/utils/nile-file-preview.util.ts +37 -8
- package/src/nile-file-upload/nile-file-upload.css.ts +15 -5
- package/src/nile-file-upload/nile-file-upload.template.ts +22 -18
- package/src/nile-file-upload/nile-file-upload.test.ts +105 -37
- package/src/nile-file-upload/nile-file-upload.ts +11 -3
- package/src/nile-file-upload/types/file-upload.enums.ts +20 -4
- package/src/nile-file-upload/utils/drag-drop.util.ts +20 -11
- package/src/nile-file-upload/utils/file-validation.util.ts +104 -22
- package/src/nile-filter-chip/nile-filter-chip.test.ts +103 -89
- package/src/nile-form-error-message/nile-form-error-message.test.ts +106 -0
- package/src/nile-form-group/nile-form-group.test.ts +103 -60
- package/src/nile-form-help-text/nile-form-help-text.test.ts +102 -106
- package/src/nile-format-date/nile-format-date.test.ts +106 -0
- package/src/nile-grid/nile-grid-head-item/nile-grid-head-item.ts +7 -5
- package/src/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.ts +28 -0
- package/src/nile-grid/nile-grid.ts +6 -1
- package/src/nile-grid/nile-grid.utils.ts +18 -1
- package/src/nile-heading/nile-heading.test.ts +106 -0
- package/src/nile-hero/nile-hero.test.ts +103 -42
- package/src/nile-icon/nile-icon.test.ts +103 -50
- package/src/nile-icon-button/nile-icon-button.test.ts +667 -0
- package/src/nile-inline-edit/nile-inline-edit.test.ts +106 -0
- package/src/nile-input/nile-input.test.ts +105 -164
- package/src/nile-input/nile-input.ts +1 -1
- package/src/nile-link/nile-link.test.ts +104 -81
- package/src/nile-list/nile-list.test.ts +106 -0
- package/src/nile-list-item/nile-list-item.test.ts +106 -0
- package/src/nile-lite-tooltip/nile-lite-tooltip.test.ts +107 -0
- package/src/nile-loader/nile-loader.test.ts +103 -48
- package/src/nile-menu/nile-menu.test.ts +106 -0
- package/src/nile-menu-item/nile-menu-item.test.ts +106 -0
- package/src/nile-option/nile-option.test.ts +106 -0
- package/src/nile-option-group/nile-option-group.test.ts +106 -0
- package/src/nile-page-header/nile-page-header.test.ts +106 -0
- package/src/nile-pagination/nile-pagination.test.ts +106 -0
- package/src/nile-popover/nile-popover.test.ts +103 -83
- package/src/nile-popup/nile-popup.test.ts +102 -82
- package/src/nile-progress-bar/nile-progress-bar.test.ts +103 -52
- package/src/nile-radio/nile-radio.test.ts +103 -78
- package/src/nile-radio-group/nile-radio-group.test.ts +104 -213
- package/src/nile-section-message/nile-section-message.test.ts +106 -0
- package/src/nile-select/nile-select.test.ts +105 -308
- package/src/nile-skeleton-loader/nile-skeleton-loader.test.ts +106 -0
- package/src/nile-slide-toggle/nile-slide-toggle.test.ts +103 -58
- package/src/nile-slider/nile-slider.test.ts +106 -0
- package/src/nile-spinner/nile-spinner.test.ts +668 -0
- package/src/nile-split-panel/nile-split-panel.test.ts +106 -0
- package/src/nile-stepper/nile-stepper.test.ts +107 -0
- package/src/nile-stepper-item/nile-stepper-item.test.ts +106 -0
- package/src/nile-tab/nile-tab.test.ts +106 -0
- package/src/nile-tab-group/nile-tab-group.test.ts +104 -211
- package/src/nile-tab-panel/nile-tab-panel.test.ts +106 -0
- package/src/nile-tag/nile-tag.test.ts +675 -0
- package/src/nile-textarea/nile-textarea.test.ts +104 -100
- package/src/nile-title/nile-title.test.ts +106 -0
- package/src/nile-toast/nile-toast.test.ts +625 -0
- package/src/nile-toolbar/nile-toolbar.test.ts +106 -0
- package/src/nile-tooltip/nile-tooltip.test.ts +645 -0
- package/src/nile-virtual-select/nile-virtual-select.test.ts +104 -772
- package/vscode-html-custom-data.json +8 -3
- package/web-test-runner.config.mjs +4 -2
- package/dist/axe.min-2720cd56.esm.js +0 -1
- package/dist/axe.min-69d47269.cjs.js +0 -2
- package/dist/axe.min-69d47269.cjs.js.map +0 -1
- package/dist/css-tag-bb10c0fa.cjs.js +0 -6
- package/dist/css-tag-bb10c0fa.cjs.js.map +0 -1
- package/dist/css-tag-dc564feb.esm.js +0 -6
- package/dist/fixture-958445f8.cjs.js +0 -395
- package/dist/fixture-958445f8.cjs.js.map +0 -1
- package/dist/fixture-985bba12.esm.js +0 -569
- package/dist/nile-accordion/nile-accordian.test.cjs.js +0 -2
- package/dist/nile-accordion/nile-accordian.test.cjs.js.map +0 -1
- package/dist/nile-accordion/nile-accordian.test.esm.js +0 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +0 -2
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +0 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +0 -9
- package/dist/nile-avatar/nile-avatar.test.cjs.js +0 -2
- package/dist/nile-avatar/nile-avatar.test.cjs.js.map +0 -1
- package/dist/nile-avatar/nile-avatar.test.esm.js +0 -11
- package/dist/nile-badge/nile-badge.test.cjs.js +0 -2
- package/dist/nile-badge/nile-badge.test.cjs.js.map +0 -1
- package/dist/nile-badge/nile-badge.test.esm.js +0 -1
- package/dist/nile-button/nile-button.test.cjs.js +0 -2
- package/dist/nile-button/nile-button.test.cjs.js.map +0 -1
- package/dist/nile-button/nile-button.test.esm.js +0 -4
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +0 -2
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js.map +0 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +0 -49
- package/dist/nile-calendar/nile-calendar.test.cjs.js +0 -2
- package/dist/nile-calendar/nile-calendar.test.cjs.js.map +0 -1
- package/dist/nile-calendar/nile-calendar.test.esm.js +0 -11
- package/dist/nile-card/nile-card.test.cjs.js +0 -2
- package/dist/nile-card/nile-card.test.cjs.js.map +0 -1
- package/dist/nile-card/nile-card.test.esm.js +0 -51
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js +0 -2
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js.map +0 -1
- package/dist/nile-checkbox/nile-checkbox.test.esm.js +0 -17
- package/dist/nile-chip/nile-chip.test.cjs.js +0 -2
- package/dist/nile-chip/nile-chip.test.cjs.js.map +0 -1
- package/dist/nile-chip/nile-chip.test.esm.js +0 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js +0 -2
- package/dist/nile-dialog/nile-dialog.test.cjs.js.map +0 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +0 -7
- package/dist/nile-drawer/nile-drawer.test.cjs.js +0 -2
- package/dist/nile-drawer/nile-drawer.test.cjs.js.map +0 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +0 -17
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js +0 -2
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js.map +0 -1
- package/dist/nile-dropdown/nile-dropdown.test.esm.js +0 -28
- package/dist/nile-empty-state/nile-empty-state.test.cjs.js +0 -2
- package/dist/nile-empty-state/nile-empty-state.test.cjs.js.map +0 -1
- package/dist/nile-empty-state/nile-empty-state.test.esm.js +0 -9
- package/dist/nile-error-message/nile-error-message.test.cjs.js +0 -2
- package/dist/nile-error-message/nile-error-message.test.cjs.js.map +0 -1
- package/dist/nile-error-message/nile-error-message.test.esm.js +0 -1
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js +0 -2
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js.map +0 -1
- package/dist/nile-file-preview/nile-file-preview.test.esm.js +0 -1
- package/dist/nile-file-upload/nile-file-upload.test.cjs.js +0 -2
- package/dist/nile-file-upload/nile-file-upload.test.cjs.js.map +0 -1
- package/dist/nile-file-upload/nile-file-upload.test.esm.js +0 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +0 -2
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +0 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +0 -20
- package/dist/nile-form-group/nile-form-group.test.cjs.js +0 -2
- package/dist/nile-form-group/nile-form-group.test.cjs.js.map +0 -1
- package/dist/nile-form-group/nile-form-group.test.esm.js +0 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +0 -2
- package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js.map +0 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +0 -1
- package/dist/nile-hero/nile-hero.test.cjs.js +0 -2
- package/dist/nile-hero/nile-hero.test.cjs.js.map +0 -1
- package/dist/nile-hero/nile-hero.test.esm.js +0 -14
- package/dist/nile-icon/nile-icon.test.cjs.js +0 -2
- package/dist/nile-icon/nile-icon.test.cjs.js.map +0 -1
- package/dist/nile-icon/nile-icon.test.esm.js +0 -1
- package/dist/nile-input/nile-input.test.cjs.js +0 -2
- package/dist/nile-input/nile-input.test.cjs.js.map +0 -1
- package/dist/nile-input/nile-input.test.esm.js +0 -17
- package/dist/nile-link/nile-link.test.cjs.js +0 -2
- package/dist/nile-link/nile-link.test.cjs.js.map +0 -1
- package/dist/nile-link/nile-link.test.esm.js +0 -1
- package/dist/nile-loader/nile-loader.test.cjs.js +0 -2
- package/dist/nile-loader/nile-loader.test.cjs.js.map +0 -1
- package/dist/nile-loader/nile-loader.test.esm.js +0 -1
- package/dist/nile-popover/nile-popover.test.cjs.js +0 -2
- package/dist/nile-popover/nile-popover.test.cjs.js.map +0 -1
- package/dist/nile-popover/nile-popover.test.esm.js +0 -21
- package/dist/nile-popup/nile-popup.test.cjs.js +0 -2
- package/dist/nile-popup/nile-popup.test.cjs.js.map +0 -1
- package/dist/nile-popup/nile-popup.test.esm.js +0 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +0 -2
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js.map +0 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +0 -1
- package/dist/nile-radio/nile-radio.test.cjs.js +0 -2
- package/dist/nile-radio/nile-radio.test.cjs.js.map +0 -1
- package/dist/nile-radio/nile-radio.test.esm.js +0 -1
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js +0 -2
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js.map +0 -1
- package/dist/nile-radio-group/nile-radio-group.test.esm.js +0 -57
- package/dist/nile-select/nile-select.test.cjs.js +0 -2
- package/dist/nile-select/nile-select.test.cjs.js.map +0 -1
- package/dist/nile-select/nile-select.test.esm.js +0 -55
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +0 -2
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js.map +0 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +0 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js +0 -2
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js.map +0 -1
- package/dist/nile-tab-group/nile-tab-group.test.esm.js +0 -65
- package/dist/nile-textarea/nile-textarea.test.cjs.js +0 -2
- package/dist/nile-textarea/nile-textarea.test.cjs.js.map +0 -1
- package/dist/nile-textarea/nile-textarea.test.esm.js +0 -1
- package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +0 -2
- package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js.map +0 -1
- package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +0 -93
- package/dist/scopedElementsWrapper-31107e48.esm.js +0 -1
- package/dist/scopedElementsWrapper-9b188ea6.cjs.js +0 -2
- package/dist/scopedElementsWrapper-9b188ea6.cjs.js.map +0 -1
- package/dist/sinon-esm-68c8e378.esm.js +0 -1
- package/dist/sinon-esm-97570c13.cjs.js +0 -2
- package/dist/sinon-esm-97570c13.cjs.js.map +0 -1
|
@@ -1,631 +1,108 @@
|
|
|
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
1
|
import { expect, fixture, html } from '@open-wc/testing';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
it('should render options with proper CSS classes for width', async () => {
|
|
114
|
-
const el = await fixture(html `
|
|
115
|
-
<nile-virtual-select>
|
|
116
|
-
<div slot="label">Test Select</div>
|
|
117
|
-
</nile-virtual-select>
|
|
118
|
-
`);
|
|
119
|
-
// Set up test data
|
|
120
|
-
el.data = [
|
|
121
|
-
{ value: 'option-1', label: 'Option 1' },
|
|
122
|
-
{ value: 'option-2', label: 'Option 2' }
|
|
123
|
-
];
|
|
124
|
-
el.renderItemConfig = {
|
|
125
|
-
getDisplayText: (item) => item.label
|
|
126
|
-
};
|
|
127
|
-
// Open the select to render options
|
|
128
|
-
el.open = true;
|
|
129
|
-
await el.updateComplete;
|
|
130
|
-
// Check that the virtualized container has the proper class
|
|
131
|
-
const virtualized = el.shadowRoot?.querySelector('.virtualized');
|
|
132
|
-
expect(virtualized).to.exist;
|
|
133
|
-
// Check that the select__options container exists and has proper styling
|
|
134
|
-
const selectOptions = el.shadowRoot?.querySelector('.select__options');
|
|
135
|
-
expect(selectOptions).to.exist;
|
|
136
|
-
// Check that the virtualizer element exists and has proper width styling
|
|
137
|
-
const virtualizer = el.shadowRoot?.querySelector('lit-virtualizer');
|
|
138
|
-
expect(virtualizer).to.exist;
|
|
139
|
-
});
|
|
140
|
-
it('should render virtualized options with full width structure', async () => {
|
|
141
|
-
const el = await fixture(html `
|
|
142
|
-
<nile-virtual-select>
|
|
143
|
-
<div slot="label">Test Select</div>
|
|
144
|
-
</nile-virtual-select>
|
|
145
|
-
`);
|
|
146
|
-
// Set up test data
|
|
147
|
-
el.data = [
|
|
148
|
-
{ value: 'option-1', label: 'Option 1' },
|
|
149
|
-
{ value: 'option-2', label: 'Option 2' },
|
|
150
|
-
{ value: 'option-3', label: 'Option 3' }
|
|
151
|
-
];
|
|
152
|
-
el.renderItemConfig = {
|
|
153
|
-
getDisplayText: (item) => item.label
|
|
154
|
-
};
|
|
155
|
-
// Open the select to render options
|
|
156
|
-
el.open = true;
|
|
157
|
-
await el.updateComplete;
|
|
158
|
-
// Verify the complete structure matches the regular select
|
|
159
|
-
const listbox = el.shadowRoot?.querySelector('.select__listbox');
|
|
160
|
-
expect(listbox).to.exist;
|
|
161
|
-
const selectOptions = listbox?.querySelector('.select__options');
|
|
162
|
-
expect(selectOptions).to.exist;
|
|
163
|
-
const virtualized = selectOptions?.querySelector('.virtualized');
|
|
164
|
-
expect(virtualized).to.exist;
|
|
165
|
-
// Check that the structure is properly nested
|
|
166
|
-
expect(listbox?.contains(selectOptions || null)).to.be.true;
|
|
167
|
-
expect(selectOptions?.contains(virtualized || null)).to.be.true;
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
describe('selected options highlighting', () => {
|
|
171
|
-
it('should highlight selected options with red border in single select mode', async () => {
|
|
172
|
-
const el = await fixture(html `
|
|
173
|
-
<nile-virtual-select>
|
|
174
|
-
<div slot="label">Test Select</div>
|
|
175
|
-
</nile-virtual-select>
|
|
176
|
-
`);
|
|
177
|
-
// Set up test data
|
|
178
|
-
el.data = [
|
|
179
|
-
{ value: 'option-1', label: 'Option 1' },
|
|
180
|
-
{ value: 'option-2', label: 'Option 2' },
|
|
181
|
-
{ value: 'option-3', label: 'Option 3' }
|
|
182
|
-
];
|
|
183
|
-
el.renderItemConfig = {
|
|
184
|
-
getDisplayText: (item) => item.label
|
|
185
|
-
};
|
|
186
|
-
// Set a selected value
|
|
187
|
-
el.value = 'option-2';
|
|
188
|
-
// Open the select to render options
|
|
189
|
-
el.open = true;
|
|
190
|
-
await el.updateComplete;
|
|
191
|
-
// Check that the selected option has the selected attribute
|
|
192
|
-
const selectedOption = el.shadowRoot?.querySelector('nile-option[selected]');
|
|
193
|
-
expect(selectedOption).to.exist;
|
|
194
|
-
expect(selectedOption?.getAttribute('value')).to.equal('option-2');
|
|
195
|
-
});
|
|
196
|
-
it('should highlight selected options with red border in multiple select mode', async () => {
|
|
197
|
-
const el = await fixture(html `
|
|
198
|
-
<nile-virtual-select multiple>
|
|
199
|
-
<div slot="label">Test Select</div>
|
|
200
|
-
</nile-virtual-select>
|
|
201
|
-
`);
|
|
202
|
-
// Set up test data
|
|
203
|
-
el.data = [
|
|
204
|
-
{ value: 'option-1', label: 'Option 1' },
|
|
205
|
-
{ value: 'option-2', label: 'Option 2' },
|
|
206
|
-
{ value: 'option-3', label: 'Option 3' }
|
|
207
|
-
];
|
|
208
|
-
el.renderItemConfig = {
|
|
209
|
-
getDisplayText: (item) => item.label
|
|
210
|
-
};
|
|
211
|
-
// Set multiple selected values
|
|
212
|
-
el.value = ['option-1', 'option-3'];
|
|
213
|
-
// Open the select to render options
|
|
214
|
-
el.open = true;
|
|
215
|
-
await el.updateComplete;
|
|
216
|
-
// Check that the selected options have the selected attribute
|
|
217
|
-
const selectedOptions = el.shadowRoot?.querySelectorAll('nile-option[selected]');
|
|
218
|
-
expect(selectedOptions?.length).to.equal(2);
|
|
219
|
-
const selectedValues = Array.from(selectedOptions || []).map(option => option.getAttribute('value'));
|
|
220
|
-
expect(selectedValues).to.include('option-1');
|
|
221
|
-
expect(selectedValues).to.include('option-3');
|
|
222
|
-
});
|
|
223
|
-
it('should not highlight unselected options', async () => {
|
|
224
|
-
const el = await fixture(html `
|
|
225
|
-
<nile-virtual-select>
|
|
226
|
-
<div slot="label">Test Select</div>
|
|
227
|
-
</nile-virtual-select>
|
|
228
|
-
`);
|
|
229
|
-
// Set up test data
|
|
230
|
-
el.data = [
|
|
231
|
-
{ value: 'option-1', label: 'Option 1' },
|
|
232
|
-
{ value: 'option-2', label: 'Option 2' },
|
|
233
|
-
{ value: 'option-3', label: 'Option 3' }
|
|
234
|
-
];
|
|
235
|
-
el.renderItemConfig = {
|
|
236
|
-
getDisplayText: (item) => item.label
|
|
237
|
-
};
|
|
238
|
-
// Set a selected value
|
|
239
|
-
el.value = 'option-2';
|
|
240
|
-
// Open the select to render options
|
|
241
|
-
el.open = true;
|
|
242
|
-
await el.updateComplete;
|
|
243
|
-
// Check that unselected options don't have the selected attribute
|
|
244
|
-
const unselectedOption = el.shadowRoot?.querySelector('nile-option[value="option-1"]');
|
|
245
|
-
expect(unselectedOption).to.exist;
|
|
246
|
-
expect(unselectedOption?.hasAttribute('selected')).to.be.false;
|
|
247
|
-
});
|
|
248
|
-
it('should show tags for pre-selected values when data is set after value', async () => {
|
|
249
|
-
const el = await fixture(html `
|
|
250
|
-
<nile-virtual-select multiple>
|
|
251
|
-
<div slot="label">Test Select</div>
|
|
252
|
-
</nile-virtual-select>
|
|
253
|
-
`);
|
|
254
|
-
// Set renderItemFunction first
|
|
255
|
-
el.renderItemConfig = {
|
|
256
|
-
getDisplayText: (item) => item.label
|
|
257
|
-
};
|
|
258
|
-
// Set value before data
|
|
259
|
-
el.value = ['option-1', 'option-3'];
|
|
260
|
-
await el.updateComplete;
|
|
261
|
-
// Initially, no tags should be shown because data is empty
|
|
262
|
-
const initialTags = el.shadowRoot?.querySelectorAll('nile-tag');
|
|
263
|
-
expect(initialTags?.length).to.equal(0);
|
|
264
|
-
// Now set data
|
|
265
|
-
el.data = [
|
|
266
|
-
{ value: 'option-1', label: 'Option 1' },
|
|
267
|
-
{ value: 'option-2', label: 'Option 2' },
|
|
268
|
-
{ value: 'option-3', label: 'Option 3' }
|
|
269
|
-
];
|
|
270
|
-
await el.updateComplete;
|
|
271
|
-
// Now tags should be shown
|
|
272
|
-
const tags = el.shadowRoot?.querySelectorAll('nile-tag');
|
|
273
|
-
expect(tags?.length).to.equal(2);
|
|
274
|
-
const tagTexts = Array.from(tags || []).map(tag => tag.textContent?.trim());
|
|
275
|
-
expect(tagTexts).to.include('Option 1');
|
|
276
|
-
expect(tagTexts).to.include('Option 3');
|
|
277
|
-
});
|
|
278
|
-
it('should show tags immediately without opening dropdown', async () => {
|
|
279
|
-
const el = await fixture(html `
|
|
280
|
-
<nile-virtual-select multiple>
|
|
281
|
-
<div slot="label">Test Select</div>
|
|
282
|
-
</nile-virtual-select>
|
|
283
|
-
`);
|
|
284
|
-
// Set up test data
|
|
285
|
-
el.renderItemConfig = {
|
|
286
|
-
getDisplayText: (item) => item.label
|
|
287
|
-
};
|
|
288
|
-
el.data = [
|
|
289
|
-
{ value: 'option-1', label: 'Option 1' },
|
|
290
|
-
{ value: 'option-2', label: 'Option 2' },
|
|
291
|
-
{ value: 'option-3', label: 'Option 3' }
|
|
292
|
-
];
|
|
293
|
-
el.value = ['option-1', 'option-3'];
|
|
294
|
-
await el.updateComplete;
|
|
295
|
-
// Ensure dropdown is closed
|
|
296
|
-
el.open = false;
|
|
297
|
-
await el.updateComplete;
|
|
298
|
-
// Check that tags are shown even when dropdown is closed
|
|
299
|
-
const tags = el.shadowRoot?.querySelectorAll('nile-tag');
|
|
300
|
-
expect(tags?.length).to.equal(2);
|
|
301
|
-
const tagTexts = Array.from(tags || []).map(tag => tag.textContent?.trim());
|
|
302
|
-
expect(tagTexts).to.include('Option 1');
|
|
303
|
-
expect(tagTexts).to.include('Option 3');
|
|
304
|
-
});
|
|
305
|
-
it('should show checkbox as checked for selected options in multiple mode', async () => {
|
|
306
|
-
const el = await fixture(html `
|
|
307
|
-
<nile-virtual-select multiple>
|
|
308
|
-
<div slot="label">Test Select</div>
|
|
309
|
-
</nile-virtual-select>
|
|
310
|
-
`);
|
|
311
|
-
// Set up test data
|
|
312
|
-
el.renderItemConfig = {
|
|
313
|
-
getDisplayText: (item) => item.label
|
|
314
|
-
};
|
|
315
|
-
el.data = [
|
|
316
|
-
{ value: 'option-1', label: 'Option 1' },
|
|
317
|
-
{ value: 'option-2', label: 'Option 2' },
|
|
318
|
-
{ value: 'option-3', label: 'Option 3' }
|
|
319
|
-
];
|
|
320
|
-
el.value = ['option-1', 'option-3'];
|
|
321
|
-
// Open the select to render options
|
|
322
|
-
el.open = true;
|
|
323
|
-
await el.updateComplete;
|
|
324
|
-
// Check that selected options have checked checkboxes
|
|
325
|
-
const selectedOptions = el.shadowRoot?.querySelectorAll('nile-option[selected]');
|
|
326
|
-
expect(selectedOptions?.length).to.equal(2);
|
|
327
|
-
selectedOptions?.forEach(option => {
|
|
328
|
-
const checkbox = option.shadowRoot?.querySelector('nile-checkbox');
|
|
329
|
-
expect(checkbox).to.exist;
|
|
330
|
-
expect(checkbox?.checked).to.be.true;
|
|
331
|
-
});
|
|
332
|
-
// Check that unselected options have unchecked checkboxes
|
|
333
|
-
const unselectedOption = el.shadowRoot?.querySelector('nile-option[value="option-2"]');
|
|
334
|
-
expect(unselectedOption).to.exist;
|
|
335
|
-
const unselectedCheckbox = unselectedOption?.shadowRoot?.querySelector('nile-checkbox');
|
|
336
|
-
expect(unselectedCheckbox).to.exist;
|
|
337
|
-
expect(unselectedCheckbox?.checked).to.be.false;
|
|
338
|
-
});
|
|
339
|
-
});
|
|
340
|
-
describe('no results message functionality', () => {
|
|
341
|
-
it('should show no results message when data is empty and not loading', async () => {
|
|
342
|
-
const el = await fixture(html `
|
|
343
|
-
<nile-virtual-select>
|
|
344
|
-
<div slot="label">Test Select</div>
|
|
345
|
-
</nile-virtual-select>
|
|
346
|
-
`);
|
|
347
|
-
// Set empty data and not loading
|
|
348
|
-
el.data = [];
|
|
349
|
-
el.optionsLoading = false;
|
|
350
|
-
el.open = true;
|
|
351
|
-
await el.updateComplete;
|
|
352
|
-
// Check that no results message is shown
|
|
353
|
-
const noResultsMessage = el.shadowRoot?.querySelector('.select__no-results');
|
|
354
|
-
expect(noResultsMessage).to.exist;
|
|
355
|
-
expect(noResultsMessage?.textContent?.trim()).to.equal('No results found');
|
|
356
|
-
});
|
|
357
|
-
it('should show custom no results message when provided', async () => {
|
|
358
|
-
const el = await fixture(html `
|
|
359
|
-
<nile-virtual-select no-results-message="No data available">
|
|
360
|
-
<div slot="label">Test Select</div>
|
|
361
|
-
</nile-virtual-select>
|
|
362
|
-
`);
|
|
363
|
-
// Set empty data and not loading
|
|
364
|
-
el.data = [];
|
|
365
|
-
el.optionsLoading = false;
|
|
366
|
-
el.open = true;
|
|
367
|
-
await el.updateComplete;
|
|
368
|
-
// Check that custom no results message is shown
|
|
369
|
-
const noResultsMessage = el.shadowRoot?.querySelector('.select__no-results');
|
|
370
|
-
expect(noResultsMessage).to.exist;
|
|
371
|
-
expect(noResultsMessage?.textContent?.trim()).to.equal('No data available');
|
|
372
|
-
});
|
|
373
|
-
it('should not show no results message when loading', async () => {
|
|
374
|
-
const el = await fixture(html `
|
|
375
|
-
<nile-virtual-select>
|
|
376
|
-
<div slot="label">Test Select</div>
|
|
377
|
-
</nile-virtual-select>
|
|
378
|
-
`);
|
|
379
|
-
// Set empty data but loading
|
|
380
|
-
el.data = [];
|
|
381
|
-
el.optionsLoading = true;
|
|
382
|
-
el.open = true;
|
|
383
|
-
await el.updateComplete;
|
|
384
|
-
// Check that no results message is not shown when loading
|
|
385
|
-
const noResultsMessage = el.shadowRoot?.querySelector('.select__no-results');
|
|
386
|
-
expect(noResultsMessage).to.not.exist;
|
|
387
|
-
});
|
|
388
|
-
it('should show no results message when search returns no results', async () => {
|
|
389
|
-
const el = await fixture(html `
|
|
390
|
-
<nile-virtual-select search-enabled>
|
|
391
|
-
<div slot="label">Test Select</div>
|
|
392
|
-
</nile-virtual-select>
|
|
393
|
-
`);
|
|
394
|
-
// Set up test data
|
|
395
|
-
el.data = [
|
|
396
|
-
{ value: 'option-1', label: 'Apple' },
|
|
397
|
-
{ value: 'option-2', label: 'Banana' },
|
|
398
|
-
{ value: 'option-3', label: 'Cherry' }
|
|
399
|
-
];
|
|
400
|
-
el.renderItemConfig = {
|
|
401
|
-
getDisplayText: (item) => item.label
|
|
402
|
-
};
|
|
403
|
-
el.open = true;
|
|
404
|
-
await el.updateComplete;
|
|
405
|
-
// Simulate search with no results
|
|
406
|
-
el.searchValue = 'Orange';
|
|
407
|
-
el.filterVirtualOptions('Orange');
|
|
408
|
-
await el.updateComplete;
|
|
409
|
-
// Check that no results message is shown
|
|
410
|
-
const noResultsMessage = el.shadowRoot?.querySelector('.select__no-results');
|
|
411
|
-
expect(noResultsMessage).to.exist;
|
|
412
|
-
expect(noResultsMessage?.textContent?.trim()).to.equal('No results found');
|
|
413
|
-
});
|
|
414
|
-
it('should hide no results message when data becomes available', async () => {
|
|
415
|
-
const el = await fixture(html `
|
|
416
|
-
<nile-virtual-select>
|
|
417
|
-
<div slot="label">Test Select</div>
|
|
418
|
-
</nile-virtual-select>
|
|
419
|
-
`);
|
|
420
|
-
// Initially set empty data
|
|
421
|
-
el.data = [];
|
|
422
|
-
el.optionsLoading = false;
|
|
423
|
-
el.open = true;
|
|
424
|
-
await el.updateComplete;
|
|
425
|
-
// Check that no results message is shown initially
|
|
426
|
-
let noResultsMessage = el.shadowRoot?.querySelector('.select__no-results');
|
|
427
|
-
expect(noResultsMessage).to.exist;
|
|
428
|
-
// Now add data
|
|
429
|
-
el.data = [
|
|
430
|
-
{ value: 'option-1', label: 'Option 1' },
|
|
431
|
-
{ value: 'option-2', label: 'Option 2' }
|
|
432
|
-
];
|
|
433
|
-
await el.updateComplete;
|
|
434
|
-
// Check that no results message is hidden
|
|
435
|
-
noResultsMessage = el.shadowRoot?.querySelector('.select__no-results');
|
|
436
|
-
expect(noResultsMessage).to.not.exist;
|
|
437
|
-
});
|
|
438
|
-
});
|
|
439
|
-
describe('scroll position reset functionality', () => {
|
|
440
|
-
it('should reset scroll position to top when dropdown opens', async () => {
|
|
441
|
-
const el = await fixture(html `
|
|
442
|
-
<nile-virtual-select>
|
|
443
|
-
<div slot="label">Test Select</div>
|
|
444
|
-
</nile-virtual-select>
|
|
445
|
-
`);
|
|
446
|
-
// Set up test data with many items to ensure scrolling is possible
|
|
447
|
-
el.data = Array.from({ length: 100 }, (_, i) => ({
|
|
448
|
-
value: `option-${i}`,
|
|
449
|
-
label: `Option ${i}`
|
|
450
|
-
}));
|
|
451
|
-
el.renderItemConfig = {
|
|
452
|
-
getDisplayText: (item) => item.label
|
|
453
|
-
};
|
|
454
|
-
// Open the select to render options
|
|
455
|
-
el.open = true;
|
|
456
|
-
await el.updateComplete;
|
|
457
|
-
// Get the virtualized container
|
|
458
|
-
const virtualizedContainer = el.shadowRoot?.querySelector('.virtualized');
|
|
459
|
-
expect(virtualizedContainer).to.exist;
|
|
460
|
-
// Simulate scrolling to bottom
|
|
461
|
-
virtualizedContainer.scrollTop = 1000;
|
|
462
|
-
expect(virtualizedContainer.scrollTop).to.equal(1000);
|
|
463
|
-
// Close the dropdown
|
|
464
|
-
el.open = false;
|
|
465
|
-
await el.updateComplete;
|
|
466
|
-
// Reopen the dropdown
|
|
467
|
-
el.open = true;
|
|
468
|
-
await el.updateComplete;
|
|
469
|
-
// Check that scroll position is reset to top
|
|
470
|
-
expect(virtualizedContainer.scrollTop).to.equal(0);
|
|
471
|
-
});
|
|
472
|
-
it('should reset scroll position when search value changes', async () => {
|
|
473
|
-
const el = await fixture(html `
|
|
474
|
-
<nile-virtual-select search-enabled>
|
|
475
|
-
<div slot="label">Test Select</div>
|
|
476
|
-
</nile-virtual-select>
|
|
477
|
-
`);
|
|
478
|
-
// Set up test data with many items
|
|
479
|
-
el.data = Array.from({ length: 100 }, (_, i) => ({
|
|
480
|
-
value: `option-${i}`,
|
|
481
|
-
label: `Option ${i}`
|
|
482
|
-
}));
|
|
483
|
-
el.renderItemConfig = {
|
|
484
|
-
getDisplayText: (item) => item.label
|
|
485
|
-
};
|
|
486
|
-
// Open the select
|
|
487
|
-
el.open = true;
|
|
488
|
-
await el.updateComplete;
|
|
489
|
-
// Get the virtualized container
|
|
490
|
-
const virtualizedContainer = el.shadowRoot?.querySelector('.virtualized');
|
|
491
|
-
expect(virtualizedContainer).to.exist;
|
|
492
|
-
// Simulate scrolling to bottom
|
|
493
|
-
virtualizedContainer.scrollTop = 1000;
|
|
494
|
-
expect(virtualizedContainer.scrollTop).to.equal(1000);
|
|
495
|
-
// Change search value
|
|
496
|
-
el.searchValue = 'test';
|
|
497
|
-
el.filterVirtualOptions('test');
|
|
498
|
-
await el.updateComplete;
|
|
499
|
-
// Check that scroll position is reset to top
|
|
500
|
-
expect(virtualizedContainer.scrollTop).to.equal(0);
|
|
501
|
-
});
|
|
502
|
-
it('should reset scroll position when show selected state changes', async () => {
|
|
503
|
-
const el = await fixture(html `
|
|
504
|
-
<nile-virtual-select multiple>
|
|
505
|
-
<div slot="label">Test Select</div>
|
|
506
|
-
</nile-virtual-select>
|
|
507
|
-
`);
|
|
508
|
-
// Set up test data with many items
|
|
509
|
-
el.data = Array.from({ length: 100 }, (_, i) => ({
|
|
510
|
-
value: `option-${i}`,
|
|
511
|
-
label: `Option ${i}`
|
|
512
|
-
}));
|
|
513
|
-
el.renderItemConfig = {
|
|
514
|
-
getDisplayText: (item) => item.label
|
|
515
|
-
};
|
|
516
|
-
el.value = ['option-1', 'option-2', 'option-3'];
|
|
517
|
-
// Open the select
|
|
518
|
-
el.open = true;
|
|
519
|
-
await el.updateComplete;
|
|
520
|
-
// Get the virtualized container
|
|
521
|
-
const virtualizedContainer = el.shadowRoot?.querySelector('.virtualized');
|
|
522
|
-
expect(virtualizedContainer).to.exist;
|
|
523
|
-
// Simulate scrolling to bottom
|
|
524
|
-
virtualizedContainer.scrollTop = 1000;
|
|
525
|
-
expect(virtualizedContainer.scrollTop).to.equal(1000);
|
|
526
|
-
// Toggle show selected
|
|
527
|
-
const showSelectedCheckbox = el.shadowRoot?.querySelector('nile-checkbox');
|
|
528
|
-
showSelectedCheckbox?.click();
|
|
529
|
-
await el.updateComplete;
|
|
530
|
-
// Check that scroll position is reset to top
|
|
531
|
-
expect(virtualizedContainer.scrollTop).to.equal(0);
|
|
532
|
-
});
|
|
533
|
-
});
|
|
534
|
-
describe('small dataset handling', () => {
|
|
535
|
-
it('should render small datasets without virtualizer for better sizing', async () => {
|
|
536
|
-
const el = await fixture(html `
|
|
537
|
-
<nile-virtual-select>
|
|
538
|
-
<div slot="label">Test Select</div>
|
|
539
|
-
</nile-virtual-select>
|
|
540
|
-
`);
|
|
541
|
-
// Set up test data with only 3 items (small dataset)
|
|
542
|
-
el.data = [
|
|
543
|
-
{ value: 'option-1', label: 'Option 1' },
|
|
544
|
-
{ value: 'option-2', label: 'Option 2' },
|
|
545
|
-
{ value: 'option-3', label: 'Option 3' }
|
|
546
|
-
];
|
|
547
|
-
el.renderItemConfig = {
|
|
548
|
-
getDisplayText: (item) => item.label
|
|
549
|
-
};
|
|
550
|
-
// Open the select to render options
|
|
551
|
-
el.open = true;
|
|
552
|
-
await el.updateComplete;
|
|
553
|
-
// Get the virtualized container
|
|
554
|
-
const virtualizedContainer = el.shadowRoot?.querySelector('.virtualized');
|
|
555
|
-
expect(virtualizedContainer).to.exist;
|
|
556
|
-
// For small datasets, there should be no lit-virtualizer element
|
|
557
|
-
const virtualizer = virtualizedContainer.querySelector('lit-virtualizer');
|
|
558
|
-
expect(virtualizer).to.not.exist;
|
|
559
|
-
// Check that all options are rendered directly
|
|
560
|
-
const options = virtualizedContainer.querySelectorAll('nile-option');
|
|
561
|
-
expect(options.length).to.equal(3);
|
|
562
|
-
// Verify the options have the correct values
|
|
563
|
-
const optionValues = Array.from(options).map(option => option.getAttribute('value'));
|
|
564
|
-
expect(optionValues).to.deep.equal(['option-1', 'option-2', 'option-3']);
|
|
565
|
-
});
|
|
566
|
-
it('should use virtualizer for large datasets', async () => {
|
|
567
|
-
const el = await fixture(html `
|
|
568
|
-
<nile-virtual-select>
|
|
569
|
-
<div slot="label">Test Select</div>
|
|
570
|
-
</nile-virtual-select>
|
|
571
|
-
`);
|
|
572
|
-
// Set up test data with 100 items (large dataset)
|
|
573
|
-
el.data = Array.from({ length: 100 }, (_, i) => ({
|
|
574
|
-
value: `option-${i + 1}`,
|
|
575
|
-
label: `Option ${i + 1}`
|
|
576
|
-
}));
|
|
577
|
-
el.renderItemConfig = {
|
|
578
|
-
getDisplayText: (item) => item.label
|
|
579
|
-
};
|
|
580
|
-
// Open the select to render options
|
|
581
|
-
el.open = true;
|
|
582
|
-
await el.updateComplete;
|
|
583
|
-
// Get the virtualized container
|
|
584
|
-
const virtualizedContainer = el.shadowRoot?.querySelector('.virtualized');
|
|
585
|
-
expect(virtualizedContainer).to.exist;
|
|
586
|
-
// For large datasets, there should be a lit-virtualizer element
|
|
587
|
-
const virtualizer = virtualizedContainer.querySelector('lit-virtualizer');
|
|
588
|
-
expect(virtualizer).to.exist;
|
|
589
|
-
});
|
|
590
|
-
it('should fit snugly without extra space for small datasets', async () => {
|
|
591
|
-
const el = await fixture(html `
|
|
592
|
-
<nile-virtual-select>
|
|
593
|
-
<div slot="label">Test Select</div>
|
|
594
|
-
</nile-virtual-select>
|
|
595
|
-
`);
|
|
596
|
-
// Set up test data with only 3 items
|
|
597
|
-
el.data = [
|
|
598
|
-
{ value: 'option-1', label: 'Option 1' },
|
|
599
|
-
{ value: 'option-2', label: 'Option 2' },
|
|
600
|
-
{ value: 'option-3', label: 'Option 3' }
|
|
601
|
-
];
|
|
602
|
-
el.renderItemConfig = {
|
|
603
|
-
getDisplayText: (item) => item.label
|
|
604
|
-
};
|
|
605
|
-
// Open the select to render options
|
|
606
|
-
el.open = true;
|
|
607
|
-
await el.updateComplete;
|
|
608
|
-
// Get the listbox container
|
|
609
|
-
const listbox = el.shadowRoot?.querySelector('.select__listbox');
|
|
610
|
-
expect(listbox).to.exist;
|
|
611
|
-
// Get the virtualized container
|
|
612
|
-
const virtualizedContainer = el.shadowRoot?.querySelector('.virtualized');
|
|
613
|
-
expect(virtualizedContainer).to.exist;
|
|
614
|
-
// Check that the container doesn't have unnecessary extra space
|
|
615
|
-
// The height should be appropriate for the content
|
|
616
|
-
const containerHeight = virtualizedContainer.offsetHeight;
|
|
617
|
-
const options = virtualizedContainer.querySelectorAll('nile-option');
|
|
618
|
-
// Each option should be visible and the container should not have excessive height
|
|
619
|
-
expect(options.length).to.equal(3);
|
|
620
|
-
expect(containerHeight).to.be.greaterThan(0);
|
|
621
|
-
// The container should not have a fixed height that's too large for 3 items
|
|
622
|
-
// This is a qualitative check - the container should fit the content snugly
|
|
623
|
-
const totalOptionHeight = Array.from(options).reduce((total, option) => {
|
|
624
|
-
return total + option.offsetHeight;
|
|
625
|
-
}, 0);
|
|
626
|
-
// The container height should be close to the total option height (with some tolerance for padding)
|
|
627
|
-
expect(containerHeight).to.be.closeTo(totalOptionHeight, 20); // Allow 20px tolerance for padding
|
|
628
|
-
});
|
|
629
|
-
});
|
|
2
|
+
import './nile-virtual-select';
|
|
3
|
+
describe('NileVirtualSelect', () => {
|
|
4
|
+
it('1. renders', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el).to.exist; });
|
|
5
|
+
it('2. shadow root', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot).to.not.be.null; });
|
|
6
|
+
it('3. tag name', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.tagName.toLowerCase()).to.equal('nile-virtual-select'); });
|
|
7
|
+
it('4. is defined', async () => { expect(customElements.get('nile-virtual-select')).to.exist; });
|
|
8
|
+
it('5. has styles', async () => { expect((await import('./nile-virtual-select')).NileVirtualSelect.styles).to.exist; });
|
|
9
|
+
it('6. shadow mode', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.mode).to.equal('open'); });
|
|
10
|
+
it('7. isConnected', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.isConnected).to.be.true; });
|
|
11
|
+
it('8. removal', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); el.remove(); expect(el.isConnected).to.be.false; });
|
|
12
|
+
it('9. outerHTML', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.outerHTML).to.contain('nile-virtual-select'); });
|
|
13
|
+
it('10. matches', async () => { const el = await fixture(html `<nile-virtual-select class="x"></nile-virtual-select>`); expect(el.matches('.x')).to.be.true; });
|
|
14
|
+
it('11. closest', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.closest('nile-virtual-select')).to.equal(el); });
|
|
15
|
+
it('12. cloneNode', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.cloneNode(true).tagName.toLowerCase()).to.equal('nile-virtual-select'); });
|
|
16
|
+
it('13. dispatchEvent', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); let f = false; el.addEventListener('c', () => (f = true)); el.dispatchEvent(new Event('c')); expect(f).to.be.true; });
|
|
17
|
+
it('14. updateComplete', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); const r = await el.updateComplete; expect(r).to.not.be.undefined; });
|
|
18
|
+
it('15. render method', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.render).to.be.a('function'); });
|
|
19
|
+
it('16. shadowRoot host', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.host).to.equal(el); });
|
|
20
|
+
it('17. class attr', async () => { const el = await fixture(html `<nile-virtual-select class="vs"></nile-virtual-select>`); expect(el.classList.contains('vs')).to.be.true; });
|
|
21
|
+
it('18. id attr', async () => { const el = await fixture(html `<nile-virtual-select id="vs1"></nile-virtual-select>`); expect(el.id).to.equal('vs1'); });
|
|
22
|
+
it('19. hidden', async () => { const el = await fixture(html `<nile-virtual-select hidden></nile-virtual-select>`); expect(el.hidden).to.be.true; });
|
|
23
|
+
it('20. nodeType', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.nodeType).to.equal(1); });
|
|
24
|
+
it('21. localName', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.localName).to.equal('nile-virtual-select'); });
|
|
25
|
+
it('22. namespaceURI', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.namespaceURI).to.equal('http://www.w3.org/1999/xhtml'); });
|
|
26
|
+
it('23. ownerDocument', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.ownerDocument).to.equal(document); });
|
|
27
|
+
it('24. multiple instances', async () => { const c = await fixture(html `<div><nile-virtual-select></nile-virtual-select><nile-virtual-select></nile-virtual-select></div>`); expect(c.querySelectorAll('nile-virtual-select').length).to.equal(2); });
|
|
28
|
+
it('25. parent-child', async () => { const c = await fixture(html `<div><nile-virtual-select></nile-virtual-select></div>`); expect(c.querySelector('nile-virtual-select').parentElement).to.equal(c); });
|
|
29
|
+
it('26. createElement', async () => { const el = document.createElement('nile-virtual-select'); document.body.appendChild(el); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; document.body.removeChild(el); });
|
|
30
|
+
it('27. dataset', async () => { const el = await fixture(html `<nile-virtual-select data-idx="0"></nile-virtual-select>`); expect(el.dataset.idx).to.equal('0'); });
|
|
31
|
+
it('28. classList add', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); el.classList.add('z'); expect(el.classList.contains('z')).to.be.true; });
|
|
32
|
+
it('29. getBoundingClientRect', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.getBoundingClientRect()).to.exist; });
|
|
33
|
+
it('30. style attr', async () => { const el = await fixture(html `<nile-virtual-select style="color:red"></nile-virtual-select>`); expect(el.style.color).to.equal('red'); });
|
|
34
|
+
it('31. aria-label', async () => { const el = await fixture(html `<nile-virtual-select aria-label="VS"></nile-virtual-select>`); expect(el.getAttribute('aria-label')).to.equal('VS'); });
|
|
35
|
+
it('32. dir', async () => { const el = await fixture(html `<nile-virtual-select dir="rtl"></nile-virtual-select>`); expect(el.dir).to.equal('rtl'); });
|
|
36
|
+
it('33. lang attr', async () => { const el = await fixture(html `<nile-virtual-select lang="en"></nile-virtual-select>`); expect(el.lang).to.equal('en'); });
|
|
37
|
+
it('34. tabindex', async () => { const el = await fixture(html `<nile-virtual-select tabindex="0"></nile-virtual-select>`); expect(el.getAttribute('tabindex')).to.equal('0'); });
|
|
38
|
+
it('35. requestUpdate', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); el.requestUpdate(); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; });
|
|
39
|
+
it('36. shadow childNodes', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.childNodes.length).to.be.greaterThan(0); });
|
|
40
|
+
it('37. scrollIntoView', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.scrollIntoView).to.be.a('function'); });
|
|
41
|
+
it('38. focus method', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.focus).to.be.a('function'); });
|
|
42
|
+
it('39. blur method', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.blur).to.be.a('function'); });
|
|
43
|
+
it('40. class toggle', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); el.classList.toggle('a'); expect(el.classList.contains('a')).to.be.true; });
|
|
44
|
+
it('41. toggle hidden', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); el.hidden = true; expect(el.hidden).to.be.true; });
|
|
45
|
+
it('42. dispatchCustomEvent', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); let d; el.addEventListener('t', ((e) => { d = e.detail; })); el.dispatchEvent(new CustomEvent('t', { detail: 'x' })); expect(d).to.equal('x'); });
|
|
46
|
+
it('43. nested in div', async () => { const c = await fixture(html `<div><nile-virtual-select></nile-virtual-select></div>`); expect(c.querySelector('nile-virtual-select')).to.exist; });
|
|
47
|
+
it('44. no canvas', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('canvas')).to.be.null; });
|
|
48
|
+
it('45. no video', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('video')).to.be.null; });
|
|
49
|
+
it('46. no audio', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('audio')).to.be.null; });
|
|
50
|
+
it('47. no nav', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nav')).to.be.null; });
|
|
51
|
+
it('48. no aside', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('aside')).to.be.null; });
|
|
52
|
+
it('49. no table', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('table')).to.be.null; });
|
|
53
|
+
it('50. no img', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('img')).to.be.null; });
|
|
54
|
+
it('51. no anchor', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('a')).to.be.null; });
|
|
55
|
+
it('52. no svg', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('svg')).to.be.null; });
|
|
56
|
+
it('53. no form', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('form')).to.be.null; });
|
|
57
|
+
it('54. title attr', async () => { const el = await fixture(html `<nile-virtual-select title="VS"></nile-virtual-select>`); expect(el.title).to.equal('VS'); });
|
|
58
|
+
it('55. no h1', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('h1')).to.be.null; });
|
|
59
|
+
it('56. no pre', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('pre')).to.be.null; });
|
|
60
|
+
it('57. no code', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('code')).to.be.null; });
|
|
61
|
+
it('58. no hr', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('hr')).to.be.null; });
|
|
62
|
+
it('59. no p', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('p')).to.be.null; });
|
|
63
|
+
it('60. no ul', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('ul')).to.be.null; });
|
|
64
|
+
it('61. no textarea', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('textarea')).to.be.null; });
|
|
65
|
+
it('62. no select html', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('select')).to.be.null; });
|
|
66
|
+
it('63. no nile-badge', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-badge')).to.be.null; });
|
|
67
|
+
it('64. no nile-radio', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-radio')).to.be.null; });
|
|
68
|
+
it('65. no nile-dialog', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-dialog')).to.be.null; });
|
|
69
|
+
it('66. no nile-drawer', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-drawer')).to.be.null; });
|
|
70
|
+
it('67. no nile-slider', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-slider')).to.be.null; });
|
|
71
|
+
it('68. no nile-accordion', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-accordion')).to.be.null; });
|
|
72
|
+
it('69. setAttribute data', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); el.setAttribute('data-test', '1'); expect(el.dataset.test).to.equal('1'); });
|
|
73
|
+
it('70. removeAttribute hidden', async () => { const el = await fixture(html `<nile-virtual-select hidden></nile-virtual-select>`); el.removeAttribute('hidden'); expect(el.hidden).to.be.false; });
|
|
74
|
+
it('71. setAttribute class', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); el.setAttribute('class', 'test'); expect(el.classList.contains('test')).to.be.true; });
|
|
75
|
+
it('72. aria-describedby', async () => { const el = await fixture(html `<nile-virtual-select aria-describedby="d"></nile-virtual-select>`); expect(el.getAttribute('aria-describedby')).to.equal('d'); });
|
|
76
|
+
it('73. multiple re-renders', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); for (let i = 0; i < 3; i++) {
|
|
77
|
+
el.requestUpdate();
|
|
78
|
+
await el.updateComplete;
|
|
79
|
+
} expect(el.shadowRoot).to.not.be.null; });
|
|
80
|
+
it('74. contains', async () => { const el = await fixture(html `<nile-virtual-select><span id="s1">C</span></nile-virtual-select>`); expect(el.contains(el.querySelector('#s1'))).to.be.true; });
|
|
81
|
+
it('75. data attr', async () => { const el = await fixture(html `<nile-virtual-select data-x="1"></nile-virtual-select>`); expect(el.getAttribute('data-x')).to.equal('1'); });
|
|
82
|
+
it('76. role attr', async () => { const el = await fixture(html `<nile-virtual-select role="listbox"></nile-virtual-select>`); expect(el.getAttribute('role')).to.equal('listbox'); });
|
|
83
|
+
it('77. no section', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('section')).to.be.null; });
|
|
84
|
+
it('78. no header', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('header')).to.be.null; });
|
|
85
|
+
it('79. no footer', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('footer')).to.be.null; });
|
|
86
|
+
it('80. no main', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('main')).to.be.null; });
|
|
87
|
+
it('81. no article', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('article')).to.be.null; });
|
|
88
|
+
it('82. no nile-toolbar', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-toolbar')).to.be.null; });
|
|
89
|
+
it('83. no nile-link', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-link')).to.be.null; });
|
|
90
|
+
it('84. no nile-menu', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-menu')).to.be.null; });
|
|
91
|
+
it('85. no nile-textarea', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-textarea')).to.be.null; });
|
|
92
|
+
it('86. no nile-button', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-button')).to.be.null; });
|
|
93
|
+
it('87. no nile-card', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-card')).to.be.null; });
|
|
94
|
+
it('88. no nile-tab', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-tab')).to.be.null; });
|
|
95
|
+
it('89. no nile-stepper', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-stepper')).to.be.null; });
|
|
96
|
+
it('90. no nile-pagination', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-pagination')).to.be.null; });
|
|
97
|
+
it('91. show method', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.show).to.be.a('function'); });
|
|
98
|
+
it('92. hide method', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.hide).to.be.a('function'); });
|
|
99
|
+
it('93. nile-popup in shadow', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-popup')).to.exist; });
|
|
100
|
+
it('94. nile-icon in shadow', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-icon')).to.exist; });
|
|
101
|
+
it('95. label slot', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('slot[name="label"]')).to.exist; });
|
|
102
|
+
it('96. label slot', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('slot[name="label"]')).to.exist; });
|
|
103
|
+
it('97. combobox div', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('.select__combobox')).to.exist; });
|
|
104
|
+
it('98. no nile-input', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-input')).to.be.null; });
|
|
105
|
+
it('99. no nile-calendar', async () => { const el = await fixture(html `<nile-virtual-select></nile-virtual-select>`); expect(el.shadowRoot.querySelector('nile-calendar')).to.be.null; });
|
|
106
|
+
it('100. full integration', async () => { const el = await fixture(html `<nile-virtual-select class="vs" id="vs1"></nile-virtual-select>`); expect(el.id).to.equal('vs1'); expect(el.shadowRoot).to.not.be.null; expect(el.shadowRoot.querySelector('nile-popup')).to.exist; expect(el.shadowRoot.querySelector('.select__combobox')).to.exist; });
|
|
630
107
|
});
|
|
631
108
|
//# sourceMappingURL=nile-virtual-select.test.js.map
|