@aquera/nile-elements 0.1.67-beta-1.1 → 0.1.67-beta-1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -10
- package/demo/index.html +238 -73
- 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-ba65eb22.esm.js → fixture-2b5b3aba.esm.js} +1 -1
- package/dist/{fixture-4da0d7ba.cjs.js → fixture-3330277d.cjs.js} +3 -3
- package/dist/{fixture-324a7ef9.cjs.js.map → fixture-3330277d.cjs.js.map} +1 -1
- package/dist/{fixture-aeed6660.esm.js → fixture-588a3119.esm.js} +2 -2
- package/dist/{fixture-28d63bc4.cjs.js → fixture-75825990.cjs.js} +2 -2
- package/dist/{fixture-28d63bc4.cjs.js.map → fixture-75825990.cjs.js.map} +1 -1
- package/dist/{fixture-324a7ef9.cjs.js → fixture-7bfb866e.cjs.js} +2 -2
- package/dist/fixture-7bfb866e.cjs.js.map +1 -0
- package/dist/{fixture-78a015b8.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 +1005 -868
- package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
- package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.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.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-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/index.cjs.js +1 -1
- package/dist/nile-file-preview/index.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 +58 -55
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js.map +1 -1
- package/dist/nile-file-preview/nile-file-preview.test.esm.js +1 -1
- package/dist/nile-file-preview/types/index.cjs.js +1 -1
- package/dist/nile-file-preview/types/index.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/types/nile-file-preview.interface.cjs.js +1 -1
- package/dist/nile-file-preview/types/nile-file-preview.interface.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.cjs.js.map +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/types/file-upload.type.cjs.js +1 -1
- package/dist/nile-file-upload/types/file-upload.type.esm.js +1 -1
- package/dist/nile-file-upload/types/index.cjs.js +1 -1
- package/dist/nile-file-upload/types/index.esm.js +1 -1
- package/dist/nile-file-upload/utils/drag-drop.util.cjs.js +1 -1
- package/dist/nile-file-upload/utils/drag-drop.util.cjs.js.map +1 -1
- package/dist/nile-file-upload/utils/drag-drop.util.esm.js +1 -1
- package/dist/nile-file-upload/utils/file-validation.util.cjs.js +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/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 +1 -1
- package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.test.esm.js +1 -1
- package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.test.esm.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
- package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.test.esm.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
- package/dist/nile-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 +1 -1
- 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 +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
- package/dist/nile-tab/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 -20
- 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 -7
- package/dist/nile-table-header-item/nile-table-header-item.esm.js +8 -9
- package/dist/nile-table-row/nile-table-row.cjs.js +1 -1
- package/dist/nile-table-row/nile-table-row.cjs.js.map +1 -1
- package/dist/nile-table-row/nile-table-row.css.cjs.js +1 -1
- package/dist/nile-table-row/nile-table-row.css.cjs.js.map +1 -1
- package/dist/nile-table-row/nile-table-row.css.esm.js +0 -51
- package/dist/nile-table-row/nile-table-row.esm.js +6 -26
- 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 -1
- package/dist/src/index.js +3 -1
- package/dist/src/index.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-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/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-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 +19 -0
- package/dist/src/nile-rich-text-editor/nile-rte-mentions-item.js +54 -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 +64 -0
- package/dist/src/nile-rich-text-editor/nile-rte-mentions.js +490 -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.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-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 -19
- 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 -6
- 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/src/nile-table-row/nile-table-row.css.js +0 -51
- package/dist/src/nile-table-row/nile-table-row.css.js.map +1 -1
- package/dist/src/nile-table-row/nile-table-row.d.ts +0 -4
- package/dist/src/nile-table-row/nile-table-row.js +11 -58
- package/dist/src/nile-table-row/nile-table-row.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/src/index.ts +3 -1
- 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-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 +46 -0
- package/src/nile-rich-text-editor/nile-rte-mentions.ts +522 -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-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 -19
- 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 -6
- package/src/nile-table-header-item/nile-table-header-item.ts +5 -11
- package/src/nile-table-row/nile-table-row.css.ts +0 -51
- package/src/nile-table-row/nile-table-row.ts +7 -50
- package/vscode-html-custom-data.json +205 -166
- package/dist/axe.min-2c0b27d0.esm.js +0 -1
- package/dist/axe.min-51d832fe.cjs.js +0 -2
- package/dist/axe.min-51d832fe.cjs.js.map +0 -1
- package/dist/fixture-4da0d7ba.cjs.js.map +0 -1
- package/dist/flow-938d2713.esm.js +0 -17
- package/dist/flow-eb3cbb92.cjs.js +0 -14
- package/dist/flow-eb3cbb92.cjs.js.map +0 -1
- 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 -120
- package/dist/lit-html-879bd16a.esm.js +0 -7
- package/dist/lit-html-9a84b336.cjs.js +0 -6
- package/dist/lit-html-9a84b336.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-action.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-action.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-action.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-alert-circle.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-alert-circle.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-alert-circle.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-arrow-narrow-right.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-arrow-narrow-right.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-arrow-narrow-right.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-building-01.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-building-01.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-building-01.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-building-05.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-building-05.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-building-05.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-button-loading-blue-animated.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-button-loading-blue-animated.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-button-loading-blue-animated.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-button-loading-blue.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-button-loading-blue.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-button-loading-blue.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-check-circle-broken.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-check-circle-broken.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-check-circle-broken.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-check.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-check.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-check.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-dataflow-04.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-dataflow-04.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-dataflow-04.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-eye-off.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-eye-off.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-eye-off.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-file-06.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-file-06.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-file-06.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-image-03.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-image-03.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-image-03.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-marker-pin-01.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-marker-pin-01.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-marker-pin-01.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-minus.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-minus.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-minus.esm.js +0 -1
- package/dist/nile-icon/icons/svg/ng-x-circle.cjs.js +0 -2
- package/dist/nile-icon/icons/svg/ng-x-circle.cjs.js.map +0 -1
- package/dist/nile-icon/icons/svg/ng-x-circle.esm.js +0 -1
- 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/scopedElementsWrapper-24f32095.cjs.js +0 -6
- package/dist/scopedElementsWrapper-24f32095.cjs.js.map +0 -1
- package/dist/scopedElementsWrapper-7a509408.esm.js +0 -7
- package/dist/sinon-esm-69e51168.cjs.js +0 -2
- package/dist/sinon-esm-69e51168.cjs.js.map +0 -1
- package/dist/sinon-esm-73a0cd99.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 -137
- package/dist/src/internal/resizable-table-styles.js.map +0 -1
- package/dist/src/nile-calendar/test.js +0 -2
- package/dist/src/nile-calendar/test.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-action.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-action.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-action.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-alert-circle.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-right.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-building-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-building-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-building-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-building-05.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-building-05.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-building-05.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue-animated.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-button-loading-blue.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-circle-broken.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-check.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dataflow-04.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-eye-off.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-eye-off.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-eye-off.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-file-06.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-06.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-06.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-image-03.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-image-03.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-image-03.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-marker-pin-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-minus.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-minus.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-minus.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-x-circle.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-circle.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-circle.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/src/version.d.ts +0 -9
- package/dist/src/version.js +0 -7
- package/dist/src/version.js.map +0 -1
- package/dist/version.cjs.js +0 -2
- package/dist/version.cjs.js.map +0 -1
- package/dist/version.esm.js +0 -1
- package/dist/virtualize-3a6cec69.esm.js +0 -22
- package/dist/virtualize-72f549f4.cjs.js +0 -18
- package/dist/virtualize-72f549f4.cjs.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 -144
- 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/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
- /package/dist/src/{nile-calendar/test.d.ts → nile-rich-text-editor/sub-components/nile-rich-text-editor-toolbar-item.d.ts} +0 -0
@@ -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-324a7ef9.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-popover.cjs.js","tslib","lit/decorators.js","./nile-popover.css.cjs.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js"],function(_export,_context){"use strict";var o,t,e,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5;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){o=_fixture001CjsJs.f;t=_fixture001CjsJs.a;},function(_litStaticHtmlJs){e=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nilePopoverCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nilePopoverCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalWatchCjsJs){}],execute:function execute(){describe("NilePopover",function(){it("renders 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 o(e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-popover title=\"Test Popover\">\n <button slot=\"anchor\">Click me</button>\n <div>Popover Content</div>\n </nile-popover>\n "]))));case 2:i=_context2.sent;t(i).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("has default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return o(e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-popover></nile-popover>"]))));case 2:i=_context3.sent;t(i.placement).to.equal("top"),t(i.distance).to.equal(18),t(i.title).to.equal(""),t(i.arrowPlacement).to.equal("anchor"),t(i.hoist).to.be["false"],t(i.flip).to.be["false"];case 4:case"end":return _context3.stop();}},_callee2);}))),it("displays title when popover is shown",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var i,p,n;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return o(e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-popover title=\"Test Popover\">\n <button slot=\"anchor\">Click me</button>\n <div>Popover Content</div>\n </nile-popover>\n "]))));case 2:i=_context4.sent;i.querySelector("button").click();_context4.next=6;return i.updateComplete;case 6:p=i.shadowRoot.querySelector(".popover__box");t(p).to.exist;n=i.shadowRoot.querySelector('slot[name="title"]');t(n).to.exist,t(n.textContent).to.equal("Test Popover");case 10:case"end":return _context4.stop();}},_callee3);}))),it("toggles isShow state on anchor click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var i,p,n,r;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return o(e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-popover title=\"Test Popover\">\n <button slot=\"anchor\">Click me</button>\n <div>Popover Content</div>\n </nile-popover>\n "]))));case 2:i=_context5.sent;p=i.querySelector("button");p.click();_context5.next=7;return i.updateComplete;case 7:n=i.shadowRoot.querySelector('div[part="popover"]');t(n).to.exist;p.click();_context5.next=12;return i.updateComplete;case 12:r=i.shadowRoot.querySelector('div[part="popover"]');t(r).to["null"];case 14:case"end":return _context5.stop();}},_callee4);}))),it("hides popover on document click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var i,p;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return o(e(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-popover title=\"Test Popover\">\n <button slot=\"anchor\">Click me</button>\n <div>Popover Content</div>\n </nile-popover>\n "]))));case 2:i=_context6.sent;i.querySelector("button").click();_context6.next=6;return i.updateComplete;case 6:p=i.shadowRoot.querySelector(".popover__box");t(p).to.exist;document.body.click();_context6.next=11;return i.updateComplete;case 11:p=i.shadowRoot.querySelector(".popover__box");t(p).to.not.exist;case 13:case"end":return _context6.stop();}},_callee5);})));});}};});
|
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-popover.cjs.js","tslib","lit/decorators.js","./nile-popover.css.cjs.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js"],function(_export,_context){"use strict";var o,t,e,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5;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){o=_fixture001CjsJs.f;t=_fixture001CjsJs.a;},function(_litStaticHtmlJs){e=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nilePopoverCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nilePopoverCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalWatchCjsJs){}],execute:function execute(){describe("NilePopover",function(){it("renders 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 o(e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-popover title=\"Test Popover\">\n <button slot=\"anchor\">Click me</button>\n <div>Popover Content</div>\n </nile-popover>\n "]))));case 2:i=_context2.sent;t(i).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("has default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return o(e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-popover></nile-popover>"]))));case 2:i=_context3.sent;t(i.placement).to.equal("top"),t(i.distance).to.equal(18),t(i.title).to.equal(""),t(i.arrowPlacement).to.equal("anchor"),t(i.hoist).to.be["false"],t(i.flip).to.be["false"];case 4:case"end":return _context3.stop();}},_callee2);}))),it("displays title when popover is shown",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var i,p,n;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return o(e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-popover title=\"Test Popover\">\n <button slot=\"anchor\">Click me</button>\n <div>Popover Content</div>\n </nile-popover>\n "]))));case 2:i=_context4.sent;i.querySelector("button").click();_context4.next=6;return i.updateComplete;case 6:p=i.shadowRoot.querySelector(".popover__box");t(p).to.exist;n=i.shadowRoot.querySelector('slot[name="title"]');t(n).to.exist,t(n.textContent).to.equal("Test Popover");case 10:case"end":return _context4.stop();}},_callee3);}))),it("toggles isShow state on anchor click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var i,p,n,r;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return o(e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-popover title=\"Test Popover\">\n <button slot=\"anchor\">Click me</button>\n <div>Popover Content</div>\n </nile-popover>\n "]))));case 2:i=_context5.sent;p=i.querySelector("button");p.click();_context5.next=7;return i.updateComplete;case 7:n=i.shadowRoot.querySelector('div[part="popover"]');t(n).to.exist;p.click();_context5.next=12;return i.updateComplete;case 12:r=i.shadowRoot.querySelector('div[part="popover"]');t(r).to["null"];case 14:case"end":return _context5.stop();}},_callee4);}))),it("hides popover on document click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var i,p;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return o(e(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-popover title=\"Test Popover\">\n <button slot=\"anchor\">Click me</button>\n <div>Popover Content</div>\n </nile-popover>\n "]))));case 2:i=_context6.sent;i.querySelector("button").click();_context6.next=6;return i.updateComplete;case 6:p=i.shadowRoot.querySelector(".popover__box");t(p).to.exist;document.body.click();_context6.next=11;return i.updateComplete;case 11:p=i.shadowRoot.querySelector(".popover__box");t(p).to.not.exist;case 13:case"end":return _context6.stop();}},_callee5);})));});}};});
|
2
2
|
//# sourceMappingURL=nile-popover.test.cjs.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{f as o,a as t}from"../fixture-
|
1
|
+
import{f as o,a as t}from"../fixture-588a3119.esm.js";import{html as e}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-popover.esm.js";import"tslib";import"lit/decorators.js";import"./nile-popover.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/watch.esm.js";describe("NilePopover",(()=>{it("renders correctly",(async()=>{const i=await o(e`
|
2
2
|
<nile-popover title="Test Popover">
|
3
3
|
<button slot="anchor">Click me</button>
|
4
4
|
<div>Popover Content</div>
|
@@ -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-324a7ef9.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-popup.cjs.js","tslib","lit/directives/class-map.js","lit/decorators.js","../internal/nile-element.cjs.js","./nile-popup.css.cjs.js"],function(_export,_context){"use strict";var p,t,o,i,e,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8;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){p=_fixture001CjsJs.f;t=_fixture001CjsJs.a;o=_fixture001CjsJs.e;},function(_litStaticHtmlJs){i=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nilePopupCjsJs){e=_nilePopupCjsJs.N;},function(_tslib){},function(_litDirectivesClassMapJs){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){},function(_nilePopupCssCjsJs){}],execute:function execute(){describe("NilePopup",function(){it("should render correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var o;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return p(i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-popup></nile-popup>"]))));case 2:o=_context2.sent;t(o).to.be.instanceOf(e),t(o.shadowRoot).not.to.be["null"];case 4:case"end":return _context2.stop();}},_callee);}))),it("should be inactive by default",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _o$shadowRoot;var o,e;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return p(i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-popup></nile-popup>"]))));case 2:o=_context3.sent;t(o.active).to.be["false"];e=(_o$shadowRoot=o.shadowRoot)===null||_o$shadowRoot===void 0?void 0:_o$shadowRoot.querySelector(".popup");t(e===null||e===void 0?void 0:e.classList.contains("popup--active")).to.be["false"];case 6:case"end":return _context3.stop();}},_callee2);}))),it("should show popup when active is set to true",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _e$shadowRoot;var e,s;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return p(i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-popup></nile-popup>"]))));case 2:e=_context4.sent;e.active=!0;_context4.next=6;return o(e);case 6:s=(_e$shadowRoot=e.shadowRoot)===null||_e$shadowRoot===void 0?void 0:_e$shadowRoot.querySelector(".popup");t(e.active).to.be["true"],t(s===null||s===void 0?void 0:s.classList.contains("popup--active")).to.be["true"];case 8:case"end":return _context4.stop();}},_callee3);}))),it("should hide popup when active is set to false",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _e$shadowRoot2;var e,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return p(i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-popup active></nile-popup>"]))));case 2:e=_context5.sent;e.active=!1;_context5.next=6;return o(e);case 6:s=(_e$shadowRoot2=e.shadowRoot)===null||_e$shadowRoot2===void 0?void 0:_e$shadowRoot2.querySelector(".popup");t(e.active).to.be["false"],t(s===null||s===void 0?void 0:s.classList.contains("popup--active")).to.be["false"];case 8:case"end":return _context5.stop();}},_callee4);}))),it('should set correct placement class based on "placement" property',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var e;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return p(i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-popup placement=\"bottom\"></nile-popup>"]))));case 2:e=_context6.sent;e.active=!0;_context6.next=6;return o(e);case 6:t(e.placement).to.equal("bottom");t(e.getAttribute("placement")).to.equal("bottom");case 8:case"end":return _context6.stop();}},_callee5);}))),it("should position correctly when anchor is provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _s$shadowRoot;var e,s,a,n;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:e=document.createElement("div");e.id="anchorEl",document.body.appendChild(e);_context7.next=4;return p(i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-popup anchor=\"anchorEl\" active></nile-popup>"]))));case 4:s=_context7.sent;_context7.next=7;return o(s);case 7:a=(_s$shadowRoot=s.shadowRoot)===null||_s$shadowRoot===void 0?void 0:_s$shadowRoot.querySelector(".popup");t(a===null||a===void 0?void 0:a.classList.contains("popup--active")).to.be["true"];n=document.getElementById("anchorEl");t(n).to.exist,document.body.removeChild(e);case 11:case"end":return _context7.stop();}},_callee6);}))),it('should display an arrow when the "arrow" property is true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _e$shadowRoot3;var e,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return p(i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-popup arrow></nile-popup>"]))));case 2:e=_context8.sent;e.active=!0;_context8.next=6;return o(e);case 6:s=(_e$shadowRoot3=e.shadowRoot)===null||_e$shadowRoot3===void 0?void 0:_e$shadowRoot3.querySelector(".popup__arrow");t(s).to.exist;case 8:case"end":return _context8.stop();}},_callee7);}))),it('should apply correct strategy when "strategy" is set',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _e$shadowRoot4;var e,s;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return p(i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-popup strategy=\"fixed\"></nile-popup>"]))));case 2:e=_context9.sent;e.active=!0;_context9.next=6;return o(e);case 6:s=(_e$shadowRoot4=e.shadowRoot)===null||_e$shadowRoot4===void 0?void 0:_e$shadowRoot4.querySelector(".popup");t(s===null||s===void 0?void 0:s.classList.contains("popup--fixed")).to.be["true"];case 8:case"end":return _context9.stop();}},_callee8);})));});}};});
|
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-popup.cjs.js","tslib","lit/directives/class-map.js","lit/decorators.js","../internal/nile-element.cjs.js","./nile-popup.css.cjs.js"],function(_export,_context){"use strict";var p,t,o,i,e,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8;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){p=_fixture001CjsJs.f;t=_fixture001CjsJs.a;o=_fixture001CjsJs.e;},function(_litStaticHtmlJs){i=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nilePopupCjsJs){e=_nilePopupCjsJs.N;},function(_tslib){},function(_litDirectivesClassMapJs){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){},function(_nilePopupCssCjsJs){}],execute:function execute(){describe("NilePopup",function(){it("should render correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var o;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return p(i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-popup></nile-popup>"]))));case 2:o=_context2.sent;t(o).to.be.instanceOf(e),t(o.shadowRoot).not.to.be["null"];case 4:case"end":return _context2.stop();}},_callee);}))),it("should be inactive by default",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _o$shadowRoot;var o,e;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return p(i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-popup></nile-popup>"]))));case 2:o=_context3.sent;t(o.active).to.be["false"];e=(_o$shadowRoot=o.shadowRoot)===null||_o$shadowRoot===void 0?void 0:_o$shadowRoot.querySelector(".popup");t(e===null||e===void 0?void 0:e.classList.contains("popup--active")).to.be["false"];case 6:case"end":return _context3.stop();}},_callee2);}))),it("should show popup when active is set to true",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _e$shadowRoot;var e,s;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return p(i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-popup></nile-popup>"]))));case 2:e=_context4.sent;e.active=!0;_context4.next=6;return o(e);case 6:s=(_e$shadowRoot=e.shadowRoot)===null||_e$shadowRoot===void 0?void 0:_e$shadowRoot.querySelector(".popup");t(e.active).to.be["true"],t(s===null||s===void 0?void 0:s.classList.contains("popup--active")).to.be["true"];case 8:case"end":return _context4.stop();}},_callee3);}))),it("should hide popup when active is set to false",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _e$shadowRoot2;var e,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return p(i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-popup active></nile-popup>"]))));case 2:e=_context5.sent;e.active=!1;_context5.next=6;return o(e);case 6:s=(_e$shadowRoot2=e.shadowRoot)===null||_e$shadowRoot2===void 0?void 0:_e$shadowRoot2.querySelector(".popup");t(e.active).to.be["false"],t(s===null||s===void 0?void 0:s.classList.contains("popup--active")).to.be["false"];case 8:case"end":return _context5.stop();}},_callee4);}))),it('should set correct placement class based on "placement" property',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var e;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return p(i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-popup placement=\"bottom\"></nile-popup>"]))));case 2:e=_context6.sent;e.active=!0;_context6.next=6;return o(e);case 6:t(e.placement).to.equal("bottom");t(e.getAttribute("placement")).to.equal("bottom");case 8:case"end":return _context6.stop();}},_callee5);}))),it("should position correctly when anchor is provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _s$shadowRoot;var e,s,a,n;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:e=document.createElement("div");e.id="anchorEl",document.body.appendChild(e);_context7.next=4;return p(i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-popup anchor=\"anchorEl\" active></nile-popup>"]))));case 4:s=_context7.sent;_context7.next=7;return o(s);case 7:a=(_s$shadowRoot=s.shadowRoot)===null||_s$shadowRoot===void 0?void 0:_s$shadowRoot.querySelector(".popup");t(a===null||a===void 0?void 0:a.classList.contains("popup--active")).to.be["true"];n=document.getElementById("anchorEl");t(n).to.exist,document.body.removeChild(e);case 11:case"end":return _context7.stop();}},_callee6);}))),it('should display an arrow when the "arrow" property is true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _e$shadowRoot3;var e,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return p(i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-popup arrow></nile-popup>"]))));case 2:e=_context8.sent;e.active=!0;_context8.next=6;return o(e);case 6:s=(_e$shadowRoot3=e.shadowRoot)===null||_e$shadowRoot3===void 0?void 0:_e$shadowRoot3.querySelector(".popup__arrow");t(s).to.exist;case 8:case"end":return _context8.stop();}},_callee7);}))),it('should apply correct strategy when "strategy" is set',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _e$shadowRoot4;var e,s;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return p(i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-popup strategy=\"fixed\"></nile-popup>"]))));case 2:e=_context9.sent;e.active=!0;_context9.next=6;return o(e);case 6:s=(_e$shadowRoot4=e.shadowRoot)===null||_e$shadowRoot4===void 0?void 0:_e$shadowRoot4.querySelector(".popup");t(s===null||s===void 0?void 0:s.classList.contains("popup--fixed")).to.be["true"];case 8:case"end":return _context9.stop();}},_callee8);})));});}};});
|
2
2
|
//# sourceMappingURL=nile-popup.test.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
import{f as p,a as t,e as o}from"../fixture-
|
1
|
+
import{f as p,a as t,e as o}from"../fixture-588a3119.esm.js";import{html as i}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 e}from"./nile-popup.esm.js";import"tslib";import"lit/directives/class-map.js";import"lit/decorators.js";import"../internal/nile-element.esm.js";import"./nile-popup.css.esm.js";describe("NilePopup",(()=>{it("should render correctly",(async()=>{const o=await p(i`<nile-popup></nile-popup>`);t(o).to.be.instanceOf(e),t(o.shadowRoot).not.to.be.null})),it("should be inactive by default",(async()=>{const o=await p(i`<nile-popup></nile-popup>`);t(o.active).to.be.false;const e=o.shadowRoot?.querySelector(".popup");t(e?.classList.contains("popup--active")).to.be.false})),it("should show popup when active is set to true",(async()=>{const e=await p(i`<nile-popup></nile-popup>`);e.active=!0,await o(e);const s=e.shadowRoot?.querySelector(".popup");t(e.active).to.be.true,t(s?.classList.contains("popup--active")).to.be.true})),it("should hide popup when active is set to false",(async()=>{const e=await p(i`<nile-popup active></nile-popup>`);e.active=!1,await o(e);const s=e.shadowRoot?.querySelector(".popup");t(e.active).to.be.false,t(s?.classList.contains("popup--active")).to.be.false})),it('should set correct placement class based on "placement" property',(async()=>{const e=await p(i`<nile-popup placement="bottom"></nile-popup>`);e.active=!0,await o(e),t(e.placement).to.equal("bottom"),t(e.getAttribute("placement")).to.equal("bottom")})),it("should position correctly when anchor is provided",(async()=>{const e=document.createElement("div");e.id="anchorEl",document.body.appendChild(e);const s=await p(i`<nile-popup anchor="anchorEl" active></nile-popup>`);await o(s);const a=s.shadowRoot?.querySelector(".popup");t(a?.classList.contains("popup--active")).to.be.true;const n=document.getElementById("anchorEl");t(n).to.exist,document.body.removeChild(e)})),it('should display an arrow when the "arrow" property is true',(async()=>{const e=await p(i`<nile-popup arrow></nile-popup>`);e.active=!0,await o(e);const s=e.shadowRoot?.querySelector(".popup__arrow");t(s).to.exist})),it('should apply correct strategy when "strategy" is set',(async()=>{const e=await p(i`<nile-popup strategy="fixed"></nile-popup>`);e.active=!0,await o(e);const s=e.shadowRoot?.querySelector(".popup");t(s?.classList.contains("popup--fixed")).to.be.true}))}));
|
@@ -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-324a7ef9.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-progress-bar.cjs.js","tslib","./nile-progress-bar.css.cjs.js","lit/decorators.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var s,a,r,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7;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){s=_fixture001CjsJs.f;a=_fixture001CjsJs.a;},function(_litStaticHtmlJs){r=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileProgressBarCjsJs){},function(_tslib){},function(_nileProgressBarCssCjsJs){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("NileProgressBar",function(){it("should have a default value of 0",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _e$shadowRoot$querySe;var e,t;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return s(r(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-progress-bar></nile-progress-bar>"]))));case 2:e=_context2.sent;a(e.value).to.equal(0);t=(_e$shadowRoot$querySe=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe!==void 0?_e$shadowRoot$querySe:{};a(t.style.width).to.equal("0%");case 6:case"end":return _context2.stop();}},_callee);}))),it("should set and display the provided value",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _e$shadowRoot$querySe2;var e,t;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return s(r(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-progress-bar value=\"50\"></nile-progress-bar>"]))));case 2:e=_context3.sent;a(e.value).to.equal(50);t=(_e$shadowRoot$querySe2=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe2!==void 0?_e$shadowRoot$querySe2:{};a(t.style.width).to.equal("50%");case 6:case"end":return _context3.stop();}},_callee2);}))),it("should handle boundary value 0%",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _e$shadowRoot$querySe3;var e,t;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return s(r(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-progress-bar value=\"0\"></nile-progress-bar>"]))));case 2:e=_context4.sent;a(e.value).to.equal(0);t=(_e$shadowRoot$querySe3=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe3!==void 0?_e$shadowRoot$querySe3:{};a(t.style.width).to.equal("0%");case 6:case"end":return _context4.stop();}},_callee3);}))),it("should handle boundary value 100%",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _e$shadowRoot$querySe4;var e,t;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return s(r(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-progress-bar value=\"100\"></nile-progress-bar>"]))));case 2:e=_context5.sent;a(e.value).to.equal(100);t=(_e$shadowRoot$querySe4=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe4!==void 0?_e$shadowRoot$querySe4:{};a(t.style.width).to.equal("100%");case 6:case"end":return _context5.stop();}},_callee4);}))),it("should revert values greater than 100",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _e$shadowRoot$querySe5;var e,t;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return s(r(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-progress-bar value=\"150\"></nile-progress-bar>"]))));case 2:e=_context6.sent;a(e.value).to.equal(0);t=(_e$shadowRoot$querySe5=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe5!==void 0?_e$shadowRoot$querySe5:{};a(t.style.width).to.equal("0%");case 6:case"end":return _context6.stop();}},_callee5);}))),it("should revert negative values",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _e$shadowRoot$querySe6;var e,t;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return s(r(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-progress-bar value=\"-50\"></nile-progress-bar>"]))));case 2:e=_context7.sent;a(e.value).to.equal(0);t=(_e$shadowRoot$querySe6=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe6!==void 0?_e$shadowRoot$querySe6:{};a(t.style.width).to.equal("0%");case 6:case"end":return _context7.stop();}},_callee6);}))),it("should update the value dynamically",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _e$shadowRoot$querySe7;var e,t;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return s(r(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-progress-bar value=\"20\"></nile-progress-bar>"]))));case 2:e=_context8.sent;e.value=80;_context8.next=6;return e.updateComplete;case 6:t=(_e$shadowRoot$querySe7=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe7!==void 0?_e$shadowRoot$querySe7:{};a(t.style.width).to.equal("80%");case 8:case"end":return _context8.stop();}},_callee7);})));});}};});
|
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-progress-bar.cjs.js","tslib","./nile-progress-bar.css.cjs.js","lit/decorators.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var s,a,r,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7;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){s=_fixture001CjsJs.f;a=_fixture001CjsJs.a;},function(_litStaticHtmlJs){r=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileProgressBarCjsJs){},function(_tslib){},function(_nileProgressBarCssCjsJs){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("NileProgressBar",function(){it("should have a default value of 0",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _e$shadowRoot$querySe;var e,t;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return s(r(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-progress-bar></nile-progress-bar>"]))));case 2:e=_context2.sent;a(e.value).to.equal(0);t=(_e$shadowRoot$querySe=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe!==void 0?_e$shadowRoot$querySe:{};a(t.style.width).to.equal("0%");case 6:case"end":return _context2.stop();}},_callee);}))),it("should set and display the provided value",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _e$shadowRoot$querySe2;var e,t;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return s(r(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-progress-bar value=\"50\"></nile-progress-bar>"]))));case 2:e=_context3.sent;a(e.value).to.equal(50);t=(_e$shadowRoot$querySe2=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe2!==void 0?_e$shadowRoot$querySe2:{};a(t.style.width).to.equal("50%");case 6:case"end":return _context3.stop();}},_callee2);}))),it("should handle boundary value 0%",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _e$shadowRoot$querySe3;var e,t;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return s(r(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-progress-bar value=\"0\"></nile-progress-bar>"]))));case 2:e=_context4.sent;a(e.value).to.equal(0);t=(_e$shadowRoot$querySe3=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe3!==void 0?_e$shadowRoot$querySe3:{};a(t.style.width).to.equal("0%");case 6:case"end":return _context4.stop();}},_callee3);}))),it("should handle boundary value 100%",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _e$shadowRoot$querySe4;var e,t;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return s(r(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-progress-bar value=\"100\"></nile-progress-bar>"]))));case 2:e=_context5.sent;a(e.value).to.equal(100);t=(_e$shadowRoot$querySe4=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe4!==void 0?_e$shadowRoot$querySe4:{};a(t.style.width).to.equal("100%");case 6:case"end":return _context5.stop();}},_callee4);}))),it("should revert values greater than 100",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _e$shadowRoot$querySe5;var e,t;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return s(r(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-progress-bar value=\"150\"></nile-progress-bar>"]))));case 2:e=_context6.sent;a(e.value).to.equal(0);t=(_e$shadowRoot$querySe5=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe5!==void 0?_e$shadowRoot$querySe5:{};a(t.style.width).to.equal("0%");case 6:case"end":return _context6.stop();}},_callee5);}))),it("should revert negative values",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var _e$shadowRoot$querySe6;var e,t;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return s(r(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-progress-bar value=\"-50\"></nile-progress-bar>"]))));case 2:e=_context7.sent;a(e.value).to.equal(0);t=(_e$shadowRoot$querySe6=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe6!==void 0?_e$shadowRoot$querySe6:{};a(t.style.width).to.equal("0%");case 6:case"end":return _context7.stop();}},_callee6);}))),it("should update the value dynamically",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _e$shadowRoot$querySe7;var e,t;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return s(r(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-progress-bar value=\"20\"></nile-progress-bar>"]))));case 2:e=_context8.sent;e.value=80;_context8.next=6;return e.updateComplete;case 6:t=(_e$shadowRoot$querySe7=e.shadowRoot.querySelector("span"))!==null&&_e$shadowRoot$querySe7!==void 0?_e$shadowRoot$querySe7:{};a(t.style.width).to.equal("80%");case 8:case"end":return _context8.stop();}},_callee7);})));});}};});
|
2
2
|
//# sourceMappingURL=nile-progress-bar.test.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
import{f as s,a as e}from"../fixture-
|
1
|
+
import{f as s,a as e}from"../fixture-588a3119.esm.js";import{html as a}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-progress-bar.esm.js";import"tslib";import"./nile-progress-bar.css.esm.js";import"lit/decorators.js";import"../internal/nile-element.esm.js";describe("NileProgressBar",(()=>{it("should have a default value of 0",(async()=>{const r=await s(a`<nile-progress-bar></nile-progress-bar>`);e(r.value).to.equal(0);const t=r.shadowRoot.querySelector("span")??{};e(t.style.width).to.equal("0%")})),it("should set and display the provided value",(async()=>{const r=await s(a`<nile-progress-bar value="50"></nile-progress-bar>`);e(r.value).to.equal(50);const t=r.shadowRoot.querySelector("span")??{};e(t.style.width).to.equal("50%")})),it("should handle boundary value 0%",(async()=>{const r=await s(a`<nile-progress-bar value="0"></nile-progress-bar>`);e(r.value).to.equal(0);const t=r.shadowRoot.querySelector("span")??{};e(t.style.width).to.equal("0%")})),it("should handle boundary value 100%",(async()=>{const r=await s(a`<nile-progress-bar value="100"></nile-progress-bar>`);e(r.value).to.equal(100);const t=r.shadowRoot.querySelector("span")??{};e(t.style.width).to.equal("100%")})),it("should revert values greater than 100",(async()=>{const r=await s(a`<nile-progress-bar value="150"></nile-progress-bar>`);e(r.value).to.equal(0);const t=r.shadowRoot.querySelector("span")??{};e(t.style.width).to.equal("0%")})),it("should revert negative values",(async()=>{const r=await s(a`<nile-progress-bar value="-50"></nile-progress-bar>`);e(r.value).to.equal(0);const t=r.shadowRoot.querySelector("span")??{};e(t.style.width).to.equal("0%")})),it("should update the value dynamically",(async()=>{const r=await s(a`<nile-progress-bar value="20"></nile-progress-bar>`);r.value=80,await r.updateComplete;const t=r.shadowRoot.querySelector("span")??{};e(t.style.width).to.equal("80%")}))}));
|
@@ -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-324a7ef9.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-radio.cjs.js","tslib","lit/decorators.js","./nile-radio.css.cjs.js","lit/directives/class-map.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var i,a,e,t,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10;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){i=_fixture001CjsJs.f;a=_fixture001CjsJs.a;e=_fixture001CjsJs.e;},function(_litStaticHtmlJs){t=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileRadioCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileRadioCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("NileRadio",function(){it("should have the correct default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var e;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return i(t(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context2.sent;a(e.checked).to.be["false"],a(e.disabled).to.be["false"],a(e.size).to.equal("medium");case 4:case"end":return _context2.stop();}},_callee);}))),it("should reflect the disabled attribute",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var e;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return i(t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-radio disabled></nile-radio>"]))));case 2:e=_context3.sent;a(e.disabled).to.be["true"],a(e.hasAttribute("aria-disabled")).to.be["true"];case 4:case"end":return _context3.stop();}},_callee2);}))),it("should update aria-checked when checked changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var e;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return i(t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context4.sent;e.checked=!0;_context4.next=6;return e.updateComplete;case 6:a(e.getAttribute("aria-checked")).to.equal("true");case 7:case"end":return _context4.stop();}},_callee3);}))),it("should toggle checked state on click when not disabled",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return i(t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:s=_context5.sent;s.click();_context5.next=6;return e(s);case 6:a(s.checked).to.be["true"];case 7:case"end":return _context5.stop();}},_callee4);}))),it("should not toggle checked state on click when disabled",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var s;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return i(t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-radio disabled></nile-radio>"]))));case 2:s=_context6.sent;s.click();_context6.next=6;return e(s);case 6:a(s.checked).to.be["false"];case 7:case"end":return _context6.stop();}},_callee5);}))),it("should emit nile-blur event on blur",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var e,s,o;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return i(t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context7.sent;s=new Promise(function(i){return e.addEventListener("nile-blur",i);});e.dispatchEvent(new Event("blur"));_context7.next=7;return s;case 7:o=_context7.sent;a(o).to.exist;case 9:case"end":return _context7.stop();}},_callee6);}))),it("should emit nile-focus event on focus",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var e,s,o;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return i(t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context8.sent;s=new Promise(function(i){return e.addEventListener("nile-focus",i);});e.dispatchEvent(new Event("focus"));_context8.next=7;return s;case 7:o=_context8.sent;a(o).to.exist;case 9:case"end":return _context8.stop();}},_callee7);}))),it("should apply the correct classes based on state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var e,s;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return i(t(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context9.sent;e.checked=!0;e.disabled=!0;e.size="medium";_context9.next=8;return e.updateComplete;case 8:s=e.shadowRoot.querySelector('[part="base"]');a(s.classList.contains("radio--checked")).to.be["true"],a(s.classList.contains("radio--disabled")).to.be["true"],a(s.classList.contains("radio--medium")).to.be["true"];case 10:case"end":return _context9.stop();}},_callee8);}))),it("should update aria-disabled when disabled changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var s;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return i(t(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:s=_context10.sent;s.disabled=!0;_context10.next=6;return e(s);case 6:a(s.getAttribute("aria-disabled")).to.equal("true");case 7:case"end":return _context10.stop();}},_callee9);}))),it("should set initial attributes correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var e;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return i(t(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context11.sent;a(e.getAttribute("role")).to.equal("radio"),a(e.getAttribute("tabindex")).to.equal("-1"),a(e.getAttribute("aria-disabled")).to.equal("false");case 4:case"end":return _context11.stop();}},_callee10);})));});}};});
|
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-radio.cjs.js","tslib","lit/decorators.js","./nile-radio.css.cjs.js","lit/directives/class-map.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var i,a,e,t,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10;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){i=_fixture001CjsJs.f;a=_fixture001CjsJs.a;e=_fixture001CjsJs.e;},function(_litStaticHtmlJs){t=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileRadioCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileRadioCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("NileRadio",function(){it("should have the correct default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var e;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return i(t(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context2.sent;a(e.checked).to.be["false"],a(e.disabled).to.be["false"],a(e.size).to.equal("medium");case 4:case"end":return _context2.stop();}},_callee);}))),it("should reflect the disabled attribute",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var e;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return i(t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-radio disabled></nile-radio>"]))));case 2:e=_context3.sent;a(e.disabled).to.be["true"],a(e.hasAttribute("aria-disabled")).to.be["true"];case 4:case"end":return _context3.stop();}},_callee2);}))),it("should update aria-checked when checked changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var e;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return i(t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context4.sent;e.checked=!0;_context4.next=6;return e.updateComplete;case 6:a(e.getAttribute("aria-checked")).to.equal("true");case 7:case"end":return _context4.stop();}},_callee3);}))),it("should toggle checked state on click when not disabled",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return i(t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:s=_context5.sent;s.click();_context5.next=6;return e(s);case 6:a(s.checked).to.be["true"];case 7:case"end":return _context5.stop();}},_callee4);}))),it("should not toggle checked state on click when disabled",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var s;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return i(t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-radio disabled></nile-radio>"]))));case 2:s=_context6.sent;s.click();_context6.next=6;return e(s);case 6:a(s.checked).to.be["false"];case 7:case"end":return _context6.stop();}},_callee5);}))),it("should emit nile-blur event on blur",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var e,s,o;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return i(t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context7.sent;s=new Promise(function(i){return e.addEventListener("nile-blur",i);});e.dispatchEvent(new Event("blur"));_context7.next=7;return s;case 7:o=_context7.sent;a(o).to.exist;case 9:case"end":return _context7.stop();}},_callee6);}))),it("should emit nile-focus event on focus",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var e,s,o;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return i(t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context8.sent;s=new Promise(function(i){return e.addEventListener("nile-focus",i);});e.dispatchEvent(new Event("focus"));_context8.next=7;return s;case 7:o=_context8.sent;a(o).to.exist;case 9:case"end":return _context8.stop();}},_callee7);}))),it("should apply the correct classes based on state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var e,s;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return i(t(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context9.sent;e.checked=!0;e.disabled=!0;e.size="medium";_context9.next=8;return e.updateComplete;case 8:s=e.shadowRoot.querySelector('[part="base"]');a(s.classList.contains("radio--checked")).to.be["true"],a(s.classList.contains("radio--disabled")).to.be["true"],a(s.classList.contains("radio--medium")).to.be["true"];case 10:case"end":return _context9.stop();}},_callee8);}))),it("should update aria-disabled when disabled changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var s;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return i(t(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:s=_context10.sent;s.disabled=!0;_context10.next=6;return e(s);case 6:a(s.getAttribute("aria-disabled")).to.equal("true");case 7:case"end":return _context10.stop();}},_callee9);}))),it("should set initial attributes correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var e;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return i(t(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-radio></nile-radio>"]))));case 2:e=_context11.sent;a(e.getAttribute("role")).to.equal("radio"),a(e.getAttribute("tabindex")).to.equal("-1"),a(e.getAttribute("aria-disabled")).to.equal("false");case 4:case"end":return _context11.stop();}},_callee10);})));});}};});
|
2
2
|
//# sourceMappingURL=nile-radio.test.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
import{f as i,a as e,e as a}from"../fixture-
|
1
|
+
import{f as i,a as e,e as a}from"../fixture-588a3119.esm.js";import{html as t}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-radio.esm.js";import"tslib";import"lit/decorators.js";import"./nile-radio.css.esm.js";import"lit/directives/class-map.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";describe("NileRadio",(()=>{it("should have the correct default properties",(async()=>{const a=await i(t`<nile-radio></nile-radio>`);e(a.checked).to.be.false,e(a.disabled).to.be.false,e(a.size).to.equal("medium")})),it("should reflect the disabled attribute",(async()=>{const a=await i(t`<nile-radio disabled></nile-radio>`);e(a.disabled).to.be.true,e(a.hasAttribute("aria-disabled")).to.be.true})),it("should update aria-checked when checked changes",(async()=>{const a=await i(t`<nile-radio></nile-radio>`);a.checked=!0,await a.updateComplete,e(a.getAttribute("aria-checked")).to.equal("true")})),it("should toggle checked state on click when not disabled",(async()=>{const s=await i(t`<nile-radio></nile-radio>`);s.click(),await a(s),e(s.checked).to.be.true})),it("should not toggle checked state on click when disabled",(async()=>{const s=await i(t`<nile-radio disabled></nile-radio>`);s.click(),await a(s),e(s.checked).to.be.false})),it("should emit nile-blur event on blur",(async()=>{const a=await i(t`<nile-radio></nile-radio>`),s=new Promise((i=>a.addEventListener("nile-blur",i)));a.dispatchEvent(new Event("blur"));const o=await s;e(o).to.exist})),it("should emit nile-focus event on focus",(async()=>{const a=await i(t`<nile-radio></nile-radio>`),s=new Promise((i=>a.addEventListener("nile-focus",i)));a.dispatchEvent(new Event("focus"));const o=await s;e(o).to.exist})),it("should apply the correct classes based on state",(async()=>{const a=await i(t`<nile-radio></nile-radio>`);a.checked=!0,a.disabled=!0,a.size="medium",await a.updateComplete;const s=a.shadowRoot.querySelector('[part="base"]');e(s.classList.contains("radio--checked")).to.be.true,e(s.classList.contains("radio--disabled")).to.be.true,e(s.classList.contains("radio--medium")).to.be.true})),it("should update aria-disabled when disabled changes",(async()=>{const s=await i(t`<nile-radio></nile-radio>`);s.disabled=!0,await a(s),e(s.getAttribute("aria-disabled")).to.equal("true")})),it("should set initial attributes correctly",(async()=>{const a=await i(t`<nile-radio></nile-radio>`);e(a.getAttribute("role")).to.equal("radio"),e(a.getAttribute("tabindex")).to.equal("-1"),e(a.getAttribute("aria-disabled")).to.equal("false")}))}));
|
@@ -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-324a7ef9.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-radio-group.cjs.js","../nile-radio/nile-radio.cjs.js","tslib","lit/directives/class-map.js","lit/decorators.js","../internal/slot.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","./nile-radio-group.css.cjs.js","../nile-radio/nile-radio.css.cjs.js"],function(_export,_context){"use strict";var e,i,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10;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){e=_fixture001CjsJs.f;i=_fixture001CjsJs.a;},function(_litStaticHtmlJs){a=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileRadioGroupCjsJs){},function(_nileRadioNileRadioCjsJs){},function(_tslib){},function(_litDirectivesClassMapJs){},function(_litDecoratorsJs){},function(_internalSlotCjsJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){},function(_nileRadioGroupCssCjsJs){},function(_nileRadioNileRadioCssCjsJs){}],execute:function execute(){describe("nile-radio-group",function(){it("should render the radio group with radios",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var o,l;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(a(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Select an option\" name=\"options\" value=\"2\">\n <nile-radio name=\"test\" value=\"1\" label=\"Radio 1\"></nile-radio>\n <nile-radio name=\"test\" value=\"2\" label=\"Radio 2\"></nile-radio>\n <nile-radio name=\"test\" value=\"3\" label=\"Radio 3\"></nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context2.sent;l=o.querySelectorAll("nile-radio");i(l.length).to.equal(3),i(o.label).to.equal("Select an option");case 5:case"end":return _context2.stop();}},_callee);}))),it("should select the correct radio based on value",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var o;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(a(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Select an option\" name=\"options\" value=\"2\">\n <nile-radio name=\"test\" value=\"1\" label=\"Radio 1\"></nile-radio>\n <nile-radio name=\"test\" value=\"2\" label=\"Radio 2\"></nile-radio>\n <nile-radio name=\"test\" value=\"3\" label=\"Radio 3\"></nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context3.sent.querySelector('nile-radio[value="2"]');i(o===null||o===void 0?void 0:o.checked).to.be["true"];case 4:case"end":return _context3.stop();}},_callee2);}))),it("should emit change event when radio selection changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var o,l,n;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(a(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Select an option\" name=\"options\" value=\"1\">\n <nile-radio name=\"test\" value=\"1\" label=\"Radio 1\"></nile-radio>\n <nile-radio name=\"test\" value=\"2\" label=\"Radio 2\"></nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context4.sent;l=!1;o.addEventListener("change",function(){l=!0;});n=o.querySelector('nile-radio[value="2"]');n!==null&&n!==void 0&&n.click();_context4.next=9;return o.updateComplete;case 9:i(l).to.be["true"];i(o.value).to.equal("2");case 11:case"end":return _context4.stop();}},_callee3);}))),it("should handle disabled radios correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var o,l,n;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(a(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Disabled Option\" name=\"options\">\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\" disabled islabelborder>Radio 2</nile-radio>\n <nile-radio name=\"test\" value=\"3\" disabled>Radio 3</nile-radio>\n <nile-radio name=\"test\" value=\"4\">Radio 4</nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context5.sent;l=o.querySelectorAll("nile-radio[disabled]");i(l.length).to.equal(2);n=o.querySelector('nile-radio[value="1"]');n!==null&&n!==void 0&&n.click();_context5.next=9;return o.updateComplete;case 9:i(o.value).to.equal("1");case 10:case"end":return _context5.stop();}},_callee4);}))),it("should not allow selection of disabled radio",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var o,l;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(a(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Disabled Option\" name=\"options\">\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\" disabled>Radio 2</nile-radio>\n <nile-radio name=\"test\" value=\"3\">Radio 3</nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context6.sent;l=o.querySelector('nile-radio[value="2"]');l!==null&&l!==void 0&&l.click();_context6.next=7;return o.updateComplete;case 7:i(o.value).to.equal("");case 8:case"end":return _context6.stop();}},_callee5);}))),it("should correctly handle the islabelborder property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(a(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Border Option\" name=\"options\" islabelborder>\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\"> Radio 2 </nile-radio>\n </nile-radio-group>\n "]))));case 2:_context7.sent.querySelectorAll("nile-radio").forEach(function(e){i(e.islabelborder).to.be["true"];});case 3:case"end":return _context7.stop();}},_callee6);}))),it("should focus the first radio when the label is clicked",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _o$shadowRoot;var o,l,n;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(a(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Focus Test\" name=\"options\">\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\"> Radio 2 </nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context8.sent;l=(_o$shadowRoot=o.shadowRoot)===null||_o$shadowRoot===void 0?void 0:_o$shadowRoot.querySelector("label");l!==null&&l!==void 0&&l.click();_context8.next=7;return o.updateComplete;case 7:n=o.querySelector('nile-radio[value="1"]');i(document.activeElement).to.equal(n);case 9:case"end":return _context8.stop();}},_callee7);}))),it("should set required attribute correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _o$shadowRoot2;var o,l;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(a(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Required Test\" name=\"options\" required>\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\"> Radio 2 </nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context9.sent;l=(_o$shadowRoot2=o.shadowRoot)===null||_o$shadowRoot2===void 0?void 0:_o$shadowRoot2.querySelector(".radio-group__validation-input");i(l===null||l===void 0?void 0:l.required).to.be["true"];case 5:case"end":return _context9.stop();}},_callee8);}))),it("should reflect the current value property correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var o,l;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return e(a(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Reflect Test\" name=\"options\" value=\"1\">\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\"> Radio 2 </nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context10.sent;i(o.value).to.equal("1");o.value="2";_context10.next=7;return o.updateComplete;case 7:i(o.value).to.equal("2");l=o.querySelector('nile-radio[value="2"]');i(l===null||l===void 0?void 0:l.checked).to.be["true"];case 10:case"end":return _context10.stop();}},_callee9);}))),it("should toggle selection with arrow keys",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var _o$shadowRoot3;var o,l,n,t,r,d,s,u,c;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return e(a(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n\t\t\t<nile-radio-group label=\"Arrow Key Navigation\" name=\"options\">\n\t\t\t\t<nile-radio name=\"test\" value=\"1\" label=\"Radio 1\"></nile-radio>\n\t\t\t\t<nile-radio name=\"test\" value=\"2\" label=\"Radio 2\"></nile-radio>\n\t\t\t\t<nile-radio name=\"test\" value=\"3\" label=\"Radio 3\"></nile-radio>\n\t\t\t</nile-radio-group>\n\t\t"]))));case 2:o=_context11.sent;l=(_o$shadowRoot3=o.shadowRoot)===null||_o$shadowRoot3===void 0?void 0:_o$shadowRoot3.querySelector("fieldset > div > div:nth-child(2) > slot");n=o.querySelector('nile-radio[value="1"]');n!==null&&n!==void 0&&n.click();_context11.next=8;return o.updateComplete;case 8:t=new KeyboardEvent("keydown",{key:"ArrowRight"});l!==null&&l!==void 0&&l.dispatchEvent(t);_context11.next=12;return o.updateComplete;case 12:r=o.querySelector('nile-radio[value="2"]');i(r===null||r===void 0?void 0:r.checked).to.be["true"];l!==null&&l!==void 0&&l.dispatchEvent(t);_context11.next=17;return o.updateComplete;case 17:d=o.querySelector('nile-radio[value="3"]');i(d===null||d===void 0?void 0:d.checked).to.be["true"];s=new KeyboardEvent("keydown",{key:"ArrowLeft"});l!==null&&l!==void 0&&l.dispatchEvent(s);_context11.next=23;return o.updateComplete;case 23:i(r===null||r===void 0?void 0:r.checked).to.be["true"];l!==null&&l!==void 0&&l.dispatchEvent(s);_context11.next=27;return o.updateComplete;case 27:i(n===null||n===void 0?void 0:n.checked).to.be["true"];u=new KeyboardEvent("keydown",{key:"ArrowDown"});l!==null&&l!==void 0&&l.dispatchEvent(u);_context11.next=32;return o.updateComplete;case 32:i(r===null||r===void 0?void 0:r.checked).to.be["true"];c=new KeyboardEvent("keydown",{key:"ArrowUp"});l!==null&&l!==void 0&&l.dispatchEvent(c);_context11.next=37;return o.updateComplete;case 37:i(n===null||n===void 0?void 0:n.checked).to.be["true"];case 38:case"end":return _context11.stop();}},_callee10);})));});}};});
|
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-radio-group.cjs.js","../nile-radio/nile-radio.cjs.js","tslib","lit/directives/class-map.js","lit/decorators.js","../internal/slot.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","./nile-radio-group.css.cjs.js","../nile-radio/nile-radio.css.cjs.js"],function(_export,_context){"use strict";var e,i,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10;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){e=_fixture001CjsJs.f;i=_fixture001CjsJs.a;},function(_litStaticHtmlJs){a=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileRadioGroupCjsJs){},function(_nileRadioNileRadioCjsJs){},function(_tslib){},function(_litDirectivesClassMapJs){},function(_litDecoratorsJs){},function(_internalSlotCjsJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){},function(_nileRadioGroupCssCjsJs){},function(_nileRadioNileRadioCssCjsJs){}],execute:function execute(){describe("nile-radio-group",function(){it("should render the radio group with radios",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var o,l;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(a(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Select an option\" name=\"options\" value=\"2\">\n <nile-radio name=\"test\" value=\"1\" label=\"Radio 1\"></nile-radio>\n <nile-radio name=\"test\" value=\"2\" label=\"Radio 2\"></nile-radio>\n <nile-radio name=\"test\" value=\"3\" label=\"Radio 3\"></nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context2.sent;l=o.querySelectorAll("nile-radio");i(l.length).to.equal(3),i(o.label).to.equal("Select an option");case 5:case"end":return _context2.stop();}},_callee);}))),it("should select the correct radio based on value",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var o;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(a(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Select an option\" name=\"options\" value=\"2\">\n <nile-radio name=\"test\" value=\"1\" label=\"Radio 1\"></nile-radio>\n <nile-radio name=\"test\" value=\"2\" label=\"Radio 2\"></nile-radio>\n <nile-radio name=\"test\" value=\"3\" label=\"Radio 3\"></nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context3.sent.querySelector('nile-radio[value="2"]');i(o===null||o===void 0?void 0:o.checked).to.be["true"];case 4:case"end":return _context3.stop();}},_callee2);}))),it("should emit change event when radio selection changes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var o,l,n;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(a(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Select an option\" name=\"options\" value=\"1\">\n <nile-radio name=\"test\" value=\"1\" label=\"Radio 1\"></nile-radio>\n <nile-radio name=\"test\" value=\"2\" label=\"Radio 2\"></nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context4.sent;l=!1;o.addEventListener("change",function(){l=!0;});n=o.querySelector('nile-radio[value="2"]');n!==null&&n!==void 0&&n.click();_context4.next=9;return o.updateComplete;case 9:i(l).to.be["true"];i(o.value).to.equal("2");case 11:case"end":return _context4.stop();}},_callee3);}))),it("should handle disabled radios correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var o,l,n;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(a(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Disabled Option\" name=\"options\">\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\" disabled islabelborder>Radio 2</nile-radio>\n <nile-radio name=\"test\" value=\"3\" disabled>Radio 3</nile-radio>\n <nile-radio name=\"test\" value=\"4\">Radio 4</nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context5.sent;l=o.querySelectorAll("nile-radio[disabled]");i(l.length).to.equal(2);n=o.querySelector('nile-radio[value="1"]');n!==null&&n!==void 0&&n.click();_context5.next=9;return o.updateComplete;case 9:i(o.value).to.equal("1");case 10:case"end":return _context5.stop();}},_callee4);}))),it("should not allow selection of disabled radio",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var o,l;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(a(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Disabled Option\" name=\"options\">\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\" disabled>Radio 2</nile-radio>\n <nile-radio name=\"test\" value=\"3\">Radio 3</nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context6.sent;l=o.querySelector('nile-radio[value="2"]');l!==null&&l!==void 0&&l.click();_context6.next=7;return o.updateComplete;case 7:i(o.value).to.equal("");case 8:case"end":return _context6.stop();}},_callee5);}))),it("should correctly handle the islabelborder property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(a(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Border Option\" name=\"options\" islabelborder>\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\"> Radio 2 </nile-radio>\n </nile-radio-group>\n "]))));case 2:_context7.sent.querySelectorAll("nile-radio").forEach(function(e){i(e.islabelborder).to.be["true"];});case 3:case"end":return _context7.stop();}},_callee6);}))),it("should focus the first radio when the label is clicked",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _o$shadowRoot;var o,l,n;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(a(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Focus Test\" name=\"options\">\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\"> Radio 2 </nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context8.sent;l=(_o$shadowRoot=o.shadowRoot)===null||_o$shadowRoot===void 0?void 0:_o$shadowRoot.querySelector("label");l!==null&&l!==void 0&&l.click();_context8.next=7;return o.updateComplete;case 7:n=o.querySelector('nile-radio[value="1"]');i(document.activeElement).to.equal(n);case 9:case"end":return _context8.stop();}},_callee7);}))),it("should set required attribute correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _o$shadowRoot2;var o,l;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(a(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Required Test\" name=\"options\" required>\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\"> Radio 2 </nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context9.sent;l=(_o$shadowRoot2=o.shadowRoot)===null||_o$shadowRoot2===void 0?void 0:_o$shadowRoot2.querySelector(".radio-group__validation-input");i(l===null||l===void 0?void 0:l.required).to.be["true"];case 5:case"end":return _context9.stop();}},_callee8);}))),it("should reflect the current value property correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var o,l;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return e(a(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <nile-radio-group label=\"Reflect Test\" name=\"options\" value=\"1\">\n <nile-radio name=\"test\" value=\"1\"> Radio 1 </nile-radio>\n <nile-radio name=\"test\" value=\"2\"> Radio 2 </nile-radio>\n </nile-radio-group>\n "]))));case 2:o=_context10.sent;i(o.value).to.equal("1");o.value="2";_context10.next=7;return o.updateComplete;case 7:i(o.value).to.equal("2");l=o.querySelector('nile-radio[value="2"]');i(l===null||l===void 0?void 0:l.checked).to.be["true"];case 10:case"end":return _context10.stop();}},_callee9);}))),it("should toggle selection with arrow keys",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var _o$shadowRoot3;var o,l,n,t,r,d,s,u,c;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return e(a(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n\t\t\t<nile-radio-group label=\"Arrow Key Navigation\" name=\"options\">\n\t\t\t\t<nile-radio name=\"test\" value=\"1\" label=\"Radio 1\"></nile-radio>\n\t\t\t\t<nile-radio name=\"test\" value=\"2\" label=\"Radio 2\"></nile-radio>\n\t\t\t\t<nile-radio name=\"test\" value=\"3\" label=\"Radio 3\"></nile-radio>\n\t\t\t</nile-radio-group>\n\t\t"]))));case 2:o=_context11.sent;l=(_o$shadowRoot3=o.shadowRoot)===null||_o$shadowRoot3===void 0?void 0:_o$shadowRoot3.querySelector("fieldset > div > div:nth-child(2) > slot");n=o.querySelector('nile-radio[value="1"]');n!==null&&n!==void 0&&n.click();_context11.next=8;return o.updateComplete;case 8:t=new KeyboardEvent("keydown",{key:"ArrowRight"});l!==null&&l!==void 0&&l.dispatchEvent(t);_context11.next=12;return o.updateComplete;case 12:r=o.querySelector('nile-radio[value="2"]');i(r===null||r===void 0?void 0:r.checked).to.be["true"];l!==null&&l!==void 0&&l.dispatchEvent(t);_context11.next=17;return o.updateComplete;case 17:d=o.querySelector('nile-radio[value="3"]');i(d===null||d===void 0?void 0:d.checked).to.be["true"];s=new KeyboardEvent("keydown",{key:"ArrowLeft"});l!==null&&l!==void 0&&l.dispatchEvent(s);_context11.next=23;return o.updateComplete;case 23:i(r===null||r===void 0?void 0:r.checked).to.be["true"];l!==null&&l!==void 0&&l.dispatchEvent(s);_context11.next=27;return o.updateComplete;case 27:i(n===null||n===void 0?void 0:n.checked).to.be["true"];u=new KeyboardEvent("keydown",{key:"ArrowDown"});l!==null&&l!==void 0&&l.dispatchEvent(u);_context11.next=32;return o.updateComplete;case 32:i(r===null||r===void 0?void 0:r.checked).to.be["true"];c=new KeyboardEvent("keydown",{key:"ArrowUp"});l!==null&&l!==void 0&&l.dispatchEvent(c);_context11.next=37;return o.updateComplete;case 37:i(n===null||n===void 0?void 0:n.checked).to.be["true"];case 38:case"end":return _context11.stop();}},_callee10);})));});}};});
|
2
2
|
//# sourceMappingURL=nile-radio-group.test.cjs.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{f as e,a as i}from"../fixture-
|
1
|
+
import{f as e,a as i}from"../fixture-588a3119.esm.js";import{html as a}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-radio-group.esm.js";import"../nile-radio/nile-radio.esm.js";import"tslib";import"lit/directives/class-map.js";import"lit/decorators.js";import"../internal/slot.esm.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";import"./nile-radio-group.css.esm.js";import"../nile-radio/nile-radio.css.esm.js";describe("nile-radio-group",(()=>{it("should render the radio group with radios",(async()=>{const o=await e(a`
|
2
2
|
<nile-radio-group label="Select an option" name="options" value="2">
|
3
3
|
<nile-radio name="test" value="1" label="Radio 1"></nile-radio>
|
4
4
|
<nile-radio name="test" value="2" label="Radio 2"></nile-radio>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./nile-rich-text-editor.cjs.js","tslib","lit","lit/decorators.js","./nile-rte-toolbar.cjs.js","./nile-rte-toolbar-item.cjs.js","./nile-rte-select.cjs.js","./nile-rte-color.cjs.js","./nile-rte-divider.cjs.js","./nile-rte-preview.cjs.js","./nile-rte-mentions.cjs.js","./utils.cjs.js","./nile-rich-text-editor.css.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileRichTextEditorCjsJs){_export("NileRichTextEditor",_nileRichTextEditorCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileRteToolbarCjsJs){},function(_nileRteToolbarItemCjsJs){},function(_nileRteSelectCjsJs){},function(_nileRteColorCjsJs){},function(_nileRteDividerCjsJs){},function(_nileRtePreviewCjsJs){},function(_nileRteMentionsCjsJs){},function(_utilsCjsJs){},function(_nileRichTextEditorCssCjsJs){}],execute:function execute(){}};});
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
export{N as NileRichTextEditor}from"./nile-rich-text-editor.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-rte-toolbar.esm.js";import"./nile-rte-toolbar-item.esm.js";import"./nile-rte-select.esm.js";import"./nile-rte-color.esm.js";import"./nile-rte-divider.esm.js";import"./nile-rte-preview.esm.js";import"./nile-rte-mentions.esm.js";import"./utils.esm.js";import"./nile-rich-text-editor.css.esm.js";
|
@@ -0,0 +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(["tslib","lit","lit/decorators.js","./nile-rte-toolbar.cjs.js","./nile-rte-toolbar-item.cjs.js","./nile-rte-select.cjs.js","./nile-rte-color.cjs.js","./nile-rte-divider.cjs.js","./nile-rte-preview.cjs.js","./nile-rte-mentions.cjs.js","./utils.cjs.js","./nile-rich-text-editor.css.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,n,r,o,h,l,c,a,u,d,f,p,m,b,g;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 _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.LitElement;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;e=_litDecoratorsJs.state;n=_litDecoratorsJs.customElement;},function(_nileRteToolbarCjsJs){},function(_nileRteToolbarItemCjsJs){},function(_nileRteSelectCjsJs){},function(_nileRteColorCjsJs){},function(_nileRteDividerCjsJs){},function(_nileRtePreviewCjsJs){},function(_nileRteMentionsCjsJs){},function(_utilsCjsJs){r=_utilsCjsJs.s;o=_utilsCjsJs.a;h=_utilsCjsJs.b;l=_utilsCjsJs.c;c=_utilsCjsJs.d;a=_utilsCjsJs.i;u=_utilsCjsJs.t;d=_utilsCjsJs.n;f=_utilsCjsJs.e;p=_utilsCjsJs.r;},function(_nileRichTextEditorCssCjsJs){m=_nileRichTextEditorCssCjsJs.s;}],execute:function execute(){b={bold:"nile-bold",italic:"nile-italic",underline:"nile-underline",link:"user",left:"nile-leftalign",center:"nile-centeralign",right:"nile-rightalign",justify:"nile-justify",ul:"nile-ul",ol:"nile-ol",clear:"error"};_export("N",g=/*#__PURE__*/function(_i){function g(){var _this;_classCallCheck(this,g);_this=_callSuper(this,g,arguments),_this.value="",_this.mentions={},_this.content="",_this.previewEl=null,_this.toolbarEl=null,_this.lastRange=null,_this.buttonMap=new Map(),_this.headingSelect=null,_this.fontSelect=null,_this.colorInput=null,_this.bgColorInput=null,_this.colorSwatchEl=null,_this.bgSwatchEl=null,_this.mentionsEl=null,_this.onSelectionChange=function(){if(!_this.editorEl)return;var t=document.getSelection();if(!t||0===t.rangeCount)return;var i=t.getRangeAt(0);_this.editorEl.contains(i.commonAncestorContainer)&&(_this.lastRange=i.cloneRange(),_this.updateToolbarState());};return _this;}_inherits(g,_i);return _createClass(g,[{key:"createRenderRoot",value:function createRenderRoot(){return this;}},{key:"shouldUpdate",value:function shouldUpdate(){return!1;}},{key:"injectCss",value:function injectCss(t){if(this.querySelector("style[data-rte-style]"))return;var i=document.createElement("style");i.setAttribute("data-rte-style","true"),i.textContent=t,this.insertBefore(i,this.firstChild);}},{key:"connectedCallback",value:function connectedCallback(){var _this$mentionsEl$atta,_this$mentionsEl,_this$mentionsEl$setE,_this$mentionsEl2;_superPropGet(g,"connectedCallback",this,3)([]),this.injectCss(m.cssText),this.toolbarEl=this.querySelector("nile-rte-toolbar"),this.previewEl=this.querySelector("nile-rte-preview"),this.ensureEditor(),this.value&&!this.editorEl.innerHTML.trim()&&(this.editorEl.innerHTML=this.value),this.content=this.editorEl.innerHTML,this.toolbarEl&&this.wireAuthoredToolbar(this.toolbarEl),this.mentionsEl=this.querySelector("nile-rte-mentions"),this.mentionsEl&&((_this$mentionsEl$atta=(_this$mentionsEl=this.mentionsEl).attach)!==null&&_this$mentionsEl$atta!==void 0&&_this$mentionsEl$atta.call(_this$mentionsEl,this.editorEl,this),(_this$mentionsEl$setE=(_this$mentionsEl2=this.mentionsEl).setExternalConfig)!==null&&_this$mentionsEl$setE!==void 0&&_this$mentionsEl$setE.call(_this$mentionsEl2,this.mentions)),this.wireEditor(),this.updateToolbarState(),this.syncPreview(),document.addEventListener("selectionchange",this.onSelectionChange,!0);}},{key:"disconnectedCallback",value:function disconnectedCallback(){document.removeEventListener("selectionchange",this.onSelectionChange,!0),this.mentionsEl&&this.mentionsEl.detach&&this.mentionsEl.detach(),_superPropGet(g,"disconnectedCallback",this,3)([]);}},{key:"ensureEditor",value:function ensureEditor(){if(this.editorEl=this.querySelector(".editor"),!this.editorEl){var _this$toolbarEl;var _t=document.createElement("div");_t.className="editor",_t.setAttribute("contenteditable","true"),(_this$toolbarEl=this.toolbarEl)!==null&&_this$toolbarEl!==void 0&&_this$toolbarEl.nextSibling?this.insertBefore(_t,this.toolbarEl.nextSibling):this.previewEl?this.insertBefore(_t,this.previewEl):this.appendChild(_t),this.editorEl=_t;}this.editorEl.innerHTML.trim()||(this.editorEl.innerHTML="<p><br></p>"),this.ensureAtLeastOneParagraph();}},{key:"wireEditor",value:function wireEditor(){var _this2=this;this.editorEl.addEventListener("input",function(){_this2.ensureAtLeastOneParagraph(),_this2.updateContent();}),this.editorEl.addEventListener("mouseup",function(){return _this2.saveSelection();}),this.editorEl.addEventListener("keyup",function(){return _this2.saveSelection();});}},{key:"wireAuthoredToolbar",value:function wireAuthoredToolbar(t){var _this3=this;this.buttonMap.clear(),this.headingSelect=null,this.fontSelect=null,this.colorInput=null,Array.from(t.children).forEach(function(t){var i=t.tagName.toLowerCase();if("nile-rte-select"!==i||"align"!==t.getAttribute("type")){if("nile-rte-toolbar-item"===i){var _this3$buttonMap$get;var _i2=t.querySelector(":scope > nile-button");var _s=t.getAttribute("name")||"",_e=t.getAttribute("label")||_s,_n=t.getAttribute("icon"),_r=t.innerHTML.trim().length>0;if(_i2||(_i2=document.createElement("nile-button"),_i2.variant="tertiary",_i2.size="small"),_n)_i2.innerHTML="<nile-icon name=\"".concat(_n,"\" aria-label=\"").concat(_e,"\"></nile-icon>"),t.innerHTML="";else if(_r)_i2.innerHTML=t.innerHTML,t.innerHTML="";else{var _n2=b[_s];_n2?_i2.innerHTML="<nile-icon name=\"".concat(_n2,"\" size=\"20\" color=\"black\" aria-label=\"").concat(_e,"\"></nile-icon>"):_i2.textContent=_e||_s,t.innerHTML="";}_i2.isConnected||t.appendChild(_i2),_i2.setAttribute("aria-label",_e),_i2.addEventListener("mousedown",function(t){return t.preventDefault();}),_i2.addEventListener("click",function(){return _this3.onToolbarCommand(_s);});var _o=(_this3$buttonMap$get=_this3.buttonMap.get(_s))!==null&&_this3$buttonMap$get!==void 0?_this3$buttonMap$get:[];return _o.push(_i2),void _this3.buttonMap.set(_s,_o);}if("nile-rte-select"!==i){if("nile-rte-color"===i){var _t$getAttribute,_t$getAttribute2,_t$getAttribute3;var _i3=(_t$getAttribute=t.getAttribute("label"))!==null&&_t$getAttribute!==void 0?_t$getAttribute:"Text color",_s2=(_t$getAttribute2=t.getAttribute("value"))!==null&&_t$getAttribute2!==void 0?_t$getAttribute2:"#000000",_e2=(_t$getAttribute3=t.getAttribute("mode"))!==null&&_t$getAttribute3!==void 0?_t$getAttribute3:"text";var _n3=t.querySelector(':scope > input[type="color"]');_n3||(_n3=document.createElement("input"),_n3.type="color",_n3.style.position="absolute",_n3.style.opacity="0",_n3.style.pointerEvents="none",t.appendChild(_n3)),_n3.title=_i3,_n3.value=_s2;var _r2=t.querySelector(":scope > button.rte-color-trigger");_r2||(_r2=document.createElement("button"),_r2.type="button",_r2.className="rte-color-trigger",_r2.setAttribute("aria-label",_i3),_r2.innerHTML="background"===_e2?'\n <span class="swatch-box" aria-hidden="true"></span>\n ':'\n <span class="glyph-stack" aria-hidden="true">\n <span class="glyph">A</span>\n <span class="underline"></span>\n </span>\n ',t.appendChild(_r2));var _o2=_r2.querySelector(".underline"),_h=_r2.querySelector(".swatch-box");"background"===_e2?(_this3.bgColorInput=_n3,_this3.bgSwatchEl=_h,_this3.bgSwatchEl&&(_this3.bgSwatchEl.style.backgroundColor=_n3.value)):(_this3.colorInput=_n3,_this3.colorSwatchEl=_o2,_this3.colorSwatchEl&&(_this3.colorSwatchEl.style.backgroundColor=_n3.value)),_r2.addEventListener("click",function(t){t.preventDefault(),_this3.focusAndRestore(),_n3.click();}),_n3.addEventListener("input",function(){_this3.focusAndRestore(),"background"===_e2?(l(_this3.editorEl,_n3.value),_this3.bgSwatchEl&&(_this3.bgSwatchEl.style.backgroundColor=_n3.value)):(c(_this3.editorEl,_n3.value),_this3.colorSwatchEl&&(_this3.colorSwatchEl.style.backgroundColor=_n3.value)),_this3.updateContent(),_this3.updateToolbarState();}),_r2.addEventListener("mousedown",function(t){return t.preventDefault();}),_n3.addEventListener("mousedown",function(t){return t.preventDefault();});}}else{var _i4=t.getAttribute("type")||"";t.addEventListener("change",function(t){_this3.focusAndRestore();var s=t.detail;"heading"===_i4?o(_this3.editorEl,s):"font"===_i4&&h(_this3.editorEl,s),_this3.updateContent(),_this3.updateToolbarState();});}}else t.addEventListener("change",function(t){_this3.focusAndRestore();var i=t.detail;r(_this3.editorEl,i),_this3.updateContent(),_this3.updateToolbarState();});});}},{key:"saveSelection",value:function saveSelection(){var t=window.getSelection();t&&t.rangeCount&&(this.lastRange=t.getRangeAt(0).cloneRange());}},{key:"restoreSelection",value:function restoreSelection(){if(!this.lastRange)return;var t=document.getSelection();t&&(t.removeAllRanges(),t.addRange(this.lastRange));}},{key:"focusAndRestore",value:function focusAndRestore(){var _this$editorEl;(_this$editorEl=this.editorEl)!==null&&_this$editorEl!==void 0&&_this$editorEl.focus(),this.restoreSelection();}},{key:"insertList",value:function insertList(t){if(this.restoreSelection(),!this.lastRange)return;var i=document.createElement(t),s=this.lastRange.extractContents(),e=document.createElement("div");e.appendChild(s),Array.from(e.childNodes).forEach(function(t){var _t$textContent;if(t.nodeType===Node.TEXT_NODE&&!((_t$textContent=t.textContent)!==null&&_t$textContent!==void 0&&_t$textContent.trim()))return;var s=document.createElement("li");s.appendChild(t),i.appendChild(s);}),this.lastRange.insertNode(i),this.afterListEdit(i);}},{key:"afterListEdit",value:function afterListEdit(t){var i=document.createRange();i.setStartAfter(t),i.collapse(!0);var s=window.getSelection();s!==null&&s!==void 0&&s.removeAllRanges(),s!==null&&s!==void 0&&s.addRange(i),this.saveSelection(),this.updateContent(),this.updateToolbarState();}},{key:"ensureAtLeastOneParagraph",value:function ensureAtLeastOneParagraph(){var _t$textContent2;var t=this.editorEl;if(!t)return;var i=""===((_t$textContent2=t.textContent)!==null&&_t$textContent2!==void 0?_t$textContent2:"").replace(/\u200B/g,"").trim();if(0===t.childNodes.length||i)return void(t.innerHTML="<p><br></p>");if(!t.querySelector("p,h1,h2,h3,h4,h5,h6,ul,ol,table,blockquote,pre")){var _i5=document.createElement("p");for(;t.firstChild;)_i5.appendChild(t.firstChild);return _i5.hasChildNodes()||_i5.appendChild(document.createElement("br")),void t.appendChild(_i5);}t.querySelectorAll("p").forEach(function(t){var _t$textContent3;""===((_t$textContent3=t.textContent)!==null&&_t$textContent3!==void 0?_t$textContent3:"").replace(/\u200B/g,"")&&(t.innerHTML.toLowerCase().includes("<br")||(t.innerHTML="<br>"));});}},{key:"onToolbarCommand",value:function onToolbarCommand(t){switch(this.focusAndRestore(),t){case"bold":u(this.editorEl,"strong");break;case"italic":u(this.editorEl,"em");break;case"underline":u(this.editorEl,"u");break;case"left":r(this.editorEl,"left");break;case"center":r(this.editorEl,"center");break;case"right":r(this.editorEl,"right");break;case"justify":r(this.editorEl,"justify");break;case"ul":this.insertList("ul");break;case"ol":this.insertList("ol");break;case"link":a(this.editorEl);break;case"clear":var _t2=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),_i6=[];for(;_t2.nextNode();){var _s3=_t2.currentNode;_s3.removeAttribute("style"),["B","STRONG","I","EM","U","SPAN","FONT"].includes(_s3.tagName)&&_i6.push(_s3);}for(var _i8=0,_i7=_i6;_i8<_i7.length;_i8++){var _t3=_i7[_i8];for(;_t3.firstChild;){var _t3$parentNode;(_t3$parentNode=_t3.parentNode)===null||_t3$parentNode===void 0||_t3$parentNode.insertBefore(_t3.firstChild,_t3);}_t3.remove();}this.ensureAtLeastOneParagraph();}this.updateContent(),this.updateToolbarState();}},{key:"setBtnActive",value:function setBtnActive(t,i){var s=this.buttonMap.get(t);if(s){var _iterator=_createForOfIteratorHelper(s),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _t4=_step.value;_t4.toggleAttribute("data-active",!!i);}}catch(err){_iterator.e(err);}finally{_iterator.f();}}}},{key:"updateToolbarState",value:function updateToolbarState(){var _this4=this,_s$closest;if(!this.editorEl)return;var t=document.getSelection();if(!t||0===t.rangeCount)return;var i=t.getRangeAt(0);if(!this.editorEl.contains(i.commonAncestorContainer))return;var s=d(i.startContainer)||this.editorEl,e=getComputedStyle(s),n=f(i.startContainer,this.editorEl)||this.editorEl,r=function(){var t=s;for(;t&&t!==_this4.editorEl;){if(t instanceof HTMLElement){var _i9=t.tagName.toLowerCase();if("strong"===_i9||"b"===_i9)return!0;var _s4=getComputedStyle(t).fontWeight;if(parseInt(_s4,10)>=600)return!0;}t=t.parentNode;}return!1;}(),o=function(){var t=s;for(;t&&t!==_this4.editorEl;){if(t instanceof HTMLElement){var _i10=t.tagName.toLowerCase();if("em"===_i10||"i"===_i10)return!0;if("italic"===getComputedStyle(t).fontStyle)return!0;}t=t.parentNode;}return!1;}(),h=function(){var t=s;for(;t&&t!==_this4.editorEl;){if(t instanceof HTMLElement){var _i11=getComputedStyle(t).textDecorationLine;if(_i11&&_i11.includes("underline"))return!0;if("u"===t.tagName.toLowerCase())return!0;}t=t.parentNode;}return!1;}(),l=!!s.closest("a"),c=n.style.textAlign||getComputedStyle(n).textAlign||"start",a="start"===c?"left":c,u=!!s.closest("li")&&((_s$closest=s.closest("ul,ol"))===null||_s$closest===void 0?void 0:_s$closest.tagName.toLowerCase())||"";if(this.setBtnActive("bold",r),this.setBtnActive("italic",o),this.setBtnActive("underline",h),this.setBtnActive("link",l),this.setBtnActive("left","left"===a&&!["center","right","justify"].includes(a)),this.setBtnActive("center","center"===a),this.setBtnActive("right","right"===a),this.setBtnActive("justify","justify"===a),this.setBtnActive("ul","ul"===u),this.setBtnActive("ol","ol"===u),this.headingSelect){var _t5=n.tagName.toLowerCase(),_i12=["h1","h2","h3"].includes(_t5)?_t5:"p";this.headingSelect.value!==_i12&&(this.headingSelect.value=_i12);}if(this.fontSelect){var _t6=(e.fontFamily||"").replace(/["']/g,"").split(",")[0].trim().toLowerCase();if(_t6)for(var _i13=0,_Array$from=Array.from(this.fontSelect.options);_i13<_Array$from.length;_i13++){var _i14=_Array$from[_i13];if(_i14.value.toLowerCase()===_t6){this.fontSelect.value=_i14.value;break;}}}if(this.colorInput){var _t7=p(e.color);_t7&&this.colorInput.value.toLowerCase()!==_t7.toLowerCase()&&(this.colorInput.value=_t7),this.colorSwatchEl&&(this.colorSwatchEl.style.backgroundColor=this.colorInput.value);}if(this.bgColorInput){var _t8=getComputedStyle(s).backgroundColor;if(_t8&&!/transparent|rgba\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(_t8)){var _i15=p(_t8);_i15&&this.bgColorInput.value.toLowerCase()!==_i15.toLowerCase()&&(this.bgColorInput.value=_i15);}this.bgSwatchEl&&(this.bgSwatchEl.style.backgroundColor=this.bgColorInput.value);}}},{key:"syncPreview",value:function syncPreview(){this.updateContent();}},{key:"updateContent",value:function updateContent(){this.editorEl&&(this.ensureAtLeastOneParagraph(),this.content=this.editorEl.innerHTML,this.previewEl&&(this.previewEl.innerHTML=this.content),this.dispatchEvent(new CustomEvent("content-changed",{detail:{content:this.content},bubbles:!0,composed:!0})));}}]);}(i));t([s({type:String})],g.prototype,"value",void 0),t([s({attribute:"mentions",converter:{fromAttribute:function fromAttribute(t){try{var _i16=JSON.parse(t),_s5={};for(var _i17=0,_Object$keys=Object.keys(_i16);_i17<_Object$keys.length;_i17++){var _t9=_Object$keys[_i17];var _e3=_i16[_t9];Array.isArray(_e3)&&(_s5[_t9]=_e3.filter(function(t){return t&&"string"==typeof t.key&&"string"==typeof t.label;}).map(function(t){return{key:t.key,label:t.label};}));}return _s5;}catch(_unused){return{};}},toAttribute:function toAttribute(t){return JSON.stringify(t);}}})],g.prototype,"mentions",void 0),t([e()],g.prototype,"content",void 0),_export("N",g=t([n("nile-rich-text-editor")],g));}};});
|
2
|
+
//# sourceMappingURL=nile-rich-text-editor.cjs.js.map
|