@aquera/nile-elements 0.1.64 → 0.1.65-beta-1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -27
- package/demo/index.html +120 -18
- package/dist/axe.min-2b379f29.cjs.js +12 -0
- package/dist/axe.min-2b379f29.cjs.js.map +1 -0
- package/dist/axe.min-c2cd8733.esm.js +12 -0
- package/dist/fixture-2b5b3aba.esm.js +569 -0
- package/dist/fixture-3330277d.cjs.js +395 -0
- package/dist/fixture-3330277d.cjs.js.map +1 -0
- package/dist/fixture-588a3119.esm.js +569 -0
- package/dist/{fixture-3bfb4490.cjs.js → fixture-75825990.cjs.js} +2 -2
- package/dist/{fixture-3bfb4490.cjs.js.map → fixture-75825990.cjs.js.map} +1 -1
- package/dist/fixture-7bfb866e.cjs.js +395 -0
- package/dist/fixture-7bfb866e.cjs.js.map +1 -0
- package/dist/{fixture-8edec91c.esm.js → fixture-e831ec79.esm.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +5874 -7895
- package/dist/internal/form.cjs.js +1 -1
- package/dist/internal/form.cjs.js.map +1 -1
- package/dist/internal/form.esm.js +1 -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/index.cjs.js +1 -1
- package/dist/nile-auto-complete/index.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +17 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +29 -8
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.cjs.js.map +1 -1
- package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
- package/dist/nile-badge/index.cjs.js +1 -1
- package/dist/nile-badge/index.esm.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.esm.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.test.esm.js +1 -1
- package/dist/nile-button/index.cjs.js +1 -1
- package/dist/nile-button/index.esm.js +1 -1
- package/dist/nile-button/nile-button.cjs.js +1 -1
- package/dist/nile-button/nile-button.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.esm.js +2 -2
- package/dist/nile-button/nile-button.test.cjs.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js.map +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.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.test.esm.js +5 -5
- package/dist/nile-card/nile-card.test.cjs.js +1 -1
- package/dist/nile-card/nile-card.test.esm.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.esm.js +1 -1
- package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.test.esm.js +1 -1
- package/dist/nile-code-editor/extensionSetup.cjs.js +5 -5
- package/dist/nile-code-editor/extensionSetup.cjs.js.map +1 -1
- package/dist/nile-code-editor/extensionSetup.esm.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +3 -3
- package/dist/nile-code-editor/theme.cjs.js +1 -1
- package/dist/nile-code-editor/theme.cjs.js.map +1 -1
- package/dist/nile-code-editor/theme.esm.js +1 -1
- package/dist/nile-dialog/index.cjs.js +1 -1
- package/dist/nile-dialog/index.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
- package/dist/nile-drawer/index.cjs.js +1 -1
- package/dist/nile-drawer/index.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
- package/dist/nile-drawer/nile-drawer.esm.js +2 -2
- package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js.map +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.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 +184 -203
- package/dist/nile-file-preview/nile-file-preview.esm.js +3 -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 +62 -59
- 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-preview/types/nile-file-preview.enums.cjs.js +1 -1
- package/dist/nile-file-preview/types/nile-file-preview.enums.cjs.js.map +1 -1
- package/dist/nile-file-preview/types/nile-file-preview.enums.esm.js +1 -1
- 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/index.cjs.js +1 -1
- package/dist/nile-file-upload/index.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 +89 -142
- package/dist/nile-file-upload/nile-file-upload.esm.js +2 -2
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js +3 -3
- 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 +98 -44
- 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-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/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 +1 -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-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/icons/svg/bold-try.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/bold-try.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/bold-try.esm.js +1 -0
- package/dist/nile-icon/icons/svg/bold.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/bold.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/bold.esm.js +1 -0
- package/dist/nile-icon/icons/svg/center-align.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/center-align.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/center-align.esm.js +1 -0
- package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/index.esm.js +1 -1
- package/dist/nile-icon/icons/svg/itallic.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/itallic.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/itallic.esm.js +1 -0
- package/dist/nile-icon/icons/svg/justify-align.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/justify-align.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/justify-align.esm.js +1 -0
- package/dist/nile-icon/icons/svg/left-align.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/left-align.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/left-align.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-activity.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-activity.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-activity.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-align-center.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-align-center.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-align-center.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-annotation-x.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-annotation-x.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-annotation-x.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-arrow-down.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-arrow-down.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-arrow-down.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-arrow-narrow-down.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-arrow-narrow-down.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-arrow-narrow-down.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-arrow-narrow-left.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-arrow-narrow-left.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-arrow-narrow-left.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-arrow-up.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-arrow-up.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-arrow-up.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-bar-chart-12.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-bar-chart-12.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-bar-chart-12.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-bell-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-bell-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-bell-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-bell-ringing-04.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-bell-ringing-04.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-bell-ringing-04.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-bold-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-bold-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-bold-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-calendar-plus-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-calendar-plus-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-calendar-plus-02.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-calendar.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-calendar.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-calendar.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-check-circle.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-check-circle.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-check-circle.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-check-square-broken.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-check-square-broken.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-check-square-broken.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-down.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-chevron-down.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-down.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-left.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-chevron-left.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-left.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-right.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-chevron-right.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-right.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-selector-vertical.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-chevron-selector-vertical.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-selector-vertical.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-up-double.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-chevron-up-double.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-up-double.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-up.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-chevron-up.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-chevron-up.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-copy-03.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-copy-03.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-copy-03.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-dots-grid.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-dots-grid.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-dots-grid.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-dots-vertical.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-dots-vertical.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-dots-vertical.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-download-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-download-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-download-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-dropdown.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-dropdown.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-dropdown.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-edit-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-edit-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-edit-02.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-edit-05.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-edit-05.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-edit-05.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-expand-06.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-expand-06.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-expand-06.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-eye.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-eye.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-eye.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-file-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-file-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-file-02.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-file-check-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-file-check-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-file-check-02.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-file-question-03.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-file-question-03.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-file-question-03.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-filter-lines.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-filter-lines.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-filter-lines.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-grid-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-grid-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-grid-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-help-circle.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-help-circle.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-help-circle.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-image-user-left.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-image-user-left.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-image-user-left.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-info-circle.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-info-circle.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-info-circle.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-italic-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-italic-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-italic-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-layers-three-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-layers-three-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-layers-three-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-list.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-list.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-list.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-log-out-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-log-out-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-log-out-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-mail-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-mail-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-mail-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-mail-04.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-mail-04.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-mail-04.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-menu-05.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-menu-05.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-menu-05.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-message-text-square-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-message-text-square-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-message-text-square-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-minimize-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-minimize-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-minimize-02.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-plus.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-plus.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-plus.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-refresh-cw-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-refresh-cw-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-refresh-cw-02.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-rocket-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-rocket-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-rocket-02.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-search-lg.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-search-lg.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-search-lg.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-send-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-send-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-send-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-settings-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-settings-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-settings-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-share-04.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-share-04.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-share-04.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-share-06.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-share-06.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-share-06.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-stars-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-stars-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-stars-02.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-trash-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-trash-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-trash-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-trash-03.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-trash-03.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-trash-03.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-trend-up-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-trend-up-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-trend-up-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-underline-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-underline-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-underline-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-upload-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-upload-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-upload-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-upload-cloud-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-upload-cloud-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-upload-cloud-02.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-user-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-user-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-user-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-user-check-02-1.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-user-check-02-1.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-user-check-02-1.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-user-check-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-user-check-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-user-check-02.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-user-plus-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-user-plus-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-user-plus-02.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-user-right-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-user-right-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-user-right-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-users-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-users-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-users-01.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-x-close.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-x-close.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-x-close.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ng-x-square.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ng-x-square.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ng-x-square.esm.js +1 -0
- package/dist/nile-icon/icons/svg/nile-bold.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/nile-bold.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/nile-bold.esm.js +1 -0
- package/dist/nile-icon/icons/svg/nile-centeralign.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/nile-centeralign.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/nile-centeralign.esm.js +1 -0
- package/dist/nile-icon/icons/svg/nile-italic.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/nile-italic.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/nile-italic.esm.js +1 -0
- package/dist/nile-icon/icons/svg/nile-justify.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/nile-justify.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/nile-justify.esm.js +1 -0
- package/dist/nile-icon/icons/svg/nile-leftalign.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/nile-leftalign.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/nile-leftalign.esm.js +1 -0
- package/dist/nile-icon/icons/svg/nile-ol.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/nile-ol.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/nile-ol.esm.js +1 -0
- package/dist/nile-icon/icons/svg/nile-rightalign.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/nile-rightalign.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/nile-rightalign.esm.js +1 -0
- package/dist/nile-icon/icons/svg/nile-ul.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/nile-ul.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/nile-ul.esm.js +1 -0
- package/dist/nile-icon/icons/svg/nile-underline.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/nile-underline.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/nile-underline.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ol.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ol.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ol.esm.js +1 -0
- package/dist/nile-icon/icons/svg/right-align.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/right-align.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/right-align.esm.js +1 -0
- package/dist/nile-icon/icons/svg/ul.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/ul.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/ul.esm.js +1 -0
- package/dist/nile-icon/icons/svg/underline.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/underline.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/underline.esm.js +1 -0
- package/dist/nile-icon/index.cjs.js +1 -1
- package/dist/nile-icon/index.cjs.js.map +1 -1
- package/dist/nile-icon/index.esm.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -1
- package/dist/nile-icon/nile-icon.test.esm.js +1 -1
- package/dist/nile-icon-button/index.cjs.js +1 -1
- package/dist/nile-icon-button/index.esm.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
- package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
- package/dist/nile-input/index.cjs.js +1 -1
- package/dist/nile-input/index.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-input/nile-input.test.cjs.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.test.esm.js +2 -2
- package/dist/nile-lightdomeditor/index.cjs.js +2 -0
- package/dist/nile-lightdomeditor/index.esm.js +1 -0
- package/dist/nile-lightdomeditor/nile-lightdomeditor.cjs.js +2 -0
- package/dist/nile-lightdomeditor/nile-lightdomeditor.cjs.js.map +1 -0
- package/dist/nile-lightdomeditor/nile-lightdomeditor.css.cjs.js +2 -0
- package/dist/nile-lightdomeditor/nile-lightdomeditor.css.cjs.js.map +1 -0
- package/dist/nile-lightdomeditor/nile-lightdomeditor.css.esm.js +225 -0
- package/dist/nile-lightdomeditor/nile-lightdomeditor.esm.js +122 -0
- 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-menu-item/index.cjs.js +1 -1
- package/dist/nile-menu-item/index.esm.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
- package/dist/nile-option/index.cjs.js +1 -1
- package/dist/nile-option/index.esm.js +1 -1
- package/dist/nile-option/nile-option.cjs.js +1 -1
- package/dist/nile-option/nile-option.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.esm.js +2 -2
- 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 +11 -3
- package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.esm.js +13 -7
- package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.test.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.test.esm.js +3 -3
- 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-rich-text-editor/index.cjs.js +2 -0
- package/dist/nile-rich-text-editor/index.esm.js +1 -0
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +2 -0
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +2 -0
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +87 -0
- package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -0
- package/dist/nile-rich-text-editor/nile-rte-color.cjs.js +2 -0
- package/dist/nile-rich-text-editor/nile-rte-color.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rte-color.esm.js +1 -0
- package/dist/nile-rich-text-editor/nile-rte-divider.cjs.js +2 -0
- package/dist/nile-rich-text-editor/nile-rte-divider.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rte-divider.esm.js +1 -0
- package/dist/nile-rich-text-editor/nile-rte-mentions-item.cjs.js +2 -0
- package/dist/nile-rich-text-editor/nile-rte-mentions-item.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rte-mentions-item.esm.js +1 -0
- package/dist/nile-rich-text-editor/nile-rte-mentions.cjs.js +3 -0
- package/dist/nile-rich-text-editor/nile-rte-mentions.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rte-mentions.esm.js +1 -0
- package/dist/nile-rich-text-editor/nile-rte-preview.cjs.js +2 -0
- package/dist/nile-rich-text-editor/nile-rte-preview.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rte-preview.esm.js +1 -0
- package/dist/nile-rich-text-editor/nile-rte-select.cjs.js +2 -0
- package/dist/nile-rich-text-editor/nile-rte-select.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rte-select.esm.js +52 -0
- package/dist/nile-rich-text-editor/nile-rte-toolbar-item.cjs.js +2 -0
- package/dist/nile-rich-text-editor/nile-rte-toolbar-item.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rte-toolbar-item.esm.js +1 -0
- package/dist/nile-rich-text-editor/nile-rte-toolbar.cjs.js +2 -0
- package/dist/nile-rich-text-editor/nile-rte-toolbar.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rte-toolbar.esm.js +1 -0
- package/dist/nile-rich-text-editor/utils.cjs.js +2 -0
- package/dist/nile-rich-text-editor/utils.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/utils.esm.js +1 -0
- package/dist/nile-richcodeeditor/index.cjs.js +2 -0
- package/dist/nile-richcodeeditor/index.cjs.js.map +1 -0
- package/dist/nile-richcodeeditor/index.esm.js +1 -0
- package/dist/nile-richcodeeditor/nile-richcodeeditor.cjs.js +2 -0
- package/dist/nile-richcodeeditor/nile-richcodeeditor.cjs.js.map +1 -0
- package/dist/nile-richcodeeditor/nile-richcodeeditor.css.cjs.js +2 -0
- package/dist/nile-richcodeeditor/nile-richcodeeditor.css.cjs.js.map +1 -0
- package/dist/nile-richcodeeditor/nile-richcodeeditor.css.esm.js +5 -0
- package/dist/nile-richcodeeditor/nile-richcodeeditor.esm.js +66 -0
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/index.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +2 -2
- package/dist/nile-select/nile-select.test.cjs.js +1 -1
- package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.test.esm.js +2 -2
- 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/index.cjs.js +1 -1
- package/dist/nile-tab/index.esm.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
- package/dist/nile-tab/nile-tab.esm.js +1 -1
- package/dist/nile-tab-group/index.cjs.js +1 -1
- package/dist/nile-tab-group/index.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.esm.js +2 -2
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
- package/dist/nile-table-body/index.cjs.js +1 -1
- package/dist/nile-table-body/index.esm.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
- package/dist/nile-table-body/nile-table-body.css.cjs.js +1 -1
- package/dist/nile-table-body/nile-table-body.css.cjs.js.map +1 -1
- package/dist/nile-table-body/nile-table-body.css.esm.js +2 -4
- package/dist/nile-table-body/nile-table-body.esm.js +2 -3
- package/dist/nile-table-cell-item/index.cjs.js +1 -1
- package/dist/nile-table-cell-item/index.esm.js +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.cjs.js +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.cjs.js.map +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js.map +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.css.esm.js +3 -16
- package/dist/nile-table-cell-item/nile-table-cell-item.esm.js +3 -8
- package/dist/nile-table-header-item/index.cjs.js +1 -1
- package/dist/nile-table-header-item/index.esm.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.cjs.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.cjs.js.map +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js.map +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.esm.js +2 -5
- package/dist/nile-table-header-item/nile-table-header-item.esm.js +8 -9
- package/dist/nile-tag/index.cjs.js +1 -1
- package/dist/nile-tag/index.esm.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.esm.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
- package/dist/nile-toast/index.cjs.js +1 -1
- package/dist/nile-toast/index.esm.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
- package/dist/nile-toast/nile-toast.esm.js +1 -1
- package/dist/nile-tree/index.cjs.js +1 -1
- package/dist/nile-tree/index.esm.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
- package/dist/nile-tree/nile-tree.esm.js +1 -1
- package/dist/nile-tree-item/index.cjs.js +1 -1
- package/dist/nile-tree-item/index.esm.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
- package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
- package/dist/src/index.d.ts +3 -4
- package/dist/src/index.js +3 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/form.js +3 -3
- package/dist/src/internal/form.js.map +1 -1
- package/dist/src/nile-badge/__snapshots__/nile-badge.test.snap.js +17 -0
- package/dist/src/nile-calendar/__snapshots__/nile-calendar.test.snap.js +310 -0
- package/dist/src/nile-card/__snapshots__/nile-card.test.snap.js +34 -0
- package/dist/src/nile-checkbox/__snapshots__/nile-checkbox.test.snap.js +31 -0
- package/dist/src/nile-chip/nile-chip.js +1 -10
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.d.ts +0 -3
- package/dist/src/nile-code-editor/nile-code-editor.js +3 -23
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-code-editor/theme.d.ts +0 -6
- package/dist/src/nile-code-editor/theme.js +2 -8
- package/dist/src/nile-code-editor/theme.js.map +1 -1
- package/dist/src/nile-file-preview/nile-file-preview.css.js +182 -201
- 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 +2 -6
- package/dist/src/nile-file-preview/nile-file-preview.js +20 -49
- 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 +2 -3
- package/dist/src/nile-file-preview/nile-file-preview.template.js +47 -51
- package/dist/src/nile-file-preview/nile-file-preview.template.js.map +1 -1
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.d.ts +3 -4
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.js +2 -3
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.js.map +1 -1
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.d.ts +0 -4
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.js +0 -25
- 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 +87 -140
- 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 +1 -4
- package/dist/src/nile-file-upload/nile-file-upload.js +20 -30
- package/dist/src/nile-file-upload/nile-file-upload.js.map +1 -1
- package/dist/src/nile-file-upload/nile-file-upload.template.d.ts +5 -7
- package/dist/src/nile-file-upload/nile-file-upload.template.js +105 -63
- package/dist/src/nile-file-upload/nile-file-upload.template.js.map +1 -1
- package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +4 -11
- package/dist/src/nile-file-upload/types/file-upload.enums.js +1 -8
- 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 +4 -2
- package/dist/src/nile-file-upload/utils/drag-drop.util.js +21 -18
- package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +1 -1
- package/dist/src/nile-file-upload/utils/file-validation.util.d.ts +1 -3
- package/dist/src/nile-file-upload/utils/file-validation.util.js +32 -82
- package/dist/src/nile-file-upload/utils/file-validation.util.js.map +1 -1
- 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/bold-try.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/bold-try.js +5 -0
- package/dist/src/nile-icon/icons/svg/bold-try.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/bold.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/bold.js +5 -0
- package/dist/src/nile-icon/icons/svg/bold.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/center-align.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/center-align.js +5 -0
- package/dist/src/nile-icon/icons/svg/center-align.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/index.d.ts +19 -0
- package/dist/src/nile-icon/icons/svg/index.js +19 -0
- package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/itallic.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/itallic.js +5 -0
- package/dist/src/nile-icon/icons/svg/itallic.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/justify-align.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/justify-align.js +5 -0
- package/dist/src/nile-icon/icons/svg/justify-align.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/left-align.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/left-align.js +5 -0
- package/dist/src/nile-icon/icons/svg/left-align.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-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-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-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.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-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-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.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-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-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-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-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-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-icon/icons/svg/nile-bold.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/nile-bold.js +5 -0
- package/dist/src/nile-icon/icons/svg/nile-bold.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/nile-centeralign.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/nile-centeralign.js +5 -0
- package/dist/src/nile-icon/icons/svg/nile-centeralign.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/nile-italic.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/nile-italic.js +5 -0
- package/dist/src/nile-icon/icons/svg/nile-italic.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/nile-justify.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/nile-justify.js +5 -0
- package/dist/src/nile-icon/icons/svg/nile-justify.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/nile-leftalign.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/nile-leftalign.js +5 -0
- package/dist/src/nile-icon/icons/svg/nile-leftalign.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/nile-ol.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/nile-ol.js +5 -0
- package/dist/src/nile-icon/icons/svg/nile-ol.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/nile-rightalign.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/nile-rightalign.js +5 -0
- package/dist/src/nile-icon/icons/svg/nile-rightalign.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/nile-ul.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/nile-ul.js +5 -0
- package/dist/src/nile-icon/icons/svg/nile-ul.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/nile-underline.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/nile-underline.js +5 -0
- package/dist/src/nile-icon/icons/svg/nile-underline.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ol.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ol.js +5 -0
- package/dist/src/nile-icon/icons/svg/ol.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/right-align.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/right-align.js +5 -0
- package/dist/src/nile-icon/icons/svg/right-align.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/ul.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/ul.js +5 -0
- package/dist/src/nile-icon/icons/svg/ul.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/underline.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/underline.js +5 -0
- package/dist/src/nile-icon/icons/svg/underline.js.map +1 -0
- package/dist/src/nile-input/__snapshots__/nile-input.test.snap.js +75 -0
- package/dist/src/nile-lightdomeditor/index.d.ts +1 -0
- package/dist/src/nile-lightdomeditor/index.js +2 -0
- package/dist/src/nile-lightdomeditor/index.js.map +1 -0
- package/dist/src/nile-lightdomeditor/nile-lightdomeditor.css.d.ts +6 -0
- package/dist/src/nile-lightdomeditor/nile-lightdomeditor.css.js +237 -0
- package/dist/src/nile-lightdomeditor/nile-lightdomeditor.css.js.map +1 -0
- package/dist/src/nile-lightdomeditor/nile-lightdomeditor.d.ts +74 -0
- package/dist/src/nile-lightdomeditor/nile-lightdomeditor.js +591 -0
- package/dist/src/nile-lightdomeditor/nile-lightdomeditor.js.map +1 -0
- package/dist/src/nile-lightdomeditor/utils/nile-mention.d.ts +13 -0
- package/dist/src/nile-lightdomeditor/utils/nile-mention.js +47 -0
- package/dist/src/nile-lightdomeditor/utils/nile-mention.js.map +1 -0
- package/dist/src/nile-markdowneditor/index.d.ts +1 -0
- package/dist/src/nile-markdowneditor/index.js +2 -0
- package/dist/src/nile-markdowneditor/index.js.map +1 -0
- package/dist/src/nile-markdowneditor/nile-markdowneditor.css.d.ts +12 -0
- package/dist/src/nile-markdowneditor/nile-markdowneditor.css.js +17 -0
- package/dist/src/nile-markdowneditor/nile-markdowneditor.css.js.map +1 -0
- package/dist/src/nile-markdowneditor/nile-markdowneditor.d.ts +32 -0
- package/dist/src/nile-markdowneditor/nile-markdowneditor.js +43 -0
- package/dist/src/nile-markdowneditor/nile-markdowneditor.js.map +1 -0
- package/dist/src/nile-option/nile-option.d.ts +1 -3
- package/dist/src/nile-option/nile-option.js +14 -21
- package/dist/src/nile-option/nile-option.js.map +1 -1
- package/dist/src/nile-popover/__snapshots__/nile-popover.test.snap.js +22 -0
- package/dist/src/nile-prosemirror-poc/index.d.ts +1 -0
- package/dist/src/nile-prosemirror-poc/index.js +2 -0
- package/dist/src/nile-prosemirror-poc/index.js.map +1 -0
- package/dist/src/nile-prosemirror-poc/nile-prosemirror-poc.css.d.ts +12 -0
- package/dist/src/nile-prosemirror-poc/nile-prosemirror-poc.css.js +17 -0
- package/dist/src/nile-prosemirror-poc/nile-prosemirror-poc.css.js.map +1 -0
- package/dist/src/nile-prosemirror-poc/nile-prosemirror-poc.d.ts +24 -0
- package/dist/src/nile-prosemirror-poc/nile-prosemirror-poc.js +190 -0
- package/dist/src/nile-prosemirror-poc/nile-prosemirror-poc.js.map +1 -0
- package/dist/src/nile-rich-text-editor/index.d.ts +1 -0
- package/dist/src/nile-rich-text-editor/index.js +2 -0
- package/dist/src/nile-rich-text-editor/index.js.map +1 -0
- package/dist/src/{nile-slider/nile-slider.css.d.ts → nile-rich-text-editor/nile-rich-text-editor.css.d.ts} +0 -3
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +91 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +57 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +603 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -0
- package/dist/src/nile-rich-text-editor/nile-rte-color.d.ts +14 -0
- package/dist/src/nile-rich-text-editor/nile-rte-color.js +28 -0
- package/dist/src/nile-rich-text-editor/nile-rte-color.js.map +1 -0
- package/dist/src/nile-rich-text-editor/nile-rte-divider.d.ts +10 -0
- package/dist/src/nile-rich-text-editor/nile-rte-divider.js +12 -0
- package/dist/src/nile-rich-text-editor/nile-rte-divider.js.map +1 -0
- package/dist/src/nile-rich-text-editor/nile-rte-mentions-item.d.ts +18 -0
- package/dist/src/nile-rich-text-editor/nile-rte-mentions-item.js +47 -0
- package/dist/src/nile-rich-text-editor/nile-rte-mentions-item.js.map +1 -0
- package/dist/src/nile-rich-text-editor/nile-rte-mentions.d.ts +57 -0
- package/dist/src/nile-rich-text-editor/nile-rte-mentions.js +442 -0
- package/dist/src/nile-rich-text-editor/nile-rte-mentions.js.map +1 -0
- package/dist/src/nile-rich-text-editor/nile-rte-preview.d.ts +10 -0
- package/dist/src/nile-rich-text-editor/nile-rte-preview.js +12 -0
- package/dist/src/nile-rich-text-editor/nile-rte-preview.js.map +1 -0
- package/dist/src/nile-rich-text-editor/nile-rte-select.d.ts +37 -0
- package/dist/src/nile-rich-text-editor/nile-rte-select.js +200 -0
- package/dist/src/nile-rich-text-editor/nile-rte-select.js.map +1 -0
- package/dist/src/nile-rich-text-editor/nile-rte-toolbar-item.d.ts +12 -0
- package/dist/src/nile-rich-text-editor/nile-rte-toolbar-item.js +23 -0
- package/dist/src/nile-rich-text-editor/nile-rte-toolbar-item.js.map +1 -0
- package/dist/src/nile-rich-text-editor/nile-rte-toolbar.d.ts +10 -0
- package/dist/src/nile-rich-text-editor/nile-rte-toolbar.js +12 -0
- package/dist/src/nile-rich-text-editor/nile-rte-toolbar.js.map +1 -0
- package/dist/src/nile-rich-text-editor/nille-rte-mention.d.ts +21 -0
- package/dist/src/nile-rich-text-editor/nille-rte-mention.js +47 -0
- package/dist/src/nile-rich-text-editor/nille-rte-mention.js.map +1 -0
- package/dist/src/nile-rich-text-editor/nille-rte-mentions.d.ts +21 -0
- package/dist/src/nile-rich-text-editor/nille-rte-mentions.js +47 -0
- package/dist/src/nile-rich-text-editor/nille-rte-mentions.js.map +1 -0
- package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor-toolbar-item.d.ts +0 -0
- package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor-toolbar-item.js +2 -0
- package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor-toolbar-item.js.map +1 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-content/nile-rich-text-editor-content.d.ts +8 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-content/nile-rich-text-editor-content.js +39 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-content/nile-rich-text-editor-content.js.map +1 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-content/nile-rich-text-editor-preview.d.ts +0 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-content/nile-rich-text-editor-preview.js +2 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-content/nile-rich-text-editor-preview.js.map +1 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-mentions/nile-rich-text-editor-mentions.d.ts +12 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-mentions/nile-rich-text-editor-mentions.js +24 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-mentions/nile-rich-text-editor-mentions.js.map +1 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-mentions-item/nile-rich-text-editor-mentions-item.d.ts +25 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-mentions-item/nile-rich-text-editor-mentions-item.js +89 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-mentions-item/nile-rich-text-editor-mentions-item.js.map +1 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-preview/nile-rich-text-editor-preview.css.d.ts +12 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-preview/nile-rich-text-editor-preview.css.js +47 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-preview/nile-rich-text-editor-preview.css.js.map +1 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-preview/nile-rich-text-editor-preview.d.ts +7 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-preview/nile-rich-text-editor-preview.js +28 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-preview/nile-rich-text-editor-preview.js.map +1 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar/nile-rich-text-editor-toolbar.css.d.ts +6 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar/nile-rich-text-editor-toolbar.css.js +237 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar/nile-rich-text-editor-toolbar.css.js.map +1 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar/nile-rich-text-editor-toolbar.d.ts +5 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar/nile-rich-text-editor-toolbar.js +26 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar/nile-rich-text-editor-toolbar.js.map +1 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar-item/nile-rich-text-editor-toolbar-item.css.d.ts +6 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar-item/nile-rich-text-editor-toolbar-item.css.js +237 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar-item/nile-rich-text-editor-toolbar-item.css.js.map +1 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar-item/nile-rich-text-editor-toolbar-item.d.ts +8 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar-item/nile-rich-text-editor-toolbar-item.js +36 -0
- package/dist/src/nile-rich-text-editor/subcomponents/nile-rich-text-editor-toolbar-item/nile-rich-text-editor-toolbar-item.js.map +1 -0
- package/dist/src/nile-rich-text-editor/utils.d.ts +13 -0
- package/dist/src/nile-rich-text-editor/utils.js +251 -0
- package/dist/src/nile-rich-text-editor/utils.js.map +1 -0
- package/dist/src/nile-richcodeeditor/index.d.ts +1 -0
- package/dist/src/nile-richcodeeditor/index.js +2 -0
- package/dist/src/nile-richcodeeditor/index.js.map +1 -0
- package/dist/src/nile-richcodeeditor/nile-richcodeeditor.css.d.ts +12 -0
- package/dist/src/nile-richcodeeditor/nile-richcodeeditor.css.js +17 -0
- package/dist/src/nile-richcodeeditor/nile-richcodeeditor.css.js.map +1 -0
- package/dist/src/nile-richcodeeditor/nile-richcodeeditor.d.ts +31 -0
- package/dist/src/nile-richcodeeditor/nile-richcodeeditor.js +203 -0
- package/dist/src/nile-richcodeeditor/nile-richcodeeditor.js.map +1 -0
- package/dist/src/nile-richeditor/index.d.ts +1 -0
- package/dist/src/nile-richeditor/index.js +2 -0
- package/dist/src/nile-richeditor/index.js.map +1 -0
- package/dist/src/nile-richeditor/nile-richeditor.css.d.ts +12 -0
- package/dist/src/nile-richeditor/nile-richeditor.css.js +17 -0
- package/dist/src/nile-richeditor/nile-richeditor.css.js.map +1 -0
- package/dist/src/nile-richeditor/nile-richeditor.d.ts +19 -0
- package/dist/src/nile-richeditor/nile-richeditor.js +234 -0
- package/dist/src/nile-richeditor/nile-richeditor.js.map +1 -0
- package/dist/src/nile-richtexteditor/index.d.ts +1 -0
- package/dist/src/nile-richtexteditor/index.js +2 -0
- package/dist/src/nile-richtexteditor/index.js.map +1 -0
- package/dist/src/nile-richtexteditor/nile-richtexteditor.css.d.ts +6 -0
- package/dist/src/nile-richtexteditor/nile-richtexteditor.css.js +237 -0
- package/dist/src/nile-richtexteditor/nile-richtexteditor.css.js.map +1 -0
- package/dist/src/nile-richtexteditor/nile-richtexteditor.d.ts +32 -0
- package/dist/src/nile-richtexteditor/nile-richtexteditor.js +46 -0
- package/dist/src/nile-richtexteditor/nile-richtexteditor.js.map +1 -0
- package/dist/src/nile-richtexteditor/utils/nile-mention.d.ts +13 -0
- package/dist/src/nile-richtexteditor/utils/nile-mention.js +47 -0
- package/dist/src/nile-richtexteditor/utils/nile-mention.js.map +1 -0
- package/dist/src/nile-select/nile-select.d.ts +3 -14
- package/dist/src/nile-select/nile-select.js +21 -64
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-table-body/nile-table-body.css.js +0 -3
- package/dist/src/nile-table-body/nile-table-body.css.js.map +1 -1
- package/dist/src/nile-table-body/nile-table-body.d.ts +0 -2
- package/dist/src/nile-table-body/nile-table-body.js +0 -10
- package/dist/src/nile-table-body/nile-table-body.js.map +1 -1
- package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js +1 -15
- package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js.map +1 -1
- package/dist/src/nile-table-cell-item/nile-table-cell-item.d.ts +0 -3
- package/dist/src/nile-table-cell-item/nile-table-cell-item.js +8 -27
- package/dist/src/nile-table-cell-item/nile-table-cell-item.js.map +1 -1
- package/dist/src/nile-table-header-item/nile-table-header-item.css.js +0 -4
- package/dist/src/nile-table-header-item/nile-table-header-item.css.js.map +1 -1
- package/dist/src/nile-table-header-item/nile-table-header-item.d.ts +0 -3
- package/dist/src/nile-table-header-item/nile-table-header-item.js +15 -22
- package/dist/src/nile-table-header-item/nile-table-header-item.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/src/index.ts +3 -4
- package/src/internal/form.ts +3 -3
- package/src/nile-chip/nile-chip.ts +1 -9
- package/src/nile-code-editor/nile-code-editor.ts +4 -25
- package/src/nile-code-editor/theme.ts +2 -8
- package/src/nile-icon/icons/svg/bold-try.ts +5 -0
- package/src/nile-icon/icons/svg/bold.ts +5 -0
- package/src/nile-icon/icons/svg/center-align.ts +5 -0
- package/src/nile-icon/icons/svg/index.ts +19 -0
- package/src/nile-icon/icons/svg/itallic.ts +5 -0
- package/src/nile-icon/icons/svg/justify-align.ts +5 -0
- package/src/nile-icon/icons/svg/left-align.ts +5 -0
- package/src/nile-icon/icons/svg/nile-bold.ts +5 -0
- package/src/nile-icon/icons/svg/nile-centeralign.ts +5 -0
- package/src/nile-icon/icons/svg/nile-italic.ts +5 -0
- package/src/nile-icon/icons/svg/nile-justify.ts +5 -0
- package/src/nile-icon/icons/svg/nile-leftalign.ts +5 -0
- package/src/nile-icon/icons/svg/nile-ol.ts +5 -0
- package/src/nile-icon/icons/svg/nile-rightalign.ts +5 -0
- package/src/nile-icon/icons/svg/nile-ul.ts +5 -0
- package/src/nile-icon/icons/svg/nile-underline.ts +5 -0
- package/src/nile-icon/icons/svg/ol.ts +5 -0
- package/src/nile-icon/icons/svg/right-align.ts +5 -0
- package/src/nile-icon/icons/svg/ul.ts +5 -0
- package/src/nile-icon/icons/svg/underline.ts +5 -0
- package/src/nile-lightdomeditor/index.ts +1 -0
- package/src/nile-lightdomeditor/nile-lightdomeditor.css.ts +238 -0
- package/src/nile-lightdomeditor/nile-lightdomeditor.ts +523 -0
- package/src/nile-option/nile-option.ts +11 -18
- package/src/nile-rich-text-editor/index.ts +1 -0
- package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +92 -0
- package/src/nile-rich-text-editor/nile-rich-text-editor.ts +640 -0
- package/src/nile-rich-text-editor/nile-rte-color.ts +14 -0
- package/src/nile-rich-text-editor/nile-rte-divider.ts +9 -0
- package/src/nile-rich-text-editor/nile-rte-mentions-item.ts +42 -0
- package/src/nile-rich-text-editor/nile-rte-mentions.ts +465 -0
- package/src/nile-rich-text-editor/nile-rte-preview.ts +9 -0
- package/src/nile-rich-text-editor/nile-rte-select.ts +208 -0
- package/src/nile-rich-text-editor/nile-rte-toolbar-item.ts +13 -0
- package/src/nile-rich-text-editor/nile-rte-toolbar.ts +9 -0
- package/src/nile-rich-text-editor/utils.ts +197 -0
- package/src/nile-richcodeeditor/index.ts +1 -0
- package/src/nile-richcodeeditor/nile-richcodeeditor.css.ts +19 -0
- package/src/nile-richcodeeditor/nile-richcodeeditor.ts +192 -0
- package/src/nile-select/nile-select.ts +13 -65
- package/src/nile-table-body/nile-table-body.css.ts +0 -3
- package/src/nile-table-body/nile-table-body.ts +0 -9
- package/src/nile-table-cell-item/nile-table-cell-item.css.ts +1 -15
- package/src/nile-table-cell-item/nile-table-cell-item.ts +5 -22
- package/src/nile-table-header-item/nile-table-header-item.css.ts +0 -4
- package/src/nile-table-header-item/nile-table-header-item.ts +5 -11
- package/vscode-html-custom-data.json +199 -525
- package/dist/internal/resizable-table-helper.cjs.js +0 -2
- package/dist/internal/resizable-table-helper.cjs.js.map +0 -1
- package/dist/internal/resizable-table-helper.esm.js +0 -1
- package/dist/internal/resizable-table-styles.cjs.js +0 -2
- package/dist/internal/resizable-table-styles.cjs.js.map +0 -1
- package/dist/internal/resizable-table-styles.esm.js +0 -132
- package/dist/nile-select/virtual-scroll-helper.cjs.js +0 -2
- package/dist/nile-select/virtual-scroll-helper.cjs.js.map +0 -1
- package/dist/nile-select/virtual-scroll-helper.esm.js +0 -38
- package/dist/nile-slider/index.cjs.js +0 -2
- package/dist/nile-slider/index.esm.js +0 -1
- package/dist/nile-slider/nile-slider.cjs.js +0 -2
- package/dist/nile-slider/nile-slider.cjs.js.map +0 -1
- package/dist/nile-slider/nile-slider.css.cjs.js +0 -2
- package/dist/nile-slider/nile-slider.css.cjs.js.map +0 -1
- package/dist/nile-slider/nile-slider.css.esm.js +0 -106
- package/dist/nile-slider/nile-slider.esm.js +0 -27
- package/dist/nile-slider/nile-slider.template.cjs.js +0 -2
- package/dist/nile-slider/nile-slider.template.cjs.js.map +0 -1
- package/dist/nile-slider/nile-slider.template.esm.js +0 -59
- package/dist/nile-slider/types/nile-slider.enums.cjs.js +0 -2
- package/dist/nile-slider/types/nile-slider.enums.cjs.js.map +0 -1
- package/dist/nile-slider/types/nile-slider.enums.esm.js +0 -1
- package/dist/nile-slider/types/nile-slider.types.cjs.js +0 -2
- package/dist/nile-slider/types/nile-slider.types.cjs.js.map +0 -1
- package/dist/nile-slider/types/nile-slider.types.esm.js +0 -1
- package/dist/nile-slider/utils/nile-slider.utils.cjs.js +0 -2
- package/dist/nile-slider/utils/nile-slider.utils.cjs.js.map +0 -1
- package/dist/nile-slider/utils/nile-slider.utils.esm.js +0 -1
- package/dist/nile-virtual-select/index.cjs.js +0 -2
- package/dist/nile-virtual-select/index.esm.js +0 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +0 -2
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +0 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +0 -2
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +0 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +0 -477
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +0 -227
- 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/nile-virtual-select/renderer.cjs.js +0 -2
- package/dist/nile-virtual-select/renderer.cjs.js.map +0 -1
- package/dist/nile-virtual-select/renderer.esm.js +0 -27
- package/dist/nile-virtual-select/search-manager.cjs.js +0 -2
- package/dist/nile-virtual-select/search-manager.cjs.js.map +0 -1
- package/dist/nile-virtual-select/search-manager.esm.js +0 -1
- package/dist/nile-virtual-select/selection-manager.cjs.js +0 -2
- package/dist/nile-virtual-select/selection-manager.cjs.js.map +0 -1
- package/dist/nile-virtual-select/selection-manager.esm.js +0 -1
- package/dist/nile-virtual-select/types.cjs.js +0 -2
- package/dist/nile-virtual-select/types.cjs.js.map +0 -1
- package/dist/nile-virtual-select/types.esm.js +0 -1
- package/dist/src/internal/resizable-table-helper.d.ts +0 -59
- package/dist/src/internal/resizable-table-helper.js +0 -111
- package/dist/src/internal/resizable-table-helper.js.map +0 -1
- package/dist/src/internal/resizable-table-styles.d.ts +0 -16
- package/dist/src/internal/resizable-table-styles.js +0 -149
- package/dist/src/internal/resizable-table-styles.js.map +0 -1
- package/dist/src/nile-select/virtual-scroll-helper.d.ts +0 -9
- package/dist/src/nile-select/virtual-scroll-helper.js +0 -51
- package/dist/src/nile-select/virtual-scroll-helper.js.map +0 -1
- package/dist/src/nile-slider/index.d.ts +0 -1
- package/dist/src/nile-slider/index.js +0 -2
- package/dist/src/nile-slider/index.js.map +0 -1
- package/dist/src/nile-slider/nile-slider.css.js +0 -118
- package/dist/src/nile-slider/nile-slider.css.js.map +0 -1
- package/dist/src/nile-slider/nile-slider.d.ts +0 -48
- package/dist/src/nile-slider/nile-slider.js +0 -217
- package/dist/src/nile-slider/nile-slider.js.map +0 -1
- package/dist/src/nile-slider/nile-slider.template.d.ts +0 -5
- package/dist/src/nile-slider/nile-slider.template.js +0 -73
- package/dist/src/nile-slider/nile-slider.template.js.map +0 -1
- package/dist/src/nile-slider/types/nile-slider.enums.d.ts +0 -10
- package/dist/src/nile-slider/types/nile-slider.enums.js +0 -2
- package/dist/src/nile-slider/types/nile-slider.enums.js.map +0 -1
- package/dist/src/nile-slider/types/nile-slider.types.d.ts +0 -1
- package/dist/src/nile-slider/types/nile-slider.types.js +0 -2
- package/dist/src/nile-slider/types/nile-slider.types.js.map +0 -1
- package/dist/src/nile-slider/utils/nile-slider.utils.d.ts +0 -11
- package/dist/src/nile-slider/utils/nile-slider.utils.js +0 -99
- package/dist/src/nile-slider/utils/nile-slider.utils.js.map +0 -1
- package/dist/src/nile-virtual-select/index.d.ts +0 -1
- package/dist/src/nile-virtual-select/index.js +0 -2
- package/dist/src/nile-virtual-select/index.js.map +0 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.css.d.ts +0 -12
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js +0 -489
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +0 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +0 -266
- package/dist/src/nile-virtual-select/nile-virtual-select.js +0 -1226
- package/dist/src/nile-virtual-select/nile-virtual-select.js.map +0 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.test.d.ts +0 -7
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js +0 -631
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +0 -1
- package/dist/src/nile-virtual-select/renderer.d.ts +0 -16
- package/dist/src/nile-virtual-select/renderer.js +0 -71
- package/dist/src/nile-virtual-select/renderer.js.map +0 -1
- package/dist/src/nile-virtual-select/search-manager.d.ts +0 -12
- package/dist/src/nile-virtual-select/search-manager.js +0 -40
- package/dist/src/nile-virtual-select/search-manager.js.map +0 -1
- package/dist/src/nile-virtual-select/selection-manager.d.ts +0 -12
- package/dist/src/nile-virtual-select/selection-manager.js +0 -64
- package/dist/src/nile-virtual-select/selection-manager.js.map +0 -1
- package/dist/src/nile-virtual-select/types.d.ts +0 -50
- package/dist/src/nile-virtual-select/types.js +0 -8
- package/dist/src/nile-virtual-select/types.js.map +0 -1
- package/dist/virtualize-a4a40d96.esm.js +0 -22
- package/dist/virtualize-b6a2fbe0.cjs.js +0 -18
- package/dist/virtualize-b6a2fbe0.cjs.js.map +0 -1
- package/src/internal/resizable-table-helper.ts +0 -151
- package/src/internal/resizable-table-styles.ts +0 -156
- package/src/nile-file-preview/index.ts +0 -1
- package/src/nile-file-preview/nile-file-preview.css.ts +0 -589
- package/src/nile-file-preview/nile-file-preview.template.ts +0 -259
- package/src/nile-file-preview/nile-file-preview.test.ts +0 -38
- package/src/nile-file-preview/nile-file-preview.ts +0 -205
- package/src/nile-file-preview/types/index.ts +0 -2
- package/src/nile-file-preview/types/nile-file-preview.enums.ts +0 -32
- package/src/nile-file-preview/types/nile-file-preview.interface.ts +0 -4
- package/src/nile-file-preview/utils/index.ts +0 -1
- package/src/nile-file-preview/utils/nile-file-preview.util.ts +0 -72
- package/src/nile-file-upload/index.ts +0 -1
- package/src/nile-file-upload/nile-file-upload.css.ts +0 -624
- package/src/nile-file-upload/nile-file-upload.template.ts +0 -217
- package/src/nile-file-upload/nile-file-upload.test.ts +0 -38
- package/src/nile-file-upload/nile-file-upload.ts +0 -161
- package/src/nile-file-upload/types/file-upload.enums.ts +0 -46
- package/src/nile-file-upload/types/file-upload.type.ts +0 -5
- package/src/nile-file-upload/types/index.ts +0 -2
- package/src/nile-file-upload/utils/drag-drop.util.ts +0 -106
- package/src/nile-file-upload/utils/file-validation.util.ts +0 -216
- package/src/nile-select/virtual-scroll-helper.ts +0 -56
- package/src/nile-slider/index.ts +0 -1
- package/src/nile-slider/nile-slider.css.ts +0 -119
- package/src/nile-slider/nile-slider.template.ts +0 -77
- package/src/nile-slider/nile-slider.ts +0 -215
- package/src/nile-slider/types/nile-slider.enums.ts +0 -10
- package/src/nile-slider/types/nile-slider.types.ts +0 -13
- package/src/nile-slider/utils/nile-slider.utils.ts +0 -136
- package/src/nile-virtual-select/index.ts +0 -1
- package/src/nile-virtual-select/nile-virtual-select.css.ts +0 -491
- package/src/nile-virtual-select/nile-virtual-select.test.ts +0 -774
- package/src/nile-virtual-select/nile-virtual-select.ts +0 -1314
- package/src/nile-virtual-select/renderer.ts +0 -99
- package/src/nile-virtual-select/search-manager.ts +0 -50
- package/src/nile-virtual-select/selection-manager.ts +0 -75
- package/src/nile-virtual-select/types.ts +0 -54
- /package/dist/{nile-slider → nile-lightdomeditor}/index.cjs.js.map +0 -0
- /package/dist/{nile-virtual-select → nile-rich-text-editor}/index.cjs.js.map +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register([],function(_export,_context){"use strict";var t,i,s,h,e,o;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);}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[],execute:function execute(){t=new WeakMap(),i=new WeakMap(),s=new WeakSet(),h=new WeakMap();_export("F",e=/*#__PURE__*/function(){function e(t,i){_classCallCheck(this,e);(this.host=t).addController(this),this.options=_objectSpread({form:function form(t){if(t.hasAttribute("form")&&""!==t.getAttribute("form")){var _i=t.getRootNode(),_s=t.getAttribute("form");if(_s)return _i.getElementById(_s);}return t.closest("form");},name:function name(t){return t.name;},value:function value(t){return t.value;},defaultValue:function defaultValue(t){return t.defaultValue;},disabled:function disabled(t){var _t$disabled;return(_t$disabled=t.disabled)!==null&&_t$disabled!==void 0?_t$disabled:!1;},reportValidity:function reportValidity(t){return"function"!=typeof t.reportValidity||t.reportValidity();},setValue:function setValue(t,i){return t.value=i;},assumeInteractionOn:["nile-input"]},i),this.handleFormData=this.handleFormData.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.handleFormReset=this.handleFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this),this.handleInteraction=this.handleInteraction.bind(this);}return _createClass(e,[{key:"hostConnected",value:function hostConnected(){var _this
|
1
|
+
System.register([],function(_export,_context){"use strict";var t,i,s,h,e,o;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);}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[],execute:function execute(){t=new WeakMap(),i=new WeakMap(),s=new WeakSet(),h=new WeakMap();_export("F",e=/*#__PURE__*/function(){function e(t,i){_classCallCheck(this,e);(this.host=t).addController(this),this.options=_objectSpread({form:function form(t){if(t.hasAttribute("form")&&""!==t.getAttribute("form")){var _i=t.getRootNode(),_s=t.getAttribute("form");if(_s)return _i.getElementById(_s);}return t.closest("form");},name:function name(t){return t.name;},value:function value(t){return t.value;},defaultValue:function defaultValue(t){return t.defaultValue;},disabled:function disabled(t){var _t$disabled;return(_t$disabled=t.disabled)!==null&&_t$disabled!==void 0?_t$disabled:!1;},reportValidity:function reportValidity(t){return"function"!=typeof t.reportValidity||t.reportValidity();},setValue:function setValue(t,i){return t.value=i;},assumeInteractionOn:["nile-input"]},i),this.handleFormData=this.handleFormData.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.handleFormReset=this.handleFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this),this.handleInteraction=this.handleInteraction.bind(this);}return _createClass(e,[{key:"hostConnected",value:function hostConnected(){var _this=this;var t=this.options.form(this.host);t&&this.attachForm(t),h.set(this.host,[]),this.options.assumeInteractionOn.forEach(function(t){_this.host.addEventListener(t,_this.handleInteraction);});}},{key:"hostDisconnected",value:function hostDisconnected(){var _this2=this;this.detachForm(),h["delete"](this.host),this.options.assumeInteractionOn.forEach(function(t){_this2.host.removeEventListener(t,_this2.handleInteraction);});}},{key:"hostUpdated",value:function hostUpdated(){var t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid);}},{key:"attachForm",value:function attachForm(s){var _this3=this;s?(this.form=s,t.has(this.form)?t.get(this.form).add(this.host):t.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),i.has(this.form)||(i.set(this.form,this.form.reportValidity),this.form.reportValidity=function(){return _this3.reportFormValidity();})):this.form=void 0;}},{key:"detachForm",value:function detachForm(){var _t$get;this.form&&((_t$get=t.get(this.form))!==null&&_t$get!==void 0&&_t$get["delete"](this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),i.has(this.form)&&(this.form.reportValidity=i.get(this.form),i["delete"](this.form))),this.form=void 0;}},{key:"handleFormData",value:function handleFormData(t){var i=this.options.disabled(this.host),s=this.options.name(this.host),h=this.options.value(this.host),_e="nile-button"===this.host.tagName.toLowerCase();!i&&!_e&&"string"==typeof s&&s.length>0&&void 0!==h&&(Array.isArray(h)?h.forEach(function(i){t.formData.append(s,i.toString());}):t.formData.append(s,h.toString()));}},{key:"handleFormSubmit",value:function handleFormSubmit(i){var _t$get2,_this4=this;var s=this.options.disabled(this.host),h=this.options.reportValidity;this.form&&!this.form.noValidate&&(_t$get2=t.get(this.form))!==null&&_t$get2!==void 0&&_t$get2.forEach(function(t){_this4.setUserInteracted(t,!0);}),!this.form||this.form.noValidate||s||h(this.host)||(i.preventDefault(),i.stopImmediatePropagation());}},{key:"handleFormReset",value:function handleFormReset(){this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),h.set(this.host,[]);}},{key:"handleInteraction",value:function handleInteraction(t){var i=h.get(this.host);i.includes(t.type)||i.push(t.type),i.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0);}},{key:"reportFormValidity",value:function reportFormValidity(){if(this.form&&!this.form.noValidate){var _t=this.form.querySelectorAll("*");var _iterator=_createForOfIteratorHelper(_t),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _i2=_step.value;if("function"==typeof _i2.reportValidity&&!_i2.reportValidity())return!1;}}catch(err){_iterator.e(err);}finally{_iterator.f();}}return!0;}},{key:"setUserInteracted",value:function setUserInteracted(t,i){i?s.add(t):s["delete"](t),t.requestUpdate();}},{key:"doAction",value:function doAction(t,i){if(this.form){var _s2=document.createElement("button");_s2.type=t,_s2.style.position="absolute",_s2.style.width="0",_s2.style.height="0",_s2.style.clipPath="inset(50%)",_s2.style.overflow="hidden",_s2.style.whiteSpace="nowrap",i&&(_s2.name=i.name,_s2.value=i.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(function(t){i.hasAttribute(t)&&_s2.setAttribute(t,i.getAttribute(t));})),this.form.append(_s2),_s2.click(),_s2.remove();}}},{key:"getForm",value:function getForm(){var _this$form;return(_this$form=this.form)!==null&&_this$form!==void 0?_this$form:null;}},{key:"reset",value:function reset(t){this.doAction("reset",t);}},{key:"submit",value:function submit(t){this.doAction("submit",t);}},{key:"setValidity",value:function setValidity(t){var i=this.host,h=Boolean(s.has(i)),_e2=Boolean(i.required);i.toggleAttribute("data-required",_e2),i.toggleAttribute("data-optional",!_e2),i.toggleAttribute("data-invalid",!t),i.toggleAttribute("data-valid",t),i.toggleAttribute("data-user-invalid",!t&&h),i.toggleAttribute("data-user-valid",t&&h);}},{key:"updateValidity",value:function updateValidity(){var t=this.host;this.setValidity(t.validity.valid);}},{key:"emitInvalidEvent",value:function emitInvalidEvent(t){var i=new CustomEvent("nile-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||i.preventDefault(),this.host.dispatchEvent(i)||(t===null||t===void 0?void 0:t.preventDefault());}}]);}());_export("v",o=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}));Object.freeze(_objectSpread(_objectSpread({},o),{},{valid:!1,valueMissing:!0})),Object.freeze(_objectSpread(_objectSpread({},o),{},{valid:!1,customError:!0}));}};});
|
2
2
|
//# sourceMappingURL=form.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"form.cjs.js","sources":["../../../src/internal/form.ts"],"sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type { NileFormControl } from '../internal/nile-element';\nimport type { NileButton } from '../nile-button';\n\n//\n// We store a WeakMap of forms + controls so we can keep references to all Nile controls within a given form. As\n// elements connect and disconnect to/from the DOM, their containing form is used as the key and the form control is\n// added and removed from the form's set, respectively.\n//\nexport const formCollections: WeakMap<HTMLFormElement, Set<NileFormControl>> = new WeakMap();\n\n//\n// We store a WeakMap of reportValidity() overloads so we can override it when form controls connect to the DOM and\n// restore the original behavior when they disconnect.\n//\nconst reportValidityOverloads: WeakMap<HTMLFormElement, () => boolean> = new WeakMap();\n\n//\n// We store a Set of controls that users have interacted with. This allows us to determine the interaction state\n// without littering the DOM with additional data attributes.\n//\nconst userInteractedControls: WeakSet<NileFormControl> = new WeakSet();\n\n//\n// We store a WeakMap of interactions for each form control so we can track when all conditions are met for validation.\n//\nconst interactions = new WeakMap<NileFormControl, string[]>();\n\nexport interface FormControlControllerOptions {\n /** A function that returns the form containing the form control. */\n form: (input: NileFormControl) => HTMLFormElement | null;\n /** A function that returns the form control's name, which will be submitted with the form data. */\n name: (input: NileFormControl) => string;\n /** A function that returns the form control's current value. */\n value: (input: NileFormControl) => unknown | unknown[];\n /** A function that returns the form control's default value. */\n defaultValue: (input: NileFormControl) => unknown | unknown[];\n /** A function that returns the form control's current disabled state. If disabled, the value won't be submitted. */\n disabled: (input: NileFormControl) => boolean;\n /**\n * A function that maps to the form control's reportValidity() function. When the control is invalid, this will\n * prevent submission and trigger the browser's constraint violation warning.\n */\n reportValidity: (input: NileFormControl) => boolean;\n /** A function that sets the form control's value */\n setValue: (input: NileFormControl, value: unknown) => void;\n /**\n * An array of event names to listen to. When all events in the list are emitted, the control will receive validity\n * states such as user-valid and user-invalid.user interacted validity states. */\n assumeInteractionOn: string[];\n}\n\n/** A reactive controller to allow form controls to participate in form submission, validation, etc. */\nexport class FormControlController implements ReactiveController {\n host: NileFormControl & ReactiveControllerHost;\n form?: HTMLFormElement | null;\n options: FormControlControllerOptions;\n\n constructor(host: ReactiveControllerHost & NileFormControl, options?: Partial<FormControlControllerOptions>) {\n (this.host = host).addController(this);\n this.options = {\n form: input => {\n // If there's a form attribute, use it to find the target form by id\n if (input.hasAttribute('form') && input.getAttribute('form') !== '') {\n const root = input.getRootNode() as Document | ShadowRoot;\n const formId = input.getAttribute('form');\n\n if (formId) {\n return root.getElementById(formId) as HTMLFormElement;\n }\n }\n\n return input.closest('form');\n },\n name: input => input.name,\n value: input => input.value,\n defaultValue: input => input.defaultValue,\n disabled: input => input.disabled ?? false,\n reportValidity: input => (typeof input.reportValidity === 'function' ? input.reportValidity() : true),\n setValue: (input, value: string) => (input.value = value),\n assumeInteractionOn: ['nile-input'],\n ...options\n };\n this.handleFormData = this.handleFormData.bind(this);\n this.handleFormSubmit = this.handleFormSubmit.bind(this);\n this.handleFormReset = this.handleFormReset.bind(this);\n this.reportFormValidity = this.reportFormValidity.bind(this);\n this.handleInteraction = this.handleInteraction.bind(this);\n }\n\n hostConnected() {\n const form = this.options?.form(this.host);\n\n if (form) {\n this.attachForm(form);\n }\n\n // Listen for interactions\n interactions.set(this.host, []);\n this.options?.assumeInteractionOn.forEach(event => {\n this.host.addEventListener(event, this.handleInteraction);\n });\n }\n\n hostDisconnected() {\n this.detachForm();\n\n // Clean up interactions\n interactions.delete(this.host);\n this.options?.assumeInteractionOn.forEach(event => {\n this.host.removeEventListener(event, this.handleInteraction);\n });\n }\n\n hostUpdated() {\n const form = this.options.form(this.host);\n\n // Detach if the form no longer exists\n if (!form) {\n this.detachForm();\n }\n\n // If the form has changed, reattach it\n if (form && this.form !== form) {\n this.detachForm();\n this.attachForm(form);\n }\n\n if (this.host.hasUpdated) {\n this.setValidity(this.host.validity.valid);\n }\n }\n\n private attachForm(form?: HTMLFormElement) {\n if (form) {\n this.form = form;\n\n // Add this element to the form's collection\n if (formCollections.has(this.form)) {\n formCollections.get(this.form)!.add(this.host);\n } else {\n formCollections.set(this.form, new Set<NileFormControl>([this.host]));\n }\n\n this.form.addEventListener('formdata', this.handleFormData);\n this.form.addEventListener('submit', this.handleFormSubmit);\n this.form.addEventListener('reset', this.handleFormReset);\n\n // Overload the form's reportValidity() method so it looks at nile form controls\n if (!reportValidityOverloads.has(this.form)) {\n reportValidityOverloads.set(this.form, this.form.reportValidity);\n this.form.reportValidity = () => this.reportFormValidity();\n }\n } else {\n this.form = undefined;\n }\n }\n\n private detachForm() {\n if (this.form) {\n // Remove this element from the form's collection\n formCollections.get(this.form)?.delete(this.host);\n\n this.form.removeEventListener('formdata', this.handleFormData);\n this.form.removeEventListener('submit', this.handleFormSubmit);\n this.form.removeEventListener('reset', this.handleFormReset);\n\n // Remove the overload and restore the original method\n if (reportValidityOverloads.has(this.form)) {\n this.form.reportValidity = reportValidityOverloads.get(this.form)!;\n reportValidityOverloads.delete(this.form);\n }\n }\n\n this.form = undefined;\n }\n\n private handleFormData(event: FormDataEvent) {\n const disabled = this.options.disabled(this.host);\n const name = this.options.name(this.host);\n const value = this.options.value(this.host);\n\n // For buttons, we only submit the value if they were the submitter. This is currently done in doAction() by\n // injecting the name/value on a temporary button, so we can just skip them here.\n const isButton = this.host.tagName.toLowerCase() === 'nile-button';\n\n if (!disabled && !isButton && typeof name === 'string' && name.length > 0 && typeof value !== 'undefined') {\n if (Array.isArray(value)) {\n (value as unknown[]).forEach(val => {\n event.formData.append(name, (val as string | number | boolean).toString());\n });\n } else {\n event.formData.append(name, (value as string | number | boolean).toString());\n }\n }\n }\n\n private handleFormSubmit(event: Event) {\n const disabled = this.options.disabled(this.host);\n const reportValidity = this.options.reportValidity;\n\n // Update the interacted state for all controls when the form is submitted\n if (this.form && !this.form.noValidate) {\n formCollections.get(this.form)?.forEach(control => {\n this.setUserInteracted(control, true);\n });\n }\n\n if (this.form && !this.form.noValidate && !disabled && !reportValidity(this.host)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n private handleFormReset() {\n this.options.setValue(this.host, this.options.defaultValue(this.host));\n this.setUserInteracted(this.host, false);\n interactions.set(this.host, []);\n }\n\n private handleInteraction(event: Event) {\n const emittedEvents = interactions.get(this.host)!;\n\n if (!emittedEvents.includes(event.type)) {\n emittedEvents.push(event.type);\n }\n\n // Mark it as user-interacted as soon as all associated events have been emitted\n if (emittedEvents.length === this.options.assumeInteractionOn.length) {\n this.setUserInteracted(this.host, true);\n }\n }\n\n private reportFormValidity() {\n //\n // Nile form controls work hard to act like regular form controls. They support the Constraint Validation API\n // and its associated methods such as setCustomValidity() and reportValidity(). However, the HTMLFormElement also\n // has a reportValidity() method that will trigger validation on all child controls. Since we're not yet using\n // ElementInternals, we need to overload this method so it looks for any element with the reportValidity() method.\n //\n // We preserve the original method in a WeakMap, but we don't call it from the overload because that would trigger\n // validations in an unexpected order. When the element disconnects, we revert to the original behavior. This won't\n // be necessary once we can use ElementInternals.\n //\n // Note that we're also honoring the form's novalidate attribute.\n //\n if (this.form && !this.form.noValidate) {\n // This seems sloppy, but checking all elements will cover native inputs, Nile inputs, and other custom\n // elements that support the constraint validation API.\n const elements = this.form.querySelectorAll<HTMLInputElement>('*');\n\n for (const element of elements) {\n if (typeof element.reportValidity === 'function') {\n if (!element.reportValidity()) {\n return false;\n }\n }\n }\n }\n\n return true;\n }\n\n private setUserInteracted(el: NileFormControl, hasInteracted: boolean) {\n if (hasInteracted) {\n userInteractedControls.add(el);\n } else {\n userInteractedControls.delete(el);\n }\n\n el.requestUpdate();\n }\n\n private doAction(type: 'submit' | 'reset', submitter?: HTMLInputElement | NileButton) {\n if (this.form) {\n const button = document.createElement('button');\n button.type = type;\n button.style.position = 'absolute';\n button.style.width = '0';\n button.style.height = '0';\n button.style.clipPath = 'inset(50%)';\n button.style.overflow = 'hidden';\n button.style.whiteSpace = 'nowrap';\n\n // Pass name, value, and form attributes through to the temporary button\n if (submitter) {\n button.name = submitter.name;\n button.value = submitter.value;\n\n ['formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget'].forEach(attr => {\n if (submitter.hasAttribute(attr)) {\n button.setAttribute(attr, submitter.getAttribute(attr)!);\n }\n });\n }\n\n this.form.append(button);\n button.click();\n button.remove();\n }\n }\n\n /** Returns the associated `<form>` element, if one exists. */\n getForm() {\n return this.form ?? null;\n }\n\n /** Resets the form, restoring all the control to their default value */\n reset(submitter?: HTMLInputElement | NileButton) {\n this.doAction('reset', submitter);\n }\n\n /** Submits the form, triggering validation and form data injection. */\n submit(submitter?: HTMLInputElement | NileButton) {\n // Calling form.submit() bypasses the submit event and constraint validation. To prevent this, we can inject a\n // native submit button into the form, \"click\" it, then remove it to simulate a standard form submission.\n this.doAction('submit', submitter);\n }\n\n /**\n * Synchronously sets the form control's validity. Call this when you know the future validity but need to update\n * the host element immediately, i.e. before Lit updates the component in the next update.\n */\n setValidity(isValid: boolean) {\n const host = this.host;\n const hasInteracted = Boolean(userInteractedControls.has(host));\n const required = Boolean(host.required);\n\n //\n // We're mapping the following \"states\" to data attributes. In the future, we can use ElementInternals.states to\n // create a similar mapping, but instead of [data-invalid] it will look like :--invalid.\n //\n //\n host.toggleAttribute('data-required', required);\n host.toggleAttribute('data-optional', !required);\n host.toggleAttribute('data-invalid', !isValid);\n host.toggleAttribute('data-valid', isValid);\n host.toggleAttribute('data-user-invalid', !isValid && hasInteracted);\n host.toggleAttribute('data-user-valid', isValid && hasInteracted);\n }\n\n /**\n * Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything\n * that affects constraint validation changes so the component receives the correct validity states.\n */\n updateValidity() {\n const host = this.host;\n this.setValidity(host.validity.valid);\n }\n\n /**\n * Dispatches a non-bubbling, cancelable custom event of type `nile-invalid`.\n * If the `nile-invalid` event will be cancelled then the original `invalid`\n * event (which may have been passed as argument) will also be cancelled.\n * If no original `invalid` event has been passed then the `nile-invalid`\n * event will be cancelled before being dispatched.\n */\n emitInvalidEvent(originalInvalidEvent?: Event) {\n const slInvalidEvent = new CustomEvent<Record<PropertyKey, never>>('nile-invalid', {\n bubbles: false,\n composed: false,\n cancelable: true,\n detail: {}\n });\n\n if (!originalInvalidEvent) {\n slInvalidEvent.preventDefault();\n }\n\n if (!this.host.dispatchEvent(slInvalidEvent)) {\n originalInvalidEvent?.preventDefault();\n }\n }\n}\n\n/*\n * Predefined common validity states.\n * All of them are read-only.\n */\n\n// A validity state object that represents `valid`\nexport const validValidityState: ValidityState = Object.freeze({\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: true,\n valueMissing: false\n});\n\n// A validity state object that represents `value missing`\nexport const valueMissingValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n valueMissing: true\n});\n\n// A validity state object that represents a custom error\nexport const customErrorValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n customError: true\n});\n"],"names":["formCollections","WeakMap","reportValidityOverloads","userInteractedControls","WeakSet","interactions","FormControlController","e","host","options","this","addController","_objectSpread","form","input","hasAttribute","getAttribute","root","getRootNode","formId","getElementById","closest","name","value","defaultValue","disabled","reportValidity","setValue","assumeInteractionOn","handleFormData","bind","handleFormSubmit","handleFormReset","reportFormValidity","handleInteraction","_createClass","key","hostConnected","_this$options","_this$options2","_this","attachForm","set","forEach","event","addEventListener","hostDisconnected","detachForm","removeEventListener","hostUpdated","hasUpdated","setValidity","validity","valid","has","get","add","Set","undefined","isButton","tagName","toLowerCase","length","Array","isArray","val","formData","append","toString","noValidate","control","setUserInteracted","preventDefault","stopImmediatePropagation","emittedEvents","includes","type","push","elements","querySelectorAll","_iterator","_createForOfIteratorHelper","s","_step","n","done","element","err","f","el","hasInteracted","delete","requestUpdate","doAction","submitter","button","document","createElement","style","position","width","height","clipPath","overflow","whiteSpace","attr","setAttribute","click","remove","getForm","_this$form","reset","submit","isValid","Boolean","required","toggleAttribute","updateValidity","emitInvalidEvent","originalInvalidEvent","slInvalidEvent","CustomEvent","bubbles","composed","cancelable","detail","dispatchEvent","_export","validValidityState","Object","freeze","badInput","customError","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort","typeMismatch","valueMissing"],"mappings":"wmGASaA,EAAkE,GAAIC,CAAAA,OAAAA,CAAAA,CAAAA,CAM7EC,EAAmE,GAAID,CAAAA,OAAAA,CAAAA,CAAAA,CAMvEE,EAAmD,GAAIC,CAAAA,OAAAA,CAAAA,CAAAA,CAKvDC,EAAe,GAAIJ,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,OAAAA,KA2BZK,CAKX,yBAAA,SAAAC,EAAYC,CAAgDC,CAAAA,CAAAA,CAAAA,CAAAA,eAAAA,MAAAA,CAAAA,EAAAA,CACzDC,KAAKF,IAAOA,CAAAA,CAAAA,EAAMG,aAAcD,CAAAA,IAAAA,CAAAA,CACjCA,KAAKD,OAAU,CAAAG,aAAA,EACbC,KAAMC,QAAND,CAAAA,KAAMC,CAEJ,CAAA,CAAA,GAAIA,EAAMC,YAAa,CAAA,MAAA,CAAA,EAA0C,KAA/BD,CAAME,CAAAA,YAAAA,CAAa,QAAgB,CACnE,GAAMC,CAAAA,GAAOH,CAAMI,CAAAA,WAAAA,CAAAA,CAAAA,CACbC,GAASL,CAAME,CAAAA,YAAAA,CAAa,MAElC,CAAA,CAAA,GAAIG,GACF,MAAOF,CAAAA,EAAAA,CAAKG,eAAeD,EAE9B,CAAA,EAED,MAAOL,CAAAA,CAAMO,CAAAA,OAAAA,CAAQ,OAAO,EAE9BC,CAAAA,IAAAA,CAAMR,QAANQ,CAAAA,IAAAA,CAAMR,SAASA,CAAAA,CAAMQ,CAAAA,IAAAA,GACrBC,MAAOT,QAAPS,CAAAA,MAAOT,CAASA,QAAAA,CAAAA,CAAAA,CAAMS,QACtBC,YAAcV,CAAAA,QAAdU,CAAAA,YAAcV,CAAAA,CAAAA,QAASA,CAAAA,EAAMU,YAC7BC,GAAAA,QAAAA,CAA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,QAAAA,CAAAA,CAAU,EACVC,WAAa,CAAA,CAAA,CAAA,CACbC,iBAAiB,CACjBC,CAAAA,aAAAA,CAAAA,CAAe,EACfC,cAAgB,CAAA,CAAA,CAAA,CAChBC,cAAc,CACdC,CAAAA,OAAAA,CAAAA,CAAS,EACTC,QAAU,CAAA,CAAA,CAAA,CACVC,cAAc,CACdtF,CAAAA,KAAAA,CAAAA,CAAO,EACPuF,YAAc,CAAA,CAAA,CAAA,CAAA,CAAA,EAIwCX,OAAOC,MAAO,CAAAtH,aAAA,CAAAA,aAAA,IACjEoH,OACH3E,KAAO,CAAA,CAAA,CAAA,CACPuF,cAAc,CAIuCX,EAAAA,CAAAA,CAAAA,MAAAA,CAAOC,sCACzDF,CAAAA,MACH3E,OAAO,CACP+E,CAAAA,WAAAA,CAAAA,CAAa"}
|
1
|
+
{"version":3,"file":"form.cjs.js","sources":["../../../src/internal/form.ts"],"sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type { NileFormControl } from '../internal/nile-element';\nimport type { NileButton } from '../nile-button';\n\n//\n// We store a WeakMap of forms + controls so we can keep references to all Nile controls within a given form. As\n// elements connect and disconnect to/from the DOM, their containing form is used as the key and the form control is\n// added and removed from the form's set, respectively.\n//\nexport const formCollections: WeakMap<HTMLFormElement, Set<NileFormControl>> = new WeakMap();\n\n//\n// We store a WeakMap of reportValidity() overloads so we can override it when form controls connect to the DOM and\n// restore the original behavior when they disconnect.\n//\nconst reportValidityOverloads: WeakMap<HTMLFormElement, () => boolean> = new WeakMap();\n\n//\n// We store a Set of controls that users have interacted with. This allows us to determine the interaction state\n// without littering the DOM with additional data attributes.\n//\nconst userInteractedControls: WeakSet<NileFormControl> = new WeakSet();\n\n//\n// We store a WeakMap of interactions for each form control so we can track when all conditions are met for validation.\n//\nconst interactions = new WeakMap<NileFormControl, string[]>();\n\nexport interface FormControlControllerOptions {\n /** A function that returns the form containing the form control. */\n form: (input: NileFormControl) => HTMLFormElement | null;\n /** A function that returns the form control's name, which will be submitted with the form data. */\n name: (input: NileFormControl) => string;\n /** A function that returns the form control's current value. */\n value: (input: NileFormControl) => unknown | unknown[];\n /** A function that returns the form control's default value. */\n defaultValue: (input: NileFormControl) => unknown | unknown[];\n /** A function that returns the form control's current disabled state. If disabled, the value won't be submitted. */\n disabled: (input: NileFormControl) => boolean;\n /**\n * A function that maps to the form control's reportValidity() function. When the control is invalid, this will\n * prevent submission and trigger the browser's constraint violation warning.\n */\n reportValidity: (input: NileFormControl) => boolean;\n /** A function that sets the form control's value */\n setValue: (input: NileFormControl, value: unknown) => void;\n /**\n * An array of event names to listen to. When all events in the list are emitted, the control will receive validity\n * states such as user-valid and user-invalid.user interacted validity states. */\n assumeInteractionOn: string[];\n}\n\n/** A reactive controller to allow form controls to participate in form submission, validation, etc. */\nexport class FormControlController implements ReactiveController {\n host: NileFormControl & ReactiveControllerHost;\n form?: HTMLFormElement | null;\n options: FormControlControllerOptions;\n\n constructor(host: ReactiveControllerHost & NileFormControl, options?: Partial<FormControlControllerOptions>) {\n (this.host = host).addController(this);\n this.options = {\n form: input => {\n // If there's a form attribute, use it to find the target form by id\n if (input.hasAttribute('form') && input.getAttribute('form') !== '') {\n const root = input.getRootNode() as Document | ShadowRoot;\n const formId = input.getAttribute('form');\n\n if (formId) {\n return root.getElementById(formId) as HTMLFormElement;\n }\n }\n\n return input.closest('form');\n },\n name: input => input.name,\n value: input => input.value,\n defaultValue: input => input.defaultValue,\n disabled: input => input.disabled ?? false,\n reportValidity: input => (typeof input.reportValidity === 'function' ? input.reportValidity() : true),\n setValue: (input, value: string) => (input.value = value),\n assumeInteractionOn: ['nile-input'],\n ...options\n };\n this.handleFormData = this.handleFormData.bind(this);\n this.handleFormSubmit = this.handleFormSubmit.bind(this);\n this.handleFormReset = this.handleFormReset.bind(this);\n this.reportFormValidity = this.reportFormValidity.bind(this);\n this.handleInteraction = this.handleInteraction.bind(this);\n }\n\n hostConnected() {\n const form = this.options.form(this.host);\n\n if (form) {\n this.attachForm(form);\n }\n\n // Listen for interactions\n interactions.set(this.host, []);\n this.options.assumeInteractionOn.forEach(event => {\n this.host.addEventListener(event, this.handleInteraction);\n });\n }\n\n hostDisconnected() {\n this.detachForm();\n\n // Clean up interactions\n interactions.delete(this.host);\n this.options.assumeInteractionOn.forEach(event => {\n this.host.removeEventListener(event, this.handleInteraction);\n });\n }\n\n hostUpdated() {\n const form = this.options.form(this.host);\n\n // Detach if the form no longer exists\n if (!form) {\n this.detachForm();\n }\n\n // If the form has changed, reattach it\n if (form && this.form !== form) {\n this.detachForm();\n this.attachForm(form);\n }\n\n if (this.host.hasUpdated) {\n this.setValidity(this.host.validity.valid);\n }\n }\n\n private attachForm(form?: HTMLFormElement) {\n if (form) {\n this.form = form;\n\n // Add this element to the form's collection\n if (formCollections.has(this.form)) {\n formCollections.get(this.form)!.add(this.host);\n } else {\n formCollections.set(this.form, new Set<NileFormControl>([this.host]));\n }\n\n this.form.addEventListener('formdata', this.handleFormData);\n this.form.addEventListener('submit', this.handleFormSubmit);\n this.form.addEventListener('reset', this.handleFormReset);\n\n // Overload the form's reportValidity() method so it looks at nile form controls\n if (!reportValidityOverloads.has(this.form)) {\n reportValidityOverloads.set(this.form, this.form.reportValidity);\n this.form.reportValidity = () => this.reportFormValidity();\n }\n } else {\n this.form = undefined;\n }\n }\n\n private detachForm() {\n if (this.form) {\n // Remove this element from the form's collection\n formCollections.get(this.form)?.delete(this.host);\n\n this.form.removeEventListener('formdata', this.handleFormData);\n this.form.removeEventListener('submit', this.handleFormSubmit);\n this.form.removeEventListener('reset', this.handleFormReset);\n\n // Remove the overload and restore the original method\n if (reportValidityOverloads.has(this.form)) {\n this.form.reportValidity = reportValidityOverloads.get(this.form)!;\n reportValidityOverloads.delete(this.form);\n }\n }\n\n this.form = undefined;\n }\n\n private handleFormData(event: FormDataEvent) {\n const disabled = this.options.disabled(this.host);\n const name = this.options.name(this.host);\n const value = this.options.value(this.host);\n\n // For buttons, we only submit the value if they were the submitter. This is currently done in doAction() by\n // injecting the name/value on a temporary button, so we can just skip them here.\n const isButton = this.host.tagName.toLowerCase() === 'nile-button';\n\n if (!disabled && !isButton && typeof name === 'string' && name.length > 0 && typeof value !== 'undefined') {\n if (Array.isArray(value)) {\n (value as unknown[]).forEach(val => {\n event.formData.append(name, (val as string | number | boolean).toString());\n });\n } else {\n event.formData.append(name, (value as string | number | boolean).toString());\n }\n }\n }\n\n private handleFormSubmit(event: Event) {\n const disabled = this.options.disabled(this.host);\n const reportValidity = this.options.reportValidity;\n\n // Update the interacted state for all controls when the form is submitted\n if (this.form && !this.form.noValidate) {\n formCollections.get(this.form)?.forEach(control => {\n this.setUserInteracted(control, true);\n });\n }\n\n if (this.form && !this.form.noValidate && !disabled && !reportValidity(this.host)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n private handleFormReset() {\n this.options.setValue(this.host, this.options.defaultValue(this.host));\n this.setUserInteracted(this.host, false);\n interactions.set(this.host, []);\n }\n\n private handleInteraction(event: Event) {\n const emittedEvents = interactions.get(this.host)!;\n\n if (!emittedEvents.includes(event.type)) {\n emittedEvents.push(event.type);\n }\n\n // Mark it as user-interacted as soon as all associated events have been emitted\n if (emittedEvents.length === this.options.assumeInteractionOn.length) {\n this.setUserInteracted(this.host, true);\n }\n }\n\n private reportFormValidity() {\n //\n // Nile form controls work hard to act like regular form controls. They support the Constraint Validation API\n // and its associated methods such as setCustomValidity() and reportValidity(). However, the HTMLFormElement also\n // has a reportValidity() method that will trigger validation on all child controls. Since we're not yet using\n // ElementInternals, we need to overload this method so it looks for any element with the reportValidity() method.\n //\n // We preserve the original method in a WeakMap, but we don't call it from the overload because that would trigger\n // validations in an unexpected order. When the element disconnects, we revert to the original behavior. This won't\n // be necessary once we can use ElementInternals.\n //\n // Note that we're also honoring the form's novalidate attribute.\n //\n if (this.form && !this.form.noValidate) {\n // This seems sloppy, but checking all elements will cover native inputs, Nile inputs, and other custom\n // elements that support the constraint validation API.\n const elements = this.form.querySelectorAll<HTMLInputElement>('*');\n\n for (const element of elements) {\n if (typeof element.reportValidity === 'function') {\n if (!element.reportValidity()) {\n return false;\n }\n }\n }\n }\n\n return true;\n }\n\n private setUserInteracted(el: NileFormControl, hasInteracted: boolean) {\n if (hasInteracted) {\n userInteractedControls.add(el);\n } else {\n userInteractedControls.delete(el);\n }\n\n el.requestUpdate();\n }\n\n private doAction(type: 'submit' | 'reset', submitter?: HTMLInputElement | NileButton) {\n if (this.form) {\n const button = document.createElement('button');\n button.type = type;\n button.style.position = 'absolute';\n button.style.width = '0';\n button.style.height = '0';\n button.style.clipPath = 'inset(50%)';\n button.style.overflow = 'hidden';\n button.style.whiteSpace = 'nowrap';\n\n // Pass name, value, and form attributes through to the temporary button\n if (submitter) {\n button.name = submitter.name;\n button.value = submitter.value;\n\n ['formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget'].forEach(attr => {\n if (submitter.hasAttribute(attr)) {\n button.setAttribute(attr, submitter.getAttribute(attr)!);\n }\n });\n }\n\n this.form.append(button);\n button.click();\n button.remove();\n }\n }\n\n /** Returns the associated `<form>` element, if one exists. */\n getForm() {\n return this.form ?? null;\n }\n\n /** Resets the form, restoring all the control to their default value */\n reset(submitter?: HTMLInputElement | NileButton) {\n this.doAction('reset', submitter);\n }\n\n /** Submits the form, triggering validation and form data injection. */\n submit(submitter?: HTMLInputElement | NileButton) {\n // Calling form.submit() bypasses the submit event and constraint validation. To prevent this, we can inject a\n // native submit button into the form, \"click\" it, then remove it to simulate a standard form submission.\n this.doAction('submit', submitter);\n }\n\n /**\n * Synchronously sets the form control's validity. Call this when you know the future validity but need to update\n * the host element immediately, i.e. before Lit updates the component in the next update.\n */\n setValidity(isValid: boolean) {\n const host = this.host;\n const hasInteracted = Boolean(userInteractedControls.has(host));\n const required = Boolean(host.required);\n\n //\n // We're mapping the following \"states\" to data attributes. In the future, we can use ElementInternals.states to\n // create a similar mapping, but instead of [data-invalid] it will look like :--invalid.\n //\n //\n host.toggleAttribute('data-required', required);\n host.toggleAttribute('data-optional', !required);\n host.toggleAttribute('data-invalid', !isValid);\n host.toggleAttribute('data-valid', isValid);\n host.toggleAttribute('data-user-invalid', !isValid && hasInteracted);\n host.toggleAttribute('data-user-valid', isValid && hasInteracted);\n }\n\n /**\n * Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything\n * that affects constraint validation changes so the component receives the correct validity states.\n */\n updateValidity() {\n const host = this.host;\n this.setValidity(host.validity.valid);\n }\n\n /**\n * Dispatches a non-bubbling, cancelable custom event of type `nile-invalid`.\n * If the `nile-invalid` event will be cancelled then the original `invalid`\n * event (which may have been passed as argument) will also be cancelled.\n * If no original `invalid` event has been passed then the `nile-invalid`\n * event will be cancelled before being dispatched.\n */\n emitInvalidEvent(originalInvalidEvent?: Event) {\n const slInvalidEvent = new CustomEvent<Record<PropertyKey, never>>('nile-invalid', {\n bubbles: false,\n composed: false,\n cancelable: true,\n detail: {}\n });\n\n if (!originalInvalidEvent) {\n slInvalidEvent.preventDefault();\n }\n\n if (!this.host.dispatchEvent(slInvalidEvent)) {\n originalInvalidEvent?.preventDefault();\n }\n }\n}\n\n/*\n * Predefined common validity states.\n * All of them are read-only.\n */\n\n// A validity state object that represents `valid`\nexport const validValidityState: ValidityState = Object.freeze({\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: true,\n valueMissing: false\n});\n\n// A validity state object that represents `value missing`\nexport const valueMissingValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n valueMissing: true\n});\n\n// A validity state object that represents a custom error\nexport const customErrorValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n customError: true\n});\n"],"names":["formCollections","WeakMap","reportValidityOverloads","userInteractedControls","WeakSet","interactions","FormControlController","e","host","options","this","addController","_objectSpread","form","input","hasAttribute","getAttribute","root","getRootNode","formId","getElementById","closest","name","value","defaultValue","disabled","reportValidity","setValue","assumeInteractionOn","handleFormData","bind","handleFormSubmit","handleFormReset","reportFormValidity","handleInteraction","_createClass","key","hostConnected","_this","attachForm","set","forEach","event","addEventListener","hostDisconnected","detachForm","removeEventListener","hostUpdated","hasUpdated","setValidity","validity","valid","has","get","add","Set","undefined","isButton","tagName","toLowerCase","length","Array","isArray","val","formData","append","toString","noValidate","control","setUserInteracted","preventDefault","stopImmediatePropagation","emittedEvents","includes","type","push","elements","querySelectorAll","_iterator","_createForOfIteratorHelper","s","_step","n","done","element","err","f","el","hasInteracted","delete","requestUpdate","doAction","submitter","button","document","createElement","style","position","width","height","clipPath","overflow","whiteSpace","attr","setAttribute","click","remove","getForm","_this$form","reset","submit","isValid","Boolean","required","toggleAttribute","updateValidity","emitInvalidEvent","originalInvalidEvent","slInvalidEvent","CustomEvent","bubbles","composed","cancelable","detail","dispatchEvent","_export","validValidityState","Object","freeze","badInput","customError","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort","typeMismatch","valueMissing"],"mappings":"wmGASaA,EAAkE,GAAIC,CAAAA,OAAAA,CAAAA,CAAAA,CAM7EC,EAAmE,GAAID,CAAAA,OAAAA,CAAAA,CAAAA,CAMvEE,EAAmD,GAAIC,CAAAA,OAAAA,CAAAA,CAAAA,CAKvDC,EAAe,GAAIJ,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,OAAAA,KA2BZK,CAKX,yBAAA,SAAAC,EAAYC,CAAgDC,CAAAA,CAAAA,CAAAA,CAAAA,eAAAA,MAAAA,CAAAA,EAAAA,CACzDC,KAAKF,IAAOA,CAAAA,CAAAA,EAAMG,aAAcD,CAAAA,IAAAA,CAAAA,CACjCA,KAAKD,OAAU,CAAAG,aAAA,EACbC,KAAMC,QAAND,CAAAA,KAAMC,CAEJ,CAAA,CAAA,GAAIA,EAAMC,YAAa,CAAA,MAAA,CAAA,EAA0C,KAA/BD,CAAME,CAAAA,YAAAA,CAAa,QAAgB,CACnE,GAAMC,CAAAA,GAAOH,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AAA,CAAgB,CACjFC,OAAS,CAAA,CAAA,CAAA,CACTC,UAAU,CACVC,CAAAA,UAAAA,CAAAA,CAAY,EACZC,MAAQ,CAAA,CAAE,IAGPN,CACHC,EAAAA,CAAAA,CAAehD,iBAGZ5D,IAAKF,CAAAA,IAAAA,CAAKoH,cAAcN,CAC3BD,CAAAA,GAAAA,CAAAA,SAAAA,CAAAA,iBAAAA,CAAAA,CAAsB/C,cAEzB,CAAA,CAAA,GAAA,SAAAuD,OAAA,KASUC,CAAoCC,CAAAA,MAAAA,CAAOC,OAAO,CAC7DC,QAAAA,CAAAA,CAAU,EACVC,WAAa,CAAA,CAAA,CAAA,CACbC,iBAAiB,CACjBC,CAAAA,aAAAA,CAAAA,CAAe,EACfC,cAAgB,CAAA,CAAA,CAAA,CAChBC,cAAc,CACdC,CAAAA,OAAAA,CAAAA,CAAS,EACTC,QAAU,CAAA,CAAA,CAAA,CACVC,cAAc,CACdtF,CAAAA,KAAAA,CAAAA,CAAO,EACPuF,YAAc,CAAA,CAAA,CAAA,CAAA,CAAA,EAIwCX,OAAOC,MAAO,CAAApH,aAAA,CAAAA,aAAA,IACjEkH,OACH3E,KAAO,CAAA,CAAA,CAAA,CACPuF,cAAc,CAIuCX,EAAAA,CAAAA,CAAAA,MAAAA,CAAOC,sCACzDF,CAAAA,MACH3E,OAAO,CACP+E,CAAAA,WAAAA,CAAAA,CAAa"}
|
@@ -1 +1 @@
|
|
1
|
-
const t=new WeakMap,i=new WeakMap,s=new WeakSet,h=new WeakMap;class e{constructor(t,i){(this.host=t).addController(this),this.options={form:t=>{if(t.hasAttribute("form")&&""!==t.getAttribute("form")){const i=t.getRootNode(),s=t.getAttribute("form");if(s)return i.getElementById(s)}return t.closest("form")},name:t=>t.name,value:t=>t.value,defaultValue:t=>t.defaultValue,disabled:t=>t.disabled??!1,reportValidity:t=>"function"!=typeof t.reportValidity||t.reportValidity(),setValue:(t,i)=>t.value=i,assumeInteractionOn:["nile-input"],...i},this.handleFormData=this.handleFormData.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.handleFormReset=this.handleFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this),this.handleInteraction=this.handleInteraction.bind(this)}hostConnected(){const t=this.options
|
1
|
+
const t=new WeakMap,i=new WeakMap,s=new WeakSet,h=new WeakMap;class e{constructor(t,i){(this.host=t).addController(this),this.options={form:t=>{if(t.hasAttribute("form")&&""!==t.getAttribute("form")){const i=t.getRootNode(),s=t.getAttribute("form");if(s)return i.getElementById(s)}return t.closest("form")},name:t=>t.name,value:t=>t.value,defaultValue:t=>t.defaultValue,disabled:t=>t.disabled??!1,reportValidity:t=>"function"!=typeof t.reportValidity||t.reportValidity(),setValue:(t,i)=>t.value=i,assumeInteractionOn:["nile-input"],...i},this.handleFormData=this.handleFormData.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.handleFormReset=this.handleFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this),this.handleInteraction=this.handleInteraction.bind(this)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),h.set(this.host,[]),this.options.assumeInteractionOn.forEach((t=>{this.host.addEventListener(t,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),h.delete(this.host),this.options.assumeInteractionOn.forEach((t=>{this.host.removeEventListener(t,this.handleInteraction)}))}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(s){s?(this.form=s,t.has(this.form)?t.get(this.form).add(this.host):t.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),i.has(this.form)||(i.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){this.form&&(t.get(this.form)?.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),i.has(this.form)&&(this.form.reportValidity=i.get(this.form),i.delete(this.form))),this.form=void 0}handleFormData(t){const i=this.options.disabled(this.host),s=this.options.name(this.host),h=this.options.value(this.host),e="nile-button"===this.host.tagName.toLowerCase();!i&&!e&&"string"==typeof s&&s.length>0&&void 0!==h&&(Array.isArray(h)?h.forEach((i=>{t.formData.append(s,i.toString())})):t.formData.append(s,h.toString()))}handleFormSubmit(i){const s=this.options.disabled(this.host),h=this.options.reportValidity;this.form&&!this.form.noValidate&&t.get(this.form)?.forEach((t=>{this.setUserInteracted(t,!0)})),!this.form||this.form.noValidate||s||h(this.host)||(i.preventDefault(),i.stopImmediatePropagation())}handleFormReset(){this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),h.set(this.host,[])}handleInteraction(t){const i=h.get(this.host);i.includes(t.type)||i.push(t.type),i.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)}reportFormValidity(){if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const i of t)if("function"==typeof i.reportValidity&&!i.reportValidity())return!1}return!0}setUserInteracted(t,i){i?s.add(t):s.delete(t),t.requestUpdate()}doAction(t,i){if(this.form){const s=document.createElement("button");s.type=t,s.style.position="absolute",s.style.width="0",s.style.height="0",s.style.clipPath="inset(50%)",s.style.overflow="hidden",s.style.whiteSpace="nowrap",i&&(s.name=i.name,s.value=i.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach((t=>{i.hasAttribute(t)&&s.setAttribute(t,i.getAttribute(t))}))),this.form.append(s),s.click(),s.remove()}}getForm(){return this.form??null}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){const i=this.host,h=Boolean(s.has(i)),e=Boolean(i.required);i.toggleAttribute("data-required",e),i.toggleAttribute("data-optional",!e),i.toggleAttribute("data-invalid",!t),i.toggleAttribute("data-valid",t),i.toggleAttribute("data-user-invalid",!t&&h),i.toggleAttribute("data-user-valid",t&&h)}updateValidity(){const t=this.host;this.setValidity(t.validity.valid)}emitInvalidEvent(t){const i=new CustomEvent("nile-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||i.preventDefault(),this.host.dispatchEvent(i)||t?.preventDefault()}}const o=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1});Object.freeze({...o,valid:!1,valueMissing:!0}),Object.freeze({...o,valid:!1,customError:!0});export{e as F,o as v};
|
@@ -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","./nile-accordion.cjs.js","../sinon-esm-97570c13.cjs.js","tslib","./nile-accordion.css.cjs.js","../internal/nile-element.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","lit/decorators.js","../utilities/animation-registry.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js"],function(_export,_context){"use strict";var a,e,i,n,o,r,t,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12;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){a=_fixture003CjsJs.f;e=_fixture003CjsJs.a;i=_fixture003CjsJs.e;n=_fixture003CjsJs.o;},function(_litStaticHtmlJs){o=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileAccordionCjsJs){r=_nileAccordionCjsJs.N;},function(_sinonEsm004CjsJs){t=_sinonEsm004CjsJs.s;},function(_tslib){},function(_nileAccordionCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAnimateCjsJs){},function(_litDirectivesClassMapJs){},function(_litDecoratorsJs){},function(_utilitiesAnimationRegistryCjsJs){},function(_internalEventCjsJs){},function(_internalWatchCjsJs){}],execute:function execute(){describe("NileAccordion",function(){it("should render correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return a(o(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context2.sent;e(i).to.be.instanceOf(r),e(i.shadowRoot).not.to.be["null"],e(i.summary).to.equal("Test Summary");case 4:case"end":return _context2.stop();}},_callee);}))),it("should initialize closed by default",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _i$shadowRoot;var i,n;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return a(o(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context3.sent;e(i.open).to.be["false"];n=(_i$shadowRoot=i.shadowRoot)===null||_i$shadowRoot===void 0?void 0:_i$shadowRoot.querySelector(".accordian__body");e(n===null||n===void 0?void 0:n.hidden).to.be["true"];case 6:case"end":return _context3.stop();}},_callee2);}))),it("should open when clicked",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _n$shadowRoot,_n$shadowRoot2;var n,r,t;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return a(o(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context4.sent;r=(_n$shadowRoot=n.shadowRoot)===null||_n$shadowRoot===void 0?void 0:_n$shadowRoot.querySelector(".accordian__header");r.click();_context4.next=7;return i(n);case 7:e(n.open).to.be["true"];t=(_n$shadowRoot2=n.shadowRoot)===null||_n$shadowRoot2===void 0?void 0:_n$shadowRoot2.querySelector(".accordian__body");e(t===null||t===void 0?void 0:t.hidden).to.be["false"];case 10:case"end":return _context4.stop();}},_callee3);}))),it('should emit "nile-show" and "nile-after-show" when opened',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _i$shadowRoot2;var i,r,c;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return a(o(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context5.sent;r=t.spy(i,"emit");c=(_i$shadowRoot2=i.shadowRoot)===null||_i$shadowRoot2===void 0?void 0:_i$shadowRoot2.querySelector(".accordian__header");setTimeout(function(){return c.click();});_context5.next=8;return n(i,"nile-after-show");case 8:e(r.calledWith("nile-show")).to.be["true"];e(r.calledWith("nile-after-show")).to.be["true"];case 10:case"end":return _context5.stop();}},_callee4);}))),it('should emit "nile-hide" and "nile-after-hide" when closed',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _i$shadowRoot3;var i,r,c;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return a(o(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" open></nile-accordion>"]))));case 2:i=_context6.sent;r=t.spy(i,"emit");c=(_i$shadowRoot3=i.shadowRoot)===null||_i$shadowRoot3===void 0?void 0:_i$shadowRoot3.querySelector(".accordian__header");setTimeout(function(){return c.click();});_context6.next=8;return n(i,"nile-after-hide");case 8:e(r.calledWith("nile-hide")).to.be["true"];e(r.calledWith("nile-after-hide")).to.be["true"];case 10:case"end":return _context6.stop();}},_callee5);}))),it('should be disabled when the "disabled" property is set',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _n$shadowRoot3;var n,r;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return a(o(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" disabled></nile-accordion>"]))));case 2:n=_context7.sent;r=(_n$shadowRoot3=n.shadowRoot)===null||_n$shadowRoot3===void 0?void 0:_n$shadowRoot3.querySelector(".accordian__header");r.click();_context7.next=7;return i(n);case 7:e(n.open).to.be["false"];case 8:case"end":return _context7.stop();}},_callee6);}))),it("should handle keyboard interaction (Enter and Space)",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _n$shadowRoot4;var n,r,t,c;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return a(o(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context8.sent;r=(_n$shadowRoot4=n.shadowRoot)===null||_n$shadowRoot4===void 0?void 0:_n$shadowRoot4.querySelector(".accordian__header");t=new KeyboardEvent("keydown",{key:"Enter"});r.dispatchEvent(t);_context8.next=8;return i(n);case 8:e(n.open).to.be["true"];c=new KeyboardEvent("keydown",{key:" "});r.dispatchEvent(c);_context8.next=13;return i(n);case 13:e(n.open).to.be["false"];case 14:case"end":return _context8.stop();}},_callee7);}))),it("should handle ArrowUp/ArrowLeft to close and ArrowDown/ArrowRight to open",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _n$shadowRoot5;var n,r,t,c;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return a(o(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context9.sent;r=(_n$shadowRoot5=n.shadowRoot)===null||_n$shadowRoot5===void 0?void 0:_n$shadowRoot5.querySelector(".accordian__header");t=new KeyboardEvent("keydown",{key:"ArrowDown"});r.dispatchEvent(t);_context9.next=8;return i(n);case 8:e(n.open).to.be["true"];c=new KeyboardEvent("keydown",{key:"ArrowUp"});r.dispatchEvent(c);_context9.next=13;return i(n);case 13:e(n.open).to.be["false"];case 14:case"end":return _context9.stop();}},_callee8);}))),it('should apply the "variant" class based on the variant property',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var _i$shadowRoot4;var i,n;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return a(o(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" variant=\"dark\"></nile-accordion>"]))));case 2:i=_context10.sent;n=(_i$shadowRoot4=i.shadowRoot)===null||_i$shadowRoot4===void 0?void 0:_i$shadowRoot4.querySelector(".accordian__header");e(n).to.have["class"]("accordian__header--dark");case 5:case"end":return _context10.stop();}},_callee9);}))),it("should apply the correct size class based on the size property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var _i$shadowRoot5;var i,n;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return a(o(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" size=\"lg\"></nile-accordion>"]))));case 2:i=_context11.sent;n=(_i$shadowRoot5=i.shadowRoot)===null||_i$shadowRoot5===void 0?void 0:_i$shadowRoot5.querySelector(".accordian");e(n).to.have["class"]("accordian--lg");case 5:case"end":return _context11.stop();}},_callee10);}))),it("should apply the correct expand icon placement class based on the expandIconPlacement property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var _i$shadowRoot6;var i,n;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return a(o(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" expandIconPlacement=\"left\"></nile-accordion>"]))));case 2:i=_context12.sent;n=(_i$shadowRoot6=i.shadowRoot)===null||_i$shadowRoot6===void 0?void 0:_i$shadowRoot6.querySelector(".accordian__header");e(n).to.have["class"]("accordian__header--arrow-left");case 5:case"end":return _context12.stop();}},_callee11);}))),it("should animate when opening and closing",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var _n$shadowRoot6;var n,r,c;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return a(o(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context13.sent;r=t.spy(n,"handleOpenChange");c=(_n$shadowRoot6=n.shadowRoot)===null||_n$shadowRoot6===void 0?void 0:_n$shadowRoot6.querySelector(".accordian__header");c.click();_context13.next=8;return i(n);case 8:e(r.called).to.be["true"];c.click();_context13.next=12;return i(n);case 12:e(r.calledTwice).to.be["true"];case 13:case"end":return _context13.stop();}},_callee12);})));});}};});
|
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-3330277d.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-accordion.cjs.js","../sinon-esm-97570c13.cjs.js","tslib","./nile-accordion.css.cjs.js","../internal/nile-element.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","lit/decorators.js","../utilities/animation-registry.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js"],function(_export,_context){"use strict";var a,e,i,n,o,r,t,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12;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(_fixture001CjsJs){a=_fixture001CjsJs.f;e=_fixture001CjsJs.a;i=_fixture001CjsJs.e;n=_fixture001CjsJs.o;},function(_litStaticHtmlJs){o=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileAccordionCjsJs){r=_nileAccordionCjsJs.N;},function(_sinonEsm002CjsJs){t=_sinonEsm002CjsJs.s;},function(_tslib){},function(_nileAccordionCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAnimateCjsJs){},function(_litDirectivesClassMapJs){},function(_litDecoratorsJs){},function(_utilitiesAnimationRegistryCjsJs){},function(_internalEventCjsJs){},function(_internalWatchCjsJs){}],execute:function execute(){describe("NileAccordion",function(){it("should render correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return a(o(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context2.sent;e(i).to.be.instanceOf(r),e(i.shadowRoot).not.to.be["null"],e(i.summary).to.equal("Test Summary");case 4:case"end":return _context2.stop();}},_callee);}))),it("should initialize closed by default",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _i$shadowRoot;var i,n;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return a(o(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context3.sent;e(i.open).to.be["false"];n=(_i$shadowRoot=i.shadowRoot)===null||_i$shadowRoot===void 0?void 0:_i$shadowRoot.querySelector(".accordian__body");e(n===null||n===void 0?void 0:n.hidden).to.be["true"];case 6:case"end":return _context3.stop();}},_callee2);}))),it("should open when clicked",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _n$shadowRoot,_n$shadowRoot2;var n,r,t;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return a(o(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context4.sent;r=(_n$shadowRoot=n.shadowRoot)===null||_n$shadowRoot===void 0?void 0:_n$shadowRoot.querySelector(".accordian__header");r.click();_context4.next=7;return i(n);case 7:e(n.open).to.be["true"];t=(_n$shadowRoot2=n.shadowRoot)===null||_n$shadowRoot2===void 0?void 0:_n$shadowRoot2.querySelector(".accordian__body");e(t===null||t===void 0?void 0:t.hidden).to.be["false"];case 10:case"end":return _context4.stop();}},_callee3);}))),it('should emit "nile-show" and "nile-after-show" when opened',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _i$shadowRoot2;var i,r,c;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return a(o(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:i=_context5.sent;r=t.spy(i,"emit");c=(_i$shadowRoot2=i.shadowRoot)===null||_i$shadowRoot2===void 0?void 0:_i$shadowRoot2.querySelector(".accordian__header");setTimeout(function(){return c.click();});_context5.next=8;return n(i,"nile-after-show");case 8:e(r.calledWith("nile-show")).to.be["true"];e(r.calledWith("nile-after-show")).to.be["true"];case 10:case"end":return _context5.stop();}},_callee4);}))),it('should emit "nile-hide" and "nile-after-hide" when closed',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _i$shadowRoot3;var i,r,c;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return a(o(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" open></nile-accordion>"]))));case 2:i=_context6.sent;r=t.spy(i,"emit");c=(_i$shadowRoot3=i.shadowRoot)===null||_i$shadowRoot3===void 0?void 0:_i$shadowRoot3.querySelector(".accordian__header");setTimeout(function(){return c.click();});_context6.next=8;return n(i,"nile-after-hide");case 8:e(r.calledWith("nile-hide")).to.be["true"];e(r.calledWith("nile-after-hide")).to.be["true"];case 10:case"end":return _context6.stop();}},_callee5);}))),it('should be disabled when the "disabled" property is set',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _n$shadowRoot3;var n,r;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return a(o(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" disabled></nile-accordion>"]))));case 2:n=_context7.sent;r=(_n$shadowRoot3=n.shadowRoot)===null||_n$shadowRoot3===void 0?void 0:_n$shadowRoot3.querySelector(".accordian__header");r.click();_context7.next=7;return i(n);case 7:e(n.open).to.be["false"];case 8:case"end":return _context7.stop();}},_callee6);}))),it("should handle keyboard interaction (Enter and Space)",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _n$shadowRoot4;var n,r,t,c;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return a(o(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context8.sent;r=(_n$shadowRoot4=n.shadowRoot)===null||_n$shadowRoot4===void 0?void 0:_n$shadowRoot4.querySelector(".accordian__header");t=new KeyboardEvent("keydown",{key:"Enter"});r.dispatchEvent(t);_context8.next=8;return i(n);case 8:e(n.open).to.be["true"];c=new KeyboardEvent("keydown",{key:" "});r.dispatchEvent(c);_context8.next=13;return i(n);case 13:e(n.open).to.be["false"];case 14:case"end":return _context8.stop();}},_callee7);}))),it("should handle ArrowUp/ArrowLeft to close and ArrowDown/ArrowRight to open",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _n$shadowRoot5;var n,r,t,c;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return a(o(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context9.sent;r=(_n$shadowRoot5=n.shadowRoot)===null||_n$shadowRoot5===void 0?void 0:_n$shadowRoot5.querySelector(".accordian__header");t=new KeyboardEvent("keydown",{key:"ArrowDown"});r.dispatchEvent(t);_context9.next=8;return i(n);case 8:e(n.open).to.be["true"];c=new KeyboardEvent("keydown",{key:"ArrowUp"});r.dispatchEvent(c);_context9.next=13;return i(n);case 13:e(n.open).to.be["false"];case 14:case"end":return _context9.stop();}},_callee8);}))),it('should apply the "variant" class based on the variant property',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var _i$shadowRoot4;var i,n;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return a(o(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" variant=\"dark\"></nile-accordion>"]))));case 2:i=_context10.sent;n=(_i$shadowRoot4=i.shadowRoot)===null||_i$shadowRoot4===void 0?void 0:_i$shadowRoot4.querySelector(".accordian__header");e(n).to.have["class"]("accordian__header--dark");case 5:case"end":return _context10.stop();}},_callee9);}))),it("should apply the correct size class based on the size property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var _i$shadowRoot5;var i,n;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return a(o(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" size=\"lg\"></nile-accordion>"]))));case 2:i=_context11.sent;n=(_i$shadowRoot5=i.shadowRoot)===null||_i$shadowRoot5===void 0?void 0:_i$shadowRoot5.querySelector(".accordian");e(n).to.have["class"]("accordian--lg");case 5:case"end":return _context11.stop();}},_callee10);}))),it("should apply the correct expand icon placement class based on the expandIconPlacement property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var _i$shadowRoot6;var i,n;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return a(o(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\" expandIconPlacement=\"left\"></nile-accordion>"]))));case 2:i=_context12.sent;n=(_i$shadowRoot6=i.shadowRoot)===null||_i$shadowRoot6===void 0?void 0:_i$shadowRoot6.querySelector(".accordian__header");e(n).to.have["class"]("accordian__header--arrow-left");case 5:case"end":return _context12.stop();}},_callee11);}))),it("should animate when opening and closing",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var _n$shadowRoot6;var n,r,c;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return a(o(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["<nile-accordion summary=\"Test Summary\"></nile-accordion>"]))));case 2:n=_context13.sent;r=t.spy(n,"handleOpenChange");c=(_n$shadowRoot6=n.shadowRoot)===null||_n$shadowRoot6===void 0?void 0:_n$shadowRoot6.querySelector(".accordian__header");c.click();_context13.next=8;return i(n);case 8:e(r.called).to.be["true"];c.click();_context13.next=12;return i(n);case 12:e(r.calledTwice).to.be["true"];case 13:case"end":return _context13.stop();}},_callee12);})));});}};});
|
2
2
|
//# sourceMappingURL=nile-accordian.test.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
import{f as a,a as e,e as i,o as n}from"../fixture-
|
1
|
+
import{f as a,a as e,e as i,o as n}from"../fixture-588a3119.esm.js";import{html as o}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as r}from"./nile-accordion.esm.js";import{s as t}from"../sinon-esm-68c8e378.esm.js";import"tslib";import"./nile-accordion.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/animate.esm.js";import"lit/directives/class-map.js";import"lit/decorators.js";import"../utilities/animation-registry.esm.js";import"../internal/event.esm.js";import"../internal/watch.esm.js";describe("NileAccordion",(()=>{it("should render correctly",(async()=>{const i=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`);e(i).to.be.instanceOf(r),e(i.shadowRoot).not.to.be.null,e(i.summary).to.equal("Test Summary")})),it("should initialize closed by default",(async()=>{const i=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`);e(i.open).to.be.false;const n=i.shadowRoot?.querySelector(".accordian__body");e(n?.hidden).to.be.true})),it("should open when clicked",(async()=>{const n=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`),r=n.shadowRoot?.querySelector(".accordian__header");r.click(),await i(n),e(n.open).to.be.true;const t=n.shadowRoot?.querySelector(".accordian__body");e(t?.hidden).to.be.false})),it('should emit "nile-show" and "nile-after-show" when opened',(async()=>{const i=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`),r=t.spy(i,"emit"),c=i.shadowRoot?.querySelector(".accordian__header");setTimeout((()=>c.click())),await n(i,"nile-after-show"),e(r.calledWith("nile-show")).to.be.true,e(r.calledWith("nile-after-show")).to.be.true})),it('should emit "nile-hide" and "nile-after-hide" when closed',(async()=>{const i=await a(o`<nile-accordion summary="Test Summary" open></nile-accordion>`),r=t.spy(i,"emit"),c=i.shadowRoot?.querySelector(".accordian__header");setTimeout((()=>c.click())),await n(i,"nile-after-hide"),e(r.calledWith("nile-hide")).to.be.true,e(r.calledWith("nile-after-hide")).to.be.true})),it('should be disabled when the "disabled" property is set',(async()=>{const n=await a(o`<nile-accordion summary="Test Summary" disabled></nile-accordion>`),r=n.shadowRoot?.querySelector(".accordian__header");r.click(),await i(n),e(n.open).to.be.false})),it("should handle keyboard interaction (Enter and Space)",(async()=>{const n=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`),r=n.shadowRoot?.querySelector(".accordian__header"),t=new KeyboardEvent("keydown",{key:"Enter"});r.dispatchEvent(t),await i(n),e(n.open).to.be.true;const c=new KeyboardEvent("keydown",{key:" "});r.dispatchEvent(c),await i(n),e(n.open).to.be.false})),it("should handle ArrowUp/ArrowLeft to close and ArrowDown/ArrowRight to open",(async()=>{const n=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`),r=n.shadowRoot?.querySelector(".accordian__header"),t=new KeyboardEvent("keydown",{key:"ArrowDown"});r.dispatchEvent(t),await i(n),e(n.open).to.be.true;const c=new KeyboardEvent("keydown",{key:"ArrowUp"});r.dispatchEvent(c),await i(n),e(n.open).to.be.false})),it('should apply the "variant" class based on the variant property',(async()=>{const i=await a(o`<nile-accordion summary="Test Summary" variant="dark"></nile-accordion>`),n=i.shadowRoot?.querySelector(".accordian__header");e(n).to.have.class("accordian__header--dark")})),it("should apply the correct size class based on the size property",(async()=>{const i=await a(o`<nile-accordion summary="Test Summary" size="lg"></nile-accordion>`),n=i.shadowRoot?.querySelector(".accordian");e(n).to.have.class("accordian--lg")})),it("should apply the correct expand icon placement class based on the expandIconPlacement property",(async()=>{const i=await a(o`<nile-accordion summary="Test Summary" expandIconPlacement="left"></nile-accordion>`),n=i.shadowRoot?.querySelector(".accordian__header");e(n).to.have.class("accordian__header--arrow-left")})),it("should animate when opening and closing",(async()=>{const n=await a(o`<nile-accordion summary="Test Summary"></nile-accordion>`),r=t.spy(n,"handleOpenChange"),c=n.shadowRoot?.querySelector(".accordian__header");c.click(),await i(n),e(r.called).to.be.true,c.click(),await i(n),e(r.calledTwice).to.be.true}))}));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["./nile-auto-complete.cjs.js","tslib","lit","lit/decorators.js","./nile-auto-complete.css.cjs.js","../internal/nile-element.cjs.js","
|
1
|
+
System.register(["./nile-auto-complete.cjs.js","tslib","lit","lit/decorators.js","./nile-auto-complete.css.cjs.js","../internal/nile-element.cjs.js","lit/directive.js","lit/async-directive.js","lit/directives/repeat.js"],function(_export,_context){"use strict";return{setters:[function(_nileAutoCompleteCjsJs){_export("NileAutoComplete",_nileAutoCompleteCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileAutoCompleteCssCjsJs){},function(_internalNileElementCjsJs){},function(_litDirectiveJs){},function(_litAsyncDirectiveJs){},function(_litDirectivesRepeatJs){}],execute:function execute(){}};});
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
export{N as NileAutoComplete}from"./nile-auto-complete.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-auto-complete.css.esm.js";import"../internal/nile-element.esm.js";import"
|
1
|
+
export{N as NileAutoComplete}from"./nile-auto-complete.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-auto-complete.css.esm.js";import"../internal/nile-element.esm.js";import"lit/directive.js";import"lit/async-directive.js";import"lit/directives/repeat.js";
|
@@ -1,2 +1,18 @@
|
|
1
|
-
System.register(["tslib","lit","lit/decorators.js","./nile-auto-complete.css.cjs.js","../internal/nile-element.cjs.js","../virtualize-b6a2fbe0.cjs.js","lit/directive.js","lit/async-directive.js","lit/directives/repeat.js"],function(_export,_context){"use strict";var t,i,e,s,n,o,r,l,h,p,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,a;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);}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.html;e=_lit.nothing;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;n=_litDecoratorsJs.property;o=_litDecoratorsJs.state;r=_litDecoratorsJs.customElement;},function(_nileAutoCompleteCssCjsJs){l=_nileAutoCompleteCssCjsJs.s;},function(_internalNileElementCjsJs){h=_internalNileElementCjsJs.N;},function(_virtualize001CjsJs){p=_virtualize001CjsJs.v;},function(_litDirectiveJs){},function(_litAsyncDirectiveJs){},function(_litDirectivesRepeatJs){}],execute:function execute(){_export("N",a=/*#__PURE__*/function(_h){function a(){var _this;_classCallCheck(this,a);_this=_callSuper(this,a,arguments),_this.disabled=!1,_this.isDropdownOpen=!1,_this.enableVirtualScroll=!1,_this.openOnFocus=!1,_this.value="",_this.placeholder="Type here ..",_this.noBorder=!1,_this.loading=!1,_this.filterFunction=function(t,i){return t.toLowerCase().includes(i.toLowerCase());},_this.renderItemFunction=function(t){return t;},_this.allMenuItems=[],_this.menuItems=[];return _this;}_inherits(a,_h);return _createClass(a,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(a,"connectedCallback",this,3)([]),this.renderItemFunction=function(t){return t;};}},{key:"updated",value:function updated(t){_superPropGet(a,"updated",this,3)([t]),t.has("allMenuItems")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.setVirtualMenuWidth()),t.has("isDropdownOpen")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction)),t.has("value")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction));}},{key:"render",value:function render(){var t=this.enableVirtualScroll?this.getVirtualizedContent():this.getContent();return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-dropdown class=\"nile-dropdown--input\" ?open="," noOpenOnCLick>\n <nile-input class=\"nile-auto-complete--input\"\n ?no-border=","\n .disabled=","\n .value=","\n @nile-input=","\n @focus=","\n @click=","\n slot=\"trigger\"\n placeholder=","\n >\n ","\n </nile-input>\n ","\n </nile-dropdown>\n "])),this.isDropdownOpen,this.noBorder,this.disabled,this.value,this.handleSearch,this.handleFocus,this.handleClick,this.placeholder,this.loading?i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-icon slot=\"suffix\" color=\"var(--nile-colors-primary-600)\" name=\"button-loading-blue-animated\"></nile-icon>"]))):e,this.menuItems.length>0&&!this.loading?t:e);}},{key:"getVirtualizedContent",value:function getVirtualizedContent(){var _this2=this;return i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-menu class=\"virtualized__menu\" @nile-select="," id=\"content-menu\" exportparts=\"menu__items-wrapper:options__wrapper\">\n ","\n </nile-menu>\n "])),this.handleSelect,p({items:this.menuItems,renderItem:function renderItem(t){return _this2.getItemRenderFunction(t);},scroller:!0}));}},{key:"getContent",value:function getContent(){var _this3=this;return i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-menu id=\"content-menu\" @nile-select="," exportparts=\"menu__items-wrapper:options__wrapper\">\n ","\n </nile-menu>"])),this.handleSelect,this.menuItems.map(function(t){return _this3.getItemRenderFunction(t);}));}},{key:"getItemRenderFunction",value:function getItemRenderFunction(t){var e=this.renderItemFunction(t);return i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-menu-item value=",">\n ","\n </nile-menu-item>\n "])),e,e);}},{key:"handleSelect",value:function handleSelect(t){var _this$dropdownElement;this.value=t.detail.value,this.emit("nile-complete",{value:t.detail.value}),this.isDropdownOpen=!1,(_this$dropdownElement=this.dropdownElement)===null||_this$dropdownElement===void 0?void 0:_this$dropdownElement.hide();}},{key:"setVirtualMenuWidth",value:function setVirtualMenuWidth(){var _this4=this;var t=this.menuItems.reduce(function(t,i){var e=_this4.renderItemFunction(i).length;return t>e?t:e;},0),i=9.5*t<110?110:9.5*t;this.style.setProperty("--virtual-scroll-container-width",i+"px");}},{key:"handleSearch",value:function handleSearch(t){var _this$dropdownElement2;this.value=t.detail.value.toLowerCase(),this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.isDropdownOpen=this.menuItems.length>0,this.isDropdownOpen&&((_this$dropdownElement2=this.dropdownElement)===null||_this$dropdownElement2===void 0?void 0:_this$dropdownElement2.show());}},{key:"handleFocus",value:function handleFocus(){var _this5=this;this.openOnFocus&&setTimeout(function(){var _this5$dropdownElemen;_this5.isDropdownOpen=!0,(_this5$dropdownElemen=_this5.dropdownElement)===null||_this5$dropdownElemen===void 0?void 0:_this5$dropdownElemen.show();},300);}},{key:"handleClick",value:function handleClick(){var _this$dropdownElement3;this.isDropdownOpen=!0,(_this$dropdownElement3=this.dropdownElement)===null||_this$dropdownElement3===void 0?void 0:_this$dropdownElement3.show();}},{key:"applyFilter",value:function applyFilter(t,i){var _this6=this;if("object"!=_typeof(t))return[];var e=[];return t.forEach(function(t){return i(t,_this6.value)&&e.push(t);}),e;}}]);}(h));a.styles=l,t([s("nile-dropdown")],a.prototype,"dropdownElement",void 0),t([n({type:Boolean})],a.prototype,"disabled",void 0),t([n({type:Boolean})],a.prototype,"isDropdownOpen",void 0),t([n({type:Boolean})],a.prototype,"enableVirtualScroll",void 0),t([n({type:Boolean})],a.prototype,"openOnFocus",void 0),t([n({type:String})],a.prototype,"value",void 0),t([n({type:String})],a.prototype,"placeholder",void 0),t([n({type:Boolean})],a.prototype,"noBorder",void 0),t([n({type:Boolean})],a.prototype,"loading",void 0),t([n({attribute:!1})],a.prototype,"filterFunction",void 0),t([n({attribute:!1})],a.prototype,"renderItemFunction",void 0),t([n({type:Array})],a.prototype,"allMenuItems",void 0),t([o()],a.prototype,"menuItems",void 0),_export("N",a=t([r("nile-auto-complete")],a));}};});
|
1
|
+
System.register(["tslib","lit","lit/decorators.js","./nile-auto-complete.css.cjs.js","../internal/nile-element.cjs.js","lit/directive.js","lit/async-directive.js","lit/directives/repeat.js"],function(_export,_context){"use strict";var t,i,s,h,e,n,o,l,r,u,a,c,d,p,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,m,f,w,v,g,_,y,b,x,S,$,z;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);}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,F=function F(){};return{s:F,n:function(_n4){function n(){return _n4.apply(this,arguments);}n.toString=function(){return _n4.toString();};return n;}(function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]};}),e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _regeneratorRuntime(){"use strict";/*! 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 ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _wrapNativeSuper(t){var r="function"==typeof Map?new Map():void 0;return _wrapNativeSuper=function _wrapNativeSuper(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper);}function Wrapper(){return _construct(t,arguments,_getPrototypeOf(this).constructor);}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,t);},_wrapNativeSuper(t);}function _construct(t,e,r){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var p=new(t.bind.apply(t,o))();return r&&_setPrototypeOf(p,r.prototype),p;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _isNativeFunction(t){try{return-1!==Function.toString.call(t).indexOf("[native code]");}catch(n){return"function"==typeof t;}}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function M(t){var i=t?parseFloat(t):NaN;return Number.isNaN(i)?0:i;}function C(t){if(null!==t.assignedSlot)return t.assignedSlot;if(null!==t.parentElement)return t.parentElement;var i=t.parentNode;return i&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&i.host||null;}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.noChange;s=_lit.html;h=_lit.nothing;},function(_litDecoratorsJs){e=_litDecoratorsJs.query;n=_litDecoratorsJs.property;o=_litDecoratorsJs.state;l=_litDecoratorsJs.customElement;},function(_nileAutoCompleteCssCjsJs){r=_nileAutoCompleteCssCjsJs.s;},function(_internalNileElementCjsJs){u=_internalNileElementCjsJs.N;},function(_litDirectiveJs){a=_litDirectiveJs.directive;c=_litDirectiveJs.PartType;},function(_litAsyncDirectiveJs){d=_litAsyncDirectiveJs.AsyncDirective;},function(_litDirectivesRepeatJs){p=_litDirectivesRepeatJs.repeat;}],execute:function execute(){/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2021 Google LLC
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
5
|
+
*/m=/*#__PURE__*/function(_Event){function m(t){var _this;_classCallCheck(this,m);_this=_callSuper(this,m,[m.eventName,{bubbles:!1}]),_this.first=t.first,_this.last=t.last;return _this;}_inherits(m,_Event);return _createClass(m);}(/*#__PURE__*/_wrapNativeSuper(Event));m.eventName="rangeChanged";f=/*#__PURE__*/function(_Event2){function f(t){var _this2;_classCallCheck(this,f);_this2=_callSuper(this,f,[f.eventName,{bubbles:!1}]),_this2.first=t.first,_this2.last=t.last;return _this2;}_inherits(f,_Event2);return _createClass(f);}(/*#__PURE__*/_wrapNativeSuper(Event));f.eventName="visibilityChanged";w=/*#__PURE__*/function(_Event3){function w(){_classCallCheck(this,w);return _callSuper(this,w,[w.eventName,{bubbles:!1}]);}_inherits(w,_Event3);return _createClass(w);}(/*#__PURE__*/_wrapNativeSuper(Event));w.eventName="unpinned";/**
|
6
|
+
* @license
|
7
|
+
* Copyright 2021 Google LLC
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
9
|
+
*/v=/*#__PURE__*/function(){function v(t){_classCallCheck(this,v);this._element=null;var i=t!==null&&t!==void 0?t:window;this._node=i,t&&(this._element=t);}return _createClass(v,[{key:"element",get:function get(){return this._element||document.scrollingElement||document.documentElement;}},{key:"scrollTop",get:function get(){return this.element.scrollTop||window.scrollY;}},{key:"scrollLeft",get:function get(){return this.element.scrollLeft||window.scrollX;}},{key:"scrollHeight",get:function get(){return this.element.scrollHeight;}},{key:"scrollWidth",get:function get(){return this.element.scrollWidth;}},{key:"viewportHeight",get:function get(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight;}},{key:"viewportWidth",get:function get(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth;}},{key:"maxScrollTop",get:function get(){return this.scrollHeight-this.viewportHeight;}},{key:"maxScrollLeft",get:function get(){return this.scrollWidth-this.viewportWidth;}}]);}();g=/*#__PURE__*/function(_v){function g(t,i){var _this3;_classCallCheck(this,g);_this3=_callSuper(this,g,[i]),_this3._clients=new Set(),_this3._retarget=null,_this3._end=null,_this3.t=null,_this3.correctingScrollError=!1,_this3._checkForArrival=_this3._checkForArrival.bind(_assertThisInitialized(_this3)),_this3._updateManagedScrollTo=_this3._updateManagedScrollTo.bind(_assertThisInitialized(_this3)),_this3.scrollTo=_this3.scrollTo.bind(_assertThisInitialized(_this3)),_this3.scrollBy=_this3.scrollBy.bind(_assertThisInitialized(_this3));var s=_this3._node;_this3._originalScrollTo=s.scrollTo,_this3._originalScrollBy=s.scrollBy,_this3._originalScroll=s.scroll,_this3._attach(t);return _this3;}_inherits(g,_v);return _createClass(g,[{key:"_destination",get:function get(){return this.t;}},{key:"scrolling",get:function get(){return null!==this._destination;}},{key:"scrollTo",value:function scrollTo(t,i){var s="number"==typeof t&&"number"==typeof i?{left:t,top:i}:t;this._scrollTo(s);}},{key:"scrollBy",value:function scrollBy(t,i){var s="number"==typeof t&&"number"==typeof i?{left:t,top:i}:t;void 0!==s.top&&(s.top+=this.scrollTop),void 0!==s.left&&(s.left+=this.scrollLeft),this._scrollTo(s);}},{key:"_nativeScrollTo",value:function _nativeScrollTo(t){this._originalScrollTo.bind(this._element||window)(t);}},{key:"_scrollTo",value:function _scrollTo(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;null!==this._end&&this._end(),"smooth"===t.behavior?(this._setDestination(t),this._retarget=i,this._end=s):this._resetScrollState(),this._nativeScrollTo(t);}},{key:"_setDestination",value:function _setDestination(t){var i=t.top,s=t.left;return i=void 0===i?void 0:Math.max(0,Math.min(i,this.maxScrollTop)),s=void 0===s?void 0:Math.max(0,Math.min(s,this.maxScrollLeft)),(null===this._destination||s!==this._destination.left||i!==this._destination.top)&&(this.t={top:i,left:s,behavior:"smooth"},!0);}},{key:"_resetScrollState",value:function _resetScrollState(){this.t=null,this._retarget=null,this._end=null;}},{key:"_updateManagedScrollTo",value:function _updateManagedScrollTo(t){this._destination&&this._setDestination(t)&&this._nativeScrollTo(this._destination);}},{key:"managedScrollTo",value:function managedScrollTo(t,i,s){return this._scrollTo(t,i,s),this._updateManagedScrollTo;}},{key:"correctScrollError",value:function correctScrollError(t){var _this4=this;this.correctingScrollError=!0,requestAnimationFrame(function(){return requestAnimationFrame(function(){return _this4.correctingScrollError=!1;});}),this._nativeScrollTo(t),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination);}},{key:"_checkForArrival",value:function _checkForArrival(){if(null!==this._destination){var _t=this.scrollTop,_i=this.scrollLeft;var _this$_destination=this._destination,_s=_this$_destination.top,_h=_this$_destination.left;_s=Math.min(_s||0,this.maxScrollTop),_h=Math.min(_h||0,this.maxScrollLeft);var _e=Math.abs(_s-_t),_n=Math.abs(_h-_i);_e<1&&_n<1&&(this._end&&this._end(),this._resetScrollState());}}},{key:"detach",value:function detach(t){return this._clients["delete"](t),0===this._clients.size&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null;}},{key:"_attach",value:function _attach(t){this._clients.add(t),1===this._clients.size&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival));}}]);}(v);/**
|
10
|
+
* @license
|
11
|
+
* Copyright 2021 Google LLC
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
13
|
+
*/_="undefined"!=typeof window?window.ResizeObserver:void 0;y=Symbol("virtualizerRef"),b="virtualizer-sizer";S=/*#__PURE__*/function(){function S(t){_classCallCheck(this,S);if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map(),this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet(),this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!t)throw new Error("Virtualizer constructor requires a configuration object");if(!t.hostElement)throw new Error('Virtualizer configuration requires the "hostElement" property');this._init(t);}return _createClass(S,[{key:"items",set:function set(t){Array.isArray(t)&&t!==this._items&&(this._itemsChanged=!0,this._items=t,this._schedule(this._updateLayout));}},{key:"_init",value:function _init(t){this._isScroller=!!t.scroller,this._initHostElement(t);var i=t.layout||{};this._layoutInitialized=this._initLayout(i);}},{key:"_initObservers",value:function _initObservers(){var _this5=this;this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new _(function(){return _this5._hostElementSizeChanged();}),this._childrenRO=new _(this._childrenSizeChanged.bind(this));}},{key:"_initHostElement",value:function _initHostElement(t){var i=this._hostElement=t.hostElement;this._applyVirtualizerStyles(),i[y]=this;}},{key:"connected",value:function connected(){this._initObservers();var t=this._isScroller;this._clippingAncestors=function(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var s=!1;return function(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var s=[];var h=i?t:C(t);for(;null!==h;)s.push(h),h=C(h);return s;}(t,i).filter(function(t){if(s)return!1;var i=getComputedStyle(t);return s="fixed"===i.position,"visible"!==i.overflow;});}/**
|
14
|
+
* @license
|
15
|
+
* Copyright 2021 Google LLC
|
16
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
17
|
+
*/(this._hostElement,t),this._scrollerController=new g(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0;}},{key:"_observeAndListen",value:function _observeAndListen(){var _this6=this;this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(function(t){t.addEventListener("scroll",_this6,_this6._scrollEventListenerOptions),_this6._scrollEventListeners.push(t),_this6._hostElementRO.observe(t);}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(function(t){return _this6._childrenRO.observe(t);}),this._scrollEventListeners.forEach(function(t){return t.addEventListener("scroll",_this6,_this6._scrollEventListenerOptions);});}},{key:"disconnected",value:function disconnected(){var _this7=this,_this$_scrollerContro,_this$_mutationObserv,_this$_hostElementRO,_this$_childrenRO;this._scrollEventListeners.forEach(function(t){return t.removeEventListener("scroll",_this7,_this7._scrollEventListenerOptions);}),this._scrollEventListeners=[],this._clippingAncestors=[],(_this$_scrollerContro=this._scrollerController)!==null&&_this$_scrollerContro!==void 0&&_this$_scrollerContro.detach(this),this._scrollerController=null,(_this$_mutationObserv=this._mutationObserver)!==null&&_this$_mutationObserv!==void 0&&_this$_mutationObserv.disconnect(),this._mutationObserver=null,(_this$_hostElementRO=this._hostElementRO)!==null&&_this$_hostElementRO!==void 0&&_this$_hostElementRO.disconnect(),this._hostElementRO=null,(_this$_childrenRO=this._childrenRO)!==null&&_this$_childrenRO!==void 0&&_this$_childrenRO.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1;}},{key:"_applyVirtualizerStyles",value:function _applyVirtualizerStyles(){var t=this._hostElement.style;t.display=t.display||"block",t.position=t.position||"relative",t.contain=t.contain||"size layout",this._isScroller&&(t.overflow=t.overflow||"auto",t.minHeight=t.minHeight||"150px");}},{key:"_getSizer",value:function _getSizer(){var t=this._hostElement;if(!this._sizer){var _i2=t.querySelector("[".concat(b,"]"));_i2||(_i2=document.createElement("div"),_i2.setAttribute(b,""),t.appendChild(_i2)),Object.assign(_i2.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),_i2.textContent=" ",_i2.setAttribute(b,""),this._sizer=_i2;}return this._sizer;}},{key:"updateLayoutConfig",value:function(){var _updateLayoutConfig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(t){var i,_i3;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this._layoutInitialized;case 2:i=t.type||x;if(!("function"==typeof i&&this._layout instanceof i)){_context2.next=6;break;}_i3=_objectSpread({},t);return _context2.abrupt("return",(delete _i3.type,this._layout.config=_i3,!0));case 6:return _context2.abrupt("return",!1);case 7:case"end":return _context2.stop();}},_callee,this);}));function updateLayoutConfig(_x){return _updateLayoutConfig.apply(this,arguments);}return updateLayoutConfig;}()},{key:"_initLayout",value:function(){var _initLayout2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(t){var _this8=this;var i,s,_h2;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if("function"==typeof t.type){s=t.type;_h2=_objectSpread({},t);delete _h2.type,i=_h2;}else i=t;_context3.t0=void 0===s;if(!_context3.t0){_context3.next=6;break;}_context3.next=5;return _context["import"]("../flow-d0fa8803.cjs.js");case 5:x=s=_context3.sent.FlowLayout;case 6:this._layout=new s(function(t){return _this8._handleLayoutMessage(t);},i);this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout));this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0);this._schedule(this._updateLayout);case 10:case"end":return _context3.stop();}},_callee2,this);}));function _initLayout(_x2){return _initLayout2.apply(this,arguments);}return _initLayout;}()},{key:"startBenchmarking",value:function startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now());}},{key:"stopBenchmarking",value:function stopBenchmarking(){var _this9=this;if(null!==this._benchmarkStart){var _t2=window.performance.now(),i=_t2-this._benchmarkStart,s=performance.getEntriesByName("uv-virtualizing","measure").filter(function(i){return i.startTime>=_this9._benchmarkStart&&i.startTime<_t2;}).reduce(function(t,i){return t+i.duration;},0);return this._benchmarkStart=null,{timeElapsed:i,virtualizationTime:s};}return null;}},{key:"_measureChildren",value:function _measureChildren(){var t={},i=this._children,s=this._measureChildOverride||this._measureChild;for(var _h3=0;_h3<i.length;_h3++){var _e2=i[_h3],_n2=this._first+_h3;(this._itemsChanged||this._toBeMeasured.has(_e2))&&(t[_n2]=s.call(this,_e2,this._items[_n2]));}this._childMeasurements=t,this._schedule(this._updateLayout),this._toBeMeasured.clear();}},{key:"_measureChild",value:function _measureChild(t){var _t$getBoundingClientR=t.getBoundingClientRect(),i=_t$getBoundingClientR.width,s=_t$getBoundingClientR.height;return Object.assign({width:i,height:s},function(t){var i=window.getComputedStyle(t);return{marginTop:M(i.marginTop),marginRight:M(i.marginRight),marginBottom:M(i.marginBottom),marginLeft:M(i.marginLeft)};}(t));}},{key:"_schedule",value:function(){var _schedule2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(t){return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.t0=this._scheduled.has(t);if(_context4.t0){_context4.next=7;break;}this._scheduled.add(t);_context4.next=5;return Promise.resolve();case 5:this._scheduled["delete"](t);t.call(this);case 7:case"end":return _context4.stop();}},_callee3,this);}));function _schedule(_x3){return _schedule2.apply(this,arguments);}return _schedule;}()},{key:"_updateDOM",value:function(){var _updateDOM2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(t){var i,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:this._scrollSize=t.scrollSize,this._adjustRange(t.range),this._childrenPos=t.childPositions,this._scrollError=t.scrollError||null;i=this._rangeChanged,s=this._itemsChanged;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(i||s)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate();case 3:case"end":return _context5.stop();}},_callee4,this);}));function _updateDOM(_x4){return _updateDOM2.apply(this,arguments);}return _updateDOM;}()},{key:"_finishDOMUpdate",value:function _finishDOMUpdate(){var _this10=this;this._connected&&(this._children.forEach(function(t){return _this10._childrenRO.observe(t);}),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"));}},{key:"_updateLayout",value:function _updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"));}},{key:"_handleScrollEvent",value:function _handleScrollEvent(){var _this$_layout;if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end");}catch(t){console.warn("Error measuring performance data: ",t);}window.performance.mark("uv-start");}!1===this._scrollerController.correctingScrollError&&(_this$_layout=this._layout)!==null&&_this$_layout!==void 0&&_this$_layout.unpin(),this._schedule(this._updateLayout);}},{key:"handleEvent",value:function handleEvent(t){if("scroll"===t.type)(t.currentTarget===window||this._clippingAncestors.includes(t.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",t);}},{key:"_handleLayoutMessage",value:function _handleLayoutMessage(t){"stateChanged"===t.type?this._updateDOM(t):"visibilityChanged"===t.type?(this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._notifyVisibility()):"unpinned"===t.type&&this._hostElement.dispatchEvent(new w());}},{key:"_children",get:function get(){var t=[];var i=this._hostElement.firstElementChild;for(;i;)i.hasAttribute(b)||t.push(i),i=i.nextElementSibling;return t;}},{key:"_updateView",value:function _updateView(){var _this$_scrollerContro2;var t=this._hostElement,i=(_this$_scrollerContro2=this._scrollerController)===null||_this$_scrollerContro2===void 0?void 0:_this$_scrollerContro2.element,s=this._layout;if(t&&i&&s){var _h4,_e3,_n3,_o;var _l=t.getBoundingClientRect();_h4=0,_e3=0,_n3=window.innerHeight,_o=window.innerWidth;var _r=this._clippingAncestors.map(function(t){return t.getBoundingClientRect();});_r.unshift(_l);var _iterator=_createForOfIteratorHelper(_r),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _t3=_step.value;_h4=Math.max(_h4,_t3.top),_e3=Math.max(_e3,_t3.left),_n3=Math.min(_n3,_t3.bottom),_o=Math.min(_o,_t3.right);}}catch(err){_iterator.e(err);}finally{_iterator.f();}var _u=i.getBoundingClientRect(),_a={left:_l.left-_u.left,top:_l.top-_u.top},_c={width:i.scrollWidth,height:i.scrollHeight},_d=_h4-_l.top+t.scrollTop,_p=_e3-_l.left+t.scrollLeft,_m=Math.max(0,_n3-_h4),_f=Math.max(0,_o-_e3);s.viewportSize={width:_f,height:_m},s.viewportScroll={top:_d,left:_p},s.totalScrollSize=_c,s.offsetWithinScroller=_a;}}},{key:"_sizeHostElement",value:function _sizeHostElement(t){var i=82e5,s=t&&null!==t.width?Math.min(i,t.width):0,h=t&&null!==t.height?Math.min(i,t.height):0;if(this._isScroller)this._getSizer().style.transform="translate(".concat(s,"px, ").concat(h,"px)");else{var _t4=this._hostElement.style;_t4.minWidth=s?"".concat(s,"px"):"100%",_t4.minHeight=h?"".concat(h,"px"):"100%";}}},{key:"_positionChildren",value:function _positionChildren(t){var _this11=this;t&&t.forEach(function(_ref,o){var t=_ref.top,i=_ref.left,s=_ref.width,h=_ref.height,e=_ref.xOffset,n=_ref.yOffset;var l=_this11._children[o-_this11._first];l&&(l.style.position="absolute",l.style.boxSizing="border-box",l.style.transform="translate(".concat(i,"px, ").concat(t,"px)"),void 0!==s&&(l.style.width=s+"px"),void 0!==h&&(l.style.height=h+"px"),l.style.left=void 0===e?null:e+"px",l.style.top=void 0===n?null:n+"px");});}},{key:"_adjustRange",value:function(){var _adjustRange2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(t){var i,s,h,e;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:i=this._first,s=this._last,h=this._firstVisible,e=this._lastVisible;this._first=t.first,this._last=t.last,this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==i||this._last!==s,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==h||this._lastVisible!==e;case 2:case"end":return _context6.stop();}},_callee5,this);}));function _adjustRange(_x5){return _adjustRange2.apply(this,arguments);}return _adjustRange;}()},{key:"_correctScrollError",value:function _correctScrollError(){if(this._scrollError){var _this$_scrollerContro3=this._scrollerController,_t5=_this$_scrollerContro3.scrollTop,i=_this$_scrollerContro3.scrollLeft,_this$_scrollError=this._scrollError,s=_this$_scrollError.top,_h5=_this$_scrollError.left;this._scrollError=null,this._scrollerController.correctScrollError({top:_t5-s,left:i-_h5});}}},{key:"element",value:function element(t){var _this$_items,_this12=this;return t===1/0&&(t=this._items.length-1),void 0===((_this$_items=this._items)===null||_this$_items===void 0?void 0:_this$_items[t])?void 0:{scrollIntoView:function scrollIntoView(){var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return _this12._scrollElementIntoView(_objectSpread(_objectSpread({},i),{},{index:t}));}};}},{key:"_scrollElementIntoView",value:function _scrollElementIntoView(t){var _this13=this;if(t.index>=this._first&&t.index<=this._last)this._children[t.index-this._first].scrollIntoView(t);else if(t.index=Math.min(t.index,this._items.length-1),"smooth"===t.behavior){var i=this._layout.getScrollIntoViewCoordinates(t),s=t.behavior;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(i,{behavior:s}),function(){return _this13._layout.getScrollIntoViewCoordinates(t);},function(){return _this13._scrollIntoViewTarget=null;}),this._scrollIntoViewTarget=t;}else this._layout.pin=t;}},{key:"_checkScrollIntoViewTarget",value:function _checkScrollIntoViewTarget(t){var _ref2=this._scrollIntoViewTarget||{},i=_ref2.index;i&&(t===null||t===void 0?void 0:t.has(i))&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget));}},{key:"_notifyRange",value:function _notifyRange(){this._hostElement.dispatchEvent(new m({first:this._first,last:this._last}));}},{key:"_notifyVisibility",value:function _notifyVisibility(){this._hostElement.dispatchEvent(new f({first:this._firstVisible,last:this._lastVisible}));}},{key:"layoutComplete",get:function get(){var _this14=this;return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise(function(t,i){_this14._layoutCompleteResolver=t,_this14._layoutCompleteRejecter=i;})),this._layoutCompletePromise;}},{key:"_rejectLayoutCompletePromise",value:function _rejectLayoutCompletePromise(t){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(t),this._resetLayoutCompleteState();}},{key:"_scheduleLayoutComplete",value:function _scheduleLayoutComplete(){var _this15=this;this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame(function(){return requestAnimationFrame(function(){return _this15._resolveLayoutCompletePromise();});}));}},{key:"_resolveLayoutCompletePromise",value:function _resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState();}},{key:"_resetLayoutCompleteState",value:function _resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null;}},{key:"_hostElementSizeChanged",value:function _hostElementSizeChanged(){this._schedule(this._updateLayout);}},{key:"_childLoaded",value:function _childLoaded(){}},{key:"_childrenSizeChanged",value:function _childrenSizeChanged(t){var _this$_layout2;if((_this$_layout2=this._layout)!==null&&_this$_layout2!==void 0&&_this$_layout2.measureChildren){var _iterator2=_createForOfIteratorHelper(t),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var i=_step2.value;this._toBeMeasured.set(i.target,i.contentRect);}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}this._measureChildren();}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1;}}]);}();$=a(/*#__PURE__*/function(_d2){function _class(t){var _this16;_classCallCheck(this,_class);if(_this16=_callSuper(this,_class,[t]),_this16._virtualizer=null,_this16._first=0,_this16._last=-1,_this16._renderItem=function(t,i){return function(t,i){return s(_templateObject||(_templateObject=_taggedTemplateLiteral(["",": ",""])),i,JSON.stringify(t,null,2));}(t,i+_this16._first);},_this16._keyFunction=function(t,i){return function(t){return t;}(t,_this16._first);},_this16._items=[],t.type!==c.CHILD)throw new Error("The virtualize directive can only be used in child expressions");return _this16;}_inherits(_class,_d2);return _createClass(_class,[{key:"render",value:function render(t){t&&this._setFunctions(t);var i=[];if(this._first>=0&&this._last>=this._first)for(var _t6=this._first;_t6<=this._last;_t6++)i.push(this._items[_t6]);return p(i,this._keyFunction,this._renderItem);}},{key:"update",value:function update(t,_ref3){var _ref4=_slicedToArray(_ref3,1),s=_ref4[0];this._setFunctions(s);var h=this._items!==s.items;return this._items=s.items||[],this._virtualizer?this._updateVirtualizerConfig(t,s):this._initialize(t,s),h?i:this.render();}},{key:"_updateVirtualizerConfig",value:function(){var _updateVirtualizerConfig2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(t,i){var _s2;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return this._virtualizer.updateLayoutConfig(i.layout||{});case 2:if(_context7.sent){_context7.next=5;break;}_s2=t.parentNode;this._makeVirtualizer(_s2,i);case 5:this._virtualizer.items=this._items;case 6:case"end":return _context7.stop();}},_callee6,this);}));function _updateVirtualizerConfig(_x6,_x7){return _updateVirtualizerConfig2.apply(this,arguments);}return _updateVirtualizerConfig;}()},{key:"_setFunctions",value:function _setFunctions(t){var _this17=this;var i=t.renderItem,s=t.keyFunction;i&&(this._renderItem=function(t,s){return i(t,s+_this17._first);}),s&&(this._keyFunction=function(t,i){return s(t,i+_this17._first);});}},{key:"_makeVirtualizer",value:function _makeVirtualizer(t,i){this._virtualizer&&this._virtualizer.disconnected();var s=i.layout,h=i.scroller,e=i.items;this._virtualizer=new S({hostElement:t,layout:s,scroller:h}),this._virtualizer.items=e,this._virtualizer.connected();}},{key:"_initialize",value:function _initialize(t,i){var _this18=this;var s=t.parentNode;s&&1===s.nodeType&&(s.addEventListener("rangeChanged",function(t){_this18._first=t.first,_this18._last=t.last,_this18.setValue(_this18.render());}),this._makeVirtualizer(s,i));}},{key:"disconnected",value:function disconnected(){var _this$_virtualizer;(_this$_virtualizer=this._virtualizer)===null||_this$_virtualizer===void 0||_this$_virtualizer.disconnected();}},{key:"reconnected",value:function reconnected(){var _this$_virtualizer2;(_this$_virtualizer2=this._virtualizer)===null||_this$_virtualizer2===void 0||_this$_virtualizer2.connected();}}]);}(d));_export("N",z=/*#__PURE__*/function(_u2){function z(){var _this19;_classCallCheck(this,z);_this19=_callSuper(this,z,arguments),_this19.disabled=!1,_this19.isDropdownOpen=!1,_this19.enableVirtualScroll=!1,_this19.openOnFocus=!1,_this19.value="",_this19.placeholder="Type here ..",_this19.noBorder=!1,_this19.loading=!1,_this19.filterFunction=function(t,i){return t.toLowerCase().includes(i.toLowerCase());},_this19.renderItemFunction=function(t){return t;},_this19.allMenuItems=[],_this19.menuItems=[];return _this19;}_inherits(z,_u2);return _createClass(z,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(z,"connectedCallback",this,3)([]),this.renderItemFunction=function(t){return t;};}},{key:"updated",value:function updated(t){_superPropGet(z,"updated",this,3)([t]),t.has("allMenuItems")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.setVirtualMenuWidth()),t.has("isDropdownOpen")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction)),t.has("value")&&(this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction));}},{key:"render",value:function render(){var t=this.enableVirtualScroll?this.getVirtualizedContent():this.getContent();return s(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-dropdown class=\"nile-dropdown--input\" ?open="," noOpenOnCLick>\n <nile-input class=\"nile-auto-complete--input\"\n ?no-border=","\n .disabled=","\n .value=","\n @nile-input=","\n @focus=","\n @click=","\n slot=\"trigger\"\n placeholder=","\n >\n ","\n </nile-input>\n ","\n </nile-dropdown>\n "])),this.isDropdownOpen,this.noBorder,this.disabled,this.value,this.handleSearch,this.handleFocus,this.handleClick,this.placeholder,this.loading?s(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-icon slot=\"suffix\" color=\"var(--nile-colors-primary-600)\" name=\"button-loading-blue-animated\"></nile-icon>"]))):h,this.menuItems.length>0&&!this.loading?t:h);}},{key:"getVirtualizedContent",value:function getVirtualizedContent(){var _this20=this;return s(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-menu class=\"virtualized__menu\" @nile-select="," id=\"content-menu\" exportparts=\"menu__items-wrapper:options__wrapper\">\n ","\n </nile-menu>\n "])),this.handleSelect,$({items:this.menuItems,renderItem:function renderItem(t){return _this20.getItemRenderFunction(t);},scroller:!0}));}},{key:"getContent",value:function getContent(){var _this21=this;return s(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-menu id=\"content-menu\" @nile-select="," exportparts=\"menu__items-wrapper:options__wrapper\">\n ","\n </nile-menu>"])),this.handleSelect,this.menuItems.map(function(t){return _this21.getItemRenderFunction(t);}));}},{key:"getItemRenderFunction",value:function getItemRenderFunction(t){var i=this.renderItemFunction(t);return s(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-menu-item value=",">\n ","\n </nile-menu-item>\n "])),i,i);}},{key:"handleSelect",value:function handleSelect(t){var _this$dropdownElement;this.value=t.detail.value,this.emit("nile-complete",{value:t.detail.value}),this.isDropdownOpen=!1,(_this$dropdownElement=this.dropdownElement)===null||_this$dropdownElement===void 0?void 0:_this$dropdownElement.hide();}},{key:"setVirtualMenuWidth",value:function setVirtualMenuWidth(){var _this22=this;var t=this.menuItems.reduce(function(t,i){var s=_this22.renderItemFunction(i).length;return t>s?t:s;},0),i=9.5*t<110?110:9.5*t;this.style.setProperty("--virtual-scroll-container-width",i+"px");}},{key:"handleSearch",value:function handleSearch(t){var _this$dropdownElement2;this.value=t.detail.value.toLowerCase(),this.menuItems=this.applyFilter(this.allMenuItems,this.filterFunction),this.isDropdownOpen=this.menuItems.length>0,this.isDropdownOpen&&((_this$dropdownElement2=this.dropdownElement)===null||_this$dropdownElement2===void 0?void 0:_this$dropdownElement2.show());}},{key:"handleFocus",value:function handleFocus(){var _this23=this;this.openOnFocus&&setTimeout(function(){var _this23$dropdownEleme;_this23.isDropdownOpen=!0,(_this23$dropdownEleme=_this23.dropdownElement)===null||_this23$dropdownEleme===void 0?void 0:_this23$dropdownEleme.show();},300);}},{key:"handleClick",value:function handleClick(){var _this$dropdownElement3;this.isDropdownOpen=!0,(_this$dropdownElement3=this.dropdownElement)===null||_this$dropdownElement3===void 0?void 0:_this$dropdownElement3.show();}},{key:"applyFilter",value:function applyFilter(t,i){var _this24=this;if("object"!=_typeof(t))return[];var s=[];return t.forEach(function(t){return i(t,_this24.value)&&s.push(t);}),s;}}]);}(u));z.styles=r,t([e("nile-dropdown")],z.prototype,"dropdownElement",void 0),t([n({type:Boolean})],z.prototype,"disabled",void 0),t([n({type:Boolean})],z.prototype,"isDropdownOpen",void 0),t([n({type:Boolean})],z.prototype,"enableVirtualScroll",void 0),t([n({type:Boolean})],z.prototype,"openOnFocus",void 0),t([n({type:String})],z.prototype,"value",void 0),t([n({type:String})],z.prototype,"placeholder",void 0),t([n({type:Boolean})],z.prototype,"noBorder",void 0),t([n({type:Boolean})],z.prototype,"loading",void 0),t([n({attribute:!1})],z.prototype,"filterFunction",void 0),t([n({attribute:!1})],z.prototype,"renderItemFunction",void 0),t([n({type:Array})],z.prototype,"allMenuItems",void 0),t([o()],z.prototype,"menuItems",void 0),_export("N",z=t([l("nile-auto-complete")],z));}};});
|
2
18
|
//# sourceMappingURL=nile-auto-complete.cjs.js.map
|